From 013c1ea3121656821e627c6e4e3f67bad994986e Mon Sep 17 00:00:00 2001 From: genxium Date: Sun, 25 Dec 2022 14:18:48 +0800 Subject: [PATCH] Fixed character offset in OfflineMap2. --- frontend/assets/plugin_scripts/jsexport.js | 211027 +-------------- .../assets/plugin_scripts/jsexport.js.meta | 2 +- .../pbfiles/room_downsync_frame.proto | 2 +- .../prefabs/ControlledCharacter.prefab | 4 +- frontend/assets/scenes/login.fire | 2 +- frontend/assets/scenes/offline_map_1.fire | 2 +- frontend/assets/scenes/offline_map_2.fire | 2 +- frontend/assets/scripts/OfflineMapBackend.js | 56 +- jsexport/{models => battle}/battle.go | 293 +- jsexport/battle/room_downsync_frame.go | 90 + jsexport/go.mod | 8 +- jsexport/go.sum | 19 +- jsexport/main.go | 39 +- jsexport/protos/room_downsync_frame.pb.go | 1896 - proto_gen_shortcut.sh | 2 +- 15 files changed, 514 insertions(+), 212930 deletions(-) rename jsexport/{models => battle}/battle.go (56%) create mode 100644 jsexport/battle/room_downsync_frame.go delete mode 100644 jsexport/protos/room_downsync_frame.pb.go diff --git a/frontend/assets/plugin_scripts/jsexport.js b/frontend/assets/plugin_scripts/jsexport.js index ee67af2..9f8e428 100644 --- a/frontend/assets/plugin_scripts/jsexport.js +++ b/frontend/assets/plugin_scripts/jsexport.js @@ -2,210991 +2,48 @@ (function() { var $goVersion = "go1.18.6"; -Error.stackTraceLimit = Infinity; - -var $NaN = NaN; -var $global, $module; -if (typeof window !== "undefined") { /* web page */ - $global = window; -} else if (typeof self !== "undefined") { /* web worker */ - $global = self; -} else if (typeof global !== "undefined") { /* Node.js */ - $global = global; - $global.require = require; -} else { /* others (e.g. Nashorn) */ - $global = this; -} - -if ($global === undefined || $global.Array === undefined) { - throw new Error("no global object found"); -} -if (typeof module !== "undefined") { - $module = module; -} - -if (!$global.fs && $global.require) { - try { - var fs = $global.require('fs'); - if (typeof fs === "object" && fs !== null && Object.keys(fs).length !== 0) { - $global.fs = fs; - } - } catch(e) { /* Ignore if the module couldn't be loaded. */ } -} - -if (!$global.fs) { - var outputBuf = ""; - var decoder = new TextDecoder("utf-8"); - $global.fs = { - constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused - writeSync: function writeSync(fd, buf) { - outputBuf += decoder.decode(buf); - var nl = outputBuf.lastIndexOf("\n"); - if (nl != -1) { - console.log(outputBuf.substr(0, nl)); - outputBuf = outputBuf.substr(nl + 1); - } - return buf.length; - }, - write: function write(fd, buf, offset, length, position, callback) { - if (offset !== 0 || length !== buf.length || position !== null) { - callback(enosys()); - return; - } - var n = this.writeSync(fd, buf); - callback(null, n); - } - }; -} - -var $linknames = {} // Collection of functions referenced by a go:linkname directive. -var $packages = {}, $idCounter = 0; -var $keys = function(m) { return m ? Object.keys(m) : []; }; -var $flushConsole = function() {}; -var $throwRuntimeError; /* set by package "runtime" */ -var $throwNilPointerError = function() { $throwRuntimeError("invalid memory address or nil pointer dereference"); }; -var $call = function(fn, rcvr, args) { return fn.apply(rcvr, args); }; -var $makeFunc = function(fn) { return function() { return $externalize(fn(this, new ($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments, []))), $emptyInterface); }; }; -var $unused = function(v) {}; -var $print = console.log; -// Under Node we can emulate print() more closely by avoiding a newline. -if (($global.process !== undefined) && $global.require) { - try { - var util = $global.require('util'); - $print = function() { $global.process.stderr.write(util.format.apply(this, arguments)); }; - } catch (e) { - // Failed to require util module, keep using console.log(). - } -} -var $println = console.log - -var $initAllLinknames = function() { - var names = $keys($packages); - for (var i = 0; i < names.length; i++) { - var f = $packages[names[i]]["$initLinknames"]; - if (typeof f == 'function') { - f(); - } - } -} - -var $mapArray = function(array, f) { - var newArray = new array.constructor(array.length); - for (var i = 0; i < array.length; i++) { - newArray[i] = f(array[i]); - } - return newArray; -}; - -// Returns a method bound to the receiver instance, safe to invoke as a -// standalone function. Bound function is cached for later reuse. -var $methodVal = function(recv, name) { - var vals = recv.$methodVals || {}; - recv.$methodVals = vals; /* noop for primitives */ - var f = vals[name]; - if (f !== undefined) { - return f; - } - var method = recv[name]; - f = method.bind(recv); - vals[name] = f; - return f; -}; - -var $methodExpr = function(typ, name) { - var method = typ.prototype[name]; - if (method.$expr === undefined) { - method.$expr = function() { - $stackDepthOffset--; - try { - if (typ.wrapped) { - arguments[0] = new typ(arguments[0]); - } - return Function.call.apply(method, arguments); - } finally { - $stackDepthOffset++; - } - }; - } - return method.$expr; -}; - -var $ifaceMethodExprs = {}; -var $ifaceMethodExpr = function(name) { - var expr = $ifaceMethodExprs["$" + name]; - if (expr === undefined) { - expr = $ifaceMethodExprs["$" + name] = function() { - $stackDepthOffset--; - try { - return Function.call.apply(arguments[0][name], arguments); - } finally { - $stackDepthOffset++; - } - }; - } - return expr; -}; - -var $subslice = function(slice, low, high, max) { - if (high === undefined) { - high = slice.$length; - } - if (max === undefined) { - max = slice.$capacity; - } - if (low < 0 || high < low || max < high || high > slice.$capacity || max > slice.$capacity) { - $throwRuntimeError("slice bounds out of range"); - } - if (slice === slice.constructor.nil) { - return slice; - } - var s = new slice.constructor(slice.$array); - s.$offset = slice.$offset + low; - s.$length = high - low; - s.$capacity = max - low; - return s; -}; - -var $substring = function(str, low, high) { - if (low < 0 || high < low || high > str.length) { - $throwRuntimeError("slice bounds out of range"); - } - return str.substring(low, high); -}; - -// Convert Go slice to an equivalent JS array type. -var $sliceToNativeArray = function(slice) { - if (slice.$array.constructor !== Array) { - return slice.$array.subarray(slice.$offset, slice.$offset + slice.$length); - } - return slice.$array.slice(slice.$offset, slice.$offset + slice.$length); -}; - -// Convert Go slice to a pointer to an underlying Go array. -// -// Note that an array pointer can be represented by an "unwrapped" native array -// type, and it will be wrapped back into its Go type when necessary. -var $sliceToGoArray = function(slice, arrayPtrType) { - var arrayType = arrayPtrType.elem; - if (arrayType !== undefined && slice.$length < arrayType.len) { - $throwRuntimeError("cannot convert slice with length " + slice.$length + " to pointer to array with length " + arrayType.len); - } - if (slice == slice.constructor.nil) { - return arrayPtrType.nil; // Nil slice converts to nil array pointer. - } - if (slice.$array.constructor !== Array) { - return slice.$array.subarray(slice.$offset, slice.$offset + arrayType.len); - } - if (slice.$offset == 0 && slice.$length == slice.$capacity && slice.$length == arrayType.len) { - return slice.$array; - } - if (arrayType.len == 0) { - return new arrayType([]); - } - - // Array.slice (unlike TypedArray.subarray) returns a copy of an array range, - // which is not sharing memory with the original one, which violates the spec - // for slice to array conversion. This is incompatible with the Go spec, in - // particular that the assignments to the array elements would be visible in - // the slice. Prefer to fail explicitly instead of creating subtle bugs. - $throwRuntimeError("gopherjs: non-numeric slice to underlying array conversion is not supported for subslices"); -}; - -// Convert between compatible slice types (e.g. native and names). -var $convertSliceType = function(slice, desiredType) { - if (slice == slice.constructor.nil) { - return desiredType.nil; // Preserve nil value. - } - - return $subslice(new desiredType(slice.$array), slice.$offset, slice.$offset + slice.$length); -} - -var $decodeRune = function(str, pos) { - var c0 = str.charCodeAt(pos); - - if (c0 < 0x80) { - return [c0, 1]; - } - - if (c0 !== c0 || c0 < 0xC0) { - return [0xFFFD, 1]; - } - - var c1 = str.charCodeAt(pos + 1); - if (c1 !== c1 || c1 < 0x80 || 0xC0 <= c1) { - return [0xFFFD, 1]; - } - - if (c0 < 0xE0) { - var r = (c0 & 0x1F) << 6 | (c1 & 0x3F); - if (r <= 0x7F) { - return [0xFFFD, 1]; - } - return [r, 2]; - } - - var c2 = str.charCodeAt(pos + 2); - if (c2 !== c2 || c2 < 0x80 || 0xC0 <= c2) { - return [0xFFFD, 1]; - } - - if (c0 < 0xF0) { - var r = (c0 & 0x0F) << 12 | (c1 & 0x3F) << 6 | (c2 & 0x3F); - if (r <= 0x7FF) { - return [0xFFFD, 1]; - } - if (0xD800 <= r && r <= 0xDFFF) { - return [0xFFFD, 1]; - } - return [r, 3]; - } - - var c3 = str.charCodeAt(pos + 3); - if (c3 !== c3 || c3 < 0x80 || 0xC0 <= c3) { - return [0xFFFD, 1]; - } - - if (c0 < 0xF8) { - var r = (c0 & 0x07) << 18 | (c1 & 0x3F) << 12 | (c2 & 0x3F) << 6 | (c3 & 0x3F); - if (r <= 0xFFFF || 0x10FFFF < r) { - return [0xFFFD, 1]; - } - return [r, 4]; - } - - return [0xFFFD, 1]; -}; - -var $encodeRune = function(r) { - if (r < 0 || r > 0x10FFFF || (0xD800 <= r && r <= 0xDFFF)) { - r = 0xFFFD; - } - if (r <= 0x7F) { - return String.fromCharCode(r); - } - if (r <= 0x7FF) { - return String.fromCharCode(0xC0 | r >> 6, 0x80 | (r & 0x3F)); - } - if (r <= 0xFFFF) { - return String.fromCharCode(0xE0 | r >> 12, 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); - } - return String.fromCharCode(0xF0 | r >> 18, 0x80 | (r >> 12 & 0x3F), 0x80 | (r >> 6 & 0x3F), 0x80 | (r & 0x3F)); -}; - -var $stringToBytes = function(str) { - var array = new Uint8Array(str.length); - for (var i = 0; i < str.length; i++) { - array[i] = str.charCodeAt(i); - } - return array; -}; - -var $bytesToString = function(slice) { - if (slice.$length === 0) { - return ""; - } - var str = ""; - for (var i = 0; i < slice.$length; i += 10000) { - str += String.fromCharCode.apply(undefined, slice.$array.subarray(slice.$offset + i, slice.$offset + Math.min(slice.$length, i + 10000))); - } - return str; -}; - -var $stringToRunes = function(str) { - var array = new Int32Array(str.length); - var rune, j = 0; - for (var i = 0; i < str.length; i += rune[1], j++) { - rune = $decodeRune(str, i); - array[j] = rune[0]; - } - return array.subarray(0, j); -}; - -var $runesToString = function(slice) { - if (slice.$length === 0) { - return ""; - } - var str = ""; - for (var i = 0; i < slice.$length; i++) { - str += $encodeRune(slice.$array[slice.$offset + i]); - } - return str; -}; - -var $copyString = function(dst, src) { - var n = Math.min(src.length, dst.$length); - for (var i = 0; i < n; i++) { - dst.$array[dst.$offset + i] = src.charCodeAt(i); - } - return n; -}; - -var $copySlice = function(dst, src) { - var n = Math.min(src.$length, dst.$length); - $copyArray(dst.$array, src.$array, dst.$offset, src.$offset, n, dst.constructor.elem); - return n; -}; - -var $copyArray = function(dst, src, dstOffset, srcOffset, n, elem) { - if (n === 0 || (dst === src && dstOffset === srcOffset)) { - return; - } - - if (src.subarray) { - dst.set(src.subarray(srcOffset, srcOffset + n), dstOffset); - return; - } - - switch (elem.kind) { - case $kindArray: - case $kindStruct: - if (dst === src && dstOffset > srcOffset) { - for (var i = n - 1; i >= 0; i--) { - elem.copy(dst[dstOffset + i], src[srcOffset + i]); - } - return; - } - for (var i = 0; i < n; i++) { - elem.copy(dst[dstOffset + i], src[srcOffset + i]); - } - return; - } - - if (dst === src && dstOffset > srcOffset) { - for (var i = n - 1; i >= 0; i--) { - dst[dstOffset + i] = src[srcOffset + i]; - } - return; - } - for (var i = 0; i < n; i++) { - dst[dstOffset + i] = src[srcOffset + i]; - } -}; - -var $clone = function(src, type) { - var clone = type.zero(); - type.copy(clone, src); - return clone; -}; - -var $pointerOfStructConversion = function(obj, type) { - if(obj.$proxies === undefined) { - obj.$proxies = {}; - obj.$proxies[obj.constructor.string] = obj; - } - var proxy = obj.$proxies[type.string]; - if (proxy === undefined) { - var properties = {}; - for (var i = 0; i < type.elem.fields.length; i++) { - (function(fieldProp) { - properties[fieldProp] = { - get: function() { return obj[fieldProp]; }, - set: function(value) { obj[fieldProp] = value; } - }; - })(type.elem.fields[i].prop); - } - proxy = Object.create(type.prototype, properties); - proxy.$val = proxy; - obj.$proxies[type.string] = proxy; - proxy.$proxies = obj.$proxies; - } - return proxy; -}; - -var $append = function(slice) { - return $internalAppend(slice, arguments, 1, arguments.length - 1); -}; - -var $appendSlice = function(slice, toAppend) { - if (toAppend.constructor === String) { - var bytes = $stringToBytes(toAppend); - return $internalAppend(slice, bytes, 0, bytes.length); - } - return $internalAppend(slice, toAppend.$array, toAppend.$offset, toAppend.$length); -}; - -var $internalAppend = function(slice, array, offset, length) { - if (length === 0) { - return slice; - } - - var newArray = slice.$array; - var newOffset = slice.$offset; - var newLength = slice.$length + length; - var newCapacity = slice.$capacity; - - if (newLength > newCapacity) { - newOffset = 0; - newCapacity = Math.max(newLength, slice.$capacity < 1024 ? slice.$capacity * 2 : Math.floor(slice.$capacity * 5 / 4)); - - if (slice.$array.constructor === Array) { - newArray = slice.$array.slice(slice.$offset, slice.$offset + slice.$length); - newArray.length = newCapacity; - var zero = slice.constructor.elem.zero; - for (var i = slice.$length; i < newCapacity; i++) { - newArray[i] = zero(); - } - } else { - newArray = new slice.$array.constructor(newCapacity); - newArray.set(slice.$array.subarray(slice.$offset, slice.$offset + slice.$length)); - } - } - - $copyArray(newArray, array, newOffset + slice.$length, offset, length, slice.constructor.elem); - - var newSlice = new slice.constructor(newArray); - newSlice.$offset = newOffset; - newSlice.$length = newLength; - newSlice.$capacity = newCapacity; - return newSlice; -}; - -var $equal = function(a, b, type) { - if (type === $jsObjectPtr) { - return a === b; - } - switch (type.kind) { - case $kindComplex64: - case $kindComplex128: - return a.$real === b.$real && a.$imag === b.$imag; - case $kindInt64: - case $kindUint64: - return a.$high === b.$high && a.$low === b.$low; - case $kindArray: - if (a.length !== b.length) { - return false; - } - for (var i = 0; i < a.length; i++) { - if (!$equal(a[i], b[i], type.elem)) { - return false; - } - } - return true; - case $kindStruct: - for (var i = 0; i < type.fields.length; i++) { - var f = type.fields[i]; - if (!$equal(a[f.prop], b[f.prop], f.typ)) { - return false; - } - } - return true; - case $kindInterface: - return $interfaceIsEqual(a, b); - default: - return a === b; - } -}; - -var $interfaceIsEqual = function(a, b) { - if (a === $ifaceNil || b === $ifaceNil) { - return a === b; - } - if (a.constructor !== b.constructor) { - return false; - } - if (a.constructor === $jsObjectPtr) { - return a.object === b.object; - } - if (!a.constructor.comparable) { - $throwRuntimeError("comparing uncomparable type " + a.constructor.string); - } - return $equal(a.$val, b.$val, a.constructor); -}; - -var $min = Math.min; -var $mod = function(x, y) { return x % y; }; -var $parseInt = parseInt; -var $parseFloat = function(f) { - if (f !== undefined && f !== null && f.constructor === Number) { - return f; - } - return parseFloat(f); -}; - -var $froundBuf = new Float32Array(1); -var $fround = Math.fround || function(f) { - $froundBuf[0] = f; - return $froundBuf[0]; -}; - -var $imul = Math.imul || function(a, b) { - var ah = (a >>> 16) & 0xffff; - var al = a & 0xffff; - var bh = (b >>> 16) & 0xffff; - var bl = b & 0xffff; - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) >> 0); -}; - -var $floatKey = function(f) { - if (f !== f) { - $idCounter++; - return "NaN$" + $idCounter; - } - return String(f); -}; - -var $flatten64 = function(x) { - return x.$high * 4294967296 + x.$low; -}; - -var $shiftLeft64 = function(x, y) { - if (y === 0) { - return x; - } - if (y < 32) { - return new x.constructor(x.$high << y | x.$low >>> (32 - y), (x.$low << y) >>> 0); - } - if (y < 64) { - return new x.constructor(x.$low << (y - 32), 0); - } - return new x.constructor(0, 0); -}; - -var $shiftRightInt64 = function(x, y) { - if (y === 0) { - return x; - } - if (y < 32) { - return new x.constructor(x.$high >> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); - } - if (y < 64) { - return new x.constructor(x.$high >> 31, (x.$high >> (y - 32)) >>> 0); - } - if (x.$high < 0) { - return new x.constructor(-1, 4294967295); - } - return new x.constructor(0, 0); -}; - -var $shiftRightUint64 = function(x, y) { - if (y === 0) { - return x; - } - if (y < 32) { - return new x.constructor(x.$high >>> y, (x.$low >>> y | x.$high << (32 - y)) >>> 0); - } - if (y < 64) { - return new x.constructor(0, x.$high >>> (y - 32)); - } - return new x.constructor(0, 0); -}; - -var $mul64 = function(x, y) { - var x48 = x.$high >>> 16; - var x32 = x.$high & 0xFFFF; - var x16 = x.$low >>> 16; - var x00 = x.$low & 0xFFFF; - - var y48 = y.$high >>> 16; - var y32 = y.$high & 0xFFFF; - var y16 = y.$low >>> 16; - var y00 = y.$low & 0xFFFF; - - var z48 = 0, z32 = 0, z16 = 0, z00 = 0; - z00 += x00 * y00; - z16 += z00 >>> 16; - z00 &= 0xFFFF; - z16 += x16 * y00; - z32 += z16 >>> 16; - z16 &= 0xFFFF; - z16 += x00 * y16; - z32 += z16 >>> 16; - z16 &= 0xFFFF; - z32 += x32 * y00; - z48 += z32 >>> 16; - z32 &= 0xFFFF; - z32 += x16 * y16; - z48 += z32 >>> 16; - z32 &= 0xFFFF; - z32 += x00 * y32; - z48 += z32 >>> 16; - z32 &= 0xFFFF; - z48 += x48 * y00 + x32 * y16 + x16 * y32 + x00 * y48; - z48 &= 0xFFFF; - - var hi = ((z48 << 16) | z32) >>> 0; - var lo = ((z16 << 16) | z00) >>> 0; - - var r = new x.constructor(hi, lo); - return r; -}; - -var $div64 = function(x, y, returnRemainder) { - if (y.$high === 0 && y.$low === 0) { - $throwRuntimeError("integer divide by zero"); - } - - var s = 1; - var rs = 1; - - var xHigh = x.$high; - var xLow = x.$low; - if (xHigh < 0) { - s = -1; - rs = -1; - xHigh = -xHigh; - if (xLow !== 0) { - xHigh--; - xLow = 4294967296 - xLow; - } - } - - var yHigh = y.$high; - var yLow = y.$low; - if (y.$high < 0) { - s *= -1; - yHigh = -yHigh; - if (yLow !== 0) { - yHigh--; - yLow = 4294967296 - yLow; - } - } - - var high = 0, low = 0, n = 0; - while (yHigh < 2147483648 && ((xHigh > yHigh) || (xHigh === yHigh && xLow > yLow))) { - yHigh = (yHigh << 1 | yLow >>> 31) >>> 0; - yLow = (yLow << 1) >>> 0; - n++; - } - for (var i = 0; i <= n; i++) { - high = high << 1 | low >>> 31; - low = (low << 1) >>> 0; - if ((xHigh > yHigh) || (xHigh === yHigh && xLow >= yLow)) { - xHigh = xHigh - yHigh; - xLow = xLow - yLow; - if (xLow < 0) { - xHigh--; - xLow += 4294967296; - } - low++; - if (low === 4294967296) { - high++; - low = 0; - } - } - yLow = (yLow >>> 1 | yHigh << (32 - 1)) >>> 0; - yHigh = yHigh >>> 1; - } - - if (returnRemainder) { - return new x.constructor(xHigh * rs, xLow * rs); - } - return new x.constructor(high * s, low * s); -}; - -var $divComplex = function(n, d) { - var ninf = n.$real === Infinity || n.$real === -Infinity || n.$imag === Infinity || n.$imag === -Infinity; - var dinf = d.$real === Infinity || d.$real === -Infinity || d.$imag === Infinity || d.$imag === -Infinity; - var nnan = !ninf && (n.$real !== n.$real || n.$imag !== n.$imag); - var dnan = !dinf && (d.$real !== d.$real || d.$imag !== d.$imag); - if(nnan || dnan) { - return new n.constructor(NaN, NaN); - } - if (ninf && !dinf) { - return new n.constructor(Infinity, Infinity); - } - if (!ninf && dinf) { - return new n.constructor(0, 0); - } - if (d.$real === 0 && d.$imag === 0) { - if (n.$real === 0 && n.$imag === 0) { - return new n.constructor(NaN, NaN); - } - return new n.constructor(Infinity, Infinity); - } - var a = Math.abs(d.$real); - var b = Math.abs(d.$imag); - if (a <= b) { - var ratio = d.$real / d.$imag; - var denom = d.$real * ratio + d.$imag; - return new n.constructor((n.$real * ratio + n.$imag) / denom, (n.$imag * ratio - n.$real) / denom); - } - var ratio = d.$imag / d.$real; - var denom = d.$imag * ratio + d.$real; - return new n.constructor((n.$imag * ratio + n.$real) / denom, (n.$imag - n.$real * ratio) / denom); -}; - -var $kindBool = 1; -var $kindInt = 2; -var $kindInt8 = 3; -var $kindInt16 = 4; -var $kindInt32 = 5; -var $kindInt64 = 6; -var $kindUint = 7; -var $kindUint8 = 8; -var $kindUint16 = 9; -var $kindUint32 = 10; -var $kindUint64 = 11; -var $kindUintptr = 12; -var $kindFloat32 = 13; -var $kindFloat64 = 14; -var $kindComplex64 = 15; -var $kindComplex128 = 16; -var $kindArray = 17; -var $kindChan = 18; -var $kindFunc = 19; -var $kindInterface = 20; -var $kindMap = 21; -var $kindPtr = 22; -var $kindSlice = 23; -var $kindString = 24; -var $kindStruct = 25; -var $kindUnsafePointer = 26; - -var $methodSynthesizers = []; -var $addMethodSynthesizer = function(f) { - if ($methodSynthesizers === null) { - f(); - return; - } - $methodSynthesizers.push(f); -}; -var $synthesizeMethods = function() { - $methodSynthesizers.forEach(function(f) { f(); }); - $methodSynthesizers = null; -}; - -var $ifaceKeyFor = function(x) { - if (x === $ifaceNil) { - return 'nil'; - } - var c = x.constructor; - return c.string + '$' + c.keyFor(x.$val); -}; - -var $identity = function(x) { return x; }; - -var $typeIDCounter = 0; - -var $idKey = function(x) { - if (x.$id === undefined) { - $idCounter++; - x.$id = $idCounter; - } - return String(x.$id); -}; - -// Creates constructor functions for array pointer types. Returns a new function -// instace each time to make sure each type is independent of the other. -var $arrayPtrCtor = function() { - return function(array) { - this.$get = function() { return array; }; - this.$set = function(v) { typ.copy(this, v); }; - this.$val = array; - } -} - -var $newType = function(size, kind, string, named, pkg, exported, constructor) { - var typ; - switch(kind) { - case $kindBool: - case $kindInt: - case $kindInt8: - case $kindInt16: - case $kindInt32: - case $kindUint: - case $kindUint8: - case $kindUint16: - case $kindUint32: - case $kindUintptr: - case $kindUnsafePointer: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.keyFor = $identity; - break; - - case $kindString: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.keyFor = function(x) { return "$" + x; }; - break; - - case $kindFloat32: - case $kindFloat64: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.keyFor = function(x) { return $floatKey(x); }; - break; - - case $kindInt64: - typ = function(high, low) { - this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >> 0; - this.$low = low >>> 0; - this.$val = this; - }; - typ.keyFor = function(x) { return x.$high + "$" + x.$low; }; - break; - - case $kindUint64: - typ = function(high, low) { - this.$high = (high + Math.floor(Math.ceil(low) / 4294967296)) >>> 0; - this.$low = low >>> 0; - this.$val = this; - }; - typ.keyFor = function(x) { return x.$high + "$" + x.$low; }; - break; - - case $kindComplex64: - typ = function(real, imag) { - this.$real = $fround(real); - this.$imag = $fround(imag); - this.$val = this; - }; - typ.keyFor = function(x) { return x.$real + "$" + x.$imag; }; - break; - - case $kindComplex128: - typ = function(real, imag) { - this.$real = real; - this.$imag = imag; - this.$val = this; - }; - typ.keyFor = function(x) { return x.$real + "$" + x.$imag; }; - break; - - case $kindArray: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.ptr = $newType(4, $kindPtr, "*" + string, false, "", false, $arrayPtrCtor()); - typ.init = function(elem, len) { - typ.elem = elem; - typ.len = len; - typ.comparable = elem.comparable; - typ.keyFor = function(x) { - return Array.prototype.join.call($mapArray(x, function(e) { - return String(elem.keyFor(e)).replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); - }), "$"); - }; - typ.copy = function(dst, src) { - $copyArray(dst, src, 0, 0, src.length, elem); - }; - typ.ptr.init(typ); - Object.defineProperty(typ.ptr.nil, "nilCheck", { get: $throwNilPointerError }); - }; - break; - - case $kindChan: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.keyFor = $idKey; - typ.init = function(elem, sendOnly, recvOnly) { - typ.elem = elem; - typ.sendOnly = sendOnly; - typ.recvOnly = recvOnly; - }; - break; - - case $kindFunc: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.init = function(params, results, variadic) { - typ.params = params; - typ.results = results; - typ.variadic = variadic; - typ.comparable = false; - }; - break; - - case $kindInterface: - typ = { implementedBy: {}, missingMethodFor: {} }; - typ.keyFor = $ifaceKeyFor; - typ.init = function(methods) { - typ.methods = methods; - methods.forEach(function(m) { - $ifaceNil[m.prop] = $throwNilPointerError; - }); - }; - break; - - case $kindMap: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.init = function(key, elem) { - typ.key = key; - typ.elem = elem; - typ.comparable = false; - }; - break; - - case $kindPtr: - typ = constructor || function(getter, setter, target) { - this.$get = getter; - this.$set = setter; - this.$target = target; - this.$val = this; - }; - typ.keyFor = $idKey; - typ.init = function(elem) { - typ.elem = elem; - typ.wrapped = (elem.kind === $kindArray); - typ.nil = new typ($throwNilPointerError, $throwNilPointerError); - }; - break; - - case $kindSlice: - typ = function(array) { - if (array.constructor !== typ.nativeArray) { - array = new typ.nativeArray(array); - } - this.$array = array; - this.$offset = 0; - this.$length = array.length; - this.$capacity = array.length; - this.$val = this; - }; - typ.init = function(elem) { - typ.elem = elem; - typ.comparable = false; - typ.nativeArray = $nativeArray(elem.kind); - typ.nil = new typ([]); - }; - break; - - case $kindStruct: - typ = function(v) { this.$val = v; }; - typ.wrapped = true; - typ.ptr = $newType(4, $kindPtr, "*" + string, false, pkg, exported, constructor); - typ.ptr.elem = typ; - typ.ptr.prototype.$get = function() { return this; }; - typ.ptr.prototype.$set = function(v) { typ.copy(this, v); }; - typ.init = function(pkgPath, fields) { - typ.pkgPath = pkgPath; - typ.fields = fields; - fields.forEach(function(f) { - if (!f.typ.comparable) { - typ.comparable = false; - } - }); - typ.keyFor = function(x) { - var val = x.$val; - return $mapArray(fields, function(f) { - return String(f.typ.keyFor(val[f.prop])).replace(/\\/g, "\\\\").replace(/\$/g, "\\$"); - }).join("$"); - }; - typ.copy = function(dst, src) { - for (var i = 0; i < fields.length; i++) { - var f = fields[i]; - switch (f.typ.kind) { - case $kindArray: - case $kindStruct: - f.typ.copy(dst[f.prop], src[f.prop]); - continue; - default: - dst[f.prop] = src[f.prop]; - continue; - } - } - }; - /* nil value */ - var properties = {}; - fields.forEach(function(f) { - properties[f.prop] = { get: $throwNilPointerError, set: $throwNilPointerError }; - }); - typ.ptr.nil = Object.create(constructor.prototype, properties); - typ.ptr.nil.$val = typ.ptr.nil; - /* methods for embedded fields */ - $addMethodSynthesizer(function() { - var synthesizeMethod = function(target, m, f) { - if (target.prototype[m.prop] !== undefined) { return; } - target.prototype[m.prop] = function() { - var v = this.$val[f.prop]; - if (f.typ === $jsObjectPtr) { - v = new $jsObjectPtr(v); - } - if (v.$val === undefined) { - v = new f.typ(v); - } - return v[m.prop].apply(v, arguments); - }; - }; - fields.forEach(function(f) { - if (f.embedded) { - $methodSet(f.typ).forEach(function(m) { - synthesizeMethod(typ, m, f); - synthesizeMethod(typ.ptr, m, f); - }); - $methodSet($ptrType(f.typ)).forEach(function(m) { - synthesizeMethod(typ.ptr, m, f); - }); - } - }); - }); - }; - break; - - default: - $panic(new $String("invalid kind: " + kind)); - } - - switch (kind) { - case $kindBool: - case $kindMap: - typ.zero = function() { return false; }; - break; - - case $kindInt: - case $kindInt8: - case $kindInt16: - case $kindInt32: - case $kindUint: - case $kindUint8 : - case $kindUint16: - case $kindUint32: - case $kindUintptr: - case $kindUnsafePointer: - case $kindFloat32: - case $kindFloat64: - typ.zero = function() { return 0; }; - break; - - case $kindString: - typ.zero = function() { return ""; }; - break; - - case $kindInt64: - case $kindUint64: - case $kindComplex64: - case $kindComplex128: - var zero = new typ(0, 0); - typ.zero = function() { return zero; }; - break; - - case $kindPtr: - case $kindSlice: - typ.zero = function() { return typ.nil; }; - break; - - case $kindChan: - typ.zero = function() { return $chanNil; }; - break; - - case $kindFunc: - typ.zero = function() { return $throwNilPointerError; }; - break; - - case $kindInterface: - typ.zero = function() { return $ifaceNil; }; - break; - - case $kindArray: - typ.zero = function() { - var arrayClass = $nativeArray(typ.elem.kind); - if (arrayClass !== Array) { - return new arrayClass(typ.len); - } - var array = new Array(typ.len); - for (var i = 0; i < typ.len; i++) { - array[i] = typ.elem.zero(); - } - return array; - }; - break; - - case $kindStruct: - typ.zero = function() { return new typ.ptr(); }; - break; - - default: - $panic(new $String("invalid kind: " + kind)); - } - - typ.id = $typeIDCounter; - $typeIDCounter++; - typ.size = size; - typ.kind = kind; - typ.string = string; - typ.named = named; - typ.pkg = pkg; - typ.exported = exported; - typ.methods = []; - typ.methodSetCache = null; - typ.comparable = true; - return typ; -}; - -var $methodSet = function(typ) { - if (typ.methodSetCache !== null) { - return typ.methodSetCache; - } - var base = {}; - - var isPtr = (typ.kind === $kindPtr); - if (isPtr && typ.elem.kind === $kindInterface) { - typ.methodSetCache = []; - return []; - } - - var current = [{typ: isPtr ? typ.elem : typ, indirect: isPtr}]; - - var seen = {}; - - while (current.length > 0) { - var next = []; - var mset = []; - - current.forEach(function(e) { - if (seen[e.typ.string]) { - return; - } - seen[e.typ.string] = true; - - if (e.typ.named) { - mset = mset.concat(e.typ.methods); - if (e.indirect) { - mset = mset.concat($ptrType(e.typ).methods); - } - } - - switch (e.typ.kind) { - case $kindStruct: - e.typ.fields.forEach(function(f) { - if (f.embedded) { - var fTyp = f.typ; - var fIsPtr = (fTyp.kind === $kindPtr); - next.push({typ: fIsPtr ? fTyp.elem : fTyp, indirect: e.indirect || fIsPtr}); - } - }); - break; - - case $kindInterface: - mset = mset.concat(e.typ.methods); - break; - } - }); - - mset.forEach(function(m) { - if (base[m.name] === undefined) { - base[m.name] = m; - } - }); - - current = next; - } - - typ.methodSetCache = []; - Object.keys(base).sort().forEach(function(name) { - typ.methodSetCache.push(base[name]); - }); - return typ.methodSetCache; -}; - -var $Bool = $newType( 1, $kindBool, "bool", true, "", false, null); -var $Int = $newType( 4, $kindInt, "int", true, "", false, null); -var $Int8 = $newType( 1, $kindInt8, "int8", true, "", false, null); -var $Int16 = $newType( 2, $kindInt16, "int16", true, "", false, null); -var $Int32 = $newType( 4, $kindInt32, "int32", true, "", false, null); -var $Int64 = $newType( 8, $kindInt64, "int64", true, "", false, null); -var $Uint = $newType( 4, $kindUint, "uint", true, "", false, null); -var $Uint8 = $newType( 1, $kindUint8, "uint8", true, "", false, null); -var $Uint16 = $newType( 2, $kindUint16, "uint16", true, "", false, null); -var $Uint32 = $newType( 4, $kindUint32, "uint32", true, "", false, null); -var $Uint64 = $newType( 8, $kindUint64, "uint64", true, "", false, null); -var $Uintptr = $newType( 4, $kindUintptr, "uintptr", true, "", false, null); -var $Float32 = $newType( 4, $kindFloat32, "float32", true, "", false, null); -var $Float64 = $newType( 8, $kindFloat64, "float64", true, "", false, null); -var $Complex64 = $newType( 8, $kindComplex64, "complex64", true, "", false, null); -var $Complex128 = $newType(16, $kindComplex128, "complex128", true, "", false, null); -var $String = $newType( 8, $kindString, "string", true, "", false, null); -var $UnsafePointer = $newType( 4, $kindUnsafePointer, "unsafe.Pointer", true, "unsafe", false, null); - -var $nativeArray = function(elemKind) { - switch (elemKind) { - case $kindInt: - return Int32Array; - case $kindInt8: - return Int8Array; - case $kindInt16: - return Int16Array; - case $kindInt32: - return Int32Array; - case $kindUint: - return Uint32Array; - case $kindUint8: - return Uint8Array; - case $kindUint16: - return Uint16Array; - case $kindUint32: - return Uint32Array; - case $kindUintptr: - return Uint32Array; - case $kindFloat32: - return Float32Array; - case $kindFloat64: - return Float64Array; - default: - return Array; - } -}; -var $toNativeArray = function(elemKind, array) { - var nativeArray = $nativeArray(elemKind); - if (nativeArray === Array) { - return array; - } - return new nativeArray(array); -}; -var $arrayTypes = {}; -var $arrayType = function(elem, len) { - var typeKey = elem.id + "$" + len; - var typ = $arrayTypes[typeKey]; - if (typ === undefined) { - typ = $newType(12, $kindArray, "[" + len + "]" + elem.string, false, "", false, null); - $arrayTypes[typeKey] = typ; - typ.init(elem, len); - } - return typ; -}; - -var $chanType = function(elem, sendOnly, recvOnly) { - var string = (recvOnly ? "<-" : "") + "chan" + (sendOnly ? "<- " : " "); - if (!sendOnly && !recvOnly && (elem.string[0] == "<")) { - string += "(" + elem.string + ")"; - } else { - string += elem.string; - } - var field = sendOnly ? "SendChan" : (recvOnly ? "RecvChan" : "Chan"); - var typ = elem[field]; - if (typ === undefined) { - typ = $newType(4, $kindChan, string, false, "", false, null); - elem[field] = typ; - typ.init(elem, sendOnly, recvOnly); - } - return typ; -}; -var $Chan = function(elem, capacity) { - if (capacity < 0 || capacity > 2147483647) { - $throwRuntimeError("makechan: size out of range"); - } - this.$elem = elem; - this.$capacity = capacity; - this.$buffer = []; - this.$sendQueue = []; - this.$recvQueue = []; - this.$closed = false; -}; -var $chanNil = new $Chan(null, 0); -$chanNil.$sendQueue = $chanNil.$recvQueue = { length: 0, push: function() {}, shift: function() { return undefined; }, indexOf: function() { return -1; } }; - -var $funcTypes = {}; -var $funcType = function(params, results, variadic) { - var typeKey = $mapArray(params, function(p) { return p.id; }).join(",") + "$" + $mapArray(results, function(r) { return r.id; }).join(",") + "$" + variadic; - var typ = $funcTypes[typeKey]; - if (typ === undefined) { - var paramTypes = $mapArray(params, function(p) { return p.string; }); - if (variadic) { - paramTypes[paramTypes.length - 1] = "..." + paramTypes[paramTypes.length - 1].substr(2); - } - var string = "func(" + paramTypes.join(", ") + ")"; - if (results.length === 1) { - string += " " + results[0].string; - } else if (results.length > 1) { - string += " (" + $mapArray(results, function(r) { return r.string; }).join(", ") + ")"; - } - typ = $newType(4, $kindFunc, string, false, "", false, null); - $funcTypes[typeKey] = typ; - typ.init(params, results, variadic); - } - return typ; -}; - -var $interfaceTypes = {}; -var $interfaceType = function(methods) { - var typeKey = $mapArray(methods, function(m) { return m.pkg + "," + m.name + "," + m.typ.id; }).join("$"); - var typ = $interfaceTypes[typeKey]; - if (typ === undefined) { - var string = "interface {}"; - if (methods.length !== 0) { - string = "interface { " + $mapArray(methods, function(m) { - return (m.pkg !== "" ? m.pkg + "." : "") + m.name + m.typ.string.substr(4); - }).join("; ") + " }"; - } - typ = $newType(8, $kindInterface, string, false, "", false, null); - $interfaceTypes[typeKey] = typ; - typ.init(methods); - } - return typ; -}; -var $emptyInterface = $interfaceType([]); -var $ifaceNil = {}; -var $error = $newType(8, $kindInterface, "error", true, "", false, null); -$error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]); - -var $mapTypes = {}; -var $mapType = function(key, elem) { - var typeKey = key.id + "$" + elem.id; - var typ = $mapTypes[typeKey]; - if (typ === undefined) { - typ = $newType(4, $kindMap, "map[" + key.string + "]" + elem.string, false, "", false, null); - $mapTypes[typeKey] = typ; - typ.init(key, elem); - } - return typ; -}; -var $makeMap = function(keyForFunc, entries) { - var m = {}; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - m[keyForFunc(e.k)] = e; - } - return m; -}; - -var $ptrType = function(elem) { - var typ = elem.ptr; - if (typ === undefined) { - typ = $newType(4, $kindPtr, "*" + elem.string, false, "", elem.exported, null); - elem.ptr = typ; - typ.init(elem); - } - return typ; -}; - -var $newDataPointer = function(data, constructor) { - if (constructor.elem.kind === $kindStruct) { - return data; - } - return new constructor(function() { return data; }, function(v) { data = v; }); -}; - -var $indexPtr = function(array, index, constructor) { - if (array.buffer) { - // Pointers to the same underlying ArrayBuffer share cache. - var cache = array.buffer.$ptr = array.buffer.$ptr || {}; - // Pointers of different primitive types are non-comparable and stored in different caches. - var typeCache = cache[array.name] = cache[array.name] || {}; - var cacheIdx = array.BYTES_PER_ELEMENT * index + array.byteOffset; - return typeCache[cacheIdx] || (typeCache[cacheIdx] = new constructor(function() { return array[index]; }, function(v) { array[index] = v; })); - } else { - array.$ptr = array.$ptr || {}; - return array.$ptr[index] || (array.$ptr[index] = new constructor(function() { return array[index]; }, function(v) { array[index] = v; })); - } -}; - -var $sliceType = function(elem) { - var typ = elem.slice; - if (typ === undefined) { - typ = $newType(12, $kindSlice, "[]" + elem.string, false, "", false, null); - elem.slice = typ; - typ.init(elem); - } - return typ; -}; -var $makeSlice = function(typ, length, capacity) { - capacity = capacity || length; - if (length < 0 || length > 2147483647) { - $throwRuntimeError("makeslice: len out of range"); - } - if (capacity < 0 || capacity < length || capacity > 2147483647) { - $throwRuntimeError("makeslice: cap out of range"); - } - var array = new typ.nativeArray(capacity); - if (typ.nativeArray === Array) { - for (var i = 0; i < capacity; i++) { - array[i] = typ.elem.zero(); - } - } - var slice = new typ(array); - slice.$length = length; - return slice; -}; - -var $structTypes = {}; -var $structType = function(pkgPath, fields) { - var typeKey = $mapArray(fields, function(f) { return f.name + "," + f.typ.id + "," + f.tag; }).join("$"); - var typ = $structTypes[typeKey]; - if (typ === undefined) { - var string = "struct { " + $mapArray(fields, function(f) { - var str = f.typ.string + (f.tag !== "" ? (" \"" + f.tag.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\"") : ""); - if (f.embedded) { - return str; - } - return f.name + " " + str; - }).join("; ") + " }"; - if (fields.length === 0) { - string = "struct {}"; - } - typ = $newType(0, $kindStruct, string, false, "", false, function() { - this.$val = this; - for (var i = 0; i < fields.length; i++) { - var f = fields[i]; - if (f.name == '_') { - continue; - } - var arg = arguments[i]; - this[f.prop] = arg !== undefined ? arg : f.typ.zero(); - } - }); - $structTypes[typeKey] = typ; - typ.init(pkgPath, fields); - } - return typ; -}; - -var $assertType = function(value, type, returnTuple) { - var isInterface = (type.kind === $kindInterface), ok, missingMethod = ""; - if (value === $ifaceNil) { - ok = false; - } else if (!isInterface) { - ok = value.constructor === type; - } else { - var valueTypeString = value.constructor.string; - ok = type.implementedBy[valueTypeString]; - if (ok === undefined) { - ok = true; - var valueMethodSet = $methodSet(value.constructor); - var interfaceMethods = type.methods; - for (var i = 0; i < interfaceMethods.length; i++) { - var tm = interfaceMethods[i]; - var found = false; - for (var j = 0; j < valueMethodSet.length; j++) { - var vm = valueMethodSet[j]; - if (vm.name === tm.name && vm.pkg === tm.pkg && vm.typ === tm.typ) { - found = true; - break; - } - } - if (!found) { - ok = false; - type.missingMethodFor[valueTypeString] = tm.name; - break; - } - } - type.implementedBy[valueTypeString] = ok; - } - if (!ok) { - missingMethod = type.missingMethodFor[valueTypeString]; - } - } - - if (!ok) { - if (returnTuple) { - return [type.zero(), false]; - } - $panic(new $packages["runtime"].TypeAssertionError.ptr( - $packages["runtime"]._type.ptr.nil, - (value === $ifaceNil ? $packages["runtime"]._type.ptr.nil : new $packages["runtime"]._type.ptr(value.constructor.string)), - new $packages["runtime"]._type.ptr(type.string), - missingMethod)); - } - - if (!isInterface) { - value = value.$val; - } - if (type === $jsObjectPtr) { - value = value.object; - } - return returnTuple ? [value, true] : value; -}; - -var $stackDepthOffset = 0; -var $getStackDepth = function() { - var err = new Error(); - if (err.stack === undefined) { - return undefined; - } - return $stackDepthOffset + err.stack.split("\n").length; -}; - -var $panicStackDepth = null, $panicValue; -var $callDeferred = function(deferred, jsErr, fromPanic) { - if (!fromPanic && deferred !== null && $curGoroutine.deferStack.indexOf(deferred) == -1) { - throw jsErr; - } - if (jsErr !== null) { - var newErr = null; - try { - $panic(new $jsErrorPtr(jsErr)); - } catch (err) { - newErr = err; - } - $callDeferred(deferred, newErr); - return; - } - if ($curGoroutine.asleep) { - return; - } - - $stackDepthOffset--; - var outerPanicStackDepth = $panicStackDepth; - var outerPanicValue = $panicValue; - - var localPanicValue = $curGoroutine.panicStack.pop(); - if (localPanicValue !== undefined) { - $panicStackDepth = $getStackDepth(); - $panicValue = localPanicValue; - } - - try { - while (true) { - if (deferred === null) { - deferred = $curGoroutine.deferStack[$curGoroutine.deferStack.length - 1]; - if (deferred === undefined) { - /* The panic reached the top of the stack. Clear it and throw it as a JavaScript error. */ - $panicStackDepth = null; - if (localPanicValue.Object instanceof Error) { - throw localPanicValue.Object; - } - var msg; - if (localPanicValue.constructor === $String) { - msg = localPanicValue.$val; - } else if (localPanicValue.Error !== undefined) { - msg = localPanicValue.Error(); - } else if (localPanicValue.String !== undefined) { - msg = localPanicValue.String(); - } else { - msg = localPanicValue; - } - throw new Error(msg); - } - } - var call = deferred.pop(); - if (call === undefined) { - $curGoroutine.deferStack.pop(); - if (localPanicValue !== undefined) { - deferred = null; - continue; - } - return; - } - var r = call[0].apply(call[2], call[1]); - if (r && r.$blk !== undefined) { - deferred.push([r.$blk, [], r]); - if (fromPanic) { - throw null; - } - return; - } - - if (localPanicValue !== undefined && $panicStackDepth === null) { - /* error was recovered */ - if (fromPanic) { - throw null; - } - return; - } - } - } catch(e) { - // Deferred function threw a JavaScript exception or tries to unwind stack - // to the point where a panic was handled. - if (fromPanic) { - // Re-throw the exception to reach deferral execution call at the end - // of the function. - throw e; - } - // We are at the end of the function, handle the error or re-throw to - // continue unwinding if necessary, or simply stop unwinding if we got far - // enough. - $callDeferred(deferred, e, fromPanic); - } finally { - if (localPanicValue !== undefined) { - if ($panicStackDepth !== null) { - $curGoroutine.panicStack.push(localPanicValue); - } - $panicStackDepth = outerPanicStackDepth; - $panicValue = outerPanicValue; - } - $stackDepthOffset++; - } -}; - -var $panic = function(value) { - $curGoroutine.panicStack.push(value); - $callDeferred(null, null, true); -}; -var $recover = function() { - if ($panicStackDepth === null || ($panicStackDepth !== undefined && $panicStackDepth !== $getStackDepth() - 2)) { - return $ifaceNil; - } - $panicStackDepth = null; - return $panicValue; -}; -var $throw = function(err) { throw err; }; - -var $noGoroutine = { asleep: false, exit: false, deferStack: [], panicStack: [] }; -var $curGoroutine = $noGoroutine, $totalGoroutines = 0, $awakeGoroutines = 0, $checkForDeadlock = true, $exportedFunctions = 0; -var $mainFinished = false; -var $go = function(fun, args) { - $totalGoroutines++; - $awakeGoroutines++; - var $goroutine = function() { - try { - $curGoroutine = $goroutine; - var r = fun.apply(undefined, args); - if (r && r.$blk !== undefined) { - fun = function() { return r.$blk(); }; - args = []; - return; - } - $goroutine.exit = true; - } catch (err) { - if (!$goroutine.exit) { - throw err; - } - } finally { - $curGoroutine = $noGoroutine; - if ($goroutine.exit) { /* also set by runtime.Goexit() */ - $totalGoroutines--; - $goroutine.asleep = true; - } - if ($goroutine.asleep) { - $awakeGoroutines--; - if (!$mainFinished && $awakeGoroutines === 0 && $checkForDeadlock && $exportedFunctions === 0) { - console.error("fatal error: all goroutines are asleep - deadlock!"); - if ($global.process !== undefined) { - $global.process.exit(2); - } - } - } - } - }; - $goroutine.asleep = false; - $goroutine.exit = false; - $goroutine.deferStack = []; - $goroutine.panicStack = []; - $schedule($goroutine); -}; - -var $scheduled = []; -var $runScheduled = function() { - // For nested setTimeout calls browsers enforce 4ms minimum delay. We minimize - // the effect of this penalty by queueing the timer preemptively before we run - // the goroutines, and later cancelling it if it turns out unneeded. See: - // https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#nested_timeouts - var nextRun = setTimeout($runScheduled); - try { - var start = Date.now(); - var r; - while ((r = $scheduled.shift()) !== undefined) { - r(); - // We need to interrupt this loop in order to allow the event loop to - // process timers, IO, etc. However, invoking scheduling through - // setTimeout is ~1000 times more expensive, so we amortize this cost by - // looping until the 4ms minimal delay has elapsed (assuming there are - // scheduled goroutines to run), and then yield to the event loop. - var elapsed = Date.now() - start; - if (elapsed > 4 || elapsed < 0) { break; } - } - } finally { - if ($scheduled.length == 0) { - // Cancel scheduling pass if there's nothing to run. - clearTimeout(nextRun); - } - } -}; - -var $schedule = function(goroutine) { - if (goroutine.asleep) { - goroutine.asleep = false; - $awakeGoroutines++; - } - $scheduled.push(goroutine); - if ($curGoroutine === $noGoroutine) { - $runScheduled(); - } -}; - -var $setTimeout = function(f, t) { - $awakeGoroutines++; - return setTimeout(function() { - $awakeGoroutines--; - f(); - }, t); -}; - -var $block = function() { - if ($curGoroutine === $noGoroutine) { - $throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine"); - } - $curGoroutine.asleep = true; -}; - -var $restore = function(context, params) { - if (context !== undefined && context.$blk !== undefined) { - return context; - } - return params; -} - -var $send = function(chan, value) { - if (chan.$closed) { - $throwRuntimeError("send on closed channel"); - } - var queuedRecv = chan.$recvQueue.shift(); - if (queuedRecv !== undefined) { - queuedRecv([value, true]); - return; - } - if (chan.$buffer.length < chan.$capacity) { - chan.$buffer.push(value); - return; - } - - var thisGoroutine = $curGoroutine; - var closedDuringSend; - chan.$sendQueue.push(function(closed) { - closedDuringSend = closed; - $schedule(thisGoroutine); - return value; - }); - $block(); - return { - $blk: function() { - if (closedDuringSend) { - $throwRuntimeError("send on closed channel"); - } - } - }; -}; -var $recv = function(chan) { - var queuedSend = chan.$sendQueue.shift(); - if (queuedSend !== undefined) { - chan.$buffer.push(queuedSend(false)); - } - var bufferedValue = chan.$buffer.shift(); - if (bufferedValue !== undefined) { - return [bufferedValue, true]; - } - if (chan.$closed) { - return [chan.$elem.zero(), false]; - } - - var thisGoroutine = $curGoroutine; - var f = { $blk: function() { return this.value; } }; - var queueEntry = function(v) { - f.value = v; - $schedule(thisGoroutine); - }; - chan.$recvQueue.push(queueEntry); - $block(); - return f; -}; -var $close = function(chan) { - if (chan.$closed) { - $throwRuntimeError("close of closed channel"); - } - chan.$closed = true; - while (true) { - var queuedSend = chan.$sendQueue.shift(); - if (queuedSend === undefined) { - break; - } - queuedSend(true); /* will panic */ - } - while (true) { - var queuedRecv = chan.$recvQueue.shift(); - if (queuedRecv === undefined) { - break; - } - queuedRecv([chan.$elem.zero(), false]); - } -}; -var $select = function(comms) { - var ready = []; - var selection = -1; - for (var i = 0; i < comms.length; i++) { - var comm = comms[i]; - var chan = comm[0]; - switch (comm.length) { - case 0: /* default */ - selection = i; - break; - case 1: /* recv */ - if (chan.$sendQueue.length !== 0 || chan.$buffer.length !== 0 || chan.$closed) { - ready.push(i); - } - break; - case 2: /* send */ - if (chan.$closed) { - $throwRuntimeError("send on closed channel"); - } - if (chan.$recvQueue.length !== 0 || chan.$buffer.length < chan.$capacity) { - ready.push(i); - } - break; - } - } - - if (ready.length !== 0) { - selection = ready[Math.floor(Math.random() * ready.length)]; - } - if (selection !== -1) { - var comm = comms[selection]; - switch (comm.length) { - case 0: /* default */ - return [selection]; - case 1: /* recv */ - return [selection, $recv(comm[0])]; - case 2: /* send */ - $send(comm[0], comm[1]); - return [selection]; - } - } - - var entries = []; - var thisGoroutine = $curGoroutine; - var f = { $blk: function() { return this.selection; } }; - var removeFromQueues = function() { - for (var i = 0; i < entries.length; i++) { - var entry = entries[i]; - var queue = entry[0]; - var index = queue.indexOf(entry[1]); - if (index !== -1) { - queue.splice(index, 1); - } - } - }; - for (var i = 0; i < comms.length; i++) { - (function(i) { - var comm = comms[i]; - switch (comm.length) { - case 1: /* recv */ - var queueEntry = function(value) { - f.selection = [i, value]; - removeFromQueues(); - $schedule(thisGoroutine); - }; - entries.push([comm[0].$recvQueue, queueEntry]); - comm[0].$recvQueue.push(queueEntry); - break; - case 2: /* send */ - var queueEntry = function() { - if (comm[0].$closed) { - $throwRuntimeError("send on closed channel"); - } - f.selection = [i]; - removeFromQueues(); - $schedule(thisGoroutine); - return comm[1]; - }; - entries.push([comm[0].$sendQueue, queueEntry]); - comm[0].$sendQueue.push(queueEntry); - break; - } - })(i); - } - $block(); - return f; -}; - -var $jsObjectPtr, $jsErrorPtr; - -var $needsExternalization = function(t) { - switch (t.kind) { - case $kindBool: - case $kindInt: - case $kindInt8: - case $kindInt16: - case $kindInt32: - case $kindUint: - case $kindUint8: - case $kindUint16: - case $kindUint32: - case $kindUintptr: - case $kindFloat32: - case $kindFloat64: - return false; - default: - return t !== $jsObjectPtr; - } -}; - -var $externalize = function(v, t, makeWrapper) { - if (t === $jsObjectPtr) { - return v; - } - switch (t.kind) { - case $kindBool: - case $kindInt: - case $kindInt8: - case $kindInt16: - case $kindInt32: - case $kindUint: - case $kindUint8: - case $kindUint16: - case $kindUint32: - case $kindUintptr: - case $kindFloat32: - case $kindFloat64: - return v; - case $kindInt64: - case $kindUint64: - return $flatten64(v); - case $kindArray: - if ($needsExternalization(t.elem)) { - return $mapArray(v, function(e) { return $externalize(e, t.elem, makeWrapper); }); - } - return v; - case $kindFunc: - return $externalizeFunction(v, t, false, makeWrapper); - case $kindInterface: - if (v === $ifaceNil) { - return null; - } - if (v.constructor === $jsObjectPtr) { - return v.$val.object; - } - return $externalize(v.$val, v.constructor, makeWrapper); - case $kindMap: - var m = {}; - var keys = $keys(v); - for (var i = 0; i < keys.length; i++) { - var entry = v[keys[i]]; - m[$externalize(entry.k, t.key, makeWrapper)] = $externalize(entry.v, t.elem, makeWrapper); - } - return m; - case $kindPtr: - if (v === t.nil) { - return null; - } - return $externalize(v.$get(), t.elem, makeWrapper); - case $kindSlice: - if ($needsExternalization(t.elem)) { - return $mapArray($sliceToNativeArray(v), function(e) { return $externalize(e, t.elem, makeWrapper); }); - } - return $sliceToNativeArray(v); - case $kindString: - if ($isASCII(v)) { - return v; - } - var s = "", r; - for (var i = 0; i < v.length; i += r[1]) { - r = $decodeRune(v, i); - var c = r[0]; - if (c > 0xFFFF) { - var h = Math.floor((c - 0x10000) / 0x400) + 0xD800; - var l = (c - 0x10000) % 0x400 + 0xDC00; - s += String.fromCharCode(h, l); - continue; - } - s += String.fromCharCode(c); - } - return s; - case $kindStruct: - var timePkg = $packages["time"]; - if (timePkg !== undefined && v.constructor === timePkg.Time.ptr) { - var milli = $div64(v.UnixNano(), new $Int64(0, 1000000)); - return new Date($flatten64(milli)); - } - - var noJsObject = {}; - var searchJsObject = function(v, t) { - if (t === $jsObjectPtr) { - return v; - } - switch (t.kind) { - case $kindPtr: - if (v === t.nil) { - return noJsObject; - } - return searchJsObject(v.$get(), t.elem); - case $kindStruct: - var f = t.fields[0]; - return searchJsObject(v[f.prop], f.typ); - case $kindInterface: - return searchJsObject(v.$val, v.constructor); - default: - return noJsObject; - } - }; - var o = searchJsObject(v, t); - if (o !== noJsObject) { - return o; - } - - if (makeWrapper !== undefined) { - return makeWrapper(v); - } - - o = {}; - for (var i = 0; i < t.fields.length; i++) { - var f = t.fields[i]; - if (!f.exported) { - continue; - } - o[f.name] = $externalize(v[f.prop], f.typ, makeWrapper); - } - return o; - } - $throwRuntimeError("cannot externalize " + t.string); -}; - -var $externalizeFunction = function(v, t, passThis, makeWrapper) { - if (v === $throwNilPointerError) { - return null; - } - if (v.$externalizeWrapper === undefined) { - $checkForDeadlock = false; - v.$externalizeWrapper = function() { - var args = []; - for (var i = 0; i < t.params.length; i++) { - if (t.variadic && i === t.params.length - 1) { - var vt = t.params[i].elem, varargs = []; - for (var j = i; j < arguments.length; j++) { - varargs.push($internalize(arguments[j], vt, makeWrapper)); - } - args.push(new (t.params[i])(varargs)); - break; - } - args.push($internalize(arguments[i], t.params[i], makeWrapper)); - } - var result = v.apply(passThis ? this : undefined, args); - switch (t.results.length) { - case 0: - return; - case 1: - return $externalize($copyIfRequired(result, t.results[0]), t.results[0], makeWrapper); - default: - for (var i = 0; i < t.results.length; i++) { - result[i] = $externalize($copyIfRequired(result[i], t.results[i]), t.results[i], makeWrapper); - } - return result; - } - }; - } - return v.$externalizeWrapper; -}; - -var $internalize = function(v, t, recv, seen, makeWrapper) { - if (t === $jsObjectPtr) { - return v; - } - if (t === $jsObjectPtr.elem) { - $throwRuntimeError("cannot internalize js.Object, use *js.Object instead"); - } - if (v && v.__internal_object__ !== undefined) { - return $assertType(v.__internal_object__, t, false); - } - var timePkg = $packages["time"]; - if (timePkg !== undefined && t === timePkg.Time) { - if (!(v !== null && v !== undefined && v.constructor === Date)) { - $throwRuntimeError("cannot internalize time.Time from " + typeof v + ", must be Date"); - } - return timePkg.Unix(new $Int64(0, 0), new $Int64(0, v.getTime() * 1000000)); - } - - // Cache for values we've already internalized in order to deal with circular - // references. - if (seen === undefined) { seen = new Map(); } - if (!seen.has(t)) { seen.set(t, new Map()); } - if (seen.get(t).has(v)) { return seen.get(t).get(v); } - - switch (t.kind) { - case $kindBool: - return !!v; - case $kindInt: - return parseInt(v); - case $kindInt8: - return parseInt(v) << 24 >> 24; - case $kindInt16: - return parseInt(v) << 16 >> 16; - case $kindInt32: - return parseInt(v) >> 0; - case $kindUint: - return parseInt(v); - case $kindUint8: - return parseInt(v) << 24 >>> 24; - case $kindUint16: - return parseInt(v) << 16 >>> 16; - case $kindUint32: - case $kindUintptr: - return parseInt(v) >>> 0; - case $kindInt64: - case $kindUint64: - return new t(0, v); - case $kindFloat32: - case $kindFloat64: - return parseFloat(v); - case $kindArray: - if (v.length !== t.len) { - $throwRuntimeError("got array with wrong size from JavaScript native"); - } - return $mapArray(v, function(e) { return $internalize(e, t.elem, makeWrapper); }); - case $kindFunc: - return function() { - var args = []; - for (var i = 0; i < t.params.length; i++) { - if (t.variadic && i === t.params.length - 1) { - var vt = t.params[i].elem, varargs = arguments[i]; - for (var j = 0; j < varargs.$length; j++) { - args.push($externalize(varargs.$array[varargs.$offset + j], vt, makeWrapper)); - } - break; - } - args.push($externalize(arguments[i], t.params[i], makeWrapper)); - } - var result = v.apply(recv, args); - switch (t.results.length) { - case 0: - return; - case 1: - return $internalize(result, t.results[0], makeWrapper); - default: - for (var i = 0; i < t.results.length; i++) { - result[i] = $internalize(result[i], t.results[i], makeWrapper); - } - return result; - } - }; - case $kindInterface: - if (t.methods.length !== 0) { - $throwRuntimeError("cannot internalize " + t.string); - } - if (v === null) { - return $ifaceNil; - } - if (v === undefined) { - return new $jsObjectPtr(undefined); - } - switch (v.constructor) { - case Int8Array: - return new ($sliceType($Int8))(v); - case Int16Array: - return new ($sliceType($Int16))(v); - case Int32Array: - return new ($sliceType($Int))(v); - case Uint8Array: - return new ($sliceType($Uint8))(v); - case Uint16Array: - return new ($sliceType($Uint16))(v); - case Uint32Array: - return new ($sliceType($Uint))(v); - case Float32Array: - return new ($sliceType($Float32))(v); - case Float64Array: - return new ($sliceType($Float64))(v); - case Array: - return $internalize(v, $sliceType($emptyInterface), makeWrapper); - case Boolean: - return new $Bool(!!v); - case Date: - if (timePkg === undefined) { - /* time package is not present, internalize as &js.Object{Date} so it can be externalized into original Date. */ - return new $jsObjectPtr(v); - } - return new timePkg.Time($internalize(v, timePkg.Time, makeWrapper)); - case (function () { }).constructor: // is usually Function, but in Chrome extensions it is something else - var funcType = $funcType([$sliceType($emptyInterface)], [$jsObjectPtr], true); - return new funcType($internalize(v, funcType, makeWrapper)); - case Number: - return new $Float64(parseFloat(v)); - case String: - return new $String($internalize(v, $String, makeWrapper)); - default: - if ($global.Node && v instanceof $global.Node) { - return new $jsObjectPtr(v); - } - var mapType = $mapType($String, $emptyInterface); - return new mapType($internalize(v, mapType, recv, seen, makeWrapper)); - } - case $kindMap: - var m = {}; - seen.get(t).set(v, m); - var keys = $keys(v); - for (var i = 0; i < keys.length; i++) { - var k = $internalize(keys[i], t.key, recv, seen, makeWrapper); - m[t.key.keyFor(k)] = { k: k, v: $internalize(v[keys[i]], t.elem, recv, seen, makeWrapper) }; - } - return m; - case $kindPtr: - if (t.elem.kind === $kindStruct) { - return $internalize(v, t.elem, makeWrapper); - } - case $kindSlice: - return new t($mapArray(v, function(e) { return $internalize(e, t.elem, makeWrapper); })); - case $kindString: - v = String(v); - if ($isASCII(v)) { - return v; - } - var s = ""; - var i = 0; - while (i < v.length) { - var h = v.charCodeAt(i); - if (0xD800 <= h && h <= 0xDBFF) { - var l = v.charCodeAt(i + 1); - var c = (h - 0xD800) * 0x400 + l - 0xDC00 + 0x10000; - s += $encodeRune(c); - i += 2; - continue; - } - s += $encodeRune(h); - i++; - } - return s; - case $kindStruct: - var noJsObject = {}; - var searchJsObject = function(t) { - if (t === $jsObjectPtr) { - return v; - } - if (t === $jsObjectPtr.elem) { - $throwRuntimeError("cannot internalize js.Object, use *js.Object instead"); - } - switch (t.kind) { - case $kindPtr: - return searchJsObject(t.elem); - case $kindStruct: - var f = t.fields[0]; - var o = searchJsObject(f.typ); - if (o !== noJsObject) { - var n = new t.ptr(); - n[f.prop] = o; - return n; - } - return noJsObject; - default: - return noJsObject; - } - }; - var o = searchJsObject(t); - if (o !== noJsObject) { - return o; - } - } - $throwRuntimeError("cannot internalize " + t.string); -}; - -var $copyIfRequired = function(v, typ) { - // interface values - if (v && v.constructor && v.constructor.copy) { - return new v.constructor($clone(v.$val, v.constructor)) - } - // array and struct values - if (typ.copy) { - var clone = typ.zero(); - typ.copy(clone, v); - return clone; - } - return v; -} - -/* $isASCII reports whether string s contains only ASCII characters. */ -var $isASCII = function(s) { - for (var i = 0; i < s.length; i++) { - if (s.charCodeAt(i) >= 128) { - return false; - } - } - return true; -}; - -$packages["github.com/gopherjs/gopherjs/js"] = (function() { - var $pkg = {}, $init, Object, Error, M, sliceType, ptrType, sliceType$2, funcType, funcType$1, funcType$2, ptrType$1, MakeFunc, MakeWrapper, MakeFullWrapper, init; - Object = $pkg.Object = $newType(0, $kindStruct, "js.Object", true, "github.com/gopherjs/gopherjs/js", true, function(object_) { - this.$val = this; - if (arguments.length === 0) { - this.object = null; - return; - } - this.object = object_; - }); - Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", true, "github.com/gopherjs/gopherjs/js", true, function(Object_) { - this.$val = this; - if (arguments.length === 0) { - this.Object = null; - return; - } - this.Object = Object_; - }); - M = $pkg.M = $newType(4, $kindMap, "js.M", true, "github.com/gopherjs/gopherjs/js", true, null); - sliceType = $sliceType($emptyInterface); - ptrType = $ptrType(Object); - sliceType$2 = $sliceType(ptrType); - funcType = $funcType([sliceType$2], [ptrType], true); - funcType$1 = $funcType([], [ptrType], false); - funcType$2 = $funcType([ptrType], [], false); - ptrType$1 = $ptrType(Error); - Object.ptr.prototype.Get = function(key) { - var key, o; - o = this; - return o.object[$externalize(key, $String)]; - }; - Object.prototype.Get = function(key) { return this.$val.Get(key); }; - Object.ptr.prototype.Set = function(key, value) { - var key, o, value; - o = this; - o.object[$externalize(key, $String)] = $externalize(value, $emptyInterface); - }; - Object.prototype.Set = function(key, value) { return this.$val.Set(key, value); }; - Object.ptr.prototype.Delete = function(key) { - var key, o; - o = this; - delete o.object[$externalize(key, $String)]; - }; - Object.prototype.Delete = function(key) { return this.$val.Delete(key); }; - Object.ptr.prototype.Length = function() { - var o; - o = this; - return $parseInt(o.object.length); - }; - Object.prototype.Length = function() { return this.$val.Length(); }; - Object.ptr.prototype.Index = function(i) { - var i, o; - o = this; - return o.object[i]; - }; - Object.prototype.Index = function(i) { return this.$val.Index(i); }; - Object.ptr.prototype.SetIndex = function(i, value) { - var i, o, value; - o = this; - o.object[i] = $externalize(value, $emptyInterface); - }; - Object.prototype.SetIndex = function(i, value) { return this.$val.SetIndex(i, value); }; - Object.ptr.prototype.Call = function(name, args) { - var args, name, o, obj; - o = this; - return (obj = o.object, obj[$externalize(name, $String)].apply(obj, $externalize(args, sliceType))); - }; - Object.prototype.Call = function(name, args) { return this.$val.Call(name, args); }; - Object.ptr.prototype.Invoke = function(args) { - var args, o; - o = this; - return o.object.apply(undefined, $externalize(args, sliceType)); - }; - Object.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; - Object.ptr.prototype.New = function(args) { - var args, o; - o = this; - return new ($global.Function.prototype.bind.apply(o.object, [undefined].concat($externalize(args, sliceType)))); - }; - Object.prototype.New = function(args) { return this.$val.New(args); }; - Object.ptr.prototype.Bool = function() { - var o; - o = this; - return !!(o.object); - }; - Object.prototype.Bool = function() { return this.$val.Bool(); }; - Object.ptr.prototype.String = function() { - var o; - o = this; - return $internalize(o.object, $String); - }; - Object.prototype.String = function() { return this.$val.String(); }; - Object.ptr.prototype.Int = function() { - var o; - o = this; - return $parseInt(o.object) >> 0; - }; - Object.prototype.Int = function() { return this.$val.Int(); }; - Object.ptr.prototype.Int64 = function() { - var o; - o = this; - return $internalize(o.object, $Int64); - }; - Object.prototype.Int64 = function() { return this.$val.Int64(); }; - Object.ptr.prototype.Uint64 = function() { - var o; - o = this; - return $internalize(o.object, $Uint64); - }; - Object.prototype.Uint64 = function() { return this.$val.Uint64(); }; - Object.ptr.prototype.Float = function() { - var o; - o = this; - return $parseFloat(o.object); - }; - Object.prototype.Float = function() { return this.$val.Float(); }; - Object.ptr.prototype.Interface = function() { - var o; - o = this; - return $internalize(o.object, $emptyInterface); - }; - Object.prototype.Interface = function() { return this.$val.Interface(); }; - Object.ptr.prototype.Unsafe = function() { - var o; - o = this; - return o.object; - }; - Object.prototype.Unsafe = function() { return this.$val.Unsafe(); }; - Error.ptr.prototype.Error = function() { - var err; - err = this; - return "JavaScript error: " + $internalize(err.Object.message, $String); - }; - Error.prototype.Error = function() { return this.$val.Error(); }; - Error.ptr.prototype.Stack = function() { - var err; - err = this; - return $internalize(err.Object.stack, $String); - }; - Error.prototype.Stack = function() { return this.$val.Stack(); }; - MakeFunc = function(fn) { - var fn; - return $makeFunc(fn); - }; - $pkg.MakeFunc = MakeFunc; - MakeWrapper = function(i) { - var i, i$1, m, methods, o, v; - v = i; - o = new ($global.Object)(); - o.__internal_object__ = v; - methods = v.constructor.methods; - i$1 = 0; - while (true) { - if (!(i$1 < $parseInt(methods.length))) { break; } - m = [m]; - m[0] = methods[i$1]; - if (!($internalize(m[0].pkg, $String) === "")) { - i$1 = i$1 + (1) >> 0; - continue; - } - o[$externalize($internalize(m[0].name, $String), $String)] = $externalize((function(m) { return function(args) { - var args; - return $externalizeFunction(v[$externalize($internalize(m[0].prop, $String), $String)], m[0].typ, $externalize(true, $Bool)).apply(v, $externalize(args, sliceType$2)); - }; })(m), funcType); - i$1 = i$1 + (1) >> 0; - } - return o; - }; - $pkg.MakeWrapper = MakeWrapper; - MakeFullWrapper = function(i) { - var {constructor, defineProperty, e, f, fields, i, i$1, i$2, i$3, internalObj, m, methods, ms, pkg, pkgTyp, ptr, typ, wrapperObj, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - internalObj = [internalObj]; - wrapperObj = [wrapperObj]; - internalObj[0] = i; - constructor = internalObj[0].constructor; - wrapperObj[0] = new ($global.Object)(); - defineProperty = (function(internalObj, wrapperObj) { return function(key, descriptor) { - var descriptor, key; - $global.Object.defineProperty(wrapperObj[0], $externalize(key, $String), $externalize(descriptor, M)); - }; })(internalObj, wrapperObj); - $r = defineProperty("__internal_object__", $makeMap($String.keyFor, [{ k: "value", v: new $jsObjectPtr(internalObj[0]) }])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - typ = $internalize(constructor.string, $String); - pkg = $internalize(constructor.pkg, $String); - ptr = ""; - if (typ.charCodeAt(0) === 42) { - ptr = "*"; - } - i$1 = 0; - while (true) { - if (!(i$1 < typ.length)) { break; } - if (typ.charCodeAt(i$1) === 46) { - typ = $substring(typ, (i$1 + 1 >> 0)); - break; - } - i$1 = i$1 + (1) >> 0; - } - pkgTyp = pkg + "." + ptr + typ; - $r = defineProperty("$type", $makeMap($String.keyFor, [{ k: "value", v: new $String(pkgTyp) }])); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - fields = null; - methods = new ($global.Array)(); - ms = constructor.methods; - if (!(ms === undefined)) { - methods = methods.concat(ms); - } - e = constructor.elem; - if (!(e === undefined)) { - fields = e.fields; - methods = methods.concat(e.methods); - } else { - fields = constructor.fields; - } - i$2 = 0; - /* while (true) { */ case 3: - /* if (!(i$2 < $parseInt(methods.length))) { break; } */ if(!(i$2 < $parseInt(methods.length))) { $s = 4; continue; } - m = [m]; - m[0] = methods[i$2]; - if (!($internalize(m[0].pkg, $String) === "")) { - i$2 = i$2 + (1) >> 0; - /* continue; */ $s = 3; continue; - } - $r = defineProperty($internalize(m[0].prop, $String), $makeMap($String.keyFor, [{ k: "value", v: new funcType((function(internalObj, m, wrapperObj) { return function(args) { - var args; - return $externalizeFunction(internalObj[0][$externalize($internalize(m[0].prop, $String), $String)], m[0].typ, $externalize(true, $Bool), MakeFullWrapper).apply(internalObj[0], $externalize(args, sliceType$2)); - }; })(internalObj, m, wrapperObj)) }])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$2 = i$2 + (1) >> 0; - $s = 3; continue; - case 4: - /* */ if (!(fields === undefined)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(fields === undefined)) { */ case 6: - i$3 = 0; - /* while (true) { */ case 8: - /* if (!(i$3 < $parseInt(fields.length))) { break; } */ if(!(i$3 < $parseInt(fields.length))) { $s = 9; continue; } - f = [f]; - f[0] = fields[i$3]; - if (!!!(f[0].exported)) { - i$3 = i$3 + (1) >> 0; - /* continue; */ $s = 8; continue; - } - $r = defineProperty($internalize(f[0].prop, $String), $makeMap($String.keyFor, [{ k: "get", v: new funcType$1((function(f, internalObj, wrapperObj) { return function() { - var vc; - vc = $copyIfRequired(internalObj[0].$val[$externalize($internalize(f[0].prop, $String), $String)], f[0].typ); - return $externalize(vc, f[0].typ, MakeFullWrapper); - }; })(f, internalObj, wrapperObj)) }, { k: "set", v: new funcType$2((function(f, internalObj, wrapperObj) { return function(jv) { - var gv, jv; - gv = $internalize(jv, f[0].typ, MakeFullWrapper); - internalObj[0].$val[$externalize($internalize(f[0].prop, $String), $String)] = gv; - }; })(f, internalObj, wrapperObj)) }])); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$3 = i$3 + (1) >> 0; - $s = 8; continue; - case 9: - /* } */ case 7: - $s = -1; return wrapperObj[0]; - /* */ } return; } var $f = {$blk: MakeFullWrapper, $c: true, $r, constructor, defineProperty, e, f, fields, i, i$1, i$2, i$3, internalObj, m, methods, ms, pkg, pkgTyp, ptr, typ, wrapperObj, $s};return $f; - }; - $pkg.MakeFullWrapper = MakeFullWrapper; - init = function() { - var e; - e = new Error.ptr(null); - $unused(e); - }; - ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [ptrType], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [ptrType], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType], [ptrType], true)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType], [ptrType], true)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType], [ptrType], true)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Unsafe", name: "Unsafe", pkg: "", typ: $funcType([], [$Uintptr], false)}]; - ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Stack", name: "Stack", pkg: "", typ: $funcType([], [$String], false)}]; - Object.init("github.com/gopherjs/gopherjs/js", [{prop: "object", name: "object", embedded: false, exported: false, typ: ptrType, tag: ""}]); - Error.init("", [{prop: "Object", name: "Object", embedded: true, exported: true, typ: ptrType, tag: ""}]); - M.init($String, $emptyInterface); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["runtime"] = (function() { - var $pkg = {}, $init, js, _type, TypeAssertionError, basicFrame, Frames, Frame, Func, errorString, ptrType, sliceType, ptrType$1, structType, sliceType$1, sliceType$2, ptrType$2, ptrType$3, knownPositions, positionCounters, hiddenFrames, knownFrames, buildVersion, init, GOROOT, registerPosition, itoa, callstack, parseCallstack, ParseCallFrame, Caller, Callers, CallersFrames, SetFinalizer, FuncForPC, Stack, KeepAlive, throw$1, nanotime, fastrand; - js = $packages["github.com/gopherjs/gopherjs/js"]; - _type = $pkg._type = $newType(0, $kindStruct, "runtime._type", true, "runtime", false, function(str_) { - this.$val = this; - if (arguments.length === 0) { - this.str = ""; - return; - } - this.str = str_; - }); - TypeAssertionError = $pkg.TypeAssertionError = $newType(0, $kindStruct, "runtime.TypeAssertionError", true, "runtime", true, function(_interface_, concrete_, asserted_, missingMethod_) { - this.$val = this; - if (arguments.length === 0) { - this._interface = ptrType$1.nil; - this.concrete = ptrType$1.nil; - this.asserted = ptrType$1.nil; - this.missingMethod = ""; - return; - } - this._interface = _interface_; - this.concrete = concrete_; - this.asserted = asserted_; - this.missingMethod = missingMethod_; - }); - basicFrame = $pkg.basicFrame = $newType(0, $kindStruct, "runtime.basicFrame", true, "runtime", false, function(FuncName_, File_, Line_, Col_) { - this.$val = this; - if (arguments.length === 0) { - this.FuncName = ""; - this.File = ""; - this.Line = 0; - this.Col = 0; - return; - } - this.FuncName = FuncName_; - this.File = File_; - this.Line = Line_; - this.Col = Col_; - }); - Frames = $pkg.Frames = $newType(0, $kindStruct, "runtime.Frames", true, "runtime", true, function(frames_, current_) { - this.$val = this; - if (arguments.length === 0) { - this.frames = sliceType$2.nil; - this.current = 0; - return; - } - this.frames = frames_; - this.current = current_; - }); - Frame = $pkg.Frame = $newType(0, $kindStruct, "runtime.Frame", true, "runtime", true, function(PC_, Func_, Function_, File_, Line_, Entry_) { - this.$val = this; - if (arguments.length === 0) { - this.PC = 0; - this.Func = ptrType.nil; - this.Function = ""; - this.File = ""; - this.Line = 0; - this.Entry = 0; - return; - } - this.PC = PC_; - this.Func = Func_; - this.Function = Function_; - this.File = File_; - this.Line = Line_; - this.Entry = Entry_; - }); - Func = $pkg.Func = $newType(0, $kindStruct, "runtime.Func", true, "runtime", true, function(name_, file_, line_, opaque_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.file = ""; - this.line = 0; - this.opaque = new structType.ptr(); - return; - } - this.name = name_; - this.file = file_; - this.line = line_; - this.opaque = opaque_; - }); - errorString = $pkg.errorString = $newType(8, $kindString, "runtime.errorString", true, "runtime", false, null); - ptrType = $ptrType(Func); - sliceType = $sliceType(ptrType); - ptrType$1 = $ptrType(_type); - structType = $structType("", []); - sliceType$1 = $sliceType(basicFrame); - sliceType$2 = $sliceType(Frame); - ptrType$2 = $ptrType(TypeAssertionError); - ptrType$3 = $ptrType(Frames); - _type.ptr.prototype.string = function() { - var t; - t = this; - return t.str; - }; - _type.prototype.string = function() { return this.$val.string(); }; - _type.ptr.prototype.pkgpath = function() { - var t; - t = this; - return ""; - }; - _type.prototype.pkgpath = function() { return this.$val.pkgpath(); }; - TypeAssertionError.ptr.prototype.RuntimeError = function() { - }; - TypeAssertionError.prototype.RuntimeError = function() { return this.$val.RuntimeError(); }; - TypeAssertionError.ptr.prototype.Error = function() { - var as, cs, e, inter, msg; - e = this; - inter = "interface"; - if (!(e._interface === ptrType$1.nil)) { - inter = e._interface.string(); - } - as = e.asserted.string(); - if (e.concrete === ptrType$1.nil) { - return "interface conversion: " + inter + " is nil, not " + as; - } - cs = e.concrete.string(); - if (e.missingMethod === "") { - msg = "interface conversion: " + inter + " is " + cs + ", not " + as; - if (cs === as) { - if (!(e.concrete.pkgpath() === e.asserted.pkgpath())) { - msg = msg + (" (types from different packages)"); - } else { - msg = msg + (" (types from different scopes)"); - } - } - return msg; - } - return "interface conversion: " + cs + " is not " + as + ": missing method " + e.missingMethod; - }; - TypeAssertionError.prototype.Error = function() { return this.$val.Error(); }; - init = function() { - var e, jsPkg; - jsPkg = $packages[$externalize("github.com/gopherjs/gopherjs/js", $String)]; - $jsObjectPtr = jsPkg.Object.ptr; - $jsErrorPtr = jsPkg.Error.ptr; - $throwRuntimeError = throw$1; - buildVersion = $internalize($goVersion, $String); - e = $ifaceNil; - e = new TypeAssertionError.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ""); - $unused(e); - }; - GOROOT = function() { - var process, v, v$1; - process = $global.process; - if (process === undefined) { - return "/"; - } - v = process.env.GOPHERJS_GOROOT; - if (!(v === undefined) && !($internalize(v, $String) === "")) { - return $internalize(v, $String); - } else { - v$1 = process.env.GOROOT; - if (!(v$1 === undefined) && !($internalize(v$1, $String) === "")) { - return $internalize(v$1, $String); - } - } - return "/usr/local/go"; - }; - $pkg.GOROOT = GOROOT; - registerPosition = function(funcName, file, line, col) { - var _entry, _key, _tuple, col, f, file, found, funcName, key, line, pc, pc$1; - key = file + ":" + itoa(line) + ":" + itoa(col); - _tuple = (_entry = knownPositions[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [0, false]); - pc = _tuple[0]; - found = _tuple[1]; - if (found) { - return pc; - } - f = new Func.ptr(funcName, file, line, new structType.ptr()); - pc$1 = ((positionCounters.$length >>> 0)); - positionCounters = $append(positionCounters, f); - _key = key; (knownPositions || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: pc$1 }; - return pc$1; - }; - itoa = function(i) { - var i; - return $internalize(new ($global.String)(i), $String); - }; - callstack = function(skip, limit) { - var limit, lines, skip; - skip = (skip + 1 >> 0) + 1 >> 0; - lines = new ($global.Error)().stack.split($externalize("\n", $String)).slice(skip, skip + limit >> 0); - return parseCallstack(lines); - }; - parseCallstack = function(lines) { - var _entry, _entry$1, _tuple, alias, frame, frames, i, l, lines, ok; - frames = new sliceType$1([]); - l = $parseInt(lines.length); - i = 0; - while (true) { - if (!(i < l)) { break; } - frame = $clone(ParseCallFrame(lines[i]), basicFrame); - if ((_entry = hiddenFrames[$String.keyFor(frame.FuncName)], _entry !== undefined ? _entry.v : false)) { - i = i + (1) >> 0; - continue; - } - _tuple = (_entry$1 = knownFrames[$String.keyFor(frame.FuncName)], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]); - alias = _tuple[0]; - ok = _tuple[1]; - if (ok) { - frame.FuncName = alias; - } - frames = $append(frames, frame); - if (frame.FuncName === "runtime.goexit") { - break; - } - i = i + (1) >> 0; - } - return frames; - }; - ParseCallFrame = function(info) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, col, file, fn, funcName, idx, info, line, openIdx, parts, parts$1, parts$2, pos, split; - if (($parseInt(info.indexOf($externalize("@", $String))) >> 0) >= 0) { - split = new ($global.RegExp)($externalize("[@:]", $String)); - parts = info.split(split); - return new basicFrame.ptr($internalize(parts[0], $String), $internalize(parts.slice(1, $parseInt(parts.length) - 2 >> 0).join($externalize(":", $String)), $String), $parseInt(parts[($parseInt(parts.length) - 2 >> 0)]) >> 0, $parseInt(parts[($parseInt(parts.length) - 1 >> 0)]) >> 0); - } - openIdx = $parseInt(info.lastIndexOf($externalize("(", $String))) >> 0; - if (openIdx === -1) { - parts$1 = info.split($externalize(":", $String)); - return new basicFrame.ptr("", $internalize(parts$1.slice(0, $parseInt(parts$1.length) - 2 >> 0).join($externalize(":", $String)).replace(new ($global.RegExp)($externalize("^\\s*at ", $String)), $externalize("", $String)), $String), $parseInt(parts$1[($parseInt(parts$1.length) - 2 >> 0)]) >> 0, $parseInt(parts$1[($parseInt(parts$1.length) - 1 >> 0)]) >> 0); - } - _tmp = ""; - _tmp$1 = ""; - file = _tmp; - funcName = _tmp$1; - _tmp$2 = 0; - _tmp$3 = 0; - line = _tmp$2; - col = _tmp$3; - pos = info.substring(openIdx + 1 >> 0, $parseInt(info.indexOf($externalize(")", $String))) >> 0); - parts$2 = pos.split($externalize(":", $String)); - if ($internalize(pos, $String) === "") { - file = ""; - } else { - file = $internalize(parts$2.slice(0, $parseInt(parts$2.length) - 2 >> 0).join($externalize(":", $String)), $String); - line = $parseInt(parts$2[($parseInt(parts$2.length) - 2 >> 0)]) >> 0; - col = $parseInt(parts$2[($parseInt(parts$2.length) - 1 >> 0)]) >> 0; - } - fn = info.substring(($parseInt(info.indexOf($externalize("at ", $String))) >> 0) + 3 >> 0, $parseInt(info.indexOf($externalize(" (", $String))) >> 0); - idx = $parseInt(fn.indexOf($externalize("[as ", $String))) >> 0; - if (idx > 0) { - fn = fn.substring(idx + 4 >> 0, fn.indexOf($externalize("]", $String))); - } - funcName = $internalize(fn, $String); - return new basicFrame.ptr(funcName, file, line, col); - }; - $pkg.ParseCallFrame = ParseCallFrame; - Caller = function(skip) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, file, frames, line, ok, pc, skip; - pc = 0; - file = ""; - line = 0; - ok = false; - skip = skip + 1 >> 0; - frames = callstack(skip, 1); - if (!((frames.$length === 1))) { - _tmp = 0; - _tmp$1 = ""; - _tmp$2 = 0; - _tmp$3 = false; - pc = _tmp; - file = _tmp$1; - line = _tmp$2; - ok = _tmp$3; - return [pc, file, line, ok]; - } - pc = registerPosition((0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).FuncName, (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).File, (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).Line, (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).Col); - _tmp$4 = pc; - _tmp$5 = (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).File; - _tmp$6 = (0 >= frames.$length ? ($throwRuntimeError("index out of range"), undefined) : frames.$array[frames.$offset + 0]).Line; - _tmp$7 = true; - pc = _tmp$4; - file = _tmp$5; - line = _tmp$6; - ok = _tmp$7; - return [pc, file, line, ok]; - }; - $pkg.Caller = Caller; - Callers = function(skip, pc) { - var _i, _ref, frame, frames, i, pc, skip; - frames = callstack(skip, pc.$length); - _ref = frames; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - frame = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), basicFrame); - ((i < 0 || i >= pc.$length) ? ($throwRuntimeError("index out of range"), undefined) : pc.$array[pc.$offset + i] = registerPosition(frame.FuncName, frame.File, frame.Line, frame.Col)); - _i++; - } - return frames.$length; - }; - $pkg.Callers = Callers; - CallersFrames = function(callers) { - var _i, _ref, callers, fun, pc, result; - result = new Frames.ptr(sliceType$2.nil, 0); - _ref = callers; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - pc = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - fun = FuncForPC(pc); - result.frames = $append(result.frames, new Frame.ptr(pc, fun, fun.name, fun.file, fun.line, fun.Entry())); - _i++; - } - return result; - }; - $pkg.CallersFrames = CallersFrames; - Frames.ptr.prototype.Next = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, ci, f, frame, more, x, x$1; - frame = new Frame.ptr(0, ptrType.nil, "", "", 0, 0); - more = false; - ci = this; - if (ci.current >= ci.frames.$length) { - _tmp = new Frame.ptr(0, ptrType.nil, "", "", 0, 0); - _tmp$1 = false; - Frame.copy(frame, _tmp); - more = _tmp$1; - return [frame, more]; - } - f = $clone((x = ci.frames, x$1 = ci.current, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])), Frame); - ci.current = ci.current + (1) >> 0; - _tmp$2 = $clone(f, Frame); - _tmp$3 = ci.current < ci.frames.$length; - Frame.copy(frame, _tmp$2); - more = _tmp$3; - return [frame, more]; - }; - Frames.prototype.Next = function() { return this.$val.Next(); }; - SetFinalizer = function(x, f) { - var f, x; - }; - $pkg.SetFinalizer = SetFinalizer; - Func.ptr.prototype.Entry = function() { - return 0; - }; - Func.prototype.Entry = function() { return this.$val.Entry(); }; - Func.ptr.prototype.FileLine = function(pc) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, f, file, line, pc; - file = ""; - line = 0; - f = this; - if (f === ptrType.nil) { - _tmp = ""; - _tmp$1 = 0; - file = _tmp; - line = _tmp$1; - return [file, line]; - } - _tmp$2 = f.file; - _tmp$3 = f.line; - file = _tmp$2; - line = _tmp$3; - return [file, line]; - }; - Func.prototype.FileLine = function(pc) { return this.$val.FileLine(pc); }; - Func.ptr.prototype.Name = function() { - var f; - f = this; - if (f === ptrType.nil || f.name === "") { - return ""; - } - return f.name; - }; - Func.prototype.Name = function() { return this.$val.Name(); }; - FuncForPC = function(pc) { - var ipc, pc; - ipc = ((pc >> 0)); - if (ipc >= positionCounters.$length) { - $panic(new $String("GopherJS: pc=" + itoa(ipc) + " is out of range of known position counters")); - } - return ((ipc < 0 || ipc >= positionCounters.$length) ? ($throwRuntimeError("index out of range"), undefined) : positionCounters.$array[positionCounters.$offset + ipc]); - }; - $pkg.FuncForPC = FuncForPC; - Stack = function(buf, all) { - var all, buf, s; - s = new ($global.Error)().stack; - if (s === undefined) { - return 0; - } - return $copyString(buf, $internalize(s.substr(($parseInt(s.indexOf($externalize("\n", $String))) >> 0) + 1 >> 0), $String)); - }; - $pkg.Stack = Stack; - KeepAlive = function(param) { - var param; - }; - $pkg.KeepAlive = KeepAlive; - errorString.prototype.RuntimeError = function() { - var e; - e = this.$val; - }; - $ptrType(errorString).prototype.RuntimeError = function() { return new errorString(this.$get()).RuntimeError(); }; - errorString.prototype.Error = function() { - var e; - e = this.$val; - return "runtime error: " + (e); - }; - $ptrType(errorString).prototype.Error = function() { return new errorString(this.$get()).Error(); }; - throw$1 = function(s) { - var s; - $panic(new errorString((s))); - }; - nanotime = function() { - return $mul64($internalize(new ($global.Date)().getTime(), $Int64), new $Int64(0, 1000000)); - }; - $linknames["runtime.nanotime"] = nanotime; - fastrand = function() { - return (($parseFloat($global.Math.random()) * 4.294967295e+09 >> 0)); - }; - $linknames["runtime.fastrand"] = fastrand; - ptrType$1.methods = [{prop: "string", name: "string", pkg: "runtime", typ: $funcType([], [$String], false)}, {prop: "pkgpath", name: "pkgpath", pkg: "runtime", typ: $funcType([], [$String], false)}]; - ptrType$2.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$3.methods = [{prop: "Next", name: "Next", pkg: "", typ: $funcType([], [Frame, $Bool], false)}]; - ptrType.methods = [{prop: "Entry", name: "Entry", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "FileLine", name: "FileLine", pkg: "", typ: $funcType([$Uintptr], [$String, $Int], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}]; - errorString.methods = [{prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - _type.init("runtime", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); - TypeAssertionError.init("runtime", [{prop: "_interface", name: "_interface", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "concrete", name: "concrete", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "asserted", name: "asserted", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "missingMethod", name: "missingMethod", embedded: false, exported: false, typ: $String, tag: ""}]); - basicFrame.init("", [{prop: "FuncName", name: "FuncName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Line", name: "Line", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Col", name: "Col", embedded: false, exported: true, typ: $Int, tag: ""}]); - Frames.init("runtime", [{prop: "frames", name: "frames", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "current", name: "current", embedded: false, exported: false, typ: $Int, tag: ""}]); - Frame.init("", [{prop: "PC", name: "PC", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "Func", name: "Func", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Function", name: "Function", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Line", name: "Line", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Entry", name: "Entry", embedded: false, exported: true, typ: $Uintptr, tag: ""}]); - Func.init("runtime", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "file", name: "file", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "line", name: "line", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "opaque", name: "opaque", embedded: false, exported: false, typ: structType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - buildVersion = ""; - knownPositions = $makeMap($String.keyFor, []); - positionCounters = new sliceType([]); - hiddenFrames = $makeMap($String.keyFor, [{ k: "$callDeferred", v: true }]); - knownFrames = $makeMap($String.keyFor, [{ k: "$panic", v: "runtime.gopanic" }, { k: "$goroutine", v: "runtime.goexit" }]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/goarch"] = (function() { - var $pkg = {}, $init; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/unsafeheader"] = (function() { - var $pkg = {}, $init, Slice; - Slice = $pkg.Slice = $newType(0, $kindStruct, "unsafeheader.Slice", true, "internal/unsafeheader", true, function(Data_, Len_, Cap_) { - this.$val = this; - if (arguments.length === 0) { - this.Data = 0; - this.Len = 0; - this.Cap = 0; - return; - } - this.Data = Data_; - this.Len = Len_; - this.Cap = Cap_; - }); - Slice.init("", [{prop: "Data", name: "Data", embedded: false, exported: true, typ: $UnsafePointer, tag: ""}, {prop: "Len", name: "Len", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Cap", name: "Cap", embedded: false, exported: true, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/reflectlite"] = (function() { - var $pkg = {}, $init, js, goarch, unsafeheader, runtime, Value, flag, ValueError, Type, Kind, tflag, rtype, method, chanDir, arrayType, chanType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, nameOff, typeOff, textOff, errorString, Method, uncommonType, funcType, name, nameData, mapIter, TypeEx, ptrType$1, sliceType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$2, funcType$1, ptrType$4, sliceType$5, ptrType$5, sliceType$6, ptrType$6, ptrType$7, sliceType$7, sliceType$8, sliceType$9, sliceType$10, ptrType$8, structType$2, ptrType$9, arrayType$2, sliceType$13, ptrType$10, funcType$2, ptrType$11, funcType$3, ptrType$12, ptrType$13, kindNames, callHelper, initialized, uint8Type, idJsType, idReflectType, idKindType, idRtype, uncommonTypeMap, nameMap, nameOffList, typeOffList, jsObjectPtr, selectHelper, implements$1, directlyAssignable, haveIdenticalType, haveIdenticalUnderlyingType, toType, ifaceIndir, unquote, Swapper, init, jsType, reflectType, setKindType, newName, newNameOff, newTypeOff, internalStr, isWrapped, copyStruct, makeValue, TypeOf, ValueOf, FuncOf, SliceOf, unsafe_New, typedmemmove, keyFor, mapaccess, mapiterinit, mapiterkey, mapiternext, maplen, methodReceiver, valueInterface, ifaceE2I, methodName, makeMethodValue, wrapJsObject, unwrapJsObject, getJsTag, PtrTo, copyVal; - js = $packages["github.com/gopherjs/gopherjs/js"]; - goarch = $packages["internal/goarch"]; - unsafeheader = $packages["internal/unsafeheader"]; - runtime = $packages["runtime"]; - Value = $pkg.Value = $newType(0, $kindStruct, "reflectlite.Value", true, "internal/reflectlite", true, function(typ_, ptr_, flag_) { - this.$val = this; - if (arguments.length === 0) { - this.typ = ptrType$1.nil; - this.ptr = 0; - this.flag = 0; - return; - } - this.typ = typ_; - this.ptr = ptr_; - this.flag = flag_; - }); - flag = $pkg.flag = $newType(4, $kindUintptr, "reflectlite.flag", true, "internal/reflectlite", false, null); - ValueError = $pkg.ValueError = $newType(0, $kindStruct, "reflectlite.ValueError", true, "internal/reflectlite", true, function(Method_, Kind_) { - this.$val = this; - if (arguments.length === 0) { - this.Method = ""; - this.Kind = 0; - return; - } - this.Method = Method_; - this.Kind = Kind_; - }); - Type = $pkg.Type = $newType(8, $kindInterface, "reflectlite.Type", true, "internal/reflectlite", true, null); - Kind = $pkg.Kind = $newType(4, $kindUint, "reflectlite.Kind", true, "internal/reflectlite", true, null); - tflag = $pkg.tflag = $newType(1, $kindUint8, "reflectlite.tflag", true, "internal/reflectlite", false, null); - rtype = $pkg.rtype = $newType(0, $kindStruct, "reflectlite.rtype", true, "internal/reflectlite", false, function(size_, ptrdata_, hash_, tflag_, align_, fieldAlign_, kind_, equal_, gcdata_, str_, ptrToThis_) { - this.$val = this; - if (arguments.length === 0) { - this.size = 0; - this.ptrdata = 0; - this.hash = 0; - this.tflag = 0; - this.align = 0; - this.fieldAlign = 0; - this.kind = 0; - this.equal = $throwNilPointerError; - this.gcdata = ptrType$6.nil; - this.str = 0; - this.ptrToThis = 0; - return; - } - this.size = size_; - this.ptrdata = ptrdata_; - this.hash = hash_; - this.tflag = tflag_; - this.align = align_; - this.fieldAlign = fieldAlign_; - this.kind = kind_; - this.equal = equal_; - this.gcdata = gcdata_; - this.str = str_; - this.ptrToThis = ptrToThis_; - }); - method = $pkg.method = $newType(0, $kindStruct, "reflectlite.method", true, "internal/reflectlite", false, function(name_, mtyp_, ifn_, tfn_) { - this.$val = this; - if (arguments.length === 0) { - this.name = 0; - this.mtyp = 0; - this.ifn = 0; - this.tfn = 0; - return; - } - this.name = name_; - this.mtyp = mtyp_; - this.ifn = ifn_; - this.tfn = tfn_; - }); - chanDir = $pkg.chanDir = $newType(4, $kindInt, "reflectlite.chanDir", true, "internal/reflectlite", false, null); - arrayType = $pkg.arrayType = $newType(0, $kindStruct, "reflectlite.arrayType", true, "internal/reflectlite", false, function(rtype_, elem_, slice_, len_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.elem = ptrType$1.nil; - this.slice = ptrType$1.nil; - this.len = 0; - return; - } - this.rtype = rtype_; - this.elem = elem_; - this.slice = slice_; - this.len = len_; - }); - chanType = $pkg.chanType = $newType(0, $kindStruct, "reflectlite.chanType", true, "internal/reflectlite", false, function(rtype_, elem_, dir_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.elem = ptrType$1.nil; - this.dir = 0; - return; - } - this.rtype = rtype_; - this.elem = elem_; - this.dir = dir_; - }); - imethod = $pkg.imethod = $newType(0, $kindStruct, "reflectlite.imethod", true, "internal/reflectlite", false, function(name_, typ_) { - this.$val = this; - if (arguments.length === 0) { - this.name = 0; - this.typ = 0; - return; - } - this.name = name_; - this.typ = typ_; - }); - interfaceType = $pkg.interfaceType = $newType(0, $kindStruct, "reflectlite.interfaceType", true, "internal/reflectlite", false, function(rtype_, pkgPath_, methods_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.pkgPath = new name.ptr(ptrType$6.nil); - this.methods = sliceType$9.nil; - return; - } - this.rtype = rtype_; - this.pkgPath = pkgPath_; - this.methods = methods_; - }); - mapType = $pkg.mapType = $newType(0, $kindStruct, "reflectlite.mapType", true, "internal/reflectlite", false, function(rtype_, key_, elem_, bucket_, hasher_, keysize_, valuesize_, bucketsize_, flags_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.key = ptrType$1.nil; - this.elem = ptrType$1.nil; - this.bucket = ptrType$1.nil; - this.hasher = $throwNilPointerError; - this.keysize = 0; - this.valuesize = 0; - this.bucketsize = 0; - this.flags = 0; - return; - } - this.rtype = rtype_; - this.key = key_; - this.elem = elem_; - this.bucket = bucket_; - this.hasher = hasher_; - this.keysize = keysize_; - this.valuesize = valuesize_; - this.bucketsize = bucketsize_; - this.flags = flags_; - }); - ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflectlite.ptrType", true, "internal/reflectlite", false, function(rtype_, elem_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.elem = ptrType$1.nil; - return; - } - this.rtype = rtype_; - this.elem = elem_; - }); - sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflectlite.sliceType", true, "internal/reflectlite", false, function(rtype_, elem_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.elem = ptrType$1.nil; - return; - } - this.rtype = rtype_; - this.elem = elem_; - }); - structField = $pkg.structField = $newType(0, $kindStruct, "reflectlite.structField", true, "internal/reflectlite", false, function(name_, typ_, offsetEmbed_) { - this.$val = this; - if (arguments.length === 0) { - this.name = new name.ptr(ptrType$6.nil); - this.typ = ptrType$1.nil; - this.offsetEmbed = 0; - return; - } - this.name = name_; - this.typ = typ_; - this.offsetEmbed = offsetEmbed_; - }); - structType = $pkg.structType = $newType(0, $kindStruct, "reflectlite.structType", true, "internal/reflectlite", false, function(rtype_, pkgPath_, fields_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.pkgPath = new name.ptr(ptrType$6.nil); - this.fields = sliceType$10.nil; - return; - } - this.rtype = rtype_; - this.pkgPath = pkgPath_; - this.fields = fields_; - }); - nameOff = $pkg.nameOff = $newType(4, $kindInt32, "reflectlite.nameOff", true, "internal/reflectlite", false, null); - typeOff = $pkg.typeOff = $newType(4, $kindInt32, "reflectlite.typeOff", true, "internal/reflectlite", false, null); - textOff = $pkg.textOff = $newType(4, $kindInt32, "reflectlite.textOff", true, "internal/reflectlite", false, null); - errorString = $pkg.errorString = $newType(0, $kindStruct, "reflectlite.errorString", true, "internal/reflectlite", false, function(s_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - return; - } - this.s = s_; - }); - Method = $pkg.Method = $newType(0, $kindStruct, "reflectlite.Method", true, "internal/reflectlite", true, function(Name_, PkgPath_, Type_, Func_, Index_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.PkgPath = ""; - this.Type = $ifaceNil; - this.Func = new Value.ptr(ptrType$1.nil, 0, 0); - this.Index = 0; - return; - } - this.Name = Name_; - this.PkgPath = PkgPath_; - this.Type = Type_; - this.Func = Func_; - this.Index = Index_; - }); - uncommonType = $pkg.uncommonType = $newType(0, $kindStruct, "reflectlite.uncommonType", true, "internal/reflectlite", false, function(pkgPath_, mcount_, xcount_, moff_, _methods_) { - this.$val = this; - if (arguments.length === 0) { - this.pkgPath = 0; - this.mcount = 0; - this.xcount = 0; - this.moff = 0; - this._methods = sliceType$5.nil; - return; - } - this.pkgPath = pkgPath_; - this.mcount = mcount_; - this.xcount = xcount_; - this.moff = moff_; - this._methods = _methods_; - }); - funcType = $pkg.funcType = $newType(0, $kindStruct, "reflectlite.funcType", true, "internal/reflectlite", false, function(rtype_, inCount_, outCount_, _in_, _out_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - this.inCount = 0; - this.outCount = 0; - this._in = sliceType$2.nil; - this._out = sliceType$2.nil; - return; - } - this.rtype = rtype_; - this.inCount = inCount_; - this.outCount = outCount_; - this._in = _in_; - this._out = _out_; - }); - name = $pkg.name = $newType(0, $kindStruct, "reflectlite.name", true, "internal/reflectlite", false, function(bytes_) { - this.$val = this; - if (arguments.length === 0) { - this.bytes = ptrType$6.nil; - return; - } - this.bytes = bytes_; - }); - nameData = $pkg.nameData = $newType(0, $kindStruct, "reflectlite.nameData", true, "internal/reflectlite", false, function(name_, tag_, exported_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.tag = ""; - this.exported = false; - return; - } - this.name = name_; - this.tag = tag_; - this.exported = exported_; - }); - mapIter = $pkg.mapIter = $newType(0, $kindStruct, "reflectlite.mapIter", true, "internal/reflectlite", false, function(t_, m_, keys_, i_, last_) { - this.$val = this; - if (arguments.length === 0) { - this.t = $ifaceNil; - this.m = null; - this.keys = null; - this.i = 0; - this.last = null; - return; - } - this.t = t_; - this.m = m_; - this.keys = keys_; - this.i = i_; - this.last = last_; - }); - TypeEx = $pkg.TypeEx = $newType(8, $kindInterface, "reflectlite.TypeEx", true, "internal/reflectlite", true, null); - ptrType$1 = $ptrType(rtype); - sliceType$1 = $sliceType(name); - sliceType$2 = $sliceType(ptrType$1); - sliceType$3 = $sliceType($String); - sliceType$4 = $sliceType($emptyInterface); - ptrType$2 = $ptrType(js.Object); - funcType$1 = $funcType([sliceType$4], [ptrType$2], true); - ptrType$4 = $ptrType(uncommonType); - sliceType$5 = $sliceType(method); - ptrType$5 = $ptrType(funcType); - sliceType$6 = $sliceType(Value); - ptrType$6 = $ptrType($Uint8); - ptrType$7 = $ptrType($UnsafePointer); - sliceType$7 = $sliceType(Type); - sliceType$8 = $sliceType(ptrType$2); - sliceType$9 = $sliceType(imethod); - sliceType$10 = $sliceType(structField); - ptrType$8 = $ptrType(nameData); - structType$2 = $structType("internal/reflectlite", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); - ptrType$9 = $ptrType(mapIter); - arrayType$2 = $arrayType($Uintptr, 2); - sliceType$13 = $sliceType($Uint8); - ptrType$10 = $ptrType(ValueError); - funcType$2 = $funcType([$UnsafePointer, $UnsafePointer], [$Bool], false); - ptrType$11 = $ptrType(interfaceType); - funcType$3 = $funcType([$UnsafePointer, $Uintptr], [$Uintptr], false); - ptrType$12 = $ptrType(structField); - ptrType$13 = $ptrType(errorString); - flag.prototype.kind = function() { - var f; - f = this.$val; - return ((((f & 31) >>> 0) >>> 0)); - }; - $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); }; - flag.prototype.ro = function() { - var f; - f = this.$val; - if (!((((f & 96) >>> 0) === 0))) { - return 32; - } - return 0; - }; - $ptrType(flag).prototype.ro = function() { return new flag(this.$get()).ro(); }; - Value.ptr.prototype.pointer = function() { - var v; - v = this; - if (!((v.typ.size === 4)) || !v.typ.pointers()) { - $panic(new $String("can't call pointer on a non-pointer Value")); - } - if (!((((v.flag & 128) >>> 0) === 0))) { - return (v.ptr).$get(); - } - return v.ptr; - }; - Value.prototype.pointer = function() { return this.$val.pointer(); }; - ValueError.ptr.prototype.Error = function() { - var e; - e = this; - if (e.Kind === 0) { - return "reflect: call of " + e.Method + " on zero Value"; - } - return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value"; - }; - ValueError.prototype.Error = function() { return this.$val.Error(); }; - flag.prototype.mustBeExported = function() { - var f; - f = this.$val; - if (f === 0) { - $panic(new ValueError.ptr(methodName(), 0)); - } - if (!((((f & 96) >>> 0) === 0))) { - $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); - } - }; - $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); }; - flag.prototype.mustBeAssignable = function() { - var f; - f = this.$val; - if (f === 0) { - $panic(new ValueError.ptr(methodName(), 0)); - } - if (!((((f & 96) >>> 0) === 0))) { - $panic(new $String("reflect: " + methodName() + " using value obtained using unexported field")); - } - if (((f & 256) >>> 0) === 0) { - $panic(new $String("reflect: " + methodName() + " using unaddressable value")); - } - }; - $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); }; - Value.ptr.prototype.CanSet = function() { - var v; - v = this; - return ((v.flag & 352) >>> 0) === 256; - }; - Value.prototype.CanSet = function() { return this.$val.CanSet(); }; - Value.ptr.prototype.IsValid = function() { - var v; - v = this; - return !((v.flag === 0)); - }; - Value.prototype.IsValid = function() { return this.$val.IsValid(); }; - Value.ptr.prototype.Kind = function() { - var v; - v = this; - return new flag(v.flag).kind(); - }; - Value.prototype.Kind = function() { return this.$val.Kind(); }; - Value.ptr.prototype.Type = function() { - var f, v; - v = this; - f = v.flag; - if (f === 0) { - $panic(new ValueError.ptr("reflectlite.Value.Type", 0)); - } - return v.typ; - }; - Value.prototype.Type = function() { return this.$val.Type(); }; - structField.ptr.prototype.embedded = function() { - var f; - f = this; - return !((((f.offsetEmbed & 1) >>> 0) === 0)); - }; - structField.prototype.embedded = function() { return this.$val.embedded(); }; - Kind.prototype.String = function() { - var k; - k = this.$val; - if (((k >> 0)) < kindNames.$length) { - return ((k < 0 || k >= kindNames.$length) ? ($throwRuntimeError("index out of range"), undefined) : kindNames.$array[kindNames.$offset + k]); - } - return (0 >= kindNames.$length ? ($throwRuntimeError("index out of range"), undefined) : kindNames.$array[kindNames.$offset + 0]); - }; - $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; - rtype.ptr.prototype.String = function() { - var s, t; - t = this; - s = $clone(t.nameOff(t.str), name).name(); - if (!((((t.tflag & 2) >>> 0) === 0))) { - return $substring(s, 1); - } - return s; - }; - rtype.prototype.String = function() { return this.$val.String(); }; - rtype.ptr.prototype.Size = function() { - var t; - t = this; - return t.size; - }; - rtype.prototype.Size = function() { return this.$val.Size(); }; - rtype.ptr.prototype.Kind = function() { - var t; - t = this; - return ((((t.kind & 31) >>> 0) >>> 0)); - }; - rtype.prototype.Kind = function() { return this.$val.Kind(); }; - rtype.ptr.prototype.pointers = function() { - var t; - t = this; - return !((t.ptrdata === 0)); - }; - rtype.prototype.pointers = function() { return this.$val.pointers(); }; - rtype.ptr.prototype.common = function() { - var t; - t = this; - return t; - }; - rtype.prototype.common = function() { return this.$val.common(); }; - rtype.ptr.prototype.exportedMethods = function() { - var t, ut; - t = this; - ut = t.uncommon(); - if (ut === ptrType$4.nil) { - return sliceType$5.nil; - } - return ut.exportedMethods(); - }; - rtype.prototype.exportedMethods = function() { return this.$val.exportedMethods(); }; - rtype.ptr.prototype.NumMethod = function() { - var t, tt; - t = this; - if (t.Kind() === 20) { - tt = (t.kindType); - return tt.NumMethod(); - } - return t.exportedMethods().$length; - }; - rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); }; - rtype.ptr.prototype.PkgPath = function() { - var t, ut; - t = this; - if (((t.tflag & 4) >>> 0) === 0) { - return ""; - } - ut = t.uncommon(); - if (ut === ptrType$4.nil) { - return ""; - } - return $clone(t.nameOff(ut.pkgPath), name).name(); - }; - rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); }; - rtype.ptr.prototype.hasName = function() { - var t; - t = this; - return !((((t.tflag & 4) >>> 0) === 0)); - }; - rtype.prototype.hasName = function() { return this.$val.hasName(); }; - rtype.ptr.prototype.Name = function() { - var i, s, t; - t = this; - if (!t.hasName()) { - return ""; - } - s = t.String(); - i = s.length - 1 >> 0; - while (true) { - if (!(i >= 0 && !((s.charCodeAt(i) === 46)))) { break; } - i = i - (1) >> 0; - } - return $substring(s, (i + 1 >> 0)); - }; - rtype.prototype.Name = function() { return this.$val.Name(); }; - rtype.ptr.prototype.chanDir = function() { - var t, tt; - t = this; - if (!((t.Kind() === 18))) { - $panic(new $String("reflect: chanDir of non-chan type")); - } - tt = (t.kindType); - return ((tt.dir >> 0)); - }; - rtype.prototype.chanDir = function() { return this.$val.chanDir(); }; - rtype.ptr.prototype.Elem = function() { - var _1, t, tt, tt$1, tt$2, tt$3, tt$4; - t = this; - _1 = t.Kind(); - if (_1 === (17)) { - tt = (t.kindType); - return toType(tt.elem); - } else if (_1 === (18)) { - tt$1 = (t.kindType); - return toType(tt$1.elem); - } else if (_1 === (21)) { - tt$2 = (t.kindType); - return toType(tt$2.elem); - } else if (_1 === (22)) { - tt$3 = (t.kindType); - return toType(tt$3.elem); - } else if (_1 === (23)) { - tt$4 = (t.kindType); - return toType(tt$4.elem); - } - $panic(new $String("reflect: Elem of invalid type")); - }; - rtype.prototype.Elem = function() { return this.$val.Elem(); }; - rtype.ptr.prototype.In = function(i) { - var i, t, tt, x; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: In of non-func type")); - } - tt = (t.kindType); - return toType((x = tt.in$(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))); - }; - rtype.prototype.In = function(i) { return this.$val.In(i); }; - rtype.ptr.prototype.Len = function() { - var t, tt; - t = this; - if (!((t.Kind() === 17))) { - $panic(new $String("reflect: Len of non-array type")); - } - tt = (t.kindType); - return ((tt.len >> 0)); - }; - rtype.prototype.Len = function() { return this.$val.Len(); }; - rtype.ptr.prototype.NumIn = function() { - var t, tt; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: NumIn of non-func type")); - } - tt = (t.kindType); - return ((tt.inCount >> 0)); - }; - rtype.prototype.NumIn = function() { return this.$val.NumIn(); }; - rtype.ptr.prototype.NumOut = function() { - var t, tt; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: NumOut of non-func type")); - } - tt = (t.kindType); - return tt.out().$length; - }; - rtype.prototype.NumOut = function() { return this.$val.NumOut(); }; - rtype.ptr.prototype.Out = function(i) { - var i, t, tt, x; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: Out of non-func type")); - } - tt = (t.kindType); - return toType((x = tt.out(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))); - }; - rtype.prototype.Out = function(i) { return this.$val.Out(i); }; - interfaceType.ptr.prototype.NumMethod = function() { - var t; - t = this; - return t.methods.$length; - }; - interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; - rtype.ptr.prototype.Implements = function(u) { - var {_r, t, u, $s, $r, $c} = $restore(this, {u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ($interfaceIsEqual(u, $ifaceNil)) { - $panic(new $String("reflect: nil type passed to Type.Implements")); - } - _r = u.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 20))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 20))) { */ case 1: - $panic(new $String("reflect: non-interface type passed to Type.Implements")); - /* } */ case 2: - $s = -1; return implements$1($assertType(u, ptrType$1), t); - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Implements, $c: true, $r, _r, t, u, $s};return $f; - }; - rtype.prototype.Implements = function(u) { return this.$val.Implements(u); }; - rtype.ptr.prototype.AssignableTo = function(u) { - var {$24r, _r, t, u, uu, $s, $r, $c} = $restore(this, {u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ($interfaceIsEqual(u, $ifaceNil)) { - $panic(new $String("reflect: nil type passed to Type.AssignableTo")); - } - uu = $assertType(u, ptrType$1); - _r = directlyAssignable(uu, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r || implements$1(uu, t); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.AssignableTo, $c: true, $r, $24r, _r, t, u, uu, $s};return $f; - }; - rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); }; - implements$1 = function(T, V) { - var T, V, i, i$1, j, j$1, t, tm, tm$1, tmName, tmName$1, tmPkgPath, tmPkgPath$1, v, v$1, vm, vm$1, vmName, vmName$1, vmPkgPath, vmPkgPath$1, vmethods, x, x$1, x$2; - if (!((T.Kind() === 20))) { - return false; - } - t = (T.kindType); - if (t.methods.$length === 0) { - return true; - } - if (V.Kind() === 20) { - v = (V.kindType); - i = 0; - j = 0; - while (true) { - if (!(j < v.methods.$length)) { break; } - tm = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - tmName = $clone(t.rtype.nameOff(tm.name), name); - vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])); - vmName = $clone(V.nameOff(vm.name), name); - if ($clone(vmName, name).name() === $clone(tmName, name).name() && V.typeOff(vm.typ) === t.rtype.typeOff(tm.typ)) { - if (!$clone(tmName, name).isExported()) { - tmPkgPath = $clone(tmName, name).pkgPath(); - if (tmPkgPath === "") { - tmPkgPath = $clone(t.pkgPath, name).name(); - } - vmPkgPath = $clone(vmName, name).pkgPath(); - if (vmPkgPath === "") { - vmPkgPath = $clone(v.pkgPath, name).name(); - } - if (!(tmPkgPath === vmPkgPath)) { - j = j + (1) >> 0; - continue; - } - } - i = i + (1) >> 0; - if (i >= t.methods.$length) { - return true; - } - } - j = j + (1) >> 0; - } - return false; - } - v$1 = V.uncommon(); - if (v$1 === ptrType$4.nil) { - return false; - } - i$1 = 0; - vmethods = v$1.methods(); - j$1 = 0; - while (true) { - if (!(j$1 < ((v$1.mcount >> 0)))) { break; } - tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1])); - tmName$1 = $clone(t.rtype.nameOff(tm$1.name), name); - vm$1 = $clone(((j$1 < 0 || j$1 >= vmethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : vmethods.$array[vmethods.$offset + j$1]), method); - vmName$1 = $clone(V.nameOff(vm$1.name), name); - if ($clone(vmName$1, name).name() === $clone(tmName$1, name).name() && V.typeOff(vm$1.mtyp) === t.rtype.typeOff(tm$1.typ)) { - if (!$clone(tmName$1, name).isExported()) { - tmPkgPath$1 = $clone(tmName$1, name).pkgPath(); - if (tmPkgPath$1 === "") { - tmPkgPath$1 = $clone(t.pkgPath, name).name(); - } - vmPkgPath$1 = $clone(vmName$1, name).pkgPath(); - if (vmPkgPath$1 === "") { - vmPkgPath$1 = $clone(V.nameOff(v$1.pkgPath), name).name(); - } - if (!(tmPkgPath$1 === vmPkgPath$1)) { - j$1 = j$1 + (1) >> 0; - continue; - } - } - i$1 = i$1 + (1) >> 0; - if (i$1 >= t.methods.$length) { - return true; - } - } - j$1 = j$1 + (1) >> 0; - } - return false; - }; - directlyAssignable = function(T, V) { - var {$24r, T, V, _r, $s, $r, $c} = $restore(this, {T, V}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (T === V) { - $s = -1; return true; - } - if (T.hasName() && V.hasName() || !((T.Kind() === V.Kind()))) { - $s = -1; return false; - } - _r = haveIdenticalUnderlyingType(T, V, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: directlyAssignable, $c: true, $r, $24r, T, V, _r, $s};return $f; - }; - haveIdenticalType = function(T, V, cmpTags) { - var {$24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, cmpTags, $s, $r, $c} = $restore(this, {T, V, cmpTags}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (cmpTags) { - $s = -1; return $interfaceIsEqual(T, V); - } - _r = T.Name(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = V.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (!(_r === _r$1)) { _v = true; $s = 3; continue s; } - _r$2 = T.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = V.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = !((_r$2 === _r$3)); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _r$4 = T.common(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg = _r$4; - _r$5 = V.common(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = haveIdenticalUnderlyingType(_arg, _arg$1, false); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 11; case 11: return $24r; - /* */ } return; } var $f = {$blk: haveIdenticalType, $c: true, $r, $24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, cmpTags, $s};return $f; - }; - haveIdenticalUnderlyingType = function(T, V, cmpTags) { - var {$24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _v, _v$1, _v$2, _v$3, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s, $r, $c} = $restore(this, {T, V, cmpTags}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (T === V) { - $s = -1; return true; - } - kind = T.Kind(); - if (!((kind === V.Kind()))) { - $s = -1; return false; - } - if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) { - $s = -1; return true; - } - _1 = kind; - /* */ if (_1 === (17)) { $s = 2; continue; } - /* */ if (_1 === (18)) { $s = 3; continue; } - /* */ if (_1 === (19)) { $s = 4; continue; } - /* */ if (_1 === (20)) { $s = 5; continue; } - /* */ if (_1 === (21)) { $s = 6; continue; } - /* */ if ((_1 === (22)) || (_1 === (23))) { $s = 7; continue; } - /* */ if (_1 === (25)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (17)) { */ case 2: - if (!(T.Len() === V.Len())) { _v = false; $s = 10; continue s; } - _r = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 10: - $24r = _v; - $s = 12; case 12: return $24r; - /* } else if (_1 === (18)) { */ case 3: - if (!(V.chanDir() === 3)) { _v$1 = false; $s = 15; continue s; } - _r$1 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = _r$1; case 15: - /* */ if (_v$1) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_v$1) { */ case 13: - $s = -1; return true; - /* } */ case 14: - if (!(V.chanDir() === T.chanDir())) { _v$2 = false; $s = 17; continue s; } - _r$2 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$2 = _r$2; case 17: - $24r$1 = _v$2; - $s = 19; case 19: return $24r$1; - /* } else if (_1 === (19)) { */ case 4: - t = (T.kindType); - v = (V.kindType); - if (!((t.outCount === v.outCount)) || !((t.inCount === v.inCount))) { - $s = -1; return false; - } - i = 0; - /* while (true) { */ case 20: - /* if (!(i < t.rtype.NumIn())) { break; } */ if(!(i < t.rtype.NumIn())) { $s = 21; continue; } - _r$3 = haveIdenticalType(t.rtype.In(i), v.rtype.In(i), cmpTags); /* */ $s = 24; case 24: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!_r$3) { */ case 22: - $s = -1; return false; - /* } */ case 23: - i = i + (1) >> 0; - $s = 20; continue; - case 21: - i$1 = 0; - /* while (true) { */ case 25: - /* if (!(i$1 < t.rtype.NumOut())) { break; } */ if(!(i$1 < t.rtype.NumOut())) { $s = 26; continue; } - _r$4 = haveIdenticalType(t.rtype.Out(i$1), v.rtype.Out(i$1), cmpTags); /* */ $s = 29; case 29: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!_r$4) { */ case 27: - $s = -1; return false; - /* } */ case 28: - i$1 = i$1 + (1) >> 0; - $s = 25; continue; - case 26: - $s = -1; return true; - /* } else if (_1 === (20)) { */ case 5: - t$1 = (T.kindType); - v$1 = (V.kindType); - if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) { - $s = -1; return true; - } - $s = -1; return false; - /* } else if (_1 === (21)) { */ case 6: - _r$5 = haveIdenticalType(T.Key(), V.Key(), cmpTags); /* */ $s = 31; case 31: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(_r$5)) { _v$3 = false; $s = 30; continue s; } - _r$6 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 32; case 32: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v$3 = _r$6; case 30: - $24r$2 = _v$3; - $s = 33; case 33: return $24r$2; - /* } else if ((_1 === (22)) || (_1 === (23))) { */ case 7: - _r$7 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 34; case 34: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$3 = _r$7; - $s = 35; case 35: return $24r$3; - /* } else if (_1 === (25)) { */ case 8: - t$2 = (T.kindType); - v$2 = (V.kindType); - if (!((t$2.fields.$length === v$2.fields.$length))) { - $s = -1; return false; - } - if (!($clone(t$2.pkgPath, name).name() === $clone(v$2.pkgPath, name).name())) { - $s = -1; return false; - } - _ref = t$2.fields; - _i = 0; - /* while (true) { */ case 36: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 37; continue; } - i$2 = _i; - tf = (x = t$2.fields, ((i$2 < 0 || i$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$2])); - vf = (x$1 = v$2.fields, ((i$2 < 0 || i$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$2])); - if (!($clone(tf.name, name).name() === $clone(vf.name, name).name())) { - $s = -1; return false; - } - _r$8 = haveIdenticalType(tf.typ, vf.typ, cmpTags); /* */ $s = 40; case 40: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!_r$8) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (!_r$8) { */ case 38: - $s = -1; return false; - /* } */ case 39: - if (cmpTags && !($clone(tf.name, name).tag() === $clone(vf.name, name).tag())) { - $s = -1; return false; - } - if (!((tf.offsetEmbed === vf.offsetEmbed))) { - $s = -1; return false; - } - _i++; - $s = 36; continue; - case 37: - $s = -1; return true; - /* } */ case 9: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: haveIdenticalUnderlyingType, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _v, _v$1, _v$2, _v$3, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s};return $f; - }; - toType = function(t) { - var t; - if (t === ptrType$1.nil) { - return $ifaceNil; - } - return t; - }; - ifaceIndir = function(t) { - var t; - return ((t.kind & 32) >>> 0) === 0; - }; - Value.ptr.prototype.object = function() { - var _1, newVal, v, val; - v = this; - if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) { - return v.ptr; - } - if (!((((v.flag & 128) >>> 0) === 0))) { - val = v.ptr.$get(); - if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) { - switch (0) { default: - _1 = v.typ.Kind(); - if ((_1 === (11)) || (_1 === (6))) { - val = new (jsType(v.typ))(val.$high, val.$low); - } else if ((_1 === (15)) || (_1 === (16))) { - val = new (jsType(v.typ))(val.$real, val.$imag); - } else if (_1 === (23)) { - if (val === val.constructor.nil) { - val = jsType(v.typ).nil; - break; - } - newVal = new (jsType(v.typ))(val.$array); - newVal.$offset = val.$offset; - newVal.$length = val.$length; - newVal.$capacity = val.$capacity; - val = newVal; - } - } - } - return val; - } - return v.ptr; - }; - Value.prototype.object = function() { return this.$val.object(); }; - Value.ptr.prototype.assignTo = function(context, dst, target) { - var {_r, _r$1, _r$2, context, dst, fl, target, v, x, $s, $r, $c} = $restore(this, {context, dst, target}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1: - _r = makeMethodValue(context, $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Value.copy(v, _r); - /* } */ case 2: - _r$1 = directlyAssignable(dst, v.typ); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 5; continue; } - /* */ if (implements$1(dst, v.typ)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$1) { */ case 5: - fl = (((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0; - fl = (fl | (((dst.Kind() >>> 0)))) >>> 0; - $s = -1; return new Value.ptr(dst, v.ptr, fl); - /* } else if (implements$1(dst, v.typ)) { */ case 6: - if (target === 0) { - target = unsafe_New(dst); - } - _r$2 = valueInterface($clone(v, Value)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - x = _r$2; - if (dst.NumMethod() === 0) { - (target).$set(x); - } else { - ifaceE2I(dst, x, target); - } - $s = -1; return new Value.ptr(dst, target, 148); - /* } */ case 7: - case 4: - $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String())); - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.assignTo, $c: true, $r, _r, _r$1, _r$2, context, dst, fl, target, v, x, $s};return $f; - }; - Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); }; - Value.ptr.prototype.Cap = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (17)) { - return v.typ.Len(); - } else if ((_1 === (18)) || (_1 === (23))) { - return $parseInt($clone(v, Value).object().$capacity) >> 0; - } - $panic(new ValueError.ptr("reflect.Value.Cap", k)); - }; - Value.prototype.Cap = function() { return this.$val.Cap(); }; - Value.ptr.prototype.Index = function(i) { - var {$24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - a$1 = [a$1]; - c = [c]; - i = [i]; - typ = [typ]; - typ$1 = [typ$1]; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - /* */ if (_1 === (17)) { $s = 2; continue; } - /* */ if (_1 === (23)) { $s = 3; continue; } - /* */ if (_1 === (24)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (17)) { */ case 2: - tt = (v.typ.kindType); - if (i[0] < 0 || i[0] > ((tt.len >> 0))) { - $panic(new $String("reflect: array index out of range")); - } - typ[0] = tt.elem; - fl = (((((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0; - a[0] = v.ptr; - /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 7: - $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(a, a$1, c, i, typ, typ$1) { return function() { - return wrapJsObject(typ[0], a[0][i[0]]); - }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) { - var x; - a[0][i[0]] = unwrapJsObject(typ[0], x); - }; })(a, a$1, c, i, typ, typ$1))), fl); - /* } */ case 8: - _r = makeValue(typ[0], wrapJsObject(typ[0], a[0][i[0]]), fl); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 10; case 10: return $24r; - /* } else if (_1 === (23)) { */ case 3: - s = $clone(v, Value).object(); - if (i[0] < 0 || i[0] >= ($parseInt(s.$length) >> 0)) { - $panic(new $String("reflect: slice index out of range")); - } - tt$1 = (v.typ.kindType); - typ$1[0] = tt$1.elem; - fl$1 = (((384 | new flag(v.flag).ro()) >>> 0) | ((typ$1[0].Kind() >>> 0))) >>> 0; - i[0] = i[0] + (($parseInt(s.$offset) >> 0)) >> 0; - a$1[0] = s.$array; - /* */ if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { */ case 11: - $s = -1; return new Value.ptr(typ$1[0], (new (jsType(PtrTo(typ$1[0])))((function(a, a$1, c, i, typ, typ$1) { return function() { - return wrapJsObject(typ$1[0], a$1[0][i[0]]); - }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) { - var x; - a$1[0][i[0]] = unwrapJsObject(typ$1[0], x); - }; })(a, a$1, c, i, typ, typ$1))), fl$1); - /* } */ case 12: - _r$1 = makeValue(typ$1[0], wrapJsObject(typ$1[0], a$1[0][i[0]]), fl$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 14; case 14: return $24r$1; - /* } else if (_1 === (24)) { */ case 4: - str = (v.ptr).$get(); - if (i[0] < 0 || i[0] >= str.length) { - $panic(new $String("reflect: string index out of range")); - } - fl$2 = (((new flag(v.flag).ro() | 8) >>> 0) | 128) >>> 0; - c[0] = str.charCodeAt(i[0]); - $s = -1; return new Value.ptr(uint8Type, ((c.$ptr || (c.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, c)))), fl$2); - /* } else { */ case 5: - $panic(new ValueError.ptr("reflect.Value.Index", k)); - /* } */ case 6: - case 1: - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Index, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s};return $f; - }; - Value.prototype.Index = function(i) { return this.$val.Index(i); }; - Value.ptr.prototype.InterfaceData = function() { - var v; - v = this; - $panic(new $String("InterfaceData is not supported by GopherJS")); - }; - Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); }; - Value.ptr.prototype.IsNil = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (22)) || (_1 === (23))) { - return $clone(v, Value).object() === jsType(v.typ).nil; - } else if (_1 === (18)) { - return $clone(v, Value).object() === $chanNil; - } else if (_1 === (19)) { - return $clone(v, Value).object() === $throwNilPointerError; - } else if (_1 === (21)) { - return $clone(v, Value).object() === false; - } else if (_1 === (20)) { - return $clone(v, Value).object() === $ifaceNil; - } else if (_1 === (26)) { - return $clone(v, Value).object() === 0; - } else { - $panic(new ValueError.ptr("reflect.Value.IsNil", k)); - } - }; - Value.prototype.IsNil = function() { return this.$val.IsNil(); }; - Value.ptr.prototype.Len = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (17)) || (_1 === (24))) { - return $parseInt($clone(v, Value).object().length); - } else if (_1 === (23)) { - return $parseInt($clone(v, Value).object().$length) >> 0; - } else if (_1 === (18)) { - return $parseInt($clone(v, Value).object().$buffer.length) >> 0; - } else if (_1 === (21)) { - return $parseInt($keys($clone(v, Value).object()).length); - } else { - $panic(new ValueError.ptr("reflect.Value.Len", k)); - } - }; - Value.prototype.Len = function() { return this.$val.Len(); }; - Value.ptr.prototype.Pointer = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (18)) || (_1 === (21)) || (_1 === (22)) || (_1 === (26))) { - if ($clone(v, Value).IsNil()) { - return 0; - } - return $clone(v, Value).object(); - } else if (_1 === (19)) { - if ($clone(v, Value).IsNil()) { - return 0; - } - return 1; - } else if (_1 === (23)) { - if ($clone(v, Value).IsNil()) { - return 0; - } - return $clone(v, Value).object().$array; - } else { - $panic(new ValueError.ptr("reflect.Value.Pointer", k)); - } - }; - Value.prototype.Pointer = function() { return this.$val.Pointer(); }; - Value.ptr.prototype.Set = function(x) { - var {_1, _r, _r$1, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(x.flag).mustBeExported(); - _r = $clone(x, Value).assignTo("reflect.Set", v.typ, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Value.copy(x, _r); - /* */ if (!((((v.flag & 128) >>> 0) === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((((v.flag & 128) >>> 0) === 0))) { */ case 2: - _1 = v.typ.Kind(); - /* */ if (_1 === (17)) { $s = 5; continue; } - /* */ if (_1 === (20)) { $s = 6; continue; } - /* */ if (_1 === (25)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (17)) { */ case 5: - jsType(v.typ).copy(v.ptr, x.ptr); - $s = 9; continue; - /* } else if (_1 === (20)) { */ case 6: - _r$1 = valueInterface($clone(x, Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v.ptr.$set(_r$1); - $s = 9; continue; - /* } else if (_1 === (25)) { */ case 7: - copyStruct(v.ptr, x.ptr, v.typ); - $s = 9; continue; - /* } else { */ case 8: - v.ptr.$set($clone(x, Value).object()); - /* } */ case 9: - case 4: - $s = -1; return; - /* } */ case 3: - v.ptr = x.ptr; - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Set, $c: true, $r, _1, _r, _r$1, v, x, $s};return $f; - }; - Value.prototype.Set = function(x) { return this.$val.Set(x); }; - Value.ptr.prototype.SetBytes = function(x) { - var {_r, _r$1, _v, slice, typedSlice, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 8))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 8))) { */ case 1: - $panic(new $String("reflect.Value.SetBytes of non-byte slice")); - /* } */ case 2: - slice = x; - if (!(v.typ.Name() === "")) { _v = true; $s = 6; continue s; } - _r$1 = v.typ.Elem().Name(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !(_r$1 === ""); case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - typedSlice = new (jsType(v.typ))(slice.$array); - typedSlice.$offset = slice.$offset; - typedSlice.$length = slice.$length; - typedSlice.$capacity = slice.$capacity; - slice = typedSlice; - /* } */ case 5: - v.ptr.$set(slice); - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetBytes, $c: true, $r, _r, _r$1, _v, slice, typedSlice, v, x, $s};return $f; - }; - Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; - Value.ptr.prototype.SetCap = function(n) { - var n, newSlice, s, v; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - s = v.ptr.$get(); - if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) { - $panic(new $String("reflect: slice capacity out of range in SetCap")); - } - newSlice = new (jsType(v.typ))(s.$array); - newSlice.$offset = s.$offset; - newSlice.$length = s.$length; - newSlice.$capacity = n; - v.ptr.$set(newSlice); - }; - Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); }; - Value.ptr.prototype.SetLen = function(n) { - var n, newSlice, s, v; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - s = v.ptr.$get(); - if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) { - $panic(new $String("reflect: slice length out of range in SetLen")); - } - newSlice = new (jsType(v.typ))(s.$array); - newSlice.$offset = s.$offset; - newSlice.$length = n; - newSlice.$capacity = s.$capacity; - v.ptr.$set(newSlice); - }; - Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); }; - Value.ptr.prototype.Slice = function(i, j) { - var {$24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - cap = 0; - typ = $ifaceNil; - s = null; - kind = new flag(v.flag).kind(); - _1 = kind; - /* */ if (_1 === (17)) { $s = 2; continue; } - /* */ if (_1 === (23)) { $s = 3; continue; } - /* */ if (_1 === (24)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (17)) { */ case 2: - if (((v.flag & 256) >>> 0) === 0) { - $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); - } - tt = (v.typ.kindType); - cap = ((tt.len >> 0)); - typ = SliceOf(tt.elem); - s = new (jsType(typ))($clone(v, Value).object()); - $s = 6; continue; - /* } else if (_1 === (23)) { */ case 3: - typ = v.typ; - s = $clone(v, Value).object(); - cap = $parseInt(s.$capacity) >> 0; - $s = 6; continue; - /* } else if (_1 === (24)) { */ case 4: - str = (v.ptr).$get(); - if (i < 0 || j < i || j > str.length) { - $panic(new $String("reflect.Value.Slice: string slice index out of bounds")); - } - _r = ValueOf(new $String($substring(str, i, j))); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 8; case 8: return $24r; - /* } else { */ case 5: - $panic(new ValueError.ptr("reflect.Value.Slice", kind)); - /* } */ case 6: - case 1: - if (i < 0 || j < i || j > cap) { - $panic(new $String("reflect.Value.Slice: slice index out of bounds")); - } - _r$1 = makeValue(typ, $subslice(s, i, j), new flag(v.flag).ro()); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 10; case 10: return $24r$1; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s};return $f; - }; - Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); }; - Value.ptr.prototype.Slice3 = function(i, j, k) { - var {$24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s, $r, $c} = $restore(this, {i, j, k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - cap = 0; - typ = $ifaceNil; - s = null; - kind = new flag(v.flag).kind(); - _1 = kind; - if (_1 === (17)) { - if (((v.flag & 256) >>> 0) === 0) { - $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); - } - tt = (v.typ.kindType); - cap = ((tt.len >> 0)); - typ = SliceOf(tt.elem); - s = new (jsType(typ))($clone(v, Value).object()); - } else if (_1 === (23)) { - typ = v.typ; - s = $clone(v, Value).object(); - cap = $parseInt(s.$capacity) >> 0; - } else { - $panic(new ValueError.ptr("reflect.Value.Slice3", kind)); - } - if (i < 0 || j < i || k < j || k > cap) { - $panic(new $String("reflect.Value.Slice3: slice index out of bounds")); - } - _r = makeValue(typ, $subslice(s, i, j, k), new flag(v.flag).ro()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice3, $c: true, $r, $24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s};return $f; - }; - Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); }; - Value.ptr.prototype.Close = function() { - var v; - v = this; - new flag(v.flag).mustBe(18); - new flag(v.flag).mustBeExported(); - $close($clone(v, Value).object()); - }; - Value.prototype.Close = function() { return this.$val.Close(); }; - Value.ptr.prototype.Elem = function() { - var {$24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - k = new flag(v.flag).kind(); - _1 = k; - /* */ if (_1 === (20)) { $s = 2; continue; } - /* */ if (_1 === (22)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (20)) { */ case 2: - val = $clone(v, Value).object(); - if (val === $ifaceNil) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - typ = reflectType(val.constructor); - _r = makeValue(typ, val.$val, new flag(v.flag).ro()); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if (_1 === (22)) { */ case 3: - if ($clone(v, Value).IsNil()) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - val$1 = $clone(v, Value).object(); - tt = (v.typ.kindType); - fl = (((((v.flag & 96) >>> 0) | 128) >>> 0) | 256) >>> 0; - fl = (fl | (((tt.elem.Kind() >>> 0)))) >>> 0; - $s = -1; return new Value.ptr(tt.elem, (wrapJsObject(tt.elem, val$1)), fl); - /* } else { */ case 4: - $panic(new ValueError.ptr("reflect.Value.Elem", k)); - /* } */ case 5: - case 1: - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Elem, $c: true, $r, $24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s};return $f; - }; - Value.prototype.Elem = function() { return this.$val.Elem(); }; - Value.ptr.prototype.NumField = function() { - var tt, v; - v = this; - new flag(v.flag).mustBe(25); - tt = (v.typ.kindType); - return tt.fields.$length; - }; - Value.prototype.NumField = function() { return this.$val.NumField(); }; - Value.ptr.prototype.MapKeys = function() { - var {_r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(21); - tt = (v.typ.kindType); - keyType = tt.key; - fl = (new flag(v.flag).ro() | ((keyType.Kind() >>> 0))) >>> 0; - m = $clone(v, Value).pointer(); - mlen = 0; - if (!(m === 0)) { - mlen = maplen(m); - } - it = mapiterinit(v.typ, m); - a = $makeSlice(sliceType$6, mlen); - i = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < a.$length)) { break; } */ if(!(i < a.$length)) { $s = 2; continue; } - _r = mapiterkey(it); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - key = _r; - if (key === 0) { - /* break; */ $s = 2; continue; - } - Value.copy(((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]), copyVal(keyType, fl, key)); - mapiternext(it); - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return $subslice(a, 0, i); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapKeys, $c: true, $r, _r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s};return $f; - }; - Value.prototype.MapKeys = function() { return this.$val.MapKeys(); }; - Value.ptr.prototype.MapIndex = function(key) { - var {_r, e, fl, k, key, tt, typ, v, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(21); - tt = (v.typ.kindType); - _r = $clone(key, Value).assignTo("reflect.Value.MapIndex", tt.key, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Value.copy(key, _r); - k = 0; - if (!((((key.flag & 128) >>> 0) === 0))) { - k = key.ptr; - } else { - k = ((key.$ptr_ptr || (key.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key)))); - } - e = mapaccess(v.typ, $clone(v, Value).pointer(), k); - if (e === 0) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - typ = tt.elem; - fl = new flag((((v.flag | key.flag) >>> 0))).ro(); - fl = (fl | (((typ.Kind() >>> 0)))) >>> 0; - $s = -1; return copyVal(typ, fl, e); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapIndex, $c: true, $r, _r, e, fl, k, key, tt, typ, v, $s};return $f; - }; - Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); }; - Value.ptr.prototype.Field = function(i) { - var {$24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - jsTag = [jsTag]; - prop = [prop]; - s = [s]; - typ = [typ]; - v = this; - if (!((new flag(v.flag).kind() === 25))) { - $panic(new ValueError.ptr("reflect.Value.Field", new flag(v.flag).kind())); - } - tt = (v.typ.kindType); - if (((i >>> 0)) >= ((tt.fields.$length >>> 0))) { - $panic(new $String("reflect: Field index out of range")); - } - prop[0] = $internalize(jsType(v.typ).fields[i].prop, $String); - field = (x = tt.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - typ[0] = field.typ; - fl = (((v.flag & 416) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0; - if (!$clone(field.name, name).isExported()) { - if (field.embedded()) { - fl = (fl | (64)) >>> 0; - } else { - fl = (fl | (32)) >>> 0; - } - } - tag = $clone((x$1 = tt.fields, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).name, name).tag(); - /* */ if (!(tag === "") && !((i === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(tag === "") && !((i === 0))) { */ case 1: - jsTag[0] = getJsTag(tag); - /* */ if (!(jsTag[0] === "")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(jsTag[0] === "")) { */ case 3: - /* while (true) { */ case 5: - o = [o]; - _r = $clone(v, Value).Field(0); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Value.copy(v, _r); - /* */ if (v.typ === jsObjectPtr) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (v.typ === jsObjectPtr) { */ case 8: - o[0] = $clone(v, Value).object().object; - $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, o, prop, s, typ) { return function() { - return $internalize(o[0][$externalize(jsTag[0], $String)], jsType(typ[0])); - }; })(jsTag, o, prop, s, typ), (function(jsTag, o, prop, s, typ) { return function(x$2) { - var x$2; - o[0][$externalize(jsTag[0], $String)] = $externalize(x$2, jsType(typ[0])); - }; })(jsTag, o, prop, s, typ))), fl); - /* } */ case 9: - /* */ if (v.typ.Kind() === 22) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (v.typ.Kind() === 22) { */ case 10: - _r$1 = $clone(v, Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Value.copy(v, _r$1); - /* } */ case 11: - $s = 5; continue; - case 6: - /* } */ case 4: - /* } */ case 2: - s[0] = v.ptr; - /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 13: - $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, prop, s, typ) { return function() { - return wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]); - }; })(jsTag, prop, s, typ), (function(jsTag, prop, s, typ) { return function(x$2) { - var x$2; - s[0][$externalize(prop[0], $String)] = unwrapJsObject(typ[0], x$2); - }; })(jsTag, prop, s, typ))), fl); - /* } */ case 14: - _r$2 = makeValue(typ[0], wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]), fl); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 16; case 16: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Field, $c: true, $r, $24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s};return $f; - }; - Value.prototype.Field = function(i) { return this.$val.Field(i); }; - errorString.ptr.prototype.Error = function() { - var e; - e = this; - return e.s; - }; - errorString.prototype.Error = function() { return this.$val.Error(); }; - unquote = function(s) { - var s; - if (s.length < 2) { - return [s, $ifaceNil]; - } - if ((s.charCodeAt(0) === 39) || (s.charCodeAt(0) === 34)) { - if (s.charCodeAt((s.length - 1 >> 0)) === s.charCodeAt(0)) { - return [$substring(s, 1, (s.length - 1 >> 0)), $ifaceNil]; - } - return ["", $pkg.ErrSyntax]; - } - return [s, $ifaceNil]; - }; - flag.prototype.mustBe = function(expected) { - var expected, f; - f = this.$val; - if (!((((((f & 31) >>> 0) >>> 0)) === expected))) { - $panic(new ValueError.ptr(methodName(), new flag(f).kind())); - } - }; - $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); }; - rtype.ptr.prototype.Comparable = function() { - var {$24r, _1, _r, _r$1, ft, i, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _1 = t.Kind(); - /* */ if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { $s = 2; continue; } - /* */ if (_1 === (17)) { $s = 3; continue; } - /* */ if (_1 === (25)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { */ case 2: - $s = -1; return false; - /* } else if (_1 === (17)) { */ case 3: - _r = t.Elem().Comparable(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if (_1 === (25)) { */ case 4: - i = 0; - /* while (true) { */ case 8: - /* if (!(i < t.NumField())) { break; } */ if(!(i < t.NumField())) { $s = 9; continue; } - ft = $clone(t.Field(i), structField); - _r$1 = ft.typ.Comparable(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$1) { */ case 10: - $s = -1; return false; - /* } */ case 11: - i = i + (1) >> 0; - $s = 8; continue; - case 9: - /* } */ case 5: - case 1: - $s = -1; return true; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Comparable, $c: true, $r, $24r, _1, _r, _r$1, ft, i, t, $s};return $f; - }; - rtype.prototype.Comparable = function() { return this.$val.Comparable(); }; - rtype.ptr.prototype.IsVariadic = function() { - var t, tt; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: IsVariadic of non-func type")); - } - tt = (t.kindType); - return !((((tt.outCount & 32768) >>> 0) === 0)); - }; - rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); }; - rtype.ptr.prototype.Field = function(i) { - var i, t, tt, x; - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: Field of non-struct type")); - } - tt = (t.kindType); - if (i < 0 || i >= tt.fields.$length) { - $panic(new $String("reflect: Field index out of bounds")); - } - return (x = tt.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - rtype.prototype.Field = function(i) { return this.$val.Field(i); }; - rtype.ptr.prototype.Key = function() { - var t, tt; - t = this; - if (!((t.Kind() === 21))) { - $panic(new $String("reflect: Key of non-map type")); - } - tt = (t.kindType); - return toType(tt.key); - }; - rtype.prototype.Key = function() { return this.$val.Key(); }; - rtype.ptr.prototype.NumField = function() { - var t, tt; - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: NumField of non-struct type")); - } - tt = (t.kindType); - return tt.fields.$length; - }; - rtype.prototype.NumField = function() { return this.$val.NumField(); }; - rtype.ptr.prototype.Method = function(i) { - var {$24r, _i, _i$1, _r, _r$1, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - prop = [prop]; - m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - t = this; - /* */ if (t.Kind() === 20) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (t.Kind() === 20) { */ case 1: - tt = (t.kindType); - _r = tt.rtype.Method(i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Method.copy(m, _r); - $24r = m; - $s = 4; case 4: return $24r; - /* } */ case 2: - methods = t.exportedMethods(); - if (i < 0 || i >= methods.$length) { - $panic(new $String("reflect: Method index out of range")); - } - p = $clone(((i < 0 || i >= methods.$length) ? ($throwRuntimeError("index out of range"), undefined) : methods.$array[methods.$offset + i]), method); - pname = $clone(t.nameOff(p.name), name); - m.Name = $clone(pname, name).name(); - fl = 19; - mtyp = t.typeOff(p.mtyp); - ft = (mtyp.kindType); - in$1 = $makeSlice(sliceType$7, 0, (1 + ft.in$().$length >> 0)); - in$1 = $append(in$1, t); - _ref = ft.in$(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - in$1 = $append(in$1, arg); - _i++; - } - out = $makeSlice(sliceType$7, 0, ft.out().$length); - _ref$1 = ft.out(); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - ret = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - out = $append(out, ret); - _i$1++; - } - _r$1 = FuncOf(in$1, out, ft.rtype.IsVariadic()); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - mt = _r$1; - m.Type = mt; - prop[0] = $internalize($methodSet(t[$externalize(idJsType, $String)])[i].prop, $String); - fn = js.MakeFunc((function(prop) { return function(this$1, arguments$1) { - var arguments$1, rcvr, this$1; - rcvr = (0 >= arguments$1.$length ? ($throwRuntimeError("index out of range"), undefined) : arguments$1.$array[arguments$1.$offset + 0]); - return new $jsObjectPtr(rcvr[$externalize(prop[0], $String)].apply(rcvr, $externalize($subslice(arguments$1, 1), sliceType$8))); - }; })(prop)); - Value.copy(m.Func, new Value.ptr($assertType(mt, ptrType$1), (fn), fl)); - m.Index = i; - Method.copy(m, m); - $s = -1; return m; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Method, $c: true, $r, $24r, _i, _i$1, _r, _r$1, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s};return $f; - }; - rtype.prototype.Method = function(i) { return this.$val.Method(i); }; - Swapper = function(slice) { - var {_1, _r, a, off, slice, v, vLen, $s, $r, $c} = $restore(this, {slice}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - off = [off]; - vLen = [vLen]; - _r = ValueOf(slice); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = $clone(_r, Value); - if (!(($clone(v, Value).Kind() === 23))) { - $panic(new ValueError.ptr("Swapper", $clone(v, Value).Kind())); - } - vLen[0] = (($clone(v, Value).Len() >>> 0)); - _1 = vLen[0]; - if (_1 === (0)) { - $s = -1; return (function(a, off, vLen) { return function(i, j) { - var i, j; - $panic(new $String("reflect: slice index out of range")); - }; })(a, off, vLen); - } else if (_1 === (1)) { - $s = -1; return (function(a, off, vLen) { return function(i, j) { - var i, j; - if (!((i === 0)) || !((j === 0))) { - $panic(new $String("reflect: slice index out of range")); - } - }; })(a, off, vLen); - } - a[0] = slice.$array; - off[0] = $parseInt(slice.$offset) >> 0; - $s = -1; return (function(a, off, vLen) { return function(i, j) { - var i, j, tmp; - if (((i >>> 0)) >= vLen[0] || ((j >>> 0)) >= vLen[0]) { - $panic(new $String("reflect: slice index out of range")); - } - i = i + (off[0]) >> 0; - j = j + (off[0]) >> 0; - tmp = a[0][i]; - a[0][i] = a[0][j]; - a[0][j] = tmp; - }; })(a, off, vLen); - /* */ } return; } var $f = {$blk: Swapper, $c: true, $r, _1, _r, a, off, slice, v, vLen, $s};return $f; - }; - $pkg.Swapper = Swapper; - init = function() { - var {used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - used = (function(i) { - var i; - }); - $r = used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$1 = new uncommonType.ptr(0, 0, 0, 0, sliceType$5.nil), new x$1.constructor.elem(x$1))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$2 = new method.ptr(0, 0, 0, 0), new x$2.constructor.elem(x$2))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$3 = new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$4 = new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$5 = new funcType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), 0, 0, sliceType$2.nil, sliceType$2.nil), new x$5.constructor.elem(x$5))); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$6 = new interfaceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), new name.ptr(ptrType$6.nil), sliceType$9.nil), new x$6.constructor.elem(x$6))); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$7 = new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$8 = new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil), new x$8.constructor.elem(x$8))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$9 = new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), ptrType$1.nil), new x$9.constructor.elem(x$9))); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$10 = new structType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), new name.ptr(ptrType$6.nil), sliceType$10.nil), new x$10.constructor.elem(x$10))); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$11 = new imethod.ptr(0, 0), new x$11.constructor.elem(x$11))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$12 = new structField.ptr(new name.ptr(ptrType$6.nil), ptrType$1.nil, 0), new x$12.constructor.elem(x$12))); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - initialized = true; - uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - jsType = function(typ) { - var typ; - return typ[$externalize(idJsType, $String)]; - }; - reflectType = function(typ) { - var _1, _i, _i$1, _i$2, _i$3, _key, _ref, _ref$1, _ref$2, _ref$3, dir, exported, exported$1, f, fields, i, i$1, i$2, i$3, i$4, i$5, imethods, in$1, m, m$1, m$2, methodSet, methods, offsetEmbed, out, outCount, params, reflectFields, reflectMethods, results, rt, typ, ut, xcount; - if (typ[$externalize(idReflectType, $String)] === undefined) { - rt = new rtype.ptr(((($parseInt(typ.size) >> 0) >>> 0)), 0, 0, 0, 0, 0, ((($parseInt(typ.kind) >> 0) << 24 >>> 24)), $throwNilPointerError, ptrType$6.nil, newNameOff($clone(newName(internalStr(typ.string), "", !!(typ.exported)), name)), 0); - rt[$externalize(idJsType, $String)] = typ; - typ[$externalize(idReflectType, $String)] = rt; - methodSet = $methodSet(typ); - if (!(($parseInt(methodSet.length) === 0)) || !!(typ.named)) { - rt.tflag = (rt.tflag | (1)) >>> 0; - if (!!(typ.named)) { - rt.tflag = (rt.tflag | (4)) >>> 0; - } - reflectMethods = sliceType$5.nil; - i = 0; - while (true) { - if (!(i < $parseInt(methodSet.length))) { break; } - m = methodSet[i]; - exported = internalStr(m.pkg) === ""; - if (!exported) { - i = i + (1) >> 0; - continue; - } - reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newName(internalStr(m.name), "", exported), name)), newTypeOff(reflectType(m.typ)), 0, 0)); - i = i + (1) >> 0; - } - xcount = ((reflectMethods.$length << 16 >>> 16)); - i$1 = 0; - while (true) { - if (!(i$1 < $parseInt(methodSet.length))) { break; } - m$1 = methodSet[i$1]; - exported$1 = internalStr(m$1.pkg) === ""; - if (exported$1) { - i$1 = i$1 + (1) >> 0; - continue; - } - reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newName(internalStr(m$1.name), "", exported$1), name)), newTypeOff(reflectType(m$1.typ)), 0, 0)); - i$1 = i$1 + (1) >> 0; - } - ut = new uncommonType.ptr(newNameOff($clone(newName(internalStr(typ.pkg), "", false), name)), (($parseInt(methodSet.length) << 16 >>> 16)), xcount, 0, reflectMethods); - _key = rt; (uncommonTypeMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: ut }; - ut[$externalize(idJsType, $String)] = typ; - } - _1 = rt.Kind(); - if (_1 === (17)) { - setKindType(rt, new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem), ptrType$1.nil, ((($parseInt(typ.len) >> 0) >>> 0)))); - } else if (_1 === (18)) { - dir = 3; - if (!!(typ.sendOnly)) { - dir = 2; - } - if (!!(typ.recvOnly)) { - dir = 1; - } - setKindType(rt, new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem), ((dir >>> 0)))); - } else if (_1 === (19)) { - params = typ.params; - in$1 = $makeSlice(sliceType$2, $parseInt(params.length)); - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i$2 = _i; - ((i$2 < 0 || i$2 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + i$2] = reflectType(params[i$2])); - _i++; - } - results = typ.results; - out = $makeSlice(sliceType$2, $parseInt(results.length)); - _ref$1 = out; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$3 = _i$1; - ((i$3 < 0 || i$3 >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i$3] = reflectType(results[i$3])); - _i$1++; - } - outCount = (($parseInt(results.length) << 16 >>> 16)); - if (!!(typ.variadic)) { - outCount = (outCount | (32768)) >>> 0; - } - setKindType(rt, new funcType.ptr($clone(rt, rtype), (($parseInt(params.length) << 16 >>> 16)), outCount, in$1, out)); - } else if (_1 === (20)) { - methods = typ.methods; - imethods = $makeSlice(sliceType$9, $parseInt(methods.length)); - _ref$2 = imethods; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - i$4 = _i$2; - m$2 = methods[i$4]; - imethod.copy(((i$4 < 0 || i$4 >= imethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : imethods.$array[imethods.$offset + i$4]), new imethod.ptr(newNameOff($clone(newName(internalStr(m$2.name), "", internalStr(m$2.pkg) === ""), name)), newTypeOff(reflectType(m$2.typ)))); - _i$2++; - } - setKindType(rt, new interfaceType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkg), "", false), name), imethods)); - } else if (_1 === (21)) { - setKindType(rt, new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0)); - } else if (_1 === (22)) { - setKindType(rt, new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem))); - } else if (_1 === (23)) { - setKindType(rt, new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0), reflectType(typ.elem))); - } else if (_1 === (25)) { - fields = typ.fields; - reflectFields = $makeSlice(sliceType$10, $parseInt(fields.length)); - _ref$3 = reflectFields; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - i$5 = _i$3; - f = fields[i$5]; - offsetEmbed = ((i$5 >>> 0)) << 1 >>> 0; - if (!!(f.embedded)) { - offsetEmbed = (offsetEmbed | (1)) >>> 0; - } - structField.copy(((i$5 < 0 || i$5 >= reflectFields.$length) ? ($throwRuntimeError("index out of range"), undefined) : reflectFields.$array[reflectFields.$offset + i$5]), new structField.ptr($clone(newName(internalStr(f.name), internalStr(f.tag), !!(f.exported)), name), reflectType(f.typ), offsetEmbed)); - _i$3++; - } - setKindType(rt, new structType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkgPath), "", false), name), reflectFields)); - } - } - return ((typ[$externalize(idReflectType, $String)])); - }; - setKindType = function(rt, kindType) { - var kindType, rt; - rt[$externalize(idKindType, $String)] = kindType; - kindType[$externalize(idRtype, $String)] = rt; - }; - uncommonType.ptr.prototype.methods = function() { - var t; - t = this; - return t._methods; - }; - uncommonType.prototype.methods = function() { return this.$val.methods(); }; - uncommonType.ptr.prototype.exportedMethods = function() { - var t; - t = this; - return $subslice(t._methods, 0, t.xcount, t.xcount); - }; - uncommonType.prototype.exportedMethods = function() { return this.$val.exportedMethods(); }; - rtype.ptr.prototype.uncommon = function() { - var _entry, t; - t = this; - return (_entry = uncommonTypeMap[ptrType$1.keyFor(t)], _entry !== undefined ? _entry.v : ptrType$4.nil); - }; - rtype.prototype.uncommon = function() { return this.$val.uncommon(); }; - funcType.ptr.prototype.in$ = function() { - var t; - t = this; - return t._in; - }; - funcType.prototype.in$ = function() { return this.$val.in$(); }; - funcType.ptr.prototype.out = function() { - var t; - t = this; - return t._out; - }; - funcType.prototype.out = function() { return this.$val.out(); }; - name.ptr.prototype.name = function() { - var _entry, n, s; - s = ""; - n = this; - s = (_entry = nameMap[ptrType$6.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$8.nil).name; - return s; - }; - name.prototype.name = function() { return this.$val.name(); }; - name.ptr.prototype.tag = function() { - var _entry, n, s; - s = ""; - n = this; - s = (_entry = nameMap[ptrType$6.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$8.nil).tag; - return s; - }; - name.prototype.tag = function() { return this.$val.tag(); }; - name.ptr.prototype.pkgPath = function() { - var n; - n = this; - return ""; - }; - name.prototype.pkgPath = function() { return this.$val.pkgPath(); }; - name.ptr.prototype.isExported = function() { - var _entry, n; - n = this; - return (_entry = nameMap[ptrType$6.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$8.nil).exported; - }; - name.prototype.isExported = function() { return this.$val.isExported(); }; - newName = function(n, tag, exported) { - var _key, b, exported, n, tag; - b = $newDataPointer(0, ptrType$6); - _key = b; (nameMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$6.keyFor(_key)] = { k: _key, v: new nameData.ptr(n, tag, exported) }; - return new name.ptr(b); - }; - rtype.ptr.prototype.nameOff = function(off) { - var off, t, x; - t = this; - return (x = ((off >> 0)), ((x < 0 || x >= nameOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : nameOffList.$array[nameOffList.$offset + x])); - }; - rtype.prototype.nameOff = function(off) { return this.$val.nameOff(off); }; - newNameOff = function(n) { - var i, n; - i = nameOffList.$length; - nameOffList = $append(nameOffList, n); - return ((i >> 0)); - }; - rtype.ptr.prototype.typeOff = function(off) { - var off, t, x; - t = this; - return (x = ((off >> 0)), ((x < 0 || x >= typeOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : typeOffList.$array[typeOffList.$offset + x])); - }; - rtype.prototype.typeOff = function(off) { return this.$val.typeOff(off); }; - newTypeOff = function(t) { - var i, t; - i = typeOffList.$length; - typeOffList = $append(typeOffList, t); - return ((i >> 0)); - }; - internalStr = function(strObj) { - var c, strObj; - c = new structType$2.ptr(""); - c.str = strObj; - return c.str; - }; - isWrapped = function(typ) { - var typ; - return !!(jsType(typ).wrapped); - }; - copyStruct = function(dst, src, typ) { - var dst, fields, i, prop, src, typ; - fields = jsType(typ).fields; - i = 0; - while (true) { - if (!(i < $parseInt(fields.length))) { break; } - prop = $internalize(fields[i].prop, $String); - dst[$externalize(prop, $String)] = src[$externalize(prop, $String)]; - i = i + (1) >> 0; - } - }; - makeValue = function(t, v, fl) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s, $r, $c} = $restore(this, {t, v, fl}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - rt = _r; - _r$1 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (_r$1 === 17) { _v$1 = true; $s = 5; continue s; } - _r$2 = t.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$1 = _r$2 === 25; case 5: - if (_v$1) { _v = true; $s = 4; continue s; } - _r$3 = t.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3 === 22; case 4: - /* */ if (_v) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_v) { */ case 2: - _r$4 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = new Value.ptr(rt, (v), (fl | ((_r$4 >>> 0))) >>> 0); - $s = 10; case 10: return $24r; - /* } */ case 3: - _r$5 = t.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = new Value.ptr(rt, ($newDataPointer(v, jsType(rt.ptrTo()))), (((fl | ((_r$5 >>> 0))) >>> 0) | 128) >>> 0); - $s = 12; case 12: return $24r$1; - /* */ } return; } var $f = {$blk: makeValue, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s};return $f; - }; - TypeOf = function(i) { - var i; - if (!initialized) { - return new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$6.nil, 0, 0); - } - if ($interfaceIsEqual(i, $ifaceNil)) { - return $ifaceNil; - } - return reflectType(i.constructor); - }; - $pkg.TypeOf = TypeOf; - ValueOf = function(i) { - var {$24r, _r, i, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(i, $ifaceNil)) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - _r = makeValue(reflectType(i.constructor), i.$val, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ValueOf, $c: true, $r, $24r, _r, i, $s};return $f; - }; - $pkg.ValueOf = ValueOf; - FuncOf = function(in$1, out, variadic) { - var {_i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s, $r, $c} = $restore(this, {in$1, out, variadic}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!(variadic)) { _v = false; $s = 3; continue s; } - if (in$1.$length === 0) { _v$1 = true; $s = 4; continue s; } - _r = (x = in$1.$length - 1 >> 0, ((x < 0 || x >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x])).Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v$1 = !((_r === 23)); case 4: - _v = _v$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $panic(new $String("reflect.FuncOf: last arg of variadic func must be slice")); - /* } */ case 2: - jsIn = $makeSlice(sliceType$8, in$1.$length); - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= jsIn.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsIn.$array[jsIn.$offset + i] = jsType(v)); - _i++; - } - jsOut = $makeSlice(sliceType$8, out.$length); - _ref$1 = out; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - ((i$1 < 0 || i$1 >= jsOut.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsOut.$array[jsOut.$offset + i$1] = jsType(v$1)); - _i$1++; - } - $s = -1; return reflectType($funcType($externalize(jsIn, sliceType$8), $externalize(jsOut, sliceType$8), $externalize(variadic, $Bool))); - /* */ } return; } var $f = {$blk: FuncOf, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s};return $f; - }; - $pkg.FuncOf = FuncOf; - rtype.ptr.prototype.ptrTo = function() { - var t; - t = this; - return reflectType($ptrType(jsType(t))); - }; - rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); }; - SliceOf = function(t) { - var t; - return reflectType($sliceType(jsType(t))); - }; - $pkg.SliceOf = SliceOf; - unsafe_New = function(typ) { - var _1, typ; - _1 = typ.Kind(); - if (_1 === (25)) { - return (new (jsType(typ).ptr)()); - } else if (_1 === (17)) { - return (jsType(typ).zero()); - } else { - return ($newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo()))); - } - }; - typedmemmove = function(t, dst, src) { - var dst, src, t; - dst.$set(src.$get()); - }; - keyFor = function(t, key) { - var k, key, kv, t; - kv = key; - if (!(kv.$get === undefined)) { - kv = kv.$get(); - } - k = $internalize(jsType(t.Key()).keyFor(kv), $String); - return [kv, k]; - }; - mapaccess = function(t, m, key) { - var _tuple, entry, k, key, m, t; - _tuple = keyFor(t, key); - k = _tuple[1]; - entry = m[$externalize(k, $String)]; - if (entry === undefined) { - return 0; - } - return ($newDataPointer(entry.v, jsType(PtrTo(t.Elem())))); - }; - mapIter.ptr.prototype.skipUntilValidKey = function() { - var iter, k; - iter = this; - while (true) { - if (!(iter.i < $parseInt(iter.keys.length))) { break; } - k = iter.keys[iter.i]; - if (!(iter.m[$externalize($internalize(k, $String), $String)] === undefined)) { - break; - } - iter.i = iter.i + (1) >> 0; - } - }; - mapIter.prototype.skipUntilValidKey = function() { return this.$val.skipUntilValidKey(); }; - mapiterinit = function(t, m) { - var m, t; - return (new mapIter.ptr(t, m, $keys(m), 0, null)); - }; - mapiterkey = function(it) { - var {$24r, _r, _r$1, _r$2, it, iter, k, kv, $s, $r, $c} = $restore(this, {it}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - iter = ($pointerOfStructConversion(it, ptrType$9)); - kv = null; - if (!(iter.last === null)) { - kv = iter.last; - } else { - iter.skipUntilValidKey(); - if (iter.i === $parseInt(iter.keys.length)) { - $s = -1; return 0; - } - k = iter.keys[iter.i]; - kv = iter.m[$externalize($internalize(k, $String), $String)]; - iter.last = kv; - } - _r = $assertType(iter.t, TypeEx).Key(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = PtrTo(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = jsType(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = ($newDataPointer(kv.k, _r$2)); - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: mapiterkey, $c: true, $r, $24r, _r, _r$1, _r$2, it, iter, k, kv, $s};return $f; - }; - mapiternext = function(it) { - var it, iter; - iter = ($pointerOfStructConversion(it, ptrType$9)); - iter.last = null; - iter.i = iter.i + (1) >> 0; - }; - maplen = function(m) { - var m; - return $parseInt($keys(m).length); - }; - methodReceiver = function(op, v, i) { - var _$12, fn, i, m, m$1, ms, op, prop, rcvr, t, tt, v, x; - _$12 = ptrType$1.nil; - t = ptrType$5.nil; - fn = 0; - prop = ""; - if (v.typ.Kind() === 20) { - tt = (v.typ.kindType); - if (i < 0 || i >= tt.methods.$length) { - $panic(new $String("reflect: internal error: invalid method index")); - } - m = (x = tt.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - if (!$clone(tt.rtype.nameOff(m.name), name).isExported()) { - $panic(new $String("reflect: " + op + " of unexported method")); - } - t = (tt.rtype.typeOff(m.typ).kindType); - prop = $clone(tt.rtype.nameOff(m.name), name).name(); - } else { - ms = v.typ.exportedMethods(); - if (((i >>> 0)) >= ((ms.$length >>> 0))) { - $panic(new $String("reflect: internal error: invalid method index")); - } - m$1 = $clone(((i < 0 || i >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + i]), method); - if (!$clone(v.typ.nameOff(m$1.name), name).isExported()) { - $panic(new $String("reflect: " + op + " of unexported method")); - } - t = (v.typ.typeOff(m$1.mtyp).kindType); - prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String); - } - rcvr = $clone(v, Value).object(); - if (isWrapped(v.typ)) { - rcvr = new (jsType(v.typ))(rcvr); - } - fn = (rcvr[$externalize(prop, $String)]); - return [_$12, t, fn]; - }; - valueInterface = function(v) { - var {_r, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (v.flag === 0) { - $panic(new ValueError.ptr("reflect.Value.Interface", 0)); - } - /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1: - _r = makeMethodValue("Interface", $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Value.copy(v, _r); - /* } */ case 2: - if (isWrapped(v.typ)) { - $s = -1; return ((new (jsType(v.typ))($clone(v, Value).object()))); - } - $s = -1; return (($clone(v, Value).object())); - /* */ } return; } var $f = {$blk: valueInterface, $c: true, $r, _r, v, $s};return $f; - }; - ifaceE2I = function(t, src, dst) { - var dst, src, t; - dst.$set(src); - }; - methodName = function() { - return "?FIXME?"; - }; - makeMethodValue = function(op, v) { - var {$24r, _r, _tuple, fn, fv, op, rcvr, v, $s, $r, $c} = $restore(this, {op, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fn = [fn]; - rcvr = [rcvr]; - if (((v.flag & 512) >>> 0) === 0) { - $panic(new $String("reflect: internal error: invalid use of makePartialFunc")); - } - _tuple = methodReceiver(op, $clone(v, Value), ((v.flag >> 0)) >> 10 >> 0); - fn[0] = _tuple[2]; - rcvr[0] = $clone(v, Value).object(); - if (isWrapped(v.typ)) { - rcvr[0] = new (jsType(v.typ))(rcvr[0]); - } - fv = js.MakeFunc((function(fn, rcvr) { return function(this$1, arguments$1) { - var arguments$1, this$1; - return new $jsObjectPtr(fn[0].apply(rcvr[0], $externalize(arguments$1, sliceType$8))); - }; })(fn, rcvr)); - _r = $clone(v, Value).Type().common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new Value.ptr(_r, (fv), (new flag(v.flag).ro() | 19) >>> 0); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: makeMethodValue, $c: true, $r, $24r, _r, _tuple, fn, fv, op, rcvr, v, $s};return $f; - }; - wrapJsObject = function(typ, val) { - var typ, val; - if ($interfaceIsEqual(typ, jsObjectPtr)) { - return new (jsType(jsObjectPtr))(val); - } - return val; - }; - unwrapJsObject = function(typ, val) { - var typ, val; - if ($interfaceIsEqual(typ, jsObjectPtr)) { - return val.object; - } - return val; - }; - getJsTag = function(tag) { - var _tuple, i, name$1, qvalue, tag, value; - while (true) { - if (!(!(tag === ""))) { break; } - i = 0; - while (true) { - if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; } - i = i + (1) >> 0; - } - tag = $substring(tag, i); - if (tag === "") { - break; - } - i = 0; - while (true) { - if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; } - i = i + (1) >> 0; - } - if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) { - break; - } - name$1 = ($substring(tag, 0, i)); - tag = $substring(tag, (i + 1 >> 0)); - i = 1; - while (true) { - if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; } - if (tag.charCodeAt(i) === 92) { - i = i + (1) >> 0; - } - i = i + (1) >> 0; - } - if (i >= tag.length) { - break; - } - qvalue = ($substring(tag, 0, (i + 1 >> 0))); - tag = $substring(tag, (i + 1 >> 0)); - if (name$1 === "js") { - _tuple = unquote(qvalue); - value = _tuple[0]; - return value; - } - } - return ""; - }; - PtrTo = function(t) { - var t; - return $assertType(t, ptrType$1).ptrTo(); - }; - $pkg.PtrTo = PtrTo; - copyVal = function(typ, fl, ptr) { - var c, fl, ptr, typ; - if (ifaceIndir(typ)) { - c = unsafe_New(typ); - typedmemmove(typ, c, ptr); - return new Value.ptr(typ, c, (fl | 128) >>> 0); - } - return new Value.ptr(typ, (ptr).$get(), fl); - }; - Value.methods = [{prop: "pointer", name: "pointer", pkg: "internal/reflectlite", typ: $funcType([], [$UnsafePointer], false)}, {prop: "CanSet", name: "CanSet", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "numMethod", name: "numMethod", pkg: "internal/reflectlite", typ: $funcType([], [$Int], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "object", name: "object", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$2], false)}, {prop: "assignTo", name: "assignTo", pkg: "internal/reflectlite", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "call", name: "call", pkg: "internal/reflectlite", typ: $funcType([$String, sliceType$6], [sliceType$6], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$2], false)}, {prop: "IsNil", name: "IsNil", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Pointer", name: "Pointer", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([Value], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$13], [], false)}, {prop: "SetCap", name: "SetCap", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetLen", name: "SetLen", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Slice", name: "Slice", pkg: "", typ: $funcType([$Int, $Int], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}]; - flag.methods = [{prop: "kind", name: "kind", pkg: "internal/reflectlite", typ: $funcType([], [Kind], false)}, {prop: "ro", name: "ro", pkg: "internal/reflectlite", typ: $funcType([], [flag], false)}, {prop: "mustBeExported", name: "mustBeExported", pkg: "internal/reflectlite", typ: $funcType([], [], false)}, {prop: "mustBeAssignable", name: "mustBeAssignable", pkg: "internal/reflectlite", typ: $funcType([], [], false)}, {prop: "mustBe", name: "mustBe", pkg: "internal/reflectlite", typ: $funcType([Kind], [], false)}]; - ptrType$10.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$1.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "pointers", name: "pointers", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}, {prop: "common", name: "common", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$5], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "hasName", name: "hasName", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "chanDir", name: "chanDir", pkg: "internal/reflectlite", typ: $funcType([], [chanDir], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "kindType", name: "kindType", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [structField], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "uncommon", name: "uncommon", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$4], false)}, {prop: "nameOff", name: "nameOff", pkg: "internal/reflectlite", typ: $funcType([nameOff], [name], false)}, {prop: "typeOff", name: "typeOff", pkg: "internal/reflectlite", typ: $funcType([typeOff], [ptrType$1], false)}, {prop: "ptrTo", name: "ptrTo", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}]; - ptrType$11.methods = [{prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}]; - ptrType$12.methods = [{prop: "offset", name: "offset", pkg: "internal/reflectlite", typ: $funcType([], [$Uintptr], false)}, {prop: "embedded", name: "embedded", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}]; - ptrType$13.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$4.methods = [{prop: "methods", name: "methods", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$5], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$5], false)}]; - ptrType$5.methods = [{prop: "in$", name: "in", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$2], false)}, {prop: "out", name: "out", pkg: "internal/reflectlite", typ: $funcType([], [sliceType$2], false)}]; - name.methods = [{prop: "data", name: "data", pkg: "internal/reflectlite", typ: $funcType([$Int, $String], [ptrType$6], false)}, {prop: "hasTag", name: "hasTag", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}, {prop: "readVarint", name: "readVarint", pkg: "internal/reflectlite", typ: $funcType([$Int], [$Int, $Int], false)}, {prop: "name", name: "name", pkg: "internal/reflectlite", typ: $funcType([], [$String], false)}, {prop: "tag", name: "tag", pkg: "internal/reflectlite", typ: $funcType([], [$String], false)}, {prop: "pkgPath", name: "pkgPath", pkg: "internal/reflectlite", typ: $funcType([], [$String], false)}, {prop: "isExported", name: "isExported", pkg: "internal/reflectlite", typ: $funcType([], [$Bool], false)}]; - ptrType$9.methods = [{prop: "skipUntilValidKey", name: "skipUntilValidKey", pkg: "internal/reflectlite", typ: $funcType([], [], false)}]; - Value.init("internal/reflectlite", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "flag", embedded: true, exported: false, typ: flag, tag: ""}]); - ValueError.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: Kind, tag: ""}]); - Type.init([{prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$4], false)}]); - rtype.init("internal/reflectlite", [{prop: "size", name: "size", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "ptrdata", name: "ptrdata", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "hash", name: "hash", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "tflag", name: "tflag", embedded: false, exported: false, typ: tflag, tag: ""}, {prop: "align", name: "align", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "fieldAlign", name: "fieldAlign", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "kind", name: "kind", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "equal", name: "equal", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "gcdata", name: "gcdata", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", embedded: false, exported: false, typ: typeOff, tag: ""}]); - method.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mtyp", name: "mtyp", embedded: false, exported: false, typ: typeOff, tag: ""}, {prop: "ifn", name: "ifn", embedded: false, exported: false, typ: textOff, tag: ""}, {prop: "tfn", name: "tfn", embedded: false, exported: false, typ: textOff, tag: ""}]); - arrayType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uintptr, tag: ""}]); - chanType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", embedded: false, exported: false, typ: $Uintptr, tag: ""}]); - imethod.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: typeOff, tag: ""}]); - interfaceType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "methods", name: "methods", embedded: false, exported: false, typ: sliceType$9, tag: ""}]); - mapType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "hasher", name: "hasher", embedded: false, exported: false, typ: funcType$3, tag: ""}, {prop: "keysize", name: "keysize", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "valuesize", name: "valuesize", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "bucketsize", name: "bucketsize", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - ptrType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); - sliceType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); - structField.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: name, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "offsetEmbed", name: "offsetEmbed", embedded: false, exported: false, typ: $Uintptr, tag: ""}]); - structType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "fields", name: "fields", embedded: false, exported: false, typ: sliceType$10, tag: ""}]); - errorString.init("internal/reflectlite", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]); - Method.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: Type, tag: ""}, {prop: "Func", name: "Func", embedded: false, exported: true, typ: Value, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}]); - uncommonType.init("internal/reflectlite", [{prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mcount", name: "mcount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "xcount", name: "xcount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "moff", name: "moff", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "_methods", name: "_methods", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - funcType.init("internal/reflectlite", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: "reflect:\"func\""}, {prop: "inCount", name: "inCount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "outCount", name: "outCount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "_in", name: "_in", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "_out", name: "_out", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - name.init("internal/reflectlite", [{prop: "bytes", name: "bytes", embedded: false, exported: false, typ: ptrType$6, tag: ""}]); - nameData.init("internal/reflectlite", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "exported", name: "exported", embedded: false, exported: false, typ: $Bool, tag: ""}]); - mapIter.init("internal/reflectlite", [{prop: "t", name: "t", embedded: false, exported: false, typ: Type, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "keys", name: "keys", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "last", name: "last", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - TypeEx.init([{prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "internal/reflectlite", typ: $funcType([], [ptrType$4], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = goarch.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unsafeheader.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - uint8Type = ptrType$1.nil; - nameOffList = sliceType$1.nil; - typeOffList = sliceType$2.nil; - kindNames = new sliceType$3(["invalid", "bool", "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64", "complex64", "complex128", "array", "chan", "func", "interface", "map", "ptr", "slice", "string", "struct", "unsafe.Pointer"]); - callHelper = $assertType($internalize($call, $emptyInterface), funcType$1); - $pkg.ErrSyntax = new errorString.ptr("invalid syntax"); - initialized = false; - idJsType = "_jsType"; - idReflectType = "_reflectType"; - idKindType = "kindType"; - idRtype = "_rtype"; - uncommonTypeMap = {}; - nameMap = {}; - jsObjectPtr = reflectType($jsObjectPtr); - selectHelper = $assertType($internalize($select, $emptyInterface), funcType$1); - $r = init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["errors"] = (function() { - var $pkg = {}, $init, reflectlite, errorString, ptrType, interfaceType, interfaceType$1, ptrType$1, errorType, _r, Unwrap, Is, New; - reflectlite = $packages["internal/reflectlite"]; - errorString = $pkg.errorString = $newType(0, $kindStruct, "errors.errorString", true, "errors", false, function(s_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - return; - } - this.s = s_; - }); - ptrType = $ptrType($error); - interfaceType = $interfaceType([{prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]); - interfaceType$1 = $interfaceType([{prop: "Is", name: "Is", pkg: "", typ: $funcType([$error], [$Bool], false)}]); - ptrType$1 = $ptrType(errorString); - Unwrap = function(err) { - var {$24r, _r$1, _tuple, err, ok, u, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(err, interfaceType, true); - u = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return $ifaceNil; - } - _r$1 = u.Unwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Unwrap, $c: true, $r, $24r, _r$1, _tuple, err, ok, u, $s};return $f; - }; - $pkg.Unwrap = Unwrap; - Is = function(err, target) { - var {_r$1, _r$2, _r$3, _tuple, _v, err, isComparable, ok, target, x, $s, $r, $c} = $restore(this, {err, target}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(target, $ifaceNil)) { - $s = -1; return $interfaceIsEqual(err, target); - } - _r$1 = reflectlite.TypeOf(target).Comparable(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - isComparable = _r$1; - /* while (true) { */ case 2: - if (isComparable && $interfaceIsEqual(err, target)) { - $s = -1; return true; - } - _tuple = $assertType(err, interfaceType$1, true); - x = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 6; continue s; } - _r$2 = x.Is(target); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - $s = -1; return true; - /* } */ case 5: - _r$3 = Unwrap(err); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return false; - } - $s = 2; continue; - case 3: - $s = -1; return false; - /* */ } return; } var $f = {$blk: Is, $c: true, $r, _r$1, _r$2, _r$3, _tuple, _v, err, isComparable, ok, target, x, $s};return $f; - }; - $pkg.Is = Is; - New = function(text) { - var text; - return new errorString.ptr(text); - }; - $pkg.New = New; - errorString.ptr.prototype.Error = function() { - var e; - e = this; - return e.s; - }; - errorString.prototype.Error = function() { return this.$val.Error(); }; - ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - errorString.init("errors", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = reflectlite.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = reflectlite.TypeOf((ptrType.nil)).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - errorType = _r; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/cpu"] = (function() { - var $pkg = {}, $init, CacheLinePad, arrayType, structType, structType$2, structType$5; - CacheLinePad = $pkg.CacheLinePad = $newType(0, $kindStruct, "cpu.CacheLinePad", true, "internal/cpu", true, function(_$0_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - return; - } - this._$0 = _$0_; - }); - arrayType = $arrayType($Uint8, 0); - structType = $structType("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasADX", name: "HasADX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAVX", name: "HasAVX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAVX2", name: "HasAVX2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasBMI1", name: "HasBMI1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasBMI2", name: "HasBMI2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasERMS", name: "HasERMS", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasFMA", name: "HasFMA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasOSXSAVE", name: "HasOSXSAVE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPCLMULQDQ", name: "HasPCLMULQDQ", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPOPCNT", name: "HasPOPCNT", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasRDTSCP", name: "HasRDTSCP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE3", name: "HasSSE3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSSE3", name: "HasSSSE3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE41", name: "HasSSE41", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSSE42", name: "HasSSE42", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$17", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}]); - structType$2 = $structType("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPMULL", name: "HasPMULL", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA1", name: "HasSHA1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA2", name: "HasSHA2", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasCRC32", name: "HasCRC32", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasATOMICS", name: "HasATOMICS", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasCPUID", name: "HasCPUID", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsNeoverseN1", name: "IsNeoverseN1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsZeus", name: "IsZeus", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$10", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}]); - structType$5 = $structType("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}, {prop: "HasZARCH", name: "HasZARCH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSTFLE", name: "HasSTFLE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasLDISP", name: "HasLDISP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEIMM", name: "HasEIMM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasDFP", name: "HasDFP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasETF3EH", name: "HasETF3EH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasMSA", name: "HasMSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAES", name: "HasAES", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESCBC", name: "HasAESCBC", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESCTR", name: "HasAESCTR", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasAESGCM", name: "HasAESGCM", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasGHASH", name: "HasGHASH", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA1", name: "HasSHA1", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA256", name: "HasSHA256", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA512", name: "HasSHA512", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasSHA3", name: "HasSHA3", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasVX", name: "HasVX", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasVXE", name: "HasVXE", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasKDSA", name: "HasKDSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasECDSA", name: "HasECDSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEDDSA", name: "HasEDDSA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "_$22", name: "_", embedded: false, exported: false, typ: CacheLinePad, tag: ""}]); - CacheLinePad.init("internal/cpu", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $pkg.X86 = new structType.ptr(new CacheLinePad.ptr(arrayType.zero()), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, new CacheLinePad.ptr(arrayType.zero())); - $pkg.ARM64 = new structType$2.ptr(new CacheLinePad.ptr(arrayType.zero()), false, false, false, false, false, false, false, false, false, new CacheLinePad.ptr(arrayType.zero())); - $pkg.S390X = new structType$5.ptr(new CacheLinePad.ptr(arrayType.zero()), false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, new CacheLinePad.ptr(arrayType.zero())); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/bytealg"] = (function() { - var $pkg = {}, $init, cpu, Index, IndexString, Cutover, Count, HashStrBytes, IndexRabinKarpBytes, Equal, IndexByteString; - cpu = $packages["internal/cpu"]; - Index = function(a, b) { - var a, b; - $panic(new $String("unimplemented")); - }; - $pkg.Index = Index; - IndexString = function(a, b) { - var a, b; - $panic(new $String("unimplemented")); - }; - $pkg.IndexString = IndexString; - Cutover = function(n) { - var n; - $panic(new $String("unimplemented")); - }; - $pkg.Cutover = Cutover; - Count = function(b, c) { - var _i, _ref, b, c, n, x; - n = 0; - _ref = b; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (x === c) { - n = n + (1) >> 0; - } - _i++; - } - return n; - }; - $pkg.Count = Count; - HashStrBytes = function(sep) { - var _tmp, _tmp$1, hash, i, i$1, pow, sep, sq; - hash = 0; - i = 0; - while (true) { - if (!(i < sep.$length)) { break; } - hash = ($imul(hash, 16777619) >>> 0) + ((((i < 0 || i >= sep.$length) ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + i]) >>> 0)) >>> 0; - i = i + (1) >> 0; - } - _tmp = 1; - _tmp$1 = 16777619; - pow = _tmp; - sq = _tmp$1; - i$1 = sep.$length; - while (true) { - if (!(i$1 > 0)) { break; } - if (!(((i$1 & 1) === 0))) { - pow = $imul(pow, (sq)) >>> 0; - } - sq = $imul(sq, (sq)) >>> 0; - i$1 = (i$1 >> $min((1), 31)) >> 0; - } - return [hash, pow]; - }; - $pkg.HashStrBytes = HashStrBytes; - IndexRabinKarpBytes = function(s, sep) { - var _tuple, h, hashsep, i, i$1, n, pow, s, sep, x; - _tuple = HashStrBytes(sep); - hashsep = _tuple[0]; - pow = _tuple[1]; - n = sep.$length; - h = 0; - i = 0; - while (true) { - if (!(i < n)) { break; } - h = ($imul(h, 16777619) >>> 0) + ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >>> 0)) >>> 0; - i = i + (1) >> 0; - } - if ((h === hashsep) && Equal($subslice(s, 0, n), sep)) { - return 0; - } - i$1 = n; - while (true) { - if (!(i$1 < s.$length)) { break; } - h = $imul(h, (16777619)) >>> 0; - h = h + (((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) >>> 0))) >>> 0; - h = h - (($imul(pow, (((x = i$1 - n >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >>> 0))) >>> 0)) >>> 0; - i$1 = i$1 + (1) >> 0; - if ((h === hashsep) && Equal($subslice(s, (i$1 - n >> 0), i$1), sep)) { - return i$1 - n >> 0; - } - } - return -1; - }; - $pkg.IndexRabinKarpBytes = IndexRabinKarpBytes; - Equal = function(a, b) { - var _i, _ref, a, b, c, i; - if (!((a.$length === b.$length))) { - return false; - } - _ref = a; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((c === ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])))) { - return false; - } - _i++; - } - return true; - }; - $pkg.Equal = Equal; - IndexByteString = function(s, c) { - var c, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) === c) { - return i; - } - i = i + (1) >> 0; - } - return -1; - }; - $pkg.IndexByteString = IndexByteString; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = cpu.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.MaxLen = 0; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/race"] = (function() { - var $pkg = {}, $init, Acquire, Release, ReleaseMerge, Disable, Enable; - Acquire = function(addr) { - var addr; - }; - $pkg.Acquire = Acquire; - Release = function(addr) { - var addr; - }; - $pkg.Release = Release; - ReleaseMerge = function(addr) { - var addr; - }; - $pkg.ReleaseMerge = ReleaseMerge; - Disable = function() { - }; - $pkg.Disable = Disable; - Enable = function() { - }; - $pkg.Enable = Enable; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["sync/atomic"] = (function() { - var $pkg = {}, $init, js, Value, ptrType, SwapInt32, SwapInt64, SwapUint32, SwapUint64, CompareAndSwapInt32, CompareAndSwapInt64, CompareAndSwapUint32, CompareAndSwapUint64, CompareAndSwapPointer, AddInt32, AddUint32, AddInt64, AddUint64, LoadInt32, LoadInt64, LoadUint32, LoadUint64, LoadPointer, StoreInt32, StoreInt64, StoreUint32, StoreUint64, StorePointer, sameType; - js = $packages["github.com/gopherjs/gopherjs/js"]; - Value = $pkg.Value = $newType(0, $kindStruct, "atomic.Value", true, "sync/atomic", true, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = $ifaceNil; - return; - } - this.v = v_; - }); - ptrType = $ptrType(Value); - SwapInt32 = function(addr, new$1) { - var addr, new$1, old; - old = addr.$get(); - addr.$set(new$1); - return old; - }; - $pkg.SwapInt32 = SwapInt32; - SwapInt64 = function(addr, new$1) { - var addr, new$1, old; - old = addr.$get(); - addr.$set(new$1); - return old; - }; - $pkg.SwapInt64 = SwapInt64; - SwapUint32 = function(addr, new$1) { - var addr, new$1, old; - old = addr.$get(); - addr.$set(new$1); - return old; - }; - $pkg.SwapUint32 = SwapUint32; - SwapUint64 = function(addr, new$1) { - var addr, new$1, old; - old = addr.$get(); - addr.$set(new$1); - return old; - }; - $pkg.SwapUint64 = SwapUint64; - CompareAndSwapInt32 = function(addr, old, new$1) { - var addr, new$1, old; - if (addr.$get() === old) { - addr.$set(new$1); - return true; - } - return false; - }; - $pkg.CompareAndSwapInt32 = CompareAndSwapInt32; - CompareAndSwapInt64 = function(addr, old, new$1) { - var addr, new$1, old, x; - if ((x = addr.$get(), (x.$high === old.$high && x.$low === old.$low))) { - addr.$set(new$1); - return true; - } - return false; - }; - $pkg.CompareAndSwapInt64 = CompareAndSwapInt64; - CompareAndSwapUint32 = function(addr, old, new$1) { - var addr, new$1, old; - if (addr.$get() === old) { - addr.$set(new$1); - return true; - } - return false; - }; - $pkg.CompareAndSwapUint32 = CompareAndSwapUint32; - CompareAndSwapUint64 = function(addr, old, new$1) { - var addr, new$1, old, x; - if ((x = addr.$get(), (x.$high === old.$high && x.$low === old.$low))) { - addr.$set(new$1); - return true; - } - return false; - }; - $pkg.CompareAndSwapUint64 = CompareAndSwapUint64; - CompareAndSwapPointer = function(addr, old, new$1) { - var addr, new$1, old; - if (addr.$get() === old) { - addr.$set(new$1); - return true; - } - return false; - }; - $pkg.CompareAndSwapPointer = CompareAndSwapPointer; - AddInt32 = function(addr, delta) { - var addr, delta, new$1; - new$1 = addr.$get() + delta >> 0; - addr.$set(new$1); - return new$1; - }; - $pkg.AddInt32 = AddInt32; - AddUint32 = function(addr, delta) { - var addr, delta, new$1; - new$1 = addr.$get() + delta >>> 0; - addr.$set(new$1); - return new$1; - }; - $pkg.AddUint32 = AddUint32; - AddInt64 = function(addr, delta) { - var addr, delta, new$1, x; - new$1 = (x = addr.$get(), new $Int64(x.$high + delta.$high, x.$low + delta.$low)); - addr.$set(new$1); - return new$1; - }; - $pkg.AddInt64 = AddInt64; - AddUint64 = function(addr, delta) { - var addr, delta, new$1, x; - new$1 = (x = addr.$get(), new $Uint64(x.$high + delta.$high, x.$low + delta.$low)); - addr.$set(new$1); - return new$1; - }; - $pkg.AddUint64 = AddUint64; - LoadInt32 = function(addr) { - var addr; - return addr.$get(); - }; - $pkg.LoadInt32 = LoadInt32; - LoadInt64 = function(addr) { - var addr; - return addr.$get(); - }; - $pkg.LoadInt64 = LoadInt64; - LoadUint32 = function(addr) { - var addr; - return addr.$get(); - }; - $pkg.LoadUint32 = LoadUint32; - LoadUint64 = function(addr) { - var addr; - return addr.$get(); - }; - $pkg.LoadUint64 = LoadUint64; - LoadPointer = function(addr) { - var addr; - return addr.$get(); - }; - $pkg.LoadPointer = LoadPointer; - StoreInt32 = function(addr, val) { - var addr, val; - addr.$set(val); - }; - $pkg.StoreInt32 = StoreInt32; - StoreInt64 = function(addr, val) { - var addr, val; - addr.$set(val); - }; - $pkg.StoreInt64 = StoreInt64; - StoreUint32 = function(addr, val) { - var addr, val; - addr.$set(val); - }; - $pkg.StoreUint32 = StoreUint32; - StoreUint64 = function(addr, val) { - var addr, val; - addr.$set(val); - }; - $pkg.StoreUint64 = StoreUint64; - StorePointer = function(addr, val) { - var addr, val; - addr.$set(val); - }; - $pkg.StorePointer = StorePointer; - Value.ptr.prototype.Load = function() { - var v, x; - x = $ifaceNil; - v = this; - x = v.v; - return x; - }; - Value.prototype.Load = function() { return this.$val.Load(); }; - Value.ptr.prototype.Store = function(new$1) { - var new$1, v; - v = this; - v.checkNew("store", new$1); - v.v = new$1; - }; - Value.prototype.Store = function(new$1) { return this.$val.Store(new$1); }; - Value.ptr.prototype.Swap = function(new$1) { - var _tmp, _tmp$1, new$1, old, v; - old = $ifaceNil; - v = this; - v.checkNew("swap", new$1); - _tmp = v.v; - _tmp$1 = new$1; - old = _tmp; - v.v = _tmp$1; - old = old; - return old; - }; - Value.prototype.Swap = function(new$1) { return this.$val.Swap(new$1); }; - Value.ptr.prototype.CompareAndSwap = function(old, new$1) { - var new$1, old, swapped, v; - swapped = false; - v = this; - v.checkNew("compare and swap", new$1); - if (!($interfaceIsEqual(v.v, $ifaceNil) && $interfaceIsEqual(old, $ifaceNil)) && !sameType(old, new$1)) { - $panic(new $String("sync/atomic: compare and swap of inconsistently typed values into Value")); - } - if (!($interfaceIsEqual(v.v, old))) { - swapped = false; - return swapped; - } - v.v = new$1; - swapped = true; - return swapped; - }; - Value.prototype.CompareAndSwap = function(old, new$1) { return this.$val.CompareAndSwap(old, new$1); }; - Value.ptr.prototype.checkNew = function(op, new$1) { - var new$1, op, v; - v = this; - if ($interfaceIsEqual(new$1, $ifaceNil)) { - $panic(new $String("sync/atomic: " + op + " of nil value into Value")); - } - if (!($interfaceIsEqual(v.v, $ifaceNil)) && !sameType(new$1, v.v)) { - $panic(new $String("sync/atomic: " + op + " of inconsistently typed value into Value")); - } - }; - Value.prototype.checkNew = function(op, new$1) { return this.$val.checkNew(op, new$1); }; - sameType = function(x, y) { - var x, y; - return x.constructor === y.constructor; - }; - ptrType.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}, {prop: "CompareAndSwap", name: "CompareAndSwap", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$Bool], false)}, {prop: "checkNew", name: "checkNew", pkg: "sync/atomic", typ: $funcType([$String, $emptyInterface], [], false)}]; - Value.init("sync/atomic", [{prop: "v", name: "v", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["sync"] = (function() { - var $pkg = {}, $init, js, race, atomic, RWMutex, rlocker, notifyList, Once, Mutex, Locker, Map, readOnly, entry, copyChecker, noCopy, WaitGroup, Pool, Cond, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$9, ptrType$10, structType, chanType, sliceType$2, funcType, ptrType$14, ptrType$15, funcType$1, ptrType$16, mapType, ptrType$17, ptrType$18, ptrType$19, chanType$1, sliceType$3, ptrType$20, funcType$2, ptrType$21, expunged, semWaiters, semAwoken, init, runtime_doSpin, newEntry, NewCond, runtime_Semacquire, runtime_SemacquireMutex, runtime_Semrelease, runtime_notifyListCheck, runtime_canSpin, runtime_nanotime, throw$1; - js = $packages["github.com/gopherjs/gopherjs/js"]; - race = $packages["internal/race"]; - atomic = $packages["sync/atomic"]; - RWMutex = $pkg.RWMutex = $newType(0, $kindStruct, "sync.RWMutex", true, "sync", true, function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { - this.$val = this; - if (arguments.length === 0) { - this.w = new Mutex.ptr(0, 0); - this.writerSem = 0; - this.readerSem = 0; - this.readerCount = 0; - this.readerWait = 0; - return; - } - this.w = w_; - this.writerSem = writerSem_; - this.readerSem = readerSem_; - this.readerCount = readerCount_; - this.readerWait = readerWait_; - }); - rlocker = $pkg.rlocker = $newType(0, $kindStruct, "sync.rlocker", true, "sync", false, function(w_, writerSem_, readerSem_, readerCount_, readerWait_) { - this.$val = this; - if (arguments.length === 0) { - this.w = new Mutex.ptr(0, 0); - this.writerSem = 0; - this.readerSem = 0; - this.readerCount = 0; - this.readerWait = 0; - return; - } - this.w = w_; - this.writerSem = writerSem_; - this.readerSem = readerSem_; - this.readerCount = readerCount_; - this.readerWait = readerWait_; - }); - notifyList = $pkg.notifyList = $newType(0, $kindStruct, "sync.notifyList", true, "sync", false, function(wait_, notify_, lock_, head_, tail_) { - this.$val = this; - if (arguments.length === 0) { - this.wait = 0; - this.notify = 0; - this.lock = 0; - this.head = 0; - this.tail = 0; - return; - } - this.wait = wait_; - this.notify = notify_; - this.lock = lock_; - this.head = head_; - this.tail = tail_; - }); - Once = $pkg.Once = $newType(0, $kindStruct, "sync.Once", true, "sync", true, function(done_, m_) { - this.$val = this; - if (arguments.length === 0) { - this.done = 0; - this.m = new Mutex.ptr(0, 0); - return; - } - this.done = done_; - this.m = m_; - }); - Mutex = $pkg.Mutex = $newType(0, $kindStruct, "sync.Mutex", true, "sync", true, function(state_, sema_) { - this.$val = this; - if (arguments.length === 0) { - this.state = 0; - this.sema = 0; - return; - } - this.state = state_; - this.sema = sema_; - }); - Locker = $pkg.Locker = $newType(8, $kindInterface, "sync.Locker", true, "sync", true, null); - Map = $pkg.Map = $newType(0, $kindStruct, "sync.Map", true, "sync", true, function(mu_, read_, dirty_, misses_) { - this.$val = this; - if (arguments.length === 0) { - this.mu = new Mutex.ptr(0, 0); - this.read = new atomic.Value.ptr($ifaceNil); - this.dirty = false; - this.misses = 0; - return; - } - this.mu = mu_; - this.read = read_; - this.dirty = dirty_; - this.misses = misses_; - }); - readOnly = $pkg.readOnly = $newType(0, $kindStruct, "sync.readOnly", true, "sync", false, function(m_, amended_) { - this.$val = this; - if (arguments.length === 0) { - this.m = false; - this.amended = false; - return; - } - this.m = m_; - this.amended = amended_; - }); - entry = $pkg.entry = $newType(0, $kindStruct, "sync.entry", true, "sync", false, function(p_) { - this.$val = this; - if (arguments.length === 0) { - this.p = 0; - return; - } - this.p = p_; - }); - copyChecker = $pkg.copyChecker = $newType(4, $kindUintptr, "sync.copyChecker", true, "sync", false, null); - noCopy = $pkg.noCopy = $newType(0, $kindStruct, "sync.noCopy", true, "sync", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - WaitGroup = $pkg.WaitGroup = $newType(0, $kindStruct, "sync.WaitGroup", true, "sync", true, function(counter_, ch_, state1_, state2_) { - this.$val = this; - if (arguments.length === 0) { - this.counter = 0; - this.ch = $chanNil; - this.state1 = new $Uint64(0, 0); - this.state2 = 0; - return; - } - this.counter = counter_; - this.ch = ch_; - this.state1 = state1_; - this.state2 = state2_; - }); - Pool = $pkg.Pool = $newType(0, $kindStruct, "sync.Pool", true, "sync", true, function(store_, New_) { - this.$val = this; - if (arguments.length === 0) { - this.store = sliceType$3.nil; - this.New = $throwNilPointerError; - return; - } - this.store = store_; - this.New = New_; - }); - Cond = $pkg.Cond = $newType(0, $kindStruct, "sync.Cond", true, "sync", true, function(noCopy_, L_, notify_, checker_, n_, ch_) { - this.$val = this; - if (arguments.length === 0) { - this.noCopy = new noCopy.ptr(); - this.L = $ifaceNil; - this.notify = new notifyList.ptr(0, 0, 0, 0, 0); - this.checker = 0; - this.n = 0; - this.ch = $chanNil; - return; - } - this.noCopy = noCopy_; - this.L = L_; - this.notify = notify_; - this.checker = checker_; - this.n = n_; - this.ch = ch_; - }); - ptrType = $ptrType($Uint64); - ptrType$1 = $ptrType($Uint32); - ptrType$2 = $ptrType($Int32); - ptrType$3 = $ptrType(rlocker); - ptrType$4 = $ptrType(RWMutex); - ptrType$5 = $ptrType($UnsafePointer); - ptrType$9 = $ptrType($emptyInterface); - ptrType$10 = $ptrType(entry); - structType = $structType("", []); - chanType = $chanType($Bool, false, false); - sliceType$2 = $sliceType(chanType); - funcType = $funcType([], [], false); - ptrType$14 = $ptrType(Once); - ptrType$15 = $ptrType(Mutex); - funcType$1 = $funcType([$emptyInterface, $emptyInterface], [$Bool], false); - ptrType$16 = $ptrType(Map); - mapType = $mapType($emptyInterface, ptrType$10); - ptrType$17 = $ptrType(copyChecker); - ptrType$18 = $ptrType(noCopy); - ptrType$19 = $ptrType(WaitGroup); - chanType$1 = $chanType(structType, false, false); - sliceType$3 = $sliceType($emptyInterface); - ptrType$20 = $ptrType(Pool); - funcType$2 = $funcType([], [$emptyInterface], false); - ptrType$21 = $ptrType(Cond); - WaitGroup.ptr.prototype.Done = function() { - var wg; - wg = this; - wg.Add(-1); - }; - WaitGroup.prototype.Done = function() { return this.$val.Done(); }; - RWMutex.ptr.prototype.RLock = function() { - var {rw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rw = this; - if (false) { - $unused(rw.w.state); - race.Disable(); - } - /* */ if (atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 1) < 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 1) < 0) { */ case 1: - $r = runtime_SemacquireMutex((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))), false, 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (false) { - race.Enable(); - race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))))); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.RLock, $c: true, $r, rw, $s};return $f; - }; - RWMutex.prototype.RLock = function() { return this.$val.RLock(); }; - RWMutex.ptr.prototype.TryRLock = function() { - var c, rw; - rw = this; - if (false) { - $unused(rw.w.state); - race.Disable(); - } - while (true) { - c = atomic.LoadInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw)))); - if (c < 0) { - if (false) { - race.Enable(); - } - return false; - } - if (atomic.CompareAndSwapInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), c, c + 1 >> 0)) { - if (false) { - race.Enable(); - race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))))); - } - return true; - } - } - }; - RWMutex.prototype.TryRLock = function() { return this.$val.TryRLock(); }; - RWMutex.ptr.prototype.RUnlock = function() { - var {r, rw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rw = this; - if (false) { - $unused(rw.w.state); - race.ReleaseMerge(((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))))); - race.Disable(); - } - r = atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), -1); - /* */ if (r < 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r < 0) { */ case 1: - $r = rw.rUnlockSlow(r); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (false) { - race.Enable(); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.RUnlock, $c: true, $r, r, rw, $s};return $f; - }; - RWMutex.prototype.RUnlock = function() { return this.$val.RUnlock(); }; - RWMutex.ptr.prototype.rUnlockSlow = function(r) { - var {r, rw, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rw = this; - if (((r + 1 >> 0) === 0) || ((r + 1 >> 0) === -1073741824)) { - race.Enable(); - throw$1("sync: RUnlock of unlocked RWMutex"); - } - /* */ if (atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), -1) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), -1) === 0) { */ case 1: - $r = runtime_Semrelease((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))), false, 1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.rUnlockSlow, $c: true, $r, r, rw, $s};return $f; - }; - RWMutex.prototype.rUnlockSlow = function(r) { return this.$val.rUnlockSlow(r); }; - RWMutex.ptr.prototype.Lock = function() { - var {r, rw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rw = this; - if (false) { - $unused(rw.w.state); - race.Disable(); - } - $r = rw.w.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r = atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), -1073741824) + 1073741824 >> 0; - /* */ if (!((r === 0)) && !((atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), r) === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((r === 0)) && !((atomic.AddInt32((rw.$ptr_readerWait || (rw.$ptr_readerWait = new ptrType$2(function() { return this.$target.readerWait; }, function($v) { this.$target.readerWait = $v; }, rw))), r) === 0))) { */ case 2: - $r = runtime_SemacquireMutex((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))), false, 0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - if (false) { - race.Enable(); - race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))))); - race.Acquire(((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))))); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.Lock, $c: true, $r, r, rw, $s};return $f; - }; - RWMutex.prototype.Lock = function() { return this.$val.Lock(); }; - RWMutex.ptr.prototype.TryLock = function() { - var {rw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rw = this; - if (false) { - $unused(rw.w.state); - race.Disable(); - } - if (!rw.w.TryLock()) { - if (false) { - race.Enable(); - } - $s = -1; return false; - } - /* */ if (!atomic.CompareAndSwapInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 0, -1073741824)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!atomic.CompareAndSwapInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 0, -1073741824)) { */ case 1: - $r = rw.w.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (false) { - race.Enable(); - } - $s = -1; return false; - /* } */ case 2: - if (false) { - race.Enable(); - race.Acquire(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))))); - race.Acquire(((rw.$ptr_writerSem || (rw.$ptr_writerSem = new ptrType$1(function() { return this.$target.writerSem; }, function($v) { this.$target.writerSem = $v; }, rw))))); - } - $s = -1; return true; - /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.TryLock, $c: true, $r, rw, $s};return $f; - }; - RWMutex.prototype.TryLock = function() { return this.$val.TryLock(); }; - RWMutex.ptr.prototype.Unlock = function() { - var {i, r, rw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rw = this; - if (false) { - $unused(rw.w.state); - race.Release(((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))))); - race.Disable(); - } - r = atomic.AddInt32((rw.$ptr_readerCount || (rw.$ptr_readerCount = new ptrType$2(function() { return this.$target.readerCount; }, function($v) { this.$target.readerCount = $v; }, rw))), 1073741824); - if (r >= 1073741824) { - race.Enable(); - throw$1("sync: Unlock of unlocked RWMutex"); - } - i = 0; - /* while (true) { */ case 1: - /* if (!(i < ((r >> 0)))) { break; } */ if(!(i < ((r >> 0)))) { $s = 2; continue; } - $r = runtime_Semrelease((rw.$ptr_readerSem || (rw.$ptr_readerSem = new ptrType$1(function() { return this.$target.readerSem; }, function($v) { this.$target.readerSem = $v; }, rw))), false, 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $r = rw.w.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (false) { - race.Enable(); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: RWMutex.ptr.prototype.Unlock, $c: true, $r, i, r, rw, $s};return $f; - }; - RWMutex.prototype.Unlock = function() { return this.$val.Unlock(); }; - RWMutex.ptr.prototype.RLocker = function() { - var rw; - rw = this; - return ($pointerOfStructConversion(rw, ptrType$3)); - }; - RWMutex.prototype.RLocker = function() { return this.$val.RLocker(); }; - rlocker.ptr.prototype.Lock = function() { - var {r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - $r = ($pointerOfStructConversion(r, ptrType$4)).RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: rlocker.ptr.prototype.Lock, $c: true, $r, r, $s};return $f; - }; - rlocker.prototype.Lock = function() { return this.$val.Lock(); }; - rlocker.ptr.prototype.Unlock = function() { - var {r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - $r = ($pointerOfStructConversion(r, ptrType$4)).RUnlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: rlocker.ptr.prototype.Unlock, $c: true, $r, r, $s};return $f; - }; - rlocker.prototype.Unlock = function() { return this.$val.Unlock(); }; - init = function() { - var n; - n = new notifyList.ptr(0, 0, 0, 0, 0); - runtime_notifyListCheck(20); - }; - runtime_doSpin = function() { - $throwRuntimeError("native function not implemented: sync.runtime_doSpin"); - }; - Once.ptr.prototype.Do = function(f) { - var {f, o, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - /* */ if (atomic.LoadUint32((o.$ptr_done || (o.$ptr_done = new ptrType$1(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)))) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.LoadUint32((o.$ptr_done || (o.$ptr_done = new ptrType$1(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o)))) === 0) { */ case 1: - $r = o.doSlow(f); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Once.ptr.prototype.Do, $c: true, $r, f, o, $s};return $f; - }; - Once.prototype.Do = function(f) { return this.$val.Do(f); }; - Once.ptr.prototype.doSlow = function(f) { - var {f, o, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - o = this; - $r = o.m.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(o.m, "Unlock"), []]); - /* */ if (o.done === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (o.done === 0) { */ case 2: - $deferred.push([atomic.StoreUint32, [(o.$ptr_done || (o.$ptr_done = new ptrType$1(function() { return this.$target.done; }, function($v) { this.$target.done = $v; }, o))), 1]]); - $r = f(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Once.ptr.prototype.doSlow, $c: true, $r, f, o, $s, $deferred};return $f; } } - }; - Once.prototype.doSlow = function(f) { return this.$val.doSlow(f); }; - Mutex.ptr.prototype.Lock = function() { - var {m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), 0, 1)) { - if (false) { - race.Acquire((m)); - } - $s = -1; return; - } - $r = m.lockSlow(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.Lock, $c: true, $r, m, $s};return $f; - }; - Mutex.prototype.Lock = function() { return this.$val.Lock(); }; - Mutex.ptr.prototype.TryLock = function() { - var m, old; - m = this; - old = m.state; - if (!(((old & 5) === 0))) { - return false; - } - if (!atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, old | 1)) { - return false; - } - if (false) { - race.Acquire((m)); - } - return true; - }; - Mutex.prototype.TryLock = function() { return this.$val.TryLock(); }; - Mutex.ptr.prototype.lockSlow = function() { - var {awoke, delta, iter, m, new$1, old, queueLifo, starving, waitStartTime, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - waitStartTime = new $Int64(0, 0); - starving = false; - awoke = false; - iter = 0; - old = m.state; - /* while (true) { */ case 1: - /* */ if (((old & 5) === 1) && runtime_canSpin(iter)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (((old & 5) === 1) && runtime_canSpin(iter)) { */ case 3: - if (!awoke && ((old & 2) === 0) && !(((old >> 3 >> 0) === 0)) && atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, old | 2)) { - awoke = true; - } - $r = runtime_doSpin(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - iter = iter + (1) >> 0; - old = m.state; - /* continue; */ $s = 1; continue; - /* } */ case 4: - new$1 = old; - if ((old & 4) === 0) { - new$1 = new$1 | (1); - } - if (!(((old & 5) === 0))) { - new$1 = new$1 + (8) >> 0; - } - if (starving && !(((old & 1) === 0))) { - new$1 = new$1 | (4); - } - if (awoke) { - if ((new$1 & 2) === 0) { - throw$1("sync: inconsistent mutex state"); - } - new$1 = (new$1 & ~(2)) >> 0; - } - /* */ if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { */ case 6: - if ((old & 5) === 0) { - /* break; */ $s = 2; continue; - } - queueLifo = !((waitStartTime.$high === 0 && waitStartTime.$low === 0)); - if ((waitStartTime.$high === 0 && waitStartTime.$low === 0)) { - waitStartTime = runtime_nanotime(); - } - $r = runtime_SemacquireMutex((m.$ptr_sema || (m.$ptr_sema = new ptrType$1(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m))), queueLifo, 1); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - starving = starving || (x = (x$1 = runtime_nanotime(), new $Int64(x$1.$high - waitStartTime.$high, x$1.$low - waitStartTime.$low)), (x.$high > 0 || (x.$high === 0 && x.$low > 1000000))); - old = m.state; - if (!(((old & 4) === 0))) { - if (!(((old & 3) === 0)) || ((old >> 3 >> 0) === 0)) { - throw$1("sync: inconsistent mutex state"); - } - delta = -7; - if (!starving || ((old >> 3 >> 0) === 1)) { - delta = delta - (4) >> 0; - } - atomic.AddInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), delta); - /* break; */ $s = 2; continue; - } - awoke = true; - iter = 0; - $s = 8; continue; - /* } else { */ case 7: - old = m.state; - /* } */ case 8: - $s = 1; continue; - case 2: - if (false) { - race.Acquire((m)); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.lockSlow, $c: true, $r, awoke, delta, iter, m, new$1, old, queueLifo, starving, waitStartTime, x, x$1, $s};return $f; - }; - Mutex.prototype.lockSlow = function() { return this.$val.lockSlow(); }; - Mutex.ptr.prototype.Unlock = function() { - var {m, new$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - if (false) { - $unused(m.state); - race.Release((m)); - } - new$1 = atomic.AddInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), -1); - /* */ if (!((new$1 === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((new$1 === 0))) { */ case 1: - $r = m.unlockSlow(new$1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.Unlock, $c: true, $r, m, new$1, $s};return $f; - }; - Mutex.prototype.Unlock = function() { return this.$val.Unlock(); }; - Mutex.ptr.prototype.unlockSlow = function(new$1) { - var {m, new$1, old, $s, $r, $c} = $restore(this, {new$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - if ((((new$1 + 1 >> 0)) & 1) === 0) { - throw$1("sync: unlock of unlocked mutex"); - } - /* */ if ((new$1 & 4) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((new$1 & 4) === 0) { */ case 1: - old = new$1; - /* while (true) { */ case 4: - if (((old >> 3 >> 0) === 0) || !(((old & 7) === 0))) { - $s = -1; return; - } - new$1 = ((old - 8 >> 0)) | 2; - /* */ if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (atomic.CompareAndSwapInt32((m.$ptr_state || (m.$ptr_state = new ptrType$2(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, m))), old, new$1)) { */ case 6: - $r = runtime_Semrelease((m.$ptr_sema || (m.$ptr_sema = new ptrType$1(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m))), false, 1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 7: - old = m.state; - $s = 4; continue; - case 5: - $s = 3; continue; - /* } else { */ case 2: - $r = runtime_Semrelease((m.$ptr_sema || (m.$ptr_sema = new ptrType$1(function() { return this.$target.sema; }, function($v) { this.$target.sema = $v; }, m))), true, 1); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Mutex.ptr.prototype.unlockSlow, $c: true, $r, m, new$1, old, $s};return $f; - }; - Mutex.prototype.unlockSlow = function(new$1) { return this.$val.unlockSlow(new$1); }; - newEntry = function(i) { - var i, i$24ptr; - return new entry.ptr(((i$24ptr || (i$24ptr = new ptrType$9(function() { return i; }, function($v) { i = $v; }))))); - }; - Map.ptr.prototype.Load = function(key) { - var {_entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, m, ok, read, value, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - value = $ifaceNil; - ok = false; - m = this; - _tuple = $assertType(m.read.Load(), readOnly, true); - read = $clone(_tuple[0], readOnly); - _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - e = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok && read.amended) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok && read.amended) { */ case 1: - $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$2 = $assertType(m.read.Load(), readOnly, true); - readOnly.copy(read, _tuple$2[0]); - _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]); - e = _tuple$3[0]; - ok = _tuple$3[1]; - if (!ok && read.amended) { - _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]); - e = _tuple$4[0]; - ok = _tuple$4[1]; - m.missLocked(); - } - $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (!ok) { - _tmp = $ifaceNil; - _tmp$1 = false; - value = _tmp; - ok = _tmp$1; - $s = -1; return [value, ok]; - } - _tuple$5 = e.load(); - value = _tuple$5[0]; - ok = _tuple$5[1]; - $s = -1; return [value, ok]; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.Load, $c: true, $r, _entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, m, ok, read, value, $s};return $f; - }; - Map.prototype.Load = function(key) { return this.$val.Load(key); }; - entry.ptr.prototype.load = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, ok, p, value; - value = $ifaceNil; - ok = false; - e = this; - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - if (p === 0 || p === expunged) { - _tmp = $ifaceNil; - _tmp$1 = false; - value = _tmp; - ok = _tmp$1; - return [value, ok]; - } - _tmp$2 = (p).$get(); - _tmp$3 = true; - value = _tmp$2; - ok = _tmp$3; - return [value, ok]; - }; - entry.prototype.load = function() { return this.$val.load(); }; - Map.ptr.prototype.Store = function(key, value) { - var {_entry, _entry$1, _entry$2, _key, _key$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, e, e$1, e$2, key, m, ok, ok$1, ok$2, read, value, x, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - value = [value]; - m = this; - _tuple = $assertType(m.read.Load(), readOnly, true); - read = $clone(_tuple[0], readOnly); - _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - e = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok && e.tryStore((value.$ptr || (value.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))))) { - $s = -1; return; - } - $r = m.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$2 = $assertType(m.read.Load(), readOnly, true); - readOnly.copy(read, _tuple$2[0]); - _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]); - e$1 = _tuple$3[0]; - ok$1 = _tuple$3[1]; - if (ok$1) { - if (e$1.unexpungeLocked()) { - _key = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e$1 }; - } - e$1.storeLocked((value.$ptr || (value.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value)))); - } else { - _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]); - e$2 = _tuple$4[0]; - ok$2 = _tuple$4[1]; - if (ok$2) { - e$2.storeLocked((value.$ptr || (value.$ptr = new ptrType$9(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value)))); - } else { - if (!read.amended) { - m.dirtyLocked(); - m.read.Store((x = new readOnly.ptr(read.m, true), new x.constructor.elem(x))); - } - _key$1 = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key$1)] = { k: _key$1, v: newEntry(value[0]) }; - } - } - $r = m.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.Store, $c: true, $r, _entry, _entry$1, _entry$2, _key, _key$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, e, e$1, e$2, key, m, ok, ok$1, ok$2, read, value, x, $s};return $f; - }; - Map.prototype.Store = function(key, value) { return this.$val.Store(key, value); }; - entry.ptr.prototype.tryStore = function(i) { - var e, i, p; - e = this; - while (true) { - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - if (p === expunged) { - return false; - } - if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), p, (i))) { - return true; - } - } - }; - entry.prototype.tryStore = function(i) { return this.$val.tryStore(i); }; - entry.ptr.prototype.unexpungeLocked = function() { - var e, wasExpunged; - wasExpunged = false; - e = this; - wasExpunged = atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), expunged, 0); - return wasExpunged; - }; - entry.prototype.unexpungeLocked = function() { return this.$val.unexpungeLocked(); }; - entry.ptr.prototype.storeLocked = function(i) { - var e, i; - e = this; - atomic.StorePointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), (i)); - }; - entry.prototype.storeLocked = function(i) { return this.$val.storeLocked(i); }; - Map.ptr.prototype.LoadOrStore = function(key, value) { - var {_entry, _entry$1, _entry$2, _key, _key$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, actual, actual$1, e, e$1, e$2, key, loaded, loaded$1, m, ok, ok$1, ok$2, ok$3, read, value, x, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - actual = $ifaceNil; - loaded = false; - m = this; - _tuple = $assertType(m.read.Load(), readOnly, true); - read = $clone(_tuple[0], readOnly); - _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - e = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - _tuple$2 = e.tryLoadOrStore(value); - actual$1 = _tuple$2[0]; - loaded$1 = _tuple$2[1]; - ok$1 = _tuple$2[2]; - if (ok$1) { - _tmp = actual$1; - _tmp$1 = loaded$1; - actual = _tmp; - loaded = _tmp$1; - $s = -1; return [actual, loaded]; - } - } - $r = m.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$3 = $assertType(m.read.Load(), readOnly, true); - readOnly.copy(read, _tuple$3[0]); - _tuple$4 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]); - e$1 = _tuple$4[0]; - ok$2 = _tuple$4[1]; - if (ok$2) { - if (e$1.unexpungeLocked()) { - _key = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e$1 }; - } - _tuple$5 = e$1.tryLoadOrStore(value); - actual = _tuple$5[0]; - loaded = _tuple$5[1]; - } else { - _tuple$6 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]); - e$2 = _tuple$6[0]; - ok$3 = _tuple$6[1]; - if (ok$3) { - _tuple$7 = e$2.tryLoadOrStore(value); - actual = _tuple$7[0]; - loaded = _tuple$7[1]; - m.missLocked(); - } else { - if (!read.amended) { - m.dirtyLocked(); - m.read.Store((x = new readOnly.ptr(read.m, true), new x.constructor.elem(x))); - } - _key$1 = key; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key$1)] = { k: _key$1, v: newEntry(value) }; - _tmp$2 = value; - _tmp$3 = false; - actual = _tmp$2; - loaded = _tmp$3; - } - } - $r = m.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$4 = actual; - _tmp$5 = loaded; - actual = _tmp$4; - loaded = _tmp$5; - $s = -1; return [actual, loaded]; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.LoadOrStore, $c: true, $r, _entry, _entry$1, _entry$2, _key, _key$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, actual, actual$1, e, e$1, e$2, key, loaded, loaded$1, m, ok, ok$1, ok$2, ok$3, read, value, x, $s};return $f; - }; - Map.prototype.LoadOrStore = function(key, value) { return this.$val.LoadOrStore(key, value); }; - entry.ptr.prototype.tryLoadOrStore = function(i) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, actual, e, i, ic, ic$24ptr, loaded, ok, p; - actual = $ifaceNil; - loaded = false; - ok = false; - e = this; - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - if (p === expunged) { - _tmp = $ifaceNil; - _tmp$1 = false; - _tmp$2 = false; - actual = _tmp; - loaded = _tmp$1; - ok = _tmp$2; - return [actual, loaded, ok]; - } - if (!(p === 0)) { - _tmp$3 = (p).$get(); - _tmp$4 = true; - _tmp$5 = true; - actual = _tmp$3; - loaded = _tmp$4; - ok = _tmp$5; - return [actual, loaded, ok]; - } - ic = i; - while (true) { - if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), 0, ((ic$24ptr || (ic$24ptr = new ptrType$9(function() { return ic; }, function($v) { ic = $v; })))))) { - _tmp$6 = i; - _tmp$7 = false; - _tmp$8 = true; - actual = _tmp$6; - loaded = _tmp$7; - ok = _tmp$8; - return [actual, loaded, ok]; - } - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - if (p === expunged) { - _tmp$9 = $ifaceNil; - _tmp$10 = false; - _tmp$11 = false; - actual = _tmp$9; - loaded = _tmp$10; - ok = _tmp$11; - return [actual, loaded, ok]; - } - if (!(p === 0)) { - _tmp$12 = (p).$get(); - _tmp$13 = true; - _tmp$14 = true; - actual = _tmp$12; - loaded = _tmp$13; - ok = _tmp$14; - return [actual, loaded, ok]; - } - } - }; - entry.prototype.tryLoadOrStore = function(i) { return this.$val.tryLoadOrStore(i); }; - Map.ptr.prototype.LoadAndDelete = function(key) { - var {_entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, loaded, m, ok, read, value, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - value = $ifaceNil; - loaded = false; - m = this; - _tuple = $assertType(m.read.Load(), readOnly, true); - read = $clone(_tuple[0], readOnly); - _tuple$1 = (_entry = read.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - e = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok && read.amended) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok && read.amended) { */ case 1: - $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$2 = $assertType(m.read.Load(), readOnly, true); - readOnly.copy(read, _tuple$2[0]); - _tuple$3 = (_entry$1 = read.m[$emptyInterface.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$10.nil, false]); - e = _tuple$3[0]; - ok = _tuple$3[1]; - if (!ok && read.amended) { - _tuple$4 = (_entry$2 = m.dirty[$emptyInterface.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$10.nil, false]); - e = _tuple$4[0]; - ok = _tuple$4[1]; - delete m.dirty[$emptyInterface.keyFor(key)]; - m.missLocked(); - } - $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (ok) { - _tuple$5 = e.delete$(); - value = _tuple$5[0]; - loaded = _tuple$5[1]; - $s = -1; return [value, loaded]; - } - _tmp = $ifaceNil; - _tmp$1 = false; - value = _tmp; - loaded = _tmp$1; - $s = -1; return [value, loaded]; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.LoadAndDelete, $c: true, $r, _entry, _entry$1, _entry$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, e, key, loaded, m, ok, read, value, $s};return $f; - }; - Map.prototype.LoadAndDelete = function(key) { return this.$val.LoadAndDelete(key); }; - Map.ptr.prototype.Delete = function(key) { - var {_r, key, m, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r = m.LoadAndDelete(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.Delete, $c: true, $r, _r, key, m, $s};return $f; - }; - Map.prototype.Delete = function(key) { return this.$val.Delete(key); }; - entry.ptr.prototype.delete$ = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, ok, p, value; - value = $ifaceNil; - ok = false; - e = this; - while (true) { - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - if (p === 0 || p === expunged) { - _tmp = $ifaceNil; - _tmp$1 = false; - value = _tmp; - ok = _tmp$1; - return [value, ok]; - } - if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), p, 0)) { - _tmp$2 = (p).$get(); - _tmp$3 = true; - value = _tmp$2; - ok = _tmp$3; - return [value, ok]; - } - } - }; - entry.prototype.delete$ = function() { return this.$val.delete$(); }; - Map.ptr.prototype.Range = function(f) { - var {_entry, _i, _keys, _r, _ref, _tuple, _tuple$1, _tuple$2, e, f, k, m, ok, read, v, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _tuple = $assertType(m.read.Load(), readOnly, true); - read = $clone(_tuple[0], readOnly); - /* */ if (read.amended) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (read.amended) { */ case 1: - $r = m.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$1 = $assertType(m.read.Load(), readOnly, true); - readOnly.copy(read, _tuple$1[0]); - if (read.amended) { - readOnly.copy(read, new readOnly.ptr(m.dirty, false)); - m.read.Store(new read.constructor.elem(read)); - m.dirty = false; - m.misses = 0; - } - $r = m.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _ref = read.m; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 5: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 6; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 5; continue; - } - k = _entry.k; - e = _entry.v; - _tuple$2 = e.load(); - v = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - _i++; - /* continue; */ $s = 5; continue; - } - _r = f(k, v); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!_r) { */ case 7: - /* break; */ $s = 6; continue; - /* } */ case 8: - _i++; - $s = 5; continue; - case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.Range, $c: true, $r, _entry, _i, _keys, _r, _ref, _tuple, _tuple$1, _tuple$2, e, f, k, m, ok, read, v, $s};return $f; - }; - Map.prototype.Range = function(f) { return this.$val.Range(f); }; - Map.ptr.prototype.missLocked = function() { - var m, x; - m = this; - m.misses = m.misses + (1) >> 0; - if (m.misses < $keys(m.dirty).length) { - return; - } - m.read.Store((x = new readOnly.ptr(m.dirty, false), new x.constructor.elem(x))); - m.dirty = false; - m.misses = 0; - }; - Map.prototype.missLocked = function() { return this.$val.missLocked(); }; - Map.ptr.prototype.dirtyLocked = function() { - var _entry, _i, _key, _keys, _ref, _tuple, e, k, m, read, x; - m = this; - if (!(m.dirty === false)) { - return; - } - _tuple = $assertType(m.read.Load(), readOnly, true); - read = $clone(_tuple[0], readOnly); - m.dirty = (x = $keys(read.m).length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = read.m; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - e = _entry.v; - if (!e.tryExpungeLocked()) { - _key = k; (m.dirty || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: e }; - } - _i++; - } - }; - Map.prototype.dirtyLocked = function() { return this.$val.dirtyLocked(); }; - entry.ptr.prototype.tryExpungeLocked = function() { - var e, isExpunged, p; - isExpunged = false; - e = this; - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - while (true) { - if (!(p === 0)) { break; } - if (atomic.CompareAndSwapPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e))), 0, expunged)) { - isExpunged = true; - return isExpunged; - } - p = atomic.LoadPointer((e.$ptr_p || (e.$ptr_p = new ptrType$5(function() { return this.$target.p; }, function($v) { this.$target.p = $v; }, e)))); - } - isExpunged = p === expunged; - return isExpunged; - }; - entry.prototype.tryExpungeLocked = function() { return this.$val.tryExpungeLocked(); }; - NewCond = function(l) { - var l; - return new Cond.ptr(new noCopy.ptr(), l, new notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil); - }; - $pkg.NewCond = NewCond; - noCopy.ptr.prototype.Lock = function() { - }; - noCopy.prototype.Lock = function() { return this.$val.Lock(); }; - noCopy.ptr.prototype.Unlock = function() { - }; - noCopy.prototype.Unlock = function() { return this.$val.Unlock(); }; - WaitGroup.ptr.prototype.Add = function(delta) { - var delta, wg; - wg = this; - wg.counter = wg.counter + (delta) >> 0; - if (wg.counter < 0) { - $panic(new $String("sync: negative WaitGroup counter")); - } - if (wg.counter > 0 && wg.ch === $chanNil) { - wg.ch = new $Chan(structType, 0); - } - if ((wg.counter === 0) && !(wg.ch === $chanNil)) { - $close(wg.ch); - wg.ch = $chanNil; - } - }; - WaitGroup.prototype.Add = function(delta) { return this.$val.Add(delta); }; - WaitGroup.ptr.prototype.Wait = function() { - var {_r, wg, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wg = this; - /* */ if (wg.counter > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (wg.counter > 0) { */ case 1: - _r = $recv(wg.ch); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r[0]; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: WaitGroup.ptr.prototype.Wait, $c: true, $r, _r, wg, $s};return $f; - }; - WaitGroup.prototype.Wait = function() { return this.$val.Wait(); }; - runtime_Semacquire = function(s) { - var {s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = runtime_SemacquireMutex(s, false, 1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: runtime_Semacquire, $c: true, $r, s, $s};return $f; - }; - $linknames["sync.runtime_Semacquire"] = runtime_Semacquire; - runtime_SemacquireMutex = function(s, lifo, skipframes) { - var {_entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _key$1, _key$2, _r, ch, lifo, s, skipframes, $s, $r, $c} = $restore(this, {s, lifo, skipframes}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (((s.$get() - (_entry = semAwoken[ptrType$1.keyFor(s)], _entry !== undefined ? _entry.v : 0) >>> 0)) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (((s.$get() - (_entry = semAwoken[ptrType$1.keyFor(s)], _entry !== undefined ? _entry.v : 0) >>> 0)) === 0) { */ case 1: - ch = new $Chan($Bool, 0); - if (lifo) { - _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: $appendSlice(new sliceType$2([ch]), (_entry$1 = semWaiters[ptrType$1.keyFor(s)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil)) }; - } else { - _key$1 = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$2 = semWaiters[ptrType$1.keyFor(s)], _entry$2 !== undefined ? _entry$2.v : sliceType$2.nil), ch) }; - } - _r = $recv(ch); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r[0]; - _key$2 = s; (semAwoken || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key$2)] = { k: _key$2, v: (_entry$3 = semAwoken[ptrType$1.keyFor(s)], _entry$3 !== undefined ? _entry$3.v : 0) - (1) >>> 0 }; - if ((_entry$4 = semAwoken[ptrType$1.keyFor(s)], _entry$4 !== undefined ? _entry$4.v : 0) === 0) { - delete semAwoken[ptrType$1.keyFor(s)]; - } - /* } */ case 2: - s.$set(s.$get() - (1) >>> 0); - $s = -1; return; - /* */ } return; } var $f = {$blk: runtime_SemacquireMutex, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _key$1, _key$2, _r, ch, lifo, s, skipframes, $s};return $f; - }; - runtime_Semrelease = function(s, handoff, skipframes) { - var {_entry, _entry$1, _key, _key$1, ch, handoff, s, skipframes, w, $s, $r, $c} = $restore(this, {s, handoff, skipframes}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s.$set(s.$get() + (1) >>> 0); - w = (_entry = semWaiters[ptrType$1.keyFor(s)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (w.$length === 0) { - $s = -1; return; - } - ch = (0 >= w.$length ? ($throwRuntimeError("index out of range"), undefined) : w.$array[w.$offset + 0]); - w = $subslice(w, 1); - _key = s; (semWaiters || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: w }; - if (w.$length === 0) { - delete semWaiters[ptrType$1.keyFor(s)]; - } - _key$1 = s; (semAwoken || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key$1)] = { k: _key$1, v: (_entry$1 = semAwoken[ptrType$1.keyFor(s)], _entry$1 !== undefined ? _entry$1.v : 0) + (1) >>> 0 }; - $r = $send(ch, true); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: runtime_Semrelease, $c: true, $r, _entry, _entry$1, _key, _key$1, ch, handoff, s, skipframes, w, $s};return $f; - }; - $linknames["sync.runtime_Semrelease"] = runtime_Semrelease; - runtime_notifyListCheck = function(size) { - var size; - }; - runtime_canSpin = function(i) { - var i; - return false; - }; - runtime_nanotime = function() { - return $mul64($internalize(new ($global.Date)().getTime(), $Int64), new $Int64(0, 1000000)); - }; - throw$1 = function(s) { - var s; - $throwRuntimeError($externalize(s, $String)); - }; - Pool.ptr.prototype.Get = function() { - var {$24r, _r, p, x, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (p.store.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.store.$length === 0) { */ case 1: - /* */ if (!(p.New === $throwNilPointerError)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(p.New === $throwNilPointerError)) { */ case 3: - _r = p.New(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 6; case 6: return $24r; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* } */ case 2: - x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0)); - $s = -1; return x$2; - /* */ } return; } var $f = {$blk: Pool.ptr.prototype.Get, $c: true, $r, $24r, _r, p, x, x$1, x$2, $s};return $f; - }; - Pool.prototype.Get = function() { return this.$val.Get(); }; - Pool.ptr.prototype.Put = function(x) { - var p, x; - p = this; - if ($interfaceIsEqual(x, $ifaceNil)) { - return; - } - p.store = $append(p.store, x); - }; - Pool.prototype.Put = function(x) { return this.$val.Put(x); }; - Cond.ptr.prototype.Wait = function() { - var {_r, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - c.n = c.n + (1) >> 0; - if (c.ch === $chanNil) { - c.ch = new $Chan($Bool, 0); - } - $r = c.L.Unlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = $recv(c.ch); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r[0]; - $r = c.L.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Cond.ptr.prototype.Wait, $c: true, $r, _r, c, $s};return $f; - }; - Cond.prototype.Wait = function() { return this.$val.Wait(); }; - Cond.ptr.prototype.Signal = function() { - var {c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.n === 0) { - $s = -1; return; - } - c.n = c.n - (1) >> 0; - $r = $send(c.ch, true); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Cond.ptr.prototype.Signal, $c: true, $r, c, $s};return $f; - }; - Cond.prototype.Signal = function() { return this.$val.Signal(); }; - Cond.ptr.prototype.Broadcast = function() { - var {c, i, n, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - n = c.n; - c.n = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } - $r = $send(c.ch, true); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Cond.ptr.prototype.Broadcast, $c: true, $r, c, i, n, $s};return $f; - }; - Cond.prototype.Broadcast = function() { return this.$val.Broadcast(); }; - ptrType$4.methods = [{prop: "RLock", name: "RLock", pkg: "", typ: $funcType([], [], false)}, {prop: "TryRLock", name: "TryRLock", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "RUnlock", name: "RUnlock", pkg: "", typ: $funcType([], [], false)}, {prop: "rUnlockSlow", name: "rUnlockSlow", pkg: "sync", typ: $funcType([$Int32], [], false)}, {prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "TryLock", name: "TryLock", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "RLocker", name: "RLocker", pkg: "", typ: $funcType([], [Locker], false)}]; - ptrType$3.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; - ptrType$14.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "doSlow", name: "doSlow", pkg: "sync", typ: $funcType([funcType], [], false)}]; - ptrType$15.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "TryLock", name: "TryLock", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "lockSlow", name: "lockSlow", pkg: "sync", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}, {prop: "unlockSlow", name: "unlockSlow", pkg: "sync", typ: $funcType([$Int32], [], false)}]; - ptrType$16.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [], false)}, {prop: "LoadOrStore", name: "LoadOrStore", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "LoadAndDelete", name: "LoadAndDelete", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$1], [], false)}, {prop: "missLocked", name: "missLocked", pkg: "sync", typ: $funcType([], [], false)}, {prop: "dirtyLocked", name: "dirtyLocked", pkg: "sync", typ: $funcType([], [], false)}]; - ptrType$10.methods = [{prop: "load", name: "load", pkg: "sync", typ: $funcType([], [$emptyInterface, $Bool], false)}, {prop: "tryStore", name: "tryStore", pkg: "sync", typ: $funcType([ptrType$9], [$Bool], false)}, {prop: "unexpungeLocked", name: "unexpungeLocked", pkg: "sync", typ: $funcType([], [$Bool], false)}, {prop: "storeLocked", name: "storeLocked", pkg: "sync", typ: $funcType([ptrType$9], [], false)}, {prop: "tryLoadOrStore", name: "tryLoadOrStore", pkg: "sync", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool, $Bool], false)}, {prop: "delete$", name: "delete", pkg: "sync", typ: $funcType([], [$emptyInterface, $Bool], false)}, {prop: "tryExpungeLocked", name: "tryExpungeLocked", pkg: "sync", typ: $funcType([], [$Bool], false)}]; - ptrType$17.methods = [{prop: "check", name: "check", pkg: "sync", typ: $funcType([], [], false)}]; - ptrType$18.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; - ptrType$19.methods = [{prop: "state", name: "state", pkg: "sync", typ: $funcType([], [ptrType, ptrType$1], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; - ptrType$20.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}]; - ptrType$21.methods = [{prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}, {prop: "Signal", name: "Signal", pkg: "", typ: $funcType([], [], false)}, {prop: "Broadcast", name: "Broadcast", pkg: "", typ: $funcType([], [], false)}]; - RWMutex.init("sync", [{prop: "w", name: "w", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", embedded: false, exported: false, typ: $Int32, tag: ""}]); - rlocker.init("sync", [{prop: "w", name: "w", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "writerSem", name: "writerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerSem", name: "readerSem", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "readerCount", name: "readerCount", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "readerWait", name: "readerWait", embedded: false, exported: false, typ: $Int32, tag: ""}]); - notifyList.init("sync", [{prop: "wait", name: "wait", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "notify", name: "notify", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "lock", name: "lock", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "head", name: "head", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "tail", name: "tail", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}]); - Once.init("sync", [{prop: "done", name: "done", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: Mutex, tag: ""}]); - Mutex.init("sync", [{prop: "state", name: "state", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "sema", name: "sema", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - Locker.init([{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]); - Map.init("sync", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: Mutex, tag: ""}, {prop: "read", name: "read", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "dirty", name: "dirty", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "misses", name: "misses", embedded: false, exported: false, typ: $Int, tag: ""}]); - readOnly.init("sync", [{prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "amended", name: "amended", embedded: false, exported: false, typ: $Bool, tag: ""}]); - entry.init("sync", [{prop: "p", name: "p", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}]); - noCopy.init("", []); - WaitGroup.init("sync", [{prop: "counter", name: "counter", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "state1", name: "state1", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "state2", name: "state2", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - Pool.init("sync", [{prop: "store", name: "store", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "New", name: "New", embedded: false, exported: true, typ: funcType$2, tag: ""}]); - Cond.init("sync", [{prop: "noCopy", name: "noCopy", embedded: false, exported: false, typ: noCopy, tag: ""}, {prop: "L", name: "L", embedded: false, exported: true, typ: Locker, tag: ""}, {prop: "notify", name: "notify", embedded: false, exported: false, typ: notifyList, tag: ""}, {prop: "checker", name: "checker", embedded: false, exported: false, typ: copyChecker, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = race.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - expunged = (new Uint8Array(8)); - semWaiters = {}; - semAwoken = {}; - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["io"] = (function() { - var $pkg = {}, $init, errors, sync, eofReader, multiReader, Reader, Writer, Closer, ReadWriter, ReadCloser, WriteCloser, ReadWriteCloser, ReaderFrom, WriterTo, ReaderAt, ByteReader, ByteScanner, ByteWriter, RuneScanner, StringWriter, LimitedReader, SectionReader, discard, nopCloser, sliceType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, ptrType$3, ptrType$8, errInvalidWrite, errWhence, errOffset, blackHolePool, x, MultiReader, WriteString, ReadAtLeast, ReadFull, CopyN, Copy, CopyBuffer, copyBuffer, LimitReader, NewSectionReader, NopCloser, ReadAll; - errors = $packages["errors"]; - sync = $packages["sync"]; - eofReader = $pkg.eofReader = $newType(0, $kindStruct, "io.eofReader", true, "io", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - multiReader = $pkg.multiReader = $newType(0, $kindStruct, "io.multiReader", true, "io", false, function(readers_) { - this.$val = this; - if (arguments.length === 0) { - this.readers = sliceType$2.nil; - return; - } - this.readers = readers_; - }); - Reader = $pkg.Reader = $newType(8, $kindInterface, "io.Reader", true, "io", true, null); - Writer = $pkg.Writer = $newType(8, $kindInterface, "io.Writer", true, "io", true, null); - Closer = $pkg.Closer = $newType(8, $kindInterface, "io.Closer", true, "io", true, null); - ReadWriter = $pkg.ReadWriter = $newType(8, $kindInterface, "io.ReadWriter", true, "io", true, null); - ReadCloser = $pkg.ReadCloser = $newType(8, $kindInterface, "io.ReadCloser", true, "io", true, null); - WriteCloser = $pkg.WriteCloser = $newType(8, $kindInterface, "io.WriteCloser", true, "io", true, null); - ReadWriteCloser = $pkg.ReadWriteCloser = $newType(8, $kindInterface, "io.ReadWriteCloser", true, "io", true, null); - ReaderFrom = $pkg.ReaderFrom = $newType(8, $kindInterface, "io.ReaderFrom", true, "io", true, null); - WriterTo = $pkg.WriterTo = $newType(8, $kindInterface, "io.WriterTo", true, "io", true, null); - ReaderAt = $pkg.ReaderAt = $newType(8, $kindInterface, "io.ReaderAt", true, "io", true, null); - ByteReader = $pkg.ByteReader = $newType(8, $kindInterface, "io.ByteReader", true, "io", true, null); - ByteScanner = $pkg.ByteScanner = $newType(8, $kindInterface, "io.ByteScanner", true, "io", true, null); - ByteWriter = $pkg.ByteWriter = $newType(8, $kindInterface, "io.ByteWriter", true, "io", true, null); - RuneScanner = $pkg.RuneScanner = $newType(8, $kindInterface, "io.RuneScanner", true, "io", true, null); - StringWriter = $pkg.StringWriter = $newType(8, $kindInterface, "io.StringWriter", true, "io", true, null); - LimitedReader = $pkg.LimitedReader = $newType(0, $kindStruct, "io.LimitedReader", true, "io", true, function(R_, N_) { - this.$val = this; - if (arguments.length === 0) { - this.R = $ifaceNil; - this.N = new $Int64(0, 0); - return; - } - this.R = R_; - this.N = N_; - }); - SectionReader = $pkg.SectionReader = $newType(0, $kindStruct, "io.SectionReader", true, "io", true, function(r_, base_, off_, limit_) { - this.$val = this; - if (arguments.length === 0) { - this.r = $ifaceNil; - this.base = new $Int64(0, 0); - this.off = new $Int64(0, 0); - this.limit = new $Int64(0, 0); - return; - } - this.r = r_; - this.base = base_; - this.off = off_; - this.limit = limit_; - }); - discard = $pkg.discard = $newType(0, $kindStruct, "io.discard", true, "io", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - nopCloser = $pkg.nopCloser = $newType(0, $kindStruct, "io.nopCloser", true, "io", false, function(Reader_) { - this.$val = this; - if (arguments.length === 0) { - this.Reader = $ifaceNil; - return; - } - this.Reader = Reader_; - }); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - ptrType$1 = $ptrType(sliceType$1); - ptrType$2 = $ptrType(multiReader); - sliceType$2 = $sliceType(Reader); - ptrType$3 = $ptrType(LimitedReader); - ptrType$8 = $ptrType(SectionReader); - eofReader.ptr.prototype.Read = function(param) { - var param; - return [0, $pkg.EOF]; - }; - eofReader.prototype.Read = function(param) { return this.$val.Read(param); }; - multiReader.ptr.prototype.Read = function(p) { - var {_r, _tmp, _tmp$1, _tuple, _tuple$1, err, mr, n, ok, p, r, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - mr = this; - /* while (true) { */ case 1: - /* if (!(mr.readers.$length > 0)) { break; } */ if(!(mr.readers.$length > 0)) { $s = 2; continue; } - if (mr.readers.$length === 1) { - _tuple = $assertType((x$2 = mr.readers, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), ptrType$2, true); - r = _tuple[0]; - ok = _tuple[1]; - if (ok) { - mr.readers = r.readers; - /* continue; */ $s = 1; continue; - } - } - _r = (x$3 = mr.readers, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])).Read(p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - n = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $pkg.EOF)) { - (x$5 = mr.readers, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0] = (x$4 = new eofReader.ptr(), new x$4.constructor.elem(x$4)))); - mr.readers = $subslice(mr.readers, 1); - } - if (n > 0 || !($interfaceIsEqual(err, $pkg.EOF))) { - if ($interfaceIsEqual(err, $pkg.EOF) && mr.readers.$length > 0) { - err = $ifaceNil; - } - $s = -1; return [n, err]; - } - $s = 1; continue; - case 2: - _tmp = 0; - _tmp$1 = $pkg.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: multiReader.ptr.prototype.Read, $c: true, $r, _r, _tmp, _tmp$1, _tuple, _tuple$1, err, mr, n, ok, p, r, x$2, x$3, x$4, x$5, $s};return $f; - }; - multiReader.prototype.Read = function(p) { return this.$val.Read(p); }; - MultiReader = function(readers) { - var r, readers; - r = $makeSlice(sliceType$2, readers.$length); - $copySlice(r, readers); - return new multiReader.ptr(r); - }; - $pkg.MultiReader = MultiReader; - WriteString = function(w, s) { - var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, err, n, ok, s, sw, w, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - _tuple = $assertType(w, StringWriter, true); - sw = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = sw.WriteString(s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = w.Write((new sliceType$1($stringToBytes(s)))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - n = _tuple$2[0]; - err = _tuple$2[1]; - $24r$1 = [n, err]; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: WriteString, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, err, n, ok, s, sw, w, $s};return $f; - }; - $pkg.WriteString = WriteString; - ReadAtLeast = function(r, buf, min) { - var {_r, _tmp, _tmp$1, _tuple, buf, err, min, n, nn, r, $s, $r, $c} = $restore(this, {r, buf, min}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - if (buf.$length < min) { - _tmp = 0; - _tmp$1 = $pkg.ErrShortBuffer; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* while (true) { */ case 1: - /* if (!(n < min && $interfaceIsEqual(err, $ifaceNil))) { break; } */ if(!(n < min && $interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - nn = 0; - _r = r.Read($subslice(buf, n)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - nn = _tuple[0]; - err = _tuple[1]; - n = n + (nn) >> 0; - $s = 1; continue; - case 2: - if (n >= min) { - err = $ifaceNil; - } else if (n > 0 && $interfaceIsEqual(err, $pkg.EOF)) { - err = $pkg.ErrUnexpectedEOF; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: ReadAtLeast, $c: true, $r, _r, _tmp, _tmp$1, _tuple, buf, err, min, n, nn, r, $s};return $f; - }; - $pkg.ReadAtLeast = ReadAtLeast; - ReadFull = function(r, buf) { - var {$24r, _r, _tuple, buf, err, n, r, $s, $r, $c} = $restore(this, {r, buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - _r = ReadAtLeast(r, buf, buf.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ReadFull, $c: true, $r, $24r, _r, _tuple, buf, err, n, r, $s};return $f; - }; - $pkg.ReadFull = ReadFull; - CopyN = function(dst, src, n) { - var {_r, _tmp, _tmp$1, _tuple, dst, err, n, src, written, $s, $r, $c} = $restore(this, {dst, src, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - written = new $Int64(0, 0); - err = $ifaceNil; - _r = Copy(dst, LimitReader(src, n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - written = _tuple[0]; - err = _tuple[1]; - if ((written.$high === n.$high && written.$low === n.$low)) { - _tmp = n; - _tmp$1 = $ifaceNil; - written = _tmp; - err = _tmp$1; - $s = -1; return [written, err]; - } - if ((written.$high < n.$high || (written.$high === n.$high && written.$low < n.$low)) && $interfaceIsEqual(err, $ifaceNil)) { - err = $pkg.EOF; - } - $s = -1; return [written, err]; - /* */ } return; } var $f = {$blk: CopyN, $c: true, $r, _r, _tmp, _tmp$1, _tuple, dst, err, n, src, written, $s};return $f; - }; - $pkg.CopyN = CopyN; - Copy = function(dst, src) { - var {$24r, _r, _tuple, dst, err, src, written, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - written = new $Int64(0, 0); - err = $ifaceNil; - _r = copyBuffer(dst, src, sliceType$1.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - written = _tuple[0]; - err = _tuple[1]; - $24r = [written, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Copy, $c: true, $r, $24r, _r, _tuple, dst, err, src, written, $s};return $f; - }; - $pkg.Copy = Copy; - CopyBuffer = function(dst, src, buf) { - var {$24r, _r, _tuple, buf, dst, err, src, written, $s, $r, $c} = $restore(this, {dst, src, buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - written = new $Int64(0, 0); - err = $ifaceNil; - if (!(buf === sliceType$1.nil) && (buf.$length === 0)) { - $panic(new $String("empty buffer in CopyBuffer")); - } - _r = copyBuffer(dst, src, buf); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - written = _tuple[0]; - err = _tuple[1]; - $24r = [written, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: CopyBuffer, $c: true, $r, $24r, _r, _tuple, buf, dst, err, src, written, $s};return $f; - }; - $pkg.CopyBuffer = CopyBuffer; - copyBuffer = function(dst, src, buf) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, buf, dst, er, err, ew, l, nr, nw, ok, ok$1, ok$2, rt, size, src, written, wt, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {dst, src, buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - written = new $Int64(0, 0); - err = $ifaceNil; - _tuple = $assertType(src, WriterTo, true); - wt = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = wt.WriteTo(dst); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - written = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [written, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _tuple$2 = $assertType(dst, ReaderFrom, true); - rt = _tuple$2[0]; - ok$1 = _tuple$2[1]; - /* */ if (ok$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ok$1) { */ case 5: - _r$1 = rt.ReadFrom(src); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$3 = _r$1; - written = _tuple$3[0]; - err = _tuple$3[1]; - $24r$1 = [written, err]; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - if (buf === sliceType$1.nil) { - size = 32768; - _tuple$4 = $assertType(src, ptrType$3, true); - l = _tuple$4[0]; - ok$2 = _tuple$4[1]; - if (ok$2 && (x$2 = (new $Int64(0, size)), x$3 = l.N, (x$2.$high > x$3.$high || (x$2.$high === x$3.$high && x$2.$low > x$3.$low)))) { - if ((x$4 = l.N, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low < 1)))) { - size = 1; - } else { - size = (((x$5 = l.N, x$5.$low + ((x$5.$high >> 31) * 4294967296)) >> 0)); - } - } - buf = $makeSlice(sliceType$1, size); - } - /* while (true) { */ case 9: - _r$2 = src.Read(buf); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$5 = _r$2; - nr = _tuple$5[0]; - er = _tuple$5[1]; - /* */ if (nr > 0) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (nr > 0) { */ case 12: - _r$3 = dst.Write($subslice(buf, 0, nr)); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$6 = _r$3; - nw = _tuple$6[0]; - ew = _tuple$6[1]; - if (nw < 0 || nr < nw) { - nw = 0; - if ($interfaceIsEqual(ew, $ifaceNil)) { - ew = errInvalidWrite; - } - } - written = (x$6 = (new $Int64(0, nw)), new $Int64(written.$high + x$6.$high, written.$low + x$6.$low)); - if (!($interfaceIsEqual(ew, $ifaceNil))) { - err = ew; - /* break; */ $s = 10; continue; - } - if (!((nr === nw))) { - err = $pkg.ErrShortWrite; - /* break; */ $s = 10; continue; - } - /* } */ case 13: - if (!($interfaceIsEqual(er, $ifaceNil))) { - if (!($interfaceIsEqual(er, $pkg.EOF))) { - err = er; - } - /* break; */ $s = 10; continue; - } - $s = 9; continue; - case 10: - _tmp = written; - _tmp$1 = err; - written = _tmp; - err = _tmp$1; - $s = -1; return [written, err]; - /* */ } return; } var $f = {$blk: copyBuffer, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, buf, dst, er, err, ew, l, nr, nw, ok, ok$1, ok$2, rt, size, src, written, wt, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - LimitReader = function(r, n) { - var n, r; - return new LimitedReader.ptr(r, n); - }; - $pkg.LimitReader = LimitReader; - LimitedReader.ptr.prototype.Read = function(p) { - var {_r, _tmp, _tmp$1, _tuple, err, l, n, p, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - l = this; - if ((x$2 = l.N, (x$2.$high < 0 || (x$2.$high === 0 && x$2.$low <= 0)))) { - _tmp = 0; - _tmp$1 = $pkg.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - if ((x$3 = (new $Int64(0, p.$length)), x$4 = l.N, (x$3.$high > x$4.$high || (x$3.$high === x$4.$high && x$3.$low > x$4.$low)))) { - p = $subslice(p, 0, $flatten64(l.N)); - } - _r = l.R.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - l.N = (x$5 = l.N, x$6 = (new $Int64(0, n)), new $Int64(x$5.$high - x$6.$high, x$5.$low - x$6.$low)); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: LimitedReader.ptr.prototype.Read, $c: true, $r, _r, _tmp, _tmp$1, _tuple, err, l, n, p, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - LimitedReader.prototype.Read = function(p) { return this.$val.Read(p); }; - NewSectionReader = function(r, off, n) { - var n, off, r, remaining, x$2; - remaining = new $Int64(0, 0); - if ((x$2 = new $Int64(2147483647 - n.$high, 4294967295 - n.$low), (off.$high < x$2.$high || (off.$high === x$2.$high && off.$low <= x$2.$low)))) { - remaining = new $Int64(n.$high + off.$high, n.$low + off.$low); - } else { - remaining = new $Int64(2147483647, 4294967295); - } - return new SectionReader.ptr(r, off, off, remaining); - }; - $pkg.NewSectionReader = NewSectionReader; - SectionReader.ptr.prototype.Read = function(p) { - var {_r, _tmp, _tmp$1, _tuple, err, max, n, p, s, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - s = this; - if ((x$2 = s.off, x$3 = s.limit, (x$2.$high > x$3.$high || (x$2.$high === x$3.$high && x$2.$low >= x$3.$low)))) { - _tmp = 0; - _tmp$1 = $pkg.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - max = (x$4 = s.limit, x$5 = s.off, new $Int64(x$4.$high - x$5.$high, x$4.$low - x$5.$low)); - if ((x$6 = (new $Int64(0, p.$length)), (x$6.$high > max.$high || (x$6.$high === max.$high && x$6.$low > max.$low)))) { - p = $subslice(p, 0, $flatten64(max)); - } - _r = s.r.ReadAt(p, s.off); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - s.off = (x$7 = s.off, x$8 = (new $Int64(0, n)), new $Int64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: SectionReader.ptr.prototype.Read, $c: true, $r, _r, _tmp, _tmp$1, _tuple, err, max, n, p, s, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s};return $f; - }; - SectionReader.prototype.Read = function(p) { return this.$val.Read(p); }; - SectionReader.ptr.prototype.Seek = function(offset, whence) { - var _1, offset, s, whence, x$2, x$3, x$4, x$5, x$6; - s = this; - _1 = whence; - if (_1 === (0)) { - offset = (x$2 = s.base, new $Int64(offset.$high + x$2.$high, offset.$low + x$2.$low)); - } else if (_1 === (1)) { - offset = (x$3 = s.off, new $Int64(offset.$high + x$3.$high, offset.$low + x$3.$low)); - } else if (_1 === (2)) { - offset = (x$4 = s.limit, new $Int64(offset.$high + x$4.$high, offset.$low + x$4.$low)); - } else { - return [new $Int64(0, 0), errWhence]; - } - if ((x$5 = s.base, (offset.$high < x$5.$high || (offset.$high === x$5.$high && offset.$low < x$5.$low)))) { - return [new $Int64(0, 0), errOffset]; - } - s.off = offset; - return [(x$6 = s.base, new $Int64(offset.$high - x$6.$high, offset.$low - x$6.$low)), $ifaceNil]; - }; - SectionReader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; - SectionReader.ptr.prototype.ReadAt = function(p, off) { - var {$24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, max, n, off, p, s, x$2, x$3, x$4, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {p, off}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - s = this; - if ((off.$high < 0 || (off.$high === 0 && off.$low < 0)) || (x$2 = (x$3 = s.limit, x$4 = s.base, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), (off.$high > x$2.$high || (off.$high === x$2.$high && off.$low >= x$2.$low)))) { - _tmp = 0; - _tmp$1 = $pkg.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - off = (x$5 = s.base, new $Int64(off.$high + x$5.$high, off.$low + x$5.$low)); - max = (x$6 = s.limit, new $Int64(x$6.$high - off.$high, x$6.$low - off.$low)); - /* */ if ((x$7 = (new $Int64(0, p.$length)), (x$7.$high > max.$high || (x$7.$high === max.$high && x$7.$low > max.$low)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x$7 = (new $Int64(0, p.$length)), (x$7.$high > max.$high || (x$7.$high === max.$high && x$7.$low > max.$low)))) { */ case 1: - p = $subslice(p, 0, $flatten64(max)); - _r = s.r.ReadAt(p, off); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - err = $pkg.EOF; - } - _tmp$2 = n; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* } */ case 2: - _r$1 = s.r.ReadAt(p, off); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: SectionReader.ptr.prototype.ReadAt, $c: true, $r, $24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, max, n, off, p, s, x$2, x$3, x$4, x$5, x$6, x$7, $s};return $f; - }; - SectionReader.prototype.ReadAt = function(p, off) { return this.$val.ReadAt(p, off); }; - SectionReader.ptr.prototype.Size = function() { - var s, x$2, x$3; - s = this; - return (x$2 = s.limit, x$3 = s.base, new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)); - }; - SectionReader.prototype.Size = function() { return this.$val.Size(); }; - discard.ptr.prototype.Write = function(p) { - var p; - return [p.$length, $ifaceNil]; - }; - discard.prototype.Write = function(p) { return this.$val.Write(p); }; - discard.ptr.prototype.WriteString = function(s) { - var s; - return [s.length, $ifaceNil]; - }; - discard.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - discard.ptr.prototype.ReadFrom = function(r) { - var {_r, _r$1, _tmp, _tmp$1, _tuple, bufp, err, n, r, readSize, x$2, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - _r = blackHolePool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - bufp = $assertType(_r, ptrType$1); - readSize = 0; - /* while (true) { */ case 2: - _r$1 = r.Read(bufp.$get()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - readSize = _tuple[0]; - err = _tuple[1]; - n = (x$2 = (new $Int64(0, readSize)), new $Int64(n.$high + x$2.$high, n.$low + x$2.$low)); - if (!($interfaceIsEqual(err, $ifaceNil))) { - blackHolePool.Put(bufp); - if ($interfaceIsEqual(err, $pkg.EOF)) { - _tmp = n; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - $s = -1; return [n, err]; - } - $s = 2; continue; - case 3: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: discard.ptr.prototype.ReadFrom, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tuple, bufp, err, n, r, readSize, x$2, $s};return $f; - }; - discard.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; - NopCloser = function(r) { - var r, x$2; - return (x$2 = new nopCloser.ptr(r), new x$2.constructor.elem(x$2)); - }; - $pkg.NopCloser = NopCloser; - nopCloser.ptr.prototype.Close = function() { - return $ifaceNil; - }; - nopCloser.prototype.Close = function() { return this.$val.Close(); }; - ReadAll = function(r) { - var {_r, _tuple, b, err, n, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = $makeSlice(sliceType$1, 0, 512); - /* while (true) { */ case 1: - if (b.$length === b.$capacity) { - b = $subslice($append(b, 0), 0, b.$length); - } - _r = r.Read($subslice(b, b.$length, b.$capacity)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - b = $subslice(b, 0, (b.$length + n >> 0)); - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, $pkg.EOF)) { - err = $ifaceNil; - } - $s = -1; return [b, err]; - } - $s = 1; continue; - case 2: - $s = -1; return [sliceType$1.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: ReadAll, $c: true, $r, _r, _tuple, b, err, n, r, $s};return $f; - }; - $pkg.ReadAll = ReadAll; - eofReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; - ptrType$2.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; - ptrType$3.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; - ptrType$8.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}]; - discard.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([Reader], [$Int64, $error], false)}]; - nopCloser.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - eofReader.init("", []); - multiReader.init("io", [{prop: "readers", name: "readers", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - Reader.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - Writer.init([{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - Closer.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]); - ReadWriter.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - ReadCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - WriteCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - ReadWriteCloser.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - ReaderFrom.init([{prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([Reader], [$Int64, $error], false)}]); - WriterTo.init([{prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([Writer], [$Int64, $error], false)}]); - ReaderAt.init([{prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}]); - ByteReader.init([{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}]); - ByteScanner.init([{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}]); - ByteWriter.init([{prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}]); - RuneScanner.init([{prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}]); - StringWriter.init([{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]); - LimitedReader.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: Reader, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int64, tag: ""}]); - SectionReader.init("io", [{prop: "r", name: "r", embedded: false, exported: false, typ: ReaderAt, tag: ""}, {prop: "base", name: "base", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "limit", name: "limit", embedded: false, exported: false, typ: $Int64, tag: ""}]); - discard.init("", []); - nopCloser.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: Reader, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrClosedPipe = errors.New("io: read/write on closed pipe"); - $pkg.ErrShortWrite = errors.New("short write"); - errInvalidWrite = errors.New("invalid write result"); - $pkg.ErrShortBuffer = errors.New("short buffer"); - $pkg.EOF = errors.New("EOF"); - $pkg.ErrUnexpectedEOF = errors.New("unexpected EOF"); - $pkg.ErrNoProgress = errors.New("multiple Read calls return no data or error"); - errWhence = errors.New("Seek: invalid whence"); - errOffset = errors.New("Seek: invalid offset"); - $pkg.Discard = (x = new discard.ptr(), new x.constructor.elem(x)); - blackHolePool = new sync.Pool.ptr(sliceType.nil, (function() { - var b, b$24ptr; - b = $makeSlice(sliceType$1, 8192); - return (b$24ptr || (b$24ptr = new ptrType$1(function() { return b; }, function($v) { b = $convertSliceType($v, sliceType$1); }))); - })); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["unicode"] = (function() { - var $pkg = {}, $init, RangeTable, Range16, Range32, CaseRange, d, foldPair, sliceType, sliceType$1, sliceType$2, sliceType$3, arrayType, _L, _Nd, _White_Space, _CaseRanges, properties, asciiFold, caseOrbit, is16, is32, Is, isExcludingLatin, To, ToUpper, ToLower, SimpleFold, IsLetter, IsSpace, IsDigit, to; - RangeTable = $pkg.RangeTable = $newType(0, $kindStruct, "unicode.RangeTable", true, "unicode", true, function(R16_, R32_, LatinOffset_) { - this.$val = this; - if (arguments.length === 0) { - this.R16 = sliceType.nil; - this.R32 = sliceType$1.nil; - this.LatinOffset = 0; - return; - } - this.R16 = R16_; - this.R32 = R32_; - this.LatinOffset = LatinOffset_; - }); - Range16 = $pkg.Range16 = $newType(0, $kindStruct, "unicode.Range16", true, "unicode", true, function(Lo_, Hi_, Stride_) { - this.$val = this; - if (arguments.length === 0) { - this.Lo = 0; - this.Hi = 0; - this.Stride = 0; - return; - } - this.Lo = Lo_; - this.Hi = Hi_; - this.Stride = Stride_; - }); - Range32 = $pkg.Range32 = $newType(0, $kindStruct, "unicode.Range32", true, "unicode", true, function(Lo_, Hi_, Stride_) { - this.$val = this; - if (arguments.length === 0) { - this.Lo = 0; - this.Hi = 0; - this.Stride = 0; - return; - } - this.Lo = Lo_; - this.Hi = Hi_; - this.Stride = Stride_; - }); - CaseRange = $pkg.CaseRange = $newType(0, $kindStruct, "unicode.CaseRange", true, "unicode", true, function(Lo_, Hi_, Delta_) { - this.$val = this; - if (arguments.length === 0) { - this.Lo = 0; - this.Hi = 0; - this.Delta = arrayType.zero(); - return; - } - this.Lo = Lo_; - this.Hi = Hi_; - this.Delta = Delta_; - }); - d = $pkg.d = $newType(12, $kindArray, "unicode.d", true, "unicode", false, null); - foldPair = $pkg.foldPair = $newType(0, $kindStruct, "unicode.foldPair", true, "unicode", false, function(From_, To_) { - this.$val = this; - if (arguments.length === 0) { - this.From = 0; - this.To = 0; - return; - } - this.From = From_; - this.To = To_; - }); - sliceType = $sliceType(Range16); - sliceType$1 = $sliceType(Range32); - sliceType$2 = $sliceType(foldPair); - sliceType$3 = $sliceType(CaseRange); - arrayType = $arrayType($Int32, 3); - is16 = function(ranges, r) { - var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges; - if (ranges.$length <= 18 || r <= 255) { - _ref = ranges; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - range_ = ((i < 0 || i >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + i]); - if (r < range_.Lo) { - return false; - } - if (r <= range_.Hi) { - return (range_.Stride === 1) || ((_r = ((r - range_.Lo << 16 >>> 16)) % range_.Stride, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0); - } - _i++; - } - return false; - } - lo = 0; - hi = ranges.$length; - while (true) { - if (!(lo < hi)) { break; } - m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - range_$1 = ((m < 0 || m >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + m]); - if (range_$1.Lo <= r && r <= range_$1.Hi) { - return (range_$1.Stride === 1) || ((_r$1 = ((r - range_$1.Lo << 16 >>> 16)) % range_$1.Stride, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0); - } - if (r < range_$1.Lo) { - hi = m; - } else { - lo = m + 1 >> 0; - } - } - return false; - }; - is32 = function(ranges, r) { - var _i, _q, _r, _r$1, _ref, hi, i, lo, m, r, range_, range_$1, ranges; - if (ranges.$length <= 18) { - _ref = ranges; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - range_ = ((i < 0 || i >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + i]); - if (r < range_.Lo) { - return false; - } - if (r <= range_.Hi) { - return (range_.Stride === 1) || ((_r = ((r - range_.Lo >>> 0)) % range_.Stride, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0); - } - _i++; - } - return false; - } - lo = 0; - hi = ranges.$length; - while (true) { - if (!(lo < hi)) { break; } - m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - range_$1 = $clone(((m < 0 || m >= ranges.$length) ? ($throwRuntimeError("index out of range"), undefined) : ranges.$array[ranges.$offset + m]), Range32); - if (range_$1.Lo <= r && r <= range_$1.Hi) { - return (range_$1.Stride === 1) || ((_r$1 = ((r - range_$1.Lo >>> 0)) % range_$1.Stride, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0); - } - if (r < range_$1.Lo) { - hi = m; - } else { - lo = m + 1 >> 0; - } - } - return false; - }; - Is = function(rangeTab, r) { - var r, r16, r32, rangeTab, x; - r16 = rangeTab.R16; - if (r16.$length > 0 && ((r >>> 0)) <= (((x = r16.$length - 1 >> 0, ((x < 0 || x >= r16.$length) ? ($throwRuntimeError("index out of range"), undefined) : r16.$array[r16.$offset + x])).Hi >>> 0))) { - return is16(r16, ((r << 16 >>> 16))); - } - r32 = rangeTab.R32; - if (r32.$length > 0 && r >= (((0 >= r32.$length ? ($throwRuntimeError("index out of range"), undefined) : r32.$array[r32.$offset + 0]).Lo >> 0))) { - return is32(r32, ((r >>> 0))); - } - return false; - }; - $pkg.Is = Is; - isExcludingLatin = function(rangeTab, r) { - var off, r, r16, r32, rangeTab, x; - r16 = rangeTab.R16; - off = rangeTab.LatinOffset; - if (r16.$length > off && ((r >>> 0)) <= (((x = r16.$length - 1 >> 0, ((x < 0 || x >= r16.$length) ? ($throwRuntimeError("index out of range"), undefined) : r16.$array[r16.$offset + x])).Hi >>> 0))) { - return is16($subslice(r16, off), ((r << 16 >>> 16))); - } - r32 = rangeTab.R32; - if (r32.$length > 0 && r >= (((0 >= r32.$length ? ($throwRuntimeError("index out of range"), undefined) : r32.$array[r32.$offset + 0]).Lo >> 0))) { - return is32(r32, ((r >>> 0))); - } - return false; - }; - To = function(_case, r) { - var _case, _tuple, r; - _tuple = to(_case, r, $pkg.CaseRanges); - r = _tuple[0]; - return r; - }; - $pkg.To = To; - ToUpper = function(r) { - var r; - if (r <= 127) { - if (97 <= r && r <= 122) { - r = r - (32) >> 0; - } - return r; - } - return To(0, r); - }; - $pkg.ToUpper = ToUpper; - ToLower = function(r) { - var r; - if (r <= 127) { - if (65 <= r && r <= 90) { - r = r + (32) >> 0; - } - return r; - } - return To(1, r); - }; - $pkg.ToLower = ToLower; - SimpleFold = function(r) { - var _q, hi, l, lo, m, r; - if (r < 0 || r > 1114111) { - return r; - } - if (((r >> 0)) < 128) { - return ((((r < 0 || r >= asciiFold.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiFold[r]) >> 0)); - } - lo = 0; - hi = caseOrbit.$length; - while (true) { - if (!(lo < hi)) { break; } - m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - if (((((m < 0 || m >= caseOrbit.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseOrbit.$array[caseOrbit.$offset + m]).From >> 0)) < r) { - lo = m + 1 >> 0; - } else { - hi = m; - } - } - if (lo < caseOrbit.$length && (((((lo < 0 || lo >= caseOrbit.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseOrbit.$array[caseOrbit.$offset + lo]).From >> 0)) === r)) { - return ((((lo < 0 || lo >= caseOrbit.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseOrbit.$array[caseOrbit.$offset + lo]).To >> 0)); - } - l = ToLower(r); - if (!((l === r))) { - return l; - } - return ToUpper(r); - }; - $pkg.SimpleFold = SimpleFold; - IsLetter = function(r) { - var r, x; - if (((r >>> 0)) <= 255) { - return !(((((x = ((r << 24 >>> 24)), ((x < 0 || x >= properties.length) ? ($throwRuntimeError("index out of range"), undefined) : properties[x])) & 96) >>> 0) === 0)); - } - return isExcludingLatin($pkg.Letter, r); - }; - $pkg.IsLetter = IsLetter; - IsSpace = function(r) { - var _1, r; - if (((r >>> 0)) <= 255) { - _1 = r; - if ((_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (13)) || (_1 === (32)) || (_1 === (133)) || (_1 === (160))) { - return true; - } - return false; - } - return isExcludingLatin($pkg.White_Space, r); - }; - $pkg.IsSpace = IsSpace; - IsDigit = function(r) { - var r; - if (r <= 255) { - return 48 <= r && r <= 57; - } - return isExcludingLatin($pkg.Digit, r); - }; - $pkg.IsDigit = IsDigit; - to = function(_case, r, caseRange) { - var _case, _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, caseRange, cr, delta, foundMapping, hi, lo, m, mappedRune, r, x; - mappedRune = 0; - foundMapping = false; - if (_case < 0 || 3 <= _case) { - _tmp = 65533; - _tmp$1 = false; - mappedRune = _tmp; - foundMapping = _tmp$1; - return [mappedRune, foundMapping]; - } - lo = 0; - hi = caseRange.$length; - while (true) { - if (!(lo < hi)) { break; } - m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - cr = ((m < 0 || m >= caseRange.$length) ? ($throwRuntimeError("index out of range"), undefined) : caseRange.$array[caseRange.$offset + m]); - if (((cr.Lo >> 0)) <= r && r <= ((cr.Hi >> 0))) { - delta = ((x = cr.Delta, ((_case < 0 || _case >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[_case]))); - if (delta > 1114111) { - _tmp$2 = ((cr.Lo >> 0)) + ((((((r - ((cr.Lo >> 0)) >> 0)) & ~1) >> 0) | (((_case & 1) >> 0)))) >> 0; - _tmp$3 = true; - mappedRune = _tmp$2; - foundMapping = _tmp$3; - return [mappedRune, foundMapping]; - } - _tmp$4 = r + delta >> 0; - _tmp$5 = true; - mappedRune = _tmp$4; - foundMapping = _tmp$5; - return [mappedRune, foundMapping]; - } - if (r < ((cr.Lo >> 0))) { - hi = m; - } else { - lo = m + 1 >> 0; - } - } - _tmp$6 = r; - _tmp$7 = false; - mappedRune = _tmp$6; - foundMapping = _tmp$7; - return [mappedRune, foundMapping]; - }; - RangeTable.init("", [{prop: "R16", name: "R16", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "R32", name: "R32", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "LatinOffset", name: "LatinOffset", embedded: false, exported: true, typ: $Int, tag: ""}]); - Range16.init("", [{prop: "Lo", name: "Lo", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Hi", name: "Hi", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Uint16, tag: ""}]); - Range32.init("", [{prop: "Lo", name: "Lo", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Hi", name: "Hi", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Stride", name: "Stride", embedded: false, exported: true, typ: $Uint32, tag: ""}]); - CaseRange.init("", [{prop: "Lo", name: "Lo", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Hi", name: "Hi", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Delta", name: "Delta", embedded: false, exported: true, typ: d, tag: ""}]); - d.init($Int32, 3); - foldPair.init("", [{prop: "From", name: "From", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "To", name: "To", embedded: false, exported: true, typ: $Uint16, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - _L = new RangeTable.ptr(new sliceType([new Range16.ptr(65, 90, 1), new Range16.ptr(97, 122, 1), new Range16.ptr(170, 181, 11), new Range16.ptr(186, 192, 6), new Range16.ptr(193, 214, 1), new Range16.ptr(216, 246, 1), new Range16.ptr(248, 705, 1), new Range16.ptr(710, 721, 1), new Range16.ptr(736, 740, 1), new Range16.ptr(748, 750, 2), new Range16.ptr(880, 884, 1), new Range16.ptr(886, 887, 1), new Range16.ptr(890, 893, 1), new Range16.ptr(895, 902, 7), new Range16.ptr(904, 906, 1), new Range16.ptr(908, 910, 2), new Range16.ptr(911, 929, 1), new Range16.ptr(931, 1013, 1), new Range16.ptr(1015, 1153, 1), new Range16.ptr(1162, 1327, 1), new Range16.ptr(1329, 1366, 1), new Range16.ptr(1369, 1376, 7), new Range16.ptr(1377, 1416, 1), new Range16.ptr(1488, 1514, 1), new Range16.ptr(1519, 1522, 1), new Range16.ptr(1568, 1610, 1), new Range16.ptr(1646, 1647, 1), new Range16.ptr(1649, 1747, 1), new Range16.ptr(1749, 1765, 16), new Range16.ptr(1766, 1774, 8), new Range16.ptr(1775, 1786, 11), new Range16.ptr(1787, 1788, 1), new Range16.ptr(1791, 1808, 17), new Range16.ptr(1810, 1839, 1), new Range16.ptr(1869, 1957, 1), new Range16.ptr(1969, 1994, 25), new Range16.ptr(1995, 2026, 1), new Range16.ptr(2036, 2037, 1), new Range16.ptr(2042, 2048, 6), new Range16.ptr(2049, 2069, 1), new Range16.ptr(2074, 2084, 10), new Range16.ptr(2088, 2112, 24), new Range16.ptr(2113, 2136, 1), new Range16.ptr(2144, 2154, 1), new Range16.ptr(2208, 2228, 1), new Range16.ptr(2230, 2247, 1), new Range16.ptr(2308, 2361, 1), new Range16.ptr(2365, 2384, 19), new Range16.ptr(2392, 2401, 1), new Range16.ptr(2417, 2432, 1), new Range16.ptr(2437, 2444, 1), new Range16.ptr(2447, 2448, 1), new Range16.ptr(2451, 2472, 1), new Range16.ptr(2474, 2480, 1), new Range16.ptr(2482, 2486, 4), new Range16.ptr(2487, 2489, 1), new Range16.ptr(2493, 2510, 17), new Range16.ptr(2524, 2525, 1), new Range16.ptr(2527, 2529, 1), new Range16.ptr(2544, 2545, 1), new Range16.ptr(2556, 2565, 9), new Range16.ptr(2566, 2570, 1), new Range16.ptr(2575, 2576, 1), new Range16.ptr(2579, 2600, 1), new Range16.ptr(2602, 2608, 1), new Range16.ptr(2610, 2611, 1), new Range16.ptr(2613, 2614, 1), new Range16.ptr(2616, 2617, 1), new Range16.ptr(2649, 2652, 1), new Range16.ptr(2654, 2674, 20), new Range16.ptr(2675, 2676, 1), new Range16.ptr(2693, 2701, 1), new Range16.ptr(2703, 2705, 1), new Range16.ptr(2707, 2728, 1), new Range16.ptr(2730, 2736, 1), new Range16.ptr(2738, 2739, 1), new Range16.ptr(2741, 2745, 1), new Range16.ptr(2749, 2768, 19), new Range16.ptr(2784, 2785, 1), new Range16.ptr(2809, 2821, 12), new Range16.ptr(2822, 2828, 1), new Range16.ptr(2831, 2832, 1), new Range16.ptr(2835, 2856, 1), new Range16.ptr(2858, 2864, 1), new Range16.ptr(2866, 2867, 1), new Range16.ptr(2869, 2873, 1), new Range16.ptr(2877, 2908, 31), new Range16.ptr(2909, 2911, 2), new Range16.ptr(2912, 2913, 1), new Range16.ptr(2929, 2947, 18), new Range16.ptr(2949, 2954, 1), new Range16.ptr(2958, 2960, 1), new Range16.ptr(2962, 2965, 1), new Range16.ptr(2969, 2970, 1), new Range16.ptr(2972, 2974, 2), new Range16.ptr(2975, 2979, 4), new Range16.ptr(2980, 2984, 4), new Range16.ptr(2985, 2986, 1), new Range16.ptr(2990, 3001, 1), new Range16.ptr(3024, 3077, 53), new Range16.ptr(3078, 3084, 1), new Range16.ptr(3086, 3088, 1), new Range16.ptr(3090, 3112, 1), new Range16.ptr(3114, 3129, 1), new Range16.ptr(3133, 3160, 27), new Range16.ptr(3161, 3162, 1), new Range16.ptr(3168, 3169, 1), new Range16.ptr(3200, 3205, 5), new Range16.ptr(3206, 3212, 1), new Range16.ptr(3214, 3216, 1), new Range16.ptr(3218, 3240, 1), new Range16.ptr(3242, 3251, 1), new Range16.ptr(3253, 3257, 1), new Range16.ptr(3261, 3294, 33), new Range16.ptr(3296, 3297, 1), new Range16.ptr(3313, 3314, 1), new Range16.ptr(3332, 3340, 1), new Range16.ptr(3342, 3344, 1), new Range16.ptr(3346, 3386, 1), new Range16.ptr(3389, 3406, 17), new Range16.ptr(3412, 3414, 1), new Range16.ptr(3423, 3425, 1), new Range16.ptr(3450, 3455, 1), new Range16.ptr(3461, 3478, 1), new Range16.ptr(3482, 3505, 1), new Range16.ptr(3507, 3515, 1), new Range16.ptr(3517, 3520, 3), new Range16.ptr(3521, 3526, 1), new Range16.ptr(3585, 3632, 1), new Range16.ptr(3634, 3635, 1), new Range16.ptr(3648, 3654, 1), new Range16.ptr(3713, 3714, 1), new Range16.ptr(3716, 3718, 2), new Range16.ptr(3719, 3722, 1), new Range16.ptr(3724, 3747, 1), new Range16.ptr(3749, 3751, 2), new Range16.ptr(3752, 3760, 1), new Range16.ptr(3762, 3763, 1), new Range16.ptr(3773, 3776, 3), new Range16.ptr(3777, 3780, 1), new Range16.ptr(3782, 3804, 22), new Range16.ptr(3805, 3807, 1), new Range16.ptr(3840, 3904, 64), new Range16.ptr(3905, 3911, 1), new Range16.ptr(3913, 3948, 1), new Range16.ptr(3976, 3980, 1), new Range16.ptr(4096, 4138, 1), new Range16.ptr(4159, 4176, 17), new Range16.ptr(4177, 4181, 1), new Range16.ptr(4186, 4189, 1), new Range16.ptr(4193, 4197, 4), new Range16.ptr(4198, 4206, 8), new Range16.ptr(4207, 4208, 1), new Range16.ptr(4213, 4225, 1), new Range16.ptr(4238, 4256, 18), new Range16.ptr(4257, 4293, 1), new Range16.ptr(4295, 4301, 6), new Range16.ptr(4304, 4346, 1), new Range16.ptr(4348, 4680, 1), new Range16.ptr(4682, 4685, 1), new Range16.ptr(4688, 4694, 1), new Range16.ptr(4696, 4698, 2), new Range16.ptr(4699, 4701, 1), new Range16.ptr(4704, 4744, 1), new Range16.ptr(4746, 4749, 1), new Range16.ptr(4752, 4784, 1), new Range16.ptr(4786, 4789, 1), new Range16.ptr(4792, 4798, 1), new Range16.ptr(4800, 4802, 2), new Range16.ptr(4803, 4805, 1), new Range16.ptr(4808, 4822, 1), new Range16.ptr(4824, 4880, 1), new Range16.ptr(4882, 4885, 1), new Range16.ptr(4888, 4954, 1), new Range16.ptr(4992, 5007, 1), new Range16.ptr(5024, 5109, 1), new Range16.ptr(5112, 5117, 1), new Range16.ptr(5121, 5740, 1), new Range16.ptr(5743, 5759, 1), new Range16.ptr(5761, 5786, 1), new Range16.ptr(5792, 5866, 1), new Range16.ptr(5873, 5880, 1), new Range16.ptr(5888, 5900, 1), new Range16.ptr(5902, 5905, 1), new Range16.ptr(5920, 5937, 1), new Range16.ptr(5952, 5969, 1), new Range16.ptr(5984, 5996, 1), new Range16.ptr(5998, 6000, 1), new Range16.ptr(6016, 6067, 1), new Range16.ptr(6103, 6108, 5), new Range16.ptr(6176, 6264, 1), new Range16.ptr(6272, 6276, 1), new Range16.ptr(6279, 6312, 1), new Range16.ptr(6314, 6320, 6), new Range16.ptr(6321, 6389, 1), new Range16.ptr(6400, 6430, 1), new Range16.ptr(6480, 6509, 1), new Range16.ptr(6512, 6516, 1), new Range16.ptr(6528, 6571, 1), new Range16.ptr(6576, 6601, 1), new Range16.ptr(6656, 6678, 1), new Range16.ptr(6688, 6740, 1), new Range16.ptr(6823, 6917, 94), new Range16.ptr(6918, 6963, 1), new Range16.ptr(6981, 6987, 1), new Range16.ptr(7043, 7072, 1), new Range16.ptr(7086, 7087, 1), new Range16.ptr(7098, 7141, 1), new Range16.ptr(7168, 7203, 1), new Range16.ptr(7245, 7247, 1), new Range16.ptr(7258, 7293, 1), new Range16.ptr(7296, 7304, 1), new Range16.ptr(7312, 7354, 1), new Range16.ptr(7357, 7359, 1), new Range16.ptr(7401, 7404, 1), new Range16.ptr(7406, 7411, 1), new Range16.ptr(7413, 7414, 1), new Range16.ptr(7418, 7424, 6), new Range16.ptr(7425, 7615, 1), new Range16.ptr(7680, 7957, 1), new Range16.ptr(7960, 7965, 1), new Range16.ptr(7968, 8005, 1), new Range16.ptr(8008, 8013, 1), new Range16.ptr(8016, 8023, 1), new Range16.ptr(8025, 8031, 2), new Range16.ptr(8032, 8061, 1), new Range16.ptr(8064, 8116, 1), new Range16.ptr(8118, 8124, 1), new Range16.ptr(8126, 8130, 4), new Range16.ptr(8131, 8132, 1), new Range16.ptr(8134, 8140, 1), new Range16.ptr(8144, 8147, 1), new Range16.ptr(8150, 8155, 1), new Range16.ptr(8160, 8172, 1), new Range16.ptr(8178, 8180, 1), new Range16.ptr(8182, 8188, 1), new Range16.ptr(8305, 8319, 14), new Range16.ptr(8336, 8348, 1), new Range16.ptr(8450, 8455, 5), new Range16.ptr(8458, 8467, 1), new Range16.ptr(8469, 8473, 4), new Range16.ptr(8474, 8477, 1), new Range16.ptr(8484, 8490, 2), new Range16.ptr(8491, 8493, 1), new Range16.ptr(8495, 8505, 1), new Range16.ptr(8508, 8511, 1), new Range16.ptr(8517, 8521, 1), new Range16.ptr(8526, 8579, 53), new Range16.ptr(8580, 11264, 2684), new Range16.ptr(11265, 11310, 1), new Range16.ptr(11312, 11358, 1), new Range16.ptr(11360, 11492, 1), new Range16.ptr(11499, 11502, 1), new Range16.ptr(11506, 11507, 1), new Range16.ptr(11520, 11557, 1), new Range16.ptr(11559, 11565, 6), new Range16.ptr(11568, 11623, 1), new Range16.ptr(11631, 11648, 17), new Range16.ptr(11649, 11670, 1), new Range16.ptr(11680, 11686, 1), new Range16.ptr(11688, 11694, 1), new Range16.ptr(11696, 11702, 1), new Range16.ptr(11704, 11710, 1), new Range16.ptr(11712, 11718, 1), new Range16.ptr(11720, 11726, 1), new Range16.ptr(11728, 11734, 1), new Range16.ptr(11736, 11742, 1), new Range16.ptr(11823, 12293, 470), new Range16.ptr(12294, 12337, 43), new Range16.ptr(12338, 12341, 1), new Range16.ptr(12347, 12348, 1), new Range16.ptr(12353, 12438, 1), new Range16.ptr(12445, 12447, 1), new Range16.ptr(12449, 12538, 1), new Range16.ptr(12540, 12543, 1), new Range16.ptr(12549, 12591, 1), new Range16.ptr(12593, 12686, 1), new Range16.ptr(12704, 12735, 1), new Range16.ptr(12784, 12799, 1), new Range16.ptr(13312, 19903, 1), new Range16.ptr(19968, 40956, 1), new Range16.ptr(40960, 42124, 1), new Range16.ptr(42192, 42237, 1), new Range16.ptr(42240, 42508, 1), new Range16.ptr(42512, 42527, 1), new Range16.ptr(42538, 42539, 1), new Range16.ptr(42560, 42606, 1), new Range16.ptr(42623, 42653, 1), new Range16.ptr(42656, 42725, 1), new Range16.ptr(42775, 42783, 1), new Range16.ptr(42786, 42888, 1), new Range16.ptr(42891, 42943, 1), new Range16.ptr(42946, 42954, 1), new Range16.ptr(42997, 43009, 1), new Range16.ptr(43011, 43013, 1), new Range16.ptr(43015, 43018, 1), new Range16.ptr(43020, 43042, 1), new Range16.ptr(43072, 43123, 1), new Range16.ptr(43138, 43187, 1), new Range16.ptr(43250, 43255, 1), new Range16.ptr(43259, 43261, 2), new Range16.ptr(43262, 43274, 12), new Range16.ptr(43275, 43301, 1), new Range16.ptr(43312, 43334, 1), new Range16.ptr(43360, 43388, 1), new Range16.ptr(43396, 43442, 1), new Range16.ptr(43471, 43488, 17), new Range16.ptr(43489, 43492, 1), new Range16.ptr(43494, 43503, 1), new Range16.ptr(43514, 43518, 1), new Range16.ptr(43520, 43560, 1), new Range16.ptr(43584, 43586, 1), new Range16.ptr(43588, 43595, 1), new Range16.ptr(43616, 43638, 1), new Range16.ptr(43642, 43646, 4), new Range16.ptr(43647, 43695, 1), new Range16.ptr(43697, 43701, 4), new Range16.ptr(43702, 43705, 3), new Range16.ptr(43706, 43709, 1), new Range16.ptr(43712, 43714, 2), new Range16.ptr(43739, 43741, 1), new Range16.ptr(43744, 43754, 1), new Range16.ptr(43762, 43764, 1), new Range16.ptr(43777, 43782, 1), new Range16.ptr(43785, 43790, 1), new Range16.ptr(43793, 43798, 1), new Range16.ptr(43808, 43814, 1), new Range16.ptr(43816, 43822, 1), new Range16.ptr(43824, 43866, 1), new Range16.ptr(43868, 43881, 1), new Range16.ptr(43888, 44002, 1), new Range16.ptr(44032, 55203, 1), new Range16.ptr(55216, 55238, 1), new Range16.ptr(55243, 55291, 1), new Range16.ptr(63744, 64109, 1), new Range16.ptr(64112, 64217, 1), new Range16.ptr(64256, 64262, 1), new Range16.ptr(64275, 64279, 1), new Range16.ptr(64285, 64287, 2), new Range16.ptr(64288, 64296, 1), new Range16.ptr(64298, 64310, 1), new Range16.ptr(64312, 64316, 1), new Range16.ptr(64318, 64320, 2), new Range16.ptr(64321, 64323, 2), new Range16.ptr(64324, 64326, 2), new Range16.ptr(64327, 64433, 1), new Range16.ptr(64467, 64829, 1), new Range16.ptr(64848, 64911, 1), new Range16.ptr(64914, 64967, 1), new Range16.ptr(65008, 65019, 1), new Range16.ptr(65136, 65140, 1), new Range16.ptr(65142, 65276, 1), new Range16.ptr(65313, 65338, 1), new Range16.ptr(65345, 65370, 1), new Range16.ptr(65382, 65470, 1), new Range16.ptr(65474, 65479, 1), new Range16.ptr(65482, 65487, 1), new Range16.ptr(65490, 65495, 1), new Range16.ptr(65498, 65500, 1)]), new sliceType$1([new Range32.ptr(65536, 65547, 1), new Range32.ptr(65549, 65574, 1), new Range32.ptr(65576, 65594, 1), new Range32.ptr(65596, 65597, 1), new Range32.ptr(65599, 65613, 1), new Range32.ptr(65616, 65629, 1), new Range32.ptr(65664, 65786, 1), new Range32.ptr(66176, 66204, 1), new Range32.ptr(66208, 66256, 1), new Range32.ptr(66304, 66335, 1), new Range32.ptr(66349, 66368, 1), new Range32.ptr(66370, 66377, 1), new Range32.ptr(66384, 66421, 1), new Range32.ptr(66432, 66461, 1), new Range32.ptr(66464, 66499, 1), new Range32.ptr(66504, 66511, 1), new Range32.ptr(66560, 66717, 1), new Range32.ptr(66736, 66771, 1), new Range32.ptr(66776, 66811, 1), new Range32.ptr(66816, 66855, 1), new Range32.ptr(66864, 66915, 1), new Range32.ptr(67072, 67382, 1), new Range32.ptr(67392, 67413, 1), new Range32.ptr(67424, 67431, 1), new Range32.ptr(67584, 67589, 1), new Range32.ptr(67592, 67594, 2), new Range32.ptr(67595, 67637, 1), new Range32.ptr(67639, 67640, 1), new Range32.ptr(67644, 67647, 3), new Range32.ptr(67648, 67669, 1), new Range32.ptr(67680, 67702, 1), new Range32.ptr(67712, 67742, 1), new Range32.ptr(67808, 67826, 1), new Range32.ptr(67828, 67829, 1), new Range32.ptr(67840, 67861, 1), new Range32.ptr(67872, 67897, 1), new Range32.ptr(67968, 68023, 1), new Range32.ptr(68030, 68031, 1), new Range32.ptr(68096, 68112, 16), new Range32.ptr(68113, 68115, 1), new Range32.ptr(68117, 68119, 1), new Range32.ptr(68121, 68149, 1), new Range32.ptr(68192, 68220, 1), new Range32.ptr(68224, 68252, 1), new Range32.ptr(68288, 68295, 1), new Range32.ptr(68297, 68324, 1), new Range32.ptr(68352, 68405, 1), new Range32.ptr(68416, 68437, 1), new Range32.ptr(68448, 68466, 1), new Range32.ptr(68480, 68497, 1), new Range32.ptr(68608, 68680, 1), new Range32.ptr(68736, 68786, 1), new Range32.ptr(68800, 68850, 1), new Range32.ptr(68864, 68899, 1), new Range32.ptr(69248, 69289, 1), new Range32.ptr(69296, 69297, 1), new Range32.ptr(69376, 69404, 1), new Range32.ptr(69415, 69424, 9), new Range32.ptr(69425, 69445, 1), new Range32.ptr(69552, 69572, 1), new Range32.ptr(69600, 69622, 1), new Range32.ptr(69635, 69687, 1), new Range32.ptr(69763, 69807, 1), new Range32.ptr(69840, 69864, 1), new Range32.ptr(69891, 69926, 1), new Range32.ptr(69956, 69959, 3), new Range32.ptr(69968, 70002, 1), new Range32.ptr(70006, 70019, 13), new Range32.ptr(70020, 70066, 1), new Range32.ptr(70081, 70084, 1), new Range32.ptr(70106, 70108, 2), new Range32.ptr(70144, 70161, 1), new Range32.ptr(70163, 70187, 1), new Range32.ptr(70272, 70278, 1), new Range32.ptr(70280, 70282, 2), new Range32.ptr(70283, 70285, 1), new Range32.ptr(70287, 70301, 1), new Range32.ptr(70303, 70312, 1), new Range32.ptr(70320, 70366, 1), new Range32.ptr(70405, 70412, 1), new Range32.ptr(70415, 70416, 1), new Range32.ptr(70419, 70440, 1), new Range32.ptr(70442, 70448, 1), new Range32.ptr(70450, 70451, 1), new Range32.ptr(70453, 70457, 1), new Range32.ptr(70461, 70480, 19), new Range32.ptr(70493, 70497, 1), new Range32.ptr(70656, 70708, 1), new Range32.ptr(70727, 70730, 1), new Range32.ptr(70751, 70753, 1), new Range32.ptr(70784, 70831, 1), new Range32.ptr(70852, 70853, 1), new Range32.ptr(70855, 71040, 185), new Range32.ptr(71041, 71086, 1), new Range32.ptr(71128, 71131, 1), new Range32.ptr(71168, 71215, 1), new Range32.ptr(71236, 71296, 60), new Range32.ptr(71297, 71338, 1), new Range32.ptr(71352, 71424, 72), new Range32.ptr(71425, 71450, 1), new Range32.ptr(71680, 71723, 1), new Range32.ptr(71840, 71903, 1), new Range32.ptr(71935, 71942, 1), new Range32.ptr(71945, 71948, 3), new Range32.ptr(71949, 71955, 1), new Range32.ptr(71957, 71958, 1), new Range32.ptr(71960, 71983, 1), new Range32.ptr(71999, 72001, 2), new Range32.ptr(72096, 72103, 1), new Range32.ptr(72106, 72144, 1), new Range32.ptr(72161, 72163, 2), new Range32.ptr(72192, 72203, 11), new Range32.ptr(72204, 72242, 1), new Range32.ptr(72250, 72272, 22), new Range32.ptr(72284, 72329, 1), new Range32.ptr(72349, 72384, 35), new Range32.ptr(72385, 72440, 1), new Range32.ptr(72704, 72712, 1), new Range32.ptr(72714, 72750, 1), new Range32.ptr(72768, 72818, 50), new Range32.ptr(72819, 72847, 1), new Range32.ptr(72960, 72966, 1), new Range32.ptr(72968, 72969, 1), new Range32.ptr(72971, 73008, 1), new Range32.ptr(73030, 73056, 26), new Range32.ptr(73057, 73061, 1), new Range32.ptr(73063, 73064, 1), new Range32.ptr(73066, 73097, 1), new Range32.ptr(73112, 73440, 328), new Range32.ptr(73441, 73458, 1), new Range32.ptr(73648, 73728, 80), new Range32.ptr(73729, 74649, 1), new Range32.ptr(74880, 75075, 1), new Range32.ptr(77824, 78894, 1), new Range32.ptr(82944, 83526, 1), new Range32.ptr(92160, 92728, 1), new Range32.ptr(92736, 92766, 1), new Range32.ptr(92880, 92909, 1), new Range32.ptr(92928, 92975, 1), new Range32.ptr(92992, 92995, 1), new Range32.ptr(93027, 93047, 1), new Range32.ptr(93053, 93071, 1), new Range32.ptr(93760, 93823, 1), new Range32.ptr(93952, 94026, 1), new Range32.ptr(94032, 94099, 67), new Range32.ptr(94100, 94111, 1), new Range32.ptr(94176, 94177, 1), new Range32.ptr(94179, 94208, 29), new Range32.ptr(94209, 100343, 1), new Range32.ptr(100352, 101589, 1), new Range32.ptr(101632, 101640, 1), new Range32.ptr(110592, 110878, 1), new Range32.ptr(110928, 110930, 1), new Range32.ptr(110948, 110951, 1), new Range32.ptr(110960, 111355, 1), new Range32.ptr(113664, 113770, 1), new Range32.ptr(113776, 113788, 1), new Range32.ptr(113792, 113800, 1), new Range32.ptr(113808, 113817, 1), new Range32.ptr(119808, 119892, 1), new Range32.ptr(119894, 119964, 1), new Range32.ptr(119966, 119967, 1), new Range32.ptr(119970, 119973, 3), new Range32.ptr(119974, 119977, 3), new Range32.ptr(119978, 119980, 1), new Range32.ptr(119982, 119993, 1), new Range32.ptr(119995, 119997, 2), new Range32.ptr(119998, 120003, 1), new Range32.ptr(120005, 120069, 1), new Range32.ptr(120071, 120074, 1), new Range32.ptr(120077, 120084, 1), new Range32.ptr(120086, 120092, 1), new Range32.ptr(120094, 120121, 1), new Range32.ptr(120123, 120126, 1), new Range32.ptr(120128, 120132, 1), new Range32.ptr(120134, 120138, 4), new Range32.ptr(120139, 120144, 1), new Range32.ptr(120146, 120485, 1), new Range32.ptr(120488, 120512, 1), new Range32.ptr(120514, 120538, 1), new Range32.ptr(120540, 120570, 1), new Range32.ptr(120572, 120596, 1), new Range32.ptr(120598, 120628, 1), new Range32.ptr(120630, 120654, 1), new Range32.ptr(120656, 120686, 1), new Range32.ptr(120688, 120712, 1), new Range32.ptr(120714, 120744, 1), new Range32.ptr(120746, 120770, 1), new Range32.ptr(120772, 120779, 1), new Range32.ptr(123136, 123180, 1), new Range32.ptr(123191, 123197, 1), new Range32.ptr(123214, 123584, 370), new Range32.ptr(123585, 123627, 1), new Range32.ptr(124928, 125124, 1), new Range32.ptr(125184, 125251, 1), new Range32.ptr(125259, 126464, 1205), new Range32.ptr(126465, 126467, 1), new Range32.ptr(126469, 126495, 1), new Range32.ptr(126497, 126498, 1), new Range32.ptr(126500, 126503, 3), new Range32.ptr(126505, 126514, 1), new Range32.ptr(126516, 126519, 1), new Range32.ptr(126521, 126523, 2), new Range32.ptr(126530, 126535, 5), new Range32.ptr(126537, 126541, 2), new Range32.ptr(126542, 126543, 1), new Range32.ptr(126545, 126546, 1), new Range32.ptr(126548, 126551, 3), new Range32.ptr(126553, 126561, 2), new Range32.ptr(126562, 126564, 2), new Range32.ptr(126567, 126570, 1), new Range32.ptr(126572, 126578, 1), new Range32.ptr(126580, 126583, 1), new Range32.ptr(126585, 126588, 1), new Range32.ptr(126590, 126592, 2), new Range32.ptr(126593, 126601, 1), new Range32.ptr(126603, 126619, 1), new Range32.ptr(126625, 126627, 1), new Range32.ptr(126629, 126633, 1), new Range32.ptr(126635, 126651, 1), new Range32.ptr(131072, 173789, 1), new Range32.ptr(173824, 177972, 1), new Range32.ptr(177984, 178205, 1), new Range32.ptr(178208, 183969, 1), new Range32.ptr(183984, 191456, 1), new Range32.ptr(194560, 195101, 1), new Range32.ptr(196608, 201546, 1)]), 6); - _Nd = new RangeTable.ptr(new sliceType([new Range16.ptr(48, 57, 1), new Range16.ptr(1632, 1641, 1), new Range16.ptr(1776, 1785, 1), new Range16.ptr(1984, 1993, 1), new Range16.ptr(2406, 2415, 1), new Range16.ptr(2534, 2543, 1), new Range16.ptr(2662, 2671, 1), new Range16.ptr(2790, 2799, 1), new Range16.ptr(2918, 2927, 1), new Range16.ptr(3046, 3055, 1), new Range16.ptr(3174, 3183, 1), new Range16.ptr(3302, 3311, 1), new Range16.ptr(3430, 3439, 1), new Range16.ptr(3558, 3567, 1), new Range16.ptr(3664, 3673, 1), new Range16.ptr(3792, 3801, 1), new Range16.ptr(3872, 3881, 1), new Range16.ptr(4160, 4169, 1), new Range16.ptr(4240, 4249, 1), new Range16.ptr(6112, 6121, 1), new Range16.ptr(6160, 6169, 1), new Range16.ptr(6470, 6479, 1), new Range16.ptr(6608, 6617, 1), new Range16.ptr(6784, 6793, 1), new Range16.ptr(6800, 6809, 1), new Range16.ptr(6992, 7001, 1), new Range16.ptr(7088, 7097, 1), new Range16.ptr(7232, 7241, 1), new Range16.ptr(7248, 7257, 1), new Range16.ptr(42528, 42537, 1), new Range16.ptr(43216, 43225, 1), new Range16.ptr(43264, 43273, 1), new Range16.ptr(43472, 43481, 1), new Range16.ptr(43504, 43513, 1), new Range16.ptr(43600, 43609, 1), new Range16.ptr(44016, 44025, 1), new Range16.ptr(65296, 65305, 1)]), new sliceType$1([new Range32.ptr(66720, 66729, 1), new Range32.ptr(68912, 68921, 1), new Range32.ptr(69734, 69743, 1), new Range32.ptr(69872, 69881, 1), new Range32.ptr(69942, 69951, 1), new Range32.ptr(70096, 70105, 1), new Range32.ptr(70384, 70393, 1), new Range32.ptr(70736, 70745, 1), new Range32.ptr(70864, 70873, 1), new Range32.ptr(71248, 71257, 1), new Range32.ptr(71360, 71369, 1), new Range32.ptr(71472, 71481, 1), new Range32.ptr(71904, 71913, 1), new Range32.ptr(72016, 72025, 1), new Range32.ptr(72784, 72793, 1), new Range32.ptr(73040, 73049, 1), new Range32.ptr(73120, 73129, 1), new Range32.ptr(92768, 92777, 1), new Range32.ptr(93008, 93017, 1), new Range32.ptr(120782, 120831, 1), new Range32.ptr(123200, 123209, 1), new Range32.ptr(123632, 123641, 1), new Range32.ptr(125264, 125273, 1), new Range32.ptr(130032, 130041, 1)]), 1); - $pkg.Digit = _Nd; - $pkg.Letter = _L; - _White_Space = new RangeTable.ptr(new sliceType([new Range16.ptr(9, 13, 1), new Range16.ptr(32, 133, 101), new Range16.ptr(160, 5760, 5600), new Range16.ptr(8192, 8202, 1), new Range16.ptr(8232, 8233, 1), new Range16.ptr(8239, 8287, 48), new Range16.ptr(12288, 12288, 1)]), sliceType$1.nil, 2); - $pkg.White_Space = _White_Space; - caseOrbit = new sliceType$2([new foldPair.ptr(75, 107), new foldPair.ptr(83, 115), new foldPair.ptr(107, 8490), new foldPair.ptr(115, 383), new foldPair.ptr(181, 924), new foldPair.ptr(197, 229), new foldPair.ptr(223, 7838), new foldPair.ptr(229, 8491), new foldPair.ptr(304, 304), new foldPair.ptr(305, 305), new foldPair.ptr(383, 83), new foldPair.ptr(452, 453), new foldPair.ptr(453, 454), new foldPair.ptr(454, 452), new foldPair.ptr(455, 456), new foldPair.ptr(456, 457), new foldPair.ptr(457, 455), new foldPair.ptr(458, 459), new foldPair.ptr(459, 460), new foldPair.ptr(460, 458), new foldPair.ptr(497, 498), new foldPair.ptr(498, 499), new foldPair.ptr(499, 497), new foldPair.ptr(837, 921), new foldPair.ptr(914, 946), new foldPair.ptr(917, 949), new foldPair.ptr(920, 952), new foldPair.ptr(921, 953), new foldPair.ptr(922, 954), new foldPair.ptr(924, 956), new foldPair.ptr(928, 960), new foldPair.ptr(929, 961), new foldPair.ptr(931, 962), new foldPair.ptr(934, 966), new foldPair.ptr(937, 969), new foldPair.ptr(946, 976), new foldPair.ptr(949, 1013), new foldPair.ptr(952, 977), new foldPair.ptr(953, 8126), new foldPair.ptr(954, 1008), new foldPair.ptr(956, 181), new foldPair.ptr(960, 982), new foldPair.ptr(961, 1009), new foldPair.ptr(962, 963), new foldPair.ptr(963, 931), new foldPair.ptr(966, 981), new foldPair.ptr(969, 8486), new foldPair.ptr(976, 914), new foldPair.ptr(977, 1012), new foldPair.ptr(981, 934), new foldPair.ptr(982, 928), new foldPair.ptr(1008, 922), new foldPair.ptr(1009, 929), new foldPair.ptr(1012, 920), new foldPair.ptr(1013, 917), new foldPair.ptr(1042, 1074), new foldPair.ptr(1044, 1076), new foldPair.ptr(1054, 1086), new foldPair.ptr(1057, 1089), new foldPair.ptr(1058, 1090), new foldPair.ptr(1066, 1098), new foldPair.ptr(1074, 7296), new foldPair.ptr(1076, 7297), new foldPair.ptr(1086, 7298), new foldPair.ptr(1089, 7299), new foldPair.ptr(1090, 7300), new foldPair.ptr(1098, 7302), new foldPair.ptr(1122, 1123), new foldPair.ptr(1123, 7303), new foldPair.ptr(7296, 1042), new foldPair.ptr(7297, 1044), new foldPair.ptr(7298, 1054), new foldPair.ptr(7299, 1057), new foldPair.ptr(7300, 7301), new foldPair.ptr(7301, 1058), new foldPair.ptr(7302, 1066), new foldPair.ptr(7303, 1122), new foldPair.ptr(7304, 42570), new foldPair.ptr(7776, 7777), new foldPair.ptr(7777, 7835), new foldPair.ptr(7835, 7776), new foldPair.ptr(7838, 223), new foldPair.ptr(8126, 837), new foldPair.ptr(8486, 937), new foldPair.ptr(8490, 75), new foldPair.ptr(8491, 197), new foldPair.ptr(42570, 42571), new foldPair.ptr(42571, 7304)]); - asciiFold = $toNativeArray($kindUint16, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 8490, 76, 77, 78, 79, 80, 81, 82, 383, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127]); - _CaseRanges = new sliceType$3([new CaseRange.ptr(65, 90, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(97, 122, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(181, 181, $toNativeArray($kindInt32, [743, 0, 743])), new CaseRange.ptr(192, 214, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(216, 222, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(224, 246, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(248, 254, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(255, 255, $toNativeArray($kindInt32, [121, 0, 121])), new CaseRange.ptr(256, 303, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(304, 304, $toNativeArray($kindInt32, [0, -199, 0])), new CaseRange.ptr(305, 305, $toNativeArray($kindInt32, [-232, 0, -232])), new CaseRange.ptr(306, 311, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(313, 328, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(330, 375, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(376, 376, $toNativeArray($kindInt32, [0, -121, 0])), new CaseRange.ptr(377, 382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(383, 383, $toNativeArray($kindInt32, [-300, 0, -300])), new CaseRange.ptr(384, 384, $toNativeArray($kindInt32, [195, 0, 195])), new CaseRange.ptr(385, 385, $toNativeArray($kindInt32, [0, 210, 0])), new CaseRange.ptr(386, 389, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(390, 390, $toNativeArray($kindInt32, [0, 206, 0])), new CaseRange.ptr(391, 392, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(393, 394, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(395, 396, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(398, 398, $toNativeArray($kindInt32, [0, 79, 0])), new CaseRange.ptr(399, 399, $toNativeArray($kindInt32, [0, 202, 0])), new CaseRange.ptr(400, 400, $toNativeArray($kindInt32, [0, 203, 0])), new CaseRange.ptr(401, 402, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(403, 403, $toNativeArray($kindInt32, [0, 205, 0])), new CaseRange.ptr(404, 404, $toNativeArray($kindInt32, [0, 207, 0])), new CaseRange.ptr(405, 405, $toNativeArray($kindInt32, [97, 0, 97])), new CaseRange.ptr(406, 406, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(407, 407, $toNativeArray($kindInt32, [0, 209, 0])), new CaseRange.ptr(408, 409, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(410, 410, $toNativeArray($kindInt32, [163, 0, 163])), new CaseRange.ptr(412, 412, $toNativeArray($kindInt32, [0, 211, 0])), new CaseRange.ptr(413, 413, $toNativeArray($kindInt32, [0, 213, 0])), new CaseRange.ptr(414, 414, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(415, 415, $toNativeArray($kindInt32, [0, 214, 0])), new CaseRange.ptr(416, 421, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(422, 422, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(423, 424, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(425, 425, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(428, 429, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(430, 430, $toNativeArray($kindInt32, [0, 218, 0])), new CaseRange.ptr(431, 432, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(433, 434, $toNativeArray($kindInt32, [0, 217, 0])), new CaseRange.ptr(435, 438, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(439, 439, $toNativeArray($kindInt32, [0, 219, 0])), new CaseRange.ptr(440, 441, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(444, 445, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(447, 447, $toNativeArray($kindInt32, [56, 0, 56])), new CaseRange.ptr(452, 452, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(453, 453, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(454, 454, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(455, 455, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(456, 456, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(457, 457, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(458, 458, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(459, 459, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(460, 460, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(461, 476, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(477, 477, $toNativeArray($kindInt32, [-79, 0, -79])), new CaseRange.ptr(478, 495, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(497, 497, $toNativeArray($kindInt32, [0, 2, 1])), new CaseRange.ptr(498, 498, $toNativeArray($kindInt32, [-1, 1, 0])), new CaseRange.ptr(499, 499, $toNativeArray($kindInt32, [-2, 0, -1])), new CaseRange.ptr(500, 501, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(502, 502, $toNativeArray($kindInt32, [0, -97, 0])), new CaseRange.ptr(503, 503, $toNativeArray($kindInt32, [0, -56, 0])), new CaseRange.ptr(504, 543, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(544, 544, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(546, 563, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(570, 570, $toNativeArray($kindInt32, [0, 10795, 0])), new CaseRange.ptr(571, 572, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(573, 573, $toNativeArray($kindInt32, [0, -163, 0])), new CaseRange.ptr(574, 574, $toNativeArray($kindInt32, [0, 10792, 0])), new CaseRange.ptr(575, 576, $toNativeArray($kindInt32, [10815, 0, 10815])), new CaseRange.ptr(577, 578, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(579, 579, $toNativeArray($kindInt32, [0, -195, 0])), new CaseRange.ptr(580, 580, $toNativeArray($kindInt32, [0, 69, 0])), new CaseRange.ptr(581, 581, $toNativeArray($kindInt32, [0, 71, 0])), new CaseRange.ptr(582, 591, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(592, 592, $toNativeArray($kindInt32, [10783, 0, 10783])), new CaseRange.ptr(593, 593, $toNativeArray($kindInt32, [10780, 0, 10780])), new CaseRange.ptr(594, 594, $toNativeArray($kindInt32, [10782, 0, 10782])), new CaseRange.ptr(595, 595, $toNativeArray($kindInt32, [-210, 0, -210])), new CaseRange.ptr(596, 596, $toNativeArray($kindInt32, [-206, 0, -206])), new CaseRange.ptr(598, 599, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(601, 601, $toNativeArray($kindInt32, [-202, 0, -202])), new CaseRange.ptr(603, 603, $toNativeArray($kindInt32, [-203, 0, -203])), new CaseRange.ptr(604, 604, $toNativeArray($kindInt32, [42319, 0, 42319])), new CaseRange.ptr(608, 608, $toNativeArray($kindInt32, [-205, 0, -205])), new CaseRange.ptr(609, 609, $toNativeArray($kindInt32, [42315, 0, 42315])), new CaseRange.ptr(611, 611, $toNativeArray($kindInt32, [-207, 0, -207])), new CaseRange.ptr(613, 613, $toNativeArray($kindInt32, [42280, 0, 42280])), new CaseRange.ptr(614, 614, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(616, 616, $toNativeArray($kindInt32, [-209, 0, -209])), new CaseRange.ptr(617, 617, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(618, 618, $toNativeArray($kindInt32, [42308, 0, 42308])), new CaseRange.ptr(619, 619, $toNativeArray($kindInt32, [10743, 0, 10743])), new CaseRange.ptr(620, 620, $toNativeArray($kindInt32, [42305, 0, 42305])), new CaseRange.ptr(623, 623, $toNativeArray($kindInt32, [-211, 0, -211])), new CaseRange.ptr(625, 625, $toNativeArray($kindInt32, [10749, 0, 10749])), new CaseRange.ptr(626, 626, $toNativeArray($kindInt32, [-213, 0, -213])), new CaseRange.ptr(629, 629, $toNativeArray($kindInt32, [-214, 0, -214])), new CaseRange.ptr(637, 637, $toNativeArray($kindInt32, [10727, 0, 10727])), new CaseRange.ptr(640, 640, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(642, 642, $toNativeArray($kindInt32, [42307, 0, 42307])), new CaseRange.ptr(643, 643, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(647, 647, $toNativeArray($kindInt32, [42282, 0, 42282])), new CaseRange.ptr(648, 648, $toNativeArray($kindInt32, [-218, 0, -218])), new CaseRange.ptr(649, 649, $toNativeArray($kindInt32, [-69, 0, -69])), new CaseRange.ptr(650, 651, $toNativeArray($kindInt32, [-217, 0, -217])), new CaseRange.ptr(652, 652, $toNativeArray($kindInt32, [-71, 0, -71])), new CaseRange.ptr(658, 658, $toNativeArray($kindInt32, [-219, 0, -219])), new CaseRange.ptr(669, 669, $toNativeArray($kindInt32, [42261, 0, 42261])), new CaseRange.ptr(670, 670, $toNativeArray($kindInt32, [42258, 0, 42258])), new CaseRange.ptr(837, 837, $toNativeArray($kindInt32, [84, 0, 84])), new CaseRange.ptr(880, 883, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(886, 887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(891, 893, $toNativeArray($kindInt32, [130, 0, 130])), new CaseRange.ptr(895, 895, $toNativeArray($kindInt32, [0, 116, 0])), new CaseRange.ptr(902, 902, $toNativeArray($kindInt32, [0, 38, 0])), new CaseRange.ptr(904, 906, $toNativeArray($kindInt32, [0, 37, 0])), new CaseRange.ptr(908, 908, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(910, 911, $toNativeArray($kindInt32, [0, 63, 0])), new CaseRange.ptr(913, 929, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(931, 939, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(940, 940, $toNativeArray($kindInt32, [-38, 0, -38])), new CaseRange.ptr(941, 943, $toNativeArray($kindInt32, [-37, 0, -37])), new CaseRange.ptr(945, 961, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(962, 962, $toNativeArray($kindInt32, [-31, 0, -31])), new CaseRange.ptr(963, 971, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(972, 972, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(973, 974, $toNativeArray($kindInt32, [-63, 0, -63])), new CaseRange.ptr(975, 975, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(976, 976, $toNativeArray($kindInt32, [-62, 0, -62])), new CaseRange.ptr(977, 977, $toNativeArray($kindInt32, [-57, 0, -57])), new CaseRange.ptr(981, 981, $toNativeArray($kindInt32, [-47, 0, -47])), new CaseRange.ptr(982, 982, $toNativeArray($kindInt32, [-54, 0, -54])), new CaseRange.ptr(983, 983, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(984, 1007, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1008, 1008, $toNativeArray($kindInt32, [-86, 0, -86])), new CaseRange.ptr(1009, 1009, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1010, 1010, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(1011, 1011, $toNativeArray($kindInt32, [-116, 0, -116])), new CaseRange.ptr(1012, 1012, $toNativeArray($kindInt32, [0, -60, 0])), new CaseRange.ptr(1013, 1013, $toNativeArray($kindInt32, [-96, 0, -96])), new CaseRange.ptr(1015, 1016, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1017, 1017, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(1018, 1019, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1021, 1023, $toNativeArray($kindInt32, [0, -130, 0])), new CaseRange.ptr(1024, 1039, $toNativeArray($kindInt32, [0, 80, 0])), new CaseRange.ptr(1040, 1071, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(1072, 1103, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(1104, 1119, $toNativeArray($kindInt32, [-80, 0, -80])), new CaseRange.ptr(1120, 1153, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1162, 1215, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1216, 1216, $toNativeArray($kindInt32, [0, 15, 0])), new CaseRange.ptr(1217, 1230, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1231, 1231, $toNativeArray($kindInt32, [-15, 0, -15])), new CaseRange.ptr(1232, 1327, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(1329, 1366, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(1377, 1414, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(4256, 4293, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4295, 4295, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4301, 4301, $toNativeArray($kindInt32, [0, 7264, 0])), new CaseRange.ptr(4304, 4346, $toNativeArray($kindInt32, [3008, 0, 0])), new CaseRange.ptr(4349, 4351, $toNativeArray($kindInt32, [3008, 0, 0])), new CaseRange.ptr(5024, 5103, $toNativeArray($kindInt32, [0, 38864, 0])), new CaseRange.ptr(5104, 5109, $toNativeArray($kindInt32, [0, 8, 0])), new CaseRange.ptr(5112, 5117, $toNativeArray($kindInt32, [-8, 0, -8])), new CaseRange.ptr(7296, 7296, $toNativeArray($kindInt32, [-6254, 0, -6254])), new CaseRange.ptr(7297, 7297, $toNativeArray($kindInt32, [-6253, 0, -6253])), new CaseRange.ptr(7298, 7298, $toNativeArray($kindInt32, [-6244, 0, -6244])), new CaseRange.ptr(7299, 7300, $toNativeArray($kindInt32, [-6242, 0, -6242])), new CaseRange.ptr(7301, 7301, $toNativeArray($kindInt32, [-6243, 0, -6243])), new CaseRange.ptr(7302, 7302, $toNativeArray($kindInt32, [-6236, 0, -6236])), new CaseRange.ptr(7303, 7303, $toNativeArray($kindInt32, [-6181, 0, -6181])), new CaseRange.ptr(7304, 7304, $toNativeArray($kindInt32, [35266, 0, 35266])), new CaseRange.ptr(7312, 7354, $toNativeArray($kindInt32, [0, -3008, 0])), new CaseRange.ptr(7357, 7359, $toNativeArray($kindInt32, [0, -3008, 0])), new CaseRange.ptr(7545, 7545, $toNativeArray($kindInt32, [35332, 0, 35332])), new CaseRange.ptr(7549, 7549, $toNativeArray($kindInt32, [3814, 0, 3814])), new CaseRange.ptr(7566, 7566, $toNativeArray($kindInt32, [35384, 0, 35384])), new CaseRange.ptr(7680, 7829, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7835, 7835, $toNativeArray($kindInt32, [-59, 0, -59])), new CaseRange.ptr(7838, 7838, $toNativeArray($kindInt32, [0, -7615, 0])), new CaseRange.ptr(7840, 7935, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(7936, 7943, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7944, 7951, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7952, 7957, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7960, 7965, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7968, 7975, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7976, 7983, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(7984, 7991, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(7992, 7999, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8000, 8005, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8008, 8013, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8017, 8017, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8019, 8019, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8021, 8021, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8023, 8023, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8025, 8025, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8027, 8027, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8029, 8029, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8031, 8031, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8032, 8039, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8040, 8047, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8048, 8049, $toNativeArray($kindInt32, [74, 0, 74])), new CaseRange.ptr(8050, 8053, $toNativeArray($kindInt32, [86, 0, 86])), new CaseRange.ptr(8054, 8055, $toNativeArray($kindInt32, [100, 0, 100])), new CaseRange.ptr(8056, 8057, $toNativeArray($kindInt32, [128, 0, 128])), new CaseRange.ptr(8058, 8059, $toNativeArray($kindInt32, [112, 0, 112])), new CaseRange.ptr(8060, 8061, $toNativeArray($kindInt32, [126, 0, 126])), new CaseRange.ptr(8064, 8071, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8072, 8079, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8080, 8087, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8088, 8095, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8096, 8103, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8104, 8111, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8112, 8113, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8115, 8115, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8120, 8121, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8122, 8123, $toNativeArray($kindInt32, [0, -74, 0])), new CaseRange.ptr(8124, 8124, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8126, 8126, $toNativeArray($kindInt32, [-7205, 0, -7205])), new CaseRange.ptr(8131, 8131, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8136, 8139, $toNativeArray($kindInt32, [0, -86, 0])), new CaseRange.ptr(8140, 8140, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8144, 8145, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8152, 8153, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8154, 8155, $toNativeArray($kindInt32, [0, -100, 0])), new CaseRange.ptr(8160, 8161, $toNativeArray($kindInt32, [8, 0, 8])), new CaseRange.ptr(8165, 8165, $toNativeArray($kindInt32, [7, 0, 7])), new CaseRange.ptr(8168, 8169, $toNativeArray($kindInt32, [0, -8, 0])), new CaseRange.ptr(8170, 8171, $toNativeArray($kindInt32, [0, -112, 0])), new CaseRange.ptr(8172, 8172, $toNativeArray($kindInt32, [0, -7, 0])), new CaseRange.ptr(8179, 8179, $toNativeArray($kindInt32, [9, 0, 9])), new CaseRange.ptr(8184, 8185, $toNativeArray($kindInt32, [0, -128, 0])), new CaseRange.ptr(8186, 8187, $toNativeArray($kindInt32, [0, -126, 0])), new CaseRange.ptr(8188, 8188, $toNativeArray($kindInt32, [0, -9, 0])), new CaseRange.ptr(8486, 8486, $toNativeArray($kindInt32, [0, -7517, 0])), new CaseRange.ptr(8490, 8490, $toNativeArray($kindInt32, [0, -8383, 0])), new CaseRange.ptr(8491, 8491, $toNativeArray($kindInt32, [0, -8262, 0])), new CaseRange.ptr(8498, 8498, $toNativeArray($kindInt32, [0, 28, 0])), new CaseRange.ptr(8526, 8526, $toNativeArray($kindInt32, [-28, 0, -28])), new CaseRange.ptr(8544, 8559, $toNativeArray($kindInt32, [0, 16, 0])), new CaseRange.ptr(8560, 8575, $toNativeArray($kindInt32, [-16, 0, -16])), new CaseRange.ptr(8579, 8580, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(9398, 9423, $toNativeArray($kindInt32, [0, 26, 0])), new CaseRange.ptr(9424, 9449, $toNativeArray($kindInt32, [-26, 0, -26])), new CaseRange.ptr(11264, 11310, $toNativeArray($kindInt32, [0, 48, 0])), new CaseRange.ptr(11312, 11358, $toNativeArray($kindInt32, [-48, 0, -48])), new CaseRange.ptr(11360, 11361, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11362, 11362, $toNativeArray($kindInt32, [0, -10743, 0])), new CaseRange.ptr(11363, 11363, $toNativeArray($kindInt32, [0, -3814, 0])), new CaseRange.ptr(11364, 11364, $toNativeArray($kindInt32, [0, -10727, 0])), new CaseRange.ptr(11365, 11365, $toNativeArray($kindInt32, [-10795, 0, -10795])), new CaseRange.ptr(11366, 11366, $toNativeArray($kindInt32, [-10792, 0, -10792])), new CaseRange.ptr(11367, 11372, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11373, 11373, $toNativeArray($kindInt32, [0, -10780, 0])), new CaseRange.ptr(11374, 11374, $toNativeArray($kindInt32, [0, -10749, 0])), new CaseRange.ptr(11375, 11375, $toNativeArray($kindInt32, [0, -10783, 0])), new CaseRange.ptr(11376, 11376, $toNativeArray($kindInt32, [0, -10782, 0])), new CaseRange.ptr(11378, 11379, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11381, 11382, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11390, 11391, $toNativeArray($kindInt32, [0, -10815, 0])), new CaseRange.ptr(11392, 11491, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11499, 11502, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11506, 11507, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(11520, 11557, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11559, 11559, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(11565, 11565, $toNativeArray($kindInt32, [-7264, 0, -7264])), new CaseRange.ptr(42560, 42605, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42624, 42651, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42786, 42799, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42802, 42863, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42873, 42876, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42877, 42877, $toNativeArray($kindInt32, [0, -35332, 0])), new CaseRange.ptr(42878, 42887, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42891, 42892, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42893, 42893, $toNativeArray($kindInt32, [0, -42280, 0])), new CaseRange.ptr(42896, 42899, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42900, 42900, $toNativeArray($kindInt32, [48, 0, 48])), new CaseRange.ptr(42902, 42921, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42922, 42922, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42923, 42923, $toNativeArray($kindInt32, [0, -42319, 0])), new CaseRange.ptr(42924, 42924, $toNativeArray($kindInt32, [0, -42315, 0])), new CaseRange.ptr(42925, 42925, $toNativeArray($kindInt32, [0, -42305, 0])), new CaseRange.ptr(42926, 42926, $toNativeArray($kindInt32, [0, -42308, 0])), new CaseRange.ptr(42928, 42928, $toNativeArray($kindInt32, [0, -42258, 0])), new CaseRange.ptr(42929, 42929, $toNativeArray($kindInt32, [0, -42282, 0])), new CaseRange.ptr(42930, 42930, $toNativeArray($kindInt32, [0, -42261, 0])), new CaseRange.ptr(42931, 42931, $toNativeArray($kindInt32, [0, 928, 0])), new CaseRange.ptr(42932, 42943, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42946, 42947, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42948, 42948, $toNativeArray($kindInt32, [0, -48, 0])), new CaseRange.ptr(42949, 42949, $toNativeArray($kindInt32, [0, -42307, 0])), new CaseRange.ptr(42950, 42950, $toNativeArray($kindInt32, [0, -35384, 0])), new CaseRange.ptr(42951, 42954, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(42997, 42998, $toNativeArray($kindInt32, [1114112, 1114112, 1114112])), new CaseRange.ptr(43859, 43859, $toNativeArray($kindInt32, [-928, 0, -928])), new CaseRange.ptr(43888, 43967, $toNativeArray($kindInt32, [-38864, 0, -38864])), new CaseRange.ptr(65313, 65338, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(65345, 65370, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(66560, 66599, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66600, 66639, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(66736, 66771, $toNativeArray($kindInt32, [0, 40, 0])), new CaseRange.ptr(66776, 66811, $toNativeArray($kindInt32, [-40, 0, -40])), new CaseRange.ptr(68736, 68786, $toNativeArray($kindInt32, [0, 64, 0])), new CaseRange.ptr(68800, 68850, $toNativeArray($kindInt32, [-64, 0, -64])), new CaseRange.ptr(71840, 71871, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(71872, 71903, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(93760, 93791, $toNativeArray($kindInt32, [0, 32, 0])), new CaseRange.ptr(93792, 93823, $toNativeArray($kindInt32, [-32, 0, -32])), new CaseRange.ptr(125184, 125217, $toNativeArray($kindInt32, [0, 34, 0])), new CaseRange.ptr(125218, 125251, $toNativeArray($kindInt32, [-34, 0, -34]))]); - $pkg.CaseRanges = _CaseRanges; - properties = $toNativeArray($kindUint8, [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 144, 130, 130, 130, 136, 130, 130, 130, 130, 130, 130, 136, 130, 130, 130, 130, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 130, 130, 136, 136, 136, 130, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 130, 130, 130, 136, 130, 136, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 130, 136, 130, 136, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 130, 136, 136, 136, 136, 136, 130, 136, 136, 224, 130, 136, 0, 136, 136, 136, 136, 132, 132, 136, 192, 130, 130, 136, 132, 224, 130, 132, 132, 132, 130, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 136, 160, 160, 160, 160, 160, 160, 160, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 136, 192, 192, 192, 192, 192, 192, 192, 192]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["unicode/utf8"] = (function() { - var $pkg = {}, $init, acceptRange, first, acceptRanges, FullRune, DecodeRune, DecodeRuneInString, DecodeLastRune, DecodeLastRuneInString, RuneLen, EncodeRune, RuneCount, RuneCountInString, RuneStart, Valid, ValidString, ValidRune; - acceptRange = $pkg.acceptRange = $newType(0, $kindStruct, "utf8.acceptRange", true, "unicode/utf8", false, function(lo_, hi_) { - this.$val = this; - if (arguments.length === 0) { - this.lo = 0; - this.hi = 0; - return; - } - this.lo = lo_; - this.hi = hi_; - }); - FullRune = function(p) { - var accept, n, p, x, x$1, x$2; - n = p.$length; - if (n === 0) { - return false; - } - x$1 = (x = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]), ((x < 0 || x >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[x])); - if (n >= ((((x$1 & 7) >>> 0) >> 0))) { - return true; - } - accept = $clone((x$2 = x$1 >>> 4 << 24 >>> 24, ((x$2 < 0 || x$2 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$2])), acceptRange); - if (n > 1 && ((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) < accept.lo || accept.hi < (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]))) { - return true; - } else if (n > 2 && ((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]) < 128 || 191 < (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]))) { - return true; - } - return false; - }; - $pkg.FullRune = FullRune; - DecodeRune = function(p) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, accept, b1, b2, b3, mask, n, p, p0, r, size, sz, x, x$1; - r = 0; - size = 0; - n = p.$length; - if (n < 1) { - _tmp = 65533; - _tmp$1 = 0; - r = _tmp; - size = _tmp$1; - return [r, size]; - } - p0 = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]); - x = ((p0 < 0 || p0 >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[p0]); - if (x >= 240) { - mask = (((x >> 0)) << 31 >> 0) >> 31 >> 0; - _tmp$2 = (((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) >> 0)) & ~mask) >> 0) | (65533 & mask); - _tmp$3 = 1; - r = _tmp$2; - size = _tmp$3; - return [r, size]; - } - sz = ((((x & 7) >>> 0) >> 0)); - accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); - if (n < sz) { - _tmp$4 = 65533; - _tmp$5 = 1; - r = _tmp$4; - size = _tmp$5; - return [r, size]; - } - b1 = (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]); - if (b1 < accept.lo || accept.hi < b1) { - _tmp$6 = 65533; - _tmp$7 = 1; - r = _tmp$6; - size = _tmp$7; - return [r, size]; - } - if (sz <= 2) { - _tmp$8 = (((((p0 & 31) >>> 0) >> 0)) << 6 >> 0) | ((((b1 & 63) >>> 0) >> 0)); - _tmp$9 = 2; - r = _tmp$8; - size = _tmp$9; - return [r, size]; - } - b2 = (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]); - if (b2 < 128 || 191 < b2) { - _tmp$10 = 65533; - _tmp$11 = 1; - r = _tmp$10; - size = _tmp$11; - return [r, size]; - } - if (sz <= 3) { - _tmp$12 = ((((((p0 & 15) >>> 0) >> 0)) << 12 >> 0) | (((((b1 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((b2 & 63) >>> 0) >> 0)); - _tmp$13 = 3; - r = _tmp$12; - size = _tmp$13; - return [r, size]; - } - b3 = (3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3]); - if (b3 < 128 || 191 < b3) { - _tmp$14 = 65533; - _tmp$15 = 1; - r = _tmp$14; - size = _tmp$15; - return [r, size]; - } - _tmp$16 = (((((((p0 & 7) >>> 0) >> 0)) << 18 >> 0) | (((((b1 & 63) >>> 0) >> 0)) << 12 >> 0)) | (((((b2 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((b3 & 63) >>> 0) >> 0)); - _tmp$17 = 4; - r = _tmp$16; - size = _tmp$17; - return [r, size]; - }; - $pkg.DecodeRune = DecodeRune; - DecodeRuneInString = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, accept, mask, n, r, s, s0, s1, s2, s3, size, sz, x, x$1; - r = 0; - size = 0; - n = s.length; - if (n < 1) { - _tmp = 65533; - _tmp$1 = 0; - r = _tmp; - size = _tmp$1; - return [r, size]; - } - s0 = s.charCodeAt(0); - x = ((s0 < 0 || s0 >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[s0]); - if (x >= 240) { - mask = (((x >> 0)) << 31 >> 0) >> 31 >> 0; - _tmp$2 = ((((s.charCodeAt(0) >> 0)) & ~mask) >> 0) | (65533 & mask); - _tmp$3 = 1; - r = _tmp$2; - size = _tmp$3; - return [r, size]; - } - sz = ((((x & 7) >>> 0) >> 0)); - accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); - if (n < sz) { - _tmp$4 = 65533; - _tmp$5 = 1; - r = _tmp$4; - size = _tmp$5; - return [r, size]; - } - s1 = s.charCodeAt(1); - if (s1 < accept.lo || accept.hi < s1) { - _tmp$6 = 65533; - _tmp$7 = 1; - r = _tmp$6; - size = _tmp$7; - return [r, size]; - } - if (sz <= 2) { - _tmp$8 = (((((s0 & 31) >>> 0) >> 0)) << 6 >> 0) | ((((s1 & 63) >>> 0) >> 0)); - _tmp$9 = 2; - r = _tmp$8; - size = _tmp$9; - return [r, size]; - } - s2 = s.charCodeAt(2); - if (s2 < 128 || 191 < s2) { - _tmp$10 = 65533; - _tmp$11 = 1; - r = _tmp$10; - size = _tmp$11; - return [r, size]; - } - if (sz <= 3) { - _tmp$12 = ((((((s0 & 15) >>> 0) >> 0)) << 12 >> 0) | (((((s1 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((s2 & 63) >>> 0) >> 0)); - _tmp$13 = 3; - r = _tmp$12; - size = _tmp$13; - return [r, size]; - } - s3 = s.charCodeAt(3); - if (s3 < 128 || 191 < s3) { - _tmp$14 = 65533; - _tmp$15 = 1; - r = _tmp$14; - size = _tmp$15; - return [r, size]; - } - _tmp$16 = (((((((s0 & 7) >>> 0) >> 0)) << 18 >> 0) | (((((s1 & 63) >>> 0) >> 0)) << 12 >> 0)) | (((((s2 & 63) >>> 0) >> 0)) << 6 >> 0)) | ((((s3 & 63) >>> 0) >> 0)); - _tmp$17 = 4; - r = _tmp$16; - size = _tmp$17; - return [r, size]; - }; - $pkg.DecodeRuneInString = DecodeRuneInString; - DecodeLastRune = function(p) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, p, r, size, start; - r = 0; - size = 0; - end = p.$length; - if (end === 0) { - _tmp = 65533; - _tmp$1 = 0; - r = _tmp; - size = _tmp$1; - return [r, size]; - } - start = end - 1 >> 0; - r = ((((start < 0 || start >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + start]) >> 0)); - if (r < 128) { - _tmp$2 = r; - _tmp$3 = 1; - r = _tmp$2; - size = _tmp$3; - return [r, size]; - } - lim = end - 4 >> 0; - if (lim < 0) { - lim = 0; - } - start = start - (1) >> 0; - while (true) { - if (!(start >= lim)) { break; } - if (RuneStart(((start < 0 || start >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + start]))) { - break; - } - start = start - (1) >> 0; - } - if (start < 0) { - start = 0; - } - _tuple = DecodeRune($subslice(p, start, end)); - r = _tuple[0]; - size = _tuple[1]; - if (!(((start + size >> 0) === end))) { - _tmp$4 = 65533; - _tmp$5 = 1; - r = _tmp$4; - size = _tmp$5; - return [r, size]; - } - _tmp$6 = r; - _tmp$7 = size; - r = _tmp$6; - size = _tmp$7; - return [r, size]; - }; - $pkg.DecodeLastRune = DecodeLastRune; - DecodeLastRuneInString = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, end, lim, r, s, size, start; - r = 0; - size = 0; - end = s.length; - if (end === 0) { - _tmp = 65533; - _tmp$1 = 0; - r = _tmp; - size = _tmp$1; - return [r, size]; - } - start = end - 1 >> 0; - r = ((s.charCodeAt(start) >> 0)); - if (r < 128) { - _tmp$2 = r; - _tmp$3 = 1; - r = _tmp$2; - size = _tmp$3; - return [r, size]; - } - lim = end - 4 >> 0; - if (lim < 0) { - lim = 0; - } - start = start - (1) >> 0; - while (true) { - if (!(start >= lim)) { break; } - if (RuneStart(s.charCodeAt(start))) { - break; - } - start = start - (1) >> 0; - } - if (start < 0) { - start = 0; - } - _tuple = DecodeRuneInString($substring(s, start, end)); - r = _tuple[0]; - size = _tuple[1]; - if (!(((start + size >> 0) === end))) { - _tmp$4 = 65533; - _tmp$5 = 1; - r = _tmp$4; - size = _tmp$5; - return [r, size]; - } - _tmp$6 = r; - _tmp$7 = size; - r = _tmp$6; - size = _tmp$7; - return [r, size]; - }; - $pkg.DecodeLastRuneInString = DecodeLastRuneInString; - RuneLen = function(r) { - var r; - if (r < 0) { - return -1; - } else if (r <= 127) { - return 1; - } else if (r <= 2047) { - return 2; - } else if (55296 <= r && r <= 57343) { - return -1; - } else if (r <= 65535) { - return 3; - } else if (r <= 1114111) { - return 4; - } - return -1; - }; - $pkg.RuneLen = RuneLen; - EncodeRune = function(p, r) { - var i, p, r; - i = ((r >>> 0)); - if (i <= 127) { - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((r << 24 >>> 24))); - return 1; - } else if (i <= 2047) { - $unused((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1])); - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((192 | (((r >> 6 >> 0) << 24 >>> 24))) >>> 0)); - (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - return 2; - } else if ((i > 1114111) || (55296 <= i && i <= 57343)) { - r = 65533; - $unused((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2])); - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((224 | (((r >> 12 >> 0) << 24 >>> 24))) >>> 0)); - (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | (((((r >> 6 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - return 3; - } else if (i <= 65535) { - $unused((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2])); - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((224 | (((r >> 12 >> 0) << 24 >>> 24))) >>> 0)); - (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | (((((r >> 6 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - return 3; - } else { - $unused((3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3])); - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = ((240 | (((r >> 18 >> 0) << 24 >>> 24))) >>> 0)); - (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = ((128 | (((((r >> 12 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = ((128 | (((((r >> 6 >> 0) << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - (3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3] = ((128 | ((((r << 24 >>> 24)) & 63) >>> 0)) >>> 0)); - return 4; - } - }; - $pkg.EncodeRune = EncodeRune; - RuneCount = function(p) { - var accept, c, c$1, c$2, c$3, i, n, np, p, size, x, x$1, x$2, x$3, x$4; - np = p.$length; - n = 0; - i = 0; - while (true) { - if (!(i < np)) { break; } - n = n + (1) >> 0; - c = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]); - if (c < 128) { - i = i + (1) >> 0; - continue; - } - x = ((c < 0 || c >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[c]); - if (x === 241) { - i = i + (1) >> 0; - continue; - } - size = ((((x & 7) >>> 0) >> 0)); - if ((i + size >> 0) > np) { - i = i + (1) >> 0; - continue; - } - accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); - c$1 = (x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])); - if (c$1 < accept.lo || accept.hi < c$1) { - size = 1; - } else if (size === 2) { - } else { - c$2 = (x$3 = i + 2 >> 0, ((x$3 < 0 || x$3 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$3])); - if (c$2 < 128 || 191 < c$2) { - size = 1; - } else if (size === 3) { - } else { - c$3 = (x$4 = i + 3 >> 0, ((x$4 < 0 || x$4 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$4])); - if (c$3 < 128 || 191 < c$3) { - size = 1; - } - } - } - i = i + (size) >> 0; - } - return n; - }; - $pkg.RuneCount = RuneCount; - RuneCountInString = function(s) { - var accept, c, c$1, c$2, c$3, i, n, ns, s, size, x, x$1; - n = 0; - ns = s.length; - i = 0; - while (true) { - if (!(i < ns)) { break; } - c = s.charCodeAt(i); - if (c < 128) { - i = i + (1) >> 0; - n = n + (1) >> 0; - continue; - } - x = ((c < 0 || c >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[c]); - if (x === 241) { - i = i + (1) >> 0; - n = n + (1) >> 0; - continue; - } - size = ((((x & 7) >>> 0) >> 0)); - if ((i + size >> 0) > ns) { - i = i + (1) >> 0; - n = n + (1) >> 0; - continue; - } - accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); - c$1 = s.charCodeAt((i + 1 >> 0)); - if (c$1 < accept.lo || accept.hi < c$1) { - size = 1; - } else if (size === 2) { - } else { - c$2 = s.charCodeAt((i + 2 >> 0)); - if (c$2 < 128 || 191 < c$2) { - size = 1; - } else if (size === 3) { - } else { - c$3 = s.charCodeAt((i + 3 >> 0)); - if (c$3 < 128 || 191 < c$3) { - size = 1; - } - } - } - i = i + (size) >> 0; - n = n + (1) >> 0; - } - n = n; - return n; - }; - $pkg.RuneCountInString = RuneCountInString; - RuneStart = function(b) { - var b; - return !((((b & 192) >>> 0) === 128)); - }; - $pkg.RuneStart = RuneStart; - Valid = function(p) { - var accept, c, c$1, c$2, first32, i, n, p, pi, second32, size, x, x$1, x$2, x$3, x$4; - while (true) { - if (!(p.$length >= 8)) { break; } - first32 = ((((((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) >>> 0)) | ((((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3]) >>> 0)) << 24 >>> 0)) >>> 0; - second32 = ((((((((4 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 4]) >>> 0)) | ((((5 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 5]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((6 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 6]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((7 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 7]) >>> 0)) << 24 >>> 0)) >>> 0; - if (!(((((((first32 | second32) >>> 0)) & 2155905152) >>> 0) === 0))) { - break; - } - p = $subslice(p, 8); - } - n = p.$length; - i = 0; - while (true) { - if (!(i < n)) { break; } - pi = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]); - if (pi < 128) { - i = i + (1) >> 0; - continue; - } - x = ((pi < 0 || pi >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[pi]); - if (x === 241) { - return false; - } - size = ((((x & 7) >>> 0) >> 0)); - if ((i + size >> 0) > n) { - return false; - } - accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); - c = (x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])); - if (c < accept.lo || accept.hi < c) { - return false; - } else if (size === 2) { - } else { - c$1 = (x$3 = i + 2 >> 0, ((x$3 < 0 || x$3 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$3])); - if (c$1 < 128 || 191 < c$1) { - return false; - } else if (size === 3) { - } else { - c$2 = (x$4 = i + 3 >> 0, ((x$4 < 0 || x$4 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$4])); - if (c$2 < 128 || 191 < c$2) { - return false; - } - } - } - i = i + (size) >> 0; - } - return true; - }; - $pkg.Valid = Valid; - ValidString = function(s) { - var accept, c, c$1, c$2, first32, i, n, s, second32, si, size, x, x$1; - while (true) { - if (!(s.length >= 8)) { break; } - first32 = (((((((s.charCodeAt(0) >>> 0)) | (((s.charCodeAt(1) >>> 0)) << 8 >>> 0)) >>> 0) | (((s.charCodeAt(2) >>> 0)) << 16 >>> 0)) >>> 0) | (((s.charCodeAt(3) >>> 0)) << 24 >>> 0)) >>> 0; - second32 = (((((((s.charCodeAt(4) >>> 0)) | (((s.charCodeAt(5) >>> 0)) << 8 >>> 0)) >>> 0) | (((s.charCodeAt(6) >>> 0)) << 16 >>> 0)) >>> 0) | (((s.charCodeAt(7) >>> 0)) << 24 >>> 0)) >>> 0; - if (!(((((((first32 | second32) >>> 0)) & 2155905152) >>> 0) === 0))) { - break; - } - s = $substring(s, 8); - } - n = s.length; - i = 0; - while (true) { - if (!(i < n)) { break; } - si = s.charCodeAt(i); - if (si < 128) { - i = i + (1) >> 0; - continue; - } - x = ((si < 0 || si >= first.length) ? ($throwRuntimeError("index out of range"), undefined) : first[si]); - if (x === 241) { - return false; - } - size = ((((x & 7) >>> 0) >> 0)); - if ((i + size >> 0) > n) { - return false; - } - accept = $clone((x$1 = x >>> 4 << 24 >>> 24, ((x$1 < 0 || x$1 >= acceptRanges.length) ? ($throwRuntimeError("index out of range"), undefined) : acceptRanges[x$1])), acceptRange); - c = s.charCodeAt((i + 1 >> 0)); - if (c < accept.lo || accept.hi < c) { - return false; - } else if (size === 2) { - } else { - c$1 = s.charCodeAt((i + 2 >> 0)); - if (c$1 < 128 || 191 < c$1) { - return false; - } else if (size === 3) { - } else { - c$2 = s.charCodeAt((i + 3 >> 0)); - if (c$2 < 128 || 191 < c$2) { - return false; - } - } - } - i = i + (size) >> 0; - } - return true; - }; - $pkg.ValidString = ValidString; - ValidRune = function(r) { - var r; - if (0 <= r && r < 55296) { - return true; - } else if (57343 < r && r <= 1114111) { - return true; - } - return false; - }; - $pkg.ValidRune = ValidRune; - acceptRange.init("unicode/utf8", [{prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - first = $toNativeArray($kindUint8, [240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 19, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 35, 3, 3, 52, 4, 4, 4, 68, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241]); - acceptRanges = $toNativeArray($kindStruct, [new acceptRange.ptr(128, 191), new acceptRange.ptr(160, 191), new acceptRange.ptr(128, 159), new acceptRange.ptr(144, 191), new acceptRange.ptr(128, 143), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0), new acceptRange.ptr(0, 0)]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["bytes"] = (function() { - var $pkg = {}, $init, errors, bytealg, io, unicode, utf8, Reader, asciiSet, Buffer, readOp, sliceType, arrayType, ptrType, arrayType$1, ptrType$1, ptrType$2, asciiSpace, errNegativeRead, errUnreadByte, NewReader, Count, Contains, ContainsAny, LastIndexByte, IndexRune, IndexAny, HasPrefix, HasSuffix, Map, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, TrimPrefix, indexFunc, lastIndexFunc, makeASCIISet, containsRune, TrimLeft, trimLeftByte, trimLeftASCII, trimLeftUnicode, TrimRight, trimRightByte, trimRightASCII, trimRightUnicode, TrimSpace, EqualFold, Index, Cut, makeSlice, IndexByte, Equal, Compare; - errors = $packages["errors"]; - bytealg = $packages["internal/bytealg"]; - io = $packages["io"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - Reader = $pkg.Reader = $newType(0, $kindStruct, "bytes.Reader", true, "bytes", true, function(s_, i_, prevRune_) { - this.$val = this; - if (arguments.length === 0) { - this.s = sliceType.nil; - this.i = new $Int64(0, 0); - this.prevRune = 0; - return; - } - this.s = s_; - this.i = i_; - this.prevRune = prevRune_; - }); - asciiSet = $pkg.asciiSet = $newType(32, $kindArray, "bytes.asciiSet", true, "bytes", false, null); - Buffer = $pkg.Buffer = $newType(0, $kindStruct, "bytes.Buffer", true, "bytes", true, function(buf_, off_, lastRead_) { - this.$val = this; - if (arguments.length === 0) { - this.buf = sliceType.nil; - this.off = 0; - this.lastRead = 0; - return; - } - this.buf = buf_; - this.off = off_; - this.lastRead = lastRead_; - }); - readOp = $pkg.readOp = $newType(1, $kindInt8, "bytes.readOp", true, "bytes", false, null); - sliceType = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 4); - ptrType = $ptrType(asciiSet); - arrayType$1 = $arrayType($Uint32, 8); - ptrType$1 = $ptrType(Buffer); - ptrType$2 = $ptrType(Reader); - Reader.ptr.prototype.Len = function() { - var r, x, x$1, x$2, x$3, x$4; - r = this; - if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - return 0; - } - return (((x$2 = (x$3 = (new $Int64(0, r.s.$length)), x$4 = r.i, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)); - }; - Reader.prototype.Len = function() { return this.$val.Len(); }; - Reader.ptr.prototype.Size = function() { - var r; - r = this; - return (new $Int64(0, r.s.$length)); - }; - Reader.prototype.Size = function() { return this.$val.Size(); }; - Reader.ptr.prototype.Read = function(b) { - var _tmp, _tmp$1, b, err, n, r, x, x$1, x$2, x$3; - n = 0; - err = $ifaceNil; - r = this; - if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - _tmp = 0; - _tmp$1 = io.EOF; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - r.prevRune = -1; - n = $copySlice(b, $subslice(r.s, $flatten64(r.i))); - r.i = (x$2 = r.i, x$3 = (new $Int64(0, n)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - return [n, err]; - }; - Reader.prototype.Read = function(b) { return this.$val.Read(b); }; - Reader.ptr.prototype.ReadAt = function(b, off) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, n, off, r, x; - n = 0; - err = $ifaceNil; - r = this; - if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) { - _tmp = 0; - _tmp$1 = errors.New("bytes.Reader.ReadAt: negative offset"); - n = _tmp; - err = _tmp$1; - return [n, err]; - } - if ((x = (new $Int64(0, r.s.$length)), (off.$high > x.$high || (off.$high === x.$high && off.$low >= x.$low)))) { - _tmp$2 = 0; - _tmp$3 = io.EOF; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - n = $copySlice(b, $subslice(r.s, $flatten64(off))); - if (n < b.$length) { - err = io.EOF; - } - return [n, err]; - }; - Reader.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; - Reader.ptr.prototype.ReadByte = function() { - var b, r, x, x$1, x$2, x$3, x$4, x$5; - r = this; - r.prevRune = -1; - if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - return [0, io.EOF]; - } - b = (x$2 = r.s, x$3 = r.i, (($flatten64(x$3) < 0 || $flatten64(x$3) >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + $flatten64(x$3)])); - r.i = (x$4 = r.i, x$5 = new $Int64(0, 1), new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); - return [b, $ifaceNil]; - }; - Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); }; - Reader.ptr.prototype.UnreadByte = function() { - var r, x, x$1, x$2; - r = this; - if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) { - return errors.New("bytes.Reader.UnreadByte: at beginning of slice"); - } - r.prevRune = -1; - r.i = (x$1 = r.i, x$2 = new $Int64(0, 1), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); - return $ifaceNil; - }; - Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; - Reader.ptr.prototype.ReadRune = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, ch, err, r, size, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; - ch = 0; - size = 0; - err = $ifaceNil; - r = this; - if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - r.prevRune = -1; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = io.EOF; - ch = _tmp; - size = _tmp$1; - err = _tmp$2; - return [ch, size, err]; - } - r.prevRune = (((x$2 = r.i, x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)); - c = (x$3 = r.s, x$4 = r.i, (($flatten64(x$4) < 0 || $flatten64(x$4) >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + $flatten64(x$4)])); - if (c < 128) { - r.i = (x$5 = r.i, x$6 = new $Int64(0, 1), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - _tmp$3 = ((c >> 0)); - _tmp$4 = 1; - _tmp$5 = $ifaceNil; - ch = _tmp$3; - size = _tmp$4; - err = _tmp$5; - return [ch, size, err]; - } - _tuple = utf8.DecodeRune($subslice(r.s, $flatten64(r.i))); - ch = _tuple[0]; - size = _tuple[1]; - r.i = (x$7 = r.i, x$8 = (new $Int64(0, size)), new $Int64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)); - return [ch, size, err]; - }; - Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); }; - Reader.ptr.prototype.UnreadRune = function() { - var r, x; - r = this; - if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) { - return errors.New("bytes.Reader.UnreadRune: at beginning of slice"); - } - if (r.prevRune < 0) { - return errors.New("bytes.Reader.UnreadRune: previous operation was not ReadRune"); - } - r.i = (new $Int64(0, r.prevRune)); - r.prevRune = -1; - return $ifaceNil; - }; - Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; - Reader.ptr.prototype.Seek = function(offset, whence) { - var _1, abs, offset, r, whence, x, x$1; - r = this; - r.prevRune = -1; - abs = new $Int64(0, 0); - _1 = whence; - if (_1 === (0)) { - abs = offset; - } else if (_1 === (1)) { - abs = (x = r.i, new $Int64(x.$high + offset.$high, x.$low + offset.$low)); - } else if (_1 === (2)) { - abs = (x$1 = (new $Int64(0, r.s.$length)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low)); - } else { - return [new $Int64(0, 0), errors.New("bytes.Reader.Seek: invalid whence")]; - } - if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { - return [new $Int64(0, 0), errors.New("bytes.Reader.Seek: negative position")]; - } - r.i = abs; - return [abs, $ifaceNil]; - }; - Reader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; - Reader.ptr.prototype.WriteTo = function(w) { - var {_r, _tmp, _tmp$1, _tuple, b, err, m, n, r, w, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - r = this; - r.prevRune = -1; - if ((x = r.i, x$1 = (new $Int64(0, r.s.$length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - _tmp = new $Int64(0, 0); - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - b = $subslice(r.s, $flatten64(r.i)); - _r = w.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - m = _tuple[0]; - err = _tuple[1]; - if (m > b.$length) { - $panic(new $String("bytes.Reader.WriteTo: invalid Write count")); - } - r.i = (x$2 = r.i, x$3 = (new $Int64(0, m)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n = (new $Int64(0, m)); - if (!((m === b.$length)) && $interfaceIsEqual(err, $ifaceNil)) { - err = io.ErrShortWrite; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.WriteTo, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, err, m, n, r, w, x, x$1, x$2, x$3, $s};return $f; - }; - Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); }; - Reader.ptr.prototype.Reset = function(b) { - var b, r; - r = this; - Reader.copy(r, new Reader.ptr(b, new $Int64(0, 0), -1)); - }; - Reader.prototype.Reset = function(b) { return this.$val.Reset(b); }; - NewReader = function(b) { - var b; - return new Reader.ptr(b, new $Int64(0, 0), -1); - }; - $pkg.NewReader = NewReader; - Count = function(s, sep) { - var i, n, s, sep; - if (sep.$length === 0) { - return utf8.RuneCount(s) + 1 >> 0; - } - if (sep.$length === 1) { - return bytealg.Count(s, (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0])); - } - n = 0; - while (true) { - i = Index(s, sep); - if (i === -1) { - return n; - } - n = n + (1) >> 0; - s = $subslice(s, (i + sep.$length >> 0)); - } - }; - $pkg.Count = Count; - Contains = function(b, subslice) { - var b, subslice; - return !((Index(b, subslice) === -1)); - }; - $pkg.Contains = Contains; - ContainsAny = function(b, chars) { - var b, chars; - return IndexAny(b, chars) >= 0; - }; - $pkg.ContainsAny = ContainsAny; - LastIndexByte = function(s, c) { - var c, i, s; - i = s.$length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === c) { - return i; - } - i = i - (1) >> 0; - } - return -1; - }; - $pkg.LastIndexByte = LastIndexByte; - IndexRune = function(s, r) { - var _tuple, b, i, n, n$1, r, r1, s; - if (0 <= r && r < 128) { - return IndexByte(s, ((r << 24 >>> 24))); - } else if ((r === 65533)) { - i = 0; - while (true) { - if (!(i < s.$length)) { break; } - _tuple = utf8.DecodeRune($subslice(s, i)); - r1 = _tuple[0]; - n = _tuple[1]; - if (r1 === 65533) { - return i; - } - i = i + (n) >> 0; - } - return -1; - } else if (!utf8.ValidRune(r)) { - return -1; - } else { - b = arrayType.zero(); - n$1 = utf8.EncodeRune(new sliceType(b), r); - return Index(s, $subslice(new sliceType(b), 0, n$1)); - } - }; - $pkg.IndexRune = IndexRune; - IndexAny = function(s, chars) { - var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _rune, _rune$1, _tuple, _tuple$1, as, c, ch, chars, i, i$1, isASCII, r, r$1, r$2, s, width; - if (chars === "") { - return -1; - } - if (s.$length === 1) { - r = (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) >> 0)); - if (r >= 128) { - _ref = chars; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - if (r === 65533) { - return 0; - } - _i += _rune[1]; - } - return -1; - } - if (bytealg.IndexByteString(chars, (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])) >= 0) { - return 0; - } - return -1; - } - if (chars.length === 1) { - r$1 = ((chars.charCodeAt(0) >> 0)); - if (r$1 >= 128) { - r$1 = 65533; - } - return IndexRune(s, r$1); - } - if (s.$length > 8) { - _tuple = makeASCIISet(chars); - as = $clone(_tuple[0], asciiSet); - isASCII = _tuple[1]; - if (isASCII) { - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - c = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (new ptrType(as).contains(c)) { - return i; - } - _i$1++; - } - return -1; - } - } - width = 0; - i$1 = 0; - while (true) { - if (!(i$1 < s.$length)) { break; } - r$2 = ((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) >> 0)); - if (r$2 < 128) { - if (bytealg.IndexByteString(chars, ((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1])) >= 0) { - return i$1; - } - width = 1; - i$1 = i$1 + (width) >> 0; - continue; - } - _tuple$1 = utf8.DecodeRune($subslice(s, i$1)); - r$2 = _tuple$1[0]; - width = _tuple$1[1]; - if (!((r$2 === 65533))) { - if (chars.length === width) { - if (chars === ($encodeRune(r$2))) { - return i$1; - } - i$1 = i$1 + (width) >> 0; - continue; - } - if (bytealg.MaxLen >= width) { - if (bytealg.IndexString(chars, ($encodeRune(r$2))) >= 0) { - return i$1; - } - i$1 = i$1 + (width) >> 0; - continue; - } - } - _ref$2 = chars; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.length)) { break; } - _rune$1 = $decodeRune(_ref$2, _i$2); - ch = _rune$1[0]; - if (r$2 === ch) { - return i$1; - } - _i$2 += _rune$1[1]; - } - i$1 = i$1 + (width) >> 0; - } - return -1; - }; - $pkg.IndexAny = IndexAny; - HasPrefix = function(s, prefix) { - var prefix, s; - return s.$length >= prefix.$length && Equal($subslice(s, 0, prefix.$length), prefix); - }; - $pkg.HasPrefix = HasPrefix; - HasSuffix = function(s, suffix) { - var s, suffix; - return s.$length >= suffix.$length && Equal($subslice(s, (s.$length - suffix.$length >> 0)), suffix); - }; - $pkg.HasSuffix = HasSuffix; - Map = function(mapping, s) { - var {_r, _tuple, b, i, mapping, maxbytes, nb, nbytes, r, rl, s, wid, $s, $r, $c} = $restore(this, {mapping, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - maxbytes = s.$length; - nbytes = 0; - b = $makeSlice(sliceType, maxbytes); - i = 0; - /* while (true) { */ case 1: - /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 2; continue; } - wid = 1; - r = ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >> 0)); - if (r >= 128) { - _tuple = utf8.DecodeRune($subslice(s, i)); - r = _tuple[0]; - wid = _tuple[1]; - } - _r = mapping(r); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - r = _r; - if (r >= 0) { - rl = utf8.RuneLen(r); - if (rl < 0) { - rl = 3; - } - if ((nbytes + rl >> 0) > maxbytes) { - maxbytes = ($imul(maxbytes, 2)) + 4 >> 0; - nb = $makeSlice(sliceType, maxbytes); - $copySlice(nb, $subslice(b, 0, nbytes)); - b = nb; - } - nbytes = nbytes + (utf8.EncodeRune($subslice(b, nbytes, maxbytes), r)) >> 0; - } - i = i + (wid) >> 0; - $s = 1; continue; - case 2: - $s = -1; return $subslice(b, 0, nbytes); - /* */ } return; } var $f = {$blk: Map, $c: true, $r, _r, _tuple, b, i, mapping, maxbytes, nb, nbytes, r, rl, s, wid, $s};return $f; - }; - $pkg.Map = Map; - ToLower = function(s) { - var {$24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = true; - _tmp$1 = false; - isASCII = _tmp; - hasUpper = _tmp$1; - i = 0; - while (true) { - if (!(i < s.$length)) { break; } - c = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); - if (c >= 128) { - isASCII = false; - break; - } - hasUpper = hasUpper || (65 <= c && c <= 90); - i = i + (1) >> 0; - } - if (isASCII) { - if (!hasUpper) { - $s = -1; return $appendSlice((new sliceType($stringToBytes(""))), s); - } - b = $makeSlice(sliceType, s.$length); - i$1 = 0; - while (true) { - if (!(i$1 < s.$length)) { break; } - c$1 = ((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]); - if (65 <= c$1 && c$1 <= 90) { - c$1 = c$1 + (32) << 24 >>> 24; - } - ((i$1 < 0 || i$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i$1] = c$1); - i$1 = i$1 + (1) >> 0; - } - $s = -1; return b; - } - _r = Map(unicode.ToLower, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ToLower, $c: true, $r, $24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s};return $f; - }; - $pkg.ToLower = ToLower; - TrimLeftFunc = function(s, f) { - var {_r, f, i, s, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = indexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - i = _r; - if (i === -1) { - $s = -1; return sliceType.nil; - } - $s = -1; return $subslice(s, i); - /* */ } return; } var $f = {$blk: TrimLeftFunc, $c: true, $r, _r, f, i, s, $s};return $f; - }; - $pkg.TrimLeftFunc = TrimLeftFunc; - TrimRightFunc = function(s, f) { - var {_r, _tuple, f, i, s, wid, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = lastIndexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - i = _r; - if (i >= 0 && ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) >= 128) { - _tuple = utf8.DecodeRune($subslice(s, i)); - wid = _tuple[1]; - i = i + (wid) >> 0; - } else { - i = i + (1) >> 0; - } - $s = -1; return $subslice(s, 0, i); - /* */ } return; } var $f = {$blk: TrimRightFunc, $c: true, $r, _r, _tuple, f, i, s, wid, $s};return $f; - }; - $pkg.TrimRightFunc = TrimRightFunc; - TrimFunc = function(s, f) { - var {$24r, _r, _r$1, f, s, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = TrimLeftFunc(s, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = TrimRightFunc(_r, f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: TrimFunc, $c: true, $r, $24r, _r, _r$1, f, s, $s};return $f; - }; - $pkg.TrimFunc = TrimFunc; - TrimPrefix = function(s, prefix) { - var prefix, s; - if (HasPrefix(s, prefix)) { - return $subslice(s, prefix.$length); - } - return s; - }; - $pkg.TrimPrefix = TrimPrefix; - indexFunc = function(s, f, truth) { - var {_r, _tuple, f, r, s, start, truth, wid, $s, $r, $c} = $restore(this, {s, f, truth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = 0; - /* while (true) { */ case 1: - /* if (!(start < s.$length)) { break; } */ if(!(start < s.$length)) { $s = 2; continue; } - wid = 1; - r = ((((start < 0 || start >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + start]) >> 0)); - if (r >= 128) { - _tuple = utf8.DecodeRune($subslice(s, start)); - r = _tuple[0]; - wid = _tuple[1]; - } - _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === truth) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r === truth) { */ case 3: - $s = -1; return start; - /* } */ case 4: - start = start + (wid) >> 0; - $s = 1; continue; - case 2: - $s = -1; return -1; - /* */ } return; } var $f = {$blk: indexFunc, $c: true, $r, _r, _tuple, f, r, s, start, truth, wid, $s};return $f; - }; - lastIndexFunc = function(s, f, truth) { - var {_r, _tmp, _tmp$1, _tuple, f, i, r, s, size, truth, x, $s, $r, $c} = $restore(this, {s, f, truth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = s.$length; - /* while (true) { */ case 1: - /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; } - _tmp = (((x = i - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >> 0)); - _tmp$1 = 1; - r = _tmp; - size = _tmp$1; - if (r >= 128) { - _tuple = utf8.DecodeLastRune($subslice(s, 0, i)); - r = _tuple[0]; - size = _tuple[1]; - } - i = i - (size) >> 0; - _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === truth) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r === truth) { */ case 3: - $s = -1; return i; - /* } */ case 4: - $s = 1; continue; - case 2: - $s = -1; return -1; - /* */ } return; } var $f = {$blk: lastIndexFunc, $c: true, $r, _r, _tmp, _tmp$1, _tuple, f, i, r, s, size, truth, x, $s};return $f; - }; - makeASCIISet = function(chars) { - var _index, _q, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, as, c, chars, i, ok, y; - as = arrayType$1.zero(); - ok = false; - i = 0; - while (true) { - if (!(i < chars.length)) { break; } - c = chars.charCodeAt(i); - if (c >= 128) { - _tmp = $clone(as, asciiSet); - _tmp$1 = false; - asciiSet.copy(as, _tmp); - ok = _tmp$1; - return [as, ok]; - } - _index = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - ((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index] = ((((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index]) | (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)); - i = i + (1) >> 0; - } - _tmp$2 = $clone(as, asciiSet); - _tmp$3 = true; - asciiSet.copy(as, _tmp$2); - ok = _tmp$3; - return [as, ok]; - }; - asciiSet.prototype.contains = function(c) { - var _q, _r, as, c, x, x$1, y; - as = this.$val; - return !((((((x = as, x$1 = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) & (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)) === 0)); - }; - $ptrType(asciiSet).prototype.contains = function(c) { return (new asciiSet(this.$get())).contains(c); }; - containsRune = function(s, r) { - var _i, _ref, _rune, c, r, s; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - c = _rune[0]; - if (c === r) { - return true; - } - _i += _rune[1]; - } - return false; - }; - TrimLeft = function(s, cutset) { - var _tuple, as, cutset, ok, s; - if (s.$length === 0) { - return sliceType.nil; - } - if (cutset === "") { - return s; - } - if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { - return trimLeftByte(s, cutset.charCodeAt(0)); - } - _tuple = makeASCIISet(cutset); - as = $clone(_tuple[0], asciiSet); - ok = _tuple[1]; - if (ok) { - return trimLeftASCII(s, as); - } - return trimLeftUnicode(s, cutset); - }; - $pkg.TrimLeft = TrimLeft; - trimLeftByte = function(s, c) { - var c, s; - while (true) { - if (!(s.$length > 0 && ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === c))) { break; } - s = $subslice(s, 1); - } - if (s.$length === 0) { - return sliceType.nil; - } - return s; - }; - trimLeftASCII = function(s, as) { - var as, s; - while (true) { - if (!(s.$length > 0)) { break; } - if (!new ptrType(as).contains((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]))) { - break; - } - s = $subslice(s, 1); - } - if (s.$length === 0) { - return sliceType.nil; - } - return s; - }; - trimLeftUnicode = function(s, cutset) { - var _tmp, _tmp$1, _tuple, cutset, n, r, s; - while (true) { - if (!(s.$length > 0)) { break; } - _tmp = (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) >> 0)); - _tmp$1 = 1; - r = _tmp; - n = _tmp$1; - if (r >= 128) { - _tuple = utf8.DecodeRune(s); - r = _tuple[0]; - n = _tuple[1]; - } - if (!containsRune(cutset, r)) { - break; - } - s = $subslice(s, n); - } - if (s.$length === 0) { - return sliceType.nil; - } - return s; - }; - TrimRight = function(s, cutset) { - var _tuple, as, cutset, ok, s; - if ((s.$length === 0) || cutset === "") { - return s; - } - if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { - return trimRightByte(s, cutset.charCodeAt(0)); - } - _tuple = makeASCIISet(cutset); - as = $clone(_tuple[0], asciiSet); - ok = _tuple[1]; - if (ok) { - return trimRightASCII(s, as); - } - return trimRightUnicode(s, cutset); - }; - $pkg.TrimRight = TrimRight; - trimRightByte = function(s, c) { - var c, s, x; - while (true) { - if (!(s.$length > 0 && ((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === c))) { break; } - s = $subslice(s, 0, (s.$length - 1 >> 0)); - } - return s; - }; - trimRightASCII = function(s, as) { - var as, s, x; - while (true) { - if (!(s.$length > 0)) { break; } - if (!new ptrType(as).contains((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])))) { - break; - } - s = $subslice(s, 0, (s.$length - 1 >> 0)); - } - return s; - }; - trimRightUnicode = function(s, cutset) { - var _tmp, _tmp$1, _tuple, cutset, n, r, s, x; - while (true) { - if (!(s.$length > 0)) { break; } - _tmp = (((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) >> 0)); - _tmp$1 = 1; - r = _tmp; - n = _tmp$1; - if (r >= 128) { - _tuple = utf8.DecodeLastRune(s); - r = _tuple[0]; - n = _tuple[1]; - } - if (!containsRune(cutset, r)) { - break; - } - s = $subslice(s, 0, (s.$length - n >> 0)); - } - return s; - }; - TrimSpace = function(s) { - var {$24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, x, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = 0; - /* while (true) { */ case 1: - /* if (!(start < s.$length)) { break; } */ if(!(start < s.$length)) { $s = 2; continue; } - c = ((start < 0 || start >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + start]); - /* */ if (c >= 128) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (c >= 128) { */ case 3: - _r = TrimFunc($subslice(s, start), unicode.IsSpace); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 6; case 6: return $24r; - /* } */ case 4: - if (((c < 0 || c >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c]) === 0) { - /* break; */ $s = 2; continue; - } - start = start + (1) >> 0; - $s = 1; continue; - case 2: - stop = s.$length; - /* while (true) { */ case 7: - /* if (!(stop > start)) { break; } */ if(!(stop > start)) { $s = 8; continue; } - c$1 = (x = stop - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])); - /* */ if (c$1 >= 128) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (c$1 >= 128) { */ case 9: - _r$1 = TrimFunc($subslice(s, start, stop), unicode.IsSpace); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 12; case 12: return $24r$1; - /* } */ case 10: - if (((c$1 < 0 || c$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c$1]) === 0) { - /* break; */ $s = 8; continue; - } - stop = stop - (1) >> 0; - $s = 7; continue; - case 8: - if (start === stop) { - $s = -1; return sliceType.nil; - } - $s = -1; return $subslice(s, start, stop); - /* */ } return; } var $f = {$blk: TrimSpace, $c: true, $r, $24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, x, $s};return $f; - }; - $pkg.TrimSpace = TrimSpace; - EqualFold = function(s, t) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, r, r$1, r$2, s, size, size$1, sr, t, tr; - while (true) { - if (!(!((s.$length === 0)) && !((t.$length === 0)))) { break; } - _tmp = 0; - _tmp$1 = 0; - sr = _tmp; - tr = _tmp$1; - if ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) < 128) { - _tmp$2 = (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) >> 0)); - _tmp$3 = $subslice(s, 1); - sr = _tmp$2; - s = _tmp$3; - } else { - _tuple = utf8.DecodeRune(s); - r = _tuple[0]; - size = _tuple[1]; - _tmp$4 = r; - _tmp$5 = $subslice(s, size); - sr = _tmp$4; - s = _tmp$5; - } - if ((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) < 128) { - _tmp$6 = (((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) >> 0)); - _tmp$7 = $subslice(t, 1); - tr = _tmp$6; - t = _tmp$7; - } else { - _tuple$1 = utf8.DecodeRune(t); - r$1 = _tuple$1[0]; - size$1 = _tuple$1[1]; - _tmp$8 = r$1; - _tmp$9 = $subslice(t, size$1); - tr = _tmp$8; - t = _tmp$9; - } - if (tr === sr) { - continue; - } - if (tr < sr) { - _tmp$10 = sr; - _tmp$11 = tr; - tr = _tmp$10; - sr = _tmp$11; - } - if (tr < 128) { - if (65 <= sr && sr <= 90 && (tr === ((sr + 97 >> 0) - 65 >> 0))) { - continue; - } - return false; - } - r$2 = unicode.SimpleFold(sr); - while (true) { - if (!(!((r$2 === sr)) && r$2 < tr)) { break; } - r$2 = unicode.SimpleFold(r$2); - } - if (r$2 === tr) { - continue; - } - return false; - } - return s.$length === t.$length; - }; - $pkg.EqualFold = EqualFold; - Index = function(s, sep) { - var c0, c0$1, c1, c1$1, fails, fails$1, i, i$1, j, n, o, o$1, r, s, sep, t, t$1, x, x$1; - n = sep.$length; - if ((n === 0)) { - return 0; - } else if ((n === 1)) { - return IndexByte(s, (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0])); - } else if ((n === s.$length)) { - if (Equal(sep, s)) { - return 0; - } - return -1; - } else if (n > s.$length) { - return -1; - } else if (n <= bytealg.MaxLen) { - if (s.$length <= 0) { - return bytealg.Index(s, sep); - } - c0 = (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]); - c1 = (1 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 1]); - i = 0; - t = (s.$length - n >> 0) + 1 >> 0; - fails = 0; - while (true) { - if (!(i < t)) { break; } - if (!((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === c0))) { - o = IndexByte($subslice(s, (i + 1 >> 0), t), c0); - if (o < 0) { - return -1; - } - i = i + ((o + 1 >> 0)) >> 0; - } - if (((x = i + 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === c1) && Equal($subslice(s, i, (i + n >> 0)), sep)) { - return i; - } - fails = fails + (1) >> 0; - i = i + (1) >> 0; - if (fails > bytealg.Cutover(i)) { - r = bytealg.Index($subslice(s, i), sep); - if (r >= 0) { - return r + i >> 0; - } - return -1; - } - } - return -1; - } - c0$1 = (0 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 0]); - c1$1 = (1 >= sep.$length ? ($throwRuntimeError("index out of range"), undefined) : sep.$array[sep.$offset + 1]); - i$1 = 0; - fails$1 = 0; - t$1 = (s.$length - n >> 0) + 1 >> 0; - while (true) { - if (!(i$1 < t$1)) { break; } - if (!((((i$1 < 0 || i$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i$1]) === c0$1))) { - o$1 = IndexByte($subslice(s, (i$1 + 1 >> 0), t$1), c0$1); - if (o$1 < 0) { - break; - } - i$1 = i$1 + ((o$1 + 1 >> 0)) >> 0; - } - if (((x$1 = i$1 + 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1])) === c1$1) && Equal($subslice(s, i$1, (i$1 + n >> 0)), sep)) { - return i$1; - } - i$1 = i$1 + (1) >> 0; - fails$1 = fails$1 + (1) >> 0; - if (fails$1 >= (4 + (i$1 >> 4 >> 0) >> 0) && i$1 < t$1) { - j = bytealg.IndexRabinKarpBytes($subslice(s, i$1), sep); - if (j < 0) { - return -1; - } - return i$1 + j >> 0; - } - } - return -1; - }; - $pkg.Index = Index; - Cut = function(s, sep) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, after, before, found, i, s, sep; - before = sliceType.nil; - after = sliceType.nil; - found = false; - i = Index(s, sep); - if (i >= 0) { - _tmp = $subslice(s, 0, i); - _tmp$1 = $subslice(s, (i + sep.$length >> 0)); - _tmp$2 = true; - before = _tmp; - after = _tmp$1; - found = _tmp$2; - return [before, after, found]; - } - _tmp$3 = s; - _tmp$4 = sliceType.nil; - _tmp$5 = false; - before = _tmp$3; - after = _tmp$4; - found = _tmp$5; - return [before, after, found]; - }; - $pkg.Cut = Cut; - Buffer.ptr.prototype.Bytes = function() { - var b; - b = this; - return $subslice(b.buf, b.off); - }; - Buffer.prototype.Bytes = function() { return this.$val.Bytes(); }; - Buffer.ptr.prototype.String = function() { - var b; - b = this; - if (b === ptrType$1.nil) { - return ""; - } - return ($bytesToString($subslice(b.buf, b.off))); - }; - Buffer.prototype.String = function() { return this.$val.String(); }; - Buffer.ptr.prototype.empty = function() { - var b; - b = this; - return b.buf.$length <= b.off; - }; - Buffer.prototype.empty = function() { return this.$val.empty(); }; - Buffer.ptr.prototype.Len = function() { - var b; - b = this; - return b.buf.$length - b.off >> 0; - }; - Buffer.prototype.Len = function() { return this.$val.Len(); }; - Buffer.ptr.prototype.Cap = function() { - var b; - b = this; - return b.buf.$capacity; - }; - Buffer.prototype.Cap = function() { return this.$val.Cap(); }; - Buffer.ptr.prototype.Truncate = function(n) { - var b, n; - b = this; - if (n === 0) { - b.Reset(); - return; - } - b.lastRead = 0; - if (n < 0 || n > b.Len()) { - $panic(new $String("bytes.Buffer: truncation out of range")); - } - b.buf = $subslice(b.buf, 0, (b.off + n >> 0)); - }; - Buffer.prototype.Truncate = function(n) { return this.$val.Truncate(n); }; - Buffer.ptr.prototype.Reset = function() { - var b; - b = this; - b.buf = $subslice(b.buf, 0, 0); - b.off = 0; - b.lastRead = 0; - }; - Buffer.prototype.Reset = function() { return this.$val.Reset(); }; - Buffer.ptr.prototype.tryGrowByReslice = function(n) { - var b, l, n; - b = this; - l = b.buf.$length; - if (n <= (b.buf.$capacity - l >> 0)) { - b.buf = $subslice(b.buf, 0, (l + n >> 0)); - return [l, true]; - } - return [0, false]; - }; - Buffer.prototype.tryGrowByReslice = function(n) { return this.$val.tryGrowByReslice(n); }; - Buffer.ptr.prototype.grow = function(n) { - var {_q, _r, _tuple, b, buf, c, i, m, n, ok, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - m = b.Len(); - if ((m === 0) && !((b.off === 0))) { - b.Reset(); - } - _tuple = b.tryGrowByReslice(n); - i = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return i; - } - if (b.buf === sliceType.nil && n <= 64) { - b.buf = $makeSlice(sliceType, n, 64); - $s = -1; return 0; - } - c = b.buf.$capacity; - /* */ if (n <= ((_q = c / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - m >> 0)) { $s = 1; continue; } - /* */ if (c > ((2147483647 - c >> 0) - n >> 0)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (n <= ((_q = c / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - m >> 0)) { */ case 1: - $copySlice(b.buf, $subslice(b.buf, b.off)); - $s = 4; continue; - /* } else if (c > ((2147483647 - c >> 0) - n >> 0)) { */ case 2: - $panic($pkg.ErrTooLarge); - $s = 4; continue; - /* } else { */ case 3: - _r = makeSlice(($imul(2, c)) + n >> 0); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buf = _r; - $copySlice(buf, $subslice(b.buf, b.off)); - b.buf = buf; - /* } */ case 4: - b.off = 0; - b.buf = $subslice(b.buf, 0, (m + n >> 0)); - $s = -1; return m; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.grow, $c: true, $r, _q, _r, _tuple, b, buf, c, i, m, n, ok, $s};return $f; - }; - Buffer.prototype.grow = function(n) { return this.$val.grow(n); }; - Buffer.ptr.prototype.Grow = function(n) { - var {_r, b, m, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (n < 0) { - $panic(new $String("bytes.Buffer.Grow: negative count")); - } - _r = b.grow(n); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - m = _r; - b.buf = $subslice(b.buf, 0, m); - $s = -1; return; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.Grow, $c: true, $r, _r, b, m, n, $s};return $f; - }; - Buffer.prototype.Grow = function(n) { return this.$val.Grow(n); }; - Buffer.ptr.prototype.Write = function(p) { - var {_r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - b.lastRead = 0; - _tuple = b.tryGrowByReslice(p.$length); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = b.grow(p.$length); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - m = _r; - /* } */ case 2: - _tmp = $copySlice($subslice(b.buf, m), p); - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.Write, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, p, $s};return $f; - }; - Buffer.prototype.Write = function(p) { return this.$val.Write(p); }; - Buffer.ptr.prototype.WriteString = function(s) { - var {_r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - b.lastRead = 0; - _tuple = b.tryGrowByReslice(s.length); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = b.grow(s.length); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - m = _r; - /* } */ case 2: - _tmp = $copyString($subslice(b.buf, m), s); - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteString, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, err, m, n, ok, s, $s};return $f; - }; - Buffer.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - Buffer.ptr.prototype.ReadFrom = function(r) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, i, m, n, r, x, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - b = this; - b.lastRead = 0; - /* while (true) { */ case 1: - _r = b.grow(512); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - i = _r; - b.buf = $subslice(b.buf, 0, i); - _r$1 = r.Read($subslice(b.buf, i, b.buf.$capacity)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - m = _tuple[0]; - e = _tuple[1]; - if (m < 0) { - $panic(errNegativeRead); - } - b.buf = $subslice(b.buf, 0, (i + m >> 0)); - n = (x = (new $Int64(0, m)), new $Int64(n.$high + x.$high, n.$low + x.$low)); - if ($interfaceIsEqual(e, io.EOF)) { - _tmp = n; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - if (!($interfaceIsEqual(e, $ifaceNil))) { - _tmp$2 = n; - _tmp$3 = e; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - $s = 1; continue; - case 2: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.ReadFrom, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, i, m, n, r, x, $s};return $f; - }; - Buffer.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; - makeSlice = function(n) { - var {$24r, n, $s, $deferred, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $deferred.push([(function() { - if (!($interfaceIsEqual($recover(), $ifaceNil))) { - $panic($pkg.ErrTooLarge); - } - }), []]); - $24r = $makeSlice(sliceType, n); - $s = 1; case 1: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: makeSlice, $c: true, $r, $24r, n, $s, $deferred};return $f; } } - }; - Buffer.ptr.prototype.WriteTo = function(w) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err, m, n, nBytes, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - b = this; - b.lastRead = 0; - nBytes = b.Len(); - /* */ if (nBytes > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (nBytes > 0) { */ case 1: - _r = w.Write($subslice(b.buf, b.off)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - m = _tuple[0]; - e = _tuple[1]; - if (m > nBytes) { - $panic(new $String("bytes.Buffer.WriteTo: invalid Write count")); - } - b.off = b.off + (m) >> 0; - n = (new $Int64(0, m)); - if (!($interfaceIsEqual(e, $ifaceNil))) { - _tmp = n; - _tmp$1 = e; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - if (!((m === nBytes))) { - _tmp$2 = n; - _tmp$3 = io.ErrShortWrite; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - /* } */ case 2: - b.Reset(); - _tmp$4 = n; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteTo, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err, m, n, nBytes, w, $s};return $f; - }; - Buffer.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); }; - Buffer.ptr.prototype.WriteByte = function(c) { - var {_r, _tuple, b, c, m, ok, x, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - b.lastRead = 0; - _tuple = b.tryGrowByReslice(1); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = b.grow(1); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - m = _r; - /* } */ case 2: - (x = b.buf, ((m < 0 || m >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + m] = c)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteByte, $c: true, $r, _r, _tuple, b, c, m, ok, x, $s};return $f; - }; - Buffer.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; - Buffer.ptr.prototype.WriteRune = function(r) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, m, n, ok, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - /* */ if (((r >>> 0)) < 128) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (((r >>> 0)) < 128) { */ case 1: - _r = b.WriteByte(((r << 24 >>> 24))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _tmp = 1; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* } */ case 2: - b.lastRead = 0; - _tuple = b.tryGrowByReslice(4); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!ok) { */ case 4: - _r$1 = b.grow(4); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - m = _r$1; - /* } */ case 5: - n = utf8.EncodeRune($subslice(b.buf, m, (m + 4 >> 0)), r); - b.buf = $subslice(b.buf, 0, (m + n >> 0)); - _tmp$2 = n; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Buffer.ptr.prototype.WriteRune, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, m, n, ok, r, $s};return $f; - }; - Buffer.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); }; - Buffer.ptr.prototype.Read = function(p) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, err, n, p; - n = 0; - err = $ifaceNil; - b = this; - b.lastRead = 0; - if (b.empty()) { - b.Reset(); - if (p.$length === 0) { - _tmp = 0; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - _tmp$2 = 0; - _tmp$3 = io.EOF; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - n = $copySlice(p, $subslice(b.buf, b.off)); - b.off = b.off + (n) >> 0; - if (n > 0) { - b.lastRead = -1; - } - _tmp$4 = n; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - return [n, err]; - }; - Buffer.prototype.Read = function(p) { return this.$val.Read(p); }; - Buffer.ptr.prototype.Next = function(n) { - var b, data, m, n; - b = this; - b.lastRead = 0; - m = b.Len(); - if (n > m) { - n = m; - } - data = $subslice(b.buf, b.off, (b.off + n >> 0)); - b.off = b.off + (n) >> 0; - if (n > 0) { - b.lastRead = -1; - } - return data; - }; - Buffer.prototype.Next = function(n) { return this.$val.Next(n); }; - Buffer.ptr.prototype.ReadByte = function() { - var b, c, x, x$1; - b = this; - if (b.empty()) { - b.Reset(); - return [0, io.EOF]; - } - c = (x = b.buf, x$1 = b.off, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - b.off = b.off + (1) >> 0; - b.lastRead = -1; - return [c, $ifaceNil]; - }; - Buffer.prototype.ReadByte = function() { return this.$val.ReadByte(); }; - Buffer.ptr.prototype.ReadRune = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, c, err, n, r, size, x, x$1; - r = 0; - size = 0; - err = $ifaceNil; - b = this; - if (b.empty()) { - b.Reset(); - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = io.EOF; - r = _tmp; - size = _tmp$1; - err = _tmp$2; - return [r, size, err]; - } - c = (x = b.buf, x$1 = b.off, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - if (c < 128) { - b.off = b.off + (1) >> 0; - b.lastRead = 1; - _tmp$3 = ((c >> 0)); - _tmp$4 = 1; - _tmp$5 = $ifaceNil; - r = _tmp$3; - size = _tmp$4; - err = _tmp$5; - return [r, size, err]; - } - _tuple = utf8.DecodeRune($subslice(b.buf, b.off)); - r = _tuple[0]; - n = _tuple[1]; - b.off = b.off + (n) >> 0; - b.lastRead = ((n << 24 >> 24)); - _tmp$6 = r; - _tmp$7 = n; - _tmp$8 = $ifaceNil; - r = _tmp$6; - size = _tmp$7; - err = _tmp$8; - return [r, size, err]; - }; - Buffer.prototype.ReadRune = function() { return this.$val.ReadRune(); }; - Buffer.ptr.prototype.UnreadRune = function() { - var b; - b = this; - if (b.lastRead <= 0) { - return errors.New("bytes.Buffer: UnreadRune: previous operation was not a successful ReadRune"); - } - if (b.off >= ((b.lastRead >> 0))) { - b.off = b.off - (((b.lastRead >> 0))) >> 0; - } - b.lastRead = 0; - return $ifaceNil; - }; - Buffer.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; - Buffer.ptr.prototype.UnreadByte = function() { - var b; - b = this; - if (b.lastRead === 0) { - return errUnreadByte; - } - b.lastRead = 0; - if (b.off > 0) { - b.off = b.off - (1) >> 0; - } - return $ifaceNil; - }; - Buffer.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; - Buffer.ptr.prototype.ReadBytes = function(delim) { - var _tmp, _tmp$1, _tuple, b, delim, err, line, slice; - line = sliceType.nil; - err = $ifaceNil; - b = this; - _tuple = b.readSlice(delim); - slice = _tuple[0]; - err = _tuple[1]; - line = $appendSlice(line, slice); - _tmp = line; - _tmp$1 = err; - line = _tmp; - err = _tmp$1; - return [line, err]; - }; - Buffer.prototype.ReadBytes = function(delim) { return this.$val.ReadBytes(delim); }; - Buffer.ptr.prototype.readSlice = function(delim) { - var _tmp, _tmp$1, b, delim, end, err, i, line; - line = sliceType.nil; - err = $ifaceNil; - b = this; - i = IndexByte($subslice(b.buf, b.off), delim); - end = (b.off + i >> 0) + 1 >> 0; - if (i < 0) { - end = b.buf.$length; - err = io.EOF; - } - line = $subslice(b.buf, b.off, end); - b.off = end; - b.lastRead = -1; - _tmp = line; - _tmp$1 = err; - line = _tmp; - err = _tmp$1; - return [line, err]; - }; - Buffer.prototype.readSlice = function(delim) { return this.$val.readSlice(delim); }; - Buffer.ptr.prototype.ReadString = function(delim) { - var _tmp, _tmp$1, _tuple, b, delim, err, line, slice; - line = ""; - err = $ifaceNil; - b = this; - _tuple = b.readSlice(delim); - slice = _tuple[0]; - err = _tuple[1]; - _tmp = ($bytesToString(slice)); - _tmp$1 = err; - line = _tmp; - err = _tmp$1; - return [line, err]; - }; - Buffer.prototype.ReadString = function(delim) { return this.$val.ReadString(delim); }; - IndexByte = function(s, c) { - var _i, _ref, b, c, i, s; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (b === c) { - return i; - } - _i++; - } - return -1; - }; - $pkg.IndexByte = IndexByte; - Equal = function(a, b) { - var _i, _ref, a, b, c, i; - if (!((a.$length === b.$length))) { - return false; - } - _ref = a; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((c === ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])))) { - return false; - } - _i++; - } - return true; - }; - $pkg.Equal = Equal; - Compare = function(a, b) { - var _i, _ref, a, b, ca, cb, i; - _ref = a; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ca = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i >= b.$length) { - return 1; - } - cb = ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]); - if (ca < cb) { - return -1; - } - if (ca > cb) { - return 1; - } - _i++; - } - if (a.$length < b.$length) { - return -1; - } - return 0; - }; - $pkg.Compare = Compare; - ptrType$2.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType, $Int64], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([sliceType], [], false)}]; - ptrType.methods = [{prop: "contains", name: "contains", pkg: "bytes", typ: $funcType([$Uint8], [$Bool], false)}]; - ptrType$1.methods = [{prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "empty", name: "empty", pkg: "bytes", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "tryGrowByReslice", name: "tryGrowByReslice", pkg: "bytes", typ: $funcType([$Int], [$Int, $Bool], false)}, {prop: "grow", name: "grow", pkg: "bytes", typ: $funcType([$Int], [$Int], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([$Int], [sliceType], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "readSlice", name: "readSlice", pkg: "bytes", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}]; - Reader.init("bytes", [{prop: "s", name: "s", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "prevRune", name: "prevRune", embedded: false, exported: false, typ: $Int, tag: ""}]); - asciiSet.init($Uint32, 8); - Buffer.init("bytes", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastRead", name: "lastRead", embedded: false, exported: false, typ: readOp, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - asciiSpace = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - $pkg.ErrTooLarge = errors.New("bytes.Buffer: too large"); - errNegativeRead = errors.New("bytes.Buffer: reader returned negative count from Read"); - errUnreadByte = errors.New("bytes.Buffer: UnreadByte: previous operation was not a successful read"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["strings"] = (function() { - var $pkg = {}, $init, errors, js, bytealg, io, sync, unicode, utf8, asciiSet, stringFinder, Replacer, replacer, trieNode, genericReplacer, appendSliceWriter, stringWriter, singleStringReplacer, byteReplacer, byteStringReplacer, Reader, Builder, span, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, arrayType, arrayType$1, sliceType$3, arrayType$2, ptrType$2, arrayType$3, ptrType$3, sliceType$4, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, asciiSpace, explode, Contains, ContainsAny, ContainsRune, IndexRune, IndexAny, LastIndexByte, genSplit, SplitN, Split, Fields, FieldsFunc, Join, HasPrefix, HasSuffix, Map, Repeat, ToLower, TrimLeftFunc, TrimRightFunc, TrimFunc, IndexFunc, indexFunc, lastIndexFunc, makeASCIISet, Trim, TrimLeft, trimLeftByte, trimLeftASCII, trimLeftUnicode, TrimRight, trimRightByte, trimRightASCII, trimRightUnicode, TrimSpace, TrimPrefix, TrimSuffix, Replace, ReplaceAll, EqualFold, Cut, makeStringFinder, longestCommonSuffix, max, NewReplacer, makeGenericReplacer, getStringWriter, makeSingleStringReplacer, NewReader, IndexByte, Index, LastIndex, Count; - errors = $packages["errors"]; - js = $packages["github.com/gopherjs/gopherjs/js"]; - bytealg = $packages["internal/bytealg"]; - io = $packages["io"]; - sync = $packages["sync"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - asciiSet = $pkg.asciiSet = $newType(32, $kindArray, "strings.asciiSet", true, "strings", false, null); - stringFinder = $pkg.stringFinder = $newType(0, $kindStruct, "strings.stringFinder", true, "strings", false, function(pattern_, badCharSkip_, goodSuffixSkip_) { - this.$val = this; - if (arguments.length === 0) { - this.pattern = ""; - this.badCharSkip = arrayType$1.zero(); - this.goodSuffixSkip = sliceType$3.nil; - return; - } - this.pattern = pattern_; - this.badCharSkip = badCharSkip_; - this.goodSuffixSkip = goodSuffixSkip_; - }); - Replacer = $pkg.Replacer = $newType(0, $kindStruct, "strings.Replacer", true, "strings", true, function(once_, r_, oldnew_) { - this.$val = this; - if (arguments.length === 0) { - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.r = $ifaceNil; - this.oldnew = sliceType.nil; - return; - } - this.once = once_; - this.r = r_; - this.oldnew = oldnew_; - }); - replacer = $pkg.replacer = $newType(8, $kindInterface, "strings.replacer", true, "strings", false, null); - trieNode = $pkg.trieNode = $newType(0, $kindStruct, "strings.trieNode", true, "strings", false, function(value_, priority_, prefix_, next_, table_) { - this.$val = this; - if (arguments.length === 0) { - this.value = ""; - this.priority = 0; - this.prefix = ""; - this.next = ptrType$3.nil; - this.table = sliceType$4.nil; - return; - } - this.value = value_; - this.priority = priority_; - this.prefix = prefix_; - this.next = next_; - this.table = table_; - }); - genericReplacer = $pkg.genericReplacer = $newType(0, $kindStruct, "strings.genericReplacer", true, "strings", false, function(root_, tableSize_, mapping_) { - this.$val = this; - if (arguments.length === 0) { - this.root = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil); - this.tableSize = 0; - this.mapping = arrayType$2.zero(); - return; - } - this.root = root_; - this.tableSize = tableSize_; - this.mapping = mapping_; - }); - appendSliceWriter = $pkg.appendSliceWriter = $newType(12, $kindSlice, "strings.appendSliceWriter", true, "strings", false, null); - stringWriter = $pkg.stringWriter = $newType(0, $kindStruct, "strings.stringWriter", true, "strings", false, function(w_) { - this.$val = this; - if (arguments.length === 0) { - this.w = $ifaceNil; - return; - } - this.w = w_; - }); - singleStringReplacer = $pkg.singleStringReplacer = $newType(0, $kindStruct, "strings.singleStringReplacer", true, "strings", false, function(finder_, value_) { - this.$val = this; - if (arguments.length === 0) { - this.finder = ptrType$5.nil; - this.value = ""; - return; - } - this.finder = finder_; - this.value = value_; - }); - byteReplacer = $pkg.byteReplacer = $newType(256, $kindArray, "strings.byteReplacer", true, "strings", false, null); - byteStringReplacer = $pkg.byteStringReplacer = $newType(0, $kindStruct, "strings.byteStringReplacer", true, "strings", false, function(replacements_, toReplace_) { - this.$val = this; - if (arguments.length === 0) { - this.replacements = arrayType$3.zero(); - this.toReplace = sliceType.nil; - return; - } - this.replacements = replacements_; - this.toReplace = toReplace_; - }); - Reader = $pkg.Reader = $newType(0, $kindStruct, "strings.Reader", true, "strings", true, function(s_, i_, prevRune_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - this.i = new $Int64(0, 0); - this.prevRune = 0; - return; - } - this.s = s_; - this.i = i_; - this.prevRune = prevRune_; - }); - Builder = $pkg.Builder = $newType(0, $kindStruct, "strings.Builder", true, "strings", true, function(addr_, buf_) { - this.$val = this; - if (arguments.length === 0) { - this.addr = ptrType$1.nil; - this.buf = sliceType$2.nil; - return; - } - this.addr = addr_; - this.buf = buf_; - }); - span = $newType(0, $kindStruct, "strings.span", true, "strings", false, function(start_, end_) { - this.$val = this; - if (arguments.length === 0) { - this.start = 0; - this.end = 0; - return; - } - this.start = start_; - this.end = end_; - }); - sliceType = $sliceType($String); - ptrType = $ptrType(asciiSet); - sliceType$1 = $sliceType(span); - ptrType$1 = $ptrType(Builder); - sliceType$2 = $sliceType($Uint8); - arrayType = $arrayType($Uint32, 8); - arrayType$1 = $arrayType($Int, 256); - sliceType$3 = $sliceType($Int); - arrayType$2 = $arrayType($Uint8, 256); - ptrType$2 = $ptrType(byteReplacer); - arrayType$3 = $arrayType(sliceType$2, 256); - ptrType$3 = $ptrType(trieNode); - sliceType$4 = $sliceType(ptrType$3); - ptrType$4 = $ptrType(appendSliceWriter); - ptrType$5 = $ptrType(stringFinder); - ptrType$6 = $ptrType(Replacer); - ptrType$7 = $ptrType(genericReplacer); - ptrType$8 = $ptrType(singleStringReplacer); - ptrType$9 = $ptrType(byteStringReplacer); - ptrType$10 = $ptrType(Reader); - explode = function(s, n) { - var _tuple, a, ch, i, l, n, s, size, x; - l = utf8.RuneCountInString(s); - if (n < 0 || n > l) { - n = l; - } - a = $makeSlice(sliceType, n); - i = 0; - while (true) { - if (!(i < (n - 1 >> 0))) { break; } - _tuple = utf8.DecodeRuneInString(s); - ch = _tuple[0]; - size = _tuple[1]; - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = $substring(s, 0, size)); - s = $substring(s, size); - if (ch === 65533) { - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = "\xEF\xBF\xBD"); - } - i = i + (1) >> 0; - } - if (n > 0) { - (x = n - 1 >> 0, ((x < 0 || x >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + x] = s)); - } - return a; - }; - Contains = function(s, substr) { - var s, substr; - return Index(s, substr) >= 0; - }; - $pkg.Contains = Contains; - ContainsAny = function(s, chars) { - var chars, s; - return IndexAny(s, chars) >= 0; - }; - $pkg.ContainsAny = ContainsAny; - ContainsRune = function(s, r) { - var r, s; - return IndexRune(s, r) >= 0; - }; - $pkg.ContainsRune = ContainsRune; - IndexRune = function(s, r) { - var _i, _ref, _rune, i, r, r$1, s; - if (0 <= r && r < 128) { - return IndexByte(s, ((r << 24 >>> 24))); - } else if ((r === 65533)) { - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - r$1 = _rune[0]; - if (r$1 === 65533) { - return i; - } - _i += _rune[1]; - } - return -1; - } else if (!utf8.ValidRune(r)) { - return -1; - } else { - return Index(s, ($encodeRune(r))); - } - }; - $pkg.IndexRune = IndexRune; - IndexAny = function(s, chars) { - var _i, _ref, _rune, _tuple, as, c, chars, i, i$1, isASCII, r, s; - if (chars === "") { - return -1; - } - if (chars.length === 1) { - r = ((chars.charCodeAt(0) >> 0)); - if (r >= 128) { - r = 65533; - } - return IndexRune(s, r); - } - if (s.length > 8) { - _tuple = makeASCIISet(chars); - as = $clone(_tuple[0], asciiSet); - isASCII = _tuple[1]; - if (isASCII) { - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (new ptrType(as).contains(s.charCodeAt(i))) { - return i; - } - i = i + (1) >> 0; - } - return -1; - } - } - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i$1 = _i; - c = _rune[0]; - if (IndexRune(chars, c) >= 0) { - return i$1; - } - _i += _rune[1]; - } - return -1; - }; - $pkg.IndexAny = IndexAny; - LastIndexByte = function(s, c) { - var c, i, s; - i = s.length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (s.charCodeAt(i) === c) { - return i; - } - i = i - (1) >> 0; - } - return -1; - }; - $pkg.LastIndexByte = LastIndexByte; - genSplit = function(s, sep, sepSave, n) { - var a, i, m, n, s, sep, sepSave; - if (n === 0) { - return sliceType.nil; - } - if (sep === "") { - return explode(s, n); - } - if (n < 0) { - n = Count(s, sep) + 1 >> 0; - } - a = $makeSlice(sliceType, n); - n = n - (1) >> 0; - i = 0; - while (true) { - if (!(i < n)) { break; } - m = Index(s, sep); - if (m < 0) { - break; - } - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = $substring(s, 0, (m + sepSave >> 0))); - s = $substring(s, (m + sep.length >> 0)); - i = i + (1) >> 0; - } - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = s); - return $subslice(a, 0, (i + 1 >> 0)); - }; - SplitN = function(s, sep, n) { - var n, s, sep; - return genSplit(s, sep, 0, n); - }; - $pkg.SplitN = SplitN; - Split = function(s, sep) { - var s, sep; - return genSplit(s, sep, 0, -1); - }; - $pkg.Split = Split; - Fields = function(s) { - var {$24r, _r, a, fieldStart, i, i$1, isSpace, n, na, r, s, setBits, wasSpace, x, x$1, x$2, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - wasSpace = 1; - setBits = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - r = s.charCodeAt(i); - setBits = (setBits | (r)) >>> 0; - isSpace = ((((r < 0 || r >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[r]) >> 0)); - n = n + ((wasSpace & (~isSpace >> 0))) >> 0; - wasSpace = isSpace; - i = i + (1) >> 0; - } - /* */ if (setBits >= 128) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (setBits >= 128) { */ case 1: - _r = FieldsFunc(s, unicode.IsSpace); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - a = $makeSlice(sliceType, n); - na = 0; - fieldStart = 0; - i$1 = 0; - while (true) { - if (!(i$1 < s.length && !(((x = s.charCodeAt(i$1), ((x < 0 || x >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x])) === 0)))) { break; } - i$1 = i$1 + (1) >> 0; - } - fieldStart = i$1; - while (true) { - if (!(i$1 < s.length)) { break; } - if ((x$1 = s.charCodeAt(i$1), ((x$1 < 0 || x$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x$1])) === 0) { - i$1 = i$1 + (1) >> 0; - continue; - } - ((na < 0 || na >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + na] = $substring(s, fieldStart, i$1)); - na = na + (1) >> 0; - i$1 = i$1 + (1) >> 0; - while (true) { - if (!(i$1 < s.length && !(((x$2 = s.charCodeAt(i$1), ((x$2 < 0 || x$2 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[x$2])) === 0)))) { break; } - i$1 = i$1 + (1) >> 0; - } - fieldStart = i$1; - } - if (fieldStart < s.length) { - ((na < 0 || na >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + na] = $substring(s, fieldStart)); - } - $s = -1; return a; - /* */ } return; } var $f = {$blk: Fields, $c: true, $r, $24r, _r, a, fieldStart, i, i$1, isSpace, n, na, r, s, setBits, wasSpace, x, x$1, x$2, $s};return $f; - }; - $pkg.Fields = Fields; - FieldsFunc = function(s, f) { - var {_i, _i$1, _r, _ref, _ref$1, _rune, a, end, f, i, rune, s, span$1, spans, start, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - spans = $makeSlice(sliceType$1, 0, 32); - start = -1; - _ref = s; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } - _rune = $decodeRune(_ref, _i); - end = _i; - rune = _rune[0]; - _r = f(rune); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r) { */ case 3: - if (start >= 0) { - spans = $append(spans, new span.ptr(start, end)); - start = ~start >> 0; - } - $s = 5; continue; - /* } else { */ case 4: - if (start < 0) { - start = end; - } - /* } */ case 5: - _i += _rune[1]; - $s = 1; continue; - case 2: - if (start >= 0) { - spans = $append(spans, new span.ptr(start, s.length)); - } - a = $makeSlice(sliceType, spans.$length); - _ref$1 = spans; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - span$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), span); - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = $substring(s, span$1.start, span$1.end)); - _i$1++; - } - $s = -1; return a; - /* */ } return; } var $f = {$blk: FieldsFunc, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, _rune, a, end, f, i, rune, s, span$1, spans, start, $s};return $f; - }; - $pkg.FieldsFunc = FieldsFunc; - Join = function(elems, sep) { - var _1, _i, _ref, b, elems, i, n, s, sep; - _1 = elems.$length; - if (_1 === (0)) { - return ""; - } else if (_1 === (1)) { - return (0 >= elems.$length ? ($throwRuntimeError("index out of range"), undefined) : elems.$array[elems.$offset + 0]); - } - n = $imul(sep.length, ((elems.$length - 1 >> 0))); - i = 0; - while (true) { - if (!(i < elems.$length)) { break; } - n = n + (((i < 0 || i >= elems.$length) ? ($throwRuntimeError("index out of range"), undefined) : elems.$array[elems.$offset + i]).length) >> 0; - i = i + (1) >> 0; - } - b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil); - b.Grow(n); - b.WriteString((0 >= elems.$length ? ($throwRuntimeError("index out of range"), undefined) : elems.$array[elems.$offset + 0])); - _ref = $subslice(elems, 1); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b.WriteString(sep); - b.WriteString(s); - _i++; - } - return b.String(); - }; - $pkg.Join = Join; - HasPrefix = function(s, prefix) { - var prefix, s; - return s.length >= prefix.length && $substring(s, 0, prefix.length) === prefix; - }; - $pkg.HasPrefix = HasPrefix; - HasSuffix = function(s, suffix) { - var s, suffix; - return s.length >= suffix.length && $substring(s, (s.length - suffix.length >> 0)) === suffix; - }; - $pkg.HasSuffix = HasSuffix; - Map = function(mapping, s) { - var {_i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _rune$1, _tuple, b, c, c$1, i, mapping, r, r$1, s, width, $s, $r, $c} = $restore(this, {mapping, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil); - _ref = s; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } - _rune = $decodeRune(_ref, _i); - i = _i; - c = _rune[0]; - _r = mapping(c); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - r = _r; - if ((r === c) && !((c === 65533))) { - _i += _rune[1]; - /* continue; */ $s = 1; continue; - } - width = 0; - if (c === 65533) { - _tuple = utf8.DecodeRuneInString($substring(s, i)); - c = _tuple[0]; - width = _tuple[1]; - if (!((width === 1)) && (r === c)) { - _i += _rune[1]; - /* continue; */ $s = 1; continue; - } - } else { - width = utf8.RuneLen(c); - } - b.Grow(s.length + 4 >> 0); - b.WriteString($substring(s, 0, i)); - if (r >= 0) { - b.WriteRune(r); - } - s = $substring(s, (i + width >> 0)); - /* break; */ $s = 2; continue; - case 2: - if (b.Cap() === 0) { - $s = -1; return s; - } - _ref$1 = s; - _i$1 = 0; - /* while (true) { */ case 4: - /* if (!(_i$1 < _ref$1.length)) { break; } */ if(!(_i$1 < _ref$1.length)) { $s = 5; continue; } - _rune$1 = $decodeRune(_ref$1, _i$1); - c$1 = _rune$1[0]; - _r$1 = mapping(c$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - r$1 = _r$1; - if (r$1 >= 0) { - if (r$1 < 128) { - b.WriteByte(((r$1 << 24 >>> 24))); - } else { - b.WriteRune(r$1); - } - } - _i$1 += _rune$1[1]; - $s = 4; continue; - case 5: - $s = -1; return b.String(); - /* */ } return; } var $f = {$blk: Map, $c: true, $r, _i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _rune$1, _tuple, b, c, c$1, i, mapping, r, r$1, s, width, $s};return $f; - }; - $pkg.Map = Map; - Repeat = function(s, count) { - var _q, _q$1, b, count, n, s; - if (count === 0) { - return ""; - } - if (count < 0) { - $panic(new $String("strings: negative Repeat count")); - } else if (!(((_q = ($imul(s.length, count)) / count, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === s.length))) { - $panic(new $String("strings: Repeat count causes overflow")); - } - n = $imul(s.length, count); - b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil); - b.Grow(n); - b.WriteString(s); - while (true) { - if (!(b.Len() < n)) { break; } - if (b.Len() <= (_q$1 = n / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { - b.WriteString(b.String()); - } else { - b.WriteString($substring(b.String(), 0, (n - b.Len() >> 0))); - break; - } - } - return b.String(); - }; - $pkg.Repeat = Repeat; - ToLower = function(s) { - var {$24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = true; - _tmp$1 = false; - isASCII = _tmp; - hasUpper = _tmp$1; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (c >= 128) { - isASCII = false; - break; - } - hasUpper = hasUpper || (65 <= c && c <= 90); - i = i + (1) >> 0; - } - if (isASCII) { - if (!hasUpper) { - $s = -1; return s; - } - b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil); - b.Grow(s.length); - i$1 = 0; - while (true) { - if (!(i$1 < s.length)) { break; } - c$1 = s.charCodeAt(i$1); - if (65 <= c$1 && c$1 <= 90) { - c$1 = c$1 + (32) << 24 >>> 24; - } - b.WriteByte(c$1); - i$1 = i$1 + (1) >> 0; - } - $s = -1; return b.String(); - } - _r = Map(unicode.ToLower, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ToLower, $c: true, $r, $24r, _r, _tmp, _tmp$1, b, c, c$1, hasUpper, i, i$1, isASCII, s, $s};return $f; - }; - $pkg.ToLower = ToLower; - TrimLeftFunc = function(s, f) { - var {_r, f, i, s, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = indexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - i = _r; - if (i === -1) { - $s = -1; return ""; - } - $s = -1; return $substring(s, i); - /* */ } return; } var $f = {$blk: TrimLeftFunc, $c: true, $r, _r, f, i, s, $s};return $f; - }; - $pkg.TrimLeftFunc = TrimLeftFunc; - TrimRightFunc = function(s, f) { - var {_r, _tuple, f, i, s, wid, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = lastIndexFunc(s, f, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - i = _r; - if (i >= 0 && s.charCodeAt(i) >= 128) { - _tuple = utf8.DecodeRuneInString($substring(s, i)); - wid = _tuple[1]; - i = i + (wid) >> 0; - } else { - i = i + (1) >> 0; - } - $s = -1; return $substring(s, 0, i); - /* */ } return; } var $f = {$blk: TrimRightFunc, $c: true, $r, _r, _tuple, f, i, s, wid, $s};return $f; - }; - $pkg.TrimRightFunc = TrimRightFunc; - TrimFunc = function(s, f) { - var {$24r, _r, _r$1, f, s, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = TrimLeftFunc(s, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = TrimRightFunc(_r, f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: TrimFunc, $c: true, $r, $24r, _r, _r$1, f, s, $s};return $f; - }; - $pkg.TrimFunc = TrimFunc; - IndexFunc = function(s, f) { - var {$24r, _r, f, s, $s, $r, $c} = $restore(this, {s, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = indexFunc(s, f, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: IndexFunc, $c: true, $r, $24r, _r, f, s, $s};return $f; - }; - $pkg.IndexFunc = IndexFunc; - indexFunc = function(s, f, truth) { - var {_i, _r, _ref, _rune, f, i, r, s, truth, $s, $r, $c} = $restore(this, {s, f, truth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = s; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } - _rune = $decodeRune(_ref, _i); - i = _i; - r = _rune[0]; - _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === truth) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r === truth) { */ case 3: - $s = -1; return i; - /* } */ case 4: - _i += _rune[1]; - $s = 1; continue; - case 2: - $s = -1; return -1; - /* */ } return; } var $f = {$blk: indexFunc, $c: true, $r, _i, _r, _ref, _rune, f, i, r, s, truth, $s};return $f; - }; - lastIndexFunc = function(s, f, truth) { - var {_r, _tuple, f, i, r, s, size, truth, $s, $r, $c} = $restore(this, {s, f, truth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = s.length; - /* while (true) { */ case 1: - /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; } - _tuple = utf8.DecodeLastRuneInString($substring(s, 0, i)); - r = _tuple[0]; - size = _tuple[1]; - i = i - (size) >> 0; - _r = f(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === truth) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r === truth) { */ case 3: - $s = -1; return i; - /* } */ case 4: - $s = 1; continue; - case 2: - $s = -1; return -1; - /* */ } return; } var $f = {$blk: lastIndexFunc, $c: true, $r, _r, _tuple, f, i, r, s, size, truth, $s};return $f; - }; - makeASCIISet = function(chars) { - var _index, _q, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, as, c, chars, i, ok, y; - as = arrayType.zero(); - ok = false; - i = 0; - while (true) { - if (!(i < chars.length)) { break; } - c = chars.charCodeAt(i); - if (c >= 128) { - _tmp = $clone(as, asciiSet); - _tmp$1 = false; - asciiSet.copy(as, _tmp); - ok = _tmp$1; - return [as, ok]; - } - _index = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - ((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index] = ((((_index < 0 || _index >= as.length) ? ($throwRuntimeError("index out of range"), undefined) : as[_index]) | (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)); - i = i + (1) >> 0; - } - _tmp$2 = $clone(as, asciiSet); - _tmp$3 = true; - asciiSet.copy(as, _tmp$2); - ok = _tmp$3; - return [as, ok]; - }; - asciiSet.prototype.contains = function(c) { - var _q, _r, as, c, x, x$1, y; - as = this.$val; - return !((((((x = as, x$1 = (_q = c / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) & (((y = ((_r = c % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0)) === 0)); - }; - $ptrType(asciiSet).prototype.contains = function(c) { return (new asciiSet(this.$get())).contains(c); }; - Trim = function(s, cutset) { - var _tuple, as, cutset, ok, s; - if (s === "" || cutset === "") { - return s; - } - if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { - return trimLeftByte(trimRightByte(s, cutset.charCodeAt(0)), cutset.charCodeAt(0)); - } - _tuple = makeASCIISet(cutset); - as = $clone(_tuple[0], asciiSet); - ok = _tuple[1]; - if (ok) { - return trimLeftASCII(trimRightASCII(s, as), as); - } - return trimLeftUnicode(trimRightUnicode(s, cutset), cutset); - }; - $pkg.Trim = Trim; - TrimLeft = function(s, cutset) { - var _tuple, as, cutset, ok, s; - if (s === "" || cutset === "") { - return s; - } - if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { - return trimLeftByte(s, cutset.charCodeAt(0)); - } - _tuple = makeASCIISet(cutset); - as = $clone(_tuple[0], asciiSet); - ok = _tuple[1]; - if (ok) { - return trimLeftASCII(s, as); - } - return trimLeftUnicode(s, cutset); - }; - $pkg.TrimLeft = TrimLeft; - trimLeftByte = function(s, c) { - var c, s; - while (true) { - if (!(s.length > 0 && (s.charCodeAt(0) === c))) { break; } - s = $substring(s, 1); - } - return s; - }; - trimLeftASCII = function(s, as) { - var as, s; - while (true) { - if (!(s.length > 0)) { break; } - if (!new ptrType(as).contains(s.charCodeAt(0))) { - break; - } - s = $substring(s, 1); - } - return s; - }; - trimLeftUnicode = function(s, cutset) { - var _tmp, _tmp$1, _tuple, cutset, n, r, s; - while (true) { - if (!(s.length > 0)) { break; } - _tmp = ((s.charCodeAt(0) >> 0)); - _tmp$1 = 1; - r = _tmp; - n = _tmp$1; - if (r >= 128) { - _tuple = utf8.DecodeRuneInString(s); - r = _tuple[0]; - n = _tuple[1]; - } - if (!ContainsRune(cutset, r)) { - break; - } - s = $substring(s, n); - } - return s; - }; - TrimRight = function(s, cutset) { - var _tuple, as, cutset, ok, s; - if (s === "" || cutset === "") { - return s; - } - if ((cutset.length === 1) && cutset.charCodeAt(0) < 128) { - return trimRightByte(s, cutset.charCodeAt(0)); - } - _tuple = makeASCIISet(cutset); - as = $clone(_tuple[0], asciiSet); - ok = _tuple[1]; - if (ok) { - return trimRightASCII(s, as); - } - return trimRightUnicode(s, cutset); - }; - $pkg.TrimRight = TrimRight; - trimRightByte = function(s, c) { - var c, s; - while (true) { - if (!(s.length > 0 && (s.charCodeAt((s.length - 1 >> 0)) === c))) { break; } - s = $substring(s, 0, (s.length - 1 >> 0)); - } - return s; - }; - trimRightASCII = function(s, as) { - var as, s; - while (true) { - if (!(s.length > 0)) { break; } - if (!new ptrType(as).contains(s.charCodeAt((s.length - 1 >> 0)))) { - break; - } - s = $substring(s, 0, (s.length - 1 >> 0)); - } - return s; - }; - trimRightUnicode = function(s, cutset) { - var _tmp, _tmp$1, _tuple, cutset, n, r, s; - while (true) { - if (!(s.length > 0)) { break; } - _tmp = ((s.charCodeAt((s.length - 1 >> 0)) >> 0)); - _tmp$1 = 1; - r = _tmp; - n = _tmp$1; - if (r >= 128) { - _tuple = utf8.DecodeLastRuneInString(s); - r = _tuple[0]; - n = _tuple[1]; - } - if (!ContainsRune(cutset, r)) { - break; - } - s = $substring(s, 0, (s.length - n >> 0)); - } - return s; - }; - TrimSpace = function(s) { - var {$24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = 0; - /* while (true) { */ case 1: - /* if (!(start < s.length)) { break; } */ if(!(start < s.length)) { $s = 2; continue; } - c = s.charCodeAt(start); - /* */ if (c >= 128) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (c >= 128) { */ case 3: - _r = TrimFunc($substring(s, start), unicode.IsSpace); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 6; case 6: return $24r; - /* } */ case 4: - if (((c < 0 || c >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c]) === 0) { - /* break; */ $s = 2; continue; - } - start = start + (1) >> 0; - $s = 1; continue; - case 2: - stop = s.length; - /* while (true) { */ case 7: - /* if (!(stop > start)) { break; } */ if(!(stop > start)) { $s = 8; continue; } - c$1 = s.charCodeAt((stop - 1 >> 0)); - /* */ if (c$1 >= 128) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (c$1 >= 128) { */ case 9: - _r$1 = TrimFunc($substring(s, start, stop), unicode.IsSpace); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 12; case 12: return $24r$1; - /* } */ case 10: - if (((c$1 < 0 || c$1 >= asciiSpace.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiSpace[c$1]) === 0) { - /* break; */ $s = 8; continue; - } - stop = stop - (1) >> 0; - $s = 7; continue; - case 8: - $s = -1; return $substring(s, start, stop); - /* */ } return; } var $f = {$blk: TrimSpace, $c: true, $r, $24r, $24r$1, _r, _r$1, c, c$1, s, start, stop, $s};return $f; - }; - $pkg.TrimSpace = TrimSpace; - TrimPrefix = function(s, prefix) { - var prefix, s; - if (HasPrefix(s, prefix)) { - return $substring(s, prefix.length); - } - return s; - }; - $pkg.TrimPrefix = TrimPrefix; - TrimSuffix = function(s, suffix) { - var s, suffix; - if (HasSuffix(s, suffix)) { - return $substring(s, 0, (s.length - suffix.length >> 0)); - } - return s; - }; - $pkg.TrimSuffix = TrimSuffix; - Replace = function(s, old, new$1, n) { - var _tuple, b, i, j, m, n, new$1, old, s, start, wid; - if (old === new$1 || (n === 0)) { - return s; - } - m = Count(s, old); - if (m === 0) { - return s; - } else if (n < 0 || m < n) { - n = m; - } - b = new Builder.ptr(ptrType$1.nil, sliceType$2.nil); - b.Grow(s.length + ($imul(n, ((new$1.length - old.length >> 0)))) >> 0); - start = 0; - i = 0; - while (true) { - if (!(i < n)) { break; } - j = start; - if (old.length === 0) { - if (i > 0) { - _tuple = utf8.DecodeRuneInString($substring(s, start)); - wid = _tuple[1]; - j = j + (wid) >> 0; - } - } else { - j = j + (Index($substring(s, start), old)) >> 0; - } - b.WriteString($substring(s, start, j)); - b.WriteString(new$1); - start = j + old.length >> 0; - i = i + (1) >> 0; - } - b.WriteString($substring(s, start)); - return b.String(); - }; - $pkg.Replace = Replace; - ReplaceAll = function(s, old, new$1) { - var new$1, old, s; - return Replace(s, old, new$1, -1); - }; - $pkg.ReplaceAll = ReplaceAll; - EqualFold = function(s, t) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, r, r$1, r$2, s, size, size$1, sr, t, tr; - while (true) { - if (!(!(s === "") && !(t === ""))) { break; } - _tmp = 0; - _tmp$1 = 0; - sr = _tmp; - tr = _tmp$1; - if (s.charCodeAt(0) < 128) { - _tmp$2 = ((s.charCodeAt(0) >> 0)); - _tmp$3 = $substring(s, 1); - sr = _tmp$2; - s = _tmp$3; - } else { - _tuple = utf8.DecodeRuneInString(s); - r = _tuple[0]; - size = _tuple[1]; - _tmp$4 = r; - _tmp$5 = $substring(s, size); - sr = _tmp$4; - s = _tmp$5; - } - if (t.charCodeAt(0) < 128) { - _tmp$6 = ((t.charCodeAt(0) >> 0)); - _tmp$7 = $substring(t, 1); - tr = _tmp$6; - t = _tmp$7; - } else { - _tuple$1 = utf8.DecodeRuneInString(t); - r$1 = _tuple$1[0]; - size$1 = _tuple$1[1]; - _tmp$8 = r$1; - _tmp$9 = $substring(t, size$1); - tr = _tmp$8; - t = _tmp$9; - } - if (tr === sr) { - continue; - } - if (tr < sr) { - _tmp$10 = sr; - _tmp$11 = tr; - tr = _tmp$10; - sr = _tmp$11; - } - if (tr < 128) { - if (65 <= sr && sr <= 90 && (tr === ((sr + 97 >> 0) - 65 >> 0))) { - continue; - } - return false; - } - r$2 = unicode.SimpleFold(sr); - while (true) { - if (!(!((r$2 === sr)) && r$2 < tr)) { break; } - r$2 = unicode.SimpleFold(r$2); - } - if (r$2 === tr) { - continue; - } - return false; - } - return s === t; - }; - $pkg.EqualFold = EqualFold; - Cut = function(s, sep) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, after, before, found, i, s, sep; - before = ""; - after = ""; - found = false; - i = Index(s, sep); - if (i >= 0) { - _tmp = $substring(s, 0, i); - _tmp$1 = $substring(s, (i + sep.length >> 0)); - _tmp$2 = true; - before = _tmp; - after = _tmp$1; - found = _tmp$2; - return [before, after, found]; - } - _tmp$3 = s; - _tmp$4 = ""; - _tmp$5 = false; - before = _tmp$3; - after = _tmp$4; - found = _tmp$5; - return [before, after, found]; - }; - $pkg.Cut = Cut; - makeStringFinder = function(pattern) { - var _i, _ref, f, i, i$1, i$2, i$3, last, lastPrefix, lenSuffix, pattern, x, x$1, x$2, x$3, x$4, x$5; - f = new stringFinder.ptr(pattern, arrayType$1.zero(), $makeSlice(sliceType$3, pattern.length)); - last = pattern.length - 1 >> 0; - _ref = f.badCharSkip; - _i = 0; - while (true) { - if (!(_i < 256)) { break; } - i = _i; - (x = f.badCharSkip, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = pattern.length)); - _i++; - } - i$1 = 0; - while (true) { - if (!(i$1 < last)) { break; } - (x$1 = f.badCharSkip, x$2 = pattern.charCodeAt(i$1), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2] = (last - i$1 >> 0))); - i$1 = i$1 + (1) >> 0; - } - lastPrefix = last; - i$2 = last; - while (true) { - if (!(i$2 >= 0)) { break; } - if (HasPrefix(pattern, $substring(pattern, (i$2 + 1 >> 0)))) { - lastPrefix = i$2 + 1 >> 0; - } - (x$3 = f.goodSuffixSkip, ((i$2 < 0 || i$2 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$2] = ((lastPrefix + last >> 0) - i$2 >> 0))); - i$2 = i$2 - (1) >> 0; - } - i$3 = 0; - while (true) { - if (!(i$3 < last)) { break; } - lenSuffix = longestCommonSuffix(pattern, $substring(pattern, 1, (i$3 + 1 >> 0))); - if (!((pattern.charCodeAt((i$3 - lenSuffix >> 0)) === pattern.charCodeAt((last - lenSuffix >> 0))))) { - (x$4 = f.goodSuffixSkip, x$5 = last - lenSuffix >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = ((lenSuffix + last >> 0) - i$3 >> 0))); - } - i$3 = i$3 + (1) >> 0; - } - return f; - }; - longestCommonSuffix = function(a, b) { - var a, b, i; - i = 0; - while (true) { - if (!(i < a.length && i < b.length)) { break; } - if (!((a.charCodeAt(((a.length - 1 >> 0) - i >> 0)) === b.charCodeAt(((b.length - 1 >> 0) - i >> 0))))) { - break; - } - i = i + (1) >> 0; - } - return i; - }; - stringFinder.ptr.prototype.next = function(text) { - var f, i, j, text, x, x$1, x$2; - f = this; - i = f.pattern.length - 1 >> 0; - while (true) { - if (!(i < text.length)) { break; } - j = f.pattern.length - 1 >> 0; - while (true) { - if (!(j >= 0 && (text.charCodeAt(i) === f.pattern.charCodeAt(j)))) { break; } - i = i - (1) >> 0; - j = j - (1) >> 0; - } - if (j < 0) { - return i + 1 >> 0; - } - i = i + (max((x = f.badCharSkip, x$1 = text.charCodeAt(i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = f.goodSuffixSkip, ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j])))) >> 0; - } - return -1; - }; - stringFinder.prototype.next = function(text) { return this.$val.next(text); }; - max = function(a, b) { - var a, b; - if (a > b) { - return a; - } - return b; - }; - NewReplacer = function(oldnew) { - var _r, oldnew; - if ((_r = oldnew.$length % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 1) { - $panic(new $String("strings.NewReplacer: odd argument count")); - } - return new Replacer.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil, $appendSlice((sliceType.nil), oldnew)); - }; - $pkg.NewReplacer = NewReplacer; - Replacer.ptr.prototype.buildOnce = function() { - var r; - r = this; - r.r = r.build(); - r.oldnew = sliceType.nil; - }; - Replacer.prototype.buildOnce = function() { return this.$val.buildOnce(); }; - Replacer.ptr.prototype.build = function() { - var _i, _q, _ref, allNewBytes, b, i, i$1, i$2, i$3, n, n$1, o, o$1, oldnew, r, r$1, x, x$1, x$2, x$3, x$4; - b = this; - oldnew = b.oldnew; - if ((oldnew.$length === 2) && (0 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 0]).length > 1) { - return makeSingleStringReplacer((0 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 0]), (1 >= oldnew.$length ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + 1])); - } - allNewBytes = true; - i = 0; - while (true) { - if (!(i < oldnew.$length)) { break; } - if (!((((i < 0 || i >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i]).length === 1))) { - return makeGenericReplacer(oldnew); - } - if (!(((x = i + 1 >> 0, ((x < 0 || x >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x])).length === 1))) { - allNewBytes = false; - } - i = i + (2) >> 0; - } - if (allNewBytes) { - r = arrayType$2.zero(); - _ref = r; - _i = 0; - while (true) { - if (!(_i < 256)) { break; } - i$1 = _i; - ((i$1 < 0 || i$1 >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[i$1] = ((i$1 << 24 >>> 24))); - _i++; - } - i$2 = oldnew.$length - 2 >> 0; - while (true) { - if (!(i$2 >= 0)) { break; } - o = ((i$2 < 0 || i$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$2]).charCodeAt(0); - n = (x$1 = i$2 + 1 >> 0, ((x$1 < 0 || x$1 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$1])).charCodeAt(0); - ((o < 0 || o >= r.length) ? ($throwRuntimeError("index out of range"), undefined) : r[o] = n); - i$2 = i$2 - (2) >> 0; - } - return new ptrType$2(r); - } - r$1 = new byteStringReplacer.ptr(arrayType$3.zero(), $makeSlice(sliceType, 0, (_q = oldnew.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))); - i$3 = oldnew.$length - 2 >> 0; - while (true) { - if (!(i$3 >= 0)) { break; } - o$1 = ((i$3 < 0 || i$3 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$3]).charCodeAt(0); - n$1 = (x$2 = i$3 + 1 >> 0, ((x$2 < 0 || x$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$2])); - if ((x$3 = r$1.replacements, ((o$1 < 0 || o$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[o$1])) === sliceType$2.nil) { - r$1.toReplace = $append(r$1.toReplace, ($bytesToString(new sliceType$2([o$1])))); - } - (x$4 = r$1.replacements, ((o$1 < 0 || o$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[o$1] = (new sliceType$2($stringToBytes(n$1))))); - i$3 = i$3 - (2) >> 0; - } - return r$1; - }; - Replacer.prototype.build = function() { return this.$val.build(); }; - Replacer.ptr.prototype.Replace = function(s) { - var {$24r, _r, r, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - $r = r.once.Do($methodVal(r, "buildOnce")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = r.r.Replace(s); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Replacer.ptr.prototype.Replace, $c: true, $r, $24r, _r, r, s, $s};return $f; - }; - Replacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; - Replacer.ptr.prototype.WriteString = function(w, s) { - var {$24r, _r, _tuple, err, n, r, s, w, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - $r = r.once.Do($methodVal(r, "buildOnce")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = r.r.WriteString(w, s); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Replacer.ptr.prototype.WriteString, $c: true, $r, $24r, _r, _tuple, err, n, r, s, w, $s};return $f; - }; - Replacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; - trieNode.ptr.prototype.add = function(key, val, priority, r) { - var key, keyNode, m, n, next, prefixNode, priority, r, t, val, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - t = this; - if (key === "") { - if (t.priority === 0) { - t.value = val; - t.priority = priority; - } - return; - } - if (!(t.prefix === "")) { - n = 0; - while (true) { - if (!(n < t.prefix.length && n < key.length)) { break; } - if (!((t.prefix.charCodeAt(n) === key.charCodeAt(n)))) { - break; - } - n = n + (1) >> 0; - } - if (n === t.prefix.length) { - t.next.add($substring(key, n), val, priority, r); - } else if (n === 0) { - prefixNode = ptrType$3.nil; - if (t.prefix.length === 1) { - prefixNode = t.next; - } else { - prefixNode = new trieNode.ptr("", 0, $substring(t.prefix, 1), t.next, sliceType$4.nil); - } - keyNode = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil); - t.table = $makeSlice(sliceType$4, r.tableSize); - (x = t.table, x$1 = (x$2 = r.mapping, x$3 = t.prefix.charCodeAt(0), ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3])), ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = prefixNode)); - (x$4 = t.table, x$5 = (x$6 = r.mapping, x$7 = key.charCodeAt(0), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])), ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = keyNode)); - t.prefix = ""; - t.next = ptrType$3.nil; - keyNode.add($substring(key, 1), val, priority, r); - } else { - next = new trieNode.ptr("", 0, $substring(t.prefix, n), t.next, sliceType$4.nil); - t.prefix = $substring(t.prefix, 0, n); - t.next = next; - next.add($substring(key, n), val, priority, r); - } - } else if (!(t.table === sliceType$4.nil)) { - m = (x$8 = r.mapping, x$9 = key.charCodeAt(0), ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])); - if ((x$10 = t.table, ((m < 0 || m >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + m])) === ptrType$3.nil) { - (x$11 = t.table, ((m < 0 || m >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + m] = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil))); - } - (x$12 = t.table, ((m < 0 || m >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + m])).add($substring(key, 1), val, priority, r); - } else { - t.prefix = key; - t.next = new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil); - t.next.add("", val, priority, r); - } - }; - trieNode.prototype.add = function(key, val, priority, r) { return this.$val.add(key, val, priority, r); }; - genericReplacer.ptr.prototype.lookup = function(s, ignoreRoot) { - var bestPriority, found, ignoreRoot, index, keylen, n, node, r, s, val, x, x$1, x$2; - val = ""; - keylen = 0; - found = false; - r = this; - bestPriority = 0; - node = r.root; - n = 0; - while (true) { - if (!(!(node === ptrType$3.nil))) { break; } - if (node.priority > bestPriority && !(ignoreRoot && node === r.root)) { - bestPriority = node.priority; - val = node.value; - keylen = n; - found = true; - } - if (s === "") { - break; - } - if (!(node.table === sliceType$4.nil)) { - index = (x = r.mapping, x$1 = s.charCodeAt(0), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])); - if (((index >> 0)) === r.tableSize) { - break; - } - node = (x$2 = node.table, ((index < 0 || index >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + index])); - s = $substring(s, 1); - n = n + (1) >> 0; - } else if (!(node.prefix === "") && HasPrefix(s, node.prefix)) { - n = n + (node.prefix.length) >> 0; - s = $substring(s, node.prefix.length); - node = node.next; - } else { - break; - } - } - return [val, keylen, found]; - }; - genericReplacer.prototype.lookup = function(s, ignoreRoot) { return this.$val.lookup(s, ignoreRoot); }; - makeGenericReplacer = function(oldnew) { - var _i, _i$1, _ref, _ref$1, b, b$1, i, i$1, i$2, index, j, key, oldnew, r, x, x$1, x$2, x$3, x$4; - r = new genericReplacer.ptr(new trieNode.ptr("", 0, "", ptrType$3.nil, sliceType$4.nil), 0, arrayType$2.zero()); - i = 0; - while (true) { - if (!(i < oldnew.$length)) { break; } - key = ((i < 0 || i >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i]); - j = 0; - while (true) { - if (!(j < key.length)) { break; } - (x = r.mapping, x$1 = key.charCodeAt(j), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = 1)); - j = j + (1) >> 0; - } - i = i + (2) >> 0; - } - _ref = r.mapping; - _i = 0; - while (true) { - if (!(_i < 256)) { break; } - b = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); - r.tableSize = r.tableSize + (((b >> 0))) >> 0; - _i++; - } - index = 0; - _ref$1 = r.mapping; - _i$1 = 0; - while (true) { - if (!(_i$1 < 256)) { break; } - i$1 = _i$1; - b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); - if (b$1 === 0) { - (x$2 = r.mapping, ((i$1 < 0 || i$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$1] = ((r.tableSize << 24 >>> 24)))); - } else { - (x$3 = r.mapping, ((i$1 < 0 || i$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i$1] = index)); - index = index + (1) << 24 >>> 24; - } - _i$1++; - } - r.root.table = $makeSlice(sliceType$4, r.tableSize); - i$2 = 0; - while (true) { - if (!(i$2 < oldnew.$length)) { break; } - r.root.add(((i$2 < 0 || i$2 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + i$2]), (x$4 = i$2 + 1 >> 0, ((x$4 < 0 || x$4 >= oldnew.$length) ? ($throwRuntimeError("index out of range"), undefined) : oldnew.$array[oldnew.$offset + x$4])), oldnew.$length - i$2 >> 0, r); - i$2 = i$2 + (2) >> 0; - } - return r; - }; - $ptrType(appendSliceWriter).prototype.Write = function(p) { - var p, w; - w = this; - w.$set($appendSlice(w.$get(), p)); - return [p.$length, $ifaceNil]; - }; - $ptrType(appendSliceWriter).prototype.WriteString = function(s) { - var s, w; - w = this; - w.$set($appendSlice(w.$get(), s)); - return [s.length, $ifaceNil]; - }; - stringWriter.ptr.prototype.WriteString = function(s) { - var {$24r, _r, s, w, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r = w.w.Write((new sliceType$2($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: stringWriter.ptr.prototype.WriteString, $c: true, $r, $24r, _r, s, w, $s};return $f; - }; - stringWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - getStringWriter = function(w) { - var _tuple, ok, sw, w, x; - _tuple = $assertType(w, io.StringWriter, true); - sw = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - sw = (x = new stringWriter.ptr(w), new x.constructor.elem(x)); - } - return sw; - }; - genericReplacer.ptr.prototype.Replace = function(s) { - var {_r, buf, r, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - buf = [buf]; - r = this; - buf[0] = $makeSlice(appendSliceWriter, 0, s.length); - _r = r.WriteString((buf.$ptr || (buf.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, buf))), s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return ($bytesToString(buf[0])); - /* */ } return; } var $f = {$blk: genericReplacer.ptr.prototype.Replace, $c: true, $r, _r, buf, r, s, $s};return $f; - }; - genericReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; - genericReplacer.ptr.prototype.WriteString = function(w, s) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, err, i, index, keylen, last, match, n, prevMatchEmpty, r, s, sw, val, w, wn, x, x$1, x$2, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - sw = getStringWriter(w); - _tmp = 0; - _tmp$1 = 0; - last = _tmp; - wn = _tmp$1; - prevMatchEmpty = false; - i = 0; - /* while (true) { */ case 1: - /* if (!(i <= s.length)) { break; } */ if(!(i <= s.length)) { $s = 2; continue; } - if (!((i === s.length)) && (r.root.priority === 0)) { - index = (((x = r.mapping, x$1 = s.charCodeAt(i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) >> 0)); - if ((index === r.tableSize) || (x$2 = r.root.table, ((index < 0 || index >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + index])) === ptrType$3.nil) { - i = i + (1) >> 0; - /* continue; */ $s = 1; continue; - } - } - _tuple = r.lookup($substring(s, i), prevMatchEmpty); - val = _tuple[0]; - keylen = _tuple[1]; - match = _tuple[2]; - prevMatchEmpty = match && (keylen === 0); - /* */ if (match) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (match) { */ case 3: - _r = sw.WriteString($substring(s, last, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - wn = _tuple$1[0]; - err = _tuple$1[1]; - n = n + (wn) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - _r$1 = sw.WriteString(val); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - wn = _tuple$2[0]; - err = _tuple$2[1]; - n = n + (wn) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - i = i + (keylen) >> 0; - last = i; - /* continue; */ $s = 1; continue; - /* } */ case 4: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - /* */ if (!((last === s.length))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((last === s.length))) { */ case 7: - _r$2 = sw.WriteString($substring(s, last)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$3 = _r$2; - wn = _tuple$3[0]; - err = _tuple$3[1]; - n = n + (wn) >> 0; - /* } */ case 8: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: genericReplacer.ptr.prototype.WriteString, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, err, i, index, keylen, last, match, n, prevMatchEmpty, r, s, sw, val, w, wn, x, x$1, x$2, $s};return $f; - }; - genericReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; - makeSingleStringReplacer = function(pattern, value) { - var pattern, value; - return new singleStringReplacer.ptr(makeStringFinder(pattern), value); - }; - singleStringReplacer.ptr.prototype.Replace = function(s) { - var _tmp, _tmp$1, buf, i, match, matched, r, s; - r = this; - buf = new Builder.ptr(ptrType$1.nil, sliceType$2.nil); - _tmp = 0; - _tmp$1 = false; - i = _tmp; - matched = _tmp$1; - while (true) { - match = r.finder.next($substring(s, i)); - if (match === -1) { - break; - } - matched = true; - buf.Grow(match + r.value.length >> 0); - buf.WriteString($substring(s, i, (i + match >> 0))); - buf.WriteString(r.value); - i = i + ((match + r.finder.pattern.length >> 0)) >> 0; - } - if (!matched) { - return s; - } - buf.WriteString($substring(s, i)); - return buf.String(); - }; - singleStringReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; - singleStringReplacer.ptr.prototype.WriteString = function(w, s) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, i, match, n, r, s, sw, w, wn, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - sw = getStringWriter(w); - _tmp = 0; - _tmp$1 = 0; - i = _tmp; - wn = _tmp$1; - /* while (true) { */ case 1: - match = r.finder.next($substring(s, i)); - if (match === -1) { - /* break; */ $s = 2; continue; - } - _r = sw.WriteString($substring(s, i, (i + match >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - wn = _tuple[0]; - err = _tuple[1]; - n = n + (wn) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - _r$1 = sw.WriteString(r.value); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - wn = _tuple$1[0]; - err = _tuple$1[1]; - n = n + (wn) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - i = i + ((match + r.finder.pattern.length >> 0)) >> 0; - $s = 1; continue; - case 2: - _r$2 = sw.WriteString($substring(s, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - wn = _tuple$2[0]; - err = _tuple$2[1]; - n = n + (wn) >> 0; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: singleStringReplacer.ptr.prototype.WriteString, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, i, match, n, r, s, sw, w, wn, $s};return $f; - }; - singleStringReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; - byteReplacer.prototype.Replace = function(s) { - var b, buf, i, r, s, x, x$1; - r = this.$val; - buf = sliceType$2.nil; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - b = s.charCodeAt(i); - if (!(((x = r, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])) === b))) { - if (buf === sliceType$2.nil) { - buf = (new sliceType$2($stringToBytes(s))); - } - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (x$1 = r, ((b < 0 || b >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[b]))); - } - i = i + (1) >> 0; - } - if (buf === sliceType$2.nil) { - return s; - } - return ($bytesToString(buf)); - }; - $ptrType(byteReplacer).prototype.Replace = function(s) { return (new byteReplacer(this.$get())).Replace(s); }; - byteReplacer.prototype.WriteString = function(w, s) { - var {_i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, bufsize, err, err$1, i, n, ncopy, r, s, w, wn, x, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this.$val; - bufsize = 32768; - if (s.length < bufsize) { - bufsize = s.length; - } - buf = $makeSlice(sliceType$2, bufsize); - /* while (true) { */ case 1: - /* if (!(s.length > 0)) { break; } */ if(!(s.length > 0)) { $s = 2; continue; } - ncopy = $copyString(buf, s); - s = $substring(s, ncopy); - _ref = $subslice(buf, 0, ncopy); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (x = r, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b]))); - _i++; - } - _r = w.Write($subslice(buf, 0, ncopy)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - wn = _tuple[0]; - err$1 = _tuple[1]; - n = n + (wn) >> 0; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = n; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - $s = 1; continue; - case 2: - _tmp$2 = n; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: byteReplacer.prototype.WriteString, $c: true, $r, _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, bufsize, err, err$1, i, n, ncopy, r, s, w, wn, x, $s};return $f; - }; - $ptrType(byteReplacer).prototype.WriteString = function(w, s) { return (new byteReplacer(this.$get())).WriteString(w, s); }; - byteStringReplacer.ptr.prototype.Replace = function(s) { - var _i, _ref, anyChanges, b, b$1, buf, c, i, i$1, j, newSize, r, s, x, x$1, x$2, x$3, x$4, x$5, x$6; - r = this; - newSize = s.length; - anyChanges = false; - if (($imul(r.toReplace.$length, 8)) <= s.length) { - _ref = r.toReplace; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - c = Count(s, x); - if (!((c === 0))) { - newSize = newSize + (($imul(c, (((x$1 = r.replacements, x$2 = x.charCodeAt(0), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])).$length - 1 >> 0))))) >> 0; - anyChanges = true; - } - _i++; - } - } else { - i = 0; - while (true) { - if (!(i < s.length)) { break; } - b = s.charCodeAt(i); - if (!((x$3 = r.replacements, ((b < 0 || b >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[b])) === sliceType$2.nil)) { - newSize = newSize + (((x$4 = r.replacements, ((b < 0 || b >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[b])).$length - 1 >> 0)) >> 0; - anyChanges = true; - } - i = i + (1) >> 0; - } - } - if (!anyChanges) { - return s; - } - buf = $makeSlice(sliceType$2, newSize); - j = 0; - i$1 = 0; - while (true) { - if (!(i$1 < s.length)) { break; } - b$1 = s.charCodeAt(i$1); - if (!((x$5 = r.replacements, ((b$1 < 0 || b$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[b$1])) === sliceType$2.nil)) { - j = j + ($copySlice($subslice(buf, j), (x$6 = r.replacements, ((b$1 < 0 || b$1 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[b$1])))) >> 0; - } else { - ((j < 0 || j >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + j] = b$1); - j = j + (1) >> 0; - } - i$1 = i$1 + (1) >> 0; - } - return ($bytesToString(buf)); - }; - byteStringReplacer.prototype.Replace = function(s) { return this.$val.Replace(s); }; - byteStringReplacer.ptr.prototype.WriteString = function(w, s) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, i, last, n, nw, nw$1, nw$2, r, s, sw, w, x, x$1, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - sw = getStringWriter(w); - last = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } - b = s.charCodeAt(i); - if ((x = r.replacements, ((b < 0 || b >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[b])) === sliceType$2.nil) { - i = i + (1) >> 0; - /* continue; */ $s = 1; continue; - } - /* */ if (!((last === i))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((last === i))) { */ case 3: - _r = sw.WriteString($substring(s, last, i)); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - nw = _tuple[0]; - err$1 = _tuple[1]; - n = n + (nw) >> 0; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = n; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* } */ case 4: - last = i + 1 >> 0; - _r$1 = w.Write((x$1 = r.replacements, ((b < 0 || b >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[b]))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - nw$1 = _tuple$1[0]; - err$2 = _tuple$1[1]; - n = n + (nw$1) >> 0; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$2 = n; - _tmp$3 = err$2; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - /* */ if (!((last === s.length))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((last === s.length))) { */ case 7: - nw$2 = 0; - _r$2 = sw.WriteString($substring(s, last)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - nw$2 = _tuple$2[0]; - err = _tuple$2[1]; - n = n + (nw$2) >> 0; - /* } */ case 8: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: byteStringReplacer.ptr.prototype.WriteString, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, i, last, n, nw, nw$1, nw$2, r, s, sw, w, x, x$1, $s};return $f; - }; - byteStringReplacer.prototype.WriteString = function(w, s) { return this.$val.WriteString(w, s); }; - Reader.ptr.prototype.Len = function() { - var r, x, x$1, x$2, x$3, x$4; - r = this; - if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - return 0; - } - return (((x$2 = (x$3 = (new $Int64(0, r.s.length)), x$4 = r.i, new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)); - }; - Reader.prototype.Len = function() { return this.$val.Len(); }; - Reader.ptr.prototype.Size = function() { - var r; - r = this; - return (new $Int64(0, r.s.length)); - }; - Reader.prototype.Size = function() { return this.$val.Size(); }; - Reader.ptr.prototype.Read = function(b) { - var _tmp, _tmp$1, b, err, n, r, x, x$1, x$2, x$3; - n = 0; - err = $ifaceNil; - r = this; - if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - _tmp = 0; - _tmp$1 = io.EOF; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - r.prevRune = -1; - n = $copyString(b, $substring(r.s, $flatten64(r.i))); - r.i = (x$2 = r.i, x$3 = (new $Int64(0, n)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - return [n, err]; - }; - Reader.prototype.Read = function(b) { return this.$val.Read(b); }; - Reader.ptr.prototype.ReadAt = function(b, off) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, n, off, r, x; - n = 0; - err = $ifaceNil; - r = this; - if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) { - _tmp = 0; - _tmp$1 = errors.New("strings.Reader.ReadAt: negative offset"); - n = _tmp; - err = _tmp$1; - return [n, err]; - } - if ((x = (new $Int64(0, r.s.length)), (off.$high > x.$high || (off.$high === x.$high && off.$low >= x.$low)))) { - _tmp$2 = 0; - _tmp$3 = io.EOF; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - n = $copyString(b, $substring(r.s, $flatten64(off))); - if (n < b.$length) { - err = io.EOF; - } - return [n, err]; - }; - Reader.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; - Reader.ptr.prototype.ReadByte = function() { - var b, r, x, x$1, x$2, x$3; - r = this; - r.prevRune = -1; - if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - return [0, io.EOF]; - } - b = r.s.charCodeAt($flatten64(r.i)); - r.i = (x$2 = r.i, x$3 = new $Int64(0, 1), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - return [b, $ifaceNil]; - }; - Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); }; - Reader.ptr.prototype.UnreadByte = function() { - var r, x, x$1, x$2; - r = this; - if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) { - return errors.New("strings.Reader.UnreadByte: at beginning of string"); - } - r.prevRune = -1; - r.i = (x$1 = r.i, x$2 = new $Int64(0, 1), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); - return $ifaceNil; - }; - Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; - Reader.ptr.prototype.ReadRune = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, ch, err, r, size, x, x$1, x$2, x$3, x$4, x$5, x$6; - ch = 0; - size = 0; - err = $ifaceNil; - r = this; - if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - r.prevRune = -1; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = io.EOF; - ch = _tmp; - size = _tmp$1; - err = _tmp$2; - return [ch, size, err]; - } - r.prevRune = (((x$2 = r.i, x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)); - c = r.s.charCodeAt($flatten64(r.i)); - if (c < 128) { - r.i = (x$3 = r.i, x$4 = new $Int64(0, 1), new $Int64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)); - _tmp$3 = ((c >> 0)); - _tmp$4 = 1; - _tmp$5 = $ifaceNil; - ch = _tmp$3; - size = _tmp$4; - err = _tmp$5; - return [ch, size, err]; - } - _tuple = utf8.DecodeRuneInString($substring(r.s, $flatten64(r.i))); - ch = _tuple[0]; - size = _tuple[1]; - r.i = (x$5 = r.i, x$6 = (new $Int64(0, size)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - return [ch, size, err]; - }; - Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); }; - Reader.ptr.prototype.UnreadRune = function() { - var r, x; - r = this; - if ((x = r.i, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) { - return errors.New("strings.Reader.UnreadRune: at beginning of string"); - } - if (r.prevRune < 0) { - return errors.New("strings.Reader.UnreadRune: previous operation was not ReadRune"); - } - r.i = (new $Int64(0, r.prevRune)); - r.prevRune = -1; - return $ifaceNil; - }; - Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; - Reader.ptr.prototype.Seek = function(offset, whence) { - var _1, abs, offset, r, whence, x, x$1; - r = this; - r.prevRune = -1; - abs = new $Int64(0, 0); - _1 = whence; - if (_1 === (0)) { - abs = offset; - } else if (_1 === (1)) { - abs = (x = r.i, new $Int64(x.$high + offset.$high, x.$low + offset.$low)); - } else if (_1 === (2)) { - abs = (x$1 = (new $Int64(0, r.s.length)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low)); - } else { - return [new $Int64(0, 0), errors.New("strings.Reader.Seek: invalid whence")]; - } - if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { - return [new $Int64(0, 0), errors.New("strings.Reader.Seek: negative position")]; - } - r.i = abs; - return [abs, $ifaceNil]; - }; - Reader.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; - Reader.ptr.prototype.WriteTo = function(w) { - var {_r, _tmp, _tmp$1, _tuple, err, m, n, r, s, w, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - r = this; - r.prevRune = -1; - if ((x = r.i, x$1 = (new $Int64(0, r.s.length)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low >= x$1.$low)))) { - _tmp = new $Int64(0, 0); - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - s = $substring(r.s, $flatten64(r.i)); - _r = io.WriteString(w, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - m = _tuple[0]; - err = _tuple[1]; - if (m > s.length) { - $panic(new $String("strings.Reader.WriteTo: invalid WriteString count")); - } - r.i = (x$2 = r.i, x$3 = (new $Int64(0, m)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n = (new $Int64(0, m)); - if (!((m === s.length)) && $interfaceIsEqual(err, $ifaceNil)) { - err = io.ErrShortWrite; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.WriteTo, $c: true, $r, _r, _tmp, _tmp$1, _tuple, err, m, n, r, s, w, x, x$1, x$2, x$3, $s};return $f; - }; - Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); }; - Reader.ptr.prototype.Reset = function(s) { - var r, s; - r = this; - Reader.copy(r, new Reader.ptr(s, new $Int64(0, 0), -1)); - }; - Reader.prototype.Reset = function(s) { return this.$val.Reset(s); }; - NewReader = function(s) { - var s; - return new Reader.ptr(s, new $Int64(0, 0), -1); - }; - $pkg.NewReader = NewReader; - Builder.ptr.prototype.Len = function() { - var b; - b = this; - return b.buf.$length; - }; - Builder.prototype.Len = function() { return this.$val.Len(); }; - Builder.ptr.prototype.Cap = function() { - var b; - b = this; - return b.buf.$capacity; - }; - Builder.prototype.Cap = function() { return this.$val.Cap(); }; - Builder.ptr.prototype.Reset = function() { - var b; - b = this; - b.addr = ptrType$1.nil; - b.buf = sliceType$2.nil; - }; - Builder.prototype.Reset = function() { return this.$val.Reset(); }; - Builder.ptr.prototype.grow = function(n) { - var b, buf, n; - b = this; - buf = $makeSlice(sliceType$2, b.buf.$length, (($imul(2, b.buf.$capacity)) + n >> 0)); - $copySlice(buf, b.buf); - b.buf = buf; - }; - Builder.prototype.grow = function(n) { return this.$val.grow(n); }; - Builder.ptr.prototype.Grow = function(n) { - var b, n; - b = this; - b.copyCheck(); - if (n < 0) { - $panic(new $String("strings.Builder.Grow: negative count")); - } - if ((b.buf.$capacity - b.buf.$length >> 0) < n) { - b.grow(n); - } - }; - Builder.prototype.Grow = function(n) { return this.$val.Grow(n); }; - Builder.ptr.prototype.Write = function(p) { - var b, p; - b = this; - b.copyCheck(); - b.buf = $appendSlice(b.buf, p); - return [p.$length, $ifaceNil]; - }; - Builder.prototype.Write = function(p) { return this.$val.Write(p); }; - Builder.ptr.prototype.WriteByte = function(c) { - var b, c; - b = this; - b.copyCheck(); - b.buf = $append(b.buf, c); - return $ifaceNil; - }; - Builder.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; - Builder.ptr.prototype.WriteRune = function(r) { - var b, l, n, r; - b = this; - b.copyCheck(); - if (((r >>> 0)) < 128) { - b.buf = $append(b.buf, ((r << 24 >>> 24))); - return [1, $ifaceNil]; - } - l = b.buf.$length; - if ((b.buf.$capacity - l >> 0) < 4) { - b.grow(4); - } - n = utf8.EncodeRune($subslice(b.buf, l, (l + 4 >> 0)), r); - b.buf = $subslice(b.buf, 0, (l + n >> 0)); - return [n, $ifaceNil]; - }; - Builder.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); }; - Builder.ptr.prototype.WriteString = function(s) { - var b, s; - b = this; - b.copyCheck(); - b.buf = $appendSlice(b.buf, s); - return [s.length, $ifaceNil]; - }; - Builder.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - IndexByte = function(s, c) { - var c, s; - return $parseInt(s.indexOf($global.String.fromCharCode(c))) >> 0; - }; - $pkg.IndexByte = IndexByte; - Index = function(s, sep) { - var s, sep; - return $parseInt(s.indexOf(sep)) >> 0; - }; - $pkg.Index = Index; - LastIndex = function(s, sep) { - var s, sep; - return $parseInt(s.lastIndexOf(sep)) >> 0; - }; - $pkg.LastIndex = LastIndex; - Count = function(s, sep) { - var n, pos, s, sep; - n = 0; - if ((sep.length === 0)) { - return utf8.RuneCountInString(s) + 1 >> 0; - } else if (sep.length > s.length) { - return 0; - } else if ((sep.length === s.length)) { - if (sep === s) { - return 1; - } - return 0; - } - while (true) { - pos = Index(s, sep); - if (pos === -1) { - break; - } - n = n + (1) >> 0; - s = $substring(s, (pos + sep.length >> 0)); - } - return n; - }; - $pkg.Count = Count; - Builder.ptr.prototype.String = function() { - var b; - b = this; - return ($bytesToString(b.buf)); - }; - Builder.prototype.String = function() { return this.$val.String(); }; - Builder.ptr.prototype.copyCheck = function() { - var b; - b = this; - if (b.addr === ptrType$1.nil) { - b.addr = b; - } else if (!(b.addr === b)) { - $panic(new $String("strings: illegal use of non-zero Builder copied by value")); - } - }; - Builder.prototype.copyCheck = function() { return this.$val.copyCheck(); }; - ptrType.methods = [{prop: "contains", name: "contains", pkg: "strings", typ: $funcType([$Uint8], [$Bool], false)}]; - ptrType$5.methods = [{prop: "next", name: "next", pkg: "strings", typ: $funcType([$String], [$Int], false)}]; - ptrType$6.methods = [{prop: "buildOnce", name: "buildOnce", pkg: "strings", typ: $funcType([], [], false)}, {prop: "build", name: "build", pkg: "strings", typ: $funcType([], [replacer], false)}, {prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; - ptrType$3.methods = [{prop: "add", name: "add", pkg: "strings", typ: $funcType([$String, $String, $Int, ptrType$7], [], false)}]; - ptrType$7.methods = [{prop: "lookup", name: "lookup", pkg: "strings", typ: $funcType([$String, $Bool], [$String, $Int, $Bool], false)}, {prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; - ptrType$4.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; - stringWriter.methods = [{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; - ptrType$8.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; - ptrType$2.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; - ptrType$9.methods = [{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]; - ptrType$10.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$2, $Int64], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([$String], [], false)}]; - ptrType$1.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "grow", name: "grow", pkg: "strings", typ: $funcType([$Int], [], false)}, {prop: "Grow", name: "Grow", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "copyCheck", name: "copyCheck", pkg: "strings", typ: $funcType([], [], false)}]; - asciiSet.init($Uint32, 8); - stringFinder.init("strings", [{prop: "pattern", name: "pattern", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "badCharSkip", name: "badCharSkip", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "goodSuffixSkip", name: "goodSuffixSkip", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - Replacer.init("strings", [{prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: replacer, tag: ""}, {prop: "oldnew", name: "oldnew", embedded: false, exported: false, typ: sliceType, tag: ""}]); - replacer.init([{prop: "Replace", name: "Replace", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([io.Writer, $String], [$Int, $error], false)}]); - trieNode.init("strings", [{prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "priority", name: "priority", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "prefix", name: "prefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "table", name: "table", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); - genericReplacer.init("strings", [{prop: "root", name: "root", embedded: false, exported: false, typ: trieNode, tag: ""}, {prop: "tableSize", name: "tableSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mapping", name: "mapping", embedded: false, exported: false, typ: arrayType$2, tag: ""}]); - appendSliceWriter.init($Uint8); - stringWriter.init("strings", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]); - singleStringReplacer.init("strings", [{prop: "finder", name: "finder", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}]); - byteReplacer.init($Uint8, 256); - byteStringReplacer.init("strings", [{prop: "replacements", name: "replacements", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "toReplace", name: "toReplace", embedded: false, exported: false, typ: sliceType, tag: ""}]); - Reader.init("strings", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "prevRune", name: "prevRune", embedded: false, exported: false, typ: $Int, tag: ""}]); - Builder.init("strings", [{prop: "addr", name: "addr", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - span.init("strings", [{prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "end", name: "end", embedded: false, exported: false, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - asciiSpace = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["bufio"] = (function() { - var $pkg = {}, $init, bytes, errors, io, strings, utf8, Scanner, SplitFunc, Reader, Writer, ReadWriter, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, errNegativeRead, errNegativeWrite, NewScanner, dropCR, ScanLines, NewReaderSize, NewReader, NewWriterSize, NewWriter, NewReadWriter; - bytes = $packages["bytes"]; - errors = $packages["errors"]; - io = $packages["io"]; - strings = $packages["strings"]; - utf8 = $packages["unicode/utf8"]; - Scanner = $pkg.Scanner = $newType(0, $kindStruct, "bufio.Scanner", true, "bufio", true, function(r_, split_, maxTokenSize_, token_, buf_, start_, end_, err_, empties_, scanCalled_, done_) { - this.$val = this; - if (arguments.length === 0) { - this.r = $ifaceNil; - this.split = $throwNilPointerError; - this.maxTokenSize = 0; - this.token = sliceType.nil; - this.buf = sliceType.nil; - this.start = 0; - this.end = 0; - this.err = $ifaceNil; - this.empties = 0; - this.scanCalled = false; - this.done = false; - return; - } - this.r = r_; - this.split = split_; - this.maxTokenSize = maxTokenSize_; - this.token = token_; - this.buf = buf_; - this.start = start_; - this.end = end_; - this.err = err_; - this.empties = empties_; - this.scanCalled = scanCalled_; - this.done = done_; - }); - SplitFunc = $pkg.SplitFunc = $newType(4, $kindFunc, "bufio.SplitFunc", true, "bufio", true, null); - Reader = $pkg.Reader = $newType(0, $kindStruct, "bufio.Reader", true, "bufio", true, function(buf_, rd_, r_, w_, err_, lastByte_, lastRuneSize_) { - this.$val = this; - if (arguments.length === 0) { - this.buf = sliceType.nil; - this.rd = $ifaceNil; - this.r = 0; - this.w = 0; - this.err = $ifaceNil; - this.lastByte = 0; - this.lastRuneSize = 0; - return; - } - this.buf = buf_; - this.rd = rd_; - this.r = r_; - this.w = w_; - this.err = err_; - this.lastByte = lastByte_; - this.lastRuneSize = lastRuneSize_; - }); - Writer = $pkg.Writer = $newType(0, $kindStruct, "bufio.Writer", true, "bufio", true, function(err_, buf_, n_, wr_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - this.buf = sliceType.nil; - this.n = 0; - this.wr = $ifaceNil; - return; - } - this.err = err_; - this.buf = buf_; - this.n = n_; - this.wr = wr_; - }); - ReadWriter = $pkg.ReadWriter = $newType(0, $kindStruct, "bufio.ReadWriter", true, "bufio", true, function(Reader_, Writer_) { - this.$val = this; - if (arguments.length === 0) { - this.Reader = ptrType.nil; - this.Writer = ptrType$2.nil; - return; - } - this.Reader = Reader_; - this.Writer = Writer_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(Reader); - sliceType$1 = $sliceType(sliceType); - ptrType$1 = $ptrType(strings.Builder); - ptrType$2 = $ptrType(Writer); - ptrType$3 = $ptrType(Scanner); - NewScanner = function(r) { - var r; - return new Scanner.ptr(r, ScanLines, 65536, sliceType.nil, sliceType.nil, 0, 0, $ifaceNil, 0, false, false); - }; - $pkg.NewScanner = NewScanner; - Scanner.ptr.prototype.Err = function() { - var s; - s = this; - if ($interfaceIsEqual(s.err, io.EOF)) { - return $ifaceNil; - } - return s.err; - }; - Scanner.prototype.Err = function() { return this.$val.Err(); }; - Scanner.ptr.prototype.Bytes = function() { - var s; - s = this; - return s.token; - }; - Scanner.prototype.Bytes = function() { return this.$val.Bytes(); }; - Scanner.ptr.prototype.Text = function() { - var s; - s = this; - return ($bytesToString(s.token)); - }; - Scanner.prototype.Text = function() { return this.$val.Text(); }; - Scanner.ptr.prototype.Scan = function() { - var {_q, _r, _r$1, _tuple, _tuple$1, advance, err, err$1, loop, n, newBuf, newSize, s, token, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (s.done) { - $s = -1; return false; - } - s.scanCalled = true; - /* while (true) { */ case 1: - /* */ if (s.end > s.start || !($interfaceIsEqual(s.err, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (s.end > s.start || !($interfaceIsEqual(s.err, $ifaceNil))) { */ case 3: - _r = s.split($subslice(s.buf, s.start, s.end), !($interfaceIsEqual(s.err, $ifaceNil))); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - advance = _tuple[0]; - token = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, $pkg.ErrFinalToken)) { - s.token = token; - s.done = true; - $s = -1; return true; - } - s.setErr(err); - $s = -1; return false; - } - if (!s.advance(advance)) { - $s = -1; return false; - } - s.token = token; - if (!(token === sliceType.nil)) { - if ($interfaceIsEqual(s.err, $ifaceNil) || advance > 0) { - s.empties = 0; - } else { - s.empties = s.empties + (1) >> 0; - if (s.empties > 100) { - $panic(new $String("bufio.Scan: too many empty tokens without progressing")); - } - } - $s = -1; return true; - } - /* } */ case 4: - if (!($interfaceIsEqual(s.err, $ifaceNil))) { - s.start = 0; - s.end = 0; - $s = -1; return false; - } - if (s.start > 0 && ((s.end === s.buf.$length) || s.start > (_q = s.buf.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) { - $copySlice(s.buf, $subslice(s.buf, s.start, s.end)); - s.end = s.end - (s.start) >> 0; - s.start = 0; - } - if (s.end === s.buf.$length) { - if (s.buf.$length >= s.maxTokenSize || s.buf.$length > 1073741823) { - s.setErr($pkg.ErrTooLong); - $s = -1; return false; - } - newSize = $imul(s.buf.$length, 2); - if (newSize === 0) { - newSize = 4096; - } - if (newSize > s.maxTokenSize) { - newSize = s.maxTokenSize; - } - newBuf = $makeSlice(sliceType, newSize); - $copySlice(newBuf, $subslice(s.buf, s.start, s.end)); - s.buf = newBuf; - s.end = s.end - (s.start) >> 0; - s.start = 0; - } - loop = 0; - /* while (true) { */ case 6: - _r$1 = s.r.Read($subslice(s.buf, s.end, s.buf.$length)); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - n = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (n < 0 || (s.buf.$length - s.end >> 0) < n) { - s.setErr($pkg.ErrBadReadCount); - /* break; */ $s = 7; continue; - } - s.end = s.end + (n) >> 0; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - s.setErr(err$1); - /* break; */ $s = 7; continue; - } - if (n > 0) { - s.empties = 0; - /* break; */ $s = 7; continue; - } - loop = loop + (1) >> 0; - if (loop > 100) { - s.setErr(io.ErrNoProgress); - /* break; */ $s = 7; continue; - } - $s = 6; continue; - case 7: - $s = 1; continue; - case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: Scanner.ptr.prototype.Scan, $c: true, $r, _q, _r, _r$1, _tuple, _tuple$1, advance, err, err$1, loop, n, newBuf, newSize, s, token, $s};return $f; - }; - Scanner.prototype.Scan = function() { return this.$val.Scan(); }; - Scanner.ptr.prototype.advance = function(n) { - var n, s; - s = this; - if (n < 0) { - s.setErr($pkg.ErrNegativeAdvance); - return false; - } - if (n > (s.end - s.start >> 0)) { - s.setErr($pkg.ErrAdvanceTooFar); - return false; - } - s.start = s.start + (n) >> 0; - return true; - }; - Scanner.prototype.advance = function(n) { return this.$val.advance(n); }; - Scanner.ptr.prototype.setErr = function(err) { - var err, s; - s = this; - if ($interfaceIsEqual(s.err, $ifaceNil) || $interfaceIsEqual(s.err, io.EOF)) { - s.err = err; - } - }; - Scanner.prototype.setErr = function(err) { return this.$val.setErr(err); }; - Scanner.ptr.prototype.Buffer = function(buf, max) { - var buf, max, s; - s = this; - if (s.scanCalled) { - $panic(new $String("Buffer called after Scan")); - } - s.buf = $subslice(buf, 0, buf.$capacity); - s.maxTokenSize = max; - }; - Scanner.prototype.Buffer = function(buf, max) { return this.$val.Buffer(buf, max); }; - Scanner.ptr.prototype.Split = function(split) { - var s, split; - s = this; - if (s.scanCalled) { - $panic(new $String("Split called after Scan")); - } - s.split = split; - }; - Scanner.prototype.Split = function(split) { return this.$val.Split(split); }; - dropCR = function(data) { - var data, x; - if (data.$length > 0 && ((x = data.$length - 1 >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])) === 13)) { - return $subslice(data, 0, (data.$length - 1 >> 0)); - } - return data; - }; - ScanLines = function(data, atEOF) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, advance, atEOF, data, err, i, token; - advance = 0; - token = sliceType.nil; - err = $ifaceNil; - if (atEOF && (data.$length === 0)) { - _tmp = 0; - _tmp$1 = sliceType.nil; - _tmp$2 = $ifaceNil; - advance = _tmp; - token = _tmp$1; - err = _tmp$2; - return [advance, token, err]; - } - i = bytes.IndexByte(data, 10); - if (i >= 0) { - _tmp$3 = i + 1 >> 0; - _tmp$4 = dropCR($subslice(data, 0, i)); - _tmp$5 = $ifaceNil; - advance = _tmp$3; - token = _tmp$4; - err = _tmp$5; - return [advance, token, err]; - } - if (atEOF) { - _tmp$6 = data.$length; - _tmp$7 = dropCR(data); - _tmp$8 = $ifaceNil; - advance = _tmp$6; - token = _tmp$7; - err = _tmp$8; - return [advance, token, err]; - } - _tmp$9 = 0; - _tmp$10 = sliceType.nil; - _tmp$11 = $ifaceNil; - advance = _tmp$9; - token = _tmp$10; - err = _tmp$11; - return [advance, token, err]; - }; - $pkg.ScanLines = ScanLines; - NewReaderSize = function(rd, size) { - var _tuple, b, ok, r, rd, size; - _tuple = $assertType(rd, ptrType, true); - b = _tuple[0]; - ok = _tuple[1]; - if (ok && b.buf.$length >= size) { - return b; - } - if (size < 16) { - size = 16; - } - r = new Reader.ptr(sliceType.nil, $ifaceNil, 0, 0, $ifaceNil, 0, 0); - r.reset($makeSlice(sliceType, size), rd); - return r; - }; - $pkg.NewReaderSize = NewReaderSize; - NewReader = function(rd) { - var rd; - return NewReaderSize(rd, 4096); - }; - $pkg.NewReader = NewReader; - Reader.ptr.prototype.Size = function() { - var b; - b = this; - return b.buf.$length; - }; - Reader.prototype.Size = function() { return this.$val.Size(); }; - Reader.ptr.prototype.Reset = function(r) { - var b, r; - b = this; - if (b.buf === sliceType.nil) { - b.buf = $makeSlice(sliceType, 4096); - } - b.reset(b.buf, r); - }; - Reader.prototype.Reset = function(r) { return this.$val.Reset(r); }; - Reader.ptr.prototype.reset = function(buf, r) { - var b, buf, r; - b = this; - Reader.copy(b, new Reader.ptr(buf, r, 0, 0, $ifaceNil, -1, -1)); - }; - Reader.prototype.reset = function(buf, r) { return this.$val.reset(buf, r); }; - Reader.ptr.prototype.fill = function() { - var {_r, _tuple, b, err, i, n, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (b.r > 0) { - $copySlice(b.buf, $subslice(b.buf, b.r, b.w)); - b.w = b.w - (b.r) >> 0; - b.r = 0; - } - if (b.w >= b.buf.$length) { - $panic(new $String("bufio: tried to fill full buffer")); - } - i = 100; - /* while (true) { */ case 1: - /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 2; continue; } - _r = b.rd.Read($subslice(b.buf, b.w)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (n < 0) { - $panic(errNegativeRead); - } - b.w = b.w + (n) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - b.err = err; - $s = -1; return; - } - if (n > 0) { - $s = -1; return; - } - i = i - (1) >> 0; - $s = 1; continue; - case 2: - b.err = io.ErrNoProgress; - $s = -1; return; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.fill, $c: true, $r, _r, _tuple, b, err, i, n, $s};return $f; - }; - Reader.prototype.fill = function() { return this.$val.fill(); }; - Reader.ptr.prototype.readErr = function() { - var b, err; - b = this; - err = b.err; - b.err = $ifaceNil; - return err; - }; - Reader.prototype.readErr = function() { return this.$val.readErr(); }; - Reader.ptr.prototype.Peek = function(n) { - var {avail, b, err, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (n < 0) { - $s = -1; return [sliceType.nil, $pkg.ErrNegativeCount]; - } - b.lastByte = -1; - b.lastRuneSize = -1; - /* while (true) { */ case 1: - /* if (!((b.w - b.r >> 0) < n && (b.w - b.r >> 0) < b.buf.$length && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!((b.w - b.r >> 0) < n && (b.w - b.r >> 0) < b.buf.$length && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; } - $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 1; continue; - case 2: - if (n > b.buf.$length) { - $s = -1; return [$subslice(b.buf, b.r, b.w), $pkg.ErrBufferFull]; - } - err = $ifaceNil; - avail = b.w - b.r >> 0; - if (avail < n) { - n = avail; - err = b.readErr(); - if ($interfaceIsEqual(err, $ifaceNil)) { - err = $pkg.ErrBufferFull; - } - } - $s = -1; return [$subslice(b.buf, b.r, (b.r + n >> 0)), err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Peek, $c: true, $r, avail, b, err, n, $s};return $f; - }; - Reader.prototype.Peek = function(n) { return this.$val.Peek(n); }; - Reader.ptr.prototype.Discard = function(n) { - var {_tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, discarded, err, n, remain, skip, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - discarded = 0; - err = $ifaceNil; - b = this; - if (n < 0) { - _tmp = 0; - _tmp$1 = $pkg.ErrNegativeCount; - discarded = _tmp; - err = _tmp$1; - $s = -1; return [discarded, err]; - } - if (n === 0) { - $s = -1; return [discarded, err]; - } - b.lastByte = -1; - b.lastRuneSize = -1; - remain = n; - /* while (true) { */ case 1: - skip = b.Buffered(); - /* */ if (skip === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (skip === 0) { */ case 3: - $r = b.fill(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - skip = b.Buffered(); - /* } */ case 4: - if (skip > remain) { - skip = remain; - } - b.r = b.r + (skip) >> 0; - remain = remain - (skip) >> 0; - if (remain === 0) { - _tmp$2 = n; - _tmp$3 = $ifaceNil; - discarded = _tmp$2; - err = _tmp$3; - $s = -1; return [discarded, err]; - } - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - _tmp$4 = n - remain >> 0; - _tmp$5 = b.readErr(); - discarded = _tmp$4; - err = _tmp$5; - $s = -1; return [discarded, err]; - } - $s = 1; continue; - case 2: - $s = -1; return [discarded, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Discard, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, discarded, err, n, remain, skip, $s};return $f; - }; - Reader.prototype.Discard = function(n) { return this.$val.Discard(n); }; - Reader.ptr.prototype.Read = function(p) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, n, p, x, x$1, x$2, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - n = p.$length; - if (n === 0) { - if (b.Buffered() > 0) { - _tmp = 0; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _tmp$2 = 0; - _tmp$3 = b.readErr(); - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - /* */ if (b.r === b.w) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (b.r === b.w) { */ case 1: - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - _tmp$4 = 0; - _tmp$5 = b.readErr(); - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - /* */ if (p.$length >= b.buf.$length) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (p.$length >= b.buf.$length) { */ case 3: - _r = b.rd.Read(p); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - b.err = _tuple[1]; - if (n < 0) { - $panic(errNegativeRead); - } - if (n > 0) { - b.lastByte = (((x = n - 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >> 0)); - b.lastRuneSize = -1; - } - _tmp$6 = n; - _tmp$7 = b.readErr(); - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - /* } */ case 4: - b.r = 0; - b.w = 0; - _r$1 = b.rd.Read(b.buf); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - n = _tuple$1[0]; - b.err = _tuple$1[1]; - if (n < 0) { - $panic(errNegativeRead); - } - if (n === 0) { - _tmp$8 = 0; - _tmp$9 = b.readErr(); - n = _tmp$8; - err = _tmp$9; - $s = -1; return [n, err]; - } - b.w = b.w + (n) >> 0; - /* } */ case 2: - n = $copySlice(p, $subslice(b.buf, b.r, b.w)); - b.r = b.r + (n) >> 0; - b.lastByte = (((x$1 = b.buf, x$2 = b.r - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) >> 0)); - b.lastRuneSize = -1; - _tmp$10 = n; - _tmp$11 = $ifaceNil; - n = _tmp$10; - err = _tmp$11; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Read, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, n, p, x, x$1, x$2, $s};return $f; - }; - Reader.prototype.Read = function(p) { return this.$val.Read(p); }; - Reader.ptr.prototype.ReadByte = function() { - var {b, c, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - b.lastRuneSize = -1; - /* while (true) { */ case 1: - /* if (!(b.r === b.w)) { break; } */ if(!(b.r === b.w)) { $s = 2; continue; } - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return [0, b.readErr()]; - } - $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 1; continue; - case 2: - c = (x = b.buf, x$1 = b.r, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - b.r = b.r + (1) >> 0; - b.lastByte = ((c >> 0)); - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadByte, $c: true, $r, b, c, x, x$1, $s};return $f; - }; - Reader.prototype.ReadByte = function() { return this.$val.ReadByte(); }; - Reader.ptr.prototype.UnreadByte = function() { - var b, x, x$1; - b = this; - if (b.lastByte < 0 || (b.r === 0) && b.w > 0) { - return $pkg.ErrInvalidUnreadByte; - } - if (b.r > 0) { - b.r = b.r - (1) >> 0; - } else { - b.w = 1; - } - (x = b.buf, x$1 = b.r, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = ((b.lastByte << 24 >>> 24)))); - b.lastByte = -1; - b.lastRuneSize = -1; - return $ifaceNil; - }; - Reader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; - Reader.ptr.prototype.ReadRune = function() { - var {_tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, r, size, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = 0; - size = 0; - err = $ifaceNil; - b = this; - /* while (true) { */ case 1: - /* if (!((b.r + 4 >> 0) > b.w && !utf8.FullRune($subslice(b.buf, b.r, b.w)) && $interfaceIsEqual(b.err, $ifaceNil) && (b.w - b.r >> 0) < b.buf.$length)) { break; } */ if(!((b.r + 4 >> 0) > b.w && !utf8.FullRune($subslice(b.buf, b.r, b.w)) && $interfaceIsEqual(b.err, $ifaceNil) && (b.w - b.r >> 0) < b.buf.$length)) { $s = 2; continue; } - $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 1; continue; - case 2: - b.lastRuneSize = -1; - if (b.r === b.w) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = b.readErr(); - r = _tmp; - size = _tmp$1; - err = _tmp$2; - $s = -1; return [r, size, err]; - } - _tmp$3 = (((x = b.buf, x$1 = b.r, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) >> 0)); - _tmp$4 = 1; - r = _tmp$3; - size = _tmp$4; - if (r >= 128) { - _tuple = utf8.DecodeRune($subslice(b.buf, b.r, b.w)); - r = _tuple[0]; - size = _tuple[1]; - } - b.r = b.r + (size) >> 0; - b.lastByte = (((x$2 = b.buf, x$3 = b.r - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])) >> 0)); - b.lastRuneSize = size; - _tmp$5 = r; - _tmp$6 = size; - _tmp$7 = $ifaceNil; - r = _tmp$5; - size = _tmp$6; - err = _tmp$7; - $s = -1; return [r, size, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadRune, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, r, size, x, x$1, x$2, x$3, $s};return $f; - }; - Reader.prototype.ReadRune = function() { return this.$val.ReadRune(); }; - Reader.ptr.prototype.UnreadRune = function() { - var b; - b = this; - if (b.lastRuneSize < 0 || b.r < b.lastRuneSize) { - return $pkg.ErrInvalidUnreadRune; - } - b.r = b.r - (b.lastRuneSize) >> 0; - b.lastByte = -1; - b.lastRuneSize = -1; - return $ifaceNil; - }; - Reader.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; - Reader.ptr.prototype.Buffered = function() { - var b; - b = this; - return b.w - b.r >> 0; - }; - Reader.prototype.Buffered = function() { return this.$val.Buffered(); }; - Reader.ptr.prototype.ReadSlice = function(delim) { - var {b, delim, err, i, i$1, line, s, $s, $r, $c} = $restore(this, {delim}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - line = sliceType.nil; - err = $ifaceNil; - b = this; - s = 0; - /* while (true) { */ case 1: - i = bytes.IndexByte($subslice(b.buf, (b.r + s >> 0), b.w), delim); - if (i >= 0) { - i = i + (s) >> 0; - line = $subslice(b.buf, b.r, ((b.r + i >> 0) + 1 >> 0)); - b.r = b.r + ((i + 1 >> 0)) >> 0; - /* break; */ $s = 2; continue; - } - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - line = $subslice(b.buf, b.r, b.w); - b.r = b.w; - err = b.readErr(); - /* break; */ $s = 2; continue; - } - if (b.Buffered() >= b.buf.$length) { - b.r = b.w; - line = b.buf; - err = $pkg.ErrBufferFull; - /* break; */ $s = 2; continue; - } - s = b.w - b.r >> 0; - $r = b.fill(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 1; continue; - case 2: - i$1 = line.$length - 1 >> 0; - if (i$1 >= 0) { - b.lastByte = ((((i$1 < 0 || i$1 >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + i$1]) >> 0)); - b.lastRuneSize = -1; - } - $s = -1; return [line, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadSlice, $c: true, $r, b, delim, err, i, i$1, line, s, $s};return $f; - }; - Reader.prototype.ReadSlice = function(delim) { return this.$val.ReadSlice(delim); }; - Reader.ptr.prototype.ReadLine = function() { - var {_r, _tmp, _tmp$1, _tmp$2, _tuple, b, drop, err, isPrefix, line, x, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - line = sliceType.nil; - isPrefix = false; - err = $ifaceNil; - b = this; - _r = b.ReadSlice(10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $pkg.ErrBufferFull)) { - if (line.$length > 0 && ((x = line.$length - 1 >> 0, ((x < 0 || x >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + x])) === 13)) { - if (b.r === 0) { - $panic(new $String("bufio: tried to rewind past start of buffer")); - } - b.r = b.r - (1) >> 0; - line = $subslice(line, 0, (line.$length - 1 >> 0)); - } - _tmp = line; - _tmp$1 = true; - _tmp$2 = $ifaceNil; - line = _tmp; - isPrefix = _tmp$1; - err = _tmp$2; - $s = -1; return [line, isPrefix, err]; - } - if (line.$length === 0) { - if (!($interfaceIsEqual(err, $ifaceNil))) { - line = sliceType.nil; - } - $s = -1; return [line, isPrefix, err]; - } - err = $ifaceNil; - if ((x$1 = line.$length - 1 >> 0, ((x$1 < 0 || x$1 >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + x$1])) === 10) { - drop = 1; - if (line.$length > 1 && ((x$2 = line.$length - 2 >> 0, ((x$2 < 0 || x$2 >= line.$length) ? ($throwRuntimeError("index out of range"), undefined) : line.$array[line.$offset + x$2])) === 13)) { - drop = 2; - } - line = $subslice(line, 0, (line.$length - drop >> 0)); - } - $s = -1; return [line, isPrefix, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadLine, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tuple, b, drop, err, isPrefix, line, x, x$1, x$2, $s};return $f; - }; - Reader.prototype.ReadLine = function() { return this.$val.ReadLine(); }; - Reader.ptr.prototype.collectFragments = function(delim) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, delim, e, err, finalFragment, frag, fullBuffers, totalLen, $s, $r, $c} = $restore(this, {delim}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fullBuffers = sliceType$1.nil; - finalFragment = sliceType.nil; - totalLen = 0; - err = $ifaceNil; - b = this; - frag = sliceType.nil; - /* while (true) { */ case 1: - e = $ifaceNil; - _r = b.ReadSlice(delim); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - frag = _tuple[0]; - e = _tuple[1]; - if ($interfaceIsEqual(e, $ifaceNil)) { - /* break; */ $s = 2; continue; - } - if (!($interfaceIsEqual(e, $pkg.ErrBufferFull))) { - err = e; - /* break; */ $s = 2; continue; - } - buf = $makeSlice(sliceType, frag.$length); - $copySlice(buf, frag); - fullBuffers = $append(fullBuffers, buf); - totalLen = totalLen + (buf.$length) >> 0; - $s = 1; continue; - case 2: - totalLen = totalLen + (frag.$length) >> 0; - _tmp = fullBuffers; - _tmp$1 = frag; - _tmp$2 = totalLen; - _tmp$3 = err; - fullBuffers = _tmp; - finalFragment = _tmp$1; - totalLen = _tmp$2; - err = _tmp$3; - $s = -1; return [fullBuffers, finalFragment, totalLen, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.collectFragments, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, buf, delim, e, err, finalFragment, frag, fullBuffers, totalLen, $s};return $f; - }; - Reader.prototype.collectFragments = function(delim) { return this.$val.collectFragments(delim); }; - Reader.ptr.prototype.ReadBytes = function(delim) { - var {_i, _r, _ref, _tuple, b, buf, delim, err, frag, full, i, n, $s, $r, $c} = $restore(this, {delim}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - _r = b.collectFragments(delim); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - full = _tuple[0]; - frag = _tuple[1]; - n = _tuple[2]; - err = _tuple[3]; - buf = $makeSlice(sliceType, n); - n = 0; - _ref = full; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - n = n + ($copySlice($subslice(buf, n), ((i < 0 || i >= full.$length) ? ($throwRuntimeError("index out of range"), undefined) : full.$array[full.$offset + i]))) >> 0; - _i++; - } - $copySlice($subslice(buf, n), frag); - $s = -1; return [buf, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadBytes, $c: true, $r, _i, _r, _ref, _tuple, b, buf, delim, err, frag, full, i, n, $s};return $f; - }; - Reader.prototype.ReadBytes = function(delim) { return this.$val.ReadBytes(delim); }; - Reader.ptr.prototype.ReadString = function(delim) { - var {_i, _r, _ref, _tuple, b, buf, delim, err, fb, frag, full, n, $s, $r, $c} = $restore(this, {delim}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - _r = b.collectFragments(delim); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - full = _tuple[0]; - frag = _tuple[1]; - n = _tuple[2]; - err = _tuple[3]; - buf = new strings.Builder.ptr(ptrType$1.nil, sliceType.nil); - buf.Grow(n); - _ref = full; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - fb = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - buf.Write(fb); - _i++; - } - buf.Write(frag); - $s = -1; return [buf.String(), err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadString, $c: true, $r, _i, _r, _ref, _tuple, b, buf, delim, err, fb, frag, full, n, $s};return $f; - }; - Reader.prototype.ReadString = function(delim) { return this.$val.ReadString(delim); }; - Reader.ptr.prototype.WriteTo = function(w) { - var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, err, err$1, err$2, err$3, m, m$1, m$2, n, ok, ok$1, r, w, w$1, x, x$1, x$2, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - b = this; - b.lastByte = -1; - b.lastRuneSize = -1; - _r = b.writeBuf(w); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - _tuple$1 = $assertType(b.rd, io.WriterTo, true); - r = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = r.WriteTo(w); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - m = _tuple$2[0]; - err$1 = _tuple$2[1]; - n = (x = m, new $Int64(n.$high + x.$high, n.$low + x.$low)); - _tmp = n; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* } */ case 3: - _tuple$3 = $assertType(w, io.ReaderFrom, true); - w$1 = _tuple$3[0]; - ok$1 = _tuple$3[1]; - /* */ if (ok$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ok$1) { */ case 5: - _r$2 = w$1.ReadFrom(b.rd); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$4 = _r$2; - m$1 = _tuple$4[0]; - err$2 = _tuple$4[1]; - n = (x$1 = m$1, new $Int64(n.$high + x$1.$high, n.$low + x$1.$low)); - _tmp$2 = n; - _tmp$3 = err$2; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* } */ case 6: - /* */ if ((b.w - b.r >> 0) < b.buf.$length) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((b.w - b.r >> 0) < b.buf.$length) { */ case 8: - $r = b.fill(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - /* while (true) { */ case 11: - /* if (!(b.r < b.w)) { break; } */ if(!(b.r < b.w)) { $s = 12; continue; } - _r$3 = b.writeBuf(w); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$5 = _r$3; - m$2 = _tuple$5[0]; - err$3 = _tuple$5[1]; - n = (x$2 = m$2, new $Int64(n.$high + x$2.$high, n.$low + x$2.$low)); - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - _tmp$4 = n; - _tmp$5 = err$3; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - $r = b.fill(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - case 12: - if ($interfaceIsEqual(b.err, io.EOF)) { - b.err = $ifaceNil; - } - _tmp$6 = n; - _tmp$7 = b.readErr(); - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.WriteTo, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, err, err$1, err$2, err$3, m, m$1, m$2, n, ok, ok$1, r, w, w$1, x, x$1, x$2, $s};return $f; - }; - Reader.prototype.WriteTo = function(w) { return this.$val.WriteTo(w); }; - Reader.ptr.prototype.writeBuf = function(w) { - var {_r, _tuple, b, err, n, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - _r = w.Write($subslice(b.buf, b.r, b.w)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (n < 0) { - $panic(errNegativeWrite); - } - b.r = b.r + (n) >> 0; - $s = -1; return [(new $Int64(0, n)), err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.writeBuf, $c: true, $r, _r, _tuple, b, err, n, w, $s};return $f; - }; - Reader.prototype.writeBuf = function(w) { return this.$val.writeBuf(w); }; - NewWriterSize = function(w, size) { - var _tuple, b, ok, size, w; - _tuple = $assertType(w, ptrType$2, true); - b = _tuple[0]; - ok = _tuple[1]; - if (ok && b.buf.$length >= size) { - return b; - } - if (size <= 0) { - size = 4096; - } - return new Writer.ptr($ifaceNil, $makeSlice(sliceType, size), 0, w); - }; - $pkg.NewWriterSize = NewWriterSize; - NewWriter = function(w) { - var w; - return NewWriterSize(w, 4096); - }; - $pkg.NewWriter = NewWriter; - Writer.ptr.prototype.Size = function() { - var b; - b = this; - return b.buf.$length; - }; - Writer.prototype.Size = function() { return this.$val.Size(); }; - Writer.ptr.prototype.Reset = function(w) { - var b, w; - b = this; - if (b.buf === sliceType.nil) { - b.buf = $makeSlice(sliceType, 4096); - } - b.err = $ifaceNil; - b.n = 0; - b.wr = w; - }; - Writer.prototype.Reset = function(w) { return this.$val.Reset(w); }; - Writer.ptr.prototype.Flush = function() { - var {_r, _tuple, b, err, n, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return b.err; - } - if (b.n === 0) { - $s = -1; return $ifaceNil; - } - _r = b.wr.Write($subslice(b.buf, 0, b.n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (n < b.n && $interfaceIsEqual(err, $ifaceNil)) { - err = io.ErrShortWrite; - } - if (!($interfaceIsEqual(err, $ifaceNil))) { - if (n > 0 && n < b.n) { - $copySlice($subslice(b.buf, 0, (b.n - n >> 0)), $subslice(b.buf, n, b.n)); - } - b.n = b.n - (n) >> 0; - b.err = err; - $s = -1; return err; - } - b.n = 0; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Writer.ptr.prototype.Flush, $c: true, $r, _r, _tuple, b, err, n, $s};return $f; - }; - Writer.prototype.Flush = function() { return this.$val.Flush(); }; - Writer.ptr.prototype.Available = function() { - var b; - b = this; - return b.buf.$length - b.n >> 0; - }; - Writer.prototype.Available = function() { return this.$val.Available(); }; - Writer.ptr.prototype.AvailableBuffer = function() { - var b; - b = this; - return $subslice($subslice(b.buf, b.n), 0, 0); - }; - Writer.prototype.AvailableBuffer = function() { return this.$val.AvailableBuffer(); }; - Writer.ptr.prototype.Buffered = function() { - var b; - b = this; - return b.n; - }; - Writer.prototype.Buffered = function() { return this.$val.Buffered(); }; - Writer.ptr.prototype.Write = function(p) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, n, n$1, nn, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nn = 0; - err = $ifaceNil; - b = this; - /* while (true) { */ case 1: - /* if (!(p.$length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!(p.$length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; } - n = 0; - /* */ if (b.Buffered() === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (b.Buffered() === 0) { */ case 3: - _r = b.wr.Write(p); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - b.err = _tuple[1]; - $s = 5; continue; - /* } else { */ case 4: - n = $copySlice($subslice(b.buf, b.n), p); - b.n = b.n + (n) >> 0; - _r$1 = b.Flush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 5: - nn = nn + (n) >> 0; - p = $subslice(p, n); - $s = 1; continue; - case 2: - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - _tmp = nn; - _tmp$1 = b.err; - nn = _tmp; - err = _tmp$1; - $s = -1; return [nn, err]; - } - n$1 = $copySlice($subslice(b.buf, b.n), p); - b.n = b.n + (n$1) >> 0; - nn = nn + (n$1) >> 0; - _tmp$2 = nn; - _tmp$3 = $ifaceNil; - nn = _tmp$2; - err = _tmp$3; - $s = -1; return [nn, err]; - /* */ } return; } var $f = {$blk: Writer.ptr.prototype.Write, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, err, n, n$1, nn, p, $s};return $f; - }; - Writer.prototype.Write = function(p) { return this.$val.Write(p); }; - Writer.ptr.prototype.WriteByte = function(c) { - var {_r, _v, b, c, x, x$1, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return b.err; - } - if (!(b.Available() <= 0)) { _v = false; $s = 3; continue s; } - _r = b.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = !($interfaceIsEqual(_r, $ifaceNil)); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return b.err; - /* } */ case 2: - (x = b.buf, x$1 = b.n, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); - b.n = b.n + (1) >> 0; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Writer.ptr.prototype.WriteByte, $c: true, $r, _r, _v, b, c, x, x$1, $s};return $f; - }; - Writer.prototype.WriteByte = function(c) { return this.$val.WriteByte(c); }; - Writer.ptr.prototype.WriteRune = function(r) { - var {$24r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, n, r, size, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - err = $ifaceNil; - b = this; - /* */ if (((r >>> 0)) < 128) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (((r >>> 0)) < 128) { */ case 1: - _r = b.WriteByte(((r << 24 >>> 24))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err; - size = _tmp; - err = _tmp$1; - $s = -1; return [size, err]; - } - _tmp$2 = 1; - _tmp$3 = $ifaceNil; - size = _tmp$2; - err = _tmp$3; - $s = -1; return [size, err]; - /* } */ case 2: - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - _tmp$4 = 0; - _tmp$5 = b.err; - size = _tmp$4; - err = _tmp$5; - $s = -1; return [size, err]; - } - n = b.Available(); - /* */ if (n < 4) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (n < 4) { */ case 4: - _r$1 = b.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - _tmp$6 = 0; - _tmp$7 = b.err; - size = _tmp$6; - err = _tmp$7; - $s = -1; return [size, err]; - } - n = b.Available(); - /* */ if (n < 4) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (n < 4) { */ case 7: - _r$2 = b.WriteString(($encodeRune(r))); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - size = _tuple[0]; - err = _tuple[1]; - $24r = [size, err]; - $s = 10; case 10: return $24r; - /* } */ case 8: - /* } */ case 5: - size = utf8.EncodeRune($subslice(b.buf, b.n), r); - b.n = b.n + (size) >> 0; - _tmp$8 = size; - _tmp$9 = $ifaceNil; - size = _tmp$8; - err = _tmp$9; - $s = -1; return [size, err]; - /* */ } return; } var $f = {$blk: Writer.ptr.prototype.WriteRune, $c: true, $r, $24r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, n, r, size, $s};return $f; - }; - Writer.prototype.WriteRune = function(r) { return this.$val.WriteRune(r); }; - Writer.ptr.prototype.WriteString = function(s) { - var {_r, b, n, n$1, nn, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - nn = 0; - /* while (true) { */ case 1: - /* if (!(s.length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { break; } */ if(!(s.length > b.Available() && $interfaceIsEqual(b.err, $ifaceNil))) { $s = 2; continue; } - n = $copyString($subslice(b.buf, b.n), s); - b.n = b.n + (n) >> 0; - nn = nn + (n) >> 0; - s = $substring(s, n); - _r = b.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = 1; continue; - case 2: - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return [nn, b.err]; - } - n$1 = $copyString($subslice(b.buf, b.n), s); - b.n = b.n + (n$1) >> 0; - nn = nn + (n$1) >> 0; - $s = -1; return [nn, $ifaceNil]; - /* */ } return; } var $f = {$blk: Writer.ptr.prototype.WriteString, $c: true, $r, _r, b, n, n$1, nn, s, $s};return $f; - }; - Writer.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - Writer.ptr.prototype.ReadFrom = function(r) { - var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, err, err$1, err1, m, n, nn, nr, r, readerFrom, readerFromOK, x, x$1, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - _tmp = new $Int64(0, 0); - _tmp$1 = b.err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _tuple = $assertType(b.wr, io.ReaderFrom, true); - readerFrom = _tuple[0]; - readerFromOK = _tuple[1]; - m = 0; - /* while (true) { */ case 1: - /* */ if (b.Available() === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (b.Available() === 0) { */ case 3: - _r = b.Flush(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err1 = _r; - if (!($interfaceIsEqual(err1, $ifaceNil))) { - _tmp$2 = n; - _tmp$3 = err1; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - /* } */ case 4: - /* */ if (readerFromOK && (b.Buffered() === 0)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (readerFromOK && (b.Buffered() === 0)) { */ case 6: - _r$1 = readerFrom.ReadFrom(r); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - nn = _tuple$1[0]; - err$1 = _tuple$1[1]; - b.err = err$1; - n = (x = nn, new $Int64(n.$high + x.$high, n.$low + x.$low)); - _tmp$4 = n; - _tmp$5 = err$1; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* } */ case 7: - nr = 0; - /* while (true) { */ case 9: - /* if (!(nr < 100)) { break; } */ if(!(nr < 100)) { $s = 10; continue; } - _r$2 = r.Read($subslice(b.buf, b.n)); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - m = _tuple$2[0]; - err = _tuple$2[1]; - if (!((m === 0)) || !($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 10; continue; - } - nr = nr + (1) >> 0; - $s = 9; continue; - case 10: - if (nr === 100) { - _tmp$6 = n; - _tmp$7 = io.ErrNoProgress; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - } - b.n = b.n + (m) >> 0; - n = (x$1 = (new $Int64(0, m)), new $Int64(n.$high + x$1.$high, n.$low + x$1.$low)); - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 2; continue; - } - $s = 1; continue; - case 2: - /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($interfaceIsEqual(err, io.EOF)) { */ case 12: - /* */ if (b.Available() === 0) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (b.Available() === 0) { */ case 14: - _r$3 = b.Flush(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - $s = 16; continue; - /* } else { */ case 15: - err = $ifaceNil; - /* } */ case 16: - /* } */ case 13: - _tmp$8 = n; - _tmp$9 = err; - n = _tmp$8; - err = _tmp$9; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Writer.ptr.prototype.ReadFrom, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, err, err$1, err1, m, n, nn, nr, r, readerFrom, readerFromOK, x, x$1, $s};return $f; - }; - Writer.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; - NewReadWriter = function(r, w) { - var r, w; - return new ReadWriter.ptr(r, w); - }; - $pkg.NewReadWriter = NewReadWriter; - ptrType$3.methods = [{prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "advance", name: "advance", pkg: "bufio", typ: $funcType([$Int], [$Bool], false)}, {prop: "setErr", name: "setErr", pkg: "bufio", typ: $funcType([$error], [], false)}, {prop: "Buffer", name: "Buffer", pkg: "", typ: $funcType([sliceType, $Int], [], false)}, {prop: "Split", name: "Split", pkg: "", typ: $funcType([SplitFunc], [], false)}]; - ptrType.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Reader], [], false)}, {prop: "reset", name: "reset", pkg: "bufio", typ: $funcType([sliceType, io.Reader], [], false)}, {prop: "fill", name: "fill", pkg: "bufio", typ: $funcType([], [], false)}, {prop: "readErr", name: "readErr", pkg: "bufio", typ: $funcType([], [$error], false)}, {prop: "Peek", name: "Peek", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "Discard", name: "Discard", pkg: "", typ: $funcType([$Int], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ReadSlice", name: "ReadSlice", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadLine", name: "ReadLine", pkg: "", typ: $funcType([], [sliceType, $Bool, $error], false)}, {prop: "collectFragments", name: "collectFragments", pkg: "bufio", typ: $funcType([$Uint8], [sliceType$1, sliceType, $Int, $error], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([$Uint8], [sliceType, $error], false)}, {prop: "ReadString", name: "ReadString", pkg: "", typ: $funcType([$Uint8], [$String, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}, {prop: "writeBuf", name: "writeBuf", pkg: "bufio", typ: $funcType([io.Writer], [$Int64, $error], false)}]; - ptrType$2.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AvailableBuffer", name: "AvailableBuffer", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "WriteByte", name: "WriteByte", pkg: "", typ: $funcType([$Uint8], [$error], false)}, {prop: "WriteRune", name: "WriteRune", pkg: "", typ: $funcType([$Int32], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}]; - Scanner.init("bufio", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "split", name: "split", embedded: false, exported: false, typ: SplitFunc, tag: ""}, {prop: "maxTokenSize", name: "maxTokenSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "token", name: "token", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "start", name: "start", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "end", name: "end", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "empties", name: "empties", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scanCalled", name: "scanCalled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); - SplitFunc.init([sliceType, $Bool], [$Int, sliceType, $error], false); - Reader.init("bufio", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "rd", name: "rd", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "lastByte", name: "lastByte", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastRuneSize", name: "lastRuneSize", embedded: false, exported: false, typ: $Int, tag: ""}]); - Writer.init("bufio", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "wr", name: "wr", embedded: false, exported: false, typ: io.Writer, tag: ""}]); - ReadWriter.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: ptrType, tag: ""}, {prop: "Writer", name: "Writer", embedded: true, exported: true, typ: ptrType$2, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrTooLong = errors.New("bufio.Scanner: token too long"); - $pkg.ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count"); - $pkg.ErrAdvanceTooFar = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input"); - $pkg.ErrBadReadCount = errors.New("bufio.Scanner: Read returned impossible count"); - $pkg.ErrFinalToken = errors.New("final token"); - $pkg.ErrInvalidUnreadByte = errors.New("bufio: invalid use of UnreadByte"); - $pkg.ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune"); - $pkg.ErrBufferFull = errors.New("bufio: buffer full"); - $pkg.ErrNegativeCount = errors.New("bufio: negative count"); - errNegativeRead = errors.New("bufio: reader returned negative count from Read"); - errNegativeWrite = errors.New("bufio: writer returned negative count from Write"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/abi"] = (function() { - var $pkg = {}, $init, goarch, FuncPCABI0; - goarch = $packages["internal/goarch"]; - FuncPCABI0 = function() { - $throwRuntimeError("native function not implemented: internal/abi.FuncPCABI0"); - }; - $pkg.FuncPCABI0 = FuncPCABI0; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = goarch.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/goexperiment"] = (function() { - var $pkg = {}, $init; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/itoa"] = (function() { - var $pkg = {}, $init, arrayType, sliceType, Itoa, Uitoa; - arrayType = $arrayType($Uint8, 20); - sliceType = $sliceType($Uint8); - Itoa = function(val) { - var val; - if (val < 0) { - return "-" + Uitoa(((-val >>> 0))); - } - return Uitoa(((val >>> 0))); - }; - $pkg.Itoa = Itoa; - Uitoa = function(val) { - var _q, buf, i, q, val; - if (val === 0) { - return "0"; - } - buf = arrayType.zero(); - i = 19; - while (true) { - if (!(val >= 10)) { break; } - q = (_q = val / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = ((((48 + val >>> 0) - (q * 10 >>> 0) >>> 0) << 24 >>> 24))); - i = i - (1) >> 0; - val = q; - } - ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = (((48 + val >>> 0) << 24 >>> 24))); - return ($bytesToString($subslice(new sliceType(buf), i))); - }; - $pkg.Uitoa = Uitoa; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["math/bits"] = (function() { - var $pkg = {}, $init, _err, deBruijn32tab, deBruijn64tab, overflowError, divideError, LeadingZeros, LeadingZeros32, LeadingZeros64, TrailingZeros, TrailingZeros32, TrailingZeros64, OnesCount64, RotateLeft32, RotateLeft64, Reverse8, Reverse16, Len, Len32, Len64, Add, Add64, Sub, Sub32, Sub64, Mul, Mul64, Div, Div64, Mul32, Add32, Div32; - _err = $pkg._err = $newType(8, $kindString, "bits._err", true, "math/bits", false, null); - LeadingZeros = function(x) { - var x; - return 32 - Len(x) >> 0; - }; - $pkg.LeadingZeros = LeadingZeros; - LeadingZeros32 = function(x) { - var x; - return 32 - Len32(x) >> 0; - }; - $pkg.LeadingZeros32 = LeadingZeros32; - LeadingZeros64 = function(x) { - var x; - return 64 - Len64(x) >> 0; - }; - $pkg.LeadingZeros64 = LeadingZeros64; - TrailingZeros = function(x) { - var x; - if (true) { - return TrailingZeros32(((x >>> 0))); - } - return TrailingZeros64((new $Uint64(0, x))); - }; - $pkg.TrailingZeros = TrailingZeros; - TrailingZeros32 = function(x) { - var x, x$1; - if (x === 0) { - return 32; - } - return (((x$1 = ($imul((((x & (-x >>> 0)) >>> 0)), 125613361) >>> 0) >>> 27 >>> 0, ((x$1 < 0 || x$1 >= deBruijn32tab.length) ? ($throwRuntimeError("index out of range"), undefined) : deBruijn32tab[x$1])) >> 0)); - }; - $pkg.TrailingZeros32 = TrailingZeros32; - TrailingZeros64 = function(x) { - var x, x$1, x$2; - if ((x.$high === 0 && x.$low === 0)) { - return 64; - } - return (((x$1 = $shiftRightUint64($mul64(((x$2 = new $Uint64(-x.$high, -x.$low), new $Uint64(x.$high & x$2.$high, (x.$low & x$2.$low) >>> 0))), new $Uint64(66559345, 3033172745)), 58), (($flatten64(x$1) < 0 || $flatten64(x$1) >= deBruijn64tab.length) ? ($throwRuntimeError("index out of range"), undefined) : deBruijn64tab[$flatten64(x$1)])) >> 0)); - }; - $pkg.TrailingZeros64 = TrailingZeros64; - OnesCount64 = function(x) { - var x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - x = (x$1 = (x$2 = $shiftRightUint64(x, 1), new $Uint64(x$2.$high & 1431655765, (x$2.$low & 1431655765) >>> 0)), x$3 = new $Uint64(x.$high & 1431655765, (x.$low & 1431655765) >>> 0), new $Uint64(x$1.$high + x$3.$high, x$1.$low + x$3.$low)); - x = (x$4 = (x$5 = $shiftRightUint64(x, 2), new $Uint64(x$5.$high & 858993459, (x$5.$low & 858993459) >>> 0)), x$6 = new $Uint64(x.$high & 858993459, (x.$low & 858993459) >>> 0), new $Uint64(x$4.$high + x$6.$high, x$4.$low + x$6.$low)); - x = (x$7 = (x$8 = $shiftRightUint64(x, 4), new $Uint64(x$8.$high + x.$high, x$8.$low + x.$low)), new $Uint64(x$7.$high & 252645135, (x$7.$low & 252645135) >>> 0)); - x = (x$9 = $shiftRightUint64(x, 8), new $Uint64(x.$high + x$9.$high, x.$low + x$9.$low)); - x = (x$10 = $shiftRightUint64(x, 16), new $Uint64(x.$high + x$10.$high, x.$low + x$10.$low)); - x = (x$11 = $shiftRightUint64(x, 32), new $Uint64(x.$high + x$11.$high, x.$low + x$11.$low)); - return ((x.$low >> 0)) & 127; - }; - $pkg.OnesCount64 = OnesCount64; - RotateLeft32 = function(x, k) { - var k, s, x, y, y$1; - s = (((k >>> 0)) & 31) >>> 0; - return (((y = s, y < 32 ? (x << y) : 0) >>> 0) | ((y$1 = ((32 - s >>> 0)), y$1 < 32 ? (x >>> y$1) : 0) >>> 0)) >>> 0; - }; - $pkg.RotateLeft32 = RotateLeft32; - RotateLeft64 = function(x, k) { - var k, s, x, x$1, x$2; - s = (((k >>> 0)) & 63) >>> 0; - return (x$1 = $shiftLeft64(x, s), x$2 = $shiftRightUint64(x, ((64 - s >>> 0))), new $Uint64(x$1.$high | x$2.$high, (x$1.$low | x$2.$low) >>> 0)); - }; - $pkg.RotateLeft64 = RotateLeft64; - Reverse8 = function(x) { - var x; - return "\x00\x80@\xC0 \xA0`\xE0\x10\x90P\xD00\xB0p\xF0\b\x88H\xC8(\xA8h\xE8\x18\x98X\xD88\xB8x\xF8\x04\x84D\xC4$\xA4d\xE4\x14\x94T\xD44\xB4t\xF4\f\x8CL\xCC,\xACl\xEC\x1C\x9C\\\xDC<\xBC|\xFC\x02\x82B\xC2\"\xA2b\xE2\x12\x92R\xD22\xB2r\xF2\n\x8AJ\xCA*\xAAj\xEA\x1A\x9AZ\xDA:\xBAz\xFA\x06\x86F\xC6&\xA6f\xE6\x16\x96V\xD66\xB6v\xF6\x0E\x8EN\xCE.\xAEn\xEE\x1E\x9E^\xDE>\xBE~\xFE\x01\x81A\xC1!\xA1a\xE1\x11\x91Q\xD11\xB1q\xF1\t\x89I\xC9)\xA9i\xE9\x19\x99Y\xD99\xB9y\xF9\x05\x85E\xC5%\xA5e\xE5\x15\x95U\xD55\xB5u\xF5\r\x8DM\xCD-\xADm\xED\x1D\x9D]\xDD=\xBD}\xFD\x03\x83C\xC3#\xA3c\xE3\x13\x93S\xD33\xB3s\xF3\v\x8BK\xCB+\xABk\xEB\x1B\x9B[\xDB;\xBB{\xFB\x07\x87G\xC7'\xA7g\xE7\x17\x97W\xD77\xB7w\xF7\x0F\x8FO\xCF/\xAFo\xEF\x1F\x9F_\xDF?\xBF\x7F\xFF".charCodeAt(x); - }; - $pkg.Reverse8 = Reverse8; - Reverse16 = function(x) { - var x; - return ((("\x00\x80@\xC0 \xA0`\xE0\x10\x90P\xD00\xB0p\xF0\b\x88H\xC8(\xA8h\xE8\x18\x98X\xD88\xB8x\xF8\x04\x84D\xC4$\xA4d\xE4\x14\x94T\xD44\xB4t\xF4\f\x8CL\xCC,\xACl\xEC\x1C\x9C\\\xDC<\xBC|\xFC\x02\x82B\xC2\"\xA2b\xE2\x12\x92R\xD22\xB2r\xF2\n\x8AJ\xCA*\xAAj\xEA\x1A\x9AZ\xDA:\xBAz\xFA\x06\x86F\xC6&\xA6f\xE6\x16\x96V\xD66\xB6v\xF6\x0E\x8EN\xCE.\xAEn\xEE\x1E\x9E^\xDE>\xBE~\xFE\x01\x81A\xC1!\xA1a\xE1\x11\x91Q\xD11\xB1q\xF1\t\x89I\xC9)\xA9i\xE9\x19\x99Y\xD99\xB9y\xF9\x05\x85E\xC5%\xA5e\xE5\x15\x95U\xD55\xB5u\xF5\r\x8DM\xCD-\xADm\xED\x1D\x9D]\xDD=\xBD}\xFD\x03\x83C\xC3#\xA3c\xE3\x13\x93S\xD33\xB3s\xF3\v\x8BK\xCB+\xABk\xEB\x1B\x9B[\xDB;\xBB{\xFB\x07\x87G\xC7'\xA7g\xE7\x17\x97W\xD77\xB7w\xF7\x0F\x8FO\xCF/\xAFo\xEF\x1F\x9F_\xDF?\xBF\x7F\xFF".charCodeAt((x >>> 8 << 16 >>> 16)) << 16 >>> 16)) | ((("\x00\x80@\xC0 \xA0`\xE0\x10\x90P\xD00\xB0p\xF0\b\x88H\xC8(\xA8h\xE8\x18\x98X\xD88\xB8x\xF8\x04\x84D\xC4$\xA4d\xE4\x14\x94T\xD44\xB4t\xF4\f\x8CL\xCC,\xACl\xEC\x1C\x9C\\\xDC<\xBC|\xFC\x02\x82B\xC2\"\xA2b\xE2\x12\x92R\xD22\xB2r\xF2\n\x8AJ\xCA*\xAAj\xEA\x1A\x9AZ\xDA:\xBAz\xFA\x06\x86F\xC6&\xA6f\xE6\x16\x96V\xD66\xB6v\xF6\x0E\x8EN\xCE.\xAEn\xEE\x1E\x9E^\xDE>\xBE~\xFE\x01\x81A\xC1!\xA1a\xE1\x11\x91Q\xD11\xB1q\xF1\t\x89I\xC9)\xA9i\xE9\x19\x99Y\xD99\xB9y\xF9\x05\x85E\xC5%\xA5e\xE5\x15\x95U\xD55\xB5u\xF5\r\x8DM\xCD-\xADm\xED\x1D\x9D]\xDD=\xBD}\xFD\x03\x83C\xC3#\xA3c\xE3\x13\x93S\xD33\xB3s\xF3\v\x8BK\xCB+\xABk\xEB\x1B\x9B[\xDB;\xBB{\xFB\x07\x87G\xC7'\xA7g\xE7\x17\x97W\xD77\xB7w\xF7\x0F\x8FO\xCF/\xAFo\xEF\x1F\x9F_\xDF?\xBF\x7F\xFF".charCodeAt(((x & 255) >>> 0)) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; - }; - $pkg.Reverse16 = Reverse16; - Len = function(x) { - var x; - if (true) { - return Len32(((x >>> 0))); - } - return Len64((new $Uint64(0, x))); - }; - $pkg.Len = Len; - Len32 = function(x) { - var n, x, y, y$1; - n = 0; - if (x >= 65536) { - x = (y = (16), y < 32 ? (x >>> y) : 0) >>> 0; - n = 16; - } - if (x >= 256) { - x = (y$1 = (8), y$1 < 32 ? (x >>> y$1) : 0) >>> 0; - n = n + (8) >> 0; - } - n = n + (("\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b".charCodeAt(x) >> 0)) >> 0; - return n; - }; - $pkg.Len32 = Len32; - Len64 = function(x) { - var n, x; - n = 0; - if ((x.$high > 1 || (x.$high === 1 && x.$low >= 0))) { - x = $shiftRightUint64(x, (32)); - n = 32; - } - if ((x.$high > 0 || (x.$high === 0 && x.$low >= 65536))) { - x = $shiftRightUint64(x, (16)); - n = n + (16) >> 0; - } - if ((x.$high > 0 || (x.$high === 0 && x.$low >= 256))) { - x = $shiftRightUint64(x, (8)); - n = n + (8) >> 0; - } - n = n + (("\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b".charCodeAt($flatten64(x)) >> 0)) >> 0; - return n; - }; - $pkg.Len64 = Len64; - Add = function(x, y, carry) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, c32, c64, carry, carryOut, s32, s64, sum, x, y; - sum = 0; - carryOut = 0; - if (true) { - _tuple = Add32(((x >>> 0)), ((y >>> 0)), ((carry >>> 0))); - s32 = _tuple[0]; - c32 = _tuple[1]; - _tmp = ((s32 >>> 0)); - _tmp$1 = ((c32 >>> 0)); - sum = _tmp; - carryOut = _tmp$1; - return [sum, carryOut]; - } - _tuple$1 = Add64((new $Uint64(0, x)), (new $Uint64(0, y)), (new $Uint64(0, carry))); - s64 = _tuple$1[0]; - c64 = _tuple$1[1]; - _tmp$2 = ((s64.$low >>> 0)); - _tmp$3 = ((c64.$low >>> 0)); - sum = _tmp$2; - carryOut = _tmp$3; - return [sum, carryOut]; - }; - $pkg.Add = Add; - Add64 = function(x, y, carry) { - var carry, carryOut, sum, x, x$1, x$2, x$3, x$4, y; - sum = new $Uint64(0, 0); - carryOut = new $Uint64(0, 0); - sum = (x$1 = new $Uint64(x.$high + y.$high, x.$low + y.$low), new $Uint64(x$1.$high + carry.$high, x$1.$low + carry.$low)); - carryOut = $shiftRightUint64(((x$2 = new $Uint64(x.$high & y.$high, (x.$low & y.$low) >>> 0), x$3 = (x$4 = new $Uint64(x.$high | y.$high, (x.$low | y.$low) >>> 0), new $Uint64(x$4.$high & ~sum.$high, (x$4.$low & ~sum.$low) >>> 0)), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0))), 63); - return [sum, carryOut]; - }; - $pkg.Add64 = Add64; - Sub = function(x, y, borrow) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, b32, b64, borrow, borrowOut, d32, d64, diff, x, y; - diff = 0; - borrowOut = 0; - if (true) { - _tuple = Sub32(((x >>> 0)), ((y >>> 0)), ((borrow >>> 0))); - d32 = _tuple[0]; - b32 = _tuple[1]; - _tmp = ((d32 >>> 0)); - _tmp$1 = ((b32 >>> 0)); - diff = _tmp; - borrowOut = _tmp$1; - return [diff, borrowOut]; - } - _tuple$1 = Sub64((new $Uint64(0, x)), (new $Uint64(0, y)), (new $Uint64(0, borrow))); - d64 = _tuple$1[0]; - b64 = _tuple$1[1]; - _tmp$2 = ((d64.$low >>> 0)); - _tmp$3 = ((b64.$low >>> 0)); - diff = _tmp$2; - borrowOut = _tmp$3; - return [diff, borrowOut]; - }; - $pkg.Sub = Sub; - Sub32 = function(x, y, borrow) { - var borrow, borrowOut, diff, x, y; - diff = 0; - borrowOut = 0; - diff = (x - y >>> 0) - borrow >>> 0; - borrowOut = (((((((~x >>> 0) & y) >>> 0)) | ((((~(((x ^ y) >>> 0)) >>> 0) & diff) >>> 0))) >>> 0)) >>> 31 >>> 0; - return [diff, borrowOut]; - }; - $pkg.Sub32 = Sub32; - Sub64 = function(x, y, borrow) { - var borrow, borrowOut, diff, x, x$1, x$2, x$3, x$4, x$5, x$6, y; - diff = new $Uint64(0, 0); - borrowOut = new $Uint64(0, 0); - diff = (x$1 = new $Uint64(x.$high - y.$high, x.$low - y.$low), new $Uint64(x$1.$high - borrow.$high, x$1.$low - borrow.$low)); - borrowOut = $shiftRightUint64(((x$2 = (x$3 = new $Uint64(~x.$high, ~x.$low >>> 0), new $Uint64(x$3.$high & y.$high, (x$3.$low & y.$low) >>> 0)), x$4 = (x$5 = (x$6 = new $Uint64(x.$high ^ y.$high, (x.$low ^ y.$low) >>> 0), new $Uint64(~x$6.$high, ~x$6.$low >>> 0)), new $Uint64(x$5.$high & diff.$high, (x$5.$low & diff.$low) >>> 0)), new $Uint64(x$2.$high | x$4.$high, (x$2.$low | x$4.$low) >>> 0))), 63); - return [diff, borrowOut]; - }; - $pkg.Sub64 = Sub64; - Mul = function(x, y) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, h, h$1, hi, l, l$1, lo, x, y; - hi = 0; - lo = 0; - if (true) { - _tuple = Mul32(((x >>> 0)), ((y >>> 0))); - h = _tuple[0]; - l = _tuple[1]; - _tmp = ((h >>> 0)); - _tmp$1 = ((l >>> 0)); - hi = _tmp; - lo = _tmp$1; - return [hi, lo]; - } - _tuple$1 = Mul64((new $Uint64(0, x)), (new $Uint64(0, y))); - h$1 = _tuple$1[0]; - l$1 = _tuple$1[1]; - _tmp$2 = ((h$1.$low >>> 0)); - _tmp$3 = ((l$1.$low >>> 0)); - hi = _tmp$2; - lo = _tmp$3; - return [hi, lo]; - }; - $pkg.Mul = Mul; - Mul64 = function(x, y) { - var hi, lo, t, w0, w1, w2, x, x$1, x$2, x$3, x$4, x$5, x$6, x0, x1, y, y0, y1; - hi = new $Uint64(0, 0); - lo = new $Uint64(0, 0); - x0 = new $Uint64(x.$high & 0, (x.$low & 4294967295) >>> 0); - x1 = $shiftRightUint64(x, 32); - y0 = new $Uint64(y.$high & 0, (y.$low & 4294967295) >>> 0); - y1 = $shiftRightUint64(y, 32); - w0 = $mul64(x0, y0); - t = (x$1 = $mul64(x1, y0), x$2 = $shiftRightUint64(w0, 32), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - w1 = new $Uint64(t.$high & 0, (t.$low & 4294967295) >>> 0); - w2 = $shiftRightUint64(t, 32); - w1 = (x$3 = $mul64(x0, y1), new $Uint64(w1.$high + x$3.$high, w1.$low + x$3.$low)); - hi = (x$4 = (x$5 = $mul64(x1, y1), new $Uint64(x$5.$high + w2.$high, x$5.$low + w2.$low)), x$6 = $shiftRightUint64(w1, 32), new $Uint64(x$4.$high + x$6.$high, x$4.$low + x$6.$low)); - lo = $mul64(x, y); - return [hi, lo]; - }; - $pkg.Mul64 = Mul64; - Div = function(hi, lo, y) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, hi, lo, q, q$1, quo, r, r$1, rem, y; - quo = 0; - rem = 0; - if (true) { - _tuple = Div32(((hi >>> 0)), ((lo >>> 0)), ((y >>> 0))); - q = _tuple[0]; - r = _tuple[1]; - _tmp = ((q >>> 0)); - _tmp$1 = ((r >>> 0)); - quo = _tmp; - rem = _tmp$1; - return [quo, rem]; - } - _tuple$1 = Div64((new $Uint64(0, hi)), (new $Uint64(0, lo)), (new $Uint64(0, y))); - q$1 = _tuple$1[0]; - r$1 = _tuple$1[1]; - _tmp$2 = ((q$1.$low >>> 0)); - _tmp$3 = ((r$1.$low >>> 0)); - quo = _tmp$2; - rem = _tmp$3; - return [quo, rem]; - }; - $pkg.Div = Div; - Div64 = function(hi, lo, y) { - var _tmp, _tmp$1, hi, lo, q0, q1, quo, rem, rhat, s, un0, un1, un10, un21, un32, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, yn0, yn1; - quo = new $Uint64(0, 0); - rem = new $Uint64(0, 0); - if ((y.$high === 0 && y.$low === 0)) { - $panic(divideError); - } - if ((y.$high < hi.$high || (y.$high === hi.$high && y.$low <= hi.$low))) { - $panic(overflowError); - } - s = ((LeadingZeros64(y) >>> 0)); - y = $shiftLeft64(y, (s)); - yn1 = $shiftRightUint64(y, 32); - yn0 = new $Uint64(y.$high & 0, (y.$low & 4294967295) >>> 0); - un32 = (x = $shiftLeft64(hi, s), x$1 = $shiftRightUint64(lo, ((64 - s >>> 0))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - un10 = $shiftLeft64(lo, s); - un1 = $shiftRightUint64(un10, 32); - un0 = new $Uint64(un10.$high & 0, (un10.$low & 4294967295) >>> 0); - q1 = $div64(un32, yn1, false); - rhat = (x$2 = $mul64(q1, yn1), new $Uint64(un32.$high - x$2.$high, un32.$low - x$2.$low)); - while (true) { - if (!((q1.$high > 1 || (q1.$high === 1 && q1.$low >= 0)) || (x$3 = $mul64(q1, yn0), x$4 = (x$5 = $mul64(new $Uint64(1, 0), rhat), new $Uint64(x$5.$high + un1.$high, x$5.$low + un1.$low)), (x$3.$high > x$4.$high || (x$3.$high === x$4.$high && x$3.$low > x$4.$low))))) { break; } - q1 = (x$6 = new $Uint64(0, 1), new $Uint64(q1.$high - x$6.$high, q1.$low - x$6.$low)); - rhat = (x$7 = yn1, new $Uint64(rhat.$high + x$7.$high, rhat.$low + x$7.$low)); - if ((rhat.$high > 1 || (rhat.$high === 1 && rhat.$low >= 0))) { - break; - } - } - un21 = (x$8 = (x$9 = $mul64(un32, new $Uint64(1, 0)), new $Uint64(x$9.$high + un1.$high, x$9.$low + un1.$low)), x$10 = $mul64(q1, y), new $Uint64(x$8.$high - x$10.$high, x$8.$low - x$10.$low)); - q0 = $div64(un21, yn1, false); - rhat = (x$11 = $mul64(q0, yn1), new $Uint64(un21.$high - x$11.$high, un21.$low - x$11.$low)); - while (true) { - if (!((q0.$high > 1 || (q0.$high === 1 && q0.$low >= 0)) || (x$12 = $mul64(q0, yn0), x$13 = (x$14 = $mul64(new $Uint64(1, 0), rhat), new $Uint64(x$14.$high + un0.$high, x$14.$low + un0.$low)), (x$12.$high > x$13.$high || (x$12.$high === x$13.$high && x$12.$low > x$13.$low))))) { break; } - q0 = (x$15 = new $Uint64(0, 1), new $Uint64(q0.$high - x$15.$high, q0.$low - x$15.$low)); - rhat = (x$16 = yn1, new $Uint64(rhat.$high + x$16.$high, rhat.$low + x$16.$low)); - if ((rhat.$high > 1 || (rhat.$high === 1 && rhat.$low >= 0))) { - break; - } - } - _tmp = (x$17 = $mul64(q1, new $Uint64(1, 0)), new $Uint64(x$17.$high + q0.$high, x$17.$low + q0.$low)); - _tmp$1 = $shiftRightUint64(((x$18 = (x$19 = $mul64(un21, new $Uint64(1, 0)), new $Uint64(x$19.$high + un0.$high, x$19.$low + un0.$low)), x$20 = $mul64(q0, y), new $Uint64(x$18.$high - x$20.$high, x$18.$low - x$20.$low))), s); - quo = _tmp; - rem = _tmp$1; - return [quo, rem]; - }; - $pkg.Div64 = Div64; - _err.prototype.Error = function() { - var e; - e = this.$val; - return (e); - }; - $ptrType(_err).prototype.Error = function() { return new _err(this.$get()).Error(); }; - _err.prototype.RuntimeError = function() { - var e; - e = this.$val; - }; - $ptrType(_err).prototype.RuntimeError = function() { return new _err(this.$get()).RuntimeError(); }; - Mul32 = function(x, y) { - var hi, lo, t, w0, w1, w2, x, x0, x1, y, y0, y1; - hi = 0; - lo = 0; - x0 = (x & 65535) >>> 0; - x1 = x >>> 16 >>> 0; - y0 = (y & 65535) >>> 0; - y1 = y >>> 16 >>> 0; - w0 = $imul(x0, y0) >>> 0; - t = ($imul(x1, y0) >>> 0) + (w0 >>> 16 >>> 0) >>> 0; - w1 = (t & 65535) >>> 0; - w2 = t >>> 16 >>> 0; - w1 = w1 + (($imul(x0, y1) >>> 0)) >>> 0; - hi = (($imul(x1, y1) >>> 0) + w2 >>> 0) + (w1 >>> 16 >>> 0) >>> 0; - lo = $imul(x, y) >>> 0; - return [hi, lo]; - }; - $pkg.Mul32 = Mul32; - Add32 = function(x, y, carry) { - var carry, carryOut, sum, x, y; - sum = 0; - carryOut = 0; - sum = (x + y >>> 0) + carry >>> 0; - carryOut = ((((((x & y) >>> 0)) | ((((((x | y) >>> 0)) & ~sum) >>> 0))) >>> 0)) >>> 31 >>> 0; - return [sum, carryOut]; - }; - $pkg.Add32 = Add32; - Div32 = function(hi, lo, y) { - var _q, _q$1, _tmp, _tmp$1, hi, lo, q0, q1, quo, rem, rhat, s, un0, un1, un10, un16, un21, y, y$1, y$2, y$3, y$4, y$5, yn0, yn1; - quo = 0; - rem = 0; - if (y === 0) { - $panic(divideError); - } - if (y <= hi) { - $panic(overflowError); - } - s = ((LeadingZeros32(y) >>> 0)); - y = (y$1 = (s), y$1 < 32 ? (y << y$1) : 0) >>> 0; - yn1 = y >>> 16 >>> 0; - yn0 = (y & 65535) >>> 0; - un16 = (((y$2 = s, y$2 < 32 ? (hi << y$2) : 0) >>> 0) | ((y$3 = ((32 - s >>> 0)), y$3 < 32 ? (lo >>> y$3) : 0) >>> 0)) >>> 0; - un10 = (y$4 = s, y$4 < 32 ? (lo << y$4) : 0) >>> 0; - un1 = un10 >>> 16 >>> 0; - un0 = (un10 & 65535) >>> 0; - q1 = (_q = un16 / yn1, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - rhat = un16 - ($imul(q1, yn1) >>> 0) >>> 0; - while (true) { - if (!(q1 >= 65536 || ($imul(q1, yn0) >>> 0) > (($imul(65536, rhat) >>> 0) + un1 >>> 0))) { break; } - q1 = q1 - (1) >>> 0; - rhat = rhat + (yn1) >>> 0; - if (rhat >= 65536) { - break; - } - } - un21 = (($imul(un16, 65536) >>> 0) + un1 >>> 0) - ($imul(q1, y) >>> 0) >>> 0; - q0 = (_q$1 = un21 / yn1, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); - rhat = un21 - ($imul(q0, yn1) >>> 0) >>> 0; - while (true) { - if (!(q0 >= 65536 || ($imul(q0, yn0) >>> 0) > (($imul(65536, rhat) >>> 0) + un0 >>> 0))) { break; } - q0 = q0 - (1) >>> 0; - rhat = rhat + (yn1) >>> 0; - if (rhat >= 65536) { - break; - } - } - _tmp = ($imul(q1, 65536) >>> 0) + q0 >>> 0; - _tmp$1 = (y$5 = s, y$5 < 32 ? ((((($imul(un21, 65536) >>> 0) + un0 >>> 0) - ($imul(q0, y) >>> 0) >>> 0)) >>> y$5) : 0) >>> 0; - quo = _tmp; - rem = _tmp$1; - return [quo, rem]; - }; - $pkg.Div32 = Div32; - _err.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "RuntimeError", name: "RuntimeError", pkg: "", typ: $funcType([], [], false)}]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - deBruijn32tab = $toNativeArray($kindUint8, [0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9]); - deBruijn64tab = $toNativeArray($kindUint8, [0, 1, 56, 2, 57, 49, 28, 3, 61, 58, 42, 50, 38, 29, 17, 4, 62, 47, 59, 36, 45, 43, 51, 22, 53, 39, 33, 30, 24, 18, 12, 5, 63, 55, 48, 27, 60, 41, 37, 16, 46, 35, 44, 21, 52, 32, 23, 11, 54, 26, 40, 15, 34, 20, 31, 10, 25, 14, 19, 9, 13, 8, 7, 6]); - overflowError = new _err("runtime error: integer overflow"); - divideError = new _err("runtime error: integer divide by zero"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["math"] = (function() { - var $pkg = {}, $init, js, bits, arrayType, arrayType$1, arrayType$2, structType, math, _zero, posInf, negInf, nan, buf, log2, frexp, Round, max, min, normalize, Abs, Cos, Exp, Floor, Frexp, Inf, IsInf, IsNaN, Log, Log2, Max, Min, NaN, Pow, Signbit, Sin, Sqrt, init, Float32bits, Float32frombits, Float64bits, Float64frombits; - js = $packages["github.com/gopherjs/gopherjs/js"]; - bits = $packages["math/bits"]; - arrayType = $arrayType($Uint32, 2); - arrayType$1 = $arrayType($Float32, 2); - arrayType$2 = $arrayType($Float64, 1); - structType = $structType("math", [{prop: "uint32array", name: "uint32array", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "float32array", name: "float32array", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "float64array", name: "float64array", embedded: false, exported: false, typ: arrayType$2, tag: ""}]); - log2 = function(x) { - var _tuple, exp$1, frac, x; - _tuple = Frexp(x); - frac = _tuple[0]; - exp$1 = _tuple[1]; - if (frac === 0.5) { - return ((exp$1 - 1 >> 0)); - } - return Log(frac) * 1.4426950408889634 + (exp$1); - }; - frexp = function(f) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, exp$1, f, frac, x, x$1, x$2, x$3; - frac = 0; - exp$1 = 0; - if ((f === 0)) { - _tmp = f; - _tmp$1 = 0; - frac = _tmp; - exp$1 = _tmp$1; - return [frac, exp$1]; - } else if (IsInf(f, 0) || IsNaN(f)) { - _tmp$2 = f; - _tmp$3 = 0; - frac = _tmp$2; - exp$1 = _tmp$3; - return [frac, exp$1]; - } - _tuple = normalize(f); - f = _tuple[0]; - exp$1 = _tuple[1]; - x = Float64bits(f); - exp$1 = exp$1 + ((((((x$1 = $shiftRightUint64(x, 52), new $Uint64(x$1.$high & 0, (x$1.$low & 2047) >>> 0)).$low >> 0)) - 1023 >> 0) + 1 >> 0)) >> 0; - x = (x$2 = new $Uint64(2146435072, 0), new $Uint64(x.$high & ~x$2.$high, (x.$low & ~x$2.$low) >>> 0)); - x = (x$3 = new $Uint64(1071644672, 0), new $Uint64(x.$high | x$3.$high, (x.$low | x$3.$low) >>> 0)); - frac = Float64frombits(x); - return [frac, exp$1]; - }; - Round = function(x) { - var bits$1, e, x, x$1, x$2, x$3, x$4; - bits$1 = Float64bits(x); - e = ((($shiftRightUint64(bits$1, 52).$low >>> 0)) & 2047) >>> 0; - if (e < 1023) { - bits$1 = (x$1 = new $Uint64(2147483648, 0), new $Uint64(bits$1.$high & x$1.$high, (bits$1.$low & x$1.$low) >>> 0)); - if (e === 1022) { - bits$1 = (x$2 = new $Uint64(1072693248, 0), new $Uint64(bits$1.$high | x$2.$high, (bits$1.$low | x$2.$low) >>> 0)); - } - } else if (e < 1075) { - e = e - (1023) >>> 0; - bits$1 = (x$3 = $shiftRightUint64(new $Uint64(524288, 0), e), new $Uint64(bits$1.$high + x$3.$high, bits$1.$low + x$3.$low)); - bits$1 = (x$4 = $shiftRightUint64(new $Uint64(1048575, 4294967295), e), new $Uint64(bits$1.$high & ~x$4.$high, (bits$1.$low & ~x$4.$low) >>> 0)); - } - return Float64frombits(bits$1); - }; - $pkg.Round = Round; - max = function(x, y) { - var x, y; - if (IsInf(x, 1) || IsInf(y, 1)) { - return Inf(1); - } else if (IsNaN(x) || IsNaN(y)) { - return NaN(); - } else if ((x === 0) && (x === y)) { - if (Signbit(x)) { - return y; - } - return x; - } - if (x > y) { - return x; - } - return y; - }; - min = function(x, y) { - var x, y; - if (IsInf(x, -1) || IsInf(y, -1)) { - return Inf(-1); - } else if (IsNaN(x) || IsNaN(y)) { - return NaN(); - } else if ((x === 0) && (x === y)) { - if (Signbit(x)) { - return x; - } - return y; - } - if (x < y) { - return x; - } - return y; - }; - normalize = function(x) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, exp$1, x, y; - y = 0; - exp$1 = 0; - if (Abs(x) < 2.2250738585072014e-308) { - _tmp = x * 4.503599627370496e+15; - _tmp$1 = -52; - y = _tmp; - exp$1 = _tmp$1; - return [y, exp$1]; - } - _tmp$2 = x; - _tmp$3 = 0; - y = _tmp$2; - exp$1 = _tmp$3; - return [y, exp$1]; - }; - Abs = function(x) { - var x, x$1; - return Float64frombits((x$1 = Float64bits(x), new $Uint64(x$1.$high & ~2147483648, (x$1.$low & ~0) >>> 0))); - }; - $pkg.Abs = Abs; - Cos = function(x) { - var x; - return $parseFloat(math.cos(x)); - }; - $pkg.Cos = Cos; - Exp = function(x) { - var x; - return $parseFloat(math.exp(x)); - }; - $pkg.Exp = Exp; - Floor = function(x) { - var x; - return $parseFloat(math.floor(x)); - }; - $pkg.Floor = Floor; - Frexp = function(f) { - var _tuple, exp$1, f, frac; - frac = 0; - exp$1 = 0; - _tuple = frexp(f); - frac = _tuple[0]; - exp$1 = _tuple[1]; - return [frac, exp$1]; - }; - $pkg.Frexp = Frexp; - Inf = function(sign) { - var sign; - if (sign >= 0) { - return posInf; - } else { - return negInf; - } - }; - $pkg.Inf = Inf; - IsInf = function(f, sign) { - var f, sign; - if (f === posInf) { - return sign >= 0; - } - if (f === negInf) { - return sign <= 0; - } - return false; - }; - $pkg.IsInf = IsInf; - IsNaN = function(f) { - var f, is; - is = false; - is = !((f === f)); - return is; - }; - $pkg.IsNaN = IsNaN; - Log = function(x) { - var x; - if (!((x === x))) { - return nan; - } - return $parseFloat(math.log(x)); - }; - $pkg.Log = Log; - Log2 = function(x) { - var x; - return log2(x); - }; - $pkg.Log2 = Log2; - Max = function(x, y) { - var x, y; - return max(x, y); - }; - $pkg.Max = Max; - Min = function(x, y) { - var x, y; - return min(x, y); - }; - $pkg.Min = Min; - NaN = function() { - return nan; - }; - $pkg.NaN = NaN; - Pow = function(x, y) { - var x, y; - if ((x === 1) || ((x === -1) && ((y === posInf) || (y === negInf)))) { - return 1; - } - return $parseFloat(math.pow(x, y)); - }; - $pkg.Pow = Pow; - Signbit = function(x) { - var x; - return x < 0 || (1 / x === negInf); - }; - $pkg.Signbit = Signbit; - Sin = function(x) { - var x; - return $parseFloat(math.sin(x)); - }; - $pkg.Sin = Sin; - Sqrt = function(x) { - var x; - return $parseFloat(math.sqrt(x)); - }; - $pkg.Sqrt = Sqrt; - init = function() { - var ab; - ab = new ($global.ArrayBuffer)(8); - buf.uint32array = new ($global.Uint32Array)(ab); - buf.float32array = new ($global.Float32Array)(ab); - buf.float64array = new ($global.Float64Array)(ab); - }; - Float32bits = function(f) { - var f; - buf.float32array[0] = f; - return buf.uint32array[0]; - }; - $pkg.Float32bits = Float32bits; - Float32frombits = function(b) { - var b; - buf.uint32array[0] = b; - return buf.float32array[0]; - }; - $pkg.Float32frombits = Float32frombits; - Float64bits = function(f) { - var f, x, x$1; - buf.float64array[0] = f; - return (x = $shiftLeft64((new $Uint64(0, buf.uint32array[1])), 32), x$1 = (new $Uint64(0, buf.uint32array[0])), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - }; - $pkg.Float64bits = Float64bits; - Float64frombits = function(b) { - var b; - buf.uint32array[0] = ((b.$low >>> 0)); - buf.uint32array[1] = (($shiftRightUint64(b, 32).$low >>> 0)); - return buf.float64array[0]; - }; - $pkg.Float64frombits = Float64frombits; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - buf = new structType.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$2.zero()); - math = $global.Math; - _zero = 0; - posInf = 1 / _zero; - negInf = -1 / _zero; - nan = $parseFloat($NaN); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["strconv"] = (function() { - var $pkg = {}, $init, errors, js, bytealg, math, bits, utf8, floatInfo, decimalSlice, decimal, leftCheat, NumError, sliceType, sliceType$1, arrayType, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, arrayType$1, arrayType$2, ptrType, arrayType$3, arrayType$4, arrayType$5, ptrType$1, ptrType$2, isPrint16, isNotPrint16, isPrint32, isNotPrint32, isGraphic, uint64pow10, float32info, float32info$24ptr, float64info, float64info$24ptr, detailedPowersOfTen, leftcheats, optimize, powtab, float64pow10, float32pow10, contains, quoteWith, appendQuotedWith, appendQuotedRuneWith, appendEscapedRune, Quote, AppendQuote, AppendQuoteToASCII, AppendQuoteRune, AppendQuoteRuneToASCII, CanBackquote, unhex, UnquoteChar, Unquote, unquote, bsearch16, bsearch32, IsPrint, isInGraphicList, FormatUint, FormatInt, AppendInt, AppendUint, small, formatBits, isPowerOfTwo, ryuFtoaFixed32, ryuFtoaFixed64, formatDecimal, ryuFtoaShortest, mulByLog2Log10, mulByLog10Log2, computeBounds, ryuDigits, ryuDigits32, mult64bitPow10, mult128bitPow10, divisibleByPower5, divmod1e9, FormatFloat, AppendFloat, genericFtoa, bigFtoa, formatDigits, roundShortest, fmtE, fmtF, fmtB, fmtX, min, max, eiselLemire64, eiselLemire32, digitZero, trim, rightShift, prefixIsLessThan, leftShift, shouldRoundUp, index, lower, syntaxError, rangeError, baseError, bitSizeError, ParseUint, ParseInt, underscoreOK, commonPrefixLenIgnoreCase, special, readFloat, atof64exact, atof32exact, atofHex, atof32, atof64, ParseFloat, parseFloatPrefix, ParseBool, FormatBool, AppendBool, Itoa, Atoi; - errors = $packages["errors"]; - js = $packages["github.com/gopherjs/gopherjs/js"]; - bytealg = $packages["internal/bytealg"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - utf8 = $packages["unicode/utf8"]; - floatInfo = $pkg.floatInfo = $newType(0, $kindStruct, "strconv.floatInfo", true, "strconv", false, function(mantbits_, expbits_, bias_) { - this.$val = this; - if (arguments.length === 0) { - this.mantbits = 0; - this.expbits = 0; - this.bias = 0; - return; - } - this.mantbits = mantbits_; - this.expbits = expbits_; - this.bias = bias_; - }); - decimalSlice = $pkg.decimalSlice = $newType(0, $kindStruct, "strconv.decimalSlice", true, "strconv", false, function(d_, nd_, dp_, neg_) { - this.$val = this; - if (arguments.length === 0) { - this.d = sliceType$6.nil; - this.nd = 0; - this.dp = 0; - this.neg = false; - return; - } - this.d = d_; - this.nd = nd_; - this.dp = dp_; - this.neg = neg_; - }); - decimal = $pkg.decimal = $newType(0, $kindStruct, "strconv.decimal", true, "strconv", false, function(d_, nd_, dp_, neg_, trunc_) { - this.$val = this; - if (arguments.length === 0) { - this.d = arrayType$5.zero(); - this.nd = 0; - this.dp = 0; - this.neg = false; - this.trunc = false; - return; - } - this.d = d_; - this.nd = nd_; - this.dp = dp_; - this.neg = neg_; - this.trunc = trunc_; - }); - leftCheat = $pkg.leftCheat = $newType(0, $kindStruct, "strconv.leftCheat", true, "strconv", false, function(delta_, cutoff_) { - this.$val = this; - if (arguments.length === 0) { - this.delta = 0; - this.cutoff = ""; - return; - } - this.delta = delta_; - this.cutoff = cutoff_; - }); - NumError = $pkg.NumError = $newType(0, $kindStruct, "strconv.NumError", true, "strconv", true, function(Func_, Num_, Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Func = ""; - this.Num = ""; - this.Err = $ifaceNil; - return; - } - this.Func = Func_; - this.Num = Num_; - this.Err = Err_; - }); - sliceType = $sliceType($Uint16); - sliceType$1 = $sliceType($Uint32); - arrayType = $arrayType($Uint64, 2); - sliceType$2 = $sliceType(leftCheat); - sliceType$3 = $sliceType($Int); - sliceType$4 = $sliceType($Float64); - sliceType$5 = $sliceType($Float32); - sliceType$6 = $sliceType($Uint8); - arrayType$1 = $arrayType($Uint8, 4); - arrayType$2 = $arrayType($Uint8, 65); - ptrType = $ptrType(floatInfo); - arrayType$3 = $arrayType($Uint8, 32); - arrayType$4 = $arrayType($Uint8, 24); - arrayType$5 = $arrayType($Uint8, 800); - ptrType$1 = $ptrType(NumError); - ptrType$2 = $ptrType(decimal); - contains = function(s, c) { - var c, s; - return !((index(s, c) === -1)); - }; - quoteWith = function(s, quote, ASCIIonly, graphicOnly) { - var ASCIIonly, _q, graphicOnly, quote, s; - return ($bytesToString(appendQuotedWith($makeSlice(sliceType$6, 0, (_q = ($imul(3, s.length)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), s, quote, ASCIIonly, graphicOnly))); - }; - appendQuotedWith = function(buf, s, quote, ASCIIonly, graphicOnly) { - var ASCIIonly, _tuple, buf, graphicOnly, nBuf, quote, r, s, width; - if ((buf.$capacity - buf.$length >> 0) < s.length) { - nBuf = $makeSlice(sliceType$6, buf.$length, (((buf.$length + 1 >> 0) + s.length >> 0) + 1 >> 0)); - $copySlice(nBuf, buf); - buf = nBuf; - } - buf = $append(buf, quote); - width = 0; - while (true) { - if (!(s.length > 0)) { break; } - r = ((s.charCodeAt(0) >> 0)); - width = 1; - if (r >= 128) { - _tuple = utf8.DecodeRuneInString(s); - r = _tuple[0]; - width = _tuple[1]; - } - if ((width === 1) && (r === 65533)) { - buf = $appendSlice(buf, "\\x"); - buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt(0) >>> 4 << 24 >>> 24))); - buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt(0) & 15) >>> 0))); - s = $substring(s, width); - continue; - } - buf = appendEscapedRune(buf, r, quote, ASCIIonly, graphicOnly); - s = $substring(s, width); - } - buf = $append(buf, quote); - return buf; - }; - appendQuotedRuneWith = function(buf, r, quote, ASCIIonly, graphicOnly) { - var ASCIIonly, buf, graphicOnly, quote, r; - buf = $append(buf, quote); - if (!utf8.ValidRune(r)) { - r = 65533; - } - buf = appendEscapedRune(buf, r, quote, ASCIIonly, graphicOnly); - buf = $append(buf, quote); - return buf; - }; - appendEscapedRune = function(buf, r, quote, ASCIIonly, graphicOnly) { - var ASCIIonly, _1, buf, graphicOnly, n, quote, r, runeTmp, s, s$1; - runeTmp = arrayType$1.zero(); - if ((r === ((quote >> 0))) || (r === 92)) { - buf = $append(buf, 92); - buf = $append(buf, ((r << 24 >>> 24))); - return buf; - } - if (ASCIIonly) { - if (r < 128 && IsPrint(r)) { - buf = $append(buf, ((r << 24 >>> 24))); - return buf; - } - } else if (IsPrint(r) || graphicOnly && isInGraphicList(r)) { - n = utf8.EncodeRune(new sliceType$6(runeTmp), r); - buf = $appendSlice(buf, $subslice(new sliceType$6(runeTmp), 0, n)); - return buf; - } - _1 = r; - if (_1 === (7)) { - buf = $appendSlice(buf, "\\a"); - } else if (_1 === (8)) { - buf = $appendSlice(buf, "\\b"); - } else if (_1 === (12)) { - buf = $appendSlice(buf, "\\f"); - } else if (_1 === (10)) { - buf = $appendSlice(buf, "\\n"); - } else if (_1 === (13)) { - buf = $appendSlice(buf, "\\r"); - } else if (_1 === (9)) { - buf = $appendSlice(buf, "\\t"); - } else if (_1 === (11)) { - buf = $appendSlice(buf, "\\v"); - } else { - if (r < 32) { - buf = $appendSlice(buf, "\\x"); - buf = $append(buf, "0123456789abcdef".charCodeAt((((r << 24 >>> 24)) >>> 4 << 24 >>> 24))); - buf = $append(buf, "0123456789abcdef".charCodeAt(((((r << 24 >>> 24)) & 15) >>> 0))); - } else if (!utf8.ValidRune(r)) { - r = 65533; - buf = $appendSlice(buf, "\\u"); - s = 12; - while (true) { - if (!(s >= 0)) { break; } - buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min(((s >>> 0)), 31)) >> 0) & 15))); - s = s - (4) >> 0; - } - } else if (r < 65536) { - buf = $appendSlice(buf, "\\u"); - s = 12; - while (true) { - if (!(s >= 0)) { break; } - buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min(((s >>> 0)), 31)) >> 0) & 15))); - s = s - (4) >> 0; - } - } else { - buf = $appendSlice(buf, "\\U"); - s$1 = 28; - while (true) { - if (!(s$1 >= 0)) { break; } - buf = $append(buf, "0123456789abcdef".charCodeAt((((r >> $min(((s$1 >>> 0)), 31)) >> 0) & 15))); - s$1 = s$1 - (4) >> 0; - } - } - } - return buf; - }; - Quote = function(s) { - var s; - return quoteWith(s, 34, false, false); - }; - $pkg.Quote = Quote; - AppendQuote = function(dst, s) { - var dst, s; - return appendQuotedWith(dst, s, 34, false, false); - }; - $pkg.AppendQuote = AppendQuote; - AppendQuoteToASCII = function(dst, s) { - var dst, s; - return appendQuotedWith(dst, s, 34, true, false); - }; - $pkg.AppendQuoteToASCII = AppendQuoteToASCII; - AppendQuoteRune = function(dst, r) { - var dst, r; - return appendQuotedRuneWith(dst, r, 39, false, false); - }; - $pkg.AppendQuoteRune = AppendQuoteRune; - AppendQuoteRuneToASCII = function(dst, r) { - var dst, r; - return appendQuotedRuneWith(dst, r, 39, true, false); - }; - $pkg.AppendQuoteRuneToASCII = AppendQuoteRuneToASCII; - CanBackquote = function(s) { - var _tuple, r, s, wid; - while (true) { - if (!(s.length > 0)) { break; } - _tuple = utf8.DecodeRuneInString(s); - r = _tuple[0]; - wid = _tuple[1]; - s = $substring(s, wid); - if (wid > 1) { - if (r === 65279) { - return false; - } - continue; - } - if (r === 65533) { - return false; - } - if ((r < 32 && !((r === 9))) || (r === 96) || (r === 127)) { - return false; - } - } - return true; - }; - $pkg.CanBackquote = CanBackquote; - unhex = function(b) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, c, ok, v; - v = 0; - ok = false; - c = ((b >> 0)); - if (48 <= c && c <= 57) { - _tmp = c - 48 >> 0; - _tmp$1 = true; - v = _tmp; - ok = _tmp$1; - return [v, ok]; - } else if (97 <= c && c <= 102) { - _tmp$2 = (c - 97 >> 0) + 10 >> 0; - _tmp$3 = true; - v = _tmp$2; - ok = _tmp$3; - return [v, ok]; - } else if (65 <= c && c <= 70) { - _tmp$4 = (c - 65 >> 0) + 10 >> 0; - _tmp$5 = true; - v = _tmp$4; - ok = _tmp$5; - return [v, ok]; - } - return [v, ok]; - }; - UnquoteChar = function(s, quote) { - var _1, _2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, c, c$1, err, j, j$1, multibyte, n, ok, quote, r, s, size, tail, v, v$1, value, x, x$1; - value = 0; - multibyte = false; - tail = ""; - err = $ifaceNil; - if (s.length === 0) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - c = s.charCodeAt(0); - if ((c === quote) && ((quote === 39) || (quote === 34))) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } else if (c >= 128) { - _tuple = utf8.DecodeRuneInString(s); - r = _tuple[0]; - size = _tuple[1]; - _tmp = r; - _tmp$1 = true; - _tmp$2 = $substring(s, size); - _tmp$3 = $ifaceNil; - value = _tmp; - multibyte = _tmp$1; - tail = _tmp$2; - err = _tmp$3; - return [value, multibyte, tail, err]; - } else if (!((c === 92))) { - _tmp$4 = ((s.charCodeAt(0) >> 0)); - _tmp$5 = false; - _tmp$6 = $substring(s, 1); - _tmp$7 = $ifaceNil; - value = _tmp$4; - multibyte = _tmp$5; - tail = _tmp$6; - err = _tmp$7; - return [value, multibyte, tail, err]; - } - if (s.length <= 1) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - c$1 = s.charCodeAt(1); - s = $substring(s, 2); - switch (0) { default: - _1 = c$1; - if (_1 === (97)) { - value = 7; - } else if (_1 === (98)) { - value = 8; - } else if (_1 === (102)) { - value = 12; - } else if (_1 === (110)) { - value = 10; - } else if (_1 === (114)) { - value = 13; - } else if (_1 === (116)) { - value = 9; - } else if (_1 === (118)) { - value = 11; - } else if ((_1 === (120)) || (_1 === (117)) || (_1 === (85))) { - n = 0; - _2 = c$1; - if (_2 === (120)) { - n = 2; - } else if (_2 === (117)) { - n = 4; - } else if (_2 === (85)) { - n = 8; - } - v = 0; - if (s.length < n) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - j = 0; - while (true) { - if (!(j < n)) { break; } - _tuple$1 = unhex(s.charCodeAt(j)); - x = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - v = (v << 4 >> 0) | x; - j = j + (1) >> 0; - } - s = $substring(s, n); - if (c$1 === 120) { - value = v; - break; - } - if (!utf8.ValidRune(v)) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - value = v; - multibyte = true; - } else if ((_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55))) { - v$1 = ((c$1 >> 0)) - 48 >> 0; - if (s.length < 2) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - j$1 = 0; - while (true) { - if (!(j$1 < 2)) { break; } - x$1 = ((s.charCodeAt(j$1) >> 0)) - 48 >> 0; - if (x$1 < 0 || x$1 > 7) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - v$1 = ((v$1 << 3 >> 0)) | x$1; - j$1 = j$1 + (1) >> 0; - } - s = $substring(s, 2); - if (v$1 > 255) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - value = v$1; - } else if (_1 === (92)) { - value = 92; - } else if ((_1 === (39)) || (_1 === (34))) { - if (!((c$1 === quote))) { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - value = ((c$1 >> 0)); - } else { - err = $pkg.ErrSyntax; - return [value, multibyte, tail, err]; - } - } - tail = s; - return [value, multibyte, tail, err]; - }; - $pkg.UnquoteChar = UnquoteChar; - Unquote = function(s) { - var _tuple, err, out, rem, s; - _tuple = unquote(s, true); - out = _tuple[0]; - rem = _tuple[1]; - err = _tuple[2]; - if (rem.length > 0) { - return ["", $pkg.ErrSyntax]; - } - return [out, err]; - }; - $pkg.Unquote = Unquote; - unquote = function(in$1, unescape) { - var _1, _2, _q, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, arr, buf, buf$1, end, err, err$1, i, in$1, in0, multibyte, n, n$1, out, quote, r, r$1, rem, rem$1, unescape, valid; - out = ""; - rem = ""; - err = $ifaceNil; - if (in$1.length < 2) { - _tmp = ""; - _tmp$1 = in$1; - _tmp$2 = $pkg.ErrSyntax; - out = _tmp; - rem = _tmp$1; - err = _tmp$2; - return [out, rem, err]; - } - quote = in$1.charCodeAt(0); - end = index($substring(in$1, 1), quote); - if (end < 0) { - _tmp$3 = ""; - _tmp$4 = in$1; - _tmp$5 = $pkg.ErrSyntax; - out = _tmp$3; - rem = _tmp$4; - err = _tmp$5; - return [out, rem, err]; - } - end = end + (2) >> 0; - _1 = quote; - if (_1 === (96)) { - if (!unescape) { - out = $substring(in$1, 0, end); - } else if (!contains($substring(in$1, 0, end), 13)) { - out = $substring(in$1, 1, (end - 1 >> 0)); - } else { - buf = $makeSlice(sliceType$6, 0, (((end - 1 >> 0) - 1 >> 0) - 1 >> 0)); - i = 1; - while (true) { - if (!(i < (end - 1 >> 0))) { break; } - if (!((in$1.charCodeAt(i) === 13))) { - buf = $append(buf, in$1.charCodeAt(i)); - } - i = i + (1) >> 0; - } - out = ($bytesToString(buf)); - } - _tmp$6 = out; - _tmp$7 = $substring(in$1, end); - _tmp$8 = $ifaceNil; - out = _tmp$6; - rem = _tmp$7; - err = _tmp$8; - return [out, rem, err]; - } else if ((_1 === (34)) || (_1 === (39))) { - if (!contains($substring(in$1, 0, end), 92) && !contains($substring(in$1, 0, end), 10)) { - valid = false; - _2 = quote; - if (_2 === (34)) { - valid = utf8.ValidString($substring(in$1, 1, (end - 1 >> 0))); - } else if (_2 === (39)) { - _tuple = utf8.DecodeRuneInString($substring(in$1, 1, (end - 1 >> 0))); - r = _tuple[0]; - n = _tuple[1]; - valid = (((1 + n >> 0) + 1 >> 0) === end) && (!((r === 65533)) || !((n === 1))); - } - if (valid) { - out = $substring(in$1, 0, end); - if (unescape) { - out = $substring(out, 1, (end - 1 >> 0)); - } - _tmp$9 = out; - _tmp$10 = $substring(in$1, end); - _tmp$11 = $ifaceNil; - out = _tmp$9; - rem = _tmp$10; - err = _tmp$11; - return [out, rem, err]; - } - } - buf$1 = sliceType$6.nil; - in0 = in$1; - in$1 = $substring(in$1, 1); - if (unescape) { - buf$1 = $makeSlice(sliceType$6, 0, (_q = ($imul(3, end)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - } - while (true) { - if (!(in$1.length > 0 && !((in$1.charCodeAt(0) === quote)))) { break; } - _tuple$1 = UnquoteChar(in$1, quote); - r$1 = _tuple$1[0]; - multibyte = _tuple$1[1]; - rem$1 = _tuple$1[2]; - err$1 = _tuple$1[3]; - if ((in$1.charCodeAt(0) === 10) || !($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$12 = ""; - _tmp$13 = in0; - _tmp$14 = $pkg.ErrSyntax; - out = _tmp$12; - rem = _tmp$13; - err = _tmp$14; - return [out, rem, err]; - } - in$1 = rem$1; - if (unescape) { - if (r$1 < 128 || !multibyte) { - buf$1 = $append(buf$1, ((r$1 << 24 >>> 24))); - } else { - arr = arrayType$1.zero(); - n$1 = utf8.EncodeRune(new sliceType$6(arr), r$1); - buf$1 = $appendSlice(buf$1, $subslice(new sliceType$6(arr), 0, n$1)); - } - } - if (quote === 39) { - break; - } - } - if (!(in$1.length > 0 && (in$1.charCodeAt(0) === quote))) { - _tmp$15 = ""; - _tmp$16 = in0; - _tmp$17 = $pkg.ErrSyntax; - out = _tmp$15; - rem = _tmp$16; - err = _tmp$17; - return [out, rem, err]; - } - in$1 = $substring(in$1, 1); - if (unescape) { - _tmp$18 = ($bytesToString(buf$1)); - _tmp$19 = in$1; - _tmp$20 = $ifaceNil; - out = _tmp$18; - rem = _tmp$19; - err = _tmp$20; - return [out, rem, err]; - } - _tmp$21 = $substring(in0, 0, (in0.length - in$1.length >> 0)); - _tmp$22 = in$1; - _tmp$23 = $ifaceNil; - out = _tmp$21; - rem = _tmp$22; - err = _tmp$23; - return [out, rem, err]; - } else { - _tmp$24 = ""; - _tmp$25 = in$1; - _tmp$26 = $pkg.ErrSyntax; - out = _tmp$24; - rem = _tmp$25; - err = _tmp$26; - return [out, rem, err]; - } - }; - bsearch16 = function(a, x) { - var _tmp, _tmp$1, a, h, i, j, x; - _tmp = 0; - _tmp$1 = a.$length; - i = _tmp; - j = _tmp$1; - while (true) { - if (!(i < j)) { break; } - h = i + (((j - i >> 0)) >> 1 >> 0) >> 0; - if (((h < 0 || h >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + h]) < x) { - i = h + 1 >> 0; - } else { - j = h; - } - } - return i; - }; - bsearch32 = function(a, x) { - var _tmp, _tmp$1, a, h, i, j, x; - _tmp = 0; - _tmp$1 = a.$length; - i = _tmp; - j = _tmp$1; - while (true) { - if (!(i < j)) { break; } - h = i + (((j - i >> 0)) >> 1 >> 0) >> 0; - if (((h < 0 || h >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + h]) < x) { - i = h + 1 >> 0; - } else { - j = h; - } - } - return i; - }; - IsPrint = function(r) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, i, i$1, isNotPrint, isNotPrint$1, isPrint, isPrint$1, j, j$1, r, rr, rr$1, x, x$1, x$2, x$3; - if (r <= 255) { - if (32 <= r && r <= 126) { - return true; - } - if (161 <= r && r <= 255) { - return !((r === 173)); - } - return false; - } - if (0 <= r && r < 65536) { - _tmp = ((r << 16 >>> 16)); - _tmp$1 = isPrint16; - _tmp$2 = isNotPrint16; - rr = _tmp; - isPrint = _tmp$1; - isNotPrint = _tmp$2; - i = bsearch16(isPrint, rr); - if (i >= isPrint.$length || rr < (x = (i & ~1) >> 0, ((x < 0 || x >= isPrint.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint.$array[isPrint.$offset + x])) || (x$1 = i | 1, ((x$1 < 0 || x$1 >= isPrint.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint.$array[isPrint.$offset + x$1])) < rr) { - return false; - } - j = bsearch16(isNotPrint, rr); - return j >= isNotPrint.$length || !((((j < 0 || j >= isNotPrint.$length) ? ($throwRuntimeError("index out of range"), undefined) : isNotPrint.$array[isNotPrint.$offset + j]) === rr)); - } - _tmp$3 = ((r >>> 0)); - _tmp$4 = isPrint32; - _tmp$5 = isNotPrint32; - rr$1 = _tmp$3; - isPrint$1 = _tmp$4; - isNotPrint$1 = _tmp$5; - i$1 = bsearch32(isPrint$1, rr$1); - if (i$1 >= isPrint$1.$length || rr$1 < (x$2 = (i$1 & ~1) >> 0, ((x$2 < 0 || x$2 >= isPrint$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint$1.$array[isPrint$1.$offset + x$2])) || (x$3 = i$1 | 1, ((x$3 < 0 || x$3 >= isPrint$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : isPrint$1.$array[isPrint$1.$offset + x$3])) < rr$1) { - return false; - } - if (r >= 131072) { - return true; - } - r = r - (65536) >> 0; - j$1 = bsearch16(isNotPrint$1, ((r << 16 >>> 16))); - return j$1 >= isNotPrint$1.$length || !((((j$1 < 0 || j$1 >= isNotPrint$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : isNotPrint$1.$array[isNotPrint$1.$offset + j$1]) === ((r << 16 >>> 16)))); - }; - $pkg.IsPrint = IsPrint; - isInGraphicList = function(r) { - var i, r, rr; - if (r > 65535) { - return false; - } - rr = ((r << 16 >>> 16)); - i = bsearch16(isGraphic, rr); - return i < isGraphic.$length && (rr === ((i < 0 || i >= isGraphic.$length) ? ($throwRuntimeError("index out of range"), undefined) : isGraphic.$array[isGraphic.$offset + i])); - }; - FormatUint = function(i, base) { - var _tuple, base, i, s; - if (true && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { - return small(((i.$low >> 0))); - } - _tuple = formatBits(sliceType$6.nil, i, base, false, false); - s = _tuple[1]; - return s; - }; - $pkg.FormatUint = FormatUint; - FormatInt = function(i, base) { - var _tuple, base, i, s; - if (true && (0 < i.$high || (0 === i.$high && 0 <= i.$low)) && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { - return small((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0))); - } - _tuple = formatBits(sliceType$6.nil, (new $Uint64(i.$high, i.$low)), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), false); - s = _tuple[1]; - return s; - }; - $pkg.FormatInt = FormatInt; - AppendInt = function(dst, i, base) { - var _tuple, base, dst, i; - if (true && (0 < i.$high || (0 === i.$high && 0 <= i.$low)) && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { - return $appendSlice(dst, small((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0)))); - } - _tuple = formatBits(dst, (new $Uint64(i.$high, i.$low)), base, (i.$high < 0 || (i.$high === 0 && i.$low < 0)), true); - dst = _tuple[0]; - return dst; - }; - $pkg.AppendInt = AppendInt; - AppendUint = function(dst, i, base) { - var _tuple, base, dst, i; - if (true && (i.$high < 0 || (i.$high === 0 && i.$low < 100)) && (base === 10)) { - return $appendSlice(dst, small(((i.$low >> 0)))); - } - _tuple = formatBits(dst, i, base, false, true); - dst = _tuple[0]; - return dst; - }; - $pkg.AppendUint = AppendUint; - small = function(i) { - var i; - if (i < 10) { - return $substring("0123456789abcdefghijklmnopqrstuvwxyz", i, (i + 1 >> 0)); - } - return $substring("00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899", ($imul(i, 2)), (($imul(i, 2)) + 2 >> 0)); - }; - formatBits = function(dst, u, base, neg, append_) { - var _q, _q$1, _r, _r$1, a, append_, b, b$1, base, d, dst, i, is, is$1, is$2, j, m, neg, q, q$1, s, shift, u, us, us$1, x, x$1, x$2, x$3, x$4, x$5; - d = sliceType$6.nil; - s = ""; - if (base < 2 || base > 36) { - $panic(new $String("strconv: illegal AppendInt/FormatInt base")); - } - a = arrayType$2.zero(); - i = 65; - if (neg) { - u = new $Uint64(-u.$high, -u.$low); - } - if (base === 10) { - if (true) { - while (true) { - if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 1000000000)))) { break; } - q = $div64(u, new $Uint64(0, 1000000000), false); - us = (((x = $mul64(q, new $Uint64(0, 1000000000)), new $Uint64(u.$high - x.$high, u.$low - x.$low)).$low >>> 0)); - j = 4; - while (true) { - if (!(j > 0)) { break; } - is = (_r = us % 100, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) * 2 >>> 0; - us = (_q = us / (100), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - i = i - (2) >> 0; - (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$1] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is + 1 >>> 0)))); - (x$2 = i + 0 >> 0, ((x$2 < 0 || x$2 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$2] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is + 0 >>> 0)))); - j = j - (1) >> 0; - } - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt(((us * 2 >>> 0) + 1 >>> 0))); - u = q; - } - } - us$1 = ((u.$low >>> 0)); - while (true) { - if (!(us$1 >= 100)) { break; } - is$1 = (_r$1 = us$1 % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) * 2 >>> 0; - us$1 = (_q$1 = us$1 / (100), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); - i = i - (2) >> 0; - (x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$3] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is$1 + 1 >>> 0)))); - (x$4 = i + 0 >> 0, ((x$4 < 0 || x$4 >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[x$4] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is$1 + 0 >>> 0)))); - } - is$2 = us$1 * 2 >>> 0; - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((is$2 + 1 >>> 0))); - if (us$1 >= 10) { - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt(is$2)); - } - } else if (isPowerOfTwo(base)) { - shift = (((bits.TrailingZeros(((base >>> 0))) >>> 0)) & 7) >>> 0; - b = (new $Uint64(0, base)); - m = ((base >>> 0)) - 1 >>> 0; - while (true) { - if (!((u.$high > b.$high || (u.$high === b.$high && u.$low >= b.$low)))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((((u.$low >>> 0)) & m) >>> 0))); - u = $shiftRightUint64(u, (shift)); - } - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((u.$low >>> 0)))); - } else { - b$1 = (new $Uint64(0, base)); - while (true) { - if (!((u.$high > b$1.$high || (u.$high === b$1.$high && u.$low >= b$1.$low)))) { break; } - i = i - (1) >> 0; - q$1 = $div64(u, b$1, false); - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((x$5 = $mul64(q$1, b$1), new $Uint64(u.$high - x$5.$high, u.$low - x$5.$low)).$low >>> 0)))); - u = q$1; - } - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = "0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((u.$low >>> 0)))); - } - if (neg) { - i = i - (1) >> 0; - ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i] = 45); - } - if (append_) { - d = $appendSlice(dst, $subslice(new sliceType$6(a), i)); - return [d, s]; - } - s = ($bytesToString($subslice(new sliceType$6(a), i))); - return [d, s]; - }; - isPowerOfTwo = function(x) { - var x; - return (x & ((x - 1 >> 0))) === 0; - }; - ryuFtoaFixed32 = function(d, mant, exp, prec) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, d, d0, dexp2, dfrac, di, e2, exact, exp, extra, extraMask, mant, prec, q, roundUp, y, y$1, y$2, y$3, y$4, y$5, y$6; - if (prec < 0) { - $panic(new $String("ryuFtoaFixed32 called with negative prec")); - } - if (prec > 9) { - $panic(new $String("ryuFtoaFixed32 called with prec > 9")); - } - if (mant === 0) { - _tmp = 0; - _tmp$1 = 0; - d.nd = _tmp; - d.dp = _tmp$1; - return; - } - e2 = exp; - b = bits.Len32(mant); - if (b < 25) { - mant = (y = ((((25 - b >> 0) >>> 0))), y < 32 ? (mant << y) : 0) >>> 0; - e2 = e2 + (((b) - 25 >> 0)) >> 0; - } - q = (-mulByLog2Log10(e2 + 24 >> 0) + prec >> 0) - 1 >> 0; - exact = q <= 27 && q >= 0; - _tuple = mult64bitPow10(mant, e2, q); - di = _tuple[0]; - dexp2 = _tuple[1]; - d0 = _tuple[2]; - if (dexp2 >= 0) { - $panic(new $String("not enough significant bits after mult64bitPow10")); - } - if (q < 0 && q >= -10 && divisibleByPower5((new $Uint64(0, mant)), -q)) { - exact = true; - d0 = true; - } - extra = ((-dexp2 >>> 0)); - extraMask = ((((y$1 = extra, y$1 < 32 ? (1 << y$1) : 0) >>> 0) - 1 >>> 0)); - _tmp$2 = (y$2 = extra, y$2 < 32 ? (di >>> y$2) : 0) >>> 0; - _tmp$3 = (di & extraMask) >>> 0; - di = _tmp$2; - dfrac = _tmp$3; - roundUp = false; - if (exact) { - roundUp = dfrac > ((y$3 = ((extra - 1 >>> 0)), y$3 < 32 ? (1 << y$3) : 0) >>> 0) || ((dfrac === ((y$4 = ((extra - 1 >>> 0)), y$4 < 32 ? (1 << y$4) : 0) >>> 0)) && !d0) || ((dfrac === ((y$5 = ((extra - 1 >>> 0)), y$5 < 32 ? (1 << y$5) : 0) >>> 0)) && d0 && (((di & 1) >>> 0) === 1)); - } else { - roundUp = ((y$6 = ((extra - 1 >>> 0)), y$6 < 32 ? (dfrac >>> y$6) : 0) >>> 0) === 1; - } - if (!((dfrac === 0))) { - d0 = false; - } - formatDecimal(d, (new $Uint64(0, di)), !d0, roundUp, prec); - d.dp = d.dp - (q) >> 0; - }; - ryuFtoaFixed64 = function(d, mant, exp, prec) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, d, d0, dexp2, dfrac, di, e2, exact, exp, extra, extraMask, mant, prec, q, roundUp, x, x$1, x$2, x$3, x$4, x$5; - if (prec > 18) { - $panic(new $String("ryuFtoaFixed64 called with prec > 18")); - } - if ((mant.$high === 0 && mant.$low === 0)) { - _tmp = 0; - _tmp$1 = 0; - d.nd = _tmp; - d.dp = _tmp$1; - return; - } - e2 = exp; - b = bits.Len64(mant); - if (b < 55) { - mant = $shiftLeft64(mant, (((55 - b >> 0) >>> 0))); - e2 = e2 + (((b) - 55 >> 0)) >> 0; - } - q = (-mulByLog2Log10(e2 + 54 >> 0) + prec >> 0) - 1 >> 0; - exact = q <= 55 && q >= 0; - _tuple = mult128bitPow10(mant, e2, q); - di = _tuple[0]; - dexp2 = _tuple[1]; - d0 = _tuple[2]; - if (dexp2 >= 0) { - $panic(new $String("not enough significant bits after mult128bitPow10")); - } - if (q < 0 && q >= -22 && divisibleByPower5(mant, -q)) { - exact = true; - d0 = true; - } - extra = ((-dexp2 >>> 0)); - extraMask = ((x = $shiftLeft64(new $Uint64(0, 1), extra), new $Uint64(x.$high - 0, x.$low - 1))); - _tmp$2 = $shiftRightUint64(di, extra); - _tmp$3 = new $Uint64(di.$high & extraMask.$high, (di.$low & extraMask.$low) >>> 0); - di = _tmp$2; - dfrac = _tmp$3; - roundUp = false; - if (exact) { - roundUp = (x$1 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (dfrac.$high > x$1.$high || (dfrac.$high === x$1.$high && dfrac.$low > x$1.$low))) || ((x$2 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (dfrac.$high === x$2.$high && dfrac.$low === x$2.$low)) && !d0) || ((x$3 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (dfrac.$high === x$3.$high && dfrac.$low === x$3.$low)) && d0 && (x$4 = new $Uint64(di.$high & 0, (di.$low & 1) >>> 0), (x$4.$high === 0 && x$4.$low === 1))); - } else { - roundUp = (x$5 = $shiftRightUint64(dfrac, ((extra - 1 >>> 0))), (x$5.$high === 0 && x$5.$low === 1)); - } - if (!((dfrac.$high === 0 && dfrac.$low === 0))) { - d0 = false; - } - formatDecimal(d, di, !d0, roundUp, prec); - d.dp = d.dp - (q) >> 0; - }; - formatDecimal = function(d, m, trunc, roundUp, prec) { - var _q, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, a, b, d, m, max$1, n, prec, roundUp, trimmed, trunc, v, v1, v2, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - max$1 = ((prec < 0 || prec >= uint64pow10.length) ? ($throwRuntimeError("index out of range"), undefined) : uint64pow10[prec]); - trimmed = 0; - while (true) { - if (!((m.$high > max$1.$high || (m.$high === max$1.$high && m.$low >= max$1.$low)))) { break; } - _tmp = $div64(m, new $Uint64(0, 10), false); - _tmp$1 = $div64(m, new $Uint64(0, 10), true); - a = _tmp; - b = _tmp$1; - m = a; - trimmed = trimmed + (1) >> 0; - if ((b.$high > 0 || (b.$high === 0 && b.$low > 5))) { - roundUp = true; - } else if ((b.$high < 0 || (b.$high === 0 && b.$low < 5))) { - roundUp = false; - } else { - roundUp = trunc || (x = new $Uint64(m.$high & 0, (m.$low & 1) >>> 0), (x.$high === 0 && x.$low === 1)); - } - if (!((b.$high === 0 && b.$low === 0))) { - trunc = true; - } - } - if (roundUp) { - m = (x$1 = new $Uint64(0, 1), new $Uint64(m.$high + x$1.$high, m.$low + x$1.$low)); - } - if ((m.$high > max$1.$high || (m.$high === max$1.$high && m.$low >= max$1.$low))) { - m = $div64(m, (new $Uint64(0, 10)), false); - trimmed = trimmed + (1) >> 0; - } - n = ((prec >>> 0)); - d.nd = (prec); - v = m; - while (true) { - if (!((v.$high > 0 || (v.$high === 0 && v.$low >= 100)))) { break; } - _tmp$2 = new $Uint64(0, 0); - _tmp$3 = new $Uint64(0, 0); - v1 = _tmp$2; - v2 = _tmp$3; - if ((x$2 = $shiftRightUint64(v, 32), (x$2.$high === 0 && x$2.$low === 0))) { - _tmp$4 = (new $Uint64(0, (_q = ((v.$low >>> 0)) / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")))); - _tmp$5 = (new $Uint64(0, (_r = ((v.$low >>> 0)) % 100, _r === _r ? _r : $throwRuntimeError("integer divide by zero")))); - v1 = _tmp$4; - v2 = _tmp$5; - } else { - _tmp$6 = $div64(v, new $Uint64(0, 100), false); - _tmp$7 = $div64(v, new $Uint64(0, 100), true); - v1 = _tmp$6; - v2 = _tmp$7; - } - n = n - (2) >>> 0; - (x$4 = d.d, x$5 = n + 1 >>> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((x$3 = $mul64(new $Uint64(0, 2), v2), new $Uint64(x$3.$high + 0, x$3.$low + 1)))))); - (x$7 = d.d, x$8 = n + 0 >>> 0, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((x$6 = $mul64(new $Uint64(0, 2), v2), new $Uint64(x$6.$high + 0, x$6.$low + 0)))))); - v = v1; - } - if ((v.$high > 0 || (v.$high === 0 && v.$low > 0))) { - n = n - (1) >>> 0; - (x$10 = d.d, ((n < 0 || n >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + n] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((x$9 = $mul64(new $Uint64(0, 2), v), new $Uint64(x$9.$high + 0, x$9.$low + 1)))))); - } - if ((v.$high > 0 || (v.$high === 0 && v.$low >= 10))) { - n = n - (1) >>> 0; - (x$11 = d.d, ((n < 0 || n >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + n] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64($mul64(new $Uint64(0, 2), v))))); - } - while (true) { - if (!((x$12 = d.d, x$13 = d.nd - 1 >> 0, ((x$13 < 0 || x$13 >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + x$13])) === 48)) { break; } - d.nd = d.nd - (1) >> 0; - trimmed = trimmed + (1) >> 0; - } - d.dp = d.nd + trimmed >> 0; - }; - ryuFtoaShortest = function(d, mant, exp, flt) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c0, cup, d, dc, dc0, dc32, dl, dl0, dl32, du, du0, du32, e2, exp, extra, extraMask, flt, fracc, fracl, fracu, lok, mant, mc, ml, mu, q, uok, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; - if ((mant.$high === 0 && mant.$low === 0)) { - _tmp = 0; - _tmp$1 = 0; - d.nd = _tmp; - d.dp = _tmp$1; - return; - } - if (exp <= 0 && bits.TrailingZeros64(mant) >= -exp) { - mant = $shiftRightUint64(mant, (((-exp >>> 0)))); - ryuDigits(d, mant, mant, mant, true, false); - return; - } - _tuple = computeBounds(mant, exp, flt); - ml = _tuple[0]; - mc = _tuple[1]; - mu = _tuple[2]; - e2 = _tuple[3]; - if (e2 === 0) { - ryuDigits(d, ml, mc, mu, true, false); - return; - } - q = mulByLog2Log10(-e2) + 1 >> 0; - _tmp$2 = new $Uint64(0, 0); - _tmp$3 = new $Uint64(0, 0); - _tmp$4 = new $Uint64(0, 0); - dl = _tmp$2; - dc = _tmp$3; - du = _tmp$4; - _tmp$5 = false; - _tmp$6 = false; - _tmp$7 = false; - dl0 = _tmp$5; - dc0 = _tmp$6; - du0 = _tmp$7; - if (flt === float32info) { - _tmp$8 = 0; - _tmp$9 = 0; - _tmp$10 = 0; - dl32 = _tmp$8; - dc32 = _tmp$9; - du32 = _tmp$10; - _tuple$1 = mult64bitPow10(((ml.$low >>> 0)), e2, q); - dl32 = _tuple$1[0]; - dl0 = _tuple$1[2]; - _tuple$2 = mult64bitPow10(((mc.$low >>> 0)), e2, q); - dc32 = _tuple$2[0]; - dc0 = _tuple$2[2]; - _tuple$3 = mult64bitPow10(((mu.$low >>> 0)), e2, q); - du32 = _tuple$3[0]; - e2 = _tuple$3[1]; - du0 = _tuple$3[2]; - _tmp$11 = (new $Uint64(0, dl32)); - _tmp$12 = (new $Uint64(0, dc32)); - _tmp$13 = (new $Uint64(0, du32)); - dl = _tmp$11; - dc = _tmp$12; - du = _tmp$13; - } else { - _tuple$4 = mult128bitPow10(ml, e2, q); - dl = _tuple$4[0]; - dl0 = _tuple$4[2]; - _tuple$5 = mult128bitPow10(mc, e2, q); - dc = _tuple$5[0]; - dc0 = _tuple$5[2]; - _tuple$6 = mult128bitPow10(mu, e2, q); - du = _tuple$6[0]; - e2 = _tuple$6[1]; - du0 = _tuple$6[2]; - } - if (e2 >= 0) { - $panic(new $String("not enough significant bits after mult128bitPow10")); - } - if (q > 55) { - _tmp$14 = false; - _tmp$15 = false; - _tmp$16 = false; - dl0 = _tmp$14; - dc0 = _tmp$15; - du0 = _tmp$16; - } - if (q < 0 && q >= -24) { - if (divisibleByPower5(ml, -q)) { - dl0 = true; - } - if (divisibleByPower5(mc, -q)) { - dc0 = true; - } - if (divisibleByPower5(mu, -q)) { - du0 = true; - } - } - extra = ((-e2 >>> 0)); - extraMask = ((x = $shiftLeft64(new $Uint64(0, 1), extra), new $Uint64(x.$high - 0, x.$low - 1))); - _tmp$17 = $shiftRightUint64(dl, extra); - _tmp$18 = new $Uint64(dl.$high & extraMask.$high, (dl.$low & extraMask.$low) >>> 0); - dl = _tmp$17; - fracl = _tmp$18; - _tmp$19 = $shiftRightUint64(dc, extra); - _tmp$20 = new $Uint64(dc.$high & extraMask.$high, (dc.$low & extraMask.$low) >>> 0); - dc = _tmp$19; - fracc = _tmp$20; - _tmp$21 = $shiftRightUint64(du, extra); - _tmp$22 = new $Uint64(du.$high & extraMask.$high, (du.$low & extraMask.$low) >>> 0); - du = _tmp$21; - fracu = _tmp$22; - uok = !du0 || (fracu.$high > 0 || (fracu.$high === 0 && fracu.$low > 0)); - if (du0 && (fracu.$high === 0 && fracu.$low === 0)) { - uok = (x$1 = new $Uint64(mant.$high & 0, (mant.$low & 1) >>> 0), (x$1.$high === 0 && x$1.$low === 0)); - } - if (!uok) { - du = (x$2 = new $Uint64(0, 1), new $Uint64(du.$high - x$2.$high, du.$low - x$2.$low)); - } - cup = false; - if (dc0) { - cup = (x$3 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (fracc.$high > x$3.$high || (fracc.$high === x$3.$high && fracc.$low > x$3.$low))) || ((x$4 = $shiftLeft64(new $Uint64(0, 1), ((extra - 1 >>> 0))), (fracc.$high === x$4.$high && fracc.$low === x$4.$low)) && (x$5 = new $Uint64(dc.$high & 0, (dc.$low & 1) >>> 0), (x$5.$high === 0 && x$5.$low === 1))); - } else { - cup = (x$6 = $shiftRightUint64(fracc, ((extra - 1 >>> 0))), (x$6.$high === 0 && x$6.$low === 1)); - } - lok = dl0 && (fracl.$high === 0 && fracl.$low === 0) && ((x$7 = new $Uint64(mant.$high & 0, (mant.$low & 1) >>> 0), (x$7.$high === 0 && x$7.$low === 0))); - if (!lok) { - dl = (x$8 = new $Uint64(0, 1), new $Uint64(dl.$high + x$8.$high, dl.$low + x$8.$low)); - } - c0 = dc0 && (fracc.$high === 0 && fracc.$low === 0); - ryuDigits(d, dl, dc, du, c0, cup); - d.dp = d.dp - (q) >> 0; - }; - mulByLog2Log10 = function(x) { - var x; - return (($imul(x, 78913))) >> 18 >> 0; - }; - mulByLog10Log2 = function(x) { - var x; - return (($imul(x, 108853))) >> 15 >> 0; - }; - computeBounds = function(mant, exp, flt) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, central, e2, exp, flt, lower$1, mant, upper, x, x$1, x$2, x$3, x$4; - lower$1 = new $Uint64(0, 0); - central = new $Uint64(0, 0); - upper = new $Uint64(0, 0); - e2 = 0; - if (!((x = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high === x.$high && mant.$low === x.$low))) || (exp === ((flt.bias + 1 >> 0) - ((flt.mantbits >> 0)) >> 0))) { - _tmp = (x$1 = $mul64(new $Uint64(0, 2), mant), new $Uint64(x$1.$high - 0, x$1.$low - 1)); - _tmp$1 = $mul64(new $Uint64(0, 2), mant); - _tmp$2 = (x$2 = $mul64(new $Uint64(0, 2), mant), new $Uint64(x$2.$high + 0, x$2.$low + 1)); - lower$1 = _tmp; - central = _tmp$1; - upper = _tmp$2; - e2 = exp - 1 >> 0; - return [lower$1, central, upper, e2]; - } else { - _tmp$3 = (x$3 = $mul64(new $Uint64(0, 4), mant), new $Uint64(x$3.$high - 0, x$3.$low - 1)); - _tmp$4 = $mul64(new $Uint64(0, 4), mant); - _tmp$5 = (x$4 = $mul64(new $Uint64(0, 4), mant), new $Uint64(x$4.$high + 0, x$4.$low + 2)); - lower$1 = _tmp$3; - central = _tmp$4; - upper = _tmp$5; - e2 = exp - 2 >> 0; - return [lower$1, central, upper, e2]; - } - }; - ryuDigits = function(d, lower$1, central, upper, c0, cup) { - var _q, _r, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, c0, central, chi, clo, cup, d, lhi, llo, lower$1, n, uhi, ulo, upper, v, v1, v2, x, x$1, x$2, x$3; - _tuple = divmod1e9(lower$1); - lhi = _tuple[0]; - llo = _tuple[1]; - _tuple$1 = divmod1e9(central); - chi = _tuple$1[0]; - clo = _tuple$1[1]; - _tuple$2 = divmod1e9(upper); - uhi = _tuple$2[0]; - ulo = _tuple$2[1]; - if (uhi === 0) { - ryuDigits32(d, llo, clo, ulo, c0, cup, 8); - } else if (lhi < uhi) { - if (!((llo === 0))) { - lhi = lhi + (1) >>> 0; - } - c0 = c0 && (clo === 0); - cup = (clo > 500000000) || ((clo === 500000000) && cup); - ryuDigits32(d, lhi, chi, uhi, c0, cup, 8); - d.dp = d.dp + (9) >> 0; - } else { - d.nd = 0; - n = 9; - v = chi; - while (true) { - if (!(v > 0)) { break; } - _tmp = (_q = v / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - _tmp$1 = (_r = v % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - v1 = _tmp; - v2 = _tmp$1; - v = v1; - n = n - (1) >>> 0; - (x = d.d, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n] = (((v2 + 48 >>> 0) << 24 >>> 24)))); - } - d.d = $subslice(d.d, n); - d.nd = (((9 - n >>> 0) >> 0)); - ryuDigits32(d, llo, clo, ulo, c0, cup, d.nd + 8 >> 0); - } - while (true) { - if (!(d.nd > 0 && ((x$1 = d.d, x$2 = d.nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])) === 48))) { break; } - d.nd = d.nd - (1) >> 0; - } - while (true) { - if (!(d.nd > 0 && ((x$3 = d.d, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) === 48))) { break; } - d.nd = d.nd - (1) >> 0; - d.dp = d.dp - (1) >> 0; - d.d = $subslice(d.d, 1); - } - }; - ryuDigits32 = function(d, lower$1, central, upper, c0, cup, endindex) { - var _q, _q$1, _q$2, _q$3, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, c, c0, cNextDigit, cdigit, central, cup, d, endindex, l, lower$1, n, trimmed, u, upper, v, v1, v2, x, x$1, x$2, x$3; - if (upper === 0) { - d.dp = endindex + 1 >> 0; - return; - } - trimmed = 0; - cNextDigit = 0; - while (true) { - if (!(upper > 0)) { break; } - l = (_q = ((lower$1 + 9 >>> 0)) / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - _tmp = (_q$1 = central / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); - _tmp$1 = (_r = central % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - c = _tmp; - cdigit = _tmp$1; - u = (_q$2 = upper / 10, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >>> 0 : $throwRuntimeError("integer divide by zero")); - if (l > u) { - break; - } - if ((l === (c + 1 >>> 0)) && c < u) { - c = c + (1) >>> 0; - cdigit = 0; - cup = false; - } - trimmed = trimmed + (1) >> 0; - c0 = c0 && (cNextDigit === 0); - cNextDigit = ((cdigit >> 0)); - _tmp$2 = l; - _tmp$3 = c; - _tmp$4 = u; - lower$1 = _tmp$2; - central = _tmp$3; - upper = _tmp$4; - } - if (trimmed > 0) { - cup = cNextDigit > 5 || ((cNextDigit === 5) && !c0) || ((cNextDigit === 5) && c0 && (((central & 1) >>> 0) === 1)); - } - if (central < upper && cup) { - central = central + (1) >>> 0; - } - endindex = endindex - (trimmed) >> 0; - v = central; - n = endindex; - while (true) { - if (!(n > d.nd)) { break; } - _tmp$5 = (_q$3 = v / 100, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >>> 0 : $throwRuntimeError("integer divide by zero")); - _tmp$6 = (_r$1 = v % 100, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); - v1 = _tmp$5; - v2 = _tmp$6; - (x = d.d, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((($imul(2, v2) >>> 0) + 1 >>> 0)))); - (x$1 = d.d, x$2 = n - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2] = "00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((($imul(2, v2) >>> 0) + 0 >>> 0)))); - n = n - (2) >> 0; - v = v1; - } - if (n === d.nd) { - (x$3 = d.d, ((n < 0 || n >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + n] = (((v + 48 >>> 0) << 24 >>> 24)))); - } - d.nd = endindex + 1 >> 0; - d.dp = d.nd + trimmed >> 0; - }; - mult64bitPow10 = function(m, e2, q) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e2, exact, hi, lo, m, pow, q, resE, resM, x, x$1, x$2, x$3, x$4; - resM = 0; - resE = 0; - exact = false; - if (q === 0) { - _tmp = m << 6 >>> 0; - _tmp$1 = e2 - 6 >> 0; - _tmp$2 = true; - resM = _tmp; - resE = _tmp$1; - exact = _tmp$2; - return [resM, resE, exact]; - } - if (q < -348 || 347 < q) { - $panic(new $String("mult64bitPow10: power of 10 is out of range")); - } - pow = (x = q - -348 >> 0, ((x < 0 || x >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x]))[1]; - if (q < 0) { - pow = (x$1 = new $Uint64(0, 1), new $Uint64(pow.$high + x$1.$high, pow.$low + x$1.$low)); - } - _tuple = bits.Mul64((new $Uint64(0, m)), pow); - hi = _tuple[0]; - lo = _tuple[1]; - e2 = e2 + (((mulByLog10Log2(q) - 63 >> 0) + 57 >> 0)) >> 0; - _tmp$3 = (((x$2 = $shiftLeft64(hi, 7), x$3 = $shiftRightUint64(lo, 57), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0)).$low >>> 0)); - _tmp$4 = e2; - _tmp$5 = (x$4 = $shiftLeft64(lo, 7), (x$4.$high === 0 && x$4.$low === 0)); - resM = _tmp$3; - resE = _tmp$4; - exact = _tmp$5; - return [resM, resE, exact]; - }; - mult128bitPow10 = function(m, e2, q) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, carry, e2, exact, h0, h1, l0, l1, m, mid, pow, q, resE, resM, x, x$1, x$2, x$3, x$4, x$5, x$6; - resM = new $Uint64(0, 0); - resE = 0; - exact = false; - if (q === 0) { - _tmp = $shiftLeft64(m, 8); - _tmp$1 = e2 - 8 >> 0; - _tmp$2 = true; - resM = _tmp; - resE = _tmp$1; - exact = _tmp$2; - return [resM, resE, exact]; - } - if (q < -348 || 347 < q) { - $panic(new $String("mult128bitPow10: power of 10 is out of range")); - } - pow = $clone((x = q - -348 >> 0, ((x < 0 || x >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x])), arrayType); - if (q < 0) { - pow[0] = (x$1 = pow[0], x$2 = new $Uint64(0, 1), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - } - e2 = e2 + (((mulByLog10Log2(q) - 127 >> 0) + 119 >> 0)) >> 0; - _tuple = bits.Mul64(m, pow[0]); - l1 = _tuple[0]; - l0 = _tuple[1]; - _tuple$1 = bits.Mul64(m, pow[1]); - h1 = _tuple$1[0]; - h0 = _tuple$1[1]; - _tuple$2 = bits.Add64(l1, h0, new $Uint64(0, 0)); - mid = _tuple$2[0]; - carry = _tuple$2[1]; - h1 = (x$3 = carry, new $Uint64(h1.$high + x$3.$high, h1.$low + x$3.$low)); - _tmp$3 = (x$4 = $shiftLeft64(h1, 9), x$5 = $shiftRightUint64(mid, 55), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0)); - _tmp$4 = e2; - _tmp$5 = (x$6 = $shiftLeft64(mid, 9), (x$6.$high === 0 && x$6.$low === 0)) && (l0.$high === 0 && l0.$low === 0); - resM = _tmp$3; - resE = _tmp$4; - exact = _tmp$5; - return [resM, resE, exact]; - }; - divisibleByPower5 = function(m, k) { - var i, k, m, x; - if ((m.$high === 0 && m.$low === 0)) { - return true; - } - i = 0; - while (true) { - if (!(i < k)) { break; } - if (!((x = $div64(m, new $Uint64(0, 5), true), (x.$high === 0 && x.$low === 0)))) { - return false; - } - m = $div64(m, (new $Uint64(0, 5)), false); - i = i + (1) >> 0; - } - return true; - }; - divmod1e9 = function(x) { - var _tuple, hi, q, x, x$1; - if (false) { - return [(($div64(x, new $Uint64(0, 1000000000), false).$low >>> 0)), (($div64(x, new $Uint64(0, 1000000000), true).$low >>> 0))]; - } - _tuple = bits.Mul64($shiftRightUint64(x, 1), new $Uint64(2305843009, 917808536)); - hi = _tuple[0]; - q = $shiftRightUint64(hi, 28); - return [((q.$low >>> 0)), (((x$1 = $mul64(q, new $Uint64(0, 1000000000)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)).$low >>> 0))]; - }; - FormatFloat = function(f, fmt, prec, bitSize) { - var bitSize, f, fmt, prec; - return ($bytesToString(genericFtoa($makeSlice(sliceType$6, 0, max(prec + 4 >> 0, 24)), f, fmt, prec, bitSize))); - }; - $pkg.FormatFloat = FormatFloat; - AppendFloat = function(dst, f, fmt, prec, bitSize) { - var bitSize, dst, f, fmt, prec; - return genericFtoa(dst, f, fmt, prec, bitSize); - }; - $pkg.AppendFloat = AppendFloat; - genericFtoa = function(dst, val, fmt, prec, bitSize) { - var _1, _2, _3, _4, bitSize, bits$1, buf, buf$1, digits, digs, dst, exp, flt, fmt, mant, neg, ok, prec, s, shortest, val, x, x$1, x$2, x$3, y, y$1; - bits$1 = new $Uint64(0, 0); - flt = ptrType.nil; - _1 = bitSize; - if (_1 === (32)) { - bits$1 = (new $Uint64(0, math.Float32bits(($fround(val))))); - flt = float32info; - } else if (_1 === (64)) { - bits$1 = math.Float64bits(val); - flt = float64info; - } else { - $panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize")); - } - neg = !((x = $shiftRightUint64(bits$1, ((flt.expbits + flt.mantbits >>> 0))), (x.$high === 0 && x.$low === 0))); - exp = (($shiftRightUint64(bits$1, flt.mantbits).$low >> 0)) & ((((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)); - mant = (x$1 = (x$2 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$2.$high - 0, x$2.$low - 1)), new $Uint64(bits$1.$high & x$1.$high, (bits$1.$low & x$1.$low) >>> 0)); - _2 = exp; - if (_2 === ((((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0))) { - s = ""; - if (!((mant.$high === 0 && mant.$low === 0))) { - s = "NaN"; - } else if (neg) { - s = "-Inf"; - } else { - s = "+Inf"; - } - return $appendSlice(dst, s); - } else if (_2 === (0)) { - exp = exp + (1) >> 0; - } else { - mant = (x$3 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high | x$3.$high, (mant.$low | x$3.$low) >>> 0)); - } - exp = exp + (flt.bias) >> 0; - if (fmt === 98) { - return fmtB(dst, neg, mant, exp, flt); - } - if ((fmt === 120) || (fmt === 88)) { - return fmtX(dst, prec, fmt, neg, mant, exp, flt); - } - if (!optimize) { - return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); - } - digs = new decimalSlice.ptr(sliceType$6.nil, 0, 0, false); - ok = false; - shortest = prec < 0; - if (shortest) { - buf = arrayType$3.zero(); - digs.d = new sliceType$6(buf); - ryuFtoaShortest(digs, mant, exp - ((flt.mantbits >> 0)) >> 0, flt); - ok = true; - _3 = fmt; - if ((_3 === (101)) || (_3 === (69))) { - prec = max(digs.nd - 1 >> 0, 0); - } else if (_3 === (102)) { - prec = max(digs.nd - digs.dp >> 0, 0); - } else if ((_3 === (103)) || (_3 === (71))) { - prec = digs.nd; - } - } else if (!((fmt === 102))) { - digits = prec; - _4 = fmt; - if ((_4 === (101)) || (_4 === (69))) { - digits = digits + (1) >> 0; - } else if ((_4 === (103)) || (_4 === (71))) { - if (prec === 0) { - prec = 1; - } - digits = prec; - } - buf$1 = arrayType$4.zero(); - if ((bitSize === 32) && digits <= 9) { - digs.d = new sliceType$6(buf$1); - ryuFtoaFixed32(digs, ((mant.$low >>> 0)), exp - ((flt.mantbits >> 0)) >> 0, digits); - ok = true; - } else if (digits <= 18) { - digs.d = new sliceType$6(buf$1); - ryuFtoaFixed64(digs, mant, exp - ((flt.mantbits >> 0)) >> 0, digits); - ok = true; - } - } - if (!ok) { - return bigFtoa(dst, prec, fmt, neg, mant, exp, flt); - } - return formatDigits(dst, shortest, neg, $clone(digs, decimalSlice), prec, fmt); - }; - bigFtoa = function(dst, prec, fmt, neg, mant, exp, flt) { - var _1, _2, d, digs, dst, exp, flt, fmt, mant, neg, prec, shortest; - d = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false); - d.Assign(mant); - d.Shift(exp - ((flt.mantbits >> 0)) >> 0); - digs = new decimalSlice.ptr(sliceType$6.nil, 0, 0, false); - shortest = prec < 0; - if (shortest) { - roundShortest(d, mant, exp, flt); - decimalSlice.copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false)); - _1 = fmt; - if ((_1 === (101)) || (_1 === (69))) { - prec = digs.nd - 1 >> 0; - } else if (_1 === (102)) { - prec = max(digs.nd - digs.dp >> 0, 0); - } else if ((_1 === (103)) || (_1 === (71))) { - prec = digs.nd; - } - } else { - _2 = fmt; - if ((_2 === (101)) || (_2 === (69))) { - d.Round(prec + 1 >> 0); - } else if (_2 === (102)) { - d.Round(d.dp + prec >> 0); - } else if ((_2 === (103)) || (_2 === (71))) { - if (prec === 0) { - prec = 1; - } - d.Round(prec); - } - decimalSlice.copy(digs, new decimalSlice.ptr(new sliceType$6(d.d), d.nd, d.dp, false)); - } - return formatDigits(dst, shortest, neg, $clone(digs, decimalSlice), prec, fmt); - }; - formatDigits = function(dst, shortest, neg, digs, prec, fmt) { - var _1, digs, dst, eprec, exp, fmt, neg, prec, shortest; - _1 = fmt; - if ((_1 === (101)) || (_1 === (69))) { - return fmtE(dst, neg, $clone(digs, decimalSlice), prec, fmt); - } else if (_1 === (102)) { - return fmtF(dst, neg, $clone(digs, decimalSlice), prec); - } else if ((_1 === (103)) || (_1 === (71))) { - eprec = prec; - if (eprec > digs.nd && digs.nd >= digs.dp) { - eprec = digs.nd; - } - if (shortest) { - eprec = 6; - } - exp = digs.dp - 1 >> 0; - if (exp < -4 || exp >= eprec) { - if (prec > digs.nd) { - prec = digs.nd; - } - return fmtE(dst, neg, $clone(digs, decimalSlice), prec - 1 >> 0, (fmt + 101 << 24 >>> 24) - 103 << 24 >>> 24); - } - if (prec > digs.dp) { - prec = digs.nd; - } - return fmtF(dst, neg, $clone(digs, decimalSlice), max(prec - digs.dp >> 0, 0)); - } - return $append(dst, 37, fmt); - }; - roundShortest = function(d, mant, exp, flt) { - var d, exp, explo, flt, inclusive, l, li, lower$1, m, mant, mantlo, mi, minexp, okdown, okup, u, ui, upper, upperdelta, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; - if ((mant.$high === 0 && mant.$low === 0)) { - d.nd = 0; - return; - } - minexp = flt.bias + 1 >> 0; - if (exp > minexp && ($imul(332, ((d.dp - d.nd >> 0)))) >= ($imul(100, ((exp - ((flt.mantbits >> 0)) >> 0))))) { - return; - } - upper = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false); - upper.Assign((x = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x.$high + 0, x.$low + 1))); - upper.Shift((exp - ((flt.mantbits >> 0)) >> 0) - 1 >> 0); - mantlo = new $Uint64(0, 0); - explo = 0; - if ((x$1 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), (mant.$high > x$1.$high || (mant.$high === x$1.$high && mant.$low > x$1.$low))) || (exp === minexp)) { - mantlo = new $Uint64(mant.$high - 0, mant.$low - 1); - explo = exp; - } else { - mantlo = (x$2 = $mul64(mant, new $Uint64(0, 2)), new $Uint64(x$2.$high - 0, x$2.$low - 1)); - explo = exp - 1 >> 0; - } - lower$1 = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false); - lower$1.Assign((x$3 = $mul64(mantlo, new $Uint64(0, 2)), new $Uint64(x$3.$high + 0, x$3.$low + 1))); - lower$1.Shift((explo - ((flt.mantbits >> 0)) >> 0) - 1 >> 0); - inclusive = (x$4 = $div64(mant, new $Uint64(0, 2), true), (x$4.$high === 0 && x$4.$low === 0)); - upperdelta = 0; - ui = 0; - while (true) { - mi = (ui - upper.dp >> 0) + d.dp >> 0; - if (mi >= d.nd) { - break; - } - li = (ui - upper.dp >> 0) + lower$1.dp >> 0; - l = 48; - if (li >= 0 && li < lower$1.nd) { - l = (x$5 = lower$1.d, ((li < 0 || li >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[li])); - } - m = 48; - if (mi >= 0) { - m = (x$6 = d.d, ((mi < 0 || mi >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[mi])); - } - u = 48; - if (ui < upper.nd) { - u = (x$7 = upper.d, ((ui < 0 || ui >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[ui])); - } - okdown = !((l === m)) || inclusive && ((li + 1 >> 0) === lower$1.nd); - if ((upperdelta === 0) && (m + 1 << 24 >>> 24) < u) { - upperdelta = 2; - } else if ((upperdelta === 0) && !((m === u))) { - upperdelta = 1; - } else if ((upperdelta === 1) && (!((m === 57)) || !((u === 48)))) { - upperdelta = 2; - } - okup = upperdelta > 0 && (inclusive || upperdelta > 1 || (ui + 1 >> 0) < upper.nd); - if (okdown && okup) { - d.Round(mi + 1 >> 0); - return; - } else if (okdown) { - d.RoundDown(mi + 1 >> 0); - return; - } else if (okup) { - d.RoundUp(mi + 1 >> 0); - return; - } - ui = ui + (1) >> 0; - } - }; - fmtE = function(dst, neg, d, prec, fmt) { - var _q, _q$1, _q$2, _r, _r$1, _r$2, ch, d, dst, exp, fmt, i, m, neg, prec, x; - if (neg) { - dst = $append(dst, 45); - } - ch = 48; - if (!((d.nd === 0))) { - ch = (x = d.d, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - } - dst = $append(dst, ch); - if (prec > 0) { - dst = $append(dst, 46); - i = 1; - m = min(d.nd, prec + 1 >> 0); - if (i < m) { - dst = $appendSlice(dst, $subslice(d.d, i, m)); - i = m; - } - while (true) { - if (!(i <= prec)) { break; } - dst = $append(dst, 48); - i = i + (1) >> 0; - } - } - dst = $append(dst, fmt); - exp = d.dp - 1 >> 0; - if (d.nd === 0) { - exp = 0; - } - if (exp < 0) { - ch = 45; - exp = -exp; - } else { - ch = 43; - } - dst = $append(dst, ch); - if (exp < 10) { - dst = $append(dst, 48, ((exp << 24 >>> 24)) + 48 << 24 >>> 24); - } else if (exp < 100) { - dst = $append(dst, (((_q = exp / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24); - } else { - dst = $append(dst, (((_q$1 = exp / 100, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (_r$1 = (((_q$2 = exp / 10, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24, (((_r$2 = exp % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24); - } - return dst; - }; - fmtF = function(dst, neg, d, prec) { - var ch, d, dst, i, j, m, neg, prec, x; - if (neg) { - dst = $append(dst, 45); - } - if (d.dp > 0) { - m = min(d.nd, d.dp); - dst = $appendSlice(dst, $subslice(d.d, 0, m)); - while (true) { - if (!(m < d.dp)) { break; } - dst = $append(dst, 48); - m = m + (1) >> 0; - } - } else { - dst = $append(dst, 48); - } - if (prec > 0) { - dst = $append(dst, 46); - i = 0; - while (true) { - if (!(i < prec)) { break; } - ch = 48; - j = d.dp + i >> 0; - if (0 <= j && j < d.nd) { - ch = (x = d.d, ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j])); - } - dst = $append(dst, ch); - i = i + (1) >> 0; - } - } - return dst; - }; - fmtB = function(dst, neg, mant, exp, flt) { - var _tuple, _tuple$1, dst, exp, flt, mant, neg; - if (neg) { - dst = $append(dst, 45); - } - _tuple = formatBits(dst, mant, 10, false, true); - dst = _tuple[0]; - dst = $append(dst, 112); - exp = exp - (((flt.mantbits >> 0))) >> 0; - if (exp >= 0) { - dst = $append(dst, 43); - } - _tuple$1 = formatBits(dst, (new $Uint64(0, exp)), 10, exp < 0, true); - dst = _tuple$1[0]; - return dst; - }; - fmtX = function(dst, prec, fmt, neg, mant, exp, flt) { - var _q, _q$1, _q$2, _q$3, _q$4, _q$5, _r, _r$1, _r$2, _r$3, _r$4, _r$5, ch, dst, exp, extra, flt, fmt, hex, i, mant, neg, prec, shift, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; - if ((mant.$high === 0 && mant.$low === 0)) { - exp = 0; - } - mant = $shiftLeft64(mant, ((60 - flt.mantbits >>> 0))); - while (true) { - if (!(!((mant.$high === 0 && mant.$low === 0)) && (x = new $Uint64(mant.$high & 268435456, (mant.$low & 0) >>> 0), (x.$high === 0 && x.$low === 0)))) { break; } - mant = $shiftLeft64(mant, (1)); - exp = exp - (1) >> 0; - } - if (prec >= 0 && prec < 15) { - shift = ((($imul(prec, 4)) >>> 0)); - extra = (x$1 = $shiftLeft64(mant, shift), new $Uint64(x$1.$high & 268435455, (x$1.$low & 4294967295) >>> 0)); - mant = $shiftRightUint64(mant, ((60 - shift >>> 0))); - if ((x$2 = (x$3 = new $Uint64(mant.$high & 0, (mant.$low & 1) >>> 0), new $Uint64(extra.$high | x$3.$high, (extra.$low | x$3.$low) >>> 0)), (x$2.$high > 134217728 || (x$2.$high === 134217728 && x$2.$low > 0)))) { - mant = (x$4 = new $Uint64(0, 1), new $Uint64(mant.$high + x$4.$high, mant.$low + x$4.$low)); - } - mant = $shiftLeft64(mant, ((60 - shift >>> 0))); - if (!((x$5 = new $Uint64(mant.$high & 536870912, (mant.$low & 0) >>> 0), (x$5.$high === 0 && x$5.$low === 0)))) { - mant = $shiftRightUint64(mant, (1)); - exp = exp + (1) >> 0; - } - } - hex = "0123456789abcdef"; - if (fmt === 88) { - hex = "0123456789ABCDEF"; - } - if (neg) { - dst = $append(dst, 45); - } - dst = $append(dst, 48, fmt, 48 + (((x$6 = $shiftRightUint64(mant, 60), new $Uint64(x$6.$high & 0, (x$6.$low & 1) >>> 0)).$low << 24 >>> 24)) << 24 >>> 24); - mant = $shiftLeft64(mant, (4)); - if (prec < 0 && !((mant.$high === 0 && mant.$low === 0))) { - dst = $append(dst, 46); - while (true) { - if (!(!((mant.$high === 0 && mant.$low === 0)))) { break; } - dst = $append(dst, hex.charCodeAt($flatten64((x$7 = $shiftRightUint64(mant, 60), new $Uint64(x$7.$high & 0, (x$7.$low & 15) >>> 0))))); - mant = $shiftLeft64(mant, (4)); - } - } else if (prec > 0) { - dst = $append(dst, 46); - i = 0; - while (true) { - if (!(i < prec)) { break; } - dst = $append(dst, hex.charCodeAt($flatten64((x$8 = $shiftRightUint64(mant, 60), new $Uint64(x$8.$high & 0, (x$8.$low & 15) >>> 0))))); - mant = $shiftLeft64(mant, (4)); - i = i + (1) >> 0; - } - } - ch = 80; - if (fmt === lower(fmt)) { - ch = 112; - } - dst = $append(dst, ch); - if (exp < 0) { - ch = 45; - exp = -exp; - } else { - ch = 43; - } - dst = $append(dst, ch); - if (exp < 100) { - dst = $append(dst, (((_q = exp / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r = exp % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24); - } else if (exp < 1000) { - dst = $append(dst, (((_q$1 = exp / 100, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r$1 = ((_q$2 = exp / 10, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r$2 = exp % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24); - } else { - dst = $append(dst, (((_q$3 = exp / 1000, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (_r$3 = (((_q$4 = exp / 100, (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) % 10, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24, (((_r$4 = ((_q$5 = exp / 10, (_q$5 === _q$5 && _q$5 !== 1/0 && _q$5 !== -1/0) ? _q$5 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24, (((_r$5 = exp % 10, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) + 48 << 24 >>> 24); - } - return dst; - }; - min = function(a, b) { - var a, b; - if (a < b) { - return a; - } - return b; - }; - max = function(a, b) { - var a, b; - if (a > b) { - return a; - } - return b; - }; - eiselLemire64 = function(man, exp10, neg) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, clz, exp10, f, man, mergedHi, mergedLo, msb, neg, ok, retBits, retExp2, retMantissa, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xHi, xLo, yHi, yLo; - f = 0; - ok = false; - if ((man.$high === 0 && man.$low === 0)) { - if (neg) { - f = math.Float64frombits(new $Uint64(2147483648, 0)); - } - _tmp = f; - _tmp$1 = true; - f = _tmp; - ok = _tmp$1; - return [f, ok]; - } - if (exp10 < -348 || 347 < exp10) { - _tmp$2 = 0; - _tmp$3 = false; - f = _tmp$2; - ok = _tmp$3; - return [f, ok]; - } - clz = bits.LeadingZeros64(man); - man = $shiftLeft64(man, (((clz >>> 0)))); - retExp2 = (x = (new $Uint64(0, (((($imul(217706, exp10)) >> 16 >> 0) + 64 >> 0) + 1023 >> 0))), x$1 = (new $Uint64(0, clz)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)); - _tuple = bits.Mul64(man, (x$2 = exp10 - -348 >> 0, ((x$2 < 0 || x$2 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$2]))[1]); - xHi = _tuple[0]; - xLo = _tuple[1]; - if ((x$3 = new $Uint64(xHi.$high & 0, (xHi.$low & 511) >>> 0), (x$3.$high === 0 && x$3.$low === 511)) && (x$4 = new $Uint64(xLo.$high + man.$high, xLo.$low + man.$low), (x$4.$high < man.$high || (x$4.$high === man.$high && x$4.$low < man.$low)))) { - _tuple$1 = bits.Mul64(man, (x$5 = exp10 - -348 >> 0, ((x$5 < 0 || x$5 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$5]))[0]); - yHi = _tuple$1[0]; - yLo = _tuple$1[1]; - _tmp$4 = xHi; - _tmp$5 = new $Uint64(xLo.$high + yHi.$high, xLo.$low + yHi.$low); - mergedHi = _tmp$4; - mergedLo = _tmp$5; - if ((mergedLo.$high < xLo.$high || (mergedLo.$high === xLo.$high && mergedLo.$low < xLo.$low))) { - mergedHi = (x$6 = new $Uint64(0, 1), new $Uint64(mergedHi.$high + x$6.$high, mergedHi.$low + x$6.$low)); - } - if ((x$7 = new $Uint64(mergedHi.$high & 0, (mergedHi.$low & 511) >>> 0), (x$7.$high === 0 && x$7.$low === 511)) && (x$8 = new $Uint64(mergedLo.$high + 0, mergedLo.$low + 1), (x$8.$high === 0 && x$8.$low === 0)) && (x$9 = new $Uint64(yLo.$high + man.$high, yLo.$low + man.$low), (x$9.$high < man.$high || (x$9.$high === man.$high && x$9.$low < man.$low)))) { - _tmp$6 = 0; - _tmp$7 = false; - f = _tmp$6; - ok = _tmp$7; - return [f, ok]; - } - _tmp$8 = mergedHi; - _tmp$9 = mergedLo; - xHi = _tmp$8; - xLo = _tmp$9; - } - msb = $shiftRightUint64(xHi, 63); - retMantissa = $shiftRightUint64(xHi, $flatten64((new $Uint64(msb.$high + 0, msb.$low + 9)))); - retExp2 = (x$10 = new $Uint64(0 ^ msb.$high, (1 ^ msb.$low) >>> 0), new $Uint64(retExp2.$high - x$10.$high, retExp2.$low - x$10.$low)); - if ((xLo.$high === 0 && xLo.$low === 0) && (x$11 = new $Uint64(xHi.$high & 0, (xHi.$low & 511) >>> 0), (x$11.$high === 0 && x$11.$low === 0)) && (x$12 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 3) >>> 0), (x$12.$high === 0 && x$12.$low === 1))) { - _tmp$10 = 0; - _tmp$11 = false; - f = _tmp$10; - ok = _tmp$11; - return [f, ok]; - } - retMantissa = (x$13 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 1) >>> 0), new $Uint64(retMantissa.$high + x$13.$high, retMantissa.$low + x$13.$low)); - retMantissa = $shiftRightUint64(retMantissa, (1)); - if ((x$14 = $shiftRightUint64(retMantissa, 53), (x$14.$high > 0 || (x$14.$high === 0 && x$14.$low > 0)))) { - retMantissa = $shiftRightUint64(retMantissa, (1)); - retExp2 = (x$15 = new $Uint64(0, 1), new $Uint64(retExp2.$high + x$15.$high, retExp2.$low + x$15.$low)); - } - if ((x$16 = new $Uint64(retExp2.$high - 0, retExp2.$low - 1), (x$16.$high > 0 || (x$16.$high === 0 && x$16.$low >= 2046)))) { - _tmp$12 = 0; - _tmp$13 = false; - f = _tmp$12; - ok = _tmp$13; - return [f, ok]; - } - retBits = (x$17 = $shiftLeft64(retExp2, 52), x$18 = new $Uint64(retMantissa.$high & 1048575, (retMantissa.$low & 4294967295) >>> 0), new $Uint64(x$17.$high | x$18.$high, (x$17.$low | x$18.$low) >>> 0)); - if (neg) { - retBits = (x$19 = new $Uint64(2147483648, 0), new $Uint64(retBits.$high | x$19.$high, (retBits.$low | x$19.$low) >>> 0)); - } - _tmp$14 = math.Float64frombits(retBits); - _tmp$15 = true; - f = _tmp$14; - ok = _tmp$15; - return [f, ok]; - }; - eiselLemire32 = function(man, exp10, neg) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, clz, exp10, f, man, mergedHi, mergedLo, msb, neg, ok, retBits, retExp2, retMantissa, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xHi, xLo, yHi, yLo; - f = 0; - ok = false; - if ((man.$high === 0 && man.$low === 0)) { - if (neg) { - f = math.Float32frombits(2147483648); - } - _tmp = f; - _tmp$1 = true; - f = _tmp; - ok = _tmp$1; - return [f, ok]; - } - if (exp10 < -348 || 347 < exp10) { - _tmp$2 = 0; - _tmp$3 = false; - f = _tmp$2; - ok = _tmp$3; - return [f, ok]; - } - clz = bits.LeadingZeros64(man); - man = $shiftLeft64(man, (((clz >>> 0)))); - retExp2 = (x = (new $Uint64(0, (((($imul(217706, exp10)) >> 16 >> 0) + 64 >> 0) + 127 >> 0))), x$1 = (new $Uint64(0, clz)), new $Uint64(x.$high - x$1.$high, x.$low - x$1.$low)); - _tuple = bits.Mul64(man, (x$2 = exp10 - -348 >> 0, ((x$2 < 0 || x$2 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$2]))[1]); - xHi = _tuple[0]; - xLo = _tuple[1]; - if ((x$3 = new $Uint64(xHi.$high & 63, (xHi.$low & 4294967295) >>> 0), (x$3.$high === 63 && x$3.$low === 4294967295)) && (x$4 = new $Uint64(xLo.$high + man.$high, xLo.$low + man.$low), (x$4.$high < man.$high || (x$4.$high === man.$high && x$4.$low < man.$low)))) { - _tuple$1 = bits.Mul64(man, (x$5 = exp10 - -348 >> 0, ((x$5 < 0 || x$5 >= detailedPowersOfTen.length) ? ($throwRuntimeError("index out of range"), undefined) : detailedPowersOfTen[x$5]))[0]); - yHi = _tuple$1[0]; - yLo = _tuple$1[1]; - _tmp$4 = xHi; - _tmp$5 = new $Uint64(xLo.$high + yHi.$high, xLo.$low + yHi.$low); - mergedHi = _tmp$4; - mergedLo = _tmp$5; - if ((mergedLo.$high < xLo.$high || (mergedLo.$high === xLo.$high && mergedLo.$low < xLo.$low))) { - mergedHi = (x$6 = new $Uint64(0, 1), new $Uint64(mergedHi.$high + x$6.$high, mergedHi.$low + x$6.$low)); - } - if ((x$7 = new $Uint64(mergedHi.$high & 63, (mergedHi.$low & 4294967295) >>> 0), (x$7.$high === 63 && x$7.$low === 4294967295)) && (x$8 = new $Uint64(mergedLo.$high + 0, mergedLo.$low + 1), (x$8.$high === 0 && x$8.$low === 0)) && (x$9 = new $Uint64(yLo.$high + man.$high, yLo.$low + man.$low), (x$9.$high < man.$high || (x$9.$high === man.$high && x$9.$low < man.$low)))) { - _tmp$6 = 0; - _tmp$7 = false; - f = _tmp$6; - ok = _tmp$7; - return [f, ok]; - } - _tmp$8 = mergedHi; - _tmp$9 = mergedLo; - xHi = _tmp$8; - xLo = _tmp$9; - } - msb = $shiftRightUint64(xHi, 63); - retMantissa = $shiftRightUint64(xHi, $flatten64((new $Uint64(msb.$high + 0, msb.$low + 38)))); - retExp2 = (x$10 = new $Uint64(0 ^ msb.$high, (1 ^ msb.$low) >>> 0), new $Uint64(retExp2.$high - x$10.$high, retExp2.$low - x$10.$low)); - if ((xLo.$high === 0 && xLo.$low === 0) && (x$11 = new $Uint64(xHi.$high & 63, (xHi.$low & 4294967295) >>> 0), (x$11.$high === 0 && x$11.$low === 0)) && (x$12 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 3) >>> 0), (x$12.$high === 0 && x$12.$low === 1))) { - _tmp$10 = 0; - _tmp$11 = false; - f = _tmp$10; - ok = _tmp$11; - return [f, ok]; - } - retMantissa = (x$13 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 1) >>> 0), new $Uint64(retMantissa.$high + x$13.$high, retMantissa.$low + x$13.$low)); - retMantissa = $shiftRightUint64(retMantissa, (1)); - if ((x$14 = $shiftRightUint64(retMantissa, 24), (x$14.$high > 0 || (x$14.$high === 0 && x$14.$low > 0)))) { - retMantissa = $shiftRightUint64(retMantissa, (1)); - retExp2 = (x$15 = new $Uint64(0, 1), new $Uint64(retExp2.$high + x$15.$high, retExp2.$low + x$15.$low)); - } - if ((x$16 = new $Uint64(retExp2.$high - 0, retExp2.$low - 1), (x$16.$high > 0 || (x$16.$high === 0 && x$16.$low >= 254)))) { - _tmp$12 = 0; - _tmp$13 = false; - f = _tmp$12; - ok = _tmp$13; - return [f, ok]; - } - retBits = (x$17 = $shiftLeft64(retExp2, 23), x$18 = new $Uint64(retMantissa.$high & 0, (retMantissa.$low & 8388607) >>> 0), new $Uint64(x$17.$high | x$18.$high, (x$17.$low | x$18.$low) >>> 0)); - if (neg) { - retBits = (x$19 = new $Uint64(0, 2147483648), new $Uint64(retBits.$high | x$19.$high, (retBits.$low | x$19.$low) >>> 0)); - } - _tmp$14 = math.Float32frombits(((retBits.$low >>> 0))); - _tmp$15 = true; - f = _tmp$14; - ok = _tmp$15; - return [f, ok]; - }; - decimal.ptr.prototype.String = function() { - var a, buf, n, w; - a = this; - n = 10 + a.nd >> 0; - if (a.dp > 0) { - n = n + (a.dp) >> 0; - } - if (a.dp < 0) { - n = n + (-a.dp) >> 0; - } - buf = $makeSlice(sliceType$6, n); - w = 0; - if ((a.nd === 0)) { - return "0"; - } else if (a.dp <= 0) { - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 48); - w = w + (1) >> 0; - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 46); - w = w + (1) >> 0; - w = w + (digitZero($subslice(buf, w, (w + -a.dp >> 0)))) >> 0; - w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; - } else if (a.dp < a.nd) { - w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.dp))) >> 0; - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 46); - w = w + (1) >> 0; - w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), a.dp, a.nd))) >> 0; - } else { - w = w + ($copySlice($subslice(buf, w), $subslice(new sliceType$6(a.d), 0, a.nd))) >> 0; - w = w + (digitZero($subslice(buf, w, ((w + a.dp >> 0) - a.nd >> 0)))) >> 0; - } - return ($bytesToString($subslice(buf, 0, w))); - }; - decimal.prototype.String = function() { return this.$val.String(); }; - digitZero = function(dst) { - var _i, _ref, dst, i; - _ref = dst; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = 48); - _i++; - } - return dst.$length; - }; - trim = function(a) { - var a, x, x$1; - while (true) { - if (!(a.nd > 0 && ((x = a.d, x$1 = a.nd - 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) === 48))) { break; } - a.nd = a.nd - (1) >> 0; - } - if (a.nd === 0) { - a.dp = 0; - } - }; - decimal.ptr.prototype.Assign = function(v) { - var a, buf, n, v, v1, x, x$1, x$2; - a = this; - buf = arrayType$4.zero(); - n = 0; - while (true) { - if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } - v1 = $div64(v, new $Uint64(0, 10), false); - v = (x = $mul64(new $Uint64(0, 10), v1), new $Uint64(v.$high - x.$high, v.$low - x.$low)); - ((n < 0 || n >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[n] = ((new $Uint64(v.$high + 0, v.$low + 48).$low << 24 >>> 24))); - n = n + (1) >> 0; - v = v1; - } - a.nd = 0; - n = n - (1) >> 0; - while (true) { - if (!(n >= 0)) { break; } - (x$1 = a.d, x$2 = a.nd, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2] = ((n < 0 || n >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[n]))); - a.nd = a.nd + (1) >> 0; - n = n - (1) >> 0; - } - a.dp = a.nd; - trim(a); - }; - decimal.prototype.Assign = function(v) { return this.$val.Assign(v); }; - rightShift = function(a, k) { - var a, c, c$1, dig, dig$1, k, mask, n, r, w, x, x$1, x$2, x$3, y, y$1, y$2, y$3, y$4; - r = 0; - w = 0; - n = 0; - while (true) { - if (!(((y = k, y < 32 ? (n >>> y) : 0) >>> 0) === 0)) { break; } - if (r >= a.nd) { - if (n === 0) { - a.nd = 0; - return; - } - while (true) { - if (!(((y$1 = k, y$1 < 32 ? (n >>> y$1) : 0) >>> 0) === 0)) { break; } - n = n * 10 >>> 0; - r = r + (1) >> 0; - } - break; - } - c = (((x = a.d, ((r < 0 || r >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[r])) >>> 0)); - n = ((n * 10 >>> 0) + c >>> 0) - 48 >>> 0; - r = r + (1) >> 0; - } - a.dp = a.dp - ((r - 1 >> 0)) >> 0; - mask = (((y$2 = k, y$2 < 32 ? (1 << y$2) : 0) >>> 0)) - 1 >>> 0; - while (true) { - if (!(r < a.nd)) { break; } - c$1 = (((x$1 = a.d, ((r < 0 || r >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[r])) >>> 0)); - dig = (y$3 = k, y$3 < 32 ? (n >>> y$3) : 0) >>> 0; - n = (n & (mask)) >>> 0; - (x$2 = a.d, ((w < 0 || w >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[w] = (((dig + 48 >>> 0) << 24 >>> 24)))); - w = w + (1) >> 0; - n = ((n * 10 >>> 0) + c$1 >>> 0) - 48 >>> 0; - r = r + (1) >> 0; - } - while (true) { - if (!(n > 0)) { break; } - dig$1 = (y$4 = k, y$4 < 32 ? (n >>> y$4) : 0) >>> 0; - n = (n & (mask)) >>> 0; - if (w < 800) { - (x$3 = a.d, ((w < 0 || w >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[w] = (((dig$1 + 48 >>> 0) << 24 >>> 24)))); - w = w + (1) >> 0; - } else if (dig$1 > 0) { - a.trunc = true; - } - n = n * 10 >>> 0; - } - a.nd = w; - trim(a); - }; - prefixIsLessThan = function(b, s) { - var b, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (i >= b.$length) { - return true; - } - if (!((((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]) === s.charCodeAt(i)))) { - return ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]) < s.charCodeAt(i); - } - i = i + (1) >> 0; - } - return false; - }; - leftShift = function(a, k) { - var _q, _q$1, a, delta, k, n, quo, quo$1, r, rem, rem$1, w, x, x$1, x$2, y; - delta = ((k < 0 || k >= leftcheats.$length) ? ($throwRuntimeError("index out of range"), undefined) : leftcheats.$array[leftcheats.$offset + k]).delta; - if (prefixIsLessThan($subslice(new sliceType$6(a.d), 0, a.nd), ((k < 0 || k >= leftcheats.$length) ? ($throwRuntimeError("index out of range"), undefined) : leftcheats.$array[leftcheats.$offset + k]).cutoff)) { - delta = delta - (1) >> 0; - } - r = a.nd; - w = a.nd + delta >> 0; - n = 0; - r = r - (1) >> 0; - while (true) { - if (!(r >= 0)) { break; } - n = n + (((y = k, y < 32 ? ((((((x = a.d, ((r < 0 || r >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[r])) >>> 0)) - 48 >>> 0)) << y) : 0) >>> 0)) >>> 0; - quo = (_q = n / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - rem = n - (10 * quo >>> 0) >>> 0; - w = w - (1) >> 0; - if (w < 800) { - (x$1 = a.d, ((w < 0 || w >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[w] = (((rem + 48 >>> 0) << 24 >>> 24)))); - } else if (!((rem === 0))) { - a.trunc = true; - } - n = quo; - r = r - (1) >> 0; - } - while (true) { - if (!(n > 0)) { break; } - quo$1 = (_q$1 = n / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); - rem$1 = n - (10 * quo$1 >>> 0) >>> 0; - w = w - (1) >> 0; - if (w < 800) { - (x$2 = a.d, ((w < 0 || w >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[w] = (((rem$1 + 48 >>> 0) << 24 >>> 24)))); - } else if (!((rem$1 === 0))) { - a.trunc = true; - } - n = quo$1; - } - a.nd = a.nd + (delta) >> 0; - if (a.nd >= 800) { - a.nd = 800; - } - a.dp = a.dp + (delta) >> 0; - trim(a); - }; - decimal.ptr.prototype.Shift = function(k) { - var a, k; - a = this; - if ((a.nd === 0)) { - } else if (k > 0) { - while (true) { - if (!(k > 28)) { break; } - leftShift(a, 28); - k = k - (28) >> 0; - } - leftShift(a, ((k >>> 0))); - } else if (k < 0) { - while (true) { - if (!(k < -28)) { break; } - rightShift(a, 28); - k = k + (28) >> 0; - } - rightShift(a, ((-k >>> 0))); - } - }; - decimal.prototype.Shift = function(k) { return this.$val.Shift(k); }; - shouldRoundUp = function(a, nd) { - var _r, a, nd, x, x$1, x$2, x$3; - if (nd < 0 || nd >= a.nd) { - return false; - } - if (((x = a.d, ((nd < 0 || nd >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[nd])) === 53) && ((nd + 1 >> 0) === a.nd)) { - if (a.trunc) { - return true; - } - return nd > 0 && !(((_r = (((x$1 = a.d, x$2 = nd - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])) - 48 << 24 >>> 24)) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0)); - } - return (x$3 = a.d, ((nd < 0 || nd >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[nd])) >= 53; - }; - decimal.ptr.prototype.Round = function(nd) { - var a, nd; - a = this; - if (nd < 0 || nd >= a.nd) { - return; - } - if (shouldRoundUp(a, nd)) { - a.RoundUp(nd); - } else { - a.RoundDown(nd); - } - }; - decimal.prototype.Round = function(nd) { return this.$val.Round(nd); }; - decimal.ptr.prototype.RoundDown = function(nd) { - var a, nd; - a = this; - if (nd < 0 || nd >= a.nd) { - return; - } - a.nd = nd; - trim(a); - }; - decimal.prototype.RoundDown = function(nd) { return this.$val.RoundDown(nd); }; - decimal.ptr.prototype.RoundUp = function(nd) { - var a, c, i, nd, x, x$1, x$2; - a = this; - if (nd < 0 || nd >= a.nd) { - return; - } - i = nd - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - c = (x = a.d, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])); - if (c < 57) { - (x$2 = a.d, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i] = ((x$1 = a.d, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) + (1) << 24 >>> 24))); - a.nd = i + 1 >> 0; - return; - } - i = i - (1) >> 0; - } - a.d[0] = 49; - a.nd = 1; - a.dp = a.dp + (1) >> 0; - }; - decimal.prototype.RoundUp = function(nd) { return this.$val.RoundUp(nd); }; - decimal.ptr.prototype.RoundedInteger = function() { - var a, i, n, x, x$1, x$2, x$3; - a = this; - if (a.dp > 20) { - return new $Uint64(4294967295, 4294967295); - } - i = 0; - n = new $Uint64(0, 0); - i = 0; - while (true) { - if (!(i < a.dp && i < a.nd)) { break; } - n = (x = $mul64(n, new $Uint64(0, 10)), x$1 = (new $Uint64(0, ((x$2 = a.d, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) - 48 << 24 >>> 24))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - i = i + (1) >> 0; - } - while (true) { - if (!(i < a.dp)) { break; } - n = $mul64(n, (new $Uint64(0, 10))); - i = i + (1) >> 0; - } - if (shouldRoundUp(a, a.dp)) { - n = (x$3 = new $Uint64(0, 1), new $Uint64(n.$high + x$3.$high, n.$low + x$3.$low)); - } - return n; - }; - decimal.prototype.RoundedInteger = function() { return this.$val.RoundedInteger(); }; - index = function(s, c) { - var c, s; - return bytealg.IndexByteString(s, c); - }; - lower = function(c) { - var c; - return (c | 32) >>> 0; - }; - NumError.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = e.Err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = "strconv." + e.Func + ": " + "parsing " + Quote(e.Num) + ": " + _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NumError.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - NumError.prototype.Error = function() { return this.$val.Error(); }; - NumError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - NumError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - syntaxError = function(fn, str) { - var fn, str; - return new NumError.ptr(fn, str, $pkg.ErrSyntax); - }; - rangeError = function(fn, str) { - var fn, str; - return new NumError.ptr(fn, str, $pkg.ErrRange); - }; - baseError = function(fn, str, base) { - var base, fn, str; - return new NumError.ptr(fn, str, errors.New("invalid base " + Itoa(base))); - }; - bitSizeError = function(fn, str, bitSize) { - var bitSize, fn, str; - return new NumError.ptr(fn, str, errors.New("invalid bit size " + Itoa(bitSize))); - }; - ParseUint = function(s, base, bitSize) { - var _1, _i, _ref, base, base0, bitSize, c, cutoff, d, maxVal, n, n1, s, s0, underscores, x, x$1, x$2; - if (s === "") { - return [new $Uint64(0, 0), syntaxError("ParseUint", s)]; - } - base0 = base === 0; - s0 = s; - if (2 <= base && base <= 36) { - } else if ((base === 0)) { - base = 10; - if (s.charCodeAt(0) === 48) { - if (s.length >= 3 && (lower(s.charCodeAt(1)) === 98)) { - base = 2; - s = $substring(s, 2); - } else if (s.length >= 3 && (lower(s.charCodeAt(1)) === 111)) { - base = 8; - s = $substring(s, 2); - } else if (s.length >= 3 && (lower(s.charCodeAt(1)) === 120)) { - base = 16; - s = $substring(s, 2); - } else { - base = 8; - s = $substring(s, 1); - } - } - } else { - return [new $Uint64(0, 0), baseError("ParseUint", s0, base)]; - } - if (bitSize === 0) { - bitSize = 32; - } else if (bitSize < 0 || bitSize > 64) { - return [new $Uint64(0, 0), bitSizeError("ParseUint", s0, bitSize)]; - } - cutoff = new $Uint64(0, 0); - _1 = base; - if (_1 === (10)) { - cutoff = new $Uint64(429496729, 2576980378); - } else if (_1 === (16)) { - cutoff = new $Uint64(268435456, 0); - } else { - cutoff = (x = $div64(new $Uint64(4294967295, 4294967295), (new $Uint64(0, base)), false), new $Uint64(x.$high + 0, x.$low + 1)); - } - maxVal = (x$1 = $shiftLeft64(new $Uint64(0, 1), ((bitSize >>> 0))), new $Uint64(x$1.$high - 0, x$1.$low - 1)); - underscores = false; - n = new $Uint64(0, 0); - _ref = (new sliceType$6($stringToBytes(s))); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - d = 0; - if ((c === 95) && base0) { - underscores = true; - _i++; - continue; - } else if (48 <= c && c <= 57) { - d = c - 48 << 24 >>> 24; - } else if (97 <= lower(c) && lower(c) <= 122) { - d = (lower(c) - 97 << 24 >>> 24) + 10 << 24 >>> 24; - } else { - return [new $Uint64(0, 0), syntaxError("ParseUint", s0)]; - } - if (d >= ((base << 24 >>> 24))) { - return [new $Uint64(0, 0), syntaxError("ParseUint", s0)]; - } - if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) { - return [maxVal, rangeError("ParseUint", s0)]; - } - n = $mul64(n, ((new $Uint64(0, base)))); - n1 = (x$2 = (new $Uint64(0, d)), new $Uint64(n.$high + x$2.$high, n.$low + x$2.$low)); - if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) { - return [maxVal, rangeError("ParseUint", s0)]; - } - n = n1; - _i++; - } - if (underscores && !underscoreOK(s0)) { - return [new $Uint64(0, 0), syntaxError("ParseUint", s0)]; - } - return [n, $ifaceNil]; - }; - $pkg.ParseUint = ParseUint; - ParseInt = function(s, base, bitSize) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, base, bitSize, cutoff, err, i, n, neg, s, s0, un, x, x$1; - i = new $Int64(0, 0); - err = $ifaceNil; - if (s === "") { - _tmp = new $Int64(0, 0); - _tmp$1 = syntaxError("ParseInt", s); - i = _tmp; - err = _tmp$1; - return [i, err]; - } - s0 = s; - neg = false; - if (s.charCodeAt(0) === 43) { - s = $substring(s, 1); - } else if (s.charCodeAt(0) === 45) { - neg = true; - s = $substring(s, 1); - } - un = new $Uint64(0, 0); - _tuple = ParseUint(s, base, bitSize); - un = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual($assertType(err, ptrType$1).Err, $pkg.ErrRange))) { - $assertType(err, ptrType$1).Func = "ParseInt"; - $assertType(err, ptrType$1).Num = s0; - _tmp$2 = new $Int64(0, 0); - _tmp$3 = err; - i = _tmp$2; - err = _tmp$3; - return [i, err]; - } - if (bitSize === 0) { - bitSize = 32; - } - cutoff = ($shiftLeft64(new $Uint64(0, 1), (((bitSize - 1 >> 0) >>> 0)))); - if (!neg && (un.$high > cutoff.$high || (un.$high === cutoff.$high && un.$low >= cutoff.$low))) { - _tmp$4 = ((x = new $Uint64(cutoff.$high - 0, cutoff.$low - 1), new $Int64(x.$high, x.$low))); - _tmp$5 = rangeError("ParseInt", s0); - i = _tmp$4; - err = _tmp$5; - return [i, err]; - } - if (neg && (un.$high > cutoff.$high || (un.$high === cutoff.$high && un.$low > cutoff.$low))) { - _tmp$6 = (x$1 = (new $Int64(cutoff.$high, cutoff.$low)), new $Int64(-x$1.$high, -x$1.$low)); - _tmp$7 = rangeError("ParseInt", s0); - i = _tmp$6; - err = _tmp$7; - return [i, err]; - } - n = (new $Int64(un.$high, un.$low)); - if (neg) { - n = new $Int64(-n.$high, -n.$low); - } - _tmp$8 = n; - _tmp$9 = $ifaceNil; - i = _tmp$8; - err = _tmp$9; - return [i, err]; - }; - $pkg.ParseInt = ParseInt; - underscoreOK = function(s) { - var hex, i, s, saw; - saw = 94; - i = 0; - if (s.length >= 1 && ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43))) { - s = $substring(s, 1); - } - hex = false; - if (s.length >= 2 && (s.charCodeAt(0) === 48) && ((lower(s.charCodeAt(1)) === 98) || (lower(s.charCodeAt(1)) === 111) || (lower(s.charCodeAt(1)) === 120))) { - i = 2; - saw = 48; - hex = lower(s.charCodeAt(1)) === 120; - } - while (true) { - if (!(i < s.length)) { break; } - if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57 || hex && 97 <= lower(s.charCodeAt(i)) && lower(s.charCodeAt(i)) <= 102) { - saw = 48; - i = i + (1) >> 0; - continue; - } - if (s.charCodeAt(i) === 95) { - if (!((saw === 48))) { - return false; - } - saw = 95; - i = i + (1) >> 0; - continue; - } - if (saw === 95) { - return false; - } - saw = 33; - i = i + (1) >> 0; - } - return !((saw === 95)); - }; - commonPrefixLenIgnoreCase = function(s, prefix) { - var c, i, n, prefix, s; - n = prefix.length; - if (n > s.length) { - n = s.length; - } - i = 0; - while (true) { - if (!(i < n)) { break; } - c = s.charCodeAt(i); - if (65 <= c && c <= 90) { - c = c + (32) << 24 >>> 24; - } - if (!((c === prefix.charCodeAt(i)))) { - return i; - } - i = i + (1) >> 0; - } - return n; - }; - special = function(s) { - var _1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, f, n, n$1, nsign, ok, s, sign; - f = 0; - n = 0; - ok = false; - if (s.length === 0) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = false; - f = _tmp; - n = _tmp$1; - ok = _tmp$2; - return [f, n, ok]; - } - sign = 1; - nsign = 0; - _1 = s.charCodeAt(0); - if ((_1 === (43)) || (_1 === (45))) { - if (s.charCodeAt(0) === 45) { - sign = -1; - } - nsign = 1; - s = $substring(s, 1); - n$1 = commonPrefixLenIgnoreCase(s, "infinity"); - if (3 < n$1 && n$1 < 8) { - n$1 = 3; - } - if ((n$1 === 3) || (n$1 === 8)) { - _tmp$3 = math.Inf(sign); - _tmp$4 = nsign + n$1 >> 0; - _tmp$5 = true; - f = _tmp$3; - n = _tmp$4; - ok = _tmp$5; - return [f, n, ok]; - } - } else if ((_1 === (105)) || (_1 === (73))) { - n$1 = commonPrefixLenIgnoreCase(s, "infinity"); - if (3 < n$1 && n$1 < 8) { - n$1 = 3; - } - if ((n$1 === 3) || (n$1 === 8)) { - _tmp$6 = math.Inf(sign); - _tmp$7 = nsign + n$1 >> 0; - _tmp$8 = true; - f = _tmp$6; - n = _tmp$7; - ok = _tmp$8; - return [f, n, ok]; - } - } else if ((_1 === (110)) || (_1 === (78))) { - if (commonPrefixLenIgnoreCase(s, "nan") === 3) { - _tmp$9 = math.NaN(); - _tmp$10 = 3; - _tmp$11 = true; - f = _tmp$9; - n = _tmp$10; - ok = _tmp$11; - return [f, n, ok]; - } - } - _tmp$12 = 0; - _tmp$13 = 0; - _tmp$14 = false; - f = _tmp$12; - n = _tmp$13; - ok = _tmp$14; - return [f, n, ok]; - }; - decimal.ptr.prototype.set = function(s) { - var b, e, esign, i, ok, s, sawdigits, sawdot, x, x$1; - ok = false; - b = this; - i = 0; - b.neg = false; - b.trunc = false; - if (i >= s.length) { - return ok; - } - if ((s.charCodeAt(i) === 43)) { - i = i + (1) >> 0; - } else if ((s.charCodeAt(i) === 45)) { - b.neg = true; - i = i + (1) >> 0; - } - sawdot = false; - sawdigits = false; - while (true) { - if (!(i < s.length)) { break; } - if ((s.charCodeAt(i) === 95)) { - i = i + (1) >> 0; - continue; - } else if ((s.charCodeAt(i) === 46)) { - if (sawdot) { - return ok; - } - sawdot = true; - b.dp = b.nd; - i = i + (1) >> 0; - continue; - } else if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57) { - sawdigits = true; - if ((s.charCodeAt(i) === 48) && (b.nd === 0)) { - b.dp = b.dp - (1) >> 0; - i = i + (1) >> 0; - continue; - } - if (b.nd < 800) { - (x = b.d, x$1 = b.nd, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = s.charCodeAt(i))); - b.nd = b.nd + (1) >> 0; - } else if (!((s.charCodeAt(i) === 48))) { - b.trunc = true; - } - i = i + (1) >> 0; - continue; - } - break; - } - if (!sawdigits) { - return ok; - } - if (!sawdot) { - b.dp = b.nd; - } - if (i < s.length && (lower(s.charCodeAt(i)) === 101)) { - i = i + (1) >> 0; - if (i >= s.length) { - return ok; - } - esign = 1; - if (s.charCodeAt(i) === 43) { - i = i + (1) >> 0; - } else if (s.charCodeAt(i) === 45) { - i = i + (1) >> 0; - esign = -1; - } - if (i >= s.length || s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57) { - return ok; - } - e = 0; - while (true) { - if (!(i < s.length && (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57 || (s.charCodeAt(i) === 95)))) { break; } - if (s.charCodeAt(i) === 95) { - i = i + (1) >> 0; - continue; - } - if (e < 10000) { - e = (($imul(e, 10)) + ((s.charCodeAt(i) >> 0)) >> 0) - 48 >> 0; - } - i = i + (1) >> 0; - } - b.dp = b.dp + (($imul(e, esign))) >> 0; - } - if (!((i === s.length))) { - return ok; - } - ok = true; - return ok; - }; - decimal.prototype.set = function(s) { return this.$val.set(s); }; - readFloat = function(s) { - var _1, base, c, dp, e, esign, exp, expChar, hex, i, mantissa, maxMantDigits, nd, ndMant, neg, ok, s, sawdigits, sawdot, trunc, underscores, x, x$1; - mantissa = new $Uint64(0, 0); - exp = 0; - neg = false; - trunc = false; - hex = false; - i = 0; - ok = false; - underscores = false; - if (i >= s.length) { - return [mantissa, exp, neg, trunc, hex, i, ok]; - } - if ((s.charCodeAt(i) === 43)) { - i = i + (1) >> 0; - } else if ((s.charCodeAt(i) === 45)) { - neg = true; - i = i + (1) >> 0; - } - base = new $Uint64(0, 10); - maxMantDigits = 19; - expChar = 101; - if ((i + 2 >> 0) < s.length && (s.charCodeAt(i) === 48) && (lower(s.charCodeAt((i + 1 >> 0))) === 120)) { - base = new $Uint64(0, 16); - maxMantDigits = 16; - i = i + (2) >> 0; - expChar = 112; - hex = true; - } - sawdot = false; - sawdigits = false; - nd = 0; - ndMant = 0; - dp = 0; - loop: - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - _1 = true; - if (_1 === ((c === 95))) { - underscores = true; - i = i + (1) >> 0; - continue; - } else if (_1 === ((c === 46))) { - if (sawdot) { - break loop; - } - sawdot = true; - dp = nd; - i = i + (1) >> 0; - continue; - } else if (_1 === (48 <= c && c <= 57)) { - sawdigits = true; - if ((c === 48) && (nd === 0)) { - dp = dp - (1) >> 0; - i = i + (1) >> 0; - continue; - } - nd = nd + (1) >> 0; - if (ndMant < maxMantDigits) { - mantissa = $mul64(mantissa, (base)); - mantissa = (x = (new $Uint64(0, (c - 48 << 24 >>> 24))), new $Uint64(mantissa.$high + x.$high, mantissa.$low + x.$low)); - ndMant = ndMant + (1) >> 0; - } else if (!((c === 48))) { - trunc = true; - } - i = i + (1) >> 0; - continue; - } else if (_1 === ((base.$high === 0 && base.$low === 16) && 97 <= lower(c) && lower(c) <= 102)) { - sawdigits = true; - nd = nd + (1) >> 0; - if (ndMant < maxMantDigits) { - mantissa = $mul64(mantissa, (new $Uint64(0, 16))); - mantissa = (x$1 = (new $Uint64(0, ((lower(c) - 97 << 24 >>> 24) + 10 << 24 >>> 24))), new $Uint64(mantissa.$high + x$1.$high, mantissa.$low + x$1.$low)); - ndMant = ndMant + (1) >> 0; - } else { - trunc = true; - } - i = i + (1) >> 0; - continue; - } - break; - } - if (!sawdigits) { - return [mantissa, exp, neg, trunc, hex, i, ok]; - } - if (!sawdot) { - dp = nd; - } - if ((base.$high === 0 && base.$low === 16)) { - dp = $imul(dp, (4)); - ndMant = $imul(ndMant, (4)); - } - if (i < s.length && (lower(s.charCodeAt(i)) === expChar)) { - i = i + (1) >> 0; - if (i >= s.length) { - return [mantissa, exp, neg, trunc, hex, i, ok]; - } - esign = 1; - if (s.charCodeAt(i) === 43) { - i = i + (1) >> 0; - } else if (s.charCodeAt(i) === 45) { - i = i + (1) >> 0; - esign = -1; - } - if (i >= s.length || s.charCodeAt(i) < 48 || s.charCodeAt(i) > 57) { - return [mantissa, exp, neg, trunc, hex, i, ok]; - } - e = 0; - while (true) { - if (!(i < s.length && (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57 || (s.charCodeAt(i) === 95)))) { break; } - if (s.charCodeAt(i) === 95) { - underscores = true; - i = i + (1) >> 0; - continue; - } - if (e < 10000) { - e = (($imul(e, 10)) + ((s.charCodeAt(i) >> 0)) >> 0) - 48 >> 0; - } - i = i + (1) >> 0; - } - dp = dp + (($imul(e, esign))) >> 0; - } else if ((base.$high === 0 && base.$low === 16)) { - return [mantissa, exp, neg, trunc, hex, i, ok]; - } - if (!((mantissa.$high === 0 && mantissa.$low === 0))) { - exp = dp - ndMant >> 0; - } - if (underscores && !underscoreOK($substring(s, 0, i))) { - return [mantissa, exp, neg, trunc, hex, i, ok]; - } - ok = true; - return [mantissa, exp, neg, trunc, hex, i, ok]; - }; - decimal.ptr.prototype.floatBits = function(flt) { - var _tmp, _tmp$1, b, bits$1, d, exp, flt, mant, n, n$1, n$2, overflow, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, y$1, y$2, y$3, $s; - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = new $Uint64(0, 0); - overflow = false; - d = this; - exp = 0; - mant = new $Uint64(0, 0); - /* */ if (d.nd === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d.nd === 0) { */ case 1: - mant = new $Uint64(0, 0); - exp = flt.bias; - /* goto out */ $s = 3; continue; - /* } */ case 2: - /* */ if (d.dp > 310) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (d.dp > 310) { */ case 4: - /* goto overflow */ $s = 6; continue; - /* } */ case 5: - /* */ if (d.dp < -330) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (d.dp < -330) { */ case 7: - mant = new $Uint64(0, 0); - exp = flt.bias; - /* goto out */ $s = 3; continue; - /* } */ case 8: - exp = 0; - while (true) { - if (!(d.dp > 0)) { break; } - n = 0; - if (d.dp >= powtab.$length) { - n = 27; - } else { - n = (x = d.dp, ((x < 0 || x >= powtab.$length) ? ($throwRuntimeError("index out of range"), undefined) : powtab.$array[powtab.$offset + x])); - } - d.Shift(-n); - exp = exp + (n) >> 0; - } - while (true) { - if (!(d.dp < 0 || (d.dp === 0) && d.d[0] < 53)) { break; } - n$1 = 0; - if (-d.dp >= powtab.$length) { - n$1 = 27; - } else { - n$1 = (x$1 = -d.dp, ((x$1 < 0 || x$1 >= powtab.$length) ? ($throwRuntimeError("index out of range"), undefined) : powtab.$array[powtab.$offset + x$1])); - } - d.Shift(n$1); - exp = exp - (n$1) >> 0; - } - exp = exp - (1) >> 0; - if (exp < (flt.bias + 1 >> 0)) { - n$2 = (flt.bias + 1 >> 0) - exp >> 0; - d.Shift(-n$2); - exp = exp + (n$2) >> 0; - } - /* */ if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ((exp - flt.bias >> 0) >= (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) - 1 >> 0)) { */ case 9: - /* goto overflow */ $s = 6; continue; - /* } */ case 10: - d.Shift((((1 + flt.mantbits >>> 0) >> 0))); - mant = d.RoundedInteger(); - /* */ if ((x$2 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ((x$2 = $shiftLeft64(new $Uint64(0, 2), flt.mantbits), (mant.$high === x$2.$high && mant.$low === x$2.$low))) { */ case 11: - mant = $shiftRightUint64(mant, (1)); - exp = exp + (1) >> 0; - /* */ if ((exp - flt.bias >> 0) >= (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ((exp - flt.bias >> 0) >= (((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0)) { */ case 13: - /* goto overflow */ $s = 6; continue; - /* } */ case 14: - /* } */ case 12: - if ((x$3 = (x$4 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(mant.$high & x$4.$high, (mant.$low & x$4.$low) >>> 0)), (x$3.$high === 0 && x$3.$low === 0))) { - exp = flt.bias; - } - /* goto out */ $s = 3; continue; - /* overflow: */ case 6: - mant = new $Uint64(0, 0); - exp = (((y$2 = flt.expbits, y$2 < 32 ? (1 << y$2) : 0) >> 0) - 1 >> 0) + flt.bias >> 0; - overflow = true; - /* out: */ case 3: - bits$1 = (x$5 = (x$6 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$6.$high - 0, x$6.$low - 1)), new $Uint64(mant.$high & x$5.$high, (mant.$low & x$5.$low) >>> 0)); - bits$1 = (x$7 = $shiftLeft64((new $Uint64(0, (((exp - flt.bias >> 0)) & ((((y$3 = flt.expbits, y$3 < 32 ? (1 << y$3) : 0) >> 0) - 1 >> 0))))), flt.mantbits), new $Uint64(bits$1.$high | x$7.$high, (bits$1.$low | x$7.$low) >>> 0)); - if (d.neg) { - bits$1 = (x$8 = $shiftLeft64($shiftLeft64(new $Uint64(0, 1), flt.mantbits), flt.expbits), new $Uint64(bits$1.$high | x$8.$high, (bits$1.$low | x$8.$low) >>> 0)); - } - _tmp = bits$1; - _tmp$1 = overflow; - b = _tmp; - overflow = _tmp$1; - $s = -1; return [b, overflow]; - /* */ } return; } - }; - decimal.prototype.floatBits = function(flt) { return this.$val.floatBits(flt); }; - atof64exact = function(mantissa, exp, neg) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, exp, f, mantissa, neg, ok, x, x$1, x$2; - f = 0; - ok = false; - if (!((x = $shiftRightUint64(mantissa, float64info.mantbits), (x.$high === 0 && x.$low === 0)))) { - return [f, ok]; - } - f = ($flatten64(mantissa)); - if (neg) { - f = -f; - } - if ((exp === 0)) { - _tmp = f; - _tmp$1 = true; - f = _tmp; - ok = _tmp$1; - return [f, ok]; - } else if (exp > 0 && exp <= 37) { - if (exp > 22) { - f = f * ((x$1 = exp - 22 >> 0, ((x$1 < 0 || x$1 >= float64pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float64pow10.$array[float64pow10.$offset + x$1]))); - exp = 22; - } - if (f > 1e+15 || f < -1e+15) { - return [f, ok]; - } - _tmp$2 = f * ((exp < 0 || exp >= float64pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float64pow10.$array[float64pow10.$offset + exp]); - _tmp$3 = true; - f = _tmp$2; - ok = _tmp$3; - return [f, ok]; - } else if (exp < 0 && exp >= -22) { - _tmp$4 = f / (x$2 = -exp, ((x$2 < 0 || x$2 >= float64pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float64pow10.$array[float64pow10.$offset + x$2])); - _tmp$5 = true; - f = _tmp$4; - ok = _tmp$5; - return [f, ok]; - } - return [f, ok]; - }; - atof32exact = function(mantissa, exp, neg) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, exp, f, mantissa, neg, ok, x, x$1, x$2; - f = 0; - ok = false; - if (!((x = $shiftRightUint64(mantissa, float32info.mantbits), (x.$high === 0 && x.$low === 0)))) { - return [f, ok]; - } - f = ($flatten64(mantissa)); - if (neg) { - f = -f; - } - if ((exp === 0)) { - _tmp = f; - _tmp$1 = true; - f = _tmp; - ok = _tmp$1; - return [f, ok]; - } else if (exp > 0 && exp <= 17) { - if (exp > 10) { - f = $fround(f * ((x$1 = exp - 10 >> 0, ((x$1 < 0 || x$1 >= float32pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float32pow10.$array[float32pow10.$offset + x$1])))); - exp = 10; - } - if (f > 1e+07 || f < -1e+07) { - return [f, ok]; - } - _tmp$2 = $fround(f * ((exp < 0 || exp >= float32pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float32pow10.$array[float32pow10.$offset + exp])); - _tmp$3 = true; - f = _tmp$2; - ok = _tmp$3; - return [f, ok]; - } else if (exp < 0 && exp >= -10) { - _tmp$4 = $fround(f / (x$2 = -exp, ((x$2 < 0 || x$2 >= float32pow10.$length) ? ($throwRuntimeError("index out of range"), undefined) : float32pow10.$array[float32pow10.$offset + x$2]))); - _tmp$5 = true; - f = _tmp$4; - ok = _tmp$5; - return [f, ok]; - } - return [f, ok]; - }; - atofHex = function(s, flt, mantissa, exp, neg, trunc) { - var bits$1, err, exp, flt, mantissa, maxExp, minExp, neg, round, s, trunc, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1; - maxExp = (((y = flt.expbits, y < 32 ? (1 << y) : 0) >> 0) + flt.bias >> 0) - 2 >> 0; - minExp = flt.bias + 1 >> 0; - exp = exp + (((flt.mantbits >> 0))) >> 0; - while (true) { - if (!(!((mantissa.$high === 0 && mantissa.$low === 0)) && (x = $shiftRightUint64(mantissa, ((flt.mantbits + 2 >>> 0))), (x.$high === 0 && x.$low === 0)))) { break; } - mantissa = $shiftLeft64(mantissa, (1)); - exp = exp - (1) >> 0; - } - if (trunc) { - mantissa = (x$1 = new $Uint64(0, 1), new $Uint64(mantissa.$high | x$1.$high, (mantissa.$low | x$1.$low) >>> 0)); - } - while (true) { - if (!(!((x$2 = $shiftRightUint64(mantissa, (((1 + flt.mantbits >>> 0) + 2 >>> 0))), (x$2.$high === 0 && x$2.$low === 0))))) { break; } - mantissa = (x$3 = $shiftRightUint64(mantissa, 1), x$4 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), new $Uint64(x$3.$high | x$4.$high, (x$3.$low | x$4.$low) >>> 0)); - exp = exp + (1) >> 0; - } - while (true) { - if (!((mantissa.$high > 0 || (mantissa.$high === 0 && mantissa.$low > 1)) && exp < (minExp - 2 >> 0))) { break; } - mantissa = (x$5 = $shiftRightUint64(mantissa, 1), x$6 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), new $Uint64(x$5.$high | x$6.$high, (x$5.$low | x$6.$low) >>> 0)); - exp = exp + (1) >> 0; - } - round = new $Uint64(mantissa.$high & 0, (mantissa.$low & 3) >>> 0); - mantissa = $shiftRightUint64(mantissa, (2)); - round = (x$7 = new $Uint64(mantissa.$high & 0, (mantissa.$low & 1) >>> 0), new $Uint64(round.$high | x$7.$high, (round.$low | x$7.$low) >>> 0)); - exp = exp + (2) >> 0; - if ((round.$high === 0 && round.$low === 3)) { - mantissa = (x$8 = new $Uint64(0, 1), new $Uint64(mantissa.$high + x$8.$high, mantissa.$low + x$8.$low)); - if ((x$9 = $shiftLeft64(new $Uint64(0, 1), ((1 + flt.mantbits >>> 0))), (mantissa.$high === x$9.$high && mantissa.$low === x$9.$low))) { - mantissa = $shiftRightUint64(mantissa, (1)); - exp = exp + (1) >> 0; - } - } - if ((x$10 = $shiftRightUint64(mantissa, flt.mantbits), (x$10.$high === 0 && x$10.$low === 0))) { - exp = flt.bias; - } - err = $ifaceNil; - if (exp > maxExp) { - mantissa = $shiftLeft64(new $Uint64(0, 1), flt.mantbits); - exp = maxExp + 1 >> 0; - err = rangeError("ParseFloat", s); - } - bits$1 = (x$11 = (x$12 = $shiftLeft64(new $Uint64(0, 1), flt.mantbits), new $Uint64(x$12.$high - 0, x$12.$low - 1)), new $Uint64(mantissa.$high & x$11.$high, (mantissa.$low & x$11.$low) >>> 0)); - bits$1 = (x$13 = $shiftLeft64((new $Uint64(0, (((exp - flt.bias >> 0)) & ((((y$1 = flt.expbits, y$1 < 32 ? (1 << y$1) : 0) >> 0) - 1 >> 0))))), flt.mantbits), new $Uint64(bits$1.$high | x$13.$high, (bits$1.$low | x$13.$low) >>> 0)); - if (neg) { - bits$1 = (x$14 = $shiftLeft64($shiftLeft64(new $Uint64(0, 1), flt.mantbits), flt.expbits), new $Uint64(bits$1.$high | x$14.$high, (bits$1.$low | x$14.$low) >>> 0)); - } - if (flt === float32info) { - return [(math.Float32frombits(((bits$1.$low >>> 0)))), err]; - } - return [math.Float64frombits(bits$1), err]; - }; - atof32 = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, b, d, err, err$1, exp, f, f$1, f$2, f$3, fUp, hex, mantissa, n, n$1, neg, ok, ok$1, ok$2, ok$3, ok$4, ovf, s, trunc, val; - f = 0; - n = 0; - err = $ifaceNil; - _tuple = special(s); - val = _tuple[0]; - n$1 = _tuple[1]; - ok = _tuple[2]; - if (ok) { - _tmp = ($fround(val)); - _tmp$1 = n$1; - _tmp$2 = $ifaceNil; - f = _tmp; - n = _tmp$1; - err = _tmp$2; - return [f, n, err]; - } - _tuple$1 = readFloat(s); - mantissa = _tuple$1[0]; - exp = _tuple$1[1]; - neg = _tuple$1[2]; - trunc = _tuple$1[3]; - hex = _tuple$1[4]; - n = _tuple$1[5]; - ok$1 = _tuple$1[6]; - if (!ok$1) { - _tmp$3 = 0; - _tmp$4 = n; - _tmp$5 = syntaxError("ParseFloat", s); - f = _tmp$3; - n = _tmp$4; - err = _tmp$5; - return [f, n, err]; - } - if (hex) { - _tuple$2 = atofHex($substring(s, 0, n), float32info, mantissa, exp, neg, trunc); - f$1 = _tuple$2[0]; - err$1 = _tuple$2[1]; - _tmp$6 = ($fround(f$1)); - _tmp$7 = n; - _tmp$8 = err$1; - f = _tmp$6; - n = _tmp$7; - err = _tmp$8; - return [f, n, err]; - } - if (optimize) { - if (!trunc) { - _tuple$3 = atof32exact(mantissa, exp, neg); - f$2 = _tuple$3[0]; - ok$2 = _tuple$3[1]; - if (ok$2) { - _tmp$9 = f$2; - _tmp$10 = n; - _tmp$11 = $ifaceNil; - f = _tmp$9; - n = _tmp$10; - err = _tmp$11; - return [f, n, err]; - } - } - _tuple$4 = eiselLemire32(mantissa, exp, neg); - f$3 = _tuple$4[0]; - ok$3 = _tuple$4[1]; - if (ok$3) { - if (!trunc) { - _tmp$12 = f$3; - _tmp$13 = n; - _tmp$14 = $ifaceNil; - f = _tmp$12; - n = _tmp$13; - err = _tmp$14; - return [f, n, err]; - } - _tuple$5 = eiselLemire32(new $Uint64(mantissa.$high + 0, mantissa.$low + 1), exp, neg); - fUp = _tuple$5[0]; - ok$4 = _tuple$5[1]; - if (ok$4 && (f$3 === fUp)) { - _tmp$15 = f$3; - _tmp$16 = n; - _tmp$17 = $ifaceNil; - f = _tmp$15; - n = _tmp$16; - err = _tmp$17; - return [f, n, err]; - } - } - } - d = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false); - if (!d.set($substring(s, 0, n))) { - _tmp$18 = 0; - _tmp$19 = n; - _tmp$20 = syntaxError("ParseFloat", s); - f = _tmp$18; - n = _tmp$19; - err = _tmp$20; - return [f, n, err]; - } - _tuple$6 = d.floatBits(float32info); - b = _tuple$6[0]; - ovf = _tuple$6[1]; - f = math.Float32frombits(((b.$low >>> 0))); - if (ovf) { - err = rangeError("ParseFloat", s); - } - _tmp$21 = f; - _tmp$22 = n; - _tmp$23 = err; - f = _tmp$21; - n = _tmp$22; - err = _tmp$23; - return [f, n, err]; - }; - atof64 = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, b, d, err, err$1, exp, f, f$1, f$2, f$3, fUp, hex, mantissa, n, n$1, neg, ok, ok$1, ok$2, ok$3, ok$4, ovf, s, trunc, val; - f = 0; - n = 0; - err = $ifaceNil; - _tuple = special(s); - val = _tuple[0]; - n$1 = _tuple[1]; - ok = _tuple[2]; - if (ok) { - _tmp = val; - _tmp$1 = n$1; - _tmp$2 = $ifaceNil; - f = _tmp; - n = _tmp$1; - err = _tmp$2; - return [f, n, err]; - } - _tuple$1 = readFloat(s); - mantissa = _tuple$1[0]; - exp = _tuple$1[1]; - neg = _tuple$1[2]; - trunc = _tuple$1[3]; - hex = _tuple$1[4]; - n = _tuple$1[5]; - ok$1 = _tuple$1[6]; - if (!ok$1) { - _tmp$3 = 0; - _tmp$4 = n; - _tmp$5 = syntaxError("ParseFloat", s); - f = _tmp$3; - n = _tmp$4; - err = _tmp$5; - return [f, n, err]; - } - if (hex) { - _tuple$2 = atofHex($substring(s, 0, n), float64info, mantissa, exp, neg, trunc); - f$1 = _tuple$2[0]; - err$1 = _tuple$2[1]; - _tmp$6 = f$1; - _tmp$7 = n; - _tmp$8 = err$1; - f = _tmp$6; - n = _tmp$7; - err = _tmp$8; - return [f, n, err]; - } - if (optimize) { - if (!trunc) { - _tuple$3 = atof64exact(mantissa, exp, neg); - f$2 = _tuple$3[0]; - ok$2 = _tuple$3[1]; - if (ok$2) { - _tmp$9 = f$2; - _tmp$10 = n; - _tmp$11 = $ifaceNil; - f = _tmp$9; - n = _tmp$10; - err = _tmp$11; - return [f, n, err]; - } - } - _tuple$4 = eiselLemire64(mantissa, exp, neg); - f$3 = _tuple$4[0]; - ok$3 = _tuple$4[1]; - if (ok$3) { - if (!trunc) { - _tmp$12 = f$3; - _tmp$13 = n; - _tmp$14 = $ifaceNil; - f = _tmp$12; - n = _tmp$13; - err = _tmp$14; - return [f, n, err]; - } - _tuple$5 = eiselLemire64(new $Uint64(mantissa.$high + 0, mantissa.$low + 1), exp, neg); - fUp = _tuple$5[0]; - ok$4 = _tuple$5[1]; - if (ok$4 && (f$3 === fUp)) { - _tmp$15 = f$3; - _tmp$16 = n; - _tmp$17 = $ifaceNil; - f = _tmp$15; - n = _tmp$16; - err = _tmp$17; - return [f, n, err]; - } - } - } - d = new decimal.ptr(arrayType$5.zero(), 0, 0, false, false); - if (!d.set($substring(s, 0, n))) { - _tmp$18 = 0; - _tmp$19 = n; - _tmp$20 = syntaxError("ParseFloat", s); - f = _tmp$18; - n = _tmp$19; - err = _tmp$20; - return [f, n, err]; - } - _tuple$6 = d.floatBits(float64info); - b = _tuple$6[0]; - ovf = _tuple$6[1]; - f = math.Float64frombits(b); - if (ovf) { - err = rangeError("ParseFloat", s); - } - _tmp$21 = f; - _tmp$22 = n; - _tmp$23 = err; - f = _tmp$21; - n = _tmp$22; - err = _tmp$23; - return [f, n, err]; - }; - ParseFloat = function(s, bitSize) { - var _tuple, bitSize, err, f, n, s; - _tuple = parseFloatPrefix(s, bitSize); - f = _tuple[0]; - n = _tuple[1]; - err = _tuple[2]; - if (!((n === s.length)) && ($interfaceIsEqual(err, $ifaceNil) || !($interfaceIsEqual($assertType(err, ptrType$1).Err, $pkg.ErrSyntax)))) { - return [0, syntaxError("ParseFloat", s)]; - } - return [f, err]; - }; - $pkg.ParseFloat = ParseFloat; - parseFloatPrefix = function(s, bitSize) { - var _tuple, bitSize, err, f, n, s; - if (bitSize === 32) { - _tuple = atof32(s); - f = _tuple[0]; - n = _tuple[1]; - err = _tuple[2]; - return [(f), n, err]; - } - return atof64(s); - }; - ParseBool = function(str) { - var _1, str; - _1 = str; - if (_1 === ("1") || _1 === ("t") || _1 === ("T") || _1 === ("true") || _1 === ("TRUE") || _1 === ("True")) { - return [true, $ifaceNil]; - } else if (_1 === ("0") || _1 === ("f") || _1 === ("F") || _1 === ("false") || _1 === ("FALSE") || _1 === ("False")) { - return [false, $ifaceNil]; - } - return [false, syntaxError("ParseBool", str)]; - }; - $pkg.ParseBool = ParseBool; - FormatBool = function(b) { - var b; - if (b) { - return "true"; - } - return "false"; - }; - $pkg.FormatBool = FormatBool; - AppendBool = function(dst, b) { - var b, dst; - if (b) { - return $appendSlice(dst, "true"); - } - return $appendSlice(dst, "false"); - }; - $pkg.AppendBool = AppendBool; - Itoa = function(i) { - var i; - return $internalize(i.toString(), $String); - }; - $pkg.Itoa = Itoa; - Atoi = function(s) { - var floatval, i, jsValue, s, v; - if (s.length === 0) { - return [0, syntaxError("Atoi", s)]; - } - i = 0; - while (true) { - if (!(i < s.length)) { break; } - v = s.charCodeAt(i); - if (v < 48 || v > 57) { - if (!((v === 43)) && !((v === 45))) { - return [0, syntaxError("Atoi", s)]; - } - } - i = i + (1) >> 0; - } - jsValue = $global.Number($externalize(s, $String), 10); - if (!!!($global.isFinite(jsValue))) { - return [0, syntaxError("Atoi", s)]; - } - floatval = $parseFloat(jsValue); - if (floatval > 2.147483647e+09) { - return [2147483647, rangeError("Atoi", s)]; - } else if (floatval < -2.147483648e+09) { - return [-2147483648, rangeError("Atoi", s)]; - } - return [$parseInt(jsValue) >> 0, $ifaceNil]; - }; - $pkg.Atoi = Atoi; - ptrType$2.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Assign", name: "Assign", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "Shift", name: "Shift", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundDown", name: "RoundDown", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundUp", name: "RoundUp", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "RoundedInteger", name: "RoundedInteger", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "set", name: "set", pkg: "strconv", typ: $funcType([$String], [$Bool], false)}, {prop: "floatBits", name: "floatBits", pkg: "strconv", typ: $funcType([ptrType], [$Uint64, $Bool], false)}]; - ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - floatInfo.init("strconv", [{prop: "mantbits", name: "mantbits", embedded: false, exported: false, typ: $Uint, tag: ""}, {prop: "expbits", name: "expbits", embedded: false, exported: false, typ: $Uint, tag: ""}, {prop: "bias", name: "bias", embedded: false, exported: false, typ: $Int, tag: ""}]); - decimalSlice.init("strconv", [{prop: "d", name: "d", embedded: false, exported: false, typ: sliceType$6, tag: ""}, {prop: "nd", name: "nd", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "dp", name: "dp", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}]); - decimal.init("strconv", [{prop: "d", name: "d", embedded: false, exported: false, typ: arrayType$5, tag: ""}, {prop: "nd", name: "nd", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "dp", name: "dp", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trunc", name: "trunc", embedded: false, exported: false, typ: $Bool, tag: ""}]); - leftCheat.init("strconv", [{prop: "delta", name: "delta", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "cutoff", name: "cutoff", embedded: false, exported: false, typ: $String, tag: ""}]); - NumError.init("", [{prop: "Func", name: "Func", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Num", name: "Num", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - isPrint16 = new sliceType([32, 126, 161, 887, 890, 895, 900, 1366, 1369, 1418, 1421, 1479, 1488, 1514, 1519, 1524, 1542, 1563, 1566, 1805, 1808, 1866, 1869, 1969, 1984, 2042, 2045, 2093, 2096, 2139, 2142, 2154, 2208, 2247, 2259, 2444, 2447, 2448, 2451, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2531, 2534, 2558, 2561, 2570, 2575, 2576, 2579, 2617, 2620, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2654, 2662, 2678, 2689, 2745, 2748, 2765, 2768, 2768, 2784, 2787, 2790, 2801, 2809, 2828, 2831, 2832, 2835, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2915, 2918, 2935, 2946, 2954, 2958, 2965, 2969, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3021, 3024, 3024, 3031, 3031, 3046, 3066, 3072, 3129, 3133, 3149, 3157, 3162, 3168, 3171, 3174, 3183, 3191, 3257, 3260, 3277, 3285, 3286, 3294, 3299, 3302, 3314, 3328, 3407, 3412, 3427, 3430, 3478, 3482, 3517, 3520, 3526, 3530, 3530, 3535, 3551, 3558, 3567, 3570, 3572, 3585, 3642, 3647, 3675, 3713, 3773, 3776, 3789, 3792, 3801, 3804, 3807, 3840, 3948, 3953, 4058, 4096, 4295, 4301, 4301, 4304, 4685, 4688, 4701, 4704, 4749, 4752, 4789, 4792, 4805, 4808, 4885, 4888, 4954, 4957, 4988, 4992, 5017, 5024, 5109, 5112, 5117, 5120, 5788, 5792, 5880, 5888, 5908, 5920, 5942, 5952, 5971, 5984, 6003, 6016, 6109, 6112, 6121, 6128, 6137, 6144, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6443, 6448, 6459, 6464, 6464, 6468, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6622, 6683, 6686, 6780, 6783, 6793, 6800, 6809, 6816, 6829, 6832, 6848, 6912, 6987, 6992, 7036, 7040, 7155, 7164, 7223, 7227, 7241, 7245, 7304, 7312, 7354, 7357, 7367, 7376, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8061, 8064, 8147, 8150, 8175, 8178, 8190, 8208, 8231, 8240, 8286, 8304, 8305, 8308, 8348, 8352, 8383, 8400, 8432, 8448, 8587, 8592, 9254, 9280, 9290, 9312, 11123, 11126, 11507, 11513, 11559, 11565, 11565, 11568, 11623, 11631, 11632, 11647, 11670, 11680, 11858, 11904, 12019, 12032, 12245, 12272, 12283, 12289, 12438, 12441, 12543, 12549, 12771, 12784, 40956, 40960, 42124, 42128, 42182, 42192, 42539, 42560, 42743, 42752, 42943, 42946, 42954, 42997, 43052, 43056, 43065, 43072, 43127, 43136, 43205, 43214, 43225, 43232, 43347, 43359, 43388, 43392, 43481, 43486, 43574, 43584, 43597, 43600, 43609, 43612, 43714, 43739, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43883, 43888, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64449, 64467, 64831, 64848, 64911, 64914, 64967, 65008, 65021, 65024, 65049, 65056, 65131, 65136, 65276, 65281, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65504, 65518, 65532, 65533]); - isNotPrint16 = new sliceType([173, 907, 909, 930, 1328, 1424, 1757, 2111, 2143, 2229, 2274, 2436, 2473, 2481, 2526, 2564, 2601, 2609, 2612, 2615, 2621, 2653, 2692, 2702, 2706, 2729, 2737, 2740, 2758, 2762, 2816, 2820, 2857, 2865, 2868, 2910, 2948, 2961, 2971, 2973, 3017, 3085, 3089, 3113, 3141, 3145, 3159, 3213, 3217, 3241, 3252, 3269, 3273, 3295, 3312, 3341, 3345, 3397, 3401, 3456, 3460, 3506, 3516, 3541, 3543, 3715, 3717, 3723, 3748, 3750, 3781, 3783, 3912, 3992, 4029, 4045, 4294, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 4881, 5760, 5901, 5997, 6001, 6431, 6751, 7674, 8024, 8026, 8028, 8030, 8117, 8133, 8156, 8181, 8335, 11158, 11311, 11359, 11558, 11687, 11695, 11703, 11711, 11719, 11727, 11735, 11743, 11930, 12352, 12592, 12687, 12831, 43470, 43519, 43815, 43823, 64311, 64317, 64319, 64322, 64325, 65107, 65127, 65141, 65511]); - isPrint32 = new sliceType$1([65536, 65613, 65616, 65629, 65664, 65786, 65792, 65794, 65799, 65843, 65847, 65948, 65952, 65952, 66000, 66045, 66176, 66204, 66208, 66256, 66272, 66299, 66304, 66339, 66349, 66378, 66384, 66426, 66432, 66499, 66504, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66927, 66927, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67640, 67644, 67644, 67647, 67742, 67751, 67759, 67808, 67829, 67835, 67867, 67871, 67897, 67903, 67903, 67968, 68023, 68028, 68047, 68050, 68102, 68108, 68149, 68152, 68154, 68159, 68168, 68176, 68184, 68192, 68255, 68288, 68326, 68331, 68342, 68352, 68405, 68409, 68437, 68440, 68466, 68472, 68497, 68505, 68508, 68521, 68527, 68608, 68680, 68736, 68786, 68800, 68850, 68858, 68903, 68912, 68921, 69216, 69293, 69296, 69297, 69376, 69415, 69424, 69465, 69552, 69579, 69600, 69622, 69632, 69709, 69714, 69743, 69759, 69825, 69840, 69864, 69872, 69881, 69888, 69959, 69968, 70006, 70016, 70132, 70144, 70206, 70272, 70313, 70320, 70378, 70384, 70393, 70400, 70412, 70415, 70416, 70419, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70753, 70784, 70855, 70864, 70873, 71040, 71093, 71096, 71133, 71168, 71236, 71248, 71257, 71264, 71276, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71487, 71680, 71739, 71840, 71922, 71935, 71942, 71945, 71945, 71948, 71992, 71995, 72006, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72164, 72192, 72263, 72272, 72354, 72384, 72440, 72704, 72773, 72784, 72812, 72816, 72847, 72850, 72886, 72960, 73014, 73018, 73031, 73040, 73049, 73056, 73112, 73120, 73129, 73440, 73464, 73648, 73648, 73664, 73713, 73727, 74649, 74752, 74868, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92777, 92782, 92783, 92880, 92909, 92912, 92917, 92928, 92997, 93008, 93047, 93053, 93071, 93760, 93850, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113820, 113823, 118784, 119029, 119040, 119078, 119081, 119154, 119163, 119272, 119296, 119365, 119520, 119539, 119552, 119638, 119648, 119672, 119808, 119967, 119970, 119970, 119973, 119974, 119977, 120074, 120077, 120134, 120138, 120485, 120488, 120779, 120782, 121483, 121499, 121519, 122880, 122904, 122907, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123215, 123584, 123641, 123647, 123647, 124928, 125124, 125127, 125142, 125184, 125259, 125264, 125273, 125278, 125279, 126065, 126132, 126209, 126269, 126464, 126500, 126503, 126523, 126530, 126530, 126535, 126548, 126551, 126564, 126567, 126619, 126625, 126651, 126704, 126705, 126976, 127019, 127024, 127123, 127136, 127150, 127153, 127221, 127232, 127405, 127462, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 128727, 128736, 128748, 128752, 128764, 128768, 128883, 128896, 128984, 128992, 129003, 129024, 129035, 129040, 129095, 129104, 129113, 129120, 129159, 129168, 129197, 129200, 129201, 129280, 129619, 129632, 129645, 129648, 129652, 129656, 129658, 129664, 129670, 129680, 129704, 129712, 129718, 129728, 129730, 129744, 129750, 129792, 129994, 130032, 130041, 131072, 173789, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 196608, 201546, 917760, 917999]); - isNotPrint32 = new sliceType([12, 39, 59, 62, 399, 926, 2057, 2102, 2134, 2291, 2564, 2580, 2584, 3711, 3754, 4285, 4405, 4576, 4626, 4743, 4745, 4750, 4766, 4868, 4905, 4913, 4916, 4922, 5212, 6420, 6423, 6454, 7177, 7223, 7336, 7431, 7434, 7483, 7486, 7526, 7529, 7567, 7570, 9327, 27231, 27482, 27490, 54357, 54429, 54445, 54458, 54460, 54468, 54534, 54549, 54557, 54586, 54591, 54597, 54609, 55968, 57351, 57378, 57381, 60932, 60960, 60963, 60968, 60979, 60984, 60986, 61000, 61002, 61004, 61008, 61011, 61016, 61018, 61020, 61022, 61024, 61027, 61035, 61043, 61048, 61053, 61055, 61066, 61092, 61098, 61632, 61648, 63865, 63948, 64403]); - isGraphic = new sliceType([160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288]); - uint64pow10 = $toNativeArray($kindUint64, [new $Uint64(0, 1), new $Uint64(0, 10), new $Uint64(0, 100), new $Uint64(0, 1000), new $Uint64(0, 10000), new $Uint64(0, 100000), new $Uint64(0, 1000000), new $Uint64(0, 10000000), new $Uint64(0, 100000000), new $Uint64(0, 1000000000), new $Uint64(2, 1410065408), new $Uint64(23, 1215752192), new $Uint64(232, 3567587328), new $Uint64(2328, 1316134912), new $Uint64(23283, 276447232), new $Uint64(232830, 2764472320), new $Uint64(2328306, 1874919424), new $Uint64(23283064, 1569325056), new $Uint64(232830643, 2808348672), new $Uint64(2328306436, 2313682944)]); - float32info = new floatInfo.ptr(23, 8, -127); - float64info = new floatInfo.ptr(52, 11, -1023); - detailedPowersOfTen = $toNativeArray($kindArray, [$toNativeArray($kindUint64, [new $Uint64(389204073, 3445679187), new $Uint64(4203730336, 136053384)]), $toNativeArray($kindUint64, [new $Uint64(243252546, 542936756), new $Uint64(2627331460, 85033365)]), $toNativeArray($kindUint64, [new $Uint64(1377807506, 2826154593), new $Uint64(3284164325, 106291706)]), $toNativeArray($kindUint64, [new $Uint64(3869743031, 1385209593), new $Uint64(4105205406, 1206606456)]), $toNativeArray($kindUint64, [new $Uint64(2418589394, 2476368732), new $Uint64(2565753378, 3975354507)]), $toNativeArray($kindUint64, [new $Uint64(1949494919, 947977267), new $Uint64(3207191723, 2821709486)]), $toNativeArray($kindUint64, [new $Uint64(289385001, 111229759), new $Uint64(4008989654, 2453395034)]), $toNativeArray($kindUint64, [new $Uint64(1254607449, 2753873159), new $Uint64(2505618534, 459630072)]), $toNativeArray($kindUint64, [new $Uint64(1568259312, 221115977), new $Uint64(3132023167, 2722021238)]), $toNativeArray($kindUint64, [new $Uint64(4107807788, 276394972), new $Uint64(3915028959, 2328784723)]), $toNativeArray($kindUint64, [new $Uint64(2030508955, 2320230505), new $Uint64(2446893099, 3066103188)]), $toNativeArray($kindUint64, [new $Uint64(2538136194, 1826546308), new $Uint64(3058616374, 2758887161)]), $toNativeArray($kindUint64, [new $Uint64(4246412067, 135699237), new $Uint64(3823270468, 1301125303)]), $toNativeArray($kindUint64, [new $Uint64(4264620277, 3842908407), new $Uint64(2389544042, 2960686962)]), $toNativeArray($kindUint64, [new $Uint64(3183291699, 1582410037), new $Uint64(2986930053, 1553375055)]), $toNativeArray($kindUint64, [new $Uint64(2905372800, 904270722), new $Uint64(3733662566, 3015460643)]), $toNativeArray($kindUint64, [new $Uint64(1278987088, 565169201), new $Uint64(2333539104, 810921078)]), $toNativeArray($kindUint64, [new $Uint64(3746217508, 706461501), new $Uint64(2916923880, 1013651347)]), $toNativeArray($kindUint64, [new $Uint64(3609030061, 883076877), new $Uint64(3646154850, 1267064184)]), $toNativeArray($kindUint64, [new $Uint64(2255643788, 1088793960), new $Uint64(2278846781, 1865656939)]), $toNativeArray($kindUint64, [new $Uint64(1745812911, 1360992450), new $Uint64(2848558476, 3405812998)]), $toNativeArray($kindUint64, [new $Uint64(34782491, 627498738), new $Uint64(3560698095, 4257266248)]), $toNativeArray($kindUint64, [new $Uint64(21739056, 4150283095), new $Uint64(2225436309, 4271404141)]), $toNativeArray($kindUint64, [new $Uint64(1100915645, 892886573), new $Uint64(2781795387, 2118029704)]), $toNativeArray($kindUint64, [new $Uint64(1376144556, 2189850041), new $Uint64(3477244234, 1573795306)]), $toNativeArray($kindUint64, [new $Uint64(1933832171, 3516139923), new $Uint64(2173277646, 2057363890)]), $toNativeArray($kindUint64, [new $Uint64(269806566, 3321433080), new $Uint64(2716597058, 424221215)]), $toNativeArray($kindUint64, [new $Uint64(3558483680, 2004307702), new $Uint64(3395746322, 2677760166)]), $toNativeArray($kindUint64, [new $Uint64(2300620952, 2505384628), new $Uint64(4244682903, 1199716560)]), $toNativeArray($kindUint64, [new $Uint64(1437888095, 1565865392), new $Uint64(2652926814, 2360435586)]), $toNativeArray($kindUint64, [new $Uint64(3944843767, 883589917), new $Uint64(3316158518, 803060834)]), $toNativeArray($kindUint64, [new $Uint64(2783571061, 30745572), new $Uint64(4145198147, 3151309691)]), $toNativeArray($kindUint64, [new $Uint64(1202861001, 556086894), new $Uint64(2590748842, 1432697645)]), $toNativeArray($kindUint64, [new $Uint64(2577318075, 1768850442), new $Uint64(3238436052, 3938355704)]), $toNativeArray($kindUint64, [new $Uint64(3221647594, 1137321229), new $Uint64(4048045066, 627977334)]), $toNativeArray($kindUint64, [new $Uint64(939787922, 1784567592), new $Uint64(2530028166, 1466227658)]), $toNativeArray($kindUint64, [new $Uint64(3322218551, 83225842), new $Uint64(3162535207, 3980268220)]), $toNativeArray($kindUint64, [new $Uint64(4152773188, 3325257774), new $Uint64(3953169009, 3901593451)]), $toNativeArray($kindUint64, [new $Uint64(2058612330, 4225769757), new $Uint64(2470730631, 827883171)]), $toNativeArray($kindUint64, [new $Uint64(1499523589, 3134728548), new $Uint64(3088413288, 4256079436)]), $toNativeArray($kindUint64, [new $Uint64(1874404487, 697185213), new $Uint64(3860516611, 1025131999)]), $toNativeArray($kindUint64, [new $Uint64(2782115540, 2046353494), new $Uint64(2412822882, 103836587)]), $toNativeArray($kindUint64, [new $Uint64(2403902601, 2557941868), new $Uint64(3016028602, 2277279382)]), $toNativeArray($kindUint64, [new $Uint64(857394603, 4271169159), new $Uint64(3770035753, 699115580)]), $toNativeArray($kindUint64, [new $Uint64(2683355275, 2132609812), new $Uint64(2356272345, 3121301797)]), $toNativeArray($kindUint64, [new $Uint64(132968622, 1592020441), new $Uint64(2945340432, 680401775)]), $toNativeArray($kindUint64, [new $Uint64(3387436249, 4137509200), new $Uint64(3681675540, 850502218)]), $toNativeArray($kindUint64, [new $Uint64(3190889480, 975330514), new $Uint64(2301047212, 2679047534)]), $toNativeArray($kindUint64, [new $Uint64(1841128202, 1219163142), new $Uint64(2876309015, 3348809418)]), $toNativeArray($kindUint64, [new $Uint64(153926604, 3671437576), new $Uint64(3595386269, 3112269949)]), $toNativeArray($kindUint64, [new $Uint64(633075040, 147164837), new $Uint64(2247116418, 2482039630)]), $toNativeArray($kindUint64, [new $Uint64(2938827448, 183956046), new $Uint64(2808895523, 955065889)]), $toNativeArray($kindUint64, [new $Uint64(452308838, 229945057), new $Uint64(3511119404, 120090538)]), $toNativeArray($kindUint64, [new $Uint64(1356434847, 3364941133), new $Uint64(2194449627, 2222540234)]), $toNativeArray($kindUint64, [new $Uint64(3843027207, 3132434592), new $Uint64(2743062034, 1704433468)]), $toNativeArray($kindUint64, [new $Uint64(508816713, 2841801416), new $Uint64(3428827542, 4278025484)]), $toNativeArray($kindUint64, [new $Uint64(636020892, 331026298), new $Uint64(4286034428, 3200048207)]), $toNativeArray($kindUint64, [new $Uint64(2008125793, 2354375084), new $Uint64(2678771517, 4147513777)]), $toNativeArray($kindUint64, [new $Uint64(3583899065, 4016710679), new $Uint64(3348464397, 1963166749)]), $toNativeArray($kindUint64, [new $Uint64(1258648360, 1799662877), new $Uint64(4185580496, 3527700261)]), $toNativeArray($kindUint64, [new $Uint64(1323526137, 1124789298), new $Uint64(2615987810, 2204812663)]), $toNativeArray($kindUint64, [new $Uint64(580665847, 2479728447), new $Uint64(3269984763, 608532181)]), $toNativeArray($kindUint64, [new $Uint64(1799574133, 2025918735), new $Uint64(4087480953, 3981890698)]), $toNativeArray($kindUint64, [new $Uint64(2198475657, 1803070121), new $Uint64(2554675596, 878068950)]), $toNativeArray($kindUint64, [new $Uint64(600610923, 3327579475), new $Uint64(3193344495, 1097586188)]), $toNativeArray($kindUint64, [new $Uint64(750763654, 3085732520), new $Uint64(3991680619, 298240911)]), $toNativeArray($kindUint64, [new $Uint64(2079840020, 854841001), new $Uint64(2494800386, 3944496953)]), $toNativeArray($kindUint64, [new $Uint64(3673541849, 1068551251), new $Uint64(3118500483, 2783137543)]), $toNativeArray($kindUint64, [new $Uint64(3518185487, 2409430888), new $Uint64(3898125604, 2405180105)]), $toNativeArray($kindUint64, [new $Uint64(588253193, 3116507041), new $Uint64(2436328502, 3650721214)]), $toNativeArray($kindUint64, [new $Uint64(2882800140, 674408330), new $Uint64(3045410628, 2415917869)]), $toNativeArray($kindUint64, [new $Uint64(382274703, 843010412), new $Uint64(3806763285, 3019897337)]), $toNativeArray($kindUint64, [new $Uint64(2923276249, 2137494243), new $Uint64(2379227053, 2424306747)]), $toNativeArray($kindUint64, [new $Uint64(2580353487, 3745609628), new $Uint64(2974033816, 4104125258)]), $toNativeArray($kindUint64, [new $Uint64(1077958211, 3608270211), new $Uint64(3717542271, 835189277)]), $toNativeArray($kindUint64, [new $Uint64(1210594794, 1718297970), new $Uint64(2323463919, 2132606034)]), $toNativeArray($kindUint64, [new $Uint64(3660727141, 388815), new $Uint64(2904329899, 1592015718)]), $toNativeArray($kindUint64, [new $Uint64(2428425278, 1074227842), new $Uint64(3630412374, 916277824)]), $toNativeArray($kindUint64, [new $Uint64(1517765798, 3892617873), new $Uint64(2269007733, 3793899112)]), $toNativeArray($kindUint64, [new $Uint64(1897207248, 2718288694), new $Uint64(2836259667, 1521148418)]), $toNativeArray($kindUint64, [new $Uint64(224025412, 3397860867), new $Uint64(3545324584, 827693699)]), $toNativeArray($kindUint64, [new $Uint64(3898112266, 4271146690), new $Uint64(2215827865, 517308561)]), $toNativeArray($kindUint64, [new $Uint64(1651414861, 3191449714), new $Uint64(2769784831, 1720377526)]), $toNativeArray($kindUint64, [new $Uint64(4211752225, 768086671), new $Uint64(3462231039, 1076730083)]), $toNativeArray($kindUint64, [new $Uint64(2095474228, 3164408729), new $Uint64(2163894399, 2283569038)]), $toNativeArray($kindUint64, [new $Uint64(471859137, 3955510912), new $Uint64(2704867999, 1780719474)]), $toNativeArray($kindUint64, [new $Uint64(2737307570, 1723163168), new $Uint64(3381084999, 1152157518)]), $toNativeArray($kindUint64, [new $Uint64(1274150815, 6470312), new $Uint64(4226356249, 366455074)]), $toNativeArray($kindUint64, [new $Uint64(1870086083, 1614656681), new $Uint64(2641472655, 2913388981)]), $toNativeArray($kindUint64, [new $Uint64(3411349428, 944579027), new $Uint64(3301840819, 2567994402)]), $toNativeArray($kindUint64, [new $Uint64(2116703137, 1180723784), new $Uint64(4127301024, 2136251179)]), $toNativeArray($kindUint64, [new $Uint64(786068548, 3422306925), new $Uint64(2579563140, 1335156987)]), $toNativeArray($kindUint64, [new $Uint64(4203811157, 4277883656), new $Uint64(3224453925, 1668946233)]), $toNativeArray($kindUint64, [new $Uint64(2033538475, 2126129098), new $Uint64(4030567406, 3159924616)]), $toNativeArray($kindUint64, [new $Uint64(1270961547, 791959774), new $Uint64(2519104629, 901211061)]), $toNativeArray($kindUint64, [new $Uint64(2662443757, 4211175190), new $Uint64(3148880786, 2200255650)]), $toNativeArray($kindUint64, [new $Uint64(1180571049, 2042743516), new $Uint64(3936100983, 602835915)]), $toNativeArray($kindUint64, [new $Uint64(200985993, 3961069257), new $Uint64(2460063114, 1987385183)]), $toNativeArray($kindUint64, [new $Uint64(3472457964, 1730111099), new $Uint64(3075078893, 336747830)]), $toNativeArray($kindUint64, [new $Uint64(2193088807, 2162638874), new $Uint64(3843848616, 1494676612)]), $toNativeArray($kindUint64, [new $Uint64(3518164152, 2962262032), new $Uint64(2402405385, 934172882)]), $toNativeArray($kindUint64, [new $Uint64(2250221542, 3702827541), new $Uint64(3003006731, 2241457927)]), $toNativeArray($kindUint64, [new $Uint64(1739035104, 2481050778), new $Uint64(3753758414, 1728080585)]), $toNativeArray($kindUint64, [new $Uint64(3771251500, 1550656736), new $Uint64(2346099009, 6308541)]), $toNativeArray($kindUint64, [new $Uint64(1492838903, 1938320920), new $Uint64(2932623761, 1081627501)]), $toNativeArray($kindUint64, [new $Uint64(2939790453, 1349159326), new $Uint64(3665779701, 2425776200)]), $toNativeArray($kindUint64, [new $Uint64(1837369033, 1380095491), new $Uint64(2291112313, 2052981037)]), $toNativeArray($kindUint64, [new $Uint64(3370453115, 2798861187), new $Uint64(2863890391, 3639968120)]), $toNativeArray($kindUint64, [new $Uint64(4213066394, 2424834660), new $Uint64(3579862989, 3476218326)]), $toNativeArray($kindUint64, [new $Uint64(1559424672, 2589263487), new $Uint64(2237414368, 2709507366)]), $toNativeArray($kindUint64, [new $Uint64(4096764488, 3236579358), new $Uint64(2796767960, 3386884207)]), $toNativeArray($kindUint64, [new $Uint64(4047213786, 4045724198), new $Uint64(3495959950, 4233605259)]), $toNativeArray($kindUint64, [new $Uint64(1992637704, 3602319448), new $Uint64(2184974969, 1572261463)]), $toNativeArray($kindUint64, [new $Uint64(1417055307, 207932014), new $Uint64(2731218711, 3039068653)]), $toNativeArray($kindUint64, [new $Uint64(2845060957, 3481140489), new $Uint64(3414023389, 2725093992)]), $toNativeArray($kindUint64, [new $Uint64(3556326197, 1130200140), new $Uint64(4267529237, 185142018)]), $toNativeArray($kindUint64, [new $Uint64(3296445697, 1243245999), new $Uint64(2667205773, 652584673)]), $toNativeArray($kindUint64, [new $Uint64(899331649, 2627799323), new $Uint64(3334007216, 1889472666)]), $toNativeArray($kindUint64, [new $Uint64(3271648210, 63523682), new $Uint64(4167509020, 2361840832)]), $toNativeArray($kindUint64, [new $Uint64(2044780131, 1113444125), new $Uint64(2604693137, 3623634168)]), $toNativeArray($kindUint64, [new $Uint64(2555975164, 318063332), new $Uint64(3255866422, 1308317238)]), $toNativeArray($kindUint64, [new $Uint64(1047485307, 397579165), new $Uint64(4069833027, 3782880196)]), $toNativeArray($kindUint64, [new $Uint64(2802161964, 4006583362), new $Uint64(2543645642, 1827429210)]), $toNativeArray($kindUint64, [new $Uint64(1355218808, 713261907), new $Uint64(3179557053, 136802865)]), $toNativeArray($kindUint64, [new $Uint64(2767765334, 891577384), new $Uint64(3974446316, 1244745405)]), $toNativeArray($kindUint64, [new $Uint64(2266724245, 3778461337), new $Uint64(2484028947, 2925449526)]), $toNativeArray($kindUint64, [new $Uint64(685921659, 1501851199), new $Uint64(3105036184, 2583070084)]), $toNativeArray($kindUint64, [new $Uint64(857402074, 803572175), new $Uint64(3881295230, 3228837605)]), $toNativeArray($kindUint64, [new $Uint64(1072747208, 1575974433), new $Uint64(2425809519, 944281679)]), $toNativeArray($kindUint64, [new $Uint64(267192186, 1969968041), new $Uint64(3032261899, 106610275)]), $toNativeArray($kindUint64, [new $Uint64(3555215705, 314976404), new $Uint64(3790327373, 3354488315)]), $toNativeArray($kindUint64, [new $Uint64(1685138903, 2881214812), new $Uint64(2368954608, 2633426109)]), $toNativeArray($kindUint64, [new $Uint64(3180165453, 2527776691), new $Uint64(2961193260, 3291782636)]), $toNativeArray($kindUint64, [new $Uint64(3975206816, 4233462688), new $Uint64(3701491575, 4114728295)]), $toNativeArray($kindUint64, [new $Uint64(4095116996, 2645914180), new $Uint64(2313432234, 4182317920)]), $toNativeArray($kindUint64, [new $Uint64(823928949, 3307392725), new $Uint64(2891790293, 3080413753)]), $toNativeArray($kindUint64, [new $Uint64(2103653011, 913015435), new $Uint64(3614737867, 629291719)]), $toNativeArray($kindUint64, [new $Uint64(2925395868, 33763735), new $Uint64(2259211166, 4151403708)]), $toNativeArray($kindUint64, [new $Uint64(3656744835, 42204668), new $Uint64(2824013958, 3041770987)]), $toNativeArray($kindUint64, [new $Uint64(3497189219, 3273981307), new $Uint64(3530017448, 1654730086)]), $toNativeArray($kindUint64, [new $Uint64(1112001438, 1509367405), new $Uint64(2206260905, 1034206304)]), $toNativeArray($kindUint64, [new $Uint64(1390001797, 4034192904), new $Uint64(2757826131, 2366499704)]), $toNativeArray($kindUint64, [new $Uint64(1737502247, 1821515659), new $Uint64(3447282664, 1884382806)]), $toNativeArray($kindUint64, [new $Uint64(12197080, 2749060022), new $Uint64(2154551665, 1177739254)]), $toNativeArray($kindUint64, [new $Uint64(2162729998, 3436325028), new $Uint64(2693189581, 2545915891)]), $toNativeArray($kindUint64, [new $Uint64(1629670674, 2147922637), new $Uint64(3366486976, 4256136688)]), $toNativeArray($kindUint64, [new $Uint64(2037088343, 537419649), new $Uint64(4208108721, 1025203564)]), $toNativeArray($kindUint64, [new $Uint64(3420663862, 1946500016), new $Uint64(2630067950, 3325106787)]), $toNativeArray($kindUint64, [new $Uint64(3202088004, 285641372), new $Uint64(3287584938, 2008899836)]), $toNativeArray($kindUint64, [new $Uint64(4002610005, 357051716), new $Uint64(4109481173, 363641147)]), $toNativeArray($kindUint64, [new $Uint64(1964760341, 760028234), new $Uint64(2568425733, 764146629)]), $toNativeArray($kindUint64, [new $Uint64(3529692250, 2023777117), new $Uint64(3210532166, 2028925110)]), $toNativeArray($kindUint64, [new $Uint64(2264631665, 382237748), new $Uint64(4013165208, 388672740)]), $toNativeArray($kindUint64, [new $Uint64(3562878438, 2923253152), new $Uint64(2508228255, 242920462)]), $toNativeArray($kindUint64, [new $Uint64(2306114400, 1506582793), new $Uint64(3135285318, 3524876050)]), $toNativeArray($kindUint64, [new $Uint64(735159352, 1883228491), new $Uint64(3919106648, 2258611415)]), $toNativeArray($kindUint64, [new $Uint64(2070087331, 1177017807), new $Uint64(2449441655, 1411632134)]), $toNativeArray($kindUint64, [new $Uint64(440125516, 397530434), new $Uint64(3061802069, 690798344)]), $toNativeArray($kindUint64, [new $Uint64(550156895, 496913043), new $Uint64(3827252586, 1937239754)]), $toNativeArray($kindUint64, [new $Uint64(1417589883, 1921183388), new $Uint64(2392032866, 2284516670)]), $toNativeArray($kindUint64, [new $Uint64(3919471002, 1327737411), new $Uint64(2990041083, 708162189)]), $toNativeArray($kindUint64, [new $Uint64(1678113280, 3807155412), new $Uint64(3737551353, 4106428209)]), $toNativeArray($kindUint64, [new $Uint64(3733175360, 2379472132), new $Uint64(2335969596, 955904894)]), $toNativeArray($kindUint64, [new $Uint64(2518985552, 2974340165), new $Uint64(2919961995, 1194881118)]), $toNativeArray($kindUint64, [new $Uint64(1001248292, 3717925207), new $Uint64(3649952494, 419859574)]), $toNativeArray($kindUint64, [new $Uint64(3847005655, 176219606), new $Uint64(2281220308, 3483637705)]), $toNativeArray($kindUint64, [new $Uint64(1587531596, 3441499980), new $Uint64(2851525386, 59579836)]), $toNativeArray($kindUint64, [new $Uint64(1984414496, 6907679), new $Uint64(3564406732, 2221958443)]), $toNativeArray($kindUint64, [new $Uint64(703388148, 4317299), new $Uint64(2227754207, 3536207675)]), $toNativeArray($kindUint64, [new $Uint64(4100460657, 5396624), new $Uint64(2784692759, 3346517769)]), $toNativeArray($kindUint64, [new $Uint64(1904350349, 1080487604), new $Uint64(3480865949, 3109405388)]), $toNativeArray($kindUint64, [new $Uint64(3337702616, 1212175664), new $Uint64(2175541218, 2480249279)]), $toNativeArray($kindUint64, [new $Uint64(3098386446, 1515219580), new $Uint64(2719426523, 952827951)]), $toNativeArray($kindUint64, [new $Uint64(2799241233, 4041508124), new $Uint64(3399283154, 117293115)]), $toNativeArray($kindUint64, [new $Uint64(2425309718, 1830659683), new $Uint64(4249103942, 2294100042)]), $toNativeArray($kindUint64, [new $Uint64(2589560398, 70420478), new $Uint64(2655689964, 360070702)]), $toNativeArray($kindUint64, [new $Uint64(1089466849, 2235509245), new $Uint64(3319612455, 450088378)]), $toNativeArray($kindUint64, [new $Uint64(3509317209, 3868128380), new $Uint64(4149515568, 3783835944)]), $toNativeArray($kindUint64, [new $Uint64(2193323256, 806967502), new $Uint64(2593447230, 2364897465)]), $toNativeArray($kindUint64, [new $Uint64(3815395894, 1008709377), new $Uint64(3241809038, 808638183)]), $toNativeArray($kindUint64, [new $Uint64(3695503043, 3408370369), new $Uint64(4052261297, 3158281377)]), $toNativeArray($kindUint64, [new $Uint64(699076666, 1593360569), new $Uint64(2532663311, 363313125)]), $toNativeArray($kindUint64, [new $Uint64(1947587656, 4139184359), new $Uint64(3165829138, 3675366878)]), $toNativeArray($kindUint64, [new $Uint64(287000923, 879013153), new $Uint64(3957286423, 2446724950)]), $toNativeArray($kindUint64, [new $Uint64(3400601049, 12512308), new $Uint64(2473304014, 3139815829)]), $toNativeArray($kindUint64, [new $Uint64(1029525839, 1089382210), new $Uint64(3091630018, 1777286139)]), $toNativeArray($kindUint64, [new $Uint64(213165475, 287985938), new $Uint64(3864537523, 74124026)]), $toNativeArray($kindUint64, [new $Uint64(1206970245, 3938087595), new $Uint64(2415335951, 3804423900)]), $toNativeArray($kindUint64, [new $Uint64(1508712807, 1701384022), new $Uint64(3019169939, 3681788051)]), $toNativeArray($kindUint64, [new $Uint64(812149185, 1052988204), new $Uint64(3773962424, 3528493240)]), $toNativeArray($kindUint64, [new $Uint64(507593240, 3342472187), new $Uint64(2358726515, 2205308275)]), $toNativeArray($kindUint64, [new $Uint64(3855717022, 4178090234), new $Uint64(2948408144, 1682893519)]), $toNativeArray($kindUint64, [new $Uint64(3745904454, 3075129145), new $Uint64(3685510180, 2103616899)]), $toNativeArray($kindUint64, [new $Uint64(1804319372, 848213891), new $Uint64(2303443862, 3462244210)]), $toNativeArray($kindUint64, [new $Uint64(107915567, 1060267364), new $Uint64(2879304828, 2180321615)]), $toNativeArray($kindUint64, [new $Uint64(3356119931, 251592381), new $Uint64(3599131035, 2725402018)]), $toNativeArray($kindUint64, [new $Uint64(3171316780, 3915341622), new $Uint64(2249456897, 1166505349)]), $toNativeArray($kindUint64, [new $Uint64(742920504, 599209732), new $Uint64(2811821121, 2531873511)]), $toNativeArray($kindUint64, [new $Uint64(4149876102, 749012165), new $Uint64(3514776401, 4238583712)]), $toNativeArray($kindUint64, [new $Uint64(2593672563, 3689358075), new $Uint64(2196735251, 1038502084)]), $toNativeArray($kindUint64, [new $Uint64(3242090704, 3537955770), new $Uint64(2745919064, 224385781)]), $toNativeArray($kindUint64, [new $Uint64(831387909, 127477416), new $Uint64(3432398830, 280482227)]), $toNativeArray($kindUint64, [new $Uint64(4260460358, 1233088594), new $Uint64(4290498537, 2498086431)]), $toNativeArray($kindUint64, [new $Uint64(4273400459, 3991905843), new $Uint64(2681561585, 4245658579)]), $toNativeArray($kindUint64, [new $Uint64(4268008750, 3916140480), new $Uint64(3351951982, 2085847752)]), $toNativeArray($kindUint64, [new $Uint64(1040043642, 2747691952), new $Uint64(4189939978, 459826043)]), $toNativeArray($kindUint64, [new $Uint64(113156364, 2791049294), new $Uint64(2618712486, 1361133101)]), $toNativeArray($kindUint64, [new $Uint64(1215187279, 3488811618), new $Uint64(3273390607, 3848900024)]), $toNativeArray($kindUint64, [new $Uint64(1518984099, 3287272698), new $Uint64(4091738259, 3737383206)]), $toNativeArray($kindUint64, [new $Uint64(4170590534, 1517674524), new $Uint64(2557336412, 1798993591)]), $toNativeArray($kindUint64, [new $Uint64(4139496343, 4044576803), new $Uint64(3196670515, 2248741989)]), $toNativeArray($kindUint64, [new $Uint64(1953144957, 3981979180), new $Uint64(3995838144, 1737185663)]), $toNativeArray($kindUint64, [new $Uint64(2831328334, 3025607900), new $Uint64(2497398840, 1085741039)]), $toNativeArray($kindUint64, [new $Uint64(2465418594, 1634526227), new $Uint64(3121748550, 1357176299)]), $toNativeArray($kindUint64, [new $Uint64(2008031418, 4190641431), new $Uint64(3902185687, 3843954022)]), $toNativeArray($kindUint64, [new $Uint64(181277812, 3692892718), new $Uint64(2438866054, 4013084000)]), $toNativeArray($kindUint64, [new $Uint64(226597266, 321148602), new $Uint64(3048582568, 2868871352)]), $toNativeArray($kindUint64, [new $Uint64(283246582, 2548919401), new $Uint64(3810728210, 3586089190)]), $toNativeArray($kindUint64, [new $Uint64(3398254586, 519332801), new $Uint64(2381705131, 3315047567)]), $toNativeArray($kindUint64, [new $Uint64(3174076408, 2796649650), new $Uint64(2977131414, 3070067635)]), $toNativeArray($kindUint64, [new $Uint64(2893853686, 3495812062), new $Uint64(3721414268, 1690100896)]), $toNativeArray($kindUint64, [new $Uint64(1808658554, 1111140715), new $Uint64(2325883917, 3203796708)]), $toNativeArray($kindUint64, [new $Uint64(2260823192, 3536409542), new $Uint64(2907354897, 783520413)]), $toNativeArray($kindUint64, [new $Uint64(3899770815, 125544631), new $Uint64(3634193621, 2053142340)]), $toNativeArray($kindUint64, [new $Uint64(289873111, 1689078130), new $Uint64(2271371013, 1820084875)]), $toNativeArray($kindUint64, [new $Uint64(3583566861, 1037605839), new $Uint64(2839213766, 3348847917)]), $toNativeArray($kindUint64, [new $Uint64(1258233104, 2370749123), new $Uint64(3549017208, 2038576249)]), $toNativeArray($kindUint64, [new $Uint64(3470750250, 1481718202), new $Uint64(2218135755, 1274110155)]), $toNativeArray($kindUint64, [new $Uint64(3264695988, 3999631400), new $Uint64(2772669694, 518895870)]), $toNativeArray($kindUint64, [new $Uint64(1933386338, 704571954), new $Uint64(3465837117, 2796103486)]), $toNativeArray($kindUint64, [new $Uint64(134624637, 1514099295), new $Uint64(2166148198, 2284435591)]), $toNativeArray($kindUint64, [new $Uint64(3389506268, 2966365943), new $Uint64(2707685248, 708060840)]), $toNativeArray($kindUint64, [new $Uint64(4236882835, 3707957429), new $Uint64(3384606560, 885076050)]), $toNativeArray($kindUint64, [new $Uint64(3148619896, 3561204962), new $Uint64(4230758200, 1106345063)]), $toNativeArray($kindUint64, [new $Uint64(3578500171, 2225753101), new $Uint64(2644223875, 691465664)]), $toNativeArray($kindUint64, [new $Uint64(178157918, 1708449553), new $Uint64(3305279843, 4085557553)]), $toNativeArray($kindUint64, [new $Uint64(1296439221, 4283045589), new $Uint64(4131599804, 4033205117)]), $toNativeArray($kindUint64, [new $Uint64(1347145425, 3213774405), new $Uint64(2582249878, 373269550)]), $toNativeArray($kindUint64, [new $Uint64(3831415430, 795992534), new $Uint64(3227812347, 2614070585)]), $toNativeArray($kindUint64, [new $Uint64(1568043815, 3142474316), new $Uint64(4034765434, 2193846408)]), $toNativeArray($kindUint64, [new $Uint64(980027384, 3574659183), new $Uint64(2521728396, 2444895829)]), $toNativeArray($kindUint64, [new $Uint64(2298776055, 173356683), new $Uint64(3152160495, 3056119786)]), $toNativeArray($kindUint64, [new $Uint64(725986420, 3437921326), new $Uint64(3940200619, 2746407909)]), $toNativeArray($kindUint64, [new $Uint64(990612425, 1217181), new $Uint64(2462625387, 1179634031)]), $toNativeArray($kindUint64, [new $Uint64(164523707, 1075263300), new $Uint64(3078281734, 400800715)]), $toNativeArray($kindUint64, [new $Uint64(3426880106, 270337301), new $Uint64(3847852167, 2648484541)]), $toNativeArray($kindUint64, [new $Uint64(2678670978, 1242702637), new $Uint64(2404907604, 3265915574)]), $toNativeArray($kindUint64, [new $Uint64(1200855074, 3700861945), new $Uint64(3006134505, 4082394468)]), $toNativeArray($kindUint64, [new $Uint64(1501068843, 2478593783), new $Uint64(3757668132, 1881767613)]), $toNativeArray($kindUint64, [new $Uint64(1475038939, 1012250202), new $Uint64(2348542582, 3323588406)]), $toNativeArray($kindUint64, [new $Uint64(3991282322, 191570929), new $Uint64(2935678228, 2007001859)]), $toNativeArray($kindUint64, [new $Uint64(3915361078, 2386947309), new $Uint64(3669597785, 2508752324)]), $toNativeArray($kindUint64, [new $Uint64(299617026, 418100244), new $Uint64(2293498615, 4252324763)]), $toNativeArray($kindUint64, [new $Uint64(3595746754, 2670108953), new $Uint64(2866873269, 4241664129)]), $toNativeArray($kindUint64, [new $Uint64(1273457971, 1190152543), new $Uint64(3583591587, 2080854690)]), $toNativeArray($kindUint64, [new $Uint64(1869653056, 206974427), new $Uint64(2239744742, 763663269)]), $toNativeArray($kindUint64, [new $Uint64(3410808144, 258718034), new $Uint64(2799680927, 3102062734)]), $toNativeArray($kindUint64, [new $Uint64(2116026532, 323397543), new $Uint64(3499601159, 2803836594)]), $toNativeArray($kindUint64, [new $Uint64(2396258406, 2349607112), new $Uint64(2187250724, 3363010607)]), $toNativeArray($kindUint64, [new $Uint64(1921581184, 789525242), new $Uint64(2734063405, 4203763259)]), $toNativeArray($kindUint64, [new $Uint64(1328234656, 986906553), new $Uint64(3417579257, 2033478602)]), $toNativeArray($kindUint64, [new $Uint64(3807776968, 1233633192), new $Uint64(4271974071, 3615590076)]), $toNativeArray($kindUint64, [new $Uint64(232376957, 771020745), new $Uint64(2669983794, 3870356534)]), $toNativeArray($kindUint64, [new $Uint64(2437954844, 2037517755), new $Uint64(3337479743, 2690462019)]), $toNativeArray($kindUint64, [new $Uint64(1973701731, 2546897194), new $Uint64(4171849679, 2289335700)]), $toNativeArray($kindUint64, [new $Uint64(3381047230, 1054939834), new $Uint64(2607406049, 3041447548)]), $toNativeArray($kindUint64, [new $Uint64(4226309037, 3466158440), new $Uint64(3259257562, 580583963)]), $toNativeArray($kindUint64, [new $Uint64(4209144473, 1111472579), new $Uint64(4074071952, 2873213602)]), $toNativeArray($kindUint64, [new $Uint64(3704457119, 3379024922), new $Uint64(2546294970, 1795758501)]), $toNativeArray($kindUint64, [new $Uint64(1409345927, 3150039328), new $Uint64(3182868713, 97214479)]), $toNativeArray($kindUint64, [new $Uint64(687940585, 2863807336), new $Uint64(3978585891, 1195259923)]), $toNativeArray($kindUint64, [new $Uint64(4188059250, 179266849), new $Uint64(2486616182, 210166539)]), $toNativeArray($kindUint64, [new $Uint64(4161332238, 2371567209), new $Uint64(3108270227, 2410191822)]), $toNativeArray($kindUint64, [new $Uint64(3054181650, 816975364), new $Uint64(3885337784, 1938997954)]), $toNativeArray($kindUint64, [new $Uint64(2982605355, 1584351426), new $Uint64(2428336115, 1211873721)]), $toNativeArray($kindUint64, [new $Uint64(507031222, 906697459), new $Uint64(3035420144, 441100328)]), $toNativeArray($kindUint64, [new $Uint64(633789027, 3280855472), new $Uint64(3794275180, 551375410)]), $toNativeArray($kindUint64, [new $Uint64(1469859966, 1513663758), new $Uint64(2371421987, 2492093279)]), $toNativeArray($kindUint64, [new $Uint64(763583133, 4039563345), new $Uint64(2964277484, 2041374775)]), $toNativeArray($kindUint64, [new $Uint64(4175704389, 1828228709), new $Uint64(3705346855, 2551718468)]), $toNativeArray($kindUint64, [new $Uint64(462331595, 1679513855), new $Uint64(2315841784, 3205436779)]), $toNativeArray($kindUint64, [new $Uint64(3799139966, 1025650495), new $Uint64(2894802230, 4006795973)]), $toNativeArray($kindUint64, [new $Uint64(1527699485, 3429546767), new $Uint64(3618502788, 2861011319)]), $toNativeArray($kindUint64, [new $Uint64(2565424914, 2680337641), new $Uint64(2261564242, 3935615722)]), $toNativeArray($kindUint64, [new $Uint64(1059297495, 1202938404), new $Uint64(2826955303, 2772036005)]), $toNativeArray($kindUint64, [new $Uint64(2397863693, 429931181), new $Uint64(3533694129, 2391303182)]), $toNativeArray($kindUint64, [new $Uint64(424922984, 805577900), new $Uint64(2208558830, 4178919049)]), $toNativeArray($kindUint64, [new $Uint64(1604895554, 1006972375), new $Uint64(2760698538, 3076165163)]), $toNativeArray($kindUint64, [new $Uint64(932377618, 3406199117), new $Uint64(3450873173, 1697722806)]), $toNativeArray($kindUint64, [new $Uint64(3803961483, 3202616272), new $Uint64(2156795733, 1597947665)]), $toNativeArray($kindUint64, [new $Uint64(1533726382, 2929528516), new $Uint64(2695994666, 3071176406)]), $toNativeArray($kindUint64, [new $Uint64(4064641626, 1514426997), new $Uint64(3369993333, 1691486859)]), $toNativeArray($kindUint64, [new $Uint64(4007060208, 4040517394), new $Uint64(4212491666, 3188100398)]), $toNativeArray($kindUint64, [new $Uint64(1430670806, 2525323371), new $Uint64(2632807291, 3066304573)]), $toNativeArray($kindUint64, [new $Uint64(2862080332, 1009170566), new $Uint64(3291009114, 2759138892)]), $toNativeArray($kindUint64, [new $Uint64(3577600415, 1261463208), new $Uint64(4113761393, 1301439967)]), $toNativeArray($kindUint64, [new $Uint64(3846612995, 2399027241), new $Uint64(2571100870, 3497754539)]), $toNativeArray($kindUint64, [new $Uint64(3734524420, 1925042227), new $Uint64(3213876088, 2224709526)]), $toNativeArray($kindUint64, [new $Uint64(2520671877, 2406302784), new $Uint64(4017345110, 2780886908)]), $toNativeArray($kindUint64, [new $Uint64(3722903571, 2040810152), new $Uint64(2510840694, 664312493)]), $toNativeArray($kindUint64, [new $Uint64(1432403992, 1477270866), new $Uint64(3138550867, 2977874265)]), $toNativeArray($kindUint64, [new $Uint64(2864246814, 1846588582), new $Uint64(3923188584, 2648601007)]), $toNativeArray($kindUint64, [new $Uint64(3400766995, 80376040), new $Uint64(2451992865, 1655375629)]), $toNativeArray($kindUint64, [new $Uint64(1029733271, 3321695522), new $Uint64(3064991081, 3142961361)]), $toNativeArray($kindUint64, [new $Uint64(2360908413, 3078377578), new $Uint64(3831238852, 707476229)]), $toNativeArray($kindUint64, [new $Uint64(2012438670, 2460856898), new $Uint64(2394524282, 2589656291)]), $toNativeArray($kindUint64, [new $Uint64(1441806514, 928587475), new $Uint64(2993155353, 1089586716)]), $toNativeArray($kindUint64, [new $Uint64(1802258142, 3308217992), new $Uint64(3741444191, 2435725219)]), $toNativeArray($kindUint64, [new $Uint64(589540427, 993894421), new $Uint64(2338402619, 3132940998)]), $toNativeArray($kindUint64, [new $Uint64(2884409182, 168626202), new $Uint64(2923003274, 2842434423)]), $toNativeArray($kindUint64, [new $Uint64(2531769653, 2358266401), new $Uint64(3653754093, 1405559381)]), $toNativeArray($kindUint64, [new $Uint64(2119226945, 2010787412), new $Uint64(2283596308, 1415345525)]), $toNativeArray($kindUint64, [new $Uint64(3722775505, 3587226089), new $Uint64(2854495385, 1769181906)]), $toNativeArray($kindUint64, [new $Uint64(2505985734, 1262807140), new $Uint64(3568119231, 3285219207)]), $toNativeArray($kindUint64, [new $Uint64(3176853819, 4010479934), new $Uint64(2230074519, 3663874740)]), $toNativeArray($kindUint64, [new $Uint64(3971067274, 3939358094), new $Uint64(2787593149, 3506101601)]), $toNativeArray($kindUint64, [new $Uint64(1742608621, 2776713970), new $Uint64(3484491437, 1161401530)]), $toNativeArray($kindUint64, [new $Uint64(2162872212, 2272317143), new $Uint64(2177807148, 1262746868)]), $toNativeArray($kindUint64, [new $Uint64(2703590265, 2840396429), new $Uint64(2722258935, 1578433585)]), $toNativeArray($kindUint64, [new $Uint64(158262360, 329270064), new $Uint64(3402823669, 899300158)]), $toNativeArray($kindUint64, [new $Uint64(2345311598, 411587580), new $Uint64(4253529586, 2197867021)]), $toNativeArray($kindUint64, [new $Uint64(2002690660, 3478467709), new $Uint64(2658455991, 2447408712)]), $toNativeArray($kindUint64, [new $Uint64(2503363326, 53117341), new $Uint64(3323069989, 1985519066)]), $toNativeArray($kindUint64, [new $Uint64(981720509, 2213880324), new $Uint64(4153837486, 3555640657)]), $toNativeArray($kindUint64, [new $Uint64(3297929878, 1920546114), new $Uint64(2596148429, 1148533586)]), $toNativeArray($kindUint64, [new $Uint64(1974928700, 253198995), new $Uint64(3245185536, 2509408807)]), $toNativeArray($kindUint64, [new $Uint64(1394919051, 316498744), new $Uint64(4056481920, 3136761009)]), $toNativeArray($kindUint64, [new $Uint64(3556178966, 3955908099), new $Uint64(2535301200, 1960475630)]), $toNativeArray($kindUint64, [new $Uint64(2297740060, 2797401476), new $Uint64(3169126500, 2450594538)]), $toNativeArray($kindUint64, [new $Uint64(724691427, 3496751845), new $Uint64(3961408125, 3063243173)]), $toNativeArray($kindUint64, [new $Uint64(989803054, 1648598991), new $Uint64(2475880078, 2451397895)]), $toNativeArray($kindUint64, [new $Uint64(163511993, 4208232386), new $Uint64(3094850098, 916763721)]), $toNativeArray($kindUint64, [new $Uint64(1278131816, 2039065011), new $Uint64(3868562622, 3293438299)]), $toNativeArray($kindUint64, [new $Uint64(261961473, 1274415632), new $Uint64(2417851639, 984657113)]), $toNativeArray($kindUint64, [new $Uint64(1401193665, 2666761364), new $Uint64(3022314549, 157079567)]), $toNativeArray($kindUint64, [new $Uint64(677750258, 112226233), new $Uint64(3777893186, 1270091283)]), $toNativeArray($kindUint64, [new $Uint64(4181690295, 1143883219), new $Uint64(2361183241, 1867548875)]), $toNativeArray($kindUint64, [new $Uint64(4153371045, 356112200), new $Uint64(2951479051, 3408177918)]), $toNativeArray($kindUint64, [new $Uint64(3044230158, 1518882075), new $Uint64(3689348814, 3186480574)]), $toNativeArray($kindUint64, [new $Uint64(828902024, 4170526768), new $Uint64(2305843009, 917808535)]), $toNativeArray($kindUint64, [new $Uint64(4257353003, 918191165), new $Uint64(2882303761, 2221002492)]), $toNativeArray($kindUint64, [new $Uint64(1026723958, 73997132), new $Uint64(3602879701, 3849994940)]), $toNativeArray($kindUint64, [new $Uint64(2789186121, 3267473679), new $Uint64(2251799813, 2943117749)]), $toNativeArray($kindUint64, [new $Uint64(265257180, 863116627), new $Uint64(2814749767, 457671715)]), $toNativeArray($kindUint64, [new $Uint64(3552796947, 1078895784), new $Uint64(3518437208, 3793315115)]), $toNativeArray($kindUint64, [new $Uint64(1683627180, 137438953), new $Uint64(2199023255, 2370821947)]), $toNativeArray($kindUint64, [new $Uint64(1030792151, 171798691), new $Uint64(2748779069, 1889785610)]), $toNativeArray($kindUint64, [new $Uint64(3435973836, 3435973836), new $Uint64(3435973836, 3435973836)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2147483648, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2684354560, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3355443200, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(4194304000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2621440000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3276800000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(4096000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2560000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3200000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(4000000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2500000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3125000000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3906250000, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2441406250, 0)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3051757812, 2147483648)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3814697265, 2684354560)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2384185791, 67108864)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2980232238, 3305111552)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3725290298, 1983905792)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2328306436, 2313682944)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2910383045, 2892103680)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3637978807, 393904128)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2273736754, 1856802816)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2842170943, 173519872)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3552713678, 3438125312)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2220446049, 1075086496)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(2775557561, 2417599944)]), $toNativeArray($kindUint64, [new $Uint64(0, 0), new $Uint64(3469446951, 4095741754)]), $toNativeArray($kindUint64, [new $Uint64(1073741824, 0), new $Uint64(2168404344, 4170451332)]), $toNativeArray($kindUint64, [new $Uint64(1342177280, 0), new $Uint64(2710505431, 918096869)]), $toNativeArray($kindUint64, [new $Uint64(2751463424, 0), new $Uint64(3388131789, 73879262)]), $toNativeArray($kindUint64, [new $Uint64(1291845632, 0), new $Uint64(4235164736, 1166090902)]), $toNativeArray($kindUint64, [new $Uint64(4028628992, 0), new $Uint64(2646977960, 728806813)]), $toNativeArray($kindUint64, [new $Uint64(1814560768, 0), new $Uint64(3308722450, 911008517)]), $toNativeArray($kindUint64, [new $Uint64(3341942784, 0), new $Uint64(4135903062, 3286244294)]), $toNativeArray($kindUint64, [new $Uint64(1014972416, 0), new $Uint64(2584939414, 980160860)]), $toNativeArray($kindUint64, [new $Uint64(1268715520, 0), new $Uint64(3231174267, 3372684723)]), $toNativeArray($kindUint64, [new $Uint64(512152576, 0), new $Uint64(4038967834, 3142114080)]), $toNativeArray($kindUint64, [new $Uint64(320095360, 0), new $Uint64(2524354896, 3037563124)]), $toNativeArray($kindUint64, [new $Uint64(400119200, 0), new $Uint64(3155443620, 3796953905)]), $toNativeArray($kindUint64, [new $Uint64(1573890824, 0), new $Uint64(3944304526, 451225085)]), $toNativeArray($kindUint64, [new $Uint64(1520552677, 0), new $Uint64(2465190328, 3503241150)]), $toNativeArray($kindUint64, [new $Uint64(4048174494, 1073741824), new $Uint64(3081487911, 84084141)]), $toNativeArray($kindUint64, [new $Uint64(1838992645, 3489660928), new $Uint64(3851859888, 3326330649)]), $toNativeArray($kindUint64, [new $Uint64(3833724963, 2717908992), new $Uint64(2407412430, 2078956655)]), $toNativeArray($kindUint64, [new $Uint64(3718414380, 2323644416), new $Uint64(3009265538, 451212171)]), $toNativeArray($kindUint64, [new $Uint64(3574276151, 2904555520), new $Uint64(3761581922, 2711498862)]), $toNativeArray($kindUint64, [new $Uint64(1160180770, 3425959936), new $Uint64(2350988701, 2768428613)]), $toNativeArray($kindUint64, [new $Uint64(2523967787, 2134966272), new $Uint64(2938735877, 239310294)]), $toNativeArray($kindUint64, [new $Uint64(1007476086, 1594966016), new $Uint64(3673419846, 1372879692)]), $toNativeArray($kindUint64, [new $Uint64(2777156201, 4218079232), new $Uint64(2295887403, 4079275279)]), $toNativeArray($kindUint64, [new $Uint64(2397703428, 2051373568), new $Uint64(2869859254, 4025352275)]), $toNativeArray($kindUint64, [new $Uint64(1923387461, 2564216960), new $Uint64(3587324068, 2884206696)]), $toNativeArray($kindUint64, [new $Uint64(1202117163, 2139506512), new $Uint64(2242077542, 3950112833)]), $toNativeArray($kindUint64, [new $Uint64(2576388278, 1600641316), new $Uint64(2802596928, 2790157393)]), $toNativeArray($kindUint64, [new $Uint64(4294227171, 4148285293), new $Uint64(3503246160, 3487696741)]), $toNativeArray($kindUint64, [new $Uint64(3220762894, 2055807396), new $Uint64(2189528850, 2179810463)]), $toNativeArray($kindUint64, [new $Uint64(2952211794, 422275597), new $Uint64(2736911063, 577279431)]), $toNativeArray($kindUint64, [new $Uint64(2616522918, 2675328144), new $Uint64(3421138828, 3942824761)]), $toNativeArray($kindUint64, [new $Uint64(49428176, 1196676532), new $Uint64(4276423536, 633563656)]), $toNativeArray($kindUint64, [new $Uint64(30892610, 747922832), new $Uint64(2672764710, 395977285)]), $toNativeArray($kindUint64, [new $Uint64(1112357586, 3082387189), new $Uint64(3340955887, 2642455254)]), $toNativeArray($kindUint64, [new $Uint64(3537930631, 1705500338), new $Uint64(4176194859, 2229327243)]), $toNativeArray($kindUint64, [new $Uint64(1674335732, 2676550447), new $Uint64(2610121787, 856458615)]), $toNativeArray($kindUint64, [new $Uint64(1019177841, 3345688059), new $Uint64(3262652233, 4291798741)]), $toNativeArray($kindUint64, [new $Uint64(2347714126, 960884602), new $Uint64(4078315292, 2143522954)]), $toNativeArray($kindUint64, [new $Uint64(2541063152, 3821778348), new $Uint64(2548947057, 3487185494)]), $toNativeArray($kindUint64, [new $Uint64(1028845293, 482255639), new $Uint64(3186183822, 1137756396)]), $toNativeArray($kindUint64, [new $Uint64(1286056616, 1676561373), new $Uint64(3982729777, 3569679143)]), $toNativeArray($kindUint64, [new $Uint64(2414398121, 1047850858), new $Uint64(2489206111, 620436728)]), $toNativeArray($kindUint64, [new $Uint64(3017997651, 2383555396), new $Uint64(3111507638, 3996771382)]), $toNativeArray($kindUint64, [new $Uint64(1625013416, 1905702422), new $Uint64(3889384548, 2848480580)]), $toNativeArray($kindUint64, [new $Uint64(3163117033, 1191064013), new $Uint64(2430865342, 3927784010)]), $toNativeArray($kindUint64, [new $Uint64(1806412643, 2562571841), new $Uint64(3038581678, 2762246365)]), $toNativeArray($kindUint64, [new $Uint64(3331757628, 2129472977), new $Uint64(3798227098, 1305324308)]), $toNativeArray($kindUint64, [new $Uint64(4229832165, 3478404258), new $Uint64(2373891936, 1889569516)]), $toNativeArray($kindUint64, [new $Uint64(992322911, 1126779851), new $Uint64(2967364920, 2361961896)]), $toNativeArray($kindUint64, [new $Uint64(1240403639, 334732990), new $Uint64(3709206150, 2952452370)]), $toNativeArray($kindUint64, [new $Uint64(1848994098, 1819820855), new $Uint64(2318253844, 771540907)]), $toNativeArray($kindUint64, [new $Uint64(1237500799, 127292420), new $Uint64(2897817305, 964426134)]), $toNativeArray($kindUint64, [new $Uint64(3694359646, 3380340998), new $Uint64(3622271631, 2279274491)]), $toNativeArray($kindUint64, [new $Uint64(1772103867, 1038971299), new $Uint64(2263919769, 3035159293)]), $toNativeArray($kindUint64, [new $Uint64(3288871658, 224972300), new $Uint64(2829899712, 572723644)]), $toNativeArray($kindUint64, [new $Uint64(4111089572, 2428699024), new $Uint64(3537374640, 715904555)]), $toNativeArray($kindUint64, [new $Uint64(2032560070, 3665420538), new $Uint64(2210859150, 447440347)]), $toNativeArray($kindUint64, [new $Uint64(1466958264, 2434292024), new $Uint64(2763573937, 2706784082)]), $toNativeArray($kindUint64, [new $Uint64(3981181478, 3042865030), new $Uint64(3454467422, 162254630)]), $toNativeArray($kindUint64, [new $Uint64(1414496600, 828048820), new $Uint64(2159042138, 3322634616)]), $toNativeArray($kindUint64, [new $Uint64(1768120750, 1035061025), new $Uint64(2698802673, 2005809622)]), $toNativeArray($kindUint64, [new $Uint64(62667289, 3441309929), new $Uint64(3373503341, 3581003852)]), $toNativeArray($kindUint64, [new $Uint64(78334112, 1080411939), new $Uint64(4216879177, 1255029343)]), $toNativeArray($kindUint64, [new $Uint64(1659571556, 675257462), new $Uint64(2635549485, 3468747899)]), $toNativeArray($kindUint64, [new $Uint64(1000722621, 844071828), new $Uint64(3294436857, 1114709402)]), $toNativeArray($kindUint64, [new $Uint64(3398386924, 2128831609), new $Uint64(4118046071, 2467128576)]), $toNativeArray($kindUint64, [new $Uint64(2123991827, 3478003403), new $Uint64(2573778794, 3152568096)]), $toNativeArray($kindUint64, [new $Uint64(2654989784, 3273762430), new $Uint64(3217223493, 1793226472)]), $toNativeArray($kindUint64, [new $Uint64(3318737230, 4092203038), new $Uint64(4021529366, 3315274914)]), $toNativeArray($kindUint64, [new $Uint64(3147952593, 1483885074), new $Uint64(2513455854, 998304997)]), $toNativeArray($kindUint64, [new $Uint64(713715269, 2928598167), new $Uint64(3141819817, 3395364895)]), $toNativeArray($kindUint64, [new $Uint64(4113369559, 439522237), new $Uint64(3927274772, 1022980646)]), $toNativeArray($kindUint64, [new $Uint64(1497114150, 1885314134), new $Uint64(2454546732, 2786846552)]), $toNativeArray($kindUint64, [new $Uint64(1871392688, 209159020), new $Uint64(3068183415, 3483558190)]), $toNativeArray($kindUint64, [new $Uint64(191757212, 261448775), new $Uint64(3835229269, 3280705914)]), $toNativeArray($kindUint64, [new $Uint64(1193590081, 2310889132), new $Uint64(2397018293, 2587312108)]), $toNativeArray($kindUint64, [new $Uint64(1491987601, 3962353239), new $Uint64(2996272867, 12914663)]), $toNativeArray($kindUint64, [new $Uint64(791242678, 1731716077), new $Uint64(3745341083, 3237368801)]), $toNativeArray($kindUint64, [new $Uint64(3178881234, 8580724), new $Uint64(2340838177, 1486484588)]), $toNativeArray($kindUint64, [new $Uint64(3973601542, 2158209553), new $Uint64(2926047721, 2931847559)]), $toNativeArray($kindUint64, [new $Uint64(3893260104, 550278293), new $Uint64(3657559652, 443583977)]), $toNativeArray($kindUint64, [new $Uint64(822674829, 343923933), new $Uint64(2285974782, 2424723634)]), $toNativeArray($kindUint64, [new $Uint64(3175827184, 1503646741), new $Uint64(2857468478, 883420894)]), $toNativeArray($kindUint64, [new $Uint64(1822300332, 1879558426), new $Uint64(3571835597, 3251759766)]), $toNativeArray($kindUint64, [new $Uint64(65195883, 3322207664), new $Uint64(2232397248, 2569220766)]), $toNativeArray($kindUint64, [new $Uint64(2228978502, 3079017756), new $Uint64(2790496560, 3211525957)]), $toNativeArray($kindUint64, [new $Uint64(3859964952, 1701288547), new $Uint64(3488120700, 4014407446)]), $toNativeArray($kindUint64, [new $Uint64(1338736271, 1063305342), new $Uint64(2180075438, 361521006)]), $toNativeArray($kindUint64, [new $Uint64(3820903987, 255389853), new $Uint64(2725094297, 2599384905)]), $toNativeArray($kindUint64, [new $Uint64(1554904511, 3540462789), new $Uint64(3406367872, 28005660)]), $toNativeArray($kindUint64, [new $Uint64(1943630639, 3351836662), new $Uint64(4257959840, 35007075)]), $toNativeArray($kindUint64, [new $Uint64(677898237, 3705510650), new $Uint64(2661224900, 21879422)]), $toNativeArray($kindUint64, [new $Uint64(2994856445, 1410662840), new $Uint64(3326531125, 27349277)]), $toNativeArray($kindUint64, [new $Uint64(522345084, 2837070374), new $Uint64(4158163906, 1107928421)]), $toNativeArray($kindUint64, [new $Uint64(863336589, 3920652632), new $Uint64(2598852441, 1766197087)]), $toNativeArray($kindUint64, [new $Uint64(5428913, 1679590318), new $Uint64(3248565551, 3281488183)]), $toNativeArray($kindUint64, [new $Uint64(3228011613, 3173229722), new $Uint64(4060706939, 3028118404)]), $toNativeArray($kindUint64, [new $Uint64(4164990906, 2520139488), new $Uint64(2537941837, 1355703090)]), $toNativeArray($kindUint64, [new $Uint64(3058754985, 1002690712), new $Uint64(3172427296, 2768370687)]), $toNativeArray($kindUint64, [new $Uint64(2749701907, 2327105214), new $Uint64(3965534120, 3460463359)]), $toNativeArray($kindUint64, [new $Uint64(3329176428, 917569847), new $Uint64(2478458825, 2162789599)]), $toNativeArray($kindUint64, [new $Uint64(3087728711, 1146962308), new $Uint64(3098073531, 3777228823)]), $toNativeArray($kindUint64, [new $Uint64(2785919065, 359961061), new $Uint64(3872591914, 3647794205)]), $toNativeArray($kindUint64, [new $Uint64(2278070327, 2909330223), new $Uint64(2420369946, 3353613202)]), $toNativeArray($kindUint64, [new $Uint64(700104261, 2562920955), new $Uint64(3025462433, 2044532855)]), $toNativeArray($kindUint64, [new $Uint64(4096355798, 4277393018), new $Uint64(3781828041, 3629407892)]), $toNativeArray($kindUint64, [new $Uint64(412738726, 1599628812), new $Uint64(2363642526, 657767197)]), $toNativeArray($kindUint64, [new $Uint64(1589665231, 4147019663), new $Uint64(2954553157, 2969692644)]), $toNativeArray($kindUint64, [new $Uint64(1987081539, 4110032755), new $Uint64(3693191447, 490890333)]), $toNativeArray($kindUint64, [new $Uint64(1778796874, 2031899560), new $Uint64(2308244654, 1917419194)]), $toNativeArray($kindUint64, [new $Uint64(76012445, 392390802), new $Uint64(2885305818, 249290345)]), $toNativeArray($kindUint64, [new $Uint64(1168757380, 1564230326), new $Uint64(3606632272, 2459096579)]), $toNativeArray($kindUint64, [new $Uint64(193602450, 3125127602), new $Uint64(2254145170, 1536935362)]), $toNativeArray($kindUint64, [new $Uint64(2389486711, 1758925854), new $Uint64(2817681462, 4068652850)]), $toNativeArray($kindUint64, [new $Uint64(839374741, 1124915494), new $Uint64(3522101828, 2938332415)]), $toNativeArray($kindUint64, [new $Uint64(2135221949, 1239943096), new $Uint64(2201313642, 3983941407)]), $toNativeArray($kindUint64, [new $Uint64(1595285612, 2623670694), new $Uint64(2751642053, 2832443111)]), $toNativeArray($kindUint64, [new $Uint64(920365191, 3279588367), new $Uint64(3439552567, 319328417)]), $toNativeArray($kindUint64, [new $Uint64(3259582804, 3660355465), new $Uint64(2149720354, 1810192996)]), $toNativeArray($kindUint64, [new $Uint64(4074478506, 280477036), new $Uint64(2687150443, 115257597)]), $toNativeArray($kindUint64, [new $Uint64(1871872660, 2498079943), new $Uint64(3358938053, 3365297469)]), $toNativeArray($kindUint64, [new $Uint64(3413582649, 3122599929), new $Uint64(4198672567, 985396364)]), $toNativeArray($kindUint64, [new $Uint64(4280972804, 341012219), new $Uint64(2624170354, 2226485463)]), $toNativeArray($kindUint64, [new $Uint64(4277474181, 426265274), new $Uint64(3280212943, 635623181)]), $toNativeArray($kindUint64, [new $Uint64(2125617254, 1606573417), new $Uint64(4100266178, 4015754449)]), $toNativeArray($kindUint64, [new $Uint64(4012865343, 4225333857), new $Uint64(2562666361, 3583588354)]), $toNativeArray($kindUint64, [new $Uint64(2868598031, 4207925498), new $Uint64(3203332952, 1258259971)]), $toNativeArray($kindUint64, [new $Uint64(2512005715, 4186165048), new $Uint64(4004166190, 1572824964)]), $toNativeArray($kindUint64, [new $Uint64(3717487220, 2079482243), new $Uint64(2502603868, 4204241074)]), $toNativeArray($kindUint64, [new $Uint64(2499375377, 2599352804), new $Uint64(3128254836, 960334047)]), $toNativeArray($kindUint64, [new $Uint64(2050477398, 27965533), new $Uint64(3910318545, 1200417559)]), $toNativeArray($kindUint64, [new $Uint64(2892161109, 3238703930), new $Uint64(2443949090, 3434615534)]), $toNativeArray($kindUint64, [new $Uint64(1467717739, 827154441), new $Uint64(3054936363, 2145785770)]), $toNativeArray($kindUint64, [new $Uint64(3982130821, 4255168523), new $Uint64(3818670454, 1608490388)]), $toNativeArray($kindUint64, [new $Uint64(341348115, 3196351239), new $Uint64(2386669033, 4226531965)]), $toNativeArray($kindUint64, [new $Uint64(1500426968, 2921697224), new $Uint64(2983336292, 2061939484)]), $toNativeArray($kindUint64, [new $Uint64(1875533710, 3652121531), new $Uint64(3729170365, 2577424355)]), $toNativeArray($kindUint64, [new $Uint64(635337657, 1208834132), new $Uint64(2330731478, 2147761134)]), $toNativeArray($kindUint64, [new $Uint64(2941655719, 2584784490), new $Uint64(2913414348, 537217769)]), $toNativeArray($kindUint64, [new $Uint64(455844177, 2157238788), new $Uint64(3641767935, 671522212)]), $toNativeArray($kindUint64, [new $Uint64(2432386258, 4032628802), new $Uint64(2276104959, 2030314118)]), $toNativeArray($kindUint64, [new $Uint64(892999175, 2893302355), new $Uint64(2845131199, 1464150824)]), $toNativeArray($kindUint64, [new $Uint64(1116248969, 2542886120), new $Uint64(3556413999, 756446706)]), $toNativeArray($kindUint64, [new $Uint64(1771397429, 4273658385), new $Uint64(2222758749, 2083391927)]), $toNativeArray($kindUint64, [new $Uint64(1140504963, 2120847509), new $Uint64(2778448436, 3677981733)]), $toNativeArray($kindUint64, [new $Uint64(2499373028, 1577317563), new $Uint64(3473060546, 302509870)]), $toNativeArray($kindUint64, [new $Uint64(488366318, 3133307125), new $Uint64(2170662841, 1262810493)]), $toNativeArray($kindUint64, [new $Uint64(1684199722, 1769150258), new $Uint64(2713328551, 2652254940)]), $toNativeArray($kindUint64, [new $Uint64(2105249653, 63954174), new $Uint64(3391660689, 2241576851)]), $toNativeArray($kindUint64, [new $Uint64(1557820242, 1153684542), new $Uint64(4239575861, 3875712888)]), $toNativeArray($kindUint64, [new $Uint64(973637651, 1794794663), new $Uint64(2649734913, 2959191467)]), $toNativeArray($kindUint64, [new $Uint64(143305240, 1169751504), new $Uint64(3312168642, 477763862)]), $toNativeArray($kindUint64, [new $Uint64(2326615198, 1462189381), new $Uint64(4140210802, 2744688475)]), $toNativeArray($kindUint64, [new $Uint64(917263586, 4135093835), new $Uint64(2587631751, 2789172121)]), $toNativeArray($kindUint64, [new $Uint64(2220321307, 3021383645), new $Uint64(3234539689, 2412723327)]), $toNativeArray($kindUint64, [new $Uint64(1701659810, 2702987733), new $Uint64(4043174611, 4089645983)]), $toNativeArray($kindUint64, [new $Uint64(2674150117, 2763109157), new $Uint64(2526984132, 2019157827)]), $toNativeArray($kindUint64, [new $Uint64(2268945823, 232660974), new $Uint64(3158730165, 2523947284)]), $toNativeArray($kindUint64, [new $Uint64(2836182278, 3512051690), new $Uint64(3948412706, 4228675929)]), $toNativeArray($kindUint64, [new $Uint64(162001188, 1121290482), new $Uint64(2467757941, 3716664280)]), $toNativeArray($kindUint64, [new $Uint64(202501485, 1401613103), new $Uint64(3084697427, 1424604878)]), $toNativeArray($kindUint64, [new $Uint64(2400610504, 2825758202), new $Uint64(3855871784, 707014273)]), $toNativeArray($kindUint64, [new $Uint64(4184736125, 1766098876), new $Uint64(2409919865, 441883920)]), $toNativeArray($kindUint64, [new $Uint64(935952860, 3281365420), new $Uint64(3012399831, 1626096725)]), $toNativeArray($kindUint64, [new $Uint64(2243682899, 4101706775), new $Uint64(3765499789, 958879082)]), $toNativeArray($kindUint64, [new $Uint64(2476043636, 2026695822), new $Uint64(2353437368, 1136170338)]), $toNativeArray($kindUint64, [new $Uint64(947570897, 2533369778), new $Uint64(2941796710, 1420212923)]), $toNativeArray($kindUint64, [new $Uint64(110721797, 4240454046), new $Uint64(3677245887, 3922749802)]), $toNativeArray($kindUint64, [new $Uint64(1142942947, 3187154691), new $Uint64(2298278679, 4062331362)]), $toNativeArray($kindUint64, [new $Uint64(3576162332, 2910201539), new $Uint64(2872848349, 4004172378)]), $toNativeArray($kindUint64, [new $Uint64(2322719267, 3637751924), new $Uint64(3591060437, 1783990001)]), $toNativeArray($kindUint64, [new $Uint64(4136054102, 1736724041), new $Uint64(2244412773, 1651864662)]), $toNativeArray($kindUint64, [new $Uint64(3022583980, 23421403), new $Uint64(2805515966, 3138572652)]), $toNativeArray($kindUint64, [new $Uint64(3778229975, 29276754), new $Uint64(3506894958, 1775732167)]), $toNativeArray($kindUint64, [new $Uint64(3972006470, 1628910707), new $Uint64(2191809349, 36090780)]), $toNativeArray($kindUint64, [new $Uint64(670040791, 4183622032), new $Uint64(2739761686, 1118855300)]), $toNativeArray($kindUint64, [new $Uint64(837550989, 4155785716), new $Uint64(3424702107, 3546052773)]), $toNativeArray($kindUint64, [new $Uint64(2120680561, 1973506673), new $Uint64(4280877634, 3358824142)]), $toNativeArray($kindUint64, [new $Uint64(251683526, 3917796230), new $Uint64(2675548521, 3173006913)]), $toNativeArray($kindUint64, [new $Uint64(1388346232, 2749761640), new $Uint64(3344435652, 745033169)]), $toNativeArray($kindUint64, [new $Uint64(2809174614, 3437202050), new $Uint64(4180544565, 931291461)]), $toNativeArray($kindUint64, [new $Uint64(2292605046, 1074509457), new $Uint64(2612840353, 1118928075)]), $toNativeArray($kindUint64, [new $Uint64(1792014483, 3490620469), new $Uint64(3266050441, 2472401918)]), $toNativeArray($kindUint64, [new $Uint64(92534456, 3289533763), new $Uint64(4082563051, 4164244222)]), $toNativeArray($kindUint64, [new $Uint64(3279059507, 2055958602), new $Uint64(2551601907, 2065781726)]), $toNativeArray($kindUint64, [new $Uint64(1951340736, 1496206428), new $Uint64(3189502384, 1508485334)]), $toNativeArray($kindUint64, [new $Uint64(291692272, 1870258035), new $Uint64(3986877980, 1885606668)]), $toNativeArray($kindUint64, [new $Uint64(2329791318, 1168911272), new $Uint64(2491798737, 3325987815)]), $toNativeArray($kindUint64, [new $Uint64(1838497323, 3608622738), new $Uint64(3114748422, 936259297)]), $toNativeArray($kindUint64, [new $Uint64(3371863478, 3437036599), new $Uint64(3893435527, 3317807769)]), $toNativeArray($kindUint64, [new $Uint64(496801938, 1074406050), new $Uint64(2433397204, 3684242592)]), $toNativeArray($kindUint64, [new $Uint64(621002422, 3490491211), new $Uint64(3041746506, 310335944)]), $toNativeArray($kindUint64, [new $Uint64(776253028, 2215630365), new $Uint64(3802183132, 2535403578)]), $toNativeArray($kindUint64, [new $Uint64(1558899966, 3532252626), new $Uint64(2376364457, 3732110884)]), $toNativeArray($kindUint64, [new $Uint64(1948624958, 2267832135), new $Uint64(2970455572, 1443913133)]), $toNativeArray($kindUint64, [new $Uint64(3509523022, 687306521), new $Uint64(3713069465, 1804891416)]), $toNativeArray($kindUint64, [new $Uint64(2193451888, 3650792047), new $Uint64(2320668415, 3812411695)]), $toNativeArray($kindUint64, [new $Uint64(1668073037, 268522763), new $Uint64(2900835519, 3691772795)]), $toNativeArray($kindUint64, [new $Uint64(1011349472, 1409395278), new $Uint64(3626044399, 3540974170)]), $toNativeArray($kindUint64, [new $Uint64(1705835244, 880872049), new $Uint64(2266277749, 3823721592)]), $toNativeArray($kindUint64, [new $Uint64(2132294055, 1101090061), new $Uint64(2832847187, 1558426518)]), $toNativeArray($kindUint64, [new $Uint64(517883921, 302620752), new $Uint64(3541058984, 874291324)]), $toNativeArray($kindUint64, [new $Uint64(2471161098, 2873492530), new $Uint64(2213161865, 546432077)]), $toNativeArray($kindUint64, [new $Uint64(4162693197, 1444382015), new $Uint64(2766452331, 1756781920)]), $toNativeArray($kindUint64, [new $Uint64(908399200, 2879219342), new $Uint64(3458065414, 1122235577)]), $toNativeArray($kindUint64, [new $Uint64(3252104060, 1799512089), new $Uint64(2161290883, 3922622707)]), $toNativeArray($kindUint64, [new $Uint64(2991388251, 2249390111), new $Uint64(2701613604, 3829536560)]), $toNativeArray($kindUint64, [new $Uint64(3739235314, 1737995815), new $Uint64(3377017006, 491953404)]), $toNativeArray($kindUint64, [new $Uint64(379076847, 25011121), new $Uint64(4221271257, 2762425404)]), $toNativeArray($kindUint64, [new $Uint64(2384406677, 1626244686), new $Uint64(2638294536, 115903141)]), $toNativeArray($kindUint64, [new $Uint64(4054250170, 3106547682), new $Uint64(3297868170, 144878926)]), $toNativeArray($kindUint64, [new $Uint64(2920329065, 1735700955), new $Uint64(4122335212, 2328582306)]), $toNativeArray($kindUint64, [new $Uint64(2898947489, 3769167657), new $Uint64(2576459507, 3602847589)]), $toNativeArray($kindUint64, [new $Uint64(402458890, 1490234099), new $Uint64(3220574384, 3429817663)]), $toNativeArray($kindUint64, [new $Uint64(3724299084, 4010276272), new $Uint64(4025717980, 4287272078)]), $toNativeArray($kindUint64, [new $Uint64(1253945104, 358939022), new $Uint64(2516073738, 532061401)]), $toNativeArray($kindUint64, [new $Uint64(2641173204, 448673777), new $Uint64(3145092172, 2812560399)]), $toNativeArray($kindUint64, [new $Uint64(2227724681, 560842221), new $Uint64(3931365215, 3515700499)]), $toNativeArray($kindUint64, [new $Uint64(855457013, 3034880948), new $Uint64(2457103259, 3807925548)]), $toNativeArray($kindUint64, [new $Uint64(1069321267, 572375713), new $Uint64(3071379074, 3686165111)]), $toNativeArray($kindUint64, [new $Uint64(262909759, 3936695114), new $Uint64(3839223843, 2460222741)]), $toNativeArray($kindUint64, [new $Uint64(701189511, 4071047182), new $Uint64(2399514902, 1000768301)]), $toNativeArray($kindUint64, [new $Uint64(1950228713, 4015067154), new $Uint64(2999393627, 3398444024)]), $toNativeArray($kindUint64, [new $Uint64(2437785892, 1797608470), new $Uint64(3749242034, 3174313206)]), $toNativeArray($kindUint64, [new $Uint64(449874358, 3270988942), new $Uint64(2343276271, 3057687578)]), $toNativeArray($kindUint64, [new $Uint64(2709826596, 1941252529), new $Uint64(2929095339, 2748367648)]), $toNativeArray($kindUint64, [new $Uint64(3387283245, 2426565662), new $Uint64(3661369174, 2361717736)]), $toNativeArray($kindUint64, [new $Uint64(2117052028, 2053474450), new $Uint64(2288355734, 402331761)]), $toNativeArray($kindUint64, [new $Uint64(3720056859, 2566843063), new $Uint64(2860444667, 2650398349)]), $toNativeArray($kindUint64, [new $Uint64(1428845602, 2134812005), new $Uint64(3575555834, 2239256113)]), $toNativeArray($kindUint64, [new $Uint64(3577383061, 2407999327), new $Uint64(2234722396, 2473276894)]), $toNativeArray($kindUint64, [new $Uint64(2324245178, 4083740983), new $Uint64(2793402995, 3091596118)]), $toNativeArray($kindUint64, [new $Uint64(757822825, 2957192581), new $Uint64(3491753744, 2790753324)]), $toNativeArray($kindUint64, [new $Uint64(2621122914, 237632627), new $Uint64(2182346090, 1744220827)]), $toNativeArray($kindUint64, [new $Uint64(2202661818, 2444524431), new $Uint64(2727932613, 32792386)]), $toNativeArray($kindUint64, [new $Uint64(605843625, 908171891), new $Uint64(3409915766, 1114732307)]), $toNativeArray($kindUint64, [new $Uint64(3978530003, 2208956688), new $Uint64(4262394707, 3540899031)]), $toNativeArray($kindUint64, [new $Uint64(4097193988, 843727018), new $Uint64(2663996692, 1676190982)]), $toNativeArray($kindUint64, [new $Uint64(2974008837, 1054658773), new $Uint64(3329995865, 2095238728)]), $toNativeArray($kindUint64, [new $Uint64(3717511046, 2392065290), new $Uint64(4162494831, 3692790234)]), $toNativeArray($kindUint64, [new $Uint64(3397186228, 421298982), new $Uint64(2601559269, 3918606632)]), $toNativeArray($kindUint64, [new $Uint64(4246482785, 526623728), new $Uint64(3251949087, 1677032818)]), $toNativeArray($kindUint64, [new $Uint64(3160619833, 1732021484), new $Uint64(4064936359, 1022549199)]), $toNativeArray($kindUint64, [new $Uint64(3586000131, 3766867987), new $Uint64(2540585224, 2249705985)]), $toNativeArray($kindUint64, [new $Uint64(1261274692, 3634843160), new $Uint64(3175731530, 2812132482)]), $toNativeArray($kindUint64, [new $Uint64(3724077014, 248586654), new $Uint64(3969664413, 1367681954)]), $toNativeArray($kindUint64, [new $Uint64(3401289957, 3376592131), new $Uint64(2481040258, 1391672133)]), $toNativeArray($kindUint64, [new $Uint64(1030386975, 999514691), new $Uint64(3101300322, 3887073815)]), $toNativeArray($kindUint64, [new $Uint64(214241895, 175651540), new $Uint64(3876625403, 2711358621)]), $toNativeArray($kindUint64, [new $Uint64(670772096, 1720394949), new $Uint64(2422890877, 1157728226)]), $toNativeArray($kindUint64, [new $Uint64(2985948768, 2150493686), new $Uint64(3028613596, 2520902106)]), $toNativeArray($kindUint64, [new $Uint64(1584952312, 2688117107), new $Uint64(3785766995, 3151127633)]), $toNativeArray($kindUint64, [new $Uint64(3674949755, 1680073192), new $Uint64(2366104372, 1432583858)]), $toNativeArray($kindUint64, [new $Uint64(2446203546, 1026349666), new $Uint64(2957630465, 1790729823)]), $toNativeArray($kindUint64, [new $Uint64(1984012608, 3430420731), new $Uint64(3697038081, 3312154103)]), $toNativeArray($kindUint64, [new $Uint64(2850620616, 2144012957), new $Uint64(2310648801, 459483578)]), $toNativeArray($kindUint64, [new $Uint64(1415792122, 2680016196), new $Uint64(2888311001, 1648096297)]), $toNativeArray($kindUint64, [new $Uint64(2843481977, 1202536597), new $Uint64(3610388751, 3133862195)]), $toNativeArray($kindUint64, [new $Uint64(1240305323, 3435939933), new $Uint64(2256492969, 3569276608)]), $toNativeArray($kindUint64, [new $Uint64(1550381654, 3221183092), new $Uint64(2820616212, 1240370288)]), $toNativeArray($kindUint64, [new $Uint64(1937977068, 1878995217), new $Uint64(3525770265, 1550462860)]), $toNativeArray($kindUint64, [new $Uint64(3358719315, 3321855659), new $Uint64(2203606415, 3653393847)]), $toNativeArray($kindUint64, [new $Uint64(3124657320, 3078577749), new $Uint64(2754508019, 3493000485)]), $toNativeArray($kindUint64, [new $Uint64(684596178, 3848222187), new $Uint64(3443135024, 3292508783)]), $toNativeArray($kindUint64, [new $Uint64(2038485347, 3478880691), new $Uint64(2151959390, 2057817989)]), $toNativeArray($kindUint64, [new $Uint64(3621848508, 3274859039), new $Uint64(2689949238, 424788838)]), $toNativeArray($kindUint64, [new $Uint64(2379826987, 4093573799), new $Uint64(3362436547, 2678469696)]), $toNativeArray($kindUint64, [new $Uint64(2974783734, 4043225425), new $Uint64(4203045684, 2274345296)]), $toNativeArray($kindUint64, [new $Uint64(1859239834, 1453274067), new $Uint64(2626903552, 3568949458)]), $toNativeArray($kindUint64, [new $Uint64(176566144, 3964076232), new $Uint64(3283629441, 166219527)]), $toNativeArray($kindUint64, [new $Uint64(3441933153, 660127994), new $Uint64(4104536801, 1281516232)]), $toNativeArray($kindUint64, [new $Uint64(2151208220, 3096934556), new $Uint64(2565335500, 3485302205)]), $toNativeArray($kindUint64, [new $Uint64(3762752099, 3871168195), new $Uint64(3206669376, 61660460)]), $toNativeArray($kindUint64, [new $Uint64(408472828, 3765218420), new $Uint64(4008336720, 77075576)]), $toNativeArray($kindUint64, [new $Uint64(255295518, 205777864), new $Uint64(2505210450, 48172235)]), $toNativeArray($kindUint64, [new $Uint64(3540344869, 2404705978), new $Uint64(3131513062, 2207698941)]), $toNativeArray($kindUint64, [new $Uint64(1204205614, 4079624297), new $Uint64(3914391328, 612140029)]), $toNativeArray($kindUint64, [new $Uint64(1289499421, 1476023361), new $Uint64(2446494580, 382587518)]), $toNativeArray($kindUint64, [new $Uint64(3759357924, 2918771026), new $Uint64(3058118225, 478234397)]), $toNativeArray($kindUint64, [new $Uint64(1477971933, 3648463782), new $Uint64(3822647781, 1671534821)]), $toNativeArray($kindUint64, [new $Uint64(1460603370, 2817160776), new $Uint64(2389154863, 1581580175)]), $toNativeArray($kindUint64, [new $Uint64(752012389, 1373967322), new $Uint64(2986443579, 903233395)]), $toNativeArray($kindUint64, [new $Uint64(4161240958, 2791200977), new $Uint64(3733054474, 55299919)]), $toNativeArray($kindUint64, [new $Uint64(4211388335, 670758786), new $Uint64(2333159046, 1108304273)]), $toNativeArray($kindUint64, [new $Uint64(2043009946, 4059673955), new $Uint64(2916448807, 3532863990)]), $toNativeArray($kindUint64, [new $Uint64(406278785, 2927108796), new $Uint64(3645561009, 3342338164)]), $toNativeArray($kindUint64, [new $Uint64(2401407889, 218830261), new $Uint64(2278475631, 478348616)]), $toNativeArray($kindUint64, [new $Uint64(3001759861, 1347279650), new $Uint64(2848094538, 3819161242)]), $toNativeArray($kindUint64, [new $Uint64(1604716178, 2757841387), new $Uint64(3560118173, 2626467905)]), $toNativeArray($kindUint64, [new $Uint64(3687302171, 2797392691), new $Uint64(2225073858, 2178413352)]), $toNativeArray($kindUint64, [new $Uint64(314160418, 2422999040), new $Uint64(2781342323, 575533043)]), $toNativeArray($kindUint64, [new $Uint64(3613925995, 881265152), new $Uint64(3476677903, 3940641775)]), $toNativeArray($kindUint64, [new $Uint64(3869316483, 13919808), new $Uint64(2172923689, 4073513845)]), $toNativeArray($kindUint64, [new $Uint64(1615420131, 3238625232), new $Uint64(2716154612, 1870666835)]), $toNativeArray($kindUint64, [new $Uint64(945533340, 2974539716), new $Uint64(3395193265, 2338333544)]), $toNativeArray($kindUint64, [new $Uint64(1181916675, 3718174645), new $Uint64(4243991581, 3996658754)]), $toNativeArray($kindUint64, [new $Uint64(1812439746, 1786988241), new $Uint64(2652494738, 3034782633)]), $toNativeArray($kindUint64, [new $Uint64(3339291507, 86251653), new $Uint64(3315618423, 1645994643)]), $toNativeArray($kindUint64, [new $Uint64(3100372559, 3329040039), new $Uint64(4144523029, 983751480)]), $toNativeArray($kindUint64, [new $Uint64(1937732849, 3691262760), new $Uint64(2590326893, 1151715587)]), $toNativeArray($kindUint64, [new $Uint64(1348424238, 1392852978), new $Uint64(3237908616, 2513386308)]), $toNativeArray($kindUint64, [new $Uint64(1685530297, 3888549871), new $Uint64(4047385770, 3141732885)]), $toNativeArray($kindUint64, [new $Uint64(1590327348, 819730933), new $Uint64(2529616106, 3037324877)]), $toNativeArray($kindUint64, [new $Uint64(3061651009, 1024663666), new $Uint64(3162020133, 1649172448)]), $toNativeArray($kindUint64, [new $Uint64(3827063761, 2354571407), new $Uint64(3952525166, 3135207384)]), $toNativeArray($kindUint64, [new $Uint64(2391914850, 4155961689), new $Uint64(2470328229, 885762791)]), $toNativeArray($kindUint64, [new $Uint64(1916151739, 3047468464), new $Uint64(3087910286, 2180945313)]), $toNativeArray($kindUint64, [new $Uint64(3468931498, 2735593756), new $Uint64(3859887858, 578697993)]), $toNativeArray($kindUint64, [new $Uint64(557469450, 2783487921), new $Uint64(2412429911, 1435428070)]), $toNativeArray($kindUint64, [new $Uint64(2844320461, 1331876253), new $Uint64(3015537389, 720543263)]), $toNativeArray($kindUint64, [new $Uint64(2481658752, 2738587141), new $Uint64(3769421736, 1974420903)]), $toNativeArray($kindUint64, [new $Uint64(3161649456, 1711616963), new $Uint64(2355888585, 1234013064)]), $toNativeArray($kindUint64, [new $Uint64(3952061820, 2139521204), new $Uint64(2944860731, 2616258154)]), $toNativeArray($kindUint64, [new $Uint64(2792593627, 2674401505), new $Uint64(3681075914, 2196580869)]), $toNativeArray($kindUint64, [new $Uint64(2282241929, 1134630028), new $Uint64(2300672446, 2446604867)]), $toNativeArray($kindUint64, [new $Uint64(1779060587, 2492029360), new $Uint64(2875840558, 910772436)]), $toNativeArray($kindUint64, [new $Uint64(2223825734, 2041294876), new $Uint64(3594800697, 3285949193)]), $toNativeArray($kindUint64, [new $Uint64(4074245644, 202067473), new $Uint64(2246750436, 443105509)]), $toNativeArray($kindUint64, [new $Uint64(1871581583, 252584341), new $Uint64(2808438045, 553881887)]), $toNativeArray($kindUint64, [new $Uint64(1265735154, 3536955899), new $Uint64(3510547556, 1766094183)])]); - leftcheats = new sliceType$2([new leftCheat.ptr(0, ""), new leftCheat.ptr(1, "5"), new leftCheat.ptr(1, "25"), new leftCheat.ptr(1, "125"), new leftCheat.ptr(2, "625"), new leftCheat.ptr(2, "3125"), new leftCheat.ptr(2, "15625"), new leftCheat.ptr(3, "78125"), new leftCheat.ptr(3, "390625"), new leftCheat.ptr(3, "1953125"), new leftCheat.ptr(4, "9765625"), new leftCheat.ptr(4, "48828125"), new leftCheat.ptr(4, "244140625"), new leftCheat.ptr(4, "1220703125"), new leftCheat.ptr(5, "6103515625"), new leftCheat.ptr(5, "30517578125"), new leftCheat.ptr(5, "152587890625"), new leftCheat.ptr(6, "762939453125"), new leftCheat.ptr(6, "3814697265625"), new leftCheat.ptr(6, "19073486328125"), new leftCheat.ptr(7, "95367431640625"), new leftCheat.ptr(7, "476837158203125"), new leftCheat.ptr(7, "2384185791015625"), new leftCheat.ptr(7, "11920928955078125"), new leftCheat.ptr(8, "59604644775390625"), new leftCheat.ptr(8, "298023223876953125"), new leftCheat.ptr(8, "1490116119384765625"), new leftCheat.ptr(9, "7450580596923828125"), new leftCheat.ptr(9, "37252902984619140625"), new leftCheat.ptr(9, "186264514923095703125"), new leftCheat.ptr(10, "931322574615478515625"), new leftCheat.ptr(10, "4656612873077392578125"), new leftCheat.ptr(10, "23283064365386962890625"), new leftCheat.ptr(10, "116415321826934814453125"), new leftCheat.ptr(11, "582076609134674072265625"), new leftCheat.ptr(11, "2910383045673370361328125"), new leftCheat.ptr(11, "14551915228366851806640625"), new leftCheat.ptr(12, "72759576141834259033203125"), new leftCheat.ptr(12, "363797880709171295166015625"), new leftCheat.ptr(12, "1818989403545856475830078125"), new leftCheat.ptr(13, "9094947017729282379150390625"), new leftCheat.ptr(13, "45474735088646411895751953125"), new leftCheat.ptr(13, "227373675443232059478759765625"), new leftCheat.ptr(13, "1136868377216160297393798828125"), new leftCheat.ptr(14, "5684341886080801486968994140625"), new leftCheat.ptr(14, "28421709430404007434844970703125"), new leftCheat.ptr(14, "142108547152020037174224853515625"), new leftCheat.ptr(15, "710542735760100185871124267578125"), new leftCheat.ptr(15, "3552713678800500929355621337890625"), new leftCheat.ptr(15, "17763568394002504646778106689453125"), new leftCheat.ptr(16, "88817841970012523233890533447265625"), new leftCheat.ptr(16, "444089209850062616169452667236328125"), new leftCheat.ptr(16, "2220446049250313080847263336181640625"), new leftCheat.ptr(16, "11102230246251565404236316680908203125"), new leftCheat.ptr(17, "55511151231257827021181583404541015625"), new leftCheat.ptr(17, "277555756156289135105907917022705078125"), new leftCheat.ptr(17, "1387778780781445675529539585113525390625"), new leftCheat.ptr(18, "6938893903907228377647697925567626953125"), new leftCheat.ptr(18, "34694469519536141888238489627838134765625"), new leftCheat.ptr(18, "173472347597680709441192448139190673828125"), new leftCheat.ptr(19, "867361737988403547205962240695953369140625")]); - $pkg.ErrRange = errors.New("value out of range"); - $pkg.ErrSyntax = errors.New("invalid syntax"); - optimize = true; - powtab = new sliceType$3([1, 3, 6, 9, 13, 16, 19, 23, 26]); - float64pow10 = new sliceType$4([1, 10, 100, 1000, 10000, 100000, 1e+06, 1e+07, 1e+08, 1e+09, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, 1e+21, 1e+22]); - float32pow10 = new sliceType$5([1, 10, 100, 1000, 10000, 100000, 1e+06, 1e+07, 1e+08, 1e+09, 1e+10]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["reflect"] = (function() { - var $pkg = {}, $init, errors, js, abi, bytealg, goarch, goexperiment, itoa, unsafeheader, math, runtime, strconv, sync, unicode, utf8, Value, flag, ValueError, MapIter, Type, Kind, tflag, rtype, method, ChanDir, arrayType, chanType, imethod, interfaceType, mapType, ptrType, sliceType, structField, structType, Method, nameOff, typeOff, textOff, StructField, StructTag, fieldScan, uncommonType, funcType, name, nameData, hiter, sliceType$1, ptrType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$2, funcType$1, sliceType$6, ptrType$4, sliceType$7, ptrType$7, ptrType$8, sliceType$9, sliceType$10, ptrType$9, sliceType$11, ptrType$10, ptrType$11, sliceType$12, ptrType$12, ptrType$13, funcType$2, sliceType$14, sliceType$15, ptrType$18, structType$3, sliceType$16, ptrType$19, ptrType$20, sliceType$17, sliceType$18, arrayType$6, sliceType$19, funcType$3, ptrType$22, arrayType$7, ptrType$23, funcType$4, funcType$5, ptrType$25, ptrType$28, uint8Type, stringType, kindNames, initialized, uncommonTypeMap, nameMap, nameOffList, typeOffList, callHelper, jsObjectPtr, selectHelper, methodName, copyVal, overflowFloat32, typesMustMatch, grow, Append, AppendSlice, MakeMap, MakeMapWithSize, convertOp, makeFloat, makeFloat32, makeComplex, makeString, makeBytes, makeRunes, cvtInt, cvtUint, cvtFloatInt, cvtFloatUint, cvtIntFloat, cvtUintFloat, cvtFloat, cvtComplex, cvtIntString, cvtUintString, cvtBytesString, cvtStringBytes, cvtRunesString, cvtStringRunes, cvtT2I, cvtI2I, PtrTo, PointerTo, implements$1, specialChannelAssignability, directlyAssignable, haveIdenticalType, haveIdenticalUnderlyingType, toType, ifaceIndir, methodValueCallCodePtr, methodValueCall, init, New, jsType, reflectType, setKindType, newName, newMethodName, newNameOff, newTypeOff, internalStr, isWrapped, copyStruct, makeValue, MakeSlice, TypeOf, ValueOf, FuncOf, SliceOf, Zero, unsafe_New, makeInt, typedmemmove, makemap, keyFor, mapaccess, mapassign, mapdelete, mapaccess_faststr, mapassign_faststr, mapdelete_faststr, mapiterinit, mapiterkey, mapiterelem, mapiternext, maplen, cvtDirect, cvtSliceArrayPtr, Copy, methodReceiver, valueInterface, ifaceE2I, makeMethodValue, wrapJsObject, unwrapJsObject, getJsTag, chanrecv, chansend, DeepEqual, deepValueEqualJs, methodNameSkip, verifyNotInHeapPtr; - errors = $packages["errors"]; - js = $packages["github.com/gopherjs/gopherjs/js"]; - abi = $packages["internal/abi"]; - bytealg = $packages["internal/bytealg"]; - goarch = $packages["internal/goarch"]; - goexperiment = $packages["internal/goexperiment"]; - itoa = $packages["internal/itoa"]; - unsafeheader = $packages["internal/unsafeheader"]; - math = $packages["math"]; - runtime = $packages["runtime"]; - strconv = $packages["strconv"]; - sync = $packages["sync"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - Value = $pkg.Value = $newType(0, $kindStruct, "reflect.Value", true, "reflect", true, function(typ_, ptr_, flag_) { - this.$val = this; - if (arguments.length === 0) { - this.typ = ptrType$1.nil; - this.ptr = 0; - this.flag = 0; - return; - } - this.typ = typ_; - this.ptr = ptr_; - this.flag = flag_; - }); - flag = $pkg.flag = $newType(4, $kindUintptr, "reflect.flag", true, "reflect", false, null); - ValueError = $pkg.ValueError = $newType(0, $kindStruct, "reflect.ValueError", true, "reflect", true, function(Method_, Kind_) { - this.$val = this; - if (arguments.length === 0) { - this.Method = ""; - this.Kind = 0; - return; - } - this.Method = Method_; - this.Kind = Kind_; - }); - MapIter = $pkg.MapIter = $newType(0, $kindStruct, "reflect.MapIter", true, "reflect", true, function(m_, hiter_) { - this.$val = this; - if (arguments.length === 0) { - this.m = new Value.ptr(ptrType$1.nil, 0, 0); - this.hiter = new hiter.ptr($ifaceNil, null, null, 0, null); - return; - } - this.m = m_; - this.hiter = hiter_; - }); - Type = $pkg.Type = $newType(8, $kindInterface, "reflect.Type", true, "reflect", true, null); - Kind = $pkg.Kind = $newType(4, $kindUint, "reflect.Kind", true, "reflect", true, null); - tflag = $pkg.tflag = $newType(1, $kindUint8, "reflect.tflag", true, "reflect", false, null); - rtype = $pkg.rtype = $newType(0, $kindStruct, "reflect.rtype", true, "reflect", false, function(size_, ptrdata_, hash_, tflag_, align_, fieldAlign_, kind_, equal_, gcdata_, str_, ptrToThis_) { - this.$val = this; - if (arguments.length === 0) { - this.size = 0; - this.ptrdata = 0; - this.hash = 0; - this.tflag = 0; - this.align = 0; - this.fieldAlign = 0; - this.kind = 0; - this.equal = $throwNilPointerError; - this.gcdata = ptrType$13.nil; - this.str = 0; - this.ptrToThis = 0; - return; - } - this.size = size_; - this.ptrdata = ptrdata_; - this.hash = hash_; - this.tflag = tflag_; - this.align = align_; - this.fieldAlign = fieldAlign_; - this.kind = kind_; - this.equal = equal_; - this.gcdata = gcdata_; - this.str = str_; - this.ptrToThis = ptrToThis_; - }); - method = $pkg.method = $newType(0, $kindStruct, "reflect.method", true, "reflect", false, function(name_, mtyp_, ifn_, tfn_) { - this.$val = this; - if (arguments.length === 0) { - this.name = 0; - this.mtyp = 0; - this.ifn = 0; - this.tfn = 0; - return; - } - this.name = name_; - this.mtyp = mtyp_; - this.ifn = ifn_; - this.tfn = tfn_; - }); - ChanDir = $pkg.ChanDir = $newType(4, $kindInt, "reflect.ChanDir", true, "reflect", true, null); - arrayType = $pkg.arrayType = $newType(0, $kindStruct, "reflect.arrayType", true, "reflect", false, function(rtype_, elem_, slice_, len_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.elem = ptrType$1.nil; - this.slice = ptrType$1.nil; - this.len = 0; - return; - } - this.rtype = rtype_; - this.elem = elem_; - this.slice = slice_; - this.len = len_; - }); - chanType = $pkg.chanType = $newType(0, $kindStruct, "reflect.chanType", true, "reflect", false, function(rtype_, elem_, dir_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.elem = ptrType$1.nil; - this.dir = 0; - return; - } - this.rtype = rtype_; - this.elem = elem_; - this.dir = dir_; - }); - imethod = $pkg.imethod = $newType(0, $kindStruct, "reflect.imethod", true, "reflect", false, function(name_, typ_) { - this.$val = this; - if (arguments.length === 0) { - this.name = 0; - this.typ = 0; - return; - } - this.name = name_; - this.typ = typ_; - }); - interfaceType = $pkg.interfaceType = $newType(0, $kindStruct, "reflect.interfaceType", true, "reflect", false, function(rtype_, pkgPath_, methods_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.pkgPath = new name.ptr(ptrType$13.nil); - this.methods = sliceType$14.nil; - return; - } - this.rtype = rtype_; - this.pkgPath = pkgPath_; - this.methods = methods_; - }); - mapType = $pkg.mapType = $newType(0, $kindStruct, "reflect.mapType", true, "reflect", false, function(rtype_, key_, elem_, bucket_, hasher_, keysize_, valuesize_, bucketsize_, flags_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.key = ptrType$1.nil; - this.elem = ptrType$1.nil; - this.bucket = ptrType$1.nil; - this.hasher = $throwNilPointerError; - this.keysize = 0; - this.valuesize = 0; - this.bucketsize = 0; - this.flags = 0; - return; - } - this.rtype = rtype_; - this.key = key_; - this.elem = elem_; - this.bucket = bucket_; - this.hasher = hasher_; - this.keysize = keysize_; - this.valuesize = valuesize_; - this.bucketsize = bucketsize_; - this.flags = flags_; - }); - ptrType = $pkg.ptrType = $newType(0, $kindStruct, "reflect.ptrType", true, "reflect", false, function(rtype_, elem_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.elem = ptrType$1.nil; - return; - } - this.rtype = rtype_; - this.elem = elem_; - }); - sliceType = $pkg.sliceType = $newType(0, $kindStruct, "reflect.sliceType", true, "reflect", false, function(rtype_, elem_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.elem = ptrType$1.nil; - return; - } - this.rtype = rtype_; - this.elem = elem_; - }); - structField = $pkg.structField = $newType(0, $kindStruct, "reflect.structField", true, "reflect", false, function(name_, typ_, offsetEmbed_) { - this.$val = this; - if (arguments.length === 0) { - this.name = new name.ptr(ptrType$13.nil); - this.typ = ptrType$1.nil; - this.offsetEmbed = 0; - return; - } - this.name = name_; - this.typ = typ_; - this.offsetEmbed = offsetEmbed_; - }); - structType = $pkg.structType = $newType(0, $kindStruct, "reflect.structType", true, "reflect", false, function(rtype_, pkgPath_, fields_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.pkgPath = new name.ptr(ptrType$13.nil); - this.fields = sliceType$15.nil; - return; - } - this.rtype = rtype_; - this.pkgPath = pkgPath_; - this.fields = fields_; - }); - Method = $pkg.Method = $newType(0, $kindStruct, "reflect.Method", true, "reflect", true, function(Name_, PkgPath_, Type_, Func_, Index_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.PkgPath = ""; - this.Type = $ifaceNil; - this.Func = new Value.ptr(ptrType$1.nil, 0, 0); - this.Index = 0; - return; - } - this.Name = Name_; - this.PkgPath = PkgPath_; - this.Type = Type_; - this.Func = Func_; - this.Index = Index_; - }); - nameOff = $pkg.nameOff = $newType(4, $kindInt32, "reflect.nameOff", true, "reflect", false, null); - typeOff = $pkg.typeOff = $newType(4, $kindInt32, "reflect.typeOff", true, "reflect", false, null); - textOff = $pkg.textOff = $newType(4, $kindInt32, "reflect.textOff", true, "reflect", false, null); - StructField = $pkg.StructField = $newType(0, $kindStruct, "reflect.StructField", true, "reflect", true, function(Name_, PkgPath_, Type_, Tag_, Offset_, Index_, Anonymous_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.PkgPath = ""; - this.Type = $ifaceNil; - this.Tag = ""; - this.Offset = 0; - this.Index = sliceType$6.nil; - this.Anonymous = false; - return; - } - this.Name = Name_; - this.PkgPath = PkgPath_; - this.Type = Type_; - this.Tag = Tag_; - this.Offset = Offset_; - this.Index = Index_; - this.Anonymous = Anonymous_; - }); - StructTag = $pkg.StructTag = $newType(8, $kindString, "reflect.StructTag", true, "reflect", true, null); - fieldScan = $pkg.fieldScan = $newType(0, $kindStruct, "reflect.fieldScan", true, "reflect", false, function(typ_, index_) { - this.$val = this; - if (arguments.length === 0) { - this.typ = ptrType$12.nil; - this.index = sliceType$6.nil; - return; - } - this.typ = typ_; - this.index = index_; - }); - uncommonType = $pkg.uncommonType = $newType(0, $kindStruct, "reflect.uncommonType", true, "reflect", false, function(pkgPath_, mcount_, xcount_, moff_, _methods_) { - this.$val = this; - if (arguments.length === 0) { - this.pkgPath = 0; - this.mcount = 0; - this.xcount = 0; - this.moff = 0; - this._methods = sliceType$11.nil; - return; - } - this.pkgPath = pkgPath_; - this.mcount = mcount_; - this.xcount = xcount_; - this.moff = moff_; - this._methods = _methods_; - }); - funcType = $pkg.funcType = $newType(0, $kindStruct, "reflect.funcType", true, "reflect", false, function(rtype_, inCount_, outCount_, _in_, _out_) { - this.$val = this; - if (arguments.length === 0) { - this.rtype = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - this.inCount = 0; - this.outCount = 0; - this._in = sliceType$2.nil; - this._out = sliceType$2.nil; - return; - } - this.rtype = rtype_; - this.inCount = inCount_; - this.outCount = outCount_; - this._in = _in_; - this._out = _out_; - }); - name = $pkg.name = $newType(0, $kindStruct, "reflect.name", true, "reflect", false, function(bytes_) { - this.$val = this; - if (arguments.length === 0) { - this.bytes = ptrType$13.nil; - return; - } - this.bytes = bytes_; - }); - nameData = $pkg.nameData = $newType(0, $kindStruct, "reflect.nameData", true, "reflect", false, function(name_, tag_, exported_, pkgPath_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.tag = ""; - this.exported = false; - this.pkgPath = ""; - return; - } - this.name = name_; - this.tag = tag_; - this.exported = exported_; - this.pkgPath = pkgPath_; - }); - hiter = $pkg.hiter = $newType(0, $kindStruct, "reflect.hiter", true, "reflect", false, function(t_, m_, keys_, i_, last_) { - this.$val = this; - if (arguments.length === 0) { - this.t = $ifaceNil; - this.m = null; - this.keys = null; - this.i = 0; - this.last = null; - return; - } - this.t = t_; - this.m = m_; - this.keys = keys_; - this.i = i_; - this.last = last_; - }); - sliceType$1 = $sliceType(name); - ptrType$1 = $ptrType(rtype); - sliceType$2 = $sliceType(ptrType$1); - sliceType$3 = $sliceType($String); - sliceType$4 = $sliceType($emptyInterface); - ptrType$2 = $ptrType(js.Object); - funcType$1 = $funcType([sliceType$4], [ptrType$2], true); - sliceType$6 = $sliceType($Int); - ptrType$4 = $ptrType(runtime.Func); - sliceType$7 = $sliceType(Value); - ptrType$7 = $ptrType($UnsafePointer); - ptrType$8 = $ptrType(unsafeheader.Slice); - sliceType$9 = $sliceType($Uint8); - sliceType$10 = $sliceType($Int32); - ptrType$9 = $ptrType(uncommonType); - sliceType$11 = $sliceType(method); - ptrType$10 = $ptrType(interfaceType); - ptrType$11 = $ptrType(imethod); - sliceType$12 = $sliceType(fieldScan); - ptrType$12 = $ptrType(structType); - ptrType$13 = $ptrType($Uint8); - funcType$2 = $funcType([], [], false); - sliceType$14 = $sliceType(imethod); - sliceType$15 = $sliceType(structField); - ptrType$18 = $ptrType(nameData); - structType$3 = $structType("reflect", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); - sliceType$16 = $sliceType(ptrType$2); - ptrType$19 = $ptrType($String); - ptrType$20 = $ptrType(funcType); - sliceType$17 = $sliceType(Type); - sliceType$18 = $sliceType(sliceType$16); - arrayType$6 = $arrayType($UnsafePointer, 2); - sliceType$19 = $sliceType(arrayType$6); - funcType$3 = $funcType([$String], [$Bool], false); - ptrType$22 = $ptrType(MapIter); - arrayType$7 = $arrayType($Uintptr, 2); - ptrType$23 = $ptrType(ValueError); - funcType$4 = $funcType([$UnsafePointer, $UnsafePointer], [$Bool], false); - funcType$5 = $funcType([$UnsafePointer, $Uintptr], [$Uintptr], false); - ptrType$25 = $ptrType(structField); - ptrType$28 = $ptrType(hiter); - flag.prototype.kind = function() { - var f; - f = this.$val; - return ((((f & 31) >>> 0) >>> 0)); - }; - $ptrType(flag).prototype.kind = function() { return new flag(this.$get()).kind(); }; - flag.prototype.ro = function() { - var f; - f = this.$val; - if (!((((f & 96) >>> 0) === 0))) { - return 32; - } - return 0; - }; - $ptrType(flag).prototype.ro = function() { return new flag(this.$get()).ro(); }; - Value.ptr.prototype.pointer = function() { - var v; - v = this; - if (!((v.typ.size === 4)) || !v.typ.pointers()) { - $panic(new $String("can't call pointer on a non-pointer Value")); - } - if (!((((v.flag & 128) >>> 0) === 0))) { - return (v.ptr).$get(); - } - return v.ptr; - }; - Value.prototype.pointer = function() { return this.$val.pointer(); }; - ValueError.ptr.prototype.Error = function() { - var e; - e = this; - if (e.Kind === 0) { - return "reflect: call of " + e.Method + " on zero Value"; - } - return "reflect: call of " + e.Method + " on " + new Kind(e.Kind).String() + " Value"; - }; - ValueError.prototype.Error = function() { return this.$val.Error(); }; - methodName = function() { - var _tuple, f, pc; - _tuple = runtime.Caller(2); - pc = _tuple[0]; - f = runtime.FuncForPC(pc); - if (f === ptrType$4.nil) { - return "unknown method"; - } - return f.Name(); - }; - flag.prototype.mustBe = function(expected) { - var expected, f; - f = this.$val; - if (!((((((f & 31) >>> 0) >>> 0)) === expected))) { - $panic(new ValueError.ptr(methodName(), new flag(f).kind())); - } - }; - $ptrType(flag).prototype.mustBe = function(expected) { return new flag(this.$get()).mustBe(expected); }; - flag.prototype.mustBeExported = function() { - var f; - f = this.$val; - if ((f === 0) || !((((f & 96) >>> 0) === 0))) { - new flag(f).mustBeExportedSlow(); - } - }; - $ptrType(flag).prototype.mustBeExported = function() { return new flag(this.$get()).mustBeExported(); }; - flag.prototype.mustBeExportedSlow = function() { - var f; - f = this.$val; - if (f === 0) { - $panic(new ValueError.ptr(methodNameSkip(), 0)); - } - if (!((((f & 96) >>> 0) === 0))) { - $panic(new $String("reflect: " + methodNameSkip() + " using value obtained using unexported field")); - } - }; - $ptrType(flag).prototype.mustBeExportedSlow = function() { return new flag(this.$get()).mustBeExportedSlow(); }; - flag.prototype.mustBeAssignable = function() { - var f; - f = this.$val; - if (!((((f & 96) >>> 0) === 0)) || (((f & 256) >>> 0) === 0)) { - new flag(f).mustBeAssignableSlow(); - } - }; - $ptrType(flag).prototype.mustBeAssignable = function() { return new flag(this.$get()).mustBeAssignable(); }; - flag.prototype.mustBeAssignableSlow = function() { - var f; - f = this.$val; - if (f === 0) { - $panic(new ValueError.ptr(methodNameSkip(), 0)); - } - if (!((((f & 96) >>> 0) === 0))) { - $panic(new $String("reflect: " + methodNameSkip() + " using value obtained using unexported field")); - } - if (((f & 256) >>> 0) === 0) { - $panic(new $String("reflect: " + methodNameSkip() + " using unaddressable value")); - } - }; - $ptrType(flag).prototype.mustBeAssignableSlow = function() { return new flag(this.$get()).mustBeAssignableSlow(); }; - Value.ptr.prototype.Addr = function() { - var fl, v; - v = this; - if (((v.flag & 256) >>> 0) === 0) { - $panic(new $String("reflect.Value.Addr of unaddressable value")); - } - fl = (v.flag & 96) >>> 0; - return new Value.ptr(v.typ.ptrTo(), v.ptr, (fl | 22) >>> 0); - }; - Value.prototype.Addr = function() { return this.$val.Addr(); }; - Value.ptr.prototype.Bool = function() { - var v; - v = this; - new flag(v.flag).mustBe(1); - return (v.ptr).$get(); - }; - Value.prototype.Bool = function() { return this.$val.Bool(); }; - Value.ptr.prototype.Bytes = function() { - var {_r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(23); - _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 8))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 8))) { */ case 1: - $panic(new $String("reflect.Value.Bytes of non-byte slice")); - /* } */ case 2: - $s = -1; return (v.ptr).$get(); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Bytes, $c: true, $r, _r, v, $s};return $f; - }; - Value.prototype.Bytes = function() { return this.$val.Bytes(); }; - Value.ptr.prototype.runes = function() { - var {_r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(23); - _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 5))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 5))) { */ case 1: - $panic(new $String("reflect.Value.Bytes of non-rune slice")); - /* } */ case 2: - $s = -1; return (v.ptr).$get(); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.runes, $c: true, $r, _r, v, $s};return $f; - }; - Value.prototype.runes = function() { return this.$val.runes(); }; - Value.ptr.prototype.CanAddr = function() { - var v; - v = this; - return !((((v.flag & 256) >>> 0) === 0)); - }; - Value.prototype.CanAddr = function() { return this.$val.CanAddr(); }; - Value.ptr.prototype.CanSet = function() { - var v; - v = this; - return ((v.flag & 352) >>> 0) === 256; - }; - Value.prototype.CanSet = function() { return this.$val.CanSet(); }; - Value.ptr.prototype.Call = function(in$1) { - var {$24r, _r, in$1, v, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(19); - new flag(v.flag).mustBeExported(); - _r = $clone(v, Value).call("Call", in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Call, $c: true, $r, $24r, _r, in$1, v, $s};return $f; - }; - Value.prototype.Call = function(in$1) { return this.$val.Call(in$1); }; - Value.ptr.prototype.CallSlice = function(in$1) { - var {$24r, _r, in$1, v, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(19); - new flag(v.flag).mustBeExported(); - _r = $clone(v, Value).call("CallSlice", in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.CallSlice, $c: true, $r, $24r, _r, in$1, v, $s};return $f; - }; - Value.prototype.CallSlice = function(in$1) { return this.$val.CallSlice(in$1); }; - Value.ptr.prototype.CanComplex = function() { - var _1, v; - v = this; - _1 = new flag(v.flag).kind(); - if ((_1 === (15)) || (_1 === (16))) { - return true; - } else { - return false; - } - }; - Value.prototype.CanComplex = function() { return this.$val.CanComplex(); }; - Value.ptr.prototype.Complex = function() { - var _1, k, v, x; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (15)) { - return ((x = (v.ptr).$get(), new $Complex128(x.$real, x.$imag))); - } else if (_1 === (16)) { - return (v.ptr).$get(); - } - $panic(new ValueError.ptr("reflect.Value.Complex", new flag(v.flag).kind())); - }; - Value.prototype.Complex = function() { return this.$val.Complex(); }; - Value.ptr.prototype.FieldByIndex = function(index) { - var {$24r, _i, _r, _r$1, _r$2, _r$3, _ref, _v, i, index, v, x, $s, $r, $c} = $restore(this, {index}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - /* */ if (index.$length === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (index.$length === 1) { */ case 1: - _r = $clone(v, Value).Field((0 >= index.$length ? ($throwRuntimeError("index out of range"), undefined) : index.$array[index.$offset + 0])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - new flag(v.flag).mustBe(25); - _ref = index; - _i = 0; - /* while (true) { */ case 5: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } - i = _i; - x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (i > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (i > 0) { */ case 7: - if (!($clone(v, Value).Kind() === 22)) { _v = false; $s = 11; continue s; } - _r$1 = v.typ.Elem().Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === 25; case 11: - /* */ if (_v) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 9: - if ($clone(v, Value).IsNil()) { - $panic(new $String("reflect: indirection through nil pointer to embedded struct")); - } - _r$2 = $clone(v, Value).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v = _r$2; - /* } */ case 10: - /* } */ case 8: - _r$3 = $clone(v, Value).Field(x); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = _r$3; - _i++; - $s = 5; continue; - case 6: - $s = -1; return v; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByIndex, $c: true, $r, $24r, _i, _r, _r$1, _r$2, _r$3, _ref, _v, i, index, v, x, $s};return $f; - }; - Value.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; - Value.ptr.prototype.FieldByIndexErr = function(index) { - var {$24r, $24r$1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, i, index, v, x, $s, $r, $c} = $restore(this, {index}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - /* */ if (index.$length === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (index.$length === 1) { */ case 1: - _r = $clone(v, Value).Field((0 >= index.$length ? ($throwRuntimeError("index out of range"), undefined) : index.$array[index.$offset + 0])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, $ifaceNil]; - $s = 4; case 4: return $24r; - /* } */ case 2: - new flag(v.flag).mustBe(25); - _ref = index; - _i = 0; - /* while (true) { */ case 5: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } - i = _i; - x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (i > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (i > 0) { */ case 7: - if (!($clone(v, Value).Kind() === 22)) { _v = false; $s = 11; continue s; } - _r$1 = v.typ.Elem().Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === 25; case 11: - /* */ if (_v) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 9: - /* */ if ($clone(v, Value).IsNil()) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($clone(v, Value).IsNil()) { */ case 13: - _r$2 = v.typ.Elem().Name(); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = errors.New("reflect: indirection through nil pointer to embedded struct field " + _r$2); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = [new Value.ptr(ptrType$1.nil, 0, 0), _r$3]; - $s = 17; case 17: return $24r$1; - /* } */ case 14: - _r$4 = $clone(v, Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - v = _r$4; - /* } */ case 10: - /* } */ case 8: - _r$5 = $clone(v, Value).Field(x); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5; - _i++; - $s = 5; continue; - case 6: - $s = -1; return [v, $ifaceNil]; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByIndexErr, $c: true, $r, $24r, $24r$1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, i, index, v, x, $s};return $f; - }; - Value.prototype.FieldByIndexErr = function(index) { return this.$val.FieldByIndexErr(index); }; - Value.ptr.prototype.FieldByName = function(name$1) { - var {$24r, _r, _r$1, _tuple, f, name$1, ok, v, $s, $r, $c} = $restore(this, {name$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(25); - _r = v.typ.FieldByName(name$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - f = $clone(_tuple[0], StructField); - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = $clone(v, Value).FieldByIndex(f.Index); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByName, $c: true, $r, $24r, _r, _r$1, _tuple, f, name$1, ok, v, $s};return $f; - }; - Value.prototype.FieldByName = function(name$1) { return this.$val.FieldByName(name$1); }; - Value.ptr.prototype.FieldByNameFunc = function(match) { - var {$24r, _r, _r$1, _tuple, f, match, ok, v, $s, $r, $c} = $restore(this, {match}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _r = v.typ.FieldByNameFunc(match); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - f = $clone(_tuple[0], StructField); - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = $clone(v, Value).FieldByIndex(f.Index); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.FieldByNameFunc, $c: true, $r, $24r, _r, _r$1, _tuple, f, match, ok, v, $s};return $f; - }; - Value.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; - Value.ptr.prototype.CanFloat = function() { - var _1, v; - v = this; - _1 = new flag(v.flag).kind(); - if ((_1 === (13)) || (_1 === (14))) { - return true; - } else { - return false; - } - }; - Value.prototype.CanFloat = function() { return this.$val.CanFloat(); }; - Value.ptr.prototype.Float = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (13)) { - return ((v.ptr).$get()); - } else if (_1 === (14)) { - return (v.ptr).$get(); - } - $panic(new ValueError.ptr("reflect.Value.Float", new flag(v.flag).kind())); - }; - Value.prototype.Float = function() { return this.$val.Float(); }; - Value.ptr.prototype.CanInt = function() { - var _1, v; - v = this; - _1 = new flag(v.flag).kind(); - if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - return true; - } else { - return false; - } - }; - Value.prototype.CanInt = function() { return this.$val.CanInt(); }; - Value.ptr.prototype.Int = function() { - var _1, k, p, v; - v = this; - k = new flag(v.flag).kind(); - p = v.ptr; - _1 = k; - if (_1 === (2)) { - return (new $Int64(0, (p).$get())); - } else if (_1 === (3)) { - return (new $Int64(0, (p).$get())); - } else if (_1 === (4)) { - return (new $Int64(0, (p).$get())); - } else if (_1 === (5)) { - return (new $Int64(0, (p).$get())); - } else if (_1 === (6)) { - return (p).$get(); - } - $panic(new ValueError.ptr("reflect.Value.Int", new flag(v.flag).kind())); - }; - Value.prototype.Int = function() { return this.$val.Int(); }; - Value.ptr.prototype.CanInterface = function() { - var v; - v = this; - if (v.flag === 0) { - $panic(new ValueError.ptr("reflect.Value.CanInterface", 0)); - } - return ((v.flag & 96) >>> 0) === 0; - }; - Value.prototype.CanInterface = function() { return this.$val.CanInterface(); }; - Value.ptr.prototype.Interface = function() { - var {$24r, _r, i, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = $ifaceNil; - v = this; - _r = valueInterface($clone(v, Value), true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - i = _r; - $24r = i; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Interface, $c: true, $r, $24r, _r, i, v, $s};return $f; - }; - Value.prototype.Interface = function() { return this.$val.Interface(); }; - Value.ptr.prototype.IsValid = function() { - var v; - v = this; - return !((v.flag === 0)); - }; - Value.prototype.IsValid = function() { return this.$val.IsValid(); }; - Value.ptr.prototype.IsZero = function() { - var {_1, _r, _r$1, _r$2, _r$3, c, i, i$1, v, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = new flag(v.flag).kind(); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 3; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 4; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 5; continue; } - /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 6; continue; } - /* */ if (_1 === (17)) { $s = 7; continue; } - /* */ if ((_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { $s = 8; continue; } - /* */ if (_1 === (24)) { $s = 9; continue; } - /* */ if (_1 === (25)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return !$clone(v, Value).Bool(); - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 3: - $s = -1; return (x = $clone(v, Value).Int(), (x.$high === 0 && x.$low === 0)); - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 4: - $s = -1; return (x$1 = $clone(v, Value).Uint(), (x$1.$high === 0 && x$1.$low === 0)); - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 5: - $s = -1; return (x$2 = math.Float64bits($clone(v, Value).Float()), (x$2.$high === 0 && x$2.$low === 0)); - /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 6: - c = $clone(v, Value).Complex(); - $s = -1; return (x$3 = math.Float64bits(c.$real), (x$3.$high === 0 && x$3.$low === 0)) && (x$4 = math.Float64bits(c.$imag), (x$4.$high === 0 && x$4.$low === 0)); - /* } else if (_1 === (17)) { */ case 7: - i = 0; - /* while (true) { */ case 13: - /* if (!(i < $clone(v, Value).Len())) { break; } */ if(!(i < $clone(v, Value).Len())) { $s = 14; continue; } - _r = $clone(v, Value).Index(i); /* */ $s = 17; case 17: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = $clone(_r, Value).IsZero(); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!_r$1) { */ case 15: - $s = -1; return false; - /* } */ case 16: - i = i + (1) >> 0; - $s = 13; continue; - case 14: - $s = -1; return true; - /* } else if ((_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { */ case 8: - $s = -1; return $clone(v, Value).IsNil(); - /* } else if (_1 === (24)) { */ case 9: - $s = -1; return $clone(v, Value).Len() === 0; - /* } else if (_1 === (25)) { */ case 10: - i$1 = 0; - /* while (true) { */ case 19: - /* if (!(i$1 < $clone(v, Value).NumField())) { break; } */ if(!(i$1 < $clone(v, Value).NumField())) { $s = 20; continue; } - _r$2 = $clone(v, Value).Field(i$1); /* */ $s = 23; case 23: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, Value).IsZero(); /* */ $s = 24; case 24: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!_r$3) { */ case 21: - $s = -1; return false; - /* } */ case 22: - i$1 = i$1 + (1) >> 0; - $s = 19; continue; - case 20: - $s = -1; return true; - /* } else { */ case 11: - $panic(new ValueError.ptr("reflect.Value.IsZero", $clone(v, Value).Kind())); - /* } */ case 12: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.IsZero, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, c, i, i$1, v, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - Value.prototype.IsZero = function() { return this.$val.IsZero(); }; - Value.ptr.prototype.Kind = function() { - var v; - v = this; - return new flag(v.flag).kind(); - }; - Value.prototype.Kind = function() { return this.$val.Kind(); }; - Value.ptr.prototype.MapIndex = function(key) { - var {_r, e, fl, k, k$1, key, tt, typ, v, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(21); - tt = (v.typ.kindType); - e = 0; - /* */ if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { */ case 1: - k = (key.ptr).$get(); - e = mapaccess_faststr(v.typ, $clone(v, Value).pointer(), k); - $s = 3; continue; - /* } else { */ case 2: - _r = $clone(key, Value).assignTo("reflect.Value.MapIndex", tt.key, 0); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - key = _r; - k$1 = 0; - if (!((((key.flag & 128) >>> 0) === 0))) { - k$1 = key.ptr; - } else { - k$1 = ((key.$ptr_ptr || (key.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key)))); - } - e = mapaccess(v.typ, $clone(v, Value).pointer(), k$1); - /* } */ case 3: - if (e === 0) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - typ = tt.elem; - fl = new flag((((v.flag | key.flag) >>> 0))).ro(); - fl = (fl | (((typ.Kind() >>> 0)))) >>> 0; - $s = -1; return copyVal(typ, fl, e); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapIndex, $c: true, $r, _r, e, fl, k, k$1, key, tt, typ, v, $s};return $f; - }; - Value.prototype.MapIndex = function(key) { return this.$val.MapIndex(key); }; - Value.ptr.prototype.MapKeys = function() { - var {_r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - it = [it]; - v = this; - new flag(v.flag).mustBe(21); - tt = (v.typ.kindType); - keyType = tt.key; - fl = (new flag(v.flag).ro() | ((keyType.Kind() >>> 0))) >>> 0; - m = $clone(v, Value).pointer(); - mlen = 0; - if (!(m === 0)) { - mlen = maplen(m); - } - it[0] = new hiter.ptr($ifaceNil, null, null, 0, null); - mapiterinit(v.typ, m, it[0]); - a = $makeSlice(sliceType$7, mlen); - i = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < a.$length)) { break; } */ if(!(i < a.$length)) { $s = 2; continue; } - _r = mapiterkey(it[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - key = _r; - if (key === 0) { - /* break; */ $s = 2; continue; - } - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = copyVal(keyType, fl, key)); - mapiternext(it[0]); - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return $subslice(a, 0, i); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapKeys, $c: true, $r, _r, a, fl, i, it, key, keyType, m, mlen, tt, v, $s};return $f; - }; - Value.prototype.MapKeys = function() { return this.$val.MapKeys(); }; - hiter.ptr.prototype.initialized = function() { - var h; - h = this; - return !($interfaceIsEqual(h.t, $ifaceNil)); - }; - hiter.prototype.initialized = function() { return this.$val.initialized(); }; - MapIter.ptr.prototype.Key = function() { - var {_r, iter, iterkey, ktype, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - iter = this; - if (!iter.hiter.initialized()) { - $panic(new $String("MapIter.Key called before Next")); - } - _r = mapiterkey(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - iterkey = _r; - if (iterkey === 0) { - $panic(new $String("MapIter.Key called on exhausted iterator")); - } - t = (iter.m.typ.kindType); - ktype = t.key; - $s = -1; return copyVal(ktype, (new flag(iter.m.flag).ro() | ((ktype.Kind() >>> 0))) >>> 0, iterkey); - /* */ } return; } var $f = {$blk: MapIter.ptr.prototype.Key, $c: true, $r, _r, iter, iterkey, ktype, t, $s};return $f; - }; - MapIter.prototype.Key = function() { return this.$val.Key(); }; - Value.ptr.prototype.SetIterKey = function(iter) { - var {_r, _r$1, iter, iterkey, key, ktype, t, target, v, $s, $r, $c} = $restore(this, {iter}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - if (!iter.hiter.initialized()) { - $panic(new $String("reflect: Value.SetIterKey called before Next")); - } - _r = mapiterkey(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - iterkey = _r; - if (iterkey === 0) { - $panic(new $String("reflect: Value.SetIterKey called on exhausted iterator")); - } - new flag(v.flag).mustBeAssignable(); - target = 0; - if (new flag(v.flag).kind() === 20) { - target = v.ptr; - } - t = (iter.m.typ.kindType); - ktype = t.key; - key = new Value.ptr(ktype, iterkey, (((iter.m.flag | ((ktype.Kind() >>> 0))) >>> 0) | 128) >>> 0); - _r$1 = $clone(key, Value).assignTo("reflect.MapIter.SetKey", v.typ, target); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - key = _r$1; - typedmemmove(v.typ, v.ptr, key.ptr); - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetIterKey, $c: true, $r, _r, _r$1, iter, iterkey, key, ktype, t, target, v, $s};return $f; - }; - Value.prototype.SetIterKey = function(iter) { return this.$val.SetIterKey(iter); }; - MapIter.ptr.prototype.Value = function() { - var {_r, iter, iterelem, t, vtype, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - iter = this; - if (!iter.hiter.initialized()) { - $panic(new $String("MapIter.Value called before Next")); - } - _r = mapiterelem(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - iterelem = _r; - if (iterelem === 0) { - $panic(new $String("MapIter.Value called on exhausted iterator")); - } - t = (iter.m.typ.kindType); - vtype = t.elem; - $s = -1; return copyVal(vtype, (new flag(iter.m.flag).ro() | ((vtype.Kind() >>> 0))) >>> 0, iterelem); - /* */ } return; } var $f = {$blk: MapIter.ptr.prototype.Value, $c: true, $r, _r, iter, iterelem, t, vtype, $s};return $f; - }; - MapIter.prototype.Value = function() { return this.$val.Value(); }; - Value.ptr.prototype.SetIterValue = function(iter) { - var {_r, _r$1, elem, iter, iterelem, t, target, v, vtype, $s, $r, $c} = $restore(this, {iter}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - if (!iter.hiter.initialized()) { - $panic(new $String("reflect: Value.SetIterValue called before Next")); - } - _r = mapiterelem(iter.hiter); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - iterelem = _r; - if (iterelem === 0) { - $panic(new $String("reflect: Value.SetIterValue called on exhausted iterator")); - } - new flag(v.flag).mustBeAssignable(); - target = 0; - if (new flag(v.flag).kind() === 20) { - target = v.ptr; - } - t = (iter.m.typ.kindType); - vtype = t.elem; - elem = new Value.ptr(vtype, iterelem, (((iter.m.flag | ((vtype.Kind() >>> 0))) >>> 0) | 128) >>> 0); - _r$1 = $clone(elem, Value).assignTo("reflect.MapIter.SetValue", v.typ, target); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - elem = _r$1; - typedmemmove(v.typ, v.ptr, elem.ptr); - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetIterValue, $c: true, $r, _r, _r$1, elem, iter, iterelem, t, target, v, vtype, $s};return $f; - }; - Value.prototype.SetIterValue = function(iter) { return this.$val.SetIterValue(iter); }; - MapIter.ptr.prototype.Next = function() { - var {$24r, _r, _r$1, iter, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - iter = this; - if (!$clone(iter.m, Value).IsValid()) { - $panic(new $String("MapIter.Next called on an iterator that does not have an associated map Value")); - } - /* */ if (!iter.hiter.initialized()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!iter.hiter.initialized()) { */ case 1: - mapiterinit(iter.m.typ, $clone(iter.m, Value).pointer(), iter.hiter); - $s = 3; continue; - /* } else { */ case 2: - _r = mapiterkey(iter.hiter); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r === 0) { */ case 4: - $panic(new $String("MapIter.Next called on exhausted iterator")); - /* } */ case 5: - mapiternext(iter.hiter); - /* } */ case 3: - _r$1 = mapiterkey(iter.hiter); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = !(_r$1 === 0); - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: MapIter.ptr.prototype.Next, $c: true, $r, $24r, _r, _r$1, iter, $s};return $f; - }; - MapIter.prototype.Next = function() { return this.$val.Next(); }; - MapIter.ptr.prototype.Reset = function(v) { - var iter, v; - iter = this; - if ($clone(v, Value).IsValid()) { - new flag(v.flag).mustBe(21); - } - iter.m = v; - hiter.copy(iter.hiter, new hiter.ptr($ifaceNil, null, null, 0, null)); - }; - MapIter.prototype.Reset = function(v) { return this.$val.Reset(v); }; - Value.ptr.prototype.MapRange = function() { - var v; - v = this; - new flag(v.flag).mustBe(21); - return new MapIter.ptr($clone(v, Value), new hiter.ptr($ifaceNil, null, null, 0, null)); - }; - Value.prototype.MapRange = function() { return this.$val.MapRange(); }; - copyVal = function(typ, fl, ptr) { - var c, fl, ptr, typ; - if (ifaceIndir(typ)) { - c = unsafe_New(typ); - typedmemmove(typ, c, ptr); - return new Value.ptr(typ, c, (fl | 128) >>> 0); - } - return new Value.ptr(typ, (ptr).$get(), fl); - }; - Value.ptr.prototype.Method = function(i) { - var fl, i, v; - v = this; - if (v.typ === ptrType$1.nil) { - $panic(new ValueError.ptr("reflect.Value.Method", 0)); - } - if (!((((v.flag & 512) >>> 0) === 0)) || ((i >>> 0)) >= ((v.typ.NumMethod() >>> 0))) { - $panic(new $String("reflect: Method index out of range")); - } - if ((v.typ.Kind() === 20) && $clone(v, Value).IsNil()) { - $panic(new $String("reflect: Method on nil interface value")); - } - fl = (new flag(v.flag).ro() | (((v.flag & 128) >>> 0))) >>> 0; - fl = (fl | (19)) >>> 0; - fl = (fl | ((((((i >>> 0)) << 10 >>> 0) | 512) >>> 0))) >>> 0; - return new Value.ptr(v.typ, v.ptr, fl); - }; - Value.prototype.Method = function(i) { return this.$val.Method(i); }; - Value.ptr.prototype.NumMethod = function() { - var v; - v = this; - if (v.typ === ptrType$1.nil) { - $panic(new ValueError.ptr("reflect.Value.NumMethod", 0)); - } - if (!((((v.flag & 512) >>> 0) === 0))) { - return 0; - } - return v.typ.NumMethod(); - }; - Value.prototype.NumMethod = function() { return this.$val.NumMethod(); }; - Value.ptr.prototype.MethodByName = function(name$1) { - var {_r, _tuple, m, name$1, ok, v, $s, $r, $c} = $restore(this, {name$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - if (v.typ === ptrType$1.nil) { - $panic(new ValueError.ptr("reflect.Value.MethodByName", 0)); - } - if (!((((v.flag & 512) >>> 0) === 0))) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - _r = v.typ.MethodByName(name$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - m = $clone(_tuple[0], Method); - ok = _tuple[1]; - if (!ok) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - $s = -1; return $clone(v, Value).Method(m.Index); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.MethodByName, $c: true, $r, _r, _tuple, m, name$1, ok, v, $s};return $f; - }; - Value.prototype.MethodByName = function(name$1) { return this.$val.MethodByName(name$1); }; - Value.ptr.prototype.NumField = function() { - var tt, v; - v = this; - new flag(v.flag).mustBe(25); - tt = (v.typ.kindType); - return tt.fields.$length; - }; - Value.prototype.NumField = function() { return this.$val.NumField(); }; - Value.ptr.prototype.OverflowComplex = function(x) { - var _1, k, v, x; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (15)) { - return overflowFloat32(x.$real) || overflowFloat32(x.$imag); - } else if (_1 === (16)) { - return false; - } - $panic(new ValueError.ptr("reflect.Value.OverflowComplex", new flag(v.flag).kind())); - }; - Value.prototype.OverflowComplex = function(x) { return this.$val.OverflowComplex(x); }; - Value.ptr.prototype.OverflowFloat = function(x) { - var _1, k, v, x; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (13)) { - return overflowFloat32(x); - } else if (_1 === (14)) { - return false; - } - $panic(new ValueError.ptr("reflect.Value.OverflowFloat", new flag(v.flag).kind())); - }; - Value.prototype.OverflowFloat = function(x) { return this.$val.OverflowFloat(x); }; - overflowFloat32 = function(x) { - var x; - if (x < 0) { - x = -x; - } - return 3.4028234663852886e+38 < x && x <= 1.7976931348623157e+308; - }; - Value.ptr.prototype.OverflowInt = function(x) { - var _1, bitSize, k, trunc, v, x; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - bitSize = $imul(v.typ.size, 8) >>> 0; - trunc = $shiftRightInt64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); - return !((x.$high === trunc.$high && x.$low === trunc.$low)); - } - $panic(new ValueError.ptr("reflect.Value.OverflowInt", new flag(v.flag).kind())); - }; - Value.prototype.OverflowInt = function(x) { return this.$val.OverflowInt(x); }; - Value.ptr.prototype.OverflowUint = function(x) { - var _1, bitSize, k, trunc, v, x; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (7)) || (_1 === (12)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { - bitSize = $imul(v.typ.size, 8) >>> 0; - trunc = $shiftRightUint64(($shiftLeft64(x, ((64 - bitSize >>> 0)))), ((64 - bitSize >>> 0))); - return !((x.$high === trunc.$high && x.$low === trunc.$low)); - } - $panic(new ValueError.ptr("reflect.Value.OverflowUint", new flag(v.flag).kind())); - }; - Value.prototype.OverflowUint = function(x) { return this.$val.OverflowUint(x); }; - Value.ptr.prototype.Recv = function() { - var {$24r, _r, _tuple, ok, v, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = new Value.ptr(ptrType$1.nil, 0, 0); - ok = false; - v = this; - new flag(v.flag).mustBe(18); - new flag(v.flag).mustBeExported(); - _r = $clone(v, Value).recv(false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - x = _tuple[0]; - ok = _tuple[1]; - $24r = [x, ok]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Recv, $c: true, $r, $24r, _r, _tuple, ok, v, x, $s};return $f; - }; - Value.prototype.Recv = function() { return this.$val.Recv(); }; - Value.ptr.prototype.recv = function(nb) { - var {_r, _tuple, nb, ok, p, selected, t, tt, v, val, $s, $r, $c} = $restore(this, {nb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - val = new Value.ptr(ptrType$1.nil, 0, 0); - ok = false; - v = this; - tt = (v.typ.kindType); - if ((((tt.dir >> 0)) & 1) === 0) { - $panic(new $String("reflect: recv on send-only channel")); - } - t = tt.elem; - val = new Value.ptr(t, 0, ((t.Kind() >>> 0))); - p = 0; - if (ifaceIndir(t)) { - p = unsafe_New(t); - val.ptr = p; - val.flag = (val.flag | (128)) >>> 0; - } else { - p = ((val.$ptr_ptr || (val.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, val)))); - } - _r = chanrecv($clone(v, Value).pointer(), nb, p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - selected = _tuple[0]; - ok = _tuple[1]; - if (!selected) { - val = new Value.ptr(ptrType$1.nil, 0, 0); - } - $s = -1; return [val, ok]; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.recv, $c: true, $r, _r, _tuple, nb, ok, p, selected, t, tt, v, val, $s};return $f; - }; - Value.prototype.recv = function(nb) { return this.$val.recv(nb); }; - Value.ptr.prototype.Send = function(x) { - var {_r, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(18); - new flag(v.flag).mustBeExported(); - _r = $clone(v, Value).send($clone(x, Value), false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Send, $c: true, $r, _r, v, x, $s};return $f; - }; - Value.prototype.Send = function(x) { return this.$val.Send(x); }; - Value.ptr.prototype.send = function(x, nb) { - var {$24r, _r, _r$1, nb, p, selected, tt, v, x, $s, $r, $c} = $restore(this, {x, nb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - selected = false; - v = this; - tt = (v.typ.kindType); - if ((((tt.dir >> 0)) & 2) === 0) { - $panic(new $String("reflect: send on recv-only channel")); - } - new flag(x.flag).mustBeExported(); - _r = $clone(x, Value).assignTo("reflect.Value.Send", tt.elem, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x = _r; - p = 0; - if (!((((x.flag & 128) >>> 0) === 0))) { - p = x.ptr; - } else { - p = ((x.$ptr_ptr || (x.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, x)))); - } - _r$1 = chansend($clone(v, Value).pointer(), p, nb); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - selected = _r$1; - $24r = selected; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.send, $c: true, $r, $24r, _r, _r$1, nb, p, selected, tt, v, x, $s};return $f; - }; - Value.prototype.send = function(x, nb) { return this.$val.send(x, nb); }; - Value.ptr.prototype.SetBool = function(x) { - var v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(1); - (v.ptr).$set(x); - }; - Value.prototype.SetBool = function(x) { return this.$val.SetBool(x); }; - Value.ptr.prototype.setRunes = function(x) { - var {_r, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 5))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 5))) { */ case 1: - $panic(new $String("reflect.Value.setRunes of non-rune slice")); - /* } */ case 2: - (v.ptr).$set(x); - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.setRunes, $c: true, $r, _r, v, x, $s};return $f; - }; - Value.prototype.setRunes = function(x) { return this.$val.setRunes(x); }; - Value.ptr.prototype.SetComplex = function(x) { - var _1, k, v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (15)) { - (v.ptr).$set((new $Complex64(x.$real, x.$imag))); - } else if (_1 === (16)) { - (v.ptr).$set(x); - } else { - $panic(new ValueError.ptr("reflect.Value.SetComplex", new flag(v.flag).kind())); - } - }; - Value.prototype.SetComplex = function(x) { return this.$val.SetComplex(x); }; - Value.ptr.prototype.SetFloat = function(x) { - var _1, k, v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (13)) { - (v.ptr).$set(($fround(x))); - } else if (_1 === (14)) { - (v.ptr).$set(x); - } else { - $panic(new ValueError.ptr("reflect.Value.SetFloat", new flag(v.flag).kind())); - } - }; - Value.prototype.SetFloat = function(x) { return this.$val.SetFloat(x); }; - Value.ptr.prototype.SetInt = function(x) { - var _1, k, v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (2)) { - (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); - } else if (_1 === (3)) { - (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) << 24 >> 24))); - } else if (_1 === (4)) { - (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) << 16 >> 16))); - } else if (_1 === (5)) { - (v.ptr).$set((((x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); - } else if (_1 === (6)) { - (v.ptr).$set(x); - } else { - $panic(new ValueError.ptr("reflect.Value.SetInt", new flag(v.flag).kind())); - } - }; - Value.prototype.SetInt = function(x) { return this.$val.SetInt(x); }; - Value.ptr.prototype.SetMapIndex = function(key, elem) { - var {_r, _r$1, _r$2, e, e$1, elem, k, k$1, key, tt, v, $s, $r, $c} = $restore(this, {key, elem}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(21); - new flag(v.flag).mustBeExported(); - new flag(key.flag).mustBeExported(); - tt = (v.typ.kindType); - /* */ if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((tt.key === stringType || (new flag(key.flag).kind() === 24)) && tt.key === key.typ && tt.elem.size <= 128) { */ case 1: - k = (key.ptr).$get(); - if (elem.typ === ptrType$1.nil) { - mapdelete_faststr(v.typ, $clone(v, Value).pointer(), k); - $s = -1; return; - } - new flag(elem.flag).mustBeExported(); - _r = $clone(elem, Value).assignTo("reflect.Value.SetMapIndex", tt.elem, 0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - elem = _r; - e = 0; - if (!((((elem.flag & 128) >>> 0) === 0))) { - e = elem.ptr; - } else { - e = ((elem.$ptr_ptr || (elem.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, elem)))); - } - $r = mapassign_faststr(v.typ, $clone(v, Value).pointer(), k, e); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _r$1 = $clone(key, Value).assignTo("reflect.Value.SetMapIndex", tt.key, 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - key = _r$1; - k$1 = 0; - if (!((((key.flag & 128) >>> 0) === 0))) { - k$1 = key.ptr; - } else { - k$1 = ((key.$ptr_ptr || (key.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, key)))); - } - if (elem.typ === ptrType$1.nil) { - mapdelete(v.typ, $clone(v, Value).pointer(), k$1); - $s = -1; return; - } - new flag(elem.flag).mustBeExported(); - _r$2 = $clone(elem, Value).assignTo("reflect.Value.SetMapIndex", tt.elem, 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - elem = _r$2; - e$1 = 0; - if (!((((elem.flag & 128) >>> 0) === 0))) { - e$1 = elem.ptr; - } else { - e$1 = ((elem.$ptr_ptr || (elem.$ptr_ptr = new ptrType$7(function() { return this.$target.ptr; }, function($v) { this.$target.ptr = $v; }, elem)))); - } - $r = mapassign(v.typ, $clone(v, Value).pointer(), k$1, e$1); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetMapIndex, $c: true, $r, _r, _r$1, _r$2, e, e$1, elem, k, k$1, key, tt, v, $s};return $f; - }; - Value.prototype.SetMapIndex = function(key, elem) { return this.$val.SetMapIndex(key, elem); }; - Value.ptr.prototype.SetUint = function(x) { - var _1, k, v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (7)) { - (v.ptr).$set(((x.$low >>> 0))); - } else if (_1 === (8)) { - (v.ptr).$set(((x.$low << 24 >>> 24))); - } else if (_1 === (9)) { - (v.ptr).$set(((x.$low << 16 >>> 16))); - } else if (_1 === (10)) { - (v.ptr).$set(((x.$low >>> 0))); - } else if (_1 === (11)) { - (v.ptr).$set(x); - } else if (_1 === (12)) { - (v.ptr).$set(((x.$low >>> 0))); - } else { - $panic(new ValueError.ptr("reflect.Value.SetUint", new flag(v.flag).kind())); - } - }; - Value.prototype.SetUint = function(x) { return this.$val.SetUint(x); }; - Value.ptr.prototype.SetPointer = function(x) { - var v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(26); - (v.ptr).$set(x); - }; - Value.prototype.SetPointer = function(x) { return this.$val.SetPointer(x); }; - Value.ptr.prototype.SetString = function(x) { - var v, x; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(24); - (v.ptr).$set(x); - }; - Value.prototype.SetString = function(x) { return this.$val.SetString(x); }; - Value.ptr.prototype.String = function() { - var {$24r, _1, _r, k, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (0)) { - $s = -1; return ""; - } else if (_1 === (24)) { - $s = -1; return (v.ptr).$get(); - } - _r = $clone(v, Value).Type().String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = "<" + _r + " Value>"; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.String, $c: true, $r, $24r, _1, _r, k, v, $s};return $f; - }; - Value.prototype.String = function() { return this.$val.String(); }; - Value.ptr.prototype.TryRecv = function() { - var {$24r, _r, _tuple, ok, v, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = new Value.ptr(ptrType$1.nil, 0, 0); - ok = false; - v = this; - new flag(v.flag).mustBe(18); - new flag(v.flag).mustBeExported(); - _r = $clone(v, Value).recv(true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - x = _tuple[0]; - ok = _tuple[1]; - $24r = [x, ok]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.TryRecv, $c: true, $r, $24r, _r, _tuple, ok, v, x, $s};return $f; - }; - Value.prototype.TryRecv = function() { return this.$val.TryRecv(); }; - Value.ptr.prototype.TrySend = function(x) { - var {$24r, _r, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBe(18); - new flag(v.flag).mustBeExported(); - _r = $clone(v, Value).send($clone(x, Value), true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.TrySend, $c: true, $r, $24r, _r, v, x, $s};return $f; - }; - Value.prototype.TrySend = function(x) { return this.$val.TrySend(x); }; - Value.ptr.prototype.Type = function() { - var f, i, m, m$1, ms, tt, v, x; - v = this; - f = v.flag; - if (f === 0) { - $panic(new ValueError.ptr("reflect.Value.Type", 0)); - } - if (((f & 512) >>> 0) === 0) { - return v.typ; - } - i = ((v.flag >> 0)) >> 10 >> 0; - if (v.typ.Kind() === 20) { - tt = (v.typ.kindType); - if (((i >>> 0)) >= ((tt.methods.$length >>> 0))) { - $panic(new $String("reflect: internal error: invalid method index")); - } - m = (x = tt.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - return v.typ.typeOff(m.typ); - } - ms = v.typ.exportedMethods(); - if (((i >>> 0)) >= ((ms.$length >>> 0))) { - $panic(new $String("reflect: internal error: invalid method index")); - } - m$1 = $clone(((i < 0 || i >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + i]), method); - return v.typ.typeOff(m$1.mtyp); - }; - Value.prototype.Type = function() { return this.$val.Type(); }; - Value.ptr.prototype.CanUint = function() { - var _1, v; - v = this; - _1 = new flag(v.flag).kind(); - if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { - return true; - } else { - return false; - } - }; - Value.prototype.CanUint = function() { return this.$val.CanUint(); }; - Value.ptr.prototype.Uint = function() { - var _1, k, p, v, x; - v = this; - k = new flag(v.flag).kind(); - p = v.ptr; - _1 = k; - if (_1 === (7)) { - return (new $Uint64(0, (p).$get())); - } else if (_1 === (8)) { - return (new $Uint64(0, (p).$get())); - } else if (_1 === (9)) { - return (new $Uint64(0, (p).$get())); - } else if (_1 === (10)) { - return (new $Uint64(0, (p).$get())); - } else if (_1 === (11)) { - return (p).$get(); - } else if (_1 === (12)) { - return ((x = (p).$get(), new $Uint64(0, x.constructor === Number ? x : 1))); - } - $panic(new ValueError.ptr("reflect.Value.Uint", new flag(v.flag).kind())); - }; - Value.prototype.Uint = function() { return this.$val.Uint(); }; - Value.ptr.prototype.UnsafeAddr = function() { - var v; - v = this; - if (v.typ === ptrType$1.nil) { - $panic(new ValueError.ptr("reflect.Value.UnsafeAddr", 0)); - } - if (((v.flag & 256) >>> 0) === 0) { - $panic(new $String("reflect.Value.UnsafeAddr of unaddressable value")); - } - return (v.ptr); - }; - Value.prototype.UnsafeAddr = function() { return this.$val.UnsafeAddr(); }; - Value.ptr.prototype.UnsafePointer = function() { - var {_1, _r, code, k, p, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - code = [code]; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - /* */ if (_1 === (22)) { $s = 2; continue; } - /* */ if ((_1 === (18)) || (_1 === (21)) || (_1 === (26))) { $s = 3; continue; } - /* */ if (_1 === (19)) { $s = 4; continue; } - /* */ if (_1 === (23)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (22)) { */ case 2: - if (v.typ.ptrdata === 0) { - if (!verifyNotInHeapPtr((v.ptr).$get())) { - $panic(new $String("reflect: reflect.Value.UnsafePointer on an invalid notinheap pointer")); - } - $s = -1; return (v.ptr).$get(); - } - $s = -1; return $clone(v, Value).pointer(); - /* } else if ((_1 === (18)) || (_1 === (21)) || (_1 === (26))) { */ case 3: - $s = -1; return $clone(v, Value).pointer(); - /* } else if (_1 === (19)) { */ case 4: - /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 7: - _r = methodValueCallCodePtr(); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - code[0] = _r; - $s = -1; return code[0]; - /* } */ case 8: - p = $clone(v, Value).pointer(); - if (!(p === 0)) { - p = (p).$get(); - } - $s = -1; return p; - /* } else if (_1 === (23)) { */ case 5: - $s = -1; return ($pointerOfStructConversion(v.ptr, ptrType$8)).Data; - /* } */ case 6: - case 1: - $panic(new ValueError.ptr("reflect.Value.UnsafePointer", new flag(v.flag).kind())); - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.UnsafePointer, $c: true, $r, _1, _r, code, k, p, v, $s};return $f; - }; - Value.prototype.UnsafePointer = function() { return this.$val.UnsafePointer(); }; - typesMustMatch = function(what, t1, t2) { - var {_r, _r$1, t1, t2, what, $s, $r, $c} = $restore(this, {what, t1, t2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!($interfaceIsEqual(t1, t2))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(t1, t2))) { */ case 1: - _r = t1.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = t2.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(what + ": " + _r + " != " + _r$1)); - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: typesMustMatch, $c: true, $r, _r, _r$1, t1, t2, what, $s};return $f; - }; - grow = function(s, extra) { - var {$24r, _q, _r, _r$1, _r$2, extra, i0, i1, m, s, t, $s, $r, $c} = $restore(this, {s, extra}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i0 = $clone(s, Value).Len(); - i1 = i0 + extra >> 0; - if (i1 < i0) { - $panic(new $String("reflect.Append: slice overflow")); - } - m = $clone(s, Value).Cap(); - /* */ if (i1 <= m) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (i1 <= m) { */ case 1: - _r = $clone(s, Value).Slice(0, i1); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, i0, i1]; - $s = 4; case 4: return $24r; - /* } */ case 2: - if (m === 0) { - m = extra; - } else { - while (true) { - if (!(m < i1)) { break; } - if (i0 < 256) { - m = m + (m) >> 0; - } else { - m = m + ((_q = ((m + 768 >> 0)) / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0; - } - } - } - _r$1 = MakeSlice($clone(s, Value).Type(), i1, m); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t = _r$1; - _r$2 = Copy($clone(t, Value), $clone(s, Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return [t, i0, i1]; - /* */ } return; } var $f = {$blk: grow, $c: true, $r, $24r, _q, _r, _r$1, _r$2, extra, i0, i1, m, s, t, $s};return $f; - }; - Append = function(s, x) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i0, i1, j, s, x, $s, $r, $c} = $restore(this, {s, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - new flag(s.flag).mustBe(23); - _r = grow($clone(s, Value), x.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - s = _tuple[0]; - i0 = _tuple[1]; - i1 = _tuple[2]; - _tmp = i0; - _tmp$1 = 0; - i = _tmp; - j = _tmp$1; - /* while (true) { */ case 2: - /* if (!(i < i1)) { break; } */ if(!(i < i1)) { $s = 3; continue; } - _r$1 = $clone(s, Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = $clone(_r$1, Value).Set($clone(((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]), Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = i + 1 >> 0; - _tmp$3 = j + 1 >> 0; - i = _tmp$2; - j = _tmp$3; - $s = 2; continue; - case 3: - $s = -1; return s; - /* */ } return; } var $f = {$blk: Append, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i0, i1, j, s, x, $s};return $f; - }; - $pkg.Append = Append; - AppendSlice = function(s, t) { - var {_arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, i0, i1, s, t, $s, $r, $c} = $restore(this, {s, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - new flag(s.flag).mustBe(23); - new flag(t.flag).mustBe(23); - _r = $clone(s, Value).Type().Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = $clone(t, Value).Type().Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - $r = typesMustMatch("reflect.AppendSlice", _arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = grow($clone(s, Value), $clone(t, Value).Len()); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - s = _tuple[0]; - i0 = _tuple[1]; - i1 = _tuple[2]; - _r$3 = $clone(s, Value).Slice(i0, i1); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = Copy($clone(_r$3, Value), $clone(t, Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return s; - /* */ } return; } var $f = {$blk: AppendSlice, $c: true, $r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, i0, i1, s, t, $s};return $f; - }; - $pkg.AppendSlice = AppendSlice; - MakeMap = function(typ) { - var {$24r, _r, typ, $s, $r, $c} = $restore(this, {typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = MakeMapWithSize(typ, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MakeMap, $c: true, $r, $24r, _r, typ, $s};return $f; - }; - $pkg.MakeMap = MakeMap; - MakeMapWithSize = function(typ, n) { - var {_r, m, n, t, typ, $s, $r, $c} = $restore(this, {typ, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = typ.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 21))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 21))) { */ case 1: - $panic(new $String("reflect.MakeMapWithSize of non-map type")); - /* } */ case 2: - t = $assertType(typ, ptrType$1); - m = makemap(t, n); - $s = -1; return new Value.ptr(t, m, 21); - /* */ } return; } var $f = {$blk: MakeMapWithSize, $c: true, $r, _r, m, n, t, typ, $s};return $f; - }; - $pkg.MakeMapWithSize = MakeMapWithSize; - Value.ptr.prototype.Convert = function(t) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, op, t, v, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1: - _r = makeMethodValue("Convert", $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - /* } */ case 2: - _r$1 = t.common(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = convertOp(_r$1, v.typ); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - op = _r$2; - /* */ if (op === $throwNilPointerError) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (op === $throwNilPointerError) { */ case 6: - _r$3 = t.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $panic(new $String("reflect.Value.Convert: value of type " + v.typ.String() + " cannot be converted to type " + _r$3)); - /* } */ case 7: - _r$4 = op($clone(v, Value), t); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Convert, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, op, t, v, $s};return $f; - }; - Value.prototype.Convert = function(t) { return this.$val.Convert(t); }; - Value.ptr.prototype.CanConvert = function(t) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, _v$1, n, t, v, vt, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - vt = $clone(v, Value).Type(); - _r = vt.ConvertibleTo(t); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _r$1 = vt.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (!(_r$1 === 23)) { _v$1 = false; $s = 7; continue s; } - _r$2 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$1 = _r$2 === 22; case 7: - if (!(_v$1)) { _v = false; $s = 6; continue s; } - _r$3 = t.Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4 === 17; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - _r$5 = t.Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Len(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - n = _r$6; - if (n > $clone(v, Value).Len()) { - $s = -1; return false; - } - /* } */ case 5: - $s = -1; return true; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.CanConvert, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _v, _v$1, n, t, v, vt, $s};return $f; - }; - Value.prototype.CanConvert = function(t) { return this.$val.CanConvert(t); }; - convertOp = function(dst, src) { - var {_1, _2, _3, _4, _5, _6, _7, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, dst, src, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = src.Kind(); - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 2; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 3; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 4; continue; } - /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 5; continue; } - /* */ if (_1 === (24)) { $s = 6; continue; } - /* */ if (_1 === (23)) { $s = 7; continue; } - /* */ if (_1 === (18)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 2: - _2 = dst.Kind(); - if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6)) || (_2 === (7)) || (_2 === (8)) || (_2 === (9)) || (_2 === (10)) || (_2 === (11)) || (_2 === (12))) { - $s = -1; return cvtInt; - } else if ((_2 === (13)) || (_2 === (14))) { - $s = -1; return cvtIntFloat; - } else if (_2 === (24)) { - $s = -1; return cvtIntString; - } - $s = 9; continue; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 3: - _3 = dst.Kind(); - if ((_3 === (2)) || (_3 === (3)) || (_3 === (4)) || (_3 === (5)) || (_3 === (6)) || (_3 === (7)) || (_3 === (8)) || (_3 === (9)) || (_3 === (10)) || (_3 === (11)) || (_3 === (12))) { - $s = -1; return cvtUint; - } else if ((_3 === (13)) || (_3 === (14))) { - $s = -1; return cvtUintFloat; - } else if (_3 === (24)) { - $s = -1; return cvtUintString; - } - $s = 9; continue; - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 4: - _4 = dst.Kind(); - if ((_4 === (2)) || (_4 === (3)) || (_4 === (4)) || (_4 === (5)) || (_4 === (6))) { - $s = -1; return cvtFloatInt; - } else if ((_4 === (7)) || (_4 === (8)) || (_4 === (9)) || (_4 === (10)) || (_4 === (11)) || (_4 === (12))) { - $s = -1; return cvtFloatUint; - } else if ((_4 === (13)) || (_4 === (14))) { - $s = -1; return cvtFloat; - } - $s = 9; continue; - /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 5: - _5 = dst.Kind(); - if ((_5 === (15)) || (_5 === (16))) { - $s = -1; return cvtComplex; - } - $s = 9; continue; - /* } else if (_1 === (24)) { */ case 6: - if (!(dst.Kind() === 23)) { _v = false; $s = 12; continue s; } - _r = dst.Elem().PkgPath(); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r === ""; case 12: - /* */ if (_v) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_v) { */ case 10: - _r$1 = dst.Elem().Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _6 = _r$1; - if (_6 === (8)) { - $s = -1; return cvtStringBytes; - } else if (_6 === (5)) { - $s = -1; return cvtStringRunes; - } - case 14: - /* } */ case 11: - $s = 9; continue; - /* } else if (_1 === (23)) { */ case 7: - if (!(dst.Kind() === 24)) { _v$1 = false; $s = 18; continue s; } - _r$2 = src.Elem().PkgPath(); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$1 = _r$2 === ""; case 18: - /* */ if (_v$1) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_v$1) { */ case 16: - _r$3 = src.Elem().Kind(); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _7 = _r$3; - if (_7 === (8)) { - $s = -1; return cvtBytesString; - } else if (_7 === (5)) { - $s = -1; return cvtRunesString; - } - case 20: - /* } */ case 17: - if (!(dst.Kind() === 22)) { _v$3 = false; $s = 25; continue s; } - _r$4 = dst.Elem().Kind(); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v$3 = _r$4 === 17; case 25: - if (!(_v$3)) { _v$2 = false; $s = 24; continue s; } - _r$5 = dst.Elem().Elem(); /* */ $s = 27; case 27: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v$2 = $interfaceIsEqual(src.Elem(), _r$5); case 24: - /* */ if (_v$2) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_v$2) { */ case 22: - $s = -1; return cvtSliceArrayPtr; - /* } */ case 23: - $s = 9; continue; - /* } else if (_1 === (18)) { */ case 8: - if (!(dst.Kind() === 18)) { _v$4 = false; $s = 30; continue s; } - _r$6 = specialChannelAssignability(dst, src); /* */ $s = 31; case 31: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v$4 = _r$6; case 30: - /* */ if (_v$4) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (_v$4) { */ case 28: - $s = -1; return cvtDirect; - /* } */ case 29: - /* } */ case 9: - case 1: - _r$7 = haveIdenticalUnderlyingType(dst, src, false); /* */ $s = 34; case 34: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (_r$7) { */ case 32: - $s = -1; return cvtDirect; - /* } */ case 33: - if (!((dst.Kind() === 22) && dst.Name() === "" && (src.Kind() === 22) && src.Name() === "")) { _v$5 = false; $s = 37; continue s; } - _r$8 = dst.Elem().common(); /* */ $s = 38; case 38: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg = _r$8; - _r$9 = src.Elem().common(); /* */ $s = 39; case 39: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = haveIdenticalUnderlyingType(_arg, _arg$1, false); /* */ $s = 40; case 40: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$5 = _r$10; case 37: - /* */ if (_v$5) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (_v$5) { */ case 35: - $s = -1; return cvtDirect; - /* } */ case 36: - if (implements$1(dst, src)) { - if (src.Kind() === 20) { - $s = -1; return cvtI2I; - } - $s = -1; return cvtT2I; - } - $s = -1; return $throwNilPointerError; - /* */ } return; } var $f = {$blk: convertOp, $c: true, $r, _1, _2, _3, _4, _5, _6, _7, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, dst, src, $s};return $f; - }; - makeFloat = function(f, v, t) { - var {_1, _r, f, ptr, t, typ, v, $s, $r, $c} = $restore(this, {f, v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - typ = _r; - ptr = unsafe_New(typ); - _1 = typ.size; - if (_1 === (4)) { - (ptr).$set(($fround(v))); - } else if (_1 === (8)) { - (ptr).$set(v); - } - $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0); - /* */ } return; } var $f = {$blk: makeFloat, $c: true, $r, _1, _r, f, ptr, t, typ, v, $s};return $f; - }; - makeFloat32 = function(f, v, t) { - var {_r, f, ptr, t, typ, v, $s, $r, $c} = $restore(this, {f, v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - typ = _r; - ptr = unsafe_New(typ); - (ptr).$set(v); - $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0); - /* */ } return; } var $f = {$blk: makeFloat32, $c: true, $r, _r, f, ptr, t, typ, v, $s};return $f; - }; - makeComplex = function(f, v, t) { - var {_1, _r, f, ptr, t, typ, v, $s, $r, $c} = $restore(this, {f, v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - typ = _r; - ptr = unsafe_New(typ); - _1 = typ.size; - if (_1 === (8)) { - (ptr).$set((new $Complex64(v.$real, v.$imag))); - } else if (_1 === (16)) { - (ptr).$set(v); - } - $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0); - /* */ } return; } var $f = {$blk: makeComplex, $c: true, $r, _1, _r, f, ptr, t, typ, v, $s};return $f; - }; - makeString = function(f, v, t) { - var {_r, f, ret, t, v, $s, $r, $c} = $restore(this, {f, v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(New(t), Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ret = _r; - $clone(ret, Value).SetString(v); - ret.flag = (((ret.flag & ~256) >>> 0) | f) >>> 0; - $s = -1; return ret; - /* */ } return; } var $f = {$blk: makeString, $c: true, $r, _r, f, ret, t, v, $s};return $f; - }; - makeBytes = function(f, v, t) { - var {_r, f, ret, t, v, $s, $r, $c} = $restore(this, {f, v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(New(t), Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ret = _r; - $r = $clone(ret, Value).SetBytes(v); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ret.flag = (((ret.flag & ~256) >>> 0) | f) >>> 0; - $s = -1; return ret; - /* */ } return; } var $f = {$blk: makeBytes, $c: true, $r, _r, f, ret, t, v, $s};return $f; - }; - makeRunes = function(f, v, t) { - var {_r, f, ret, t, v, $s, $r, $c} = $restore(this, {f, v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(New(t), Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ret = _r; - $r = $clone(ret, Value).setRunes(v); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ret.flag = (((ret.flag & ~256) >>> 0) | f) >>> 0; - $s = -1; return ret; - /* */ } return; } var $f = {$blk: makeRunes, $c: true, $r, _r, f, ret, t, v, $s};return $f; - }; - cvtInt = function(v, t) { - var {$24r, _r, t, v, x, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeInt(new flag(v.flag).ro(), ((x = $clone(v, Value).Int(), new $Uint64(x.$high, x.$low))), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtInt, $c: true, $r, $24r, _r, t, v, x, $s};return $f; - }; - cvtUint = function(v, t) { - var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeInt(new flag(v.flag).ro(), $clone(v, Value).Uint(), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtUint, $c: true, $r, $24r, _r, t, v, $s};return $f; - }; - cvtFloatInt = function(v, t) { - var {$24r, _r, t, v, x, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeInt(new flag(v.flag).ro(), ((x = (new $Int64(0, $clone(v, Value).Float())), new $Uint64(x.$high, x.$low))), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtFloatInt, $c: true, $r, $24r, _r, t, v, x, $s};return $f; - }; - cvtFloatUint = function(v, t) { - var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeInt(new flag(v.flag).ro(), (new $Uint64(0, $clone(v, Value).Float())), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtFloatUint, $c: true, $r, $24r, _r, t, v, $s};return $f; - }; - cvtIntFloat = function(v, t) { - var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeFloat(new flag(v.flag).ro(), ($flatten64($clone(v, Value).Int())), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtIntFloat, $c: true, $r, $24r, _r, t, v, $s};return $f; - }; - cvtUintFloat = function(v, t) { - var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeFloat(new flag(v.flag).ro(), ($flatten64($clone(v, Value).Uint())), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtUintFloat, $c: true, $r, $24r, _r, t, v, $s};return $f; - }; - cvtFloat = function(v, t) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _v, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(v, Value).Type().Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - if (!(_r === 13)) { _v = false; $s = 3; continue s; } - _r$1 = t.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === 13; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$2 = makeFloat32(new flag(v.flag).ro(), (v.ptr).$get(), t); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 7; case 7: return $24r; - /* } */ case 2: - _r$3 = makeFloat(new flag(v.flag).ro(), $clone(v, Value).Float(), t); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: cvtFloat, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _v, t, v, $s};return $f; - }; - cvtComplex = function(v, t) { - var {$24r, _r, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeComplex(new flag(v.flag).ro(), $clone(v, Value).Complex(), t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtComplex, $c: true, $r, $24r, _r, t, v, $s};return $f; - }; - cvtIntString = function(v, t) { - var {$24r, _r, s, t, v, x, x$1, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = "\xEF\xBF\xBD"; - x = $clone(v, Value).Int(); - if ((x$1 = (new $Int64(0, (((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))), (x$1.$high === x.$high && x$1.$low === x.$low))) { - s = ($encodeRune((((x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))); - } - _r = makeString(new flag(v.flag).ro(), s, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtIntString, $c: true, $r, $24r, _r, s, t, v, x, x$1, $s};return $f; - }; - cvtUintString = function(v, t) { - var {$24r, _r, s, t, v, x, x$1, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = "\xEF\xBF\xBD"; - x = $clone(v, Value).Uint(); - if ((x$1 = (new $Uint64(0, ((x.$low >> 0)))), (x$1.$high === x.$high && x$1.$low === x.$low))) { - s = ($encodeRune(((x.$low >> 0)))); - } - _r = makeString(new flag(v.flag).ro(), s, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cvtUintString, $c: true, $r, $24r, _r, s, t, v, x, x$1, $s};return $f; - }; - cvtBytesString = function(v, t) { - var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = new flag(v.flag).ro(); - _r = $clone(v, Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = ($bytesToString(_r)); - _arg$2 = t; - _r$1 = makeString(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: cvtBytesString, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f; - }; - cvtStringBytes = function(v, t) { - var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = new flag(v.flag).ro(); - _r = $clone(v, Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = (new sliceType$9($stringToBytes(_r))); - _arg$2 = t; - _r$1 = makeBytes(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: cvtStringBytes, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f; - }; - cvtRunesString = function(v, t) { - var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = new flag(v.flag).ro(); - _r = $clone(v, Value).runes(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = ($runesToString(_r)); - _arg$2 = t; - _r$1 = makeString(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: cvtRunesString, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f; - }; - cvtStringRunes = function(v, t) { - var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = new flag(v.flag).ro(); - _r = $clone(v, Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = (new sliceType$10($stringToRunes(_r))); - _arg$2 = t; - _r$1 = makeRunes(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: cvtStringRunes, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, t, v, $s};return $f; - }; - cvtT2I = function(v, typ) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, target, typ, v, x, $s, $r, $c} = $restore(this, {v, typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = typ.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = unsafe_New(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - target = _r$1; - _r$2 = valueInterface($clone(v, Value), false); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - x = _r$2; - _r$3 = typ.NumMethod(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$3 === 0) { */ case 4: - (target).$set(x); - $s = 6; continue; - /* } else { */ case 5: - ifaceE2I($assertType(typ, ptrType$1), x, target); - /* } */ case 6: - _r$4 = typ.common(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = new Value.ptr(_r$4, target, (((new flag(v.flag).ro() | 128) >>> 0) | 20) >>> 0); - $s = 9; case 9: return $24r; - /* */ } return; } var $f = {$blk: cvtT2I, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, target, typ, v, x, $s};return $f; - }; - cvtI2I = function(v, typ) { - var {$24r, _r, _r$1, _r$2, ret, typ, v, $s, $r, $c} = $restore(this, {v, typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(v, Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, Value).IsNil()) { */ case 1: - _r = Zero(typ); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ret = _r; - ret.flag = (ret.flag | (new flag(v.flag).ro())) >>> 0; - $s = -1; return ret; - /* } */ case 2: - _r$1 = $clone(v, Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = cvtT2I($clone(_r$1, Value), typ); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: cvtI2I, $c: true, $r, $24r, _r, _r$1, _r$2, ret, typ, v, $s};return $f; - }; - structField.ptr.prototype.offset = function() { - var f; - f = this; - return f.offsetEmbed >>> 1 >>> 0; - }; - structField.prototype.offset = function() { return this.$val.offset(); }; - structField.ptr.prototype.embedded = function() { - var f; - f = this; - return !((((f.offsetEmbed & 1) >>> 0) === 0)); - }; - structField.prototype.embedded = function() { return this.$val.embedded(); }; - Method.ptr.prototype.IsExported = function() { - var m; - m = this; - return m.PkgPath === ""; - }; - Method.prototype.IsExported = function() { return this.$val.IsExported(); }; - Kind.prototype.String = function() { - var k; - k = this.$val; - if (((k >> 0)) < kindNames.$length) { - return ((k < 0 || k >= kindNames.$length) ? ($throwRuntimeError("index out of range"), undefined) : kindNames.$array[kindNames.$offset + k]); - } - return "kind" + strconv.Itoa(((k >> 0))); - }; - $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; - rtype.ptr.prototype.String = function() { - var s, t; - t = this; - s = $clone(t.nameOff(t.str), name).name(); - if (!((((t.tflag & 2) >>> 0) === 0))) { - return $substring(s, 1); - } - return s; - }; - rtype.prototype.String = function() { return this.$val.String(); }; - rtype.ptr.prototype.Size = function() { - var t; - t = this; - return t.size; - }; - rtype.prototype.Size = function() { return this.$val.Size(); }; - rtype.ptr.prototype.Bits = function() { - var k, t; - t = this; - if (t === ptrType$1.nil) { - $panic(new $String("reflect: Bits of nil Type")); - } - k = t.Kind(); - if (k < 2 || k > 16) { - $panic(new $String("reflect: Bits of non-arithmetic Type " + t.String())); - } - return $imul(((t.size >> 0)), 8); - }; - rtype.prototype.Bits = function() { return this.$val.Bits(); }; - rtype.ptr.prototype.Align = function() { - var t; - t = this; - return ((t.align >> 0)); - }; - rtype.prototype.Align = function() { return this.$val.Align(); }; - rtype.ptr.prototype.FieldAlign = function() { - var t; - t = this; - return ((t.fieldAlign >> 0)); - }; - rtype.prototype.FieldAlign = function() { return this.$val.FieldAlign(); }; - rtype.ptr.prototype.Kind = function() { - var t; - t = this; - return ((((t.kind & 31) >>> 0) >>> 0)); - }; - rtype.prototype.Kind = function() { return this.$val.Kind(); }; - rtype.ptr.prototype.common = function() { - var t; - t = this; - return t; - }; - rtype.prototype.common = function() { return this.$val.common(); }; - rtype.ptr.prototype.exportedMethods = function() { - var t, ut; - t = this; - ut = t.uncommon(); - if (ut === ptrType$9.nil) { - return sliceType$11.nil; - } - return ut.exportedMethods(); - }; - rtype.prototype.exportedMethods = function() { return this.$val.exportedMethods(); }; - rtype.ptr.prototype.NumMethod = function() { - var t, tt; - t = this; - if (t.Kind() === 20) { - tt = (t.kindType); - return tt.NumMethod(); - } - return t.exportedMethods().$length; - }; - rtype.prototype.NumMethod = function() { return this.$val.NumMethod(); }; - rtype.ptr.prototype.MethodByName = function(name$1) { - var {$24r, _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, i, m, name$1, ok, p, t, tt, ut, $s, $r, $c} = $restore(this, {name$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - ok = false; - t = this; - if (t.Kind() === 20) { - tt = (t.kindType); - _tuple = tt.MethodByName(name$1); - Method.copy(m, _tuple[0]); - ok = _tuple[1]; - $s = -1; return [m, ok]; - } - ut = t.uncommon(); - if (ut === ptrType$9.nil) { - _tmp = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - _tmp$1 = false; - Method.copy(m, _tmp); - ok = _tmp$1; - $s = -1; return [m, ok]; - } - _ref = ut.exportedMethods(); - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - p = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), method); - /* */ if ($clone(t.nameOff(p.name), name).name() === name$1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($clone(t.nameOff(p.name), name).name() === name$1) { */ case 3: - _r = t.Method(i); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$2 = $clone(_r, Method); - _tmp$3 = true; - Method.copy(m, _tmp$2); - ok = _tmp$3; - $24r = [m, ok]; - $s = 6; case 6: return $24r; - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - _tmp$4 = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - _tmp$5 = false; - Method.copy(m, _tmp$4); - ok = _tmp$5; - $s = -1; return [m, ok]; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.MethodByName, $c: true, $r, $24r, _i, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, i, m, name$1, ok, p, t, tt, ut, $s};return $f; - }; - rtype.prototype.MethodByName = function(name$1) { return this.$val.MethodByName(name$1); }; - rtype.ptr.prototype.PkgPath = function() { - var t, ut; - t = this; - if (((t.tflag & 4) >>> 0) === 0) { - return ""; - } - ut = t.uncommon(); - if (ut === ptrType$9.nil) { - return ""; - } - return $clone(t.nameOff(ut.pkgPath), name).name(); - }; - rtype.prototype.PkgPath = function() { return this.$val.PkgPath(); }; - rtype.ptr.prototype.hasName = function() { - var t; - t = this; - return !((((t.tflag & 4) >>> 0) === 0)); - }; - rtype.prototype.hasName = function() { return this.$val.hasName(); }; - rtype.ptr.prototype.Name = function() { - var _1, i, s, sqBrackets, t; - t = this; - if (!t.hasName()) { - return ""; - } - s = t.String(); - i = s.length - 1 >> 0; - sqBrackets = 0; - while (true) { - if (!(i >= 0 && (!((s.charCodeAt(i) === 46)) || !((sqBrackets === 0))))) { break; } - _1 = s.charCodeAt(i); - if (_1 === (93)) { - sqBrackets = sqBrackets + (1) >> 0; - } else if (_1 === (91)) { - sqBrackets = sqBrackets - (1) >> 0; - } - i = i - (1) >> 0; - } - return $substring(s, (i + 1 >> 0)); - }; - rtype.prototype.Name = function() { return this.$val.Name(); }; - rtype.ptr.prototype.ChanDir = function() { - var t, tt; - t = this; - if (!((t.Kind() === 18))) { - $panic(new $String("reflect: ChanDir of non-chan type " + t.String())); - } - tt = (t.kindType); - return ((tt.dir >> 0)); - }; - rtype.prototype.ChanDir = function() { return this.$val.ChanDir(); }; - rtype.ptr.prototype.IsVariadic = function() { - var t, tt; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: IsVariadic of non-func type " + t.String())); - } - tt = (t.kindType); - return !((((tt.outCount & 32768) >>> 0) === 0)); - }; - rtype.prototype.IsVariadic = function() { return this.$val.IsVariadic(); }; - rtype.ptr.prototype.Elem = function() { - var _1, t, tt, tt$1, tt$2, tt$3, tt$4; - t = this; - _1 = t.Kind(); - if (_1 === (17)) { - tt = (t.kindType); - return toType(tt.elem); - } else if (_1 === (18)) { - tt$1 = (t.kindType); - return toType(tt$1.elem); - } else if (_1 === (21)) { - tt$2 = (t.kindType); - return toType(tt$2.elem); - } else if (_1 === (22)) { - tt$3 = (t.kindType); - return toType(tt$3.elem); - } else if (_1 === (23)) { - tt$4 = (t.kindType); - return toType(tt$4.elem); - } - $panic(new $String("reflect: Elem of invalid type " + t.String())); - }; - rtype.prototype.Elem = function() { return this.$val.Elem(); }; - rtype.ptr.prototype.Field = function(i) { - var i, t, tt; - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: Field of non-struct type " + t.String())); - } - tt = (t.kindType); - return tt.Field(i); - }; - rtype.prototype.Field = function(i) { return this.$val.Field(i); }; - rtype.ptr.prototype.FieldByIndex = function(index) { - var {$24r, _r, index, t, tt, $s, $r, $c} = $restore(this, {index}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: FieldByIndex of non-struct type " + t.String())); - } - tt = (t.kindType); - _r = tt.FieldByIndex(index); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.FieldByIndex, $c: true, $r, $24r, _r, index, t, tt, $s};return $f; - }; - rtype.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; - rtype.ptr.prototype.FieldByName = function(name$1) { - var {$24r, _r, name$1, t, tt, $s, $r, $c} = $restore(this, {name$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: FieldByName of non-struct type " + t.String())); - } - tt = (t.kindType); - _r = tt.FieldByName(name$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.FieldByName, $c: true, $r, $24r, _r, name$1, t, tt, $s};return $f; - }; - rtype.prototype.FieldByName = function(name$1) { return this.$val.FieldByName(name$1); }; - rtype.ptr.prototype.FieldByNameFunc = function(match) { - var {$24r, _r, match, t, tt, $s, $r, $c} = $restore(this, {match}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: FieldByNameFunc of non-struct type " + t.String())); - } - tt = (t.kindType); - _r = tt.FieldByNameFunc(match); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.FieldByNameFunc, $c: true, $r, $24r, _r, match, t, tt, $s};return $f; - }; - rtype.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; - rtype.ptr.prototype.In = function(i) { - var i, t, tt, x; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: In of non-func type " + t.String())); - } - tt = (t.kindType); - return toType((x = tt.in$(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))); - }; - rtype.prototype.In = function(i) { return this.$val.In(i); }; - rtype.ptr.prototype.Key = function() { - var t, tt; - t = this; - if (!((t.Kind() === 21))) { - $panic(new $String("reflect: Key of non-map type " + t.String())); - } - tt = (t.kindType); - return toType(tt.key); - }; - rtype.prototype.Key = function() { return this.$val.Key(); }; - rtype.ptr.prototype.Len = function() { - var t, tt; - t = this; - if (!((t.Kind() === 17))) { - $panic(new $String("reflect: Len of non-array type " + t.String())); - } - tt = (t.kindType); - return ((tt.len >> 0)); - }; - rtype.prototype.Len = function() { return this.$val.Len(); }; - rtype.ptr.prototype.NumField = function() { - var t, tt; - t = this; - if (!((t.Kind() === 25))) { - $panic(new $String("reflect: NumField of non-struct type " + t.String())); - } - tt = (t.kindType); - return tt.fields.$length; - }; - rtype.prototype.NumField = function() { return this.$val.NumField(); }; - rtype.ptr.prototype.NumIn = function() { - var t, tt; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: NumIn of non-func type " + t.String())); - } - tt = (t.kindType); - return ((tt.inCount >> 0)); - }; - rtype.prototype.NumIn = function() { return this.$val.NumIn(); }; - rtype.ptr.prototype.NumOut = function() { - var t, tt; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: NumOut of non-func type " + t.String())); - } - tt = (t.kindType); - return tt.out().$length; - }; - rtype.prototype.NumOut = function() { return this.$val.NumOut(); }; - rtype.ptr.prototype.Out = function(i) { - var i, t, tt, x; - t = this; - if (!((t.Kind() === 19))) { - $panic(new $String("reflect: Out of non-func type " + t.String())); - } - tt = (t.kindType); - return toType((x = tt.out(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))); - }; - rtype.prototype.Out = function(i) { return this.$val.Out(i); }; - ChanDir.prototype.String = function() { - var _1, d; - d = this.$val; - _1 = d; - if (_1 === (2)) { - return "chan<-"; - } else if (_1 === (1)) { - return "<-chan"; - } else if (_1 === (3)) { - return "chan"; - } - return "ChanDir" + strconv.Itoa(((d >> 0))); - }; - $ptrType(ChanDir).prototype.String = function() { return new ChanDir(this.$get()).String(); }; - interfaceType.ptr.prototype.Method = function(i) { - var i, m, p, pname, t, x; - m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - t = this; - if (i < 0 || i >= t.methods.$length) { - return m; - } - p = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - pname = $clone(t.rtype.nameOff(p.name), name); - m.Name = $clone(pname, name).name(); - if (!$clone(pname, name).isExported()) { - m.PkgPath = $clone(pname, name).pkgPath(); - if (m.PkgPath === "") { - m.PkgPath = $clone(t.pkgPath, name).name(); - } - } - m.Type = toType(t.rtype.typeOff(p.typ)); - m.Index = i; - return m; - }; - interfaceType.prototype.Method = function(i) { return this.$val.Method(i); }; - interfaceType.ptr.prototype.NumMethod = function() { - var t; - t = this; - return t.methods.$length; - }; - interfaceType.prototype.NumMethod = function() { return this.$val.NumMethod(); }; - interfaceType.ptr.prototype.MethodByName = function(name$1) { - var _i, _ref, _tmp, _tmp$1, i, m, name$1, ok, p, t, x; - m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - ok = false; - t = this; - if (t === ptrType$10.nil) { - return [m, ok]; - } - p = ptrType$11.nil; - _ref = t.methods; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - p = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - if ($clone(t.rtype.nameOff(p.name), name).name() === name$1) { - _tmp = $clone(t.Method(i), Method); - _tmp$1 = true; - Method.copy(m, _tmp); - ok = _tmp$1; - return [m, ok]; - } - _i++; - } - return [m, ok]; - }; - interfaceType.prototype.MethodByName = function(name$1) { return this.$val.MethodByName(name$1); }; - StructField.ptr.prototype.IsExported = function() { - var f; - f = this; - return f.PkgPath === ""; - }; - StructField.prototype.IsExported = function() { return this.$val.IsExported(); }; - StructTag.prototype.Get = function(key) { - var _tuple, key, tag, v; - tag = this.$val; - _tuple = new StructTag(tag).Lookup(key); - v = _tuple[0]; - return v; - }; - $ptrType(StructTag).prototype.Get = function(key) { return new StructTag(this.$get()).Get(key); }; - StructTag.prototype.Lookup = function(key) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, i, key, name$1, ok, qvalue, tag, value, value$1; - value = ""; - ok = false; - tag = this.$val; - while (true) { - if (!(!(tag === ""))) { break; } - i = 0; - while (true) { - if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; } - i = i + (1) >> 0; - } - tag = $substring(tag, i); - if (tag === "") { - break; - } - i = 0; - while (true) { - if (!(i < tag.length && tag.charCodeAt(i) > 32 && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)) && !((tag.charCodeAt(i) === 127)))) { break; } - i = i + (1) >> 0; - } - if ((i === 0) || (i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) { - break; - } - name$1 = ($substring(tag, 0, i)); - tag = $substring(tag, (i + 1 >> 0)); - i = 1; - while (true) { - if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; } - if (tag.charCodeAt(i) === 92) { - i = i + (1) >> 0; - } - i = i + (1) >> 0; - } - if (i >= tag.length) { - break; - } - qvalue = ($substring(tag, 0, (i + 1 >> 0))); - tag = $substring(tag, (i + 1 >> 0)); - if (key === name$1) { - _tuple = strconv.Unquote(qvalue); - value$1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - break; - } - _tmp = value$1; - _tmp$1 = true; - value = _tmp; - ok = _tmp$1; - return [value, ok]; - } - } - _tmp$2 = ""; - _tmp$3 = false; - value = _tmp$2; - ok = _tmp$3; - return [value, ok]; - }; - $ptrType(StructTag).prototype.Lookup = function(key) { return new StructTag(this.$get()).Lookup(key); }; - structType.ptr.prototype.Field = function(i) { - var f, i, p, t, tag, x; - f = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false); - t = this; - if (i < 0 || i >= t.fields.$length) { - $panic(new $String("reflect: Field index out of bounds")); - } - p = (x = t.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - f.Type = toType(p.typ); - f.Name = $clone(p.name, name).name(); - f.Anonymous = p.embedded(); - if (!$clone(p.name, name).isExported()) { - f.PkgPath = $clone(t.pkgPath, name).name(); - } - tag = $clone(p.name, name).tag(); - if (!(tag === "")) { - f.Tag = (tag); - } - f.Offset = p.offset(); - f.Index = new sliceType$6([i]); - return f; - }; - structType.prototype.Field = function(i) { return this.$val.Field(i); }; - structType.ptr.prototype.FieldByIndex = function(index) { - var {_i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _v, f, ft, i, index, t, x, $s, $r, $c} = $restore(this, {index}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false); - t = this; - f.Type = toType(t.rtype); - _ref = index; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (i > 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (i > 0) { */ case 3: - ft = f.Type; - _r = ft.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - if (!(_r === 22)) { _v = false; $s = 7; continue s; } - _r$1 = ft.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.Kind(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2 === 25; case 7: - /* */ if (_v) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_v) { */ case 5: - _r$3 = ft.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ft = _r$3; - /* } */ case 6: - f.Type = ft; - /* } */ case 4: - _r$4 = f.Type.Field(x); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - StructField.copy(f, _r$4); - _i++; - $s = 1; continue; - case 2: - $s = -1; return f; - /* */ } return; } var $f = {$blk: structType.ptr.prototype.FieldByIndex, $c: true, $r, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _v, f, ft, i, index, t, x, $s};return $f; - }; - structType.prototype.FieldByIndex = function(index) { return this.$val.FieldByIndex(index); }; - structType.ptr.prototype.FieldByNameFunc = function(match) { - var {_entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _r, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok, result, scan, styp, t, t$1, visited, x, $s, $r, $c} = $restore(this, {match}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - result = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false); - ok = false; - t = this; - current = new sliceType$12([]); - next = new sliceType$12([new fieldScan.ptr(t, sliceType$6.nil)]); - nextCount = false; - visited = $makeMap(ptrType$12.keyFor, []); - /* while (true) { */ case 1: - /* if (!(next.$length > 0)) { break; } */ if(!(next.$length > 0)) { $s = 2; continue; } - _tmp = next; - _tmp$1 = $subslice(current, 0, 0); - current = _tmp; - next = _tmp$1; - count = nextCount; - nextCount = false; - _ref = current; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - scan = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), fieldScan); - t$1 = scan.typ; - if ((_entry = visited[ptrType$12.keyFor(t$1)], _entry !== undefined ? _entry.v : false)) { - _i++; - /* continue; */ $s = 3; continue; - } - _key = t$1; (visited || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key)] = { k: _key, v: true }; - _ref$1 = t$1.fields; - _i$1 = 0; - /* while (true) { */ case 5: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 6; continue; } - i = _i$1; - f = (x = t$1.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - fname = $clone(f.name, name).name(); - ntyp = ptrType$1.nil; - /* */ if (f.embedded()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (f.embedded()) { */ case 7: - ntyp = f.typ; - /* */ if (ntyp.Kind() === 22) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ntyp.Kind() === 22) { */ case 9: - _r = ntyp.Elem().common(); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ntyp = _r; - /* } */ case 10: - /* } */ case 8: - _r$1 = match(fname); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_r$1) { */ case 12: - if ((_entry$1 = count[ptrType$12.keyFor(t$1)], _entry$1 !== undefined ? _entry$1.v : 0) > 1 || ok) { - _tmp$2 = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false); - _tmp$3 = false; - StructField.copy(result, _tmp$2); - ok = _tmp$3; - $s = -1; return [result, ok]; - } - StructField.copy(result, t$1.Field(i)); - result.Index = sliceType$6.nil; - result.Index = $appendSlice(result.Index, scan.index); - result.Index = $append(result.Index, i); - ok = true; - _i$1++; - /* continue; */ $s = 5; continue; - /* } */ case 13: - if (ok || ntyp === ptrType$1.nil || !((ntyp.Kind() === 25))) { - _i$1++; - /* continue; */ $s = 5; continue; - } - styp = (ntyp.kindType); - if ((_entry$2 = nextCount[ptrType$12.keyFor(styp)], _entry$2 !== undefined ? _entry$2.v : 0) > 0) { - _key$1 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key$1)] = { k: _key$1, v: 2 }; - _i$1++; - /* continue; */ $s = 5; continue; - } - if (nextCount === false) { - nextCount = $makeMap(ptrType$12.keyFor, []); - } - _key$2 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key$2)] = { k: _key$2, v: 1 }; - if ((_entry$3 = count[ptrType$12.keyFor(t$1)], _entry$3 !== undefined ? _entry$3.v : 0) > 1) { - _key$3 = styp; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[ptrType$12.keyFor(_key$3)] = { k: _key$3, v: 2 }; - } - index = sliceType$6.nil; - index = $appendSlice(index, scan.index); - index = $append(index, i); - next = $append(next, new fieldScan.ptr(styp, index)); - _i$1++; - $s = 5; continue; - case 6: - _i++; - $s = 3; continue; - case 4: - if (ok) { - /* break; */ $s = 2; continue; - } - $s = 1; continue; - case 2: - $s = -1; return [result, ok]; - /* */ } return; } var $f = {$blk: structType.ptr.prototype.FieldByNameFunc, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _key, _key$1, _key$2, _key$3, _r, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, count, current, f, fname, i, index, match, next, nextCount, ntyp, ok, result, scan, styp, t, t$1, visited, x, $s};return $f; - }; - structType.prototype.FieldByNameFunc = function(match) { return this.$val.FieldByNameFunc(match); }; - structType.ptr.prototype.FieldByName = function(name$1) { - var {$24r, _i, _r, _ref, _tmp, _tmp$1, _tuple, f, hasEmbeds, i, name$1, present, t, tf, x, $s, $r, $c} = $restore(this, {name$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name$1 = [name$1]; - f = new StructField.ptr("", "", $ifaceNil, "", 0, sliceType$6.nil, false); - present = false; - t = this; - hasEmbeds = false; - if (!(name$1[0] === "")) { - _ref = t.fields; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - tf = (x = t.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - if ($clone(tf.name, name).name() === name$1[0]) { - _tmp = $clone(t.Field(i), StructField); - _tmp$1 = true; - StructField.copy(f, _tmp); - present = _tmp$1; - $s = -1; return [f, present]; - } - if (tf.embedded()) { - hasEmbeds = true; - } - _i++; - } - } - if (!hasEmbeds) { - $s = -1; return [f, present]; - } - _r = t.FieldByNameFunc((function(name$1) { return function(s) { - var s; - return s === name$1[0]; - }; })(name$1)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - StructField.copy(f, _tuple[0]); - present = _tuple[1]; - $24r = [f, present]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: structType.ptr.prototype.FieldByName, $c: true, $r, $24r, _i, _r, _ref, _tmp, _tmp$1, _tuple, f, hasEmbeds, i, name$1, present, t, tf, x, $s};return $f; - }; - structType.prototype.FieldByName = function(name$1) { return this.$val.FieldByName(name$1); }; - PtrTo = function(t) { - var t; - return PointerTo(t); - }; - $pkg.PtrTo = PtrTo; - PointerTo = function(t) { - var t; - return $assertType(t, ptrType$1).ptrTo(); - }; - $pkg.PointerTo = PointerTo; - rtype.ptr.prototype.Implements = function(u) { - var {_r, t, u, $s, $r, $c} = $restore(this, {u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ($interfaceIsEqual(u, $ifaceNil)) { - $panic(new $String("reflect: nil type passed to Type.Implements")); - } - _r = u.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 20))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 20))) { */ case 1: - $panic(new $String("reflect: non-interface type passed to Type.Implements")); - /* } */ case 2: - $s = -1; return implements$1($assertType(u, ptrType$1), t); - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Implements, $c: true, $r, _r, t, u, $s};return $f; - }; - rtype.prototype.Implements = function(u) { return this.$val.Implements(u); }; - rtype.ptr.prototype.AssignableTo = function(u) { - var {$24r, _r, t, u, uu, $s, $r, $c} = $restore(this, {u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ($interfaceIsEqual(u, $ifaceNil)) { - $panic(new $String("reflect: nil type passed to Type.AssignableTo")); - } - uu = $assertType(u, ptrType$1); - _r = directlyAssignable(uu, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r || implements$1(uu, t); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.AssignableTo, $c: true, $r, $24r, _r, t, u, uu, $s};return $f; - }; - rtype.prototype.AssignableTo = function(u) { return this.$val.AssignableTo(u); }; - rtype.ptr.prototype.ConvertibleTo = function(u) { - var {$24r, _r, t, u, uu, $s, $r, $c} = $restore(this, {u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ($interfaceIsEqual(u, $ifaceNil)) { - $panic(new $String("reflect: nil type passed to Type.ConvertibleTo")); - } - uu = $assertType(u, ptrType$1); - _r = convertOp(uu, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = !(_r === $throwNilPointerError); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.ConvertibleTo, $c: true, $r, $24r, _r, t, u, uu, $s};return $f; - }; - rtype.prototype.ConvertibleTo = function(u) { return this.$val.ConvertibleTo(u); }; - implements$1 = function(T, V) { - var T, V, i, i$1, j, j$1, t, tm, tm$1, tmName, tmName$1, tmPkgPath, tmPkgPath$1, v, v$1, vm, vm$1, vmName, vmName$1, vmPkgPath, vmPkgPath$1, vmethods, x, x$1, x$2; - if (!((T.Kind() === 20))) { - return false; - } - t = (T.kindType); - if (t.methods.$length === 0) { - return true; - } - if (V.Kind() === 20) { - v = (V.kindType); - i = 0; - j = 0; - while (true) { - if (!(j < v.methods.$length)) { break; } - tm = (x = t.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - tmName = $clone(t.rtype.nameOff(tm.name), name); - vm = (x$1 = v.methods, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])); - vmName = $clone(V.nameOff(vm.name), name); - if ($clone(vmName, name).name() === $clone(tmName, name).name() && V.typeOff(vm.typ) === t.rtype.typeOff(tm.typ)) { - if (!$clone(tmName, name).isExported()) { - tmPkgPath = $clone(tmName, name).pkgPath(); - if (tmPkgPath === "") { - tmPkgPath = $clone(t.pkgPath, name).name(); - } - vmPkgPath = $clone(vmName, name).pkgPath(); - if (vmPkgPath === "") { - vmPkgPath = $clone(v.pkgPath, name).name(); - } - if (!(tmPkgPath === vmPkgPath)) { - j = j + (1) >> 0; - continue; - } - } - i = i + (1) >> 0; - if (i >= t.methods.$length) { - return true; - } - } - j = j + (1) >> 0; - } - return false; - } - v$1 = V.uncommon(); - if (v$1 === ptrType$9.nil) { - return false; - } - i$1 = 0; - vmethods = v$1.methods(); - j$1 = 0; - while (true) { - if (!(j$1 < ((v$1.mcount >> 0)))) { break; } - tm$1 = (x$2 = t.methods, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1])); - tmName$1 = $clone(t.rtype.nameOff(tm$1.name), name); - vm$1 = $clone(((j$1 < 0 || j$1 >= vmethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : vmethods.$array[vmethods.$offset + j$1]), method); - vmName$1 = $clone(V.nameOff(vm$1.name), name); - if ($clone(vmName$1, name).name() === $clone(tmName$1, name).name() && V.typeOff(vm$1.mtyp) === t.rtype.typeOff(tm$1.typ)) { - if (!$clone(tmName$1, name).isExported()) { - tmPkgPath$1 = $clone(tmName$1, name).pkgPath(); - if (tmPkgPath$1 === "") { - tmPkgPath$1 = $clone(t.pkgPath, name).name(); - } - vmPkgPath$1 = $clone(vmName$1, name).pkgPath(); - if (vmPkgPath$1 === "") { - vmPkgPath$1 = $clone(V.nameOff(v$1.pkgPath), name).name(); - } - if (!(tmPkgPath$1 === vmPkgPath$1)) { - j$1 = j$1 + (1) >> 0; - continue; - } - } - i$1 = i$1 + (1) >> 0; - if (i$1 >= t.methods.$length) { - return true; - } - } - j$1 = j$1 + (1) >> 0; - } - return false; - }; - specialChannelAssignability = function(T, V) { - var {$24r, T, V, _r, _v, $s, $r, $c} = $restore(this, {T, V}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((V.ChanDir() === 3) && (T.Name() === "" || V.Name() === ""))) { _v = false; $s = 1; continue s; } - _r = haveIdenticalType(T.Elem(), V.Elem(), true); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: specialChannelAssignability, $c: true, $r, $24r, T, V, _r, _v, $s};return $f; - }; - directlyAssignable = function(T, V) { - var {$24r, T, V, _r, _r$1, _v, $s, $r, $c} = $restore(this, {T, V}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (T === V) { - $s = -1; return true; - } - if (T.hasName() && V.hasName() || !((T.Kind() === V.Kind()))) { - $s = -1; return false; - } - if (!(T.Kind() === 18)) { _v = false; $s = 3; continue s; } - _r = specialChannelAssignability(T, V); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return true; - /* } */ case 2: - _r$1 = haveIdenticalUnderlyingType(T, V, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: directlyAssignable, $c: true, $r, $24r, T, V, _r, _r$1, _v, $s};return $f; - }; - haveIdenticalType = function(T, V, cmpTags) { - var {$24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, _v$1, cmpTags, $s, $r, $c} = $restore(this, {T, V, cmpTags}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (cmpTags) { - $s = -1; return $interfaceIsEqual(T, V); - } - _r = T.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = V.Name(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (!(_r === _r$1)) { _v$1 = true; $s = 4; continue s; } - _r$2 = T.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = V.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v$1 = !((_r$2 === _r$3)); case 4: - if (_v$1) { _v = true; $s = 3; continue s; } - _r$4 = T.PkgPath(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = V.PkgPath(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v = !(_r$4 === _r$5); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _r$6 = T.common(); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = _r$6; - _r$7 = V.common(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = _r$7; - _r$8 = haveIdenticalUnderlyingType(_arg, _arg$1, false); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 14; case 14: return $24r; - /* */ } return; } var $f = {$blk: haveIdenticalType, $c: true, $r, $24r, T, V, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, _v$1, cmpTags, $s};return $f; - }; - haveIdenticalUnderlyingType = function(T, V, cmpTags) { - var {$24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _v, _v$1, _v$2, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s, $r, $c} = $restore(this, {T, V, cmpTags}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (T === V) { - $s = -1; return true; - } - kind = T.Kind(); - if (!((kind === V.Kind()))) { - $s = -1; return false; - } - if (1 <= kind && kind <= 16 || (kind === 24) || (kind === 26)) { - $s = -1; return true; - } - _1 = kind; - /* */ if (_1 === (17)) { $s = 2; continue; } - /* */ if (_1 === (18)) { $s = 3; continue; } - /* */ if (_1 === (19)) { $s = 4; continue; } - /* */ if (_1 === (20)) { $s = 5; continue; } - /* */ if (_1 === (21)) { $s = 6; continue; } - /* */ if ((_1 === (22)) || (_1 === (23))) { $s = 7; continue; } - /* */ if (_1 === (25)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (17)) { */ case 2: - if (!(T.Len() === V.Len())) { _v = false; $s = 10; continue s; } - _r = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 10: - $24r = _v; - $s = 12; case 12: return $24r; - /* } else if (_1 === (18)) { */ case 3: - if (!(V.ChanDir() === T.ChanDir())) { _v$1 = false; $s = 13; continue s; } - _r$1 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = _r$1; case 13: - $24r$1 = _v$1; - $s = 15; case 15: return $24r$1; - /* } else if (_1 === (19)) { */ case 4: - t = (T.kindType); - v = (V.kindType); - if (!((t.outCount === v.outCount)) || !((t.inCount === v.inCount))) { - $s = -1; return false; - } - i = 0; - /* while (true) { */ case 16: - /* if (!(i < t.rtype.NumIn())) { break; } */ if(!(i < t.rtype.NumIn())) { $s = 17; continue; } - _r$2 = haveIdenticalType(t.rtype.In(i), v.rtype.In(i), cmpTags); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!_r$2) { */ case 18: - $s = -1; return false; - /* } */ case 19: - i = i + (1) >> 0; - $s = 16; continue; - case 17: - i$1 = 0; - /* while (true) { */ case 21: - /* if (!(i$1 < t.rtype.NumOut())) { break; } */ if(!(i$1 < t.rtype.NumOut())) { $s = 22; continue; } - _r$3 = haveIdenticalType(t.rtype.Out(i$1), v.rtype.Out(i$1), cmpTags); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!_r$3) { */ case 23: - $s = -1; return false; - /* } */ case 24: - i$1 = i$1 + (1) >> 0; - $s = 21; continue; - case 22: - $s = -1; return true; - /* } else if (_1 === (20)) { */ case 5: - t$1 = (T.kindType); - v$1 = (V.kindType); - if ((t$1.methods.$length === 0) && (v$1.methods.$length === 0)) { - $s = -1; return true; - } - $s = -1; return false; - /* } else if (_1 === (21)) { */ case 6: - _r$4 = haveIdenticalType(T.Key(), V.Key(), cmpTags); /* */ $s = 27; case 27: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - if (!(_r$4)) { _v$2 = false; $s = 26; continue s; } - _r$5 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v$2 = _r$5; case 26: - $24r$2 = _v$2; - $s = 29; case 29: return $24r$2; - /* } else if ((_1 === (22)) || (_1 === (23))) { */ case 7: - _r$6 = haveIdenticalType(T.Elem(), V.Elem(), cmpTags); /* */ $s = 30; case 30: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = _r$6; - $s = 31; case 31: return $24r$3; - /* } else if (_1 === (25)) { */ case 8: - t$2 = (T.kindType); - v$2 = (V.kindType); - if (!((t$2.fields.$length === v$2.fields.$length))) { - $s = -1; return false; - } - if (!($clone(t$2.pkgPath, name).name() === $clone(v$2.pkgPath, name).name())) { - $s = -1; return false; - } - _ref = t$2.fields; - _i = 0; - /* while (true) { */ case 32: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 33; continue; } - i$2 = _i; - tf = (x = t$2.fields, ((i$2 < 0 || i$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$2])); - vf = (x$1 = v$2.fields, ((i$2 < 0 || i$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$2])); - if (!($clone(tf.name, name).name() === $clone(vf.name, name).name())) { - $s = -1; return false; - } - _r$7 = haveIdenticalType(tf.typ, vf.typ, cmpTags); /* */ $s = 36; case 36: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (!_r$7) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!_r$7) { */ case 34: - $s = -1; return false; - /* } */ case 35: - if (cmpTags && !($clone(tf.name, name).tag() === $clone(vf.name, name).tag())) { - $s = -1; return false; - } - if (!((tf.offsetEmbed === vf.offsetEmbed))) { - $s = -1; return false; - } - _i++; - $s = 32; continue; - case 33: - $s = -1; return true; - /* } */ case 9: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: haveIdenticalUnderlyingType, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, T, V, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _v, _v$1, _v$2, cmpTags, i, i$1, i$2, kind, t, t$1, t$2, tf, v, v$1, v$2, vf, x, x$1, $s};return $f; - }; - toType = function(t) { - var t; - if (t === ptrType$1.nil) { - return $ifaceNil; - } - return t; - }; - ifaceIndir = function(t) { - var t; - return ((t.kind & 32) >>> 0) === 0; - }; - methodValueCallCodePtr = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = abi.FuncPCABI0(new funcType$2(methodValueCall)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: methodValueCallCodePtr, $c: true, $r, $24r, _r, $s};return $f; - }; - methodValueCall = function() { - $throwRuntimeError("native function not implemented: reflect.methodValueCall"); - }; - init = function() { - var {used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - used = (function(i) { - var i; - }); - $r = used((x = new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$1 = new uncommonType.ptr(0, 0, 0, 0, sliceType$11.nil), new x$1.constructor.elem(x$1))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$2 = new method.ptr(0, 0, 0, 0), new x$2.constructor.elem(x$2))); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$3 = new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, 0), new x$3.constructor.elem(x$3))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$4 = new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil, 0), new x$4.constructor.elem(x$4))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$5 = new funcType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), 0, 0, sliceType$2.nil, sliceType$2.nil), new x$5.constructor.elem(x$5))); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$6 = new interfaceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), new name.ptr(ptrType$13.nil), sliceType$14.nil), new x$6.constructor.elem(x$6))); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$7 = new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0), new x$7.constructor.elem(x$7))); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$8 = new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil), new x$8.constructor.elem(x$8))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$9 = new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), ptrType$1.nil), new x$9.constructor.elem(x$9))); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$10 = new structType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), new name.ptr(ptrType$13.nil), sliceType$15.nil), new x$10.constructor.elem(x$10))); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$11 = new imethod.ptr(0, 0), new x$11.constructor.elem(x$11))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = used((x$12 = new structField.ptr(new name.ptr(ptrType$13.nil), ptrType$1.nil, 0), new x$12.constructor.elem(x$12))); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - initialized = true; - uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, used, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - New = function(typ) { - var fl, pt, ptr, t, typ; - if ($interfaceIsEqual(typ, $ifaceNil)) { - $panic(new $String("reflect: New(nil)")); - } - t = $assertType(typ, ptrType$1); - pt = t.ptrTo(); - ptr = unsafe_New(t); - fl = 22; - return new Value.ptr(pt, ptr, fl); - }; - $pkg.New = New; - jsType = function(typ) { - var typ; - return typ.jsType; - }; - reflectType = function(typ) { - var _1, _i, _i$1, _i$2, _i$3, _key, _ref, _ref$1, _ref$2, _ref$3, dir, exported, exported$1, f, fields, i, i$1, i$2, i$3, i$4, i$5, imethods, in$1, m, m$1, m$2, methodSet, methods, offsetEmbed, out, outCount, params, reflectFields, reflectMethods, results, rt, typ, ut, xcount; - if (typ.reflectType === undefined) { - rt = new rtype.ptr(((($parseInt(typ.size) >> 0) >>> 0)), 0, 0, 0, 0, 0, ((($parseInt(typ.kind) >> 0) << 24 >>> 24)), $throwNilPointerError, ptrType$13.nil, newNameOff($clone(newName(internalStr(typ.string), "", !!(typ.exported)), name)), 0); - rt.jsType = typ; - typ.reflectType = rt; - methodSet = $methodSet(typ); - if (!(($parseInt(methodSet.length) === 0)) || !!(typ.named)) { - rt.tflag = (rt.tflag | (1)) >>> 0; - if (!!(typ.named)) { - rt.tflag = (rt.tflag | (4)) >>> 0; - } - reflectMethods = sliceType$11.nil; - i = 0; - while (true) { - if (!(i < $parseInt(methodSet.length))) { break; } - m = methodSet[i]; - exported = internalStr(m.pkg) === ""; - if (!exported) { - i = i + (1) >> 0; - continue; - } - reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newMethodName(m), name)), newTypeOff(reflectType(m.typ)), 0, 0)); - i = i + (1) >> 0; - } - xcount = ((reflectMethods.$length << 16 >>> 16)); - i$1 = 0; - while (true) { - if (!(i$1 < $parseInt(methodSet.length))) { break; } - m$1 = methodSet[i$1]; - exported$1 = internalStr(m$1.pkg) === ""; - if (exported$1) { - i$1 = i$1 + (1) >> 0; - continue; - } - reflectMethods = $append(reflectMethods, new method.ptr(newNameOff($clone(newMethodName(m$1), name)), newTypeOff(reflectType(m$1.typ)), 0, 0)); - i$1 = i$1 + (1) >> 0; - } - ut = new uncommonType.ptr(newNameOff($clone(newName(internalStr(typ.pkg), "", false), name)), (($parseInt(methodSet.length) << 16 >>> 16)), xcount, 0, reflectMethods); - _key = rt; (uncommonTypeMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$1.keyFor(_key)] = { k: _key, v: ut }; - ut.jsType = typ; - } - _1 = rt.Kind(); - if (_1 === (17)) { - setKindType(rt, new arrayType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem), ptrType$1.nil, ((($parseInt(typ.len) >> 0) >>> 0)))); - } else if (_1 === (18)) { - dir = 3; - if (!!(typ.sendOnly)) { - dir = 2; - } - if (!!(typ.recvOnly)) { - dir = 1; - } - setKindType(rt, new chanType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem), ((dir >>> 0)))); - } else if (_1 === (19)) { - params = typ.params; - in$1 = $makeSlice(sliceType$2, $parseInt(params.length)); - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i$2 = _i; - ((i$2 < 0 || i$2 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + i$2] = reflectType(params[i$2])); - _i++; - } - results = typ.results; - out = $makeSlice(sliceType$2, $parseInt(results.length)); - _ref$1 = out; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$3 = _i$1; - ((i$3 < 0 || i$3 >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i$3] = reflectType(results[i$3])); - _i$1++; - } - outCount = (($parseInt(results.length) << 16 >>> 16)); - if (!!(typ.variadic)) { - outCount = (outCount | (32768)) >>> 0; - } - setKindType(rt, new funcType.ptr($clone(rt, rtype), (($parseInt(params.length) << 16 >>> 16)), outCount, in$1, out)); - } else if (_1 === (20)) { - methods = typ.methods; - imethods = $makeSlice(sliceType$14, $parseInt(methods.length)); - _ref$2 = imethods; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - i$4 = _i$2; - m$2 = methods[i$4]; - imethod.copy(((i$4 < 0 || i$4 >= imethods.$length) ? ($throwRuntimeError("index out of range"), undefined) : imethods.$array[imethods.$offset + i$4]), new imethod.ptr(newNameOff($clone(newMethodName(m$2), name)), newTypeOff(reflectType(m$2.typ)))); - _i$2++; - } - setKindType(rt, new interfaceType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkg), "", false), name), imethods)); - } else if (_1 === (21)) { - setKindType(rt, new mapType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.key), reflectType(typ.elem), ptrType$1.nil, $throwNilPointerError, 0, 0, 0, 0)); - } else if (_1 === (22)) { - setKindType(rt, new ptrType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem))); - } else if (_1 === (23)) { - setKindType(rt, new sliceType.ptr(new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0), reflectType(typ.elem))); - } else if (_1 === (25)) { - fields = typ.fields; - reflectFields = $makeSlice(sliceType$15, $parseInt(fields.length)); - _ref$3 = reflectFields; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - i$5 = _i$3; - f = fields[i$5]; - offsetEmbed = ((i$5 >>> 0)) << 1 >>> 0; - if (!!(f.embedded)) { - offsetEmbed = (offsetEmbed | (1)) >>> 0; - } - structField.copy(((i$5 < 0 || i$5 >= reflectFields.$length) ? ($throwRuntimeError("index out of range"), undefined) : reflectFields.$array[reflectFields.$offset + i$5]), new structField.ptr($clone(newName(internalStr(f.name), internalStr(f.tag), !!(f.exported)), name), reflectType(f.typ), offsetEmbed)); - _i$3++; - } - setKindType(rt, new structType.ptr($clone(rt, rtype), $clone(newName(internalStr(typ.pkgPath), "", false), name), reflectFields)); - } - } - return ((typ.reflectType)); - }; - setKindType = function(rt, kindType) { - var kindType, rt; - rt.kindType = kindType; - kindType.rtype = rt; - }; - uncommonType.ptr.prototype.methods = function() { - var t; - t = this; - return t._methods; - }; - uncommonType.prototype.methods = function() { return this.$val.methods(); }; - uncommonType.ptr.prototype.exportedMethods = function() { - var t; - t = this; - return $subslice(t._methods, 0, t.xcount, t.xcount); - }; - uncommonType.prototype.exportedMethods = function() { return this.$val.exportedMethods(); }; - rtype.ptr.prototype.uncommon = function() { - var _entry, t; - t = this; - return (_entry = uncommonTypeMap[ptrType$1.keyFor(t)], _entry !== undefined ? _entry.v : ptrType$9.nil); - }; - rtype.prototype.uncommon = function() { return this.$val.uncommon(); }; - funcType.ptr.prototype.in$ = function() { - var t; - t = this; - return t._in; - }; - funcType.prototype.in$ = function() { return this.$val.in$(); }; - funcType.ptr.prototype.out = function() { - var t; - t = this; - return t._out; - }; - funcType.prototype.out = function() { return this.$val.out(); }; - name.ptr.prototype.name = function() { - var _entry, n, s; - s = ""; - n = this; - s = (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).name; - return s; - }; - name.prototype.name = function() { return this.$val.name(); }; - name.ptr.prototype.tag = function() { - var _entry, n, s; - s = ""; - n = this; - s = (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).tag; - return s; - }; - name.prototype.tag = function() { return this.$val.tag(); }; - name.ptr.prototype.pkgPath = function() { - var _entry, n; - n = this; - return (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).pkgPath; - }; - name.prototype.pkgPath = function() { return this.$val.pkgPath(); }; - name.ptr.prototype.isExported = function() { - var _entry, n; - n = this; - return (_entry = nameMap[ptrType$13.keyFor(n.bytes)], _entry !== undefined ? _entry.v : ptrType$18.nil).exported; - }; - name.prototype.isExported = function() { return this.$val.isExported(); }; - newName = function(n, tag, exported) { - var _key, b, exported, n, tag; - b = $newDataPointer(0, ptrType$13); - _key = b; (nameMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$13.keyFor(_key)] = { k: _key, v: new nameData.ptr(n, tag, exported, "") }; - return new name.ptr(b); - }; - newMethodName = function(m) { - var _key, b, m; - b = $newDataPointer(0, ptrType$13); - _key = b; (nameMap || $throwRuntimeError("assignment to entry in nil map"))[ptrType$13.keyFor(_key)] = { k: _key, v: new nameData.ptr(internalStr(m.name), "", internalStr(m.pkg) === "", internalStr(m.pkg)) }; - return new name.ptr(b); - }; - rtype.ptr.prototype.nameOff = function(off) { - var off, t, x; - t = this; - return (x = ((off >> 0)), ((x < 0 || x >= nameOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : nameOffList.$array[nameOffList.$offset + x])); - }; - rtype.prototype.nameOff = function(off) { return this.$val.nameOff(off); }; - newNameOff = function(n) { - var i, n; - i = nameOffList.$length; - nameOffList = $append(nameOffList, n); - return ((i >> 0)); - }; - rtype.ptr.prototype.typeOff = function(off) { - var off, t, x; - t = this; - return (x = ((off >> 0)), ((x < 0 || x >= typeOffList.$length) ? ($throwRuntimeError("index out of range"), undefined) : typeOffList.$array[typeOffList.$offset + x])); - }; - rtype.prototype.typeOff = function(off) { return this.$val.typeOff(off); }; - newTypeOff = function(t) { - var i, t; - i = typeOffList.$length; - typeOffList = $append(typeOffList, t); - return ((i >> 0)); - }; - internalStr = function(strObj) { - var c, strObj; - c = new structType$3.ptr(""); - c.str = strObj; - return c.str; - }; - isWrapped = function(typ) { - var typ; - return !!(jsType(typ).wrapped); - }; - copyStruct = function(dst, src, typ) { - var dst, fields, i, prop, src, typ; - fields = jsType(typ).fields; - i = 0; - while (true) { - if (!(i < $parseInt(fields.length))) { break; } - prop = $internalize(fields[i].prop, $String); - dst[$externalize(prop, $String)] = src[$externalize(prop, $String)]; - i = i + (1) >> 0; - } - }; - makeValue = function(t, v, fl) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s, $r, $c} = $restore(this, {t, v, fl}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - rt = _r; - _r$1 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (_r$1 === 17) { _v$1 = true; $s = 5; continue s; } - _r$2 = t.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$1 = _r$2 === 25; case 5: - if (_v$1) { _v = true; $s = 4; continue s; } - _r$3 = t.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3 === 22; case 4: - /* */ if (_v) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_v) { */ case 2: - _r$4 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = new Value.ptr(rt, (v), (fl | ((_r$4 >>> 0))) >>> 0); - $s = 10; case 10: return $24r; - /* } */ case 3: - _r$5 = t.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = new Value.ptr(rt, ($newDataPointer(v, jsType(rt.ptrTo()))), (((fl | ((_r$5 >>> 0))) >>> 0) | 128) >>> 0); - $s = 12; case 12: return $24r$1; - /* */ } return; } var $f = {$blk: makeValue, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, _v$1, fl, rt, t, v, $s};return $f; - }; - MakeSlice = function(typ, len, cap) { - var {$24r, _r, _r$1, cap, len, typ, $s, $r, $c} = $restore(this, {typ, len, cap}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - typ = [typ]; - _r = typ[0].Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 23))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 23))) { */ case 1: - $panic(new $String("reflect.MakeSlice of non-slice type")); - /* } */ case 2: - if (len < 0) { - $panic(new $String("reflect.MakeSlice: negative len")); - } - if (cap < 0) { - $panic(new $String("reflect.MakeSlice: negative cap")); - } - if (len > cap) { - $panic(new $String("reflect.MakeSlice: len > cap")); - } - _r$1 = makeValue(typ[0], $makeSlice(jsType(typ[0]), len, cap, (function(typ) { return function $b() { - var {$24r, _r$1, _r$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = typ[0].Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = jsType(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2.zero(); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, _r$2, $s};return $f; - }; })(typ)), 0); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: MakeSlice, $c: true, $r, $24r, _r, _r$1, cap, len, typ, $s};return $f; - }; - $pkg.MakeSlice = MakeSlice; - TypeOf = function(i) { - var i; - if (!initialized) { - return new rtype.ptr(0, 0, 0, 0, 0, 0, 0, $throwNilPointerError, ptrType$13.nil, 0, 0); - } - if ($interfaceIsEqual(i, $ifaceNil)) { - return $ifaceNil; - } - return reflectType(i.constructor); - }; - $pkg.TypeOf = TypeOf; - ValueOf = function(i) { - var {$24r, _r, i, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(i, $ifaceNil)) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - _r = makeValue(reflectType(i.constructor), i.$val, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ValueOf, $c: true, $r, $24r, _r, i, $s};return $f; - }; - $pkg.ValueOf = ValueOf; - FuncOf = function(in$1, out, variadic) { - var {_i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s, $r, $c} = $restore(this, {in$1, out, variadic}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!(variadic)) { _v = false; $s = 3; continue s; } - if (in$1.$length === 0) { _v$1 = true; $s = 4; continue s; } - _r = (x = in$1.$length - 1 >> 0, ((x < 0 || x >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x])).Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v$1 = !((_r === 23)); case 4: - _v = _v$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $panic(new $String("reflect.FuncOf: last arg of variadic func must be slice")); - /* } */ case 2: - jsIn = $makeSlice(sliceType$16, in$1.$length); - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= jsIn.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsIn.$array[jsIn.$offset + i] = jsType(v)); - _i++; - } - jsOut = $makeSlice(sliceType$16, out.$length); - _ref$1 = out; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - ((i$1 < 0 || i$1 >= jsOut.$length) ? ($throwRuntimeError("index out of range"), undefined) : jsOut.$array[jsOut.$offset + i$1] = jsType(v$1)); - _i$1++; - } - $s = -1; return reflectType($funcType($externalize(jsIn, sliceType$16), $externalize(jsOut, sliceType$16), $externalize(variadic, $Bool))); - /* */ } return; } var $f = {$blk: FuncOf, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, _v, _v$1, i, i$1, in$1, jsIn, jsOut, out, v, v$1, variadic, x, $s};return $f; - }; - $pkg.FuncOf = FuncOf; - rtype.ptr.prototype.ptrTo = function() { - var t; - t = this; - return reflectType($ptrType(jsType(t))); - }; - rtype.prototype.ptrTo = function() { return this.$val.ptrTo(); }; - SliceOf = function(t) { - var t; - return reflectType($sliceType(jsType(t))); - }; - $pkg.SliceOf = SliceOf; - Zero = function(typ) { - var {$24r, _r, typ, $s, $r, $c} = $restore(this, {typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = makeValue(typ, jsType(typ).zero(), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Zero, $c: true, $r, $24r, _r, typ, $s};return $f; - }; - $pkg.Zero = Zero; - unsafe_New = function(typ) { - var _1, typ; - _1 = typ.Kind(); - if (_1 === (25)) { - return (new (jsType(typ).ptr)()); - } else if (_1 === (17)) { - return (jsType(typ).zero()); - } else { - return ($newDataPointer(jsType(typ).zero(), jsType(typ.ptrTo()))); - } - }; - makeInt = function(f, bits, t) { - var {_1, _r, bits, f, ptr, t, typ, $s, $r, $c} = $restore(this, {f, bits, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = t.common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - typ = _r; - ptr = unsafe_New(typ); - _1 = typ.Kind(); - if (_1 === (3)) { - (ptr).$set(((bits.$low << 24 >> 24))); - } else if (_1 === (4)) { - (ptr).$set(((bits.$low << 16 >> 16))); - } else if ((_1 === (2)) || (_1 === (5))) { - (ptr).$set(((bits.$low >> 0))); - } else if (_1 === (6)) { - (ptr).$set((new $Int64(bits.$high, bits.$low))); - } else if (_1 === (8)) { - (ptr).$set(((bits.$low << 24 >>> 24))); - } else if (_1 === (9)) { - (ptr).$set(((bits.$low << 16 >>> 16))); - } else if ((_1 === (7)) || (_1 === (10)) || (_1 === (12))) { - (ptr).$set(((bits.$low >>> 0))); - } else if (_1 === (11)) { - (ptr).$set((bits)); - } - $s = -1; return new Value.ptr(typ, ptr, (((f | 128) >>> 0) | ((typ.Kind() >>> 0))) >>> 0); - /* */ } return; } var $f = {$blk: makeInt, $c: true, $r, _1, _r, bits, f, ptr, t, typ, $s};return $f; - }; - typedmemmove = function(t, dst, src) { - var dst, src, t; - dst.$set(src.$get()); - }; - makemap = function(t, cap) { - var cap, m, t; - m = 0; - m = (new ($global.Object)()); - return m; - }; - keyFor = function(t, key) { - var k, key, kv, t; - kv = key; - if (!(kv.$get === undefined)) { - kv = kv.$get(); - } - k = $internalize(jsType(t.Key()).keyFor(kv), $String); - return [kv, k]; - }; - mapaccess = function(t, m, key) { - var _tuple, entry, k, key, m, t; - _tuple = keyFor(t, key); - k = _tuple[1]; - entry = m[$externalize(k, $String)]; - if (entry === undefined) { - return 0; - } - return ($newDataPointer(entry.v, jsType(PtrTo(t.Elem())))); - }; - mapassign = function(t, m, key, val) { - var {_r, _tuple, entry, et, jsVal, k, key, kv, m, newVal, t, val, $s, $r, $c} = $restore(this, {t, m, key, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = keyFor(t, key); - kv = _tuple[0]; - k = _tuple[1]; - jsVal = val.$get(); - et = t.Elem(); - _r = et.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === 25) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r === 25) { */ case 1: - newVal = jsType(et).zero(); - copyStruct(newVal, jsVal, et); - jsVal = newVal; - /* } */ case 2: - entry = new ($global.Object)(); - entry.k = kv; - entry.v = jsVal; - m[$externalize(k, $String)] = entry; - $s = -1; return; - /* */ } return; } var $f = {$blk: mapassign, $c: true, $r, _r, _tuple, entry, et, jsVal, k, key, kv, m, newVal, t, val, $s};return $f; - }; - mapdelete = function(t, m, key) { - var _tuple, k, key, m, t; - _tuple = keyFor(t, key); - k = _tuple[1]; - delete m[$externalize(k, $String)]; - }; - mapaccess_faststr = function(t, m, key) { - var key, key$24ptr, m, t, val; - val = 0; - val = mapaccess(t, m, ((key$24ptr || (key$24ptr = new ptrType$19(function() { return key; }, function($v) { key = $v; }))))); - return val; - }; - mapassign_faststr = function(t, m, key, val) { - var {key, m, t, val, $s, $r, $c} = $restore(this, {t, m, key, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - key = [key]; - $r = mapassign(t, m, ((key.$ptr || (key.$ptr = new ptrType$19(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, key)))), val); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mapassign_faststr, $c: true, $r, key, m, t, val, $s};return $f; - }; - mapdelete_faststr = function(t, m, key) { - var key, key$24ptr, m, t; - mapdelete(t, m, ((key$24ptr || (key$24ptr = new ptrType$19(function() { return key; }, function($v) { key = $v; }))))); - }; - hiter.ptr.prototype.skipUntilValidKey = function() { - var iter, k; - iter = this; - while (true) { - if (!(iter.i < $parseInt(iter.keys.length))) { break; } - k = iter.keys[iter.i]; - if (!(iter.m[$externalize($internalize(k, $String), $String)] === undefined)) { - break; - } - iter.i = iter.i + (1) >> 0; - } - }; - hiter.prototype.skipUntilValidKey = function() { return this.$val.skipUntilValidKey(); }; - mapiterinit = function(t, m, it) { - var it, m, t; - hiter.copy(it, new hiter.ptr(t, m, $keys(m), 0, null)); - }; - mapiterkey = function(it) { - var {$24r, _r, _r$1, _r$2, it, k, kv, $s, $r, $c} = $restore(this, {it}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - kv = null; - if (!(it.last === null)) { - kv = it.last; - } else { - it.skipUntilValidKey(); - if (it.i === $parseInt(it.keys.length)) { - $s = -1; return 0; - } - k = it.keys[it.i]; - kv = it.m[$externalize($internalize(k, $String), $String)]; - it.last = kv; - } - _r = it.t.Key(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = PtrTo(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = jsType(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = ($newDataPointer(kv.k, _r$2)); - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: mapiterkey, $c: true, $r, $24r, _r, _r$1, _r$2, it, k, kv, $s};return $f; - }; - mapiterelem = function(it) { - var {$24r, _r, _r$1, _r$2, it, k, kv, $s, $r, $c} = $restore(this, {it}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - kv = null; - if (!(it.last === null)) { - kv = it.last; - } else { - it.skipUntilValidKey(); - if (it.i === $parseInt(it.keys.length)) { - $s = -1; return 0; - } - k = it.keys[it.i]; - kv = it.m[$externalize($internalize(k, $String), $String)]; - it.last = kv; - } - _r = it.t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = PtrTo(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = jsType(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = ($newDataPointer(kv.v, _r$2)); - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: mapiterelem, $c: true, $r, $24r, _r, _r$1, _r$2, it, k, kv, $s};return $f; - }; - mapiternext = function(it) { - var it; - it.last = null; - it.i = it.i + (1) >> 0; - }; - maplen = function(m) { - var m; - return $parseInt($keys(m).length); - }; - cvtDirect = function(v, typ) { - var {$24r, $24r$1, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, k, slice, srcVal, typ, v, val, $s, $r, $c} = $restore(this, {v, typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srcVal = $clone(v, Value).object(); - /* */ if (srcVal === jsType(v.typ).nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (srcVal === jsType(v.typ).nil) { */ case 1: - _r = makeValue(typ, jsType(typ).nil, v.flag); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - val = null; - _r$1 = typ.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - k = _r$1; - _1 = k; - /* */ if (_1 === (23)) { $s = 7; continue; } - /* */ if (_1 === (22)) { $s = 8; continue; } - /* */ if (_1 === (25)) { $s = 9; continue; } - /* */ if ((_1 === (17)) || (_1 === (1)) || (_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (24)) || (_1 === (26))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (23)) { */ case 7: - slice = new (jsType(typ))(srcVal.$array); - slice.$offset = srcVal.$offset; - slice.$length = srcVal.$length; - slice.$capacity = srcVal.$capacity; - val = $newDataPointer(slice, jsType(PtrTo(typ))); - $s = 12; continue; - /* } else if (_1 === (22)) { */ case 8: - _r$2 = typ.Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _2 = _r$3; - /* */ if (_2 === (25)) { $s = 16; continue; } - /* */ if (_2 === (17)) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_2 === (25)) { */ case 16: - _r$4 = typ.Elem(); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$4, v.typ.Elem())) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if ($interfaceIsEqual(_r$4, v.typ.Elem())) { */ case 20: - val = srcVal; - /* break; */ $s = 13; continue; - /* } */ case 21: - val = new (jsType(typ))(); - _arg = val; - _arg$1 = srcVal; - _r$5 = typ.Elem(); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$2 = _r$5; - $r = copyStruct(_arg, _arg$1, _arg$2); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 19; continue; - /* } else if (_2 === (17)) { */ case 17: - val = srcVal; - $s = 19; continue; - /* } else { */ case 18: - val = new (jsType(typ))(srcVal.$get, srcVal.$set); - /* } */ case 19: - case 13: - $s = 12; continue; - /* } else if (_1 === (25)) { */ case 9: - val = new (jsType(typ).ptr)(); - copyStruct(val, srcVal, typ); - $s = 12; continue; - /* } else if ((_1 === (17)) || (_1 === (1)) || (_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (24)) || (_1 === (26))) { */ case 10: - val = v.ptr; - $s = 12; continue; - /* } else { */ case 11: - $panic(new ValueError.ptr("reflect.Convert", k)); - /* } */ case 12: - case 5: - _r$6 = typ.common(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = typ.Kind(); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = new Value.ptr(_r$6, (val), (((new flag(v.flag).ro() | ((v.flag & 128) >>> 0)) >>> 0) | ((_r$7 >>> 0))) >>> 0); - $s = 27; case 27: return $24r$1; - /* */ } return; } var $f = {$blk: cvtDirect, $c: true, $r, $24r, $24r$1, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, k, slice, srcVal, typ, v, val, $s};return $f; - }; - cvtSliceArrayPtr = function(v, t) { - var {$24r, _r, _r$1, _r$2, alen, array, slen, slice, t, v, $s, $r, $c} = $restore(this, {v, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - slice = $clone(v, Value).object(); - slen = $parseInt(slice.$length) >> 0; - _r = t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - alen = _r$1; - if (alen > slen) { - $panic(new $String("reflect: cannot convert slice with length " + itoa.Itoa(slen) + " to pointer to array with length " + itoa.Itoa(alen))); - } - array = $sliceToGoArray(slice, jsType(t)); - _r$2 = t.common(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = new Value.ptr(_r$2, (array), (((v.flag & ~415) >>> 0) | 22) >>> 0); - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: cvtSliceArrayPtr, $c: true, $r, $24r, _r, _r$1, _r$2, alen, array, slen, slice, t, v, $s};return $f; - }; - Copy = function(dst, src) { - var {_r, _v, dk, dst, dstVal, sk, src, srcVal, stringCopy, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dk = new flag(dst.flag).kind(); - if (!((dk === 17)) && !((dk === 23))) { - $panic(new ValueError.ptr("reflect.Copy", dk)); - } - if (dk === 17) { - new flag(dst.flag).mustBeAssignable(); - } - new flag(dst.flag).mustBeExported(); - sk = new flag(src.flag).kind(); - stringCopy = false; - /* */ if (!((sk === 17)) && !((sk === 23))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((sk === 17)) && !((sk === 23))) { */ case 1: - if (!(sk === 24)) { _v = false; $s = 3; continue s; } - _r = dst.typ.Elem().Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r === 8; case 3: - stringCopy = _v; - if (!stringCopy) { - $panic(new ValueError.ptr("reflect.Copy", sk)); - } - /* } */ case 2: - new flag(src.flag).mustBeExported(); - /* */ if (!stringCopy) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!stringCopy) { */ case 5: - $r = typesMustMatch("reflect.Copy", dst.typ.Elem(), src.typ.Elem()); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - dstVal = $clone(dst, Value).object(); - if (dk === 17) { - dstVal = new (jsType(SliceOf(dst.typ.Elem())))(dstVal); - } - srcVal = $clone(src, Value).object(); - if (sk === 17) { - srcVal = new (jsType(SliceOf(src.typ.Elem())))(srcVal); - } - if (stringCopy) { - $s = -1; return $parseInt($copyString(dstVal, srcVal)) >> 0; - } - $s = -1; return $parseInt($copySlice(dstVal, srcVal)) >> 0; - /* */ } return; } var $f = {$blk: Copy, $c: true, $r, _r, _v, dk, dst, dstVal, sk, src, srcVal, stringCopy, $s};return $f; - }; - $pkg.Copy = Copy; - methodReceiver = function(op, v, i) { - var _$48, fn, i, m, m$1, ms, op, prop, rcvr, t, tt, v, x; - _$48 = ptrType$1.nil; - t = ptrType$20.nil; - fn = 0; - prop = ""; - if (v.typ.Kind() === 20) { - tt = (v.typ.kindType); - if (i < 0 || i >= tt.methods.$length) { - $panic(new $String("reflect: internal error: invalid method index")); - } - m = (x = tt.methods, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - if (!$clone(tt.rtype.nameOff(m.name), name).isExported()) { - $panic(new $String("reflect: " + op + " of unexported method")); - } - t = (tt.rtype.typeOff(m.typ).kindType); - prop = $clone(tt.rtype.nameOff(m.name), name).name(); - } else { - ms = v.typ.exportedMethods(); - if (((i >>> 0)) >= ((ms.$length >>> 0))) { - $panic(new $String("reflect: internal error: invalid method index")); - } - m$1 = $clone(((i < 0 || i >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + i]), method); - if (!$clone(v.typ.nameOff(m$1.name), name).isExported()) { - $panic(new $String("reflect: " + op + " of unexported method")); - } - t = (v.typ.typeOff(m$1.mtyp).kindType); - prop = $internalize($methodSet(jsType(v.typ))[i].prop, $String); - } - rcvr = $clone(v, Value).object(); - if (isWrapped(v.typ)) { - rcvr = new (jsType(v.typ))(rcvr); - } - fn = (rcvr[$externalize(prop, $String)]); - return [_$48, t, fn]; - }; - valueInterface = function(v, safe) { - var {_r, safe, v, $s, $r, $c} = $restore(this, {v, safe}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (v.flag === 0) { - $panic(new ValueError.ptr("reflect.Value.Interface", 0)); - } - if (safe && !((((v.flag & 96) >>> 0) === 0))) { - $panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method")); - } - /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1: - _r = makeMethodValue("Interface", $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - /* } */ case 2: - if (isWrapped(v.typ)) { - $s = -1; return ((new (jsType(v.typ))($clone(v, Value).object()))); - } - $s = -1; return (($clone(v, Value).object())); - /* */ } return; } var $f = {$blk: valueInterface, $c: true, $r, _r, safe, v, $s};return $f; - }; - ifaceE2I = function(t, src, dst) { - var dst, src, t; - dst.$set(src); - }; - makeMethodValue = function(op, v) { - var {$24r, _r, _tuple, fn, fv, op, rcvr, v, $s, $r, $c} = $restore(this, {op, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fn = [fn]; - rcvr = [rcvr]; - if (((v.flag & 512) >>> 0) === 0) { - $panic(new $String("reflect: internal error: invalid use of makePartialFunc")); - } - _tuple = methodReceiver(op, $clone(v, Value), ((v.flag >> 0)) >> 10 >> 0); - fn[0] = _tuple[2]; - rcvr[0] = $clone(v, Value).object(); - if (isWrapped(v.typ)) { - rcvr[0] = new (jsType(v.typ))(rcvr[0]); - } - fv = js.MakeFunc((function(fn, rcvr) { return function(this$1, arguments$1) { - var arguments$1, this$1; - return new $jsObjectPtr(fn[0].apply(rcvr[0], $externalize(arguments$1, sliceType$16))); - }; })(fn, rcvr)); - _r = $clone(v, Value).Type().common(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new Value.ptr(_r, (fv), (new flag(v.flag).ro() | 19) >>> 0); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: makeMethodValue, $c: true, $r, $24r, _r, _tuple, fn, fv, op, rcvr, v, $s};return $f; - }; - rtype.ptr.prototype.pointers = function() { - var _1, t; - t = this; - _1 = t.Kind(); - if ((_1 === (22)) || (_1 === (21)) || (_1 === (18)) || (_1 === (19)) || (_1 === (25)) || (_1 === (17))) { - return true; - } else { - return false; - } - }; - rtype.prototype.pointers = function() { return this.$val.pointers(); }; - rtype.ptr.prototype.Comparable = function() { - var {$24r, _1, _r, _r$1, i, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _1 = t.Kind(); - /* */ if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { $s = 2; continue; } - /* */ if (_1 === (17)) { $s = 3; continue; } - /* */ if (_1 === (25)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((_1 === (19)) || (_1 === (23)) || (_1 === (21))) { */ case 2: - $s = -1; return false; - /* } else if (_1 === (17)) { */ case 3: - _r = t.Elem().Comparable(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if (_1 === (25)) { */ case 4: - i = 0; - /* while (true) { */ case 8: - /* if (!(i < t.NumField())) { break; } */ if(!(i < t.NumField())) { $s = 9; continue; } - _r$1 = t.Field(i).Type.Comparable(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$1) { */ case 10: - $s = -1; return false; - /* } */ case 11: - i = i + (1) >> 0; - $s = 8; continue; - case 9: - /* } */ case 5: - case 1: - $s = -1; return true; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Comparable, $c: true, $r, $24r, _1, _r, _r$1, i, t, $s};return $f; - }; - rtype.prototype.Comparable = function() { return this.$val.Comparable(); }; - rtype.ptr.prototype.Method = function(i) { - var {_i, _i$1, _r, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - prop = [prop]; - m = new Method.ptr("", "", $ifaceNil, new Value.ptr(ptrType$1.nil, 0, 0), 0); - t = this; - if (t.Kind() === 20) { - tt = (t.kindType); - Method.copy(m, tt.Method(i)); - $s = -1; return m; - } - methods = t.exportedMethods(); - if (i < 0 || i >= methods.$length) { - $panic(new $String("reflect: Method index out of range")); - } - p = $clone(((i < 0 || i >= methods.$length) ? ($throwRuntimeError("index out of range"), undefined) : methods.$array[methods.$offset + i]), method); - pname = $clone(t.nameOff(p.name), name); - m.Name = $clone(pname, name).name(); - fl = 19; - mtyp = t.typeOff(p.mtyp); - ft = (mtyp.kindType); - in$1 = $makeSlice(sliceType$17, 0, (1 + ft.in$().$length >> 0)); - in$1 = $append(in$1, t); - _ref = ft.in$(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - in$1 = $append(in$1, arg); - _i++; - } - out = $makeSlice(sliceType$17, 0, ft.out().$length); - _ref$1 = ft.out(); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - ret = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - out = $append(out, ret); - _i$1++; - } - _r = FuncOf(in$1, out, ft.rtype.IsVariadic()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - mt = _r; - m.Type = mt; - prop[0] = $internalize($methodSet(t.jsType)[i].prop, $String); - fn = js.MakeFunc((function(prop) { return function(this$1, arguments$1) { - var arguments$1, rcvr, this$1; - rcvr = (0 >= arguments$1.$length ? ($throwRuntimeError("index out of range"), undefined) : arguments$1.$array[arguments$1.$offset + 0]); - return new $jsObjectPtr(rcvr[$externalize(prop[0], $String)].apply(rcvr, $externalize($subslice(arguments$1, 1), sliceType$16))); - }; })(prop)); - m.Func = new Value.ptr($assertType(mt, ptrType$1), (fn), fl); - m.Index = i; - Method.copy(m, m); - $s = -1; return m; - /* */ } return; } var $f = {$blk: rtype.ptr.prototype.Method, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, arg, fl, fn, ft, i, in$1, m, methods, mt, mtyp, out, p, pname, prop, ret, t, tt, $s};return $f; - }; - rtype.prototype.Method = function(i) { return this.$val.Method(i); }; - Value.ptr.prototype.object = function() { - var _1, newVal, v, val; - v = this; - if ((v.typ.Kind() === 17) || (v.typ.Kind() === 25)) { - return v.ptr; - } - if (!((((v.flag & 128) >>> 0) === 0))) { - val = v.ptr.$get(); - if (!(val === $ifaceNil) && !(val.constructor === jsType(v.typ))) { - switch (0) { default: - _1 = v.typ.Kind(); - if ((_1 === (11)) || (_1 === (6))) { - val = new (jsType(v.typ))(val.$high, val.$low); - } else if ((_1 === (15)) || (_1 === (16))) { - val = new (jsType(v.typ))(val.$real, val.$imag); - } else if (_1 === (23)) { - if (val === val.constructor.nil) { - val = jsType(v.typ).nil; - break; - } - newVal = new (jsType(v.typ))(val.$array); - newVal.$offset = val.$offset; - newVal.$length = val.$length; - newVal.$capacity = val.$capacity; - val = newVal; - } - } - } - return val; - } - return v.ptr; - }; - Value.prototype.object = function() { return this.$val.object(); }; - Value.ptr.prototype.assignTo = function(context, dst, target) { - var {_r, _r$1, _r$2, context, dst, fl, target, v, x, $s, $r, $c} = $restore(this, {context, dst, target}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - /* */ if (!((((v.flag & 512) >>> 0) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((((v.flag & 512) >>> 0) === 0))) { */ case 1: - _r = makeMethodValue(context, $clone(v, Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - /* } */ case 2: - _r$1 = directlyAssignable(dst, v.typ); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 5; continue; } - /* */ if (implements$1(dst, v.typ)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$1) { */ case 5: - fl = (((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0; - fl = (fl | (((dst.Kind() >>> 0)))) >>> 0; - $s = -1; return new Value.ptr(dst, v.ptr, fl); - /* } else if (implements$1(dst, v.typ)) { */ case 6: - if (target === 0) { - target = unsafe_New(dst); - } - _r$2 = valueInterface($clone(v, Value), false); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - x = _r$2; - if (dst.NumMethod() === 0) { - (target).$set(x); - } else { - ifaceE2I(dst, x, target); - } - $s = -1; return new Value.ptr(dst, target, 148); - /* } */ case 7: - case 4: - $panic(new $String(context + ": value of type " + v.typ.String() + " is not assignable to type " + dst.String())); - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.assignTo, $c: true, $r, _r, _r$1, _r$2, context, dst, fl, target, v, x, $s};return $f; - }; - Value.prototype.assignTo = function(context, dst, target) { return this.$val.assignTo(context, dst, target); }; - Value.ptr.prototype.call = function(op, in$1) { - var {$24r, _1, _arg, _arg$1, _arg$2, _arg$3, _i, _i$1, _i$2, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1, $s, $r, $c} = $restore(this, {op, in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - t = ptrType$20.nil; - fn = 0; - rcvr = null; - if (!((((v.flag & 512) >>> 0) === 0))) { - _tuple = methodReceiver(op, $clone(v, Value), ((v.flag >> 0)) >> 10 >> 0); - t = _tuple[1]; - fn = _tuple[2]; - rcvr = $clone(v, Value).object(); - if (isWrapped(v.typ)) { - rcvr = new (jsType(v.typ))(rcvr); - } - } else { - t = (v.typ.kindType); - fn = ($clone(v, Value).object()); - rcvr = undefined; - } - if (fn === 0) { - $panic(new $String("reflect.Value.Call: call of nil function")); - } - isSlice = op === "CallSlice"; - n = t.rtype.NumIn(); - if (isSlice) { - if (!t.rtype.IsVariadic()) { - $panic(new $String("reflect: CallSlice of non-variadic function")); - } - if (in$1.$length < n) { - $panic(new $String("reflect: CallSlice with too few input arguments")); - } - if (in$1.$length > n) { - $panic(new $String("reflect: CallSlice with too many input arguments")); - } - } else { - if (t.rtype.IsVariadic()) { - n = n - (1) >> 0; - } - if (in$1.$length < n) { - $panic(new $String("reflect: Call with too few input arguments")); - } - if (!t.rtype.IsVariadic() && in$1.$length > n) { - $panic(new $String("reflect: Call with too many input arguments")); - } - } - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - x = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ($clone(x, Value).Kind() === 0) { - $panic(new $String("reflect: " + op + " using zero Value argument")); - } - _i++; - } - i = 0; - /* while (true) { */ case 1: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } - _tmp = $clone(((i < 0 || i >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + i]), Value).Type(); - _tmp$1 = t.rtype.In(i); - xt = _tmp; - targ = _tmp$1; - _r = xt.AssignableTo(targ); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r) { */ case 3: - _r$1 = xt.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = targ.String(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $panic(new $String("reflect: " + op + " using " + _r$1 + " as type " + _r$2)); - /* } */ case 4: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - /* */ if (!isSlice && t.rtype.IsVariadic()) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!isSlice && t.rtype.IsVariadic()) { */ case 8: - m = in$1.$length - n >> 0; - _r$3 = MakeSlice(t.rtype.In(n), m, m); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - slice = _r$3; - _r$4 = t.rtype.In(n).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - elem = _r$4; - i$1 = 0; - /* while (true) { */ case 12: - /* if (!(i$1 < m)) { break; } */ if(!(i$1 < m)) { $s = 13; continue; } - x$2 = (x$1 = n + i$1 >> 0, ((x$1 < 0 || x$1 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x$1])); - xt$1 = $clone(x$2, Value).Type(); - _r$5 = xt$1.AssignableTo(elem); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!_r$5) { */ case 14: - _r$6 = xt$1.String(); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = elem.String(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String("reflect: cannot use " + _r$6 + " as type " + _r$7 + " in " + op)); - /* } */ case 15: - _r$8 = $clone(slice, Value).Index(i$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = $clone(_r$8, Value).Set($clone(x$2, Value)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$1 = i$1 + (1) >> 0; - $s = 12; continue; - case 13: - origIn = in$1; - in$1 = $makeSlice(sliceType$7, (n + 1 >> 0)); - $copySlice($subslice(in$1, 0, n), origIn); - ((n < 0 || n >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + n] = slice); - /* } */ case 9: - nin = in$1.$length; - if (!((nin === t.rtype.NumIn()))) { - $panic(new $String("reflect.Value.Call: wrong argument count")); - } - nout = t.rtype.NumOut(); - argsArray = new ($global.Array)(t.rtype.NumIn()); - _ref$1 = in$1; - _i$1 = 0; - /* while (true) { */ case 21: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 22; continue; } - i$2 = _i$1; - arg = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _arg = t.rtype.In(i$2); - _r$9 = t.rtype.In(i$2).common(); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _arg$2 = 0; - _r$10 = $clone(arg, Value).assignTo("reflect.Value.Call", _arg$1, _arg$2); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, Value).object(); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$3 = _r$11; - _r$12 = unwrapJsObject(_arg, _arg$3); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - argsArray[i$2] = _r$12; - _i$1++; - $s = 21; continue; - case 22: - _r$13 = callHelper(new sliceType$4([new $jsObjectPtr(fn), new $jsObjectPtr(rcvr), new $jsObjectPtr(argsArray)])); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - results = _r$13; - _1 = nout; - /* */ if (_1 === (0)) { $s = 29; continue; } - /* */ if (_1 === (1)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_1 === (0)) { */ case 29: - $s = -1; return sliceType$7.nil; - /* } else if (_1 === (1)) { */ case 30: - _r$14 = makeValue(t.rtype.Out(0), wrapJsObject(t.rtype.Out(0), results), 0); /* */ $s = 33; case 33: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r = new sliceType$7([$clone(_r$14, Value)]); - $s = 34; case 34: return $24r; - /* } else { */ case 31: - ret = $makeSlice(sliceType$7, nout); - _ref$2 = ret; - _i$2 = 0; - /* while (true) { */ case 35: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 36; continue; } - i$3 = _i$2; - _r$15 = makeValue(t.rtype.Out(i$3), wrapJsObject(t.rtype.Out(i$3), results[i$3]), 0); /* */ $s = 37; case 37: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - ((i$3 < 0 || i$3 >= ret.$length) ? ($throwRuntimeError("index out of range"), undefined) : ret.$array[ret.$offset + i$3] = _r$15); - _i$2++; - $s = 35; continue; - case 36: - $s = -1; return ret; - /* } */ case 32: - case 28: - $s = -1; return sliceType$7.nil; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.call, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _arg$3, _i, _i$1, _i$2, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, arg, argsArray, elem, fn, i, i$1, i$2, i$3, in$1, isSlice, m, n, nin, nout, op, origIn, rcvr, results, ret, slice, t, targ, v, x, x$1, x$2, xt, xt$1, $s};return $f; - }; - Value.prototype.call = function(op, in$1) { return this.$val.call(op, in$1); }; - Value.ptr.prototype.Cap = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if (_1 === (17)) { - return v.typ.Len(); - } else if ((_1 === (18)) || (_1 === (23))) { - return $parseInt($clone(v, Value).object().$capacity) >> 0; - } - $panic(new ValueError.ptr("reflect.Value.Cap", k)); - }; - Value.prototype.Cap = function() { return this.$val.Cap(); }; - wrapJsObject = function(typ, val) { - var typ, val; - if ($interfaceIsEqual(typ, jsObjectPtr)) { - return new (jsType(jsObjectPtr))(val); - } - return val; - }; - unwrapJsObject = function(typ, val) { - var typ, val; - if ($interfaceIsEqual(typ, jsObjectPtr)) { - return val.object; - } - return val; - }; - Value.ptr.prototype.Elem = function() { - var {$24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - k = new flag(v.flag).kind(); - _1 = k; - /* */ if (_1 === (20)) { $s = 2; continue; } - /* */ if (_1 === (22)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (20)) { */ case 2: - val = $clone(v, Value).object(); - if (val === $ifaceNil) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - typ = reflectType(val.constructor); - _r = makeValue(typ, val.$val, new flag(v.flag).ro()); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if (_1 === (22)) { */ case 3: - if ($clone(v, Value).IsNil()) { - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - } - val$1 = $clone(v, Value).object(); - tt = (v.typ.kindType); - fl = (((((v.flag & 96) >>> 0) | 128) >>> 0) | 256) >>> 0; - fl = (fl | (((tt.elem.Kind() >>> 0)))) >>> 0; - $s = -1; return new Value.ptr(tt.elem, (wrapJsObject(tt.elem, val$1)), fl); - /* } else { */ case 4: - $panic(new ValueError.ptr("reflect.Value.Elem", k)); - /* } */ case 5: - case 1: - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Elem, $c: true, $r, $24r, _1, _r, fl, k, tt, typ, v, val, val$1, $s};return $f; - }; - Value.prototype.Elem = function() { return this.$val.Elem(); }; - Value.ptr.prototype.Field = function(i) { - var {$24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - jsTag = [jsTag]; - prop = [prop]; - s = [s]; - typ = [typ]; - v = this; - if (!((new flag(v.flag).kind() === 25))) { - $panic(new ValueError.ptr("reflect.Value.Field", new flag(v.flag).kind())); - } - tt = (v.typ.kindType); - if (((i >>> 0)) >= ((tt.fields.$length >>> 0))) { - $panic(new $String("reflect: Field index out of range")); - } - prop[0] = $internalize(jsType(v.typ).fields[i].prop, $String); - field = (x = tt.fields, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - typ[0] = field.typ; - fl = (((v.flag & 416) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0; - if (!$clone(field.name, name).isExported()) { - if (field.embedded()) { - fl = (fl | (64)) >>> 0; - } else { - fl = (fl | (32)) >>> 0; - } - } - tag = $clone((x$1 = tt.fields, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).name, name).tag(); - /* */ if (!(tag === "") && !((i === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(tag === "") && !((i === 0))) { */ case 1: - jsTag[0] = getJsTag(tag); - /* */ if (!(jsTag[0] === "")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(jsTag[0] === "")) { */ case 3: - /* while (true) { */ case 5: - o = [o]; - _r = $clone(v, Value).Field(0); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - /* */ if (v.typ === jsObjectPtr) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (v.typ === jsObjectPtr) { */ case 8: - o[0] = $clone(v, Value).object().object; - $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, o, prop, s, typ) { return function() { - return $internalize(o[0][$externalize(jsTag[0], $String)], jsType(typ[0])); - }; })(jsTag, o, prop, s, typ), (function(jsTag, o, prop, s, typ) { return function(x$2) { - var x$2; - o[0][$externalize(jsTag[0], $String)] = $externalize(x$2, jsType(typ[0])); - }; })(jsTag, o, prop, s, typ))), fl); - /* } */ case 9: - /* */ if (v.typ.Kind() === 22) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (v.typ.Kind() === 22) { */ case 10: - _r$1 = $clone(v, Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - /* } */ case 11: - $s = 5; continue; - case 6: - /* } */ case 4: - /* } */ case 2: - s[0] = v.ptr; - /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 13: - $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(jsTag, prop, s, typ) { return function() { - return wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]); - }; })(jsTag, prop, s, typ), (function(jsTag, prop, s, typ) { return function(x$2) { - var x$2; - s[0][$externalize(prop[0], $String)] = unwrapJsObject(typ[0], x$2); - }; })(jsTag, prop, s, typ))), fl); - /* } */ case 14: - _r$2 = makeValue(typ[0], wrapJsObject(typ[0], s[0][$externalize(prop[0], $String)]), fl); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 16; case 16: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Field, $c: true, $r, $24r, _r, _r$1, _r$2, field, fl, i, jsTag, o, prop, s, tag, tt, typ, v, x, x$1, $s};return $f; - }; - Value.prototype.Field = function(i) { return this.$val.Field(i); }; - getJsTag = function(tag) { - var _tuple, i, name$1, qvalue, tag, value; - while (true) { - if (!(!(tag === ""))) { break; } - i = 0; - while (true) { - if (!(i < tag.length && (tag.charCodeAt(i) === 32))) { break; } - i = i + (1) >> 0; - } - tag = $substring(tag, i); - if (tag === "") { - break; - } - i = 0; - while (true) { - if (!(i < tag.length && !((tag.charCodeAt(i) === 32)) && !((tag.charCodeAt(i) === 58)) && !((tag.charCodeAt(i) === 34)))) { break; } - i = i + (1) >> 0; - } - if ((i + 1 >> 0) >= tag.length || !((tag.charCodeAt(i) === 58)) || !((tag.charCodeAt((i + 1 >> 0)) === 34))) { - break; - } - name$1 = ($substring(tag, 0, i)); - tag = $substring(tag, (i + 1 >> 0)); - i = 1; - while (true) { - if (!(i < tag.length && !((tag.charCodeAt(i) === 34)))) { break; } - if (tag.charCodeAt(i) === 92) { - i = i + (1) >> 0; - } - i = i + (1) >> 0; - } - if (i >= tag.length) { - break; - } - qvalue = ($substring(tag, 0, (i + 1 >> 0))); - tag = $substring(tag, (i + 1 >> 0)); - if (name$1 === "js") { - _tuple = strconv.Unquote(qvalue); - value = _tuple[0]; - return value; - } - } - return ""; - }; - Value.ptr.prototype.Index = function(i) { - var {$24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - a$1 = [a$1]; - c = [c]; - i = [i]; - typ = [typ]; - typ$1 = [typ$1]; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - /* */ if (_1 === (17)) { $s = 2; continue; } - /* */ if (_1 === (23)) { $s = 3; continue; } - /* */ if (_1 === (24)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (17)) { */ case 2: - tt = (v.typ.kindType); - if (i[0] < 0 || i[0] > ((tt.len >> 0))) { - $panic(new $String("reflect: array index out of range")); - } - typ[0] = tt.elem; - fl = (((((v.flag & 384) >>> 0) | new flag(v.flag).ro()) >>> 0) | ((typ[0].Kind() >>> 0))) >>> 0; - a[0] = v.ptr; - /* */ if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((((fl & 128) >>> 0) === 0)) && !((typ[0].Kind() === 17)) && !((typ[0].Kind() === 25))) { */ case 7: - $s = -1; return new Value.ptr(typ[0], (new (jsType(PtrTo(typ[0])))((function(a, a$1, c, i, typ, typ$1) { return function() { - return wrapJsObject(typ[0], a[0][i[0]]); - }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) { - var x; - a[0][i[0]] = unwrapJsObject(typ[0], x); - }; })(a, a$1, c, i, typ, typ$1))), fl); - /* } */ case 8: - _r = makeValue(typ[0], wrapJsObject(typ[0], a[0][i[0]]), fl); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 10; case 10: return $24r; - /* } else if (_1 === (23)) { */ case 3: - s = $clone(v, Value).object(); - if (i[0] < 0 || i[0] >= ($parseInt(s.$length) >> 0)) { - $panic(new $String("reflect: slice index out of range")); - } - tt$1 = (v.typ.kindType); - typ$1[0] = tt$1.elem; - fl$1 = (((384 | new flag(v.flag).ro()) >>> 0) | ((typ$1[0].Kind() >>> 0))) >>> 0; - i[0] = i[0] + (($parseInt(s.$offset) >> 0)) >> 0; - a$1[0] = s.$array; - /* */ if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!((((fl$1 & 128) >>> 0) === 0)) && !((typ$1[0].Kind() === 17)) && !((typ$1[0].Kind() === 25))) { */ case 11: - $s = -1; return new Value.ptr(typ$1[0], (new (jsType(PtrTo(typ$1[0])))((function(a, a$1, c, i, typ, typ$1) { return function() { - return wrapJsObject(typ$1[0], a$1[0][i[0]]); - }; })(a, a$1, c, i, typ, typ$1), (function(a, a$1, c, i, typ, typ$1) { return function(x) { - var x; - a$1[0][i[0]] = unwrapJsObject(typ$1[0], x); - }; })(a, a$1, c, i, typ, typ$1))), fl$1); - /* } */ case 12: - _r$1 = makeValue(typ$1[0], wrapJsObject(typ$1[0], a$1[0][i[0]]), fl$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 14; case 14: return $24r$1; - /* } else if (_1 === (24)) { */ case 4: - str = (v.ptr).$get(); - if (i[0] < 0 || i[0] >= str.length) { - $panic(new $String("reflect: string index out of range")); - } - fl$2 = (((new flag(v.flag).ro() | 8) >>> 0) | 128) >>> 0; - c[0] = str.charCodeAt(i[0]); - $s = -1; return new Value.ptr(uint8Type, ((c.$ptr || (c.$ptr = new ptrType$13(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, c)))), fl$2); - /* } else { */ case 5: - $panic(new ValueError.ptr("reflect.Value.Index", k)); - /* } */ case 6: - case 1: - $s = -1; return new Value.ptr(ptrType$1.nil, 0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Index, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, a, a$1, c, fl, fl$1, fl$2, i, k, s, str, tt, tt$1, typ, typ$1, v, $s};return $f; - }; - Value.prototype.Index = function(i) { return this.$val.Index(i); }; - Value.ptr.prototype.InterfaceData = function() { - var v; - v = this; - $panic(errors.New("InterfaceData is not supported by GopherJS")); - }; - Value.prototype.InterfaceData = function() { return this.$val.InterfaceData(); }; - Value.ptr.prototype.IsNil = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (22)) || (_1 === (23))) { - return $clone(v, Value).object() === jsType(v.typ).nil; - } else if (_1 === (18)) { - return $clone(v, Value).object() === $chanNil; - } else if (_1 === (19)) { - return $clone(v, Value).object() === $throwNilPointerError; - } else if (_1 === (21)) { - return $clone(v, Value).object() === false; - } else if (_1 === (20)) { - return $clone(v, Value).object() === $ifaceNil; - } else if (_1 === (26)) { - return $clone(v, Value).object() === 0; - } else { - $panic(new ValueError.ptr("reflect.Value.IsNil", k)); - } - }; - Value.prototype.IsNil = function() { return this.$val.IsNil(); }; - Value.ptr.prototype.Len = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (17)) || (_1 === (24))) { - return $parseInt($clone(v, Value).object().length); - } else if (_1 === (23)) { - return $parseInt($clone(v, Value).object().$length) >> 0; - } else if (_1 === (18)) { - return $parseInt($clone(v, Value).object().$buffer.length) >> 0; - } else if (_1 === (21)) { - return $parseInt($keys($clone(v, Value).object()).length); - } else { - $panic(new ValueError.ptr("reflect.Value.Len", k)); - } - }; - Value.prototype.Len = function() { return this.$val.Len(); }; - Value.ptr.prototype.Pointer = function() { - var _1, k, v; - v = this; - k = new flag(v.flag).kind(); - _1 = k; - if ((_1 === (18)) || (_1 === (21)) || (_1 === (22)) || (_1 === (26))) { - if ($clone(v, Value).IsNil()) { - return 0; - } - return $clone(v, Value).object(); - } else if (_1 === (19)) { - if ($clone(v, Value).IsNil()) { - return 0; - } - return 1; - } else if (_1 === (23)) { - if ($clone(v, Value).IsNil()) { - return 0; - } - return $clone(v, Value).object().$array; - } else { - $panic(new ValueError.ptr("reflect.Value.Pointer", k)); - } - }; - Value.prototype.Pointer = function() { return this.$val.Pointer(); }; - Value.ptr.prototype.Set = function(x) { - var {_1, _r, _r$1, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(x.flag).mustBeExported(); - _r = $clone(x, Value).assignTo("reflect.Set", v.typ, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x = _r; - /* */ if (!((((v.flag & 128) >>> 0) === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((((v.flag & 128) >>> 0) === 0))) { */ case 2: - _1 = v.typ.Kind(); - /* */ if (_1 === (17)) { $s = 5; continue; } - /* */ if (_1 === (20)) { $s = 6; continue; } - /* */ if (_1 === (25)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (17)) { */ case 5: - jsType(v.typ).copy(v.ptr, x.ptr); - $s = 9; continue; - /* } else if (_1 === (20)) { */ case 6: - _r$1 = valueInterface($clone(x, Value), false); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v.ptr.$set(_r$1); - $s = 9; continue; - /* } else if (_1 === (25)) { */ case 7: - copyStruct(v.ptr, x.ptr, v.typ); - $s = 9; continue; - /* } else { */ case 8: - v.ptr.$set($clone(x, Value).object()); - /* } */ case 9: - case 4: - $s = -1; return; - /* } */ case 3: - v.ptr = x.ptr; - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Set, $c: true, $r, _1, _r, _r$1, v, x, $s};return $f; - }; - Value.prototype.Set = function(x) { return this.$val.Set(x); }; - Value.ptr.prototype.SetBytes = function(x) { - var {_r, _r$1, _v, slice, typedSlice, v, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - _r = v.typ.Elem().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 8))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 8))) { */ case 1: - $panic(new $String("reflect.Value.SetBytes of non-byte slice")); - /* } */ case 2: - slice = x; - if (!(v.typ.Name() === "")) { _v = true; $s = 6; continue s; } - _r$1 = v.typ.Elem().Name(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !(_r$1 === ""); case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - typedSlice = new (jsType(v.typ))(slice.$array); - typedSlice.$offset = slice.$offset; - typedSlice.$length = slice.$length; - typedSlice.$capacity = slice.$capacity; - slice = typedSlice; - /* } */ case 5: - v.ptr.$set(slice); - $s = -1; return; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.SetBytes, $c: true, $r, _r, _r$1, _v, slice, typedSlice, v, x, $s};return $f; - }; - Value.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; - Value.ptr.prototype.SetCap = function(n) { - var n, newSlice, s, v; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - s = v.ptr.$get(); - if (n < ($parseInt(s.$length) >> 0) || n > ($parseInt(s.$capacity) >> 0)) { - $panic(new $String("reflect: slice capacity out of range in SetCap")); - } - newSlice = new (jsType(v.typ))(s.$array); - newSlice.$offset = s.$offset; - newSlice.$length = s.$length; - newSlice.$capacity = n; - v.ptr.$set(newSlice); - }; - Value.prototype.SetCap = function(n) { return this.$val.SetCap(n); }; - Value.ptr.prototype.SetLen = function(n) { - var n, newSlice, s, v; - v = this; - new flag(v.flag).mustBeAssignable(); - new flag(v.flag).mustBe(23); - s = v.ptr.$get(); - if (n < 0 || n > ($parseInt(s.$capacity) >> 0)) { - $panic(new $String("reflect: slice length out of range in SetLen")); - } - newSlice = new (jsType(v.typ))(s.$array); - newSlice.$offset = s.$offset; - newSlice.$length = n; - newSlice.$capacity = s.$capacity; - v.ptr.$set(newSlice); - }; - Value.prototype.SetLen = function(n) { return this.$val.SetLen(n); }; - Value.ptr.prototype.Slice = function(i, j) { - var {$24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - cap = 0; - typ = $ifaceNil; - s = null; - kind = new flag(v.flag).kind(); - _1 = kind; - /* */ if (_1 === (17)) { $s = 2; continue; } - /* */ if (_1 === (23)) { $s = 3; continue; } - /* */ if (_1 === (24)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (17)) { */ case 2: - if (((v.flag & 256) >>> 0) === 0) { - $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); - } - tt = (v.typ.kindType); - cap = ((tt.len >> 0)); - typ = SliceOf(tt.elem); - s = new (jsType(typ))($clone(v, Value).object()); - $s = 6; continue; - /* } else if (_1 === (23)) { */ case 3: - typ = v.typ; - s = $clone(v, Value).object(); - cap = $parseInt(s.$capacity) >> 0; - $s = 6; continue; - /* } else if (_1 === (24)) { */ case 4: - str = (v.ptr).$get(); - if (i < 0 || j < i || j > str.length) { - $panic(new $String("reflect.Value.Slice: string slice index out of bounds")); - } - _r = ValueOf(new $String($substring(str, i, j))); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 8; case 8: return $24r; - /* } else { */ case 5: - $panic(new ValueError.ptr("reflect.Value.Slice", kind)); - /* } */ case 6: - case 1: - if (i < 0 || j < i || j > cap) { - $panic(new $String("reflect.Value.Slice: slice index out of bounds")); - } - _r$1 = makeValue(typ, $subslice(s, i, j), new flag(v.flag).ro()); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 10; case 10: return $24r$1; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, cap, i, j, kind, s, str, tt, typ, v, $s};return $f; - }; - Value.prototype.Slice = function(i, j) { return this.$val.Slice(i, j); }; - Value.ptr.prototype.Slice3 = function(i, j, k) { - var {$24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s, $r, $c} = $restore(this, {i, j, k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - cap = 0; - typ = $ifaceNil; - s = null; - kind = new flag(v.flag).kind(); - _1 = kind; - if (_1 === (17)) { - if (((v.flag & 256) >>> 0) === 0) { - $panic(new $String("reflect.Value.Slice: slice of unaddressable array")); - } - tt = (v.typ.kindType); - cap = ((tt.len >> 0)); - typ = SliceOf(tt.elem); - s = new (jsType(typ))($clone(v, Value).object()); - } else if (_1 === (23)) { - typ = v.typ; - s = $clone(v, Value).object(); - cap = $parseInt(s.$capacity) >> 0; - } else { - $panic(new ValueError.ptr("reflect.Value.Slice3", kind)); - } - if (i < 0 || j < i || k < j || k > cap) { - $panic(new $String("reflect.Value.Slice3: slice index out of bounds")); - } - _r = makeValue(typ, $subslice(s, i, j, k), new flag(v.flag).ro()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Slice3, $c: true, $r, $24r, _1, _r, cap, i, j, k, kind, s, tt, typ, v, $s};return $f; - }; - Value.prototype.Slice3 = function(i, j, k) { return this.$val.Slice3(i, j, k); }; - Value.ptr.prototype.Close = function() { - var v; - v = this; - new flag(v.flag).mustBe(18); - new flag(v.flag).mustBeExported(); - $close($clone(v, Value).object()); - }; - Value.prototype.Close = function() { return this.$val.Close(); }; - chanrecv = function(ch, nb, val) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, ch, comms, nb, received, recvRes, selectRes, selected, val, $s, $r, $c} = $restore(this, {ch, nb, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - selected = false; - received = false; - comms = new sliceType$18([new sliceType$16([ch])]); - if (nb) { - comms = $append(comms, new sliceType$16([])); - } - _r = selectHelper(new sliceType$4([comms])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - selectRes = _r; - if (nb && (($parseInt(selectRes[0]) >> 0) === 1)) { - _tmp = false; - _tmp$1 = false; - selected = _tmp; - received = _tmp$1; - $s = -1; return [selected, received]; - } - recvRes = selectRes[1]; - val.$set(recvRes[0]); - _tmp$2 = true; - _tmp$3 = !!(recvRes[1]); - selected = _tmp$2; - received = _tmp$3; - $s = -1; return [selected, received]; - /* */ } return; } var $f = {$blk: chanrecv, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, ch, comms, nb, received, recvRes, selectRes, selected, val, $s};return $f; - }; - chansend = function(ch, val, nb) { - var {_r, ch, comms, nb, selectRes, val, $s, $r, $c} = $restore(this, {ch, val, nb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - comms = new sliceType$18([new sliceType$16([ch, val.$get()])]); - if (nb) { - comms = $append(comms, new sliceType$16([])); - } - _r = selectHelper(new sliceType$4([comms])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - selectRes = _r; - if (nb && (($parseInt(selectRes[0]) >> 0) === 1)) { - $s = -1; return false; - } - $s = -1; return true; - /* */ } return; } var $f = {$blk: chansend, $c: true, $r, _r, ch, comms, nb, selectRes, val, $s};return $f; - }; - DeepEqual = function(a1, a2) { - var {$24r, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, a1, a2, i1, i2, $s, $r, $c} = $restore(this, {a1, a2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i1 = a1; - i2 = a2; - if (i1 === i2) { - $s = -1; return true; - } - if (i1 === null || i2 === null || !(i1.constructor === i2.constructor)) { - $s = -1; return false; - } - _r = ValueOf(a1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = $clone(_r, Value); - _r$1 = ValueOf(a2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$1, Value); - _arg$2 = sliceType$19.nil; - _r$2 = deepValueEqualJs(_arg, _arg$1, _arg$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: DeepEqual, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, a1, a2, i1, i2, $s};return $f; - }; - $pkg.DeepEqual = DeepEqual; - deepValueEqualJs = function(v1, v2, visited) { - var {$24r, $24r$1, $24r$2, _1, _2, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, entry, i, i$1, k, keys, n, n$1, v1, v2, val1, val2, visited, $s, $r, $c} = $restore(this, {v1, v2, visited}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!$clone(v1, Value).IsValid() || !$clone(v2, Value).IsValid()) { - $s = -1; return !$clone(v1, Value).IsValid() && !$clone(v2, Value).IsValid(); - } - if (!($interfaceIsEqual($clone(v1, Value).Type(), $clone(v2, Value).Type()))) { - $s = -1; return false; - } - if ($interfaceIsEqual($clone(v1, Value).Type(), jsObjectPtr)) { - $s = -1; return unwrapJsObject(jsObjectPtr, $clone(v1, Value).object()) === unwrapJsObject(jsObjectPtr, $clone(v2, Value).object()); - } - _1 = $clone(v1, Value).Kind(); - if ((_1 === (17)) || (_1 === (21)) || (_1 === (23)) || (_1 === (25))) { - _ref = visited; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - entry = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType$6); - if (v1.ptr === entry[0] && v2.ptr === entry[1]) { - $s = -1; return true; - } - _i++; - } - visited = $append(visited, $toNativeArray($kindUnsafePointer, [v1.ptr, v2.ptr])); - } - _2 = $clone(v1, Value).Kind(); - /* */ if ((_2 === (17)) || (_2 === (23))) { $s = 2; continue; } - /* */ if (_2 === (20)) { $s = 3; continue; } - /* */ if (_2 === (22)) { $s = 4; continue; } - /* */ if (_2 === (25)) { $s = 5; continue; } - /* */ if (_2 === (21)) { $s = 6; continue; } - /* */ if (_2 === (19)) { $s = 7; continue; } - /* */ if (_2 === (26)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((_2 === (17)) || (_2 === (23))) { */ case 2: - if ($clone(v1, Value).Kind() === 23) { - if (!($clone(v1, Value).IsNil() === $clone(v2, Value).IsNil())) { - $s = -1; return false; - } - if ($clone(v1, Value).object() === $clone(v2, Value).object()) { - $s = -1; return true; - } - } - n = $clone(v1, Value).Len(); - if (!((n === $clone(v2, Value).Len()))) { - $s = -1; return false; - } - i = 0; - /* while (true) { */ case 10: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 11; continue; } - _r = $clone(v1, Value).Index(i); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = $clone(_r, Value); - _r$1 = $clone(v2, Value).Index(i); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$1, Value); - _arg$2 = visited; - _r$2 = deepValueEqualJs(_arg, _arg$1, _arg$2); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!_r$2) { */ case 12: - $s = -1; return false; - /* } */ case 13: - i = i + (1) >> 0; - $s = 10; continue; - case 11: - $s = -1; return true; - /* } else if (_2 === (20)) { */ case 3: - if ($clone(v1, Value).IsNil() || $clone(v2, Value).IsNil()) { - $s = -1; return $clone(v1, Value).IsNil() && $clone(v2, Value).IsNil(); - } - _r$3 = $clone(v1, Value).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$3, Value); - _r$4 = $clone(v2, Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$4 = $clone(_r$4, Value); - _arg$5 = visited; - _r$5 = deepValueEqualJs(_arg$3, _arg$4, _arg$5); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 20; case 20: return $24r; - /* } else if (_2 === (22)) { */ case 4: - _r$6 = $clone(v1, Value).Elem(); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$6 = $clone(_r$6, Value); - _r$7 = $clone(v2, Value).Elem(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$7 = $clone(_r$7, Value); - _arg$8 = visited; - _r$8 = deepValueEqualJs(_arg$6, _arg$7, _arg$8); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 24; case 24: return $24r$1; - /* } else if (_2 === (25)) { */ case 5: - n$1 = $clone(v1, Value).NumField(); - i$1 = 0; - /* while (true) { */ case 25: - /* if (!(i$1 < n$1)) { break; } */ if(!(i$1 < n$1)) { $s = 26; continue; } - _r$9 = $clone(v1, Value).Field(i$1); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$9 = $clone(_r$9, Value); - _r$10 = $clone(v2, Value).Field(i$1); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$10 = $clone(_r$10, Value); - _arg$11 = visited; - _r$11 = deepValueEqualJs(_arg$9, _arg$10, _arg$11); /* */ $s = 31; case 31: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!_r$11) { */ case 27: - $s = -1; return false; - /* } */ case 28: - i$1 = i$1 + (1) >> 0; - $s = 25; continue; - case 26: - $s = -1; return true; - /* } else if (_2 === (21)) { */ case 6: - if (!($clone(v1, Value).IsNil() === $clone(v2, Value).IsNil())) { - $s = -1; return false; - } - if ($clone(v1, Value).object() === $clone(v2, Value).object()) { - $s = -1; return true; - } - _r$12 = $clone(v1, Value).MapKeys(); /* */ $s = 32; case 32: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - keys = _r$12; - if (!((keys.$length === $clone(v2, Value).Len()))) { - $s = -1; return false; - } - _ref$1 = keys; - _i$1 = 0; - /* while (true) { */ case 33: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 34; continue; } - k = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$13 = $clone(v1, Value).MapIndex($clone(k, Value)); /* */ $s = 35; case 35: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - val1 = _r$13; - _r$14 = $clone(v2, Value).MapIndex($clone(k, Value)); /* */ $s = 36; case 36: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - val2 = _r$14; - if (!$clone(val1, Value).IsValid() || !$clone(val2, Value).IsValid()) { _v = true; $s = 39; continue s; } - _r$15 = deepValueEqualJs($clone(val1, Value), $clone(val2, Value), visited); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _v = !_r$15; case 39: - /* */ if (_v) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (_v) { */ case 37: - $s = -1; return false; - /* } */ case 38: - _i$1++; - $s = 33; continue; - case 34: - $s = -1; return true; - /* } else if (_2 === (19)) { */ case 7: - $s = -1; return $clone(v1, Value).IsNil() && $clone(v2, Value).IsNil(); - /* } else if (_2 === (26)) { */ case 8: - $s = -1; return $clone(v1, Value).object() === $clone(v2, Value).object(); - /* } */ case 9: - case 1: - _r$16 = valueInterface($clone(v1, Value), false); /* */ $s = 41; case 41: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = valueInterface($clone(v2, Value), false); /* */ $s = 42; case 42: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$2 = !!($interfaceIsEqual(_r$16, _r$17)); - $s = 43; case 43: return $24r$2; - /* */ } return; } var $f = {$blk: deepValueEqualJs, $c: true, $r, $24r, $24r$1, $24r$2, _1, _2, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, entry, i, i$1, k, keys, n, n$1, v1, v2, val1, val2, visited, $s};return $f; - }; - methodNameSkip = function() { - var _tuple, f, idx, name$1, pc; - _tuple = runtime.Caller(3); - pc = _tuple[0]; - f = runtime.FuncForPC(pc); - if (f === ptrType$4.nil) { - return "unknown method"; - } - name$1 = f.Name(); - idx = name$1.length - 1 >> 0; - while (true) { - if (!(idx > 0)) { break; } - if (name$1.charCodeAt(idx) === 46) { - break; - } - idx = idx - (1) >> 0; - } - if (idx < 0) { - return name$1; - } - return "Value" + $substring(name$1, idx); - }; - verifyNotInHeapPtr = function(p) { - var p; - return true; - }; - Value.methods = [{prop: "pointer", name: "pointer", pkg: "reflect", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "runes", name: "runes", pkg: "reflect", typ: $funcType([], [sliceType$10], false)}, {prop: "CanAddr", name: "CanAddr", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "CanSet", name: "CanSet", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "CallSlice", name: "CallSlice", pkg: "", typ: $funcType([sliceType$7], [sliceType$7], false)}, {prop: "CanComplex", name: "CanComplex", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Complex", name: "Complex", pkg: "", typ: $funcType([], [$Complex128], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [Value], false)}, {prop: "FieldByIndexErr", name: "FieldByIndexErr", pkg: "", typ: $funcType([sliceType$6], [Value, $error], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [Value], false)}, {prop: "CanFloat", name: "CanFloat", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "CanInt", name: "CanInt", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "CanInterface", name: "CanInterface", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapIndex", name: "MapIndex", pkg: "", typ: $funcType([Value], [Value], false)}, {prop: "MapKeys", name: "MapKeys", pkg: "", typ: $funcType([], [sliceType$7], false)}, {prop: "SetIterKey", name: "SetIterKey", pkg: "", typ: $funcType([ptrType$22], [], false)}, {prop: "SetIterValue", name: "SetIterValue", pkg: "", typ: $funcType([ptrType$22], [], false)}, {prop: "MapRange", name: "MapRange", pkg: "", typ: $funcType([], [ptrType$22], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "OverflowComplex", name: "OverflowComplex", pkg: "", typ: $funcType([$Complex128], [$Bool], false)}, {prop: "OverflowFloat", name: "OverflowFloat", pkg: "", typ: $funcType([$Float64], [$Bool], false)}, {prop: "OverflowInt", name: "OverflowInt", pkg: "", typ: $funcType([$Int64], [$Bool], false)}, {prop: "OverflowUint", name: "OverflowUint", pkg: "", typ: $funcType([$Uint64], [$Bool], false)}, {prop: "Recv", name: "Recv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "recv", name: "recv", pkg: "reflect", typ: $funcType([$Bool], [Value, $Bool], false)}, {prop: "Send", name: "Send", pkg: "", typ: $funcType([Value], [], false)}, {prop: "send", name: "send", pkg: "reflect", typ: $funcType([Value, $Bool], [$Bool], false)}, {prop: "SetBool", name: "SetBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "setRunes", name: "setRunes", pkg: "reflect", typ: $funcType([sliceType$10], [], false)}, {prop: "SetComplex", name: "SetComplex", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "SetFloat", name: "SetFloat", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetInt", name: "SetInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "SetMapIndex", name: "SetMapIndex", pkg: "", typ: $funcType([Value, Value], [], false)}, {prop: "SetUint", name: "SetUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "SetPointer", name: "SetPointer", pkg: "", typ: $funcType([$UnsafePointer], [], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TryRecv", name: "TryRecv", pkg: "", typ: $funcType([], [Value, $Bool], false)}, {prop: "TrySend", name: "TrySend", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "CanUint", name: "CanUint", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "UnsafeAddr", name: "UnsafeAddr", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "UnsafePointer", name: "UnsafePointer", pkg: "", typ: $funcType([], [$UnsafePointer], false)}, {prop: "Convert", name: "Convert", pkg: "", typ: $funcType([Type], [Value], false)}, {prop: "CanConvert", name: "CanConvert", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "object", name: "object", pkg: "reflect", typ: $funcType([], [ptrType$2], false)}, {prop: "assignTo", name: "assignTo", pkg: "reflect", typ: $funcType([$String, ptrType$1, $UnsafePointer], [Value], false)}, {prop: "call", name: "call", pkg: "reflect", typ: $funcType([$String, sliceType$7], [sliceType$7], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "InterfaceData", name: "InterfaceData", pkg: "", typ: $funcType([], [arrayType$7], false)}, {prop: "IsNil", name: "IsNil", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Pointer", name: "Pointer", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([Value], [], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$9], [], false)}, {prop: "SetCap", name: "SetCap", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetLen", name: "SetLen", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Slice", name: "Slice", pkg: "", typ: $funcType([$Int, $Int], [Value], false)}, {prop: "Slice3", name: "Slice3", pkg: "", typ: $funcType([$Int, $Int, $Int], [Value], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}]; - flag.methods = [{prop: "kind", name: "kind", pkg: "reflect", typ: $funcType([], [Kind], false)}, {prop: "ro", name: "ro", pkg: "reflect", typ: $funcType([], [flag], false)}, {prop: "mustBe", name: "mustBe", pkg: "reflect", typ: $funcType([Kind], [], false)}, {prop: "mustBeExported", name: "mustBeExported", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeExportedSlow", name: "mustBeExportedSlow", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignable", name: "mustBeAssignable", pkg: "reflect", typ: $funcType([], [], false)}, {prop: "mustBeAssignableSlow", name: "mustBeAssignableSlow", pkg: "reflect", typ: $funcType([], [], false)}]; - ptrType$23.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$22.methods = [{prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([Value], [], false)}]; - Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$1.methods = [{prop: "textOff", name: "textOff", pkg: "reflect", typ: $funcType([textOff], [$UnsafePointer], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "reflect", typ: $funcType([], [sliceType$11], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "hasName", name: "hasName", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "gcSlice", name: "gcSlice", pkg: "reflect", typ: $funcType([$Uintptr, $Uintptr], [sliceType$9], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$9], false)}, {prop: "nameOff", name: "nameOff", pkg: "reflect", typ: $funcType([nameOff], [name], false)}, {prop: "typeOff", name: "typeOff", pkg: "reflect", typ: $funcType([typeOff], [ptrType$1], false)}, {prop: "ptrTo", name: "ptrTo", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "pointers", name: "pointers", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}]; - ChanDir.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$10.methods = [{prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}]; - ptrType$25.methods = [{prop: "offset", name: "offset", pkg: "reflect", typ: $funcType([], [$Uintptr], false)}, {prop: "embedded", name: "embedded", pkg: "reflect", typ: $funcType([], [$Bool], false)}]; - ptrType$12.methods = [{prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [StructField], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}]; - Method.methods = [{prop: "IsExported", name: "IsExported", pkg: "", typ: $funcType([], [$Bool], false)}]; - StructField.methods = [{prop: "IsExported", name: "IsExported", pkg: "", typ: $funcType([], [$Bool], false)}]; - StructTag.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Lookup", name: "Lookup", pkg: "", typ: $funcType([$String], [$String, $Bool], false)}]; - ptrType$9.methods = [{prop: "methods", name: "methods", pkg: "reflect", typ: $funcType([], [sliceType$11], false)}, {prop: "exportedMethods", name: "exportedMethods", pkg: "reflect", typ: $funcType([], [sliceType$11], false)}]; - ptrType$20.methods = [{prop: "in$", name: "in", pkg: "reflect", typ: $funcType([], [sliceType$2], false)}, {prop: "out", name: "out", pkg: "reflect", typ: $funcType([], [sliceType$2], false)}]; - name.methods = [{prop: "data", name: "data", pkg: "reflect", typ: $funcType([$Int, $String], [ptrType$13], false)}, {prop: "hasTag", name: "hasTag", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "readVarint", name: "readVarint", pkg: "reflect", typ: $funcType([$Int], [$Int, $Int], false)}, {prop: "name", name: "name", pkg: "reflect", typ: $funcType([], [$String], false)}, {prop: "tag", name: "tag", pkg: "reflect", typ: $funcType([], [$String], false)}, {prop: "pkgPath", name: "pkgPath", pkg: "reflect", typ: $funcType([], [$String], false)}, {prop: "isExported", name: "isExported", pkg: "reflect", typ: $funcType([], [$Bool], false)}]; - ptrType$28.methods = [{prop: "initialized", name: "initialized", pkg: "reflect", typ: $funcType([], [$Bool], false)}, {prop: "skipUntilValidKey", name: "skipUntilValidKey", pkg: "reflect", typ: $funcType([], [], false)}]; - Value.init("reflect", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "ptr", name: "ptr", embedded: false, exported: false, typ: $UnsafePointer, tag: ""}, {prop: "flag", name: "flag", embedded: true, exported: false, typ: flag, tag: ""}]); - ValueError.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: Kind, tag: ""}]); - MapIter.init("reflect", [{prop: "m", name: "m", embedded: false, exported: false, typ: Value, tag: ""}, {prop: "hiter", name: "hiter", embedded: false, exported: false, typ: hiter, tag: ""}]); - Type.init([{prop: "Align", name: "Align", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "AssignableTo", name: "AssignableTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ChanDir", name: "ChanDir", pkg: "", typ: $funcType([], [ChanDir], false)}, {prop: "Comparable", name: "Comparable", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ConvertibleTo", name: "ConvertibleTo", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Field", name: "Field", pkg: "", typ: $funcType([$Int], [StructField], false)}, {prop: "FieldAlign", name: "FieldAlign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "FieldByIndex", name: "FieldByIndex", pkg: "", typ: $funcType([sliceType$6], [StructField], false)}, {prop: "FieldByName", name: "FieldByName", pkg: "", typ: $funcType([$String], [StructField, $Bool], false)}, {prop: "FieldByNameFunc", name: "FieldByNameFunc", pkg: "", typ: $funcType([funcType$3], [StructField, $Bool], false)}, {prop: "Implements", name: "Implements", pkg: "", typ: $funcType([Type], [$Bool], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "IsVariadic", name: "IsVariadic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Key", name: "Key", pkg: "", typ: $funcType([], [Type], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Method", name: "Method", pkg: "", typ: $funcType([$Int], [Method], false)}, {prop: "MethodByName", name: "MethodByName", pkg: "", typ: $funcType([$String], [Method, $Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "NumField", name: "NumField", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumIn", name: "NumIn", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumMethod", name: "NumMethod", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NumOut", name: "NumOut", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Out", name: "Out", pkg: "", typ: $funcType([$Int], [Type], false)}, {prop: "PkgPath", name: "PkgPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "common", name: "common", pkg: "reflect", typ: $funcType([], [ptrType$1], false)}, {prop: "uncommon", name: "uncommon", pkg: "reflect", typ: $funcType([], [ptrType$9], false)}]); - rtype.init("reflect", [{prop: "size", name: "size", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "ptrdata", name: "ptrdata", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "hash", name: "hash", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "tflag", name: "tflag", embedded: false, exported: false, typ: tflag, tag: ""}, {prop: "align", name: "align", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "fieldAlign", name: "fieldAlign", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "kind", name: "kind", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "equal", name: "equal", embedded: false, exported: false, typ: funcType$4, tag: ""}, {prop: "gcdata", name: "gcdata", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "ptrToThis", name: "ptrToThis", embedded: false, exported: false, typ: typeOff, tag: ""}]); - method.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mtyp", name: "mtyp", embedded: false, exported: false, typ: typeOff, tag: ""}, {prop: "ifn", name: "ifn", embedded: false, exported: false, typ: textOff, tag: ""}, {prop: "tfn", name: "tfn", embedded: false, exported: false, typ: textOff, tag: ""}]); - arrayType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "slice", name: "slice", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uintptr, tag: ""}]); - chanType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "dir", name: "dir", embedded: false, exported: false, typ: $Uintptr, tag: ""}]); - imethod.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: typeOff, tag: ""}]); - interfaceType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "methods", name: "methods", embedded: false, exported: false, typ: sliceType$14, tag: ""}]); - mapType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "bucket", name: "bucket", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "hasher", name: "hasher", embedded: false, exported: false, typ: funcType$5, tag: ""}, {prop: "keysize", name: "keysize", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "valuesize", name: "valuesize", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "bucketsize", name: "bucketsize", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - ptrType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); - sliceType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "elem", name: "elem", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); - structField.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: name, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "offsetEmbed", name: "offsetEmbed", embedded: false, exported: false, typ: $Uintptr, tag: ""}]); - structType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: name, tag: ""}, {prop: "fields", name: "fields", embedded: false, exported: false, typ: sliceType$15, tag: ""}]); - Method.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: Type, tag: ""}, {prop: "Func", name: "Func", embedded: false, exported: true, typ: Value, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}]); - StructField.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "PkgPath", name: "PkgPath", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: Type, tag: ""}, {prop: "Tag", name: "Tag", embedded: false, exported: true, typ: StructTag, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "Anonymous", name: "Anonymous", embedded: false, exported: true, typ: $Bool, tag: ""}]); - fieldScan.init("reflect", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: ptrType$12, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: sliceType$6, tag: ""}]); - uncommonType.init("reflect", [{prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: nameOff, tag: ""}, {prop: "mcount", name: "mcount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "xcount", name: "xcount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "moff", name: "moff", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "_methods", name: "_methods", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); - funcType.init("reflect", [{prop: "rtype", name: "rtype", embedded: true, exported: false, typ: rtype, tag: "reflect:\"func\""}, {prop: "inCount", name: "inCount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "outCount", name: "outCount", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "_in", name: "_in", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "_out", name: "_out", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - name.init("reflect", [{prop: "bytes", name: "bytes", embedded: false, exported: false, typ: ptrType$13, tag: ""}]); - nameData.init("reflect", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "exported", name: "exported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pkgPath", name: "pkgPath", embedded: false, exported: false, typ: $String, tag: ""}]); - hiter.init("reflect", [{prop: "t", name: "t", embedded: false, exported: false, typ: Type, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "keys", name: "keys", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "last", name: "last", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = abi.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = goarch.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = goexperiment.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = itoa.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unsafeheader.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - nameOffList = sliceType$1.nil; - typeOffList = sliceType$2.nil; - kindNames = new sliceType$3(["invalid", "bool", "int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64", "uintptr", "float32", "float64", "complex64", "complex128", "array", "chan", "func", "interface", "map", "ptr", "slice", "string", "struct", "unsafe.Pointer"]); - initialized = false; - uncommonTypeMap = {}; - nameMap = {}; - uint8Type = $assertType(TypeOf(new $Uint8(0)), ptrType$1); - stringType = $assertType(TypeOf(new $String("")), ptrType$1); - callHelper = $assertType($internalize($call, $emptyInterface), funcType$1); - jsObjectPtr = reflectType($jsObjectPtr); - selectHelper = $assertType($internalize($select, $emptyInterface), funcType$1); - $r = init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["sort"] = (function() { - var $pkg = {}, $init, reflectlite, lessSwap, IntSlice, StringSlice, sliceType, sliceType$2, funcType, funcType$1, reflectValueOf, reflectSwapper, insertionSort_func, siftDown_func, heapSort_func, medianOfThree_func, doPivot_func, quickSort_func, insertionSort, siftDown, heapSort, medianOfThree, swapRange, doPivot, quickSort, Sort, maxDepth, Ints, Strings, Stable, stable, symMerge, rotate, Slice, Search, SearchInts, SearchStrings; - reflectlite = $packages["internal/reflectlite"]; - lessSwap = $pkg.lessSwap = $newType(0, $kindStruct, "sort.lessSwap", true, "sort", false, function(Less_, Swap_) { - this.$val = this; - if (arguments.length === 0) { - this.Less = $throwNilPointerError; - this.Swap = $throwNilPointerError; - return; - } - this.Less = Less_; - this.Swap = Swap_; - }); - IntSlice = $pkg.IntSlice = $newType(12, $kindSlice, "sort.IntSlice", true, "sort", true, null); - StringSlice = $pkg.StringSlice = $newType(12, $kindSlice, "sort.StringSlice", true, "sort", true, null); - sliceType = $sliceType($Int); - sliceType$2 = $sliceType($String); - funcType = $funcType([$Int, $Int], [$Bool], false); - funcType$1 = $funcType([$Int, $Int], [], false); - insertionSort_func = function(data, a, b) { - var {_r, _v, a, b, data, i, j, $s, $r, $c} = $restore(this, {data, a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = a + 1 >> 0; - /* while (true) { */ case 1: - /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 2; continue; } - j = i; - /* while (true) { */ case 3: - if (!(j > a)) { _v = false; $s = 5; continue s; } - _r = data.Less(j, j - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 5: - /* if (!(_v)) { break; } */ if(!(_v)) { $s = 4; continue; } - $r = data.Swap(j, j - 1 >> 0); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - j = j - (1) >> 0; - $s = 3; continue; - case 4: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: insertionSort_func, $c: true, $r, _r, _v, a, b, data, i, j, $s};return $f; - }; - siftDown_func = function(data, lo, hi, first) { - var {_r, _r$1, _v, child, data, first, hi, lo, root, $s, $r, $c} = $restore(this, {data, lo, hi, first}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - root = lo; - /* while (true) { */ case 1: - child = ($imul(2, root)) + 1 >> 0; - if (child >= hi) { - /* break; */ $s = 2; continue; - } - if (!((child + 1 >> 0) < hi)) { _v = false; $s = 5; continue s; } - _r = data.Less(first + child >> 0, (first + child >> 0) + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 5: - /* */ if (_v) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 3: - child = child + (1) >> 0; - /* } */ case 4: - _r$1 = data.Less(first + root >> 0, first + child >> 0); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!_r$1) { */ case 7: - $s = -1; return; - /* } */ case 8: - $r = data.Swap(first + root >> 0, first + child >> 0); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - root = child; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: siftDown_func, $c: true, $r, _r, _r$1, _v, child, data, first, hi, lo, root, $s};return $f; - }; - heapSort_func = function(data, a, b) { - var {_q, a, b, data, first, hi, i, i$1, lo, $s, $r, $c} = $restore(this, {data, a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - first = a; - lo = 0; - hi = b - a >> 0; - i = (_q = ((hi - 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - /* while (true) { */ case 1: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 2; continue; } - $r = siftDown_func($clone(data, lessSwap), i, hi, first); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i - (1) >> 0; - $s = 1; continue; - case 2: - i$1 = hi - 1 >> 0; - /* while (true) { */ case 4: - /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 5; continue; } - $r = data.Swap(first, first + i$1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = siftDown_func($clone(data, lessSwap), lo, i$1, first); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$1 = i$1 - (1) >> 0; - $s = 4; continue; - case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: heapSort_func, $c: true, $r, _q, a, b, data, first, hi, i, i$1, lo, $s};return $f; - }; - medianOfThree_func = function(data, m1, m0, m2) { - var {_r, _r$1, _r$2, data, m0, m1, m2, $s, $r, $c} = $restore(this, {data, m1, m0, m2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = data.Less(m1, m0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r) { */ case 1: - $r = data.Swap(m1, m0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = data.Less(m2, m1); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$1) { */ case 5: - $r = data.Swap(m2, m1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = data.Less(m1, m0); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$2) { */ case 9: - $r = data.Swap(m1, m0); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: medianOfThree_func, $c: true, $r, _r, _r$1, _r$2, data, m0, m1, m2, $s};return $f; - }; - doPivot_func = function(data, lo, hi) { - var {_q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s, $r, $c} = $restore(this, {data, lo, hi}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - midlo = 0; - midhi = 0; - m = ((((((lo + hi >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - /* */ if ((hi - lo >> 0) > 40) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((hi - lo >> 0) > 40) { */ case 1: - s = (_q = ((hi - lo >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - $r = medianOfThree_func($clone(data, lessSwap), lo, lo + s >> 0, lo + ($imul(2, s)) >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = medianOfThree_func($clone(data, lessSwap), m, m - s >> 0, m + s >> 0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = medianOfThree_func($clone(data, lessSwap), hi - 1 >> 0, (hi - 1 >> 0) - s >> 0, (hi - 1 >> 0) - ($imul(2, s)) >> 0); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $r = medianOfThree_func($clone(data, lessSwap), lo, m, hi - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pivot = lo; - _tmp = lo + 1 >> 0; - _tmp$1 = hi - 1 >> 0; - a = _tmp; - c = _tmp$1; - /* while (true) { */ case 7: - if (!(a < c)) { _v = false; $s = 9; continue s; } - _r = data.Less(a, pivot); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 9: - /* if (!(_v)) { break; } */ if(!(_v)) { $s = 8; continue; } - a = a + (1) >> 0; - $s = 7; continue; - case 8: - b = a; - /* while (true) { */ case 11: - /* while (true) { */ case 13: - if (!(b < c)) { _v$1 = false; $s = 15; continue s; } - _r$1 = data.Less(pivot, b); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = !_r$1; case 15: - /* if (!(_v$1)) { break; } */ if(!(_v$1)) { $s = 14; continue; } - b = b + (1) >> 0; - $s = 13; continue; - case 14: - /* while (true) { */ case 17: - if (!(b < c)) { _v$2 = false; $s = 19; continue s; } - _r$2 = data.Less(pivot, c - 1 >> 0); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$2 = _r$2; case 19: - /* if (!(_v$2)) { break; } */ if(!(_v$2)) { $s = 18; continue; } - c = c - (1) >> 0; - $s = 17; continue; - case 18: - if (b >= c) { - /* break; */ $s = 12; continue; - } - $r = data.Swap(b, c - 1 >> 0); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = b + (1) >> 0; - c = c - (1) >> 0; - $s = 11; continue; - case 12: - protect = (hi - c >> 0) < 5; - /* */ if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { */ case 22: - dups = 0; - _r$3 = data.Less(pivot, hi - 1 >> 0); /* */ $s = 26; case 26: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!_r$3) { */ case 24: - $r = data.Swap(c, hi - 1 >> 0); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - c = c + (1) >> 0; - dups = dups + (1) >> 0; - /* } */ case 25: - _r$4 = data.Less(b - 1 >> 0, pivot); /* */ $s = 30; case 30: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!_r$4) { */ case 28: - b = b - (1) >> 0; - dups = dups + (1) >> 0; - /* } */ case 29: - _r$5 = data.Less(m, pivot); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!_r$5) { */ case 31: - $r = data.Swap(m, b - 1 >> 0); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = b - (1) >> 0; - dups = dups + (1) >> 0; - /* } */ case 32: - protect = dups > 1; - /* } */ case 23: - /* */ if (protect) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (protect) { */ case 35: - /* while (true) { */ case 37: - /* while (true) { */ case 39: - if (!(a < b)) { _v$3 = false; $s = 41; continue s; } - _r$6 = data.Less(b - 1 >> 0, pivot); /* */ $s = 42; case 42: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v$3 = !_r$6; case 41: - /* if (!(_v$3)) { break; } */ if(!(_v$3)) { $s = 40; continue; } - b = b - (1) >> 0; - $s = 39; continue; - case 40: - /* while (true) { */ case 43: - if (!(a < b)) { _v$4 = false; $s = 45; continue s; } - _r$7 = data.Less(a, pivot); /* */ $s = 46; case 46: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v$4 = _r$7; case 45: - /* if (!(_v$4)) { break; } */ if(!(_v$4)) { $s = 44; continue; } - a = a + (1) >> 0; - $s = 43; continue; - case 44: - if (a >= b) { - /* break; */ $s = 38; continue; - } - $r = data.Swap(a, b - 1 >> 0); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - a = a + (1) >> 0; - b = b - (1) >> 0; - $s = 37; continue; - case 38: - /* } */ case 36: - $r = data.Swap(pivot, b - 1 >> 0); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = b - 1 >> 0; - _tmp$3 = c; - midlo = _tmp$2; - midhi = _tmp$3; - $s = -1; return [midlo, midhi]; - /* */ } return; } var $f = {$blk: doPivot_func, $c: true, $r, _q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s};return $f; - }; - quickSort_func = function(data, a, b, maxDepth$1) { - var {_r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s, $r, $c} = $restore(this, {data, a, b, maxDepth$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - /* if (!((b - a >> 0) > 12)) { break; } */ if(!((b - a >> 0) > 12)) { $s = 2; continue; } - /* */ if (maxDepth$1 === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (maxDepth$1 === 0) { */ case 3: - $r = heapSort_func($clone(data, lessSwap), a, b); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 4: - maxDepth$1 = maxDepth$1 - (1) >> 0; - _r = doPivot_func($clone(data, lessSwap), a, b); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - mlo = _tuple[0]; - mhi = _tuple[1]; - /* */ if ((mlo - a >> 0) < (b - mhi >> 0)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((mlo - a >> 0) < (b - mhi >> 0)) { */ case 7: - $r = quickSort_func($clone(data, lessSwap), a, mlo, maxDepth$1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - a = mhi; - $s = 9; continue; - /* } else { */ case 8: - $r = quickSort_func($clone(data, lessSwap), mhi, b, maxDepth$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = mlo; - /* } */ case 9: - $s = 1; continue; - case 2: - /* */ if ((b - a >> 0) > 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ((b - a >> 0) > 1) { */ case 12: - i = a + 6 >> 0; - /* while (true) { */ case 14: - /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 15; continue; } - _r$1 = data.Less(i, i - 6 >> 0); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_r$1) { */ case 16: - $r = data.Swap(i, i - 6 >> 0); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - i = i + (1) >> 0; - $s = 14; continue; - case 15: - $r = insertionSort_func($clone(data, lessSwap), a, b); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - $s = -1; return; - /* */ } return; } var $f = {$blk: quickSort_func, $c: true, $r, _r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s};return $f; - }; - insertionSort = function(data, a, b) { - var {_r, _v, a, b, data, i, j, $s, $r, $c} = $restore(this, {data, a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = a + 1 >> 0; - /* while (true) { */ case 1: - /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 2; continue; } - j = i; - /* while (true) { */ case 3: - if (!(j > a)) { _v = false; $s = 5; continue s; } - _r = data.Less(j, j - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 5: - /* if (!(_v)) { break; } */ if(!(_v)) { $s = 4; continue; } - $r = data.Swap(j, j - 1 >> 0); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - j = j - (1) >> 0; - $s = 3; continue; - case 4: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: insertionSort, $c: true, $r, _r, _v, a, b, data, i, j, $s};return $f; - }; - siftDown = function(data, lo, hi, first) { - var {_r, _r$1, _v, child, data, first, hi, lo, root, $s, $r, $c} = $restore(this, {data, lo, hi, first}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - root = lo; - /* while (true) { */ case 1: - child = ($imul(2, root)) + 1 >> 0; - if (child >= hi) { - /* break; */ $s = 2; continue; - } - if (!((child + 1 >> 0) < hi)) { _v = false; $s = 5; continue s; } - _r = data.Less(first + child >> 0, (first + child >> 0) + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 5: - /* */ if (_v) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 3: - child = child + (1) >> 0; - /* } */ case 4: - _r$1 = data.Less(first + root >> 0, first + child >> 0); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!_r$1) { */ case 7: - $s = -1; return; - /* } */ case 8: - $r = data.Swap(first + root >> 0, first + child >> 0); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - root = child; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: siftDown, $c: true, $r, _r, _r$1, _v, child, data, first, hi, lo, root, $s};return $f; - }; - heapSort = function(data, a, b) { - var {_q, a, b, data, first, hi, i, i$1, lo, $s, $r, $c} = $restore(this, {data, a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - first = a; - lo = 0; - hi = b - a >> 0; - i = (_q = ((hi - 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - /* while (true) { */ case 1: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 2; continue; } - $r = siftDown(data, i, hi, first); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i - (1) >> 0; - $s = 1; continue; - case 2: - i$1 = hi - 1 >> 0; - /* while (true) { */ case 4: - /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 5; continue; } - $r = data.Swap(first, first + i$1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = siftDown(data, lo, i$1, first); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$1 = i$1 - (1) >> 0; - $s = 4; continue; - case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: heapSort, $c: true, $r, _q, a, b, data, first, hi, i, i$1, lo, $s};return $f; - }; - medianOfThree = function(data, m1, m0, m2) { - var {_r, _r$1, _r$2, data, m0, m1, m2, $s, $r, $c} = $restore(this, {data, m1, m0, m2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = data.Less(m1, m0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r) { */ case 1: - $r = data.Swap(m1, m0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = data.Less(m2, m1); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$1) { */ case 5: - $r = data.Swap(m2, m1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = data.Less(m1, m0); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$2) { */ case 9: - $r = data.Swap(m1, m0); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: medianOfThree, $c: true, $r, _r, _r$1, _r$2, data, m0, m1, m2, $s};return $f; - }; - swapRange = function(data, a, b, n) { - var {a, b, data, i, n, $s, $r, $c} = $restore(this, {data, a, b, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = 0; - /* while (true) { */ case 1: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } - $r = data.Swap(a + i >> 0, b + i >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: swapRange, $c: true, $r, a, b, data, i, n, $s};return $f; - }; - doPivot = function(data, lo, hi) { - var {_q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s, $r, $c} = $restore(this, {data, lo, hi}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - midlo = 0; - midhi = 0; - m = ((((((lo + hi >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - /* */ if ((hi - lo >> 0) > 40) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((hi - lo >> 0) > 40) { */ case 1: - s = (_q = ((hi - lo >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - $r = medianOfThree(data, lo, lo + s >> 0, lo + ($imul(2, s)) >> 0); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = medianOfThree(data, m, m - s >> 0, m + s >> 0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = medianOfThree(data, hi - 1 >> 0, (hi - 1 >> 0) - s >> 0, (hi - 1 >> 0) - ($imul(2, s)) >> 0); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $r = medianOfThree(data, lo, m, hi - 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pivot = lo; - _tmp = lo + 1 >> 0; - _tmp$1 = hi - 1 >> 0; - a = _tmp; - c = _tmp$1; - /* while (true) { */ case 7: - if (!(a < c)) { _v = false; $s = 9; continue s; } - _r = data.Less(a, pivot); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 9: - /* if (!(_v)) { break; } */ if(!(_v)) { $s = 8; continue; } - a = a + (1) >> 0; - $s = 7; continue; - case 8: - b = a; - /* while (true) { */ case 11: - /* while (true) { */ case 13: - if (!(b < c)) { _v$1 = false; $s = 15; continue s; } - _r$1 = data.Less(pivot, b); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = !_r$1; case 15: - /* if (!(_v$1)) { break; } */ if(!(_v$1)) { $s = 14; continue; } - b = b + (1) >> 0; - $s = 13; continue; - case 14: - /* while (true) { */ case 17: - if (!(b < c)) { _v$2 = false; $s = 19; continue s; } - _r$2 = data.Less(pivot, c - 1 >> 0); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$2 = _r$2; case 19: - /* if (!(_v$2)) { break; } */ if(!(_v$2)) { $s = 18; continue; } - c = c - (1) >> 0; - $s = 17; continue; - case 18: - if (b >= c) { - /* break; */ $s = 12; continue; - } - $r = data.Swap(b, c - 1 >> 0); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = b + (1) >> 0; - c = c - (1) >> 0; - $s = 11; continue; - case 12: - protect = (hi - c >> 0) < 5; - /* */ if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!protect && (hi - c >> 0) < (_q$1 = ((hi - lo >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) { */ case 22: - dups = 0; - _r$3 = data.Less(pivot, hi - 1 >> 0); /* */ $s = 26; case 26: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!_r$3) { */ case 24: - $r = data.Swap(c, hi - 1 >> 0); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - c = c + (1) >> 0; - dups = dups + (1) >> 0; - /* } */ case 25: - _r$4 = data.Less(b - 1 >> 0, pivot); /* */ $s = 30; case 30: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!_r$4) { */ case 28: - b = b - (1) >> 0; - dups = dups + (1) >> 0; - /* } */ case 29: - _r$5 = data.Less(m, pivot); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!_r$5) { */ case 31: - $r = data.Swap(m, b - 1 >> 0); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = b - (1) >> 0; - dups = dups + (1) >> 0; - /* } */ case 32: - protect = dups > 1; - /* } */ case 23: - /* */ if (protect) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (protect) { */ case 35: - /* while (true) { */ case 37: - /* while (true) { */ case 39: - if (!(a < b)) { _v$3 = false; $s = 41; continue s; } - _r$6 = data.Less(b - 1 >> 0, pivot); /* */ $s = 42; case 42: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v$3 = !_r$6; case 41: - /* if (!(_v$3)) { break; } */ if(!(_v$3)) { $s = 40; continue; } - b = b - (1) >> 0; - $s = 39; continue; - case 40: - /* while (true) { */ case 43: - if (!(a < b)) { _v$4 = false; $s = 45; continue s; } - _r$7 = data.Less(a, pivot); /* */ $s = 46; case 46: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v$4 = _r$7; case 45: - /* if (!(_v$4)) { break; } */ if(!(_v$4)) { $s = 44; continue; } - a = a + (1) >> 0; - $s = 43; continue; - case 44: - if (a >= b) { - /* break; */ $s = 38; continue; - } - $r = data.Swap(a, b - 1 >> 0); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - a = a + (1) >> 0; - b = b - (1) >> 0; - $s = 37; continue; - case 38: - /* } */ case 36: - $r = data.Swap(pivot, b - 1 >> 0); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = b - 1 >> 0; - _tmp$3 = c; - midlo = _tmp$2; - midhi = _tmp$3; - $s = -1; return [midlo, midhi]; - /* */ } return; } var $f = {$blk: doPivot, $c: true, $r, _q, _q$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, _v$2, _v$3, _v$4, a, b, c, data, dups, hi, lo, m, midhi, midlo, pivot, protect, s, $s};return $f; - }; - quickSort = function(data, a, b, maxDepth$1) { - var {_r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s, $r, $c} = $restore(this, {data, a, b, maxDepth$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - /* if (!((b - a >> 0) > 12)) { break; } */ if(!((b - a >> 0) > 12)) { $s = 2; continue; } - /* */ if (maxDepth$1 === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (maxDepth$1 === 0) { */ case 3: - $r = heapSort(data, a, b); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 4: - maxDepth$1 = maxDepth$1 - (1) >> 0; - _r = doPivot(data, a, b); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - mlo = _tuple[0]; - mhi = _tuple[1]; - /* */ if ((mlo - a >> 0) < (b - mhi >> 0)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((mlo - a >> 0) < (b - mhi >> 0)) { */ case 7: - $r = quickSort(data, a, mlo, maxDepth$1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - a = mhi; - $s = 9; continue; - /* } else { */ case 8: - $r = quickSort(data, mhi, b, maxDepth$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = mlo; - /* } */ case 9: - $s = 1; continue; - case 2: - /* */ if ((b - a >> 0) > 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ((b - a >> 0) > 1) { */ case 12: - i = a + 6 >> 0; - /* while (true) { */ case 14: - /* if (!(i < b)) { break; } */ if(!(i < b)) { $s = 15; continue; } - _r$1 = data.Less(i, i - 6 >> 0); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_r$1) { */ case 16: - $r = data.Swap(i, i - 6 >> 0); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - i = i + (1) >> 0; - $s = 14; continue; - case 15: - $r = insertionSort(data, a, b); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - $s = -1; return; - /* */ } return; } var $f = {$blk: quickSort, $c: true, $r, _r, _r$1, _tuple, a, b, data, i, maxDepth$1, mhi, mlo, $s};return $f; - }; - Sort = function(data) { - var {_r, data, n, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = data.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - n = _r; - $r = quickSort(data, 0, n, maxDepth(n)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Sort, $c: true, $r, _r, data, n, $s};return $f; - }; - $pkg.Sort = Sort; - maxDepth = function(n) { - var depth, i, n; - depth = 0; - i = n; - while (true) { - if (!(i > 0)) { break; } - depth = depth + (1) >> 0; - i = (i >> $min((1), 31)) >> 0; - } - return $imul(depth, 2); - }; - IntSlice.prototype.Len = function() { - var x; - x = this; - return x.$length; - }; - $ptrType(IntSlice).prototype.Len = function() { return this.$get().Len(); }; - IntSlice.prototype.Less = function(i, j) { - var i, j, x; - x = this; - return ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) < ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]); - }; - $ptrType(IntSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; - IntSlice.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, x; - x = this; - _tmp = ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]); - _tmp$1 = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]); - ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = _tmp); - ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j] = _tmp$1); - }; - $ptrType(IntSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; - IntSlice.prototype.Sort = function() { - var {x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - $r = Sort(x); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: IntSlice.prototype.Sort, $c: true, $r, x, $s};return $f; - }; - $ptrType(IntSlice).prototype.Sort = function() { return this.$get().Sort(); }; - StringSlice.prototype.Len = function() { - var x; - x = this; - return x.$length; - }; - $ptrType(StringSlice).prototype.Len = function() { return this.$get().Len(); }; - StringSlice.prototype.Less = function(i, j) { - var i, j, x; - x = this; - return ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) < ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]); - }; - $ptrType(StringSlice).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; - StringSlice.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, x; - x = this; - _tmp = ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]); - _tmp$1 = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]); - ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = _tmp); - ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j] = _tmp$1); - }; - $ptrType(StringSlice).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; - StringSlice.prototype.Sort = function() { - var {x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - $r = Sort(x); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: StringSlice.prototype.Sort, $c: true, $r, x, $s};return $f; - }; - $ptrType(StringSlice).prototype.Sort = function() { return this.$get().Sort(); }; - Ints = function(x) { - var {x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = Sort(($convertSliceType(x, IntSlice))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Ints, $c: true, $r, x, $s};return $f; - }; - $pkg.Ints = Ints; - Strings = function(x) { - var {x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = Sort(($convertSliceType(x, StringSlice))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Strings, $c: true, $r, x, $s};return $f; - }; - $pkg.Strings = Strings; - Stable = function(data) { - var {_arg, _arg$1, _r, data, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = data; - _r = data.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - $r = stable(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Stable, $c: true, $r, _arg, _arg$1, _r, data, $s};return $f; - }; - $pkg.Stable = Stable; - stable = function(data, n) { - var {_tmp, _tmp$1, _tmp$2, _tmp$3, a, b, blockSize, data, m, n, $s, $r, $c} = $restore(this, {data, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - blockSize = 20; - _tmp = 0; - _tmp$1 = blockSize; - a = _tmp; - b = _tmp$1; - /* while (true) { */ case 1: - /* if (!(b <= n)) { break; } */ if(!(b <= n)) { $s = 2; continue; } - $r = insertionSort(data, a, b); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - a = b; - b = b + (blockSize) >> 0; - $s = 1; continue; - case 2: - $r = insertionSort(data, a, n); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* while (true) { */ case 5: - /* if (!(blockSize < n)) { break; } */ if(!(blockSize < n)) { $s = 6; continue; } - _tmp$2 = 0; - _tmp$3 = $imul(2, blockSize); - a = _tmp$2; - b = _tmp$3; - /* while (true) { */ case 7: - /* if (!(b <= n)) { break; } */ if(!(b <= n)) { $s = 8; continue; } - $r = symMerge(data, a, a + blockSize >> 0, b); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - a = b; - b = b + (($imul(2, blockSize))) >> 0; - $s = 7; continue; - case 8: - m = a + blockSize >> 0; - /* */ if (m < n) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (m < n) { */ case 10: - $r = symMerge(data, a, m, n); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - blockSize = $imul(blockSize, (2)); - $s = 5; continue; - case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: stable, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, blockSize, data, m, n, $s};return $f; - }; - symMerge = function(data, a, m, b) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, a, b, c, data, end, h, h$1, i, i$1, j, j$1, k, k$1, m, mid, n, p, r, start, $s, $r, $c} = $restore(this, {data, a, m, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ((m - a >> 0) === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((m - a >> 0) === 1) { */ case 1: - i = m; - j = b; - /* while (true) { */ case 3: - /* if (!(i < j)) { break; } */ if(!(i < j)) { $s = 4; continue; } - h = ((((((i + j >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - _r = data.Less(h, a); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r) { */ case 5: - i = h + 1 >> 0; - $s = 7; continue; - /* } else { */ case 6: - j = h; - /* } */ case 7: - $s = 3; continue; - case 4: - k = a; - /* while (true) { */ case 9: - /* if (!(k < (i - 1 >> 0))) { break; } */ if(!(k < (i - 1 >> 0))) { $s = 10; continue; } - $r = data.Swap(k, k + 1 >> 0); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - k = k + (1) >> 0; - $s = 9; continue; - case 10: - $s = -1; return; - /* } */ case 2: - /* */ if ((b - m >> 0) === 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ((b - m >> 0) === 1) { */ case 12: - i$1 = a; - j$1 = m; - /* while (true) { */ case 14: - /* if (!(i$1 < j$1)) { break; } */ if(!(i$1 < j$1)) { $s = 15; continue; } - h$1 = ((((((i$1 + j$1 >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - _r$1 = data.Less(m, h$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!_r$1) { */ case 16: - i$1 = h$1 + 1 >> 0; - $s = 18; continue; - /* } else { */ case 17: - j$1 = h$1; - /* } */ case 18: - $s = 14; continue; - case 15: - k$1 = m; - /* while (true) { */ case 20: - /* if (!(k$1 > i$1)) { break; } */ if(!(k$1 > i$1)) { $s = 21; continue; } - $r = data.Swap(k$1, k$1 - 1 >> 0); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - k$1 = k$1 - (1) >> 0; - $s = 20; continue; - case 21: - $s = -1; return; - /* } */ case 13: - mid = ((((((a + b >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - n = mid + m >> 0; - _tmp = 0; - _tmp$1 = 0; - start = _tmp; - r = _tmp$1; - if (m > mid) { - start = n - b >> 0; - r = mid; - } else { - start = a; - r = m; - } - p = n - 1 >> 0; - /* while (true) { */ case 23: - /* if (!(start < r)) { break; } */ if(!(start < r)) { $s = 24; continue; } - c = ((((((start + r >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - _r$2 = data.Less(p - c >> 0, c); /* */ $s = 28; case 28: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!_r$2) { */ case 25: - start = c + 1 >> 0; - $s = 27; continue; - /* } else { */ case 26: - r = c; - /* } */ case 27: - $s = 23; continue; - case 24: - end = n - start >> 0; - /* */ if (start < m && m < end) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (start < m && m < end) { */ case 29: - $r = rotate(data, start, m, end); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 30: - /* */ if (a < start && start < mid) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (a < start && start < mid) { */ case 32: - $r = symMerge(data, a, start, mid); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 33: - /* */ if (mid < end && end < b) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (mid < end && end < b) { */ case 35: - $r = symMerge(data, mid, end, b); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 36: - $s = -1; return; - /* */ } return; } var $f = {$blk: symMerge, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, a, b, c, data, end, h, h$1, i, i$1, j, j$1, k, k$1, m, mid, n, p, r, start, $s};return $f; - }; - rotate = function(data, a, m, b) { - var {a, b, data, i, j, m, $s, $r, $c} = $restore(this, {data, a, m, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = m - a >> 0; - j = b - m >> 0; - /* while (true) { */ case 1: - /* if (!(!((i === j)))) { break; } */ if(!(!((i === j)))) { $s = 2; continue; } - /* */ if (i > j) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (i > j) { */ case 3: - $r = swapRange(data, m - i >> 0, m, j); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i - (j) >> 0; - $s = 5; continue; - /* } else { */ case 4: - $r = swapRange(data, m - i >> 0, (m + j >> 0) - i >> 0, i); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - j = j - (i) >> 0; - /* } */ case 5: - $s = 1; continue; - case 2: - $r = swapRange(data, m - i >> 0, m, i); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: rotate, $c: true, $r, a, b, data, i, j, m, $s};return $f; - }; - Slice = function(x, less) { - var {_r, _r$1, length, less, rv, swap, x, $s, $r, $c} = $restore(this, {x, less}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = reflectValueOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - rv = $clone(_r, reflectlite.Value); - _r$1 = reflectSwapper(x); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - swap = _r$1; - length = $clone(rv, reflectlite.Value).Len(); - $r = quickSort_func(new lessSwap.ptr(less, swap), 0, length, maxDepth(length)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Slice, $c: true, $r, _r, _r$1, length, less, rv, swap, x, $s};return $f; - }; - $pkg.Slice = Slice; - Search = function(n, f) { - var {_r, _tmp, _tmp$1, f, h, i, j, n, $s, $r, $c} = $restore(this, {n, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = 0; - _tmp$1 = n; - i = _tmp; - j = _tmp$1; - /* while (true) { */ case 1: - /* if (!(i < j)) { break; } */ if(!(i < j)) { $s = 2; continue; } - h = ((((((i + j >> 0) >>> 0)) >>> 1 >>> 0) >> 0)); - _r = f(h); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r) { */ case 3: - i = h + 1 >> 0; - $s = 5; continue; - /* } else { */ case 4: - j = h; - /* } */ case 5: - $s = 1; continue; - case 2: - $s = -1; return i; - /* */ } return; } var $f = {$blk: Search, $c: true, $r, _r, _tmp, _tmp$1, f, h, i, j, n, $s};return $f; - }; - $pkg.Search = Search; - SearchInts = function(a, x) { - var {$24r, _r, a, x, $s, $r, $c} = $restore(this, {a, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - x = [x]; - _r = Search(a[0].$length, (function(a, x) { return function(i) { - var i; - return ((i < 0 || i >= a[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : a[0].$array[a[0].$offset + i]) >= x[0]; - }; })(a, x)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: SearchInts, $c: true, $r, $24r, _r, a, x, $s};return $f; - }; - $pkg.SearchInts = SearchInts; - SearchStrings = function(a, x) { - var {$24r, _r, a, x, $s, $r, $c} = $restore(this, {a, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - x = [x]; - _r = Search(a[0].$length, (function(a, x) { return function(i) { - var i; - return ((i < 0 || i >= a[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : a[0].$array[a[0].$offset + i]) >= x[0]; - }; })(a, x)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: SearchStrings, $c: true, $r, $24r, _r, a, x, $s};return $f; - }; - $pkg.SearchStrings = SearchStrings; - IntSlice.prototype.Search = function(x) { - var {$24r, _r, p, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = SearchInts($convertSliceType(p, sliceType), x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: IntSlice.prototype.Search, $c: true, $r, $24r, _r, p, x, $s};return $f; - }; - $ptrType(IntSlice).prototype.Search = function(x) { return this.$get().Search(x); }; - StringSlice.prototype.Search = function(x) { - var {$24r, _r, p, x, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = SearchStrings($convertSliceType(p, sliceType$2), x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: StringSlice.prototype.Search, $c: true, $r, $24r, _r, p, x, $s};return $f; - }; - $ptrType(StringSlice).prototype.Search = function(x) { return this.$get().Search(x); }; - IntSlice.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}, {prop: "Search", name: "Search", pkg: "", typ: $funcType([$Int], [$Int], false)}]; - StringSlice.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Sort", name: "Sort", pkg: "", typ: $funcType([], [], false)}, {prop: "Search", name: "Search", pkg: "", typ: $funcType([$String], [$Int], false)}]; - lessSwap.init("", [{prop: "Less", name: "Less", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Swap", name: "Swap", embedded: false, exported: true, typ: funcType$1, tag: ""}]); - IntSlice.init($Int); - StringSlice.init($String); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = reflectlite.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - reflectValueOf = reflectlite.ValueOf; - reflectSwapper = reflectlite.Swapper; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/fmtsort"] = (function() { - var $pkg = {}, $init, reflect, sort, SortedMap, ptrType, sliceType, Sort, compare, nilCompare, floatCompare, isNaN; - reflect = $packages["reflect"]; - sort = $packages["sort"]; - SortedMap = $pkg.SortedMap = $newType(0, $kindStruct, "fmtsort.SortedMap", true, "internal/fmtsort", true, function(Key_, Value_) { - this.$val = this; - if (arguments.length === 0) { - this.Key = sliceType.nil; - this.Value = sliceType.nil; - return; - } - this.Key = Key_; - this.Value = Value_; - }); - ptrType = $ptrType(SortedMap); - sliceType = $sliceType(reflect.Value); - SortedMap.ptr.prototype.Len = function() { - var o; - o = this; - return o.Key.$length; - }; - SortedMap.prototype.Len = function() { return this.$val.Len(); }; - SortedMap.ptr.prototype.Less = function(i, j) { - var {$24r, _r, i, j, o, x, x$1, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r = compare($clone((x = o.Key, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])), reflect.Value), $clone((x$1 = o.Key, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])), reflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r < 0; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: SortedMap.ptr.prototype.Less, $c: true, $r, $24r, _r, i, j, o, x, x$1, $s};return $f; - }; - SortedMap.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; - SortedMap.ptr.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, i, j, o, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; - o = this; - _tmp = (x = o.Key, ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j])); - _tmp$1 = (x$1 = o.Key, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - (x$2 = o.Key, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = _tmp)); - (x$3 = o.Key, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j] = _tmp$1)); - _tmp$2 = (x$4 = o.Value, ((j < 0 || j >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + j])); - _tmp$3 = (x$5 = o.Value, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])); - (x$6 = o.Value, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i] = _tmp$2)); - (x$7 = o.Value, ((j < 0 || j >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + j] = _tmp$3)); - }; - SortedMap.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; - Sort = function(mapValue) { - var {_r, _r$1, _r$2, _r$3, iter, key, mapValue, n, sorted, value, $s, $r, $c} = $restore(this, {mapValue}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(mapValue, reflect.Value).Type().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 21))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 21))) { */ case 1: - $s = -1; return ptrType.nil; - /* } */ case 2: - n = $clone(mapValue, reflect.Value).Len(); - key = $makeSlice(sliceType, 0, n); - value = $makeSlice(sliceType, 0, n); - iter = $clone(mapValue, reflect.Value).MapRange(); - /* while (true) { */ case 4: - _r$1 = iter.Next(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* if (!(_r$1)) { break; } */ if(!(_r$1)) { $s = 5; continue; } - _r$2 = iter.Key(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - key = $append(key, _r$2); - _r$3 = iter.Value(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - value = $append(value, _r$3); - $s = 4; continue; - case 5: - sorted = new SortedMap.ptr(key, value); - $r = sort.Stable(sorted); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return sorted; - /* */ } return; } var $f = {$blk: Sort, $c: true, $r, _r, _r$1, _r$2, _r$3, iter, key, mapValue, n, sorted, value, $s};return $f; - }; - $pkg.Sort = Sort; - compare = function(aVal, bVal) { - var {$24r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, a, a$1, a$2, a$3, a$4, a$5, aType, aVal, ap, b, b$1, b$2, b$3, b$4, b$5, bType, bVal, bp, c, c$1, c$2, c$3, c$4, c$5, i, i$1, ok, ok$1, $s, $r, $c} = $restore(this, {aVal, bVal}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = $clone(aVal, reflect.Value).Type(); - _tmp$1 = $clone(bVal, reflect.Value).Type(); - aType = _tmp; - bType = _tmp$1; - if (!($interfaceIsEqual(aType, bType))) { - $s = -1; return -1; - } - _1 = $clone(aVal, reflect.Value).Kind(); - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 2; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 3; continue; } - /* */ if (_1 === (24)) { $s = 4; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 5; continue; } - /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 6; continue; } - /* */ if (_1 === (1)) { $s = 7; continue; } - /* */ if ((_1 === (22)) || (_1 === (26))) { $s = 8; continue; } - /* */ if (_1 === (18)) { $s = 9; continue; } - /* */ if (_1 === (25)) { $s = 10; continue; } - /* */ if (_1 === (17)) { $s = 11; continue; } - /* */ if (_1 === (20)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 2: - _tmp$2 = $clone(aVal, reflect.Value).Int(); - _tmp$3 = $clone(bVal, reflect.Value).Int(); - a = _tmp$2; - b = _tmp$3; - if ((a.$high < b.$high || (a.$high === b.$high && a.$low < b.$low))) { - $s = -1; return -1; - } else if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) { - $s = -1; return 1; - } else { - $s = -1; return 0; - } - $s = 14; continue; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 3: - _tmp$4 = $clone(aVal, reflect.Value).Uint(); - _tmp$5 = $clone(bVal, reflect.Value).Uint(); - a$1 = _tmp$4; - b$1 = _tmp$5; - if ((a$1.$high < b$1.$high || (a$1.$high === b$1.$high && a$1.$low < b$1.$low))) { - $s = -1; return -1; - } else if ((a$1.$high > b$1.$high || (a$1.$high === b$1.$high && a$1.$low > b$1.$low))) { - $s = -1; return 1; - } else { - $s = -1; return 0; - } - $s = 14; continue; - /* } else if (_1 === (24)) { */ case 4: - _r = $clone(aVal, reflect.Value).String(); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$6 = _r; - _r$1 = $clone(bVal, reflect.Value).String(); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$7 = _r$1; - a$2 = _tmp$6; - b$2 = _tmp$7; - if (a$2 < b$2) { - $s = -1; return -1; - } else if (a$2 > b$2) { - $s = -1; return 1; - } else { - $s = -1; return 0; - } - $s = 14; continue; - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 5: - $s = -1; return floatCompare($clone(aVal, reflect.Value).Float(), $clone(bVal, reflect.Value).Float()); - /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 6: - _tmp$8 = $clone(aVal, reflect.Value).Complex(); - _tmp$9 = $clone(bVal, reflect.Value).Complex(); - a$3 = _tmp$8; - b$3 = _tmp$9; - c = floatCompare(a$3.$real, b$3.$real); - if (!((c === 0))) { - $s = -1; return c; - } - $s = -1; return floatCompare(a$3.$imag, b$3.$imag); - /* } else if (_1 === (1)) { */ case 7: - _tmp$10 = $clone(aVal, reflect.Value).Bool(); - _tmp$11 = $clone(bVal, reflect.Value).Bool(); - a$4 = _tmp$10; - b$4 = _tmp$11; - if (a$4 === b$4) { - $s = -1; return 0; - } else if (a$4) { - $s = -1; return 1; - } else { - $s = -1; return -1; - } - $s = 14; continue; - /* } else if ((_1 === (22)) || (_1 === (26))) { */ case 8: - _tmp$12 = $clone(aVal, reflect.Value).Pointer(); - _tmp$13 = $clone(bVal, reflect.Value).Pointer(); - a$5 = _tmp$12; - b$5 = _tmp$13; - if (a$5 < b$5) { - $s = -1; return -1; - } else if (a$5 > b$5) { - $s = -1; return 1; - } else { - $s = -1; return 0; - } - $s = 14; continue; - /* } else if (_1 === (18)) { */ case 9: - _tuple = nilCompare($clone(aVal, reflect.Value), $clone(bVal, reflect.Value)); - c$1 = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return c$1; - } - _tmp$14 = $clone(aVal, reflect.Value).Pointer(); - _tmp$15 = $clone(bVal, reflect.Value).Pointer(); - ap = _tmp$14; - bp = _tmp$15; - if (ap < bp) { - $s = -1; return -1; - } else if (ap > bp) { - $s = -1; return 1; - } else { - $s = -1; return 0; - } - $s = 14; continue; - /* } else if (_1 === (25)) { */ case 10: - i = 0; - /* while (true) { */ case 17: - /* if (!(i < $clone(aVal, reflect.Value).NumField())) { break; } */ if(!(i < $clone(aVal, reflect.Value).NumField())) { $s = 18; continue; } - _r$2 = $clone(aVal, reflect.Value).Field(i); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg = $clone(_r$2, reflect.Value); - _r$3 = $clone(bVal, reflect.Value).Field(i); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$3, reflect.Value); - _r$4 = compare(_arg, _arg$1); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - c$2 = _r$4; - if (!((c$2 === 0))) { - $s = -1; return c$2; - } - i = i + (1) >> 0; - $s = 17; continue; - case 18: - $s = -1; return 0; - /* } else if (_1 === (17)) { */ case 11: - i$1 = 0; - /* while (true) { */ case 22: - /* if (!(i$1 < $clone(aVal, reflect.Value).Len())) { break; } */ if(!(i$1 < $clone(aVal, reflect.Value).Len())) { $s = 23; continue; } - _r$5 = $clone(aVal, reflect.Value).Index(i$1); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$2 = $clone(_r$5, reflect.Value); - _r$6 = $clone(bVal, reflect.Value).Index(i$1); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$6, reflect.Value); - _r$7 = compare(_arg$2, _arg$3); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - c$3 = _r$7; - if (!((c$3 === 0))) { - $s = -1; return c$3; - } - i$1 = i$1 + (1) >> 0; - $s = 22; continue; - case 23: - $s = -1; return 0; - /* } else if (_1 === (20)) { */ case 12: - _tuple$1 = nilCompare($clone(aVal, reflect.Value), $clone(bVal, reflect.Value)); - c$4 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return c$4; - } - _r$8 = $clone(aVal, reflect.Value).Elem(); /* */ $s = 27; case 27: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Type(); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = reflect.ValueOf(_r$9); /* */ $s = 29; case 29: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$4 = $clone(_r$10, reflect.Value); - _r$11 = $clone(bVal, reflect.Value).Elem(); /* */ $s = 30; case 30: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).Type(); /* */ $s = 31; case 31: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = reflect.ValueOf(_r$12); /* */ $s = 32; case 32: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$5 = $clone(_r$13, reflect.Value); - _r$14 = compare(_arg$4, _arg$5); /* */ $s = 33; case 33: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - c$5 = _r$14; - if (!((c$5 === 0))) { - $s = -1; return c$5; - } - _r$15 = $clone(aVal, reflect.Value).Elem(); /* */ $s = 34; case 34: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$6 = $clone(_r$15, reflect.Value); - _r$16 = $clone(bVal, reflect.Value).Elem(); /* */ $s = 35; case 35: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg$7 = $clone(_r$16, reflect.Value); - _r$17 = compare(_arg$6, _arg$7); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 37; case 37: return $24r; - /* } else { */ case 13: - _r$18 = aType.String(); /* */ $s = 38; case 38: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $panic(new $String("bad type in compare: " + _r$18)); - /* } */ case 14: - case 1: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: compare, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, a, a$1, a$2, a$3, a$4, a$5, aType, aVal, ap, b, b$1, b$2, b$3, b$4, b$5, bType, bVal, bp, c, c$1, c$2, c$3, c$4, c$5, i, i$1, ok, ok$1, $s};return $f; - }; - nilCompare = function(aVal, bVal) { - var aVal, bVal; - if ($clone(aVal, reflect.Value).IsNil()) { - if ($clone(bVal, reflect.Value).IsNil()) { - return [0, true]; - } - return [-1, true]; - } - if ($clone(bVal, reflect.Value).IsNil()) { - return [1, true]; - } - return [0, false]; - }; - floatCompare = function(a, b) { - var a, b; - if (isNaN(a)) { - return -1; - } else if (isNaN(b)) { - return 1; - } else if (a < b) { - return -1; - } else if (a > b) { - return 1; - } - return 0; - }; - isNaN = function(a) { - var a; - return !((a === a)); - }; - ptrType.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}]; - SortedMap.init("", [{prop: "Key", name: "Key", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: sliceType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = reflect.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/oserror"] = (function() { - var $pkg = {}, $init, errors; - errors = $packages["errors"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrInvalid = errors.New("invalid argument"); - $pkg.ErrPermission = errors.New("permission denied"); - $pkg.ErrExist = errors.New("file already exists"); - $pkg.ErrNotExist = errors.New("file does not exist"); - $pkg.ErrClosed = errors.New("file already closed"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["syscall/js"] = (function() { - var $pkg = {}, $init, js, Type, Func, Error, Value, ValueError, funcType, arrayType, sliceType, mapType, sliceType$1, ptrType, sliceType$2, ptrType$1, ptrType$2, id, instanceOf, getValueType, Global, Null, Undefined, FuncOf, objectToValue, init, ValueOf, convertArgs, convertJSError, CopyBytesToGo, CopyBytesToJS; - js = $packages["github.com/gopherjs/gopherjs/js"]; - Type = $pkg.Type = $newType(4, $kindInt, "js.Type", true, "syscall/js", true, null); - Func = $pkg.Func = $newType(0, $kindStruct, "js.Func", true, "syscall/js", true, function(Value_) { - this.$val = this; - if (arguments.length === 0) { - this.Value = new Value.ptr(null, false, arrayType.zero()); - return; - } - this.Value = Value_; - }); - Error = $pkg.Error = $newType(0, $kindStruct, "js.Error", true, "syscall/js", true, function(Value_) { - this.$val = this; - if (arguments.length === 0) { - this.Value = new Value.ptr(null, false, arrayType.zero()); - return; - } - this.Value = Value_; - }); - Value = $pkg.Value = $newType(0, $kindStruct, "js.Value", true, "syscall/js", true, function(v_, inited_, _$2_) { - this.$val = this; - if (arguments.length === 0) { - this.v = null; - this.inited = false; - this._$2 = arrayType.zero(); - return; - } - this.v = v_; - this.inited = inited_; - this._$2 = _$2_; - }); - ValueError = $pkg.ValueError = $newType(0, $kindStruct, "js.ValueError", true, "syscall/js", true, function(Method_, Type_) { - this.$val = this; - if (arguments.length === 0) { - this.Method = ""; - this.Type = 0; - return; - } - this.Method = Method_; - this.Type = Type_; - }); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - sliceType = $sliceType(Value); - mapType = $mapType($String, $emptyInterface); - sliceType$1 = $sliceType($emptyInterface); - ptrType = $ptrType(js.Error); - sliceType$2 = $sliceType($Uint8); - ptrType$1 = $ptrType(js.Object); - ptrType$2 = $ptrType(ValueError); - Type.prototype.String = function() { - var _1, t; - t = this.$val; - _1 = t; - if (_1 === (0)) { - return "undefined"; - } else if (_1 === (1)) { - return "null"; - } else if (_1 === (2)) { - return "boolean"; - } else if (_1 === (3)) { - return "number"; - } else if (_1 === (4)) { - return "string"; - } else if (_1 === (5)) { - return "symbol"; - } else if (_1 === (6)) { - return "object"; - } else if (_1 === (7)) { - return "function"; - } else { - $panic(new $String("bad type")); - } - }; - $ptrType(Type).prototype.String = function() { return new Type(this.$get()).String(); }; - Type.prototype.isObject = function() { - var t; - t = this.$val; - return (t === 6) || (t === 7); - }; - $ptrType(Type).prototype.isObject = function() { return new Type(this.$get()).isObject(); }; - Global = function() { - return objectToValue($global); - }; - $pkg.Global = Global; - Null = function() { - return objectToValue(null); - }; - $pkg.Null = Null; - Undefined = function() { - return objectToValue(undefined); - }; - $pkg.Undefined = Undefined; - Func.ptr.prototype.Release = function() { - var f; - f = this; - $exportedFunctions = ($parseInt($exportedFunctions) >> 0) - 1 >> 0; - Value.copy(f.Value, Null()); - }; - Func.prototype.Release = function() { return this.$val.Release(); }; - FuncOf = function(fn) { - var fn; - $exportedFunctions = ($parseInt($exportedFunctions) >> 0) + 1 >> 0; - return new Func.ptr($clone(objectToValue(js.MakeFunc((function $b(this$1, args) { - var {$24r, _i, _r, _ref, a, args, i, this$1, vargs, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vargs = $makeSlice(sliceType, args.$length); - _ref = args; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - a = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - Value.copy(((i < 0 || i >= vargs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vargs.$array[vargs.$offset + i]), objectToValue(a)); - _i++; - } - _r = fn($clone(objectToValue(this$1), Value), vargs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _i, _r, _ref, a, args, i, this$1, vargs, $s};return $f; - }))), Value)); - }; - $pkg.FuncOf = FuncOf; - Error.ptr.prototype.Error = function() { - var e; - e = this; - return "JavaScript error: " + $clone($clone(e.Value, Value).Get("message"), Value).String(); - }; - Error.prototype.Error = function() { return this.$val.Error(); }; - objectToValue = function(obj) { - var obj; - if (obj === undefined) { - return new Value.ptr(null, false, arrayType.zero()); - } - return new Value.ptr(obj, true, arrayType.zero()); - }; - init = function() { - if (!($global === null)) { - id = $global.eval($externalize("(function(x) { return x; })", $String)); - instanceOf = $global.eval($externalize("(function(x, y) { return x instanceof y; })", $String)); - getValueType = $global.eval($externalize("(function(x) {\n if (typeof(x) === \"undefined\") {\n return 0; // TypeUndefined\n }\n if (x === null) {\n return 1; // TypeNull\n }\n if (typeof(x) === \"boolean\") {\n return 2; // TypeBoolean\n }\n if (typeof(x) === \"number\") {\n return 3; // TypeNumber\n }\n if (typeof(x) === \"string\") {\n return 4; // TypeString\n }\n if (typeof(x) === \"symbol\") {\n return 5; // TypeSymbol\n }\n if (typeof(x) === \"function\") {\n return 7; // TypeFunction\n }\n return 6; // TypeObject\n})", $String)); - } - }; - ValueOf = function(x) { - var _ref, x, x$1, x$2, x$3, x$4, x$5; - _ref = x; - if ($assertType(_ref, Value, true)[1]) { - x$1 = $clone(_ref.$val, Value); - return x$1; - } else if ($assertType(_ref, Func, true)[1]) { - x$2 = $clone(_ref.$val, Func); - return x$2.Value; - } else if (_ref === $ifaceNil) { - x$3 = _ref; - return Null(); - } else if ($assertType(_ref, $Bool, true)[1] || $assertType(_ref, $Int, true)[1] || $assertType(_ref, $Int8, true)[1] || $assertType(_ref, $Int16, true)[1] || $assertType(_ref, $Int32, true)[1] || $assertType(_ref, $Int64, true)[1] || $assertType(_ref, $Uint, true)[1] || $assertType(_ref, $Uint8, true)[1] || $assertType(_ref, $Uint16, true)[1] || $assertType(_ref, $Uint32, true)[1] || $assertType(_ref, $Uint64, true)[1] || $assertType(_ref, $Float32, true)[1] || $assertType(_ref, $Float64, true)[1] || $assertType(_ref, $UnsafePointer, true)[1] || $assertType(_ref, $String, true)[1] || $assertType(_ref, mapType, true)[1] || $assertType(_ref, sliceType$1, true)[1]) { - x$4 = _ref; - return objectToValue(id($externalize(x$4, $emptyInterface))); - } else { - x$5 = _ref; - $panic(new $String("ValueOf: invalid value")); - } - }; - $pkg.ValueOf = ValueOf; - Value.ptr.prototype.internal = function() { - var v; - v = this; - if (!v.inited) { - return undefined; - } - return v.v; - }; - Value.prototype.internal = function() { return this.$val.internal(); }; - Value.ptr.prototype.Bool = function() { - var v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!((vType === 2))) { - $panic(new ValueError.ptr("Value.Bool", vType)); - } - return !!($clone(v, Value).internal()); - }; - Value.prototype.Bool = function() { return this.$val.Bool(); }; - convertArgs = function(args) { - var _i, _ref, arg, args, newArgs, v; - newArgs = new sliceType$1([]); - _ref = args; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - v = $clone(ValueOf(arg), Value); - newArgs = $append(newArgs, new $jsObjectPtr($clone(v, Value).internal())); - _i++; - } - return newArgs; - }; - convertJSError = function() { - var _tuple, err, jsErr, ok, x; - err = $recover(); - if ($interfaceIsEqual(err, $ifaceNil)) { - return; - } - _tuple = $assertType(err, ptrType, true); - jsErr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $panic((x = new Error.ptr($clone(objectToValue(jsErr.Object), Value)), new x.constructor.elem(x))); - } - $panic(err); - }; - Value.ptr.prototype.Call = function(m, args) { - var {$24r, args, m, obj, propType, v, vType, $s, $deferred, $r, $c} = $restore(this, {m, args}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - v = this; - vType = $clone(v, Value).Type(); - if (!((vType === 6)) && !((vType === 7))) { - $panic(new ValueError.ptr("Value.Call", vType)); - } - propType = $clone($clone(v, Value).Get(m), Value).Type(); - if (!((propType === 7))) { - $panic(new $String("js: Value.Call: property " + m + " is not a function, got " + new Type(propType).String())); - } - $deferred.push([convertJSError, []]); - $24r = objectToValue((obj = $clone(v, Value).internal(), obj[$externalize(m, $String)].apply(obj, $externalize(convertArgs(args), sliceType$1)))); - $s = 1; case 1: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return new Value.ptr(null, false, arrayType.zero()); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Value.ptr.prototype.Call, $c: true, $r, $24r, args, m, obj, propType, v, vType, $s, $deferred};return $f; } } - }; - Value.prototype.Call = function(m, args) { return this.$val.Call(m, args); }; - Value.ptr.prototype.Float = function() { - var v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!((vType === 3))) { - $panic(new ValueError.ptr("Value.Float", vType)); - } - return $parseFloat($clone(v, Value).internal()); - }; - Value.prototype.Float = function() { return this.$val.Float(); }; - Value.ptr.prototype.Get = function(p) { - var p, v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!new Type(vType).isObject()) { - $panic(new ValueError.ptr("Value.Get", vType)); - } - return objectToValue($clone(v, Value).internal()[$externalize(p, $String)]); - }; - Value.prototype.Get = function(p) { return this.$val.Get(p); }; - Value.ptr.prototype.Index = function(i) { - var i, v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!new Type(vType).isObject()) { - $panic(new ValueError.ptr("Value.Index", vType)); - } - return objectToValue($clone(v, Value).internal()[i]); - }; - Value.prototype.Index = function(i) { return this.$val.Index(i); }; - Value.ptr.prototype.Int = function() { - var v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!((vType === 3))) { - $panic(new ValueError.ptr("Value.Int", vType)); - } - return $parseInt($clone(v, Value).internal()) >> 0; - }; - Value.prototype.Int = function() { return this.$val.Int(); }; - Value.ptr.prototype.InstanceOf = function(t) { - var t, v; - v = this; - return !!(instanceOf($clone(v, Value).internal(), $clone(t, Value).internal())); - }; - Value.prototype.InstanceOf = function(t) { return this.$val.InstanceOf(t); }; - Value.ptr.prototype.Invoke = function(args) { - var args, v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!((vType === 7))) { - $panic(new ValueError.ptr("Value.Invoke", vType)); - } - return objectToValue($clone(v, Value).internal().apply(undefined, $externalize(convertArgs(args), sliceType$1))); - }; - Value.prototype.Invoke = function(args) { return this.$val.Invoke(args); }; - Value.ptr.prototype.JSValue = function() { - var v; - v = this; - return v; - }; - Value.prototype.JSValue = function() { return this.$val.JSValue(); }; - Value.ptr.prototype.Length = function() { - var v; - v = this; - return $parseInt($clone(v, Value).internal().length); - }; - Value.prototype.Length = function() { return this.$val.Length(); }; - Value.ptr.prototype.New = function(args) { - var {$24r, args, v, $s, $deferred, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - v = [v]; - v[0] = this; - $deferred.push([(function(v) { return function() { - var _tuple, err, jsErr, ok, vType, x; - err = $recover(); - if ($interfaceIsEqual(err, $ifaceNil)) { - return; - } - vType = $clone(v[0], Value).Type(); - if (!((vType === 7))) { - $panic(new ValueError.ptr("Value.New", vType)); - } - _tuple = $assertType(err, ptrType, true); - jsErr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $panic((x = new Error.ptr($clone(objectToValue(jsErr.Object), Value)), new x.constructor.elem(x))); - } - $panic(err); - }; })(v), []]); - $24r = objectToValue(new ($global.Function.prototype.bind.apply($clone(v[0], Value).internal(), [undefined].concat($externalize(convertArgs(args), sliceType$1))))); - $s = 1; case 1: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return new Value.ptr(null, false, arrayType.zero()); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Value.ptr.prototype.New, $c: true, $r, $24r, args, v, $s, $deferred};return $f; } } - }; - Value.prototype.New = function(args) { return this.$val.New(args); }; - Value.ptr.prototype.Set = function(p, x) { - var p, v, vType, x, x$1; - v = this; - vType = $clone(v, Value).Type(); - if (!new Type(vType).isObject()) { - $panic(new ValueError.ptr("Value.Set", vType)); - } - $clone(v, Value).internal()[$externalize(p, $String)] = $externalize((x$1 = convertArgs(new sliceType$1([x])), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $emptyInterface); - }; - Value.prototype.Set = function(p, x) { return this.$val.Set(p, x); }; - Value.ptr.prototype.SetIndex = function(i, x) { - var i, v, vType, x, x$1; - v = this; - vType = $clone(v, Value).Type(); - if (!new Type(vType).isObject()) { - $panic(new ValueError.ptr("Value.SetIndex", vType)); - } - $clone(v, Value).internal()[i] = $externalize((x$1 = convertArgs(new sliceType$1([x])), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $emptyInterface); - }; - Value.prototype.SetIndex = function(i, x) { return this.$val.SetIndex(i, x); }; - Value.ptr.prototype.String = function() { - var _1, v; - v = this; - _1 = $clone(v, Value).Type(); - if (_1 === (4)) { - return $internalize($clone(v, Value).internal(), $String); - } else if (_1 === (0)) { - return ""; - } else if (_1 === (1)) { - return ""; - } else if (_1 === (2)) { - return ""; - } else if (_1 === (3)) { - return ""; - } else if (_1 === (5)) { - return ""; - } else if (_1 === (6)) { - return ""; - } else if (_1 === (7)) { - return ""; - } else { - $panic(new $String("bad type")); - } - }; - Value.prototype.String = function() { return this.$val.String(); }; - Value.ptr.prototype.Truthy = function() { - var v; - v = this; - return !!($clone(v, Value).internal()); - }; - Value.prototype.Truthy = function() { return this.$val.Truthy(); }; - Value.ptr.prototype.Type = function() { - var v; - v = this; - return ((($parseInt(getValueType($clone(v, Value).internal())) >> 0) >> 0)); - }; - Value.prototype.Type = function() { return this.$val.Type(); }; - Value.ptr.prototype.IsNull = function() { - var v; - v = this; - return $clone(v, Value).Type() === 1; - }; - Value.prototype.IsNull = function() { return this.$val.IsNull(); }; - Value.ptr.prototype.IsUndefined = function() { - var v; - v = this; - return !v.inited; - }; - Value.prototype.IsUndefined = function() { return this.$val.IsUndefined(); }; - Value.ptr.prototype.IsNaN = function() { - var v; - v = this; - return !!($global.isNaN($clone(v, Value).internal())); - }; - Value.prototype.IsNaN = function() { return this.$val.IsNaN(); }; - Value.ptr.prototype.Delete = function(p) { - var p, v, vType; - v = this; - vType = $clone(v, Value).Type(); - if (!new Type(vType).isObject()) { - $panic(new ValueError.ptr("Value.Delete", vType)); - } - delete $clone(v, Value).internal()[$externalize(p, $String)]; - }; - Value.prototype.Delete = function(p) { return this.$val.Delete(p); }; - Value.ptr.prototype.Equal = function(w) { - var v, w; - v = this; - return $clone(v, Value).internal() === $clone(w, Value).internal(); - }; - Value.prototype.Equal = function(w) { return this.$val.Equal(w); }; - ValueError.ptr.prototype.Error = function() { - var e; - e = this; - return "syscall/js: call of " + e.Method + " on " + new Type(e.Type).String(); - }; - ValueError.prototype.Error = function() { return this.$val.Error(); }; - CopyBytesToGo = function(dst, src) { - var dlen, dst, src, vlen; - vlen = $parseInt(src.v.length); - dlen = dst.$length; - if (dlen < vlen) { - vlen = dlen; - } - $copySlice(dst, $assertType($internalize(src.v, $emptyInterface), sliceType$2)); - return vlen; - }; - $pkg.CopyBytesToGo = CopyBytesToGo; - CopyBytesToJS = function(dst, src) { - var _tuple, dst, dt, ok, src; - _tuple = $assertType($internalize(dst.v, $emptyInterface), sliceType$2, true); - dt = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $panic(new $String("syscall/js: CopyBytesToJS: expected dst to be an Uint8Array")); - } - return $copySlice(dt, src); - }; - $pkg.CopyBytesToJS = CopyBytesToJS; - Type.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isObject", name: "isObject", pkg: "syscall/js", typ: $funcType([], [$Bool], false)}]; - Func.methods = [{prop: "Release", name: "Release", pkg: "", typ: $funcType([], [], false)}]; - Error.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Value.methods = [{prop: "internal", name: "internal", pkg: "syscall/js", typ: $funcType([], [ptrType$1], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Call", name: "Call", pkg: "", typ: $funcType([$String, sliceType$1], [Value], true)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [Value], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "InstanceOf", name: "InstanceOf", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "Invoke", name: "Invoke", pkg: "", typ: $funcType([sliceType$1], [Value], true)}, {prop: "JSValue", name: "JSValue", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Length", name: "Length", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([sliceType$1], [Value], true)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $emptyInterface], [], false)}, {prop: "SetIndex", name: "SetIndex", pkg: "", typ: $funcType([$Int, $emptyInterface], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Truthy", name: "Truthy", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [Type], false)}, {prop: "IsNull", name: "IsNull", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsUndefined", name: "IsUndefined", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsNaN", name: "IsNaN", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Value], [$Bool], false)}]; - ptrType$2.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Func.init("", [{prop: "Value", name: "Value", embedded: true, exported: true, typ: Value, tag: ""}]); - Error.init("", [{prop: "Value", name: "Value", embedded: true, exported: true, typ: Value, tag: ""}]); - Value.init("syscall/js", [{prop: "v", name: "v", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "inited", name: "inited", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "_$2", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}]); - ValueError.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: Type, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - id = null; - instanceOf = null; - getValueType = null; - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["syscall"] = (function() { - var $pkg = {}, $init, errors, itoa, oserror, runtime, sync, js, Errno, Stat_t, Iovec, Sockaddr, SockaddrInet4, SockaddrInet6, SockaddrUnix, RawConn, jsFile, callResult, sliceType, sliceType$2, ptrType, ptrType$2, funcType, arrayType$2, arrayType$3, arrayType$4, funcType$1, funcType$2, errorstr, errEAGAIN, errEINVAL, errENOENT, errnoByCode, jsProcess, jsFS, constants, uint8Array, nodeWRONLY, nodeRDWR, nodeCREATE, nodeTRUNC, nodeAPPEND, nodeEXCL, filesMu, files, envOnce, envLock, env, envs, _r, faketimeWrite, errnoErr, Bind, StopIO, Accept, Recvfrom, Sendto, Recvmsg, SendmsgN, SetsockoptInt, SetReadDeadline, SetWriteDeadline, Shutdown, SetNonblock, fdToFile, Open, Close, CloseOnExec, ReadDirent, Stat, Lstat, Fstat, Unlink, Rmdir, Chmod, Fchmod, Fchown, Ftruncate, Chdir, Fchdir, Readlink, Fsync, Read, Write, Pread, Pwrite, Seek, Dup, checkPath, recoverErr, mapJSError, copyenv, Getenv, runtime_envs, setStat, Exit, fsCall; - errors = $packages["errors"]; - itoa = $packages["internal/itoa"]; - oserror = $packages["internal/oserror"]; - runtime = $packages["runtime"]; - sync = $packages["sync"]; - js = $packages["syscall/js"]; - Errno = $pkg.Errno = $newType(4, $kindUintptr, "syscall.Errno", true, "syscall", true, null); - Stat_t = $pkg.Stat_t = $newType(0, $kindStruct, "syscall.Stat_t", true, "syscall", true, function(Dev_, Ino_, Mode_, Nlink_, Uid_, Gid_, Rdev_, Size_, Blksize_, Blocks_, Atime_, AtimeNsec_, Mtime_, MtimeNsec_, Ctime_, CtimeNsec_) { - this.$val = this; - if (arguments.length === 0) { - this.Dev = new $Int64(0, 0); - this.Ino = new $Uint64(0, 0); - this.Mode = 0; - this.Nlink = 0; - this.Uid = 0; - this.Gid = 0; - this.Rdev = new $Int64(0, 0); - this.Size = new $Int64(0, 0); - this.Blksize = 0; - this.Blocks = 0; - this.Atime = new $Int64(0, 0); - this.AtimeNsec = new $Int64(0, 0); - this.Mtime = new $Int64(0, 0); - this.MtimeNsec = new $Int64(0, 0); - this.Ctime = new $Int64(0, 0); - this.CtimeNsec = new $Int64(0, 0); - return; - } - this.Dev = Dev_; - this.Ino = Ino_; - this.Mode = Mode_; - this.Nlink = Nlink_; - this.Uid = Uid_; - this.Gid = Gid_; - this.Rdev = Rdev_; - this.Size = Size_; - this.Blksize = Blksize_; - this.Blocks = Blocks_; - this.Atime = Atime_; - this.AtimeNsec = AtimeNsec_; - this.Mtime = Mtime_; - this.MtimeNsec = MtimeNsec_; - this.Ctime = Ctime_; - this.CtimeNsec = CtimeNsec_; - }); - Iovec = $pkg.Iovec = $newType(0, $kindStruct, "syscall.Iovec", true, "syscall", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - Sockaddr = $pkg.Sockaddr = $newType(8, $kindInterface, "syscall.Sockaddr", true, "syscall", true, null); - SockaddrInet4 = $pkg.SockaddrInet4 = $newType(0, $kindStruct, "syscall.SockaddrInet4", true, "syscall", true, function(Port_, Addr_) { - this.$val = this; - if (arguments.length === 0) { - this.Port = 0; - this.Addr = arrayType$3.zero(); - return; - } - this.Port = Port_; - this.Addr = Addr_; - }); - SockaddrInet6 = $pkg.SockaddrInet6 = $newType(0, $kindStruct, "syscall.SockaddrInet6", true, "syscall", true, function(Port_, ZoneId_, Addr_) { - this.$val = this; - if (arguments.length === 0) { - this.Port = 0; - this.ZoneId = 0; - this.Addr = arrayType$4.zero(); - return; - } - this.Port = Port_; - this.ZoneId = ZoneId_; - this.Addr = Addr_; - }); - SockaddrUnix = $pkg.SockaddrUnix = $newType(0, $kindStruct, "syscall.SockaddrUnix", true, "syscall", true, function(Name_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - return; - } - this.Name = Name_; - }); - RawConn = $pkg.RawConn = $newType(8, $kindInterface, "syscall.RawConn", true, "syscall", true, null); - jsFile = $pkg.jsFile = $newType(0, $kindStruct, "syscall.jsFile", true, "syscall", false, function(path_, entries_, dirIdx_, pos_, seeked_) { - this.$val = this; - if (arguments.length === 0) { - this.path = ""; - this.entries = sliceType.nil; - this.dirIdx = 0; - this.pos = new $Int64(0, 0); - this.seeked = false; - return; - } - this.path = path_; - this.entries = entries_; - this.dirIdx = dirIdx_; - this.pos = pos_; - this.seeked = seeked_; - }); - callResult = $newType(0, $kindStruct, "syscall.callResult", true, "syscall", false, function(val_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.val = new js.Value.ptr(null, false, arrayType$2.zero()); - this.err = $ifaceNil; - return; - } - this.val = val_; - this.err = err_; - }); - sliceType = $sliceType($String); - sliceType$2 = $sliceType($emptyInterface); - ptrType = $ptrType($error); - ptrType$2 = $ptrType(jsFile); - funcType = $funcType([], [], false); - arrayType$2 = $arrayType(funcType, 0); - arrayType$3 = $arrayType($Uint8, 4); - arrayType$4 = $arrayType($Uint8, 16); - funcType$1 = $funcType([$Uintptr], [], false); - funcType$2 = $funcType([$Uintptr], [$Bool], false); - faketimeWrite = function(fd, p) { - var fd, p; - $panic(new $String("not implemented")); - }; - errnoErr = function(e) { - var _1, e; - _1 = e; - if (_1 === (0)) { - return $ifaceNil; - } else if (_1 === (11)) { - return errEAGAIN; - } else if (_1 === (22)) { - return errEINVAL; - } else if (_1 === (2)) { - return errENOENT; - } - return new Errno(e); - }; - Errno.prototype.Error = function() { - var e, s; - e = this.$val; - if (0 <= ((e >> 0)) && ((e >> 0)) < 2054) { - s = ((e < 0 || e >= errorstr.length) ? ($throwRuntimeError("index out of range"), undefined) : errorstr[e]); - if (!(s === "")) { - return s; - } - } - return "errno " + itoa.Itoa(((e >> 0))); - }; - $ptrType(Errno).prototype.Error = function() { return new Errno(this.$get()).Error(); }; - Errno.prototype.Is = function(target) { - var _1, e, target; - e = this.$val; - _1 = target; - if ($interfaceIsEqual(_1, (oserror.ErrPermission))) { - return (e === 13) || (e === 1); - } else if ($interfaceIsEqual(_1, (oserror.ErrExist))) { - return (e === 17) || (e === 39); - } else if ($interfaceIsEqual(_1, (oserror.ErrNotExist))) { - return e === 2; - } - return false; - }; - $ptrType(Errno).prototype.Is = function(target) { return new Errno(this.$get()).Is(target); }; - Errno.prototype.Temporary = function() { - var e; - e = this.$val; - return (e === 4) || (e === 24) || new Errno(e).Timeout(); - }; - $ptrType(Errno).prototype.Temporary = function() { return new Errno(this.$get()).Temporary(); }; - Errno.prototype.Timeout = function() { - var e; - e = this.$val; - return (e === 11) || (e === 11) || (e === 110); - }; - $ptrType(Errno).prototype.Timeout = function() { return new Errno(this.$get()).Timeout(); }; - Bind = function(fd, sa) { - var fd, sa; - return new Errno(38); - }; - $pkg.Bind = Bind; - StopIO = function(fd) { - var fd; - return new Errno(38); - }; - $pkg.StopIO = StopIO; - Accept = function(fd) { - var _tmp, _tmp$1, _tmp$2, err, fd, newfd, sa; - newfd = 0; - sa = $ifaceNil; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = $ifaceNil; - _tmp$2 = new Errno(38); - newfd = _tmp; - sa = _tmp$1; - err = _tmp$2; - return [newfd, sa, err]; - }; - $pkg.Accept = Accept; - Recvfrom = function(fd, p, flags) { - var _tmp, _tmp$1, _tmp$2, err, fd, flags, from, n, p; - n = 0; - from = $ifaceNil; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = $ifaceNil; - _tmp$2 = new Errno(38); - n = _tmp; - from = _tmp$1; - err = _tmp$2; - return [n, from, err]; - }; - $pkg.Recvfrom = Recvfrom; - Sendto = function(fd, p, flags, to) { - var fd, flags, p, to; - return new Errno(38); - }; - $pkg.Sendto = Sendto; - Recvmsg = function(fd, p, oob, flags) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, err, fd, flags, from, n, oob, oobn, p, recvflags; - n = 0; - oobn = 0; - recvflags = 0; - from = $ifaceNil; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = $ifaceNil; - _tmp$4 = new Errno(38); - n = _tmp; - oobn = _tmp$1; - recvflags = _tmp$2; - from = _tmp$3; - err = _tmp$4; - return [n, oobn, recvflags, from, err]; - }; - $pkg.Recvmsg = Recvmsg; - SendmsgN = function(fd, p, oob, to, flags) { - var _tmp, _tmp$1, err, fd, flags, n, oob, p, to; - n = 0; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = new Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - $pkg.SendmsgN = SendmsgN; - SetsockoptInt = function(fd, level, opt, value) { - var fd, level, opt, value; - return $ifaceNil; - }; - $pkg.SetsockoptInt = SetsockoptInt; - SetReadDeadline = function(fd, t) { - var fd, t; - return new Errno(38); - }; - $pkg.SetReadDeadline = SetReadDeadline; - SetWriteDeadline = function(fd, t) { - var fd, t; - return new Errno(38); - }; - $pkg.SetWriteDeadline = SetWriteDeadline; - Shutdown = function(fd, how) { - var fd, how; - return new Errno(38); - }; - $pkg.Shutdown = Shutdown; - SetNonblock = function(fd, nonblocking) { - var fd, nonblocking; - return $ifaceNil; - }; - $pkg.SetNonblock = SetNonblock; - fdToFile = function(fd) { - var {_entry, _tuple, f, fd, ok, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = filesMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = files[$Int.keyFor(fd)], _entry !== undefined ? [_entry.v, true] : [ptrType$2.nil, false]); - f = _tuple[0]; - ok = _tuple[1]; - $r = filesMu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!ok) { - $s = -1; return [ptrType$2.nil, new Errno(9)]; - } - $s = -1; return [f, $ifaceNil]; - /* */ } return; } var $f = {$blk: fdToFile, $c: true, $r, _entry, _tuple, f, fd, ok, $s};return $f; - }; - Open = function(path, openmode, perm) { - var {_i, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, _tuple$1, _tuple$2, _v, cwd, dir, entries, err, err$1, err$2, err$3, f, fd, flags, i, jsFD, openmode, path, perm, stat, $s, $r, $c} = $restore(this, {path, openmode, perm}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPath(path); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - flags = 0; - if (!(((openmode & 1) === 0))) { - flags = flags | (nodeWRONLY); - } - if (!(((openmode & 2) === 0))) { - flags = flags | (nodeRDWR); - } - if (!(((openmode & 64) === 0))) { - flags = flags | (nodeCREATE); - } - if (!(((openmode & 512) === 0))) { - flags = flags | (nodeTRUNC); - } - if (!(((openmode & 1024) === 0))) { - flags = flags | (nodeAPPEND); - } - if (!(((openmode & 128) === 0))) { - flags = flags | (nodeEXCL); - } - if (!(((openmode & 4096) === 0))) { - $s = -1; return [0, errors.New("syscall.Open: O_SYNC is not supported by js/wasm")]; - } - _r$1 = fsCall("open", new sliceType$2([new $String(path), new $Int(flags), new $Uint32(perm)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - jsFD = $clone(_tuple[0], js.Value); - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [0, err$1]; - } - fd = $clone(jsFD, js.Value).Int(); - entries = sliceType.nil; - _r$2 = fsCall("fstat", new sliceType$2([new $Int(fd)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - stat = $clone(_tuple$1[0], js.Value); - err$2 = _tuple$1[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { _v = false; $s = 5; continue s; } - _r$3 = $clone(stat, js.Value).Call("isDirectory", new sliceType$2([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(_r$3, js.Value).Bool(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4; case 5: - /* */ if (_v) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 3: - _r$5 = fsCall("readdir", new sliceType$2([new $String(path)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - dir = $clone(_tuple$2[0], js.Value); - err$3 = _tuple$2[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return [0, err$3]; - } - entries = $makeSlice(sliceType, $clone(dir, js.Value).Length()); - _ref = entries; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= entries.$length) ? ($throwRuntimeError("index out of range"), undefined) : entries.$array[entries.$offset + i] = $clone($clone(dir, js.Value).Index(i), js.Value).String()); - _i++; - } - /* } */ case 4: - /* */ if (!((path.charCodeAt(0) === 47))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!((path.charCodeAt(0) === 47))) { */ case 9: - _r$6 = $clone(jsProcess, js.Value).Call("cwd", new sliceType$2([])); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, js.Value).String(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - cwd = _r$7; - path = cwd + "/" + path; - /* } */ case 10: - f = new jsFile.ptr(path, entries, 0, new $Int64(0, 0), false); - $r = filesMu.Lock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _key = fd; (files || $throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(_key)] = { k: _key, v: f }; - $r = filesMu.Unlock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [fd, $ifaceNil]; - /* */ } return; } var $f = {$blk: Open, $c: true, $r, _i, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, _tuple$1, _tuple$2, _v, cwd, dir, entries, err, err$1, err$2, err$3, f, fd, flags, i, jsFD, openmode, path, perm, stat, $s};return $f; - }; - $pkg.Open = Open; - Close = function(fd) { - var {_r$1, _tuple, err, fd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = filesMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - delete files[$Int.keyFor(fd)]; - $r = filesMu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = fsCall("close", new sliceType$2([new $Int(fd)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Close, $c: true, $r, _r$1, _tuple, err, fd, $s};return $f; - }; - $pkg.Close = Close; - CloseOnExec = function(fd) { - var fd; - }; - $pkg.CloseOnExec = CloseOnExec; - ReadDirent = function(fd, buf) { - var {_r$1, _tuple, buf, entry, err, f, fd, l, n, x, x$1, $s, $r, $c} = $restore(this, {fd, buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fdToFile(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - if (f.entries === sliceType.nil) { - $s = -1; return [0, new Errno(22)]; - } - n = 0; - while (true) { - if (!(f.dirIdx < f.entries.$length)) { break; } - entry = (x = f.entries, x$1 = f.dirIdx, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - l = 2 + entry.length >> 0; - if (l > buf.$length) { - break; - } - (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0] = ((l << 24 >>> 24))); - (1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1] = (((l >> 8 >> 0) << 24 >>> 24))); - $copyString($subslice(buf, 2), entry); - buf = $subslice(buf, l); - n = n + (l) >> 0; - f.dirIdx = f.dirIdx + (1) >> 0; - } - $s = -1; return [n, $ifaceNil]; - /* */ } return; } var $f = {$blk: ReadDirent, $c: true, $r, _r$1, _tuple, buf, entry, err, f, fd, l, n, x, x$1, $s};return $f; - }; - $pkg.ReadDirent = ReadDirent; - Stat = function(path, st) { - var {_r$1, _tuple, err, err$1, jsSt, path, st, $s, $r, $c} = $restore(this, {path, st}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPath(path); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$1 = fsCall("stat", new sliceType$2([new $String(path)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - jsSt = $clone(_tuple[0], js.Value); - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - setStat(st, $clone(jsSt, js.Value)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Stat, $c: true, $r, _r$1, _tuple, err, err$1, jsSt, path, st, $s};return $f; - }; - $pkg.Stat = Stat; - Lstat = function(path, st) { - var {_r$1, _tuple, err, err$1, jsSt, path, st, $s, $r, $c} = $restore(this, {path, st}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPath(path); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$1 = fsCall("lstat", new sliceType$2([new $String(path)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - jsSt = $clone(_tuple[0], js.Value); - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - setStat(st, $clone(jsSt, js.Value)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Lstat, $c: true, $r, _r$1, _tuple, err, err$1, jsSt, path, st, $s};return $f; - }; - $pkg.Lstat = Lstat; - Fstat = function(fd, st) { - var {_r$1, _tuple, err, fd, jsSt, st, $s, $r, $c} = $restore(this, {fd, st}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fsCall("fstat", new sliceType$2([new $Int(fd)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - jsSt = $clone(_tuple[0], js.Value); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - setStat(st, $clone(jsSt, js.Value)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Fstat, $c: true, $r, _r$1, _tuple, err, fd, jsSt, st, $s};return $f; - }; - $pkg.Fstat = Fstat; - Unlink = function(path) { - var {_r$1, _tuple, err, err$1, path, $s, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPath(path); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$1 = fsCall("unlink", new sliceType$2([new $String(path)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err$1 = _tuple[1]; - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: Unlink, $c: true, $r, _r$1, _tuple, err, err$1, path, $s};return $f; - }; - $pkg.Unlink = Unlink; - Rmdir = function(path) { - var {_r$1, _tuple, err, err$1, path, $s, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPath(path); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$1 = fsCall("rmdir", new sliceType$2([new $String(path)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err$1 = _tuple[1]; - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: Rmdir, $c: true, $r, _r$1, _tuple, err, err$1, path, $s};return $f; - }; - $pkg.Rmdir = Rmdir; - Chmod = function(path, mode) { - var {_r$1, _tuple, err, err$1, mode, path, $s, $r, $c} = $restore(this, {path, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPath(path); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$1 = fsCall("chmod", new sliceType$2([new $String(path), new $Uint32(mode)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err$1 = _tuple[1]; - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: Chmod, $c: true, $r, _r$1, _tuple, err, err$1, mode, path, $s};return $f; - }; - $pkg.Chmod = Chmod; - Fchmod = function(fd, mode) { - var {_r$1, _tuple, err, fd, mode, $s, $r, $c} = $restore(this, {fd, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fsCall("fchmod", new sliceType$2([new $Int(fd), new $Uint32(mode)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Fchmod, $c: true, $r, _r$1, _tuple, err, fd, mode, $s};return $f; - }; - $pkg.Fchmod = Fchmod; - Fchown = function(fd, uid, gid) { - var {_r$1, _tuple, err, fd, gid, uid, $s, $r, $c} = $restore(this, {fd, uid, gid}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fsCall("fchown", new sliceType$2([new $Int(fd), new $Uint32(((uid >>> 0))), new $Uint32(((gid >>> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Fchown, $c: true, $r, _r$1, _tuple, err, fd, gid, uid, $s};return $f; - }; - $pkg.Fchown = Fchown; - Ftruncate = function(fd, length) { - var {_r$1, _tuple, err, fd, length, $s, $r, $c} = $restore(this, {fd, length}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fsCall("ftruncate", new sliceType$2([new $Int(fd), length])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Ftruncate, $c: true, $r, _r$1, _tuple, err, fd, length, $s};return $f; - }; - $pkg.Ftruncate = Ftruncate; - Chdir = function(path) { - var {$24r, $24r$1, _r$1, err, err$1, path, $s, $deferred, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - err[0] = $ifaceNil; - err$1 = checkPath(path); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 1: - err[0] = err$1; - $24r = err[0]; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([recoverErr, [(err.$ptr || (err.$ptr = new ptrType(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, err)))]]); - _r$1 = $clone(jsProcess, js.Value).Call("chdir", new sliceType$2([new $String(path)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $24r$1 = err[0]; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { var $f = {$blk: Chdir, $c: true, $r, $24r, $24r$1, _r$1, err, err$1, path, $s, $deferred};return $f; } } - }; - $pkg.Chdir = Chdir; - Fchdir = function(fd) { - var {$24r, _r$1, _r$2, _tuple, err, f, fd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fdToFile(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = Chdir(f.path); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Fchdir, $c: true, $r, $24r, _r$1, _r$2, _tuple, err, f, fd, $s};return $f; - }; - $pkg.Fchdir = Fchdir; - Readlink = function(path, buf) { - var {_r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, dst, err, err$1, n, path, $s, $r, $c} = $restore(this, {path, buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - err$1 = checkPath(path); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$1 = fsCall("readlink", new sliceType$2([new $String(path)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - dst = $clone(_tuple[0], js.Value); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = 0; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - n = $copyString(buf, $clone(dst, js.Value).String()); - _tmp$4 = n; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Readlink, $c: true, $r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, dst, err, err$1, n, path, $s};return $f; - }; - $pkg.Readlink = Readlink; - Fsync = function(fd) { - var {_r$1, _tuple, err, fd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fsCall("fsync", new sliceType$2([new $Int(fd)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Fsync, $c: true, $r, _r$1, _tuple, err, fd, $s};return $f; - }; - $pkg.Fsync = Fsync; - Read = function(fd, b) { - var {_r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, b, buf, err, err$1, f, fd, n, n$1, n2, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {fd, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fdToFile(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - /* */ if (f.seeked) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (f.seeked) { */ case 2: - _r$2 = Pread(fd, b, f.pos); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err$1 = _tuple$1[1]; - f.pos = (x = f.pos, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - $s = -1; return [n, err$1]; - /* } */ case 3: - _r$3 = $clone(uint8Array, js.Value).New(new sliceType$2([new $Int(b.$length)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - buf = $clone(_r$3, js.Value); - _r$4 = fsCall("read", new sliceType$2([new $Int(fd), new buf.constructor.elem(buf), new $Int(0), new $Int(b.$length), $ifaceNil])); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - n$1 = $clone(_tuple$2[0], js.Value); - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - js.CopyBytesToGo(b, $clone(buf, js.Value)); - n2 = $clone(n$1, js.Value).Int(); - f.pos = (x$2 = f.pos, x$3 = (new $Int64(0, n2)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - $s = -1; return [n2, err]; - /* */ } return; } var $f = {$blk: Read, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, b, buf, err, err$1, f, fd, n, n$1, n2, x, x$1, x$2, x$3, $s};return $f; - }; - $pkg.Read = Read; - Write = function(fd, b) { - var {_r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, b, buf, err, err$1, f, fd, n, n$1, n$2, n2, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {fd, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fdToFile(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - /* */ if (f.seeked) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (f.seeked) { */ case 2: - _r$2 = Pwrite(fd, b, f.pos); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err$1 = _tuple$1[1]; - f.pos = (x = f.pos, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - $s = -1; return [n, err$1]; - /* } */ case 3: - if (false && ((fd === 1) || (fd === 2))) { - n$1 = faketimeWrite(fd, b); - if (n$1 < 0) { - $s = -1; return [0, errnoErr(((-n$1 >>> 0)))]; - } - $s = -1; return [n$1, $ifaceNil]; - } - _r$3 = $clone(uint8Array, js.Value).New(new sliceType$2([new $Int(b.$length)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - buf = $clone(_r$3, js.Value); - js.CopyBytesToJS($clone(buf, js.Value), b); - _r$4 = fsCall("write", new sliceType$2([new $Int(fd), new buf.constructor.elem(buf), new $Int(0), new $Int(b.$length), $ifaceNil])); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - n$2 = $clone(_tuple$2[0], js.Value); - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - n2 = $clone(n$2, js.Value).Int(); - f.pos = (x$2 = f.pos, x$3 = (new $Int64(0, n2)), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - $s = -1; return [n2, err]; - /* */ } return; } var $f = {$blk: Write, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, b, buf, err, err$1, f, fd, n, n$1, n$2, n2, x, x$1, x$2, x$3, $s};return $f; - }; - $pkg.Write = Write; - Pread = function(fd, b, offset) { - var {_r$1, _r$2, _tuple, b, buf, err, fd, n, offset, $s, $r, $c} = $restore(this, {fd, b, offset}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = $clone(uint8Array, js.Value).New(new sliceType$2([new $Int(b.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - buf = $clone(_r$1, js.Value); - _r$2 = fsCall("read", new sliceType$2([new $Int(fd), new buf.constructor.elem(buf), new $Int(0), new $Int(b.$length), offset])); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = $clone(_tuple[0], js.Value); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - js.CopyBytesToGo(b, $clone(buf, js.Value)); - $s = -1; return [$clone(n, js.Value).Int(), $ifaceNil]; - /* */ } return; } var $f = {$blk: Pread, $c: true, $r, _r$1, _r$2, _tuple, b, buf, err, fd, n, offset, $s};return $f; - }; - $pkg.Pread = Pread; - Pwrite = function(fd, b, offset) { - var {_r$1, _r$2, _tuple, b, buf, err, fd, n, offset, $s, $r, $c} = $restore(this, {fd, b, offset}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = $clone(uint8Array, js.Value).New(new sliceType$2([new $Int(b.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - buf = $clone(_r$1, js.Value); - js.CopyBytesToJS($clone(buf, js.Value), b); - _r$2 = fsCall("write", new sliceType$2([new $Int(fd), new buf.constructor.elem(buf), new $Int(0), new $Int(b.$length), offset])); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = $clone(_tuple[0], js.Value); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - $s = -1; return [$clone(n, js.Value).Int(), $ifaceNil]; - /* */ } return; } var $f = {$blk: Pwrite, $c: true, $r, _r$1, _r$2, _tuple, b, buf, err, fd, n, offset, $s};return $f; - }; - $pkg.Pwrite = Pwrite; - Seek = function(fd, offset, whence) { - var {_1, _r$1, _r$2, _tuple, err, err$1, f, fd, newPos, offset, st, whence, x, x$1, $s, $r, $c} = $restore(this, {fd, offset, whence}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - st = [st]; - _r$1 = fdToFile(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new $Int64(0, 0), err]; - } - newPos = new $Int64(0, 0); - _1 = whence; - /* */ if (_1 === (0)) { $s = 3; continue; } - /* */ if (_1 === (1)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (0)) { */ case 3: - newPos = offset; - $s = 7; continue; - /* } else if (_1 === (1)) { */ case 4: - newPos = (x = f.pos, new $Int64(x.$high + offset.$high, x.$low + offset.$low)); - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 5: - st[0] = new Stat_t.ptr(new $Int64(0, 0), new $Uint64(0, 0), 0, 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), 0, 0, new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0)); - _r$2 = Fstat(fd, st[0]); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [new $Int64(0, 0), err$1]; - } - newPos = (x$1 = st[0].Size, new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low)); - $s = 7; continue; - /* } else { */ case 6: - $s = -1; return [new $Int64(0, 0), errnoErr(22)]; - /* } */ case 7: - case 2: - if ((newPos.$high < 0 || (newPos.$high === 0 && newPos.$low < 0))) { - $s = -1; return [new $Int64(0, 0), errnoErr(22)]; - } - f.seeked = true; - f.dirIdx = 0; - f.pos = newPos; - $s = -1; return [newPos, $ifaceNil]; - /* */ } return; } var $f = {$blk: Seek, $c: true, $r, _1, _r$1, _r$2, _tuple, err, err$1, f, fd, newPos, offset, st, whence, x, x$1, $s};return $f; - }; - $pkg.Seek = Seek; - Dup = function(fd) { - var fd; - return [0, new Errno(38)]; - }; - $pkg.Dup = Dup; - checkPath = function(path) { - var i, path; - if (path === "") { - return new Errno(22); - } - i = 0; - while (true) { - if (!(i < path.length)) { break; } - if (path.charCodeAt(i) === 0) { - return new Errno(22); - } - i = i + (1) >> 0; - } - return $ifaceNil; - }; - recoverErr = function(errPtr) { - var _tuple, err, errPtr, jsErr, ok; - err = $recover(); - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tuple = $assertType(err, js.Error, true); - jsErr = $clone(_tuple[0], js.Error); - ok = _tuple[1]; - if (!ok) { - $panic(err); - } - errPtr.$set(mapJSError($clone(jsErr.Value, js.Value))); - } - }; - mapJSError = function(jsErr) { - var _entry, _tuple, errno, jsErr, ok; - _tuple = (_entry = errnoByCode[$String.keyFor($clone($clone(jsErr, js.Value).Get("code"), js.Value).String())], _entry !== undefined ? [_entry.v, true] : [0, false]); - errno = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $panic(new jsErr.constructor.elem(jsErr)); - } - return errnoErr((errno)); - }; - copyenv = function() { - var _entry, _i, _key, _ref, _tuple, i, j, key, ok, s; - env = {}; - _ref = envs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - j = 0; - while (true) { - if (!(j < s.length)) { break; } - if (s.charCodeAt(j) === 61) { - key = $substring(s, 0, j); - _tuple = (_entry = env[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [0, false]); - ok = _tuple[1]; - if (!ok) { - _key = key; (env || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: i }; - } else { - ((i < 0 || i >= envs.$length) ? ($throwRuntimeError("index out of range"), undefined) : envs.$array[envs.$offset + i] = ""); - } - break; - } - j = j + (1) >> 0; - } - _i++; - } - }; - Getenv = function(key) { - var {$24r, $24r$1, $24r$2, $24r$3, _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, found, i, i$1, key, ok, s, value, $s, $deferred, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - value = ""; - found = false; - $r = envOnce.Do(copyenv); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (key.length === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (key.length === 0) { */ case 2: - _tmp = ""; - _tmp$1 = false; - value = _tmp; - found = _tmp$1; - $24r = [value, found]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $r = envLock.RLock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(envLock, "RUnlock"), []]); - _tuple = (_entry = env[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [0, false]); - i = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!ok) { */ case 6: - _tmp$2 = ""; - _tmp$3 = false; - value = _tmp$2; - found = _tmp$3; - $24r$1 = [value, found]; - $s = 8; case 8: return $24r$1; - /* } */ case 7: - s = ((i < 0 || i >= envs.$length) ? ($throwRuntimeError("index out of range"), undefined) : envs.$array[envs.$offset + i]); - i$1 = 0; - /* while (true) { */ case 9: - /* if (!(i$1 < s.length)) { break; } */ if(!(i$1 < s.length)) { $s = 10; continue; } - /* */ if (s.charCodeAt(i$1) === 61) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (s.charCodeAt(i$1) === 61) { */ case 11: - _tmp$4 = $substring(s, (i$1 + 1 >> 0)); - _tmp$5 = true; - value = _tmp$4; - found = _tmp$5; - $24r$2 = [value, found]; - $s = 13; case 13: return $24r$2; - /* } */ case 12: - i$1 = i$1 + (1) >> 0; - $s = 9; continue; - case 10: - _tmp$6 = ""; - _tmp$7 = false; - value = _tmp$6; - found = _tmp$7; - $24r$3 = [value, found]; - $s = 14; case 14: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [value, found]; } if($curGoroutine.asleep) { var $f = {$blk: Getenv, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, found, i, i$1, key, ok, s, value, $s, $deferred};return $f; } } - }; - $pkg.Getenv = Getenv; - runtime_envs = function() { - var {_r$1, envkeys, envs$1, i, jsEnv, key, process, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - process = $clone($clone(js.Global(), js.Value).Get("process"), js.Value); - if ($clone(process, js.Value).IsUndefined()) { - $s = -1; return sliceType.nil; - } - jsEnv = $clone($clone(process, js.Value).Get("env"), js.Value); - _r$1 = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).Call("keys", new sliceType$2([new jsEnv.constructor.elem(jsEnv)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - envkeys = $clone(_r$1, js.Value); - envs$1 = $makeSlice(sliceType, $clone(envkeys, js.Value).Length()); - i = 0; - while (true) { - if (!(i < $clone(envkeys, js.Value).Length())) { break; } - key = $clone($clone(envkeys, js.Value).Index(i), js.Value).String(); - ((i < 0 || i >= envs$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : envs$1.$array[envs$1.$offset + i] = key + "=" + $clone($clone(jsEnv, js.Value).Get(key), js.Value).String()); - i = i + (1) >> 0; - } - $s = -1; return envs$1; - /* */ } return; } var $f = {$blk: runtime_envs, $c: true, $r, _r$1, envkeys, envs$1, i, jsEnv, key, process, $s};return $f; - }; - setStat = function(st, jsSt) { - var atime, ctime, jsSt, mtime, st; - st.Dev = (new $Int64(0, $clone($clone(jsSt, js.Value).Get("dev"), js.Value).Int())); - st.Ino = (new $Uint64(0, $clone($clone(jsSt, js.Value).Get("ino"), js.Value).Int())); - st.Mode = (($clone($clone(jsSt, js.Value).Get("mode"), js.Value).Int() >>> 0)); - st.Nlink = (($clone($clone(jsSt, js.Value).Get("nlink"), js.Value).Int() >>> 0)); - st.Uid = (($clone($clone(jsSt, js.Value).Get("uid"), js.Value).Int() >>> 0)); - st.Gid = (($clone($clone(jsSt, js.Value).Get("gid"), js.Value).Int() >>> 0)); - st.Rdev = (new $Int64(0, $clone($clone(jsSt, js.Value).Get("rdev"), js.Value).Int())); - st.Size = (new $Int64(0, $clone($clone(jsSt, js.Value).Get("size"), js.Value).Int())); - st.Blksize = (($clone($clone(jsSt, js.Value).Get("blksize"), js.Value).Int() >> 0)); - st.Blocks = (($clone($clone(jsSt, js.Value).Get("blocks"), js.Value).Int() >> 0)); - atime = (new $Int64(0, $clone($clone(jsSt, js.Value).Get("atimeMs"), js.Value).Float())); - st.Atime = $div64(atime, new $Int64(0, 1000), false); - st.AtimeNsec = $mul64(($div64(atime, new $Int64(0, 1000), true)), new $Int64(0, 1000000)); - mtime = (new $Int64(0, $clone($clone(jsSt, js.Value).Get("mtimeMs"), js.Value).Float())); - st.Mtime = $div64(mtime, new $Int64(0, 1000), false); - st.MtimeNsec = $mul64(($div64(mtime, new $Int64(0, 1000), true)), new $Int64(0, 1000000)); - ctime = (new $Int64(0, $clone($clone(jsSt, js.Value).Get("ctimeMs"), js.Value).Float())); - st.Ctime = $div64(ctime, new $Int64(0, 1000), false); - st.CtimeNsec = $mul64(($div64(ctime, new $Int64(0, 1000), true)), new $Int64(0, 1000000)); - }; - Exit = function(code) { - var {_r$1, _r$2, code, process, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - process = $clone($clone(js.Global(), js.Value).Get("process"), js.Value); - /* */ if (!$clone(process, js.Value).IsUndefined()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!$clone(process, js.Value).IsUndefined()) { */ case 1: - _r$1 = $clone(process, js.Value).Call("exit", new sliceType$2([new $Int(code)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* } */ case 2: - /* */ if (!((code === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((code === 0))) { */ case 4: - _r$2 = $clone($clone(js.Global(), js.Value).Get("console"), js.Value).Call("warn", new sliceType$2([new $String("Go program exited with non-zero code:"), new $Int(code)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: Exit, $c: true, $r, _r$1, _r$2, code, process, $s};return $f; - }; - $pkg.Exit = Exit; - fsCall = function(name, args) { - var {$24r, $24r$1, _r$1, _r$2, args, c, f, name, res, $s, $deferred, $r, $c} = $restore(this, {name, args}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = [c]; - c[0] = new $Chan(callResult, 1); - f = $clone(js.FuncOf((function(c) { return function $b(this$1, args$1) { - var {args$1, jsErr, res, this$1, $s, $r, $c} = $restore(this, {this$1, args$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - res = new callResult.ptr(new js.Value.ptr(null, false, arrayType$2.zero()), $ifaceNil); - if (args$1.$length >= 1) { - jsErr = $clone((0 >= args$1.$length ? ($throwRuntimeError("index out of range"), undefined) : args$1.$array[args$1.$offset + 0]), js.Value); - if (!$clone(jsErr, js.Value).IsUndefined() && !$clone(jsErr, js.Value).IsNull()) { - res.err = mapJSError($clone(jsErr, js.Value)); - } - } - js.Value.copy(res.val, js.Undefined()); - if (args$1.$length >= 2) { - js.Value.copy(res.val, (1 >= args$1.$length ? ($throwRuntimeError("index out of range"), undefined) : args$1.$array[args$1.$offset + 1])); - } - $r = $send(c[0], $clone($clone(res, callResult), callResult)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, args$1, jsErr, res, this$1, $s};return $f; - }; })(c)), js.Func); - $deferred.push([$methodVal($clone(f, js.Func), "Release"), []]); - /* */ if ($clone($clone(jsFS, js.Value).Get(name), js.Value).IsUndefined()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone($clone(jsFS, js.Value).Get(name), js.Value).IsUndefined()) { */ case 1: - $24r = [js.Undefined(), new Errno(38)]; - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = $clone(jsFS, js.Value).Call(name, $append(args, new f.constructor.elem(f))); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = $recv(c[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - res = $clone(_r$2[0], callResult); - $24r$1 = [res.val, res.err]; - $s = 6; case 6: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [new js.Value.ptr(null, false, arrayType$2.zero()), $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: fsCall, $c: true, $r, $24r, $24r$1, _r$1, _r$2, args, c, f, name, res, $s, $deferred};return $f; } } - }; - Errno.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Is", name: "Is", pkg: "", typ: $funcType([$error], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]; - Stat_t.init("", [{prop: "Dev", name: "Dev", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Ino", name: "Ino", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "Mode", name: "Mode", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Nlink", name: "Nlink", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Uid", name: "Uid", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Gid", name: "Gid", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Rdev", name: "Rdev", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Blksize", name: "Blksize", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Blocks", name: "Blocks", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Atime", name: "Atime", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "AtimeNsec", name: "AtimeNsec", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Mtime", name: "Mtime", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "MtimeNsec", name: "MtimeNsec", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Ctime", name: "Ctime", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "CtimeNsec", name: "CtimeNsec", embedded: false, exported: true, typ: $Int64, tag: ""}]); - Iovec.init("", []); - Sockaddr.init([]); - SockaddrInet4.init("", [{prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: arrayType$3, tag: ""}]); - SockaddrInet6.init("", [{prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ZoneId", name: "ZoneId", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: arrayType$4, tag: ""}]); - SockaddrUnix.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}]); - RawConn.init([{prop: "Control", name: "Control", pkg: "", typ: $funcType([funcType$1], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$2], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$2], [$error], false)}]); - jsFile.init("syscall", [{prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "entries", name: "entries", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "dirIdx", name: "dirIdx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "pos", name: "pos", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "seeked", name: "seeked", embedded: false, exported: false, typ: $Bool, tag: ""}]); - callResult.init("syscall", [{prop: "val", name: "val", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = itoa.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = oserror.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ForkLock = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - filesMu = new sync.Mutex.ptr(0, 0); - envOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - envLock = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - env = false; - errorstr = $toNativeArray($kindString, ["", "Operation not permitted", "No such file or directory", "No such process", "Interrupted system call", "I/O error", "No such device or address", "Argument list too long", "Exec format error", "Bad file number", "No child processes", "Try again", "Out of memory", "Permission denied", "Bad address", "", "Device or resource busy", "File exists", "Cross-device link", "No such device", "Not a directory", "Is a directory", "Invalid argument", "File table overflow", "Too many open files", "Not a typewriter", "", "File too large", "No space left on device", "Illegal seek", "Read-only file system", "Too many links", "Broken pipe", "Math arg out of domain of func", "Math result not representable", "Deadlock condition", "File name too long", "No record locks available", "not implemented on js", "Directory not empty", "Too many symbolic links", "", "No message of desired type", "Identifier removed", "Channel number out of range", "Level 2 not synchronized", "Level 3 halted", "Level 3 reset", "Link number out of range", "Protocol driver not attached", "No CSI structure available", "Level 2 halted", "Invalid exchange", "Invalid request descriptor", "Exchange full", "No anode", "Invalid request code", "Invalid slot", "", "Bad font file fmt", "Device not a stream", "No data (for no delay io)", "Timer expired", "Out of streams resources", "Machine is not on the network", "Package not installed", "The object is remote", "The link has been severed", "Advertise error", "Srmount error", "Communication error on send", "Protocol error", "Multihop attempted", "Cross mount point (not really error)", "Trying to read unreadable message", "Value too large for defined data type", "Given log. name not unique", "f.d. invalid for this operation", "Remote address changed", "Can't access a needed shared lib", "Accessing a corrupted shared lib", ".lib section in a.out corrupted", "Attempting to link in too many libs", "Attempting to exec a shared library", "", "", "", "", "Socket operation on non-socket", "Destination address required", "Message too long", "Protocol wrong type for socket", "Protocol not available", "Unknown protocol", "Socket type not supported", "Operation not supported on transport endpoint", "Protocol family not supported", "Address family not supported by protocol family", "Address already in use", "Address not available", "Network interface is not configured", "Network is unreachable", "", "Connection aborted", "Connection reset by peer", "No buffer space available", "Socket is already connected", "Socket is not connected", "Can't send after socket shutdown", "", "Connection timed out", "Connection refused", "Host is down", "Host is unreachable", "Socket already connected", "Connection already in progress", "", "", "", "", "", "", "Quota exceeded", "No medium (in tape drive)", "", "Operation canceled.", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Inode is remote (not really error)", "Inappropriate file type or format", "No more files", "", "No such host or network path", "Filename exists with different case"]); - errEAGAIN = new Errno(11); - errEINVAL = new Errno(22); - errENOENT = new Errno(2); - errnoByCode = $makeMap($String.keyFor, [{ k: "EPERM", v: 1 }, { k: "ENOENT", v: 2 }, { k: "ESRCH", v: 3 }, { k: "EINTR", v: 4 }, { k: "EIO", v: 5 }, { k: "ENXIO", v: 6 }, { k: "E2BIG", v: 7 }, { k: "ENOEXEC", v: 8 }, { k: "EBADF", v: 9 }, { k: "ECHILD", v: 10 }, { k: "EAGAIN", v: 11 }, { k: "ENOMEM", v: 12 }, { k: "EACCES", v: 13 }, { k: "EFAULT", v: 14 }, { k: "EBUSY", v: 16 }, { k: "EEXIST", v: 17 }, { k: "EXDEV", v: 18 }, { k: "ENODEV", v: 19 }, { k: "ENOTDIR", v: 20 }, { k: "EISDIR", v: 21 }, { k: "EINVAL", v: 22 }, { k: "ENFILE", v: 23 }, { k: "EMFILE", v: 24 }, { k: "ENOTTY", v: 25 }, { k: "EFBIG", v: 27 }, { k: "ENOSPC", v: 28 }, { k: "ESPIPE", v: 29 }, { k: "EROFS", v: 30 }, { k: "EMLINK", v: 31 }, { k: "EPIPE", v: 32 }, { k: "ENAMETOOLONG", v: 36 }, { k: "ENOSYS", v: 38 }, { k: "EDQUOT", v: 122 }, { k: "EDOM", v: 33 }, { k: "ERANGE", v: 34 }, { k: "EDEADLK", v: 35 }, { k: "ENOLCK", v: 37 }, { k: "ENOTEMPTY", v: 39 }, { k: "ELOOP", v: 40 }, { k: "ENOMSG", v: 42 }, { k: "EIDRM", v: 43 }, { k: "ECHRNG", v: 44 }, { k: "EL2NSYNC", v: 45 }, { k: "EL3HLT", v: 46 }, { k: "EL3RST", v: 47 }, { k: "ELNRNG", v: 48 }, { k: "EUNATCH", v: 49 }, { k: "ENOCSI", v: 50 }, { k: "EL2HLT", v: 51 }, { k: "EBADE", v: 52 }, { k: "EBADR", v: 53 }, { k: "EXFULL", v: 54 }, { k: "ENOANO", v: 55 }, { k: "EBADRQC", v: 56 }, { k: "EBADSLT", v: 57 }, { k: "EDEADLOCK", v: 35 }, { k: "EBFONT", v: 59 }, { k: "ENOSTR", v: 60 }, { k: "ENODATA", v: 61 }, { k: "ETIME", v: 62 }, { k: "ENOSR", v: 63 }, { k: "ENONET", v: 64 }, { k: "ENOPKG", v: 65 }, { k: "EREMOTE", v: 66 }, { k: "ENOLINK", v: 67 }, { k: "EADV", v: 68 }, { k: "ESRMNT", v: 69 }, { k: "ECOMM", v: 70 }, { k: "EPROTO", v: 71 }, { k: "EMULTIHOP", v: 72 }, { k: "EDOTDOT", v: 73 }, { k: "EBADMSG", v: 74 }, { k: "EOVERFLOW", v: 75 }, { k: "ENOTUNIQ", v: 76 }, { k: "EBADFD", v: 77 }, { k: "EREMCHG", v: 78 }, { k: "ELIBACC", v: 79 }, { k: "ELIBBAD", v: 80 }, { k: "ELIBSCN", v: 81 }, { k: "ELIBMAX", v: 82 }, { k: "ELIBEXEC", v: 83 }, { k: "EILSEQ", v: 84 }, { k: "EUSERS", v: 87 }, { k: "ENOTSOCK", v: 88 }, { k: "EDESTADDRREQ", v: 89 }, { k: "EMSGSIZE", v: 90 }, { k: "EPROTOTYPE", v: 91 }, { k: "ENOPROTOOPT", v: 92 }, { k: "EPROTONOSUPPORT", v: 93 }, { k: "ESOCKTNOSUPPORT", v: 94 }, { k: "EOPNOTSUPP", v: 95 }, { k: "EPFNOSUPPORT", v: 96 }, { k: "EAFNOSUPPORT", v: 97 }, { k: "EADDRINUSE", v: 98 }, { k: "EADDRNOTAVAIL", v: 99 }, { k: "ENETDOWN", v: 100 }, { k: "ENETUNREACH", v: 101 }, { k: "ENETRESET", v: 102 }, { k: "ECONNABORTED", v: 103 }, { k: "ECONNRESET", v: 104 }, { k: "ENOBUFS", v: 105 }, { k: "EISCONN", v: 106 }, { k: "ENOTCONN", v: 107 }, { k: "ESHUTDOWN", v: 108 }, { k: "ETOOMANYREFS", v: 109 }, { k: "ETIMEDOUT", v: 110 }, { k: "ECONNREFUSED", v: 111 }, { k: "EHOSTDOWN", v: 112 }, { k: "EHOSTUNREACH", v: 113 }, { k: "EALREADY", v: 114 }, { k: "EINPROGRESS", v: 115 }, { k: "ESTALE", v: 116 }, { k: "ENOTSUP", v: 95 }, { k: "ENOMEDIUM", v: 123 }, { k: "ECANCELED", v: 125 }, { k: "ELBIN", v: 2048 }, { k: "EFTYPE", v: 2049 }, { k: "ENMFILE", v: 2050 }, { k: "EPROCLIM", v: 2051 }, { k: "ENOSHARE", v: 2052 }, { k: "ECASECLASH", v: 2053 }, { k: "EWOULDBLOCK", v: 11 }]); - jsProcess = $clone($clone(js.Global(), js.Value).Get("process"), js.Value); - jsFS = $clone($clone(js.Global(), js.Value).Get("fs"), js.Value); - constants = $clone($clone(jsFS, js.Value).Get("constants"), js.Value); - uint8Array = $clone($clone(js.Global(), js.Value).Get("Uint8Array"), js.Value); - nodeWRONLY = $clone($clone(constants, js.Value).Get("O_WRONLY"), js.Value).Int(); - nodeRDWR = $clone($clone(constants, js.Value).Get("O_RDWR"), js.Value).Int(); - nodeCREATE = $clone($clone(constants, js.Value).Get("O_CREAT"), js.Value).Int(); - nodeTRUNC = $clone($clone(constants, js.Value).Get("O_TRUNC"), js.Value).Int(); - nodeAPPEND = $clone($clone(constants, js.Value).Get("O_APPEND"), js.Value).Int(); - nodeEXCL = $clone($clone(constants, js.Value).Get("O_EXCL"), js.Value).Int(); - files = $makeMap($Int.keyFor, [{ k: 0, v: new jsFile.ptr("", sliceType.nil, 0, new $Int64(0, 0), false) }, { k: 1, v: new jsFile.ptr("", sliceType.nil, 0, new $Int64(0, 0), false) }, { k: 2, v: new jsFile.ptr("", sliceType.nil, 0, new $Int64(0, 0), false) }]); - _r = runtime_envs(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - envs = _r; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/syscall/unix"] = (function() { - var $pkg = {}, $init, syscall, IsNonblock, RecvfromInet4, RecvfromInet6, SendtoInet4, SendtoInet6, SendmsgNInet4, SendmsgNInet6, RecvmsgInet4, RecvmsgInet6; - syscall = $packages["syscall"]; - IsNonblock = function(fd) { - var _tmp, _tmp$1, err, fd, nonblocking; - nonblocking = false; - err = $ifaceNil; - _tmp = false; - _tmp$1 = $ifaceNil; - nonblocking = _tmp; - err = _tmp$1; - return [nonblocking, err]; - }; - $pkg.IsNonblock = IsNonblock; - RecvfromInet4 = function(fd, p, flags, from) { - var fd, flags, from, p; - return [0, new syscall.Errno(38)]; - }; - $pkg.RecvfromInet4 = RecvfromInet4; - RecvfromInet6 = function(fd, p, flags, from) { - var _tmp, _tmp$1, err, fd, flags, from, n, p; - n = 0; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - $pkg.RecvfromInet6 = RecvfromInet6; - SendtoInet4 = function(fd, p, flags, to) { - var err, fd, flags, p, to; - err = $ifaceNil; - err = new syscall.Errno(38); - return err; - }; - $pkg.SendtoInet4 = SendtoInet4; - SendtoInet6 = function(fd, p, flags, to) { - var err, fd, flags, p, to; - err = $ifaceNil; - err = new syscall.Errno(38); - return err; - }; - $pkg.SendtoInet6 = SendtoInet6; - SendmsgNInet4 = function(fd, p, oob, to, flags) { - var _tmp, _tmp$1, err, fd, flags, n, oob, p, to; - n = 0; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - $pkg.SendmsgNInet4 = SendmsgNInet4; - SendmsgNInet6 = function(fd, p, oob, to, flags) { - var _tmp, _tmp$1, err, fd, flags, n, oob, p, to; - n = 0; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - $pkg.SendmsgNInet6 = SendmsgNInet6; - RecvmsgInet4 = function(fd, p, oob, flags, from) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, err, fd, flags, from, n, oob, oobn, p, recvflags; - n = 0; - oobn = 0; - recvflags = 0; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - recvflags = _tmp$2; - err = _tmp$3; - return [n, oobn, recvflags, err]; - }; - $pkg.RecvmsgInet4 = RecvmsgInet4; - RecvmsgInet6 = function(fd, p, oob, flags, from) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, err, fd, flags, from, n, oob, oobn, p, recvflags; - n = 0; - oobn = 0; - recvflags = 0; - err = $ifaceNil; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - recvflags = _tmp$2; - err = _tmp$3; - return [n, oobn, recvflags, err]; - }; - $pkg.RecvmsgInet6 = RecvmsgInet6; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = syscall.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["github.com/gopherjs/gopherjs/nosync"] = (function() { - var $pkg = {}, $init, Pool, Once, Mutex, WaitGroup, Map, sliceType, ptrType, funcType, funcType$1, ptrType$1, ptrType$2, ptrType$4, funcType$2, ptrType$5, mapType; - Pool = $pkg.Pool = $newType(0, $kindStruct, "nosync.Pool", true, "github.com/gopherjs/gopherjs/nosync", true, function(store_, New_) { - this.$val = this; - if (arguments.length === 0) { - this.store = sliceType.nil; - this.New = $throwNilPointerError; - return; - } - this.store = store_; - this.New = New_; - }); - Once = $pkg.Once = $newType(0, $kindStruct, "nosync.Once", true, "github.com/gopherjs/gopherjs/nosync", true, function(doing_, done_) { - this.$val = this; - if (arguments.length === 0) { - this.doing = false; - this.done = false; - return; - } - this.doing = doing_; - this.done = done_; - }); - Mutex = $pkg.Mutex = $newType(0, $kindStruct, "nosync.Mutex", true, "github.com/gopherjs/gopherjs/nosync", true, function(locked_) { - this.$val = this; - if (arguments.length === 0) { - this.locked = false; - return; - } - this.locked = locked_; - }); - WaitGroup = $pkg.WaitGroup = $newType(0, $kindStruct, "nosync.WaitGroup", true, "github.com/gopherjs/gopherjs/nosync", true, function(counter_) { - this.$val = this; - if (arguments.length === 0) { - this.counter = 0; - return; - } - this.counter = counter_; - }); - Map = $pkg.Map = $newType(0, $kindStruct, "nosync.Map", true, "github.com/gopherjs/gopherjs/nosync", true, function(m_) { - this.$val = this; - if (arguments.length === 0) { - this.m = false; - return; - } - this.m = m_; - }); - sliceType = $sliceType($emptyInterface); - ptrType = $ptrType(Pool); - funcType = $funcType([], [$emptyInterface], false); - funcType$1 = $funcType([], [], false); - ptrType$1 = $ptrType(Once); - ptrType$2 = $ptrType(Mutex); - ptrType$4 = $ptrType(WaitGroup); - funcType$2 = $funcType([$emptyInterface, $emptyInterface], [$Bool], false); - ptrType$5 = $ptrType(Map); - mapType = $mapType($emptyInterface, $emptyInterface); - Pool.ptr.prototype.Get = function() { - var {$24r, _r, p, x, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (p.store.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.store.$length === 0) { */ case 1: - /* */ if (!(p.New === $throwNilPointerError)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(p.New === $throwNilPointerError)) { */ case 3: - _r = p.New(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 6; case 6: return $24r; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* } */ case 2: - x$2 = (x = p.store, x$1 = p.store.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - p.store = $subslice(p.store, 0, (p.store.$length - 1 >> 0)); - $s = -1; return x$2; - /* */ } return; } var $f = {$blk: Pool.ptr.prototype.Get, $c: true, $r, $24r, _r, p, x, x$1, x$2, $s};return $f; - }; - Pool.prototype.Get = function() { return this.$val.Get(); }; - Pool.ptr.prototype.Put = function(x) { - var p, x; - p = this; - if ($interfaceIsEqual(x, $ifaceNil)) { - return; - } - p.store = $append(p.store, x); - }; - Pool.prototype.Put = function(x) { return this.$val.Put(x); }; - Once.ptr.prototype.Do = function(f) { - var {f, o, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - o = [o]; - o[0] = this; - /* */ if (o[0].done) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (o[0].done) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - if (o[0].doing) { - $panic(new $String("nosync: Do called within f")); - } - o[0].doing = true; - $deferred.push([(function(o) { return function() { - o[0].doing = false; - o[0].done = true; - }; })(o), []]); - $r = f(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Once.ptr.prototype.Do, $c: true, $r, f, o, $s, $deferred};return $f; } } - }; - Once.prototype.Do = function(f) { return this.$val.Do(f); }; - Mutex.ptr.prototype.Lock = function() { - var m; - m = this; - if (m.locked) { - $panic(new $String("nosync: mutex is already locked")); - } - m.locked = true; - }; - Mutex.prototype.Lock = function() { return this.$val.Lock(); }; - Mutex.ptr.prototype.Unlock = function() { - var m; - m = this; - if (!m.locked) { - $panic(new $String("nosync: unlock of unlocked mutex")); - } - m.locked = false; - }; - Mutex.prototype.Unlock = function() { return this.$val.Unlock(); }; - WaitGroup.ptr.prototype.Add = function(delta) { - var delta, wg; - wg = this; - wg.counter = wg.counter + (delta) >> 0; - if (wg.counter < 0) { - $panic(new $String("sync: negative WaitGroup counter")); - } - }; - WaitGroup.prototype.Add = function(delta) { return this.$val.Add(delta); }; - WaitGroup.ptr.prototype.Done = function() { - var wg; - wg = this; - wg.Add(-1); - }; - WaitGroup.prototype.Done = function() { return this.$val.Done(); }; - WaitGroup.ptr.prototype.Wait = function() { - var wg; - wg = this; - if (!((wg.counter === 0))) { - $panic(new $String("sync: WaitGroup counter not zero")); - } - }; - WaitGroup.prototype.Wait = function() { return this.$val.Wait(); }; - Map.ptr.prototype.Load = function(key) { - var _entry, _tmp, _tmp$1, _tuple, key, m, ok, value; - value = $ifaceNil; - ok = false; - m = this; - _tuple = (_entry = m.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - value = _tuple[0]; - ok = _tuple[1]; - _tmp = value; - _tmp$1 = ok; - value = _tmp; - ok = _tmp$1; - return [value, ok]; - }; - Map.prototype.Load = function(key) { return this.$val.Load(key); }; - Map.ptr.prototype.Store = function(key, value) { - var _key, key, m, value; - m = this; - if (m.m === false) { - m.m = {}; - } - _key = key; (m.m || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: value }; - }; - Map.prototype.Store = function(key, value) { return this.$val.Store(key, value); }; - Map.ptr.prototype.LoadOrStore = function(key, value) { - var _entry, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, actual, key, loaded, m, ok, value, value$1; - actual = $ifaceNil; - loaded = false; - m = this; - _tuple = (_entry = m.m[$emptyInterface.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - value$1 = _tuple[0]; - ok = _tuple[1]; - if (ok) { - _tmp = value$1; - _tmp$1 = true; - actual = _tmp; - loaded = _tmp$1; - return [actual, loaded]; - } - if (m.m === false) { - m.m = {}; - } - _key = key; (m.m || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: value }; - _tmp$2 = value; - _tmp$3 = false; - actual = _tmp$2; - loaded = _tmp$3; - return [actual, loaded]; - }; - Map.prototype.LoadOrStore = function(key, value) { return this.$val.LoadOrStore(key, value); }; - Map.ptr.prototype.Delete = function(key) { - var key, m; - m = this; - if (m.m === false) { - return; - } - delete m.m[$emptyInterface.keyFor(key)]; - }; - Map.prototype.Delete = function(key) { return this.$val.Delete(key); }; - Map.ptr.prototype.Range = function(f) { - var {_entry, _i, _keys, _r, _ref, f, k, m, v, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _ref = m.m; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - k = _entry.k; - v = _entry.v; - _r = f(k, v); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r) { */ case 3: - /* break; */ $s = 2; continue; - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Map.ptr.prototype.Range, $c: true, $r, _entry, _i, _keys, _r, _ref, f, k, m, v, $s};return $f; - }; - Map.prototype.Range = function(f) { return this.$val.Range(f); }; - ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$emptyInterface], [], false)}]; - ptrType$1.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([funcType$1], [], false)}]; - ptrType$2.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; - ptrType$4.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; - ptrType$5.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [], false)}, {prop: "LoadOrStore", name: "LoadOrStore", pkg: "", typ: $funcType([$emptyInterface, $emptyInterface], [$emptyInterface, $Bool], false)}, {prop: "Delete", name: "Delete", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$2], [], false)}]; - Pool.init("github.com/gopherjs/gopherjs/nosync", [{prop: "store", name: "store", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "New", name: "New", embedded: false, exported: true, typ: funcType, tag: ""}]); - Once.init("github.com/gopherjs/gopherjs/nosync", [{prop: "doing", name: "doing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); - Mutex.init("github.com/gopherjs/gopherjs/nosync", [{prop: "locked", name: "locked", embedded: false, exported: false, typ: $Bool, tag: ""}]); - WaitGroup.init("github.com/gopherjs/gopherjs/nosync", [{prop: "counter", name: "counter", embedded: false, exported: false, typ: $Int, tag: ""}]); - Map.init("github.com/gopherjs/gopherjs/nosync", [{prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["time"] = (function() { - var $pkg = {}, $init, errors, js$1, nosync, runtime, syscall, js, Location, zone, zoneTrans, ruleKind, rule, Time, Month, Weekday, Duration, Timer, ParseError, runtimeTimer, sliceType, sliceType$1, ptrType, sliceType$2, sliceType$3, ptrType$2, arrayType$2, chanType, funcType, arrayType$3, arrayType$4, arrayType$5, structType, ptrType$4, chanType$1, ptrType$6, ptrType$7, funcType$1, ptrType$8, badData, utcLoc, utcLoc$24ptr, localLoc, localLoc$24ptr, localOnce, errLocation, daysBefore, startNano, std0x, longDayNames, shortDayNames, shortMonthNames, longMonthNames, atoiError, errBad, errLeadingInt, unitMap, zoneSources, x, _r, FixedZone, tzset, tzsetName, tzsetOffset, tzsetRule, tzsetNum, tzruleTime, absWeekday, absClock, fmtFrac, fmtInt, lessThanHalf, Since, Until, absDate, daysIn, daysSinceEpoch, runtimeNano, Now, unixTime, Unix, isLeap, norm, Date, div, when, NewTimer, sendTime, After, AfterFunc, goFunc, startsWithLowerCase, nextStdChunk, match, lookup, appendInt, atoi, stdFracSecond, digitsLen, separator, formatNano, quote, isDigit, getnum, getnum3, cutspace, skip, Parse, parse, parseTimeZone, parseGMT, parseSignedOffset, commaOrPeriod, parseNanoseconds, leadingInt, leadingFraction, ParseDuration, initLocal, itoa, init, now, Sleep, startTimer, stopTimer, modTimer, resetTimer; - errors = $packages["errors"]; - js$1 = $packages["github.com/gopherjs/gopherjs/js"]; - nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; - runtime = $packages["runtime"]; - syscall = $packages["syscall"]; - js = $packages["syscall/js"]; - Location = $pkg.Location = $newType(0, $kindStruct, "time.Location", true, "time", true, function(name_, zone_, tx_, extend_, cacheStart_, cacheEnd_, cacheZone_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.zone = sliceType.nil; - this.tx = sliceType$1.nil; - this.extend = ""; - this.cacheStart = new $Int64(0, 0); - this.cacheEnd = new $Int64(0, 0); - this.cacheZone = ptrType.nil; - return; - } - this.name = name_; - this.zone = zone_; - this.tx = tx_; - this.extend = extend_; - this.cacheStart = cacheStart_; - this.cacheEnd = cacheEnd_; - this.cacheZone = cacheZone_; - }); - zone = $pkg.zone = $newType(0, $kindStruct, "time.zone", true, "time", false, function(name_, offset_, isDST_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.offset = 0; - this.isDST = false; - return; - } - this.name = name_; - this.offset = offset_; - this.isDST = isDST_; - }); - zoneTrans = $pkg.zoneTrans = $newType(0, $kindStruct, "time.zoneTrans", true, "time", false, function(when_, index_, isstd_, isutc_) { - this.$val = this; - if (arguments.length === 0) { - this.when = new $Int64(0, 0); - this.index = 0; - this.isstd = false; - this.isutc = false; - return; - } - this.when = when_; - this.index = index_; - this.isstd = isstd_; - this.isutc = isutc_; - }); - ruleKind = $pkg.ruleKind = $newType(4, $kindInt, "time.ruleKind", true, "time", false, null); - rule = $pkg.rule = $newType(0, $kindStruct, "time.rule", true, "time", false, function(kind_, day_, week_, mon_, time_) { - this.$val = this; - if (arguments.length === 0) { - this.kind = 0; - this.day = 0; - this.week = 0; - this.mon = 0; - this.time = 0; - return; - } - this.kind = kind_; - this.day = day_; - this.week = week_; - this.mon = mon_; - this.time = time_; - }); - Time = $pkg.Time = $newType(0, $kindStruct, "time.Time", true, "time", true, function(wall_, ext_, loc_) { - this.$val = this; - if (arguments.length === 0) { - this.wall = new $Uint64(0, 0); - this.ext = new $Int64(0, 0); - this.loc = ptrType$2.nil; - return; - } - this.wall = wall_; - this.ext = ext_; - this.loc = loc_; - }); - Month = $pkg.Month = $newType(4, $kindInt, "time.Month", true, "time", true, null); - Weekday = $pkg.Weekday = $newType(4, $kindInt, "time.Weekday", true, "time", true, null); - Duration = $pkg.Duration = $newType(8, $kindInt64, "time.Duration", true, "time", true, null); - Timer = $pkg.Timer = $newType(0, $kindStruct, "time.Timer", true, "time", true, function(C_, r_) { - this.$val = this; - if (arguments.length === 0) { - this.C = $chanNil; - this.r = new runtimeTimer.ptr(0, new $Int64(0, 0), new $Int64(0, 0), $throwNilPointerError, $ifaceNil, 0, null, false); - return; - } - this.C = C_; - this.r = r_; - }); - ParseError = $pkg.ParseError = $newType(0, $kindStruct, "time.ParseError", true, "time", true, function(Layout_, Value_, LayoutElem_, ValueElem_, Message_) { - this.$val = this; - if (arguments.length === 0) { - this.Layout = ""; - this.Value = ""; - this.LayoutElem = ""; - this.ValueElem = ""; - this.Message = ""; - return; - } - this.Layout = Layout_; - this.Value = Value_; - this.LayoutElem = LayoutElem_; - this.ValueElem = ValueElem_; - this.Message = Message_; - }); - runtimeTimer = $pkg.runtimeTimer = $newType(0, $kindStruct, "time.runtimeTimer", true, "time", false, function(i_, when_, period_, f_, arg_, seq_, timeout_, active_) { - this.$val = this; - if (arguments.length === 0) { - this.i = 0; - this.when = new $Int64(0, 0); - this.period = new $Int64(0, 0); - this.f = $throwNilPointerError; - this.arg = $ifaceNil; - this.seq = 0; - this.timeout = null; - this.active = false; - return; - } - this.i = i_; - this.when = when_; - this.period = period_; - this.f = f_; - this.arg = arg_; - this.seq = seq_; - this.timeout = timeout_; - this.active = active_; - }); - sliceType = $sliceType(zone); - sliceType$1 = $sliceType(zoneTrans); - ptrType = $ptrType(zone); - sliceType$2 = $sliceType($String); - sliceType$3 = $sliceType($Uint8); - ptrType$2 = $ptrType(Location); - arrayType$2 = $arrayType($Uint8, 32); - chanType = $chanType(Time, false, false); - funcType = $funcType([], [], false); - arrayType$3 = $arrayType($Uint8, 20); - arrayType$4 = $arrayType($Uint8, 9); - arrayType$5 = $arrayType($Uint8, 64); - structType = $structType("", []); - ptrType$4 = $ptrType(Time); - chanType$1 = $chanType(Time, false, true); - ptrType$6 = $ptrType(Timer); - ptrType$7 = $ptrType(ParseError); - funcType$1 = $funcType([$emptyInterface, $Uintptr], [], false); - ptrType$8 = $ptrType(js$1.Object); - Location.ptr.prototype.get = function() { - var {l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (l === ptrType$2.nil) { - $s = -1; return utcLoc; - } - /* */ if (l === localLoc) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (l === localLoc) { */ case 1: - $r = localOnce.Do(initLocal); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return l; - /* */ } return; } var $f = {$blk: Location.ptr.prototype.get, $c: true, $r, l, $s};return $f; - }; - Location.prototype.get = function() { return this.$val.get(); }; - Location.ptr.prototype.String = function() { - var {$24r, _r$1, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r$1 = l.get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1.name; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Location.ptr.prototype.String, $c: true, $r, $24r, _r$1, l, $s};return $f; - }; - Location.prototype.String = function() { return this.$val.String(); }; - FixedZone = function(name, offset) { - var l, name, offset, x$1; - l = new Location.ptr(name, new sliceType([new zone.ptr(name, offset, false)]), new sliceType$1([new zoneTrans.ptr(new $Int64(-2147483648, 0), 0, false, false)]), "", new $Int64(-2147483648, 0), new $Int64(2147483647, 4294967295), ptrType.nil); - l.cacheZone = (x$1 = l.zone, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - return l; - }; - $pkg.FixedZone = FixedZone; - Location.ptr.prototype.lookup = function(sec) { - var {_q, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, eend, eisDST, ename, end, eoffset, estart, hi, isDST, l, lim, lo, m, name, offset, ok, sec, start, tx, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, zone$1, zone$2, zone$3, $s, $r, $c} = $restore(this, {sec}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = ""; - offset = 0; - start = new $Int64(0, 0); - end = new $Int64(0, 0); - isDST = false; - l = this; - _r$1 = l.get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - l = _r$1; - if (l.zone.$length === 0) { - name = "UTC"; - offset = 0; - start = new $Int64(-2147483648, 0); - end = new $Int64(2147483647, 4294967295); - isDST = false; - $s = -1; return [name, offset, start, end, isDST]; - } - zone$1 = l.cacheZone; - if (!(zone$1 === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { - name = zone$1.name; - offset = zone$1.offset; - start = l.cacheStart; - end = l.cacheEnd; - isDST = zone$1.isDST; - $s = -1; return [name, offset, start, end, isDST]; - } - if ((l.tx.$length === 0) || (x$3 = (x$4 = l.tx, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])).when, (sec.$high < x$3.$high || (sec.$high === x$3.$high && sec.$low < x$3.$low)))) { - zone$2 = (x$5 = l.zone, x$6 = l.lookupFirstZone(), ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); - name = zone$2.name; - offset = zone$2.offset; - start = new $Int64(-2147483648, 0); - if (l.tx.$length > 0) { - end = (x$7 = l.tx, (0 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 0])).when; - } else { - end = new $Int64(2147483647, 4294967295); - } - isDST = zone$2.isDST; - $s = -1; return [name, offset, start, end, isDST]; - } - tx = l.tx; - end = new $Int64(2147483647, 4294967295); - lo = 0; - hi = tx.$length; - while (true) { - if (!((hi - lo >> 0) > 1)) { break; } - m = lo + (_q = ((hi - lo >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - lim = ((m < 0 || m >= tx.$length) ? ($throwRuntimeError("index out of range"), undefined) : tx.$array[tx.$offset + m]).when; - if ((sec.$high < lim.$high || (sec.$high === lim.$high && sec.$low < lim.$low))) { - end = lim; - hi = m; - } else { - lo = m; - } - } - zone$3 = (x$8 = l.zone, x$9 = ((lo < 0 || lo >= tx.$length) ? ($throwRuntimeError("index out of range"), undefined) : tx.$array[tx.$offset + lo]).index, ((x$9 < 0 || x$9 >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + x$9])); - name = zone$3.name; - offset = zone$3.offset; - start = ((lo < 0 || lo >= tx.$length) ? ($throwRuntimeError("index out of range"), undefined) : tx.$array[tx.$offset + lo]).when; - isDST = zone$3.isDST; - if ((lo === (tx.$length - 1 >> 0)) && !(l.extend === "")) { - _tuple = tzset(l.extend, end, sec); - ename = _tuple[0]; - eoffset = _tuple[1]; - estart = _tuple[2]; - eend = _tuple[3]; - eisDST = _tuple[4]; - ok = _tuple[5]; - if (ok) { - _tmp = ename; - _tmp$1 = eoffset; - _tmp$2 = estart; - _tmp$3 = eend; - _tmp$4 = eisDST; - name = _tmp; - offset = _tmp$1; - start = _tmp$2; - end = _tmp$3; - isDST = _tmp$4; - $s = -1; return [name, offset, start, end, isDST]; - } - } - $s = -1; return [name, offset, start, end, isDST]; - /* */ } return; } var $f = {$blk: Location.ptr.prototype.lookup, $c: true, $r, _q, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, eend, eisDST, ename, end, eoffset, estart, hi, isDST, l, lim, lo, m, name, offset, ok, sec, start, tx, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, zone$1, zone$2, zone$3, $s};return $f; - }; - Location.prototype.lookup = function(sec) { return this.$val.lookup(sec); }; - Location.ptr.prototype.lookupFirstZone = function() { - var _i, _ref, l, x$1, x$2, x$3, x$4, x$5, x$6, zi, zi$1; - l = this; - if (!l.firstZoneUsed()) { - return 0; - } - if (l.tx.$length > 0 && (x$1 = l.zone, x$2 = (x$3 = l.tx, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])).index, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2])).isDST) { - zi = (((x$4 = l.tx, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])).index >> 0)) - 1 >> 0; - while (true) { - if (!(zi >= 0)) { break; } - if (!(x$5 = l.zone, ((zi < 0 || zi >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + zi])).isDST) { - return zi; - } - zi = zi - (1) >> 0; - } - } - _ref = l.zone; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - zi$1 = _i; - if (!(x$6 = l.zone, ((zi$1 < 0 || zi$1 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + zi$1])).isDST) { - return zi$1; - } - _i++; - } - return 0; - }; - Location.prototype.lookupFirstZone = function() { return this.$val.lookupFirstZone(); }; - Location.ptr.prototype.firstZoneUsed = function() { - var _i, _ref, l, tx; - l = this; - _ref = l.tx; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - tx = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), zoneTrans); - if (tx.index === 0) { - return true; - } - _i++; - } - return false; - }; - Location.prototype.firstZoneUsed = function() { return this.$val.firstZoneUsed(); }; - tzset = function(s, initEnd, sec) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, abs, d, dstIsDST, dstName, dstOffset, end, endRule, endSec, initEnd, isDST, name, offset, ok, s, sec, start, startRule, startSec, stdIsDST, stdName, stdOffset, x$1, x$2, x$3, x$4, x$5, x$6, yday, year, ysec; - name = ""; - offset = 0; - start = new $Int64(0, 0); - end = new $Int64(0, 0); - isDST = false; - ok = false; - _tmp = ""; - _tmp$1 = ""; - stdName = _tmp; - dstName = _tmp$1; - _tmp$2 = 0; - _tmp$3 = 0; - stdOffset = _tmp$2; - dstOffset = _tmp$3; - _tuple = tzsetName(s); - stdName = _tuple[0]; - s = _tuple[1]; - ok = _tuple[2]; - if (ok) { - _tuple$1 = tzsetOffset(s); - stdOffset = _tuple$1[0]; - s = _tuple$1[1]; - ok = _tuple$1[2]; - } - if (!ok) { - _tmp$4 = ""; - _tmp$5 = 0; - _tmp$6 = new $Int64(0, 0); - _tmp$7 = new $Int64(0, 0); - _tmp$8 = false; - _tmp$9 = false; - name = _tmp$4; - offset = _tmp$5; - start = _tmp$6; - end = _tmp$7; - isDST = _tmp$8; - ok = _tmp$9; - return [name, offset, start, end, isDST, ok]; - } - stdOffset = -stdOffset; - if ((s.length === 0) || (s.charCodeAt(0) === 44)) { - _tmp$10 = stdName; - _tmp$11 = stdOffset; - _tmp$12 = initEnd; - _tmp$13 = new $Int64(2147483647, 4294967295); - _tmp$14 = false; - _tmp$15 = true; - name = _tmp$10; - offset = _tmp$11; - start = _tmp$12; - end = _tmp$13; - isDST = _tmp$14; - ok = _tmp$15; - return [name, offset, start, end, isDST, ok]; - } - _tuple$2 = tzsetName(s); - dstName = _tuple$2[0]; - s = _tuple$2[1]; - ok = _tuple$2[2]; - if (ok) { - if ((s.length === 0) || (s.charCodeAt(0) === 44)) { - dstOffset = stdOffset + 3600 >> 0; - } else { - _tuple$3 = tzsetOffset(s); - dstOffset = _tuple$3[0]; - s = _tuple$3[1]; - ok = _tuple$3[2]; - dstOffset = -dstOffset; - } - } - if (!ok) { - _tmp$16 = ""; - _tmp$17 = 0; - _tmp$18 = new $Int64(0, 0); - _tmp$19 = new $Int64(0, 0); - _tmp$20 = false; - _tmp$21 = false; - name = _tmp$16; - offset = _tmp$17; - start = _tmp$18; - end = _tmp$19; - isDST = _tmp$20; - ok = _tmp$21; - return [name, offset, start, end, isDST, ok]; - } - if (s.length === 0) { - s = ",M3.2.0,M11.1.0"; - } - if (!((s.charCodeAt(0) === 44)) && !((s.charCodeAt(0) === 59))) { - _tmp$22 = ""; - _tmp$23 = 0; - _tmp$24 = new $Int64(0, 0); - _tmp$25 = new $Int64(0, 0); - _tmp$26 = false; - _tmp$27 = false; - name = _tmp$22; - offset = _tmp$23; - start = _tmp$24; - end = _tmp$25; - isDST = _tmp$26; - ok = _tmp$27; - return [name, offset, start, end, isDST, ok]; - } - s = $substring(s, 1); - _tmp$28 = new rule.ptr(0, 0, 0, 0, 0); - _tmp$29 = new rule.ptr(0, 0, 0, 0, 0); - startRule = $clone(_tmp$28, rule); - endRule = $clone(_tmp$29, rule); - _tuple$4 = tzsetRule(s); - rule.copy(startRule, _tuple$4[0]); - s = _tuple$4[1]; - ok = _tuple$4[2]; - if (!ok || (s.length === 0) || !((s.charCodeAt(0) === 44))) { - _tmp$30 = ""; - _tmp$31 = 0; - _tmp$32 = new $Int64(0, 0); - _tmp$33 = new $Int64(0, 0); - _tmp$34 = false; - _tmp$35 = false; - name = _tmp$30; - offset = _tmp$31; - start = _tmp$32; - end = _tmp$33; - isDST = _tmp$34; - ok = _tmp$35; - return [name, offset, start, end, isDST, ok]; - } - s = $substring(s, 1); - _tuple$5 = tzsetRule(s); - rule.copy(endRule, _tuple$5[0]); - s = _tuple$5[1]; - ok = _tuple$5[2]; - if (!ok || s.length > 0) { - _tmp$36 = ""; - _tmp$37 = 0; - _tmp$38 = new $Int64(0, 0); - _tmp$39 = new $Int64(0, 0); - _tmp$40 = false; - _tmp$41 = false; - name = _tmp$36; - offset = _tmp$37; - start = _tmp$38; - end = _tmp$39; - isDST = _tmp$40; - ok = _tmp$41; - return [name, offset, start, end, isDST, ok]; - } - _tuple$6 = absDate(((x$1 = (x$2 = new $Int64(sec.$high + 14, sec.$low + 2006054656), new $Int64(x$2.$high + 2147483631, x$2.$low + 2739393024)), new $Uint64(x$1.$high, x$1.$low))), false); - year = _tuple$6[0]; - yday = _tuple$6[3]; - ysec = (x$3 = (new $Int64(0, ($imul(yday, 86400)))), x$4 = $div64(sec, new $Int64(0, 86400), true), new $Int64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)); - d = daysSinceEpoch(year); - abs = ((x$5 = $mul64(d, new $Uint64(0, 86400)), new $Int64(x$5.$high, x$5.$low))); - abs = (x$6 = new $Int64(-2147483647, 3844486912), new $Int64(abs.$high + x$6.$high, abs.$low + x$6.$low)); - startSec = (new $Int64(0, tzruleTime(year, $clone(startRule, rule), stdOffset))); - endSec = (new $Int64(0, tzruleTime(year, $clone(endRule, rule), dstOffset))); - _tmp$42 = true; - _tmp$43 = false; - dstIsDST = _tmp$42; - stdIsDST = _tmp$43; - if ((endSec.$high < startSec.$high || (endSec.$high === startSec.$high && endSec.$low < startSec.$low))) { - _tmp$44 = endSec; - _tmp$45 = startSec; - startSec = _tmp$44; - endSec = _tmp$45; - _tmp$46 = dstName; - _tmp$47 = stdName; - stdName = _tmp$46; - dstName = _tmp$47; - _tmp$48 = dstOffset; - _tmp$49 = stdOffset; - stdOffset = _tmp$48; - dstOffset = _tmp$49; - _tmp$50 = dstIsDST; - _tmp$51 = stdIsDST; - stdIsDST = _tmp$50; - dstIsDST = _tmp$51; - } - if ((ysec.$high < startSec.$high || (ysec.$high === startSec.$high && ysec.$low < startSec.$low))) { - _tmp$52 = stdName; - _tmp$53 = stdOffset; - _tmp$54 = abs; - _tmp$55 = new $Int64(startSec.$high + abs.$high, startSec.$low + abs.$low); - _tmp$56 = stdIsDST; - _tmp$57 = true; - name = _tmp$52; - offset = _tmp$53; - start = _tmp$54; - end = _tmp$55; - isDST = _tmp$56; - ok = _tmp$57; - return [name, offset, start, end, isDST, ok]; - } else if ((ysec.$high > endSec.$high || (ysec.$high === endSec.$high && ysec.$low >= endSec.$low))) { - _tmp$58 = stdName; - _tmp$59 = stdOffset; - _tmp$60 = new $Int64(endSec.$high + abs.$high, endSec.$low + abs.$low); - _tmp$61 = new $Int64(abs.$high + 0, abs.$low + 31536000); - _tmp$62 = stdIsDST; - _tmp$63 = true; - name = _tmp$58; - offset = _tmp$59; - start = _tmp$60; - end = _tmp$61; - isDST = _tmp$62; - ok = _tmp$63; - return [name, offset, start, end, isDST, ok]; - } else { - _tmp$64 = dstName; - _tmp$65 = dstOffset; - _tmp$66 = new $Int64(startSec.$high + abs.$high, startSec.$low + abs.$low); - _tmp$67 = new $Int64(endSec.$high + abs.$high, endSec.$low + abs.$low); - _tmp$68 = dstIsDST; - _tmp$69 = true; - name = _tmp$64; - offset = _tmp$65; - start = _tmp$66; - end = _tmp$67; - isDST = _tmp$68; - ok = _tmp$69; - return [name, offset, start, end, isDST, ok]; - } - }; - tzsetName = function(s) { - var _1, _i, _i$1, _ref, _ref$1, _rune, _rune$1, i, i$1, r, r$1, s; - if (s.length === 0) { - return ["", "", false]; - } - if (!((s.charCodeAt(0) === 60))) { - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - r = _rune[0]; - _1 = r; - if ((_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55)) || (_1 === (56)) || (_1 === (57)) || (_1 === (44)) || (_1 === (45)) || (_1 === (43))) { - if (i < 3) { - return ["", "", false]; - } - return [$substring(s, 0, i), $substring(s, i), true]; - } - _i += _rune[1]; - } - if (s.length < 3) { - return ["", "", false]; - } - return [s, "", true]; - } else { - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.length)) { break; } - _rune$1 = $decodeRune(_ref$1, _i$1); - i$1 = _i$1; - r$1 = _rune$1[0]; - if (r$1 === 62) { - return [$substring(s, 1, i$1), $substring(s, (i$1 + 1 >> 0)), true]; - } - _i$1 += _rune$1[1]; - } - return ["", "", false]; - } - }; - tzsetOffset = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, hours, mins, neg, off, offset, ok, rest, s, secs; - offset = 0; - rest = ""; - ok = false; - if (s.length === 0) { - _tmp = 0; - _tmp$1 = ""; - _tmp$2 = false; - offset = _tmp; - rest = _tmp$1; - ok = _tmp$2; - return [offset, rest, ok]; - } - neg = false; - if (s.charCodeAt(0) === 43) { - s = $substring(s, 1); - } else if (s.charCodeAt(0) === 45) { - s = $substring(s, 1); - neg = true; - } - hours = 0; - _tuple = tzsetNum(s, 0, 168); - hours = _tuple[0]; - s = _tuple[1]; - ok = _tuple[2]; - if (!ok) { - _tmp$3 = 0; - _tmp$4 = ""; - _tmp$5 = false; - offset = _tmp$3; - rest = _tmp$4; - ok = _tmp$5; - return [offset, rest, ok]; - } - off = $imul(hours, 3600); - if ((s.length === 0) || !((s.charCodeAt(0) === 58))) { - if (neg) { - off = -off; - } - _tmp$6 = off; - _tmp$7 = s; - _tmp$8 = true; - offset = _tmp$6; - rest = _tmp$7; - ok = _tmp$8; - return [offset, rest, ok]; - } - mins = 0; - _tuple$1 = tzsetNum($substring(s, 1), 0, 59); - mins = _tuple$1[0]; - s = _tuple$1[1]; - ok = _tuple$1[2]; - if (!ok) { - _tmp$9 = 0; - _tmp$10 = ""; - _tmp$11 = false; - offset = _tmp$9; - rest = _tmp$10; - ok = _tmp$11; - return [offset, rest, ok]; - } - off = off + (($imul(mins, 60))) >> 0; - if ((s.length === 0) || !((s.charCodeAt(0) === 58))) { - if (neg) { - off = -off; - } - _tmp$12 = off; - _tmp$13 = s; - _tmp$14 = true; - offset = _tmp$12; - rest = _tmp$13; - ok = _tmp$14; - return [offset, rest, ok]; - } - secs = 0; - _tuple$2 = tzsetNum($substring(s, 1), 0, 59); - secs = _tuple$2[0]; - s = _tuple$2[1]; - ok = _tuple$2[2]; - if (!ok) { - _tmp$15 = 0; - _tmp$16 = ""; - _tmp$17 = false; - offset = _tmp$15; - rest = _tmp$16; - ok = _tmp$17; - return [offset, rest, ok]; - } - off = off + (secs) >> 0; - if (neg) { - off = -off; - } - _tmp$18 = off; - _tmp$19 = s; - _tmp$20 = true; - offset = _tmp$18; - rest = _tmp$19; - ok = _tmp$20; - return [offset, rest, ok]; - }; - tzsetRule = function(s) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, day, day$1, jday, mon, offset, ok, r, s, week; - r = new rule.ptr(0, 0, 0, 0, 0); - if (s.length === 0) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - ok = false; - if (s.charCodeAt(0) === 74) { - jday = 0; - _tuple = tzsetNum($substring(s, 1), 1, 365); - jday = _tuple[0]; - s = _tuple[1]; - ok = _tuple[2]; - if (!ok) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - r.kind = 0; - r.day = jday; - } else if (s.charCodeAt(0) === 77) { - mon = 0; - _tuple$1 = tzsetNum($substring(s, 1), 1, 12); - mon = _tuple$1[0]; - s = _tuple$1[1]; - ok = _tuple$1[2]; - if (!ok || (s.length === 0) || !((s.charCodeAt(0) === 46))) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - week = 0; - _tuple$2 = tzsetNum($substring(s, 1), 1, 5); - week = _tuple$2[0]; - s = _tuple$2[1]; - ok = _tuple$2[2]; - if (!ok || (s.length === 0) || !((s.charCodeAt(0) === 46))) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - day = 0; - _tuple$3 = tzsetNum($substring(s, 1), 0, 6); - day = _tuple$3[0]; - s = _tuple$3[1]; - ok = _tuple$3[2]; - if (!ok) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - r.kind = 2; - r.day = day; - r.week = week; - r.mon = mon; - } else { - day$1 = 0; - _tuple$4 = tzsetNum(s, 0, 365); - day$1 = _tuple$4[0]; - s = _tuple$4[1]; - ok = _tuple$4[2]; - if (!ok) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - r.kind = 1; - r.day = day$1; - } - if ((s.length === 0) || !((s.charCodeAt(0) === 47))) { - r.time = 7200; - return [r, s, true]; - } - _tuple$5 = tzsetOffset($substring(s, 1)); - offset = _tuple$5[0]; - s = _tuple$5[1]; - ok = _tuple$5[2]; - if (!ok) { - return [new rule.ptr(0, 0, 0, 0, 0), "", false]; - } - r.time = offset; - return [r, s, true]; - }; - tzsetNum = function(s, min, max) { - var _i, _ref, _rune, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, i, max, min, num, ok, r, rest, s; - num = 0; - rest = ""; - ok = false; - if (s.length === 0) { - _tmp = 0; - _tmp$1 = ""; - _tmp$2 = false; - num = _tmp; - rest = _tmp$1; - ok = _tmp$2; - return [num, rest, ok]; - } - num = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - r = _rune[0]; - if (r < 48 || r > 57) { - if ((i === 0) || num < min) { - _tmp$3 = 0; - _tmp$4 = ""; - _tmp$5 = false; - num = _tmp$3; - rest = _tmp$4; - ok = _tmp$5; - return [num, rest, ok]; - } - _tmp$6 = num; - _tmp$7 = $substring(s, i); - _tmp$8 = true; - num = _tmp$6; - rest = _tmp$7; - ok = _tmp$8; - return [num, rest, ok]; - } - num = $imul(num, (10)); - num = num + ((((r >> 0)) - 48 >> 0)) >> 0; - if (num > max) { - _tmp$9 = 0; - _tmp$10 = ""; - _tmp$11 = false; - num = _tmp$9; - rest = _tmp$10; - ok = _tmp$11; - return [num, rest, ok]; - } - _i += _rune[1]; - } - if (num < min) { - _tmp$12 = 0; - _tmp$13 = ""; - _tmp$14 = false; - num = _tmp$12; - rest = _tmp$13; - ok = _tmp$14; - return [num, rest, ok]; - } - _tmp$15 = num; - _tmp$16 = ""; - _tmp$17 = true; - num = _tmp$15; - rest = _tmp$16; - ok = _tmp$17; - return [num, rest, ok]; - }; - tzruleTime = function(year, r, off) { - var _1, _q, _q$1, _q$2, _q$3, _r$1, _r$2, _r$3, d, dow, i, m1, off, r, s, x$1, year, yy0, yy1, yy2; - s = 0; - _1 = r.kind; - if (_1 === (0)) { - s = $imul(((r.day - 1 >> 0)), 86400); - if (isLeap(year) && r.day >= 60) { - s = s + (86400) >> 0; - } - } else if (_1 === (1)) { - s = $imul(r.day, 86400); - } else if (_1 === (2)) { - m1 = (_r$1 = ((r.mon + 9 >> 0)) % 12, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; - yy0 = year; - if (r.mon <= 2) { - yy0 = yy0 - (1) >> 0; - } - yy1 = (_q = yy0 / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - yy2 = (_r$2 = yy0 % 100, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")); - dow = (_r$3 = (((((((_q$1 = ((($imul(26, m1)) - 2 >> 0)) / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0) + yy2 >> 0) + (_q$2 = yy2 / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) + (_q$3 = yy1 / 4, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) - ($imul(2, yy1)) >> 0)) % 7, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); - if (dow < 0) { - dow = dow + (7) >> 0; - } - d = r.day - dow >> 0; - if (d < 0) { - d = d + (7) >> 0; - } - i = 1; - while (true) { - if (!(i < r.week)) { break; } - if ((d + 7 >> 0) >= daysIn(((r.mon >> 0)), year)) { - break; - } - d = d + (7) >> 0; - i = i + (1) >> 0; - } - d = d + ((((x$1 = r.mon - 1 >> 0, ((x$1 < 0 || x$1 >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[x$1])) >> 0))) >> 0; - if (isLeap(year) && r.mon > 2) { - d = d + (1) >> 0; - } - s = $imul(d, 86400); - } - return (s + r.time >> 0) - off >> 0; - }; - Location.ptr.prototype.lookupName = function(name, unix) { - var {_i, _i$1, _r$1, _r$2, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i$1, l, nam, name, offset, offset$1, ok, unix, x$1, x$2, x$3, zone$1, zone$2, $s, $r, $c} = $restore(this, {name, unix}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - offset = 0; - ok = false; - l = this; - _r$1 = l.get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - l = _r$1; - _ref = l.zone; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - i = _i; - zone$1 = (x$1 = l.zone, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - /* */ if (zone$1.name === name) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (zone$1.name === name) { */ case 4: - _r$2 = l.lookup((x$2 = (new $Int64(0, zone$1.offset)), new $Int64(unix.$high - x$2.$high, unix.$low - x$2.$low))); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - nam = _tuple[0]; - offset$1 = _tuple[1]; - if (nam === zone$1.name) { - _tmp = offset$1; - _tmp$1 = true; - offset = _tmp; - ok = _tmp$1; - $s = -1; return [offset, ok]; - } - /* } */ case 5: - _i++; - $s = 2; continue; - case 3: - _ref$1 = l.zone; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - zone$2 = (x$3 = l.zone, ((i$1 < 0 || i$1 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$1])); - if (zone$2.name === name) { - _tmp$2 = zone$2.offset; - _tmp$3 = true; - offset = _tmp$2; - ok = _tmp$3; - $s = -1; return [offset, ok]; - } - _i$1++; - } - $s = -1; return [offset, ok]; - /* */ } return; } var $f = {$blk: Location.ptr.prototype.lookupName, $c: true, $r, _i, _i$1, _r$1, _r$2, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i$1, l, nam, name, offset, offset$1, ok, unix, x$1, x$2, x$3, zone$1, zone$2, $s};return $f; - }; - Location.prototype.lookupName = function(name, unix) { return this.$val.lookupName(name, unix); }; - Time.ptr.prototype.nsec = function() { - var t, x$1; - t = this; - return (((x$1 = t.wall, new $Uint64(x$1.$high & 0, (x$1.$low & 1073741823) >>> 0)).$low >> 0)); - }; - Time.prototype.nsec = function() { return this.$val.nsec(); }; - Time.ptr.prototype.sec = function() { - var t, x$1, x$2, x$3, x$4; - t = this; - if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - return (x$3 = ((x$4 = $shiftRightUint64($shiftLeft64(t.wall, 1), 31), new $Int64(x$4.$high, x$4.$low))), new $Int64(13 + x$3.$high, 3618733952 + x$3.$low)); - } - return t.ext; - }; - Time.prototype.sec = function() { return this.$val.sec(); }; - Time.ptr.prototype.unixSec = function() { - var t, x$1; - t = this; - return (x$1 = t.sec(), new $Int64(x$1.$high + -15, x$1.$low + 2288912640)); - }; - Time.prototype.unixSec = function() { return this.$val.unixSec(); }; - Time.ptr.prototype.addSec = function(d) { - var d, dsec, sec, sum, t, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - t = this; - if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - sec = ((x$3 = $shiftRightUint64($shiftLeft64(t.wall, 1), 31), new $Int64(x$3.$high, x$3.$low))); - dsec = new $Int64(sec.$high + d.$high, sec.$low + d.$low); - if ((0 < dsec.$high || (0 === dsec.$high && 0 <= dsec.$low)) && (dsec.$high < 1 || (dsec.$high === 1 && dsec.$low <= 4294967295))) { - t.wall = (x$4 = (x$5 = (x$6 = t.wall, new $Uint64(x$6.$high & 0, (x$6.$low & 1073741823) >>> 0)), x$7 = $shiftLeft64((new $Uint64(dsec.$high, dsec.$low)), 30), new $Uint64(x$5.$high | x$7.$high, (x$5.$low | x$7.$low) >>> 0)), new $Uint64(x$4.$high | 2147483648, (x$4.$low | 0) >>> 0)); - return; - } - t.stripMono(); - } - sum = (x$8 = t.ext, new $Int64(x$8.$high + d.$high, x$8.$low + d.$low)); - if (((x$9 = t.ext, (sum.$high > x$9.$high || (sum.$high === x$9.$high && sum.$low > x$9.$low)))) === ((d.$high > 0 || (d.$high === 0 && d.$low > 0)))) { - t.ext = sum; - } else if ((d.$high > 0 || (d.$high === 0 && d.$low > 0))) { - t.ext = new $Int64(2147483647, 4294967295); - } else { - t.ext = new $Int64(-2147483648, 1); - } - }; - Time.prototype.addSec = function(d) { return this.$val.addSec(d); }; - Time.ptr.prototype.setLoc = function(loc) { - var loc, t; - t = this; - if (loc === utcLoc) { - loc = ptrType$2.nil; - } - t.stripMono(); - t.loc = loc; - }; - Time.prototype.setLoc = function(loc) { return this.$val.setLoc(loc); }; - Time.ptr.prototype.stripMono = function() { - var t, x$1, x$2, x$3, x$4; - t = this; - if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - t.ext = t.sec(); - t.wall = (x$3 = t.wall, x$4 = new $Uint64(0, 1073741823), new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)); - } - }; - Time.prototype.stripMono = function() { return this.$val.stripMono(); }; - Time.ptr.prototype.After = function(u) { - var t, ts, u, us, x$1, x$2, x$3, x$4, x$5, x$6; - t = this; - if (!((x$1 = (x$2 = (x$3 = t.wall, x$4 = u.wall, new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)), new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - return (x$5 = t.ext, x$6 = u.ext, (x$5.$high > x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low))); - } - ts = t.sec(); - us = u.sec(); - return (ts.$high > us.$high || (ts.$high === us.$high && ts.$low > us.$low)) || (ts.$high === us.$high && ts.$low === us.$low) && t.nsec() > u.nsec(); - }; - Time.prototype.After = function(u) { return this.$val.After(u); }; - Time.ptr.prototype.Before = function(u) { - var t, ts, u, us, x$1, x$2, x$3, x$4, x$5, x$6; - t = this; - if (!((x$1 = (x$2 = (x$3 = t.wall, x$4 = u.wall, new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)), new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - return (x$5 = t.ext, x$6 = u.ext, (x$5.$high < x$6.$high || (x$5.$high === x$6.$high && x$5.$low < x$6.$low))); - } - ts = t.sec(); - us = u.sec(); - return (ts.$high < us.$high || (ts.$high === us.$high && ts.$low < us.$low)) || (ts.$high === us.$high && ts.$low === us.$low) && t.nsec() < u.nsec(); - }; - Time.prototype.Before = function(u) { return this.$val.Before(u); }; - Time.ptr.prototype.Equal = function(u) { - var t, u, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; - t = this; - if (!((x$1 = (x$2 = (x$3 = t.wall, x$4 = u.wall, new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)), new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - return (x$5 = t.ext, x$6 = u.ext, (x$5.$high === x$6.$high && x$5.$low === x$6.$low)); - } - return (x$7 = t.sec(), x$8 = u.sec(), (x$7.$high === x$8.$high && x$7.$low === x$8.$low)) && (t.nsec() === u.nsec()); - }; - Time.prototype.Equal = function(u) { return this.$val.Equal(u); }; - Month.prototype.String = function() { - var buf, m, n, x$1; - m = this.$val; - if (1 <= m && m <= 12) { - return (x$1 = m - 1 >> 0, ((x$1 < 0 || x$1 >= longMonthNames.$length) ? ($throwRuntimeError("index out of range"), undefined) : longMonthNames.$array[longMonthNames.$offset + x$1])); - } - buf = $makeSlice(sliceType$3, 20); - n = fmtInt(buf, (new $Uint64(0, m))); - return "%!Month(" + ($bytesToString($subslice(buf, n))) + ")"; - }; - $ptrType(Month).prototype.String = function() { return new Month(this.$get()).String(); }; - Weekday.prototype.String = function() { - var buf, d, n; - d = this.$val; - if (0 <= d && d <= 6) { - return ((d < 0 || d >= longDayNames.$length) ? ($throwRuntimeError("index out of range"), undefined) : longDayNames.$array[longDayNames.$offset + d]); - } - buf = $makeSlice(sliceType$3, 20); - n = fmtInt(buf, (new $Uint64(0, d))); - return "%!Weekday(" + ($bytesToString($subslice(buf, n))) + ")"; - }; - $ptrType(Weekday).prototype.String = function() { return new Weekday(this.$get()).String(); }; - Time.ptr.prototype.IsZero = function() { - var t, x$1; - t = this; - return (x$1 = t.sec(), (x$1.$high === 0 && x$1.$low === 0)) && (t.nsec() === 0); - }; - Time.prototype.IsZero = function() { return this.$val.IsZero(); }; - Time.ptr.prototype.abs = function() { - var {_r$1, _r$2, _tuple, l, offset, sec, t, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - l = t.loc; - /* */ if (l === ptrType$2.nil || l === localLoc) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (l === ptrType$2.nil || l === localLoc) { */ case 1: - _r$1 = l.get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - l = _r$1; - /* } */ case 2: - sec = t.unixSec(); - /* */ if (!(l === utcLoc)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(l === utcLoc)) { */ case 4: - /* */ if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { */ case 6: - sec = (x$3 = (new $Int64(0, l.cacheZone.offset)), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); - $s = 8; continue; - /* } else { */ case 7: - _r$2 = l.lookup(sec); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - offset = _tuple[1]; - sec = (x$4 = (new $Int64(0, offset)), new $Int64(sec.$high + x$4.$high, sec.$low + x$4.$low)); - /* } */ case 8: - /* } */ case 5: - $s = -1; return ((x$5 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$5.$high, x$5.$low))); - /* */ } return; } var $f = {$blk: Time.ptr.prototype.abs, $c: true, $r, _r$1, _r$2, _tuple, l, offset, sec, t, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - Time.prototype.abs = function() { return this.$val.abs(); }; - Time.ptr.prototype.locabs = function() { - var {_r$1, _r$2, _tuple, abs, l, name, offset, sec, t, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = ""; - offset = 0; - abs = new $Uint64(0, 0); - t = this; - l = t.loc; - /* */ if (l === ptrType$2.nil || l === localLoc) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (l === ptrType$2.nil || l === localLoc) { */ case 1: - _r$1 = l.get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - l = _r$1; - /* } */ case 2: - sec = t.unixSec(); - /* */ if (!(l === utcLoc)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(l === utcLoc)) { */ case 4: - /* */ if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(l.cacheZone === ptrType.nil) && (x$1 = l.cacheStart, (x$1.$high < sec.$high || (x$1.$high === sec.$high && x$1.$low <= sec.$low))) && (x$2 = l.cacheEnd, (sec.$high < x$2.$high || (sec.$high === x$2.$high && sec.$low < x$2.$low)))) { */ case 7: - name = l.cacheZone.name; - offset = l.cacheZone.offset; - $s = 9; continue; - /* } else { */ case 8: - _r$2 = l.lookup(sec); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - name = _tuple[0]; - offset = _tuple[1]; - /* } */ case 9: - sec = (x$3 = (new $Int64(0, offset)), new $Int64(sec.$high + x$3.$high, sec.$low + x$3.$low)); - $s = 6; continue; - /* } else { */ case 5: - name = "UTC"; - /* } */ case 6: - abs = ((x$4 = new $Int64(sec.$high + 2147483646, sec.$low + 450480384), new $Uint64(x$4.$high, x$4.$low))); - $s = -1; return [name, offset, abs]; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.locabs, $c: true, $r, _r$1, _r$2, _tuple, abs, l, name, offset, sec, t, x$1, x$2, x$3, x$4, $s};return $f; - }; - Time.prototype.locabs = function() { return this.$val.locabs(); }; - Time.ptr.prototype.Date = function() { - var {_r$1, _tuple, day, month, t, year, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - year = 0; - month = 0; - day = 0; - t = this; - _r$1 = $clone(t, Time).date(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - year = _tuple[0]; - month = _tuple[1]; - day = _tuple[2]; - $s = -1; return [year, month, day]; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Date, $c: true, $r, _r$1, _tuple, day, month, t, year, $s};return $f; - }; - Time.prototype.Date = function() { return this.$val.Date(); }; - Time.ptr.prototype.Year = function() { - var {_r$1, _tuple, t, year, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).date(false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - year = _tuple[0]; - $s = -1; return year; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Year, $c: true, $r, _r$1, _tuple, t, year, $s};return $f; - }; - Time.prototype.Year = function() { return this.$val.Year(); }; - Time.ptr.prototype.Month = function() { - var {_r$1, _tuple, month, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).date(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - month = _tuple[1]; - $s = -1; return month; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Month, $c: true, $r, _r$1, _tuple, month, t, $s};return $f; - }; - Time.prototype.Month = function() { return this.$val.Month(); }; - Time.ptr.prototype.Day = function() { - var {_r$1, _tuple, day, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).date(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - day = _tuple[2]; - $s = -1; return day; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Day, $c: true, $r, _r$1, _tuple, day, t, $s};return $f; - }; - Time.prototype.Day = function() { return this.$val.Day(); }; - Time.ptr.prototype.Weekday = function() { - var {$24r, _r$1, _r$2, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = absWeekday(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Weekday, $c: true, $r, $24r, _r$1, _r$2, t, $s};return $f; - }; - Time.prototype.Weekday = function() { return this.$val.Weekday(); }; - absWeekday = function(abs) { - var _q, abs, sec; - sec = $div64((new $Uint64(abs.$high + 0, abs.$low + 86400)), new $Uint64(0, 604800), true); - return (((_q = ((sec.$low >> 0)) / 86400, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0)); - }; - Time.ptr.prototype.ISOWeek = function() { - var {_q, _r$1, _tmp, _tmp$1, _tuple, abs, d, t, week, x$1, yday, year, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - year = 0; - week = 0; - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - abs = _r$1; - d = 4 - absWeekday(abs) >> 0; - if (d === 4) { - d = -3; - } - abs = (x$1 = $mul64((new $Uint64(0, d)), new $Uint64(0, 86400)), new $Uint64(abs.$high + x$1.$high, abs.$low + x$1.$low)); - _tuple = absDate(abs, false); - year = _tuple[0]; - yday = _tuple[3]; - _tmp = year; - _tmp$1 = (_q = yday / 7, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; - year = _tmp; - week = _tmp$1; - $s = -1; return [year, week]; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.ISOWeek, $c: true, $r, _q, _r$1, _tmp, _tmp$1, _tuple, abs, d, t, week, x$1, yday, year, $s};return $f; - }; - Time.prototype.ISOWeek = function() { return this.$val.ISOWeek(); }; - Time.ptr.prototype.Clock = function() { - var {$24r, _r$1, _r$2, _tuple, hour, min, sec, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hour = 0; - min = 0; - sec = 0; - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = absClock(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - hour = _tuple[0]; - min = _tuple[1]; - sec = _tuple[2]; - $24r = [hour, min, sec]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Clock, $c: true, $r, $24r, _r$1, _r$2, _tuple, hour, min, sec, t, $s};return $f; - }; - Time.prototype.Clock = function() { return this.$val.Clock(); }; - absClock = function(abs) { - var _q, _q$1, abs, hour, min, sec; - hour = 0; - min = 0; - sec = 0; - sec = (($div64(abs, new $Uint64(0, 86400), true).$low >> 0)); - hour = (_q = sec / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - sec = sec - (($imul(hour, 3600))) >> 0; - min = (_q$1 = sec / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); - sec = sec - (($imul(min, 60))) >> 0; - return [hour, min, sec]; - }; - Time.ptr.prototype.Hour = function() { - var {$24r, _q, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = (_q = (($div64(_r$1, new $Uint64(0, 86400), true).$low >> 0)) / 3600, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Hour, $c: true, $r, $24r, _q, _r$1, t, $s};return $f; - }; - Time.prototype.Hour = function() { return this.$val.Hour(); }; - Time.ptr.prototype.Minute = function() { - var {$24r, _q, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = (_q = (($div64(_r$1, new $Uint64(0, 3600), true).$low >> 0)) / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Minute, $c: true, $r, $24r, _q, _r$1, t, $s};return $f; - }; - Time.prototype.Minute = function() { return this.$val.Minute(); }; - Time.ptr.prototype.Second = function() { - var {$24r, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = (($div64(_r$1, new $Uint64(0, 60), true).$low >> 0)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Second, $c: true, $r, $24r, _r$1, t, $s};return $f; - }; - Time.prototype.Second = function() { return this.$val.Second(); }; - Time.ptr.prototype.Nanosecond = function() { - var t; - t = this; - return ((t.nsec() >> 0)); - }; - Time.prototype.Nanosecond = function() { return this.$val.Nanosecond(); }; - Time.ptr.prototype.YearDay = function() { - var {_r$1, _tuple, t, yday, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).date(false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - yday = _tuple[3]; - $s = -1; return yday + 1 >> 0; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.YearDay, $c: true, $r, _r$1, _tuple, t, yday, $s};return $f; - }; - Time.prototype.YearDay = function() { return this.$val.YearDay(); }; - Duration.prototype.String = function() { - var _tuple, _tuple$1, buf, d, neg, prec, u, w; - d = this; - buf = arrayType$2.zero(); - w = 32; - u = (new $Uint64(d.$high, d.$low)); - neg = (d.$high < 0 || (d.$high === 0 && d.$low < 0)); - if (neg) { - u = new $Uint64(-u.$high, -u.$low); - } - if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000000))) { - prec = 0; - w = w - (1) >> 0; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 115); - w = w - (1) >> 0; - if ((u.$high === 0 && u.$low === 0)) { - return "0s"; - } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000))) { - prec = 0; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 110); - } else if ((u.$high < 0 || (u.$high === 0 && u.$low < 1000000))) { - prec = 3; - w = w - (1) >> 0; - $copyString($subslice(new sliceType$3(buf), w), "\xC2\xB5"); - } else { - prec = 6; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 109); - } - _tuple = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, prec); - w = _tuple[0]; - u = _tuple[1]; - w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); - } else { - w = w - (1) >> 0; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 115); - _tuple$1 = fmtFrac($subslice(new sliceType$3(buf), 0, w), u, 9); - w = _tuple$1[0]; - u = _tuple$1[1]; - w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); - u = $div64(u, (new $Uint64(0, 60)), false); - if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { - w = w - (1) >> 0; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 109); - w = fmtInt($subslice(new sliceType$3(buf), 0, w), $div64(u, new $Uint64(0, 60), true)); - u = $div64(u, (new $Uint64(0, 60)), false); - if ((u.$high > 0 || (u.$high === 0 && u.$low > 0))) { - w = w - (1) >> 0; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 104); - w = fmtInt($subslice(new sliceType$3(buf), 0, w), u); - } - } - } - if (neg) { - w = w - (1) >> 0; - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 45); - } - return ($bytesToString($subslice(new sliceType$3(buf), w))); - }; - $ptrType(Duration).prototype.String = function() { return this.$get().String(); }; - fmtFrac = function(buf, v, prec) { - var _tmp, _tmp$1, buf, digit, i, nv, nw, prec, print, v, w; - nw = 0; - nv = new $Uint64(0, 0); - w = buf.$length; - print = false; - i = 0; - while (true) { - if (!(i < prec)) { break; } - digit = $div64(v, new $Uint64(0, 10), true); - print = print || !((digit.$high === 0 && digit.$low === 0)); - if (print) { - w = w - (1) >> 0; - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = (((digit.$low << 24 >>> 24)) + 48 << 24 >>> 24)); - } - v = $div64(v, (new $Uint64(0, 10)), false); - i = i + (1) >> 0; - } - if (print) { - w = w - (1) >> 0; - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 46); - } - _tmp = w; - _tmp$1 = v; - nw = _tmp; - nv = _tmp$1; - return [nw, nv]; - }; - fmtInt = function(buf, v) { - var buf, v, w; - w = buf.$length; - if ((v.$high === 0 && v.$low === 0)) { - w = w - (1) >> 0; - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = 48); - } else { - while (true) { - if (!((v.$high > 0 || (v.$high === 0 && v.$low > 0)))) { break; } - w = w - (1) >> 0; - ((w < 0 || w >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + w] = ((($div64(v, new $Uint64(0, 10), true).$low << 24 >>> 24)) + 48 << 24 >>> 24)); - v = $div64(v, (new $Uint64(0, 10)), false); - } - } - return w; - }; - Duration.prototype.Nanoseconds = function() { - var d; - d = this; - return (new $Int64(d.$high, d.$low)); - }; - $ptrType(Duration).prototype.Nanoseconds = function() { return this.$get().Nanoseconds(); }; - Duration.prototype.Microseconds = function() { - var d; - d = this; - return $div64((new $Int64(d.$high, d.$low)), new $Int64(0, 1000), false); - }; - $ptrType(Duration).prototype.Microseconds = function() { return this.$get().Microseconds(); }; - Duration.prototype.Milliseconds = function() { - var d; - d = this; - return $div64((new $Int64(d.$high, d.$low)), new $Int64(0, 1000000), false); - }; - $ptrType(Duration).prototype.Milliseconds = function() { return this.$get().Milliseconds(); }; - Duration.prototype.Seconds = function() { - var d, nsec, sec; - d = this; - sec = $div64(d, new Duration(0, 1000000000), false); - nsec = $div64(d, new Duration(0, 1000000000), true); - return ($flatten64(sec)) + ($flatten64(nsec)) / 1e+09; - }; - $ptrType(Duration).prototype.Seconds = function() { return this.$get().Seconds(); }; - Duration.prototype.Minutes = function() { - var d, min, nsec; - d = this; - min = $div64(d, new Duration(13, 4165425152), false); - nsec = $div64(d, new Duration(13, 4165425152), true); - return ($flatten64(min)) + ($flatten64(nsec)) / 6e+10; - }; - $ptrType(Duration).prototype.Minutes = function() { return this.$get().Minutes(); }; - Duration.prototype.Hours = function() { - var d, hour, nsec; - d = this; - hour = $div64(d, new Duration(838, 817405952), false); - nsec = $div64(d, new Duration(838, 817405952), true); - return ($flatten64(hour)) + ($flatten64(nsec)) / 3.6e+12; - }; - $ptrType(Duration).prototype.Hours = function() { return this.$get().Hours(); }; - Duration.prototype.Truncate = function(m) { - var d, m, x$1; - d = this; - if ((m.$high < 0 || (m.$high === 0 && m.$low <= 0))) { - return d; - } - return (x$1 = $div64(d, m, true), new Duration(d.$high - x$1.$high, d.$low - x$1.$low)); - }; - $ptrType(Duration).prototype.Truncate = function(m) { return this.$get().Truncate(m); }; - lessThanHalf = function(x$1, y) { - var x$1, x$2, x$3, x$4, x$5, y; - return (x$2 = (x$3 = (new $Uint64(x$1.$high, x$1.$low)), x$4 = (new $Uint64(x$1.$high, x$1.$low)), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)), x$5 = (new $Uint64(y.$high, y.$low)), (x$2.$high < x$5.$high || (x$2.$high === x$5.$high && x$2.$low < x$5.$low))); - }; - Duration.prototype.Round = function(m) { - var d, d1, d1$1, m, r, x$1, x$2; - d = this; - if ((m.$high < 0 || (m.$high === 0 && m.$low <= 0))) { - return d; - } - r = $div64(d, m, true); - if ((d.$high < 0 || (d.$high === 0 && d.$low < 0))) { - r = new Duration(-r.$high, -r.$low); - if (lessThanHalf(r, m)) { - return new Duration(d.$high + r.$high, d.$low + r.$low); - } - d1 = (x$1 = new Duration(d.$high - m.$high, d.$low - m.$low), new Duration(x$1.$high + r.$high, x$1.$low + r.$low)); - if ((d1.$high < d.$high || (d1.$high === d.$high && d1.$low < d.$low))) { - return d1; - } - return new Duration(-2147483648, 0); - } - if (lessThanHalf(r, m)) { - return new Duration(d.$high - r.$high, d.$low - r.$low); - } - d1$1 = (x$2 = new Duration(d.$high + m.$high, d.$low + m.$low), new Duration(x$2.$high - r.$high, x$2.$low - r.$low)); - if ((d1$1.$high > d.$high || (d1$1.$high === d.$high && d1$1.$low > d.$low))) { - return d1$1; - } - return new Duration(2147483647, 4294967295); - }; - $ptrType(Duration).prototype.Round = function(m) { return this.$get().Round(m); }; - Time.ptr.prototype.Add = function(d) { - var d, dsec, nsec, t, te, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - t = this; - dsec = ((x$1 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$1.$high, x$1.$low))); - nsec = t.nsec() + (((x$2 = $div64(d, new Duration(0, 1000000000), true), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0)) >> 0; - if (nsec >= 1000000000) { - dsec = (x$3 = new $Int64(0, 1), new $Int64(dsec.$high + x$3.$high, dsec.$low + x$3.$low)); - nsec = nsec - (1000000000) >> 0; - } else if (nsec < 0) { - dsec = (x$4 = new $Int64(0, 1), new $Int64(dsec.$high - x$4.$high, dsec.$low - x$4.$low)); - nsec = nsec + (1000000000) >> 0; - } - t.wall = (x$5 = (x$6 = t.wall, new $Uint64(x$6.$high & ~0, (x$6.$low & ~1073741823) >>> 0)), x$7 = (new $Uint64(0, nsec)), new $Uint64(x$5.$high | x$7.$high, (x$5.$low | x$7.$low) >>> 0)); - t.addSec(dsec); - if (!((x$8 = (x$9 = t.wall, new $Uint64(x$9.$high & 2147483648, (x$9.$low & 0) >>> 0)), (x$8.$high === 0 && x$8.$low === 0)))) { - te = (x$10 = t.ext, x$11 = (new $Int64(d.$high, d.$low)), new $Int64(x$10.$high + x$11.$high, x$10.$low + x$11.$low)); - if ((d.$high < 0 || (d.$high === 0 && d.$low < 0)) && (x$12 = t.ext, (te.$high > x$12.$high || (te.$high === x$12.$high && te.$low > x$12.$low))) || (d.$high > 0 || (d.$high === 0 && d.$low > 0)) && (x$13 = t.ext, (te.$high < x$13.$high || (te.$high === x$13.$high && te.$low < x$13.$low)))) { - t.stripMono(); - } else { - t.ext = te; - } - } - return t; - }; - Time.prototype.Add = function(d) { return this.$val.Add(d); }; - Time.ptr.prototype.Sub = function(u) { - var d, d$1, t, te, u, ue, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - t = this; - if (!((x$1 = (x$2 = (x$3 = t.wall, x$4 = u.wall, new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)), new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - te = t.ext; - ue = u.ext; - d = ((x$5 = new $Int64(te.$high - ue.$high, te.$low - ue.$low), new Duration(x$5.$high, x$5.$low))); - if ((d.$high < 0 || (d.$high === 0 && d.$low < 0)) && (te.$high > ue.$high || (te.$high === ue.$high && te.$low > ue.$low))) { - return new Duration(2147483647, 4294967295); - } - if ((d.$high > 0 || (d.$high === 0 && d.$low > 0)) && (te.$high < ue.$high || (te.$high === ue.$high && te.$low < ue.$low))) { - return new Duration(-2147483648, 0); - } - return d; - } - d$1 = (x$6 = $mul64(((x$7 = (x$8 = t.sec(), x$9 = u.sec(), new $Int64(x$8.$high - x$9.$high, x$8.$low - x$9.$low)), new Duration(x$7.$high, x$7.$low))), new Duration(0, 1000000000)), x$10 = (new Duration(0, (t.nsec() - u.nsec() >> 0))), new Duration(x$6.$high + x$10.$high, x$6.$low + x$10.$low)); - if ($clone($clone(u, Time).Add(d$1), Time).Equal($clone(t, Time))) { - return d$1; - } else if ($clone(t, Time).Before($clone(u, Time))) { - return new Duration(-2147483648, 0); - } else { - return new Duration(2147483647, 4294967295); - } - }; - Time.prototype.Sub = function(u) { return this.$val.Sub(u); }; - Since = function(t) { - var {_r$1, _r$2, now$1, t, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - now$1 = new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); - /* */ if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { */ case 1: - _r$1 = runtimeNano(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Time.copy(now$1, new Time.ptr(new $Uint64(2147483648, 0), (x$3 = _r$1, new $Int64(x$3.$high - startNano.$high, x$3.$low - startNano.$low)), ptrType$2.nil)); - $s = 3; continue; - /* } else { */ case 2: - _r$2 = Now(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - Time.copy(now$1, _r$2); - /* } */ case 3: - $s = -1; return $clone(now$1, Time).Sub($clone(t, Time)); - /* */ } return; } var $f = {$blk: Since, $c: true, $r, _r$1, _r$2, now$1, t, x$1, x$2, x$3, $s};return $f; - }; - $pkg.Since = Since; - Until = function(t) { - var {_r$1, _r$2, now$1, t, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - now$1 = new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); - /* */ if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { */ case 1: - _r$1 = runtimeNano(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Time.copy(now$1, new Time.ptr(new $Uint64(2147483648, 0), (x$3 = _r$1, new $Int64(x$3.$high - startNano.$high, x$3.$low - startNano.$low)), ptrType$2.nil)); - $s = 3; continue; - /* } else { */ case 2: - _r$2 = Now(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - Time.copy(now$1, _r$2); - /* } */ case 3: - $s = -1; return $clone(t, Time).Sub($clone(now$1, Time)); - /* */ } return; } var $f = {$blk: Until, $c: true, $r, _r$1, _r$2, now$1, t, x$1, x$2, x$3, $s};return $f; - }; - $pkg.Until = Until; - Time.ptr.prototype.AddDate = function(years, months, days) { - var {$24r, _r$1, _r$2, _r$3, _tuple, _tuple$1, day, days, hour, min, month, months, sec, t, year, years, $s, $r, $c} = $restore(this, {years, months, days}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).Date(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - year = _tuple[0]; - month = _tuple[1]; - day = _tuple[2]; - _r$2 = $clone(t, Time).Clock(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - hour = _tuple$1[0]; - min = _tuple$1[1]; - sec = _tuple$1[2]; - _r$3 = Date(year + years >> 0, month + ((months >> 0)) >> 0, day + days >> 0, hour, min, sec, ((t.nsec() >> 0)), $clone(t, Time).Location()); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.AddDate, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, _tuple$1, day, days, hour, min, month, months, sec, t, year, years, $s};return $f; - }; - Time.prototype.AddDate = function(years, months, days) { return this.$val.AddDate(years, months, days); }; - Time.ptr.prototype.date = function(full) { - var {$24r, _r$1, _r$2, _tuple, day, full, month, t, yday, year, $s, $r, $c} = $restore(this, {full}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - year = 0; - month = 0; - day = 0; - yday = 0; - t = this; - _r$1 = $clone(t, Time).abs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = absDate(_r$1, full); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - year = _tuple[0]; - month = _tuple[1]; - day = _tuple[2]; - yday = _tuple[3]; - $24r = [year, month, day, yday]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.date, $c: true, $r, $24r, _r$1, _r$2, _tuple, day, full, month, t, yday, year, $s};return $f; - }; - Time.prototype.date = function(full) { return this.$val.date(full); }; - absDate = function(abs, full) { - var _q, abs, begin, d, day, end, full, month, n, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, yday, year; - year = 0; - month = 0; - day = 0; - yday = 0; - d = $div64(abs, new $Uint64(0, 86400), false); - n = $div64(d, new $Uint64(0, 146097), false); - y = $mul64(new $Uint64(0, 400), n); - d = (x$1 = $mul64(new $Uint64(0, 146097), n), new $Uint64(d.$high - x$1.$high, d.$low - x$1.$low)); - n = $div64(d, new $Uint64(0, 36524), false); - n = (x$2 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$2.$high, n.$low - x$2.$low)); - y = (x$3 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high + x$3.$high, y.$low + x$3.$low)); - d = (x$4 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high - x$4.$high, d.$low - x$4.$low)); - n = $div64(d, new $Uint64(0, 1461), false); - y = (x$5 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high + x$5.$high, y.$low + x$5.$low)); - d = (x$6 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high - x$6.$high, d.$low - x$6.$low)); - n = $div64(d, new $Uint64(0, 365), false); - n = (x$7 = $shiftRightUint64(n, 2), new $Uint64(n.$high - x$7.$high, n.$low - x$7.$low)); - y = (x$8 = n, new $Uint64(y.$high + x$8.$high, y.$low + x$8.$low)); - d = (x$9 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high - x$9.$high, d.$low - x$9.$low)); - year = (((x$10 = (x$11 = (new $Int64(y.$high, y.$low)), new $Int64(x$11.$high + -69, x$11.$low + 4075721025)), x$10.$low + ((x$10.$high >> 31) * 4294967296)) >> 0)); - yday = ((d.$low >> 0)); - if (!full) { - return [year, month, day, yday]; - } - day = yday; - if (isLeap(year)) { - if (day > 59) { - day = day - (1) >> 0; - } else if ((day === 59)) { - month = 2; - day = 29; - return [year, month, day, yday]; - } - } - month = (((_q = day / 31, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0)); - end = (((x$12 = month + 1 >> 0, ((x$12 < 0 || x$12 >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[x$12])) >> 0)); - begin = 0; - if (day >= end) { - month = month + (1) >> 0; - begin = end; - } else { - begin = ((((month < 0 || month >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[month]) >> 0)); - } - month = month + (1) >> 0; - day = (day - begin >> 0) + 1 >> 0; - return [year, month, day, yday]; - }; - daysIn = function(m, year) { - var m, x$1, year; - if ((m === 2) && isLeap(year)) { - return 29; - } - return (((((m < 0 || m >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[m]) - (x$1 = m - 1 >> 0, ((x$1 < 0 || x$1 >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[x$1])) >> 0) >> 0)); - }; - daysSinceEpoch = function(year) { - var d, n, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, year; - y = ((x$1 = (x$2 = (new $Int64(0, year)), new $Int64(x$2.$high - -69, x$2.$low - 4075721025)), new $Uint64(x$1.$high, x$1.$low))); - n = $div64(y, new $Uint64(0, 400), false); - y = (x$3 = $mul64(new $Uint64(0, 400), n), new $Uint64(y.$high - x$3.$high, y.$low - x$3.$low)); - d = $mul64(new $Uint64(0, 146097), n); - n = $div64(y, new $Uint64(0, 100), false); - y = (x$4 = $mul64(new $Uint64(0, 100), n), new $Uint64(y.$high - x$4.$high, y.$low - x$4.$low)); - d = (x$5 = $mul64(new $Uint64(0, 36524), n), new $Uint64(d.$high + x$5.$high, d.$low + x$5.$low)); - n = $div64(y, new $Uint64(0, 4), false); - y = (x$6 = $mul64(new $Uint64(0, 4), n), new $Uint64(y.$high - x$6.$high, y.$low - x$6.$low)); - d = (x$7 = $mul64(new $Uint64(0, 1461), n), new $Uint64(d.$high + x$7.$high, d.$low + x$7.$low)); - n = y; - d = (x$8 = $mul64(new $Uint64(0, 365), n), new $Uint64(d.$high + x$8.$high, d.$low + x$8.$low)); - return d; - }; - runtimeNano = function() { - $throwRuntimeError("native function not implemented: time.runtimeNano"); - }; - Now = function() { - var {_r$1, _tuple, mono, nsec, sec, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = now(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - sec = _tuple[0]; - nsec = _tuple[1]; - mono = _tuple[2]; - mono = (x$1 = startNano, new $Int64(mono.$high - x$1.$high, mono.$low - x$1.$low)); - sec = (x$2 = new $Int64(0, 2682288000), new $Int64(sec.$high + x$2.$high, sec.$low + x$2.$low)); - if (!((x$3 = $shiftRightUint64((new $Uint64(sec.$high, sec.$low)), 33), (x$3.$high === 0 && x$3.$low === 0)))) { - $s = -1; return new Time.ptr((new $Uint64(0, nsec)), new $Int64(sec.$high + 13, sec.$low + 3618733952), $pkg.Local); - } - $s = -1; return new Time.ptr((x$4 = (x$5 = $shiftLeft64((new $Uint64(sec.$high, sec.$low)), 30), new $Uint64(2147483648 | x$5.$high, (0 | x$5.$low) >>> 0)), x$6 = (new $Uint64(0, nsec)), new $Uint64(x$4.$high | x$6.$high, (x$4.$low | x$6.$low) >>> 0)), mono, $pkg.Local); - /* */ } return; } var $f = {$blk: Now, $c: true, $r, _r$1, _tuple, mono, nsec, sec, x$1, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - $pkg.Now = Now; - unixTime = function(sec, nsec) { - var nsec, sec; - return new Time.ptr((new $Uint64(0, nsec)), new $Int64(sec.$high + 14, sec.$low + 2006054656), $pkg.Local); - }; - Time.ptr.prototype.UTC = function() { - var t; - t = this; - t.setLoc(utcLoc); - return t; - }; - Time.prototype.UTC = function() { return this.$val.UTC(); }; - Time.ptr.prototype.Local = function() { - var t; - t = this; - t.setLoc($pkg.Local); - return t; - }; - Time.prototype.Local = function() { return this.$val.Local(); }; - Time.ptr.prototype.In = function(loc) { - var loc, t; - t = this; - if (loc === ptrType$2.nil) { - $panic(new $String("time: missing Location in call to Time.In")); - } - t.setLoc(loc); - return t; - }; - Time.prototype.In = function(loc) { return this.$val.In(loc); }; - Time.ptr.prototype.Location = function() { - var l, t; - t = this; - l = t.loc; - if (l === ptrType$2.nil) { - l = $pkg.UTC; - } - return l; - }; - Time.prototype.Location = function() { return this.$val.Location(); }; - Time.ptr.prototype.Zone = function() { - var {_r$1, _tuple, name, offset, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = ""; - offset = 0; - t = this; - _r$1 = t.loc.lookup(t.unixSec()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - name = _tuple[0]; - offset = _tuple[1]; - $s = -1; return [name, offset]; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Zone, $c: true, $r, _r$1, _tuple, name, offset, t, $s};return $f; - }; - Time.prototype.Zone = function() { return this.$val.Zone(); }; - Time.ptr.prototype.Unix = function() { - var t; - t = this; - return t.unixSec(); - }; - Time.prototype.Unix = function() { return this.$val.Unix(); }; - Time.ptr.prototype.UnixMilli = function() { - var t, x$1, x$2; - t = this; - return (x$1 = $mul64(t.unixSec(), new $Int64(0, 1000)), x$2 = $div64((new $Int64(0, t.nsec())), new $Int64(0, 1000000), false), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - }; - Time.prototype.UnixMilli = function() { return this.$val.UnixMilli(); }; - Time.ptr.prototype.UnixMicro = function() { - var t, x$1, x$2; - t = this; - return (x$1 = $mul64(t.unixSec(), new $Int64(0, 1000000)), x$2 = $div64((new $Int64(0, t.nsec())), new $Int64(0, 1000), false), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - }; - Time.prototype.UnixMicro = function() { return this.$val.UnixMicro(); }; - Time.ptr.prototype.UnixNano = function() { - var t, x$1, x$2; - t = this; - return (x$1 = $mul64((t.unixSec()), new $Int64(0, 1000000000)), x$2 = (new $Int64(0, t.nsec())), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - }; - Time.prototype.UnixNano = function() { return this.$val.UnixNano(); }; - Time.ptr.prototype.MarshalBinary = function() { - var {_q, _r$1, _r$2, _r$3, _tuple, enc, nsec, offset, offsetMin, offsetSec, sec, t, version, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - offsetMin = 0; - offsetSec = 0; - version = 1; - /* */ if ($clone(t, Time).Location() === $pkg.UTC) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(t, Time).Location() === $pkg.UTC) { */ case 1: - offsetMin = -1; - $s = 3; continue; - /* } else { */ case 2: - _r$1 = $clone(t, Time).Zone(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - offset = _tuple[1]; - if (!(((_r$2 = offset % 60, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 0))) { - version = 2; - offsetSec = (((_r$3 = offset % 60, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) << 24 >> 24)); - } - offset = (_q = offset / (60), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (offset < -32768 || (offset === -1) || offset > 32767) { - $s = -1; return [sliceType$3.nil, errors.New("Time.MarshalBinary: unexpected zone offset")]; - } - offsetMin = ((offset << 16 >> 16)); - /* } */ case 3: - sec = t.sec(); - nsec = t.nsec(); - enc = new sliceType$3([version, (($shiftRightInt64(sec, 56).$low << 24 >>> 24)), (($shiftRightInt64(sec, 48).$low << 24 >>> 24)), (($shiftRightInt64(sec, 40).$low << 24 >>> 24)), (($shiftRightInt64(sec, 32).$low << 24 >>> 24)), (($shiftRightInt64(sec, 24).$low << 24 >>> 24)), (($shiftRightInt64(sec, 16).$low << 24 >>> 24)), (($shiftRightInt64(sec, 8).$low << 24 >>> 24)), ((sec.$low << 24 >>> 24)), (((nsec >> 24 >> 0) << 24 >>> 24)), (((nsec >> 16 >> 0) << 24 >>> 24)), (((nsec >> 8 >> 0) << 24 >>> 24)), ((nsec << 24 >>> 24)), (((offsetMin >> 8 << 16 >> 16) << 24 >>> 24)), ((offsetMin << 24 >>> 24))]); - if (version === 2) { - enc = $append(enc, ((offsetSec << 24 >>> 24))); - } - $s = -1; return [enc, $ifaceNil]; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.MarshalBinary, $c: true, $r, _q, _r$1, _r$2, _r$3, _tuple, enc, nsec, offset, offsetMin, offsetSec, sec, t, version, $s};return $f; - }; - Time.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - Time.ptr.prototype.UnmarshalBinary = function(data) { - var {_r$1, _tuple, buf, data, localoff, nsec, offset, sec, t, version, wantLen, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - buf = data; - if (buf.$length === 0) { - $s = -1; return errors.New("Time.UnmarshalBinary: no data"); - } - version = (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]); - if (!((version === 1)) && !((version === 2))) { - $s = -1; return errors.New("Time.UnmarshalBinary: unsupported version"); - } - wantLen = 15; - if (version === 2) { - wantLen = wantLen + (1) >> 0; - } - if (!((buf.$length === wantLen))) { - $s = -1; return errors.New("Time.UnmarshalBinary: invalid length"); - } - buf = $subslice(buf, 1); - sec = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (x$7 = (new $Int64(0, (7 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 7]))), x$8 = $shiftLeft64((new $Int64(0, (6 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 6]))), 8), new $Int64(x$7.$high | x$8.$high, (x$7.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Int64(0, (5 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 5]))), 16), new $Int64(x$6.$high | x$9.$high, (x$6.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Int64(0, (4 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 4]))), 24), new $Int64(x$5.$high | x$10.$high, (x$5.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Int64(0, (3 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 3]))), 32), new $Int64(x$4.$high | x$11.$high, (x$4.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Int64(0, (2 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 2]))), 40), new $Int64(x$3.$high | x$12.$high, (x$3.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Int64(0, (1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1]))), 48), new $Int64(x$2.$high | x$13.$high, (x$2.$low | x$13.$low) >>> 0)), x$14 = $shiftLeft64((new $Int64(0, (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]))), 56), new $Int64(x$1.$high | x$14.$high, (x$1.$low | x$14.$low) >>> 0)); - buf = $subslice(buf, 8); - nsec = (((((3 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 3]) >> 0)) | ((((2 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 2]) >> 0)) << 8 >> 0)) | ((((1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1]) >> 0)) << 16 >> 0)) | ((((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) >> 0)) << 24 >> 0); - buf = $subslice(buf, 4); - offset = $imul(((((((1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1]) << 16 >> 16)) | ((((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) << 16 >> 16)) << 8 << 16 >> 16)) >> 0)), 60); - if (version === 2) { - offset = offset + ((((2 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 2]) >> 0))) >> 0; - } - Time.copy(t, new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil)); - t.wall = (new $Uint64(0, nsec)); - t.ext = sec; - /* */ if (offset === -60) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (offset === -60) { */ case 1: - t.setLoc(utcLoc); - $s = 3; continue; - /* } else { */ case 2: - _r$1 = $pkg.Local.lookup(t.unixSec()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - localoff = _tuple[1]; - if (offset === localoff) { - t.setLoc($pkg.Local); - } else { - t.setLoc(FixedZone("", offset)); - } - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.UnmarshalBinary, $c: true, $r, _r$1, _tuple, buf, data, localoff, nsec, offset, sec, t, version, wantLen, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - Time.prototype.UnmarshalBinary = function(data) { return this.$val.UnmarshalBinary(data); }; - Time.ptr.prototype.GobEncode = function() { - var {$24r, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).MarshalBinary(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.GobEncode, $c: true, $r, $24r, _r$1, t, $s};return $f; - }; - Time.prototype.GobEncode = function() { return this.$val.GobEncode(); }; - Time.ptr.prototype.GobDecode = function(data) { - var {$24r, _r$1, data, t, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.UnmarshalBinary(data); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.GobDecode, $c: true, $r, $24r, _r$1, data, t, $s};return $f; - }; - Time.prototype.GobDecode = function(data) { return this.$val.GobDecode(data); }; - Time.ptr.prototype.MarshalJSON = function() { - var {_r$1, _r$2, b, t, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - y = _r$1; - if (y < 0 || y >= 10000) { - $s = -1; return [sliceType$3.nil, errors.New("Time.MarshalJSON: year outside of range [0,9999]")]; - } - b = $makeSlice(sliceType$3, 0, 37); - b = $append(b, 34); - _r$2 = $clone(t, Time).AppendFormat(b, "2006-01-02T15:04:05.999999999Z07:00"); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - b = $append(b, 34); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.MarshalJSON, $c: true, $r, _r$1, _r$2, b, t, y, $s};return $f; - }; - Time.prototype.MarshalJSON = function() { return this.$val.MarshalJSON(); }; - Time.ptr.prototype.UnmarshalJSON = function(data) { - var {_r$1, _tuple, data, err, t, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (($bytesToString(data)) === "null") { - $s = -1; return $ifaceNil; - } - err = $ifaceNil; - _r$1 = Parse("\"2006-01-02T15:04:05Z07:00\"", ($bytesToString(data))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - Time.copy(t, _tuple[0]); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.UnmarshalJSON, $c: true, $r, _r$1, _tuple, data, err, t, $s};return $f; - }; - Time.prototype.UnmarshalJSON = function(data) { return this.$val.UnmarshalJSON(data); }; - Time.ptr.prototype.MarshalText = function() { - var {$24r, _r$1, _r$2, b, t, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - y = _r$1; - if (y < 0 || y >= 10000) { - $s = -1; return [sliceType$3.nil, errors.New("Time.MarshalText: year outside of range [0,9999]")]; - } - b = $makeSlice(sliceType$3, 0, 35); - _r$2 = $clone(t, Time).AppendFormat(b, "2006-01-02T15:04:05.999999999Z07:00"); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [_r$2, $ifaceNil]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.MarshalText, $c: true, $r, $24r, _r$1, _r$2, b, t, y, $s};return $f; - }; - Time.prototype.MarshalText = function() { return this.$val.MarshalText(); }; - Time.ptr.prototype.UnmarshalText = function(data) { - var {_r$1, _tuple, data, err, t, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - err = $ifaceNil; - _r$1 = Parse("2006-01-02T15:04:05Z07:00", ($bytesToString(data))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - Time.copy(t, _tuple[0]); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.UnmarshalText, $c: true, $r, _r$1, _tuple, data, err, t, $s};return $f; - }; - Time.prototype.UnmarshalText = function(data) { return this.$val.UnmarshalText(data); }; - Unix = function(sec, nsec) { - var n, nsec, sec, x$1, x$2, x$3, x$4; - if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0)) || (nsec.$high > 0 || (nsec.$high === 0 && nsec.$low >= 1000000000))) { - n = $div64(nsec, new $Int64(0, 1000000000), false); - sec = (x$1 = n, new $Int64(sec.$high + x$1.$high, sec.$low + x$1.$low)); - nsec = (x$2 = $mul64(n, new $Int64(0, 1000000000)), new $Int64(nsec.$high - x$2.$high, nsec.$low - x$2.$low)); - if ((nsec.$high < 0 || (nsec.$high === 0 && nsec.$low < 0))) { - nsec = (x$3 = new $Int64(0, 1000000000), new $Int64(nsec.$high + x$3.$high, nsec.$low + x$3.$low)); - sec = (x$4 = new $Int64(0, 1), new $Int64(sec.$high - x$4.$high, sec.$low - x$4.$low)); - } - } - return unixTime(sec, (((nsec.$low + ((nsec.$high >> 31) * 4294967296)) >> 0))); - }; - $pkg.Unix = Unix; - Time.ptr.prototype.IsDST = function() { - var {_r$1, _tuple, isDST, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.loc.lookup($clone(t, Time).Unix()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - isDST = _tuple[4]; - $s = -1; return isDST; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.IsDST, $c: true, $r, _r$1, _tuple, isDST, t, $s};return $f; - }; - Time.prototype.IsDST = function() { return this.$val.IsDST(); }; - isLeap = function(year) { - var _r$1, _r$2, _r$3, year; - return ((_r$1 = year % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0) && (!(((_r$2 = year % 100, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 0)) || ((_r$3 = year % 400, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 0)); - }; - norm = function(hi, lo, base) { - var _q, _q$1, _tmp, _tmp$1, base, hi, lo, n, n$1, nhi, nlo; - nhi = 0; - nlo = 0; - if (lo < 0) { - n = (_q = ((-lo - 1 >> 0)) / base, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; - hi = hi - (n) >> 0; - lo = lo + (($imul(n, base))) >> 0; - } - if (lo >= base) { - n$1 = (_q$1 = lo / base, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); - hi = hi + (n$1) >> 0; - lo = lo - (($imul(n$1, base))) >> 0; - } - _tmp = hi; - _tmp$1 = lo; - nhi = _tmp; - nlo = _tmp$1; - return [nhi, nlo]; - }; - Date = function(year, month, day, hour, min, sec, nsec, loc) { - var {_r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, abs, d, day, end, hour, loc, m, min, month, nsec, offset, sec, start, t, unix, utc, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, year, $s, $r, $c} = $restore(this, {year, month, day, hour, min, sec, nsec, loc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (loc === ptrType$2.nil) { - $panic(new $String("time: missing Location in call to Date")); - } - m = ((month >> 0)) - 1 >> 0; - _tuple = norm(year, m, 12); - year = _tuple[0]; - m = _tuple[1]; - month = ((m >> 0)) + 1 >> 0; - _tuple$1 = norm(sec, nsec, 1000000000); - sec = _tuple$1[0]; - nsec = _tuple$1[1]; - _tuple$2 = norm(min, sec, 60); - min = _tuple$2[0]; - sec = _tuple$2[1]; - _tuple$3 = norm(hour, min, 60); - hour = _tuple$3[0]; - min = _tuple$3[1]; - _tuple$4 = norm(day, hour, 24); - day = _tuple$4[0]; - hour = _tuple$4[1]; - d = daysSinceEpoch(year); - d = (x$1 = (new $Uint64(0, (x$2 = month - 1 >> 0, ((x$2 < 0 || x$2 >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[x$2])))), new $Uint64(d.$high + x$1.$high, d.$low + x$1.$low)); - if (isLeap(year) && month >= 3) { - d = (x$3 = new $Uint64(0, 1), new $Uint64(d.$high + x$3.$high, d.$low + x$3.$low)); - } - d = (x$4 = (new $Uint64(0, (day - 1 >> 0))), new $Uint64(d.$high + x$4.$high, d.$low + x$4.$low)); - abs = $mul64(d, new $Uint64(0, 86400)); - abs = (x$5 = (new $Uint64(0, ((($imul(hour, 3600)) + ($imul(min, 60)) >> 0) + sec >> 0))), new $Uint64(abs.$high + x$5.$high, abs.$low + x$5.$low)); - unix = (x$6 = (new $Int64(abs.$high, abs.$low)), new $Int64(x$6.$high + -2147483647, x$6.$low + 3844486912)); - _r$1 = loc.lookup(unix); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$5 = _r$1; - offset = _tuple$5[1]; - start = _tuple$5[2]; - end = _tuple$5[3]; - /* */ if (!((offset === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((offset === 0))) { */ case 2: - utc = (x$7 = (new $Int64(0, offset)), new $Int64(unix.$high - x$7.$high, unix.$low - x$7.$low)); - /* */ if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low)) || (utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((utc.$high < start.$high || (utc.$high === start.$high && utc.$low < start.$low)) || (utc.$high > end.$high || (utc.$high === end.$high && utc.$low >= end.$low))) { */ case 4: - _r$2 = loc.lookup(utc); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$6 = _r$2; - offset = _tuple$6[1]; - /* } */ case 5: - unix = (x$8 = (new $Int64(0, offset)), new $Int64(unix.$high - x$8.$high, unix.$low - x$8.$low)); - /* } */ case 3: - t = $clone(unixTime(unix, ((nsec >> 0))), Time); - t.setLoc(loc); - $s = -1; return t; - /* */ } return; } var $f = {$blk: Date, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, abs, d, day, end, hour, loc, m, min, month, nsec, offset, sec, start, t, unix, utc, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, year, $s};return $f; - }; - $pkg.Date = Date; - Time.ptr.prototype.Truncate = function(d) { - var _tuple, d, r, t; - t = this; - t.stripMono(); - if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { - return t; - } - _tuple = div($clone(t, Time), d); - r = _tuple[1]; - return $clone(t, Time).Add(new Duration(-r.$high, -r.$low)); - }; - Time.prototype.Truncate = function(d) { return this.$val.Truncate(d); }; - Time.ptr.prototype.Round = function(d) { - var _tuple, d, r, t; - t = this; - t.stripMono(); - if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { - return t; - } - _tuple = div($clone(t, Time), d); - r = _tuple[1]; - if (lessThanHalf(r, d)) { - return $clone(t, Time).Add(new Duration(-r.$high, -r.$low)); - } - return $clone(t, Time).Add(new Duration(d.$high - r.$high, d.$low - r.$low)); - }; - Time.prototype.Round = function(d) { return this.$val.Round(d); }; - div = function(t, d) { - var _q, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, d0, d1, d1$1, neg, nsec, qmod2, r, sec, sec$1, t, tmp, u0, u0x, u1, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - qmod2 = 0; - r = new Duration(0, 0); - neg = false; - nsec = t.nsec(); - sec = t.sec(); - if ((sec.$high < 0 || (sec.$high === 0 && sec.$low < 0))) { - neg = true; - sec = new $Int64(-sec.$high, -sec.$low); - nsec = -nsec; - if (nsec < 0) { - nsec = nsec + (1000000000) >> 0; - sec = (x$1 = new $Int64(0, 1), new $Int64(sec.$high - x$1.$high, sec.$low - x$1.$low)); - } - } - if ((d.$high < 0 || (d.$high === 0 && d.$low < 1000000000)) && (x$2 = $div64(new Duration(0, 1000000000), (new Duration(d.$high + d.$high, d.$low + d.$low)), true), (x$2.$high === 0 && x$2.$low === 0))) { - qmod2 = (((_q = nsec / (((d.$low + ((d.$high >> 31) * 4294967296)) >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0)) & 1; - r = (new Duration(0, (_r$1 = nsec % (((d.$low + ((d.$high >> 31) * 4294967296)) >> 0)), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")))); - } else if ((x$3 = $div64(d, new Duration(0, 1000000000), true), (x$3.$high === 0 && x$3.$low === 0))) { - d1 = ((x$4 = $div64(d, new Duration(0, 1000000000), false), new $Int64(x$4.$high, x$4.$low))); - qmod2 = (((x$5 = $div64(sec, d1, false), x$5.$low + ((x$5.$high >> 31) * 4294967296)) >> 0)) & 1; - r = (x$6 = $mul64(((x$7 = $div64(sec, d1, true), new Duration(x$7.$high, x$7.$low))), new Duration(0, 1000000000)), x$8 = (new Duration(0, nsec)), new Duration(x$6.$high + x$8.$high, x$6.$low + x$8.$low)); - } else { - sec$1 = (new $Uint64(sec.$high, sec.$low)); - tmp = $mul64(($shiftRightUint64(sec$1, 32)), new $Uint64(0, 1000000000)); - u1 = $shiftRightUint64(tmp, 32); - u0 = $shiftLeft64(tmp, 32); - tmp = $mul64((new $Uint64(sec$1.$high & 0, (sec$1.$low & 4294967295) >>> 0)), new $Uint64(0, 1000000000)); - _tmp = u0; - _tmp$1 = new $Uint64(u0.$high + tmp.$high, u0.$low + tmp.$low); - u0x = _tmp; - u0 = _tmp$1; - if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { - u1 = (x$9 = new $Uint64(0, 1), new $Uint64(u1.$high + x$9.$high, u1.$low + x$9.$low)); - } - _tmp$2 = u0; - _tmp$3 = (x$10 = (new $Uint64(0, nsec)), new $Uint64(u0.$high + x$10.$high, u0.$low + x$10.$low)); - u0x = _tmp$2; - u0 = _tmp$3; - if ((u0.$high < u0x.$high || (u0.$high === u0x.$high && u0.$low < u0x.$low))) { - u1 = (x$11 = new $Uint64(0, 1), new $Uint64(u1.$high + x$11.$high, u1.$low + x$11.$low)); - } - d1$1 = (new $Uint64(d.$high, d.$low)); - while (true) { - if (!(!((x$12 = $shiftRightUint64(d1$1, 63), (x$12.$high === 0 && x$12.$low === 1))))) { break; } - d1$1 = $shiftLeft64(d1$1, (1)); - } - d0 = new $Uint64(0, 0); - while (true) { - qmod2 = 0; - if ((u1.$high > d1$1.$high || (u1.$high === d1$1.$high && u1.$low > d1$1.$low)) || (u1.$high === d1$1.$high && u1.$low === d1$1.$low) && (u0.$high > d0.$high || (u0.$high === d0.$high && u0.$low >= d0.$low))) { - qmod2 = 1; - _tmp$4 = u0; - _tmp$5 = new $Uint64(u0.$high - d0.$high, u0.$low - d0.$low); - u0x = _tmp$4; - u0 = _tmp$5; - if ((u0.$high > u0x.$high || (u0.$high === u0x.$high && u0.$low > u0x.$low))) { - u1 = (x$13 = new $Uint64(0, 1), new $Uint64(u1.$high - x$13.$high, u1.$low - x$13.$low)); - } - u1 = (x$14 = d1$1, new $Uint64(u1.$high - x$14.$high, u1.$low - x$14.$low)); - } - if ((d1$1.$high === 0 && d1$1.$low === 0) && (x$15 = (new $Uint64(d.$high, d.$low)), (d0.$high === x$15.$high && d0.$low === x$15.$low))) { - break; - } - d0 = $shiftRightUint64(d0, (1)); - d0 = (x$16 = $shiftLeft64((new $Uint64(d1$1.$high & 0, (d1$1.$low & 1) >>> 0)), 63), new $Uint64(d0.$high | x$16.$high, (d0.$low | x$16.$low) >>> 0)); - d1$1 = $shiftRightUint64(d1$1, (1)); - } - r = (new Duration(u0.$high, u0.$low)); - } - if (neg && !((r.$high === 0 && r.$low === 0))) { - qmod2 = (qmod2 ^ (1)) >> 0; - r = new Duration(d.$high - r.$high, d.$low - r.$low); - } - return [qmod2, r]; - }; - when = function(d) { - var {$24r, _r$1, _r$2, d, t, x$1, x$2, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { */ case 1: - _r$1 = runtimeNano(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$2 = runtimeNano(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - t = (x$1 = _r$2, x$2 = (new $Int64(d.$high, d.$low)), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - if ((t.$high < 0 || (t.$high === 0 && t.$low < 0))) { - t = new $Int64(2147483647, 4294967295); - } - $s = -1; return t; - /* */ } return; } var $f = {$blk: when, $c: true, $r, $24r, _r$1, _r$2, d, t, x$1, x$2, $s};return $f; - }; - Timer.ptr.prototype.Stop = function() { - var t; - t = this; - if (t.r.f === $throwNilPointerError) { - $panic(new $String("time: Stop called on uninitialized Timer")); - } - return stopTimer(t.r); - }; - Timer.prototype.Stop = function() { return this.$val.Stop(); }; - NewTimer = function(d) { - var {_r$1, c, d, t, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = new $Chan(Time, 1); - _r$1 = when(d); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t = new Timer.ptr(c, new runtimeTimer.ptr(0, _r$1, new $Int64(0, 0), sendTime, new chanType(c), 0, null, false)); - $r = startTimer(t.r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return t; - /* */ } return; } var $f = {$blk: NewTimer, $c: true, $r, _r$1, c, d, t, $s};return $f; - }; - $pkg.NewTimer = NewTimer; - Timer.ptr.prototype.Reset = function(d) { - var {$24r, _r$1, _r$2, d, t, w, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (t.r.f === $throwNilPointerError) { - $panic(new $String("time: Reset called on uninitialized Timer")); - } - _r$1 = when(d); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - w = _r$1; - _r$2 = resetTimer(t.r, w); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Timer.ptr.prototype.Reset, $c: true, $r, $24r, _r$1, _r$2, d, t, w, $s};return $f; - }; - Timer.prototype.Reset = function(d) { return this.$val.Reset(d); }; - sendTime = function(c, seq) { - var {_r$1, _selection, c, seq, $s, $r, $c} = $restore(this, {c, seq}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = Now(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = $select([[$assertType(c, chanType), $clone(_r$1, Time)], []]); - /* */ if (_selection[0] === 0) { $s = 2; continue; } - /* */ if (_selection[0] === 1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_selection[0] === 0) { */ case 2: - $s = 4; continue; - /* } else if (_selection[0] === 1) { */ case 3: - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: sendTime, $c: true, $r, _r$1, _selection, c, seq, $s};return $f; - }; - After = function(d) { - var {$24r, _r$1, d, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = NewTimer(d); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1.C; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: After, $c: true, $r, $24r, _r$1, d, $s};return $f; - }; - $pkg.After = After; - AfterFunc = function(d, f) { - var {_r$1, d, f, t, $s, $r, $c} = $restore(this, {d, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = when(d); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t = new Timer.ptr($chanNil, new runtimeTimer.ptr(0, _r$1, new $Int64(0, 0), goFunc, new funcType(f), 0, null, false)); - $r = startTimer(t.r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return t; - /* */ } return; } var $f = {$blk: AfterFunc, $c: true, $r, _r$1, d, f, t, $s};return $f; - }; - $pkg.AfterFunc = AfterFunc; - goFunc = function(arg, seq) { - var arg, seq; - $go($assertType(arg, funcType), []); - }; - startsWithLowerCase = function(str) { - var c, str; - if (str.length === 0) { - return false; - } - c = str.charCodeAt(0); - return 97 <= c && c <= 122; - }; - nextStdChunk = function(layout) { - var _1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$81, _tmp$82, _tmp$83, _tmp$84, _tmp$85, _tmp$86, _tmp$87, _tmp$88, _tmp$89, _tmp$9, _tmp$90, _tmp$91, _tmp$92, c, ch, code, i, j, layout, prefix, std, std$1, suffix, x$1; - prefix = ""; - std = 0; - suffix = ""; - i = 0; - while (true) { - if (!(i < layout.length)) { break; } - c = ((layout.charCodeAt(i) >> 0)); - _1 = c; - if (_1 === (74)) { - if (layout.length >= (i + 3 >> 0) && $substring(layout, i, (i + 3 >> 0)) === "Jan") { - if (layout.length >= (i + 7 >> 0) && $substring(layout, i, (i + 7 >> 0)) === "January") { - _tmp = $substring(layout, 0, i); - _tmp$1 = 257; - _tmp$2 = $substring(layout, (i + 7 >> 0)); - prefix = _tmp; - std = _tmp$1; - suffix = _tmp$2; - return [prefix, std, suffix]; - } - if (!startsWithLowerCase($substring(layout, (i + 3 >> 0)))) { - _tmp$3 = $substring(layout, 0, i); - _tmp$4 = 258; - _tmp$5 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$3; - std = _tmp$4; - suffix = _tmp$5; - return [prefix, std, suffix]; - } - } - } else if (_1 === (77)) { - if (layout.length >= (i + 3 >> 0)) { - if ($substring(layout, i, (i + 3 >> 0)) === "Mon") { - if (layout.length >= (i + 6 >> 0) && $substring(layout, i, (i + 6 >> 0)) === "Monday") { - _tmp$6 = $substring(layout, 0, i); - _tmp$7 = 261; - _tmp$8 = $substring(layout, (i + 6 >> 0)); - prefix = _tmp$6; - std = _tmp$7; - suffix = _tmp$8; - return [prefix, std, suffix]; - } - if (!startsWithLowerCase($substring(layout, (i + 3 >> 0)))) { - _tmp$9 = $substring(layout, 0, i); - _tmp$10 = 262; - _tmp$11 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$9; - std = _tmp$10; - suffix = _tmp$11; - return [prefix, std, suffix]; - } - } - if ($substring(layout, i, (i + 3 >> 0)) === "MST") { - _tmp$12 = $substring(layout, 0, i); - _tmp$13 = 23; - _tmp$14 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$12; - std = _tmp$13; - suffix = _tmp$14; - return [prefix, std, suffix]; - } - } - } else if (_1 === (48)) { - if (layout.length >= (i + 2 >> 0) && 49 <= layout.charCodeAt((i + 1 >> 0)) && layout.charCodeAt((i + 1 >> 0)) <= 54) { - _tmp$15 = $substring(layout, 0, i); - _tmp$16 = (x$1 = layout.charCodeAt((i + 1 >> 0)) - 49 << 24 >>> 24, ((x$1 < 0 || x$1 >= std0x.length) ? ($throwRuntimeError("index out of range"), undefined) : std0x[x$1])); - _tmp$17 = $substring(layout, (i + 2 >> 0)); - prefix = _tmp$15; - std = _tmp$16; - suffix = _tmp$17; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 3 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 48) && (layout.charCodeAt((i + 2 >> 0)) === 50)) { - _tmp$18 = $substring(layout, 0, i); - _tmp$19 = 267; - _tmp$20 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$18; - std = _tmp$19; - suffix = _tmp$20; - return [prefix, std, suffix]; - } - } else if (_1 === (49)) { - if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 53)) { - _tmp$21 = $substring(layout, 0, i); - _tmp$22 = 524; - _tmp$23 = $substring(layout, (i + 2 >> 0)); - prefix = _tmp$21; - std = _tmp$22; - suffix = _tmp$23; - return [prefix, std, suffix]; - } - _tmp$24 = $substring(layout, 0, i); - _tmp$25 = 259; - _tmp$26 = $substring(layout, (i + 1 >> 0)); - prefix = _tmp$24; - std = _tmp$25; - suffix = _tmp$26; - return [prefix, std, suffix]; - } else if (_1 === (50)) { - if (layout.length >= (i + 4 >> 0) && $substring(layout, i, (i + 4 >> 0)) === "2006") { - _tmp$27 = $substring(layout, 0, i); - _tmp$28 = 275; - _tmp$29 = $substring(layout, (i + 4 >> 0)); - prefix = _tmp$27; - std = _tmp$28; - suffix = _tmp$29; - return [prefix, std, suffix]; - } - _tmp$30 = $substring(layout, 0, i); - _tmp$31 = 263; - _tmp$32 = $substring(layout, (i + 1 >> 0)); - prefix = _tmp$30; - std = _tmp$31; - suffix = _tmp$32; - return [prefix, std, suffix]; - } else if (_1 === (95)) { - if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 50)) { - if (layout.length >= (i + 5 >> 0) && $substring(layout, (i + 1 >> 0), (i + 5 >> 0)) === "2006") { - _tmp$33 = $substring(layout, 0, (i + 1 >> 0)); - _tmp$34 = 275; - _tmp$35 = $substring(layout, (i + 5 >> 0)); - prefix = _tmp$33; - std = _tmp$34; - suffix = _tmp$35; - return [prefix, std, suffix]; - } - _tmp$36 = $substring(layout, 0, i); - _tmp$37 = 264; - _tmp$38 = $substring(layout, (i + 2 >> 0)); - prefix = _tmp$36; - std = _tmp$37; - suffix = _tmp$38; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 3 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 95) && (layout.charCodeAt((i + 2 >> 0)) === 50)) { - _tmp$39 = $substring(layout, 0, i); - _tmp$40 = 266; - _tmp$41 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$39; - std = _tmp$40; - suffix = _tmp$41; - return [prefix, std, suffix]; - } - } else if (_1 === (51)) { - _tmp$42 = $substring(layout, 0, i); - _tmp$43 = 525; - _tmp$44 = $substring(layout, (i + 1 >> 0)); - prefix = _tmp$42; - std = _tmp$43; - suffix = _tmp$44; - return [prefix, std, suffix]; - } else if (_1 === (52)) { - _tmp$45 = $substring(layout, 0, i); - _tmp$46 = 527; - _tmp$47 = $substring(layout, (i + 1 >> 0)); - prefix = _tmp$45; - std = _tmp$46; - suffix = _tmp$47; - return [prefix, std, suffix]; - } else if (_1 === (53)) { - _tmp$48 = $substring(layout, 0, i); - _tmp$49 = 529; - _tmp$50 = $substring(layout, (i + 1 >> 0)); - prefix = _tmp$48; - std = _tmp$49; - suffix = _tmp$50; - return [prefix, std, suffix]; - } else if (_1 === (80)) { - if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 77)) { - _tmp$51 = $substring(layout, 0, i); - _tmp$52 = 533; - _tmp$53 = $substring(layout, (i + 2 >> 0)); - prefix = _tmp$51; - std = _tmp$52; - suffix = _tmp$53; - return [prefix, std, suffix]; - } - } else if (_1 === (112)) { - if (layout.length >= (i + 2 >> 0) && (layout.charCodeAt((i + 1 >> 0)) === 109)) { - _tmp$54 = $substring(layout, 0, i); - _tmp$55 = 534; - _tmp$56 = $substring(layout, (i + 2 >> 0)); - prefix = _tmp$54; - std = _tmp$55; - suffix = _tmp$56; - return [prefix, std, suffix]; - } - } else if (_1 === (45)) { - if (layout.length >= (i + 7 >> 0) && $substring(layout, i, (i + 7 >> 0)) === "-070000") { - _tmp$57 = $substring(layout, 0, i); - _tmp$58 = 30; - _tmp$59 = $substring(layout, (i + 7 >> 0)); - prefix = _tmp$57; - std = _tmp$58; - suffix = _tmp$59; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 9 >> 0) && $substring(layout, i, (i + 9 >> 0)) === "-07:00:00") { - _tmp$60 = $substring(layout, 0, i); - _tmp$61 = 33; - _tmp$62 = $substring(layout, (i + 9 >> 0)); - prefix = _tmp$60; - std = _tmp$61; - suffix = _tmp$62; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 5 >> 0) && $substring(layout, i, (i + 5 >> 0)) === "-0700") { - _tmp$63 = $substring(layout, 0, i); - _tmp$64 = 29; - _tmp$65 = $substring(layout, (i + 5 >> 0)); - prefix = _tmp$63; - std = _tmp$64; - suffix = _tmp$65; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 6 >> 0) && $substring(layout, i, (i + 6 >> 0)) === "-07:00") { - _tmp$66 = $substring(layout, 0, i); - _tmp$67 = 32; - _tmp$68 = $substring(layout, (i + 6 >> 0)); - prefix = _tmp$66; - std = _tmp$67; - suffix = _tmp$68; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 3 >> 0) && $substring(layout, i, (i + 3 >> 0)) === "-07") { - _tmp$69 = $substring(layout, 0, i); - _tmp$70 = 31; - _tmp$71 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$69; - std = _tmp$70; - suffix = _tmp$71; - return [prefix, std, suffix]; - } - } else if (_1 === (90)) { - if (layout.length >= (i + 7 >> 0) && $substring(layout, i, (i + 7 >> 0)) === "Z070000") { - _tmp$72 = $substring(layout, 0, i); - _tmp$73 = 25; - _tmp$74 = $substring(layout, (i + 7 >> 0)); - prefix = _tmp$72; - std = _tmp$73; - suffix = _tmp$74; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 9 >> 0) && $substring(layout, i, (i + 9 >> 0)) === "Z07:00:00") { - _tmp$75 = $substring(layout, 0, i); - _tmp$76 = 28; - _tmp$77 = $substring(layout, (i + 9 >> 0)); - prefix = _tmp$75; - std = _tmp$76; - suffix = _tmp$77; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 5 >> 0) && $substring(layout, i, (i + 5 >> 0)) === "Z0700") { - _tmp$78 = $substring(layout, 0, i); - _tmp$79 = 24; - _tmp$80 = $substring(layout, (i + 5 >> 0)); - prefix = _tmp$78; - std = _tmp$79; - suffix = _tmp$80; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 6 >> 0) && $substring(layout, i, (i + 6 >> 0)) === "Z07:00") { - _tmp$81 = $substring(layout, 0, i); - _tmp$82 = 27; - _tmp$83 = $substring(layout, (i + 6 >> 0)); - prefix = _tmp$81; - std = _tmp$82; - suffix = _tmp$83; - return [prefix, std, suffix]; - } - if (layout.length >= (i + 3 >> 0) && $substring(layout, i, (i + 3 >> 0)) === "Z07") { - _tmp$84 = $substring(layout, 0, i); - _tmp$85 = 26; - _tmp$86 = $substring(layout, (i + 3 >> 0)); - prefix = _tmp$84; - std = _tmp$85; - suffix = _tmp$86; - return [prefix, std, suffix]; - } - } else if ((_1 === (46)) || (_1 === (44))) { - if ((i + 1 >> 0) < layout.length && ((layout.charCodeAt((i + 1 >> 0)) === 48) || (layout.charCodeAt((i + 1 >> 0)) === 57))) { - ch = layout.charCodeAt((i + 1 >> 0)); - j = i + 1 >> 0; - while (true) { - if (!(j < layout.length && (layout.charCodeAt(j) === ch))) { break; } - j = j + (1) >> 0; - } - if (!isDigit(layout, j)) { - code = 34; - if (layout.charCodeAt((i + 1 >> 0)) === 57) { - code = 35; - } - std$1 = stdFracSecond(code, j - ((i + 1 >> 0)) >> 0, c); - _tmp$87 = $substring(layout, 0, i); - _tmp$88 = std$1; - _tmp$89 = $substring(layout, j); - prefix = _tmp$87; - std = _tmp$88; - suffix = _tmp$89; - return [prefix, std, suffix]; - } - } - } - i = i + (1) >> 0; - } - _tmp$90 = layout; - _tmp$91 = 0; - _tmp$92 = ""; - prefix = _tmp$90; - std = _tmp$91; - suffix = _tmp$92; - return [prefix, std, suffix]; - }; - match = function(s1, s2) { - var c1, c2, i, s1, s2; - i = 0; - while (true) { - if (!(i < s1.length)) { break; } - c1 = s1.charCodeAt(i); - c2 = s2.charCodeAt(i); - if (!((c1 === c2))) { - c1 = (c1 | (32)) >>> 0; - c2 = (c2 | (32)) >>> 0; - if (!((c1 === c2)) || c1 < 97 || c1 > 122) { - return false; - } - } - i = i + (1) >> 0; - } - return true; - }; - lookup = function(tab, val) { - var _i, _ref, i, tab, v, val; - _ref = tab; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (val.length >= v.length && match($substring(val, 0, v.length), v)) { - return [i, $substring(val, v.length), $ifaceNil]; - } - _i++; - } - return [-1, val, errBad]; - }; - appendInt = function(b, x$1, width) { - var _q, b, buf, i, q, u, w, width, x$1; - u = ((x$1 >>> 0)); - if (x$1 < 0) { - b = $append(b, 45); - u = ((-x$1 >>> 0)); - } - buf = arrayType$3.zero(); - i = 20; - while (true) { - if (!(u >= 10)) { break; } - i = i - (1) >> 0; - q = (_q = u / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = ((((48 + u >>> 0) - (q * 10 >>> 0) >>> 0) << 24 >>> 24))); - u = q; - } - i = i - (1) >> 0; - ((i < 0 || i >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[i] = (((48 + u >>> 0) << 24 >>> 24))); - w = 20 - i >> 0; - while (true) { - if (!(w < width)) { break; } - b = $append(b, 48); - w = w + (1) >> 0; - } - return $appendSlice(b, $subslice(new sliceType$3(buf), i)); - }; - atoi = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, neg, q, rem, s, x$1; - x$1 = 0; - err = $ifaceNil; - neg = false; - if (!(s === "") && ((s.charCodeAt(0) === 45) || (s.charCodeAt(0) === 43))) { - neg = s.charCodeAt(0) === 45; - s = $substring(s, 1); - } - _tuple = leadingInt(s); - q = _tuple[0]; - rem = _tuple[1]; - err = _tuple[2]; - x$1 = ((q.$low >> 0)); - if (!($interfaceIsEqual(err, $ifaceNil)) || !(rem === "")) { - _tmp = 0; - _tmp$1 = atoiError; - x$1 = _tmp; - err = _tmp$1; - return [x$1, err]; - } - if (neg) { - x$1 = -x$1; - } - _tmp$2 = x$1; - _tmp$3 = $ifaceNil; - x$1 = _tmp$2; - err = _tmp$3; - return [x$1, err]; - }; - stdFracSecond = function(code, n, c) { - var c, code, n; - if (c === 46) { - return code | ((((n & 4095)) << 16 >> 0)); - } - return (code | ((((n & 4095)) << 16 >> 0))) | 268435456; - }; - digitsLen = function(std) { - var std; - return ((std >> 16 >> 0)) & 4095; - }; - separator = function(std) { - var std; - if (((std >> 28 >> 0)) === 0) { - return 46; - } - return 44; - }; - formatNano = function(b, nanosec, std) { - var _q, _r$1, b, buf, n, nanosec, separator$1, start, std, trim, u, x$1; - n = digitsLen(std); - separator$1 = separator(std); - trim = (std & 65535) === 35; - u = nanosec; - buf = arrayType$4.zero(); - start = 9; - while (true) { - if (!(start > 0)) { break; } - start = start - (1) >> 0; - ((start < 0 || start >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[start] = ((((_r$1 = u % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 >>> 0) << 24 >>> 24))); - u = (_q = u / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - } - if (n > 9) { - n = 9; - } - if (trim) { - while (true) { - if (!(n > 0 && ((x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[x$1])) === 48))) { break; } - n = n - (1) >> 0; - } - if (n === 0) { - return b; - } - } - b = $append(b, separator$1); - return $appendSlice(b, $subslice(new sliceType$3(buf), 0, n)); - }; - Time.ptr.prototype.String = function() { - var {_r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, buf, m0, m1, m2, s, sign, t, wid, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).Format("2006-01-02 15:04:05.999999999 -0700 MST"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - s = _r$1; - if (!((x$1 = (x$2 = t.wall, new $Uint64(x$2.$high & 2147483648, (x$2.$low & 0) >>> 0)), (x$1.$high === 0 && x$1.$low === 0)))) { - m2 = ((x$3 = t.ext, new $Uint64(x$3.$high, x$3.$low))); - sign = 43; - if ((x$4 = t.ext, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low < 0)))) { - sign = 45; - m2 = new $Uint64(-m2.$high, -m2.$low); - } - _tmp = $div64(m2, new $Uint64(0, 1000000000), false); - _tmp$1 = $div64(m2, new $Uint64(0, 1000000000), true); - m1 = _tmp; - m2 = _tmp$1; - _tmp$2 = $div64(m1, new $Uint64(0, 1000000000), false); - _tmp$3 = $div64(m1, new $Uint64(0, 1000000000), true); - m0 = _tmp$2; - m1 = _tmp$3; - buf = $makeSlice(sliceType$3, 0, 24); - buf = $appendSlice(buf, " m="); - buf = $append(buf, sign); - wid = 0; - if (!((m0.$high === 0 && m0.$low === 0))) { - buf = appendInt(buf, ((m0.$low >> 0)), 0); - wid = 9; - } - buf = appendInt(buf, ((m1.$low >> 0)), wid); - buf = $append(buf, 46); - buf = appendInt(buf, ((m2.$low >> 0)), 9); - s = s + (($bytesToString(buf))); - } - $s = -1; return s; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.String, $c: true, $r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, buf, m0, m1, m2, s, sign, t, wid, x$1, x$2, x$3, x$4, $s};return $f; - }; - Time.prototype.String = function() { return this.$val.String(); }; - Time.ptr.prototype.GoString = function() { - var {_1, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, buf, loc, month, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - buf = $makeSlice(sliceType$3, 0, 70); - buf = $appendSlice(buf, "time.Date("); - _arg = buf; - _r$1 = $clone(t, Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - _r$2 = appendInt(_arg, _arg$1, 0); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - buf = _r$2; - _r$3 = $clone(t, Time).Month(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - month = _r$3; - /* */ if (1 <= month && month <= 12) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (1 <= month && month <= 12) { */ case 4: - buf = $appendSlice(buf, ", time."); - _arg$2 = buf; - _r$4 = $clone(t, Time).Month(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = new Month(_r$4).String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$3 = _r$5; - buf = $appendSlice(_arg$2, _arg$3); - $s = 6; continue; - /* } else { */ case 5: - buf = appendInt(buf, ((month >> 0)), 0); - /* } */ case 6: - buf = $appendSlice(buf, ", "); - _arg$4 = buf; - _r$6 = $clone(t, Time).Day(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$5 = _r$6; - _r$7 = appendInt(_arg$4, _arg$5, 0); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - buf = _r$7; - buf = $appendSlice(buf, ", "); - _arg$6 = buf; - _r$8 = $clone(t, Time).Hour(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$7 = _r$8; - _r$9 = appendInt(_arg$6, _arg$7, 0); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - buf = _r$9; - buf = $appendSlice(buf, ", "); - _arg$8 = buf; - _r$10 = $clone(t, Time).Minute(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$9 = _r$10; - _r$11 = appendInt(_arg$8, _arg$9, 0); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - buf = _r$11; - buf = $appendSlice(buf, ", "); - _arg$10 = buf; - _r$12 = $clone(t, Time).Second(); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$11 = _r$12; - _r$13 = appendInt(_arg$10, _arg$11, 0); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - buf = _r$13; - buf = $appendSlice(buf, ", "); - buf = appendInt(buf, $clone(t, Time).Nanosecond(), 0); - buf = $appendSlice(buf, ", "); - loc = $clone(t, Time).Location(); - _1 = loc; - if (_1 === ($pkg.UTC) || _1 === ptrType$2.nil) { - buf = $appendSlice(buf, "time.UTC"); - } else if (_1 === ($pkg.Local)) { - buf = $appendSlice(buf, "time.Local"); - } else { - buf = $appendSlice(buf, "time.Location("); - buf = $appendSlice(buf, (new sliceType$3($stringToBytes(quote(loc.name))))); - buf = $appendSlice(buf, ")"); - } - buf = $append(buf, 41); - $s = -1; return ($bytesToString(buf)); - /* */ } return; } var $f = {$blk: Time.ptr.prototype.GoString, $c: true, $r, _1, _arg, _arg$1, _arg$10, _arg$11, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, buf, loc, month, t, $s};return $f; - }; - Time.prototype.GoString = function() { return this.$val.GoString(); }; - Time.ptr.prototype.Format = function(layout) { - var {_r$1, b, buf, layout, max, t, $s, $r, $c} = $restore(this, {layout}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - b = sliceType$3.nil; - max = layout.length + 10 >> 0; - if (max < 64) { - buf = arrayType$5.zero(); - b = $subslice(new sliceType$3(buf), 0, 0); - } else { - b = $makeSlice(sliceType$3, 0, max); - } - _r$1 = $clone(t, Time).AppendFormat(b, layout); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = -1; return ($bytesToString(b)); - /* */ } return; } var $f = {$blk: Time.ptr.prototype.Format, $c: true, $r, _r$1, b, buf, layout, max, t, $s};return $f; - }; - Time.prototype.Format = function(layout) { return this.$val.Format(layout); }; - Time.ptr.prototype.AppendFormat = function(b, layout) { - var {_1, _q, _q$1, _q$2, _q$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, _tuple$3, abs, absoffset, b, day, hour, hr, hr$1, layout, m, min, month, name, offset, prefix, s, sec, std, suffix, t, y, yday, year, zone$1, zone$2, $s, $r, $c} = $restore(this, {b, layout}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = $clone(t, Time).locabs(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - name = _tuple[0]; - offset = _tuple[1]; - abs = _tuple[2]; - year = -1; - month = 0; - day = 0; - yday = 0; - hour = -1; - min = 0; - sec = 0; - while (true) { - if (!(!(layout === ""))) { break; } - _tuple$1 = nextStdChunk(layout); - prefix = _tuple$1[0]; - std = _tuple$1[1]; - suffix = _tuple$1[2]; - if (!(prefix === "")) { - b = $appendSlice(b, prefix); - } - if (std === 0) { - break; - } - layout = suffix; - if (year < 0 && !(((std & 256) === 0))) { - _tuple$2 = absDate(abs, true); - year = _tuple$2[0]; - month = _tuple$2[1]; - day = _tuple$2[2]; - yday = _tuple$2[3]; - yday = yday + (1) >> 0; - } - if (hour < 0 && !(((std & 512) === 0))) { - _tuple$3 = absClock(abs); - hour = _tuple$3[0]; - min = _tuple$3[1]; - sec = _tuple$3[2]; - } - switch (0) { default: - _1 = std & 65535; - if (_1 === (276)) { - y = year; - if (y < 0) { - y = -y; - } - b = appendInt(b, (_r$2 = y % 100, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")), 2); - } else if (_1 === (275)) { - b = appendInt(b, year, 4); - } else if (_1 === (258)) { - b = $appendSlice(b, $substring(new Month(month).String(), 0, 3)); - } else if (_1 === (257)) { - m = new Month(month).String(); - b = $appendSlice(b, m); - } else if (_1 === (259)) { - b = appendInt(b, ((month >> 0)), 0); - } else if (_1 === (260)) { - b = appendInt(b, ((month >> 0)), 2); - } else if (_1 === (262)) { - b = $appendSlice(b, $substring(new Weekday(absWeekday(abs)).String(), 0, 3)); - } else if (_1 === (261)) { - s = new Weekday(absWeekday(abs)).String(); - b = $appendSlice(b, s); - } else if (_1 === (263)) { - b = appendInt(b, day, 0); - } else if (_1 === (264)) { - if (day < 10) { - b = $append(b, 32); - } - b = appendInt(b, day, 0); - } else if (_1 === (265)) { - b = appendInt(b, day, 2); - } else if (_1 === (266)) { - if (yday < 100) { - b = $append(b, 32); - if (yday < 10) { - b = $append(b, 32); - } - } - b = appendInt(b, yday, 0); - } else if (_1 === (267)) { - b = appendInt(b, yday, 3); - } else if (_1 === (524)) { - b = appendInt(b, hour, 2); - } else if (_1 === (525)) { - hr = (_r$3 = hour % 12, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")); - if (hr === 0) { - hr = 12; - } - b = appendInt(b, hr, 0); - } else if (_1 === (526)) { - hr$1 = (_r$4 = hour % 12, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")); - if (hr$1 === 0) { - hr$1 = 12; - } - b = appendInt(b, hr$1, 2); - } else if (_1 === (527)) { - b = appendInt(b, min, 0); - } else if (_1 === (528)) { - b = appendInt(b, min, 2); - } else if (_1 === (529)) { - b = appendInt(b, sec, 0); - } else if (_1 === (530)) { - b = appendInt(b, sec, 2); - } else if (_1 === (533)) { - if (hour >= 12) { - b = $appendSlice(b, "PM"); - } else { - b = $appendSlice(b, "AM"); - } - } else if (_1 === (534)) { - if (hour >= 12) { - b = $appendSlice(b, "pm"); - } else { - b = $appendSlice(b, "am"); - } - } else if ((_1 === (24)) || (_1 === (27)) || (_1 === (25)) || (_1 === (26)) || (_1 === (28)) || (_1 === (29)) || (_1 === (32)) || (_1 === (30)) || (_1 === (31)) || (_1 === (33))) { - if ((offset === 0) && ((std === 24) || (std === 27) || (std === 25) || (std === 26) || (std === 28))) { - b = $append(b, 90); - break; - } - zone$1 = (_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - absoffset = offset; - if (zone$1 < 0) { - b = $append(b, 45); - zone$1 = -zone$1; - absoffset = -absoffset; - } else { - b = $append(b, 43); - } - b = appendInt(b, (_q$1 = zone$1 / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), 2); - if ((std === 27) || (std === 32) || (std === 28) || (std === 33)) { - b = $append(b, 58); - } - if (!((std === 31)) && !((std === 26))) { - b = appendInt(b, (_r$5 = zone$1 % 60, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")), 2); - } - if ((std === 25) || (std === 30) || (std === 33) || (std === 28)) { - if ((std === 33) || (std === 28)) { - b = $append(b, 58); - } - b = appendInt(b, (_r$6 = absoffset % 60, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")), 2); - } - } else if (_1 === (23)) { - if (!(name === "")) { - b = $appendSlice(b, name); - break; - } - zone$2 = (_q$2 = offset / 60, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")); - if (zone$2 < 0) { - b = $append(b, 45); - zone$2 = -zone$2; - } else { - b = $append(b, 43); - } - b = appendInt(b, (_q$3 = zone$2 / 60, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")), 2); - b = appendInt(b, (_r$7 = zone$2 % 60, _r$7 === _r$7 ? _r$7 : $throwRuntimeError("integer divide by zero")), 2); - } else if ((_1 === (34)) || (_1 === (35))) { - b = formatNano(b, (($clone(t, Time).Nanosecond() >>> 0)), std); - } - } - } - $s = -1; return b; - /* */ } return; } var $f = {$blk: Time.ptr.prototype.AppendFormat, $c: true, $r, _1, _q, _q$1, _q$2, _q$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, _tuple$3, abs, absoffset, b, day, hour, hr, hr$1, layout, m, min, month, name, offset, prefix, s, sec, std, suffix, t, y, yday, year, zone$1, zone$2, $s};return $f; - }; - Time.prototype.AppendFormat = function(b, layout) { return this.$val.AppendFormat(b, layout); }; - quote = function(s) { - var _i, _ref, _rune, buf, c, i, j, s, width; - buf = $makeSlice(sliceType$3, 1, (s.length + 2 >> 0)); - (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0] = 34); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - c = _rune[0]; - if (c >= 128 || c < 32) { - width = 0; - if (c === 65533) { - width = 1; - if ((i + 2 >> 0) < s.length && $substring(s, i, (i + 3 >> 0)) === "\xEF\xBF\xBD") { - width = 3; - } - } else { - width = ($encodeRune(c)).length; - } - j = 0; - while (true) { - if (!(j < width)) { break; } - buf = $appendSlice(buf, "\\x"); - buf = $append(buf, "0123456789abcdef".charCodeAt((s.charCodeAt((i + j >> 0)) >>> 4 << 24 >>> 24))); - buf = $append(buf, "0123456789abcdef".charCodeAt(((s.charCodeAt((i + j >> 0)) & 15) >>> 0))); - j = j + (1) >> 0; - } - } else { - if ((c === 34) || (c === 92)) { - buf = $append(buf, 92); - } - buf = $appendSlice(buf, ($encodeRune(c))); - } - _i += _rune[1]; - } - buf = $append(buf, 34); - return ($bytesToString(buf)); - }; - ParseError.ptr.prototype.Error = function() { - var e; - e = this; - if (e.Message === "") { - return "parsing time " + quote(e.Value) + " as " + quote(e.Layout) + ": cannot parse " + quote(e.ValueElem) + " as " + quote(e.LayoutElem); - } - return "parsing time " + quote(e.Value) + e.Message; - }; - ParseError.prototype.Error = function() { return this.$val.Error(); }; - isDigit = function(s, i) { - var c, i, s; - if (s.length <= i) { - return false; - } - c = s.charCodeAt(i); - return 48 <= c && c <= 57; - }; - getnum = function(s, fixed) { - var fixed, s; - if (!isDigit(s, 0)) { - return [0, s, errBad]; - } - if (!isDigit(s, 1)) { - if (fixed) { - return [0, s, errBad]; - } - return [(((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0)), $substring(s, 1), $ifaceNil]; - } - return [($imul((((s.charCodeAt(0) - 48 << 24 >>> 24) >> 0)), 10)) + (((s.charCodeAt(1) - 48 << 24 >>> 24) >> 0)) >> 0, $substring(s, 2), $ifaceNil]; - }; - getnum3 = function(s, fixed) { - var _tmp, _tmp$1, fixed, i, n, s; - _tmp = 0; - _tmp$1 = 0; - n = _tmp; - i = _tmp$1; - i = 0; - while (true) { - if (!(i < 3 && isDigit(s, i))) { break; } - n = ($imul(n, 10)) + (((s.charCodeAt(i) - 48 << 24 >>> 24) >> 0)) >> 0; - i = i + (1) >> 0; - } - if ((i === 0) || fixed && !((i === 3))) { - return [0, s, errBad]; - } - return [n, $substring(s, i), $ifaceNil]; - }; - cutspace = function(s) { - var s; - while (true) { - if (!(s.length > 0 && (s.charCodeAt(0) === 32))) { break; } - s = $substring(s, 1); - } - return s; - }; - skip = function(value, prefix) { - var prefix, value; - while (true) { - if (!(prefix.length > 0)) { break; } - if (prefix.charCodeAt(0) === 32) { - if (value.length > 0 && !((value.charCodeAt(0) === 32))) { - return [value, errBad]; - } - prefix = cutspace(prefix); - value = cutspace(value); - continue; - } - if ((value.length === 0) || !((value.charCodeAt(0) === prefix.charCodeAt(0)))) { - return [value, errBad]; - } - prefix = $substring(prefix, 1); - value = $substring(value, 1); - } - return [value, $ifaceNil]; - }; - Parse = function(layout, value) { - var {$24r, _r$1, layout, value, $s, $r, $c} = $restore(this, {layout, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = parse(layout, value, $pkg.UTC, $pkg.Local); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Parse, $c: true, $r, $24r, _r$1, layout, value, $s};return $f; - }; - $pkg.Parse = Parse; - parse = function(layout, value, defaultLocation, local) { - var {$24r, $24r$1, _1, _2, _3, _4, _q, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alayout, amSet, avalue, d, day, defaultLocation, err, hold, hour, hour$1, hr, i, i$1, layout, local, m, min, min$1, mm, month, n, n$1, name, ndigit, nsec, offset, offset$1, ok, ok$1, p, pmSet, prefix, rangeErrString, sec, seconds, sign, ss, std, stdstr, suffix, t, t$1, value, x$1, x$2, x$3, yday, year, z, zoneName, zoneOffset, $s, $r, $c} = $restore(this, {layout, value, defaultLocation, local}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = layout; - _tmp$1 = value; - alayout = _tmp; - avalue = _tmp$1; - rangeErrString = ""; - amSet = false; - pmSet = false; - year = 0; - month = -1; - day = -1; - yday = -1; - hour = 0; - min = 0; - sec = 0; - nsec = 0; - z = ptrType$2.nil; - zoneOffset = -1; - zoneName = ""; - while (true) { - err = $ifaceNil; - _tuple = nextStdChunk(layout); - prefix = _tuple[0]; - std = _tuple[1]; - suffix = _tuple[2]; - stdstr = $substring(layout, prefix.length, (layout.length - suffix.length >> 0)); - _tuple$1 = skip(value, prefix); - value = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, prefix, value, "")]; - } - if (std === 0) { - if (!((value.length === 0))) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, "", value, ": extra text: " + quote(value))]; - } - break; - } - layout = suffix; - p = ""; - switch (0) { default: - _1 = std & 65535; - if (_1 === (276)) { - if (value.length < 2) { - err = errBad; - break; - } - hold = value; - _tmp$2 = $substring(value, 0, 2); - _tmp$3 = $substring(value, 2); - p = _tmp$2; - value = _tmp$3; - _tuple$2 = atoi(p); - year = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - value = hold; - } else if (year >= 69) { - year = year + (1900) >> 0; - } else { - year = year + (2000) >> 0; - } - } else if (_1 === (275)) { - if (value.length < 4 || !isDigit(value, 0)) { - err = errBad; - break; - } - _tmp$4 = $substring(value, 0, 4); - _tmp$5 = $substring(value, 4); - p = _tmp$4; - value = _tmp$5; - _tuple$3 = atoi(p); - year = _tuple$3[0]; - err = _tuple$3[1]; - } else if (_1 === (258)) { - _tuple$4 = lookup(shortMonthNames, value); - month = _tuple$4[0]; - value = _tuple$4[1]; - err = _tuple$4[2]; - month = month + (1) >> 0; - } else if (_1 === (257)) { - _tuple$5 = lookup(longMonthNames, value); - month = _tuple$5[0]; - value = _tuple$5[1]; - err = _tuple$5[2]; - month = month + (1) >> 0; - } else if ((_1 === (259)) || (_1 === (260))) { - _tuple$6 = getnum(value, std === 260); - month = _tuple$6[0]; - value = _tuple$6[1]; - err = _tuple$6[2]; - if ($interfaceIsEqual(err, $ifaceNil) && (month <= 0 || 12 < month)) { - rangeErrString = "month"; - } - } else if (_1 === (262)) { - _tuple$7 = lookup(shortDayNames, value); - value = _tuple$7[1]; - err = _tuple$7[2]; - } else if (_1 === (261)) { - _tuple$8 = lookup(longDayNames, value); - value = _tuple$8[1]; - err = _tuple$8[2]; - } else if ((_1 === (263)) || (_1 === (264)) || (_1 === (265))) { - if ((std === 264) && value.length > 0 && (value.charCodeAt(0) === 32)) { - value = $substring(value, 1); - } - _tuple$9 = getnum(value, std === 265); - day = _tuple$9[0]; - value = _tuple$9[1]; - err = _tuple$9[2]; - } else if ((_1 === (266)) || (_1 === (267))) { - i = 0; - while (true) { - if (!(i < 2)) { break; } - if ((std === 266) && value.length > 0 && (value.charCodeAt(0) === 32)) { - value = $substring(value, 1); - } - i = i + (1) >> 0; - } - _tuple$10 = getnum3(value, std === 267); - yday = _tuple$10[0]; - value = _tuple$10[1]; - err = _tuple$10[2]; - } else if (_1 === (524)) { - _tuple$11 = getnum(value, false); - hour = _tuple$11[0]; - value = _tuple$11[1]; - err = _tuple$11[2]; - if (hour < 0 || 24 <= hour) { - rangeErrString = "hour"; - } - } else if ((_1 === (525)) || (_1 === (526))) { - _tuple$12 = getnum(value, std === 526); - hour = _tuple$12[0]; - value = _tuple$12[1]; - err = _tuple$12[2]; - if (hour < 0 || 12 < hour) { - rangeErrString = "hour"; - } - } else if ((_1 === (527)) || (_1 === (528))) { - _tuple$13 = getnum(value, std === 528); - min = _tuple$13[0]; - value = _tuple$13[1]; - err = _tuple$13[2]; - if (min < 0 || 60 <= min) { - rangeErrString = "minute"; - } - } else if ((_1 === (529)) || (_1 === (530))) { - _tuple$14 = getnum(value, std === 530); - sec = _tuple$14[0]; - value = _tuple$14[1]; - err = _tuple$14[2]; - if (sec < 0 || 60 <= sec) { - rangeErrString = "second"; - break; - } - if (value.length >= 2 && commaOrPeriod(value.charCodeAt(0)) && isDigit(value, 1)) { - _tuple$15 = nextStdChunk(layout); - std = _tuple$15[1]; - std = std & (65535); - if ((std === 34) || (std === 35)) { - break; - } - n = 2; - while (true) { - if (!(n < value.length && isDigit(value, n))) { break; } - n = n + (1) >> 0; - } - _tuple$16 = parseNanoseconds(value, n); - nsec = _tuple$16[0]; - rangeErrString = _tuple$16[1]; - err = _tuple$16[2]; - value = $substring(value, n); - } - } else if (_1 === (533)) { - if (value.length < 2) { - err = errBad; - break; - } - _tmp$6 = $substring(value, 0, 2); - _tmp$7 = $substring(value, 2); - p = _tmp$6; - value = _tmp$7; - _2 = p; - if (_2 === ("PM")) { - pmSet = true; - } else if (_2 === ("AM")) { - amSet = true; - } else { - err = errBad; - } - } else if (_1 === (534)) { - if (value.length < 2) { - err = errBad; - break; - } - _tmp$8 = $substring(value, 0, 2); - _tmp$9 = $substring(value, 2); - p = _tmp$8; - value = _tmp$9; - _3 = p; - if (_3 === ("pm")) { - pmSet = true; - } else if (_3 === ("am")) { - amSet = true; - } else { - err = errBad; - } - } else if ((_1 === (24)) || (_1 === (27)) || (_1 === (25)) || (_1 === (26)) || (_1 === (28)) || (_1 === (29)) || (_1 === (31)) || (_1 === (32)) || (_1 === (30)) || (_1 === (33))) { - if (((std === 24) || (std === 26) || (std === 27)) && value.length >= 1 && (value.charCodeAt(0) === 90)) { - value = $substring(value, 1); - z = $pkg.UTC; - break; - } - _tmp$10 = ""; - _tmp$11 = ""; - _tmp$12 = ""; - _tmp$13 = ""; - sign = _tmp$10; - hour$1 = _tmp$11; - min$1 = _tmp$12; - seconds = _tmp$13; - if ((std === 27) || (std === 32)) { - if (value.length < 6) { - err = errBad; - break; - } - if (!((value.charCodeAt(3) === 58))) { - err = errBad; - break; - } - _tmp$14 = $substring(value, 0, 1); - _tmp$15 = $substring(value, 1, 3); - _tmp$16 = $substring(value, 4, 6); - _tmp$17 = "00"; - _tmp$18 = $substring(value, 6); - sign = _tmp$14; - hour$1 = _tmp$15; - min$1 = _tmp$16; - seconds = _tmp$17; - value = _tmp$18; - } else if ((std === 31) || (std === 26)) { - if (value.length < 3) { - err = errBad; - break; - } - _tmp$19 = $substring(value, 0, 1); - _tmp$20 = $substring(value, 1, 3); - _tmp$21 = "00"; - _tmp$22 = "00"; - _tmp$23 = $substring(value, 3); - sign = _tmp$19; - hour$1 = _tmp$20; - min$1 = _tmp$21; - seconds = _tmp$22; - value = _tmp$23; - } else if ((std === 28) || (std === 33)) { - if (value.length < 9) { - err = errBad; - break; - } - if (!((value.charCodeAt(3) === 58)) || !((value.charCodeAt(6) === 58))) { - err = errBad; - break; - } - _tmp$24 = $substring(value, 0, 1); - _tmp$25 = $substring(value, 1, 3); - _tmp$26 = $substring(value, 4, 6); - _tmp$27 = $substring(value, 7, 9); - _tmp$28 = $substring(value, 9); - sign = _tmp$24; - hour$1 = _tmp$25; - min$1 = _tmp$26; - seconds = _tmp$27; - value = _tmp$28; - } else if ((std === 25) || (std === 30)) { - if (value.length < 7) { - err = errBad; - break; - } - _tmp$29 = $substring(value, 0, 1); - _tmp$30 = $substring(value, 1, 3); - _tmp$31 = $substring(value, 3, 5); - _tmp$32 = $substring(value, 5, 7); - _tmp$33 = $substring(value, 7); - sign = _tmp$29; - hour$1 = _tmp$30; - min$1 = _tmp$31; - seconds = _tmp$32; - value = _tmp$33; - } else { - if (value.length < 5) { - err = errBad; - break; - } - _tmp$34 = $substring(value, 0, 1); - _tmp$35 = $substring(value, 1, 3); - _tmp$36 = $substring(value, 3, 5); - _tmp$37 = "00"; - _tmp$38 = $substring(value, 5); - sign = _tmp$34; - hour$1 = _tmp$35; - min$1 = _tmp$36; - seconds = _tmp$37; - value = _tmp$38; - } - _tmp$39 = 0; - _tmp$40 = 0; - _tmp$41 = 0; - hr = _tmp$39; - mm = _tmp$40; - ss = _tmp$41; - _tuple$17 = atoi(hour$1); - hr = _tuple$17[0]; - err = _tuple$17[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - _tuple$18 = atoi(min$1); - mm = _tuple$18[0]; - err = _tuple$18[1]; - } - if ($interfaceIsEqual(err, $ifaceNil)) { - _tuple$19 = atoi(seconds); - ss = _tuple$19[0]; - err = _tuple$19[1]; - } - zoneOffset = ($imul(((($imul(hr, 60)) + mm >> 0)), 60)) + ss >> 0; - _4 = sign.charCodeAt(0); - if (_4 === (43)) { - } else if (_4 === (45)) { - zoneOffset = -zoneOffset; - } else { - err = errBad; - } - } else if (_1 === (23)) { - if (value.length >= 3 && $substring(value, 0, 3) === "UTC") { - z = $pkg.UTC; - value = $substring(value, 3); - break; - } - _tuple$20 = parseTimeZone(value); - n$1 = _tuple$20[0]; - ok = _tuple$20[1]; - if (!ok) { - err = errBad; - break; - } - _tmp$42 = $substring(value, 0, n$1); - _tmp$43 = $substring(value, n$1); - zoneName = _tmp$42; - value = _tmp$43; - } else if (_1 === (34)) { - ndigit = 1 + digitsLen(std) >> 0; - if (value.length < ndigit) { - err = errBad; - break; - } - _tuple$21 = parseNanoseconds(value, ndigit); - nsec = _tuple$21[0]; - rangeErrString = _tuple$21[1]; - err = _tuple$21[2]; - value = $substring(value, ndigit); - } else if (_1 === (35)) { - if (value.length < 2 || !commaOrPeriod(value.charCodeAt(0)) || value.charCodeAt(1) < 48 || 57 < value.charCodeAt(1)) { - break; - } - i$1 = 0; - while (true) { - if (!(i$1 < 9 && (i$1 + 1 >> 0) < value.length && 48 <= value.charCodeAt((i$1 + 1 >> 0)) && value.charCodeAt((i$1 + 1 >> 0)) <= 57)) { break; } - i$1 = i$1 + (1) >> 0; - } - _tuple$22 = parseNanoseconds(value, 1 + i$1 >> 0); - nsec = _tuple$22[0]; - rangeErrString = _tuple$22[1]; - err = _tuple$22[2]; - value = $substring(value, (1 + i$1 >> 0)); - } - } - if (!(rangeErrString === "")) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, stdstr, value, ": " + rangeErrString + " out of range")]; - } - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, stdstr, value, "")]; - } - } - if (pmSet && hour < 12) { - hour = hour + (12) >> 0; - } else if (amSet && (hour === 12)) { - hour = 0; - } - if (yday >= 0) { - d = 0; - m = 0; - if (isLeap(year)) { - if (yday === 60) { - m = 2; - d = 29; - } else if (yday > 60) { - yday = yday - (1) >> 0; - } - } - if (yday < 1 || yday > 365) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, "", value, ": day-of-year out of range")]; - } - if (m === 0) { - m = (_q = ((yday - 1 >> 0)) / 31, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 1 >> 0; - if (((((m < 0 || m >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[m]) >> 0)) < yday) { - m = m + (1) >> 0; - } - d = yday - (((x$1 = m - 1 >> 0, ((x$1 < 0 || x$1 >= daysBefore.length) ? ($throwRuntimeError("index out of range"), undefined) : daysBefore[x$1])) >> 0)) >> 0; - } - if (month >= 0 && !((month === m))) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, "", value, ": day-of-year does not match month")]; - } - month = m; - if (day >= 0 && !((day === d))) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, "", value, ": day-of-year does not match day")]; - } - day = d; - } else { - if (month < 0) { - month = 1; - } - if (day < 0) { - day = 1; - } - } - if (day < 1 || day > daysIn(((month >> 0)), year)) { - $s = -1; return [new Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new ParseError.ptr(alayout, avalue, "", value, ": day out of range")]; - } - /* */ if (!(z === ptrType$2.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(z === ptrType$2.nil)) { */ case 1: - _r$1 = Date(year, ((month >> 0)), day, hour, min, sec, nsec, z); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [_r$1, $ifaceNil]; - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if (!((zoneOffset === -1))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((zoneOffset === -1))) { */ case 5: - _r$2 = Date(year, ((month >> 0)), day, hour, min, sec, nsec, $pkg.UTC); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - t = $clone(_r$2, Time); - t.addSec((x$2 = (new $Int64(0, zoneOffset)), new $Int64(-x$2.$high, -x$2.$low))); - _r$3 = local.lookup(t.unixSec()); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$23 = _r$3; - name = _tuple$23[0]; - offset = _tuple$23[1]; - if ((offset === zoneOffset) && (zoneName === "" || name === zoneName)) { - t.setLoc(local); - $s = -1; return [t, $ifaceNil]; - } - t.setLoc(FixedZone(zoneName, zoneOffset)); - $s = -1; return [t, $ifaceNil]; - /* } */ case 6: - /* */ if (!(zoneName === "")) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(zoneName === "")) { */ case 9: - _r$4 = Date(year, ((month >> 0)), day, hour, min, sec, nsec, $pkg.UTC); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - t$1 = $clone(_r$4, Time); - _r$5 = local.lookupName(zoneName, t$1.unixSec()); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$24 = _r$5; - offset$1 = _tuple$24[0]; - ok$1 = _tuple$24[1]; - if (ok$1) { - t$1.addSec((x$3 = (new $Int64(0, offset$1)), new $Int64(-x$3.$high, -x$3.$low))); - t$1.setLoc(local); - $s = -1; return [t$1, $ifaceNil]; - } - if (zoneName.length > 3 && $substring(zoneName, 0, 3) === "GMT") { - _tuple$25 = atoi($substring(zoneName, 3)); - offset$1 = _tuple$25[0]; - offset$1 = $imul(offset$1, (3600)); - } - t$1.setLoc(FixedZone(zoneName, offset$1)); - $s = -1; return [t$1, $ifaceNil]; - /* } */ case 10: - _r$6 = Date(year, ((month >> 0)), day, hour, min, sec, nsec, defaultLocation); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = [_r$6, $ifaceNil]; - $s = 14; case 14: return $24r$1; - /* */ } return; } var $f = {$blk: parse, $c: true, $r, $24r, $24r$1, _1, _2, _3, _4, _q, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alayout, amSet, avalue, d, day, defaultLocation, err, hold, hour, hour$1, hr, i, i$1, layout, local, m, min, min$1, mm, month, n, n$1, name, ndigit, nsec, offset, offset$1, ok, ok$1, p, pmSet, prefix, rangeErrString, sec, seconds, sign, ss, std, stdstr, suffix, t, t$1, value, x$1, x$2, x$3, yday, year, z, zoneName, zoneOffset, $s};return $f; - }; - parseTimeZone = function(value) { - var _1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, length, nUpper, ok, ok$1, value; - length = 0; - ok = false; - if (value.length < 3) { - _tmp = 0; - _tmp$1 = false; - length = _tmp; - ok = _tmp$1; - return [length, ok]; - } - if (value.length >= 4 && ($substring(value, 0, 4) === "ChST" || $substring(value, 0, 4) === "MeST")) { - _tmp$2 = 4; - _tmp$3 = true; - length = _tmp$2; - ok = _tmp$3; - return [length, ok]; - } - if ($substring(value, 0, 3) === "GMT") { - length = parseGMT(value); - _tmp$4 = length; - _tmp$5 = true; - length = _tmp$4; - ok = _tmp$5; - return [length, ok]; - } - if ((value.charCodeAt(0) === 43) || (value.charCodeAt(0) === 45)) { - length = parseSignedOffset(value); - ok$1 = length > 0; - _tmp$6 = length; - _tmp$7 = ok$1; - length = _tmp$6; - ok = _tmp$7; - return [length, ok]; - } - nUpper = 0; - nUpper = 0; - while (true) { - if (!(nUpper < 6)) { break; } - if (nUpper >= value.length) { - break; - } - c = value.charCodeAt(nUpper); - if (c < 65 || 90 < c) { - break; - } - nUpper = nUpper + (1) >> 0; - } - _1 = nUpper; - if ((_1 === (0)) || (_1 === (1)) || (_1 === (2)) || (_1 === (6))) { - _tmp$8 = 0; - _tmp$9 = false; - length = _tmp$8; - ok = _tmp$9; - return [length, ok]; - } else if (_1 === (5)) { - if (value.charCodeAt(4) === 84) { - _tmp$10 = 5; - _tmp$11 = true; - length = _tmp$10; - ok = _tmp$11; - return [length, ok]; - } - } else if (_1 === (4)) { - if ((value.charCodeAt(3) === 84) || $substring(value, 0, 4) === "WITA") { - _tmp$12 = 4; - _tmp$13 = true; - length = _tmp$12; - ok = _tmp$13; - return [length, ok]; - } - } else if (_1 === (3)) { - _tmp$14 = 3; - _tmp$15 = true; - length = _tmp$14; - ok = _tmp$15; - return [length, ok]; - } - _tmp$16 = 0; - _tmp$17 = false; - length = _tmp$16; - ok = _tmp$17; - return [length, ok]; - }; - parseGMT = function(value) { - var value; - value = $substring(value, 3); - if (value.length === 0) { - return 3; - } - return 3 + parseSignedOffset(value) >> 0; - }; - parseSignedOffset = function(value) { - var _tuple, err, rem, sign, value, x$1; - sign = value.charCodeAt(0); - if (!((sign === 45)) && !((sign === 43))) { - return 0; - } - _tuple = leadingInt($substring(value, 1)); - x$1 = _tuple[0]; - rem = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil)) || $substring(value, 1) === rem) { - return 0; - } - if ((x$1.$high > 0 || (x$1.$high === 0 && x$1.$low > 23))) { - return 0; - } - return value.length - rem.length >> 0; - }; - commaOrPeriod = function(b) { - var b; - return (b === 46) || (b === 44); - }; - parseNanoseconds = function(value, nbytes) { - var _tuple, err, i, nbytes, ns, rangeErrString, scaleDigits, value; - ns = 0; - rangeErrString = ""; - err = $ifaceNil; - if (!commaOrPeriod(value.charCodeAt(0))) { - err = errBad; - return [ns, rangeErrString, err]; - } - if (nbytes > 10) { - value = $substring(value, 0, 10); - nbytes = 10; - } - _tuple = atoi($substring(value, 1, nbytes)); - ns = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ns, rangeErrString, err]; - } - if (ns < 0) { - rangeErrString = "fractional second"; - return [ns, rangeErrString, err]; - } - scaleDigits = 10 - nbytes >> 0; - i = 0; - while (true) { - if (!(i < scaleDigits)) { break; } - ns = $imul(ns, (10)); - i = i + (1) >> 0; - } - return [ns, rangeErrString, err]; - }; - leadingInt = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, c, err, i, rem, s, x$1, x$2, x$3, x$4; - x$1 = new $Uint64(0, 0); - rem = ""; - err = $ifaceNil; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (c < 48 || c > 57) { - break; - } - if ((x$1.$high > 214748364 || (x$1.$high === 214748364 && x$1.$low > 3435973836))) { - _tmp = new $Uint64(0, 0); - _tmp$1 = ""; - _tmp$2 = errLeadingInt; - x$1 = _tmp; - rem = _tmp$1; - err = _tmp$2; - return [x$1, rem, err]; - } - x$1 = (x$2 = (x$3 = $mul64(x$1, new $Uint64(0, 10)), x$4 = (new $Uint64(0, c)), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)), new $Uint64(x$2.$high - 0, x$2.$low - 48)); - if ((x$1.$high > 2147483648 || (x$1.$high === 2147483648 && x$1.$low > 0))) { - _tmp$3 = new $Uint64(0, 0); - _tmp$4 = ""; - _tmp$5 = errLeadingInt; - x$1 = _tmp$3; - rem = _tmp$4; - err = _tmp$5; - return [x$1, rem, err]; - } - i = i + (1) >> 0; - } - _tmp$6 = x$1; - _tmp$7 = $substring(s, i); - _tmp$8 = $ifaceNil; - x$1 = _tmp$6; - rem = _tmp$7; - err = _tmp$8; - return [x$1, rem, err]; - }; - leadingFraction = function(s) { - var _tmp, _tmp$1, _tmp$2, c, i, overflow, rem, s, scale, x$1, x$2, x$3, x$4, y; - x$1 = new $Uint64(0, 0); - scale = 0; - rem = ""; - i = 0; - scale = 1; - overflow = false; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (c < 48 || c > 57) { - break; - } - if (overflow) { - i = i + (1) >> 0; - continue; - } - if ((x$1.$high > 214748364 || (x$1.$high === 214748364 && x$1.$low > 3435973836))) { - overflow = true; - i = i + (1) >> 0; - continue; - } - y = (x$2 = (x$3 = $mul64(x$1, new $Uint64(0, 10)), x$4 = (new $Uint64(0, c)), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)), new $Uint64(x$2.$high - 0, x$2.$low - 48)); - if ((y.$high > 2147483648 || (y.$high === 2147483648 && y.$low > 0))) { - overflow = true; - i = i + (1) >> 0; - continue; - } - x$1 = y; - scale = scale * (10); - i = i + (1) >> 0; - } - _tmp = x$1; - _tmp$1 = scale; - _tmp$2 = $substring(s, i); - x$1 = _tmp; - scale = _tmp$1; - rem = _tmp$2; - return [x$1, scale, rem]; - }; - ParseDuration = function(s) { - var _entry, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, c, c$1, d, err, f, i, neg, ok, orig, pl, pl$1, post, pre, s, scale, u, unit, v, x$1, x$2, x$3, x$4; - orig = s; - d = new $Uint64(0, 0); - neg = false; - if (!(s === "")) { - c = s.charCodeAt(0); - if ((c === 45) || (c === 43)) { - neg = c === 45; - s = $substring(s, 1); - } - } - if (s === "0") { - return [new Duration(0, 0), $ifaceNil]; - } - if (s === "") { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - while (true) { - if (!(!(s === ""))) { break; } - _tmp = new $Uint64(0, 0); - _tmp$1 = new $Uint64(0, 0); - v = _tmp; - f = _tmp$1; - scale = 1; - err = $ifaceNil; - if (!((s.charCodeAt(0) === 46) || 48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57)) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - pl = s.length; - _tuple = leadingInt(s); - v = _tuple[0]; - s = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - pre = !((pl === s.length)); - post = false; - if (!(s === "") && (s.charCodeAt(0) === 46)) { - s = $substring(s, 1); - pl$1 = s.length; - _tuple$1 = leadingFraction(s); - f = _tuple$1[0]; - scale = _tuple$1[1]; - s = _tuple$1[2]; - post = !((pl$1 === s.length)); - } - if (!pre && !post) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c$1 = s.charCodeAt(i); - if ((c$1 === 46) || 48 <= c$1 && c$1 <= 57) { - break; - } - i = i + (1) >> 0; - } - if (i === 0) { - return [new Duration(0, 0), errors.New("time: missing unit in duration " + quote(orig))]; - } - u = $substring(s, 0, i); - s = $substring(s, i); - _tuple$2 = (_entry = unitMap[$String.keyFor(u)], _entry !== undefined ? [_entry.v, true] : [new $Uint64(0, 0), false]); - unit = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - return [new Duration(0, 0), errors.New("time: unknown unit " + quote(u) + " in duration " + quote(orig))]; - } - if ((x$1 = $div64(new $Uint64(2147483648, 0), unit, false), (v.$high > x$1.$high || (v.$high === x$1.$high && v.$low > x$1.$low)))) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - v = $mul64(v, (unit)); - if ((f.$high > 0 || (f.$high === 0 && f.$low > 0))) { - v = (x$2 = (new $Uint64(0, ($flatten64(f)) * (($flatten64(unit)) / scale))), new $Uint64(v.$high + x$2.$high, v.$low + x$2.$low)); - if ((v.$high > 2147483648 || (v.$high === 2147483648 && v.$low > 0))) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - } - d = (x$3 = v, new $Uint64(d.$high + x$3.$high, d.$low + x$3.$low)); - if ((d.$high > 2147483648 || (d.$high === 2147483648 && d.$low > 0))) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - } - if (neg) { - return [(x$4 = (new Duration(d.$high, d.$low)), new Duration(-x$4.$high, -x$4.$low)), $ifaceNil]; - } - if ((d.$high > 2147483647 || (d.$high === 2147483647 && d.$low > 4294967295))) { - return [new Duration(0, 0), errors.New("time: invalid duration " + quote(orig))]; - } - return [(new Duration(d.$high, d.$low)), $ifaceNil]; - }; - $pkg.ParseDuration = ParseDuration; - initLocal = function() { - var _q, _r$1, d, min, offset, z; - localLoc.name = "Local"; - z = new zone.ptr("", 0, false); - d = new ($global.Date)(); - offset = $imul(($parseInt(d.getTimezoneOffset()) >> 0), -1); - z.offset = $imul(offset, 60); - z.name = "UTC"; - if (offset < 0) { - z.name = z.name + ("-"); - offset = $imul(offset, (-1)); - } else { - z.name = z.name + ("+"); - } - z.name = z.name + (itoa((_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))); - min = (_r$1 = offset % 60, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); - if (!((min === 0))) { - z.name = z.name + (":" + itoa(min)); - } - localLoc.zone = new sliceType([$clone(z, zone)]); - }; - itoa = function(i) { - var i; - if (i < 10) { - return $substring("0123456789", i, (i + 1 >> 0)); - } - return $substring("00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899", ($imul(i, 2)), (($imul(i, 2)) + 2 >> 0)); - }; - init = function() { - $unused(Unix(new $Int64(0, 0), new $Int64(0, 0))); - }; - now = function() { - var {_r$1, _tmp, _tmp$1, _tmp$2, mono, n, nsec, sec, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sec = new $Int64(0, 0); - nsec = 0; - mono = new $Int64(0, 0); - _r$1 = runtimeNano(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - n = _r$1; - _tmp = $div64(n, new $Int64(0, 1000000000), false); - _tmp$1 = (((x$1 = $div64(n, new $Int64(0, 1000000000), true), x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0)); - _tmp$2 = n; - sec = _tmp; - nsec = _tmp$1; - mono = _tmp$2; - $s = -1; return [sec, nsec, mono]; - /* */ } return; } var $f = {$blk: now, $c: true, $r, _r$1, _tmp, _tmp$1, _tmp$2, mono, n, nsec, sec, x$1, $s};return $f; - }; - Sleep = function(d) { - var {_r$1, c, d, x$1, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = [c]; - c[0] = new $Chan(structType, 0); - $setTimeout((function(c) { return function() { - $close(c[0]); - }; })(c), (((x$1 = $div64(d, new Duration(0, 1000000), false), x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0))); - _r$1 = $recv(c[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1[0]; - $s = -1; return; - /* */ } return; } var $f = {$blk: Sleep, $c: true, $r, _r$1, c, d, x$1, $s};return $f; - }; - $pkg.Sleep = Sleep; - startTimer = function(t) { - var {_r$1, diff, t, x$1, x$2, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = [t]; - t[0].active = true; - _r$1 = runtimeNano(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - diff = $div64(((x$1 = t[0].when, x$2 = _r$1, new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low))), new $Int64(0, 1000000), false); - if ((diff.$high > 0 || (diff.$high === 0 && diff.$low > 2147483647))) { - $s = -1; return; - } - if ((diff.$high < 0 || (diff.$high === 0 && diff.$low < 0))) { - diff = new $Int64(0, 0); - } - t[0].timeout = $setTimeout((function(t) { return function $b() { - var {x$3, x$4, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t[0].active = false; - /* */ if (!((x$3 = t[0].period, (x$3.$high === 0 && x$3.$low === 0)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x$3 = t[0].period, (x$3.$high === 0 && x$3.$low === 0)))) { */ case 1: - t[0].when = (x$4 = t[0].when, x$5 = t[0].period, new $Int64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); - $r = startTimer(t[0]); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $go(t[0].f, [t[0].arg, 0]); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, x$3, x$4, x$5, $s};return $f; - }; })(t), $externalize(new $Int64(diff.$high + 0, diff.$low + 1), $Int64)); - $s = -1; return; - /* */ } return; } var $f = {$blk: startTimer, $c: true, $r, _r$1, diff, t, x$1, x$2, $s};return $f; - }; - stopTimer = function(t) { - var t, wasActive; - $global.clearTimeout(t.timeout); - wasActive = t.active; - t.active = false; - return wasActive; - }; - modTimer = function(t, when$1, period, f, arg, seq) { - var {arg, f, period, seq, t, when$1, $s, $r, $c} = $restore(this, {t, when$1, period, f, arg, seq}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - stopTimer(t); - t.when = when$1; - t.period = period; - t.f = f; - t.arg = arg; - t.seq = seq; - $r = startTimer(t); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: modTimer, $c: true, $r, arg, f, period, seq, t, when$1, $s};return $f; - }; - resetTimer = function(t, when$1) { - var {t, wasActive, when$1, $s, $r, $c} = $restore(this, {t, when$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wasActive = t.active; - $r = modTimer(t, when$1, t.period, t.f, t.arg, t.seq); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return wasActive; - /* */ } return; } var $f = {$blk: resetTimer, $c: true, $r, t, wasActive, when$1, $s};return $f; - }; - ptrType$2.methods = [{prop: "get", name: "get", pkg: "time", typ: $funcType([], [ptrType$2], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "lookup", name: "lookup", pkg: "time", typ: $funcType([$Int64], [$String, $Int, $Int64, $Int64, $Bool], false)}, {prop: "lookupFirstZone", name: "lookupFirstZone", pkg: "time", typ: $funcType([], [$Int], false)}, {prop: "firstZoneUsed", name: "firstZoneUsed", pkg: "time", typ: $funcType([], [$Bool], false)}, {prop: "lookupName", name: "lookupName", pkg: "time", typ: $funcType([$String, $Int64], [$Int, $Bool], false)}]; - Time.methods = [{prop: "After", name: "After", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Before", name: "Before", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Time], [$Bool], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "abs", name: "abs", pkg: "time", typ: $funcType([], [$Uint64], false)}, {prop: "locabs", name: "locabs", pkg: "time", typ: $funcType([], [$String, $Int, $Uint64], false)}, {prop: "Date", name: "Date", pkg: "", typ: $funcType([], [$Int, Month, $Int], false)}, {prop: "Year", name: "Year", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Month", name: "Month", pkg: "", typ: $funcType([], [Month], false)}, {prop: "Day", name: "Day", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Weekday", name: "Weekday", pkg: "", typ: $funcType([], [Weekday], false)}, {prop: "ISOWeek", name: "ISOWeek", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "Clock", name: "Clock", pkg: "", typ: $funcType([], [$Int, $Int, $Int], false)}, {prop: "Hour", name: "Hour", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Minute", name: "Minute", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Second", name: "Second", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Nanosecond", name: "Nanosecond", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "YearDay", name: "YearDay", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([Time], [Duration], false)}, {prop: "AddDate", name: "AddDate", pkg: "", typ: $funcType([$Int, $Int, $Int], [Time], false)}, {prop: "date", name: "date", pkg: "time", typ: $funcType([$Bool], [$Int, Month, $Int, $Int], false)}, {prop: "UTC", name: "UTC", pkg: "", typ: $funcType([], [Time], false)}, {prop: "Local", name: "Local", pkg: "", typ: $funcType([], [Time], false)}, {prop: "In", name: "In", pkg: "", typ: $funcType([ptrType$2], [Time], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Zone", name: "Zone", pkg: "", typ: $funcType([], [$String, $Int], false)}, {prop: "Unix", name: "Unix", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixMilli", name: "UnixMilli", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixMicro", name: "UnixMicro", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "UnixNano", name: "UnixNano", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "IsDST", name: "IsDST", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Time], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "AppendFormat", name: "AppendFormat", pkg: "", typ: $funcType([sliceType$3, $String], [sliceType$3], false)}]; - ptrType$4.methods = [{prop: "nsec", name: "nsec", pkg: "time", typ: $funcType([], [$Int32], false)}, {prop: "sec", name: "sec", pkg: "time", typ: $funcType([], [$Int64], false)}, {prop: "unixSec", name: "unixSec", pkg: "time", typ: $funcType([], [$Int64], false)}, {prop: "addSec", name: "addSec", pkg: "time", typ: $funcType([$Int64], [], false)}, {prop: "setLoc", name: "setLoc", pkg: "time", typ: $funcType([ptrType$2], [], false)}, {prop: "stripMono", name: "stripMono", pkg: "time", typ: $funcType([], [], false)}, {prop: "setMono", name: "setMono", pkg: "time", typ: $funcType([$Int64], [], false)}, {prop: "mono", name: "mono", pkg: "time", typ: $funcType([], [$Int64], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; - Month.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - Weekday.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - Duration.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Nanoseconds", name: "Nanoseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Microseconds", name: "Microseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Milliseconds", name: "Milliseconds", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seconds", name: "Seconds", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Minutes", name: "Minutes", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Hours", name: "Hours", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([Duration], [Duration], false)}, {prop: "Round", name: "Round", pkg: "", typ: $funcType([Duration], [Duration], false)}]; - ptrType$6.methods = [{prop: "Stop", name: "Stop", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([Duration], [$Bool], false)}]; - ptrType$7.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Location.init("time", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "zone", name: "zone", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "tx", name: "tx", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "extend", name: "extend", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "cacheStart", name: "cacheStart", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "cacheEnd", name: "cacheEnd", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "cacheZone", name: "cacheZone", embedded: false, exported: false, typ: ptrType, tag: ""}]); - zone.init("time", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "isDST", name: "isDST", embedded: false, exported: false, typ: $Bool, tag: ""}]); - zoneTrans.init("time", [{prop: "when", name: "when", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "isstd", name: "isstd", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "isutc", name: "isutc", embedded: false, exported: false, typ: $Bool, tag: ""}]); - rule.init("time", [{prop: "kind", name: "kind", embedded: false, exported: false, typ: ruleKind, tag: ""}, {prop: "day", name: "day", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "week", name: "week", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mon", name: "mon", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "time", name: "time", embedded: false, exported: false, typ: $Int, tag: ""}]); - Time.init("time", [{prop: "wall", name: "wall", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "ext", name: "ext", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "loc", name: "loc", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - Timer.init("time", [{prop: "C", name: "C", embedded: false, exported: true, typ: chanType$1, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: runtimeTimer, tag: ""}]); - ParseError.init("", [{prop: "Layout", name: "Layout", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "LayoutElem", name: "LayoutElem", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ValueElem", name: "ValueElem", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: $String, tag: ""}]); - runtimeTimer.init("time", [{prop: "i", name: "i", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "when", name: "when", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "period", name: "period", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "f", name: "f", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "arg", name: "arg", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "seq", name: "seq", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: ptrType$8, tag: ""}, {prop: "active", name: "active", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $pkg.$initLinknames = function() { - runtimeNano = $linknames["runtime.nanotime"]; -}; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js$1.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nosync.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = syscall.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - localLoc = new Location.ptr("", sliceType.nil, sliceType$1.nil, "", new $Int64(0, 0), new $Int64(0, 0), ptrType.nil); - localOnce = new nosync.Once.ptr(false, false); - badData = errors.New("malformed time zone information"); - $unused(new sliceType$2(["/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", "/usr/lib/locale/TZ/", runtime.GOROOT() + "/lib/time/zoneinfo.zip"])); - utcLoc = new Location.ptr("UTC", sliceType.nil, sliceType$1.nil, "", new $Int64(0, 0), new $Int64(0, 0), ptrType.nil); - $pkg.UTC = utcLoc; - $pkg.Local = localLoc; - errLocation = errors.New("time: invalid location name"); - daysBefore = $toNativeArray($kindInt32, [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]); - _r = runtimeNano(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - startNano = (x = _r, new $Int64(x.$high - 0, x.$low - 1)); - std0x = $toNativeArray($kindInt, [260, 265, 526, 528, 530, 276]); - longDayNames = new sliceType$2(["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]); - shortDayNames = new sliceType$2(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]); - shortMonthNames = new sliceType$2(["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]); - longMonthNames = new sliceType$2(["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]); - atoiError = errors.New("time: invalid number"); - errBad = errors.New("bad value for field"); - errLeadingInt = errors.New("time: bad [0-9]*"); - unitMap = $makeMap($String.keyFor, [{ k: "ns", v: new $Uint64(0, 1) }, { k: "us", v: new $Uint64(0, 1000) }, { k: "\xC2\xB5s", v: new $Uint64(0, 1000) }, { k: "\xCE\xBCs", v: new $Uint64(0, 1000) }, { k: "ms", v: new $Uint64(0, 1000000) }, { k: "s", v: new $Uint64(0, 1000000000) }, { k: "m", v: new $Uint64(13, 4165425152) }, { k: "h", v: new $Uint64(838, 817405952) }]); - zoneSources = new sliceType$2([runtime.GOROOT() + "/lib/time/zoneinfo.zip"]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/poll"] = (function() { - var $pkg = {}, $init, errors, unix, io, atomic, syscall, time, FD, pollDesc, fdMutex, errNetClosing, DeadlineExceededError, ptrType, ptrType$1, ptrType$2, ptrType$3, sliceType, ptrType$4, sliceType$1, ptrType$5, ptrType$6, ptrType$7, funcType, funcType$1, ptrType$8, ptrType$9, ptrType$10, tryDupCloexec, tryDupCloexec$24ptr, accept, DupCloseOnExec, dupCloseOnExecOld, ignoringEINTRIO, ignoringEINTR, setDeadlineImpl, errClosing, fcntl, runtime_Semacquire, runtime_Semrelease; - errors = $packages["errors"]; - unix = $packages["internal/syscall/unix"]; - io = $packages["io"]; - atomic = $packages["sync/atomic"]; - syscall = $packages["syscall"]; - time = $packages["time"]; - FD = $pkg.FD = $newType(0, $kindStruct, "poll.FD", true, "internal/poll", true, function(fdmu_, Sysfd_, pd_, iovecs_, csema_, isBlocking_, IsStream_, ZeroReadIsEOF_, isFile_) { - this.$val = this; - if (arguments.length === 0) { - this.fdmu = new fdMutex.ptr(new $Uint64(0, 0), 0, 0); - this.Sysfd = 0; - this.pd = new pollDesc.ptr(ptrType$2.nil, false); - this.iovecs = ptrType$4.nil; - this.csema = 0; - this.isBlocking = 0; - this.IsStream = false; - this.ZeroReadIsEOF = false; - this.isFile = false; - return; - } - this.fdmu = fdmu_; - this.Sysfd = Sysfd_; - this.pd = pd_; - this.iovecs = iovecs_; - this.csema = csema_; - this.isBlocking = isBlocking_; - this.IsStream = IsStream_; - this.ZeroReadIsEOF = ZeroReadIsEOF_; - this.isFile = isFile_; - }); - pollDesc = $pkg.pollDesc = $newType(0, $kindStruct, "poll.pollDesc", true, "internal/poll", false, function(fd_, closing_) { - this.$val = this; - if (arguments.length === 0) { - this.fd = ptrType$2.nil; - this.closing = false; - return; - } - this.fd = fd_; - this.closing = closing_; - }); - fdMutex = $pkg.fdMutex = $newType(0, $kindStruct, "poll.fdMutex", true, "internal/poll", false, function(state_, rsema_, wsema_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $Uint64(0, 0); - this.rsema = 0; - this.wsema = 0; - return; - } - this.state = state_; - this.rsema = rsema_; - this.wsema = wsema_; - }); - errNetClosing = $pkg.errNetClosing = $newType(0, $kindStruct, "poll.errNetClosing", true, "internal/poll", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - DeadlineExceededError = $pkg.DeadlineExceededError = $newType(0, $kindStruct, "poll.DeadlineExceededError", true, "internal/poll", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - ptrType = $ptrType($Uint32); - ptrType$1 = $ptrType($Int32); - ptrType$2 = $ptrType(FD); - ptrType$3 = $ptrType($Uint64); - sliceType = $sliceType(syscall.Iovec); - ptrType$4 = $ptrType(sliceType); - sliceType$1 = $sliceType($Uint8); - ptrType$5 = $ptrType(syscall.SockaddrInet4); - ptrType$6 = $ptrType(syscall.SockaddrInet6); - ptrType$7 = $ptrType(syscall.Stat_t); - funcType = $funcType([$Uintptr], [$Bool], false); - funcType$1 = $funcType([$Uintptr], [], false); - ptrType$8 = $ptrType(pollDesc); - ptrType$9 = $ptrType(fdMutex); - ptrType$10 = $ptrType(DeadlineExceededError); - accept = function(s) { - var {_r, _r$1, _tuple, err, ns, s, sa, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $pkg.AcceptFunc(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ns = _tuple[0]; - sa = _tuple[1]; - err = _tuple[2]; - if ($interfaceIsEqual(err, $ifaceNil)) { - syscall.CloseOnExec(ns); - } - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [-1, $ifaceNil, "accept", err]; - } - err = syscall.SetNonblock(ns, true); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$1 = $pkg.CloseFunc(ns); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return [-1, $ifaceNil, "setnonblock", err]; - /* } */ case 3: - $s = -1; return [ns, sa, "", $ifaceNil]; - /* */ } return; } var $f = {$blk: accept, $c: true, $r, _r, _r$1, _tuple, err, ns, s, sa, $s};return $f; - }; - FD.ptr.prototype.Init = function(net, pollable) { - var err, fd, net, pollable; - fd = this; - if (net === "file") { - fd.isFile = true; - } - if (!pollable) { - fd.isBlocking = 1; - return $ifaceNil; - } - err = fd.pd.init(fd); - if (!($interfaceIsEqual(err, $ifaceNil))) { - fd.isBlocking = 1; - } - return err; - }; - FD.prototype.Init = function(net, pollable) { return this.$val.Init(net, pollable); }; - FD.ptr.prototype.destroy = function() { - var {_r, err, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - fd.pd.close(); - _r = $pkg.CloseFunc(fd.Sysfd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - fd.Sysfd = -1; - $r = runtime_Semrelease((fd.$ptr_csema || (fd.$ptr_csema = new ptrType(function() { return this.$target.csema; }, function($v) { this.$target.csema = $v; }, fd)))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.destroy, $c: true, $r, _r, err, fd, $s};return $f; - }; - FD.prototype.destroy = function() { return this.$val.destroy(); }; - FD.ptr.prototype.Close = function() { - var {_r, _r$1, err, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.fdmu.increfAndClose(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return errClosing(fd.isFile); - /* } */ case 2: - fd.pd.evict(); - _r$1 = fd.decref(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (fd.isBlocking === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (fd.isBlocking === 0) { */ case 5: - $r = runtime_Semacquire((fd.$ptr_csema || (fd.$ptr_csema = new ptrType(function() { return this.$target.csema; }, function($v) { this.$target.csema = $v; }, fd)))); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $s = -1; return err; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.Close, $c: true, $r, _r, _r$1, err, fd, $s};return $f; - }; - FD.prototype.Close = function() { return this.$val.Close(); }; - FD.ptr.prototype.SetBlocking = function() { - var {$24r, $24r$1, err, fd, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - atomic.StoreUint32((fd.$ptr_isBlocking || (fd.$ptr_isBlocking = new ptrType(function() { return this.$target.isBlocking; }, function($v) { this.$target.isBlocking = $v; }, fd))), 1); - $24r$1 = syscall.SetNonblock(fd.Sysfd, false); - $s = 4; case 4: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.SetBlocking, $c: true, $r, $24r, $24r$1, err, fd, $s, $deferred};return $f; } } - }; - FD.prototype.SetBlocking = function() { return this.$val.SetBlocking(); }; - FD.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _tuple, err, err$1, err$2, fd, n, p, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - /* */ if (p.$length === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (p.$length === 0) { */ case 5: - $24r$1 = [0, $ifaceNil]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: - $24r$2 = [0, err$1]; - $s = 10; case 10: return $24r$2; - /* } */ case 9: - if (fd.IsStream && p.$length > 1073741824) { - p = $subslice(p, 0, 1073741824); - } - /* while (true) { */ case 11: - _r$1 = ignoringEINTRIO(syscall.Read, fd.Sysfd, p); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err$2 = _tuple[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - n = 0; - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 11; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$3 = [n, err$2]; - $s = 14; case 14: return $24r$3; - case 12: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _tuple, err, err$1, err$2, fd, n, p, $s, $deferred};return $f; } } - }; - FD.prototype.Read = function(p) { return this.$val.Read(p); }; - FD.ptr.prototype.Pread = function(p, off) { - var {_r, _r$1, _tuple, err, err$1, fd, n, off, p, $s, $r, $c} = $restore(this, {p, off}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - err = fd.incref(); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - if (fd.IsStream && p.$length > 1073741824) { - p = $subslice(p, 0, 1073741824); - } - n = 0; - err$1 = $ifaceNil; - /* while (true) { */ case 1: - _r = syscall.Pread(fd.Sysfd, p, off); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, new syscall.Errno(4)))) { - /* break; */ $s = 2; continue; - } - $s = 1; continue; - case 2: - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - n = 0; - } - _r$1 = fd.decref(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - err$1 = fd.eofError(n, err$1); - $s = -1; return [n, err$1]; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.Pread, $c: true, $r, _r, _r$1, _tuple, err, err$1, fd, n, off, p, $s};return $f; - }; - FD.prototype.Pread = function(p, off) { return this.$val.Pread(p, off); }; - FD.ptr.prototype.ReadFrom = function(p) { - var {$24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, n, p, sa, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, $ifaceNil, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, $ifaceNil, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = syscall.Recvfrom(fd.Sysfd, p, 0); - n = _tuple[0]; - sa = _tuple[1]; - err$2 = _tuple[2]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - n = 0; - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$2 = [n, sa, err$2]; - $s = 10; case 10: return $24r$2; - case 9: - $s = -1; return [0, $ifaceNil, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadFrom, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, n, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.ReadFrom = function(p) { return this.$val.ReadFrom(p); }; - FD.ptr.prototype.ReadFromInet4 = function(p, from) { - var {$24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, from, n, p, $s, $deferred, $r, $c} = $restore(this, {p, from}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = unix.RecvfromInet4(fd.Sysfd, p, 0, from); - n = _tuple[0]; - err$2 = _tuple[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - n = 0; - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$2 = [n, err$2]; - $s = 10; case 10: return $24r$2; - case 9: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadFromInet4, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, from, n, p, $s, $deferred};return $f; } } - }; - FD.prototype.ReadFromInet4 = function(p, from) { return this.$val.ReadFromInet4(p, from); }; - FD.ptr.prototype.ReadFromInet6 = function(p, from) { - var {$24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, from, n, p, $s, $deferred, $r, $c} = $restore(this, {p, from}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = unix.RecvfromInet6(fd.Sysfd, p, 0, from); - n = _tuple[0]; - err$2 = _tuple[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - n = 0; - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$2 = [n, err$2]; - $s = 10; case 10: return $24r$2; - case 9: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadFromInet6, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, from, n, p, $s, $deferred};return $f; } } - }; - FD.prototype.ReadFromInet6 = function(p, from) { return this.$val.ReadFromInet6(p, from); }; - FD.ptr.prototype.ReadMsg = function(p, oob, flags) { - var {$24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, flags, n, oob, oobn, p, sa, sysflags, $s, $deferred, $r, $c} = $restore(this, {p, oob, flags}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, 0, 0, $ifaceNil, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, 0, 0, $ifaceNil, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = syscall.Recvmsg(fd.Sysfd, p, oob, flags); - n = _tuple[0]; - oobn = _tuple[1]; - sysflags = _tuple[2]; - sa = _tuple[3]; - err$2 = _tuple[4]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$2 = [n, oobn, sysflags, sa, err$2]; - $s = 10; case 10: return $24r$2; - case 9: - $s = -1; return [0, 0, 0, $ifaceNil, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, 0, 0, $ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadMsg, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, flags, n, oob, oobn, p, sa, sysflags, $s, $deferred};return $f; } } - }; - FD.prototype.ReadMsg = function(p, oob, flags) { return this.$val.ReadMsg(p, oob, flags); }; - FD.ptr.prototype.ReadMsgInet4 = function(p, oob, flags, sa4) { - var {$24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, flags, n, oob, oobn, p, sa4, sysflags, $s, $deferred, $r, $c} = $restore(this, {p, oob, flags, sa4}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, 0, 0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, 0, 0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = unix.RecvmsgInet4(fd.Sysfd, p, oob, flags, sa4); - n = _tuple[0]; - oobn = _tuple[1]; - sysflags = _tuple[2]; - err$2 = _tuple[3]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$2 = [n, oobn, sysflags, err$2]; - $s = 10; case 10: return $24r$2; - case 9: - $s = -1; return [0, 0, 0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, 0, 0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadMsgInet4, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, flags, n, oob, oobn, p, sa4, sysflags, $s, $deferred};return $f; } } - }; - FD.prototype.ReadMsgInet4 = function(p, oob, flags, sa4) { return this.$val.ReadMsgInet4(p, oob, flags, sa4); }; - FD.ptr.prototype.ReadMsgInet6 = function(p, oob, flags, sa6) { - var {$24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, flags, n, oob, oobn, p, sa6, sysflags, $s, $deferred, $r, $c} = $restore(this, {p, oob, flags, sa6}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, 0, 0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, 0, 0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = unix.RecvmsgInet6(fd.Sysfd, p, oob, flags, sa6); - n = _tuple[0]; - oobn = _tuple[1]; - sysflags = _tuple[2]; - err$2 = _tuple[3]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } - err$2 = fd.eofError(n, err$2); - $24r$2 = [n, oobn, sysflags, err$2]; - $s = 10; case 10: return $24r$2; - case 9: - $s = -1; return [0, 0, 0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, 0, 0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadMsgInet6, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, err, err$1, err$2, fd, flags, n, oob, oobn, p, sa6, sysflags, $s, $deferred};return $f; } } - }; - FD.prototype.ReadMsgInet6 = function(p, oob, flags, sa6) { return this.$val.ReadMsgInet6(p, oob, flags, sa6); }; - FD.ptr.prototype.Write = function(p) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _r, _r$1, _tuple, err, err$1, err$2, fd, max, n, nn, p, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - nn = 0; - /* while (true) { */ case 8: - max = p.$length; - if (fd.IsStream && (max - nn >> 0) > 1073741824) { - max = nn + 1073741824 >> 0; - } - _r$1 = ignoringEINTRIO(syscall.Write, fd.Sysfd, $subslice(p, nn, max)); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err$2 = _tuple[1]; - if (n > 0) { - nn = nn + (n) >> 0; - } - /* */ if (nn === p.$length) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (nn === p.$length) { */ case 11: - $24r$2 = [nn, err$2]; - $s = 13; case 13: return $24r$2; - /* } */ case 12: - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 14: - $24r$3 = [nn, err$2]; - $s = 16; case 16: return $24r$3; - /* } */ case 15: - /* */ if (n === 0) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (n === 0) { */ case 17: - $24r$4 = [nn, io.ErrUnexpectedEOF]; - $s = 19; case 19: return $24r$4; - /* } */ case 18: - $s = 8; continue; - case 9: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Write, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _r, _r$1, _tuple, err, err$1, err$2, fd, max, n, nn, p, $s, $deferred};return $f; } } - }; - FD.prototype.Write = function(p) { return this.$val.Write(p); }; - FD.ptr.prototype.Pwrite = function(p, off) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, fd, max, n, nn, off, p, x, $s, $deferred, $r, $c} = $restore(this, {p, off}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = [0, err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - nn = 0; - /* while (true) { */ case 4: - max = p.$length; - if (fd.IsStream && (max - nn >> 0) > 1073741824) { - max = nn + 1073741824 >> 0; - } - _r = syscall.Pwrite(fd.Sysfd, $subslice(p, nn, max), (x = (new $Int64(0, nn)), new $Int64(off.$high + x.$high, off.$low + x.$low))); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err$1 = _tuple[1]; - if ($interfaceIsEqual(err$1, new syscall.Errno(4))) { - /* continue; */ $s = 4; continue; - } - if (n > 0) { - nn = nn + (n) >> 0; - } - /* */ if (nn === p.$length) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (nn === p.$length) { */ case 7: - $24r$1 = [nn, err$1]; - $s = 9; case 9: return $24r$1; - /* } */ case 8: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 10: - $24r$2 = [nn, err$1]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - /* */ if (n === 0) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (n === 0) { */ case 13: - $24r$3 = [nn, io.ErrUnexpectedEOF]; - $s = 15; case 15: return $24r$3; - /* } */ case 14: - $s = 4; continue; - case 5: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Pwrite, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, fd, max, n, nn, off, p, x, $s, $deferred};return $f; } } - }; - FD.prototype.Pwrite = function(p, off) { return this.$val.Pwrite(p, off); }; - FD.ptr.prototype.WriteToInet4 = function(p, sa) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, err, err$1, err$2, fd, p, sa, $s, $deferred, $r, $c} = $restore(this, {p, sa}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - err$2 = unix.SendtoInet4(fd.Sysfd, p, 0, sa); - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 10: - $24r$2 = [0, err$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - $24r$3 = [p.$length, $ifaceNil]; - $s = 13; case 13: return $24r$3; - case 9: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteToInet4, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, err, err$1, err$2, fd, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.WriteToInet4 = function(p, sa) { return this.$val.WriteToInet4(p, sa); }; - FD.ptr.prototype.WriteToInet6 = function(p, sa) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, err, err$1, err$2, fd, p, sa, $s, $deferred, $r, $c} = $restore(this, {p, sa}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - err$2 = unix.SendtoInet6(fd.Sysfd, p, 0, sa); - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 10: - $24r$2 = [0, err$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - $24r$3 = [p.$length, $ifaceNil]; - $s = 13; case 13: return $24r$3; - case 9: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteToInet6, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, err, err$1, err$2, fd, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.WriteToInet6 = function(p, sa) { return this.$val.WriteToInet6(p, sa); }; - FD.ptr.prototype.WriteTo = function(p, sa) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, err, err$1, err$2, fd, p, sa, $s, $deferred, $r, $c} = $restore(this, {p, sa}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - err$2 = syscall.Sendto(fd.Sysfd, p, 0, sa); - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 10: - $24r$2 = [0, err$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - $24r$3 = [p.$length, $ifaceNil]; - $s = 13; case 13: return $24r$3; - case 9: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteTo, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, err, err$1, err$2, fd, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.WriteTo = function(p, sa) { return this.$val.WriteTo(p, sa); }; - FD.ptr.prototype.WriteMsg = function(p, oob, sa) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, err$2, fd, n, oob, p, sa, $s, $deferred, $r, $c} = $restore(this, {p, oob, sa}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, 0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, 0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = syscall.SendmsgN(fd.Sysfd, p, oob, sa, 0); - n = _tuple[0]; - err$2 = _tuple[1]; - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 10: - $24r$2 = [n, 0, err$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - $24r$3 = [n, oob.$length, err$2]; - $s = 13; case 13: return $24r$3; - case 9: - $s = -1; return [0, 0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, 0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteMsg, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, err$2, fd, n, oob, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.WriteMsg = function(p, oob, sa) { return this.$val.WriteMsg(p, oob, sa); }; - FD.ptr.prototype.WriteMsgInet4 = function(p, oob, sa) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, err$2, fd, n, oob, p, sa, $s, $deferred, $r, $c} = $restore(this, {p, oob, sa}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, 0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, 0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = unix.SendmsgNInet4(fd.Sysfd, p, oob, sa, 0); - n = _tuple[0]; - err$2 = _tuple[1]; - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 10: - $24r$2 = [n, 0, err$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - $24r$3 = [n, oob.$length, err$2]; - $s = 13; case 13: return $24r$3; - case 9: - $s = -1; return [0, 0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, 0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteMsgInet4, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, err$2, fd, n, oob, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.WriteMsgInet4 = function(p, oob, sa) { return this.$val.WriteMsgInet4(p, oob, sa); }; - FD.ptr.prototype.WriteMsgInet6 = function(p, oob, sa) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, err$2, fd, n, oob, p, sa, $s, $deferred, $r, $c} = $restore(this, {p, oob, sa}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, 0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [0, 0, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _tuple = unix.SendmsgNInet6(fd.Sysfd, p, oob, sa, 0); - n = _tuple[0]; - err$2 = _tuple[1]; - if ($interfaceIsEqual(err$2, new syscall.Errno(4))) { - /* continue; */ $s = 8; continue; - } - if ($interfaceIsEqual(err$2, new syscall.Errno(11)) && fd.pd.pollable()) { - err$2 = fd.pd.waitWrite(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 10: - $24r$2 = [n, 0, err$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - $24r$3 = [n, oob.$length, err$2]; - $s = 13; case 13: return $24r$3; - case 9: - $s = -1; return [0, 0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, 0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteMsgInet6, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _tuple, err, err$1, err$2, fd, n, oob, p, sa, $s, $deferred};return $f; } } - }; - FD.prototype.WriteMsgInet6 = function(p, oob, sa) { return this.$val.WriteMsgInet6(p, oob, sa); }; - FD.ptr.prototype.Accept = function() { - var {$24r, $24r$1, $24r$2, $24r$3, _1, _r, _r$1, _tuple, err, err$1, err$2, errcall, fd, rsa, s, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [-1, $ifaceNil, "", err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [-1, $ifaceNil, "", err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _r$1 = accept(fd.Sysfd); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - s = _tuple[0]; - rsa = _tuple[1]; - errcall = _tuple[2]; - err$2 = _tuple[3]; - /* */ if ($interfaceIsEqual(err$2, $ifaceNil)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($interfaceIsEqual(err$2, $ifaceNil)) { */ case 11: - $24r$2 = [s, rsa, "", err$2]; - $s = 13; case 13: return $24r$2; - /* } */ case 12: - _1 = err$2; - if ($interfaceIsEqual(_1, new syscall.Errno((4)))) { - /* continue; */ $s = 8; continue; - } else if ($interfaceIsEqual(_1, new syscall.Errno((11)))) { - if (fd.pd.pollable()) { - err$2 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - /* continue; */ $s = 8; continue; - } - } - } else if ($interfaceIsEqual(_1, new syscall.Errno((103)))) { - /* continue; */ $s = 8; continue; - } - $24r$3 = [-1, $ifaceNil, errcall, err$2]; - $s = 14; case 14: return $24r$3; - case 9: - $s = -1; return [0, $ifaceNil, "", $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil, "", $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Accept, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _1, _r, _r$1, _tuple, err, err$1, err$2, errcall, fd, rsa, s, $s, $deferred};return $f; } } - }; - FD.prototype.Accept = function() { return this.$val.Accept(); }; - FD.ptr.prototype.Seek = function(offset, whence) { - var {$24r, $24r$1, _r, err, fd, offset, whence, $s, $deferred, $r, $c} = $restore(this, {offset, whence}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = [new $Int64(0, 0), err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - _r = syscall.Seek(fd.Sysfd, offset, whence); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [new $Int64(0, 0), $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Seek, $c: true, $r, $24r, $24r$1, _r, err, fd, offset, whence, $s, $deferred};return $f; } } - }; - FD.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; - FD.ptr.prototype.ReadDirent = function(buf) { - var {$24r, $24r$1, _r, _tuple, buf, err, err$1, fd, n, $s, $deferred, $r, $c} = $restore(this, {buf}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = [0, err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - /* while (true) { */ case 4: - _r = ignoringEINTRIO(syscall.ReadDirent, fd.Sysfd, buf); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - n = 0; - if ($interfaceIsEqual(err$1, new syscall.Errno(11)) && fd.pd.pollable()) { - err$1 = fd.pd.waitRead(fd.isFile); - if ($interfaceIsEqual(err$1, $ifaceNil)) { - /* continue; */ $s = 4; continue; - } - } - } - $24r$1 = [n, err$1]; - $s = 7; case 7: return $24r$1; - case 5: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.ReadDirent, $c: true, $r, $24r, $24r$1, _r, _tuple, buf, err, err$1, fd, n, $s, $deferred};return $f; } } - }; - FD.prototype.ReadDirent = function(buf) { return this.$val.ReadDirent(buf); }; - FD.ptr.prototype.Fchmod = function(mode) { - var {$24r, $24r$1, _r, err, fd, mode, $s, $deferred, $r, $c} = $restore(this, {mode}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = [fd]; - mode = [mode]; - fd[0] = this; - err = fd[0].incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd[0], "decref"), []]); - _r = ignoringEINTR((function(fd, mode) { return function $b() { - var {$24r$1, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = syscall.Fchmod(fd[0].Sysfd, mode[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 2; case 2: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$1, _r, $s};return $f; - }; })(fd, mode)); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Fchmod, $c: true, $r, $24r, $24r$1, _r, err, fd, mode, $s, $deferred};return $f; } } - }; - FD.prototype.Fchmod = function(mode) { return this.$val.Fchmod(mode); }; - FD.ptr.prototype.Fchdir = function() { - var {$24r, $24r$1, _r, err, fd, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - _r = syscall.Fchdir(fd.Sysfd); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Fchdir, $c: true, $r, $24r, $24r$1, _r, err, fd, $s, $deferred};return $f; } } - }; - FD.prototype.Fchdir = function() { return this.$val.Fchdir(); }; - FD.ptr.prototype.Fstat = function(s) { - var {$24r, $24r$1, _r, err, fd, s, $s, $deferred, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = [fd]; - s = [s]; - fd[0] = this; - err = fd[0].incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd[0], "decref"), []]); - _r = ignoringEINTR((function(fd, s) { return function $b() { - var {$24r$1, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = syscall.Fstat(fd[0].Sysfd, s[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 2; case 2: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$1, _r, $s};return $f; - }; })(fd, s)); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Fstat, $c: true, $r, $24r, $24r$1, _r, err, fd, s, $s, $deferred};return $f; } } - }; - FD.prototype.Fstat = function(s) { return this.$val.Fstat(s); }; - DupCloseOnExec = function(fd) { - var {$24r, _1, _r, _tuple, e1, fd, r0, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (true && (atomic.LoadInt32((tryDupCloexec$24ptr || (tryDupCloexec$24ptr = new ptrType$1(function() { return tryDupCloexec; }, function($v) { tryDupCloexec = $v; })))) === 1)) { - _tuple = fcntl(fd, 1, 0); - r0 = _tuple[0]; - e1 = _tuple[1]; - if ($interfaceIsEqual(e1, $ifaceNil)) { - $s = -1; return [r0, "", $ifaceNil]; - } - _1 = $assertType(e1, syscall.Errno); - if ((_1 === (22)) || (_1 === (38))) { - atomic.StoreInt32((tryDupCloexec$24ptr || (tryDupCloexec$24ptr = new ptrType$1(function() { return tryDupCloexec; }, function($v) { tryDupCloexec = $v; }))), 0); - } else { - $s = -1; return [-1, "fcntl", e1]; - } - } - _r = dupCloseOnExecOld(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: DupCloseOnExec, $c: true, $r, $24r, _1, _r, _tuple, e1, fd, r0, $s};return $f; - }; - $pkg.DupCloseOnExec = DupCloseOnExec; - dupCloseOnExecOld = function(fd) { - var {$24r, $24r$1, _tuple, err, fd, newfd, $s, $deferred, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = syscall.ForkLock.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(syscall.ForkLock, "RUnlock"), []]); - _tuple = syscall.Dup(fd); - newfd = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [-1, "dup", err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - syscall.CloseOnExec(newfd); - $24r$1 = [newfd, "", $ifaceNil]; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, "", $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: dupCloseOnExecOld, $c: true, $r, $24r, $24r$1, _tuple, err, fd, newfd, $s, $deferred};return $f; } } - }; - FD.ptr.prototype.Dup = function() { - var {$24r, $24r$1, _r, err, fd, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = [-1, "", err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - _r = DupCloseOnExec(fd.Sysfd); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, "", $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Dup, $c: true, $r, $24r, $24r$1, _r, err, fd, $s, $deferred};return $f; } } - }; - FD.prototype.Dup = function() { return this.$val.Dup(); }; - FD.ptr.prototype.WaitWrite = function() { - var fd; - fd = this; - return fd.pd.waitWrite(fd.isFile); - }; - FD.prototype.WaitWrite = function() { return this.$val.WaitWrite(); }; - FD.ptr.prototype.WriteOnce = function(p) { - var {$24r, $24r$1, _r, _r$1, err, fd, p, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - _r$1 = ignoringEINTRIO(syscall.Write, fd.Sysfd, p); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 6; case 6: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.WriteOnce, $c: true, $r, $24r, $24r$1, _r, _r$1, err, fd, p, $s, $deferred};return $f; } } - }; - FD.prototype.WriteOnce = function(p) { return this.$val.WriteOnce(p); }; - FD.ptr.prototype.RawRead = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, err, err$1, err$2, f, fd, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.readLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = err; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "readUnlock"), []]); - err$1 = fd.pd.prepareRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = err$1; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _r$1 = f(((fd.Sysfd >>> 0))); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_r$1) { */ case 10: - $24r$2 = $ifaceNil; - $s = 13; case 13: return $24r$2; - /* } */ case 11: - err$2 = fd.pd.waitRead(fd.isFile); - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 14: - $24r$3 = err$2; - $s = 16; case 16: return $24r$3; - /* } */ case 15: - $s = 8; continue; - case 9: - $s = -1; return $ifaceNil; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.RawRead, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, err, err$1, err$2, f, fd, $s, $deferred};return $f; } } - }; - FD.prototype.RawRead = function(f) { return this.$val.RawRead(f); }; - FD.ptr.prototype.RawWrite = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, err, err$1, err$2, f, fd, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = fd.writeLock(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = err; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(fd, "writeUnlock"), []]); - err$1 = fd.pd.prepareWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = err$1; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* while (true) { */ case 8: - _r$1 = f(((fd.Sysfd >>> 0))); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_r$1) { */ case 10: - $24r$2 = $ifaceNil; - $s = 13; case 13: return $24r$2; - /* } */ case 11: - err$2 = fd.pd.waitWrite(fd.isFile); - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 14: - $24r$3 = err$2; - $s = 16; case 16: return $24r$3; - /* } */ case 15: - $s = 8; continue; - case 9: - $s = -1; return $ifaceNil; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.RawWrite, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, err, err$1, err$2, f, fd, $s, $deferred};return $f; } } - }; - FD.prototype.RawWrite = function(f) { return this.$val.RawWrite(f); }; - ignoringEINTRIO = function(fn, fd, p) { - var {_r, _tuple, err, fd, fn, n, p, $s, $r, $c} = $restore(this, {fn, fd, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - _r = fn(fd, p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, new syscall.Errno(4)))) { - $s = -1; return [n, err]; - } - $s = 1; continue; - case 2: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: ignoringEINTRIO, $c: true, $r, _r, _tuple, err, fd, fn, n, p, $s};return $f; - }; - FD.ptr.prototype.eofError = function(n, err) { - var err, fd, n; - fd = this; - if ((n === 0) && $interfaceIsEqual(err, $ifaceNil) && fd.ZeroReadIsEOF) { - return io.EOF; - } - return err; - }; - FD.prototype.eofError = function(n, err) { return this.$val.eofError(n, err); }; - FD.ptr.prototype.Shutdown = function(how) { - var {$24r, $24r$1, err, fd, how, $s, $deferred, $r, $c} = $restore(this, {how}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - $24r$1 = syscall.Shutdown(fd.Sysfd, how); - $s = 4; case 4: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Shutdown, $c: true, $r, $24r, $24r$1, err, fd, how, $s, $deferred};return $f; } } - }; - FD.prototype.Shutdown = function(how) { return this.$val.Shutdown(how); }; - FD.ptr.prototype.Fchown = function(uid, gid) { - var {$24r, $24r$1, _r, err, fd, gid, uid, $s, $deferred, $r, $c} = $restore(this, {uid, gid}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = [fd]; - gid = [gid]; - uid = [uid]; - fd[0] = this; - err = fd[0].incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd[0], "decref"), []]); - _r = ignoringEINTR((function(fd, gid, uid) { return function $b() { - var {$24r$1, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = syscall.Fchown(fd[0].Sysfd, uid[0], gid[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 2; case 2: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$1, _r, $s};return $f; - }; })(fd, gid, uid)); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Fchown, $c: true, $r, $24r, $24r$1, _r, err, fd, gid, uid, $s, $deferred};return $f; } } - }; - FD.prototype.Fchown = function(uid, gid) { return this.$val.Fchown(uid, gid); }; - FD.ptr.prototype.Ftruncate = function(size) { - var {$24r, $24r$1, _r, err, fd, size, $s, $deferred, $r, $c} = $restore(this, {size}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = [fd]; - size = [size]; - fd[0] = this; - err = fd[0].incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd[0], "decref"), []]); - _r = ignoringEINTR((function(fd, size) { return function $b() { - var {$24r$1, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = syscall.Ftruncate(fd[0].Sysfd, size[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 2; case 2: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$1, _r, $s};return $f; - }; })(fd, size)); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Ftruncate, $c: true, $r, $24r, $24r$1, _r, err, fd, size, $s, $deferred};return $f; } } - }; - FD.prototype.Ftruncate = function(size) { return this.$val.Ftruncate(size); }; - FD.ptr.prototype.RawControl = function(f) { - var {$24r, $24r$1, err, f, fd, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - err = fd.incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd, "decref"), []]); - $r = f(((fd.Sysfd >>> 0))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$1 = $ifaceNil; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.RawControl, $c: true, $r, $24r, $24r$1, err, f, fd, $s, $deferred};return $f; } } - }; - FD.prototype.RawControl = function(f) { return this.$val.RawControl(f); }; - ignoringEINTR = function(fn) { - var {_r, err, fn, $s, $r, $c} = $restore(this, {fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - _r = fn(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, new syscall.Errno(4)))) { - $s = -1; return err; - } - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ignoringEINTR, $c: true, $r, _r, err, fn, $s};return $f; - }; - pollDesc.ptr.prototype.init = function(fd) { - var fd, pd; - pd = this; - pd.fd = fd; - return $ifaceNil; - }; - pollDesc.prototype.init = function(fd) { return this.$val.init(fd); }; - pollDesc.ptr.prototype.close = function() { - var pd; - pd = this; - }; - pollDesc.prototype.close = function() { return this.$val.close(); }; - pollDesc.ptr.prototype.evict = function() { - var pd; - pd = this; - pd.closing = true; - if (!(pd.fd === ptrType$2.nil)) { - syscall.StopIO(pd.fd.Sysfd); - } - }; - pollDesc.prototype.evict = function() { return this.$val.evict(); }; - pollDesc.ptr.prototype.prepare = function(mode, isFile) { - var isFile, mode, pd; - pd = this; - if (pd.closing) { - return errClosing(isFile); - } - return $ifaceNil; - }; - pollDesc.prototype.prepare = function(mode, isFile) { return this.$val.prepare(mode, isFile); }; - pollDesc.ptr.prototype.prepareRead = function(isFile) { - var isFile, pd; - pd = this; - return pd.prepare(114, isFile); - }; - pollDesc.prototype.prepareRead = function(isFile) { return this.$val.prepareRead(isFile); }; - pollDesc.ptr.prototype.prepareWrite = function(isFile) { - var isFile, pd; - pd = this; - return pd.prepare(119, isFile); - }; - pollDesc.prototype.prepareWrite = function(isFile) { return this.$val.prepareWrite(isFile); }; - pollDesc.ptr.prototype.wait = function(mode, isFile) { - var isFile, mode, pd; - pd = this; - if (pd.closing) { - return errClosing(isFile); - } - if (isFile) { - return $ifaceNil; - } - return $pkg.ErrDeadlineExceeded; - }; - pollDesc.prototype.wait = function(mode, isFile) { return this.$val.wait(mode, isFile); }; - pollDesc.ptr.prototype.waitRead = function(isFile) { - var isFile, pd; - pd = this; - return pd.wait(114, isFile); - }; - pollDesc.prototype.waitRead = function(isFile) { return this.$val.waitRead(isFile); }; - pollDesc.ptr.prototype.waitWrite = function(isFile) { - var isFile, pd; - pd = this; - return pd.wait(119, isFile); - }; - pollDesc.prototype.waitWrite = function(isFile) { return this.$val.waitWrite(isFile); }; - pollDesc.ptr.prototype.pollable = function() { - var pd; - pd = this; - return true; - }; - pollDesc.prototype.pollable = function() { return this.$val.pollable(); }; - FD.ptr.prototype.SetDeadline = function(t) { - var {$24r, _r, fd, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = setDeadlineImpl(fd, $clone(t, time.Time), 233); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.SetDeadline, $c: true, $r, $24r, _r, fd, t, $s};return $f; - }; - FD.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - FD.ptr.prototype.SetReadDeadline = function(t) { - var {$24r, _r, fd, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = setDeadlineImpl(fd, $clone(t, time.Time), 114); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.SetReadDeadline, $c: true, $r, $24r, _r, fd, t, $s};return $f; - }; - FD.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; - FD.ptr.prototype.SetWriteDeadline = function(t) { - var {$24r, _r, fd, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = setDeadlineImpl(fd, $clone(t, time.Time), 119); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.SetWriteDeadline, $c: true, $r, $24r, _r, fd, t, $s};return $f; - }; - FD.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; - setDeadlineImpl = function(fd, t, mode) { - var {_1, _r, d, err, fd, mode, t, $s, $r, $c} = $restore(this, {fd, t, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = $clone(t, time.Time).UnixNano(); - if ($clone(t, time.Time).IsZero()) { - d = new $Int64(0, 0); - } - err = fd.incref(); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _1 = mode; - if (_1 === (114)) { - syscall.SetReadDeadline(fd.Sysfd, d); - } else if (_1 === (119)) { - syscall.SetWriteDeadline(fd.Sysfd, d); - } else if (_1 === (233)) { - syscall.SetReadDeadline(fd.Sysfd, d); - syscall.SetWriteDeadline(fd.Sysfd, d); - } - _r = fd.decref(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: setDeadlineImpl, $c: true, $r, _1, _r, d, err, fd, mode, t, $s};return $f; - }; - fdMutex.ptr.prototype.incref = function() { - var mu, new$1, old, x, x$1; - mu = this; - while (true) { - old = atomic.LoadUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu)))); - if (!((x = new $Uint64(old.$high & 0, (old.$low & 1) >>> 0), (x.$high === 0 && x.$low === 0)))) { - return false; - } - new$1 = new $Uint64(old.$high + 0, old.$low + 8); - if ((x$1 = new $Uint64(new$1.$high & 0, (new$1.$low & 8388600) >>> 0), (x$1.$high === 0 && x$1.$low === 0))) { - $panic(new $String("too many concurrent operations on a single file or socket (max 1048575)")); - } - if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { - return true; - } - } - }; - fdMutex.prototype.incref = function() { return this.$val.incref(); }; - fdMutex.ptr.prototype.increfAndClose = function() { - var {mu, new$1, old, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mu = this; - /* while (true) { */ case 1: - old = atomic.LoadUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu)))); - if (!((x = new $Uint64(old.$high & 0, (old.$low & 1) >>> 0), (x.$high === 0 && x.$low === 0)))) { - $s = -1; return false; - } - new$1 = (x$1 = new $Uint64(old.$high | 0, (old.$low | 1) >>> 0), new $Uint64(x$1.$high + 0, x$1.$low + 8)); - if ((x$2 = new $Uint64(new$1.$high & 0, (new$1.$low & 8388600) >>> 0), (x$2.$high === 0 && x$2.$low === 0))) { - $panic(new $String("too many concurrent operations on a single file or socket (max 1048575)")); - } - new$1 = (x$3 = new $Uint64(2147483647, 4286578688), new $Uint64(new$1.$high & ~x$3.$high, (new$1.$low & ~x$3.$low) >>> 0)); - /* */ if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { */ case 3: - /* while (true) { */ case 5: - /* if (!(!((x$4 = new $Uint64(old.$high & 2047, (old.$low & 4286578688) >>> 0), (x$4.$high === 0 && x$4.$low === 0))))) { break; } */ if(!(!((x$4 = new $Uint64(old.$high & 2047, (old.$low & 4286578688) >>> 0), (x$4.$high === 0 && x$4.$low === 0))))) { $s = 6; continue; } - old = (x$5 = new $Uint64(0, 8388608), new $Uint64(old.$high - x$5.$high, old.$low - x$5.$low)); - $r = runtime_Semrelease((mu.$ptr_rsema || (mu.$ptr_rsema = new ptrType(function() { return this.$target.rsema; }, function($v) { this.$target.rsema = $v; }, mu)))); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - case 6: - /* while (true) { */ case 8: - /* if (!(!((x$6 = new $Uint64(old.$high & 2147481600, (old.$low & 0) >>> 0), (x$6.$high === 0 && x$6.$low === 0))))) { break; } */ if(!(!((x$6 = new $Uint64(old.$high & 2147481600, (old.$low & 0) >>> 0), (x$6.$high === 0 && x$6.$low === 0))))) { $s = 9; continue; } - old = (x$7 = new $Uint64(2048, 0), new $Uint64(old.$high - x$7.$high, old.$low - x$7.$low)); - $r = runtime_Semrelease((mu.$ptr_wsema || (mu.$ptr_wsema = new ptrType(function() { return this.$target.wsema; }, function($v) { this.$target.wsema = $v; }, mu)))); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 8; continue; - case 9: - $s = -1; return true; - /* } */ case 4: - $s = 1; continue; - case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: fdMutex.ptr.prototype.increfAndClose, $c: true, $r, mu, new$1, old, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s};return $f; - }; - fdMutex.prototype.increfAndClose = function() { return this.$val.increfAndClose(); }; - fdMutex.ptr.prototype.decref = function() { - var mu, new$1, old, x, x$1; - mu = this; - while (true) { - old = atomic.LoadUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu)))); - if ((x = new $Uint64(old.$high & 0, (old.$low & 8388600) >>> 0), (x.$high === 0 && x.$low === 0))) { - $panic(new $String("inconsistent poll.fdMutex")); - } - new$1 = new $Uint64(old.$high - 0, old.$low - 8); - if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { - return (x$1 = new $Uint64(new$1.$high & 0, (new$1.$low & 8388601) >>> 0), (x$1.$high === 0 && x$1.$low === 1)); - } - } - }; - fdMutex.prototype.decref = function() { return this.$val.decref(); }; - fdMutex.ptr.prototype.rwlock = function(read) { - var {_tmp, _tmp$1, _tmp$2, mu, mutexBit, mutexMask, mutexSema, mutexWait, new$1, old, read, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {read}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mu = this; - _tmp = new $Uint64(0, 0); - _tmp$1 = new $Uint64(0, 0); - _tmp$2 = new $Uint64(0, 0); - mutexBit = _tmp; - mutexWait = _tmp$1; - mutexMask = _tmp$2; - mutexSema = ptrType.nil; - if (read) { - mutexBit = new $Uint64(0, 2); - mutexWait = new $Uint64(0, 8388608); - mutexMask = new $Uint64(2047, 4286578688); - mutexSema = (mu.$ptr_rsema || (mu.$ptr_rsema = new ptrType(function() { return this.$target.rsema; }, function($v) { this.$target.rsema = $v; }, mu))); - } else { - mutexBit = new $Uint64(0, 4); - mutexWait = new $Uint64(2048, 0); - mutexMask = new $Uint64(2147481600, 0); - mutexSema = (mu.$ptr_wsema || (mu.$ptr_wsema = new ptrType(function() { return this.$target.wsema; }, function($v) { this.$target.wsema = $v; }, mu))); - } - /* while (true) { */ case 1: - old = atomic.LoadUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu)))); - if (!((x = new $Uint64(old.$high & 0, (old.$low & 1) >>> 0), (x.$high === 0 && x.$low === 0)))) { - $s = -1; return false; - } - new$1 = new $Uint64(0, 0); - if ((x$1 = new $Uint64(old.$high & mutexBit.$high, (old.$low & mutexBit.$low) >>> 0), (x$1.$high === 0 && x$1.$low === 0))) { - new$1 = (x$2 = new $Uint64(old.$high | mutexBit.$high, (old.$low | mutexBit.$low) >>> 0), new $Uint64(x$2.$high + 0, x$2.$low + 8)); - if ((x$3 = new $Uint64(new$1.$high & 0, (new$1.$low & 8388600) >>> 0), (x$3.$high === 0 && x$3.$low === 0))) { - $panic(new $String("too many concurrent operations on a single file or socket (max 1048575)")); - } - } else { - new$1 = new $Uint64(old.$high + mutexWait.$high, old.$low + mutexWait.$low); - if ((x$4 = new $Uint64(new$1.$high & mutexMask.$high, (new$1.$low & mutexMask.$low) >>> 0), (x$4.$high === 0 && x$4.$low === 0))) { - $panic(new $String("too many concurrent operations on a single file or socket (max 1048575)")); - } - } - /* */ if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { */ case 3: - if ((x$5 = new $Uint64(old.$high & mutexBit.$high, (old.$low & mutexBit.$low) >>> 0), (x$5.$high === 0 && x$5.$low === 0))) { - $s = -1; return true; - } - $r = runtime_Semacquire(mutexSema); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $s = 1; continue; - case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: fdMutex.ptr.prototype.rwlock, $c: true, $r, _tmp, _tmp$1, _tmp$2, mu, mutexBit, mutexMask, mutexSema, mutexWait, new$1, old, read, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - fdMutex.prototype.rwlock = function(read) { return this.$val.rwlock(read); }; - fdMutex.ptr.prototype.rwunlock = function(read) { - var {_tmp, _tmp$1, _tmp$2, mu, mutexBit, mutexMask, mutexSema, mutexWait, new$1, old, read, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {read}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mu = this; - _tmp = new $Uint64(0, 0); - _tmp$1 = new $Uint64(0, 0); - _tmp$2 = new $Uint64(0, 0); - mutexBit = _tmp; - mutexWait = _tmp$1; - mutexMask = _tmp$2; - mutexSema = ptrType.nil; - if (read) { - mutexBit = new $Uint64(0, 2); - mutexWait = new $Uint64(0, 8388608); - mutexMask = new $Uint64(2047, 4286578688); - mutexSema = (mu.$ptr_rsema || (mu.$ptr_rsema = new ptrType(function() { return this.$target.rsema; }, function($v) { this.$target.rsema = $v; }, mu))); - } else { - mutexBit = new $Uint64(0, 4); - mutexWait = new $Uint64(2048, 0); - mutexMask = new $Uint64(2147481600, 0); - mutexSema = (mu.$ptr_wsema || (mu.$ptr_wsema = new ptrType(function() { return this.$target.wsema; }, function($v) { this.$target.wsema = $v; }, mu))); - } - /* while (true) { */ case 1: - old = atomic.LoadUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu)))); - if ((x = new $Uint64(old.$high & mutexBit.$high, (old.$low & mutexBit.$low) >>> 0), (x.$high === 0 && x.$low === 0)) || (x$1 = new $Uint64(old.$high & 0, (old.$low & 8388600) >>> 0), (x$1.$high === 0 && x$1.$low === 0))) { - $panic(new $String("inconsistent poll.fdMutex")); - } - new$1 = (x$2 = new $Uint64(old.$high & ~mutexBit.$high, (old.$low & ~mutexBit.$low) >>> 0), new $Uint64(x$2.$high - 0, x$2.$low - 8)); - if (!((x$3 = new $Uint64(old.$high & mutexMask.$high, (old.$low & mutexMask.$low) >>> 0), (x$3.$high === 0 && x$3.$low === 0)))) { - new$1 = (x$4 = mutexWait, new $Uint64(new$1.$high - x$4.$high, new$1.$low - x$4.$low)); - } - /* */ if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (atomic.CompareAndSwapUint64((mu.$ptr_state || (mu.$ptr_state = new ptrType$3(function() { return this.$target.state; }, function($v) { this.$target.state = $v; }, mu))), old, new$1)) { */ case 3: - /* */ if (!((x$5 = new $Uint64(old.$high & mutexMask.$high, (old.$low & mutexMask.$low) >>> 0), (x$5.$high === 0 && x$5.$low === 0)))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((x$5 = new $Uint64(old.$high & mutexMask.$high, (old.$low & mutexMask.$low) >>> 0), (x$5.$high === 0 && x$5.$low === 0)))) { */ case 5: - $r = runtime_Semrelease(mutexSema); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $s = -1; return (x$6 = new $Uint64(new$1.$high & 0, (new$1.$low & 8388601) >>> 0), (x$6.$high === 0 && x$6.$low === 1)); - /* } */ case 4: - $s = 1; continue; - case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: fdMutex.ptr.prototype.rwunlock, $c: true, $r, _tmp, _tmp$1, _tmp$2, mu, mutexBit, mutexMask, mutexSema, mutexWait, new$1, old, read, x, x$1, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - fdMutex.prototype.rwunlock = function(read) { return this.$val.rwunlock(read); }; - FD.ptr.prototype.incref = function() { - var fd; - fd = this; - if (!fd.fdmu.incref()) { - return errClosing(fd.isFile); - } - return $ifaceNil; - }; - FD.prototype.incref = function() { return this.$val.incref(); }; - FD.ptr.prototype.decref = function() { - var {$24r, _r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - /* */ if (fd.fdmu.decref()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fd.fdmu.decref()) { */ case 1: - _r = fd.destroy(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.decref, $c: true, $r, $24r, _r, fd, $s};return $f; - }; - FD.prototype.decref = function() { return this.$val.decref(); }; - FD.ptr.prototype.readLock = function() { - var {_r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.fdmu.rwlock(true); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return errClosing(fd.isFile); - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.readLock, $c: true, $r, _r, fd, $s};return $f; - }; - FD.prototype.readLock = function() { return this.$val.readLock(); }; - FD.ptr.prototype.readUnlock = function() { - var {_r, _r$1, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.fdmu.rwunlock(true); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r) { */ case 1: - _r$1 = fd.destroy(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.readUnlock, $c: true, $r, _r, _r$1, fd, $s};return $f; - }; - FD.prototype.readUnlock = function() { return this.$val.readUnlock(); }; - FD.ptr.prototype.writeLock = function() { - var {_r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.fdmu.rwlock(false); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return errClosing(fd.isFile); - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.writeLock, $c: true, $r, _r, fd, $s};return $f; - }; - FD.prototype.writeLock = function() { return this.$val.writeLock(); }; - FD.ptr.prototype.writeUnlock = function() { - var {_r, _r$1, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.fdmu.rwunlock(false); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r) { */ case 1: - _r$1 = fd.destroy(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: FD.ptr.prototype.writeUnlock, $c: true, $r, _r, _r$1, fd, $s};return $f; - }; - FD.prototype.writeUnlock = function() { return this.$val.writeUnlock(); }; - FD.ptr.prototype.Fsync = function() { - var {$24r, $24r$1, _r, err, fd, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = [fd]; - fd[0] = this; - err = fd[0].incref(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = err; - $s = 3; case 3: return $24r; - /* } */ case 2: - $deferred.push([$methodVal(fd[0], "decref"), []]); - _r = ignoringEINTR((function(fd) { return function $b() { - var {$24r$1, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = syscall.Fsync(fd[0].Sysfd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 2; case 2: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$1, _r, $s};return $f; - }; })(fd)); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = _r; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: FD.ptr.prototype.Fsync, $c: true, $r, $24r, $24r$1, _r, err, fd, $s, $deferred};return $f; } } - }; - FD.prototype.Fsync = function() { return this.$val.Fsync(); }; - errNetClosing.ptr.prototype.Error = function() { - var e; - e = this; - return "use of closed network connection"; - }; - errNetClosing.prototype.Error = function() { return this.$val.Error(); }; - errNetClosing.ptr.prototype.Timeout = function() { - var e; - e = this; - return false; - }; - errNetClosing.prototype.Timeout = function() { return this.$val.Timeout(); }; - errNetClosing.ptr.prototype.Temporary = function() { - var e; - e = this; - return false; - }; - errNetClosing.prototype.Temporary = function() { return this.$val.Temporary(); }; - errClosing = function(isFile) { - var isFile; - if (isFile) { - return $pkg.ErrFileClosing; - } - return new $pkg.ErrNetClosing.constructor.elem($pkg.ErrNetClosing); - }; - DeadlineExceededError.ptr.prototype.Error = function() { - var e; - e = this; - return "i/o timeout"; - }; - DeadlineExceededError.prototype.Error = function() { return this.$val.Error(); }; - DeadlineExceededError.ptr.prototype.Timeout = function() { - var e; - e = this; - return true; - }; - DeadlineExceededError.prototype.Timeout = function() { return this.$val.Timeout(); }; - DeadlineExceededError.ptr.prototype.Temporary = function() { - var e; - e = this; - return true; - }; - DeadlineExceededError.prototype.Temporary = function() { return this.$val.Temporary(); }; - fcntl = function(fd, cmd, arg) { - var arg, cmd, fd; - return [0, new syscall.Errno(38)]; - }; - runtime_Semacquire = function() { - $throwRuntimeError("native function not implemented: internal/poll.runtime_Semacquire"); - }; - runtime_Semrelease = function() { - $throwRuntimeError("native function not implemented: internal/poll.runtime_Semrelease"); - }; - ptrType$2.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([$String, $Bool], [$error], false)}, {prop: "destroy", name: "destroy", pkg: "internal/poll", typ: $funcType([], [$error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SetBlocking", name: "SetBlocking", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Pread", name: "Pread", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, syscall.Sockaddr, $error], false)}, {prop: "ReadFromInet4", name: "ReadFromInet4", pkg: "", typ: $funcType([sliceType$1, ptrType$5], [$Int, $error], false)}, {prop: "ReadFromInet6", name: "ReadFromInet6", pkg: "", typ: $funcType([sliceType$1, ptrType$6], [$Int, $error], false)}, {prop: "ReadMsg", name: "ReadMsg", pkg: "", typ: $funcType([sliceType$1, sliceType$1, $Int], [$Int, $Int, $Int, syscall.Sockaddr, $error], false)}, {prop: "ReadMsgInet4", name: "ReadMsgInet4", pkg: "", typ: $funcType([sliceType$1, sliceType$1, $Int, ptrType$5], [$Int, $Int, $Int, $error], false)}, {prop: "ReadMsgInet6", name: "ReadMsgInet6", pkg: "", typ: $funcType([sliceType$1, sliceType$1, $Int, ptrType$6], [$Int, $Int, $Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Pwrite", name: "Pwrite", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "WriteToInet4", name: "WriteToInet4", pkg: "", typ: $funcType([sliceType$1, ptrType$5], [$Int, $error], false)}, {prop: "WriteToInet6", name: "WriteToInet6", pkg: "", typ: $funcType([sliceType$1, ptrType$6], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, syscall.Sockaddr], [$Int, $error], false)}, {prop: "WriteMsg", name: "WriteMsg", pkg: "", typ: $funcType([sliceType$1, sliceType$1, syscall.Sockaddr], [$Int, $Int, $error], false)}, {prop: "WriteMsgInet4", name: "WriteMsgInet4", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$5], [$Int, $Int, $error], false)}, {prop: "WriteMsgInet6", name: "WriteMsgInet6", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$6], [$Int, $Int, $error], false)}, {prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [$Int, syscall.Sockaddr, $String, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "ReadDirent", name: "ReadDirent", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Fchmod", name: "Fchmod", pkg: "", typ: $funcType([$Uint32], [$error], false)}, {prop: "Fchdir", name: "Fchdir", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Fstat", name: "Fstat", pkg: "", typ: $funcType([ptrType$7], [$error], false)}, {prop: "Dup", name: "Dup", pkg: "", typ: $funcType([], [$Int, $String, $error], false)}, {prop: "WaitWrite", name: "WaitWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "WriteOnce", name: "WriteOnce", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "RawRead", name: "RawRead", pkg: "", typ: $funcType([funcType], [$error], false)}, {prop: "RawWrite", name: "RawWrite", pkg: "", typ: $funcType([funcType], [$error], false)}, {prop: "eofError", name: "eofError", pkg: "internal/poll", typ: $funcType([$Int, $error], [$error], false)}, {prop: "Shutdown", name: "Shutdown", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "Fchown", name: "Fchown", pkg: "", typ: $funcType([$Int, $Int], [$error], false)}, {prop: "Ftruncate", name: "Ftruncate", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "RawControl", name: "RawControl", pkg: "", typ: $funcType([funcType$1], [$error], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "incref", name: "incref", pkg: "internal/poll", typ: $funcType([], [$error], false)}, {prop: "decref", name: "decref", pkg: "internal/poll", typ: $funcType([], [$error], false)}, {prop: "readLock", name: "readLock", pkg: "internal/poll", typ: $funcType([], [$error], false)}, {prop: "readUnlock", name: "readUnlock", pkg: "internal/poll", typ: $funcType([], [], false)}, {prop: "writeLock", name: "writeLock", pkg: "internal/poll", typ: $funcType([], [$error], false)}, {prop: "writeUnlock", name: "writeUnlock", pkg: "internal/poll", typ: $funcType([], [], false)}, {prop: "Fsync", name: "Fsync", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$8.methods = [{prop: "init", name: "init", pkg: "internal/poll", typ: $funcType([ptrType$2], [$error], false)}, {prop: "close", name: "close", pkg: "internal/poll", typ: $funcType([], [], false)}, {prop: "evict", name: "evict", pkg: "internal/poll", typ: $funcType([], [], false)}, {prop: "prepare", name: "prepare", pkg: "internal/poll", typ: $funcType([$Int, $Bool], [$error], false)}, {prop: "prepareRead", name: "prepareRead", pkg: "internal/poll", typ: $funcType([$Bool], [$error], false)}, {prop: "prepareWrite", name: "prepareWrite", pkg: "internal/poll", typ: $funcType([$Bool], [$error], false)}, {prop: "wait", name: "wait", pkg: "internal/poll", typ: $funcType([$Int, $Bool], [$error], false)}, {prop: "waitRead", name: "waitRead", pkg: "internal/poll", typ: $funcType([$Bool], [$error], false)}, {prop: "waitWrite", name: "waitWrite", pkg: "internal/poll", typ: $funcType([$Bool], [$error], false)}, {prop: "waitCanceled", name: "waitCanceled", pkg: "internal/poll", typ: $funcType([$Int], [], false)}, {prop: "pollable", name: "pollable", pkg: "internal/poll", typ: $funcType([], [$Bool], false)}]; - ptrType$9.methods = [{prop: "incref", name: "incref", pkg: "internal/poll", typ: $funcType([], [$Bool], false)}, {prop: "increfAndClose", name: "increfAndClose", pkg: "internal/poll", typ: $funcType([], [$Bool], false)}, {prop: "decref", name: "decref", pkg: "internal/poll", typ: $funcType([], [$Bool], false)}, {prop: "rwlock", name: "rwlock", pkg: "internal/poll", typ: $funcType([$Bool], [$Bool], false)}, {prop: "rwunlock", name: "rwunlock", pkg: "internal/poll", typ: $funcType([$Bool], [$Bool], false)}]; - errNetClosing.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$10.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - FD.init("internal/poll", [{prop: "fdmu", name: "fdmu", embedded: false, exported: false, typ: fdMutex, tag: ""}, {prop: "Sysfd", name: "Sysfd", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "pd", name: "pd", embedded: false, exported: false, typ: pollDesc, tag: ""}, {prop: "iovecs", name: "iovecs", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "csema", name: "csema", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "isBlocking", name: "isBlocking", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "IsStream", name: "IsStream", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ZeroReadIsEOF", name: "ZeroReadIsEOF", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "isFile", name: "isFile", embedded: false, exported: false, typ: $Bool, tag: ""}]); - pollDesc.init("internal/poll", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "closing", name: "closing", embedded: false, exported: false, typ: $Bool, tag: ""}]); - fdMutex.init("internal/poll", [{prop: "state", name: "state", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "rsema", name: "rsema", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "wsema", name: "wsema", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - errNetClosing.init("", []); - DeadlineExceededError.init("", []); - $pkg.$initLinknames = function() { - runtime_Semacquire = $linknames["sync.runtime_Semacquire"]; - runtime_Semrelease = $linknames["sync.runtime_Semrelease"]; -}; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unix.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = syscall.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.CloseFunc = syscall.Close; - $pkg.AcceptFunc = syscall.Accept; - tryDupCloexec = 1; - $pkg.ErrNetClosing = new errNetClosing.ptr(); - $pkg.ErrFileClosing = errors.New("use of closed file"); - $pkg.ErrNoDeadline = errors.New("file type does not support deadline"); - $pkg.ErrDeadlineExceeded = new DeadlineExceededError.ptr(); - $pkg.ErrNotPollable = errors.New("not pollable"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/syscall/execenv"] = (function() { - var $pkg = {}, $init, syscall; - syscall = $packages["syscall"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = syscall.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/testlog"] = (function() { - var $pkg = {}, $init, sync, atomic, Interface, structType, ptrType, logger, panicOnExit0, Logger, Getenv, Open, Stat, PanicOnExit0; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - Interface = $pkg.Interface = $newType(8, $kindInterface, "testlog.Interface", true, "internal/testlog", true, null); - structType = $structType("internal/testlog", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "val", name: "val", embedded: false, exported: false, typ: $Bool, tag: ""}]); - ptrType = $ptrType(Interface); - Logger = function() { - var impl; - impl = logger.Load(); - if ($interfaceIsEqual(impl, $ifaceNil)) { - return $ifaceNil; - } - return $assertType(impl, ptrType).$get(); - }; - $pkg.Logger = Logger; - Getenv = function(name) { - var {log, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log = Logger(); - /* */ if (!($interfaceIsEqual(log, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(log, $ifaceNil))) { */ case 1: - $r = log.Getenv(name); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Getenv, $c: true, $r, log, name, $s};return $f; - }; - $pkg.Getenv = Getenv; - Open = function(name) { - var {log, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log = Logger(); - /* */ if (!($interfaceIsEqual(log, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(log, $ifaceNil))) { */ case 1: - $r = log.Open(name); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Open, $c: true, $r, log, name, $s};return $f; - }; - $pkg.Open = Open; - Stat = function(name) { - var {log, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log = Logger(); - /* */ if (!($interfaceIsEqual(log, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(log, $ifaceNil))) { */ case 1: - $r = log.Stat(name); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Stat, $c: true, $r, log, name, $s};return $f; - }; - $pkg.Stat = Stat; - PanicOnExit0 = function() { - var {$24r, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = panicOnExit0.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(panicOnExit0.mu, "Unlock"), []]); - $24r = panicOnExit0.val; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: PanicOnExit0, $c: true, $r, $24r, $s, $deferred};return $f; } } - }; - $pkg.PanicOnExit0 = PanicOnExit0; - Interface.init([{prop: "Chdir", name: "Chdir", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Getenv", name: "Getenv", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Stat", name: "Stat", pkg: "", typ: $funcType([$String], [], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = sync.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - logger = new atomic.Value.ptr($ifaceNil); - panicOnExit0 = new structType.ptr(new sync.Mutex.ptr(0, 0), false); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["path"] = (function() { - var $pkg = {}, $init, errors, bytealg, utf8, lazybuf, sliceType, ptrType, Clean, lastSlash, Split, Base; - errors = $packages["errors"]; - bytealg = $packages["internal/bytealg"]; - utf8 = $packages["unicode/utf8"]; - lazybuf = $pkg.lazybuf = $newType(0, $kindStruct, "path.lazybuf", true, "path", false, function(s_, buf_, w_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - this.buf = sliceType.nil; - this.w = 0; - return; - } - this.s = s_; - this.buf = buf_; - this.w = w_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(lazybuf); - lazybuf.ptr.prototype.index = function(i) { - var b, i, x; - b = this; - if (!(b.buf === sliceType.nil)) { - return (x = b.buf, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - } - return b.s.charCodeAt(i); - }; - lazybuf.prototype.index = function(i) { return this.$val.index(i); }; - lazybuf.ptr.prototype.append = function(c) { - var b, c, x, x$1; - b = this; - if (b.buf === sliceType.nil) { - if (b.w < b.s.length && (b.s.charCodeAt(b.w) === c)) { - b.w = b.w + (1) >> 0; - return; - } - b.buf = $makeSlice(sliceType, b.s.length); - $copyString(b.buf, $substring(b.s, 0, b.w)); - } - (x = b.buf, x$1 = b.w, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); - b.w = b.w + (1) >> 0; - }; - lazybuf.prototype.append = function(c) { return this.$val.append(c); }; - lazybuf.ptr.prototype.string = function() { - var b; - b = this; - if (b.buf === sliceType.nil) { - return $substring(b.s, 0, b.w); - } - return ($bytesToString($subslice(b.buf, 0, b.w))); - }; - lazybuf.prototype.string = function() { return this.$val.string(); }; - Clean = function(path) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, dotdot, n, out, path, r, rooted; - if (path === "") { - return "."; - } - rooted = path.charCodeAt(0) === 47; - n = path.length; - out = new lazybuf.ptr(path, sliceType.nil, 0); - _tmp = 0; - _tmp$1 = 0; - r = _tmp; - dotdot = _tmp$1; - if (rooted) { - out.append(47); - _tmp$2 = 1; - _tmp$3 = 1; - r = _tmp$2; - dotdot = _tmp$3; - } - while (true) { - if (!(r < n)) { break; } - if ((path.charCodeAt(r) === 47)) { - r = r + (1) >> 0; - } else if ((path.charCodeAt(r) === 46) && (((r + 1 >> 0) === n) || (path.charCodeAt((r + 1 >> 0)) === 47))) { - r = r + (1) >> 0; - } else if ((path.charCodeAt(r) === 46) && (path.charCodeAt((r + 1 >> 0)) === 46) && (((r + 2 >> 0) === n) || (path.charCodeAt((r + 2 >> 0)) === 47))) { - r = r + (2) >> 0; - if (out.w > dotdot) { - out.w = out.w - (1) >> 0; - while (true) { - if (!(out.w > dotdot && !((out.index(out.w) === 47)))) { break; } - out.w = out.w - (1) >> 0; - } - } else if (!rooted) { - if (out.w > 0) { - out.append(47); - } - out.append(46); - out.append(46); - dotdot = out.w; - } - } else { - if (rooted && !((out.w === 1)) || !rooted && !((out.w === 0))) { - out.append(47); - } - while (true) { - if (!(r < n && !((path.charCodeAt(r) === 47)))) { break; } - out.append(path.charCodeAt(r)); - r = r + (1) >> 0; - } - } - } - if (out.w === 0) { - return "."; - } - return out.string(); - }; - $pkg.Clean = Clean; - lastSlash = function(s) { - var i, s; - i = s.length - 1 >> 0; - while (true) { - if (!(i >= 0 && !((s.charCodeAt(i) === 47)))) { break; } - i = i - (1) >> 0; - } - return i; - }; - Split = function(path) { - var _tmp, _tmp$1, dir, file, i, path; - dir = ""; - file = ""; - i = lastSlash(path); - _tmp = $substring(path, 0, (i + 1 >> 0)); - _tmp$1 = $substring(path, (i + 1 >> 0)); - dir = _tmp; - file = _tmp$1; - return [dir, file]; - }; - $pkg.Split = Split; - Base = function(path) { - var i, path; - if (path === "") { - return "."; - } - while (true) { - if (!(path.length > 0 && (path.charCodeAt((path.length - 1 >> 0)) === 47))) { break; } - path = $substring(path, 0, (path.length - 1 >> 0)); - } - i = lastSlash(path); - if (i >= 0) { - path = $substring(path, (i + 1 >> 0)); - } - if (path === "") { - return "/"; - } - return path; - }; - $pkg.Base = Base; - ptrType.methods = [{prop: "index", name: "index", pkg: "path", typ: $funcType([$Int], [$Uint8], false)}, {prop: "append", name: "append", pkg: "path", typ: $funcType([$Uint8], [], false)}, {prop: "string", name: "string", pkg: "path", typ: $funcType([], [$String], false)}]; - lazybuf.init("path", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrBadPattern = errors.New("syntax error in pattern"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["io/fs"] = (function() { - var $pkg = {}, $init, errors, oserror, io, path, sort, time, utf8, DirEntry, FileInfo, FileMode, PathError, ptrType, sliceType$2, arrayType, interfaceType, errInvalid, errPermission, errExist, errNotExist, errClosed; - errors = $packages["errors"]; - oserror = $packages["internal/oserror"]; - io = $packages["io"]; - path = $packages["path"]; - sort = $packages["sort"]; - time = $packages["time"]; - utf8 = $packages["unicode/utf8"]; - DirEntry = $pkg.DirEntry = $newType(8, $kindInterface, "fs.DirEntry", true, "io/fs", true, null); - FileInfo = $pkg.FileInfo = $newType(8, $kindInterface, "fs.FileInfo", true, "io/fs", true, null); - FileMode = $pkg.FileMode = $newType(4, $kindUint32, "fs.FileMode", true, "io/fs", true, null); - PathError = $pkg.PathError = $newType(0, $kindStruct, "fs.PathError", true, "io/fs", true, function(Op_, Path_, Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Op = ""; - this.Path = ""; - this.Err = $ifaceNil; - return; - } - this.Op = Op_; - this.Path = Path_; - this.Err = Err_; - }); - ptrType = $ptrType(PathError); - sliceType$2 = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 32); - interfaceType = $interfaceType([{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); - errInvalid = function() { - return oserror.ErrInvalid; - }; - errPermission = function() { - return oserror.ErrPermission; - }; - errExist = function() { - return oserror.ErrExist; - }; - errNotExist = function() { - return oserror.ErrNotExist; - }; - errClosed = function() { - return oserror.ErrClosed; - }; - FileMode.prototype.String = function() { - var _i, _i$1, _ref, _ref$1, _rune, _rune$1, buf, c, c$1, i, i$1, m, w, y, y$1; - m = this.$val; - buf = arrayType.zero(); - w = 0; - _ref = "dalTLDpSugct?"; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - c = _rune[0]; - if (!((((m & (((y = (((31 - i >> 0) >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0))) { - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = ((c << 24 >>> 24))); - w = w + (1) >> 0; - } - _i += _rune[1]; - } - if (w === 0) { - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 45); - w = w + (1) >> 0; - } - _ref$1 = "rwxrwxrwx"; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.length)) { break; } - _rune$1 = $decodeRune(_ref$1, _i$1); - i$1 = _i$1; - c$1 = _rune$1[0]; - if (!((((m & (((y$1 = (((8 - i$1 >> 0) >>> 0)), y$1 < 32 ? (1 << y$1) : 0) >>> 0))) >>> 0) === 0))) { - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = ((c$1 << 24 >>> 24))); - } else { - ((w < 0 || w >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[w] = 45); - } - w = w + (1) >> 0; - _i$1 += _rune$1[1]; - } - return ($bytesToString($subslice(new sliceType$2(buf), 0, w))); - }; - $ptrType(FileMode).prototype.String = function() { return new FileMode(this.$get()).String(); }; - FileMode.prototype.IsDir = function() { - var m; - m = this.$val; - return !((((m & 2147483648) >>> 0) === 0)); - }; - $ptrType(FileMode).prototype.IsDir = function() { return new FileMode(this.$get()).IsDir(); }; - FileMode.prototype.IsRegular = function() { - var m; - m = this.$val; - return ((m & 2401763328) >>> 0) === 0; - }; - $ptrType(FileMode).prototype.IsRegular = function() { return new FileMode(this.$get()).IsRegular(); }; - FileMode.prototype.Perm = function() { - var m; - m = this.$val; - return (m & 511) >>> 0; - }; - $ptrType(FileMode).prototype.Perm = function() { return new FileMode(this.$get()).Perm(); }; - FileMode.prototype.Type = function() { - var m; - m = this.$val; - return (m & 2401763328) >>> 0; - }; - $ptrType(FileMode).prototype.Type = function() { return new FileMode(this.$get()).Type(); }; - PathError.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = e.Err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = e.Op + " " + e.Path + ": " + _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: PathError.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - PathError.prototype.Error = function() { return this.$val.Error(); }; - PathError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - PathError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - PathError.ptr.prototype.Timeout = function() { - var {$24r, _r, _tuple, _v, e, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _tuple = $assertType(e.Err, interfaceType, true); - t = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 1; continue s; } - _r = t.Timeout(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: PathError.ptr.prototype.Timeout, $c: true, $r, $24r, _r, _tuple, _v, e, ok, t, $s};return $f; - }; - PathError.prototype.Timeout = function() { return this.$val.Timeout(); }; - FileMode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsRegular", name: "IsRegular", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Perm", name: "Perm", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [FileMode], false)}]; - ptrType.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]; - DirEntry.init([{prop: "Info", name: "Info", pkg: "", typ: $funcType([], [FileInfo, $error], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [FileMode], false)}]); - FileInfo.init([{prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [FileMode], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}]); - PathError.init("", [{prop: "Op", name: "Op", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Path", name: "Path", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = oserror.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = path.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.SkipDir = errors.New("skip this directory"); - $pkg.ErrInvalid = errInvalid(); - $pkg.ErrPermission = errPermission(); - $pkg.ErrExist = errExist(); - $pkg.ErrNotExist = errNotExist(); - $pkg.ErrClosed = errClosed(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["os"] = (function() { - var $pkg = {}, $init, errors, js, itoa, oserror, poll, execenv, unix, testlog, unsafeheader, io, fs, runtime, sort, sync, atomic, syscall, time, fileStat, File, rawConn, file, unixDirent, LinkError, onlyWriter, timeout, SyscallError, dirInfo, readdirMode, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$5, ptrType$6, sliceType$4, ptrType$7, ptrType$8, ptrType$9, funcType, ptrType$17, ptrType$18, sliceType$7, sliceType$8, funcType$2, funcType$3, ptrType$19, ptrType$20, errPatternHasSeparator, errWriteAtInAppendMode, lstat, dirBufPool, testingForceReadDirLstat, _r, _r$1, _r$2, nextRandom, CreateTemp, prefixAndSuffix, joinPath, lastIndex, statNolog, lstatNolog, fillFileStatFromSys, timespecToTime, Stat, Lstat, newRawConn, init, Exit, IsPathSeparator, basename, fixLongPath, NewFile, newFile, epipecheck, openFileNolog, Remove, tempDir, Readlink, newUnixDirent, sigpipe, syscallMode, chmod, ignoringEINTR, genericReadFrom, setStickyBit, Open, OpenFile, fixCount, TempDir, Chmod, ReadFile, Executable, errNoDeadline, errDeadlineExceeded, IsExist, IsNotExist, underlyingErrorIs, underlyingError, Getenv, direntIno, direntReclen, direntNamlen, direntType, readInt, readIntBE, readIntLE, ReadDir, runtime_args, init$1, runtime_beforeExit, executable, fastrand; - errors = $packages["errors"]; - js = $packages["github.com/gopherjs/gopherjs/js"]; - itoa = $packages["internal/itoa"]; - oserror = $packages["internal/oserror"]; - poll = $packages["internal/poll"]; - execenv = $packages["internal/syscall/execenv"]; - unix = $packages["internal/syscall/unix"]; - testlog = $packages["internal/testlog"]; - unsafeheader = $packages["internal/unsafeheader"]; - io = $packages["io"]; - fs = $packages["io/fs"]; - runtime = $packages["runtime"]; - sort = $packages["sort"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - syscall = $packages["syscall"]; - time = $packages["time"]; - fileStat = $pkg.fileStat = $newType(0, $kindStruct, "os.fileStat", true, "os", false, function(name_, size_, mode_, modTime_, sys_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.size = new $Int64(0, 0); - this.mode = 0; - this.modTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil); - this.sys = new syscall.Stat_t.ptr(new $Int64(0, 0), new $Uint64(0, 0), 0, 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), 0, 0, new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0)); - return; - } - this.name = name_; - this.size = size_; - this.mode = mode_; - this.modTime = modTime_; - this.sys = sys_; - }); - File = $pkg.File = $newType(0, $kindStruct, "os.File", true, "os", true, function(file_) { - this.$val = this; - if (arguments.length === 0) { - this.file = ptrType$9.nil; - return; - } - this.file = file_; - }); - rawConn = $pkg.rawConn = $newType(0, $kindStruct, "os.rawConn", true, "os", false, function(file_) { - this.$val = this; - if (arguments.length === 0) { - this.file = ptrType$2.nil; - return; - } - this.file = file_; - }); - file = $pkg.file = $newType(0, $kindStruct, "os.file", true, "os", false, function(pfd_, name_, dirinfo_, nonblock_, stdoutOrErr_, appendMode_) { - this.$val = this; - if (arguments.length === 0) { - this.pfd = new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), 0, new poll.pollDesc.ptr(ptrType$6.nil, false), ptrType$7.nil, 0, 0, false, false, false); - this.name = ""; - this.dirinfo = ptrType$8.nil; - this.nonblock = false; - this.stdoutOrErr = false; - this.appendMode = false; - return; - } - this.pfd = pfd_; - this.name = name_; - this.dirinfo = dirinfo_; - this.nonblock = nonblock_; - this.stdoutOrErr = stdoutOrErr_; - this.appendMode = appendMode_; - }); - unixDirent = $pkg.unixDirent = $newType(0, $kindStruct, "os.unixDirent", true, "os", false, function(parent_, name_, typ_, info_) { - this.$val = this; - if (arguments.length === 0) { - this.parent = ""; - this.name = ""; - this.typ = 0; - this.info = $ifaceNil; - return; - } - this.parent = parent_; - this.name = name_; - this.typ = typ_; - this.info = info_; - }); - LinkError = $pkg.LinkError = $newType(0, $kindStruct, "os.LinkError", true, "os", true, function(Op_, Old_, New_, Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Op = ""; - this.Old = ""; - this.New = ""; - this.Err = $ifaceNil; - return; - } - this.Op = Op_; - this.Old = Old_; - this.New = New_; - this.Err = Err_; - }); - onlyWriter = $pkg.onlyWriter = $newType(0, $kindStruct, "os.onlyWriter", true, "os", false, function(Writer_) { - this.$val = this; - if (arguments.length === 0) { - this.Writer = $ifaceNil; - return; - } - this.Writer = Writer_; - }); - timeout = $pkg.timeout = $newType(8, $kindInterface, "os.timeout", true, "os", false, null); - SyscallError = $pkg.SyscallError = $newType(0, $kindStruct, "os.SyscallError", true, "os", true, function(Syscall_, Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Syscall = ""; - this.Err = $ifaceNil; - return; - } - this.Syscall = Syscall_; - this.Err = Err_; - }); - dirInfo = $pkg.dirInfo = $newType(0, $kindStruct, "os.dirInfo", true, "os", false, function(buf_, nbuf_, bufp_) { - this.$val = this; - if (arguments.length === 0) { - this.buf = ptrType.nil; - this.nbuf = 0; - this.bufp = 0; - return; - } - this.buf = buf_; - this.nbuf = nbuf_; - this.bufp = bufp_; - }); - readdirMode = $pkg.readdirMode = $newType(4, $kindInt, "os.readdirMode", true, "os", false, null); - sliceType = $sliceType($String); - sliceType$1 = $sliceType($emptyInterface); - sliceType$2 = $sliceType($Uint8); - ptrType = $ptrType(sliceType$2); - ptrType$1 = $ptrType(fileStat); - ptrType$2 = $ptrType(File); - ptrType$3 = $ptrType(time.Location); - ptrType$5 = $ptrType(fs.PathError); - ptrType$6 = $ptrType(poll.FD); - sliceType$4 = $sliceType(syscall.Iovec); - ptrType$7 = $ptrType(sliceType$4); - ptrType$8 = $ptrType(dirInfo); - ptrType$9 = $ptrType(file); - funcType = $funcType([ptrType$9], [$error], false); - ptrType$17 = $ptrType(LinkError); - ptrType$18 = $ptrType(SyscallError); - sliceType$7 = $sliceType(fs.DirEntry); - sliceType$8 = $sliceType(fs.FileInfo); - funcType$2 = $funcType([$Uintptr], [], false); - funcType$3 = $funcType([$Uintptr], [$Bool], false); - ptrType$19 = $ptrType(rawConn); - ptrType$20 = $ptrType(unixDirent); - fileStat.ptr.prototype.Size = function() { - var fs$1; - fs$1 = this; - return fs$1.size; - }; - fileStat.prototype.Size = function() { return this.$val.Size(); }; - fileStat.ptr.prototype.Mode = function() { - var fs$1; - fs$1 = this; - return fs$1.mode; - }; - fileStat.prototype.Mode = function() { return this.$val.Mode(); }; - fileStat.ptr.prototype.ModTime = function() { - var fs$1; - fs$1 = this; - return fs$1.modTime; - }; - fileStat.prototype.ModTime = function() { return this.$val.ModTime(); }; - fileStat.ptr.prototype.Sys = function() { - var fs$1; - fs$1 = this; - return fs$1.sys; - }; - fileStat.prototype.Sys = function() { return this.$val.Sys(); }; - fileStat.ptr.prototype.Name = function() { - var fs$1; - fs$1 = this; - return fs$1.name; - }; - fileStat.prototype.Name = function() { return this.$val.Name(); }; - fileStat.ptr.prototype.IsDir = function() { - var fs$1; - fs$1 = this; - return new fs.FileMode(fs$1.Mode()).IsDir(); - }; - fileStat.prototype.IsDir = function() { return this.$val.IsDir(); }; - nextRandom = function() { - var {$24r, _r$3, _r$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = fastrand(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = itoa.Uitoa(((_r$3 >>> 0))); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: nextRandom, $c: true, $r, $24r, _r$3, _r$4, $s};return $f; - }; - CreateTemp = function(dir, pattern) { - var {_r$3, _r$4, _r$5, _tuple, _tuple$1, dir, err, err$1, f, name, pattern, prefix, suffix, try$1, $s, $r, $c} = $restore(this, {dir, pattern}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (dir === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (dir === "") { */ case 1: - _r$3 = TempDir(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - dir = _r$3; - /* } */ case 2: - _tuple = prefixAndSuffix(pattern); - prefix = _tuple[0]; - suffix = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, new fs.PathError.ptr("createtemp", pattern, err)]; - } - prefix = joinPath(dir, prefix); - try$1 = 0; - /* while (true) { */ case 4: - _r$4 = nextRandom(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - name = prefix + _r$4 + suffix; - _r$5 = OpenFile(name, 194, 384); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - f = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (IsExist(err$1)) { - try$1 = try$1 + (1) >> 0; - if (try$1 < 10000) { - /* continue; */ $s = 4; continue; - } - $s = -1; return [ptrType$2.nil, new fs.PathError.ptr("createtemp", prefix + "*" + suffix, $pkg.ErrExist)]; - } - $s = -1; return [f, err$1]; - case 5: - $s = -1; return [ptrType$2.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: CreateTemp, $c: true, $r, _r$3, _r$4, _r$5, _tuple, _tuple$1, dir, err, err$1, f, name, pattern, prefix, suffix, try$1, $s};return $f; - }; - $pkg.CreateTemp = CreateTemp; - prefixAndSuffix = function(pattern) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, err, i, pattern, pos, prefix, suffix; - prefix = ""; - suffix = ""; - err = $ifaceNil; - i = 0; - while (true) { - if (!(i < pattern.length)) { break; } - if (IsPathSeparator(pattern.charCodeAt(i))) { - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = errPatternHasSeparator; - prefix = _tmp; - suffix = _tmp$1; - err = _tmp$2; - return [prefix, suffix, err]; - } - i = i + (1) >> 0; - } - pos = lastIndex(pattern, 42); - if (!((pos === -1))) { - _tmp$3 = $substring(pattern, 0, pos); - _tmp$4 = $substring(pattern, (pos + 1 >> 0)); - prefix = _tmp$3; - suffix = _tmp$4; - } else { - prefix = pattern; - } - _tmp$5 = prefix; - _tmp$6 = suffix; - _tmp$7 = $ifaceNil; - prefix = _tmp$5; - suffix = _tmp$6; - err = _tmp$7; - return [prefix, suffix, err]; - }; - joinPath = function(dir, name) { - var dir, name; - if (dir.length > 0 && IsPathSeparator(dir.charCodeAt((dir.length - 1 >> 0)))) { - return dir + name; - } - return dir + "/" + name; - }; - lastIndex = function(s, sep) { - var i, s, sep; - i = s.length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (s.charCodeAt(i) === sep) { - return i; - } - i = i - (1) >> 0; - } - return -1; - }; - File.ptr.prototype.Stat = function() { - var {_r$3, err, f, fs$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fs$1 = [fs$1]; - f = this; - if (f === ptrType$2.nil) { - $s = -1; return [$ifaceNil, $pkg.ErrInvalid]; - } - fs$1[0] = new fileStat.ptr("", new $Int64(0, 0), 0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil), new syscall.Stat_t.ptr(new $Int64(0, 0), new $Uint64(0, 0), 0, 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), 0, 0, new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0))); - _r$3 = f.file.pfd.Fstat(fs$1[0].sys); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new fs.PathError.ptr("stat", f.file.name, err)]; - } - fillFileStatFromSys(fs$1[0], f.file.name); - $s = -1; return [fs$1[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Stat, $c: true, $r, _r$3, err, f, fs$1, $s};return $f; - }; - File.prototype.Stat = function() { return this.$val.Stat(); }; - statNolog = function(name) { - var {_r$3, err, fs$1, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fs$1 = [fs$1]; - name = [name]; - fs$1[0] = new fileStat.ptr("", new $Int64(0, 0), 0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil), new syscall.Stat_t.ptr(new $Int64(0, 0), new $Uint64(0, 0), 0, 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), 0, 0, new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0))); - _r$3 = ignoringEINTR((function(fs$1, name) { return function $b() { - var {$24r, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = syscall.Stat(name[0], fs$1[0].sys); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$3, $s};return $f; - }; })(fs$1, name)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new fs.PathError.ptr("stat", name[0], err)]; - } - fillFileStatFromSys(fs$1[0], name[0]); - $s = -1; return [fs$1[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: statNolog, $c: true, $r, _r$3, err, fs$1, name, $s};return $f; - }; - lstatNolog = function(name) { - var {_r$3, err, fs$1, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fs$1 = [fs$1]; - name = [name]; - fs$1[0] = new fileStat.ptr("", new $Int64(0, 0), 0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil), new syscall.Stat_t.ptr(new $Int64(0, 0), new $Uint64(0, 0), 0, 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), 0, 0, new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0))); - _r$3 = ignoringEINTR((function(fs$1, name) { return function $b() { - var {$24r, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = syscall.Lstat(name[0], fs$1[0].sys); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$3, $s};return $f; - }; })(fs$1, name)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new fs.PathError.ptr("lstat", name[0], err)]; - } - fillFileStatFromSys(fs$1[0], name[0]); - $s = -1; return [fs$1[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: lstatNolog, $c: true, $r, _r$3, err, fs$1, name, $s};return $f; - }; - fillFileStatFromSys = function(fs$1, name) { - var _1, fs$1, name; - fs$1.name = basename(name); - fs$1.size = fs$1.sys.Size; - time.Time.copy(fs$1.modTime, timespecToTime(fs$1.sys.Mtime, fs$1.sys.MtimeNsec)); - fs$1.mode = ((((fs$1.sys.Mode & 511) >>> 0) >>> 0)); - _1 = (fs$1.sys.Mode & 126976) >>> 0; - if (_1 === (24576)) { - fs$1.mode = (fs$1.mode | (67108864)) >>> 0; - } else if (_1 === (8192)) { - fs$1.mode = (fs$1.mode | (69206016)) >>> 0; - } else if (_1 === (16384)) { - fs$1.mode = (fs$1.mode | (2147483648)) >>> 0; - } else if (_1 === (4096)) { - fs$1.mode = (fs$1.mode | (33554432)) >>> 0; - } else if (_1 === (40960)) { - fs$1.mode = (fs$1.mode | (134217728)) >>> 0; - } else if (_1 === (32768)) { - } else if (_1 === (49152)) { - fs$1.mode = (fs$1.mode | (16777216)) >>> 0; - } - if (!((((fs$1.sys.Mode & 1024) >>> 0) === 0))) { - fs$1.mode = (fs$1.mode | (4194304)) >>> 0; - } - if (!((((fs$1.sys.Mode & 2048) >>> 0) === 0))) { - fs$1.mode = (fs$1.mode | (8388608)) >>> 0; - } - if (!((((fs$1.sys.Mode & 512) >>> 0) === 0))) { - fs$1.mode = (fs$1.mode | (1048576)) >>> 0; - } - }; - timespecToTime = function(sec, nsec) { - var nsec, sec; - return time.Unix(sec, nsec); - }; - Stat = function(name) { - var {$24r, _r$3, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = testlog.Stat(name); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = statNolog(name); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Stat, $c: true, $r, $24r, _r$3, name, $s};return $f; - }; - $pkg.Stat = Stat; - Lstat = function(name) { - var {$24r, _r$3, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = testlog.Stat(name); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = lstatNolog(name); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Lstat, $c: true, $r, $24r, _r$3, name, $s};return $f; - }; - $pkg.Lstat = Lstat; - File.ptr.prototype.readFrom = function(r) { - var _tmp, _tmp$1, _tmp$2, err, f, handled, n, r; - n = new $Int64(0, 0); - handled = false; - err = $ifaceNil; - f = this; - _tmp = new $Int64(0, 0); - _tmp$1 = false; - _tmp$2 = $ifaceNil; - n = _tmp; - handled = _tmp$1; - err = _tmp$2; - return [n, handled, err]; - }; - File.prototype.readFrom = function(r) { return this.$val.readFrom(r); }; - rawConn.ptr.prototype.Control = function(f) { - var {_r$3, c, err, err$1, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - err = c.file.checkValid("SyscallConn.Control"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = c.file.file.pfd.RawControl(f); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - runtime.KeepAlive(c.file); - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: rawConn.ptr.prototype.Control, $c: true, $r, _r$3, c, err, err$1, f, $s};return $f; - }; - rawConn.prototype.Control = function(f) { return this.$val.Control(f); }; - rawConn.ptr.prototype.Read = function(f) { - var {_r$3, c, err, err$1, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - err = c.file.checkValid("SyscallConn.Read"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = c.file.file.pfd.RawRead(f); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - runtime.KeepAlive(c.file); - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: rawConn.ptr.prototype.Read, $c: true, $r, _r$3, c, err, err$1, f, $s};return $f; - }; - rawConn.prototype.Read = function(f) { return this.$val.Read(f); }; - rawConn.ptr.prototype.Write = function(f) { - var {_r$3, c, err, err$1, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - err = c.file.checkValid("SyscallConn.Write"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = c.file.file.pfd.RawWrite(f); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - runtime.KeepAlive(c.file); - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: rawConn.ptr.prototype.Write, $c: true, $r, _r$3, c, err, err$1, f, $s};return $f; - }; - rawConn.prototype.Write = function(f) { return this.$val.Write(f); }; - newRawConn = function(file$1) { - var file$1; - return [new rawConn.ptr(file$1), $ifaceNil]; - }; - init = function() { - if (false) { - return; - } - $pkg.Args = runtime_args(); - }; - Exit = function(code) { - var {_r$3, code, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (code === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (code === 0) { */ case 1: - _r$3 = testlog.PanicOnExit0(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$3) { */ case 3: - $panic(new $String("unexpected call to os.Exit(0) during test")); - /* } */ case 4: - runtime_beforeExit(); - /* } */ case 2: - $r = syscall.Exit(code); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Exit, $c: true, $r, _r$3, code, $s};return $f; - }; - $pkg.Exit = Exit; - IsPathSeparator = function(c) { - var c; - return 47 === c; - }; - $pkg.IsPathSeparator = IsPathSeparator; - basename = function(name) { - var i, name; - i = name.length - 1 >> 0; - while (true) { - if (!(i > 0 && (name.charCodeAt(i) === 47))) { break; } - name = $substring(name, 0, i); - i = i - (1) >> 0; - } - i = i - (1) >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (name.charCodeAt(i) === 47) { - name = $substring(name, (i + 1 >> 0)); - break; - } - i = i - (1) >> 0; - } - return name; - }; - fixLongPath = function(path) { - var path; - return path; - }; - File.ptr.prototype.Fd = function() { - var {_r$3, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (f === ptrType$2.nil) { - $s = -1; return 4294967295; - } - /* */ if (f.file.nonblock) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.file.nonblock) { */ case 1: - _r$3 = f.file.pfd.SetBlocking(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 2: - $s = -1; return ((f.file.pfd.Sysfd >>> 0)); - /* */ } return; } var $f = {$blk: File.ptr.prototype.Fd, $c: true, $r, _r$3, f, $s};return $f; - }; - File.prototype.Fd = function() { return this.$val.Fd(); }; - NewFile = function(fd, name) { - var {$24r, _r$3, _tuple, err, fd, kind, name, nb, $s, $r, $c} = $restore(this, {fd, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - kind = 0; - _tuple = unix.IsNonblock(((fd >> 0))); - nb = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil) && nb) { - kind = 3; - } - _r$3 = newFile(fd, name, kind); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewFile, $c: true, $r, $24r, _r$3, _tuple, err, fd, kind, name, nb, $s};return $f; - }; - $pkg.NewFile = NewFile; - newFile = function(fd, name, kind) { - var {_1, _r$3, err, err$1, err$2, f, fd, fdi, kind, name, pollable, st, typ, $s, $r, $c} = $restore(this, {fd, name, kind}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fdi = [fdi]; - st = [st]; - fdi[0] = ((fd >> 0)); - if (fdi[0] < 0) { - $s = -1; return ptrType$2.nil; - } - f = new File.ptr(new file.ptr(new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), fdi[0], new poll.pollDesc.ptr(ptrType$6.nil, false), ptrType$7.nil, 0, 0, true, true, false), name, ptrType$8.nil, false, (fdi[0] === 1) || (fdi[0] === 2), false)); - pollable = (kind === 1) || (kind === 2) || (kind === 3); - /* */ if (kind === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (kind === 1) { */ case 1: - _1 = "js"; - /* */ if (_1 === ("darwin") || _1 === ("ios") || _1 === ("dragonfly") || _1 === ("freebsd") || _1 === ("netbsd") || _1 === ("openbsd")) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === ("darwin") || _1 === ("ios") || _1 === ("dragonfly") || _1 === ("freebsd") || _1 === ("netbsd") || _1 === ("openbsd")) { */ case 4: - st[0] = new syscall.Stat_t.ptr(new $Int64(0, 0), new $Uint64(0, 0), 0, 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), 0, 0, new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0), new $Int64(0, 0)); - _r$3 = ignoringEINTR((function(fdi, st) { return function $b() { - var {$24r, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = syscall.Fstat(fdi[0], st[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$3, $s};return $f; - }; })(fdi, st)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - typ = (st[0].Mode & 126976) >>> 0; - if ($interfaceIsEqual(err, $ifaceNil) && ((typ === 32768) || (typ === 16384))) { - pollable = false; - } - if (false && (typ === 4096)) { - pollable = false; - } - /* } */ case 5: - case 3: - /* } */ case 2: - err$1 = f.file.pfd.Init("file", pollable); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - } else if (pollable) { - err$2 = syscall.SetNonblock(fdi[0], true); - if ($interfaceIsEqual(err$2, $ifaceNil)) { - f.file.nonblock = true; - } - } - runtime.SetFinalizer(f.file, new funcType($methodExpr(ptrType$9, "close"))); - $s = -1; return f; - /* */ } return; } var $f = {$blk: newFile, $c: true, $r, _1, _r$3, err, err$1, err$2, f, fd, fdi, kind, name, pollable, st, typ, $s};return $f; - }; - epipecheck = function(file$1, e) { - var {e, file$1, $s, $r, $c} = $restore(this, {file$1, e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($interfaceIsEqual(e, new syscall.Errno(32)) && file$1.file.stdoutOrErr) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(e, new syscall.Errno(32)) && file$1.file.stdoutOrErr) { */ case 1: - $r = sigpipe(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: epipecheck, $c: true, $r, e, file$1, $s};return $f; - }; - openFileNolog = function(name, flag, perm) { - var {$24r, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, e, err, flag, name, perm, r, setSticky, $s, $r, $c} = $restore(this, {name, flag, perm}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - setSticky = false; - /* */ if (true && !(((flag & 64) === 0)) && !((((perm & 1048576) >>> 0) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true && !(((flag & 64) === 0)) && !((((perm & 1048576) >>> 0) === 0))) { */ case 1: - _r$3 = Stat(name); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - err = _tuple[1]; - if (IsNotExist(err)) { - setSticky = true; - } - /* } */ case 2: - r = 0; - /* while (true) { */ case 4: - e = $ifaceNil; - _r$4 = syscall.Open(name, flag | 0, syscallMode(perm)); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - r = _tuple$1[0]; - e = _tuple$1[1]; - if ($interfaceIsEqual(e, $ifaceNil)) { - /* break; */ $s = 5; continue; - } - if ($interfaceIsEqual(e, new syscall.Errno(4))) { - /* continue; */ $s = 4; continue; - } - $s = -1; return [ptrType$2.nil, new fs.PathError.ptr("open", name, e)]; - case 5: - /* */ if (setSticky) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (setSticky) { */ case 7: - _r$5 = setStickyBit(name); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 8: - if (true) { - syscall.CloseOnExec(r); - } - _r$6 = newFile(((r >>> 0)), name, 1); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = [_r$6, $ifaceNil]; - $s = 11; case 11: return $24r; - /* */ } return; } var $f = {$blk: openFileNolog, $c: true, $r, $24r, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, e, err, flag, name, perm, r, setSticky, $s};return $f; - }; - file.ptr.prototype.close = function() { - var {_r$3, e, err, file$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - file$1 = this; - if (file$1 === ptrType$9.nil) { - $s = -1; return new syscall.Errno(22); - } - if (!(file$1.dirinfo === ptrType$8.nil)) { - file$1.dirinfo.close(); - file$1.dirinfo = ptrType$8.nil; - } - err = $ifaceNil; - _r$3 = file$1.pfd.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - if ($interfaceIsEqual(e, poll.ErrFileClosing)) { - e = $pkg.ErrClosed; - } - err = new fs.PathError.ptr("close", file$1.name, e); - } - runtime.SetFinalizer(file$1, $ifaceNil); - $s = -1; return err; - /* */ } return; } var $f = {$blk: file.ptr.prototype.close, $c: true, $r, _r$3, e, err, file$1, $s};return $f; - }; - file.prototype.close = function() { return this.$val.close(); }; - File.ptr.prototype.seek = function(offset, whence) { - var {_r$3, _tmp, _tmp$1, _tuple, err, f, offset, ret, whence, $s, $r, $c} = $restore(this, {offset, whence}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = new $Int64(0, 0); - err = $ifaceNil; - f = this; - if (!(f.file.dirinfo === ptrType$8.nil)) { - f.file.dirinfo.close(); - f.file.dirinfo = ptrType$8.nil; - } - _r$3 = f.file.pfd.Seek(offset, whence); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - ret = _tuple[0]; - err = _tuple[1]; - runtime.KeepAlive(f); - _tmp = ret; - _tmp$1 = err; - ret = _tmp; - err = _tmp$1; - $s = -1; return [ret, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.seek, $c: true, $r, _r$3, _tmp, _tmp$1, _tuple, err, f, offset, ret, whence, $s};return $f; - }; - File.prototype.seek = function(offset, whence) { return this.$val.seek(offset, whence); }; - Remove = function(name) { - var {_r$3, _r$4, e, e1, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = [name]; - _r$3 = ignoringEINTR((function(name) { return function $b() { - var {$24r, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = syscall.Unlink(name[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$3, $s};return $f; - }; })(name)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if ($interfaceIsEqual(e, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$4 = ignoringEINTR((function(name) { return function $b() { - var {$24r, _r$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$4 = syscall.Rmdir(name[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$4, $s};return $f; - }; })(name)); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - e1 = _r$4; - if ($interfaceIsEqual(e1, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - if (!($interfaceIsEqual(e1, new syscall.Errno(20)))) { - e = e1; - } - $s = -1; return new fs.PathError.ptr("remove", name[0], e); - /* */ } return; } var $f = {$blk: Remove, $c: true, $r, _r$3, _r$4, e, e1, name, $s};return $f; - }; - $pkg.Remove = Remove; - tempDir = function() { - var {_r$3, dir, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = Getenv("TMPDIR"); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - dir = _r$3; - if (dir === "") { - if (false) { - dir = "/data/local/tmp"; - } else { - dir = "/tmp"; - } - } - $s = -1; return dir; - /* */ } return; } var $f = {$blk: tempDir, $c: true, $r, _r$3, dir, $s};return $f; - }; - Readlink = function(name) { - var {_r$3, _r$4, _tuple, _tuple$1, b, e, len, n, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - len = 128; - /* while (true) { */ case 1: - b = $makeSlice(sliceType$2, len); - n = 0; - e = $ifaceNil; - /* while (true) { */ case 3: - _r$3 = syscall.Readlink(name, b); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - _r$4 = fixCount(_tuple$1[0], _tuple$1[1]); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - n = _tuple[0]; - e = _tuple[1]; - if (!($interfaceIsEqual(e, new syscall.Errno(4)))) { - /* break; */ $s = 4; continue; - } - $s = 3; continue; - case 4: - if (false && $interfaceIsEqual(e, new syscall.Errno(34))) { - len = $imul(len, (2)); - /* continue; */ $s = 1; continue; - } - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return ["", new fs.PathError.ptr("readlink", name, e)]; - } - if (n < len) { - $s = -1; return [($bytesToString($subslice(b, 0, n))), $ifaceNil]; - } - len = $imul(len, (2)); - $s = 1; continue; - case 2: - $s = -1; return ["", $ifaceNil]; - /* */ } return; } var $f = {$blk: Readlink, $c: true, $r, _r$3, _r$4, _tuple, _tuple$1, b, e, len, n, name, $s};return $f; - }; - $pkg.Readlink = Readlink; - unixDirent.ptr.prototype.Name = function() { - var d; - d = this; - return d.name; - }; - unixDirent.prototype.Name = function() { return this.$val.Name(); }; - unixDirent.ptr.prototype.IsDir = function() { - var d; - d = this; - return new fs.FileMode(d.typ).IsDir(); - }; - unixDirent.prototype.IsDir = function() { return this.$val.IsDir(); }; - unixDirent.ptr.prototype.Type = function() { - var d; - d = this; - return d.typ; - }; - unixDirent.prototype.Type = function() { return this.$val.Type(); }; - unixDirent.ptr.prototype.Info = function() { - var {$24r, _r$3, d, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (!($interfaceIsEqual(d.info, $ifaceNil))) { - $s = -1; return [d.info, $ifaceNil]; - } - _r$3 = lstat(d.parent + "/" + d.name); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: unixDirent.ptr.prototype.Info, $c: true, $r, $24r, _r$3, d, $s};return $f; - }; - unixDirent.prototype.Info = function() { return this.$val.Info(); }; - newUnixDirent = function(parent, name, typ) { - var {_r$3, _r$4, _r$5, _tuple, err, info, name, parent, typ, ude, $s, $r, $c} = $restore(this, {parent, name, typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ude = new unixDirent.ptr(parent, name, typ, $ifaceNil); - if (!((typ === 4294967295)) && !testingForceReadDirLstat) { - $s = -1; return [ude, $ifaceNil]; - } - _r$3 = lstat(parent + "/" + name); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - info = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - _r$4 = info.Mode(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = new fs.FileMode(_r$4).Type(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ude.typ = _r$5; - ude.info = info; - $s = -1; return [ude, $ifaceNil]; - /* */ } return; } var $f = {$blk: newUnixDirent, $c: true, $r, _r$3, _r$4, _r$5, _tuple, err, info, name, parent, typ, ude, $s};return $f; - }; - sigpipe = function() { - $throwRuntimeError("native function not implemented: os.sigpipe"); - }; - File.ptr.prototype.Close = function() { - var {$24r, _r$3, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (f === ptrType$2.nil) { - $s = -1; return $pkg.ErrInvalid; - } - _r$3 = f.file.close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Close, $c: true, $r, $24r, _r$3, f, $s};return $f; - }; - File.prototype.Close = function() { return this.$val.Close(); }; - File.ptr.prototype.read = function(b) { - var {_r$3, _tmp, _tmp$1, _tuple, b, err, f, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - _r$3 = f.file.pfd.Read(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - err = _tuple[1]; - runtime.KeepAlive(f); - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.read, $c: true, $r, _r$3, _tmp, _tmp$1, _tuple, b, err, f, n, $s};return $f; - }; - File.prototype.read = function(b) { return this.$val.read(b); }; - File.ptr.prototype.pread = function(b, off) { - var {_r$3, _tmp, _tmp$1, _tuple, b, err, f, n, off, $s, $r, $c} = $restore(this, {b, off}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - _r$3 = f.file.pfd.Pread(b, off); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - err = _tuple[1]; - runtime.KeepAlive(f); - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.pread, $c: true, $r, _r$3, _tmp, _tmp$1, _tuple, b, err, f, n, off, $s};return $f; - }; - File.prototype.pread = function(b, off) { return this.$val.pread(b, off); }; - File.ptr.prototype.write = function(b) { - var {_r$3, _tmp, _tmp$1, _tuple, b, err, f, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - _r$3 = f.file.pfd.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - err = _tuple[1]; - runtime.KeepAlive(f); - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.write, $c: true, $r, _r$3, _tmp, _tmp$1, _tuple, b, err, f, n, $s};return $f; - }; - File.prototype.write = function(b) { return this.$val.write(b); }; - File.ptr.prototype.pwrite = function(b, off) { - var {_r$3, _tmp, _tmp$1, _tuple, b, err, f, n, off, $s, $r, $c} = $restore(this, {b, off}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - _r$3 = f.file.pfd.Pwrite(b, off); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - err = _tuple[1]; - runtime.KeepAlive(f); - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.pwrite, $c: true, $r, _r$3, _tmp, _tmp$1, _tuple, b, err, f, n, off, $s};return $f; - }; - File.prototype.pwrite = function(b, off) { return this.$val.pwrite(b, off); }; - syscallMode = function(i) { - var i, o; - o = 0; - o = (o | (((new fs.FileMode(i).Perm() >>> 0)))) >>> 0; - if (!((((i & 8388608) >>> 0) === 0))) { - o = (o | (2048)) >>> 0; - } - if (!((((i & 4194304) >>> 0) === 0))) { - o = (o | (1024)) >>> 0; - } - if (!((((i & 1048576) >>> 0) === 0))) { - o = (o | (512)) >>> 0; - } - return o; - }; - chmod = function(name, mode) { - var {_r$3, e, longName, mode, name, $s, $r, $c} = $restore(this, {name, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - longName = [longName]; - mode = [mode]; - longName[0] = fixLongPath(name); - _r$3 = ignoringEINTR((function(longName, mode) { return function $b() { - var {$24r, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = syscall.Chmod(longName[0], syscallMode(mode[0])); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$3, $s};return $f; - }; })(longName, mode)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return new fs.PathError.ptr("chmod", name, e); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: chmod, $c: true, $r, _r$3, e, longName, mode, name, $s};return $f; - }; - File.ptr.prototype.chmod = function(mode) { - var {_r$3, e, err, f, mode, $s, $r, $c} = $restore(this, {mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("chmod"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.Fchmod(syscallMode(mode)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return f.wrapErr("chmod", e); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: File.ptr.prototype.chmod, $c: true, $r, _r$3, e, err, f, mode, $s};return $f; - }; - File.prototype.chmod = function(mode) { return this.$val.chmod(mode); }; - File.ptr.prototype.Chown = function(uid, gid) { - var {_r$3, e, err, f, gid, uid, $s, $r, $c} = $restore(this, {uid, gid}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("chown"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.Fchown(uid, gid); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return f.wrapErr("chown", e); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Chown, $c: true, $r, _r$3, e, err, f, gid, uid, $s};return $f; - }; - File.prototype.Chown = function(uid, gid) { return this.$val.Chown(uid, gid); }; - File.ptr.prototype.Truncate = function(size) { - var {_r$3, e, err, f, size, $s, $r, $c} = $restore(this, {size}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("truncate"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.Ftruncate(size); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return f.wrapErr("truncate", e); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Truncate, $c: true, $r, _r$3, e, err, f, size, $s};return $f; - }; - File.prototype.Truncate = function(size) { return this.$val.Truncate(size); }; - File.ptr.prototype.Sync = function() { - var {_r$3, e, err, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("sync"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.Fsync(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return f.wrapErr("sync", e); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Sync, $c: true, $r, _r$3, e, err, f, $s};return $f; - }; - File.prototype.Sync = function() { return this.$val.Sync(); }; - File.ptr.prototype.Chdir = function() { - var {_r$3, e, err, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("chdir"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.Fchdir(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - if (!($interfaceIsEqual(e, $ifaceNil))) { - $s = -1; return f.wrapErr("chdir", e); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Chdir, $c: true, $r, _r$3, e, err, f, $s};return $f; - }; - File.prototype.Chdir = function() { return this.$val.Chdir(); }; - File.ptr.prototype.setDeadline = function(t) { - var {$24r, _r$3, err, f, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("SetDeadline"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.SetDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.setDeadline, $c: true, $r, $24r, _r$3, err, f, t, $s};return $f; - }; - File.prototype.setDeadline = function(t) { return this.$val.setDeadline(t); }; - File.ptr.prototype.setReadDeadline = function(t) { - var {$24r, _r$3, err, f, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("SetReadDeadline"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.SetReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.setReadDeadline, $c: true, $r, $24r, _r$3, err, f, t, $s};return $f; - }; - File.prototype.setReadDeadline = function(t) { return this.$val.setReadDeadline(t); }; - File.ptr.prototype.setWriteDeadline = function(t) { - var {$24r, _r$3, err, f, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = f.checkValid("SetWriteDeadline"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = f.file.pfd.SetWriteDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.setWriteDeadline, $c: true, $r, $24r, _r$3, err, f, t, $s};return $f; - }; - File.prototype.setWriteDeadline = function(t) { return this.$val.setWriteDeadline(t); }; - File.ptr.prototype.checkValid = function(op) { - var f, op; - f = this; - if (f === ptrType$2.nil) { - return $pkg.ErrInvalid; - } - return $ifaceNil; - }; - File.prototype.checkValid = function(op) { return this.$val.checkValid(op); }; - ignoringEINTR = function(fn) { - var {_r$3, err, fn, $s, $r, $c} = $restore(this, {fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - _r$3 = fn(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, new syscall.Errno(4)))) { - $s = -1; return err; - } - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ignoringEINTR, $c: true, $r, _r$3, err, fn, $s};return $f; - }; - File.ptr.prototype.Name = function() { - var f; - f = this; - return f.file.name; - }; - File.prototype.Name = function() { return this.$val.Name(); }; - LinkError.ptr.prototype.Error = function() { - var {$24r, _r$3, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$3 = e.Err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = e.Op + " " + e.Old + " " + e.New + ": " + _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: LinkError.ptr.prototype.Error, $c: true, $r, $24r, _r$3, e, $s};return $f; - }; - LinkError.prototype.Error = function() { return this.$val.Error(); }; - LinkError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - LinkError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - File.ptr.prototype.Read = function(b) { - var {_r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, err$1, f, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - err$1 = f.checkValid("read"); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$3 = f.read(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - e = _tuple[1]; - _tmp$2 = n; - _tmp$3 = f.wrapErr("read", e); - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Read, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, err$1, f, n, $s};return $f; - }; - File.prototype.Read = function(b) { return this.$val.Read(b); }; - File.ptr.prototype.ReadAt = function(b, off) { - var {_r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, err$1, f, m, n, off, x, $s, $r, $c} = $restore(this, {b, off}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - err$1 = f.checkValid("read"); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) { - _tmp$2 = 0; - _tmp$3 = new fs.PathError.ptr("readat", f.file.name, errors.New("negative offset")); - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _r$3 = f.pread(b, off); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - m = _tuple[0]; - e = _tuple[1]; - if (!($interfaceIsEqual(e, $ifaceNil))) { - err = f.wrapErr("read", e); - /* break; */ $s = 2; continue; - } - n = n + (m) >> 0; - b = $subslice(b, m); - off = (x = (new $Int64(0, m)), new $Int64(off.$high + x.$high, off.$low + x.$low)); - $s = 1; continue; - case 2: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.ReadAt, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, err$1, f, m, n, off, x, $s};return $f; - }; - File.prototype.ReadAt = function(b, off) { return this.$val.ReadAt(b, off); }; - File.ptr.prototype.ReadFrom = function(r) { - var {$24r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, e, err, err$1, f, handled, n, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - f = this; - err$1 = f.checkValid("write"); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = new $Int64(0, 0); - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _tuple = f.readFrom(r); - n = _tuple[0]; - handled = _tuple[1]; - e = _tuple[2]; - /* */ if (!handled) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!handled) { */ case 1: - _r$3 = genericReadFrom(f, r); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _tmp$2 = n; - _tmp$3 = f.wrapErr("write", e); - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.ReadFrom, $c: true, $r, $24r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, e, err, err$1, f, handled, n, r, $s};return $f; - }; - File.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; - genericReadFrom = function(f, r) { - var {$24r, _r$3, f, r, x, $s, $r, $c} = $restore(this, {f, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = io.Copy((x = new onlyWriter.ptr(f), new x.constructor.elem(x)), r); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: genericReadFrom, $c: true, $r, $24r, _r$3, f, r, x, $s};return $f; - }; - File.ptr.prototype.Write = function(b) { - var {_r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, err$1, f, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - err$1 = f.checkValid("write"); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$3 = f.write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - e = _tuple[1]; - if (n < 0) { - n = 0; - } - if (!((n === b.$length))) { - err = io.ErrShortWrite; - } - $r = epipecheck(f, e); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(e, $ifaceNil))) { - err = f.wrapErr("write", e); - } - _tmp$2 = n; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Write, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, b, e, err, err$1, f, n, $s};return $f; - }; - File.prototype.Write = function(b) { return this.$val.Write(b); }; - File.ptr.prototype.WriteAt = function(b, off) { - var {_r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err, err$1, f, m, n, off, x, $s, $r, $c} = $restore(this, {b, off}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - err$1 = f.checkValid("write"); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - if (f.file.appendMode) { - _tmp$2 = 0; - _tmp$3 = errWriteAtInAppendMode; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - if ((off.$high < 0 || (off.$high === 0 && off.$low < 0))) { - _tmp$4 = 0; - _tmp$5 = new fs.PathError.ptr("writeat", f.file.name, errors.New("negative offset")); - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _r$3 = f.pwrite(b, off); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - m = _tuple[0]; - e = _tuple[1]; - if (!($interfaceIsEqual(e, $ifaceNil))) { - err = f.wrapErr("write", e); - /* break; */ $s = 2; continue; - } - n = n + (m) >> 0; - b = $subslice(b, m); - off = (x = (new $Int64(0, m)), new $Int64(off.$high + x.$high, off.$low + x.$low)); - $s = 1; continue; - case 2: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.WriteAt, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, e, err, err$1, f, m, n, off, x, $s};return $f; - }; - File.prototype.WriteAt = function(b, off) { return this.$val.WriteAt(b, off); }; - File.ptr.prototype.Seek = function(offset, whence) { - var {_r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e, err, err$1, f, offset, r, ret, whence, $s, $r, $c} = $restore(this, {offset, whence}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = new $Int64(0, 0); - err = $ifaceNil; - f = this; - err$1 = f.checkValid("seek"); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = new $Int64(0, 0); - _tmp$1 = err$1; - ret = _tmp; - err = _tmp$1; - $s = -1; return [ret, err]; - } - _r$3 = f.seek(offset, whence); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - r = _tuple[0]; - e = _tuple[1]; - if ($interfaceIsEqual(e, $ifaceNil) && !(f.file.dirinfo === ptrType$8.nil) && !((r.$high === 0 && r.$low === 0))) { - e = new syscall.Errno(21); - } - if (!($interfaceIsEqual(e, $ifaceNil))) { - _tmp$2 = new $Int64(0, 0); - _tmp$3 = f.wrapErr("seek", e); - ret = _tmp$2; - err = _tmp$3; - $s = -1; return [ret, err]; - } - _tmp$4 = r; - _tmp$5 = $ifaceNil; - ret = _tmp$4; - err = _tmp$5; - $s = -1; return [ret, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Seek, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e, err, err$1, f, offset, r, ret, whence, $s};return $f; - }; - File.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; - setStickyBit = function(name) { - var {$24r, _arg, _arg$1, _r$3, _r$4, _r$5, _tuple, err, fi, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = Stat(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - fi = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _arg = name; - _r$4 = fi.Mode(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = (_r$4 | 1048576) >>> 0; - _r$5 = Chmod(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: setStickyBit, $c: true, $r, $24r, _arg, _arg$1, _r$3, _r$4, _r$5, _tuple, err, fi, name, $s};return $f; - }; - Open = function(name) { - var {$24r, _r$3, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = OpenFile(name, 0, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Open, $c: true, $r, $24r, _r$3, name, $s};return $f; - }; - $pkg.Open = Open; - OpenFile = function(name, flag, perm) { - var {_r$3, _tuple, err, f, flag, name, perm, $s, $r, $c} = $restore(this, {name, flag, perm}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = testlog.Open(name); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = openFileNolog(name, flag, perm); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, err]; - } - f.file.appendMode = !(((flag & 1024) === 0)); - $s = -1; return [f, $ifaceNil]; - /* */ } return; } var $f = {$blk: OpenFile, $c: true, $r, _r$3, _tuple, err, f, flag, name, perm, $s};return $f; - }; - $pkg.OpenFile = OpenFile; - fixCount = function(n, err) { - var err, n; - if (n < 0) { - n = 0; - } - return [n, err]; - }; - File.ptr.prototype.wrapErr = function(op, err) { - var err, f, op; - f = this; - if ($interfaceIsEqual(err, $ifaceNil) || $interfaceIsEqual(err, io.EOF)) { - return err; - } - if ($interfaceIsEqual(err, poll.ErrFileClosing)) { - err = $pkg.ErrClosed; - } - return new fs.PathError.ptr(op, f.file.name, err); - }; - File.prototype.wrapErr = function(op, err) { return this.$val.wrapErr(op, err); }; - TempDir = function() { - var {$24r, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = tempDir(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: TempDir, $c: true, $r, $24r, _r$3, $s};return $f; - }; - $pkg.TempDir = TempDir; - Chmod = function(name, mode) { - var {$24r, _r$3, mode, name, $s, $r, $c} = $restore(this, {name, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = chmod(name, mode); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Chmod, $c: true, $r, $24r, _r$3, mode, name, $s};return $f; - }; - $pkg.Chmod = Chmod; - File.ptr.prototype.Chmod = function(mode) { - var {$24r, _r$3, f, mode, $s, $r, $c} = $restore(this, {mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$3 = f.chmod(mode); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Chmod, $c: true, $r, $24r, _r$3, f, mode, $s};return $f; - }; - File.prototype.Chmod = function(mode) { return this.$val.Chmod(mode); }; - File.ptr.prototype.SetDeadline = function(t) { - var {$24r, _r$3, f, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$3 = f.setDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.SetDeadline, $c: true, $r, $24r, _r$3, f, t, $s};return $f; - }; - File.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - File.ptr.prototype.SetReadDeadline = function(t) { - var {$24r, _r$3, f, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$3 = f.setReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.SetReadDeadline, $c: true, $r, $24r, _r$3, f, t, $s};return $f; - }; - File.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; - File.ptr.prototype.SetWriteDeadline = function(t) { - var {$24r, _r$3, f, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$3 = f.setWriteDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.SetWriteDeadline, $c: true, $r, $24r, _r$3, f, t, $s};return $f; - }; - File.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; - File.ptr.prototype.SyscallConn = function() { - var _returncast, err, f; - f = this; - err = f.checkValid("SyscallConn"); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [$ifaceNil, err]; - } - _returncast = newRawConn(f); - return [_returncast[0], _returncast[1]]; - }; - File.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - ReadFile = function(name) { - var {$24r, $24r$1, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, d, data, err, err$1, err$2, f, info, n, name, size, size64, x, $s, $deferred, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r$3 = Open(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - f = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [sliceType$2.nil, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(f, "Close"), []]); - size = 0; - _r$4 = f.Stat(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - info = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 6: - _r$5 = info.Size(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - size64 = _r$5; - if ((x = (new $Int64(0, (((size64.$low + ((size64.$high >> 31) * 4294967296)) >> 0)))), (x.$high === size64.$high && x.$low === size64.$low))) { - size = (((size64.$low + ((size64.$high >> 31) * 4294967296)) >> 0)); - } - /* } */ case 7: - size = size + (1) >> 0; - if (size < 512) { - size = 512; - } - data = $makeSlice(sliceType$2, 0, size); - /* while (true) { */ case 9: - if (data.$length >= data.$capacity) { - d = $append($subslice(data, 0, data.$capacity), 0); - data = $subslice(d, 0, data.$length); - } - _r$6 = f.Read($subslice(data, data.$length, data.$capacity)); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - n = _tuple$2[0]; - err$2 = _tuple$2[1]; - data = $subslice(data, 0, (data.$length + n >> 0)); - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 12: - if ($interfaceIsEqual(err$2, io.EOF)) { - err$2 = $ifaceNil; - } - $24r$1 = [data, err$2]; - $s = 14; case 14: return $24r$1; - /* } */ case 13: - $s = 9; continue; - case 10: - $s = -1; return [sliceType$2.nil, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [sliceType$2.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ReadFile, $c: true, $r, $24r, $24r$1, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, d, data, err, err$1, err$2, f, info, n, name, size, size64, x, $s, $deferred};return $f; } } - }; - $pkg.ReadFile = ReadFile; - Executable = function() { - return executable(); - }; - $pkg.Executable = Executable; - errNoDeadline = function() { - return poll.ErrNoDeadline; - }; - errDeadlineExceeded = function() { - return poll.ErrDeadlineExceeded; - }; - SyscallError.ptr.prototype.Error = function() { - var {$24r, _r$3, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$3 = e.Err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = e.Syscall + ": " + _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: SyscallError.ptr.prototype.Error, $c: true, $r, $24r, _r$3, e, $s};return $f; - }; - SyscallError.prototype.Error = function() { return this.$val.Error(); }; - SyscallError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - SyscallError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - SyscallError.ptr.prototype.Timeout = function() { - var {$24r, _r$3, _tuple, _v, e, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _tuple = $assertType(e.Err, timeout, true); - t = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 1; continue s; } - _r$3 = t.Timeout(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: SyscallError.ptr.prototype.Timeout, $c: true, $r, $24r, _r$3, _tuple, _v, e, ok, t, $s};return $f; - }; - SyscallError.prototype.Timeout = function() { return this.$val.Timeout(); }; - IsExist = function(err) { - var err; - return underlyingErrorIs(err, $pkg.ErrExist); - }; - $pkg.IsExist = IsExist; - IsNotExist = function(err) { - var err; - return underlyingErrorIs(err, $pkg.ErrNotExist); - }; - $pkg.IsNotExist = IsNotExist; - underlyingErrorIs = function(err, target) { - var _tuple, e, err, ok, target; - err = underlyingError(err); - if ($interfaceIsEqual(err, target)) { - return true; - } - _tuple = $assertType(err, syscall.Errno, true); - e = _tuple[0]; - ok = _tuple[1]; - return ok && new syscall.Errno(e).Is(target); - }; - underlyingError = function(err) { - var _ref, err, err$1, err$2, err$3; - _ref = err; - if ($assertType(_ref, ptrType$5, true)[1]) { - err$1 = _ref.$val; - return err$1.Err; - } else if ($assertType(_ref, ptrType$17, true)[1]) { - err$2 = _ref.$val; - return err$2.Err; - } else if ($assertType(_ref, ptrType$18, true)[1]) { - err$3 = _ref.$val; - return err$3.Err; - } - return err; - }; - Getenv = function(key) { - var {_r$3, _tuple, key, v, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = testlog.Getenv(key); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = syscall.Getenv(key); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - v = _tuple[0]; - $s = -1; return v; - /* */ } return; } var $f = {$blk: Getenv, $c: true, $r, _r$3, _tuple, key, v, $s};return $f; - }; - $pkg.Getenv = Getenv; - direntIno = function(buf) { - var buf; - return [new $Uint64(0, 1), true]; - }; - direntReclen = function(buf) { - var buf; - return readInt(buf, 0, 2); - }; - direntNamlen = function(buf) { - var _tuple, buf, ok, reclen; - _tuple = direntReclen(buf); - reclen = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return [new $Uint64(0, 0), false]; - } - return [new $Uint64(reclen.$high - 0, reclen.$low - 2), true]; - }; - direntType = function(buf) { - var buf; - return 4294967295; - }; - dirInfo.ptr.prototype.close = function() { - var d; - d = this; - if (!(d.buf === ptrType.nil)) { - dirBufPool.Put(d.buf); - d.buf = ptrType.nil; - } - }; - dirInfo.prototype.close = function() { return this.$val.close(); }; - File.ptr.prototype.readdir = function(n, mode) { - var {_i, _r$3, _r$4, _r$5, _r$6, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, buf, c, d, de, dirents, err, err$1, err$2, errno, f, i, info, infos, ino, mode, n, name, names, namlen, ok, rec, reclen, x, x$1, x$2, $s, $r, $c} = $restore(this, {n, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - names = sliceType.nil; - dirents = sliceType$7.nil; - infos = sliceType$8.nil; - err = $ifaceNil; - f = this; - /* */ if (f.file.dirinfo === ptrType$8.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.file.dirinfo === ptrType$8.nil) { */ case 1: - f.file.dirinfo = new dirInfo.ptr(ptrType.nil, 0, 0); - _r$3 = dirBufPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - f.file.dirinfo.buf = $assertType(_r$3, ptrType); - /* } */ case 2: - d = f.file.dirinfo; - if (n === 0) { - n = -1; - } - /* while (true) { */ case 4: - /* if (!(!((n === 0)))) { break; } */ if(!(!((n === 0)))) { $s = 5; continue; } - /* */ if (d.bufp >= d.nbuf) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (d.bufp >= d.nbuf) { */ case 6: - d.bufp = 0; - errno = $ifaceNil; - _r$4 = f.file.pfd.ReadDirent(d.buf.$get()); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - d.nbuf = _tuple[0]; - errno = _tuple[1]; - runtime.KeepAlive(f); - if (!($interfaceIsEqual(errno, $ifaceNil))) { - _tmp = names; - _tmp$1 = dirents; - _tmp$2 = infos; - _tmp$3 = new fs.PathError.ptr("readdirent", f.file.name, errno); - names = _tmp; - dirents = _tmp$1; - infos = _tmp$2; - err = _tmp$3; - $s = -1; return [names, dirents, infos, err]; - } - if (d.nbuf <= 0) { - /* break; */ $s = 5; continue; - } - /* } */ case 7: - buf = $subslice((d.buf.$get()), d.bufp, d.nbuf); - _tuple$1 = direntReclen(buf); - reclen = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok || (x = (new $Uint64(0, buf.$length)), (reclen.$high > x.$high || (reclen.$high === x.$high && reclen.$low > x.$low)))) { - /* break; */ $s = 5; continue; - } - rec = $subslice(buf, 0, $flatten64(reclen)); - d.bufp = d.bufp + (((reclen.$low >> 0))) >> 0; - _tuple$2 = direntIno(rec); - ino = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - /* break; */ $s = 5; continue; - } - if ((ino.$high === 0 && ino.$low === 0)) { - /* continue; */ $s = 4; continue; - } - _tuple$3 = direntNamlen(rec); - namlen = _tuple$3[0]; - ok = _tuple$3[1]; - if (!ok || (x$1 = new $Uint64(0 + namlen.$high, 2 + namlen.$low), x$2 = (new $Uint64(0, rec.$length)), (x$1.$high > x$2.$high || (x$1.$high === x$2.$high && x$1.$low > x$2.$low)))) { - /* break; */ $s = 5; continue; - } - name = $subslice(rec, 2, $flatten64(new $Uint64(0 + namlen.$high, 2 + namlen.$low))); - _ref = name; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (c === 0) { - name = $subslice(name, 0, i); - break; - } - _i++; - } - if (($bytesToString(name)) === "." || ($bytesToString(name)) === "..") { - /* continue; */ $s = 4; continue; - } - if (n > 0) { - n = n - (1) >> 0; - } - /* */ if (mode === 0) { $s = 9; continue; } - /* */ if (mode === 1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (mode === 0) { */ case 9: - names = $append(names, ($bytesToString(name))); - $s = 12; continue; - /* } else if (mode === 1) { */ case 10: - _r$5 = newUnixDirent(f.file.name, ($bytesToString(name)), direntType(rec)); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$4 = _r$5; - de = _tuple$4[0]; - err$1 = _tuple$4[1]; - if (IsNotExist(err$1)) { - /* continue; */ $s = 4; continue; - } - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$4 = sliceType.nil; - _tmp$5 = dirents; - _tmp$6 = sliceType$8.nil; - _tmp$7 = err$1; - names = _tmp$4; - dirents = _tmp$5; - infos = _tmp$6; - err = _tmp$7; - $s = -1; return [names, dirents, infos, err]; - } - dirents = $append(dirents, de); - $s = 12; continue; - /* } else { */ case 11: - _r$6 = lstat(f.file.name + "/" + ($bytesToString(name))); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$5 = _r$6; - info = _tuple$5[0]; - err$2 = _tuple$5[1]; - if (IsNotExist(err$2)) { - /* continue; */ $s = 4; continue; - } - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$8 = sliceType.nil; - _tmp$9 = sliceType$7.nil; - _tmp$10 = infos; - _tmp$11 = err$2; - names = _tmp$8; - dirents = _tmp$9; - infos = _tmp$10; - err = _tmp$11; - $s = -1; return [names, dirents, infos, err]; - } - infos = $append(infos, info); - /* } */ case 12: - $s = 4; continue; - case 5: - if (n > 0 && (((names.$length + dirents.$length >> 0) + infos.$length >> 0) === 0)) { - _tmp$12 = sliceType.nil; - _tmp$13 = sliceType$7.nil; - _tmp$14 = sliceType$8.nil; - _tmp$15 = io.EOF; - names = _tmp$12; - dirents = _tmp$13; - infos = _tmp$14; - err = _tmp$15; - $s = -1; return [names, dirents, infos, err]; - } - _tmp$16 = names; - _tmp$17 = dirents; - _tmp$18 = infos; - _tmp$19 = $ifaceNil; - names = _tmp$16; - dirents = _tmp$17; - infos = _tmp$18; - err = _tmp$19; - $s = -1; return [names, dirents, infos, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.readdir, $c: true, $r, _i, _r$3, _r$4, _r$5, _r$6, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, buf, c, d, de, dirents, err, err$1, err$2, errno, f, i, info, infos, ino, mode, n, name, names, namlen, ok, rec, reclen, x, x$1, x$2, $s};return $f; - }; - File.prototype.readdir = function(n, mode) { return this.$val.readdir(n, mode); }; - readInt = function(b, off, size) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, off, ok, size, u; - u = new $Uint64(0, 0); - ok = false; - if (b.$length < (((off + size >>> 0) >> 0))) { - _tmp = new $Uint64(0, 0); - _tmp$1 = false; - u = _tmp; - ok = _tmp$1; - return [u, ok]; - } - if (false) { - _tmp$2 = readIntBE($subslice(b, off), size); - _tmp$3 = true; - u = _tmp$2; - ok = _tmp$3; - return [u, ok]; - } - _tmp$4 = readIntLE($subslice(b, off), size); - _tmp$5 = true; - u = _tmp$4; - ok = _tmp$5; - return [u, ok]; - }; - readIntBE = function(b, size) { - var _1, b, size, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - _1 = size; - if (_1 === (1)) { - return (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - } else if (_1 === (2)) { - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - return (x = (new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), x$1 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 8), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - } else if (_1 === (4)) { - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - return (x$2 = (x$3 = (x$4 = (new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), x$5 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 8), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0)), x$6 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 16), new $Uint64(x$3.$high | x$6.$high, (x$3.$low | x$6.$low) >>> 0)), x$7 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 24), new $Uint64(x$2.$high | x$7.$high, (x$2.$low | x$7.$low) >>> 0)); - } else if (_1 === (8)) { - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - return (x$8 = (x$9 = (x$10 = (x$11 = (x$12 = (x$13 = (x$14 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$15 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$14.$high | x$15.$high, (x$14.$low | x$15.$low) >>> 0)), x$16 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$13.$high | x$16.$high, (x$13.$low | x$16.$low) >>> 0)), x$17 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$12.$high | x$17.$high, (x$12.$low | x$17.$low) >>> 0)), x$18 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$11.$high | x$18.$high, (x$11.$low | x$18.$low) >>> 0)), x$19 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$10.$high | x$19.$high, (x$10.$low | x$19.$low) >>> 0)), x$20 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$9.$high | x$20.$high, (x$9.$low | x$20.$low) >>> 0)), x$21 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x$8.$high | x$21.$high, (x$8.$low | x$21.$low) >>> 0)); - } else { - $panic(new $String("syscall: readInt with unsupported size")); - } - }; - readIntLE = function(b, size) { - var _1, b, size, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - _1 = size; - if (_1 === (1)) { - return (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - } else if (_1 === (2)) { - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - return (x = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 8), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - } else if (_1 === (4)) { - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - return (x$2 = (x$3 = (x$4 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), x$5 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 8), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0)), x$6 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 16), new $Uint64(x$3.$high | x$6.$high, (x$3.$low | x$6.$low) >>> 0)), x$7 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 24), new $Uint64(x$2.$high | x$7.$high, (x$2.$low | x$7.$low) >>> 0)); - } else if (_1 === (8)) { - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - return (x$8 = (x$9 = (x$10 = (x$11 = (x$12 = (x$13 = (x$14 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), x$15 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 8), new $Uint64(x$14.$high | x$15.$high, (x$14.$low | x$15.$low) >>> 0)), x$16 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 16), new $Uint64(x$13.$high | x$16.$high, (x$13.$low | x$16.$low) >>> 0)), x$17 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 24), new $Uint64(x$12.$high | x$17.$high, (x$12.$low | x$17.$low) >>> 0)), x$18 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 32), new $Uint64(x$11.$high | x$18.$high, (x$11.$low | x$18.$low) >>> 0)), x$19 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 40), new $Uint64(x$10.$high | x$19.$high, (x$10.$low | x$19.$low) >>> 0)), x$20 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 48), new $Uint64(x$9.$high | x$20.$high, (x$9.$low | x$20.$low) >>> 0)), x$21 = $shiftLeft64((new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), 56), new $Uint64(x$8.$high | x$21.$high, (x$8.$low | x$21.$low) >>> 0)); - } else { - $panic(new $String("syscall: readInt with unsupported size")); - } - }; - File.ptr.prototype.Readdir = function(n) { - var {_r$3, _tuple, err, f, infos, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (f === ptrType$2.nil) { - $s = -1; return [sliceType$8.nil, $pkg.ErrInvalid]; - } - _r$3 = f.readdir(n, 2); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - infos = _tuple[2]; - err = _tuple[3]; - if (infos === sliceType$8.nil) { - infos = new sliceType$8([]); - } - $s = -1; return [infos, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Readdir, $c: true, $r, _r$3, _tuple, err, f, infos, n, $s};return $f; - }; - File.prototype.Readdir = function(n) { return this.$val.Readdir(n); }; - File.ptr.prototype.Readdirnames = function(n) { - var {_r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, f, n, names, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - names = sliceType.nil; - err = $ifaceNil; - f = this; - if (f === ptrType$2.nil) { - _tmp = sliceType.nil; - _tmp$1 = $pkg.ErrInvalid; - names = _tmp; - err = _tmp$1; - $s = -1; return [names, err]; - } - _r$3 = f.readdir(n, 0); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - names = _tuple[0]; - err = _tuple[3]; - if (names === sliceType.nil) { - names = new sliceType([]); - } - _tmp$2 = names; - _tmp$3 = err; - names = _tmp$2; - err = _tmp$3; - $s = -1; return [names, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Readdirnames, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, f, n, names, $s};return $f; - }; - File.prototype.Readdirnames = function(n) { return this.$val.Readdirnames(n); }; - File.ptr.prototype.ReadDir = function(n) { - var {_r$3, _tuple, dirents, err, f, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (f === ptrType$2.nil) { - $s = -1; return [sliceType$7.nil, $pkg.ErrInvalid]; - } - _r$3 = f.readdir(n, 1); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - dirents = _tuple[1]; - err = _tuple[3]; - if (dirents === sliceType$7.nil) { - dirents = new sliceType$7([]); - } - $s = -1; return [dirents, err]; - /* */ } return; } var $f = {$blk: File.ptr.prototype.ReadDir, $c: true, $r, _r$3, _tuple, dirents, err, f, n, $s};return $f; - }; - File.prototype.ReadDir = function(n) { return this.$val.ReadDir(n); }; - ReadDir = function(name) { - var {$24r, $24r$1, _r$3, _r$4, _tuple, _tuple$1, dirs, err, f, name, $s, $deferred, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - dirs = [dirs]; - _r$3 = Open(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - f = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [sliceType$7.nil, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(f, "Close"), []]); - _r$4 = f.ReadDir(-1); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - dirs[0] = _tuple$1[0]; - err = _tuple$1[1]; - $r = sort.Slice(dirs[0], (function(dirs) { return function $b(i, j) { - var {$24r$1, _r$5, _r$6, i, j, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = ((i < 0 || i >= dirs[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : dirs[0].$array[dirs[0].$offset + i]).Name(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = ((j < 0 || j >= dirs[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : dirs[0].$array[dirs[0].$offset + j]).Name(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$5 < _r$6; - $s = 3; case 3: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$1, _r$5, _r$6, i, j, $s};return $f; - }; })(dirs)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$1 = [dirs[0], err]; - $s = 7; case 7: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [sliceType$7.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ReadDir, $c: true, $r, $24r, $24r$1, _r$3, _r$4, _tuple, _tuple$1, dirs, err, f, name, $s, $deferred};return $f; } } - }; - $pkg.ReadDir = ReadDir; - runtime_args = function() { - return $pkg.Args; - }; - init$1 = function() { - var argv, i, process; - process = $global.process; - if (!(process === undefined)) { - argv = process.argv; - if (!(argv === undefined) && $parseInt(argv.length) >= 1) { - $pkg.Args = $makeSlice(sliceType, ($parseInt(argv.length) - 1 >> 0)); - i = 0; - while (true) { - if (!(i < ($parseInt(argv.length) - 1 >> 0))) { break; } - ((i < 0 || i >= $pkg.Args.$length) ? ($throwRuntimeError("index out of range"), undefined) : $pkg.Args.$array[$pkg.Args.$offset + i] = $internalize(argv[(i + 1 >> 0)], $String)); - i = i + (1) >> 0; - } - } - } - if ($pkg.Args.$length === 0) { - $pkg.Args = new sliceType(["?"]); - } - }; - runtime_beforeExit = function() { - }; - executable = function() { - return ["", errors.New("Executable not implemented for GOARCH=js")]; - }; - fastrand = function() { - $throwRuntimeError("native function not implemented: os.fastrand"); - }; - File.ptr.prototype.WriteString = function(s) { - var {$24r, _r$3, _tuple, err, f, n, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this; - _r$3 = f.Write((new sliceType$2($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.WriteString, $c: true, $r, $24r, _r$3, _tuple, err, f, n, s, $s};return $f; - }; - File.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - ptrType$1.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Mode", name: "Mode", pkg: "", typ: $funcType([], [fs.FileMode], false)}, {prop: "ModTime", name: "ModTime", pkg: "", typ: $funcType([], [time.Time], false)}, {prop: "Sys", name: "Sys", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$2.methods = [{prop: "Stat", name: "Stat", pkg: "", typ: $funcType([], [fs.FileInfo, $error], false)}, {prop: "readFrom", name: "readFrom", pkg: "os", typ: $funcType([io.Reader], [$Int64, $Bool, $error], false)}, {prop: "Fd", name: "Fd", pkg: "", typ: $funcType([], [$Uintptr], false)}, {prop: "seek", name: "seek", pkg: "os", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "read", name: "read", pkg: "os", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "pread", name: "pread", pkg: "os", typ: $funcType([sliceType$2, $Int64], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "os", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "pwrite", name: "pwrite", pkg: "os", typ: $funcType([sliceType$2, $Int64], [$Int, $error], false)}, {prop: "chmod", name: "chmod", pkg: "os", typ: $funcType([fs.FileMode], [$error], false)}, {prop: "Chown", name: "Chown", pkg: "", typ: $funcType([$Int, $Int], [$error], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Chdir", name: "Chdir", pkg: "", typ: $funcType([], [$error], false)}, {prop: "setDeadline", name: "setDeadline", pkg: "os", typ: $funcType([time.Time], [$error], false)}, {prop: "setReadDeadline", name: "setReadDeadline", pkg: "os", typ: $funcType([time.Time], [$error], false)}, {prop: "setWriteDeadline", name: "setWriteDeadline", pkg: "os", typ: $funcType([time.Time], [$error], false)}, {prop: "checkValid", name: "checkValid", pkg: "os", typ: $funcType([$String], [$error], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$2, $Int64], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "WriteAt", name: "WriteAt", pkg: "", typ: $funcType([sliceType$2, $Int64], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "wrapErr", name: "wrapErr", pkg: "os", typ: $funcType([$String, $error], [$error], false)}, {prop: "Chmod", name: "Chmod", pkg: "", typ: $funcType([fs.FileMode], [$error], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "readdir", name: "readdir", pkg: "os", typ: $funcType([$Int, readdirMode], [sliceType, sliceType$7, sliceType$8, $error], false)}, {prop: "Readdir", name: "Readdir", pkg: "", typ: $funcType([$Int], [sliceType$8, $error], false)}, {prop: "Readdirnames", name: "Readdirnames", pkg: "", typ: $funcType([$Int], [sliceType, $error], false)}, {prop: "ReadDir", name: "ReadDir", pkg: "", typ: $funcType([$Int], [sliceType$7, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; - ptrType$19.methods = [{prop: "Control", name: "Control", pkg: "", typ: $funcType([funcType$2], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$3], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$3], [$error], false)}]; - ptrType$9.methods = [{prop: "close", name: "close", pkg: "os", typ: $funcType([], [$error], false)}]; - ptrType$20.methods = [{prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsDir", name: "IsDir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [fs.FileMode], false)}, {prop: "Info", name: "Info", pkg: "", typ: $funcType([], [fs.FileInfo, $error], false)}]; - ptrType$17.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$18.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$8.methods = [{prop: "close", name: "close", pkg: "os", typ: $funcType([], [], false)}]; - fileStat.init("os", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "mode", name: "mode", embedded: false, exported: false, typ: fs.FileMode, tag: ""}, {prop: "modTime", name: "modTime", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "sys", name: "sys", embedded: false, exported: false, typ: syscall.Stat_t, tag: ""}]); - File.init("os", [{prop: "file", name: "file", embedded: true, exported: false, typ: ptrType$9, tag: ""}]); - rawConn.init("os", [{prop: "file", name: "file", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - file.init("os", [{prop: "pfd", name: "pfd", embedded: false, exported: false, typ: poll.FD, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "dirinfo", name: "dirinfo", embedded: false, exported: false, typ: ptrType$8, tag: ""}, {prop: "nonblock", name: "nonblock", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "stdoutOrErr", name: "stdoutOrErr", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "appendMode", name: "appendMode", embedded: false, exported: false, typ: $Bool, tag: ""}]); - unixDirent.init("os", [{prop: "parent", name: "parent", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: fs.FileMode, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: fs.FileInfo, tag: ""}]); - LinkError.init("", [{prop: "Op", name: "Op", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Old", name: "Old", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "New", name: "New", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - onlyWriter.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]); - timeout.init([{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); - SyscallError.init("", [{prop: "Syscall", name: "Syscall", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - dirInfo.init("os", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "nbuf", name: "nbuf", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "bufp", name: "bufp", embedded: false, exported: false, typ: $Int, tag: ""}]); - $pkg.$initLinknames = function() { - fastrand = $linknames["runtime.fastrand"]; -}; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = itoa.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = oserror.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = poll.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = execenv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unix.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = testlog.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unsafeheader.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fs.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = syscall.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Args = sliceType.nil; - testingForceReadDirLstat = false; - errPatternHasSeparator = errors.New("pattern contains path separator"); - errWriteAtInAppendMode = errors.New("os: invalid use of WriteAt on file opened with O_APPEND"); - lstat = Lstat; - $pkg.ErrProcessDone = errors.New("os: process already finished"); - $pkg.ErrInvalid = fs.ErrInvalid; - $pkg.ErrExist = fs.ErrExist; - $pkg.ErrNotExist = fs.ErrNotExist; - $pkg.ErrClosed = fs.ErrClosed; - $pkg.ErrNoDeadline = errNoDeadline(); - $pkg.ErrDeadlineExceeded = errDeadlineExceeded(); - dirBufPool = new sync.Pool.ptr(sliceType$1.nil, (function() { - var buf, buf$24ptr; - buf = $makeSlice(sliceType$2, 8192); - return (buf$24ptr || (buf$24ptr = new ptrType(function() { return buf; }, function($v) { buf = $convertSliceType($v, sliceType$2); }))); - })); - _r = NewFile(0, "/dev/stdin"); /* */ $s = 18; case 18: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $pkg.Stdin = _r; - _r$1 = NewFile(1, "/dev/stdout"); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $pkg.Stdout = _r$1; - _r$2 = NewFile(2, "/dev/stderr"); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $pkg.Stderr = _r$2; - init(); - init$1(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["fmt"] = (function() { - var $pkg = {}, $init, errors, fmtsort, io, math, os, reflect, strconv, sync, utf8, ScanState, scanError, ss, ssave, State, Formatter, Stringer, GoStringer, buffer, pp, fmtFlags, fmt, wrapError, arrayType, sliceType, sliceType$1, ptrType, ptrType$1, arrayType$1, sliceType$2, ptrType$4, ptrType$24, arrayType$3, funcType, ptrType$26, ptrType$27, space, ssFree, complexError, boolError, ppFree, isSpace, notSpace, indexRune, newPrinter, Fprintf, Sprintf, Fprint, Sprint, Fprintln, Sprintln, getField, tooLarge, parsenum, intFromArg, parseArgNumber, Errorf; - errors = $packages["errors"]; - fmtsort = $packages["internal/fmtsort"]; - io = $packages["io"]; - math = $packages["math"]; - os = $packages["os"]; - reflect = $packages["reflect"]; - strconv = $packages["strconv"]; - sync = $packages["sync"]; - utf8 = $packages["unicode/utf8"]; - ScanState = $pkg.ScanState = $newType(8, $kindInterface, "fmt.ScanState", true, "fmt", true, null); - scanError = $pkg.scanError = $newType(0, $kindStruct, "fmt.scanError", true, "fmt", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - return; - } - this.err = err_; - }); - ss = $pkg.ss = $newType(0, $kindStruct, "fmt.ss", true, "fmt", false, function(rs_, buf_, count_, atEOF_, ssave_) { - this.$val = this; - if (arguments.length === 0) { - this.rs = $ifaceNil; - this.buf = buffer.nil; - this.count = 0; - this.atEOF = false; - this.ssave = new ssave.ptr(false, false, false, 0, 0, 0); - return; - } - this.rs = rs_; - this.buf = buf_; - this.count = count_; - this.atEOF = atEOF_; - this.ssave = ssave_; - }); - ssave = $pkg.ssave = $newType(0, $kindStruct, "fmt.ssave", true, "fmt", false, function(validSave_, nlIsEnd_, nlIsSpace_, argLimit_, limit_, maxWid_) { - this.$val = this; - if (arguments.length === 0) { - this.validSave = false; - this.nlIsEnd = false; - this.nlIsSpace = false; - this.argLimit = 0; - this.limit = 0; - this.maxWid = 0; - return; - } - this.validSave = validSave_; - this.nlIsEnd = nlIsEnd_; - this.nlIsSpace = nlIsSpace_; - this.argLimit = argLimit_; - this.limit = limit_; - this.maxWid = maxWid_; - }); - State = $pkg.State = $newType(8, $kindInterface, "fmt.State", true, "fmt", true, null); - Formatter = $pkg.Formatter = $newType(8, $kindInterface, "fmt.Formatter", true, "fmt", true, null); - Stringer = $pkg.Stringer = $newType(8, $kindInterface, "fmt.Stringer", true, "fmt", true, null); - GoStringer = $pkg.GoStringer = $newType(8, $kindInterface, "fmt.GoStringer", true, "fmt", true, null); - buffer = $pkg.buffer = $newType(12, $kindSlice, "fmt.buffer", true, "fmt", false, null); - pp = $pkg.pp = $newType(0, $kindStruct, "fmt.pp", true, "fmt", false, function(buf_, arg_, value_, fmt_, reordered_, goodArgNum_, panicking_, erroring_, wrapErrs_, wrappedErr_) { - this.$val = this; - if (arguments.length === 0) { - this.buf = buffer.nil; - this.arg = $ifaceNil; - this.value = new reflect.Value.ptr(ptrType.nil, 0, 0); - this.fmt = new fmt.ptr(ptrType$1.nil, new fmtFlags.ptr(false, false, false, false, false, false, false, false, false), 0, 0, arrayType$1.zero()); - this.reordered = false; - this.goodArgNum = false; - this.panicking = false; - this.erroring = false; - this.wrapErrs = false; - this.wrappedErr = $ifaceNil; - return; - } - this.buf = buf_; - this.arg = arg_; - this.value = value_; - this.fmt = fmt_; - this.reordered = reordered_; - this.goodArgNum = goodArgNum_; - this.panicking = panicking_; - this.erroring = erroring_; - this.wrapErrs = wrapErrs_; - this.wrappedErr = wrappedErr_; - }); - fmtFlags = $pkg.fmtFlags = $newType(0, $kindStruct, "fmt.fmtFlags", true, "fmt", false, function(widPresent_, precPresent_, minus_, plus_, sharp_, space_, zero_, plusV_, sharpV_) { - this.$val = this; - if (arguments.length === 0) { - this.widPresent = false; - this.precPresent = false; - this.minus = false; - this.plus = false; - this.sharp = false; - this.space = false; - this.zero = false; - this.plusV = false; - this.sharpV = false; - return; - } - this.widPresent = widPresent_; - this.precPresent = precPresent_; - this.minus = minus_; - this.plus = plus_; - this.sharp = sharp_; - this.space = space_; - this.zero = zero_; - this.plusV = plusV_; - this.sharpV = sharpV_; - }); - fmt = $pkg.fmt = $newType(0, $kindStruct, "fmt.fmt", true, "fmt", false, function(buf_, fmtFlags_, wid_, prec_, intbuf_) { - this.$val = this; - if (arguments.length === 0) { - this.buf = ptrType$1.nil; - this.fmtFlags = new fmtFlags.ptr(false, false, false, false, false, false, false, false, false); - this.wid = 0; - this.prec = 0; - this.intbuf = arrayType$1.zero(); - return; - } - this.buf = buf_; - this.fmtFlags = fmtFlags_; - this.wid = wid_; - this.prec = prec_; - this.intbuf = intbuf_; - }); - wrapError = $pkg.wrapError = $newType(0, $kindStruct, "fmt.wrapError", true, "fmt", false, function(msg_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.msg = ""; - this.err = $ifaceNil; - return; - } - this.msg = msg_; - this.err = err_; - }); - arrayType = $arrayType($Uint16, 2); - sliceType = $sliceType(arrayType); - sliceType$1 = $sliceType($emptyInterface); - ptrType = $ptrType(reflect.rtype); - ptrType$1 = $ptrType(buffer); - arrayType$1 = $arrayType($Uint8, 68); - sliceType$2 = $sliceType($Uint8); - ptrType$4 = $ptrType(ss); - ptrType$24 = $ptrType(pp); - arrayType$3 = $arrayType($Uint8, 6); - funcType = $funcType([$Int32], [$Bool], false); - ptrType$26 = $ptrType(fmt); - ptrType$27 = $ptrType(wrapError); - ss.ptr.prototype.Read = function(buf) { - var _tmp, _tmp$1, buf, err, n, s; - n = 0; - err = $ifaceNil; - s = this; - _tmp = 0; - _tmp$1 = errors.New("ScanState's Read should not be called. Use ReadRune"); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - ss.prototype.Read = function(buf) { return this.$val.Read(buf); }; - ss.ptr.prototype.ReadRune = function() { - var {_r, _tuple, err, r, s, size, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = 0; - size = 0; - err = $ifaceNil; - s = this; - if (s.atEOF || s.count >= s.ssave.argLimit) { - err = io.EOF; - $s = -1; return [r, size, err]; - } - _r = s.rs.ReadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - r = _tuple[0]; - size = _tuple[1]; - err = _tuple[2]; - if ($interfaceIsEqual(err, $ifaceNil)) { - s.count = s.count + (1) >> 0; - if (s.ssave.nlIsEnd && (r === 10)) { - s.atEOF = true; - } - } else if ($interfaceIsEqual(err, io.EOF)) { - s.atEOF = true; - } - $s = -1; return [r, size, err]; - /* */ } return; } var $f = {$blk: ss.ptr.prototype.ReadRune, $c: true, $r, _r, _tuple, err, r, s, size, $s};return $f; - }; - ss.prototype.ReadRune = function() { return this.$val.ReadRune(); }; - ss.ptr.prototype.Width = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, ok, s, wid; - wid = 0; - ok = false; - s = this; - if (s.ssave.maxWid === 1073741824) { - _tmp = 0; - _tmp$1 = false; - wid = _tmp; - ok = _tmp$1; - return [wid, ok]; - } - _tmp$2 = s.ssave.maxWid; - _tmp$3 = true; - wid = _tmp$2; - ok = _tmp$3; - return [wid, ok]; - }; - ss.prototype.Width = function() { return this.$val.Width(); }; - ss.ptr.prototype.getRune = function() { - var {_r, _tuple, err, r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = 0; - s = this; - _r = s.ReadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - r = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - r = -1; - $s = -1; return r; - } - s.error(err); - } - $s = -1; return r; - /* */ } return; } var $f = {$blk: ss.ptr.prototype.getRune, $c: true, $r, _r, _tuple, err, r, s, $s};return $f; - }; - ss.prototype.getRune = function() { return this.$val.getRune(); }; - ss.ptr.prototype.UnreadRune = function() { - var {_r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.rs.UnreadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - s.atEOF = false; - s.count = s.count - (1) >> 0; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ss.ptr.prototype.UnreadRune, $c: true, $r, _r, s, $s};return $f; - }; - ss.prototype.UnreadRune = function() { return this.$val.UnreadRune(); }; - ss.ptr.prototype.error = function(err) { - var err, s, x; - s = this; - $panic((x = new scanError.ptr(err), new x.constructor.elem(x))); - }; - ss.prototype.error = function(err) { return this.$val.error(err); }; - ss.ptr.prototype.errorString = function(err) { - var err, s, x; - s = this; - $panic((x = new scanError.ptr(errors.New(err)), new x.constructor.elem(x))); - }; - ss.prototype.errorString = function(err) { return this.$val.errorString(err); }; - ss.ptr.prototype.Token = function(skipSpace, f) { - var {$24r, _r, err, f, s, skipSpace, tok, $s, $deferred, $r, $c} = $restore(this, {skipSpace, f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - tok = sliceType$2.nil; - err[0] = $ifaceNil; - s = this; - $deferred.push([(function(err) { return function() { - var _tuple, e, ok, se; - e = $recover(); - if (!($interfaceIsEqual(e, $ifaceNil))) { - _tuple = $assertType(e, scanError, true); - se = $clone(_tuple[0], scanError); - ok = _tuple[1]; - if (ok) { - err[0] = se.err; - } else { - $panic(e); - } - } - }; })(err), []]); - if (f === $throwNilPointerError) { - f = notSpace; - } - s.buf = $subslice(s.buf, 0, 0); - _r = s.token(skipSpace, f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - tok = _r; - $24r = [tok, err[0]]; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [tok, err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: ss.ptr.prototype.Token, $c: true, $r, $24r, _r, err, f, s, skipSpace, tok, $s, $deferred};return $f; } } - }; - ss.prototype.Token = function(skipSpace, f) { return this.$val.Token(skipSpace, f); }; - isSpace = function(r) { - var _i, _ref, r, rng, rx; - if (r >= 65536) { - return false; - } - rx = ((r << 16 >>> 16)); - _ref = space; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - rng = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType); - if (rx < rng[0]) { - return false; - } - if (rx <= rng[1]) { - return true; - } - _i++; - } - return false; - }; - notSpace = function(r) { - var r; - return !isSpace(r); - }; - ss.ptr.prototype.free = function(old) { - var old, s; - s = this; - if (old.validSave) { - ssave.copy(s.ssave, old); - return; - } - if (s.buf.$capacity > 1024) { - return; - } - s.buf = $subslice(s.buf, 0, 0); - s.rs = $ifaceNil; - ssFree.Put(s); - }; - ss.prototype.free = function(old) { return this.$val.free(old); }; - ss.ptr.prototype.SkipSpace = function() { - var {_r, _r$1, _r$2, _v, r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - /* while (true) { */ case 1: - _r = s.getRune(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - r = _r; - if (r === -1) { - $s = -1; return; - } - if (!(r === 13)) { _v = false; $s = 6; continue s; } - _r$1 = s.peek("\n"); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - /* continue; */ $s = 1; continue; - /* } */ case 5: - if (r === 10) { - if (s.ssave.nlIsSpace) { - /* continue; */ $s = 1; continue; - } - s.errorString("unexpected newline"); - $s = -1; return; - } - /* */ if (!isSpace(r)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!isSpace(r)) { */ case 8: - _r$2 = s.UnreadRune(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* break; */ $s = 2; continue; - /* } */ case 9: - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: ss.ptr.prototype.SkipSpace, $c: true, $r, _r, _r$1, _r$2, _v, r, s, $s};return $f; - }; - ss.prototype.SkipSpace = function() { return this.$val.SkipSpace(); }; - ss.ptr.prototype.token = function(skipSpace, f) { - var {_r, _r$1, _r$2, f, r, s, skipSpace, $s, $r, $c} = $restore(this, {skipSpace, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - /* */ if (skipSpace) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (skipSpace) { */ case 1: - $r = s.SkipSpace(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* while (true) { */ case 4: - _r = s.getRune(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - r = _r; - if (r === -1) { - /* break; */ $s = 5; continue; - } - _r$1 = f(r); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!_r$1) { */ case 7: - _r$2 = s.UnreadRune(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* break; */ $s = 5; continue; - /* } */ case 8: - (s.$ptr_buf || (s.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, s))).writeRune(r); - $s = 4; continue; - case 5: - $s = -1; return $convertSliceType(s.buf, sliceType$2); - /* */ } return; } var $f = {$blk: ss.ptr.prototype.token, $c: true, $r, _r, _r$1, _r$2, f, r, s, skipSpace, $s};return $f; - }; - ss.prototype.token = function(skipSpace, f) { return this.$val.token(skipSpace, f); }; - indexRune = function(s, r) { - var _i, _ref, _rune, c, i, r, s; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - c = _rune[0]; - if (c === r) { - return i; - } - _i += _rune[1]; - } - return -1; - }; - ss.ptr.prototype.peek = function(ok) { - var {_r, _r$1, ok, r, s, $s, $r, $c} = $restore(this, {ok}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.getRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - r = _r; - /* */ if (!((r === -1))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((r === -1))) { */ case 2: - _r$1 = s.UnreadRune(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 3: - $s = -1; return indexRune(ok, r) >= 0; - /* */ } return; } var $f = {$blk: ss.ptr.prototype.peek, $c: true, $r, _r, _r$1, ok, r, s, $s};return $f; - }; - ss.prototype.peek = function(ok) { return this.$val.peek(ok); }; - $ptrType(buffer).prototype.write = function(p) { - var b, p; - b = this; - b.$set($appendSlice(b.$get(), p)); - }; - $ptrType(buffer).prototype.writeString = function(s) { - var b, s; - b = this; - b.$set($appendSlice(b.$get(), s)); - }; - $ptrType(buffer).prototype.writeByte = function(c) { - var b, c; - b = this; - b.$set($append(b.$get(), c)); - }; - $ptrType(buffer).prototype.writeRune = function(r) { - var b, bp, n, r, w; - bp = this; - if (r < 128) { - bp.$set($append(bp.$get(), ((r << 24 >>> 24)))); - return; - } - b = bp.$get(); - n = b.$length; - while (true) { - if (!((n + 4 >> 0) > b.$capacity)) { break; } - b = $append(b, 0); - } - w = utf8.EncodeRune($convertSliceType($subslice(b, n, (n + 4 >> 0)), sliceType$2), r); - bp.$set($subslice(b, 0, (n + w >> 0))); - }; - newPrinter = function() { - var {_r, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = ppFree.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = $assertType(_r, ptrType$24); - p.panicking = false; - p.erroring = false; - p.wrapErrs = false; - p.fmt.init((p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p)))); - $s = -1; return p; - /* */ } return; } var $f = {$blk: newPrinter, $c: true, $r, _r, p, $s};return $f; - }; - pp.ptr.prototype.free = function() { - var p; - p = this; - if (p.buf.$capacity > 65536) { - return; - } - p.buf = $subslice(p.buf, 0, 0); - p.arg = $ifaceNil; - p.value = new reflect.Value.ptr(ptrType.nil, 0, 0); - p.wrappedErr = $ifaceNil; - ppFree.Put(p); - }; - pp.prototype.free = function() { return this.$val.free(); }; - pp.ptr.prototype.Width = function() { - var _tmp, _tmp$1, ok, p, wid; - wid = 0; - ok = false; - p = this; - _tmp = p.fmt.wid; - _tmp$1 = p.fmt.fmtFlags.widPresent; - wid = _tmp; - ok = _tmp$1; - return [wid, ok]; - }; - pp.prototype.Width = function() { return this.$val.Width(); }; - pp.ptr.prototype.Precision = function() { - var _tmp, _tmp$1, ok, p, prec; - prec = 0; - ok = false; - p = this; - _tmp = p.fmt.prec; - _tmp$1 = p.fmt.fmtFlags.precPresent; - prec = _tmp; - ok = _tmp$1; - return [prec, ok]; - }; - pp.prototype.Precision = function() { return this.$val.Precision(); }; - pp.ptr.prototype.Flag = function(b) { - var _1, b, p; - p = this; - _1 = b; - if (_1 === (45)) { - return p.fmt.fmtFlags.minus; - } else if (_1 === (43)) { - return p.fmt.fmtFlags.plus || p.fmt.fmtFlags.plusV; - } else if (_1 === (35)) { - return p.fmt.fmtFlags.sharp || p.fmt.fmtFlags.sharpV; - } else if (_1 === (32)) { - return p.fmt.fmtFlags.space; - } else if (_1 === (48)) { - return p.fmt.fmtFlags.zero; - } - return false; - }; - pp.prototype.Flag = function(b) { return this.$val.Flag(b); }; - pp.ptr.prototype.Write = function(b) { - var _tmp, _tmp$1, b, err, p, ret; - ret = 0; - err = $ifaceNil; - p = this; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).write(b); - _tmp = b.$length; - _tmp$1 = $ifaceNil; - ret = _tmp; - err = _tmp$1; - return [ret, err]; - }; - pp.prototype.Write = function(b) { return this.$val.Write(b); }; - pp.ptr.prototype.WriteString = function(s) { - var _tmp, _tmp$1, err, p, ret, s; - ret = 0; - err = $ifaceNil; - p = this; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(s); - _tmp = s.length; - _tmp$1 = $ifaceNil; - ret = _tmp; - err = _tmp$1; - return [ret, err]; - }; - pp.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - Fprintf = function(w, format, a) { - var {_r, _r$1, _tuple, a, err, format, n, p, w, $s, $r, $c} = $restore(this, {w, format, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - $r = p.doPrintf(format, a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = w.Write($convertSliceType(p.buf, sliceType$2)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - p.free(); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Fprintf, $c: true, $r, _r, _r$1, _tuple, a, err, format, n, p, w, $s};return $f; - }; - $pkg.Fprintf = Fprintf; - Sprintf = function(format, a) { - var {_r, a, format, p, s, $s, $r, $c} = $restore(this, {format, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - $r = p.doPrintf(format, a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = ($bytesToString(p.buf)); - p.free(); - $s = -1; return s; - /* */ } return; } var $f = {$blk: Sprintf, $c: true, $r, _r, a, format, p, s, $s};return $f; - }; - $pkg.Sprintf = Sprintf; - Fprint = function(w, a) { - var {_r, _r$1, _tuple, a, err, n, p, w, $s, $r, $c} = $restore(this, {w, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - $r = p.doPrint(a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = w.Write($convertSliceType(p.buf, sliceType$2)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - p.free(); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Fprint, $c: true, $r, _r, _r$1, _tuple, a, err, n, p, w, $s};return $f; - }; - $pkg.Fprint = Fprint; - Sprint = function(a) { - var {_r, a, p, s, $s, $r, $c} = $restore(this, {a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - $r = p.doPrint(a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = ($bytesToString(p.buf)); - p.free(); - $s = -1; return s; - /* */ } return; } var $f = {$blk: Sprint, $c: true, $r, _r, a, p, s, $s};return $f; - }; - $pkg.Sprint = Sprint; - Fprintln = function(w, a) { - var {_r, _r$1, _tuple, a, err, n, p, w, $s, $r, $c} = $restore(this, {w, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - $r = p.doPrintln(a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = w.Write($convertSliceType(p.buf, sliceType$2)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - p.free(); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Fprintln, $c: true, $r, _r, _r$1, _tuple, a, err, n, p, w, $s};return $f; - }; - $pkg.Fprintln = Fprintln; - Sprintln = function(a) { - var {_r, a, p, s, $s, $r, $c} = $restore(this, {a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - $r = p.doPrintln(a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = ($bytesToString(p.buf)); - p.free(); - $s = -1; return s; - /* */ } return; } var $f = {$blk: Sprintln, $c: true, $r, _r, a, p, s, $s};return $f; - }; - $pkg.Sprintln = Sprintln; - getField = function(v, i) { - var {_r, _r$1, i, v, val, $s, $r, $c} = $restore(this, {v, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(v, reflect.Value).Field(i); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - val = _r; - /* */ if (($clone(val, reflect.Value).Kind() === 20) && !$clone(val, reflect.Value).IsNil()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (($clone(val, reflect.Value).Kind() === 20) && !$clone(val, reflect.Value).IsNil()) { */ case 2: - _r$1 = $clone(val, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - val = _r$1; - /* } */ case 3: - $s = -1; return val; - /* */ } return; } var $f = {$blk: getField, $c: true, $r, _r, _r$1, i, v, val, $s};return $f; - }; - tooLarge = function(x) { - var x; - return x > 1000000 || x < -1000000; - }; - parsenum = function(s, start, end) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, end, isnum, newi, num, s, start; - num = 0; - isnum = false; - newi = 0; - if (start >= end) { - _tmp = 0; - _tmp$1 = false; - _tmp$2 = end; - num = _tmp; - isnum = _tmp$1; - newi = _tmp$2; - return [num, isnum, newi]; - } - newi = start; - while (true) { - if (!(newi < end && 48 <= s.charCodeAt(newi) && s.charCodeAt(newi) <= 57)) { break; } - if (tooLarge(num)) { - _tmp$3 = 0; - _tmp$4 = false; - _tmp$5 = end; - num = _tmp$3; - isnum = _tmp$4; - newi = _tmp$5; - return [num, isnum, newi]; - } - num = ($imul(num, 10)) + (((s.charCodeAt(newi) - 48 << 24 >>> 24) >> 0)) >> 0; - isnum = true; - newi = newi + (1) >> 0; - } - return [num, isnum, newi]; - }; - pp.ptr.prototype.unknownType = function(v) { - var {_r, p, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (!$clone(v, reflect.Value).IsValid()) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - $s = -1; return; - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(63); - _r = $clone(v, reflect.Value).Type().String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(63); - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.unknownType, $c: true, $r, _r, p, v, $s};return $f; - }; - pp.prototype.unknownType = function(v) { return this.$val.unknownType(v); }; - pp.ptr.prototype.badVerb = function(verb) { - var {_r, _r$1, p, verb, $s, $r, $c} = $restore(this, {verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - p.erroring = true; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!"); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeRune(verb); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(40); - /* */ if (!($interfaceIsEqual(p.arg, $ifaceNil))) { $s = 2; continue; } - /* */ if ($clone(p.value, reflect.Value).IsValid()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(p.arg, $ifaceNil))) { */ case 2: - _r = reflect.TypeOf(p.arg).String(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(61); - $r = p.printArg(p.arg, 118); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if ($clone(p.value, reflect.Value).IsValid()) { */ case 3: - _r$1 = $clone(p.value, reflect.Value).Type().String(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r$1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(61); - $r = p.printValue($clone(p.value, reflect.Value), 118, 0); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - /* } */ case 5: - case 1: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(41); - p.erroring = false; - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.badVerb, $c: true, $r, _r, _r$1, p, verb, $s};return $f; - }; - pp.prototype.badVerb = function(verb) { return this.$val.badVerb(verb); }; - pp.ptr.prototype.fmtBool = function(v, verb) { - var {_1, p, v, verb, $s, $r, $c} = $restore(this, {v, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = verb; - /* */ if ((_1 === (116)) || (_1 === (118))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (116)) || (_1 === (118))) { */ case 2: - p.fmt.fmtBoolean(v); - $s = 4; continue; - /* } else { */ case 3: - $r = p.badVerb(verb); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtBool, $c: true, $r, _1, p, v, verb, $s};return $f; - }; - pp.prototype.fmtBool = function(v, verb) { return this.$val.fmtBool(v, verb); }; - pp.ptr.prototype.fmt0x64 = function(v, leading0x) { - var leading0x, p, sharp, v; - p = this; - sharp = p.fmt.fmtFlags.sharp; - p.fmt.fmtFlags.sharp = leading0x; - p.fmt.fmtInteger(v, 16, false, 118, "0123456789abcdefx"); - p.fmt.fmtFlags.sharp = sharp; - }; - pp.prototype.fmt0x64 = function(v, leading0x) { return this.$val.fmt0x64(v, leading0x); }; - pp.ptr.prototype.fmtInteger = function(v, isSigned, verb) { - var {_1, isSigned, p, v, verb, $s, $r, $c} = $restore(this, {v, isSigned, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = verb; - /* */ if (_1 === (118)) { $s = 2; continue; } - /* */ if (_1 === (100)) { $s = 3; continue; } - /* */ if (_1 === (98)) { $s = 4; continue; } - /* */ if ((_1 === (111)) || (_1 === (79))) { $s = 5; continue; } - /* */ if (_1 === (120)) { $s = 6; continue; } - /* */ if (_1 === (88)) { $s = 7; continue; } - /* */ if (_1 === (99)) { $s = 8; continue; } - /* */ if (_1 === (113)) { $s = 9; continue; } - /* */ if (_1 === (85)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (118)) { */ case 2: - if (p.fmt.fmtFlags.sharpV && !isSigned) { - p.fmt0x64(v, true); - } else { - p.fmt.fmtInteger(v, 10, isSigned, verb, "0123456789abcdefx"); - } - $s = 12; continue; - /* } else if (_1 === (100)) { */ case 3: - p.fmt.fmtInteger(v, 10, isSigned, verb, "0123456789abcdefx"); - $s = 12; continue; - /* } else if (_1 === (98)) { */ case 4: - p.fmt.fmtInteger(v, 2, isSigned, verb, "0123456789abcdefx"); - $s = 12; continue; - /* } else if ((_1 === (111)) || (_1 === (79))) { */ case 5: - p.fmt.fmtInteger(v, 8, isSigned, verb, "0123456789abcdefx"); - $s = 12; continue; - /* } else if (_1 === (120)) { */ case 6: - p.fmt.fmtInteger(v, 16, isSigned, verb, "0123456789abcdefx"); - $s = 12; continue; - /* } else if (_1 === (88)) { */ case 7: - p.fmt.fmtInteger(v, 16, isSigned, verb, "0123456789ABCDEFX"); - $s = 12; continue; - /* } else if (_1 === (99)) { */ case 8: - p.fmt.fmtC(v); - $s = 12; continue; - /* } else if (_1 === (113)) { */ case 9: - p.fmt.fmtQc(v); - $s = 12; continue; - /* } else if (_1 === (85)) { */ case 10: - p.fmt.fmtUnicode(v); - $s = 12; continue; - /* } else { */ case 11: - $r = p.badVerb(verb); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtInteger, $c: true, $r, _1, isSigned, p, v, verb, $s};return $f; - }; - pp.prototype.fmtInteger = function(v, isSigned, verb) { return this.$val.fmtInteger(v, isSigned, verb); }; - pp.ptr.prototype.fmtFloat = function(v, size, verb) { - var {_1, p, size, v, verb, $s, $r, $c} = $restore(this, {v, size, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = verb; - /* */ if (_1 === (118)) { $s = 2; continue; } - /* */ if ((_1 === (98)) || (_1 === (103)) || (_1 === (71)) || (_1 === (120)) || (_1 === (88))) { $s = 3; continue; } - /* */ if ((_1 === (102)) || (_1 === (101)) || (_1 === (69))) { $s = 4; continue; } - /* */ if (_1 === (70)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (118)) { */ case 2: - p.fmt.fmtFloat(v, size, 103, -1); - $s = 7; continue; - /* } else if ((_1 === (98)) || (_1 === (103)) || (_1 === (71)) || (_1 === (120)) || (_1 === (88))) { */ case 3: - p.fmt.fmtFloat(v, size, verb, -1); - $s = 7; continue; - /* } else if ((_1 === (102)) || (_1 === (101)) || (_1 === (69))) { */ case 4: - p.fmt.fmtFloat(v, size, verb, 6); - $s = 7; continue; - /* } else if (_1 === (70)) { */ case 5: - p.fmt.fmtFloat(v, size, 102, 6); - $s = 7; continue; - /* } else { */ case 6: - $r = p.badVerb(verb); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtFloat, $c: true, $r, _1, p, size, v, verb, $s};return $f; - }; - pp.prototype.fmtFloat = function(v, size, verb) { return this.$val.fmtFloat(v, size, verb); }; - pp.ptr.prototype.fmtComplex = function(v, size, verb) { - var {_1, _q, _q$1, oldPlus, p, size, v, verb, $s, $r, $c} = $restore(this, {v, size, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = verb; - /* */ if ((_1 === (118)) || (_1 === (98)) || (_1 === (103)) || (_1 === (71)) || (_1 === (120)) || (_1 === (88)) || (_1 === (102)) || (_1 === (70)) || (_1 === (101)) || (_1 === (69))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (118)) || (_1 === (98)) || (_1 === (103)) || (_1 === (71)) || (_1 === (120)) || (_1 === (88)) || (_1 === (102)) || (_1 === (70)) || (_1 === (101)) || (_1 === (69))) { */ case 2: - oldPlus = p.fmt.fmtFlags.plus; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(40); - $r = p.fmtFloat(v.$real, (_q = size / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), verb); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p.fmt.fmtFlags.plus = true; - $r = p.fmtFloat(v.$imag, (_q$1 = size / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), verb); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("i)"); - p.fmt.fmtFlags.plus = oldPlus; - $s = 4; continue; - /* } else { */ case 3: - $r = p.badVerb(verb); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtComplex, $c: true, $r, _1, _q, _q$1, oldPlus, p, size, v, verb, $s};return $f; - }; - pp.prototype.fmtComplex = function(v, size, verb) { return this.$val.fmtComplex(v, size, verb); }; - pp.ptr.prototype.fmtString = function(v, verb) { - var {_1, p, v, verb, $s, $r, $c} = $restore(this, {v, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = verb; - /* */ if (_1 === (118)) { $s = 2; continue; } - /* */ if (_1 === (115)) { $s = 3; continue; } - /* */ if (_1 === (120)) { $s = 4; continue; } - /* */ if (_1 === (88)) { $s = 5; continue; } - /* */ if (_1 === (113)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (118)) { */ case 2: - if (p.fmt.fmtFlags.sharpV) { - p.fmt.fmtQ(v); - } else { - p.fmt.fmtS(v); - } - $s = 8; continue; - /* } else if (_1 === (115)) { */ case 3: - p.fmt.fmtS(v); - $s = 8; continue; - /* } else if (_1 === (120)) { */ case 4: - p.fmt.fmtSx(v, "0123456789abcdefx"); - $s = 8; continue; - /* } else if (_1 === (88)) { */ case 5: - p.fmt.fmtSx(v, "0123456789ABCDEFX"); - $s = 8; continue; - /* } else if (_1 === (113)) { */ case 6: - p.fmt.fmtQ(v); - $s = 8; continue; - /* } else { */ case 7: - $r = p.badVerb(verb); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtString, $c: true, $r, _1, p, v, verb, $s};return $f; - }; - pp.prototype.fmtString = function(v, verb) { return this.$val.fmtString(v, verb); }; - pp.ptr.prototype.fmtBytes = function(v, verb, typeString) { - var {_1, _i, _i$1, _r, _ref, _ref$1, c, c$1, i, i$1, p, typeString, v, verb, $s, $r, $c} = $restore(this, {v, verb, typeString}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = verb; - /* */ if ((_1 === (118)) || (_1 === (100))) { $s = 2; continue; } - /* */ if (_1 === (115)) { $s = 3; continue; } - /* */ if (_1 === (120)) { $s = 4; continue; } - /* */ if (_1 === (88)) { $s = 5; continue; } - /* */ if (_1 === (113)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ((_1 === (118)) || (_1 === (100))) { */ case 2: - if (p.fmt.fmtFlags.sharpV) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(typeString); - if (v === sliceType$2.nil) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(nil)"); - $s = -1; return; - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(123); - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i > 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(", "); - } - p.fmt0x64((new $Uint64(0, c)), true); - _i++; - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(125); - } else { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(91); - _ref$1 = v; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (i$1 > 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(32); - } - p.fmt.fmtInteger((new $Uint64(0, c$1)), 10, false, verb, "0123456789abcdefx"); - _i$1++; - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(93); - } - $s = 8; continue; - /* } else if (_1 === (115)) { */ case 3: - p.fmt.fmtBs(v); - $s = 8; continue; - /* } else if (_1 === (120)) { */ case 4: - p.fmt.fmtBx(v, "0123456789abcdefx"); - $s = 8; continue; - /* } else if (_1 === (88)) { */ case 5: - p.fmt.fmtBx(v, "0123456789ABCDEFX"); - $s = 8; continue; - /* } else if (_1 === (113)) { */ case 6: - p.fmt.fmtQ(($bytesToString(v))); - $s = 8; continue; - /* } else { */ case 7: - _r = reflect.ValueOf(v); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = p.printValue($clone(_r, reflect.Value), verb, 0); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtBytes, $c: true, $r, _1, _i, _i$1, _r, _ref, _ref$1, c, c$1, i, i$1, p, typeString, v, verb, $s};return $f; - }; - pp.prototype.fmtBytes = function(v, verb, typeString) { return this.$val.fmtBytes(v, verb, typeString); }; - pp.ptr.prototype.fmtPointer = function(value, verb) { - var {_1, _2, _r, p, u, value, verb, $s, $r, $c} = $restore(this, {value, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - u = 0; - _1 = $clone(value, reflect.Value).Kind(); - /* */ if ((_1 === (18)) || (_1 === (19)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (18)) || (_1 === (19)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { */ case 2: - u = $clone(value, reflect.Value).Pointer(); - $s = 4; continue; - /* } else { */ case 3: - $r = p.badVerb(verb); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 4: - case 1: - _2 = verb; - /* */ if (_2 === (118)) { $s = 7; continue; } - /* */ if (_2 === (112)) { $s = 8; continue; } - /* */ if ((_2 === (98)) || (_2 === (111)) || (_2 === (100)) || (_2 === (120)) || (_2 === (88))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_2 === (118)) { */ case 7: - /* */ if (p.fmt.fmtFlags.sharpV) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (p.fmt.fmtFlags.sharpV) { */ case 12: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(40); - _r = $clone(value, reflect.Value).Type().String(); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(")("); - if (u === 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("nil"); - } else { - p.fmt0x64((new $Uint64(0, u.constructor === Number ? u : 1)), true); - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(41); - $s = 14; continue; - /* } else { */ case 13: - if (u === 0) { - p.fmt.padString(""); - } else { - p.fmt0x64((new $Uint64(0, u.constructor === Number ? u : 1)), !p.fmt.fmtFlags.sharp); - } - /* } */ case 14: - $s = 11; continue; - /* } else if (_2 === (112)) { */ case 8: - p.fmt0x64((new $Uint64(0, u.constructor === Number ? u : 1)), !p.fmt.fmtFlags.sharp); - $s = 11; continue; - /* } else if ((_2 === (98)) || (_2 === (111)) || (_2 === (100)) || (_2 === (120)) || (_2 === (88))) { */ case 9: - $r = p.fmtInteger((new $Uint64(0, u.constructor === Number ? u : 1)), false, verb); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else { */ case 10: - $r = p.badVerb(verb); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.fmtPointer, $c: true, $r, _1, _2, _r, p, u, value, verb, $s};return $f; - }; - pp.prototype.fmtPointer = function(value, verb) { return this.$val.fmtPointer(value, verb); }; - pp.ptr.prototype.catchPanic = function(arg, verb, method) { - var {_r, arg, err, method, oldFlags, p, v, verb, $s, $r, $c} = $restore(this, {arg, verb, method}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - err = $recover(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - _r = reflect.ValueOf(arg); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - $s = -1; return; - } - if (p.panicking) { - $panic(err); - } - oldFlags = $clone(p.fmt.fmtFlags, fmtFlags); - p.fmt.clearflags(); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!"); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeRune(verb); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(PANIC="); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(method); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(" method: "); - p.panicking = true; - $r = p.printArg(err, 118); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p.panicking = false; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(41); - fmtFlags.copy(p.fmt.fmtFlags, oldFlags); - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.catchPanic, $c: true, $r, _r, arg, err, method, oldFlags, p, v, verb, $s};return $f; - }; - pp.prototype.catchPanic = function(arg, verb, method) { return this.$val.catchPanic(arg, verb, method); }; - pp.ptr.prototype.handleMethods = function(verb) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _r, _r$1, _r$2, _ref, _tuple, _tuple$1, _tuple$2, err, formatter, handled, ok, ok$1, ok$2, p, stringer, v, v$1, verb, $s, $deferred, $r, $c} = $restore(this, {verb}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - handled = false; - p = this; - /* */ if (p.erroring) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.erroring) { */ case 1: - $24r = handled; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (verb === 119) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (verb === 119) { */ case 4: - _tuple = $assertType(p.arg, $error, true); - err = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok || !p.wrapErrs || !($interfaceIsEqual(p.wrappedErr, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!ok || !p.wrapErrs || !($interfaceIsEqual(p.wrappedErr, $ifaceNil))) { */ case 6: - p.wrappedErr = $ifaceNil; - p.wrapErrs = false; - $r = p.badVerb(verb); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - handled = true; - $24r$1 = handled; - $s = 9; case 9: return $24r$1; - /* } */ case 7: - p.wrappedErr = err; - verb = 118; - /* } */ case 5: - _tuple$1 = $assertType(p.arg, Formatter, true); - formatter = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (ok$1) { */ case 10: - handled = true; - $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb, "Format"]]); - $r = formatter.Format(p, verb); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$2 = handled; - $s = 13; case 13: return $24r$2; - /* } */ case 11: - /* */ if (p.fmt.fmtFlags.sharpV) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (p.fmt.fmtFlags.sharpV) { */ case 14: - _tuple$2 = $assertType(p.arg, GoStringer, true); - stringer = _tuple$2[0]; - ok$2 = _tuple$2[1]; - /* */ if (ok$2) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (ok$2) { */ case 17: - handled = true; - $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb, "GoString"]]); - _r = stringer.GoString(); /* */ $s = 19; case 19: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = p.fmt.fmtS(_r); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$3 = handled; - $s = 21; case 21: return $24r$3; - /* } */ case 18: - $s = 16; continue; - /* } else { */ case 15: - _1 = verb; - /* */ if ((_1 === (118)) || (_1 === (115)) || (_1 === (120)) || (_1 === (88)) || (_1 === (113))) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if ((_1 === (118)) || (_1 === (115)) || (_1 === (120)) || (_1 === (88)) || (_1 === (113))) { */ case 23: - _ref = p.arg; - /* */ if ($assertType(_ref, $error, true)[1]) { $s = 25; continue; } - /* */ if ($assertType(_ref, Stringer, true)[1]) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ($assertType(_ref, $error, true)[1]) { */ case 25: - v = _ref; - handled = true; - $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb, "Error"]]); - _r$1 = v.Error(); /* */ $s = 28; case 28: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = p.fmtString(_r$1, verb); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$4 = handled; - $s = 30; case 30: return $24r$4; - /* } else if ($assertType(_ref, Stringer, true)[1]) { */ case 26: - v$1 = _ref; - handled = true; - $deferred.push([$methodVal(p, "catchPanic"), [p.arg, verb, "String"]]); - _r$2 = v$1.String(); /* */ $s = 31; case 31: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = p.fmtString(_r$2, verb); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$5 = handled; - $s = 33; case 33: return $24r$5; - /* } */ case 27: - /* } */ case 24: - case 22: - /* } */ case 16: - handled = false; - $24r$6 = handled; - $s = 34; case 34: return $24r$6; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return handled; } if($curGoroutine.asleep) { var $f = {$blk: pp.ptr.prototype.handleMethods, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _r, _r$1, _r$2, _ref, _tuple, _tuple$1, _tuple$2, err, formatter, handled, ok, ok$1, ok$2, p, stringer, v, v$1, verb, $s, $deferred};return $f; } } - }; - pp.prototype.handleMethods = function(verb) { return this.$val.handleMethods(verb); }; - pp.ptr.prototype.printArg = function(arg, verb) { - var {_1, _2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, arg, f, f$1, f$10, f$11, f$12, f$13, f$14, f$15, f$16, f$17, f$18, f$19, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, p, verb, $s, $r, $c} = $restore(this, {arg, verb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - p.arg = arg; - p.value = new reflect.Value.ptr(ptrType.nil, 0, 0); - /* */ if ($interfaceIsEqual(arg, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(arg, $ifaceNil)) { */ case 1: - _1 = verb; - /* */ if ((_1 === (84)) || (_1 === (118))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((_1 === (84)) || (_1 === (118))) { */ case 4: - p.fmt.padString(""); - $s = 6; continue; - /* } else { */ case 5: - $r = p.badVerb(verb); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - case 3: - $s = -1; return; - /* } */ case 2: - _2 = verb; - /* */ if (_2 === (84)) { $s = 9; continue; } - /* */ if (_2 === (112)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_2 === (84)) { */ case 9: - _r = reflect.TypeOf(arg).String(); /* */ $s = 12; case 12: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = p.fmt.fmtS(_r); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } else if (_2 === (112)) { */ case 10: - _r$1 = reflect.ValueOf(arg); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = p.fmtPointer($clone(_r$1, reflect.Value), 112); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 11: - case 8: - _ref = arg; - /* */ if ($assertType(_ref, $Bool, true)[1]) { $s = 16; continue; } - /* */ if ($assertType(_ref, $Float32, true)[1]) { $s = 17; continue; } - /* */ if ($assertType(_ref, $Float64, true)[1]) { $s = 18; continue; } - /* */ if ($assertType(_ref, $Complex64, true)[1]) { $s = 19; continue; } - /* */ if ($assertType(_ref, $Complex128, true)[1]) { $s = 20; continue; } - /* */ if ($assertType(_ref, $Int, true)[1]) { $s = 21; continue; } - /* */ if ($assertType(_ref, $Int8, true)[1]) { $s = 22; continue; } - /* */ if ($assertType(_ref, $Int16, true)[1]) { $s = 23; continue; } - /* */ if ($assertType(_ref, $Int32, true)[1]) { $s = 24; continue; } - /* */ if ($assertType(_ref, $Int64, true)[1]) { $s = 25; continue; } - /* */ if ($assertType(_ref, $Uint, true)[1]) { $s = 26; continue; } - /* */ if ($assertType(_ref, $Uint8, true)[1]) { $s = 27; continue; } - /* */ if ($assertType(_ref, $Uint16, true)[1]) { $s = 28; continue; } - /* */ if ($assertType(_ref, $Uint32, true)[1]) { $s = 29; continue; } - /* */ if ($assertType(_ref, $Uint64, true)[1]) { $s = 30; continue; } - /* */ if ($assertType(_ref, $Uintptr, true)[1]) { $s = 31; continue; } - /* */ if ($assertType(_ref, $String, true)[1]) { $s = 32; continue; } - /* */ if ($assertType(_ref, sliceType$2, true)[1]) { $s = 33; continue; } - /* */ if ($assertType(_ref, reflect.Value, true)[1]) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if ($assertType(_ref, $Bool, true)[1]) { */ case 16: - f = _ref.$val; - $r = p.fmtBool(f, verb); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Float32, true)[1]) { */ case 17: - f$1 = _ref.$val; - $r = p.fmtFloat((f$1), 32, verb); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Float64, true)[1]) { */ case 18: - f$2 = _ref.$val; - $r = p.fmtFloat(f$2, 64, verb); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Complex64, true)[1]) { */ case 19: - f$3 = _ref.$val; - $r = p.fmtComplex((new $Complex128(f$3.$real, f$3.$imag)), 64, verb); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Complex128, true)[1]) { */ case 20: - f$4 = _ref.$val; - $r = p.fmtComplex(f$4, 128, verb); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Int, true)[1]) { */ case 21: - f$5 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$5)), true, verb); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Int8, true)[1]) { */ case 22: - f$6 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$6)), true, verb); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Int16, true)[1]) { */ case 23: - f$7 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$7)), true, verb); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Int32, true)[1]) { */ case 24: - f$8 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$8)), true, verb); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Int64, true)[1]) { */ case 25: - f$9 = _ref.$val; - $r = p.fmtInteger((new $Uint64(f$9.$high, f$9.$low)), true, verb); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Uint, true)[1]) { */ case 26: - f$10 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$10)), false, verb); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Uint8, true)[1]) { */ case 27: - f$11 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$11)), false, verb); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Uint16, true)[1]) { */ case 28: - f$12 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$12)), false, verb); /* */ $s = 49; case 49: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Uint32, true)[1]) { */ case 29: - f$13 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$13)), false, verb); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Uint64, true)[1]) { */ case 30: - f$14 = _ref.$val; - $r = p.fmtInteger(f$14, false, verb); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $Uintptr, true)[1]) { */ case 31: - f$15 = _ref.$val; - $r = p.fmtInteger((new $Uint64(0, f$15.constructor === Number ? f$15 : 1)), false, verb); /* */ $s = 52; case 52: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, $String, true)[1]) { */ case 32: - f$16 = _ref.$val; - $r = p.fmtString(f$16, verb); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, sliceType$2, true)[1]) { */ case 33: - f$17 = _ref.$val; - $r = p.fmtBytes(f$17, verb, "[]byte"); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else if ($assertType(_ref, reflect.Value, true)[1]) { */ case 34: - f$18 = _ref.$val; - /* */ if ($clone(f$18, reflect.Value).IsValid() && $clone(f$18, reflect.Value).CanInterface()) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if ($clone(f$18, reflect.Value).IsValid() && $clone(f$18, reflect.Value).CanInterface()) { */ case 55: - _r$2 = $clone(f$18, reflect.Value).Interface(); /* */ $s = 57; case 57: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - p.arg = _r$2; - _r$3 = p.handleMethods(verb); /* */ $s = 60; case 60: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (_r$3) { */ case 58: - $s = -1; return; - /* } */ case 59: - /* } */ case 56: - $r = p.printValue($clone(f$18, reflect.Value), verb, 0); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 36; continue; - /* } else { */ case 35: - f$19 = _ref; - _r$4 = p.handleMethods(verb); /* */ $s = 64; case 64: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (!_r$4) { */ case 62: - _r$5 = reflect.ValueOf(f$19); /* */ $s = 65; case 65: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = p.printValue($clone(_r$5, reflect.Value), verb, 0); /* */ $s = 66; case 66: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 63: - /* } */ case 36: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.printArg, $c: true, $r, _1, _2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, arg, f, f$1, f$10, f$11, f$12, f$13, f$14, f$15, f$16, f$17, f$18, f$19, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, p, verb, $s};return $f; - }; - pp.prototype.printArg = function(arg, verb) { return this.$val.printArg(arg, verb); }; - pp.ptr.prototype.printValue = function(value, verb, depth) { - var {_1, _2, _3, _4, _arg, _arg$1, _arg$2, _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, a, bytes, depth, f, i, i$1, i$2, i$3, i$4, key, name, p, sorted, t, value, value$1, verb, x, x$1, $s, $r, $c} = $restore(this, {value, verb, depth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (depth > 0 && $clone(value, reflect.Value).IsValid() && $clone(value, reflect.Value).CanInterface()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (depth > 0 && $clone(value, reflect.Value).IsValid() && $clone(value, reflect.Value).CanInterface()) { */ case 1: - _r = $clone(value, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p.arg = _r; - _r$1 = p.handleMethods(verb); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$1) { */ case 4: - $s = -1; return; - /* } */ case 5: - /* } */ case 2: - p.arg = $ifaceNil; - p.value = value; - f = value; - _1 = $clone(value, reflect.Value).Kind(); - /* */ if (_1 === (0)) { $s = 8; continue; } - /* */ if (_1 === (1)) { $s = 9; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 10; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 11; continue; } - /* */ if (_1 === (13)) { $s = 12; continue; } - /* */ if (_1 === (14)) { $s = 13; continue; } - /* */ if (_1 === (15)) { $s = 14; continue; } - /* */ if (_1 === (16)) { $s = 15; continue; } - /* */ if (_1 === (24)) { $s = 16; continue; } - /* */ if (_1 === (21)) { $s = 17; continue; } - /* */ if (_1 === (25)) { $s = 18; continue; } - /* */ if (_1 === (20)) { $s = 19; continue; } - /* */ if ((_1 === (17)) || (_1 === (23))) { $s = 20; continue; } - /* */ if (_1 === (22)) { $s = 21; continue; } - /* */ if ((_1 === (18)) || (_1 === (19)) || (_1 === (26))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_1 === (0)) { */ case 8: - /* */ if (depth === 0) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (depth === 0) { */ case 25: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - $s = 27; continue; - /* } else { */ case 26: - _2 = verb; - /* */ if (_2 === (118)) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_2 === (118)) { */ case 29: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - $s = 31; continue; - /* } else { */ case 30: - $r = p.badVerb(verb); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 31: - case 28: - /* } */ case 27: - $s = 24; continue; - /* } else if (_1 === (1)) { */ case 9: - $r = p.fmtBool($clone(f, reflect.Value).Bool(), verb); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 10: - $r = p.fmtInteger(((x = $clone(f, reflect.Value).Int(), new $Uint64(x.$high, x.$low))), true, verb); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 11: - $r = p.fmtInteger($clone(f, reflect.Value).Uint(), false, verb); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if (_1 === (13)) { */ case 12: - $r = p.fmtFloat($clone(f, reflect.Value).Float(), 32, verb); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if (_1 === (14)) { */ case 13: - $r = p.fmtFloat($clone(f, reflect.Value).Float(), 64, verb); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if (_1 === (15)) { */ case 14: - $r = p.fmtComplex($clone(f, reflect.Value).Complex(), 64, verb); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if (_1 === (16)) { */ case 15: - $r = p.fmtComplex($clone(f, reflect.Value).Complex(), 128, verb); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if (_1 === (24)) { */ case 16: - _r$2 = $clone(f, reflect.Value).String(); /* */ $s = 40; case 40: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = p.fmtString(_r$2, verb); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if (_1 === (21)) { */ case 17: - /* */ if (p.fmt.fmtFlags.sharpV) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (p.fmt.fmtFlags.sharpV) { */ case 42: - _r$3 = $clone(f, reflect.Value).Type().String(); /* */ $s = 45; case 45: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r$3); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ($clone(f, reflect.Value).IsNil()) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(nil)"); - $s = -1; return; - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(123); - $s = 44; continue; - /* } else { */ case 43: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("map["); - /* } */ case 44: - _r$4 = fmtsort.Sort($clone(f, reflect.Value)); /* */ $s = 47; case 47: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - sorted = _r$4; - _ref = sorted.Key; - _i = 0; - /* while (true) { */ case 48: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 49; continue; } - i = _i; - key = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i > 0) { - if (p.fmt.fmtFlags.sharpV) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(", "); - } else { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(32); - } - } - $r = p.printValue($clone(key, reflect.Value), verb, depth + 1 >> 0); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(58); - $r = p.printValue($clone((x$1 = sorted.Value, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])), reflect.Value), verb, depth + 1 >> 0); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 48; continue; - case 49: - if (p.fmt.fmtFlags.sharpV) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(125); - } else { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(93); - } - $s = 24; continue; - /* } else if (_1 === (25)) { */ case 18: - /* */ if (p.fmt.fmtFlags.sharpV) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (p.fmt.fmtFlags.sharpV) { */ case 52: - _r$5 = $clone(f, reflect.Value).Type().String(); /* */ $s = 54; case 54: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r$5); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 53: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(123); - i$1 = 0; - /* while (true) { */ case 56: - /* if (!(i$1 < $clone(f, reflect.Value).NumField())) { break; } */ if(!(i$1 < $clone(f, reflect.Value).NumField())) { $s = 57; continue; } - if (i$1 > 0) { - if (p.fmt.fmtFlags.sharpV) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(", "); - } else { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(32); - } - } - /* */ if (p.fmt.fmtFlags.plusV || p.fmt.fmtFlags.sharpV) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (p.fmt.fmtFlags.plusV || p.fmt.fmtFlags.sharpV) { */ case 58: - _r$6 = $clone(f, reflect.Value).Type().Field(i$1); /* */ $s = 60; case 60: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - name = _r$6.Name; - if (!(name === "")) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(name); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(58); - } - /* } */ case 59: - _r$7 = getField($clone(f, reflect.Value), i$1); /* */ $s = 61; case 61: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = p.printValue($clone(_r$7, reflect.Value), verb, depth + 1 >> 0); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$1 = i$1 + (1) >> 0; - $s = 56; continue; - case 57: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(125); - $s = 24; continue; - /* } else if (_1 === (20)) { */ case 19: - _r$8 = $clone(f, reflect.Value).Elem(); /* */ $s = 63; case 63: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - value$1 = _r$8; - /* */ if (!$clone(value$1, reflect.Value).IsValid()) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (!$clone(value$1, reflect.Value).IsValid()) { */ case 64: - /* */ if (p.fmt.fmtFlags.sharpV) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if (p.fmt.fmtFlags.sharpV) { */ case 67: - _r$9 = $clone(f, reflect.Value).Type().String(); /* */ $s = 70; case 70: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r$9); /* */ $s = 71; case 71: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(nil)"); - $s = 69; continue; - /* } else { */ case 68: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - /* } */ case 69: - $s = 66; continue; - /* } else { */ case 65: - $r = p.printValue($clone(value$1, reflect.Value), verb, depth + 1 >> 0); /* */ $s = 72; case 72: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 66: - $s = 24; continue; - /* } else if ((_1 === (17)) || (_1 === (23))) { */ case 20: - _3 = verb; - /* */ if ((_3 === (115)) || (_3 === (113)) || (_3 === (120)) || (_3 === (88))) { $s = 74; continue; } - /* */ $s = 75; continue; - /* if ((_3 === (115)) || (_3 === (113)) || (_3 === (120)) || (_3 === (88))) { */ case 74: - t = $clone(f, reflect.Value).Type(); - _r$10 = t.Elem(); /* */ $s = 78; case 78: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.Kind(); /* */ $s = 79; case 79: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11 === 8) { $s = 76; continue; } - /* */ $s = 77; continue; - /* if (_r$11 === 8) { */ case 76: - bytes = sliceType$2.nil; - /* */ if ($clone(f, reflect.Value).Kind() === 23) { $s = 80; continue; } - /* */ if ($clone(f, reflect.Value).CanAddr()) { $s = 81; continue; } - /* */ $s = 82; continue; - /* if ($clone(f, reflect.Value).Kind() === 23) { */ case 80: - _r$12 = $clone(f, reflect.Value).Bytes(); /* */ $s = 84; case 84: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - bytes = _r$12; - $s = 83; continue; - /* } else if ($clone(f, reflect.Value).CanAddr()) { */ case 81: - _r$13 = $clone(f, reflect.Value).Slice(0, $clone(f, reflect.Value).Len()); /* */ $s = 85; case 85: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Bytes(); /* */ $s = 86; case 86: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - bytes = _r$14; - $s = 83; continue; - /* } else { */ case 82: - bytes = $makeSlice(sliceType$2, $clone(f, reflect.Value).Len()); - _ref$1 = bytes; - _i$1 = 0; - /* while (true) { */ case 87: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 88; continue; } - i$2 = _i$1; - _r$15 = $clone(f, reflect.Value).Index(i$2); /* */ $s = 89; case 89: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, reflect.Value).Uint(); /* */ $s = 90; case 90: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - ((i$2 < 0 || i$2 >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + i$2] = ((_r$16.$low << 24 >>> 24))); - _i$1++; - $s = 87; continue; - case 88: - /* } */ case 83: - _arg = bytes; - _arg$1 = verb; - _r$17 = t.String(); /* */ $s = 91; case 91: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$2 = _r$17; - $r = p.fmtBytes(_arg, _arg$1, _arg$2); /* */ $s = 92; case 92: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 77: - /* } */ case 75: - case 73: - /* */ if (p.fmt.fmtFlags.sharpV) { $s = 93; continue; } - /* */ $s = 94; continue; - /* if (p.fmt.fmtFlags.sharpV) { */ case 93: - _r$18 = $clone(f, reflect.Value).Type().String(); /* */ $s = 96; case 96: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r$18); /* */ $s = 97; case 97: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (($clone(f, reflect.Value).Kind() === 23) && $clone(f, reflect.Value).IsNil()) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(nil)"); - $s = -1; return; - } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(123); - i$3 = 0; - /* while (true) { */ case 98: - /* if (!(i$3 < $clone(f, reflect.Value).Len())) { break; } */ if(!(i$3 < $clone(f, reflect.Value).Len())) { $s = 99; continue; } - if (i$3 > 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(", "); - } - _r$19 = $clone(f, reflect.Value).Index(i$3); /* */ $s = 100; case 100: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $r = p.printValue($clone(_r$19, reflect.Value), verb, depth + 1 >> 0); /* */ $s = 101; case 101: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$3 = i$3 + (1) >> 0; - $s = 98; continue; - case 99: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(125); - $s = 95; continue; - /* } else { */ case 94: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(91); - i$4 = 0; - /* while (true) { */ case 102: - /* if (!(i$4 < $clone(f, reflect.Value).Len())) { break; } */ if(!(i$4 < $clone(f, reflect.Value).Len())) { $s = 103; continue; } - if (i$4 > 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(32); - } - _r$20 = $clone(f, reflect.Value).Index(i$4); /* */ $s = 104; case 104: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $r = p.printValue($clone(_r$20, reflect.Value), verb, depth + 1 >> 0); /* */ $s = 105; case 105: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$4 = i$4 + (1) >> 0; - $s = 102; continue; - case 103: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(93); - /* } */ case 95: - $s = 24; continue; - /* } else if (_1 === (22)) { */ case 21: - /* */ if ((depth === 0) && !(($clone(f, reflect.Value).Pointer() === 0))) { $s = 106; continue; } - /* */ $s = 107; continue; - /* if ((depth === 0) && !(($clone(f, reflect.Value).Pointer() === 0))) { */ case 106: - _r$21 = $clone(f, reflect.Value).Elem(); /* */ $s = 109; case 109: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - a = _r$21; - _4 = $clone(a, reflect.Value).Kind(); - /* */ if ((_4 === (17)) || (_4 === (23)) || (_4 === (25)) || (_4 === (21))) { $s = 110; continue; } - /* */ $s = 111; continue; - /* if ((_4 === (17)) || (_4 === (23)) || (_4 === (25)) || (_4 === (21))) { */ case 110: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(38); - $r = p.printValue($clone(a, reflect.Value), verb, depth + 1 >> 0); /* */ $s = 112; case 112: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 111: - case 108: - /* } */ case 107: - $r = p.fmtPointer($clone(f, reflect.Value), verb); /* */ $s = 113; case 113: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else if ((_1 === (18)) || (_1 === (19)) || (_1 === (26))) { */ case 22: - $r = p.fmtPointer($clone(f, reflect.Value), verb); /* */ $s = 114; case 114: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 24; continue; - /* } else { */ case 23: - $r = p.unknownType($clone(f, reflect.Value)); /* */ $s = 115; case 115: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 24: - case 7: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.printValue, $c: true, $r, _1, _2, _3, _4, _arg, _arg$1, _arg$2, _i, _i$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, a, bytes, depth, f, i, i$1, i$2, i$3, i$4, key, name, p, sorted, t, value, value$1, verb, x, x$1, $s};return $f; - }; - pp.prototype.printValue = function(value, verb, depth) { return this.$val.printValue(value, verb, depth); }; - intFromArg = function(a, argNum) { - var {_1, _r, _tuple, a, argNum, isInt, n, n$1, newArgNum, num, v, x, x$1, x$2, $s, $r, $c} = $restore(this, {a, argNum}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - num = 0; - isInt = false; - newArgNum = 0; - newArgNum = argNum; - /* */ if (argNum < a.$length) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (argNum < a.$length) { */ case 1: - _tuple = $assertType(((argNum < 0 || argNum >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + argNum]), $Int, true); - num = _tuple[0]; - isInt = _tuple[1]; - /* */ if (!isInt) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!isInt) { */ case 3: - _r = reflect.ValueOf(((argNum < 0 || argNum >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + argNum])); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - _1 = $clone(v, reflect.Value).Kind(); - if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - n = $clone(v, reflect.Value).Int(); - if ((x = (new $Int64(0, (((n.$low + ((n.$high >> 31) * 4294967296)) >> 0)))), (x.$high === n.$high && x.$low === n.$low))) { - num = (((n.$low + ((n.$high >> 31) * 4294967296)) >> 0)); - isInt = true; - } - } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { - n$1 = $clone(v, reflect.Value).Uint(); - if ((x$1 = (new $Int64(n$1.$high, n$1.$low)), (x$1.$high > 0 || (x$1.$high === 0 && x$1.$low >= 0))) && (x$2 = (new $Uint64(0, ((n$1.$low >> 0)))), (x$2.$high === n$1.$high && x$2.$low === n$1.$low))) { - num = ((n$1.$low >> 0)); - isInt = true; - } - } - case 5: - /* } */ case 4: - newArgNum = argNum + 1 >> 0; - if (tooLarge(num)) { - num = 0; - isInt = false; - } - /* } */ case 2: - $s = -1; return [num, isInt, newArgNum]; - /* */ } return; } var $f = {$blk: intFromArg, $c: true, $r, _1, _r, _tuple, a, argNum, isInt, n, n$1, newArgNum, num, v, x, x$1, x$2, $s};return $f; - }; - parseArgNumber = function(format) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, format, i, index, newi, ok, ok$1, wid, width; - index = 0; - wid = 0; - ok = false; - if (format.length < 3) { - _tmp = 0; - _tmp$1 = 1; - _tmp$2 = false; - index = _tmp; - wid = _tmp$1; - ok = _tmp$2; - return [index, wid, ok]; - } - i = 1; - while (true) { - if (!(i < format.length)) { break; } - if (format.charCodeAt(i) === 93) { - _tuple = parsenum(format, 1, i); - width = _tuple[0]; - ok$1 = _tuple[1]; - newi = _tuple[2]; - if (!ok$1 || !((newi === i))) { - _tmp$3 = 0; - _tmp$4 = i + 1 >> 0; - _tmp$5 = false; - index = _tmp$3; - wid = _tmp$4; - ok = _tmp$5; - return [index, wid, ok]; - } - _tmp$6 = width - 1 >> 0; - _tmp$7 = i + 1 >> 0; - _tmp$8 = true; - index = _tmp$6; - wid = _tmp$7; - ok = _tmp$8; - return [index, wid, ok]; - } - i = i + (1) >> 0; - } - _tmp$9 = 0; - _tmp$10 = 1; - _tmp$11 = false; - index = _tmp$9; - wid = _tmp$10; - ok = _tmp$11; - return [index, wid, ok]; - }; - pp.ptr.prototype.argNumber = function(argNum, format, i, numArgs) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, argNum, format, found, i, index, newArgNum, newi, numArgs, ok, p, wid; - newArgNum = 0; - newi = 0; - found = false; - p = this; - if (format.length <= i || !((format.charCodeAt(i) === 91))) { - _tmp = argNum; - _tmp$1 = i; - _tmp$2 = false; - newArgNum = _tmp; - newi = _tmp$1; - found = _tmp$2; - return [newArgNum, newi, found]; - } - p.reordered = true; - _tuple = parseArgNumber($substring(format, i)); - index = _tuple[0]; - wid = _tuple[1]; - ok = _tuple[2]; - if (ok && 0 <= index && index < numArgs) { - _tmp$3 = index; - _tmp$4 = i + wid >> 0; - _tmp$5 = true; - newArgNum = _tmp$3; - newi = _tmp$4; - found = _tmp$5; - return [newArgNum, newi, found]; - } - p.goodArgNum = false; - _tmp$6 = argNum; - _tmp$7 = i + wid >> 0; - _tmp$8 = ok; - newArgNum = _tmp$6; - newi = _tmp$7; - found = _tmp$8; - return [newArgNum, newi, found]; - }; - pp.prototype.argNumber = function(argNum, format, i, numArgs) { return this.$val.argNumber(argNum, format, i, numArgs); }; - pp.ptr.prototype.badArgNum = function(verb) { - var p, verb; - p = this; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!"); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeRune(verb); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(BADINDEX)"); - }; - pp.prototype.badArgNum = function(verb) { return this.$val.badArgNum(verb); }; - pp.ptr.prototype.missingArg = function(verb) { - var p, verb; - p = this; - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!"); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeRune(verb); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("(MISSING)"); - }; - pp.prototype.missingArg = function(verb) { return this.$val.missingArg(verb); }; - pp.ptr.prototype.doPrintf = function(format, a) { - var {_1, _i, _r, _r$1, _r$2, _ref, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, a, afterIndex, arg, argNum, c, end, format, i, i$1, lasti, p, size, verb, $s, $r, $c} = $restore(this, {format, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - end = format.length; - argNum = 0; - afterIndex = false; - p.reordered = false; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < end)) { break; } */ if(!(i < end)) { $s = 2; continue; } - p.goodArgNum = true; - lasti = i; - while (true) { - if (!(i < end && !((format.charCodeAt(i) === 37)))) { break; } - i = i + (1) >> 0; - } - if (i > lasti) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString($substring(format, lasti, i)); - } - if (i >= end) { - /* break; */ $s = 2; continue; - } - i = i + (1) >> 0; - p.fmt.clearflags(); - /* while (true) { */ case 3: - /* if (!(i < end)) { break; } */ if(!(i < end)) { $s = 4; continue; } - c = format.charCodeAt(i); - _1 = c; - /* */ if (_1 === (35)) { $s = 6; continue; } - /* */ if (_1 === (48)) { $s = 7; continue; } - /* */ if (_1 === (43)) { $s = 8; continue; } - /* */ if (_1 === (45)) { $s = 9; continue; } - /* */ if (_1 === (32)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (35)) { */ case 6: - p.fmt.fmtFlags.sharp = true; - $s = 12; continue; - /* } else if (_1 === (48)) { */ case 7: - p.fmt.fmtFlags.zero = !p.fmt.fmtFlags.minus; - $s = 12; continue; - /* } else if (_1 === (43)) { */ case 8: - p.fmt.fmtFlags.plus = true; - $s = 12; continue; - /* } else if (_1 === (45)) { */ case 9: - p.fmt.fmtFlags.minus = true; - p.fmt.fmtFlags.zero = false; - $s = 12; continue; - /* } else if (_1 === (32)) { */ case 10: - p.fmt.fmtFlags.space = true; - $s = 12; continue; - /* } else { */ case 11: - /* */ if (97 <= c && c <= 122 && argNum < a.$length) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (97 <= c && c <= 122 && argNum < a.$length) { */ case 13: - if (c === 118) { - p.fmt.fmtFlags.sharpV = p.fmt.fmtFlags.sharp; - p.fmt.fmtFlags.sharp = false; - p.fmt.fmtFlags.plusV = p.fmt.fmtFlags.plus; - p.fmt.fmtFlags.plus = false; - } - $r = p.printArg(((argNum < 0 || argNum >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + argNum]), ((c >> 0))); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - argNum = argNum + (1) >> 0; - i = i + (1) >> 0; - /* continue formatLoop; */ $s = 1; continue s; - /* } */ case 14: - /* break simpleFormat; */ $s = 4; continue s; - /* } */ case 12: - case 5: - i = i + (1) >> 0; - $s = 3; continue; - case 4: - _tuple = p.argNumber(argNum, format, i, a.$length); - argNum = _tuple[0]; - i = _tuple[1]; - afterIndex = _tuple[2]; - /* */ if (i < end && (format.charCodeAt(i) === 42)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (i < end && (format.charCodeAt(i) === 42)) { */ case 16: - i = i + (1) >> 0; - _r = intFromArg(a, argNum); /* */ $s = 19; case 19: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - p.fmt.wid = _tuple$1[0]; - p.fmt.fmtFlags.widPresent = _tuple$1[1]; - argNum = _tuple$1[2]; - if (!p.fmt.fmtFlags.widPresent) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!(BADWIDTH)"); - } - if (p.fmt.wid < 0) { - p.fmt.wid = -p.fmt.wid; - p.fmt.fmtFlags.minus = true; - p.fmt.fmtFlags.zero = false; - } - afterIndex = false; - $s = 18; continue; - /* } else { */ case 17: - _tuple$2 = parsenum(format, i, end); - p.fmt.wid = _tuple$2[0]; - p.fmt.fmtFlags.widPresent = _tuple$2[1]; - i = _tuple$2[2]; - if (afterIndex && p.fmt.fmtFlags.widPresent) { - p.goodArgNum = false; - } - /* } */ case 18: - /* */ if ((i + 1 >> 0) < end && (format.charCodeAt(i) === 46)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if ((i + 1 >> 0) < end && (format.charCodeAt(i) === 46)) { */ case 20: - i = i + (1) >> 0; - if (afterIndex) { - p.goodArgNum = false; - } - _tuple$3 = p.argNumber(argNum, format, i, a.$length); - argNum = _tuple$3[0]; - i = _tuple$3[1]; - afterIndex = _tuple$3[2]; - /* */ if (i < end && (format.charCodeAt(i) === 42)) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (i < end && (format.charCodeAt(i) === 42)) { */ case 22: - i = i + (1) >> 0; - _r$1 = intFromArg(a, argNum); /* */ $s = 25; case 25: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$4 = _r$1; - p.fmt.prec = _tuple$4[0]; - p.fmt.fmtFlags.precPresent = _tuple$4[1]; - argNum = _tuple$4[2]; - if (p.fmt.prec < 0) { - p.fmt.prec = 0; - p.fmt.fmtFlags.precPresent = false; - } - if (!p.fmt.fmtFlags.precPresent) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!(BADPREC)"); - } - afterIndex = false; - $s = 24; continue; - /* } else { */ case 23: - _tuple$5 = parsenum(format, i, end); - p.fmt.prec = _tuple$5[0]; - p.fmt.fmtFlags.precPresent = _tuple$5[1]; - i = _tuple$5[2]; - if (!p.fmt.fmtFlags.precPresent) { - p.fmt.prec = 0; - p.fmt.fmtFlags.precPresent = true; - } - /* } */ case 24: - /* } */ case 21: - if (!afterIndex) { - _tuple$6 = p.argNumber(argNum, format, i, a.$length); - argNum = _tuple$6[0]; - i = _tuple$6[1]; - afterIndex = _tuple$6[2]; - } - if (i >= end) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!(NOVERB)"); - /* break; */ $s = 2; continue; - } - _tmp = ((format.charCodeAt(i) >> 0)); - _tmp$1 = 1; - verb = _tmp; - size = _tmp$1; - if (verb >= 128) { - _tuple$7 = utf8.DecodeRuneInString($substring(format, i)); - verb = _tuple$7[0]; - size = _tuple$7[1]; - } - i = i + (size) >> 0; - /* */ if ((verb === 37)) { $s = 27; continue; } - /* */ if (!p.goodArgNum) { $s = 28; continue; } - /* */ if (argNum >= a.$length) { $s = 29; continue; } - /* */ if ((verb === 118)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if ((verb === 37)) { */ case 27: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(37); - $s = 32; continue; - /* } else if (!p.goodArgNum) { */ case 28: - p.badArgNum(verb); - $s = 32; continue; - /* } else if (argNum >= a.$length) { */ case 29: - p.missingArg(verb); - $s = 32; continue; - /* } else if ((verb === 118)) { */ case 30: - p.fmt.fmtFlags.sharpV = p.fmt.fmtFlags.sharp; - p.fmt.fmtFlags.sharp = false; - p.fmt.fmtFlags.plusV = p.fmt.fmtFlags.plus; - p.fmt.fmtFlags.plus = false; - $r = p.printArg(((argNum < 0 || argNum >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + argNum]), verb); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - argNum = argNum + (1) >> 0; - $s = 32; continue; - /* } else { */ case 31: - $r = p.printArg(((argNum < 0 || argNum >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + argNum]), verb); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - argNum = argNum + (1) >> 0; - /* } */ case 32: - case 26: - $s = 1; continue; - case 2: - /* */ if (!p.reordered && argNum < a.$length) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!p.reordered && argNum < a.$length) { */ case 35: - p.fmt.clearflags(); - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString("%!(EXTRA "); - _ref = $subslice(a, argNum); - _i = 0; - /* while (true) { */ case 37: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 38; continue; } - i$1 = _i; - arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i$1 > 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(", "); - } - /* */ if ($interfaceIsEqual(arg, $ifaceNil)) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if ($interfaceIsEqual(arg, $ifaceNil)) { */ case 39: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(""); - $s = 41; continue; - /* } else { */ case 40: - _r$2 = reflect.TypeOf(arg).String(); /* */ $s = 42; case 42: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeString(_r$2); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(61); - $r = p.printArg(arg, 118); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 41: - _i++; - $s = 37; continue; - case 38: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(41); - /* } */ case 36: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.doPrintf, $c: true, $r, _1, _i, _r, _r$1, _r$2, _ref, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, a, afterIndex, arg, argNum, c, end, format, i, i$1, lasti, p, size, verb, $s};return $f; - }; - pp.prototype.doPrintf = function(format, a) { return this.$val.doPrintf(format, a); }; - pp.ptr.prototype.doPrint = function(a) { - var {_i, _r, _ref, _v, a, arg, argNum, isString, p, prevString, $s, $r, $c} = $restore(this, {a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - prevString = false; - _ref = a; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - argNum = _i; - arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!(!($interfaceIsEqual(arg, $ifaceNil)))) { _v = false; $s = 3; continue s; } - _r = reflect.TypeOf(arg).Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r === 24; case 3: - isString = _v; - if (argNum > 0 && !isString && !prevString) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(32); - } - $r = p.printArg(arg, 118); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - prevString = isString; - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.doPrint, $c: true, $r, _i, _r, _ref, _v, a, arg, argNum, isString, p, prevString, $s};return $f; - }; - pp.prototype.doPrint = function(a) { return this.$val.doPrint(a); }; - pp.ptr.prototype.doPrintln = function(a) { - var {_i, _ref, a, arg, argNum, p, $s, $r, $c} = $restore(this, {a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _ref = a; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - argNum = _i; - arg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (argNum > 0) { - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(32); - } - $r = p.printArg(arg, 118); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - (p.$ptr_buf || (p.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, p))).writeByte(10); - $s = -1; return; - /* */ } return; } var $f = {$blk: pp.ptr.prototype.doPrintln, $c: true, $r, _i, _ref, a, arg, argNum, p, $s};return $f; - }; - pp.prototype.doPrintln = function(a) { return this.$val.doPrintln(a); }; - fmt.ptr.prototype.clearflags = function() { - var f; - f = this; - fmtFlags.copy(f.fmtFlags, new fmtFlags.ptr(false, false, false, false, false, false, false, false, false)); - }; - fmt.prototype.clearflags = function() { return this.$val.clearflags(); }; - fmt.ptr.prototype.init = function(buf) { - var buf, f; - f = this; - f.buf = buf; - f.clearflags(); - }; - fmt.prototype.init = function(buf) { return this.$val.init(buf); }; - fmt.ptr.prototype.writePadding = function(n) { - var _i, _ref, buf, f, i, n, newLen, oldLen, padByte, padding; - f = this; - if (n <= 0) { - return; - } - buf = f.buf.$get(); - oldLen = buf.$length; - newLen = oldLen + n >> 0; - if (newLen > buf.$capacity) { - buf = $makeSlice(buffer, (($imul(buf.$capacity, 2)) + n >> 0)); - $copySlice(buf, f.buf.$get()); - } - padByte = 32; - if (f.fmtFlags.zero) { - padByte = 48; - } - padding = $subslice(buf, oldLen, newLen); - _ref = padding; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= padding.$length) ? ($throwRuntimeError("index out of range"), undefined) : padding.$array[padding.$offset + i] = padByte); - _i++; - } - f.buf.$set($subslice(buf, 0, newLen)); - }; - fmt.prototype.writePadding = function(n) { return this.$val.writePadding(n); }; - fmt.ptr.prototype.pad = function(b) { - var b, f, width; - f = this; - if (!f.fmtFlags.widPresent || (f.wid === 0)) { - f.buf.write(b); - return; - } - width = f.wid - utf8.RuneCount(b) >> 0; - if (!f.fmtFlags.minus) { - f.writePadding(width); - f.buf.write(b); - } else { - f.buf.write(b); - f.writePadding(width); - } - }; - fmt.prototype.pad = function(b) { return this.$val.pad(b); }; - fmt.ptr.prototype.padString = function(s) { - var f, s, width; - f = this; - if (!f.fmtFlags.widPresent || (f.wid === 0)) { - f.buf.writeString(s); - return; - } - width = f.wid - utf8.RuneCountInString(s) >> 0; - if (!f.fmtFlags.minus) { - f.writePadding(width); - f.buf.writeString(s); - } else { - f.buf.writeString(s); - f.writePadding(width); - } - }; - fmt.prototype.padString = function(s) { return this.$val.padString(s); }; - fmt.ptr.prototype.fmtBoolean = function(v) { - var f, v; - f = this; - if (v) { - f.padString("true"); - } else { - f.padString("false"); - } - }; - fmt.prototype.fmtBoolean = function(v) { return this.$val.fmtBoolean(v); }; - fmt.ptr.prototype.fmtUnicode = function(u) { - var buf, f, i, oldZero, prec, u, width; - f = this; - buf = $subslice(new sliceType$2(f.intbuf), 0); - prec = 4; - if (f.fmtFlags.precPresent && f.prec > 4) { - prec = f.prec; - width = (((2 + prec >> 0) + 2 >> 0) + 4 >> 0) + 1 >> 0; - if (width > buf.$length) { - buf = $makeSlice(sliceType$2, width); - } - } - i = buf.$length; - if (f.fmtFlags.sharp && (u.$high < 0 || (u.$high === 0 && u.$low <= 1114111)) && strconv.IsPrint(((u.$low >> 0)))) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 39); - i = i - (utf8.RuneLen(((u.$low >> 0)))) >> 0; - utf8.EncodeRune($subslice(buf, i), ((u.$low >> 0))); - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 39); - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 32); - } - while (true) { - if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 16)))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = "0123456789ABCDEFX".charCodeAt($flatten64(new $Uint64(u.$high & 0, (u.$low & 15) >>> 0)))); - prec = prec - (1) >> 0; - u = $shiftRightUint64(u, (4)); - } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = "0123456789ABCDEFX".charCodeAt($flatten64(u))); - prec = prec - (1) >> 0; - while (true) { - if (!(prec > 0)) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 48); - prec = prec - (1) >> 0; - } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 43); - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 85); - oldZero = f.fmtFlags.zero; - f.fmtFlags.zero = false; - f.pad($subslice(buf, i)); - f.fmtFlags.zero = oldZero; - }; - fmt.prototype.fmtUnicode = function(u) { return this.$val.fmtUnicode(u); }; - fmt.ptr.prototype.fmtInteger = function(u, base, isSigned, verb, digits) { - var _1, _2, base, buf, digits, f, i, isSigned, negative, next, oldZero, oldZero$1, prec, u, verb, width, x, x$1, x$2, x$3, x$4; - f = this; - negative = isSigned && (x = (new $Int64(u.$high, u.$low)), (x.$high < 0 || (x.$high === 0 && x.$low < 0))); - if (negative) { - u = new $Uint64(-u.$high, -u.$low); - } - buf = $subslice(new sliceType$2(f.intbuf), 0); - if (f.fmtFlags.widPresent || f.fmtFlags.precPresent) { - width = (3 + f.wid >> 0) + f.prec >> 0; - if (width > buf.$length) { - buf = $makeSlice(sliceType$2, width); - } - } - prec = 0; - if (f.fmtFlags.precPresent) { - prec = f.prec; - if ((prec === 0) && (u.$high === 0 && u.$low === 0)) { - oldZero = f.fmtFlags.zero; - f.fmtFlags.zero = false; - f.writePadding(f.wid); - f.fmtFlags.zero = oldZero; - return; - } - } else if (f.fmtFlags.zero && f.fmtFlags.widPresent) { - prec = f.wid; - if (negative || f.fmtFlags.plus || f.fmtFlags.space) { - prec = prec - (1) >> 0; - } - } - i = buf.$length; - _1 = base; - if (_1 === (10)) { - while (true) { - if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 10)))) { break; } - i = i - (1) >> 0; - next = $div64(u, new $Uint64(0, 10), false); - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (((x$1 = new $Uint64(0 + u.$high, 48 + u.$low), x$2 = $mul64(next, new $Uint64(0, 10)), new $Uint64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)).$low << 24 >>> 24))); - u = next; - } - } else if (_1 === (16)) { - while (true) { - if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 16)))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(new $Uint64(u.$high & 0, (u.$low & 15) >>> 0)))); - u = $shiftRightUint64(u, (4)); - } - } else if (_1 === (8)) { - while (true) { - if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 8)))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (((x$3 = new $Uint64(u.$high & 0, (u.$low & 7) >>> 0), new $Uint64(0 + x$3.$high, 48 + x$3.$low)).$low << 24 >>> 24))); - u = $shiftRightUint64(u, (3)); - } - } else if (_1 === (2)) { - while (true) { - if (!((u.$high > 0 || (u.$high === 0 && u.$low >= 2)))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = (((x$4 = new $Uint64(u.$high & 0, (u.$low & 1) >>> 0), new $Uint64(0 + x$4.$high, 48 + x$4.$low)).$low << 24 >>> 24))); - u = $shiftRightUint64(u, (1)); - } - } else { - $panic(new $String("fmt: unknown base; can't happen")); - } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = digits.charCodeAt($flatten64(u))); - while (true) { - if (!(i > 0 && prec > (buf.$length - i >> 0))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 48); - } - if (f.fmtFlags.sharp) { - _2 = base; - if (_2 === (2)) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 98); - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 48); - } else if (_2 === (8)) { - if (!((((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i]) === 48))) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 48); - } - } else if (_2 === (16)) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = digits.charCodeAt(16)); - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 48); - } - } - if (verb === 79) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 111); - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 48); - } - if (negative) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 45); - } else if (f.fmtFlags.plus) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 43); - } else if (f.fmtFlags.space) { - i = i - (1) >> 0; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 32); - } - oldZero$1 = f.fmtFlags.zero; - f.fmtFlags.zero = false; - f.pad($subslice(buf, i)); - f.fmtFlags.zero = oldZero$1; - }; - fmt.prototype.fmtInteger = function(u, base, isSigned, verb, digits) { return this.$val.fmtInteger(u, base, isSigned, verb, digits); }; - fmt.ptr.prototype.truncateString = function(s) { - var _i, _ref, _rune, f, i, n, s; - f = this; - if (f.fmtFlags.precPresent) { - n = f.prec; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - n = n - (1) >> 0; - if (n < 0) { - return $substring(s, 0, i); - } - _i += _rune[1]; - } - } - return s; - }; - fmt.prototype.truncateString = function(s) { return this.$val.truncateString(s); }; - fmt.ptr.prototype.truncate = function(b) { - var _tuple, b, f, i, n, wid; - f = this; - if (f.fmtFlags.precPresent) { - n = f.prec; - i = 0; - while (true) { - if (!(i < b.$length)) { break; } - n = n - (1) >> 0; - if (n < 0) { - return $subslice(b, 0, i); - } - wid = 1; - if (((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]) >= 128) { - _tuple = utf8.DecodeRune($subslice(b, i)); - wid = _tuple[1]; - } - i = i + (wid) >> 0; - } - } - return b; - }; - fmt.prototype.truncate = function(b) { return this.$val.truncate(b); }; - fmt.ptr.prototype.fmtS = function(s) { - var f, s; - f = this; - s = f.truncateString(s); - f.padString(s); - }; - fmt.prototype.fmtS = function(s) { return this.$val.fmtS(s); }; - fmt.ptr.prototype.fmtBs = function(b) { - var b, f; - f = this; - b = f.truncate(b); - f.pad(b); - }; - fmt.prototype.fmtBs = function(b) { return this.$val.fmtBs(b); }; - fmt.ptr.prototype.fmtSbx = function(s, b, digits) { - var b, buf, c, digits, f, i, length, s, width; - f = this; - length = b.$length; - if (b === sliceType$2.nil) { - length = s.length; - } - if (f.fmtFlags.precPresent && f.prec < length) { - length = f.prec; - } - width = $imul(2, length); - if (width > 0) { - if (f.fmtFlags.space) { - if (f.fmtFlags.sharp) { - width = $imul(width, (2)); - } - width = width + ((length - 1 >> 0)) >> 0; - } else if (f.fmtFlags.sharp) { - width = width + (2) >> 0; - } - } else { - if (f.fmtFlags.widPresent) { - f.writePadding(f.wid); - } - return; - } - if (f.fmtFlags.widPresent && f.wid > width && !f.fmtFlags.minus) { - f.writePadding(f.wid - width >> 0); - } - buf = f.buf.$get(); - if (f.fmtFlags.sharp) { - buf = $append(buf, 48, digits.charCodeAt(16)); - } - c = 0; - i = 0; - while (true) { - if (!(i < length)) { break; } - if (f.fmtFlags.space && i > 0) { - buf = $append(buf, 32); - if (f.fmtFlags.sharp) { - buf = $append(buf, 48, digits.charCodeAt(16)); - } - } - if (!(b === sliceType$2.nil)) { - c = ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]); - } else { - c = s.charCodeAt(i); - } - buf = $append(buf, digits.charCodeAt((c >>> 4 << 24 >>> 24)), digits.charCodeAt(((c & 15) >>> 0))); - i = i + (1) >> 0; - } - f.buf.$set(buf); - if (f.fmtFlags.widPresent && f.wid > width && f.fmtFlags.minus) { - f.writePadding(f.wid - width >> 0); - } - }; - fmt.prototype.fmtSbx = function(s, b, digits) { return this.$val.fmtSbx(s, b, digits); }; - fmt.ptr.prototype.fmtSx = function(s, digits) { - var digits, f, s; - f = this; - f.fmtSbx(s, sliceType$2.nil, digits); - }; - fmt.prototype.fmtSx = function(s, digits) { return this.$val.fmtSx(s, digits); }; - fmt.ptr.prototype.fmtBx = function(b, digits) { - var b, digits, f; - f = this; - f.fmtSbx("", b, digits); - }; - fmt.prototype.fmtBx = function(b, digits) { return this.$val.fmtBx(b, digits); }; - fmt.ptr.prototype.fmtQ = function(s) { - var buf, f, s; - f = this; - s = f.truncateString(s); - if (f.fmtFlags.sharp && strconv.CanBackquote(s)) { - f.padString("`" + s + "`"); - return; - } - buf = $subslice(new sliceType$2(f.intbuf), 0, 0); - if (f.fmtFlags.plus) { - f.pad(strconv.AppendQuoteToASCII(buf, s)); - } else { - f.pad(strconv.AppendQuote(buf, s)); - } - }; - fmt.prototype.fmtQ = function(s) { return this.$val.fmtQ(s); }; - fmt.ptr.prototype.fmtC = function(c) { - var buf, c, f, r, w; - f = this; - r = ((c.$low >> 0)); - if ((c.$high > 0 || (c.$high === 0 && c.$low > 1114111))) { - r = 65533; - } - buf = $subslice(new sliceType$2(f.intbuf), 0, 0); - w = utf8.EncodeRune($subslice(buf, 0, 4), r); - f.pad($subslice(buf, 0, w)); - }; - fmt.prototype.fmtC = function(c) { return this.$val.fmtC(c); }; - fmt.ptr.prototype.fmtQc = function(c) { - var buf, c, f, r; - f = this; - r = ((c.$low >> 0)); - if ((c.$high > 0 || (c.$high === 0 && c.$low > 1114111))) { - r = 65533; - } - buf = $subslice(new sliceType$2(f.intbuf), 0, 0); - if (f.fmtFlags.plus) { - f.pad(strconv.AppendQuoteRuneToASCII(buf, r)); - } else { - f.pad(strconv.AppendQuoteRune(buf, r)); - } - }; - fmt.prototype.fmtQc = function(c) { return this.$val.fmtQc(c); }; - fmt.ptr.prototype.fmtFloat = function(v, size, verb, prec) { - var _1, _2, digits, f, hasDecimalPoint, i, num, oldZero, prec, sawNonzeroDigit, size, tail, tailBuf, v, verb; - f = this; - if (f.fmtFlags.precPresent) { - prec = f.prec; - } - num = strconv.AppendFloat($subslice(new sliceType$2(f.intbuf), 0, 1), v, ((verb << 24 >>> 24)), prec, size); - if (((1 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 1]) === 45) || ((1 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 1]) === 43)) { - num = $subslice(num, 1); - } else { - (0 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 0] = 43); - } - if (f.fmtFlags.space && ((0 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 0]) === 43) && !f.fmtFlags.plus) { - (0 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 0] = 32); - } - if (((1 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 1]) === 73) || ((1 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 1]) === 78)) { - oldZero = f.fmtFlags.zero; - f.fmtFlags.zero = false; - if (((1 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 1]) === 78) && !f.fmtFlags.space && !f.fmtFlags.plus) { - num = $subslice(num, 1); - } - f.pad(num); - f.fmtFlags.zero = oldZero; - return; - } - if (f.fmtFlags.sharp && !((verb === 98))) { - digits = 0; - _1 = verb; - if ((_1 === (118)) || (_1 === (103)) || (_1 === (71)) || (_1 === (120))) { - digits = prec; - if (digits === -1) { - digits = 6; - } - } - tailBuf = arrayType$3.zero(); - tail = $subslice(new sliceType$2(tailBuf), 0, 0); - hasDecimalPoint = false; - sawNonzeroDigit = false; - i = 1; - while (true) { - if (!(i < num.$length)) { break; } - switch (0) { default: - _2 = ((i < 0 || i >= num.$length) ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + i]); - if (_2 === (46)) { - hasDecimalPoint = true; - } else if ((_2 === (112)) || (_2 === (80))) { - tail = $appendSlice(tail, $subslice(num, i)); - num = $subslice(num, 0, i); - } else if ((_2 === (101)) || (_2 === (69))) { - if (!((verb === 120)) && !((verb === 88))) { - tail = $appendSlice(tail, $subslice(num, i)); - num = $subslice(num, 0, i); - break; - } - if (!((((i < 0 || i >= num.$length) ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + i]) === 48))) { - sawNonzeroDigit = true; - } - if (sawNonzeroDigit) { - digits = digits - (1) >> 0; - } - } else { - if (!((((i < 0 || i >= num.$length) ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + i]) === 48))) { - sawNonzeroDigit = true; - } - if (sawNonzeroDigit) { - digits = digits - (1) >> 0; - } - } - } - i = i + (1) >> 0; - } - if (!hasDecimalPoint) { - if ((num.$length === 2) && ((1 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 1]) === 48)) { - digits = digits - (1) >> 0; - } - num = $append(num, 46); - } - while (true) { - if (!(digits > 0)) { break; } - num = $append(num, 48); - digits = digits - (1) >> 0; - } - num = $appendSlice(num, tail); - } - if (f.fmtFlags.plus || !(((0 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 0]) === 43))) { - if (f.fmtFlags.zero && f.fmtFlags.widPresent && f.wid > num.$length) { - f.buf.writeByte((0 >= num.$length ? ($throwRuntimeError("index out of range"), undefined) : num.$array[num.$offset + 0])); - f.writePadding(f.wid - num.$length >> 0); - f.buf.write($subslice(num, 1)); - return; - } - f.pad(num); - return; - } - f.pad($subslice(num, 1)); - }; - fmt.prototype.fmtFloat = function(v, size, verb, prec) { return this.$val.fmtFloat(v, size, verb, prec); }; - Errorf = function(format, a) { - var {_r, a, err, format, p, s, $s, $r, $c} = $restore(this, {format, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newPrinter(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - p.wrapErrs = true; - $r = p.doPrintf(format, a); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = ($bytesToString(p.buf)); - err = $ifaceNil; - if ($interfaceIsEqual(p.wrappedErr, $ifaceNil)) { - err = errors.New(s); - } else { - err = new wrapError.ptr(s, p.wrappedErr); - } - p.free(); - $s = -1; return err; - /* */ } return; } var $f = {$blk: Errorf, $c: true, $r, _r, a, err, format, p, s, $s};return $f; - }; - $pkg.Errorf = Errorf; - wrapError.ptr.prototype.Error = function() { - var e; - e = this; - return e.msg; - }; - wrapError.prototype.Error = function() { return this.$val.Error(); }; - wrapError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.err; - }; - wrapError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - ptrType$4.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "getRune", name: "getRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "mustReadRune", name: "mustReadRune", pkg: "fmt", typ: $funcType([], [$Int32], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "error", name: "error", pkg: "fmt", typ: $funcType([$error], [], false)}, {prop: "errorString", name: "errorString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([$Bool, funcType], [sliceType$2, $error], false)}, {prop: "free", name: "free", pkg: "fmt", typ: $funcType([ssave], [], false)}, {prop: "SkipSpace", name: "SkipSpace", pkg: "", typ: $funcType([], [], false)}, {prop: "token", name: "token", pkg: "fmt", typ: $funcType([$Bool, funcType], [sliceType$2], false)}, {prop: "consume", name: "consume", pkg: "fmt", typ: $funcType([$String, $Bool], [$Bool], false)}, {prop: "peek", name: "peek", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "notEOF", name: "notEOF", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "accept", name: "accept", pkg: "fmt", typ: $funcType([$String], [$Bool], false)}, {prop: "okVerb", name: "okVerb", pkg: "fmt", typ: $funcType([$Int32, $String, $String], [$Bool], false)}, {prop: "scanBool", name: "scanBool", pkg: "fmt", typ: $funcType([$Int32], [$Bool], false)}, {prop: "getBase", name: "getBase", pkg: "fmt", typ: $funcType([$Int32], [$Int, $String], false)}, {prop: "scanNumber", name: "scanNumber", pkg: "fmt", typ: $funcType([$String, $Bool], [$String], false)}, {prop: "scanRune", name: "scanRune", pkg: "fmt", typ: $funcType([$Int], [$Int64], false)}, {prop: "scanBasePrefix", name: "scanBasePrefix", pkg: "fmt", typ: $funcType([], [$Int, $String, $Bool], false)}, {prop: "scanInt", name: "scanInt", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Int64], false)}, {prop: "scanUint", name: "scanUint", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Uint64], false)}, {prop: "floatToken", name: "floatToken", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "complexTokens", name: "complexTokens", pkg: "fmt", typ: $funcType([], [$String, $String], false)}, {prop: "convertFloat", name: "convertFloat", pkg: "fmt", typ: $funcType([$String, $Int], [$Float64], false)}, {prop: "scanComplex", name: "scanComplex", pkg: "fmt", typ: $funcType([$Int32, $Int], [$Complex128], false)}, {prop: "convertString", name: "convertString", pkg: "fmt", typ: $funcType([$Int32], [$String], false)}, {prop: "quotedString", name: "quotedString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "hexByte", name: "hexByte", pkg: "fmt", typ: $funcType([], [$Uint8, $Bool], false)}, {prop: "hexString", name: "hexString", pkg: "fmt", typ: $funcType([], [$String], false)}, {prop: "scanPercent", name: "scanPercent", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "scanOne", name: "scanOne", pkg: "fmt", typ: $funcType([$Int32, $emptyInterface], [], false)}, {prop: "doScan", name: "doScan", pkg: "fmt", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "advance", name: "advance", pkg: "fmt", typ: $funcType([$String], [$Int], false)}, {prop: "doScanf", name: "doScanf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [$Int, $error], false)}]; - ptrType$1.methods = [{prop: "write", name: "write", pkg: "fmt", typ: $funcType([sliceType$2], [], false)}, {prop: "writeString", name: "writeString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "writeByte", name: "writeByte", pkg: "fmt", typ: $funcType([$Uint8], [], false)}, {prop: "writeRune", name: "writeRune", pkg: "fmt", typ: $funcType([$Int32], [], false)}]; - ptrType$24.methods = [{prop: "free", name: "free", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "unknownType", name: "unknownType", pkg: "fmt", typ: $funcType([reflect.Value], [], false)}, {prop: "badVerb", name: "badVerb", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "fmtBool", name: "fmtBool", pkg: "fmt", typ: $funcType([$Bool, $Int32], [], false)}, {prop: "fmt0x64", name: "fmt0x64", pkg: "fmt", typ: $funcType([$Uint64, $Bool], [], false)}, {prop: "fmtInteger", name: "fmtInteger", pkg: "fmt", typ: $funcType([$Uint64, $Bool, $Int32], [], false)}, {prop: "fmtFloat", name: "fmtFloat", pkg: "fmt", typ: $funcType([$Float64, $Int, $Int32], [], false)}, {prop: "fmtComplex", name: "fmtComplex", pkg: "fmt", typ: $funcType([$Complex128, $Int, $Int32], [], false)}, {prop: "fmtString", name: "fmtString", pkg: "fmt", typ: $funcType([$String, $Int32], [], false)}, {prop: "fmtBytes", name: "fmtBytes", pkg: "fmt", typ: $funcType([sliceType$2, $Int32, $String], [], false)}, {prop: "fmtPointer", name: "fmtPointer", pkg: "fmt", typ: $funcType([reflect.Value, $Int32], [], false)}, {prop: "catchPanic", name: "catchPanic", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32, $String], [], false)}, {prop: "handleMethods", name: "handleMethods", pkg: "fmt", typ: $funcType([$Int32], [$Bool], false)}, {prop: "printArg", name: "printArg", pkg: "fmt", typ: $funcType([$emptyInterface, $Int32], [], false)}, {prop: "printValue", name: "printValue", pkg: "fmt", typ: $funcType([reflect.Value, $Int32, $Int], [], false)}, {prop: "argNumber", name: "argNumber", pkg: "fmt", typ: $funcType([$Int, $String, $Int, $Int], [$Int, $Int, $Bool], false)}, {prop: "badArgNum", name: "badArgNum", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "missingArg", name: "missingArg", pkg: "fmt", typ: $funcType([$Int32], [], false)}, {prop: "doPrintf", name: "doPrintf", pkg: "fmt", typ: $funcType([$String, sliceType$1], [], false)}, {prop: "doPrint", name: "doPrint", pkg: "fmt", typ: $funcType([sliceType$1], [], false)}, {prop: "doPrintln", name: "doPrintln", pkg: "fmt", typ: $funcType([sliceType$1], [], false)}]; - ptrType$26.methods = [{prop: "clearflags", name: "clearflags", pkg: "fmt", typ: $funcType([], [], false)}, {prop: "init", name: "init", pkg: "fmt", typ: $funcType([ptrType$1], [], false)}, {prop: "writePadding", name: "writePadding", pkg: "fmt", typ: $funcType([$Int], [], false)}, {prop: "pad", name: "pad", pkg: "fmt", typ: $funcType([sliceType$2], [], false)}, {prop: "padString", name: "padString", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmtBoolean", name: "fmtBoolean", pkg: "fmt", typ: $funcType([$Bool], [], false)}, {prop: "fmtUnicode", name: "fmtUnicode", pkg: "fmt", typ: $funcType([$Uint64], [], false)}, {prop: "fmtInteger", name: "fmtInteger", pkg: "fmt", typ: $funcType([$Uint64, $Int, $Bool, $Int32, $String], [], false)}, {prop: "truncateString", name: "truncateString", pkg: "fmt", typ: $funcType([$String], [$String], false)}, {prop: "truncate", name: "truncate", pkg: "fmt", typ: $funcType([sliceType$2], [sliceType$2], false)}, {prop: "fmtS", name: "fmtS", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmtBs", name: "fmtBs", pkg: "fmt", typ: $funcType([sliceType$2], [], false)}, {prop: "fmtSbx", name: "fmtSbx", pkg: "fmt", typ: $funcType([$String, sliceType$2, $String], [], false)}, {prop: "fmtSx", name: "fmtSx", pkg: "fmt", typ: $funcType([$String, $String], [], false)}, {prop: "fmtBx", name: "fmtBx", pkg: "fmt", typ: $funcType([sliceType$2, $String], [], false)}, {prop: "fmtQ", name: "fmtQ", pkg: "fmt", typ: $funcType([$String], [], false)}, {prop: "fmtC", name: "fmtC", pkg: "fmt", typ: $funcType([$Uint64], [], false)}, {prop: "fmtQc", name: "fmtQc", pkg: "fmt", typ: $funcType([$Uint64], [], false)}, {prop: "fmtFloat", name: "fmtFloat", pkg: "fmt", typ: $funcType([$Float64, $Int, $Int32, $Int], [], false)}]; - ptrType$27.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - ScanState.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}, {prop: "ReadRune", name: "ReadRune", pkg: "", typ: $funcType([], [$Int32, $Int, $error], false)}, {prop: "SkipSpace", name: "SkipSpace", pkg: "", typ: $funcType([], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([$Bool, funcType], [sliceType$2, $error], false)}, {prop: "UnreadRune", name: "UnreadRune", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}]); - scanError.init("fmt", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - ss.init("fmt", [{prop: "rs", name: "rs", embedded: false, exported: false, typ: io.RuneScanner, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: buffer, tag: ""}, {prop: "count", name: "count", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "atEOF", name: "atEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ssave", name: "ssave", embedded: true, exported: false, typ: ssave, tag: ""}]); - ssave.init("fmt", [{prop: "validSave", name: "validSave", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "nlIsEnd", name: "nlIsEnd", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "nlIsSpace", name: "nlIsSpace", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "argLimit", name: "argLimit", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "limit", name: "limit", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "maxWid", name: "maxWid", embedded: false, exported: false, typ: $Int, tag: ""}]); - State.init([{prop: "Flag", name: "Flag", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "Precision", name: "Precision", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int, $Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$2], [$Int, $error], false)}]); - Formatter.init([{prop: "Format", name: "Format", pkg: "", typ: $funcType([State, $Int32], [], false)}]); - Stringer.init([{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); - GoStringer.init([{prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]); - buffer.init($Uint8); - pp.init("fmt", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: buffer, tag: ""}, {prop: "arg", name: "arg", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "fmt", name: "fmt", embedded: false, exported: false, typ: fmt, tag: ""}, {prop: "reordered", name: "reordered", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goodArgNum", name: "goodArgNum", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "panicking", name: "panicking", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "erroring", name: "erroring", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wrapErrs", name: "wrapErrs", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wrappedErr", name: "wrappedErr", embedded: false, exported: false, typ: $error, tag: ""}]); - fmtFlags.init("fmt", [{prop: "widPresent", name: "widPresent", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "precPresent", name: "precPresent", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "minus", name: "minus", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "plus", name: "plus", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sharp", name: "sharp", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "space", name: "space", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "zero", name: "zero", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "plusV", name: "plusV", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sharpV", name: "sharpV", embedded: false, exported: false, typ: $Bool, tag: ""}]); - fmt.init("fmt", [{prop: "buf", name: "buf", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "fmtFlags", name: "fmtFlags", embedded: true, exported: false, typ: fmtFlags, tag: ""}, {prop: "wid", name: "wid", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "prec", name: "prec", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "intbuf", name: "intbuf", embedded: false, exported: false, typ: arrayType$1, tag: ""}]); - wrapError.init("fmt", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmtsort.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - space = new sliceType([$toNativeArray($kindUint16, [9, 13]), $toNativeArray($kindUint16, [32, 32]), $toNativeArray($kindUint16, [133, 133]), $toNativeArray($kindUint16, [160, 160]), $toNativeArray($kindUint16, [5760, 5760]), $toNativeArray($kindUint16, [8192, 8202]), $toNativeArray($kindUint16, [8232, 8233]), $toNativeArray($kindUint16, [8239, 8239]), $toNativeArray($kindUint16, [8287, 8287]), $toNativeArray($kindUint16, [12288, 12288])]); - ssFree = new sync.Pool.ptr(sliceType$1.nil, (function() { - return new ss.ptr($ifaceNil, buffer.nil, 0, false, new ssave.ptr(false, false, false, 0, 0, 0)); - })); - complexError = errors.New("syntax error scanning complex number"); - boolError = errors.New("syntax error scanning boolean"); - ppFree = new sync.Pool.ptr(sliceType$1.nil, (function() { - return new pp.ptr(buffer.nil, $ifaceNil, new reflect.Value.ptr(ptrType.nil, 0, 0), new fmt.ptr(ptrType$1.nil, new fmtFlags.ptr(false, false, false, false, false, false, false, false, false), 0, 0, arrayType$1.zero()), false, false, false, false, false, $ifaceNil); - })); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["compress/flate"] = (function() { - var $pkg = {}, $init, bufio, fmt, io, math, bits, sort, strconv, sync, CorruptInputError, InternalError, Resetter, huffmanDecoder, Reader, decompressor, hcode, huffmanEncoder, literalNode, levelInfo, byLiteral, byFreq, dictDecoder, arrayType, sliceType, sliceType$1, ptrType, arrayType$1, ptrType$1, sliceType$4, ptrType$2, sliceType$5, arrayType$2, arrayType$3, ptrType$3, arrayType$4, ptrType$4, arrayType$5, sliceType$6, sliceType$7, arrayType$6, arrayType$7, arrayType$8, arrayType$9, sliceType$8, ptrType$5, ptrType$6, funcType, ptrType$15, ptrType$16, fixedOnce, fixedHuffmanDecoder, fixedHuffmanDecoder$24ptr, codeOrder, fixedLiteralEncoding, fixedOffsetEncoding, huffOffset, noEOF, makeReader, fixedHuffmanDecoderInit, NewReader, maxNode, newHuffmanEncoder, generateFixedLiteralEncoding, generateFixedOffsetEncoding, reverseBits, init; - bufio = $packages["bufio"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - sync = $packages["sync"]; - CorruptInputError = $pkg.CorruptInputError = $newType(8, $kindInt64, "flate.CorruptInputError", true, "compress/flate", true, null); - InternalError = $pkg.InternalError = $newType(8, $kindString, "flate.InternalError", true, "compress/flate", true, null); - Resetter = $pkg.Resetter = $newType(8, $kindInterface, "flate.Resetter", true, "compress/flate", true, null); - huffmanDecoder = $pkg.huffmanDecoder = $newType(0, $kindStruct, "flate.huffmanDecoder", true, "compress/flate", false, function(min_, chunks_, links_, linkMask_) { - this.$val = this; - if (arguments.length === 0) { - this.min = 0; - this.chunks = arrayType.zero(); - this.links = sliceType$1.nil; - this.linkMask = 0; - return; - } - this.min = min_; - this.chunks = chunks_; - this.links = links_; - this.linkMask = linkMask_; - }); - Reader = $pkg.Reader = $newType(8, $kindInterface, "flate.Reader", true, "compress/flate", true, null); - decompressor = $pkg.decompressor = $newType(0, $kindStruct, "flate.decompressor", true, "compress/flate", false, function(r_, roffset_, b_, nb_, h1_, h2_, bits_, codebits_, dict_, buf_, step_, stepState_, final$12_, err_, toRead_, hl_, hd_, copyLen_, copyDist_) { - this.$val = this; - if (arguments.length === 0) { - this.r = $ifaceNil; - this.roffset = new $Int64(0, 0); - this.b = 0; - this.nb = 0; - this.h1 = new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0); - this.h2 = new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0); - this.bits = ptrType$3.nil; - this.codebits = ptrType$4.nil; - this.dict = new dictDecoder.ptr(sliceType$5.nil, 0, 0, false); - this.buf = arrayType$5.zero(); - this.step = $throwNilPointerError; - this.stepState = 0; - this.final$12 = false; - this.err = $ifaceNil; - this.toRead = sliceType$5.nil; - this.hl = ptrType$1.nil; - this.hd = ptrType$1.nil; - this.copyLen = 0; - this.copyDist = 0; - return; - } - this.r = r_; - this.roffset = roffset_; - this.b = b_; - this.nb = nb_; - this.h1 = h1_; - this.h2 = h2_; - this.bits = bits_; - this.codebits = codebits_; - this.dict = dict_; - this.buf = buf_; - this.step = step_; - this.stepState = stepState_; - this.final$12 = final$12_; - this.err = err_; - this.toRead = toRead_; - this.hl = hl_; - this.hd = hd_; - this.copyLen = copyLen_; - this.copyDist = copyDist_; - }); - hcode = $pkg.hcode = $newType(0, $kindStruct, "flate.hcode", true, "compress/flate", false, function(code_, len_) { - this.$val = this; - if (arguments.length === 0) { - this.code = 0; - this.len = 0; - return; - } - this.code = code_; - this.len = len_; - }); - huffmanEncoder = $pkg.huffmanEncoder = $newType(0, $kindStruct, "flate.huffmanEncoder", true, "compress/flate", false, function(codes_, freqcache_, bitCount_, lns_, lfs_) { - this.$val = this; - if (arguments.length === 0) { - this.codes = sliceType$6.nil; - this.freqcache = sliceType$7.nil; - this.bitCount = arrayType$6.zero(); - this.lns = byLiteral.nil; - this.lfs = byFreq.nil; - return; - } - this.codes = codes_; - this.freqcache = freqcache_; - this.bitCount = bitCount_; - this.lns = lns_; - this.lfs = lfs_; - }); - literalNode = $pkg.literalNode = $newType(0, $kindStruct, "flate.literalNode", true, "compress/flate", false, function(literal_, freq_) { - this.$val = this; - if (arguments.length === 0) { - this.literal = 0; - this.freq = 0; - return; - } - this.literal = literal_; - this.freq = freq_; - }); - levelInfo = $pkg.levelInfo = $newType(0, $kindStruct, "flate.levelInfo", true, "compress/flate", false, function(level_, lastFreq_, nextCharFreq_, nextPairFreq_, needed_) { - this.$val = this; - if (arguments.length === 0) { - this.level = 0; - this.lastFreq = 0; - this.nextCharFreq = 0; - this.nextPairFreq = 0; - this.needed = 0; - return; - } - this.level = level_; - this.lastFreq = lastFreq_; - this.nextCharFreq = nextCharFreq_; - this.nextPairFreq = nextPairFreq_; - this.needed = needed_; - }); - byLiteral = $pkg.byLiteral = $newType(12, $kindSlice, "flate.byLiteral", true, "compress/flate", false, null); - byFreq = $pkg.byFreq = $newType(12, $kindSlice, "flate.byFreq", true, "compress/flate", false, null); - dictDecoder = $pkg.dictDecoder = $newType(0, $kindStruct, "flate.dictDecoder", true, "compress/flate", false, function(hist_, wrPos_, rdPos_, full_) { - this.$val = this; - if (arguments.length === 0) { - this.hist = sliceType$5.nil; - this.wrPos = 0; - this.rdPos = 0; - this.full = false; - return; - } - this.hist = hist_; - this.wrPos = wrPos_; - this.rdPos = rdPos_; - this.full = full_; - }); - arrayType = $arrayType($Uint32, 512); - sliceType = $sliceType($Uint32); - sliceType$1 = $sliceType(sliceType); - ptrType = $ptrType(huffmanEncoder); - arrayType$1 = $arrayType($Int, 16); - ptrType$1 = $ptrType(huffmanDecoder); - sliceType$4 = $sliceType($Int); - ptrType$2 = $ptrType(decompressor); - sliceType$5 = $sliceType($Uint8); - arrayType$2 = $arrayType($Int, 288); - arrayType$3 = $arrayType($Int, 316); - ptrType$3 = $ptrType(arrayType$3); - arrayType$4 = $arrayType($Int, 19); - ptrType$4 = $ptrType(arrayType$4); - arrayType$5 = $arrayType($Uint8, 4); - sliceType$6 = $sliceType(hcode); - sliceType$7 = $sliceType(literalNode); - arrayType$6 = $arrayType($Int32, 17); - arrayType$7 = $arrayType(levelInfo, 16); - arrayType$8 = $arrayType($Int32, 16); - arrayType$9 = $arrayType(arrayType$8, 16); - sliceType$8 = $sliceType($Int32); - ptrType$5 = $ptrType(byLiteral); - ptrType$6 = $ptrType(byFreq); - funcType = $funcType([ptrType$2], [], false); - ptrType$15 = $ptrType(hcode); - ptrType$16 = $ptrType(dictDecoder); - CorruptInputError.prototype.Error = function() { - var e; - e = this; - return "flate: corrupt input before offset " + strconv.FormatInt((new $Int64(e.$high, e.$low)), 10); - }; - $ptrType(CorruptInputError).prototype.Error = function() { return this.$get().Error(); }; - InternalError.prototype.Error = function() { - var e; - e = this.$val; - return "flate: internal error: " + (e); - }; - $ptrType(InternalError).prototype.Error = function() { return new InternalError(this.$get()).Error(); }; - huffmanDecoder.ptr.prototype.init = function(lengths) { - var _i, _i$1, _i$2, _i$3, _i$4, _r, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tmp, _tmp$1, chunk, chunk$1, chunk$2, code, code$1, count, h, i, i$1, i$2, j, j$1, lengths, link, linktab, linktab$1, max, min, n, n$1, nextcode, numLinks, off, off$1, off$2, reverse, reverse$1, value, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, y, y$1, y$2, y$3, y$4; - h = this; - if (!((h.min === 0))) { - huffmanDecoder.copy(h, new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0)); - } - count = arrayType$1.zero(); - _tmp = 0; - _tmp$1 = 0; - min = _tmp; - max = _tmp$1; - _ref = lengths; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (n === 0) { - _i++; - continue; - } - if ((min === 0) || n < min) { - min = n; - } - if (n > max) { - max = n; - } - ((n < 0 || n >= count.length) ? ($throwRuntimeError("index out of range"), undefined) : count[n] = (((n < 0 || n >= count.length) ? ($throwRuntimeError("index out of range"), undefined) : count[n]) + (1) >> 0)); - _i++; - } - if (max === 0) { - return true; - } - code = 0; - nextcode = arrayType$1.zero(); - i = min; - while (true) { - if (!(i <= max)) { break; } - code = (y = (1), y < 32 ? (code << y) : 0) >> 0; - ((i < 0 || i >= nextcode.length) ? ($throwRuntimeError("index out of range"), undefined) : nextcode[i] = code); - code = code + (((i < 0 || i >= count.length) ? ($throwRuntimeError("index out of range"), undefined) : count[i])) >> 0; - i = i + (1) >> 0; - } - if (!((code === ((y$1 = ((max >>> 0)), y$1 < 32 ? (1 << y$1) : 0) >> 0))) && !((code === 1) && (max === 1))) { - return false; - } - h.min = min; - if (max > 9) { - numLinks = (y$2 = ((((max >>> 0)) - 9 >>> 0)), y$2 < 32 ? (1 << y$2) : 0) >> 0; - h.linkMask = (((numLinks - 1 >> 0) >>> 0)); - link = nextcode[10] >> 1 >> 0; - h.links = $makeSlice(sliceType$1, (512 - link >> 0)); - j = ((link >>> 0)); - while (true) { - if (!(j < 512)) { break; } - reverse = ((bits.Reverse16(((j << 16 >>> 16))) >> 0)); - reverse = (reverse >> $min((7), 31)) >> 0; - off = j - ((link >>> 0)) >>> 0; - if (false && !(((x = h.chunks, ((reverse < 0 || reverse >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[reverse])) === 0))) { - $panic(new $String("impossible: overwriting existing chunk")); - } - (x$1 = h.chunks, ((reverse < 0 || reverse >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[reverse] = (((((off << 4 >>> 0) | 10) >>> 0) >>> 0)))); - (x$2 = h.links, ((off < 0 || off >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + off] = $makeSlice(sliceType, numLinks))); - j = j + (1) >>> 0; - } - } - _ref$1 = lengths; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - n$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (n$1 === 0) { - _i$1++; - continue; - } - code$1 = ((n$1 < 0 || n$1 >= nextcode.length) ? ($throwRuntimeError("index out of range"), undefined) : nextcode[n$1]); - ((n$1 < 0 || n$1 >= nextcode.length) ? ($throwRuntimeError("index out of range"), undefined) : nextcode[n$1] = (((n$1 < 0 || n$1 >= nextcode.length) ? ($throwRuntimeError("index out of range"), undefined) : nextcode[n$1]) + (1) >> 0)); - chunk = ((((i$1 << 4 >> 0) | n$1) >>> 0)); - reverse$1 = ((bits.Reverse16(((code$1 << 16 >>> 16))) >> 0)); - reverse$1 = (reverse$1 >> $min(((((16 - n$1 >> 0) >>> 0))), 31)) >> 0; - if (n$1 <= 9) { - off$1 = reverse$1; - while (true) { - if (!(off$1 < 512)) { break; } - if (false && !(((x$3 = h.chunks, ((off$1 < 0 || off$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[off$1])) === 0))) { - $panic(new $String("impossible: overwriting existing chunk")); - } - (x$4 = h.chunks, ((off$1 < 0 || off$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[off$1] = chunk)); - off$1 = off$1 + (((y$3 = ((n$1 >>> 0)), y$3 < 32 ? (1 << y$3) : 0) >> 0)) >> 0; - } - } else { - j$1 = reverse$1 & 511; - if (false && !(((((x$5 = h.chunks, ((j$1 < 0 || j$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[j$1])) & 15) >>> 0) === 10))) { - $panic(new $String("impossible: not an indirect chunk")); - } - value = (x$6 = h.chunks, ((j$1 < 0 || j$1 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[j$1])) >>> 4 >>> 0; - linktab = (x$7 = h.links, ((value < 0 || value >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + value])); - reverse$1 = (reverse$1 >> $min((9), 31)) >> 0; - off$2 = reverse$1; - while (true) { - if (!(off$2 < linktab.$length)) { break; } - if (false && !((((off$2 < 0 || off$2 >= linktab.$length) ? ($throwRuntimeError("index out of range"), undefined) : linktab.$array[linktab.$offset + off$2]) === 0))) { - $panic(new $String("impossible: overwriting existing chunk")); - } - ((off$2 < 0 || off$2 >= linktab.$length) ? ($throwRuntimeError("index out of range"), undefined) : linktab.$array[linktab.$offset + off$2] = chunk); - off$2 = off$2 + (((y$4 = (((n$1 - 9 >> 0) >>> 0)), y$4 < 32 ? (1 << y$4) : 0) >> 0)) >> 0; - } - } - _i$1++; - } - if (false) { - _ref$2 = h.chunks; - _i$2 = 0; - while (true) { - if (!(_i$2 < 512)) { break; } - i$2 = _i$2; - chunk$1 = ((_i$2 < 0 || _i$2 >= _ref$2.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2[_i$2]); - if (chunk$1 === 0) { - if ((code === 1) && ((_r = i$2 % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 1)) { - _i$2++; - continue; - } - $panic(new $String("impossible: missing chunk")); - } - _i$2++; - } - _ref$3 = h.links; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - linktab$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - _ref$4 = linktab$1; - _i$4 = 0; - while (true) { - if (!(_i$4 < _ref$4.$length)) { break; } - chunk$2 = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); - if (chunk$2 === 0) { - $panic(new $String("impossible: missing chunk")); - } - _i$4++; - } - _i$3++; - } - } - return true; - }; - huffmanDecoder.prototype.init = function(lengths) { return this.$val.init(lengths); }; - decompressor.ptr.prototype.nextBlock = function() { - var {_1, _r, _r$1, f, typ, x, y, y$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* while (true) { */ case 1: - /* if (!(f.nb < 3)) { break; } */ if(!(f.nb < 3)) { $s = 2; continue; } - _r = f.moreBits(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f.err = _r; - if (!($interfaceIsEqual(f.err, $ifaceNil))) { - $s = -1; return; - } - $s = 1; continue; - case 2: - f.final$12 = ((f.b & 1) >>> 0) === 1; - f.b = (y = (1), y < 32 ? (f.b >>> y) : 0) >>> 0; - typ = (f.b & 3) >>> 0; - f.b = (y$1 = (2), y$1 < 32 ? (f.b >>> y$1) : 0) >>> 0; - f.nb = f.nb - (3) >>> 0; - _1 = typ; - /* */ if (_1 === (0)) { $s = 5; continue; } - /* */ if (_1 === (1)) { $s = 6; continue; } - /* */ if (_1 === (2)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (0)) { */ case 5: - $r = f.dataBlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else if (_1 === (1)) { */ case 6: - f.hl = fixedHuffmanDecoder; - f.hd = ptrType$1.nil; - $r = f.huffmanBlock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else if (_1 === (2)) { */ case 7: - _r$1 = f.readHuffman(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - f.err = _r$1; - if (!($interfaceIsEqual(f.err, $ifaceNil))) { - /* break; */ $s = 4; continue; - } - f.hl = f.h1; - f.hd = f.h2; - $r = f.huffmanBlock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else { */ case 8: - f.err = ((x = f.roffset, new CorruptInputError(x.$high, x.$low))); - /* } */ case 9: - case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.nextBlock, $c: true, $r, _1, _r, _r$1, f, typ, x, y, y$1, $s};return $f; - }; - decompressor.prototype.nextBlock = function() { return this.$val.nextBlock(); }; - decompressor.ptr.prototype.Read = function(b) { - var {b, f, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* while (true) { */ case 1: - if (f.toRead.$length > 0) { - n = $copySlice(b, f.toRead); - f.toRead = $subslice(f.toRead, n); - if (f.toRead.$length === 0) { - $s = -1; return [n, f.err]; - } - $s = -1; return [n, $ifaceNil]; - } - if (!($interfaceIsEqual(f.err, $ifaceNil))) { - $s = -1; return [0, f.err]; - } - $r = f.step(f); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(f.err, $ifaceNil)) && (f.toRead.$length === 0)) { - f.toRead = f.dict.readFlush(); - } - $s = 1; continue; - case 2: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.Read, $c: true, $r, b, f, n, $s};return $f; - }; - decompressor.prototype.Read = function(b) { return this.$val.Read(b); }; - decompressor.ptr.prototype.Close = function() { - var f; - f = this; - if ($interfaceIsEqual(f.err, io.EOF)) { - return $ifaceNil; - } - return f.err; - }; - decompressor.prototype.Close = function() { return this.$val.Close(); }; - decompressor.ptr.prototype.readHuffman = function() { - var {_1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, b, err, err$1, err$2, err$3, f, i, i$1, i$2, j, n, nb, nclen, ndist, nlit, rep, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1, y$2, y$3, y$4, y$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* while (true) { */ case 1: - /* if (!(f.nb < 14)) { break; } */ if(!(f.nb < 14)) { $s = 2; continue; } - _r = f.moreBits(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 1; continue; - case 2: - nlit = ((((f.b & 31) >>> 0) >> 0)) + 257 >> 0; - if (nlit > 286) { - $s = -1; return ((x = f.roffset, new CorruptInputError(x.$high, x.$low))); - } - f.b = (y = (5), y < 32 ? (f.b >>> y) : 0) >>> 0; - ndist = ((((f.b & 31) >>> 0) >> 0)) + 1 >> 0; - if (ndist > 30) { - $s = -1; return ((x$1 = f.roffset, new CorruptInputError(x$1.$high, x$1.$low))); - } - f.b = (y$1 = (5), y$1 < 32 ? (f.b >>> y$1) : 0) >>> 0; - nclen = ((((f.b & 15) >>> 0) >> 0)) + 4 >> 0; - f.b = (y$2 = (4), y$2 < 32 ? (f.b >>> y$2) : 0) >>> 0; - f.nb = f.nb - (14) >>> 0; - i = 0; - /* while (true) { */ case 4: - /* if (!(i < nclen)) { break; } */ if(!(i < nclen)) { $s = 5; continue; } - /* while (true) { */ case 6: - /* if (!(f.nb < 3)) { break; } */ if(!(f.nb < 3)) { $s = 7; continue; } - _r$1 = f.moreBits(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err$1 = _r$1; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 6; continue; - case 7: - (x$2 = f.codebits, x$3 = ((i < 0 || i >= codeOrder.length) ? ($throwRuntimeError("index out of range"), undefined) : codeOrder[i]), x$2.nilCheck, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3] = ((((f.b & 7) >>> 0) >> 0)))); - f.b = (y$3 = (3), y$3 < 32 ? (f.b >>> y$3) : 0) >>> 0; - f.nb = f.nb - (3) >>> 0; - i = i + (1) >> 0; - $s = 4; continue; - case 5: - i$1 = nclen; - while (true) { - if (!(i$1 < 19)) { break; } - (x$4 = f.codebits, x$5 = ((i$1 < 0 || i$1 >= codeOrder.length) ? ($throwRuntimeError("index out of range"), undefined) : codeOrder[i$1]), x$4.nilCheck, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5] = 0)); - i$1 = i$1 + (1) >> 0; - } - if (!f.h1.init($subslice(new sliceType$4(f.codebits), 0))) { - $s = -1; return ((x$6 = f.roffset, new CorruptInputError(x$6.$high, x$6.$low))); - } - _tmp = 0; - _tmp$1 = nlit + ndist >> 0; - i$2 = _tmp; - n = _tmp$1; - /* while (true) { */ case 9: - /* if (!(i$2 < n)) { break; } */ if(!(i$2 < n)) { $s = 10; continue; } - _r$2 = f.huffSym(f.h1); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - x$7 = _tuple[0]; - err$2 = _tuple[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - if (x$7 < 16) { - (x$8 = f.bits, x$8.nilCheck, ((i$2 < 0 || i$2 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[i$2] = x$7)); - i$2 = i$2 + (1) >> 0; - /* continue; */ $s = 9; continue; - } - rep = 0; - nb = 0; - b = 0; - _1 = x$7; - if (_1 === (16)) { - rep = 3; - nb = 2; - if (i$2 === 0) { - $s = -1; return ((x$9 = f.roffset, new CorruptInputError(x$9.$high, x$9.$low))); - } - b = (x$10 = f.bits, x$11 = i$2 - 1 >> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11])); - } else if (_1 === (17)) { - rep = 3; - nb = 3; - b = 0; - } else if (_1 === (18)) { - rep = 11; - nb = 7; - b = 0; - } else { - $s = -1; return new InternalError("unexpected length code"); - } - /* while (true) { */ case 12: - /* if (!(f.nb < nb)) { break; } */ if(!(f.nb < nb)) { $s = 13; continue; } - _r$3 = f.moreBits(); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$3 = _r$3; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - $s = 12; continue; - case 13: - rep = rep + (((((f.b & ((((y$4 = nb, y$4 < 32 ? (1 << y$4) : 0) >>> 0) - 1 >>> 0))) >>> 0) >> 0))) >> 0; - f.b = (y$5 = (nb), y$5 < 32 ? (f.b >>> y$5) : 0) >>> 0; - f.nb = f.nb - (nb) >>> 0; - if ((i$2 + rep >> 0) > n) { - $s = -1; return ((x$12 = f.roffset, new CorruptInputError(x$12.$high, x$12.$low))); - } - j = 0; - while (true) { - if (!(j < rep)) { break; } - (x$13 = f.bits, x$13.nilCheck, ((i$2 < 0 || i$2 >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i$2] = b)); - i$2 = i$2 + (1) >> 0; - j = j + (1) >> 0; - } - $s = 9; continue; - case 10: - if (!f.h1.init($subslice(new sliceType$4(f.bits), 0, nlit)) || !f.h2.init($subslice(new sliceType$4(f.bits), nlit, (nlit + ndist >> 0)))) { - $s = -1; return ((x$14 = f.roffset, new CorruptInputError(x$14.$high, x$14.$low))); - } - if (f.h1.min < f.bits[256]) { - f.h1.min = f.bits[256]; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.readHuffman, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, b, err, err$1, err$2, err$3, f, i, i$1, i$2, j, n, nb, nclen, ndist, nlit, rep, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1, y$2, y$3, y$4, y$5, $s};return $f; - }; - decompressor.prototype.readHuffman = function() { return this.$val.readHuffman(); }; - decompressor.ptr.prototype.huffmanBlock = function() { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, cnt, dist, err, extra, f, length, n, nb, v, x, x$1, x$2, y, y$1, y$2, y$3, y$4, y$5, y$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _1 = f.stepState; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (0)) { */ case 2: - /* goto readLiteral */ $s = 5; continue; - $s = 4; continue; - /* } else if (_1 === (1)) { */ case 3: - /* goto copyHistory */ $s = 6; continue; - /* } */ case 4: - case 1: - /* readLiteral: */ case 5: - _r = f.huffSym(f.hl); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = err; - $s = -1; return; - } - n = 0; - length = 0; - /* */ if (v < 256) { $s = 9; continue; } - /* */ if ((v === 256)) { $s = 10; continue; } - /* */ if (v < 265) { $s = 11; continue; } - /* */ if (v < 269) { $s = 12; continue; } - /* */ if (v < 273) { $s = 13; continue; } - /* */ if (v < 277) { $s = 14; continue; } - /* */ if (v < 281) { $s = 15; continue; } - /* */ if (v < 285) { $s = 16; continue; } - /* */ if (v < 286) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (v < 256) { */ case 9: - f.dict.writeByte(((v << 24 >>> 24))); - if (f.dict.availWrite() === 0) { - f.toRead = f.dict.readFlush(); - f.step = $methodExpr(ptrType$2, "huffmanBlock"); - f.stepState = 0; - $s = -1; return; - } - /* goto readLiteral */ $s = 5; continue; - $s = 19; continue; - /* } else if ((v === 256)) { */ case 10: - f.finishBlock(); - $s = -1; return; - /* } else if (v < 265) { */ case 11: - length = v - 254 >> 0; - n = 0; - $s = 19; continue; - /* } else if (v < 269) { */ case 12: - length = ($imul(v, 2)) - 519 >> 0; - n = 1; - $s = 19; continue; - /* } else if (v < 273) { */ case 13: - length = ($imul(v, 4)) - 1057 >> 0; - n = 2; - $s = 19; continue; - /* } else if (v < 277) { */ case 14: - length = ($imul(v, 8)) - 2149 >> 0; - n = 3; - $s = 19; continue; - /* } else if (v < 281) { */ case 15: - length = ($imul(v, 16)) - 4365 >> 0; - n = 4; - $s = 19; continue; - /* } else if (v < 285) { */ case 16: - length = ($imul(v, 32)) - 8861 >> 0; - n = 5; - $s = 19; continue; - /* } else if (v < 286) { */ case 17: - length = 258; - n = 0; - $s = 19; continue; - /* } else { */ case 18: - f.err = ((x = f.roffset, new CorruptInputError(x.$high, x.$low))); - $s = -1; return; - /* } */ case 19: - case 8: - /* */ if (n > 0) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (n > 0) { */ case 20: - /* while (true) { */ case 22: - /* if (!(f.nb < n)) { break; } */ if(!(f.nb < n)) { $s = 23; continue; } - _r$1 = f.moreBits(); /* */ $s = 24; case 24: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = err; - $s = -1; return; - } - $s = 22; continue; - case 23: - length = length + (((((f.b & ((((y = n, y < 32 ? (1 << y) : 0) >>> 0) - 1 >>> 0))) >>> 0) >> 0))) >> 0; - f.b = (y$1 = (n), y$1 < 32 ? (f.b >>> y$1) : 0) >>> 0; - f.nb = f.nb - (n) >>> 0; - /* } */ case 21: - dist = 0; - /* */ if (f.hd === ptrType$1.nil) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (f.hd === ptrType$1.nil) { */ case 25: - /* while (true) { */ case 28: - /* if (!(f.nb < 5)) { break; } */ if(!(f.nb < 5)) { $s = 29; continue; } - _r$2 = f.moreBits(); /* */ $s = 30; case 30: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = err; - $s = -1; return; - } - $s = 28; continue; - case 29: - dist = ((bits.Reverse8((((((f.b & 31) >>> 0) << 3 >>> 0) << 24 >>> 24))) >> 0)); - f.b = (y$2 = (5), y$2 < 32 ? (f.b >>> y$2) : 0) >>> 0; - f.nb = f.nb - (5) >>> 0; - $s = 27; continue; - /* } else { */ case 26: - _r$3 = f.huffSym(f.hd); /* */ $s = 31; case 31: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - dist = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = err; - $s = -1; return; - } - /* } */ case 27: - /* */ if (dist < 4) { $s = 33; continue; } - /* */ if (dist < 30) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (dist < 4) { */ case 33: - dist = dist + (1) >> 0; - $s = 36; continue; - /* } else if (dist < 30) { */ case 34: - nb = (((dist - 2 >> 0) >>> 0)) >>> 1 >>> 0; - extra = (y$3 = nb, y$3 < 32 ? (((dist & 1)) << y$3) : 0) >> 0; - /* while (true) { */ case 37: - /* if (!(f.nb < nb)) { break; } */ if(!(f.nb < nb)) { $s = 38; continue; } - _r$4 = f.moreBits(); /* */ $s = 39; case 39: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = err; - $s = -1; return; - } - $s = 37; continue; - case 38: - extra = extra | (((((f.b & ((((y$4 = nb, y$4 < 32 ? (1 << y$4) : 0) >>> 0) - 1 >>> 0))) >>> 0) >> 0))); - f.b = (y$5 = (nb), y$5 < 32 ? (f.b >>> y$5) : 0) >>> 0; - f.nb = f.nb - (nb) >>> 0; - dist = (((y$6 = ((nb + 1 >>> 0)), y$6 < 32 ? (1 << y$6) : 0) >> 0) + 1 >> 0) + extra >> 0; - $s = 36; continue; - /* } else { */ case 35: - f.err = ((x$1 = f.roffset, new CorruptInputError(x$1.$high, x$1.$low))); - $s = -1; return; - /* } */ case 36: - case 32: - if (dist > f.dict.histSize()) { - f.err = ((x$2 = f.roffset, new CorruptInputError(x$2.$high, x$2.$low))); - $s = -1; return; - } - _tmp = length; - _tmp$1 = dist; - f.copyLen = _tmp; - f.copyDist = _tmp$1; - /* goto copyHistory */ $s = 6; continue; - /* copyHistory: */ case 6: - cnt = f.dict.tryWriteCopy(f.copyDist, f.copyLen); - if (cnt === 0) { - cnt = f.dict.writeCopy(f.copyDist, f.copyLen); - } - f.copyLen = f.copyLen - (cnt) >> 0; - if ((f.dict.availWrite() === 0) || f.copyLen > 0) { - f.toRead = f.dict.readFlush(); - f.step = $methodExpr(ptrType$2, "huffmanBlock"); - f.stepState = 1; - $s = -1; return; - } - /* goto readLiteral */ $s = 5; continue; - $s = -1; return; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.huffmanBlock, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, cnt, dist, err, extra, f, length, n, nb, v, x, x$1, x$2, y, y$1, y$2, y$3, y$4, y$5, y$6, $s};return $f; - }; - decompressor.prototype.huffmanBlock = function() { return this.$val.huffmanBlock(); }; - decompressor.ptr.prototype.dataBlock = function() { - var {_r, _tuple, err, f, n, nn, nr, x, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.nb = 0; - f.b = 0; - _r = io.ReadFull(f.r, $subslice(new sliceType$5(f.buf), 0, 4)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - nr = _tuple[0]; - err = _tuple[1]; - f.roffset = (x = f.roffset, x$1 = (new $Int64(0, nr)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = noEOF(err); - $s = -1; return; - } - n = ((f.buf[0] >> 0)) | (((f.buf[1] >> 0)) << 8 >> 0); - nn = ((f.buf[2] >> 0)) | (((f.buf[3] >> 0)) << 8 >> 0); - if (!((((nn << 16 >>> 16)) === (((~n >> 0) << 16 >>> 16))))) { - f.err = ((x$2 = f.roffset, new CorruptInputError(x$2.$high, x$2.$low))); - $s = -1; return; - } - if (n === 0) { - f.toRead = f.dict.readFlush(); - f.finishBlock(); - $s = -1; return; - } - f.copyLen = n; - $r = f.copyData(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.dataBlock, $c: true, $r, _r, _tuple, err, f, n, nn, nr, x, x$1, x$2, $s};return $f; - }; - decompressor.prototype.dataBlock = function() { return this.$val.dataBlock(); }; - decompressor.ptr.prototype.copyData = function() { - var {_r, _tuple, buf, cnt, err, f, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - buf = f.dict.writeSlice(); - if (buf.$length > f.copyLen) { - buf = $subslice(buf, 0, f.copyLen); - } - _r = io.ReadFull(f.r, buf); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - cnt = _tuple[0]; - err = _tuple[1]; - f.roffset = (x = f.roffset, x$1 = (new $Int64(0, cnt)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - f.copyLen = f.copyLen - (cnt) >> 0; - f.dict.writeMark(cnt); - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.err = noEOF(err); - $s = -1; return; - } - if ((f.dict.availWrite() === 0) || f.copyLen > 0) { - f.toRead = f.dict.readFlush(); - f.step = $methodExpr(ptrType$2, "copyData"); - $s = -1; return; - } - f.finishBlock(); - $s = -1; return; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.copyData, $c: true, $r, _r, _tuple, buf, cnt, err, f, x, x$1, $s};return $f; - }; - decompressor.prototype.copyData = function() { return this.$val.copyData(); }; - decompressor.ptr.prototype.finishBlock = function() { - var f; - f = this; - if (f.final$12) { - if (f.dict.availRead() > 0) { - f.toRead = f.dict.readFlush(); - } - f.err = io.EOF; - } - f.step = $methodExpr(ptrType$2, "nextBlock"); - }; - decompressor.prototype.finishBlock = function() { return this.$val.finishBlock(); }; - noEOF = function(e) { - var e; - if ($interfaceIsEqual(e, io.EOF)) { - return io.ErrUnexpectedEOF; - } - return e; - }; - decompressor.ptr.prototype.moreBits = function() { - var {_r, _tuple, c, err, f, x, x$1, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r = f.r.ReadByte(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return noEOF(err); - } - f.roffset = (x = f.roffset, x$1 = new $Int64(0, 1), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - f.b = (f.b | (((y = f.nb, y < 32 ? (((c >>> 0)) << y) : 0) >>> 0))) >>> 0; - f.nb = f.nb + (8) >>> 0; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.moreBits, $c: true, $r, _r, _tuple, c, err, f, x, x$1, y, $s};return $f; - }; - decompressor.prototype.moreBits = function() { return this.$val.moreBits(); }; - decompressor.ptr.prototype.huffSym = function(h) { - var {_r, _tmp, _tmp$1, _tuple, b, c, chunk, err, f, h, n, nb, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, y$1, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - n = ((h.min >>> 0)); - _tmp = f.nb; - _tmp$1 = f.b; - nb = _tmp; - b = _tmp$1; - /* while (true) { */ case 1: - /* while (true) { */ case 3: - /* if (!(nb < n)) { break; } */ if(!(nb < n)) { $s = 4; continue; } - _r = f.r.ReadByte(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - f.b = b; - f.nb = nb; - $s = -1; return [0, noEOF(err)]; - } - f.roffset = (x = f.roffset, x$1 = new $Int64(0, 1), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - b = (b | (((y = (((nb & 31) >>> 0)), y < 32 ? (((c >>> 0)) << y) : 0) >>> 0))) >>> 0; - nb = nb + (8) >>> 0; - $s = 3; continue; - case 4: - chunk = (x$2 = h.chunks, x$3 = (b & 511) >>> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3])); - n = ((((chunk & 15) >>> 0) >>> 0)); - if (n > 9) { - chunk = (x$4 = (x$5 = h.links, x$6 = chunk >>> 4 >>> 0, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])), x$7 = (((b >>> 9 >>> 0)) & h.linkMask) >>> 0, ((x$7 < 0 || x$7 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$7])); - n = ((((chunk & 15) >>> 0) >>> 0)); - } - if (n <= nb) { - if (n === 0) { - f.b = b; - f.nb = nb; - f.err = ((x$8 = f.roffset, new CorruptInputError(x$8.$high, x$8.$low))); - $s = -1; return [0, f.err]; - } - f.b = (y$1 = (((n & 31) >>> 0)), y$1 < 32 ? (b >>> y$1) : 0) >>> 0; - f.nb = nb - n >>> 0; - $s = -1; return [(((chunk >>> 4 >>> 0) >> 0)), $ifaceNil]; - } - $s = 1; continue; - case 2: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: decompressor.ptr.prototype.huffSym, $c: true, $r, _r, _tmp, _tmp$1, _tuple, b, c, chunk, err, f, h, n, nb, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, y, y$1, $s};return $f; - }; - decompressor.prototype.huffSym = function(h) { return this.$val.huffSym(h); }; - makeReader = function(r) { - var _tuple, ok, r, rr; - _tuple = $assertType(r, Reader, true); - rr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return rr; - } - return bufio.NewReader(r); - }; - fixedHuffmanDecoderInit = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = fixedOnce.Do((function() { - var bits$1, i, i$1, i$2, i$3; - bits$1 = arrayType$2.zero(); - i = 0; - while (true) { - if (!(i < 144)) { break; } - ((i < 0 || i >= bits$1.length) ? ($throwRuntimeError("index out of range"), undefined) : bits$1[i] = 8); - i = i + (1) >> 0; - } - i$1 = 144; - while (true) { - if (!(i$1 < 256)) { break; } - ((i$1 < 0 || i$1 >= bits$1.length) ? ($throwRuntimeError("index out of range"), undefined) : bits$1[i$1] = 9); - i$1 = i$1 + (1) >> 0; - } - i$2 = 256; - while (true) { - if (!(i$2 < 280)) { break; } - ((i$2 < 0 || i$2 >= bits$1.length) ? ($throwRuntimeError("index out of range"), undefined) : bits$1[i$2] = 7); - i$2 = i$2 + (1) >> 0; - } - i$3 = 280; - while (true) { - if (!(i$3 < 288)) { break; } - ((i$3 < 0 || i$3 >= bits$1.length) ? ($throwRuntimeError("index out of range"), undefined) : bits$1[i$3] = 8); - i$3 = i$3 + (1) >> 0; - } - fixedHuffmanDecoder.init(new sliceType$4(bits$1)); - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: fixedHuffmanDecoderInit, $c: true, $r, $s};return $f; - }; - decompressor.ptr.prototype.Reset = function(r, dict) { - var dict, f, r; - f = this; - decompressor.copy(f, new decompressor.ptr(makeReader(r), new $Int64(0, 0), 0, 0, new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0), new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0), f.bits, f.codebits, $clone(f.dict, dictDecoder), arrayType$5.zero(), $methodExpr(ptrType$2, "nextBlock"), 0, false, $ifaceNil, sliceType$5.nil, ptrType$1.nil, ptrType$1.nil, 0, 0)); - f.dict.init(32768, dict); - return $ifaceNil; - }; - decompressor.prototype.Reset = function(r, dict) { return this.$val.Reset(r, dict); }; - NewReader = function(r) { - var {f, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = [f]; - $r = fixedHuffmanDecoderInit(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - f[0] = new decompressor.ptr($ifaceNil, new $Int64(0, 0), 0, 0, new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0), new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0), ptrType$3.nil, ptrType$4.nil, new dictDecoder.ptr(sliceType$5.nil, 0, 0, false), arrayType$5.zero(), $throwNilPointerError, 0, false, $ifaceNil, sliceType$5.nil, ptrType$1.nil, ptrType$1.nil, 0, 0); - f[0].r = makeReader(r); - f[0].bits = arrayType$3.zero(); - f[0].codebits = arrayType$4.zero(); - f[0].step = $methodExpr(ptrType$2, "nextBlock"); - f[0].dict.init(32768, sliceType$5.nil); - $s = -1; return f[0]; - /* */ } return; } var $f = {$blk: NewReader, $c: true, $r, f, r, $s};return $f; - }; - $pkg.NewReader = NewReader; - hcode.ptr.prototype.set = function(code, length) { - var code, h, length; - h = this; - h.len = length; - h.code = code; - }; - hcode.prototype.set = function(code, length) { return this.$val.set(code, length); }; - maxNode = function() { - return new literalNode.ptr(65535, 2147483647); - }; - newHuffmanEncoder = function(size) { - var size; - return new huffmanEncoder.ptr($makeSlice(sliceType$6, size), sliceType$7.nil, arrayType$6.zero(), byLiteral.nil, byFreq.nil); - }; - generateFixedLiteralEncoding = function() { - var bits$1, ch, codes, h, size; - h = newHuffmanEncoder(286); - codes = h.codes; - ch = 0; - ch = 0; - while (true) { - if (!(ch < 286)) { break; } - bits$1 = 0; - size = 0; - switch (0) { default: - if (ch < 144) { - bits$1 = ch + 48 << 16 >>> 16; - size = 8; - break; - } else if (ch < 256) { - bits$1 = (ch + 400 << 16 >>> 16) - 144 << 16 >>> 16; - size = 9; - break; - } else if (ch < 280) { - bits$1 = ch - 256 << 16 >>> 16; - size = 7; - break; - } else { - bits$1 = (ch + 192 << 16 >>> 16) - 280 << 16 >>> 16; - size = 8; - } - } - hcode.copy(((ch < 0 || ch >= codes.$length) ? ($throwRuntimeError("index out of range"), undefined) : codes.$array[codes.$offset + ch]), new hcode.ptr(reverseBits(bits$1, ((size << 24 >>> 24))), size)); - ch = ch + (1) << 16 >>> 16; - } - return h; - }; - generateFixedOffsetEncoding = function() { - var _i, _ref, ch, codes, h; - h = newHuffmanEncoder(30); - codes = h.codes; - _ref = codes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - ch = _i; - hcode.copy(((ch < 0 || ch >= codes.$length) ? ($throwRuntimeError("index out of range"), undefined) : codes.$array[codes.$offset + ch]), new hcode.ptr(reverseBits(((ch << 16 >>> 16)), 5), 5)); - _i++; - } - return h; - }; - huffmanEncoder.ptr.prototype.bitCounts = function(list, maxBits) { - var bitCount, bits$1, counts, h, l, leafCounts, level, level$1, level$2, levels$1, list, maxBits, n, n$1, prevFreq, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - h = this; - if (maxBits >= 16) { - $panic(new $String("flate: maxBits too large")); - } - n = ((list.$length >> 0)); - list = $subslice(list, 0, (n + 1 >> 0)); - literalNode.copy(((n < 0 || n >= list.$length) ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + n]), maxNode()); - if (maxBits > (n - 1 >> 0)) { - maxBits = n - 1 >> 0; - } - levels$1 = arrayType$7.zero(); - leafCounts = arrayType$9.zero(); - level = 1; - while (true) { - if (!(level <= maxBits)) { break; } - levelInfo.copy(((level < 0 || level >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[level]), new levelInfo.ptr(level, (1 >= list.$length ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + 1]).freq, (2 >= list.$length ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + 2]).freq, (0 >= list.$length ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + 0]).freq + (1 >= list.$length ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + 1]).freq >> 0, 0)); - (x = ((level < 0 || level >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[level]), ((level < 0 || level >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[level] = 2)); - if (level === 1) { - ((level < 0 || level >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[level]).nextPairFreq = 2147483647; - } - level = level + (1) >> 0; - } - ((maxBits < 0 || maxBits >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[maxBits]).needed = ($imul(2, n)) - 4 >> 0; - level$1 = maxBits; - while (true) { - l = ((level$1 < 0 || level$1 >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[level$1]); - if ((l.nextPairFreq === 2147483647) && (l.nextCharFreq === 2147483647)) { - l.needed = 0; - (x$1 = level$1 + 1 >> 0, ((x$1 < 0 || x$1 >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[x$1])).nextPairFreq = 2147483647; - level$1 = level$1 + (1) >> 0; - continue; - } - prevFreq = l.lastFreq; - if (l.nextCharFreq < l.nextPairFreq) { - n$1 = (x$2 = ((level$1 < 0 || level$1 >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[level$1]), ((level$1 < 0 || level$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[level$1])) + 1 >> 0; - l.lastFreq = l.nextCharFreq; - (x$3 = ((level$1 < 0 || level$1 >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[level$1]), ((level$1 < 0 || level$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[level$1] = n$1)); - l.nextCharFreq = ((n$1 < 0 || n$1 >= list.$length) ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + n$1]).freq; - } else { - l.lastFreq = l.nextPairFreq; - $copySlice($subslice(new sliceType$8(((level$1 < 0 || level$1 >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[level$1])), 0, level$1), $subslice(new sliceType$8((x$4 = level$1 - 1 >> 0, ((x$4 < 0 || x$4 >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[x$4]))), 0, level$1)); - (x$5 = l.level - 1 >> 0, ((x$5 < 0 || x$5 >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[x$5])).needed = 2; - } - l.needed = l.needed - (1) >> 0; - if (l.needed === 0) { - if (l.level === maxBits) { - break; - } - (x$6 = l.level + 1 >> 0, ((x$6 < 0 || x$6 >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[x$6])).nextPairFreq = prevFreq + l.lastFreq >> 0; - level$1 = level$1 + (1) >> 0; - } else { - while (true) { - if (!((x$7 = level$1 - 1 >> 0, ((x$7 < 0 || x$7 >= levels$1.length) ? ($throwRuntimeError("index out of range"), undefined) : levels$1[x$7])).needed > 0)) { break; } - level$1 = level$1 - (1) >> 0; - } - } - } - if (!(((x$8 = ((maxBits < 0 || maxBits >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[maxBits]), ((maxBits < 0 || maxBits >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[maxBits])) === n))) { - $panic(new $String("leafCounts[maxBits][maxBits] != n")); - } - bitCount = $subslice(new sliceType$8(h.bitCount), 0, (maxBits + 1 >> 0)); - bits$1 = 1; - counts = ((maxBits < 0 || maxBits >= leafCounts.length) ? ($throwRuntimeError("index out of range"), undefined) : leafCounts[maxBits]); - level$2 = maxBits; - while (true) { - if (!(level$2 > 0)) { break; } - ((bits$1 < 0 || bits$1 >= bitCount.$length) ? ($throwRuntimeError("index out of range"), undefined) : bitCount.$array[bitCount.$offset + bits$1] = ((x$9 = counts, ((level$2 < 0 || level$2 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[level$2])) - (x$10 = counts, x$11 = level$2 - 1 >> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11])) >> 0)); - bits$1 = bits$1 + (1) >> 0; - level$2 = level$2 - (1) >> 0; - } - return bitCount; - }; - huffmanEncoder.prototype.bitCounts = function(list, maxBits) { return this.$val.bitCounts(list, maxBits); }; - huffmanEncoder.ptr.prototype.assignEncodingAndSize = function(bitCount, list) { - var {_i, _i$1, _ref, _ref$1, bitCount, bits$1, chunk, code, h, list, n, node, x, x$1, y, $s, $r, $c} = $restore(this, {bitCount, list}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - code = 0; - _ref = bitCount; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - n = _i; - bits$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - code = (y = (1), y < 32 ? (code << y) : 0) << 16 >>> 16; - if ((n === 0) || (bits$1 === 0)) { - _i++; - /* continue; */ $s = 1; continue; - } - chunk = $subslice(list, (list.$length - ((bits$1 >> 0)) >> 0)); - $r = (h.$ptr_lns || (h.$ptr_lns = new ptrType$5(function() { return this.$target.lns; }, function($v) { this.$target.lns = $v; }, h))).sort(chunk); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref$1 = chunk; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - node = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), literalNode); - hcode.copy((x = h.codes, x$1 = node.literal, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])), new hcode.ptr(reverseBits(code, ((n << 24 >>> 24))), ((n << 16 >>> 16)))); - code = code + (1) << 16 >>> 16; - _i$1++; - } - list = $subslice(list, 0, (list.$length - ((bits$1 >> 0)) >> 0)); - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: huffmanEncoder.ptr.prototype.assignEncodingAndSize, $c: true, $r, _i, _i$1, _ref, _ref$1, bitCount, bits$1, chunk, code, h, list, n, node, x, x$1, y, $s};return $f; - }; - huffmanEncoder.prototype.assignEncodingAndSize = function(bitCount, list) { return this.$val.assignEncodingAndSize(bitCount, list); }; - huffmanEncoder.ptr.prototype.generate = function(freq, maxBits) { - var {_i, _i$1, _ref, _ref$1, bitCount, count, f, freq, h, i, i$1, list, maxBits, node, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {freq, maxBits}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - if (h.freqcache === sliceType$7.nil) { - h.freqcache = $makeSlice(sliceType$7, 287); - } - list = $subslice(h.freqcache, 0, (freq.$length + 1 >> 0)); - count = 0; - _ref = freq; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((f === 0))) { - literalNode.copy(((count < 0 || count >= list.$length) ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + count]), new literalNode.ptr(((i << 16 >>> 16)), f)); - count = count + (1) >> 0; - } else { - literalNode.copy(((count < 0 || count >= list.$length) ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + count]), new literalNode.ptr(0, 0)); - (x = h.codes, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).len = 0; - } - _i++; - } - literalNode.copy((x$1 = freq.$length, ((x$1 < 0 || x$1 >= list.$length) ? ($throwRuntimeError("index out of range"), undefined) : list.$array[list.$offset + x$1])), new literalNode.ptr(0, 0)); - list = $subslice(list, 0, count); - if (count <= 2) { - _ref$1 = list; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - node = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), literalNode); - (x$2 = h.codes, x$3 = node.literal, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])).set(((i$1 << 16 >>> 16)), 1); - _i$1++; - } - $s = -1; return; - } - $r = (h.$ptr_lfs || (h.$ptr_lfs = new ptrType$6(function() { return this.$target.lfs; }, function($v) { this.$target.lfs = $v; }, h))).sort(list); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bitCount = h.bitCounts(list, maxBits); - $r = h.assignEncodingAndSize(bitCount, list); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: huffmanEncoder.ptr.prototype.generate, $c: true, $r, _i, _i$1, _ref, _ref$1, bitCount, count, f, freq, h, i, i$1, list, maxBits, node, x, x$1, x$2, x$3, $s};return $f; - }; - huffmanEncoder.prototype.generate = function(freq, maxBits) { return this.$val.generate(freq, maxBits); }; - $ptrType(byLiteral).prototype.sort = function(a) { - var {a, s, $s, $r, $c} = $restore(this, {a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - s.$set(($convertSliceType(a, byLiteral))); - $r = sort.Sort(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $ptrType(byLiteral).prototype.sort, $c: true, $r, a, s, $s};return $f; - }; - byLiteral.prototype.Len = function() { - var s; - s = this; - return s.$length; - }; - $ptrType(byLiteral).prototype.Len = function() { return this.$get().Len(); }; - byLiteral.prototype.Less = function(i, j) { - var i, j, s; - s = this; - return ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).literal < ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).literal; - }; - $ptrType(byLiteral).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; - byLiteral.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, s; - s = this; - _tmp = $clone(((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]), literalNode); - _tmp$1 = $clone(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), literalNode); - literalNode.copy(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), _tmp); - literalNode.copy(((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]), _tmp$1); - }; - $ptrType(byLiteral).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; - $ptrType(byFreq).prototype.sort = function(a) { - var {a, s, $s, $r, $c} = $restore(this, {a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - s.$set(($convertSliceType(a, byFreq))); - $r = sort.Sort(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $ptrType(byFreq).prototype.sort, $c: true, $r, a, s, $s};return $f; - }; - byFreq.prototype.Len = function() { - var s; - s = this; - return s.$length; - }; - $ptrType(byFreq).prototype.Len = function() { return this.$get().Len(); }; - byFreq.prototype.Less = function(i, j) { - var i, j, s; - s = this; - if (((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).freq === ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).freq) { - return ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).literal < ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).literal; - } - return ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).freq < ((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]).freq; - }; - $ptrType(byFreq).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; - byFreq.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, s; - s = this; - _tmp = $clone(((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]), literalNode); - _tmp$1 = $clone(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), literalNode); - literalNode.copy(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), _tmp); - literalNode.copy(((j < 0 || j >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + j]), _tmp$1); - }; - $ptrType(byFreq).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; - reverseBits = function(number, bitLength) { - var bitLength, number, y; - return bits.Reverse16((y = ((16 - bitLength << 24 >>> 24)), y < 32 ? (number << y) : 0) << 16 >>> 16); - }; - init = function() { - var {offsetFreq, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - offsetFreq = $makeSlice(sliceType$8, 30); - (0 >= offsetFreq.$length ? ($throwRuntimeError("index out of range"), undefined) : offsetFreq.$array[offsetFreq.$offset + 0] = 1); - huffOffset = newHuffmanEncoder(30); - $r = huffOffset.generate(offsetFreq, 15); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, offsetFreq, $s};return $f; - }; - dictDecoder.ptr.prototype.init = function(size, dict) { - var dd, dict, size; - dd = this; - dictDecoder.copy(dd, new dictDecoder.ptr(dd.hist, 0, 0, false)); - if (dd.hist.$capacity < size) { - dd.hist = $makeSlice(sliceType$5, size); - } - dd.hist = $subslice(dd.hist, 0, size); - if (dict.$length > dd.hist.$length) { - dict = $subslice(dict, (dict.$length - dd.hist.$length >> 0)); - } - dd.wrPos = $copySlice(dd.hist, dict); - if (dd.wrPos === dd.hist.$length) { - dd.wrPos = 0; - dd.full = true; - } - dd.rdPos = dd.wrPos; - }; - dictDecoder.prototype.init = function(size, dict) { return this.$val.init(size, dict); }; - dictDecoder.ptr.prototype.histSize = function() { - var dd; - dd = this; - if (dd.full) { - return dd.hist.$length; - } - return dd.wrPos; - }; - dictDecoder.prototype.histSize = function() { return this.$val.histSize(); }; - dictDecoder.ptr.prototype.availRead = function() { - var dd; - dd = this; - return dd.wrPos - dd.rdPos >> 0; - }; - dictDecoder.prototype.availRead = function() { return this.$val.availRead(); }; - dictDecoder.ptr.prototype.availWrite = function() { - var dd; - dd = this; - return dd.hist.$length - dd.wrPos >> 0; - }; - dictDecoder.prototype.availWrite = function() { return this.$val.availWrite(); }; - dictDecoder.ptr.prototype.writeSlice = function() { - var dd; - dd = this; - return $subslice(dd.hist, dd.wrPos); - }; - dictDecoder.prototype.writeSlice = function() { return this.$val.writeSlice(); }; - dictDecoder.ptr.prototype.writeMark = function(cnt) { - var cnt, dd; - dd = this; - dd.wrPos = dd.wrPos + (cnt) >> 0; - }; - dictDecoder.prototype.writeMark = function(cnt) { return this.$val.writeMark(cnt); }; - dictDecoder.ptr.prototype.writeByte = function(c) { - var c, dd, x, x$1; - dd = this; - (x = dd.hist, x$1 = dd.wrPos, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); - dd.wrPos = dd.wrPos + (1) >> 0; - }; - dictDecoder.prototype.writeByte = function(c) { return this.$val.writeByte(c); }; - dictDecoder.ptr.prototype.writeCopy = function(dist, length) { - var dd, dist, dstBase, dstPos, endPos, length, srcPos; - dd = this; - dstBase = dd.wrPos; - dstPos = dstBase; - srcPos = dstPos - dist >> 0; - endPos = dstPos + length >> 0; - if (endPos > dd.hist.$length) { - endPos = dd.hist.$length; - } - if (srcPos < 0) { - srcPos = srcPos + (dd.hist.$length) >> 0; - dstPos = dstPos + ($copySlice($subslice(dd.hist, dstPos, endPos), $subslice(dd.hist, srcPos))) >> 0; - srcPos = 0; - } - while (true) { - if (!(dstPos < endPos)) { break; } - dstPos = dstPos + ($copySlice($subslice(dd.hist, dstPos, endPos), $subslice(dd.hist, srcPos, dstPos))) >> 0; - } - dd.wrPos = dstPos; - return dstPos - dstBase >> 0; - }; - dictDecoder.prototype.writeCopy = function(dist, length) { return this.$val.writeCopy(dist, length); }; - dictDecoder.ptr.prototype.tryWriteCopy = function(dist, length) { - var dd, dist, dstBase, dstPos, endPos, length, srcPos; - dd = this; - dstPos = dd.wrPos; - endPos = dstPos + length >> 0; - if (dstPos < dist || endPos > dd.hist.$length) { - return 0; - } - dstBase = dstPos; - srcPos = dstPos - dist >> 0; - while (true) { - if (!(dstPos < endPos)) { break; } - dstPos = dstPos + ($copySlice($subslice(dd.hist, dstPos, endPos), $subslice(dd.hist, srcPos, dstPos))) >> 0; - } - dd.wrPos = dstPos; - return dstPos - dstBase >> 0; - }; - dictDecoder.prototype.tryWriteCopy = function(dist, length) { return this.$val.tryWriteCopy(dist, length); }; - dictDecoder.ptr.prototype.readFlush = function() { - var _tmp, _tmp$1, dd, toRead; - dd = this; - toRead = $subslice(dd.hist, dd.rdPos, dd.wrPos); - dd.rdPos = dd.wrPos; - if (dd.wrPos === dd.hist.$length) { - _tmp = 0; - _tmp$1 = 0; - dd.wrPos = _tmp; - dd.rdPos = _tmp$1; - dd.full = true; - } - return toRead; - }; - dictDecoder.prototype.readFlush = function() { return this.$val.readFlush(); }; - CorruptInputError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - InternalError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$1.methods = [{prop: "init", name: "init", pkg: "compress/flate", typ: $funcType([sliceType$4], [$Bool], false)}]; - ptrType$2.methods = [{prop: "nextBlock", name: "nextBlock", pkg: "compress/flate", typ: $funcType([], [], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "readHuffman", name: "readHuffman", pkg: "compress/flate", typ: $funcType([], [$error], false)}, {prop: "huffmanBlock", name: "huffmanBlock", pkg: "compress/flate", typ: $funcType([], [], false)}, {prop: "dataBlock", name: "dataBlock", pkg: "compress/flate", typ: $funcType([], [], false)}, {prop: "copyData", name: "copyData", pkg: "compress/flate", typ: $funcType([], [], false)}, {prop: "finishBlock", name: "finishBlock", pkg: "compress/flate", typ: $funcType([], [], false)}, {prop: "moreBits", name: "moreBits", pkg: "compress/flate", typ: $funcType([], [$error], false)}, {prop: "huffSym", name: "huffSym", pkg: "compress/flate", typ: $funcType([ptrType$1], [$Int, $error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Reader, sliceType$5], [$error], false)}]; - ptrType$15.methods = [{prop: "set", name: "set", pkg: "compress/flate", typ: $funcType([$Uint16, $Uint16], [], false)}]; - ptrType.methods = [{prop: "bitLength", name: "bitLength", pkg: "compress/flate", typ: $funcType([sliceType$8], [$Int], false)}, {prop: "bitCounts", name: "bitCounts", pkg: "compress/flate", typ: $funcType([sliceType$7, $Int32], [sliceType$8], false)}, {prop: "assignEncodingAndSize", name: "assignEncodingAndSize", pkg: "compress/flate", typ: $funcType([sliceType$8, sliceType$7], [], false)}, {prop: "generate", name: "generate", pkg: "compress/flate", typ: $funcType([sliceType$8, $Int32], [], false)}]; - byLiteral.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}]; - ptrType$5.methods = [{prop: "sort", name: "sort", pkg: "compress/flate", typ: $funcType([sliceType$7], [], false)}]; - byFreq.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}]; - ptrType$6.methods = [{prop: "sort", name: "sort", pkg: "compress/flate", typ: $funcType([sliceType$7], [], false)}]; - ptrType$16.methods = [{prop: "init", name: "init", pkg: "compress/flate", typ: $funcType([$Int, sliceType$5], [], false)}, {prop: "histSize", name: "histSize", pkg: "compress/flate", typ: $funcType([], [$Int], false)}, {prop: "availRead", name: "availRead", pkg: "compress/flate", typ: $funcType([], [$Int], false)}, {prop: "availWrite", name: "availWrite", pkg: "compress/flate", typ: $funcType([], [$Int], false)}, {prop: "writeSlice", name: "writeSlice", pkg: "compress/flate", typ: $funcType([], [sliceType$5], false)}, {prop: "writeMark", name: "writeMark", pkg: "compress/flate", typ: $funcType([$Int], [], false)}, {prop: "writeByte", name: "writeByte", pkg: "compress/flate", typ: $funcType([$Uint8], [], false)}, {prop: "writeCopy", name: "writeCopy", pkg: "compress/flate", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "tryWriteCopy", name: "tryWriteCopy", pkg: "compress/flate", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "readFlush", name: "readFlush", pkg: "compress/flate", typ: $funcType([], [sliceType$5], false)}]; - Resetter.init([{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Reader, sliceType$5], [$error], false)}]); - huffmanDecoder.init("compress/flate", [{prop: "min", name: "min", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "chunks", name: "chunks", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "links", name: "links", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "linkMask", name: "linkMask", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - Reader.init([{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}]); - decompressor.init("compress/flate", [{prop: "r", name: "r", embedded: false, exported: false, typ: Reader, tag: ""}, {prop: "roffset", name: "roffset", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "nb", name: "nb", embedded: false, exported: false, typ: $Uint, tag: ""}, {prop: "h1", name: "h1", embedded: false, exported: false, typ: huffmanDecoder, tag: ""}, {prop: "h2", name: "h2", embedded: false, exported: false, typ: huffmanDecoder, tag: ""}, {prop: "bits", name: "bits", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "codebits", name: "codebits", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "dict", name: "dict", embedded: false, exported: false, typ: dictDecoder, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$5, tag: ""}, {prop: "step", name: "step", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "stepState", name: "stepState", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "final$12", name: "final", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "toRead", name: "toRead", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "hl", name: "hl", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "hd", name: "hd", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "copyLen", name: "copyLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "copyDist", name: "copyDist", embedded: false, exported: false, typ: $Int, tag: ""}]); - hcode.init("compress/flate", [{prop: "code", name: "code", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint16, tag: ""}]); - huffmanEncoder.init("compress/flate", [{prop: "codes", name: "codes", embedded: false, exported: false, typ: sliceType$6, tag: ""}, {prop: "freqcache", name: "freqcache", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "bitCount", name: "bitCount", embedded: false, exported: false, typ: arrayType$6, tag: ""}, {prop: "lns", name: "lns", embedded: false, exported: false, typ: byLiteral, tag: ""}, {prop: "lfs", name: "lfs", embedded: false, exported: false, typ: byFreq, tag: ""}]); - literalNode.init("compress/flate", [{prop: "literal", name: "literal", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "freq", name: "freq", embedded: false, exported: false, typ: $Int32, tag: ""}]); - levelInfo.init("compress/flate", [{prop: "level", name: "level", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "lastFreq", name: "lastFreq", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "nextCharFreq", name: "nextCharFreq", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "nextPairFreq", name: "nextPairFreq", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "needed", name: "needed", embedded: false, exported: false, typ: $Int32, tag: ""}]); - byLiteral.init(literalNode); - byFreq.init(literalNode); - dictDecoder.init("compress/flate", [{prop: "hist", name: "hist", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "wrPos", name: "wrPos", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "rdPos", name: "rdPos", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "full", name: "full", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - fixedOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - fixedHuffmanDecoder = new huffmanDecoder.ptr(0, arrayType.zero(), sliceType$1.nil, 0); - huffOffset = ptrType.nil; - codeOrder = $toNativeArray($kindInt, [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); - fixedLiteralEncoding = generateFixedLiteralEncoding(); - fixedOffsetEncoding = generateFixedOffsetEncoding(); - $r = init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/binary"] = (function() { - var $pkg = {}, $init, errors, io, math, reflect, sync, littleEndian, bigEndian, sliceType, overflow; - errors = $packages["errors"]; - io = $packages["io"]; - math = $packages["math"]; - reflect = $packages["reflect"]; - sync = $packages["sync"]; - littleEndian = $pkg.littleEndian = $newType(0, $kindStruct, "binary.littleEndian", true, "encoding/binary", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - bigEndian = $pkg.bigEndian = $newType(0, $kindStruct, "binary.bigEndian", true, "encoding/binary", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - sliceType = $sliceType($Uint8); - littleEndian.ptr.prototype.Uint16 = function(b) { - var b; - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - return ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) << 16 >>> 16)) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; - }; - littleEndian.prototype.Uint16 = function(b) { return this.$val.Uint16(b); }; - littleEndian.ptr.prototype.PutUint16 = function(b, v) { - var b, v; - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((v << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 8 << 16 >>> 16) << 24 >>> 24))); - }; - littleEndian.prototype.PutUint16 = function(b, v) { return this.$val.PutUint16(b, v); }; - littleEndian.ptr.prototype.Uint32 = function(b) { - var b; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - return ((((((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) << 24 >>> 0)) >>> 0; - }; - littleEndian.prototype.Uint32 = function(b) { return this.$val.Uint32(b); }; - littleEndian.ptr.prototype.PutUint32 = function(b, v) { - var b, v; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((v << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 8 >>> 0) << 24 >>> 24))); - (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (((v >>> 16 >>> 0) << 24 >>> 24))); - (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = (((v >>> 24 >>> 0) << 24 >>> 24))); - }; - littleEndian.prototype.PutUint32 = function(b, v) { return this.$val.PutUint32(b, v); }; - littleEndian.ptr.prototype.Uint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - return (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), x$7 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - }; - littleEndian.prototype.Uint64 = function(b) { return this.$val.Uint64(b); }; - littleEndian.ptr.prototype.PutUint64 = function(b, v) { - var b, v; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((v.$low << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (($shiftRightUint64(v, 8).$low << 24 >>> 24))); - (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (($shiftRightUint64(v, 16).$low << 24 >>> 24))); - (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = (($shiftRightUint64(v, 24).$low << 24 >>> 24))); - (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4] = (($shiftRightUint64(v, 32).$low << 24 >>> 24))); - (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5] = (($shiftRightUint64(v, 40).$low << 24 >>> 24))); - (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6] = (($shiftRightUint64(v, 48).$low << 24 >>> 24))); - (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7] = (($shiftRightUint64(v, 56).$low << 24 >>> 24))); - }; - littleEndian.prototype.PutUint64 = function(b, v) { return this.$val.PutUint64(b, v); }; - littleEndian.ptr.prototype.String = function() { - return "LittleEndian"; - }; - littleEndian.prototype.String = function() { return this.$val.String(); }; - littleEndian.ptr.prototype.GoString = function() { - return "binary.LittleEndian"; - }; - littleEndian.prototype.GoString = function() { return this.$val.GoString(); }; - bigEndian.ptr.prototype.Uint16 = function(b) { - var b; - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - return ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) << 16 >>> 16)) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; - }; - bigEndian.prototype.Uint16 = function(b) { return this.$val.Uint16(b); }; - bigEndian.ptr.prototype.PutUint16 = function(b, v) { - var b, v; - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (((v >>> 8 << 16 >>> 16) << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = ((v << 24 >>> 24))); - }; - bigEndian.prototype.PutUint16 = function(b, v) { return this.$val.PutUint16(b, v); }; - bigEndian.ptr.prototype.Uint32 = function(b) { - var b; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - return ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; - }; - bigEndian.prototype.Uint32 = function(b) { return this.$val.Uint32(b); }; - bigEndian.ptr.prototype.PutUint32 = function(b, v) { - var b, v; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (((v >>> 24 >>> 0) << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 16 >>> 0) << 24 >>> 24))); - (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (((v >>> 8 >>> 0) << 24 >>> 24))); - (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = ((v << 24 >>> 24))); - }; - bigEndian.prototype.PutUint32 = function(b, v) { return this.$val.PutUint32(b, v); }; - bigEndian.ptr.prototype.Uint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - return (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - }; - bigEndian.prototype.Uint64 = function(b) { return this.$val.Uint64(b); }; - bigEndian.ptr.prototype.PutUint64 = function(b, v) { - var b, v; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (($shiftRightUint64(v, 56).$low << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (($shiftRightUint64(v, 48).$low << 24 >>> 24))); - (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (($shiftRightUint64(v, 40).$low << 24 >>> 24))); - (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = (($shiftRightUint64(v, 32).$low << 24 >>> 24))); - (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4] = (($shiftRightUint64(v, 24).$low << 24 >>> 24))); - (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5] = (($shiftRightUint64(v, 16).$low << 24 >>> 24))); - (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6] = (($shiftRightUint64(v, 8).$low << 24 >>> 24))); - (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7] = ((v.$low << 24 >>> 24))); - }; - bigEndian.prototype.PutUint64 = function(b, v) { return this.$val.PutUint64(b, v); }; - bigEndian.ptr.prototype.String = function() { - return "BigEndian"; - }; - bigEndian.prototype.String = function() { return this.$val.String(); }; - bigEndian.ptr.prototype.GoString = function() { - return "binary.BigEndian"; - }; - bigEndian.prototype.GoString = function() { return this.$val.GoString(); }; - littleEndian.methods = [{prop: "Uint16", name: "Uint16", pkg: "", typ: $funcType([sliceType], [$Uint16], false)}, {prop: "PutUint16", name: "PutUint16", pkg: "", typ: $funcType([sliceType, $Uint16], [], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([sliceType], [$Uint32], false)}, {prop: "PutUint32", name: "PutUint32", pkg: "", typ: $funcType([sliceType, $Uint32], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([sliceType], [$Uint64], false)}, {prop: "PutUint64", name: "PutUint64", pkg: "", typ: $funcType([sliceType, $Uint64], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]; - bigEndian.methods = [{prop: "Uint16", name: "Uint16", pkg: "", typ: $funcType([sliceType], [$Uint16], false)}, {prop: "PutUint16", name: "PutUint16", pkg: "", typ: $funcType([sliceType, $Uint16], [], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([sliceType], [$Uint32], false)}, {prop: "PutUint32", name: "PutUint32", pkg: "", typ: $funcType([sliceType, $Uint32], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([sliceType], [$Uint64], false)}, {prop: "PutUint64", name: "PutUint64", pkg: "", typ: $funcType([sliceType, $Uint64], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]; - littleEndian.init("", []); - bigEndian.init("", []); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.LittleEndian = new littleEndian.ptr(); - $pkg.BigEndian = new bigEndian.ptr(); - overflow = errors.New("binary: varint overflows a 64-bit integer"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["hash"] = (function() { - var $pkg = {}, $init, io, Hash, sliceType; - io = $packages["io"]; - Hash = $pkg.Hash = $newType(8, $kindInterface, "hash.Hash", true, "hash", true, null); - sliceType = $sliceType($Uint8); - Hash.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = io.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["hash/adler32"] = (function() { - var $pkg = {}, $init, errors, hash; - errors = $packages["errors"]; - hash = $packages["hash"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["compress/zlib"] = (function() { - var $pkg = {}, $init, bufio, flate, binary, errors, fmt, hash, adler32, io; - bufio = $packages["bufio"]; - flate = $packages["compress/flate"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - hash = $packages["hash"]; - adler32 = $packages["hash/adler32"]; - io = $packages["io"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flate.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = adler32.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrChecksum = errors.New("zlib: invalid checksum"); - $pkg.ErrDictionary = errors.New("zlib: invalid dictionary"); - $pkg.ErrHeader = errors.New("zlib: invalid header"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["hash/fnv"] = (function() { - var $pkg = {}, $init, errors, hash, bits, sum64, ptrType$2, sliceType, New64, appendUint64, readUint64; - errors = $packages["errors"]; - hash = $packages["hash"]; - bits = $packages["math/bits"]; - sum64 = $pkg.sum64 = $newType(8, $kindUint64, "fnv.sum64", true, "hash/fnv", false, null); - ptrType$2 = $ptrType(sum64); - sliceType = $sliceType($Uint8); - New64 = function() { - var s, s$24ptr; - s = new sum64(3421674724, 2216829733); - return (s$24ptr || (s$24ptr = new ptrType$2(function() { return s; }, function($v) { s = $v; }))); - }; - $pkg.New64 = New64; - $ptrType(sum64).prototype.Reset = function() { - var s; - s = this; - s.$set(new sum64(3421674724, 2216829733)); - }; - $ptrType(sum64).prototype.Sum64 = function() { - var s, x; - s = this; - return ((x = s.$get(), new $Uint64(x.$high, x.$low))); - }; - $ptrType(sum64).prototype.Write = function(data) { - var _i, _ref, c, data, hash$1, s, x; - s = this; - hash$1 = s.$get(); - _ref = data; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - hash$1 = $mul64(hash$1, (new sum64(256, 435))); - hash$1 = (x = (new sum64(0, c)), new sum64(hash$1.$high ^ x.$high, (hash$1.$low ^ x.$low) >>> 0)); - _i++; - } - s.$set(hash$1); - return [data.$length, $ifaceNil]; - }; - $ptrType(sum64).prototype.Size = function() { - var s; - s = this; - return 8; - }; - $ptrType(sum64).prototype.BlockSize = function() { - var s; - s = this; - return 1; - }; - $ptrType(sum64).prototype.Sum = function(in$1) { - var in$1, s, v, x; - s = this; - v = ((x = s.$get(), new $Uint64(x.$high, x.$low))); - return $append(in$1, (($shiftRightUint64(v, 56).$low << 24 >>> 24)), (($shiftRightUint64(v, 48).$low << 24 >>> 24)), (($shiftRightUint64(v, 40).$low << 24 >>> 24)), (($shiftRightUint64(v, 32).$low << 24 >>> 24)), (($shiftRightUint64(v, 24).$low << 24 >>> 24)), (($shiftRightUint64(v, 16).$low << 24 >>> 24)), (($shiftRightUint64(v, 8).$low << 24 >>> 24)), ((v.$low << 24 >>> 24))); - }; - $ptrType(sum64).prototype.MarshalBinary = function() { - var b, s, x; - s = this; - b = $makeSlice(sliceType, 0, 12); - b = $appendSlice(b, "fnv\x03"); - b = appendUint64(b, ((x = s.$get(), new $Uint64(x.$high, x.$low)))); - return [b, $ifaceNil]; - }; - $ptrType(sum64).prototype.UnmarshalBinary = function(b) { - var b, s, x; - s = this; - if (b.$length < 4 || !(($bytesToString($subslice(b, 0, 4))) === "fnv\x03")) { - return errors.New("hash/fnv: invalid hash state identifier"); - } - if (!((b.$length === 12))) { - return errors.New("hash/fnv: invalid hash state size"); - } - s.$set(((x = readUint64($subslice(b, 4)), new sum64(x.$high, x.$low)))); - return $ifaceNil; - }; - appendUint64 = function(b, x) { - var a, b, x; - a = $toNativeArray($kindUint8, [(($shiftRightUint64(x, 56).$low << 24 >>> 24)), (($shiftRightUint64(x, 48).$low << 24 >>> 24)), (($shiftRightUint64(x, 40).$low << 24 >>> 24)), (($shiftRightUint64(x, 32).$low << 24 >>> 24)), (($shiftRightUint64(x, 24).$low << 24 >>> 24)), (($shiftRightUint64(x, 16).$low << 24 >>> 24)), (($shiftRightUint64(x, 8).$low << 24 >>> 24)), ((x.$low << 24 >>> 24))]); - return $appendSlice(b, new sliceType(a)); - }; - readUint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - return (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - }; - ptrType$2.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Sum64", name: "Sum64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/detrand"] = (function() { - var $pkg = {}, $init, binary, fnv, os, arrayType, sliceType, randSeed, _r, Bool, Intn, binaryHash; - binary = $packages["encoding/binary"]; - fnv = $packages["hash/fnv"]; - os = $packages["os"]; - arrayType = $arrayType($Uint8, 64); - sliceType = $sliceType($Uint8); - Bool = function() { - var x; - return (x = $div64(randSeed, new $Uint64(0, 2), true), (x.$high === 0 && x.$low === 1)); - }; - $pkg.Bool = Bool; - Intn = function(n) { - var n; - if (n <= 0) { - $panic(new $String("must be positive")); - } - return (($div64(randSeed, (new $Uint64(0, n)), true).$low >> 0)); - }; - $pkg.Intn = Intn; - binaryHash = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, err, err$1, f, fi, h, i, s, x, x$1, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _tuple = os.Executable(); - s = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - $24r = new $Uint64(0, 0); - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = os.Open(s); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - f = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - $24r$1 = new $Uint64(0, 0); - $s = 7; case 7: return $24r$1; - /* } */ case 6: - $deferred.push([$methodVal(f, "Close"), []]); - buf = arrayType.zero(); - h = fnv.New64(); - _r$2 = f.Stat(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - fi = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 9: - $24r$2 = new $Uint64(0, 0); - $s = 11; case 11: return $24r$2; - /* } */ case 10: - _arg = $subslice(new sliceType(buf), 0, 8); - _r$3 = fi.Size(); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$3, new $Uint64(x.$high, x.$low))); - $r = $clone(binary.LittleEndian, binary.littleEndian).PutUint64(_arg, _arg$1); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = h.Write($subslice(new sliceType(buf), 0, 8)); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - i = new $Int64(0, 0); - /* while (true) { */ case 15: - /* if (!((i.$high < 0 || (i.$high === 0 && i.$low < 8)))) { break; } */ if(!((i.$high < 0 || (i.$high === 0 && i.$low < 8)))) { $s = 16; continue; } - _arg$2 = new sliceType(buf); - _r$5 = fi.Size(); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$3 = $div64($mul64(i, _r$5), new $Int64(0, 8), false); - _r$6 = f.ReadAt(_arg$2, _arg$3); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$3 = _r$6; - err$1 = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 19: - $24r$3 = new $Uint64(0, 0); - $s = 21; case 21: return $24r$3; - /* } */ case 20: - _r$7 = h.Write(new sliceType(buf)); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - i = (x$1 = new $Int64(0, 1), new $Int64(i.$high + x$1.$high, i.$low + x$1.$low)); - $s = 15; continue; - case 16: - _r$8 = h.Sum64(); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$4 = _r$8; - $s = 24; case 24: return $24r$4; - /* */ } return; } } catch(err) { $err = err; $s = -1; return new $Uint64(0, 0); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: binaryHash, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, err, err$1, f, fi, h, i, s, x, x$1, $s, $deferred};return $f; } } - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fnv.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = binaryHash(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - randSeed = _r; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/errors"] = (function() { - var $pkg = {}, $init, errors, fmt, detrand, prefixError, wrapError, sliceType, ptrType, ptrType$1, prefix, New, format, InvalidUTF8, RequiredNotSet; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - detrand = $packages["google.golang.org/protobuf/internal/detrand"]; - prefixError = $pkg.prefixError = $newType(0, $kindStruct, "errors.prefixError", true, "google.golang.org/protobuf/internal/errors", false, function(s_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - return; - } - this.s = s_; - }); - wrapError = $pkg.wrapError = $newType(0, $kindStruct, "errors.wrapError", true, "google.golang.org/protobuf/internal/errors", false, function(s_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - this.err = $ifaceNil; - return; - } - this.s = s_; - this.err = err_; - }); - sliceType = $sliceType($emptyInterface); - ptrType = $ptrType(prefixError); - ptrType$1 = $ptrType(wrapError); - New = function(f, x) { - var {$24r, _r, f, x, $s, $r, $c} = $restore(this, {f, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = format(f, x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new prefixError.ptr(_r); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: New, $c: true, $r, $24r, _r, f, x, $s};return $f; - }; - $pkg.New = New; - prefixError.ptr.prototype.Error = function() { - var e; - e = this; - return prefix + e.s; - }; - prefixError.prototype.Error = function() { return this.$val.Error(); }; - prefixError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return $pkg.Error; - }; - prefixError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - wrapError.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = format("%v%v: %v", new sliceType([new $String(prefix), new $String(e.s), e.err])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: wrapError.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - wrapError.prototype.Error = function() { return this.$val.Error(); }; - wrapError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.err; - }; - wrapError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - wrapError.ptr.prototype.Is = function(target) { - var e, target; - e = this; - return $interfaceIsEqual(target, $pkg.Error); - }; - wrapError.prototype.Is = function(target) { return this.$val.Is(target); }; - format = function(f, x) { - var {$24r, _r, _r$1, _ref, e, e$1, f, i, x, $s, $r, $c} = $restore(this, {f, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = 0; - /* while (true) { */ case 1: - /* if (!(i < x.$length)) { break; } */ if(!(i < x.$length)) { $s = 2; continue; } - _ref = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]); - /* */ if ($assertType(_ref, ptrType, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, ptrType$1, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($assertType(_ref, ptrType, true)[1]) { */ case 3: - e = _ref.$val; - ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = new $String(e.s)); - $s = 5; continue; - /* } else if ($assertType(_ref, ptrType$1, true)[1]) { */ case 4: - e$1 = _ref.$val; - _r = format("%v: %v", new sliceType([new $String(e$1.s), e$1.err])); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = new $String(_r)); - /* } */ case 5: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - _r$1 = fmt.Sprintf(f, x); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: format, $c: true, $r, $24r, _r, _r$1, _ref, e, e$1, f, i, x, $s};return $f; - }; - InvalidUTF8 = function(name) { - var {$24r, _r, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = New("field %v contains invalid UTF-8", new sliceType([new $String(name)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InvalidUTF8, $c: true, $r, $24r, _r, name, $s};return $f; - }; - $pkg.InvalidUTF8 = InvalidUTF8; - RequiredNotSet = function(name) { - var {$24r, _r, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = New("required field %v not set", new sliceType([new $String(name)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: RequiredNotSet, $c: true, $r, $24r, _r, name, $s};return $f; - }; - $pkg.RequiredNotSet = RequiredNotSet; - ptrType.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$1.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Is", name: "Is", pkg: "", typ: $funcType([$error], [$Bool], false)}]; - prefixError.init("google.golang.org/protobuf/internal/errors", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}]); - wrapError.init("google.golang.org/protobuf/internal/errors", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = detrand.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Error = errors.New("protobuf error"); - prefix = (function() { - if (detrand.Bool()) { - return "proto:\xC2\xA0"; - } else { - return "proto: "; - } - })(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/encoding/protowire"] = (function() { - var $pkg = {}, $init, errors, io, math, bits, Number, Type, sliceType, sliceType$1, errFieldNumber, errOverflow, errReserved, errEndGroup, errParse, _r, _r$1, _r$2, _r$3, _r$4, ParseError, ConsumeField, ConsumeFieldValue, consumeFieldValueD, AppendTag, ConsumeTag, SizeTag, AppendVarint, ConsumeVarint, SizeVarint, AppendFixed32, ConsumeFixed32, SizeFixed32, AppendFixed64, ConsumeFixed64, SizeFixed64, AppendBytes, ConsumeBytes, SizeBytes, AppendString, ConsumeGroup, SizeGroup, DecodeTag, EncodeTag, DecodeZigZag, EncodeZigZag, DecodeBool, EncodeBool; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - io = $packages["io"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - Number = $pkg.Number = $newType(4, $kindInt32, "protowire.Number", true, "google.golang.org/protobuf/encoding/protowire", true, null); - Type = $pkg.Type = $newType(1, $kindInt8, "protowire.Type", true, "google.golang.org/protobuf/encoding/protowire", true, null); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - Number.prototype.IsValid = function() { - var n; - n = this.$val; - return 1 <= n && n < 19000 || 19999 < n && n <= 536870911; - }; - $ptrType(Number).prototype.IsValid = function() { return new Number(this.$get()).IsValid(); }; - ParseError = function(n) { - var _1, n; - if (n >= 0) { - return $ifaceNil; - } - _1 = n; - if (_1 === (-1)) { - return io.ErrUnexpectedEOF; - } else if (_1 === (-2)) { - return errFieldNumber; - } else if (_1 === (-3)) { - return errOverflow; - } else if (_1 === (-4)) { - return errReserved; - } else if (_1 === (-5)) { - return errEndGroup; - } else { - return errParse; - } - }; - $pkg.ParseError = ParseError; - ConsumeField = function(b) { - var _tuple, b, m, n, num, typ; - _tuple = ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - if (n < 0) { - return [0, 0, n]; - } - m = ConsumeFieldValue(num, typ, $subslice(b, n)); - if (m < 0) { - return [0, 0, m]; - } - return [num, typ, n + m >> 0]; - }; - $pkg.ConsumeField = ConsumeField; - ConsumeFieldValue = function(num, typ, b) { - var b, n, num, typ; - n = 0; - n = consumeFieldValueD(num, typ, b, 10000); - return n; - }; - $pkg.ConsumeFieldValue = ConsumeFieldValue; - consumeFieldValueD = function(num, typ, b, depth) { - var _1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, depth, n, n$1, n0, num, num2, typ, typ2; - n = 0; - _1 = typ; - if (_1 === (0)) { - _tuple = ConsumeVarint(b); - n = _tuple[1]; - n = n; - return n; - } else if (_1 === (5)) { - _tuple$1 = ConsumeFixed32(b); - n = _tuple$1[1]; - n = n; - return n; - } else if (_1 === (1)) { - _tuple$2 = ConsumeFixed64(b); - n = _tuple$2[1]; - n = n; - return n; - } else if (_1 === (2)) { - _tuple$3 = ConsumeBytes(b); - n = _tuple$3[1]; - n = n; - return n; - } else if (_1 === (3)) { - if (depth < 0) { - n = -6; - return n; - } - n0 = b.$length; - while (true) { - _tuple$4 = ConsumeTag(b); - num2 = _tuple$4[0]; - typ2 = _tuple$4[1]; - n$1 = _tuple$4[2]; - if (n$1 < 0) { - n = n$1; - return n; - } - b = $subslice(b, n$1); - if (typ2 === 4) { - if (!((num === num2))) { - n = -5; - return n; - } - n = n0 - b.$length >> 0; - return n; - } - n$1 = consumeFieldValueD(num2, typ2, b, depth - 1 >> 0); - if (n$1 < 0) { - n = n$1; - return n; - } - b = $subslice(b, n$1); - } - } else if (_1 === (4)) { - n = -5; - return n; - } else { - n = -4; - return n; - } - }; - AppendTag = function(b, num, typ) { - var b, num, typ; - return AppendVarint(b, EncodeTag(num, typ)); - }; - $pkg.AppendTag = AppendTag; - ConsumeTag = function(b) { - var _tuple, _tuple$1, b, n, num, typ, v; - _tuple = ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - return [0, 0, n]; - } - _tuple$1 = DecodeTag(v); - num = _tuple$1[0]; - typ = _tuple$1[1]; - if (num < 1) { - return [0, 0, -2]; - } - return [num, typ, n]; - }; - $pkg.ConsumeTag = ConsumeTag; - SizeTag = function(num) { - var num; - return SizeVarint(EncodeTag(num, 0)); - }; - $pkg.SizeTag = SizeTag; - AppendVarint = function(b, v) { - var b, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9; - if ((v.$high < 0 || (v.$high === 0 && v.$low < 128))) { - b = $append(b, ((v.$low << 24 >>> 24))); - } else if ((v.$high < 0 || (v.$high === 0 && v.$low < 16384))) { - b = $append(b, (((x = (x$1 = $shiftRightUint64(v, 0), new $Uint64(x$1.$high & 0, (x$1.$low & 127) >>> 0)), new $Uint64(x.$high | 0, (x.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 7).$low << 24 >>> 24))); - } else if ((v.$high < 0 || (v.$high === 0 && v.$low < 2097152))) { - b = $append(b, (((x$2 = (x$3 = $shiftRightUint64(v, 0), new $Uint64(x$3.$high & 0, (x$3.$low & 127) >>> 0)), new $Uint64(x$2.$high | 0, (x$2.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$4 = (x$5 = $shiftRightUint64(v, 7), new $Uint64(x$5.$high & 0, (x$5.$low & 127) >>> 0)), new $Uint64(x$4.$high | 0, (x$4.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 14).$low << 24 >>> 24))); - } else if ((v.$high < 0 || (v.$high === 0 && v.$low < 268435456))) { - b = $append(b, (((x$6 = (x$7 = $shiftRightUint64(v, 0), new $Uint64(x$7.$high & 0, (x$7.$low & 127) >>> 0)), new $Uint64(x$6.$high | 0, (x$6.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$8 = (x$9 = $shiftRightUint64(v, 7), new $Uint64(x$9.$high & 0, (x$9.$low & 127) >>> 0)), new $Uint64(x$8.$high | 0, (x$8.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$10 = (x$11 = $shiftRightUint64(v, 14), new $Uint64(x$11.$high & 0, (x$11.$low & 127) >>> 0)), new $Uint64(x$10.$high | 0, (x$10.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 21).$low << 24 >>> 24))); - } else if ((v.$high < 8 || (v.$high === 8 && v.$low < 0))) { - b = $append(b, (((x$12 = (x$13 = $shiftRightUint64(v, 0), new $Uint64(x$13.$high & 0, (x$13.$low & 127) >>> 0)), new $Uint64(x$12.$high | 0, (x$12.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$14 = (x$15 = $shiftRightUint64(v, 7), new $Uint64(x$15.$high & 0, (x$15.$low & 127) >>> 0)), new $Uint64(x$14.$high | 0, (x$14.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$16 = (x$17 = $shiftRightUint64(v, 14), new $Uint64(x$17.$high & 0, (x$17.$low & 127) >>> 0)), new $Uint64(x$16.$high | 0, (x$16.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$18 = (x$19 = $shiftRightUint64(v, 21), new $Uint64(x$19.$high & 0, (x$19.$low & 127) >>> 0)), new $Uint64(x$18.$high | 0, (x$18.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 28).$low << 24 >>> 24))); - } else if ((v.$high < 1024 || (v.$high === 1024 && v.$low < 0))) { - b = $append(b, (((x$20 = (x$21 = $shiftRightUint64(v, 0), new $Uint64(x$21.$high & 0, (x$21.$low & 127) >>> 0)), new $Uint64(x$20.$high | 0, (x$20.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$22 = (x$23 = $shiftRightUint64(v, 7), new $Uint64(x$23.$high & 0, (x$23.$low & 127) >>> 0)), new $Uint64(x$22.$high | 0, (x$22.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$24 = (x$25 = $shiftRightUint64(v, 14), new $Uint64(x$25.$high & 0, (x$25.$low & 127) >>> 0)), new $Uint64(x$24.$high | 0, (x$24.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$26 = (x$27 = $shiftRightUint64(v, 21), new $Uint64(x$27.$high & 0, (x$27.$low & 127) >>> 0)), new $Uint64(x$26.$high | 0, (x$26.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$28 = (x$29 = $shiftRightUint64(v, 28), new $Uint64(x$29.$high & 0, (x$29.$low & 127) >>> 0)), new $Uint64(x$28.$high | 0, (x$28.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 35).$low << 24 >>> 24))); - } else if ((v.$high < 131072 || (v.$high === 131072 && v.$low < 0))) { - b = $append(b, (((x$30 = (x$31 = $shiftRightUint64(v, 0), new $Uint64(x$31.$high & 0, (x$31.$low & 127) >>> 0)), new $Uint64(x$30.$high | 0, (x$30.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$32 = (x$33 = $shiftRightUint64(v, 7), new $Uint64(x$33.$high & 0, (x$33.$low & 127) >>> 0)), new $Uint64(x$32.$high | 0, (x$32.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$34 = (x$35 = $shiftRightUint64(v, 14), new $Uint64(x$35.$high & 0, (x$35.$low & 127) >>> 0)), new $Uint64(x$34.$high | 0, (x$34.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$36 = (x$37 = $shiftRightUint64(v, 21), new $Uint64(x$37.$high & 0, (x$37.$low & 127) >>> 0)), new $Uint64(x$36.$high | 0, (x$36.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$38 = (x$39 = $shiftRightUint64(v, 28), new $Uint64(x$39.$high & 0, (x$39.$low & 127) >>> 0)), new $Uint64(x$38.$high | 0, (x$38.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$40 = (x$41 = $shiftRightUint64(v, 35), new $Uint64(x$41.$high & 0, (x$41.$low & 127) >>> 0)), new $Uint64(x$40.$high | 0, (x$40.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 42).$low << 24 >>> 24))); - } else if ((v.$high < 16777216 || (v.$high === 16777216 && v.$low < 0))) { - b = $append(b, (((x$42 = (x$43 = $shiftRightUint64(v, 0), new $Uint64(x$43.$high & 0, (x$43.$low & 127) >>> 0)), new $Uint64(x$42.$high | 0, (x$42.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$44 = (x$45 = $shiftRightUint64(v, 7), new $Uint64(x$45.$high & 0, (x$45.$low & 127) >>> 0)), new $Uint64(x$44.$high | 0, (x$44.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$46 = (x$47 = $shiftRightUint64(v, 14), new $Uint64(x$47.$high & 0, (x$47.$low & 127) >>> 0)), new $Uint64(x$46.$high | 0, (x$46.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$48 = (x$49 = $shiftRightUint64(v, 21), new $Uint64(x$49.$high & 0, (x$49.$low & 127) >>> 0)), new $Uint64(x$48.$high | 0, (x$48.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$50 = (x$51 = $shiftRightUint64(v, 28), new $Uint64(x$51.$high & 0, (x$51.$low & 127) >>> 0)), new $Uint64(x$50.$high | 0, (x$50.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$52 = (x$53 = $shiftRightUint64(v, 35), new $Uint64(x$53.$high & 0, (x$53.$low & 127) >>> 0)), new $Uint64(x$52.$high | 0, (x$52.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$54 = (x$55 = $shiftRightUint64(v, 42), new $Uint64(x$55.$high & 0, (x$55.$low & 127) >>> 0)), new $Uint64(x$54.$high | 0, (x$54.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 49).$low << 24 >>> 24))); - } else if ((v.$high < 2147483648 || (v.$high === 2147483648 && v.$low < 0))) { - b = $append(b, (((x$56 = (x$57 = $shiftRightUint64(v, 0), new $Uint64(x$57.$high & 0, (x$57.$low & 127) >>> 0)), new $Uint64(x$56.$high | 0, (x$56.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$58 = (x$59 = $shiftRightUint64(v, 7), new $Uint64(x$59.$high & 0, (x$59.$low & 127) >>> 0)), new $Uint64(x$58.$high | 0, (x$58.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$60 = (x$61 = $shiftRightUint64(v, 14), new $Uint64(x$61.$high & 0, (x$61.$low & 127) >>> 0)), new $Uint64(x$60.$high | 0, (x$60.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$62 = (x$63 = $shiftRightUint64(v, 21), new $Uint64(x$63.$high & 0, (x$63.$low & 127) >>> 0)), new $Uint64(x$62.$high | 0, (x$62.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$64 = (x$65 = $shiftRightUint64(v, 28), new $Uint64(x$65.$high & 0, (x$65.$low & 127) >>> 0)), new $Uint64(x$64.$high | 0, (x$64.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$66 = (x$67 = $shiftRightUint64(v, 35), new $Uint64(x$67.$high & 0, (x$67.$low & 127) >>> 0)), new $Uint64(x$66.$high | 0, (x$66.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$68 = (x$69 = $shiftRightUint64(v, 42), new $Uint64(x$69.$high & 0, (x$69.$low & 127) >>> 0)), new $Uint64(x$68.$high | 0, (x$68.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$70 = (x$71 = $shiftRightUint64(v, 49), new $Uint64(x$71.$high & 0, (x$71.$low & 127) >>> 0)), new $Uint64(x$70.$high | 0, (x$70.$low | 128) >>> 0)).$low << 24 >>> 24)), (($shiftRightUint64(v, 56).$low << 24 >>> 24))); - } else { - b = $append(b, (((x$72 = (x$73 = $shiftRightUint64(v, 0), new $Uint64(x$73.$high & 0, (x$73.$low & 127) >>> 0)), new $Uint64(x$72.$high | 0, (x$72.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$74 = (x$75 = $shiftRightUint64(v, 7), new $Uint64(x$75.$high & 0, (x$75.$low & 127) >>> 0)), new $Uint64(x$74.$high | 0, (x$74.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$76 = (x$77 = $shiftRightUint64(v, 14), new $Uint64(x$77.$high & 0, (x$77.$low & 127) >>> 0)), new $Uint64(x$76.$high | 0, (x$76.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$78 = (x$79 = $shiftRightUint64(v, 21), new $Uint64(x$79.$high & 0, (x$79.$low & 127) >>> 0)), new $Uint64(x$78.$high | 0, (x$78.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$80 = (x$81 = $shiftRightUint64(v, 28), new $Uint64(x$81.$high & 0, (x$81.$low & 127) >>> 0)), new $Uint64(x$80.$high | 0, (x$80.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$82 = (x$83 = $shiftRightUint64(v, 35), new $Uint64(x$83.$high & 0, (x$83.$low & 127) >>> 0)), new $Uint64(x$82.$high | 0, (x$82.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$84 = (x$85 = $shiftRightUint64(v, 42), new $Uint64(x$85.$high & 0, (x$85.$low & 127) >>> 0)), new $Uint64(x$84.$high | 0, (x$84.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$86 = (x$87 = $shiftRightUint64(v, 49), new $Uint64(x$87.$high & 0, (x$87.$low & 127) >>> 0)), new $Uint64(x$86.$high | 0, (x$86.$low | 128) >>> 0)).$low << 24 >>> 24)), (((x$88 = (x$89 = $shiftRightUint64(v, 56), new $Uint64(x$89.$high & 0, (x$89.$low & 127) >>> 0)), new $Uint64(x$88.$high | 0, (x$88.$low | 128) >>> 0)).$low << 24 >>> 24)), 1); - } - return b; - }; - $pkg.AppendVarint = AppendVarint; - ConsumeVarint = function(b) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, b, n, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y; - v = new $Uint64(0, 0); - n = 0; - y = new $Uint64(0, 0); - if (b.$length <= 0) { - _tmp = new $Uint64(0, 0); - _tmp$1 = -1; - v = _tmp; - n = _tmp$1; - return [v, n]; - } - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - if ((v.$high < 0 || (v.$high === 0 && v.$low < 128))) { - _tmp$2 = v; - _tmp$3 = 1; - v = _tmp$2; - n = _tmp$3; - return [v, n]; - } - v = (x = new $Uint64(0, 128), new $Uint64(v.$high - x.$high, v.$low - x.$low)); - if (b.$length <= 1) { - _tmp$4 = new $Uint64(0, 0); - _tmp$5 = -1; - v = _tmp$4; - n = _tmp$5; - return [v, n]; - } - y = (new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))); - v = (x$1 = $shiftLeft64(y, 7), new $Uint64(v.$high + x$1.$high, v.$low + x$1.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$6 = v; - _tmp$7 = 2; - v = _tmp$6; - n = _tmp$7; - return [v, n]; - } - v = (x$2 = new $Uint64(0, 16384), new $Uint64(v.$high - x$2.$high, v.$low - x$2.$low)); - if (b.$length <= 2) { - _tmp$8 = new $Uint64(0, 0); - _tmp$9 = -1; - v = _tmp$8; - n = _tmp$9; - return [v, n]; - } - y = (new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))); - v = (x$3 = $shiftLeft64(y, 14), new $Uint64(v.$high + x$3.$high, v.$low + x$3.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$10 = v; - _tmp$11 = 3; - v = _tmp$10; - n = _tmp$11; - return [v, n]; - } - v = (x$4 = new $Uint64(0, 2097152), new $Uint64(v.$high - x$4.$high, v.$low - x$4.$low)); - if (b.$length <= 3) { - _tmp$12 = new $Uint64(0, 0); - _tmp$13 = -1; - v = _tmp$12; - n = _tmp$13; - return [v, n]; - } - y = (new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))); - v = (x$5 = $shiftLeft64(y, 21), new $Uint64(v.$high + x$5.$high, v.$low + x$5.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$14 = v; - _tmp$15 = 4; - v = _tmp$14; - n = _tmp$15; - return [v, n]; - } - v = (x$6 = new $Uint64(0, 268435456), new $Uint64(v.$high - x$6.$high, v.$low - x$6.$low)); - if (b.$length <= 4) { - _tmp$16 = new $Uint64(0, 0); - _tmp$17 = -1; - v = _tmp$16; - n = _tmp$17; - return [v, n]; - } - y = (new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))); - v = (x$7 = $shiftLeft64(y, 28), new $Uint64(v.$high + x$7.$high, v.$low + x$7.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$18 = v; - _tmp$19 = 5; - v = _tmp$18; - n = _tmp$19; - return [v, n]; - } - v = (x$8 = new $Uint64(8, 0), new $Uint64(v.$high - x$8.$high, v.$low - x$8.$low)); - if (b.$length <= 5) { - _tmp$20 = new $Uint64(0, 0); - _tmp$21 = -1; - v = _tmp$20; - n = _tmp$21; - return [v, n]; - } - y = (new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))); - v = (x$9 = $shiftLeft64(y, 35), new $Uint64(v.$high + x$9.$high, v.$low + x$9.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$22 = v; - _tmp$23 = 6; - v = _tmp$22; - n = _tmp$23; - return [v, n]; - } - v = (x$10 = new $Uint64(1024, 0), new $Uint64(v.$high - x$10.$high, v.$low - x$10.$low)); - if (b.$length <= 6) { - _tmp$24 = new $Uint64(0, 0); - _tmp$25 = -1; - v = _tmp$24; - n = _tmp$25; - return [v, n]; - } - y = (new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))); - v = (x$11 = $shiftLeft64(y, 42), new $Uint64(v.$high + x$11.$high, v.$low + x$11.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$26 = v; - _tmp$27 = 7; - v = _tmp$26; - n = _tmp$27; - return [v, n]; - } - v = (x$12 = new $Uint64(131072, 0), new $Uint64(v.$high - x$12.$high, v.$low - x$12.$low)); - if (b.$length <= 7) { - _tmp$28 = new $Uint64(0, 0); - _tmp$29 = -1; - v = _tmp$28; - n = _tmp$29; - return [v, n]; - } - y = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))); - v = (x$13 = $shiftLeft64(y, 49), new $Uint64(v.$high + x$13.$high, v.$low + x$13.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$30 = v; - _tmp$31 = 8; - v = _tmp$30; - n = _tmp$31; - return [v, n]; - } - v = (x$14 = new $Uint64(16777216, 0), new $Uint64(v.$high - x$14.$high, v.$low - x$14.$low)); - if (b.$length <= 8) { - _tmp$32 = new $Uint64(0, 0); - _tmp$33 = -1; - v = _tmp$32; - n = _tmp$33; - return [v, n]; - } - y = (new $Uint64(0, (8 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 8]))); - v = (x$15 = $shiftLeft64(y, 56), new $Uint64(v.$high + x$15.$high, v.$low + x$15.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 128))) { - _tmp$34 = v; - _tmp$35 = 9; - v = _tmp$34; - n = _tmp$35; - return [v, n]; - } - v = (x$16 = new $Uint64(2147483648, 0), new $Uint64(v.$high - x$16.$high, v.$low - x$16.$low)); - if (b.$length <= 9) { - _tmp$36 = new $Uint64(0, 0); - _tmp$37 = -1; - v = _tmp$36; - n = _tmp$37; - return [v, n]; - } - y = (new $Uint64(0, (9 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 9]))); - v = (x$17 = $shiftLeft64(y, 63), new $Uint64(v.$high + x$17.$high, v.$low + x$17.$low)); - if ((y.$high < 0 || (y.$high === 0 && y.$low < 2))) { - _tmp$38 = v; - _tmp$39 = 10; - v = _tmp$38; - n = _tmp$39; - return [v, n]; - } - _tmp$40 = new $Uint64(0, 0); - _tmp$41 = -3; - v = _tmp$40; - n = _tmp$41; - return [v, n]; - }; - $pkg.ConsumeVarint = ConsumeVarint; - SizeVarint = function(v) { - var _q, v; - return (_q = (((($imul(9, ((bits.Len64(v) >>> 0))) >>> 0) + 64 >>> 0) >> 0)) / 64, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - }; - $pkg.SizeVarint = SizeVarint; - AppendFixed32 = function(b, v) { - var b, v; - return $append(b, (((v >>> 0 >>> 0) << 24 >>> 24)), (((v >>> 8 >>> 0) << 24 >>> 24)), (((v >>> 16 >>> 0) << 24 >>> 24)), (((v >>> 24 >>> 0) << 24 >>> 24))); - }; - $pkg.AppendFixed32 = AppendFixed32; - ConsumeFixed32 = function(b) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, b, n, v; - v = 0; - n = 0; - if (b.$length < 4) { - _tmp = 0; - _tmp$1 = -1; - v = _tmp; - n = _tmp$1; - return [v, n]; - } - v = (((((((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 0 >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) << 24 >>> 0)) >>> 0; - _tmp$2 = v; - _tmp$3 = 4; - v = _tmp$2; - n = _tmp$3; - return [v, n]; - }; - $pkg.ConsumeFixed32 = ConsumeFixed32; - SizeFixed32 = function() { - return 4; - }; - $pkg.SizeFixed32 = SizeFixed32; - AppendFixed64 = function(b, v) { - var b, v; - return $append(b, (($shiftRightUint64(v, 0).$low << 24 >>> 24)), (($shiftRightUint64(v, 8).$low << 24 >>> 24)), (($shiftRightUint64(v, 16).$low << 24 >>> 24)), (($shiftRightUint64(v, 24).$low << 24 >>> 24)), (($shiftRightUint64(v, 32).$low << 24 >>> 24)), (($shiftRightUint64(v, 40).$low << 24 >>> 24)), (($shiftRightUint64(v, 48).$low << 24 >>> 24)), (($shiftRightUint64(v, 56).$low << 24 >>> 24))); - }; - $pkg.AppendFixed64 = AppendFixed64; - ConsumeFixed64 = function(b) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, b, n, v, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = new $Uint64(0, 0); - n = 0; - if (b.$length < 8) { - _tmp = new $Uint64(0, 0); - _tmp$1 = -1; - v = _tmp; - n = _tmp$1; - return [v, n]; - } - v = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 0), x$7 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - _tmp$2 = v; - _tmp$3 = 8; - v = _tmp$2; - n = _tmp$3; - return [v, n]; - }; - $pkg.ConsumeFixed64 = ConsumeFixed64; - SizeFixed64 = function() { - return 8; - }; - $pkg.SizeFixed64 = SizeFixed64; - AppendBytes = function(b, v) { - var b, v; - return $appendSlice(AppendVarint(b, (new $Uint64(0, v.$length))), v); - }; - $pkg.AppendBytes = AppendBytes; - ConsumeBytes = function(b) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, m, n, v, x; - v = sliceType$1.nil; - n = 0; - _tuple = ConsumeVarint(b); - m = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = sliceType$1.nil; - _tmp$1 = n; - v = _tmp; - n = _tmp$1; - return [v, n]; - } - if ((x = (new $Uint64(0, $subslice(b, n).$length)), (m.$high > x.$high || (m.$high === x.$high && m.$low > x.$low)))) { - _tmp$2 = sliceType$1.nil; - _tmp$3 = -1; - v = _tmp$2; - n = _tmp$3; - return [v, n]; - } - _tmp$4 = $subslice($subslice(b, n), 0, $flatten64(m)); - _tmp$5 = n + ((m.$low >> 0)) >> 0; - v = _tmp$4; - n = _tmp$5; - return [v, n]; - }; - $pkg.ConsumeBytes = ConsumeBytes; - SizeBytes = function(n) { - var n; - return SizeVarint((new $Uint64(0, n))) + n >> 0; - }; - $pkg.SizeBytes = SizeBytes; - AppendString = function(b, v) { - var b, v; - return $appendSlice(AppendVarint(b, (new $Uint64(0, v.length))), v); - }; - $pkg.AppendString = AppendString; - ConsumeGroup = function(num, b) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, b, n, num, v, x; - v = sliceType$1.nil; - n = 0; - n = ConsumeFieldValue(num, 3, b); - if (n < 0) { - _tmp = sliceType$1.nil; - _tmp$1 = n; - v = _tmp; - n = _tmp$1; - return [v, n]; - } - b = $subslice(b, 0, n); - while (true) { - if (!(b.$length > 0 && ((((x = b.$length - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])) & 127) >>> 0) === 0))) { break; } - b = $subslice(b, 0, (b.$length - 1 >> 0)); - } - b = $subslice(b, 0, (b.$length - SizeTag(num) >> 0)); - _tmp$2 = b; - _tmp$3 = n; - v = _tmp$2; - n = _tmp$3; - return [v, n]; - }; - $pkg.ConsumeGroup = ConsumeGroup; - SizeGroup = function(num, n) { - var n, num; - return n + SizeTag(num) >> 0; - }; - $pkg.SizeGroup = SizeGroup; - DecodeTag = function(x) { - var x, x$1; - if ((x$1 = $shiftRightUint64(x, 3), (x$1.$high > 0 || (x$1.$high === 0 && x$1.$low > 2147483647)))) { - return [-1, 0]; - } - return [(($shiftRightUint64(x, 3).$low >> 0)), ((new $Uint64(x.$high & 0, (x.$low & 7) >>> 0).$low << 24 >> 24))]; - }; - $pkg.DecodeTag = DecodeTag; - EncodeTag = function(num, typ) { - var num, typ, x, x$1; - return (x = $shiftLeft64((new $Uint64(0, num)), 3), x$1 = (new $Uint64(0, (typ & 7))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - }; - $pkg.EncodeTag = EncodeTag; - DecodeZigZag = function(x) { - var x, x$1, x$2, x$3; - return (x$1 = ((x$2 = $shiftRightUint64(x, 1), new $Int64(x$2.$high, x$2.$low))), x$3 = $shiftRightInt64($shiftLeft64((new $Int64(x.$high, x.$low)), 63), 63), new $Int64(x$1.$high ^ x$3.$high, (x$1.$low ^ x$3.$low) >>> 0)); - }; - $pkg.DecodeZigZag = DecodeZigZag; - EncodeZigZag = function(x) { - var x, x$1, x$2, x$3, x$4; - return (x$1 = ((x$2 = $shiftLeft64(x, 1), new $Uint64(x$2.$high, x$2.$low))), x$3 = ((x$4 = $shiftRightInt64(x, 63), new $Uint64(x$4.$high, x$4.$low))), new $Uint64(x$1.$high ^ x$3.$high, (x$1.$low ^ x$3.$low) >>> 0)); - }; - $pkg.EncodeZigZag = EncodeZigZag; - DecodeBool = function(x) { - var x; - return !((x.$high === 0 && x.$low === 0)); - }; - $pkg.DecodeBool = DecodeBool; - EncodeBool = function(x) { - var x; - if (x) { - return new $Uint64(0, 1); - } - return new $Uint64(0, 0); - }; - $pkg.EncodeBool = EncodeBool; - Number.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = errors.New("invalid field number", new sliceType([])); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - errFieldNumber = _r; - _r$1 = errors.New("variable length integer overflow", new sliceType([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - errOverflow = _r$1; - _r$2 = errors.New("cannot parse reserved wire type", new sliceType([])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - errReserved = _r$2; - _r$3 = errors.New("mismatching end group marker", new sliceType([])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - errEndGroup = _r$3; - _r$4 = errors.New("parse error", new sliceType([])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - errParse = _r$4; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/pragma"] = (function() { - var $pkg = {}, $init, sync, NoUnkeyedLiterals, DoNotImplement, DoNotCompare, DoNotCopy, funcType; - sync = $packages["sync"]; - NoUnkeyedLiterals = $pkg.NoUnkeyedLiterals = $newType(0, $kindStruct, "pragma.NoUnkeyedLiterals", true, "google.golang.org/protobuf/internal/pragma", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - DoNotImplement = $pkg.DoNotImplement = $newType(8, $kindInterface, "pragma.DoNotImplement", true, "google.golang.org/protobuf/internal/pragma", true, null); - DoNotCompare = $pkg.DoNotCompare = $newType(0, $kindArray, "pragma.DoNotCompare", true, "google.golang.org/protobuf/internal/pragma", true, null); - DoNotCopy = $pkg.DoNotCopy = $newType(0, $kindArray, "pragma.DoNotCopy", true, "google.golang.org/protobuf/internal/pragma", true, null); - funcType = $funcType([], [], false); - NoUnkeyedLiterals.init("", []); - DoNotImplement.init([{prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([DoNotImplement], [], false)}]); - DoNotCompare.init(funcType, 0); - DoNotCopy.init(sync.Mutex, 0); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = sync.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/reflect/protoreflect"] = (function() { - var $pkg = {}, $init, fmt, protowire, pragma, math, strconv, strings, Value, MapKey, valueType, Enum, Message, RawFields, List, Map, Descriptor, FileDescriptor, FileImports, FileImport, MessageDescriptor, MessageType, MessageDescriptors, FieldDescriptor, FieldDescriptors, OneofDescriptor, OneofDescriptors, ExtensionTypeDescriptor, ExtensionDescriptors, ExtensionType, EnumDescriptor, EnumType, EnumDescriptors, EnumValueDescriptor, EnumValueDescriptors, ServiceDescriptor, ServiceDescriptors, MethodDescriptor, MethodDescriptors, SourceLocations, SourceLocation, SourcePath, appendFunc, ProtoMessage, Syntax, Cardinality, Kind, FieldNumbers, FieldRanges, EnumNumber, EnumRanges, Name, Names, FullName, sliceType, funcType, arrayType, sliceType$1, ptrType, structType, structType$1, funcType$1, structType$2, structType$3, funcType$2, interfaceType, structType$4, structType$5, funcType$3, structType$6, funcType$4, structType$7, structType$8, funcType$5, structType$9, ptrType$1, funcType$6, funcType$7, sliceType$2, arrayType$1, arrayType$2, ValueOfBool, ValueOfInt32, ValueOfInt64, ValueOfUint32, ValueOfUint64, ValueOfFloat32, ValueOfFloat64, ValueOfString, ValueOfBytes, ValueOfEnum, ValueOfMessage, ValueOfList, ValueOfMap, valueOfString, valueOfBytes, valueOfIface, consumeIdent, isLetter, isLetterDigit; - fmt = $packages["fmt"]; - protowire = $packages["google.golang.org/protobuf/encoding/protowire"]; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - math = $packages["math"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - Value = $pkg.Value = $newType(0, $kindStruct, "protoreflect.Value", true, "google.golang.org/protobuf/reflect/protoreflect", true, function(DoNotCompare_, typ_, num_, str_, bin_, iface_) { - this.$val = this; - if (arguments.length === 0) { - this.DoNotCompare = arrayType.zero(); - this.typ = 0; - this.num = new $Uint64(0, 0); - this.str = ""; - this.bin = sliceType.nil; - this.iface = $ifaceNil; - return; - } - this.DoNotCompare = DoNotCompare_; - this.typ = typ_; - this.num = num_; - this.str = str_; - this.bin = bin_; - this.iface = iface_; - }); - MapKey = $pkg.MapKey = $newType(0, $kindStruct, "protoreflect.MapKey", true, "google.golang.org/protobuf/reflect/protoreflect", true, function(DoNotCompare_, typ_, num_, str_, bin_, iface_) { - this.$val = this; - if (arguments.length === 0) { - this.DoNotCompare = arrayType.zero(); - this.typ = 0; - this.num = new $Uint64(0, 0); - this.str = ""; - this.bin = sliceType.nil; - this.iface = $ifaceNil; - return; - } - this.DoNotCompare = DoNotCompare_; - this.typ = typ_; - this.num = num_; - this.str = str_; - this.bin = bin_; - this.iface = iface_; - }); - valueType = $pkg.valueType = $newType(4, $kindInt, "protoreflect.valueType", true, "google.golang.org/protobuf/reflect/protoreflect", false, null); - Enum = $pkg.Enum = $newType(8, $kindInterface, "protoreflect.Enum", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Message = $pkg.Message = $newType(8, $kindInterface, "protoreflect.Message", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - RawFields = $pkg.RawFields = $newType(12, $kindSlice, "protoreflect.RawFields", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - List = $pkg.List = $newType(8, $kindInterface, "protoreflect.List", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Map = $pkg.Map = $newType(8, $kindInterface, "protoreflect.Map", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Descriptor = $pkg.Descriptor = $newType(8, $kindInterface, "protoreflect.Descriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FileDescriptor = $pkg.FileDescriptor = $newType(8, $kindInterface, "protoreflect.FileDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FileImports = $pkg.FileImports = $newType(8, $kindInterface, "protoreflect.FileImports", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FileImport = $pkg.FileImport = $newType(0, $kindStruct, "protoreflect.FileImport", true, "google.golang.org/protobuf/reflect/protoreflect", true, function(FileDescriptor_, IsPublic_, IsWeak_) { - this.$val = this; - if (arguments.length === 0) { - this.FileDescriptor = $ifaceNil; - this.IsPublic = false; - this.IsWeak = false; - return; - } - this.FileDescriptor = FileDescriptor_; - this.IsPublic = IsPublic_; - this.IsWeak = IsWeak_; - }); - MessageDescriptor = $pkg.MessageDescriptor = $newType(8, $kindInterface, "protoreflect.MessageDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - MessageType = $pkg.MessageType = $newType(8, $kindInterface, "protoreflect.MessageType", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - MessageDescriptors = $pkg.MessageDescriptors = $newType(8, $kindInterface, "protoreflect.MessageDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FieldDescriptor = $pkg.FieldDescriptor = $newType(8, $kindInterface, "protoreflect.FieldDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FieldDescriptors = $pkg.FieldDescriptors = $newType(8, $kindInterface, "protoreflect.FieldDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - OneofDescriptor = $pkg.OneofDescriptor = $newType(8, $kindInterface, "protoreflect.OneofDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - OneofDescriptors = $pkg.OneofDescriptors = $newType(8, $kindInterface, "protoreflect.OneofDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - ExtensionTypeDescriptor = $pkg.ExtensionTypeDescriptor = $newType(8, $kindInterface, "protoreflect.ExtensionTypeDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - ExtensionDescriptors = $pkg.ExtensionDescriptors = $newType(8, $kindInterface, "protoreflect.ExtensionDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - ExtensionType = $pkg.ExtensionType = $newType(8, $kindInterface, "protoreflect.ExtensionType", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumDescriptor = $pkg.EnumDescriptor = $newType(8, $kindInterface, "protoreflect.EnumDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumType = $pkg.EnumType = $newType(8, $kindInterface, "protoreflect.EnumType", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumDescriptors = $pkg.EnumDescriptors = $newType(8, $kindInterface, "protoreflect.EnumDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumValueDescriptor = $pkg.EnumValueDescriptor = $newType(8, $kindInterface, "protoreflect.EnumValueDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumValueDescriptors = $pkg.EnumValueDescriptors = $newType(8, $kindInterface, "protoreflect.EnumValueDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - ServiceDescriptor = $pkg.ServiceDescriptor = $newType(8, $kindInterface, "protoreflect.ServiceDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - ServiceDescriptors = $pkg.ServiceDescriptors = $newType(8, $kindInterface, "protoreflect.ServiceDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - MethodDescriptor = $pkg.MethodDescriptor = $newType(8, $kindInterface, "protoreflect.MethodDescriptor", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - MethodDescriptors = $pkg.MethodDescriptors = $newType(8, $kindInterface, "protoreflect.MethodDescriptors", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - SourceLocations = $pkg.SourceLocations = $newType(8, $kindInterface, "protoreflect.SourceLocations", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - SourceLocation = $pkg.SourceLocation = $newType(0, $kindStruct, "protoreflect.SourceLocation", true, "google.golang.org/protobuf/reflect/protoreflect", true, function(Path_, StartLine_, StartColumn_, EndLine_, EndColumn_, LeadingDetachedComments_, LeadingComments_, TrailingComments_, Next_) { - this.$val = this; - if (arguments.length === 0) { - this.Path = SourcePath.nil; - this.StartLine = 0; - this.StartColumn = 0; - this.EndLine = 0; - this.EndColumn = 0; - this.LeadingDetachedComments = sliceType$2.nil; - this.LeadingComments = ""; - this.TrailingComments = ""; - this.Next = 0; - return; - } - this.Path = Path_; - this.StartLine = StartLine_; - this.StartColumn = StartColumn_; - this.EndLine = EndLine_; - this.EndColumn = EndColumn_; - this.LeadingDetachedComments = LeadingDetachedComments_; - this.LeadingComments = LeadingComments_; - this.TrailingComments = TrailingComments_; - this.Next = Next_; - }); - SourcePath = $pkg.SourcePath = $newType(12, $kindSlice, "protoreflect.SourcePath", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - appendFunc = $pkg.appendFunc = $newType(4, $kindFunc, "protoreflect.appendFunc", true, "google.golang.org/protobuf/reflect/protoreflect", false, null); - ProtoMessage = $pkg.ProtoMessage = $newType(8, $kindInterface, "protoreflect.ProtoMessage", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Syntax = $pkg.Syntax = $newType(1, $kindInt8, "protoreflect.Syntax", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Cardinality = $pkg.Cardinality = $newType(1, $kindInt8, "protoreflect.Cardinality", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Kind = $pkg.Kind = $newType(1, $kindInt8, "protoreflect.Kind", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FieldNumbers = $pkg.FieldNumbers = $newType(8, $kindInterface, "protoreflect.FieldNumbers", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FieldRanges = $pkg.FieldRanges = $newType(8, $kindInterface, "protoreflect.FieldRanges", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumNumber = $pkg.EnumNumber = $newType(4, $kindInt32, "protoreflect.EnumNumber", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - EnumRanges = $pkg.EnumRanges = $newType(8, $kindInterface, "protoreflect.EnumRanges", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Name = $pkg.Name = $newType(8, $kindString, "protoreflect.Name", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - Names = $pkg.Names = $newType(8, $kindInterface, "protoreflect.Names", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - FullName = $pkg.FullName = $newType(8, $kindString, "protoreflect.FullName", true, "google.golang.org/protobuf/reflect/protoreflect", true, null); - sliceType = $sliceType($Uint8); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - sliceType$1 = $sliceType($emptyInterface); - ptrType = $ptrType(SourcePath); - structType = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: Message, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - structType$1 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: $Int, tag: ""}]); - funcType$1 = $funcType([structType], [structType$1], false); - structType$2 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: Message, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - structType$3 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType, tag: ""}]); - funcType$2 = $funcType([structType$2], [structType$3, $error], false); - interfaceType = $interfaceType([{prop: "FindExtensionByName", name: "FindExtensionByName", pkg: "", typ: $funcType([FullName], [ExtensionType, $error], false)}, {prop: "FindExtensionByNumber", name: "FindExtensionByNumber", pkg: "", typ: $funcType([FullName, protowire.Number], [ExtensionType, $error], false)}]); - structType$4 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: Message, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: interfaceType, tag: ""}, {prop: "Depth", name: "Depth", embedded: false, exported: true, typ: $Int, tag: ""}]); - structType$5 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - funcType$3 = $funcType([structType$4], [structType$5, $error], false); - structType$6 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Source", name: "Source", embedded: false, exported: true, typ: Message, tag: ""}, {prop: "Destination", name: "Destination", embedded: false, exported: true, typ: Message, tag: ""}]); - funcType$4 = $funcType([structType$6], [structType$5], false); - structType$7 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: Message, tag: ""}]); - structType$8 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}]); - funcType$5 = $funcType([structType$7], [structType$8, $error], false); - structType$9 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "Marshal", name: "Marshal", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "Unmarshal", name: "Unmarshal", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Merge", name: "Merge", embedded: false, exported: true, typ: funcType$4, tag: ""}, {prop: "CheckInitialized", name: "CheckInitialized", embedded: false, exported: true, typ: funcType$5, tag: ""}]); - ptrType$1 = $ptrType(structType$9); - funcType$6 = $funcType([FieldDescriptor, Value], [$Bool], false); - funcType$7 = $funcType([MapKey, Value], [$Bool], false); - sliceType$2 = $sliceType($String); - arrayType$1 = $arrayType(protowire.Number, 2); - arrayType$2 = $arrayType(EnumNumber, 2); - ValueOfBool = function(v) { - var v; - if (v) { - return new Value.ptr(arrayType.zero(), 1, new $Uint64(0, 1), "", sliceType.nil, $ifaceNil); - } else { - return new Value.ptr(arrayType.zero(), 1, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - } - }; - $pkg.ValueOfBool = ValueOfBool; - ValueOfInt32 = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 2, (new $Uint64(0, v)), "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfInt32 = ValueOfInt32; - ValueOfInt64 = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 3, (new $Uint64(v.$high, v.$low)), "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfInt64 = ValueOfInt64; - ValueOfUint32 = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 4, (new $Uint64(0, v)), "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfUint32 = ValueOfUint32; - ValueOfUint64 = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 5, v, "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfUint64 = ValueOfUint64; - ValueOfFloat32 = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 6, (math.Float64bits((v))), "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfFloat32 = ValueOfFloat32; - ValueOfFloat64 = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 7, (math.Float64bits((v))), "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfFloat64 = ValueOfFloat64; - ValueOfString = function(v) { - var v; - return valueOfString(v); - }; - $pkg.ValueOfString = ValueOfString; - ValueOfBytes = function(v) { - var v; - return valueOfBytes($subslice(v, 0, v.$length, v.$length)); - }; - $pkg.ValueOfBytes = ValueOfBytes; - ValueOfEnum = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 10, (new $Uint64(0, v)), "", sliceType.nil, $ifaceNil); - }; - $pkg.ValueOfEnum = ValueOfEnum; - ValueOfMessage = function(v) { - var v; - return valueOfIface(v); - }; - $pkg.ValueOfMessage = ValueOfMessage; - ValueOfList = function(v) { - var v; - return valueOfIface(v); - }; - $pkg.ValueOfList = ValueOfList; - ValueOfMap = function(v) { - var v; - return valueOfIface(v); - }; - $pkg.ValueOfMap = ValueOfMap; - Value.ptr.prototype.IsValid = function() { - var v; - v = this; - return !((v.typ === 0)); - }; - Value.prototype.IsValid = function() { return this.$val.IsValid(); }; - Value.ptr.prototype.Interface = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, v, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ if (_1 === (3)) { $s = 5; continue; } - /* */ if (_1 === (4)) { $s = 6; continue; } - /* */ if (_1 === (5)) { $s = 7; continue; } - /* */ if (_1 === (6)) { $s = 8; continue; } - /* */ if (_1 === (7)) { $s = 9; continue; } - /* */ if (_1 === (8)) { $s = 10; continue; } - /* */ if (_1 === (9)) { $s = 11; continue; } - /* */ if (_1 === (10)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_1 === (0)) { */ case 2: - $s = -1; return $ifaceNil; - /* } else if (_1 === (1)) { */ case 3: - _r = $clone(v, Value).Bool(); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new $Bool(_r); - $s = 16; case 16: return $24r; - /* } else if (_1 === (2)) { */ case 4: - _r$1 = $clone(v, Value).Int(); /* */ $s = 17; case 17: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = new $Int32((((x = _r$1, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); - $s = 18; case 18: return $24r$1; - /* } else if (_1 === (3)) { */ case 5: - _r$2 = $clone(v, Value).Int(); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = (_r$2); - $s = 20; case 20: return $24r$2; - /* } else if (_1 === (4)) { */ case 6: - _r$3 = $clone(v, Value).Uint(); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$3 = new $Uint32(((_r$3.$low >>> 0))); - $s = 22; case 22: return $24r$3; - /* } else if (_1 === (5)) { */ case 7: - _r$4 = $clone(v, Value).Uint(); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$4 = (_r$4); - $s = 24; case 24: return $24r$4; - /* } else if (_1 === (6)) { */ case 8: - _r$5 = $clone(v, Value).Float(); /* */ $s = 25; case 25: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$5 = new $Float32(($fround(_r$5))); - $s = 26; case 26: return $24r$5; - /* } else if (_1 === (7)) { */ case 9: - _r$6 = $clone(v, Value).Float(); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$6 = new $Float64((_r$6)); - $s = 28; case 28: return $24r$6; - /* } else if (_1 === (8)) { */ case 10: - _r$7 = $clone(v, Value).String(); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$7 = new $String(_r$7); - $s = 30; case 30: return $24r$7; - /* } else if (_1 === (9)) { */ case 11: - _r$8 = $clone(v, Value).Bytes(); /* */ $s = 31; case 31: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$8 = _r$8; - $s = 32; case 32: return $24r$8; - /* } else if (_1 === (10)) { */ case 12: - _r$9 = $clone(v, Value).Enum(); /* */ $s = 33; case 33: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$9 = new EnumNumber(_r$9); - $s = 34; case 34: return $24r$9; - /* } else { */ case 13: - $s = -1; return $clone(v, Value).getIface(); - /* } */ case 14: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Interface, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, v, x, $s};return $f; - }; - Value.prototype.Interface = function() { return this.$val.Interface(); }; - Value.ptr.prototype.typeName = function() { - var {$24r, _1, _r, _ref, v, v$1, v$2, v$3, v$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ if (_1 === (3)) { $s = 5; continue; } - /* */ if (_1 === (4)) { $s = 6; continue; } - /* */ if (_1 === (5)) { $s = 7; continue; } - /* */ if (_1 === (6)) { $s = 8; continue; } - /* */ if (_1 === (7)) { $s = 9; continue; } - /* */ if (_1 === (8)) { $s = 10; continue; } - /* */ if (_1 === (9)) { $s = 11; continue; } - /* */ if (_1 === (10)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_1 === (0)) { */ case 2: - $s = -1; return "nil"; - /* } else if (_1 === (1)) { */ case 3: - $s = -1; return "bool"; - /* } else if (_1 === (2)) { */ case 4: - $s = -1; return "int32"; - /* } else if (_1 === (3)) { */ case 5: - $s = -1; return "int64"; - /* } else if (_1 === (4)) { */ case 6: - $s = -1; return "uint32"; - /* } else if (_1 === (5)) { */ case 7: - $s = -1; return "uint64"; - /* } else if (_1 === (6)) { */ case 8: - $s = -1; return "float32"; - /* } else if (_1 === (7)) { */ case 9: - $s = -1; return "float64"; - /* } else if (_1 === (8)) { */ case 10: - $s = -1; return "string"; - /* } else if (_1 === (9)) { */ case 11: - $s = -1; return "bytes"; - /* } else if (_1 === (10)) { */ case 12: - $s = -1; return "enum"; - /* } else { */ case 13: - _ref = $clone(v, Value).getIface(); - /* */ if ($assertType(_ref, Message, true)[1]) { $s = 15; continue; } - /* */ if ($assertType(_ref, List, true)[1]) { $s = 16; continue; } - /* */ if ($assertType(_ref, Map, true)[1]) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if ($assertType(_ref, Message, true)[1]) { */ case 15: - v$1 = _ref; - $s = -1; return "message"; - /* } else if ($assertType(_ref, List, true)[1]) { */ case 16: - v$2 = _ref; - $s = -1; return "list"; - /* } else if ($assertType(_ref, Map, true)[1]) { */ case 17: - v$3 = _ref; - $s = -1; return "map"; - /* } else { */ case 18: - v$4 = _ref; - _r = fmt.Sprintf("", new sliceType$1([v$4])); /* */ $s = 20; case 20: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 21; case 21: return $24r; - /* } */ case 19: - /* } */ case 14: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.typeName, $c: true, $r, $24r, _1, _r, _ref, v, v$1, v$2, v$3, v$4, $s};return $f; - }; - Value.prototype.typeName = function() { return this.$val.typeName(); }; - Value.ptr.prototype.panicMessage = function(what) { - var {$24r, _arg, _arg$1, _r, _r$1, v, what, $s, $r, $c} = $restore(this, {what}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _r = $clone(v, Value).typeName(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = new $String(_r); - _arg$1 = new $String(what); - _r$1 = fmt.Sprintf("type mismatch: cannot convert %v to %s", new sliceType$1([_arg, _arg$1])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.panicMessage, $c: true, $r, $24r, _arg, _arg$1, _r, _r$1, v, what, $s};return $f; - }; - Value.prototype.panicMessage = function(what) { return this.$val.panicMessage(what); }; - Value.ptr.prototype.Bool = function() { - var {_1, _r, v, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return (x = v.num, (x.$high > 0 || (x.$high === 0 && x.$low > 0))); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("bool"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Bool, $c: true, $r, _1, _r, v, x, $s};return $f; - }; - Value.prototype.Bool = function() { return this.$val.Bool(); }; - Value.ptr.prototype.Int = function() { - var {_1, _r, v, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if ((_1 === (2)) || (_1 === (3))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (2)) || (_1 === (3))) { */ case 2: - $s = -1; return ((x = v.num, new $Int64(x.$high, x.$low))); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("int"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return new $Int64(0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Int, $c: true, $r, _1, _r, v, x, $s};return $f; - }; - Value.prototype.Int = function() { return this.$val.Int(); }; - Value.ptr.prototype.Uint = function() { - var {_1, _r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if ((_1 === (4)) || (_1 === (5))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (4)) || (_1 === (5))) { */ case 2: - $s = -1; return (v.num); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("uint"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return new $Uint64(0, 0); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Uint, $c: true, $r, _1, _r, v, $s};return $f; - }; - Value.prototype.Uint = function() { return this.$val.Uint(); }; - Value.ptr.prototype.Float = function() { - var {_1, _r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if ((_1 === (6)) || (_1 === (7))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (6)) || (_1 === (7))) { */ case 2: - $s = -1; return math.Float64frombits((v.num)); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("float"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Float, $c: true, $r, _1, _r, v, $s};return $f; - }; - Value.prototype.Float = function() { return this.$val.Float(); }; - Value.ptr.prototype.String = function() { - var {$24r, _1, _r, _r$1, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if (_1 === (8)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (8)) { */ case 2: - $s = -1; return $clone(v, Value).getString(); - /* } else { */ case 3: - _r = $clone(v, Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = fmt.Sprint(new sliceType$1([_r])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 4: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.String, $c: true, $r, $24r, _1, _r, _r$1, v, $s};return $f; - }; - Value.prototype.String = function() { return this.$val.String(); }; - Value.ptr.prototype.Bytes = function() { - var {_1, _r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if (_1 === (9)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (9)) { */ case 2: - $s = -1; return $clone(v, Value).getBytes(); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("bytes"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return sliceType.nil; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Bytes, $c: true, $r, _1, _r, v, $s};return $f; - }; - Value.prototype.Bytes = function() { return this.$val.Bytes(); }; - Value.ptr.prototype.Enum = function() { - var {_1, _r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if (_1 === (10)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (10)) { */ case 2: - $s = -1; return ((v.num.$low >> 0)); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("enum"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Enum, $c: true, $r, _1, _r, v, $s};return $f; - }; - Value.prototype.Enum = function() { return this.$val.Enum(); }; - Value.ptr.prototype.Message = function() { - var {_r, _ref, v, vi, vi$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _ref = $clone(v, Value).getIface(); - /* */ if ($assertType(_ref, Message, true)[1]) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($assertType(_ref, Message, true)[1]) { */ case 1: - vi = _ref; - $s = -1; return vi; - /* } else { */ case 2: - vi$1 = _ref; - _r = $clone(v, Value).panicMessage("message"); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Message, $c: true, $r, _r, _ref, v, vi, vi$1, $s};return $f; - }; - Value.prototype.Message = function() { return this.$val.Message(); }; - Value.ptr.prototype.List = function() { - var {_r, _ref, v, vi, vi$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _ref = $clone(v, Value).getIface(); - /* */ if ($assertType(_ref, List, true)[1]) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($assertType(_ref, List, true)[1]) { */ case 1: - vi = _ref; - $s = -1; return vi; - /* } else { */ case 2: - vi$1 = _ref; - _r = $clone(v, Value).panicMessage("list"); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.List, $c: true, $r, _r, _ref, v, vi, vi$1, $s};return $f; - }; - Value.prototype.List = function() { return this.$val.List(); }; - Value.ptr.prototype.Map = function() { - var {_r, _ref, v, vi, vi$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _ref = $clone(v, Value).getIface(); - /* */ if ($assertType(_ref, Map, true)[1]) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($assertType(_ref, Map, true)[1]) { */ case 1: - vi = _ref; - $s = -1; return vi; - /* } else { */ case 2: - vi$1 = _ref; - _r = $clone(v, Value).panicMessage("map"); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Value.ptr.prototype.Map, $c: true, $r, _r, _ref, v, vi, vi$1, $s};return $f; - }; - Value.prototype.Map = function() { return this.$val.Map(); }; - Value.ptr.prototype.MapKey = function() { - var {_1, _r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _1 = v.typ; - /* */ if ((_1 === (1)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (8))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_1 === (1)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (8))) { */ case 2: - $s = -1; return ($clone(v, MapKey)); - /* } else { */ case 3: - _r = $clone(v, Value).panicMessage("map key"); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 4: - case 1: - $s = -1; return new MapKey.ptr(arrayType.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: Value.ptr.prototype.MapKey, $c: true, $r, _1, _r, v, $s};return $f; - }; - Value.prototype.MapKey = function() { return this.$val.MapKey(); }; - MapKey.ptr.prototype.IsValid = function() { - var k; - k = this; - return $clone(($clone(k, Value)), Value).IsValid(); - }; - MapKey.prototype.IsValid = function() { return this.$val.IsValid(); }; - MapKey.ptr.prototype.Interface = function() { - var {$24r, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this; - _r = $clone(($clone(k, Value)), Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MapKey.ptr.prototype.Interface, $c: true, $r, $24r, _r, k, $s};return $f; - }; - MapKey.prototype.Interface = function() { return this.$val.Interface(); }; - MapKey.ptr.prototype.Bool = function() { - var {$24r, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this; - _r = $clone(($clone(k, Value)), Value).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MapKey.ptr.prototype.Bool, $c: true, $r, $24r, _r, k, $s};return $f; - }; - MapKey.prototype.Bool = function() { return this.$val.Bool(); }; - MapKey.ptr.prototype.Int = function() { - var {$24r, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this; - _r = $clone(($clone(k, Value)), Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MapKey.ptr.prototype.Int, $c: true, $r, $24r, _r, k, $s};return $f; - }; - MapKey.prototype.Int = function() { return this.$val.Int(); }; - MapKey.ptr.prototype.Uint = function() { - var {$24r, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this; - _r = $clone(($clone(k, Value)), Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MapKey.ptr.prototype.Uint, $c: true, $r, $24r, _r, k, $s};return $f; - }; - MapKey.prototype.Uint = function() { return this.$val.Uint(); }; - MapKey.ptr.prototype.String = function() { - var {$24r, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this; - _r = $clone(($clone(k, Value)), Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MapKey.ptr.prototype.String, $c: true, $r, $24r, _r, k, $s};return $f; - }; - MapKey.prototype.String = function() { return this.$val.String(); }; - MapKey.ptr.prototype.Value = function() { - var k; - k = this; - return ($clone(k, Value)); - }; - MapKey.prototype.Value = function() { return this.$val.Value(); }; - valueOfString = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 8, new $Uint64(0, 0), v, sliceType.nil, $ifaceNil); - }; - valueOfBytes = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 9, new $Uint64(0, 0), "", v, $ifaceNil); - }; - valueOfIface = function(v) { - var v; - return new Value.ptr(arrayType.zero(), 11, new $Uint64(0, 0), "", sliceType.nil, v); - }; - Value.ptr.prototype.getString = function() { - var v; - v = this; - return v.str; - }; - Value.prototype.getString = function() { return this.$val.getString(); }; - Value.ptr.prototype.getBytes = function() { - var v; - v = this; - return v.bin; - }; - Value.prototype.getBytes = function() { return this.$val.getBytes(); }; - Value.ptr.prototype.getIface = function() { - var v; - v = this; - return v.iface; - }; - Value.prototype.getIface = function() { return this.$val.getIface(); }; - RawFields.prototype.IsValid = function() { - var _tuple, b, n; - b = this; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeField($convertSliceType(b, sliceType)); - n = _tuple[2]; - if (n < 0) { - return false; - } - b = $subslice(b, n); - } - return true; - }; - $ptrType(RawFields).prototype.IsValid = function() { return this.$get().IsValid(); }; - $ptrType(SourcePath).prototype.appendFileDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (10)) { $s = 5; continue; } - /* */ if (_1 === (11)) { $s = 6; continue; } - /* */ if (_1 === (4)) { $s = 7; continue; } - /* */ if (_1 === (5)) { $s = 8; continue; } - /* */ if (_1 === (6)) { $s = 9; continue; } - /* */ if (_1 === (7)) { $s = 10; continue; } - /* */ if (_1 === (8)) { $s = 11; continue; } - /* */ if (_1 === (9)) { $s = 12; continue; } - /* */ if (_1 === (12)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 14; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "package", $throwNilPointerError); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 14; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendRepeatedField(b, "dependency", $throwNilPointerError); /* */ $s = 17; case 17: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 14; continue; - /* } else if (_1 === (10)) { */ case 5: - _r$3 = p.appendRepeatedField(b, "public_dependency", $throwNilPointerError); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 14; continue; - /* } else if (_1 === (11)) { */ case 6: - _r$4 = p.appendRepeatedField(b, "weak_dependency", $throwNilPointerError); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 14; continue; - /* } else if (_1 === (4)) { */ case 7: - _r$5 = p.appendRepeatedField(b, "message_type", $methodExpr(ptrType, "appendDescriptorProto")); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 14; continue; - /* } else if (_1 === (5)) { */ case 8: - _r$6 = p.appendRepeatedField(b, "enum_type", $methodExpr(ptrType, "appendEnumDescriptorProto")); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = 14; continue; - /* } else if (_1 === (6)) { */ case 9: - _r$7 = p.appendRepeatedField(b, "service", $methodExpr(ptrType, "appendServiceDescriptorProto")); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = 14; continue; - /* } else if (_1 === (7)) { */ case 10: - _r$8 = p.appendRepeatedField(b, "extension", $methodExpr(ptrType, "appendFieldDescriptorProto")); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - b = _r$8; - $s = 14; continue; - /* } else if (_1 === (8)) { */ case 11: - _r$9 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendFileOptions")); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - $s = 14; continue; - /* } else if (_1 === (9)) { */ case 12: - _r$10 = p.appendSingularField(b, "source_code_info", $methodExpr(ptrType, "appendSourceCodeInfo")); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - $s = 14; continue; - /* } else if (_1 === (12)) { */ case 13: - _r$11 = p.appendSingularField(b, "syntax", $throwNilPointerError); /* */ $s = 26; case 26: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - b = _r$11; - /* } */ case 14: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendFileDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (6)) { $s = 4; continue; } - /* */ if (_1 === (3)) { $s = 5; continue; } - /* */ if (_1 === (4)) { $s = 6; continue; } - /* */ if (_1 === (5)) { $s = 7; continue; } - /* */ if (_1 === (8)) { $s = 8; continue; } - /* */ if (_1 === (7)) { $s = 9; continue; } - /* */ if (_1 === (9)) { $s = 10; continue; } - /* */ if (_1 === (10)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 12; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendRepeatedField(b, "field", $methodExpr(ptrType, "appendFieldDescriptorProto")); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 12; continue; - /* } else if (_1 === (6)) { */ case 4: - _r$2 = p.appendRepeatedField(b, "extension", $methodExpr(ptrType, "appendFieldDescriptorProto")); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 12; continue; - /* } else if (_1 === (3)) { */ case 5: - _r$3 = p.appendRepeatedField(b, "nested_type", $methodExpr(ptrType, "appendDescriptorProto")); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 12; continue; - /* } else if (_1 === (4)) { */ case 6: - _r$4 = p.appendRepeatedField(b, "enum_type", $methodExpr(ptrType, "appendEnumDescriptorProto")); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 12; continue; - /* } else if (_1 === (5)) { */ case 7: - _r$5 = p.appendRepeatedField(b, "extension_range", $methodExpr(ptrType, "appendDescriptorProto_ExtensionRange")); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 12; continue; - /* } else if (_1 === (8)) { */ case 8: - _r$6 = p.appendRepeatedField(b, "oneof_decl", $methodExpr(ptrType, "appendOneofDescriptorProto")); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = 12; continue; - /* } else if (_1 === (7)) { */ case 9: - _r$7 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendMessageOptions")); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = 12; continue; - /* } else if (_1 === (9)) { */ case 10: - _r$8 = p.appendRepeatedField(b, "reserved_range", $methodExpr(ptrType, "appendDescriptorProto_ReservedRange")); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - b = _r$8; - $s = 12; continue; - /* } else if (_1 === (10)) { */ case 11: - _r$9 = p.appendRepeatedField(b, "reserved_name", $throwNilPointerError); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - /* } */ case 12: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendEnumDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (4)) { $s = 5; continue; } - /* */ if (_1 === (5)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendRepeatedField(b, "value", $methodExpr(ptrType, "appendEnumValueDescriptorProto")); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 7; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendEnumOptions")); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 7; continue; - /* } else if (_1 === (4)) { */ case 5: - _r$3 = p.appendRepeatedField(b, "reserved_range", $methodExpr(ptrType, "appendEnumDescriptorProto_EnumReservedRange")); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 7; continue; - /* } else if (_1 === (5)) { */ case 6: - _r$4 = p.appendRepeatedField(b, "reserved_name", $throwNilPointerError); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - /* } */ case 7: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendEnumDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendServiceDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$2, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 5; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendRepeatedField(b, "method", $methodExpr(ptrType, "appendMethodDescriptorProto")); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 5; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendServiceOptions")); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - /* } */ case 5: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendServiceDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$2, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendFieldDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ if (_1 === (4)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (6)) { $s = 6; continue; } - /* */ if (_1 === (2)) { $s = 7; continue; } - /* */ if (_1 === (7)) { $s = 8; continue; } - /* */ if (_1 === (9)) { $s = 9; continue; } - /* */ if (_1 === (10)) { $s = 10; continue; } - /* */ if (_1 === (8)) { $s = 11; continue; } - /* */ if (_1 === (17)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 13; continue; - /* } else if (_1 === (3)) { */ case 3: - _r$1 = p.appendSingularField(b, "number", $throwNilPointerError); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 13; continue; - /* } else if (_1 === (4)) { */ case 4: - _r$2 = p.appendSingularField(b, "label", $throwNilPointerError); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 13; continue; - /* } else if (_1 === (5)) { */ case 5: - _r$3 = p.appendSingularField(b, "type", $throwNilPointerError); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 13; continue; - /* } else if (_1 === (6)) { */ case 6: - _r$4 = p.appendSingularField(b, "type_name", $throwNilPointerError); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 13; continue; - /* } else if (_1 === (2)) { */ case 7: - _r$5 = p.appendSingularField(b, "extendee", $throwNilPointerError); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 13; continue; - /* } else if (_1 === (7)) { */ case 8: - _r$6 = p.appendSingularField(b, "default_value", $throwNilPointerError); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = 13; continue; - /* } else if (_1 === (9)) { */ case 9: - _r$7 = p.appendSingularField(b, "oneof_index", $throwNilPointerError); /* */ $s = 21; case 21: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = 13; continue; - /* } else if (_1 === (10)) { */ case 10: - _r$8 = p.appendSingularField(b, "json_name", $throwNilPointerError); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - b = _r$8; - $s = 13; continue; - /* } else if (_1 === (8)) { */ case 11: - _r$9 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendFieldOptions")); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - $s = 13; continue; - /* } else if (_1 === (17)) { */ case 12: - _r$10 = p.appendSingularField(b, "proto3_optional", $throwNilPointerError); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - /* } */ case 13: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendFieldDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendFileOptions = function(b) { - var {_1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (8)) { $s = 3; continue; } - /* */ if (_1 === (10)) { $s = 4; continue; } - /* */ if (_1 === (20)) { $s = 5; continue; } - /* */ if (_1 === (27)) { $s = 6; continue; } - /* */ if (_1 === (9)) { $s = 7; continue; } - /* */ if (_1 === (11)) { $s = 8; continue; } - /* */ if (_1 === (16)) { $s = 9; continue; } - /* */ if (_1 === (17)) { $s = 10; continue; } - /* */ if (_1 === (18)) { $s = 11; continue; } - /* */ if (_1 === (42)) { $s = 12; continue; } - /* */ if (_1 === (23)) { $s = 13; continue; } - /* */ if (_1 === (31)) { $s = 14; continue; } - /* */ if (_1 === (36)) { $s = 15; continue; } - /* */ if (_1 === (37)) { $s = 16; continue; } - /* */ if (_1 === (39)) { $s = 17; continue; } - /* */ if (_1 === (40)) { $s = 18; continue; } - /* */ if (_1 === (41)) { $s = 19; continue; } - /* */ if (_1 === (44)) { $s = 20; continue; } - /* */ if (_1 === (45)) { $s = 21; continue; } - /* */ if (_1 === (999)) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "java_package", $throwNilPointerError); /* */ $s = 24; case 24: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 23; continue; - /* } else if (_1 === (8)) { */ case 3: - _r$1 = p.appendSingularField(b, "java_outer_classname", $throwNilPointerError); /* */ $s = 25; case 25: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 23; continue; - /* } else if (_1 === (10)) { */ case 4: - _r$2 = p.appendSingularField(b, "java_multiple_files", $throwNilPointerError); /* */ $s = 26; case 26: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 23; continue; - /* } else if (_1 === (20)) { */ case 5: - _r$3 = p.appendSingularField(b, "java_generate_equals_and_hash", $throwNilPointerError); /* */ $s = 27; case 27: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 23; continue; - /* } else if (_1 === (27)) { */ case 6: - _r$4 = p.appendSingularField(b, "java_string_check_utf8", $throwNilPointerError); /* */ $s = 28; case 28: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 23; continue; - /* } else if (_1 === (9)) { */ case 7: - _r$5 = p.appendSingularField(b, "optimize_for", $throwNilPointerError); /* */ $s = 29; case 29: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 23; continue; - /* } else if (_1 === (11)) { */ case 8: - _r$6 = p.appendSingularField(b, "go_package", $throwNilPointerError); /* */ $s = 30; case 30: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = 23; continue; - /* } else if (_1 === (16)) { */ case 9: - _r$7 = p.appendSingularField(b, "cc_generic_services", $throwNilPointerError); /* */ $s = 31; case 31: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = 23; continue; - /* } else if (_1 === (17)) { */ case 10: - _r$8 = p.appendSingularField(b, "java_generic_services", $throwNilPointerError); /* */ $s = 32; case 32: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - b = _r$8; - $s = 23; continue; - /* } else if (_1 === (18)) { */ case 11: - _r$9 = p.appendSingularField(b, "py_generic_services", $throwNilPointerError); /* */ $s = 33; case 33: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - $s = 23; continue; - /* } else if (_1 === (42)) { */ case 12: - _r$10 = p.appendSingularField(b, "php_generic_services", $throwNilPointerError); /* */ $s = 34; case 34: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - $s = 23; continue; - /* } else if (_1 === (23)) { */ case 13: - _r$11 = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 35; case 35: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - b = _r$11; - $s = 23; continue; - /* } else if (_1 === (31)) { */ case 14: - _r$12 = p.appendSingularField(b, "cc_enable_arenas", $throwNilPointerError); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - $s = 23; continue; - /* } else if (_1 === (36)) { */ case 15: - _r$13 = p.appendSingularField(b, "objc_class_prefix", $throwNilPointerError); /* */ $s = 37; case 37: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - b = _r$13; - $s = 23; continue; - /* } else if (_1 === (37)) { */ case 16: - _r$14 = p.appendSingularField(b, "csharp_namespace", $throwNilPointerError); /* */ $s = 38; case 38: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - b = _r$14; - $s = 23; continue; - /* } else if (_1 === (39)) { */ case 17: - _r$15 = p.appendSingularField(b, "swift_prefix", $throwNilPointerError); /* */ $s = 39; case 39: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - b = _r$15; - $s = 23; continue; - /* } else if (_1 === (40)) { */ case 18: - _r$16 = p.appendSingularField(b, "php_class_prefix", $throwNilPointerError); /* */ $s = 40; case 40: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - b = _r$16; - $s = 23; continue; - /* } else if (_1 === (41)) { */ case 19: - _r$17 = p.appendSingularField(b, "php_namespace", $throwNilPointerError); /* */ $s = 41; case 41: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - b = _r$17; - $s = 23; continue; - /* } else if (_1 === (44)) { */ case 20: - _r$18 = p.appendSingularField(b, "php_metadata_namespace", $throwNilPointerError); /* */ $s = 42; case 42: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - b = _r$18; - $s = 23; continue; - /* } else if (_1 === (45)) { */ case 21: - _r$19 = p.appendSingularField(b, "ruby_package", $throwNilPointerError); /* */ $s = 43; case 43: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - b = _r$19; - $s = 23; continue; - /* } else if (_1 === (999)) { */ case 22: - _r$20 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 44; case 44: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - b = _r$20; - /* } */ case 23: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendFileOptions, $c: true, $r, _1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendSourceCodeInfo = function(b) { - var {_1, _r, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendRepeatedField(b, "location", $methodExpr(ptrType, "appendSourceCodeInfo_Location")); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - /* } */ case 3: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendSourceCodeInfo, $c: true, $r, _1, _r, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendDescriptorProto_ExtensionRange = function(b) { - var {_1, _r, _r$1, _r$2, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "start", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 5; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "end", $throwNilPointerError); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 5; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendExtensionRangeOptions")); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - /* } */ case 5: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendDescriptorProto_ExtensionRange, $c: true, $r, _1, _r, _r$1, _r$2, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendOneofDescriptorProto = function(b) { - var {_1, _r, _r$1, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 4; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendOneofOptions")); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 4: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendOneofDescriptorProto, $c: true, $r, _1, _r, _r$1, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendMessageOptions = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (7)) { $s = 5; continue; } - /* */ if (_1 === (999)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "message_set_wire_format", $throwNilPointerError); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "no_standard_descriptor_accessor", $throwNilPointerError); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 7; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 7; continue; - /* } else if (_1 === (7)) { */ case 5: - _r$3 = p.appendSingularField(b, "map_entry", $throwNilPointerError); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 7; continue; - /* } else if (_1 === (999)) { */ case 6: - _r$4 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - /* } */ case 7: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendMessageOptions, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendDescriptorProto_ReservedRange = function(b) { - var {_1, _r, _r$1, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "start", $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 4; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "end", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 4: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendDescriptorProto_ReservedRange, $c: true, $r, _1, _r, _r$1, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendEnumValueDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$2, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 5; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "number", $throwNilPointerError); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 5; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendEnumValueOptions")); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - /* } */ case 5: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendEnumValueDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$2, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendEnumOptions = function(b) { - var {_1, _r, _r$1, _r$2, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ if (_1 === (999)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (2)) { */ case 2: - _r = p.appendSingularField(b, "allow_alias", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 5; continue; - /* } else if (_1 === (3)) { */ case 3: - _r$1 = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 5; continue; - /* } else if (_1 === (999)) { */ case 4: - _r$2 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - /* } */ case 5: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendEnumOptions, $c: true, $r, _1, _r, _r$1, _r$2, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendEnumDescriptorProto_EnumReservedRange = function(b) { - var {_1, _r, _r$1, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "start", $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 4; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "end", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 4: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendEnumDescriptorProto_EnumReservedRange, $c: true, $r, _1, _r, _r$1, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendMethodDescriptorProto = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (4)) { $s = 5; continue; } - /* */ if (_1 === (5)) { $s = 6; continue; } - /* */ if (_1 === (6)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name", $throwNilPointerError); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 8; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "input_type", $throwNilPointerError); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 8; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "output_type", $throwNilPointerError); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 8; continue; - /* } else if (_1 === (4)) { */ case 5: - _r$3 = p.appendSingularField(b, "options", $methodExpr(ptrType, "appendMethodOptions")); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 8; continue; - /* } else if (_1 === (5)) { */ case 6: - _r$4 = p.appendSingularField(b, "client_streaming", $throwNilPointerError); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 8; continue; - /* } else if (_1 === (6)) { */ case 7: - _r$5 = p.appendSingularField(b, "server_streaming", $throwNilPointerError); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - /* } */ case 8: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendMethodDescriptorProto, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendServiceOptions = function(b) { - var {_1, _r, _r$1, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (33)) { $s = 2; continue; } - /* */ if (_1 === (999)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (33)) { */ case 2: - _r = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 4; continue; - /* } else if (_1 === (999)) { */ case 3: - _r$1 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 4: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendServiceOptions, $c: true, $r, _1, _r, _r$1, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendFieldOptions = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (6)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (3)) { $s = 6; continue; } - /* */ if (_1 === (10)) { $s = 7; continue; } - /* */ if (_1 === (999)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "ctype", $throwNilPointerError); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 9; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "packed", $throwNilPointerError); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 9; continue; - /* } else if (_1 === (6)) { */ case 4: - _r$2 = p.appendSingularField(b, "jstype", $throwNilPointerError); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 9; continue; - /* } else if (_1 === (5)) { */ case 5: - _r$3 = p.appendSingularField(b, "lazy", $throwNilPointerError); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 9; continue; - /* } else if (_1 === (3)) { */ case 6: - _r$4 = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 9; continue; - /* } else if (_1 === (10)) { */ case 7: - _r$5 = p.appendSingularField(b, "weak", $throwNilPointerError); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 9; continue; - /* } else if (_1 === (999)) { */ case 8: - _r$6 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - /* } */ case 9: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendFieldOptions, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendUninterpretedOption = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ if (_1 === (4)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (6)) { $s = 6; continue; } - /* */ if (_1 === (7)) { $s = 7; continue; } - /* */ if (_1 === (8)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (2)) { */ case 2: - _r = p.appendRepeatedField(b, "name", $methodExpr(ptrType, "appendUninterpretedOption_NamePart")); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 9; continue; - /* } else if (_1 === (3)) { */ case 3: - _r$1 = p.appendSingularField(b, "identifier_value", $throwNilPointerError); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 9; continue; - /* } else if (_1 === (4)) { */ case 4: - _r$2 = p.appendSingularField(b, "positive_int_value", $throwNilPointerError); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 9; continue; - /* } else if (_1 === (5)) { */ case 5: - _r$3 = p.appendSingularField(b, "negative_int_value", $throwNilPointerError); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 9; continue; - /* } else if (_1 === (6)) { */ case 6: - _r$4 = p.appendSingularField(b, "double_value", $throwNilPointerError); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - $s = 9; continue; - /* } else if (_1 === (7)) { */ case 7: - _r$5 = p.appendSingularField(b, "string_value", $throwNilPointerError); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 9; continue; - /* } else if (_1 === (8)) { */ case 8: - _r$6 = p.appendSingularField(b, "aggregate_value", $throwNilPointerError); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - /* } */ case 9: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendUninterpretedOption, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendSourceCodeInfo_Location = function(b) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (4)) { $s = 5; continue; } - /* */ if (_1 === (6)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendRepeatedField(b, "path", $throwNilPointerError); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendRepeatedField(b, "span", $throwNilPointerError); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 7; continue; - /* } else if (_1 === (3)) { */ case 4: - _r$2 = p.appendSingularField(b, "leading_comments", $throwNilPointerError); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - $s = 7; continue; - /* } else if (_1 === (4)) { */ case 5: - _r$3 = p.appendSingularField(b, "trailing_comments", $throwNilPointerError); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - $s = 7; continue; - /* } else if (_1 === (6)) { */ case 6: - _r$4 = p.appendRepeatedField(b, "leading_detached_comments", $throwNilPointerError); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - b = _r$4; - /* } */ case 7: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendSourceCodeInfo_Location, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendExtensionRangeOptions = function(b) { - var {_1, _r, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (999)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (999)) { */ case 2: - _r = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - /* } */ case 3: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendExtensionRangeOptions, $c: true, $r, _1, _r, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendOneofOptions = function(b) { - var {_1, _r, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (999)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === (999)) { */ case 2: - _r = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - /* } */ case 3: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendOneofOptions, $c: true, $r, _1, _r, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendEnumValueOptions = function(b) { - var {_1, _r, _r$1, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (999)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 4; continue; - /* } else if (_1 === (999)) { */ case 3: - _r$1 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 4: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendEnumValueOptions, $c: true, $r, _1, _r, _r$1, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendMethodOptions = function(b) { - var {_1, _r, _r$1, _r$2, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (33)) { $s = 2; continue; } - /* */ if (_1 === (34)) { $s = 3; continue; } - /* */ if (_1 === (999)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (33)) { */ case 2: - _r = p.appendSingularField(b, "deprecated", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 5; continue; - /* } else if (_1 === (34)) { */ case 3: - _r$1 = p.appendSingularField(b, "idempotency_level", $throwNilPointerError); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - $s = 5; continue; - /* } else if (_1 === (999)) { */ case 4: - _r$2 = p.appendRepeatedField(b, "uninterpreted_option", $methodExpr(ptrType, "appendUninterpretedOption")); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - /* } */ case 5: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendMethodOptions, $c: true, $r, _1, _r, _r$1, _r$2, b, p, x, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendUninterpretedOption_NamePart = function(b) { - var {_1, _r, _r$1, b, p, x, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - _1 = (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (1)) { */ case 2: - _r = p.appendSingularField(b, "name_part", $throwNilPointerError); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - $s = 4; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = p.appendSingularField(b, "is_extension", $throwNilPointerError); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 4: - case 1: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendUninterpretedOption_NamePart, $c: true, $r, _1, _r, _r$1, b, p, x, $s};return $f; - }; - SourcePath.prototype.Equal = function(p2) { - var _i, _ref, i, p1, p2; - p1 = this; - if (!((p1.$length === p2.$length))) { - return false; - } - _ref = p1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (!((((i < 0 || i >= p1.$length) ? ($throwRuntimeError("index out of range"), undefined) : p1.$array[p1.$offset + i]) === ((i < 0 || i >= p2.$length) ? ($throwRuntimeError("index out of range"), undefined) : p2.$array[p2.$offset + i])))) { - return false; - } - _i++; - } - return true; - }; - $ptrType(SourcePath).prototype.Equal = function(p2) { return this.$get().Equal(p2); }; - SourcePath.prototype.String = function() { - var {_i, _r, _ref, b, i, p, p$24ptr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = (p$24ptr || (p$24ptr = new ptrType(function() { return p; }, function($v) { p = $convertSliceType($v, SourcePath); }))).appendFileDescriptorProto(sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - _ref = p; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = $append(b, 46); - b = strconv.AppendInt(b, (new $Int64(0, i)), 10); - _i++; - } - $s = -1; return ($bytesToString(b)); - /* */ } return; } var $f = {$blk: SourcePath.prototype.String, $c: true, $r, _i, _r, _ref, b, i, p, p$24ptr, $s};return $f; - }; - $ptrType(SourcePath).prototype.String = function() { return this.$get().String(); }; - $ptrType(SourcePath).prototype.appendSingularField = function(b, name, f) { - var {_r, b, f, name, p, $s, $r, $c} = $restore(this, {b, name, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (p.$get().$length === 0) { - $s = -1; return b; - } - b = $append(b, 46); - b = $appendSlice(b, name); - p.$set($subslice((p.$get()), 1)); - /* */ if (!(f === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f === $throwNilPointerError)) { */ case 1: - _r = f(p, b); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - /* } */ case 2: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendSingularField, $c: true, $r, _r, b, f, name, p, $s};return $f; - }; - $ptrType(SourcePath).prototype.appendRepeatedField = function(b, name, f) { - var {_r, _r$1, b, f, name, p, x, x$1, $s, $r, $c} = $restore(this, {b, name, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.appendSingularField(b, name, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - b = _r; - if ((p.$get().$length === 0) || (x = p.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) < 0) { - $s = -1; return b; - } - b = $append(b, 91); - b = strconv.AppendUint(b, (new $Uint64(0, (x$1 = p.$get(), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])))), 10); - b = $append(b, 93); - p.$set($subslice((p.$get()), 1)); - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(p, b); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b = _r$1; - /* } */ case 3: - $s = -1; return b; - /* */ } return; } var $f = {$blk: $ptrType(SourcePath).prototype.appendRepeatedField, $c: true, $r, _r, _r$1, b, f, name, p, x, x$1, $s};return $f; - }; - Syntax.prototype.IsValid = function() { - var _1, s; - s = this.$val; - _1 = s; - if ((_1 === (2)) || (_1 === (3))) { - return true; - } else { - return false; - } - }; - $ptrType(Syntax).prototype.IsValid = function() { return new Syntax(this.$get()).IsValid(); }; - Syntax.prototype.String = function() { - var {$24r, _1, _r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this.$val; - _1 = s; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - $s = -1; return "proto2"; - /* } else if (_1 === (3)) { */ case 3: - $s = -1; return "proto3"; - /* } else { */ case 4: - _r = fmt.Sprintf("", new sliceType$1([new Syntax(s)])); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } */ case 5: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Syntax.prototype.String, $c: true, $r, $24r, _1, _r, s, $s};return $f; - }; - $ptrType(Syntax).prototype.String = function() { return new Syntax(this.$get()).String(); }; - Syntax.prototype.GoString = function() { - var {$24r, _1, _r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this.$val; - _1 = s; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - $s = -1; return "Proto2"; - /* } else if (_1 === (3)) { */ case 3: - $s = -1; return "Proto3"; - /* } else { */ case 4: - _r = fmt.Sprintf("Syntax(%d)", new sliceType$1([new Syntax(s)])); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } */ case 5: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Syntax.prototype.GoString, $c: true, $r, $24r, _1, _r, s, $s};return $f; - }; - $ptrType(Syntax).prototype.GoString = function() { return new Syntax(this.$get()).GoString(); }; - Cardinality.prototype.IsValid = function() { - var _1, c; - c = this.$val; - _1 = c; - if ((_1 === (1)) || (_1 === (2)) || (_1 === (3))) { - return true; - } else { - return false; - } - }; - $ptrType(Cardinality).prototype.IsValid = function() { return new Cardinality(this.$get()).IsValid(); }; - Cardinality.prototype.String = function() { - var {$24r, _1, _r, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this.$val; - _1 = c; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return "optional"; - /* } else if (_1 === (2)) { */ case 3: - $s = -1; return "required"; - /* } else if (_1 === (3)) { */ case 4: - $s = -1; return "repeated"; - /* } else { */ case 5: - _r = fmt.Sprintf("", new sliceType$1([new Cardinality(c)])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Cardinality.prototype.String, $c: true, $r, $24r, _1, _r, c, $s};return $f; - }; - $ptrType(Cardinality).prototype.String = function() { return new Cardinality(this.$get()).String(); }; - Cardinality.prototype.GoString = function() { - var {$24r, _1, _r, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this.$val; - _1 = c; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return "Optional"; - /* } else if (_1 === (2)) { */ case 3: - $s = -1; return "Required"; - /* } else if (_1 === (3)) { */ case 4: - $s = -1; return "Repeated"; - /* } else { */ case 5: - _r = fmt.Sprintf("Cardinality(%d)", new sliceType$1([new Cardinality(c)])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Cardinality.prototype.GoString, $c: true, $r, $24r, _1, _r, c, $s};return $f; - }; - $ptrType(Cardinality).prototype.GoString = function() { return new Cardinality(this.$get()).GoString(); }; - Kind.prototype.IsValid = function() { - var _1, k; - k = this.$val; - _1 = k; - if ((_1 === (8)) || (_1 === (14)) || (_1 === (5)) || (_1 === (17)) || (_1 === (13)) || (_1 === (3)) || (_1 === (18)) || (_1 === (4)) || (_1 === (15)) || (_1 === (7)) || (_1 === (2)) || (_1 === (16)) || (_1 === (6)) || (_1 === (1)) || (_1 === (9)) || (_1 === (12)) || (_1 === (11)) || (_1 === (10))) { - return true; - } else { - return false; - } - }; - $ptrType(Kind).prototype.IsValid = function() { return new Kind(this.$get()).IsValid(); }; - Kind.prototype.String = function() { - var {$24r, _1, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this.$val; - _1 = k; - /* */ if (_1 === (8)) { $s = 2; continue; } - /* */ if (_1 === (14)) { $s = 3; continue; } - /* */ if (_1 === (5)) { $s = 4; continue; } - /* */ if (_1 === (17)) { $s = 5; continue; } - /* */ if (_1 === (13)) { $s = 6; continue; } - /* */ if (_1 === (3)) { $s = 7; continue; } - /* */ if (_1 === (18)) { $s = 8; continue; } - /* */ if (_1 === (4)) { $s = 9; continue; } - /* */ if (_1 === (15)) { $s = 10; continue; } - /* */ if (_1 === (7)) { $s = 11; continue; } - /* */ if (_1 === (2)) { $s = 12; continue; } - /* */ if (_1 === (16)) { $s = 13; continue; } - /* */ if (_1 === (6)) { $s = 14; continue; } - /* */ if (_1 === (1)) { $s = 15; continue; } - /* */ if (_1 === (9)) { $s = 16; continue; } - /* */ if (_1 === (12)) { $s = 17; continue; } - /* */ if (_1 === (11)) { $s = 18; continue; } - /* */ if (_1 === (10)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_1 === (8)) { */ case 2: - $s = -1; return "bool"; - /* } else if (_1 === (14)) { */ case 3: - $s = -1; return "enum"; - /* } else if (_1 === (5)) { */ case 4: - $s = -1; return "int32"; - /* } else if (_1 === (17)) { */ case 5: - $s = -1; return "sint32"; - /* } else if (_1 === (13)) { */ case 6: - $s = -1; return "uint32"; - /* } else if (_1 === (3)) { */ case 7: - $s = -1; return "int64"; - /* } else if (_1 === (18)) { */ case 8: - $s = -1; return "sint64"; - /* } else if (_1 === (4)) { */ case 9: - $s = -1; return "uint64"; - /* } else if (_1 === (15)) { */ case 10: - $s = -1; return "sfixed32"; - /* } else if (_1 === (7)) { */ case 11: - $s = -1; return "fixed32"; - /* } else if (_1 === (2)) { */ case 12: - $s = -1; return "float"; - /* } else if (_1 === (16)) { */ case 13: - $s = -1; return "sfixed64"; - /* } else if (_1 === (6)) { */ case 14: - $s = -1; return "fixed64"; - /* } else if (_1 === (1)) { */ case 15: - $s = -1; return "double"; - /* } else if (_1 === (9)) { */ case 16: - $s = -1; return "string"; - /* } else if (_1 === (12)) { */ case 17: - $s = -1; return "bytes"; - /* } else if (_1 === (11)) { */ case 18: - $s = -1; return "message"; - /* } else if (_1 === (10)) { */ case 19: - $s = -1; return "group"; - /* } else { */ case 20: - _r = fmt.Sprintf("", new sliceType$1([new Kind(k)])); /* */ $s = 22; case 22: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 23; case 23: return $24r; - /* } */ case 21: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Kind.prototype.String, $c: true, $r, $24r, _1, _r, k, $s};return $f; - }; - $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; - Kind.prototype.GoString = function() { - var {$24r, _1, _r, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this.$val; - _1 = k; - /* */ if (_1 === (8)) { $s = 2; continue; } - /* */ if (_1 === (14)) { $s = 3; continue; } - /* */ if (_1 === (5)) { $s = 4; continue; } - /* */ if (_1 === (17)) { $s = 5; continue; } - /* */ if (_1 === (13)) { $s = 6; continue; } - /* */ if (_1 === (3)) { $s = 7; continue; } - /* */ if (_1 === (18)) { $s = 8; continue; } - /* */ if (_1 === (4)) { $s = 9; continue; } - /* */ if (_1 === (15)) { $s = 10; continue; } - /* */ if (_1 === (7)) { $s = 11; continue; } - /* */ if (_1 === (2)) { $s = 12; continue; } - /* */ if (_1 === (16)) { $s = 13; continue; } - /* */ if (_1 === (6)) { $s = 14; continue; } - /* */ if (_1 === (1)) { $s = 15; continue; } - /* */ if (_1 === (9)) { $s = 16; continue; } - /* */ if (_1 === (12)) { $s = 17; continue; } - /* */ if (_1 === (11)) { $s = 18; continue; } - /* */ if (_1 === (10)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_1 === (8)) { */ case 2: - $s = -1; return "BoolKind"; - /* } else if (_1 === (14)) { */ case 3: - $s = -1; return "EnumKind"; - /* } else if (_1 === (5)) { */ case 4: - $s = -1; return "Int32Kind"; - /* } else if (_1 === (17)) { */ case 5: - $s = -1; return "Sint32Kind"; - /* } else if (_1 === (13)) { */ case 6: - $s = -1; return "Uint32Kind"; - /* } else if (_1 === (3)) { */ case 7: - $s = -1; return "Int64Kind"; - /* } else if (_1 === (18)) { */ case 8: - $s = -1; return "Sint64Kind"; - /* } else if (_1 === (4)) { */ case 9: - $s = -1; return "Uint64Kind"; - /* } else if (_1 === (15)) { */ case 10: - $s = -1; return "Sfixed32Kind"; - /* } else if (_1 === (7)) { */ case 11: - $s = -1; return "Fixed32Kind"; - /* } else if (_1 === (2)) { */ case 12: - $s = -1; return "FloatKind"; - /* } else if (_1 === (16)) { */ case 13: - $s = -1; return "Sfixed64Kind"; - /* } else if (_1 === (6)) { */ case 14: - $s = -1; return "Fixed64Kind"; - /* } else if (_1 === (1)) { */ case 15: - $s = -1; return "DoubleKind"; - /* } else if (_1 === (9)) { */ case 16: - $s = -1; return "StringKind"; - /* } else if (_1 === (12)) { */ case 17: - $s = -1; return "BytesKind"; - /* } else if (_1 === (11)) { */ case 18: - $s = -1; return "MessageKind"; - /* } else if (_1 === (10)) { */ case 19: - $s = -1; return "GroupKind"; - /* } else { */ case 20: - _r = fmt.Sprintf("Kind(%d)", new sliceType$1([new Kind(k)])); /* */ $s = 22; case 22: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 23; case 23: return $24r; - /* } */ case 21: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Kind.prototype.GoString, $c: true, $r, $24r, _1, _r, k, $s};return $f; - }; - $ptrType(Kind).prototype.GoString = function() { return new Kind(this.$get()).GoString(); }; - Name.prototype.IsValid = function() { - var s; - s = this.$val; - return consumeIdent((s)) === s.length; - }; - $ptrType(Name).prototype.IsValid = function() { return new Name(this.$get()).IsValid(); }; - FullName.prototype.IsValid = function() { - var i, n, s; - s = this.$val; - i = consumeIdent((s)); - if (i < 0) { - return false; - } - while (true) { - if (!(s.length > i)) { break; } - if (!((s.charCodeAt(i) === 46))) { - return false; - } - i = i + (1) >> 0; - n = consumeIdent(($substring(s, i))); - if (n < 0) { - return false; - } - i = i + (n) >> 0; - } - return true; - }; - $ptrType(FullName).prototype.IsValid = function() { return new FullName(this.$get()).IsValid(); }; - consumeIdent = function(s) { - var i, s; - i = 0; - if ((s.length === 0) || !isLetter(s.charCodeAt(i))) { - i = -1; - return i; - } - i = i + (1) >> 0; - while (true) { - if (!(s.length > i && isLetterDigit(s.charCodeAt(i)))) { break; } - i = i + (1) >> 0; - } - i = i; - return i; - }; - isLetter = function(c) { - var c; - return (c === 95) || (97 <= c && c <= 122) || (65 <= c && c <= 90); - }; - isLetterDigit = function(c) { - var c; - return isLetter(c) || (48 <= c && c <= 57); - }; - FullName.prototype.Name = function() { - var i, n; - n = this.$val; - i = strings.LastIndexByte((n), 46); - if (i >= 0) { - return ($substring(n, (i + 1 >> 0))); - } - return (n); - }; - $ptrType(FullName).prototype.Name = function() { return new FullName(this.$get()).Name(); }; - FullName.prototype.Parent = function() { - var i, n; - n = this.$val; - i = strings.LastIndexByte((n), 46); - if (i >= 0) { - return $substring(n, 0, i); - } - return ""; - }; - $ptrType(FullName).prototype.Parent = function() { return new FullName(this.$get()).Parent(); }; - FullName.prototype.Append = function(s) { - var n, s; - n = this.$val; - if (n === "") { - return (s); - } - return n + "." + (s); - }; - $ptrType(FullName).prototype.Append = function(s) { return new FullName(this.$get()).Append(s); }; - Value.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "typeName", name: "typeName", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([], [$String], false)}, {prop: "panicMessage", name: "panicMessage", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([$String], [$String], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Float", name: "Float", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [EnumNumber], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([], [Message], false)}, {prop: "List", name: "List", pkg: "", typ: $funcType([], [List], false)}, {prop: "Map", name: "Map", pkg: "", typ: $funcType([], [Map], false)}, {prop: "MapKey", name: "MapKey", pkg: "", typ: $funcType([], [MapKey], false)}, {prop: "getString", name: "getString", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([], [$String], false)}, {prop: "getBytes", name: "getBytes", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([], [sliceType], false)}, {prop: "getIface", name: "getIface", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([], [$emptyInterface], false)}]; - MapKey.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([], [Value], false)}]; - RawFields.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; - SourcePath.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([SourcePath], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType.methods = [{prop: "appendFileDescriptorProto", name: "appendFileDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendDescriptorProto", name: "appendDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendEnumDescriptorProto", name: "appendEnumDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendServiceDescriptorProto", name: "appendServiceDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendFieldDescriptorProto", name: "appendFieldDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendFileOptions", name: "appendFileOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendSourceCodeInfo", name: "appendSourceCodeInfo", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendDescriptorProto_ExtensionRange", name: "appendDescriptorProto_ExtensionRange", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendOneofDescriptorProto", name: "appendOneofDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendMessageOptions", name: "appendMessageOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendDescriptorProto_ReservedRange", name: "appendDescriptorProto_ReservedRange", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendEnumValueDescriptorProto", name: "appendEnumValueDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendEnumOptions", name: "appendEnumOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendEnumDescriptorProto_EnumReservedRange", name: "appendEnumDescriptorProto_EnumReservedRange", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendMethodDescriptorProto", name: "appendMethodDescriptorProto", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendServiceOptions", name: "appendServiceOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendFieldOptions", name: "appendFieldOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendUninterpretedOption", name: "appendUninterpretedOption", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendSourceCodeInfo_Location", name: "appendSourceCodeInfo_Location", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendExtensionRangeOptions", name: "appendExtensionRangeOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendOneofOptions", name: "appendOneofOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendEnumValueOptions", name: "appendEnumValueOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendMethodOptions", name: "appendMethodOptions", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendUninterpretedOption_NamePart", name: "appendUninterpretedOption_NamePart", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType], [sliceType], false)}, {prop: "appendSingularField", name: "appendSingularField", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType, $String, appendFunc], [sliceType], false)}, {prop: "appendRepeatedField", name: "appendRepeatedField", pkg: "google.golang.org/protobuf/reflect/protoreflect", typ: $funcType([sliceType, $String, appendFunc], [sliceType], false)}]; - Syntax.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]; - Cardinality.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]; - Kind.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GoString", name: "GoString", pkg: "", typ: $funcType([], [$String], false)}]; - Name.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; - FullName.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([Name], [FullName], false)}]; - Value.init("google.golang.org/protobuf/reflect/protoreflect", [{prop: "DoNotCompare", name: "DoNotCompare", embedded: true, exported: true, typ: pragma.DoNotCompare, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: valueType, tag: ""}, {prop: "num", name: "num", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "bin", name: "bin", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "iface", name: "iface", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); - MapKey.init("google.golang.org/protobuf/reflect/protoreflect", [{prop: "DoNotCompare", name: "DoNotCompare", embedded: true, exported: true, typ: pragma.DoNotCompare, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: valueType, tag: ""}, {prop: "num", name: "num", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "bin", name: "bin", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "iface", name: "iface", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); - Enum.init([{prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [EnumDescriptor], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [EnumNumber], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [EnumType], false)}]); - Message.init([{prop: "Clear", name: "Clear", pkg: "", typ: $funcType([FieldDescriptor], [], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([FieldDescriptor], [Value], false)}, {prop: "GetUnknown", name: "GetUnknown", pkg: "", typ: $funcType([], [RawFields], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([FieldDescriptor], [$Bool], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([FieldDescriptor], [Value], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [Message], false)}, {prop: "NewField", name: "NewField", pkg: "", typ: $funcType([FieldDescriptor], [Value], false)}, {prop: "ProtoMethods", name: "ProtoMethods", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$6], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([FieldDescriptor, Value], [], false)}, {prop: "SetUnknown", name: "SetUnknown", pkg: "", typ: $funcType([RawFields], [], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [MessageType], false)}, {prop: "WhichOneof", name: "WhichOneof", pkg: "", typ: $funcType([OneofDescriptor], [FieldDescriptor], false)}]); - RawFields.init($Uint8); - List.init([{prop: "Append", name: "Append", pkg: "", typ: $funcType([Value], [], false)}, {prop: "AppendMutable", name: "AppendMutable", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [Value], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NewElement", name: "NewElement", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, Value], [], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int], [], false)}]); - Map.init([{prop: "Clear", name: "Clear", pkg: "", typ: $funcType([MapKey], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([MapKey], [Value], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([MapKey], [$Bool], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([MapKey], [Value], false)}, {prop: "NewValue", name: "NewValue", pkg: "", typ: $funcType([], [Value], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$7], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([MapKey, Value], [], false)}]); - Descriptor.init([{prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - FileDescriptor.init([{prop: "Enums", name: "Enums", pkg: "", typ: $funcType([], [EnumDescriptors], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [ExtensionDescriptors], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Imports", name: "Imports", pkg: "", typ: $funcType([], [FileImports], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Messages", name: "Messages", pkg: "", typ: $funcType([], [MessageDescriptors], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Package", name: "Package", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "Path", name: "Path", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([FileDescriptor], [], false)}, {prop: "Services", name: "Services", pkg: "", typ: $funcType([], [ServiceDescriptors], false)}, {prop: "SourceLocations", name: "SourceLocations", pkg: "", typ: $funcType([], [SourceLocations], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - FileImports.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [FileImport], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - FileImport.init("", [{prop: "FileDescriptor", name: "FileDescriptor", embedded: true, exported: true, typ: FileDescriptor, tag: ""}, {prop: "IsPublic", name: "IsPublic", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsWeak", name: "IsWeak", embedded: false, exported: true, typ: $Bool, tag: ""}]); - MessageDescriptor.init([{prop: "Enums", name: "Enums", pkg: "", typ: $funcType([], [EnumDescriptors], false)}, {prop: "ExtensionRangeOptions", name: "ExtensionRangeOptions", pkg: "", typ: $funcType([$Int], [ProtoMessage], false)}, {prop: "ExtensionRanges", name: "ExtensionRanges", pkg: "", typ: $funcType([], [FieldRanges], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [ExtensionDescriptors], false)}, {prop: "Fields", name: "Fields", pkg: "", typ: $funcType([], [FieldDescriptors], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsMapEntry", name: "IsMapEntry", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Messages", name: "Messages", pkg: "", typ: $funcType([], [MessageDescriptors], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Oneofs", name: "Oneofs", pkg: "", typ: $funcType([], [OneofDescriptors], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([MessageDescriptor], [], false)}, {prop: "RequiredNumbers", name: "RequiredNumbers", pkg: "", typ: $funcType([], [FieldNumbers], false)}, {prop: "ReservedNames", name: "ReservedNames", pkg: "", typ: $funcType([], [Names], false)}, {prop: "ReservedRanges", name: "ReservedRanges", pkg: "", typ: $funcType([], [FieldRanges], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - MessageType.init([{prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [Message], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [Message], false)}]); - MessageDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [MessageDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [MessageDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - FieldDescriptor.init([{prop: "Cardinality", name: "Cardinality", pkg: "", typ: $funcType([], [Cardinality], false)}, {prop: "ContainingMessage", name: "ContainingMessage", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "ContainingOneof", name: "ContainingOneof", pkg: "", typ: $funcType([], [OneofDescriptor], false)}, {prop: "Default", name: "Default", pkg: "", typ: $funcType([], [Value], false)}, {prop: "DefaultEnumValue", name: "DefaultEnumValue", pkg: "", typ: $funcType([], [EnumValueDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [EnumDescriptor], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "HasDefault", name: "HasDefault", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasJSONName", name: "HasJSONName", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasOptionalKeyword", name: "HasOptionalKeyword", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasPresence", name: "HasPresence", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsExtension", name: "IsExtension", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsList", name: "IsList", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMap", name: "IsMap", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPacked", name: "IsPacked", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsWeak", name: "IsWeak", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "JSONName", name: "JSONName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapKey", name: "MapKey", pkg: "", typ: $funcType([], [FieldDescriptor], false)}, {prop: "MapValue", name: "MapValue", pkg: "", typ: $funcType([], [FieldDescriptor], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([FieldDescriptor], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}, {prop: "TextName", name: "TextName", pkg: "", typ: $funcType([], [$String], false)}]); - FieldDescriptors.init([{prop: "ByJSONName", name: "ByJSONName", pkg: "", typ: $funcType([$String], [FieldDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [FieldDescriptor], false)}, {prop: "ByNumber", name: "ByNumber", pkg: "", typ: $funcType([protowire.Number], [FieldDescriptor], false)}, {prop: "ByTextName", name: "ByTextName", pkg: "", typ: $funcType([$String], [FieldDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [FieldDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - OneofDescriptor.init([{prop: "Fields", name: "Fields", pkg: "", typ: $funcType([], [FieldDescriptors], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsSynthetic", name: "IsSynthetic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([OneofDescriptor], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - OneofDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [OneofDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [OneofDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - ExtensionTypeDescriptor.init([{prop: "Cardinality", name: "Cardinality", pkg: "", typ: $funcType([], [Cardinality], false)}, {prop: "ContainingMessage", name: "ContainingMessage", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "ContainingOneof", name: "ContainingOneof", pkg: "", typ: $funcType([], [OneofDescriptor], false)}, {prop: "Default", name: "Default", pkg: "", typ: $funcType([], [Value], false)}, {prop: "DefaultEnumValue", name: "DefaultEnumValue", pkg: "", typ: $funcType([], [EnumValueDescriptor], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [FieldDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [EnumDescriptor], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "HasDefault", name: "HasDefault", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasJSONName", name: "HasJSONName", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasOptionalKeyword", name: "HasOptionalKeyword", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasPresence", name: "HasPresence", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsExtension", name: "IsExtension", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsList", name: "IsList", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMap", name: "IsMap", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPacked", name: "IsPacked", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsWeak", name: "IsWeak", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "JSONName", name: "JSONName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "MapKey", name: "MapKey", pkg: "", typ: $funcType([], [FieldDescriptor], false)}, {prop: "MapValue", name: "MapValue", pkg: "", typ: $funcType([], [FieldDescriptor], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([FieldDescriptor], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}, {prop: "TextName", name: "TextName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [ExtensionType], false)}]); - ExtensionDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [FieldDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [FieldDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - ExtensionType.init([{prop: "InterfaceOf", name: "InterfaceOf", pkg: "", typ: $funcType([Value], [$emptyInterface], false)}, {prop: "IsValidInterface", name: "IsValidInterface", pkg: "", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "IsValidValue", name: "IsValidValue", pkg: "", typ: $funcType([Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [Value], false)}, {prop: "TypeDescriptor", name: "TypeDescriptor", pkg: "", typ: $funcType([], [ExtensionTypeDescriptor], false)}, {prop: "ValueOf", name: "ValueOf", pkg: "", typ: $funcType([$emptyInterface], [Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [Value], false)}]); - EnumDescriptor.init([{prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([EnumDescriptor], [], false)}, {prop: "ReservedNames", name: "ReservedNames", pkg: "", typ: $funcType([], [Names], false)}, {prop: "ReservedRanges", name: "ReservedRanges", pkg: "", typ: $funcType([], [EnumRanges], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([], [EnumValueDescriptors], false)}]); - EnumType.init([{prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [EnumDescriptor], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([EnumNumber], [Enum], false)}]); - EnumDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [EnumDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [EnumDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - EnumValueDescriptor.init([{prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [EnumNumber], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([EnumValueDescriptor], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - EnumValueDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [EnumValueDescriptor], false)}, {prop: "ByNumber", name: "ByNumber", pkg: "", typ: $funcType([EnumNumber], [EnumValueDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [EnumValueDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - ServiceDescriptor.init([{prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Methods", name: "Methods", pkg: "", typ: $funcType([], [MethodDescriptors], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([ServiceDescriptor], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - ServiceDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [ServiceDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [ServiceDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - MethodDescriptor.init([{prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [FullName], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Input", name: "Input", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsStreamingClient", name: "IsStreamingClient", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsStreamingServer", name: "IsStreamingServer", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [Name], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [ProtoMessage], false)}, {prop: "Output", name: "Output", pkg: "", typ: $funcType([], [MessageDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [Descriptor], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [FileDescriptor], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([MethodDescriptor], [], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [Syntax], false)}]); - MethodDescriptors.init([{prop: "ByName", name: "ByName", pkg: "", typ: $funcType([Name], [MethodDescriptor], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [MethodDescriptor], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - SourceLocations.init([{prop: "ByDescriptor", name: "ByDescriptor", pkg: "", typ: $funcType([Descriptor], [SourceLocation], false)}, {prop: "ByPath", name: "ByPath", pkg: "", typ: $funcType([SourcePath], [SourceLocation], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [SourceLocation], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - SourceLocation.init("", [{prop: "Path", name: "Path", embedded: false, exported: true, typ: SourcePath, tag: ""}, {prop: "StartLine", name: "StartLine", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "StartColumn", name: "StartColumn", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "EndLine", name: "EndLine", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "EndColumn", name: "EndColumn", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "LeadingDetachedComments", name: "LeadingDetachedComments", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "LeadingComments", name: "LeadingComments", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "TrailingComments", name: "TrailingComments", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Next", name: "Next", embedded: false, exported: true, typ: $Int, tag: ""}]); - SourcePath.init($Int32); - appendFunc.init([ptrType, sliceType], [sliceType], false); - ProtoMessage.init([{prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [Message], false)}]); - FieldNumbers.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protowire.Number], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protowire.Number], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - FieldRanges.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [arrayType$1], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protowire.Number], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - EnumRanges.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [arrayType$2], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([EnumNumber], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - Names.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [Name], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([Name], [$Bool], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protowire.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pragma.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/descfmt"] = (function() { - var $pkg = {}, $init, fmt, detrand, pragma, protoreflect, io, reflect, strconv, strings, list, records, ptrType, sliceType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, sliceType$1, arrayType, arrayType$1, arrayType$2, sliceType$2, sliceType$3, ptrType$8, sliceType$4, ptrType$9, descriptorAccessors, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, FormatList, formatListOpt, FormatDesc, formatDescOpt, formatColon, joinStrings; - fmt = $packages["fmt"]; - detrand = $packages["google.golang.org/protobuf/internal/detrand"]; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - io = $packages["io"]; - reflect = $packages["reflect"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - list = $pkg.list = $newType(8, $kindInterface, "descfmt.list", true, "google.golang.org/protobuf/internal/descfmt", false, null); - records = $pkg.records = $newType(0, $kindStruct, "descfmt.records", true, "google.golang.org/protobuf/internal/descfmt", false, function(recs_, allowMulti_) { - this.$val = this; - if (arguments.length === 0) { - this.recs = sliceType$2.nil; - this.allowMulti = false; - return; - } - this.recs = recs_; - this.allowMulti = allowMulti_; - }); - ptrType = $ptrType(protoreflect.FileDescriptor); - sliceType = $sliceType($String); - ptrType$1 = $ptrType(protoreflect.MessageDescriptor); - ptrType$2 = $ptrType(protoreflect.FieldDescriptor); - ptrType$3 = $ptrType(protoreflect.OneofDescriptor); - ptrType$4 = $ptrType(protoreflect.EnumDescriptor); - ptrType$5 = $ptrType(protoreflect.EnumValueDescriptor); - ptrType$6 = $ptrType(protoreflect.ServiceDescriptor); - ptrType$7 = $ptrType(protoreflect.MethodDescriptor); - sliceType$1 = $sliceType($emptyInterface); - arrayType = $arrayType($packages["google.golang.org/protobuf/encoding/protowire"].Number, 2); - arrayType$1 = $arrayType(protoreflect.EnumNumber, 2); - arrayType$2 = $arrayType($String, 2); - sliceType$2 = $sliceType(arrayType$2); - sliceType$3 = $sliceType(reflect.Value); - ptrType$8 = $ptrType(reflect.rtype); - sliceType$4 = $sliceType($Uint8); - ptrType$9 = $ptrType(records); - FormatList = function(s, r, vs) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$8, _r$9, _v, _v$1, r, s, vs, $s, $r, $c} = $restore(this, {s, r, vs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = s; - _arg$1 = vs; - if (!(r === 118)) { _v = false; $s = 1; continue s; } - _r$8 = s.Flag(43); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (_r$8) { _v$1 = true; $s = 2; continue s; } - _r$9 = s.Flag(35); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9; case 2: - _v = _v$1; case 1: - _arg$2 = _v; - _r$10 = formatListOpt(_arg$1, true, _arg$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$3 = _r$10; - _r$11 = io.WriteString(_arg, _arg$3); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return; - /* */ } return; } var $f = {$blk: FormatList, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$8, _r$9, _v, _v$1, r, s, vs, $s};return $f; - }; - $pkg.FormatList = FormatList; - formatListOpt = function(vs, isRoot, allowMulti) { - var {_r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, allowMulti, end, i, i$1, i$2, i$3, i$4, i$5, isEnumValue, isRoot, m, name, r, r$1, rs, ss, start, v, vs, vs$1, vs$2, vs$3, vs$4, vs$5, vs$6, x, x$1, x$2, $s, $r, $c} = $restore(this, {vs, isRoot, allowMulti}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = "["; - _tmp$1 = "]"; - start = _tmp; - end = _tmp$1; - /* */ if (isRoot) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (isRoot) { */ case 1: - name = ""; - _ref = vs; - /* */ if ($assertType(_ref, protoreflect.Names, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, protoreflect.FieldNumbers, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, protoreflect.FieldRanges, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, protoreflect.EnumRanges, true)[1]) { $s = 6; continue; } - /* */ if ($assertType(_ref, protoreflect.FileImports, true)[1]) { $s = 7; continue; } - /* */ if ($assertType(_ref, protoreflect.Descriptor, true)[1]) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($assertType(_ref, protoreflect.Names, true)[1]) { */ case 3: - name = "Names"; - $s = 10; continue; - /* } else if ($assertType(_ref, protoreflect.FieldNumbers, true)[1]) { */ case 4: - name = "FieldNumbers"; - $s = 10; continue; - /* } else if ($assertType(_ref, protoreflect.FieldRanges, true)[1]) { */ case 5: - name = "FieldRanges"; - $s = 10; continue; - /* } else if ($assertType(_ref, protoreflect.EnumRanges, true)[1]) { */ case 6: - name = "EnumRanges"; - $s = 10; continue; - /* } else if ($assertType(_ref, protoreflect.FileImports, true)[1]) { */ case 7: - name = "FileImports"; - $s = 10; continue; - /* } else if ($assertType(_ref, protoreflect.Descriptor, true)[1]) { */ case 8: - _r$8 = reflect.ValueOf(vs); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).MethodByName("Get"); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Type(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.Out(0); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.Name(); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - name = _r$12 + "s"; - $s = 10; continue; - /* } else { */ case 9: - _r$13 = reflect.ValueOf(vs); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = $clone(_r$14, reflect.Value).Type(); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.Name(); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - name = _r$16; - /* } */ case 10: - _tmp$2 = name + "{"; - _tmp$3 = "}"; - start = _tmp$2; - end = _tmp$3; - /* } */ case 2: - ss = sliceType.nil; - _ref$1 = vs; - /* */ if ($assertType(_ref$1, protoreflect.Names, true)[1]) { $s = 20; continue; } - /* */ if ($assertType(_ref$1, protoreflect.FieldNumbers, true)[1]) { $s = 21; continue; } - /* */ if ($assertType(_ref$1, protoreflect.FieldRanges, true)[1]) { $s = 22; continue; } - /* */ if ($assertType(_ref$1, protoreflect.EnumRanges, true)[1]) { $s = 23; continue; } - /* */ if ($assertType(_ref$1, protoreflect.FileImports, true)[1]) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ($assertType(_ref$1, protoreflect.Names, true)[1]) { */ case 20: - vs$1 = _ref$1; - i = 0; - /* while (true) { */ case 27: - _r$17 = vs$1.Len(); /* */ $s = 29; case 29: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* if (!(i < _r$17)) { break; } */ if(!(i < _r$17)) { $s = 28; continue; } - _r$18 = vs$1.Get(i); /* */ $s = 30; case 30: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = fmt.Sprint(new sliceType$1([new protoreflect.Name(_r$18)])); /* */ $s = 31; case 31: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - ss = $append(ss, _r$19); - i = i + (1) >> 0; - $s = 27; continue; - case 28: - $s = -1; return start + joinStrings(ss, false) + end; - /* } else if ($assertType(_ref$1, protoreflect.FieldNumbers, true)[1]) { */ case 21: - vs$2 = _ref$1; - i$1 = 0; - /* while (true) { */ case 32: - _r$20 = vs$2.Len(); /* */ $s = 34; case 34: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - /* if (!(i$1 < _r$20)) { break; } */ if(!(i$1 < _r$20)) { $s = 33; continue; } - _r$21 = vs$2.Get(i$1); /* */ $s = 35; case 35: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = fmt.Sprint(new sliceType$1([new $packages["google.golang.org/protobuf/encoding/protowire"].Number(_r$21)])); /* */ $s = 36; case 36: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - ss = $append(ss, _r$22); - i$1 = i$1 + (1) >> 0; - $s = 32; continue; - case 33: - $s = -1; return start + joinStrings(ss, false) + end; - /* } else if ($assertType(_ref$1, protoreflect.FieldRanges, true)[1]) { */ case 22: - vs$3 = _ref$1; - i$2 = 0; - /* while (true) { */ case 37: - _r$23 = vs$3.Len(); /* */ $s = 39; case 39: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - /* if (!(i$2 < _r$23)) { break; } */ if(!(i$2 < _r$23)) { $s = 38; continue; } - _r$24 = vs$3.Get(i$2); /* */ $s = 40; case 40: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - r = $clone(_r$24, arrayType); - /* */ if ((r[0] + 1 >> 0) === r[1]) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if ((r[0] + 1 >> 0) === r[1]) { */ case 41: - _r$25 = fmt.Sprintf("%d", new sliceType$1([new $packages["google.golang.org/protobuf/encoding/protowire"].Number(r[0])])); /* */ $s = 44; case 44: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - ss = $append(ss, _r$25); - $s = 43; continue; - /* } else { */ case 42: - _r$26 = fmt.Sprintf("%d:%d", new sliceType$1([new $packages["google.golang.org/protobuf/encoding/protowire"].Number(r[0]), new $packages["google.golang.org/protobuf/encoding/protowire"].Number(r[1])])); /* */ $s = 45; case 45: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - ss = $append(ss, _r$26); - /* } */ case 43: - i$2 = i$2 + (1) >> 0; - $s = 37; continue; - case 38: - $s = -1; return start + joinStrings(ss, false) + end; - /* } else if ($assertType(_ref$1, protoreflect.EnumRanges, true)[1]) { */ case 23: - vs$4 = _ref$1; - i$3 = 0; - /* while (true) { */ case 46: - _r$27 = vs$4.Len(); /* */ $s = 48; case 48: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* if (!(i$3 < _r$27)) { break; } */ if(!(i$3 < _r$27)) { $s = 47; continue; } - _r$28 = vs$4.Get(i$3); /* */ $s = 49; case 49: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - r$1 = $clone(_r$28, arrayType$1); - /* */ if (r$1[0] === r$1[1]) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (r$1[0] === r$1[1]) { */ case 50: - _r$29 = fmt.Sprintf("%d", new sliceType$1([new protoreflect.EnumNumber(r$1[0])])); /* */ $s = 53; case 53: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - ss = $append(ss, _r$29); - $s = 52; continue; - /* } else { */ case 51: - _r$30 = fmt.Sprintf("%d:%d", new sliceType$1([new protoreflect.EnumNumber(r$1[0]), (x = (new $Int64(0, r$1[1])), new $Int64(x.$high + 0, x.$low + 1))])); /* */ $s = 54; case 54: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - ss = $append(ss, _r$30); - /* } */ case 52: - i$3 = i$3 + (1) >> 0; - $s = 46; continue; - case 47: - $s = -1; return start + joinStrings(ss, false) + end; - /* } else if ($assertType(_ref$1, protoreflect.FileImports, true)[1]) { */ case 24: - vs$5 = _ref$1; - i$4 = 0; - /* while (true) { */ case 55: - _r$31 = vs$5.Len(); /* */ $s = 57; case 57: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - /* if (!(i$4 < _r$31)) { break; } */ if(!(i$4 < _r$31)) { $s = 56; continue; } - rs = new records.ptr(sliceType$2.nil, false); - _r$32 = vs$5.Get(i$4); /* */ $s = 58; case 58: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _r$33 = reflect.ValueOf((x$1 = _r$32, new x$1.constructor.elem(x$1))); /* */ $s = 59; case 59: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - $r = rs.Append($clone(_r$33, reflect.Value), new sliceType(["Path", "Package", "IsPublic", "IsWeak"])); /* */ $s = 60; case 60: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$34 = rs.Join(); /* */ $s = 61; case 61: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - ss = $append(ss, "{" + _r$34 + "}"); - i$4 = i$4 + (1) >> 0; - $s = 55; continue; - case 56: - $s = -1; return start + joinStrings(ss, allowMulti) + end; - /* } else { */ case 25: - vs$6 = _ref$1; - _tuple = $assertType(vs$6, protoreflect.EnumValueDescriptors, true); - isEnumValue = _tuple[1]; - i$5 = 0; - /* while (true) { */ case 62: - _r$35 = vs$6.Len(); /* */ $s = 64; case 64: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - /* if (!(i$5 < _r$35)) { break; } */ if(!(i$5 < _r$35)) { $s = 63; continue; } - _r$36 = reflect.ValueOf(vs$6); /* */ $s = 65; case 65: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _r$37 = $clone(_r$36, reflect.Value).MethodByName("Get"); /* */ $s = 66; case 66: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - m = _r$37; - _r$38 = reflect.ValueOf(new $Int(i$5)); /* */ $s = 67; case 67: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _r$39 = $clone(m, reflect.Value).Call(new sliceType$3([$clone(_r$38, reflect.Value)])); /* */ $s = 68; case 68: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$40 = $clone((x$2 = _r$39, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), reflect.Value).Interface(); /* */ $s = 69; case 69: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - v = _r$40; - _r$41 = formatDescOpt($assertType(v, protoreflect.Descriptor), false, allowMulti && !isEnumValue); /* */ $s = 70; case 70: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - ss = $append(ss, _r$41); - i$5 = i$5 + (1) >> 0; - $s = 62; continue; - case 63: - $s = -1; return start + joinStrings(ss, allowMulti && isEnumValue) + end; - /* } */ case 26: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: formatListOpt, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, allowMulti, end, i, i$1, i$2, i$3, i$4, i$5, isEnumValue, isRoot, m, name, r, r$1, rs, ss, start, v, vs, vs$1, vs$2, vs$3, vs$4, vs$5, vs$6, x, x$1, x$2, $s};return $f; - }; - FormatDesc = function(s, r, t) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$8, _r$9, _v, _v$1, r, s, t, $s, $r, $c} = $restore(this, {s, r, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = s; - _arg$1 = t; - if (!(r === 118)) { _v = false; $s = 1; continue s; } - _r$8 = s.Flag(43); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (_r$8) { _v$1 = true; $s = 2; continue s; } - _r$9 = s.Flag(35); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9; case 2: - _v = _v$1; case 1: - _arg$2 = _v; - _r$10 = formatDescOpt(_arg$1, true, _arg$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$3 = _r$10; - _r$11 = io.WriteString(_arg, _arg$3); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return; - /* */ } return; } var $f = {$blk: FormatDesc, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$8, _r$9, _v, _v$1, r, s, t, $s};return $f; - }; - $pkg.FormatDesc = FormatDesc; - formatDescOpt = function(t, isRoot, allowMulti) { - var {$24r, _1, _2, _entry, _entry$1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tuple, allowMulti, end, fs, i, isFile, isRoot, k, od, rs, rt, rv, s, ss, start, t, t$1, t$2, t$3, v, $s, $r, $c} = $restore(this, {t, isRoot, allowMulti}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = reflect.ValueOf(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - rv = _r$8; - _r$9 = $clone(rv, reflect.Value).MethodByName("ProtoType"); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Type(); /* */ $s = 3; case 3: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.In(0); /* */ $s = 4; case 4: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rt = _r$11; - _tmp = "{"; - _tmp$1 = "}"; - start = _tmp; - end = _tmp$1; - /* */ if (isRoot) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (isRoot) { */ case 5: - _r$12 = rt.Name(); /* */ $s = 7; case 7: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - start = _r$12 + "{"; - /* } */ case 6: - _tuple = $assertType(t, protoreflect.FileDescriptor, true); - isFile = _tuple[1]; - rs = new records.ptr(sliceType$2.nil, allowMulti); - _r$13 = t.IsPlaceholder(); /* */ $s = 11; case 11: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (_r$13) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_r$13) { */ case 8: - /* */ if (isFile) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (isFile) { */ case 12: - $r = rs.Append($clone(rv, reflect.Value), new sliceType(["Path", "Package", "IsPlaceholder"])); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 14; continue; - /* } else { */ case 13: - $r = rs.Append($clone(rv, reflect.Value), new sliceType(["FullName", "IsPlaceholder"])); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - $s = 10; continue; - /* } else { */ case 9: - /* */ if (isFile) { $s = 18; continue; } - /* */ if (isRoot) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (isFile) { */ case 18: - $r = rs.Append($clone(rv, reflect.Value), new sliceType(["Syntax"])); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 21; continue; - /* } else if (isRoot) { */ case 19: - $r = rs.Append($clone(rv, reflect.Value), new sliceType(["Syntax", "FullName"])); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 21; continue; - /* } else { */ case 20: - $r = rs.Append($clone(rv, reflect.Value), new sliceType(["Name"])); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 21: - case 17: - _ref = t; - /* */ if ($assertType(_ref, protoreflect.FieldDescriptor, true)[1]) { $s = 25; continue; } - /* */ if ($assertType(_ref, protoreflect.OneofDescriptor, true)[1]) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ($assertType(_ref, protoreflect.FieldDescriptor, true)[1]) { */ case 25: - t$1 = _ref; - _ref$1 = (_entry = descriptorAccessors[reflect.Type.keyFor(rt)], _entry !== undefined ? _entry.v : sliceType.nil); - _i = 0; - /* while (true) { */ case 29: - /* if (!(_i < _ref$1.$length)) { break; } */ if(!(_i < _ref$1.$length)) { $s = 30; continue; } - s = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); - _1 = s; - /* */ if (_1 === ("MapKey")) { $s = 32; continue; } - /* */ if (_1 === ("MapValue")) { $s = 33; continue; } - /* */ if (_1 === ("ContainingOneof")) { $s = 34; continue; } - /* */ if (_1 === ("ContainingMessage")) { $s = 35; continue; } - /* */ if (_1 === ("Message")) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (_1 === ("MapKey")) { */ case 32: - _r$14 = t$1.MapKey(); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - k = _r$14; - /* */ if (!($interfaceIsEqual(k, $ifaceNil))) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (!($interfaceIsEqual(k, $ifaceNil))) { */ case 40: - _r$15 = k.Kind(); /* */ $s = 42; case 42: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = new protoreflect.Kind(_r$15).String(); /* */ $s = 43; case 43: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["MapKey", _r$16])); - /* } */ case 41: - $s = 38; continue; - /* } else if (_1 === ("MapValue")) { */ case 33: - _r$17 = t$1.MapValue(); /* */ $s = 44; case 44: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - v = _r$17; - /* */ if (!($interfaceIsEqual(v, $ifaceNil))) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!($interfaceIsEqual(v, $ifaceNil))) { */ case 45: - _r$18 = v.Kind(); /* */ $s = 48; case 48: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _2 = _r$18; - /* */ if (_2 === (14)) { $s = 49; continue; } - /* */ if ((_2 === (11)) || (_2 === (10))) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (_2 === (14)) { */ case 49: - _r$19 = v.Enum(); /* */ $s = 53; case 53: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.FullName(); /* */ $s = 54; case 54: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["MapValue", (_r$20)])); - $s = 52; continue; - /* } else if ((_2 === (11)) || (_2 === (10))) { */ case 50: - _r$21 = v.Message(); /* */ $s = 55; case 55: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = _r$21.FullName(); /* */ $s = 56; case 56: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["MapValue", (_r$22)])); - $s = 52; continue; - /* } else { */ case 51: - _r$23 = v.Kind(); /* */ $s = 57; case 57: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = new protoreflect.Kind(_r$23).String(); /* */ $s = 58; case 58: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["MapValue", _r$24])); - /* } */ case 52: - case 47: - /* } */ case 46: - $s = 38; continue; - /* } else if (_1 === ("ContainingOneof")) { */ case 34: - _r$25 = t$1.ContainingOneof(); /* */ $s = 59; case 59: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - od = _r$25; - /* */ if (!($interfaceIsEqual(od, $ifaceNil))) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (!($interfaceIsEqual(od, $ifaceNil))) { */ case 60: - _r$26 = od.Name(); /* */ $s = 62; case 62: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["Oneof", (_r$26)])); - /* } */ case 61: - $s = 38; continue; - /* } else if (_1 === ("ContainingMessage")) { */ case 35: - _r$27 = t$1.IsExtension(); /* */ $s = 65; case 65: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* */ if (_r$27) { $s = 63; continue; } - /* */ $s = 64; continue; - /* if (_r$27) { */ case 63: - _r$28 = t$1.ContainingMessage(); /* */ $s = 66; case 66: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = _r$28.FullName(); /* */ $s = 67; case 67: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["Extendee", (_r$29)])); - /* } */ case 64: - $s = 38; continue; - /* } else if (_1 === ("Message")) { */ case 36: - _r$30 = t$1.IsMap(); /* */ $s = 70; case 70: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - /* */ if (!_r$30) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if (!_r$30) { */ case 68: - $r = rs.Append($clone(rv, reflect.Value), new sliceType([s])); /* */ $s = 71; case 71: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 69: - $s = 38; continue; - /* } else { */ case 37: - $r = rs.Append($clone(rv, reflect.Value), new sliceType([s])); /* */ $s = 72; case 72: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 38: - case 31: - _i++; - $s = 29; continue; - case 30: - $s = 28; continue; - /* } else if ($assertType(_ref, protoreflect.OneofDescriptor, true)[1]) { */ case 26: - t$2 = _ref; - ss = sliceType.nil; - _r$31 = t$2.Fields(); /* */ $s = 73; case 73: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - fs = _r$31; - i = 0; - /* while (true) { */ case 74: - _r$32 = fs.Len(); /* */ $s = 76; case 76: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - /* if (!(i < _r$32)) { break; } */ if(!(i < _r$32)) { $s = 75; continue; } - _r$33 = fs.Get(i); /* */ $s = 77; case 77: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$34 = _r$33.Name(); /* */ $s = 78; case 78: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - ss = $append(ss, (_r$34)); - i = i + (1) >> 0; - $s = 74; continue; - case 75: - if (ss.$length > 0) { - rs.recs = $append(rs.recs, $toNativeArray($kindString, ["Fields", "[" + joinStrings(ss, false) + "]"])); - } - $s = 28; continue; - /* } else { */ case 27: - t$3 = _ref; - $r = rs.Append($clone(rv, reflect.Value), (_entry$1 = descriptorAccessors[reflect.Type.keyFor(rt)], _entry$1 !== undefined ? _entry$1.v : sliceType.nil)); /* */ $s = 79; case 79: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 28: - _r$35 = $clone(rv, reflect.Value).MethodByName("GoType"); /* */ $s = 82; case 82: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _r$36 = $clone(_r$35, reflect.Value).IsValid(); /* */ $s = 83; case 83: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - /* */ if (_r$36) { $s = 80; continue; } - /* */ $s = 81; continue; - /* if (_r$36) { */ case 80: - $r = rs.Append($clone(rv, reflect.Value), new sliceType(["GoType"])); /* */ $s = 84; case 84: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 81: - /* } */ case 10: - _r$37 = rs.Join(); /* */ $s = 85; case 85: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - $24r = start + _r$37 + end; - $s = 86; case 86: return $24r; - /* */ } return; } var $f = {$blk: formatDescOpt, $c: true, $r, $24r, _1, _2, _entry, _entry$1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tuple, allowMulti, end, fs, i, isFile, isRoot, k, od, rs, rt, rv, s, ss, start, t, t$1, t$2, t$3, v, $s};return $f; - }; - records.ptr.prototype.Append = function(v, accessors) { - var {_1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, a, accessors, isZero, m, n, ok, ok$1, rs, rv, s, v, v$1, v$2, v$3, v$4, v$5, v$6, v$7, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {v, accessors}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rs = this; - _ref = accessors; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - a = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - rv = new reflect.Value.ptr(ptrType$8.nil, 0, 0); - _r$8 = $clone(v, reflect.Value).MethodByName(a); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - m = _r$8; - /* */ if ($clone(m, reflect.Value).IsValid()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($clone(m, reflect.Value).IsValid()) { */ case 4: - _r$9 = $clone(m, reflect.Value).Call(sliceType$3.nil); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - rv = (x = _r$9, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* } */ case 5: - /* */ if (($clone(v, reflect.Value).Kind() === 25) && !$clone(rv, reflect.Value).IsValid()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (($clone(v, reflect.Value).Kind() === 25) && !$clone(rv, reflect.Value).IsValid()) { */ case 7: - _r$10 = $clone(v, reflect.Value).FieldByName(a); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - rv = _r$10; - /* } */ case 8: - /* */ if (!$clone(rv, reflect.Value).IsValid()) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!$clone(rv, reflect.Value).IsValid()) { */ case 10: - _r$11 = fmt.Sprintf("unknown accessor: %v.%s", new sliceType$1([$clone(v, reflect.Value).Type(), new $String(a)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $panic(new $String(_r$11)); - /* } */ case 11: - _r$12 = $clone(rv, reflect.Value).Interface(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple = $assertType(_r$12, protoreflect.Value, true); - ok = _tuple[1]; - /* */ if (ok) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (ok) { */ case 14: - _r$13 = $clone(rv, reflect.Value).MethodByName("Interface"); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Call(sliceType$3.nil); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - rv = (x$1 = _r$14, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - /* */ if (!$clone(rv, reflect.Value).IsNil()) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!$clone(rv, reflect.Value).IsNil()) { */ case 18: - _r$15 = $clone(rv, reflect.Value).Elem(); /* */ $s = 20; case 20: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - rv = _r$15; - /* } */ case 19: - /* } */ case 15: - isZero = false; - _1 = $clone(rv, reflect.Value).Kind(); - /* */ if ((_1 === (20)) || (_1 === (23))) { $s = 22; continue; } - /* */ if (_1 === (1)) { $s = 23; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 24; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { $s = 25; continue; } - /* */ if (_1 === (24)) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ((_1 === (20)) || (_1 === (23))) { */ case 22: - isZero = $clone(rv, reflect.Value).IsNil(); - $s = 27; continue; - /* } else if (_1 === (1)) { */ case 23: - isZero = $clone(rv, reflect.Value).Bool() === false; - $s = 27; continue; - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 24: - isZero = (x$2 = $clone(rv, reflect.Value).Int(), (x$2.$high === 0 && x$2.$low === 0)); - $s = 27; continue; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { */ case 25: - isZero = (x$3 = $clone(rv, reflect.Value).Uint(), (x$3.$high === 0 && x$3.$low === 0)); - $s = 27; continue; - /* } else if (_1 === (24)) { */ case 26: - _r$16 = $clone(rv, reflect.Value).String(); /* */ $s = 28; case 28: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - isZero = _r$16 === ""; - /* } */ case 27: - case 21: - _r$17 = $clone(rv, reflect.Value).Interface(); /* */ $s = 29; case 29: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$1 = $assertType(_r$17, list, true); - n = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (ok$1) { */ case 30: - _r$18 = n.Len(); /* */ $s = 32; case 32: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - isZero = _r$18 === 0; - /* } */ case 31: - if (isZero) { - _i++; - /* continue; */ $s = 1; continue; - } - s = ""; - _r$19 = $clone(rv, reflect.Value).Interface(); /* */ $s = 33; case 33: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - v$1 = _r$19; - _ref$1 = v$1; - /* */ if ($assertType(_ref$1, list, true)[1]) { $s = 34; continue; } - /* */ if ($assertType(_ref$1, protoreflect.FieldDescriptor, true)[1] || $assertType(_ref$1, protoreflect.OneofDescriptor, true)[1] || $assertType(_ref$1, protoreflect.EnumValueDescriptor, true)[1] || $assertType(_ref$1, protoreflect.MethodDescriptor, true)[1]) { $s = 35; continue; } - /* */ if ($assertType(_ref$1, protoreflect.Descriptor, true)[1]) { $s = 36; continue; } - /* */ if ($assertType(_ref$1, $String, true)[1]) { $s = 37; continue; } - /* */ if ($assertType(_ref$1, sliceType$4, true)[1]) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if ($assertType(_ref$1, list, true)[1]) { */ case 34: - v$2 = _ref$1; - _r$20 = formatListOpt(v$2, false, rs.allowMulti); /* */ $s = 41; case 41: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - s = _r$20; - $s = 40; continue; - /* } else if ($assertType(_ref$1, protoreflect.FieldDescriptor, true)[1] || $assertType(_ref$1, protoreflect.OneofDescriptor, true)[1] || $assertType(_ref$1, protoreflect.EnumValueDescriptor, true)[1] || $assertType(_ref$1, protoreflect.MethodDescriptor, true)[1]) { */ case 35: - v$3 = _ref$1; - _r$21 = $assertType(v$3, protoreflect.Descriptor).Name(); /* */ $s = 42; case 42: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - s = (_r$21); - $s = 40; continue; - /* } else if ($assertType(_ref$1, protoreflect.Descriptor, true)[1]) { */ case 36: - v$4 = _ref$1; - _r$22 = v$4.FullName(); /* */ $s = 43; case 43: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - s = (_r$22); - $s = 40; continue; - /* } else if ($assertType(_ref$1, $String, true)[1]) { */ case 37: - v$5 = _ref$1.$val; - s = strconv.Quote(v$5); - $s = 40; continue; - /* } else if ($assertType(_ref$1, sliceType$4, true)[1]) { */ case 38: - v$6 = _ref$1.$val; - _r$23 = fmt.Sprintf("%q", new sliceType$1([v$6])); /* */ $s = 44; case 44: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - s = _r$23; - $s = 40; continue; - /* } else { */ case 39: - v$7 = _ref$1; - _r$24 = fmt.Sprint(new sliceType$1([v$7])); /* */ $s = 45; case 45: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - s = _r$24; - /* } */ case 40: - rs.recs = $append(rs.recs, $toNativeArray($kindString, [a, s])); - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: records.ptr.prototype.Append, $c: true, $r, _1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, a, accessors, isZero, m, n, ok, ok$1, rs, rv, s, v, v$1, v$2, v$3, v$4, v$5, v$6, v$7, x, x$1, x$2, x$3, $s};return $f; - }; - records.prototype.Append = function(v, accessors) { return this.$val.Append(v, accessors); }; - records.ptr.prototype.Join = function() { - var {_i, _i$1, _ref, _ref$1, flush, i, isMulti, maxLen, r, r$1, rs, ss, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - maxLen = [maxLen]; - rs = [rs]; - ss = [ss]; - rs[0] = this; - ss[0] = sliceType.nil; - if (!rs[0].allowMulti) { - _ref = rs[0].recs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - r = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType$2); - ss[0] = $append(ss[0], r[0] + formatColon(0) + r[1]); - _i++; - } - $s = -1; return joinStrings(ss[0], false); - } - maxLen[0] = 0; - flush = (function(maxLen, rs, ss) { return function(i) { - var _i$1, _ref$1, i, r$1; - _ref$1 = $subslice(rs[0].recs, ss[0].$length, i); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - r$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), arrayType$2); - ss[0] = $append(ss[0], r$1[0] + formatColon(maxLen[0] - r$1[0].length >> 0) + r$1[1]); - _i$1++; - } - maxLen[0] = 0; - }; })(maxLen, rs, ss); - _ref$1 = rs[0].recs; - _i$1 = 0; - /* while (true) { */ case 1: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } - i = _i$1; - r$1 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), arrayType$2); - isMulti = strings.Contains(r$1[1], "\n"); - /* */ if (isMulti) { $s = 3; continue; } - /* */ if (maxLen[0] < r$1[0].length) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (isMulti) { */ case 3: - $r = flush(i); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ss[0] = $append(ss[0], r$1[0] + formatColon(0) + strings.Join(strings.Split(r$1[1], "\n"), "\n\t")); - $s = 5; continue; - /* } else if (maxLen[0] < r$1[0].length) { */ case 4: - maxLen[0] = r$1[0].length; - /* } */ case 5: - _i$1++; - $s = 1; continue; - case 2: - $r = flush(rs[0].recs.$length); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return joinStrings(ss[0], true); - /* */ } return; } var $f = {$blk: records.ptr.prototype.Join, $c: true, $r, _i, _i$1, _ref, _ref$1, flush, i, isMulti, maxLen, r, r$1, rs, ss, $s};return $f; - }; - records.prototype.Join = function() { return this.$val.Join(); }; - formatColon = function(padding) { - var padding; - if (detrand.Bool()) { - return ":" + strings.Repeat("\xC2\xA0", 1 + padding >> 0); - } else { - return ":" + strings.Repeat(" ", 1 + padding >> 0); - } - }; - joinStrings = function(ss, isMulti) { - var isMulti, ss; - if (ss.$length === 0) { - return ""; - } - if (isMulti) { - return "\n\t" + strings.Join(ss, "\n\t") + "\n"; - } - return strings.Join(ss, ", "); - }; - ptrType$9.methods = [{prop: "Append", name: "Append", pkg: "", typ: $funcType([reflect.Value, sliceType], [], true)}, {prop: "Join", name: "Join", pkg: "", typ: $funcType([], [$String], false)}]; - list.init([{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]); - records.init("google.golang.org/protobuf/internal/descfmt", [{prop: "recs", name: "recs", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "allowMulti", name: "allowMulti", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = detrand.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pragma.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = reflect.TypeOf((ptrType.nil)).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = reflect.TypeOf((ptrType$1.nil)).Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = reflect.TypeOf((ptrType$2.nil)).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = reflect.TypeOf((ptrType$3.nil)).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = reflect.TypeOf((ptrType$4.nil)).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = reflect.TypeOf((ptrType$5.nil)).Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.TypeOf((ptrType$6.nil)).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.TypeOf((ptrType$7.nil)).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - descriptorAccessors = $makeMap(reflect.Type.keyFor, [{ k: _r, v: new sliceType(["Path", "Package", "Imports", "Messages", "Enums", "Extensions", "Services"]) }, { k: _r$1, v: new sliceType(["IsMapEntry", "Fields", "Oneofs", "ReservedNames", "ReservedRanges", "RequiredNumbers", "ExtensionRanges", "Messages", "Enums", "Extensions"]) }, { k: _r$2, v: new sliceType(["Number", "Cardinality", "Kind", "HasJSONName", "JSONName", "HasPresence", "IsExtension", "IsPacked", "IsWeak", "IsList", "IsMap", "MapKey", "MapValue", "HasDefault", "Default", "ContainingOneof", "ContainingMessage", "Message", "Enum"]) }, { k: _r$3, v: new sliceType(["Fields"]) }, { k: _r$4, v: new sliceType(["Values", "ReservedNames", "ReservedRanges"]) }, { k: _r$5, v: new sliceType(["Number"]) }, { k: _r$6, v: new sliceType(["Methods"]) }, { k: _r$7, v: new sliceType(["Input", "Output", "IsStreamingClient", "IsStreamingServer"]) }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/descopts"] = (function() { - var $pkg = {}, $init, protoreflect; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = protoreflect.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.File = $ifaceNil; - $pkg.Enum = $ifaceNil; - $pkg.EnumValue = $ifaceNil; - $pkg.Message = $ifaceNil; - $pkg.Field = $ifaceNil; - $pkg.Oneof = $ifaceNil; - $pkg.ExtensionRange = $ifaceNil; - $pkg.Service = $ifaceNil; - $pkg.Method = $ifaceNil; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/flags"] = (function() { - var $pkg = {}, $init; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go/token"] = (function() { - var $pkg = {}, $init, fmt, nosync, sort, strconv, unicode, utf8, tokens, keywords, init; - fmt = $packages["fmt"]; - nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - init = function() { - var _key, i; - keywords = {}; - i = 61; - while (true) { - if (!(i < 86)) { break; } - _key = ((i < 0 || i >= tokens.length) ? ($throwRuntimeError("index out of range"), undefined) : tokens[i]); (keywords || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: i }; - i = i + (1) >> 0; - } - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nosync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - keywords = false; - tokens = $toNativeArray($kindString, ["ILLEGAL", "EOF", "COMMENT", "", "IDENT", "INT", "FLOAT", "IMAG", "CHAR", "STRING", "", "", "+", "-", "*", "/", "%", "&", "|", "^", "<<", ">>", "&^", "+=", "-=", "*=", "/=", "%=", "&=", "|=", "^=", "<<=", ">>=", "&^=", "&&", "||", "<-", "++", "--", "==", "<", ">", "=", "!", "!=", "<=", ">=", ":=", "...", "(", "[", "{", ",", ".", ")", "]", "}", ";", ":", "", "", "break", "case", "chan", "const", "continue", "default", "defer", "else", "fallthrough", "for", "func", "go", "goto", "if", "import", "interface", "map", "package", "range", "return", "select", "struct", "switch", "type", "var", "", "", "~"]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/strs"] = (function() { - var $pkg = {}, $init, token, flags, protoreflect, strings, unicode, utf8, Builder, sliceType, interfaceType, ptrType, UnsafeString, EnforceUTF8, GoCamelCase, JSONCamelCase, MapEntryName, isASCIILower, isASCIIDigit; - token = $packages["go/token"]; - flags = $packages["google.golang.org/protobuf/internal/flags"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - strings = $packages["strings"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - Builder = $pkg.Builder = $newType(0, $kindStruct, "strs.Builder", true, "google.golang.org/protobuf/internal/strs", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - sliceType = $sliceType($Uint8); - interfaceType = $interfaceType([{prop: "EnforceUTF8", name: "EnforceUTF8", pkg: "", typ: $funcType([], [$Bool], false)}]); - ptrType = $ptrType(Builder); - UnsafeString = function(b) { - var b; - return ($bytesToString(b)); - }; - $pkg.UnsafeString = UnsafeString; - Builder.ptr.prototype.AppendFullName = function(prefix, name) { - var name, prefix; - return new protoreflect.FullName(prefix).Append(name); - }; - Builder.prototype.AppendFullName = function(prefix, name) { return this.$val.AppendFullName(prefix, name); }; - Builder.ptr.prototype.MakeString = function(b) { - var b; - return ($bytesToString(b)); - }; - Builder.prototype.MakeString = function(b) { return this.$val.MakeString(b); }; - EnforceUTF8 = function(fd) { - var {$24r, $24r$1, _r, _r$1, _tuple, fd, fd$1, ok, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (false) { */ case 1: - _tuple = $assertType(fd, interfaceType, true); - fd$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ok) { */ case 3: - _r = fd$1.EnforceUTF8(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 6; case 6: return $24r; - /* } */ case 4: - /* } */ case 2: - _r$1 = fd.Syntax(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1 === 3; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: EnforceUTF8, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, fd, fd$1, ok, $s};return $f; - }; - $pkg.EnforceUTF8 = EnforceUTF8; - GoCamelCase = function(s) { - var b, c, i, s; - b = sliceType.nil; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if ((c === 46) && (i + 1 >> 0) < s.length && isASCIILower(s.charCodeAt((i + 1 >> 0)))) { - } else if ((c === 46)) { - b = $append(b, 95); - } else if ((c === 95) && ((i === 0) || (s.charCodeAt((i - 1 >> 0)) === 46))) { - b = $append(b, 88); - } else if ((c === 95) && (i + 1 >> 0) < s.length && isASCIILower(s.charCodeAt((i + 1 >> 0)))) { - } else if (isASCIIDigit(c)) { - b = $append(b, c); - } else { - if (isASCIILower(c)) { - c = c - (32) << 24 >>> 24; - } - b = $append(b, c); - while (true) { - if (!((i + 1 >> 0) < s.length && isASCIILower(s.charCodeAt((i + 1 >> 0))))) { break; } - b = $append(b, s.charCodeAt((i + 1 >> 0))); - i = i + (1) >> 0; - } - } - i = i + (1) >> 0; - } - return ($bytesToString(b)); - }; - $pkg.GoCamelCase = GoCamelCase; - JSONCamelCase = function(s) { - var b, c, i, s, wasUnderscore; - b = sliceType.nil; - wasUnderscore = false; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (!((c === 95))) { - if (wasUnderscore && isASCIILower(c)) { - c = c - (32) << 24 >>> 24; - } - b = $append(b, c); - } - wasUnderscore = c === 95; - i = i + (1) >> 0; - } - return ($bytesToString(b)); - }; - $pkg.JSONCamelCase = JSONCamelCase; - MapEntryName = function(s) { - var _i, _ref, _rune, b, c, s, upperNext; - b = sliceType.nil; - upperNext = true; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - c = _rune[0]; - if ((c === 95)) { - upperNext = true; - } else if (upperNext) { - b = $append(b, ((unicode.ToUpper(c) << 24 >>> 24))); - upperNext = false; - } else { - b = $append(b, ((c << 24 >>> 24))); - } - _i += _rune[1]; - } - b = $appendSlice(b, "Entry"); - return ($bytesToString(b)); - }; - $pkg.MapEntryName = MapEntryName; - isASCIILower = function(c) { - var c; - return 97 <= c && c <= 122; - }; - isASCIIDigit = function(c) { - var c; - return 48 <= c && c <= 57; - }; - ptrType.methods = [{prop: "AppendFullName", name: "AppendFullName", pkg: "", typ: $funcType([protoreflect.FullName, protoreflect.Name], [protoreflect.FullName], false)}, {prop: "MakeString", name: "MakeString", pkg: "", typ: $funcType([sliceType], [$String], false)}]; - Builder.init("", []); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = token.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flags.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["unicode/utf16"] = (function() { - var $pkg = {}, $init, sliceType$1, IsSurrogate, DecodeRune, Decode; - sliceType$1 = $sliceType($Int32); - IsSurrogate = function(r) { - var r; - return 55296 <= r && r < 57344; - }; - $pkg.IsSurrogate = IsSurrogate; - DecodeRune = function(r1, r2) { - var r1, r2; - if (55296 <= r1 && r1 < 56320 && 56320 <= r2 && r2 < 57344) { - return ((((r1 - 55296 >> 0)) << 10 >> 0) | ((r2 - 56320 >> 0))) + 65536 >> 0; - } - return 65533; - }; - $pkg.DecodeRune = DecodeRune; - Decode = function(s) { - var a, i, n, r, s, x, x$1, x$2; - a = $makeSlice(sliceType$1, s.$length); - n = 0; - i = 0; - while (true) { - if (!(i < s.$length)) { break; } - r = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); - if ((r < 55296) || (57344 <= r)) { - ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = ((r >> 0))); - } else if (55296 <= r && r < 56320 && (i + 1 >> 0) < s.$length && 56320 <= (x = i + 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) && (x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1])) < 57344) { - ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = DecodeRune(((r >> 0)), (((x$2 = i + 1 >> 0, ((x$2 < 0 || x$2 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$2])) >> 0)))); - i = i + (1) >> 0; - } else { - ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = 65533); - } - n = n + (1) >> 0; - i = i + (1) >> 0; - } - return $subslice(a, 0, n); - }; - $pkg.Decode = Decode; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/encoding/text"] = (function() { - var $pkg = {}, $init, bytes, fmt, detrand, errors, flags, strs, io, math, bits, strconv, strings, unicode, utf16, utf8, encType, Encoder, encoderState, Kind, NameKind, Token, number, Decoder, call, sliceType, sliceType$1, arrayType, ptrType, ptrType$1, sliceType$2, ptrType$2, boolLits, floatLits, otherCloseChar, _r, NewEncoder, appendString, indexNeedEscapeInString, appendFloat, indexNeedEscapeInBytes, UnmarshalString, parseNumber, NewDecoder, isTypeNameChar, parseIdent, consume, errId, isDelim; - bytes = $packages["bytes"]; - fmt = $packages["fmt"]; - detrand = $packages["google.golang.org/protobuf/internal/detrand"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - flags = $packages["google.golang.org/protobuf/internal/flags"]; - strs = $packages["google.golang.org/protobuf/internal/strs"]; - io = $packages["io"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - unicode = $packages["unicode"]; - utf16 = $packages["unicode/utf16"]; - utf8 = $packages["unicode/utf8"]; - encType = $pkg.encType = $newType(1, $kindUint8, "text.encType", true, "google.golang.org/protobuf/internal/encoding/text", false, null); - Encoder = $pkg.Encoder = $newType(0, $kindStruct, "text.Encoder", true, "google.golang.org/protobuf/internal/encoding/text", true, function(encoderState_, indent_, delims_, outputASCII_) { - this.$val = this; - if (arguments.length === 0) { - this.encoderState = new encoderState.ptr(0, sliceType$1.nil, sliceType$1.nil); - this.indent = ""; - this.delims = arrayType.zero(); - this.outputASCII = false; - return; - } - this.encoderState = encoderState_; - this.indent = indent_; - this.delims = delims_; - this.outputASCII = outputASCII_; - }); - encoderState = $pkg.encoderState = $newType(0, $kindStruct, "text.encoderState", true, "google.golang.org/protobuf/internal/encoding/text", false, function(lastType_, indents_, out_) { - this.$val = this; - if (arguments.length === 0) { - this.lastType = 0; - this.indents = sliceType$1.nil; - this.out = sliceType$1.nil; - return; - } - this.lastType = lastType_; - this.indents = indents_; - this.out = out_; - }); - Kind = $pkg.Kind = $newType(1, $kindUint8, "text.Kind", true, "google.golang.org/protobuf/internal/encoding/text", true, null); - NameKind = $pkg.NameKind = $newType(1, $kindUint8, "text.NameKind", true, "google.golang.org/protobuf/internal/encoding/text", true, null); - Token = $pkg.Token = $newType(0, $kindStruct, "text.Token", true, "google.golang.org/protobuf/internal/encoding/text", true, function(kind_, attrs_, numAttrs_, pos_, raw_, str_) { - this.$val = this; - if (arguments.length === 0) { - this.kind = 0; - this.attrs = 0; - this.numAttrs = 0; - this.pos = 0; - this.raw = sliceType$1.nil; - this.str = ""; - return; - } - this.kind = kind_; - this.attrs = attrs_; - this.numAttrs = numAttrs_; - this.pos = pos_; - this.raw = raw_; - this.str = str_; - }); - number = $pkg.number = $newType(0, $kindStruct, "text.number", true, "google.golang.org/protobuf/internal/encoding/text", false, function(kind_, neg_, size_) { - this.$val = this; - if (arguments.length === 0) { - this.kind = 0; - this.neg = false; - this.size = 0; - return; - } - this.kind = kind_; - this.neg = neg_; - this.size = size_; - }); - Decoder = $pkg.Decoder = $newType(0, $kindStruct, "text.Decoder", true, "google.golang.org/protobuf/internal/encoding/text", true, function(lastCall_, lastToken_, lastErr_, openStack_, orig_, in$5_) { - this.$val = this; - if (arguments.length === 0) { - this.lastCall = 0; - this.lastToken = new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""); - this.lastErr = $ifaceNil; - this.openStack = sliceType$1.nil; - this.orig = sliceType$1.nil; - this.in$5 = sliceType$1.nil; - return; - } - this.lastCall = lastCall_; - this.lastToken = lastToken_; - this.lastErr = lastErr_; - this.openStack = openStack_; - this.orig = orig_; - this.in$5 = in$5_; - }); - call = $pkg.call = $newType(1, $kindUint8, "text.call", true, "google.golang.org/protobuf/internal/encoding/text", false, null); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 2); - ptrType = $ptrType(Encoder); - ptrType$1 = $ptrType(strconv.NumError); - sliceType$2 = $sliceType($String); - ptrType$2 = $ptrType(Decoder); - NewEncoder = function(indent, delims, outputASCII) { - var {$24r, $24r$1, _1, _r$1, _r$2, delims, e, indent, outputASCII, $s, $r, $c} = $restore(this, {indent, delims, outputASCII}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = new Encoder.ptr(new encoderState.ptr(0, sliceType$1.nil, sliceType$1.nil), "", arrayType.zero(), false); - /* */ if (indent.length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (indent.length > 0) { */ case 1: - /* */ if (!(strings.Trim(indent, " \t") === "")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(strings.Trim(indent, " \t") === "")) { */ case 3: - _r$1 = errors.New("indent may only be composed of space and tab characters", new sliceType([])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [ptrType.nil, _r$1]; - $s = 6; case 6: return $24r; - /* } */ case 4: - e.indent = indent; - /* } */ case 2: - _1 = $clone(delims, arrayType); - /* */ if ($equal(_1, ($toNativeArray($kindUint8, [0, 0])), arrayType)) { $s = 8; continue; } - /* */ if ($equal(_1, ($toNativeArray($kindUint8, [123, 125])), arrayType) || $equal(_1, ($toNativeArray($kindUint8, [60, 62])), arrayType)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($equal(_1, ($toNativeArray($kindUint8, [0, 0])), arrayType)) { */ case 8: - arrayType.copy(e.delims, $toNativeArray($kindUint8, [123, 125])); - $s = 11; continue; - /* } else if ($equal(_1, ($toNativeArray($kindUint8, [123, 125])), arrayType) || $equal(_1, ($toNativeArray($kindUint8, [60, 62])), arrayType)) { */ case 9: - arrayType.copy(e.delims, delims); - $s = 11; continue; - /* } else { */ case 10: - _r$2 = errors.New("delimiters may only be \"{}\" or \"<>\"", new sliceType([])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [ptrType.nil, _r$2]; - $s = 13; case 13: return $24r$1; - /* } */ case 11: - case 7: - e.outputASCII = outputASCII; - $s = -1; return [e, $ifaceNil]; - /* */ } return; } var $f = {$blk: NewEncoder, $c: true, $r, $24r, $24r$1, _1, _r$1, _r$2, delims, e, indent, outputASCII, $s};return $f; - }; - $pkg.NewEncoder = NewEncoder; - Encoder.ptr.prototype.Bytes = function() { - var e; - e = this; - return e.encoderState.out; - }; - Encoder.prototype.Bytes = function() { return this.$val.Bytes(); }; - Encoder.ptr.prototype.StartMessage = function() { - var {e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(4); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = $append(e.encoderState.out, e.delims[0]); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.StartMessage, $c: true, $r, e, $s};return $f; - }; - Encoder.prototype.StartMessage = function() { return this.$val.StartMessage(); }; - Encoder.ptr.prototype.EndMessage = function() { - var {e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(8); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = $append(e.encoderState.out, e.delims[1]); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.EndMessage, $c: true, $r, e, $s};return $f; - }; - Encoder.prototype.EndMessage = function() { return this.$val.EndMessage(); }; - Encoder.ptr.prototype.WriteName = function(s) { - var {e, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = $appendSlice(e.encoderState.out, s); - e.encoderState.out = $append(e.encoderState.out, 58); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteName, $c: true, $r, e, s, $s};return $f; - }; - Encoder.prototype.WriteName = function(s) { return this.$val.WriteName(s); }; - Encoder.ptr.prototype.WriteBool = function(b) { - var {b, e, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - /* */ if (b) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (b) { */ case 1: - $r = e.WriteLiteral("true"); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = e.WriteLiteral("false"); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteBool, $c: true, $r, b, e, $s};return $f; - }; - Encoder.prototype.WriteBool = function(b) { return this.$val.WriteBool(b); }; - Encoder.ptr.prototype.WriteString = function(s) { - var {e, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(2); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = appendString(e.encoderState.out, s, e.outputASCII); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteString, $c: true, $r, e, s, $s};return $f; - }; - Encoder.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - appendString = function(out, in$1, outputASCII) { - var _1, _2, _q, _q$1, _q$2, _q$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, i, i$1, in$1, n, out, outputASCII, r; - out = $append(out, 34); - i = indexNeedEscapeInString(in$1); - _tmp = $substring(in$1, i); - _tmp$1 = $appendSlice(out, $substring(in$1, 0, i)); - in$1 = _tmp; - out = _tmp$1; - while (true) { - if (!(in$1.length > 0)) { break; } - _tuple = utf8.DecodeRuneInString(in$1); - r = _tuple[0]; - n = _tuple[1]; - if ((r === 65533) && (n === 1)) { - r = ((in$1.charCodeAt(0) >> 0)); - out = $append(out, 92); - _1 = r; - if ((_1 === (34)) || (_1 === (92))) { - out = $append(out, ((r << 24 >>> 24))); - } else if (_1 === (10)) { - out = $append(out, 110); - } else if (_1 === (13)) { - out = $append(out, 114); - } else if (_1 === (9)) { - out = $append(out, 116); - } else { - out = $append(out, 120); - out = $appendSlice(out, $substring("00", (1 + (_q = ((bits.Len32(((r >>> 0))) - 1 >> 0)) / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0))); - out = strconv.AppendUint(out, (new $Uint64(0, r)), 16); - } - in$1 = $substring(in$1, n); - } else if (r < 32 || (r === 34) || (r === 92) || (r === 127)) { - out = $append(out, 92); - _2 = r; - if ((_2 === (34)) || (_2 === (92))) { - out = $append(out, ((r << 24 >>> 24))); - } else if (_2 === (10)) { - out = $append(out, 110); - } else if (_2 === (13)) { - out = $append(out, 114); - } else if (_2 === (9)) { - out = $append(out, 116); - } else { - out = $append(out, 120); - out = $appendSlice(out, $substring("00", (1 + (_q$1 = ((bits.Len32(((r >>> 0))) - 1 >> 0)) / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0))); - out = strconv.AppendUint(out, (new $Uint64(0, r)), 16); - } - in$1 = $substring(in$1, n); - } else if (r >= 128 && (outputASCII || r <= 159)) { - out = $append(out, 92); - if (r <= 65535) { - out = $append(out, 117); - out = $appendSlice(out, $substring("0000", (1 + (_q$2 = ((bits.Len32(((r >>> 0))) - 1 >> 0)) / 4, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0))); - out = strconv.AppendUint(out, (new $Uint64(0, r)), 16); - } else { - out = $append(out, 85); - out = $appendSlice(out, $substring("00000000", (1 + (_q$3 = ((bits.Len32(((r >>> 0))) - 1 >> 0)) / 4, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0))); - out = strconv.AppendUint(out, (new $Uint64(0, r)), 16); - } - in$1 = $substring(in$1, n); - } else { - i$1 = indexNeedEscapeInString($substring(in$1, n)); - _tmp$2 = $substring(in$1, (n + i$1 >> 0)); - _tmp$3 = $appendSlice(out, $substring(in$1, 0, (n + i$1 >> 0))); - in$1 = _tmp$2; - out = _tmp$3; - } - } - out = $append(out, 34); - return out; - }; - indexNeedEscapeInString = function(s) { - var c, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (c < 32 || (c === 34) || (c === 39) || (c === 92) || c >= 127) { - return i; - } - i = i + (1) >> 0; - } - return s.length; - }; - Encoder.ptr.prototype.WriteFloat = function(n, bitSize) { - var {bitSize, e, n, $s, $r, $c} = $restore(this, {n, bitSize}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(2); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = appendFloat(e.encoderState.out, n, bitSize); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteFloat, $c: true, $r, bitSize, e, n, $s};return $f; - }; - Encoder.prototype.WriteFloat = function(n, bitSize) { return this.$val.WriteFloat(n, bitSize); }; - appendFloat = function(out, n, bitSize) { - var bitSize, n, out; - if (math.IsNaN(n)) { - return $appendSlice(out, "nan"); - } else if (math.IsInf(n, 1)) { - return $appendSlice(out, "inf"); - } else if (math.IsInf(n, -1)) { - return $appendSlice(out, "-inf"); - } else { - return strconv.AppendFloat(out, n, 103, -1, bitSize); - } - }; - Encoder.ptr.prototype.WriteInt = function(n) { - var {e, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(2); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = $appendSlice(e.encoderState.out, strconv.FormatInt(n, 10)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteInt, $c: true, $r, e, n, $s};return $f; - }; - Encoder.prototype.WriteInt = function(n) { return this.$val.WriteInt(n); }; - Encoder.ptr.prototype.WriteUint = function(n) { - var {e, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(2); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = $appendSlice(e.encoderState.out, strconv.FormatUint(n, 10)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteUint, $c: true, $r, e, n, $s};return $f; - }; - Encoder.prototype.WriteUint = function(n) { return this.$val.WriteUint(n); }; - Encoder.ptr.prototype.WriteLiteral = function(s) { - var {e, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = e.prepareNext(2); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.encoderState.out = $appendSlice(e.encoderState.out, s); - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteLiteral, $c: true, $r, e, s, $s};return $f; - }; - Encoder.prototype.WriteLiteral = function(s) { return this.$val.WriteLiteral(s); }; - Encoder.ptr.prototype.prepareNext = function(next) { - var {e, next, $s, $deferred, $r, $c} = $restore(this, {next}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - e = [e]; - next = [next]; - e[0] = this; - $deferred.push([(function(e, next) { return function() { - e[0].encoderState.lastType = next[0]; - }; })(e, next), []]); - /* */ if (e[0].indent.length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (e[0].indent.length === 0) { */ case 1: - if (!((((e[0].encoderState.lastType & 10) >>> 0) === 0)) && (next[0] === 1)) { - e[0].encoderState.out = $append(e[0].encoderState.out, 32); - if (detrand.Bool()) { - e[0].encoderState.out = $append(e[0].encoderState.out, 32); - } - } - $s = 3; case 3: return; - /* } */ case 2: - if ((e[0].encoderState.lastType === 1)) { - e[0].encoderState.out = $append(e[0].encoderState.out, 32); - if (detrand.Bool()) { - e[0].encoderState.out = $append(e[0].encoderState.out, 32); - } - } else if ((e[0].encoderState.lastType === 4) && !((next[0] === 8))) { - e[0].encoderState.indents = $appendSlice(e[0].encoderState.indents, e[0].indent); - e[0].encoderState.out = $append(e[0].encoderState.out, 10); - e[0].encoderState.out = $appendSlice(e[0].encoderState.out, e[0].encoderState.indents); - } else if (!((((e[0].encoderState.lastType & 10) >>> 0) === 0))) { - if (next[0] === 8) { - e[0].encoderState.indents = $subslice(e[0].encoderState.indents, 0, (e[0].encoderState.indents.$length - e[0].indent.length >> 0)); - } - e[0].encoderState.out = $append(e[0].encoderState.out, 10); - e[0].encoderState.out = $appendSlice(e[0].encoderState.out, e[0].encoderState.indents); - } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Encoder.ptr.prototype.prepareNext, $c: true, $r, e, next, $s, $deferred};return $f; } } - }; - Encoder.prototype.prepareNext = function(next) { return this.$val.prepareNext(next); }; - Encoder.ptr.prototype.Snapshot = function() { - var e; - e = this; - return e.encoderState; - }; - Encoder.prototype.Snapshot = function() { return this.$val.Snapshot(); }; - Encoder.ptr.prototype.Reset = function(es) { - var e, es; - e = this; - encoderState.copy(e.encoderState, es); - }; - Encoder.prototype.Reset = function(es) { return this.$val.Reset(es); }; - Kind.prototype.String = function() { - var {$24r, _1, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this.$val; - _1 = t; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ if (_1 === (4)) { $s = 6; continue; } - /* */ if (_1 === (5)) { $s = 7; continue; } - /* */ if (_1 === (6)) { $s = 8; continue; } - /* */ if (_1 === (7)) { $s = 9; continue; } - /* */ if (_1 === (8)) { $s = 10; continue; } - /* */ if (_1 === (9)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_1 === (0)) { */ case 2: - $s = -1; return ""; - /* } else if (_1 === (1)) { */ case 3: - $s = -1; return "eof"; - /* } else if (_1 === (3)) { */ case 4: - $s = -1; return "scalar"; - /* } else if (_1 === (2)) { */ case 5: - $s = -1; return "name"; - /* } else if (_1 === (4)) { */ case 6: - $s = -1; return "{"; - /* } else if (_1 === (5)) { */ case 7: - $s = -1; return "}"; - /* } else if (_1 === (6)) { */ case 8: - $s = -1; return "["; - /* } else if (_1 === (7)) { */ case 9: - $s = -1; return "]"; - /* } else if (_1 === (8)) { */ case 10: - $s = -1; return ","; - /* } else if (_1 === (9)) { */ case 11: - $s = -1; return ";"; - /* } else { */ case 12: - _r$1 = fmt.Sprintf("", new sliceType([new $Uint8(((t << 24 >>> 24)))])); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 15; case 15: return $24r; - /* } */ case 13: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Kind.prototype.String, $c: true, $r, $24r, _1, _r$1, t, $s};return $f; - }; - $ptrType(Kind).prototype.String = function() { return new Kind(this.$get()).String(); }; - NameKind.prototype.String = function() { - var {$24r, _1, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this.$val; - _1 = t; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return "IdentName"; - /* } else if (_1 === (2)) { */ case 3: - $s = -1; return "TypeName"; - /* } else if (_1 === (3)) { */ case 4: - $s = -1; return "FieldNumber"; - /* } else { */ case 5: - _r$1 = fmt.Sprintf("", new sliceType([new $Uint8(((t << 24 >>> 24)))])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: NameKind.prototype.String, $c: true, $r, $24r, _1, _r$1, t, $s};return $f; - }; - $ptrType(NameKind).prototype.String = function() { return new NameKind(this.$get()).String(); }; - Token.ptr.prototype.Kind = function() { - var t; - t = this; - return t.kind; - }; - Token.prototype.Kind = function() { return this.$val.Kind(); }; - Token.ptr.prototype.RawString = function() { - var t; - t = this; - return ($bytesToString(t.raw)); - }; - Token.prototype.RawString = function() { return this.$val.RawString(); }; - Token.ptr.prototype.Pos = function() { - var t; - t = this; - return t.pos; - }; - Token.prototype.Pos = function() { return this.$val.Pos(); }; - Token.ptr.prototype.NameKind = function() { - var {_r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (t.kind === 2) { - $s = -1; return ((((t.attrs & ~128) << 24 >>> 24) << 24 >>> 24)); - } - _r$1 = fmt.Sprintf("Token is not a Name type: %s", new sliceType([new Kind(t.kind)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Token.ptr.prototype.NameKind, $c: true, $r, _r$1, t, $s};return $f; - }; - Token.prototype.NameKind = function() { return this.$val.NameKind(); }; - Token.ptr.prototype.HasSeparator = function() { - var {_r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (t.kind === 2) { - $s = -1; return !((((t.attrs & 128) >>> 0) === 0)); - } - _r$1 = fmt.Sprintf("Token is not a Name type: %s", new sliceType([new Kind(t.kind)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return false; - /* */ } return; } var $f = {$blk: Token.ptr.prototype.HasSeparator, $c: true, $r, _r$1, t, $s};return $f; - }; - Token.prototype.HasSeparator = function() { return this.$val.HasSeparator(); }; - Token.ptr.prototype.IdentName = function() { - var {_r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ((t.kind === 2) && !((((t.attrs & 1) >>> 0) === 0))) { - $s = -1; return ($bytesToString(t.raw)); - } - _r$1 = fmt.Sprintf("Token is not an IdentName: %s:%s", new sliceType([new Kind(t.kind), new NameKind(((((t.attrs & ~128) << 24 >>> 24) << 24 >>> 24)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Token.ptr.prototype.IdentName, $c: true, $r, _r$1, t, $s};return $f; - }; - Token.prototype.IdentName = function() { return this.$val.IdentName(); }; - Token.ptr.prototype.TypeName = function() { - var {_r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ((t.kind === 2) && !((((t.attrs & 2) >>> 0) === 0))) { - $s = -1; return t.str; - } - _r$1 = fmt.Sprintf("Token is not a TypeName: %s:%s", new sliceType([new Kind(t.kind), new NameKind(((((t.attrs & ~128) << 24 >>> 24) << 24 >>> 24)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Token.ptr.prototype.TypeName, $c: true, $r, _r$1, t, $s};return $f; - }; - Token.prototype.TypeName = function() { return this.$val.TypeName(); }; - Token.ptr.prototype.FieldNumber = function() { - var {_r$1, _tuple, num, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if (!((t.kind === 2)) || (((t.attrs & 3) >>> 0) === 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((t.kind === 2)) || (((t.attrs & 3) >>> 0) === 0)) { */ case 1: - _r$1 = fmt.Sprintf("Token is not a FieldNumber: %s:%s", new sliceType([new Kind(t.kind), new NameKind(((((t.attrs & ~128) << 24 >>> 24) << 24 >>> 24)))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 2: - _tuple = strconv.ParseInt(($bytesToString(t.raw)), 10, 32); - num = _tuple[0]; - $s = -1; return (((num.$low + ((num.$high >> 31) * 4294967296)) >> 0)); - /* */ } return; } var $f = {$blk: Token.ptr.prototype.FieldNumber, $c: true, $r, _r$1, _tuple, num, t, $s};return $f; - }; - Token.prototype.FieldNumber = function() { return this.$val.FieldNumber(); }; - Token.ptr.prototype.String = function() { - var t; - t = this; - if (!((t.kind === 3)) || !((t.attrs === 2))) { - return ["", false]; - } - return [t.str, true]; - }; - Token.prototype.String = function() { return this.$val.String(); }; - Token.ptr.prototype.Enum = function() { - var t, x; - t = this; - if (!((t.kind === 3)) || !((t.attrs === 3)) || (t.raw.$length > 0 && ((x = t.raw, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 45))) { - return ["", false]; - } - return [($bytesToString(t.raw)), true]; - }; - Token.prototype.Enum = function() { return this.$val.Enum(); }; - Token.ptr.prototype.Bool = function() { - var _1, _2, _entry, _tuple, _tuple$1, b, err, n, ok, t, x, x$1; - t = this; - if (!((t.kind === 3))) { - return [false, false]; - } - _1 = t.attrs; - if (_1 === (3)) { - _tuple = (_entry = boolLits[$String.keyFor(($bytesToString(t.raw)))], _entry !== undefined ? [_entry.v, true] : [false, false]); - b = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return [b, true]; - } - } else if (_1 === (1)) { - _tuple$1 = strconv.ParseUint(t.str, 0, 64); - n = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - _2 = n; - if ((x = new $Uint64(0, 0), (_2.$high === x.$high && _2.$low === x.$low))) { - return [false, true]; - } else if ((x$1 = new $Uint64(0, 1), (_2.$high === x$1.$high && _2.$low === x$1.$low))) { - return [true, true]; - } - } - } - return [false, false]; - }; - Token.prototype.Bool = function() { return this.$val.Bool(); }; - Token.ptr.prototype.Uint64 = function() { - var _tuple, err, n, t; - t = this; - if (!((t.kind === 3)) || !((t.attrs === 1)) || ((t.numAttrs & 128) >>> 0) > 0 || ((t.numAttrs & 4) >>> 0) > 0) { - return [new $Uint64(0, 0), false]; - } - _tuple = strconv.ParseUint(t.str, 0, 64); - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [new $Uint64(0, 0), false]; - } - return [n, true]; - }; - Token.prototype.Uint64 = function() { return this.$val.Uint64(); }; - Token.ptr.prototype.Uint32 = function() { - var _tuple, err, n, t; - t = this; - if (!((t.kind === 3)) || !((t.attrs === 1)) || ((t.numAttrs & 128) >>> 0) > 0 || ((t.numAttrs & 4) >>> 0) > 0) { - return [0, false]; - } - _tuple = strconv.ParseUint(t.str, 0, 32); - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [0, false]; - } - return [((n.$low >>> 0)), true]; - }; - Token.prototype.Uint32 = function() { return this.$val.Uint32(); }; - Token.ptr.prototype.Int64 = function() { - var _tuple, _tuple$1, err, err$1, n, n$1, t; - t = this; - if (!((t.kind === 3)) || !((t.attrs === 1)) || ((t.numAttrs & 4) >>> 0) > 0) { - return [new $Int64(0, 0), false]; - } - _tuple = strconv.ParseInt(t.str, 0, 64); - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - return [n, true]; - } - if (false && ((t.numAttrs === 1))) { - _tuple$1 = strconv.ParseUint(t.str, 0, 64); - n$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - return [(new $Int64(n$1.$high, n$1.$low)), true]; - } - } - return [new $Int64(0, 0), false]; - }; - Token.prototype.Int64 = function() { return this.$val.Int64(); }; - Token.ptr.prototype.Int32 = function() { - var _tuple, _tuple$1, err, err$1, n, n$1, t; - t = this; - if (!((t.kind === 3)) || !((t.attrs === 1)) || ((t.numAttrs & 4) >>> 0) > 0) { - return [0, false]; - } - _tuple = strconv.ParseInt(t.str, 0, 32); - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - return [(((n.$low + ((n.$high >> 31) * 4294967296)) >> 0)), true]; - } - if (false && ((t.numAttrs === 1))) { - _tuple$1 = strconv.ParseUint(t.str, 0, 32); - n$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - return [((n$1.$low >> 0)), true]; - } - } - return [0, false]; - }; - Token.prototype.Int32 = function() { return this.$val.Int32(); }; - Token.ptr.prototype.Float64 = function() { - var {_1, _entry, _r$1, _tuple, _tuple$1, err, f, n, nerr, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!((t.kind === 3))) { - $s = -1; return [0, false]; - } - _1 = t.attrs; - /* */ if (_1 === (3)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (3)) { */ case 2: - _r$1 = strings.ToLower(($bytesToString(t.raw))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = (_entry = floatLits[$String.keyFor(_r$1)], _entry !== undefined ? [_entry.v, true] : [0, false]); - f = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [f, true]; - } - $s = 4; continue; - /* } else if (_1 === (1)) { */ case 3: - _tuple$1 = strconv.ParseFloat(t.str, 64); - n = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return [n, true]; - } - nerr = $assertType(err, ptrType$1); - if ($interfaceIsEqual(nerr.Err, strconv.ErrRange)) { - $s = -1; return [n, true]; - } - /* } */ case 4: - case 1: - $s = -1; return [0, false]; - /* */ } return; } var $f = {$blk: Token.ptr.prototype.Float64, $c: true, $r, _1, _entry, _r$1, _tuple, _tuple$1, err, f, n, nerr, ok, t, $s};return $f; - }; - Token.prototype.Float64 = function() { return this.$val.Float64(); }; - Token.ptr.prototype.Float32 = function() { - var {_1, _entry, _r$1, _tuple, _tuple$1, err, f, n, nerr, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!((t.kind === 3))) { - $s = -1; return [0, false]; - } - _1 = t.attrs; - /* */ if (_1 === (3)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (3)) { */ case 2: - _r$1 = strings.ToLower(($bytesToString(t.raw))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = (_entry = floatLits[$String.keyFor(_r$1)], _entry !== undefined ? [_entry.v, true] : [0, false]); - f = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [($fround(f)), true]; - } - $s = 4; continue; - /* } else if (_1 === (1)) { */ case 3: - _tuple$1 = strconv.ParseFloat(t.str, 64); - n = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return [($fround(n)), true]; - } - nerr = $assertType(err, ptrType$1); - if ($interfaceIsEqual(nerr.Err, strconv.ErrRange)) { - $s = -1; return [($fround(n)), true]; - } - /* } */ case 4: - case 1: - $s = -1; return [0, false]; - /* */ } return; } var $f = {$blk: Token.ptr.prototype.Float32, $c: true, $r, _1, _entry, _r$1, _tuple, _tuple$1, err, f, n, nerr, ok, t, $s};return $f; - }; - Token.prototype.Float32 = function() { return this.$val.Float32(); }; - Decoder.ptr.prototype.parseStringValue = function() { - var {_r$1, _tuple, d, err, in0, s, ss, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - in0 = d.in$5; - ss = sliceType$2.nil; - /* while (true) { */ case 1: - /* if (!(d.in$5.$length > 0 && (((x = d.in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 34) || ((x$1 = d.in$5, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) === 39)))) { break; } */ if(!(d.in$5.$length > 0 && (((x = d.in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 34) || ((x$1 = d.in$5, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) === 39)))) { $s = 2; continue; } - _r$1 = d.parseString(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - s = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), err]; - } - ss = $append(ss, s); - $s = 1; continue; - case 2: - $s = -1; return [new Token.ptr(3, 2, 0, d.orig.$length - in0.$length >> 0, $subslice(in0, 0, (in0.$length - d.in$5.$length >> 0)), strings.Join(ss, "")), $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseStringValue, $c: true, $r, _r$1, _tuple, d, err, in0, s, ss, x, x$1, $s};return $f; - }; - Decoder.prototype.parseStringValue = function() { return this.$val.parseStringValue(); }; - Decoder.ptr.prototype.parseString = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, d, err, err$1, err$2, err$3, i, i$1, in$1, n, n$1, n$2, n$3, out, quote, r, r$1, r$2, v, v$1, v$2, v$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - in$1 = d.in$5; - if (in$1.$length === 0) { - $s = -1; return ["", $pkg.ErrUnexpectedEOF]; - } - quote = (0 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 0]); - in$1 = $subslice(in$1, 1); - i = indexNeedEscapeInBytes(in$1); - _tmp = $subslice(in$1, i); - _tmp$1 = $subslice(in$1, 0, i, i); - in$1 = _tmp; - out = _tmp$1; - /* while (true) { */ case 1: - /* if (!(in$1.$length > 0)) { break; } */ if(!(in$1.$length > 0)) { $s = 2; continue; } - _tuple = utf8.DecodeRune(in$1); - r = _tuple[0]; - n = _tuple[1]; - /* */ if ((r === 65533) && (n === 1)) { $s = 4; continue; } - /* */ if ((r === 0) || (r === 10)) { $s = 5; continue; } - /* */ if ((r === ((quote >> 0)))) { $s = 6; continue; } - /* */ if ((r === 92)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((r === 65533) && (n === 1)) { */ case 4: - _r$1 = d.newSyntaxError("invalid UTF-8 detected", new sliceType([])); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = ["", _r$1]; - $s = 11; case 11: return $24r; - /* } else if ((r === 0) || (r === 10)) { */ case 5: - _r$2 = d.newSyntaxError("invalid character %q in string", new sliceType([new $Int32(r)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = ["", _r$2]; - $s = 13; case 13: return $24r$1; - /* } else if ((r === ((quote >> 0)))) { */ case 6: - in$1 = $subslice(in$1, 1); - d.consume(d.in$5.$length - in$1.$length >> 0); - $s = -1; return [($bytesToString(out)), $ifaceNil]; - /* } else if ((r === 92)) { */ case 7: - if (in$1.$length < 2) { - $s = -1; return ["", $pkg.ErrUnexpectedEOF]; - } - r$1 = (1 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 1]); - _1 = r$1; - /* */ if ((_1 === (34)) || (_1 === (39)) || (_1 === (92)) || (_1 === (63))) { $s = 15; continue; } - /* */ if (_1 === (97)) { $s = 16; continue; } - /* */ if (_1 === (98)) { $s = 17; continue; } - /* */ if (_1 === (110)) { $s = 18; continue; } - /* */ if (_1 === (114)) { $s = 19; continue; } - /* */ if (_1 === (116)) { $s = 20; continue; } - /* */ if (_1 === (118)) { $s = 21; continue; } - /* */ if (_1 === (102)) { $s = 22; continue; } - /* */ if ((_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55))) { $s = 23; continue; } - /* */ if (_1 === (120)) { $s = 24; continue; } - /* */ if ((_1 === (117)) || (_1 === (85))) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if ((_1 === (34)) || (_1 === (39)) || (_1 === (92)) || (_1 === (63))) { */ case 15: - _tmp$2 = $subslice(in$1, 2); - _tmp$3 = $append(out, r$1); - in$1 = _tmp$2; - out = _tmp$3; - $s = 27; continue; - /* } else if (_1 === (97)) { */ case 16: - _tmp$4 = $subslice(in$1, 2); - _tmp$5 = $append(out, 7); - in$1 = _tmp$4; - out = _tmp$5; - $s = 27; continue; - /* } else if (_1 === (98)) { */ case 17: - _tmp$6 = $subslice(in$1, 2); - _tmp$7 = $append(out, 8); - in$1 = _tmp$6; - out = _tmp$7; - $s = 27; continue; - /* } else if (_1 === (110)) { */ case 18: - _tmp$8 = $subslice(in$1, 2); - _tmp$9 = $append(out, 10); - in$1 = _tmp$8; - out = _tmp$9; - $s = 27; continue; - /* } else if (_1 === (114)) { */ case 19: - _tmp$10 = $subslice(in$1, 2); - _tmp$11 = $append(out, 13); - in$1 = _tmp$10; - out = _tmp$11; - $s = 27; continue; - /* } else if (_1 === (116)) { */ case 20: - _tmp$12 = $subslice(in$1, 2); - _tmp$13 = $append(out, 9); - in$1 = _tmp$12; - out = _tmp$13; - $s = 27; continue; - /* } else if (_1 === (118)) { */ case 21: - _tmp$14 = $subslice(in$1, 2); - _tmp$15 = $append(out, 11); - in$1 = _tmp$14; - out = _tmp$15; - $s = 27; continue; - /* } else if (_1 === (102)) { */ case 22: - _tmp$16 = $subslice(in$1, 2); - _tmp$17 = $append(out, 12); - in$1 = _tmp$16; - out = _tmp$17; - $s = 27; continue; - /* } else if ((_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55))) { */ case 23: - n$1 = $subslice(in$1, 1).$length - bytes.TrimLeft($subslice(in$1, 1), "01234567").$length >> 0; - if (n$1 > 3) { - n$1 = 3; - } - _tuple$1 = strconv.ParseUint(($bytesToString($subslice(in$1, 1, (1 + n$1 >> 0)))), 8, 8); - v = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 28: - _r$3 = d.newSyntaxError("invalid octal escape code %q in string", new sliceType([$subslice(in$1, 0, (1 + n$1 >> 0))])); /* */ $s = 30; case 30: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = ["", _r$3]; - $s = 31; case 31: return $24r$2; - /* } */ case 29: - _tmp$18 = $subslice(in$1, (1 + n$1 >> 0)); - _tmp$19 = $append(out, ((v.$low << 24 >>> 24))); - in$1 = _tmp$18; - out = _tmp$19; - $s = 27; continue; - /* } else if (_1 === (120)) { */ case 24: - n$2 = $subslice(in$1, 2).$length - bytes.TrimLeft($subslice(in$1, 2), "0123456789abcdefABCDEF").$length >> 0; - if (n$2 > 2) { - n$2 = 2; - } - _tuple$2 = strconv.ParseUint(($bytesToString($subslice(in$1, 2, (2 + n$2 >> 0)))), 16, 8); - v$1 = _tuple$2[0]; - err$1 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 32: - _r$4 = d.newSyntaxError("invalid hex escape code %q in string", new sliceType([$subslice(in$1, 0, (2 + n$2 >> 0))])); /* */ $s = 34; case 34: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$3 = ["", _r$4]; - $s = 35; case 35: return $24r$3; - /* } */ case 33: - _tmp$20 = $subslice(in$1, (2 + n$2 >> 0)); - _tmp$21 = $append(out, ((v$1.$low << 24 >>> 24))); - in$1 = _tmp$20; - out = _tmp$21; - $s = 27; continue; - /* } else if ((_1 === (117)) || (_1 === (85))) { */ case 25: - n$3 = 6; - if (r$1 === 85) { - n$3 = 10; - } - if (in$1.$length < n$3) { - $s = -1; return ["", $pkg.ErrUnexpectedEOF]; - } - _tuple$3 = strconv.ParseUint(($bytesToString($subslice(in$1, 2, n$3))), 16, 32); - v$2 = _tuple$3[0]; - err$2 = _tuple$3[1]; - /* */ if ((0 < v$2.$high || (0 === v$2.$high && 1114111 < v$2.$low)) || !($interfaceIsEqual(err$2, $ifaceNil))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if ((0 < v$2.$high || (0 === v$2.$high && 1114111 < v$2.$low)) || !($interfaceIsEqual(err$2, $ifaceNil))) { */ case 36: - _r$5 = d.newSyntaxError("invalid Unicode escape code %q in string", new sliceType([$subslice(in$1, 0, n$3)])); /* */ $s = 38; case 38: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$4 = ["", _r$5]; - $s = 39; case 39: return $24r$4; - /* } */ case 37: - in$1 = $subslice(in$1, n$3); - r$2 = ((v$2.$low >> 0)); - /* */ if (utf16.IsSurrogate(r$2)) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (utf16.IsSurrogate(r$2)) { */ case 40: - if (in$1.$length < 6) { - $s = -1; return ["", $pkg.ErrUnexpectedEOF]; - } - _tuple$4 = strconv.ParseUint(($bytesToString($subslice(in$1, 2, 6))), 16, 16); - v$3 = _tuple$4[0]; - err$3 = _tuple$4[1]; - r$2 = utf16.DecodeRune(r$2, ((v$3.$low >> 0))); - /* */ if (!(((0 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 0]) === 92)) || !(((1 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 1]) === 117)) || (r$2 === 65533) || !($interfaceIsEqual(err$3, $ifaceNil))) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (!(((0 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 0]) === 92)) || !(((1 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 1]) === 117)) || (r$2 === 65533) || !($interfaceIsEqual(err$3, $ifaceNil))) { */ case 42: - _r$6 = d.newSyntaxError("invalid Unicode escape code %q in string", new sliceType([$subslice(in$1, 0, 6)])); /* */ $s = 44; case 44: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$5 = ["", _r$6]; - $s = 45; case 45: return $24r$5; - /* } */ case 43: - in$1 = $subslice(in$1, 6); - /* } */ case 41: - out = $appendSlice(out, ($encodeRune(r$2))); - $s = 27; continue; - /* } else { */ case 26: - _r$7 = d.newSyntaxError("invalid escape code %q in string", new sliceType([$subslice(in$1, 0, 2)])); /* */ $s = 46; case 46: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$6 = ["", _r$7]; - $s = 47; case 47: return $24r$6; - /* } */ case 27: - case 14: - $s = 9; continue; - /* } else { */ case 8: - i$1 = indexNeedEscapeInBytes($subslice(in$1, n)); - _tmp$22 = $subslice(in$1, (n + i$1 >> 0)); - _tmp$23 = $appendSlice(out, $subslice(in$1, 0, (n + i$1 >> 0))); - in$1 = _tmp$22; - out = _tmp$23; - /* } */ case 9: - case 3: - $s = 1; continue; - case 2: - $s = -1; return ["", $pkg.ErrUnexpectedEOF]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseString, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, d, err, err$1, err$2, err$3, i, i$1, in$1, n, n$1, n$2, n$3, out, quote, r, r$1, r$2, v, v$1, v$2, v$3, $s};return $f; - }; - Decoder.prototype.parseString = function() { return this.$val.parseString(); }; - indexNeedEscapeInBytes = function(b) { - var b; - return indexNeedEscapeInString(strs.UnsafeString(b)); - }; - UnmarshalString = function(s) { - var {$24r, _r$1, d, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = NewDecoder((new sliceType$1($stringToBytes(s)))); - _r$1 = d.parseString(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: UnmarshalString, $c: true, $r, $24r, _r$1, d, s, $s};return $f; - }; - $pkg.UnmarshalString = UnmarshalString; - Decoder.ptr.prototype.parseNumberValue = function() { - var d, in$1, last, num, numAttrs, strSize, tok, x, x$1; - d = this; - in$1 = d.in$5; - num = $clone(parseNumber(in$1), number); - if (num.size === 0) { - return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), false]; - } - numAttrs = num.kind; - if (num.neg) { - numAttrs = (numAttrs | (128)) >>> 0; - } - strSize = num.size; - last = num.size - 1 >> 0; - if ((num.kind === 4) && (((x = d.in$5, ((last < 0 || last >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + last])) === 102) || ((x$1 = d.in$5, ((last < 0 || last >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + last])) === 70))) { - strSize = last; - } - tok = new Token.ptr(3, 1, numAttrs, d.orig.$length - d.in$5.$length >> 0, $subslice(d.in$5, 0, num.size), ($bytesToString($subslice(d.in$5, 0, strSize)))); - d.consume(num.size); - return [tok, true]; - }; - Decoder.prototype.parseNumberValue = function() { return this.$val.parseNumberValue(); }; - parseNumber = function(input) { - var input, kind, n, n$1, n$2, n$3, n$4, neg, s, size; - kind = 0; - size = 0; - neg = false; - s = input; - if (s.$length === 0) { - return new number.ptr(0, false, 0); - } - if ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 45) { - neg = true; - s = $subslice(s, 1); - size = size + (1) >> 0; - if (s.$length === 0) { - return new number.ptr(0, false, 0); - } - } - if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48)) { - if (s.$length > 1) { - if (((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 120) || ((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 88)) { - kind = 1; - n = 2; - s = $subslice(s, 2); - while (true) { - if (!(s.$length > 0 && ((48 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 57) || (97 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 102) || (65 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 70)))) { break; } - s = $subslice(s, 1); - n = n + (1) >> 0; - } - if (n === 2) { - return new number.ptr(0, false, 0); - } - size = size + (n) >> 0; - } else if (48 <= (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) && (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) <= 55) { - kind = 2; - n$1 = 2; - s = $subslice(s, 2); - while (true) { - if (!(s.$length > 0 && 48 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 55)) { break; } - s = $subslice(s, 1); - n$1 = n$1 + (1) >> 0; - } - size = size + (n$1) >> 0; - } - if (((kind & 3) >>> 0) > 0) { - if (s.$length > 0 && !isDelim((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]))) { - return new number.ptr(0, false, 0); - } - return new number.ptr(kind, neg, size); - } - } - s = $subslice(s, 1); - size = size + (1) >> 0; - } else if (49 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 57) { - n$2 = 1; - s = $subslice(s, 1); - while (true) { - if (!(s.$length > 0 && 48 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 57)) { break; } - s = $subslice(s, 1); - n$2 = n$2 + (1) >> 0; - } - size = size + (n$2) >> 0; - } else if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 46)) { - kind = 4; - } else { - return new number.ptr(0, false, 0); - } - if (s.$length > 0 && ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 46)) { - n$3 = 1; - s = $subslice(s, 1); - if ((s.$length === 0) && (kind === 4)) { - return new number.ptr(0, false, 0); - } - while (true) { - if (!(s.$length > 0 && 48 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 57)) { break; } - s = $subslice(s, 1); - n$3 = n$3 + (1) >> 0; - } - size = size + (n$3) >> 0; - kind = 4; - } - if (s.$length >= 2 && (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 101) || ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 69))) { - kind = 4; - s = $subslice(s, 1); - n$4 = 1; - if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 43) || ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 45)) { - s = $subslice(s, 1); - n$4 = n$4 + (1) >> 0; - if (s.$length === 0) { - return new number.ptr(0, false, 0); - } - } - while (true) { - if (!(s.$length > 0 && 48 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 57)) { break; } - s = $subslice(s, 1); - n$4 = n$4 + (1) >> 0; - } - size = size + (n$4) >> 0; - } - if (s.$length > 0 && (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 102) || ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 70))) { - kind = 4; - s = $subslice(s, 1); - size = size + (1) >> 0; - } - if (s.$length > 0 && !isDelim((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]))) { - return new number.ptr(0, false, 0); - } - return new number.ptr(kind, neg, size); - }; - NewDecoder = function(b) { - var b; - return new Decoder.ptr(0, new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $ifaceNil, sliceType$1.nil, b, b); - }; - $pkg.NewDecoder = NewDecoder; - Decoder.ptr.prototype.Peek = function() { - var {$24r, _r$1, _tuple, d, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - d = [d]; - d[0] = this; - $deferred.push([(function(d) { return function() { - d[0].lastCall = 1; - }; })(d), []]); - /* */ if (d[0].lastCall === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d[0].lastCall === 0) { */ case 1: - _r$1 = d[0].Read(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - Token.copy(d[0].lastToken, _tuple[0]); - d[0].lastErr = _tuple[1]; - /* } */ case 2: - $24r = [d[0].lastToken, d[0].lastErr]; - $s = 4; case 4: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Decoder.ptr.prototype.Peek, $c: true, $r, $24r, _r$1, _tuple, d, $s, $deferred};return $f; } } - }; - Decoder.prototype.Peek = function() { return this.$val.Peek(); }; - Decoder.ptr.prototype.Read = function() { - var {$24r, $24r$1, $24r$2, $24r$3, _1, _r$1, _r$2, _tuple, _tuple$1, d, err, tok, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - d = [d]; - d[0] = this; - $deferred.push([(function(d) { return function() { - d[0].lastCall = 0; - }; })(d), []]); - /* */ if (d[0].lastCall === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d[0].lastCall === 1) { */ case 1: - $24r = [d[0].lastToken, d[0].lastErr]; - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = d[0].parseNext(d[0].lastToken.kind); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - tok = $clone(_tuple[0], Token); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - $24r$1 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), err]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - _1 = tok.kind; - /* */ if ((_1 === (8)) || (_1 === (9))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ((_1 === (8)) || (_1 === (9))) { */ case 9: - _r$2 = d[0].parseNext(tok.kind); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - Token.copy(tok, _tuple$1[0]); - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 12: - $24r$2 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), err]; - $s = 14; case 14: return $24r$2; - /* } */ case 13: - /* } */ case 10: - case 8: - Token.copy(d[0].lastToken, tok); - $24r$3 = [tok, $ifaceNil]; - $s = 15; case 15: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Decoder.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _1, _r$1, _r$2, _tuple, _tuple$1, d, err, tok, $s, $deferred};return $f; } } - }; - Decoder.prototype.Read = function() { return this.$val.Read(); }; - Decoder.ptr.prototype.parseNext = function(lastKind) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$16, $24r$17, $24r$18, $24r$19, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _10, _11, _12, _13, _14, _15, _16, _17, _18, _2, _3, _4, _5, _6, _7, _8, _9, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, ch, ch$1, ch$10, ch$11, ch$2, ch$3, ch$4, ch$5, ch$6, ch$7, ch$8, ch$9, closeCh, closeCh$1, closeCh$2, closeCh$3, closeCh$4, column, d, isEOF, lastKind, line, openKind, openKind$1, openKind$2, openKind$3, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {lastKind}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - d.consume(0); - isEOF = false; - if (d.in$5.$length === 0) { - isEOF = true; - } - _1 = lastKind; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (0)) { $s = 3; continue; } - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ if (_1 === (3)) { $s = 5; continue; } - /* */ if (_1 === (4)) { $s = 6; continue; } - /* */ if (_1 === (5)) { $s = 7; continue; } - /* */ if (_1 === (6)) { $s = 8; continue; } - /* */ if (_1 === (7)) { $s = 9; continue; } - /* */ if ((_1 === (8)) || (_1 === (9))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return [d.consumeToken(1, 0, 0), $ifaceNil]; - /* } else if (_1 === (0)) { */ case 3: - if (isEOF) { - $s = -1; return [d.consumeToken(1, 0, 0), $ifaceNil]; - } - _r$1 = d.parseFieldName(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 13; case 13: return $24r; - /* } else if (_1 === (2)) { */ case 4: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch = (x = d.in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - _2 = ch; - /* */ if ((_2 === (123)) || (_2 === (60))) { $s = 15; continue; } - /* */ if (_2 === (91)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if ((_2 === (123)) || (_2 === (60))) { */ case 15: - d.pushOpenStack(ch); - $s = -1; return [d.consumeToken(4, 1, 0), $ifaceNil]; - /* } else if (_2 === (91)) { */ case 16: - d.pushOpenStack(ch); - $s = -1; return [d.consumeToken(6, 1, 0), $ifaceNil]; - /* } else { */ case 17: - _r$2 = d.parseScalar(); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 20; case 20: return $24r$1; - /* } */ case 18: - case 14: - $s = 11; continue; - /* } else if (_1 === (3)) { */ case 5: - _r$3 = d.currentOpenKind(); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - openKind = _tuple[0]; - closeCh = _tuple[1]; - _3 = openKind; - /* */ if (_3 === (0)) { $s = 23; continue; } - /* */ if (_3 === (4)) { $s = 24; continue; } - /* */ if (_3 === (6)) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_3 === (0)) { */ case 23: - if (isEOF) { - $s = -1; return [d.consumeToken(1, 0, 0), $ifaceNil]; - } - _4 = (x$1 = d.in$5, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - /* */ if (_4 === (44)) { $s = 28; continue; } - /* */ if (_4 === (59)) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_4 === (44)) { */ case 28: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else if (_4 === (59)) { */ case 29: - $s = -1; return [d.consumeToken(9, 1, 0), $ifaceNil]; - /* } else { */ case 30: - _r$4 = d.parseFieldName(); /* */ $s = 32; case 32: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 33; case 33: return $24r$2; - /* } */ case 31: - case 27: - $s = 26; continue; - /* } else if (_3 === (4)) { */ case 24: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$1 = (x$2 = d.in$5, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])); - _5 = ch$1; - /* */ if (_5 === (closeCh)) { $s = 35; continue; } - /* */ if (_5 === ((_entry = otherCloseChar[$Uint8.keyFor(closeCh)], _entry !== undefined ? _entry.v : 0))) { $s = 36; continue; } - /* */ if (_5 === (44)) { $s = 37; continue; } - /* */ if (_5 === (59)) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (_5 === (closeCh)) { */ case 35: - d.popOpenStack(); - $s = -1; return [d.consumeToken(5, 1, 0), $ifaceNil]; - /* } else if (_5 === ((_entry = otherCloseChar[$Uint8.keyFor(closeCh)], _entry !== undefined ? _entry.v : 0))) { */ case 36: - _r$5 = d.newSyntaxError("mismatched close character %q", new sliceType([new $Uint8(ch$1)])); /* */ $s = 41; case 41: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$3 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$5]; - $s = 42; case 42: return $24r$3; - /* } else if (_5 === (44)) { */ case 37: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else if (_5 === (59)) { */ case 38: - $s = -1; return [d.consumeToken(9, 1, 0), $ifaceNil]; - /* } else { */ case 39: - _r$6 = d.parseFieldName(); /* */ $s = 43; case 43: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$4 = _r$6; - $s = 44; case 44: return $24r$4; - /* } */ case 40: - case 34: - $s = 26; continue; - /* } else if (_3 === (6)) { */ case 25: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$2 = (x$3 = d.in$5, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])); - _6 = ch$2; - /* */ if (_6 === (93)) { $s = 46; continue; } - /* */ if (_6 === (44)) { $s = 47; continue; } - /* */ $s = 48; continue; - /* if (_6 === (93)) { */ case 46: - d.popOpenStack(); - $s = -1; return [d.consumeToken(7, 1, 0), $ifaceNil]; - /* } else if (_6 === (44)) { */ case 47: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else { */ case 48: - _r$7 = d.newSyntaxError("unexpected character %q", new sliceType([new $Uint8(ch$2)])); /* */ $s = 50; case 50: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$5 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$7]; - $s = 51; case 51: return $24r$5; - /* } */ case 49: - case 45: - /* } */ case 26: - case 22: - $s = 11; continue; - /* } else if (_1 === (4)) { */ case 6: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - _r$8 = d.currentOpenKind(); /* */ $s = 52; case 52: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - closeCh$1 = _tuple$1[1]; - ch$3 = (x$4 = d.in$5, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])); - _7 = ch$3; - /* */ if (_7 === (closeCh$1)) { $s = 54; continue; } - /* */ if (_7 === ((_entry$1 = otherCloseChar[$Uint8.keyFor(closeCh$1)], _entry$1 !== undefined ? _entry$1.v : 0))) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if (_7 === (closeCh$1)) { */ case 54: - d.popOpenStack(); - $s = -1; return [d.consumeToken(5, 1, 0), $ifaceNil]; - /* } else if (_7 === ((_entry$1 = otherCloseChar[$Uint8.keyFor(closeCh$1)], _entry$1 !== undefined ? _entry$1.v : 0))) { */ case 55: - _r$9 = d.newSyntaxError("mismatched close character %q", new sliceType([new $Uint8(ch$3)])); /* */ $s = 58; case 58: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$6 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$9]; - $s = 59; case 59: return $24r$6; - /* } else { */ case 56: - _r$10 = d.parseFieldName(); /* */ $s = 60; case 60: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$7 = _r$10; - $s = 61; case 61: return $24r$7; - /* } */ case 57: - case 53: - $s = 11; continue; - /* } else if (_1 === (5)) { */ case 7: - _r$11 = d.currentOpenKind(); /* */ $s = 62; case 62: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$2 = _r$11; - openKind$1 = _tuple$2[0]; - closeCh$2 = _tuple$2[1]; - _8 = openKind$1; - /* */ if (_8 === (0)) { $s = 64; continue; } - /* */ if (_8 === (4)) { $s = 65; continue; } - /* */ if (_8 === (6)) { $s = 66; continue; } - /* */ $s = 67; continue; - /* if (_8 === (0)) { */ case 64: - if (isEOF) { - $s = -1; return [d.consumeToken(1, 0, 0), $ifaceNil]; - } - ch$4 = (x$5 = d.in$5, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])); - _9 = ch$4; - /* */ if (_9 === (44)) { $s = 69; continue; } - /* */ if (_9 === (59)) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if (_9 === (44)) { */ case 69: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else if (_9 === (59)) { */ case 70: - $s = -1; return [d.consumeToken(9, 1, 0), $ifaceNil]; - /* } else { */ case 71: - _r$12 = d.parseFieldName(); /* */ $s = 73; case 73: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$8 = _r$12; - $s = 74; case 74: return $24r$8; - /* } */ case 72: - case 68: - $s = 67; continue; - /* } else if (_8 === (4)) { */ case 65: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$5 = (x$6 = d.in$5, (0 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 0])); - _10 = ch$5; - /* */ if (_10 === (closeCh$2)) { $s = 76; continue; } - /* */ if (_10 === ((_entry$2 = otherCloseChar[$Uint8.keyFor(closeCh$2)], _entry$2 !== undefined ? _entry$2.v : 0))) { $s = 77; continue; } - /* */ if (_10 === (44)) { $s = 78; continue; } - /* */ if (_10 === (59)) { $s = 79; continue; } - /* */ $s = 80; continue; - /* if (_10 === (closeCh$2)) { */ case 76: - d.popOpenStack(); - $s = -1; return [d.consumeToken(5, 1, 0), $ifaceNil]; - /* } else if (_10 === ((_entry$2 = otherCloseChar[$Uint8.keyFor(closeCh$2)], _entry$2 !== undefined ? _entry$2.v : 0))) { */ case 77: - _r$13 = d.newSyntaxError("mismatched close character %q", new sliceType([new $Uint8(ch$5)])); /* */ $s = 82; case 82: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$9 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$13]; - $s = 83; case 83: return $24r$9; - /* } else if (_10 === (44)) { */ case 78: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else if (_10 === (59)) { */ case 79: - $s = -1; return [d.consumeToken(9, 1, 0), $ifaceNil]; - /* } else { */ case 80: - _r$14 = d.parseFieldName(); /* */ $s = 84; case 84: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$10 = _r$14; - $s = 85; case 85: return $24r$10; - /* } */ case 81: - case 75: - $s = 67; continue; - /* } else if (_8 === (6)) { */ case 66: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$6 = (x$7 = d.in$5, (0 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 0])); - _11 = ch$6; - /* */ if (_11 === (closeCh$2)) { $s = 87; continue; } - /* */ if (_11 === (44)) { $s = 88; continue; } - /* */ $s = 89; continue; - /* if (_11 === (closeCh$2)) { */ case 87: - d.popOpenStack(); - $s = -1; return [d.consumeToken(7, 1, 0), $ifaceNil]; - /* } else if (_11 === (44)) { */ case 88: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else { */ case 89: - _r$15 = d.newSyntaxError("unexpected character %q", new sliceType([new $Uint8(ch$6)])); /* */ $s = 91; case 91: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$11 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$15]; - $s = 92; case 92: return $24r$11; - /* } */ case 90: - case 86: - /* } */ case 67: - case 63: - $s = 11; continue; - /* } else if (_1 === (6)) { */ case 8: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$7 = (x$8 = d.in$5, (0 >= x$8.$length ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + 0])); - _12 = ch$7; - /* */ if (_12 === (93)) { $s = 94; continue; } - /* */ if ((_12 === (123)) || (_12 === (60))) { $s = 95; continue; } - /* */ $s = 96; continue; - /* if (_12 === (93)) { */ case 94: - d.popOpenStack(); - $s = -1; return [d.consumeToken(7, 1, 0), $ifaceNil]; - /* } else if ((_12 === (123)) || (_12 === (60))) { */ case 95: - d.pushOpenStack(ch$7); - $s = -1; return [d.consumeToken(4, 1, 0), $ifaceNil]; - /* } else { */ case 96: - _r$16 = d.parseScalar(); /* */ $s = 98; case 98: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$12 = _r$16; - $s = 99; case 99: return $24r$12; - /* } */ case 97: - case 93: - $s = 11; continue; - /* } else if (_1 === (7)) { */ case 9: - _r$17 = d.currentOpenKind(); /* */ $s = 100; case 100: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$3 = _r$17; - openKind$2 = _tuple$3[0]; - closeCh$3 = _tuple$3[1]; - _13 = openKind$2; - /* */ if (_13 === (0)) { $s = 102; continue; } - /* */ if (_13 === (4)) { $s = 103; continue; } - /* */ $s = 104; continue; - /* if (_13 === (0)) { */ case 102: - if (isEOF) { - $s = -1; return [d.consumeToken(1, 0, 0), $ifaceNil]; - } - ch$8 = (x$9 = d.in$5, (0 >= x$9.$length ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + 0])); - _14 = ch$8; - /* */ if (_14 === (44)) { $s = 106; continue; } - /* */ if (_14 === (59)) { $s = 107; continue; } - /* */ $s = 108; continue; - /* if (_14 === (44)) { */ case 106: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else if (_14 === (59)) { */ case 107: - $s = -1; return [d.consumeToken(9, 1, 0), $ifaceNil]; - /* } else { */ case 108: - _r$18 = d.parseFieldName(); /* */ $s = 110; case 110: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$13 = _r$18; - $s = 111; case 111: return $24r$13; - /* } */ case 109: - case 105: - $s = 104; continue; - /* } else if (_13 === (4)) { */ case 103: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$9 = (x$10 = d.in$5, (0 >= x$10.$length ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + 0])); - _15 = ch$9; - /* */ if (_15 === (closeCh$3)) { $s = 113; continue; } - /* */ if (_15 === ((_entry$3 = otherCloseChar[$Uint8.keyFor(closeCh$3)], _entry$3 !== undefined ? _entry$3.v : 0))) { $s = 114; continue; } - /* */ if (_15 === (44)) { $s = 115; continue; } - /* */ if (_15 === (59)) { $s = 116; continue; } - /* */ $s = 117; continue; - /* if (_15 === (closeCh$3)) { */ case 113: - d.popOpenStack(); - $s = -1; return [d.consumeToken(5, 1, 0), $ifaceNil]; - /* } else if (_15 === ((_entry$3 = otherCloseChar[$Uint8.keyFor(closeCh$3)], _entry$3 !== undefined ? _entry$3.v : 0))) { */ case 114: - _r$19 = d.newSyntaxError("mismatched close character %q", new sliceType([new $Uint8(ch$9)])); /* */ $s = 119; case 119: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$14 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$19]; - $s = 120; case 120: return $24r$14; - /* } else if (_15 === (44)) { */ case 115: - $s = -1; return [d.consumeToken(8, 1, 0), $ifaceNil]; - /* } else if (_15 === (59)) { */ case 116: - $s = -1; return [d.consumeToken(9, 1, 0), $ifaceNil]; - /* } else { */ case 117: - _r$20 = d.parseFieldName(); /* */ $s = 121; case 121: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r$15 = _r$20; - $s = 122; case 122: return $24r$15; - /* } */ case 118: - case 112: - /* } */ case 104: - case 101: - $s = 11; continue; - /* } else if ((_1 === (8)) || (_1 === (9))) { */ case 10: - _r$21 = d.currentOpenKind(); /* */ $s = 123; case 123: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _tuple$4 = _r$21; - openKind$3 = _tuple$4[0]; - closeCh$4 = _tuple$4[1]; - _16 = openKind$3; - /* */ if (_16 === (0)) { $s = 125; continue; } - /* */ if (_16 === (4)) { $s = 126; continue; } - /* */ if (_16 === (6)) { $s = 127; continue; } - /* */ $s = 128; continue; - /* if (_16 === (0)) { */ case 125: - if (isEOF) { - $s = -1; return [d.consumeToken(1, 0, 0), $ifaceNil]; - } - _r$22 = d.parseFieldName(); /* */ $s = 129; case 129: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $24r$16 = _r$22; - $s = 130; case 130: return $24r$16; - /* } else if (_16 === (4)) { */ case 126: - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$10 = (x$11 = d.in$5, (0 >= x$11.$length ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + 0])); - _17 = ch$10; - /* */ if (_17 === (closeCh$4)) { $s = 132; continue; } - /* */ if (_17 === ((_entry$4 = otherCloseChar[$Uint8.keyFor(closeCh$4)], _entry$4 !== undefined ? _entry$4.v : 0))) { $s = 133; continue; } - /* */ $s = 134; continue; - /* if (_17 === (closeCh$4)) { */ case 132: - d.popOpenStack(); - $s = -1; return [d.consumeToken(5, 1, 0), $ifaceNil]; - /* } else if (_17 === ((_entry$4 = otherCloseChar[$Uint8.keyFor(closeCh$4)], _entry$4 !== undefined ? _entry$4.v : 0))) { */ case 133: - _r$23 = d.newSyntaxError("mismatched close character %q", new sliceType([new $Uint8(ch$10)])); /* */ $s = 136; case 136: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$17 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$23]; - $s = 137; case 137: return $24r$17; - /* } else { */ case 134: - _r$24 = d.parseFieldName(); /* */ $s = 138; case 138: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - $24r$18 = _r$24; - $s = 139; case 139: return $24r$18; - /* } */ case 135: - case 131: - $s = 128; continue; - /* } else if (_16 === (6)) { */ case 127: - if (lastKind === 9) { - /* break; */ $s = 124; continue; - } - if (isEOF) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - ch$11 = (x$12 = d.in$5, (0 >= x$12.$length ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + 0])); - _18 = ch$11; - /* */ if ((_18 === (123)) || (_18 === (60))) { $s = 141; continue; } - /* */ $s = 142; continue; - /* if ((_18 === (123)) || (_18 === (60))) { */ case 141: - d.pushOpenStack(ch$11); - $s = -1; return [d.consumeToken(4, 1, 0), $ifaceNil]; - /* } else { */ case 142: - _r$25 = d.parseScalar(); /* */ $s = 144; case 144: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - $24r$19 = _r$25; - $s = 145; case 145: return $24r$19; - /* } */ case 143: - case 140: - /* } */ case 128: - case 124: - /* } */ case 11: - case 1: - _tuple$5 = d.Position(d.orig.$length - d.in$5.$length >> 0); - line = _tuple$5[0]; - column = _tuple$5[1]; - _r$26 = fmt.Sprintf("Decoder.parseNext: bug at handling line %d:%d with lastKind=%v", new sliceType([new $Int(line), new $Int(column), new Kind(lastKind)])); /* */ $s = 146; case 146: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $panic(new $String(_r$26)); - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseNext, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$16, $24r$17, $24r$18, $24r$19, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _10, _11, _12, _13, _14, _15, _16, _17, _18, _2, _3, _4, _5, _6, _7, _8, _9, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, ch, ch$1, ch$10, ch$11, ch$2, ch$3, ch$4, ch$5, ch$6, ch$7, ch$8, ch$9, closeCh, closeCh$1, closeCh$2, closeCh$3, closeCh$4, column, d, isEOF, lastKind, line, openKind, openKind$1, openKind$2, openKind$3, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - Decoder.prototype.parseNext = function(lastKind) { return this.$val.parseNext(lastKind); }; - Decoder.ptr.prototype.currentOpenKind = function() { - var {_1, _r$1, d, openCh, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (d.openStack.$length === 0) { - $s = -1; return [0, 0]; - } - openCh = (x = d.openStack, x$1 = d.openStack.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - _1 = openCh; - if (_1 === (123)) { - $s = -1; return [4, 125]; - } else if (_1 === (60)) { - $s = -1; return [4, 62]; - } else if (_1 === (91)) { - $s = -1; return [6, 93]; - } - _r$1 = fmt.Sprintf("Decoder: openStack contains invalid byte %c", new sliceType([new $Uint8(openCh)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return [0, 0]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.currentOpenKind, $c: true, $r, _1, _r$1, d, openCh, x, x$1, $s};return $f; - }; - Decoder.prototype.currentOpenKind = function() { return this.$val.currentOpenKind(); }; - Decoder.ptr.prototype.pushOpenStack = function(ch) { - var ch, d; - d = this; - d.openStack = $append(d.openStack, ch); - }; - Decoder.prototype.pushOpenStack = function(ch) { return this.$val.pushOpenStack(ch); }; - Decoder.ptr.prototype.popOpenStack = function() { - var d; - d = this; - d.openStack = $subslice(d.openStack, 0, (d.openStack.$length - 1 >> 0)); - }; - Decoder.prototype.popOpenStack = function() { return this.$val.popOpenStack(); }; - Decoder.ptr.prototype.parseFieldName = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, d, err, err$1, num, size, tok, x, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - d = [d]; - err = [err]; - tok = [tok]; - tok[0] = new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""); - err[0] = $ifaceNil; - d[0] = this; - $deferred.push([(function(d, err, tok) { return function() { - if ($interfaceIsEqual(err[0], $ifaceNil) && d[0].tryConsumeChar(58)) { - tok[0].attrs = (tok[0].attrs | (128)) >>> 0; - } - }; })(d, err, tok), []]); - /* */ if ((x = d[0].in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 91) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = d[0].in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 91) { */ case 1: - _r$1 = d[0].parseTypeName(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - Token.copy(tok[0], _tuple[0]); - err[0] = _tuple[1]; - $24r = [tok[0], err[0]]; - $s = 4; case 4: return $24r; - /* } */ case 2: - size = parseIdent(d[0].in$5, false); - /* */ if (size > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (size > 0) { */ case 5: - _tmp = $clone(d[0].consumeToken(2, size, 1), Token); - _tmp$1 = $ifaceNil; - Token.copy(tok[0], _tmp); - err[0] = _tmp$1; - $24r$1 = [tok[0], err[0]]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - num = $clone(parseNumber(d[0].in$5), number); - /* */ if (num.size > 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (num.size > 0) { */ case 8: - /* */ if (!num.neg && (num.kind === 0)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!num.neg && (num.kind === 0)) { */ case 10: - _tuple$1 = strconv.ParseInt(($bytesToString($subslice(d[0].in$5, 0, num.size))), 10, 32); - err$1 = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 12: - _tmp$2 = $clone(d[0].consumeToken(2, num.size, 3), Token); - _tmp$3 = $ifaceNil; - Token.copy(tok[0], _tmp$2); - err[0] = _tmp$3; - $24r$2 = [tok[0], err[0]]; - $s = 14; case 14: return $24r$2; - /* } */ case 13: - /* } */ case 11: - _tmp$4 = new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""); - _r$2 = d[0].newSyntaxError("invalid field number: %s", new sliceType([$subslice(d[0].in$5, 0, num.size)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp$5 = _r$2; - Token.copy(tok[0], _tmp$4); - err[0] = _tmp$5; - $24r$3 = [tok[0], err[0]]; - $s = 16; case 16: return $24r$3; - /* } */ case 9: - _tmp$6 = new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""); - _r$3 = d[0].newSyntaxError("invalid field name: %s", new sliceType([errId(d[0].in$5)])); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tmp$7 = _r$3; - Token.copy(tok[0], _tmp$6); - err[0] = _tmp$7; - $24r$4 = [tok[0], err[0]]; - $s = 18; case 18: return $24r$4; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [tok[0], err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: Decoder.ptr.prototype.parseFieldName, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, d, err, err$1, num, size, tok, x, $s, $deferred};return $f; } } - }; - Decoder.prototype.parseFieldName = function() { return this.$val.parseFieldName(); }; - Decoder.ptr.prototype.parseTypeName = function() { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, closed, d, endPos, name, s, size, startPos, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - startPos = d.orig.$length - d.in$5.$length >> 0; - s = consume($subslice(d.in$5, 1), 0); - if (s.$length === 0) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - name = sliceType$1.nil; - while (true) { - if (!(s.$length > 0 && isTypeNameChar((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])))) { break; } - name = $append(name, (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])); - s = $subslice(s, 1); - } - s = consume(s, 0); - closed = false; - /* while (true) { */ case 1: - /* if (!(s.$length > 0 && !closed)) { break; } */ if(!(s.$length > 0 && !closed)) { $s = 2; continue; } - /* */ if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 93)) { $s = 4; continue; } - /* */ if ((((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 47)) || (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 46))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 93)) { */ case 4: - s = $subslice(s, 1); - closed = true; - $s = 7; continue; - /* } else if ((((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 47)) || (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 46))) { */ case 5: - /* */ if (name.$length > 0 && (((x = name.$length - 1 >> 0, ((x < 0 || x >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x])) === 47) || ((x$1 = name.$length - 1 >> 0, ((x$1 < 0 || x$1 >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x$1])) === 46))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (name.$length > 0 && (((x = name.$length - 1 >> 0, ((x < 0 || x >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x])) === 47) || ((x$1 = name.$length - 1 >> 0, ((x$1 < 0 || x$1 >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x$1])) === 46))) { */ case 8: - _r$1 = d.newSyntaxError("invalid type URL/extension field name: %s", new sliceType([$subslice(d.orig, startPos, ((d.orig.$length - s.$length >> 0) + 1 >> 0))])); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$1]; - $s = 11; case 11: return $24r; - /* } */ case 9: - name = $append(name, (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])); - s = $subslice(s, 1); - s = consume(s, 0); - while (true) { - if (!(s.$length > 0 && isTypeNameChar((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])))) { break; } - name = $append(name, (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0])); - s = $subslice(s, 1); - } - s = consume(s, 0); - $s = 7; continue; - /* } else { */ case 6: - _r$2 = d.newSyntaxError("invalid type URL/extension field name: %s", new sliceType([$subslice(d.orig, startPos, ((d.orig.$length - s.$length >> 0) + 1 >> 0))])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$2]; - $s = 13; case 13: return $24r$1; - /* } */ case 7: - case 3: - $s = 1; continue; - case 2: - if (!closed) { - $s = -1; return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), $pkg.ErrUnexpectedEOF]; - } - size = name.$length; - /* */ if ((size === 0) || ((0 >= name.$length ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + 0]) === 46) || ((x$2 = size - 1 >> 0, ((x$2 < 0 || x$2 >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x$2])) === 46) || ((x$3 = size - 1 >> 0, ((x$3 < 0 || x$3 >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x$3])) === 47)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ((size === 0) || ((0 >= name.$length ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + 0]) === 46) || ((x$2 = size - 1 >> 0, ((x$2 < 0 || x$2 >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x$2])) === 46) || ((x$3 = size - 1 >> 0, ((x$3 < 0 || x$3 >= name.$length) ? ($throwRuntimeError("index out of range"), undefined) : name.$array[name.$offset + x$3])) === 47)) { */ case 14: - _r$3 = d.newSyntaxError("invalid type URL/extension field name: %s", new sliceType([$subslice(d.orig, startPos, (d.orig.$length - s.$length >> 0))])); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$3]; - $s = 17; case 17: return $24r$2; - /* } */ case 15: - d.in$5 = s; - endPos = d.orig.$length - d.in$5.$length >> 0; - d.consume(0); - $s = -1; return [new Token.ptr(2, 2, 0, startPos, $subslice(d.orig, startPos, endPos), ($bytesToString(name))), $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseTypeName, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, closed, d, endPos, name, s, size, startPos, x, x$1, x$2, x$3, $s};return $f; - }; - Decoder.prototype.parseTypeName = function() { return this.$val.parseTypeName(); }; - isTypeNameChar = function(b) { - var b; - return (b === 45) || (b === 95) || (48 <= b && b <= 57) || (97 <= b && b <= 122) || (65 <= b && b <= 90); - }; - parseIdent = function(input, allowNeg) { - var allowNeg, input, s, size; - size = 0; - s = input; - if (s.$length === 0) { - return 0; - } - if (allowNeg && ((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 45)) { - s = $subslice(s, 1); - size = size + (1) >> 0; - if (s.$length === 0) { - return 0; - } - } - if ((((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 95)) || (97 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 122) || (65 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 90)) { - s = $subslice(s, 1); - size = size + (1) >> 0; - } else { - return 0; - } - while (true) { - if (!(s.$length > 0 && (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 95) || 97 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 122 || 65 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 90 || 48 <= (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) && (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) <= 57))) { break; } - s = $subslice(s, 1); - size = size + (1) >> 0; - } - if (s.$length > 0 && !isDelim((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]))) { - return 0; - } - return size; - }; - Decoder.ptr.prototype.parseScalar = function() { - var {$24r, $24r$1, _r$1, _r$2, _tuple, _tuple$1, d, ok, ok$1, tok, tok$1, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if (((x = d.in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 34) || ((x$1 = d.in$5, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) === 39)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (((x = d.in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 34) || ((x$1 = d.in$5, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) === 39)) { */ case 1: - _r$1 = d.parseStringValue(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _tuple = d.parseLiteralValue(); - tok = $clone(_tuple[0], Token); - ok = _tuple[1]; - if (ok) { - $s = -1; return [tok, $ifaceNil]; - } - _tuple$1 = d.parseNumberValue(); - tok$1 = $clone(_tuple$1[0], Token); - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return [tok$1, $ifaceNil]; - } - _r$2 = d.newSyntaxError("invalid scalar value: %s", new sliceType([errId(d.in$5)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), _r$2]; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseScalar, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _tuple, _tuple$1, d, ok, ok$1, tok, tok$1, x, x$1, $s};return $f; - }; - Decoder.prototype.parseScalar = function() { return this.$val.parseScalar(); }; - Decoder.ptr.prototype.parseLiteralValue = function() { - var d, size; - d = this; - size = parseIdent(d.in$5, true); - if (size === 0) { - return [new Token.ptr(0, 0, 0, 0, sliceType$1.nil, ""), false]; - } - return [d.consumeToken(3, size, 3), true]; - }; - Decoder.prototype.parseLiteralValue = function() { return this.$val.parseLiteralValue(); }; - Decoder.ptr.prototype.consumeToken = function(kind, size, attrs) { - var attrs, d, kind, size, tok; - d = this; - tok = new Token.ptr(kind, attrs, 0, d.orig.$length - d.in$5.$length >> 0, $subslice(d.in$5, 0, size), ""); - d.consume(size); - return tok; - }; - Decoder.prototype.consumeToken = function(kind, size, attrs) { return this.$val.consumeToken(kind, size, attrs); }; - Decoder.ptr.prototype.newSyntaxError = function(f, x) { - var {$24r, _r$1, _r$2, _tuple, column, d, e, f, line, x, $s, $r, $c} = $restore(this, {f, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$1 = errors.New(f, x); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - e = _r$1; - _tuple = d.Position(d.orig.$length - d.in$5.$length >> 0); - line = _tuple[0]; - column = _tuple[1]; - _r$2 = errors.New("syntax error (line %d:%d): %v", new sliceType([new $Int(line), new $Int(column), e])); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.newSyntaxError, $c: true, $r, $24r, _r$1, _r$2, _tuple, column, d, e, f, line, x, $s};return $f; - }; - Decoder.prototype.newSyntaxError = function(f, x) { return this.$val.newSyntaxError(f, x); }; - Decoder.ptr.prototype.Position = function(idx) { - var _tmp, _tmp$1, b, column, d, i, idx, line; - line = 0; - column = 0; - d = this; - b = $subslice(d.orig, 0, idx); - line = bytes.Count(b, (new sliceType$1($stringToBytes("\n")))) + 1 >> 0; - i = bytes.LastIndexByte(b, 10); - if (i >= 0) { - b = $subslice(b, (i + 1 >> 0)); - } - column = utf8.RuneCount(b) + 1 >> 0; - _tmp = line; - _tmp$1 = column; - line = _tmp; - column = _tmp$1; - return [line, column]; - }; - Decoder.prototype.Position = function(idx) { return this.$val.Position(idx); }; - Decoder.ptr.prototype.tryConsumeChar = function(c) { - var c, d, x; - d = this; - if (d.in$5.$length > 0 && ((x = d.in$5, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === c)) { - d.consume(1); - return true; - } - return false; - }; - Decoder.prototype.tryConsumeChar = function(c) { return this.$val.tryConsumeChar(c); }; - Decoder.ptr.prototype.consume = function(n) { - var d, n; - d = this; - d.in$5 = consume(d.in$5, n); - return; - }; - Decoder.prototype.consume = function(n) { return this.$val.consume(n); }; - consume = function(b, n) { - var _1, b, i, n; - b = $subslice(b, n); - while (true) { - if (!(b.$length > 0)) { break; } - _1 = (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]); - if ((_1 === (32)) || (_1 === (10)) || (_1 === (13)) || (_1 === (9))) { - b = $subslice(b, 1); - } else if (_1 === (35)) { - i = bytes.IndexByte(b, 10); - if (i >= 0) { - b = $subslice(b, (i + 1 >> 0)); - } else { - b = sliceType$1.nil; - } - } else { - return b; - } - } - return b; - }; - errId = function(seq) { - var _tuple, i, r, seq, size; - i = 0; - while (true) { - if (!(i < seq.$length)) { break; } - if (i > 32) { - return $appendSlice($subslice(seq, 0, i, i), "\xE2\x80\xA6"); - } - _tuple = utf8.DecodeRune($subslice(seq, i)); - r = _tuple[0]; - size = _tuple[1]; - if (r > 128 || (!((r === 47)) && isDelim(((r << 24 >>> 24))))) { - if (i === 0) { - i = size; - } - return $subslice(seq, 0, i, i); - } - i = i + (size) >> 0; - } - return seq; - }; - isDelim = function(c) { - var c; - return !((c === 45) || (c === 43) || (c === 46) || (c === 95) || (97 <= c && c <= 122) || (65 <= c && c <= 90) || (48 <= c && c <= 57)); - }; - ptrType.methods = [{prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "StartMessage", name: "StartMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "EndMessage", name: "EndMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "WriteName", name: "WriteName", pkg: "", typ: $funcType([$String], [], false)}, {prop: "WriteBool", name: "WriteBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "WriteFloat", name: "WriteFloat", pkg: "", typ: $funcType([$Float64, $Int], [], false)}, {prop: "WriteInt", name: "WriteInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "WriteUint", name: "WriteUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "WriteLiteral", name: "WriteLiteral", pkg: "", typ: $funcType([$String], [], false)}, {prop: "prepareNext", name: "prepareNext", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([encType], [], false)}, {prop: "Snapshot", name: "Snapshot", pkg: "", typ: $funcType([], [encoderState], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([encoderState], [], false)}]; - Kind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - NameKind.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - Token.methods = [{prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [Kind], false)}, {prop: "RawString", name: "RawString", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "NameKind", name: "NameKind", pkg: "", typ: $funcType([], [NameKind], false)}, {prop: "HasSeparator", name: "HasSeparator", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IdentName", name: "IdentName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TypeName", name: "TypeName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "FieldNumber", name: "FieldNumber", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String, $Bool], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [$String, $Bool], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [$Bool, $Bool], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64, $Bool], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([], [$Uint32, $Bool], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64, $Bool], false)}, {prop: "Int32", name: "Int32", pkg: "", typ: $funcType([], [$Int32, $Bool], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64, $Bool], false)}, {prop: "Float32", name: "Float32", pkg: "", typ: $funcType([], [$Float32, $Bool], false)}]; - ptrType$2.methods = [{prop: "parseStringValue", name: "parseStringValue", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Token, $error], false)}, {prop: "parseString", name: "parseString", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [$String, $error], false)}, {prop: "parseNumberValue", name: "parseNumberValue", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Token, $Bool], false)}, {prop: "Peek", name: "Peek", pkg: "", typ: $funcType([], [Token, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([], [Token, $error], false)}, {prop: "parseNext", name: "parseNext", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([Kind], [Token, $error], false)}, {prop: "currentOpenKind", name: "currentOpenKind", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Kind, $Uint8], false)}, {prop: "pushOpenStack", name: "pushOpenStack", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([$Uint8], [], false)}, {prop: "popOpenStack", name: "popOpenStack", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [], false)}, {prop: "parseFieldName", name: "parseFieldName", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Token, $error], false)}, {prop: "parseTypeName", name: "parseTypeName", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Token, $error], false)}, {prop: "parseScalar", name: "parseScalar", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Token, $error], false)}, {prop: "parseLiteralValue", name: "parseLiteralValue", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([], [Token, $Bool], false)}, {prop: "consumeToken", name: "consumeToken", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([Kind, $Int, $Uint8], [Token], false)}, {prop: "newSyntaxError", name: "newSyntaxError", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([$String, sliceType], [$error], true)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([$Int], [$Int, $Int], false)}, {prop: "tryConsumeChar", name: "tryConsumeChar", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([$Uint8], [$Bool], false)}, {prop: "consume", name: "consume", pkg: "google.golang.org/protobuf/internal/encoding/text", typ: $funcType([$Int], [], false)}]; - Encoder.init("google.golang.org/protobuf/internal/encoding/text", [{prop: "encoderState", name: "encoderState", embedded: true, exported: false, typ: encoderState, tag: ""}, {prop: "indent", name: "indent", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "delims", name: "delims", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "outputASCII", name: "outputASCII", embedded: false, exported: false, typ: $Bool, tag: ""}]); - encoderState.init("google.golang.org/protobuf/internal/encoding/text", [{prop: "lastType", name: "lastType", embedded: false, exported: false, typ: encType, tag: ""}, {prop: "indents", name: "indents", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - Token.init("google.golang.org/protobuf/internal/encoding/text", [{prop: "kind", name: "kind", embedded: false, exported: false, typ: Kind, tag: ""}, {prop: "attrs", name: "attrs", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "numAttrs", name: "numAttrs", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "pos", name: "pos", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); - number.init("google.golang.org/protobuf/internal/encoding/text", [{prop: "kind", name: "kind", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int, tag: ""}]); - Decoder.init("google.golang.org/protobuf/internal/encoding/text", [{prop: "lastCall", name: "lastCall", embedded: false, exported: false, typ: call, tag: ""}, {prop: "lastToken", name: "lastToken", embedded: false, exported: false, typ: Token, tag: ""}, {prop: "lastErr", name: "lastErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "openStack", name: "openStack", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "orig", name: "orig", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "in$5", name: "in", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = detrand.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flags.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strs.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf16.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - boolLits = $makeMap($String.keyFor, [{ k: "t", v: true }, { k: "true", v: true }, { k: "True", v: true }, { k: "f", v: false }, { k: "false", v: false }, { k: "False", v: false }]); - floatLits = $makeMap($String.keyFor, [{ k: "nan", v: math.NaN() }, { k: "inf", v: math.Inf(1) }, { k: "infinity", v: math.Inf(1) }, { k: "-inf", v: math.Inf(-1) }, { k: "-infinity", v: math.Inf(-1) }]); - _r = errors.New("%v", new sliceType([io.ErrUnexpectedEOF])); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $pkg.ErrUnexpectedEOF = _r; - otherCloseChar = $makeMap($Uint8.keyFor, [{ k: 125, v: 62 }, { k: 62, v: 125 }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/encoding/defval"] = (function() { - var $pkg = {}, $init, fmt, text, errors, protoreflect, math, strconv, funcType, arrayType, sliceType, sliceType$1, Unmarshal, Marshal, unmarshalBytes, marshalBytes; - fmt = $packages["fmt"]; - text = $packages["google.golang.org/protobuf/internal/encoding/text"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - math = $packages["math"]; - strconv = $packages["strconv"]; - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($emptyInterface); - Unmarshal = function(s, k, evs, f) { - var {$24r, $24r$1, $24r$2, _1, _2, _3, _4, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, b, err, err$1, err$2, err$3, err$4, err$5, ev, ev$1, evs, f, k, n, ok, s, v, v$1, v$2, v$3, v$4, $s, $r, $c} = $restore(this, {s, k, evs, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = k; - /* */ if (_1 === (8)) { $s = 2; continue; } - /* */ if (_1 === (14)) { $s = 3; continue; } - /* */ if ((_1 === (5)) || (_1 === (17)) || (_1 === (15))) { $s = 4; continue; } - /* */ if ((_1 === (3)) || (_1 === (18)) || (_1 === (16))) { $s = 5; continue; } - /* */ if ((_1 === (13)) || (_1 === (7))) { $s = 6; continue; } - /* */ if ((_1 === (4)) || (_1 === (6))) { $s = 7; continue; } - /* */ if ((_1 === (2)) || (_1 === (1))) { $s = 8; continue; } - /* */ if (_1 === (9)) { $s = 9; continue; } - /* */ if (_1 === (12)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (8)) { */ case 2: - if (f === 2) { - _2 = s; - if (_2 === ("1")) { - $s = -1; return [protoreflect.ValueOfBool(true), $ifaceNil, $ifaceNil]; - } else if (_2 === ("0")) { - $s = -1; return [protoreflect.ValueOfBool(false), $ifaceNil, $ifaceNil]; - } - } else { - _3 = s; - if (_3 === ("true")) { - $s = -1; return [protoreflect.ValueOfBool(true), $ifaceNil, $ifaceNil]; - } else if (_3 === ("false")) { - $s = -1; return [protoreflect.ValueOfBool(false), $ifaceNil, $ifaceNil]; - } - } - $s = 11; continue; - /* } else if (_1 === (14)) { */ case 3: - /* */ if (f === 2) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (f === 2) { */ case 12: - _tuple = strconv.ParseInt(s, 10, 32); - n = _tuple[0]; - err = _tuple[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 15: - _r = evs.ByNumber((((n.$low + ((n.$high >> 31) * 4294967296)) >> 0))); /* */ $s = 17; case 17: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ev = _r; - /* */ if (!($interfaceIsEqual(ev, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(ev, $ifaceNil))) { */ case 18: - _r$1 = ev.Number(); /* */ $s = 20; case 20: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = protoreflect.ValueOfEnum(_r$1); /* */ $s = 21; case 21: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [_r$2, ev, $ifaceNil]; - $s = 22; case 22: return $24r; - /* } */ case 19: - /* } */ case 16: - $s = 14; continue; - /* } else { */ case 13: - _r$3 = evs.ByName((s)); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ev$1 = _r$3; - /* */ if (!($interfaceIsEqual(ev$1, $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(ev$1, $ifaceNil))) { */ case 24: - _r$4 = ev$1.Number(); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = protoreflect.ValueOfEnum(_r$4); /* */ $s = 27; case 27: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = [_r$5, ev$1, $ifaceNil]; - $s = 28; case 28: return $24r$1; - /* } */ case 25: - /* } */ case 14: - $s = 11; continue; - /* } else if ((_1 === (5)) || (_1 === (17)) || (_1 === (15))) { */ case 4: - _tuple$1 = strconv.ParseInt(s, 10, 32); - v = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - $s = -1; return [protoreflect.ValueOfInt32((((v.$low + ((v.$high >> 31) * 4294967296)) >> 0))), $ifaceNil, $ifaceNil]; - } - $s = 11; continue; - /* } else if ((_1 === (3)) || (_1 === (18)) || (_1 === (16))) { */ case 5: - _tuple$2 = strconv.ParseInt(s, 10, 64); - v$1 = _tuple$2[0]; - err$2 = _tuple$2[1]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - $s = -1; return [protoreflect.ValueOfInt64((v$1)), $ifaceNil, $ifaceNil]; - } - $s = 11; continue; - /* } else if ((_1 === (13)) || (_1 === (7))) { */ case 6: - _tuple$3 = strconv.ParseUint(s, 10, 32); - v$2 = _tuple$3[0]; - err$3 = _tuple$3[1]; - if ($interfaceIsEqual(err$3, $ifaceNil)) { - $s = -1; return [protoreflect.ValueOfUint32(((v$2.$low >>> 0))), $ifaceNil, $ifaceNil]; - } - $s = 11; continue; - /* } else if ((_1 === (4)) || (_1 === (6))) { */ case 7: - _tuple$4 = strconv.ParseUint(s, 10, 64); - v$3 = _tuple$4[0]; - err$4 = _tuple$4[1]; - if ($interfaceIsEqual(err$4, $ifaceNil)) { - $s = -1; return [protoreflect.ValueOfUint64((v$3)), $ifaceNil, $ifaceNil]; - } - $s = 11; continue; - /* } else if ((_1 === (2)) || (_1 === (1))) { */ case 8: - v$4 = 0; - err$5 = $ifaceNil; - _4 = s; - if (_4 === ("-inf")) { - v$4 = math.Inf(-1); - } else if (_4 === ("inf")) { - v$4 = math.Inf(1); - } else if (_4 === ("nan")) { - v$4 = math.NaN(); - } else { - _tuple$5 = strconv.ParseFloat(s, 64); - v$4 = _tuple$5[0]; - err$5 = _tuple$5[1]; - } - if ($interfaceIsEqual(err$5, $ifaceNil)) { - if (k === 2) { - $s = -1; return [protoreflect.ValueOfFloat32(($fround(v$4))), $ifaceNil, $ifaceNil]; - } else { - $s = -1; return [protoreflect.ValueOfFloat64((v$4)), $ifaceNil, $ifaceNil]; - } - } - $s = 11; continue; - /* } else if (_1 === (9)) { */ case 9: - $s = -1; return [protoreflect.ValueOfString(s), $ifaceNil, $ifaceNil]; - /* } else if (_1 === (12)) { */ case 10: - _r$6 = unmarshalBytes(s); /* */ $s = 29; case 29: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$6 = _r$6; - b = _tuple$6[0]; - ok = _tuple$6[1]; - if (ok) { - $s = -1; return [protoreflect.ValueOfBytes(b), $ifaceNil, $ifaceNil]; - } - /* } */ case 11: - case 1: - _r$7 = errors.New("could not parse value for %v: %q", new sliceType$1([new protoreflect.Kind(k), new $String(s)])); /* */ $s = 30; case 30: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$2 = [new protoreflect.Value.ptr(arrayType.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), $ifaceNil, _r$7]; - $s = 31; case 31: return $24r$2; - /* */ } return; } var $f = {$blk: Unmarshal, $c: true, $r, $24r, $24r$1, $24r$2, _1, _2, _3, _4, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, b, err, err$1, err$2, err$3, err$4, err$5, ev, ev$1, evs, f, k, n, ok, s, v, v$1, v$2, v$3, v$4, $s};return $f; - }; - $pkg.Unmarshal = Unmarshal; - Marshal = function(v, ev, k, f) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, ev, f, f$1, k, ok, s, v, $s, $r, $c} = $restore(this, {v, ev, k, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = k; - /* */ if (_1 === (8)) { $s = 2; continue; } - /* */ if (_1 === (14)) { $s = 3; continue; } - /* */ if ((_1 === (5)) || (_1 === (17)) || (_1 === (15)) || (_1 === (3)) || (_1 === (18)) || (_1 === (16))) { $s = 4; continue; } - /* */ if ((_1 === (13)) || (_1 === (7)) || (_1 === (4)) || (_1 === (6))) { $s = 5; continue; } - /* */ if ((_1 === (2)) || (_1 === (1))) { $s = 6; continue; } - /* */ if (_1 === (9)) { $s = 7; continue; } - /* */ if (_1 === (12)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (8)) { */ case 2: - /* */ if (f === 2) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (f === 2) { */ case 10: - _r = $clone(v, protoreflect.Value).Bool(); /* */ $s = 16; case 16: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_r) { */ case 13: - $s = -1; return ["1", $ifaceNil]; - /* } else { */ case 14: - $s = -1; return ["0", $ifaceNil]; - /* } */ case 15: - $s = 12; continue; - /* } else { */ case 11: - _r$1 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 20; case 20: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_r$1) { */ case 17: - $s = -1; return ["true", $ifaceNil]; - /* } else { */ case 18: - $s = -1; return ["false", $ifaceNil]; - /* } */ case 19: - /* } */ case 12: - $s = 9; continue; - /* } else if (_1 === (14)) { */ case 3: - /* */ if (f === 2) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (f === 2) { */ case 21: - _r$2 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 24; case 24: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = strconv.FormatInt((new $Int64(0, _r$2)), 10); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [_r$3, $ifaceNil]; - $s = 26; case 26: return $24r; - /* } else { */ case 22: - _r$4 = ev.Name(); /* */ $s = 27; case 27: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = [(_r$4), $ifaceNil]; - $s = 28; case 28: return $24r$1; - /* } */ case 23: - $s = 9; continue; - /* } else if ((_1 === (5)) || (_1 === (17)) || (_1 === (15)) || (_1 === (3)) || (_1 === (18)) || (_1 === (16))) { */ case 4: - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 29; case 29: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = strconv.FormatInt(_r$5, 10); /* */ $s = 30; case 30: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$2 = [_r$6, $ifaceNil]; - $s = 31; case 31: return $24r$2; - /* } else if ((_1 === (13)) || (_1 === (7)) || (_1 === (4)) || (_1 === (6))) { */ case 5: - _r$7 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = strconv.FormatUint(_r$7, 10); /* */ $s = 33; case 33: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$3 = [_r$8, $ifaceNil]; - $s = 34; case 34: return $24r$3; - /* } else if ((_1 === (2)) || (_1 === (1))) { */ case 6: - _r$9 = $clone(v, protoreflect.Value).Float(); /* */ $s = 35; case 35: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - f$1 = _r$9; - if (math.IsInf(f$1, -1)) { - $s = -1; return ["-inf", $ifaceNil]; - } else if (math.IsInf(f$1, 1)) { - $s = -1; return ["inf", $ifaceNil]; - } else if (math.IsNaN(f$1)) { - $s = -1; return ["nan", $ifaceNil]; - } else if (k === 2) { - $s = -1; return [strconv.FormatFloat(f$1, 103, -1, 32), $ifaceNil]; - } else { - $s = -1; return [strconv.FormatFloat(f$1, 103, -1, 64), $ifaceNil]; - } - $s = 9; continue; - /* } else if (_1 === (9)) { */ case 7: - _r$10 = $clone(v, protoreflect.Value).String(); /* */ $s = 36; case 36: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$4 = [_r$10, $ifaceNil]; - $s = 37; case 37: return $24r$4; - /* } else if (_1 === (12)) { */ case 8: - _r$11 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 38; case 38: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = marshalBytes(_r$11); /* */ $s = 39; case 39: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple = _r$12; - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [s, $ifaceNil]; - } - /* } */ case 9: - case 1: - _r$13 = errors.New("could not format value for %v: %v", new sliceType$1([new protoreflect.Kind(k), new v.constructor.elem(v)])); /* */ $s = 40; case 40: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$5 = ["", _r$13]; - $s = 41; case 41: return $24r$5; - /* */ } return; } var $f = {$blk: Marshal, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, ev, f, f$1, k, ok, s, v, $s};return $f; - }; - $pkg.Marshal = Marshal; - unmarshalBytes = function(s) { - var {_r, _tuple, err, s, v, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = text.UnmarshalString("\"" + s + "\""); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, false]; - } - $s = -1; return [(new sliceType($stringToBytes(v))), true]; - /* */ } return; } var $f = {$blk: unmarshalBytes, $c: true, $r, _r, _tuple, err, s, v, $s};return $f; - }; - marshalBytes = function(b) { - var {_1, _arg, _arg$1, _i, _r, _ref, b, c, printableASCII, s, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = sliceType.nil; - _ref = b; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _1 = c; - /* */ if (_1 === (10)) { $s = 4; continue; } - /* */ if (_1 === (13)) { $s = 5; continue; } - /* */ if (_1 === (9)) { $s = 6; continue; } - /* */ if (_1 === (34)) { $s = 7; continue; } - /* */ if (_1 === (39)) { $s = 8; continue; } - /* */ if (_1 === (92)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_1 === (10)) { */ case 4: - s = $appendSlice(s, "\\n"); - $s = 11; continue; - /* } else if (_1 === (13)) { */ case 5: - s = $appendSlice(s, "\\r"); - $s = 11; continue; - /* } else if (_1 === (9)) { */ case 6: - s = $appendSlice(s, "\\t"); - $s = 11; continue; - /* } else if (_1 === (34)) { */ case 7: - s = $appendSlice(s, "\\\""); - $s = 11; continue; - /* } else if (_1 === (39)) { */ case 8: - s = $appendSlice(s, "\\'"); - $s = 11; continue; - /* } else if (_1 === (92)) { */ case 9: - s = $appendSlice(s, "\\\\"); - $s = 11; continue; - /* } else { */ case 10: - printableASCII = c >= 32 && c <= 126; - /* */ if (printableASCII) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (printableASCII) { */ case 12: - s = $append(s, c); - $s = 14; continue; - /* } else { */ case 13: - _arg = s; - _r = fmt.Sprintf("\\%03o", new sliceType$1([new $Uint8(c)])); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - s = $appendSlice(_arg, _arg$1); - /* } */ case 14: - /* } */ case 11: - case 3: - _i++; - $s = 1; continue; - case 2: - $s = -1; return [($bytesToString(s)), true]; - /* */ } return; } var $f = {$blk: marshalBytes, $c: true, $r, _1, _arg, _arg$1, _i, _r, _ref, b, c, printableASCII, s, $s};return $f; - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = text.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/encoding/messageset"] = (function() { - var $pkg = {}, $init, protowire, errors, protoreflect, math, interfaceType, sliceType, sliceType$1, IsMessageSet, IsMessageSetExtension, SizeField, Unmarshal, ConsumeFieldValue, AppendFieldStart, AppendFieldEnd, SizeUnknown, AppendUnknown; - protowire = $packages["google.golang.org/protobuf/encoding/protowire"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - math = $packages["math"]; - interfaceType = $interfaceType([{prop: "IsMessageSet", name: "IsMessageSet", pkg: "", typ: $funcType([], [$Bool], false)}]); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($emptyInterface); - IsMessageSet = function(md) { - var {$24r, _r, _tuple, _v, md, ok, xmd, $s, $r, $c} = $restore(this, {md}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(md, interfaceType, true); - xmd = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 1; continue s; } - _r = xmd.IsMessageSet(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: IsMessageSet, $c: true, $r, $24r, _r, _tuple, _v, md, ok, xmd, $s};return $f; - }; - $pkg.IsMessageSet = IsMessageSet; - IsMessageSetExtension = function(fd) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, fd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = fd.Name(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!(_r === "message_set_extension")) { $s = 2; continue; } - _r$1 = fd.ContainingMessage(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = IsMessageSet(_r$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 3; continue; } - _r$3 = fd.FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = new protoreflect.FullName(_r$3).Parent(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = fd.Message(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!(_r$4 === _r$6)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(_r === "message_set_extension")) { */ case 2: - $s = -1; return false; - /* } else if (!_r$2) { */ case 3: - $s = -1; return false; - /* } else if (!(_r$4 === _r$6)) { */ case 4: - $s = -1; return false; - /* } */ case 5: - case 1: - $s = -1; return true; - /* */ } return; } var $f = {$blk: IsMessageSetExtension, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, fd, $s};return $f; - }; - $pkg.IsMessageSetExtension = IsMessageSetExtension; - SizeField = function(num) { - var num; - return (($imul(2, protowire.SizeTag(1))) + protowire.SizeTag(2) >> 0) + protowire.SizeVarint((new $Uint64(0, num))) >> 0; - }; - $pkg.SizeField = SizeField; - Unmarshal = function(b, wantLen, fn) { - var {_r, _r$1, _tuple, _tuple$1, b, err, err$1, fn, n, n$1, num, typeID, value, wantLen, wtyp, $s, $r, $c} = $restore(this, {b, wantLen, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - wtyp = _tuple[1]; - n = _tuple[2]; - if (n < 0) { - $s = -1; return protowire.ParseError(n); - } - b = $subslice(b, n); - if (!((num === 1)) || !((wtyp === 3))) { - n$1 = protowire.ConsumeFieldValue(num, wtyp, b); - if (n$1 < 0) { - $s = -1; return protowire.ParseError(n$1); - } - b = $subslice(b, n$1); - /* continue; */ $s = 1; continue; - } - _r = ConsumeFieldValue(b, wantLen); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - typeID = _tuple$1[0]; - value = _tuple$1[1]; - n = _tuple$1[2]; - err = _tuple$1[3]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - b = $subslice(b, n); - if (typeID === 0) { - /* continue; */ $s = 1; continue; - } - _r$1 = fn(typeID, value); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err$1 = _r$1; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Unmarshal, $c: true, $r, _r, _r$1, _tuple, _tuple$1, b, err, err$1, fn, n, n$1, num, typeID, value, wantLen, wtyp, $s};return $f; - }; - $pkg.Unmarshal = Unmarshal; - ConsumeFieldValue = function(b, wantLen) { - var {$24r, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, ilen, m, m0, message, n, n$1, n$2, n$3, n$4, nn, num, typeid, v, wantLen, wtyp, $s, $r, $c} = $restore(this, {b, wantLen}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - typeid = 0; - message = sliceType.nil; - n = 0; - err = $ifaceNil; - ilen = b.$length; - /* while (true) { */ case 1: - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - wtyp = _tuple[1]; - n$1 = _tuple[2]; - if (n$1 < 0) { - _tmp = 0; - _tmp$1 = sliceType.nil; - _tmp$2 = 0; - _tmp$3 = protowire.ParseError(n$1); - typeid = _tmp; - message = _tmp$1; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [typeid, message, n, err]; - } - b = $subslice(b, n$1); - /* */ if ((num === 1) && (wtyp === 4)) { $s = 4; continue; } - /* */ if ((num === 2) && (wtyp === 0)) { $s = 5; continue; } - /* */ if ((num === 3) && (wtyp === 2)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ((num === 1) && (wtyp === 4)) { */ case 4: - if (wantLen && (message.$length === 0)) { - message = protowire.AppendVarint(message, new $Uint64(0, 0)); - } - _tmp$4 = typeid; - _tmp$5 = message; - _tmp$6 = ilen - b.$length >> 0; - _tmp$7 = $ifaceNil; - typeid = _tmp$4; - message = _tmp$5; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [typeid, message, n, err]; - /* } else if ((num === 2) && (wtyp === 0)) { */ case 5: - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - n$2 = _tuple$1[1]; - if (n$2 < 0) { - _tmp$8 = 0; - _tmp$9 = sliceType.nil; - _tmp$10 = 0; - _tmp$11 = protowire.ParseError(n$2); - typeid = _tmp$8; - message = _tmp$9; - n = _tmp$10; - err = _tmp$11; - $s = -1; return [typeid, message, n, err]; - } - b = $subslice(b, n$2); - /* */ if ((v.$high < 0 || (v.$high === 0 && v.$low < 1)) || (v.$high > 0 || (v.$high === 0 && v.$low > 2147483647))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ((v.$high < 0 || (v.$high === 0 && v.$low < 1)) || (v.$high > 0 || (v.$high === 0 && v.$low > 2147483647))) { */ case 9: - _tmp$12 = 0; - _tmp$13 = sliceType.nil; - _tmp$14 = 0; - _r = errors.New("invalid type_id in message set", new sliceType$1([])); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$15 = _r; - typeid = _tmp$12; - message = _tmp$13; - n = _tmp$14; - err = _tmp$15; - $24r = [typeid, message, n, err]; - $s = 12; case 12: return $24r; - /* } */ case 10: - typeid = ((v.$low >> 0)); - $s = 8; continue; - /* } else if ((num === 3) && (wtyp === 2)) { */ case 6: - _tuple$2 = protowire.ConsumeBytes(b); - m = _tuple$2[0]; - n$3 = _tuple$2[1]; - if (n$3 < 0) { - _tmp$16 = 0; - _tmp$17 = sliceType.nil; - _tmp$18 = 0; - _tmp$19 = protowire.ParseError(n$3); - typeid = _tmp$16; - message = _tmp$17; - n = _tmp$18; - err = _tmp$19; - $s = -1; return [typeid, message, n, err]; - } - if (message === sliceType.nil) { - if (wantLen) { - message = $subslice(b, 0, n$3, n$3); - } else { - message = $subslice(m, 0, m.$length, m.$length); - } - } else { - if (wantLen) { - _tuple$3 = protowire.ConsumeVarint(message); - nn = _tuple$3[1]; - m0 = $subslice(message, nn); - message = sliceType.nil; - message = protowire.AppendVarint(message, (new $Uint64(0, (m0.$length + m.$length >> 0)))); - message = $appendSlice(message, m0); - message = $appendSlice(message, m); - } else { - message = $appendSlice(message, m); - } - } - b = $subslice(b, n$3); - $s = 8; continue; - /* } else { */ case 7: - n$4 = protowire.ConsumeFieldValue(num, wtyp, b); - if (n$4 < 0) { - _tmp$20 = 0; - _tmp$21 = sliceType.nil; - _tmp$22 = 0; - _tmp$23 = protowire.ParseError(n$4); - typeid = _tmp$20; - message = _tmp$21; - n = _tmp$22; - err = _tmp$23; - $s = -1; return [typeid, message, n, err]; - } - b = $subslice(b, n$4); - /* } */ case 8: - case 3: - $s = 1; continue; - case 2: - $s = -1; return [typeid, message, n, err]; - /* */ } return; } var $f = {$blk: ConsumeFieldValue, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, ilen, m, m0, message, n, n$1, n$2, n$3, n$4, nn, num, typeid, v, wantLen, wtyp, $s};return $f; - }; - $pkg.ConsumeFieldValue = ConsumeFieldValue; - AppendFieldStart = function(b, num) { - var b, num; - b = protowire.AppendTag(b, 1, 3); - b = protowire.AppendTag(b, 2, 0); - b = protowire.AppendVarint(b, (new $Uint64(0, num))); - return b; - }; - $pkg.AppendFieldStart = AppendFieldStart; - AppendFieldEnd = function(b) { - var b; - return protowire.AppendTag(b, 1, 4); - }; - $pkg.AppendFieldEnd = AppendFieldEnd; - SizeUnknown = function(unknown) { - var _tuple, _tuple$1, n, num, size, typ, unknown; - size = 0; - while (true) { - if (!(unknown.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(unknown); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - if (n < 0 || !((typ === 2))) { - size = 0; - return size; - } - unknown = $subslice(unknown, n); - _tuple$1 = protowire.ConsumeBytes(unknown); - n = _tuple$1[1]; - if (n < 0) { - size = 0; - return size; - } - unknown = $subslice(unknown, n); - size = size + (((SizeField(num) + protowire.SizeTag(3) >> 0) + n >> 0)) >> 0; - } - size = size; - return size; - }; - $pkg.SizeUnknown = SizeUnknown; - AppendUnknown = function(b, unknown) { - var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, b, n, num, typ, unknown, $s, $r, $c} = $restore(this, {b, unknown}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - /* if (!(unknown.$length > 0)) { break; } */ if(!(unknown.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(unknown); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - /* */ if (n < 0 || !((typ === 2))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (n < 0 || !((typ === 2))) { */ case 3: - _r = errors.New("invalid data in message set unknown fields", new sliceType$1([])); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [sliceType.nil, _r]; - $s = 6; case 6: return $24r; - /* } */ case 4: - unknown = $subslice(unknown, n); - _tuple$1 = protowire.ConsumeBytes(unknown); - n = _tuple$1[1]; - /* */ if (n < 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (n < 0) { */ case 7: - _r$1 = errors.New("invalid data in message set unknown fields", new sliceType$1([])); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = [sliceType.nil, _r$1]; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - b = AppendFieldStart(b, num); - b = protowire.AppendTag(b, 3, 2); - b = $appendSlice(b, $subslice(unknown, 0, n)); - b = AppendFieldEnd(b); - unknown = $subslice(unknown, n); - $s = 1; continue; - case 2: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: AppendUnknown, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, b, n, num, typ, unknown, $s};return $f; - }; - $pkg.AppendUnknown = AppendUnknown; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = protowire.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/genid"] = (function() { - var $pkg = {}, $init, protoreflect; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = protoreflect.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/order"] = (function() { - var $pkg = {}, $init, protoreflect, sort, sync, messageField, mapEntry, sliceType, sliceType$1, ptrType, sliceType$2, ptrType$1, funcType, arrayType, sliceType$3, messageFieldPool, mapEntryPool, RangeFields, RangeEntries; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - sort = $packages["sort"]; - sync = $packages["sync"]; - messageField = $pkg.messageField = $newType(0, $kindStruct, "order.messageField", true, "google.golang.org/protobuf/internal/order", false, function(fd_, v_) { - this.$val = this; - if (arguments.length === 0) { - this.fd = $ifaceNil; - this.v = new protoreflect.Value.ptr(arrayType.zero(), 0, new $Uint64(0, 0), "", sliceType$3.nil, $ifaceNil); - return; - } - this.fd = fd_; - this.v = v_; - }); - mapEntry = $pkg.mapEntry = $newType(0, $kindStruct, "order.mapEntry", true, "google.golang.org/protobuf/internal/order", false, function(k_, v_) { - this.$val = this; - if (arguments.length === 0) { - this.k = new protoreflect.MapKey.ptr(arrayType.zero(), 0, new $Uint64(0, 0), "", sliceType$3.nil, $ifaceNil); - this.v = new protoreflect.Value.ptr(arrayType.zero(), 0, new $Uint64(0, 0), "", sliceType$3.nil, $ifaceNil); - return; - } - this.k = k_; - this.v = v_; - }); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType(messageField); - ptrType = $ptrType(sliceType$1); - sliceType$2 = $sliceType(mapEntry); - ptrType$1 = $ptrType(sliceType$2); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - sliceType$3 = $sliceType($Uint8); - RangeFields = function(fs, less, fn) { - var {_i, _r, _r$1, _ref, f, fields, fn, fs, less, p, $s, $deferred, $r, $c} = $restore(this, {fs, less, fn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fields = [fields]; - less = [less]; - p = [p]; - /* */ if (less[0] === $throwNilPointerError) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (less[0] === $throwNilPointerError) { */ case 1: - $r = fs.Range(fn); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; case 4: return; - /* } */ case 2: - _r = messageFieldPool.Get(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p[0] = $assertType(_r, ptrType); - fields[0] = $subslice((p[0].$get()), 0, 0); - $deferred.push([(function(fields, less, p) { return function() { - if (fields[0].$capacity < 1024) { - p[0].$set(fields[0]); - messageFieldPool.Put(p[0]); - } - }; })(fields, less, p), []]); - $r = fs.Range((function(fields, less, p) { return function(fd, v) { - var fd, v; - fields[0] = $append(fields[0], new messageField.ptr(fd, $clone(v, protoreflect.Value))); - return true; - }; })(fields, less, p)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.Slice(fields[0], (function(fields, less, p) { return function $b(i, j) { - var {$24r, _r$1, i, j, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = less[0](((i < 0 || i >= fields[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : fields[0].$array[fields[0].$offset + i]).fd, ((j < 0 || j >= fields[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : fields[0].$array[fields[0].$offset + j]).fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, i, j, $s};return $f; - }; })(fields, less, p)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = fields[0]; - _i = 0; - /* while (true) { */ case 8: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } - f = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), messageField); - _r$1 = fn(f.fd, $clone(f.v, protoreflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$1) { */ case 10: - $s = 13; case 13: return; - /* } */ case 11: - _i++; - $s = 8; continue; - case 9: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: RangeFields, $c: true, $r, _i, _r, _r$1, _ref, f, fields, fn, fs, less, p, $s, $deferred};return $f; } } - }; - $pkg.RangeFields = RangeFields; - RangeEntries = function(es, less, fn) { - var {_i, _r, _r$1, _ref, e, entries, es, fn, less, p, $s, $deferred, $r, $c} = $restore(this, {es, less, fn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - entries = [entries]; - less = [less]; - p = [p]; - /* */ if (less[0] === $throwNilPointerError) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (less[0] === $throwNilPointerError) { */ case 1: - $r = es.Range(fn); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; case 4: return; - /* } */ case 2: - _r = mapEntryPool.Get(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p[0] = $assertType(_r, ptrType$1); - entries[0] = $subslice((p[0].$get()), 0, 0); - $deferred.push([(function(entries, less, p) { return function() { - if (entries[0].$capacity < 1024) { - p[0].$set(entries[0]); - mapEntryPool.Put(p[0]); - } - }; })(entries, less, p), []]); - $r = es.Range((function(entries, less, p) { return function(k, v) { - var k, v; - entries[0] = $append(entries[0], new mapEntry.ptr($clone(k, protoreflect.MapKey), $clone(v, protoreflect.Value))); - return true; - }; })(entries, less, p)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.Slice(entries[0], (function(entries, less, p) { return function $b(i, j) { - var {$24r, _r$1, i, j, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = less[0]($clone(((i < 0 || i >= entries[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : entries[0].$array[entries[0].$offset + i]).k, protoreflect.MapKey), $clone(((j < 0 || j >= entries[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : entries[0].$array[entries[0].$offset + j]).k, protoreflect.MapKey)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, i, j, $s};return $f; - }; })(entries, less, p)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = entries[0]; - _i = 0; - /* while (true) { */ case 8: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } - e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), mapEntry); - _r$1 = fn($clone(e.k, protoreflect.MapKey), $clone(e.v, protoreflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$1) { */ case 10: - $s = 13; case 13: return; - /* } */ case 11: - _i++; - $s = 8; continue; - case 9: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: RangeEntries, $c: true, $r, _i, _r, _r$1, _ref, e, entries, es, fn, less, p, $s, $deferred};return $f; } } - }; - $pkg.RangeEntries = RangeEntries; - messageField.init("google.golang.org/protobuf/internal/order", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: protoreflect.FieldDescriptor, tag: ""}, {prop: "v", name: "v", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - mapEntry.init("google.golang.org/protobuf/internal/order", [{prop: "k", name: "k", embedded: false, exported: false, typ: protoreflect.MapKey, tag: ""}, {prop: "v", name: "v", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = protoreflect.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - messageFieldPool = new sync.Pool.ptr(sliceType.nil, (function() { - return $newDataPointer(sliceType$1.nil, ptrType); - })); - mapEntryPool = new sync.Pool.ptr(sliceType.nil, (function() { - return $newDataPointer(sliceType$2.nil, ptrType$1); - })); - $pkg.AnyFieldOrder = $throwNilPointerError; - $pkg.LegacyFieldOrder = (function $b(x, y) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, _v$1, inOneof, ox, oy, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = x.ContainingOneof(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp = _r; - _r$1 = y.ContainingOneof(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$1 = _r$1; - ox = _tmp; - oy = _tmp$1; - inOneof = (function $b(od) { - var {$24r, _r$2, _v, od, $s, $r, $c} = $restore(this, {od}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!(!($interfaceIsEqual(od, $ifaceNil)))) { _v = false; $s = 1; continue s; } - _r$2 = od.IsSynthetic(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = !_r$2; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$2, _v, od, $s};return $f; - }); - _r$2 = x.IsExtension(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = y.IsExtension(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!(_r$2 === _r$3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(_r$2 === _r$3)) { */ case 3: - _r$4 = x.IsExtension(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - if (!(_r$4)) { _v = false; $s = 7; continue s; } - _r$5 = y.IsExtension(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v = !_r$5; case 7: - $24r = _v; - $s = 10; case 10: return $24r; - /* } */ case 4: - _r$6 = inOneof(ox); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = inOneof(oy); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (!(_r$6 === _r$7)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(_r$6 === _r$7)) { */ case 11: - _r$8 = inOneof(ox); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(!_r$8)) { _v$1 = false; $s = 15; continue s; } - _r$9 = inOneof(oy); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9; case 15: - $24r$1 = _v$1; - $s = 18; case 18: return $24r$1; - /* } */ case 12: - /* */ if (!($interfaceIsEqual(ox, $ifaceNil)) && !($interfaceIsEqual(oy, $ifaceNil)) && !($interfaceIsEqual(ox, oy))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(ox, $ifaceNil)) && !($interfaceIsEqual(oy, $ifaceNil)) && !($interfaceIsEqual(ox, oy))) { */ case 19: - _r$10 = ox.Index(); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = oy.Index(); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$2 = _r$10 < _r$11; - $s = 23; case 23: return $24r$2; - /* } */ case 20: - _r$12 = x.Number(); /* */ $s = 24; case 24: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = y.Number(); /* */ $s = 25; case 25: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$3 = _r$12 < _r$13; - $s = 26; case 26: return $24r$3; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, _v$1, inOneof, ox, oy, x, y, $s};return $f; - }); - $pkg.NumberFieldOrder = (function $b(x, y) { - var {$24r, _r, _r$1, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = x.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = y.Number(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r < _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r, _r$1, x, y, $s};return $f; - }); - $pkg.IndexNameFieldOrder = (function $b(x, y) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = x.IsExtension(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = y.IsExtension(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!(_r === _r$1)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(_r === _r$1)) { */ case 1: - _r$2 = x.IsExtension(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - if (!(!_r$2)) { _v = false; $s = 5; continue s; } - _r$3 = y.IsExtension(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3; case 5: - $24r = _v; - $s = 8; case 8: return $24r; - /* } */ case 2: - _r$4 = x.IsExtension(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - if (!(_r$4)) { _v$1 = false; $s = 11; continue s; } - _r$5 = y.IsExtension(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v$1 = _r$5; case 11: - /* */ if (_v$1) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v$1) { */ case 9: - _r$6 = x.FullName(); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = y.FullName(); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$6 < _r$7; - $s = 16; case 16: return $24r$1; - /* } */ case 10: - _r$8 = x.Index(); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = y.Index(); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$2 = _r$8 < _r$9; - $s = 19; case 19: return $24r$2; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, x, y, $s};return $f; - }); - $pkg.AnyKeyOrder = $throwNilPointerError; - $pkg.GenericKeyOrder = (function $b(x, y) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _v, x, x$1, x$2, x$3, x$4, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(x, protoreflect.MapKey).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _ref = _r; - /* */ if ($assertType(_ref, $Bool, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, $Int32, true)[1] || $assertType(_ref, $Int64, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, $Uint32, true)[1] || $assertType(_ref, $Uint64, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, $String, true)[1]) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($assertType(_ref, $Bool, true)[1]) { */ case 2: - _r$1 = $clone(x, protoreflect.MapKey).Bool(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (!(!_r$1)) { _v = false; $s = 8; continue s; } - _r$2 = $clone(y, protoreflect.MapKey).Bool(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2; case 8: - $24r = _v; - $s = 11; case 11: return $24r; - /* } else if ($assertType(_ref, $Int32, true)[1] || $assertType(_ref, $Int64, true)[1]) { */ case 3: - _r$3 = $clone(x, protoreflect.MapKey).Int(); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(y, protoreflect.MapKey).Int(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = (x$1 = _r$3, x$2 = _r$4, (x$1.$high < x$2.$high || (x$1.$high === x$2.$high && x$1.$low < x$2.$low))); - $s = 14; case 14: return $24r$1; - /* } else if ($assertType(_ref, $Uint32, true)[1] || $assertType(_ref, $Uint64, true)[1]) { */ case 4: - _r$5 = $clone(x, protoreflect.MapKey).Uint(); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(y, protoreflect.MapKey).Uint(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$2 = (x$3 = _r$5, x$4 = _r$6, (x$3.$high < x$4.$high || (x$3.$high === x$4.$high && x$3.$low < x$4.$low))); - $s = 17; case 17: return $24r$2; - /* } else if ($assertType(_ref, $String, true)[1]) { */ case 5: - _r$7 = $clone(x, protoreflect.MapKey).String(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(y, protoreflect.MapKey).String(); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$3 = _r$7 < _r$8; - $s = 20; case 20: return $24r$3; - /* } else { */ case 6: - $panic(new $String("invalid map key type")); - /* } */ case 7: - $s = -1; return false; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _v, x, x$1, x$2, x$3, x$4, y, $s};return $f; - }); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/reflect/protoregistry"] = (function() { - var $pkg = {}, $init, fmt, messageset, errors, flags, protoreflect, os, strings, sync, Files, packageDescriptor, nameSuffix, Types, typesByName, extensionsByMessage, extensionsByNumber, sliceType, ptrType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, interfaceType, funcType, mapType, mapType$1, funcType$1, funcType$2, funcType$3, conflictPolicy, ignoreConflict, globalMutex, _r, findDescriptorInMessage, rangeTopLevelDescriptors, typeName, amendErrorWithCaller, goPackage; - fmt = $packages["fmt"]; - messageset = $packages["google.golang.org/protobuf/internal/encoding/messageset"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - flags = $packages["google.golang.org/protobuf/internal/flags"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - os = $packages["os"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - Files = $pkg.Files = $newType(0, $kindStruct, "protoregistry.Files", true, "google.golang.org/protobuf/reflect/protoregistry", true, function(descsByName_, filesByPath_, numFiles_) { - this.$val = this; - if (arguments.length === 0) { - this.descsByName = false; - this.filesByPath = false; - this.numFiles = 0; - return; - } - this.descsByName = descsByName_; - this.filesByPath = filesByPath_; - this.numFiles = numFiles_; - }); - packageDescriptor = $pkg.packageDescriptor = $newType(0, $kindStruct, "protoregistry.packageDescriptor", true, "google.golang.org/protobuf/reflect/protoregistry", false, function(files_) { - this.$val = this; - if (arguments.length === 0) { - this.files = sliceType$1.nil; - return; - } - this.files = files_; - }); - nameSuffix = $pkg.nameSuffix = $newType(8, $kindString, "protoregistry.nameSuffix", true, "google.golang.org/protobuf/reflect/protoregistry", false, null); - Types = $pkg.Types = $newType(0, $kindStruct, "protoregistry.Types", true, "google.golang.org/protobuf/reflect/protoregistry", true, function(typesByName_, extensionsByMessage_, numEnums_, numMessages_, numExtensions_) { - this.$val = this; - if (arguments.length === 0) { - this.typesByName = false; - this.extensionsByMessage = false; - this.numEnums = 0; - this.numMessages = 0; - this.numExtensions = 0; - return; - } - this.typesByName = typesByName_; - this.extensionsByMessage = extensionsByMessage_; - this.numEnums = numEnums_; - this.numMessages = numMessages_; - this.numExtensions = numExtensions_; - }); - typesByName = $pkg.typesByName = $newType(4, $kindMap, "protoregistry.typesByName", true, "google.golang.org/protobuf/reflect/protoregistry", false, null); - extensionsByMessage = $pkg.extensionsByMessage = $newType(4, $kindMap, "protoregistry.extensionsByMessage", true, "google.golang.org/protobuf/reflect/protoregistry", false, null); - extensionsByNumber = $pkg.extensionsByNumber = $newType(4, $kindMap, "protoregistry.extensionsByNumber", true, "google.golang.org/protobuf/reflect/protoregistry", false, null); - sliceType = $sliceType($emptyInterface); - ptrType = $ptrType(Types); - sliceType$1 = $sliceType(protoreflect.FileDescriptor); - ptrType$1 = $ptrType(packageDescriptor); - ptrType$2 = $ptrType(Files); - ptrType$3 = $ptrType(nameSuffix); - interfaceType = $interfaceType([{prop: "GoPackagePath", name: "GoPackagePath", pkg: "", typ: $funcType([], [$String], false)}]); - funcType = $funcType([protoreflect.FileDescriptor], [$Bool], false); - mapType = $mapType(protoreflect.FullName, $emptyInterface); - mapType$1 = $mapType($String, sliceType$1); - funcType$1 = $funcType([protoreflect.EnumType], [$Bool], false); - funcType$2 = $funcType([protoreflect.MessageType], [$Bool], false); - funcType$3 = $funcType([protoreflect.ExtensionType], [$Bool], false); - Files.ptr.prototype.RegisterFile = function(file) { - var {$24r, $24r$1, $24r$2, $24r$3, _arg, _arg$1, _arg$2, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _key$1, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, _v$1, err, err$1, err$2, file, hasConflict, name, name$1, p, path, prev, prev$1, r, $s, $deferred, $r, $c} = $restore(this, {file}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - file = [file]; - hasConflict = [hasConflict]; - r = [r]; - r[0] = this; - /* */ if (r[0] === $pkg.GlobalFiles) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r[0] === $pkg.GlobalFiles) { */ case 1: - $r = globalMutex.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "Unlock"), []]); - /* } */ case 2: - if (r[0].descsByName === false) { - r[0].descsByName = $makeMap(protoreflect.FullName.keyFor, [{ k: "", v: new packageDescriptor.ptr(sliceType$1.nil) }]); - r[0].filesByPath = {}; - } - _r$1 = file[0].Path(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - path = _r$1; - prev = (_entry = r[0].filesByPath[$String.keyFor(path)], _entry !== undefined ? _entry.v : sliceType$1.nil); - /* */ if (prev.$length > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (prev.$length > 0) { */ case 5: - $r = r[0].checkGenProtoConflict(path); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = file[0].Path(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg = new $String(_r$2); - _r$3 = errors.New("file %q is already registered", new sliceType([_arg])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - _r$4 = amendErrorWithCaller(err$1, (0 >= prev.$length ? ($throwRuntimeError("index out of range"), undefined) : prev.$array[prev.$offset + 0]), file[0]); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$1 = _r$4; - if (!(r[0] === $pkg.GlobalFiles)) { _v = false; $s = 13; continue s; } - _r$5 = ignoreConflict(file[0], err$1); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v = _r$5; case 13: - /* */ if (!(_v)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(_v)) { */ case 11: - $24r = err$1; - $s = 15; case 15: return $24r; - /* } */ case 12: - /* } */ case 6: - _r$6 = file[0].Package(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - name = _r$6; - /* while (true) { */ case 17: - /* if (!(!(name === ""))) { break; } */ if(!(!(name === ""))) { $s = 18; continue; } - prev$1 = (_entry$1 = r[0].descsByName[protoreflect.FullName.keyFor(name)], _entry$1 !== undefined ? _entry$1.v : $ifaceNil); - _ref = prev$1; - /* */ if (_ref === $ifaceNil || $assertType(_ref, ptrType$1, true)[1]) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_ref === $ifaceNil || $assertType(_ref, ptrType$1, true)[1]) { */ case 19: - $s = 21; continue; - /* } else { */ case 20: - _r$7 = file[0].Path(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = new $String(_r$7); - _arg$2 = new protoreflect.FullName(name); - _r$8 = errors.New("file %q has a package name conflict over %v", new sliceType([_arg$1, _arg$2])); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - _r$9 = amendErrorWithCaller(err$2, prev$1, file[0]); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$2 = _r$9; - if (!(r[0] === $pkg.GlobalFiles)) { _v$1 = false; $s = 27; continue s; } - _r$10 = ignoreConflict(file[0], err$2); /* */ $s = 28; case 28: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$1 = _r$10; case 27: - /* */ if (_v$1) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_v$1) { */ case 25: - err$2 = $ifaceNil; - /* } */ case 26: - $24r$1 = err$2; - $s = 29; case 29: return $24r$1; - /* } */ case 21: - name = new protoreflect.FullName(name).Parent(); - $s = 17; continue; - case 18: - err[0] = $ifaceNil; - hasConflict[0] = false; - $r = rangeTopLevelDescriptors(file[0], (function(err, file, hasConflict, r) { return function $b(d) { - var {_arg$3, _arg$4, _entry$2, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _v$2, d, prev$2, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$11 = d.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - prev$2 = (_entry$2 = r[0].descsByName[protoreflect.FullName.keyFor(_r$11)], _entry$2 !== undefined ? _entry$2.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(prev$2, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(prev$2, $ifaceNil))) { */ case 2: - hasConflict[0] = true; - _r$12 = file[0].Path(); /* */ $s = 4; case 4: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$3 = new $String(_r$12); - _r$13 = d.FullName(); /* */ $s = 5; case 5: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$4 = new protoreflect.FullName(_r$13); - _r$14 = errors.New("file %q has a name conflict over %v", new sliceType([_arg$3, _arg$4])); /* */ $s = 6; case 6: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err[0] = _r$14; - _r$15 = amendErrorWithCaller(err[0], prev$2, file[0]); /* */ $s = 7; case 7: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err[0] = _r$15; - if (!(r[0] === $pkg.GlobalFiles)) { _v$2 = false; $s = 10; continue s; } - _r$16 = ignoreConflict(d, err[0]); /* */ $s = 11; case 11: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _v$2 = _r$16; case 10: - /* */ if (_v$2) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v$2) { */ case 8: - err[0] = $ifaceNil; - /* } */ case 9: - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg$3, _arg$4, _entry$2, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _v$2, d, prev$2, $s};return $f; - }; })(err, file, hasConflict, r)); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (hasConflict[0]) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (hasConflict[0]) { */ case 31: - $24r$2 = err[0]; - $s = 33; case 33: return $24r$2; - /* } */ case 32: - _r$11 = file[0].Package(); /* */ $s = 34; case 34: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - name$1 = _r$11; - /* while (true) { */ case 35: - /* if (!(!(name$1 === ""))) { break; } */ if(!(!(name$1 === ""))) { $s = 36; continue; } - if ($interfaceIsEqual((_entry$2 = r[0].descsByName[protoreflect.FullName.keyFor(name$1)], _entry$2 !== undefined ? _entry$2.v : $ifaceNil), $ifaceNil)) { - _key = name$1; (r[0].descsByName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.FullName.keyFor(_key)] = { k: _key, v: new packageDescriptor.ptr(sliceType$1.nil) }; - } - name$1 = new protoreflect.FullName(name$1).Parent(); - $s = 35; continue; - case 36: - _r$12 = file[0].Package(); /* */ $s = 37; case 37: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - p = $assertType((_entry$3 = r[0].descsByName[protoreflect.FullName.keyFor(_r$12)], _entry$3 !== undefined ? _entry$3.v : $ifaceNil), ptrType$1); - p.files = $append(p.files, file[0]); - $r = rangeTopLevelDescriptors(file[0], (function(err, file, hasConflict, r) { return function $b(d) { - var {_key$1, _r$13, d, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$13 = d.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _key$1 = _r$13; (r[0].descsByName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.FullName.keyFor(_key$1)] = { k: _key$1, v: d }; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _key$1, _r$13, d, $s};return $f; - }; })(err, file, hasConflict, r)); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _key$1 = path; (r[0].filesByPath || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$4 = r[0].filesByPath[$String.keyFor(path)], _entry$4 !== undefined ? _entry$4.v : sliceType$1.nil), file[0]) }; - r[0].numFiles = r[0].numFiles + (1) >> 0; - $24r$3 = $ifaceNil; - $s = 39; case 39: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.RegisterFile, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _arg, _arg$1, _arg$2, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _key$1, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, _v$1, err, err$1, err$2, file, hasConflict, name, name$1, p, path, prev, prev$1, r, $s, $deferred};return $f; } } - }; - Files.prototype.RegisterFile = function(file) { return this.$val.RegisterFile(file); }; - Files.ptr.prototype.checkGenProtoConflict = function(path) { - var {_1, _r$1, currPath, path, pkgName, prevPath, r, $s, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (!(r === $pkg.GlobalFiles)) { - $s = -1; return; - } - prevPath = ""; - _1 = path; - if (_1 === ("google/protobuf/field_mask.proto")) { - prevPath = "google.golang.org/genproto/protobuf/field_mask"; - } else if (_1 === ("google/protobuf/api.proto")) { - prevPath = "google.golang.org/genproto/protobuf/api"; - } else if (_1 === ("google/protobuf/type.proto")) { - prevPath = "google.golang.org/genproto/protobuf/ptype"; - } else if (_1 === ("google/protobuf/source_context.proto")) { - prevPath = "google.golang.org/genproto/protobuf/source_context"; - } else { - $s = -1; return; - } - pkgName = strings.TrimSuffix(strings.TrimPrefix(path, "google/protobuf/"), ".proto"); - pkgName = strings.Replace(pkgName, "_", "", -1) + "pb"; - currPath = "google.golang.org/protobuf/types/known/" + pkgName; - _r$1 = fmt.Sprintf("duplicate registration of %q\n\nThe generated definition for this file has moved:\n\tfrom: %q\n\tto: %q\nA dependency on the %q module must\nbe at version %v or higher.\n\nUpgrade the dependency by running:\n\tgo get -u %v\n", new sliceType([new $String(path), new $String(prevPath), new $String(currPath), new $String("google.golang.org/genproto"), new $String("cb27e3aa (May 26th, 2020)"), new $String(prevPath)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Files.ptr.prototype.checkGenProtoConflict, $c: true, $r, _1, _r$1, currPath, path, pkgName, prevPath, r, $s};return $f; - }; - Files.prototype.checkGenProtoConflict = function(path) { return this.$val.checkGenProtoConflict(path); }; - Files.ptr.prototype.FindDescriptorByName = function(name) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _entry, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _v, _v$1, d, d$1, d$2, d$3, d$4, d$5, d$6, d$7, name, ok, prefix, r, suffix, suffix$24ptr, $s, $deferred, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType$2.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalFiles) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalFiles) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - prefix = name; - suffix = ""; - /* while (true) { */ case 7: - /* if (!(!(prefix === ""))) { break; } */ if(!(!(prefix === ""))) { $s = 8; continue; } - _tuple = (_entry = r.descsByName[protoreflect.FullName.keyFor(prefix)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - d = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ok) { */ case 9: - _ref = d; - /* */ if ($assertType(_ref, protoreflect.EnumDescriptor, true)[1]) { $s = 11; continue; } - /* */ if ($assertType(_ref, protoreflect.EnumValueDescriptor, true)[1]) { $s = 12; continue; } - /* */ if ($assertType(_ref, protoreflect.MessageDescriptor, true)[1]) { $s = 13; continue; } - /* */ if ($assertType(_ref, protoreflect.FieldDescriptor, true)[1]) { $s = 14; continue; } - /* */ if ($assertType(_ref, protoreflect.ServiceDescriptor, true)[1]) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($assertType(_ref, protoreflect.EnumDescriptor, true)[1]) { */ case 11: - d$1 = _ref; - _r$1 = d$1.FullName(); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1 === name) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_r$1 === name) { */ case 17: - $24r$1 = [d$1, $ifaceNil]; - $s = 20; case 20: return $24r$1; - /* } */ case 18: - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.EnumValueDescriptor, true)[1]) { */ case 12: - d$2 = _ref; - _r$2 = d$2.FullName(); /* */ $s = 23; case 23: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2 === name) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_r$2 === name) { */ case 21: - $24r$2 = [d$2, $ifaceNil]; - $s = 24; case 24: return $24r$2; - /* } */ case 22: - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.MessageDescriptor, true)[1]) { */ case 13: - d$3 = _ref; - _r$3 = d$3.FullName(); /* */ $s = 27; case 27: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 === name) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_r$3 === name) { */ case 25: - $24r$3 = [d$3, $ifaceNil]; - $s = 28; case 28: return $24r$3; - /* } */ case 26: - _r$4 = findDescriptorInMessage(d$3, suffix); /* */ $s = 29; case 29: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - d$6 = _r$4; - if (!(!($interfaceIsEqual(d$6, $ifaceNil)))) { _v = false; $s = 32; continue s; } - _r$5 = d$6.FullName(); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v = _r$5 === name; case 32: - /* */ if (_v) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_v) { */ case 30: - $24r$4 = [d$6, $ifaceNil]; - $s = 34; case 34: return $24r$4; - /* } */ case 31: - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.FieldDescriptor, true)[1]) { */ case 14: - d$4 = _ref; - _r$6 = d$4.FullName(); /* */ $s = 37; case 37: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6 === name) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (_r$6 === name) { */ case 35: - $24r$5 = [d$4, $ifaceNil]; - $s = 38; case 38: return $24r$5; - /* } */ case 36: - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.ServiceDescriptor, true)[1]) { */ case 15: - d$5 = _ref; - _r$7 = d$5.FullName(); /* */ $s = 41; case 41: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7 === name) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (_r$7 === name) { */ case 39: - $24r$6 = [d$5, $ifaceNil]; - $s = 42; case 42: return $24r$6; - /* } */ case 40: - _r$8 = d$5.Methods(); /* */ $s = 43; case 43: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.ByName((suffix$24ptr || (suffix$24ptr = new ptrType$3(function() { return suffix; }, function($v) { suffix = $v; }))).Pop()); /* */ $s = 44; case 44: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - d$7 = _r$9; - if (!(!($interfaceIsEqual(d$7, $ifaceNil)))) { _v$1 = false; $s = 47; continue s; } - _r$10 = d$7.FullName(); /* */ $s = 48; case 48: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$1 = _r$10 === name; case 47: - /* */ if (_v$1) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (_v$1) { */ case 45: - $24r$7 = [d$7, $ifaceNil]; - $s = 49; case 49: return $24r$7; - /* } */ case 46: - /* } */ case 16: - $24r$8 = [$ifaceNil, $pkg.NotFound]; - $s = 50; case 50: return $24r$8; - /* } */ case 10: - prefix = new protoreflect.FullName(prefix).Parent(); - suffix = ($substring(name, (prefix.length + 1 >> 0))); - $s = 7; continue; - case 8: - $24r$9 = [$ifaceNil, $pkg.NotFound]; - $s = 51; case 51: return $24r$9; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.FindDescriptorByName, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _entry, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _v, _v$1, d, d$1, d$2, d$3, d$4, d$5, d$6, d$7, name, ok, prefix, r, suffix, suffix$24ptr, $s, $deferred};return $f; } } - }; - Files.prototype.FindDescriptorByName = function(name) { return this.$val.FindDescriptorByName(name); }; - findDescriptorInMessage = function(md, suffix) { - var {$24r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, ed, fd, i, md, md$1, name, od, suffix, suffix$24ptr, vd, xd, $s, $r, $c} = $restore(this, {md, suffix}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = (suffix$24ptr || (suffix$24ptr = new ptrType$3(function() { return suffix; }, function($v) { suffix = $v; }))).Pop(); - /* */ if (suffix === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (suffix === "") { */ case 1: - _r$1 = md.Enums(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.ByName(name); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - ed = _r$2; - if (!($interfaceIsEqual(ed, $ifaceNil))) { - $s = -1; return ed; - } - _r$3 = md.Enums(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.Len(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - i = _r$4 - 1 >> 0; - /* while (true) { */ case 7: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 8; continue; } - _r$5 = md.Enums(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Get(i); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Values(); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.ByName(name); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - vd = _r$8; - if (!($interfaceIsEqual(vd, $ifaceNil))) { - $s = -1; return vd; - } - i = i - (1) >> 0; - $s = 7; continue; - case 8: - _r$9 = md.Extensions(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.ByName(name); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - xd = _r$10; - if (!($interfaceIsEqual(xd, $ifaceNil))) { - $s = -1; return xd; - } - _r$11 = md.Fields(); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.ByName(name); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - fd = _r$12; - if (!($interfaceIsEqual(fd, $ifaceNil))) { - $s = -1; return fd; - } - _r$13 = md.Oneofs(); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = _r$13.ByName(name); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - od = _r$14; - if (!($interfaceIsEqual(od, $ifaceNil))) { - $s = -1; return od; - } - /* } */ case 2: - _r$15 = md.Messages(); /* */ $s = 19; case 19: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.ByName(name); /* */ $s = 20; case 20: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - md$1 = _r$16; - /* */ if (!($interfaceIsEqual(md$1, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(md$1, $ifaceNil))) { */ case 21: - if (suffix === "") { - $s = -1; return md$1; - } - _r$17 = findDescriptorInMessage(md$1, suffix); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 24; case 24: return $24r; - /* } */ case 22: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: findDescriptorInMessage, $c: true, $r, $24r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, ed, fd, i, md, md$1, name, od, suffix, suffix$24ptr, vd, xd, $s};return $f; - }; - $ptrType(nameSuffix).prototype.Pop = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, i, name, s; - name = ""; - s = this; - i = strings.IndexByte((s.$get()), 46); - if (i >= 0) { - _tmp = ($substring((s.$get()), 0, i)); - _tmp$1 = $substring((s.$get()), (i + 1 >> 0)); - name = _tmp; - s.$set(_tmp$1); - } else { - _tmp$2 = ((s.$get())); - _tmp$3 = ""; - name = _tmp$2; - s.$set(_tmp$3); - } - name = name; - return name; - }; - Files.ptr.prototype.FindFileByPath = function(path) { - var {$24r, $24r$1, $24r$2, $24r$3, _1, _entry, _r$1, fds, path, r, $s, $deferred, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType$2.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalFiles) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalFiles) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - fds = (_entry = r.filesByPath[$String.keyFor(path)], _entry !== undefined ? _entry.v : sliceType$1.nil); - _1 = fds.$length; - /* */ if (_1 === (0)) { $s = 8; continue; } - /* */ if (_1 === (1)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_1 === (0)) { */ case 8: - $24r$1 = [$ifaceNil, $pkg.NotFound]; - $s = 12; case 12: return $24r$1; - /* } else if (_1 === (1)) { */ case 9: - $24r$2 = [(0 >= fds.$length ? ($throwRuntimeError("index out of range"), undefined) : fds.$array[fds.$offset + 0]), $ifaceNil]; - $s = 13; case 13: return $24r$2; - /* } else { */ case 10: - _r$1 = errors.New("multiple files named %q", new sliceType([new $String(path)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$3 = [$ifaceNil, _r$1]; - $s = 15; case 15: return $24r$3; - /* } */ case 11: - case 7: - $s = -1; return [$ifaceNil, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.FindFileByPath, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _1, _entry, _r$1, fds, path, r, $s, $deferred};return $f; } } - }; - Files.prototype.FindFileByPath = function(path) { return this.$val.FindFileByPath(path); }; - Files.ptr.prototype.NumFiles = function() { - var {$24r, $24r$1, r, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType$2.nil) { */ case 1: - $24r = 0; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalFiles) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalFiles) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - $24r$1 = r.numFiles; - $s = 7; case 7: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.NumFiles, $c: true, $r, $24r, $24r$1, r, $s, $deferred};return $f; } } - }; - Files.prototype.NumFiles = function() { return this.$val.NumFiles(); }; - Files.ptr.prototype.RangeFiles = function(f) { - var {_entry, _i, _i$1, _keys, _r$1, _ref, _ref$1, f, file, files, r, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType$2.nil) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - /* */ if (r === $pkg.GlobalFiles) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalFiles) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _ref = r.filesByPath; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 7: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 8; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 7; continue; - } - files = _entry.v; - _ref$1 = files; - _i$1 = 0; - /* while (true) { */ case 9: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 10; continue; } - file = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$1 = f(file); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!_r$1) { */ case 11: - $s = 14; case 14: return; - /* } */ case 12: - _i$1++; - $s = 9; continue; - case 10: - _i++; - $s = 7; continue; - case 8: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.RangeFiles, $c: true, $r, _entry, _i, _i$1, _keys, _r$1, _ref, _ref$1, f, file, files, r, $s, $deferred};return $f; } } - }; - Files.prototype.RangeFiles = function(f) { return this.$val.RangeFiles(f); }; - Files.ptr.prototype.NumFilesByPackage = function(name) { - var {$24r, $24r$1, $24r$2, _entry, _tuple, name, ok, p, r, $s, $deferred, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType$2.nil) { */ case 1: - $24r = 0; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalFiles) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalFiles) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _tuple = $assertType((_entry = r.descsByName[protoreflect.FullName.keyFor(name)], _entry !== undefined ? _entry.v : $ifaceNil), ptrType$1, true); - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - $24r$1 = 0; - $s = 9; case 9: return $24r$1; - /* } */ case 8: - $24r$2 = p.files.$length; - $s = 10; case 10: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.NumFilesByPackage, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _tuple, name, ok, p, r, $s, $deferred};return $f; } } - }; - Files.prototype.NumFilesByPackage = function(name) { return this.$val.NumFilesByPackage(name); }; - Files.ptr.prototype.RangeFilesByPackage = function(name, f) { - var {_entry, _i, _r$1, _ref, _tuple, f, file, name, ok, p, r, $s, $deferred, $r, $c} = $restore(this, {name, f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType$2.nil) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - /* */ if (r === $pkg.GlobalFiles) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalFiles) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _tuple = $assertType((_entry = r.descsByName[protoreflect.FullName.keyFor(name)], _entry !== undefined ? _entry.v : $ifaceNil), ptrType$1, true); - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - $s = 9; case 9: return; - /* } */ case 8: - _ref = p.files; - _i = 0; - /* while (true) { */ case 10: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 11; continue; } - file = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = f(file); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!_r$1) { */ case 12: - $s = 15; case 15: return; - /* } */ case 13: - _i++; - $s = 10; continue; - case 11: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Files.ptr.prototype.RangeFilesByPackage, $c: true, $r, _entry, _i, _r$1, _ref, _tuple, f, file, name, ok, p, r, $s, $deferred};return $f; } } - }; - Files.prototype.RangeFilesByPackage = function(name, f) { return this.$val.RangeFilesByPackage(name, f); }; - rangeTopLevelDescriptors = function(fd, f) { - var {_r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, eds, f, fd, i, i$1, i$2, i$3, i$4, mds, sds, vds, xds, $s, $r, $c} = $restore(this, {fd, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fd.Enums(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - eds = _r$1; - _r$2 = eds.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - i = _r$2 - 1 >> 0; - /* while (true) { */ case 3: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 4; continue; } - _r$3 = eds.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = f(_r$3); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = eds.Get(i); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = _r$4.Values(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vds = _r$5; - _r$6 = vds.Len(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - i$1 = _r$6 - 1 >> 0; - /* while (true) { */ case 10: - /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 11; continue; } - _r$7 = vds.Get(i$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = f(_r$7); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$1 = i$1 - (1) >> 0; - $s = 10; continue; - case 11: - i = i - (1) >> 0; - $s = 3; continue; - case 4: - _r$8 = fd.Messages(); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - mds = _r$8; - _r$9 = mds.Len(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - i$2 = _r$9 - 1 >> 0; - /* while (true) { */ case 16: - /* if (!(i$2 >= 0)) { break; } */ if(!(i$2 >= 0)) { $s = 17; continue; } - _r$10 = mds.Get(i$2); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = f(_r$10); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$2 = i$2 - (1) >> 0; - $s = 16; continue; - case 17: - _r$11 = fd.Extensions(); /* */ $s = 20; case 20: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - xds = _r$11; - _r$12 = xds.Len(); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - i$3 = _r$12 - 1 >> 0; - /* while (true) { */ case 22: - /* if (!(i$3 >= 0)) { break; } */ if(!(i$3 >= 0)) { $s = 23; continue; } - _r$13 = xds.Get(i$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $r = f(_r$13); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$3 = i$3 - (1) >> 0; - $s = 22; continue; - case 23: - _r$14 = fd.Services(); /* */ $s = 26; case 26: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - sds = _r$14; - _r$15 = sds.Len(); /* */ $s = 27; case 27: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - i$4 = _r$15 - 1 >> 0; - /* while (true) { */ case 28: - /* if (!(i$4 >= 0)) { break; } */ if(!(i$4 >= 0)) { $s = 29; continue; } - _r$16 = sds.Get(i$4); /* */ $s = 30; case 30: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $r = f(_r$16); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$4 = i$4 - (1) >> 0; - $s = 28; continue; - case 29: - $s = -1; return; - /* */ } return; } var $f = {$blk: rangeTopLevelDescriptors, $c: true, $r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, eds, f, fd, i, i$1, i$2, i$3, i$4, mds, sds, vds, xds, $s};return $f; - }; - Types.ptr.prototype.RegisterMessage = function(mt) { - var {$24r, $24r$1, _r$1, _r$2, err, md, mt, r, $s, $deferred, $r, $c} = $restore(this, {mt}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - _r$1 = mt.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - md = _r$1; - /* */ if (r === $pkg.GlobalTypes) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (r === $pkg.GlobalTypes) { */ case 2: - $r = globalMutex.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "Unlock"), []]); - /* } */ case 3: - _r$2 = r.register("message", md, mt); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $24r = err; - $s = 8; case 8: return $24r; - /* } */ case 7: - r.numMessages = r.numMessages + (1) >> 0; - $24r$1 = $ifaceNil; - $s = 9; case 9: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RegisterMessage, $c: true, $r, $24r, $24r$1, _r$1, _r$2, err, md, mt, r, $s, $deferred};return $f; } } - }; - Types.prototype.RegisterMessage = function(mt) { return this.$val.RegisterMessage(mt); }; - Types.ptr.prototype.RegisterEnum = function(et) { - var {$24r, $24r$1, _r$1, _r$2, ed, err, et, r, $s, $deferred, $r, $c} = $restore(this, {et}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - _r$1 = et.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ed = _r$1; - /* */ if (r === $pkg.GlobalTypes) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (r === $pkg.GlobalTypes) { */ case 2: - $r = globalMutex.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "Unlock"), []]); - /* } */ case 3: - _r$2 = r.register("enum", ed, et); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $24r = err; - $s = 8; case 8: return $24r; - /* } */ case 7: - r.numEnums = r.numEnums + (1) >> 0; - $24r$1 = $ifaceNil; - $s = 9; case 9: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RegisterEnum, $c: true, $r, $24r, $24r$1, _r$1, _r$2, ed, err, et, r, $s, $deferred};return $f; } } - }; - Types.prototype.RegisterEnum = function(et) { return this.$val.RegisterEnum(et); }; - Types.ptr.prototype.RegisterExtension = function(xt) { - var {$24r, $24r$1, $24r$2, _entry, _entry$1, _entry$2, _entry$3, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, err, err$1, field, message, prev, r, xd, xt, $s, $deferred, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - _r$1 = xt.TypeDescriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - xd = _r$1; - /* */ if (r === $pkg.GlobalTypes) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (r === $pkg.GlobalTypes) { */ case 2: - $r = globalMutex.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "Unlock"), []]); - /* } */ case 3: - _r$2 = xd.Number(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - field = _r$2; - _r$3 = xd.ContainingMessage(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - message = _r$4; - prev = (_entry = (_entry$1 = r.extensionsByMessage[protoreflect.FullName.keyFor(message)], _entry$1 !== undefined ? _entry$1.v : false)[$packages["google.golang.org/protobuf/encoding/protowire"].Number.keyFor(field)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(prev, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(prev, $ifaceNil))) { */ case 8: - _r$5 = errors.New("extension number %d is already registered on message %v", new sliceType([new $packages["google.golang.org/protobuf/encoding/protowire"].Number(field), new protoreflect.FullName(message)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err = _r$5; - _r$6 = amendErrorWithCaller(err, prev, xt); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!(r === $pkg.GlobalTypes)) { _v = false; $s = 14; continue s; } - _r$7 = ignoreConflict(xd, err); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = _r$7; case 14: - /* */ if (!(_v)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!(_v)) { */ case 12: - $24r = err; - $s = 16; case 16: return $24r; - /* } */ case 13: - /* } */ case 9: - _r$8 = r.register("extension", xd, xt); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$1 = _r$8; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 18: - $24r$1 = err$1; - $s = 20; case 20: return $24r$1; - /* } */ case 19: - if (r.extensionsByMessage === false) { - r.extensionsByMessage = {}; - } - if ((_entry$2 = r.extensionsByMessage[protoreflect.FullName.keyFor(message)], _entry$2 !== undefined ? _entry$2.v : false) === false) { - _key = message; (r.extensionsByMessage || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.FullName.keyFor(_key)] = { k: _key, v: {} }; - } - _key$1 = field; ((_entry$3 = r.extensionsByMessage[protoreflect.FullName.keyFor(message)], _entry$3 !== undefined ? _entry$3.v : false) || $throwRuntimeError("assignment to entry in nil map"))[$packages["google.golang.org/protobuf/encoding/protowire"].Number.keyFor(_key$1)] = { k: _key$1, v: xt }; - r.numExtensions = r.numExtensions + (1) >> 0; - $24r$2 = $ifaceNil; - $s = 21; case 21: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RegisterExtension, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _entry$1, _entry$2, _entry$3, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, err, err$1, field, message, prev, r, xd, xt, $s, $deferred};return $f; } } - }; - Types.prototype.RegisterExtension = function(xt) { return this.$val.RegisterExtension(xt); }; - Types.ptr.prototype.register = function(kind, desc, typ) { - var {_entry, _key, _r$1, _r$2, _r$3, _r$4, _v, desc, err, kind, name, prev, r, typ, $s, $r, $c} = $restore(this, {kind, desc, typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = desc.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - name = _r$1; - prev = (_entry = r.typesByName[protoreflect.FullName.keyFor(name)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(prev, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(prev, $ifaceNil))) { */ case 2: - _r$2 = errors.New("%v %v is already registered", new sliceType([new $String(kind), new protoreflect.FullName(name)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - _r$3 = amendErrorWithCaller(err, prev, typ); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!(r === $pkg.GlobalTypes)) { _v = false; $s = 8; continue s; } - _r$4 = ignoreConflict(desc, err); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4; case 8: - /* */ if (!(_v)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(_v)) { */ case 6: - $s = -1; return err; - /* } */ case 7: - /* } */ case 3: - if (r.typesByName === false) { - r.typesByName = {}; - } - _key = name; (r.typesByName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.FullName.keyFor(_key)] = { k: _key, v: typ }; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Types.ptr.prototype.register, $c: true, $r, _entry, _key, _r$1, _r$2, _r$3, _r$4, _v, desc, err, kind, name, prev, r, typ, $s};return $f; - }; - Types.prototype.register = function(kind, desc, typ) { return this.$val.register(kind, desc, typ); }; - Types.ptr.prototype.FindEnumByName = function(enum$1) { - var {$24r, $24r$1, $24r$2, $24r$3, _arg, _entry, _r$1, _r$2, _tuple, enum$1, et, r, v, $s, $deferred, $r, $c} = $restore(this, {enum$1}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - v = (_entry = r.typesByName[protoreflect.FullName.keyFor(enum$1)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(v, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(v, $ifaceNil))) { */ case 7: - _tuple = $assertType(v, protoreflect.EnumType, true); - et = _tuple[0]; - /* */ if (!($interfaceIsEqual(et, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(et, $ifaceNil))) { */ case 9: - $24r$1 = [et, $ifaceNil]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - _r$1 = typeName(v); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = new $String(_r$1); - _r$2 = errors.New("found wrong type: got %v, want enum", new sliceType([_arg])); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = [$ifaceNil, _r$2]; - $s = 14; case 14: return $24r$2; - /* } */ case 8: - $24r$3 = [$ifaceNil, $pkg.NotFound]; - $s = 15; case 15: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.FindEnumByName, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _arg, _entry, _r$1, _r$2, _tuple, enum$1, et, r, v, $s, $deferred};return $f; } } - }; - Types.prototype.FindEnumByName = function(enum$1) { return this.$val.FindEnumByName(enum$1); }; - Types.ptr.prototype.FindMessageByName = function(message) { - var {$24r, $24r$1, $24r$2, $24r$3, _arg, _entry, _r$1, _r$2, _tuple, message, mt, r, v, $s, $deferred, $r, $c} = $restore(this, {message}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - v = (_entry = r.typesByName[protoreflect.FullName.keyFor(message)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(v, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(v, $ifaceNil))) { */ case 7: - _tuple = $assertType(v, protoreflect.MessageType, true); - mt = _tuple[0]; - /* */ if (!($interfaceIsEqual(mt, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(mt, $ifaceNil))) { */ case 9: - $24r$1 = [mt, $ifaceNil]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - _r$1 = typeName(v); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = new $String(_r$1); - _r$2 = errors.New("found wrong type: got %v, want message", new sliceType([_arg])); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = [$ifaceNil, _r$2]; - $s = 14; case 14: return $24r$2; - /* } */ case 8: - $24r$3 = [$ifaceNil, $pkg.NotFound]; - $s = 15; case 15: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.FindMessageByName, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _arg, _entry, _r$1, _r$2, _tuple, message, mt, r, v, $s, $deferred};return $f; } } - }; - Types.prototype.FindMessageByName = function(message) { return this.$val.FindMessageByName(message); }; - Types.ptr.prototype.FindMessageByURL = function(url) { - var {$24r, $24r$1, $24r$2, $24r$3, _arg, _entry, _r$1, _r$2, _tuple, i, message, mt, r, url, v, $s, $deferred, $r, $c} = $restore(this, {url}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - message = (url); - i = strings.LastIndexByte(url, 47); - if (i >= 0) { - message = $substring(message, (i + 1 >> 0)); - } - v = (_entry = r.typesByName[protoreflect.FullName.keyFor(message)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(v, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(v, $ifaceNil))) { */ case 7: - _tuple = $assertType(v, protoreflect.MessageType, true); - mt = _tuple[0]; - /* */ if (!($interfaceIsEqual(mt, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(mt, $ifaceNil))) { */ case 9: - $24r$1 = [mt, $ifaceNil]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - _r$1 = typeName(v); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = new $String(_r$1); - _r$2 = errors.New("found wrong type: got %v, want message", new sliceType([_arg])); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = [$ifaceNil, _r$2]; - $s = 14; case 14: return $24r$2; - /* } */ case 8: - $24r$3 = [$ifaceNil, $pkg.NotFound]; - $s = 15; case 15: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.FindMessageByURL, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _arg, _entry, _r$1, _r$2, _tuple, i, message, mt, r, url, v, $s, $deferred};return $f; } } - }; - Types.prototype.FindMessageByURL = function(url) { return this.$val.FindMessageByURL(url); }; - Types.ptr.prototype.FindExtensionByName = function(field) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, field, field$1, ok, r, v, v$1, xt, xt$1, $s, $deferred, $r, $c} = $restore(this, {field}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - v = (_entry = r.typesByName[protoreflect.FullName.keyFor(field)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(v, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(v, $ifaceNil))) { */ case 7: - _tuple = $assertType(v, protoreflect.ExtensionType, true); - xt = _tuple[0]; - /* */ if (!($interfaceIsEqual(xt, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(xt, $ifaceNil))) { */ case 9: - $24r$1 = [xt, $ifaceNil]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - /* */ if (false) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (false) { */ case 12: - _tuple$1 = $assertType(v, protoreflect.MessageType, true); - ok = _tuple$1[1]; - /* */ if (ok) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (ok) { */ case 14: - field$1 = new protoreflect.FullName(field).Append("message_set_extension"); - v$1 = (_entry$1 = r.typesByName[protoreflect.FullName.keyFor(field$1)], _entry$1 !== undefined ? _entry$1.v : $ifaceNil); - /* */ if (!($interfaceIsEqual(v$1, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(v$1, $ifaceNil))) { */ case 16: - _tuple$2 = $assertType(v$1, protoreflect.ExtensionType, true); - xt$1 = _tuple$2[0]; - /* */ if (!($interfaceIsEqual(xt$1, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(xt$1, $ifaceNil))) { */ case 18: - _r$1 = xt$1.TypeDescriptor(); /* */ $s = 22; case 22: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = messageset.IsMessageSetExtension(_r$1); /* */ $s = 23; case 23: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_r$2) { */ case 20: - $24r$2 = [xt$1, $ifaceNil]; - $s = 24; case 24: return $24r$2; - /* } */ case 21: - /* } */ case 19: - /* } */ case 17: - /* } */ case 15: - /* } */ case 13: - _r$3 = typeName(v); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg = new $String(_r$3); - _r$4 = errors.New("found wrong type: got %v, want extension", new sliceType([_arg])); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$3 = [$ifaceNil, _r$4]; - $s = 27; case 27: return $24r$3; - /* } */ case 8: - $24r$4 = [$ifaceNil, $pkg.NotFound]; - $s = 28; case 28: return $24r$4; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.FindExtensionByName, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, field, field$1, ok, r, v, v$1, xt, xt$1, $s, $deferred};return $f; } } - }; - Types.prototype.FindExtensionByName = function(field) { return this.$val.FindExtensionByName(field); }; - Types.ptr.prototype.FindExtensionByNumber = function(message, field) { - var {$24r, $24r$1, $24r$2, _entry, _entry$1, _tuple, field, message, ok, r, xt, $s, $deferred, $r, $c} = $restore(this, {message, field}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = [$ifaceNil, $pkg.NotFound]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _tuple = (_entry = (_entry$1 = r.extensionsByMessage[protoreflect.FullName.keyFor(message)], _entry$1 !== undefined ? _entry$1.v : false)[$packages["google.golang.org/protobuf/encoding/protowire"].Number.keyFor(field)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - xt = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (ok) { */ case 7: - $24r$1 = [xt, $ifaceNil]; - $s = 9; case 9: return $24r$1; - /* } */ case 8: - $24r$2 = [$ifaceNil, $pkg.NotFound]; - $s = 10; case 10: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.FindExtensionByNumber, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _entry$1, _tuple, field, message, ok, r, xt, $s, $deferred};return $f; } } - }; - Types.prototype.FindExtensionByNumber = function(message, field) { return this.$val.FindExtensionByNumber(message, field); }; - Types.ptr.prototype.NumEnums = function() { - var {$24r, $24r$1, r, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = 0; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - $24r$1 = r.numEnums; - $s = 7; case 7: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.NumEnums, $c: true, $r, $24r, $24r$1, r, $s, $deferred};return $f; } } - }; - Types.prototype.NumEnums = function() { return this.$val.NumEnums(); }; - Types.ptr.prototype.RangeEnums = function(f) { - var {_entry, _i, _keys, _r$1, _ref, _tuple, et, f, ok, r, typ, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _ref = r.typesByName; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 7: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 8; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 7; continue; - } - typ = _entry.v; - _tuple = $assertType(typ, protoreflect.EnumType, true); - et = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ok) { */ case 9: - _r$1 = f(et); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!_r$1) { */ case 11: - $s = 14; case 14: return; - /* } */ case 12: - /* } */ case 10: - _i++; - $s = 7; continue; - case 8: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RangeEnums, $c: true, $r, _entry, _i, _keys, _r$1, _ref, _tuple, et, f, ok, r, typ, $s, $deferred};return $f; } } - }; - Types.prototype.RangeEnums = function(f) { return this.$val.RangeEnums(f); }; - Types.ptr.prototype.NumMessages = function() { - var {$24r, $24r$1, r, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = 0; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - $24r$1 = r.numMessages; - $s = 7; case 7: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.NumMessages, $c: true, $r, $24r, $24r$1, r, $s, $deferred};return $f; } } - }; - Types.prototype.NumMessages = function() { return this.$val.NumMessages(); }; - Types.ptr.prototype.RangeMessages = function(f) { - var {_entry, _i, _keys, _r$1, _ref, _tuple, f, mt, ok, r, typ, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _ref = r.typesByName; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 7: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 8; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 7; continue; - } - typ = _entry.v; - _tuple = $assertType(typ, protoreflect.MessageType, true); - mt = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ok) { */ case 9: - _r$1 = f(mt); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!_r$1) { */ case 11: - $s = 14; case 14: return; - /* } */ case 12: - /* } */ case 10: - _i++; - $s = 7; continue; - case 8: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RangeMessages, $c: true, $r, _entry, _i, _keys, _r$1, _ref, _tuple, f, mt, ok, r, typ, $s, $deferred};return $f; } } - }; - Types.prototype.RangeMessages = function(f) { return this.$val.RangeMessages(f); }; - Types.ptr.prototype.NumExtensions = function() { - var {$24r, $24r$1, r, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = 0; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - $24r$1 = r.numExtensions; - $s = 7; case 7: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.NumExtensions, $c: true, $r, $24r, $24r$1, r, $s, $deferred};return $f; } } - }; - Types.prototype.NumExtensions = function() { return this.$val.NumExtensions(); }; - Types.ptr.prototype.RangeExtensions = function(f) { - var {_entry, _i, _keys, _r$1, _ref, _tuple, f, ok, r, typ, xt, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _ref = r.typesByName; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 7: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 8; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 7; continue; - } - typ = _entry.v; - _tuple = $assertType(typ, protoreflect.ExtensionType, true); - xt = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ok) { */ case 9: - _r$1 = f(xt); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!_r$1) { */ case 11: - $s = 14; case 14: return; - /* } */ case 12: - /* } */ case 10: - _i++; - $s = 7; continue; - case 8: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RangeExtensions, $c: true, $r, _entry, _i, _keys, _r$1, _ref, _tuple, f, ok, r, typ, xt, $s, $deferred};return $f; } } - }; - Types.prototype.RangeExtensions = function(f) { return this.$val.RangeExtensions(f); }; - Types.ptr.prototype.NumExtensionsByMessage = function(message) { - var {$24r, $24r$1, _entry, message, r, $s, $deferred, $r, $c} = $restore(this, {message}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $24r = 0; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - $24r$1 = $keys((_entry = r.extensionsByMessage[protoreflect.FullName.keyFor(message)], _entry !== undefined ? _entry.v : false)).length; - $s = 7; case 7: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.NumExtensionsByMessage, $c: true, $r, $24r, $24r$1, _entry, message, r, $s, $deferred};return $f; } } - }; - Types.prototype.NumExtensionsByMessage = function(message) { return this.$val.NumExtensionsByMessage(message); }; - Types.ptr.prototype.RangeExtensionsByMessage = function(message, f) { - var {_entry, _entry$1, _i, _keys, _r$1, _ref, f, message, r, xt, $s, $deferred, $r, $c} = $restore(this, {message, f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - r = this; - /* */ if (r === ptrType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r === ptrType.nil) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - /* */ if (r === $pkg.GlobalTypes) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r === $pkg.GlobalTypes) { */ case 4: - $r = globalMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(globalMutex, "RUnlock"), []]); - /* } */ case 5: - _ref = (_entry = r.extensionsByMessage[protoreflect.FullName.keyFor(message)], _entry !== undefined ? _entry.v : false); - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 7: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 8; continue; } - _entry$1 = _ref[_keys[_i]]; - if (_entry$1 === undefined) { - _i++; - /* continue; */ $s = 7; continue; - } - xt = _entry$1.v; - _r$1 = f(xt); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!_r$1) { */ case 9: - $s = 12; case 12: return; - /* } */ case 10: - _i++; - $s = 7; continue; - case 8: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Types.ptr.prototype.RangeExtensionsByMessage, $c: true, $r, _entry, _entry$1, _i, _keys, _r$1, _ref, f, message, r, xt, $s, $deferred};return $f; } } - }; - Types.prototype.RangeExtensionsByMessage = function(message, f) { return this.$val.RangeExtensionsByMessage(message, f); }; - typeName = function(t) { - var {$24r, _r$1, _ref, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = t; - /* */ if ($assertType(_ref, protoreflect.EnumType, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoreflect.MessageType, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, protoreflect.ExtensionType, true)[1]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($assertType(_ref, protoreflect.EnumType, true)[1]) { */ case 1: - $s = -1; return "enum"; - /* } else if ($assertType(_ref, protoreflect.MessageType, true)[1]) { */ case 2: - $s = -1; return "message"; - /* } else if ($assertType(_ref, protoreflect.ExtensionType, true)[1]) { */ case 3: - $s = -1; return "extension"; - /* } else { */ case 4: - _r$1 = fmt.Sprintf("%T", new sliceType([t])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 5: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: typeName, $c: true, $r, $24r, _r$1, _ref, t, $s};return $f; - }; - amendErrorWithCaller = function(err, prev, curr) { - var {$24r, _r$1, _r$2, _r$3, curr, currPkg, err, prev, prevPkg, $s, $r, $c} = $restore(this, {err, prev, curr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = goPackage(prev); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - prevPkg = _r$1; - _r$2 = goPackage(curr); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - currPkg = _r$2; - if (prevPkg === "" || currPkg === "" || prevPkg === currPkg) { - $s = -1; return err; - } - _r$3 = errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", new sliceType([err, new $String(prevPkg), new $String(currPkg)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: amendErrorWithCaller, $c: true, $r, $24r, _r$1, _r$2, _r$3, curr, currPkg, err, prev, prevPkg, $s};return $f; - }; - goPackage = function(v) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, d, d$1, d$2, d$3, d$4, ok, ok$1, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = v; - /* */ if ($assertType(_ref, protoreflect.EnumType, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoreflect.MessageType, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, protoreflect.ExtensionType, true)[1]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($assertType(_ref, protoreflect.EnumType, true)[1]) { */ case 1: - d = _ref; - _r$1 = d.Descriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - $s = 4; continue; - /* } else if ($assertType(_ref, protoreflect.MessageType, true)[1]) { */ case 2: - d$1 = _ref; - _r$2 = d$1.Descriptor(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v = _r$2; - $s = 4; continue; - /* } else if ($assertType(_ref, protoreflect.ExtensionType, true)[1]) { */ case 3: - d$2 = _ref; - _r$3 = d$2.TypeDescriptor(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = _r$3; - /* } */ case 4: - _tuple = $assertType(v, protoreflect.Descriptor, true); - d$3 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ok) { */ case 8: - _r$4 = d$3.ParentFile(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - v = _r$4; - /* } */ case 9: - _tuple$1 = $assertType(v, interfaceType, true); - d$4 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (ok$1) { */ case 11: - _r$5 = d$4.GoPackagePath(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 14; case 14: return $24r; - /* } */ case 12: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: goPackage, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, d, d$1, d$2, d$3, d$4, ok, ok$1, v, $s};return $f; - }; - ptrType$2.methods = [{prop: "RegisterFile", name: "RegisterFile", pkg: "", typ: $funcType([protoreflect.FileDescriptor], [$error], false)}, {prop: "checkGenProtoConflict", name: "checkGenProtoConflict", pkg: "google.golang.org/protobuf/reflect/protoregistry", typ: $funcType([$String], [], false)}, {prop: "FindDescriptorByName", name: "FindDescriptorByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.Descriptor, $error], false)}, {prop: "FindFileByPath", name: "FindFileByPath", pkg: "", typ: $funcType([$String], [protoreflect.FileDescriptor, $error], false)}, {prop: "NumFiles", name: "NumFiles", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "RangeFiles", name: "RangeFiles", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "NumFilesByPackage", name: "NumFilesByPackage", pkg: "", typ: $funcType([protoreflect.FullName], [$Int], false)}, {prop: "RangeFilesByPackage", name: "RangeFilesByPackage", pkg: "", typ: $funcType([protoreflect.FullName, funcType], [], false)}]; - ptrType$3.methods = [{prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [protoreflect.Name], false)}]; - ptrType.methods = [{prop: "RegisterMessage", name: "RegisterMessage", pkg: "", typ: $funcType([protoreflect.MessageType], [$error], false)}, {prop: "RegisterEnum", name: "RegisterEnum", pkg: "", typ: $funcType([protoreflect.EnumType], [$error], false)}, {prop: "RegisterExtension", name: "RegisterExtension", pkg: "", typ: $funcType([protoreflect.ExtensionType], [$error], false)}, {prop: "register", name: "register", pkg: "google.golang.org/protobuf/reflect/protoregistry", typ: $funcType([$String, protoreflect.Descriptor, $emptyInterface], [$error], false)}, {prop: "FindEnumByName", name: "FindEnumByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.EnumType, $error], false)}, {prop: "FindMessageByName", name: "FindMessageByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.MessageType, $error], false)}, {prop: "FindMessageByURL", name: "FindMessageByURL", pkg: "", typ: $funcType([$String], [protoreflect.MessageType, $error], false)}, {prop: "FindExtensionByName", name: "FindExtensionByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.ExtensionType, $error], false)}, {prop: "FindExtensionByNumber", name: "FindExtensionByNumber", pkg: "", typ: $funcType([protoreflect.FullName, $packages["google.golang.org/protobuf/encoding/protowire"].Number], [protoreflect.ExtensionType, $error], false)}, {prop: "NumEnums", name: "NumEnums", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "RangeEnums", name: "RangeEnums", pkg: "", typ: $funcType([funcType$1], [], false)}, {prop: "NumMessages", name: "NumMessages", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "RangeMessages", name: "RangeMessages", pkg: "", typ: $funcType([funcType$2], [], false)}, {prop: "NumExtensions", name: "NumExtensions", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "RangeExtensions", name: "RangeExtensions", pkg: "", typ: $funcType([funcType$3], [], false)}, {prop: "NumExtensionsByMessage", name: "NumExtensionsByMessage", pkg: "", typ: $funcType([protoreflect.FullName], [$Int], false)}, {prop: "RangeExtensionsByMessage", name: "RangeExtensionsByMessage", pkg: "", typ: $funcType([protoreflect.FullName, funcType$3], [], false)}]; - Files.init("google.golang.org/protobuf/reflect/protoregistry", [{prop: "descsByName", name: "descsByName", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "filesByPath", name: "filesByPath", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "numFiles", name: "numFiles", embedded: false, exported: false, typ: $Int, tag: ""}]); - packageDescriptor.init("google.golang.org/protobuf/reflect/protoregistry", [{prop: "files", name: "files", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - Types.init("google.golang.org/protobuf/reflect/protoregistry", [{prop: "typesByName", name: "typesByName", embedded: false, exported: false, typ: typesByName, tag: ""}, {prop: "extensionsByMessage", name: "extensionsByMessage", embedded: false, exported: false, typ: extensionsByMessage, tag: ""}, {prop: "numEnums", name: "numEnums", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "numMessages", name: "numMessages", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "numExtensions", name: "numExtensions", embedded: false, exported: false, typ: $Int, tag: ""}]); - typesByName.init(protoreflect.FullName, $emptyInterface); - extensionsByMessage.init(protoreflect.FullName, extensionsByNumber); - extensionsByNumber.init($packages["google.golang.org/protobuf/encoding/protowire"].Number, protoreflect.ExtensionType); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = messageset.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flags.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - globalMutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - conflictPolicy = "panic"; - ignoreConflict = (function $b(d, err) { - var {_1, _r, _r$1, _r$2, _r$3, d, err, policy, v, $s, $r, $c} = $restore(this, {d, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - policy = conflictPolicy; - _r = os.Getenv("GOLANG_PROTOBUF_REGISTRATION_CONFLICT"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - if (!(v === "")) { - policy = v; - } - _1 = policy; - /* */ if (_1 === ("panic")) { $s = 3; continue; } - /* */ if (_1 === ("warn")) { $s = 4; continue; } - /* */ if (_1 === ("ignore")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === ("panic")) { */ case 3: - _r$1 = fmt.Sprintf("%v\nSee %v\n", new sliceType([err, new $String("https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict")])); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = 7; continue; - /* } else if (_1 === ("warn")) { */ case 4: - _r$2 = fmt.Fprintf(os.Stderr, "WARNING: %v\nSee %v\n\n", new sliceType([err, new $String("https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict")])); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return true; - /* } else if (_1 === ("ignore")) { */ case 5: - $s = -1; return true; - /* } else { */ case 6: - _r$3 = os.Getenv("GOLANG_PROTOBUF_REGISTRATION_CONFLICT"); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $panic(new $String("invalid GOLANG_PROTOBUF_REGISTRATION_CONFLICT value: " + _r$3)); - /* } */ case 7: - case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, d, err, policy, v, $s};return $f; - }); - $pkg.GlobalFiles = new Files.ptr(false, false, 0); - $pkg.GlobalTypes = new Types.ptr(false, false, 0, 0, 0); - _r = errors.New("not found", new sliceType([])); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $pkg.NotFound = _r; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/runtime/protoiface"] = (function() { - var $pkg = {}, $init, pragma, protoreflect, MessageV1; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - MessageV1 = $pkg.MessageV1 = $newType(8, $kindInterface, "protoiface.MessageV1", true, "google.golang.org/protobuf/runtime/protoiface", true, null); - MessageV1.init([{prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = pragma.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/proto"] = (function() { - var $pkg = {}, $init, bytes, fmt, protowire, messageset, errors, flags, genid, order, pragma, strs, protoreflect, protoregistry, protoiface, math, reflect, utf8, mergeOptions, MarshalOptions, UnmarshalOptions, arrayType, sliceType, structType, structType$1, funcType, sliceType$1, structType$2, structType$3, funcType$1, interfaceType, structType$4, structType$5, funcType$2, structType$6, funcType$3, structType$7, structType$8, funcType$4, structType$9, ptrType$8, interfaceType$1, funcType$5, arrayType$1, wireTypes, emptyBuf, errUnknown, errDecode, _r, _r$1, Size, Reset, resetMessage, protoMethods, init, Merge, Clone, emptyBytesForMessage, growcap, appendSpeculativeLength, finishSpeculativeLength, CheckInitialized, checkInitialized, checkInitializedSlow; - bytes = $packages["bytes"]; - fmt = $packages["fmt"]; - protowire = $packages["google.golang.org/protobuf/encoding/protowire"]; - messageset = $packages["google.golang.org/protobuf/internal/encoding/messageset"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - flags = $packages["google.golang.org/protobuf/internal/flags"]; - genid = $packages["google.golang.org/protobuf/internal/genid"]; - order = $packages["google.golang.org/protobuf/internal/order"]; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - strs = $packages["google.golang.org/protobuf/internal/strs"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoregistry = $packages["google.golang.org/protobuf/reflect/protoregistry"]; - protoiface = $packages["google.golang.org/protobuf/runtime/protoiface"]; - math = $packages["math"]; - reflect = $packages["reflect"]; - utf8 = $packages["unicode/utf8"]; - mergeOptions = $pkg.mergeOptions = $newType(0, $kindStruct, "proto.mergeOptions", true, "google.golang.org/protobuf/proto", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - MarshalOptions = $pkg.MarshalOptions = $newType(0, $kindStruct, "proto.MarshalOptions", true, "google.golang.org/protobuf/proto", true, function(NoUnkeyedLiterals_, AllowPartial_, Deterministic_, UseCachedSize_) { - this.$val = this; - if (arguments.length === 0) { - this.NoUnkeyedLiterals = new pragma.NoUnkeyedLiterals.ptr(); - this.AllowPartial = false; - this.Deterministic = false; - this.UseCachedSize = false; - return; - } - this.NoUnkeyedLiterals = NoUnkeyedLiterals_; - this.AllowPartial = AllowPartial_; - this.Deterministic = Deterministic_; - this.UseCachedSize = UseCachedSize_; - }); - UnmarshalOptions = $pkg.UnmarshalOptions = $newType(0, $kindStruct, "proto.UnmarshalOptions", true, "google.golang.org/protobuf/proto", true, function(NoUnkeyedLiterals_, Merge_, AllowPartial_, DiscardUnknown_, Resolver_, RecursionLimit_) { - this.$val = this; - if (arguments.length === 0) { - this.NoUnkeyedLiterals = new pragma.NoUnkeyedLiterals.ptr(); - this.Merge = false; - this.AllowPartial = false; - this.DiscardUnknown = false; - this.Resolver = $ifaceNil; - this.RecursionLimit = 0; - return; - } - this.NoUnkeyedLiterals = NoUnkeyedLiterals_; - this.Merge = Merge_; - this.AllowPartial = AllowPartial_; - this.DiscardUnknown = DiscardUnknown_; - this.Resolver = Resolver_; - this.RecursionLimit = RecursionLimit_; - }); - arrayType = $arrayType($Uint8, 0); - sliceType = $sliceType($emptyInterface); - structType = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - structType$1 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: $Int, tag: ""}]); - funcType = $funcType([structType], [structType$1], false); - sliceType$1 = $sliceType($Uint8); - structType$2 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - structType$3 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType$1, tag: ""}]); - funcType$1 = $funcType([structType$2], [structType$3, $error], false); - interfaceType = $interfaceType([{prop: "FindExtensionByName", name: "FindExtensionByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.ExtensionType, $error], false)}, {prop: "FindExtensionByNumber", name: "FindExtensionByNumber", pkg: "", typ: $funcType([protoreflect.FullName, protowire.Number], [protoreflect.ExtensionType, $error], false)}]); - structType$4 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: interfaceType, tag: ""}, {prop: "Depth", name: "Depth", embedded: false, exported: true, typ: $Int, tag: ""}]); - structType$5 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - funcType$2 = $funcType([structType$4], [structType$5, $error], false); - structType$6 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Source", name: "Source", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Destination", name: "Destination", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}]); - funcType$3 = $funcType([structType$6], [structType$5], false); - structType$7 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}]); - structType$8 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}]); - funcType$4 = $funcType([structType$7], [structType$8, $error], false); - structType$9 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Marshal", name: "Marshal", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "Unmarshal", name: "Unmarshal", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "Merge", name: "Merge", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "CheckInitialized", name: "CheckInitialized", embedded: false, exported: true, typ: funcType$4, tag: ""}]); - ptrType$8 = $ptrType(structType$9); - interfaceType$1 = $interfaceType([{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}]); - funcType$5 = $funcType([], [], false); - arrayType$1 = $arrayType(funcType$5, 0); - MarshalOptions.ptr.prototype.sizeSingular = function(num, kind, v) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, kind, num, o, v, x, x$1, x$2, $s, $r, $c} = $restore(this, {num, kind, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _1 = kind; - /* */ if (_1 === (8)) { $s = 2; continue; } - /* */ if (_1 === (14)) { $s = 3; continue; } - /* */ if (_1 === (5)) { $s = 4; continue; } - /* */ if (_1 === (17)) { $s = 5; continue; } - /* */ if (_1 === (13)) { $s = 6; continue; } - /* */ if (_1 === (3)) { $s = 7; continue; } - /* */ if (_1 === (18)) { $s = 8; continue; } - /* */ if (_1 === (4)) { $s = 9; continue; } - /* */ if (_1 === (15)) { $s = 10; continue; } - /* */ if (_1 === (7)) { $s = 11; continue; } - /* */ if (_1 === (2)) { $s = 12; continue; } - /* */ if (_1 === (16)) { $s = 13; continue; } - /* */ if (_1 === (6)) { $s = 14; continue; } - /* */ if (_1 === (1)) { $s = 15; continue; } - /* */ if (_1 === (9)) { $s = 16; continue; } - /* */ if (_1 === (12)) { $s = 17; continue; } - /* */ if (_1 === (11)) { $s = 18; continue; } - /* */ if (_1 === (10)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_1 === (8)) { */ case 2: - _r$2 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = protowire.EncodeBool(_r$2); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = protowire.SizeVarint(_r$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 25; case 25: return $24r; - /* } else if (_1 === (14)) { */ case 3: - _r$5 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 26; case 26: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeVarint((new $Uint64(0, _r$5))); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 28; case 28: return $24r$1; - /* } else if (_1 === (5)) { */ case 4: - _r$7 = $clone(v, protoreflect.Value).Int(); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = protowire.SizeVarint((new $Uint64(0, (((x = _r$7, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 30; case 30: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$2 = _r$8; - $s = 31; case 31: return $24r$2; - /* } else if (_1 === (17)) { */ case 5: - _r$9 = $clone(v, protoreflect.Value).Int(); /* */ $s = 32; case 32: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.EncodeZigZag((new $Int64(0, (((x$1 = _r$9, x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 33; case 33: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = protowire.SizeVarint(_r$10); /* */ $s = 34; case 34: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$3 = _r$11; - $s = 35; case 35: return $24r$3; - /* } else if (_1 === (13)) { */ case 6: - _r$12 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = protowire.SizeVarint((new $Uint64(0, ((_r$12.$low >>> 0))))); /* */ $s = 37; case 37: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$4 = _r$13; - $s = 38; case 38: return $24r$4; - /* } else if (_1 === (3)) { */ case 7: - _r$14 = $clone(v, protoreflect.Value).Int(); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = protowire.SizeVarint(((x$2 = _r$14, new $Uint64(x$2.$high, x$2.$low)))); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$5 = _r$15; - $s = 41; case 41: return $24r$5; - /* } else if (_1 === (18)) { */ case 8: - _r$16 = $clone(v, protoreflect.Value).Int(); /* */ $s = 42; case 42: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = protowire.EncodeZigZag(_r$16); /* */ $s = 43; case 43: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = protowire.SizeVarint(_r$17); /* */ $s = 44; case 44: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$6 = _r$18; - $s = 45; case 45: return $24r$6; - /* } else if (_1 === (4)) { */ case 9: - _r$19 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 46; case 46: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = protowire.SizeVarint(_r$19); /* */ $s = 47; case 47: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r$7 = _r$20; - $s = 48; case 48: return $24r$7; - /* } else if (_1 === (15)) { */ case 10: - $s = -1; return protowire.SizeFixed32(); - /* } else if (_1 === (7)) { */ case 11: - $s = -1; return protowire.SizeFixed32(); - /* } else if (_1 === (2)) { */ case 12: - $s = -1; return protowire.SizeFixed32(); - /* } else if (_1 === (16)) { */ case 13: - $s = -1; return protowire.SizeFixed64(); - /* } else if (_1 === (6)) { */ case 14: - $s = -1; return protowire.SizeFixed64(); - /* } else if (_1 === (1)) { */ case 15: - $s = -1; return protowire.SizeFixed64(); - /* } else if (_1 === (9)) { */ case 16: - _r$21 = $clone(v, protoreflect.Value).String(); /* */ $s = 49; case 49: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = protowire.SizeBytes(_r$21.length); /* */ $s = 50; case 50: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $24r$8 = _r$22; - $s = 51; case 51: return $24r$8; - /* } else if (_1 === (12)) { */ case 17: - _r$23 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 52; case 52: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = protowire.SizeBytes(_r$23.$length); /* */ $s = 53; case 53: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - $24r$9 = _r$24; - $s = 54; case 54: return $24r$9; - /* } else if (_1 === (11)) { */ case 18: - _r$25 = $clone(v, protoreflect.Value).Message(); /* */ $s = 55; case 55: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = $clone(o, MarshalOptions).size(_r$25); /* */ $s = 56; case 56: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = protowire.SizeBytes(_r$26); /* */ $s = 57; case 57: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $24r$10 = _r$27; - $s = 58; case 58: return $24r$10; - /* } else if (_1 === (10)) { */ case 19: - _arg = num; - _r$28 = $clone(v, protoreflect.Value).Message(); /* */ $s = 59; case 59: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = $clone(o, MarshalOptions).size(_r$28); /* */ $s = 60; case 60: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _arg$1 = _r$29; - _r$30 = protowire.SizeGroup(_arg, _arg$1); /* */ $s = 61; case 61: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - $24r$11 = _r$30; - $s = 62; case 62: return $24r$11; - /* } else { */ case 20: - $s = -1; return 0; - /* } */ case 21: - case 1: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.sizeSingular, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, kind, num, o, v, x, x$1, x$2, $s};return $f; - }; - MarshalOptions.prototype.sizeSingular = function(num, kind, v) { return this.$val.sizeSingular(num, kind, v); }; - Size = function(m) { - var {$24r, _r$2, m, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = new MarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), false, false, false).Size(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Size, $c: true, $r, $24r, _r$2, m, $s};return $f; - }; - $pkg.Size = Size; - MarshalOptions.ptr.prototype.Size = function(m) { - var {$24r, _r$2, _r$3, m, o, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return 0; - } - _r$2 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(o, MarshalOptions).size(_r$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.Size, $c: true, $r, $24r, _r$2, _r$3, m, o, $s};return $f; - }; - MarshalOptions.prototype.Size = function(m) { return this.$val.Size(m); }; - MarshalOptions.ptr.prototype.size = function(m) { - var {$24r, _r$2, _r$3, _r$4, _r$5, _tuple, m, methods, o, out, out$1, size, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - o = this; - _r$2 = protoMethods(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - methods = _r$2; - /* */ if (!(methods === ptrType$8.nil) && !(methods.Size === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(methods === ptrType$8.nil) && !(methods.Size === $throwNilPointerError)) { */ case 2: - _r$3 = methods.Size(new structType.ptr(new pragma.NoUnkeyedLiterals.ptr(), m, 0)); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - out = $clone(_r$3, structType$1); - size = out.Size; - $s = -1; return size; - /* } */ case 3: - /* */ if (!(methods === ptrType$8.nil) && !(methods.Marshal === $throwNilPointerError)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(methods === ptrType$8.nil) && !(methods.Marshal === $throwNilPointerError)) { */ case 5: - _r$4 = methods.Marshal(new structType$2.ptr(new pragma.NoUnkeyedLiterals.ptr(), m, sliceType$1.nil, 0)); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - out$1 = $clone(_tuple[0], structType$3); - size = out$1.Buf.$length; - $s = -1; return size; - /* } */ case 6: - _r$5 = $clone(o, MarshalOptions).sizeMessageSlow(m); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - size = _r$5; - $24r = size; - $s = 9; case 9: return $24r; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.size, $c: true, $r, $24r, _r$2, _r$3, _r$4, _r$5, _tuple, m, methods, o, out, out$1, size, $s};return $f; - }; - MarshalOptions.prototype.size = function(m) { return this.$val.size(m); }; - MarshalOptions.ptr.prototype.sizeMessageSlow = function(m) { - var {$24r, _r$2, _r$3, _r$4, _r$5, m, o, size, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = [o]; - size = [size]; - size[0] = 0; - o[0] = this; - _r$2 = m.Descriptor(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = messageset.IsMessageSet(_r$2); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$3) { */ case 1: - _r$4 = $clone(o[0], MarshalOptions).sizeMessageSet(m); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - size[0] = _r$4; - $24r = size[0]; - $s = 6; case 6: return $24r; - /* } */ case 2: - $r = m.Range((function(o, size) { return function $b(fd, v) { - var {_r$5, fd, v, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(o[0], MarshalOptions).sizeField(fd, $clone(v, protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - size[0] = size[0] + (_r$5) >> 0; - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, fd, v, $s};return $f; - }; })(o, size)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.GetUnknown(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - size[0] = size[0] + (_r$5.$length) >> 0; - size[0] = size[0]; - $s = -1; return size[0]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.sizeMessageSlow, $c: true, $r, $24r, _r$2, _r$3, _r$4, _r$5, m, o, size, $s};return $f; - }; - MarshalOptions.prototype.sizeMessageSlow = function(m) { return this.$val.sizeMessageSlow(m); }; - MarshalOptions.ptr.prototype.sizeField = function(fd, value) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, fd, num, o, size, value, $s, $r, $c} = $restore(this, {fd, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - o = this; - _r$2 = fd.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - num = _r$2; - _r$3 = fd.IsList(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 3; continue; } - _r$4 = fd.IsMap(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$3) { */ case 3: - _arg = num; - _arg$1 = fd; - _r$5 = $clone(value, protoreflect.Value).List(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$2 = _r$5; - _r$6 = $clone(o, MarshalOptions).sizeList(_arg, _arg$1, _arg$2); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = _r$6; - $24r = size; - $s = 11; case 11: return $24r; - /* } else if (_r$4) { */ case 4: - _arg$3 = num; - _arg$4 = fd; - _r$7 = $clone(value, protoreflect.Value).Map(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$5 = _r$7; - _r$8 = $clone(o, MarshalOptions).sizeMap(_arg$3, _arg$4, _arg$5); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - size = _r$8; - $24r$1 = size; - $s = 14; case 14: return $24r$1; - /* } else { */ case 5: - _arg$6 = num; - _r$9 = fd.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$7 = _r$9; - _arg$8 = $clone(value, protoreflect.Value); - _r$10 = $clone(o, MarshalOptions).sizeSingular(_arg$6, _arg$7, _arg$8); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - size = protowire.SizeTag(num) + _r$10 >> 0; - $24r$2 = size; - $s = 17; case 17: return $24r$2; - /* } */ case 6: - case 2: - $s = -1; return size; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.sizeField, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, fd, num, o, size, value, $s};return $f; - }; - MarshalOptions.prototype.sizeField = function(fd, value) { return this.$val.sizeField(fd, value); }; - MarshalOptions.ptr.prototype.sizeList = function(num, fd, list) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, content, fd, i, i$1, list, llen, llen$1, num, o, size, $s, $r, $c} = $restore(this, {num, fd, list}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - o = this; - _r$2 = fd.IsPacked(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - if (!(_r$2)) { _v = false; $s = 3; continue s; } - _r$3 = list.Len(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3 > 0; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - content = 0; - _tmp = 0; - _r$4 = list.Len(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tmp$1 = _r$4; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 7: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 8; continue; } - _arg = num; - _r$5 = fd.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = list.Get(i); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$2 = $clone(_r$6, protoreflect.Value); - _r$7 = $clone(o, MarshalOptions).sizeSingular(_arg, _arg$1, _arg$2); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - content = content + (_r$7) >> 0; - i = i + (1) >> 0; - $s = 7; continue; - case 8: - size = protowire.SizeTag(num) + protowire.SizeBytes(content) >> 0; - $s = -1; return size; - /* } */ case 2: - _tmp$2 = 0; - _r$8 = list.Len(); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tmp$3 = _r$8; - i$1 = _tmp$2; - llen$1 = _tmp$3; - /* while (true) { */ case 13: - /* if (!(i$1 < llen$1)) { break; } */ if(!(i$1 < llen$1)) { $s = 14; continue; } - _arg$3 = num; - _r$9 = fd.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$4 = _r$9; - _r$10 = list.Get(i$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$5 = $clone(_r$10, protoreflect.Value); - _r$11 = $clone(o, MarshalOptions).sizeSingular(_arg$3, _arg$4, _arg$5); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - size = size + ((protowire.SizeTag(num) + _r$11 >> 0)) >> 0; - i$1 = i$1 + (1) >> 0; - $s = 13; continue; - case 14: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.sizeList, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, content, fd, i, i$1, list, llen, llen$1, num, o, size, $s};return $f; - }; - MarshalOptions.prototype.sizeList = function(num, fd, list) { return this.$val.sizeList(num, fd, list); }; - MarshalOptions.ptr.prototype.sizeMap = function(num, fd, mapv) { - var {fd, mapv, num, o, size, $s, $r, $c} = $restore(this, {num, fd, mapv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = [fd]; - num = [num]; - o = [o]; - size = [size]; - size[0] = 0; - o[0] = this; - $r = mapv.Range((function(fd, num, o, size) { return function $b(key, value) { - var {_r$2, _r$3, _r$4, _r$5, _r$6, key, value, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size[0] = size[0] + (protowire.SizeTag(num[0])) >> 0; - _r$2 = fd[0].MapKey(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(o[0], MarshalOptions).sizeField(_r$2, $clone($clone(key, protoreflect.MapKey).Value(), protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = fd[0].MapValue(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $clone(o[0], MarshalOptions).sizeField(_r$4, $clone(value, protoreflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeBytes(_r$3 + _r$5 >> 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size[0] = size[0] + (_r$6) >> 0; - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, _r$4, _r$5, _r$6, key, value, $s};return $f; - }; })(fd, num, o, size)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - size[0] = size[0]; - $s = -1; return size[0]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.sizeMap, $c: true, $r, fd, mapv, num, o, size, $s};return $f; - }; - MarshalOptions.prototype.sizeMap = function(num, fd, mapv) { return this.$val.sizeMap(num, fd, mapv); }; - Reset = function(m) { - var {_r$2, _tuple, m, mr, ok, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(m, interfaceType$1, true); - mr = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok && true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok && true) { */ case 1: - $r = mr.Reset(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _r$2 = m.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = resetMessage(_r$2); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Reset, $c: true, $r, _r$2, _tuple, m, mr, ok, $s};return $f; - }; - $pkg.Reset = Reset; - resetMessage = function(m) { - var {_arg, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, fds, i, m, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - _r$2 = m[0].IsValid(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$2) { */ case 1: - _r$3 = m[0].Descriptor(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.FullName(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$4); - _r$5 = fmt.Sprintf("cannot reset invalid %v message", new sliceType([_arg])); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - _r$6 = m[0].Descriptor(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Fields(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - fds = _r$7; - i = 0; - /* while (true) { */ case 9: - _r$8 = fds.Len(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* if (!(i < _r$8)) { break; } */ if(!(i < _r$8)) { $s = 10; continue; } - _r$9 = fds.Get(i); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = m[0].Clear(_r$9); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 9; continue; - case 10: - $r = m[0].Range((function(m) { return function $b(fd, param) { - var {fd, param, $s, $r, $c} = $restore(this, {fd, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = m[0].Clear(fd); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, fd, param, $s};return $f; - }; })(m)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = m[0].SetUnknown(protoreflect.RawFields.nil); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: resetMessage, $c: true, $r, _arg, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, fds, i, m, $s};return $f; - }; - protoMethods = function(m) { - var {$24r, _r$2, m, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = m.ProtoMethods(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: protoMethods, $c: true, $r, $24r, _r$2, m, $s};return $f; - }; - init = function() { - $pkg.Error = errors.Error; - }; - MarshalOptions.ptr.prototype.sizeMessageSet = function(m) { - var {_r$2, _r$3, m, o, size, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = [o]; - size = [size]; - size[0] = 0; - o[0] = this; - $r = m.Range((function(o, size) { return function $b(fd, v) { - var {_r$2, _r$3, _r$4, _r$5, _r$6, fd, v, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = fd.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = messageset.SizeField(_r$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - size[0] = size[0] + (_r$3) >> 0; - size[0] = size[0] + (protowire.SizeTag(3)) >> 0; - _r$4 = $clone(v, protoreflect.Value).Message(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $clone(o[0], MarshalOptions).size(_r$4); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeBytes(_r$5); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size[0] = size[0] + (_r$6) >> 0; - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, _r$4, _r$5, _r$6, fd, v, $s};return $f; - }; })(o, size)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = m.GetUnknown(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = messageset.SizeUnknown($convertSliceType(_r$2, sliceType$1)); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - size[0] = size[0] + (_r$3) >> 0; - size[0] = size[0]; - $s = -1; return size[0]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.sizeMessageSet, $c: true, $r, _r$2, _r$3, m, o, size, $s};return $f; - }; - MarshalOptions.prototype.sizeMessageSet = function(m) { return this.$val.sizeMessageSet(m); }; - MarshalOptions.ptr.prototype.marshalMessageSet = function(b, m) { - var {$24r, $24r$1, _arg, _arg$1, _r$2, _r$3, _r$4, b, err, fieldOrder, m, o, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - err = [err]; - o = [o]; - o[0] = this; - /* */ if (true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true) { */ case 1: - _r$2 = errors.New("no support for message_set_wire_format", new sliceType([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [b[0], _r$2]; - $s = 4; case 4: return $24r; - /* } */ case 2: - fieldOrder = order.AnyFieldOrder; - if (o[0].Deterministic) { - fieldOrder = order.NumberFieldOrder; - } - err[0] = $ifaceNil; - $r = order.RangeFields(m, fieldOrder, (function(b, err, o) { return function $b(fd, v) { - var {_r$3, _tuple, fd, v, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = $clone(o[0], MarshalOptions).marshalMessageSetField(b[0], fd, $clone(v, protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - b[0] = _tuple[0]; - err[0] = _tuple[1]; - $s = -1; return $interfaceIsEqual(err[0], $ifaceNil); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$3, _tuple, fd, v, $s};return $f; - }; })(b, err, o)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return [b[0], err[0]]; - } - _arg = b[0]; - _r$3 = m.GetUnknown(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = $convertSliceType(_r$3, sliceType$1); - _r$4 = messageset.AppendUnknown(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalMessageSet, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _r$2, _r$3, _r$4, b, err, fieldOrder, m, o, $s};return $f; - }; - MarshalOptions.prototype.marshalMessageSet = function(b, m) { return this.$val.marshalMessageSet(b, m); }; - MarshalOptions.ptr.prototype.marshalMessageSetField = function(b, fd, value) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, err, fd, o, value, $s, $r, $c} = $restore(this, {b, fd, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _arg = b; - _r$2 = fd.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = messageset.AppendFieldStart(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b = _r$3; - b = protowire.AppendTag(b, 3, 2); - _arg$2 = b; - _r$4 = $clone(value, protoreflect.Value).Message(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = _r$4.Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(o, MarshalOptions).Size(_r$5); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$3 = (new $Uint64(0, _r$6)); - _r$7 = protowire.AppendVarint(_arg$2, _arg$3); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - _arg$4 = b; - _r$8 = $clone(value, protoreflect.Value).Message(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$5 = _r$8; - _r$9 = $clone(o, MarshalOptions).marshalMessage(_arg$4, _arg$5); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - b = messageset.AppendFieldEnd(b); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalMessageSetField, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, err, fd, o, value, $s};return $f; - }; - MarshalOptions.prototype.marshalMessageSetField = function(b, fd, value) { return this.$val.marshalMessageSetField(b, fd, value); }; - UnmarshalOptions.ptr.prototype.unmarshalMessageSet = function(b, m) { - var {$24r, $24r$1, _r$2, _r$3, b, m, o, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - o = [o]; - o[0] = this; - /* */ if (true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true) { */ case 1: - _r$2 = errors.New("no support for message_set_wire_format", new sliceType([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$3 = messageset.Unmarshal(b, false, (function(m, o) { return function $b(num, v) { - var {_r$3, _r$4, err, num, unknown, v, $s, $r, $c} = $restore(this, {num, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = $clone(o[0], UnmarshalOptions).unmarshalMessageSetField(m[0], num, v); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - /* */ if ($interfaceIsEqual(err, errUnknown)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($interfaceIsEqual(err, errUnknown)) { */ case 2: - _r$4 = m[0].GetUnknown(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - unknown = _r$4; - unknown = $convertSliceType(protowire.AppendTag($convertSliceType(unknown, sliceType$1), num, 2), protoreflect.RawFields); - unknown = $convertSliceType(protowire.AppendBytes($convertSliceType(unknown, sliceType$1), v), protoreflect.RawFields); - $r = m[0].SetUnknown(unknown); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 3: - $s = -1; return err; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$3, _r$4, err, num, unknown, v, $s};return $f; - }; })(m, o)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalMessageSet, $c: true, $r, $24r, $24r$1, _r$2, _r$3, b, m, o, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalMessageSet = function(b, m) { return this.$val.unmarshalMessageSet(b, m); }; - UnmarshalOptions.ptr.prototype.unmarshalMessageSetField = function(m, num, v) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, err, err$1, m, md, num, o, v, xd, xt, $s, $r, $c} = $restore(this, {m, num, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = m.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - md = _r$2; - _r$3 = md.ExtensionRanges(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.Has(num); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!_r$4) { */ case 2: - $s = -1; return errUnknown; - /* } */ case 3: - _r$5 = md.FullName(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = o.Resolver.FindExtensionByNumber(_r$5, num); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - xt = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, protoregistry.NotFound)) { - $s = -1; return errUnknown; - } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: - _r$7 = md.FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$7); - _arg$1 = new protowire.Number(num); - _arg$2 = err; - _r$8 = errors.New("%v: unable to resolve extension %v: %v", new sliceType([_arg, _arg$1, _arg$2])); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 12; case 12: return $24r; - /* } */ case 9: - _r$9 = xt.TypeDescriptor(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - xd = _r$9; - _arg$3 = v; - _r$10 = m.Mutable(xd); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, protoreflect.Value).Message(); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$4 = _r$11; - _r$12 = $clone(o, UnmarshalOptions).unmarshalMessage(_arg$3, _arg$4); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$1 = _r$12; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalMessageSetField, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, err, err$1, m, md, num, o, v, xd, xt, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalMessageSetField = function(m, num, v) { return this.$val.unmarshalMessageSetField(m, num, v); }; - Merge = function(dst, src) { - var {_r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, dstMsg, got, src, srcMsg, want, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = dst.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp = _r$2; - _r$3 = src.ProtoReflect(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tmp$1 = _r$3; - dstMsg = _tmp; - srcMsg = _tmp$1; - _r$4 = dstMsg.Descriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = srcMsg.Descriptor(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$4, _r$5))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(_r$4, _r$5))) { */ case 3: - _r$6 = dstMsg.Descriptor(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.FullName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$2 = _r$7; - _r$8 = srcMsg.Descriptor(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tmp$3 = _r$9; - got = _tmp$2; - want = _tmp$3; - /* */ if (!(got === want)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(got === want)) { */ case 11: - _r$10 = fmt.Sprintf("descriptor mismatch: %v != %v", new sliceType([new protoreflect.FullName(got), new protoreflect.FullName(want)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $panic(new $String(_r$10)); - /* } */ case 12: - $panic(new $String("descriptor mismatch")); - /* } */ case 4: - $r = new mergeOptions.ptr().mergeMessage(dstMsg, srcMsg); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Merge, $c: true, $r, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, dstMsg, got, src, srcMsg, want, $s};return $f; - }; - $pkg.Merge = Merge; - Clone = function(m) { - var {$24r, $24r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, dst, m, src, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$2 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - src = _r$2; - _r$3 = src.IsValid(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!_r$3) { */ case 2: - _r$4 = src.Type(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = _r$4.Zero(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 8; case 8: return $24r; - /* } */ case 3: - _r$7 = src.New(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - dst = _r$7; - $r = new mergeOptions.ptr().mergeMessage(dst, src); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$8 = dst.Interface(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 12; case 12: return $24r$1; - /* */ } return; } var $f = {$blk: Clone, $c: true, $r, $24r, $24r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, dst, m, src, $s};return $f; - }; - $pkg.Clone = Clone; - mergeOptions.ptr.prototype.mergeMessage = function(dst, src) { - var {_arg, _arg$1, _arg$2, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, dst, in$1, methods, o, out, src, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dst = [dst]; - o = [o]; - o[0] = this; - _r$2 = protoMethods(dst[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - methods = _r$2; - /* */ if (!(methods === ptrType$8.nil) && !(methods.Merge === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(methods === ptrType$8.nil) && !(methods.Merge === $throwNilPointerError)) { */ case 2: - in$1 = new structType$6.ptr(new pragma.NoUnkeyedLiterals.ptr(), src, dst[0]); - _r$3 = methods.Merge($clone(in$1, structType$6)); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - out = $clone(_r$3, structType$5); - if (!((((out.Flags & 1) >>> 0) === 0))) { - $s = -1; return; - } - /* } */ case 3: - _r$4 = dst[0].IsValid(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!_r$4) { */ case 5: - _r$5 = dst[0].Descriptor(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$6); - _r$7 = fmt.Sprintf("cannot merge into invalid %v message", new sliceType([_arg])); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String(_r$7)); - /* } */ case 6: - $r = src.Range((function(dst, o) { return function $b(fd, v) { - var {_arg$1, _arg$10, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$8, _r$9, fd, v, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = fd.IsList(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8) { $s = 2; continue; } - _r$9 = fd.IsMap(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (_r$9) { $s = 3; continue; } - _r$10 = fd.Message(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$10, $ifaceNil))) { $s = 4; continue; } - _r$11 = fd.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if ((_r$11 === 12)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$8) { */ case 2: - _r$12 = dst[0].Mutable(fd); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, protoreflect.Value).List(); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$1 = _r$13; - _r$14 = $clone(v, protoreflect.Value).List(); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _arg$2 = _r$14; - _arg$3 = fd; - $r = $clone(o[0], mergeOptions).mergeList(_arg$1, _arg$2, _arg$3); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 7; continue; - /* } else if (_r$9) { */ case 3: - _r$15 = dst[0].Mutable(fd); /* */ $s = 16; case 16: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, protoreflect.Value).Map(); /* */ $s = 17; case 17: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg$4 = _r$16; - _r$17 = $clone(v, protoreflect.Value).Map(); /* */ $s = 18; case 18: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$5 = _r$17; - _r$18 = fd.MapValue(); /* */ $s = 19; case 19: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$6 = _r$18; - $r = $clone(o[0], mergeOptions).mergeMap(_arg$4, _arg$5, _arg$6); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 7; continue; - /* } else if (!($interfaceIsEqual(_r$10, $ifaceNil))) { */ case 4: - _r$19 = dst[0].Mutable(fd); /* */ $s = 21; case 21: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, protoreflect.Value).Message(); /* */ $s = 22; case 22: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$7 = _r$20; - _r$21 = $clone(v, protoreflect.Value).Message(); /* */ $s = 23; case 23: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$8 = _r$21; - $r = $clone(o[0], mergeOptions).mergeMessage(_arg$7, _arg$8); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 7; continue; - /* } else if ((_r$11 === 12)) { */ case 5: - _arg$9 = fd; - _r$22 = $clone(o[0], mergeOptions).cloneBytes($clone(v, protoreflect.Value)); /* */ $s = 25; case 25: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _arg$10 = $clone(_r$22, protoreflect.Value); - $r = dst[0].Set(_arg$9, _arg$10); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 7; continue; - /* } else { */ case 6: - $r = dst[0].Set(fd, $clone(v, protoreflect.Value)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - case 1: - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg$1, _arg$10, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$8, _r$9, fd, v, $s};return $f; - }; })(dst, o)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$8 = src.GetUnknown(); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8.$length > 0) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_r$8.$length > 0) { */ case 12: - _r$9 = dst[0].GetUnknown(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = src.GetUnknown(); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$2 = $convertSliceType(_r$10, sliceType$1); - $r = dst[0].SetUnknown($appendSlice(_arg$1, _arg$2)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeOptions.ptr.prototype.mergeMessage, $c: true, $r, _arg, _arg$1, _arg$2, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, dst, in$1, methods, o, out, src, $s};return $f; - }; - mergeOptions.prototype.mergeMessage = function(dst, src) { return this.$val.mergeMessage(dst, src); }; - mergeOptions.ptr.prototype.mergeList = function(dst, src, fd) { - var {_arg, _arg$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, dst, dstv, fd, i, n, o, src, v, $s, $r, $c} = $restore(this, {dst, src, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _tmp = 0; - _r$2 = src.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp$1 = _r$2; - i = _tmp; - n = _tmp$1; - /* while (true) { */ case 2: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 3; continue; } - _r$3 = src.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = $clone(_r$3, protoreflect.Value); - _r$4 = fd.Message(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$4, $ifaceNil))) { $s = 6; continue; } - _r$5 = fd.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if ((_r$5 === 12)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(_r$4, $ifaceNil))) { */ case 6: - _r$6 = dst.NewElement(); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - dstv = $clone(_r$6, protoreflect.Value); - _r$7 = $clone(dstv, protoreflect.Value).Message(); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg = _r$7; - _r$8 = $clone(v, protoreflect.Value).Message(); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - $r = $clone(o, mergeOptions).mergeMessage(_arg, _arg$1); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = dst.Append($clone(dstv, protoreflect.Value)); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else if ((_r$5 === 12)) { */ case 7: - _r$9 = $clone(o, mergeOptions).cloneBytes($clone(v, protoreflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = dst.Append($clone(_r$9, protoreflect.Value)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else { */ case 8: - $r = dst.Append($clone(v, protoreflect.Value)); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - case 4: - i = i + (1) >> 0; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeOptions.ptr.prototype.mergeList, $c: true, $r, _arg, _arg$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, dst, dstv, fd, i, n, o, src, v, $s};return $f; - }; - mergeOptions.prototype.mergeList = function(dst, src, fd) { return this.$val.mergeList(dst, src, fd); }; - mergeOptions.ptr.prototype.mergeMap = function(dst, src, fd) { - var {dst, fd, o, src, $s, $r, $c} = $restore(this, {dst, src, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dst = [dst]; - fd = [fd]; - o = [o]; - o[0] = this; - $r = src.Range((function(dst, fd, o) { return function $b(k, v) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, dstv, k, v, $s, $r, $c} = $restore(this, {k, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = fd[0].Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$2, $ifaceNil))) { $s = 2; continue; } - _r$3 = fd[0].Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if ((_r$3 === 12)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(_r$2, $ifaceNil))) { */ case 2: - _r$4 = dst[0].NewValue(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - dstv = $clone(_r$4, protoreflect.Value); - _r$5 = $clone(dstv, protoreflect.Value).Message(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg = _r$5; - _r$6 = $clone(v, protoreflect.Value).Message(); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - $r = $clone(o[0], mergeOptions).mergeMessage(_arg, _arg$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = dst[0].Set($clone(k, protoreflect.MapKey), $clone(dstv, protoreflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if ((_r$3 === 12)) { */ case 3: - _arg$2 = $clone(k, protoreflect.MapKey); - _r$7 = $clone(o[0], mergeOptions).cloneBytes($clone(v, protoreflect.Value)); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$7, protoreflect.Value); - $r = dst[0].Set(_arg$2, _arg$3); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - $r = dst[0].Set($clone(k, protoreflect.MapKey), $clone(v, protoreflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - case 1: - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, dstv, k, v, $s};return $f; - }; })(dst, fd, o)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeOptions.ptr.prototype.mergeMap, $c: true, $r, dst, fd, o, src, $s};return $f; - }; - mergeOptions.prototype.mergeMap = function(dst, src, fd) { return this.$val.mergeMap(dst, src, fd); }; - mergeOptions.ptr.prototype.cloneBytes = function(v) { - var {$24r, _arg, _arg$1, _r$2, _r$3, o, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _arg = new sliceType$1([]); - _r$2 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = protoreflect.ValueOfBytes($appendSlice(_arg, _arg$1)); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: mergeOptions.ptr.prototype.cloneBytes, $c: true, $r, $24r, _arg, _arg$1, _r$2, _r$3, o, v, $s};return $f; - }; - mergeOptions.prototype.cloneBytes = function(v) { return this.$val.cloneBytes(v); }; - MarshalOptions.ptr.prototype.marshalSingular = function(b, fd, v) { - var {$24r, $24r$1, _1, _arg, _arg$1, _arg$10, _arg$11, _arg$12, _arg$13, _arg$14, _arg$15, _arg$16, _arg$17, _arg$18, _arg$19, _arg$2, _arg$20, _arg$21, _arg$22, _arg$23, _arg$24, _arg$25, _arg$26, _arg$27, _arg$28, _arg$29, _arg$3, _arg$30, _arg$31, _arg$32, _arg$33, _arg$34, _arg$35, _arg$36, _arg$37, _arg$38, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _v, b, err, err$1, fd, o, pos, v, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = fd.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _1 = _r$2; - /* */ if (_1 === (8)) { $s = 3; continue; } - /* */ if (_1 === (14)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (17)) { $s = 6; continue; } - /* */ if (_1 === (13)) { $s = 7; continue; } - /* */ if (_1 === (3)) { $s = 8; continue; } - /* */ if (_1 === (18)) { $s = 9; continue; } - /* */ if (_1 === (4)) { $s = 10; continue; } - /* */ if (_1 === (15)) { $s = 11; continue; } - /* */ if (_1 === (7)) { $s = 12; continue; } - /* */ if (_1 === (2)) { $s = 13; continue; } - /* */ if (_1 === (16)) { $s = 14; continue; } - /* */ if (_1 === (6)) { $s = 15; continue; } - /* */ if (_1 === (1)) { $s = 16; continue; } - /* */ if (_1 === (9)) { $s = 17; continue; } - /* */ if (_1 === (12)) { $s = 18; continue; } - /* */ if (_1 === (11)) { $s = 19; continue; } - /* */ if (_1 === (10)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_1 === (8)) { */ case 3: - _arg = b; - _r$3 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = protowire.EncodeBool(_r$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = _r$4; - _r$5 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 25; case 25: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - $s = 22; continue; - /* } else if (_1 === (14)) { */ case 4: - _arg$2 = b; - _r$6 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 26; case 26: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$3 = (new $Uint64(0, _r$6)); - _r$7 = protowire.AppendVarint(_arg$2, _arg$3); /* */ $s = 27; case 27: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = 22; continue; - /* } else if (_1 === (5)) { */ case 5: - _arg$4 = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 28; case 28: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$5 = (new $Uint64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))); - _r$9 = protowire.AppendVarint(_arg$4, _arg$5); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - $s = 22; continue; - /* } else if (_1 === (17)) { */ case 6: - _arg$6 = b; - _r$10 = $clone(v, protoreflect.Value).Int(); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = protowire.EncodeZigZag((new $Int64(0, (((x$1 = _r$10, x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 31; case 31: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$7 = _r$11; - _r$12 = protowire.AppendVarint(_arg$6, _arg$7); /* */ $s = 32; case 32: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - $s = 22; continue; - /* } else if (_1 === (13)) { */ case 7: - _arg$8 = b; - _r$13 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 33; case 33: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$9 = (new $Uint64(0, ((_r$13.$low >>> 0)))); - _r$14 = protowire.AppendVarint(_arg$8, _arg$9); /* */ $s = 34; case 34: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - b = _r$14; - $s = 22; continue; - /* } else if (_1 === (3)) { */ case 8: - _arg$10 = b; - _r$15 = $clone(v, protoreflect.Value).Int(); /* */ $s = 35; case 35: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$11 = ((x$2 = _r$15, new $Uint64(x$2.$high, x$2.$low))); - _r$16 = protowire.AppendVarint(_arg$10, _arg$11); /* */ $s = 36; case 36: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - b = _r$16; - $s = 22; continue; - /* } else if (_1 === (18)) { */ case 9: - _arg$12 = b; - _r$17 = $clone(v, protoreflect.Value).Int(); /* */ $s = 37; case 37: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = protowire.EncodeZigZag(_r$17); /* */ $s = 38; case 38: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$13 = _r$18; - _r$19 = protowire.AppendVarint(_arg$12, _arg$13); /* */ $s = 39; case 39: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - b = _r$19; - $s = 22; continue; - /* } else if (_1 === (4)) { */ case 10: - _arg$14 = b; - _r$20 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 40; case 40: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$15 = _r$20; - _r$21 = protowire.AppendVarint(_arg$14, _arg$15); /* */ $s = 41; case 41: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - b = _r$21; - $s = 22; continue; - /* } else if (_1 === (15)) { */ case 11: - _arg$16 = b; - _r$22 = $clone(v, protoreflect.Value).Int(); /* */ $s = 42; case 42: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _arg$17 = ((_r$22.$low >>> 0)); - _r$23 = protowire.AppendFixed32(_arg$16, _arg$17); /* */ $s = 43; case 43: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - b = _r$23; - $s = 22; continue; - /* } else if (_1 === (7)) { */ case 12: - _arg$18 = b; - _r$24 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 44; case 44: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _arg$19 = ((_r$24.$low >>> 0)); - _r$25 = protowire.AppendFixed32(_arg$18, _arg$19); /* */ $s = 45; case 45: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - b = _r$25; - $s = 22; continue; - /* } else if (_1 === (2)) { */ case 13: - _arg$20 = b; - _r$26 = $clone(v, protoreflect.Value).Float(); /* */ $s = 46; case 46: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = math.Float32bits(($fround(_r$26))); /* */ $s = 47; case 47: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _arg$21 = _r$27; - _r$28 = protowire.AppendFixed32(_arg$20, _arg$21); /* */ $s = 48; case 48: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - b = _r$28; - $s = 22; continue; - /* } else if (_1 === (16)) { */ case 14: - _arg$22 = b; - _r$29 = $clone(v, protoreflect.Value).Int(); /* */ $s = 49; case 49: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _arg$23 = ((x$3 = _r$29, new $Uint64(x$3.$high, x$3.$low))); - _r$30 = protowire.AppendFixed64(_arg$22, _arg$23); /* */ $s = 50; case 50: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - b = _r$30; - $s = 22; continue; - /* } else if (_1 === (6)) { */ case 15: - _arg$24 = b; - _r$31 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 51; case 51: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _arg$25 = _r$31; - _r$32 = protowire.AppendFixed64(_arg$24, _arg$25); /* */ $s = 52; case 52: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - b = _r$32; - $s = 22; continue; - /* } else if (_1 === (1)) { */ case 16: - _arg$26 = b; - _r$33 = $clone(v, protoreflect.Value).Float(); /* */ $s = 53; case 53: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$34 = math.Float64bits(_r$33); /* */ $s = 54; case 54: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _arg$27 = _r$34; - _r$35 = protowire.AppendFixed64(_arg$26, _arg$27); /* */ $s = 55; case 55: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - b = _r$35; - $s = 22; continue; - /* } else if (_1 === (9)) { */ case 17: - _r$36 = strs.EnforceUTF8(fd); /* */ $s = 59; case 59: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - if (!(_r$36)) { _v = false; $s = 58; continue s; } - _r$37 = $clone(v, protoreflect.Value).String(); /* */ $s = 60; case 60: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _r$38 = utf8.ValidString(_r$37); /* */ $s = 61; case 61: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _v = !_r$38; case 58: - /* */ if (_v) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (_v) { */ case 56: - _r$39 = fd.FullName(); /* */ $s = 62; case 62: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$40 = errors.InvalidUTF8((_r$39)); /* */ $s = 63; case 63: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - $24r = [b, _r$40]; - $s = 64; case 64: return $24r; - /* } */ case 57: - _arg$28 = b; - _r$41 = $clone(v, protoreflect.Value).String(); /* */ $s = 65; case 65: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - _arg$29 = _r$41; - _r$42 = protowire.AppendString(_arg$28, _arg$29); /* */ $s = 66; case 66: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - b = _r$42; - $s = 22; continue; - /* } else if (_1 === (12)) { */ case 18: - _arg$30 = b; - _r$43 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 67; case 67: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - _arg$31 = _r$43; - _r$44 = protowire.AppendBytes(_arg$30, _arg$31); /* */ $s = 68; case 68: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - b = _r$44; - $s = 22; continue; - /* } else if (_1 === (11)) { */ case 19: - pos = 0; - err = $ifaceNil; - _tuple = appendSpeculativeLength(b); - b = _tuple[0]; - pos = _tuple[1]; - _arg$32 = b; - _r$45 = $clone(v, protoreflect.Value).Message(); /* */ $s = 69; case 69: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - _arg$33 = _r$45; - _r$46 = $clone(o, MarshalOptions).marshalMessage(_arg$32, _arg$33); /* */ $s = 70; case 70: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } - _tuple$1 = _r$46; - b = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - b = finishSpeculativeLength(b, pos); - $s = 22; continue; - /* } else if (_1 === (10)) { */ case 20: - err$1 = $ifaceNil; - _arg$34 = b; - _r$47 = $clone(v, protoreflect.Value).Message(); /* */ $s = 71; case 71: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } - _arg$35 = _r$47; - _r$48 = $clone(o, MarshalOptions).marshalMessage(_arg$34, _arg$35); /* */ $s = 72; case 72: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } - _tuple$2 = _r$48; - b = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [b, err$1]; - } - _arg$36 = b; - _r$49 = fd.Number(); /* */ $s = 73; case 73: if($c) { $c = false; _r$49 = _r$49.$blk(); } if (_r$49 && _r$49.$blk !== undefined) { break s; } - _r$50 = protowire.EncodeTag(_r$49, 4); /* */ $s = 74; case 74: if($c) { $c = false; _r$50 = _r$50.$blk(); } if (_r$50 && _r$50.$blk !== undefined) { break s; } - _arg$37 = _r$50; - _r$51 = protowire.AppendVarint(_arg$36, _arg$37); /* */ $s = 75; case 75: if($c) { $c = false; _r$51 = _r$51.$blk(); } if (_r$51 && _r$51.$blk !== undefined) { break s; } - b = _r$51; - $s = 22; continue; - /* } else { */ case 21: - _r$52 = fd.Kind(); /* */ $s = 76; case 76: if($c) { $c = false; _r$52 = _r$52.$blk(); } if (_r$52 && _r$52.$blk !== undefined) { break s; } - _arg$38 = new protoreflect.Kind(_r$52); - _r$53 = errors.New("invalid kind %v", new sliceType([_arg$38])); /* */ $s = 77; case 77: if($c) { $c = false; _r$53 = _r$53.$blk(); } if (_r$53 && _r$53.$blk !== undefined) { break s; } - $24r$1 = [b, _r$53]; - $s = 78; case 78: return $24r$1; - /* } */ case 22: - case 1: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalSingular, $c: true, $r, $24r, $24r$1, _1, _arg, _arg$1, _arg$10, _arg$11, _arg$12, _arg$13, _arg$14, _arg$15, _arg$16, _arg$17, _arg$18, _arg$19, _arg$2, _arg$20, _arg$21, _arg$22, _arg$23, _arg$24, _arg$25, _arg$26, _arg$27, _arg$28, _arg$29, _arg$3, _arg$30, _arg$31, _arg$32, _arg$33, _arg$34, _arg$35, _arg$36, _arg$37, _arg$38, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _v, b, err, err$1, fd, o, pos, v, x, x$1, x$2, x$3, $s};return $f; - }; - MarshalOptions.prototype.marshalSingular = function(b, fd, v) { return this.$val.marshalSingular(b, fd, v); }; - MarshalOptions.ptr.prototype.Marshal = function(m) { - var {_arg, _arg$1, _r$2, _r$3, _r$4, _tuple, err, m, o, out, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return [sliceType$1.nil, $ifaceNil]; - } - _arg = sliceType$1.nil; - _r$2 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = $clone(o, MarshalOptions).marshal(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - out = $clone(_tuple[0], structType$3); - err = _tuple[1]; - /* */ if ((out.Buf.$length === 0) && $interfaceIsEqual(err, $ifaceNil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((out.Buf.$length === 0) && $interfaceIsEqual(err, $ifaceNil)) { */ case 3: - _r$4 = emptyBytesForMessage(m); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - out.Buf = _r$4; - /* } */ case 4: - $s = -1; return [out.Buf, err]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.Marshal, $c: true, $r, _arg, _arg$1, _r$2, _r$3, _r$4, _tuple, err, m, o, out, $s};return $f; - }; - MarshalOptions.prototype.Marshal = function(m) { return this.$val.Marshal(m); }; - emptyBytesForMessage = function(m) { - var {_r$2, _r$3, _v, m, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { _v = true; $s = 3; continue s; } - _r$2 = m.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.IsValid(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = !_r$3; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return sliceType$1.nil; - /* } */ case 2: - $s = -1; return new sliceType$1(emptyBuf); - /* */ } return; } var $f = {$blk: emptyBytesForMessage, $c: true, $r, _r$2, _r$3, _v, m, $s};return $f; - }; - MarshalOptions.ptr.prototype.MarshalAppend = function(b, m) { - var {_arg, _arg$1, _r$2, _r$3, _tuple, b, err, m, o, out, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return [b, $ifaceNil]; - } - _arg = b; - _r$2 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = $clone(o, MarshalOptions).marshal(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - out = $clone(_tuple[0], structType$3); - err = _tuple[1]; - $s = -1; return [out.Buf, err]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.MarshalAppend, $c: true, $r, _arg, _arg$1, _r$2, _r$3, _tuple, b, err, m, o, out, $s};return $f; - }; - MarshalOptions.prototype.MarshalAppend = function(b, m) { return this.$val.MarshalAppend(b, m); }; - MarshalOptions.ptr.prototype.MarshalState = function(in$1) { - var {$24r, _r$2, in$1, o, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = $clone(o, MarshalOptions).marshal(in$1.Buf, in$1.Message); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.MarshalState, $c: true, $r, $24r, _r$2, in$1, o, $s};return $f; - }; - MarshalOptions.prototype.MarshalState = function(in$1) { return this.$val.MarshalState(in$1); }; - MarshalOptions.ptr.prototype.marshal = function(b, m) { - var {$24r, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, allowPartial, b, err, in$1, m, methods, o, out, sout, x, x$1, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new structType$3.ptr(new pragma.NoUnkeyedLiterals.ptr(), sliceType$1.nil); - err = $ifaceNil; - o = this; - allowPartial = o.AllowPartial; - o.AllowPartial = true; - _r$2 = protoMethods(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - methods = _r$2; - /* */ if (!(methods === ptrType$8.nil) && !(methods.Marshal === $throwNilPointerError) && !(o.Deterministic && (x = (x$1 = methods.Flags, new $Uint64(x$1.$high & 0, (x$1.$low & 1) >>> 0)), (x.$high === 0 && x.$low === 0)))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(methods === ptrType$8.nil) && !(methods.Marshal === $throwNilPointerError) && !(o.Deterministic && (x = (x$1 = methods.Flags, new $Uint64(x$1.$high & 0, (x$1.$low & 1) >>> 0)), (x.$high === 0 && x.$low === 0)))) { */ case 2: - in$1 = new structType$2.ptr(new pragma.NoUnkeyedLiterals.ptr(), m, b, 0); - if (o.Deterministic) { - in$1.Flags = (in$1.Flags | (1)) >>> 0; - } - if (o.UseCachedSize) { - in$1.Flags = (in$1.Flags | (2)) >>> 0; - } - /* */ if (!(methods.Size === $throwNilPointerError)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(methods.Size === $throwNilPointerError)) { */ case 5: - _r$3 = methods.Size(new structType.ptr(new pragma.NoUnkeyedLiterals.ptr(), m, in$1.Flags)); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - sout = $clone(_r$3, structType$1); - if (b.$capacity < (b.$length + sout.Size >> 0)) { - in$1.Buf = $makeSlice(sliceType$1, b.$length, growcap(b.$capacity, b.$length + sout.Size >> 0)); - $copySlice(in$1.Buf, b); - } - in$1.Flags = (in$1.Flags | (2)) >>> 0; - /* } */ case 6: - _r$4 = methods.Marshal($clone(in$1, structType$2)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - structType$3.copy(out, _tuple[0]); - err = _tuple[1]; - $s = 4; continue; - /* } else { */ case 3: - _r$5 = $clone(o, MarshalOptions).marshalMessageSlow(b, m); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - out.Buf = _tuple$1[0]; - err = _tuple$1[1]; - /* } */ case 4: - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = $clone(out, structType$3); - _tmp$1 = err; - structType$3.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - if (allowPartial) { - _tmp$2 = $clone(out, structType$3); - _tmp$3 = $ifaceNil; - structType$3.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _tmp$4 = $clone(out, structType$3); - _r$6 = checkInitialized(m); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$5 = _r$6; - structType$3.copy(out, _tmp$4); - err = _tmp$5; - $24r = [out, err]; - $s = 11; case 11: return $24r; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshal, $c: true, $r, $24r, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, allowPartial, b, err, in$1, m, methods, o, out, sout, x, x$1, $s};return $f; - }; - MarshalOptions.prototype.marshal = function(b, m) { return this.$val.marshal(b, m); }; - MarshalOptions.ptr.prototype.marshalMessage = function(b, m) { - var {_r$2, _tuple, b, err, m, o, out, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = $clone(o, MarshalOptions).marshal(b, m); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - out = $clone(_tuple[0], structType$3); - err = _tuple[1]; - $s = -1; return [out.Buf, err]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalMessage, $c: true, $r, _r$2, _tuple, b, err, m, o, out, $s};return $f; - }; - MarshalOptions.prototype.marshalMessage = function(b, m) { return this.$val.marshalMessage(b, m); }; - growcap = function(oldcap, wantcap) { - var _q, newcap, oldcap, wantcap; - newcap = 0; - if (wantcap > ($imul(oldcap, 2))) { - newcap = wantcap; - } else if (oldcap < 1024) { - newcap = $imul(oldcap, 2); - } else { - newcap = oldcap; - while (true) { - if (!(0 < newcap && newcap < wantcap)) { break; } - newcap = newcap + ((_q = newcap / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0; - } - if (newcap <= 0) { - newcap = wantcap; - } - } - newcap = newcap; - return newcap; - }; - MarshalOptions.ptr.prototype.marshalMessageSlow = function(b, m) { - var {$24r, _arg, _arg$1, _r$2, _r$3, _r$4, _r$5, b, err, fieldOrder, m, o, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - err = [err]; - o = [o]; - o[0] = this; - _r$2 = m.Descriptor(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = messageset.IsMessageSet(_r$2); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$3) { */ case 1: - _r$4 = $clone(o[0], MarshalOptions).marshalMessageSet(b[0], m); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 6; case 6: return $24r; - /* } */ case 2: - fieldOrder = order.AnyFieldOrder; - if (o[0].Deterministic) { - fieldOrder = order.LegacyFieldOrder; - } - err[0] = $ifaceNil; - $r = order.RangeFields(m, fieldOrder, (function(b, err, o) { return function $b(fd, v) { - var {_r$5, _tuple, fd, v, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(o[0], MarshalOptions).marshalField(b[0], fd, $clone(v, protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - b[0] = _tuple[0]; - err[0] = _tuple[1]; - $s = -1; return $interfaceIsEqual(err[0], $ifaceNil); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _tuple, fd, v, $s};return $f; - }; })(b, err, o)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return [b[0], err[0]]; - } - _arg = b[0]; - _r$5 = m.GetUnknown(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = $convertSliceType(_r$5, sliceType$1); - b[0] = $appendSlice(_arg, _arg$1); - $s = -1; return [b[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalMessageSlow, $c: true, $r, $24r, _arg, _arg$1, _r$2, _r$3, _r$4, _r$5, b, err, fieldOrder, m, o, $s};return $f; - }; - MarshalOptions.prototype.marshalMessageSlow = function(b, m) { return this.$val.marshalMessageSlow(b, m); }; - MarshalOptions.ptr.prototype.marshalField = function(b, fd, value) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _entry, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, fd, o, value, $s, $r, $c} = $restore(this, {b, fd, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = fd.IsList(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 2; continue; } - _r$3 = fd.IsMap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$2) { */ case 2: - _arg = b; - _arg$1 = fd; - _r$4 = $clone(value, protoreflect.Value).List(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$2 = _r$4; - _r$5 = $clone(o, MarshalOptions).marshalList(_arg, _arg$1, _arg$2); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 10; case 10: return $24r; - /* } else if (_r$3) { */ case 3: - _arg$3 = b; - _arg$4 = fd; - _r$6 = $clone(value, protoreflect.Value).Map(); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$5 = _r$6; - _r$7 = $clone(o, MarshalOptions).marshalMap(_arg$3, _arg$4, _arg$5); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 13; case 13: return $24r$1; - /* } else { */ case 4: - _arg$6 = b; - _r$8 = fd.Number(); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$7 = _r$8; - _r$9 = fd.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$8 = (_entry = wireTypes[protoreflect.Kind.keyFor(_r$9)], _entry !== undefined ? _entry.v : 0); - _r$10 = protowire.AppendTag(_arg$6, _arg$7, _arg$8); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - _r$11 = $clone(o, MarshalOptions).marshalSingular(b, fd, $clone(value, protoreflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$2 = _r$11; - $s = 18; case 18: return $24r$2; - /* } */ case 5: - case 1: - $s = -1; return [sliceType$1.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalField, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _entry, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, fd, o, value, $s};return $f; - }; - MarshalOptions.prototype.marshalField = function(b, fd, value) { return this.$val.marshalField(b, fd, value); }; - MarshalOptions.ptr.prototype.marshalList = function(b, fd, list) { - var {_arg, _arg$1, _arg$10, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _v, b, b$1, err, err$1, fd, i, i$1, kind, list, llen, llen$1, o, pos, $s, $r, $c} = $restore(this, {b, fd, list}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = fd.IsPacked(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - if (!(_r$2)) { _v = false; $s = 3; continue s; } - _r$3 = list.Len(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3 > 0; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _arg = b; - _r$4 = fd.Number(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = _r$4; - _r$5 = protowire.AppendTag(_arg, _arg$1, 2); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b = _r$5; - _tuple = appendSpeculativeLength(b); - b$1 = _tuple[0]; - pos = _tuple[1]; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 9: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 10; continue; } - err = $ifaceNil; - _arg$2 = b$1; - _arg$3 = fd; - _r$7 = list.Get(i); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$4 = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(o, MarshalOptions).marshalSingular(_arg$2, _arg$3, _arg$4); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - b$1 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b$1, err]; - } - i = i + (1) >> 0; - $s = 9; continue; - case 10: - b$1 = finishSpeculativeLength(b$1, pos); - $s = -1; return [b$1, $ifaceNil]; - /* } */ case 2: - _r$9 = fd.Kind(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - kind = _r$9; - _tmp$2 = 0; - _r$10 = list.Len(); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tmp$3 = _r$10; - i$1 = _tmp$2; - llen$1 = _tmp$3; - /* while (true) { */ case 15: - /* if (!(i$1 < llen$1)) { break; } */ if(!(i$1 < llen$1)) { $s = 16; continue; } - err$1 = $ifaceNil; - _arg$5 = b; - _r$11 = fd.Number(); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$6 = _r$11; - _arg$7 = (_entry = wireTypes[protoreflect.Kind.keyFor(kind)], _entry !== undefined ? _entry.v : 0); - _r$12 = protowire.AppendTag(_arg$5, _arg$6, _arg$7); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - _arg$8 = b; - _arg$9 = fd; - _r$13 = list.Get(i$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$10 = $clone(_r$13, protoreflect.Value); - _r$14 = $clone(o, MarshalOptions).marshalSingular(_arg$8, _arg$9, _arg$10); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$2 = _r$14; - b = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [b, err$1]; - } - i$1 = i$1 + (1) >> 0; - $s = 15; continue; - case 16: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalList, $c: true, $r, _arg, _arg$1, _arg$10, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _v, b, b$1, err, err$1, fd, i, i$1, kind, list, llen, llen$1, o, pos, $s};return $f; - }; - MarshalOptions.prototype.marshalList = function(b, fd, list) { return this.$val.marshalList(b, fd, list); }; - MarshalOptions.ptr.prototype.marshalMap = function(b, fd, mapv) { - var {_r$2, _r$3, b, err, fd, keyOrder, keyf, mapv, o, valf, $s, $r, $c} = $restore(this, {b, fd, mapv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - err = [err]; - fd = [fd]; - keyf = [keyf]; - o = [o]; - valf = [valf]; - o[0] = this; - _r$2 = fd[0].MapKey(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - keyf[0] = _r$2; - _r$3 = fd[0].MapValue(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - valf[0] = _r$3; - keyOrder = order.AnyKeyOrder; - if (o[0].Deterministic) { - keyOrder = order.GenericKeyOrder; - } - err[0] = $ifaceNil; - $r = order.RangeEntries(mapv, keyOrder, (function(b, err, fd, keyf, o, valf) { return function $b(key, value) { - var {_arg, _arg$1, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, key, pos, value, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = b[0]; - _r$4 = fd[0].Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = _r$4; - _r$5 = protowire.AppendTag(_arg, _arg$1, 2); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - b[0] = _r$5; - pos = 0; - _tuple = appendSpeculativeLength(b[0]); - b[0] = _tuple[0]; - pos = _tuple[1]; - _r$6 = $clone(o[0], MarshalOptions).marshalField(b[0], keyf[0], $clone($clone(key, protoreflect.MapKey).Value(), protoreflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - b[0] = _tuple$1[0]; - err[0] = _tuple$1[1]; - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return false; - } - _r$7 = $clone(o[0], MarshalOptions).marshalField(b[0], valf[0], $clone(value, protoreflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - b[0] = _tuple$2[0]; - err[0] = _tuple$2[1]; - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return false; - } - b[0] = finishSpeculativeLength(b[0], pos); - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, key, pos, value, $s};return $f; - }; })(b, err, fd, keyf, o, valf)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [b[0], err[0]]; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshalMap, $c: true, $r, _r$2, _r$3, b, err, fd, keyOrder, keyf, mapv, o, valf, $s};return $f; - }; - MarshalOptions.prototype.marshalMap = function(b, fd, mapv) { return this.$val.marshalMap(b, fd, mapv); }; - appendSpeculativeLength = function(b) { - var b, pos; - pos = b.$length; - b = $appendSlice(b, $substring("\x00\x00\x00\x00", 0, 1)); - return [b, pos]; - }; - finishSpeculativeLength = function(b, pos) { - var b, i, mlen, msiz, pos; - mlen = (b.$length - pos >> 0) - 1 >> 0; - msiz = protowire.SizeVarint((new $Uint64(0, mlen))); - if (!((msiz === 1))) { - i = 0; - while (true) { - if (!(i < (msiz - 1 >> 0))) { break; } - b = $append(b, 0); - i = i + (1) >> 0; - } - $copySlice($subslice(b, (pos + msiz >> 0)), $subslice(b, (pos + 1 >> 0))); - b = $subslice(b, 0, ((pos + msiz >> 0) + mlen >> 0)); - } - protowire.AppendVarint($subslice(b, 0, pos), (new $Uint64(0, mlen))); - return b; - }; - UnmarshalOptions.ptr.prototype.unmarshalScalar = function(b, wtyp, fd) { - var {$24r, _1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$100, _tmp$101, _tmp$102, _tmp$103, _tmp$104, _tmp$105, _tmp$106, _tmp$107, _tmp$108, _tmp$109, _tmp$11, _tmp$110, _tmp$111, _tmp$112, _tmp$113, _tmp$114, _tmp$115, _tmp$116, _tmp$117, _tmp$118, _tmp$119, _tmp$12, _tmp$120, _tmp$121, _tmp$122, _tmp$123, _tmp$124, _tmp$125, _tmp$126, _tmp$127, _tmp$128, _tmp$129, _tmp$13, _tmp$130, _tmp$131, _tmp$132, _tmp$133, _tmp$134, _tmp$135, _tmp$136, _tmp$137, _tmp$138, _tmp$139, _tmp$14, _tmp$140, _tmp$141, _tmp$142, _tmp$143, _tmp$144, _tmp$145, _tmp$146, _tmp$147, _tmp$148, _tmp$149, _tmp$15, _tmp$150, _tmp$151, _tmp$152, _tmp$153, _tmp$154, _tmp$155, _tmp$156, _tmp$157, _tmp$158, _tmp$159, _tmp$16, _tmp$160, _tmp$161, _tmp$162, _tmp$163, _tmp$164, _tmp$165, _tmp$166, _tmp$167, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$81, _tmp$82, _tmp$83, _tmp$84, _tmp$85, _tmp$86, _tmp$87, _tmp$88, _tmp$89, _tmp$9, _tmp$90, _tmp$91, _tmp$92, _tmp$93, _tmp$94, _tmp$95, _tmp$96, _tmp$97, _tmp$98, _tmp$99, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, err, fd, n, n$1, n$10, n$11, n$12, n$13, n$14, n$15, n$16, n$17, n$18, n$2, n$3, n$4, n$5, n$6, n$7, n$8, n$9, o, v, v$1, v$10, v$11, v$12, v$13, v$14, v$15, v$16, v$17, v$2, v$3, v$4, v$5, v$6, v$7, v$8, v$9, val, wtyp, x, $s, $r, $c} = $restore(this, {b, wtyp, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - val = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType$1.nil, $ifaceNil); - n = 0; - err = $ifaceNil; - o = this; - _r$2 = fd.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _1 = _r$2; - /* */ if (_1 === (8)) { $s = 3; continue; } - /* */ if (_1 === (14)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (17)) { $s = 6; continue; } - /* */ if (_1 === (13)) { $s = 7; continue; } - /* */ if (_1 === (3)) { $s = 8; continue; } - /* */ if (_1 === (18)) { $s = 9; continue; } - /* */ if (_1 === (4)) { $s = 10; continue; } - /* */ if (_1 === (15)) { $s = 11; continue; } - /* */ if (_1 === (7)) { $s = 12; continue; } - /* */ if (_1 === (2)) { $s = 13; continue; } - /* */ if (_1 === (16)) { $s = 14; continue; } - /* */ if (_1 === (6)) { $s = 15; continue; } - /* */ if (_1 === (1)) { $s = 16; continue; } - /* */ if (_1 === (9)) { $s = 17; continue; } - /* */ if (_1 === (12)) { $s = 18; continue; } - /* */ if (_1 === (11)) { $s = 19; continue; } - /* */ if (_1 === (10)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_1 === (8)) { */ case 3: - if (!((wtyp === 0))) { - _tmp = $clone(val, protoreflect.Value); - _tmp$1 = 0; - _tmp$2 = errUnknown; - protoreflect.Value.copy(val, _tmp); - n = _tmp$1; - err = _tmp$2; - $s = -1; return [val, n, err]; - } - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n$1 = _tuple[1]; - if (n$1 < 0) { - _tmp$3 = $clone(val, protoreflect.Value); - _tmp$4 = 0; - _tmp$5 = errDecode; - protoreflect.Value.copy(val, _tmp$3); - n = _tmp$4; - err = _tmp$5; - $s = -1; return [val, n, err]; - } - _tmp$6 = $clone(protoreflect.ValueOfBool(protowire.DecodeBool(v)), protoreflect.Value); - _tmp$7 = n$1; - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$6); - n = _tmp$7; - err = _tmp$8; - $s = -1; return [val, n, err]; - /* } else if (_1 === (14)) { */ case 4: - if (!((wtyp === 0))) { - _tmp$9 = $clone(val, protoreflect.Value); - _tmp$10 = 0; - _tmp$11 = errUnknown; - protoreflect.Value.copy(val, _tmp$9); - n = _tmp$10; - err = _tmp$11; - $s = -1; return [val, n, err]; - } - _tuple$1 = protowire.ConsumeVarint(b); - v$1 = _tuple$1[0]; - n$2 = _tuple$1[1]; - if (n$2 < 0) { - _tmp$12 = $clone(val, protoreflect.Value); - _tmp$13 = 0; - _tmp$14 = errDecode; - protoreflect.Value.copy(val, _tmp$12); - n = _tmp$13; - err = _tmp$14; - $s = -1; return [val, n, err]; - } - _tmp$15 = $clone(protoreflect.ValueOfEnum(((v$1.$low >> 0))), protoreflect.Value); - _tmp$16 = n$2; - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$15); - n = _tmp$16; - err = _tmp$17; - $s = -1; return [val, n, err]; - /* } else if (_1 === (5)) { */ case 5: - if (!((wtyp === 0))) { - _tmp$18 = $clone(val, protoreflect.Value); - _tmp$19 = 0; - _tmp$20 = errUnknown; - protoreflect.Value.copy(val, _tmp$18); - n = _tmp$19; - err = _tmp$20; - $s = -1; return [val, n, err]; - } - _tuple$2 = protowire.ConsumeVarint(b); - v$2 = _tuple$2[0]; - n$3 = _tuple$2[1]; - if (n$3 < 0) { - _tmp$21 = $clone(val, protoreflect.Value); - _tmp$22 = 0; - _tmp$23 = errDecode; - protoreflect.Value.copy(val, _tmp$21); - n = _tmp$22; - err = _tmp$23; - $s = -1; return [val, n, err]; - } - _tmp$24 = $clone(protoreflect.ValueOfInt32(((v$2.$low >> 0))), protoreflect.Value); - _tmp$25 = n$3; - _tmp$26 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$24); - n = _tmp$25; - err = _tmp$26; - $s = -1; return [val, n, err]; - /* } else if (_1 === (17)) { */ case 6: - if (!((wtyp === 0))) { - _tmp$27 = $clone(val, protoreflect.Value); - _tmp$28 = 0; - _tmp$29 = errUnknown; - protoreflect.Value.copy(val, _tmp$27); - n = _tmp$28; - err = _tmp$29; - $s = -1; return [val, n, err]; - } - _tuple$3 = protowire.ConsumeVarint(b); - v$3 = _tuple$3[0]; - n$4 = _tuple$3[1]; - if (n$4 < 0) { - _tmp$30 = $clone(val, protoreflect.Value); - _tmp$31 = 0; - _tmp$32 = errDecode; - protoreflect.Value.copy(val, _tmp$30); - n = _tmp$31; - err = _tmp$32; - $s = -1; return [val, n, err]; - } - _tmp$33 = $clone(protoreflect.ValueOfInt32((((x = protowire.DecodeZigZag(new $Uint64(v$3.$high & 0, (v$3.$low & 4294967295) >>> 0)), x.$low + ((x.$high >> 31) * 4294967296)) >> 0))), protoreflect.Value); - _tmp$34 = n$4; - _tmp$35 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$33); - n = _tmp$34; - err = _tmp$35; - $s = -1; return [val, n, err]; - /* } else if (_1 === (13)) { */ case 7: - if (!((wtyp === 0))) { - _tmp$36 = $clone(val, protoreflect.Value); - _tmp$37 = 0; - _tmp$38 = errUnknown; - protoreflect.Value.copy(val, _tmp$36); - n = _tmp$37; - err = _tmp$38; - $s = -1; return [val, n, err]; - } - _tuple$4 = protowire.ConsumeVarint(b); - v$4 = _tuple$4[0]; - n$5 = _tuple$4[1]; - if (n$5 < 0) { - _tmp$39 = $clone(val, protoreflect.Value); - _tmp$40 = 0; - _tmp$41 = errDecode; - protoreflect.Value.copy(val, _tmp$39); - n = _tmp$40; - err = _tmp$41; - $s = -1; return [val, n, err]; - } - _tmp$42 = $clone(protoreflect.ValueOfUint32(((v$4.$low >>> 0))), protoreflect.Value); - _tmp$43 = n$5; - _tmp$44 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$42); - n = _tmp$43; - err = _tmp$44; - $s = -1; return [val, n, err]; - /* } else if (_1 === (3)) { */ case 8: - if (!((wtyp === 0))) { - _tmp$45 = $clone(val, protoreflect.Value); - _tmp$46 = 0; - _tmp$47 = errUnknown; - protoreflect.Value.copy(val, _tmp$45); - n = _tmp$46; - err = _tmp$47; - $s = -1; return [val, n, err]; - } - _tuple$5 = protowire.ConsumeVarint(b); - v$5 = _tuple$5[0]; - n$6 = _tuple$5[1]; - if (n$6 < 0) { - _tmp$48 = $clone(val, protoreflect.Value); - _tmp$49 = 0; - _tmp$50 = errDecode; - protoreflect.Value.copy(val, _tmp$48); - n = _tmp$49; - err = _tmp$50; - $s = -1; return [val, n, err]; - } - _tmp$51 = $clone(protoreflect.ValueOfInt64((new $Int64(v$5.$high, v$5.$low))), protoreflect.Value); - _tmp$52 = n$6; - _tmp$53 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$51); - n = _tmp$52; - err = _tmp$53; - $s = -1; return [val, n, err]; - /* } else if (_1 === (18)) { */ case 9: - if (!((wtyp === 0))) { - _tmp$54 = $clone(val, protoreflect.Value); - _tmp$55 = 0; - _tmp$56 = errUnknown; - protoreflect.Value.copy(val, _tmp$54); - n = _tmp$55; - err = _tmp$56; - $s = -1; return [val, n, err]; - } - _tuple$6 = protowire.ConsumeVarint(b); - v$6 = _tuple$6[0]; - n$7 = _tuple$6[1]; - if (n$7 < 0) { - _tmp$57 = $clone(val, protoreflect.Value); - _tmp$58 = 0; - _tmp$59 = errDecode; - protoreflect.Value.copy(val, _tmp$57); - n = _tmp$58; - err = _tmp$59; - $s = -1; return [val, n, err]; - } - _tmp$60 = $clone(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v$6)), protoreflect.Value); - _tmp$61 = n$7; - _tmp$62 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$60); - n = _tmp$61; - err = _tmp$62; - $s = -1; return [val, n, err]; - /* } else if (_1 === (4)) { */ case 10: - if (!((wtyp === 0))) { - _tmp$63 = $clone(val, protoreflect.Value); - _tmp$64 = 0; - _tmp$65 = errUnknown; - protoreflect.Value.copy(val, _tmp$63); - n = _tmp$64; - err = _tmp$65; - $s = -1; return [val, n, err]; - } - _tuple$7 = protowire.ConsumeVarint(b); - v$7 = _tuple$7[0]; - n$8 = _tuple$7[1]; - if (n$8 < 0) { - _tmp$66 = $clone(val, protoreflect.Value); - _tmp$67 = 0; - _tmp$68 = errDecode; - protoreflect.Value.copy(val, _tmp$66); - n = _tmp$67; - err = _tmp$68; - $s = -1; return [val, n, err]; - } - _tmp$69 = $clone(protoreflect.ValueOfUint64(v$7), protoreflect.Value); - _tmp$70 = n$8; - _tmp$71 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$69); - n = _tmp$70; - err = _tmp$71; - $s = -1; return [val, n, err]; - /* } else if (_1 === (15)) { */ case 11: - if (!((wtyp === 5))) { - _tmp$72 = $clone(val, protoreflect.Value); - _tmp$73 = 0; - _tmp$74 = errUnknown; - protoreflect.Value.copy(val, _tmp$72); - n = _tmp$73; - err = _tmp$74; - $s = -1; return [val, n, err]; - } - _tuple$8 = protowire.ConsumeFixed32(b); - v$8 = _tuple$8[0]; - n$9 = _tuple$8[1]; - if (n$9 < 0) { - _tmp$75 = $clone(val, protoreflect.Value); - _tmp$76 = 0; - _tmp$77 = errDecode; - protoreflect.Value.copy(val, _tmp$75); - n = _tmp$76; - err = _tmp$77; - $s = -1; return [val, n, err]; - } - _tmp$78 = $clone(protoreflect.ValueOfInt32(((v$8 >> 0))), protoreflect.Value); - _tmp$79 = n$9; - _tmp$80 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$78); - n = _tmp$79; - err = _tmp$80; - $s = -1; return [val, n, err]; - /* } else if (_1 === (7)) { */ case 12: - if (!((wtyp === 5))) { - _tmp$81 = $clone(val, protoreflect.Value); - _tmp$82 = 0; - _tmp$83 = errUnknown; - protoreflect.Value.copy(val, _tmp$81); - n = _tmp$82; - err = _tmp$83; - $s = -1; return [val, n, err]; - } - _tuple$9 = protowire.ConsumeFixed32(b); - v$9 = _tuple$9[0]; - n$10 = _tuple$9[1]; - if (n$10 < 0) { - _tmp$84 = $clone(val, protoreflect.Value); - _tmp$85 = 0; - _tmp$86 = errDecode; - protoreflect.Value.copy(val, _tmp$84); - n = _tmp$85; - err = _tmp$86; - $s = -1; return [val, n, err]; - } - _tmp$87 = $clone(protoreflect.ValueOfUint32((v$9)), protoreflect.Value); - _tmp$88 = n$10; - _tmp$89 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$87); - n = _tmp$88; - err = _tmp$89; - $s = -1; return [val, n, err]; - /* } else if (_1 === (2)) { */ case 13: - if (!((wtyp === 5))) { - _tmp$90 = $clone(val, protoreflect.Value); - _tmp$91 = 0; - _tmp$92 = errUnknown; - protoreflect.Value.copy(val, _tmp$90); - n = _tmp$91; - err = _tmp$92; - $s = -1; return [val, n, err]; - } - _tuple$10 = protowire.ConsumeFixed32(b); - v$10 = _tuple$10[0]; - n$11 = _tuple$10[1]; - if (n$11 < 0) { - _tmp$93 = $clone(val, protoreflect.Value); - _tmp$94 = 0; - _tmp$95 = errDecode; - protoreflect.Value.copy(val, _tmp$93); - n = _tmp$94; - err = _tmp$95; - $s = -1; return [val, n, err]; - } - _tmp$96 = $clone(protoreflect.ValueOfFloat32(math.Float32frombits((v$10))), protoreflect.Value); - _tmp$97 = n$11; - _tmp$98 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$96); - n = _tmp$97; - err = _tmp$98; - $s = -1; return [val, n, err]; - /* } else if (_1 === (16)) { */ case 14: - if (!((wtyp === 1))) { - _tmp$99 = $clone(val, protoreflect.Value); - _tmp$100 = 0; - _tmp$101 = errUnknown; - protoreflect.Value.copy(val, _tmp$99); - n = _tmp$100; - err = _tmp$101; - $s = -1; return [val, n, err]; - } - _tuple$11 = protowire.ConsumeFixed64(b); - v$11 = _tuple$11[0]; - n$12 = _tuple$11[1]; - if (n$12 < 0) { - _tmp$102 = $clone(val, protoreflect.Value); - _tmp$103 = 0; - _tmp$104 = errDecode; - protoreflect.Value.copy(val, _tmp$102); - n = _tmp$103; - err = _tmp$104; - $s = -1; return [val, n, err]; - } - _tmp$105 = $clone(protoreflect.ValueOfInt64((new $Int64(v$11.$high, v$11.$low))), protoreflect.Value); - _tmp$106 = n$12; - _tmp$107 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$105); - n = _tmp$106; - err = _tmp$107; - $s = -1; return [val, n, err]; - /* } else if (_1 === (6)) { */ case 15: - if (!((wtyp === 1))) { - _tmp$108 = $clone(val, protoreflect.Value); - _tmp$109 = 0; - _tmp$110 = errUnknown; - protoreflect.Value.copy(val, _tmp$108); - n = _tmp$109; - err = _tmp$110; - $s = -1; return [val, n, err]; - } - _tuple$12 = protowire.ConsumeFixed64(b); - v$12 = _tuple$12[0]; - n$13 = _tuple$12[1]; - if (n$13 < 0) { - _tmp$111 = $clone(val, protoreflect.Value); - _tmp$112 = 0; - _tmp$113 = errDecode; - protoreflect.Value.copy(val, _tmp$111); - n = _tmp$112; - err = _tmp$113; - $s = -1; return [val, n, err]; - } - _tmp$114 = $clone(protoreflect.ValueOfUint64(v$12), protoreflect.Value); - _tmp$115 = n$13; - _tmp$116 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$114); - n = _tmp$115; - err = _tmp$116; - $s = -1; return [val, n, err]; - /* } else if (_1 === (1)) { */ case 16: - if (!((wtyp === 1))) { - _tmp$117 = $clone(val, protoreflect.Value); - _tmp$118 = 0; - _tmp$119 = errUnknown; - protoreflect.Value.copy(val, _tmp$117); - n = _tmp$118; - err = _tmp$119; - $s = -1; return [val, n, err]; - } - _tuple$13 = protowire.ConsumeFixed64(b); - v$13 = _tuple$13[0]; - n$14 = _tuple$13[1]; - if (n$14 < 0) { - _tmp$120 = $clone(val, protoreflect.Value); - _tmp$121 = 0; - _tmp$122 = errDecode; - protoreflect.Value.copy(val, _tmp$120); - n = _tmp$121; - err = _tmp$122; - $s = -1; return [val, n, err]; - } - _tmp$123 = $clone(protoreflect.ValueOfFloat64(math.Float64frombits(v$13)), protoreflect.Value); - _tmp$124 = n$14; - _tmp$125 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$123); - n = _tmp$124; - err = _tmp$125; - $s = -1; return [val, n, err]; - /* } else if (_1 === (9)) { */ case 17: - if (!((wtyp === 2))) { - _tmp$126 = $clone(val, protoreflect.Value); - _tmp$127 = 0; - _tmp$128 = errUnknown; - protoreflect.Value.copy(val, _tmp$126); - n = _tmp$127; - err = _tmp$128; - $s = -1; return [val, n, err]; - } - _tuple$14 = protowire.ConsumeBytes(b); - v$14 = _tuple$14[0]; - n$15 = _tuple$14[1]; - if (n$15 < 0) { - _tmp$129 = $clone(val, protoreflect.Value); - _tmp$130 = 0; - _tmp$131 = errDecode; - protoreflect.Value.copy(val, _tmp$129); - n = _tmp$130; - err = _tmp$131; - $s = -1; return [val, n, err]; - } - _r$3 = strs.EnforceUTF8(fd); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 && !utf8.Valid(v$14)) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (_r$3 && !utf8.Valid(v$14)) { */ case 23: - _tmp$132 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType$1.nil, $ifaceNil); - _tmp$133 = 0; - _r$4 = fd.FullName(); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = errors.InvalidUTF8((_r$4)); /* */ $s = 27; case 27: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$134 = _r$5; - protoreflect.Value.copy(val, _tmp$132); - n = _tmp$133; - err = _tmp$134; - $24r = [val, n, err]; - $s = 28; case 28: return $24r; - /* } */ case 24: - _tmp$135 = $clone(protoreflect.ValueOfString(($bytesToString(v$14))), protoreflect.Value); - _tmp$136 = n$15; - _tmp$137 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$135); - n = _tmp$136; - err = _tmp$137; - $s = -1; return [val, n, err]; - /* } else if (_1 === (12)) { */ case 18: - if (!((wtyp === 2))) { - _tmp$138 = $clone(val, protoreflect.Value); - _tmp$139 = 0; - _tmp$140 = errUnknown; - protoreflect.Value.copy(val, _tmp$138); - n = _tmp$139; - err = _tmp$140; - $s = -1; return [val, n, err]; - } - _tuple$15 = protowire.ConsumeBytes(b); - v$15 = _tuple$15[0]; - n$16 = _tuple$15[1]; - if (n$16 < 0) { - _tmp$141 = $clone(val, protoreflect.Value); - _tmp$142 = 0; - _tmp$143 = errDecode; - protoreflect.Value.copy(val, _tmp$141); - n = _tmp$142; - err = _tmp$143; - $s = -1; return [val, n, err]; - } - _tmp$144 = $clone(protoreflect.ValueOfBytes($appendSlice(new sliceType$1(emptyBuf), v$15)), protoreflect.Value); - _tmp$145 = n$16; - _tmp$146 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$144); - n = _tmp$145; - err = _tmp$146; - $s = -1; return [val, n, err]; - /* } else if (_1 === (11)) { */ case 19: - if (!((wtyp === 2))) { - _tmp$147 = $clone(val, protoreflect.Value); - _tmp$148 = 0; - _tmp$149 = errUnknown; - protoreflect.Value.copy(val, _tmp$147); - n = _tmp$148; - err = _tmp$149; - $s = -1; return [val, n, err]; - } - _tuple$16 = protowire.ConsumeBytes(b); - v$16 = _tuple$16[0]; - n$17 = _tuple$16[1]; - if (n$17 < 0) { - _tmp$150 = $clone(val, protoreflect.Value); - _tmp$151 = 0; - _tmp$152 = errDecode; - protoreflect.Value.copy(val, _tmp$150); - n = _tmp$151; - err = _tmp$152; - $s = -1; return [val, n, err]; - } - _tmp$153 = $clone(protoreflect.ValueOfBytes(v$16), protoreflect.Value); - _tmp$154 = n$17; - _tmp$155 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$153); - n = _tmp$154; - err = _tmp$155; - $s = -1; return [val, n, err]; - /* } else if (_1 === (10)) { */ case 20: - if (!((wtyp === 3))) { - _tmp$156 = $clone(val, protoreflect.Value); - _tmp$157 = 0; - _tmp$158 = errUnknown; - protoreflect.Value.copy(val, _tmp$156); - n = _tmp$157; - err = _tmp$158; - $s = -1; return [val, n, err]; - } - _r$6 = fd.Number(); /* */ $s = 29; case 29: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protowire.ConsumeGroup(_r$6, b); /* */ $s = 30; case 30: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$17 = _r$7; - v$17 = _tuple$17[0]; - n$18 = _tuple$17[1]; - if (n$18 < 0) { - _tmp$159 = $clone(val, protoreflect.Value); - _tmp$160 = 0; - _tmp$161 = errDecode; - protoreflect.Value.copy(val, _tmp$159); - n = _tmp$160; - err = _tmp$161; - $s = -1; return [val, n, err]; - } - _tmp$162 = $clone(protoreflect.ValueOfBytes(v$17), protoreflect.Value); - _tmp$163 = n$18; - _tmp$164 = $ifaceNil; - protoreflect.Value.copy(val, _tmp$162); - n = _tmp$163; - err = _tmp$164; - $s = -1; return [val, n, err]; - /* } else { */ case 21: - _tmp$165 = $clone(val, protoreflect.Value); - _tmp$166 = 0; - _tmp$167 = errUnknown; - protoreflect.Value.copy(val, _tmp$165); - n = _tmp$166; - err = _tmp$167; - $s = -1; return [val, n, err]; - /* } */ case 22: - case 1: - $s = -1; return [val, n, err]; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalScalar, $c: true, $r, $24r, _1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$100, _tmp$101, _tmp$102, _tmp$103, _tmp$104, _tmp$105, _tmp$106, _tmp$107, _tmp$108, _tmp$109, _tmp$11, _tmp$110, _tmp$111, _tmp$112, _tmp$113, _tmp$114, _tmp$115, _tmp$116, _tmp$117, _tmp$118, _tmp$119, _tmp$12, _tmp$120, _tmp$121, _tmp$122, _tmp$123, _tmp$124, _tmp$125, _tmp$126, _tmp$127, _tmp$128, _tmp$129, _tmp$13, _tmp$130, _tmp$131, _tmp$132, _tmp$133, _tmp$134, _tmp$135, _tmp$136, _tmp$137, _tmp$138, _tmp$139, _tmp$14, _tmp$140, _tmp$141, _tmp$142, _tmp$143, _tmp$144, _tmp$145, _tmp$146, _tmp$147, _tmp$148, _tmp$149, _tmp$15, _tmp$150, _tmp$151, _tmp$152, _tmp$153, _tmp$154, _tmp$155, _tmp$156, _tmp$157, _tmp$158, _tmp$159, _tmp$16, _tmp$160, _tmp$161, _tmp$162, _tmp$163, _tmp$164, _tmp$165, _tmp$166, _tmp$167, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$81, _tmp$82, _tmp$83, _tmp$84, _tmp$85, _tmp$86, _tmp$87, _tmp$88, _tmp$89, _tmp$9, _tmp$90, _tmp$91, _tmp$92, _tmp$93, _tmp$94, _tmp$95, _tmp$96, _tmp$97, _tmp$98, _tmp$99, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, err, fd, n, n$1, n$10, n$11, n$12, n$13, n$14, n$15, n$16, n$17, n$18, n$2, n$3, n$4, n$5, n$6, n$7, n$8, n$9, o, v, v$1, v$10, v$11, v$12, v$13, v$14, v$15, v$16, v$17, v$2, v$3, v$4, v$5, v$6, v$7, v$8, v$9, val, wtyp, x, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalScalar = function(b, wtyp, fd) { return this.$val.unmarshalScalar(b, wtyp, fd); }; - UnmarshalOptions.ptr.prototype.unmarshalList = function(b, wtyp, list, fd) { - var {$24r, _1, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$100, _tmp$101, _tmp$102, _tmp$103, _tmp$104, _tmp$105, _tmp$106, _tmp$107, _tmp$108, _tmp$109, _tmp$11, _tmp$110, _tmp$111, _tmp$112, _tmp$113, _tmp$114, _tmp$115, _tmp$116, _tmp$117, _tmp$118, _tmp$119, _tmp$12, _tmp$120, _tmp$121, _tmp$122, _tmp$123, _tmp$124, _tmp$125, _tmp$126, _tmp$127, _tmp$128, _tmp$129, _tmp$13, _tmp$130, _tmp$131, _tmp$132, _tmp$133, _tmp$134, _tmp$135, _tmp$136, _tmp$137, _tmp$138, _tmp$139, _tmp$14, _tmp$140, _tmp$141, _tmp$142, _tmp$143, _tmp$144, _tmp$145, _tmp$146, _tmp$147, _tmp$148, _tmp$149, _tmp$15, _tmp$150, _tmp$151, _tmp$152, _tmp$153, _tmp$154, _tmp$155, _tmp$156, _tmp$157, _tmp$158, _tmp$159, _tmp$16, _tmp$160, _tmp$161, _tmp$162, _tmp$163, _tmp$164, _tmp$165, _tmp$166, _tmp$167, _tmp$168, _tmp$169, _tmp$17, _tmp$170, _tmp$171, _tmp$172, _tmp$173, _tmp$174, _tmp$175, _tmp$176, _tmp$177, _tmp$178, _tmp$179, _tmp$18, _tmp$180, _tmp$181, _tmp$182, _tmp$183, _tmp$184, _tmp$185, _tmp$186, _tmp$187, _tmp$188, _tmp$189, _tmp$19, _tmp$190, _tmp$191, _tmp$192, _tmp$193, _tmp$194, _tmp$195, _tmp$196, _tmp$197, _tmp$198, _tmp$199, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$81, _tmp$82, _tmp$83, _tmp$84, _tmp$85, _tmp$86, _tmp$87, _tmp$88, _tmp$89, _tmp$9, _tmp$90, _tmp$91, _tmp$92, _tmp$93, _tmp$94, _tmp$95, _tmp$96, _tmp$97, _tmp$98, _tmp$99, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, buf, buf$1, buf$10, buf$11, buf$12, buf$13, buf$2, buf$3, buf$4, buf$5, buf$6, buf$7, buf$8, buf$9, err, err$1, err$2, fd, list, m, m$1, n, n$1, n$10, n$11, n$12, n$13, n$14, n$15, n$16, n$17, n$18, n$19, n$2, n$20, n$21, n$22, n$23, n$24, n$25, n$26, n$27, n$28, n$29, n$3, n$30, n$31, n$32, n$33, n$34, n$35, n$36, n$37, n$38, n$39, n$4, n$40, n$41, n$42, n$43, n$44, n$45, n$46, n$5, n$6, n$7, n$8, n$9, o, v, v$1, v$10, v$11, v$12, v$13, v$14, v$15, v$16, v$17, v$18, v$19, v$2, v$20, v$21, v$22, v$23, v$24, v$25, v$26, v$27, v$28, v$29, v$3, v$30, v$31, v$4, v$5, v$6, v$7, v$8, v$9, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, wtyp, list, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - o = this; - _r$2 = fd.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _1 = _r$2; - /* */ if (_1 === (8)) { $s = 3; continue; } - /* */ if (_1 === (14)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (17)) { $s = 6; continue; } - /* */ if (_1 === (13)) { $s = 7; continue; } - /* */ if (_1 === (3)) { $s = 8; continue; } - /* */ if (_1 === (18)) { $s = 9; continue; } - /* */ if (_1 === (4)) { $s = 10; continue; } - /* */ if (_1 === (15)) { $s = 11; continue; } - /* */ if (_1 === (7)) { $s = 12; continue; } - /* */ if (_1 === (2)) { $s = 13; continue; } - /* */ if (_1 === (16)) { $s = 14; continue; } - /* */ if (_1 === (6)) { $s = 15; continue; } - /* */ if (_1 === (1)) { $s = 16; continue; } - /* */ if (_1 === (9)) { $s = 17; continue; } - /* */ if (_1 === (12)) { $s = 18; continue; } - /* */ if (_1 === (11)) { $s = 19; continue; } - /* */ if (_1 === (10)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_1 === (8)) { */ case 3: - /* */ if (wtyp === 2) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (wtyp === 2) { */ case 23: - _tuple = protowire.ConsumeBytes(b); - buf = _tuple[0]; - n$1 = _tuple[1]; - if (n$1 < 0) { - _tmp = 0; - _tmp$1 = errDecode; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* while (true) { */ case 25: - /* if (!(buf.$length > 0)) { break; } */ if(!(buf.$length > 0)) { $s = 26; continue; } - _tuple$1 = protowire.ConsumeVarint(buf); - v = _tuple$1[0]; - n$2 = _tuple$1[1]; - if (n$2 < 0) { - _tmp$2 = 0; - _tmp$3 = errDecode; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - buf = $subslice(buf, n$2); - $r = list.Append($clone(protoreflect.ValueOfBool(protowire.DecodeBool(v)), protoreflect.Value)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 25; continue; - case 26: - _tmp$4 = n$1; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* } */ case 24: - if (!((wtyp === 0))) { - _tmp$6 = 0; - _tmp$7 = errUnknown; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - } - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$3 = _tuple$2[1]; - if (n$3 < 0) { - _tmp$8 = 0; - _tmp$9 = errDecode; - n = _tmp$8; - err = _tmp$9; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfBool(protowire.DecodeBool(v$1)), protoreflect.Value)); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$10 = n$3; - _tmp$11 = $ifaceNil; - n = _tmp$10; - err = _tmp$11; - $s = -1; return [n, err]; - /* } else if (_1 === (14)) { */ case 4: - /* */ if (wtyp === 2) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (wtyp === 2) { */ case 29: - _tuple$3 = protowire.ConsumeBytes(b); - buf$1 = _tuple$3[0]; - n$4 = _tuple$3[1]; - if (n$4 < 0) { - _tmp$12 = 0; - _tmp$13 = errDecode; - n = _tmp$12; - err = _tmp$13; - $s = -1; return [n, err]; - } - /* while (true) { */ case 31: - /* if (!(buf$1.$length > 0)) { break; } */ if(!(buf$1.$length > 0)) { $s = 32; continue; } - _tuple$4 = protowire.ConsumeVarint(buf$1); - v$2 = _tuple$4[0]; - n$5 = _tuple$4[1]; - if (n$5 < 0) { - _tmp$14 = 0; - _tmp$15 = errDecode; - n = _tmp$14; - err = _tmp$15; - $s = -1; return [n, err]; - } - buf$1 = $subslice(buf$1, n$5); - $r = list.Append($clone(protoreflect.ValueOfEnum(((v$2.$low >> 0))), protoreflect.Value)); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 31; continue; - case 32: - _tmp$16 = n$4; - _tmp$17 = $ifaceNil; - n = _tmp$16; - err = _tmp$17; - $s = -1; return [n, err]; - /* } */ case 30: - if (!((wtyp === 0))) { - _tmp$18 = 0; - _tmp$19 = errUnknown; - n = _tmp$18; - err = _tmp$19; - $s = -1; return [n, err]; - } - _tuple$5 = protowire.ConsumeVarint(b); - v$3 = _tuple$5[0]; - n$6 = _tuple$5[1]; - if (n$6 < 0) { - _tmp$20 = 0; - _tmp$21 = errDecode; - n = _tmp$20; - err = _tmp$21; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfEnum(((v$3.$low >> 0))), protoreflect.Value)); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$22 = n$6; - _tmp$23 = $ifaceNil; - n = _tmp$22; - err = _tmp$23; - $s = -1; return [n, err]; - /* } else if (_1 === (5)) { */ case 5: - /* */ if (wtyp === 2) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (wtyp === 2) { */ case 35: - _tuple$6 = protowire.ConsumeBytes(b); - buf$2 = _tuple$6[0]; - n$7 = _tuple$6[1]; - if (n$7 < 0) { - _tmp$24 = 0; - _tmp$25 = errDecode; - n = _tmp$24; - err = _tmp$25; - $s = -1; return [n, err]; - } - /* while (true) { */ case 37: - /* if (!(buf$2.$length > 0)) { break; } */ if(!(buf$2.$length > 0)) { $s = 38; continue; } - _tuple$7 = protowire.ConsumeVarint(buf$2); - v$4 = _tuple$7[0]; - n$8 = _tuple$7[1]; - if (n$8 < 0) { - _tmp$26 = 0; - _tmp$27 = errDecode; - n = _tmp$26; - err = _tmp$27; - $s = -1; return [n, err]; - } - buf$2 = $subslice(buf$2, n$8); - $r = list.Append($clone(protoreflect.ValueOfInt32(((v$4.$low >> 0))), protoreflect.Value)); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 37; continue; - case 38: - _tmp$28 = n$7; - _tmp$29 = $ifaceNil; - n = _tmp$28; - err = _tmp$29; - $s = -1; return [n, err]; - /* } */ case 36: - if (!((wtyp === 0))) { - _tmp$30 = 0; - _tmp$31 = errUnknown; - n = _tmp$30; - err = _tmp$31; - $s = -1; return [n, err]; - } - _tuple$8 = protowire.ConsumeVarint(b); - v$5 = _tuple$8[0]; - n$9 = _tuple$8[1]; - if (n$9 < 0) { - _tmp$32 = 0; - _tmp$33 = errDecode; - n = _tmp$32; - err = _tmp$33; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32(((v$5.$low >> 0))), protoreflect.Value)); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$34 = n$9; - _tmp$35 = $ifaceNil; - n = _tmp$34; - err = _tmp$35; - $s = -1; return [n, err]; - /* } else if (_1 === (17)) { */ case 6: - /* */ if (wtyp === 2) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (wtyp === 2) { */ case 41: - _tuple$9 = protowire.ConsumeBytes(b); - buf$3 = _tuple$9[0]; - n$10 = _tuple$9[1]; - if (n$10 < 0) { - _tmp$36 = 0; - _tmp$37 = errDecode; - n = _tmp$36; - err = _tmp$37; - $s = -1; return [n, err]; - } - /* while (true) { */ case 43: - /* if (!(buf$3.$length > 0)) { break; } */ if(!(buf$3.$length > 0)) { $s = 44; continue; } - _tuple$10 = protowire.ConsumeVarint(buf$3); - v$6 = _tuple$10[0]; - n$11 = _tuple$10[1]; - if (n$11 < 0) { - _tmp$38 = 0; - _tmp$39 = errDecode; - n = _tmp$38; - err = _tmp$39; - $s = -1; return [n, err]; - } - buf$3 = $subslice(buf$3, n$11); - $r = list.Append($clone(protoreflect.ValueOfInt32((((x = protowire.DecodeZigZag(new $Uint64(v$6.$high & 0, (v$6.$low & 4294967295) >>> 0)), x.$low + ((x.$high >> 31) * 4294967296)) >> 0))), protoreflect.Value)); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 43; continue; - case 44: - _tmp$40 = n$10; - _tmp$41 = $ifaceNil; - n = _tmp$40; - err = _tmp$41; - $s = -1; return [n, err]; - /* } */ case 42: - if (!((wtyp === 0))) { - _tmp$42 = 0; - _tmp$43 = errUnknown; - n = _tmp$42; - err = _tmp$43; - $s = -1; return [n, err]; - } - _tuple$11 = protowire.ConsumeVarint(b); - v$7 = _tuple$11[0]; - n$12 = _tuple$11[1]; - if (n$12 < 0) { - _tmp$44 = 0; - _tmp$45 = errDecode; - n = _tmp$44; - err = _tmp$45; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32((((x$1 = protowire.DecodeZigZag(new $Uint64(v$7.$high & 0, (v$7.$low & 4294967295) >>> 0)), x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0))), protoreflect.Value)); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$46 = n$12; - _tmp$47 = $ifaceNil; - n = _tmp$46; - err = _tmp$47; - $s = -1; return [n, err]; - /* } else if (_1 === (13)) { */ case 7: - /* */ if (wtyp === 2) { $s = 47; continue; } - /* */ $s = 48; continue; - /* if (wtyp === 2) { */ case 47: - _tuple$12 = protowire.ConsumeBytes(b); - buf$4 = _tuple$12[0]; - n$13 = _tuple$12[1]; - if (n$13 < 0) { - _tmp$48 = 0; - _tmp$49 = errDecode; - n = _tmp$48; - err = _tmp$49; - $s = -1; return [n, err]; - } - /* while (true) { */ case 49: - /* if (!(buf$4.$length > 0)) { break; } */ if(!(buf$4.$length > 0)) { $s = 50; continue; } - _tuple$13 = protowire.ConsumeVarint(buf$4); - v$8 = _tuple$13[0]; - n$14 = _tuple$13[1]; - if (n$14 < 0) { - _tmp$50 = 0; - _tmp$51 = errDecode; - n = _tmp$50; - err = _tmp$51; - $s = -1; return [n, err]; - } - buf$4 = $subslice(buf$4, n$14); - $r = list.Append($clone(protoreflect.ValueOfUint32(((v$8.$low >>> 0))), protoreflect.Value)); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 49; continue; - case 50: - _tmp$52 = n$13; - _tmp$53 = $ifaceNil; - n = _tmp$52; - err = _tmp$53; - $s = -1; return [n, err]; - /* } */ case 48: - if (!((wtyp === 0))) { - _tmp$54 = 0; - _tmp$55 = errUnknown; - n = _tmp$54; - err = _tmp$55; - $s = -1; return [n, err]; - } - _tuple$14 = protowire.ConsumeVarint(b); - v$9 = _tuple$14[0]; - n$15 = _tuple$14[1]; - if (n$15 < 0) { - _tmp$56 = 0; - _tmp$57 = errDecode; - n = _tmp$56; - err = _tmp$57; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint32(((v$9.$low >>> 0))), protoreflect.Value)); /* */ $s = 52; case 52: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$58 = n$15; - _tmp$59 = $ifaceNil; - n = _tmp$58; - err = _tmp$59; - $s = -1; return [n, err]; - /* } else if (_1 === (3)) { */ case 8: - /* */ if (wtyp === 2) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if (wtyp === 2) { */ case 53: - _tuple$15 = protowire.ConsumeBytes(b); - buf$5 = _tuple$15[0]; - n$16 = _tuple$15[1]; - if (n$16 < 0) { - _tmp$60 = 0; - _tmp$61 = errDecode; - n = _tmp$60; - err = _tmp$61; - $s = -1; return [n, err]; - } - /* while (true) { */ case 55: - /* if (!(buf$5.$length > 0)) { break; } */ if(!(buf$5.$length > 0)) { $s = 56; continue; } - _tuple$16 = protowire.ConsumeVarint(buf$5); - v$10 = _tuple$16[0]; - n$17 = _tuple$16[1]; - if (n$17 < 0) { - _tmp$62 = 0; - _tmp$63 = errDecode; - n = _tmp$62; - err = _tmp$63; - $s = -1; return [n, err]; - } - buf$5 = $subslice(buf$5, n$17); - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v$10.$high, v$10.$low))), protoreflect.Value)); /* */ $s = 57; case 57: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 55; continue; - case 56: - _tmp$64 = n$16; - _tmp$65 = $ifaceNil; - n = _tmp$64; - err = _tmp$65; - $s = -1; return [n, err]; - /* } */ case 54: - if (!((wtyp === 0))) { - _tmp$66 = 0; - _tmp$67 = errUnknown; - n = _tmp$66; - err = _tmp$67; - $s = -1; return [n, err]; - } - _tuple$17 = protowire.ConsumeVarint(b); - v$11 = _tuple$17[0]; - n$18 = _tuple$17[1]; - if (n$18 < 0) { - _tmp$68 = 0; - _tmp$69 = errDecode; - n = _tmp$68; - err = _tmp$69; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v$11.$high, v$11.$low))), protoreflect.Value)); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$70 = n$18; - _tmp$71 = $ifaceNil; - n = _tmp$70; - err = _tmp$71; - $s = -1; return [n, err]; - /* } else if (_1 === (18)) { */ case 9: - /* */ if (wtyp === 2) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (wtyp === 2) { */ case 59: - _tuple$18 = protowire.ConsumeBytes(b); - buf$6 = _tuple$18[0]; - n$19 = _tuple$18[1]; - if (n$19 < 0) { - _tmp$72 = 0; - _tmp$73 = errDecode; - n = _tmp$72; - err = _tmp$73; - $s = -1; return [n, err]; - } - /* while (true) { */ case 61: - /* if (!(buf$6.$length > 0)) { break; } */ if(!(buf$6.$length > 0)) { $s = 62; continue; } - _tuple$19 = protowire.ConsumeVarint(buf$6); - v$12 = _tuple$19[0]; - n$20 = _tuple$19[1]; - if (n$20 < 0) { - _tmp$74 = 0; - _tmp$75 = errDecode; - n = _tmp$74; - err = _tmp$75; - $s = -1; return [n, err]; - } - buf$6 = $subslice(buf$6, n$20); - $r = list.Append($clone(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v$12)), protoreflect.Value)); /* */ $s = 63; case 63: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 61; continue; - case 62: - _tmp$76 = n$19; - _tmp$77 = $ifaceNil; - n = _tmp$76; - err = _tmp$77; - $s = -1; return [n, err]; - /* } */ case 60: - if (!((wtyp === 0))) { - _tmp$78 = 0; - _tmp$79 = errUnknown; - n = _tmp$78; - err = _tmp$79; - $s = -1; return [n, err]; - } - _tuple$20 = protowire.ConsumeVarint(b); - v$13 = _tuple$20[0]; - n$21 = _tuple$20[1]; - if (n$21 < 0) { - _tmp$80 = 0; - _tmp$81 = errDecode; - n = _tmp$80; - err = _tmp$81; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v$13)), protoreflect.Value)); /* */ $s = 64; case 64: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$82 = n$21; - _tmp$83 = $ifaceNil; - n = _tmp$82; - err = _tmp$83; - $s = -1; return [n, err]; - /* } else if (_1 === (4)) { */ case 10: - /* */ if (wtyp === 2) { $s = 65; continue; } - /* */ $s = 66; continue; - /* if (wtyp === 2) { */ case 65: - _tuple$21 = protowire.ConsumeBytes(b); - buf$7 = _tuple$21[0]; - n$22 = _tuple$21[1]; - if (n$22 < 0) { - _tmp$84 = 0; - _tmp$85 = errDecode; - n = _tmp$84; - err = _tmp$85; - $s = -1; return [n, err]; - } - /* while (true) { */ case 67: - /* if (!(buf$7.$length > 0)) { break; } */ if(!(buf$7.$length > 0)) { $s = 68; continue; } - _tuple$22 = protowire.ConsumeVarint(buf$7); - v$14 = _tuple$22[0]; - n$23 = _tuple$22[1]; - if (n$23 < 0) { - _tmp$86 = 0; - _tmp$87 = errDecode; - n = _tmp$86; - err = _tmp$87; - $s = -1; return [n, err]; - } - buf$7 = $subslice(buf$7, n$23); - $r = list.Append($clone(protoreflect.ValueOfUint64(v$14), protoreflect.Value)); /* */ $s = 69; case 69: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 67; continue; - case 68: - _tmp$88 = n$22; - _tmp$89 = $ifaceNil; - n = _tmp$88; - err = _tmp$89; - $s = -1; return [n, err]; - /* } */ case 66: - if (!((wtyp === 0))) { - _tmp$90 = 0; - _tmp$91 = errUnknown; - n = _tmp$90; - err = _tmp$91; - $s = -1; return [n, err]; - } - _tuple$23 = protowire.ConsumeVarint(b); - v$15 = _tuple$23[0]; - n$24 = _tuple$23[1]; - if (n$24 < 0) { - _tmp$92 = 0; - _tmp$93 = errDecode; - n = _tmp$92; - err = _tmp$93; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint64(v$15), protoreflect.Value)); /* */ $s = 70; case 70: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$94 = n$24; - _tmp$95 = $ifaceNil; - n = _tmp$94; - err = _tmp$95; - $s = -1; return [n, err]; - /* } else if (_1 === (15)) { */ case 11: - /* */ if (wtyp === 2) { $s = 71; continue; } - /* */ $s = 72; continue; - /* if (wtyp === 2) { */ case 71: - _tuple$24 = protowire.ConsumeBytes(b); - buf$8 = _tuple$24[0]; - n$25 = _tuple$24[1]; - if (n$25 < 0) { - _tmp$96 = 0; - _tmp$97 = errDecode; - n = _tmp$96; - err = _tmp$97; - $s = -1; return [n, err]; - } - /* while (true) { */ case 73: - /* if (!(buf$8.$length > 0)) { break; } */ if(!(buf$8.$length > 0)) { $s = 74; continue; } - _tuple$25 = protowire.ConsumeFixed32(buf$8); - v$16 = _tuple$25[0]; - n$26 = _tuple$25[1]; - if (n$26 < 0) { - _tmp$98 = 0; - _tmp$99 = errDecode; - n = _tmp$98; - err = _tmp$99; - $s = -1; return [n, err]; - } - buf$8 = $subslice(buf$8, n$26); - $r = list.Append($clone(protoreflect.ValueOfInt32(((v$16 >> 0))), protoreflect.Value)); /* */ $s = 75; case 75: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 73; continue; - case 74: - _tmp$100 = n$25; - _tmp$101 = $ifaceNil; - n = _tmp$100; - err = _tmp$101; - $s = -1; return [n, err]; - /* } */ case 72: - if (!((wtyp === 5))) { - _tmp$102 = 0; - _tmp$103 = errUnknown; - n = _tmp$102; - err = _tmp$103; - $s = -1; return [n, err]; - } - _tuple$26 = protowire.ConsumeFixed32(b); - v$17 = _tuple$26[0]; - n$27 = _tuple$26[1]; - if (n$27 < 0) { - _tmp$104 = 0; - _tmp$105 = errDecode; - n = _tmp$104; - err = _tmp$105; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32(((v$17 >> 0))), protoreflect.Value)); /* */ $s = 76; case 76: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$106 = n$27; - _tmp$107 = $ifaceNil; - n = _tmp$106; - err = _tmp$107; - $s = -1; return [n, err]; - /* } else if (_1 === (7)) { */ case 12: - /* */ if (wtyp === 2) { $s = 77; continue; } - /* */ $s = 78; continue; - /* if (wtyp === 2) { */ case 77: - _tuple$27 = protowire.ConsumeBytes(b); - buf$9 = _tuple$27[0]; - n$28 = _tuple$27[1]; - if (n$28 < 0) { - _tmp$108 = 0; - _tmp$109 = errDecode; - n = _tmp$108; - err = _tmp$109; - $s = -1; return [n, err]; - } - /* while (true) { */ case 79: - /* if (!(buf$9.$length > 0)) { break; } */ if(!(buf$9.$length > 0)) { $s = 80; continue; } - _tuple$28 = protowire.ConsumeFixed32(buf$9); - v$18 = _tuple$28[0]; - n$29 = _tuple$28[1]; - if (n$29 < 0) { - _tmp$110 = 0; - _tmp$111 = errDecode; - n = _tmp$110; - err = _tmp$111; - $s = -1; return [n, err]; - } - buf$9 = $subslice(buf$9, n$29); - $r = list.Append($clone(protoreflect.ValueOfUint32((v$18)), protoreflect.Value)); /* */ $s = 81; case 81: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 79; continue; - case 80: - _tmp$112 = n$28; - _tmp$113 = $ifaceNil; - n = _tmp$112; - err = _tmp$113; - $s = -1; return [n, err]; - /* } */ case 78: - if (!((wtyp === 5))) { - _tmp$114 = 0; - _tmp$115 = errUnknown; - n = _tmp$114; - err = _tmp$115; - $s = -1; return [n, err]; - } - _tuple$29 = protowire.ConsumeFixed32(b); - v$19 = _tuple$29[0]; - n$30 = _tuple$29[1]; - if (n$30 < 0) { - _tmp$116 = 0; - _tmp$117 = errDecode; - n = _tmp$116; - err = _tmp$117; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint32((v$19)), protoreflect.Value)); /* */ $s = 82; case 82: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$118 = n$30; - _tmp$119 = $ifaceNil; - n = _tmp$118; - err = _tmp$119; - $s = -1; return [n, err]; - /* } else if (_1 === (2)) { */ case 13: - /* */ if (wtyp === 2) { $s = 83; continue; } - /* */ $s = 84; continue; - /* if (wtyp === 2) { */ case 83: - _tuple$30 = protowire.ConsumeBytes(b); - buf$10 = _tuple$30[0]; - n$31 = _tuple$30[1]; - if (n$31 < 0) { - _tmp$120 = 0; - _tmp$121 = errDecode; - n = _tmp$120; - err = _tmp$121; - $s = -1; return [n, err]; - } - /* while (true) { */ case 85: - /* if (!(buf$10.$length > 0)) { break; } */ if(!(buf$10.$length > 0)) { $s = 86; continue; } - _tuple$31 = protowire.ConsumeFixed32(buf$10); - v$20 = _tuple$31[0]; - n$32 = _tuple$31[1]; - if (n$32 < 0) { - _tmp$122 = 0; - _tmp$123 = errDecode; - n = _tmp$122; - err = _tmp$123; - $s = -1; return [n, err]; - } - buf$10 = $subslice(buf$10, n$32); - $r = list.Append($clone(protoreflect.ValueOfFloat32(math.Float32frombits((v$20))), protoreflect.Value)); /* */ $s = 87; case 87: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 85; continue; - case 86: - _tmp$124 = n$31; - _tmp$125 = $ifaceNil; - n = _tmp$124; - err = _tmp$125; - $s = -1; return [n, err]; - /* } */ case 84: - if (!((wtyp === 5))) { - _tmp$126 = 0; - _tmp$127 = errUnknown; - n = _tmp$126; - err = _tmp$127; - $s = -1; return [n, err]; - } - _tuple$32 = protowire.ConsumeFixed32(b); - v$21 = _tuple$32[0]; - n$33 = _tuple$32[1]; - if (n$33 < 0) { - _tmp$128 = 0; - _tmp$129 = errDecode; - n = _tmp$128; - err = _tmp$129; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfFloat32(math.Float32frombits((v$21))), protoreflect.Value)); /* */ $s = 88; case 88: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$130 = n$33; - _tmp$131 = $ifaceNil; - n = _tmp$130; - err = _tmp$131; - $s = -1; return [n, err]; - /* } else if (_1 === (16)) { */ case 14: - /* */ if (wtyp === 2) { $s = 89; continue; } - /* */ $s = 90; continue; - /* if (wtyp === 2) { */ case 89: - _tuple$33 = protowire.ConsumeBytes(b); - buf$11 = _tuple$33[0]; - n$34 = _tuple$33[1]; - if (n$34 < 0) { - _tmp$132 = 0; - _tmp$133 = errDecode; - n = _tmp$132; - err = _tmp$133; - $s = -1; return [n, err]; - } - /* while (true) { */ case 91: - /* if (!(buf$11.$length > 0)) { break; } */ if(!(buf$11.$length > 0)) { $s = 92; continue; } - _tuple$34 = protowire.ConsumeFixed64(buf$11); - v$22 = _tuple$34[0]; - n$35 = _tuple$34[1]; - if (n$35 < 0) { - _tmp$134 = 0; - _tmp$135 = errDecode; - n = _tmp$134; - err = _tmp$135; - $s = -1; return [n, err]; - } - buf$11 = $subslice(buf$11, n$35); - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v$22.$high, v$22.$low))), protoreflect.Value)); /* */ $s = 93; case 93: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 91; continue; - case 92: - _tmp$136 = n$34; - _tmp$137 = $ifaceNil; - n = _tmp$136; - err = _tmp$137; - $s = -1; return [n, err]; - /* } */ case 90: - if (!((wtyp === 1))) { - _tmp$138 = 0; - _tmp$139 = errUnknown; - n = _tmp$138; - err = _tmp$139; - $s = -1; return [n, err]; - } - _tuple$35 = protowire.ConsumeFixed64(b); - v$23 = _tuple$35[0]; - n$36 = _tuple$35[1]; - if (n$36 < 0) { - _tmp$140 = 0; - _tmp$141 = errDecode; - n = _tmp$140; - err = _tmp$141; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v$23.$high, v$23.$low))), protoreflect.Value)); /* */ $s = 94; case 94: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$142 = n$36; - _tmp$143 = $ifaceNil; - n = _tmp$142; - err = _tmp$143; - $s = -1; return [n, err]; - /* } else if (_1 === (6)) { */ case 15: - /* */ if (wtyp === 2) { $s = 95; continue; } - /* */ $s = 96; continue; - /* if (wtyp === 2) { */ case 95: - _tuple$36 = protowire.ConsumeBytes(b); - buf$12 = _tuple$36[0]; - n$37 = _tuple$36[1]; - if (n$37 < 0) { - _tmp$144 = 0; - _tmp$145 = errDecode; - n = _tmp$144; - err = _tmp$145; - $s = -1; return [n, err]; - } - /* while (true) { */ case 97: - /* if (!(buf$12.$length > 0)) { break; } */ if(!(buf$12.$length > 0)) { $s = 98; continue; } - _tuple$37 = protowire.ConsumeFixed64(buf$12); - v$24 = _tuple$37[0]; - n$38 = _tuple$37[1]; - if (n$38 < 0) { - _tmp$146 = 0; - _tmp$147 = errDecode; - n = _tmp$146; - err = _tmp$147; - $s = -1; return [n, err]; - } - buf$12 = $subslice(buf$12, n$38); - $r = list.Append($clone(protoreflect.ValueOfUint64(v$24), protoreflect.Value)); /* */ $s = 99; case 99: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 97; continue; - case 98: - _tmp$148 = n$37; - _tmp$149 = $ifaceNil; - n = _tmp$148; - err = _tmp$149; - $s = -1; return [n, err]; - /* } */ case 96: - if (!((wtyp === 1))) { - _tmp$150 = 0; - _tmp$151 = errUnknown; - n = _tmp$150; - err = _tmp$151; - $s = -1; return [n, err]; - } - _tuple$38 = protowire.ConsumeFixed64(b); - v$25 = _tuple$38[0]; - n$39 = _tuple$38[1]; - if (n$39 < 0) { - _tmp$152 = 0; - _tmp$153 = errDecode; - n = _tmp$152; - err = _tmp$153; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint64(v$25), protoreflect.Value)); /* */ $s = 100; case 100: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$154 = n$39; - _tmp$155 = $ifaceNil; - n = _tmp$154; - err = _tmp$155; - $s = -1; return [n, err]; - /* } else if (_1 === (1)) { */ case 16: - /* */ if (wtyp === 2) { $s = 101; continue; } - /* */ $s = 102; continue; - /* if (wtyp === 2) { */ case 101: - _tuple$39 = protowire.ConsumeBytes(b); - buf$13 = _tuple$39[0]; - n$40 = _tuple$39[1]; - if (n$40 < 0) { - _tmp$156 = 0; - _tmp$157 = errDecode; - n = _tmp$156; - err = _tmp$157; - $s = -1; return [n, err]; - } - /* while (true) { */ case 103: - /* if (!(buf$13.$length > 0)) { break; } */ if(!(buf$13.$length > 0)) { $s = 104; continue; } - _tuple$40 = protowire.ConsumeFixed64(buf$13); - v$26 = _tuple$40[0]; - n$41 = _tuple$40[1]; - if (n$41 < 0) { - _tmp$158 = 0; - _tmp$159 = errDecode; - n = _tmp$158; - err = _tmp$159; - $s = -1; return [n, err]; - } - buf$13 = $subslice(buf$13, n$41); - $r = list.Append($clone(protoreflect.ValueOfFloat64(math.Float64frombits(v$26)), protoreflect.Value)); /* */ $s = 105; case 105: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 103; continue; - case 104: - _tmp$160 = n$40; - _tmp$161 = $ifaceNil; - n = _tmp$160; - err = _tmp$161; - $s = -1; return [n, err]; - /* } */ case 102: - if (!((wtyp === 1))) { - _tmp$162 = 0; - _tmp$163 = errUnknown; - n = _tmp$162; - err = _tmp$163; - $s = -1; return [n, err]; - } - _tuple$41 = protowire.ConsumeFixed64(b); - v$27 = _tuple$41[0]; - n$42 = _tuple$41[1]; - if (n$42 < 0) { - _tmp$164 = 0; - _tmp$165 = errDecode; - n = _tmp$164; - err = _tmp$165; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfFloat64(math.Float64frombits(v$27)), protoreflect.Value)); /* */ $s = 106; case 106: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$166 = n$42; - _tmp$167 = $ifaceNil; - n = _tmp$166; - err = _tmp$167; - $s = -1; return [n, err]; - /* } else if (_1 === (9)) { */ case 17: - if (!((wtyp === 2))) { - _tmp$168 = 0; - _tmp$169 = errUnknown; - n = _tmp$168; - err = _tmp$169; - $s = -1; return [n, err]; - } - _tuple$42 = protowire.ConsumeBytes(b); - v$28 = _tuple$42[0]; - n$43 = _tuple$42[1]; - if (n$43 < 0) { - _tmp$170 = 0; - _tmp$171 = errDecode; - n = _tmp$170; - err = _tmp$171; - $s = -1; return [n, err]; - } - _r$3 = strs.EnforceUTF8(fd); /* */ $s = 109; case 109: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 && !utf8.Valid(v$28)) { $s = 107; continue; } - /* */ $s = 108; continue; - /* if (_r$3 && !utf8.Valid(v$28)) { */ case 107: - _tmp$172 = 0; - _r$4 = fd.FullName(); /* */ $s = 110; case 110: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = errors.InvalidUTF8((_r$4)); /* */ $s = 111; case 111: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$173 = _r$5; - n = _tmp$172; - err = _tmp$173; - $24r = [n, err]; - $s = 112; case 112: return $24r; - /* } */ case 108: - $r = list.Append($clone(protoreflect.ValueOfString(($bytesToString(v$28))), protoreflect.Value)); /* */ $s = 113; case 113: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$174 = n$43; - _tmp$175 = $ifaceNil; - n = _tmp$174; - err = _tmp$175; - $s = -1; return [n, err]; - /* } else if (_1 === (12)) { */ case 18: - if (!((wtyp === 2))) { - _tmp$176 = 0; - _tmp$177 = errUnknown; - n = _tmp$176; - err = _tmp$177; - $s = -1; return [n, err]; - } - _tuple$43 = protowire.ConsumeBytes(b); - v$29 = _tuple$43[0]; - n$44 = _tuple$43[1]; - if (n$44 < 0) { - _tmp$178 = 0; - _tmp$179 = errDecode; - n = _tmp$178; - err = _tmp$179; - $s = -1; return [n, err]; - } - $r = list.Append($clone(protoreflect.ValueOfBytes($appendSlice(new sliceType$1(emptyBuf), v$29)), protoreflect.Value)); /* */ $s = 114; case 114: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$180 = n$44; - _tmp$181 = $ifaceNil; - n = _tmp$180; - err = _tmp$181; - $s = -1; return [n, err]; - /* } else if (_1 === (11)) { */ case 19: - if (!((wtyp === 2))) { - _tmp$182 = 0; - _tmp$183 = errUnknown; - n = _tmp$182; - err = _tmp$183; - $s = -1; return [n, err]; - } - _tuple$44 = protowire.ConsumeBytes(b); - v$30 = _tuple$44[0]; - n$45 = _tuple$44[1]; - if (n$45 < 0) { - _tmp$184 = 0; - _tmp$185 = errDecode; - n = _tmp$184; - err = _tmp$185; - $s = -1; return [n, err]; - } - _r$6 = list.NewElement(); /* */ $s = 115; case 115: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = $clone(_r$6, protoreflect.Value); - _arg = v$30; - _r$7 = $clone(m, protoreflect.Value).Message(); /* */ $s = 116; case 116: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = _r$7; - _r$8 = $clone(o, UnmarshalOptions).unmarshalMessage(_arg, _arg$1); /* */ $s = 117; case 117: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$1 = _r$8; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$186 = 0; - _tmp$187 = err$1; - n = _tmp$186; - err = _tmp$187; - $s = -1; return [n, err]; - } - $r = list.Append($clone(m, protoreflect.Value)); /* */ $s = 118; case 118: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$188 = n$45; - _tmp$189 = $ifaceNil; - n = _tmp$188; - err = _tmp$189; - $s = -1; return [n, err]; - /* } else if (_1 === (10)) { */ case 20: - if (!((wtyp === 3))) { - _tmp$190 = 0; - _tmp$191 = errUnknown; - n = _tmp$190; - err = _tmp$191; - $s = -1; return [n, err]; - } - _r$9 = fd.Number(); /* */ $s = 119; case 119: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.ConsumeGroup(_r$9, b); /* */ $s = 120; case 120: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$45 = _r$10; - v$31 = _tuple$45[0]; - n$46 = _tuple$45[1]; - if (n$46 < 0) { - _tmp$192 = 0; - _tmp$193 = errDecode; - n = _tmp$192; - err = _tmp$193; - $s = -1; return [n, err]; - } - _r$11 = list.NewElement(); /* */ $s = 121; case 121: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - m$1 = $clone(_r$11, protoreflect.Value); - _arg$2 = v$31; - _r$12 = $clone(m$1, protoreflect.Value).Message(); /* */ $s = 122; case 122: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$3 = _r$12; - _r$13 = $clone(o, UnmarshalOptions).unmarshalMessage(_arg$2, _arg$3); /* */ $s = 123; case 123: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$2 = _r$13; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$194 = 0; - _tmp$195 = err$2; - n = _tmp$194; - err = _tmp$195; - $s = -1; return [n, err]; - } - $r = list.Append($clone(m$1, protoreflect.Value)); /* */ $s = 124; case 124: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$196 = n$46; - _tmp$197 = $ifaceNil; - n = _tmp$196; - err = _tmp$197; - $s = -1; return [n, err]; - /* } else { */ case 21: - _tmp$198 = 0; - _tmp$199 = errUnknown; - n = _tmp$198; - err = _tmp$199; - $s = -1; return [n, err]; - /* } */ case 22: - case 1: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalList, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$100, _tmp$101, _tmp$102, _tmp$103, _tmp$104, _tmp$105, _tmp$106, _tmp$107, _tmp$108, _tmp$109, _tmp$11, _tmp$110, _tmp$111, _tmp$112, _tmp$113, _tmp$114, _tmp$115, _tmp$116, _tmp$117, _tmp$118, _tmp$119, _tmp$12, _tmp$120, _tmp$121, _tmp$122, _tmp$123, _tmp$124, _tmp$125, _tmp$126, _tmp$127, _tmp$128, _tmp$129, _tmp$13, _tmp$130, _tmp$131, _tmp$132, _tmp$133, _tmp$134, _tmp$135, _tmp$136, _tmp$137, _tmp$138, _tmp$139, _tmp$14, _tmp$140, _tmp$141, _tmp$142, _tmp$143, _tmp$144, _tmp$145, _tmp$146, _tmp$147, _tmp$148, _tmp$149, _tmp$15, _tmp$150, _tmp$151, _tmp$152, _tmp$153, _tmp$154, _tmp$155, _tmp$156, _tmp$157, _tmp$158, _tmp$159, _tmp$16, _tmp$160, _tmp$161, _tmp$162, _tmp$163, _tmp$164, _tmp$165, _tmp$166, _tmp$167, _tmp$168, _tmp$169, _tmp$17, _tmp$170, _tmp$171, _tmp$172, _tmp$173, _tmp$174, _tmp$175, _tmp$176, _tmp$177, _tmp$178, _tmp$179, _tmp$18, _tmp$180, _tmp$181, _tmp$182, _tmp$183, _tmp$184, _tmp$185, _tmp$186, _tmp$187, _tmp$188, _tmp$189, _tmp$19, _tmp$190, _tmp$191, _tmp$192, _tmp$193, _tmp$194, _tmp$195, _tmp$196, _tmp$197, _tmp$198, _tmp$199, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$6, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$7, _tmp$70, _tmp$71, _tmp$72, _tmp$73, _tmp$74, _tmp$75, _tmp$76, _tmp$77, _tmp$78, _tmp$79, _tmp$8, _tmp$80, _tmp$81, _tmp$82, _tmp$83, _tmp$84, _tmp$85, _tmp$86, _tmp$87, _tmp$88, _tmp$89, _tmp$9, _tmp$90, _tmp$91, _tmp$92, _tmp$93, _tmp$94, _tmp$95, _tmp$96, _tmp$97, _tmp$98, _tmp$99, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, buf, buf$1, buf$10, buf$11, buf$12, buf$13, buf$2, buf$3, buf$4, buf$5, buf$6, buf$7, buf$8, buf$9, err, err$1, err$2, fd, list, m, m$1, n, n$1, n$10, n$11, n$12, n$13, n$14, n$15, n$16, n$17, n$18, n$19, n$2, n$20, n$21, n$22, n$23, n$24, n$25, n$26, n$27, n$28, n$29, n$3, n$30, n$31, n$32, n$33, n$34, n$35, n$36, n$37, n$38, n$39, n$4, n$40, n$41, n$42, n$43, n$44, n$45, n$46, n$5, n$6, n$7, n$8, n$9, o, v, v$1, v$10, v$11, v$12, v$13, v$14, v$15, v$16, v$17, v$18, v$19, v$2, v$20, v$21, v$22, v$23, v$24, v$25, v$26, v$27, v$28, v$29, v$3, v$30, v$31, v$4, v$5, v$6, v$7, v$8, v$9, wtyp, x, x$1, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalList = function(b, wtyp, list, fd) { return this.$val.unmarshalList(b, wtyp, list, fd); }; - UnmarshalOptions.ptr.prototype.Unmarshal = function(b, m) { - var {_arg, _arg$1, _r$2, _r$3, _tuple, b, err, m, o, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - if (o.RecursionLimit === 0) { - o.RecursionLimit = 10000; - } - _arg = b; - _r$2 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = $clone(o, UnmarshalOptions).unmarshal(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.Unmarshal, $c: true, $r, _arg, _arg$1, _r$2, _r$3, _tuple, b, err, m, o, $s};return $f; - }; - UnmarshalOptions.prototype.Unmarshal = function(b, m) { return this.$val.Unmarshal(b, m); }; - UnmarshalOptions.ptr.prototype.UnmarshalState = function(in$1) { - var {$24r, _r$2, in$1, o, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - if (o.RecursionLimit === 0) { - o.RecursionLimit = 10000; - } - _r$2 = $clone(o, UnmarshalOptions).unmarshal(in$1.Buf, in$1.Message); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.UnmarshalState, $c: true, $r, $24r, _r$2, in$1, o, $s};return $f; - }; - UnmarshalOptions.prototype.UnmarshalState = function(in$1) { return this.$val.UnmarshalState(in$1); }; - UnmarshalOptions.ptr.prototype.unmarshal = function(b, m) { - var {$24r, $24r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, allowPartial, b, err, in$1, m, methods, o, out, x, x$1, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - err = $ifaceNil; - o = this; - if ($interfaceIsEqual(o.Resolver, $ifaceNil)) { - o.Resolver = protoregistry.GlobalTypes; - } - /* */ if (!o.Merge) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!o.Merge) { */ case 1: - _r$2 = m.Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = Reset(_r$2); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - allowPartial = o.AllowPartial; - o.Merge = true; - o.AllowPartial = true; - _r$3 = protoMethods(m); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - methods = _r$3; - /* */ if (!(methods === ptrType$8.nil) && !(methods.Unmarshal === $throwNilPointerError) && !(o.DiscardUnknown && (x = (x$1 = methods.Flags, new $Uint64(x$1.$high & 0, (x$1.$low & 2) >>> 0)), (x.$high === 0 && x.$low === 0)))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(methods === ptrType$8.nil) && !(methods.Unmarshal === $throwNilPointerError) && !(o.DiscardUnknown && (x = (x$1 = methods.Flags, new $Uint64(x$1.$high & 0, (x$1.$low & 2) >>> 0)), (x.$high === 0 && x.$low === 0)))) { */ case 6: - in$1 = new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), m, b, 0, o.Resolver, o.RecursionLimit); - if (o.DiscardUnknown) { - in$1.Flags = (in$1.Flags | (1)) >>> 0; - } - _r$4 = methods.Unmarshal($clone(in$1, structType$4)); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - structType$5.copy(out, _tuple[0]); - err = _tuple[1]; - $s = 8; continue; - /* } else { */ case 7: - o.RecursionLimit = o.RecursionLimit - (1) >> 0; - /* */ if (o.RecursionLimit < 0) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (o.RecursionLimit < 0) { */ case 10: - _tmp = $clone(out, structType$5); - _r$5 = errors.New("exceeded max recursion depth", new sliceType([])); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$1 = _r$5; - structType$5.copy(out, _tmp); - err = _tmp$1; - $24r = [out, err]; - $s = 13; case 13: return $24r; - /* } */ case 11: - _r$6 = $clone(o, UnmarshalOptions).unmarshalMessageSlow(b, m); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - /* } */ case 8: - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = $clone(out, structType$5); - _tmp$3 = err; - structType$5.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (allowPartial || (!((((out.Flags & 1) >>> 0) === 0)))) { - _tmp$4 = $clone(out, structType$5); - _tmp$5 = $ifaceNil; - structType$5.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _tmp$6 = $clone(out, structType$5); - _r$7 = checkInitialized(m); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$7 = _r$7; - structType$5.copy(out, _tmp$6); - err = _tmp$7; - $24r$1 = [out, err]; - $s = 16; case 16: return $24r$1; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshal, $c: true, $r, $24r, $24r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, allowPartial, b, err, in$1, m, methods, o, out, x, x$1, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshal = function(b, m) { return this.$val.unmarshal(b, m); }; - UnmarshalOptions.ptr.prototype.unmarshalMessage = function(b, m) { - var {_r$2, _tuple, b, err, m, o, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = $clone(o, UnmarshalOptions).unmarshal(b, m); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalMessage, $c: true, $r, _r$2, _tuple, b, err, m, o, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalMessage = function(b, m) { return this.$val.unmarshalMessage(b, m); }; - UnmarshalOptions.ptr.prototype.unmarshalMessageSlow = function(b, m) { - var {$24r, $24r$1, _arg, _arg$1, _arg$10, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, _v$1, b, err, err$1, extType, fd, fields, m, md, num, o, tagLen, valLen, wtyp, $s, $r, $c} = $restore(this, {b, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r$2 = m.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - md = _r$2; - _r$3 = messageset.IsMessageSet(md); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_r$3) { */ case 2: - _r$4 = $clone(o, UnmarshalOptions).unmarshalMessageSet(b, m); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$5 = md.Fields(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - fields = _r$5; - /* while (true) { */ case 8: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 9; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - wtyp = _tuple[1]; - tagLen = _tuple[2]; - if (tagLen < 0) { - $s = -1; return errDecode; - } - if (num > 536870911) { - $s = -1; return errDecode; - } - _r$6 = fields.ByNumber(num); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - if (!($interfaceIsEqual(fd, $ifaceNil))) { _v = false; $s = 13; continue s; } - _r$7 = md.ExtensionRanges(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Has(num); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8; case 13: - /* */ if (_v) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_v) { */ case 11: - _r$9 = md.FullName(); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = o.Resolver.FindExtensionByNumber(_r$9, num); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$1 = _r$10; - extType = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, protoregistry.NotFound))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, protoregistry.NotFound))) { */ case 18: - _r$11 = md.FullName(); /* */ $s = 20; case 20: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$11); - _arg$1 = new protowire.Number(num); - _arg$2 = err; - _r$12 = errors.New("%v: unable to resolve extension %v: %v", new sliceType([_arg, _arg$1, _arg$2])); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$1 = _r$12; - $s = 22; case 22: return $24r$1; - /* } */ case 19: - /* */ if (!($interfaceIsEqual(extType, $ifaceNil))) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!($interfaceIsEqual(extType, $ifaceNil))) { */ case 23: - _r$13 = extType.TypeDescriptor(); /* */ $s = 25; case 25: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - fd = _r$13; - /* } */ case 24: - /* } */ case 12: - err$1 = $ifaceNil; - /* */ if ($interfaceIsEqual(fd, $ifaceNil)) { $s = 26; continue; } - /* */ if (false) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if ($interfaceIsEqual(fd, $ifaceNil)) { */ case 26: - err$1 = errUnknown; - $s = 28; continue; - /* } else if (false) { */ case 27: - _r$14 = fd.IsWeak(); /* */ $s = 32; case 32: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - if (!(_r$14)) { _v$1 = false; $s = 31; continue s; } - _r$15 = fd.Message(); /* */ $s = 33; case 33: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.IsPlaceholder(); /* */ $s = 34; case 34: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _v$1 = _r$16; case 31: - /* */ if (_v$1) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_v$1) { */ case 29: - err$1 = errUnknown; - /* } */ case 30: - /* } */ case 28: - valLen = 0; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 36; continue; } - _r$17 = fd.IsList(); /* */ $s = 41; case 41: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (_r$17) { $s = 37; continue; } - _r$18 = fd.IsMap(); /* */ $s = 42; case 42: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - /* */ if (_r$18) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 36: - $s = 40; continue; - /* } else if (_r$17) { */ case 37: - _arg$3 = $subslice(b, tagLen); - _arg$4 = wtyp; - _r$19 = m.Mutable(fd); /* */ $s = 43; case 43: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, protoreflect.Value).List(); /* */ $s = 44; case 44: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$5 = _r$20; - _arg$6 = fd; - _r$21 = $clone(o, UnmarshalOptions).unmarshalList(_arg$3, _arg$4, _arg$5, _arg$6); /* */ $s = 45; case 45: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _tuple$2 = _r$21; - valLen = _tuple$2[0]; - err$1 = _tuple$2[1]; - $s = 40; continue; - /* } else if (_r$18) { */ case 38: - _arg$7 = $subslice(b, tagLen); - _arg$8 = wtyp; - _r$22 = m.Mutable(fd); /* */ $s = 46; case 46: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = $clone(_r$22, protoreflect.Value).Map(); /* */ $s = 47; case 47: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _arg$9 = _r$23; - _arg$10 = fd; - _r$24 = $clone(o, UnmarshalOptions).unmarshalMap(_arg$7, _arg$8, _arg$9, _arg$10); /* */ $s = 48; case 48: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _tuple$3 = _r$24; - valLen = _tuple$3[0]; - err$1 = _tuple$3[1]; - $s = 40; continue; - /* } else { */ case 39: - _r$25 = $clone(o, UnmarshalOptions).unmarshalSingular($subslice(b, tagLen), wtyp, m, fd); /* */ $s = 49; case 49: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _tuple$4 = _r$25; - valLen = _tuple$4[0]; - err$1 = _tuple$4[1]; - /* } */ case 40: - case 35: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 50: - if (!($interfaceIsEqual(err$1, errUnknown))) { - $s = -1; return err$1; - } - valLen = protowire.ConsumeFieldValue(num, wtyp, $subslice(b, tagLen)); - if (valLen < 0) { - $s = -1; return errDecode; - } - /* */ if (!o.DiscardUnknown) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (!o.DiscardUnknown) { */ case 52: - _r$26 = m.GetUnknown(); /* */ $s = 54; case 54: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $r = m.SetUnknown($appendSlice(_r$26, $subslice(b, 0, (tagLen + valLen >> 0)))); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 53: - /* } */ case 51: - b = $subslice(b, (tagLen + valLen >> 0)); - $s = 8; continue; - case 9: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalMessageSlow, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _arg$10, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, _v$1, b, err, err$1, extType, fd, fields, m, md, num, o, tagLen, valLen, wtyp, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalMessageSlow = function(b, m) { return this.$val.unmarshalMessageSlow(b, m); }; - UnmarshalOptions.ptr.prototype.unmarshalSingular = function(b, wtyp, m, fd) { - var {_1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, err$1, fd, m, m2, n, o, v, wtyp, $s, $r, $c} = $restore(this, {b, wtyp, m, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - o = this; - _r$2 = $clone(o, UnmarshalOptions).unmarshalScalar(b, wtyp, fd); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - v = $clone(_tuple[0], protoreflect.Value); - n = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$3 = fd.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _1 = _r$3; - /* */ if ((_1 === (10)) || (_1 === (11))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((_1 === (10)) || (_1 === (11))) { */ case 4: - _r$4 = m.Mutable(fd); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $clone(_r$4, protoreflect.Value).Message(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - m2 = _r$5; - _r$6 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(o, UnmarshalOptions).unmarshalMessage(_r$6, m2); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err$1 = _r$7; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$2 = n; - _tmp$3 = err$1; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - $s = 6; continue; - /* } else { */ case 5: - $r = m.Set(fd, $clone(v, protoreflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - case 2: - _tmp$4 = n; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalSingular, $c: true, $r, _1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, err$1, fd, m, m2, n, o, v, wtyp, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalSingular = function(b, wtyp, m, fd) { return this.$val.unmarshalSingular(b, wtyp, m, fd); }; - UnmarshalOptions.ptr.prototype.unmarshalMap = function(b, wtyp, mapv, fd) { - var {_1, _2, _3, _4, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, err$1, fd, haveKey, haveVal, key, keyField, mapv, n, n$1, num, o, v, val, valField, wtyp, wtyp$1, $s, $r, $c} = $restore(this, {b, wtyp, mapv, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - o = this; - if (!((wtyp === 2))) { - _tmp = 0; - _tmp$1 = errUnknown; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _tuple = protowire.ConsumeBytes(b); - b = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = 0; - _tmp$3 = errDecode; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - _r$2 = fd.MapKey(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - keyField = _r$2; - _r$3 = fd.MapValue(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - valField = _r$3; - key = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType$1.nil, $ifaceNil); - val = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType$1.nil, $ifaceNil); - haveKey = false; - haveVal = false; - _r$4 = valField.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _1 = _r$4; - /* */ if ((_1 === (10)) || (_1 === (11))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((_1 === (10)) || (_1 === (11))) { */ case 5: - _r$5 = mapv.NewValue(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - protoreflect.Value.copy(val, _r$5); - /* } */ case 6: - case 3: - /* while (true) { */ case 8: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 9; continue; } - _tuple$1 = protowire.ConsumeTag(b); - num = _tuple$1[0]; - wtyp$1 = _tuple$1[1]; - n$1 = _tuple$1[2]; - if (n$1 < 0) { - _tmp$4 = 0; - _tmp$5 = errDecode; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - if (num > 536870911) { - _tmp$6 = 0; - _tmp$7 = errDecode; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - } - b = $subslice(b, n$1); - err = errUnknown; - _2 = num; - /* */ if (_2 === (1)) { $s = 11; continue; } - /* */ if (_2 === (2)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_2 === (1)) { */ case 11: - _r$6 = $clone(o, UnmarshalOptions).unmarshalScalar(b, wtyp$1, keyField); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - protoreflect.Value.copy(key, _tuple$2[0]); - n$1 = _tuple$2[1]; - err = _tuple$2[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 10; continue; - } - haveKey = true; - $s = 13; continue; - /* } else if (_2 === (2)) { */ case 12: - v = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType$1.nil, $ifaceNil); - _r$7 = $clone(o, UnmarshalOptions).unmarshalScalar(b, wtyp$1, valField); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - protoreflect.Value.copy(v, _tuple$3[0]); - n$1 = _tuple$3[1]; - err = _tuple$3[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 10; continue; - } - _r$8 = valField.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _3 = _r$8; - /* */ if ((_3 === (10)) || (_3 === (11))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ((_3 === (10)) || (_3 === (11))) { */ case 18: - _r$9 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg = _r$9; - _r$10 = $clone(val, protoreflect.Value).Message(); /* */ $s = 22; case 22: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = _r$10; - _r$11 = $clone(o, UnmarshalOptions).unmarshalMessage(_arg, _arg$1); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$1 = _r$11; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$8 = 0; - _tmp$9 = err$1; - n = _tmp$8; - err = _tmp$9; - $s = -1; return [n, err]; - } - $s = 20; continue; - /* } else { */ case 19: - protoreflect.Value.copy(val, v); - /* } */ case 20: - case 16: - haveVal = true; - /* } */ case 13: - case 10: - if ($interfaceIsEqual(err, errUnknown)) { - n$1 = protowire.ConsumeFieldValue(num, wtyp$1, b); - if (n$1 < 0) { - _tmp$10 = 0; - _tmp$11 = errDecode; - n = _tmp$10; - err = _tmp$11; - $s = -1; return [n, err]; - } - } else if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$12 = 0; - _tmp$13 = err; - n = _tmp$12; - err = _tmp$13; - $s = -1; return [n, err]; - } - b = $subslice(b, n$1); - $s = 8; continue; - case 9: - /* */ if (!haveKey) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!haveKey) { */ case 24: - _r$12 = keyField.Default(); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - protoreflect.Value.copy(key, _r$12); - /* } */ case 25: - /* */ if (!haveVal) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!haveVal) { */ case 27: - _r$13 = valField.Kind(); /* */ $s = 30; case 30: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _4 = _r$13; - /* */ if ((_4 === (10)) || (_4 === (11))) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if ((_4 === (10)) || (_4 === (11))) { */ case 31: - $s = 33; continue; - /* } else { */ case 32: - _r$14 = valField.Default(); /* */ $s = 34; case 34: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - protoreflect.Value.copy(val, _r$14); - /* } */ case 33: - case 29: - /* } */ case 28: - _r$15 = $clone(key, protoreflect.Value).MapKey(); /* */ $s = 35; case 35: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $r = mapv.Set($clone(_r$15, protoreflect.MapKey), $clone(val, protoreflect.Value)); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$14 = n; - _tmp$15 = $ifaceNil; - n = _tmp$14; - err = _tmp$15; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: UnmarshalOptions.ptr.prototype.unmarshalMap, $c: true, $r, _1, _2, _3, _4, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, err$1, fd, haveKey, haveVal, key, keyField, mapv, n, n$1, num, o, v, val, valField, wtyp, wtyp$1, $s};return $f; - }; - UnmarshalOptions.prototype.unmarshalMap = function(b, wtyp, mapv, fd) { return this.$val.unmarshalMap(b, wtyp, mapv, fd); }; - CheckInitialized = function(m) { - var {$24r, _r$2, _r$3, m, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$2 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = checkInitialized(_r$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: CheckInitialized, $c: true, $r, $24r, _r$2, _r$3, m, $s};return $f; - }; - $pkg.CheckInitialized = CheckInitialized; - checkInitialized = function(m) { - var {$24r, _r$2, _r$3, _r$4, _tuple, err, m, methods, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = protoMethods(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - methods = _r$2; - /* */ if (!(methods === ptrType$8.nil) && !(methods.CheckInitialized === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(methods === ptrType$8.nil) && !(methods.CheckInitialized === $throwNilPointerError)) { */ case 2: - _r$3 = methods.CheckInitialized(new structType$7.ptr(new pragma.NoUnkeyedLiterals.ptr(), m)); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - err = _tuple[1]; - $s = -1; return err; - /* } */ case 3: - _r$4 = checkInitializedSlow(m); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: checkInitialized, $c: true, $r, $24r, _r$2, _r$3, _r$4, _tuple, err, m, methods, $s};return $f; - }; - checkInitializedSlow = function(m) { - var {$24r, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, err, fd, fds, i, m, md, nums, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = [err]; - _r$2 = m.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - md = _r$2; - _r$3 = md.Fields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - fds = _r$3; - _tmp = 0; - _r$4 = md.RequiredNumbers(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tmp$1 = _r$4; - i = _tmp; - nums = _tmp$1; - /* while (true) { */ case 4: - _r$5 = nums.Len(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* if (!(i < _r$5)) { break; } */ if(!(i < _r$5)) { $s = 5; continue; } - _r$6 = nums.Get(i); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = fds.ByNumber(_r$6); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - fd = _r$7; - _r$8 = m.Has(fd); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!_r$8) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!_r$8) { */ case 9: - _r$9 = fd.FullName(); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = errors.RequiredNotSet((_r$9)); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 14; case 14: return $24r; - /* } */ case 10: - i = i + (1) >> 0; - $s = 4; continue; - case 5: - err[0] = $ifaceNil; - $r = m.Range((function(err) { return function $b(fd$1, v) { - var {_r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _tmp$2, _tmp$3, fd$1, i$1, list, v, $s, $r, $c} = $restore(this, {fd$1, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$11 = fd$1.IsList(); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11) { $s = 2; continue; } - _r$12 = fd$1.IsMap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$11) { */ case 2: - _r$13 = fd$1.Message(); /* */ $s = 10; case 10: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$13, $ifaceNil)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($interfaceIsEqual(_r$13, $ifaceNil)) { */ case 8: - $s = -1; return true; - /* } */ case 9: - _tmp$2 = 0; - _r$14 = $clone(v, protoreflect.Value).List(); /* */ $s = 11; case 11: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tmp$3 = _r$14; - i$1 = _tmp$2; - list = _tmp$3; - /* while (true) { */ case 12: - _r$15 = list.Len(); /* */ $s = 14; case 14: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - /* if (!(i$1 < _r$15 && $interfaceIsEqual(err[0], $ifaceNil))) { break; } */ if(!(i$1 < _r$15 && $interfaceIsEqual(err[0], $ifaceNil))) { $s = 13; continue; } - _r$16 = list.Get(i$1); /* */ $s = 15; case 15: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(_r$16, protoreflect.Value).Message(); /* */ $s = 16; case 16: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = checkInitialized(_r$17); /* */ $s = 17; case 17: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - err[0] = _r$18; - i$1 = i$1 + (1) >> 0; - $s = 12; continue; - case 13: - $s = 5; continue; - /* } else if (_r$12) { */ case 3: - _r$19 = fd$1.MapValue(); /* */ $s = 20; case 20: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.Message(); /* */ $s = 21; case 21: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$20, $ifaceNil)) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ($interfaceIsEqual(_r$20, $ifaceNil)) { */ case 18: - $s = -1; return true; - /* } */ case 19: - _r$21 = $clone(v, protoreflect.Value).Map(); /* */ $s = 22; case 22: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $r = _r$21.Range((function(err) { return function $b(key, v$1) { - var {_r$22, _r$23, key, v$1, $s, $r, $c} = $restore(this, {key, v$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$22 = $clone(v$1, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = checkInitialized(_r$22); /* */ $s = 2; case 2: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - err[0] = _r$23; - $s = -1; return $interfaceIsEqual(err[0], $ifaceNil); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$22, _r$23, key, v$1, $s};return $f; - }; })(err)); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - _r$22 = fd$1.Message(); /* */ $s = 26; case 26: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$22, $ifaceNil)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ($interfaceIsEqual(_r$22, $ifaceNil)) { */ case 24: - $s = -1; return true; - /* } */ case 25: - _r$23 = $clone(v, protoreflect.Value).Message(); /* */ $s = 27; case 27: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = checkInitialized(_r$23); /* */ $s = 28; case 28: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - err[0] = _r$24; - /* } */ case 5: - case 1: - $s = -1; return $interfaceIsEqual(err[0], $ifaceNil); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _tmp$2, _tmp$3, fd$1, i$1, list, v, $s};return $f; - }; })(err)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err[0]; - /* */ } return; } var $f = {$blk: checkInitializedSlow, $c: true, $r, $24r, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, err, fd, fds, i, m, md, nums, $s};return $f; - }; - mergeOptions.methods = [{prop: "mergeMessage", name: "mergeMessage", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Message, protoreflect.Message], [], false)}, {prop: "mergeList", name: "mergeList", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.List, protoreflect.List, protoreflect.FieldDescriptor], [], false)}, {prop: "mergeMap", name: "mergeMap", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Map, protoreflect.Map, protoreflect.FieldDescriptor], [], false)}, {prop: "cloneBytes", name: "cloneBytes", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Value], [protoreflect.Value], false)}]; - MarshalOptions.methods = [{prop: "sizeSingular", name: "sizeSingular", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protowire.Number, protoreflect.Kind, protoreflect.Value], [$Int], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([protoreflect.ProtoMessage], [$Int], false)}, {prop: "size", name: "size", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Message], [$Int], false)}, {prop: "sizeMessageSlow", name: "sizeMessageSlow", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Message], [$Int], false)}, {prop: "sizeField", name: "sizeField", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.FieldDescriptor, protoreflect.Value], [$Int], false)}, {prop: "sizeList", name: "sizeList", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protowire.Number, protoreflect.FieldDescriptor, protoreflect.List], [$Int], false)}, {prop: "sizeMap", name: "sizeMap", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protowire.Number, protoreflect.FieldDescriptor, protoreflect.Map], [$Int], false)}, {prop: "sizeMessageSet", name: "sizeMessageSet", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Message], [$Int], false)}, {prop: "marshalMessageSet", name: "marshalMessageSet", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [sliceType$1, $error], false)}, {prop: "marshalMessageSetField", name: "marshalMessageSetField", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.FieldDescriptor, protoreflect.Value], [sliceType$1, $error], false)}, {prop: "marshalSingular", name: "marshalSingular", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.FieldDescriptor, protoreflect.Value], [sliceType$1, $error], false)}, {prop: "Marshal", name: "Marshal", pkg: "", typ: $funcType([protoreflect.ProtoMessage], [sliceType$1, $error], false)}, {prop: "MarshalAppend", name: "MarshalAppend", pkg: "", typ: $funcType([sliceType$1, protoreflect.ProtoMessage], [sliceType$1, $error], false)}, {prop: "MarshalState", name: "MarshalState", pkg: "", typ: $funcType([structType$2], [structType$3, $error], false)}, {prop: "marshal", name: "marshal", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [structType$3, $error], false)}, {prop: "marshalMessage", name: "marshalMessage", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [sliceType$1, $error], false)}, {prop: "marshalMessageSlow", name: "marshalMessageSlow", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [sliceType$1, $error], false)}, {prop: "marshalField", name: "marshalField", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.FieldDescriptor, protoreflect.Value], [sliceType$1, $error], false)}, {prop: "marshalList", name: "marshalList", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.FieldDescriptor, protoreflect.List], [sliceType$1, $error], false)}, {prop: "marshalMap", name: "marshalMap", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.FieldDescriptor, protoreflect.Map], [sliceType$1, $error], false)}]; - UnmarshalOptions.methods = [{prop: "unmarshalMessageSet", name: "unmarshalMessageSet", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [$error], false)}, {prop: "unmarshalMessageSetField", name: "unmarshalMessageSetField", pkg: "google.golang.org/protobuf/proto", typ: $funcType([protoreflect.Message, protowire.Number, sliceType$1], [$error], false)}, {prop: "unmarshalScalar", name: "unmarshalScalar", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protowire.Type, protoreflect.FieldDescriptor], [protoreflect.Value, $Int, $error], false)}, {prop: "unmarshalList", name: "unmarshalList", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protowire.Type, protoreflect.List, protoreflect.FieldDescriptor], [$Int, $error], false)}, {prop: "Unmarshal", name: "Unmarshal", pkg: "", typ: $funcType([sliceType$1, protoreflect.ProtoMessage], [$error], false)}, {prop: "UnmarshalState", name: "UnmarshalState", pkg: "", typ: $funcType([structType$4], [structType$5, $error], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [structType$5, $error], false)}, {prop: "unmarshalMessage", name: "unmarshalMessage", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [$error], false)}, {prop: "unmarshalMessageSlow", name: "unmarshalMessageSlow", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protoreflect.Message], [$error], false)}, {prop: "unmarshalSingular", name: "unmarshalSingular", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protowire.Type, protoreflect.Message, protoreflect.FieldDescriptor], [$Int, $error], false)}, {prop: "unmarshalMap", name: "unmarshalMap", pkg: "google.golang.org/protobuf/proto", typ: $funcType([sliceType$1, protowire.Type, protoreflect.Map, protoreflect.FieldDescriptor], [$Int, $error], false)}]; - mergeOptions.init("", []); - MarshalOptions.init("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "AllowPartial", name: "AllowPartial", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Deterministic", name: "Deterministic", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "UseCachedSize", name: "UseCachedSize", embedded: false, exported: true, typ: $Bool, tag: ""}]); - UnmarshalOptions.init("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Merge", name: "Merge", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "AllowPartial", name: "AllowPartial", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "DiscardUnknown", name: "DiscardUnknown", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: interfaceType, tag: ""}, {prop: "RecursionLimit", name: "RecursionLimit", embedded: false, exported: true, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protowire.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = messageset.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flags.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = genid.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = order.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pragma.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strs.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoregistry.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoiface.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Error = $ifaceNil; - emptyBuf = arrayType.zero(); - wireTypes = $makeMap(protoreflect.Kind.keyFor, [{ k: 8, v: 0 }, { k: 14, v: 0 }, { k: 5, v: 0 }, { k: 17, v: 0 }, { k: 13, v: 0 }, { k: 3, v: 0 }, { k: 18, v: 0 }, { k: 4, v: 0 }, { k: 15, v: 5 }, { k: 7, v: 5 }, { k: 2, v: 5 }, { k: 16, v: 1 }, { k: 6, v: 1 }, { k: 1, v: 1 }, { k: 9, v: 2 }, { k: 12, v: 2 }, { k: 11, v: 2 }, { k: 10, v: 3 }]); - _r = errors.New("BUG: internal error (unknown)", new sliceType([])); /* */ $s = 17; case 17: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - errUnknown = _r; - _r$1 = errors.New("cannot parse invalid wire-format data", new sliceType([])); /* */ $s = 18; case 18: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - errDecode = _r$1; - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/filedesc"] = (function() { - var $pkg = {}, $init, bytes, fmt, protowire, descfmt, descopts, defval, messageset, errors, genid, pragma, strs, proto, protoreflect, protoregistry, math, reflect, sort, sync, atomic, PlaceholderFile, PlaceholderEnum, PlaceholderEnumValue, PlaceholderMessage, Enums, EnumValues, Messages, Fields, Oneofs, Extensions, Services, Methods, FileImports, Names, EnumRanges, enumRange, FieldRanges, fieldRange, FieldNumbers, OneofFields, SourceLocations, pathKey, fileRaw, File, FileL1, FileL2, Enum, EnumL1, EnumL2, EnumValue, EnumValueL1, Message, MessageL1, MessageL2, Field, FieldL1, Oneof, OneofL1, Extension, ExtensionL1, ExtensionL2, Service, ServiceL1, ServiceL2, Method, MethodL1, Base, BaseL0, stringName, defaultValue, Builder, resolverByIndex, Out, sliceType, arrayType, sliceType$1, arrayType$1, sliceType$2, sliceType$3, sliceType$4, ptrType, sliceType$5, sliceType$6, sliceType$7, sliceType$8, sliceType$9, sliceType$10, sliceType$11, sliceType$12, sliceType$13, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, structType, sliceType$14, arrayType$2, sliceType$15, sliceType$16, arrayType$3, ptrType$10, sliceType$17, funcType, sliceType$18, funcType$1, arrayType$4, sliceType$19, ptrType$11, ptrType$12, ptrType$13, mapType, ptrType$14, mapType$1, mapType$2, ptrType$15, mapType$3, ptrType$16, mapType$4, mapType$5, mapType$6, ptrType$17, mapType$7, ptrType$18, mapType$8, ptrType$19, mapType$9, ptrType$20, mapType$10, ptrType$21, mapType$11, ptrType$22, ptrType$23, ptrType$24, mapType$12, sliceType$20, ptrType$25, mapType$13, mapType$14, mapType$15, ptrType$26, mapType$16, ptrType$27, ptrType$28, ptrType$29, ptrType$30, ptrType$31, ptrType$32, ptrType$33, ptrType$34, ptrType$35, interfaceType, interfaceType$1, emptyNames, emptyEnumRanges, emptyFieldRanges, emptyFieldNumbers, emptySourceLocations, emptyFiles, emptyMessages, emptyFields, emptyOneofs, emptyEnums, emptyEnumValues, emptyExtensions, emptyServices, nameBuilderPool, isValidFieldNumber, newPathKey, unmarshalEnumReservedRange, unmarshalMessageReservedRange, unmarshalMessageExtensionRange, appendOptions, newRawFile, getBuilder, putBuilder, makeFullName, appendFullName, DefaultValue, unmarshalDefault; - bytes = $packages["bytes"]; - fmt = $packages["fmt"]; - protowire = $packages["google.golang.org/protobuf/encoding/protowire"]; - descfmt = $packages["google.golang.org/protobuf/internal/descfmt"]; - descopts = $packages["google.golang.org/protobuf/internal/descopts"]; - defval = $packages["google.golang.org/protobuf/internal/encoding/defval"]; - messageset = $packages["google.golang.org/protobuf/internal/encoding/messageset"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - genid = $packages["google.golang.org/protobuf/internal/genid"]; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - strs = $packages["google.golang.org/protobuf/internal/strs"]; - proto = $packages["google.golang.org/protobuf/proto"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoregistry = $packages["google.golang.org/protobuf/reflect/protoregistry"]; - math = $packages["math"]; - reflect = $packages["reflect"]; - sort = $packages["sort"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - PlaceholderFile = $pkg.PlaceholderFile = $newType(8, $kindString, "filedesc.PlaceholderFile", true, "google.golang.org/protobuf/internal/filedesc", true, null); - PlaceholderEnum = $pkg.PlaceholderEnum = $newType(8, $kindString, "filedesc.PlaceholderEnum", true, "google.golang.org/protobuf/internal/filedesc", true, null); - PlaceholderEnumValue = $pkg.PlaceholderEnumValue = $newType(8, $kindString, "filedesc.PlaceholderEnumValue", true, "google.golang.org/protobuf/internal/filedesc", true, null); - PlaceholderMessage = $pkg.PlaceholderMessage = $newType(8, $kindString, "filedesc.PlaceholderMessage", true, "google.golang.org/protobuf/internal/filedesc", true, null); - Enums = $pkg.Enums = $newType(0, $kindStruct, "filedesc.Enums", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$8.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - }); - EnumValues = $pkg.EnumValues = $newType(0, $kindStruct, "filedesc.EnumValues", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_, byNum_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$9.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - this.byNum = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - this.byNum = byNum_; - }); - Messages = $pkg.Messages = $newType(0, $kindStruct, "filedesc.Messages", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$5.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - }); - Fields = $pkg.Fields = $newType(0, $kindStruct, "filedesc.Fields", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_, byJSON_, byText_, byNum_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$6.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - this.byJSON = false; - this.byText = false; - this.byNum = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - this.byJSON = byJSON_; - this.byText = byText_; - this.byNum = byNum_; - }); - Oneofs = $pkg.Oneofs = $newType(0, $kindStruct, "filedesc.Oneofs", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$7.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - }); - Extensions = $pkg.Extensions = $newType(0, $kindStruct, "filedesc.Extensions", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$10.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - }); - Services = $pkg.Services = $newType(0, $kindStruct, "filedesc.Services", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$11.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - }); - Methods = $pkg.Methods = $newType(0, $kindStruct, "filedesc.Methods", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$19.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - }); - FileImports = $pkg.FileImports = $newType(12, $kindSlice, "filedesc.FileImports", true, "google.golang.org/protobuf/internal/filedesc", true, null); - Names = $pkg.Names = $newType(0, $kindStruct, "filedesc.Names", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, has_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.has = false; - return; - } - this.List = List_; - this.once = once_; - this.has = has_; - }); - EnumRanges = $pkg.EnumRanges = $newType(0, $kindStruct, "filedesc.EnumRanges", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, sorted_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$1.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.sorted = sliceType$1.nil; - return; - } - this.List = List_; - this.once = once_; - this.sorted = sorted_; - }); - enumRange = $pkg.enumRange = $newType(8, $kindArray, "filedesc.enumRange", true, "google.golang.org/protobuf/internal/filedesc", false, null); - FieldRanges = $pkg.FieldRanges = $newType(0, $kindStruct, "filedesc.FieldRanges", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, sorted_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$2.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.sorted = sliceType$2.nil; - return; - } - this.List = List_; - this.once = once_; - this.sorted = sorted_; - }); - fieldRange = $pkg.fieldRange = $newType(8, $kindArray, "filedesc.fieldRange", true, "google.golang.org/protobuf/internal/filedesc", false, null); - FieldNumbers = $pkg.FieldNumbers = $newType(0, $kindStruct, "filedesc.FieldNumbers", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, has_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$3.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.has = false; - return; - } - this.List = List_; - this.once = once_; - this.has = has_; - }); - OneofFields = $pkg.OneofFields = $newType(0, $kindStruct, "filedesc.OneofFields", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, once_, byName_, byJSON_, byText_, byNum_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$20.nil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byName = false; - this.byJSON = false; - this.byText = false; - this.byNum = false; - return; - } - this.List = List_; - this.once = once_; - this.byName = byName_; - this.byJSON = byJSON_; - this.byText = byText_; - this.byNum = byNum_; - }); - SourceLocations = $pkg.SourceLocations = $newType(0, $kindStruct, "filedesc.SourceLocations", true, "google.golang.org/protobuf/internal/filedesc", true, function(List_, File_, once_, byPath_) { - this.$val = this; - if (arguments.length === 0) { - this.List = sliceType$4.nil; - this.File = $ifaceNil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.byPath = false; - return; - } - this.List = List_; - this.File = File_; - this.once = once_; - this.byPath = byPath_; - }); - pathKey = $pkg.pathKey = $newType(0, $kindStruct, "filedesc.pathKey", true, "google.golang.org/protobuf/internal/filedesc", false, function(arr_, str_) { - this.$val = this; - if (arguments.length === 0) { - this.arr = arrayType$3.zero(); - this.str = ""; - return; - } - this.arr = arr_; - this.str = str_; - }); - fileRaw = $pkg.fileRaw = $newType(0, $kindStruct, "filedesc.fileRaw", true, "google.golang.org/protobuf/internal/filedesc", false, function(builder_, allEnums_, allMessages_, allExtensions_, allServices_) { - this.$val = this; - if (arguments.length === 0) { - this.builder = new Builder.ptr("", sliceType$13.nil, 0, 0, 0, 0, $ifaceNil, $ifaceNil); - this.allEnums = sliceType$8.nil; - this.allMessages = sliceType$5.nil; - this.allExtensions = sliceType$10.nil; - this.allServices = sliceType$11.nil; - return; - } - this.builder = builder_; - this.allEnums = allEnums_; - this.allMessages = allMessages_; - this.allExtensions = allExtensions_; - this.allServices = allServices_; - }); - File = $pkg.File = $newType(0, $kindStruct, "filedesc.File", true, "google.golang.org/protobuf/internal/filedesc", true, function(fileRaw_, L1_, once_, mu_, L2_) { - this.$val = this; - if (arguments.length === 0) { - this.fileRaw = new fileRaw.ptr(new Builder.ptr("", sliceType$13.nil, 0, 0, 0, 0, $ifaceNil, $ifaceNil), sliceType$8.nil, sliceType$5.nil, sliceType$10.nil, sliceType$11.nil); - this.L1 = new FileL1.ptr(0, "", "", new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Services.ptr(sliceType$11.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false)); - this.once = 0; - this.mu = new sync.Mutex.ptr(0, 0); - this.L2 = ptrType$1.nil; - return; - } - this.fileRaw = fileRaw_; - this.L1 = L1_; - this.once = once_; - this.mu = mu_; - this.L2 = L2_; - }); - FileL1 = $pkg.FileL1 = $newType(0, $kindStruct, "filedesc.FileL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Syntax_, Path_, Package_, Enums_, Messages_, Extensions_, Services_) { - this.$val = this; - if (arguments.length === 0) { - this.Syntax = 0; - this.Path = ""; - this.Package = ""; - this.Enums = new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.Messages = new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.Extensions = new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.Services = new Services.ptr(sliceType$11.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - return; - } - this.Syntax = Syntax_; - this.Path = Path_; - this.Package = Package_; - this.Enums = Enums_; - this.Messages = Messages_; - this.Extensions = Extensions_; - this.Services = Services_; - }); - FileL2 = $pkg.FileL2 = $newType(0, $kindStruct, "filedesc.FileL2", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Imports_, Locations_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Imports = FileImports.nil; - this.Locations = new SourceLocations.ptr(sliceType$4.nil, $ifaceNil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - return; - } - this.Options = Options_; - this.Imports = Imports_; - this.Locations = Locations_; - }); - Enum = $pkg.Enum = $newType(0, $kindStruct, "filedesc.Enum", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_, L2_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new EnumL1.ptr(false); - this.L2 = ptrType$28.nil; - return; - } - this.Base = Base_; - this.L1 = L1_; - this.L2 = L2_; - }); - EnumL1 = $pkg.EnumL1 = $newType(0, $kindStruct, "filedesc.EnumL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(eagerValues_) { - this.$val = this; - if (arguments.length === 0) { - this.eagerValues = false; - return; - } - this.eagerValues = eagerValues_; - }); - EnumL2 = $pkg.EnumL2 = $newType(0, $kindStruct, "filedesc.EnumL2", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Values_, ReservedNames_, ReservedRanges_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Values = new EnumValues.ptr(sliceType$9.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false); - this.ReservedNames = new Names.ptr(sliceType.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.ReservedRanges = new EnumRanges.ptr(sliceType$1.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$1.nil); - return; - } - this.Options = Options_; - this.Values = Values_; - this.ReservedNames = ReservedNames_; - this.ReservedRanges = ReservedRanges_; - }); - EnumValue = $pkg.EnumValue = $newType(0, $kindStruct, "filedesc.EnumValue", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new EnumValueL1.ptr($throwNilPointerError, 0); - return; - } - this.Base = Base_; - this.L1 = L1_; - }); - EnumValueL1 = $pkg.EnumValueL1 = $newType(0, $kindStruct, "filedesc.EnumValueL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Number_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Number = 0; - return; - } - this.Options = Options_; - this.Number = Number_; - }); - Message = $pkg.Message = $newType(0, $kindStruct, "filedesc.Message", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_, L2_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new MessageL1.ptr(new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), false, false); - this.L2 = ptrType$29.nil; - return; - } - this.Base = Base_; - this.L1 = L1_; - this.L2 = L2_; - }); - MessageL1 = $pkg.MessageL1 = $newType(0, $kindStruct, "filedesc.MessageL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Enums_, Messages_, Extensions_, IsMapEntry_, IsMessageSet_) { - this.$val = this; - if (arguments.length === 0) { - this.Enums = new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.Messages = new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.Extensions = new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.IsMapEntry = false; - this.IsMessageSet = false; - return; - } - this.Enums = Enums_; - this.Messages = Messages_; - this.Extensions = Extensions_; - this.IsMapEntry = IsMapEntry_; - this.IsMessageSet = IsMessageSet_; - }); - MessageL2 = $pkg.MessageL2 = $newType(0, $kindStruct, "filedesc.MessageL2", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Fields_, Oneofs_, ReservedNames_, ReservedRanges_, RequiredNumbers_, ExtensionRanges_, ExtensionRangeOptions_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Fields = new Fields.ptr(sliceType$6.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false); - this.Oneofs = new Oneofs.ptr(sliceType$7.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.ReservedNames = new Names.ptr(sliceType.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.ReservedRanges = new FieldRanges.ptr(sliceType$2.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$2.nil); - this.RequiredNumbers = new FieldNumbers.ptr(sliceType$3.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - this.ExtensionRanges = new FieldRanges.ptr(sliceType$2.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$2.nil); - this.ExtensionRangeOptions = sliceType$18.nil; - return; - } - this.Options = Options_; - this.Fields = Fields_; - this.Oneofs = Oneofs_; - this.ReservedNames = ReservedNames_; - this.ReservedRanges = ReservedRanges_; - this.RequiredNumbers = RequiredNumbers_; - this.ExtensionRanges = ExtensionRanges_; - this.ExtensionRangeOptions = ExtensionRangeOptions_; - }); - Field = $pkg.Field = $newType(0, $kindStruct, "filedesc.Field", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new FieldL1.ptr($throwNilPointerError, 0, 0, 0, new stringName.ptr(false, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), "", ""), false, false, false, false, false, false, new defaultValue.ptr(false, new protoreflect.Value.ptr(arrayType$4.zero(), 0, new $Uint64(0, 0), "", sliceType$13.nil, $ifaceNil), $ifaceNil, sliceType$13.nil), $ifaceNil, $ifaceNil, $ifaceNil); - return; - } - this.Base = Base_; - this.L1 = L1_; - }); - FieldL1 = $pkg.FieldL1 = $newType(0, $kindStruct, "filedesc.FieldL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Number_, Cardinality_, Kind_, StringName_, IsProto3Optional_, IsWeak_, HasPacked_, IsPacked_, HasEnforceUTF8_, EnforceUTF8_, Default_, ContainingOneof_, Enum_, Message_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Number = 0; - this.Cardinality = 0; - this.Kind = 0; - this.StringName = new stringName.ptr(false, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), "", ""); - this.IsProto3Optional = false; - this.IsWeak = false; - this.HasPacked = false; - this.IsPacked = false; - this.HasEnforceUTF8 = false; - this.EnforceUTF8 = false; - this.Default = new defaultValue.ptr(false, new protoreflect.Value.ptr(arrayType$4.zero(), 0, new $Uint64(0, 0), "", sliceType$13.nil, $ifaceNil), $ifaceNil, sliceType$13.nil); - this.ContainingOneof = $ifaceNil; - this.Enum = $ifaceNil; - this.Message = $ifaceNil; - return; - } - this.Options = Options_; - this.Number = Number_; - this.Cardinality = Cardinality_; - this.Kind = Kind_; - this.StringName = StringName_; - this.IsProto3Optional = IsProto3Optional_; - this.IsWeak = IsWeak_; - this.HasPacked = HasPacked_; - this.IsPacked = IsPacked_; - this.HasEnforceUTF8 = HasEnforceUTF8_; - this.EnforceUTF8 = EnforceUTF8_; - this.Default = Default_; - this.ContainingOneof = ContainingOneof_; - this.Enum = Enum_; - this.Message = Message_; - }); - Oneof = $pkg.Oneof = $newType(0, $kindStruct, "filedesc.Oneof", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new OneofL1.ptr($throwNilPointerError, new OneofFields.ptr(sliceType$20.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false)); - return; - } - this.Base = Base_; - this.L1 = L1_; - }); - OneofL1 = $pkg.OneofL1 = $newType(0, $kindStruct, "filedesc.OneofL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Fields_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Fields = new OneofFields.ptr(sliceType$20.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false); - return; - } - this.Options = Options_; - this.Fields = Fields_; - }); - Extension = $pkg.Extension = $newType(0, $kindStruct, "filedesc.Extension", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_, L2_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new ExtensionL1.ptr(0, $ifaceNil, 0, 0); - this.L2 = ptrType$30.nil; - return; - } - this.Base = Base_; - this.L1 = L1_; - this.L2 = L2_; - }); - ExtensionL1 = $pkg.ExtensionL1 = $newType(0, $kindStruct, "filedesc.ExtensionL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Number_, Extendee_, Cardinality_, Kind_) { - this.$val = this; - if (arguments.length === 0) { - this.Number = 0; - this.Extendee = $ifaceNil; - this.Cardinality = 0; - this.Kind = 0; - return; - } - this.Number = Number_; - this.Extendee = Extendee_; - this.Cardinality = Cardinality_; - this.Kind = Kind_; - }); - ExtensionL2 = $pkg.ExtensionL2 = $newType(0, $kindStruct, "filedesc.ExtensionL2", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, StringName_, IsProto3Optional_, IsPacked_, Default_, Enum_, Message_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.StringName = new stringName.ptr(false, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), "", ""); - this.IsProto3Optional = false; - this.IsPacked = false; - this.Default = new defaultValue.ptr(false, new protoreflect.Value.ptr(arrayType$4.zero(), 0, new $Uint64(0, 0), "", sliceType$13.nil, $ifaceNil), $ifaceNil, sliceType$13.nil); - this.Enum = $ifaceNil; - this.Message = $ifaceNil; - return; - } - this.Options = Options_; - this.StringName = StringName_; - this.IsProto3Optional = IsProto3Optional_; - this.IsPacked = IsPacked_; - this.Default = Default_; - this.Enum = Enum_; - this.Message = Message_; - }); - Service = $pkg.Service = $newType(0, $kindStruct, "filedesc.Service", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_, L2_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new ServiceL1.ptr(); - this.L2 = ptrType$31.nil; - return; - } - this.Base = Base_; - this.L1 = L1_; - this.L2 = L2_; - }); - ServiceL1 = $pkg.ServiceL1 = $newType(0, $kindStruct, "filedesc.ServiceL1", true, "google.golang.org/protobuf/internal/filedesc", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - ServiceL2 = $pkg.ServiceL2 = $newType(0, $kindStruct, "filedesc.ServiceL2", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Methods_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Methods = new Methods.ptr(sliceType$19.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - return; - } - this.Options = Options_; - this.Methods = Methods_; - }); - Method = $pkg.Method = $newType(0, $kindStruct, "filedesc.Method", true, "google.golang.org/protobuf/internal/filedesc", true, function(Base_, L1_) { - this.$val = this; - if (arguments.length === 0) { - this.Base = new Base.ptr(new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0)); - this.L1 = new MethodL1.ptr($throwNilPointerError, $ifaceNil, $ifaceNil, false, false); - return; - } - this.Base = Base_; - this.L1 = L1_; - }); - MethodL1 = $pkg.MethodL1 = $newType(0, $kindStruct, "filedesc.MethodL1", true, "google.golang.org/protobuf/internal/filedesc", true, function(Options_, Input_, Output_, IsStreamingClient_, IsStreamingServer_) { - this.$val = this; - if (arguments.length === 0) { - this.Options = $throwNilPointerError; - this.Input = $ifaceNil; - this.Output = $ifaceNil; - this.IsStreamingClient = false; - this.IsStreamingServer = false; - return; - } - this.Options = Options_; - this.Input = Input_; - this.Output = Output_; - this.IsStreamingClient = IsStreamingClient_; - this.IsStreamingServer = IsStreamingServer_; - }); - Base = $pkg.Base = $newType(0, $kindStruct, "filedesc.Base", true, "google.golang.org/protobuf/internal/filedesc", true, function(L0_) { - this.$val = this; - if (arguments.length === 0) { - this.L0 = new BaseL0.ptr("", ptrType$27.nil, $ifaceNil, 0); - return; - } - this.L0 = L0_; - }); - BaseL0 = $pkg.BaseL0 = $newType(0, $kindStruct, "filedesc.BaseL0", true, "google.golang.org/protobuf/internal/filedesc", true, function(FullName_, ParentFile_, Parent_, Index_) { - this.$val = this; - if (arguments.length === 0) { - this.FullName = ""; - this.ParentFile = ptrType$27.nil; - this.Parent = $ifaceNil; - this.Index = 0; - return; - } - this.FullName = FullName_; - this.ParentFile = ParentFile_; - this.Parent = Parent_; - this.Index = Index_; - }); - stringName = $pkg.stringName = $newType(0, $kindStruct, "filedesc.stringName", true, "google.golang.org/protobuf/internal/filedesc", false, function(hasJSON_, once_, nameJSON_, nameText_) { - this.$val = this; - if (arguments.length === 0) { - this.hasJSON = false; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.nameJSON = ""; - this.nameText = ""; - return; - } - this.hasJSON = hasJSON_; - this.once = once_; - this.nameJSON = nameJSON_; - this.nameText = nameText_; - }); - defaultValue = $pkg.defaultValue = $newType(0, $kindStruct, "filedesc.defaultValue", true, "google.golang.org/protobuf/internal/filedesc", false, function(has_, val_, enum$2_, bytes_) { - this.$val = this; - if (arguments.length === 0) { - this.has = false; - this.val = new protoreflect.Value.ptr(arrayType$4.zero(), 0, new $Uint64(0, 0), "", sliceType$13.nil, $ifaceNil); - this.enum$2 = $ifaceNil; - this.bytes = sliceType$13.nil; - return; - } - this.has = has_; - this.val = val_; - this.enum$2 = enum$2_; - this.bytes = bytes_; - }); - Builder = $pkg.Builder = $newType(0, $kindStruct, "filedesc.Builder", true, "google.golang.org/protobuf/internal/filedesc", true, function(GoPackagePath_, RawDescriptor_, NumEnums_, NumMessages_, NumExtensions_, NumServices_, TypeResolver_, FileRegistry_) { - this.$val = this; - if (arguments.length === 0) { - this.GoPackagePath = ""; - this.RawDescriptor = sliceType$13.nil; - this.NumEnums = 0; - this.NumMessages = 0; - this.NumExtensions = 0; - this.NumServices = 0; - this.TypeResolver = $ifaceNil; - this.FileRegistry = $ifaceNil; - return; - } - this.GoPackagePath = GoPackagePath_; - this.RawDescriptor = RawDescriptor_; - this.NumEnums = NumEnums_; - this.NumMessages = NumMessages_; - this.NumExtensions = NumExtensions_; - this.NumServices = NumServices_; - this.TypeResolver = TypeResolver_; - this.FileRegistry = FileRegistry_; - }); - resolverByIndex = $pkg.resolverByIndex = $newType(8, $kindInterface, "filedesc.resolverByIndex", true, "google.golang.org/protobuf/internal/filedesc", false, null); - Out = $pkg.Out = $newType(0, $kindStruct, "filedesc.Out", true, "google.golang.org/protobuf/internal/filedesc", true, function(File_, Enums_, Messages_, Extensions_, Services_) { - this.$val = this; - if (arguments.length === 0) { - this.File = $ifaceNil; - this.Enums = sliceType$8.nil; - this.Messages = sliceType$5.nil; - this.Extensions = sliceType$10.nil; - this.Services = sliceType$11.nil; - return; - } - this.File = File_; - this.Enums = Enums_; - this.Messages = Messages_; - this.Extensions = Extensions_; - this.Services = Services_; - }); - sliceType = $sliceType(protoreflect.Name); - arrayType = $arrayType(protoreflect.EnumNumber, 2); - sliceType$1 = $sliceType(arrayType); - arrayType$1 = $arrayType(protowire.Number, 2); - sliceType$2 = $sliceType(arrayType$1); - sliceType$3 = $sliceType(protowire.Number); - sliceType$4 = $sliceType(protoreflect.SourceLocation); - ptrType = $ptrType(FileImports); - sliceType$5 = $sliceType(Message); - sliceType$6 = $sliceType(Field); - sliceType$7 = $sliceType(Oneof); - sliceType$8 = $sliceType(Enum); - sliceType$9 = $sliceType(EnumValue); - sliceType$10 = $sliceType(Extension); - sliceType$11 = $sliceType(Service); - sliceType$12 = $sliceType($emptyInterface); - sliceType$13 = $sliceType($Uint8); - ptrType$1 = $ptrType(FileL2); - ptrType$2 = $ptrType(Enum); - ptrType$3 = $ptrType(EnumValue); - ptrType$4 = $ptrType(Message); - ptrType$5 = $ptrType(Field); - ptrType$6 = $ptrType(Oneof); - ptrType$7 = $ptrType(Extension); - ptrType$8 = $ptrType(Service); - ptrType$9 = $ptrType(Method); - structType = $structType("", []); - sliceType$14 = $sliceType($String); - arrayType$2 = $arrayType($Int32, 16); - sliceType$15 = $sliceType($Int32); - sliceType$16 = $sliceType($Int); - arrayType$3 = $arrayType($Uint8, 16); - ptrType$10 = $ptrType(protoreflect.ProtoMessage); - sliceType$17 = $sliceType(sliceType$13); - funcType = $funcType([], [protoreflect.ProtoMessage], false); - sliceType$18 = $sliceType(funcType); - funcType$1 = $funcType([], [], false); - arrayType$4 = $arrayType(funcType$1, 0); - sliceType$19 = $sliceType(Method); - ptrType$11 = $ptrType(strs.Builder); - ptrType$12 = $ptrType($Uint32); - ptrType$13 = $ptrType(Enums); - mapType = $mapType(protoreflect.Name, ptrType$2); - ptrType$14 = $ptrType(EnumValues); - mapType$1 = $mapType(protoreflect.Name, ptrType$3); - mapType$2 = $mapType(protoreflect.EnumNumber, ptrType$3); - ptrType$15 = $ptrType(Messages); - mapType$3 = $mapType(protoreflect.Name, ptrType$4); - ptrType$16 = $ptrType(Fields); - mapType$4 = $mapType(protoreflect.Name, ptrType$5); - mapType$5 = $mapType($String, ptrType$5); - mapType$6 = $mapType(protowire.Number, ptrType$5); - ptrType$17 = $ptrType(Oneofs); - mapType$7 = $mapType(protoreflect.Name, ptrType$6); - ptrType$18 = $ptrType(Extensions); - mapType$8 = $mapType(protoreflect.Name, ptrType$7); - ptrType$19 = $ptrType(Services); - mapType$9 = $mapType(protoreflect.Name, ptrType$8); - ptrType$20 = $ptrType(Methods); - mapType$10 = $mapType(protoreflect.Name, ptrType$9); - ptrType$21 = $ptrType(Names); - mapType$11 = $mapType(protoreflect.Name, $Int); - ptrType$22 = $ptrType(EnumRanges); - ptrType$23 = $ptrType(FieldRanges); - ptrType$24 = $ptrType(FieldNumbers); - mapType$12 = $mapType(protowire.Number, structType); - sliceType$20 = $sliceType(protoreflect.FieldDescriptor); - ptrType$25 = $ptrType(OneofFields); - mapType$13 = $mapType(protoreflect.Name, protoreflect.FieldDescriptor); - mapType$14 = $mapType($String, protoreflect.FieldDescriptor); - mapType$15 = $mapType(protowire.Number, protoreflect.FieldDescriptor); - ptrType$26 = $ptrType(SourceLocations); - mapType$16 = $mapType(pathKey, $Int); - ptrType$27 = $ptrType(File); - ptrType$28 = $ptrType(EnumL2); - ptrType$29 = $ptrType(MessageL2); - ptrType$30 = $ptrType(ExtensionL2); - ptrType$31 = $ptrType(ServiceL2); - ptrType$32 = $ptrType(Base); - ptrType$33 = $ptrType(stringName); - ptrType$34 = $ptrType(defaultValue); - ptrType$35 = $ptrType(Builder); - interfaceType = $interfaceType([{prop: "FindExtensionByName", name: "FindExtensionByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.ExtensionType, $error], false)}, {prop: "FindExtensionByNumber", name: "FindExtensionByNumber", pkg: "", typ: $funcType([protoreflect.FullName, protowire.Number], [protoreflect.ExtensionType, $error], false)}]); - interfaceType$1 = $interfaceType([{prop: "FindDescriptorByName", name: "FindDescriptorByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.Descriptor, $error], false)}, {prop: "FindFileByPath", name: "FindFileByPath", pkg: "", typ: $funcType([$String], [protoreflect.FileDescriptor, $error], false)}, {prop: "RegisterFile", name: "RegisterFile", pkg: "", typ: $funcType([protoreflect.FileDescriptor], [$error], false)}]); - PlaceholderFile.prototype.ParentFile = function() { - var f; - f = this.$val; - return new PlaceholderFile(f); - }; - $ptrType(PlaceholderFile).prototype.ParentFile = function() { return new PlaceholderFile(this.$get()).ParentFile(); }; - PlaceholderFile.prototype.Parent = function() { - var f; - f = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderFile).prototype.Parent = function() { return new PlaceholderFile(this.$get()).Parent(); }; - PlaceholderFile.prototype.Index = function() { - var f; - f = this.$val; - return 0; - }; - $ptrType(PlaceholderFile).prototype.Index = function() { return new PlaceholderFile(this.$get()).Index(); }; - PlaceholderFile.prototype.Syntax = function() { - var f; - f = this.$val; - return 0; - }; - $ptrType(PlaceholderFile).prototype.Syntax = function() { return new PlaceholderFile(this.$get()).Syntax(); }; - PlaceholderFile.prototype.Name = function() { - var f; - f = this.$val; - return ""; - }; - $ptrType(PlaceholderFile).prototype.Name = function() { return new PlaceholderFile(this.$get()).Name(); }; - PlaceholderFile.prototype.FullName = function() { - var f; - f = this.$val; - return ""; - }; - $ptrType(PlaceholderFile).prototype.FullName = function() { return new PlaceholderFile(this.$get()).FullName(); }; - PlaceholderFile.prototype.IsPlaceholder = function() { - var f; - f = this.$val; - return true; - }; - $ptrType(PlaceholderFile).prototype.IsPlaceholder = function() { return new PlaceholderFile(this.$get()).IsPlaceholder(); }; - PlaceholderFile.prototype.Options = function() { - var f; - f = this.$val; - return descopts.File; - }; - $ptrType(PlaceholderFile).prototype.Options = function() { return new PlaceholderFile(this.$get()).Options(); }; - PlaceholderFile.prototype.Path = function() { - var f; - f = this.$val; - return (f); - }; - $ptrType(PlaceholderFile).prototype.Path = function() { return new PlaceholderFile(this.$get()).Path(); }; - PlaceholderFile.prototype.Package = function() { - var f; - f = this.$val; - return ""; - }; - $ptrType(PlaceholderFile).prototype.Package = function() { return new PlaceholderFile(this.$get()).Package(); }; - PlaceholderFile.prototype.Imports = function() { - var f; - f = this.$val; - return emptyFiles; - }; - $ptrType(PlaceholderFile).prototype.Imports = function() { return new PlaceholderFile(this.$get()).Imports(); }; - PlaceholderFile.prototype.Messages = function() { - var f; - f = this.$val; - return emptyMessages; - }; - $ptrType(PlaceholderFile).prototype.Messages = function() { return new PlaceholderFile(this.$get()).Messages(); }; - PlaceholderFile.prototype.Enums = function() { - var f; - f = this.$val; - return emptyEnums; - }; - $ptrType(PlaceholderFile).prototype.Enums = function() { return new PlaceholderFile(this.$get()).Enums(); }; - PlaceholderFile.prototype.Extensions = function() { - var f; - f = this.$val; - return emptyExtensions; - }; - $ptrType(PlaceholderFile).prototype.Extensions = function() { return new PlaceholderFile(this.$get()).Extensions(); }; - PlaceholderFile.prototype.Services = function() { - var f; - f = this.$val; - return emptyServices; - }; - $ptrType(PlaceholderFile).prototype.Services = function() { return new PlaceholderFile(this.$get()).Services(); }; - PlaceholderFile.prototype.SourceLocations = function() { - var f; - f = this.$val; - return emptySourceLocations; - }; - $ptrType(PlaceholderFile).prototype.SourceLocations = function() { return new PlaceholderFile(this.$get()).SourceLocations(); }; - PlaceholderFile.prototype.ProtoType = function(param) { - var f, param; - f = this.$val; - return; - }; - $ptrType(PlaceholderFile).prototype.ProtoType = function(param) { return new PlaceholderFile(this.$get()).ProtoType(param); }; - PlaceholderFile.prototype.ProtoInternal = function(param) { - var f, param; - f = this.$val; - return; - }; - $ptrType(PlaceholderFile).prototype.ProtoInternal = function(param) { return new PlaceholderFile(this.$get()).ProtoInternal(param); }; - PlaceholderEnum.prototype.ParentFile = function() { - var e; - e = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderEnum).prototype.ParentFile = function() { return new PlaceholderEnum(this.$get()).ParentFile(); }; - PlaceholderEnum.prototype.Parent = function() { - var e; - e = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderEnum).prototype.Parent = function() { return new PlaceholderEnum(this.$get()).Parent(); }; - PlaceholderEnum.prototype.Index = function() { - var e; - e = this.$val; - return 0; - }; - $ptrType(PlaceholderEnum).prototype.Index = function() { return new PlaceholderEnum(this.$get()).Index(); }; - PlaceholderEnum.prototype.Syntax = function() { - var e; - e = this.$val; - return 0; - }; - $ptrType(PlaceholderEnum).prototype.Syntax = function() { return new PlaceholderEnum(this.$get()).Syntax(); }; - PlaceholderEnum.prototype.Name = function() { - var e; - e = this.$val; - return new protoreflect.FullName((e)).Name(); - }; - $ptrType(PlaceholderEnum).prototype.Name = function() { return new PlaceholderEnum(this.$get()).Name(); }; - PlaceholderEnum.prototype.FullName = function() { - var e; - e = this.$val; - return (e); - }; - $ptrType(PlaceholderEnum).prototype.FullName = function() { return new PlaceholderEnum(this.$get()).FullName(); }; - PlaceholderEnum.prototype.IsPlaceholder = function() { - var e; - e = this.$val; - return true; - }; - $ptrType(PlaceholderEnum).prototype.IsPlaceholder = function() { return new PlaceholderEnum(this.$get()).IsPlaceholder(); }; - PlaceholderEnum.prototype.Options = function() { - var e; - e = this.$val; - return descopts.Enum; - }; - $ptrType(PlaceholderEnum).prototype.Options = function() { return new PlaceholderEnum(this.$get()).Options(); }; - PlaceholderEnum.prototype.Values = function() { - var e; - e = this.$val; - return emptyEnumValues; - }; - $ptrType(PlaceholderEnum).prototype.Values = function() { return new PlaceholderEnum(this.$get()).Values(); }; - PlaceholderEnum.prototype.ReservedNames = function() { - var e; - e = this.$val; - return emptyNames; - }; - $ptrType(PlaceholderEnum).prototype.ReservedNames = function() { return new PlaceholderEnum(this.$get()).ReservedNames(); }; - PlaceholderEnum.prototype.ReservedRanges = function() { - var e; - e = this.$val; - return emptyEnumRanges; - }; - $ptrType(PlaceholderEnum).prototype.ReservedRanges = function() { return new PlaceholderEnum(this.$get()).ReservedRanges(); }; - PlaceholderEnum.prototype.ProtoType = function(param) { - var e, param; - e = this.$val; - return; - }; - $ptrType(PlaceholderEnum).prototype.ProtoType = function(param) { return new PlaceholderEnum(this.$get()).ProtoType(param); }; - PlaceholderEnum.prototype.ProtoInternal = function(param) { - var e, param; - e = this.$val; - return; - }; - $ptrType(PlaceholderEnum).prototype.ProtoInternal = function(param) { return new PlaceholderEnum(this.$get()).ProtoInternal(param); }; - PlaceholderEnumValue.prototype.ParentFile = function() { - var e; - e = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderEnumValue).prototype.ParentFile = function() { return new PlaceholderEnumValue(this.$get()).ParentFile(); }; - PlaceholderEnumValue.prototype.Parent = function() { - var e; - e = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderEnumValue).prototype.Parent = function() { return new PlaceholderEnumValue(this.$get()).Parent(); }; - PlaceholderEnumValue.prototype.Index = function() { - var e; - e = this.$val; - return 0; - }; - $ptrType(PlaceholderEnumValue).prototype.Index = function() { return new PlaceholderEnumValue(this.$get()).Index(); }; - PlaceholderEnumValue.prototype.Syntax = function() { - var e; - e = this.$val; - return 0; - }; - $ptrType(PlaceholderEnumValue).prototype.Syntax = function() { return new PlaceholderEnumValue(this.$get()).Syntax(); }; - PlaceholderEnumValue.prototype.Name = function() { - var e; - e = this.$val; - return new protoreflect.FullName((e)).Name(); - }; - $ptrType(PlaceholderEnumValue).prototype.Name = function() { return new PlaceholderEnumValue(this.$get()).Name(); }; - PlaceholderEnumValue.prototype.FullName = function() { - var e; - e = this.$val; - return (e); - }; - $ptrType(PlaceholderEnumValue).prototype.FullName = function() { return new PlaceholderEnumValue(this.$get()).FullName(); }; - PlaceholderEnumValue.prototype.IsPlaceholder = function() { - var e; - e = this.$val; - return true; - }; - $ptrType(PlaceholderEnumValue).prototype.IsPlaceholder = function() { return new PlaceholderEnumValue(this.$get()).IsPlaceholder(); }; - PlaceholderEnumValue.prototype.Options = function() { - var e; - e = this.$val; - return descopts.EnumValue; - }; - $ptrType(PlaceholderEnumValue).prototype.Options = function() { return new PlaceholderEnumValue(this.$get()).Options(); }; - PlaceholderEnumValue.prototype.Number = function() { - var e; - e = this.$val; - return 0; - }; - $ptrType(PlaceholderEnumValue).prototype.Number = function() { return new PlaceholderEnumValue(this.$get()).Number(); }; - PlaceholderEnumValue.prototype.ProtoType = function(param) { - var e, param; - e = this.$val; - return; - }; - $ptrType(PlaceholderEnumValue).prototype.ProtoType = function(param) { return new PlaceholderEnumValue(this.$get()).ProtoType(param); }; - PlaceholderEnumValue.prototype.ProtoInternal = function(param) { - var e, param; - e = this.$val; - return; - }; - $ptrType(PlaceholderEnumValue).prototype.ProtoInternal = function(param) { return new PlaceholderEnumValue(this.$get()).ProtoInternal(param); }; - PlaceholderMessage.prototype.ParentFile = function() { - var m; - m = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderMessage).prototype.ParentFile = function() { return new PlaceholderMessage(this.$get()).ParentFile(); }; - PlaceholderMessage.prototype.Parent = function() { - var m; - m = this.$val; - return $ifaceNil; - }; - $ptrType(PlaceholderMessage).prototype.Parent = function() { return new PlaceholderMessage(this.$get()).Parent(); }; - PlaceholderMessage.prototype.Index = function() { - var m; - m = this.$val; - return 0; - }; - $ptrType(PlaceholderMessage).prototype.Index = function() { return new PlaceholderMessage(this.$get()).Index(); }; - PlaceholderMessage.prototype.Syntax = function() { - var m; - m = this.$val; - return 0; - }; - $ptrType(PlaceholderMessage).prototype.Syntax = function() { return new PlaceholderMessage(this.$get()).Syntax(); }; - PlaceholderMessage.prototype.Name = function() { - var m; - m = this.$val; - return new protoreflect.FullName((m)).Name(); - }; - $ptrType(PlaceholderMessage).prototype.Name = function() { return new PlaceholderMessage(this.$get()).Name(); }; - PlaceholderMessage.prototype.FullName = function() { - var m; - m = this.$val; - return (m); - }; - $ptrType(PlaceholderMessage).prototype.FullName = function() { return new PlaceholderMessage(this.$get()).FullName(); }; - PlaceholderMessage.prototype.IsPlaceholder = function() { - var m; - m = this.$val; - return true; - }; - $ptrType(PlaceholderMessage).prototype.IsPlaceholder = function() { return new PlaceholderMessage(this.$get()).IsPlaceholder(); }; - PlaceholderMessage.prototype.Options = function() { - var m; - m = this.$val; - return descopts.Message; - }; - $ptrType(PlaceholderMessage).prototype.Options = function() { return new PlaceholderMessage(this.$get()).Options(); }; - PlaceholderMessage.prototype.IsMapEntry = function() { - var m; - m = this.$val; - return false; - }; - $ptrType(PlaceholderMessage).prototype.IsMapEntry = function() { return new PlaceholderMessage(this.$get()).IsMapEntry(); }; - PlaceholderMessage.prototype.Fields = function() { - var m; - m = this.$val; - return emptyFields; - }; - $ptrType(PlaceholderMessage).prototype.Fields = function() { return new PlaceholderMessage(this.$get()).Fields(); }; - PlaceholderMessage.prototype.Oneofs = function() { - var m; - m = this.$val; - return emptyOneofs; - }; - $ptrType(PlaceholderMessage).prototype.Oneofs = function() { return new PlaceholderMessage(this.$get()).Oneofs(); }; - PlaceholderMessage.prototype.ReservedNames = function() { - var m; - m = this.$val; - return emptyNames; - }; - $ptrType(PlaceholderMessage).prototype.ReservedNames = function() { return new PlaceholderMessage(this.$get()).ReservedNames(); }; - PlaceholderMessage.prototype.ReservedRanges = function() { - var m; - m = this.$val; - return emptyFieldRanges; - }; - $ptrType(PlaceholderMessage).prototype.ReservedRanges = function() { return new PlaceholderMessage(this.$get()).ReservedRanges(); }; - PlaceholderMessage.prototype.RequiredNumbers = function() { - var m; - m = this.$val; - return emptyFieldNumbers; - }; - $ptrType(PlaceholderMessage).prototype.RequiredNumbers = function() { return new PlaceholderMessage(this.$get()).RequiredNumbers(); }; - PlaceholderMessage.prototype.ExtensionRanges = function() { - var m; - m = this.$val; - return emptyFieldRanges; - }; - $ptrType(PlaceholderMessage).prototype.ExtensionRanges = function() { return new PlaceholderMessage(this.$get()).ExtensionRanges(); }; - PlaceholderMessage.prototype.ExtensionRangeOptions = function(param) { - var m, param; - m = this.$val; - $panic(new $String("index out of range")); - }; - $ptrType(PlaceholderMessage).prototype.ExtensionRangeOptions = function(param) { return new PlaceholderMessage(this.$get()).ExtensionRangeOptions(param); }; - PlaceholderMessage.prototype.Messages = function() { - var m; - m = this.$val; - return emptyMessages; - }; - $ptrType(PlaceholderMessage).prototype.Messages = function() { return new PlaceholderMessage(this.$get()).Messages(); }; - PlaceholderMessage.prototype.Enums = function() { - var m; - m = this.$val; - return emptyEnums; - }; - $ptrType(PlaceholderMessage).prototype.Enums = function() { return new PlaceholderMessage(this.$get()).Enums(); }; - PlaceholderMessage.prototype.Extensions = function() { - var m; - m = this.$val; - return emptyExtensions; - }; - $ptrType(PlaceholderMessage).prototype.Extensions = function() { return new PlaceholderMessage(this.$get()).Extensions(); }; - PlaceholderMessage.prototype.ProtoType = function(param) { - var m, param; - m = this.$val; - return; - }; - $ptrType(PlaceholderMessage).prototype.ProtoType = function(param) { return new PlaceholderMessage(this.$get()).ProtoType(param); }; - PlaceholderMessage.prototype.ProtoInternal = function(param) { - var m, param; - m = this.$val; - return; - }; - $ptrType(PlaceholderMessage).prototype.ProtoInternal = function(param) { return new PlaceholderMessage(this.$get()).ProtoInternal(param); }; - Enums.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Enums.prototype.Len = function() { return this.$val.Len(); }; - Enums.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Enums.prototype.Get = function(i) { return this.$val.Get(i); }; - Enums.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$2.nil); - if (!(d === ptrType$2.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Enums.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Enums.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Enums.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Enums.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Enums.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Enums.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Enums.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Enums.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, _tuple, d, i, ok, x, x$1; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$1 = p[0].List, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$2.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Enums.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Enums.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - EnumValues.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - EnumValues.prototype.Len = function() { return this.$val.Len(); }; - EnumValues.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - EnumValues.prototype.Get = function(i) { return this.$val.Get(i); }; - EnumValues.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$3.nil); - if (!(d === ptrType$3.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: EnumValues.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - EnumValues.prototype.ByName = function(s) { return this.$val.ByName(s); }; - EnumValues.ptr.prototype.ByNumber = function(n) { - var {_entry, _r, d, n, p, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byNum[protoreflect.EnumNumber.keyFor(n)], _entry !== undefined ? _entry.v : ptrType$3.nil); - if (!(d === ptrType$3.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: EnumValues.ptr.prototype.ByNumber, $c: true, $r, _entry, _r, d, n, p, $s};return $f; - }; - EnumValues.prototype.ByNumber = function(n) { return this.$val.ByNumber(n); }; - EnumValues.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: EnumValues.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - EnumValues.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - EnumValues.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - EnumValues.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - EnumValues.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _entry$1, _i, _key, _key$1, _ref, _tuple, _tuple$1, d, i, ok, ok$1, x, x$1, x$2; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byNum = (x$1 = p[0].List.$length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$2 = p[0].List, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$3.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _tuple$1 = (_entry$1 = p[0].byNum[protoreflect.EnumNumber.keyFor(d.Number())], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$3.nil, false]); - ok$1 = _tuple$1[1]; - if (!ok$1) { - _key$1 = d.Number(); (p[0].byNum || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.EnumNumber.keyFor(_key$1)] = { k: _key$1, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: EnumValues.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - EnumValues.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Messages.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Messages.prototype.Len = function() { return this.$val.Len(); }; - Messages.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Messages.prototype.Get = function(i) { return this.$val.Get(i); }; - Messages.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$4.nil); - if (!(d === ptrType$4.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Messages.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Messages.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Messages.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Messages.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Messages.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Messages.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Messages.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Messages.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, _tuple, d, i, ok, x, x$1; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$1 = p[0].List, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$4.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Messages.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Messages.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Fields.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Fields.prototype.Len = function() { return this.$val.Len(); }; - Fields.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Fields.prototype.Get = function(i) { return this.$val.Get(i); }; - Fields.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$5.nil); - if (!(d === ptrType$5.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Fields.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Fields.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Fields.ptr.prototype.ByJSONName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byJSON[$String.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$5.nil); - if (!(d === ptrType$5.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Fields.ptr.prototype.ByJSONName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Fields.prototype.ByJSONName = function(s) { return this.$val.ByJSONName(s); }; - Fields.ptr.prototype.ByTextName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byText[$String.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$5.nil); - if (!(d === ptrType$5.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Fields.ptr.prototype.ByTextName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Fields.prototype.ByTextName = function(s) { return this.$val.ByTextName(s); }; - Fields.ptr.prototype.ByNumber = function(n) { - var {_entry, _r, d, n, p, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byNum[protowire.Number.keyFor(n)], _entry !== undefined ? _entry.v : ptrType$5.nil); - if (!(d === ptrType$5.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Fields.ptr.prototype.ByNumber, $c: true, $r, _entry, _r, d, n, p, $s};return $f; - }; - Fields.prototype.ByNumber = function(n) { return this.$val.ByNumber(n); }; - Fields.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Fields.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Fields.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Fields.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Fields.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Fields.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function $b() { - var {_entry, _entry$1, _entry$2, _entry$3, _i, _key, _key$1, _key$2, _key$3, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, d, i, ok, ok$1, ok$2, ok$3, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (p[0].List.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p[0].List.$length > 0) { */ case 1: - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byJSON = (x$1 = p[0].List.$length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byText = (x$2 = p[0].List.$length, ((x$2 < 0 || x$2 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byNum = (x$3 = p[0].List.$length, ((x$3 < 0 || x$3 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - i = _i; - d = (x$4 = p[0].List, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$5.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _r = d.JSONName(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = (_entry$1 = p[0].byJSON[$String.keyFor(_r)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$5.nil, false]); - ok$1 = _tuple$1[1]; - /* */ if (!ok$1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!ok$1) { */ case 6: - _r$1 = d.JSONName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _key$1 = _r$1; (p[0].byJSON || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: d }; - /* } */ case 7: - _r$2 = d.TextName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = (_entry$2 = p[0].byText[$String.keyFor(_r$2)], _entry$2 !== undefined ? [_entry$2.v, true] : [ptrType$5.nil, false]); - ok$2 = _tuple$2[1]; - /* */ if (!ok$2) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!ok$2) { */ case 10: - _r$3 = d.TextName(); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _key$2 = _r$3; (p[0].byText || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$2)] = { k: _key$2, v: d }; - /* } */ case 11: - _tuple$3 = (_entry$3 = p[0].byNum[protowire.Number.keyFor(d.Number())], _entry$3 !== undefined ? [_entry$3.v, true] : [ptrType$5.nil, false]); - ok$3 = _tuple$3[1]; - if (!ok$3) { - _key$3 = d.Number(); (p[0].byNum || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key$3)] = { k: _key$3, v: d }; - } - _i++; - $s = 3; continue; - case 4: - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _i, _key, _key$1, _key$2, _key$3, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, d, i, ok, ok$1, ok$2, ok$3, x, x$1, x$2, x$3, x$4, $s};return $f; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Fields.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Fields.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Oneofs.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Oneofs.prototype.Len = function() { return this.$val.Len(); }; - Oneofs.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Oneofs.prototype.Get = function(i) { return this.$val.Get(i); }; - Oneofs.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$6.nil); - if (!(d === ptrType$6.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Oneofs.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Oneofs.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Oneofs.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Oneofs.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Oneofs.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Oneofs.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Oneofs.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Oneofs.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, _tuple, d, i, ok, x, x$1; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$1 = p[0].List, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$6.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Oneofs.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Oneofs.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Extensions.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Extensions.prototype.Len = function() { return this.$val.Len(); }; - Extensions.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Extensions.prototype.Get = function(i) { return this.$val.Get(i); }; - Extensions.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$7.nil); - if (!(d === ptrType$7.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Extensions.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Extensions.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Extensions.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Extensions.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Extensions.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Extensions.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Extensions.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Extensions.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, _tuple, d, i, ok, x, x$1; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$1 = p[0].List, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$7.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Extensions.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Extensions.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Services.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Services.prototype.Len = function() { return this.$val.Len(); }; - Services.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Services.prototype.Get = function(i) { return this.$val.Get(i); }; - Services.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$8.nil); - if (!(d === ptrType$8.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Services.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Services.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Services.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Services.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Services.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Services.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Services.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Services.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, _tuple, d, i, ok, x, x$1; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$1 = p[0].List, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$8.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Services.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Services.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Methods.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Methods.prototype.Len = function() { return this.$val.Len(); }; - Methods.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Methods.prototype.Get = function(i) { return this.$val.Get(i); }; - Methods.ptr.prototype.ByName = function(s) { - var {_entry, _r, d, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : ptrType$9.nil); - if (!(d === ptrType$9.nil)) { - $s = -1; return d; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Methods.ptr.prototype.ByName, $c: true, $r, _entry, _r, d, p, s, $s};return $f; - }; - Methods.prototype.ByName = function(s) { return this.$val.ByName(s); }; - Methods.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Methods.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Methods.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Methods.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Methods.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Methods.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, _tuple, d, i, ok, x, x$1; - if (p[0].List.$length > 0) { - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = (x$1 = p[0].List, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - _tuple = (_entry = p[0].byName[protoreflect.Name.keyFor(d.Base.Name())], _entry !== undefined ? [_entry.v, true] : [ptrType$9.nil, false]); - ok = _tuple[1]; - if (!ok) { - _key = d.Base.Name(); (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: d }; - } - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Methods.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Methods.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - $ptrType(FileImports).prototype.Len = function() { - var p; - p = this; - return p.$get().$length; - }; - $ptrType(FileImports).prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.$get(), ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - $ptrType(FileImports).prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $ptrType(FileImports).prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - $ptrType(FileImports).prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Names.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - Names.prototype.Len = function() { return this.$val.Len(); }; - Names.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - Names.prototype.Get = function(i) { return this.$val.Get(i); }; - Names.ptr.prototype.Has = function(s) { - var {$24r, _entry, _r, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (_entry = _r.has[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : 0) > 0; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Names.ptr.prototype.Has, $c: true, $r, $24r, _entry, _r, p, s, $s};return $f; - }; - Names.prototype.Has = function(s) { return this.$val.Has(s); }; - Names.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Names.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - Names.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Names.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - Names.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Names.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _entry, _i, _key, _ref, s, x; - if (p[0].List.$length > 0) { - p[0].has = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _key = s; (p[0].has || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: (_entry = p[0].has[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : 0) + 1 >> 0 }; - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: Names.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - Names.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Names.ptr.prototype.CheckValid = function() { - var {$24r, $24r$1, _entry, _i, _keys, _r, _r$1, _r$2, _ref, n, p, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _ref = _r.has; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - s = _entry.k; - n = _entry.v; - /* */ if (n > 1) { $s = 5; continue; } - /* */ if (false && !new protoreflect.Name(s).IsValid()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (n > 1) { */ case 5: - _r$1 = errors.New("duplicate name: %q", new sliceType$12([new protoreflect.Name(s)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 9; case 9: return $24r; - /* } else if (false && !new protoreflect.Name(s).IsValid()) { */ case 6: - _r$2 = errors.New("invalid name: %q", new sliceType$12([new protoreflect.Name(s)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 11; case 11: return $24r$1; - /* } */ case 7: - case 4: - _i++; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Names.ptr.prototype.CheckValid, $c: true, $r, $24r, $24r$1, _entry, _i, _keys, _r, _r$1, _r$2, _ref, n, p, s, $s};return $f; - }; - Names.prototype.CheckValid = function() { return this.$val.CheckValid(); }; - EnumRanges.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - EnumRanges.prototype.Len = function() { return this.$val.Len(); }; - EnumRanges.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - EnumRanges.prototype.Get = function(i) { return this.$val.Get(i); }; - EnumRanges.ptr.prototype.Has = function(n) { - var {_q, _r, i, ls, n, p, r, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ls = _r.sorted; - /* while (true) { */ case 2: - /* if (!(ls.$length > 0)) { break; } */ if(!(ls.$length > 0)) { $s = 3; continue; } - i = (_q = ls.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - r = $clone(($clone(((i < 0 || i >= ls.$length) ? ($throwRuntimeError("index out of range"), undefined) : ls.$array[ls.$offset + i]), enumRange)), enumRange); - if (n < new enumRange($clone(r, enumRange)).Start()) { - ls = $subslice(ls, 0, i); - } else if (n > new enumRange($clone(r, enumRange)).End()) { - ls = $subslice(ls, (i + 1 >> 0)); - } else { - $s = -1; return true; - } - $s = 2; continue; - case 3: - $s = -1; return false; - /* */ } return; } var $f = {$blk: EnumRanges.ptr.prototype.Has, $c: true, $r, _q, _r, i, ls, n, p, r, $s};return $f; - }; - EnumRanges.prototype.Has = function(n) { return this.$val.Has(n); }; - EnumRanges.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: EnumRanges.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - EnumRanges.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - EnumRanges.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - EnumRanges.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - EnumRanges.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p[0].sorted = $appendSlice(p[0].sorted, p[0].List); - $r = sort.Slice(p[0].sorted, (function(p) { return function(i, j) { - var i, j, x, x$1; - return (x = p[0].sorted, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))[0] < (x$1 = p[0].sorted, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j]))[0]; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: EnumRanges.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - EnumRanges.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - EnumRanges.ptr.prototype.CheckValid = function() { - var {$24r, $24r$1, _i, _r, _r$1, _r$2, _ref, i, p, r, r$1, rp, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - rp = arrayType.zero(); - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _ref = _r.sorted; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - i = _i; - r = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType); - r$1 = $clone(($clone(r, enumRange)), enumRange); - /* */ if (!(new enumRange($clone(r$1, enumRange)).Start() <= new enumRange($clone(r$1, enumRange)).End())) { $s = 5; continue; } - /* */ if (!(new enumRange($clone(rp, enumRange)).End() < new enumRange($clone(r$1, enumRange)).Start()) && i > 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(new enumRange($clone(r$1, enumRange)).Start() <= new enumRange($clone(r$1, enumRange)).End())) { */ case 5: - _r$1 = errors.New("invalid range: %v", new sliceType$12([new enumRange(r$1)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 9; case 9: return $24r; - /* } else if (!(new enumRange($clone(rp, enumRange)).End() < new enumRange($clone(r$1, enumRange)).Start()) && i > 0) { */ case 6: - _r$2 = errors.New("overlapping ranges: %v with %v", new sliceType$12([new enumRange(rp), new enumRange(r$1)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 11; case 11: return $24r$1; - /* } */ case 7: - case 4: - enumRange.copy(rp, r$1); - _i++; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: EnumRanges.ptr.prototype.CheckValid, $c: true, $r, $24r, $24r$1, _i, _r, _r$1, _r$2, _ref, i, p, r, r$1, rp, $s};return $f; - }; - EnumRanges.prototype.CheckValid = function() { return this.$val.CheckValid(); }; - enumRange.prototype.Start = function() { - var r; - r = this.$val; - return r[0]; - }; - $ptrType(enumRange).prototype.Start = function() { return new enumRange(this.$get()).Start(); }; - enumRange.prototype.End = function() { - var r; - r = this.$val; - return r[1]; - }; - $ptrType(enumRange).prototype.End = function() { return new enumRange(this.$get()).End(); }; - enumRange.prototype.String = function() { - var {$24r, $24r$1, _r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this.$val; - /* */ if (new enumRange($clone(r, enumRange)).Start() === new enumRange($clone(r, enumRange)).End()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (new enumRange($clone(r, enumRange)).Start() === new enumRange($clone(r, enumRange)).End()) { */ case 1: - _r = fmt.Sprintf("%d", new sliceType$12([new protoreflect.EnumNumber(new enumRange($clone(r, enumRange)).Start())])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = fmt.Sprintf("%d to %d", new sliceType$12([new protoreflect.EnumNumber(new enumRange($clone(r, enumRange)).Start()), new protoreflect.EnumNumber(new enumRange($clone(r, enumRange)).End())])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: enumRange.prototype.String, $c: true, $r, $24r, $24r$1, _r, _r$1, r, $s};return $f; - }; - $ptrType(enumRange).prototype.String = function() { return new enumRange(this.$get()).String(); }; - FieldRanges.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - FieldRanges.prototype.Len = function() { return this.$val.Len(); }; - FieldRanges.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - FieldRanges.prototype.Get = function(i) { return this.$val.Get(i); }; - FieldRanges.ptr.prototype.Has = function(n) { - var {_q, _r, i, ls, n, p, r, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ls = _r.sorted; - /* while (true) { */ case 2: - /* if (!(ls.$length > 0)) { break; } */ if(!(ls.$length > 0)) { $s = 3; continue; } - i = (_q = ls.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - r = $clone(($clone(((i < 0 || i >= ls.$length) ? ($throwRuntimeError("index out of range"), undefined) : ls.$array[ls.$offset + i]), fieldRange)), fieldRange); - if (n < new fieldRange($clone(r, fieldRange)).Start()) { - ls = $subslice(ls, 0, i); - } else if (n > new fieldRange($clone(r, fieldRange)).End()) { - ls = $subslice(ls, (i + 1 >> 0)); - } else { - $s = -1; return true; - } - $s = 2; continue; - case 3: - $s = -1; return false; - /* */ } return; } var $f = {$blk: FieldRanges.ptr.prototype.Has, $c: true, $r, _q, _r, i, ls, n, p, r, $s};return $f; - }; - FieldRanges.prototype.Has = function(n) { return this.$val.Has(n); }; - FieldRanges.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FieldRanges.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - FieldRanges.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - FieldRanges.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - FieldRanges.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - FieldRanges.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p[0].sorted = $appendSlice(p[0].sorted, p[0].List); - $r = sort.Slice(p[0].sorted, (function(p) { return function(i, j) { - var i, j, x, x$1; - return (x = p[0].sorted, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]))[0] < (x$1 = p[0].sorted, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j]))[0]; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: FieldRanges.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - FieldRanges.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - FieldRanges.ptr.prototype.CheckValid = function(isMessageSet) { - var {$24r, $24r$1, $24r$2, $24r$3, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, i, isMessageSet, p, r, r$1, rp, $s, $r, $c} = $restore(this, {isMessageSet}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - rp = arrayType$1.zero(); - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _ref = _r.sorted; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - i = _i; - r = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType$1); - r$1 = $clone(($clone(r, fieldRange)), fieldRange); - /* */ if (!isValidFieldNumber(new fieldRange($clone(r$1, fieldRange)).Start(), isMessageSet)) { $s = 5; continue; } - /* */ if (!isValidFieldNumber(new fieldRange($clone(r$1, fieldRange)).End(), isMessageSet)) { $s = 6; continue; } - /* */ if (!(new fieldRange($clone(r$1, fieldRange)).Start() <= new fieldRange($clone(r$1, fieldRange)).End())) { $s = 7; continue; } - /* */ if (!(new fieldRange($clone(rp, fieldRange)).End() < new fieldRange($clone(r$1, fieldRange)).Start()) && i > 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!isValidFieldNumber(new fieldRange($clone(r$1, fieldRange)).Start(), isMessageSet)) { */ case 5: - _r$1 = errors.New("invalid field number: %d", new sliceType$12([new protowire.Number(new fieldRange($clone(r$1, fieldRange)).Start())])); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 11; case 11: return $24r; - /* } else if (!isValidFieldNumber(new fieldRange($clone(r$1, fieldRange)).End(), isMessageSet)) { */ case 6: - _r$2 = errors.New("invalid field number: %d", new sliceType$12([new protowire.Number(new fieldRange($clone(r$1, fieldRange)).End())])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 13; case 13: return $24r$1; - /* } else if (!(new fieldRange($clone(r$1, fieldRange)).Start() <= new fieldRange($clone(r$1, fieldRange)).End())) { */ case 7: - _r$3 = errors.New("invalid range: %v", new sliceType$12([new fieldRange(r$1)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 15; case 15: return $24r$2; - /* } else if (!(new fieldRange($clone(rp, fieldRange)).End() < new fieldRange($clone(r$1, fieldRange)).Start()) && i > 0) { */ case 8: - _r$4 = errors.New("overlapping ranges: %v with %v", new sliceType$12([new fieldRange(rp), new fieldRange(r$1)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$3 = _r$4; - $s = 17; case 17: return $24r$3; - /* } */ case 9: - case 4: - fieldRange.copy(rp, r$1); - _i++; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FieldRanges.ptr.prototype.CheckValid, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, i, isMessageSet, p, r, r$1, rp, $s};return $f; - }; - FieldRanges.prototype.CheckValid = function(isMessageSet) { return this.$val.CheckValid(isMessageSet); }; - isValidFieldNumber = function(n, isMessageSet) { - var isMessageSet, n; - return 1 <= n && (n <= 536870911 || isMessageSet); - }; - FieldRanges.ptr.prototype.CheckOverlap = function(q) { - var {$24r, _r, _r$1, _r$2, _tmp, _tmp$1, p, pi, q, qi, rp, rps, rq, rqs, $s, $r, $c} = $restore(this, {q}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - rps = _r.sorted; - _r$1 = q.lazyInit(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - rqs = _r$1.sorted; - _tmp = 0; - _tmp$1 = 0; - pi = _tmp; - qi = _tmp$1; - /* while (true) { */ case 3: - /* if (!(pi < rps.$length && qi < rqs.$length)) { break; } */ if(!(pi < rps.$length && qi < rqs.$length)) { $s = 4; continue; } - rp = $clone(($clone(((pi < 0 || pi >= rps.$length) ? ($throwRuntimeError("index out of range"), undefined) : rps.$array[rps.$offset + pi]), fieldRange)), fieldRange); - rq = $clone(($clone(((qi < 0 || qi >= rqs.$length) ? ($throwRuntimeError("index out of range"), undefined) : rqs.$array[rqs.$offset + qi]), fieldRange)), fieldRange); - /* */ if (!(new fieldRange($clone(rp, fieldRange)).End() < new fieldRange($clone(rq, fieldRange)).Start() || new fieldRange($clone(rq, fieldRange)).End() < new fieldRange($clone(rp, fieldRange)).Start())) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(new fieldRange($clone(rp, fieldRange)).End() < new fieldRange($clone(rq, fieldRange)).Start() || new fieldRange($clone(rq, fieldRange)).End() < new fieldRange($clone(rp, fieldRange)).Start())) { */ case 5: - _r$2 = errors.New("overlapping ranges: %v with %v", new sliceType$12([new fieldRange(rp), new fieldRange(rq)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 8; case 8: return $24r; - /* } */ case 6: - if (new fieldRange($clone(rp, fieldRange)).Start() < new fieldRange($clone(rq, fieldRange)).Start()) { - pi = pi + (1) >> 0; - } else { - qi = qi + (1) >> 0; - } - $s = 3; continue; - case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FieldRanges.ptr.prototype.CheckOverlap, $c: true, $r, $24r, _r, _r$1, _r$2, _tmp, _tmp$1, p, pi, q, qi, rp, rps, rq, rqs, $s};return $f; - }; - FieldRanges.prototype.CheckOverlap = function(q) { return this.$val.CheckOverlap(q); }; - fieldRange.prototype.Start = function() { - var r; - r = this.$val; - return r[0]; - }; - $ptrType(fieldRange).prototype.Start = function() { return new fieldRange(this.$get()).Start(); }; - fieldRange.prototype.End = function() { - var r; - r = this.$val; - return r[1] - 1 >> 0; - }; - $ptrType(fieldRange).prototype.End = function() { return new fieldRange(this.$get()).End(); }; - fieldRange.prototype.String = function() { - var {$24r, $24r$1, _r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this.$val; - /* */ if (new fieldRange($clone(r, fieldRange)).Start() === new fieldRange($clone(r, fieldRange)).End()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (new fieldRange($clone(r, fieldRange)).Start() === new fieldRange($clone(r, fieldRange)).End()) { */ case 1: - _r = fmt.Sprintf("%d", new sliceType$12([new protowire.Number(new fieldRange($clone(r, fieldRange)).Start())])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = fmt.Sprintf("%d to %d", new sliceType$12([new protowire.Number(new fieldRange($clone(r, fieldRange)).Start()), new protowire.Number(new fieldRange($clone(r, fieldRange)).End())])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: fieldRange.prototype.String, $c: true, $r, $24r, $24r$1, _r, _r$1, r, $s};return $f; - }; - $ptrType(fieldRange).prototype.String = function() { return new fieldRange(this.$get()).String(); }; - FieldNumbers.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - FieldNumbers.prototype.Len = function() { return this.$val.Len(); }; - FieldNumbers.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - FieldNumbers.prototype.Get = function(i) { return this.$val.Get(i); }; - FieldNumbers.ptr.prototype.Has = function(n) { - var {_entry, _tuple, n, ok, p, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function() { - var _i, _key, _ref, n$1, x; - if (p[0].List.$length > 0) { - p[0].has = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - n$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _key = n$1; (p[0].has || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - _i++; - } - } - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = p[0].has[protowire.Number.keyFor(n)], _entry !== undefined ? [_entry.v, true] : [new structType.ptr(), false]); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: FieldNumbers.ptr.prototype.Has, $c: true, $r, _entry, _tuple, n, ok, p, $s};return $f; - }; - FieldNumbers.prototype.Has = function(n) { return this.$val.Has(n); }; - FieldNumbers.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FieldNumbers.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - FieldNumbers.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - FieldNumbers.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - FieldNumbers.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - OneofFields.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - OneofFields.prototype.Len = function() { return this.$val.Len(); }; - OneofFields.ptr.prototype.Get = function(i) { - var i, p, x; - p = this; - return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - }; - OneofFields.prototype.Get = function(i) { return this.$val.Get(i); }; - OneofFields.ptr.prototype.ByName = function(s) { - var {$24r, _entry, _r, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (_entry = _r.byName[protoreflect.Name.keyFor(s)], _entry !== undefined ? _entry.v : $ifaceNil); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: OneofFields.ptr.prototype.ByName, $c: true, $r, $24r, _entry, _r, p, s, $s};return $f; - }; - OneofFields.prototype.ByName = function(s) { return this.$val.ByName(s); }; - OneofFields.ptr.prototype.ByJSONName = function(s) { - var {$24r, _entry, _r, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (_entry = _r.byJSON[$String.keyFor(s)], _entry !== undefined ? _entry.v : $ifaceNil); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: OneofFields.ptr.prototype.ByJSONName, $c: true, $r, $24r, _entry, _r, p, s, $s};return $f; - }; - OneofFields.prototype.ByJSONName = function(s) { return this.$val.ByJSONName(s); }; - OneofFields.ptr.prototype.ByTextName = function(s) { - var {$24r, _entry, _r, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (_entry = _r.byText[$String.keyFor(s)], _entry !== undefined ? _entry.v : $ifaceNil); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: OneofFields.ptr.prototype.ByTextName, $c: true, $r, $24r, _entry, _r, p, s, $s};return $f; - }; - OneofFields.prototype.ByTextName = function(s) { return this.$val.ByTextName(s); }; - OneofFields.ptr.prototype.ByNumber = function(n) { - var {$24r, _entry, _r, n, p, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (_entry = _r.byNum[protowire.Number.keyFor(n)], _entry !== undefined ? _entry.v : $ifaceNil); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: OneofFields.ptr.prototype.ByNumber, $c: true, $r, $24r, _entry, _r, n, p, $s};return $f; - }; - OneofFields.prototype.ByNumber = function(n) { return this.$val.ByNumber(n); }; - OneofFields.ptr.prototype.Format = function(s, r) { - var {p, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = descfmt.FormatList(s, r, p); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: OneofFields.ptr.prototype.Format, $c: true, $r, p, r, s, $s};return $f; - }; - OneofFields.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - OneofFields.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - OneofFields.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - OneofFields.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function $b() { - var {_i, _key, _key$1, _key$2, _key$3, _r, _r$1, _r$2, _r$3, _ref, f, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (p[0].List.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p[0].List.$length > 0) { */ case 1: - p[0].byName = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byJSON = (x$1 = p[0].List.$length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byText = (x$2 = p[0].List.$length, ((x$2 < 0 || x$2 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - p[0].byNum = (x$3 = p[0].List.$length, ((x$3 < 0 || x$3 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = f.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _key = _r; (p[0].byName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key)] = { k: _key, v: f }; - _r$1 = f.JSONName(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _key$1 = _r$1; (p[0].byJSON || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: f }; - _r$2 = f.TextName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _key$2 = _r$2; (p[0].byText || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$2)] = { k: _key$2, v: f }; - _r$3 = f.Number(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _key$3 = _r$3; (p[0].byNum || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key$3)] = { k: _key$3, v: f }; - _i++; - $s = 3; continue; - case 4: - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _key, _key$1, _key$2, _key$3, _r, _r$1, _r$2, _r$3, _ref, f, x, x$1, x$2, x$3, $s};return $f; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: OneofFields.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - OneofFields.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - SourceLocations.ptr.prototype.Len = function() { - var p; - p = this; - return p.List.$length; - }; - SourceLocations.prototype.Len = function() { return this.$val.Len(); }; - SourceLocations.ptr.prototype.Get = function(i) { - var {$24r, _r, i, p, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (x = _r.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: SourceLocations.ptr.prototype.Get, $c: true, $r, $24r, _r, i, p, x, $s};return $f; - }; - SourceLocations.prototype.Get = function(i) { return this.$val.Get(i); }; - SourceLocations.ptr.prototype.byKey = function(k) { - var {_entry, _r, _tuple, i, k, ok, p, x, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = (_entry = _r.byPath[pathKey.keyFor(k)], _entry !== undefined ? [_entry.v, true] : [0, false]); - i = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return (x = p.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - } - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - /* */ } return; } var $f = {$blk: SourceLocations.ptr.prototype.byKey, $c: true, $r, _entry, _r, _tuple, i, k, ok, p, x, $s};return $f; - }; - SourceLocations.prototype.byKey = function(k) { return this.$val.byKey(k); }; - SourceLocations.ptr.prototype.ByPath = function(path) { - var {$24r, _r, _r$1, p, path, $s, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = newPathKey(path); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = p.byKey($clone(_r, pathKey)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: SourceLocations.ptr.prototype.ByPath, $c: true, $r, $24r, _r, _r$1, p, path, $s};return $f; - }; - SourceLocations.prototype.ByPath = function(path) { return this.$val.ByPath(path); }; - SourceLocations.ptr.prototype.ByDescriptor = function(desc) { - var {$24r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _ref$8, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _v, desc, i, isExtension, j, p, path, pathArr, $s, $r, $c} = $restore(this, {desc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (!(!($interfaceIsEqual(p.File, $ifaceNil)) && !($interfaceIsEqual(desc, $ifaceNil)))) { _v = false; $s = 3; continue s; } - _r = desc.ParentFile(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = !($interfaceIsEqual(p.File, _r)); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - /* } */ case 2: - pathArr = arrayType$2.zero(); - path = $subslice(new sliceType$15(pathArr), 0, 0); - /* while (true) { */ case 5: - _ref = desc; - /* */ if ($assertType(_ref, protoreflect.FileDescriptor, true)[1]) { $s = 7; continue; } - /* */ if ($assertType(_ref, protoreflect.MessageDescriptor, true)[1]) { $s = 8; continue; } - /* */ if ($assertType(_ref, protoreflect.FieldDescriptor, true)[1]) { $s = 9; continue; } - /* */ if ($assertType(_ref, protoreflect.OneofDescriptor, true)[1]) { $s = 10; continue; } - /* */ if ($assertType(_ref, protoreflect.EnumDescriptor, true)[1]) { $s = 11; continue; } - /* */ if ($assertType(_ref, protoreflect.EnumValueDescriptor, true)[1]) { $s = 12; continue; } - /* */ if ($assertType(_ref, protoreflect.ServiceDescriptor, true)[1]) { $s = 13; continue; } - /* */ if ($assertType(_ref, protoreflect.MethodDescriptor, true)[1]) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ($assertType(_ref, protoreflect.FileDescriptor, true)[1]) { */ case 7: - _tmp = 0; - _tmp$1 = path.$length - 1 >> 0; - i = _tmp; - j = _tmp$1; - while (true) { - if (!(i < j)) { break; } - _tmp$2 = ((j < 0 || j >= path.$length) ? ($throwRuntimeError("index out of range"), undefined) : path.$array[path.$offset + j]); - _tmp$3 = ((i < 0 || i >= path.$length) ? ($throwRuntimeError("index out of range"), undefined) : path.$array[path.$offset + i]); - ((i < 0 || i >= path.$length) ? ($throwRuntimeError("index out of range"), undefined) : path.$array[path.$offset + i] = _tmp$2); - ((j < 0 || j >= path.$length) ? ($throwRuntimeError("index out of range"), undefined) : path.$array[path.$offset + j] = _tmp$3); - _tmp$4 = i + 1 >> 0; - _tmp$5 = j - 1 >> 0; - i = _tmp$4; - j = _tmp$5; - } - _r$1 = newPathKey($convertSliceType(path, protoreflect.SourcePath)); /* */ $s = 17; case 17: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = p.byKey($clone(_r$1, pathKey)); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 19; case 19: return $24r; - /* } else if ($assertType(_ref, protoreflect.MessageDescriptor, true)[1]) { */ case 8: - _r$3 = desc.Index(); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - path = $append(path, ((_r$3 >> 0))); - _r$4 = desc.Parent(); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - desc = _r$4; - _ref$1 = desc; - if ($assertType(_ref$1, protoreflect.FileDescriptor, true)[1]) { - path = $append(path, 4); - } else if ($assertType(_ref$1, protoreflect.MessageDescriptor, true)[1]) { - path = $append(path, 3); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.FieldDescriptor, true)[1]) { */ case 9: - _r$5 = $assertType(desc, protoreflect.FieldDescriptor).IsExtension(); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - isExtension = _r$5; - _r$6 = desc.Index(); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - path = $append(path, ((_r$6 >> 0))); - _r$7 = desc.Parent(); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - desc = _r$7; - if (isExtension) { - _ref$2 = desc; - if ($assertType(_ref$2, protoreflect.FileDescriptor, true)[1]) { - path = $append(path, 7); - } else if ($assertType(_ref$2, protoreflect.MessageDescriptor, true)[1]) { - path = $append(path, 6); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - } else { - _ref$3 = desc; - if ($assertType(_ref$3, protoreflect.MessageDescriptor, true)[1]) { - path = $append(path, 2); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - } - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.OneofDescriptor, true)[1]) { */ case 10: - _r$8 = desc.Index(); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - path = $append(path, ((_r$8 >> 0))); - _r$9 = desc.Parent(); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - desc = _r$9; - _ref$4 = desc; - if ($assertType(_ref$4, protoreflect.MessageDescriptor, true)[1]) { - path = $append(path, 8); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.EnumDescriptor, true)[1]) { */ case 11: - _r$10 = desc.Index(); /* */ $s = 27; case 27: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - path = $append(path, ((_r$10 >> 0))); - _r$11 = desc.Parent(); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - desc = _r$11; - _ref$5 = desc; - if ($assertType(_ref$5, protoreflect.FileDescriptor, true)[1]) { - path = $append(path, 5); - } else if ($assertType(_ref$5, protoreflect.MessageDescriptor, true)[1]) { - path = $append(path, 4); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.EnumValueDescriptor, true)[1]) { */ case 12: - _r$12 = desc.Index(); /* */ $s = 29; case 29: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - path = $append(path, ((_r$12 >> 0))); - _r$13 = desc.Parent(); /* */ $s = 30; case 30: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - desc = _r$13; - _ref$6 = desc; - if ($assertType(_ref$6, protoreflect.EnumDescriptor, true)[1]) { - path = $append(path, 2); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.ServiceDescriptor, true)[1]) { */ case 13: - _r$14 = desc.Index(); /* */ $s = 31; case 31: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - path = $append(path, ((_r$14 >> 0))); - _r$15 = desc.Parent(); /* */ $s = 32; case 32: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - desc = _r$15; - _ref$7 = desc; - if ($assertType(_ref$7, protoreflect.FileDescriptor, true)[1]) { - path = $append(path, 6); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - $s = 16; continue; - /* } else if ($assertType(_ref, protoreflect.MethodDescriptor, true)[1]) { */ case 14: - _r$16 = desc.Index(); /* */ $s = 33; case 33: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - path = $append(path, ((_r$16 >> 0))); - _r$17 = desc.Parent(); /* */ $s = 34; case 34: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - desc = _r$17; - _ref$8 = desc; - if ($assertType(_ref$8, protoreflect.ServiceDescriptor, true)[1]) { - path = $append(path, 2); - } else { - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - } - $s = 16; continue; - /* } else { */ case 15: - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - /* } */ case 16: - $s = 5; continue; - case 6: - $s = -1; return new protoreflect.SourceLocation.ptr(protoreflect.SourcePath.nil, 0, 0, 0, 0, sliceType$14.nil, "", "", 0); - /* */ } return; } var $f = {$blk: SourceLocations.ptr.prototype.ByDescriptor, $c: true, $r, $24r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _ref$8, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _v, desc, i, isExtension, j, p, path, pathArr, $s};return $f; - }; - SourceLocations.prototype.ByDescriptor = function(desc) { return this.$val.ByDescriptor(desc); }; - SourceLocations.ptr.prototype.lazyInit = function() { - var {p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = [p]; - p[0] = this; - $r = p[0].once.Do((function(p) { return function $b() { - var {_entry, _entry$1, _i, _i$1, _key, _key$1, _keys, _r, _ref, _ref$1, i, i$1, idxs, k, k$1, l, pathIdxs, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (p[0].List.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p[0].List.$length > 0) { */ case 1: - pathIdxs = (x = p[0].List.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = p[0].List; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - i = _i; - l = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), protoreflect.SourceLocation); - _r = newPathKey(l.Path); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - k = $clone(_r, pathKey); - _key = $clone(k, pathKey); (pathIdxs || $throwRuntimeError("assignment to entry in nil map"))[pathKey.keyFor(_key)] = { k: _key, v: $append((_entry = pathIdxs[pathKey.keyFor(k)], _entry !== undefined ? _entry.v : sliceType$16.nil), i) }; - _i++; - $s = 3; continue; - case 4: - p[0].byPath = (x$1 = p[0].List.$length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref$1 = pathIdxs; - _i$1 = 0; - _keys = $keys(_ref$1); - while (true) { - if (!(_i$1 < _keys.length)) { break; } - _entry$1 = _ref$1[_keys[_i$1]]; - if (_entry$1 === undefined) { - _i$1++; - continue; - } - k$1 = $clone(_entry$1.k, pathKey); - idxs = _entry$1.v; - i$1 = 0; - while (true) { - if (!(i$1 < (idxs.$length - 1 >> 0))) { break; } - (x$3 = p[0].List, x$4 = ((i$1 < 0 || i$1 >= idxs.$length) ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + i$1]), ((x$4 < 0 || x$4 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + x$4])).Next = (x$2 = i$1 + 1 >> 0, ((x$2 < 0 || x$2 >= idxs.$length) ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + x$2])); - i$1 = i$1 + (1) >> 0; - } - (x$5 = p[0].List, x$6 = (x$7 = idxs.$length - 1 >> 0, ((x$7 < 0 || x$7 >= idxs.$length) ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + x$7])), ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])).Next = 0; - _key$1 = $clone(k$1, pathKey); (p[0].byPath || $throwRuntimeError("assignment to entry in nil map"))[pathKey.keyFor(_key$1)] = { k: _key$1, v: (0 >= idxs.$length ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + 0]) }; - _i$1++; - } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _entry, _entry$1, _i, _i$1, _key, _key$1, _keys, _r, _ref, _ref$1, i, i$1, idxs, k, k$1, l, pathIdxs, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s};return $f; - }; })(p)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p[0]; - /* */ } return; } var $f = {$blk: SourceLocations.ptr.prototype.lazyInit, $c: true, $r, p, $s};return $f; - }; - SourceLocations.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - SourceLocations.ptr.prototype.ProtoInternal = function(param) { - var p, param; - p = this; - }; - SourceLocations.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - newPathKey = function(p) { - var {$24r, $24r$1, _i, _r, _r$1, _ref, i, k, p, ps, x, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = new pathKey.ptr(arrayType$3.zero(), ""); - /* */ if (p.$length < 16) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.$length < 16) { */ case 1: - _ref = p; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - i = _i; - ps = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (ps < 0 || 255 <= ps) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ps < 0 || 255 <= ps) { */ case 5: - _r = p.String(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - pathKey.copy(k, new pathKey.ptr(arrayType$3.zero(), _r)); - $24r = k; - $s = 8; case 8: return $24r; - /* } */ case 6: - (x = k.arr, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = ((ps << 24 >>> 24)))); - _i++; - $s = 3; continue; - case 4: - k.arr[15] = ((p.$length << 24 >>> 24)); - pathKey.copy(k, k); - $s = -1; return k; - /* } */ case 2: - _r$1 = p.String(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - pathKey.copy(k, new pathKey.ptr(arrayType$3.zero(), _r$1)); - $24r$1 = k; - $s = 10; case 10: return $24r$1; - /* */ } return; } var $f = {$blk: newPathKey, $c: true, $r, $24r, $24r$1, _i, _r, _r$1, _ref, i, k, p, ps, x, $s};return $f; - }; - File.ptr.prototype.lazyRawInit = function() { - var {fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.unmarshalFull(fd.fileRaw.builder.RawDescriptor); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fd.resolveMessages(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fd.resolveExtensions(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fd.resolveServices(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: File.ptr.prototype.lazyRawInit, $c: true, $r, fd, $s};return $f; - }; - File.prototype.lazyRawInit = function() { return this.$val.lazyRawInit(); }; - File.ptr.prototype.resolveMessages = function() { - var {_1, _i, _i$1, _r, _r$1, _r$2, _r$3, _ref, _ref$1, depIdx, fd, file, i, j, md, v, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - file = this; - depIdx = 0; - _ref = file.fileRaw.allMessages; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - md = (x = file.fileRaw.allMessages, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - _ref$1 = md.L2.Fields.List; - _i$1 = 0; - /* while (true) { */ case 3: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 4; continue; } - j = _i$1; - fd = (x$1 = md.L2.Fields.List, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])); - if (fd.L1.IsWeak) { - _i$1++; - /* continue; */ $s = 3; continue; - } - _1 = fd.L1.Kind; - /* */ if (_1 === (14)) { $s = 6; continue; } - /* */ if ((_1 === (11)) || (_1 === (10))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (14)) { */ case 6: - _r = file.resolveEnumDependency(fd.L1.Enum, 0, depIdx); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - fd.L1.Enum = _r; - depIdx = depIdx + (1) >> 0; - $s = 8; continue; - /* } else if ((_1 === (11)) || (_1 === (10))) { */ case 7: - _r$1 = file.resolveMessageDependency(fd.L1.Message, 0, depIdx); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - fd.L1.Message = _r$1; - depIdx = depIdx + (1) >> 0; - /* } */ case 8: - case 5: - v = $clone(fd.L1.Default.val, protoreflect.Value); - /* */ if ($clone(v, protoreflect.Value).IsValid()) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($clone(v, protoreflect.Value).IsValid()) { */ case 11: - _r$2 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = unmarshalDefault(_r$2, fd.L1.Kind, file, fd.L1.Enum); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - defaultValue.copy(fd.L1.Default, _r$3); - /* } */ case 12: - _i$1++; - $s = 3; continue; - case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: File.ptr.prototype.resolveMessages, $c: true, $r, _1, _i, _i$1, _r, _r$1, _r$2, _r$3, _ref, _ref$1, depIdx, fd, file, i, j, md, v, x, x$1, $s};return $f; - }; - File.prototype.resolveMessages = function() { return this.$val.resolveMessages(); }; - File.ptr.prototype.resolveExtensions = function() { - var {_1, _i, _r, _r$1, _r$2, _r$3, _ref, depIdx, file, i, v, x, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - file = this; - depIdx = 0; - _ref = file.fileRaw.allExtensions; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - xd = (x = file.fileRaw.allExtensions, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - _1 = xd.L1.Kind; - /* */ if (_1 === (14)) { $s = 4; continue; } - /* */ if ((_1 === (11)) || (_1 === (10))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (14)) { */ case 4: - _r = file.resolveEnumDependency(xd.L2.Enum, 2, depIdx); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - xd.L2.Enum = _r; - depIdx = depIdx + (1) >> 0; - $s = 6; continue; - /* } else if ((_1 === (11)) || (_1 === (10))) { */ case 5: - _r$1 = file.resolveMessageDependency(xd.L2.Message, 2, depIdx); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - xd.L2.Message = _r$1; - depIdx = depIdx + (1) >> 0; - /* } */ case 6: - case 3: - v = $clone(xd.L2.Default.val, protoreflect.Value); - /* */ if ($clone(v, protoreflect.Value).IsValid()) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($clone(v, protoreflect.Value).IsValid()) { */ case 9: - _r$2 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = unmarshalDefault(_r$2, xd.L1.Kind, file, xd.L2.Enum); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - defaultValue.copy(xd.L2.Default, _r$3); - /* } */ case 10: - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: File.ptr.prototype.resolveExtensions, $c: true, $r, _1, _i, _r, _r$1, _r$2, _r$3, _ref, depIdx, file, i, v, x, xd, $s};return $f; - }; - File.prototype.resolveExtensions = function() { return this.$val.resolveExtensions(); }; - File.ptr.prototype.resolveServices = function() { - var {_i, _i$1, _r, _r$1, _ref, _ref$1, depIdx, file, i, j, md, sd, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - file = this; - depIdx = 0; - _ref = file.fileRaw.allServices; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - sd = (x = file.fileRaw.allServices, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - _ref$1 = sd.L2.Methods.List; - _i$1 = 0; - /* while (true) { */ case 3: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 4; continue; } - j = _i$1; - md = (x$1 = sd.L2.Methods.List, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])); - _r = file.resolveMessageDependency(md.L1.Input, 3, depIdx); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - md.L1.Input = _r; - _r$1 = file.resolveMessageDependency(md.L1.Output, 4, depIdx); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - md.L1.Output = _r$1; - depIdx = depIdx + (1) >> 0; - _i$1++; - $s = 3; continue; - case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: File.ptr.prototype.resolveServices, $c: true, $r, _i, _i$1, _r, _r$1, _ref, _ref$1, depIdx, file, i, j, md, sd, x, x$1, $s};return $f; - }; - File.prototype.resolveServices = function() { return this.$val.resolveServices(); }; - File.ptr.prototype.resolveEnumDependency = function(ed, i, j) { - var {_i, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, d, ed, ed2, ed2$1, file, i, i$1, j, ok, r, r$1, x, $s, $r, $c} = $restore(this, {ed, i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - file = this; - r = file.fileRaw.builder.FileRegistry; - _tuple = $assertType(r, resolverByIndex, true); - r$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = r$1.FindEnumByIndex(i, j, file.fileRaw.allEnums, file.fileRaw.allMessages); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ed2 = _r; - if (!($interfaceIsEqual(ed2, $ifaceNil))) { - $s = -1; return ed2; - } - /* } */ case 2: - _ref = file.fileRaw.allEnums; - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - i$1 = _i; - ed2$1 = (x = file.fileRaw.allEnums, ((i$1 < 0 || i$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$1])); - _r$1 = ed.FullName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (ed2$1.Base.L0.FullName === _r$1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (ed2$1.Base.L0.FullName === _r$1) { */ case 6: - $s = -1; return ed2$1; - /* } */ case 7: - _i++; - $s = 4; continue; - case 5: - _r$2 = ed.FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = r.FindDescriptorByName(_r$2); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - d = _tuple$1[0]; - if (!($interfaceIsEqual(d, $ifaceNil))) { - $s = -1; return $assertType(d, protoreflect.EnumDescriptor); - } - $s = -1; return ed; - /* */ } return; } var $f = {$blk: File.ptr.prototype.resolveEnumDependency, $c: true, $r, _i, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, d, ed, ed2, ed2$1, file, i, i$1, j, ok, r, r$1, x, $s};return $f; - }; - File.prototype.resolveEnumDependency = function(ed, i, j) { return this.$val.resolveEnumDependency(ed, i, j); }; - File.ptr.prototype.resolveMessageDependency = function(md, i, j) { - var {_i, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, d, file, i, i$1, j, md, md2, md2$1, ok, r, r$1, x, $s, $r, $c} = $restore(this, {md, i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - file = this; - r = file.fileRaw.builder.FileRegistry; - _tuple = $assertType(r, resolverByIndex, true); - r$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = r$1.FindMessageByIndex(i, j, file.fileRaw.allEnums, file.fileRaw.allMessages); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - md2 = _r; - if (!($interfaceIsEqual(md2, $ifaceNil))) { - $s = -1; return md2; - } - /* } */ case 2: - _ref = file.fileRaw.allMessages; - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - i$1 = _i; - md2$1 = (x = file.fileRaw.allMessages, ((i$1 < 0 || i$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$1])); - _r$1 = md.FullName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (md2$1.Base.L0.FullName === _r$1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (md2$1.Base.L0.FullName === _r$1) { */ case 6: - $s = -1; return md2$1; - /* } */ case 7: - _i++; - $s = 4; continue; - case 5: - _r$2 = md.FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = r.FindDescriptorByName(_r$2); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - d = _tuple$1[0]; - if (!($interfaceIsEqual(d, $ifaceNil))) { - $s = -1; return $assertType(d, protoreflect.MessageDescriptor); - } - $s = -1; return md; - /* */ } return; } var $f = {$blk: File.ptr.prototype.resolveMessageDependency, $c: true, $r, _i, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, d, file, i, i$1, j, md, md2, md2$1, ok, r, r$1, x, $s};return $f; - }; - File.prototype.resolveMessageDependency = function(md, i, j) { return this.$val.resolveMessageDependency(md, i, j); }; - File.ptr.prototype.unmarshalFull = function(b) { - var {_1, _2, _3, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, b, enumIdx, extensionIdx, fd, imp, m, m$1, m$2, messageIdx, n, num, path, rawOptions, sb, serviceIdx, typ, v, v$1, x, x$1, x$2, x$3, x$4, x$5, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = getBuilder(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - sb = _r; - $deferred.push([putBuilder, [sb]]); - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = 0; - enumIdx = _tmp; - messageIdx = _tmp$1; - extensionIdx = _tmp$2; - serviceIdx = _tmp$3; - rawOptions = sliceType$13.nil; - fd.L2 = new FileL2.ptr($throwNilPointerError, FileImports.nil, new SourceLocations.ptr(sliceType$4.nil, $ifaceNil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false)); - /* while (true) { */ case 2: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 3; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (0)) { $s = 5; continue; } - /* */ if (_1 === (2)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (0)) { */ case 5: - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (10)) { - (x = fd.L2.Imports, (($flatten64(v) < 0 || $flatten64(v) >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + $flatten64(v)])).IsPublic = true; - } else if (_2 === (11)) { - (x$1 = fd.L2.Imports, (($flatten64(v) < 0 || $flatten64(v) >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + $flatten64(v)])).IsWeak = true; - } - $s = 8; continue; - /* } else if (_1 === (2)) { */ case 6: - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - /* */ if (_3 === (3)) { $s = 10; continue; } - /* */ if (_3 === (5)) { $s = 11; continue; } - /* */ if (_3 === (4)) { $s = 12; continue; } - /* */ if (_3 === (7)) { $s = 13; continue; } - /* */ if (_3 === (6)) { $s = 14; continue; } - /* */ if (_3 === (8)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_3 === (3)) { */ case 10: - path = sb.MakeString(v$1); - _r$1 = fd.fileRaw.builder.FileRegistry.FindFileByPath(path); /* */ $s = 17; case 17: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$3 = _r$1; - imp = _tuple$3[0]; - if ($interfaceIsEqual(imp, $ifaceNil)) { - imp = new PlaceholderFile((path)); - } - fd.L2.Imports = $append(fd.L2.Imports, new protoreflect.FileImport.ptr(imp, false, false)); - $s = 16; continue; - /* } else if (_3 === (5)) { */ case 11: - $r = (x$2 = fd.L1.Enums.List, ((enumIdx < 0 || enumIdx >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + enumIdx])).unmarshalFull(v$1, sb); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - enumIdx = enumIdx + (1) >> 0; - $s = 16; continue; - /* } else if (_3 === (4)) { */ case 12: - $r = (x$3 = fd.L1.Messages.List, ((messageIdx < 0 || messageIdx >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + messageIdx])).unmarshalFull(v$1, sb); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - messageIdx = messageIdx + (1) >> 0; - $s = 16; continue; - /* } else if (_3 === (7)) { */ case 13: - (x$4 = fd.L1.Extensions.List, ((extensionIdx < 0 || extensionIdx >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + extensionIdx])).unmarshalFull(v$1, sb); - extensionIdx = extensionIdx + (1) >> 0; - $s = 16; continue; - /* } else if (_3 === (6)) { */ case 14: - $r = (x$5 = fd.L1.Services.List, ((serviceIdx < 0 || serviceIdx >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + serviceIdx])).unmarshalFull(v$1, sb); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - serviceIdx = serviceIdx + (1) >> 0; - $s = 16; continue; - /* } else if (_3 === (8)) { */ case 15: - rawOptions = appendOptions(rawOptions, v$1); - /* } */ case 16: - case 9: - $s = 8; continue; - /* } else { */ case 7: - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - /* } */ case 8: - case 4: - $s = 2; continue; - case 3: - fd.L2.Options = fd.fileRaw.builder.optionsUnmarshaler((descopts.File$ptr || (descopts.File$ptr = new ptrType$10(function() { return descopts.File; }, function($v) { descopts.File = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: File.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _3, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, b, enumIdx, extensionIdx, fd, imp, m, m$1, m$2, messageIdx, n, num, path, rawOptions, sb, serviceIdx, typ, v, v$1, x, x$1, x$2, x$3, x$4, x$5, $s, $deferred};return $f; } } - }; - File.prototype.unmarshalFull = function(b) { return this.$val.unmarshalFull(b); }; - Enum.ptr.prototype.unmarshalFull = function(b, sb) { - var {_1, _2, _i, _ref, _tuple, _tuple$1, b, b$1, ed, i, m, m$1, n, num, rawOptions, rawValues, sb, typ, v, x, $s, $r, $c} = $restore(this, {b, sb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - rawValues = sliceType$17.nil; - rawOptions = sliceType$13.nil; - if (!ed.L1.eagerValues) { - ed.L2 = new EnumL2.ptr($throwNilPointerError, new EnumValues.ptr(sliceType$9.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false), new Names.ptr(sliceType.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new EnumRanges.ptr(sliceType$1.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$1.nil)); - } - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (2)) { - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (2)) { - rawValues = $append(rawValues, v); - } else if (_2 === (5)) { - ed.L2.ReservedNames.List = $append(ed.L2.ReservedNames.List, (sb.MakeString(v))); - } else if (_2 === (4)) { - ed.L2.ReservedRanges.List = $append(ed.L2.ReservedRanges.List, unmarshalEnumReservedRange(v)); - } else if (_2 === (3)) { - rawOptions = appendOptions(rawOptions, v); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - /* */ if (!ed.L1.eagerValues && rawValues.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ed.L1.eagerValues && rawValues.$length > 0) { */ case 1: - ed.L2.Values.List = $makeSlice(sliceType$9, rawValues.$length); - _ref = rawValues; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - i = _i; - b$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = (x = ed.L2.Values.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).unmarshalFull(b$1, sb, ed.Base.L0.ParentFile, ed, i); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 3; continue; - case 4: - /* } */ case 2: - ed.L2.Options = ed.Base.L0.ParentFile.fileRaw.builder.optionsUnmarshaler((descopts.Enum$ptr || (descopts.Enum$ptr = new ptrType$10(function() { return descopts.Enum; }, function($v) { descopts.Enum = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _i, _ref, _tuple, _tuple$1, b, b$1, ed, i, m, m$1, n, num, rawOptions, rawValues, sb, typ, v, x, $s};return $f; - }; - Enum.prototype.unmarshalFull = function(b, sb) { return this.$val.unmarshalFull(b, sb); }; - unmarshalEnumReservedRange = function(b) { - var _1, _2, _tuple, _tuple$1, b, m, m$1, n, num, r, typ, v; - r = arrayType.zero(); - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (1)) { - r[0] = ((v.$low >> 0)); - } else if (_2 === (2)) { - r[1] = ((v.$low >> 0)); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - arrayType.copy(r, r); - return r; - }; - EnumValue.ptr.prototype.unmarshalFull = function(b, sb, pf, pd, i) { - var {_1, _2, _3, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, i, m, m$1, m$2, n, num, pd, pf, rawOptions, sb, typ, v, v$1, vd, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vd = this; - vd.Base.L0.ParentFile = pf; - vd.Base.L0.Parent = pd; - vd.Base.L0.Index = i; - rawOptions = sliceType$13.nil; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (0)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (0)) { */ case 4: - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (2)) { - vd.L1.Number = ((v.$low >> 0)); - } - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 5: - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - /* */ if (_3 === (1)) { $s = 9; continue; } - /* */ if (_3 === (3)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_3 === (1)) { */ case 9: - _arg = sb; - _r = pd.Parent(); /* */ $s = 12; case 12: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.FullName(); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - _arg$2 = v$1; - _r$2 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - vd.Base.L0.FullName = _r$2; - $s = 11; continue; - /* } else if (_3 === (3)) { */ case 10: - rawOptions = appendOptions(rawOptions, v$1); - /* } */ case 11: - case 8: - $s = 7; continue; - /* } else { */ case 6: - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - /* } */ case 7: - case 3: - $s = 1; continue; - case 2: - vd.L1.Options = pf.fileRaw.builder.optionsUnmarshaler((descopts.EnumValue$ptr || (descopts.EnumValue$ptr = new ptrType$10(function() { return descopts.EnumValue; }, function($v) { descopts.EnumValue = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: EnumValue.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _3, _arg, _arg$1, _arg$2, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, i, m, m$1, m$2, n, num, pd, pf, rawOptions, sb, typ, v, v$1, vd, $s};return $f; - }; - EnumValue.prototype.unmarshalFull = function(b, sb, pf, pd, i) { return this.$val.unmarshalFull(b, sb, pf, pd, i); }; - Message.ptr.prototype.unmarshalFull = function(b, sb) { - var {_1, _2, _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, _tuple$1, _tuple$2, b, b$1, b$2, enumIdx, extensionIdx, fd, i, i$1, m, m$1, md, messageIdx, n, num, od, opts, r, rawFields, rawOneofs, rawOptions, rawOptions$1, sb, typ, v, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {b, sb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _tmp = sliceType$17.nil; - _tmp$1 = sliceType$17.nil; - rawFields = _tmp; - rawOneofs = _tmp$1; - _tmp$2 = 0; - _tmp$3 = 0; - _tmp$4 = 0; - enumIdx = _tmp$2; - messageIdx = _tmp$3; - extensionIdx = _tmp$4; - rawOptions = sliceType$13.nil; - md.L2 = new MessageL2.ptr($throwNilPointerError, new Fields.ptr(sliceType$6.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false), new Oneofs.ptr(sliceType$7.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Names.ptr(sliceType.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new FieldRanges.ptr(sliceType$2.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$2.nil), new FieldNumbers.ptr(sliceType$3.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new FieldRanges.ptr(sliceType$2.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$2.nil), sliceType$18.nil); - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (2)) { */ case 4: - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - /* */ if (_2 === (2)) { $s = 8; continue; } - /* */ if (_2 === (8)) { $s = 9; continue; } - /* */ if (_2 === (10)) { $s = 10; continue; } - /* */ if (_2 === (9)) { $s = 11; continue; } - /* */ if (_2 === (5)) { $s = 12; continue; } - /* */ if (_2 === (4)) { $s = 13; continue; } - /* */ if (_2 === (3)) { $s = 14; continue; } - /* */ if (_2 === (6)) { $s = 15; continue; } - /* */ if (_2 === (7)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_2 === (2)) { */ case 8: - rawFields = $append(rawFields, v); - $s = 17; continue; - /* } else if (_2 === (8)) { */ case 9: - rawOneofs = $append(rawOneofs, v); - $s = 17; continue; - /* } else if (_2 === (10)) { */ case 10: - md.L2.ReservedNames.List = $append(md.L2.ReservedNames.List, (sb.MakeString(v))); - $s = 17; continue; - /* } else if (_2 === (9)) { */ case 11: - md.L2.ReservedRanges.List = $append(md.L2.ReservedRanges.List, unmarshalMessageReservedRange(v)); - $s = 17; continue; - /* } else if (_2 === (5)) { */ case 12: - _tuple$2 = unmarshalMessageExtensionRange(v); - r = $clone(_tuple$2[0], arrayType$1); - rawOptions$1 = _tuple$2[1]; - opts = md.Base.L0.ParentFile.fileRaw.builder.optionsUnmarshaler((descopts.ExtensionRange$ptr || (descopts.ExtensionRange$ptr = new ptrType$10(function() { return descopts.ExtensionRange; }, function($v) { descopts.ExtensionRange = $v; }))), rawOptions$1); - md.L2.ExtensionRanges.List = $append(md.L2.ExtensionRanges.List, r); - md.L2.ExtensionRangeOptions = $append(md.L2.ExtensionRangeOptions, opts); - $s = 17; continue; - /* } else if (_2 === (4)) { */ case 13: - $r = (x = md.L1.Enums.List, ((enumIdx < 0 || enumIdx >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + enumIdx])).unmarshalFull(v, sb); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - enumIdx = enumIdx + (1) >> 0; - $s = 17; continue; - /* } else if (_2 === (3)) { */ case 14: - $r = (x$1 = md.L1.Messages.List, ((messageIdx < 0 || messageIdx >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + messageIdx])).unmarshalFull(v, sb); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - messageIdx = messageIdx + (1) >> 0; - $s = 17; continue; - /* } else if (_2 === (6)) { */ case 15: - (x$2 = md.L1.Extensions.List, ((extensionIdx < 0 || extensionIdx >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + extensionIdx])).unmarshalFull(v, sb); - extensionIdx = extensionIdx + (1) >> 0; - $s = 17; continue; - /* } else if (_2 === (7)) { */ case 16: - md.unmarshalOptions(v); - rawOptions = appendOptions(rawOptions, v); - /* } */ case 17: - case 7: - $s = 6; continue; - /* } else { */ case 5: - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - /* } */ case 6: - case 3: - $s = 1; continue; - case 2: - /* */ if (rawFields.$length > 0 || rawOneofs.$length > 0) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (rawFields.$length > 0 || rawOneofs.$length > 0) { */ case 20: - md.L2.Fields.List = $makeSlice(sliceType$6, rawFields.$length); - md.L2.Oneofs.List = $makeSlice(sliceType$7, rawOneofs.$length); - _ref = rawFields; - _i = 0; - /* while (true) { */ case 22: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 23; continue; } - i = _i; - b$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - fd = (x$3 = md.L2.Fields.List, ((i < 0 || i >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i])); - $r = fd.unmarshalFull(b$1, sb, md.Base.L0.ParentFile, md, i); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (fd.L1.Cardinality === 2) { - md.L2.RequiredNumbers.List = $append(md.L2.RequiredNumbers.List, fd.L1.Number); - } - _i++; - $s = 22; continue; - case 23: - _ref$1 = rawOneofs; - _i$1 = 0; - /* while (true) { */ case 25: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 26; continue; } - i$1 = _i$1; - b$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - od = (x$4 = md.L2.Oneofs.List, ((i$1 < 0 || i$1 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i$1])); - $r = od.unmarshalFull(b$2, sb, md.Base.L0.ParentFile, md, i$1); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 25; continue; - case 26: - /* } */ case 21: - md.L2.Options = md.Base.L0.ParentFile.fileRaw.builder.optionsUnmarshaler((descopts.Message$ptr || (descopts.Message$ptr = new ptrType$10(function() { return descopts.Message; }, function($v) { descopts.Message = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, _tuple$1, _tuple$2, b, b$1, b$2, enumIdx, extensionIdx, fd, i, i$1, m, m$1, md, messageIdx, n, num, od, opts, r, rawFields, rawOneofs, rawOptions, rawOptions$1, sb, typ, v, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - Message.prototype.unmarshalFull = function(b, sb) { return this.$val.unmarshalFull(b, sb); }; - Message.ptr.prototype.unmarshalOptions = function(b) { - var _1, _2, _tuple, _tuple$1, b, m, m$1, md, n, num, typ, v; - md = this; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (7)) { - md.L1.IsMapEntry = protowire.DecodeBool(v); - } else if (_2 === (1)) { - md.L1.IsMessageSet = protowire.DecodeBool(v); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - }; - Message.prototype.unmarshalOptions = function(b) { return this.$val.unmarshalOptions(b); }; - unmarshalMessageReservedRange = function(b) { - var _1, _2, _tuple, _tuple$1, b, m, m$1, n, num, r, typ, v; - r = arrayType$1.zero(); - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (1)) { - r[0] = ((v.$low >> 0)); - } else if (_2 === (2)) { - r[1] = ((v.$low >> 0)); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - arrayType$1.copy(r, r); - return r; - }; - unmarshalMessageExtensionRange = function(b) { - var _1, _2, _3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, m, m$1, m$2, n, num, r, rawOptions, typ, v, v$1; - r = arrayType$1.zero(); - rawOptions = sliceType$13.nil; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (1)) { - r[0] = ((v.$low >> 0)); - } else if (_2 === (2)) { - r[1] = ((v.$low >> 0)); - } - } else if (_1 === (2)) { - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - if (_3 === (3)) { - rawOptions = appendOptions(rawOptions, v$1); - } - } else { - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - } - } - _tmp = $clone(r, arrayType$1); - _tmp$1 = rawOptions; - arrayType$1.copy(r, _tmp); - rawOptions = _tmp$1; - return [r, rawOptions]; - }; - Field.ptr.prototype.unmarshalFull = function(b, sb, pf, pd, i) { - var {_1, _2, _3, _4, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, fd, i, m, m$1, m$2, n, name, num, od, pd, pf, rawOptions, rawTypeName, sb, typ, v, v$1, x, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - fd.Base.L0.ParentFile = pf; - fd.Base.L0.Parent = pd; - fd.Base.L0.Index = i; - rawTypeName = sliceType$13.nil; - rawOptions = sliceType$13.nil; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (0)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (0)) { */ case 4: - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (3)) { - fd.L1.Number = ((v.$low >> 0)); - } else if (_2 === (4)) { - fd.L1.Cardinality = ((v.$low << 24 >> 24)); - } else if (_2 === (5)) { - fd.L1.Kind = ((v.$low << 24 >> 24)); - } else if (_2 === (9)) { - od = (x = $assertType(pd, ptrType$4).L2.Oneofs.List, (($flatten64(v) < 0 || $flatten64(v) >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + $flatten64(v)])); - od.L1.Fields.List = $append(od.L1.Fields.List, fd); - if (!($interfaceIsEqual(fd.L1.ContainingOneof, $ifaceNil))) { - $panic(new $String("oneof type already set")); - } - fd.L1.ContainingOneof = od; - } else if (_2 === (17)) { - fd.L1.IsProto3Optional = protowire.DecodeBool(v); - } - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 5: - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - /* */ if (_3 === (1)) { $s = 9; continue; } - /* */ if (_3 === (10)) { $s = 10; continue; } - /* */ if (_3 === (7)) { $s = 11; continue; } - /* */ if (_3 === (6)) { $s = 12; continue; } - /* */ if (_3 === (8)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_3 === (1)) { */ case 9: - _arg = sb; - _r = pd.FullName(); /* */ $s = 15; case 15: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v$1; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 16; case 16: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - fd.Base.L0.FullName = _r$1; - $s = 14; continue; - /* } else if (_3 === (10)) { */ case 10: - fd.L1.StringName.InitJSON(sb.MakeString(v$1)); - $s = 14; continue; - /* } else if (_3 === (7)) { */ case 11: - protoreflect.Value.copy(fd.L1.Default.val, protoreflect.ValueOfBytes(v$1)); - $s = 14; continue; - /* } else if (_3 === (6)) { */ case 12: - rawTypeName = v$1; - $s = 14; continue; - /* } else if (_3 === (8)) { */ case 13: - fd.unmarshalOptions(v$1); - rawOptions = appendOptions(rawOptions, v$1); - /* } */ case 14: - case 8: - $s = 7; continue; - /* } else { */ case 6: - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - /* } */ case 7: - case 3: - $s = 1; continue; - case 2: - if (!(rawTypeName === sliceType$13.nil)) { - name = makeFullName(sb, rawTypeName); - _4 = fd.L1.Kind; - if (_4 === (14)) { - fd.L1.Enum = new PlaceholderEnum((name)); - } else if ((_4 === (11)) || (_4 === (10))) { - fd.L1.Message = new PlaceholderMessage((name)); - } - } - fd.L1.Options = pf.fileRaw.builder.optionsUnmarshaler((descopts.Field$ptr || (descopts.Field$ptr = new ptrType$10(function() { return descopts.Field; }, function($v) { descopts.Field = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _3, _4, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, fd, i, m, m$1, m$2, n, name, num, od, pd, pf, rawOptions, rawTypeName, sb, typ, v, v$1, x, $s};return $f; - }; - Field.prototype.unmarshalFull = function(b, sb, pf, pd, i) { return this.$val.unmarshalFull(b, sb, pf, pd, i); }; - Field.ptr.prototype.unmarshalOptions = function(b) { - var _1, _2, _tuple, _tuple$1, b, fd, m, m$1, n, num, typ, v; - fd = this; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (2)) { - fd.L1.HasPacked = true; - fd.L1.IsPacked = protowire.DecodeBool(v); - } else if (_2 === (10)) { - fd.L1.IsWeak = protowire.DecodeBool(v); - } else if (_2 === (13)) { - fd.L1.HasEnforceUTF8 = true; - fd.L1.EnforceUTF8 = protowire.DecodeBool(v); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - }; - Field.prototype.unmarshalOptions = function(b) { return this.$val.unmarshalOptions(b); }; - Oneof.ptr.prototype.unmarshalFull = function(b, sb, pf, pd, i) { - var {_1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, b, i, m, m$1, n, num, od, pd, pf, rawOptions, sb, typ, v, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - od = this; - od.Base.L0.ParentFile = pf; - od.Base.L0.Parent = pd; - od.Base.L0.Index = i; - rawOptions = sliceType$13.nil; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (2)) { */ case 4: - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - /* */ if (_2 === (1)) { $s = 8; continue; } - /* */ if (_2 === (2)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_2 === (1)) { */ case 8: - _arg = sb; - _r = pd.FullName(); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - od.Base.L0.FullName = _r$1; - $s = 10; continue; - /* } else if (_2 === (2)) { */ case 9: - rawOptions = appendOptions(rawOptions, v); - /* } */ case 10: - case 7: - $s = 6; continue; - /* } else { */ case 5: - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - /* } */ case 6: - case 3: - $s = 1; continue; - case 2: - od.L1.Options = pf.fileRaw.builder.optionsUnmarshaler((descopts.Oneof$ptr || (descopts.Oneof$ptr = new ptrType$10(function() { return descopts.Oneof; }, function($v) { descopts.Oneof = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: Oneof.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, b, i, m, m$1, n, num, od, pd, pf, rawOptions, sb, typ, v, $s};return $f; - }; - Oneof.prototype.unmarshalFull = function(b, sb, pf, pd, i) { return this.$val.unmarshalFull(b, sb, pf, pd, i); }; - Extension.ptr.prototype.unmarshalFull = function(b, sb) { - var _1, _2, _3, _4, _tuple, _tuple$1, _tuple$2, b, m, m$1, m$2, n, name, num, rawOptions, rawTypeName, sb, typ, v, v$1, xd; - xd = this; - rawTypeName = sliceType$13.nil; - rawOptions = sliceType$13.nil; - xd.L2 = new ExtensionL2.ptr($throwNilPointerError, new stringName.ptr(false, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), "", ""), false, false, new defaultValue.ptr(false, new protoreflect.Value.ptr(arrayType$4.zero(), 0, new $Uint64(0, 0), "", sliceType$13.nil, $ifaceNil), $ifaceNil, sliceType$13.nil), $ifaceNil, $ifaceNil); - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (17)) { - xd.L2.IsProto3Optional = protowire.DecodeBool(v); - } - } else if (_1 === (2)) { - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - if (_3 === (10)) { - xd.L2.StringName.InitJSON(sb.MakeString(v$1)); - } else if (_3 === (7)) { - protoreflect.Value.copy(xd.L2.Default.val, protoreflect.ValueOfBytes(v$1)); - } else if (_3 === (6)) { - rawTypeName = v$1; - } else if (_3 === (8)) { - xd.unmarshalOptions(v$1); - rawOptions = appendOptions(rawOptions, v$1); - } - } else { - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - } - } - if (!(rawTypeName === sliceType$13.nil)) { - name = makeFullName(sb, rawTypeName); - _4 = xd.L1.Kind; - if (_4 === (14)) { - xd.L2.Enum = new PlaceholderEnum((name)); - } else if ((_4 === (11)) || (_4 === (10))) { - xd.L2.Message = new PlaceholderMessage((name)); - } - } - xd.L2.Options = xd.Base.L0.ParentFile.fileRaw.builder.optionsUnmarshaler((descopts.Field$ptr || (descopts.Field$ptr = new ptrType$10(function() { return descopts.Field; }, function($v) { descopts.Field = $v; }))), rawOptions); - }; - Extension.prototype.unmarshalFull = function(b, sb) { return this.$val.unmarshalFull(b, sb); }; - Extension.ptr.prototype.unmarshalOptions = function(b) { - var _1, _2, _tuple, _tuple$1, b, m, m$1, n, num, typ, v, xd; - xd = this; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (2)) { - xd.L2.IsPacked = protowire.DecodeBool(v); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - }; - Extension.prototype.unmarshalOptions = function(b) { return this.$val.unmarshalOptions(b); }; - Service.ptr.prototype.unmarshalFull = function(b, sb) { - var {_1, _2, _i, _ref, _tuple, _tuple$1, b, b$1, i, m, m$1, n, num, rawMethods, rawOptions, sb, sd, typ, v, x, $s, $r, $c} = $restore(this, {b, sb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - rawMethods = sliceType$17.nil; - rawOptions = sliceType$13.nil; - sd.L2 = new ServiceL2.ptr($throwNilPointerError, new Methods.ptr(sliceType$19.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false)); - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (2)) { - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (2)) { - rawMethods = $append(rawMethods, v); - } else if (_2 === (3)) { - rawOptions = appendOptions(rawOptions, v); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - /* */ if (rawMethods.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (rawMethods.$length > 0) { */ case 1: - sd.L2.Methods.List = $makeSlice(sliceType$19, rawMethods.$length); - _ref = rawMethods; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - i = _i; - b$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = (x = sd.L2.Methods.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).unmarshalFull(b$1, sb, sd.Base.L0.ParentFile, sd, i); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 3; continue; - case 4: - /* } */ case 2: - sd.L2.Options = sd.Base.L0.ParentFile.fileRaw.builder.optionsUnmarshaler((descopts.Service$ptr || (descopts.Service$ptr = new ptrType$10(function() { return descopts.Service; }, function($v) { descopts.Service = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: Service.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _i, _ref, _tuple, _tuple$1, b, b$1, i, m, m$1, n, num, rawMethods, rawOptions, sb, sd, typ, v, x, $s};return $f; - }; - Service.prototype.unmarshalFull = function(b, sb) { return this.$val.unmarshalFull(b, sb); }; - Method.ptr.prototype.unmarshalFull = function(b, sb, pf, pd, i) { - var {_1, _2, _3, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, i, m, m$1, m$2, md, n, num, pd, pf, rawOptions, sb, typ, v, v$1, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - md.Base.L0.ParentFile = pf; - md.Base.L0.Parent = pd; - md.Base.L0.Index = i; - rawOptions = sliceType$13.nil; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (0)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (0)) { */ case 4: - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (5)) { - md.L1.IsStreamingClient = protowire.DecodeBool(v); - } else if (_2 === (6)) { - md.L1.IsStreamingServer = protowire.DecodeBool(v); - } - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 5: - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - /* */ if (_3 === (1)) { $s = 9; continue; } - /* */ if (_3 === (2)) { $s = 10; continue; } - /* */ if (_3 === (3)) { $s = 11; continue; } - /* */ if (_3 === (4)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_3 === (1)) { */ case 9: - _arg = sb; - _r = pd.FullName(); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v$1; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - md.Base.L0.FullName = _r$1; - $s = 13; continue; - /* } else if (_3 === (2)) { */ case 10: - md.L1.Input = new PlaceholderMessage((makeFullName(sb, v$1))); - $s = 13; continue; - /* } else if (_3 === (3)) { */ case 11: - md.L1.Output = new PlaceholderMessage((makeFullName(sb, v$1))); - $s = 13; continue; - /* } else if (_3 === (4)) { */ case 12: - rawOptions = appendOptions(rawOptions, v$1); - /* } */ case 13: - case 8: - $s = 7; continue; - /* } else { */ case 6: - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - /* } */ case 7: - case 3: - $s = 1; continue; - case 2: - md.L1.Options = pf.fileRaw.builder.optionsUnmarshaler((descopts.Method$ptr || (descopts.Method$ptr = new ptrType$10(function() { return descopts.Method; }, function($v) { descopts.Method = $v; }))), rawOptions); - $s = -1; return; - /* */ } return; } var $f = {$blk: Method.ptr.prototype.unmarshalFull, $c: true, $r, _1, _2, _3, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, i, m, m$1, m$2, md, n, num, pd, pf, rawOptions, sb, typ, v, v$1, $s};return $f; - }; - Method.prototype.unmarshalFull = function(b, sb, pf, pd, i) { return this.$val.unmarshalFull(b, sb, pf, pd, i); }; - appendOptions = function(dst, src) { - var dst, src; - if (dst === sliceType$13.nil) { - dst = new sliceType$13([]); - } - return $appendSlice(dst, src); - }; - Builder.ptr.prototype.optionsUnmarshaler = function(p, b) { - var b, db, once, opts, p; - db = this; - if (b === sliceType$13.nil) { - return $throwNilPointerError; - } - opts = $ifaceNil; - once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - return (function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = once.Do((function $b() { - var {_r, _r$1, _r$2, _r$3, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(p.$get(), $ifaceNil)) { - $panic(new $String("Descriptor.Options called without importing the descriptor package")); - } - _r = reflect.TypeOf(p.$get()).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = reflect.New(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - opts = $assertType(_r$2, protoreflect.ProtoMessage); - _r$3 = $clone((new proto.UnmarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), false, true, false, db.TypeResolver, 0)), proto.UnmarshalOptions).Unmarshal(b, opts); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, _r$1, _r$2, _r$3, err, $s};return $f; - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return opts; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }); - }; - Builder.prototype.optionsUnmarshaler = function(p, b) { return this.$val.optionsUnmarshaler(p, b); }; - newRawFile = function(db) { - var {_i, _r, _ref, db, fd, i, x, xd, $s, $r, $c} = $restore(this, {db}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = new File.ptr(new fileRaw.ptr($clone(db, Builder), sliceType$8.nil, sliceType$5.nil, sliceType$10.nil, sliceType$11.nil), new FileL1.ptr(0, "", "", new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Services.ptr(sliceType$11.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false)), 0, new sync.Mutex.ptr(0, 0), ptrType$1.nil); - fd.initDecls(db.NumEnums, db.NumMessages, db.NumExtensions, db.NumServices); - $r = fd.unmarshalSeed(db.RawDescriptor); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = fd.fileRaw.allExtensions; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - i = _i; - xd = (x = fd.fileRaw.allExtensions, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - _r = fd.resolveMessageDependency(xd.L1.Extendee, 1, ((i >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - xd.L1.Extendee = _r; - _i++; - $s = 2; continue; - case 3: - fd.checkDecls(); - $s = -1; return fd; - /* */ } return; } var $f = {$blk: newRawFile, $c: true, $r, _i, _r, _ref, db, fd, i, x, xd, $s};return $f; - }; - File.ptr.prototype.initDecls = function(numEnums, numMessages, numExtensions, numServices) { - var fd, numEnums, numExtensions, numMessages, numServices; - fd = this; - fd.fileRaw.allEnums = $makeSlice(sliceType$8, 0, numEnums); - fd.fileRaw.allMessages = $makeSlice(sliceType$5, 0, numMessages); - fd.fileRaw.allExtensions = $makeSlice(sliceType$10, 0, numExtensions); - fd.fileRaw.allServices = $makeSlice(sliceType$11, 0, numServices); - }; - File.prototype.initDecls = function(numEnums, numMessages, numExtensions, numServices) { return this.$val.initDecls(numEnums, numMessages, numExtensions, numServices); }; - File.ptr.prototype.allocEnums = function(n) { - var es, fd, n, total; - fd = this; - total = fd.fileRaw.allEnums.$length; - es = $subslice(fd.fileRaw.allEnums, total, (total + n >> 0)); - fd.fileRaw.allEnums = $subslice(fd.fileRaw.allEnums, 0, (total + n >> 0)); - return es; - }; - File.prototype.allocEnums = function(n) { return this.$val.allocEnums(n); }; - File.ptr.prototype.allocMessages = function(n) { - var fd, ms, n, total; - fd = this; - total = fd.fileRaw.allMessages.$length; - ms = $subslice(fd.fileRaw.allMessages, total, (total + n >> 0)); - fd.fileRaw.allMessages = $subslice(fd.fileRaw.allMessages, 0, (total + n >> 0)); - return ms; - }; - File.prototype.allocMessages = function(n) { return this.$val.allocMessages(n); }; - File.ptr.prototype.allocExtensions = function(n) { - var fd, n, total, xs; - fd = this; - total = fd.fileRaw.allExtensions.$length; - xs = $subslice(fd.fileRaw.allExtensions, total, (total + n >> 0)); - fd.fileRaw.allExtensions = $subslice(fd.fileRaw.allExtensions, 0, (total + n >> 0)); - return xs; - }; - File.prototype.allocExtensions = function(n) { return this.$val.allocExtensions(n); }; - File.ptr.prototype.allocServices = function(n) { - var fd, n, total, xs; - fd = this; - total = fd.fileRaw.allServices.$length; - xs = $subslice(fd.fileRaw.allServices, total, (total + n >> 0)); - fd.fileRaw.allServices = $subslice(fd.fileRaw.allServices, 0, (total + n >> 0)); - return xs; - }; - File.prototype.allocServices = function(n) { return this.$val.allocServices(n); }; - File.ptr.prototype.checkDecls = function() { - var fd; - fd = this; - if (!((fd.fileRaw.allEnums.$length === fd.fileRaw.allEnums.$capacity))) { - } else if (!((fd.fileRaw.allMessages.$length === fd.fileRaw.allMessages.$capacity))) { - } else if (!((fd.fileRaw.allExtensions.$length === fd.fileRaw.allExtensions.$capacity))) { - } else if (!((fd.fileRaw.allServices.$length === fd.fileRaw.allServices.$capacity))) { - } else { - return; - } - $panic(new $String("mismatching cardinality")); - }; - File.prototype.checkDecls = function() { return this.$val.checkDecls(); }; - File.ptr.prototype.unmarshalSeed = function(b) { - var {_1, _2, _3, _i, _i$1, _i$2, _i$3, _r, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, b$1, b$2, b$3, b$4, b0, fd, i, i$1, i$2, i$3, m, m$1, m$2, m$3, m$4, m$5, n, n$1, n$2, n$3, n$4, num, numEnums, numExtensions, numMessages, numServices, posEnums, posExtensions, posMessages, posServices, prevField, sb, typ, v, v$1, v$2, v$3, v$4, x, x$1, x$2, x$3, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fd = this; - _r = getBuilder(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - sb = _r; - $deferred.push([putBuilder, [sb]]); - prevField = 0; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = 0; - numEnums = _tmp; - numMessages = _tmp$1; - numExtensions = _tmp$2; - numServices = _tmp$3; - _tmp$4 = 0; - _tmp$5 = 0; - _tmp$6 = 0; - _tmp$7 = 0; - posEnums = _tmp$4; - posMessages = _tmp$5; - posExtensions = _tmp$6; - posServices = _tmp$7; - b0 = b; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (2)) { - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (12)) { - _3 = ($bytesToString(v)); - if (_3 === ("proto2")) { - fd.L1.Syntax = 2; - } else if (_3 === ("proto3")) { - fd.L1.Syntax = 3; - } else { - $panic(new $String("invalid syntax")); - } - } else if (_2 === (1)) { - fd.L1.Path = sb.MakeString(v); - } else if (_2 === (2)) { - fd.L1.Package = (sb.MakeString(v)); - } else if (_2 === (5)) { - if (!((prevField === 5))) { - if (numEnums > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posEnums = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numEnums = numEnums + (1) >> 0; - } else if (_2 === (4)) { - if (!((prevField === 4))) { - if (numMessages > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posMessages = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numMessages = numMessages + (1) >> 0; - } else if (_2 === (7)) { - if (!((prevField === 7))) { - if (numExtensions > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posExtensions = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numExtensions = numExtensions + (1) >> 0; - } else if (_2 === (6)) { - if (!((prevField === 6))) { - if (numServices > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posServices = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numServices = numServices + (1) >> 0; - } - prevField = num; - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - prevField = -1; - } - } - if (fd.L1.Syntax === 0) { - fd.L1.Syntax = 2; - } - if (numEnums > 0) { - fd.L1.Enums.List = fd.allocEnums(numEnums); - } - if (numMessages > 0) { - fd.L1.Messages.List = fd.allocMessages(numMessages); - } - if (numExtensions > 0) { - fd.L1.Extensions.List = fd.allocExtensions(numExtensions); - } - if (numServices > 0) { - fd.L1.Services.List = fd.allocServices(numServices); - } - /* */ if (numEnums > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (numEnums > 0) { */ case 2: - b$1 = $subslice(b0, posEnums); - _ref = fd.L1.Enums.List; - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - i = _i; - _tuple$2 = protowire.ConsumeVarint(b$1); - n$1 = _tuple$2[1]; - _tuple$3 = protowire.ConsumeBytes($subslice(b$1, n$1)); - v$1 = _tuple$3[0]; - m$2 = _tuple$3[1]; - $r = (x = fd.L1.Enums.List, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).unmarshalSeed(v$1, sb, fd, fd, i); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, (n$1 + m$2 >> 0)); - _i++; - $s = 4; continue; - case 5: - /* } */ case 3: - /* */ if (numMessages > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (numMessages > 0) { */ case 7: - b$2 = $subslice(b0, posMessages); - _ref$1 = fd.L1.Messages.List; - _i$1 = 0; - /* while (true) { */ case 9: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 10; continue; } - i$1 = _i$1; - _tuple$4 = protowire.ConsumeVarint(b$2); - n$2 = _tuple$4[1]; - _tuple$5 = protowire.ConsumeBytes($subslice(b$2, n$2)); - v$2 = _tuple$5[0]; - m$3 = _tuple$5[1]; - $r = (x$1 = fd.L1.Messages.List, ((i$1 < 0 || i$1 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$1])).unmarshalSeed(v$2, sb, fd, fd, i$1); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$2 = $subslice(b$2, (n$2 + m$3 >> 0)); - _i$1++; - $s = 9; continue; - case 10: - /* } */ case 8: - /* */ if (numExtensions > 0) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (numExtensions > 0) { */ case 12: - b$3 = $subslice(b0, posExtensions); - _ref$2 = fd.L1.Extensions.List; - _i$2 = 0; - /* while (true) { */ case 14: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 15; continue; } - i$2 = _i$2; - _tuple$6 = protowire.ConsumeVarint(b$3); - n$3 = _tuple$6[1]; - _tuple$7 = protowire.ConsumeBytes($subslice(b$3, n$3)); - v$3 = _tuple$7[0]; - m$4 = _tuple$7[1]; - $r = (x$2 = fd.L1.Extensions.List, ((i$2 < 0 || i$2 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$2])).unmarshalSeed(v$3, sb, fd, fd, i$2); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$3 = $subslice(b$3, (n$3 + m$4 >> 0)); - _i$2++; - $s = 14; continue; - case 15: - /* } */ case 13: - /* */ if (numServices > 0) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (numServices > 0) { */ case 17: - b$4 = $subslice(b0, posServices); - _ref$3 = fd.L1.Services.List; - _i$3 = 0; - /* while (true) { */ case 19: - /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 20; continue; } - i$3 = _i$3; - _tuple$8 = protowire.ConsumeVarint(b$4); - n$4 = _tuple$8[1]; - _tuple$9 = protowire.ConsumeBytes($subslice(b$4, n$4)); - v$4 = _tuple$9[0]; - m$5 = _tuple$9[1]; - $r = (x$3 = fd.L1.Services.List, ((i$3 < 0 || i$3 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$3])).unmarshalSeed(v$4, sb, fd, fd, i$3); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$4 = $subslice(b$4, (n$4 + m$5 >> 0)); - _i$3++; - $s = 19; continue; - case 20: - /* } */ case 18: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: File.ptr.prototype.unmarshalSeed, $c: true, $r, _1, _2, _3, _i, _i$1, _i$2, _i$3, _r, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, b$1, b$2, b$3, b$4, b0, fd, i, i$1, i$2, i$3, m, m$1, m$2, m$3, m$4, m$5, n, n$1, n$2, n$3, n$4, num, numEnums, numExtensions, numMessages, numServices, posEnums, posExtensions, posMessages, posServices, prevField, sb, typ, v, v$1, v$2, v$3, v$4, x, x$1, x$2, x$3, $s, $deferred};return $f; } } - }; - File.prototype.unmarshalSeed = function(b) { return this.$val.unmarshalSeed(b); }; - Enum.ptr.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { - var {_1, _2, _3, _4, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, _tuple$3, b, b$1, ed, i, i$1, m, m$1, m$2, m$3, n, n$1, num, num$1, numValues, pd, pf, sb, typ, typ$1, v, v$1, x, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - ed.Base.L0.ParentFile = pf; - ed.Base.L0.Parent = pd; - ed.Base.L0.Index = i; - numValues = 0; - b$1 = b; - /* while (true) { */ case 1: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b$1); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b$1 = $subslice(b$1, n); - _1 = typ; - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (2)) { */ case 4: - _tuple$1 = protowire.ConsumeBytes(b$1); - v = _tuple$1[0]; - m = _tuple$1[1]; - b$1 = $subslice(b$1, m); - _2 = num; - /* */ if (_2 === (1)) { $s = 8; continue; } - /* */ if (_2 === (2)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_2 === (1)) { */ case 8: - _arg = sb; - _r = pd.FullName(); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ed.Base.L0.FullName = _r$1; - $s = 10; continue; - /* } else if (_2 === (2)) { */ case 9: - numValues = numValues + (1) >> 0; - /* } */ case 10: - case 7: - $s = 6; continue; - /* } else { */ case 5: - m$1 = protowire.ConsumeFieldValue(num, typ, b$1); - b$1 = $subslice(b$1, m$1); - /* } */ case 6: - case 3: - $s = 1; continue; - case 2: - if (!($interfaceIsEqual(pd, pf))) { - $s = -1; return; - } - ed.L1.eagerValues = true; - ed.L2 = new EnumL2.ptr($throwNilPointerError, new EnumValues.ptr(sliceType$9.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false), new Names.ptr(sliceType.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new EnumRanges.ptr(sliceType$1.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$1.nil)); - ed.L2.Values.List = $makeSlice(sliceType$9, numValues); - i$1 = 0; - /* while (true) { */ case 13: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 14; continue; } - _tuple$2 = protowire.ConsumeTag(b); - num$1 = _tuple$2[0]; - typ$1 = _tuple$2[1]; - n$1 = _tuple$2[2]; - b = $subslice(b, n$1); - _3 = typ$1; - /* */ if (_3 === (2)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_3 === (2)) { */ case 16: - _tuple$3 = protowire.ConsumeBytes(b); - v$1 = _tuple$3[0]; - m$2 = _tuple$3[1]; - b = $subslice(b, m$2); - _4 = num$1; - /* */ if (_4 === (2)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_4 === (2)) { */ case 20: - $r = (x = ed.L2.Values.List, ((i$1 < 0 || i$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$1])).unmarshalFull(v$1, sb, pf, ed, i$1); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i$1 = i$1 + (1) >> 0; - /* } */ case 21: - case 19: - $s = 18; continue; - /* } else { */ case 17: - m$3 = protowire.ConsumeFieldValue(num$1, typ$1, b); - b = $subslice(b, m$3); - /* } */ case 18: - case 15: - $s = 13; continue; - case 14: - $s = -1; return; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.unmarshalSeed, $c: true, $r, _1, _2, _3, _4, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, _tuple$3, b, b$1, ed, i, i$1, m, m$1, m$2, m$3, n, n$1, num, num$1, numValues, pd, pf, sb, typ, typ$1, v, v$1, x, $s};return $f; - }; - Enum.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { return this.$val.unmarshalSeed(b, sb, pf, pd, i); }; - Message.ptr.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { - var {_1, _2, _arg, _arg$1, _arg$2, _i, _i$1, _i$2, _r, _r$1, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, b, b$1, b$2, b$3, b0, i, i$1, i$2, i$3, m, m$1, m$2, m$3, m$4, md, n, n$1, n$2, n$3, num, numEnums, numExtensions, numMessages, pd, pf, posEnums, posExtensions, posMessages, prevField, sb, typ, v, v$1, v$2, v$3, x, x$1, x$2, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - md.Base.L0.ParentFile = pf; - md.Base.L0.Parent = pd; - md.Base.L0.Index = i; - prevField = 0; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - numEnums = _tmp; - numMessages = _tmp$1; - numExtensions = _tmp$2; - _tmp$3 = 0; - _tmp$4 = 0; - _tmp$5 = 0; - posEnums = _tmp$3; - posMessages = _tmp$4; - posExtensions = _tmp$5; - b0 = b; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (2)) { */ case 4: - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - /* */ if (_2 === (1)) { $s = 8; continue; } - /* */ if (_2 === (4)) { $s = 9; continue; } - /* */ if (_2 === (3)) { $s = 10; continue; } - /* */ if (_2 === (6)) { $s = 11; continue; } - /* */ if (_2 === (7)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_2 === (1)) { */ case 8: - _arg = sb; - _r = pd.FullName(); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - md.Base.L0.FullName = _r$1; - $s = 13; continue; - /* } else if (_2 === (4)) { */ case 9: - if (!((prevField === 4))) { - if (numEnums > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posEnums = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numEnums = numEnums + (1) >> 0; - $s = 13; continue; - /* } else if (_2 === (3)) { */ case 10: - if (!((prevField === 3))) { - if (numMessages > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posMessages = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numMessages = numMessages + (1) >> 0; - $s = 13; continue; - /* } else if (_2 === (6)) { */ case 11: - if (!((prevField === 6))) { - if (numExtensions > 0) { - $panic(new $String("non-contiguous repeated field")); - } - posExtensions = ((b0.$length - b.$length >> 0) - n >> 0) - m >> 0; - } - numExtensions = numExtensions + (1) >> 0; - $s = 13; continue; - /* } else if (_2 === (7)) { */ case 12: - md.unmarshalSeedOptions(v); - /* } */ case 13: - case 7: - prevField = num; - $s = 6; continue; - /* } else { */ case 5: - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - prevField = -1; - /* } */ case 6: - case 3: - $s = 1; continue; - case 2: - if (numEnums > 0) { - md.L1.Enums.List = pf.allocEnums(numEnums); - } - if (numMessages > 0) { - md.L1.Messages.List = pf.allocMessages(numMessages); - } - if (numExtensions > 0) { - md.L1.Extensions.List = pf.allocExtensions(numExtensions); - } - /* */ if (numEnums > 0) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (numEnums > 0) { */ case 16: - b$1 = $subslice(b0, posEnums); - _ref = md.L1.Enums.List; - _i = 0; - /* while (true) { */ case 18: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 19; continue; } - i$1 = _i; - _tuple$2 = protowire.ConsumeVarint(b$1); - n$1 = _tuple$2[1]; - _tuple$3 = protowire.ConsumeBytes($subslice(b$1, n$1)); - v$1 = _tuple$3[0]; - m$2 = _tuple$3[1]; - $r = (x = md.L1.Enums.List, ((i$1 < 0 || i$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$1])).unmarshalSeed(v$1, sb, pf, md, i$1); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, (n$1 + m$2 >> 0)); - _i++; - $s = 18; continue; - case 19: - /* } */ case 17: - /* */ if (numMessages > 0) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (numMessages > 0) { */ case 21: - b$2 = $subslice(b0, posMessages); - _ref$1 = md.L1.Messages.List; - _i$1 = 0; - /* while (true) { */ case 23: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 24; continue; } - i$2 = _i$1; - _tuple$4 = protowire.ConsumeVarint(b$2); - n$2 = _tuple$4[1]; - _tuple$5 = protowire.ConsumeBytes($subslice(b$2, n$2)); - v$2 = _tuple$5[0]; - m$3 = _tuple$5[1]; - $r = (x$1 = md.L1.Messages.List, ((i$2 < 0 || i$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$2])).unmarshalSeed(v$2, sb, pf, md, i$2); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$2 = $subslice(b$2, (n$2 + m$3 >> 0)); - _i$1++; - $s = 23; continue; - case 24: - /* } */ case 22: - /* */ if (numExtensions > 0) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (numExtensions > 0) { */ case 26: - b$3 = $subslice(b0, posExtensions); - _ref$2 = md.L1.Extensions.List; - _i$2 = 0; - /* while (true) { */ case 28: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 29; continue; } - i$3 = _i$2; - _tuple$6 = protowire.ConsumeVarint(b$3); - n$3 = _tuple$6[1]; - _tuple$7 = protowire.ConsumeBytes($subslice(b$3, n$3)); - v$3 = _tuple$7[0]; - m$4 = _tuple$7[1]; - $r = (x$2 = md.L1.Extensions.List, ((i$3 < 0 || i$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$3])).unmarshalSeed(v$3, sb, pf, md, i$3); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$3 = $subslice(b$3, (n$3 + m$4 >> 0)); - _i$2++; - $s = 28; continue; - case 29: - /* } */ case 27: - $s = -1; return; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.unmarshalSeed, $c: true, $r, _1, _2, _arg, _arg$1, _arg$2, _i, _i$1, _i$2, _r, _r$1, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, b, b$1, b$2, b$3, b0, i, i$1, i$2, i$3, m, m$1, m$2, m$3, m$4, md, n, n$1, n$2, n$3, num, numEnums, numExtensions, numMessages, pd, pf, posEnums, posExtensions, posMessages, prevField, sb, typ, v, v$1, v$2, v$3, x, x$1, x$2, $s};return $f; - }; - Message.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { return this.$val.unmarshalSeed(b, sb, pf, pd, i); }; - Message.ptr.prototype.unmarshalSeedOptions = function(b) { - var _1, _2, _tuple, _tuple$1, b, m, m$1, md, n, num, typ, v; - md = this; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (0)) { - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (7)) { - md.L1.IsMapEntry = protowire.DecodeBool(v); - } else if (_2 === (1)) { - md.L1.IsMessageSet = protowire.DecodeBool(v); - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - }; - Message.prototype.unmarshalSeedOptions = function(b) { return this.$val.unmarshalSeedOptions(b); }; - Extension.ptr.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { - var {_1, _2, _3, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, i, m, m$1, m$2, n, num, pd, pf, sb, typ, v, v$1, xd, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - xd.Base.L0.ParentFile = pf; - xd.Base.L0.Parent = pd; - xd.Base.L0.Index = i; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (0)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (0)) { */ case 4: - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - if (_2 === (3)) { - xd.L1.Number = ((v.$low >> 0)); - } else if (_2 === (4)) { - xd.L1.Cardinality = ((v.$low << 24 >> 24)); - } else if (_2 === (5)) { - xd.L1.Kind = ((v.$low << 24 >> 24)); - } - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 5: - _tuple$2 = protowire.ConsumeBytes(b); - v$1 = _tuple$2[0]; - m$1 = _tuple$2[1]; - b = $subslice(b, m$1); - _3 = num; - /* */ if (_3 === (1)) { $s = 9; continue; } - /* */ if (_3 === (2)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_3 === (1)) { */ case 9: - _arg = sb; - _r = pd.FullName(); /* */ $s = 12; case 12: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v$1; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - xd.Base.L0.FullName = _r$1; - $s = 11; continue; - /* } else if (_3 === (2)) { */ case 10: - xd.L1.Extendee = new PlaceholderMessage((makeFullName(sb, v$1))); - /* } */ case 11: - case 8: - $s = 7; continue; - /* } else { */ case 6: - m$2 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$2); - /* } */ case 7: - case 3: - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.unmarshalSeed, $c: true, $r, _1, _2, _3, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, i, m, m$1, m$2, n, num, pd, pf, sb, typ, v, v$1, xd, $s};return $f; - }; - Extension.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { return this.$val.unmarshalSeed(b, sb, pf, pd, i); }; - Service.ptr.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { - var {_1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, b, i, m, m$1, n, num, pd, pf, sb, sd, typ, v, $s, $r, $c} = $restore(this, {b, sb, pf, pd, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - sd.Base.L0.ParentFile = pf; - sd.Base.L0.Parent = pd; - sd.Base.L0.Index = i; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (2)) { */ case 4: - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - _2 = num; - /* */ if (_2 === (1)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_2 === (1)) { */ case 8: - _arg = sb; - _r = pd.FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _arg$2 = v; - _r$1 = appendFullName(_arg, _arg$1, _arg$2); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - sd.Base.L0.FullName = _r$1; - /* } */ case 9: - case 7: - $s = 6; continue; - /* } else { */ case 5: - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - /* } */ case 6: - case 3: - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Service.ptr.prototype.unmarshalSeed, $c: true, $r, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _tuple, _tuple$1, b, i, m, m$1, n, num, pd, pf, sb, sd, typ, v, $s};return $f; - }; - Service.prototype.unmarshalSeed = function(b, sb, pf, pd, i) { return this.$val.unmarshalSeed(b, sb, pf, pd, i); }; - getBuilder = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = nameBuilderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = $assertType(_r, ptrType$11); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: getBuilder, $c: true, $r, $24r, _r, $s};return $f; - }; - putBuilder = function(b) { - var b; - nameBuilderPool.Put(b); - }; - makeFullName = function(sb, b) { - var b, sb; - if ((b.$length === 0) || !(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 46))) { - $panic(new $String("name reference must be fully qualified")); - } - return (sb.MakeString($subslice(b, 1))); - }; - appendFullName = function(sb, prefix, suffix) { - var prefix, sb, suffix; - return sb.AppendFullName(prefix, (strs.UnsafeString(suffix))); - }; - File.ptr.prototype.ParentFile = function() { - var fd; - fd = this; - return fd; - }; - File.prototype.ParentFile = function() { return this.$val.ParentFile(); }; - File.ptr.prototype.Parent = function() { - var fd; - fd = this; - return $ifaceNil; - }; - File.prototype.Parent = function() { return this.$val.Parent(); }; - File.ptr.prototype.Index = function() { - var fd; - fd = this; - return 0; - }; - File.prototype.Index = function() { return this.$val.Index(); }; - File.ptr.prototype.Syntax = function() { - var fd; - fd = this; - return fd.L1.Syntax; - }; - File.prototype.Syntax = function() { return this.$val.Syntax(); }; - File.ptr.prototype.Name = function() { - var fd; - fd = this; - return new protoreflect.FullName(fd.L1.Package).Name(); - }; - File.prototype.Name = function() { return this.$val.Name(); }; - File.ptr.prototype.FullName = function() { - var fd; - fd = this; - return fd.L1.Package; - }; - File.prototype.FullName = function() { return this.$val.FullName(); }; - File.ptr.prototype.IsPlaceholder = function() { - var fd; - fd = this; - return false; - }; - File.prototype.IsPlaceholder = function() { return this.$val.IsPlaceholder(); }; - File.ptr.prototype.Options = function() { - var {$24r, _r, _r$1, f, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = _r.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return descopts.File; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Options, $c: true, $r, $24r, _r, _r$1, f, fd, $s};return $f; - }; - File.prototype.Options = function() { return this.$val.Options(); }; - File.ptr.prototype.Path = function() { - var fd; - fd = this; - return fd.L1.Path; - }; - File.prototype.Path = function() { return this.$val.Path(); }; - File.ptr.prototype.Package = function() { - var fd; - fd = this; - return fd.L1.Package; - }; - File.prototype.Package = function() { return this.$val.Package(); }; - File.ptr.prototype.Imports = function() { - var {$24r, _r, fd, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (x = _r, (x.$ptr_Imports || (x.$ptr_Imports = new ptrType(function() { return this.$target.Imports; }, function($v) { this.$target.Imports = $v; }, x)))); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Imports, $c: true, $r, $24r, _r, fd, x, $s};return $f; - }; - File.prototype.Imports = function() { return this.$val.Imports(); }; - File.ptr.prototype.Enums = function() { - var fd; - fd = this; - return fd.L1.Enums; - }; - File.prototype.Enums = function() { return this.$val.Enums(); }; - File.ptr.prototype.Messages = function() { - var fd; - fd = this; - return fd.L1.Messages; - }; - File.prototype.Messages = function() { return this.$val.Messages(); }; - File.ptr.prototype.Extensions = function() { - var fd; - fd = this; - return fd.L1.Extensions; - }; - File.prototype.Extensions = function() { return this.$val.Extensions(); }; - File.ptr.prototype.Services = function() { - var fd; - fd = this; - return fd.L1.Services; - }; - File.prototype.Services = function() { return this.$val.Services(); }; - File.ptr.prototype.SourceLocations = function() { - var {$24r, _r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Locations; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: File.ptr.prototype.SourceLocations, $c: true, $r, $24r, _r, fd, $s};return $f; - }; - File.prototype.SourceLocations = function() { return this.$val.SourceLocations(); }; - File.ptr.prototype.Format = function(s, r) { - var {fd, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = descfmt.FormatDesc(s, r, fd); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: File.ptr.prototype.Format, $c: true, $r, fd, r, s, $s};return $f; - }; - File.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - File.ptr.prototype.ProtoType = function(param) { - var fd, param; - fd = this; - }; - File.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - File.ptr.prototype.ProtoInternal = function(param) { - var fd, param; - fd = this; - }; - File.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - File.ptr.prototype.lazyInit = function() { - var {fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - /* */ if (atomic.LoadUint32((fd.$ptr_once || (fd.$ptr_once = new ptrType$12(function() { return this.$target.once; }, function($v) { this.$target.once = $v; }, fd)))) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.LoadUint32((fd.$ptr_once || (fd.$ptr_once = new ptrType$12(function() { return this.$target.once; }, function($v) { this.$target.once = $v; }, fd)))) === 0) { */ case 1: - $r = fd.lazyInitOnce(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return fd.L2; - /* */ } return; } var $f = {$blk: File.ptr.prototype.lazyInit, $c: true, $r, fd, $s};return $f; - }; - File.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - File.ptr.prototype.lazyInitOnce = function() { - var {fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (fd.L2 === ptrType$1.nil) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (fd.L2 === ptrType$1.nil) { */ case 2: - $r = fd.lazyRawInit(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - atomic.StoreUint32((fd.$ptr_once || (fd.$ptr_once = new ptrType$12(function() { return this.$target.once; }, function($v) { this.$target.once = $v; }, fd))), 1); - $r = fd.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: File.ptr.prototype.lazyInitOnce, $c: true, $r, fd, $s};return $f; - }; - File.prototype.lazyInitOnce = function() { return this.$val.lazyInitOnce(); }; - File.ptr.prototype.GoPackagePath = function() { - var fd; - fd = this; - return fd.fileRaw.builder.GoPackagePath; - }; - File.prototype.GoPackagePath = function() { return this.$val.GoPackagePath(); }; - Enum.ptr.prototype.Options = function() { - var {$24r, _r, _r$1, ed, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - _r = ed.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = _r.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return descopts.Enum; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.Options, $c: true, $r, $24r, _r, _r$1, ed, f, $s};return $f; - }; - Enum.prototype.Options = function() { return this.$val.Options(); }; - Enum.ptr.prototype.Values = function() { - var {$24r, _r, ed, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - if (ed.L1.eagerValues) { - $s = -1; return ed.L2.Values; - } - _r = ed.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Values; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.Values, $c: true, $r, $24r, _r, ed, $s};return $f; - }; - Enum.prototype.Values = function() { return this.$val.Values(); }; - Enum.ptr.prototype.ReservedNames = function() { - var {$24r, _r, ed, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - _r = ed.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.ReservedNames; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.ReservedNames, $c: true, $r, $24r, _r, ed, $s};return $f; - }; - Enum.prototype.ReservedNames = function() { return this.$val.ReservedNames(); }; - Enum.ptr.prototype.ReservedRanges = function() { - var {$24r, _r, ed, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - _r = ed.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.ReservedRanges; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.ReservedRanges, $c: true, $r, $24r, _r, ed, $s};return $f; - }; - Enum.prototype.ReservedRanges = function() { return this.$val.ReservedRanges(); }; - Enum.ptr.prototype.Format = function(s, r) { - var {ed, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - $r = descfmt.FormatDesc(s, r, ed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.Format, $c: true, $r, ed, r, s, $s};return $f; - }; - Enum.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Enum.ptr.prototype.ProtoType = function(param) { - var ed, param; - ed = this; - }; - Enum.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Enum.ptr.prototype.lazyInit = function() { - var {_r, ed, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - _r = ed.Base.L0.ParentFile.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return ed.L2; - /* */ } return; } var $f = {$blk: Enum.ptr.prototype.lazyInit, $c: true, $r, _r, ed, $s};return $f; - }; - Enum.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - EnumValue.ptr.prototype.Options = function() { - var {$24r, _r, ed, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - f = ed.L1.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f === $throwNilPointerError)) { */ case 1: - _r = f(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return descopts.EnumValue; - /* */ } return; } var $f = {$blk: EnumValue.ptr.prototype.Options, $c: true, $r, $24r, _r, ed, f, $s};return $f; - }; - EnumValue.prototype.Options = function() { return this.$val.Options(); }; - EnumValue.ptr.prototype.Number = function() { - var ed; - ed = this; - return ed.L1.Number; - }; - EnumValue.prototype.Number = function() { return this.$val.Number(); }; - EnumValue.ptr.prototype.Format = function(s, r) { - var {ed, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ed = this; - $r = descfmt.FormatDesc(s, r, ed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: EnumValue.ptr.prototype.Format, $c: true, $r, ed, r, s, $s};return $f; - }; - EnumValue.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - EnumValue.ptr.prototype.ProtoType = function(param) { - var ed, param; - ed = this; - }; - EnumValue.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Message.ptr.prototype.Options = function() { - var {$24r, _r, _r$1, f, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = _r.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return descopts.Message; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.Options, $c: true, $r, $24r, _r, _r$1, f, md, $s};return $f; - }; - Message.prototype.Options = function() { return this.$val.Options(); }; - Message.ptr.prototype.IsMapEntry = function() { - var md; - md = this; - return md.L1.IsMapEntry; - }; - Message.prototype.IsMapEntry = function() { return this.$val.IsMapEntry(); }; - Message.ptr.prototype.Fields = function() { - var {$24r, _r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Fields; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.Fields, $c: true, $r, $24r, _r, md, $s};return $f; - }; - Message.prototype.Fields = function() { return this.$val.Fields(); }; - Message.ptr.prototype.Oneofs = function() { - var {$24r, _r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Oneofs; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.Oneofs, $c: true, $r, $24r, _r, md, $s};return $f; - }; - Message.prototype.Oneofs = function() { return this.$val.Oneofs(); }; - Message.ptr.prototype.ReservedNames = function() { - var {$24r, _r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.ReservedNames; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.ReservedNames, $c: true, $r, $24r, _r, md, $s};return $f; - }; - Message.prototype.ReservedNames = function() { return this.$val.ReservedNames(); }; - Message.ptr.prototype.ReservedRanges = function() { - var {$24r, _r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.ReservedRanges; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.ReservedRanges, $c: true, $r, $24r, _r, md, $s};return $f; - }; - Message.prototype.ReservedRanges = function() { return this.$val.ReservedRanges(); }; - Message.ptr.prototype.RequiredNumbers = function() { - var {$24r, _r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.RequiredNumbers; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.RequiredNumbers, $c: true, $r, $24r, _r, md, $s};return $f; - }; - Message.prototype.RequiredNumbers = function() { return this.$val.RequiredNumbers(); }; - Message.ptr.prototype.ExtensionRanges = function() { - var {$24r, _r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.ExtensionRanges; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.ExtensionRanges, $c: true, $r, $24r, _r, md, $s};return $f; - }; - Message.prototype.ExtensionRanges = function() { return this.$val.ExtensionRanges(); }; - Message.ptr.prototype.ExtensionRangeOptions = function(i) { - var {$24r, _r, _r$1, f, i, md, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = (x = _r.ExtensionRangeOptions, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return descopts.ExtensionRange; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.ExtensionRangeOptions, $c: true, $r, $24r, _r, _r$1, f, i, md, x, $s};return $f; - }; - Message.prototype.ExtensionRangeOptions = function(i) { return this.$val.ExtensionRangeOptions(i); }; - Message.ptr.prototype.Enums = function() { - var md; - md = this; - return md.L1.Enums; - }; - Message.prototype.Enums = function() { return this.$val.Enums(); }; - Message.ptr.prototype.Messages = function() { - var md; - md = this; - return md.L1.Messages; - }; - Message.prototype.Messages = function() { return this.$val.Messages(); }; - Message.ptr.prototype.Extensions = function() { - var md; - md = this; - return md.L1.Extensions; - }; - Message.prototype.Extensions = function() { return this.$val.Extensions(); }; - Message.ptr.prototype.ProtoType = function(param) { - var md, param; - md = this; - }; - Message.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Message.ptr.prototype.Format = function(s, r) { - var {md, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - $r = descfmt.FormatDesc(s, r, md); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.Format, $c: true, $r, md, r, s, $s};return $f; - }; - Message.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Message.ptr.prototype.lazyInit = function() { - var {_r, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - _r = md.Base.L0.ParentFile.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return md.L2; - /* */ } return; } var $f = {$blk: Message.ptr.prototype.lazyInit, $c: true, $r, _r, md, $s};return $f; - }; - Message.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Message.ptr.prototype.IsMessageSet = function() { - var md; - md = this; - return md.L1.IsMessageSet; - }; - Message.prototype.IsMessageSet = function() { return this.$val.IsMessageSet(); }; - Field.ptr.prototype.Options = function() { - var {$24r, _r, f, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - f = fd.L1.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f === $throwNilPointerError)) { */ case 1: - _r = f(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return descopts.Field; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.Options, $c: true, $r, $24r, _r, f, fd, $s};return $f; - }; - Field.prototype.Options = function() { return this.$val.Options(); }; - Field.ptr.prototype.Number = function() { - var fd; - fd = this; - return fd.L1.Number; - }; - Field.prototype.Number = function() { return this.$val.Number(); }; - Field.ptr.prototype.Cardinality = function() { - var fd; - fd = this; - return fd.L1.Cardinality; - }; - Field.prototype.Cardinality = function() { return this.$val.Cardinality(); }; - Field.ptr.prototype.Kind = function() { - var fd; - fd = this; - return fd.L1.Kind; - }; - Field.prototype.Kind = function() { return this.$val.Kind(); }; - Field.ptr.prototype.HasJSONName = function() { - var fd; - fd = this; - return fd.L1.StringName.hasJSON; - }; - Field.prototype.HasJSONName = function() { return this.$val.HasJSONName(); }; - Field.ptr.prototype.JSONName = function() { - var {$24r, _r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.L1.StringName.getJSON(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.JSONName, $c: true, $r, $24r, _r, fd, $s};return $f; - }; - Field.prototype.JSONName = function() { return this.$val.JSONName(); }; - Field.ptr.prototype.TextName = function() { - var {$24r, _r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.L1.StringName.getText(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.TextName, $c: true, $r, $24r, _r, fd, $s};return $f; - }; - Field.prototype.TextName = function() { return this.$val.TextName(); }; - Field.ptr.prototype.HasPresence = function() { - var fd; - fd = this; - return !((fd.L1.Cardinality === 3)) && ((fd.Base.L0.ParentFile.L1.Syntax === 2) || !($interfaceIsEqual(fd.L1.Message, $ifaceNil)) || !($interfaceIsEqual(fd.L1.ContainingOneof, $ifaceNil))); - }; - Field.prototype.HasPresence = function() { return this.$val.HasPresence(); }; - Field.ptr.prototype.HasOptionalKeyword = function() { - var fd; - fd = this; - return ((fd.Base.L0.ParentFile.L1.Syntax === 2) && (fd.L1.Cardinality === 1) && $interfaceIsEqual(fd.L1.ContainingOneof, $ifaceNil)) || fd.L1.IsProto3Optional; - }; - Field.prototype.HasOptionalKeyword = function() { return this.$val.HasOptionalKeyword(); }; - Field.ptr.prototype.IsPacked = function() { - var _1, fd; - fd = this; - if (!fd.L1.HasPacked && !((fd.Base.L0.ParentFile.L1.Syntax === 2)) && (fd.L1.Cardinality === 3)) { - _1 = fd.L1.Kind; - if ((_1 === (9)) || (_1 === (12)) || (_1 === (11)) || (_1 === (10))) { - } else { - return true; - } - } - return fd.L1.IsPacked; - }; - Field.prototype.IsPacked = function() { return this.$val.IsPacked(); }; - Field.ptr.prototype.IsExtension = function() { - var fd; - fd = this; - return false; - }; - Field.prototype.IsExtension = function() { return this.$val.IsExtension(); }; - Field.ptr.prototype.IsWeak = function() { - var fd; - fd = this; - return fd.L1.IsWeak; - }; - Field.prototype.IsWeak = function() { return this.$val.IsWeak(); }; - Field.ptr.prototype.IsList = function() { - var {$24r, _r, _v, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - if (!(fd.Cardinality() === 3)) { _v = false; $s = 1; continue s; } - _r = fd.IsMap(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = !_r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.IsList, $c: true, $r, $24r, _r, _v, fd, $s};return $f; - }; - Field.prototype.IsList = function() { return this.$val.IsList(); }; - Field.ptr.prototype.IsMap = function() { - var {$24r, _r, _r$1, _r$2, _v, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.Message(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - if (!(!($interfaceIsEqual(_r, $ifaceNil)))) { _v = false; $s = 1; continue s; } - _r$1 = fd.Message(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.IsMapEntry(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2; case 1: - $24r = _v; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.IsMap, $c: true, $r, $24r, _r, _r$1, _r$2, _v, fd, $s};return $f; - }; - Field.prototype.IsMap = function() { return this.$val.IsMap(); }; - Field.ptr.prototype.MapKey = function() { - var {$24r, _r, _r$1, _r$2, _r$3, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.IsMap(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return $ifaceNil; - /* } */ case 2: - _r$1 = fd.Message(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.Fields(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.ByNumber(1); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.MapKey, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, fd, $s};return $f; - }; - Field.prototype.MapKey = function() { return this.$val.MapKey(); }; - Field.ptr.prototype.MapValue = function() { - var {$24r, _r, _r$1, _r$2, _r$3, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.IsMap(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return $ifaceNil; - /* } */ case 2: - _r$1 = fd.Message(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.Fields(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.ByNumber(2); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.MapValue, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, fd, $s};return $f; - }; - Field.prototype.MapValue = function() { return this.$val.MapValue(); }; - Field.ptr.prototype.HasDefault = function() { - var fd; - fd = this; - return fd.L1.Default.has; - }; - Field.prototype.HasDefault = function() { return this.$val.HasDefault(); }; - Field.ptr.prototype.Default = function() { - var {$24r, _r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = fd.L1.Default.get(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.Default, $c: true, $r, $24r, _r, fd, $s};return $f; - }; - Field.prototype.Default = function() { return this.$val.Default(); }; - Field.ptr.prototype.DefaultEnumValue = function() { - var fd; - fd = this; - return fd.L1.Default.enum$2; - }; - Field.prototype.DefaultEnumValue = function() { return this.$val.DefaultEnumValue(); }; - Field.ptr.prototype.ContainingOneof = function() { - var fd; - fd = this; - return fd.L1.ContainingOneof; - }; - Field.prototype.ContainingOneof = function() { return this.$val.ContainingOneof(); }; - Field.ptr.prototype.ContainingMessage = function() { - var fd; - fd = this; - return $assertType(fd.Base.L0.Parent, protoreflect.MessageDescriptor); - }; - Field.prototype.ContainingMessage = function() { return this.$val.ContainingMessage(); }; - Field.ptr.prototype.Enum = function() { - var fd; - fd = this; - return fd.L1.Enum; - }; - Field.prototype.Enum = function() { return this.$val.Enum(); }; - Field.ptr.prototype.Message = function() { - var {_r, _r$1, _tuple, d, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - /* */ if (fd.L1.IsWeak) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fd.L1.IsWeak) { */ case 1: - _r = fd.L1.Message.FullName(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = protoregistry.GlobalFiles.FindDescriptorByName(_r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - d = _tuple[0]; - if (!($interfaceIsEqual(d, $ifaceNil))) { - $s = -1; return $assertType(d, protoreflect.MessageDescriptor); - } - /* } */ case 2: - $s = -1; return fd.L1.Message; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.Message, $c: true, $r, _r, _r$1, _tuple, d, fd, $s};return $f; - }; - Field.prototype.Message = function() { return this.$val.Message(); }; - Field.ptr.prototype.Format = function(s, r) { - var {fd, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = descfmt.FormatDesc(s, r, fd); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.Format, $c: true, $r, fd, r, s, $s};return $f; - }; - Field.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Field.ptr.prototype.ProtoType = function(param) { - var fd, param; - fd = this; - }; - Field.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Field.ptr.prototype.EnforceUTF8 = function() { - var fd; - fd = this; - if (fd.L1.HasEnforceUTF8) { - return fd.L1.EnforceUTF8; - } - return fd.Base.L0.ParentFile.L1.Syntax === 3; - }; - Field.prototype.EnforceUTF8 = function() { return this.$val.EnforceUTF8(); }; - Oneof.ptr.prototype.IsSynthetic = function() { - var {$24r, _r, _v, od, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - od = this; - if (!((od.Base.L0.ParentFile.L1.Syntax === 3) && (od.L1.Fields.List.$length === 1))) { _v = false; $s = 1; continue s; } - _r = (x = od.L1.Fields.List, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).HasOptionalKeyword(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Oneof.ptr.prototype.IsSynthetic, $c: true, $r, $24r, _r, _v, od, x, $s};return $f; - }; - Oneof.prototype.IsSynthetic = function() { return this.$val.IsSynthetic(); }; - Oneof.ptr.prototype.Options = function() { - var {$24r, _r, f, od, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - od = this; - f = od.L1.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f === $throwNilPointerError)) { */ case 1: - _r = f(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return descopts.Oneof; - /* */ } return; } var $f = {$blk: Oneof.ptr.prototype.Options, $c: true, $r, $24r, _r, f, od, $s};return $f; - }; - Oneof.prototype.Options = function() { return this.$val.Options(); }; - Oneof.ptr.prototype.Fields = function() { - var od; - od = this; - return od.L1.Fields; - }; - Oneof.prototype.Fields = function() { return this.$val.Fields(); }; - Oneof.ptr.prototype.Format = function(s, r) { - var {od, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - od = this; - $r = descfmt.FormatDesc(s, r, od); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Oneof.ptr.prototype.Format, $c: true, $r, od, r, s, $s};return $f; - }; - Oneof.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Oneof.ptr.prototype.ProtoType = function(param) { - var od, param; - od = this; - }; - Oneof.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Extension.ptr.prototype.Options = function() { - var {$24r, _r, _r$1, f, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = _r.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return descopts.Field; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.Options, $c: true, $r, $24r, _r, _r$1, f, xd, $s};return $f; - }; - Extension.prototype.Options = function() { return this.$val.Options(); }; - Extension.ptr.prototype.Number = function() { - var xd; - xd = this; - return xd.L1.Number; - }; - Extension.prototype.Number = function() { return this.$val.Number(); }; - Extension.ptr.prototype.Cardinality = function() { - var xd; - xd = this; - return xd.L1.Cardinality; - }; - Extension.prototype.Cardinality = function() { return this.$val.Cardinality(); }; - Extension.ptr.prototype.Kind = function() { - var xd; - xd = this; - return xd.L1.Kind; - }; - Extension.prototype.Kind = function() { return this.$val.Kind(); }; - Extension.ptr.prototype.HasJSONName = function() { - var {$24r, _r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.StringName.hasJSON; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.HasJSONName, $c: true, $r, $24r, _r, xd, $s};return $f; - }; - Extension.prototype.HasJSONName = function() { return this.$val.HasJSONName(); }; - Extension.ptr.prototype.JSONName = function() { - var {$24r, _r, _r$1, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.StringName.getJSON(xd); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.JSONName, $c: true, $r, $24r, _r, _r$1, xd, $s};return $f; - }; - Extension.prototype.JSONName = function() { return this.$val.JSONName(); }; - Extension.ptr.prototype.TextName = function() { - var {$24r, _r, _r$1, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.StringName.getText(xd); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.TextName, $c: true, $r, $24r, _r, _r$1, xd, $s};return $f; - }; - Extension.prototype.TextName = function() { return this.$val.TextName(); }; - Extension.ptr.prototype.HasPresence = function() { - var xd; - xd = this; - return !((xd.L1.Cardinality === 3)); - }; - Extension.prototype.HasPresence = function() { return this.$val.HasPresence(); }; - Extension.ptr.prototype.HasOptionalKeyword = function() { - var {$24r, _r, _v, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - if ((xd.Base.L0.ParentFile.L1.Syntax === 2) && (xd.L1.Cardinality === 1)) { _v = true; $s = 1; continue s; } - _r = xd.lazyInit(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r.IsProto3Optional; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.HasOptionalKeyword, $c: true, $r, $24r, _r, _v, xd, $s};return $f; - }; - Extension.prototype.HasOptionalKeyword = function() { return this.$val.HasOptionalKeyword(); }; - Extension.ptr.prototype.IsPacked = function() { - var {$24r, _r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.IsPacked; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.IsPacked, $c: true, $r, $24r, _r, xd, $s};return $f; - }; - Extension.prototype.IsPacked = function() { return this.$val.IsPacked(); }; - Extension.ptr.prototype.IsExtension = function() { - var xd; - xd = this; - return true; - }; - Extension.prototype.IsExtension = function() { return this.$val.IsExtension(); }; - Extension.ptr.prototype.IsWeak = function() { - var xd; - xd = this; - return false; - }; - Extension.prototype.IsWeak = function() { return this.$val.IsWeak(); }; - Extension.ptr.prototype.IsList = function() { - var xd; - xd = this; - return xd.Cardinality() === 3; - }; - Extension.prototype.IsList = function() { return this.$val.IsList(); }; - Extension.ptr.prototype.IsMap = function() { - var xd; - xd = this; - return false; - }; - Extension.prototype.IsMap = function() { return this.$val.IsMap(); }; - Extension.ptr.prototype.MapKey = function() { - var xd; - xd = this; - return $ifaceNil; - }; - Extension.prototype.MapKey = function() { return this.$val.MapKey(); }; - Extension.ptr.prototype.MapValue = function() { - var xd; - xd = this; - return $ifaceNil; - }; - Extension.prototype.MapValue = function() { return this.$val.MapValue(); }; - Extension.ptr.prototype.HasDefault = function() { - var {$24r, _r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Default.has; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.HasDefault, $c: true, $r, $24r, _r, xd, $s};return $f; - }; - Extension.prototype.HasDefault = function() { return this.$val.HasDefault(); }; - Extension.ptr.prototype.Default = function() { - var {$24r, _r, _r$1, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.Default.get(xd); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.Default, $c: true, $r, $24r, _r, _r$1, xd, $s};return $f; - }; - Extension.prototype.Default = function() { return this.$val.Default(); }; - Extension.ptr.prototype.DefaultEnumValue = function() { - var {$24r, _r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Default.enum$2; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.DefaultEnumValue, $c: true, $r, $24r, _r, xd, $s};return $f; - }; - Extension.prototype.DefaultEnumValue = function() { return this.$val.DefaultEnumValue(); }; - Extension.ptr.prototype.ContainingOneof = function() { - var xd; - xd = this; - return $ifaceNil; - }; - Extension.prototype.ContainingOneof = function() { return this.$val.ContainingOneof(); }; - Extension.ptr.prototype.ContainingMessage = function() { - var xd; - xd = this; - return xd.L1.Extendee; - }; - Extension.prototype.ContainingMessage = function() { return this.$val.ContainingMessage(); }; - Extension.ptr.prototype.Enum = function() { - var {$24r, _r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Enum; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.Enum, $c: true, $r, $24r, _r, xd, $s};return $f; - }; - Extension.prototype.Enum = function() { return this.$val.Enum(); }; - Extension.ptr.prototype.Message = function() { - var {$24r, _r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Message; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.Message, $c: true, $r, $24r, _r, xd, $s};return $f; - }; - Extension.prototype.Message = function() { return this.$val.Message(); }; - Extension.ptr.prototype.Format = function(s, r) { - var {r, s, xd, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - $r = descfmt.FormatDesc(s, r, xd); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.Format, $c: true, $r, r, s, xd, $s};return $f; - }; - Extension.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Extension.ptr.prototype.ProtoType = function(param) { - var param, xd; - xd = this; - }; - Extension.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Extension.ptr.prototype.ProtoInternal = function(param) { - var param, xd; - xd = this; - }; - Extension.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Extension.ptr.prototype.lazyInit = function() { - var {_r, xd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xd = this; - _r = xd.Base.L0.ParentFile.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return xd.L2; - /* */ } return; } var $f = {$blk: Extension.ptr.prototype.lazyInit, $c: true, $r, _r, xd, $s};return $f; - }; - Extension.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Service.ptr.prototype.Options = function() { - var {$24r, _r, _r$1, f, sd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _r = sd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = _r.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(f === $throwNilPointerError)) { */ case 2: - _r$1 = f(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return descopts.Service; - /* */ } return; } var $f = {$blk: Service.ptr.prototype.Options, $c: true, $r, $24r, _r, _r$1, f, sd, $s};return $f; - }; - Service.prototype.Options = function() { return this.$val.Options(); }; - Service.ptr.prototype.Methods = function() { - var {$24r, _r, sd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _r = sd.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.Methods; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Service.ptr.prototype.Methods, $c: true, $r, $24r, _r, sd, $s};return $f; - }; - Service.prototype.Methods = function() { return this.$val.Methods(); }; - Service.ptr.prototype.Format = function(s, r) { - var {r, s, sd, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - $r = descfmt.FormatDesc(s, r, sd); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Service.ptr.prototype.Format, $c: true, $r, r, s, sd, $s};return $f; - }; - Service.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Service.ptr.prototype.ProtoType = function(param) { - var param, sd; - sd = this; - }; - Service.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Service.ptr.prototype.ProtoInternal = function(param) { - var param, sd; - sd = this; - }; - Service.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Service.ptr.prototype.lazyInit = function() { - var {_r, sd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _r = sd.Base.L0.ParentFile.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return sd.L2; - /* */ } return; } var $f = {$blk: Service.ptr.prototype.lazyInit, $c: true, $r, _r, sd, $s};return $f; - }; - Service.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - Method.ptr.prototype.Options = function() { - var {$24r, _r, f, md, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - f = md.L1.Options; - /* */ if (!(f === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f === $throwNilPointerError)) { */ case 1: - _r = f(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return descopts.Method; - /* */ } return; } var $f = {$blk: Method.ptr.prototype.Options, $c: true, $r, $24r, _r, f, md, $s};return $f; - }; - Method.prototype.Options = function() { return this.$val.Options(); }; - Method.ptr.prototype.Input = function() { - var md; - md = this; - return md.L1.Input; - }; - Method.prototype.Input = function() { return this.$val.Input(); }; - Method.ptr.prototype.Output = function() { - var md; - md = this; - return md.L1.Output; - }; - Method.prototype.Output = function() { return this.$val.Output(); }; - Method.ptr.prototype.IsStreamingClient = function() { - var md; - md = this; - return md.L1.IsStreamingClient; - }; - Method.prototype.IsStreamingClient = function() { return this.$val.IsStreamingClient(); }; - Method.ptr.prototype.IsStreamingServer = function() { - var md; - md = this; - return md.L1.IsStreamingServer; - }; - Method.prototype.IsStreamingServer = function() { return this.$val.IsStreamingServer(); }; - Method.ptr.prototype.Format = function(s, r) { - var {md, r, s, $s, $r, $c} = $restore(this, {s, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md = this; - $r = descfmt.FormatDesc(s, r, md); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Method.ptr.prototype.Format, $c: true, $r, md, r, s, $s};return $f; - }; - Method.prototype.Format = function(s, r) { return this.$val.Format(s, r); }; - Method.ptr.prototype.ProtoType = function(param) { - var md, param; - md = this; - }; - Method.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - Method.ptr.prototype.ProtoInternal = function(param) { - var md, param; - md = this; - }; - Method.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Base.ptr.prototype.Name = function() { - var d; - d = this; - return new protoreflect.FullName(d.L0.FullName).Name(); - }; - Base.prototype.Name = function() { return this.$val.Name(); }; - Base.ptr.prototype.FullName = function() { - var d; - d = this; - return d.L0.FullName; - }; - Base.prototype.FullName = function() { return this.$val.FullName(); }; - Base.ptr.prototype.ParentFile = function() { - var d; - d = this; - if (d.L0.ParentFile === $pkg.SurrogateProto2 || d.L0.ParentFile === $pkg.SurrogateProto3) { - return $ifaceNil; - } - return d.L0.ParentFile; - }; - Base.prototype.ParentFile = function() { return this.$val.ParentFile(); }; - Base.ptr.prototype.Parent = function() { - var d; - d = this; - return d.L0.Parent; - }; - Base.prototype.Parent = function() { return this.$val.Parent(); }; - Base.ptr.prototype.Index = function() { - var d; - d = this; - return d.L0.Index; - }; - Base.prototype.Index = function() { return this.$val.Index(); }; - Base.ptr.prototype.Syntax = function() { - var d; - d = this; - return d.L0.ParentFile.Syntax(); - }; - Base.prototype.Syntax = function() { return this.$val.Syntax(); }; - Base.ptr.prototype.IsPlaceholder = function() { - var d; - d = this; - return false; - }; - Base.prototype.IsPlaceholder = function() { return this.$val.IsPlaceholder(); }; - Base.ptr.prototype.ProtoInternal = function(param) { - var d, param; - d = this; - }; - Base.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - stringName.ptr.prototype.InitJSON = function(name) { - var name, s; - s = this; - s.hasJSON = true; - s.nameJSON = name; - }; - stringName.prototype.InitJSON = function(name) { return this.$val.InitJSON(name); }; - stringName.ptr.prototype.lazyInit = function(fd) { - var {fd, s, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = [fd]; - s = [s]; - s[0] = this; - $r = s[0].once.Do((function(fd, s) { return function $b() { - var {_r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, name, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = fd[0].IsExtension(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r) { */ case 1: - name = ""; - _r$1 = messageset.IsMessageSetExtension(fd[0]); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$1) { */ case 5: - _r$2 = fd[0].FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = new protoreflect.FullName(_r$2).Parent(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - name = ("[" + _r$3 + "]"); - $s = 7; continue; - /* } else { */ case 6: - _r$4 = fd[0].FullName(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - name = ("[" + _r$4 + "]"); - /* } */ case 7: - s[0].nameJSON = name; - s[0].nameText = name; - $s = 3; continue; - /* } else { */ case 2: - /* */ if (!s[0].hasJSON) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!s[0].hasJSON) { */ case 12: - _r$5 = fd[0].Name(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = strs.JSONCamelCase((_r$5)); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - s[0].nameJSON = _r$6; - /* } */ case 13: - _r$7 = fd[0].Name(); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - s[0].nameText = (_r$7); - _r$8 = fd[0].Kind(); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8 === 10) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_r$8 === 10) { */ case 17: - _r$9 = fd[0].Message(); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Name(); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - s[0].nameText = (_r$10); - /* } */ case 18: - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, name, $s};return $f; - }; })(fd, s)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return s[0]; - /* */ } return; } var $f = {$blk: stringName.ptr.prototype.lazyInit, $c: true, $r, fd, s, $s};return $f; - }; - stringName.prototype.lazyInit = function(fd) { return this.$val.lazyInit(fd); }; - stringName.ptr.prototype.getJSON = function(fd) { - var {$24r, _r, fd, s, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.lazyInit(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.nameJSON; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: stringName.ptr.prototype.getJSON, $c: true, $r, $24r, _r, fd, s, $s};return $f; - }; - stringName.prototype.getJSON = function(fd) { return this.$val.getJSON(fd); }; - stringName.ptr.prototype.getText = function(fd) { - var {$24r, _r, fd, s, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.lazyInit(fd); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r.nameText; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: stringName.ptr.prototype.getText, $c: true, $r, $24r, _r, fd, s, $s};return $f; - }; - stringName.prototype.getText = function(fd) { return this.$val.getText(fd); }; - DefaultValue = function(v, ev) { - var {_r, _tuple, b, dv, ev, ok, v, $s, $r, $c} = $restore(this, {v, ev}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dv = new defaultValue.ptr($clone(v, protoreflect.Value).IsValid(), $clone(v, protoreflect.Value), ev, sliceType$13.nil); - _r = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = $assertType(_r, sliceType$13, true); - b = _tuple[0]; - ok = _tuple[1]; - if (ok) { - dv.bytes = $appendSlice((sliceType$13.nil), b); - } - $s = -1; return dv; - /* */ } return; } var $f = {$blk: DefaultValue, $c: true, $r, _r, _tuple, b, dv, ev, ok, v, $s};return $f; - }; - $pkg.DefaultValue = DefaultValue; - unmarshalDefault = function(b, k, pf, ed) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, b, e, ed, err, ev, ev$1, evs, k, ok, pf, v, v$1, $s, $r, $c} = $restore(this, {b, k, pf, ed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - evs = $ifaceNil; - /* */ if (k === 14) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (k === 14) { */ case 1: - _tuple = $assertType(ed, ptrType$2, true); - e = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok && e.Base.L0.ParentFile === pf) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ok && e.Base.L0.ParentFile === pf) { */ case 3: - evs = e.L2.Values; - $s = 5; continue; - /* } else { */ case 4: - _r = ed.Values(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - evs = _r; - /* } */ case 5: - _r$1 = ed.IsPlaceholder(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1 && new protoreflect.Name(($bytesToString(b))).IsValid()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_r$1 && new protoreflect.Name(($bytesToString(b))).IsValid()) { */ case 7: - v = $clone(protoreflect.ValueOfEnum(0), protoreflect.Value); - _r$2 = ed.FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = new protoreflect.FullName(_r$2).Parent(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = new protoreflect.FullName(_r$3).Append(($bytesToString(b))); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ev = (_r$4); - _r$5 = DefaultValue($clone(v, protoreflect.Value), new PlaceholderEnumValue(ev)); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 14; case 14: return $24r; - /* } */ case 8: - /* } */ case 2: - _r$6 = defval.Unmarshal(($bytesToString(b)), k, evs, 1); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - v$1 = $clone(_tuple$1[0], protoreflect.Value); - ev$1 = _tuple$1[1]; - err = _tuple$1[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - _r$7 = DefaultValue($clone(v$1, protoreflect.Value), ev$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 17; case 17: return $24r$1; - /* */ } return; } var $f = {$blk: unmarshalDefault, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, b, e, ed, err, ev, ev$1, evs, k, ok, pf, v, v$1, $s};return $f; - }; - defaultValue.ptr.prototype.get = function(fd) { - var {$24r, _1, _arg, _arg$1, _arg$2, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, dv, evs, fd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dv = this; - /* */ if (!dv.has) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!dv.has) { */ case 1: - _r = fd.Cardinality(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === 3) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r === 3) { */ case 3: - $s = -1; return new protoreflect.Value.ptr(arrayType$4.zero(), 0, new $Uint64(0, 0), "", sliceType$13.nil, $ifaceNil); - /* } */ case 4: - _r$1 = fd.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _1 = _r$1; - /* */ if (_1 === (8)) { $s = 8; continue; } - /* */ if ((_1 === (5)) || (_1 === (17)) || (_1 === (15))) { $s = 9; continue; } - /* */ if ((_1 === (3)) || (_1 === (18)) || (_1 === (16))) { $s = 10; continue; } - /* */ if ((_1 === (13)) || (_1 === (7))) { $s = 11; continue; } - /* */ if ((_1 === (4)) || (_1 === (6))) { $s = 12; continue; } - /* */ if (_1 === (2)) { $s = 13; continue; } - /* */ if (_1 === (1)) { $s = 14; continue; } - /* */ if (_1 === (9)) { $s = 15; continue; } - /* */ if (_1 === (12)) { $s = 16; continue; } - /* */ if (_1 === (14)) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_1 === (8)) { */ case 8: - $s = -1; return protoreflect.ValueOfBool(false); - /* } else if ((_1 === (5)) || (_1 === (17)) || (_1 === (15))) { */ case 9: - $s = -1; return protoreflect.ValueOfInt32(0); - /* } else if ((_1 === (3)) || (_1 === (18)) || (_1 === (16))) { */ case 10: - $s = -1; return protoreflect.ValueOfInt64(new $Int64(0, 0)); - /* } else if ((_1 === (13)) || (_1 === (7))) { */ case 11: - $s = -1; return protoreflect.ValueOfUint32(0); - /* } else if ((_1 === (4)) || (_1 === (6))) { */ case 12: - $s = -1; return protoreflect.ValueOfUint64(new $Uint64(0, 0)); - /* } else if (_1 === (2)) { */ case 13: - $s = -1; return protoreflect.ValueOfFloat32(0); - /* } else if (_1 === (1)) { */ case 14: - $s = -1; return protoreflect.ValueOfFloat64(0); - /* } else if (_1 === (9)) { */ case 15: - $s = -1; return protoreflect.ValueOfString(""); - /* } else if (_1 === (12)) { */ case 16: - $s = -1; return protoreflect.ValueOfBytes(sliceType$13.nil); - /* } else if (_1 === (14)) { */ case 17: - _r$2 = fd.Enum(); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.Values(); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - evs = _r$3; - _r$4 = evs.Len(); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 > 0) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_r$4 > 0) { */ case 21: - _r$5 = evs.Get(0); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Number(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protoreflect.ValueOfEnum(_r$6); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 27; case 27: return $24r; - /* } */ case 22: - $s = -1; return protoreflect.ValueOfEnum(0); - /* } */ case 18: - case 6: - /* } */ case 2: - if (!(dv.bytes.$length > 0)) { _v = false; $s = 30; continue s; } - _arg = dv.bytes; - _r$8 = $clone(dv.val, protoreflect.Value).Bytes(); /* */ $s = 31; case 31: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - _r$9 = bytes.Equal(_arg, _arg$1); /* */ $s = 32; case 32: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v = !_r$9; case 30: - /* */ if (_v) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (_v) { */ case 28: - _r$10 = fd.FullName(); /* */ $s = 33; case 33: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.FullName(_r$10); - _r$11 = fmt.Sprintf("detected mutation on the default bytes for %v", new sliceType$12([_arg$2])); /* */ $s = 34; case 34: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $panic(new $String(_r$11)); - /* } */ case 29: - $s = -1; return dv.val; - /* */ } return; } var $f = {$blk: defaultValue.ptr.prototype.get, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, dv, evs, fd, $s};return $f; - }; - defaultValue.prototype.get = function(fd) { return this.$val.get(fd); }; - Builder.ptr.prototype.Build = function() { - var {_r, _r$1, db, err, fd, out, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new Out.ptr($ifaceNil, sliceType$8.nil, sliceType$5.nil, sliceType$10.nil, sliceType$11.nil); - db = this; - if ((((db.NumEnums + db.NumMessages >> 0) + db.NumExtensions >> 0) + db.NumServices >> 0) === 0) { - db.unmarshalCounts(db.RawDescriptor, true); - } - if ($interfaceIsEqual(db.TypeResolver, $ifaceNil)) { - db.TypeResolver = protoregistry.GlobalTypes; - } - if ($interfaceIsEqual(db.FileRegistry, $ifaceNil)) { - db.FileRegistry = protoregistry.GlobalFiles; - } - _r = newRawFile($clone(db, Builder)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - fd = _r; - out.File = fd; - out.Enums = fd.fileRaw.allEnums; - out.Messages = fd.fileRaw.allMessages; - out.Extensions = fd.fileRaw.allExtensions; - out.Services = fd.fileRaw.allServices; - _r$1 = db.FileRegistry.RegisterFile(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - Out.copy(out, out); - $s = -1; return out; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.Build, $c: true, $r, _r, _r$1, db, err, fd, out, $s};return $f; - }; - Builder.prototype.Build = function() { return this.$val.Build(); }; - Builder.ptr.prototype.unmarshalCounts = function(b, isFile) { - var _1, _2, _3, _tuple, _tuple$1, b, db, isFile, m, m$1, n, num, typ, v; - db = this; - while (true) { - if (!(b.$length > 0)) { break; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - typ = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - _1 = typ; - if (_1 === (2)) { - _tuple$1 = protowire.ConsumeBytes(b); - v = _tuple$1[0]; - m = _tuple$1[1]; - b = $subslice(b, m); - if (isFile) { - _2 = num; - if (_2 === (5)) { - db.NumEnums = db.NumEnums + (1) >> 0; - } else if (_2 === (4)) { - db.unmarshalCounts(v, false); - db.NumMessages = db.NumMessages + (1) >> 0; - } else if (_2 === (7)) { - db.NumExtensions = db.NumExtensions + (1) >> 0; - } else if (_2 === (6)) { - db.NumServices = db.NumServices + (1) >> 0; - } - } else { - _3 = num; - if (_3 === (4)) { - db.NumEnums = db.NumEnums + (1) >> 0; - } else if (_3 === (3)) { - db.unmarshalCounts(v, false); - db.NumMessages = db.NumMessages + (1) >> 0; - } else if (_3 === (6)) { - db.NumExtensions = db.NumExtensions + (1) >> 0; - } - } - } else { - m$1 = protowire.ConsumeFieldValue(num, typ, b); - b = $subslice(b, m$1); - } - } - }; - Builder.prototype.unmarshalCounts = function(b, isFile) { return this.$val.unmarshalCounts(b, isFile); }; - PlaceholderFile.methods = [{prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Path", name: "Path", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Package", name: "Package", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "Imports", name: "Imports", pkg: "", typ: $funcType([], [protoreflect.FileImports], false)}, {prop: "Messages", name: "Messages", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptors], false)}, {prop: "Enums", name: "Enums", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptors], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [protoreflect.ExtensionDescriptors], false)}, {prop: "Services", name: "Services", pkg: "", typ: $funcType([], [protoreflect.ServiceDescriptors], false)}, {prop: "SourceLocations", name: "SourceLocations", pkg: "", typ: $funcType([], [protoreflect.SourceLocations], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.FileDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - PlaceholderEnum.methods = [{prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([], [protoreflect.EnumValueDescriptors], false)}, {prop: "ReservedNames", name: "ReservedNames", pkg: "", typ: $funcType([], [protoreflect.Names], false)}, {prop: "ReservedRanges", name: "ReservedRanges", pkg: "", typ: $funcType([], [protoreflect.EnumRanges], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.EnumDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - PlaceholderEnumValue.methods = [{prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protoreflect.EnumNumber], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.EnumValueDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - PlaceholderMessage.methods = [{prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "IsMapEntry", name: "IsMapEntry", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Fields", name: "Fields", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptors], false)}, {prop: "Oneofs", name: "Oneofs", pkg: "", typ: $funcType([], [protoreflect.OneofDescriptors], false)}, {prop: "ReservedNames", name: "ReservedNames", pkg: "", typ: $funcType([], [protoreflect.Names], false)}, {prop: "ReservedRanges", name: "ReservedRanges", pkg: "", typ: $funcType([], [protoreflect.FieldRanges], false)}, {prop: "RequiredNumbers", name: "RequiredNumbers", pkg: "", typ: $funcType([], [protoreflect.FieldNumbers], false)}, {prop: "ExtensionRanges", name: "ExtensionRanges", pkg: "", typ: $funcType([], [protoreflect.FieldRanges], false)}, {prop: "ExtensionRangeOptions", name: "ExtensionRangeOptions", pkg: "", typ: $funcType([$Int], [protoreflect.ProtoMessage], false)}, {prop: "Messages", name: "Messages", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptors], false)}, {prop: "Enums", name: "Enums", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptors], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [protoreflect.ExtensionDescriptors], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.MessageDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$13.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.EnumDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.EnumDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$13], false)}]; - ptrType$14.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.EnumValueDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.EnumValueDescriptor], false)}, {prop: "ByNumber", name: "ByNumber", pkg: "", typ: $funcType([protoreflect.EnumNumber], [protoreflect.EnumValueDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$14], false)}]; - ptrType$15.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.MessageDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.MessageDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$15], false)}]; - ptrType$16.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.FieldDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.FieldDescriptor], false)}, {prop: "ByJSONName", name: "ByJSONName", pkg: "", typ: $funcType([$String], [protoreflect.FieldDescriptor], false)}, {prop: "ByTextName", name: "ByTextName", pkg: "", typ: $funcType([$String], [protoreflect.FieldDescriptor], false)}, {prop: "ByNumber", name: "ByNumber", pkg: "", typ: $funcType([protowire.Number], [protoreflect.FieldDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$16], false)}]; - ptrType$17.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.OneofDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.OneofDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$17], false)}]; - ptrType$18.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.FieldDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.FieldDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$18], false)}]; - ptrType$19.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.ServiceDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.ServiceDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$19], false)}]; - ptrType$20.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.MethodDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.MethodDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$20], false)}]; - ptrType.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.FileImport], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$21.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.Name], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.Name], [$Bool], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$21], false)}, {prop: "CheckValid", name: "CheckValid", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$22.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [arrayType], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.EnumNumber], [$Bool], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$22], false)}, {prop: "CheckValid", name: "CheckValid", pkg: "", typ: $funcType([], [$error], false)}]; - enumRange.methods = [{prop: "Start", name: "Start", pkg: "", typ: $funcType([], [protoreflect.EnumNumber], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [protoreflect.EnumNumber], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$23.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [arrayType$1], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protowire.Number], [$Bool], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$23], false)}, {prop: "CheckValid", name: "CheckValid", pkg: "", typ: $funcType([$Bool], [$error], false)}, {prop: "CheckOverlap", name: "CheckOverlap", pkg: "", typ: $funcType([ptrType$23], [$error], false)}]; - fieldRange.methods = [{prop: "Start", name: "Start", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$24.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protowire.Number], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protowire.Number], [$Bool], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$25.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.FieldDescriptor], false)}, {prop: "ByName", name: "ByName", pkg: "", typ: $funcType([protoreflect.Name], [protoreflect.FieldDescriptor], false)}, {prop: "ByJSONName", name: "ByJSONName", pkg: "", typ: $funcType([$String], [protoreflect.FieldDescriptor], false)}, {prop: "ByTextName", name: "ByTextName", pkg: "", typ: $funcType([$String], [protoreflect.FieldDescriptor], false)}, {prop: "ByNumber", name: "ByNumber", pkg: "", typ: $funcType([protowire.Number], [protoreflect.FieldDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$25], false)}]; - ptrType$26.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.SourceLocation], false)}, {prop: "byKey", name: "byKey", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([pathKey], [protoreflect.SourceLocation], false)}, {prop: "ByPath", name: "ByPath", pkg: "", typ: $funcType([protoreflect.SourcePath], [protoreflect.SourceLocation], false)}, {prop: "ByDescriptor", name: "ByDescriptor", pkg: "", typ: $funcType([protoreflect.Descriptor], [protoreflect.SourceLocation], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$26], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$27.methods = [{prop: "lazyRawInit", name: "lazyRawInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [], false)}, {prop: "resolveMessages", name: "resolveMessages", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [], false)}, {prop: "resolveExtensions", name: "resolveExtensions", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [], false)}, {prop: "resolveServices", name: "resolveServices", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [], false)}, {prop: "resolveEnumDependency", name: "resolveEnumDependency", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([protoreflect.EnumDescriptor, $Int32, $Int32], [protoreflect.EnumDescriptor], false)}, {prop: "resolveMessageDependency", name: "resolveMessageDependency", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([protoreflect.MessageDescriptor, $Int32, $Int32], [protoreflect.MessageDescriptor], false)}, {prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13], [], false)}, {prop: "initDecls", name: "initDecls", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([$Int32, $Int32, $Int32, $Int32], [], false)}, {prop: "allocEnums", name: "allocEnums", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([$Int], [sliceType$8], false)}, {prop: "allocMessages", name: "allocMessages", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([$Int], [sliceType$5], false)}, {prop: "allocExtensions", name: "allocExtensions", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([$Int], [sliceType$10], false)}, {prop: "allocServices", name: "allocServices", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([$Int], [sliceType$11], false)}, {prop: "checkDecls", name: "checkDecls", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [], false)}, {prop: "unmarshalSeed", name: "unmarshalSeed", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13], [], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Path", name: "Path", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Package", name: "Package", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "Imports", name: "Imports", pkg: "", typ: $funcType([], [protoreflect.FileImports], false)}, {prop: "Enums", name: "Enums", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptors], false)}, {prop: "Messages", name: "Messages", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptors], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [protoreflect.ExtensionDescriptors], false)}, {prop: "Services", name: "Services", pkg: "", typ: $funcType([], [protoreflect.ServiceDescriptors], false)}, {prop: "SourceLocations", name: "SourceLocations", pkg: "", typ: $funcType([], [protoreflect.SourceLocations], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.FileDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$1], false)}, {prop: "lazyInitOnce", name: "lazyInitOnce", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [], false)}, {prop: "GoPackagePath", name: "GoPackagePath", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$2.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11], [], false)}, {prop: "unmarshalSeed", name: "unmarshalSeed", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([], [protoreflect.EnumValueDescriptors], false)}, {prop: "ReservedNames", name: "ReservedNames", pkg: "", typ: $funcType([], [protoreflect.Names], false)}, {prop: "ReservedRanges", name: "ReservedRanges", pkg: "", typ: $funcType([], [protoreflect.EnumRanges], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.EnumDescriptor], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$28], false)}]; - ptrType$3.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protoreflect.EnumNumber], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.EnumValueDescriptor], [], false)}]; - ptrType$4.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11], [], false)}, {prop: "unmarshalOptions", name: "unmarshalOptions", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13], [], false)}, {prop: "unmarshalSeed", name: "unmarshalSeed", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "unmarshalSeedOptions", name: "unmarshalSeedOptions", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "IsMapEntry", name: "IsMapEntry", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Fields", name: "Fields", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptors], false)}, {prop: "Oneofs", name: "Oneofs", pkg: "", typ: $funcType([], [protoreflect.OneofDescriptors], false)}, {prop: "ReservedNames", name: "ReservedNames", pkg: "", typ: $funcType([], [protoreflect.Names], false)}, {prop: "ReservedRanges", name: "ReservedRanges", pkg: "", typ: $funcType([], [protoreflect.FieldRanges], false)}, {prop: "RequiredNumbers", name: "RequiredNumbers", pkg: "", typ: $funcType([], [protoreflect.FieldNumbers], false)}, {prop: "ExtensionRanges", name: "ExtensionRanges", pkg: "", typ: $funcType([], [protoreflect.FieldRanges], false)}, {prop: "ExtensionRangeOptions", name: "ExtensionRangeOptions", pkg: "", typ: $funcType([$Int], [protoreflect.ProtoMessage], false)}, {prop: "Enums", name: "Enums", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptors], false)}, {prop: "Messages", name: "Messages", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptors], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [protoreflect.ExtensionDescriptors], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.MessageDescriptor], [], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$29], false)}, {prop: "IsMessageSet", name: "IsMessageSet", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$5.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "unmarshalOptions", name: "unmarshalOptions", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "Cardinality", name: "Cardinality", pkg: "", typ: $funcType([], [protoreflect.Cardinality], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [protoreflect.Kind], false)}, {prop: "HasJSONName", name: "HasJSONName", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "JSONName", name: "JSONName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TextName", name: "TextName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "HasPresence", name: "HasPresence", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasOptionalKeyword", name: "HasOptionalKeyword", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPacked", name: "IsPacked", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsExtension", name: "IsExtension", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsWeak", name: "IsWeak", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsList", name: "IsList", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMap", name: "IsMap", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "MapKey", name: "MapKey", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}, {prop: "MapValue", name: "MapValue", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}, {prop: "HasDefault", name: "HasDefault", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Default", name: "Default", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "DefaultEnumValue", name: "DefaultEnumValue", pkg: "", typ: $funcType([], [protoreflect.EnumValueDescriptor], false)}, {prop: "ContainingOneof", name: "ContainingOneof", pkg: "", typ: $funcType([], [protoreflect.OneofDescriptor], false)}, {prop: "ContainingMessage", name: "ContainingMessage", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptor], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [], false)}, {prop: "EnforceUTF8", name: "EnforceUTF8", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$6.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "IsSynthetic", name: "IsSynthetic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Fields", name: "Fields", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptors], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.OneofDescriptor], [], false)}]; - ptrType$7.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11], [], false)}, {prop: "unmarshalOptions", name: "unmarshalOptions", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13], [], false)}, {prop: "unmarshalSeed", name: "unmarshalSeed", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "Cardinality", name: "Cardinality", pkg: "", typ: $funcType([], [protoreflect.Cardinality], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [protoreflect.Kind], false)}, {prop: "HasJSONName", name: "HasJSONName", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "JSONName", name: "JSONName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TextName", name: "TextName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "HasPresence", name: "HasPresence", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasOptionalKeyword", name: "HasOptionalKeyword", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPacked", name: "IsPacked", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsExtension", name: "IsExtension", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsWeak", name: "IsWeak", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsList", name: "IsList", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMap", name: "IsMap", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "MapKey", name: "MapKey", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}, {prop: "MapValue", name: "MapValue", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}, {prop: "HasDefault", name: "HasDefault", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Default", name: "Default", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "DefaultEnumValue", name: "DefaultEnumValue", pkg: "", typ: $funcType([], [protoreflect.EnumValueDescriptor], false)}, {prop: "ContainingOneof", name: "ContainingOneof", pkg: "", typ: $funcType([], [protoreflect.OneofDescriptor], false)}, {prop: "ContainingMessage", name: "ContainingMessage", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptor], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$30], false)}]; - ptrType$8.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11], [], false)}, {prop: "unmarshalSeed", name: "unmarshalSeed", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Methods", name: "Methods", pkg: "", typ: $funcType([], [protoreflect.MethodDescriptors], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.ServiceDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([], [ptrType$31], false)}]; - ptrType$9.methods = [{prop: "unmarshalFull", name: "unmarshalFull", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, ptrType$11, ptrType$27, protoreflect.Descriptor, $Int], [], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Input", name: "Input", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Output", name: "Output", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "IsStreamingClient", name: "IsStreamingClient", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsStreamingServer", name: "IsStreamingServer", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.MethodDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$32.methods = [{prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$33.methods = [{prop: "InitJSON", name: "InitJSON", pkg: "", typ: $funcType([$String], [], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([protoreflect.FieldDescriptor], [ptrType$33], false)}, {prop: "getJSON", name: "getJSON", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([protoreflect.FieldDescriptor], [$String], false)}, {prop: "getText", name: "getText", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([protoreflect.FieldDescriptor], [$String], false)}]; - ptrType$34.methods = [{prop: "get", name: "get", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}]; - Builder.methods = [{prop: "Build", name: "Build", pkg: "", typ: $funcType([], [Out], false)}]; - ptrType$35.methods = [{prop: "optionsUnmarshaler", name: "optionsUnmarshaler", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([ptrType$10, sliceType$13], [funcType], false)}, {prop: "unmarshalCounts", name: "unmarshalCounts", pkg: "google.golang.org/protobuf/internal/filedesc", typ: $funcType([sliceType$13, $Bool], [], false)}]; - Enums.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$8, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType, tag: ""}]); - EnumValues.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$9, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "byNum", name: "byNum", embedded: false, exported: false, typ: mapType$2, tag: ""}]); - Messages.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$3, tag: ""}]); - Fields.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$6, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$4, tag: ""}, {prop: "byJSON", name: "byJSON", embedded: false, exported: false, typ: mapType$5, tag: ""}, {prop: "byText", name: "byText", embedded: false, exported: false, typ: mapType$5, tag: ""}, {prop: "byNum", name: "byNum", embedded: false, exported: false, typ: mapType$6, tag: ""}]); - Oneofs.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$7, tag: ""}]); - Extensions.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$10, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$8, tag: ""}]); - Services.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$9, tag: ""}]); - Methods.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$19, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$10, tag: ""}]); - FileImports.init(protoreflect.FileImport); - Names.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "has", name: "has", embedded: false, exported: false, typ: mapType$11, tag: ""}]); - EnumRanges.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "sorted", name: "sorted", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - enumRange.init(protoreflect.EnumNumber, 2); - FieldRanges.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "sorted", name: "sorted", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - fieldRange.init(protowire.Number, 2); - FieldNumbers.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "has", name: "has", embedded: false, exported: false, typ: mapType$12, tag: ""}]); - OneofFields.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$20, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$13, tag: ""}, {prop: "byJSON", name: "byJSON", embedded: false, exported: false, typ: mapType$14, tag: ""}, {prop: "byText", name: "byText", embedded: false, exported: false, typ: mapType$14, tag: ""}, {prop: "byNum", name: "byNum", embedded: false, exported: false, typ: mapType$15, tag: ""}]); - SourceLocations.init("google.golang.org/protobuf/internal/filedesc", [{prop: "List", name: "List", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: protoreflect.FileDescriptor, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "byPath", name: "byPath", embedded: false, exported: false, typ: mapType$16, tag: ""}]); - pathKey.init("google.golang.org/protobuf/internal/filedesc", [{prop: "arr", name: "arr", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}]); - fileRaw.init("google.golang.org/protobuf/internal/filedesc", [{prop: "builder", name: "builder", embedded: false, exported: false, typ: Builder, tag: ""}, {prop: "allEnums", name: "allEnums", embedded: false, exported: false, typ: sliceType$8, tag: ""}, {prop: "allMessages", name: "allMessages", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "allExtensions", name: "allExtensions", embedded: false, exported: false, typ: sliceType$10, tag: ""}, {prop: "allServices", name: "allServices", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); - File.init("google.golang.org/protobuf/internal/filedesc", [{prop: "fileRaw", name: "fileRaw", embedded: true, exported: false, typ: fileRaw, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: FileL1, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "L2", name: "L2", embedded: false, exported: true, typ: ptrType$1, tag: ""}]); - FileL1.init("", [{prop: "Syntax", name: "Syntax", embedded: false, exported: true, typ: protoreflect.Syntax, tag: ""}, {prop: "Path", name: "Path", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Package", name: "Package", embedded: false, exported: true, typ: protoreflect.FullName, tag: ""}, {prop: "Enums", name: "Enums", embedded: false, exported: true, typ: Enums, tag: ""}, {prop: "Messages", name: "Messages", embedded: false, exported: true, typ: Messages, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: Extensions, tag: ""}, {prop: "Services", name: "Services", embedded: false, exported: true, typ: Services, tag: ""}]); - FileL2.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Imports", name: "Imports", embedded: false, exported: true, typ: FileImports, tag: ""}, {prop: "Locations", name: "Locations", embedded: false, exported: true, typ: SourceLocations, tag: ""}]); - Enum.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: EnumL1, tag: ""}, {prop: "L2", name: "L2", embedded: false, exported: true, typ: ptrType$28, tag: ""}]); - EnumL1.init("google.golang.org/protobuf/internal/filedesc", [{prop: "eagerValues", name: "eagerValues", embedded: false, exported: false, typ: $Bool, tag: ""}]); - EnumL2.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Values", name: "Values", embedded: false, exported: true, typ: EnumValues, tag: ""}, {prop: "ReservedNames", name: "ReservedNames", embedded: false, exported: true, typ: Names, tag: ""}, {prop: "ReservedRanges", name: "ReservedRanges", embedded: false, exported: true, typ: EnumRanges, tag: ""}]); - EnumValue.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: EnumValueL1, tag: ""}]); - EnumValueL1.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Number", name: "Number", embedded: false, exported: true, typ: protoreflect.EnumNumber, tag: ""}]); - Message.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: MessageL1, tag: ""}, {prop: "L2", name: "L2", embedded: false, exported: true, typ: ptrType$29, tag: ""}]); - MessageL1.init("", [{prop: "Enums", name: "Enums", embedded: false, exported: true, typ: Enums, tag: ""}, {prop: "Messages", name: "Messages", embedded: false, exported: true, typ: Messages, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: Extensions, tag: ""}, {prop: "IsMapEntry", name: "IsMapEntry", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsMessageSet", name: "IsMessageSet", embedded: false, exported: true, typ: $Bool, tag: ""}]); - MessageL2.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Fields", name: "Fields", embedded: false, exported: true, typ: Fields, tag: ""}, {prop: "Oneofs", name: "Oneofs", embedded: false, exported: true, typ: Oneofs, tag: ""}, {prop: "ReservedNames", name: "ReservedNames", embedded: false, exported: true, typ: Names, tag: ""}, {prop: "ReservedRanges", name: "ReservedRanges", embedded: false, exported: true, typ: FieldRanges, tag: ""}, {prop: "RequiredNumbers", name: "RequiredNumbers", embedded: false, exported: true, typ: FieldNumbers, tag: ""}, {prop: "ExtensionRanges", name: "ExtensionRanges", embedded: false, exported: true, typ: FieldRanges, tag: ""}, {prop: "ExtensionRangeOptions", name: "ExtensionRangeOptions", embedded: false, exported: true, typ: sliceType$18, tag: ""}]); - Field.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: FieldL1, tag: ""}]); - FieldL1.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Number", name: "Number", embedded: false, exported: true, typ: protowire.Number, tag: ""}, {prop: "Cardinality", name: "Cardinality", embedded: false, exported: true, typ: protoreflect.Cardinality, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: protoreflect.Kind, tag: ""}, {prop: "StringName", name: "StringName", embedded: false, exported: true, typ: stringName, tag: ""}, {prop: "IsProto3Optional", name: "IsProto3Optional", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsWeak", name: "IsWeak", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasPacked", name: "HasPacked", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsPacked", name: "IsPacked", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HasEnforceUTF8", name: "HasEnforceUTF8", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "EnforceUTF8", name: "EnforceUTF8", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Default", name: "Default", embedded: false, exported: true, typ: defaultValue, tag: ""}, {prop: "ContainingOneof", name: "ContainingOneof", embedded: false, exported: true, typ: protoreflect.OneofDescriptor, tag: ""}, {prop: "Enum", name: "Enum", embedded: false, exported: true, typ: protoreflect.EnumDescriptor, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.MessageDescriptor, tag: ""}]); - Oneof.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: OneofL1, tag: ""}]); - OneofL1.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Fields", name: "Fields", embedded: false, exported: true, typ: OneofFields, tag: ""}]); - Extension.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: ExtensionL1, tag: ""}, {prop: "L2", name: "L2", embedded: false, exported: true, typ: ptrType$30, tag: ""}]); - ExtensionL1.init("", [{prop: "Number", name: "Number", embedded: false, exported: true, typ: protowire.Number, tag: ""}, {prop: "Extendee", name: "Extendee", embedded: false, exported: true, typ: protoreflect.MessageDescriptor, tag: ""}, {prop: "Cardinality", name: "Cardinality", embedded: false, exported: true, typ: protoreflect.Cardinality, tag: ""}, {prop: "Kind", name: "Kind", embedded: false, exported: true, typ: protoreflect.Kind, tag: ""}]); - ExtensionL2.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "StringName", name: "StringName", embedded: false, exported: true, typ: stringName, tag: ""}, {prop: "IsProto3Optional", name: "IsProto3Optional", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsPacked", name: "IsPacked", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Default", name: "Default", embedded: false, exported: true, typ: defaultValue, tag: ""}, {prop: "Enum", name: "Enum", embedded: false, exported: true, typ: protoreflect.EnumDescriptor, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.MessageDescriptor, tag: ""}]); - Service.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: ServiceL1, tag: ""}, {prop: "L2", name: "L2", embedded: false, exported: true, typ: ptrType$31, tag: ""}]); - ServiceL1.init("", []); - ServiceL2.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Methods", name: "Methods", embedded: false, exported: true, typ: Methods, tag: ""}]); - Method.init("", [{prop: "Base", name: "Base", embedded: true, exported: true, typ: Base, tag: ""}, {prop: "L1", name: "L1", embedded: false, exported: true, typ: MethodL1, tag: ""}]); - MethodL1.init("", [{prop: "Options", name: "Options", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Input", name: "Input", embedded: false, exported: true, typ: protoreflect.MessageDescriptor, tag: ""}, {prop: "Output", name: "Output", embedded: false, exported: true, typ: protoreflect.MessageDescriptor, tag: ""}, {prop: "IsStreamingClient", name: "IsStreamingClient", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsStreamingServer", name: "IsStreamingServer", embedded: false, exported: true, typ: $Bool, tag: ""}]); - Base.init("", [{prop: "L0", name: "L0", embedded: false, exported: true, typ: BaseL0, tag: ""}]); - BaseL0.init("", [{prop: "FullName", name: "FullName", embedded: false, exported: true, typ: protoreflect.FullName, tag: ""}, {prop: "ParentFile", name: "ParentFile", embedded: false, exported: true, typ: ptrType$27, tag: ""}, {prop: "Parent", name: "Parent", embedded: false, exported: true, typ: protoreflect.Descriptor, tag: ""}, {prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}]); - stringName.init("google.golang.org/protobuf/internal/filedesc", [{prop: "hasJSON", name: "hasJSON", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "nameJSON", name: "nameJSON", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "nameText", name: "nameText", embedded: false, exported: false, typ: $String, tag: ""}]); - defaultValue.init("google.golang.org/protobuf/internal/filedesc", [{prop: "has", name: "has", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "val", name: "val", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}, {prop: "enum$2", name: "enum", embedded: false, exported: false, typ: protoreflect.EnumValueDescriptor, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: sliceType$13, tag: ""}]); - Builder.init("", [{prop: "GoPackagePath", name: "GoPackagePath", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RawDescriptor", name: "RawDescriptor", embedded: false, exported: true, typ: sliceType$13, tag: ""}, {prop: "NumEnums", name: "NumEnums", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "NumMessages", name: "NumMessages", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "NumExtensions", name: "NumExtensions", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "NumServices", name: "NumServices", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "TypeResolver", name: "TypeResolver", embedded: false, exported: true, typ: interfaceType, tag: ""}, {prop: "FileRegistry", name: "FileRegistry", embedded: false, exported: true, typ: interfaceType$1, tag: ""}]); - resolverByIndex.init([{prop: "FindEnumByIndex", name: "FindEnumByIndex", pkg: "", typ: $funcType([$Int32, $Int32, sliceType$8, sliceType$5], [protoreflect.EnumDescriptor], false)}, {prop: "FindMessageByIndex", name: "FindMessageByIndex", pkg: "", typ: $funcType([$Int32, $Int32, sliceType$8, sliceType$5], [protoreflect.MessageDescriptor], false)}]); - Out.init("", [{prop: "File", name: "File", embedded: false, exported: true, typ: protoreflect.FileDescriptor, tag: ""}, {prop: "Enums", name: "Enums", embedded: false, exported: true, typ: sliceType$8, tag: ""}, {prop: "Messages", name: "Messages", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$10, tag: ""}, {prop: "Services", name: "Services", embedded: false, exported: true, typ: sliceType$11, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protowire.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = descfmt.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = descopts.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = defval.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = messageset.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = genid.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pragma.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strs.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = proto.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoregistry.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - emptyNames = new Names.ptr(sliceType.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptyEnumRanges = new EnumRanges.ptr(sliceType$1.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$1.nil); - emptyFieldRanges = new FieldRanges.ptr(sliceType$2.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$2.nil); - emptyFieldNumbers = new FieldNumbers.ptr(sliceType$3.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptySourceLocations = new SourceLocations.ptr(sliceType$4.nil, $ifaceNil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptyFiles = $newDataPointer(FileImports.nil, ptrType); - emptyMessages = new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptyFields = new Fields.ptr(sliceType$6.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false); - emptyOneofs = new Oneofs.ptr(sliceType$7.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptyEnums = new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptyEnumValues = new EnumValues.ptr(sliceType$9.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false); - emptyExtensions = new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - emptyServices = new Services.ptr(sliceType$11.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false); - nameBuilderPool = new sync.Pool.ptr(sliceType$12.nil, (function() { - return new strs.Builder.ptr(); - })); - $pkg.SurrogateProto2 = new File.ptr(new fileRaw.ptr(new Builder.ptr("", sliceType$13.nil, 0, 0, 0, 0, $ifaceNil, $ifaceNil), sliceType$8.nil, sliceType$5.nil, sliceType$10.nil, sliceType$11.nil), new FileL1.ptr(2, "", "", new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Services.ptr(sliceType$11.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false)), 0, new sync.Mutex.ptr(0, 0), new FileL2.ptr($throwNilPointerError, FileImports.nil, new SourceLocations.ptr(sliceType$4.nil, $ifaceNil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false))); - $pkg.SurrogateProto3 = new File.ptr(new fileRaw.ptr(new Builder.ptr("", sliceType$13.nil, 0, 0, 0, 0, $ifaceNil, $ifaceNil), sliceType$8.nil, sliceType$5.nil, sliceType$10.nil, sliceType$11.nil), new FileL1.ptr(3, "", "", new Enums.ptr(sliceType$8.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Messages.ptr(sliceType$5.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Extensions.ptr(sliceType$10.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new Services.ptr(sliceType$11.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false)), 0, new sync.Mutex.ptr(0, 0), new FileL2.ptr($throwNilPointerError, FileImports.nil, new SourceLocations.ptr(sliceType$4.nil, $ifaceNil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false))); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["hash/crc32"] = (function() { - var $pkg = {}, $init, errors, hash, sync, atomic, slicing8Table, Table, ptrType, ptrType$1, arrayType, arrayType$1, ptrType$2, castagnoliTable, updateCastagnoli, haveCastagnoli, haveCastagnoli$24ptr, ieeeTable8, ieeeArchImpl, updateIEEE, ieeeOnce, archAvailableIEEE, archInitIEEE, archUpdateIEEE, simpleMakeTable, simplePopulateTable, simpleUpdate, slicingMakeTable, slicingUpdate, ieeeInit, Update, ChecksumIEEE; - errors = $packages["errors"]; - hash = $packages["hash"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - slicing8Table = $pkg.slicing8Table = $newType(8192, $kindArray, "crc32.slicing8Table", true, "hash/crc32", false, null); - Table = $pkg.Table = $newType(1024, $kindArray, "crc32.Table", true, "hash/crc32", true, null); - ptrType = $ptrType(Table); - ptrType$1 = $ptrType(slicing8Table); - arrayType = $arrayType($Uint32, 256); - arrayType$1 = $arrayType(Table, 8); - ptrType$2 = $ptrType($Uint32); - archAvailableIEEE = function() { - return false; - }; - archInitIEEE = function() { - $panic(new $String("not available")); - }; - archUpdateIEEE = function(crc, p) { - var crc, p; - $panic(new $String("not available")); - }; - simpleMakeTable = function(poly) { - var poly, t; - t = arrayType.zero(); - simplePopulateTable(poly, t); - return t; - }; - simplePopulateTable = function(poly, t) { - var crc, i, j, poly, t, y; - i = 0; - while (true) { - if (!(i < 256)) { break; } - crc = ((i >>> 0)); - j = 0; - while (true) { - if (!(j < 8)) { break; } - if (((crc & 1) >>> 0) === 1) { - crc = (((crc >>> 1 >>> 0)) ^ poly) >>> 0; - } else { - crc = (y = (1), y < 32 ? (crc >>> y) : 0) >>> 0; - } - j = j + (1) >> 0; - } - t.nilCheck, ((i < 0 || i >= t.length) ? ($throwRuntimeError("index out of range"), undefined) : t[i] = crc); - i = i + (1) >> 0; - } - }; - simpleUpdate = function(crc, tab, p) { - var _i, _ref, crc, p, tab, v, x, x$1; - crc = ~crc >>> 0; - _ref = p; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - crc = ((x = tab, x$1 = (((crc << 24 >>> 24)) ^ v) << 24 >>> 24, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) ^ ((crc >>> 8 >>> 0))) >>> 0; - _i++; - } - return ~crc >>> 0; - }; - slicingMakeTable = function(poly) { - var crc, i, j, poly, t, x, x$1, x$2, x$3, x$4; - t = arrayType$1.zero(); - simplePopulateTable(poly, t[0]); - i = 0; - while (true) { - if (!(i < 256)) { break; } - crc = (x = t[0], ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])); - j = 1; - while (true) { - if (!(j < 8)) { break; } - crc = ((x$1 = t[0], x$2 = (crc & 255) >>> 0, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])) ^ ((crc >>> 8 >>> 0))) >>> 0; - (x$3 = (x$4 = t, ((j < 0 || j >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[j])), ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i] = crc)); - j = j + (1) >> 0; - } - i = i + (1) >> 0; - } - return t; - }; - slicingUpdate = function(crc, tab, p) { - var crc, p, tab, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - if (p.$length >= 16) { - crc = ~crc >>> 0; - while (true) { - if (!(p.$length > 8)) { break; } - crc = (crc ^ ((((((((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) >>> 0)) | ((((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3]) >>> 0)) << 24 >>> 0)) >>> 0))) >>> 0; - crc = ((((((((((((((x = tab[0], x$1 = (7 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 7]), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) ^ (x$2 = tab[1], x$3 = (6 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 6]), ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))) >>> 0) ^ (x$4 = tab[2], x$5 = (5 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 5]), ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5]))) >>> 0) ^ (x$6 = tab[3], x$7 = (4 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 4]), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))) >>> 0) ^ (x$8 = tab[4], x$9 = crc >>> 24 >>> 0, ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9]))) >>> 0) ^ (x$10 = tab[5], x$11 = (((crc >>> 16 >>> 0)) & 255) >>> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))) >>> 0) ^ (x$12 = tab[6], x$13 = (((crc >>> 8 >>> 0)) & 255) >>> 0, ((x$13 < 0 || x$13 >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[x$13]))) >>> 0) ^ (x$14 = tab[7], x$15 = (crc & 255) >>> 0, ((x$15 < 0 || x$15 >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[x$15]))) >>> 0; - p = $subslice(p, 8); - } - crc = ~crc >>> 0; - } - if (p.$length === 0) { - return crc; - } - return simpleUpdate(crc, tab[0], p); - }; - ieeeInit = function() { - ieeeArchImpl = archAvailableIEEE(); - if (ieeeArchImpl) { - archInitIEEE(); - updateIEEE = archUpdateIEEE; - } else { - ieeeTable8 = slicingMakeTable(3988292384); - updateIEEE = (function(crc, p) { - var crc, p; - return slicingUpdate(crc, ieeeTable8, p); - }); - } - }; - Update = function(crc, tab, p) { - var {$24r, $24r$1, _r, _r$1, crc, p, tab, $s, $r, $c} = $restore(this, {crc, tab, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((atomic.LoadUint32((haveCastagnoli$24ptr || (haveCastagnoli$24ptr = new ptrType$2(function() { return haveCastagnoli; }, function($v) { haveCastagnoli = $v; })))) === 0)) && tab === castagnoliTable) { $s = 2; continue; } - /* */ if (tab === $pkg.IEEETable) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((atomic.LoadUint32((haveCastagnoli$24ptr || (haveCastagnoli$24ptr = new ptrType$2(function() { return haveCastagnoli; }, function($v) { haveCastagnoli = $v; })))) === 0)) && tab === castagnoliTable) { */ case 2: - _r = updateCastagnoli(crc, p); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if (tab === $pkg.IEEETable) { */ case 3: - $r = ieeeOnce.Do(ieeeInit); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = updateIEEE(crc, p); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 10; case 10: return $24r$1; - /* } else { */ case 4: - $s = -1; return simpleUpdate(crc, tab, p); - /* } */ case 5: - case 1: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Update, $c: true, $r, $24r, $24r$1, _r, _r$1, crc, p, tab, $s};return $f; - }; - $pkg.Update = Update; - ChecksumIEEE = function(data) { - var {$24r, _r, data, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = ieeeOnce.Do(ieeeInit); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = updateIEEE(0, data); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: ChecksumIEEE, $c: true, $r, $24r, _r, data, $s};return $f; - }; - $pkg.ChecksumIEEE = ChecksumIEEE; - slicing8Table.init(Table, 8); - Table.init($Uint32, 256); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - castagnoliTable = ptrType.nil; - updateCastagnoli = $throwNilPointerError; - haveCastagnoli = 0; - ieeeTable8 = ptrType$1.nil; - ieeeArchImpl = false; - updateIEEE = $throwNilPointerError; - ieeeOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - $pkg.IEEETable = simpleMakeTable(3988292384); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["compress/gzip"] = (function() { - var $pkg = {}, $init, bufio, flate, binary, errors, fmt, crc32, io, time, Header, Reader, sliceType$1, ptrType$1, arrayType$1, ptrType$3, sliceType$2, le, noEOF, NewReader; - bufio = $packages["bufio"]; - flate = $packages["compress/flate"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - crc32 = $packages["hash/crc32"]; - io = $packages["io"]; - time = $packages["time"]; - Header = $pkg.Header = $newType(0, $kindStruct, "gzip.Header", true, "compress/gzip", true, function(Comment_, Extra_, ModTime_, Name_, OS_) { - this.$val = this; - if (arguments.length === 0) { - this.Comment = ""; - this.Extra = sliceType$1.nil; - this.ModTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); - this.Name = ""; - this.OS = 0; - return; - } - this.Comment = Comment_; - this.Extra = Extra_; - this.ModTime = ModTime_; - this.Name = Name_; - this.OS = OS_; - }); - Reader = $pkg.Reader = $newType(0, $kindStruct, "gzip.Reader", true, "compress/gzip", true, function(Header_, r_, decompressor_, digest_, size_, buf_, err_, multistream_) { - this.$val = this; - if (arguments.length === 0) { - this.Header = new Header.ptr("", sliceType$1.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), "", 0); - this.r = $ifaceNil; - this.decompressor = $ifaceNil; - this.digest = 0; - this.size = 0; - this.buf = arrayType$1.zero(); - this.err = $ifaceNil; - this.multistream = false; - return; - } - this.Header = Header_; - this.r = r_; - this.decompressor = decompressor_; - this.digest = digest_; - this.size = size_; - this.buf = buf_; - this.err = err_; - this.multistream = multistream_; - }); - sliceType$1 = $sliceType($Uint8); - ptrType$1 = $ptrType(time.Location); - arrayType$1 = $arrayType($Uint8, 512); - ptrType$3 = $ptrType(Reader); - sliceType$2 = $sliceType($Int32); - noEOF = function(err) { - var err; - if ($interfaceIsEqual(err, io.EOF)) { - return io.ErrUnexpectedEOF; - } - return err; - }; - NewReader = function(r) { - var {_r, err, r, z, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = new Reader.ptr(new Header.ptr("", sliceType$1.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), "", 0), $ifaceNil, $ifaceNil, 0, 0, arrayType$1.zero(), $ifaceNil, false); - _r = z.Reset(r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$3.nil, err]; - } - $s = -1; return [z, $ifaceNil]; - /* */ } return; } var $f = {$blk: NewReader, $c: true, $r, _r, err, r, z, $s};return $f; - }; - $pkg.NewReader = NewReader; - Reader.ptr.prototype.Reset = function(r) { - var {_r, _tuple, _tuple$1, ok, r, rr, z, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - Reader.copy(z, new Reader.ptr(new Header.ptr("", sliceType$1.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), "", 0), $ifaceNil, z.decompressor, 0, 0, arrayType$1.zero(), $ifaceNil, true)); - _tuple = $assertType(r, flate.Reader, true); - rr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - z.r = rr; - } else { - z.r = bufio.NewReader(r); - } - _r = z.readHeader(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - Header.copy(z.Header, _tuple$1[0]); - z.err = _tuple$1[1]; - $s = -1; return z.err; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Reset, $c: true, $r, _r, _tuple, _tuple$1, ok, r, rr, z, $s};return $f; - }; - Reader.prototype.Reset = function(r) { return this.$val.Reset(r); }; - Reader.ptr.prototype.Multistream = function(ok) { - var ok, z; - z = this; - z.multistream = ok; - }; - Reader.prototype.Multistream = function(ok) { return this.$val.Multistream(ok); }; - Reader.ptr.prototype.readString = function() { - var {_i, _r, _r$1, _ref, _tuple, err, i, needConv, s, v, x, x$1, x$2, z, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - err = $ifaceNil; - needConv = false; - i = 0; - /* while (true) { */ case 1: - if (i >= 512) { - $s = -1; return ["", $pkg.ErrHeader]; - } - _r = z.r.ReadByte(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - (x = z.buf, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = _tuple[0])); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", err]; - } - if ((x$1 = z.buf, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) > 127) { - needConv = true; - } - /* */ if ((x$2 = z.buf, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((x$2 = z.buf, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) === 0) { */ case 4: - _r$1 = crc32.Update(z.digest, crc32.IEEETable, $subslice(new sliceType$1(z.buf), 0, (i + 1 >> 0))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.digest = _r$1; - if (needConv) { - s = $makeSlice(sliceType$2, 0, i); - _ref = $subslice(new sliceType$1(z.buf), 0, i); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - s = $append(s, ((v >> 0))); - _i++; - } - $s = -1; return [($runesToString(s)), $ifaceNil]; - } - $s = -1; return [($bytesToString($subslice(new sliceType$1(z.buf), 0, i))), $ifaceNil]; - /* } */ case 5: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return ["", $ifaceNil]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.readString, $c: true, $r, _i, _r, _r$1, _ref, _tuple, err, i, needConv, s, v, x, x$1, x$2, z, $s};return $f; - }; - Reader.prototype.readString = function() { return this.$val.readString(); }; - Reader.ptr.prototype.readHeader = function() { - var {_r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, data, digest, err, flg, hdr, s, t, z, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hdr = new Header.ptr("", sliceType$1.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil), "", 0); - err = $ifaceNil; - z = this; - _r = io.ReadFull(z.r, $subslice(new sliceType$1(z.buf), 0, 10)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = $clone(hdr, Header); - _tmp$1 = err; - Header.copy(hdr, _tmp); - err = _tmp$1; - $s = -1; return [hdr, err]; - } - if (!((z.buf[0] === 31)) || !((z.buf[1] === 139)) || !((z.buf[2] === 8))) { - _tmp$2 = $clone(hdr, Header); - _tmp$3 = $pkg.ErrHeader; - Header.copy(hdr, _tmp$2); - err = _tmp$3; - $s = -1; return [hdr, err]; - } - flg = z.buf[3]; - t = (new $Int64(0, $clone(le, binary.littleEndian).Uint32($subslice(new sliceType$1(z.buf), 4, 8)))); - if ((t.$high > 0 || (t.$high === 0 && t.$low > 0))) { - time.Time.copy(hdr.ModTime, time.Unix(t, new $Int64(0, 0))); - } - hdr.OS = z.buf[9]; - _r$1 = crc32.ChecksumIEEE($subslice(new sliceType$1(z.buf), 0, 10)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.digest = _r$1; - /* */ if (!((((flg & 4) >>> 0) === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((((flg & 4) >>> 0) === 0))) { */ case 3: - _r$2 = io.ReadFull(z.r, $subslice(new sliceType$1(z.buf), 0, 2)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(hdr, Header); - _tmp$5 = noEOF(err); - Header.copy(hdr, _tmp$4); - err = _tmp$5; - $s = -1; return [hdr, err]; - } - _r$3 = crc32.Update(z.digest, crc32.IEEETable, $subslice(new sliceType$1(z.buf), 0, 2)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - z.digest = _r$3; - data = $makeSlice(sliceType$1, $clone(le, binary.littleEndian).Uint16($subslice(new sliceType$1(z.buf), 0, 2))); - _r$4 = io.ReadFull(z.r, data); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = $clone(hdr, Header); - _tmp$7 = noEOF(err); - Header.copy(hdr, _tmp$6); - err = _tmp$7; - $s = -1; return [hdr, err]; - } - _r$5 = crc32.Update(z.digest, crc32.IEEETable, data); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - z.digest = _r$5; - hdr.Extra = data; - /* } */ case 4: - s = ""; - /* */ if (!((((flg & 8) >>> 0) === 0))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!((((flg & 8) >>> 0) === 0))) { */ case 9: - _r$6 = z.readString(); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$3 = _r$6; - s = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$8 = $clone(hdr, Header); - _tmp$9 = err; - Header.copy(hdr, _tmp$8); - err = _tmp$9; - $s = -1; return [hdr, err]; - } - hdr.Name = s; - /* } */ case 10: - /* */ if (!((((flg & 16) >>> 0) === 0))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!((((flg & 16) >>> 0) === 0))) { */ case 12: - _r$7 = z.readString(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$4 = _r$7; - s = _tuple$4[0]; - err = _tuple$4[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$10 = $clone(hdr, Header); - _tmp$11 = err; - Header.copy(hdr, _tmp$10); - err = _tmp$11; - $s = -1; return [hdr, err]; - } - hdr.Comment = s; - /* } */ case 13: - /* */ if (!((((flg & 2) >>> 0) === 0))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!((((flg & 2) >>> 0) === 0))) { */ case 15: - _r$8 = io.ReadFull(z.r, $subslice(new sliceType$1(z.buf), 0, 2)); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$5 = _r$8; - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$12 = $clone(hdr, Header); - _tmp$13 = noEOF(err); - Header.copy(hdr, _tmp$12); - err = _tmp$13; - $s = -1; return [hdr, err]; - } - digest = $clone(le, binary.littleEndian).Uint16($subslice(new sliceType$1(z.buf), 0, 2)); - if (!((digest === ((z.digest << 16 >>> 16))))) { - _tmp$14 = $clone(hdr, Header); - _tmp$15 = $pkg.ErrHeader; - Header.copy(hdr, _tmp$14); - err = _tmp$15; - $s = -1; return [hdr, err]; - } - /* } */ case 16: - z.digest = 0; - /* */ if ($interfaceIsEqual(z.decompressor, $ifaceNil)) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ($interfaceIsEqual(z.decompressor, $ifaceNil)) { */ case 18: - _r$9 = flate.NewReader(z.r); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - z.decompressor = _r$9; - $s = 20; continue; - /* } else { */ case 19: - _r$10 = $assertType(z.decompressor, flate.Resetter).Reset(z.r, sliceType$1.nil); /* */ $s = 22; case 22: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - /* } */ case 20: - _tmp$16 = $clone(hdr, Header); - _tmp$17 = $ifaceNil; - Header.copy(hdr, _tmp$16); - err = _tmp$17; - $s = -1; return [hdr, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.readHeader, $c: true, $r, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, data, digest, err, flg, hdr, s, t, z, $s};return $f; - }; - Reader.prototype.readHeader = function() { return this.$val.readHeader(); }; - Reader.ptr.prototype.Read = function(p) { - var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, digest, err, err$1, n, p, size, z, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - z = this; - if (!($interfaceIsEqual(z.err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = z.err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* while (true) { */ case 1: - /* if (!(n === 0)) { break; } */ if(!(n === 0)) { $s = 2; continue; } - _r = z.decompressor.Read(p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - z.err = _tuple[1]; - _r$1 = crc32.Update(z.digest, crc32.IEEETable, $subslice(p, 0, n)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.digest = _r$1; - z.size = z.size + (((n >>> 0))) >>> 0; - if (!($interfaceIsEqual(z.err, io.EOF))) { - _tmp$2 = n; - _tmp$3 = z.err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - _r$2 = io.ReadFull(z.r, $subslice(new sliceType$1(z.buf), 0, 8)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - z.err = noEOF(err$1); - _tmp$4 = n; - _tmp$5 = z.err; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - digest = $clone(le, binary.littleEndian).Uint32($subslice(new sliceType$1(z.buf), 0, 4)); - size = $clone(le, binary.littleEndian).Uint32($subslice(new sliceType$1(z.buf), 4, 8)); - if (!((digest === z.digest)) || !((size === z.size))) { - z.err = $pkg.ErrChecksum; - _tmp$6 = n; - _tmp$7 = z.err; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - } - _tmp$8 = 0; - _tmp$9 = 0; - z.digest = _tmp$8; - z.size = _tmp$9; - if (!z.multistream) { - _tmp$10 = n; - _tmp$11 = io.EOF; - n = _tmp$10; - err = _tmp$11; - $s = -1; return [n, err]; - } - z.err = $ifaceNil; - _r$3 = z.readHeader(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - z.err = _tuple$2[1]; - if (!($interfaceIsEqual(z.err, $ifaceNil))) { - _tmp$12 = n; - _tmp$13 = z.err; - n = _tmp$12; - err = _tmp$13; - $s = -1; return [n, err]; - } - $s = 1; continue; - case 2: - _tmp$14 = n; - _tmp$15 = $ifaceNil; - n = _tmp$14; - err = _tmp$15; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Read, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, digest, err, err$1, n, p, size, z, $s};return $f; - }; - Reader.prototype.Read = function(p) { return this.$val.Read(p); }; - Reader.ptr.prototype.Close = function() { - var {$24r, _r, z, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.decompressor.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Close, $c: true, $r, $24r, _r, z, $s};return $f; - }; - Reader.prototype.Close = function() { return this.$val.Close(); }; - ptrType$3.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([io.Reader], [$error], false)}, {prop: "Multistream", name: "Multistream", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "readString", name: "readString", pkg: "compress/gzip", typ: $funcType([], [$String, $error], false)}, {prop: "readHeader", name: "readHeader", pkg: "compress/gzip", typ: $funcType([], [Header, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - Header.init("", [{prop: "Comment", name: "Comment", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Extra", name: "Extra", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "ModTime", name: "ModTime", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "OS", name: "OS", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - Reader.init("compress/gzip", [{prop: "Header", name: "Header", embedded: true, exported: true, typ: Header, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: flate.Reader, tag: ""}, {prop: "decompressor", name: "decompressor", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "digest", name: "digest", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "multistream", name: "multistream", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flate.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = crc32.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrChecksum = errors.New("gzip: invalid checksum"); - $pkg.ErrHeader = errors.New("gzip: invalid header"); - le = $clone(binary.LittleEndian, binary.littleEndian); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding"] = (function() { - var $pkg = {}, $init, TextMarshaler, TextUnmarshaler, sliceType; - TextMarshaler = $pkg.TextMarshaler = $newType(8, $kindInterface, "encoding.TextMarshaler", true, "encoding", true, null); - TextUnmarshaler = $pkg.TextUnmarshaler = $newType(8, $kindInterface, "encoding.TextUnmarshaler", true, "encoding", true, null); - sliceType = $sliceType($Uint8); - TextMarshaler.init([{prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType, $error], false)}]); - TextUnmarshaler.init([{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType], [$error], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/base64"] = (function() { - var $pkg = {}, $init, binary, io, strconv, Encoding, encoder, CorruptInputError, arrayType, arrayType$1, sliceType, ptrType, arrayType$2, arrayType$3, arrayType$4, ptrType$1, NewEncoding, NewEncoder, assemble32, assemble64; - binary = $packages["encoding/binary"]; - io = $packages["io"]; - strconv = $packages["strconv"]; - Encoding = $pkg.Encoding = $newType(0, $kindStruct, "base64.Encoding", true, "encoding/base64", true, function(encode_, decodeMap_, padChar_, strict_) { - this.$val = this; - if (arguments.length === 0) { - this.encode = arrayType.zero(); - this.decodeMap = arrayType$1.zero(); - this.padChar = 0; - this.strict = false; - return; - } - this.encode = encode_; - this.decodeMap = decodeMap_; - this.padChar = padChar_; - this.strict = strict_; - }); - encoder = $pkg.encoder = $newType(0, $kindStruct, "base64.encoder", true, "encoding/base64", false, function(err_, enc_, w_, buf_, nbuf_, out_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - this.enc = ptrType.nil; - this.w = $ifaceNil; - this.buf = arrayType$2.zero(); - this.nbuf = 0; - this.out = arrayType$3.zero(); - return; - } - this.err = err_; - this.enc = enc_; - this.w = w_; - this.buf = buf_; - this.nbuf = nbuf_; - this.out = out_; - }); - CorruptInputError = $pkg.CorruptInputError = $newType(8, $kindInt64, "base64.CorruptInputError", true, "encoding/base64", true, null); - arrayType = $arrayType($Uint8, 64); - arrayType$1 = $arrayType($Uint8, 256); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(Encoding); - arrayType$2 = $arrayType($Uint8, 3); - arrayType$3 = $arrayType($Uint8, 1024); - arrayType$4 = $arrayType($Uint8, 4); - ptrType$1 = $ptrType(encoder); - NewEncoding = function(encoder$1) { - var e, encoder$1, i, i$1, i$2, x, x$1, x$2; - if (!((encoder$1.length === 64))) { - $panic(new $String("encoding alphabet is not 64-bytes long")); - } - i = 0; - while (true) { - if (!(i < encoder$1.length)) { break; } - if ((encoder$1.charCodeAt(i) === 10) || (encoder$1.charCodeAt(i) === 13)) { - $panic(new $String("encoding alphabet contains newline character")); - } - i = i + (1) >> 0; - } - e = new Encoding.ptr(arrayType.zero(), arrayType$1.zero(), 0, false); - e.padChar = 61; - $copyString(new sliceType(e.encode), encoder$1); - i$1 = 0; - while (true) { - if (!(i$1 < 256)) { break; } - (x = e.decodeMap, ((i$1 < 0 || i$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i$1] = 255)); - i$1 = i$1 + (1) >> 0; - } - i$2 = 0; - while (true) { - if (!(i$2 < encoder$1.length)) { break; } - (x$1 = e.decodeMap, x$2 = encoder$1.charCodeAt(i$2), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2] = ((i$2 << 24 >>> 24)))); - i$2 = i$2 + (1) >> 0; - } - return e; - }; - $pkg.NewEncoding = NewEncoding; - Encoding.ptr.prototype.WithPadding = function(padding) { - var enc, i, padding, x; - enc = this; - if ((padding === 13) || (padding === 10) || padding > 255) { - $panic(new $String("invalid padding")); - } - i = 0; - while (true) { - if (!(i < 64)) { break; } - if ((((x = enc.encode, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) >> 0)) === padding) { - $panic(new $String("padding contained in alphabet")); - } - i = i + (1) >> 0; - } - enc.padChar = padding; - return enc; - }; - Encoding.prototype.WithPadding = function(padding) { return this.$val.WithPadding(padding); }; - Encoding.ptr.prototype.Strict = function() { - var enc; - enc = this; - enc.strict = true; - return enc; - }; - Encoding.prototype.Strict = function() { return this.$val.Strict(); }; - Encoding.ptr.prototype.Encode = function(dst, src) { - var _1, _q, _tmp, _tmp$1, di, dst, enc, n, remain, si, src, val, val$1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - enc = this; - if (src.$length === 0) { - return; - } - $unused(enc.encode); - _tmp = 0; - _tmp$1 = 0; - di = _tmp; - si = _tmp$1; - n = $imul(((_q = src.$length / 3, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), 3); - while (true) { - if (!(si < n)) { break; } - val = (((((((x = si + 0 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])) >>> 0)) << 16 >>> 0) | ((((x$1 = si + 1 >> 0, ((x$1 < 0 || x$1 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$1])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$2 = si + 2 >> 0, ((x$2 < 0 || x$2 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$2])) >>> 0))) >>> 0; - (x$5 = di + 0 >> 0, ((x$5 < 0 || x$5 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$5] = (x$3 = enc.encode, x$4 = ((val >>> 18 >>> 0) & 63) >>> 0, ((x$4 < 0 || x$4 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[x$4])))); - (x$8 = di + 1 >> 0, ((x$8 < 0 || x$8 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$8] = (x$6 = enc.encode, x$7 = ((val >>> 12 >>> 0) & 63) >>> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])))); - (x$11 = di + 2 >> 0, ((x$11 < 0 || x$11 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$11] = (x$9 = enc.encode, x$10 = ((val >>> 6 >>> 0) & 63) >>> 0, ((x$10 < 0 || x$10 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[x$10])))); - (x$14 = di + 3 >> 0, ((x$14 < 0 || x$14 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$14] = (x$12 = enc.encode, x$13 = (val & 63) >>> 0, ((x$13 < 0 || x$13 >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[x$13])))); - si = si + (3) >> 0; - di = di + (4) >> 0; - } - remain = src.$length - si >> 0; - if (remain === 0) { - return; - } - val$1 = (((x$15 = si + 0 >> 0, ((x$15 < 0 || x$15 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$15])) >>> 0)) << 16 >>> 0; - if (remain === 2) { - val$1 = (val$1 | (((((x$16 = si + 1 >> 0, ((x$16 < 0 || x$16 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$16])) >>> 0)) << 8 >>> 0))) >>> 0; - } - (x$19 = di + 0 >> 0, ((x$19 < 0 || x$19 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$19] = (x$17 = enc.encode, x$18 = ((val$1 >>> 18 >>> 0) & 63) >>> 0, ((x$18 < 0 || x$18 >= x$17.length) ? ($throwRuntimeError("index out of range"), undefined) : x$17[x$18])))); - (x$22 = di + 1 >> 0, ((x$22 < 0 || x$22 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$22] = (x$20 = enc.encode, x$21 = ((val$1 >>> 12 >>> 0) & 63) >>> 0, ((x$21 < 0 || x$21 >= x$20.length) ? ($throwRuntimeError("index out of range"), undefined) : x$20[x$21])))); - _1 = remain; - if (_1 === (2)) { - (x$25 = di + 2 >> 0, ((x$25 < 0 || x$25 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$25] = (x$23 = enc.encode, x$24 = ((val$1 >>> 6 >>> 0) & 63) >>> 0, ((x$24 < 0 || x$24 >= x$23.length) ? ($throwRuntimeError("index out of range"), undefined) : x$23[x$24])))); - if (!((enc.padChar === -1))) { - (x$26 = di + 3 >> 0, ((x$26 < 0 || x$26 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$26] = ((enc.padChar << 24 >>> 24)))); - } - } else if (_1 === (1)) { - if (!((enc.padChar === -1))) { - (x$27 = di + 2 >> 0, ((x$27 < 0 || x$27 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$27] = ((enc.padChar << 24 >>> 24)))); - (x$28 = di + 3 >> 0, ((x$28 < 0 || x$28 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$28] = ((enc.padChar << 24 >>> 24)))); - } - } - }; - Encoding.prototype.Encode = function(dst, src) { return this.$val.Encode(dst, src); }; - Encoding.ptr.prototype.EncodeToString = function(src) { - var buf, enc, src; - enc = this; - buf = $makeSlice(sliceType, enc.EncodedLen(src.$length)); - enc.Encode(buf, src); - return ($bytesToString(buf)); - }; - Encoding.prototype.EncodeToString = function(src) { return this.$val.EncodeToString(src); }; - encoder.ptr.prototype.Write = function(p) { - var {_q, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, e, err, i, n, nn, p, x, x$1, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - e = this; - if (!($interfaceIsEqual(e.err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = e.err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* */ if (e.nbuf > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (e.nbuf > 0) { */ case 1: - i = 0; - i = 0; - while (true) { - if (!(i < p.$length && e.nbuf < 3)) { break; } - (x = e.buf, x$1 = e.nbuf, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1] = ((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]))); - e.nbuf = e.nbuf + (1) >> 0; - i = i + (1) >> 0; - } - n = n + (i) >> 0; - p = $subslice(p, i); - if (e.nbuf < 3) { - $s = -1; return [n, err]; - } - e.enc.Encode(new sliceType(e.out), new sliceType(e.buf)); - _r = e.w.Write($subslice(new sliceType(e.out), 0, 4)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - e.err = _tuple[1]; - if (!($interfaceIsEqual(e.err, $ifaceNil))) { - _tmp$2 = n; - _tmp$3 = e.err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - e.nbuf = 0; - /* } */ case 2: - /* while (true) { */ case 4: - /* if (!(p.$length >= 3)) { break; } */ if(!(p.$length >= 3)) { $s = 5; continue; } - nn = 768; - if (nn > p.$length) { - nn = p.$length; - nn = nn - ((_r$1 = nn % 3, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))) >> 0; - } - e.enc.Encode(new sliceType(e.out), $subslice(p, 0, nn)); - _r$2 = e.w.Write($subslice(new sliceType(e.out), 0, ($imul((_q = nn / 3, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 4)))); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - e.err = _tuple$1[1]; - if (!($interfaceIsEqual(e.err, $ifaceNil))) { - _tmp$4 = n; - _tmp$5 = e.err; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - n = n + (nn) >> 0; - p = $subslice(p, nn); - $s = 4; continue; - case 5: - $copySlice(new sliceType(e.buf), p); - e.nbuf = p.$length; - n = n + (p.$length) >> 0; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.Write, $c: true, $r, _q, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, e, err, i, n, nn, p, x, x$1, $s};return $f; - }; - encoder.prototype.Write = function(p) { return this.$val.Write(p); }; - encoder.ptr.prototype.Close = function() { - var {_r, _tuple, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - /* */ if ($interfaceIsEqual(e.err, $ifaceNil) && e.nbuf > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(e.err, $ifaceNil) && e.nbuf > 0) { */ case 1: - e.enc.Encode(new sliceType(e.out), $subslice(new sliceType(e.buf), 0, e.nbuf)); - _r = e.w.Write($subslice(new sliceType(e.out), 0, e.enc.EncodedLen(e.nbuf))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - e.err = _tuple[1]; - e.nbuf = 0; - /* } */ case 2: - $s = -1; return e.err; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.Close, $c: true, $r, _r, _tuple, e, $s};return $f; - }; - encoder.prototype.Close = function() { return this.$val.Close(); }; - NewEncoder = function(enc, w) { - var enc, w; - return new encoder.ptr($ifaceNil, enc, w, arrayType$2.zero(), 0, arrayType$3.zero()); - }; - $pkg.NewEncoder = NewEncoder; - Encoding.ptr.prototype.EncodedLen = function(n) { - var _q, _q$1, enc, n; - enc = this; - if (enc.padChar === -1) { - return (_q = ((($imul(n, 8)) + 5 >> 0)) / 6, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - } - return $imul((_q$1 = ((n + 2 >> 0)) / 3, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), 4); - }; - Encoding.prototype.EncodedLen = function(n) { return this.$val.EncodedLen(n); }; - CorruptInputError.prototype.Error = function() { - var e; - e = this; - return "illegal base64 data at input byte " + strconv.FormatInt((new $Int64(e.$high, e.$low)), 10); - }; - $ptrType(CorruptInputError).prototype.Error = function() { return this.$get().Error(); }; - Encoding.ptr.prototype.decodeQuantum = function(dst, src, si) { - var _1, _2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, dbuf, dlen, dst, enc, err, in$1, j, n, nsi, out, si, src, val, x; - nsi = 0; - n = 0; - err = $ifaceNil; - enc = this; - dbuf = arrayType$4.zero(); - dlen = 4; - $unused(enc.decodeMap); - j = 0; - while (true) { - if (!(j < 4)) { break; } - if (src.$length === si) { - if ((j === 0)) { - _tmp = si; - _tmp$1 = 0; - _tmp$2 = $ifaceNil; - nsi = _tmp; - n = _tmp$1; - err = _tmp$2; - return [nsi, n, err]; - } else if (((j === 1)) || (!((enc.padChar === -1)))) { - _tmp$3 = si; - _tmp$4 = 0; - _tmp$5 = (new CorruptInputError(0, (si - j >> 0))); - nsi = _tmp$3; - n = _tmp$4; - err = _tmp$5; - return [nsi, n, err]; - } - dlen = j; - break; - } - in$1 = ((si < 0 || si >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + si]); - si = si + (1) >> 0; - out = (x = enc.decodeMap, ((in$1 < 0 || in$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[in$1])); - if (!((out === 255))) { - ((j < 0 || j >= dbuf.length) ? ($throwRuntimeError("index out of range"), undefined) : dbuf[j] = out); - j = j + (1) >> 0; - continue; - } - if ((in$1 === 10) || (in$1 === 13)) { - j = j - (1) >> 0; - j = j + (1) >> 0; - continue; - } - if (!((((in$1 >> 0)) === enc.padChar))) { - _tmp$6 = si; - _tmp$7 = 0; - _tmp$8 = (new CorruptInputError(0, (si - 1 >> 0))); - nsi = _tmp$6; - n = _tmp$7; - err = _tmp$8; - return [nsi, n, err]; - } - _1 = j; - if ((_1 === (0)) || (_1 === (1))) { - _tmp$9 = si; - _tmp$10 = 0; - _tmp$11 = (new CorruptInputError(0, (si - 1 >> 0))); - nsi = _tmp$9; - n = _tmp$10; - err = _tmp$11; - return [nsi, n, err]; - } else if (_1 === (2)) { - while (true) { - if (!(si < src.$length && ((((si < 0 || si >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + si]) === 10) || (((si < 0 || si >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + si]) === 13)))) { break; } - si = si + (1) >> 0; - } - if (si === src.$length) { - _tmp$12 = si; - _tmp$13 = 0; - _tmp$14 = (new CorruptInputError(0, src.$length)); - nsi = _tmp$12; - n = _tmp$13; - err = _tmp$14; - return [nsi, n, err]; - } - if (!((((((si < 0 || si >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + si]) >> 0)) === enc.padChar))) { - _tmp$15 = si; - _tmp$16 = 0; - _tmp$17 = (new CorruptInputError(0, (si - 1 >> 0))); - nsi = _tmp$15; - n = _tmp$16; - err = _tmp$17; - return [nsi, n, err]; - } - si = si + (1) >> 0; - } - while (true) { - if (!(si < src.$length && ((((si < 0 || si >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + si]) === 10) || (((si < 0 || si >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + si]) === 13)))) { break; } - si = si + (1) >> 0; - } - if (si < src.$length) { - err = (new CorruptInputError(0, si)); - } - dlen = j; - break; - } - val = ((((((((dbuf[0] >>> 0)) << 18 >>> 0) | (((dbuf[1] >>> 0)) << 12 >>> 0)) >>> 0) | (((dbuf[2] >>> 0)) << 6 >>> 0)) >>> 0) | ((dbuf[3] >>> 0))) >>> 0; - _tmp$18 = (((val >>> 0 >>> 0) << 24 >>> 24)); - _tmp$19 = (((val >>> 8 >>> 0) << 24 >>> 24)); - _tmp$20 = (((val >>> 16 >>> 0) << 24 >>> 24)); - dbuf[2] = _tmp$18; - dbuf[1] = _tmp$19; - dbuf[0] = _tmp$20; - _2 = dlen; - if (_2 === (4)) { - (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = dbuf[2]); - dbuf[2] = 0; - (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = dbuf[1]); - if (enc.strict && !((dbuf[2] === 0))) { - _tmp$21 = si; - _tmp$22 = 0; - _tmp$23 = (new CorruptInputError(0, (si - 1 >> 0))); - nsi = _tmp$21; - n = _tmp$22; - err = _tmp$23; - return [nsi, n, err]; - } - dbuf[1] = 0; - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = dbuf[0]); - if (enc.strict && (!((dbuf[1] === 0)) || !((dbuf[2] === 0)))) { - _tmp$24 = si; - _tmp$25 = 0; - _tmp$26 = (new CorruptInputError(0, (si - 2 >> 0))); - nsi = _tmp$24; - n = _tmp$25; - err = _tmp$26; - return [nsi, n, err]; - } - } else if (_2 === (3)) { - (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = dbuf[1]); - if (enc.strict && !((dbuf[2] === 0))) { - _tmp$27 = si; - _tmp$28 = 0; - _tmp$29 = (new CorruptInputError(0, (si - 1 >> 0))); - nsi = _tmp$27; - n = _tmp$28; - err = _tmp$29; - return [nsi, n, err]; - } - dbuf[1] = 0; - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = dbuf[0]); - if (enc.strict && (!((dbuf[1] === 0)) || !((dbuf[2] === 0)))) { - _tmp$30 = si; - _tmp$31 = 0; - _tmp$32 = (new CorruptInputError(0, (si - 2 >> 0))); - nsi = _tmp$30; - n = _tmp$31; - err = _tmp$32; - return [nsi, n, err]; - } - } else if (_2 === (2)) { - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = dbuf[0]); - if (enc.strict && (!((dbuf[1] === 0)) || !((dbuf[2] === 0)))) { - _tmp$33 = si; - _tmp$34 = 0; - _tmp$35 = (new CorruptInputError(0, (si - 2 >> 0))); - nsi = _tmp$33; - n = _tmp$34; - err = _tmp$35; - return [nsi, n, err]; - } - } - _tmp$36 = si; - _tmp$37 = dlen - 1 >> 0; - _tmp$38 = err; - nsi = _tmp$36; - n = _tmp$37; - err = _tmp$38; - return [nsi, n, err]; - }; - Encoding.prototype.decodeQuantum = function(dst, src, si) { return this.$val.decodeQuantum(dst, src, si); }; - Encoding.ptr.prototype.DecodeString = function(s) { - var _tuple, dbuf, enc, err, n, s; - enc = this; - dbuf = $makeSlice(sliceType, enc.DecodedLen(s.length)); - _tuple = enc.Decode(dbuf, (new sliceType($stringToBytes(s)))); - n = _tuple[0]; - err = _tuple[1]; - return [$subslice(dbuf, 0, n), err]; - }; - Encoding.prototype.DecodeString = function(s) { return this.$val.DecodeString(s); }; - Encoding.ptr.prototype.Decode = function(dst, src) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, dn, dn$1, dst, enc, err, n, ninc, ninc$1, ninc$2, ok, ok$1, si, src, src2, src2$1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - n = 0; - err = $ifaceNil; - enc = this; - if (src.$length === 0) { - _tmp = 0; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - $unused(enc.decodeMap); - si = 0; - while (true) { - if (!(false && (src.$length - si >> 0) >= 8 && (dst.$length - n >> 0) >= 8)) { break; } - src2 = $subslice(src, si, (si + 8 >> 0)); - _tuple = assemble64((x = enc.decodeMap, x$1 = (0 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 0]), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = enc.decodeMap, x$3 = (1 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 1]), ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3])), (x$4 = enc.decodeMap, x$5 = (2 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 2]), ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), (x$6 = enc.decodeMap, x$7 = (3 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 3]), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])), (x$8 = enc.decodeMap, x$9 = (4 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 4]), ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])), (x$10 = enc.decodeMap, x$11 = (5 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 5]), ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11])), (x$12 = enc.decodeMap, x$13 = (6 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 6]), ((x$13 < 0 || x$13 >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[x$13])), (x$14 = enc.decodeMap, x$15 = (7 >= src2.$length ? ($throwRuntimeError("index out of range"), undefined) : src2.$array[src2.$offset + 7]), ((x$15 < 0 || x$15 >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[x$15]))); - dn = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(dst, n), dn); - n = n + (6) >> 0; - si = si + (8) >> 0; - } else { - ninc = 0; - _tuple$1 = enc.decodeQuantum($subslice(dst, n), src, si); - si = _tuple$1[0]; - ninc = _tuple$1[1]; - err = _tuple$1[2]; - n = n + (ninc) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = n; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - } - } - while (true) { - if (!((src.$length - si >> 0) >= 4 && (dst.$length - n >> 0) >= 4)) { break; } - src2$1 = $subslice(src, si, (si + 4 >> 0)); - _tuple$2 = assemble32((x$16 = enc.decodeMap, x$17 = (0 >= src2$1.$length ? ($throwRuntimeError("index out of range"), undefined) : src2$1.$array[src2$1.$offset + 0]), ((x$17 < 0 || x$17 >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[x$17])), (x$18 = enc.decodeMap, x$19 = (1 >= src2$1.$length ? ($throwRuntimeError("index out of range"), undefined) : src2$1.$array[src2$1.$offset + 1]), ((x$19 < 0 || x$19 >= x$18.length) ? ($throwRuntimeError("index out of range"), undefined) : x$18[x$19])), (x$20 = enc.decodeMap, x$21 = (2 >= src2$1.$length ? ($throwRuntimeError("index out of range"), undefined) : src2$1.$array[src2$1.$offset + 2]), ((x$21 < 0 || x$21 >= x$20.length) ? ($throwRuntimeError("index out of range"), undefined) : x$20[x$21])), (x$22 = enc.decodeMap, x$23 = (3 >= src2$1.$length ? ($throwRuntimeError("index out of range"), undefined) : src2$1.$array[src2$1.$offset + 3]), ((x$23 < 0 || x$23 >= x$22.length) ? ($throwRuntimeError("index out of range"), undefined) : x$22[x$23]))); - dn$1 = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (ok$1) { - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, n), dn$1); - n = n + (3) >> 0; - si = si + (4) >> 0; - } else { - ninc$1 = 0; - _tuple$3 = enc.decodeQuantum($subslice(dst, n), src, si); - si = _tuple$3[0]; - ninc$1 = _tuple$3[1]; - err = _tuple$3[2]; - n = n + (ninc$1) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = n; - _tmp$5 = err; - n = _tmp$4; - err = _tmp$5; - return [n, err]; - } - } - } - while (true) { - if (!(si < src.$length)) { break; } - ninc$2 = 0; - _tuple$4 = enc.decodeQuantum($subslice(dst, n), src, si); - si = _tuple$4[0]; - ninc$2 = _tuple$4[1]; - err = _tuple$4[2]; - n = n + (ninc$2) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = n; - _tmp$7 = err; - n = _tmp$6; - err = _tmp$7; - return [n, err]; - } - } - _tmp$8 = n; - _tmp$9 = err; - n = _tmp$8; - err = _tmp$9; - return [n, err]; - }; - Encoding.prototype.Decode = function(dst, src) { return this.$val.Decode(dst, src); }; - assemble32 = function(n1, n2, n3, n4) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, dn, n1, n2, n3, n4, ok; - dn = 0; - ok = false; - if (((((((n1 | n2) >>> 0) | n3) >>> 0) | n4) >>> 0) === 255) { - _tmp = 0; - _tmp$1 = false; - dn = _tmp; - ok = _tmp$1; - return [dn, ok]; - } - _tmp$2 = ((((((((n1 >>> 0)) << 26 >>> 0) | (((n2 >>> 0)) << 20 >>> 0)) >>> 0) | (((n3 >>> 0)) << 14 >>> 0)) >>> 0) | (((n4 >>> 0)) << 8 >>> 0)) >>> 0; - _tmp$3 = true; - dn = _tmp$2; - ok = _tmp$3; - return [dn, ok]; - }; - assemble64 = function(n1, n2, n3, n4, n5, n6, n7, n8) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, dn, n1, n2, n3, n4, n5, n6, n7, n8, ok, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - dn = new $Uint64(0, 0); - ok = false; - if (((((((((((((((n1 | n2) >>> 0) | n3) >>> 0) | n4) >>> 0) | n5) >>> 0) | n6) >>> 0) | n7) >>> 0) | n8) >>> 0) === 255) { - _tmp = new $Uint64(0, 0); - _tmp$1 = false; - dn = _tmp; - ok = _tmp$1; - return [dn, ok]; - } - _tmp$2 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = $shiftLeft64((new $Uint64(0, n1)), 58), x$7 = $shiftLeft64((new $Uint64(0, n2)), 52), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, n3)), 46), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, n4)), 40), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, n5)), 34), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, n6)), 28), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, n7)), 22), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, n8)), 16), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - _tmp$3 = true; - dn = _tmp$2; - ok = _tmp$3; - return [dn, ok]; - }; - Encoding.ptr.prototype.DecodedLen = function(n) { - var _q, _q$1, enc, n; - enc = this; - if (enc.padChar === -1) { - return (_q = ($imul(n, 6)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - } - return $imul((_q$1 = n / 4, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), 3); - }; - Encoding.prototype.DecodedLen = function(n) { return this.$val.DecodedLen(n); }; - Encoding.methods = [{prop: "WithPadding", name: "WithPadding", pkg: "", typ: $funcType([$Int32], [ptrType], false)}, {prop: "Strict", name: "Strict", pkg: "", typ: $funcType([], [ptrType], false)}]; - ptrType.methods = [{prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "EncodeToString", name: "EncodeToString", pkg: "", typ: $funcType([sliceType], [$String], false)}, {prop: "EncodedLen", name: "EncodedLen", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "decodeQuantum", name: "decodeQuantum", pkg: "encoding/base64", typ: $funcType([sliceType, sliceType, $Int], [$Int, $Int, $error], false)}, {prop: "DecodeString", name: "DecodeString", pkg: "", typ: $funcType([$String], [sliceType, $error], false)}, {prop: "Decode", name: "Decode", pkg: "", typ: $funcType([sliceType, sliceType], [$Int, $error], false)}, {prop: "DecodedLen", name: "DecodedLen", pkg: "", typ: $funcType([$Int], [$Int], false)}]; - ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - CorruptInputError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Encoding.init("encoding/base64", [{prop: "encode", name: "encode", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "decodeMap", name: "decodeMap", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "padChar", name: "padChar", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "strict", name: "strict", embedded: false, exported: false, typ: $Bool, tag: ""}]); - encoder.init("encoding/base64", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "enc", name: "enc", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "nbuf", name: "nbuf", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: arrayType$3, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.StdEncoding = NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); - $pkg.URLEncoding = NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"); - $pkg.RawStdEncoding = $clone($pkg.StdEncoding, Encoding).WithPadding(-1); - $pkg.RawURLEncoding = $clone($pkg.URLEncoding, Encoding).WithPadding(-1); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/json"] = (function() { - var $pkg = {}, $init, bytes, encoding, base64, errors, fmt, nosync, io, math, reflect, sort, strconv, strings, unicode, utf16, utf8, tagOptions, Decoder, Encoder, Token, Delim, SyntaxError, scanner, Marshaler, UnsupportedTypeError, UnsupportedValueError, MarshalerError, encodeState, jsonError, encOpts, encoderFunc, floatEncoder, structEncoder, structFields, mapEncoder, sliceEncoder, arrayEncoder, ptrEncoder, condAddrEncoder, reflectWithString, field, byIndex, Unmarshaler, UnmarshalTypeError, InvalidUnmarshalError, Number, errorContext, decodeState, unquotedValue, sliceType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, arrayType, sliceType$3, structType, sliceType$4, structType$1, ptrType$10, ptrType$11, mapType, sliceType$5, ptrType$12, ptrType$13, ptrType$14, ptrType$15, funcType, ptrType$16, ptrType$17, ptrType$19, mapType$1, mapType$2, ptrType$20, funcType$1, ptrType$22, ptrType$23, safeSet, htmlSafeSet, scannerPool, hex, encodeStatePool, encoderCache, marshalerType, textMarshalerType, float32Encoder, float64Encoder, fieldCache, nullLiteral, textUnmarshalerType, numberType, _r, _r$1, _r$2, parseTag, NewDecoder, nonSpace, NewEncoder, checkValid, newScanner, freeScanner, isSpace, stateBeginValueOrEmpty, stateBeginValue, stateBeginStringOrEmpty, stateBeginString, stateEndValue, stateEndTop, stateInString, stateInStringEsc, stateInStringEscU, stateInStringEscU1, stateInStringEscU12, stateInStringEscU123, stateNeg, state1, state0, stateDot, stateDot0, stateE, stateESign, stateE0, stateT, stateTr, stateTru, stateF, stateFa, stateFal, stateFals, stateN, stateNu, stateNul, stateError, quoteChar, compact, newline, Indent, foldFunc, equalFoldRight, asciiEqualFold, simpleLetterEqualFold, HTMLEscape, newEncodeState, isEmptyValue, valueEncoder, typeEncoder, newTypeEncoder, invalidValueEncoder, marshalerEncoder, addrMarshalerEncoder, textMarshalerEncoder, addrTextMarshalerEncoder, boolEncoder, intEncoder, uintEncoder, stringEncoder, isValidNumber, interfaceEncoder, unsupportedTypeEncoder, newStructEncoder, newMapEncoder, encodeByteSlice, newSliceEncoder, newArrayEncoder, newPtrEncoder, newCondAddrEncoder, isValidTag, typeByIndex, typeFields, dominantField, cachedTypeFields, Unmarshal, indirect, getu4, unquote, unquoteBytes; - bytes = $packages["bytes"]; - encoding = $packages["encoding"]; - base64 = $packages["encoding/base64"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; - io = $packages["io"]; - math = $packages["math"]; - reflect = $packages["reflect"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - unicode = $packages["unicode"]; - utf16 = $packages["unicode/utf16"]; - utf8 = $packages["unicode/utf8"]; - tagOptions = $pkg.tagOptions = $newType(8, $kindString, "json.tagOptions", true, "encoding/json", false, null); - Decoder = $pkg.Decoder = $newType(0, $kindStruct, "json.Decoder", true, "encoding/json", true, function(r_, buf_, d_, scanp_, scanned_, scan_, err_, tokenState_, tokenStack_) { - this.$val = this; - if (arguments.length === 0) { - this.r = $ifaceNil; - this.buf = sliceType$2.nil; - this.d = new decodeState.ptr(sliceType$2.nil, 0, 0, new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)), ptrType$4.nil, $ifaceNil, false, false); - this.scanp = 0; - this.scanned = new $Int64(0, 0); - this.scan = new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)); - this.err = $ifaceNil; - this.tokenState = 0; - this.tokenStack = sliceType$1.nil; - return; - } - this.r = r_; - this.buf = buf_; - this.d = d_; - this.scanp = scanp_; - this.scanned = scanned_; - this.scan = scan_; - this.err = err_; - this.tokenState = tokenState_; - this.tokenStack = tokenStack_; - }); - Encoder = $pkg.Encoder = $newType(0, $kindStruct, "json.Encoder", true, "encoding/json", true, function(w_, err_, escapeHTML_, indentBuf_, indentPrefix_, indentValue_) { - this.$val = this; - if (arguments.length === 0) { - this.w = $ifaceNil; - this.err = $ifaceNil; - this.escapeHTML = false; - this.indentBuf = ptrType$5.nil; - this.indentPrefix = ""; - this.indentValue = ""; - return; - } - this.w = w_; - this.err = err_; - this.escapeHTML = escapeHTML_; - this.indentBuf = indentBuf_; - this.indentPrefix = indentPrefix_; - this.indentValue = indentValue_; - }); - Token = $pkg.Token = $newType(8, $kindInterface, "json.Token", true, "encoding/json", true, null); - Delim = $pkg.Delim = $newType(4, $kindInt32, "json.Delim", true, "encoding/json", true, null); - SyntaxError = $pkg.SyntaxError = $newType(0, $kindStruct, "json.SyntaxError", true, "encoding/json", true, function(msg_, Offset_) { - this.$val = this; - if (arguments.length === 0) { - this.msg = ""; - this.Offset = new $Int64(0, 0); - return; - } - this.msg = msg_; - this.Offset = Offset_; - }); - scanner = $pkg.scanner = $newType(0, $kindStruct, "json.scanner", true, "encoding/json", false, function(step_, endTop_, parseState_, err_, bytes_) { - this.$val = this; - if (arguments.length === 0) { - this.step = $throwNilPointerError; - this.endTop = false; - this.parseState = sliceType$1.nil; - this.err = $ifaceNil; - this.bytes = new $Int64(0, 0); - return; - } - this.step = step_; - this.endTop = endTop_; - this.parseState = parseState_; - this.err = err_; - this.bytes = bytes_; - }); - Marshaler = $pkg.Marshaler = $newType(8, $kindInterface, "json.Marshaler", true, "encoding/json", true, null); - UnsupportedTypeError = $pkg.UnsupportedTypeError = $newType(0, $kindStruct, "json.UnsupportedTypeError", true, "encoding/json", true, function(Type_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = $ifaceNil; - return; - } - this.Type = Type_; - }); - UnsupportedValueError = $pkg.UnsupportedValueError = $newType(0, $kindStruct, "json.UnsupportedValueError", true, "encoding/json", true, function(Value_, Str_) { - this.$val = this; - if (arguments.length === 0) { - this.Value = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - this.Str = ""; - return; - } - this.Value = Value_; - this.Str = Str_; - }); - MarshalerError = $pkg.MarshalerError = $newType(0, $kindStruct, "json.MarshalerError", true, "encoding/json", true, function(Type_, Err_, sourceFunc_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = $ifaceNil; - this.Err = $ifaceNil; - this.sourceFunc = ""; - return; - } - this.Type = Type_; - this.Err = Err_; - this.sourceFunc = sourceFunc_; - }); - encodeState = $pkg.encodeState = $newType(0, $kindStruct, "json.encodeState", true, "encoding/json", false, function(Buffer_, scratch_, ptrLevel_, ptrSeen_) { - this.$val = this; - if (arguments.length === 0) { - this.Buffer = new bytes.Buffer.ptr(sliceType$2.nil, 0, 0); - this.scratch = arrayType.zero(); - this.ptrLevel = 0; - this.ptrSeen = false; - return; - } - this.Buffer = Buffer_; - this.scratch = scratch_; - this.ptrLevel = ptrLevel_; - this.ptrSeen = ptrSeen_; - }); - jsonError = $pkg.jsonError = $newType(0, $kindStruct, "json.jsonError", true, "encoding/json", false, function(error_) { - this.$val = this; - if (arguments.length === 0) { - this.error = $ifaceNil; - return; - } - this.error = error_; - }); - encOpts = $pkg.encOpts = $newType(0, $kindStruct, "json.encOpts", true, "encoding/json", false, function(quoted_, escapeHTML_) { - this.$val = this; - if (arguments.length === 0) { - this.quoted = false; - this.escapeHTML = false; - return; - } - this.quoted = quoted_; - this.escapeHTML = escapeHTML_; - }); - encoderFunc = $pkg.encoderFunc = $newType(4, $kindFunc, "json.encoderFunc", true, "encoding/json", false, null); - floatEncoder = $pkg.floatEncoder = $newType(4, $kindInt, "json.floatEncoder", true, "encoding/json", false, null); - structEncoder = $pkg.structEncoder = $newType(0, $kindStruct, "json.structEncoder", true, "encoding/json", false, function(fields_) { - this.$val = this; - if (arguments.length === 0) { - this.fields = new structFields.ptr(sliceType$3.nil, false); - return; - } - this.fields = fields_; - }); - structFields = $pkg.structFields = $newType(0, $kindStruct, "json.structFields", true, "encoding/json", false, function(list_, nameIndex_) { - this.$val = this; - if (arguments.length === 0) { - this.list = sliceType$3.nil; - this.nameIndex = false; - return; - } - this.list = list_; - this.nameIndex = nameIndex_; - }); - mapEncoder = $pkg.mapEncoder = $newType(0, $kindStruct, "json.mapEncoder", true, "encoding/json", false, function(elemEnc_) { - this.$val = this; - if (arguments.length === 0) { - this.elemEnc = $throwNilPointerError; - return; - } - this.elemEnc = elemEnc_; - }); - sliceEncoder = $pkg.sliceEncoder = $newType(0, $kindStruct, "json.sliceEncoder", true, "encoding/json", false, function(arrayEnc_) { - this.$val = this; - if (arguments.length === 0) { - this.arrayEnc = $throwNilPointerError; - return; - } - this.arrayEnc = arrayEnc_; - }); - arrayEncoder = $pkg.arrayEncoder = $newType(0, $kindStruct, "json.arrayEncoder", true, "encoding/json", false, function(elemEnc_) { - this.$val = this; - if (arguments.length === 0) { - this.elemEnc = $throwNilPointerError; - return; - } - this.elemEnc = elemEnc_; - }); - ptrEncoder = $pkg.ptrEncoder = $newType(0, $kindStruct, "json.ptrEncoder", true, "encoding/json", false, function(elemEnc_) { - this.$val = this; - if (arguments.length === 0) { - this.elemEnc = $throwNilPointerError; - return; - } - this.elemEnc = elemEnc_; - }); - condAddrEncoder = $pkg.condAddrEncoder = $newType(0, $kindStruct, "json.condAddrEncoder", true, "encoding/json", false, function(canAddrEnc_, elseEnc_) { - this.$val = this; - if (arguments.length === 0) { - this.canAddrEnc = $throwNilPointerError; - this.elseEnc = $throwNilPointerError; - return; - } - this.canAddrEnc = canAddrEnc_; - this.elseEnc = elseEnc_; - }); - reflectWithString = $pkg.reflectWithString = $newType(0, $kindStruct, "json.reflectWithString", true, "encoding/json", false, function(k_, v_, ks_) { - this.$val = this; - if (arguments.length === 0) { - this.k = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - this.v = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - this.ks = ""; - return; - } - this.k = k_; - this.v = v_; - this.ks = ks_; - }); - field = $pkg.field = $newType(0, $kindStruct, "json.field", true, "encoding/json", false, function(name_, nameBytes_, equalFold_, nameNonEsc_, nameEscHTML_, tag_, index_, typ_, omitEmpty_, quoted_, encoder_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.nameBytes = sliceType$2.nil; - this.equalFold = $throwNilPointerError; - this.nameNonEsc = ""; - this.nameEscHTML = ""; - this.tag = false; - this.index = sliceType$1.nil; - this.typ = $ifaceNil; - this.omitEmpty = false; - this.quoted = false; - this.encoder = $throwNilPointerError; - return; - } - this.name = name_; - this.nameBytes = nameBytes_; - this.equalFold = equalFold_; - this.nameNonEsc = nameNonEsc_; - this.nameEscHTML = nameEscHTML_; - this.tag = tag_; - this.index = index_; - this.typ = typ_; - this.omitEmpty = omitEmpty_; - this.quoted = quoted_; - this.encoder = encoder_; - }); - byIndex = $pkg.byIndex = $newType(12, $kindSlice, "json.byIndex", true, "encoding/json", false, null); - Unmarshaler = $pkg.Unmarshaler = $newType(8, $kindInterface, "json.Unmarshaler", true, "encoding/json", true, null); - UnmarshalTypeError = $pkg.UnmarshalTypeError = $newType(0, $kindStruct, "json.UnmarshalTypeError", true, "encoding/json", true, function(Value_, Type_, Offset_, Struct_, Field_) { - this.$val = this; - if (arguments.length === 0) { - this.Value = ""; - this.Type = $ifaceNil; - this.Offset = new $Int64(0, 0); - this.Struct = ""; - this.Field = ""; - return; - } - this.Value = Value_; - this.Type = Type_; - this.Offset = Offset_; - this.Struct = Struct_; - this.Field = Field_; - }); - InvalidUnmarshalError = $pkg.InvalidUnmarshalError = $newType(0, $kindStruct, "json.InvalidUnmarshalError", true, "encoding/json", true, function(Type_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = $ifaceNil; - return; - } - this.Type = Type_; - }); - Number = $pkg.Number = $newType(8, $kindString, "json.Number", true, "encoding/json", true, null); - errorContext = $pkg.errorContext = $newType(0, $kindStruct, "json.errorContext", true, "encoding/json", false, function(Struct_, FieldStack_) { - this.$val = this; - if (arguments.length === 0) { - this.Struct = $ifaceNil; - this.FieldStack = sliceType$5.nil; - return; - } - this.Struct = Struct_; - this.FieldStack = FieldStack_; - }); - decodeState = $pkg.decodeState = $newType(0, $kindStruct, "json.decodeState", true, "encoding/json", false, function(data_, off_, opcode_, scan_, errorContext_, savedError_, useNumber_, disallowUnknownFields_) { - this.$val = this; - if (arguments.length === 0) { - this.data = sliceType$2.nil; - this.off = 0; - this.opcode = 0; - this.scan = new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)); - this.errorContext = ptrType$4.nil; - this.savedError = $ifaceNil; - this.useNumber = false; - this.disallowUnknownFields = false; - return; - } - this.data = data_; - this.off = off_; - this.opcode = opcode_; - this.scan = scan_; - this.errorContext = errorContext_; - this.savedError = savedError_; - this.useNumber = useNumber_; - this.disallowUnknownFields = disallowUnknownFields_; - }); - unquotedValue = $pkg.unquotedValue = $newType(0, $kindStruct, "json.unquotedValue", true, "encoding/json", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Int); - ptrType$1 = $ptrType(Marshaler); - ptrType$2 = $ptrType(encoding.TextMarshaler); - sliceType$2 = $sliceType($Uint8); - ptrType$3 = $ptrType(encoding.TextUnmarshaler); - ptrType$4 = $ptrType(errorContext); - ptrType$5 = $ptrType(bytes.Buffer); - ptrType$6 = $ptrType($String); - ptrType$7 = $ptrType($emptyInterface); - ptrType$8 = $ptrType(scanner); - ptrType$9 = $ptrType(encodeState); - arrayType = $arrayType($Uint8, 64); - sliceType$3 = $sliceType(field); - structType = $structType("", []); - sliceType$4 = $sliceType(reflectWithString); - structType$1 = $structType("encoding/json", [{prop: "ptr", name: "ptr", embedded: false, exported: false, typ: $Uintptr, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Int, tag: ""}]); - ptrType$10 = $ptrType(UnmarshalTypeError); - ptrType$11 = $ptrType(reflect.rtype); - mapType = $mapType($String, $emptyInterface); - sliceType$5 = $sliceType($String); - ptrType$12 = $ptrType(field); - ptrType$13 = $ptrType(Decoder); - ptrType$14 = $ptrType(Encoder); - ptrType$15 = $ptrType(SyntaxError); - funcType = $funcType([ptrType$8, $Uint8], [$Int], false); - ptrType$16 = $ptrType(UnsupportedTypeError); - ptrType$17 = $ptrType(UnsupportedValueError); - ptrType$19 = $ptrType(MarshalerError); - mapType$1 = $mapType($emptyInterface, structType); - mapType$2 = $mapType($String, $Int); - ptrType$20 = $ptrType(reflectWithString); - funcType$1 = $funcType([sliceType$2, sliceType$2], [$Bool], false); - ptrType$22 = $ptrType(InvalidUnmarshalError); - ptrType$23 = $ptrType(decodeState); - parseTag = function(tag) { - var _tuple, opt, tag; - _tuple = strings.Cut(tag, ","); - tag = _tuple[0]; - opt = _tuple[1]; - return [tag, (opt)]; - }; - tagOptions.prototype.Contains = function(optionName) { - var _tuple, name, o, optionName, s; - o = this.$val; - if (o.length === 0) { - return false; - } - s = (o); - while (true) { - if (!(!(s === ""))) { break; } - name = ""; - _tuple = strings.Cut(s, ","); - name = _tuple[0]; - s = _tuple[1]; - if (name === optionName) { - return true; - } - } - return false; - }; - $ptrType(tagOptions).prototype.Contains = function(optionName) { return new tagOptions(this.$get()).Contains(optionName); }; - NewDecoder = function(r) { - var r; - return new Decoder.ptr(r, sliceType$2.nil, new decodeState.ptr(sliceType$2.nil, 0, 0, new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)), ptrType$4.nil, $ifaceNil, false, false), 0, new $Int64(0, 0), new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)), $ifaceNil, 0, sliceType$1.nil); - }; - $pkg.NewDecoder = NewDecoder; - Decoder.ptr.prototype.UseNumber = function() { - var dec; - dec = this; - dec.d.useNumber = true; - }; - Decoder.prototype.UseNumber = function() { return this.$val.UseNumber(); }; - Decoder.ptr.prototype.DisallowUnknownFields = function() { - var dec; - dec = this; - dec.d.disallowUnknownFields = true; - }; - Decoder.prototype.DisallowUnknownFields = function() { return this.$val.DisallowUnknownFields(); }; - Decoder.ptr.prototype.Decode = function(v) { - var {_r$3, _r$4, _r$5, _tuple, dec, err, err$1, n, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - if (!($interfaceIsEqual(dec.err, $ifaceNil))) { - $s = -1; return dec.err; - } - _r$3 = dec.tokenPrepareForDecode(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (!dec.tokenValueAllowed()) { - $s = -1; return new SyntaxError.ptr("not at beginning of value", dec.InputOffset()); - } - _r$4 = dec.readValue(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - n = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - dec.d.init($subslice(dec.buf, dec.scanp, (dec.scanp + n >> 0))); - dec.scanp = dec.scanp + (n) >> 0; - _r$5 = dec.d.unmarshal(v); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$1 = _r$5; - dec.tokenValueEnd(); - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.Decode, $c: true, $r, _r$3, _r$4, _r$5, _tuple, dec, err, err$1, n, v, $s};return $f; - }; - Decoder.prototype.Decode = function(v) { return this.$val.Decode(v); }; - Decoder.ptr.prototype.Buffered = function() { - var dec; - dec = this; - return bytes.NewReader($subslice(dec.buf, dec.scanp)); - }; - Decoder.prototype.Buffered = function() { return this.$val.Buffered(); }; - Decoder.ptr.prototype.readValue = function() { - var {_1, _r$3, _r$4, _r$5, c, dec, err, n, scanp, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - dec.scan.reset(); - scanp = dec.scanp; - err = $ifaceNil; - /* while (true) { */ case 1: - /* if (!(scanp >= 0)) { break; } */ if(!(scanp >= 0)) { $s = 2; continue; } - /* while (true) { */ case 3: - /* if (!(scanp < dec.buf.$length)) { break; } */ if(!(scanp < dec.buf.$length)) { $s = 4; continue; } - c = (x = dec.buf, ((scanp < 0 || scanp >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + scanp])); - dec.scan.bytes = (x$1 = dec.scan.bytes, x$2 = new $Int64(0, 1), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - _r$3 = dec.scan.step(dec.scan, c); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _1 = _r$3; - if (_1 === (10)) { - dec.scan.bytes = (x$3 = dec.scan.bytes, x$4 = new $Int64(0, 1), new $Int64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)); - /* break Input; */ $s = 2; continue s; - } else if ((_1 === (5)) || (_1 === (8))) { - if (stateEndValue(dec.scan, 32) === 10) { - scanp = scanp + (1) >> 0; - /* break Input; */ $s = 2; continue s; - } - } else if (_1 === (11)) { - dec.err = dec.scan.err; - $s = -1; return [0, dec.scan.err]; - } - case 5: - scanp = scanp + (1) >> 0; - $s = 3; continue; - case 4: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(err, io.EOF)) { */ case 9: - _r$4 = dec.scan.step(dec.scan, 32); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 === 10) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$4 === 10) { */ case 11: - /* break Input; */ $s = 2; continue s; - /* } */ case 12: - if (nonSpace(dec.buf)) { - err = io.ErrUnexpectedEOF; - } - /* } */ case 10: - dec.err = err; - $s = -1; return [0, err]; - /* } */ case 8: - n = scanp - dec.scanp >> 0; - _r$5 = dec.refill(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err = _r$5; - scanp = dec.scanp + n >> 0; - $s = 1; continue; - case 2: - $s = -1; return [scanp - dec.scanp >> 0, $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.readValue, $c: true, $r, _1, _r$3, _r$4, _r$5, c, dec, err, n, scanp, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - Decoder.prototype.readValue = function() { return this.$val.readValue(); }; - Decoder.ptr.prototype.refill = function() { - var {_r$3, _tuple, dec, err, n, n$1, newBuf, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - if (dec.scanp > 0) { - dec.scanned = (x = dec.scanned, x$1 = (new $Int64(0, dec.scanp)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = $copySlice(dec.buf, $subslice(dec.buf, dec.scanp)); - dec.buf = $subslice(dec.buf, 0, n); - dec.scanp = 0; - } - if ((dec.buf.$capacity - dec.buf.$length >> 0) < 512) { - newBuf = $makeSlice(sliceType$2, dec.buf.$length, (($imul(2, dec.buf.$capacity)) + 512 >> 0)); - $copySlice(newBuf, dec.buf); - dec.buf = newBuf; - } - _r$3 = dec.r.Read($subslice(dec.buf, dec.buf.$length, dec.buf.$capacity)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n$1 = _tuple[0]; - err = _tuple[1]; - dec.buf = $subslice(dec.buf, 0, (dec.buf.$length + n$1 >> 0)); - $s = -1; return err; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.refill, $c: true, $r, _r$3, _tuple, dec, err, n, n$1, newBuf, x, x$1, $s};return $f; - }; - Decoder.prototype.refill = function() { return this.$val.refill(); }; - nonSpace = function(b) { - var _i, _ref, b, c; - _ref = b; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!isSpace(c)) { - return true; - } - _i++; - } - return false; - }; - NewEncoder = function(w) { - var w; - return new Encoder.ptr(w, $ifaceNil, true, ptrType$5.nil, "", ""); - }; - $pkg.NewEncoder = NewEncoder; - Encoder.ptr.prototype.Encode = function(v) { - var {_r$3, _r$4, _r$5, _r$6, _r$7, _tuple, b, e, enc, err, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - if (!($interfaceIsEqual(enc.err, $ifaceNil))) { - $s = -1; return enc.err; - } - _r$3 = newEncodeState(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - e = _r$3; - _r$4 = e.marshal(v, new encOpts.ptr(false, enc.escapeHTML)); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$5 = e.Buffer.WriteByte(10); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - b = e.Buffer.Bytes(); - /* */ if (!(enc.indentPrefix === "") || !(enc.indentValue === "")) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(enc.indentPrefix === "") || !(enc.indentValue === "")) { */ case 4: - if (enc.indentBuf === ptrType$5.nil) { - enc.indentBuf = new bytes.Buffer.ptr(sliceType$2.nil, 0, 0); - } - enc.indentBuf.Reset(); - _r$6 = Indent(enc.indentBuf, b, enc.indentPrefix, enc.indentValue); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - b = enc.indentBuf.Bytes(); - /* } */ case 5: - _r$7 = enc.w.Write(b); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - enc.err = err; - } - encodeStatePool.Put(e); - $s = -1; return err; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.Encode, $c: true, $r, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, b, e, enc, err, v, $s};return $f; - }; - Encoder.prototype.Encode = function(v) { return this.$val.Encode(v); }; - Encoder.ptr.prototype.SetIndent = function(prefix, indent) { - var enc, indent, prefix; - enc = this; - enc.indentPrefix = prefix; - enc.indentValue = indent; - }; - Encoder.prototype.SetIndent = function(prefix, indent) { return this.$val.SetIndent(prefix, indent); }; - Encoder.ptr.prototype.SetEscapeHTML = function(on) { - var enc, on; - enc = this; - enc.escapeHTML = on; - }; - Encoder.prototype.SetEscapeHTML = function(on) { return this.$val.SetEscapeHTML(on); }; - Decoder.ptr.prototype.tokenPrepareForDecode = function() { - var {_1, _r$3, _r$4, _tuple, _tuple$1, c, c$1, dec, err, err$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - _1 = dec.tokenState; - /* */ if (_1 === (3)) { $s = 2; continue; } - /* */ if (_1 === (6)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (3)) { */ case 2: - _r$3 = dec.peek(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (!((c === 44))) { - $s = -1; return new SyntaxError.ptr("expected comma after array element", dec.InputOffset()); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = 2; - $s = 4; continue; - /* } else if (_1 === (6)) { */ case 3: - _r$4 = dec.peek(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - c$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - if (!((c$1 === 58))) { - $s = -1; return new SyntaxError.ptr("expected colon after object key", dec.InputOffset()); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = 7; - /* } */ case 4: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.tokenPrepareForDecode, $c: true, $r, _1, _r$3, _r$4, _tuple, _tuple$1, c, c$1, dec, err, err$1, $s};return $f; - }; - Decoder.prototype.tokenPrepareForDecode = function() { return this.$val.tokenPrepareForDecode(); }; - Decoder.ptr.prototype.tokenValueAllowed = function() { - var _1, dec; - dec = this; - _1 = dec.tokenState; - if ((_1 === (0)) || (_1 === (1)) || (_1 === (2)) || (_1 === (7))) { - return true; - } - return false; - }; - Decoder.prototype.tokenValueAllowed = function() { return this.$val.tokenValueAllowed(); }; - Decoder.ptr.prototype.tokenValueEnd = function() { - var _1, dec; - dec = this; - _1 = dec.tokenState; - if ((_1 === (1)) || (_1 === (2))) { - dec.tokenState = 3; - } else if (_1 === (7)) { - dec.tokenState = 8; - } - }; - Decoder.prototype.tokenValueEnd = function() { return this.$val.tokenValueEnd(); }; - Delim.prototype.String = function() { - var d; - d = this.$val; - return ($encodeRune(d)); - }; - $ptrType(Delim).prototype.String = function() { return new Delim(this.$get()).String(); }; - Decoder.ptr.prototype.Token = function() { - var {_1, _r$3, _r$4, _r$5, _r$6, _tuple, c, dec, err, err$1, err$2, old, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - /* while (true) { */ case 1: - x = [x]; - x$1 = [x$1]; - _r$3 = dec.peek(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - _1 = c; - /* */ if (_1 === (91)) { $s = 5; continue; } - /* */ if (_1 === (93)) { $s = 6; continue; } - /* */ if (_1 === (123)) { $s = 7; continue; } - /* */ if (_1 === (125)) { $s = 8; continue; } - /* */ if (_1 === (58)) { $s = 9; continue; } - /* */ if (_1 === (44)) { $s = 10; continue; } - /* */ if (_1 === (34)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_1 === (91)) { */ case 5: - if (!dec.tokenValueAllowed()) { - $s = -1; return dec.tokenError(c); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenStack = $append(dec.tokenStack, dec.tokenState); - dec.tokenState = 1; - $s = -1; return [new Delim(91), $ifaceNil]; - /* } else if (_1 === (93)) { */ case 6: - if (!((dec.tokenState === 1)) && !((dec.tokenState === 3))) { - $s = -1; return dec.tokenError(c); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = (x$2 = dec.tokenStack, x$3 = dec.tokenStack.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])); - dec.tokenStack = $subslice(dec.tokenStack, 0, (dec.tokenStack.$length - 1 >> 0)); - dec.tokenValueEnd(); - $s = -1; return [new Delim(93), $ifaceNil]; - /* } else if (_1 === (123)) { */ case 7: - if (!dec.tokenValueAllowed()) { - $s = -1; return dec.tokenError(c); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenStack = $append(dec.tokenStack, dec.tokenState); - dec.tokenState = 4; - $s = -1; return [new Delim(123), $ifaceNil]; - /* } else if (_1 === (125)) { */ case 8: - if (!((dec.tokenState === 4)) && !((dec.tokenState === 8))) { - $s = -1; return dec.tokenError(c); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = (x$4 = dec.tokenStack, x$5 = dec.tokenStack.$length - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])); - dec.tokenStack = $subslice(dec.tokenStack, 0, (dec.tokenStack.$length - 1 >> 0)); - dec.tokenValueEnd(); - $s = -1; return [new Delim(125), $ifaceNil]; - /* } else if (_1 === (58)) { */ case 9: - if (!((dec.tokenState === 6))) { - $s = -1; return dec.tokenError(c); - } - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = 7; - /* continue; */ $s = 1; continue; - $s = 13; continue; - /* } else if (_1 === (44)) { */ case 10: - if (dec.tokenState === 3) { - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = 2; - /* continue; */ $s = 1; continue; - } - if (dec.tokenState === 8) { - dec.scanp = dec.scanp + (1) >> 0; - dec.tokenState = 5; - /* continue; */ $s = 1; continue; - } - $s = -1; return dec.tokenError(c); - /* } else if (_1 === (34)) { */ case 11: - /* */ if ((dec.tokenState === 4) || (dec.tokenState === 5)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ((dec.tokenState === 4) || (dec.tokenState === 5)) { */ case 14: - x[0] = ""; - old = dec.tokenState; - dec.tokenState = 0; - _r$4 = dec.Decode((x.$ptr || (x.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, x)))); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$1 = _r$4; - dec.tokenState = old; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$1]; - } - dec.tokenState = 6; - $s = -1; return [new $String(x[0]), $ifaceNil]; - /* } */ case 15: - if (!dec.tokenValueAllowed()) { - $s = -1; return dec.tokenError(c); - } - x$1[0] = $ifaceNil; - _r$5 = dec.Decode((x$1.$ptr || (x$1.$ptr = new ptrType$7(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, x$1)))); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$2 = _r$5; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$2]; - } - $s = -1; return [x$1[0], $ifaceNil]; - /* } else { */ case 12: - if (!dec.tokenValueAllowed()) { - $s = -1; return dec.tokenError(c); - } - x$1[0] = $ifaceNil; - _r$6 = dec.Decode((x$1.$ptr || (x$1.$ptr = new ptrType$7(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, x$1)))); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err$2 = _r$6; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$2]; - } - $s = -1; return [x$1[0], $ifaceNil]; - /* } */ case 13: - case 4: - $s = 1; continue; - case 2: - $s = -1; return [$ifaceNil, $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.Token, $c: true, $r, _1, _r$3, _r$4, _r$5, _r$6, _tuple, c, dec, err, err$1, err$2, old, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - Decoder.prototype.Token = function() { return this.$val.Token(); }; - Decoder.ptr.prototype.tokenError = function(c) { - var _1, c, context, dec; - dec = this; - context = ""; - _1 = dec.tokenState; - if (_1 === (0)) { - context = " looking for beginning of value"; - } else if ((_1 === (1)) || (_1 === (2)) || (_1 === (7))) { - context = " looking for beginning of value"; - } else if (_1 === (3)) { - context = " after array element"; - } else if (_1 === (5)) { - context = " looking for beginning of object key string"; - } else if (_1 === (6)) { - context = " after object key"; - } else if (_1 === (8)) { - context = " after object key:value pair"; - } - return [$ifaceNil, new SyntaxError.ptr("invalid character " + quoteChar(c) + context, dec.InputOffset())]; - }; - Decoder.prototype.tokenError = function(c) { return this.$val.tokenError(c); }; - Decoder.ptr.prototype.More = function() { - var {_r$3, _tuple, c, dec, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - _r$3 = dec.peek(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - c = _tuple[0]; - err = _tuple[1]; - $s = -1; return $interfaceIsEqual(err, $ifaceNil) && !((c === 93)) && !((c === 125)); - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.More, $c: true, $r, _r$3, _tuple, c, dec, err, $s};return $f; - }; - Decoder.prototype.More = function() { return this.$val.More(); }; - Decoder.ptr.prototype.peek = function() { - var {_r$3, c, dec, err, i, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dec = this; - err = $ifaceNil; - /* while (true) { */ case 1: - i = dec.scanp; - while (true) { - if (!(i < dec.buf.$length)) { break; } - c = (x = dec.buf, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - if (isSpace(c)) { - i = i + (1) >> 0; - continue; - } - dec.scanp = i; - $s = -1; return [c, $ifaceNil]; - } - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - _r$3 = dec.refill(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - $s = 1; continue; - case 2: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.peek, $c: true, $r, _r$3, c, dec, err, i, x, $s};return $f; - }; - Decoder.prototype.peek = function() { return this.$val.peek(); }; - Decoder.ptr.prototype.InputOffset = function() { - var dec, x, x$1; - dec = this; - return (x = dec.scanned, x$1 = (new $Int64(0, dec.scanp)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - }; - Decoder.prototype.InputOffset = function() { return this.$val.InputOffset(); }; - checkValid = function(data, scan) { - var {_i, _r$3, _r$4, _ref, c, data, scan, x, x$1, $s, $r, $c} = $restore(this, {data, scan}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - scan.reset(); - _ref = data; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - scan.bytes = (x = scan.bytes, x$1 = new $Int64(0, 1), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - _r$3 = scan.step(scan, c); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 === 11) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$3 === 11) { */ case 3: - $s = -1; return scan.err; - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - _r$4 = scan.eof(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 === 11) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$4 === 11) { */ case 6: - $s = -1; return scan.err; - /* } */ case 7: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: checkValid, $c: true, $r, _i, _r$3, _r$4, _ref, c, data, scan, x, x$1, $s};return $f; - }; - SyntaxError.ptr.prototype.Error = function() { - var e; - e = this; - return e.msg; - }; - SyntaxError.prototype.Error = function() { return this.$val.Error(); }; - newScanner = function() { - var {_r$3, scan, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = scannerPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - scan = $assertType(_r$3, ptrType$8); - scan.bytes = new $Int64(0, 0); - scan.reset(); - $s = -1; return scan; - /* */ } return; } var $f = {$blk: newScanner, $c: true, $r, _r$3, scan, $s};return $f; - }; - freeScanner = function(scan) { - var scan; - if (scan.parseState.$length > 1024) { - scan.parseState = sliceType$1.nil; - } - scannerPool.Put(scan); - }; - scanner.ptr.prototype.reset = function() { - var s; - s = this; - s.step = stateBeginValue; - s.parseState = $subslice(s.parseState, 0, 0); - s.err = $ifaceNil; - s.endTop = false; - }; - scanner.prototype.reset = function() { return this.$val.reset(); }; - scanner.ptr.prototype.eof = function() { - var {_r$3, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (!($interfaceIsEqual(s.err, $ifaceNil))) { - $s = -1; return 11; - } - if (s.endTop) { - $s = -1; return 10; - } - _r$3 = s.step(s, 32); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - if (s.endTop) { - $s = -1; return 10; - } - if ($interfaceIsEqual(s.err, $ifaceNil)) { - s.err = new SyntaxError.ptr("unexpected end of JSON input", s.bytes); - } - $s = -1; return 11; - /* */ } return; } var $f = {$blk: scanner.ptr.prototype.eof, $c: true, $r, _r$3, s, $s};return $f; - }; - scanner.prototype.eof = function() { return this.$val.eof(); }; - scanner.ptr.prototype.pushParseState = function(c, newParseState, successState) { - var c, newParseState, s, successState; - s = this; - s.parseState = $append(s.parseState, newParseState); - if (s.parseState.$length <= 10000) { - return successState; - } - return s.error(c, "exceeded max depth"); - }; - scanner.prototype.pushParseState = function(c, newParseState, successState) { return this.$val.pushParseState(c, newParseState, successState); }; - scanner.ptr.prototype.popParseState = function() { - var n, s; - s = this; - n = s.parseState.$length - 1 >> 0; - s.parseState = $subslice(s.parseState, 0, n); - if (n === 0) { - s.step = stateEndTop; - s.endTop = true; - } else { - s.step = stateEndValue; - } - }; - scanner.prototype.popParseState = function() { return this.$val.popParseState(); }; - isSpace = function(c) { - var c; - return c <= 32 && ((c === 32) || (c === 9) || (c === 13) || (c === 10)); - }; - stateBeginValueOrEmpty = function(s, c) { - var c, s; - if (isSpace(c)) { - return 9; - } - if (c === 93) { - return stateEndValue(s, c); - } - return stateBeginValue(s, c); - }; - stateBeginValue = function(s, c) { - var _1, c, s; - if (isSpace(c)) { - return 9; - } - _1 = c; - if (_1 === (123)) { - s.step = stateBeginStringOrEmpty; - return s.pushParseState(c, 0, 2); - } else if (_1 === (91)) { - s.step = stateBeginValueOrEmpty; - return s.pushParseState(c, 2, 6); - } else if (_1 === (34)) { - s.step = stateInString; - return 1; - } else if (_1 === (45)) { - s.step = stateNeg; - return 1; - } else if (_1 === (48)) { - s.step = state0; - return 1; - } else if (_1 === (116)) { - s.step = stateT; - return 1; - } else if (_1 === (102)) { - s.step = stateF; - return 1; - } else if (_1 === (110)) { - s.step = stateN; - return 1; - } - if (49 <= c && c <= 57) { - s.step = state1; - return 1; - } - return s.error(c, "looking for beginning of value"); - }; - stateBeginStringOrEmpty = function(s, c) { - var c, n, s, x, x$1; - if (isSpace(c)) { - return 9; - } - if (c === 125) { - n = s.parseState.$length; - (x = s.parseState, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = 1)); - return stateEndValue(s, c); - } - return stateBeginString(s, c); - }; - stateBeginString = function(s, c) { - var c, s; - if (isSpace(c)) { - return 9; - } - if (c === 34) { - s.step = stateInString; - return 1; - } - return s.error(c, "looking for beginning of object key string"); - }; - stateEndValue = function(s, c) { - var _1, c, n, ps, s, x, x$1, x$2, x$3, x$4, x$5; - n = s.parseState.$length; - if (n === 0) { - s.step = stateEndTop; - s.endTop = true; - return stateEndTop(s, c); - } - if (isSpace(c)) { - s.step = stateEndValue; - return 9; - } - ps = (x = s.parseState, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - _1 = ps; - if (_1 === (0)) { - if (c === 58) { - (x$2 = s.parseState, x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3] = 1)); - s.step = stateBeginValue; - return 3; - } - return s.error(c, "after object key"); - } else if (_1 === (1)) { - if (c === 44) { - (x$4 = s.parseState, x$5 = n - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5] = 0)); - s.step = stateBeginString; - return 4; - } - if (c === 125) { - s.popParseState(); - return 5; - } - return s.error(c, "after object key:value pair"); - } else if (_1 === (2)) { - if (c === 44) { - s.step = stateBeginValue; - return 7; - } - if (c === 93) { - s.popParseState(); - return 8; - } - return s.error(c, "after array element"); - } - return s.error(c, ""); - }; - stateEndTop = function(s, c) { - var c, s; - if (!isSpace(c)) { - s.error(c, "after top-level value"); - } - return 10; - }; - stateInString = function(s, c) { - var c, s; - if (c === 34) { - s.step = stateEndValue; - return 0; - } - if (c === 92) { - s.step = stateInStringEsc; - return 0; - } - if (c < 32) { - return s.error(c, "in string literal"); - } - return 0; - }; - stateInStringEsc = function(s, c) { - var _1, c, s; - _1 = c; - if ((_1 === (98)) || (_1 === (102)) || (_1 === (110)) || (_1 === (114)) || (_1 === (116)) || (_1 === (92)) || (_1 === (47)) || (_1 === (34))) { - s.step = stateInString; - return 0; - } else if (_1 === (117)) { - s.step = stateInStringEscU; - return 0; - } - return s.error(c, "in string escape code"); - }; - stateInStringEscU = function(s, c) { - var c, s; - if (48 <= c && c <= 57 || 97 <= c && c <= 102 || 65 <= c && c <= 70) { - s.step = stateInStringEscU1; - return 0; - } - return s.error(c, "in \\u hexadecimal character escape"); - }; - stateInStringEscU1 = function(s, c) { - var c, s; - if (48 <= c && c <= 57 || 97 <= c && c <= 102 || 65 <= c && c <= 70) { - s.step = stateInStringEscU12; - return 0; - } - return s.error(c, "in \\u hexadecimal character escape"); - }; - stateInStringEscU12 = function(s, c) { - var c, s; - if (48 <= c && c <= 57 || 97 <= c && c <= 102 || 65 <= c && c <= 70) { - s.step = stateInStringEscU123; - return 0; - } - return s.error(c, "in \\u hexadecimal character escape"); - }; - stateInStringEscU123 = function(s, c) { - var c, s; - if (48 <= c && c <= 57 || 97 <= c && c <= 102 || 65 <= c && c <= 70) { - s.step = stateInString; - return 0; - } - return s.error(c, "in \\u hexadecimal character escape"); - }; - stateNeg = function(s, c) { - var c, s; - if (c === 48) { - s.step = state0; - return 0; - } - if (49 <= c && c <= 57) { - s.step = state1; - return 0; - } - return s.error(c, "in numeric literal"); - }; - state1 = function(s, c) { - var c, s; - if (48 <= c && c <= 57) { - s.step = state1; - return 0; - } - return state0(s, c); - }; - state0 = function(s, c) { - var c, s; - if (c === 46) { - s.step = stateDot; - return 0; - } - if ((c === 101) || (c === 69)) { - s.step = stateE; - return 0; - } - return stateEndValue(s, c); - }; - stateDot = function(s, c) { - var c, s; - if (48 <= c && c <= 57) { - s.step = stateDot0; - return 0; - } - return s.error(c, "after decimal point in numeric literal"); - }; - stateDot0 = function(s, c) { - var c, s; - if (48 <= c && c <= 57) { - return 0; - } - if ((c === 101) || (c === 69)) { - s.step = stateE; - return 0; - } - return stateEndValue(s, c); - }; - stateE = function(s, c) { - var c, s; - if ((c === 43) || (c === 45)) { - s.step = stateESign; - return 0; - } - return stateESign(s, c); - }; - stateESign = function(s, c) { - var c, s; - if (48 <= c && c <= 57) { - s.step = stateE0; - return 0; - } - return s.error(c, "in exponent of numeric literal"); - }; - stateE0 = function(s, c) { - var c, s; - if (48 <= c && c <= 57) { - return 0; - } - return stateEndValue(s, c); - }; - stateT = function(s, c) { - var c, s; - if (c === 114) { - s.step = stateTr; - return 0; - } - return s.error(c, "in literal true (expecting 'r')"); - }; - stateTr = function(s, c) { - var c, s; - if (c === 117) { - s.step = stateTru; - return 0; - } - return s.error(c, "in literal true (expecting 'u')"); - }; - stateTru = function(s, c) { - var c, s; - if (c === 101) { - s.step = stateEndValue; - return 0; - } - return s.error(c, "in literal true (expecting 'e')"); - }; - stateF = function(s, c) { - var c, s; - if (c === 97) { - s.step = stateFa; - return 0; - } - return s.error(c, "in literal false (expecting 'a')"); - }; - stateFa = function(s, c) { - var c, s; - if (c === 108) { - s.step = stateFal; - return 0; - } - return s.error(c, "in literal false (expecting 'l')"); - }; - stateFal = function(s, c) { - var c, s; - if (c === 115) { - s.step = stateFals; - return 0; - } - return s.error(c, "in literal false (expecting 's')"); - }; - stateFals = function(s, c) { - var c, s; - if (c === 101) { - s.step = stateEndValue; - return 0; - } - return s.error(c, "in literal false (expecting 'e')"); - }; - stateN = function(s, c) { - var c, s; - if (c === 117) { - s.step = stateNu; - return 0; - } - return s.error(c, "in literal null (expecting 'u')"); - }; - stateNu = function(s, c) { - var c, s; - if (c === 108) { - s.step = stateNul; - return 0; - } - return s.error(c, "in literal null (expecting 'l')"); - }; - stateNul = function(s, c) { - var c, s; - if (c === 108) { - s.step = stateEndValue; - return 0; - } - return s.error(c, "in literal null (expecting 'l')"); - }; - stateError = function(s, c) { - var c, s; - return 11; - }; - scanner.ptr.prototype.error = function(c, context) { - var c, context, s; - s = this; - s.step = stateError; - s.err = new SyntaxError.ptr("invalid character " + quoteChar(c) + " " + context, s.bytes); - return 11; - }; - scanner.prototype.error = function(c, context) { return this.$val.error(c, context); }; - quoteChar = function(c) { - var c, s; - if (c === 39) { - return "'\\''"; - } - if (c === 34) { - return "'\"'"; - } - s = strconv.Quote(($encodeRune(c))); - return "'" + $substring(s, 1, (s.length - 1 >> 0)) + "'"; - }; - compact = function(dst, src, escape) { - var {$24r, $24r$1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, c, dst, escape, i, origLen, scan, src, start, v, x, x$1, x$2, $s, $deferred, $r, $c} = $restore(this, {dst, src, escape}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - origLen = dst.Len(); - _r$3 = newScanner(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - scan = _r$3; - $deferred.push([freeScanner, [scan]]); - start = 0; - _ref = src; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (escape && ((c === 60) || (c === 62) || (c === 38))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (escape && ((c === 60) || (c === 62) || (c === 38))) { */ case 4: - /* */ if (start < i) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (start < i) { */ case 6: - _r$4 = dst.Write($subslice(src, start, i)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 7: - _r$5 = dst.WriteString("\\u00"); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = dst.WriteByte(hex.charCodeAt((c >>> 4 << 24 >>> 24))); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = dst.WriteByte(hex.charCodeAt(((c & 15) >>> 0))); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - start = i + 1 >> 0; - /* } */ case 5: - /* */ if (escape && (c === 226) && (i + 2 >> 0) < src.$length && ((x = i + 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])) === 128) && ((((x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$1])) & ~1) << 24 >>> 24) === 168)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (escape && (c === 226) && (i + 2 >> 0) < src.$length && ((x = i + 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])) === 128) && ((((x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$1])) & ~1) << 24 >>> 24) === 168)) { */ case 12: - /* */ if (start < i) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (start < i) { */ case 14: - _r$8 = dst.Write($subslice(src, start, i)); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 15: - _r$9 = dst.WriteString("\\u202"); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = dst.WriteByte(hex.charCodeAt((((x$2 = i + 2 >> 0, ((x$2 < 0 || x$2 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$2])) & 15) >>> 0))); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - start = i + 3 >> 0; - /* } */ case 13: - _r$11 = scan.step(scan, c); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v = _r$11; - /* */ if (v >= 9) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (v >= 9) { */ case 20: - if (v === 11) { - /* break; */ $s = 3; continue; - } - /* */ if (start < i) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (start < i) { */ case 22: - _r$12 = dst.Write($subslice(src, start, i)); /* */ $s = 24; case 24: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - /* } */ case 23: - start = i + 1 >> 0; - /* } */ case 21: - _i++; - $s = 2; continue; - case 3: - _r$13 = scan.eof(); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (_r$13 === 11) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_r$13 === 11) { */ case 25: - dst.Truncate(origLen); - $24r = scan.err; - $s = 28; case 28: return $24r; - /* } */ case 26: - /* */ if (start < src.$length) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (start < src.$length) { */ case 29: - _r$14 = dst.Write($subslice(src, start)); /* */ $s = 31; case 31: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - /* } */ case 30: - $24r$1 = $ifaceNil; - $s = 32; case 32: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: compact, $c: true, $r, $24r, $24r$1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, c, dst, escape, i, origLen, scan, src, start, v, x, x$1, x$2, $s, $deferred};return $f; } } - }; - newline = function(dst, prefix, indent, depth) { - var {_r$3, _r$4, _r$5, depth, dst, i, indent, prefix, $s, $r, $c} = $restore(this, {dst, prefix, indent, depth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = dst.WriteByte(10); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = dst.WriteString(prefix); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < depth)) { break; } */ if(!(i < depth)) { $s = 4; continue; } - _r$5 = dst.WriteString(indent); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: newline, $c: true, $r, _r$3, _r$4, _r$5, depth, dst, i, indent, prefix, $s};return $f; - }; - Indent = function(dst, src, prefix, indent) { - var {$24r, $24r$1, _1, _i, _r$10, _r$11, _r$12, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, c, depth, dst, indent, needIndent, origLen, prefix, scan, src, v, x, x$1, $s, $deferred, $r, $c} = $restore(this, {dst, src, prefix, indent}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - origLen = dst.Len(); - _r$3 = newScanner(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - scan = _r$3; - $deferred.push([freeScanner, [scan]]); - needIndent = false; - depth = 0; - _ref = src; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - scan.bytes = (x = scan.bytes, x$1 = new $Int64(0, 1), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - _r$4 = scan.step(scan, c); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - v = _r$4; - if (v === 9) { - _i++; - /* continue; */ $s = 2; continue; - } - if (v === 11) { - /* break; */ $s = 3; continue; - } - /* */ if (needIndent && !((v === 5)) && !((v === 8))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (needIndent && !((v === 5)) && !((v === 8))) { */ case 5: - needIndent = false; - depth = depth + (1) >> 0; - $r = newline(dst, prefix, indent, depth); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - /* */ if (v === 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (v === 0) { */ case 8: - _r$5 = dst.WriteByte(c); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _i++; - /* continue; */ $s = 2; continue; - /* } */ case 9: - _1 = c; - /* */ if ((_1 === (123)) || (_1 === (91))) { $s = 12; continue; } - /* */ if (_1 === (44)) { $s = 13; continue; } - /* */ if (_1 === (58)) { $s = 14; continue; } - /* */ if ((_1 === (125)) || (_1 === (93))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ((_1 === (123)) || (_1 === (91))) { */ case 12: - needIndent = true; - _r$6 = dst.WriteByte(c); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 17; continue; - /* } else if (_1 === (44)) { */ case 13: - _r$7 = dst.WriteByte(c); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $r = newline(dst, prefix, indent, depth); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 17; continue; - /* } else if (_1 === (58)) { */ case 14: - _r$8 = dst.WriteByte(c); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = dst.WriteByte(32); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = 17; continue; - /* } else if ((_1 === (125)) || (_1 === (93))) { */ case 15: - /* */ if (needIndent) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (needIndent) { */ case 23: - needIndent = false; - $s = 25; continue; - /* } else { */ case 24: - depth = depth - (1) >> 0; - $r = newline(dst, prefix, indent, depth); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - _r$10 = dst.WriteByte(c); /* */ $s = 27; case 27: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = 17; continue; - /* } else { */ case 16: - _r$11 = dst.WriteByte(c); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - /* } */ case 17: - case 11: - _i++; - $s = 2; continue; - case 3: - _r$12 = scan.eof(); /* */ $s = 31; case 31: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12 === 11) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_r$12 === 11) { */ case 29: - dst.Truncate(origLen); - $24r = scan.err; - $s = 32; case 32: return $24r; - /* } */ case 30: - $24r$1 = $ifaceNil; - $s = 33; case 33: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Indent, $c: true, $r, $24r, $24r$1, _1, _i, _r$10, _r$11, _r$12, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, c, depth, dst, indent, needIndent, origLen, prefix, scan, src, v, x, x$1, $s, $deferred};return $f; } } - }; - $pkg.Indent = Indent; - foldFunc = function(s) { - var _i, _ref, b, nonLetter, s, special, upper; - nonLetter = false; - special = false; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (b >= 128) { - return bytes.EqualFold; - } - upper = (b & 223) >>> 0; - if (upper < 65 || upper > 90) { - nonLetter = true; - } else if ((upper === 75) || (upper === 83)) { - special = true; - } - _i++; - } - if (special) { - return equalFoldRight; - } - if (nonLetter) { - return asciiEqualFold; - } - return simpleLetterEqualFold; - }; - equalFoldRight = function(s, t) { - var _1, _i, _ref, _tuple, s, sb, sbUpper, size, t, tb, tr; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - sb = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (t.$length === 0) { - return false; - } - tb = (0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]); - if (tb < 128) { - if (!((sb === tb))) { - sbUpper = (sb & 223) >>> 0; - if (65 <= sbUpper && sbUpper <= 90) { - if (!((sbUpper === ((tb & 223) >>> 0)))) { - return false; - } - } else { - return false; - } - } - t = $subslice(t, 1); - _i++; - continue; - } - _tuple = utf8.DecodeRune(t); - tr = _tuple[0]; - size = _tuple[1]; - _1 = sb; - if ((_1 === (115)) || (_1 === (83))) { - if (!((tr === 383))) { - return false; - } - } else if ((_1 === (107)) || (_1 === (75))) { - if (!((tr === 8490))) { - return false; - } - } else { - return false; - } - t = $subslice(t, size); - _i++; - } - if (t.$length > 0) { - return false; - } - return true; - }; - asciiEqualFold = function(s, t) { - var _i, _ref, i, s, sb, t, tb; - if (!((s.$length === t.$length))) { - return false; - } - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - sb = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - tb = ((i < 0 || i >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + i]); - if (sb === tb) { - _i++; - continue; - } - if ((97 <= sb && sb <= 122) || (65 <= sb && sb <= 90)) { - if (!((((sb & 223) >>> 0) === ((tb & 223) >>> 0)))) { - return false; - } - } else { - return false; - } - _i++; - } - return true; - }; - simpleLetterEqualFold = function(s, t) { - var _i, _ref, b, i, s, t; - if (!((s.$length === t.$length))) { - return false; - } - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((((b & 223) >>> 0) === ((((i < 0 || i >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + i]) & 223) >>> 0)))) { - return false; - } - _i++; - } - return true; - }; - HTMLEscape = function(dst, src) { - var {_i, _r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, c, dst, i, src, start, x, x$1, x$2, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = 0; - _ref = src; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if ((c === 60) || (c === 62) || (c === 38)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((c === 60) || (c === 62) || (c === 38)) { */ case 3: - /* */ if (start < i) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (start < i) { */ case 5: - _r$3 = dst.Write($subslice(src, start, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 6: - _r$4 = dst.WriteString("\\u00"); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = dst.WriteByte(hex.charCodeAt((c >>> 4 << 24 >>> 24))); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = dst.WriteByte(hex.charCodeAt(((c & 15) >>> 0))); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - start = i + 1 >> 0; - /* } */ case 4: - /* */ if ((c === 226) && (i + 2 >> 0) < src.$length && ((x = i + 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])) === 128) && ((((x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$1])) & ~1) << 24 >>> 24) === 168)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ((c === 226) && (i + 2 >> 0) < src.$length && ((x = i + 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x])) === 128) && ((((x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$1])) & ~1) << 24 >>> 24) === 168)) { */ case 11: - /* */ if (start < i) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (start < i) { */ case 13: - _r$7 = dst.Write($subslice(src, start, i)); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 14: - _r$8 = dst.WriteString("\\u202"); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = dst.WriteByte(hex.charCodeAt((((x$2 = i + 2 >> 0, ((x$2 < 0 || x$2 >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x$2])) & 15) >>> 0))); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - start = i + 3 >> 0; - /* } */ case 12: - _i++; - $s = 1; continue; - case 2: - /* */ if (start < src.$length) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (start < src.$length) { */ case 18: - _r$10 = dst.Write($subslice(src, start)); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - /* } */ case 19: - $s = -1; return; - /* */ } return; } var $f = {$blk: HTMLEscape, $c: true, $r, _i, _r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, c, dst, i, src, start, x, x$1, x$2, $s};return $f; - }; - $pkg.HTMLEscape = HTMLEscape; - UnsupportedTypeError.ptr.prototype.Error = function() { - var {$24r, _r$3, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$3 = e.Type.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = "json: unsupported type: " + _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: UnsupportedTypeError.ptr.prototype.Error, $c: true, $r, $24r, _r$3, e, $s};return $f; - }; - UnsupportedTypeError.prototype.Error = function() { return this.$val.Error(); }; - UnsupportedValueError.ptr.prototype.Error = function() { - var e; - e = this; - return "json: unsupported value: " + e.Str; - }; - UnsupportedValueError.prototype.Error = function() { return this.$val.Error(); }; - MarshalerError.ptr.prototype.Error = function() { - var {$24r, _r$3, _r$4, e, srcFunc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - srcFunc = e.sourceFunc; - if (srcFunc === "") { - srcFunc = "MarshalJSON"; - } - _r$3 = e.Type.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = e.Err.Error(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = "json: error calling " + srcFunc + " for type " + _r$3 + ": " + _r$4; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: MarshalerError.ptr.prototype.Error, $c: true, $r, $24r, _r$3, _r$4, e, srcFunc, $s};return $f; - }; - MarshalerError.prototype.Error = function() { return this.$val.Error(); }; - MarshalerError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - MarshalerError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - newEncodeState = function() { - var {_r$3, e, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = encodeStatePool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = _r$3; - if (!($interfaceIsEqual(v, $ifaceNil))) { - e = $assertType(v, ptrType$9); - e.Buffer.Reset(); - if ($keys(e.ptrSeen).length > 0) { - $panic(new $String("ptrEncoder.encode should have emptied ptrSeen via defers")); - } - e.ptrLevel = 0; - $s = -1; return e; - } - $s = -1; return new encodeState.ptr(new bytes.Buffer.ptr(sliceType$2.nil, 0, 0), arrayType.zero(), 0, {}); - /* */ } return; } var $f = {$blk: newEncodeState, $c: true, $r, _r$3, e, v, $s};return $f; - }; - encodeState.ptr.prototype.marshal = function(v, opts) { - var {$24r, _r$3, e, err, opts, v, $s, $deferred, $r, $c} = $restore(this, {v, opts}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - err[0] = $ifaceNil; - e = this; - $deferred.push([(function(err) { return function() { - var _tuple, je, ok, r; - r = $recover(); - if (!($interfaceIsEqual(r, $ifaceNil))) { - _tuple = $assertType(r, jsonError, true); - je = $clone(_tuple[0], jsonError); - ok = _tuple[1]; - if (ok) { - err[0] = je.error; - } else { - $panic(r); - } - } - }; })(err), []]); - _r$3 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = e.reflectValue($clone(_r$3, reflect.Value), $clone(opts, encOpts)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err[0] = $ifaceNil; - $24r = err[0]; - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { var $f = {$blk: encodeState.ptr.prototype.marshal, $c: true, $r, $24r, _r$3, e, err, opts, v, $s, $deferred};return $f; } } - }; - encodeState.prototype.marshal = function(v, opts) { return this.$val.marshal(v, opts); }; - encodeState.ptr.prototype.error = function(err) { - var e, err, x; - e = this; - $panic((x = new jsonError.ptr(err), new x.constructor.elem(x))); - }; - encodeState.prototype.error = function(err) { return this.$val.error(err); }; - isEmptyValue = function(v) { - var _1, v, x, x$1; - _1 = $clone(v, reflect.Value).Kind(); - if ((_1 === (17)) || (_1 === (21)) || (_1 === (23)) || (_1 === (24))) { - return $clone(v, reflect.Value).Len() === 0; - } else if (_1 === (1)) { - return !$clone(v, reflect.Value).Bool(); - } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - return (x = $clone(v, reflect.Value).Int(), (x.$high === 0 && x.$low === 0)); - } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { - return (x$1 = $clone(v, reflect.Value).Uint(), (x$1.$high === 0 && x$1.$low === 0)); - } else if ((_1 === (13)) || (_1 === (14))) { - return $clone(v, reflect.Value).Float() === 0; - } else if ((_1 === (20)) || (_1 === (22))) { - return $clone(v, reflect.Value).IsNil(); - } - return false; - }; - encodeState.ptr.prototype.reflectValue = function(v, opts) { - var {_r$3, e, opts, v, $s, $r, $c} = $restore(this, {v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$3 = valueEncoder($clone(v, reflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = _r$3(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: encodeState.ptr.prototype.reflectValue, $c: true, $r, _r$3, e, opts, v, $s};return $f; - }; - encodeState.prototype.reflectValue = function(v, opts) { return this.$val.reflectValue(v, opts); }; - valueEncoder = function(v) { - var {$24r, _r$3, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!$clone(v, reflect.Value).IsValid()) { - $s = -1; return invalidValueEncoder; - } - _r$3 = typeEncoder($clone(v, reflect.Value).Type()); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: valueEncoder, $c: true, $r, $24r, _r$3, v, $s};return $f; - }; - typeEncoder = function(t) { - var {_r$3, _tuple, _tuple$1, f, fi, fi$1, loaded, ok, t, wg, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = [f]; - wg = [wg]; - _tuple = encoderCache.Load(t); - fi = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(fi, encoderFunc); - } - wg[0] = new nosync.WaitGroup.ptr(0); - f[0] = $throwNilPointerError; - wg[0].Add(1); - _tuple$1 = encoderCache.LoadOrStore(t, new encoderFunc(((function(f, wg) { return function $b(e, v, opts) { - var {e, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wg[0].Wait(); - $r = f[0](e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, e, opts, v, $s};return $f; - }; })(f, wg)))); - fi$1 = _tuple$1[0]; - loaded = _tuple$1[1]; - if (loaded) { - $s = -1; return $assertType(fi$1, encoderFunc); - } - _r$3 = newTypeEncoder(t, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - f[0] = _r$3; - wg[0].Done(); - encoderCache.Store(t, new encoderFunc(f[0])); - $s = -1; return f[0]; - /* */ } return; } var $f = {$blk: typeEncoder, $c: true, $r, _r$3, _tuple, _tuple$1, f, fi, fi$1, loaded, ok, t, wg, $s};return $f; - }; - newTypeEncoder = function(t, allowAddr) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, allowAddr, t, $s, $r, $c} = $restore(this, {t, allowAddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = t.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - if (!(!((_r$3 === 22)) && allowAddr)) { _v = false; $s = 3; continue s; } - _r$4 = reflect.PointerTo(t).Implements(marshalerType); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _arg = addrMarshalerEncoder; - _r$5 = newTypeEncoder(t, false); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = newCondAddrEncoder(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 8; case 8: return $24r; - /* } */ case 2: - _r$7 = t.Implements(marshalerType); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$7) { */ case 9: - $s = -1; return marshalerEncoder; - /* } */ case 10: - _r$8 = t.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(!((_r$8 === 22)) && allowAddr)) { _v$1 = false; $s = 14; continue s; } - _r$9 = reflect.PointerTo(t).Implements(textMarshalerType); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9; case 14: - /* */ if (_v$1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_v$1) { */ case 12: - _arg$2 = addrTextMarshalerEncoder; - _r$10 = newTypeEncoder(t, false); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$3 = _r$10; - _r$11 = newCondAddrEncoder(_arg$2, _arg$3); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$1 = _r$11; - $s = 19; case 19: return $24r$1; - /* } */ case 13: - _r$12 = t.Implements(textMarshalerType); /* */ $s = 22; case 22: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_r$12) { */ case 20: - $s = -1; return textMarshalerEncoder; - /* } */ case 21: - _r$13 = t.Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _1 = _r$13; - /* */ if (_1 === (1)) { $s = 25; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 26; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 27; continue; } - /* */ if (_1 === (13)) { $s = 28; continue; } - /* */ if (_1 === (14)) { $s = 29; continue; } - /* */ if (_1 === (24)) { $s = 30; continue; } - /* */ if (_1 === (20)) { $s = 31; continue; } - /* */ if (_1 === (25)) { $s = 32; continue; } - /* */ if (_1 === (21)) { $s = 33; continue; } - /* */ if (_1 === (23)) { $s = 34; continue; } - /* */ if (_1 === (17)) { $s = 35; continue; } - /* */ if (_1 === (22)) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (_1 === (1)) { */ case 25: - $s = -1; return boolEncoder; - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 26: - $s = -1; return intEncoder; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 27: - $s = -1; return uintEncoder; - /* } else if (_1 === (13)) { */ case 28: - $s = -1; return float32Encoder; - /* } else if (_1 === (14)) { */ case 29: - $s = -1; return float64Encoder; - /* } else if (_1 === (24)) { */ case 30: - $s = -1; return stringEncoder; - /* } else if (_1 === (20)) { */ case 31: - $s = -1; return interfaceEncoder; - /* } else if (_1 === (25)) { */ case 32: - _r$14 = newStructEncoder(t); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$2 = _r$14; - $s = 40; case 40: return $24r$2; - /* } else if (_1 === (21)) { */ case 33: - _r$15 = newMapEncoder(t); /* */ $s = 41; case 41: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$3 = _r$15; - $s = 42; case 42: return $24r$3; - /* } else if (_1 === (23)) { */ case 34: - _r$16 = newSliceEncoder(t); /* */ $s = 43; case 43: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$4 = _r$16; - $s = 44; case 44: return $24r$4; - /* } else if (_1 === (17)) { */ case 35: - _r$17 = newArrayEncoder(t); /* */ $s = 45; case 45: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$5 = _r$17; - $s = 46; case 46: return $24r$5; - /* } else if (_1 === (22)) { */ case 36: - _r$18 = newPtrEncoder(t); /* */ $s = 47; case 47: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$6 = _r$18; - $s = 48; case 48: return $24r$6; - /* } else { */ case 37: - $s = -1; return unsupportedTypeEncoder; - /* } */ case 38: - case 23: - $s = -1; return $throwNilPointerError; - /* */ } return; } var $f = {$blk: newTypeEncoder, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, allowAddr, t, $s};return $f; - }; - invalidValueEncoder = function(e, v, param) { - var {_r$3, e, param, v, $s, $r, $c} = $restore(this, {e, v, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* */ } return; } var $f = {$blk: invalidValueEncoder, $c: true, $r, _r$3, e, param, v, $s};return $f; - }; - marshalerEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, b, e, err, m, ok, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(v, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = $assertType(_r$4, Marshaler, true); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ok) { */ case 5: - _r$5 = e.Buffer.WriteString("null"); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return; - /* } */ case 6: - _r$6 = m.MarshalJSON(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - b = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 9: - _r$7 = compact(e.Buffer, b, opts.escapeHTML); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - /* } */ case 10: - if (!($interfaceIsEqual(err, $ifaceNil))) { - e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err, "MarshalJSON")); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: marshalerEncoder, $c: true, $r, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, b, e, err, m, ok, opts, v, $s};return $f; - }; - addrMarshalerEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, _r$6, _tuple, b, e, err, m, opts, v, va, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - va = $clone(v, reflect.Value).Addr(); - /* */ if ($clone(va, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(va, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(va, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - m = $assertType(_r$4, Marshaler); - _r$5 = m.MarshalJSON(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - b = _tuple[0]; - err = _tuple[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 6: - _r$6 = compact(e.Buffer, b, opts.escapeHTML); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - /* } */ case 7: - if (!($interfaceIsEqual(err, $ifaceNil))) { - e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err, "MarshalJSON")); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: addrMarshalerEncoder, $c: true, $r, _r$3, _r$4, _r$5, _r$6, _tuple, b, e, err, m, opts, v, va, $s};return $f; - }; - textMarshalerEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, b, e, err, m, ok, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (($clone(v, reflect.Value).Kind() === 22) && $clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(v, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = $assertType(_r$4, encoding.TextMarshaler, true); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ok) { */ case 5: - _r$5 = e.Buffer.WriteString("null"); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return; - /* } */ case 6: - _r$6 = m.MarshalText(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - b = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err, "MarshalText")); - } - $r = e.stringBytes(b, opts.escapeHTML); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: textMarshalerEncoder, $c: true, $r, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, b, e, err, m, ok, opts, v, $s};return $f; - }; - addrTextMarshalerEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, _tuple, b, e, err, m, opts, v, va, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - va = $clone(v, reflect.Value).Addr(); - /* */ if ($clone(va, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(va, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(va, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - m = $assertType(_r$4, encoding.TextMarshaler); - _r$5 = m.MarshalText(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - e.error(new MarshalerError.ptr($clone(v, reflect.Value).Type(), err, "MarshalText")); - } - $r = e.stringBytes(b, opts.escapeHTML); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: addrTextMarshalerEncoder, $c: true, $r, _r$3, _r$4, _r$5, _tuple, b, e, err, m, opts, v, va, $s};return $f; - }; - boolEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, _r$6, e, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (opts.quoted) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (opts.quoted) { */ case 1: - _r$3 = e.Buffer.WriteByte(34); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 2: - /* */ if ($clone(v, reflect.Value).Bool()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($clone(v, reflect.Value).Bool()) { */ case 4: - _r$4 = e.Buffer.WriteString("true"); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = 6; continue; - /* } else { */ case 5: - _r$5 = e.Buffer.WriteString("false"); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 6: - /* */ if (opts.quoted) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (opts.quoted) { */ case 9: - _r$6 = e.Buffer.WriteByte(34); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: boolEncoder, $c: true, $r, _r$3, _r$4, _r$5, _r$6, e, opts, v, $s};return $f; - }; - intEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, b, e, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = strconv.AppendInt($subslice(new sliceType$2(e.scratch), 0, 0), $clone(v, reflect.Value).Int(), 10); - /* */ if (opts.quoted) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (opts.quoted) { */ case 1: - _r$3 = e.Buffer.WriteByte(34); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 2: - _r$4 = e.Buffer.Write(b); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* */ if (opts.quoted) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (opts.quoted) { */ case 5: - _r$5 = e.Buffer.WriteByte(34); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: intEncoder, $c: true, $r, _r$3, _r$4, _r$5, b, e, opts, v, $s};return $f; - }; - uintEncoder = function(e, v, opts) { - var {_r$3, _r$4, _r$5, b, e, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = strconv.AppendUint($subslice(new sliceType$2(e.scratch), 0, 0), $clone(v, reflect.Value).Uint(), 10); - /* */ if (opts.quoted) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (opts.quoted) { */ case 1: - _r$3 = e.Buffer.WriteByte(34); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 2: - _r$4 = e.Buffer.Write(b); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* */ if (opts.quoted) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (opts.quoted) { */ case 5: - _r$5 = e.Buffer.WriteByte(34); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: uintEncoder, $c: true, $r, _r$3, _r$4, _r$5, b, e, opts, v, $s};return $f; - }; - floatEncoder.prototype.encode = function(e, v, opts) { - var {_r$3, _r$4, _r$5, abs, b, bits, e, f, fmt$1, n, opts, v, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bits = this.$val; - f = $clone(v, reflect.Value).Float(); - if (math.IsInf(f, 0) || math.IsNaN(f)) { - e.error(new UnsupportedValueError.ptr($clone(v, reflect.Value), strconv.FormatFloat(f, 103, -1, ((bits >> 0))))); - } - b = $subslice(new sliceType$2(e.scratch), 0, 0); - abs = math.Abs(f); - fmt$1 = 102; - if (!((abs === 0))) { - if ((bits === 64) && (abs < 1e-06 || abs >= 1e+21) || (bits === 32) && (($fround(abs)) < 9.999999974752427e-07 || ($fround(abs)) >= 1.0000000200408773e+21)) { - fmt$1 = 101; - } - } - b = strconv.AppendFloat(b, f, fmt$1, -1, ((bits >> 0))); - if (fmt$1 === 101) { - n = b.$length; - if (n >= 4 && ((x = n - 4 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])) === 101) && ((x$1 = n - 3 >> 0, ((x$1 < 0 || x$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$1])) === 45) && ((x$2 = n - 2 >> 0, ((x$2 < 0 || x$2 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$2])) === 48)) { - (x$4 = n - 2 >> 0, ((x$4 < 0 || x$4 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$4] = (x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$3])))); - b = $subslice(b, 0, (n - 1 >> 0)); - } - } - /* */ if (opts.quoted) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (opts.quoted) { */ case 1: - _r$3 = e.Buffer.WriteByte(34); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 2: - _r$4 = e.Buffer.Write(b); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* */ if (opts.quoted) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (opts.quoted) { */ case 5: - _r$5 = e.Buffer.WriteByte(34); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: floatEncoder.prototype.encode, $c: true, $r, _r$3, _r$4, _r$5, abs, b, bits, e, f, fmt$1, n, opts, v, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - $ptrType(floatEncoder).prototype.encode = function(e, v, opts) { return new floatEncoder(this.$get()).encode(e, v, opts); }; - stringEncoder = function(e, v, opts) { - var {_r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, e, e2, numStr, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($interfaceIsEqual($clone(v, reflect.Value).Type(), numberType)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual($clone(v, reflect.Value).Type(), numberType)) { */ case 1: - _r$3 = $clone(v, reflect.Value).String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - numStr = _r$3; - if (numStr === "") { - numStr = "0"; - } - /* */ if (!isValidNumber(numStr)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!isValidNumber(numStr)) { */ case 4: - _r$4 = fmt.Errorf("json: invalid number literal %q", new sliceType([new $String(numStr)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = e.error(_r$4); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - /* */ if (opts.quoted) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (opts.quoted) { */ case 8: - _r$5 = e.Buffer.WriteByte(34); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 9: - _r$6 = e.Buffer.WriteString(numStr); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* */ if (opts.quoted) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (opts.quoted) { */ case 12: - _r$7 = e.Buffer.WriteByte(34); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 13: - $s = -1; return; - /* } */ case 2: - /* */ if (opts.quoted) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (opts.quoted) { */ case 15: - _r$8 = newEncodeState(); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - e2 = _r$8; - _r$9 = $clone(v, reflect.Value).String(); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = e2.string(_r$9, opts.escapeHTML); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = e.stringBytes(e2.Buffer.Bytes(), false); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - encodeStatePool.Put(e2); - $s = 17; continue; - /* } else { */ case 16: - _r$10 = $clone(v, reflect.Value).String(); /* */ $s = 22; case 22: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = e.string(_r$10, opts.escapeHTML); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - $s = -1; return; - /* */ } return; } var $f = {$blk: stringEncoder, $c: true, $r, _r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, e, e2, numStr, opts, v, $s};return $f; - }; - isValidNumber = function(s) { - var s; - if (s === "") { - return false; - } - if (s.charCodeAt(0) === 45) { - s = $substring(s, 1); - if (s === "") { - return false; - } - } - if ((s.charCodeAt(0) === 48)) { - s = $substring(s, 1); - } else if (49 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57) { - s = $substring(s, 1); - while (true) { - if (!(s.length > 0 && 48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57)) { break; } - s = $substring(s, 1); - } - } else { - return false; - } - if (s.length >= 2 && (s.charCodeAt(0) === 46) && 48 <= s.charCodeAt(1) && s.charCodeAt(1) <= 57) { - s = $substring(s, 2); - while (true) { - if (!(s.length > 0 && 48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57)) { break; } - s = $substring(s, 1); - } - } - if (s.length >= 2 && ((s.charCodeAt(0) === 101) || (s.charCodeAt(0) === 69))) { - s = $substring(s, 1); - if ((s.charCodeAt(0) === 43) || (s.charCodeAt(0) === 45)) { - s = $substring(s, 1); - if (s === "") { - return false; - } - } - while (true) { - if (!(s.length > 0 && 48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57)) { break; } - s = $substring(s, 1); - } - } - return s === ""; - }; - interfaceEncoder = function(e, v, opts) { - var {_r$3, _r$4, e, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(v, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = e.reflectValue($clone(_r$4, reflect.Value), $clone(opts, encOpts)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: interfaceEncoder, $c: true, $r, _r$3, _r$4, e, opts, v, $s};return $f; - }; - unsupportedTypeEncoder = function(e, v, param) { - var e, param, v; - e.error(new UnsupportedTypeError.ptr($clone(v, reflect.Value).Type())); - }; - structEncoder.ptr.prototype.encode = function(e, v, opts) { - var {_i, _i$1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, e, f, fv, i, i$1, next, opts, se, v, x, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - se = this; - next = 123; - _ref = se.fields.list; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - f = (x = se.fields.list, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - fv = v; - _ref$1 = f.index; - _i$1 = 0; - /* while (true) { */ case 3: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 4; continue; } - i$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - /* */ if ($clone(fv, reflect.Value).Kind() === 22) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(fv, reflect.Value).Kind() === 22) { */ case 5: - if ($clone(fv, reflect.Value).IsNil()) { - _i++; - /* continue FieldLoop; */ $s = 1; continue s; - } - _r$3 = $clone(fv, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - fv = _r$3; - /* } */ case 6: - _r$4 = $clone(fv, reflect.Value).Field(i$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - fv = _r$4; - _i$1++; - $s = 3; continue; - case 4: - if (f.omitEmpty && isEmptyValue($clone(fv, reflect.Value))) { - _i++; - /* continue; */ $s = 1; continue; - } - _r$5 = e.Buffer.WriteByte(next); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - next = 44; - /* */ if (opts.escapeHTML) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (opts.escapeHTML) { */ case 10: - _r$6 = e.Buffer.WriteString(f.nameEscHTML); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 12; continue; - /* } else { */ case 11: - _r$7 = e.Buffer.WriteString(f.nameNonEsc); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 12: - opts.quoted = f.quoted; - $r = f.encoder(e, $clone(fv, reflect.Value), $clone(opts, encOpts)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - /* */ if (next === 123) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (next === 123) { */ case 16: - _r$8 = e.Buffer.WriteString("{}"); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = 18; continue; - /* } else { */ case 17: - _r$9 = e.Buffer.WriteByte(125); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* } */ case 18: - $s = -1; return; - /* */ } return; } var $f = {$blk: structEncoder.ptr.prototype.encode, $c: true, $r, _i, _i$1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, e, f, fv, i, i$1, next, opts, se, v, x, $s};return $f; - }; - structEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; - newStructEncoder = function(t) { - var {_r$3, se, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = cachedTypeFields(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - se = new structEncoder.ptr($clone(_r$3, structFields)); - $s = -1; return $methodVal($clone(se, structEncoder), "encode"); - /* */ } return; } var $f = {$blk: newStructEncoder, $c: true, $r, _r$3, se, t, $s};return $f; - }; - mapEncoder.ptr.prototype.encode = function(e, v, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _entry, _i, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, e, err, i, i$1, kv, me, mi, ok, opts, ptr, sv, v, $s, $deferred, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - sv = [sv]; - me = this; - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 4; case 4: return; - /* } */ case 2: - e.ptrLevel = e.ptrLevel + (1) >>> 0; - /* */ if (e.ptrLevel > 1000) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (e.ptrLevel > 1000) { */ case 5: - ptr = $clone(v, reflect.Value).Pointer(); - _tuple = (_entry = e.ptrSeen[$emptyInterface.keyFor(new $Uintptr(ptr))], _entry !== undefined ? [_entry.v, true] : [new structType.ptr(), false]); - ok = _tuple[1]; - /* */ if (ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (ok) { */ case 7: - _r$4 = fmt.Sprintf("encountered a cycle via %s", new sliceType([$clone(v, reflect.Value).Type()])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = e.error(new UnsupportedValueError.ptr($clone(v, reflect.Value), _r$4)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - _key = new $Uintptr(ptr); (e.ptrSeen || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - $deferred.push([function(_arg, _arg$1) { delete _arg[$emptyInterface.keyFor(_arg$1)]; }, [e.ptrSeen, new $Uintptr(ptr)]]); - /* } */ case 6: - _r$5 = e.Buffer.WriteByte(123); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - sv[0] = $makeSlice(sliceType$4, $clone(v, reflect.Value).Len()); - mi = $clone(v, reflect.Value).MapRange(); - i = 0; - /* while (true) { */ case 12: - _r$6 = mi.Next(); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* if (!(_r$6)) { break; } */ if(!(_r$6)) { $s = 13; continue; } - _r$7 = mi.Key(); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - ((i < 0 || i >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i]).k = _r$7; - _r$8 = mi.Value(); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - ((i < 0 || i >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i]).v = _r$8; - _r$9 = ((i < 0 || i >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i]).resolve(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 18: - _r$10 = $clone(v, reflect.Value).Type().String(); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$2 = new $String(_r$10); - _r$11 = err.Error(); /* */ $s = 21; case 21: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$3 = new $String(_r$11); - _r$12 = fmt.Errorf("json: encoding error for type %q: %q", new sliceType([_arg$2, _arg$3])); /* */ $s = 22; case 22: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = e.error(_r$12); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 19: - i = i + (1) >> 0; - $s = 12; continue; - case 13: - $r = sort.Slice(sv[0], (function(sv) { return function(i$1, j) { - var i$1, j; - return ((i$1 < 0 || i$1 >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + i$1]).ks < ((j < 0 || j >= sv[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : sv[0].$array[sv[0].$offset + j]).ks; - }; })(sv)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = sv[0]; - _i = 0; - /* while (true) { */ case 25: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 26; continue; } - i$1 = _i; - kv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), reflectWithString); - /* */ if (i$1 > 0) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (i$1 > 0) { */ case 27: - _r$13 = e.Buffer.WriteByte(44); /* */ $s = 29; case 29: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - /* } */ case 28: - $r = e.string(kv.ks, opts.escapeHTML); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$14 = e.Buffer.WriteByte(58); /* */ $s = 31; case 31: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $r = me.elemEnc(e, $clone(kv.v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 25; continue; - case 26: - _r$15 = e.Buffer.WriteByte(125); /* */ $s = 33; case 33: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - e.ptrLevel = e.ptrLevel - (1) >>> 0; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: mapEncoder.ptr.prototype.encode, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _entry, _i, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, e, err, i, i$1, kv, me, mi, ok, opts, ptr, sv, v, $s, $deferred};return $f; } } - }; - mapEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; - newMapEncoder = function(t) { - var {_1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, me, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = t.Key(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _1 = _r$4; - /* */ if ((_1 === (24)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 4; continue; } - _r$5 = t.Key(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Implements(textMarshalerType); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!_r$6) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((_1 === (24)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 4: - $s = 6; continue; - /* } else if (!_r$6) { */ case 5: - $s = -1; return unsupportedTypeEncoder; - /* } */ case 6: - case 1: - _r$7 = t.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = typeEncoder(_r$7); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - me = new mapEncoder.ptr(_r$8); - $s = -1; return $methodVal($clone(me, mapEncoder), "encode"); - /* */ } return; } var $f = {$blk: newMapEncoder, $c: true, $r, _1, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, me, t, $s};return $f; - }; - encodeByteSlice = function(e, v, param) { - var {_r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dst$1, e, enc, encodedLen, param, s, v, $s, $r, $c} = $restore(this, {e, v, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(v, reflect.Value).Bytes(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - s = _r$4; - _r$5 = e.Buffer.WriteByte(34); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - encodedLen = base64.StdEncoding.EncodedLen(s.$length); - /* */ if (encodedLen <= 64) { $s = 6; continue; } - /* */ if (encodedLen <= 1024) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (encodedLen <= 64) { */ case 6: - dst = $subslice(new sliceType$2(e.scratch), 0, encodedLen); - base64.StdEncoding.Encode(dst, s); - _r$6 = e.Buffer.Write(dst); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 9; continue; - /* } else if (encodedLen <= 1024) { */ case 7: - dst$1 = $makeSlice(sliceType$2, encodedLen); - base64.StdEncoding.Encode(dst$1, s); - _r$7 = e.Buffer.Write(dst$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = 9; continue; - /* } else { */ case 8: - enc = base64.NewEncoder(base64.StdEncoding, e); - _r$8 = enc.Write(s); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = enc.Close(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* } */ case 9: - _r$10 = e.Buffer.WriteByte(34); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return; - /* */ } return; } var $f = {$blk: encodeByteSlice, $c: true, $r, _r$10, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dst$1, e, enc, encodedLen, param, s, v, $s};return $f; - }; - sliceEncoder.ptr.prototype.encode = function(e, v, opts) { - var {_arg, _arg$1, _entry, _key, _r$3, _r$4, _tuple, e, ok, opts, ptr, se, v, $s, $deferred, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - se = this; - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 4; case 4: return; - /* } */ case 2: - e.ptrLevel = e.ptrLevel + (1) >>> 0; - /* */ if (e.ptrLevel > 1000) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (e.ptrLevel > 1000) { */ case 5: - ptr = new structType$1.ptr($clone(v, reflect.Value).Pointer(), $clone(v, reflect.Value).Len()); - _tuple = (_entry = e.ptrSeen[$emptyInterface.keyFor(new ptr.constructor.elem(ptr))], _entry !== undefined ? [_entry.v, true] : [new structType.ptr(), false]); - ok = _tuple[1]; - /* */ if (ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (ok) { */ case 7: - _r$4 = fmt.Sprintf("encountered a cycle via %s", new sliceType([$clone(v, reflect.Value).Type()])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = e.error(new UnsupportedValueError.ptr($clone(v, reflect.Value), _r$4)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - _key = new ptr.constructor.elem(ptr); (e.ptrSeen || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - $deferred.push([function(_arg, _arg$1) { delete _arg[$emptyInterface.keyFor(_arg$1)]; }, [e.ptrSeen, new ptr.constructor.elem(ptr)]]); - /* } */ case 6: - $r = se.arrayEnc(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.ptrLevel = e.ptrLevel - (1) >>> 0; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: sliceEncoder.ptr.prototype.encode, $c: true, $r, _arg, _arg$1, _entry, _key, _r$3, _r$4, _tuple, e, ok, opts, ptr, se, v, $s, $deferred};return $f; } } - }; - sliceEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; - newSliceEncoder = function(t) { - var {_r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, enc, p, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = t.Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 === 8) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$4 === 8) { */ case 1: - _r$5 = t.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.PointerTo(_r$5); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - p = _r$6; - _r$7 = p.Implements(marshalerType); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - if (!(!_r$7)) { _v = false; $s = 9; continue s; } - _r$8 = p.Implements(textMarshalerType); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = !_r$8; case 9: - /* */ if (_v) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_v) { */ case 7: - $s = -1; return encodeByteSlice; - /* } */ case 8: - /* } */ case 2: - _r$9 = newArrayEncoder(t); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - enc = new sliceEncoder.ptr(_r$9); - $s = -1; return $methodVal($clone(enc, sliceEncoder), "encode"); - /* */ } return; } var $f = {$blk: newSliceEncoder, $c: true, $r, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, enc, p, t, $s};return $f; - }; - arrayEncoder.ptr.prototype.encode = function(e, v, opts) { - var {_arg, _arg$1, _arg$2, _r$3, _r$4, _r$5, _r$6, ae, e, i, n, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ae = this; - _r$3 = e.Buffer.WriteByte(91); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - n = $clone(v, reflect.Value).Len(); - i = 0; - /* while (true) { */ case 2: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 3; continue; } - /* */ if (i > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (i > 0) { */ case 4: - _r$4 = e.Buffer.WriteByte(44); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 5: - _arg = e; - _r$5 = $clone(v, reflect.Value).Index(i); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$5, reflect.Value); - _arg$2 = $clone(opts, encOpts); - $r = ae.elemEnc(_arg, _arg$1, _arg$2); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 2; continue; - case 3: - _r$6 = e.Buffer.WriteByte(93); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return; - /* */ } return; } var $f = {$blk: arrayEncoder.ptr.prototype.encode, $c: true, $r, _arg, _arg$1, _arg$2, _r$3, _r$4, _r$5, _r$6, ae, e, i, n, opts, v, $s};return $f; - }; - arrayEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; - newArrayEncoder = function(t) { - var {_r$3, _r$4, enc, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = typeEncoder(_r$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - enc = new arrayEncoder.ptr(_r$4); - $s = -1; return $methodVal($clone(enc, arrayEncoder), "encode"); - /* */ } return; } var $f = {$blk: newArrayEncoder, $c: true, $r, _r$3, _r$4, enc, t, $s};return $f; - }; - ptrEncoder.ptr.prototype.encode = function(e, v, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _key, _r$3, _r$4, _r$5, _r$6, _tuple, e, ok, opts, pe, ptr, v, $s, $deferred, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pe = this; - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 1: - _r$3 = e.Buffer.WriteString("null"); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 4; case 4: return; - /* } */ case 2: - e.ptrLevel = e.ptrLevel + (1) >>> 0; - /* */ if (e.ptrLevel > 1000) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (e.ptrLevel > 1000) { */ case 5: - _r$4 = $clone(v, reflect.Value).Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ptr = _r$4; - _tuple = (_entry = e.ptrSeen[$emptyInterface.keyFor(ptr)], _entry !== undefined ? [_entry.v, true] : [new structType.ptr(), false]); - ok = _tuple[1]; - /* */ if (ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ok) { */ case 8: - _r$5 = fmt.Sprintf("encountered a cycle via %s", new sliceType([$clone(v, reflect.Value).Type()])); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = e.error(new UnsupportedValueError.ptr($clone(v, reflect.Value), _r$5)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - _key = ptr; (e.ptrSeen || $throwRuntimeError("assignment to entry in nil map"))[$emptyInterface.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - $deferred.push([function(_arg, _arg$1) { delete _arg[$emptyInterface.keyFor(_arg$1)]; }, [e.ptrSeen, ptr]]); - /* } */ case 6: - _arg$2 = e; - _r$6 = $clone(v, reflect.Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$6, reflect.Value); - _arg$4 = $clone(opts, encOpts); - $r = pe.elemEnc(_arg$2, _arg$3, _arg$4); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - e.ptrLevel = e.ptrLevel - (1) >>> 0; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ptrEncoder.ptr.prototype.encode, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _key, _r$3, _r$4, _r$5, _r$6, _tuple, e, ok, opts, pe, ptr, v, $s, $deferred};return $f; } } - }; - ptrEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; - newPtrEncoder = function(t) { - var {_r$3, _r$4, enc, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = t.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = typeEncoder(_r$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - enc = new ptrEncoder.ptr(_r$4); - $s = -1; return $methodVal($clone(enc, ptrEncoder), "encode"); - /* */ } return; } var $f = {$blk: newPtrEncoder, $c: true, $r, _r$3, _r$4, enc, t, $s};return $f; - }; - condAddrEncoder.ptr.prototype.encode = function(e, v, opts) { - var {ce, e, opts, v, $s, $r, $c} = $restore(this, {e, v, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ce = this; - /* */ if ($clone(v, reflect.Value).CanAddr()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(v, reflect.Value).CanAddr()) { */ case 1: - $r = ce.canAddrEnc(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = ce.elseEnc(e, $clone(v, reflect.Value), $clone(opts, encOpts)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: condAddrEncoder.ptr.prototype.encode, $c: true, $r, ce, e, opts, v, $s};return $f; - }; - condAddrEncoder.prototype.encode = function(e, v, opts) { return this.$val.encode(e, v, opts); }; - newCondAddrEncoder = function(canAddrEnc, elseEnc) { - var canAddrEnc, elseEnc, enc; - enc = new condAddrEncoder.ptr(canAddrEnc, elseEnc); - return $methodVal($clone(enc, condAddrEncoder), "encode"); - }; - isValidTag = function(s) { - var _i, _ref, _rune, c, s; - if (s === "") { - return false; - } - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - c = _rune[0]; - if (strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c)) { - } else if (!unicode.IsLetter(c) && !unicode.IsDigit(c)) { - return false; - } - _i += _rune[1]; - } - return true; - }; - typeByIndex = function(t, index) { - var {_i, _r$3, _r$4, _r$5, _ref, i, index, t, $s, $r, $c} = $restore(this, {t, index}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = index; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$3 = t.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 === 22) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$3 === 22) { */ case 3: - _r$4 = t.Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - t = _r$4; - /* } */ case 4: - _r$5 = t.Field(i); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - t = _r$5.Type; - _i++; - $s = 1; continue; - case 2: - $s = -1; return t; - /* */ } return; } var $f = {$blk: typeByIndex, $c: true, $r, _i, _r$3, _r$4, _r$5, _ref, i, index, t, $s};return $f; - }; - reflectWithString.ptr.prototype.resolve = function() { - var {_1, _r$3, _r$4, _r$5, _tuple, _tuple$1, buf, err, ok, tm, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - /* */ if ($clone(w.k, reflect.Value).Kind() === 24) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(w.k, reflect.Value).Kind() === 24) { */ case 1: - _r$3 = $clone(w.k, reflect.Value).String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - w.ks = _r$3; - $s = -1; return $ifaceNil; - /* } */ case 2: - _r$4 = $clone(w.k, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = $assertType(_r$4, encoding.TextMarshaler, true); - tm = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ok) { */ case 5: - if (($clone(w.k, reflect.Value).Kind() === 22) && $clone(w.k, reflect.Value).IsNil()) { - $s = -1; return $ifaceNil; - } - _r$5 = tm.MarshalText(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - buf = _tuple$1[0]; - err = _tuple$1[1]; - w.ks = ($bytesToString(buf)); - $s = -1; return err; - /* } */ case 6: - _1 = $clone(w.k, reflect.Value).Kind(); - if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - w.ks = strconv.FormatInt($clone(w.k, reflect.Value).Int(), 10); - $s = -1; return $ifaceNil; - } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { - w.ks = strconv.FormatUint($clone(w.k, reflect.Value).Uint(), 10); - $s = -1; return $ifaceNil; - } - $panic(new $String("unexpected map key type")); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: reflectWithString.ptr.prototype.resolve, $c: true, $r, _1, _r$3, _r$4, _r$5, _tuple, _tuple$1, buf, err, ok, tm, w, $s};return $f; - }; - reflectWithString.prototype.resolve = function() { return this.$val.resolve(); }; - encodeState.ptr.prototype.string = function(s, escapeHTML) { - var {_1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, c, e, escapeHTML, i, s, size, start, $s, $r, $c} = $restore(this, {s, escapeHTML}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$3 = e.Buffer.WriteByte(34); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - start = 0; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 3; continue; } - b = s.charCodeAt(i); - /* */ if (b < 128) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (b < 128) { */ case 4: - if (((b < 0 || b >= htmlSafeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : htmlSafeSet[b]) || (!escapeHTML && ((b < 0 || b >= safeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : safeSet[b]))) { - i = i + (1) >> 0; - /* continue; */ $s = 2; continue; - } - /* */ if (start < i) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (start < i) { */ case 6: - _r$4 = e.Buffer.WriteString($substring(s, start, i)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 7: - _r$5 = e.Buffer.WriteByte(92); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _1 = b; - /* */ if ((_1 === (92)) || (_1 === (34))) { $s = 11; continue; } - /* */ if (_1 === (10)) { $s = 12; continue; } - /* */ if (_1 === (13)) { $s = 13; continue; } - /* */ if (_1 === (9)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ((_1 === (92)) || (_1 === (34))) { */ case 11: - _r$6 = e.Buffer.WriteByte(b); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 16; continue; - /* } else if (_1 === (10)) { */ case 12: - _r$7 = e.Buffer.WriteByte(110); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = 16; continue; - /* } else if (_1 === (13)) { */ case 13: - _r$8 = e.Buffer.WriteByte(114); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = 16; continue; - /* } else if (_1 === (9)) { */ case 14: - _r$9 = e.Buffer.WriteByte(116); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = 16; continue; - /* } else { */ case 15: - _r$10 = e.Buffer.WriteString("u00"); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - _r$11 = e.Buffer.WriteByte(hex.charCodeAt((b >>> 4 << 24 >>> 24))); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = e.Buffer.WriteByte(hex.charCodeAt(((b & 15) >>> 0))); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - /* } */ case 16: - case 10: - i = i + (1) >> 0; - start = i; - /* continue; */ $s = 2; continue; - /* } */ case 5: - _tuple = utf8.DecodeRuneInString($substring(s, i)); - c = _tuple[0]; - size = _tuple[1]; - /* */ if ((c === 65533) && (size === 1)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ((c === 65533) && (size === 1)) { */ case 24: - /* */ if (start < i) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (start < i) { */ case 26: - _r$13 = e.Buffer.WriteString($substring(s, start, i)); /* */ $s = 28; case 28: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - /* } */ case 27: - _r$14 = e.Buffer.WriteString("\\ufffd"); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - i = i + (size) >> 0; - start = i; - /* continue; */ $s = 2; continue; - /* } */ case 25: - /* */ if ((c === 8232) || (c === 8233)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if ((c === 8232) || (c === 8233)) { */ case 30: - /* */ if (start < i) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (start < i) { */ case 32: - _r$15 = e.Buffer.WriteString($substring(s, start, i)); /* */ $s = 34; case 34: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - /* } */ case 33: - _r$16 = e.Buffer.WriteString("\\u202"); /* */ $s = 35; case 35: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = e.Buffer.WriteByte(hex.charCodeAt((c & 15))); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - i = i + (size) >> 0; - start = i; - /* continue; */ $s = 2; continue; - /* } */ case 31: - i = i + (size) >> 0; - $s = 2; continue; - case 3: - /* */ if (start < s.length) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (start < s.length) { */ case 37: - _r$18 = e.Buffer.WriteString($substring(s, start)); /* */ $s = 39; case 39: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - /* } */ case 38: - _r$19 = e.Buffer.WriteByte(34); /* */ $s = 40; case 40: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - $s = -1; return; - /* */ } return; } var $f = {$blk: encodeState.ptr.prototype.string, $c: true, $r, _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, c, e, escapeHTML, i, s, size, start, $s};return $f; - }; - encodeState.prototype.string = function(s, escapeHTML) { return this.$val.string(s, escapeHTML); }; - encodeState.ptr.prototype.stringBytes = function(s, escapeHTML) { - var {_1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, c, e, escapeHTML, i, s, size, start, $s, $r, $c} = $restore(this, {s, escapeHTML}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$3 = e.Buffer.WriteByte(34); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - start = 0; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 3; continue; } - b = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); - /* */ if (b < 128) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (b < 128) { */ case 4: - if (((b < 0 || b >= htmlSafeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : htmlSafeSet[b]) || (!escapeHTML && ((b < 0 || b >= safeSet.length) ? ($throwRuntimeError("index out of range"), undefined) : safeSet[b]))) { - i = i + (1) >> 0; - /* continue; */ $s = 2; continue; - } - /* */ if (start < i) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (start < i) { */ case 6: - _r$4 = e.Buffer.Write($subslice(s, start, i)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 7: - _r$5 = e.Buffer.WriteByte(92); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _1 = b; - /* */ if ((_1 === (92)) || (_1 === (34))) { $s = 11; continue; } - /* */ if (_1 === (10)) { $s = 12; continue; } - /* */ if (_1 === (13)) { $s = 13; continue; } - /* */ if (_1 === (9)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ((_1 === (92)) || (_1 === (34))) { */ case 11: - _r$6 = e.Buffer.WriteByte(b); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 16; continue; - /* } else if (_1 === (10)) { */ case 12: - _r$7 = e.Buffer.WriteByte(110); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = 16; continue; - /* } else if (_1 === (13)) { */ case 13: - _r$8 = e.Buffer.WriteByte(114); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = 16; continue; - /* } else if (_1 === (9)) { */ case 14: - _r$9 = e.Buffer.WriteByte(116); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = 16; continue; - /* } else { */ case 15: - _r$10 = e.Buffer.WriteString("u00"); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - _r$11 = e.Buffer.WriteByte(hex.charCodeAt((b >>> 4 << 24 >>> 24))); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = e.Buffer.WriteByte(hex.charCodeAt(((b & 15) >>> 0))); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - /* } */ case 16: - case 10: - i = i + (1) >> 0; - start = i; - /* continue; */ $s = 2; continue; - /* } */ case 5: - _tuple = utf8.DecodeRune($subslice(s, i)); - c = _tuple[0]; - size = _tuple[1]; - /* */ if ((c === 65533) && (size === 1)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ((c === 65533) && (size === 1)) { */ case 24: - /* */ if (start < i) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (start < i) { */ case 26: - _r$13 = e.Buffer.Write($subslice(s, start, i)); /* */ $s = 28; case 28: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - /* } */ case 27: - _r$14 = e.Buffer.WriteString("\\ufffd"); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - i = i + (size) >> 0; - start = i; - /* continue; */ $s = 2; continue; - /* } */ case 25: - /* */ if ((c === 8232) || (c === 8233)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if ((c === 8232) || (c === 8233)) { */ case 30: - /* */ if (start < i) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (start < i) { */ case 32: - _r$15 = e.Buffer.Write($subslice(s, start, i)); /* */ $s = 34; case 34: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - /* } */ case 33: - _r$16 = e.Buffer.WriteString("\\u202"); /* */ $s = 35; case 35: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = e.Buffer.WriteByte(hex.charCodeAt((c & 15))); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - i = i + (size) >> 0; - start = i; - /* continue; */ $s = 2; continue; - /* } */ case 31: - i = i + (size) >> 0; - $s = 2; continue; - case 3: - /* */ if (start < s.$length) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (start < s.$length) { */ case 37: - _r$18 = e.Buffer.Write($subslice(s, start)); /* */ $s = 39; case 39: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - /* } */ case 38: - _r$19 = e.Buffer.WriteByte(34); /* */ $s = 40; case 40: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - $s = -1; return; - /* */ } return; } var $f = {$blk: encodeState.ptr.prototype.stringBytes, $c: true, $r, _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, c, e, escapeHTML, i, s, size, start, $s};return $f; - }; - encodeState.prototype.stringBytes = function(s, escapeHTML) { return this.$val.stringBytes(s, escapeHTML); }; - byIndex.prototype.Len = function() { - var x; - x = this; - return x.$length; - }; - $ptrType(byIndex).prototype.Len = function() { return this.$get().Len(); }; - byIndex.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, x; - x = this; - _tmp = $clone(((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]), field); - _tmp$1 = $clone(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), field); - field.copy(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), _tmp); - field.copy(((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]), _tmp$1); - }; - $ptrType(byIndex).prototype.Swap = function(i, j) { return this.$get().Swap(i, j); }; - byIndex.prototype.Less = function(i, j) { - var _i, _ref, i, j, k, x, x$1, x$2, xik; - x = this; - _ref = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]).index; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - k = _i; - xik = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (k >= ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]).index.$length) { - return false; - } - if (!((xik === (x$1 = ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]).index, ((k < 0 || k >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + k]))))) { - return xik < (x$2 = ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]).index, ((k < 0 || k >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + k])); - } - _i++; - } - return ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]).index.$length < ((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]).index.$length; - }; - $ptrType(byIndex).prototype.Less = function(i, j) { return this.$get().Less(i, j); }; - typeFields = function(t) { - var {_1, _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _i$2, _key, _key$1, _key$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _v, _v$1, _v$2, advance, count, current, dominant, f, f$1, fi, field$1, field$2, fields, fj, ft, i, i$1, i$2, i$3, index, name, name$1, nameEscBuf, nameIndex, next, nextCount, ok, opts, out, quoted, sf, t, t$1, tag, tagged, visited, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fields = [fields]; - nameEscBuf = [nameEscBuf]; - current = new sliceType$3([]); - next = new sliceType$3([new field.ptr("", sliceType$2.nil, $throwNilPointerError, "", "", false, sliceType$1.nil, t, false, false, $throwNilPointerError)]); - _tmp = false; - _tmp$1 = false; - count = _tmp; - nextCount = _tmp$1; - visited = $makeMap(reflect.Type.keyFor, []); - fields[0] = sliceType$3.nil; - nameEscBuf[0] = new bytes.Buffer.ptr(sliceType$2.nil, 0, 0); - /* while (true) { */ case 1: - /* if (!(next.$length > 0)) { break; } */ if(!(next.$length > 0)) { $s = 2; continue; } - _tmp$2 = next; - _tmp$3 = $subslice(current, 0, 0); - current = _tmp$2; - next = _tmp$3; - _tmp$4 = nextCount; - _tmp$5 = $makeMap(reflect.Type.keyFor, []); - count = _tmp$4; - nextCount = _tmp$5; - _ref = current; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - f = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), field); - if ((_entry = visited[reflect.Type.keyFor(f.typ)], _entry !== undefined ? _entry.v : false)) { - _i++; - /* continue; */ $s = 3; continue; - } - _key = f.typ; (visited || $throwRuntimeError("assignment to entry in nil map"))[reflect.Type.keyFor(_key)] = { k: _key, v: true }; - i = 0; - /* while (true) { */ case 5: - _r$3 = f.typ.NumField(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* if (!(i < _r$3)) { break; } */ if(!(i < _r$3)) { $s = 6; continue; } - _r$4 = f.typ.Field(i); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - sf = $clone(_r$4, reflect.StructField); - /* */ if (sf.Anonymous) { $s = 9; continue; } - /* */ if (!$clone(sf, reflect.StructField).IsExported()) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (sf.Anonymous) { */ case 9: - t$1 = sf.Type; - _r$5 = t$1.Kind(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === 22) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_r$5 === 22) { */ case 12: - _r$6 = t$1.Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - t$1 = _r$6; - /* } */ case 13: - if (!(!$clone(sf, reflect.StructField).IsExported())) { _v = false; $s = 18; continue s; } - _r$7 = t$1.Kind(); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !((_r$7 === 25)); case 18: - /* */ if (_v) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_v) { */ case 16: - i = i + (1) >> 0; - /* continue; */ $s = 5; continue; - /* } */ case 17: - $s = 11; continue; - /* } else if (!$clone(sf, reflect.StructField).IsExported()) { */ case 10: - i = i + (1) >> 0; - /* continue; */ $s = 5; continue; - /* } */ case 11: - tag = new reflect.StructTag(sf.Tag).Get("json"); - if (tag === "-") { - i = i + (1) >> 0; - /* continue; */ $s = 5; continue; - } - _tuple = parseTag(tag); - name = _tuple[0]; - opts = _tuple[1]; - if (!isValidTag(name)) { - name = ""; - } - index = $makeSlice(sliceType$1, (f.index.$length + 1 >> 0)); - $copySlice(index, f.index); - (x = f.index.$length, ((x < 0 || x >= index.$length) ? ($throwRuntimeError("index out of range"), undefined) : index.$array[index.$offset + x] = i)); - ft = sf.Type; - _r$8 = ft.Name(); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(_r$8 === "")) { _v$1 = false; $s = 22; continue s; } - _r$9 = ft.Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9 === 22; case 22: - /* */ if (_v$1) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_v$1) { */ case 20: - _r$10 = ft.Elem(); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - ft = _r$10; - /* } */ case 21: - quoted = false; - /* */ if (new tagOptions(opts).Contains("string")) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (new tagOptions(opts).Contains("string")) { */ case 26: - _r$11 = ft.Kind(); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _1 = _r$11; - if ((_1 === (1)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (13)) || (_1 === (14)) || (_1 === (24))) { - quoted = true; - } - case 28: - /* } */ case 27: - if (!(name === "") || !sf.Anonymous) { _v$2 = true; $s = 32; continue s; } - _r$12 = ft.Kind(); /* */ $s = 33; case 33: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$2 = !((_r$12 === 25)); case 32: - /* */ if (_v$2) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_v$2) { */ case 30: - tagged = !(name === ""); - if (name === "") { - name = sf.Name; - } - field$1 = new field.ptr(name, sliceType$2.nil, $throwNilPointerError, "", "", tagged, index, ft, new tagOptions(opts).Contains("omitempty"), quoted, $throwNilPointerError); - field$1.nameBytes = (new sliceType$2($stringToBytes(field$1.name))); - field$1.equalFold = foldFunc(field$1.nameBytes); - nameEscBuf[0].Reset(); - _r$13 = nameEscBuf[0].WriteString("\""); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - $r = HTMLEscape(nameEscBuf[0], field$1.nameBytes); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$14 = nameEscBuf[0].WriteString("\":"); /* */ $s = 36; case 36: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - field$1.nameEscHTML = nameEscBuf[0].String(); - field$1.nameNonEsc = "\"" + field$1.name + "\":"; - fields[0] = $append(fields[0], field$1); - if ((_entry$1 = count[reflect.Type.keyFor(f.typ)], _entry$1 !== undefined ? _entry$1.v : 0) > 1) { - fields[0] = $append(fields[0], (x$1 = fields[0].$length - 1 >> 0, ((x$1 < 0 || x$1 >= fields[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : fields[0].$array[fields[0].$offset + x$1]))); - } - i = i + (1) >> 0; - /* continue; */ $s = 5; continue; - /* } */ case 31: - _key$1 = ft; (nextCount || $throwRuntimeError("assignment to entry in nil map"))[reflect.Type.keyFor(_key$1)] = { k: _key$1, v: (_entry$2 = nextCount[reflect.Type.keyFor(ft)], _entry$2 !== undefined ? _entry$2.v : 0) + (1) >> 0 }; - /* */ if ((_entry$3 = nextCount[reflect.Type.keyFor(ft)], _entry$3 !== undefined ? _entry$3.v : 0) === 1) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if ((_entry$3 = nextCount[reflect.Type.keyFor(ft)], _entry$3 !== undefined ? _entry$3.v : 0) === 1) { */ case 37: - _r$15 = ft.Name(); /* */ $s = 39; case 39: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - next = $append(next, new field.ptr(_r$15, sliceType$2.nil, $throwNilPointerError, "", "", false, index, ft, false, false, $throwNilPointerError)); - /* } */ case 38: - i = i + (1) >> 0; - $s = 5; continue; - case 6: - _i++; - $s = 3; continue; - case 4: - $s = 1; continue; - case 2: - $r = sort.Slice(fields[0], (function(fields, nameEscBuf) { return function(i$1, j) { - var i$1, j, x$2; - x$2 = fields[0]; - if (!(((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]).name === ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j]).name)) { - return ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]).name < ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j]).name; - } - if (!((((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]).index.$length === ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j]).index.$length))) { - return ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]).index.$length < ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j]).index.$length; - } - if (!(((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]).tag === ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j]).tag)) { - return ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1]).tag; - } - return ($convertSliceType(x$2, byIndex)).Less(i$1, j); - }; })(fields, nameEscBuf)); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out = $subslice(fields[0], 0, 0); - _tmp$6 = 0; - _tmp$7 = 0; - advance = _tmp$6; - i$1 = _tmp$7; - while (true) { - if (!(i$1 < fields[0].$length)) { break; } - fi = $clone(((i$1 < 0 || i$1 >= fields[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : fields[0].$array[fields[0].$offset + i$1]), field); - name$1 = fi.name; - advance = 1; - while (true) { - if (!((i$1 + advance >> 0) < fields[0].$length)) { break; } - fj = $clone((x$2 = i$1 + advance >> 0, ((x$2 < 0 || x$2 >= fields[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : fields[0].$array[fields[0].$offset + x$2])), field); - if (!(fj.name === name$1)) { - break; - } - advance = advance + (1) >> 0; - } - if (advance === 1) { - out = $append(out, fi); - i$1 = i$1 + (advance) >> 0; - continue; - } - _tuple$1 = dominantField($subslice(fields[0], i$1, (i$1 + advance >> 0))); - dominant = $clone(_tuple$1[0], field); - ok = _tuple$1[1]; - if (ok) { - out = $append(out, dominant); - } - i$1 = i$1 + (advance) >> 0; - } - fields[0] = out; - $r = sort.Sort(($convertSliceType(fields[0], byIndex))); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref$1 = fields[0]; - _i$1 = 0; - /* while (true) { */ case 42: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 43; continue; } - i$2 = _i$1; - f$1 = ((i$2 < 0 || i$2 >= fields[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : fields[0].$array[fields[0].$offset + i$2]); - _r$16 = typeByIndex(t, f$1.index); /* */ $s = 44; case 44: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = typeEncoder(_r$16); /* */ $s = 45; case 45: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - f$1.encoder = _r$17; - _i$1++; - $s = 42; continue; - case 43: - nameIndex = (x$3 = fields[0].$length, ((x$3 < 0 || x$3 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref$2 = fields[0]; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - i$3 = _i$2; - field$2 = $clone(((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]), field); - _key$2 = field$2.name; (nameIndex || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$2)] = { k: _key$2, v: i$3 }; - _i$2++; - } - $s = -1; return new structFields.ptr(fields[0], nameIndex); - /* */ } return; } var $f = {$blk: typeFields, $c: true, $r, _1, _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _i$2, _key, _key$1, _key$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _v, _v$1, _v$2, advance, count, current, dominant, f, f$1, fi, field$1, field$2, fields, fj, ft, i, i$1, i$2, i$3, index, name, name$1, nameEscBuf, nameIndex, next, nextCount, ok, opts, out, quoted, sf, t, t$1, tag, tagged, visited, x, x$1, x$2, x$3, $s};return $f; - }; - dominantField = function(fields) { - var fields; - if (fields.$length > 1 && ((0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).index.$length === (1 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 1]).index.$length) && (0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).tag === (1 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 1]).tag) { - return [new field.ptr("", sliceType$2.nil, $throwNilPointerError, "", "", false, sliceType$1.nil, $ifaceNil, false, false, $throwNilPointerError), false]; - } - return [(0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]), true]; - }; - cachedTypeFields = function(t) { - var {_arg, _arg$1, _r$3, _r$4, _tuple, _tuple$1, f, f$1, ok, t, x, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = fieldCache.Load(t); - f = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(f, structFields); - } - _arg = t; - _r$3 = typeFields(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = (x = _r$3, new x.constructor.elem(x)); - _r$4 = fieldCache.LoadOrStore(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - f$1 = _tuple$1[0]; - $s = -1; return $assertType(f$1, structFields); - /* */ } return; } var $f = {$blk: cachedTypeFields, $c: true, $r, _arg, _arg$1, _r$3, _r$4, _tuple, _tuple$1, f, f$1, ok, t, x, $s};return $f; - }; - Unmarshal = function(data, v) { - var {$24r, _r$3, _r$4, d, data, err, v, $s, $r, $c} = $restore(this, {data, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = new decodeState.ptr(sliceType$2.nil, 0, 0, new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)), ptrType$4.nil, $ifaceNil, false, false); - _r$3 = checkValid(data, d.scan); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - d.init(data); - _r$4 = d.unmarshal(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Unmarshal, $c: true, $r, $24r, _r$3, _r$4, d, data, err, v, $s};return $f; - }; - $pkg.Unmarshal = Unmarshal; - UnmarshalTypeError.ptr.prototype.Error = function() { - var {$24r, $24r$1, _r$3, _r$4, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - /* */ if (!(e.Struct === "") || !(e.Field === "")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(e.Struct === "") || !(e.Field === "")) { */ case 1: - _r$3 = e.Type.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = "json: cannot unmarshal " + e.Value + " into Go struct field " + e.Struct + "." + e.Field + " of type " + _r$3; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$4 = e.Type.String(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = "json: cannot unmarshal " + e.Value + " into Go value of type " + _r$4; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: UnmarshalTypeError.ptr.prototype.Error, $c: true, $r, $24r, $24r$1, _r$3, _r$4, e, $s};return $f; - }; - UnmarshalTypeError.prototype.Error = function() { return this.$val.Error(); }; - InvalidUnmarshalError.ptr.prototype.Error = function() { - var {$24r, $24r$1, _r$3, _r$4, _r$5, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - if ($interfaceIsEqual(e.Type, $ifaceNil)) { - $s = -1; return "json: Unmarshal(nil)"; - } - _r$3 = e.Type.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!((_r$3 === 22))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$3 === 22))) { */ case 1: - _r$4 = e.Type.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = "json: Unmarshal(non-pointer " + _r$4 + ")"; - $s = 5; case 5: return $24r; - /* } */ case 2: - _r$5 = e.Type.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = "json: Unmarshal(nil " + _r$5 + ")"; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: InvalidUnmarshalError.ptr.prototype.Error, $c: true, $r, $24r, $24r$1, _r$3, _r$4, _r$5, e, $s};return $f; - }; - InvalidUnmarshalError.prototype.Error = function() { return this.$val.Error(); }; - decodeState.ptr.prototype.unmarshal = function(v) { - var {$24r, _r$3, _r$4, _r$5, d, err, rv, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$3 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - rv = _r$3; - if (!(($clone(rv, reflect.Value).Kind() === 22)) || $clone(rv, reflect.Value).IsNil()) { - $s = -1; return new InvalidUnmarshalError.ptr(reflect.TypeOf(v)); - } - d.scan.reset(); - $r = d.scanWhile(9); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = d.value($clone(rv, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - _r$5 = d.addErrorContext(err); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 7; case 7: return $24r; - /* } */ case 5: - $s = -1; return d.savedError; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.unmarshal, $c: true, $r, $24r, _r$3, _r$4, _r$5, d, err, rv, v, $s};return $f; - }; - decodeState.prototype.unmarshal = function(v) { return this.$val.unmarshal(v); }; - Number.prototype.String = function() { - var n; - n = this.$val; - return (n); - }; - $ptrType(Number).prototype.String = function() { return new Number(this.$get()).String(); }; - Number.prototype.Float64 = function() { - var n; - n = this.$val; - return strconv.ParseFloat((n), 64); - }; - $ptrType(Number).prototype.Float64 = function() { return new Number(this.$get()).Float64(); }; - Number.prototype.Int64 = function() { - var n; - n = this.$val; - return strconv.ParseInt((n), 10, 64); - }; - $ptrType(Number).prototype.Int64 = function() { return new Number(this.$get()).Int64(); }; - decodeState.ptr.prototype.readIndex = function() { - var d; - d = this; - return d.off - 1 >> 0; - }; - decodeState.prototype.readIndex = function() { return this.$val.readIndex(); }; - decodeState.ptr.prototype.init = function(data) { - var d, data; - d = this; - d.data = data; - d.off = 0; - d.savedError = $ifaceNil; - if (!(d.errorContext === ptrType$4.nil)) { - d.errorContext.Struct = $ifaceNil; - d.errorContext.FieldStack = $subslice(d.errorContext.FieldStack, 0, 0); - } - return d; - }; - decodeState.prototype.init = function(data) { return this.$val.init(data); }; - decodeState.ptr.prototype.saveError = function(err) { - var {_r$3, d, err, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if ($interfaceIsEqual(d.savedError, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(d.savedError, $ifaceNil)) { */ case 1: - _r$3 = d.addErrorContext(err); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - d.savedError = _r$3; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.saveError, $c: true, $r, _r$3, d, err, $s};return $f; - }; - decodeState.prototype.saveError = function(err) { return this.$val.saveError(err); }; - decodeState.ptr.prototype.addErrorContext = function(err) { - var {_r$3, _ref, d, err, err$1, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if (!(d.errorContext === ptrType$4.nil) && (!($interfaceIsEqual(d.errorContext.Struct, $ifaceNil)) || d.errorContext.FieldStack.$length > 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(d.errorContext === ptrType$4.nil) && (!($interfaceIsEqual(d.errorContext.Struct, $ifaceNil)) || d.errorContext.FieldStack.$length > 0)) { */ case 1: - _ref = err; - /* */ if ($assertType(_ref, ptrType$10, true)[1]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($assertType(_ref, ptrType$10, true)[1]) { */ case 3: - err$1 = _ref.$val; - _r$3 = d.errorContext.Struct.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1.Struct = _r$3; - err$1.Field = strings.Join(d.errorContext.FieldStack, "."); - /* } */ case 4: - /* } */ case 2: - $s = -1; return err; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.addErrorContext, $c: true, $r, _r$3, _ref, d, err, err$1, $s};return $f; - }; - decodeState.prototype.addErrorContext = function(err) { return this.$val.addErrorContext(err); }; - decodeState.ptr.prototype.skip = function() { - var {_r$3, _tmp, _tmp$1, _tmp$2, d, data, depth, i, op, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _tmp = d.scan; - _tmp$1 = d.data; - _tmp$2 = d.off; - s = _tmp; - data = _tmp$1; - i = _tmp$2; - depth = s.parseState.$length; - /* while (true) { */ case 1: - _r$3 = s.step(s, ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - op = _r$3; - i = i + (1) >> 0; - if (s.parseState.$length < depth) { - d.off = i; - d.opcode = op; - $s = -1; return; - } - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.skip, $c: true, $r, _r$3, _tmp, _tmp$1, _tmp$2, d, data, depth, i, op, s, $s};return $f; - }; - decodeState.prototype.skip = function() { return this.$val.skip(); }; - decodeState.ptr.prototype.scanNext = function() { - var {_r$3, _r$4, d, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if (d.off < d.data.$length) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d.off < d.data.$length) { */ case 1: - _r$3 = d.scan.step(d.scan, (x = d.data, x$1 = d.off, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]))); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - d.opcode = _r$3; - d.off = d.off + (1) >> 0; - $s = 3; continue; - /* } else { */ case 2: - _r$4 = d.scan.eof(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - d.opcode = _r$4; - d.off = d.data.$length + 1 >> 0; - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.scanNext, $c: true, $r, _r$3, _r$4, d, x, x$1, $s};return $f; - }; - decodeState.prototype.scanNext = function() { return this.$val.scanNext(); }; - decodeState.ptr.prototype.scanWhile = function(op) { - var {_r$3, _r$4, _tmp, _tmp$1, _tmp$2, d, data, i, newOp, op, s, $s, $r, $c} = $restore(this, {op}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _tmp = d.scan; - _tmp$1 = d.data; - _tmp$2 = d.off; - s = _tmp; - data = _tmp$1; - i = _tmp$2; - /* while (true) { */ case 1: - /* if (!(i < data.$length)) { break; } */ if(!(i < data.$length)) { $s = 2; continue; } - _r$3 = s.step(s, ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - newOp = _r$3; - i = i + (1) >> 0; - if (!((newOp === op))) { - d.opcode = newOp; - d.off = i; - $s = -1; return; - } - $s = 1; continue; - case 2: - d.off = data.$length + 1 >> 0; - _r$4 = d.scan.eof(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - d.opcode = _r$4; - $s = -1; return; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.scanWhile, $c: true, $r, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, d, data, i, newOp, op, s, $s};return $f; - }; - decodeState.prototype.scanWhile = function(op) { return this.$val.scanWhile(op); }; - decodeState.ptr.prototype.rescanLiteral = function() { - var _1, _2, _3, _tmp, _tmp$1, d, data, i, x; - d = this; - _tmp = d.data; - _tmp$1 = d.off; - data = _tmp; - i = _tmp$1; - Switch: - switch (0) { default: - _1 = (x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])); - if (_1 === (34)) { - while (true) { - if (!(i < data.$length)) { break; } - _2 = ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]); - if (_2 === (92)) { - i = i + (1) >> 0; - } else if (_2 === (34)) { - i = i + (1) >> 0; - break Switch; - } - i = i + (1) >> 0; - } - } else if ((_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55)) || (_1 === (56)) || (_1 === (57)) || (_1 === (45))) { - while (true) { - if (!(i < data.$length)) { break; } - _3 = ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]); - if ((_3 === (48)) || (_3 === (49)) || (_3 === (50)) || (_3 === (51)) || (_3 === (52)) || (_3 === (53)) || (_3 === (54)) || (_3 === (55)) || (_3 === (56)) || (_3 === (57)) || (_3 === (46)) || (_3 === (101)) || (_3 === (69)) || (_3 === (43)) || (_3 === (45))) { - } else { - break Switch; - } - i = i + (1) >> 0; - } - } else if (_1 === (116)) { - i = i + (3) >> 0; - } else if (_1 === (102)) { - i = i + (4) >> 0; - } else if (_1 === (110)) { - i = i + (3) >> 0; - } - } - if (i < data.$length) { - d.opcode = stateEndValue(d.scan, ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i])); - } else { - d.opcode = 10; - } - d.off = i + 1 >> 0; - }; - decodeState.prototype.rescanLiteral = function() { return this.$val.rescanLiteral(); }; - decodeState.ptr.prototype.value = function(v) { - var {_1, _r$3, _r$4, _r$5, d, err, err$1, err$2, start, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _1 = d.opcode; - /* */ if (_1 === (6)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (1)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (6)) { */ case 2: - /* */ if ($clone(v, reflect.Value).IsValid()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($clone(v, reflect.Value).IsValid()) { */ case 7: - _r$3 = d.array($clone(v, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 9; continue; - /* } else { */ case 8: - $r = d.skip(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - $r = d.scanNext(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - /* } else if (_1 === (2)) { */ case 3: - /* */ if ($clone(v, reflect.Value).IsValid()) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($clone(v, reflect.Value).IsValid()) { */ case 13: - _r$4 = d.object($clone(v, reflect.Value)); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$1 = _r$4; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 15; continue; - /* } else { */ case 14: - $r = d.skip(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 15: - $r = d.scanNext(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - /* } else if (_1 === (1)) { */ case 4: - start = d.readIndex(); - d.rescanLiteral(); - /* */ if ($clone(v, reflect.Value).IsValid()) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if ($clone(v, reflect.Value).IsValid()) { */ case 19: - _r$5 = d.literalStore($subslice(d.data, start, d.readIndex()), $clone(v, reflect.Value), false); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$2 = _r$5; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* } */ case 20: - $s = 6; continue; - /* } else { */ case 5: - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - /* } */ case 6: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.value, $c: true, $r, _1, _r$3, _r$4, _r$5, d, err, err$1, err$2, start, v, $s};return $f; - }; - decodeState.prototype.value = function(v) { return this.$val.value(v); }; - decodeState.ptr.prototype.valueQuoted = function() { - var {_1, _r$3, _ref, d, v, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _1 = d.opcode; - /* */ if ((_1 === (6)) || (_1 === (2))) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((_1 === (6)) || (_1 === (2))) { */ case 2: - $r = d.skip(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.scanNext(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if (_1 === (1)) { */ case 3: - _r$3 = d.literalInterface(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = _r$3; - _ref = v; - if (_ref === $ifaceNil || $assertType(_ref, $String, true)[1]) { - $s = -1; return v; - } - $s = 5; continue; - /* } else { */ case 4: - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - /* } */ case 5: - case 1: - $s = -1; return (x = new unquotedValue.ptr(), new x.constructor.elem(x)); - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.valueQuoted, $c: true, $r, _1, _r$3, _ref, d, v, x, $s};return $f; - }; - decodeState.prototype.valueQuoted = function() { return this.$val.valueQuoted(); }; - indirect = function(v, decodingNull) { - var {_r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _v, _v$1, _v$2, _v$3, decodingNull, e, haveAddr, ok, ok$1, u, u$1, v, v0, $s, $r, $c} = $restore(this, {v, decodingNull}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v0 = v; - haveAddr = false; - if (!(!(($clone(v, reflect.Value).Kind() === 22)))) { _v = false; $s = 3; continue s; } - _r$3 = $clone(v, reflect.Value).Type().Name(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = !(_r$3 === ""); case 3: - /* */ if (_v && $clone(v, reflect.Value).CanAddr()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v && $clone(v, reflect.Value).CanAddr()) { */ case 1: - haveAddr = true; - v = $clone(v, reflect.Value).Addr(); - /* } */ case 2: - /* while (true) { */ case 5: - /* */ if (($clone(v, reflect.Value).Kind() === 20) && !$clone(v, reflect.Value).IsNil()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (($clone(v, reflect.Value).Kind() === 20) && !$clone(v, reflect.Value).IsNil()) { */ case 7: - _r$4 = $clone(v, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - e = _r$4; - if (!(($clone(e, reflect.Value).Kind() === 22) && !$clone(e, reflect.Value).IsNil())) { _v$1 = false; $s = 12; continue s; } - if (!decodingNull) { _v$2 = true; $s = 13; continue s; } - _r$5 = $clone(e, reflect.Value).Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v$2 = _r$6 === 22; case 13: - _v$1 = _v$2; case 12: - /* */ if (_v$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_v$1) { */ case 10: - haveAddr = false; - v = e; - /* continue; */ $s = 5; continue; - /* } */ case 11: - /* } */ case 8: - if (!(($clone(v, reflect.Value).Kind() === 22))) { - /* break; */ $s = 6; continue; - } - if (decodingNull && $clone(v, reflect.Value).CanSet()) { - /* break; */ $s = 6; continue; - } - _r$7 = $clone(v, reflect.Value).Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Kind(); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(_r$8 === 20)) { _v$3 = false; $s = 18; continue s; } - _r$9 = $clone(v, reflect.Value).Elem(); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Elem(); /* */ $s = 22; case 22: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$3 = $equal(_r$10, v, reflect.Value); case 18: - /* */ if (_v$3) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_v$3) { */ case 16: - _r$11 = $clone(v, reflect.Value).Elem(); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v = _r$11; - /* break; */ $s = 6; continue; - /* } */ case 17: - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 24: - _r$12 = $clone(v, reflect.Value).Type().Elem(); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = reflect.New(_r$12); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$13, reflect.Value)); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - _r$14 = $clone(v, reflect.Value).Type().NumMethod(); /* */ $s = 31; case 31: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (_r$14 > 0 && $clone(v, reflect.Value).CanInterface()) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_r$14 > 0 && $clone(v, reflect.Value).CanInterface()) { */ case 29: - _r$15 = $clone(v, reflect.Value).Interface(); /* */ $s = 32; case 32: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tuple = $assertType(_r$15, Unmarshaler, true); - u = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [u, $ifaceNil, new reflect.Value.ptr(ptrType$11.nil, 0, 0)]; - } - /* */ if (!decodingNull) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (!decodingNull) { */ case 33: - _r$16 = $clone(v, reflect.Value).Interface(); /* */ $s = 35; case 35: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$1 = $assertType(_r$16, encoding.TextUnmarshaler, true); - u$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return [$ifaceNil, u$1, new reflect.Value.ptr(ptrType$11.nil, 0, 0)]; - } - /* } */ case 34: - /* } */ case 30: - /* */ if (haveAddr) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (haveAddr) { */ case 36: - v = v0; - haveAddr = false; - $s = 38; continue; - /* } else { */ case 37: - _r$17 = $clone(v, reflect.Value).Elem(); /* */ $s = 39; case 39: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - v = _r$17; - /* } */ case 38: - $s = 5; continue; - case 6: - $s = -1; return [$ifaceNil, $ifaceNil, v]; - /* */ } return; } var $f = {$blk: indirect, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _v, _v$1, _v$2, _v$3, decodingNull, e, haveAddr, ok, ok$1, u, u$1, v, v0, $s};return $f; - }; - decodeState.ptr.prototype.array = function(v) { - var {$24r, _1, _q, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, ai, d, err, err$1, i, newcap, newv, pv, start, u, ut, v, z, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$3 = indirect($clone(v, reflect.Value), false); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - u = _tuple[0]; - ut = _tuple[1]; - pv = _tuple[2]; - /* */ if (!($interfaceIsEqual(u, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(u, $ifaceNil))) { */ case 2: - start = d.readIndex(); - $r = d.skip(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = u.UnmarshalJSON($subslice(d.data, start, d.off)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 6; case 6: return $24r; - /* } */ case 3: - /* */ if (!($interfaceIsEqual(ut, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(ut, $ifaceNil))) { */ case 7: - $r = d.saveError(new UnmarshalTypeError.ptr("array", $clone(v, reflect.Value).Type(), (new $Int64(0, d.off)), "", "")); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.skip(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 8: - v = pv; - _1 = $clone(v, reflect.Value).Kind(); - /* */ if (_1 === (20)) { $s = 12; continue; } - /* */ if ((_1 === (17)) || (_1 === (23))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_1 === (20)) { */ case 12: - /* */ if ($clone(v, reflect.Value).NumMethod() === 0) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if ($clone(v, reflect.Value).NumMethod() === 0) { */ case 16: - _r$5 = d.arrayInterface(); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ai = _r$5; - _r$6 = reflect.ValueOf(ai); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$6, reflect.Value)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 17: - $r = d.saveError(new UnmarshalTypeError.ptr("array", $clone(v, reflect.Value).Type(), (new $Int64(0, d.off)), "", "")); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.skip(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } else if ((_1 === (17)) || (_1 === (23))) { */ case 13: - /* break; */ $s = 11; continue; - $s = 15; continue; - /* } else { */ case 14: - $r = d.saveError(new UnmarshalTypeError.ptr("array", $clone(v, reflect.Value).Type(), (new $Int64(0, d.off)), "", "")); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.skip(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 15: - case 11: - i = 0; - /* while (true) { */ case 25: - $r = d.scanWhile(9); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (d.opcode === 8) { - /* break; */ $s = 26; continue; - } - /* */ if ($clone(v, reflect.Value).Kind() === 23) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if ($clone(v, reflect.Value).Kind() === 23) { */ case 28: - /* */ if (i >= $clone(v, reflect.Value).Cap()) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (i >= $clone(v, reflect.Value).Cap()) { */ case 30: - newcap = $clone(v, reflect.Value).Cap() + (_q = $clone(v, reflect.Value).Cap() / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - if (newcap < 4) { - newcap = 4; - } - _r$7 = reflect.MakeSlice($clone(v, reflect.Value).Type(), $clone(v, reflect.Value).Len(), newcap); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - newv = _r$7; - _r$8 = reflect.Copy($clone(newv, reflect.Value), $clone(v, reflect.Value)); /* */ $s = 33; case 33: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $r = $clone(v, reflect.Value).Set($clone(newv, reflect.Value)); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 31: - if (i >= $clone(v, reflect.Value).Len()) { - $clone(v, reflect.Value).SetLen(i + 1 >> 0); - } - /* } */ case 29: - /* */ if (i < $clone(v, reflect.Value).Len()) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (i < $clone(v, reflect.Value).Len()) { */ case 35: - _r$9 = $clone(v, reflect.Value).Index(i); /* */ $s = 38; case 38: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = d.value($clone(_r$9, reflect.Value)); /* */ $s = 39; case 39: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 37; continue; - /* } else { */ case 36: - _r$11 = d.value(new reflect.Value.ptr(ptrType$11.nil, 0, 0)); /* */ $s = 40; case 40: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$1 = _r$11; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* } */ case 37: - i = i + (1) >> 0; - /* */ if (d.opcode === 9) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (d.opcode === 9) { */ case 41: - $r = d.scanWhile(9); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 42: - if (d.opcode === 8) { - /* break; */ $s = 26; continue; - } - if (!((d.opcode === 7))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $s = 25; continue; - case 26: - /* */ if (i < $clone(v, reflect.Value).Len()) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (i < $clone(v, reflect.Value).Len()) { */ case 44: - /* */ if ($clone(v, reflect.Value).Kind() === 17) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if ($clone(v, reflect.Value).Kind() === 17) { */ case 46: - _r$12 = $clone(v, reflect.Value).Type().Elem(); /* */ $s = 49; case 49: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = reflect.Zero(_r$12); /* */ $s = 50; case 50: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - z = _r$13; - /* while (true) { */ case 51: - /* if (!(i < $clone(v, reflect.Value).Len())) { break; } */ if(!(i < $clone(v, reflect.Value).Len())) { $s = 52; continue; } - _r$14 = $clone(v, reflect.Value).Index(i); /* */ $s = 53; case 53: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $r = $clone(_r$14, reflect.Value).Set($clone(z, reflect.Value)); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 51; continue; - case 52: - $s = 48; continue; - /* } else { */ case 47: - $clone(v, reflect.Value).SetLen(i); - /* } */ case 48: - /* } */ case 45: - /* */ if ((i === 0) && ($clone(v, reflect.Value).Kind() === 23)) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if ((i === 0) && ($clone(v, reflect.Value).Kind() === 23)) { */ case 55: - _r$15 = reflect.MakeSlice($clone(v, reflect.Value).Type(), 0, 0); /* */ $s = 57; case 57: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$15, reflect.Value)); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 56: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.array, $c: true, $r, $24r, _1, _q, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, ai, d, err, err$1, i, newcap, newv, pv, start, u, ut, v, z, $s};return $f; - }; - decodeState.prototype.array = function(v) { return this.$val.array(v); }; - decodeState.ptr.prototype.object = function(v) { - var {$24r, _1, _2, _3, _arg, _entry, _i, _i$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, _v$1, d, destring, elemType, err, err$1, err$2, err$3, err$4, err$5, f, ff, fields, i, i$1, i$2, item, key, kt, kv, mapElem, n, n$1, oi, ok, ok$1, origErrorContext, pv, qv, qv$1, qv$2, s, s$1, start, start$1, subv, t, u, ut, v, x, x$1, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$3 = indirect($clone(v, reflect.Value), false); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - u = _tuple[0]; - ut = _tuple[1]; - pv = _tuple[2]; - /* */ if (!($interfaceIsEqual(u, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(u, $ifaceNil))) { */ case 2: - start = d.readIndex(); - $r = d.skip(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = u.UnmarshalJSON($subslice(d.data, start, d.off)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 6; case 6: return $24r; - /* } */ case 3: - /* */ if (!($interfaceIsEqual(ut, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(ut, $ifaceNil))) { */ case 7: - $r = d.saveError(new UnmarshalTypeError.ptr("object", $clone(v, reflect.Value).Type(), (new $Int64(0, d.off)), "", "")); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.skip(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 8: - v = pv; - t = $clone(v, reflect.Value).Type(); - /* */ if (($clone(v, reflect.Value).Kind() === 20) && ($clone(v, reflect.Value).NumMethod() === 0)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (($clone(v, reflect.Value).Kind() === 20) && ($clone(v, reflect.Value).NumMethod() === 0)) { */ case 11: - _r$5 = d.objectInterface(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - oi = _r$5; - _r$6 = reflect.ValueOf(new mapType(oi)); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$6, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 12: - fields = new structFields.ptr(sliceType$3.nil, false); - _1 = $clone(v, reflect.Value).Kind(); - /* */ if (_1 === (21)) { $s = 17; continue; } - /* */ if (_1 === (25)) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (_1 === (21)) { */ case 17: - _r$7 = t.Key(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Kind(); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _2 = _r$8; - /* */ if ((_2 === (24)) || (_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6)) || (_2 === (7)) || (_2 === (8)) || (_2 === (9)) || (_2 === (10)) || (_2 === (11)) || (_2 === (12))) { $s = 24; continue; } - _r$9 = t.Key(); /* */ $s = 27; case 27: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = reflect.PointerTo(_r$9); /* */ $s = 28; case 28: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.Implements(textUnmarshalerType); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if ((_2 === (24)) || (_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6)) || (_2 === (7)) || (_2 === (8)) || (_2 === (9)) || (_2 === (10)) || (_2 === (11)) || (_2 === (12))) { */ case 24: - $s = 26; continue; - /* } else if (!_r$11) { */ case 25: - $r = d.saveError(new UnmarshalTypeError.ptr("object", t, (new $Int64(0, d.off)), "", "")); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.skip(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 26: - case 21: - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 32: - _r$12 = reflect.MakeMap(t); /* */ $s = 34; case 34: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$12, reflect.Value)); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 33: - $s = 20; continue; - /* } else if (_1 === (25)) { */ case 18: - _r$13 = cachedTypeFields(t); /* */ $s = 36; case 36: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - structFields.copy(fields, _r$13); - $s = 20; continue; - /* } else { */ case 19: - $r = d.saveError(new UnmarshalTypeError.ptr("object", t, (new $Int64(0, d.off)), "", "")); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = d.skip(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 20: - case 16: - mapElem = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - origErrorContext = new errorContext.ptr($ifaceNil, sliceType$5.nil); - if (!(d.errorContext === ptrType$4.nil)) { - errorContext.copy(origErrorContext, d.errorContext); - } - /* while (true) { */ case 39: - $r = d.scanWhile(9); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (d.opcode === 5) { - /* break; */ $s = 40; continue; - } - if (!((d.opcode === 1))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - start$1 = d.readIndex(); - d.rescanLiteral(); - item = $subslice(d.data, start$1, d.readIndex()); - _tuple$1 = unquoteBytes(item); - key = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - subv = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - destring = false; - /* */ if ($clone(v, reflect.Value).Kind() === 21) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if ($clone(v, reflect.Value).Kind() === 21) { */ case 42: - _r$14 = t.Elem(); /* */ $s = 45; case 45: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - elemType = _r$14; - /* */ if (!$clone(mapElem, reflect.Value).IsValid()) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (!$clone(mapElem, reflect.Value).IsValid()) { */ case 46: - _r$15 = $clone(reflect.New(elemType), reflect.Value).Elem(); /* */ $s = 49; case 49: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - mapElem = _r$15; - $s = 48; continue; - /* } else { */ case 47: - _r$16 = reflect.Zero(elemType); /* */ $s = 50; case 50: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $r = $clone(mapElem, reflect.Value).Set($clone(_r$16, reflect.Value)); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 48: - subv = mapElem; - $s = 44; continue; - /* } else { */ case 43: - f = ptrType$12.nil; - _tuple$2 = (_entry = fields.nameIndex[$String.keyFor(($bytesToString(key)))], _entry !== undefined ? [_entry.v, true] : [0, false]); - i = _tuple$2[0]; - ok$1 = _tuple$2[1]; - /* */ if (ok$1) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (ok$1) { */ case 52: - f = (x = fields.list, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - $s = 54; continue; - /* } else { */ case 53: - _ref = fields.list; - _i = 0; - /* while (true) { */ case 55: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 56; continue; } - i$1 = _i; - ff = (x$1 = fields.list, ((i$1 < 0 || i$1 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i$1])); - _r$17 = ff.equalFold(ff.nameBytes, key); /* */ $s = 59; case 59: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (_r$17) { $s = 57; continue; } - /* */ $s = 58; continue; - /* if (_r$17) { */ case 57: - f = ff; - /* break; */ $s = 56; continue; - /* } */ case 58: - _i++; - $s = 55; continue; - case 56: - /* } */ case 54: - /* */ if (!(f === ptrType$12.nil)) { $s = 60; continue; } - /* */ if (d.disallowUnknownFields) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (!(f === ptrType$12.nil)) { */ case 60: - subv = v; - destring = f.quoted; - _ref$1 = f.index; - _i$1 = 0; - /* while (true) { */ case 63: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 64; continue; } - i$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - /* */ if ($clone(subv, reflect.Value).Kind() === 22) { $s = 65; continue; } - /* */ $s = 66; continue; - /* if ($clone(subv, reflect.Value).Kind() === 22) { */ case 65: - /* */ if ($clone(subv, reflect.Value).IsNil()) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if ($clone(subv, reflect.Value).IsNil()) { */ case 67: - /* */ if (!$clone(subv, reflect.Value).CanSet()) { $s = 69; continue; } - /* */ $s = 70; continue; - /* if (!$clone(subv, reflect.Value).CanSet()) { */ case 69: - _r$18 = $clone(subv, reflect.Value).Type().Elem(); /* */ $s = 71; case 71: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg = _r$18; - _r$19 = fmt.Errorf("json: cannot set embedded pointer to unexported struct: %v", new sliceType([_arg])); /* */ $s = 72; case 72: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $r = d.saveError(_r$19); /* */ $s = 73; case 73: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - subv = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - destring = false; - /* break; */ $s = 64; continue; - /* } */ case 70: - _r$20 = $clone(subv, reflect.Value).Type().Elem(); /* */ $s = 74; case 74: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = reflect.New(_r$20); /* */ $s = 75; case 75: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $r = $clone(subv, reflect.Value).Set($clone(_r$21, reflect.Value)); /* */ $s = 76; case 76: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 68: - _r$22 = $clone(subv, reflect.Value).Elem(); /* */ $s = 77; case 77: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - subv = _r$22; - /* } */ case 66: - _r$23 = $clone(subv, reflect.Value).Field(i$2); /* */ $s = 78; case 78: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - subv = _r$23; - _i$1++; - $s = 63; continue; - case 64: - if (d.errorContext === ptrType$4.nil) { - d.errorContext = new errorContext.ptr($ifaceNil, sliceType$5.nil); - } - d.errorContext.FieldStack = $append(d.errorContext.FieldStack, f.name); - d.errorContext.Struct = t; - $s = 62; continue; - /* } else if (d.disallowUnknownFields) { */ case 61: - _r$24 = fmt.Errorf("json: unknown field %q", new sliceType([key])); /* */ $s = 79; case 79: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - $r = d.saveError(_r$24); /* */ $s = 80; case 80: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 62: - /* } */ case 44: - /* */ if (d.opcode === 9) { $s = 81; continue; } - /* */ $s = 82; continue; - /* if (d.opcode === 9) { */ case 81: - $r = d.scanWhile(9); /* */ $s = 83; case 83: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 82: - if (!((d.opcode === 3))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $r = d.scanWhile(9); /* */ $s = 84; case 84: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (destring) { $s = 85; continue; } - /* */ $s = 86; continue; - /* if (destring) { */ case 85: - _r$25 = d.valueQuoted(); /* */ $s = 88; case 88: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _ref$2 = _r$25; - /* */ if (_ref$2 === $ifaceNil) { $s = 89; continue; } - /* */ if ($assertType(_ref$2, $String, true)[1]) { $s = 90; continue; } - /* */ $s = 91; continue; - /* if (_ref$2 === $ifaceNil) { */ case 89: - qv = _ref$2; - _r$26 = d.literalStore(nullLiteral, $clone(subv, reflect.Value), false); /* */ $s = 93; case 93: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - err = _r$26; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 92; continue; - /* } else if ($assertType(_ref$2, $String, true)[1]) { */ case 90: - qv$1 = _ref$2.$val; - _r$27 = d.literalStore((new sliceType$2($stringToBytes(qv$1))), $clone(subv, reflect.Value), true); /* */ $s = 94; case 94: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - err$1 = _r$27; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 92; continue; - /* } else { */ case 91: - qv$2 = _ref$2; - _r$28 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v", new sliceType([$clone(subv, reflect.Value).Type()])); /* */ $s = 95; case 95: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - $r = d.saveError(_r$28); /* */ $s = 96; case 96: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 92: - $s = 87; continue; - /* } else { */ case 86: - _r$29 = d.value($clone(subv, reflect.Value)); /* */ $s = 97; case 97: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - err$2 = _r$29; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* } */ case 87: - /* */ if ($clone(v, reflect.Value).Kind() === 21) { $s = 98; continue; } - /* */ $s = 99; continue; - /* if ($clone(v, reflect.Value).Kind() === 21) { */ case 98: - _r$30 = t.Key(); /* */ $s = 100; case 100: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - kt = _r$30; - kv = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - _r$31 = reflect.PointerTo(kt).Implements(textUnmarshalerType); /* */ $s = 106; case 106: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - /* */ if (_r$31) { $s = 102; continue; } - _r$32 = kt.Kind(); /* */ $s = 107; case 107: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - /* */ if ((_r$32 === 24)) { $s = 103; continue; } - /* */ $s = 104; continue; - /* if (_r$31) { */ case 102: - kv = reflect.New(kt); - _r$33 = d.literalStore(item, $clone(kv, reflect.Value), true); /* */ $s = 108; case 108: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - err$3 = _r$33; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _r$34 = $clone(kv, reflect.Value).Elem(); /* */ $s = 109; case 109: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - kv = _r$34; - $s = 105; continue; - /* } else if ((_r$32 === 24)) { */ case 103: - _r$35 = reflect.ValueOf(key); /* */ $s = 110; case 110: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _r$36 = $clone(_r$35, reflect.Value).Convert(kt); /* */ $s = 111; case 111: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - kv = _r$36; - $s = 105; continue; - /* } else { */ case 104: - _r$37 = kt.Kind(); /* */ $s = 113; case 113: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _3 = _r$37; - /* */ if ((_3 === (2)) || (_3 === (3)) || (_3 === (4)) || (_3 === (5)) || (_3 === (6))) { $s = 114; continue; } - /* */ if ((_3 === (7)) || (_3 === (8)) || (_3 === (9)) || (_3 === (10)) || (_3 === (11)) || (_3 === (12))) { $s = 115; continue; } - /* */ $s = 116; continue; - /* if ((_3 === (2)) || (_3 === (3)) || (_3 === (4)) || (_3 === (5)) || (_3 === (6))) { */ case 114: - s = ($bytesToString(key)); - _tuple$3 = strconv.ParseInt(s, 10, 64); - n = _tuple$3[0]; - err$4 = _tuple$3[1]; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { _v = true; $s = 120; continue s; } - _r$38 = reflect.Zero(kt); /* */ $s = 121; case 121: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _r$39 = $clone(_r$38, reflect.Value).OverflowInt(n); /* */ $s = 122; case 122: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _v = _r$39; case 120: - /* */ if (_v) { $s = 118; continue; } - /* */ $s = 119; continue; - /* if (_v) { */ case 118: - $r = d.saveError(new UnmarshalTypeError.ptr("number " + s, kt, (new $Int64(0, (start$1 + 1 >> 0))), "", "")); /* */ $s = 123; case 123: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 112; continue; - /* } */ case 119: - _r$40 = reflect.ValueOf(n); /* */ $s = 124; case 124: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - _r$41 = $clone(_r$40, reflect.Value).Convert(kt); /* */ $s = 125; case 125: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - kv = _r$41; - $s = 117; continue; - /* } else if ((_3 === (7)) || (_3 === (8)) || (_3 === (9)) || (_3 === (10)) || (_3 === (11)) || (_3 === (12))) { */ case 115: - s$1 = ($bytesToString(key)); - _tuple$4 = strconv.ParseUint(s$1, 10, 64); - n$1 = _tuple$4[0]; - err$5 = _tuple$4[1]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { _v$1 = true; $s = 128; continue s; } - _r$42 = reflect.Zero(kt); /* */ $s = 129; case 129: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - _r$43 = $clone(_r$42, reflect.Value).OverflowUint(n$1); /* */ $s = 130; case 130: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - _v$1 = _r$43; case 128: - /* */ if (_v$1) { $s = 126; continue; } - /* */ $s = 127; continue; - /* if (_v$1) { */ case 126: - $r = d.saveError(new UnmarshalTypeError.ptr("number " + s$1, kt, (new $Int64(0, (start$1 + 1 >> 0))), "", "")); /* */ $s = 131; case 131: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 112; continue; - /* } */ case 127: - _r$44 = reflect.ValueOf(n$1); /* */ $s = 132; case 132: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - _r$45 = $clone(_r$44, reflect.Value).Convert(kt); /* */ $s = 133; case 133: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - kv = _r$45; - $s = 117; continue; - /* } else { */ case 116: - $panic(new $String("json: Unexpected key type")); - /* } */ case 117: - case 112: - /* } */ case 105: - case 101: - /* */ if ($clone(kv, reflect.Value).IsValid()) { $s = 134; continue; } - /* */ $s = 135; continue; - /* if ($clone(kv, reflect.Value).IsValid()) { */ case 134: - $r = $clone(v, reflect.Value).SetMapIndex($clone(kv, reflect.Value), $clone(subv, reflect.Value)); /* */ $s = 136; case 136: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 135: - /* } */ case 99: - /* */ if (d.opcode === 9) { $s = 137; continue; } - /* */ $s = 138; continue; - /* if (d.opcode === 9) { */ case 137: - $r = d.scanWhile(9); /* */ $s = 139; case 139: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 138: - if (!(d.errorContext === ptrType$4.nil)) { - d.errorContext.FieldStack = $subslice(d.errorContext.FieldStack, 0, origErrorContext.FieldStack.$length); - d.errorContext.Struct = origErrorContext.Struct; - } - if (d.opcode === 5) { - /* break; */ $s = 40; continue; - } - if (!((d.opcode === 4))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $s = 39; continue; - case 40: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.object, $c: true, $r, $24r, _1, _2, _3, _arg, _entry, _i, _i$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, _v$1, d, destring, elemType, err, err$1, err$2, err$3, err$4, err$5, f, ff, fields, i, i$1, i$2, item, key, kt, kv, mapElem, n, n$1, oi, ok, ok$1, origErrorContext, pv, qv, qv$1, qv$2, s, s$1, start, start$1, subv, t, u, ut, v, x, x$1, $s};return $f; - }; - decodeState.prototype.object = function(v) { return this.$val.object(v); }; - decodeState.ptr.prototype.convertNumber = function(s) { - var _tuple, d, err, f, s; - d = this; - if (d.useNumber) { - return [new Number((s)), $ifaceNil]; - } - _tuple = strconv.ParseFloat(s, 64); - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [$ifaceNil, new UnmarshalTypeError.ptr("number " + s, reflect.TypeOf(new $Float64(0)), (new $Int64(0, d.off)), "", "")]; - } - return [new $Float64(f), $ifaceNil]; - }; - decodeState.prototype.convertNumber = function(s) { return this.$val.convertNumber(s); }; - decodeState.ptr.prototype.literalStore = function(item, v, fromQuoted) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _2, _3, _4, _5, _6, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, b, c, d, err, err$1, err$2, err$3, err$4, fromQuoted, isNull, item, n, n$1, n$2, n$3, n$4, ok, ok$1, pv, s, s$1, s$2, u, ut, v, val, value, $s, $r, $c} = $restore(this, {item, v, fromQuoted}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if (item.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (item.$length === 0) { */ case 1: - _r$3 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = d.saveError(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 2: - isNull = (0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]) === 110; - _r$4 = indirect($clone(v, reflect.Value), isNull); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - u = _tuple[0]; - ut = _tuple[1]; - pv = _tuple[2]; - /* */ if (!($interfaceIsEqual(u, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(u, $ifaceNil))) { */ case 6: - _r$5 = u.UnmarshalJSON(item); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 9; case 9: return $24r; - /* } */ case 7: - /* */ if (!($interfaceIsEqual(ut, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(ut, $ifaceNil))) { */ case 10: - /* */ if (!(((0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]) === 34))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!(((0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]) === 34))) { */ case 12: - /* */ if (fromQuoted) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (fromQuoted) { */ case 14: - _r$6 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = d.saveError(_r$6); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 15: - val = "number"; - _1 = (0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]); - if (_1 === (110)) { - val = "null"; - } else if ((_1 === (116)) || (_1 === (102))) { - val = "bool"; - } - $r = d.saveError(new UnmarshalTypeError.ptr(val, $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 13: - _tuple$1 = unquoteBytes(item); - s = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!ok) { */ case 19: - /* */ if (fromQuoted) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (fromQuoted) { */ case 21: - _r$7 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 24; case 24: return $24r$1; - /* } */ case 22: - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - /* } */ case 20: - _r$8 = ut.UnmarshalText(s); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$2 = _r$8; - $s = 26; case 26: return $24r$2; - /* } */ case 11: - v = pv; - c = (0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]); - _2 = c; - /* */ if (_2 === (110)) { $s = 28; continue; } - /* */ if ((_2 === (116)) || (_2 === (102))) { $s = 29; continue; } - /* */ if (_2 === (34)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_2 === (110)) { */ case 28: - /* */ if (fromQuoted && !(($bytesToString(item)) === "null")) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (fromQuoted && !(($bytesToString(item)) === "null")) { */ case 33: - _r$9 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 35; case 35: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = d.saveError(_r$9); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 27; continue; - /* } */ case 34: - _3 = $clone(v, reflect.Value).Kind(); - /* */ if ((_3 === (20)) || (_3 === (22)) || (_3 === (21)) || (_3 === (23))) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if ((_3 === (20)) || (_3 === (22)) || (_3 === (21)) || (_3 === (23))) { */ case 38: - _r$10 = reflect.Zero($clone(v, reflect.Value).Type()); /* */ $s = 40; case 40: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$10, reflect.Value)); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 39: - case 37: - $s = 32; continue; - /* } else if ((_2 === (116)) || (_2 === (102))) { */ case 29: - value = (0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]) === 116; - /* */ if (fromQuoted && !(($bytesToString(item)) === "true") && !(($bytesToString(item)) === "false")) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (fromQuoted && !(($bytesToString(item)) === "true") && !(($bytesToString(item)) === "false")) { */ case 42: - _r$11 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 44; case 44: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $r = d.saveError(_r$11); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 27; continue; - /* } */ case 43: - _4 = $clone(v, reflect.Value).Kind(); - /* */ if (_4 === (1)) { $s = 47; continue; } - /* */ if (_4 === (20)) { $s = 48; continue; } - /* */ if (fromQuoted) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (_4 === (1)) { */ case 47: - $clone(v, reflect.Value).SetBool(value); - $s = 51; continue; - /* } else if (_4 === (20)) { */ case 48: - /* */ if ($clone(v, reflect.Value).NumMethod() === 0) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if ($clone(v, reflect.Value).NumMethod() === 0) { */ case 52: - _r$12 = reflect.ValueOf(new $Bool(value)); /* */ $s = 55; case 55: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$12, reflect.Value)); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 54; continue; - /* } else { */ case 53: - $r = d.saveError(new UnmarshalTypeError.ptr("bool", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 57; case 57: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 54: - $s = 51; continue; - /* } else if (fromQuoted) { */ case 49: - _r$13 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 58; case 58: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $r = d.saveError(_r$13); /* */ $s = 59; case 59: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 51; continue; - /* } else { */ case 50: - $r = d.saveError(new UnmarshalTypeError.ptr("bool", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 60; case 60: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 51: - case 46: - $s = 32; continue; - /* } else if (_2 === (34)) { */ case 30: - _tuple$2 = unquoteBytes(item); - s$1 = _tuple$2[0]; - ok$1 = _tuple$2[1]; - /* */ if (!ok$1) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (!ok$1) { */ case 61: - /* */ if (fromQuoted) { $s = 63; continue; } - /* */ $s = 64; continue; - /* if (fromQuoted) { */ case 63: - _r$14 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 65; case 65: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$3 = _r$14; - $s = 66; case 66: return $24r$3; - /* } */ case 64: - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - /* } */ case 62: - _5 = $clone(v, reflect.Value).Kind(); - /* */ if (_5 === (23)) { $s = 68; continue; } - /* */ if (_5 === (24)) { $s = 69; continue; } - /* */ if (_5 === (20)) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if (_5 === (23)) { */ case 68: - _r$15 = $clone(v, reflect.Value).Type().Elem(); /* */ $s = 75; case 75: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.Kind(); /* */ $s = 76; case 76: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!((_r$16 === 8))) { $s = 73; continue; } - /* */ $s = 74; continue; - /* if (!((_r$16 === 8))) { */ case 73: - $r = d.saveError(new UnmarshalTypeError.ptr("string", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 77; case 77: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 67; continue; - /* } */ case 74: - b = $makeSlice(sliceType$2, base64.StdEncoding.DecodedLen(s$1.$length)); - _tuple$3 = base64.StdEncoding.Decode(b, s$1); - n = _tuple$3[0]; - err = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 78; continue; } - /* */ $s = 79; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 78: - $r = d.saveError(err); /* */ $s = 80; case 80: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 67; continue; - /* } */ case 79: - $r = $clone(v, reflect.Value).SetBytes($subslice(b, 0, n)); /* */ $s = 81; case 81: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 72; continue; - /* } else if (_5 === (24)) { */ case 69: - /* */ if ($interfaceIsEqual($clone(v, reflect.Value).Type(), numberType) && !isValidNumber(($bytesToString(s$1)))) { $s = 82; continue; } - /* */ $s = 83; continue; - /* if ($interfaceIsEqual($clone(v, reflect.Value).Type(), numberType) && !isValidNumber(($bytesToString(s$1)))) { */ case 82: - _r$17 = fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", new sliceType([item])); /* */ $s = 84; case 84: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$4 = _r$17; - $s = 85; case 85: return $24r$4; - /* } */ case 83: - $clone(v, reflect.Value).SetString(($bytesToString(s$1))); - $s = 72; continue; - /* } else if (_5 === (20)) { */ case 70: - /* */ if ($clone(v, reflect.Value).NumMethod() === 0) { $s = 86; continue; } - /* */ $s = 87; continue; - /* if ($clone(v, reflect.Value).NumMethod() === 0) { */ case 86: - _r$18 = reflect.ValueOf(new $String(($bytesToString(s$1)))); /* */ $s = 89; case 89: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$18, reflect.Value)); /* */ $s = 90; case 90: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 88; continue; - /* } else { */ case 87: - $r = d.saveError(new UnmarshalTypeError.ptr("string", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 91; case 91: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 88: - $s = 72; continue; - /* } else { */ case 71: - $r = d.saveError(new UnmarshalTypeError.ptr("string", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 92; case 92: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 72: - case 67: - $s = 32; continue; - /* } else { */ case 31: - /* */ if (!((c === 45)) && (c < 48 || c > 57)) { $s = 93; continue; } - /* */ $s = 94; continue; - /* if (!((c === 45)) && (c < 48 || c > 57)) { */ case 93: - /* */ if (fromQuoted) { $s = 95; continue; } - /* */ $s = 96; continue; - /* if (fromQuoted) { */ case 95: - _r$19 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 97; case 97: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$5 = _r$19; - $s = 98; case 98: return $24r$5; - /* } */ case 96: - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - /* } */ case 94: - s$2 = ($bytesToString(item)); - _6 = $clone(v, reflect.Value).Kind(); - /* */ if (_6 === (20)) { $s = 100; continue; } - /* */ if ((_6 === (2)) || (_6 === (3)) || (_6 === (4)) || (_6 === (5)) || (_6 === (6))) { $s = 101; continue; } - /* */ if ((_6 === (7)) || (_6 === (8)) || (_6 === (9)) || (_6 === (10)) || (_6 === (11)) || (_6 === (12))) { $s = 102; continue; } - /* */ if ((_6 === (13)) || (_6 === (14))) { $s = 103; continue; } - /* */ $s = 104; continue; - /* if (_6 === (20)) { */ case 100: - _tuple$4 = d.convertNumber(s$2); - n$1 = _tuple$4[0]; - err$1 = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 106; continue; } - /* */ $s = 107; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 106: - $r = d.saveError(err$1); /* */ $s = 108; case 108: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 99; continue; - /* } */ case 107: - /* */ if (!(($clone(v, reflect.Value).NumMethod() === 0))) { $s = 109; continue; } - /* */ $s = 110; continue; - /* if (!(($clone(v, reflect.Value).NumMethod() === 0))) { */ case 109: - $r = d.saveError(new UnmarshalTypeError.ptr("number", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 111; case 111: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 99; continue; - /* } */ case 110: - _r$20 = reflect.ValueOf(n$1); /* */ $s = 112; case 112: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$20, reflect.Value)); /* */ $s = 113; case 113: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 105; continue; - /* } else if ((_6 === (2)) || (_6 === (3)) || (_6 === (4)) || (_6 === (5)) || (_6 === (6))) { */ case 101: - _tuple$5 = strconv.ParseInt(s$2, 10, 64); - n$2 = _tuple$5[0]; - err$2 = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil)) || $clone(v, reflect.Value).OverflowInt(n$2)) { $s = 114; continue; } - /* */ $s = 115; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil)) || $clone(v, reflect.Value).OverflowInt(n$2)) { */ case 114: - $r = d.saveError(new UnmarshalTypeError.ptr("number " + s$2, $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 116; case 116: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 99; continue; - /* } */ case 115: - $clone(v, reflect.Value).SetInt(n$2); - $s = 105; continue; - /* } else if ((_6 === (7)) || (_6 === (8)) || (_6 === (9)) || (_6 === (10)) || (_6 === (11)) || (_6 === (12))) { */ case 102: - _tuple$6 = strconv.ParseUint(s$2, 10, 64); - n$3 = _tuple$6[0]; - err$3 = _tuple$6[1]; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil)) || $clone(v, reflect.Value).OverflowUint(n$3)) { $s = 117; continue; } - /* */ $s = 118; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil)) || $clone(v, reflect.Value).OverflowUint(n$3)) { */ case 117: - $r = d.saveError(new UnmarshalTypeError.ptr("number " + s$2, $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 119; case 119: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 99; continue; - /* } */ case 118: - $clone(v, reflect.Value).SetUint(n$3); - $s = 105; continue; - /* } else if ((_6 === (13)) || (_6 === (14))) { */ case 103: - _arg = s$2; - _r$21 = $clone(v, reflect.Value).Type().Bits(); /* */ $s = 120; case 120: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$1 = _r$21; - _r$22 = strconv.ParseFloat(_arg, _arg$1); /* */ $s = 121; case 121: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple$7 = _r$22; - n$4 = _tuple$7[0]; - err$4 = _tuple$7[1]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil)) || $clone(v, reflect.Value).OverflowFloat(n$4)) { $s = 122; continue; } - /* */ $s = 123; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil)) || $clone(v, reflect.Value).OverflowFloat(n$4)) { */ case 122: - $r = d.saveError(new UnmarshalTypeError.ptr("number " + s$2, $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 124; case 124: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 99; continue; - /* } */ case 123: - $clone(v, reflect.Value).SetFloat(n$4); - $s = 105; continue; - /* } else { */ case 104: - if (($clone(v, reflect.Value).Kind() === 24) && $interfaceIsEqual($clone(v, reflect.Value).Type(), numberType)) { - $clone(v, reflect.Value).SetString(s$2); - /* break; */ $s = 99; continue; - } - /* */ if (fromQuoted) { $s = 125; continue; } - /* */ $s = 126; continue; - /* if (fromQuoted) { */ case 125: - _r$23 = fmt.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v", new sliceType([item, $clone(v, reflect.Value).Type()])); /* */ $s = 127; case 127: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$6 = _r$23; - $s = 128; case 128: return $24r$6; - /* } */ case 126: - $r = d.saveError(new UnmarshalTypeError.ptr("number", $clone(v, reflect.Value).Type(), (new $Int64(0, d.readIndex())), "", "")); /* */ $s = 129; case 129: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 105: - case 99: - /* } */ case 32: - case 27: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.literalStore, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _1, _2, _3, _4, _5, _6, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, b, c, d, err, err$1, err$2, err$3, err$4, fromQuoted, isNull, item, n, n$1, n$2, n$3, n$4, ok, ok$1, pv, s, s$1, s$2, u, ut, v, val, value, $s};return $f; - }; - decodeState.prototype.literalStore = function(item, v, fromQuoted) { return this.$val.literalStore(item, v, fromQuoted); }; - decodeState.ptr.prototype.valueInterface = function() { - var {_1, _r$3, _r$4, _r$5, d, val, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - val = $ifaceNil; - d = this; - _1 = d.opcode; - /* */ if (_1 === (6)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (1)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (6)) { */ case 2: - _r$3 = d.arrayInterface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - val = _r$3; - $r = d.scanNext(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$4 = d.objectInterface(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - val = new mapType(_r$4); - $r = d.scanNext(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - /* } else if (_1 === (1)) { */ case 4: - _r$5 = d.literalInterface(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - val = _r$5; - $s = 6; continue; - /* } else { */ case 5: - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - /* } */ case 6: - case 1: - $s = -1; return val; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.valueInterface, $c: true, $r, _1, _r$3, _r$4, _r$5, d, val, $s};return $f; - }; - decodeState.prototype.valueInterface = function() { return this.$val.valueInterface(); }; - decodeState.ptr.prototype.arrayInterface = function() { - var {_r$3, d, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - v = $makeSlice(sliceType, 0); - /* while (true) { */ case 1: - $r = d.scanWhile(9); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (d.opcode === 8) { - /* break; */ $s = 2; continue; - } - _r$3 = d.valueInterface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = $append(v, _r$3); - /* */ if (d.opcode === 9) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (d.opcode === 9) { */ case 5: - $r = d.scanWhile(9); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - if (d.opcode === 8) { - /* break; */ $s = 2; continue; - } - if (!((d.opcode === 7))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $s = 1; continue; - case 2: - $s = -1; return v; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.arrayInterface, $c: true, $r, _r$3, d, v, $s};return $f; - }; - decodeState.prototype.arrayInterface = function() { return this.$val.arrayInterface(); }; - decodeState.ptr.prototype.objectInterface = function() { - var {_key, _r$3, _tuple, d, item, key, m, ok, start, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - m = {}; - /* while (true) { */ case 1: - $r = d.scanWhile(9); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (d.opcode === 5) { - /* break; */ $s = 2; continue; - } - if (!((d.opcode === 1))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - start = d.readIndex(); - d.rescanLiteral(); - item = $subslice(d.data, start, d.readIndex()); - _tuple = unquote(item); - key = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - /* */ if (d.opcode === 9) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (d.opcode === 9) { */ case 4: - $r = d.scanWhile(9); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - if (!((d.opcode === 3))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $r = d.scanWhile(9); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = d.valueInterface(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _key = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: _r$3 }; - /* */ if (d.opcode === 9) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (d.opcode === 9) { */ case 9: - $r = d.scanWhile(9); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - if (d.opcode === 5) { - /* break; */ $s = 2; continue; - } - if (!((d.opcode === 4))) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $s = 1; continue; - case 2: - $s = -1; return m; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.objectInterface, $c: true, $r, _key, _r$3, _tuple, d, item, key, m, ok, start, $s};return $f; - }; - decodeState.prototype.objectInterface = function() { return this.$val.objectInterface(); }; - decodeState.ptr.prototype.literalInterface = function() { - var {_1, _tuple, _tuple$1, c, d, err, item, n, ok, s, start, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - start = d.readIndex(); - d.rescanLiteral(); - item = $subslice(d.data, start, d.readIndex()); - c = (0 >= item.$length ? ($throwRuntimeError("index out of range"), undefined) : item.$array[item.$offset + 0]); - _1 = c; - /* */ if (_1 === (110)) { $s = 2; continue; } - /* */ if ((_1 === (116)) || (_1 === (102))) { $s = 3; continue; } - /* */ if (_1 === (34)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (110)) { */ case 2: - $s = -1; return $ifaceNil; - /* } else if ((_1 === (116)) || (_1 === (102))) { */ case 3: - $s = -1; return new $Bool((c === 116)); - /* } else if (_1 === (34)) { */ case 4: - _tuple = unquote(item); - s = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - $s = -1; return new $String(s); - /* } else { */ case 5: - if (!((c === 45)) && (c < 48 || c > 57)) { - $panic(new $String("JSON decoder out of sync - data changing underfoot?")); - } - _tuple$1 = d.convertNumber(($bytesToString(item))); - n = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - $r = d.saveError(err); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return n; - /* } */ case 6: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: decodeState.ptr.prototype.literalInterface, $c: true, $r, _1, _tuple, _tuple$1, c, d, err, item, n, ok, s, start, $s};return $f; - }; - decodeState.prototype.literalInterface = function() { return this.$val.literalInterface(); }; - getu4 = function(s) { - var _i, _ref, c, r, s; - if (s.$length < 6 || !(((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 92)) || !(((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 117))) { - return -1; - } - r = 0; - _ref = $subslice(s, 2, 6); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (48 <= c && c <= 57) { - c = c - 48 << 24 >>> 24; - } else if (97 <= c && c <= 102) { - c = (c - 97 << 24 >>> 24) + 10 << 24 >>> 24; - } else if (65 <= c && c <= 70) { - c = (c - 65 << 24 >>> 24) + 10 << 24 >>> 24; - } else { - return -1; - } - r = ($imul(r, 16)) + ((c >> 0)) >> 0; - _i++; - } - return r; - }; - unquote = function(s) { - var _tuple, ok, s, t; - t = ""; - ok = false; - _tuple = unquoteBytes(s); - s = _tuple[0]; - ok = _tuple[1]; - t = ($bytesToString(s)); - return [t, ok]; - }; - unquoteBytes = function(s) { - var _1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, b, c, c$1, dec, nb, ok, r, rr, rr$1, rr$2, rr1, s, size, size$1, t, w, x; - t = sliceType$2.nil; - ok = false; - if (s.$length < 2 || !(((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 34)) || !(((x = s.$length - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === 34))) { - return [t, ok]; - } - s = $subslice(s, 1, (s.$length - 1 >> 0)); - r = 0; - while (true) { - if (!(r < s.$length)) { break; } - c = ((r < 0 || r >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + r]); - if ((c === 92) || (c === 34) || c < 32) { - break; - } - if (c < 128) { - r = r + (1) >> 0; - continue; - } - _tuple = utf8.DecodeRune($subslice(s, r)); - rr = _tuple[0]; - size = _tuple[1]; - if ((rr === 65533) && (size === 1)) { - break; - } - r = r + (size) >> 0; - } - if (r === s.$length) { - _tmp = s; - _tmp$1 = true; - t = _tmp; - ok = _tmp$1; - return [t, ok]; - } - b = $makeSlice(sliceType$2, (s.$length + 8 >> 0)); - w = $copySlice(b, $subslice(s, 0, r)); - while (true) { - if (!(r < s.$length)) { break; } - if (w >= (b.$length - 8 >> 0)) { - nb = $makeSlice(sliceType$2, ($imul(((b.$length + 4 >> 0)), 2))); - $copySlice(nb, $subslice(b, 0, w)); - b = nb; - } - c$1 = ((r < 0 || r >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + r]); - if ((c$1 === 92)) { - r = r + (1) >> 0; - if (r >= s.$length) { - return [t, ok]; - } - switch (0) { default: - _1 = ((r < 0 || r >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + r]); - if ((_1 === (34)) || (_1 === (92)) || (_1 === (47)) || (_1 === (39))) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = ((r < 0 || r >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + r])); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else if (_1 === (98)) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = 8); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else if (_1 === (102)) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = 12); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else if (_1 === (110)) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = 10); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else if (_1 === (114)) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = 13); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else if (_1 === (116)) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = 9); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else if (_1 === (117)) { - r = r - (1) >> 0; - rr$1 = getu4($subslice(s, r)); - if (rr$1 < 0) { - return [t, ok]; - } - r = r + (6) >> 0; - if (utf16.IsSurrogate(rr$1)) { - rr1 = getu4($subslice(s, r)); - dec = utf16.DecodeRune(rr$1, rr1); - if (!((dec === 65533))) { - r = r + (6) >> 0; - w = w + (utf8.EncodeRune($subslice(b, w), dec)) >> 0; - break; - } - rr$1 = 65533; - } - w = w + (utf8.EncodeRune($subslice(b, w), rr$1)) >> 0; - } else { - return [t, ok]; - } - } - } else if (((c$1 === 34)) || (c$1 < 32)) { - return [t, ok]; - } else if (c$1 < 128) { - ((w < 0 || w >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + w] = c$1); - r = r + (1) >> 0; - w = w + (1) >> 0; - } else { - _tuple$1 = utf8.DecodeRune($subslice(s, r)); - rr$2 = _tuple$1[0]; - size$1 = _tuple$1[1]; - r = r + (size$1) >> 0; - w = w + (utf8.EncodeRune($subslice(b, w), rr$2)) >> 0; - } - } - _tmp$2 = $subslice(b, 0, w); - _tmp$3 = true; - t = _tmp$2; - ok = _tmp$3; - return [t, ok]; - }; - tagOptions.methods = [{prop: "Contains", name: "Contains", pkg: "", typ: $funcType([$String], [$Bool], false)}]; - ptrType$13.methods = [{prop: "UseNumber", name: "UseNumber", pkg: "", typ: $funcType([], [], false)}, {prop: "DisallowUnknownFields", name: "DisallowUnknownFields", pkg: "", typ: $funcType([], [], false)}, {prop: "Decode", name: "Decode", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "Buffered", name: "Buffered", pkg: "", typ: $funcType([], [io.Reader], false)}, {prop: "readValue", name: "readValue", pkg: "encoding/json", typ: $funcType([], [$Int, $error], false)}, {prop: "refill", name: "refill", pkg: "encoding/json", typ: $funcType([], [$error], false)}, {prop: "tokenPrepareForDecode", name: "tokenPrepareForDecode", pkg: "encoding/json", typ: $funcType([], [$error], false)}, {prop: "tokenValueAllowed", name: "tokenValueAllowed", pkg: "encoding/json", typ: $funcType([], [$Bool], false)}, {prop: "tokenValueEnd", name: "tokenValueEnd", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "Token", name: "Token", pkg: "", typ: $funcType([], [Token, $error], false)}, {prop: "tokenError", name: "tokenError", pkg: "encoding/json", typ: $funcType([$Uint8], [Token, $error], false)}, {prop: "More", name: "More", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "peek", name: "peek", pkg: "encoding/json", typ: $funcType([], [$Uint8, $error], false)}, {prop: "InputOffset", name: "InputOffset", pkg: "", typ: $funcType([], [$Int64], false)}]; - ptrType$14.methods = [{prop: "Encode", name: "Encode", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "SetIndent", name: "SetIndent", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "SetEscapeHTML", name: "SetEscapeHTML", pkg: "", typ: $funcType([$Bool], [], false)}]; - Delim.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$15.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$8.methods = [{prop: "reset", name: "reset", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "eof", name: "eof", pkg: "encoding/json", typ: $funcType([], [$Int], false)}, {prop: "pushParseState", name: "pushParseState", pkg: "encoding/json", typ: $funcType([$Uint8, $Int, $Int], [$Int], false)}, {prop: "popParseState", name: "popParseState", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "error", name: "error", pkg: "encoding/json", typ: $funcType([$Uint8, $String], [$Int], false)}]; - ptrType$16.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$17.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$19.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$9.methods = [{prop: "marshal", name: "marshal", pkg: "encoding/json", typ: $funcType([$emptyInterface, encOpts], [$error], false)}, {prop: "error", name: "error", pkg: "encoding/json", typ: $funcType([$error], [], false)}, {prop: "reflectValue", name: "reflectValue", pkg: "encoding/json", typ: $funcType([reflect.Value, encOpts], [], false)}, {prop: "string", name: "string", pkg: "encoding/json", typ: $funcType([$String, $Bool], [], false)}, {prop: "stringBytes", name: "stringBytes", pkg: "encoding/json", typ: $funcType([sliceType$2, $Bool], [], false)}]; - floatEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - structEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - mapEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - sliceEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - arrayEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - ptrEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - condAddrEncoder.methods = [{prop: "encode", name: "encode", pkg: "encoding/json", typ: $funcType([ptrType$9, reflect.Value, encOpts], [], false)}]; - ptrType$20.methods = [{prop: "resolve", name: "resolve", pkg: "encoding/json", typ: $funcType([], [$error], false)}]; - byIndex.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; - ptrType$10.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$22.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Number.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64, $error], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64, $error], false)}]; - ptrType$23.methods = [{prop: "unmarshal", name: "unmarshal", pkg: "encoding/json", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "readIndex", name: "readIndex", pkg: "encoding/json", typ: $funcType([], [$Int], false)}, {prop: "init", name: "init", pkg: "encoding/json", typ: $funcType([sliceType$2], [ptrType$23], false)}, {prop: "saveError", name: "saveError", pkg: "encoding/json", typ: $funcType([$error], [], false)}, {prop: "addErrorContext", name: "addErrorContext", pkg: "encoding/json", typ: $funcType([$error], [$error], false)}, {prop: "skip", name: "skip", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "scanNext", name: "scanNext", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "scanWhile", name: "scanWhile", pkg: "encoding/json", typ: $funcType([$Int], [], false)}, {prop: "rescanLiteral", name: "rescanLiteral", pkg: "encoding/json", typ: $funcType([], [], false)}, {prop: "value", name: "value", pkg: "encoding/json", typ: $funcType([reflect.Value], [$error], false)}, {prop: "valueQuoted", name: "valueQuoted", pkg: "encoding/json", typ: $funcType([], [$emptyInterface], false)}, {prop: "array", name: "array", pkg: "encoding/json", typ: $funcType([reflect.Value], [$error], false)}, {prop: "object", name: "object", pkg: "encoding/json", typ: $funcType([reflect.Value], [$error], false)}, {prop: "convertNumber", name: "convertNumber", pkg: "encoding/json", typ: $funcType([$String], [$emptyInterface, $error], false)}, {prop: "literalStore", name: "literalStore", pkg: "encoding/json", typ: $funcType([sliceType$2, reflect.Value, $Bool], [$error], false)}, {prop: "valueInterface", name: "valueInterface", pkg: "encoding/json", typ: $funcType([], [$emptyInterface], false)}, {prop: "arrayInterface", name: "arrayInterface", pkg: "encoding/json", typ: $funcType([], [sliceType], false)}, {prop: "objectInterface", name: "objectInterface", pkg: "encoding/json", typ: $funcType([], [mapType], false)}, {prop: "literalInterface", name: "literalInterface", pkg: "encoding/json", typ: $funcType([], [$emptyInterface], false)}]; - Decoder.init("encoding/json", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "d", name: "d", embedded: false, exported: false, typ: decodeState, tag: ""}, {prop: "scanp", name: "scanp", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scanned", name: "scanned", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "scan", name: "scan", embedded: false, exported: false, typ: scanner, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "tokenState", name: "tokenState", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tokenStack", name: "tokenStack", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - Encoder.init("encoding/json", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "escapeHTML", name: "escapeHTML", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "indentBuf", name: "indentBuf", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "indentPrefix", name: "indentPrefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "indentValue", name: "indentValue", embedded: false, exported: false, typ: $String, tag: ""}]); - Token.init([]); - SyntaxError.init("encoding/json", [{prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Int64, tag: ""}]); - scanner.init("encoding/json", [{prop: "step", name: "step", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "endTop", name: "endTop", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "parseState", name: "parseState", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: $Int64, tag: ""}]); - Marshaler.init([{prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$2, $error], false)}]); - UnsupportedTypeError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}]); - UnsupportedValueError.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: reflect.Value, tag: ""}, {prop: "Str", name: "Str", embedded: false, exported: true, typ: $String, tag: ""}]); - MarshalerError.init("encoding/json", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}, {prop: "sourceFunc", name: "sourceFunc", embedded: false, exported: false, typ: $String, tag: ""}]); - encodeState.init("encoding/json", [{prop: "Buffer", name: "Buffer", embedded: true, exported: true, typ: bytes.Buffer, tag: ""}, {prop: "scratch", name: "scratch", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "ptrLevel", name: "ptrLevel", embedded: false, exported: false, typ: $Uint, tag: ""}, {prop: "ptrSeen", name: "ptrSeen", embedded: false, exported: false, typ: mapType$1, tag: ""}]); - jsonError.init("encoding/json", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); - encOpts.init("encoding/json", [{prop: "quoted", name: "quoted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "escapeHTML", name: "escapeHTML", embedded: false, exported: false, typ: $Bool, tag: ""}]); - encoderFunc.init([ptrType$9, reflect.Value, encOpts], [], false); - structEncoder.init("encoding/json", [{prop: "fields", name: "fields", embedded: false, exported: false, typ: structFields, tag: ""}]); - structFields.init("encoding/json", [{prop: "list", name: "list", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "nameIndex", name: "nameIndex", embedded: false, exported: false, typ: mapType$2, tag: ""}]); - mapEncoder.init("encoding/json", [{prop: "elemEnc", name: "elemEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); - sliceEncoder.init("encoding/json", [{prop: "arrayEnc", name: "arrayEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); - arrayEncoder.init("encoding/json", [{prop: "elemEnc", name: "elemEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); - ptrEncoder.init("encoding/json", [{prop: "elemEnc", name: "elemEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); - condAddrEncoder.init("encoding/json", [{prop: "canAddrEnc", name: "canAddrEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}, {prop: "elseEnc", name: "elseEnc", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); - reflectWithString.init("encoding/json", [{prop: "k", name: "k", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "v", name: "v", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "ks", name: "ks", embedded: false, exported: false, typ: $String, tag: ""}]); - field.init("encoding/json", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "nameBytes", name: "nameBytes", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "equalFold", name: "equalFold", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "nameNonEsc", name: "nameNonEsc", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "nameEscHTML", name: "nameEscHTML", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "omitEmpty", name: "omitEmpty", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "quoted", name: "quoted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "encoder", name: "encoder", embedded: false, exported: false, typ: encoderFunc, tag: ""}]); - byIndex.init(field); - Unmarshaler.init([{prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$2], [$error], false)}]); - UnmarshalTypeError.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "Offset", name: "Offset", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Struct", name: "Struct", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Field", name: "Field", embedded: false, exported: true, typ: $String, tag: ""}]); - InvalidUnmarshalError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}]); - errorContext.init("", [{prop: "Struct", name: "Struct", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "FieldStack", name: "FieldStack", embedded: false, exported: true, typ: sliceType$5, tag: ""}]); - decodeState.init("encoding/json", [{prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "off", name: "off", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "opcode", name: "opcode", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "scan", name: "scan", embedded: false, exported: false, typ: scanner, tag: ""}, {prop: "errorContext", name: "errorContext", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "savedError", name: "savedError", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "useNumber", name: "useNumber", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "disallowUnknownFields", name: "disallowUnknownFields", embedded: false, exported: false, typ: $Bool, tag: ""}]); - unquotedValue.init("", []); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = encoding.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = base64.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nosync.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf16.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - encodeStatePool = new nosync.Pool.ptr(sliceType.nil, $throwNilPointerError); - encoderCache = new nosync.Map.ptr(false); - fieldCache = new nosync.Map.ptr(false); - safeSet = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]); - htmlSafeSet = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]); - scannerPool = new nosync.Pool.ptr(sliceType.nil, (function() { - return new scanner.ptr($throwNilPointerError, false, sliceType$1.nil, $ifaceNil, new $Int64(0, 0)); - })); - hex = "0123456789abcdef"; - _r = reflect.TypeOf((ptrType$1.nil)).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - marshalerType = _r; - _r$1 = reflect.TypeOf((ptrType$2.nil)).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - textMarshalerType = _r$1; - float32Encoder = $methodVal(new floatEncoder(32), "encode"); - float64Encoder = $methodVal(new floatEncoder(64), "encode"); - nullLiteral = (new sliceType$2($stringToBytes("null"))); - _r$2 = reflect.TypeOf((ptrType$3.nil)).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - textUnmarshalerType = _r$2; - numberType = reflect.TypeOf(new Number("")); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/set"] = (function() { - var $pkg = {}, $init, bits; - bits = $packages["math/bits"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bits.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/encoding/prototext"] = (function() { - var $pkg = {}, $init, fmt, protowire, messageset, text, errors, flags, genid, order, pragma, set, strs, proto, protoreflect, protoregistry, strconv, utf8, MarshalOptions, encoder, arrayType, sliceType, sliceType$1, interfaceType, ptrType; - fmt = $packages["fmt"]; - protowire = $packages["google.golang.org/protobuf/encoding/protowire"]; - messageset = $packages["google.golang.org/protobuf/internal/encoding/messageset"]; - text = $packages["google.golang.org/protobuf/internal/encoding/text"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - flags = $packages["google.golang.org/protobuf/internal/flags"]; - genid = $packages["google.golang.org/protobuf/internal/genid"]; - order = $packages["google.golang.org/protobuf/internal/order"]; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - set = $packages["google.golang.org/protobuf/internal/set"]; - strs = $packages["google.golang.org/protobuf/internal/strs"]; - proto = $packages["google.golang.org/protobuf/proto"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoregistry = $packages["google.golang.org/protobuf/reflect/protoregistry"]; - strconv = $packages["strconv"]; - utf8 = $packages["unicode/utf8"]; - MarshalOptions = $pkg.MarshalOptions = $newType(0, $kindStruct, "prototext.MarshalOptions", true, "google.golang.org/protobuf/encoding/prototext", true, function(NoUnkeyedLiterals_, Multiline_, Indent_, EmitASCII_, allowInvalidUTF8_, AllowPartial_, EmitUnknown_, Resolver_) { - this.$val = this; - if (arguments.length === 0) { - this.NoUnkeyedLiterals = new pragma.NoUnkeyedLiterals.ptr(); - this.Multiline = false; - this.Indent = ""; - this.EmitASCII = false; - this.allowInvalidUTF8 = false; - this.AllowPartial = false; - this.EmitUnknown = false; - this.Resolver = $ifaceNil; - return; - } - this.NoUnkeyedLiterals = NoUnkeyedLiterals_; - this.Multiline = Multiline_; - this.Indent = Indent_; - this.EmitASCII = EmitASCII_; - this.allowInvalidUTF8 = allowInvalidUTF8_; - this.AllowPartial = AllowPartial_; - this.EmitUnknown = EmitUnknown_; - this.Resolver = Resolver_; - }); - encoder = $pkg.encoder = $newType(0, $kindStruct, "prototext.encoder", true, "google.golang.org/protobuf/encoding/prototext", false, function(Encoder_, opts_) { - this.$val = this; - if (arguments.length === 0) { - this.Encoder = ptrType.nil; - this.opts = new MarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), false, "", false, false, false, false, $ifaceNil); - return; - } - this.Encoder = Encoder_; - this.opts = opts_; - }); - arrayType = $arrayType($Uint8, 2); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($emptyInterface); - interfaceType = $interfaceType([{prop: "FindExtensionByName", name: "FindExtensionByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.ExtensionType, $error], false)}, {prop: "FindExtensionByNumber", name: "FindExtensionByNumber", pkg: "", typ: $funcType([protoreflect.FullName, protowire.Number], [protoreflect.ExtensionType, $error], false)}, {prop: "FindMessageByName", name: "FindMessageByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.MessageType, $error], false)}, {prop: "FindMessageByURL", name: "FindMessageByURL", pkg: "", typ: $funcType([$String], [protoreflect.MessageType, $error], false)}]); - ptrType = $ptrType(text.Encoder); - MarshalOptions.ptr.prototype.Format = function(m) { - var {_r, _r$1, _r$2, _tuple, _v, b, m, o, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - if ($interfaceIsEqual(m, $ifaceNil)) { _v = true; $s = 3; continue s; } - _r = m.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.IsValid(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return ""; - /* } */ case 2: - o.allowInvalidUTF8 = true; - o.AllowPartial = true; - o.EmitUnknown = true; - _r$2 = $clone(o, MarshalOptions).Marshal(m); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - b = _tuple[0]; - $s = -1; return ($bytesToString(b)); - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.Format, $c: true, $r, _r, _r$1, _r$2, _tuple, _v, b, m, o, $s};return $f; - }; - MarshalOptions.prototype.Format = function(m) { return this.$val.Format(m); }; - MarshalOptions.ptr.prototype.Marshal = function(m) { - var {$24r, _r, m, o, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - _r = $clone(o, MarshalOptions).marshal(m); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.Marshal, $c: true, $r, $24r, _r, m, o, $s};return $f; - }; - MarshalOptions.prototype.Marshal = function(m) { return this.$val.Marshal(m); }; - MarshalOptions.ptr.prototype.marshal = function(m) { - var {$24r, _r, _r$1, _r$2, _r$3, _tuple, delims, enc, err, internalEnc, m, o, out, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - delims = $toNativeArray($kindUint8, [123, 125]); - if (o.Multiline && o.Indent === "") { - o.Indent = " "; - } - if ($interfaceIsEqual(o.Resolver, $ifaceNil)) { - o.Resolver = protoregistry.GlobalTypes; - } - _r = text.NewEncoder(o.Indent, $clone(delims, arrayType), o.EmitASCII); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - internalEnc = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return [new sliceType([]), $ifaceNil]; - } - enc = new encoder.ptr(internalEnc, $clone(o, MarshalOptions)); - _r$1 = m.ProtoReflect(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(enc, encoder).marshalMessage(_r$1, false); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - out = enc.Encoder.Bytes(); - if (o.Indent.length > 0 && out.$length > 0) { - out = $append(out, 10); - } - if (o.AllowPartial) { - $s = -1; return [out, $ifaceNil]; - } - _r$3 = proto.CheckInitialized(m); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [out, _r$3]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: MarshalOptions.ptr.prototype.marshal, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _tuple, delims, enc, err, internalEnc, m, o, out, $s};return $f; - }; - MarshalOptions.prototype.marshal = function(m) { return this.$val.marshal(m); }; - encoder.ptr.prototype.marshalMessage = function(m, inclDelims) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, e, err, inclDelims, m, messageDesc, $s, $deferred, $r, $c} = $restore(this, {m, inclDelims}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - e = [e]; - err = [err]; - e[0] = this; - _r = m.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - messageDesc = _r; - if (!(true)) { _v = false; $s = 4; continue s; } - _r$1 = messageset.IsMessageSet(messageDesc); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 4: - /* */ if (_v) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_v) { */ case 2: - _r$2 = errors.New("no support for proto1 MessageSets", new sliceType$1([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 7; case 7: return $24r; - /* } */ case 3: - /* */ if (inclDelims) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (inclDelims) { */ case 8: - $r = e[0].Encoder.StartMessage(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(e[0].Encoder, "EndMessage"), []]); - /* } */ case 9: - _r$3 = messageDesc.FullName(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 === "google.protobuf.Any") { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$3 === "google.protobuf.Any") { */ case 11: - _r$4 = $clone(e[0], encoder).marshalAny(m); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_r$4) { */ case 14: - $24r$1 = $ifaceNil; - $s = 17; case 17: return $24r$1; - /* } */ case 15: - /* } */ case 12: - err[0] = $ifaceNil; - $r = order.RangeFields(m, order.IndexNameFieldOrder, (function(e, err) { return function $b(fd, v) { - var {_r$5, _r$6, fd, v, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.TextName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(e[0], encoder).marshalField(_r$5, $clone(v, protoreflect.Value), fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err[0] = _r$6; - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return false; - } - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, fd, v, $s};return $f; - }; })(e, err)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 19: - $24r$2 = err[0]; - $s = 21; case 21: return $24r$2; - /* } */ case 20: - /* */ if (e[0].opts.EmitUnknown) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (e[0].opts.EmitUnknown) { */ case 22: - _r$5 = m.GetUnknown(); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = $clone(e[0], encoder).marshalUnknown($convertSliceType(_r$5, sliceType)); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 23: - $24r$3 = $ifaceNil; - $s = 26; case 26: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: encoder.ptr.prototype.marshalMessage, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _v, e, err, inclDelims, m, messageDesc, $s, $deferred};return $f; } } - }; - encoder.prototype.marshalMessage = function(m, inclDelims) { return this.$val.marshalMessage(m, inclDelims); }; - encoder.ptr.prototype.marshalField = function(name, val, fd) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, e, fd, name, val, $s, $r, $c} = $restore(this, {name, val, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = fd.IsList(); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 2; continue; } - _r$1 = fd.IsMap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r) { */ case 2: - _arg = name; - _r$2 = $clone(val, protoreflect.Value).List(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _arg$2 = fd; - _r$3 = $clone(e, encoder).marshalList(_arg, _arg$1, _arg$2); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 10; case 10: return $24r; - /* } else if (_r$1) { */ case 3: - _arg$3 = name; - _r$4 = $clone(val, protoreflect.Value).Map(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$4 = _r$4; - _arg$5 = fd; - _r$5 = $clone(e, encoder).marshalMap(_arg$3, _arg$4, _arg$5); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = _r$5; - $s = 13; case 13: return $24r$1; - /* } else { */ case 4: - $r = e.Encoder.WriteName(name); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = $clone(e, encoder).marshalSingular($clone(val, protoreflect.Value), fd); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$2 = _r$6; - $s = 16; case 16: return $24r$2; - /* } */ case 5: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.marshalField, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, e, fd, name, val, $s};return $f; - }; - encoder.prototype.marshalField = function(name, val, fd) { return this.$val.marshalField(name, val, fd); }; - encoder.ptr.prototype.marshalSingular = function(val, fd) { - var {$24r, $24r$1, _1, _arg, _arg$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, desc, e, fd, kind, num, s, val, $s, $r, $c} = $restore(this, {val, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = fd.Kind(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - kind = _r; - _1 = kind; - /* */ if (_1 === (8)) { $s = 3; continue; } - /* */ if (_1 === (9)) { $s = 4; continue; } - /* */ if ((_1 === (5)) || (_1 === (3)) || (_1 === (17)) || (_1 === (18)) || (_1 === (15)) || (_1 === (16))) { $s = 5; continue; } - /* */ if ((_1 === (13)) || (_1 === (4)) || (_1 === (7)) || (_1 === (6))) { $s = 6; continue; } - /* */ if (_1 === (2)) { $s = 7; continue; } - /* */ if (_1 === (1)) { $s = 8; continue; } - /* */ if (_1 === (12)) { $s = 9; continue; } - /* */ if (_1 === (14)) { $s = 10; continue; } - /* */ if ((_1 === (11)) || (_1 === (10))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_1 === (8)) { */ case 3: - _r$1 = $clone(val, protoreflect.Value).Bool(); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = e.Encoder.WriteBool(_r$1); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (9)) { */ case 4: - _r$2 = $clone(val, protoreflect.Value).String(); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - s = _r$2; - if (!(!e.opts.allowInvalidUTF8)) { _v = false; $s = 19; continue s; } - _r$3 = strs.EnforceUTF8(fd); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3; case 19: - /* */ if (_v && !utf8.ValidString(s)) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_v && !utf8.ValidString(s)) { */ case 17: - _r$4 = fd.FullName(); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = errors.InvalidUTF8((_r$4)); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 23; case 23: return $24r; - /* } */ case 18: - $r = e.Encoder.WriteString(s); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if ((_1 === (5)) || (_1 === (3)) || (_1 === (17)) || (_1 === (18)) || (_1 === (15)) || (_1 === (16))) { */ case 5: - _r$6 = $clone(val, protoreflect.Value).Int(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = e.Encoder.WriteInt(_r$6); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if ((_1 === (13)) || (_1 === (4)) || (_1 === (7)) || (_1 === (6))) { */ case 6: - _r$7 = $clone(val, protoreflect.Value).Uint(); /* */ $s = 27; case 27: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = e.Encoder.WriteUint(_r$7); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (2)) { */ case 7: - _r$8 = $clone(val, protoreflect.Value).Float(); /* */ $s = 29; case 29: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = e.Encoder.WriteFloat(_r$8, 32); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (1)) { */ case 8: - _r$9 = $clone(val, protoreflect.Value).Float(); /* */ $s = 31; case 31: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = e.Encoder.WriteFloat(_r$9, 64); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (12)) { */ case 9: - _r$10 = $clone(val, protoreflect.Value).Bytes(); /* */ $s = 33; case 33: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = e.Encoder.WriteString(($bytesToString(_r$10))); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (14)) { */ case 10: - _r$11 = $clone(val, protoreflect.Value).Enum(); /* */ $s = 35; case 35: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - num = _r$11; - _r$12 = fd.Enum(); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Values(); /* */ $s = 37; case 37: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = _r$13.ByNumber(num); /* */ $s = 38; case 38: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - desc = _r$14; - /* */ if (!($interfaceIsEqual(desc, $ifaceNil))) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (!($interfaceIsEqual(desc, $ifaceNil))) { */ case 39: - _r$15 = desc.Name(); /* */ $s = 42; case 42: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $r = e.Encoder.WriteLiteral((_r$15)); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 41; continue; - /* } else { */ case 40: - $r = e.Encoder.WriteInt((new $Int64(0, num))); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 41: - $s = 13; continue; - /* } else if ((_1 === (11)) || (_1 === (10))) { */ case 11: - _r$16 = $clone(val, protoreflect.Value).Message(); /* */ $s = 45; case 45: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(e, encoder).marshalMessage(_r$16, true); /* */ $s = 46; case 46: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$1 = _r$17; - $s = 47; case 47: return $24r$1; - /* } else { */ case 12: - _r$18 = fd.FullName(); /* */ $s = 48; case 48: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$18); - _arg$1 = new protoreflect.Kind(kind); - _r$19 = fmt.Sprintf("%v has unknown kind: %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 49; case 49: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $panic(new $String(_r$19)); - /* } */ case 13: - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.marshalSingular, $c: true, $r, $24r, $24r$1, _1, _arg, _arg$1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, desc, e, fd, kind, num, s, val, $s};return $f; - }; - encoder.prototype.marshalSingular = function(val, fd) { return this.$val.marshalSingular(val, fd); }; - encoder.ptr.prototype.marshalList = function(name, list, fd) { - var {_r, _r$1, _r$2, e, err, fd, i, list, name, size, $s, $r, $c} = $restore(this, {name, list, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = list.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - size = _r; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < size)) { break; } */ if(!(i < size)) { $s = 3; continue; } - $r = e.Encoder.WriteName(name); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(e, encoder).marshalSingular($clone(_r$1, protoreflect.Value), fd); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = i + (1) >> 0; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.marshalList, $c: true, $r, _r, _r$1, _r$2, e, err, fd, i, list, name, size, $s};return $f; - }; - encoder.prototype.marshalList = function(name, list, fd) { return this.$val.marshalList(name, list, fd); }; - encoder.ptr.prototype.marshalMap = function(name, mmap, fd) { - var {e, err, fd, mmap, name, $s, $r, $c} = $restore(this, {name, mmap, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = [e]; - err = [err]; - fd = [fd]; - name = [name]; - e[0] = this; - err[0] = $ifaceNil; - $r = order.RangeEntries(mmap, order.GenericKeyOrder, (function(e, err, fd, name) { return function $b(key, val) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, key, val, $s, $deferred, $r, $c} = $restore(this, {key, val}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = e[0].Encoder.WriteName(name[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = e[0].Encoder.StartMessage(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(e[0].Encoder, "EndMessage"), []]); - $r = e[0].Encoder.WriteName("key"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _arg = $clone($clone(key, protoreflect.MapKey).Value(), protoreflect.Value); - _r = fd[0].MapKey(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _r$1 = $clone(e[0], encoder).marshalSingular(_arg, _arg$1); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err[0] = _r$1; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 6: - $24r = false; - $s = 8; case 8: return $24r; - /* } */ case 7: - $r = e[0].Encoder.WriteName("value"); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _arg$2 = $clone(val, protoreflect.Value); - _r$2 = fd[0].MapValue(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$3 = _r$2; - _r$3 = $clone(e[0], encoder).marshalSingular(_arg$2, _arg$3); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err[0] = _r$3; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 12: - $24r$1 = false; - $s = 14; case 14: return $24r$1; - /* } */ case 13: - $24r$2 = true; - $s = 15; case 15: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, key, val, $s, $deferred};return $f; } } - }; })(e, err, fd, name)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err[0]; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.marshalMap, $c: true, $r, e, err, fd, mmap, name, $s};return $f; - }; - encoder.prototype.marshalMap = function(name, mmap, fd) { return this.$val.marshalMap(name, mmap, fd); }; - encoder.ptr.prototype.marshalUnknown = function(b) { - var {_1, _r, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, e, n, num, v, v$1, v$2, v$3, v$4, wtype, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - /* while (true) { */ case 1: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 2; continue; } - _tuple = protowire.ConsumeTag(b); - num = _tuple[0]; - wtype = _tuple[1]; - n = _tuple[2]; - b = $subslice(b, n); - $r = e.Encoder.WriteName(strconv.FormatInt((new $Int64(0, num)), 10)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _1 = wtype; - /* */ if (_1 === (0)) { $s = 5; continue; } - /* */ if (_1 === (5)) { $s = 6; continue; } - /* */ if (_1 === (1)) { $s = 7; continue; } - /* */ if (_1 === (2)) { $s = 8; continue; } - /* */ if (_1 === (3)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_1 === (0)) { */ case 5: - v = new $Uint64(0, 0); - _tuple$1 = protowire.ConsumeVarint(b); - v = _tuple$1[0]; - n = _tuple$1[1]; - $r = e.Encoder.WriteUint(v); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else if (_1 === (5)) { */ case 6: - v$1 = 0; - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n = _tuple$2[1]; - $r = e.Encoder.WriteLiteral("0x" + strconv.FormatUint((new $Uint64(0, v$1)), 16)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else if (_1 === (1)) { */ case 7: - v$2 = new $Uint64(0, 0); - _tuple$3 = protowire.ConsumeFixed64(b); - v$2 = _tuple$3[0]; - n = _tuple$3[1]; - $r = e.Encoder.WriteLiteral("0x" + strconv.FormatUint(v$2, 16)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else if (_1 === (2)) { */ case 8: - v$3 = sliceType.nil; - _tuple$4 = protowire.ConsumeBytes(b); - v$3 = _tuple$4[0]; - n = _tuple$4[1]; - $r = e.Encoder.WriteString(($bytesToString(v$3))); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else if (_1 === (3)) { */ case 9: - $r = e.Encoder.StartMessage(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - v$4 = sliceType.nil; - _tuple$5 = protowire.ConsumeGroup(num, b); - v$4 = _tuple$5[0]; - n = _tuple$5[1]; - $r = $clone(e, encoder).marshalUnknown(v$4); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = e.Encoder.EndMessage(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else { */ case 10: - _r = fmt.Sprintf("prototext: error parsing unknown field wire type: %v", new sliceType$1([new protowire.Type(wtype)])); /* */ $s = 19; case 19: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 11: - case 4: - b = $subslice(b, n); - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.marshalUnknown, $c: true, $r, _1, _r, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, e, n, num, v, v$1, v$2, v$3, v$4, wtype, $s};return $f; - }; - encoder.prototype.marshalUnknown = function(b) { return this.$val.marshalUnknown(b); }; - encoder.ptr.prototype.marshalAny = function(any) { - var {_r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, any, e, err, fdType, fdValue, fds, m, mt, pos, typeURL, value, $s, $r, $c} = $restore(this, {any}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = any.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.Fields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - fds = _r$1; - _r$2 = fds.ByNumber(1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - fdType = _r$2; - _r$3 = any.Get(fdType); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(_r$3, protoreflect.Value).String(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - typeURL = _r$4; - _r$5 = e.opts.Resolver.FindMessageByURL(typeURL); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - mt = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - _r$6 = mt.New(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Interface(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - m = _r$7; - _r$8 = fds.ByNumber(2); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - fdValue = _r$8; - _r$9 = any.Get(fdValue); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - value = $clone(_r$9, protoreflect.Value); - _r$10 = $clone(value, protoreflect.Value).Bytes(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = new proto.UnmarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), false, true, false, e.opts.Resolver, 0).Unmarshal(_r$10, m); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err = _r$11; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - pos = $clone(e.Encoder.Snapshot(), text.encoderState); - $r = e.Encoder.WriteName("[" + typeURL + "]"); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$12 = m.ProtoReflect(); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(e, encoder).marshalMessage(_r$12, true); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err = _r$13; - if (!($interfaceIsEqual(err, $ifaceNil))) { - e.Encoder.Reset($clone(pos, text.encoderState)); - $s = -1; return false; - } - $s = -1; return true; - /* */ } return; } var $f = {$blk: encoder.ptr.prototype.marshalAny, $c: true, $r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, any, e, err, fdType, fdValue, fds, m, mt, pos, typeURL, value, $s};return $f; - }; - encoder.prototype.marshalAny = function(any) { return this.$val.marshalAny(any); }; - MarshalOptions.methods = [{prop: "Format", name: "Format", pkg: "", typ: $funcType([protoreflect.ProtoMessage], [$String], false)}, {prop: "Marshal", name: "Marshal", pkg: "", typ: $funcType([protoreflect.ProtoMessage], [sliceType, $error], false)}, {prop: "marshal", name: "marshal", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([protoreflect.ProtoMessage], [sliceType, $error], false)}]; - encoder.methods = [{prop: "marshalMessage", name: "marshalMessage", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([protoreflect.Message, $Bool], [$error], false)}, {prop: "marshalField", name: "marshalField", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([$String, protoreflect.Value, protoreflect.FieldDescriptor], [$error], false)}, {prop: "marshalSingular", name: "marshalSingular", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([protoreflect.Value, protoreflect.FieldDescriptor], [$error], false)}, {prop: "marshalList", name: "marshalList", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([$String, protoreflect.List, protoreflect.FieldDescriptor], [$error], false)}, {prop: "marshalMap", name: "marshalMap", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([$String, protoreflect.Map, protoreflect.FieldDescriptor], [$error], false)}, {prop: "marshalUnknown", name: "marshalUnknown", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([sliceType], [], false)}, {prop: "marshalAny", name: "marshalAny", pkg: "google.golang.org/protobuf/encoding/prototext", typ: $funcType([protoreflect.Message], [$Bool], false)}]; - MarshalOptions.init("google.golang.org/protobuf/encoding/prototext", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Multiline", name: "Multiline", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Indent", name: "Indent", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "EmitASCII", name: "EmitASCII", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "allowInvalidUTF8", name: "allowInvalidUTF8", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "AllowPartial", name: "AllowPartial", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "EmitUnknown", name: "EmitUnknown", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: interfaceType, tag: ""}]); - encoder.init("google.golang.org/protobuf/encoding/prototext", [{prop: "Encoder", name: "Encoder", embedded: true, exported: true, typ: ptrType, tag: ""}, {prop: "opts", name: "opts", embedded: false, exported: false, typ: MarshalOptions, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protowire.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = messageset.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = text.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flags.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = genid.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = order.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pragma.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = set.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strs.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = proto.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoregistry.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/encoding/tag"] = (function() { - var $pkg = {}, $init, defval, filedesc, strs, protoreflect, reflect, strconv, strings, ptrType, funcType, arrayType, sliceType, sliceType$1, byteType, Unmarshal, Marshal; - defval = $packages["google.golang.org/protobuf/internal/encoding/defval"]; - filedesc = $packages["google.golang.org/protobuf/internal/filedesc"]; - strs = $packages["google.golang.org/protobuf/internal/strs"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - reflect = $packages["reflect"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - ptrType = $ptrType(filedesc.File); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($String); - Unmarshal = function(tag, goType, evs) { - var {_1, _2, _3, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _v, ev, evs, f, goType, i, jsonName, n, s, tag, v, $s, $r, $c} = $restore(this, {tag, goType, evs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = new filedesc.Field.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType.nil, $ifaceNil, 0)), new filedesc.FieldL1.ptr($throwNilPointerError, 0, 0, 0, new filedesc.stringName.ptr(false, new $packages["sync"].Once.ptr(0, new $packages["sync"].Mutex.ptr(0, 0)), "", ""), false, false, false, false, false, false, new filedesc.defaultValue.ptr(false, new protoreflect.Value.ptr(arrayType.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), $ifaceNil, sliceType.nil), $ifaceNil, $ifaceNil, $ifaceNil)); - f.Base.L0.ParentFile = filedesc.SurrogateProto2; - /* while (true) { */ case 1: - /* if (!(tag.length > 0)) { break; } */ if(!(tag.length > 0)) { $s = 2; continue; } - i = strings.IndexByte(tag, 44); - if (i < 0) { - i = tag.length; - } - s = $substring(tag, 0, i); - /* */ if (strings.HasPrefix(s, "name=")) { $s = 4; continue; } - /* */ if (strings.Trim(s, "0123456789") === "") { $s = 5; continue; } - /* */ if (s === "opt") { $s = 6; continue; } - /* */ if (s === "req") { $s = 7; continue; } - /* */ if (s === "rep") { $s = 8; continue; } - /* */ if (s === "varint") { $s = 9; continue; } - /* */ if (s === "zigzag32") { $s = 10; continue; } - /* */ if (s === "zigzag64") { $s = 11; continue; } - /* */ if (s === "fixed32") { $s = 12; continue; } - /* */ if (s === "fixed64") { $s = 13; continue; } - /* */ if (s === "bytes") { $s = 14; continue; } - /* */ if (s === "group") { $s = 15; continue; } - /* */ if (strings.HasPrefix(s, "enum=")) { $s = 16; continue; } - /* */ if (strings.HasPrefix(s, "json=")) { $s = 17; continue; } - /* */ if (s === "packed") { $s = 18; continue; } - /* */ if (strings.HasPrefix(s, "weak=")) { $s = 19; continue; } - /* */ if (strings.HasPrefix(s, "def=")) { $s = 20; continue; } - /* */ if (s === "proto3") { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (strings.HasPrefix(s, "name=")) { */ case 4: - f.Base.L0.FullName = ($substring(s, 5)); - $s = 22; continue; - /* } else if (strings.Trim(s, "0123456789") === "") { */ case 5: - _tuple = strconv.ParseUint(s, 10, 32); - n = _tuple[0]; - f.L1.Number = ((n.$low >> 0)); - $s = 22; continue; - /* } else if (s === "opt") { */ case 6: - f.L1.Cardinality = 1; - $s = 22; continue; - /* } else if (s === "req") { */ case 7: - f.L1.Cardinality = 2; - $s = 22; continue; - /* } else if (s === "rep") { */ case 8: - f.L1.Cardinality = 3; - $s = 22; continue; - /* } else if (s === "varint") { */ case 9: - _r = goType.Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _1 = _r; - if (_1 === (1)) { - f.L1.Kind = 8; - } else if (_1 === (5)) { - f.L1.Kind = 5; - } else if (_1 === (6)) { - f.L1.Kind = 3; - } else if (_1 === (10)) { - f.L1.Kind = 13; - } else if (_1 === (11)) { - f.L1.Kind = 4; - } - case 23: - $s = 22; continue; - /* } else if (s === "zigzag32") { */ case 10: - _r$1 = goType.Kind(); /* */ $s = 27; case 27: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1 === 5) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_r$1 === 5) { */ case 25: - f.L1.Kind = 17; - /* } */ case 26: - $s = 22; continue; - /* } else if (s === "zigzag64") { */ case 11: - _r$2 = goType.Kind(); /* */ $s = 30; case 30: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2 === 6) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (_r$2 === 6) { */ case 28: - f.L1.Kind = 18; - /* } */ case 29: - $s = 22; continue; - /* } else if (s === "fixed32") { */ case 12: - _r$3 = goType.Kind(); /* */ $s = 32; case 32: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _2 = _r$3; - if (_2 === (5)) { - f.L1.Kind = 15; - } else if (_2 === (10)) { - f.L1.Kind = 7; - } else if (_2 === (13)) { - f.L1.Kind = 2; - } - case 31: - $s = 22; continue; - /* } else if (s === "fixed64") { */ case 13: - _r$4 = goType.Kind(); /* */ $s = 34; case 34: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _3 = _r$4; - if (_3 === (6)) { - f.L1.Kind = 16; - } else if (_3 === (11)) { - f.L1.Kind = 6; - } else if (_3 === (14)) { - f.L1.Kind = 1; - } - case 33: - $s = 22; continue; - /* } else if (s === "bytes") { */ case 14: - _r$5 = goType.Kind(); /* */ $s = 40; case 40: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if ((_r$5 === 24)) { $s = 36; continue; } - _r$6 = goType.Kind(); /* */ $s = 42; case 42: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - if (!(_r$6 === 23)) { _v = false; $s = 41; continue s; } - _r$7 = goType.Elem(); /* */ $s = 43; case 43: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = $interfaceIsEqual(_r$7, byteType); case 41: - /* */ if (_v) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if ((_r$5 === 24)) { */ case 36: - f.L1.Kind = 9; - $s = 39; continue; - /* } else if (_v) { */ case 37: - f.L1.Kind = 12; - $s = 39; continue; - /* } else { */ case 38: - f.L1.Kind = 11; - /* } */ case 39: - case 35: - $s = 22; continue; - /* } else if (s === "group") { */ case 15: - f.L1.Kind = 10; - $s = 22; continue; - /* } else if (strings.HasPrefix(s, "enum=")) { */ case 16: - f.L1.Kind = 14; - $s = 22; continue; - /* } else if (strings.HasPrefix(s, "json=")) { */ case 17: - jsonName = $substring(s, 5); - if (!(jsonName === strs.JSONCamelCase((new protoreflect.FullName(f.Base.L0.FullName).Name())))) { - f.L1.StringName.InitJSON(jsonName); - } - $s = 22; continue; - /* } else if (s === "packed") { */ case 18: - f.L1.HasPacked = true; - f.L1.IsPacked = true; - $s = 22; continue; - /* } else if (strings.HasPrefix(s, "weak=")) { */ case 19: - f.L1.IsWeak = true; - f.L1.Message = new filedesc.PlaceholderMessage((($substring(s, 5)))); - $s = 22; continue; - /* } else if (strings.HasPrefix(s, "def=")) { */ case 20: - _tmp = $substring(tag, 4); - _tmp$1 = tag.length; - s = _tmp; - i = _tmp$1; - _r$8 = defval.Unmarshal(s, f.L1.Kind, evs, 2); /* */ $s = 44; case 44: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - v = $clone(_tuple$1[0], protoreflect.Value); - ev = _tuple$1[1]; - _r$9 = filedesc.DefaultValue($clone(v, protoreflect.Value), ev); /* */ $s = 45; case 45: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - filedesc.defaultValue.copy(f.L1.Default, _r$9); - $s = 22; continue; - /* } else if (s === "proto3") { */ case 21: - f.Base.L0.ParentFile = filedesc.SurrogateProto3; - /* } */ case 22: - case 3: - tag = strings.TrimPrefix($substring(tag, i), ","); - $s = 1; continue; - case 2: - /* */ if (f.L1.Kind === 10) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (f.L1.Kind === 10) { */ case 46: - _r$10 = strings.ToLower((f.Base.L0.FullName)); /* */ $s = 48; case 48: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - f.Base.L0.FullName = (_r$10); - /* } */ case 47: - $s = -1; return f; - /* */ } return; } var $f = {$blk: Unmarshal, $c: true, $r, _1, _2, _3, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _v, ev, evs, f, goType, i, jsonName, n, s, tag, v, $s};return $f; - }; - $pkg.Unmarshal = Unmarshal; - Marshal = function(fd, enumName) { - var {_1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _v, _v$1, def, enumName, fd, jsonName, name, tag, $s, $r, $c} = $restore(this, {fd, enumName}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - tag = sliceType$1.nil; - _r = fd.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _1 = _r; - if ((_1 === (8)) || (_1 === (14)) || (_1 === (5)) || (_1 === (13)) || (_1 === (3)) || (_1 === (4))) { - tag = $append(tag, "varint"); - } else if (_1 === (17)) { - tag = $append(tag, "zigzag32"); - } else if (_1 === (18)) { - tag = $append(tag, "zigzag64"); - } else if ((_1 === (15)) || (_1 === (7)) || (_1 === (2))) { - tag = $append(tag, "fixed32"); - } else if ((_1 === (16)) || (_1 === (6)) || (_1 === (1))) { - tag = $append(tag, "fixed64"); - } else if ((_1 === (9)) || (_1 === (12)) || (_1 === (11))) { - tag = $append(tag, "bytes"); - } else if (_1 === (10)) { - tag = $append(tag, "group"); - } - case 1: - _r$1 = fd.Number(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = strconv.Itoa(((_r$1 >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - tag = $append(tag, _r$2); - _r$3 = fd.Cardinality(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _2 = _r$3; - if (_2 === (1)) { - tag = $append(tag, "opt"); - } else if (_2 === (2)) { - tag = $append(tag, "req"); - } else if (_2 === (3)) { - tag = $append(tag, "rep"); - } - case 5: - _r$4 = fd.IsPacked(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_r$4) { */ case 7: - tag = $append(tag, "packed"); - /* } */ case 8: - _r$5 = fd.Name(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - name = (_r$5); - _r$6 = fd.Kind(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6 === 10) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$6 === 10) { */ case 11: - _r$7 = fd.Message(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Name(); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - name = (_r$8); - /* } */ case 12: - tag = $append(tag, "name=" + name); - _r$9 = fd.JSONName(); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - jsonName = _r$9; - if (!(!(jsonName === "") && !(jsonName === name))) { _v = false; $s = 19; continue s; } - _r$10 = fd.IsExtension(); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v = !_r$10; case 19: - /* */ if (_v) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_v) { */ case 17: - tag = $append(tag, "json=" + jsonName); - /* } */ case 18: - _r$11 = fd.IsWeak(); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_r$11) { */ case 21: - _r$12 = fd.Message(); /* */ $s = 24; case 24: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.FullName(); /* */ $s = 25; case 25: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - tag = $append(tag, "weak=" + (_r$13)); - /* } */ case 22: - _r$14 = fd.Syntax(); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - if (!(_r$14 === 3)) { _v$1 = false; $s = 28; continue s; } - _r$15 = fd.IsExtension(); /* */ $s = 30; case 30: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _v$1 = !_r$15; case 28: - /* */ if (_v$1) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_v$1) { */ case 26: - tag = $append(tag, "proto3"); - /* } */ case 27: - _r$16 = fd.Kind(); /* */ $s = 33; case 33: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if ((_r$16 === 14) && !(enumName === "")) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if ((_r$16 === 14) && !(enumName === "")) { */ case 31: - tag = $append(tag, "enum=" + enumName); - /* } */ case 32: - _r$17 = fd.ContainingOneof(); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$17, $ifaceNil))) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!($interfaceIsEqual(_r$17, $ifaceNil))) { */ case 34: - tag = $append(tag, "oneof"); - /* } */ case 35: - _r$18 = fd.HasDefault(); /* */ $s = 39; case 39: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - /* */ if (_r$18) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (_r$18) { */ case 37: - _r$19 = fd.Default(); /* */ $s = 40; case 40: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _arg = $clone(_r$19, protoreflect.Value); - _r$20 = fd.DefaultEnumValue(); /* */ $s = 41; case 41: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$1 = _r$20; - _r$21 = fd.Kind(); /* */ $s = 42; case 42: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$2 = _r$21; - _r$22 = defval.Marshal(_arg, _arg$1, _arg$2, 2); /* */ $s = 43; case 43: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple = _r$22; - def = _tuple[0]; - tag = $append(tag, "def=" + def); - /* } */ case 38: - $s = -1; return strings.Join(tag, ","); - /* */ } return; } var $f = {$blk: Marshal, $c: true, $r, _1, _2, _arg, _arg$1, _arg$2, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _v, _v$1, def, enumName, fd, jsonName, name, tag, $s};return $f; - }; - $pkg.Marshal = Marshal; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = defval.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filedesc.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strs.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - byteType = reflect.TypeOf(new $Uint8(0)); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["io/ioutil"] = (function() { - var $pkg = {}, $init, io, fs, os, sort, ReadAll, NopCloser; - io = $packages["io"]; - fs = $packages["io/fs"]; - os = $packages["os"]; - sort = $packages["sort"]; - ReadAll = function(r) { - var {$24r, _r, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = io.ReadAll(r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ReadAll, $c: true, $r, $24r, _r, r, $s};return $f; - }; - $pkg.ReadAll = ReadAll; - NopCloser = function(r) { - var r; - return io.NopCloser(r); - }; - $pkg.NopCloser = NopCloser; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = io.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fs.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Discard = io.Discard; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/impl"] = (function() { - var $pkg = {}, $init, bytes, gzip, binary, json, fmt, prototext, protowire, descopts, detrand, messageset, tag, errors, filedesc, flags, genid, order, pragma, strs, proto, protoreflect, protoregistry, protoiface, crc32, ioutil, math, bits, reflect, sort, strconv, strings, sync, atomic, utf8, weakFields, ValidationStatus, validationInfo, validationType, Pointer, offset, pointer, atomicNilMessage, fieldInfo, oneofInfo, reflectMessageInfo, extensionMap, MessageState, messageState, messageReflectWrapper, messageIfaceWrapper, MessageInfo, exporter, structInfo, mapEntryType, mergeOptions, placeholderEnumValues, legacyMarshaler, legacyUnmarshaler, legacyMerger, aberrantMessageType, aberrantMessage, enumV1, messageV1, resolverOnly, placeholderExtension, legacyEnumType, legacyEnumWrapper, ExtensionInfo, extensionTypeDescriptor, EnumInfo, marshalOptions, unmarshalOptions, unmarshalOutput, mapConverter, mapReflect, listConverter, listPtrConverter, listReflect, unwrapper, Converter, boolConverter, int32Converter, int64Converter, uint32Converter, uint64Converter, float32Converter, float64Converter, stringConverter, bytesConverter, enumConverter, messageConverter, pointerCoderFuncs, valueCoderFuncs, coderMessageInfo, coderFieldInfo, mapInfo, errInvalidUTF8, extensionFieldInfo, lazyExtensionValue, ExtensionField, Export, legacyMessageWrapper, validationState, arrayType, sliceType, ptrType, ptrType$1, ptrType$2, mapType, ptrType$3, mapType$1, structType, structType$1, funcType, structType$2, structType$3, funcType$1, interfaceType, structType$4, structType$5, funcType$2, structType$6, funcType$3, structType$7, structType$8, funcType$4, structType$9, ptrType$4, sliceType$1, ptrType$5, sliceType$2, ptrType$6, ptrType$7, ptrType$8, ptrType$9, sliceType$3, ptrType$10, ptrType$11, ptrType$12, sliceType$4, ptrType$13, ptrType$14, ptrType$15, sliceType$5, ptrType$16, ptrType$17, ptrType$18, sliceType$6, ptrType$19, ptrType$20, ptrType$21, sliceType$7, ptrType$22, ptrType$23, ptrType$24, sliceType$8, ptrType$25, ptrType$26, ptrType$27, sliceType$9, ptrType$28, ptrType$29, ptrType$30, sliceType$10, ptrType$31, ptrType$32, sliceType$11, ptrType$33, ptrType$34, ptrType$35, ptrType$36, sliceType$12, sliceType$13, ptrType$37, ptrType$38, funcType$5, arrayType$1, sliceType$14, sliceType$15, ptrType$39, ptrType$40, interfaceType$1, interfaceType$2, sliceType$16, ptrType$41, sliceType$17, sliceType$18, sliceType$19, ptrType$42, sliceType$20, sliceType$21, sliceType$22, arrayType$2, sliceType$23, sliceType$24, funcType$6, sliceType$25, sliceType$26, sliceType$27, interfaceType$3, ptrType$43, ptrType$44, ptrType$45, ptrType$46, ptrType$47, arrayType$3, arrayType$4, ptrType$48, sliceType$28, arrayType$5, sliceType$29, ptrType$49, ptrType$50, ptrType$51, sliceType$30, ptrType$52, ptrType$53, ptrType$54, structType$10, ptrType$55, funcType$7, funcType$8, funcType$9, funcType$10, funcType$11, funcType$12, funcType$13, mapType$2, mapType$3, mapType$4, funcType$14, funcType$15, funcType$16, funcType$17, arrayType$6, ptrType$56, mapType$5, mapType$6, mapType$7, mapType$8, ptrType$57, ptrType$58, ptrType$59, ptrType$60, funcType$18, ptrType$61, ptrType$62, ptrType$63, ptrType$64, ptrType$65, ptrType$66, ptrType$67, ptrType$68, ptrType$69, ptrType$70, ptrType$71, ptrType$72, funcType$19, funcType$20, funcType$21, funcType$22, funcType$23, funcType$24, funcType$25, funcType$26, funcType$27, funcType$28, mapType$9, ptrType$73, invalidOffset, zeroOffset, nilBytes, emptyBytes, sizecacheType, weakFieldsType, unknownFieldsAType, unknownFieldsBType, extensionFieldsType, legacyMessageTypeCache, legacyMessageDescCache, aberrantMessageDescLock, aberrantMessageDescCache, aberrantProtoMethods, legacyFileDescCache, legacyEnumTypeCache, legacyEnumDescCache, aberrantEnumDescCache, errDecode, errRecursionDepth, lazyUnmarshalOptions, errUnknown, boolType, int32Type, int64Type, uint32Type, uint64Type, float32Type, float64Type, stringType, bytesType, byteType, boolZero, int32Zero, int64Zero, uint32Zero, uint64Zero, float32Zero, float64Zero, stringZero, bytesZero, coderEnum, coderEnumNoZero, coderEnumPtr, coderEnumSlice, coderEnumPackedSlice, coderBool, coderBoolNoZero, coderBoolPtr, coderBoolSlice, coderBoolPackedSlice, coderBoolValue, coderBoolSliceValue, coderBoolPackedSliceValue, coderEnumValue, coderEnumSliceValue, coderEnumPackedSliceValue, coderInt32, coderInt32NoZero, coderInt32Ptr, coderInt32Slice, coderInt32PackedSlice, coderInt32Value, coderInt32SliceValue, coderInt32PackedSliceValue, coderSint32, coderSint32NoZero, coderSint32Ptr, coderSint32Slice, coderSint32PackedSlice, coderSint32Value, coderSint32SliceValue, coderSint32PackedSliceValue, coderUint32, coderUint32NoZero, coderUint32Ptr, coderUint32Slice, coderUint32PackedSlice, coderUint32Value, coderUint32SliceValue, coderUint32PackedSliceValue, coderInt64, coderInt64NoZero, coderInt64Ptr, coderInt64Slice, coderInt64PackedSlice, coderInt64Value, coderInt64SliceValue, coderInt64PackedSliceValue, coderSint64, coderSint64NoZero, coderSint64Ptr, coderSint64Slice, coderSint64PackedSlice, coderSint64Value, coderSint64SliceValue, coderSint64PackedSliceValue, coderUint64, coderUint64NoZero, coderUint64Ptr, coderUint64Slice, coderUint64PackedSlice, coderUint64Value, coderUint64SliceValue, coderUint64PackedSliceValue, coderSfixed32, coderSfixed32NoZero, coderSfixed32Ptr, coderSfixed32Slice, coderSfixed32PackedSlice, coderSfixed32Value, coderSfixed32SliceValue, coderSfixed32PackedSliceValue, coderFixed32, coderFixed32NoZero, coderFixed32Ptr, coderFixed32Slice, coderFixed32PackedSlice, coderFixed32Value, coderFixed32SliceValue, coderFixed32PackedSliceValue, coderFloat, coderFloatNoZero, coderFloatPtr, coderFloatSlice, coderFloatPackedSlice, coderFloatValue, coderFloatSliceValue, coderFloatPackedSliceValue, coderSfixed64, coderSfixed64NoZero, coderSfixed64Ptr, coderSfixed64Slice, coderSfixed64PackedSlice, coderSfixed64Value, coderSfixed64SliceValue, coderSfixed64PackedSliceValue, coderFixed64, coderFixed64NoZero, coderFixed64Ptr, coderFixed64Slice, coderFixed64PackedSlice, coderFixed64Value, coderFixed64SliceValue, coderFixed64PackedSliceValue, coderDouble, coderDoubleNoZero, coderDoublePtr, coderDoubleSlice, coderDoublePackedSlice, coderDoubleValue, coderDoubleSliceValue, coderDoublePackedSliceValue, coderString, coderStringValidateUTF8, coderStringNoZero, coderStringNoZeroValidateUTF8, coderStringPtr, coderStringPtrValidateUTF8, coderStringSlice, coderStringSliceValidateUTF8, coderStringValue, coderStringValueValidateUTF8, coderStringSliceValue, coderBytes, coderBytesValidateUTF8, coderBytesNoZero, coderBytesNoZeroValidateUTF8, coderBytesSlice, coderBytesSliceValidateUTF8, coderBytesValue, coderBytesSliceValue, emptyBuf, wireTypes, coderMessageValue, coderGroupValue, coderMessageSliceValue, coderGroupSliceValue, legacyExtensionFieldInfoCache, needsInitCheckMu, needsInitCheckMap, _r, _r$1, _r$2, _r$3, _r$4, newFieldValidationInfo, newValidationInfo, offsetOf, pointerOfValue, pointerOfIface, fieldInfoForMissing, fieldInfoForOneof, fieldInfoForMap, fieldInfoForList, fieldInfoForScalar, fieldInfoForWeakMessage, fieldInfoForMessage, makeOneofInfo, isZero, getMessageInfo, mergeBool, mergeBoolNoZero, mergeBoolPtr, mergeBoolSlice, mergeInt32, mergeInt32NoZero, mergeInt32Ptr, mergeInt32Slice, mergeUint32, mergeUint32NoZero, mergeUint32Ptr, mergeUint32Slice, mergeInt64, mergeInt64NoZero, mergeInt64Ptr, mergeInt64Slice, mergeUint64, mergeUint64NoZero, mergeUint64Ptr, mergeUint64Slice, mergeFloat32, mergeFloat32NoZero, mergeFloat32Ptr, mergeFloat32Slice, mergeFloat64, mergeFloat64NoZero, mergeFloat64Ptr, mergeFloat64Slice, mergeString, mergeStringNoZero, mergeStringPtr, mergeStringSlice, mergeScalarValue, mergeBytesValue, mergeListValue, mergeBytesListValue, mergeMessageListValue, mergeMessageValue, mergeMessage, mergeMessageSlice, mergeBytes, mergeBytesNoZero, mergeBytesSlice, legacyWrapMessage, legacyLoadMessageType, legacyLoadMessageInfo, LegacyLoadMessageDesc, legacyLoadMessageDesc, aberrantLoadMessageDesc, aberrantLoadMessageDescReentrant, aberrantDeriveMessageName, aberrantAppendField, legacyMarshal, legacyUnmarshal, legacyMerge, legacyLoadFileDesc, legacyEnumName, legacyWrapEnum, legacyLoadEnumType, LegacyLoadEnumDesc, aberrantLoadEnumDesc, AberrantDeriveFullName, InitExtensionInfo, skipExtension, newMapConverter, newListConverter, NewConverter, newSingularConverter, newEnumConverter, newMessageConverter, fieldCoder, encoderFuncsForValue, sizeEnum, appendEnum, consumeEnum, mergeEnum, sizeEnumNoZero, appendEnumNoZero, mergeEnumNoZero, sizeEnumPtr, appendEnumPtr, consumeEnumPtr, mergeEnumPtr, sizeEnumSlice, appendEnumSlice, consumeEnumSlice, mergeEnumSlice, sizeEnumPackedSlice, appendEnumPackedSlice, sizeMessageSet, marshalMessageSet, marshalMessageSetField, unmarshalMessageSet, mapRange, encoderFuncsForMap, sizeMap, consumeMap, consumeMapOfMessage, appendMapItem, appendMap, appendMapDeterministic, isInitMap, mergeMap, mergeMapOfBytes, mergeMapOfMessage, sizeBool, appendBool, consumeBool, sizeBoolNoZero, appendBoolNoZero, sizeBoolPtr, appendBoolPtr, consumeBoolPtr, sizeBoolSlice, appendBoolSlice, consumeBoolSlice, sizeBoolPackedSlice, appendBoolPackedSlice, sizeBoolValue, appendBoolValue, consumeBoolValue, sizeBoolSliceValue, appendBoolSliceValue, consumeBoolSliceValue, sizeBoolPackedSliceValue, appendBoolPackedSliceValue, sizeEnumValue, appendEnumValue, consumeEnumValue, sizeEnumSliceValue, appendEnumSliceValue, consumeEnumSliceValue, sizeEnumPackedSliceValue, appendEnumPackedSliceValue, sizeInt32, appendInt32, consumeInt32, sizeInt32NoZero, appendInt32NoZero, sizeInt32Ptr, appendInt32Ptr, consumeInt32Ptr, sizeInt32Slice, appendInt32Slice, consumeInt32Slice, sizeInt32PackedSlice, appendInt32PackedSlice, sizeInt32Value, appendInt32Value, consumeInt32Value, sizeInt32SliceValue, appendInt32SliceValue, consumeInt32SliceValue, sizeInt32PackedSliceValue, appendInt32PackedSliceValue, sizeSint32, appendSint32, consumeSint32, sizeSint32NoZero, appendSint32NoZero, sizeSint32Ptr, appendSint32Ptr, consumeSint32Ptr, sizeSint32Slice, appendSint32Slice, consumeSint32Slice, sizeSint32PackedSlice, appendSint32PackedSlice, sizeSint32Value, appendSint32Value, consumeSint32Value, sizeSint32SliceValue, appendSint32SliceValue, consumeSint32SliceValue, sizeSint32PackedSliceValue, appendSint32PackedSliceValue, sizeUint32, appendUint32, consumeUint32, sizeUint32NoZero, appendUint32NoZero, sizeUint32Ptr, appendUint32Ptr, consumeUint32Ptr, sizeUint32Slice, appendUint32Slice, consumeUint32Slice, sizeUint32PackedSlice, appendUint32PackedSlice, sizeUint32Value, appendUint32Value, consumeUint32Value, sizeUint32SliceValue, appendUint32SliceValue, consumeUint32SliceValue, sizeUint32PackedSliceValue, appendUint32PackedSliceValue, sizeInt64, appendInt64, consumeInt64, sizeInt64NoZero, appendInt64NoZero, sizeInt64Ptr, appendInt64Ptr, consumeInt64Ptr, sizeInt64Slice, appendInt64Slice, consumeInt64Slice, sizeInt64PackedSlice, appendInt64PackedSlice, sizeInt64Value, appendInt64Value, consumeInt64Value, sizeInt64SliceValue, appendInt64SliceValue, consumeInt64SliceValue, sizeInt64PackedSliceValue, appendInt64PackedSliceValue, sizeSint64, appendSint64, consumeSint64, sizeSint64NoZero, appendSint64NoZero, sizeSint64Ptr, appendSint64Ptr, consumeSint64Ptr, sizeSint64Slice, appendSint64Slice, consumeSint64Slice, sizeSint64PackedSlice, appendSint64PackedSlice, sizeSint64Value, appendSint64Value, consumeSint64Value, sizeSint64SliceValue, appendSint64SliceValue, consumeSint64SliceValue, sizeSint64PackedSliceValue, appendSint64PackedSliceValue, sizeUint64, appendUint64, consumeUint64, sizeUint64NoZero, appendUint64NoZero, sizeUint64Ptr, appendUint64Ptr, consumeUint64Ptr, sizeUint64Slice, appendUint64Slice, consumeUint64Slice, sizeUint64PackedSlice, appendUint64PackedSlice, sizeUint64Value, appendUint64Value, consumeUint64Value, sizeUint64SliceValue, appendUint64SliceValue, consumeUint64SliceValue, sizeUint64PackedSliceValue, appendUint64PackedSliceValue, sizeSfixed32, appendSfixed32, consumeSfixed32, sizeSfixed32NoZero, appendSfixed32NoZero, sizeSfixed32Ptr, appendSfixed32Ptr, consumeSfixed32Ptr, sizeSfixed32Slice, appendSfixed32Slice, consumeSfixed32Slice, sizeSfixed32PackedSlice, appendSfixed32PackedSlice, sizeSfixed32Value, appendSfixed32Value, consumeSfixed32Value, sizeSfixed32SliceValue, appendSfixed32SliceValue, consumeSfixed32SliceValue, sizeSfixed32PackedSliceValue, appendSfixed32PackedSliceValue, sizeFixed32, appendFixed32, consumeFixed32, sizeFixed32NoZero, appendFixed32NoZero, sizeFixed32Ptr, appendFixed32Ptr, consumeFixed32Ptr, sizeFixed32Slice, appendFixed32Slice, consumeFixed32Slice, sizeFixed32PackedSlice, appendFixed32PackedSlice, sizeFixed32Value, appendFixed32Value, consumeFixed32Value, sizeFixed32SliceValue, appendFixed32SliceValue, consumeFixed32SliceValue, sizeFixed32PackedSliceValue, appendFixed32PackedSliceValue, sizeFloat, appendFloat, consumeFloat, sizeFloatNoZero, appendFloatNoZero, sizeFloatPtr, appendFloatPtr, consumeFloatPtr, sizeFloatSlice, appendFloatSlice, consumeFloatSlice, sizeFloatPackedSlice, appendFloatPackedSlice, sizeFloatValue, appendFloatValue, consumeFloatValue, sizeFloatSliceValue, appendFloatSliceValue, consumeFloatSliceValue, sizeFloatPackedSliceValue, appendFloatPackedSliceValue, sizeSfixed64, appendSfixed64, consumeSfixed64, sizeSfixed64NoZero, appendSfixed64NoZero, sizeSfixed64Ptr, appendSfixed64Ptr, consumeSfixed64Ptr, sizeSfixed64Slice, appendSfixed64Slice, consumeSfixed64Slice, sizeSfixed64PackedSlice, appendSfixed64PackedSlice, sizeSfixed64Value, appendSfixed64Value, consumeSfixed64Value, sizeSfixed64SliceValue, appendSfixed64SliceValue, consumeSfixed64SliceValue, sizeSfixed64PackedSliceValue, appendSfixed64PackedSliceValue, sizeFixed64, appendFixed64, consumeFixed64, sizeFixed64NoZero, appendFixed64NoZero, sizeFixed64Ptr, appendFixed64Ptr, consumeFixed64Ptr, sizeFixed64Slice, appendFixed64Slice, consumeFixed64Slice, sizeFixed64PackedSlice, appendFixed64PackedSlice, sizeFixed64Value, appendFixed64Value, consumeFixed64Value, sizeFixed64SliceValue, appendFixed64SliceValue, consumeFixed64SliceValue, sizeFixed64PackedSliceValue, appendFixed64PackedSliceValue, sizeDouble, appendDouble, consumeDouble, sizeDoubleNoZero, appendDoubleNoZero, sizeDoublePtr, appendDoublePtr, consumeDoublePtr, sizeDoubleSlice, appendDoubleSlice, consumeDoubleSlice, sizeDoublePackedSlice, appendDoublePackedSlice, sizeDoubleValue, appendDoubleValue, consumeDoubleValue, sizeDoubleSliceValue, appendDoubleSliceValue, consumeDoubleSliceValue, sizeDoublePackedSliceValue, appendDoublePackedSliceValue, sizeString, appendString, consumeString, appendStringValidateUTF8, consumeStringValidateUTF8, sizeStringNoZero, appendStringNoZero, appendStringNoZeroValidateUTF8, sizeStringPtr, appendStringPtr, consumeStringPtr, appendStringPtrValidateUTF8, consumeStringPtrValidateUTF8, sizeStringSlice, appendStringSlice, consumeStringSlice, appendStringSliceValidateUTF8, consumeStringSliceValidateUTF8, sizeStringValue, appendStringValue, consumeStringValue, appendStringValueValidateUTF8, consumeStringValueValidateUTF8, sizeStringSliceValue, appendStringSliceValue, consumeStringSliceValue, sizeBytes, appendBytes, consumeBytes, appendBytesValidateUTF8, consumeBytesValidateUTF8, sizeBytesNoZero, appendBytesNoZero, consumeBytesNoZero, appendBytesNoZeroValidateUTF8, consumeBytesNoZeroValidateUTF8, sizeBytesSlice, appendBytesSlice, consumeBytesSlice, appendBytesSliceValidateUTF8, consumeBytesSliceValidateUTF8, sizeBytesValue, appendBytesValue, consumeBytesValue, sizeBytesSliceValue, appendBytesSliceValue, consumeBytesSliceValue, makeWeakMessageFieldCoder, makeMessageFieldCoder, sizeMessageInfo, appendMessageInfo, consumeMessageInfo, isInitMessageInfo, sizeMessage, appendMessage, consumeMessage, sizeMessageValue, appendMessageValue, consumeMessageValue, isInitMessageValue, sizeGroupValue, appendGroupValue, consumeGroupValue, makeGroupFieldCoder, sizeGroupType, appendGroupType, consumeGroupType, sizeGroup, appendGroup, consumeGroup, makeMessageSliceFieldCoder, sizeMessageSliceInfo, appendMessageSliceInfo, consumeMessageSliceInfo, isInitMessageSliceInfo, sizeMessageSlice, appendMessageSlice, consumeMessageSlice, isInitMessageSlice, sizeMessageSliceValue, appendMessageSliceValue, consumeMessageSliceValue, isInitMessageSliceValue, sizeGroupSliceValue, appendGroupSliceValue, consumeGroupSliceValue, makeGroupSliceFieldCoder, sizeGroupSlice, appendGroupSlice, consumeGroupSlice, sizeGroupSliceInfo, appendGroupSliceInfo, consumeGroupSliceInfo, asMessage, getExtensionFieldInfo, legacyLoadExtensionFieldInfo, makeExtensionFieldInfo, needsInitCheck, needsInitCheckLocked; - bytes = $packages["bytes"]; - gzip = $packages["compress/gzip"]; - binary = $packages["encoding/binary"]; - json = $packages["encoding/json"]; - fmt = $packages["fmt"]; - prototext = $packages["google.golang.org/protobuf/encoding/prototext"]; - protowire = $packages["google.golang.org/protobuf/encoding/protowire"]; - descopts = $packages["google.golang.org/protobuf/internal/descopts"]; - detrand = $packages["google.golang.org/protobuf/internal/detrand"]; - messageset = $packages["google.golang.org/protobuf/internal/encoding/messageset"]; - tag = $packages["google.golang.org/protobuf/internal/encoding/tag"]; - errors = $packages["google.golang.org/protobuf/internal/errors"]; - filedesc = $packages["google.golang.org/protobuf/internal/filedesc"]; - flags = $packages["google.golang.org/protobuf/internal/flags"]; - genid = $packages["google.golang.org/protobuf/internal/genid"]; - order = $packages["google.golang.org/protobuf/internal/order"]; - pragma = $packages["google.golang.org/protobuf/internal/pragma"]; - strs = $packages["google.golang.org/protobuf/internal/strs"]; - proto = $packages["google.golang.org/protobuf/proto"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoregistry = $packages["google.golang.org/protobuf/reflect/protoregistry"]; - protoiface = $packages["google.golang.org/protobuf/runtime/protoiface"]; - crc32 = $packages["hash/crc32"]; - ioutil = $packages["io/ioutil"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - reflect = $packages["reflect"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - utf8 = $packages["unicode/utf8"]; - weakFields = $pkg.weakFields = $newType(4, $kindMap, "impl.weakFields", true, "google.golang.org/protobuf/internal/impl", false, null); - ValidationStatus = $pkg.ValidationStatus = $newType(4, $kindInt, "impl.ValidationStatus", true, "google.golang.org/protobuf/internal/impl", true, null); - validationInfo = $pkg.validationInfo = $newType(0, $kindStruct, "impl.validationInfo", true, "google.golang.org/protobuf/internal/impl", false, function(mi_, typ_, keyType_, valType_, requiredBit_) { - this.$val = this; - if (arguments.length === 0) { - this.mi = ptrType$5.nil; - this.typ = 0; - this.keyType = 0; - this.valType = 0; - this.requiredBit = new $Uint64(0, 0); - return; - } - this.mi = mi_; - this.typ = typ_; - this.keyType = keyType_; - this.valType = valType_; - this.requiredBit = requiredBit_; - }); - validationType = $pkg.validationType = $newType(1, $kindUint8, "impl.validationType", true, "google.golang.org/protobuf/internal/impl", false, null); - Pointer = $pkg.Pointer = $newType(8, $kindInterface, "impl.Pointer", true, "google.golang.org/protobuf/internal/impl", true, null); - offset = $pkg.offset = $newType(0, $kindStruct, "impl.offset", true, "google.golang.org/protobuf/internal/impl", false, function(index_, export$1_) { - this.$val = this; - if (arguments.length === 0) { - this.index = 0; - this.export$1 = $throwNilPointerError; - return; - } - this.index = index_; - this.export$1 = export$1_; - }); - pointer = $pkg.pointer = $newType(0, $kindStruct, "impl.pointer", true, "google.golang.org/protobuf/internal/impl", false, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - return; - } - this.v = v_; - }); - atomicNilMessage = $pkg.atomicNilMessage = $newType(0, $kindStruct, "impl.atomicNilMessage", true, "google.golang.org/protobuf/internal/impl", false, function(once_, m_) { - this.$val = this; - if (arguments.length === 0) { - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.m = new messageReflectWrapper.ptr(new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)), ptrType$5.nil); - return; - } - this.once = once_; - this.m = m_; - }); - fieldInfo = $pkg.fieldInfo = $newType(0, $kindStruct, "impl.fieldInfo", true, "google.golang.org/protobuf/internal/impl", false, function(fieldDesc_, has_, clear_, get_, set_, mutable_, newMessage_, newField_) { - this.$val = this; - if (arguments.length === 0) { - this.fieldDesc = $ifaceNil; - this.has = $throwNilPointerError; - this.clear = $throwNilPointerError; - this.get = $throwNilPointerError; - this.set = $throwNilPointerError; - this.mutable = $throwNilPointerError; - this.newMessage = $throwNilPointerError; - this.newField = $throwNilPointerError; - return; - } - this.fieldDesc = fieldDesc_; - this.has = has_; - this.clear = clear_; - this.get = get_; - this.set = set_; - this.mutable = mutable_; - this.newMessage = newMessage_; - this.newField = newField_; - }); - oneofInfo = $pkg.oneofInfo = $newType(0, $kindStruct, "impl.oneofInfo", true, "google.golang.org/protobuf/internal/impl", false, function(oneofDesc_, which_) { - this.$val = this; - if (arguments.length === 0) { - this.oneofDesc = $ifaceNil; - this.which = $throwNilPointerError; - return; - } - this.oneofDesc = oneofDesc_; - this.which = which_; - }); - reflectMessageInfo = $pkg.reflectMessageInfo = $newType(0, $kindStruct, "impl.reflectMessageInfo", true, "google.golang.org/protobuf/internal/impl", false, function(fields_, oneofs_, fieldTypes_, denseFields_, rangeInfos_, getUnknown_, setUnknown_, extensionMap_, nilMessage_) { - this.$val = this; - if (arguments.length === 0) { - this.fields = false; - this.oneofs = false; - this.fieldTypes = false; - this.denseFields = sliceType$15.nil; - this.rangeInfos = sliceType$1.nil; - this.getUnknown = $throwNilPointerError; - this.setUnknown = $throwNilPointerError; - this.extensionMap = $throwNilPointerError; - this.nilMessage = new atomicNilMessage.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), new messageReflectWrapper.ptr(new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)), ptrType$5.nil)); - return; - } - this.fields = fields_; - this.oneofs = oneofs_; - this.fieldTypes = fieldTypes_; - this.denseFields = denseFields_; - this.rangeInfos = rangeInfos_; - this.getUnknown = getUnknown_; - this.setUnknown = setUnknown_; - this.extensionMap = extensionMap_; - this.nilMessage = nilMessage_; - }); - extensionMap = $pkg.extensionMap = $newType(4, $kindMap, "impl.extensionMap", true, "google.golang.org/protobuf/internal/impl", false, null); - MessageState = $pkg.MessageState = $newType(0, $kindStruct, "impl.MessageState", true, "google.golang.org/protobuf/internal/impl", true, function(NoUnkeyedLiterals_, DoNotCompare_, DoNotCopy_, atomicMessageInfo_) { - this.$val = this; - if (arguments.length === 0) { - this.NoUnkeyedLiterals = new pragma.NoUnkeyedLiterals.ptr(); - this.DoNotCompare = arrayType$1.zero(); - this.DoNotCopy = arrayType$6.zero(); - this.atomicMessageInfo = ptrType$5.nil; - return; - } - this.NoUnkeyedLiterals = NoUnkeyedLiterals_; - this.DoNotCompare = DoNotCompare_; - this.DoNotCopy = DoNotCopy_; - this.atomicMessageInfo = atomicMessageInfo_; - }); - messageState = $pkg.messageState = $newType(0, $kindStruct, "impl.messageState", true, "google.golang.org/protobuf/internal/impl", false, function(NoUnkeyedLiterals_, DoNotCompare_, DoNotCopy_, atomicMessageInfo_) { - this.$val = this; - if (arguments.length === 0) { - this.NoUnkeyedLiterals = new pragma.NoUnkeyedLiterals.ptr(); - this.DoNotCompare = arrayType$1.zero(); - this.DoNotCopy = arrayType$6.zero(); - this.atomicMessageInfo = ptrType$5.nil; - return; - } - this.NoUnkeyedLiterals = NoUnkeyedLiterals_; - this.DoNotCompare = DoNotCompare_; - this.DoNotCopy = DoNotCopy_; - this.atomicMessageInfo = atomicMessageInfo_; - }); - messageReflectWrapper = $pkg.messageReflectWrapper = $newType(0, $kindStruct, "impl.messageReflectWrapper", true, "google.golang.org/protobuf/internal/impl", false, function(p_, mi_) { - this.$val = this; - if (arguments.length === 0) { - this.p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - this.mi = ptrType$5.nil; - return; - } - this.p = p_; - this.mi = mi_; - }); - messageIfaceWrapper = $pkg.messageIfaceWrapper = $newType(0, $kindStruct, "impl.messageIfaceWrapper", true, "google.golang.org/protobuf/internal/impl", false, function(p_, mi_) { - this.$val = this; - if (arguments.length === 0) { - this.p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - this.mi = ptrType$5.nil; - return; - } - this.p = p_; - this.mi = mi_; - }); - MessageInfo = $pkg.MessageInfo = $newType(0, $kindStruct, "impl.MessageInfo", true, "google.golang.org/protobuf/internal/impl", true, function(GoReflectType_, Desc_, Exporter_, OneofWrappers_, initMu_, initDone_, reflectMessageInfo_, coderMessageInfo_) { - this.$val = this; - if (arguments.length === 0) { - this.GoReflectType = $ifaceNil; - this.Desc = $ifaceNil; - this.Exporter = $throwNilPointerError; - this.OneofWrappers = sliceType$1.nil; - this.initMu = new sync.Mutex.ptr(0, 0); - this.initDone = 0; - this.reflectMessageInfo = new reflectMessageInfo.ptr(false, false, false, sliceType$15.nil, sliceType$1.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, new atomicNilMessage.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), new messageReflectWrapper.ptr(new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)), ptrType$5.nil))); - this.coderMessageInfo = new coderMessageInfo.ptr(new structType$9.ptr(new pragma.NoUnkeyedLiterals.ptr(), new $Uint64(0, 0), $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError), sliceType$16.nil, sliceType$16.nil, false, new offset.ptr(0, $throwNilPointerError), new offset.ptr(0, $throwNilPointerError), false, new offset.ptr(0, $throwNilPointerError), false, false, 0); - return; - } - this.GoReflectType = GoReflectType_; - this.Desc = Desc_; - this.Exporter = Exporter_; - this.OneofWrappers = OneofWrappers_; - this.initMu = initMu_; - this.initDone = initDone_; - this.reflectMessageInfo = reflectMessageInfo_; - this.coderMessageInfo = coderMessageInfo_; - }); - exporter = $pkg.exporter = $newType(4, $kindFunc, "impl.exporter", true, "google.golang.org/protobuf/internal/impl", false, null); - structInfo = $pkg.structInfo = $newType(0, $kindStruct, "impl.structInfo", true, "google.golang.org/protobuf/internal/impl", false, function(sizecacheOffset_, sizecacheType_, weakOffset_, weakType_, unknownOffset_, unknownType_, extensionOffset_, extensionType_, fieldsByNumber_, oneofsByName_, oneofWrappersByType_, oneofWrappersByNumber_) { - this.$val = this; - if (arguments.length === 0) { - this.sizecacheOffset = new offset.ptr(0, $throwNilPointerError); - this.sizecacheType = $ifaceNil; - this.weakOffset = new offset.ptr(0, $throwNilPointerError); - this.weakType = $ifaceNil; - this.unknownOffset = new offset.ptr(0, $throwNilPointerError); - this.unknownType = $ifaceNil; - this.extensionOffset = new offset.ptr(0, $throwNilPointerError); - this.extensionType = $ifaceNil; - this.fieldsByNumber = false; - this.oneofsByName = false; - this.oneofWrappersByType = false; - this.oneofWrappersByNumber = false; - return; - } - this.sizecacheOffset = sizecacheOffset_; - this.sizecacheType = sizecacheType_; - this.weakOffset = weakOffset_; - this.weakType = weakType_; - this.unknownOffset = unknownOffset_; - this.unknownType = unknownType_; - this.extensionOffset = extensionOffset_; - this.extensionType = extensionType_; - this.fieldsByNumber = fieldsByNumber_; - this.oneofsByName = oneofsByName_; - this.oneofWrappersByType = oneofWrappersByType_; - this.oneofWrappersByNumber = oneofWrappersByNumber_; - }); - mapEntryType = $pkg.mapEntryType = $newType(0, $kindStruct, "impl.mapEntryType", true, "google.golang.org/protobuf/internal/impl", false, function(desc_, valType_) { - this.$val = this; - if (arguments.length === 0) { - this.desc = $ifaceNil; - this.valType = $ifaceNil; - return; - } - this.desc = desc_; - this.valType = valType_; - }); - mergeOptions = $pkg.mergeOptions = $newType(0, $kindStruct, "impl.mergeOptions", true, "google.golang.org/protobuf/internal/impl", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - placeholderEnumValues = $pkg.placeholderEnumValues = $newType(0, $kindStruct, "impl.placeholderEnumValues", true, "google.golang.org/protobuf/internal/impl", false, function(EnumValueDescriptors_) { - this.$val = this; - if (arguments.length === 0) { - this.EnumValueDescriptors = $ifaceNil; - return; - } - this.EnumValueDescriptors = EnumValueDescriptors_; - }); - legacyMarshaler = $pkg.legacyMarshaler = $newType(8, $kindInterface, "impl.legacyMarshaler", true, "google.golang.org/protobuf/internal/impl", false, null); - legacyUnmarshaler = $pkg.legacyUnmarshaler = $newType(8, $kindInterface, "impl.legacyUnmarshaler", true, "google.golang.org/protobuf/internal/impl", false, null); - legacyMerger = $pkg.legacyMerger = $newType(8, $kindInterface, "impl.legacyMerger", true, "google.golang.org/protobuf/internal/impl", false, null); - aberrantMessageType = $pkg.aberrantMessageType = $newType(0, $kindStruct, "impl.aberrantMessageType", true, "google.golang.org/protobuf/internal/impl", false, function(t_) { - this.$val = this; - if (arguments.length === 0) { - this.t = $ifaceNil; - return; - } - this.t = t_; - }); - aberrantMessage = $pkg.aberrantMessage = $newType(0, $kindStruct, "impl.aberrantMessage", true, "google.golang.org/protobuf/internal/impl", false, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - return; - } - this.v = v_; - }); - enumV1 = $pkg.enumV1 = $newType(8, $kindInterface, "impl.enumV1", true, "google.golang.org/protobuf/internal/impl", false, null); - messageV1 = $pkg.messageV1 = $newType(8, $kindInterface, "impl.messageV1", true, "google.golang.org/protobuf/internal/impl", false, null); - resolverOnly = $pkg.resolverOnly = $newType(0, $kindStruct, "impl.resolverOnly", true, "google.golang.org/protobuf/internal/impl", false, function(reg_) { - this.$val = this; - if (arguments.length === 0) { - this.reg = ptrType$57.nil; - return; - } - this.reg = reg_; - }); - placeholderExtension = $pkg.placeholderExtension = $newType(0, $kindStruct, "impl.placeholderExtension", true, "google.golang.org/protobuf/internal/impl", false, function(name_, number_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.number = 0; - return; - } - this.name = name_; - this.number = number_; - }); - legacyEnumType = $pkg.legacyEnumType = $newType(0, $kindStruct, "impl.legacyEnumType", true, "google.golang.org/protobuf/internal/impl", false, function(desc_, goType_, m_) { - this.$val = this; - if (arguments.length === 0) { - this.desc = $ifaceNil; - this.goType = $ifaceNil; - this.m = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - return; - } - this.desc = desc_; - this.goType = goType_; - this.m = m_; - }); - legacyEnumWrapper = $pkg.legacyEnumWrapper = $newType(0, $kindStruct, "impl.legacyEnumWrapper", true, "google.golang.org/protobuf/internal/impl", false, function(num_, pbTyp_, goTyp_) { - this.$val = this; - if (arguments.length === 0) { - this.num = 0; - this.pbTyp = $ifaceNil; - this.goTyp = $ifaceNil; - return; - } - this.num = num_; - this.pbTyp = pbTyp_; - this.goTyp = goTyp_; - }); - ExtensionInfo = $pkg.ExtensionInfo = $newType(0, $kindStruct, "impl.ExtensionInfo", true, "google.golang.org/protobuf/internal/impl", true, function(init_, mu_, goType_, desc_, conv_, info_, ExtendedType_, ExtensionType_, Field_, Name_, Tag_, Filename_) { - this.$val = this; - if (arguments.length === 0) { - this.init = 0; - this.mu = new sync.Mutex.ptr(0, 0); - this.goType = $ifaceNil; - this.desc = new extensionTypeDescriptor.ptr($ifaceNil, ptrType$53.nil); - this.conv = $ifaceNil; - this.info = ptrType$54.nil; - this.ExtendedType = $ifaceNil; - this.ExtensionType = $ifaceNil; - this.Field = 0; - this.Name = ""; - this.Tag = ""; - this.Filename = ""; - return; - } - this.init = init_; - this.mu = mu_; - this.goType = goType_; - this.desc = desc_; - this.conv = conv_; - this.info = info_; - this.ExtendedType = ExtendedType_; - this.ExtensionType = ExtensionType_; - this.Field = Field_; - this.Name = Name_; - this.Tag = Tag_; - this.Filename = Filename_; - }); - extensionTypeDescriptor = $pkg.extensionTypeDescriptor = $newType(0, $kindStruct, "impl.extensionTypeDescriptor", true, "google.golang.org/protobuf/internal/impl", false, function(ExtensionDescriptor_, xi_) { - this.$val = this; - if (arguments.length === 0) { - this.ExtensionDescriptor = $ifaceNil; - this.xi = ptrType$53.nil; - return; - } - this.ExtensionDescriptor = ExtensionDescriptor_; - this.xi = xi_; - }); - EnumInfo = $pkg.EnumInfo = $newType(0, $kindStruct, "impl.EnumInfo", true, "google.golang.org/protobuf/internal/impl", true, function(GoReflectType_, Desc_) { - this.$val = this; - if (arguments.length === 0) { - this.GoReflectType = $ifaceNil; - this.Desc = $ifaceNil; - return; - } - this.GoReflectType = GoReflectType_; - this.Desc = Desc_; - }); - marshalOptions = $pkg.marshalOptions = $newType(0, $kindStruct, "impl.marshalOptions", true, "google.golang.org/protobuf/internal/impl", false, function(flags_) { - this.$val = this; - if (arguments.length === 0) { - this.flags = 0; - return; - } - this.flags = flags_; - }); - unmarshalOptions = $pkg.unmarshalOptions = $newType(0, $kindStruct, "impl.unmarshalOptions", true, "google.golang.org/protobuf/internal/impl", false, function(flags_, resolver_, depth_) { - this.$val = this; - if (arguments.length === 0) { - this.flags = 0; - this.resolver = $ifaceNil; - this.depth = 0; - return; - } - this.flags = flags_; - this.resolver = resolver_; - this.depth = depth_; - }); - unmarshalOutput = $pkg.unmarshalOutput = $newType(0, $kindStruct, "impl.unmarshalOutput", true, "google.golang.org/protobuf/internal/impl", false, function(n_, initialized_) { - this.$val = this; - if (arguments.length === 0) { - this.n = 0; - this.initialized = false; - return; - } - this.n = n_; - this.initialized = initialized_; - }); - mapConverter = $pkg.mapConverter = $newType(0, $kindStruct, "impl.mapConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, keyConv_, valConv_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.keyConv = $ifaceNil; - this.valConv = $ifaceNil; - return; - } - this.goType = goType_; - this.keyConv = keyConv_; - this.valConv = valConv_; - }); - mapReflect = $pkg.mapReflect = $newType(0, $kindStruct, "impl.mapReflect", true, "google.golang.org/protobuf/internal/impl", false, function(v_, keyConv_, valConv_) { - this.$val = this; - if (arguments.length === 0) { - this.v = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - this.keyConv = $ifaceNil; - this.valConv = $ifaceNil; - return; - } - this.v = v_; - this.keyConv = keyConv_; - this.valConv = valConv_; - }); - listConverter = $pkg.listConverter = $newType(0, $kindStruct, "impl.listConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, c_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.c = $ifaceNil; - return; - } - this.goType = goType_; - this.c = c_; - }); - listPtrConverter = $pkg.listPtrConverter = $newType(0, $kindStruct, "impl.listPtrConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, c_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.c = $ifaceNil; - return; - } - this.goType = goType_; - this.c = c_; - }); - listReflect = $pkg.listReflect = $newType(0, $kindStruct, "impl.listReflect", true, "google.golang.org/protobuf/internal/impl", false, function(v_, conv_) { - this.$val = this; - if (arguments.length === 0) { - this.v = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - this.conv = $ifaceNil; - return; - } - this.v = v_; - this.conv = conv_; - }); - unwrapper = $pkg.unwrapper = $newType(8, $kindInterface, "impl.unwrapper", true, "google.golang.org/protobuf/internal/impl", false, null); - Converter = $pkg.Converter = $newType(8, $kindInterface, "impl.Converter", true, "google.golang.org/protobuf/internal/impl", true, null); - boolConverter = $pkg.boolConverter = $newType(0, $kindStruct, "impl.boolConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - int32Converter = $pkg.int32Converter = $newType(0, $kindStruct, "impl.int32Converter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - int64Converter = $pkg.int64Converter = $newType(0, $kindStruct, "impl.int64Converter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - uint32Converter = $pkg.uint32Converter = $newType(0, $kindStruct, "impl.uint32Converter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - uint64Converter = $pkg.uint64Converter = $newType(0, $kindStruct, "impl.uint64Converter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - float32Converter = $pkg.float32Converter = $newType(0, $kindStruct, "impl.float32Converter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - float64Converter = $pkg.float64Converter = $newType(0, $kindStruct, "impl.float64Converter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - stringConverter = $pkg.stringConverter = $newType(0, $kindStruct, "impl.stringConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - bytesConverter = $pkg.bytesConverter = $newType(0, $kindStruct, "impl.bytesConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - enumConverter = $pkg.enumConverter = $newType(0, $kindStruct, "impl.enumConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, def_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - return; - } - this.goType = goType_; - this.def = def_; - }); - messageConverter = $pkg.messageConverter = $newType(0, $kindStruct, "impl.messageConverter", true, "google.golang.org/protobuf/internal/impl", false, function(goType_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - return; - } - this.goType = goType_; - }); - pointerCoderFuncs = $pkg.pointerCoderFuncs = $newType(0, $kindStruct, "impl.pointerCoderFuncs", true, "google.golang.org/protobuf/internal/impl", false, function(mi_, size_, marshal_, unmarshal_, isInit_, merge_) { - this.$val = this; - if (arguments.length === 0) { - this.mi = ptrType$5.nil; - this.size = $throwNilPointerError; - this.marshal = $throwNilPointerError; - this.unmarshal = $throwNilPointerError; - this.isInit = $throwNilPointerError; - this.merge = $throwNilPointerError; - return; - } - this.mi = mi_; - this.size = size_; - this.marshal = marshal_; - this.unmarshal = unmarshal_; - this.isInit = isInit_; - this.merge = merge_; - }); - valueCoderFuncs = $pkg.valueCoderFuncs = $newType(0, $kindStruct, "impl.valueCoderFuncs", true, "google.golang.org/protobuf/internal/impl", false, function(size_, marshal_, unmarshal_, isInit_, merge_) { - this.$val = this; - if (arguments.length === 0) { - this.size = $throwNilPointerError; - this.marshal = $throwNilPointerError; - this.unmarshal = $throwNilPointerError; - this.isInit = $throwNilPointerError; - this.merge = $throwNilPointerError; - return; - } - this.size = size_; - this.marshal = marshal_; - this.unmarshal = unmarshal_; - this.isInit = isInit_; - this.merge = merge_; - }); - coderMessageInfo = $pkg.coderMessageInfo = $newType(0, $kindStruct, "impl.coderMessageInfo", true, "google.golang.org/protobuf/internal/impl", false, function(methods_, orderedCoderFields_, denseCoderFields_, coderFields_, sizecacheOffset_, unknownOffset_, unknownPtrKind_, extensionOffset_, needsInitCheck_, isMessageSet_, numRequiredFields_) { - this.$val = this; - if (arguments.length === 0) { - this.methods = new structType$9.ptr(new pragma.NoUnkeyedLiterals.ptr(), new $Uint64(0, 0), $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - this.orderedCoderFields = sliceType$16.nil; - this.denseCoderFields = sliceType$16.nil; - this.coderFields = false; - this.sizecacheOffset = new offset.ptr(0, $throwNilPointerError); - this.unknownOffset = new offset.ptr(0, $throwNilPointerError); - this.unknownPtrKind = false; - this.extensionOffset = new offset.ptr(0, $throwNilPointerError); - this.needsInitCheck = false; - this.isMessageSet = false; - this.numRequiredFields = 0; - return; - } - this.methods = methods_; - this.orderedCoderFields = orderedCoderFields_; - this.denseCoderFields = denseCoderFields_; - this.coderFields = coderFields_; - this.sizecacheOffset = sizecacheOffset_; - this.unknownOffset = unknownOffset_; - this.unknownPtrKind = unknownPtrKind_; - this.extensionOffset = extensionOffset_; - this.needsInitCheck = needsInitCheck_; - this.isMessageSet = isMessageSet_; - this.numRequiredFields = numRequiredFields_; - }); - coderFieldInfo = $pkg.coderFieldInfo = $newType(0, $kindStruct, "impl.coderFieldInfo", true, "google.golang.org/protobuf/internal/impl", false, function(funcs_, mi_, ft_, validation_, num_, offset_, wiretag_, tagsize_, isPointer_, isRequired_) { - this.$val = this; - if (arguments.length === 0) { - this.funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - this.mi = ptrType$5.nil; - this.ft = $ifaceNil; - this.validation = new validationInfo.ptr(ptrType$5.nil, 0, 0, 0, new $Uint64(0, 0)); - this.num = 0; - this.offset = new offset.ptr(0, $throwNilPointerError); - this.wiretag = new $Uint64(0, 0); - this.tagsize = 0; - this.isPointer = false; - this.isRequired = false; - return; - } - this.funcs = funcs_; - this.mi = mi_; - this.ft = ft_; - this.validation = validation_; - this.num = num_; - this.offset = offset_; - this.wiretag = wiretag_; - this.tagsize = tagsize_; - this.isPointer = isPointer_; - this.isRequired = isRequired_; - }); - mapInfo = $pkg.mapInfo = $newType(0, $kindStruct, "impl.mapInfo", true, "google.golang.org/protobuf/internal/impl", false, function(goType_, keyWiretag_, valWiretag_, keyFuncs_, valFuncs_, keyZero_, keyKind_, conv_) { - this.$val = this; - if (arguments.length === 0) { - this.goType = $ifaceNil; - this.keyWiretag = new $Uint64(0, 0); - this.valWiretag = new $Uint64(0, 0); - this.keyFuncs = new valueCoderFuncs.ptr($throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - this.valFuncs = new valueCoderFuncs.ptr($throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - this.keyZero = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - this.keyKind = 0; - this.conv = ptrType$52.nil; - return; - } - this.goType = goType_; - this.keyWiretag = keyWiretag_; - this.valWiretag = valWiretag_; - this.keyFuncs = keyFuncs_; - this.valFuncs = valFuncs_; - this.keyZero = keyZero_; - this.keyKind = keyKind_; - this.conv = conv_; - }); - errInvalidUTF8 = $pkg.errInvalidUTF8 = $newType(0, $kindStruct, "impl.errInvalidUTF8", true, "google.golang.org/protobuf/internal/impl", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - extensionFieldInfo = $pkg.extensionFieldInfo = $newType(0, $kindStruct, "impl.extensionFieldInfo", true, "google.golang.org/protobuf/internal/impl", false, function(wiretag_, tagsize_, unmarshalNeedsValue_, funcs_, validation_) { - this.$val = this; - if (arguments.length === 0) { - this.wiretag = new $Uint64(0, 0); - this.tagsize = 0; - this.unmarshalNeedsValue = false; - this.funcs = new valueCoderFuncs.ptr($throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - this.validation = new validationInfo.ptr(ptrType$5.nil, 0, 0, 0, new $Uint64(0, 0)); - return; - } - this.wiretag = wiretag_; - this.tagsize = tagsize_; - this.unmarshalNeedsValue = unmarshalNeedsValue_; - this.funcs = funcs_; - this.validation = validation_; - }); - lazyExtensionValue = $pkg.lazyExtensionValue = $newType(0, $kindStruct, "impl.lazyExtensionValue", true, "google.golang.org/protobuf/internal/impl", false, function(atomicOnce_, mu_, xi_, value_, b_, fn_) { - this.$val = this; - if (arguments.length === 0) { - this.atomicOnce = 0; - this.mu = new sync.Mutex.ptr(0, 0); - this.xi = ptrType$54.nil; - this.value = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - this.b = sliceType.nil; - this.fn = $throwNilPointerError; - return; - } - this.atomicOnce = atomicOnce_; - this.mu = mu_; - this.xi = xi_; - this.value = value_; - this.b = b_; - this.fn = fn_; - }); - ExtensionField = $pkg.ExtensionField = $newType(0, $kindStruct, "impl.ExtensionField", true, "google.golang.org/protobuf/internal/impl", true, function(typ_, value_, lazy_) { - this.$val = this; - if (arguments.length === 0) { - this.typ = $ifaceNil; - this.value = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - this.lazy = ptrType$40.nil; - return; - } - this.typ = typ_; - this.value = value_; - this.lazy = lazy_; - }); - Export = $pkg.Export = $newType(0, $kindStruct, "impl.Export", true, "google.golang.org/protobuf/internal/impl", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - legacyMessageWrapper = $pkg.legacyMessageWrapper = $newType(0, $kindStruct, "impl.legacyMessageWrapper", true, "google.golang.org/protobuf/internal/impl", false, function(m_) { - this.$val = this; - if (arguments.length === 0) { - this.m = $ifaceNil; - return; - } - this.m = m_; - }); - validationState = $newType(0, $kindStruct, "impl.validationState", true, "google.golang.org/protobuf/internal/impl", false, function(typ_, keyType_, valType_, endGroup_, mi_, tail_, requiredMask_) { - this.$val = this; - if (arguments.length === 0) { - this.typ = 0; - this.keyType = 0; - this.valType = 0; - this.endGroup = 0; - this.mi = ptrType$5.nil; - this.tail = sliceType.nil; - this.requiredMask = new $Uint64(0, 0); - return; - } - this.typ = typ_; - this.keyType = keyType_; - this.valType = valType_; - this.endGroup = endGroup_; - this.mi = mi_; - this.tail = tail_; - this.requiredMask = requiredMask_; - }); - arrayType = $arrayType($Uint8, 0); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(messageState); - ptrType$1 = $ptrType(messageReflectWrapper); - ptrType$2 = $ptrType(messageIfaceWrapper); - mapType = $mapType($Int32, protoreflect.ProtoMessage); - ptrType$3 = $ptrType(sliceType); - mapType$1 = $mapType($Int32, ExtensionField); - structType = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - structType$1 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: $Int, tag: ""}]); - funcType = $funcType([structType], [structType$1], false); - structType$2 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - structType$3 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType, tag: ""}]); - funcType$1 = $funcType([structType$2], [structType$3, $error], false); - interfaceType = $interfaceType([{prop: "FindExtensionByName", name: "FindExtensionByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.ExtensionType, $error], false)}, {prop: "FindExtensionByNumber", name: "FindExtensionByNumber", pkg: "", typ: $funcType([protoreflect.FullName, protowire.Number], [protoreflect.ExtensionType, $error], false)}]); - structType$4 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Buf", name: "Buf", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: interfaceType, tag: ""}, {prop: "Depth", name: "Depth", embedded: false, exported: true, typ: $Int, tag: ""}]); - structType$5 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - funcType$2 = $funcType([structType$4], [structType$5, $error], false); - structType$6 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Source", name: "Source", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}, {prop: "Destination", name: "Destination", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}]); - funcType$3 = $funcType([structType$6], [structType$5], false); - structType$7 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: protoreflect.Message, tag: ""}]); - structType$8 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}]); - funcType$4 = $funcType([structType$7], [structType$8, $error], false); - structType$9 = $structType("", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: $Uint64, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "Marshal", name: "Marshal", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "Unmarshal", name: "Unmarshal", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "Merge", name: "Merge", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "CheckInitialized", name: "CheckInitialized", embedded: false, exported: true, typ: funcType$4, tag: ""}]); - ptrType$4 = $ptrType(legacyEnumWrapper); - sliceType$1 = $sliceType($emptyInterface); - ptrType$5 = $ptrType(MessageInfo); - sliceType$2 = $sliceType(validationState); - ptrType$6 = $ptrType(coderFieldInfo); - ptrType$7 = $ptrType(reflect.rtype); - ptrType$8 = $ptrType($Bool); - ptrType$9 = $ptrType(ptrType$8); - sliceType$3 = $sliceType($Bool); - ptrType$10 = $ptrType(sliceType$3); - ptrType$11 = $ptrType($Int32); - ptrType$12 = $ptrType(ptrType$11); - sliceType$4 = $sliceType($Int32); - ptrType$13 = $ptrType(sliceType$4); - ptrType$14 = $ptrType($Int64); - ptrType$15 = $ptrType(ptrType$14); - sliceType$5 = $sliceType($Int64); - ptrType$16 = $ptrType(sliceType$5); - ptrType$17 = $ptrType($Uint32); - ptrType$18 = $ptrType(ptrType$17); - sliceType$6 = $sliceType($Uint32); - ptrType$19 = $ptrType(sliceType$6); - ptrType$20 = $ptrType($Uint64); - ptrType$21 = $ptrType(ptrType$20); - sliceType$7 = $sliceType($Uint64); - ptrType$22 = $ptrType(sliceType$7); - ptrType$23 = $ptrType($Float32); - ptrType$24 = $ptrType(ptrType$23); - sliceType$8 = $sliceType($Float32); - ptrType$25 = $ptrType(sliceType$8); - ptrType$26 = $ptrType($Float64); - ptrType$27 = $ptrType(ptrType$26); - sliceType$9 = $sliceType($Float64); - ptrType$28 = $ptrType(sliceType$9); - ptrType$29 = $ptrType($String); - ptrType$30 = $ptrType(ptrType$29); - sliceType$10 = $sliceType($String); - ptrType$31 = $ptrType(sliceType$10); - ptrType$32 = $ptrType(ptrType$3); - sliceType$11 = $sliceType(sliceType); - ptrType$33 = $ptrType(sliceType$11); - ptrType$34 = $ptrType(weakFields); - ptrType$35 = $ptrType(mapType); - ptrType$36 = $ptrType(mapType$1); - sliceType$12 = $sliceType(pointer); - sliceType$13 = $sliceType(reflect.Value); - ptrType$37 = $ptrType(fieldInfo); - ptrType$38 = $ptrType(oneofInfo); - funcType$5 = $funcType([], [], false); - arrayType$1 = $arrayType(funcType$5, 0); - sliceType$14 = $sliceType($Int); - sliceType$15 = $sliceType(ptrType$37); - ptrType$39 = $ptrType(extensionMap); - ptrType$40 = $ptrType(lazyExtensionValue); - interfaceType$1 = $interfaceType([{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}]); - interfaceType$2 = $interfaceType([{prop: "ProtoMessageInfo", name: "ProtoMessageInfo", pkg: "", typ: $funcType([], [ptrType$5], false)}]); - sliceType$16 = $sliceType(ptrType$6); - ptrType$41 = $ptrType(filedesc.File); - sliceType$17 = $sliceType(filedesc.Enum); - sliceType$18 = $sliceType(filedesc.Message); - sliceType$19 = $sliceType(filedesc.Extension); - ptrType$42 = $ptrType(filedesc.MessageL2); - sliceType$20 = $sliceType(filedesc.Field); - sliceType$21 = $sliceType(filedesc.Oneof); - sliceType$22 = $sliceType(protoreflect.Name); - arrayType$2 = $arrayType(protowire.Number, 2); - sliceType$23 = $sliceType(arrayType$2); - sliceType$24 = $sliceType(protowire.Number); - funcType$6 = $funcType([], [protoreflect.ProtoMessage], false); - sliceType$25 = $sliceType(funcType$6); - sliceType$26 = $sliceType(reflect.Type); - sliceType$27 = $sliceType(protoreflect.FieldDescriptor); - interfaceType$3 = $interfaceType([{prop: "XXX_MessageName", name: "XXX_MessageName", pkg: "", typ: $funcType([], [$String], false)}]); - ptrType$43 = $ptrType(filedesc.Field); - ptrType$44 = $ptrType($Uint8); - ptrType$45 = $ptrType(filedesc.ExtensionL2); - ptrType$46 = $ptrType(protoreflect.Name); - ptrType$47 = $ptrType(protoreflect.EnumNumber); - arrayType$3 = $arrayType($Uint8, 5); - arrayType$4 = $arrayType($Uint8, 8); - ptrType$48 = $ptrType(filedesc.EnumL2); - sliceType$28 = $sliceType(filedesc.EnumValue); - arrayType$5 = $arrayType(protoreflect.EnumNumber, 2); - sliceType$29 = $sliceType(arrayType$5); - ptrType$49 = $ptrType(mapReflect); - ptrType$50 = $ptrType(messageConverter); - ptrType$51 = $ptrType(listReflect); - sliceType$30 = $sliceType(coderFieldInfo); - ptrType$52 = $ptrType(mapConverter); - ptrType$53 = $ptrType(ExtensionInfo); - ptrType$54 = $ptrType(extensionFieldInfo); - structType$10 = $structType("", []); - ptrType$55 = $ptrType(atomicNilMessage); - funcType$7 = $funcType([pointer], [$Bool], false); - funcType$8 = $funcType([pointer], [], false); - funcType$9 = $funcType([pointer], [protoreflect.Value], false); - funcType$10 = $funcType([pointer, protoreflect.Value], [], false); - funcType$11 = $funcType([], [protoreflect.Message], false); - funcType$12 = $funcType([], [protoreflect.Value], false); - funcType$13 = $funcType([pointer], [protowire.Number], false); - mapType$2 = $mapType(protowire.Number, ptrType$37); - mapType$3 = $mapType(protoreflect.Name, ptrType$38); - mapType$4 = $mapType(protowire.Number, $emptyInterface); - funcType$14 = $funcType([pointer], [protoreflect.RawFields], false); - funcType$15 = $funcType([pointer, protoreflect.RawFields], [], false); - funcType$16 = $funcType([pointer], [ptrType$39], false); - funcType$17 = $funcType([protoreflect.FieldDescriptor, protoreflect.Value], [$Bool], false); - arrayType$6 = $arrayType(sync.Mutex, 0); - ptrType$56 = $ptrType(structType$9); - mapType$5 = $mapType(protowire.Number, reflect.StructField); - mapType$6 = $mapType(protoreflect.Name, reflect.StructField); - mapType$7 = $mapType(reflect.Type, protowire.Number); - mapType$8 = $mapType(protowire.Number, reflect.Type); - ptrType$57 = $ptrType(protoregistry.Files); - ptrType$58 = $ptrType(legacyEnumType); - ptrType$59 = $ptrType(extensionTypeDescriptor); - ptrType$60 = $ptrType(EnumInfo); - funcType$18 = $funcType([protoreflect.MapKey, protoreflect.Value], [$Bool], false); - ptrType$61 = $ptrType(listConverter); - ptrType$62 = $ptrType(listPtrConverter); - ptrType$63 = $ptrType(boolConverter); - ptrType$64 = $ptrType(int32Converter); - ptrType$65 = $ptrType(int64Converter); - ptrType$66 = $ptrType(uint32Converter); - ptrType$67 = $ptrType(uint64Converter); - ptrType$68 = $ptrType(float32Converter); - ptrType$69 = $ptrType(float64Converter); - ptrType$70 = $ptrType(stringConverter); - ptrType$71 = $ptrType(bytesConverter); - ptrType$72 = $ptrType(enumConverter); - funcType$19 = $funcType([pointer, ptrType$6, marshalOptions], [$Int], false); - funcType$20 = $funcType([sliceType, pointer, ptrType$6, marshalOptions], [sliceType, $error], false); - funcType$21 = $funcType([sliceType, pointer, protowire.Type, ptrType$6, unmarshalOptions], [unmarshalOutput, $error], false); - funcType$22 = $funcType([pointer, ptrType$6], [$error], false); - funcType$23 = $funcType([pointer, pointer, ptrType$6, mergeOptions], [], false); - funcType$24 = $funcType([protoreflect.Value, $Int, marshalOptions], [$Int], false); - funcType$25 = $funcType([sliceType, protoreflect.Value, $Uint64, marshalOptions], [sliceType, $error], false); - funcType$26 = $funcType([sliceType, protoreflect.Value, protowire.Number, protowire.Type, unmarshalOptions], [protoreflect.Value, unmarshalOutput, $error], false); - funcType$27 = $funcType([protoreflect.Value], [$error], false); - funcType$28 = $funcType([protoreflect.Value, protoreflect.Value, mergeOptions], [protoreflect.Value], false); - mapType$9 = $mapType(protowire.Number, ptrType$6); - ptrType$73 = $ptrType(ExtensionField); - weakFields.prototype.get = function(num) { - var _entry, _tuple, m, num, ok, w; - w = this.$val; - _tuple = (_entry = w[$Int32.keyFor(((num >> 0)))], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - m = _tuple[0]; - ok = _tuple[1]; - return [m, ok]; - }; - $ptrType(weakFields).prototype.get = function(num) { return new weakFields(this.$get()).get(num); }; - $ptrType(weakFields).prototype.set = function(num, m) { - var _key, m, num, w; - w = this; - if (w.$get() === false) { - w.$set({}); - } - _key = ((num >> 0)); (w.$get() || $throwRuntimeError("assignment to entry in nil map"))[$Int32.keyFor(_key)] = { k: _key, v: m }; - }; - $ptrType(weakFields).prototype.clear = function(num) { - var num, w; - w = this; - delete w.$get()[$Int32.keyFor(((num >> 0)))]; - }; - Export.ptr.prototype.HasWeak = function(w, num) { - var _entry, _tuple, num, ok, w; - _tuple = (_entry = w[$Int32.keyFor(((num >> 0)))], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - ok = _tuple[1]; - return ok; - }; - Export.prototype.HasWeak = function(w, num) { return this.$val.HasWeak(w, num); }; - Export.ptr.prototype.ClearWeak = function(w, num) { - var num, w; - delete w.$get()[$Int32.keyFor(((num >> 0)))]; - }; - Export.prototype.ClearWeak = function(w, num) { return this.$val.ClearWeak(w, num); }; - Export.ptr.prototype.GetWeak = function(w, num, name) { - var {$24r, _entry, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, m, mt, name, num, ok, w, $s, $r, $c} = $restore(this, {w, num, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = (_entry = w[$Int32.keyFor(((num >> 0)))], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - m = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return m; - } - _r$5 = protoregistry.GlobalTypes.FindMessageByName(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - mt = _tuple$1[0]; - /* */ if ($interfaceIsEqual(mt, $ifaceNil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($interfaceIsEqual(mt, $ifaceNil)) { */ case 2: - _r$6 = fmt.Sprintf("message %v for weak field is not linked in", new sliceType$1([new protoreflect.FullName(name)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String(_r$6)); - /* } */ case 3: - _r$7 = mt.Zero(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Interface(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.GetWeak, $c: true, $r, $24r, _entry, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, m, mt, name, num, ok, w, $s};return $f; - }; - Export.prototype.GetWeak = function(w, num, name) { return this.$val.GetWeak(w, num, name); }; - Export.ptr.prototype.SetWeak = function(w, num, name, m) { - var {_arg, _arg$1, _key, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _v, m, mt, name, num, w, $s, $r, $c} = $restore(this, {w, num, name, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!($interfaceIsEqual(m, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(m, $ifaceNil))) { */ case 1: - _r$5 = protoregistry.GlobalTypes.FindMessageByName(name); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - mt = _tuple[0]; - /* */ if ($interfaceIsEqual(mt, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(mt, $ifaceNil)) { */ case 4: - _r$6 = fmt.Sprintf("message %v for weak field is not linked in", new sliceType$1([new protoreflect.FullName(name)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String(_r$6)); - /* } */ case 5: - _r$7 = m.ProtoReflect(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Type(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(mt, _r$8))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(mt, _r$8))) { */ case 7: - _arg = m; - _r$9 = mt.Zero(); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Interface(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = _r$10; - _r$11 = fmt.Sprintf("invalid message type for weak field: got %T, want %T", new sliceType$1([_arg, _arg$1])); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $panic(new $String(_r$11)); - /* } */ case 8: - /* } */ case 2: - if ($interfaceIsEqual(m, $ifaceNil)) { _v = true; $s = 16; continue s; } - _r$12 = m.ProtoReflect(); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.IsValid(); /* */ $s = 18; case 18: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _v = !_r$13; case 16: - /* */ if (_v) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_v) { */ case 14: - delete w.$get()[$Int32.keyFor(((num >> 0)))]; - $s = -1; return; - /* } */ case 15: - if (w.$get() === false) { - w.$set({}); - } - _key = ((num >> 0)); (w.$get() || $throwRuntimeError("assignment to entry in nil map"))[$Int32.keyFor(_key)] = { k: _key, v: m }; - $s = -1; return; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.SetWeak, $c: true, $r, _arg, _arg$1, _key, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _v, m, mt, name, num, w, $s};return $f; - }; - Export.prototype.SetWeak = function(w, num, name, m) { return this.$val.SetWeak(w, num, name, m); }; - ValidationStatus.prototype.String = function() { - var {$24r, _1, _r$5, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this.$val; - _1 = v; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return "ValidationUnknown"; - /* } else if (_1 === (2)) { */ case 3: - $s = -1; return "ValidationInvalid"; - /* } else if (_1 === (3)) { */ case 4: - $s = -1; return "ValidationValid"; - /* } else { */ case 5: - _r$5 = fmt.Sprintf("ValidationStatus(%d)", new sliceType$1([new $Int(((v >> 0)))])); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: ValidationStatus.prototype.String, $c: true, $r, $24r, _1, _r$5, v, $s};return $f; - }; - $ptrType(ValidationStatus).prototype.String = function() { return new ValidationStatus(this.$get()).String(); }; - newFieldValidationInfo = function(mi, si, fd, ft) { - var {_1, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _v, fd, ft, mi, ok, ok$1, ot, ot$1, si, vi, $s, $r, $c} = $restore(this, {mi, si, fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vi = new validationInfo.ptr(ptrType$5.nil, 0, 0, 0, new $Uint64(0, 0)); - _r$5 = fd.ContainingOneof(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(!($interfaceIsEqual(_r$5, $ifaceNil)))) { _v = false; $s = 5; continue s; } - _r$6 = fd.ContainingOneof(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.IsSynthetic(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !_r$7; case 5: - /* */ if (_v) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_v) { */ case 2: - _r$8 = fd.Kind(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _1 = _r$8; - /* */ if (_1 === (11)) { $s = 11; continue; } - /* */ if (_1 === (10)) { $s = 12; continue; } - /* */ if (_1 === (9)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_1 === (11)) { */ case 11: - vi.typ = 1; - _r$9 = fd.Number(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = (_entry = si.oneofWrappersByNumber[protowire.Number.keyFor(_r$9)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - ot = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (ok) { */ case 16: - _r$10 = ot.Field(0); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = getMessageInfo(_r$10.Type); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - vi.mi = _r$11; - /* } */ case 17: - $s = 14; continue; - /* } else if (_1 === (10)) { */ case 12: - vi.typ = 2; - _r$12 = fd.Number(); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$1 = (_entry$1 = si.oneofWrappersByNumber[protowire.Number.keyFor(_r$12)], _entry$1 !== undefined ? [_entry$1.v, true] : [$ifaceNil, false]); - ot$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (ok$1) { */ case 21: - _r$13 = ot$1.Field(0); /* */ $s = 23; case 23: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = getMessageInfo(_r$13.Type); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - vi.mi = _r$14; - /* } */ case 22: - $s = 14; continue; - /* } else if (_1 === (9)) { */ case 13: - _r$15 = strs.EnforceUTF8(fd); /* */ $s = 27; case 27: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - /* */ if (_r$15) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_r$15) { */ case 25: - vi.typ = 11; - /* } */ case 26: - /* } */ case 14: - case 9: - $s = 4; continue; - /* } else { */ case 3: - _r$16 = newValidationInfo(fd, ft); /* */ $s = 28; case 28: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - validationInfo.copy(vi, _r$16); - /* } */ case 4: - case 1: - _r$17 = fd.Cardinality(); /* */ $s = 31; case 31: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (_r$17 === 2) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_r$17 === 2) { */ case 29: - if (mi.coderMessageInfo.numRequiredFields < 255) { - mi.coderMessageInfo.numRequiredFields = mi.coderMessageInfo.numRequiredFields + (1) << 24 >>> 24; - vi.requiredBit = $shiftLeft64(new $Uint64(0, 1), ((mi.coderMessageInfo.numRequiredFields - 1 << 24 >>> 24))); - } - /* } */ case 30: - $s = -1; return vi; - /* */ } return; } var $f = {$blk: newFieldValidationInfo, $c: true, $r, _1, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _v, fd, ft, mi, ok, ok$1, ot, ot$1, si, vi, $s};return $f; - }; - newValidationInfo = function(fd, ft) { - var {_1, _2, _3, _4, _5, _6, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$5, _r$6, _r$7, _r$8, _r$9, fd, ft, vi, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vi = new validationInfo.ptr(ptrType$5.nil, 0, 0, 0, new $Uint64(0, 0)); - _r$5 = fd.IsList(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 2; continue; } - _r$6 = fd.IsMap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$5) { */ case 2: - _r$7 = fd.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _1 = _r$7; - /* */ if (_1 === (11)) { $s = 10; continue; } - /* */ if (_1 === (10)) { $s = 11; continue; } - /* */ if (_1 === (9)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_1 === (11)) { */ case 10: - vi.typ = 1; - _r$8 = ft.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8 === 23) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_r$8 === 23) { */ case 15: - _r$9 = ft.Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = getMessageInfo(_r$9); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - vi.mi = _r$10; - /* } */ case 16: - $s = 14; continue; - /* } else if (_1 === (10)) { */ case 11: - vi.typ = 2; - _r$11 = ft.Kind(); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11 === 23) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_r$11 === 23) { */ case 20: - _r$12 = ft.Elem(); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = getMessageInfo(_r$12); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - vi.mi = _r$13; - /* } */ case 21: - $s = 14; continue; - /* } else if (_1 === (9)) { */ case 12: - vi.typ = 10; - _r$14 = strs.EnforceUTF8(fd); /* */ $s = 27; case 27: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (_r$14) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_r$14) { */ case 25: - vi.typ = 11; - /* } */ case 26: - $s = 14; continue; - /* } else { */ case 13: - _r$15 = fd.Kind(); /* */ $s = 29; case 29: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _2 = (_entry = wireTypes[protoreflect.Kind.keyFor(_r$15)], _entry !== undefined ? _entry.v : 0); - if (_2 === (0)) { - vi.typ = 4; - } else if (_2 === (5)) { - vi.typ = 5; - } else if (_2 === (1)) { - vi.typ = 6; - } - case 28: - /* } */ case 14: - case 8: - $s = 5; continue; - /* } else if (_r$6) { */ case 3: - vi.typ = 3; - _r$16 = fd.MapKey(); /* */ $s = 31; case 31: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.Kind(); /* */ $s = 32; case 32: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _3 = _r$17; - /* */ if (_3 === (9)) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (_3 === (9)) { */ case 33: - _r$18 = strs.EnforceUTF8(fd); /* */ $s = 37; case 37: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - /* */ if (_r$18) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (_r$18) { */ case 35: - vi.keyType = 11; - /* } */ case 36: - /* } */ case 34: - case 30: - _r$19 = fd.MapValue(); /* */ $s = 39; case 39: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.Kind(); /* */ $s = 40; case 40: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _4 = _r$20; - /* */ if (_4 === (11)) { $s = 41; continue; } - /* */ if (_4 === (9)) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (_4 === (11)) { */ case 41: - vi.valType = 1; - _r$21 = ft.Kind(); /* */ $s = 46; case 46: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - /* */ if (_r$21 === 21) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (_r$21 === 21) { */ case 44: - _r$22 = ft.Elem(); /* */ $s = 47; case 47: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = getMessageInfo(_r$22); /* */ $s = 48; case 48: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - vi.mi = _r$23; - /* } */ case 45: - $s = 43; continue; - /* } else if (_4 === (9)) { */ case 42: - _r$24 = strs.EnforceUTF8(fd); /* */ $s = 51; case 51: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - /* */ if (_r$24) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (_r$24) { */ case 49: - vi.valType = 11; - /* } */ case 50: - /* } */ case 43: - case 38: - $s = 5; continue; - /* } else { */ case 4: - _r$25 = fd.Kind(); /* */ $s = 53; case 53: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _5 = _r$25; - /* */ if (_5 === (11)) { $s = 54; continue; } - /* */ if (_5 === (10)) { $s = 55; continue; } - /* */ if (_5 === (9)) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (_5 === (11)) { */ case 54: - vi.typ = 1; - _r$26 = fd.IsWeak(); /* */ $s = 61; case 61: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - /* */ if (!_r$26) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (!_r$26) { */ case 59: - _r$27 = getMessageInfo(ft); /* */ $s = 62; case 62: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - vi.mi = _r$27; - /* } */ case 60: - $s = 58; continue; - /* } else if (_5 === (10)) { */ case 55: - vi.typ = 2; - _r$28 = getMessageInfo(ft); /* */ $s = 63; case 63: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - vi.mi = _r$28; - $s = 58; continue; - /* } else if (_5 === (9)) { */ case 56: - vi.typ = 10; - _r$29 = strs.EnforceUTF8(fd); /* */ $s = 66; case 66: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - /* */ if (_r$29) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (_r$29) { */ case 64: - vi.typ = 11; - /* } */ case 65: - $s = 58; continue; - /* } else { */ case 57: - _r$30 = fd.Kind(); /* */ $s = 68; case 68: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _6 = (_entry$1 = wireTypes[protoreflect.Kind.keyFor(_r$30)], _entry$1 !== undefined ? _entry$1.v : 0); - if (_6 === (0)) { - vi.typ = 7; - } else if (_6 === (5)) { - vi.typ = 8; - } else if (_6 === (1)) { - vi.typ = 9; - } else if (_6 === (2)) { - vi.typ = 10; - } - case 67: - /* } */ case 58: - case 52: - /* } */ case 5: - case 1: - $s = -1; return vi; - /* */ } return; } var $f = {$blk: newValidationInfo, $c: true, $r, _1, _2, _3, _4, _5, _6, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$5, _r$6, _r$7, _r$8, _r$9, fd, ft, vi, $s};return $f; - }; - MessageInfo.ptr.prototype.validate = function(b, groupTag, opts) { - var {_1, _2, _3, _4, _5, _6, _7, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _v, b, err, err$1, err$2, f, fd, groupTag, initialized, messageName, messageType, mi, n, n$1, n$2, n$3, n$4, n$5, num, numRequiredFields, ok, opts, out, result, size, st, start, states, tag$1, typeid, v, v$1, vi, wtyp, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xt, xt$1, xvi, $s, $r, $c} = $restore(this, {b, groupTag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - result = 0; - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - states = $makeSlice(sliceType$2, 0, 16); - states = $append(states, new validationState.ptr(1, 0, 0, 0, mi, sliceType.nil, new $Uint64(0, 0))); - if (groupTag > 0) { - (0 >= states.$length ? ($throwRuntimeError("index out of range"), undefined) : states.$array[states.$offset + 0]).typ = 2; - (0 >= states.$length ? ($throwRuntimeError("index out of range"), undefined) : states.$array[states.$offset + 0]).endGroup = groupTag; - } - initialized = true; - start = b.$length; - /* while (true) { */ case 2: - /* if (!(states.$length > 0)) { break; } */ if(!(states.$length > 0)) { $s = 3; continue; } - st = (x = states.$length - 1 >> 0, ((x < 0 || x >= states.$length) ? ($throwRuntimeError("index out of range"), undefined) : states.$array[states.$offset + x])); - /* while (true) { */ case 4: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 5; continue; } - tag$1 = new $Uint64(0, 0); - if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - tag$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - b = $subslice(b, 1); - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - tag$1 = (x$1 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$2 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - b = $subslice(b, 2); - } else { - n = 0; - _tuple = protowire.ConsumeVarint(b); - tag$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = 2; - unmarshalOutput.copy(out, _tmp); - result = _tmp$1; - $s = -1; return [out, result]; - } - b = $subslice(b, n); - } - num = 0; - n$1 = $shiftRightUint64(tag$1, 3); - if ((n$1.$high < 0 || (n$1.$high === 0 && n$1.$low < 1)) || (n$1.$high > 0 || (n$1.$high === 0 && n$1.$low > 536870911))) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = 2; - unmarshalOutput.copy(out, _tmp$2); - result = _tmp$3; - $s = -1; return [out, result]; - } else { - num = ((n$1.$low >> 0)); - } - wtyp = ((new $Uint64(tag$1.$high & 0, (tag$1.$low & 7) >>> 0).$low << 24 >> 24)); - /* */ if (wtyp === 4) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (wtyp === 4) { */ case 6: - /* */ if (st.endGroup === num) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (st.endGroup === num) { */ case 8: - /* goto PopState */ $s = 10; continue; - /* } */ case 9: - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = 2; - unmarshalOutput.copy(out, _tmp$4); - result = _tmp$5; - $s = -1; return [out, result]; - /* } */ case 7: - vi = new validationInfo.ptr(ptrType$5.nil, 0, 0, 0, new $Uint64(0, 0)); - /* */ if ((st.typ === 3)) { $s = 12; continue; } - /* */ if (false && st.mi.coderMessageInfo.isMessageSet) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ((st.typ === 3)) { */ case 12: - _1 = num; - if (_1 === (1)) { - vi.typ = st.keyType; - } else if (_1 === (2)) { - vi.typ = st.valType; - vi.mi = st.mi; - vi.requiredBit = new $Uint64(0, 1); - } - $s = 15; continue; - /* } else if (false && st.mi.coderMessageInfo.isMessageSet) { */ case 13: - _2 = num; - if (_2 === (1)) { - vi.typ = 12; - } - $s = 15; continue; - /* } else { */ case 14: - f = ptrType$6.nil; - if (((num >> 0)) < st.mi.coderMessageInfo.denseCoderFields.$length) { - f = (x$3 = st.mi.coderMessageInfo.denseCoderFields, ((num < 0 || num >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + num])); - } else { - f = (_entry = st.mi.coderMessageInfo.coderFields[protowire.Number.keyFor(num)], _entry !== undefined ? _entry.v : ptrType$6.nil); - } - /* */ if (!(f === ptrType$6.nil)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!(f === ptrType$6.nil)) { */ case 16: - validationInfo.copy(vi, f.validation); - /* */ if ((vi.typ === 1) && vi.mi === ptrType$5.nil) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ((vi.typ === 1) && vi.mi === ptrType$5.nil) { */ case 18: - _r$5 = st.mi.Desc.Fields(); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.ByNumber(num); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - if ($interfaceIsEqual(fd, $ifaceNil)) { _v = true; $s = 24; continue s; } - _r$7 = fd.IsWeak(); /* */ $s = 25; case 25: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !_r$7; case 24: - /* */ if (_v) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_v) { */ case 22: - /* break; */ $s = 11; continue; - /* } */ case 23: - _r$8 = fd.Message(); /* */ $s = 26; case 26: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.FullName(); /* */ $s = 27; case 27: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - messageName = _r$9; - _r$10 = protoregistry.GlobalTypes.FindMessageByName(messageName); /* */ $s = 28; case 28: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$1 = _r$10; - messageType = _tuple$1[0]; - err = _tuple$1[1]; - _3 = err; - if ($interfaceIsEqual(_3, $ifaceNil)) { - _tuple$2 = $assertType(messageType, ptrType$5, true); - vi.mi = _tuple$2[0]; - } else if ($interfaceIsEqual(_3, (protoregistry.NotFound))) { - vi.typ = 10; - } else { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = 1; - unmarshalOutput.copy(out, _tmp$6); - result = _tmp$7; - $s = -1; return [out, result]; - } - /* } */ case 19: - /* break; */ $s = 11; continue; - /* } */ case 17: - _r$11 = st.mi.Desc.FullName(); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = opts.resolver.FindExtensionByNumber(_r$11, num); /* */ $s = 30; case 30: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$3 = _r$12; - xt = _tuple$3[0]; - err$1 = _tuple$3[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, protoregistry.NotFound))) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = 1; - unmarshalOutput.copy(out, _tmp$8); - result = _tmp$9; - $s = -1; return [out, result]; - } - /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 31: - _r$13 = getExtensionFieldInfo(xt); /* */ $s = 33; case 33: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - validationInfo.copy(vi, _r$13.validation); - /* } */ case 32: - /* } */ case 15: - case 11: - if (!((x$4 = vi.requiredBit, (x$4.$high === 0 && x$4.$low === 0)))) { - ok = false; - _4 = vi.typ; - if (_4 === (7)) { - ok = wtyp === 0; - } else if (_4 === (8)) { - ok = wtyp === 5; - } else if (_4 === (9)) { - ok = wtyp === 1; - } else if ((_4 === (10)) || (_4 === (11)) || (_4 === (1))) { - ok = wtyp === 2; - } else if (_4 === (2)) { - ok = wtyp === 3; - } - if (ok) { - st.requiredMask = (x$5 = st.requiredMask, x$6 = vi.requiredBit, new $Uint64(x$5.$high | x$6.$high, (x$5.$low | x$6.$low) >>> 0)); - } - } - _5 = wtyp; - /* */ if (_5 === (0)) { $s = 35; continue; } - /* */ if (_5 === (2)) { $s = 36; continue; } - /* */ if (_5 === (5)) { $s = 37; continue; } - /* */ if (_5 === (1)) { $s = 38; continue; } - /* */ if (_5 === (3)) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (_5 === (0)) { */ case 35: - if (b.$length >= 10) { - if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - b = $subslice(b, 1); - } else if ((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - b = $subslice(b, 2); - } else if ((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) < 128) { - b = $subslice(b, 3); - } else if ((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) < 128) { - b = $subslice(b, 4); - } else if ((4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]) < 128) { - b = $subslice(b, 5); - } else if ((5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]) < 128) { - b = $subslice(b, 6); - } else if ((6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]) < 128) { - b = $subslice(b, 7); - } else if ((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]) < 128) { - b = $subslice(b, 8); - } else if ((8 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 8]) < 128) { - b = $subslice(b, 9); - } else if ((9 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 9]) < 128 && (9 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 9]) < 2) { - b = $subslice(b, 10); - } else { - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = 2; - unmarshalOutput.copy(out, _tmp$10); - result = _tmp$11; - $s = -1; return [out, result]; - } - } else { - if (b.$length > 0 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - b = $subslice(b, 1); - } else if (b.$length > 1 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - b = $subslice(b, 2); - } else if (b.$length > 2 && (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) < 128) { - b = $subslice(b, 3); - } else if (b.$length > 3 && (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) < 128) { - b = $subslice(b, 4); - } else if (b.$length > 4 && (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]) < 128) { - b = $subslice(b, 5); - } else if (b.$length > 5 && (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]) < 128) { - b = $subslice(b, 6); - } else if (b.$length > 6 && (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]) < 128) { - b = $subslice(b, 7); - } else if (b.$length > 7 && (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]) < 128) { - b = $subslice(b, 8); - } else if (b.$length > 8 && (8 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 8]) < 128) { - b = $subslice(b, 9); - } else if (b.$length > 9 && (9 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 9]) < 2) { - b = $subslice(b, 10); - } else { - _tmp$12 = $clone(out, unmarshalOutput); - _tmp$13 = 2; - unmarshalOutput.copy(out, _tmp$12); - result = _tmp$13; - $s = -1; return [out, result]; - } - } - /* continue State; */ $s = 2; continue s; - $s = 41; continue; - /* } else if (_5 === (2)) { */ case 36: - size = new $Uint64(0, 0); - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - size = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - b = $subslice(b, 1); - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - size = (x$7 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$8 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)); - b = $subslice(b, 2); - } else { - n$2 = 0; - _tuple$4 = protowire.ConsumeVarint(b); - size = _tuple$4[0]; - n$2 = _tuple$4[1]; - if (n$2 < 0) { - _tmp$14 = $clone(out, unmarshalOutput); - _tmp$15 = 2; - unmarshalOutput.copy(out, _tmp$14); - result = _tmp$15; - $s = -1; return [out, result]; - } - b = $subslice(b, n$2); - } - if ((x$9 = (new $Uint64(0, b.$length)), (size.$high > x$9.$high || (size.$high === x$9.$high && size.$low > x$9.$low)))) { - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = 2; - unmarshalOutput.copy(out, _tmp$16); - result = _tmp$17; - $s = -1; return [out, result]; - } - v = $subslice(b, 0, $flatten64(size)); - b = $subslice(b, $flatten64(size)); - _6 = vi.typ; - /* */ if (_6 === (1)) { $s = 43; continue; } - /* */ if (_6 === (3)) { $s = 44; continue; } - /* */ if (_6 === (4)) { $s = 45; continue; } - /* */ if (_6 === (5)) { $s = 46; continue; } - /* */ if (_6 === (6)) { $s = 47; continue; } - /* */ if (_6 === (11)) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (_6 === (1)) { */ case 43: - if (vi.mi === ptrType$5.nil) { - _tmp$18 = $clone(out, unmarshalOutput); - _tmp$19 = 1; - unmarshalOutput.copy(out, _tmp$18); - result = _tmp$19; - $s = -1; return [out, result]; - } - $r = vi.mi.init(); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!(vi.mi === ptrType$5.nil)) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (!(vi.mi === ptrType$5.nil)) { */ case 51: - $r = vi.mi.init(); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 52: - states = $append(states, new validationState.ptr(vi.typ, vi.keyType, vi.valType, 0, vi.mi, b, new $Uint64(0, 0))); - b = v; - /* continue State; */ $s = 2; continue s; - $s = 49; continue; - /* } else if (_6 === (3)) { */ case 44: - /* */ if (!(vi.mi === ptrType$5.nil)) { $s = 54; continue; } - /* */ $s = 55; continue; - /* if (!(vi.mi === ptrType$5.nil)) { */ case 54: - $r = vi.mi.init(); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 55: - states = $append(states, new validationState.ptr(vi.typ, vi.keyType, vi.valType, 0, vi.mi, b, new $Uint64(0, 0))); - b = v; - /* continue State; */ $s = 2; continue s; - $s = 49; continue; - /* } else if (_6 === (4)) { */ case 45: - while (true) { - if (!(v.$length > 0)) { break; } - _tuple$5 = protowire.ConsumeVarint(v); - n$3 = _tuple$5[1]; - if (n$3 < 0) { - _tmp$20 = $clone(out, unmarshalOutput); - _tmp$21 = 2; - unmarshalOutput.copy(out, _tmp$20); - result = _tmp$21; - $s = -1; return [out, result]; - } - v = $subslice(v, n$3); - } - $s = 49; continue; - /* } else if (_6 === (5)) { */ case 46: - if (!(((_r$14 = v.$length % 4, _r$14 === _r$14 ? _r$14 : $throwRuntimeError("integer divide by zero")) === 0))) { - _tmp$22 = $clone(out, unmarshalOutput); - _tmp$23 = 2; - unmarshalOutput.copy(out, _tmp$22); - result = _tmp$23; - $s = -1; return [out, result]; - } - $s = 49; continue; - /* } else if (_6 === (6)) { */ case 47: - if (!(((_r$15 = v.$length % 8, _r$15 === _r$15 ? _r$15 : $throwRuntimeError("integer divide by zero")) === 0))) { - _tmp$24 = $clone(out, unmarshalOutput); - _tmp$25 = 2; - unmarshalOutput.copy(out, _tmp$24); - result = _tmp$25; - $s = -1; return [out, result]; - } - $s = 49; continue; - /* } else if (_6 === (11)) { */ case 48: - if (!utf8.Valid(v)) { - _tmp$26 = $clone(out, unmarshalOutput); - _tmp$27 = 2; - unmarshalOutput.copy(out, _tmp$26); - result = _tmp$27; - $s = -1; return [out, result]; - } - /* } */ case 49: - case 42: - $s = 41; continue; - /* } else if (_5 === (5)) { */ case 37: - if (b.$length < 4) { - _tmp$28 = $clone(out, unmarshalOutput); - _tmp$29 = 2; - unmarshalOutput.copy(out, _tmp$28); - result = _tmp$29; - $s = -1; return [out, result]; - } - b = $subslice(b, 4); - $s = 41; continue; - /* } else if (_5 === (1)) { */ case 38: - if (b.$length < 8) { - _tmp$30 = $clone(out, unmarshalOutput); - _tmp$31 = 2; - unmarshalOutput.copy(out, _tmp$30); - result = _tmp$31; - $s = -1; return [out, result]; - } - b = $subslice(b, 8); - $s = 41; continue; - /* } else if (_5 === (3)) { */ case 39: - /* */ if ((vi.typ === 2)) { $s = 58; continue; } - /* */ if (false && (vi.typ === 12)) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if ((vi.typ === 2)) { */ case 58: - if (vi.mi === ptrType$5.nil) { - _tmp$32 = $clone(out, unmarshalOutput); - _tmp$33 = 1; - unmarshalOutput.copy(out, _tmp$32); - result = _tmp$33; - $s = -1; return [out, result]; - } - $r = vi.mi.init(); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - states = $append(states, new validationState.ptr(2, 0, 0, num, vi.mi, sliceType.nil, new $Uint64(0, 0))); - /* continue State; */ $s = 2; continue s; - $s = 61; continue; - /* } else if (false && (vi.typ === 12)) { */ case 59: - _r$16 = messageset.ConsumeFieldValue(b, false); /* */ $s = 63; case 63: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$6 = _r$16; - typeid = _tuple$6[0]; - v$1 = _tuple$6[1]; - n$4 = _tuple$6[2]; - err$2 = _tuple$6[3]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$34 = $clone(out, unmarshalOutput); - _tmp$35 = 2; - unmarshalOutput.copy(out, _tmp$34); - result = _tmp$35; - $s = -1; return [out, result]; - } - _r$17 = st.mi.Desc.FullName(); /* */ $s = 64; case 64: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = opts.resolver.FindExtensionByNumber(_r$17, typeid); /* */ $s = 65; case 65: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _tuple$7 = _r$18; - xt$1 = _tuple$7[0]; - err$2 = _tuple$7[1]; - /* */ if ($interfaceIsEqual(err$2, protoregistry.NotFound)) { $s = 67; continue; } - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if ($interfaceIsEqual(err$2, protoregistry.NotFound)) { */ case 67: - b = $subslice(b, n$4); - $s = 70; continue; - /* } else if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 68: - _tmp$36 = $clone(out, unmarshalOutput); - _tmp$37 = 1; - unmarshalOutput.copy(out, _tmp$36); - result = _tmp$37; - $s = -1; return [out, result]; - /* } else { */ case 69: - _r$19 = getExtensionFieldInfo(xt$1); /* */ $s = 71; case 71: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - xvi = $clone(_r$19.validation, validationInfo); - /* */ if (!(xvi.mi === ptrType$5.nil)) { $s = 72; continue; } - /* */ $s = 73; continue; - /* if (!(xvi.mi === ptrType$5.nil)) { */ case 72: - $r = xvi.mi.init(); /* */ $s = 74; case 74: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 73: - states = $append(states, new validationState.ptr(xvi.typ, 0, 0, 0, xvi.mi, $subslice(b, n$4), new $Uint64(0, 0))); - b = v$1; - /* continue State; */ $s = 2; continue s; - /* } */ case 70: - case 66: - $s = 61; continue; - /* } else { */ case 60: - n$5 = protowire.ConsumeFieldValue(num, wtyp, b); - if (n$5 < 0) { - _tmp$38 = $clone(out, unmarshalOutput); - _tmp$39 = 2; - unmarshalOutput.copy(out, _tmp$38); - result = _tmp$39; - $s = -1; return [out, result]; - } - b = $subslice(b, n$5); - /* } */ case 61: - case 57: - $s = 41; continue; - /* } else { */ case 40: - _tmp$40 = $clone(out, unmarshalOutput); - _tmp$41 = 2; - unmarshalOutput.copy(out, _tmp$40); - result = _tmp$41; - $s = -1; return [out, result]; - /* } */ case 41: - case 34: - $s = 4; continue; - case 5: - if (!((st.endGroup === 0))) { - _tmp$42 = $clone(out, unmarshalOutput); - _tmp$43 = 2; - unmarshalOutput.copy(out, _tmp$42); - result = _tmp$43; - $s = -1; return [out, result]; - } - if (!((b.$length === 0))) { - _tmp$44 = $clone(out, unmarshalOutput); - _tmp$45 = 2; - unmarshalOutput.copy(out, _tmp$44); - result = _tmp$45; - $s = -1; return [out, result]; - } - b = st.tail; - /* PopState: */ case 10: - numRequiredFields = 0; - _7 = st.typ; - if ((_7 === (1)) || (_7 === (2))) { - numRequiredFields = ((st.mi.coderMessageInfo.numRequiredFields >> 0)); - } else if (_7 === (3)) { - if (!(st.mi === ptrType$5.nil) && st.mi.coderMessageInfo.numRequiredFields > 0) { - numRequiredFields = 1; - } - } - if (numRequiredFields > 0 && !((bits.OnesCount64(st.requiredMask) === numRequiredFields))) { - initialized = false; - } - states = $subslice(states, 0, (states.$length - 1 >> 0)); - $s = 2; continue; - case 3: - out.n = start - b.$length >> 0; - if (initialized) { - out.initialized = true; - } - _tmp$46 = $clone(out, unmarshalOutput); - _tmp$47 = 3; - unmarshalOutput.copy(out, _tmp$46); - result = _tmp$47; - $s = -1; return [out, result]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.validate, $c: true, $r, _1, _2, _3, _4, _5, _6, _7, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _v, b, err, err$1, err$2, f, fd, groupTag, initialized, messageName, messageType, mi, n, n$1, n$2, n$3, n$4, n$5, num, numRequiredFields, ok, opts, out, result, size, st, start, states, tag$1, typeid, v, v$1, vi, wtyp, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xt, xt$1, xvi, $s};return $f; - }; - MessageInfo.prototype.validate = function(b, groupTag, opts) { return this.$val.validate(b, groupTag, opts); }; - offsetOf = function(f, x) { - var f, x, x$1, x$2; - if (!((f.Index.$length === 1))) { - $panic(new $String("embedded structs are not supported")); - } - if (f.PkgPath === "") { - return new offset.ptr((x$1 = f.Index, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $throwNilPointerError); - } - if (x === $throwNilPointerError) { - $panic(new $String("exporter must be provided for unexported field")); - } - return new offset.ptr((x$2 = f.Index, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), x); - }; - offset.ptr.prototype.IsValid = function() { - var f; - f = this; - return f.index >= 0; - }; - offset.prototype.IsValid = function() { return this.$val.IsValid(); }; - pointerOfValue = function(v) { - var v; - return new pointer.ptr($clone(v, reflect.Value)); - }; - pointerOfIface = function(v) { - var {$24r, _r$5, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = new pointer.ptr($clone(_r$5, reflect.Value)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointerOfIface, $c: true, $r, $24r, _r$5, v, $s};return $f; - }; - pointer.ptr.prototype.IsNil = function() { - var p; - p = this; - return $clone(p.v, reflect.Value).IsNil(); - }; - pointer.prototype.IsNil = function() { return this.$val.IsNil(); }; - pointer.ptr.prototype.Apply = function(f) { - var {$24r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, f, p, v, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (!(f.export$1 === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f.export$1 === $throwNilPointerError)) { */ case 1: - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = f.export$1(_r$5, f.index); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.ValueOf(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = _r$7; - if ($clone(v, reflect.Value).IsValid()) { - $s = -1; return new pointer.ptr($clone(v, reflect.Value)); - } - /* } */ case 2: - _r$8 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Field(f.index); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Addr(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = new pointer.ptr($clone(_r$10, reflect.Value)); - $s = 9; case 9: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Apply, $c: true, $r, $24r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, f, p, v, $s};return $f; - }; - pointer.prototype.Apply = function(f) { return this.$val.Apply(f); }; - pointer.ptr.prototype.AsValueOf = function(t) { - var {_r$5, _r$6, got, p, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Type().Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - got = _r$5; - /* */ if (!($interfaceIsEqual(got, t))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(got, t))) { */ case 2: - _r$6 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([got, t])); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String(_r$6)); - /* } */ case 3: - $s = -1; return p.v; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.AsValueOf, $c: true, $r, _r$5, _r$6, got, p, t, $s};return $f; - }; - pointer.prototype.AsValueOf = function(t) { return this.$val.AsValueOf(t); }; - pointer.ptr.prototype.AsIfaceOf = function(t) { - var {$24r, _r$5, _r$6, p, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p, pointer).AsValueOf(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.AsIfaceOf, $c: true, $r, $24r, _r$5, _r$6, p, t, $s};return $f; - }; - pointer.prototype.AsIfaceOf = function(t) { return this.$val.AsIfaceOf(t); }; - pointer.ptr.prototype.Bool = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$8); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Bool, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Bool = function() { return this.$val.Bool(); }; - pointer.ptr.prototype.BoolPtr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$9); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.BoolPtr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.BoolPtr = function() { return this.$val.BoolPtr(); }; - pointer.ptr.prototype.BoolSlice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$10); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.BoolSlice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.BoolSlice = function() { return this.$val.BoolSlice(); }; - pointer.ptr.prototype.Int32 = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$11); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Int32, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Int32 = function() { return this.$val.Int32(); }; - pointer.ptr.prototype.Int32Ptr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$12); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Int32Ptr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Int32Ptr = function() { return this.$val.Int32Ptr(); }; - pointer.ptr.prototype.Int32Slice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$13); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Int32Slice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Int32Slice = function() { return this.$val.Int32Slice(); }; - pointer.ptr.prototype.Int64 = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$14); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Int64, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Int64 = function() { return this.$val.Int64(); }; - pointer.ptr.prototype.Int64Ptr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$15); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Int64Ptr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Int64Ptr = function() { return this.$val.Int64Ptr(); }; - pointer.ptr.prototype.Int64Slice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$16); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Int64Slice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Int64Slice = function() { return this.$val.Int64Slice(); }; - pointer.ptr.prototype.Uint32 = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$17); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Uint32, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Uint32 = function() { return this.$val.Uint32(); }; - pointer.ptr.prototype.Uint32Ptr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$18); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Uint32Ptr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Uint32Ptr = function() { return this.$val.Uint32Ptr(); }; - pointer.ptr.prototype.Uint32Slice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$19); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Uint32Slice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Uint32Slice = function() { return this.$val.Uint32Slice(); }; - pointer.ptr.prototype.Uint64 = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$20); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Uint64, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Uint64 = function() { return this.$val.Uint64(); }; - pointer.ptr.prototype.Uint64Ptr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$21); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Uint64Ptr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Uint64Ptr = function() { return this.$val.Uint64Ptr(); }; - pointer.ptr.prototype.Uint64Slice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$22); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Uint64Slice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Uint64Slice = function() { return this.$val.Uint64Slice(); }; - pointer.ptr.prototype.Float32 = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$23); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Float32, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Float32 = function() { return this.$val.Float32(); }; - pointer.ptr.prototype.Float32Ptr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$24); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Float32Ptr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Float32Ptr = function() { return this.$val.Float32Ptr(); }; - pointer.ptr.prototype.Float32Slice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$25); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Float32Slice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Float32Slice = function() { return this.$val.Float32Slice(); }; - pointer.ptr.prototype.Float64 = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$26); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Float64, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Float64 = function() { return this.$val.Float64(); }; - pointer.ptr.prototype.Float64Ptr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$27); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Float64Ptr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Float64Ptr = function() { return this.$val.Float64Ptr(); }; - pointer.ptr.prototype.Float64Slice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$28); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Float64Slice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Float64Slice = function() { return this.$val.Float64Slice(); }; - pointer.ptr.prototype.String = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$29); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.String, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.String = function() { return this.$val.String(); }; - pointer.ptr.prototype.StringPtr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$30); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.StringPtr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.StringPtr = function() { return this.$val.StringPtr(); }; - pointer.ptr.prototype.StringSlice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$31); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.StringSlice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.StringSlice = function() { return this.$val.StringSlice(); }; - pointer.ptr.prototype.Bytes = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$3); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Bytes, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Bytes = function() { return this.$val.Bytes(); }; - pointer.ptr.prototype.BytesPtr = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$32); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.BytesPtr, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.BytesPtr = function() { return this.$val.BytesPtr(); }; - pointer.ptr.prototype.BytesSlice = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$33); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.BytesSlice, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.BytesSlice = function() { return this.$val.BytesSlice(); }; - pointer.ptr.prototype.WeakFields = function() { - var {$24r, _ptr, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = ((_ptr = $assertType(_r$5, ptrType$35), new ptrType$34(function() { return _ptr.$get(); }, function($v) { _ptr.$set($v); }, _ptr.$target))); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.WeakFields, $c: true, $r, $24r, _ptr, _r$5, p, $s};return $f; - }; - pointer.prototype.WeakFields = function() { return this.$val.WeakFields(); }; - pointer.ptr.prototype.Extensions = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$36); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Extensions, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Extensions = function() { return this.$val.Extensions(); }; - pointer.ptr.prototype.Elem = function() { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = new pointer.ptr($clone(_r$5, reflect.Value)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.Elem, $c: true, $r, $24r, _r$5, p, $s};return $f; - }; - pointer.prototype.Elem = function() { return this.$val.Elem(); }; - pointer.ptr.prototype.PointerSlice = function() { - var {_r$5, _r$6, _r$7, _r$8, i, n, p, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if ($clone(p.v, reflect.Value).IsNil()) { - $s = -1; return sliceType$12.nil; - } - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - n = _r$6; - s = $makeSlice(sliceType$12, n); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 4; continue; } - _r$7 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Index(i); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - pointer.copy(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]), new pointer.ptr($clone(_r$8, reflect.Value))); - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return s; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.PointerSlice, $c: true, $r, _r$5, _r$6, _r$7, _r$8, i, n, p, s, $s};return $f; - }; - pointer.prototype.PointerSlice = function() { return this.$val.PointerSlice(); }; - pointer.ptr.prototype.AppendPointerSlice = function(v) { - var {_r$5, _r$6, p, sp, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - _r$6 = reflect.Append($clone(sp, reflect.Value), new sliceType$13([$clone(v.v, reflect.Value)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = $clone(sp, reflect.Value).Set($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.AppendPointerSlice, $c: true, $r, _r$5, _r$6, p, sp, v, $s};return $f; - }; - pointer.prototype.AppendPointerSlice = function(v) { return this.$val.AppendPointerSlice(v); }; - pointer.ptr.prototype.SetPointer = function(v) { - var {_r$5, p, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = $clone(_r$5, reflect.Value).Set($clone(v.v, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: pointer.ptr.prototype.SetPointer, $c: true, $r, _r$5, p, v, $s};return $f; - }; - pointer.prototype.SetPointer = function(v) { return this.$val.SetPointer(v); }; - Export.ptr.prototype.MessageStateOf = function(p) { - var p; - $panic(new $String("not supported")); - }; - Export.prototype.MessageStateOf = function(p) { return this.$val.MessageStateOf(p); }; - messageState.ptr.prototype.pointer = function() { - var ms; - ms = this; - $panic(new $String("not supported")); - }; - messageState.prototype.pointer = function() { return this.$val.pointer(); }; - messageState.ptr.prototype.messageInfo = function() { - var ms; - ms = this; - $panic(new $String("not supported")); - }; - messageState.prototype.messageInfo = function() { return this.$val.messageInfo(); }; - messageState.ptr.prototype.LoadMessageInfo = function() { - var ms; - ms = this; - $panic(new $String("not supported")); - }; - messageState.prototype.LoadMessageInfo = function() { return this.$val.LoadMessageInfo(); }; - messageState.ptr.prototype.StoreMessageInfo = function(mi) { - var mi, ms; - ms = this; - $panic(new $String("not supported")); - }; - messageState.prototype.StoreMessageInfo = function(mi) { return this.$val.StoreMessageInfo(mi); }; - atomicNilMessage.ptr.prototype.Init = function(mi) { - var {m, mi, $s, $r, $c} = $restore(this, {mi}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - mi = [mi]; - m[0] = this; - $r = m[0].once.Do((function(m, mi) { return function $b() { - var {_r$5, _r$6, _r$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = reflect.Zero(mi[0].GoReflectType); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = pointerOfIface(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - pointer.copy(m[0].m.p, _r$7); - m[0].m.mi = mi[0]; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, _r$7, $s};return $f; - }; })(m, mi)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return m[0].m; - /* */ } return; } var $f = {$blk: atomicNilMessage.ptr.prototype.Init, $c: true, $r, m, mi, $s};return $f; - }; - atomicNilMessage.prototype.Init = function(mi) { return this.$val.Init(mi); }; - messageState.ptr.prototype.Descriptor = function() { - var m; - m = this; - return m.messageInfo().Desc; - }; - messageState.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - messageState.ptr.prototype.Type = function() { - var m; - m = this; - return m.messageInfo(); - }; - messageState.prototype.Type = function() { return this.$val.Type(); }; - messageState.ptr.prototype.New = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.messageInfo().New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.New, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - messageState.prototype.New = function() { return this.$val.New(); }; - messageState.ptr.prototype.Interface = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.protoUnwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, protoreflect.ProtoMessage); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Interface, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - messageState.prototype.Interface = function() { return this.$val.Interface(); }; - messageState.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, _r$6, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.messageInfo().GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(m.pointer(), pointer).AsIfaceOf(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, _r$6, m, $s};return $f; - }; - messageState.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - messageState.ptr.prototype.ProtoMethods = function() { - var {m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return m.messageInfo().coderMessageInfo.methods; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.ProtoMethods, $c: true, $r, m, $s};return $f; - }; - messageState.prototype.ProtoMethods = function() { return this.$val.ProtoMethods(); }; - messageState.ptr.prototype.ProtoMessageInfo = function() { - var m; - m = this; - return m.messageInfo(); - }; - messageState.prototype.ProtoMessageInfo = function() { return this.$val.ProtoMessageInfo(); }; - messageState.ptr.prototype.Range = function(f) { - var {_arg, _arg$1, _arg$2, _arg$3, _entry, _i, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, f, fi, m, n, ri, ri$1, ri$2, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = m.messageInfo().reflectMessageInfo.rangeInfos; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - ri = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = ri; - /* */ if ($assertType(_ref$1, ptrType$37, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref$1, ptrType$38, true)[1]) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($assertType(_ref$1, ptrType$37, true)[1]) { */ case 4: - ri$1 = _ref$1.$val; - _r$5 = ri$1.has($clone(m.pointer(), pointer)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_r$5) { */ case 7: - _arg = ri$1.fieldDesc; - _r$6 = ri$1.get($clone(m.pointer(), pointer)); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$6, protoreflect.Value); - _r$7 = f(_arg, _arg$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (!_r$7) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$7) { */ case 10: - $s = -1; return; - /* } */ case 11: - /* } */ case 8: - $s = 6; continue; - /* } else if ($assertType(_ref$1, ptrType$38, true)[1]) { */ case 5: - ri$2 = _ref$1.$val; - _r$8 = ri$2.which($clone(m.pointer(), pointer)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - n = _r$8; - /* */ if (n > 0) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (n > 0) { */ case 15: - fi = (_entry = m.messageInfo().reflectMessageInfo.fields[protowire.Number.keyFor(n)], _entry !== undefined ? _entry.v : ptrType$37.nil); - _arg$2 = fi.fieldDesc; - _r$9 = fi.get($clone(m.pointer(), pointer)); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$9, protoreflect.Value); - _r$10 = f(_arg$2, _arg$3); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (!_r$10) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!_r$10) { */ case 17: - $s = -1; return; - /* } */ case 18: - /* } */ case 16: - /* } */ case 6: - _i++; - $s = 2; continue; - case 3: - _r$11 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 21; case 21: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $r = _r$11.Range(f); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Range, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _entry, _i, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, f, fi, m, n, ri, ri$1, ri$2, $s};return $f; - }; - messageState.prototype.Range = function(f) { return this.$val.Range(f); }; - messageState.ptr.prototype.Has = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.has($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Has(xt); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* } */ case 5: - $s = -1; return false; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Has, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageState.prototype.Has = function(fd) { return this.$val.Has(fd); }; - messageState.ptr.prototype.Clear = function(fd) { - var {_r$5, _r$6, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - $r = fi.clear($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - _r$6 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = _r$6.Clear(xt); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Clear, $c: true, $r, _r$5, _r$6, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageState.prototype.Clear = function(fd) { return this.$val.Clear(fd); }; - messageState.ptr.prototype.Get = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.get($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Get(xt); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* } */ case 5: - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Get, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageState.prototype.Get = function(fd) { return this.$val.Get(fd); }; - messageState.ptr.prototype.Set = function(fd, v) { - var {_r$5, _r$6, _tuple, fd, fi, m, v, xt, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - $r = fi.set($clone(m.pointer(), pointer), $clone(v, protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - _r$6 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = _r$6.Set(xt, $clone(v, protoreflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Set, $c: true, $r, _r$5, _r$6, _tuple, fd, fi, m, v, xt, $s};return $f; - }; - messageState.prototype.Set = function(fd, v) { return this.$val.Set(fd, v); }; - messageState.ptr.prototype.Mutable = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.mutable($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Mutable(xt); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* } */ case 5: - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.Mutable, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageState.prototype.Mutable = function(fd) { return this.$val.Mutable(fd); }; - messageState.ptr.prototype.NewField = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.newField(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = xt.New(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 9; case 9: return $24r$1; - /* } */ case 5: - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.NewField, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageState.prototype.NewField = function(fd) { return this.$val.NewField(fd); }; - messageState.ptr.prototype.WhichOneof = function(od) { - var {$24r, _entry, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, m, od, oi, $s, $r, $c} = $restore(this, {od}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = od.Name(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - oi = (_entry = m.messageInfo().reflectMessageInfo.oneofs[protoreflect.Name.keyFor(_r$5)], _entry !== undefined ? _entry.v : ptrType$38.nil); - /* */ if (!(oi === ptrType$38.nil) && $interfaceIsEqual(oi.oneofDesc, od)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(oi === ptrType$38.nil) && $interfaceIsEqual(oi.oneofDesc, od)) { */ case 3: - _r$6 = od.Fields(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = oi.which($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$6.ByNumber(_r$7); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 8; case 8: return $24r; - /* } */ case 4: - _r$9 = od.FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = m.Descriptor().FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $panic(new $String("invalid oneof descriptor " + (_r$9) + " for message " + (_r$10))); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.WhichOneof, $c: true, $r, $24r, _entry, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, m, od, oi, $s};return $f; - }; - messageState.prototype.WhichOneof = function(od) { return this.$val.WhichOneof(od); }; - messageState.ptr.prototype.GetUnknown = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().reflectMessageInfo.getUnknown($clone(m.pointer(), pointer)); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.GetUnknown, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - messageState.prototype.GetUnknown = function() { return this.$val.GetUnknown(); }; - messageState.ptr.prototype.SetUnknown = function(b) { - var {b, m, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = m.messageInfo().reflectMessageInfo.setUnknown($clone(m.pointer(), pointer), b); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: messageState.ptr.prototype.SetUnknown, $c: true, $r, b, m, $s};return $f; - }; - messageState.prototype.SetUnknown = function(b) { return this.$val.SetUnknown(b); }; - messageState.ptr.prototype.IsValid = function() { - var m; - m = this; - return !$clone(m.pointer(), pointer).IsNil(); - }; - messageState.prototype.IsValid = function() { return this.$val.IsValid(); }; - messageReflectWrapper.ptr.prototype.Descriptor = function() { - var m; - m = this; - return m.messageInfo().Desc; - }; - messageReflectWrapper.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - messageReflectWrapper.ptr.prototype.Type = function() { - var m; - m = this; - return m.messageInfo(); - }; - messageReflectWrapper.prototype.Type = function() { return this.$val.Type(); }; - messageReflectWrapper.ptr.prototype.New = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.messageInfo().New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.New, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - messageReflectWrapper.prototype.New = function() { return this.$val.New(); }; - messageReflectWrapper.ptr.prototype.Interface = function() { - var {_r$5, _tuple, m, m$1, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.protoUnwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, protoreflect.ProtoMessage, true); - m$1 = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return m$1; - } - $s = -1; return ($pointerOfStructConversion(m, ptrType$2)); - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Interface, $c: true, $r, _r$5, _tuple, m, m$1, ok, $s};return $f; - }; - messageReflectWrapper.prototype.Interface = function() { return this.$val.Interface(); }; - messageReflectWrapper.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, _r$6, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.messageInfo().GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(m.pointer(), pointer).AsIfaceOf(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, _r$6, m, $s};return $f; - }; - messageReflectWrapper.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - messageReflectWrapper.ptr.prototype.ProtoMethods = function() { - var {m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return m.messageInfo().coderMessageInfo.methods; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.ProtoMethods, $c: true, $r, m, $s};return $f; - }; - messageReflectWrapper.prototype.ProtoMethods = function() { return this.$val.ProtoMethods(); }; - messageReflectWrapper.ptr.prototype.ProtoMessageInfo = function() { - var m; - m = this; - return m.messageInfo(); - }; - messageReflectWrapper.prototype.ProtoMessageInfo = function() { return this.$val.ProtoMessageInfo(); }; - messageReflectWrapper.ptr.prototype.Range = function(f) { - var {_arg, _arg$1, _arg$2, _arg$3, _entry, _i, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, f, fi, m, n, ri, ri$1, ri$2, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = m.messageInfo().reflectMessageInfo.rangeInfos; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - ri = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = ri; - /* */ if ($assertType(_ref$1, ptrType$37, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref$1, ptrType$38, true)[1]) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($assertType(_ref$1, ptrType$37, true)[1]) { */ case 4: - ri$1 = _ref$1.$val; - _r$5 = ri$1.has($clone(m.pointer(), pointer)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_r$5) { */ case 7: - _arg = ri$1.fieldDesc; - _r$6 = ri$1.get($clone(m.pointer(), pointer)); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$6, protoreflect.Value); - _r$7 = f(_arg, _arg$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (!_r$7) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$7) { */ case 10: - $s = -1; return; - /* } */ case 11: - /* } */ case 8: - $s = 6; continue; - /* } else if ($assertType(_ref$1, ptrType$38, true)[1]) { */ case 5: - ri$2 = _ref$1.$val; - _r$8 = ri$2.which($clone(m.pointer(), pointer)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - n = _r$8; - /* */ if (n > 0) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (n > 0) { */ case 15: - fi = (_entry = m.messageInfo().reflectMessageInfo.fields[protowire.Number.keyFor(n)], _entry !== undefined ? _entry.v : ptrType$37.nil); - _arg$2 = fi.fieldDesc; - _r$9 = fi.get($clone(m.pointer(), pointer)); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$9, protoreflect.Value); - _r$10 = f(_arg$2, _arg$3); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (!_r$10) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!_r$10) { */ case 17: - $s = -1; return; - /* } */ case 18: - /* } */ case 16: - /* } */ case 6: - _i++; - $s = 2; continue; - case 3: - _r$11 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 21; case 21: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $r = _r$11.Range(f); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Range, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _entry, _i, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, f, fi, m, n, ri, ri$1, ri$2, $s};return $f; - }; - messageReflectWrapper.prototype.Range = function(f) { return this.$val.Range(f); }; - messageReflectWrapper.ptr.prototype.Has = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.has($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Has(xt); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* } */ case 5: - $s = -1; return false; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Has, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageReflectWrapper.prototype.Has = function(fd) { return this.$val.Has(fd); }; - messageReflectWrapper.ptr.prototype.Clear = function(fd) { - var {_r$5, _r$6, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - $r = fi.clear($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - _r$6 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = _r$6.Clear(xt); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Clear, $c: true, $r, _r$5, _r$6, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageReflectWrapper.prototype.Clear = function(fd) { return this.$val.Clear(fd); }; - messageReflectWrapper.ptr.prototype.Get = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.get($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Get(xt); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* } */ case 5: - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Get, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageReflectWrapper.prototype.Get = function(fd) { return this.$val.Get(fd); }; - messageReflectWrapper.ptr.prototype.Set = function(fd, v) { - var {_r$5, _r$6, _tuple, fd, fi, m, v, xt, $s, $r, $c} = $restore(this, {fd, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - $r = fi.set($clone(m.pointer(), pointer), $clone(v, protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - _r$6 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = _r$6.Set(xt, $clone(v, protoreflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Set, $c: true, $r, _r$5, _r$6, _tuple, fd, fi, m, v, xt, $s};return $f; - }; - messageReflectWrapper.prototype.Set = function(fd, v) { return this.$val.Set(fd, v); }; - messageReflectWrapper.ptr.prototype.Mutable = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.mutable($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = m.messageInfo().reflectMessageInfo.extensionMap($clone(m.pointer(), pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Mutable(xt); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* } */ case 5: - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.Mutable, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageReflectWrapper.prototype.Mutable = function(fd) { return this.$val.Mutable(fd); }; - messageReflectWrapper.ptr.prototype.NewField = function(fd) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _tuple, fd, fi, m, xt, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().checkField(fd); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fi = _tuple[0]; - xt = _tuple[1]; - /* */ if (!(fi === ptrType$37.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 3: - _r$6 = fi.newField(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _r$7 = xt.New(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 9; case 9: return $24r$1; - /* } */ case 5: - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.NewField, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _tuple, fd, fi, m, xt, $s};return $f; - }; - messageReflectWrapper.prototype.NewField = function(fd) { return this.$val.NewField(fd); }; - messageReflectWrapper.ptr.prototype.WhichOneof = function(od) { - var {$24r, _entry, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, m, od, oi, $s, $r, $c} = $restore(this, {od}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = od.Name(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - oi = (_entry = m.messageInfo().reflectMessageInfo.oneofs[protoreflect.Name.keyFor(_r$5)], _entry !== undefined ? _entry.v : ptrType$38.nil); - /* */ if (!(oi === ptrType$38.nil) && $interfaceIsEqual(oi.oneofDesc, od)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(oi === ptrType$38.nil) && $interfaceIsEqual(oi.oneofDesc, od)) { */ case 3: - _r$6 = od.Fields(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = oi.which($clone(m.pointer(), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$6.ByNumber(_r$7); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 8; case 8: return $24r; - /* } */ case 4: - _r$9 = od.FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = m.Descriptor().FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $panic(new $String("invalid oneof descriptor " + (_r$9) + " for message " + (_r$10))); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.WhichOneof, $c: true, $r, $24r, _entry, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, m, od, oi, $s};return $f; - }; - messageReflectWrapper.prototype.WhichOneof = function(od) { return this.$val.WhichOneof(od); }; - messageReflectWrapper.ptr.prototype.GetUnknown = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = m.messageInfo().reflectMessageInfo.getUnknown($clone(m.pointer(), pointer)); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.GetUnknown, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - messageReflectWrapper.prototype.GetUnknown = function() { return this.$val.GetUnknown(); }; - messageReflectWrapper.ptr.prototype.SetUnknown = function(b) { - var {b, m, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = m.messageInfo().init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = m.messageInfo().reflectMessageInfo.setUnknown($clone(m.pointer(), pointer), b); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: messageReflectWrapper.ptr.prototype.SetUnknown, $c: true, $r, b, m, $s};return $f; - }; - messageReflectWrapper.prototype.SetUnknown = function(b) { return this.$val.SetUnknown(b); }; - messageReflectWrapper.ptr.prototype.IsValid = function() { - var m; - m = this; - return !$clone(m.pointer(), pointer).IsNil(); - }; - messageReflectWrapper.prototype.IsValid = function() { return this.$val.IsValid(); }; - fieldInfoForMissing = function(fd) { - var fd; - return new fieldInfo.ptr(fd, (function(p) { - var p; - return false; - }), (function $b(p) { - var {_r$5, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$5))); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, p, $s};return $f; - }), (function $b(p) { - var {$24r, _r$5, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.Default(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$5, p, $s};return $f; - }), (function $b(p, v) { - var {_r$5, p, v, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$5))); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, p, v, $s};return $f; - }), (function $b(p) { - var {_r$5, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$5))); - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, p, $s};return $f; - }), (function $b() { - var {_r$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$5))); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, $s};return $f; - }), (function $b() { - var {_r$5, _r$6, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.Default(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = $clone(_r$5, protoreflect.Value); - if ($clone(v, protoreflect.Value).IsValid()) { - $s = -1; return v; - } - _r$6 = fd.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$6))); - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, v, $s};return $f; - })); - }; - fieldInfoForOneof = function(fd, fs, x, ot) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$5, _r$6, _r$7, _r$8, _r$9, conv, fd, fieldOffset, fs, ft, isMessage, ot, x, $s, $r, $c} = $restore(this, {fd, fs, x, ot}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conv = [conv]; - fd = [fd]; - fieldOffset = [fieldOffset]; - fs = [fs]; - isMessage = [isMessage]; - ot = [ot]; - ft = fs[0].Type; - _r$5 = ft.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!((_r$5 === 20))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$5 === 20))) { */ case 1: - _r$6 = fd[0].FullName(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$6); - _arg$1 = ft; - _r$7 = fmt.Sprintf("field %v has invalid type: got %v, want interface kind", new sliceType$1([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String(_r$7)); - /* } */ case 2: - _r$8 = ot[0].Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!((_r$8 === 25))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!((_r$8 === 25))) { */ case 6: - _r$9 = fd[0].FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.FullName(_r$9); - _arg$3 = ot[0]; - _r$10 = fmt.Sprintf("field %v has invalid type: got %v, want struct kind", new sliceType$1([_arg$2, _arg$3])); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $panic(new $String(_r$10)); - /* } */ case 7: - _r$11 = reflect.PtrTo(ot[0]).Implements(ft); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!_r$11) { */ case 11: - _r$12 = fd[0].FullName(); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$4 = new protoreflect.FullName(_r$12); - _arg$5 = ot[0]; - _arg$6 = ft; - _r$13 = fmt.Sprintf("field %v has invalid type: %v does not implement %v", new sliceType$1([_arg$4, _arg$5, _arg$6])); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $panic(new $String(_r$13)); - /* } */ case 12: - _r$14 = ot[0].Field(0); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = NewConverter(_r$14.Type, fd[0]); /* */ $s = 17; case 17: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - conv[0] = _r$15; - _r$16 = fd[0].Message(); /* */ $s = 18; case 18: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - isMessage[0] = !($interfaceIsEqual(_r$16, $ifaceNil)); - fieldOffset[0] = $clone(offsetOf($clone(fs[0], reflect.StructField), x), offset); - $s = -1; return new fieldInfo.ptr(fd[0], (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b(p) { - var {_r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _v, _v$1, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return false; - } - _r$17 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - rv = _r$19; - if ($clone(rv, reflect.Value).IsNil()) { _v$1 = true; $s = 7; continue s; } - _r$20 = $clone(rv, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).Type(); /* */ $s = 9; case 9: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = _r$21.Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _v$1 = !($interfaceIsEqual(_r$22, ot[0])); case 7: - if (_v$1) { _v = true; $s = 6; continue s; } - _r$23 = $clone(rv, reflect.Value).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = $clone(_r$23, reflect.Value).IsNil(); /* */ $s = 12; case 12: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _v = _r$24; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - $s = -1; return false; - /* } */ case 5: - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _v, _v$1, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot), (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b(p) { - var {_r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _v, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$17 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - rv = _r$19; - if ($clone(rv, reflect.Value).IsNil()) { _v = true; $s = 6; continue s; } - _r$20 = $clone(rv, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).Type(); /* */ $s = 8; case 8: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = _r$21.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _v = !($interfaceIsEqual(_r$22, ot[0])); case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - $s = -1; return; - /* } */ case 5: - _r$23 = reflect.Zero($clone(rv, reflect.Value).Type()); /* */ $s = 10; case 10: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$23, reflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _v, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot), (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b(p) { - var {$24r, $24r$1, $24r$2, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _v, _v$1, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(p, pointer).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 1: - _r$17 = conv[0].Zero(); /* */ $s = 3; case 3: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$18 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, pointer).AsValueOf(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - rv = _r$20; - if ($clone(rv, reflect.Value).IsNil()) { _v$1 = true; $s = 11; continue s; } - _r$21 = $clone(rv, reflect.Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = $clone(_r$21, reflect.Value).Type(); /* */ $s = 13; case 13: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = _r$22.Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _v$1 = !($interfaceIsEqual(_r$23, ot[0])); case 11: - if (_v$1) { _v = true; $s = 10; continue s; } - _r$24 = $clone(rv, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = $clone(_r$24, reflect.Value).IsNil(); /* */ $s = 16; case 16: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _v = _r$25; case 10: - /* */ if (_v) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v) { */ case 8: - _r$26 = conv[0].Zero(); /* */ $s = 17; case 17: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $24r$1 = _r$26; - $s = 18; case 18: return $24r$1; - /* } */ case 9: - _r$27 = $clone(rv, reflect.Value).Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = $clone(_r$27, reflect.Value).Elem(); /* */ $s = 20; case 20: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = $clone(_r$28, reflect.Value).Field(0); /* */ $s = 21; case 21: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - rv = _r$29; - _r$30 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 22; case 22: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - $24r$2 = _r$30; - $s = 23; case 23: return $24r$2; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _v, _v$1, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot), (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b(p, v) { - var {_r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _v, _v$1, p, rv, v, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$17 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - rv = _r$19; - if ($clone(rv, reflect.Value).IsNil()) { _v$1 = true; $s = 7; continue s; } - _r$20 = $clone(rv, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).Type(); /* */ $s = 9; case 9: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = _r$21.Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _v$1 = !($interfaceIsEqual(_r$22, ot[0])); case 7: - if (_v$1) { _v = true; $s = 6; continue s; } - _r$23 = $clone(rv, reflect.Value).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = $clone(_r$23, reflect.Value).IsNil(); /* */ $s = 12; case 12: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _v = _r$24; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - $r = $clone(rv, reflect.Value).Set($clone(reflect.New(ot[0]), reflect.Value)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _r$25 = $clone(rv, reflect.Value).Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = $clone(_r$25, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = $clone(_r$26, reflect.Value).Field(0); /* */ $s = 16; case 16: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - rv = _r$27; - _r$28 = conv[0].GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$28, reflect.Value)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _v, _v$1, p, rv, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot), (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b(p) { - var {$24r, _arg$7, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _v, _v$1, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!isMessage[0]) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!isMessage[0]) { */ case 1: - _r$17 = fd[0].FullName(); /* */ $s = 3; case 3: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$7 = new protoreflect.FullName(_r$17); - _r$18 = fmt.Sprintf("field %v with invalid Mutable call on field with non-composite type", new sliceType$1([_arg$7])); /* */ $s = 4; case 4: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $panic(new $String(_r$18)); - /* } */ case 2: - _r$19 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, pointer).AsValueOf(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - rv = _r$21; - if ($clone(rv, reflect.Value).IsNil()) { _v$1 = true; $s = 11; continue s; } - _r$22 = $clone(rv, reflect.Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = $clone(_r$22, reflect.Value).Type(); /* */ $s = 13; case 13: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = _r$23.Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _v$1 = !($interfaceIsEqual(_r$24, ot[0])); case 11: - if (_v$1) { _v = true; $s = 10; continue s; } - _r$25 = $clone(rv, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = $clone(_r$25, reflect.Value).IsNil(); /* */ $s = 16; case 16: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _v = _r$26; case 10: - /* */ if (_v) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v) { */ case 8: - $r = $clone(rv, reflect.Value).Set($clone(reflect.New(ot[0]), reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - _r$27 = $clone(rv, reflect.Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = $clone(_r$27, reflect.Value).Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = $clone(_r$28, reflect.Value).Field(0); /* */ $s = 20; case 20: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - rv = _r$29; - /* */ if (($clone(rv, reflect.Value).Kind() === 22) && $clone(rv, reflect.Value).IsNil()) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (($clone(rv, reflect.Value).Kind() === 22) && $clone(rv, reflect.Value).IsNil()) { */ case 21: - _r$30 = conv[0].New(); /* */ $s = 23; case 23: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _r$31 = $clone(_r$30, protoreflect.Value).Message(); /* */ $s = 24; case 24: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$32 = protoreflect.ValueOfMessage(_r$31); /* */ $s = 25; case 25: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _r$33 = conv[0].GoValueOf($clone(_r$32, protoreflect.Value)); /* */ $s = 26; case 26: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$33, reflect.Value)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 22: - _r$34 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 28; case 28: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - $24r = _r$34; - $s = 29; case 29: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg$7, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _v, _v$1, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot), (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b() { - var {$24r, _r$17, _r$18, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$17 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, protoreflect.Value).Message(); /* */ $s = 2; case 2: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r = _r$18; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$17, _r$18, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot), (function(conv, fd, fieldOffset, fs, isMessage, ot) { return function $b() { - var {$24r, _r$17, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$17 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$17, $s};return $f; - }; })(conv, fd, fieldOffset, fs, isMessage, ot)); - /* */ } return; } var $f = {$blk: fieldInfoForOneof, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$5, _r$6, _r$7, _r$8, _r$9, conv, fd, fieldOffset, fs, ft, isMessage, ot, x, $s};return $f; - }; - fieldInfoForMap = function(fd, fs, x) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, conv, fd, fieldOffset, fs, ft, x, $s, $r, $c} = $restore(this, {fd, fs, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conv = [conv]; - fd = [fd]; - fieldOffset = [fieldOffset]; - fs = [fs]; - ft = fs[0].Type; - _r$5 = ft.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!((_r$5 === 21))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$5 === 21))) { */ case 1: - _r$6 = fd[0].FullName(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$6); - _arg$1 = ft; - _r$7 = fmt.Sprintf("field %v has invalid type: got %v, want map kind", new sliceType$1([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String(_r$7)); - /* } */ case 2: - _r$8 = NewConverter(ft, fd[0]); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - conv[0] = _r$8; - fieldOffset[0] = $clone(offsetOf($clone(fs[0], reflect.StructField), x), offset); - $s = -1; return new fieldInfo.ptr(fd[0], (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {_r$10, _r$11, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return false; - } - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - $s = -1; return $clone(rv, reflect.Value).Len() > 0; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$10, _r$11, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {_r$10, _r$11, _r$12, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - _r$12 = reflect.Zero($clone(rv, reflect.Value).Type()); /* */ $s = 4; case 4: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$12, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$10, _r$11, _r$12, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, $24r$1, $24r$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(p, pointer).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 1: - _r$9 = conv[0].Zero(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$10 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, pointer).AsValueOf(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - rv = _r$12; - /* */ if ($clone(rv, reflect.Value).Len() === 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($clone(rv, reflect.Value).Len() === 0) { */ case 8: - _r$13 = conv[0].Zero(); /* */ $s = 10; case 10: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$1 = _r$13; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - _r$14 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$2 = _r$14; - $s = 13; case 13: return $24r$2; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p, v) { - var {_arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, p, pv, rv, v, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - _r$12 = conv[0].GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - pv = _r$12; - /* */ if ($clone(pv, reflect.Value).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(pv, reflect.Value).IsNil()) { */ case 5: - _r$13 = fd[0].FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.FullName(_r$13); - _r$14 = fmt.Sprintf("map field %v cannot be set with read-only value", new sliceType$1([_arg$2])); /* */ $s = 8; case 8: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $panic(new $String(_r$14)); - /* } */ case 6: - $r = $clone(rv, reflect.Value).Set($clone(pv, reflect.Value)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, p, pv, rv, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, _r$10, _r$11, _r$12, _r$13, _r$9, p, v, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v = _r$11; - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 4: - _r$12 = reflect.MakeMap(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$12, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _r$13 = conv[0].PBValueOf($clone(v, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = _r$13; - $s = 9; case 9: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$12, _r$13, _r$9, p, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs), $throwNilPointerError, (function(conv, fd, fieldOffset, fs) { return function $b() { - var {$24r, _r$9, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$9, $s};return $f; - }; })(conv, fd, fieldOffset, fs)); - /* */ } return; } var $f = {$blk: fieldInfoForMap, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, conv, fd, fieldOffset, fs, ft, x, $s};return $f; - }; - fieldInfoForList = function(fd, fs, x) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, conv, fd, fieldOffset, fs, ft, x, $s, $r, $c} = $restore(this, {fd, fs, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conv = [conv]; - fd = [fd]; - fieldOffset = [fieldOffset]; - fs = [fs]; - ft = fs[0].Type; - _r$5 = ft.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!((_r$5 === 23))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$5 === 23))) { */ case 1: - _r$6 = fd[0].FullName(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$6); - _arg$1 = ft; - _r$7 = fmt.Sprintf("field %v has invalid type: got %v, want slice kind", new sliceType$1([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String(_r$7)); - /* } */ case 2: - _r$8 = NewConverter(reflect.PtrTo(ft), fd[0]); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - conv[0] = _r$8; - fieldOffset[0] = $clone(offsetOf($clone(fs[0], reflect.StructField), x), offset); - $s = -1; return new fieldInfo.ptr(fd[0], (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {_r$10, _r$11, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return false; - } - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - $s = -1; return $clone(rv, reflect.Value).Len() > 0; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$10, _r$11, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {_r$10, _r$11, _r$12, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - _r$12 = reflect.Zero($clone(rv, reflect.Value).Type()); /* */ $s = 4; case 4: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$12, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$10, _r$11, _r$12, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, $24r$1, $24r$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(p, pointer).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 1: - _r$9 = conv[0].Zero(); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$10 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, pointer).AsValueOf(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - _r$12 = $clone(rv, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, reflect.Value).Len(); /* */ $s = 10; case 10: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (_r$13 === 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_r$13 === 0) { */ case 7: - _r$14 = conv[0].Zero(); /* */ $s = 11; case 11: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$1 = _r$14; - $s = 12; case 12: return $24r$1; - /* } */ case 8: - _r$15 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 13; case 13: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$2 = _r$15; - $s = 14; case 14: return $24r$2; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p, v) { - var {_arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$9, p, pv, rv, v, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - _r$12 = conv[0].GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - pv = _r$12; - /* */ if ($clone(pv, reflect.Value).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(pv, reflect.Value).IsNil()) { */ case 5: - _r$13 = fd[0].FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.FullName(_r$13); - _r$14 = fmt.Sprintf("list field %v cannot be set with read-only value", new sliceType$1([_arg$2])); /* */ $s = 8; case 8: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $panic(new $String(_r$14)); - /* } */ case 6: - _r$15 = $clone(pv, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$15, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$9, p, pv, rv, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, _r$10, _r$11, _r$9, p, v, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v = _r$10; - _r$11 = conv[0].PBValueOf($clone(v, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$9, p, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs), $throwNilPointerError, (function(conv, fd, fieldOffset, fs) { return function $b() { - var {$24r, _r$9, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$9, $s};return $f; - }; })(conv, fd, fieldOffset, fs)); - /* */ } return; } var $f = {$blk: fieldInfoForList, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, conv, fd, fieldOffset, fs, ft, x, $s};return $f; - }; - fieldInfoForScalar = function(fd, fs, x) { - var {_r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, conv, fd, fieldOffset, fs, ft, isBytes, nullable, x, $s, $r, $c} = $restore(this, {fd, fs, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conv = [conv]; - fd = [fd]; - fieldOffset = [fieldOffset]; - fs = [fs]; - ft = [ft]; - isBytes = [isBytes]; - nullable = [nullable]; - ft[0] = fs[0].Type; - _r$5 = fd[0].HasPresence(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - nullable[0] = _r$5; - _r$6 = ft[0].Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - if (!(_r$6 === 23)) { _v = false; $s = 2; continue s; } - _r$7 = ft[0].Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8 === 8; case 2: - isBytes[0] = _v; - /* */ if (nullable[0]) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (nullable[0]) { */ case 6: - _r$9 = ft[0].Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - if (!(!((_r$9 === 22)))) { _v$1 = false; $s = 10; continue s; } - _r$10 = ft[0].Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$1 = !((_r$10 === 23)); case 10: - /* */ if (_v$1) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v$1) { */ case 8: - nullable[0] = false; - /* } */ case 9: - _r$11 = ft[0].Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11 === 22) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_r$11 === 22) { */ case 13: - _r$12 = ft[0].Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - ft[0] = _r$12; - /* } */ case 14: - /* } */ case 7: - _r$13 = NewConverter(ft[0], fd[0]); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - conv[0] = _r$13; - fieldOffset[0] = $clone(offsetOf($clone(fs[0], reflect.StructField), x), offset); - $s = -1; return new fieldInfo.ptr(fd[0], (function(conv, fd, fieldOffset, fs, ft, isBytes, nullable) { return function $b(p) { - var {_1, _arg, _arg$1, _r$14, _r$15, _r$16, _r$17, _r$18, p, rv, x$1, x$2, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return false; - } - _r$14 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = $clone(_r$14, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - rv = _r$16; - if (nullable[0]) { - $s = -1; return !$clone(rv, reflect.Value).IsNil(); - } - _1 = $clone(rv, reflect.Value).Kind(); - /* */ if (_1 === (1)) { $s = 5; continue; } - /* */ if ((_1 === (5)) || (_1 === (6))) { $s = 6; continue; } - /* */ if ((_1 === (10)) || (_1 === (11))) { $s = 7; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 8; continue; } - /* */ if ((_1 === (24)) || (_1 === (23))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_1 === (1)) { */ case 5: - $s = -1; return $clone(rv, reflect.Value).Bool(); - /* } else if ((_1 === (5)) || (_1 === (6))) { */ case 6: - $s = -1; return !((x$1 = $clone(rv, reflect.Value).Int(), (x$1.$high === 0 && x$1.$low === 0))); - /* } else if ((_1 === (10)) || (_1 === (11))) { */ case 7: - $s = -1; return !((x$2 = $clone(rv, reflect.Value).Uint(), (x$2.$high === 0 && x$2.$low === 0))); - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 8: - $s = -1; return !(($clone(rv, reflect.Value).Float() === 0)) || math.Signbit($clone(rv, reflect.Value).Float()); - /* } else if ((_1 === (24)) || (_1 === (23))) { */ case 9: - $s = -1; return $clone(rv, reflect.Value).Len() > 0; - /* } else { */ case 10: - _r$17 = fd[0].FullName(); /* */ $s = 12; case 12: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$17); - _arg$1 = $clone(rv, reflect.Value).Type(); - _r$18 = fmt.Sprintf("field %v has invalid type: %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 13; case 13: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $panic(new $String(_r$18)); - /* } */ case 11: - case 4: - $s = -1; return false; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _1, _arg, _arg$1, _r$14, _r$15, _r$16, _r$17, _r$18, p, rv, x$1, x$2, $s};return $f; - }; })(conv, fd, fieldOffset, fs, ft, isBytes, nullable), (function(conv, fd, fieldOffset, fs, ft, isBytes, nullable) { return function $b(p) { - var {_r$14, _r$15, _r$16, _r$17, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$14 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = $clone(_r$14, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - rv = _r$16; - _r$17 = reflect.Zero($clone(rv, reflect.Value).Type()); /* */ $s = 4; case 4: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$17, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$14, _r$15, _r$16, _r$17, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs, ft, isBytes, nullable), (function(conv, fd, fieldOffset, fs, ft, isBytes, nullable) { return function $b(p) { - var {$24r, $24r$1, $24r$2, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(p, pointer).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 1: - _r$14 = conv[0].Zero(); /* */ $s = 3; case 3: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r = _r$14; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$15 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, pointer).AsValueOf(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(_r$16, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - rv = _r$17; - /* */ if (nullable[0]) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (nullable[0]) { */ case 8: - /* */ if ($clone(rv, reflect.Value).IsNil()) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ($clone(rv, reflect.Value).IsNil()) { */ case 10: - _r$18 = conv[0].Zero(); /* */ $s = 12; case 12: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$1 = _r$18; - $s = 13; case 13: return $24r$1; - /* } */ case 11: - /* */ if ($clone(rv, reflect.Value).Kind() === 22) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ($clone(rv, reflect.Value).Kind() === 22) { */ case 14: - _r$19 = $clone(rv, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - rv = _r$19; - /* } */ case 15: - /* } */ case 9: - _r$20 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r$2 = _r$20; - $s = 18; case 18: return $24r$2; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs, ft, isBytes, nullable), (function(conv, fd, fieldOffset, fs, ft, isBytes, nullable) { return function $b(p, v) { - var {_r$14, _r$15, _r$16, _r$17, _r$18, p, rv, v, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$14 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = $clone(_r$14, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - rv = _r$16; - /* */ if (nullable[0] && ($clone(rv, reflect.Value).Kind() === 22)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (nullable[0] && ($clone(rv, reflect.Value).Kind() === 22)) { */ case 4: - /* */ if ($clone(rv, reflect.Value).IsNil()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($clone(rv, reflect.Value).IsNil()) { */ case 6: - $r = $clone(rv, reflect.Value).Set($clone(reflect.New(ft[0]), reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - _r$17 = $clone(rv, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - rv = _r$17; - /* } */ case 5: - _r$18 = conv[0].GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$18, reflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (isBytes[0] && ($clone(rv, reflect.Value).Len() === 0)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (isBytes[0] && ($clone(rv, reflect.Value).Len() === 0)) { */ case 12: - /* */ if (nullable[0]) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (nullable[0]) { */ case 14: - $r = $clone(rv, reflect.Value).Set($clone(emptyBytes, reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 16; continue; - /* } else { */ case 15: - $r = $clone(rv, reflect.Value).Set($clone(nilBytes, reflect.Value)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 16: - /* } */ case 13: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$14, _r$15, _r$16, _r$17, _r$18, p, rv, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs, ft, isBytes, nullable), $throwNilPointerError, $throwNilPointerError, (function(conv, fd, fieldOffset, fs, ft, isBytes, nullable) { return function $b() { - var {$24r, _r$14, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$14 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r = _r$14; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$14, $s};return $f; - }; })(conv, fd, fieldOffset, fs, ft, isBytes, nullable)); - /* */ } return; } var $f = {$blk: fieldInfoForScalar, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, conv, fd, fieldOffset, fs, ft, isBytes, nullable, x, $s};return $f; - }; - fieldInfoForWeakMessage = function(fd, weakOffset) { - var {_r$5, fd, lazyInit, messageType, num, once, weakOffset, $s, $r, $c} = $restore(this, {fd, weakOffset}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = [fd]; - lazyInit = [lazyInit]; - messageType = [messageType]; - num = [num]; - once = [once]; - weakOffset = [weakOffset]; - if (true) { - $panic(new $String("no support for proto1 weak fields")); - } - once[0] = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - messageType[0] = $ifaceNil; - lazyInit[0] = (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = once[0].Do((function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b() { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, messageName, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd[0].Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - messageName = _r$6; - _r$7 = protoregistry.GlobalTypes.FindMessageByName(messageName); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - messageType[0] = _tuple[0]; - /* */ if ($interfaceIsEqual(messageType[0], $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(messageType[0], $ifaceNil)) { */ case 4: - _arg = new protoreflect.FullName(messageName); - _r$8 = fd[0].FullName(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.FullName(_r$8); - _r$9 = fmt.Sprintf("weak message %v for field %v is not linked in", new sliceType$1([_arg, _arg$1])); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $panic(new $String(_r$9)); - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, messageName, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset); - _r$5 = fd[0].Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - num[0] = _r$5; - $s = -1; return new fieldInfo.ptr(fd[0], (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b(p) { - var {_r$6, _r$7, _r$8, _tuple, ok, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return false; - } - _r$6 = $clone(p, pointer).Apply($clone(weakOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).WeakFields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.get(num[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$6, _r$7, _r$8, _tuple, ok, p, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset), (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b(p) { - var {_r$6, _r$7, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = $clone(p, pointer).Apply($clone(weakOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).WeakFields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = _r$7.clear(num[0]); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$6, _r$7, p, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset), (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b(p) { - var {$24r, $24r$1, $24r$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$6, _r$7, _r$8, _r$9, _tuple, m, ok, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = lazyInit[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($clone(p, pointer).IsNil()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 2: - _r$6 = messageType[0].Zero(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protoreflect.ValueOfMessage(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$8 = $clone(p, pointer).Apply($clone(weakOffset[0], offset)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, pointer).WeakFields(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.get(num[0]); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = _r$10; - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!ok) { */ case 10: - _r$11 = messageType[0].Zero(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = protoreflect.ValueOfMessage(_r$11); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$1 = _r$12; - $s = 14; case 14: return $24r$1; - /* } */ case 11: - _r$13 = m.ProtoReflect(); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = protoreflect.ValueOfMessage(_r$13); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$2 = _r$14; - $s = 17; case 17: return $24r$2; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$6, _r$7, _r$8, _r$9, _tuple, m, ok, p, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset), (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b(p, v) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, got, m, p, v, want, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = lazyInit[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = $clone(v, protoreflect.Value).Message(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = m.Descriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = messageType[0].Descriptor(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$7, _r$8))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(_r$7, _r$8))) { */ case 3: - _r$9 = m.Descriptor(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.FullName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tmp = _r$10; - _r$11 = messageType[0].Descriptor(); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tmp$1 = _r$12; - got = _tmp; - want = _tmp$1; - /* */ if (!(got === want)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(got === want)) { */ case 11: - _r$13 = fd[0].FullName(); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$13); - _arg$1 = new protoreflect.FullName(got); - _arg$2 = new protoreflect.FullName(want); - _r$14 = fmt.Sprintf("field %v has mismatching message descriptor: got %v, want %v", new sliceType$1([_arg, _arg$1, _arg$2])); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $panic(new $String(_r$14)); - /* } */ case 12: - _r$15 = fd[0].FullName(); /* */ $s = 15; case 15: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$3 = new protoreflect.FullName(_r$15); - _r$16 = m.Descriptor(); /* */ $s = 16; case 16: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.FullName(); /* */ $s = 17; case 17: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$4 = new protoreflect.FullName(_r$17); - _r$18 = fmt.Sprintf("field %v has mismatching message descriptor: %v", new sliceType$1([_arg$3, _arg$4])); /* */ $s = 18; case 18: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $panic(new $String(_r$18)); - /* } */ case 4: - _r$19 = $clone(p, pointer).Apply($clone(weakOffset[0], offset)); /* */ $s = 19; case 19: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, pointer).WeakFields(); /* */ $s = 20; case 20: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$5 = num[0]; - _r$21 = m.Interface(); /* */ $s = 21; case 21: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$6 = _r$21; - $r = _r$20.set(_arg$5, _arg$6); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, got, m, p, v, want, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset), (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b(p) { - var {$24r, _r$10, _r$11, _r$6, _r$7, _r$8, _r$9, _tuple, fs, m, ok, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = lazyInit[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = $clone(p, pointer).Apply($clone(weakOffset[0], offset)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).WeakFields(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - fs = _r$7; - _tuple = fs.get(num[0]); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!ok) { */ case 4: - _r$8 = messageType[0].New(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - fs.set(num[0], m); - /* } */ case 5: - _r$10 = m.ProtoReflect(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = protoreflect.ValueOfMessage(_r$10); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$6, _r$7, _r$8, _r$9, _tuple, fs, m, ok, p, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset), (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b() { - var {$24r, _r$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = lazyInit[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = messageType[0].New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$6, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset), (function(fd, lazyInit, messageType, num, once, weakOffset) { return function $b() { - var {$24r, _r$6, _r$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = lazyInit[0](); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = messageType[0].New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protoreflect.ValueOfMessage(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$6, _r$7, $s};return $f; - }; })(fd, lazyInit, messageType, num, once, weakOffset)); - /* */ } return; } var $f = {$blk: fieldInfoForWeakMessage, $c: true, $r, _r$5, fd, lazyInit, messageType, num, once, weakOffset, $s};return $f; - }; - fieldInfoForMessage = function(fd, fs, x) { - var {_r$5, conv, fd, fieldOffset, fs, ft, x, $s, $r, $c} = $restore(this, {fd, fs, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conv = [conv]; - fd = [fd]; - fieldOffset = [fieldOffset]; - fs = [fs]; - ft = fs[0].Type; - _r$5 = NewConverter(ft, fd[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - conv[0] = _r$5; - fieldOffset[0] = $clone(offsetOf($clone(fs[0], reflect.StructField), x), offset); - $s = -1; return new fieldInfo.ptr(fd[0], (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, _r$10, _r$6, _r$7, _r$8, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return false; - } - _r$6 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - rv = _r$8; - _r$9 = fs[0].Type.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (!((_r$9 === 22))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((_r$9 === 22))) { */ case 4: - _r$10 = isZero($clone(rv, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = !_r$10; - $s = 8; case 8: return $24r; - /* } */ case 5: - $s = -1; return !$clone(rv, reflect.Value).IsNil(); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$6, _r$7, _r$8, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {_r$6, _r$7, _r$8, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - rv = _r$8; - _r$9 = reflect.Zero($clone(rv, reflect.Value).Type()); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$6, _r$7, _r$8, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, $24r$1, _r$10, _r$6, _r$7, _r$8, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if ($clone(p, pointer).IsNil()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 1: - _r$6 = conv[0].Zero(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$7 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, pointer).AsValueOf(fs[0].Type); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - rv = _r$9; - _r$10 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$1 = _r$10; - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, _r$10, _r$6, _r$7, _r$8, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p, v) { - var {_arg, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, p, rv, v, $s, $r, $c} = $restore(this, {p, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - rv = _r$8; - _r$9 = conv[0].GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$10 = fs[0].Type.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if ((_r$10 === 22) && $clone(rv, reflect.Value).IsNil()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ((_r$10 === 22) && $clone(rv, reflect.Value).IsNil()) { */ case 6: - _r$11 = fd[0].FullName(); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$11); - _r$12 = fmt.Sprintf("field %v has invalid nil pointer", new sliceType$1([_arg])); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $panic(new $String(_r$12)); - /* } */ case 7: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, p, rv, v, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b(p) { - var {$24r, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - rv = _r$8; - _r$9 = fs[0].Type.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if ((_r$9 === 22) && $clone(rv, reflect.Value).IsNil()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((_r$9 === 22) && $clone(rv, reflect.Value).IsNil()) { */ case 4: - _r$10 = conv[0].New(); /* */ $s = 7; case 7: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = conv[0].GoValueOf($clone(_r$10, protoreflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $r = $clone(rv, reflect.Value).Set($clone(_r$11, reflect.Value)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _r$12 = conv[0].PBValueOf($clone(rv, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r = _r$12; - $s = 11; case 11: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, p, rv, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b() { - var {$24r, _r$6, _r$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, protoreflect.Value).Message(); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$6, _r$7, $s};return $f; - }; })(conv, fd, fieldOffset, fs), (function(conv, fd, fieldOffset, fs) { return function $b() { - var {$24r, _r$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = conv[0].New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$6, $s};return $f; - }; })(conv, fd, fieldOffset, fs)); - /* */ } return; } var $f = {$blk: fieldInfoForMessage, $c: true, $r, _r$5, conv, fd, fieldOffset, fs, ft, x, $s};return $f; - }; - makeOneofInfo = function(od, si, x) { - var {_entry, _entry$1, _r$5, _r$6, _r$7, _r$8, _r$9, fieldOffset, fieldOffset$1, fs, fs$1, od, oi, si, x, $s, $r, $c} = $restore(this, {od, si, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fieldOffset = [fieldOffset]; - fieldOffset$1 = [fieldOffset$1]; - fs = [fs]; - fs$1 = [fs$1]; - od = [od]; - si = [si]; - oi = new oneofInfo.ptr(od[0], $throwNilPointerError); - _r$5 = od[0].IsSynthetic(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$5) { */ case 1: - _r$6 = od[0].Fields(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Get(0); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Number(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - fs[0] = $clone((_entry = si[0].fieldsByNumber[protowire.Number.keyFor(_r$8)], _entry !== undefined ? _entry.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false)), reflect.StructField); - fieldOffset[0] = $clone(offsetOf($clone(fs[0], reflect.StructField), x), offset); - oi.which = (function(fieldOffset, fieldOffset$1, fs, fs$1, od, si) { return function $b(p) { - var {$24r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return 0; - } - _r$9 = $clone(p, pointer).Apply($clone(fieldOffset[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).AsValueOf(fs[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - rv = _r$11; - if ($clone(rv, reflect.Value).IsNil()) { - $s = -1; return 0; - } - _r$12 = od[0].Fields(); /* */ $s = 4; case 4: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Get(0); /* */ $s = 5; case 5: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = _r$13.Number(); /* */ $s = 6; case 6: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r = _r$14; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$9, p, rv, $s};return $f; - }; })(fieldOffset, fieldOffset$1, fs, fs$1, od, si); - $s = 3; continue; - /* } else { */ case 2: - _r$9 = od[0].Name(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - fs$1[0] = $clone((_entry$1 = si[0].oneofsByName[protoreflect.Name.keyFor(_r$9)], _entry$1 !== undefined ? _entry$1.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false)), reflect.StructField); - fieldOffset$1[0] = $clone(offsetOf($clone(fs$1[0], reflect.StructField), x), offset); - oi.which = (function(fieldOffset, fieldOffset$1, fs, fs$1, od, si) { return function $b(p) { - var {$24r, _entry$2, _r$10, _r$11, _r$12, _r$13, _r$14, p, rv, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return 0; - } - _r$10 = $clone(p, pointer).Apply($clone(fieldOffset$1[0], offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, pointer).AsValueOf(fs$1[0].Type); /* */ $s = 2; case 2: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - rv = _r$12; - if ($clone(rv, reflect.Value).IsNil()) { - $s = -1; return 0; - } - _r$13 = $clone(rv, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - rv = _r$13; - if ($clone(rv, reflect.Value).IsNil()) { - $s = -1; return 0; - } - _r$14 = $clone(rv, reflect.Value).Type().Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r = (_entry$2 = si[0].oneofWrappersByType[reflect.Type.keyFor(_r$14)], _entry$2 !== undefined ? _entry$2.v : 0); - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _entry$2, _r$10, _r$11, _r$12, _r$13, _r$14, p, rv, $s};return $f; - }; })(fieldOffset, fieldOffset$1, fs, fs$1, od, si); - /* } */ case 3: - $s = -1; return oi; - /* */ } return; } var $f = {$blk: makeOneofInfo, $c: true, $r, _entry, _entry$1, _r$5, _r$6, _r$7, _r$8, _r$9, fieldOffset, fieldOffset$1, fs, fs$1, od, oi, si, x, $s};return $f; - }; - isZero = function(v) { - var {_1, _r$5, _r$6, _r$7, _r$8, c, i, i$1, v, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = $clone(v, reflect.Value).Kind(); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 3; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 4; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 5; continue; } - /* */ if ((_1 === (15)) || (_1 === (16))) { $s = 6; continue; } - /* */ if (_1 === (17)) { $s = 7; continue; } - /* */ if ((_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { $s = 8; continue; } - /* */ if (_1 === (24)) { $s = 9; continue; } - /* */ if (_1 === (25)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return !$clone(v, reflect.Value).Bool(); - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 3: - $s = -1; return (x = $clone(v, reflect.Value).Int(), (x.$high === 0 && x.$low === 0)); - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 4: - $s = -1; return (x$1 = $clone(v, reflect.Value).Uint(), (x$1.$high === 0 && x$1.$low === 0)); - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 5: - $s = -1; return (x$2 = math.Float64bits($clone(v, reflect.Value).Float()), (x$2.$high === 0 && x$2.$low === 0)); - /* } else if ((_1 === (15)) || (_1 === (16))) { */ case 6: - c = $clone(v, reflect.Value).Complex(); - $s = -1; return (x$3 = math.Float64bits(c.$real), (x$3.$high === 0 && x$3.$low === 0)) && (x$4 = math.Float64bits(c.$imag), (x$4.$high === 0 && x$4.$low === 0)); - /* } else if (_1 === (17)) { */ case 7: - i = 0; - /* while (true) { */ case 13: - /* if (!(i < $clone(v, reflect.Value).Len())) { break; } */ if(!(i < $clone(v, reflect.Value).Len())) { $s = 14; continue; } - _r$5 = $clone(v, reflect.Value).Index(i); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = isZero($clone(_r$5, reflect.Value)); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!_r$6) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!_r$6) { */ case 15: - $s = -1; return false; - /* } */ case 16: - i = i + (1) >> 0; - $s = 13; continue; - case 14: - $s = -1; return true; - /* } else if ((_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (26))) { */ case 8: - $s = -1; return $clone(v, reflect.Value).IsNil(); - /* } else if (_1 === (24)) { */ case 9: - $s = -1; return $clone(v, reflect.Value).Len() === 0; - /* } else if (_1 === (25)) { */ case 10: - i$1 = 0; - /* while (true) { */ case 19: - /* if (!(i$1 < $clone(v, reflect.Value).NumField())) { break; } */ if(!(i$1 < $clone(v, reflect.Value).NumField())) { $s = 20; continue; } - _r$7 = $clone(v, reflect.Value).Field(i$1); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = isZero($clone(_r$7, reflect.Value)); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!_r$8) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!_r$8) { */ case 21: - $s = -1; return false; - /* } */ case 22: - i$1 = i$1 + (1) >> 0; - $s = 19; continue; - case 20: - $s = -1; return true; - /* } else { */ case 11: - $panic(new reflect.ValueError.ptr("reflect.Value.IsZero", $clone(v, reflect.Value).Kind())); - /* } */ case 12: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: isZero, $c: true, $r, _1, _r$5, _r$6, _r$7, _r$8, c, i, i$1, v, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - MessageInfo.ptr.prototype.makeReflectFuncs = function(t, si) { - var {mi, si, t, $s, $r, $c} = $restore(this, {t, si}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - $r = mi.makeKnownFieldsFunc($clone(si, structInfo)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - mi.makeUnknownFieldsFunc(t, $clone(si, structInfo)); - mi.makeExtensionFieldsFunc(t, $clone(si, structInfo)); - $r = mi.makeFieldTypes($clone(si, structInfo)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.makeReflectFuncs, $c: true, $r, mi, si, t, $s};return $f; - }; - MessageInfo.prototype.makeReflectFuncs = function(t, si) { return this.$val.makeReflectFuncs(t, si); }; - MessageInfo.ptr.prototype.makeKnownFieldsFunc = function(si) { - var {_arg, _arg$1, _arg$2, _arg$3, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _entry$5, _key, _key$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, _v$1, fd, fd$1, fd$2, fds, fi, fs, i, i$1, i$2, i$3, i$4, isOneof, md, mi, od, od$1, si, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {si}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - mi.reflectMessageInfo.fields = $makeMap(protowire.Number.keyFor, []); - md = mi.Desc; - _r$5 = md.Fields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - fds = _r$5; - i = 0; - /* while (true) { */ case 2: - _r$6 = fds.Len(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* if (!(i < _r$6)) { break; } */ if(!(i < _r$6)) { $s = 3; continue; } - fi = [fi]; - _r$7 = fds.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - fd = _r$7; - _r$8 = fd.Number(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - fs = $clone((_entry = si.fieldsByNumber[protowire.Number.keyFor(_r$8)], _entry !== undefined ? _entry.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false)), reflect.StructField); - _r$9 = fd.ContainingOneof(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - if (!(!($interfaceIsEqual(_r$9, $ifaceNil)))) { _v = false; $s = 7; continue s; } - _r$10 = fd.ContainingOneof(); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.IsSynthetic(); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _v = !_r$11; case 7: - isOneof = _v; - /* */ if (isOneof) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (isOneof) { */ case 11: - _r$12 = fd.ContainingOneof(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Name(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - reflect.StructField.copy(fs, (_entry$1 = si.oneofsByName[protoreflect.Name.keyFor(_r$13)], _entry$1 !== undefined ? _entry$1.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false))); - /* } */ case 12: - fi[0] = new fieldInfo.ptr($ifaceNil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - /* */ if ($interfaceIsEqual(fs.Type, $ifaceNil)) { $s = 16; continue; } - /* */ if (isOneof) { $s = 17; continue; } - _r$14 = fd.IsMap(); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (_r$14) { $s = 18; continue; } - _r$15 = fd.IsList(); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - /* */ if (_r$15) { $s = 19; continue; } - _r$16 = fd.IsWeak(); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (_r$16) { $s = 20; continue; } - _r$17 = fd.Message(); /* */ $s = 27; case 27: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$17, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if ($interfaceIsEqual(fs.Type, $ifaceNil)) { */ case 16: - fieldInfo.copy(fi[0], fieldInfoForMissing(fd)); - $s = 23; continue; - /* } else if (isOneof) { */ case 17: - _arg = fd; - _arg$1 = $clone(fs, reflect.StructField); - _arg$2 = mi.Exporter; - _r$18 = fd.Number(); /* */ $s = 28; case 28: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$3 = (_entry$2 = si.oneofWrappersByNumber[protowire.Number.keyFor(_r$18)], _entry$2 !== undefined ? _entry$2.v : $ifaceNil); - _r$19 = fieldInfoForOneof(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 29; case 29: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - fieldInfo.copy(fi[0], _r$19); - $s = 23; continue; - /* } else if (_r$14) { */ case 18: - _r$20 = fieldInfoForMap(fd, $clone(fs, reflect.StructField), mi.Exporter); /* */ $s = 30; case 30: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - fieldInfo.copy(fi[0], _r$20); - $s = 23; continue; - /* } else if (_r$15) { */ case 19: - _r$21 = fieldInfoForList(fd, $clone(fs, reflect.StructField), mi.Exporter); /* */ $s = 31; case 31: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - fieldInfo.copy(fi[0], _r$21); - $s = 23; continue; - /* } else if (_r$16) { */ case 20: - _r$22 = fieldInfoForWeakMessage(fd, $clone(si.weakOffset, offset)); /* */ $s = 32; case 32: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - fieldInfo.copy(fi[0], _r$22); - $s = 23; continue; - /* } else if (!($interfaceIsEqual(_r$17, $ifaceNil))) { */ case 21: - _r$23 = fieldInfoForMessage(fd, $clone(fs, reflect.StructField), mi.Exporter); /* */ $s = 33; case 33: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - fieldInfo.copy(fi[0], _r$23); - $s = 23; continue; - /* } else { */ case 22: - _r$24 = fieldInfoForScalar(fd, $clone(fs, reflect.StructField), mi.Exporter); /* */ $s = 34; case 34: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - fieldInfo.copy(fi[0], _r$24); - /* } */ case 23: - case 15: - _r$25 = fd.Number(); /* */ $s = 35; case 35: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _key = _r$25; (mi.reflectMessageInfo.fields || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key)] = { k: _key, v: fi[0] }; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - mi.reflectMessageInfo.oneofs = $makeMap(protoreflect.Name.keyFor, []); - i$1 = 0; - /* while (true) { */ case 36: - _r$26 = md.Oneofs(); /* */ $s = 38; case 38: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = _r$26.Len(); /* */ $s = 39; case 39: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* if (!(i$1 < _r$27)) { break; } */ if(!(i$1 < _r$27)) { $s = 37; continue; } - _r$28 = md.Oneofs(); /* */ $s = 40; case 40: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = _r$28.Get(i$1); /* */ $s = 41; case 41: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - od = _r$29; - _r$30 = od.Name(); /* */ $s = 42; case 42: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _r$31 = makeOneofInfo(od, $clone(si, structInfo), mi.Exporter); /* */ $s = 43; case 43: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _key$1 = _r$30; (mi.reflectMessageInfo.oneofs || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key$1)] = { k: _key$1, v: _r$31 }; - i$1 = i$1 + (1) >> 0; - $s = 36; continue; - case 37: - _r$32 = fds.Len(); /* */ $s = 44; case 44: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - mi.reflectMessageInfo.denseFields = $makeSlice(sliceType$15, ($imul(_r$32, 2))); - i$2 = 0; - /* while (true) { */ case 45: - _r$33 = fds.Len(); /* */ $s = 47; case 47: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - /* if (!(i$2 < _r$33)) { break; } */ if(!(i$2 < _r$33)) { $s = 46; continue; } - _r$34 = fds.Get(i$2); /* */ $s = 48; case 48: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - fd$1 = _r$34; - _r$35 = fd$1.Number(); /* */ $s = 51; case 51: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - /* */ if (((_r$35 >> 0)) < mi.reflectMessageInfo.denseFields.$length) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (((_r$35 >> 0)) < mi.reflectMessageInfo.denseFields.$length) { */ case 49: - _r$36 = fd$1.Number(); /* */ $s = 52; case 52: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _r$37 = fd$1.Number(); /* */ $s = 53; case 53: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - (x = mi.reflectMessageInfo.denseFields, x$1 = _r$37, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = (_entry$3 = mi.reflectMessageInfo.fields[protowire.Number.keyFor(_r$36)], _entry$3 !== undefined ? _entry$3.v : ptrType$37.nil))); - /* } */ case 50: - i$2 = i$2 + (1) >> 0; - $s = 45; continue; - case 46: - i$3 = 0; - /* while (true) { */ case 54: - _r$38 = fds.Len(); /* */ $s = 56; case 56: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - /* if (!(i$3 < _r$38)) { break; } */ if(!(i$3 < _r$38)) { $s = 55; continue; } - _r$39 = fds.Get(i$3); /* */ $s = 57; case 57: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - fd$2 = _r$39; - _r$40 = fd$2.ContainingOneof(); /* */ $s = 58; case 58: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - od$1 = _r$40; - if (!(!($interfaceIsEqual(od$1, $ifaceNil)))) { _v$1 = false; $s = 62; continue s; } - _r$41 = od$1.IsSynthetic(); /* */ $s = 63; case 63: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - _v$1 = !_r$41; case 62: - /* */ if (_v$1) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (_v$1) { */ case 59: - _r$42 = od$1.Name(); /* */ $s = 64; case 64: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - mi.reflectMessageInfo.rangeInfos = $append(mi.reflectMessageInfo.rangeInfos, (_entry$4 = mi.reflectMessageInfo.oneofs[protoreflect.Name.keyFor(_r$42)], _entry$4 !== undefined ? _entry$4.v : ptrType$38.nil)); - _r$43 = od$1.Fields(); /* */ $s = 65; case 65: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - _r$44 = _r$43.Len(); /* */ $s = 66; case 66: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - i$3 = i$3 + (_r$44) >> 0; - $s = 61; continue; - /* } else { */ case 60: - _r$45 = fd$2.Number(); /* */ $s = 67; case 67: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - mi.reflectMessageInfo.rangeInfos = $append(mi.reflectMessageInfo.rangeInfos, (_entry$5 = mi.reflectMessageInfo.fields[protowire.Number.keyFor(_r$45)], _entry$5 !== undefined ? _entry$5.v : ptrType$37.nil)); - i$3 = i$3 + (1) >> 0; - /* } */ case 61: - $s = 54; continue; - case 55: - if (mi.reflectMessageInfo.rangeInfos.$length > 1 && detrand.Bool()) { - i$4 = detrand.Intn(mi.reflectMessageInfo.rangeInfos.$length - 1 >> 0); - _tmp = (x$2 = mi.reflectMessageInfo.rangeInfos, x$3 = i$4 + 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])); - _tmp$1 = (x$4 = mi.reflectMessageInfo.rangeInfos, ((i$4 < 0 || i$4 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i$4])); - (x$5 = mi.reflectMessageInfo.rangeInfos, ((i$4 < 0 || i$4 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i$4] = _tmp)); - (x$6 = mi.reflectMessageInfo.rangeInfos, x$7 = i$4 + 1 >> 0, ((x$7 < 0 || x$7 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$7] = _tmp$1)); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.makeKnownFieldsFunc, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _entry$5, _key, _key$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, _v$1, fd, fd$1, fd$2, fds, fi, fs, i, i$1, i$2, i$3, i$4, isOneof, md, mi, od, od$1, si, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, $s};return $f; - }; - MessageInfo.prototype.makeKnownFieldsFunc = function(si) { return this.$val.makeKnownFieldsFunc(si); }; - MessageInfo.ptr.prototype.makeUnknownFieldsFunc = function(t, si) { - var mi, si, t; - mi = this; - if ($clone(si.unknownOffset, offset).IsValid() && $interfaceIsEqual(si.unknownType, unknownFieldsAType)) { - mi.reflectMessageInfo.getUnknown = (function $b(p) { - var {$24r, _r$5, _r$6, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return protoreflect.RawFields.nil; - } - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).Bytes(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = $convertSliceType(_r$6.$get(), protoreflect.RawFields); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$5, _r$6, p, $s};return $f; - }); - mi.reflectMessageInfo.setUnknown = (function $b(p, b) { - var {_r$5, _r$6, b, p, $s, $r, $c} = $restore(this, {p, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $panic(new $String("invalid SetUnknown on nil Message")); - } - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).Bytes(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set($convertSliceType(b, sliceType)); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, b, p, $s};return $f; - }); - } else if ($clone(si.unknownOffset, offset).IsValid() && $interfaceIsEqual(si.unknownType, unknownFieldsBType)) { - mi.reflectMessageInfo.getUnknown = (function $b(p) { - var {_r$5, _r$6, bp, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return protoreflect.RawFields.nil; - } - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).BytesPtr(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - bp = _r$6; - if (bp.$get() === ptrType$3.nil) { - $s = -1; return protoreflect.RawFields.nil; - } - $s = -1; return $convertSliceType(bp.$get().$get(), protoreflect.RawFields); - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, bp, p, $s};return $f; - }); - mi.reflectMessageInfo.setUnknown = (function $b(p, b) { - var {_r$5, _r$6, b, bp, p, $s, $r, $c} = $restore(this, {p, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $panic(new $String("invalid SetUnknown on nil Message")); - } - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).BytesPtr(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - bp = _r$6; - if (bp.$get() === ptrType$3.nil) { - bp.$set($newDataPointer(sliceType.nil, ptrType$3)); - } - bp.$get().$set($convertSliceType(b, sliceType)); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, b, bp, p, $s};return $f; - }); - } else { - mi.reflectMessageInfo.getUnknown = (function(param) { - var param; - return protoreflect.RawFields.nil; - }); - mi.reflectMessageInfo.setUnknown = (function(p, param) { - var p, param; - if ($clone(p, pointer).IsNil()) { - $panic(new $String("invalid SetUnknown on nil Message")); - } - }); - } - }; - MessageInfo.prototype.makeUnknownFieldsFunc = function(t, si) { return this.$val.makeUnknownFieldsFunc(t, si); }; - MessageInfo.ptr.prototype.makeExtensionFieldsFunc = function(t, si) { - var mi, si, t; - mi = this; - if ($clone(si.extensionOffset, offset).IsValid()) { - mi.reflectMessageInfo.extensionMap = (function $b(p) { - var {$24r, _ptr, _r$5, _r$6, _r$7, p, v, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(p, pointer).IsNil()) { - $s = -1; return (ptrType$39.nil); - } - _r$5 = $clone(p, pointer).Apply($clone(si.extensionOffset, offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).AsValueOf(extensionFieldsType); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - v = _r$6; - _r$7 = $clone(v, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = ((_ptr = $assertType(_r$7, ptrType$36), new ptrType$39(function() { return _ptr.$get(); }, function($v) { _ptr.$set($v); }, _ptr.$target))); - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _ptr, _r$5, _r$6, _r$7, p, v, $s};return $f; - }); - } else { - mi.reflectMessageInfo.extensionMap = (function(param) { - var param; - return (ptrType$39.nil); - }); - } - }; - MessageInfo.prototype.makeExtensionFieldsFunc = function(t, si) { return this.$val.makeExtensionFieldsFunc(t, si); }; - MessageInfo.ptr.prototype.makeFieldTypes = function(si) { - var {_entry, _entry$1, _entry$2, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, fd, fds, fs, ft, i, isMessage, isOneof, md, mi, si, $s, $r, $c} = $restore(this, {si}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - md = mi.Desc; - _r$5 = md.Fields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - fds = _r$5; - i = 0; - /* while (true) { */ case 2: - _r$6 = fds.Len(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* if (!(i < _r$6)) { break; } */ if(!(i < _r$6)) { $s = 3; continue; } - ft = $ifaceNil; - _r$7 = fds.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - fd = _r$7; - _r$8 = fd.Number(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - fs = $clone((_entry = si.fieldsByNumber[protowire.Number.keyFor(_r$8)], _entry !== undefined ? _entry.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false)), reflect.StructField); - _r$9 = fd.ContainingOneof(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - if (!(!($interfaceIsEqual(_r$9, $ifaceNil)))) { _v = false; $s = 7; continue s; } - _r$10 = fd.ContainingOneof(); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.IsSynthetic(); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _v = !_r$11; case 7: - isOneof = _v; - /* */ if (isOneof) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (isOneof) { */ case 11: - _r$12 = fd.ContainingOneof(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Name(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - reflect.StructField.copy(fs, (_entry$1 = si.oneofsByName[protoreflect.Name.keyFor(_r$13)], _entry$1 !== undefined ? _entry$1.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false))); - /* } */ case 12: - isMessage = false; - /* */ if ($interfaceIsEqual(fs.Type, $ifaceNil)) { $s = 16; continue; } - /* */ if (isOneof) { $s = 17; continue; } - _r$14 = fd.IsMap(); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (_r$14) { $s = 18; continue; } - _r$15 = fd.IsList(); /* */ $s = 24; case 24: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - /* */ if (_r$15) { $s = 19; continue; } - _r$16 = fd.Enum(); /* */ $s = 25; case 25: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$16, $ifaceNil))) { $s = 20; continue; } - _r$17 = fd.Message(); /* */ $s = 26; case 26: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$17, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if ($interfaceIsEqual(fs.Type, $ifaceNil)) { */ case 16: - i = i + (1) >> 0; - /* continue; */ $s = 2; continue; - $s = 22; continue; - /* } else if (isOneof) { */ case 17: - _r$18 = fd.Enum(); /* */ $s = 30; case 30: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(_r$18, $ifaceNil))) { _v$1 = true; $s = 29; continue s; } - _r$19 = fd.Message(); /* */ $s = 31; case 31: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _v$1 = !($interfaceIsEqual(_r$19, $ifaceNil)); case 29: - /* */ if (_v$1) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (_v$1) { */ case 27: - _r$20 = fd.Number(); /* */ $s = 32; case 32: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = (_entry$2 = si.oneofWrappersByNumber[protowire.Number.keyFor(_r$20)], _entry$2 !== undefined ? _entry$2.v : $ifaceNil).Field(0); /* */ $s = 33; case 33: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - ft = _r$21.Type; - /* } */ case 28: - $s = 22; continue; - /* } else if (_r$14) { */ case 18: - _r$22 = fd.MapValue(); /* */ $s = 37; case 37: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = _r$22.Enum(); /* */ $s = 38; case 38: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(_r$23, $ifaceNil))) { _v$2 = true; $s = 36; continue s; } - _r$24 = fd.MapValue(); /* */ $s = 39; case 39: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = _r$24.Message(); /* */ $s = 40; case 40: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _v$2 = !($interfaceIsEqual(_r$25, $ifaceNil)); case 36: - /* */ if (_v$2) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (_v$2) { */ case 34: - _r$26 = fs.Type.Elem(); /* */ $s = 41; case 41: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - ft = _r$26; - /* } */ case 35: - _r$27 = fd.MapValue(); /* */ $s = 42; case 42: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = _r$27.Message(); /* */ $s = 43; case 43: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - isMessage = !($interfaceIsEqual(_r$28, $ifaceNil)); - $s = 22; continue; - /* } else if (_r$15) { */ case 19: - _r$29 = fd.Enum(); /* */ $s = 47; case 47: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(_r$29, $ifaceNil))) { _v$3 = true; $s = 46; continue s; } - _r$30 = fd.Message(); /* */ $s = 48; case 48: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _v$3 = !($interfaceIsEqual(_r$30, $ifaceNil)); case 46: - /* */ if (_v$3) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (_v$3) { */ case 44: - _r$31 = fs.Type.Elem(); /* */ $s = 49; case 49: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - ft = _r$31; - /* } */ case 45: - _r$32 = fd.Message(); /* */ $s = 50; case 50: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - isMessage = !($interfaceIsEqual(_r$32, $ifaceNil)); - $s = 22; continue; - /* } else if (!($interfaceIsEqual(_r$16, $ifaceNil))) { */ case 20: - ft = fs.Type; - _r$33 = fd.HasPresence(); /* */ $s = 54; case 54: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - if (!(_r$33)) { _v$4 = false; $s = 53; continue s; } - _r$34 = ft.Kind(); /* */ $s = 55; case 55: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _v$4 = _r$34 === 22; case 53: - /* */ if (_v$4) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (_v$4) { */ case 51: - _r$35 = ft.Elem(); /* */ $s = 56; case 56: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - ft = _r$35; - /* } */ case 52: - $s = 22; continue; - /* } else if (!($interfaceIsEqual(_r$17, $ifaceNil))) { */ case 21: - ft = fs.Type; - _r$36 = fd.IsWeak(); /* */ $s = 59; case 59: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - /* */ if (_r$36) { $s = 57; continue; } - /* */ $s = 58; continue; - /* if (_r$36) { */ case 57: - ft = $ifaceNil; - /* } */ case 58: - isMessage = true; - /* } */ case 22: - case 15: - if (!(isMessage && !($interfaceIsEqual(ft, $ifaceNil)))) { _v$5 = false; $s = 62; continue s; } - _r$37 = ft.Kind(); /* */ $s = 63; case 63: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _v$5 = !((_r$37 === 22)); case 62: - /* */ if (_v$5) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (_v$5) { */ case 60: - ft = reflect.PtrTo(ft); - /* } */ case 61: - /* */ if (!($interfaceIsEqual(ft, $ifaceNil))) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (!($interfaceIsEqual(ft, $ifaceNil))) { */ case 64: - if (mi.reflectMessageInfo.fieldTypes === false) { - mi.reflectMessageInfo.fieldTypes = {}; - } - _r$38 = fd.Number(); /* */ $s = 66; case 66: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _r$39 = reflect.Zero(ft); /* */ $s = 67; case 67: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$40 = $clone(_r$39, reflect.Value).Interface(); /* */ $s = 68; case 68: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - _key = _r$38; (mi.reflectMessageInfo.fieldTypes || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key)] = { k: _key, v: _r$40 }; - /* } */ case 65: - i = i + (1) >> 0; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.makeFieldTypes, $c: true, $r, _entry, _entry$1, _entry$2, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, fd, fds, fs, ft, i, isMessage, isOneof, md, mi, si, $s};return $f; - }; - MessageInfo.prototype.makeFieldTypes = function(si) { return this.$val.makeFieldTypes(si); }; - $ptrType(extensionMap).prototype.Range = function(f) { - var {_entry, _i, _keys, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, f, m, v, x, xd, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - /* */ if (!(m === ptrType$39.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(m === ptrType$39.nil)) { */ case 1: - _ref = m.$get(); - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 3: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 4; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 3; continue; - } - x = $clone(_entry.v, ExtensionField); - _r$5 = $clone(x, ExtensionField).Type().TypeDescriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xd = _r$5; - _r$6 = x.Value(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - v = $clone(_r$6, protoreflect.Value); - _r$7 = xd.IsList(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - if (!(_r$7)) { _v = false; $s = 9; continue s; } - _r$8 = $clone(v, protoreflect.Value).List(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Len(); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v = _r$9 === 0; case 9: - /* */ if (_v) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_v) { */ case 7: - _i++; - /* continue; */ $s = 3; continue; - /* } */ case 8: - _r$10 = f(xd, $clone(v, protoreflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (!_r$10) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!_r$10) { */ case 13: - $s = -1; return; - /* } */ case 14: - _i++; - $s = 3; continue; - case 4: - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $ptrType(extensionMap).prototype.Range, $c: true, $r, _entry, _i, _keys, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, f, m, v, x, xd, $s};return $f; - }; - $ptrType(extensionMap).prototype.Has = function(xt) { - var {$24r, $24r$1, $24r$2, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, m, ok, x, xd, xt, $s, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ok = false; - m = this; - if (m === ptrType$39.nil) { - ok = false; - $s = -1; return ok; - } - _r$5 = xt.TypeDescriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xd = _r$5; - _r$6 = xd.Number(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = (_entry = (m.$get())[$Int32.keyFor(((_r$6 >> 0)))], _entry !== undefined ? [_entry.v, true] : [new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil), false]); - x = $clone(_tuple[0], ExtensionField); - ok = _tuple[1]; - if (!ok) { - ok = false; - $s = -1; return ok; - } - _r$7 = xd.IsList(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 4; continue; } - _r$8 = xd.IsMap(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8) { $s = 5; continue; } - _r$9 = xd.Message(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$9, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$7) { */ case 4: - _r$10 = x.Value(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, protoreflect.Value).List(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.Len(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - ok = _r$12 > 0; - $24r = ok; - $s = 14; case 14: return $24r; - /* } else if (_r$8) { */ case 5: - _r$13 = x.Value(); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, protoreflect.Value).Map(); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = _r$14.Len(); /* */ $s = 17; case 17: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - ok = _r$15 > 0; - $24r$1 = ok; - $s = 18; case 18: return $24r$1; - /* } else if (!($interfaceIsEqual(_r$9, $ifaceNil))) { */ case 6: - _r$16 = x.Value(); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(_r$16, protoreflect.Value).Message(); /* */ $s = 20; case 20: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = _r$17.IsValid(); /* */ $s = 21; case 21: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - ok = _r$18; - $24r$2 = ok; - $s = 22; case 22: return $24r$2; - /* } */ case 7: - case 3: - ok = true; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: $ptrType(extensionMap).prototype.Has, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, m, ok, x, xd, xt, $s};return $f; - }; - $ptrType(extensionMap).prototype.Clear = function(xt) { - var {_r$5, _r$6, m, xt, $s, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = xt.TypeDescriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Number(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - delete m.$get()[$Int32.keyFor(((_r$6 >> 0)))]; - $s = -1; return; - /* */ } return; } var $f = {$blk: $ptrType(extensionMap).prototype.Clear, $c: true, $r, _r$5, _r$6, m, xt, $s};return $f; - }; - $ptrType(extensionMap).prototype.Get = function(xt) { - var {$24r, $24r$1, _entry, _r$5, _r$6, _r$7, _r$8, _tuple, m, ok, x, xd, xt, $s, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = xt.TypeDescriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xd = _r$5; - /* */ if (!(m === ptrType$39.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(m === ptrType$39.nil)) { */ case 2: - _r$6 = xd.Number(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = (_entry = (m.$get())[$Int32.keyFor(((_r$6 >> 0)))], _entry !== undefined ? [_entry.v, true] : [new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil), false]); - x = $clone(_tuple[0], ExtensionField); - ok = _tuple[1]; - /* */ if (ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ok) { */ case 5: - _r$7 = x.Value(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 8; case 8: return $24r; - /* } */ case 6: - /* } */ case 3: - _r$8 = xt.Zero(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 10; case 10: return $24r$1; - /* */ } return; } var $f = {$blk: $ptrType(extensionMap).prototype.Get, $c: true, $r, $24r, $24r$1, _entry, _r$5, _r$6, _r$7, _r$8, _tuple, m, ok, x, xd, xt, $s};return $f; - }; - $ptrType(extensionMap).prototype.Set = function(xt, v) { - var {_arg, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, isValid, m, v, x, xd, xt, $s, $r, $c} = $restore(this, {xt, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = xt.TypeDescriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xd = _r$5; - isValid = true; - _r$6 = xt.IsValidValue($clone(v, protoreflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!_r$6) { $s = 3; continue; } - _r$7 = xd.IsList(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 4; continue; } - _r$8 = xd.IsMap(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8) { $s = 5; continue; } - _r$9 = xd.Message(); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$9, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!_r$6) { */ case 3: - isValid = false; - $s = 7; continue; - /* } else if (_r$7) { */ case 4: - _r$10 = $clone(v, protoreflect.Value).List(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.IsValid(); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - isValid = _r$11; - $s = 7; continue; - /* } else if (_r$8) { */ case 5: - _r$12 = $clone(v, protoreflect.Value).Map(); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.IsValid(); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - isValid = _r$13; - $s = 7; continue; - /* } else if (!($interfaceIsEqual(_r$9, $ifaceNil))) { */ case 6: - _r$14 = $clone(v, protoreflect.Value).Message(); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = _r$14.IsValid(); /* */ $s = 17; case 17: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - isValid = _r$15; - /* } */ case 7: - case 2: - /* */ if (!isValid) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!isValid) { */ case 18: - _r$16 = xt.TypeDescriptor(); /* */ $s = 20; case 20: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.FullName(); /* */ $s = 21; case 21: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$17); - _r$18 = fmt.Sprintf("%v: assigning invalid value", new sliceType$1([_arg])); /* */ $s = 22; case 22: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $panic(new $String(_r$18)); - /* } */ case 19: - if (m.$get() === false) { - m.$set({}); - } - x = new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil); - x.Set(xt, $clone(v, protoreflect.Value)); - _r$19 = xd.Number(); /* */ $s = 23; case 23: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _key = ((_r$19 >> 0)); (m.$get() || $throwRuntimeError("assignment to entry in nil map"))[$Int32.keyFor(_key)] = { k: _key, v: $clone(x, ExtensionField) }; - $s = -1; return; - /* */ } return; } var $f = {$blk: $ptrType(extensionMap).prototype.Set, $c: true, $r, _arg, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, isValid, m, v, x, xd, xt, $s};return $f; - }; - $ptrType(extensionMap).prototype.Mutable = function(xt) { - var {$24r, _entry, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _v, _v$1, _v$2, m, ok, v, x, xd, xt, $s, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = xt.TypeDescriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xd = _r$5; - _r$6 = xd.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - if (!(!((_r$6 === 11)))) { _v$2 = false; $s = 6; continue s; } - _r$7 = xd.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v$2 = !((_r$7 === 10)); case 6: - if (!(_v$2)) { _v$1 = false; $s = 5; continue s; } - _r$8 = xd.IsList(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v$1 = !_r$8; case 5: - if (!(_v$1)) { _v = false; $s = 4; continue s; } - _r$9 = xd.IsMap(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v = !_r$9; case 4: - /* */ if (_v) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_v) { */ case 2: - $panic(new $String("invalid Mutable on field with non-composite type")); - /* } */ case 3: - _r$10 = xd.Number(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = (_entry = (m.$get())[$Int32.keyFor(((_r$10 >> 0)))], _entry !== undefined ? [_entry.v, true] : [new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil), false]); - x = $clone(_tuple[0], ExtensionField); - ok = _tuple[1]; - /* */ if (ok) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (ok) { */ case 12: - _r$11 = x.Value(); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 15; case 15: return $24r; - /* } */ case 13: - _r$12 = xt.New(); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - v = $clone(_r$12, protoreflect.Value); - $r = m.Set(xt, $clone(v, protoreflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return v; - /* */ } return; } var $f = {$blk: $ptrType(extensionMap).prototype.Mutable, $c: true, $r, $24r, _entry, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _v, _v$1, _v$2, m, ok, v, x, xd, xt, $s};return $f; - }; - MessageInfo.ptr.prototype.MessageOf = function(m) { - var {$24r, _r$5, _r$6, _r$7, m, mi, p, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - /* */ if (!($interfaceIsEqual(reflect.TypeOf(m), mi.GoReflectType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(reflect.TypeOf(m), mi.GoReflectType))) { */ case 1: - _r$5 = fmt.Sprintf("type mismatch: got %T, want %v", new sliceType$1([m, mi.GoReflectType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - _r$6 = pointerOfIface(m); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - p = $clone(_r$6, pointer); - /* */ if ($clone(p, pointer).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 5: - _r$7 = mi.reflectMessageInfo.nilMessage.Init(mi); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 8; case 8: return $24r; - /* } */ case 6: - $s = -1; return new messageReflectWrapper.ptr($clone(p, pointer), mi); - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.MessageOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, m, mi, p, $s};return $f; - }; - MessageInfo.prototype.MessageOf = function(m) { return this.$val.MessageOf(m); }; - messageReflectWrapper.ptr.prototype.pointer = function() { - var m; - m = this; - return m.p; - }; - messageReflectWrapper.prototype.pointer = function() { return this.$val.pointer(); }; - messageReflectWrapper.ptr.prototype.messageInfo = function() { - var m; - m = this; - return m.mi; - }; - messageReflectWrapper.prototype.messageInfo = function() { return this.$val.messageInfo(); }; - messageIfaceWrapper.ptr.prototype.Reset = function() { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, m, mr, ok, rv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.protoUnwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, interfaceType$1, true); - mr = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - $r = mr.Reset(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 3: - _r$6 = m.protoUnwrap(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.ValueOf(_r$6); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - rv = _r$7; - /* */ if (($clone(rv, reflect.Value).Kind() === 22) && !$clone(rv, reflect.Value).IsNil()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (($clone(rv, reflect.Value).Kind() === 22) && !$clone(rv, reflect.Value).IsNil()) { */ case 7: - _r$8 = $clone(rv, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(rv, reflect.Value).Type().Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = reflect.Zero(_r$9); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = $clone(_r$8, reflect.Value).Set($clone(_r$10, reflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return; - /* */ } return; } var $f = {$blk: messageIfaceWrapper.ptr.prototype.Reset, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, m, mr, ok, rv, $s};return $f; - }; - messageIfaceWrapper.prototype.Reset = function() { return this.$val.Reset(); }; - messageIfaceWrapper.ptr.prototype.ProtoReflect = function() { - var m; - m = this; - return ($pointerOfStructConversion(m, ptrType$1)); - }; - messageIfaceWrapper.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - messageIfaceWrapper.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, _r$6, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = m.mi.GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(m.p, pointer).AsIfaceOf(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: messageIfaceWrapper.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, _r$6, m, $s};return $f; - }; - messageIfaceWrapper.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - MessageInfo.ptr.prototype.checkField = function(fd) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, fd, fi, got, got$1, mi, n, ok, want, want$1, x, xtd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - fi = ptrType$37.nil; - _r$5 = fd.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - n = _r$5; - if (0 < n && ((n >> 0)) < mi.reflectMessageInfo.denseFields.$length) { - fi = (x = mi.reflectMessageInfo.denseFields, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])); - } else { - fi = (_entry = mi.reflectMessageInfo.fields[protowire.Number.keyFor(n)], _entry !== undefined ? _entry.v : ptrType$37.nil); - } - /* */ if (!(fi === ptrType$37.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(fi === ptrType$37.nil)) { */ case 2: - /* */ if (!($interfaceIsEqual(fi.fieldDesc, fd))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(fi.fieldDesc, fd))) { */ case 4: - _r$6 = fd.FullName(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp = _r$6; - _r$7 = fi.fieldDesc.FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$1 = _r$7; - got = _tmp; - want = _tmp$1; - /* */ if (!(got === want)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(got === want)) { */ case 8: - _r$8 = fmt.Sprintf("mismatching field: got %v, want %v", new sliceType$1([new protoreflect.FullName(got), new protoreflect.FullName(want)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $panic(new $String(_r$8)); - /* } */ case 9: - _r$9 = fd.FullName(); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$9); - _r$10 = fmt.Sprintf("mismatching field: %v", new sliceType$1([_arg])); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $panic(new $String(_r$10)); - /* } */ case 5: - $s = -1; return [fi, $ifaceNil]; - /* } */ case 3: - _r$11 = fd.IsExtension(); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_r$11) { */ case 13: - _r$12 = fd.ContainingMessage(); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.FullName(); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tmp$2 = _r$13; - _r$14 = mi.Desc.FullName(); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tmp$3 = _r$14; - got$1 = _tmp$2; - want$1 = _tmp$3; - /* */ if (!(got$1 === want$1)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!(got$1 === want$1)) { */ case 19: - _r$15 = fd.FullName(); /* */ $s = 21; case 21: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.FullName(_r$15); - _arg$2 = new protoreflect.FullName(got$1); - _arg$3 = new protoreflect.FullName(want$1); - _r$16 = fmt.Sprintf("extension %v has mismatching containing message: got %v, want %v", new sliceType$1([_arg$1, _arg$2, _arg$3])); /* */ $s = 22; case 22: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $panic(new $String(_r$16)); - /* } */ case 20: - _r$17 = mi.Desc.ExtensionRanges(); /* */ $s = 25; case 25: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = fd.Number(); /* */ $s = 26; case 26: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = _r$17.Has(_r$18); /* */ $s = 27; case 27: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - /* */ if (!_r$19) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!_r$19) { */ case 23: - _r$20 = fd.FullName(); /* */ $s = 28; case 28: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$4 = new protoreflect.FullName(_r$20); - _r$21 = mi.Desc.FullName(); /* */ $s = 29; case 29: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$5 = new protoreflect.FullName(_r$21); - _r$22 = fmt.Sprintf("extension %v extends %v outside the extension range", new sliceType$1([_arg$4, _arg$5])); /* */ $s = 30; case 30: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $panic(new $String(_r$22)); - /* } */ case 24: - _tuple = $assertType(fd, protoreflect.ExtensionTypeDescriptor, true); - xtd = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!ok) { */ case 31: - _r$23 = fd.FullName(); /* */ $s = 33; case 33: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _arg$6 = new protoreflect.FullName(_r$23); - _r$24 = fmt.Sprintf("extension %v does not implement protoreflect.ExtensionTypeDescriptor", new sliceType$1([_arg$6])); /* */ $s = 34; case 34: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - $panic(new $String(_r$24)); - /* } */ case 32: - _r$25 = xtd.Type(); /* */ $s = 35; case 35: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - $24r = [ptrType$37.nil, _r$25]; - $s = 36; case 36: return $24r; - /* } */ case 14: - _r$26 = fd.FullName(); /* */ $s = 37; case 37: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _arg$7 = new protoreflect.FullName(_r$26); - _r$27 = fmt.Sprintf("field %v is invalid", new sliceType$1([_arg$7])); /* */ $s = 38; case 38: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $panic(new $String(_r$27)); - $s = -1; return [ptrType$37.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.checkField, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _entry, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, fd, fi, got, got$1, mi, n, ok, want, want$1, x, xtd, $s};return $f; - }; - MessageInfo.prototype.checkField = function(fd) { return this.$val.checkField(fd); }; - getMessageInfo = function(mt) { - var {$24r, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, m, mr, mt, ok, $s, $r, $c} = $restore(this, {mt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = reflect.Zero(mt); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = $assertType(_r$6, protoreflect.ProtoMessage, true); - m = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return ptrType$5.nil; - } - _r$7 = m.ProtoReflect(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = $assertType(_r$7, interfaceType$2, true); - mr = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return ptrType$5.nil; - } - _r$8 = mr.ProtoMessageInfo(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: getMessageInfo, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, m, mr, mt, ok, $s};return $f; - }; - MessageInfo.ptr.prototype.init = function() { - var {mi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - /* */ if (atomic.LoadUint32((mi.$ptr_initDone || (mi.$ptr_initDone = new ptrType$17(function() { return this.$target.initDone; }, function($v) { this.$target.initDone = $v; }, mi)))) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.LoadUint32((mi.$ptr_initDone || (mi.$ptr_initDone = new ptrType$17(function() { return this.$target.initDone; }, function($v) { this.$target.initDone = $v; }, mi)))) === 0) { */ case 1: - $r = mi.initOnce(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.init, $c: true, $r, mi, $s};return $f; - }; - MessageInfo.prototype.init = function() { return this.$val.init(); }; - MessageInfo.ptr.prototype.initOnce = function() { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _v, mi, si, t, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - mi = this; - $r = mi.initMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(mi.initMu, "Unlock"), []]); - /* */ if (mi.initDone === 1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (mi.initDone === 1) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - t = mi.GoReflectType; - _r$5 = t.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(!((_r$5 === 22)))) { _v = false; $s = 7; continue s; } - _r$6 = t.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Kind(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !((_r$7 === 25)); case 7: - /* */ if (_v) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_v) { */ case 5: - _r$8 = fmt.Sprintf("got %v, want *struct kind", new sliceType$1([t])); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $panic(new $String(_r$8)); - /* } */ case 6: - _r$9 = t.Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - t = _r$9; - _r$10 = mi.makeStructInfo(t); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - si = $clone(_r$10, structInfo); - $r = mi.makeReflectFuncs(t, $clone(si, structInfo)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = mi.makeCoderMethods(t, $clone(si, structInfo)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - atomic.StoreUint32((mi.$ptr_initDone || (mi.$ptr_initDone = new ptrType$17(function() { return this.$target.initDone; }, function($v) { this.$target.initDone = $v; }, mi))), 1); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: MessageInfo.ptr.prototype.initOnce, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _v, mi, si, t, $s, $deferred};return $f; } } - }; - MessageInfo.prototype.initOnce = function() { return this.$val.initOnce(); }; - MessageInfo.ptr.prototype.getPointer = function(m) { - var _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, m, m$1, m$2, mi, ok, p; - p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - ok = false; - mi = this; - _ref = m; - if ($assertType(_ref, ptrType, true)[1]) { - m$1 = _ref.$val; - _tmp = $clone(m$1.pointer(), pointer); - _tmp$1 = m$1.messageInfo() === mi; - pointer.copy(p, _tmp); - ok = _tmp$1; - return [p, ok]; - } else if ($assertType(_ref, ptrType$1, true)[1]) { - m$2 = _ref.$val; - _tmp$2 = $clone(m$2.pointer(), pointer); - _tmp$3 = m$2.messageInfo() === mi; - pointer.copy(p, _tmp$2); - ok = _tmp$3; - return [p, ok]; - } - _tmp$4 = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - _tmp$5 = false; - pointer.copy(p, _tmp$4); - ok = _tmp$5; - return [p, ok]; - }; - MessageInfo.prototype.getPointer = function(m) { return this.$val.getPointer(m); }; - MessageInfo.ptr.prototype.makeStructInfo = function(t) { - var {_1, _i, _i$1, _i$2, _i$3, _i$4, _key, _key$1, _key$2, _key$3, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, _tuple$3, f, f$1, fn, i, method, mi, n, n$1, ok, ok$1, oneofWrappers, s, s$1, s$2, si, t, tf, v, v$1, vs, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - si = new structInfo.ptr($clone(invalidOffset, offset), $ifaceNil, $clone(invalidOffset, offset), $ifaceNil, $clone(invalidOffset, offset), $ifaceNil, $clone(invalidOffset, offset), $ifaceNil, $makeMap(protowire.Number.keyFor, []), $makeMap(protoreflect.Name.keyFor, []), $makeMap(reflect.Type.keyFor, []), $makeMap(protowire.Number.keyFor, [])); - i = 0; - /* while (true) { */ case 1: - _r$5 = t.NumField(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* if (!(i < _r$5)) { break; } */ if(!(i < _r$5)) { $s = 2; continue; } - _r$6 = t.Field(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - f = $clone(_r$6, reflect.StructField); - _1 = f.Name; - if (_1 === ("sizeCache") || _1 === ("XXX_sizecache")) { - if ($interfaceIsEqual(f.Type, sizecacheType)) { - offset.copy(si.sizecacheOffset, offsetOf($clone(f, reflect.StructField), mi.Exporter)); - si.sizecacheType = f.Type; - } - } else if (_1 === ("weakFields") || _1 === ("XXX_weak")) { - if ($interfaceIsEqual(f.Type, weakFieldsType)) { - offset.copy(si.weakOffset, offsetOf($clone(f, reflect.StructField), mi.Exporter)); - si.weakType = f.Type; - } - } else if (_1 === ("unknownFields") || _1 === ("XXX_unrecognized")) { - if ($interfaceIsEqual(f.Type, unknownFieldsAType) || $interfaceIsEqual(f.Type, unknownFieldsBType)) { - offset.copy(si.unknownOffset, offsetOf($clone(f, reflect.StructField), mi.Exporter)); - si.unknownType = f.Type; - } - } else if (_1 === ("extensionFields") || _1 === ("XXX_InternalExtensions") || _1 === ("XXX_extensions")) { - if ($interfaceIsEqual(f.Type, extensionFieldsType)) { - offset.copy(si.extensionOffset, offsetOf($clone(f, reflect.StructField), mi.Exporter)); - si.extensionType = f.Type; - } - } else { - _ref = strings.Split(new reflect.StructTag(f.Tag).Get("protobuf"), ","); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (s.length > 0 && strings.Trim(s, "0123456789") === "") { - _tuple = strconv.ParseUint(s, 10, 64); - n = _tuple[0]; - _key = ((n.$low >> 0)); (si.fieldsByNumber || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key)] = { k: _key, v: $clone(f, reflect.StructField) }; - i = i + (1) >> 0; - /* continue fieldLoop; */ $s = 1; continue s; - } - _i++; - } - s$1 = new reflect.StructTag(f.Tag).Get("protobuf_oneof"); - if (s$1.length > 0) { - _key$1 = (s$1); (si.oneofsByName || $throwRuntimeError("assignment to entry in nil map"))[protoreflect.Name.keyFor(_key$1)] = { k: _key$1, v: $clone(f, reflect.StructField) }; - i = i + (1) >> 0; - /* continue fieldLoop; */ $s = 1; continue s; - } - } - case 4: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - oneofWrappers = mi.OneofWrappers; - _ref$1 = new sliceType$10(["XXX_OneofFuncs", "XXX_OneofWrappers"]); - _i$1 = 0; - /* while (true) { */ case 6: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 7; continue; } - method = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$7 = reflect.PtrTo(t).MethodByName(method); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - fn = $clone(_tuple$1[0], reflect.Method); - ok = _tuple$1[1]; - /* */ if (ok) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ok) { */ case 9: - _r$8 = fn.Type.In(0); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = reflect.Zero(_r$8); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(fn.Func, reflect.Value).Call(new sliceType$13([$clone(_r$9, reflect.Value)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _ref$2 = _r$10; - _i$2 = 0; - /* while (true) { */ case 14: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 15; continue; } - v = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - _r$11 = $clone(v, reflect.Value).Interface(); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$2 = $assertType(_r$11, sliceType$1, true); - vs = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (ok$1) { - oneofWrappers = vs; - } - _i$2++; - $s = 14; continue; - case 15: - /* } */ case 10: - _i$1++; - $s = 6; continue; - case 7: - _ref$3 = oneofWrappers; - _i$3 = 0; - /* while (true) { */ case 17: - /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 18; continue; } - v$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - _r$12 = reflect.TypeOf(v$1).Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - tf = _r$12; - _r$13 = tf.Field(0); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - f$1 = $clone(_r$13, reflect.StructField); - _ref$4 = strings.Split(new reflect.StructTag(f$1.Tag).Get("protobuf"), ","); - _i$4 = 0; - while (true) { - if (!(_i$4 < _ref$4.$length)) { break; } - s$2 = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); - if (s$2.length > 0 && strings.Trim(s$2, "0123456789") === "") { - _tuple$3 = strconv.ParseUint(s$2, 10, 64); - n$1 = _tuple$3[0]; - _key$2 = tf; (si.oneofWrappersByType || $throwRuntimeError("assignment to entry in nil map"))[reflect.Type.keyFor(_key$2)] = { k: _key$2, v: ((n$1.$low >> 0)) }; - _key$3 = ((n$1.$low >> 0)); (si.oneofWrappersByNumber || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key$3)] = { k: _key$3, v: tf }; - break; - } - _i$4++; - } - _i$3++; - $s = 17; continue; - case 18: - $s = -1; return si; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.makeStructInfo, $c: true, $r, _1, _i, _i$1, _i$2, _i$3, _i$4, _key, _key$1, _key$2, _key$3, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, _tuple$3, f, f$1, fn, i, method, mi, n, n$1, ok, ok$1, oneofWrappers, s, s$1, s$2, si, t, tf, v, v$1, vs, $s};return $f; - }; - MessageInfo.prototype.makeStructInfo = function(t) { return this.$val.makeStructInfo(t); }; - MessageInfo.ptr.prototype.New = function() { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, m, mi, ok, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - _r$5 = mi.GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - m = _r$7; - _tuple = $assertType(m, protoreflect.ProtoMessage, true); - r = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok) { */ case 4: - _r$8 = r.ProtoReflect(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 7; case 7: return $24r; - /* } */ case 5: - _r$9 = mi.MessageOf(m); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$1 = _r$9; - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.New, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, m, mi, ok, r, $s};return $f; - }; - MessageInfo.prototype.New = function() { return this.$val.New(); }; - MessageInfo.ptr.prototype.Zero = function() { - var {$24r, _r$5, _r$6, _r$7, mi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - _r$5 = reflect.Zero(mi.GoReflectType); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = mi.MessageOf(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, _r$6, _r$7, mi, $s};return $f; - }; - MessageInfo.prototype.Zero = function() { return this.$val.Zero(); }; - MessageInfo.ptr.prototype.Descriptor = function() { - var mi; - mi = this; - return mi.Desc; - }; - MessageInfo.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - MessageInfo.ptr.prototype.Enum = function(i) { - var {$24r, _entry, _r$5, _r$6, _r$7, _r$8, fd, i, mi, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = mi.Desc.Fields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Get(i); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - _r$7 = fd.Number(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = new Export.ptr().EnumTypeOf((_entry = mi.reflectMessageInfo.fieldTypes[protowire.Number.keyFor(_r$7)], _entry !== undefined ? _entry.v : $ifaceNil)); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.Enum, $c: true, $r, $24r, _entry, _r$5, _r$6, _r$7, _r$8, fd, i, mi, $s};return $f; - }; - MessageInfo.prototype.Enum = function(i) { return this.$val.Enum(i); }; - MessageInfo.ptr.prototype.Message = function(i) { - var {$24r, $24r$1, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, fd, i, mi, mt, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = mi.Desc.Fields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Get(i); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - _r$7 = fd.IsWeak(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 5; continue; } - _r$8 = fd.IsMap(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$7) { */ case 5: - _r$9 = fd.Message(); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.FullName(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = protoregistry.GlobalTypes.FindMessageByName(_r$10); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple = _r$11; - mt = _tuple[0]; - $s = -1; return mt; - /* } else if (_r$8) { */ case 6: - _r$12 = fd.Message(); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = fd.Number(); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = (x = new mapEntryType.ptr(_r$12, (_entry = mi.reflectMessageInfo.fieldTypes[protowire.Number.keyFor(_r$13)], _entry !== undefined ? _entry.v : $ifaceNil)), new x.constructor.elem(x)); - $s = 16; case 16: return $24r; - /* } else { */ case 7: - _r$14 = fd.Number(); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = new Export.ptr().MessageTypeOf((_entry$1 = mi.reflectMessageInfo.fieldTypes[protowire.Number.keyFor(_r$14)], _entry$1 !== undefined ? _entry$1.v : $ifaceNil)); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$1 = _r$15; - $s = 19; case 19: return $24r$1; - /* } */ case 8: - case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.Message, $c: true, $r, $24r, $24r$1, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, fd, i, mi, mt, x, $s};return $f; - }; - MessageInfo.prototype.Message = function(i) { return this.$val.Message(i); }; - mapEntryType.ptr.prototype.New = function() { - var mt; - mt = this; - return $ifaceNil; - }; - mapEntryType.prototype.New = function() { return this.$val.New(); }; - mapEntryType.ptr.prototype.Zero = function() { - var mt; - mt = this; - return $ifaceNil; - }; - mapEntryType.prototype.Zero = function() { return this.$val.Zero(); }; - mapEntryType.ptr.prototype.Descriptor = function() { - var mt; - mt = this; - return mt.desc; - }; - mapEntryType.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - mapEntryType.ptr.prototype.Enum = function(i) { - var {$24r, _r$5, _r$6, _r$7, _r$8, fd, i, mt, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mt = this; - _r$5 = mt.desc.Fields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Get(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - _r$7 = fd.Enum(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$7, $ifaceNil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($interfaceIsEqual(_r$7, $ifaceNil)) { */ case 3: - $s = -1; return $ifaceNil; - /* } */ case 4: - _r$8 = new Export.ptr().EnumTypeOf(mt.valType); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: mapEntryType.ptr.prototype.Enum, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, fd, i, mt, $s};return $f; - }; - mapEntryType.prototype.Enum = function(i) { return this.$val.Enum(i); }; - mapEntryType.ptr.prototype.Message = function(i) { - var {$24r, _r$5, _r$6, _r$7, _r$8, fd, i, mt, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mt = this; - _r$5 = mt.desc.Fields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Get(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - _r$7 = fd.Message(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$7, $ifaceNil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($interfaceIsEqual(_r$7, $ifaceNil)) { */ case 3: - $s = -1; return $ifaceNil; - /* } */ case 4: - _r$8 = new Export.ptr().MessageTypeOf(mt.valType); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: mapEntryType.ptr.prototype.Message, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, fd, i, mt, $s};return $f; - }; - mapEntryType.prototype.Message = function(i) { return this.$val.Message(i); }; - mergeBool = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Bool(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBool, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeBoolNoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!(v === false)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(v === false)) { */ case 2: - _r$6 = $clone(dst, pointer).Bool(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBoolNoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeBoolPtr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).BoolPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$8.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$8.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).BoolPtr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$8(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBoolPtr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeBoolSlice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).BoolSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).BoolSlice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBoolSlice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeInt32 = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Int32(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt32, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeInt32NoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!((v === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((v === 0))) { */ case 2: - _r$6 = $clone(dst, pointer).Int32(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt32NoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeInt32Ptr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$11.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$11.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).Int32Ptr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$11(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt32Ptr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeInt32Slice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).Int32Slice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt32Slice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeUint32 = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Uint32(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint32, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeUint32NoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!((v === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((v === 0))) { */ case 2: - _r$6 = $clone(dst, pointer).Uint32(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint32NoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeUint32Ptr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).Uint32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$17.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$17.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).Uint32Ptr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint32Ptr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeUint32Slice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).Uint32Slice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint32Slice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeInt64 = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Int64(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt64, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeInt64NoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!((v.$high === 0 && v.$low === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((v.$high === 0 && v.$low === 0))) { */ case 2: - _r$6 = $clone(dst, pointer).Int64(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt64NoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeInt64Ptr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$14.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$14.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).Int64Ptr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$14(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt64Ptr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeInt64Slice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).Int64Slice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeInt64Slice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeUint64 = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Uint64(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint64, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeUint64NoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!((v.$high === 0 && v.$low === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((v.$high === 0 && v.$low === 0))) { */ case 2: - _r$6 = $clone(dst, pointer).Uint64(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint64NoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeUint64Ptr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).Uint64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$20.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$20.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).Uint64Ptr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$20(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint64Ptr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeUint64Slice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).Uint64Slice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeUint64Slice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeFloat32 = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Float32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Float32(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat32, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeFloat32NoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Float32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!((v === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((v === 0))) { */ case 2: - _r$6 = $clone(dst, pointer).Float32(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat32NoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeFloat32Ptr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).Float32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$23.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$23.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).Float32Ptr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat32Ptr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeFloat32Slice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).Float32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).Float32Slice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat32Slice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeFloat64 = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).Float64(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat64, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeFloat64NoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!((v === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((v === 0))) { */ case 2: - _r$6 = $clone(dst, pointer).Float64(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat64NoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeFloat64Ptr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).Float64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$26.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$26.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).Float64Ptr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$26(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat64Ptr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeFloat64Slice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).Float64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).Float64Slice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeFloat64Slice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeString = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst, pointer).String(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(_r$5.$get()); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeString, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeStringNoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (!(v === "")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(v === "")) { */ case 2: - _r$6 = $clone(dst, pointer).String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set(v); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeStringNoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeStringPtr = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, p, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - _r$5 = $clone(src, pointer).StringPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5.$get(); - /* */ if (!(p === ptrType$29.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(p === ptrType$29.nil)) { */ case 2: - v[0] = p.$get(); - _r$6 = $clone(dst, pointer).StringPtr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set((v.$ptr || (v.$ptr = new ptrType$29(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, v)))); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeStringPtr, $c: true, $r, _r$5, _r$6, dst, p, param, param$1, src, v, $s};return $f; - }; - mergeStringSlice = function(dst, src, param, param$1) { - var {_r$5, _r$6, ds, dst, param, param$1, src, ss, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).StringSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).StringSlice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ss = _r$6; - ds.$set($appendSlice(ds.$get(), ss.$get())); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeStringSlice, $c: true, $r, _r$5, _r$6, ds, dst, param, param$1, src, ss, $s};return $f; - }; - mergeOptions.ptr.prototype.Merge = function(dst, src) { - var {dst, o, src, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - o = this; - $r = proto.Merge(dst, src); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeOptions.ptr.prototype.Merge, $c: true, $r, dst, o, src, $s};return $f; - }; - mergeOptions.prototype.Merge = function(dst, src) { return this.$val.Merge(dst, src); }; - MessageInfo.ptr.prototype.merge = function(in$1) { - var {_tuple, _tuple$1, dp, in$1, mi, ok, sp, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - _tuple = mi.getPointer(in$1.Destination); - dp = $clone(_tuple[0], pointer); - ok = _tuple[1]; - if (!ok) { - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - } - _tuple$1 = mi.getPointer(in$1.Source); - sp = $clone(_tuple$1[0], pointer); - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - } - $r = mi.mergePointer($clone(dp, pointer), $clone(sp, pointer), new mergeOptions.ptr()); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 1); - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.merge, $c: true, $r, _tuple, _tuple$1, dp, in$1, mi, ok, sp, $s};return $f; - }; - MessageInfo.prototype.merge = function(in$1) { return this.$val.merge(in$1); }; - MessageInfo.ptr.prototype.mergePointer = function(dst, src, opts) { - var {_arg, _arg$1, _arg$2, _entry, _entry$1, _i, _i$1, _key, _keys, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, dext, dst, du, dv, dx, f, mi, num, opts, sext, sfptr, src, su, sx, xi, xt, $s, $r, $c} = $restore(this, {dst, src, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($clone(dst, pointer).IsNil()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($clone(dst, pointer).IsNil()) { */ case 2: - _r$5 = fmt.Sprintf("invalid value: merging into nil message", new sliceType$1([])); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 3: - if ($clone(src, pointer).IsNil()) { - $s = -1; return; - } - _ref = mi.coderMessageInfo.orderedCoderFields; - _i = 0; - /* while (true) { */ case 5: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (f.funcs.merge === $throwNilPointerError) { - _i++; - /* continue; */ $s = 5; continue; - } - _r$6 = $clone(src, pointer).Apply($clone(f.offset, offset)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - sfptr = $clone(_r$6, pointer); - if (!(f.isPointer)) { _v = false; $s = 10; continue s; } - _r$7 = $clone(sfptr, pointer).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, pointer).IsNil(); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8; case 10: - /* */ if (_v) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v) { */ case 8: - _i++; - /* continue; */ $s = 5; continue; - /* } */ case 9: - _r$9 = $clone(dst, pointer).Apply($clone(f.offset, offset)); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = f.funcs.merge($clone(_r$9, pointer), $clone(sfptr, pointer), f, $clone(opts, mergeOptions)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 5; continue; - case 6: - /* */ if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { */ case 15: - _r$10 = $clone(src, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, pointer).Extensions(); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - sext = _r$11; - _r$12 = $clone(dst, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, pointer).Extensions(); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - dext = _r$13; - if (dext.$get() === false) { - dext.$set({}); - } - _ref$1 = sext.$get(); - _i$1 = 0; - _keys = $keys(_ref$1); - /* while (true) { */ case 21: - /* if (!(_i$1 < _keys.length)) { break; } */ if(!(_i$1 < _keys.length)) { $s = 22; continue; } - _entry = _ref$1[_keys[_i$1]]; - if (_entry === undefined) { - _i$1++; - /* continue; */ $s = 21; continue; - } - num = _entry.k; - sx = $clone(_entry.v, ExtensionField); - xt = $clone(sx, ExtensionField).Type(); - _r$14 = getExtensionFieldInfo(xt); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - xi = _r$14; - if (xi.funcs.merge === $throwNilPointerError) { - _i$1++; - /* continue; */ $s = 21; continue; - } - dx = $clone((_entry$1 = (dext.$get())[$Int32.keyFor(num)], _entry$1 !== undefined ? _entry$1.v : new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil)), ExtensionField); - dv = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ if ($interfaceIsEqual($clone(dx, ExtensionField).Type(), $clone(sx, ExtensionField).Type())) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ($interfaceIsEqual($clone(dx, ExtensionField).Type(), $clone(sx, ExtensionField).Type())) { */ case 24: - _r$15 = dx.Value(); /* */ $s = 26; case 26: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - protoreflect.Value.copy(dv, _r$15); - /* } */ case 25: - /* */ if (!$clone(dv, protoreflect.Value).IsValid() && xi.unmarshalNeedsValue) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!$clone(dv, protoreflect.Value).IsValid() && xi.unmarshalNeedsValue) { */ case 27: - _r$16 = xt.New(); /* */ $s = 29; case 29: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - protoreflect.Value.copy(dv, _r$16); - /* } */ case 28: - _arg = $clone(dv, protoreflect.Value); - _r$17 = sx.Value(); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$17, protoreflect.Value); - _arg$2 = $clone(opts, mergeOptions); - _r$18 = xi.funcs.merge(_arg, _arg$1, _arg$2); /* */ $s = 31; case 31: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - protoreflect.Value.copy(dv, _r$18); - dx.Set($clone(sx, ExtensionField).Type(), $clone(dv, protoreflect.Value)); - _key = num; (dext.$get() || $throwRuntimeError("assignment to entry in nil map"))[$Int32.keyFor(_key)] = { k: _key, v: $clone(dx, ExtensionField) }; - _i$1++; - $s = 21; continue; - case 22: - /* } */ case 16: - /* */ if ($clone(mi.coderMessageInfo.unknownOffset, offset).IsValid()) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if ($clone(mi.coderMessageInfo.unknownOffset, offset).IsValid()) { */ case 32: - _r$19 = mi.getUnknownBytes($clone(src, pointer)); /* */ $s = 34; case 34: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - su = _r$19; - /* */ if (!(su === ptrType$3.nil) && su.$get().$length > 0) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!(su === ptrType$3.nil) && su.$get().$length > 0) { */ case 35: - _r$20 = mi.mutableUnknownBytes($clone(dst, pointer)); /* */ $s = 37; case 37: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - du = _r$20; - du.$set($appendSlice(du.$get(), su.$get())); - /* } */ case 36: - /* } */ case 33: - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.mergePointer, $c: true, $r, _arg, _arg$1, _arg$2, _entry, _entry$1, _i, _i$1, _key, _keys, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, dext, dst, du, dv, dx, f, mi, num, opts, sext, sfptr, src, su, sx, xi, xt, $s};return $f; - }; - MessageInfo.prototype.mergePointer = function(dst, src, opts) { return this.$val.mergePointer(dst, src, opts); }; - mergeScalarValue = function(dst, src, opts) { - var dst, opts, src; - return src; - }; - mergeBytesValue = function(dst, src, opts) { - var {$24r, _arg, _arg$1, _r$5, _r$6, dst, opts, src, $s, $r, $c} = $restore(this, {dst, src, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = new sliceType(emptyBuf); - _r$5 = $clone(src, protoreflect.Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = protoreflect.ValueOfBytes($appendSlice(_arg, _arg$1)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: mergeBytesValue, $c: true, $r, $24r, _arg, _arg$1, _r$5, _r$6, dst, opts, src, $s};return $f; - }; - mergeListValue = function(dst, src, opts) { - var {_r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, dst, dstl, i, llen, opts, src, srcl, $s, $r, $c} = $restore(this, {dst, src, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - dstl = _r$5; - _r$6 = $clone(src, protoreflect.Value).List(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - srcl = _r$6; - _tmp = 0; - _r$7 = srcl.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$1 = _r$7; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 4: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 5; continue; } - _r$8 = srcl.Get(i); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = dstl.Append($clone(_r$8, protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 4; continue; - case 5: - $s = -1; return dst; - /* */ } return; } var $f = {$blk: mergeListValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, dst, dstl, i, llen, opts, src, srcl, $s};return $f; - }; - mergeBytesListValue = function(dst, src, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, db, dst, dstl, i, llen, opts, sb, src, srcl, $s, $r, $c} = $restore(this, {dst, src, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - dstl = _r$5; - _r$6 = $clone(src, protoreflect.Value).List(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - srcl = _r$6; - _tmp = 0; - _r$7 = srcl.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$1 = _r$7; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 4: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 5; continue; } - _r$8 = srcl.Get(i); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, protoreflect.Value).Bytes(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - sb = _r$9; - db = $appendSlice(new sliceType(emptyBuf), sb); - $r = dstl.Append($clone(protoreflect.ValueOfBytes(db), protoreflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 4; continue; - case 5: - $s = -1; return dst; - /* */ } return; } var $f = {$blk: mergeBytesListValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, db, dst, dstl, i, llen, opts, sb, src, srcl, $s};return $f; - }; - mergeMessageListValue = function(dst, src, opts) { - var {_r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, dm, dst, dstl, i, llen, opts, sm, src, srcl, $s, $r, $c} = $restore(this, {dst, src, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - dstl = _r$5; - _r$6 = $clone(src, protoreflect.Value).List(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - srcl = _r$6; - _tmp = 0; - _r$7 = srcl.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$1 = _r$7; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 4: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 5; continue; } - _r$8 = srcl.Get(i); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, protoreflect.Value).Message(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - sm = _r$9; - _r$10 = sm.Interface(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = proto.Clone(_r$10); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.ProtoReflect(); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - dm = _r$12; - $r = dstl.Append($clone(protoreflect.ValueOfMessage(dm), protoreflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 4; continue; - case 5: - $s = -1; return dst; - /* */ } return; } var $f = {$blk: mergeMessageListValue, $c: true, $r, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, dm, dst, dstl, i, llen, opts, sm, src, srcl, $s};return $f; - }; - mergeMessageValue = function(dst, src, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, dst, opts, src, $s, $r, $c} = $restore(this, {dst, src, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = _r$6; - _r$7 = $clone(src, protoreflect.Value).Message(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - $r = $clone(opts, mergeOptions).Merge(_arg, _arg$1); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return dst; - /* */ } return; } var $f = {$blk: mergeMessageValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, dst, opts, src, $s};return $f; - }; - mergeMessage = function(dst, src, f, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, dm, dst, f, opts, sm, src, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(f.mi === ptrType$5.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f.mi === ptrType$5.nil)) { */ case 1: - _r$5 = $clone(dst, pointer).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).IsNil(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$6) { */ case 4: - _r$7 = f.mi.GoReflectType.Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = reflect.New(_r$7); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = pointerOfValue($clone(_r$8, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(dst, pointer).SetPointer($clone(_r$9, pointer)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _r$10 = $clone(dst, pointer).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg = $clone(_r$10, pointer); - _r$11 = $clone(src, pointer).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$11, pointer); - _arg$2 = $clone(opts, mergeOptions); - $r = f.mi.mergePointer(_arg, _arg$1, _arg$2); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - _r$12 = $clone(dst, pointer).AsValueOf(f.ft); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - dm = _r$13; - _r$14 = $clone(src, pointer).AsValueOf(f.ft); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = $clone(_r$14, reflect.Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - sm = _r$15; - /* */ if ($clone(dm, reflect.Value).IsNil()) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if ($clone(dm, reflect.Value).IsNil()) { */ case 19: - _r$16 = f.ft.Elem(); /* */ $s = 21; case 21: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = reflect.New(_r$16); /* */ $s = 22; case 22: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $r = $clone(dm, reflect.Value).Set($clone(_r$17, reflect.Value)); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 20: - _r$18 = asMessage($clone(dm, reflect.Value)); /* */ $s = 24; case 24: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$3 = _r$18; - _r$19 = asMessage($clone(sm, reflect.Value)); /* */ $s = 25; case 25: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _arg$4 = _r$19; - $r = $clone(opts, mergeOptions).Merge(_arg$3, _arg$4); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeMessage, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, dm, dst, f, opts, sm, src, $s};return $f; - }; - mergeMessageSlice = function(dst, src, f, opts) { - var {_arg, _arg$1, _i, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, dm, dst, f, opts, sp, src, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _ref = _r$5; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - sp = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = f.ft.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = reflect.New(_r$7); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - dm = _r$8; - /* */ if (!(f.mi === ptrType$5.nil)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(f.mi === ptrType$5.nil)) { */ case 7: - $r = f.mi.mergePointer($clone(pointerOfValue($clone(dm, reflect.Value)), pointer), $clone(sp, pointer), $clone(opts, mergeOptions)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else { */ case 8: - _r$9 = asMessage($clone(dm, reflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg = _r$9; - _r$10 = f.ft.Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(sp, pointer).AsValueOf(_r$11); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = asMessage($clone(_r$12, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$1 = _r$13; - $r = $clone(opts, mergeOptions).Merge(_arg, _arg$1); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - $r = $clone(dst, pointer).AppendPointerSlice($clone(pointerOfValue($clone(dm, reflect.Value)), pointer)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeMessageSlice, $c: true, $r, _arg, _arg$1, _i, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, dm, dst, f, opts, sp, src, $s};return $f; - }; - mergeBytes = function(dst, src, param, param$1) { - var {_arg, _arg$1, _r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = new sliceType(emptyBuf); - _r$5 = $clone(src, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5.$get(); - _r$6 = $clone(dst, pointer).Bytes(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set($appendSlice(_arg, _arg$1)); - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBytes, $c: true, $r, _arg, _arg$1, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - mergeBytesNoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - /* */ if (v.$length > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (v.$length > 0) { */ case 2: - _r$6 = $clone(dst, pointer).Bytes(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6.$set($appendSlice(new sliceType(emptyBuf), v)); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBytesNoZero, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, v, $s};return $f; - }; - mergeBytesSlice = function(dst, src, param, param$1) { - var {_i, _r$5, _r$6, _ref, ds, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).BytesSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ds = _r$5; - _r$6 = $clone(src, pointer).BytesSlice(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _ref = _r$6.$get(); - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ds.$set($append(ds.$get(), $appendSlice(new sliceType(emptyBuf), v))); - _i++; - $s = 3; continue; - case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeBytesSlice, $c: true, $r, _i, _r$5, _r$6, _ref, ds, dst, param, param$1, src, v, $s};return $f; - }; - legacyWrapMessage = function(v) { - var {$24r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _v, mt, t, v, x, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = $clone(v, reflect.Value).Type(); - _r$5 = t.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!((_r$5 === 22))) { _v = true; $s = 3; continue s; } - _r$6 = t.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !((_r$7 === 25)); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return (x = new aberrantMessage.ptr($clone(v, reflect.Value)), new x.constructor.elem(x)); - /* } */ case 2: - _r$8 = legacyLoadMessageInfo(t, ""); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - mt = _r$8; - _r$9 = $clone(v, reflect.Value).Interface(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = mt.MessageOf(_r$9); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: legacyWrapMessage, $c: true, $r, $24r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _v, mt, t, v, x, $s};return $f; - }; - legacyLoadMessageType = function(t, name) { - var {$24r, _r$5, _r$6, _r$7, _r$8, _v, name, t, x, $s, $r, $c} = $restore(this, {t, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = t.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!((_r$5 === 22))) { _v = true; $s = 3; continue s; } - _r$6 = t.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !((_r$7 === 25)); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return (x = new aberrantMessageType.ptr(t), new x.constructor.elem(x)); - /* } */ case 2: - _r$8 = legacyLoadMessageInfo(t, name); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: legacyLoadMessageType, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, _v, name, t, x, $s};return $f; - }; - legacyLoadMessageInfo = function(t, name) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, hasMarshal, hasMerge, hasUnmarshal, mi, mi$1, mt, name, ok, ok$1, t, v, x, x$1, $s, $r, $c} = $restore(this, {t, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyMessageTypeCache.Load(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - mt = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(mt, ptrType$5); - } - _r$6 = legacyLoadMessageDesc(t, name); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - mi = new MessageInfo.ptr(t, _r$6, $throwNilPointerError, sliceType$1.nil, new sync.Mutex.ptr(0, 0), 0, new reflectMessageInfo.ptr(false, false, false, sliceType$15.nil, sliceType$1.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, new atomicNilMessage.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), new messageReflectWrapper.ptr(new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)), ptrType$5.nil))), new coderMessageInfo.ptr(new structType$9.ptr(new pragma.NoUnkeyedLiterals.ptr(), new $Uint64(0, 0), $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError), sliceType$16.nil, sliceType$16.nil, false, new offset.ptr(0, $throwNilPointerError), new offset.ptr(0, $throwNilPointerError), false, new offset.ptr(0, $throwNilPointerError), false, false, 0)); - _tmp = false; - _tmp$1 = false; - hasMarshal = _tmp; - hasUnmarshal = _tmp$1; - _r$7 = reflect.Zero(t); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - v = _r$8; - _tuple$1 = $assertType(v, legacyMarshaler, true); - hasMarshal = _tuple$1[1]; - if (hasMarshal) { - mi.coderMessageInfo.methods.Marshal = legacyMarshal; - mi.coderMessageInfo.methods.Flags = (x = mi.coderMessageInfo.methods.Flags, x$1 = new $Uint64(0, 1), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - } - _tuple$2 = $assertType(v, legacyUnmarshaler, true); - hasUnmarshal = _tuple$2[1]; - if (hasUnmarshal) { - mi.coderMessageInfo.methods.Unmarshal = legacyUnmarshal; - } - _tuple$3 = $assertType(v, legacyMerger, true); - hasMerge = _tuple$3[1]; - if (hasMerge || (hasMarshal && hasUnmarshal)) { - mi.coderMessageInfo.methods.Merge = legacyMerge; - } - _r$9 = legacyMessageTypeCache.LoadOrStore(t, mi); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$4 = _r$9; - mi$1 = _tuple$4[0]; - ok$1 = _tuple$4[1]; - if (ok$1) { - $s = -1; return $assertType(mi$1, ptrType$5); - } - $s = -1; return mi; - /* */ } return; } var $f = {$blk: legacyLoadMessageInfo, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, hasMarshal, hasMerge, hasUnmarshal, mi, mi$1, mt, name, ok, ok$1, t, v, x, x$1, $s};return $f; - }; - LegacyLoadMessageDesc = function(t) { - var {$24r, _r$5, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyLoadMessageDesc(t, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: LegacyLoadMessageDesc, $c: true, $r, $24r, _r$5, t, $s};return $f; - }; - $pkg.LegacyLoadMessageDesc = LegacyLoadMessageDesc; - legacyLoadMessageDesc = function(t, name) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, b, f, hasProtoField, i, i$1, idxs, md, md$1, mdV1, mi, mv, name, nfield, ok, ok$1, ok$2, ok$3, t, $s, $r, $c} = $restore(this, {t, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mdV1 = [mdV1]; - _r$5 = legacyMessageDescCache.Load(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - mi = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(mi, protoreflect.MessageDescriptor); - } - _r$6 = reflect.Zero(t); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - mv = _r$7; - _tuple$1 = $assertType(mv, protoreflect.ProtoMessage, true); - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok$1) { */ case 4: - _r$8 = fmt.Sprintf("%v already implements proto.Message", new sliceType$1([t])); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $panic(new $String(_r$8)); - /* } */ case 5: - _tuple$2 = $assertType(mv, messageV1, true); - mdV1[0] = _tuple$2[0]; - ok$2 = _tuple$2[1]; - /* */ if (!ok$2) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok$2) { */ case 7: - _r$9 = aberrantLoadMessageDesc(t, name); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 10; case 10: return $24r; - /* } */ case 8: - _r$10 = (function(mdV1) { return function $b() { - var {$24r$1, _r$10, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $deferred.push([(function(mdV1) { return function() { - $recover(); - }; })(mdV1), []]); - _r$10 = mdV1[0].Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$1 = _r$10; - $s = 2; case 2: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [sliceType.nil, sliceType$14.nil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, $24r$1, _r$10, $s, $deferred};return $f; } } - }; })(mdV1)(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$3 = _r$10; - b = _tuple$3[0]; - idxs = _tuple$3[1]; - /* */ if (b === sliceType.nil) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (b === sliceType.nil) { */ case 12: - _r$11 = aberrantLoadMessageDesc(t, name); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$1 = _r$11; - $s = 15; case 15: return $24r$1; - /* } */ case 13: - _r$12 = t.Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Kind(); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (_r$13 === 25) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_r$13 === 25) { */ case 16: - _r$14 = t.Elem(); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = _r$14.NumField(); /* */ $s = 21; case 21: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - nfield = _r$15; - /* */ if (nfield > 0) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (nfield > 0) { */ case 22: - hasProtoField = false; - i = 0; - /* while (true) { */ case 24: - /* if (!(i < nfield)) { break; } */ if(!(i < nfield)) { $s = 25; continue; } - _r$16 = t.Elem(); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.Field(i); /* */ $s = 27; case 27: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - f = $clone(_r$17, reflect.StructField); - if (!(new reflect.StructTag(f.Tag).Get("protobuf") === "") || !(new reflect.StructTag(f.Tag).Get("protobuf_oneof") === "") || strings.HasPrefix(f.Name, "XXX_")) { - hasProtoField = true; - /* break; */ $s = 25; continue; - } - i = i + (1) >> 0; - $s = 24; continue; - case 25: - /* */ if (!hasProtoField) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!hasProtoField) { */ case 28: - _r$18 = aberrantLoadMessageDesc(t, name); /* */ $s = 30; case 30: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$2 = _r$18; - $s = 31; case 31: return $24r$2; - /* } */ case 29: - /* } */ case 23: - /* } */ case 17: - _r$19 = legacyLoadFileDesc(b); /* */ $s = 32; case 32: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.Messages(); /* */ $s = 33; case 33: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = _r$20.Get((0 >= idxs.$length ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + 0])); /* */ $s = 34; case 34: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - md = _r$21; - _ref = $subslice(idxs, 1); - _i = 0; - /* while (true) { */ case 35: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 36; continue; } - i$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$22 = md.Messages(); /* */ $s = 37; case 37: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = _r$22.Get(i$1); /* */ $s = 38; case 38: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - md = _r$23; - _i++; - $s = 35; continue; - case 36: - if (!(!(name === ""))) { _v = false; $s = 41; continue s; } - _r$24 = md.FullName(); /* */ $s = 42; case 42: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _v = !(_r$24 === name); case 41: - /* */ if (_v) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (_v) { */ case 39: - _r$25 = md.FullName(); /* */ $s = 43; case 43: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$25); - _arg$1 = new protoreflect.FullName(name); - _r$26 = fmt.Sprintf("mismatching message name: got %v, want %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 44; case 44: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $panic(new $String(_r$26)); - /* } */ case 40: - _r$27 = legacyMessageDescCache.LoadOrStore(t, md); /* */ $s = 45; case 45: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _tuple$4 = _r$27; - md$1 = _tuple$4[0]; - ok$3 = _tuple$4[1]; - if (ok$3) { - $s = -1; return $assertType(md$1, protoreflect.MessageDescriptor); - } - $s = -1; return md; - /* */ } return; } var $f = {$blk: legacyLoadMessageDesc, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, b, f, hasProtoField, i, i$1, idxs, md, md$1, mdV1, mi, mv, name, nfield, ok, ok$1, ok$2, ok$3, t, $s};return $f; - }; - aberrantLoadMessageDesc = function(t, name) { - var {$24r, _r$5, name, t, $s, $deferred, $r, $c} = $restore(this, {t, name}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = aberrantMessageDescLock.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(aberrantMessageDescLock, "Unlock"), []]); - if (aberrantMessageDescCache === false) { - aberrantMessageDescCache = {}; - } - _r$5 = aberrantLoadMessageDescReentrant(t, name); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: aberrantLoadMessageDesc, $c: true, $r, $24r, _r$5, name, t, $s, $deferred};return $f; } } - }; - aberrantLoadMessageDescReentrant = function(t, name) { - var {_1, _entry, _i, _i$1, _i$2, _i$3, _i$4, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _v, f, f$1, f$2, fd, fn, fn$1, i, i$1, i$2, md, md$1, method, n, name, od, ok, ok$1, ok$2, ok$3, oneofWrappers, s, t, t$1, tag$1, tag$2, tag$3, tag$4, tagKey, tagVal, v, v$1, v$2, vs, vs$1, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {t, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = (_entry = aberrantMessageDescCache[reflect.Type.keyFor(t)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - md = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return md; - } - md$1 = new filedesc.Message.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType$41.nil, $ifaceNil, 0)), new filedesc.MessageL1.ptr(new filedesc.Enums.ptr(sliceType$17.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.Messages.ptr(sliceType$18.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.Extensions.ptr(sliceType$19.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), false, false), new filedesc.MessageL2.ptr($throwNilPointerError, new filedesc.Fields.ptr(sliceType$20.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false), new filedesc.Oneofs.ptr(sliceType$21.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.Names.ptr(sliceType$22.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.FieldRanges.ptr(sliceType$23.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$23.nil), new filedesc.FieldNumbers.ptr(sliceType$24.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.FieldRanges.ptr(sliceType$23.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$23.nil), sliceType$25.nil)); - _r$5 = aberrantDeriveMessageName(t, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - md$1.Base.L0.FullName = _r$5; - md$1.Base.L0.ParentFile = filedesc.SurrogateProto2; - _key = t; (aberrantMessageDescCache || $throwRuntimeError("assignment to entry in nil map"))[reflect.Type.keyFor(_key)] = { k: _key, v: md$1 }; - _r$6 = t.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - if (!((_r$6 === 22))) { _v = true; $s = 4; continue s; } - _r$7 = t.Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = !((_r$8 === 25)); case 4: - /* */ if (_v) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_v) { */ case 2: - $s = -1; return md$1; - /* } */ case 3: - i = 0; - /* while (true) { */ case 8: - _r$9 = t.Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.NumField(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* if (!(i < _r$10)) { break; } */ if(!(i < _r$10)) { $s = 9; continue; } - _r$11 = t.Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.Field(i); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - f = $clone(_r$12, reflect.StructField); - tag$1 = new reflect.StructTag(f.Tag).Get("protobuf"); - /* */ if (!(tag$1 === "")) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!(tag$1 === "")) { */ case 14: - _r$13 = f.Type.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _1 = _r$13; - if ((_1 === (1)) || (_1 === (5)) || (_1 === (6)) || (_1 === (10)) || (_1 === (11)) || (_1 === (13)) || (_1 === (14)) || (_1 === (24))) { - md$1.Base.L0.ParentFile = filedesc.SurrogateProto3; - } - case 16: - _ref = strings.Split(tag$1, ","); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (s === "proto3") { - md$1.Base.L0.ParentFile = filedesc.SurrogateProto3; - } - _i++; - } - /* } */ case 15: - i = i + (1) >> 0; - $s = 8; continue; - case 9: - oneofWrappers = sliceType$26.nil; - _ref$1 = new sliceType$10(["XXX_OneofFuncs", "XXX_OneofWrappers"]); - _i$1 = 0; - /* while (true) { */ case 18: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 19; continue; } - method = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$14 = t.MethodByName(method); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$1 = _r$14; - fn = $clone(_tuple$1[0], reflect.Method); - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (ok$1) { */ case 21: - _r$15 = fn.Type.In(0); /* */ $s = 23; case 23: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = reflect.Zero(_r$15); /* */ $s = 24; case 24: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(fn.Func, reflect.Value).Call(new sliceType$13([$clone(_r$16, reflect.Value)])); /* */ $s = 25; case 25: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _ref$2 = _r$17; - _i$2 = 0; - /* while (true) { */ case 26: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 27; continue; } - v = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - _r$18 = $clone(v, reflect.Value).Interface(); /* */ $s = 28; case 28: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _tuple$2 = $assertType(_r$18, sliceType$1, true); - vs = _tuple$2[0]; - ok$2 = _tuple$2[1]; - if (ok$2) { - _ref$3 = vs; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - v$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - oneofWrappers = $append(oneofWrappers, reflect.TypeOf(v$1)); - _i$3++; - } - } - _i$2++; - $s = 26; continue; - case 27: - /* } */ case 22: - _i$1++; - $s = 18; continue; - case 19: - _r$19 = t.MethodByName("ExtensionRangeArray"); /* */ $s = 29; case 29: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple$3 = _r$19; - fn$1 = $clone(_tuple$3[0], reflect.Method); - ok$3 = _tuple$3[1]; - /* */ if (ok$3) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (ok$3) { */ case 30: - _r$20 = fn$1.Type.In(0); /* */ $s = 32; case 32: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = reflect.Zero(_r$20); /* */ $s = 33; case 33: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = $clone(fn$1.Func, reflect.Value).Call(new sliceType$13([$clone(_r$21, reflect.Value)])); /* */ $s = 34; case 34: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - vs$1 = (x = _r$22, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - i$1 = 0; - /* while (true) { */ case 35: - /* if (!(i$1 < $clone(vs$1, reflect.Value).Len())) { break; } */ if(!(i$1 < $clone(vs$1, reflect.Value).Len())) { $s = 36; continue; } - _r$23 = $clone(vs$1, reflect.Value).Index(i$1); /* */ $s = 37; case 37: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - v$2 = _r$23; - _r$24 = $clone(v$2, reflect.Value).FieldByName("Start"); /* */ $s = 38; case 38: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = $clone(_r$24, reflect.Value).Int(); /* */ $s = 39; case 39: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = $clone(v$2, reflect.Value).FieldByName("End"); /* */ $s = 40; case 40: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = $clone(_r$26, reflect.Value).Int(); /* */ $s = 41; case 41: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - md$1.L2.ExtensionRanges.List = $append(md$1.L2.ExtensionRanges.List, $toNativeArray($kindInt32, [(((x$1 = _r$25, x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0)), (((x$2 = (x$3 = _r$27, new $Int64(x$3.$high + 0, x$3.$low + 1)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0))])); - md$1.L2.ExtensionRangeOptions = $append(md$1.L2.ExtensionRangeOptions, $throwNilPointerError); - i$1 = i$1 + (1) >> 0; - $s = 35; continue; - case 36: - /* } */ case 31: - i$2 = 0; - /* while (true) { */ case 42: - _r$28 = t.Elem(); /* */ $s = 44; case 44: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = _r$28.NumField(); /* */ $s = 45; case 45: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - /* if (!(i$2 < _r$29)) { break; } */ if(!(i$2 < _r$29)) { $s = 43; continue; } - _r$30 = t.Elem(); /* */ $s = 46; case 46: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _r$31 = _r$30.Field(i$2); /* */ $s = 47; case 47: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - f$1 = $clone(_r$31, reflect.StructField); - tag$2 = new reflect.StructTag(f$1.Tag).Get("protobuf"); - /* */ if (!(tag$2 === "")) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (!(tag$2 === "")) { */ case 48: - tagKey = new reflect.StructTag(f$1.Tag).Get("protobuf_key"); - tagVal = new reflect.StructTag(f$1.Tag).Get("protobuf_val"); - $r = aberrantAppendField(md$1, f$1.Type, tag$2, tagKey, tagVal); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 49: - tag$3 = new reflect.StructTag(f$1.Tag).Get("protobuf_oneof"); - /* */ if (!(tag$3 === "")) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (!(tag$3 === "")) { */ case 51: - n = md$1.L2.Oneofs.List.$length; - md$1.L2.Oneofs.List = $append(md$1.L2.Oneofs.List, new filedesc.Oneof.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType$41.nil, $ifaceNil, 0)), new filedesc.OneofL1.ptr($throwNilPointerError, new filedesc.OneofFields.ptr(sliceType$27.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false)))); - od = (x$4 = md$1.L2.Oneofs.List, ((n < 0 || n >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + n])); - od.Base.L0.FullName = new protoreflect.FullName(md$1.Base.FullName()).Append((tag$3)); - od.Base.L0.ParentFile = md$1.Base.L0.ParentFile; - od.Base.L0.Parent = md$1; - od.Base.L0.Index = n; - _ref$4 = oneofWrappers; - _i$4 = 0; - /* while (true) { */ case 53: - /* if (!(_i$4 < _ref$4.$length)) { break; } */ if(!(_i$4 < _ref$4.$length)) { $s = 54; continue; } - t$1 = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); - _r$32 = t$1.Implements(f$1.Type); /* */ $s = 57; case 57: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - /* */ if (_r$32) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if (_r$32) { */ case 55: - _r$33 = t$1.Elem(); /* */ $s = 58; case 58: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$34 = _r$33.Field(0); /* */ $s = 59; case 59: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - f$2 = $clone(_r$34, reflect.StructField); - tag$4 = new reflect.StructTag(f$2.Tag).Get("protobuf"); - /* */ if (!(tag$4 === "")) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (!(tag$4 === "")) { */ case 60: - $r = aberrantAppendField(md$1, f$2.Type, tag$4, "", ""); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - fd = (x$5 = md$1.L2.Fields.List, x$6 = md$1.L2.Fields.List.$length - 1 >> 0, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); - fd.L1.ContainingOneof = od; - od.L1.Fields.List = $append(od.L1.Fields.List, fd); - /* } */ case 61: - /* } */ case 56: - _i$4++; - $s = 53; continue; - case 54: - /* } */ case 52: - i$2 = i$2 + (1) >> 0; - $s = 42; continue; - case 43: - $s = -1; return md$1; - /* */ } return; } var $f = {$blk: aberrantLoadMessageDescReentrant, $c: true, $r, _1, _entry, _i, _i$1, _i$2, _i$3, _i$4, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _v, f, f$1, f$2, fd, fn, fn$1, i, i$1, i$2, md, md$1, method, n, name, od, ok, ok$1, ok$2, ok$3, oneofWrappers, s, t, t$1, tag$1, tag$2, tag$3, tag$4, tagKey, tagVal, v, v$1, v$2, vs, vs$1, x, x$1, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - aberrantDeriveMessageName = function(t, name) { - var {$24r, _r$5, _r$6, _r$7, name, t, $s, $r, $c} = $restore(this, {t, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = [name]; - t = [t]; - if (new protoreflect.FullName(name[0]).IsValid()) { - $s = -1; return name[0]; - } - $r = (function(name, t) { return function $b() { - var {_r$5, _r$6, _r$7, _tuple, m, ok, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $deferred.push([(function(name, t) { return function() { - $recover(); - }; })(name, t), []]); - _r$5 = reflect.Zero(t[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = $assertType(_r$6, interfaceType$3, true); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ok) { */ case 3: - _r$7 = m.XXX_MessageName(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - name[0] = (_r$7); - /* } */ case 4: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, _r$7, _tuple, m, ok, $s, $deferred};return $f; } } - }; })(name, t)(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (new protoreflect.FullName(name[0]).IsValid()) { - $s = -1; return name[0]; - } - _r$5 = t[0].Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === 22) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_r$5 === 22) { */ case 2: - _r$6 = t[0].Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - t[0] = _r$6; - /* } */ case 3: - _r$7 = AberrantDeriveFullName(t[0]); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: aberrantDeriveMessageName, $c: true, $r, $24r, _r$5, _r$6, _r$7, name, t, $s};return $f; - }; - aberrantAppendField = function(md, goType, tag$1, tagKey, tagVal) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, _v$1, fd, goType, isOptional, isRepeated, md, md2, n, n$1, t, tag$1, tagKey, tagVal, v, v$1, v$2, v$3, v$4, x, x$1, x$2, $s, $r, $c} = $restore(this, {md, goType, tag$1, tagKey, tagVal}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = [fd]; - t = goType; - _r$5 = t.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(_r$5 === 22)) { _v = false; $s = 1; continue s; } - _r$6 = t.Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !((_r$7 === 25)); case 1: - isOptional = _v; - _r$8 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(_r$8 === 23)) { _v$1 = false; $s = 5; continue s; } - _r$9 = t.Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$1 = !((_r$10 === 8)); case 5: - isRepeated = _v$1; - /* */ if (isOptional || isRepeated) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (isOptional || isRepeated) { */ case 9: - _r$11 = t.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - t = _r$11; - /* } */ case 10: - _r$12 = tag.Unmarshal(tag$1, t, (x = new placeholderEnumValues.ptr($ifaceNil), new x.constructor.elem(x))); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - fd[0] = $assertType(_r$12, ptrType$43); - n = md.L2.Fields.List.$length; - md.L2.Fields.List = $append(md.L2.Fields.List, fd[0]); - fd[0] = (x$1 = md.L2.Fields.List, ((n < 0 || n >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + n])); - fd[0].Base.L0.FullName = new protoreflect.FullName(md.Base.FullName()).Append(fd[0].Base.Name()); - fd[0].Base.L0.ParentFile = md.Base.L0.ParentFile; - fd[0].Base.L0.Parent = md; - fd[0].Base.L0.Index = n; - /* */ if (fd[0].L1.IsWeak || fd[0].L1.HasPacked) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (fd[0].L1.IsWeak || fd[0].L1.HasPacked) { */ case 13: - fd[0].L1.Options = (function(fd) { return function $b() { - var {$24r, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, opts, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$13 = descopts.Field.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = _r$13.New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - opts = _r$14; - /* */ if (fd[0].L1.IsWeak) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (fd[0].L1.IsWeak) { */ case 3: - _r$15 = opts.Descriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.Fields(); /* */ $s = 6; case 6: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.ByName("weak"); /* */ $s = 7; case 7: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $r = opts.Set(_r$17, $clone(protoreflect.ValueOfBool(true), protoreflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - /* */ if (fd[0].L1.HasPacked) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (fd[0].L1.HasPacked) { */ case 9: - _r$18 = opts.Descriptor(); /* */ $s = 11; case 11: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = _r$18.Fields(); /* */ $s = 12; case 12: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.ByName("packed"); /* */ $s = 13; case 13: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $r = opts.Set(_r$20, $clone(protoreflect.ValueOfBool(fd[0].L1.IsPacked), protoreflect.Value)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - _r$21 = opts.Interface(); /* */ $s = 15; case 15: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $24r = _r$21; - $s = 16; case 16: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, opts, $s};return $f; - }; })(fd); - /* } */ case 14: - /* */ if ($interfaceIsEqual(fd[0].Enum(), $ifaceNil) && (fd[0].Kind() === 14)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($interfaceIsEqual(fd[0].Enum(), $ifaceNil) && (fd[0].Kind() === 14)) { */ case 15: - _r$13 = reflect.Zero(t); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Interface(); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _ref = _r$14; - /* */ if ($assertType(_ref, protoreflect.Enum, true)[1]) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if ($assertType(_ref, protoreflect.Enum, true)[1]) { */ case 19: - v = _ref; - _r$15 = v.Descriptor(); /* */ $s = 22; case 22: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - fd[0].L1.Enum = _r$15; - $s = 21; continue; - /* } else { */ case 20: - v$1 = _ref; - _r$16 = LegacyLoadEnumDesc(t); /* */ $s = 23; case 23: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - fd[0].L1.Enum = _r$16; - /* } */ case 21: - /* } */ case 16: - _r$17 = fd[0].Message(); /* */ $s = 26; case 26: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$17, $ifaceNil) && ((fd[0].Kind() === 11) || (fd[0].Kind() === 10))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ($interfaceIsEqual(_r$17, $ifaceNil) && ((fd[0].Kind() === 11) || (fd[0].Kind() === 10))) { */ case 24: - _r$18 = reflect.Zero(t); /* */ $s = 27; case 27: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, reflect.Value).Interface(); /* */ $s = 28; case 28: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _ref$1 = _r$19; - /* */ if ($assertType(_ref$1, protoreflect.ProtoMessage, true)[1]) { $s = 29; continue; } - /* */ if ($assertType(_ref$1, messageV1, true)[1]) { $s = 30; continue; } - /* */ $s = 31; continue; - /* switch (0) { default: if ($assertType(_ref$1, protoreflect.ProtoMessage, true)[1]) { */ case 29: - v$2 = _ref$1; - _r$20 = v$2.ProtoReflect(); /* */ $s = 33; case 33: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = _r$20.Descriptor(); /* */ $s = 34; case 34: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - fd[0].L1.Message = _r$21; - $s = 32; continue; - /* } else if ($assertType(_ref$1, messageV1, true)[1]) { */ case 30: - v$3 = _ref$1; - _r$22 = LegacyLoadMessageDesc(t); /* */ $s = 35; case 35: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - fd[0].L1.Message = _r$22; - $s = 32; continue; - /* } else { */ case 31: - v$4 = _ref$1; - _r$23 = t.Kind(); /* */ $s = 38; case 38: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - /* */ if (_r$23 === 21) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (_r$23 === 21) { */ case 36: - n$1 = md.L1.Messages.List.$length; - md.L1.Messages.List = $append(md.L1.Messages.List, new filedesc.Message.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType$41.nil, $ifaceNil, 0)), new filedesc.MessageL1.ptr(new filedesc.Enums.ptr(sliceType$17.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.Messages.ptr(sliceType$18.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.Extensions.ptr(sliceType$19.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), false, false), new filedesc.MessageL2.ptr($throwNilPointerError, new filedesc.Fields.ptr(sliceType$20.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false, false), new filedesc.Oneofs.ptr(sliceType$21.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.Names.ptr(sliceType$22.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.FieldRanges.ptr(sliceType$23.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$23.nil), new filedesc.FieldNumbers.ptr(sliceType$24.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.FieldRanges.ptr(sliceType$23.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$23.nil), sliceType$25.nil))); - md2 = (x$2 = md.L1.Messages.List, ((n$1 < 0 || n$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + n$1])); - md2.Base.L0.FullName = new protoreflect.FullName(md.Base.FullName()).Append((strs.MapEntryName((fd[0].Base.Name())))); - md2.Base.L0.ParentFile = md.Base.L0.ParentFile; - md2.Base.L0.Parent = md; - md2.Base.L0.Index = n$1; - md2.L1.IsMapEntry = true; - md2.L2.Options = (function(fd) { return function $b() { - var {$24r, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, opts, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$24 = descopts.Message.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = _r$24.New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - opts = _r$25; - _r$26 = opts.Descriptor(); /* */ $s = 3; case 3: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = _r$26.Fields(); /* */ $s = 4; case 4: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = _r$27.ByName("map_entry"); /* */ $s = 5; case 5: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - $r = opts.Set(_r$28, $clone(protoreflect.ValueOfBool(true), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$29 = opts.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - $24r = _r$29; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, opts, $s};return $f; - }; })(fd); - _arg = md2; - _r$24 = t.Key(); /* */ $s = 39; case 39: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _arg$1 = _r$24; - _arg$2 = tagKey; - $r = aberrantAppendField(_arg, _arg$1, _arg$2, "", ""); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _arg$3 = md2; - _r$25 = t.Elem(); /* */ $s = 41; case 41: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _arg$4 = _r$25; - _arg$5 = tagVal; - $r = aberrantAppendField(_arg$3, _arg$4, _arg$5, "", ""); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - fd[0].L1.Message = md2; - /* break; */ $s = 32; continue; - /* } */ case 37: - _r$26 = aberrantLoadMessageDescReentrant(t, ""); /* */ $s = 43; case 43: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - fd[0].L1.Message = _r$26; - /* } } */ case 32: - /* } */ case 25: - $s = -1; return; - /* */ } return; } var $f = {$blk: aberrantAppendField, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, _v$1, fd, goType, isOptional, isRepeated, md, md2, n, n$1, t, tag$1, tagKey, tagVal, v, v$1, v$2, v$3, v$4, x, x$1, x$2, $s};return $f; - }; - placeholderEnumValues.ptr.prototype.ByNumber = function(n) { - var {$24r, _r$5, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fmt.Sprintf("UNKNOWN_%d", new sliceType$1([new protoreflect.EnumNumber(n)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = new filedesc.PlaceholderEnumValue(((_r$5))); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: placeholderEnumValues.ptr.prototype.ByNumber, $c: true, $r, $24r, _r$5, n, $s};return $f; - }; - placeholderEnumValues.prototype.ByNumber = function(n) { return this.$val.ByNumber(n); }; - legacyMarshal = function(in$1) { - var {$24r, _r$5, _r$6, _r$7, _tuple, _tuple$1, err, in$1, marshaler, ok, out, v, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $assertType(in$1.Message, unwrapper).protoUnwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5; - _tuple = $assertType(v, legacyMarshaler, true); - marshaler = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$6 = errors.New("%T does not implement Marshal", new sliceType$1([v])); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = [new structType$3.ptr(new pragma.NoUnkeyedLiterals.ptr(), sliceType.nil), _r$6]; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$7 = marshaler.Marshal(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - out = _tuple$1[0]; - err = _tuple$1[1]; - if (!(in$1.Buf === sliceType.nil)) { - out = $appendSlice(in$1.Buf, out); - } - $s = -1; return [new structType$3.ptr(new pragma.NoUnkeyedLiterals.ptr(), out), err]; - /* */ } return; } var $f = {$blk: legacyMarshal, $c: true, $r, $24r, _r$5, _r$6, _r$7, _tuple, _tuple$1, err, in$1, marshaler, ok, out, v, $s};return $f; - }; - legacyUnmarshal = function(in$1) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _tuple, in$1, ok, unmarshaler, v, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $assertType(in$1.Message, unwrapper).protoUnwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5; - _tuple = $assertType(v, legacyUnmarshaler, true); - unmarshaler = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$6 = errors.New("%T does not implement Unmarshal", new sliceType$1([v])); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = [new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0), _r$6]; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$7 = unmarshaler.Unmarshal(in$1.Buf); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = [new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0), _r$7]; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: legacyUnmarshal, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _tuple, in$1, ok, unmarshaler, v, $s};return $f; - }; - legacyMerge = function(in$1) { - var {_r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, dstv, err, in$1, marshaler, merger, ok, srcv, unmarshaler, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $assertType(in$1.Destination, unwrapper).protoUnwrap(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - dstv = _r$5; - _tuple = $assertType(dstv, legacyMerger, true); - merger = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$6 = new Export.ptr().ProtoMessageV1Of(in$1.Source); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = merger.Merge(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 1); - /* } */ case 3: - _r$7 = $assertType(in$1.Source, unwrapper).protoUnwrap(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - srcv = _r$7; - _tuple$1 = $assertType(srcv, legacyMarshaler, true); - marshaler = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - } - _r$8 = $assertType(in$1.Destination, unwrapper).protoUnwrap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - dstv = _r$8; - _tuple$2 = $assertType(dstv, legacyUnmarshaler, true); - unmarshaler = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - } - _r$9 = in$1.Source.IsValid(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (!_r$9) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!_r$9) { */ case 8: - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 1); - /* } */ case 9: - _r$10 = marshaler.Marshal(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$3 = _r$10; - b = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - } - _r$11 = unmarshaler.Unmarshal(b); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err = _r$11; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 0); - } - $s = -1; return new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), 1); - /* */ } return; } var $f = {$blk: legacyMerge, $c: true, $r, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, dstv, err, in$1, marshaler, merger, ok, srcv, unmarshaler, $s};return $f; - }; - aberrantMessageType.ptr.prototype.New = function() { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, mt, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mt = this; - _r$5 = mt.t.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === 22) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$5 === 22) { */ case 1: - _r$6 = mt.t.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.New(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = (x = new aberrantMessage.ptr($clone(_r$7, reflect.Value)), new x.constructor.elem(x)); - $s = 6; case 6: return $24r; - /* } */ case 2: - _r$8 = reflect.Zero(mt.t); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = (x$1 = new aberrantMessage.ptr($clone(_r$8, reflect.Value)), new x$1.constructor.elem(x$1)); - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: aberrantMessageType.ptr.prototype.New, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, mt, x, x$1, $s};return $f; - }; - aberrantMessageType.prototype.New = function() { return this.$val.New(); }; - aberrantMessageType.ptr.prototype.Zero = function() { - var {$24r, _r$5, mt, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mt = this; - _r$5 = reflect.Zero(mt.t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = (x = new aberrantMessage.ptr($clone(_r$5, reflect.Value)), new x.constructor.elem(x)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: aberrantMessageType.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, mt, x, $s};return $f; - }; - aberrantMessageType.prototype.Zero = function() { return this.$val.Zero(); }; - aberrantMessageType.ptr.prototype.GoType = function() { - var mt; - mt = this; - return mt.t; - }; - aberrantMessageType.prototype.GoType = function() { return this.$val.GoType(); }; - aberrantMessageType.ptr.prototype.Descriptor = function() { - var {$24r, _r$5, mt, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mt = this; - _r$5 = LegacyLoadMessageDesc(mt.t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: aberrantMessageType.ptr.prototype.Descriptor, $c: true, $r, $24r, _r$5, mt, $s};return $f; - }; - aberrantMessageType.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - aberrantMessage.ptr.prototype.Reset = function() { - var {_r$5, _r$6, _r$7, _r$8, _tuple, m, mr, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, interfaceType$1, true); - mr = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - $r = mr.Reset(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 3: - /* */ if (($clone(m.v, reflect.Value).Kind() === 22) && !$clone(m.v, reflect.Value).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (($clone(m.v, reflect.Value).Kind() === 22) && !$clone(m.v, reflect.Value).IsNil()) { */ case 5: - _r$6 = $clone(m.v, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(m.v, reflect.Value).Type().Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = reflect.Zero(_r$7); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = $clone(_r$6, reflect.Value).Set($clone(_r$8, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.Reset, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _tuple, m, mr, ok, $s};return $f; - }; - aberrantMessage.prototype.Reset = function() { return this.$val.Reset(); }; - aberrantMessage.ptr.prototype.ProtoReflect = function() { - var m; - m = this; - return new m.constructor.elem(m); - }; - aberrantMessage.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - aberrantMessage.ptr.prototype.Descriptor = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = LegacyLoadMessageDesc($clone(m.v, reflect.Value).Type()); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.Descriptor, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - aberrantMessage.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - aberrantMessage.ptr.prototype.Type = function() { - var m, x; - m = this; - return (x = new aberrantMessageType.ptr($clone(m.v, reflect.Value).Type()), new x.constructor.elem(x)); - }; - aberrantMessage.prototype.Type = function() { return this.$val.Type(); }; - aberrantMessage.ptr.prototype.New = function() { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m.v, reflect.Value).Type().Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === 22) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$5 === 22) { */ case 1: - _r$6 = $clone(m.v, reflect.Value).Type().Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.New(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = (x = new aberrantMessage.ptr($clone(_r$7, reflect.Value)), new x.constructor.elem(x)); - $s = 6; case 6: return $24r; - /* } */ case 2: - _r$8 = reflect.Zero($clone(m.v, reflect.Value).Type()); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = (x$1 = new aberrantMessage.ptr($clone(_r$8, reflect.Value)), new x$1.constructor.elem(x$1)); - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.New, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, x, x$1, $s};return $f; - }; - aberrantMessage.prototype.New = function() { return this.$val.New(); }; - aberrantMessage.ptr.prototype.Interface = function() { - var m; - m = this; - return new m.constructor.elem(m); - }; - aberrantMessage.prototype.Interface = function() { return this.$val.Interface(); }; - aberrantMessage.ptr.prototype.Range = function(f) { - var f, m; - m = this; - return; - }; - aberrantMessage.prototype.Range = function(f) { return this.$val.Range(f); }; - aberrantMessage.ptr.prototype.Has = function(param) { - var m, param; - m = this; - return false; - }; - aberrantMessage.prototype.Has = function(param) { return this.$val.Has(param); }; - aberrantMessage.ptr.prototype.Clear = function(param) { - var {_r$5, _r$6, m, param, $s, $r, $c} = $restore(this, {param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m, aberrantMessage).Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String("invalid Message.Clear on " + (_r$6))); - $s = -1; return; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.Clear, $c: true, $r, _r$5, _r$6, m, param, $s};return $f; - }; - aberrantMessage.prototype.Clear = function(param) { return this.$val.Clear(param); }; - aberrantMessage.ptr.prototype.Get = function(fd) { - var {$24r, _r$5, _r$6, _r$7, _r$8, _r$9, fd, m, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = fd.Default(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, protoreflect.Value).IsValid(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$6) { */ case 1: - _r$7 = fd.Default(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 2: - _r$8 = $clone(m, aberrantMessage).Descriptor(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.FullName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $panic(new $String("invalid Message.Get on " + (_r$9))); - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.Get, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, _r$9, fd, m, $s};return $f; - }; - aberrantMessage.prototype.Get = function(fd) { return this.$val.Get(fd); }; - aberrantMessage.ptr.prototype.Set = function(param, param$1) { - var {_r$5, _r$6, m, param, param$1, $s, $r, $c} = $restore(this, {param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m, aberrantMessage).Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String("invalid Message.Set on " + (_r$6))); - $s = -1; return; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.Set, $c: true, $r, _r$5, _r$6, m, param, param$1, $s};return $f; - }; - aberrantMessage.prototype.Set = function(param, param$1) { return this.$val.Set(param, param$1); }; - aberrantMessage.ptr.prototype.Mutable = function(param) { - var {_r$5, _r$6, m, param, $s, $r, $c} = $restore(this, {param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m, aberrantMessage).Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String("invalid Message.Mutable on " + (_r$6))); - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.Mutable, $c: true, $r, _r$5, _r$6, m, param, $s};return $f; - }; - aberrantMessage.prototype.Mutable = function(param) { return this.$val.Mutable(param); }; - aberrantMessage.ptr.prototype.NewField = function(param) { - var {_r$5, _r$6, m, param, $s, $r, $c} = $restore(this, {param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m, aberrantMessage).Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String("invalid Message.NewField on " + (_r$6))); - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.NewField, $c: true, $r, _r$5, _r$6, m, param, $s};return $f; - }; - aberrantMessage.prototype.NewField = function(param) { return this.$val.NewField(param); }; - aberrantMessage.ptr.prototype.WhichOneof = function(param) { - var {_r$5, _r$6, m, param, $s, $r, $c} = $restore(this, {param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m, aberrantMessage).Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String("invalid Message.WhichOneof descriptor on " + (_r$6))); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.WhichOneof, $c: true, $r, _r$5, _r$6, m, param, $s};return $f; - }; - aberrantMessage.prototype.WhichOneof = function(param) { return this.$val.WhichOneof(param); }; - aberrantMessage.ptr.prototype.GetUnknown = function() { - var m; - m = this; - return protoreflect.RawFields.nil; - }; - aberrantMessage.prototype.GetUnknown = function() { return this.$val.GetUnknown(); }; - aberrantMessage.ptr.prototype.SetUnknown = function(param) { - var m, param; - m = this; - }; - aberrantMessage.prototype.SetUnknown = function(param) { return this.$val.SetUnknown(param); }; - aberrantMessage.ptr.prototype.IsValid = function() { - var m; - m = this; - if ($clone(m.v, reflect.Value).Kind() === 22) { - return !$clone(m.v, reflect.Value).IsNil(); - } - return false; - }; - aberrantMessage.prototype.IsValid = function() { return this.$val.IsValid(); }; - aberrantMessage.ptr.prototype.ProtoMethods = function() { - var m; - m = this; - return aberrantProtoMethods; - }; - aberrantMessage.prototype.ProtoMethods = function() { return this.$val.ProtoMethods(); }; - aberrantMessage.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = $clone(m.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: aberrantMessage.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - aberrantMessage.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - legacyLoadFileDesc = function(b) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, b2, err, fd, fd$1, fd$2, ok, ok$1, x, zr, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyFileDescCache.Load($indexPtr(b.$array, b.$offset + 0, ptrType$44)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - fd = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(fd, protoreflect.FileDescriptor); - } - _r$6 = gzip.NewReader(bytes.NewReader(b)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - zr = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - _r$7 = ioutil.ReadAll(zr); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - b2 = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - _r$8 = new filedesc.Builder.ptr("", b2, 0, 0, 0, 0, $ifaceNil, (x = new resolverOnly.ptr(protoregistry.GlobalFiles), new x.constructor.elem(x))).Build(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - fd$1 = _r$8.File; - _r$9 = legacyFileDescCache.LoadOrStore($indexPtr(b.$array, b.$offset + 0, ptrType$44), fd$1); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$3 = _r$9; - fd$2 = _tuple$3[0]; - ok$1 = _tuple$3[1]; - if (ok$1) { - $s = -1; return $assertType(fd$2, protoreflect.FileDescriptor); - } - $s = -1; return fd$1; - /* */ } return; } var $f = {$blk: legacyLoadFileDesc, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, b2, err, fd, fd$1, fd$2, ok, ok$1, x, zr, $s};return $f; - }; - resolverOnly.ptr.prototype.FindFileByPath = function(path) { - var {$24r, _r$5, path, r, $s, $r, $c} = $restore(this, {path}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$5 = r.reg.FindFileByPath(path); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: resolverOnly.ptr.prototype.FindFileByPath, $c: true, $r, $24r, _r$5, path, r, $s};return $f; - }; - resolverOnly.prototype.FindFileByPath = function(path) { return this.$val.FindFileByPath(path); }; - resolverOnly.ptr.prototype.FindDescriptorByName = function(name) { - var {$24r, _r$5, name, r, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$5 = r.reg.FindDescriptorByName(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: resolverOnly.ptr.prototype.FindDescriptorByName, $c: true, $r, $24r, _r$5, name, r, $s};return $f; - }; - resolverOnly.prototype.FindDescriptorByName = function(name) { return this.$val.FindDescriptorByName(name); }; - resolverOnly.ptr.prototype.RegisterFile = function(param) { - var param; - return $ifaceNil; - }; - resolverOnly.prototype.RegisterFile = function(param) { return this.$val.RegisterFile(param); }; - ExtensionInfo.ptr.prototype.initToLegacy = function() { - var {_1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, enumName, extType, fd, filename, messageName, mt, mv, mv$1, mz, mz$1, name, ok, ok$1, parent, t, xd, xi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - xd = $clone(xi.desc, extensionTypeDescriptor); - parent = $ifaceNil; - _r$5 = xd.ExtensionDescriptor.ContainingMessage(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - messageName = _r$6; - _r$7 = protoregistry.GlobalTypes.FindMessageByName(messageName); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - mt = _tuple[0]; - /* */ if (!($interfaceIsEqual(mt, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(mt, $ifaceNil))) { */ case 4: - _r$8 = mt.New(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - mv = _r$9; - t = reflect.TypeOf(mv); - _tuple$1 = $assertType(mv, unwrapper, true); - mv$1 = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ok) { */ case 8: - _r$10 = mv$1.protoUnwrap(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = reflect.TypeOf(_r$10); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - t = _r$11; - /* } */ case 9: - _r$12 = reflect.Zero(t); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, reflect.Value).Interface(); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - mz = _r$13; - _tuple$2 = $assertType(mz, protoiface.MessageV1, true); - mz$1 = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (ok$1) { - parent = mz$1; - } - /* } */ case 5: - extType = xi.goType; - _r$14 = extType.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _1 = _r$14; - if ((_1 === (1)) || (_1 === (5)) || (_1 === (6)) || (_1 === (10)) || (_1 === (11)) || (_1 === (13)) || (_1 === (14)) || (_1 === (24))) { - extType = reflect.PtrTo(extType); - } - case 14: - enumName = ""; - _r$15 = xd.ExtensionDescriptor.Kind(); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - /* */ if (_r$15 === 14) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_r$15 === 14) { */ case 16: - _r$16 = xd.ExtensionDescriptor.Enum(); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = legacyEnumName(_r$16); /* */ $s = 20; case 20: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - enumName = _r$17; - /* } */ case 17: - filename = ""; - _r$18 = xd.ExtensionDescriptor.ParentFile(); /* */ $s = 21; case 21: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - fd = _r$18; - /* */ if (!($interfaceIsEqual(fd, $ifaceNil))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!($interfaceIsEqual(fd, $ifaceNil))) { */ case 22: - _r$19 = fd.Path(); /* */ $s = 24; case 24: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - filename = _r$19; - /* } */ case 23: - _r$20 = xd.ExtensionDescriptor.FullName(); /* */ $s = 25; case 25: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - name = _r$20; - _r$21 = messageset.IsMessageSetExtension(new xd.constructor.elem(xd)); /* */ $s = 28; case 28: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - /* */ if (_r$21) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_r$21) { */ case 26: - name = new protoreflect.FullName(name).Parent(); - /* } */ case 27: - xi.ExtendedType = parent; - _r$22 = reflect.Zero(extType); /* */ $s = 29; case 29: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = $clone(_r$22, reflect.Value).Interface(); /* */ $s = 30; case 30: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - xi.ExtensionType = _r$23; - _r$24 = xd.ExtensionDescriptor.Number(); /* */ $s = 31; case 31: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - xi.Field = ((_r$24 >> 0)); - xi.Name = (name); - _r$25 = tag.Marshal(new xd.constructor.elem(xd), enumName); /* */ $s = 32; case 32: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - xi.Tag = _r$25; - xi.Filename = filename; - $s = -1; return; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.initToLegacy, $c: true, $r, _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, enumName, extType, fd, filename, messageName, mt, mv, mv$1, mz, mz$1, name, ok, ok$1, parent, t, xd, xi, $s};return $f; - }; - ExtensionInfo.prototype.initToLegacy = function() { return this.$val.initToLegacy(); }; - ExtensionInfo.ptr.prototype.initFromLegacy = function() { - var {_r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, _v$1, _v$2, ed, evs, fd, isOptional, isRepeated, md, t, tt, v, v$1, v$2, v$3, xd, xd$1, xi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - if ($interfaceIsEqual(xi.ExtendedType, $ifaceNil) || $interfaceIsEqual(xi.ExtensionType, $ifaceNil)) { - xd = new placeholderExtension.ptr((xi.Name), ((xi.Field >> 0))); - extensionTypeDescriptor.copy(xi.desc, new extensionTypeDescriptor.ptr(new xd.constructor.elem(xd), xi)); - $s = -1; return; - } - ed = $ifaceNil; - md = $ifaceNil; - t = reflect.TypeOf(xi.ExtensionType); - _r$5 = t.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(_r$5 === 22)) { _v = false; $s = 1; continue s; } - _r$6 = t.Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !((_r$7 === 25)); case 1: - isOptional = _v; - _r$8 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(_r$8 === 23)) { _v$1 = false; $s = 5; continue s; } - _r$9 = t.Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$1 = !((_r$10 === 8)); case 5: - isRepeated = _v$1; - /* */ if (isOptional || isRepeated) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (isOptional || isRepeated) { */ case 9: - _r$11 = t.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - t = _r$11; - /* } */ case 10: - _r$12 = reflect.Zero(t); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, reflect.Value).Interface(); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _ref = _r$13; - /* */ if ($assertType(_ref, protoreflect.Enum, true)[1]) { $s = 14; continue; } - /* */ if ($assertType(_ref, enumV1, true)[1]) { $s = 15; continue; } - /* */ if ($assertType(_ref, protoreflect.ProtoMessage, true)[1]) { $s = 16; continue; } - /* */ if ($assertType(_ref, messageV1, true)[1]) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if ($assertType(_ref, protoreflect.Enum, true)[1]) { */ case 14: - v = _ref; - _r$14 = v.Descriptor(); /* */ $s = 19; case 19: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - ed = _r$14; - $s = 18; continue; - /* } else if ($assertType(_ref, enumV1, true)[1]) { */ case 15: - v$1 = _ref; - _r$15 = LegacyLoadEnumDesc(t); /* */ $s = 20; case 20: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - ed = _r$15; - $s = 18; continue; - /* } else if ($assertType(_ref, protoreflect.ProtoMessage, true)[1]) { */ case 16: - v$2 = _ref; - _r$16 = v$2.ProtoReflect(); /* */ $s = 21; case 21: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.Descriptor(); /* */ $s = 22; case 22: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - md = _r$17; - $s = 18; continue; - /* } else if ($assertType(_ref, messageV1, true)[1]) { */ case 17: - v$3 = _ref; - _r$18 = LegacyLoadMessageDesc(t); /* */ $s = 23; case 23: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - md = _r$18; - /* } */ case 18: - evs = $ifaceNil; - /* */ if (!($interfaceIsEqual(ed, $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(ed, $ifaceNil))) { */ case 24: - _r$19 = ed.Values(); /* */ $s = 26; case 26: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - evs = _r$19; - /* } */ case 25: - _r$20 = tag.Unmarshal(xi.Tag, t, evs); /* */ $s = 27; case 27: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - fd = $assertType(_r$20, ptrType$43); - xd$1 = new filedesc.Extension.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType$41.nil, $ifaceNil, 0)), new filedesc.ExtensionL1.ptr(0, $ifaceNil, 0, 0), new filedesc.ExtensionL2.ptr($throwNilPointerError, new filedesc.stringName.ptr(false, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), "", ""), false, false, new filedesc.defaultValue.ptr(false, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), $ifaceNil, sliceType.nil), $ifaceNil, $ifaceNil)); - xd$1.Base.L0.ParentFile = filedesc.SurrogateProto2; - xd$1.Base.L0.FullName = (xi.Name); - xd$1.L1.Number = ((xi.Field >> 0)); - xd$1.L1.Cardinality = fd.L1.Cardinality; - xd$1.L1.Kind = fd.L1.Kind; - xd$1.L2.IsPacked = fd.L1.IsPacked; - filedesc.defaultValue.copy(xd$1.L2.Default, fd.L1.Default); - _r$21 = new Export.ptr().MessageDescriptorOf(xi.ExtendedType); /* */ $s = 28; case 28: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - xd$1.L1.Extendee = _r$21; - xd$1.L2.Enum = ed; - xd$1.L2.Message = md; - _r$22 = messageset.IsMessageSet(xd$1.L1.Extendee); /* */ $s = 32; case 32: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - if (!(_r$22)) { _v$2 = false; $s = 31; continue s; } - _r$23 = md.FullName(); /* */ $s = 33; case 33: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _v$2 = _r$23 === xd$1.Base.L0.FullName; case 31: - /* */ if (_v$2) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_v$2) { */ case 29: - xd$1.Base.L0.FullName = new protoreflect.FullName(xd$1.Base.L0.FullName).Append("message_set_extension"); - /* } */ case 30: - tt = reflect.TypeOf(xi.ExtensionType); - /* */ if (isOptional) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (isOptional) { */ case 34: - _r$24 = tt.Elem(); /* */ $s = 36; case 36: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - tt = _r$24; - /* } */ case 35: - xi.goType = tt; - extensionTypeDescriptor.copy(xi.desc, new extensionTypeDescriptor.ptr(xd$1, xi)); - $s = -1; return; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.initFromLegacy, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, _v$1, _v$2, ed, evs, fd, isOptional, isRepeated, md, t, tt, v, v$1, v$2, v$3, xd, xd$1, xi, $s};return $f; - }; - ExtensionInfo.prototype.initFromLegacy = function() { return this.$val.initFromLegacy(); }; - placeholderExtension.ptr.prototype.ParentFile = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.ParentFile = function() { return this.$val.ParentFile(); }; - placeholderExtension.ptr.prototype.Parent = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.Parent = function() { return this.$val.Parent(); }; - placeholderExtension.ptr.prototype.Index = function() { - var x; - x = this; - return 0; - }; - placeholderExtension.prototype.Index = function() { return this.$val.Index(); }; - placeholderExtension.ptr.prototype.Syntax = function() { - var x; - x = this; - return 0; - }; - placeholderExtension.prototype.Syntax = function() { return this.$val.Syntax(); }; - placeholderExtension.ptr.prototype.Name = function() { - var x; - x = this; - return new protoreflect.FullName(x.name).Name(); - }; - placeholderExtension.prototype.Name = function() { return this.$val.Name(); }; - placeholderExtension.ptr.prototype.FullName = function() { - var x; - x = this; - return x.name; - }; - placeholderExtension.prototype.FullName = function() { return this.$val.FullName(); }; - placeholderExtension.ptr.prototype.IsPlaceholder = function() { - var x; - x = this; - return true; - }; - placeholderExtension.prototype.IsPlaceholder = function() { return this.$val.IsPlaceholder(); }; - placeholderExtension.ptr.prototype.Options = function() { - var x; - x = this; - return descopts.Field; - }; - placeholderExtension.prototype.Options = function() { return this.$val.Options(); }; - placeholderExtension.ptr.prototype.Number = function() { - var x; - x = this; - return x.number; - }; - placeholderExtension.prototype.Number = function() { return this.$val.Number(); }; - placeholderExtension.ptr.prototype.Cardinality = function() { - var x; - x = this; - return 0; - }; - placeholderExtension.prototype.Cardinality = function() { return this.$val.Cardinality(); }; - placeholderExtension.ptr.prototype.Kind = function() { - var x; - x = this; - return 0; - }; - placeholderExtension.prototype.Kind = function() { return this.$val.Kind(); }; - placeholderExtension.ptr.prototype.HasJSONName = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.HasJSONName = function() { return this.$val.HasJSONName(); }; - placeholderExtension.ptr.prototype.JSONName = function() { - var x; - x = this; - return "[" + (x.name) + "]"; - }; - placeholderExtension.prototype.JSONName = function() { return this.$val.JSONName(); }; - placeholderExtension.ptr.prototype.TextName = function() { - var x; - x = this; - return "[" + (x.name) + "]"; - }; - placeholderExtension.prototype.TextName = function() { return this.$val.TextName(); }; - placeholderExtension.ptr.prototype.HasPresence = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.HasPresence = function() { return this.$val.HasPresence(); }; - placeholderExtension.ptr.prototype.HasOptionalKeyword = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.HasOptionalKeyword = function() { return this.$val.HasOptionalKeyword(); }; - placeholderExtension.ptr.prototype.IsExtension = function() { - var x; - x = this; - return true; - }; - placeholderExtension.prototype.IsExtension = function() { return this.$val.IsExtension(); }; - placeholderExtension.ptr.prototype.IsWeak = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.IsWeak = function() { return this.$val.IsWeak(); }; - placeholderExtension.ptr.prototype.IsPacked = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.IsPacked = function() { return this.$val.IsPacked(); }; - placeholderExtension.ptr.prototype.IsList = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.IsList = function() { return this.$val.IsList(); }; - placeholderExtension.ptr.prototype.IsMap = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.IsMap = function() { return this.$val.IsMap(); }; - placeholderExtension.ptr.prototype.MapKey = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.MapKey = function() { return this.$val.MapKey(); }; - placeholderExtension.ptr.prototype.MapValue = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.MapValue = function() { return this.$val.MapValue(); }; - placeholderExtension.ptr.prototype.HasDefault = function() { - var x; - x = this; - return false; - }; - placeholderExtension.prototype.HasDefault = function() { return this.$val.HasDefault(); }; - placeholderExtension.ptr.prototype.Default = function() { - var x; - x = this; - return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - }; - placeholderExtension.prototype.Default = function() { return this.$val.Default(); }; - placeholderExtension.ptr.prototype.DefaultEnumValue = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.DefaultEnumValue = function() { return this.$val.DefaultEnumValue(); }; - placeholderExtension.ptr.prototype.ContainingOneof = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.ContainingOneof = function() { return this.$val.ContainingOneof(); }; - placeholderExtension.ptr.prototype.ContainingMessage = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.ContainingMessage = function() { return this.$val.ContainingMessage(); }; - placeholderExtension.ptr.prototype.Enum = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.Enum = function() { return this.$val.Enum(); }; - placeholderExtension.ptr.prototype.Message = function() { - var x; - x = this; - return $ifaceNil; - }; - placeholderExtension.prototype.Message = function() { return this.$val.Message(); }; - placeholderExtension.ptr.prototype.ProtoType = function(param) { - var param, x; - x = this; - return; - }; - placeholderExtension.prototype.ProtoType = function(param) { return this.$val.ProtoType(param); }; - placeholderExtension.ptr.prototype.ProtoInternal = function(param) { - var param, x; - x = this; - return; - }; - placeholderExtension.prototype.ProtoInternal = function(param) { return this.$val.ProtoInternal(param); }; - Export.ptr.prototype.LegacyEnumName = function(ed) { - var {$24r, _r$5, ed, $s, $r, $c} = $restore(this, {ed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyEnumName(ed); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.LegacyEnumName, $c: true, $r, $24r, _r$5, ed, $s};return $f; - }; - Export.prototype.LegacyEnumName = function(ed) { return this.$val.LegacyEnumName(ed); }; - Export.ptr.prototype.LegacyMessageTypeOf = function(m, name) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, name, $s, $r, $c} = $restore(this, {m, name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone((new Export.ptr()), Export).protoMessageV2Of(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mv = _r$5; - /* */ if (!($interfaceIsEqual(mv, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(mv, $ifaceNil))) { */ case 2: - _r$6 = mv.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Type(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$8 = legacyLoadMessageType(reflect.TypeOf(m), name); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.LegacyMessageTypeOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, name, $s};return $f; - }; - Export.prototype.LegacyMessageTypeOf = function(m, name) { return this.$val.LegacyMessageTypeOf(m, name); }; - Export.ptr.prototype.UnmarshalJSONEnum = function(ed, b) { - var {$24r, $24r$1, $24r$2, $24r$3, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, b, ed, err, err$1, ev, name, num, $s, $r, $c} = $restore(this, {ed, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = [name]; - num = [num]; - /* */ if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 34) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 34) { */ case 1: - name[0] = ""; - _r$5 = json.Unmarshal(b, (name.$ptr || (name.$ptr = new ptrType$46(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, name)))); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err = _r$5; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - _r$6 = ed.FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$6); - _arg$1 = b; - _r$7 = errors.New("invalid input for enum %v: %s", new sliceType$1([_arg, _arg$1])); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = [0, _r$7]; - $s = 9; case 9: return $24r; - /* } */ case 6: - _r$8 = ed.Values(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.ByName(name[0]); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - ev = _r$9; - /* */ if ($interfaceIsEqual(ev, $ifaceNil)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($interfaceIsEqual(ev, $ifaceNil)) { */ case 12: - _r$10 = ed.FullName(); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.FullName(_r$10); - _arg$3 = new protoreflect.Name(name[0]); - _r$11 = errors.New("invalid value for enum %v: %s", new sliceType$1([_arg$2, _arg$3])); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$1 = [0, _r$11]; - $s = 16; case 16: return $24r$1; - /* } */ case 13: - _r$12 = ev.Number(); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$2 = [_r$12, $ifaceNil]; - $s = 18; case 18: return $24r$2; - /* } else { */ case 2: - num[0] = 0; - _r$13 = json.Unmarshal(b, (num.$ptr || (num.$ptr = new ptrType$47(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, num)))); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$1 = _r$13; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 20: - _r$14 = ed.FullName(); /* */ $s = 22; case 22: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _arg$4 = new protoreflect.FullName(_r$14); - _arg$5 = b; - _r$15 = errors.New("invalid input for enum %v: %s", new sliceType$1([_arg$4, _arg$5])); /* */ $s = 23; case 23: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$3 = [0, _r$15]; - $s = 24; case 24: return $24r$3; - /* } */ case 21: - $s = -1; return [num[0], $ifaceNil]; - /* } */ case 3: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.UnmarshalJSONEnum, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, b, ed, err, err$1, ev, name, num, $s};return $f; - }; - Export.prototype.UnmarshalJSONEnum = function(ed, b) { return this.$val.UnmarshalJSONEnum(ed, b); }; - Export.ptr.prototype.CompressGZIP = function(in$1) { - var {_arg, _arg$1, _q, _r$5, blockHeader, blockSize, gzipFooter, gzipHeader, in$1, numBlocks, out, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = sliceType.nil; - gzipHeader = $toNativeArray($kindUint8, [31, 139, 8, 0, 0, 0, 0, 0, 0, 255]); - blockHeader = arrayType$3.zero(); - numBlocks = 1 + (_q = in$1.$length / 65535, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - gzipFooter = arrayType$4.zero(); - _arg = $subslice(new sliceType(gzipFooter), 0, 4); - _r$5 = crc32.ChecksumIEEE(in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - $r = $clone(binary.LittleEndian, binary.littleEndian).PutUint32(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(gzipFooter), 4, 8), ((in$1.$length >>> 0))); - out = $makeSlice(sliceType, 0, (((10 + ($imul(5, numBlocks)) >> 0) + in$1.$length >> 0) + 8 >> 0)); - out = $appendSlice(out, new sliceType(gzipHeader)); - while (true) { - if (!(blockHeader[0] === 0)) { break; } - blockSize = 65535; - if (blockSize > in$1.$length) { - blockHeader[0] = 1; - blockSize = in$1.$length; - } - $clone(binary.LittleEndian, binary.littleEndian).PutUint16($subslice(new sliceType(blockHeader), 1, 3), ((blockSize << 16 >>> 16))); - $clone(binary.LittleEndian, binary.littleEndian).PutUint16($subslice(new sliceType(blockHeader), 3, 5), ~((blockSize << 16 >>> 16)) << 16 >>> 16); - out = $appendSlice(out, new sliceType(blockHeader)); - out = $appendSlice(out, $subslice(in$1, 0, blockSize)); - in$1 = $subslice(in$1, blockSize); - } - out = $appendSlice(out, new sliceType(gzipFooter)); - out = out; - $s = -1; return out; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.CompressGZIP, $c: true, $r, _arg, _arg$1, _q, _r$5, blockHeader, blockSize, gzipFooter, gzipHeader, in$1, numBlocks, out, $s};return $f; - }; - Export.prototype.CompressGZIP = function(in$1) { return this.$val.CompressGZIP(in$1); }; - legacyEnumName = function(ed) { - var {_r$5, _r$6, _r$7, ed, enumName, fd, protoPkg, $s, $r, $c} = $restore(this, {ed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - protoPkg = ""; - _r$5 = ed.FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - enumName = (_r$5); - _r$6 = ed.ParentFile(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fd = _r$6; - /* */ if (!($interfaceIsEqual(fd, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(fd, $ifaceNil))) { */ case 3: - _r$7 = fd.Package(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - protoPkg = (_r$7); - enumName = strings.TrimPrefix(enumName, protoPkg + "."); - /* } */ case 4: - if (protoPkg === "") { - $s = -1; return strs.GoCamelCase(enumName); - } - $s = -1; return protoPkg + "." + strs.GoCamelCase(enumName); - /* */ } return; } var $f = {$blk: legacyEnumName, $c: true, $r, _r$5, _r$6, _r$7, ed, enumName, fd, protoPkg, $s};return $f; - }; - legacyWrapEnum = function(v) { - var {$24r, _r$5, _r$6, et, v, x, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyLoadEnumType($clone(v, reflect.Value).Type()); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - et = _r$5; - _r$6 = et.New((((x = $clone(v, reflect.Value).Int(), x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: legacyWrapEnum, $c: true, $r, $24r, _r$5, _r$6, et, v, x, $s};return $f; - }; - legacyLoadEnumType = function(t) { - var {_r$5, _r$6, _r$7, _tuple, _tuple$1, ed, et, et$1, et$2, ok, ok$1, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyEnumTypeCache.Load(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - et = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(et, protoreflect.EnumType); - } - et$1 = $ifaceNil; - _r$6 = LegacyLoadEnumDesc(t); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ed = _r$6; - et$1 = new legacyEnumType.ptr(ed, t, new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0)); - _r$7 = legacyEnumTypeCache.LoadOrStore(t, et$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - et$2 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return $assertType(et$2, protoreflect.EnumType); - } - $s = -1; return et$1; - /* */ } return; } var $f = {$blk: legacyLoadEnumType, $c: true, $r, _r$5, _r$6, _r$7, _tuple, _tuple$1, ed, et, et$1, et$2, ok, ok$1, t, $s};return $f; - }; - legacyEnumType.ptr.prototype.New = function(n) { - var {_r$5, _tuple, e, e$1, n, ok, t, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$5 = t.m.Load(new protoreflect.EnumNumber(n)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - e = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(e, protoreflect.Enum); - } - e$1 = new legacyEnumWrapper.ptr(n, t, t.goType); - $r = t.m.Store(new protoreflect.EnumNumber(n), e$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return e$1; - /* */ } return; } var $f = {$blk: legacyEnumType.ptr.prototype.New, $c: true, $r, _r$5, _tuple, e, e$1, n, ok, t, $s};return $f; - }; - legacyEnumType.prototype.New = function(n) { return this.$val.New(n); }; - legacyEnumType.ptr.prototype.Descriptor = function() { - var t; - t = this; - return t.desc; - }; - legacyEnumType.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - legacyEnumWrapper.ptr.prototype.Descriptor = function() { - var {$24r, _r$5, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$5 = e.pbTyp.Descriptor(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: legacyEnumWrapper.ptr.prototype.Descriptor, $c: true, $r, $24r, _r$5, e, $s};return $f; - }; - legacyEnumWrapper.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - legacyEnumWrapper.ptr.prototype.Type = function() { - var e; - e = this; - return e.pbTyp; - }; - legacyEnumWrapper.prototype.Type = function() { return this.$val.Type(); }; - legacyEnumWrapper.ptr.prototype.Number = function() { - var e; - e = this; - return e.num; - }; - legacyEnumWrapper.prototype.Number = function() { return this.$val.Number(); }; - legacyEnumWrapper.ptr.prototype.ProtoReflect = function() { - var e; - e = this; - return e; - }; - legacyEnumWrapper.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - legacyEnumWrapper.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, _r$6, e, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$5 = $clone(reflect.New(e.goTyp), reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5; - $clone(v, reflect.Value).SetInt((new $Int64(0, e.num))); - _r$6 = $clone(v, reflect.Value).Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: legacyEnumWrapper.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, _r$6, e, v, $s};return $f; - }; - legacyEnumWrapper.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - LegacyLoadEnumDesc = function(t) { - var {$24r, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, ed, ed$1, ed$2, edV1, ev, i, idxs, md, ok, ok$1, ok$2, ok$3, t, x, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyEnumDescCache.Load(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - ed = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(ed, protoreflect.EnumDescriptor); - } - _r$6 = reflect.Zero(t); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - ev = _r$7; - _tuple$1 = $assertType(ev, protoreflect.Enum, true); - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok$1) { */ case 4: - _r$8 = fmt.Sprintf("%v already implements proto.Enum", new sliceType$1([t])); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $panic(new $String(_r$8)); - /* } */ case 5: - _tuple$2 = $assertType(ev, enumV1, true); - edV1 = _tuple$2[0]; - ok$2 = _tuple$2[1]; - /* */ if (!ok$2) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok$2) { */ case 7: - _r$9 = aberrantLoadEnumDesc(t); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 10; case 10: return $24r; - /* } */ case 8: - _r$10 = edV1.EnumDescriptor(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$3 = _r$10; - b = _tuple$3[0]; - idxs = _tuple$3[1]; - ed$1 = $ifaceNil; - /* */ if (idxs.$length === 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (idxs.$length === 1) { */ case 12: - _r$11 = legacyLoadFileDesc(b); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.Enums(); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Get((0 >= idxs.$length ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + 0])); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - ed$1 = _r$13; - $s = 14; continue; - /* } else { */ case 13: - _r$14 = legacyLoadFileDesc(b); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = _r$14.Messages(); /* */ $s = 19; case 19: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.Get((0 >= idxs.$length ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + 0])); /* */ $s = 20; case 20: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - md = _r$16; - _ref = $subslice(idxs, 1, (idxs.$length - 1 >> 0)); - _i = 0; - /* while (true) { */ case 21: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 22; continue; } - i = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$17 = md.Messages(); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = _r$17.Get(i); /* */ $s = 24; case 24: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - md = _r$18; - _i++; - $s = 21; continue; - case 22: - _r$19 = md.Enums(); /* */ $s = 25; case 25: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.Get((x = idxs.$length - 1 >> 0, ((x < 0 || x >= idxs.$length) ? ($throwRuntimeError("index out of range"), undefined) : idxs.$array[idxs.$offset + x]))); /* */ $s = 26; case 26: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - ed$1 = _r$20; - /* } */ case 14: - _r$21 = legacyEnumDescCache.LoadOrStore(t, ed$1); /* */ $s = 27; case 27: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _tuple$4 = _r$21; - ed$2 = _tuple$4[0]; - ok$3 = _tuple$4[1]; - if (ok$3) { - $s = -1; return $assertType(ed$2, protoreflect.EnumDescriptor); - } - $s = -1; return ed$1; - /* */ } return; } var $f = {$blk: LegacyLoadEnumDesc, $c: true, $r, $24r, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, ed, ed$1, ed$2, edV1, ev, i, idxs, md, ok, ok$1, ok$2, ok$3, t, x, $s};return $f; - }; - $pkg.LegacyLoadEnumDesc = LegacyLoadEnumDesc; - aberrantLoadEnumDesc = function(t) { - var {_r$5, _r$6, _r$7, _tuple, _tuple$1, ed, ed$1, ed$2, ok, ok$1, t, vd, x, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = aberrantEnumDescCache.Load(t); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - ed = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(ed, protoreflect.EnumDescriptor); - } - ed$1 = new filedesc.Enum.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType$41.nil, $ifaceNil, 0)), new filedesc.EnumL1.ptr(false), new filedesc.EnumL2.ptr($throwNilPointerError, new filedesc.EnumValues.ptr(sliceType$28.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false), new filedesc.Names.ptr(sliceType$22.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false), new filedesc.EnumRanges.ptr(sliceType$29.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), sliceType$29.nil))); - _r$6 = AberrantDeriveFullName(t); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ed$1.Base.L0.FullName = _r$6; - ed$1.Base.L0.ParentFile = filedesc.SurrogateProto3; - ed$1.L2.Values.List = $append(ed$1.L2.Values.List, new filedesc.EnumValue.ptr(new filedesc.Base.ptr(new filedesc.BaseL0.ptr("", ptrType$41.nil, $ifaceNil, 0)), new filedesc.EnumValueL1.ptr($throwNilPointerError, 0))); - vd = (x = ed$1.L2.Values.List, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - vd.Base.L0.FullName = ed$1.Base.L0.FullName + "_UNKNOWN"; - vd.Base.L0.ParentFile = ed$1.Base.L0.ParentFile; - vd.Base.L0.Parent = ed$1; - _r$7 = aberrantEnumDescCache.LoadOrStore(t, ed$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - ed$2 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return $assertType(ed$2, protoreflect.EnumDescriptor); - } - $s = -1; return ed$1; - /* */ } return; } var $f = {$blk: aberrantLoadEnumDesc, $c: true, $r, _r$5, _r$6, _r$7, _tuple, _tuple$1, ed, ed$1, ed$2, ok, ok$1, t, vd, x, $s};return $f; - }; - AberrantDeriveFullName = function(t) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _i, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, i, prefix, s, sanitize, ss, suffix, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sanitize = (function(r) { - var r; - if ((r === 47)) { - return 46; - } else if ((97 <= r && r <= 122) || (65 <= r && r <= 90) || (48 <= r && r <= 57)) { - return r; - } else { - return 95; - } - }); - _arg = sanitize; - _r$5 = t.PkgPath(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = strings.Map(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - prefix = _r$6; - _arg$2 = sanitize; - _r$7 = t.Name(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$3 = _r$7; - _r$8 = strings.Map(_arg$2, _arg$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - suffix = _r$8; - /* */ if (suffix === "") { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (suffix === "") { */ case 5: - _r$9 = reflect.ValueOf(t); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Pointer(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$4 = new $Uintptr(_r$10); - _r$11 = fmt.Sprintf("UnknownX%X", new sliceType$1([_arg$4])); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - suffix = _r$11; - /* } */ case 6: - ss = $append(strings.Split(prefix, "."), suffix); - _ref = ss; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (s === "" || (48 <= s.charCodeAt(0) && s.charCodeAt(0) <= 57)) { - ((i < 0 || i >= ss.$length) ? ($throwRuntimeError("index out of range"), undefined) : ss.$array[ss.$offset + i] = "x" + s); - } - _i++; - } - $s = -1; return (strings.Join(ss, ".")); - /* */ } return; } var $f = {$blk: AberrantDeriveFullName, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _i, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, i, prefix, s, sanitize, ss, suffix, t, $s};return $f; - }; - $pkg.AberrantDeriveFullName = AberrantDeriveFullName; - InitExtensionInfo = function(xi, xd, goType) { - var goType, xd, xi; - xi.goType = goType; - extensionTypeDescriptor.copy(xi.desc, new extensionTypeDescriptor.ptr(xd, xi)); - xi.init = 1; - }; - $pkg.InitExtensionInfo = InitExtensionInfo; - ExtensionInfo.ptr.prototype.New = function() { - var {$24r, _r$5, _r$6, xi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - _r$5 = xi.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.New, $c: true, $r, $24r, _r$5, _r$6, xi, $s};return $f; - }; - ExtensionInfo.prototype.New = function() { return this.$val.New(); }; - ExtensionInfo.ptr.prototype.Zero = function() { - var {$24r, _r$5, _r$6, xi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - _r$5 = xi.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Zero(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, _r$6, xi, $s};return $f; - }; - ExtensionInfo.prototype.Zero = function() { return this.$val.Zero(); }; - ExtensionInfo.ptr.prototype.ValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, v, xi, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - _r$5 = xi.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$5.PBValueOf($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.ValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, v, xi, $s};return $f; - }; - ExtensionInfo.prototype.ValueOf = function(v) { return this.$val.ValueOf(v); }; - ExtensionInfo.ptr.prototype.InterfaceOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, v, xi, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - _r$5 = xi.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.InterfaceOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, v, xi, $s};return $f; - }; - ExtensionInfo.prototype.InterfaceOf = function(v) { return this.$val.InterfaceOf(v); }; - ExtensionInfo.ptr.prototype.IsValidValue = function(v) { - var {$24r, _r$5, _r$6, v, xi, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - _r$5 = xi.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.IsValidPB($clone(v, protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.IsValidValue, $c: true, $r, $24r, _r$5, _r$6, v, xi, $s};return $f; - }; - ExtensionInfo.prototype.IsValidValue = function(v) { return this.$val.IsValidValue(v); }; - ExtensionInfo.ptr.prototype.IsValidInterface = function(v) { - var {$24r, _r$5, _r$6, _r$7, v, xi, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - _r$5 = xi.lazyInit(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$5.IsValidGo($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.IsValidInterface, $c: true, $r, $24r, _r$5, _r$6, _r$7, v, xi, $s};return $f; - }; - ExtensionInfo.prototype.IsValidInterface = function(v) { return this.$val.IsValidInterface(v); }; - ExtensionInfo.ptr.prototype.TypeDescriptor = function() { - var {xi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - /* */ if (atomic.LoadUint32((xi.$ptr_init || (xi.$ptr_init = new ptrType$17(function() { return this.$target.init; }, function($v) { this.$target.init = $v; }, xi)))) < 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.LoadUint32((xi.$ptr_init || (xi.$ptr_init = new ptrType$17(function() { return this.$target.init; }, function($v) { this.$target.init = $v; }, xi)))) < 1) { */ case 1: - $r = xi.lazyInitSlow(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return xi.desc; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.TypeDescriptor, $c: true, $r, xi, $s};return $f; - }; - ExtensionInfo.prototype.TypeDescriptor = function() { return this.$val.TypeDescriptor(); }; - ExtensionInfo.ptr.prototype.lazyInit = function() { - var {xi, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xi = this; - /* */ if (atomic.LoadUint32((xi.$ptr_init || (xi.$ptr_init = new ptrType$17(function() { return this.$target.init; }, function($v) { this.$target.init = $v; }, xi)))) < 2) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.LoadUint32((xi.$ptr_init || (xi.$ptr_init = new ptrType$17(function() { return this.$target.init; }, function($v) { this.$target.init = $v; }, xi)))) < 2) { */ case 1: - $r = xi.lazyInitSlow(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return xi.conv; - /* */ } return; } var $f = {$blk: ExtensionInfo.ptr.prototype.lazyInit, $c: true, $r, xi, $s};return $f; - }; - ExtensionInfo.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - ExtensionInfo.ptr.prototype.lazyInitSlow = function() { - var {_r$5, _r$6, _r$7, _r$8, xi, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - xi = this; - $r = xi.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(xi.mu, "Unlock"), []]); - /* */ if (xi.init === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (xi.init === 2) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - $deferred.push([atomic.StoreUint32, [(xi.$ptr_init || (xi.$ptr_init = new ptrType$17(function() { return this.$target.init; }, function($v) { this.$target.init = $v; }, xi))), 2]]); - /* */ if ($interfaceIsEqual(xi.desc.ExtensionDescriptor, $ifaceNil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($interfaceIsEqual(xi.desc.ExtensionDescriptor, $ifaceNil)) { */ case 5: - $r = xi.initFromLegacy(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - _r$5 = xi.desc.ExtensionDescriptor.IsPlaceholder(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!_r$5) { */ case 8: - /* */ if ($interfaceIsEqual(xi.ExtensionType, $ifaceNil)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($interfaceIsEqual(xi.ExtensionType, $ifaceNil)) { */ case 11: - $r = xi.initToLegacy(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - _r$6 = NewConverter(xi.goType, xi.desc.ExtensionDescriptor); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - xi.conv = _r$6; - _r$7 = makeExtensionFieldInfo(xi.desc.ExtensionDescriptor); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - xi.info = _r$7; - _r$8 = newValidationInfo(xi.desc.ExtensionDescriptor, xi.goType); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - validationInfo.copy(xi.info.validation, _r$8); - /* } */ case 9: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ExtensionInfo.ptr.prototype.lazyInitSlow, $c: true, $r, _r$5, _r$6, _r$7, _r$8, xi, $s, $deferred};return $f; } } - }; - ExtensionInfo.prototype.lazyInitSlow = function() { return this.$val.lazyInitSlow(); }; - extensionTypeDescriptor.ptr.prototype.Type = function() { - var xtd; - xtd = this; - return xtd.xi; - }; - extensionTypeDescriptor.prototype.Type = function() { return this.$val.Type(); }; - extensionTypeDescriptor.ptr.prototype.Descriptor = function() { - var xtd; - xtd = this; - return xtd.ExtensionDescriptor; - }; - extensionTypeDescriptor.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - EnumInfo.ptr.prototype.New = function(n) { - var {$24r, _r$5, _r$6, _r$7, n, t, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$5 = reflect.ValueOf(new protoreflect.EnumNumber(n)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Convert(t.GoReflectType); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = $assertType(_r$7, protoreflect.Enum); - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: EnumInfo.ptr.prototype.New, $c: true, $r, $24r, _r$5, _r$6, _r$7, n, t, $s};return $f; - }; - EnumInfo.prototype.New = function(n) { return this.$val.New(n); }; - EnumInfo.ptr.prototype.Descriptor = function() { - var t; - t = this; - return t.Desc; - }; - EnumInfo.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - marshalOptions.ptr.prototype.Options = function() { - var o; - o = this; - return new proto.MarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), true, $clone(o, marshalOptions).Deterministic(), $clone(o, marshalOptions).UseCachedSize()); - }; - marshalOptions.prototype.Options = function() { return this.$val.Options(); }; - marshalOptions.ptr.prototype.Deterministic = function() { - var o; - o = this; - return !((((o.flags & 1) >>> 0) === 0)); - }; - marshalOptions.prototype.Deterministic = function() { return this.$val.Deterministic(); }; - marshalOptions.ptr.prototype.UseCachedSize = function() { - var o; - o = this; - return !((((o.flags & 2) >>> 0) === 0)); - }; - marshalOptions.prototype.UseCachedSize = function() { return this.$val.UseCachedSize(); }; - MessageInfo.ptr.prototype.size = function(in$1) { - var {_r$5, _tuple, in$1, mi, ms, ok, p, size, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - _tuple = $assertType(in$1.Message, ptrType, true); - ms = _tuple[0]; - ok = _tuple[1]; - if (ok) { - pointer.copy(p, ms.pointer()); - } else { - pointer.copy(p, $assertType(in$1.Message, ptrType$1).pointer()); - } - _r$5 = mi.sizePointer($clone(p, pointer), new marshalOptions.ptr(in$1.Flags)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - size = _r$5; - $s = -1; return new structType$1.ptr(new pragma.NoUnkeyedLiterals.ptr(), size); - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.size, $c: true, $r, _r$5, _tuple, in$1, mi, ms, ok, p, size, $s};return $f; - }; - MessageInfo.prototype.size = function(in$1) { return this.$val.size(in$1); }; - MessageInfo.ptr.prototype.sizePointer = function(p, opts) { - var {$24r, _r$5, _r$6, _r$7, _r$8, mi, opts, p, size, size$1, $s, $r, $c} = $restore(this, {p, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ($clone(p, pointer).IsNil()) { - size = 0; - $s = -1; return size; - } - /* */ if ($clone(opts, marshalOptions).UseCachedSize() && $clone(mi.coderMessageInfo.sizecacheOffset, offset).IsValid()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($clone(opts, marshalOptions).UseCachedSize() && $clone(mi.coderMessageInfo.sizecacheOffset, offset).IsValid()) { */ case 2: - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.sizecacheOffset, offset)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).Int32(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = atomic.LoadInt32(_r$6); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - size$1 = _r$7; - if (size$1 >= 0) { - size = ((size$1 >> 0)); - $s = -1; return size; - } - /* } */ case 3: - _r$8 = mi.sizePointerSlow($clone(p, pointer), $clone(opts, marshalOptions)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - size = _r$8; - $24r = size; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.sizePointer, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, mi, opts, p, size, size$1, $s};return $f; - }; - MessageInfo.prototype.sizePointer = function(p, opts) { return this.$val.sizePointer(p, opts); }; - MessageInfo.ptr.prototype.sizePointerSlow = function(p, opts) { - var {_i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, e, f, fptr, mi, opts, p, size, u, $s, $r, $c} = $restore(this, {p, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - mi = this; - /* */ if (false && mi.coderMessageInfo.isMessageSet) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (false && mi.coderMessageInfo.isMessageSet) { */ case 1: - _r$5 = sizeMessageSet(mi, $clone(p, pointer), $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - size = _r$5; - /* */ if ($clone(mi.coderMessageInfo.sizecacheOffset, offset).IsValid()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($clone(mi.coderMessageInfo.sizecacheOffset, offset).IsValid()) { */ case 4: - _r$6 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.sizecacheOffset, offset)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).Int32(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = atomic.StoreInt32(_r$7, ((size >> 0))); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - size = size; - $s = -1; return size; - /* } */ case 2: - /* */ if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { */ case 9: - _r$8 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, pointer).Extensions(); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - e = _r$9; - _r$10 = mi.sizeExtensions(e, $clone(opts, marshalOptions)); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - size = size + (_r$10) >> 0; - /* } */ case 10: - _ref = mi.coderMessageInfo.orderedCoderFields; - _i = 0; - /* while (true) { */ case 14: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 15; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (f.funcs.size === $throwNilPointerError) { - _i++; - /* continue; */ $s = 14; continue; - } - _r$11 = $clone(p, pointer).Apply($clone(f.offset, offset)); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - fptr = $clone(_r$11, pointer); - if (!(f.isPointer)) { _v = false; $s = 19; continue s; } - _r$12 = $clone(fptr, pointer).Elem(); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, pointer).IsNil(); /* */ $s = 21; case 21: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _v = _r$13; case 19: - /* */ if (_v) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_v) { */ case 17: - _i++; - /* continue; */ $s = 14; continue; - /* } */ case 18: - _r$14 = f.funcs.size($clone(fptr, pointer), f, $clone(opts, marshalOptions)); /* */ $s = 22; case 22: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - size = size + (_r$14) >> 0; - _i++; - $s = 14; continue; - case 15: - /* */ if ($clone(mi.coderMessageInfo.unknownOffset, offset).IsValid()) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if ($clone(mi.coderMessageInfo.unknownOffset, offset).IsValid()) { */ case 23: - _r$15 = mi.getUnknownBytes($clone(p, pointer)); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - u = _r$15; - if (!(u === ptrType$3.nil)) { - size = size + (u.$get().$length) >> 0; - } - /* } */ case 24: - /* */ if ($clone(mi.coderMessageInfo.sizecacheOffset, offset).IsValid()) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ($clone(mi.coderMessageInfo.sizecacheOffset, offset).IsValid()) { */ case 26: - /* */ if (size > 2147483647) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (size > 2147483647) { */ case 28: - _r$16 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.sizecacheOffset, offset)); /* */ $s = 31; case 31: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(_r$16, pointer).Int32(); /* */ $s = 32; case 32: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $r = atomic.StoreInt32(_r$17, -1); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 30; continue; - /* } else { */ case 29: - _r$18 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.sizecacheOffset, offset)); /* */ $s = 34; case 34: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, pointer).Int32(); /* */ $s = 35; case 35: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $r = atomic.StoreInt32(_r$19, ((size >> 0))); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 30: - /* } */ case 27: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.sizePointerSlow, $c: true, $r, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _v, e, f, fptr, mi, opts, p, size, u, $s};return $f; - }; - MessageInfo.prototype.sizePointerSlow = function(p, opts) { return this.$val.sizePointerSlow(p, opts); }; - MessageInfo.ptr.prototype.marshal = function(in$1) { - var {_r$5, _tmp, _tmp$1, _tuple, _tuple$1, b, err, in$1, mi, ms, ok, out, p, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new structType$3.ptr(new pragma.NoUnkeyedLiterals.ptr(), sliceType.nil); - err = $ifaceNil; - mi = this; - p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - _tuple = $assertType(in$1.Message, ptrType, true); - ms = _tuple[0]; - ok = _tuple[1]; - if (ok) { - pointer.copy(p, ms.pointer()); - } else { - pointer.copy(p, $assertType(in$1.Message, ptrType$1).pointer()); - } - _r$5 = mi.marshalAppendPointer(in$1.Buf, $clone(p, pointer), new marshalOptions.ptr(in$1.Flags)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - b = _tuple$1[0]; - err = _tuple$1[1]; - _tmp = new structType$3.ptr(new pragma.NoUnkeyedLiterals.ptr(), b); - _tmp$1 = err; - structType$3.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.marshal, $c: true, $r, _r$5, _tmp, _tmp$1, _tuple, _tuple$1, b, err, in$1, mi, ms, ok, out, p, $s};return $f; - }; - MessageInfo.prototype.marshal = function(in$1) { return this.$val.marshal(in$1); }; - MessageInfo.ptr.prototype.marshalAppendPointer = function(b, p, opts) { - var {$24r, _i, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _v, b, e, err, f, fptr, mi, opts, p, u, $s, $r, $c} = $restore(this, {b, p, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ($clone(p, pointer).IsNil()) { - $s = -1; return [b, $ifaceNil]; - } - /* */ if (false && mi.coderMessageInfo.isMessageSet) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (false && mi.coderMessageInfo.isMessageSet) { */ case 2: - _r$5 = marshalMessageSet(mi, b, $clone(p, pointer), $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 5; case 5: return $24r; - /* } */ case 3: - err = $ifaceNil; - /* */ if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { */ case 6: - _r$6 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).Extensions(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - e = _r$7; - _r$8 = mi.appendExtensions(b, e, $clone(opts, marshalOptions)); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - /* } */ case 7: - _ref = mi.coderMessageInfo.orderedCoderFields; - _i = 0; - /* while (true) { */ case 11: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 12; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (f.funcs.marshal === $throwNilPointerError) { - _i++; - /* continue; */ $s = 11; continue; - } - _r$9 = $clone(p, pointer).Apply($clone(f.offset, offset)); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - fptr = $clone(_r$9, pointer); - if (!(f.isPointer)) { _v = false; $s = 16; continue s; } - _r$10 = $clone(fptr, pointer).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, pointer).IsNil(); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _v = _r$11; case 16: - /* */ if (_v) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_v) { */ case 14: - _i++; - /* continue; */ $s = 11; continue; - /* } */ case 15: - _r$12 = f.funcs.marshal(b, $clone(fptr, pointer), f, $clone(opts, marshalOptions)); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$1 = _r$12; - b = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - _i++; - $s = 11; continue; - case 12: - /* */ if ($clone(mi.coderMessageInfo.unknownOffset, offset).IsValid() && !mi.coderMessageInfo.isMessageSet) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if ($clone(mi.coderMessageInfo.unknownOffset, offset).IsValid() && !mi.coderMessageInfo.isMessageSet) { */ case 20: - _r$13 = mi.getUnknownBytes($clone(p, pointer)); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - u = _r$13; - if (!(u === ptrType$3.nil)) { - b = $appendSlice(b, u.$get()); - } - /* } */ case 21: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.marshalAppendPointer, $c: true, $r, $24r, _i, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _v, b, e, err, f, fptr, mi, opts, p, u, $s};return $f; - }; - MessageInfo.prototype.marshalAppendPointer = function(b, p, opts) { return this.$val.marshalAppendPointer(b, p, opts); }; - MessageInfo.ptr.prototype.sizeExtensions = function(ext, opts) { - var {_entry, _i, _keys, _r$5, _r$6, _r$7, _ref, ext, mi, n, opts, x, xi, $s, $r, $c} = $restore(this, {ext, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - mi = this; - if (ext === ptrType$36.nil) { - n = 0; - $s = -1; return n; - } - _ref = ext.$get(); - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - x = $clone(_entry.v, ExtensionField); - _r$5 = getExtensionFieldInfo($clone(x, ExtensionField).Type()); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xi = _r$5; - if (xi.funcs.size === $throwNilPointerError) { - _i++; - /* continue; */ $s = 1; continue; - } - _r$6 = x.Value(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = xi.funcs.size($clone(_r$6, protoreflect.Value), xi.tagsize, $clone(opts, marshalOptions)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - n = n + (_r$7) >> 0; - _i++; - $s = 1; continue; - case 2: - n = n; - $s = -1; return n; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.sizeExtensions, $c: true, $r, _entry, _i, _keys, _r$5, _r$6, _r$7, _ref, ext, mi, n, opts, x, xi, $s};return $f; - }; - MessageInfo.prototype.sizeExtensions = function(ext, opts) { return this.$val.sizeExtensions(ext, opts); }; - MessageInfo.ptr.prototype.appendExtensions = function(b, ext, opts) { - var {_1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _entry, _entry$1, _entry$2, _i, _i$1, _i$2, _keys, _keys$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, b, err, err$1, ext, k, k$1, keys, mi, opts, x, x$1, xi, xi$1, $s, $r, $c} = $restore(this, {b, ext, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - if (ext === ptrType$36.nil) { - $s = -1; return [b, $ifaceNil]; - } - _1 = $keys(ext.$get()).length; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (0)) { */ case 2: - $s = -1; return [b, $ifaceNil]; - /* } else if (_1 === (1)) { */ case 3: - err = $ifaceNil; - _ref = ext.$get(); - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 6: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 7; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 6; continue; - } - x = $clone(_entry.v, ExtensionField); - _r$5 = getExtensionFieldInfo($clone(x, ExtensionField).Type()); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xi = _r$5; - _arg = b; - _r$6 = x.Value(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$6, protoreflect.Value); - _arg$2 = xi.wiretag; - _arg$3 = $clone(opts, marshalOptions); - _r$7 = xi.funcs.marshal(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - b = _tuple[0]; - err = _tuple[1]; - _i++; - $s = 6; continue; - case 7: - $s = -1; return [b, err]; - /* } else { */ case 4: - keys = $makeSlice(sliceType$14, 0, $keys(ext.$get()).length); - _ref$1 = ext.$get(); - _i$1 = 0; - _keys$1 = $keys(_ref$1); - while (true) { - if (!(_i$1 < _keys$1.length)) { break; } - _entry$1 = _ref$1[_keys$1[_i$1]]; - if (_entry$1 === undefined) { - _i$1++; - continue; - } - k = _entry$1.k; - keys = $append(keys, ((k >> 0))); - _i$1++; - } - $r = sort.Ints(keys); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err$1 = $ifaceNil; - _ref$2 = keys; - _i$2 = 0; - /* while (true) { */ case 12: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 13; continue; } - k$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - x$1 = $clone((_entry$2 = (ext.$get())[$Int32.keyFor(((k$1 >> 0)))], _entry$2 !== undefined ? _entry$2.v : new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil)), ExtensionField); - _r$8 = getExtensionFieldInfo($clone(x$1, ExtensionField).Type()); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - xi$1 = _r$8; - _arg$4 = b; - _r$9 = x$1.Value(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$5 = $clone(_r$9, protoreflect.Value); - _arg$6 = xi$1.wiretag; - _arg$7 = $clone(opts, marshalOptions); - _r$10 = xi$1.funcs.marshal(_arg$4, _arg$5, _arg$6, _arg$7); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$1 = _r$10; - b = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [b, err$1]; - } - _i$2++; - $s = 12; continue; - case 13: - $s = -1; return [b, $ifaceNil]; - /* } */ case 5: - case 1: - $s = -1; return [sliceType.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.appendExtensions, $c: true, $r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _entry, _entry$1, _entry$2, _i, _i$1, _i$2, _keys, _keys$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, b, err, err$1, ext, k, k$1, keys, mi, opts, x, x$1, xi, xi$1, $s};return $f; - }; - MessageInfo.prototype.appendExtensions = function(b, ext, opts) { return this.$val.appendExtensions(b, ext, opts); }; - unmarshalOptions.ptr.prototype.Options = function() { - var o; - o = this; - return new proto.UnmarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), true, true, $clone(o, unmarshalOptions).DiscardUnknown(), o.resolver, 0); - }; - unmarshalOptions.prototype.Options = function() { return this.$val.Options(); }; - unmarshalOptions.ptr.prototype.DiscardUnknown = function() { - var o; - o = this; - return !((((o.flags & 1) >>> 0) === 0)); - }; - unmarshalOptions.prototype.DiscardUnknown = function() { return this.$val.DiscardUnknown(); }; - unmarshalOptions.ptr.prototype.IsDefault = function() { - var o; - o = this; - return (o.flags === 0) && $interfaceIsEqual(o.resolver, protoregistry.GlobalTypes); - }; - unmarshalOptions.prototype.IsDefault = function() { return this.$val.IsDefault(); }; - MessageInfo.ptr.prototype.unmarshal = function(in$1) { - var {_r$5, _tuple, _tuple$1, err, flags$1, in$1, mi, ms, ok, out, p, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - _tuple = $assertType(in$1.Message, ptrType, true); - ms = _tuple[0]; - ok = _tuple[1]; - if (ok) { - pointer.copy(p, ms.pointer()); - } else { - pointer.copy(p, $assertType(in$1.Message, ptrType$1).pointer()); - } - _r$5 = mi.unmarshalPointer(in$1.Buf, $clone(p, pointer), 0, new unmarshalOptions.ptr(in$1.Flags, in$1.Resolver, in$1.Depth)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - out = $clone(_tuple$1[0], unmarshalOutput); - err = _tuple$1[1]; - flags$1 = 0; - if (out.initialized) { - flags$1 = (flags$1 | (1)) >>> 0; - } - $s = -1; return [new structType$5.ptr(new pragma.NoUnkeyedLiterals.ptr(), flags$1), err]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.unmarshal, $c: true, $r, _r$5, _tuple, _tuple$1, err, flags$1, in$1, mi, ms, ok, out, p, $s};return $f; - }; - MessageInfo.prototype.unmarshal = function(in$1) { return this.$val.unmarshal(in$1); }; - MessageInfo.ptr.prototype.unmarshalPointer = function(b, p, groupTag, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, err$1, exts, f, groupTag, initialized, mi, n, n$1, n$2, num, o, o$1, opts, out, p, requiredMask, start, tag$1, u, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, groupTag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - opts.depth = opts.depth - (1) >> 0; - if (opts.depth < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errRecursionDepth; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - /* */ if (false && mi.coderMessageInfo.isMessageSet) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (false && mi.coderMessageInfo.isMessageSet) { */ case 2: - _r$5 = unmarshalMessageSet(mi, b, $clone(p, pointer), $clone(opts, unmarshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - unmarshalOutput.copy(out, _tuple[0]); - err = _tuple[1]; - $24r = [out, err]; - $s = 5; case 5: return $24r; - /* } */ case 3: - initialized = true; - requiredMask = new $Uint64(0, 0); - exts = ptrType$36.nil; - start = b.$length; - /* while (true) { */ case 6: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 7; continue; } - tag$1 = new $Uint64(0, 0); - if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - tag$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - b = $subslice(b, 1); - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - tag$1 = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - b = $subslice(b, 2); - } else { - n = 0; - _tuple$1 = protowire.ConsumeVarint(b); - tag$1 = _tuple$1[0]; - n = _tuple$1[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - b = $subslice(b, n); - } - num = 0; - n$1 = $shiftRightUint64(tag$1, 3); - if ((n$1.$high < 0 || (n$1.$high === 0 && n$1.$low < 1)) || (n$1.$high > 0 || (n$1.$high === 0 && n$1.$low > 536870911))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } else { - num = ((n$1.$low >> 0)); - } - wtyp = ((new $Uint64(tag$1.$high & 0, (tag$1.$low & 7) >>> 0).$low << 24 >> 24)); - if (wtyp === 4) { - if (!((num === groupTag))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errDecode; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - groupTag = 0; - /* break; */ $s = 7; continue; - } - f = ptrType$6.nil; - if (((num >> 0)) < mi.coderMessageInfo.denseCoderFields.$length) { - f = (x$2 = mi.coderMessageInfo.denseCoderFields, ((num < 0 || num >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + num])); - } else { - f = (_entry = mi.coderMessageInfo.coderFields[protowire.Number.keyFor(num)], _entry !== undefined ? _entry.v : ptrType$6.nil); - } - n$2 = 0; - err$1 = errUnknown; - /* */ if (!(f === ptrType$6.nil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(f === ptrType$6.nil)) { */ case 9: - if (f.funcs.unmarshal === $throwNilPointerError) { - /* break; */ $s = 8; continue; - } - o = new unmarshalOutput.ptr(0, false); - _arg = b; - _r$6 = $clone(p, pointer).Apply($clone(f.offset, offset)); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$6, pointer); - _arg$2 = wtyp; - _arg$3 = f; - _arg$4 = $clone(opts, unmarshalOptions); - _r$7 = f.funcs.unmarshal(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - unmarshalOutput.copy(o, _tuple$2[0]); - err$1 = _tuple$2[1]; - n$2 = o.n; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - /* break; */ $s = 8; continue; - } - requiredMask = (x$3 = f.validation.requiredBit, new $Uint64(requiredMask.$high | x$3.$high, (requiredMask.$low | x$3.$low) >>> 0)); - if (!(f.funcs.isInit === $throwNilPointerError) && !o.initialized) { - initialized = false; - } - $s = 11; continue; - /* } else { */ case 10: - /* */ if (exts === ptrType$36.nil && $clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (exts === ptrType$36.nil && $clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { */ case 14: - _r$8 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, pointer).Extensions(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - exts = _r$9; - if (exts.$get() === false) { - exts.$set({}); - } - /* } */ case 15: - if (exts === ptrType$36.nil) { - /* break; */ $s = 8; continue; - } - o$1 = new unmarshalOutput.ptr(0, false); - _r$10 = mi.unmarshalExtension(b, num, wtyp, exts.$get(), $clone(opts, unmarshalOptions)); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$3 = _r$10; - unmarshalOutput.copy(o$1, _tuple$3[0]); - err$1 = _tuple$3[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - /* break; */ $s = 8; continue; - } - n$2 = o$1.n; - if (!o$1.initialized) { - initialized = false; - } - /* } */ case 11: - case 8: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 19: - if (!($interfaceIsEqual(err$1, errUnknown))) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = err$1; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - n$2 = protowire.ConsumeFieldValue(num, wtyp, b); - if (n$2 < 0) { - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errDecode; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - } - /* */ if (!$clone(opts, unmarshalOptions).DiscardUnknown() && $clone(mi.coderMessageInfo.unknownOffset, offset).IsValid()) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!$clone(opts, unmarshalOptions).DiscardUnknown() && $clone(mi.coderMessageInfo.unknownOffset, offset).IsValid()) { */ case 21: - _r$11 = mi.mutableUnknownBytes($clone(p, pointer)); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - u = _r$11; - u.$set(protowire.AppendTag(u.$get(), num, wtyp)); - u.$set($appendSlice(u.$get(), $subslice(b, 0, n$2))); - /* } */ case 22: - /* } */ case 20: - b = $subslice(b, n$2); - $s = 6; continue; - case 7: - if (!((groupTag === 0))) { - _tmp$12 = $clone(out, unmarshalOutput); - _tmp$13 = errDecode; - unmarshalOutput.copy(out, _tmp$12); - err = _tmp$13; - $s = -1; return [out, err]; - } - if (mi.coderMessageInfo.numRequiredFields > 0 && !((bits.OnesCount64(requiredMask) === ((mi.coderMessageInfo.numRequiredFields >> 0))))) { - initialized = false; - } - if (initialized) { - out.initialized = true; - } - out.n = start - b.$length >> 0; - _tmp$14 = $clone(out, unmarshalOutput); - _tmp$15 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$14); - err = _tmp$15; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.unmarshalPointer, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, err$1, exts, f, groupTag, initialized, mi, n, n$1, n$2, num, o, o$1, opts, out, p, requiredMask, start, tag$1, u, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - MessageInfo.prototype.unmarshalPointer = function(b, p, groupTag, opts) { return this.$val.unmarshalPointer(b, p, groupTag, opts); }; - MessageInfo.ptr.prototype.unmarshalExtension = function(b, num, wtyp, exts, opts) { - var {$24r, _1, _arg, _arg$1, _arg$2, _entry, _key, _key$1, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, err, err$1, exts, ival, mi, num, opts, out, out$1, v, valid, wtyp, x, xi, xt, $s, $r, $c} = $restore(this, {b, num, wtyp, exts, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - mi = this; - x = $clone((_entry = exts[$Int32.keyFor(((num >> 0)))], _entry !== undefined ? _entry.v : new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil)), ExtensionField); - xt = $clone(x, ExtensionField).Type(); - /* */ if ($interfaceIsEqual(xt, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(xt, $ifaceNil)) { */ case 1: - err$1 = $ifaceNil; - _r$5 = mi.Desc.FullName(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = opts.resolver.FindExtensionByNumber(_r$5, num); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - xt = _tuple[0]; - err$1 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - if ($interfaceIsEqual(err$1, protoregistry.NotFound)) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tmp$2 = $clone(out, unmarshalOutput); - _r$7 = mi.Desc.FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$7); - _arg$1 = new protowire.Number(num); - _arg$2 = err$1; - _r$8 = errors.New("%v: unable to resolve extension %v: %v", new sliceType$1([_arg, _arg$1, _arg$2])); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tmp$3 = _r$8; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $24r = [out, err]; - $s = 9; case 9: return $24r; - /* } */ case 6: - /* } */ case 2: - _r$9 = getExtensionFieldInfo(xt); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - xi = _r$9; - if (xi.funcs.unmarshal === $throwNilPointerError) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errUnknown; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - /* */ if (false) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (false) { */ case 11: - /* */ if ($clone(opts, unmarshalOptions).IsDefault() && x.canLazy(xt)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($clone(opts, unmarshalOptions).IsDefault() && x.canLazy(xt)) { */ case 13: - _r$10 = skipExtension(b, xi, num, wtyp, $clone(opts, unmarshalOptions)); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$1 = _r$10; - out$1 = $clone(_tuple$1[0], unmarshalOutput); - valid = _tuple$1[1]; - _1 = valid; - if (_1 === (3)) { - if (out$1.initialized) { - x.appendLazyBytes(xt, xi, num, wtyp, $subslice(b, 0, out$1.n)); - _key = ((num >> 0)); (exts || $throwRuntimeError("assignment to entry in nil map"))[$Int32.keyFor(_key)] = { k: _key, v: $clone(x, ExtensionField) }; - _tmp$6 = $clone(out$1, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - } else if (_1 === (2)) { - _tmp$8 = $clone(out$1, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } else if (_1 === (1)) { - } - /* } */ case 14: - /* } */ case 12: - _r$11 = x.Value(); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - ival = $clone(_r$11, protoreflect.Value); - /* */ if (!$clone(ival, protoreflect.Value).IsValid() && xi.unmarshalNeedsValue) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!$clone(ival, protoreflect.Value).IsValid() && xi.unmarshalNeedsValue) { */ case 17: - _r$12 = xt.New(); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - protoreflect.Value.copy(ival, _r$12); - /* } */ case 18: - _r$13 = xi.funcs.unmarshal(b, $clone(ival, protoreflect.Value), num, wtyp, $clone(opts, unmarshalOptions)); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$2 = _r$13; - v = $clone(_tuple$2[0], protoreflect.Value); - out = $clone(_tuple$2[1], unmarshalOutput); - err = _tuple$2[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = err; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - } - if (xi.funcs.isInit === $throwNilPointerError) { - out.initialized = true; - } - x.Set(xt, $clone(v, protoreflect.Value)); - _key$1 = ((num >> 0)); (exts || $throwRuntimeError("assignment to entry in nil map"))[$Int32.keyFor(_key$1)] = { k: _key$1, v: $clone(x, ExtensionField) }; - _tmp$12 = $clone(out, unmarshalOutput); - _tmp$13 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$12); - err = _tmp$13; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.unmarshalExtension, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _entry, _key, _key$1, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, err, err$1, exts, ival, mi, num, opts, out, out$1, v, valid, wtyp, x, xi, xt, $s};return $f; - }; - MessageInfo.prototype.unmarshalExtension = function(b, num, wtyp, exts, opts) { return this.$val.unmarshalExtension(b, num, wtyp, exts, opts); }; - skipExtension = function(b, xi, num, wtyp, opts) { - var {_, _1, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, n, num, opts, out, out$1, out$2, st, st$1, v, wtyp, xi, $s, $r, $c} = $restore(this, {b, xi, num, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - _ = 0; - if (xi.validation.mi === ptrType$5.nil) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = 1; - unmarshalOutput.copy(out, _tmp); - _ = _tmp$1; - $s = -1; return [out, _]; - } - $r = xi.validation.mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _1 = xi.validation.typ; - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (1)) { */ case 3: - if (!((wtyp === 2))) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = 1; - unmarshalOutput.copy(out, _tmp$2); - _ = _tmp$3; - $s = -1; return [out, _]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = 1; - unmarshalOutput.copy(out, _tmp$4); - _ = _tmp$5; - $s = -1; return [out, _]; - } - _r$5 = xi.validation.mi.validate(v, 0, $clone(opts, unmarshalOptions)); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - out$1 = $clone(_tuple$1[0], unmarshalOutput); - st = _tuple$1[1]; - out$1.n = n; - _tmp$6 = $clone(out$1, unmarshalOutput); - _tmp$7 = st; - unmarshalOutput.copy(out, _tmp$6); - _ = _tmp$7; - $s = -1; return [out, _]; - /* } else if (_1 === (2)) { */ case 4: - if (!((wtyp === 3))) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = 1; - unmarshalOutput.copy(out, _tmp$8); - _ = _tmp$9; - $s = -1; return [out, _]; - } - _r$6 = xi.validation.mi.validate(b, num, $clone(opts, unmarshalOptions)); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - out$2 = $clone(_tuple$2[0], unmarshalOutput); - st$1 = _tuple$2[1]; - _tmp$10 = $clone(out$2, unmarshalOutput); - _tmp$11 = st$1; - unmarshalOutput.copy(out, _tmp$10); - _ = _tmp$11; - $s = -1; return [out, _]; - /* } else { */ case 5: - _tmp$12 = $clone(out, unmarshalOutput); - _tmp$13 = 1; - unmarshalOutput.copy(out, _tmp$12); - _ = _tmp$13; - $s = -1; return [out, _]; - /* } */ case 6: - case 2: - $s = -1; return [out, _]; - /* */ } return; } var $f = {$blk: skipExtension, $c: true, $r, _, _1, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, n, num, opts, out, out$1, out$2, st, st$1, v, wtyp, xi, $s};return $f; - }; - newMapConverter = function(t, fd) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, fd, t, $s, $r, $c} = $restore(this, {t, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = t.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!((_r$5 === 21))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$5 === 21))) { */ case 1: - _arg = t; - _r$6 = fd.FullName(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.FullName(_r$6); - _r$7 = fmt.Sprintf("invalid Go type %v for field %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String(_r$7)); - /* } */ case 2: - _r$8 = t.Key(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$2 = _r$8; - _r$9 = fd.MapKey(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$3 = _r$9; - _r$10 = newSingularConverter(_arg$2, _arg$3); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = t.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$4 = _r$11; - _r$12 = fd.MapValue(); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$5 = _r$12; - _r$13 = newSingularConverter(_arg$4, _arg$5); /* */ $s = 11; case 11: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = new mapConverter.ptr(t, _r$10, _r$13); - $s = 12; case 12: return $24r; - /* */ } return; } var $f = {$blk: newMapConverter, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, fd, t, $s};return $f; - }; - mapConverter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfMap(new mapReflect.ptr($clone(v, reflect.Value), c.keyConv, c.valConv)); - /* */ } return; } var $f = {$blk: mapConverter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - mapConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - mapConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Map(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$49).v; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: mapConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, c, v, $s};return $f; - }; - mapConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - mapConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, mapv, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, ptrType$49, true); - mapv = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return false; - } - $s = -1; return $interfaceIsEqual($clone(mapv.v, reflect.Value).Type(), c.goType); - /* */ } return; } var $f = {$blk: mapConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, mapv, ok, v, $s};return $f; - }; - mapConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - mapConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - mapConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - mapConverter.ptr.prototype.New = function() { - var {$24r, _r$5, _r$6, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = reflect.MakeMap(c.goType); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = c.PBValueOf($clone(_r$5, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: mapConverter.ptr.prototype.New, $c: true, $r, $24r, _r$5, _r$6, c, $s};return $f; - }; - mapConverter.prototype.New = function() { return this.$val.New(); }; - mapConverter.ptr.prototype.Zero = function() { - var {$24r, _r$5, _r$6, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = reflect.Zero(c.goType); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = c.PBValueOf($clone(_r$5, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: mapConverter.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, _r$6, c, $s};return $f; - }; - mapConverter.prototype.Zero = function() { return this.$val.Zero(); }; - mapReflect.ptr.prototype.Len = function() { - var ms; - ms = this; - return $clone(ms.v, reflect.Value).Len(); - }; - mapReflect.prototype.Len = function() { return this.$val.Len(); }; - mapReflect.ptr.prototype.Has = function(k) { - var {_r$5, _r$6, k, ms, rk, rv, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _r$5 = ms.keyConv.GoValueOf($clone($clone(k, protoreflect.MapKey).Value(), protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rk = _r$5; - _r$6 = $clone(ms.v, reflect.Value).MapIndex($clone(rk, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - rv = _r$6; - $s = -1; return $clone(rv, reflect.Value).IsValid(); - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.Has, $c: true, $r, _r$5, _r$6, k, ms, rk, rv, $s};return $f; - }; - mapReflect.prototype.Has = function(k) { return this.$val.Has(k); }; - mapReflect.ptr.prototype.Get = function(k) { - var {$24r, _r$5, _r$6, _r$7, k, ms, rk, rv, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _r$5 = ms.keyConv.GoValueOf($clone($clone(k, protoreflect.MapKey).Value(), protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rk = _r$5; - _r$6 = $clone(ms.v, reflect.Value).MapIndex($clone(rk, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - rv = _r$6; - if (!$clone(rv, reflect.Value).IsValid()) { - $s = -1; return new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - } - _r$7 = ms.valConv.PBValueOf($clone(rv, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.Get, $c: true, $r, $24r, _r$5, _r$6, _r$7, k, ms, rk, rv, $s};return $f; - }; - mapReflect.prototype.Get = function(k) { return this.$val.Get(k); }; - mapReflect.ptr.prototype.Set = function(k, v) { - var {_r$5, _r$6, k, ms, rk, rv, v, $s, $r, $c} = $restore(this, {k, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _r$5 = ms.keyConv.GoValueOf($clone($clone(k, protoreflect.MapKey).Value(), protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rk = _r$5; - _r$6 = ms.valConv.GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - rv = _r$6; - $r = $clone(ms.v, reflect.Value).SetMapIndex($clone(rk, reflect.Value), $clone(rv, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.Set, $c: true, $r, _r$5, _r$6, k, ms, rk, rv, v, $s};return $f; - }; - mapReflect.prototype.Set = function(k, v) { return this.$val.Set(k, v); }; - mapReflect.ptr.prototype.Clear = function(k) { - var {_r$5, k, ms, rk, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _r$5 = ms.keyConv.GoValueOf($clone($clone(k, protoreflect.MapKey).Value(), protoreflect.Value)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rk = _r$5; - $r = $clone(ms.v, reflect.Value).SetMapIndex($clone(rk, reflect.Value), new reflect.Value.ptr(ptrType$7.nil, 0, 0)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.Clear, $c: true, $r, _r$5, k, ms, rk, $s};return $f; - }; - mapReflect.prototype.Clear = function(k) { return this.$val.Clear(k); }; - mapReflect.ptr.prototype.Mutable = function(k) { - var {_r$5, _r$6, _tuple, k, ms, ok, v, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _tuple = $assertType(ms.valConv, ptrType$50, true); - ok = _tuple[1]; - if (!ok) { - $panic(new $String("invalid Mutable on map with non-message value type")); - } - _r$5 = ms.Get($clone(k, protoreflect.MapKey)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = $clone(_r$5, protoreflect.Value); - /* */ if (!$clone(v, protoreflect.Value).IsValid()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!$clone(v, protoreflect.Value).IsValid()) { */ case 2: - _r$6 = ms.NewValue(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - protoreflect.Value.copy(v, _r$6); - $r = ms.Set($clone(k, protoreflect.MapKey), $clone(v, protoreflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return v; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.Mutable, $c: true, $r, _r$5, _r$6, _tuple, k, ms, ok, v, $s};return $f; - }; - mapReflect.prototype.Mutable = function(k) { return this.$val.Mutable(k); }; - mapReflect.ptr.prototype.Range = function(f) { - var {_r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, f, iter, k, ms, v, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - iter = mapRange($clone(ms.v, reflect.Value)); - /* while (true) { */ case 1: - _r$5 = iter.Next(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* if (!(_r$5)) { break; } */ if(!(_r$5)) { $s = 2; continue; } - _r$6 = iter.Key(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = ms.keyConv.PBValueOf($clone(_r$6, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).MapKey(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - k = $clone(_r$8, protoreflect.MapKey); - _r$9 = iter.Value(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = ms.valConv.PBValueOf($clone(_r$9, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v = $clone(_r$10, protoreflect.Value); - _r$11 = f($clone(k, protoreflect.MapKey), $clone(v, protoreflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!_r$11) { */ case 9: - $s = -1; return; - /* } */ case 10: - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.Range, $c: true, $r, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, f, iter, k, ms, v, $s};return $f; - }; - mapReflect.prototype.Range = function(f) { return this.$val.Range(f); }; - mapReflect.ptr.prototype.NewValue = function() { - var {$24r, _r$5, ms, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _r$5 = ms.valConv.New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.NewValue, $c: true, $r, $24r, _r$5, ms, $s};return $f; - }; - mapReflect.prototype.NewValue = function() { return this.$val.NewValue(); }; - mapReflect.ptr.prototype.IsValid = function() { - var ms; - ms = this; - return !$clone(ms.v, reflect.Value).IsNil(); - }; - mapReflect.prototype.IsValid = function() { return this.$val.IsValid(); }; - mapReflect.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, ms, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ms = this; - _r$5 = $clone(ms.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: mapReflect.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, ms, $s};return $f; - }; - mapReflect.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - newListConverter = function(t, fd) { - var {$24r, $24r$1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _v, fd, t, $s, $r, $c} = $restore(this, {t, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = t.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(_r$5 === 22)) { _v = false; $s = 5; continue s; } - _r$6 = t.Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = _r$7 === 23; case 5: - /* */ if (_v) { $s = 2; continue; } - _r$8 = t.Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if ((_r$8 === 23)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 2: - _r$9 = t.Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = newSingularConverter(_r$10, fd); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = new listPtrConverter.ptr(t, _r$11); - $s = 13; case 13: return $24r; - /* } else if ((_r$8 === 23)) { */ case 3: - _r$12 = t.Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = newSingularConverter(_r$12, fd); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$1 = new listConverter.ptr(t, _r$13); - $s = 16; case 16: return $24r$1; - /* } */ case 4: - case 1: - _arg = t; - _r$14 = fd.FullName(); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.FullName(_r$14); - _r$15 = fmt.Sprintf("invalid Go type %v for field %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $panic(new $String(_r$15)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: newListConverter, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _v, fd, t, $s};return $f; - }; - listConverter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, _r$6, c, pv, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - pv = reflect.New(c.goType); - _r$6 = $clone(pv, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = $clone(_r$6, reflect.Value).Set($clone(v, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return protoreflect.ValueOfList(new listReflect.ptr($clone(pv, reflect.Value), c.c)); - /* */ } return; } var $f = {$blk: listConverter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, _r$6, c, pv, v, $s};return $f; - }; - listConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - listConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, c, rv, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rv = $assertType(_r$5, ptrType$51).v; - /* */ if ($clone(rv, reflect.Value).IsNil()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($clone(rv, reflect.Value).IsNil()) { */ case 2: - _r$6 = reflect.Zero(c.goType); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$7 = $clone(rv, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: listConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, c, rv, v, $s};return $f; - }; - listConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - listConverter.ptr.prototype.IsValidPB = function(v) { - var {$24r, _r$5, _r$6, _tuple, c, list, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, ptrType$51, true); - list = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return false; - } - _r$6 = $clone(list.v, reflect.Value).Type().Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = $interfaceIsEqual(_r$6, c.goType); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: listConverter.ptr.prototype.IsValidPB, $c: true, $r, $24r, _r$5, _r$6, _tuple, c, list, ok, v, $s};return $f; - }; - listConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - listConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - listConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - listConverter.ptr.prototype.New = function() { - var c; - c = this; - return protoreflect.ValueOfList(new listReflect.ptr($clone(reflect.New(c.goType), reflect.Value), c.c)); - }; - listConverter.prototype.New = function() { return this.$val.New(); }; - listConverter.ptr.prototype.Zero = function() { - var {$24r, _r$5, _r$6, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = reflect.Zero(reflect.PtrTo(c.goType)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protoreflect.ValueOfList(new listReflect.ptr($clone(_r$5, reflect.Value), c.c)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: listConverter.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, _r$6, c, $s};return $f; - }; - listConverter.prototype.Zero = function() { return this.$val.Zero(); }; - listPtrConverter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfList(new listReflect.ptr($clone(v, reflect.Value), c.c)); - /* */ } return; } var $f = {$blk: listPtrConverter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - listPtrConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - listPtrConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = $assertType(_r$5, ptrType$51).v; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: listPtrConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, c, v, $s};return $f; - }; - listPtrConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - listPtrConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, list, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, ptrType$51, true); - list = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return false; - } - $s = -1; return $interfaceIsEqual($clone(list.v, reflect.Value).Type(), c.goType); - /* */ } return; } var $f = {$blk: listPtrConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, list, ok, v, $s};return $f; - }; - listPtrConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - listPtrConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - listPtrConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - listPtrConverter.ptr.prototype.New = function() { - var {$24r, _r$5, _r$6, _r$7, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = c.goType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = c.PBValueOf($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: listPtrConverter.ptr.prototype.New, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, $s};return $f; - }; - listPtrConverter.prototype.New = function() { return this.$val.New(); }; - listPtrConverter.ptr.prototype.Zero = function() { - var {$24r, _r$5, _r$6, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = reflect.Zero(c.goType); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = c.PBValueOf($clone(_r$5, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: listPtrConverter.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, _r$6, c, $s};return $f; - }; - listPtrConverter.prototype.Zero = function() { return this.$val.Zero(); }; - listReflect.ptr.prototype.Len = function() { - var {$24r, _r$5, _r$6, ls, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - if ($clone(ls.v, reflect.Value).IsNil()) { - $s = -1; return 0; - } - _r$5 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.Len, $c: true, $r, $24r, _r$5, _r$6, ls, $s};return $f; - }; - listReflect.prototype.Len = function() { return this.$val.Len(); }; - listReflect.ptr.prototype.Get = function(i) { - var {$24r, _r$5, _r$6, _r$7, i, ls, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _r$5 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Index(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = ls.conv.PBValueOf($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.Get, $c: true, $r, $24r, _r$5, _r$6, _r$7, i, ls, $s};return $f; - }; - listReflect.prototype.Get = function(i) { return this.$val.Get(i); }; - listReflect.ptr.prototype.Set = function(i, v) { - var {_r$5, _r$6, _r$7, i, ls, v, $s, $r, $c} = $restore(this, {i, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _r$5 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Index(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = ls.conv.GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = $clone(_r$6, reflect.Value).Set($clone(_r$7, reflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.Set, $c: true, $r, _r$5, _r$6, _r$7, i, ls, v, $s};return $f; - }; - listReflect.prototype.Set = function(i, v) { return this.$val.Set(i, v); }; - listReflect.ptr.prototype.Append = function(v) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, ls, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _r$5 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = $clone(_r$6, reflect.Value); - _r$7 = ls.conv.GoValueOf($clone(v, protoreflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$7, reflect.Value); - _r$8 = reflect.Append(_arg, new sliceType$13([_arg$1])); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = $clone(_r$5, reflect.Value).Set($clone(_r$8, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.Append, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, ls, v, $s};return $f; - }; - listReflect.prototype.Append = function(v) { return this.$val.Append(v); }; - listReflect.ptr.prototype.AppendMutable = function() { - var {_r$5, _tuple, ls, ok, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _tuple = $assertType(ls.conv, ptrType$50, true); - ok = _tuple[1]; - if (!ok) { - $panic(new $String("invalid AppendMutable on list with non-message type")); - } - _r$5 = ls.NewElement(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = $clone(_r$5, protoreflect.Value); - $r = ls.Append($clone(v, protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return v; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.AppendMutable, $c: true, $r, _r$5, _tuple, ls, ok, v, $s};return $f; - }; - listReflect.prototype.AppendMutable = function() { return this.$val.AppendMutable(); }; - listReflect.ptr.prototype.Truncate = function(i) { - var {_r$5, _r$6, _r$7, i, ls, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _r$5 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(ls.v, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Slice(0, i); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = $clone(_r$5, reflect.Value).Set($clone(_r$7, reflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.Truncate, $c: true, $r, _r$5, _r$6, _r$7, i, ls, $s};return $f; - }; - listReflect.prototype.Truncate = function(i) { return this.$val.Truncate(i); }; - listReflect.ptr.prototype.NewElement = function() { - var {$24r, _r$5, ls, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _r$5 = ls.conv.New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.NewElement, $c: true, $r, $24r, _r$5, ls, $s};return $f; - }; - listReflect.prototype.NewElement = function() { return this.$val.NewElement(); }; - listReflect.ptr.prototype.IsValid = function() { - var ls; - ls = this; - return !$clone(ls.v, reflect.Value).IsNil(); - }; - listReflect.prototype.IsValid = function() { return this.$val.IsValid(); }; - listReflect.ptr.prototype.protoUnwrap = function() { - var {$24r, _r$5, ls, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ls = this; - _r$5 = $clone(ls.v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: listReflect.ptr.prototype.protoUnwrap, $c: true, $r, $24r, _r$5, ls, $s};return $f; - }; - listReflect.prototype.protoUnwrap = function() { return this.$val.protoUnwrap(); }; - NewConverter = function(t, fd) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, fd, t, $s, $r, $c} = $restore(this, {t, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.IsList(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 2; continue; } - _r$6 = fd.IsMap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$5) { */ case 2: - _r$7 = newListConverter(t, fd); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 9; case 9: return $24r; - /* } else if (_r$6) { */ case 3: - _r$8 = newMapConverter(t, fd); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 11; case 11: return $24r$1; - /* } else { */ case 4: - _r$9 = newSingularConverter(t, fd); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$2 = _r$9; - $s = 13; case 13: return $24r$2; - /* } */ case 5: - case 1: - _arg = t; - _r$10 = fd.FullName(); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.FullName(_r$10); - _r$11 = fmt.Sprintf("invalid Go type %v for field %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $panic(new $String(_r$11)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: NewConverter, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, fd, t, $s};return $f; - }; - $pkg.NewConverter = NewConverter; - newSingularConverter = function(t, fd) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, defVal, fd, t, $s, $r, $c} = $restore(this, {t, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - defVal = (function $b(fd$1, zero) { - var {$24r, _r$5, _r$6, fd$1, zero, $s, $r, $c} = $restore(this, {fd$1, zero}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd$1.Cardinality(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === 3) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$5 === 3) { */ case 1: - $s = -1; return zero; - /* } */ case 2: - _r$6 = fd$1.Default(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$5, _r$6, fd$1, zero, $s};return $f; - }); - _r$5 = fd.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _1 = _r$5; - /* */ if (_1 === (8)) { $s = 3; continue; } - /* */ if ((_1 === (5)) || (_1 === (17)) || (_1 === (15))) { $s = 4; continue; } - /* */ if ((_1 === (3)) || (_1 === (18)) || (_1 === (16))) { $s = 5; continue; } - /* */ if ((_1 === (13)) || (_1 === (7))) { $s = 6; continue; } - /* */ if ((_1 === (4)) || (_1 === (6))) { $s = 7; continue; } - /* */ if (_1 === (2)) { $s = 8; continue; } - /* */ if (_1 === (1)) { $s = 9; continue; } - /* */ if (_1 === (9)) { $s = 10; continue; } - /* */ if (_1 === (12)) { $s = 11; continue; } - /* */ if (_1 === (14)) { $s = 12; continue; } - /* */ if ((_1 === (11)) || (_1 === (10))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_1 === (8)) { */ case 3: - _r$6 = t.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6 === 1) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_r$6 === 1) { */ case 15: - _r$7 = defVal(fd, $clone(boolZero, protoreflect.Value)); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = new boolConverter.ptr(t, $clone(_r$7, protoreflect.Value)); - $s = 19; case 19: return $24r; - /* } */ case 16: - $s = 14; continue; - /* } else if ((_1 === (5)) || (_1 === (17)) || (_1 === (15))) { */ case 4: - _r$8 = t.Kind(); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (_r$8 === 5) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_r$8 === 5) { */ case 20: - _r$9 = defVal(fd, $clone(int32Zero, protoreflect.Value)); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$1 = new int32Converter.ptr(t, $clone(_r$9, protoreflect.Value)); - $s = 24; case 24: return $24r$1; - /* } */ case 21: - $s = 14; continue; - /* } else if ((_1 === (3)) || (_1 === (18)) || (_1 === (16))) { */ case 5: - _r$10 = t.Kind(); /* */ $s = 27; case 27: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (_r$10 === 6) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_r$10 === 6) { */ case 25: - _r$11 = defVal(fd, $clone(int64Zero, protoreflect.Value)); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$2 = new int64Converter.ptr(t, $clone(_r$11, protoreflect.Value)); - $s = 29; case 29: return $24r$2; - /* } */ case 26: - $s = 14; continue; - /* } else if ((_1 === (13)) || (_1 === (7))) { */ case 6: - _r$12 = t.Kind(); /* */ $s = 32; case 32: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12 === 10) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_r$12 === 10) { */ case 30: - _r$13 = defVal(fd, $clone(uint32Zero, protoreflect.Value)); /* */ $s = 33; case 33: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$3 = new uint32Converter.ptr(t, $clone(_r$13, protoreflect.Value)); - $s = 34; case 34: return $24r$3; - /* } */ case 31: - $s = 14; continue; - /* } else if ((_1 === (4)) || (_1 === (6))) { */ case 7: - _r$14 = t.Kind(); /* */ $s = 37; case 37: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (_r$14 === 11) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (_r$14 === 11) { */ case 35: - _r$15 = defVal(fd, $clone(uint64Zero, protoreflect.Value)); /* */ $s = 38; case 38: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$4 = new uint64Converter.ptr(t, $clone(_r$15, protoreflect.Value)); - $s = 39; case 39: return $24r$4; - /* } */ case 36: - $s = 14; continue; - /* } else if (_1 === (2)) { */ case 8: - _r$16 = t.Kind(); /* */ $s = 42; case 42: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (_r$16 === 13) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (_r$16 === 13) { */ case 40: - _r$17 = defVal(fd, $clone(float32Zero, protoreflect.Value)); /* */ $s = 43; case 43: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$5 = new float32Converter.ptr(t, $clone(_r$17, protoreflect.Value)); - $s = 44; case 44: return $24r$5; - /* } */ case 41: - $s = 14; continue; - /* } else if (_1 === (1)) { */ case 9: - _r$18 = t.Kind(); /* */ $s = 47; case 47: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - /* */ if (_r$18 === 14) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (_r$18 === 14) { */ case 45: - _r$19 = defVal(fd, $clone(float64Zero, protoreflect.Value)); /* */ $s = 48; case 48: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$6 = new float64Converter.ptr(t, $clone(_r$19, protoreflect.Value)); - $s = 49; case 49: return $24r$6; - /* } */ case 46: - $s = 14; continue; - /* } else if (_1 === (9)) { */ case 10: - _r$20 = t.Kind(); /* */ $s = 53; case 53: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - if (_r$20 === 24) { _v = true; $s = 52; continue s; } - _r$21 = t.Kind(); /* */ $s = 55; case 55: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - if (!(_r$21 === 23)) { _v$1 = false; $s = 54; continue s; } - _r$22 = t.Elem(); /* */ $s = 56; case 56: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _v$1 = $interfaceIsEqual(_r$22, byteType); case 54: - _v = _v$1; case 52: - /* */ if (_v) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (_v) { */ case 50: - _r$23 = defVal(fd, $clone(stringZero, protoreflect.Value)); /* */ $s = 57; case 57: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$7 = new stringConverter.ptr(t, $clone(_r$23, protoreflect.Value)); - $s = 58; case 58: return $24r$7; - /* } */ case 51: - $s = 14; continue; - /* } else if (_1 === (12)) { */ case 11: - _r$24 = t.Kind(); /* */ $s = 62; case 62: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - if (_r$24 === 24) { _v$2 = true; $s = 61; continue s; } - _r$25 = t.Kind(); /* */ $s = 64; case 64: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - if (!(_r$25 === 23)) { _v$3 = false; $s = 63; continue s; } - _r$26 = t.Elem(); /* */ $s = 65; case 65: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _v$3 = $interfaceIsEqual(_r$26, byteType); case 63: - _v$2 = _v$3; case 61: - /* */ if (_v$2) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (_v$2) { */ case 59: - _r$27 = defVal(fd, $clone(bytesZero, protoreflect.Value)); /* */ $s = 66; case 66: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $24r$8 = new bytesConverter.ptr(t, $clone(_r$27, protoreflect.Value)); - $s = 67; case 67: return $24r$8; - /* } */ case 60: - $s = 14; continue; - /* } else if (_1 === (14)) { */ case 12: - _r$28 = t.Kind(); /* */ $s = 70; case 70: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - /* */ if (_r$28 === 5) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if (_r$28 === 5) { */ case 68: - _r$29 = newEnumConverter(t, fd); /* */ $s = 71; case 71: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - $24r$9 = _r$29; - $s = 72; case 72: return $24r$9; - /* } */ case 69: - $s = 14; continue; - /* } else if ((_1 === (11)) || (_1 === (10))) { */ case 13: - $s = -1; return newMessageConverter(t); - /* } */ case 14: - case 1: - _arg = t; - _r$30 = fd.FullName(); /* */ $s = 73; case 73: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.FullName(_r$30); - _r$31 = fmt.Sprintf("invalid Go type %v for field %v", new sliceType$1([_arg, _arg$1])); /* */ $s = 74; case 74: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - $panic(new $String(_r$31)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: newSingularConverter, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, defVal, fd, t, $s};return $f; - }; - boolConverter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfBool($clone(v, reflect.Value).Bool()); - /* */ } return; } var $f = {$blk: boolConverter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - boolConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - boolConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(new $Bool(_r$5)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: boolConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - boolConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - boolConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Bool, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: boolConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - boolConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - boolConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - boolConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - boolConverter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - boolConverter.prototype.New = function() { return this.$val.New(); }; - boolConverter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - boolConverter.prototype.Zero = function() { return this.$val.Zero(); }; - int32Converter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, x, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfInt32((((x = $clone(v, reflect.Value).Int(), x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); - /* */ } return; } var $f = {$blk: int32Converter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, x, $s};return $f; - }; - int32Converter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - int32Converter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, x, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(new $Int32((((x = _r$5, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: int32Converter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, x, $s};return $f; - }; - int32Converter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - int32Converter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Int32, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: int32Converter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - int32Converter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - int32Converter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - int32Converter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - int32Converter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - int32Converter.prototype.New = function() { return this.$val.New(); }; - int32Converter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - int32Converter.prototype.Zero = function() { return this.$val.Zero(); }; - int64Converter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfInt64(($clone(v, reflect.Value).Int())); - /* */ } return; } var $f = {$blk: int64Converter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - int64Converter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - int64Converter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf((_r$5)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: int64Converter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - int64Converter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - int64Converter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Int64, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: int64Converter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - int64Converter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - int64Converter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - int64Converter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - int64Converter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - int64Converter.prototype.New = function() { return this.$val.New(); }; - int64Converter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - int64Converter.prototype.Zero = function() { return this.$val.Zero(); }; - uint32Converter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfUint32((($clone(v, reflect.Value).Uint().$low >>> 0))); - /* */ } return; } var $f = {$blk: uint32Converter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - uint32Converter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - uint32Converter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(new $Uint32(((_r$5.$low >>> 0)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: uint32Converter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - uint32Converter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - uint32Converter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Uint32, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: uint32Converter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - uint32Converter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - uint32Converter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - uint32Converter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - uint32Converter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - uint32Converter.prototype.New = function() { return this.$val.New(); }; - uint32Converter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - uint32Converter.prototype.Zero = function() { return this.$val.Zero(); }; - uint64Converter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfUint64(($clone(v, reflect.Value).Uint())); - /* */ } return; } var $f = {$blk: uint64Converter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - uint64Converter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - uint64Converter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf((_r$5)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: uint64Converter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - uint64Converter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - uint64Converter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Uint64, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: uint64Converter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - uint64Converter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - uint64Converter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - uint64Converter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - uint64Converter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - uint64Converter.prototype.New = function() { return this.$val.New(); }; - uint64Converter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - uint64Converter.prototype.Zero = function() { return this.$val.Zero(); }; - float32Converter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfFloat32(($fround($clone(v, reflect.Value).Float()))); - /* */ } return; } var $f = {$blk: float32Converter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - float32Converter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - float32Converter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Float(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(new $Float32(($fround(_r$5)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: float32Converter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - float32Converter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - float32Converter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Float32, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: float32Converter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - float32Converter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - float32Converter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - float32Converter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - float32Converter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - float32Converter.prototype.New = function() { return this.$val.New(); }; - float32Converter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - float32Converter.prototype.Zero = function() { return this.$val.Zero(); }; - float64Converter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfFloat64(($clone(v, reflect.Value).Float())); - /* */ } return; } var $f = {$blk: float64Converter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, $s};return $f; - }; - float64Converter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - float64Converter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Float(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(new $Float64((_r$5))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: float64Converter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - float64Converter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - float64Converter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $Float64, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: float64Converter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - float64Converter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - float64Converter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - float64Converter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - float64Converter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - float64Converter.prototype.New = function() { return this.$val.New(); }; - float64Converter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - float64Converter.prototype.Zero = function() { return this.$val.Zero(); }; - stringConverter.ptr.prototype.PBValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, _r$8, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - _r$6 = $clone(v, reflect.Value).Convert(stringType); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).String(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = protoreflect.ValueOfString(_r$7); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: stringConverter.ptr.prototype.PBValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, c, v, $s};return $f; - }; - stringConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - stringConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _r$9, c, s, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = $assertType(_r$5, $String); - _r$6 = c.goType.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if ((_r$6 === 23) && s === "") { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_r$6 === 23) && s === "") { */ case 2: - _r$7 = reflect.Zero(c.goType); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$8 = reflect.ValueOf(new $String(s)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Convert(c.goType); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$1 = _r$9; - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: stringConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, _r$9, c, s, v, $s};return $f; - }; - stringConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - stringConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, $String, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: stringConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - stringConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - stringConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - stringConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - stringConverter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - stringConverter.prototype.New = function() { return this.$val.New(); }; - stringConverter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - stringConverter.prototype.Zero = function() { return this.$val.Zero(); }; - bytesConverter.ptr.prototype.PBValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, _r$8, _r$9, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - _r$6 = c.goType.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if ((_r$6 === 24) && ($clone(v, reflect.Value).Len() === 0)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((_r$6 === 24) && ($clone(v, reflect.Value).Len() === 0)) { */ case 4: - $s = -1; return protoreflect.ValueOfBytes(sliceType.nil); - /* } */ case 5: - _r$7 = $clone(v, reflect.Value).Convert(bytesType); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Bytes(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protoreflect.ValueOfBytes(_r$8); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: bytesConverter.ptr.prototype.PBValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, _r$9, c, v, $s};return $f; - }; - bytesConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - bytesConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: bytesConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - bytesConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - bytesConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, sliceType, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: bytesConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - bytesConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - bytesConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - bytesConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - bytesConverter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - bytesConverter.prototype.New = function() { return this.$val.New(); }; - bytesConverter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - bytesConverter.prototype.Zero = function() { return this.$val.Zero(); }; - newEnumConverter = function(goType, fd) { - var {_r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, def, fd, goType, $s, $r, $c} = $restore(this, {goType, fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - def = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _r$5 = fd.Cardinality(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === 3) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$5 === 3) { */ case 1: - _r$6 = fd.Enum(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Values(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Get(0); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Number(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protoreflect.ValueOfEnum(_r$9); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - protoreflect.Value.copy(def, _r$10); - $s = 3; continue; - /* } else { */ case 2: - _r$11 = fd.Default(); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - protoreflect.Value.copy(def, _r$11); - /* } */ case 3: - $s = -1; return new enumConverter.ptr(goType, $clone(def, protoreflect.Value)); - /* */ } return; } var $f = {$blk: newEnumConverter, $c: true, $r, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, def, fd, goType, $s};return $f; - }; - enumConverter.ptr.prototype.PBValueOf = function(v) { - var {_r$5, c, v, x, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - $s = -1; return protoreflect.ValueOfEnum((((x = $clone(v, reflect.Value).Int(), x.$low + ((x.$high >> 31) * 4294967296)) >> 0))); - /* */ } return; } var $f = {$blk: enumConverter.ptr.prototype.PBValueOf, $c: true, $r, _r$5, c, v, x, $s};return $f; - }; - enumConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - enumConverter.ptr.prototype.GoValueOf = function(v) { - var {$24r, _r$5, _r$6, _r$7, c, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.ValueOf(new protoreflect.EnumNumber(_r$5)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Convert(c.goType); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: enumConverter.ptr.prototype.GoValueOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, c, v, $s};return $f; - }; - enumConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - enumConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$5, _tuple, c, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, protoreflect.EnumNumber, true); - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: enumConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$5, _tuple, c, ok, v, $s};return $f; - }; - enumConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - enumConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - enumConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - enumConverter.ptr.prototype.New = function() { - var c; - c = this; - return c.def; - }; - enumConverter.prototype.New = function() { return this.$val.New(); }; - enumConverter.ptr.prototype.Zero = function() { - var c; - c = this; - return c.def; - }; - enumConverter.prototype.Zero = function() { return this.$val.Zero(); }; - newMessageConverter = function(goType) { - var goType; - return new messageConverter.ptr(goType); - }; - messageConverter.ptr.prototype.PBValueOf = function(v) { - var {$24r, $24r$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, m, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType))) { */ case 1: - _r$5 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(v, reflect.Value).Type(), c.goType])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 2: - _r$6 = c.isNonPointer(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$6) { */ case 4: - /* */ if ($clone(v, reflect.Value).CanAddr()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($clone(v, reflect.Value).CanAddr()) { */ case 7: - v = $clone(v, reflect.Value).Addr(); - $s = 9; continue; - /* } else { */ case 8: - _r$7 = reflect.Zero(reflect.PtrTo($clone(v, reflect.Value).Type())); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = _r$7; - /* } */ case 9: - /* } */ case 5: - _r$8 = $clone(v, reflect.Value).Interface(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = $assertType(_r$8, protoreflect.ProtoMessage, true); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (ok) { */ case 12: - _r$9 = m.ProtoReflect(); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protoreflect.ValueOfMessage(_r$9); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 16; case 16: return $24r; - /* } */ case 13: - _r$11 = legacyWrapMessage($clone(v, reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = protoreflect.ValueOfMessage(_r$11); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$1 = _r$12; - $s = 19; case 19: return $24r$1; - /* */ } return; } var $f = {$blk: messageConverter.ptr.prototype.PBValueOf, $c: true, $r, $24r, $24r$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, m, ok, v, $s};return $f; - }; - messageConverter.prototype.PBValueOf = function(v) { return this.$val.PBValueOf(v); }; - messageConverter.ptr.prototype.GoValueOf = function(v) { - var {_r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, m, ok, rv, u, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - m = _r$5; - rv = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - _tuple = $assertType(m, unwrapper, true); - u = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$6 = u.protoUnwrap(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.ValueOf(_r$6); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - rv = _r$7; - $s = 4; continue; - /* } else { */ case 3: - _r$8 = m.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = reflect.ValueOf(_r$8); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - rv = _r$9; - /* } */ case 4: - _r$10 = c.isNonPointer(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (_r$10) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$10) { */ case 9: - /* */ if (!($interfaceIsEqual($clone(rv, reflect.Value).Type(), reflect.PtrTo(c.goType)))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual($clone(rv, reflect.Value).Type(), reflect.PtrTo(c.goType)))) { */ case 12: - _r$11 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(rv, reflect.Value).Type(), reflect.PtrTo(c.goType)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $panic(new $String(_r$11)); - /* } */ case 13: - /* */ if (!$clone(rv, reflect.Value).IsNil()) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!$clone(rv, reflect.Value).IsNil()) { */ case 15: - _r$12 = $clone(rv, reflect.Value).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - rv = _r$12; - $s = 17; continue; - /* } else { */ case 16: - _r$13 = $clone(rv, reflect.Value).Type().Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = reflect.Zero(_r$13); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - rv = _r$14; - /* } */ case 17: - /* } */ case 10: - /* */ if (!($interfaceIsEqual($clone(rv, reflect.Value).Type(), c.goType))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual($clone(rv, reflect.Value).Type(), c.goType))) { */ case 21: - _r$15 = fmt.Sprintf("invalid type: got %v, want %v", new sliceType$1([$clone(rv, reflect.Value).Type(), c.goType])); /* */ $s = 23; case 23: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $panic(new $String(_r$15)); - /* } */ case 22: - $s = -1; return rv; - /* */ } return; } var $f = {$blk: messageConverter.ptr.prototype.GoValueOf, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, m, ok, rv, u, v, $s};return $f; - }; - messageConverter.prototype.GoValueOf = function(v) { return this.$val.GoValueOf(v); }; - messageConverter.ptr.prototype.IsValidPB = function(v) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, m, ok, rv, u, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - m = _r$5; - rv = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - _tuple = $assertType(m, unwrapper, true); - u = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$6 = u.protoUnwrap(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.ValueOf(_r$6); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - rv = _r$7; - $s = 4; continue; - /* } else { */ case 3: - _r$8 = m.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = reflect.ValueOf(_r$8); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - rv = _r$9; - /* } */ case 4: - _r$10 = c.isNonPointer(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (_r$10) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$10) { */ case 9: - $s = -1; return $interfaceIsEqual($clone(rv, reflect.Value).Type(), reflect.PtrTo(c.goType)); - /* } */ case 10: - $s = -1; return $interfaceIsEqual($clone(rv, reflect.Value).Type(), c.goType); - /* */ } return; } var $f = {$blk: messageConverter.ptr.prototype.IsValidPB, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, m, ok, rv, u, v, $s};return $f; - }; - messageConverter.prototype.IsValidPB = function(v) { return this.$val.IsValidPB(v); }; - messageConverter.ptr.prototype.IsValidGo = function(v) { - var c, v; - c = this; - return $clone(v, reflect.Value).IsValid() && $interfaceIsEqual($clone(v, reflect.Value).Type(), c.goType); - }; - messageConverter.prototype.IsValidGo = function(v) { return this.$val.IsValidGo(v); }; - messageConverter.ptr.prototype.New = function() { - var {$24r, $24r$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = c.isNonPointer(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$5) { */ case 1: - _r$6 = $clone(reflect.New(c.goType), reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = c.PBValueOf($clone(_r$6, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 2: - _r$8 = c.goType.Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = reflect.New(_r$8); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = c.PBValueOf($clone(_r$9, reflect.Value)); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$1 = _r$10; - $s = 10; case 10: return $24r$1; - /* */ } return; } var $f = {$blk: messageConverter.ptr.prototype.New, $c: true, $r, $24r, $24r$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, c, $s};return $f; - }; - messageConverter.prototype.New = function() { return this.$val.New(); }; - messageConverter.ptr.prototype.Zero = function() { - var {$24r, _r$5, _r$6, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = reflect.Zero(c.goType); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = c.PBValueOf($clone(_r$5, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: messageConverter.ptr.prototype.Zero, $c: true, $r, $24r, _r$5, _r$6, c, $s};return $f; - }; - messageConverter.prototype.Zero = function() { return this.$val.Zero(); }; - messageConverter.ptr.prototype.isNonPointer = function() { - var {$24r, _r$5, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$5 = c.goType.Kind(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = !((_r$5 === 22)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: messageConverter.ptr.prototype.isNonPointer, $c: true, $r, $24r, _r$5, c, $s};return $f; - }; - messageConverter.prototype.isNonPointer = function() { return this.$val.isNonPointer(); }; - fieldCoder = function(fd, ft) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _1, _2, _3, _4, _5, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$100, _r$101, _r$102, _r$103, _r$104, _r$105, _r$106, _r$107, _r$108, _r$109, _r$11, _r$110, _r$111, _r$112, _r$113, _r$114, _r$115, _r$116, _r$117, _r$118, _r$119, _r$12, _r$120, _r$121, _r$122, _r$123, _r$124, _r$125, _r$126, _r$127, _r$128, _r$129, _r$13, _r$130, _r$131, _r$132, _r$133, _r$134, _r$135, _r$136, _r$137, _r$138, _r$139, _r$14, _r$140, _r$141, _r$142, _r$143, _r$144, _r$145, _r$146, _r$147, _r$148, _r$149, _r$15, _r$150, _r$151, _r$152, _r$153, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$54, _r$55, _r$56, _r$57, _r$58, _r$59, _r$6, _r$60, _r$61, _r$62, _r$63, _r$64, _r$65, _r$66, _r$67, _r$68, _r$69, _r$7, _r$70, _r$71, _r$72, _r$73, _r$74, _r$75, _r$76, _r$77, _r$78, _r$79, _r$8, _r$80, _r$81, _r$82, _r$83, _r$84, _r$85, _r$86, _r$87, _r$88, _r$89, _r$9, _r$90, _r$91, _r$92, _r$93, _r$94, _r$95, _r$96, _r$97, _r$98, _r$99, _v, _v$1, _v$10, _v$11, _v$12, _v$13, _v$14, _v$15, _v$16, _v$17, _v$18, _v$2, _v$3, _v$4, _v$5, _v$6, _v$7, _v$8, _v$9, fd, ft, ft$1, ft$2, ft$3, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.IsMap(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 2; continue; } - _r$6 = fd.Cardinality(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - if (!(_r$6 === 3)) { _v = false; $s = 12; continue s; } - _r$7 = fd.IsPacked(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !_r$7; case 12: - /* */ if (_v) { $s = 3; continue; } - _r$8 = fd.Cardinality(); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - if (!(_r$8 === 3)) { _v$1 = false; $s = 15; continue s; } - _r$9 = fd.IsPacked(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9; case 15: - /* */ if (_v$1) { $s = 4; continue; } - _r$10 = fd.Kind(); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if ((_r$10 === 11)) { $s = 5; continue; } - _r$11 = fd.Kind(); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if ((_r$11 === 10)) { $s = 6; continue; } - _r$12 = fd.Syntax(); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - if (!(_r$12 === 3)) { _v$2 = false; $s = 20; continue s; } - _r$13 = fd.ContainingOneof(); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _v$2 = $interfaceIsEqual(_r$13, $ifaceNil); case 20: - /* */ if (_v$2) { $s = 7; continue; } - _r$14 = ft.Kind(); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if ((_r$14 === 22)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_r$5) { */ case 2: - _r$15 = encoderFuncsForMap(fd, ft); /* */ $s = 24; case 24: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r = _r$15; - $s = 25; case 25: return $24r; - /* } else if (_v) { */ case 3: - _r$16 = ft.Kind(); /* */ $s = 28; case 28: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!((_r$16 === 23))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!((_r$16 === 23))) { */ case 26: - /* break; */ $s = 1; continue; - /* } */ case 27: - _r$17 = ft.Elem(); /* */ $s = 29; case 29: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - ft$1 = _r$17; - _r$18 = fd.Kind(); /* */ $s = 31; case 31: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _1 = _r$18; - /* */ if (_1 === (8)) { $s = 32; continue; } - /* */ if (_1 === (14)) { $s = 33; continue; } - /* */ if (_1 === (5)) { $s = 34; continue; } - /* */ if (_1 === (17)) { $s = 35; continue; } - /* */ if (_1 === (13)) { $s = 36; continue; } - /* */ if (_1 === (3)) { $s = 37; continue; } - /* */ if (_1 === (18)) { $s = 38; continue; } - /* */ if (_1 === (4)) { $s = 39; continue; } - /* */ if (_1 === (15)) { $s = 40; continue; } - /* */ if (_1 === (7)) { $s = 41; continue; } - /* */ if (_1 === (2)) { $s = 42; continue; } - /* */ if (_1 === (16)) { $s = 43; continue; } - /* */ if (_1 === (6)) { $s = 44; continue; } - /* */ if (_1 === (1)) { $s = 45; continue; } - /* */ if (_1 === (9)) { $s = 46; continue; } - /* */ if (_1 === (12)) { $s = 47; continue; } - /* */ if (_1 === (11)) { $s = 48; continue; } - /* */ if (_1 === (10)) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (_1 === (8)) { */ case 32: - _r$19 = ft$1.Kind(); /* */ $s = 53; case 53: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - /* */ if (_r$19 === 1) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (_r$19 === 1) { */ case 51: - $s = -1; return [ptrType$5.nil, coderBoolSlice]; - /* } */ case 52: - $s = 50; continue; - /* } else if (_1 === (14)) { */ case 33: - _r$20 = ft$1.Kind(); /* */ $s = 56; case 56: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - /* */ if (_r$20 === 5) { $s = 54; continue; } - /* */ $s = 55; continue; - /* if (_r$20 === 5) { */ case 54: - $s = -1; return [ptrType$5.nil, coderEnumSlice]; - /* } */ case 55: - $s = 50; continue; - /* } else if (_1 === (5)) { */ case 34: - _r$21 = ft$1.Kind(); /* */ $s = 59; case 59: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - /* */ if (_r$21 === 5) { $s = 57; continue; } - /* */ $s = 58; continue; - /* if (_r$21 === 5) { */ case 57: - $s = -1; return [ptrType$5.nil, coderInt32Slice]; - /* } */ case 58: - $s = 50; continue; - /* } else if (_1 === (17)) { */ case 35: - _r$22 = ft$1.Kind(); /* */ $s = 62; case 62: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - /* */ if (_r$22 === 5) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (_r$22 === 5) { */ case 60: - $s = -1; return [ptrType$5.nil, coderSint32Slice]; - /* } */ case 61: - $s = 50; continue; - /* } else if (_1 === (13)) { */ case 36: - _r$23 = ft$1.Kind(); /* */ $s = 65; case 65: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - /* */ if (_r$23 === 10) { $s = 63; continue; } - /* */ $s = 64; continue; - /* if (_r$23 === 10) { */ case 63: - $s = -1; return [ptrType$5.nil, coderUint32Slice]; - /* } */ case 64: - $s = 50; continue; - /* } else if (_1 === (3)) { */ case 37: - _r$24 = ft$1.Kind(); /* */ $s = 68; case 68: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - /* */ if (_r$24 === 6) { $s = 66; continue; } - /* */ $s = 67; continue; - /* if (_r$24 === 6) { */ case 66: - $s = -1; return [ptrType$5.nil, coderInt64Slice]; - /* } */ case 67: - $s = 50; continue; - /* } else if (_1 === (18)) { */ case 38: - _r$25 = ft$1.Kind(); /* */ $s = 71; case 71: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - /* */ if (_r$25 === 6) { $s = 69; continue; } - /* */ $s = 70; continue; - /* if (_r$25 === 6) { */ case 69: - $s = -1; return [ptrType$5.nil, coderSint64Slice]; - /* } */ case 70: - $s = 50; continue; - /* } else if (_1 === (4)) { */ case 39: - _r$26 = ft$1.Kind(); /* */ $s = 74; case 74: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - /* */ if (_r$26 === 11) { $s = 72; continue; } - /* */ $s = 73; continue; - /* if (_r$26 === 11) { */ case 72: - $s = -1; return [ptrType$5.nil, coderUint64Slice]; - /* } */ case 73: - $s = 50; continue; - /* } else if (_1 === (15)) { */ case 40: - _r$27 = ft$1.Kind(); /* */ $s = 77; case 77: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* */ if (_r$27 === 5) { $s = 75; continue; } - /* */ $s = 76; continue; - /* if (_r$27 === 5) { */ case 75: - $s = -1; return [ptrType$5.nil, coderSfixed32Slice]; - /* } */ case 76: - $s = 50; continue; - /* } else if (_1 === (7)) { */ case 41: - _r$28 = ft$1.Kind(); /* */ $s = 80; case 80: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - /* */ if (_r$28 === 10) { $s = 78; continue; } - /* */ $s = 79; continue; - /* if (_r$28 === 10) { */ case 78: - $s = -1; return [ptrType$5.nil, coderFixed32Slice]; - /* } */ case 79: - $s = 50; continue; - /* } else if (_1 === (2)) { */ case 42: - _r$29 = ft$1.Kind(); /* */ $s = 83; case 83: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - /* */ if (_r$29 === 13) { $s = 81; continue; } - /* */ $s = 82; continue; - /* if (_r$29 === 13) { */ case 81: - $s = -1; return [ptrType$5.nil, coderFloatSlice]; - /* } */ case 82: - $s = 50; continue; - /* } else if (_1 === (16)) { */ case 43: - _r$30 = ft$1.Kind(); /* */ $s = 86; case 86: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - /* */ if (_r$30 === 6) { $s = 84; continue; } - /* */ $s = 85; continue; - /* if (_r$30 === 6) { */ case 84: - $s = -1; return [ptrType$5.nil, coderSfixed64Slice]; - /* } */ case 85: - $s = 50; continue; - /* } else if (_1 === (6)) { */ case 44: - _r$31 = ft$1.Kind(); /* */ $s = 89; case 89: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - /* */ if (_r$31 === 11) { $s = 87; continue; } - /* */ $s = 88; continue; - /* if (_r$31 === 11) { */ case 87: - $s = -1; return [ptrType$5.nil, coderFixed64Slice]; - /* } */ case 88: - $s = 50; continue; - /* } else if (_1 === (1)) { */ case 45: - _r$32 = ft$1.Kind(); /* */ $s = 92; case 92: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - /* */ if (_r$32 === 14) { $s = 90; continue; } - /* */ $s = 91; continue; - /* if (_r$32 === 14) { */ case 90: - $s = -1; return [ptrType$5.nil, coderDoubleSlice]; - /* } */ case 91: - $s = 50; continue; - /* } else if (_1 === (9)) { */ case 46: - _r$33 = ft$1.Kind(); /* */ $s = 96; case 96: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - if (!(_r$33 === 24)) { _v$3 = false; $s = 95; continue s; } - _r$34 = strs.EnforceUTF8(fd); /* */ $s = 97; case 97: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _v$3 = _r$34; case 95: - /* */ if (_v$3) { $s = 93; continue; } - /* */ $s = 94; continue; - /* if (_v$3) { */ case 93: - $s = -1; return [ptrType$5.nil, coderStringSliceValidateUTF8]; - /* } */ case 94: - _r$35 = ft$1.Kind(); /* */ $s = 100; case 100: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - /* */ if (_r$35 === 24) { $s = 98; continue; } - /* */ $s = 99; continue; - /* if (_r$35 === 24) { */ case 98: - $s = -1; return [ptrType$5.nil, coderStringSlice]; - /* } */ case 99: - _r$36 = ft$1.Kind(); /* */ $s = 105; case 105: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - if (!(_r$36 === 23)) { _v$5 = false; $s = 104; continue s; } - _r$37 = ft$1.Elem(); /* */ $s = 106; case 106: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _r$38 = _r$37.Kind(); /* */ $s = 107; case 107: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _v$5 = _r$38 === 8; case 104: - if (!(_v$5)) { _v$4 = false; $s = 103; continue s; } - _r$39 = strs.EnforceUTF8(fd); /* */ $s = 108; case 108: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _v$4 = _r$39; case 103: - /* */ if (_v$4) { $s = 101; continue; } - /* */ $s = 102; continue; - /* if (_v$4) { */ case 101: - $s = -1; return [ptrType$5.nil, coderBytesSliceValidateUTF8]; - /* } */ case 102: - _r$40 = ft$1.Kind(); /* */ $s = 112; case 112: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - if (!(_r$40 === 23)) { _v$6 = false; $s = 111; continue s; } - _r$41 = ft$1.Elem(); /* */ $s = 113; case 113: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - _r$42 = _r$41.Kind(); /* */ $s = 114; case 114: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - _v$6 = _r$42 === 8; case 111: - /* */ if (_v$6) { $s = 109; continue; } - /* */ $s = 110; continue; - /* if (_v$6) { */ case 109: - $s = -1; return [ptrType$5.nil, coderBytesSlice]; - /* } */ case 110: - $s = 50; continue; - /* } else if (_1 === (12)) { */ case 47: - _r$43 = ft$1.Kind(); /* */ $s = 117; case 117: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - /* */ if (_r$43 === 24) { $s = 115; continue; } - /* */ $s = 116; continue; - /* if (_r$43 === 24) { */ case 115: - $s = -1; return [ptrType$5.nil, coderStringSlice]; - /* } */ case 116: - _r$44 = ft$1.Kind(); /* */ $s = 121; case 121: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - if (!(_r$44 === 23)) { _v$7 = false; $s = 120; continue s; } - _r$45 = ft$1.Elem(); /* */ $s = 122; case 122: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - _r$46 = _r$45.Kind(); /* */ $s = 123; case 123: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } - _v$7 = _r$46 === 8; case 120: - /* */ if (_v$7) { $s = 118; continue; } - /* */ $s = 119; continue; - /* if (_v$7) { */ case 118: - $s = -1; return [ptrType$5.nil, coderBytesSlice]; - /* } */ case 119: - $s = 50; continue; - /* } else if (_1 === (11)) { */ case 48: - _r$47 = getMessageInfo(ft$1); /* */ $s = 124; case 124: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } - _r$48 = makeMessageSliceFieldCoder(fd, ft$1); /* */ $s = 125; case 125: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } - $24r$1 = [_r$47, _r$48]; - $s = 126; case 126: return $24r$1; - /* } else if (_1 === (10)) { */ case 49: - _r$49 = getMessageInfo(ft$1); /* */ $s = 127; case 127: if($c) { $c = false; _r$49 = _r$49.$blk(); } if (_r$49 && _r$49.$blk !== undefined) { break s; } - _r$50 = makeGroupSliceFieldCoder(fd, ft$1); /* */ $s = 128; case 128: if($c) { $c = false; _r$50 = _r$50.$blk(); } if (_r$50 && _r$50.$blk !== undefined) { break s; } - $24r$2 = [_r$49, _r$50]; - $s = 129; case 129: return $24r$2; - /* } */ case 50: - case 30: - $s = 10; continue; - /* } else if (_v$1) { */ case 4: - _r$51 = ft.Kind(); /* */ $s = 132; case 132: if($c) { $c = false; _r$51 = _r$51.$blk(); } if (_r$51 && _r$51.$blk !== undefined) { break s; } - /* */ if (!((_r$51 === 23))) { $s = 130; continue; } - /* */ $s = 131; continue; - /* if (!((_r$51 === 23))) { */ case 130: - /* break; */ $s = 1; continue; - /* } */ case 131: - _r$52 = ft.Elem(); /* */ $s = 133; case 133: if($c) { $c = false; _r$52 = _r$52.$blk(); } if (_r$52 && _r$52.$blk !== undefined) { break s; } - ft$2 = _r$52; - _r$53 = fd.Kind(); /* */ $s = 135; case 135: if($c) { $c = false; _r$53 = _r$53.$blk(); } if (_r$53 && _r$53.$blk !== undefined) { break s; } - _2 = _r$53; - /* */ if (_2 === (8)) { $s = 136; continue; } - /* */ if (_2 === (14)) { $s = 137; continue; } - /* */ if (_2 === (5)) { $s = 138; continue; } - /* */ if (_2 === (17)) { $s = 139; continue; } - /* */ if (_2 === (13)) { $s = 140; continue; } - /* */ if (_2 === (3)) { $s = 141; continue; } - /* */ if (_2 === (18)) { $s = 142; continue; } - /* */ if (_2 === (4)) { $s = 143; continue; } - /* */ if (_2 === (15)) { $s = 144; continue; } - /* */ if (_2 === (7)) { $s = 145; continue; } - /* */ if (_2 === (2)) { $s = 146; continue; } - /* */ if (_2 === (16)) { $s = 147; continue; } - /* */ if (_2 === (6)) { $s = 148; continue; } - /* */ if (_2 === (1)) { $s = 149; continue; } - /* */ $s = 150; continue; - /* if (_2 === (8)) { */ case 136: - _r$54 = ft$2.Kind(); /* */ $s = 153; case 153: if($c) { $c = false; _r$54 = _r$54.$blk(); } if (_r$54 && _r$54.$blk !== undefined) { break s; } - /* */ if (_r$54 === 1) { $s = 151; continue; } - /* */ $s = 152; continue; - /* if (_r$54 === 1) { */ case 151: - $s = -1; return [ptrType$5.nil, coderBoolPackedSlice]; - /* } */ case 152: - $s = 150; continue; - /* } else if (_2 === (14)) { */ case 137: - _r$55 = ft$2.Kind(); /* */ $s = 156; case 156: if($c) { $c = false; _r$55 = _r$55.$blk(); } if (_r$55 && _r$55.$blk !== undefined) { break s; } - /* */ if (_r$55 === 5) { $s = 154; continue; } - /* */ $s = 155; continue; - /* if (_r$55 === 5) { */ case 154: - $s = -1; return [ptrType$5.nil, coderEnumPackedSlice]; - /* } */ case 155: - $s = 150; continue; - /* } else if (_2 === (5)) { */ case 138: - _r$56 = ft$2.Kind(); /* */ $s = 159; case 159: if($c) { $c = false; _r$56 = _r$56.$blk(); } if (_r$56 && _r$56.$blk !== undefined) { break s; } - /* */ if (_r$56 === 5) { $s = 157; continue; } - /* */ $s = 158; continue; - /* if (_r$56 === 5) { */ case 157: - $s = -1; return [ptrType$5.nil, coderInt32PackedSlice]; - /* } */ case 158: - $s = 150; continue; - /* } else if (_2 === (17)) { */ case 139: - _r$57 = ft$2.Kind(); /* */ $s = 162; case 162: if($c) { $c = false; _r$57 = _r$57.$blk(); } if (_r$57 && _r$57.$blk !== undefined) { break s; } - /* */ if (_r$57 === 5) { $s = 160; continue; } - /* */ $s = 161; continue; - /* if (_r$57 === 5) { */ case 160: - $s = -1; return [ptrType$5.nil, coderSint32PackedSlice]; - /* } */ case 161: - $s = 150; continue; - /* } else if (_2 === (13)) { */ case 140: - _r$58 = ft$2.Kind(); /* */ $s = 165; case 165: if($c) { $c = false; _r$58 = _r$58.$blk(); } if (_r$58 && _r$58.$blk !== undefined) { break s; } - /* */ if (_r$58 === 10) { $s = 163; continue; } - /* */ $s = 164; continue; - /* if (_r$58 === 10) { */ case 163: - $s = -1; return [ptrType$5.nil, coderUint32PackedSlice]; - /* } */ case 164: - $s = 150; continue; - /* } else if (_2 === (3)) { */ case 141: - _r$59 = ft$2.Kind(); /* */ $s = 168; case 168: if($c) { $c = false; _r$59 = _r$59.$blk(); } if (_r$59 && _r$59.$blk !== undefined) { break s; } - /* */ if (_r$59 === 6) { $s = 166; continue; } - /* */ $s = 167; continue; - /* if (_r$59 === 6) { */ case 166: - $s = -1; return [ptrType$5.nil, coderInt64PackedSlice]; - /* } */ case 167: - $s = 150; continue; - /* } else if (_2 === (18)) { */ case 142: - _r$60 = ft$2.Kind(); /* */ $s = 171; case 171: if($c) { $c = false; _r$60 = _r$60.$blk(); } if (_r$60 && _r$60.$blk !== undefined) { break s; } - /* */ if (_r$60 === 6) { $s = 169; continue; } - /* */ $s = 170; continue; - /* if (_r$60 === 6) { */ case 169: - $s = -1; return [ptrType$5.nil, coderSint64PackedSlice]; - /* } */ case 170: - $s = 150; continue; - /* } else if (_2 === (4)) { */ case 143: - _r$61 = ft$2.Kind(); /* */ $s = 174; case 174: if($c) { $c = false; _r$61 = _r$61.$blk(); } if (_r$61 && _r$61.$blk !== undefined) { break s; } - /* */ if (_r$61 === 11) { $s = 172; continue; } - /* */ $s = 173; continue; - /* if (_r$61 === 11) { */ case 172: - $s = -1; return [ptrType$5.nil, coderUint64PackedSlice]; - /* } */ case 173: - $s = 150; continue; - /* } else if (_2 === (15)) { */ case 144: - _r$62 = ft$2.Kind(); /* */ $s = 177; case 177: if($c) { $c = false; _r$62 = _r$62.$blk(); } if (_r$62 && _r$62.$blk !== undefined) { break s; } - /* */ if (_r$62 === 5) { $s = 175; continue; } - /* */ $s = 176; continue; - /* if (_r$62 === 5) { */ case 175: - $s = -1; return [ptrType$5.nil, coderSfixed32PackedSlice]; - /* } */ case 176: - $s = 150; continue; - /* } else if (_2 === (7)) { */ case 145: - _r$63 = ft$2.Kind(); /* */ $s = 180; case 180: if($c) { $c = false; _r$63 = _r$63.$blk(); } if (_r$63 && _r$63.$blk !== undefined) { break s; } - /* */ if (_r$63 === 10) { $s = 178; continue; } - /* */ $s = 179; continue; - /* if (_r$63 === 10) { */ case 178: - $s = -1; return [ptrType$5.nil, coderFixed32PackedSlice]; - /* } */ case 179: - $s = 150; continue; - /* } else if (_2 === (2)) { */ case 146: - _r$64 = ft$2.Kind(); /* */ $s = 183; case 183: if($c) { $c = false; _r$64 = _r$64.$blk(); } if (_r$64 && _r$64.$blk !== undefined) { break s; } - /* */ if (_r$64 === 13) { $s = 181; continue; } - /* */ $s = 182; continue; - /* if (_r$64 === 13) { */ case 181: - $s = -1; return [ptrType$5.nil, coderFloatPackedSlice]; - /* } */ case 182: - $s = 150; continue; - /* } else if (_2 === (16)) { */ case 147: - _r$65 = ft$2.Kind(); /* */ $s = 186; case 186: if($c) { $c = false; _r$65 = _r$65.$blk(); } if (_r$65 && _r$65.$blk !== undefined) { break s; } - /* */ if (_r$65 === 6) { $s = 184; continue; } - /* */ $s = 185; continue; - /* if (_r$65 === 6) { */ case 184: - $s = -1; return [ptrType$5.nil, coderSfixed64PackedSlice]; - /* } */ case 185: - $s = 150; continue; - /* } else if (_2 === (6)) { */ case 148: - _r$66 = ft$2.Kind(); /* */ $s = 189; case 189: if($c) { $c = false; _r$66 = _r$66.$blk(); } if (_r$66 && _r$66.$blk !== undefined) { break s; } - /* */ if (_r$66 === 11) { $s = 187; continue; } - /* */ $s = 188; continue; - /* if (_r$66 === 11) { */ case 187: - $s = -1; return [ptrType$5.nil, coderFixed64PackedSlice]; - /* } */ case 188: - $s = 150; continue; - /* } else if (_2 === (1)) { */ case 149: - _r$67 = ft$2.Kind(); /* */ $s = 192; case 192: if($c) { $c = false; _r$67 = _r$67.$blk(); } if (_r$67 && _r$67.$blk !== undefined) { break s; } - /* */ if (_r$67 === 14) { $s = 190; continue; } - /* */ $s = 191; continue; - /* if (_r$67 === 14) { */ case 190: - $s = -1; return [ptrType$5.nil, coderDoublePackedSlice]; - /* } */ case 191: - /* } */ case 150: - case 134: - $s = 10; continue; - /* } else if ((_r$10 === 11)) { */ case 5: - _r$68 = getMessageInfo(ft); /* */ $s = 193; case 193: if($c) { $c = false; _r$68 = _r$68.$blk(); } if (_r$68 && _r$68.$blk !== undefined) { break s; } - _r$69 = makeMessageFieldCoder(fd, ft); /* */ $s = 194; case 194: if($c) { $c = false; _r$69 = _r$69.$blk(); } if (_r$69 && _r$69.$blk !== undefined) { break s; } - $24r$3 = [_r$68, _r$69]; - $s = 195; case 195: return $24r$3; - /* } else if ((_r$11 === 10)) { */ case 6: - _r$70 = getMessageInfo(ft); /* */ $s = 196; case 196: if($c) { $c = false; _r$70 = _r$70.$blk(); } if (_r$70 && _r$70.$blk !== undefined) { break s; } - _r$71 = makeGroupFieldCoder(fd, ft); /* */ $s = 197; case 197: if($c) { $c = false; _r$71 = _r$71.$blk(); } if (_r$71 && _r$71.$blk !== undefined) { break s; } - $24r$4 = [_r$70, _r$71]; - $s = 198; case 198: return $24r$4; - /* } else if (_v$2) { */ case 7: - _r$72 = fd.Kind(); /* */ $s = 200; case 200: if($c) { $c = false; _r$72 = _r$72.$blk(); } if (_r$72 && _r$72.$blk !== undefined) { break s; } - _3 = _r$72; - /* */ if (_3 === (8)) { $s = 201; continue; } - /* */ if (_3 === (14)) { $s = 202; continue; } - /* */ if (_3 === (5)) { $s = 203; continue; } - /* */ if (_3 === (17)) { $s = 204; continue; } - /* */ if (_3 === (13)) { $s = 205; continue; } - /* */ if (_3 === (3)) { $s = 206; continue; } - /* */ if (_3 === (18)) { $s = 207; continue; } - /* */ if (_3 === (4)) { $s = 208; continue; } - /* */ if (_3 === (15)) { $s = 209; continue; } - /* */ if (_3 === (7)) { $s = 210; continue; } - /* */ if (_3 === (2)) { $s = 211; continue; } - /* */ if (_3 === (16)) { $s = 212; continue; } - /* */ if (_3 === (6)) { $s = 213; continue; } - /* */ if (_3 === (1)) { $s = 214; continue; } - /* */ if (_3 === (9)) { $s = 215; continue; } - /* */ if (_3 === (12)) { $s = 216; continue; } - /* */ $s = 217; continue; - /* if (_3 === (8)) { */ case 201: - _r$73 = ft.Kind(); /* */ $s = 220; case 220: if($c) { $c = false; _r$73 = _r$73.$blk(); } if (_r$73 && _r$73.$blk !== undefined) { break s; } - /* */ if (_r$73 === 1) { $s = 218; continue; } - /* */ $s = 219; continue; - /* if (_r$73 === 1) { */ case 218: - $s = -1; return [ptrType$5.nil, coderBoolNoZero]; - /* } */ case 219: - $s = 217; continue; - /* } else if (_3 === (14)) { */ case 202: - _r$74 = ft.Kind(); /* */ $s = 223; case 223: if($c) { $c = false; _r$74 = _r$74.$blk(); } if (_r$74 && _r$74.$blk !== undefined) { break s; } - /* */ if (_r$74 === 5) { $s = 221; continue; } - /* */ $s = 222; continue; - /* if (_r$74 === 5) { */ case 221: - $s = -1; return [ptrType$5.nil, coderEnumNoZero]; - /* } */ case 222: - $s = 217; continue; - /* } else if (_3 === (5)) { */ case 203: - _r$75 = ft.Kind(); /* */ $s = 226; case 226: if($c) { $c = false; _r$75 = _r$75.$blk(); } if (_r$75 && _r$75.$blk !== undefined) { break s; } - /* */ if (_r$75 === 5) { $s = 224; continue; } - /* */ $s = 225; continue; - /* if (_r$75 === 5) { */ case 224: - $s = -1; return [ptrType$5.nil, coderInt32NoZero]; - /* } */ case 225: - $s = 217; continue; - /* } else if (_3 === (17)) { */ case 204: - _r$76 = ft.Kind(); /* */ $s = 229; case 229: if($c) { $c = false; _r$76 = _r$76.$blk(); } if (_r$76 && _r$76.$blk !== undefined) { break s; } - /* */ if (_r$76 === 5) { $s = 227; continue; } - /* */ $s = 228; continue; - /* if (_r$76 === 5) { */ case 227: - $s = -1; return [ptrType$5.nil, coderSint32NoZero]; - /* } */ case 228: - $s = 217; continue; - /* } else if (_3 === (13)) { */ case 205: - _r$77 = ft.Kind(); /* */ $s = 232; case 232: if($c) { $c = false; _r$77 = _r$77.$blk(); } if (_r$77 && _r$77.$blk !== undefined) { break s; } - /* */ if (_r$77 === 10) { $s = 230; continue; } - /* */ $s = 231; continue; - /* if (_r$77 === 10) { */ case 230: - $s = -1; return [ptrType$5.nil, coderUint32NoZero]; - /* } */ case 231: - $s = 217; continue; - /* } else if (_3 === (3)) { */ case 206: - _r$78 = ft.Kind(); /* */ $s = 235; case 235: if($c) { $c = false; _r$78 = _r$78.$blk(); } if (_r$78 && _r$78.$blk !== undefined) { break s; } - /* */ if (_r$78 === 6) { $s = 233; continue; } - /* */ $s = 234; continue; - /* if (_r$78 === 6) { */ case 233: - $s = -1; return [ptrType$5.nil, coderInt64NoZero]; - /* } */ case 234: - $s = 217; continue; - /* } else if (_3 === (18)) { */ case 207: - _r$79 = ft.Kind(); /* */ $s = 238; case 238: if($c) { $c = false; _r$79 = _r$79.$blk(); } if (_r$79 && _r$79.$blk !== undefined) { break s; } - /* */ if (_r$79 === 6) { $s = 236; continue; } - /* */ $s = 237; continue; - /* if (_r$79 === 6) { */ case 236: - $s = -1; return [ptrType$5.nil, coderSint64NoZero]; - /* } */ case 237: - $s = 217; continue; - /* } else if (_3 === (4)) { */ case 208: - _r$80 = ft.Kind(); /* */ $s = 241; case 241: if($c) { $c = false; _r$80 = _r$80.$blk(); } if (_r$80 && _r$80.$blk !== undefined) { break s; } - /* */ if (_r$80 === 11) { $s = 239; continue; } - /* */ $s = 240; continue; - /* if (_r$80 === 11) { */ case 239: - $s = -1; return [ptrType$5.nil, coderUint64NoZero]; - /* } */ case 240: - $s = 217; continue; - /* } else if (_3 === (15)) { */ case 209: - _r$81 = ft.Kind(); /* */ $s = 244; case 244: if($c) { $c = false; _r$81 = _r$81.$blk(); } if (_r$81 && _r$81.$blk !== undefined) { break s; } - /* */ if (_r$81 === 5) { $s = 242; continue; } - /* */ $s = 243; continue; - /* if (_r$81 === 5) { */ case 242: - $s = -1; return [ptrType$5.nil, coderSfixed32NoZero]; - /* } */ case 243: - $s = 217; continue; - /* } else if (_3 === (7)) { */ case 210: - _r$82 = ft.Kind(); /* */ $s = 247; case 247: if($c) { $c = false; _r$82 = _r$82.$blk(); } if (_r$82 && _r$82.$blk !== undefined) { break s; } - /* */ if (_r$82 === 10) { $s = 245; continue; } - /* */ $s = 246; continue; - /* if (_r$82 === 10) { */ case 245: - $s = -1; return [ptrType$5.nil, coderFixed32NoZero]; - /* } */ case 246: - $s = 217; continue; - /* } else if (_3 === (2)) { */ case 211: - _r$83 = ft.Kind(); /* */ $s = 250; case 250: if($c) { $c = false; _r$83 = _r$83.$blk(); } if (_r$83 && _r$83.$blk !== undefined) { break s; } - /* */ if (_r$83 === 13) { $s = 248; continue; } - /* */ $s = 249; continue; - /* if (_r$83 === 13) { */ case 248: - $s = -1; return [ptrType$5.nil, coderFloatNoZero]; - /* } */ case 249: - $s = 217; continue; - /* } else if (_3 === (16)) { */ case 212: - _r$84 = ft.Kind(); /* */ $s = 253; case 253: if($c) { $c = false; _r$84 = _r$84.$blk(); } if (_r$84 && _r$84.$blk !== undefined) { break s; } - /* */ if (_r$84 === 6) { $s = 251; continue; } - /* */ $s = 252; continue; - /* if (_r$84 === 6) { */ case 251: - $s = -1; return [ptrType$5.nil, coderSfixed64NoZero]; - /* } */ case 252: - $s = 217; continue; - /* } else if (_3 === (6)) { */ case 213: - _r$85 = ft.Kind(); /* */ $s = 256; case 256: if($c) { $c = false; _r$85 = _r$85.$blk(); } if (_r$85 && _r$85.$blk !== undefined) { break s; } - /* */ if (_r$85 === 11) { $s = 254; continue; } - /* */ $s = 255; continue; - /* if (_r$85 === 11) { */ case 254: - $s = -1; return [ptrType$5.nil, coderFixed64NoZero]; - /* } */ case 255: - $s = 217; continue; - /* } else if (_3 === (1)) { */ case 214: - _r$86 = ft.Kind(); /* */ $s = 259; case 259: if($c) { $c = false; _r$86 = _r$86.$blk(); } if (_r$86 && _r$86.$blk !== undefined) { break s; } - /* */ if (_r$86 === 14) { $s = 257; continue; } - /* */ $s = 258; continue; - /* if (_r$86 === 14) { */ case 257: - $s = -1; return [ptrType$5.nil, coderDoubleNoZero]; - /* } */ case 258: - $s = 217; continue; - /* } else if (_3 === (9)) { */ case 215: - _r$87 = ft.Kind(); /* */ $s = 263; case 263: if($c) { $c = false; _r$87 = _r$87.$blk(); } if (_r$87 && _r$87.$blk !== undefined) { break s; } - if (!(_r$87 === 24)) { _v$8 = false; $s = 262; continue s; } - _r$88 = strs.EnforceUTF8(fd); /* */ $s = 264; case 264: if($c) { $c = false; _r$88 = _r$88.$blk(); } if (_r$88 && _r$88.$blk !== undefined) { break s; } - _v$8 = _r$88; case 262: - /* */ if (_v$8) { $s = 260; continue; } - /* */ $s = 261; continue; - /* if (_v$8) { */ case 260: - $s = -1; return [ptrType$5.nil, coderStringNoZeroValidateUTF8]; - /* } */ case 261: - _r$89 = ft.Kind(); /* */ $s = 267; case 267: if($c) { $c = false; _r$89 = _r$89.$blk(); } if (_r$89 && _r$89.$blk !== undefined) { break s; } - /* */ if (_r$89 === 24) { $s = 265; continue; } - /* */ $s = 266; continue; - /* if (_r$89 === 24) { */ case 265: - $s = -1; return [ptrType$5.nil, coderStringNoZero]; - /* } */ case 266: - _r$90 = ft.Kind(); /* */ $s = 272; case 272: if($c) { $c = false; _r$90 = _r$90.$blk(); } if (_r$90 && _r$90.$blk !== undefined) { break s; } - if (!(_r$90 === 23)) { _v$10 = false; $s = 271; continue s; } - _r$91 = ft.Elem(); /* */ $s = 273; case 273: if($c) { $c = false; _r$91 = _r$91.$blk(); } if (_r$91 && _r$91.$blk !== undefined) { break s; } - _r$92 = _r$91.Kind(); /* */ $s = 274; case 274: if($c) { $c = false; _r$92 = _r$92.$blk(); } if (_r$92 && _r$92.$blk !== undefined) { break s; } - _v$10 = _r$92 === 8; case 271: - if (!(_v$10)) { _v$9 = false; $s = 270; continue s; } - _r$93 = strs.EnforceUTF8(fd); /* */ $s = 275; case 275: if($c) { $c = false; _r$93 = _r$93.$blk(); } if (_r$93 && _r$93.$blk !== undefined) { break s; } - _v$9 = _r$93; case 270: - /* */ if (_v$9) { $s = 268; continue; } - /* */ $s = 269; continue; - /* if (_v$9) { */ case 268: - $s = -1; return [ptrType$5.nil, coderBytesNoZeroValidateUTF8]; - /* } */ case 269: - _r$94 = ft.Kind(); /* */ $s = 279; case 279: if($c) { $c = false; _r$94 = _r$94.$blk(); } if (_r$94 && _r$94.$blk !== undefined) { break s; } - if (!(_r$94 === 23)) { _v$11 = false; $s = 278; continue s; } - _r$95 = ft.Elem(); /* */ $s = 280; case 280: if($c) { $c = false; _r$95 = _r$95.$blk(); } if (_r$95 && _r$95.$blk !== undefined) { break s; } - _r$96 = _r$95.Kind(); /* */ $s = 281; case 281: if($c) { $c = false; _r$96 = _r$96.$blk(); } if (_r$96 && _r$96.$blk !== undefined) { break s; } - _v$11 = _r$96 === 8; case 278: - /* */ if (_v$11) { $s = 276; continue; } - /* */ $s = 277; continue; - /* if (_v$11) { */ case 276: - $s = -1; return [ptrType$5.nil, coderBytesNoZero]; - /* } */ case 277: - $s = 217; continue; - /* } else if (_3 === (12)) { */ case 216: - _r$97 = ft.Kind(); /* */ $s = 284; case 284: if($c) { $c = false; _r$97 = _r$97.$blk(); } if (_r$97 && _r$97.$blk !== undefined) { break s; } - /* */ if (_r$97 === 24) { $s = 282; continue; } - /* */ $s = 283; continue; - /* if (_r$97 === 24) { */ case 282: - $s = -1; return [ptrType$5.nil, coderStringNoZero]; - /* } */ case 283: - _r$98 = ft.Kind(); /* */ $s = 288; case 288: if($c) { $c = false; _r$98 = _r$98.$blk(); } if (_r$98 && _r$98.$blk !== undefined) { break s; } - if (!(_r$98 === 23)) { _v$12 = false; $s = 287; continue s; } - _r$99 = ft.Elem(); /* */ $s = 289; case 289: if($c) { $c = false; _r$99 = _r$99.$blk(); } if (_r$99 && _r$99.$blk !== undefined) { break s; } - _r$100 = _r$99.Kind(); /* */ $s = 290; case 290: if($c) { $c = false; _r$100 = _r$100.$blk(); } if (_r$100 && _r$100.$blk !== undefined) { break s; } - _v$12 = _r$100 === 8; case 287: - /* */ if (_v$12) { $s = 285; continue; } - /* */ $s = 286; continue; - /* if (_v$12) { */ case 285: - $s = -1; return [ptrType$5.nil, coderBytesNoZero]; - /* } */ case 286: - /* } */ case 217: - case 199: - $s = 10; continue; - /* } else if ((_r$14 === 22)) { */ case 8: - _r$101 = ft.Elem(); /* */ $s = 291; case 291: if($c) { $c = false; _r$101 = _r$101.$blk(); } if (_r$101 && _r$101.$blk !== undefined) { break s; } - ft$3 = _r$101; - _r$102 = fd.Kind(); /* */ $s = 293; case 293: if($c) { $c = false; _r$102 = _r$102.$blk(); } if (_r$102 && _r$102.$blk !== undefined) { break s; } - _4 = _r$102; - /* */ if (_4 === (8)) { $s = 294; continue; } - /* */ if (_4 === (14)) { $s = 295; continue; } - /* */ if (_4 === (5)) { $s = 296; continue; } - /* */ if (_4 === (17)) { $s = 297; continue; } - /* */ if (_4 === (13)) { $s = 298; continue; } - /* */ if (_4 === (3)) { $s = 299; continue; } - /* */ if (_4 === (18)) { $s = 300; continue; } - /* */ if (_4 === (4)) { $s = 301; continue; } - /* */ if (_4 === (15)) { $s = 302; continue; } - /* */ if (_4 === (7)) { $s = 303; continue; } - /* */ if (_4 === (2)) { $s = 304; continue; } - /* */ if (_4 === (16)) { $s = 305; continue; } - /* */ if (_4 === (6)) { $s = 306; continue; } - /* */ if (_4 === (1)) { $s = 307; continue; } - /* */ if (_4 === (9)) { $s = 308; continue; } - /* */ if (_4 === (12)) { $s = 309; continue; } - /* */ $s = 310; continue; - /* if (_4 === (8)) { */ case 294: - _r$103 = ft$3.Kind(); /* */ $s = 313; case 313: if($c) { $c = false; _r$103 = _r$103.$blk(); } if (_r$103 && _r$103.$blk !== undefined) { break s; } - /* */ if (_r$103 === 1) { $s = 311; continue; } - /* */ $s = 312; continue; - /* if (_r$103 === 1) { */ case 311: - $s = -1; return [ptrType$5.nil, coderBoolPtr]; - /* } */ case 312: - $s = 310; continue; - /* } else if (_4 === (14)) { */ case 295: - _r$104 = ft$3.Kind(); /* */ $s = 316; case 316: if($c) { $c = false; _r$104 = _r$104.$blk(); } if (_r$104 && _r$104.$blk !== undefined) { break s; } - /* */ if (_r$104 === 5) { $s = 314; continue; } - /* */ $s = 315; continue; - /* if (_r$104 === 5) { */ case 314: - $s = -1; return [ptrType$5.nil, coderEnumPtr]; - /* } */ case 315: - $s = 310; continue; - /* } else if (_4 === (5)) { */ case 296: - _r$105 = ft$3.Kind(); /* */ $s = 319; case 319: if($c) { $c = false; _r$105 = _r$105.$blk(); } if (_r$105 && _r$105.$blk !== undefined) { break s; } - /* */ if (_r$105 === 5) { $s = 317; continue; } - /* */ $s = 318; continue; - /* if (_r$105 === 5) { */ case 317: - $s = -1; return [ptrType$5.nil, coderInt32Ptr]; - /* } */ case 318: - $s = 310; continue; - /* } else if (_4 === (17)) { */ case 297: - _r$106 = ft$3.Kind(); /* */ $s = 322; case 322: if($c) { $c = false; _r$106 = _r$106.$blk(); } if (_r$106 && _r$106.$blk !== undefined) { break s; } - /* */ if (_r$106 === 5) { $s = 320; continue; } - /* */ $s = 321; continue; - /* if (_r$106 === 5) { */ case 320: - $s = -1; return [ptrType$5.nil, coderSint32Ptr]; - /* } */ case 321: - $s = 310; continue; - /* } else if (_4 === (13)) { */ case 298: - _r$107 = ft$3.Kind(); /* */ $s = 325; case 325: if($c) { $c = false; _r$107 = _r$107.$blk(); } if (_r$107 && _r$107.$blk !== undefined) { break s; } - /* */ if (_r$107 === 10) { $s = 323; continue; } - /* */ $s = 324; continue; - /* if (_r$107 === 10) { */ case 323: - $s = -1; return [ptrType$5.nil, coderUint32Ptr]; - /* } */ case 324: - $s = 310; continue; - /* } else if (_4 === (3)) { */ case 299: - _r$108 = ft$3.Kind(); /* */ $s = 328; case 328: if($c) { $c = false; _r$108 = _r$108.$blk(); } if (_r$108 && _r$108.$blk !== undefined) { break s; } - /* */ if (_r$108 === 6) { $s = 326; continue; } - /* */ $s = 327; continue; - /* if (_r$108 === 6) { */ case 326: - $s = -1; return [ptrType$5.nil, coderInt64Ptr]; - /* } */ case 327: - $s = 310; continue; - /* } else if (_4 === (18)) { */ case 300: - _r$109 = ft$3.Kind(); /* */ $s = 331; case 331: if($c) { $c = false; _r$109 = _r$109.$blk(); } if (_r$109 && _r$109.$blk !== undefined) { break s; } - /* */ if (_r$109 === 6) { $s = 329; continue; } - /* */ $s = 330; continue; - /* if (_r$109 === 6) { */ case 329: - $s = -1; return [ptrType$5.nil, coderSint64Ptr]; - /* } */ case 330: - $s = 310; continue; - /* } else if (_4 === (4)) { */ case 301: - _r$110 = ft$3.Kind(); /* */ $s = 334; case 334: if($c) { $c = false; _r$110 = _r$110.$blk(); } if (_r$110 && _r$110.$blk !== undefined) { break s; } - /* */ if (_r$110 === 11) { $s = 332; continue; } - /* */ $s = 333; continue; - /* if (_r$110 === 11) { */ case 332: - $s = -1; return [ptrType$5.nil, coderUint64Ptr]; - /* } */ case 333: - $s = 310; continue; - /* } else if (_4 === (15)) { */ case 302: - _r$111 = ft$3.Kind(); /* */ $s = 337; case 337: if($c) { $c = false; _r$111 = _r$111.$blk(); } if (_r$111 && _r$111.$blk !== undefined) { break s; } - /* */ if (_r$111 === 5) { $s = 335; continue; } - /* */ $s = 336; continue; - /* if (_r$111 === 5) { */ case 335: - $s = -1; return [ptrType$5.nil, coderSfixed32Ptr]; - /* } */ case 336: - $s = 310; continue; - /* } else if (_4 === (7)) { */ case 303: - _r$112 = ft$3.Kind(); /* */ $s = 340; case 340: if($c) { $c = false; _r$112 = _r$112.$blk(); } if (_r$112 && _r$112.$blk !== undefined) { break s; } - /* */ if (_r$112 === 10) { $s = 338; continue; } - /* */ $s = 339; continue; - /* if (_r$112 === 10) { */ case 338: - $s = -1; return [ptrType$5.nil, coderFixed32Ptr]; - /* } */ case 339: - $s = 310; continue; - /* } else if (_4 === (2)) { */ case 304: - _r$113 = ft$3.Kind(); /* */ $s = 343; case 343: if($c) { $c = false; _r$113 = _r$113.$blk(); } if (_r$113 && _r$113.$blk !== undefined) { break s; } - /* */ if (_r$113 === 13) { $s = 341; continue; } - /* */ $s = 342; continue; - /* if (_r$113 === 13) { */ case 341: - $s = -1; return [ptrType$5.nil, coderFloatPtr]; - /* } */ case 342: - $s = 310; continue; - /* } else if (_4 === (16)) { */ case 305: - _r$114 = ft$3.Kind(); /* */ $s = 346; case 346: if($c) { $c = false; _r$114 = _r$114.$blk(); } if (_r$114 && _r$114.$blk !== undefined) { break s; } - /* */ if (_r$114 === 6) { $s = 344; continue; } - /* */ $s = 345; continue; - /* if (_r$114 === 6) { */ case 344: - $s = -1; return [ptrType$5.nil, coderSfixed64Ptr]; - /* } */ case 345: - $s = 310; continue; - /* } else if (_4 === (6)) { */ case 306: - _r$115 = ft$3.Kind(); /* */ $s = 349; case 349: if($c) { $c = false; _r$115 = _r$115.$blk(); } if (_r$115 && _r$115.$blk !== undefined) { break s; } - /* */ if (_r$115 === 11) { $s = 347; continue; } - /* */ $s = 348; continue; - /* if (_r$115 === 11) { */ case 347: - $s = -1; return [ptrType$5.nil, coderFixed64Ptr]; - /* } */ case 348: - $s = 310; continue; - /* } else if (_4 === (1)) { */ case 307: - _r$116 = ft$3.Kind(); /* */ $s = 352; case 352: if($c) { $c = false; _r$116 = _r$116.$blk(); } if (_r$116 && _r$116.$blk !== undefined) { break s; } - /* */ if (_r$116 === 14) { $s = 350; continue; } - /* */ $s = 351; continue; - /* if (_r$116 === 14) { */ case 350: - $s = -1; return [ptrType$5.nil, coderDoublePtr]; - /* } */ case 351: - $s = 310; continue; - /* } else if (_4 === (9)) { */ case 308: - _r$117 = ft$3.Kind(); /* */ $s = 356; case 356: if($c) { $c = false; _r$117 = _r$117.$blk(); } if (_r$117 && _r$117.$blk !== undefined) { break s; } - if (!(_r$117 === 24)) { _v$13 = false; $s = 355; continue s; } - _r$118 = strs.EnforceUTF8(fd); /* */ $s = 357; case 357: if($c) { $c = false; _r$118 = _r$118.$blk(); } if (_r$118 && _r$118.$blk !== undefined) { break s; } - _v$13 = _r$118; case 355: - /* */ if (_v$13) { $s = 353; continue; } - /* */ $s = 354; continue; - /* if (_v$13) { */ case 353: - $s = -1; return [ptrType$5.nil, coderStringPtrValidateUTF8]; - /* } */ case 354: - _r$119 = ft$3.Kind(); /* */ $s = 360; case 360: if($c) { $c = false; _r$119 = _r$119.$blk(); } if (_r$119 && _r$119.$blk !== undefined) { break s; } - /* */ if (_r$119 === 24) { $s = 358; continue; } - /* */ $s = 359; continue; - /* if (_r$119 === 24) { */ case 358: - $s = -1; return [ptrType$5.nil, coderStringPtr]; - /* } */ case 359: - $s = 310; continue; - /* } else if (_4 === (12)) { */ case 309: - _r$120 = ft$3.Kind(); /* */ $s = 363; case 363: if($c) { $c = false; _r$120 = _r$120.$blk(); } if (_r$120 && _r$120.$blk !== undefined) { break s; } - /* */ if (_r$120 === 24) { $s = 361; continue; } - /* */ $s = 362; continue; - /* if (_r$120 === 24) { */ case 361: - $s = -1; return [ptrType$5.nil, coderStringPtr]; - /* } */ case 362: - /* } */ case 310: - case 292: - $s = 10; continue; - /* } else { */ case 9: - _r$121 = fd.Kind(); /* */ $s = 365; case 365: if($c) { $c = false; _r$121 = _r$121.$blk(); } if (_r$121 && _r$121.$blk !== undefined) { break s; } - _5 = _r$121; - /* */ if (_5 === (8)) { $s = 366; continue; } - /* */ if (_5 === (14)) { $s = 367; continue; } - /* */ if (_5 === (5)) { $s = 368; continue; } - /* */ if (_5 === (17)) { $s = 369; continue; } - /* */ if (_5 === (13)) { $s = 370; continue; } - /* */ if (_5 === (3)) { $s = 371; continue; } - /* */ if (_5 === (18)) { $s = 372; continue; } - /* */ if (_5 === (4)) { $s = 373; continue; } - /* */ if (_5 === (15)) { $s = 374; continue; } - /* */ if (_5 === (7)) { $s = 375; continue; } - /* */ if (_5 === (2)) { $s = 376; continue; } - /* */ if (_5 === (16)) { $s = 377; continue; } - /* */ if (_5 === (6)) { $s = 378; continue; } - /* */ if (_5 === (1)) { $s = 379; continue; } - /* */ if (_5 === (9)) { $s = 380; continue; } - /* */ if (_5 === (12)) { $s = 381; continue; } - /* */ $s = 382; continue; - /* if (_5 === (8)) { */ case 366: - _r$122 = ft.Kind(); /* */ $s = 385; case 385: if($c) { $c = false; _r$122 = _r$122.$blk(); } if (_r$122 && _r$122.$blk !== undefined) { break s; } - /* */ if (_r$122 === 1) { $s = 383; continue; } - /* */ $s = 384; continue; - /* if (_r$122 === 1) { */ case 383: - $s = -1; return [ptrType$5.nil, coderBool]; - /* } */ case 384: - $s = 382; continue; - /* } else if (_5 === (14)) { */ case 367: - _r$123 = ft.Kind(); /* */ $s = 388; case 388: if($c) { $c = false; _r$123 = _r$123.$blk(); } if (_r$123 && _r$123.$blk !== undefined) { break s; } - /* */ if (_r$123 === 5) { $s = 386; continue; } - /* */ $s = 387; continue; - /* if (_r$123 === 5) { */ case 386: - $s = -1; return [ptrType$5.nil, coderEnum]; - /* } */ case 387: - $s = 382; continue; - /* } else if (_5 === (5)) { */ case 368: - _r$124 = ft.Kind(); /* */ $s = 391; case 391: if($c) { $c = false; _r$124 = _r$124.$blk(); } if (_r$124 && _r$124.$blk !== undefined) { break s; } - /* */ if (_r$124 === 5) { $s = 389; continue; } - /* */ $s = 390; continue; - /* if (_r$124 === 5) { */ case 389: - $s = -1; return [ptrType$5.nil, coderInt32]; - /* } */ case 390: - $s = 382; continue; - /* } else if (_5 === (17)) { */ case 369: - _r$125 = ft.Kind(); /* */ $s = 394; case 394: if($c) { $c = false; _r$125 = _r$125.$blk(); } if (_r$125 && _r$125.$blk !== undefined) { break s; } - /* */ if (_r$125 === 5) { $s = 392; continue; } - /* */ $s = 393; continue; - /* if (_r$125 === 5) { */ case 392: - $s = -1; return [ptrType$5.nil, coderSint32]; - /* } */ case 393: - $s = 382; continue; - /* } else if (_5 === (13)) { */ case 370: - _r$126 = ft.Kind(); /* */ $s = 397; case 397: if($c) { $c = false; _r$126 = _r$126.$blk(); } if (_r$126 && _r$126.$blk !== undefined) { break s; } - /* */ if (_r$126 === 10) { $s = 395; continue; } - /* */ $s = 396; continue; - /* if (_r$126 === 10) { */ case 395: - $s = -1; return [ptrType$5.nil, coderUint32]; - /* } */ case 396: - $s = 382; continue; - /* } else if (_5 === (3)) { */ case 371: - _r$127 = ft.Kind(); /* */ $s = 400; case 400: if($c) { $c = false; _r$127 = _r$127.$blk(); } if (_r$127 && _r$127.$blk !== undefined) { break s; } - /* */ if (_r$127 === 6) { $s = 398; continue; } - /* */ $s = 399; continue; - /* if (_r$127 === 6) { */ case 398: - $s = -1; return [ptrType$5.nil, coderInt64]; - /* } */ case 399: - $s = 382; continue; - /* } else if (_5 === (18)) { */ case 372: - _r$128 = ft.Kind(); /* */ $s = 403; case 403: if($c) { $c = false; _r$128 = _r$128.$blk(); } if (_r$128 && _r$128.$blk !== undefined) { break s; } - /* */ if (_r$128 === 6) { $s = 401; continue; } - /* */ $s = 402; continue; - /* if (_r$128 === 6) { */ case 401: - $s = -1; return [ptrType$5.nil, coderSint64]; - /* } */ case 402: - $s = 382; continue; - /* } else if (_5 === (4)) { */ case 373: - _r$129 = ft.Kind(); /* */ $s = 406; case 406: if($c) { $c = false; _r$129 = _r$129.$blk(); } if (_r$129 && _r$129.$blk !== undefined) { break s; } - /* */ if (_r$129 === 11) { $s = 404; continue; } - /* */ $s = 405; continue; - /* if (_r$129 === 11) { */ case 404: - $s = -1; return [ptrType$5.nil, coderUint64]; - /* } */ case 405: - $s = 382; continue; - /* } else if (_5 === (15)) { */ case 374: - _r$130 = ft.Kind(); /* */ $s = 409; case 409: if($c) { $c = false; _r$130 = _r$130.$blk(); } if (_r$130 && _r$130.$blk !== undefined) { break s; } - /* */ if (_r$130 === 5) { $s = 407; continue; } - /* */ $s = 408; continue; - /* if (_r$130 === 5) { */ case 407: - $s = -1; return [ptrType$5.nil, coderSfixed32]; - /* } */ case 408: - $s = 382; continue; - /* } else if (_5 === (7)) { */ case 375: - _r$131 = ft.Kind(); /* */ $s = 412; case 412: if($c) { $c = false; _r$131 = _r$131.$blk(); } if (_r$131 && _r$131.$blk !== undefined) { break s; } - /* */ if (_r$131 === 10) { $s = 410; continue; } - /* */ $s = 411; continue; - /* if (_r$131 === 10) { */ case 410: - $s = -1; return [ptrType$5.nil, coderFixed32]; - /* } */ case 411: - $s = 382; continue; - /* } else if (_5 === (2)) { */ case 376: - _r$132 = ft.Kind(); /* */ $s = 415; case 415: if($c) { $c = false; _r$132 = _r$132.$blk(); } if (_r$132 && _r$132.$blk !== undefined) { break s; } - /* */ if (_r$132 === 13) { $s = 413; continue; } - /* */ $s = 414; continue; - /* if (_r$132 === 13) { */ case 413: - $s = -1; return [ptrType$5.nil, coderFloat]; - /* } */ case 414: - $s = 382; continue; - /* } else if (_5 === (16)) { */ case 377: - _r$133 = ft.Kind(); /* */ $s = 418; case 418: if($c) { $c = false; _r$133 = _r$133.$blk(); } if (_r$133 && _r$133.$blk !== undefined) { break s; } - /* */ if (_r$133 === 6) { $s = 416; continue; } - /* */ $s = 417; continue; - /* if (_r$133 === 6) { */ case 416: - $s = -1; return [ptrType$5.nil, coderSfixed64]; - /* } */ case 417: - $s = 382; continue; - /* } else if (_5 === (6)) { */ case 378: - _r$134 = ft.Kind(); /* */ $s = 421; case 421: if($c) { $c = false; _r$134 = _r$134.$blk(); } if (_r$134 && _r$134.$blk !== undefined) { break s; } - /* */ if (_r$134 === 11) { $s = 419; continue; } - /* */ $s = 420; continue; - /* if (_r$134 === 11) { */ case 419: - $s = -1; return [ptrType$5.nil, coderFixed64]; - /* } */ case 420: - $s = 382; continue; - /* } else if (_5 === (1)) { */ case 379: - _r$135 = ft.Kind(); /* */ $s = 424; case 424: if($c) { $c = false; _r$135 = _r$135.$blk(); } if (_r$135 && _r$135.$blk !== undefined) { break s; } - /* */ if (_r$135 === 14) { $s = 422; continue; } - /* */ $s = 423; continue; - /* if (_r$135 === 14) { */ case 422: - $s = -1; return [ptrType$5.nil, coderDouble]; - /* } */ case 423: - $s = 382; continue; - /* } else if (_5 === (9)) { */ case 380: - _r$136 = ft.Kind(); /* */ $s = 428; case 428: if($c) { $c = false; _r$136 = _r$136.$blk(); } if (_r$136 && _r$136.$blk !== undefined) { break s; } - if (!(_r$136 === 24)) { _v$14 = false; $s = 427; continue s; } - _r$137 = strs.EnforceUTF8(fd); /* */ $s = 429; case 429: if($c) { $c = false; _r$137 = _r$137.$blk(); } if (_r$137 && _r$137.$blk !== undefined) { break s; } - _v$14 = _r$137; case 427: - /* */ if (_v$14) { $s = 425; continue; } - /* */ $s = 426; continue; - /* if (_v$14) { */ case 425: - $s = -1; return [ptrType$5.nil, coderStringValidateUTF8]; - /* } */ case 426: - _r$138 = ft.Kind(); /* */ $s = 432; case 432: if($c) { $c = false; _r$138 = _r$138.$blk(); } if (_r$138 && _r$138.$blk !== undefined) { break s; } - /* */ if (_r$138 === 24) { $s = 430; continue; } - /* */ $s = 431; continue; - /* if (_r$138 === 24) { */ case 430: - $s = -1; return [ptrType$5.nil, coderString]; - /* } */ case 431: - _r$139 = ft.Kind(); /* */ $s = 437; case 437: if($c) { $c = false; _r$139 = _r$139.$blk(); } if (_r$139 && _r$139.$blk !== undefined) { break s; } - if (!(_r$139 === 23)) { _v$16 = false; $s = 436; continue s; } - _r$140 = ft.Elem(); /* */ $s = 438; case 438: if($c) { $c = false; _r$140 = _r$140.$blk(); } if (_r$140 && _r$140.$blk !== undefined) { break s; } - _r$141 = _r$140.Kind(); /* */ $s = 439; case 439: if($c) { $c = false; _r$141 = _r$141.$blk(); } if (_r$141 && _r$141.$blk !== undefined) { break s; } - _v$16 = _r$141 === 8; case 436: - if (!(_v$16)) { _v$15 = false; $s = 435; continue s; } - _r$142 = strs.EnforceUTF8(fd); /* */ $s = 440; case 440: if($c) { $c = false; _r$142 = _r$142.$blk(); } if (_r$142 && _r$142.$blk !== undefined) { break s; } - _v$15 = _r$142; case 435: - /* */ if (_v$15) { $s = 433; continue; } - /* */ $s = 434; continue; - /* if (_v$15) { */ case 433: - $s = -1; return [ptrType$5.nil, coderBytesValidateUTF8]; - /* } */ case 434: - _r$143 = ft.Kind(); /* */ $s = 444; case 444: if($c) { $c = false; _r$143 = _r$143.$blk(); } if (_r$143 && _r$143.$blk !== undefined) { break s; } - if (!(_r$143 === 23)) { _v$17 = false; $s = 443; continue s; } - _r$144 = ft.Elem(); /* */ $s = 445; case 445: if($c) { $c = false; _r$144 = _r$144.$blk(); } if (_r$144 && _r$144.$blk !== undefined) { break s; } - _r$145 = _r$144.Kind(); /* */ $s = 446; case 446: if($c) { $c = false; _r$145 = _r$145.$blk(); } if (_r$145 && _r$145.$blk !== undefined) { break s; } - _v$17 = _r$145 === 8; case 443: - /* */ if (_v$17) { $s = 441; continue; } - /* */ $s = 442; continue; - /* if (_v$17) { */ case 441: - $s = -1; return [ptrType$5.nil, coderBytes]; - /* } */ case 442: - $s = 382; continue; - /* } else if (_5 === (12)) { */ case 381: - _r$146 = ft.Kind(); /* */ $s = 449; case 449: if($c) { $c = false; _r$146 = _r$146.$blk(); } if (_r$146 && _r$146.$blk !== undefined) { break s; } - /* */ if (_r$146 === 24) { $s = 447; continue; } - /* */ $s = 448; continue; - /* if (_r$146 === 24) { */ case 447: - $s = -1; return [ptrType$5.nil, coderString]; - /* } */ case 448: - _r$147 = ft.Kind(); /* */ $s = 453; case 453: if($c) { $c = false; _r$147 = _r$147.$blk(); } if (_r$147 && _r$147.$blk !== undefined) { break s; } - if (!(_r$147 === 23)) { _v$18 = false; $s = 452; continue s; } - _r$148 = ft.Elem(); /* */ $s = 454; case 454: if($c) { $c = false; _r$148 = _r$148.$blk(); } if (_r$148 && _r$148.$blk !== undefined) { break s; } - _r$149 = _r$148.Kind(); /* */ $s = 455; case 455: if($c) { $c = false; _r$149 = _r$149.$blk(); } if (_r$149 && _r$149.$blk !== undefined) { break s; } - _v$18 = _r$149 === 8; case 452: - /* */ if (_v$18) { $s = 450; continue; } - /* */ $s = 451; continue; - /* if (_v$18) { */ case 450: - $s = -1; return [ptrType$5.nil, coderBytes]; - /* } */ case 451: - /* } */ case 382: - case 364: - /* } */ case 10: - case 1: - _r$150 = fd.FullName(); /* */ $s = 456; case 456: if($c) { $c = false; _r$150 = _r$150.$blk(); } if (_r$150 && _r$150.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$150); - _r$151 = fd.Cardinality(); /* */ $s = 457; case 457: if($c) { $c = false; _r$151 = _r$151.$blk(); } if (_r$151 && _r$151.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.Cardinality(_r$151); - _r$152 = fd.Kind(); /* */ $s = 458; case 458: if($c) { $c = false; _r$152 = _r$152.$blk(); } if (_r$152 && _r$152.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.Kind(_r$152); - _arg$3 = ft; - _r$153 = fmt.Sprintf("invalid type: no encoder for %v %v %v/%v", new sliceType$1([_arg, _arg$1, _arg$2, _arg$3])); /* */ $s = 459; case 459: if($c) { $c = false; _r$153 = _r$153.$blk(); } if (_r$153 && _r$153.$blk !== undefined) { break s; } - $panic(new $String(_r$153)); - $s = -1; return [ptrType$5.nil, new pointerCoderFuncs.ptr(ptrType$5.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError)]; - /* */ } return; } var $f = {$blk: fieldCoder, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _1, _2, _3, _4, _5, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$100, _r$101, _r$102, _r$103, _r$104, _r$105, _r$106, _r$107, _r$108, _r$109, _r$11, _r$110, _r$111, _r$112, _r$113, _r$114, _r$115, _r$116, _r$117, _r$118, _r$119, _r$12, _r$120, _r$121, _r$122, _r$123, _r$124, _r$125, _r$126, _r$127, _r$128, _r$129, _r$13, _r$130, _r$131, _r$132, _r$133, _r$134, _r$135, _r$136, _r$137, _r$138, _r$139, _r$14, _r$140, _r$141, _r$142, _r$143, _r$144, _r$145, _r$146, _r$147, _r$148, _r$149, _r$15, _r$150, _r$151, _r$152, _r$153, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$54, _r$55, _r$56, _r$57, _r$58, _r$59, _r$6, _r$60, _r$61, _r$62, _r$63, _r$64, _r$65, _r$66, _r$67, _r$68, _r$69, _r$7, _r$70, _r$71, _r$72, _r$73, _r$74, _r$75, _r$76, _r$77, _r$78, _r$79, _r$8, _r$80, _r$81, _r$82, _r$83, _r$84, _r$85, _r$86, _r$87, _r$88, _r$89, _r$9, _r$90, _r$91, _r$92, _r$93, _r$94, _r$95, _r$96, _r$97, _r$98, _r$99, _v, _v$1, _v$10, _v$11, _v$12, _v$13, _v$14, _v$15, _v$16, _v$17, _v$18, _v$2, _v$3, _v$4, _v$5, _v$6, _v$7, _v$8, _v$9, fd, ft, ft$1, ft$2, ft$3, $s};return $f; - }; - encoderFuncsForValue = function(fd) { - var {_1, _2, _3, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, fd, $s, $r, $c} = $restore(this, {fd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.Cardinality(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - if (!(_r$5 === 3)) { _v = false; $s = 6; continue s; } - _r$6 = fd.IsPacked(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v = !_r$6; case 6: - /* */ if (_v) { $s = 2; continue; } - _r$7 = fd.Cardinality(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - if (!(_r$7 === 3)) { _v$1 = false; $s = 9; continue s; } - _r$8 = fd.IsPacked(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v$1 = _r$8; case 9: - /* */ if (_v$1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 2: - _r$9 = fd.Kind(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _1 = _r$9; - if (_1 === (8)) { - $s = -1; return coderBoolSliceValue; - } else if (_1 === (14)) { - $s = -1; return coderEnumSliceValue; - } else if (_1 === (5)) { - $s = -1; return coderInt32SliceValue; - } else if (_1 === (17)) { - $s = -1; return coderSint32SliceValue; - } else if (_1 === (13)) { - $s = -1; return coderUint32SliceValue; - } else if (_1 === (3)) { - $s = -1; return coderInt64SliceValue; - } else if (_1 === (18)) { - $s = -1; return coderSint64SliceValue; - } else if (_1 === (4)) { - $s = -1; return coderUint64SliceValue; - } else if (_1 === (15)) { - $s = -1; return coderSfixed32SliceValue; - } else if (_1 === (7)) { - $s = -1; return coderFixed32SliceValue; - } else if (_1 === (2)) { - $s = -1; return coderFloatSliceValue; - } else if (_1 === (16)) { - $s = -1; return coderSfixed64SliceValue; - } else if (_1 === (6)) { - $s = -1; return coderFixed64SliceValue; - } else if (_1 === (1)) { - $s = -1; return coderDoubleSliceValue; - } else if (_1 === (9)) { - $s = -1; return coderStringSliceValue; - } else if (_1 === (12)) { - $s = -1; return coderBytesSliceValue; - } else if (_1 === (11)) { - $s = -1; return coderMessageSliceValue; - } else if (_1 === (10)) { - $s = -1; return coderGroupSliceValue; - } - case 12: - $s = 5; continue; - /* } else if (_v$1) { */ case 3: - _r$10 = fd.Kind(); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _2 = _r$10; - if (_2 === (8)) { - $s = -1; return coderBoolPackedSliceValue; - } else if (_2 === (14)) { - $s = -1; return coderEnumPackedSliceValue; - } else if (_2 === (5)) { - $s = -1; return coderInt32PackedSliceValue; - } else if (_2 === (17)) { - $s = -1; return coderSint32PackedSliceValue; - } else if (_2 === (13)) { - $s = -1; return coderUint32PackedSliceValue; - } else if (_2 === (3)) { - $s = -1; return coderInt64PackedSliceValue; - } else if (_2 === (18)) { - $s = -1; return coderSint64PackedSliceValue; - } else if (_2 === (4)) { - $s = -1; return coderUint64PackedSliceValue; - } else if (_2 === (15)) { - $s = -1; return coderSfixed32PackedSliceValue; - } else if (_2 === (7)) { - $s = -1; return coderFixed32PackedSliceValue; - } else if (_2 === (2)) { - $s = -1; return coderFloatPackedSliceValue; - } else if (_2 === (16)) { - $s = -1; return coderSfixed64PackedSliceValue; - } else if (_2 === (6)) { - $s = -1; return coderFixed64PackedSliceValue; - } else if (_2 === (1)) { - $s = -1; return coderDoublePackedSliceValue; - } - case 14: - $s = 5; continue; - /* } else { */ case 4: - _r$11 = fd.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _3 = _r$11; - /* */ if (_3 === (8)) { $s = 18; continue; } - /* */ if (_3 === (14)) { $s = 19; continue; } - /* */ if (_3 === (5)) { $s = 20; continue; } - /* */ if (_3 === (17)) { $s = 21; continue; } - /* */ if (_3 === (13)) { $s = 22; continue; } - /* */ if (_3 === (3)) { $s = 23; continue; } - /* */ if (_3 === (18)) { $s = 24; continue; } - /* */ if (_3 === (4)) { $s = 25; continue; } - /* */ if (_3 === (15)) { $s = 26; continue; } - /* */ if (_3 === (7)) { $s = 27; continue; } - /* */ if (_3 === (2)) { $s = 28; continue; } - /* */ if (_3 === (16)) { $s = 29; continue; } - /* */ if (_3 === (6)) { $s = 30; continue; } - /* */ if (_3 === (1)) { $s = 31; continue; } - /* */ if (_3 === (9)) { $s = 32; continue; } - /* */ if (_3 === (12)) { $s = 33; continue; } - /* */ if (_3 === (11)) { $s = 34; continue; } - /* */ if (_3 === (10)) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (_3 === (8)) { */ case 18: - $s = -1; return coderBoolValue; - /* } else if (_3 === (14)) { */ case 19: - $s = -1; return coderEnumValue; - /* } else if (_3 === (5)) { */ case 20: - $s = -1; return coderInt32Value; - /* } else if (_3 === (17)) { */ case 21: - $s = -1; return coderSint32Value; - /* } else if (_3 === (13)) { */ case 22: - $s = -1; return coderUint32Value; - /* } else if (_3 === (3)) { */ case 23: - $s = -1; return coderInt64Value; - /* } else if (_3 === (18)) { */ case 24: - $s = -1; return coderSint64Value; - /* } else if (_3 === (4)) { */ case 25: - $s = -1; return coderUint64Value; - /* } else if (_3 === (15)) { */ case 26: - $s = -1; return coderSfixed32Value; - /* } else if (_3 === (7)) { */ case 27: - $s = -1; return coderFixed32Value; - /* } else if (_3 === (2)) { */ case 28: - $s = -1; return coderFloatValue; - /* } else if (_3 === (16)) { */ case 29: - $s = -1; return coderSfixed64Value; - /* } else if (_3 === (6)) { */ case 30: - $s = -1; return coderFixed64Value; - /* } else if (_3 === (1)) { */ case 31: - $s = -1; return coderDoubleValue; - /* } else if (_3 === (9)) { */ case 32: - _r$12 = strs.EnforceUTF8(fd); /* */ $s = 39; case 39: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (_r$12) { */ case 37: - $s = -1; return coderStringValueValidateUTF8; - /* } */ case 38: - $s = -1; return coderStringValue; - /* } else if (_3 === (12)) { */ case 33: - $s = -1; return coderBytesValue; - /* } else if (_3 === (11)) { */ case 34: - $s = -1; return coderMessageValue; - /* } else if (_3 === (10)) { */ case 35: - $s = -1; return coderGroupValue; - /* } */ case 36: - case 16: - /* } */ case 5: - case 1: - _r$13 = fd.FullName(); /* */ $s = 40; case 40: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$13); - _r$14 = fd.Cardinality(); /* */ $s = 41; case 41: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _arg$1 = new protoreflect.Cardinality(_r$14); - _r$15 = fd.Kind(); /* */ $s = 42; case 42: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.Kind(_r$15); - _r$16 = fmt.Sprintf("invalid field: no encoder for %v %v %v", new sliceType$1([_arg, _arg$1, _arg$2])); /* */ $s = 43; case 43: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $panic(new $String(_r$16)); - $s = -1; return new valueCoderFuncs.ptr($throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - /* */ } return; } var $f = {$blk: encoderFuncsForValue, $c: true, $r, _1, _2, _3, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, fd, $s};return $f; - }; - sizeEnum = function(p, f, param) { - var {_r$5, _r$6, f, p, param, size, v, $s, $r, $c} = $restore(this, {p, f, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Int(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - v = _r$6; - size = f.tagsize + protowire.SizeVarint((new $Uint64(v.$high, v.$low))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeEnum, $c: true, $r, _r$5, _r$6, f, p, param, size, v, $s};return $f; - }; - appendEnum = function(b, p, f, opts) { - var {_r$5, _r$6, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Int(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - v = _r$6; - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendEnum, $c: true, $r, _r$5, _r$6, b, f, opts, p, v, $s};return $f; - }; - consumeEnum = function(b, p, wtyp, f, param) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, out, p, param, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = $clone(_r$5, reflect.Value).SetInt((new $Int64(v.$high, v.$low))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeEnum, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, out, p, param, v, wtyp, $s};return $f; - }; - mergeEnum = function(dst, src, param, param$1) { - var {_r$5, _r$6, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(src.v, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = $clone(_r$5, reflect.Value).Set($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeEnum, $c: true, $r, _r$5, _r$6, dst, param, param$1, src, $s};return $f; - }; - sizeEnumNoZero = function(p, f, opts) { - var {$24r, _r$5, _r$6, _r$7, f, opts, p, size, x, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Int(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if ((x = _r$6, (x.$high === 0 && x.$low === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = _r$6, (x.$high === 0 && x.$low === 0))) { */ case 1: - size = 0; - $s = -1; return size; - /* } */ case 2: - _r$7 = sizeEnum($clone(p, pointer), f, $clone(opts, marshalOptions)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - size = _r$7; - $24r = size; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: sizeEnumNoZero, $c: true, $r, $24r, _r$5, _r$6, _r$7, f, opts, p, size, x, $s};return $f; - }; - appendEnumNoZero = function(b, p, f, opts) { - var {$24r, _r$5, _r$6, _r$7, b, f, opts, p, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Int(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if ((x = _r$6, (x.$high === 0 && x.$low === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = _r$6, (x.$high === 0 && x.$low === 0))) { */ case 1: - $s = -1; return [b, $ifaceNil]; - /* } */ case 2: - _r$7 = appendEnum(b, $clone(p, pointer), f, $clone(opts, marshalOptions)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: appendEnumNoZero, $c: true, $r, $24r, _r$5, _r$6, _r$7, b, f, opts, p, x, $s};return $f; - }; - mergeEnumNoZero = function(dst, src, param, param$1) { - var {_r$5, _r$6, _r$7, _r$8, dst, param, param$1, src, x, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src.v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Int(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!((x = _r$6, (x.$high === 0 && x.$low === 0)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x = _r$6, (x.$high === 0 && x.$low === 0)))) { */ case 1: - _r$7 = $clone(dst.v, reflect.Value).Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(src.v, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = $clone(_r$7, reflect.Value).Set($clone(_r$8, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeEnumNoZero, $c: true, $r, _r$5, _r$6, _r$7, _r$8, dst, param, param$1, src, x, $s};return $f; - }; - sizeEnumPtr = function(p, f, opts) { - var {$24r, _r$5, _r$6, f, opts, p, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = sizeEnum(new pointer.ptr($clone(_r$5, reflect.Value)), f, $clone(opts, marshalOptions)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = _r$6; - $24r = size; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeEnumPtr, $c: true, $r, $24r, _r$5, _r$6, f, opts, p, size, $s};return $f; - }; - appendEnumPtr = function(b, p, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _r$5, _r$6, b, f, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = b; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = new pointer.ptr($clone(_r$5, reflect.Value)); - _arg$2 = f; - _arg$3 = $clone(opts, marshalOptions); - _r$6 = appendEnum(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: appendEnumPtr, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _r$5, _r$6, b, f, opts, p, $s};return $f; - }; - consumeEnumPtr = function(b, p, wtyp, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, f, opts, out, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).IsNil(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$6) { */ case 1: - _r$7 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Type(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = reflect.New(_r$10); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $r = $clone(_r$7, reflect.Value).Set($clone(_r$11, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _arg = b; - _r$12 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$1 = new pointer.ptr($clone(_r$12, reflect.Value)); - _arg$2 = wtyp; - _arg$3 = f; - _arg$4 = $clone(opts, unmarshalOptions); - _r$13 = consumeEnum(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 12; case 12: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple = _r$13; - unmarshalOutput.copy(out, _tuple[0]); - err = _tuple[1]; - $24r = [out, err]; - $s = 13; case 13: return $24r; - /* */ } return; } var $f = {$blk: consumeEnumPtr, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, f, opts, out, p, wtyp, $s};return $f; - }; - mergeEnumPtr = function(dst, src, param, param$1) { - var {_r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, dst, param, param$1, src, v, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src.v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).IsNil(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!_r$6) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$6) { */ case 1: - _r$7 = $clone(dst.v, reflect.Value).Type().Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = reflect.New(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - v = _r$9; - _r$10 = $clone(v, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(src.v, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $r = $clone(_r$10, reflect.Value).Set($clone(_r$12, reflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$13 = $clone(dst.v, reflect.Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $r = $clone(_r$13, reflect.Value).Set($clone(v, reflect.Value)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeEnumPtr, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, dst, param, param$1, src, v, $s};return $f; - }; - sizeEnumSlice = function(p, f, opts) { - var {_r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, f, i, llen, opts, p, s, size, x, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - _tmp = 0; - _tmp$1 = $clone(s, reflect.Value).Len(); - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 2: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 3; continue; } - _r$6 = $clone(s, reflect.Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Int(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = protowire.SizeVarint(((x = _r$7, new $Uint64(x.$high, x.$low)))); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - size = size + ((_r$8 + f.tagsize >> 0)) >> 0; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeEnumSlice, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, f, i, llen, opts, p, s, size, x, $s};return $f; - }; - appendEnumSlice = function(b, p, f, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, b, f, i, llen, opts, p, s, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - _tmp = 0; - _tmp$1 = $clone(s, reflect.Value).Len(); - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 2: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 3; continue; } - b = protowire.AppendVarint(b, f.wiretag); - _arg = b; - _r$6 = $clone(s, reflect.Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Int(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$7, new $Uint64(x.$high, x.$low))); - _r$8 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - b = _r$8; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendEnumSlice, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, b, f, i, llen, opts, p, s, x, $s};return $f; - }; - consumeEnumSlice = function(b, p, wtyp, f, opts) { - var {_r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, rv, rv$1, s, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$6 = $clone(s, reflect.Value).Type().Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.New(_r$6); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - rv = _r$8; - $clone(rv, reflect.Value).SetInt((new $Int64(v.$high, v.$low))); - _r$9 = reflect.Append($clone(s, reflect.Value), new sliceType$13([$clone(rv, reflect.Value)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(s, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - _r$10 = $clone(s, reflect.Value).Type().Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = reflect.New(_r$10); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - rv$1 = _r$12; - $clone(rv$1, reflect.Value).SetInt((new $Int64(v$1.$high, v$1.$low))); - _r$13 = reflect.Append($clone(s, reflect.Value), new sliceType$13([$clone(rv$1, reflect.Value)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $r = $clone(s, reflect.Value).Set($clone(_r$13, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeEnumSlice, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, rv, rv$1, s, v, v$1, wtyp, $s};return $f; - }; - mergeEnumSlice = function(dst, src, param, param$1) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, dst, param, param$1, src, $s, $r, $c} = $restore(this, {dst, src, param, param$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(dst.v, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = $clone(_r$6, reflect.Value); - _r$7 = $clone(src.v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$7, reflect.Value); - _r$8 = reflect.AppendSlice(_arg, _arg$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $r = $clone(_r$5, reflect.Value).Set($clone(_r$8, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeEnumSlice, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, dst, param, param$1, src, $s};return $f; - }; - sizeEnumPackedSlice = function(p, f, opts) { - var {_r$5, _r$6, _r$7, _r$8, f, i, llen, n, opts, p, s, size, x, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - llen = $clone(s, reflect.Value).Len(); - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 3; continue; } - _r$6 = $clone(s, reflect.Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Int(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = protowire.SizeVarint(((x = _r$7, new $Uint64(x.$high, x.$low)))); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - n = n + (_r$8) >> 0; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeEnumPackedSlice, $c: true, $r, _r$5, _r$6, _r$7, _r$8, f, i, llen, n, opts, p, s, size, x, $s};return $f; - }; - appendEnumPackedSlice = function(b, p, f, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, b, f, i, i$1, llen, n, opts, p, s, x, x$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p.v, reflect.Value).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - llen = $clone(s, reflect.Value).Len(); - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 3; continue; } - _r$6 = $clone(s, reflect.Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Int(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = protowire.SizeVarint(((x = _r$7, new $Uint64(x.$high, x.$low)))); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - n = n + (_r$8) >> 0; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 7: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 8; continue; } - _arg = b; - _r$9 = $clone(s, reflect.Value).Index(i$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Int(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = ((x$1 = _r$10, new $Uint64(x$1.$high, x$1.$low))); - _r$11 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - b = _r$11; - i$1 = i$1 + (1) >> 0; - $s = 7; continue; - case 8: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendEnumPackedSlice, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, b, f, i, i$1, llen, n, opts, p, s, x, x$1, $s};return $f; - }; - sizeMessageSet = function(mi, p, opts) { - var {_entry, _i, _keys, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, ext, mi, num, opts, p, size, u, x, xi, $s, $r, $c} = $restore(this, {mi, p, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - if (true) { - size = 0; - $s = -1; return size; - } - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).Extensions(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ext = _r$6.$get(); - _ref = ext; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 3: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 4; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 3; continue; - } - x = $clone(_entry.v, ExtensionField); - _r$7 = getExtensionFieldInfo($clone(x, ExtensionField).Type()); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - xi = _r$7; - if (xi.funcs.size === $throwNilPointerError) { - _i++; - /* continue; */ $s = 3; continue; - } - _tuple = protowire.DecodeTag(xi.wiretag); - num = _tuple[0]; - size = size + (messageset.SizeField(num)) >> 0; - _r$8 = x.Value(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = xi.funcs.size($clone(_r$8, protoreflect.Value), protowire.SizeTag(3), $clone(opts, marshalOptions)); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + (_r$9) >> 0; - _i++; - $s = 3; continue; - case 4: - _r$10 = mi.getUnknownBytes($clone(p, pointer)); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - u = _r$10; - if (!(u === ptrType$3.nil)) { - size = size + (messageset.SizeUnknown(u.$get())) >> 0; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeMessageSet, $c: true, $r, _entry, _i, _keys, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, ext, mi, num, opts, p, size, u, x, xi, $s};return $f; - }; - marshalMessageSet = function(mi, b, p, opts) { - var {$24r, _1, _entry, _entry$1, _entry$2, _i, _i$1, _i$2, _keys, _keys$1, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, ext, k, k$1, keys, mi, opts, p, u, x, $s, $r, $c} = $restore(this, {mi, b, p, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true) { */ case 1: - _r$5 = errors.New("no support for message_set_wire_format", new sliceType$1([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = [b, _r$5]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$6 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).Extensions(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - ext = _r$7.$get(); - _1 = $keys(ext).length; - /* */ if (_1 === (0)) { $s = 8; continue; } - /* */ if (_1 === (1)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_1 === (0)) { */ case 8: - $s = 11; continue; - /* } else if (_1 === (1)) { */ case 9: - _ref = ext; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 12: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 13; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 12; continue; - } - x = $clone(_entry.v, ExtensionField); - err = $ifaceNil; - _r$8 = marshalMessageSetField(mi, b, $clone(x, ExtensionField), $clone(opts, marshalOptions)); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - _i++; - $s = 12; continue; - case 13: - $s = 11; continue; - /* } else { */ case 10: - keys = $makeSlice(sliceType$14, 0, $keys(ext).length); - _ref$1 = ext; - _i$1 = 0; - _keys$1 = $keys(_ref$1); - while (true) { - if (!(_i$1 < _keys$1.length)) { break; } - _entry$1 = _ref$1[_keys$1[_i$1]]; - if (_entry$1 === undefined) { - _i$1++; - continue; - } - k = _entry$1.k; - keys = $append(keys, ((k >> 0))); - _i$1++; - } - $r = sort.Ints(keys); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref$2 = keys; - _i$2 = 0; - /* while (true) { */ case 16: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 17; continue; } - k$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - err$1 = $ifaceNil; - _r$9 = marshalMessageSetField(mi, b, $clone((_entry$2 = ext[$Int32.keyFor(((k$1 >> 0)))], _entry$2 !== undefined ? _entry$2.v : new ExtensionField.ptr($ifaceNil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), ptrType$40.nil)), ExtensionField), $clone(opts, marshalOptions)); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - b = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [b, err$1]; - } - _i$2++; - $s = 16; continue; - case 17: - /* } */ case 11: - case 7: - _r$10 = mi.getUnknownBytes($clone(p, pointer)); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - u = _r$10; - /* */ if (!(u === ptrType$3.nil)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!(u === ptrType$3.nil)) { */ case 20: - err$2 = $ifaceNil; - _r$11 = messageset.AppendUnknown(b, u.$get()); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$2 = _r$11; - b = _tuple$2[0]; - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [b, err$2]; - } - /* } */ case 21: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: marshalMessageSet, $c: true, $r, $24r, _1, _entry, _entry$1, _entry$2, _i, _i$1, _i$2, _keys, _keys$1, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, b, err, err$1, err$2, ext, k, k$1, keys, mi, opts, p, u, x, $s};return $f; - }; - marshalMessageSetField = function(mi, b, x, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$5, _r$6, _r$7, _tuple, _tuple$1, b, err, mi, num, opts, x, xi, $s, $r, $c} = $restore(this, {mi, b, x, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = getExtensionFieldInfo($clone(x, ExtensionField).Type()); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - xi = _r$5; - _tuple = protowire.DecodeTag(xi.wiretag); - num = _tuple[0]; - b = messageset.AppendFieldStart(b, num); - _arg = b; - _r$6 = x.Value(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$6, protoreflect.Value); - _arg$2 = protowire.EncodeTag(3, 2); - _arg$3 = $clone(opts, marshalOptions); - _r$7 = xi.funcs.marshal(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - b = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - b = messageset.AppendFieldEnd(b); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: marshalMessageSetField, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$5, _r$6, _r$7, _tuple, _tuple$1, b, err, mi, num, opts, x, xi, $s};return $f; - }; - unmarshalMessageSet = function(mi, b, p, opts) { - var {$24r, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$2, _tmp$3, b, ep, err, ext, initialized, mi, opts, out, p, $s, $r, $c} = $restore(this, {mi, b, p, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ext = [ext]; - initialized = [initialized]; - mi = [mi]; - opts = [opts]; - p = [p]; - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - /* */ if (true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true) { */ case 1: - _tmp = $clone(out, unmarshalOutput); - _r$5 = errors.New("no support for message_set_wire_format", new sliceType$1([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$1 = _r$5; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $24r = [out, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$6 = $clone(p[0], pointer).Apply($clone(mi[0].coderMessageInfo.extensionOffset, offset)); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, pointer).Extensions(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - ep = _r$7; - if (ep.$get() === false) { - ep.$set({}); - } - ext[0] = ep.$get(); - initialized[0] = true; - _r$8 = messageset.Unmarshal(b, true, (function(ext, initialized, mi, opts, p) { return function $b(num, v) { - var {_r$8, _r$9, _tuple, err$1, num, o, u, v, $s, $r, $c} = $restore(this, {num, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = mi[0].unmarshalExtension(v, num, 2, ext[0], $clone(opts[0], unmarshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - o = $clone(_tuple[0], unmarshalOutput); - err$1 = _tuple[1]; - /* */ if ($interfaceIsEqual(err$1, errUnknown)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($interfaceIsEqual(err$1, errUnknown)) { */ case 2: - _r$9 = mi[0].mutableUnknownBytes($clone(p[0], pointer)); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - u = _r$9; - u.$set(protowire.AppendTag(u.$get(), num, 2)); - u.$set($appendSlice(u.$get(), v)); - $s = -1; return $ifaceNil; - /* } */ case 3: - if (!o.initialized) { - initialized[0] = false; - } - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$8, _r$9, _tuple, err$1, num, o, u, v, $s};return $f; - }; })(ext, initialized, mi, opts, p)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - out.n = b.$length; - out.initialized = initialized[0]; - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = err; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: unmarshalMessageSet, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$2, _tmp$3, b, ep, err, ext, initialized, mi, opts, out, p, $s};return $f; - }; - MessageInfo.ptr.prototype.makeCoderMethods = function(t, si) { - var {_arg, _arg$1, _arg$2, _arg$3, _entry, _entry$1, _entry$2, _i, _i$1, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tuple, _v, _v$1, cf, cf$1, cf$2, childMessage, fd, fieldOffset, fields, fs, ft, funcs, i, i$1, isOneof, maxDense, mi, od, oneofs, preallocFields, si, t, wiretag, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {t, si}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fields = [fields]; - mi = [mi]; - mi[0] = this; - offset.copy(mi[0].coderMessageInfo.sizecacheOffset, invalidOffset); - offset.copy(mi[0].coderMessageInfo.unknownOffset, invalidOffset); - offset.copy(mi[0].coderMessageInfo.extensionOffset, invalidOffset); - if ($clone(si.sizecacheOffset, offset).IsValid() && $interfaceIsEqual(si.sizecacheType, sizecacheType)) { - offset.copy(mi[0].coderMessageInfo.sizecacheOffset, si.sizecacheOffset); - } - /* */ if ($clone(si.unknownOffset, offset).IsValid() && ($interfaceIsEqual(si.unknownType, unknownFieldsAType) || $interfaceIsEqual(si.unknownType, unknownFieldsBType))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(si.unknownOffset, offset).IsValid() && ($interfaceIsEqual(si.unknownType, unknownFieldsAType) || $interfaceIsEqual(si.unknownType, unknownFieldsBType))) { */ case 1: - offset.copy(mi[0].coderMessageInfo.unknownOffset, si.unknownOffset); - _r$5 = si.unknownType.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mi[0].coderMessageInfo.unknownPtrKind = _r$5 === 22; - /* } */ case 2: - if ($clone(si.extensionOffset, offset).IsValid() && $interfaceIsEqual(si.extensionType, extensionFieldsType)) { - offset.copy(mi[0].coderMessageInfo.extensionOffset, si.extensionOffset); - } - mi[0].coderMessageInfo.coderFields = {}; - _r$6 = mi[0].Desc.Fields(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fields[0] = _r$6; - _r$7 = fields[0].Len(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - preallocFields = $makeSlice(sliceType$30, _r$7); - i = 0; - /* while (true) { */ case 6: - _r$8 = fields[0].Len(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* if (!(i < _r$8)) { break; } */ if(!(i < _r$8)) { $s = 7; continue; } - fd = [fd]; - _r$9 = fields[0].Get(i); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - fd[0] = _r$9; - _r$10 = fd[0].Number(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - fs = $clone((_entry = si.fieldsByNumber[protowire.Number.keyFor(_r$10)], _entry !== undefined ? _entry.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false)), reflect.StructField); - _r$11 = fd[0].ContainingOneof(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - if (!(!($interfaceIsEqual(_r$11, $ifaceNil)))) { _v = false; $s = 11; continue s; } - _r$12 = fd[0].ContainingOneof(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.IsSynthetic(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _v = !_r$13; case 11: - isOneof = _v; - /* */ if (isOneof) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (isOneof) { */ case 15: - _r$14 = fd[0].ContainingOneof(); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = _r$14.Name(); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - reflect.StructField.copy(fs, (_entry$1 = si.oneofsByName[protoreflect.Name.keyFor(_r$15)], _entry$1 !== undefined ? _entry$1.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false))); - /* } */ case 16: - ft = fs.Type; - wiretag = new $Uint64(0, 0); - _r$16 = fd[0].IsPacked(); /* */ $s = 22; case 22: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!_r$16) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!_r$16) { */ case 19: - _r$17 = fd[0].Number(); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg = _r$17; - _r$18 = fd[0].Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$1 = (_entry$2 = wireTypes[protoreflect.Kind.keyFor(_r$18)], _entry$2 !== undefined ? _entry$2.v : 0); - _r$19 = protowire.EncodeTag(_arg, _arg$1); /* */ $s = 25; case 25: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - wiretag = _r$19; - $s = 21; continue; - /* } else { */ case 20: - _r$20 = fd[0].Number(); /* */ $s = 26; case 26: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = protowire.EncodeTag(_r$20, 2); /* */ $s = 27; case 27: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - wiretag = _r$21; - /* } */ case 21: - fieldOffset = new offset.ptr(0, $throwNilPointerError); - funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - childMessage = ptrType$5.nil; - /* */ if ($interfaceIsEqual(ft, $ifaceNil)) { $s = 29; continue; } - /* */ if (isOneof) { $s = 30; continue; } - _r$22 = fd[0].IsWeak(); /* */ $s = 34; case 34: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - /* */ if (_r$22) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if ($interfaceIsEqual(ft, $ifaceNil)) { */ case 29: - pointerCoderFuncs.copy(funcs, new pointerCoderFuncs.ptr(ptrType$5.nil, (function(fd, fields, mi) { return function(p, f, opts) { - var f, opts, p; - return 0; - }; })(fd, fields, mi), (function(fd, fields, mi) { return function(b, p, f, opts) { - var b, f, opts, p; - return [sliceType.nil, $ifaceNil]; - }; })(fd, fields, mi), (function(fd, fields, mi) { return function $b(b, p, wtyp, f, opts) { - var {_r$23, b, f, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$23 = fd[0].FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$23))); - $s = -1; return [new unmarshalOutput.ptr(0, false), $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$23, b, f, opts, p, wtyp, $s};return $f; - }; })(fd, fields, mi), (function(fd, fields, mi) { return function $b(p, f) { - var {_r$23, f, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$23 = fd[0].FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$23))); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$23, f, p, $s};return $f; - }; })(fd, fields, mi), (function(fd, fields, mi) { return function $b(dst, src, f, opts) { - var {_r$23, dst, f, opts, src, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$23 = fd[0].FullName(); /* */ $s = 1; case 1: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $panic(new $String("missing Go struct field for " + (_r$23))); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$23, dst, f, opts, src, $s};return $f; - }; })(fd, fields, mi))); - $s = 33; continue; - /* } else if (isOneof) { */ case 30: - offset.copy(fieldOffset, offsetOf($clone(fs, reflect.StructField), mi[0].Exporter)); - $s = 33; continue; - /* } else if (_r$22) { */ case 31: - offset.copy(fieldOffset, si.weakOffset); - pointerCoderFuncs.copy(funcs, makeWeakMessageFieldCoder(fd[0])); - $s = 33; continue; - /* } else { */ case 32: - offset.copy(fieldOffset, offsetOf($clone(fs, reflect.StructField), mi[0].Exporter)); - _r$23 = fieldCoder(fd[0], ft); /* */ $s = 35; case 35: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _tuple = _r$23; - childMessage = _tuple[0]; - pointerCoderFuncs.copy(funcs, _tuple[1]); - /* } */ case 33: - case 28: - cf = ((i < 0 || i >= preallocFields.$length) ? ($throwRuntimeError("index out of range"), undefined) : preallocFields.$array[preallocFields.$offset + i]); - _r$24 = fd[0].Number(); /* */ $s = 36; case 36: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = newFieldValidationInfo(mi[0], $clone(si, structInfo), fd[0], ft); /* */ $s = 37; case 37: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = fd[0].Cardinality(); /* */ $s = 39; case 39: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - if (_r$26 === 3) { _v$1 = true; $s = 38; continue s; } - _r$27 = fd[0].HasPresence(); /* */ $s = 40; case 40: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _v$1 = _r$27; case 38: - _r$28 = fd[0].Cardinality(); /* */ $s = 41; case 41: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - coderFieldInfo.copy(cf, new coderFieldInfo.ptr($clone(funcs, pointerCoderFuncs), childMessage, ft, $clone(_r$25, validationInfo), _r$24, $clone(fieldOffset, offset), wiretag, protowire.SizeVarint(wiretag), _v$1, _r$28 === 2)); - mi[0].coderMessageInfo.orderedCoderFields = $append(mi[0].coderMessageInfo.orderedCoderFields, cf); - _key = cf.num; (mi[0].coderMessageInfo.coderFields || $throwRuntimeError("assignment to entry in nil map"))[protowire.Number.keyFor(_key)] = { k: _key, v: cf }; - i = i + (1) >> 0; - $s = 6; continue; - case 7: - _tmp = 0; - _r$29 = mi[0].Desc.Oneofs(); /* */ $s = 42; case 42: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _tmp$1 = _r$29; - i$1 = _tmp; - oneofs = _tmp$1; - /* while (true) { */ case 43: - _r$30 = oneofs.Len(); /* */ $s = 45; case 45: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - /* if (!(i$1 < _r$30)) { break; } */ if(!(i$1 < _r$30)) { $s = 44; continue; } - _r$31 = oneofs.Get(i$1); /* */ $s = 46; case 46: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - od = _r$31; - _r$32 = od.IsSynthetic(); /* */ $s = 49; case 49: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - /* */ if (!_r$32) { $s = 47; continue; } - /* */ $s = 48; continue; - /* if (!_r$32) { */ case 47: - $r = mi[0].initOneofFieldCoders(od, $clone(si, structInfo)); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 48: - i$1 = i$1 + (1) >> 0; - $s = 43; continue; - case 44: - _r$33 = messageset.IsMessageSet(mi[0].Desc); /* */ $s = 53; case 53: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - /* */ if (_r$33) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (_r$33) { */ case 51: - /* */ if (!$clone(mi[0].coderMessageInfo.extensionOffset, offset).IsValid()) { $s = 54; continue; } - /* */ $s = 55; continue; - /* if (!$clone(mi[0].coderMessageInfo.extensionOffset, offset).IsValid()) { */ case 54: - _r$34 = mi[0].Desc.FullName(); /* */ $s = 56; case 56: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _arg$2 = new protoreflect.FullName(_r$34); - _r$35 = fmt.Sprintf("%v: MessageSet with no extensions field", new sliceType$1([_arg$2])); /* */ $s = 57; case 57: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - $panic(new $String(_r$35)); - /* } */ case 55: - /* */ if (!$clone(mi[0].coderMessageInfo.unknownOffset, offset).IsValid()) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (!$clone(mi[0].coderMessageInfo.unknownOffset, offset).IsValid()) { */ case 58: - _r$36 = mi[0].Desc.FullName(); /* */ $s = 60; case 60: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _arg$3 = new protoreflect.FullName(_r$36); - _r$37 = fmt.Sprintf("%v: MessageSet with no unknown field", new sliceType$1([_arg$3])); /* */ $s = 61; case 61: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - $panic(new $String(_r$37)); - /* } */ case 59: - mi[0].coderMessageInfo.isMessageSet = true; - /* } */ case 52: - $r = sort.Slice(mi[0].coderMessageInfo.orderedCoderFields, (function(fields, mi) { return function(i$2, j) { - var i$2, j, x, x$1; - return (x = mi[0].coderMessageInfo.orderedCoderFields, ((i$2 < 0 || i$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$2])).num < (x$1 = mi[0].coderMessageInfo.orderedCoderFields, ((j < 0 || j >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + j])).num; - }; })(fields, mi)); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - maxDense = 0; - _ref = mi[0].coderMessageInfo.orderedCoderFields; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cf$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cf$1.num >= 16 && cf$1.num >= ($imul(2, maxDense))) { - break; - } - maxDense = cf$1.num; - _i++; - } - mi[0].coderMessageInfo.denseCoderFields = $makeSlice(sliceType$16, (maxDense + 1 >> 0)); - _ref$1 = mi[0].coderMessageInfo.orderedCoderFields; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - cf$2 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (((cf$2.num >> 0)) >= mi[0].coderMessageInfo.denseCoderFields.$length) { - break; - } - (x = mi[0].coderMessageInfo.denseCoderFields, x$1 = cf$2.num, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = cf$2)); - _i$1++; - } - _r$38 = mi[0].Desc.Oneofs(); /* */ $s = 65; case 65: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _r$39 = _r$38.Len(); /* */ $s = 66; case 66: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - /* */ if (_r$39 > 0) { $s = 63; continue; } - /* */ $s = 64; continue; - /* if (_r$39 > 0) { */ case 63: - $r = sort.Slice(mi[0].coderMessageInfo.orderedCoderFields, (function(fields, mi) { return function $b(i$2, j) { - var {$24r, _r$40, _r$41, _r$42, fi, fj, i$2, j, x$2, x$3, $s, $r, $c} = $restore(this, {i$2, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$40 = fields[0].ByNumber((x$2 = mi[0].coderMessageInfo.orderedCoderFields, ((i$2 < 0 || i$2 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$2])).num); /* */ $s = 1; case 1: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - fi = _r$40; - _r$41 = fields[0].ByNumber((x$3 = mi[0].coderMessageInfo.orderedCoderFields, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j])).num); /* */ $s = 2; case 2: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - fj = _r$41; - _r$42 = order.LegacyFieldOrder(fi, fj); /* */ $s = 3; case 3: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - $24r = _r$42; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$40, _r$41, _r$42, fi, fj, i$2, j, x$2, x$3, $s};return $f; - }; })(fields, mi)); /* */ $s = 67; case 67: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 64: - _r$40 = needsInitCheck(mi[0].Desc); /* */ $s = 68; case 68: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - mi[0].coderMessageInfo.needsInitCheck = _r$40; - if (mi[0].coderMessageInfo.methods.Marshal === $throwNilPointerError && mi[0].coderMessageInfo.methods.Size === $throwNilPointerError) { - mi[0].coderMessageInfo.methods.Flags = (x$2 = mi[0].coderMessageInfo.methods.Flags, x$3 = new $Uint64(0, 1), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0)); - mi[0].coderMessageInfo.methods.Marshal = $methodVal(mi[0], "marshal"); - mi[0].coderMessageInfo.methods.Size = $methodVal(mi[0], "size"); - } - if (mi[0].coderMessageInfo.methods.Unmarshal === $throwNilPointerError) { - mi[0].coderMessageInfo.methods.Flags = (x$4 = mi[0].coderMessageInfo.methods.Flags, x$5 = new $Uint64(0, 2), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0)); - mi[0].coderMessageInfo.methods.Unmarshal = $methodVal(mi[0], "unmarshal"); - } - if (mi[0].coderMessageInfo.methods.CheckInitialized === $throwNilPointerError) { - mi[0].coderMessageInfo.methods.CheckInitialized = $methodVal(mi[0], "checkInitialized"); - } - if (mi[0].coderMessageInfo.methods.Merge === $throwNilPointerError) { - mi[0].coderMessageInfo.methods.Merge = $methodVal(mi[0], "merge"); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.makeCoderMethods, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _entry, _entry$1, _entry$2, _i, _i$1, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tuple, _v, _v$1, cf, cf$1, cf$2, childMessage, fd, fieldOffset, fields, fs, ft, funcs, i, i$1, isOneof, maxDense, mi, od, oneofs, preallocFields, si, t, wiretag, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - MessageInfo.prototype.makeCoderMethods = function(t, si) { return this.$val.makeCoderMethods(t, si); }; - MessageInfo.ptr.prototype.getUnknownBytes = function(p) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, mi, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - /* */ if (mi.coderMessageInfo.unknownPtrKind) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (mi.coderMessageInfo.unknownPtrKind) { */ case 1: - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).BytesPtr(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6.$get(); - $s = 6; case 6: return $24r; - /* } else { */ case 2: - _r$7 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, pointer).Bytes(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 9; case 9: return $24r$1; - /* } */ case 3: - $s = -1; return ptrType$3.nil; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.getUnknownBytes, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, mi, p, $s};return $f; - }; - MessageInfo.prototype.getUnknownBytes = function(p) { return this.$val.getUnknownBytes(p); }; - MessageInfo.ptr.prototype.mutableUnknownBytes = function(p) { - var {$24r, _r$5, _r$6, _r$7, _r$8, bp, mi, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - /* */ if (mi.coderMessageInfo.unknownPtrKind) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (mi.coderMessageInfo.unknownPtrKind) { */ case 1: - _r$5 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).BytesPtr(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - bp = _r$6; - if (bp.$get() === ptrType$3.nil) { - bp.$set($newDataPointer(sliceType.nil, ptrType$3)); - } - $s = -1; return bp.$get(); - /* } else { */ case 2: - _r$7 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.unknownOffset, offset)); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, pointer).Bytes(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 8; case 8: return $24r; - /* } */ case 3: - $s = -1; return ptrType$3.nil; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.mutableUnknownBytes, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, bp, mi, p, $s};return $f; - }; - MessageInfo.prototype.mutableUnknownBytes = function(p) { return this.$val.mutableUnknownBytes(p); }; - mapRange = function(v) { - var v; - return $clone(v, reflect.Value).MapRange(); - }; - encoderFuncsForMap = function(fd, ft) { - var {_1, _arg, _arg$1, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, conv, fd, ft, funcs, keyField, keyFuncs, keyWiretag, mapi, valField, valFuncs, valWiretag, valueMessage, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ft = [ft]; - mapi = [mapi]; - valueMessage = ptrType$5.nil; - funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - _r$5 = fd.MapKey(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - keyField = _r$5; - _r$6 = fd.MapValue(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - valField = _r$6; - _r$7 = keyField.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg = (_entry = wireTypes[protoreflect.Kind.keyFor(_r$7)], _entry !== undefined ? _entry.v : 0); - _r$8 = protowire.EncodeTag(1, _arg); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - keyWiretag = _r$8; - _r$9 = valField.Kind(); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = (_entry$1 = wireTypes[protoreflect.Kind.keyFor(_r$9)], _entry$1 !== undefined ? _entry$1.v : 0); - _r$10 = protowire.EncodeTag(2, _arg$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - valWiretag = _r$10; - _r$11 = encoderFuncsForValue(keyField); /* */ $s = 7; case 7: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - keyFuncs = $clone(_r$11, valueCoderFuncs); - _r$12 = encoderFuncsForValue(valField); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - valFuncs = $clone(_r$12, valueCoderFuncs); - _r$13 = newMapConverter(ft[0], fd); /* */ $s = 9; case 9: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - conv = _r$13; - _r$14 = keyField.Default(); /* */ $s = 10; case 10: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = keyField.Kind(); /* */ $s = 11; case 11: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - mapi[0] = new mapInfo.ptr(ft[0], keyWiretag, valWiretag, $clone(keyFuncs, valueCoderFuncs), $clone(valFuncs, valueCoderFuncs), $clone(_r$14, protoreflect.Value), _r$15, conv); - _r$16 = valField.Kind(); /* */ $s = 14; case 14: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (_r$16 === 11) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_r$16 === 11) { */ case 12: - _r$17 = ft[0].Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = getMessageInfo(_r$17); /* */ $s = 16; case 16: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - valueMessage = _r$18; - /* } */ case 13: - pointerCoderFuncs.copy(funcs, new pointerCoderFuncs.ptr(ptrType$5.nil, (function(ft, mapi) { return function $b(p, f, opts) { - var {$24r, _r$19, _r$20, _r$21, f, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$19 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = sizeMap($clone(_r$20, reflect.Value), mapi[0], f, $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $24r = _r$21; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$19, _r$20, _r$21, f, opts, p, $s};return $f; - }; })(ft, mapi), (function(ft, mapi) { return function $b(b, p, f, opts) { - var {$24r, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$19, _r$20, _r$21, b, f, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg$2 = b; - _r$19 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(_r$19, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$20, reflect.Value); - _arg$4 = mapi[0]; - _arg$5 = f; - _arg$6 = $clone(opts, marshalOptions); - _r$21 = appendMap(_arg$2, _arg$3, _arg$4, _arg$5, _arg$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $24r = _r$21; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$19, _r$20, _r$21, b, f, opts, p, $s};return $f; - }; })(ft, mapi), (function(ft, mapi) { return function $b(b, p, wtyp, f, opts) { - var {$24r, $24r$1, _arg$10, _arg$11, _arg$12, _arg$13, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, b, f, mp, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$19 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - mp = _r$19; - _r$20 = $clone(mp, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).IsNil(); /* */ $s = 5; case 5: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - /* */ if (_r$21) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_r$21) { */ case 2: - _r$22 = $clone(mp, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = reflect.MakeMap(mapi[0].goType); /* */ $s = 7; case 7: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $r = $clone(_r$22, reflect.Value).Set($clone(_r$23, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - /* */ if (f.mi === ptrType$5.nil) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (f.mi === ptrType$5.nil) { */ case 9: - _arg$2 = b; - _r$24 = $clone(mp, reflect.Value).Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$24, reflect.Value); - _arg$4 = wtyp; - _arg$5 = mapi[0]; - _arg$6 = f; - _arg$7 = $clone(opts, unmarshalOptions); - _r$25 = consumeMap(_arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7); /* */ $s = 13; case 13: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - $24r = _r$25; - $s = 14; case 14: return $24r; - /* } else { */ case 10: - _arg$8 = b; - _r$26 = $clone(mp, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _arg$9 = $clone(_r$26, reflect.Value); - _arg$10 = wtyp; - _arg$11 = mapi[0]; - _arg$12 = f; - _arg$13 = $clone(opts, unmarshalOptions); - _r$27 = consumeMapOfMessage(_arg$8, _arg$9, _arg$10, _arg$11, _arg$12, _arg$13); /* */ $s = 16; case 16: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $24r$1 = _r$27; - $s = 17; case 17: return $24r$1; - /* } */ case 11: - $s = -1; return [new unmarshalOutput.ptr(0, false), $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, _arg$10, _arg$11, _arg$12, _arg$13, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, b, f, mp, opts, p, wtyp, $s};return $f; - }; })(ft, mapi), $throwNilPointerError, $throwNilPointerError)); - _r$19 = valField.Kind(); /* */ $s = 18; case 18: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _1 = _r$19; - if (_1 === (11)) { - funcs.merge = mergeMapOfMessage; - } else if (_1 === (12)) { - funcs.merge = mergeMapOfBytes; - } else { - funcs.merge = mergeMap; - } - case 17: - if (!(valFuncs.isInit === $throwNilPointerError)) { - funcs.isInit = (function(ft, mapi) { return function $b(p, f) { - var {$24r, _r$20, _r$21, _r$22, f, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$20 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = isInitMap($clone(_r$21, reflect.Value), mapi[0], f); /* */ $s = 3; case 3: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $24r = _r$22; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$20, _r$21, _r$22, f, p, $s};return $f; - }; })(ft, mapi); - } - _tmp = valueMessage; - _tmp$1 = $clone(funcs, pointerCoderFuncs); - valueMessage = _tmp; - pointerCoderFuncs.copy(funcs, _tmp$1); - $s = -1; return [valueMessage, funcs]; - /* */ } return; } var $f = {$blk: encoderFuncsForMap, $c: true, $r, _1, _arg, _arg$1, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, conv, fd, ft, funcs, keyField, keyFuncs, keyWiretag, mapi, valField, valFuncs, valWiretag, valueMessage, $s};return $f; - }; - sizeMap = function(mapv, mapi, f, opts) { - var {_r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$5, _r$6, _r$7, _r$8, _r$9, f, iter, key, keySize, mapi, mapv, n, opts, p, valSize, value, $s, $r, $c} = $restore(this, {mapv, mapi, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(mapv, reflect.Value).Len() === 0) { - $s = -1; return 0; - } - n = 0; - iter = mapRange($clone(mapv, reflect.Value)); - /* while (true) { */ case 1: - _r$5 = iter.Next(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* if (!(_r$5)) { break; } */ if(!(_r$5)) { $s = 2; continue; } - _r$6 = iter.Key(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = mapi.conv.keyConv.PBValueOf($clone(_r$6, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).MapKey(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - key = $clone(_r$8, protoreflect.MapKey); - _r$9 = mapi.keyFuncs.size($clone($clone(key, protoreflect.MapKey).Value(), protoreflect.Value), 1, $clone(opts, marshalOptions)); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - keySize = _r$9; - valSize = 0; - _r$10 = iter.Value(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = mapi.conv.valConv.PBValueOf($clone(_r$10, reflect.Value)); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - value = $clone(_r$11, protoreflect.Value); - /* */ if (f.mi === ptrType$5.nil) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (f.mi === ptrType$5.nil) { */ case 10: - _r$12 = mapi.valFuncs.size($clone(value, protoreflect.Value), 1, $clone(opts, marshalOptions)); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - valSize = _r$12; - $s = 12; continue; - /* } else { */ case 11: - _r$13 = iter.Value(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = pointerOfValue($clone(_r$13, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - p = $clone(_r$14, pointer); - valSize = valSize + (1) >> 0; - _r$15 = f.mi.sizePointer($clone(p, pointer), $clone(opts, marshalOptions)); /* */ $s = 16; case 16: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = protowire.SizeBytes(_r$15); /* */ $s = 17; case 17: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - valSize = valSize + (_r$16) >> 0; - /* } */ case 12: - n = n + ((f.tagsize + protowire.SizeBytes(keySize + valSize >> 0) >> 0)) >> 0; - $s = 1; continue; - case 2: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeMap, $c: true, $r, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$5, _r$6, _r$7, _r$8, _r$9, f, iter, key, keySize, mapi, mapv, n, opts, p, valSize, value, $s};return $f; - }; - consumeMap = function(b, mapv, wtyp, mapi, f, opts) { - var {_1, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, err$1, f, key, mapi, mapv, n, n$1, num, o, o$1, opts, out, v, v$1, val, wtyp, wtyp$1, $s, $r, $c} = $restore(this, {b, mapv, wtyp, mapi, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - b = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - key = $clone(mapi.keyZero, protoreflect.Value); - _r$5 = mapi.conv.valConv.New(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - val = $clone(_r$5, protoreflect.Value); - /* while (true) { */ case 2: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 3; continue; } - _tuple$1 = protowire.ConsumeTag(b); - num = _tuple$1[0]; - wtyp$1 = _tuple$1[1]; - n$1 = _tuple$1[2]; - if (n$1 < 0) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (num > 536870911) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errDecode; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - b = $subslice(b, n$1); - err$1 = errUnknown; - _1 = num; - /* */ if (_1 === (1)) { $s = 5; continue; } - /* */ if (_1 === (2)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (1)) { */ case 5: - v = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - o = new unmarshalOutput.ptr(0, false); - _r$6 = mapi.keyFuncs.unmarshal(b, $clone(key, protoreflect.Value), num, wtyp$1, $clone(opts, unmarshalOptions)); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - protoreflect.Value.copy(v, _tuple$2[0]); - unmarshalOutput.copy(o, _tuple$2[1]); - err$1 = _tuple$2[2]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - /* break; */ $s = 4; continue; - } - protoreflect.Value.copy(key, v); - n$1 = o.n; - $s = 7; continue; - /* } else if (_1 === (2)) { */ case 6: - v$1 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - o$1 = new unmarshalOutput.ptr(0, false); - _r$7 = mapi.valFuncs.unmarshal(b, $clone(val, protoreflect.Value), num, wtyp$1, $clone(opts, unmarshalOptions)); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - protoreflect.Value.copy(v$1, _tuple$3[0]); - unmarshalOutput.copy(o$1, _tuple$3[1]); - err$1 = _tuple$3[2]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - /* break; */ $s = 4; continue; - } - protoreflect.Value.copy(val, v$1); - n$1 = o$1.n; - /* } */ case 7: - case 4: - if ($interfaceIsEqual(err$1, errUnknown)) { - n$1 = protowire.ConsumeFieldValue(num, wtyp$1, b); - if (n$1 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - } else if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = err$1; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - } - b = $subslice(b, n$1); - $s = 2; continue; - case 3: - _r$8 = mapi.conv.keyConv.GoValueOf($clone(key, protoreflect.Value)); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg = $clone(_r$8, reflect.Value); - _r$9 = mapi.conv.valConv.GoValueOf($clone(val, protoreflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$9, reflect.Value); - $r = $clone(mapv, reflect.Value).SetMapIndex(_arg, _arg$1); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - _tmp$12 = $clone(out, unmarshalOutput); - _tmp$13 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$12); - err = _tmp$13; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeMap, $c: true, $r, _1, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, b, err, err$1, f, key, mapi, mapv, n, n$1, num, o, o$1, opts, out, v, v$1, val, wtyp, wtyp$1, $s};return $f; - }; - consumeMapOfMessage = function(b, mapv, wtyp, mapi, f, opts) { - var {_1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, err, err$1, f, key, mapi, mapv, n, n$1, num, o, o$1, opts, out, v, v$1, val, wtyp, wtyp$1, $s, $r, $c} = $restore(this, {b, mapv, wtyp, mapi, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - b = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - key = $clone(mapi.keyZero, protoreflect.Value); - _r$5 = f.mi.GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - val = _r$6; - /* while (true) { */ case 3: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 4; continue; } - _tuple$1 = protowire.ConsumeTag(b); - num = _tuple$1[0]; - wtyp$1 = _tuple$1[1]; - n$1 = _tuple$1[2]; - if (n$1 < 0) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (num > 536870911) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errDecode; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - b = $subslice(b, n$1); - err$1 = errUnknown; - _1 = num; - /* */ if (_1 === (1)) { $s = 6; continue; } - /* */ if (_1 === (2)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (1)) { */ case 6: - v = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - o = new unmarshalOutput.ptr(0, false); - _r$7 = mapi.keyFuncs.unmarshal(b, $clone(key, protoreflect.Value), num, wtyp$1, $clone(opts, unmarshalOptions)); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - protoreflect.Value.copy(v, _tuple$2[0]); - unmarshalOutput.copy(o, _tuple$2[1]); - err$1 = _tuple$2[2]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - /* break; */ $s = 5; continue; - } - protoreflect.Value.copy(key, v); - n$1 = o.n; - $s = 8; continue; - /* } else if (_1 === (2)) { */ case 7: - if (!((wtyp$1 === 2))) { - /* break; */ $s = 5; continue; - } - v$1 = sliceType.nil; - _tuple$3 = protowire.ConsumeBytes(b); - v$1 = _tuple$3[0]; - n$1 = _tuple$3[1]; - if (n$1 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - o$1 = new unmarshalOutput.ptr(0, false); - _r$8 = f.mi.unmarshalPointer(v$1, $clone(pointerOfValue($clone(val, reflect.Value)), pointer), 0, $clone(opts, unmarshalOptions)); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$4 = _r$8; - unmarshalOutput.copy(o$1, _tuple$4[0]); - err$1 = _tuple$4[1]; - if (o$1.initialized) { - out.initialized = true; - } - /* } */ case 8: - case 5: - if ($interfaceIsEqual(err$1, errUnknown)) { - n$1 = protowire.ConsumeFieldValue(num, wtyp$1, b); - if (n$1 < 0) { - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errDecode; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - } - } else if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$12 = $clone(out, unmarshalOutput); - _tmp$13 = err$1; - unmarshalOutput.copy(out, _tmp$12); - err = _tmp$13; - $s = -1; return [out, err]; - } - b = $subslice(b, n$1); - $s = 3; continue; - case 4: - _r$9 = mapi.conv.keyConv.GoValueOf($clone(key, protoreflect.Value)); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(mapv, reflect.Value).SetMapIndex($clone(_r$9, reflect.Value), $clone(val, reflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - _tmp$14 = $clone(out, unmarshalOutput); - _tmp$15 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$14); - err = _tmp$15; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeMapOfMessage, $c: true, $r, _1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, err, err$1, f, key, mapi, mapv, n, n$1, num, o, o$1, opts, out, v, v$1, val, wtyp, wtyp$1, $s};return $f; - }; - appendMapItem = function(b, keyrv, valrv, mapi, f, opts) { - var {$24r, $24r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, b$1, b$2, err, err$1, f, key, key$1, keyrv, mapi, opts, size, size$1, val, val$1, valSize, valrv, $s, $r, $c} = $restore(this, {b, keyrv, valrv, mapi, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (f.mi === ptrType$5.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.mi === ptrType$5.nil) { */ case 1: - _r$5 = mapi.conv.keyConv.PBValueOf($clone(keyrv, reflect.Value)); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, protoreflect.Value).MapKey(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - key = $clone(_r$6, protoreflect.MapKey); - _r$7 = mapi.conv.valConv.PBValueOf($clone(valrv, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - val = $clone(_r$7, protoreflect.Value); - size = 0; - _r$8 = mapi.keyFuncs.size($clone($clone(key, protoreflect.MapKey).Value(), protoreflect.Value), 1, $clone(opts, marshalOptions)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - size = size + (_r$8) >> 0; - _r$9 = mapi.valFuncs.size($clone(val, protoreflect.Value), 1, $clone(opts, marshalOptions)); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + (_r$9) >> 0; - b = protowire.AppendVarint(b, (new $Uint64(0, size))); - _r$10 = mapi.keyFuncs.marshal(b, $clone($clone(key, protoreflect.MapKey).Value(), protoreflect.Value), mapi.keyWiretag, $clone(opts, marshalOptions)); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = _r$10; - b$1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - _r$11 = mapi.valFuncs.marshal(b$1, $clone(val, protoreflect.Value), mapi.valWiretag, $clone(opts, marshalOptions)); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 11; case 11: return $24r; - /* } else { */ case 2: - _r$12 = mapi.conv.keyConv.PBValueOf($clone(keyrv, reflect.Value)); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, protoreflect.Value).MapKey(); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - key$1 = $clone(_r$13, protoreflect.MapKey); - val$1 = $clone(pointerOfValue($clone(valrv, reflect.Value)), pointer); - _r$14 = f.mi.sizePointer($clone(val$1, pointer), $clone(opts, marshalOptions)); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - valSize = _r$14; - size$1 = 0; - _r$15 = mapi.keyFuncs.size($clone($clone(key$1, protoreflect.MapKey).Value(), protoreflect.Value), 1, $clone(opts, marshalOptions)); /* */ $s = 15; case 15: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - size$1 = size$1 + (_r$15) >> 0; - size$1 = size$1 + ((1 + protowire.SizeBytes(valSize) >> 0)) >> 0; - b = protowire.AppendVarint(b, (new $Uint64(0, size$1))); - _r$16 = mapi.keyFuncs.marshal(b, $clone($clone(key$1, protoreflect.MapKey).Value(), protoreflect.Value), mapi.keyWiretag, $clone(opts, marshalOptions)); /* */ $s = 16; case 16: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$1 = _r$16; - b$2 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [sliceType.nil, err$1]; - } - b$2 = protowire.AppendVarint(b$2, mapi.valWiretag); - b$2 = protowire.AppendVarint(b$2, (new $Uint64(0, valSize))); - _r$17 = f.mi.marshalAppendPointer(b$2, $clone(val$1, pointer), $clone(opts, marshalOptions)); /* */ $s = 17; case 17: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$1 = _r$17; - $s = 18; case 18: return $24r$1; - /* } */ case 3: - $s = -1; return [sliceType.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendMapItem, $c: true, $r, $24r, $24r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, b$1, b$2, err, err$1, f, key, key$1, keyrv, mapi, opts, size, size$1, val, val$1, valSize, valrv, $s};return $f; - }; - appendMap = function(b, mapv, mapi, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, err, f, iter, mapi, mapv, opts, $s, $r, $c} = $restore(this, {b, mapv, mapi, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($clone(mapv, reflect.Value).Len() === 0) { - $s = -1; return [b, $ifaceNil]; - } - /* */ if ($clone(opts, marshalOptions).Deterministic()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(opts, marshalOptions).Deterministic()) { */ case 1: - _r$5 = appendMapDeterministic(b, $clone(mapv, reflect.Value), mapi, f, $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 4; case 4: return $24r; - /* } */ case 2: - iter = mapRange($clone(mapv, reflect.Value)); - /* while (true) { */ case 5: - _r$6 = iter.Next(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* if (!(_r$6)) { break; } */ if(!(_r$6)) { $s = 6; continue; } - err = $ifaceNil; - b = protowire.AppendVarint(b, f.wiretag); - _arg = b; - _r$7 = iter.Key(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$7, reflect.Value); - _r$8 = iter.Value(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$2 = $clone(_r$8, reflect.Value); - _arg$3 = mapi; - _arg$4 = f; - _arg$5 = $clone(opts, marshalOptions); - _r$9 = appendMapItem(_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - $s = 5; continue; - case 6: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendMap, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, err, f, iter, mapi, mapv, opts, $s};return $f; - }; - appendMapDeterministic = function(b, mapv, mapi, f, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _i, _r$5, _r$6, _r$7, _ref, _tuple, b, err, f, key, keys, mapi, mapv, opts, $s, $r, $c} = $restore(this, {b, mapv, mapi, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - keys = [keys]; - _r$5 = $clone(mapv, reflect.Value).MapKeys(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - keys[0] = _r$5; - $r = sort.Slice(keys[0], (function(keys) { return function $b(i, j) { - var {$24r, _1, _r$6, _r$7, i, j, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {i, j}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = $clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).Kind(); - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 3; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 4; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 5; continue; } - /* */ if (_1 === (24)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (1)) { */ case 2: - $s = -1; return !$clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).Bool() && $clone(((j < 0 || j >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + j]), reflect.Value).Bool(); - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 3: - $s = -1; return (x = $clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).Int(), x$1 = $clone(((j < 0 || j >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + j]), reflect.Value).Int(), (x.$high < x$1.$high || (x.$high === x$1.$high && x.$low < x$1.$low))); - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 4: - $s = -1; return (x$2 = $clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).Uint(), x$3 = $clone(((j < 0 || j >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + j]), reflect.Value).Uint(), (x$2.$high < x$3.$high || (x$2.$high === x$3.$high && x$2.$low < x$3.$low))); - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 5: - $s = -1; return $clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).Float() < $clone(((j < 0 || j >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + j]), reflect.Value).Float(); - /* } else if (_1 === (24)) { */ case 6: - _r$6 = $clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).String(); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(((j < 0 || j >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + j]), reflect.Value).String(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$6 < _r$7; - $s = 11; case 11: return $24r; - /* } else { */ case 7: - $panic(new $String("invalid kind: " + new reflect.Kind($clone(((i < 0 || i >= keys[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : keys[0].$array[keys[0].$offset + i]), reflect.Value).Kind()).String())); - /* } */ case 8: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _1, _r$6, _r$7, i, j, x, x$1, x$2, x$3, $s};return $f; - }; })(keys)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = keys[0]; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - key = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - err = $ifaceNil; - b = protowire.AppendVarint(b, f.wiretag); - _arg = b; - _arg$1 = $clone(key, reflect.Value); - _r$6 = $clone(mapv, reflect.Value).MapIndex($clone(key, reflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$2 = $clone(_r$6, reflect.Value); - _arg$3 = mapi; - _arg$4 = f; - _arg$5 = $clone(opts, marshalOptions); - _r$7 = appendMapItem(_arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - _i++; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendMapDeterministic, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _i, _r$5, _r$6, _r$7, _ref, _tuple, b, err, f, key, keys, mapi, mapv, opts, $s};return $f; - }; - isInitMap = function(mapv, mapi, f) { - var {_r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, err, err$1, f, iter, iter$1, mapi, mapv, mi, val, val$1, $s, $r, $c} = $restore(this, {mapv, mapi, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = f.mi; - /* */ if (!(mi === ptrType$5.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(mi === ptrType$5.nil)) { */ case 1: - $r = mi.init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!mi.coderMessageInfo.needsInitCheck) { - $s = -1; return $ifaceNil; - } - iter = mapRange($clone(mapv, reflect.Value)); - /* while (true) { */ case 5: - _r$5 = iter.Next(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* if (!(_r$5)) { break; } */ if(!(_r$5)) { $s = 6; continue; } - _r$6 = iter.Value(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = pointerOfValue($clone(_r$6, reflect.Value)); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - val = $clone(_r$7, pointer); - _r$8 = mi.checkInitializedPointer($clone(val, pointer)); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 5; continue; - case 6: - $s = 3; continue; - /* } else { */ case 2: - iter$1 = mapRange($clone(mapv, reflect.Value)); - /* while (true) { */ case 11: - _r$9 = iter$1.Next(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* if (!(_r$9)) { break; } */ if(!(_r$9)) { $s = 12; continue; } - _r$10 = iter$1.Value(); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = mapi.conv.valConv.PBValueOf($clone(_r$10, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - val$1 = $clone(_r$11, protoreflect.Value); - _r$12 = mapi.valFuncs.isInit($clone(val$1, protoreflect.Value)); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$1 = _r$12; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 11; continue; - case 12: - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: isInitMap, $c: true, $r, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, err, err$1, f, iter, iter$1, mapi, mapv, mi, val, val$1, $s};return $f; - }; - mergeMap = function(dst, src, f, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dstm, f, iter, opts, src, srcm, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).AsValueOf(f.ft); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - dstm = _r$6; - _r$7 = $clone(src, pointer).AsValueOf(f.ft); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - srcm = _r$8; - if ($clone(srcm, reflect.Value).Len() === 0) { - $s = -1; return; - } - /* */ if ($clone(dstm, reflect.Value).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(dstm, reflect.Value).IsNil()) { */ case 5: - _r$9 = reflect.MakeMap(f.ft); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(dstm, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - iter = mapRange($clone(srcm, reflect.Value)); - /* while (true) { */ case 9: - _r$10 = iter.Next(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* if (!(_r$10)) { break; } */ if(!(_r$10)) { $s = 10; continue; } - _r$11 = iter.Key(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg = $clone(_r$11, reflect.Value); - _r$12 = iter.Value(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$12, reflect.Value); - $r = $clone(dstm, reflect.Value).SetMapIndex(_arg, _arg$1); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeMap, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dstm, f, iter, opts, src, srcm, $s};return $f; - }; - mergeMapOfBytes = function(dst, src, f, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dstm, f, iter, opts, src, srcm, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).AsValueOf(f.ft); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - dstm = _r$6; - _r$7 = $clone(src, pointer).AsValueOf(f.ft); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - srcm = _r$8; - if ($clone(srcm, reflect.Value).Len() === 0) { - $s = -1; return; - } - /* */ if ($clone(dstm, reflect.Value).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(dstm, reflect.Value).IsNil()) { */ case 5: - _r$9 = reflect.MakeMap(f.ft); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(dstm, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - iter = mapRange($clone(srcm, reflect.Value)); - /* while (true) { */ case 9: - _r$10 = iter.Next(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* if (!(_r$10)) { break; } */ if(!(_r$10)) { $s = 10; continue; } - _r$11 = iter.Key(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg = $clone(_r$11, reflect.Value); - _arg$1 = new sliceType(emptyBuf); - _r$12 = iter.Value(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $clone(_r$12, reflect.Value).Bytes(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$2 = _r$13; - _r$14 = reflect.ValueOf($appendSlice(_arg$1, _arg$2)); /* */ $s = 15; case 15: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$14, reflect.Value); - $r = $clone(dstm, reflect.Value).SetMapIndex(_arg, _arg$3); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeMapOfBytes, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dstm, f, iter, opts, src, srcm, $s};return $f; - }; - mergeMapOfMessage = function(dst, src, f, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dstm, f, iter, opts, src, srcm, val, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(dst, pointer).AsValueOf(f.ft); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - dstm = _r$6; - _r$7 = $clone(src, pointer).AsValueOf(f.ft); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - srcm = _r$8; - if ($clone(srcm, reflect.Value).Len() === 0) { - $s = -1; return; - } - /* */ if ($clone(dstm, reflect.Value).IsNil()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(dstm, reflect.Value).IsNil()) { */ case 5: - _r$9 = reflect.MakeMap(f.ft); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(dstm, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - iter = mapRange($clone(srcm, reflect.Value)); - /* while (true) { */ case 9: - _r$10 = iter.Next(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* if (!(_r$10)) { break; } */ if(!(_r$10)) { $s = 10; continue; } - _r$11 = f.ft.Elem(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = reflect.New(_r$12); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - val = _r$13; - /* */ if (!(f.mi === ptrType$5.nil)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!(f.mi === ptrType$5.nil)) { */ case 15: - _arg = $clone(pointerOfValue($clone(val, reflect.Value)), pointer); - _r$14 = iter.Value(); /* */ $s = 18; case 18: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = pointerOfValue($clone(_r$14, reflect.Value)); /* */ $s = 19; case 19: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$15, pointer); - _arg$2 = $clone(opts, mergeOptions); - $r = f.mi.mergePointer(_arg, _arg$1, _arg$2); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 17; continue; - /* } else { */ case 16: - _r$16 = asMessage($clone(val, reflect.Value)); /* */ $s = 21; case 21: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg$3 = _r$16; - _r$17 = iter.Value(); /* */ $s = 22; case 22: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = asMessage($clone(_r$17, reflect.Value)); /* */ $s = 23; case 23: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$4 = _r$18; - $r = $clone(opts, mergeOptions).Merge(_arg$3, _arg$4); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - _r$19 = iter.Key(); /* */ $s = 25; case 25: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $r = $clone(dstm, reflect.Value).SetMapIndex($clone(_r$19, reflect.Value), $clone(val, reflect.Value)); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: mergeMapOfMessage, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, dst, dstm, f, iter, opts, src, srcm, val, $s};return $f; - }; - sizeBool = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBool, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendBool = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeBool(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBool, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeBool = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(protowire.DecodeBool(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBool, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s};return $f; - }; - sizeBoolNoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === false) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBoolNoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendBoolNoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === false) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeBool(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolNoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeBoolPtr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).BoolPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBoolPtr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendBoolPtr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).BoolPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeBool(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolPtr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeBoolPtr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).BoolPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$8.nil) { - vp.$set($newDataPointer(false, ptrType$8)); - } - vp.$get().$set(protowire.DecodeBool(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBoolPtr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s};return $f; - }; - sizeBoolSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).BoolSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint(protowire.EncodeBool(v)) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBoolSlice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendBoolSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).BoolSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeBool(v)); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolSlice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeBoolSlice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).BoolSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, protowire.DecodeBool(v)); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), protowire.DecodeBool(v$1))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBoolSlice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeBoolPackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).BoolSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(protowire.EncodeBool(v))) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBoolPackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendBoolPackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).BoolSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(protowire.EncodeBool(v))) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, protowire.EncodeBool(v$1)); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolPackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeBoolValue = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, _r$7, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.EncodeBool(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protowire.SizeVarint(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = tagsize + _r$7 >> 0; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: sizeBoolValue, $c: true, $r, $24r, _r$5, _r$6, _r$7, opts, tagsize, v, $s};return $f; - }; - appendBoolValue = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.EncodeBool(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s};return $f; - }; - consumeBoolValue = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfBool(protowire.DecodeBool(v)), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeBoolSliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeBool(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$10 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBoolSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendBoolSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeBool(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeBoolSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfBool(protowire.DecodeBool(v)), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfBool(protowire.DecodeBool(v$1)), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeBoolSliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeBoolPackedSliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeBool(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + (_r$10) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBoolPackedSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s};return $f; - }; - appendBoolPackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Bool(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeBool(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + (_r$10) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 9: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 10; continue; } - _r$11 = list.Get(i$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v$1 = $clone(_r$11, protoreflect.Value); - _arg = b; - _r$12 = $clone(v$1, protoreflect.Value).Bool(); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = protowire.EncodeBool(_r$12); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$1 = _r$13; - _r$14 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - b = _r$14; - i$1 = i$1 + (1) >> 0; - $s = 9; continue; - case 10: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBoolPackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s};return $f; - }; - sizeEnumValue = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeVarint((new $Uint64(0, _r$5))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeEnumValue, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, $s};return $f; - }; - appendEnumValue = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, _r$5)); - _r$6 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendEnumValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeEnumValue = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfEnum(((v.$low >> 0))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeEnumSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, _r$8))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeEnumSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendEnumSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, _r$8)); - _r$9 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendEnumSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeEnumSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfEnum(((v.$low >> 0))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfEnum(((v$1.$low >> 0))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeEnumSliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeEnumPackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, _r$8))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeEnumPackedSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s};return $f; - }; - appendEnumPackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Enum(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, _r$8))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 8: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 9; continue; } - _r$10 = list.Get(i$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v$1 = $clone(_r$10, protoreflect.Value); - _arg = b; - _r$11 = $clone(v$1, protoreflect.Value).Enum(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, _r$11)); - _r$12 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - i$1 = i$1 + (1) >> 0; - $s = 8; continue; - case 9: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendEnumPackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s};return $f; - }; - sizeInt32 = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendInt32 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeInt32 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(((v.$low >> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeInt32, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s};return $f; - }; - sizeInt32NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendInt32NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeInt32Ptr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32Ptr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendInt32Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeInt32Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$11.nil) { - vp.$set($newDataPointer(0, ptrType$11)); - } - vp.$get().$set(((v.$low >> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeInt32Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s};return $f; - }; - sizeInt32Slice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32Slice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendInt32Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeInt32Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, ((v.$low >> 0))); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), ((v$1.$low >> 0)))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeInt32Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeInt32PackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint((new $Uint64(0, v)))) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32PackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendInt32PackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint((new $Uint64(0, v)))) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, (new $Uint64(0, v$1))); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32PackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeInt32Value = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, x, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeVarint((new $Uint64(0, (((x = _r$5, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeInt32Value, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, x, $s};return $f; - }; - appendInt32Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, (((x = _r$5, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))); - _r$6 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, x, $s};return $f; - }; - consumeInt32Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfInt32(((v.$low >> 0))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeInt32SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, x, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32SliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, x, $s};return $f; - }; - appendInt32SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)))); - _r$9 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s};return $f; - }; - consumeInt32SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32(((v.$low >> 0))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32(((v$1.$low >> 0))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeInt32SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeInt32PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, x, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt32PackedSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, x, $s};return $f; - }; - appendInt32PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, x, x$1, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 8: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 9; continue; } - _r$10 = list.Get(i$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v$1 = $clone(_r$10, protoreflect.Value); - _arg = b; - _r$11 = $clone(v$1, protoreflect.Value).Int(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, (((x$1 = _r$11, x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0)))); - _r$12 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - i$1 = i$1 + (1) >> 0; - $s = 8; continue; - case 9: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt32PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, x, x$1, $s};return $f; - }; - sizeSint32 = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag((new $Int64(0, v)))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSint32 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag((new $Int64(0, v)))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSint32 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, x$2, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set((((x$2 = protowire.DecodeZigZag(new $Uint64(v.$high & 0, (v.$low & 4294967295) >>> 0)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSint32, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, x$2, $s};return $f; - }; - sizeSint32NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag((new $Int64(0, v)))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSint32NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag((new $Int64(0, v)))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeSint32Ptr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag((new $Int64(0, v)))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32Ptr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSint32Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag((new $Int64(0, v)))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSint32Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, x$2, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$11.nil) { - vp.$set($newDataPointer(0, ptrType$11)); - } - vp.$get().$set((((x$2 = protowire.DecodeZigZag(new $Uint64(v.$high & 0, (v.$low & 4294967295) >>> 0)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSint32Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, x$2, $s};return $f; - }; - sizeSint32Slice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag((new $Int64(0, v)))) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32Slice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendSint32Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag((new $Int64(0, v)))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeSint32Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, (((x$2 = protowire.DecodeZigZag(new $Uint64(v.$high & 0, (v.$low & 4294967295) >>> 0)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0))); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$3 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$4 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), (((x$5 = protowire.DecodeZigZag(new $Uint64(v$1.$high & 0, (v$1.$low & 4294967295) >>> 0)), x$5.$low + ((x$5.$high >> 31) * 4294967296)) >> 0)))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSint32Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - sizeSint32PackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(protowire.EncodeZigZag((new $Int64(0, v))))) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32PackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendSint32PackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(protowire.EncodeZigZag((new $Int64(0, v))))) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, protowire.EncodeZigZag((new $Int64(0, v$1)))); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32PackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeSint32Value = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, _r$7, opts, tagsize, v, x, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.EncodeZigZag((new $Int64(0, (((x = _r$5, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protowire.SizeVarint(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = tagsize + _r$7 >> 0; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: sizeSint32Value, $c: true, $r, $24r, _r$5, _r$6, _r$7, opts, tagsize, v, x, $s};return $f; - }; - appendSint32Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.EncodeZigZag((new $Int64(0, (((x = _r$5, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, x, $s};return $f; - }; - consumeSint32Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1, x$2; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfInt32((((x$2 = protowire.DecodeZigZag(new $Uint64(v.$high & 0, (v.$low & 4294967295) >>> 0)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeSint32SliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, x, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag((new $Int64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$10 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32SliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, x, $s};return $f; - }; - appendSint32SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag((new $Int64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32SliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s};return $f; - }; - consumeSint32SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32((((x$2 = protowire.DecodeZigZag(new $Uint64(v.$high & 0, (v.$low & 4294967295) >>> 0)), x$2.$low + ((x$2.$high >> 31) * 4294967296)) >> 0))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$3 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$4 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32((((x$5 = protowire.DecodeZigZag(new $Uint64(v$1.$high & 0, (v$1.$low & 4294967295) >>> 0)), x$5.$low + ((x$5.$high >> 31) * 4294967296)) >> 0))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeSint32SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - sizeSint32PackedSliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, x, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag((new $Int64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + (_r$10) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint32PackedSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, x, $s};return $f; - }; - appendSint32PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, x, x$1, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag((new $Int64(0, (((x = _r$8, x.$low + ((x.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + (_r$10) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 9: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 10; continue; } - _r$11 = list.Get(i$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v$1 = $clone(_r$11, protoreflect.Value); - _arg = b; - _r$12 = $clone(v$1, protoreflect.Value).Int(); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = protowire.EncodeZigZag((new $Int64(0, (((x$1 = _r$12, x$1.$low + ((x$1.$high >> 31) * 4294967296)) >> 0))))); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$1 = _r$13; - _r$14 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - b = _r$14; - i$1 = i$1 + (1) >> 0; - $s = 9; continue; - case 10: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint32PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, x, x$1, $s};return $f; - }; - sizeUint32 = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendUint32 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeUint32 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(((v.$low >>> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeUint32, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s};return $f; - }; - sizeUint32NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendUint32NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeUint32Ptr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32Ptr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendUint32Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeUint32Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$17.nil) { - vp.$set($newDataPointer(0, ptrType$17)); - } - vp.$get().$set(((v.$low >>> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeUint32Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s};return $f; - }; - sizeUint32Slice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint((new $Uint64(0, v))) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32Slice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendUint32Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(0, v))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeUint32Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, ((v.$low >>> 0))); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), ((v$1.$low >>> 0)))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeUint32Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeUint32PackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint((new $Uint64(0, v)))) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32PackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendUint32PackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint((new $Uint64(0, v)))) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, (new $Uint64(0, v$1))); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32PackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeUint32Value = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeVarint((new $Uint64(0, ((_r$5.$low >>> 0))))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeUint32Value, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, $s};return $f; - }; - appendUint32Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, ((_r$5.$low >>> 0)))); - _r$6 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeUint32Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfUint32(((v.$low >>> 0))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeUint32SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, ((_r$8.$low >>> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32SliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendUint32SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, ((_r$8.$low >>> 0)))); - _r$9 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeUint32SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint32(((v.$low >>> 0))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint32(((v$1.$low >>> 0))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeUint32SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeUint32PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, ((_r$8.$low >>> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint32PackedSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s};return $f; - }; - appendUint32PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint((new $Uint64(0, ((_r$8.$low >>> 0))))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 8: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 9; continue; } - _r$10 = list.Get(i$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v$1 = $clone(_r$10, protoreflect.Value); - _arg = b; - _r$11 = $clone(v$1, protoreflect.Value).Uint(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, ((_r$11.$low >>> 0)))); - _r$12 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - i$1 = i$1 + (1) >> 0; - $s = 8; continue; - case 9: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint32PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s};return $f; - }; - sizeInt64 = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint((new $Uint64(v.$high, v.$low))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendInt64 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeInt64 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set((new $Int64(v.$high, v.$low))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeInt64, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s};return $f; - }; - sizeInt64NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint((new $Uint64(v.$high, v.$low))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendInt64NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeInt64Ptr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint((new $Uint64(v.$high, v.$low))) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64Ptr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendInt64Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeInt64Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$14.nil) { - vp.$set($newDataPointer(new $Int64(0, 0), ptrType$14)); - } - vp.$get().$set((new $Int64(v.$high, v.$low))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeInt64Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s};return $f; - }; - sizeInt64Slice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint((new $Uint64(v.$high, v.$low))) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64Slice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendInt64Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, (new $Uint64(v.$high, v.$low))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeInt64Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, (new $Int64(v.$high, v.$low))); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), (new $Int64(v$1.$high, v$1.$low)))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeInt64Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeInt64PackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint((new $Uint64(v.$high, v.$low)))) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64PackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendInt64PackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint((new $Uint64(v.$high, v.$low)))) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, (new $Uint64(v$1.$high, v$1.$low))); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64PackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeInt64Value = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, x, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeVarint(((x = _r$5, new $Uint64(x.$high, x.$low)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeInt64Value, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, x, $s};return $f; - }; - appendInt64Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$5, new $Uint64(x.$high, x.$low))); - _r$6 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, x, $s};return $f; - }; - consumeInt64Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfInt64((new $Int64(v.$high, v.$low))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeInt64SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, x, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint(((x = _r$8, new $Uint64(x.$high, x.$low)))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64SliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, x, $s};return $f; - }; - appendInt64SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$8, new $Uint64(x.$high, x.$low))); - _r$9 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s};return $f; - }; - consumeInt64SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v.$high, v.$low))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v$1.$high, v$1.$low))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeInt64SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeInt64PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, x, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint(((x = _r$8, new $Uint64(x.$high, x.$low)))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeInt64PackedSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, x, $s};return $f; - }; - appendInt64PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, x, x$1, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint(((x = _r$8, new $Uint64(x.$high, x.$low)))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 8: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 9; continue; } - _r$10 = list.Get(i$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v$1 = $clone(_r$10, protoreflect.Value); - _arg = b; - _r$11 = $clone(v$1, protoreflect.Value).Int(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = ((x$1 = _r$11, new $Uint64(x$1.$high, x$1.$low))); - _r$12 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - i$1 = i$1 + (1) >> 0; - $s = 8; continue; - case 9: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendInt64PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, x, x$1, $s};return $f; - }; - sizeSint64 = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSint64 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSint64 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(protowire.DecodeZigZag(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSint64, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s};return $f; - }; - sizeSint64NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSint64NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeSint64Ptr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64Ptr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSint64Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSint64Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$14.nil) { - vp.$set($newDataPointer(new $Int64(0, 0), ptrType$14)); - } - vp.$get().$set(protowire.DecodeZigZag(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSint64Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s};return $f; - }; - sizeSint64Slice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint(protowire.EncodeZigZag(v)) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64Slice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendSint64Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v)); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeSint64Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, protowire.DecodeZigZag(v)); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), protowire.DecodeZigZag(v$1))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSint64Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeSint64PackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(protowire.EncodeZigZag(v))) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64PackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendSint64PackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(protowire.EncodeZigZag(v))) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, protowire.EncodeZigZag(v$1)); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64PackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeSint64Value = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, _r$7, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.EncodeZigZag(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protowire.SizeVarint(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = tagsize + _r$7 >> 0; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: sizeSint64Value, $c: true, $r, $24r, _r$5, _r$6, _r$7, opts, tagsize, v, $s};return $f; - }; - appendSint64Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.EncodeZigZag(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s};return $f; - }; - consumeSint64Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeSint64SliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$10 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64SliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendSint64SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64SliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeSint64SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v)), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64(protowire.DecodeZigZag(v$1)), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeSint64SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeSint64PackedSliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + (_r$10) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSint64PackedSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s};return $f; - }; - appendSint64PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.EncodeZigZag(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeVarint(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + (_r$10) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 9: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 10; continue; } - _r$11 = list.Get(i$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v$1 = $clone(_r$11, protoreflect.Value); - _arg = b; - _r$12 = $clone(v$1, protoreflect.Value).Int(); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = protowire.EncodeZigZag(_r$12); /* */ $s = 13; case 13: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$1 = _r$13; - _r$14 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 14; case 14: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - b = _r$14; - i$1 = i$1 + (1) >> 0; - $s = 9; continue; - case 10: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSint64PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s};return $f; - }; - sizeUint64 = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeVarint(v) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendUint64 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeUint64 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(v); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeUint64, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, x$1, $s};return $f; - }; - sizeUint64NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeVarint(v) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendUint64NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeUint64Ptr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeVarint(v) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64Ptr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendUint64Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeUint64Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$20.nil) { - vp.$set($newDataPointer(new $Uint64(0, 0), ptrType$20)); - } - vp.$get().$set(v); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeUint64Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, x$1, $s};return $f; - }; - sizeUint64Slice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeVarint(v) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64Slice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendUint64Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendVarint(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeUint64Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, v); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 0))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), v$1)); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeUint64Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeUint64PackedSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, n, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(v)) >> 0; - _i++; - } - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64PackedSlice, $c: true, $r, _i, _r$5, _ref, f, n, opts, p, s, size, v, $s};return $f; - }; - appendUint64PackedSlice = function(b, p, f, opts) { - var {_i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = 0; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - n = n + (protowire.SizeVarint(v)) >> 0; - _i++; - } - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - b = protowire.AppendVarint(b, v$1); - _i$1++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64PackedSlice, $c: true, $r, _i, _i$1, _r$5, _ref, _ref$1, b, f, n, opts, p, s, v, v$1, $s};return $f; - }; - sizeUint64Value = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeVarint(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeUint64Value, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, $s};return $f; - }; - appendUint64Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeUint64Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x, x$1; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 0))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - v = new $Uint64(0, 0); - n = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n = 2; - } else { - _tuple = protowire.ConsumeVarint(b); - v = _tuple[0]; - n = _tuple[1]; - } - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfUint64(v), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeUint64SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64SliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendUint64SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - _r$9 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeUint64SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - v = new $Uint64(0, 0); - n$1 = 0; - if (b$1.$length >= 1 && (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) < 128) { - v = (new $Uint64(0, (0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]))); - n$1 = 1; - } else if (b$1.$length >= 2 && (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]) < 128) { - v = (x = (new $Uint64(0, (((0 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 0]) & 127) >>> 0))), x$1 = $shiftLeft64((new $Uint64(0, (1 >= b$1.$length ? ($throwRuntimeError("index out of range"), undefined) : b$1.$array[b$1.$offset + 1]))), 7), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - n$1 = 2; - } else { - _tuple$1 = protowire.ConsumeVarint(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - } - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint64(v), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 0))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - v$1 = new $Uint64(0, 0); - n$2 = 0; - if (b.$length >= 1 && (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { - v$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - n$2 = 1; - } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { - v$1 = (x$2 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$3 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - n$2 = 2; - } else { - _tuple$2 = protowire.ConsumeVarint(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - } - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint64(v$1), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeUint64SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, x, x$1, x$2, x$3, $s};return $f; - }; - sizeUint64PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = 0; - _tmp = 0; - _tmp$1 = llen; - i = _tmp; - llen$1 = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen$1)) { break; } */ if(!(i < llen$1)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeUint64PackedSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, llen$1, n, opts, size, tagsize, v, $s};return $f; - }; - appendUint64PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeVarint(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + (_r$9) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i$1 = 0; - /* while (true) { */ case 8: - /* if (!(i$1 < llen)) { break; } */ if(!(i$1 < llen)) { $s = 9; continue; } - _r$10 = list.Get(i$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - v$1 = $clone(_r$10, protoreflect.Value); - _arg = b; - _r$11 = $clone(v$1, protoreflect.Value).Uint(); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = _r$11; - _r$12 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - b = _r$12; - i$1 = i$1 + (1) >> 0; - $s = 8; continue; - case 9: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendUint64PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$11, _r$12, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, i$1, list, listv, llen, n, opts, v, v$1, wiretag, $s};return $f; - }; - sizeSfixed32 = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed32() >> 0; - return size; - }; - appendSfixed32 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, ((v >>> 0))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSfixed32 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(((v >> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed32, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - sizeSfixed32NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeFixed32() >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed32NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSfixed32NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, ((v >>> 0))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeSfixed32Ptr = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed32() >> 0; - return size; - }; - appendSfixed32Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, ((v >>> 0))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSfixed32Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$11.nil) { - vp.$set($newDataPointer(0, ptrType$11)); - } - vp.$get().$set(((v >> 0))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed32Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - sizeSfixed32Slice = function(p, f, opts) { - var {_r$5, f, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - size = $imul(s.$length, ((f.tagsize + protowire.SizeFixed32() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed32Slice, $c: true, $r, _r$5, f, opts, p, s, size, $s};return $f; - }; - appendSfixed32Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, ((v >>> 0))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeSfixed32Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - _tuple$1 = protowire.ConsumeFixed32(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, ((v >> 0))); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 5))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), ((v$1 >> 0)))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed32Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s};return $f; - }; - sizeSfixed32PackedSlice = function(p, f, opts) { - var {_r$5, f, n, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(s.$length, protowire.SizeFixed32()); - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed32PackedSlice, $c: true, $r, _r$5, f, n, opts, p, s, size, $s};return $f; - }; - appendSfixed32PackedSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = $imul(s.$length, protowire.SizeFixed32()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendFixed32(b, ((v >>> 0))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32PackedSlice, $c: true, $r, _i, _r$5, _ref, b, f, n, opts, p, s, v, $s};return $f; - }; - sizeSfixed32Value = function(v, tagsize, opts) { - var opts, tagsize, v; - return tagsize + protowire.SizeFixed32() >> 0; - }; - appendSfixed32Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = ((_r$5.$low >>> 0)); - _r$6 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeSfixed32Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfInt32(((v >> 0))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeSfixed32SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = $imul(_r$6, ((tagsize + protowire.SizeFixed32() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed32SliceValue, $c: true, $r, _r$5, _r$6, list, listv, opts, size, tagsize, $s};return $f; - }; - appendSfixed32SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((_r$8.$low >>> 0)); - _r$9 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeSfixed32SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeFixed32(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32(((v >> 0))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 5))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt32(((v$1 >> 0))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed32SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s};return $f; - }; - sizeSfixed32PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(llen, protowire.SizeFixed32()); - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed32PackedSliceValue, $c: true, $r, _r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s};return $f; - }; - appendSfixed32PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = $imul(llen, protowire.SizeFixed32()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((_r$8.$low >>> 0)); - _r$9 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed32PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s};return $f; - }; - sizeFixed32 = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed32() >> 0; - return size; - }; - appendFixed32 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeFixed32 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(v); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFixed32, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - sizeFixed32NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeFixed32() >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed32NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendFixed32NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeFixed32Ptr = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed32() >> 0; - return size; - }; - appendFixed32Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeFixed32Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$17.nil) { - vp.$set($newDataPointer(0, ptrType$17)); - } - vp.$get().$set(v); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFixed32Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - sizeFixed32Slice = function(p, f, opts) { - var {_r$5, f, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - size = $imul(s.$length, ((f.tagsize + protowire.SizeFixed32() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed32Slice, $c: true, $r, _r$5, f, opts, p, s, size, $s};return $f; - }; - appendFixed32Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeFixed32Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - _tuple$1 = protowire.ConsumeFixed32(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, v); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 5))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), v$1)); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFixed32Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s};return $f; - }; - sizeFixed32PackedSlice = function(p, f, opts) { - var {_r$5, f, n, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(s.$length, protowire.SizeFixed32()); - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed32PackedSlice, $c: true, $r, _r$5, f, n, opts, p, s, size, $s};return $f; - }; - appendFixed32PackedSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = $imul(s.$length, protowire.SizeFixed32()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendFixed32(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32PackedSlice, $c: true, $r, _i, _r$5, _ref, b, f, n, opts, p, s, v, $s};return $f; - }; - sizeFixed32Value = function(v, tagsize, opts) { - var opts, tagsize, v; - return tagsize + protowire.SizeFixed32() >> 0; - }; - appendFixed32Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = ((_r$5.$low >>> 0)); - _r$6 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeFixed32Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfUint32((v)), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeFixed32SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = $imul(_r$6, ((tagsize + protowire.SizeFixed32() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed32SliceValue, $c: true, $r, _r$5, _r$6, list, listv, opts, size, tagsize, $s};return $f; - }; - appendFixed32SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((_r$8.$low >>> 0)); - _r$9 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeFixed32SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeFixed32(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint32((v)), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 5))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint32((v$1)), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeFixed32SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s};return $f; - }; - sizeFixed32PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(llen, protowire.SizeFixed32()); - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed32PackedSliceValue, $c: true, $r, _r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s};return $f; - }; - appendFixed32PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = $imul(llen, protowire.SizeFixed32()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((_r$8.$low >>> 0)); - _r$9 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed32PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s};return $f; - }; - sizeFloat = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed32() >> 0; - return size; - }; - appendFloat = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, math.Float32bits(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloat, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeFloat = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Float32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(math.Float32frombits(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFloat, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - sizeFloatNoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Float32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v === 0) && !math.Signbit((v))) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeFixed32() >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFloatNoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendFloatNoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float32(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v === 0) && !math.Signbit((v))) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, math.Float32bits(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatNoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeFloatPtr = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed32() >> 0; - return size; - }; - appendFloatPtr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, math.Float32bits(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatPtr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeFloatPtr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Float32Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$23.nil) { - vp.$set($newDataPointer(0, ptrType$23)); - } - vp.$get().$set(math.Float32frombits(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFloatPtr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - sizeFloatSlice = function(p, f, opts) { - var {_r$5, f, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Float32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - size = $imul(s.$length, ((f.tagsize + protowire.SizeFixed32() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFloatSlice, $c: true, $r, _r$5, f, opts, p, s, size, $s};return $f; - }; - appendFloatSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed32(b, math.Float32bits(v)); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatSlice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeFloatSlice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Float32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - _tuple$1 = protowire.ConsumeFixed32(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, math.Float32frombits(v)); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 5))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), math.Float32frombits(v$1))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFloatSlice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s};return $f; - }; - sizeFloatPackedSlice = function(p, f, opts) { - var {_r$5, f, n, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Float32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(s.$length, protowire.SizeFixed32()); - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFloatPackedSlice, $c: true, $r, _r$5, f, n, opts, p, s, size, $s};return $f; - }; - appendFloatPackedSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float32Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = $imul(s.$length, protowire.SizeFixed32()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendFixed32(b, math.Float32bits(v)); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatPackedSlice, $c: true, $r, _i, _r$5, _ref, b, f, n, opts, p, s, v, $s};return $f; - }; - sizeFloatValue = function(v, tagsize, opts) { - var opts, tagsize, v; - return tagsize + protowire.SizeFixed32() >> 0; - }; - appendFloatValue = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Float(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = math.Float32bits(($fround(_r$5))); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s};return $f; - }; - consumeFloatValue = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 5))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeFixed32(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfFloat32(math.Float32frombits((v))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeFloatSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = $imul(_r$6, ((tagsize + protowire.SizeFixed32() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFloatSliceValue, $c: true, $r, _r$5, _r$6, list, listv, opts, size, tagsize, $s};return $f; - }; - appendFloatSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Float(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = math.Float32bits(($fround(_r$8))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeFloatSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeFixed32(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfFloat32(math.Float32frombits((v))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 5))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - _tuple$2 = protowire.ConsumeFixed32(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfFloat32(math.Float32frombits((v$1))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeFloatSliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s};return $f; - }; - sizeFloatPackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(llen, protowire.SizeFixed32()); - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFloatPackedSliceValue, $c: true, $r, _r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s};return $f; - }; - appendFloatPackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = $imul(llen, protowire.SizeFixed32()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Float(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = math.Float32bits(($fround(_r$8))); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendFixed32(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFloatPackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s};return $f; - }; - sizeSfixed64 = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed64() >> 0; - return size; - }; - appendSfixed64 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSfixed64 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set((new $Int64(v.$high, v.$low))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed64, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - sizeSfixed64NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeFixed64() >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed64NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendSfixed64NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeSfixed64Ptr = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed64() >> 0; - return size; - }; - appendSfixed64Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, (new $Uint64(v.$high, v.$low))); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeSfixed64Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Int64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$14.nil) { - vp.$set($newDataPointer(new $Int64(0, 0), ptrType$14)); - } - vp.$get().$set((new $Int64(v.$high, v.$low))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed64Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - sizeSfixed64Slice = function(p, f, opts) { - var {_r$5, f, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - size = $imul(s.$length, ((f.tagsize + protowire.SizeFixed64() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed64Slice, $c: true, $r, _r$5, f, opts, p, s, size, $s};return $f; - }; - appendSfixed64Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, (new $Uint64(v.$high, v.$low))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeSfixed64Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - _tuple$1 = protowire.ConsumeFixed64(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, (new $Int64(v.$high, v.$low))); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 1))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeFixed64(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), (new $Int64(v$1.$high, v$1.$low)))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed64Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s};return $f; - }; - sizeSfixed64PackedSlice = function(p, f, opts) { - var {_r$5, f, n, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(s.$length, protowire.SizeFixed64()); - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed64PackedSlice, $c: true, $r, _r$5, f, n, opts, p, s, size, $s};return $f; - }; - appendSfixed64PackedSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Int64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = $imul(s.$length, protowire.SizeFixed64()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendFixed64(b, (new $Uint64(v.$high, v.$low))); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64PackedSlice, $c: true, $r, _i, _r$5, _ref, b, f, n, opts, p, s, v, $s};return $f; - }; - sizeSfixed64Value = function(v, tagsize, opts) { - var opts, tagsize, v; - return tagsize + protowire.SizeFixed64() >> 0; - }; - appendSfixed64Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Int(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$5, new $Uint64(x.$high, x.$low))); - _r$6 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, x, $s};return $f; - }; - consumeSfixed64Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfInt64((new $Int64(v.$high, v.$low))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeSfixed64SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = $imul(_r$6, ((tagsize + protowire.SizeFixed64() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed64SliceValue, $c: true, $r, _r$5, _r$6, list, listv, opts, size, tagsize, $s};return $f; - }; - appendSfixed64SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$8, new $Uint64(x.$high, x.$low))); - _r$9 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, x, $s};return $f; - }; - consumeSfixed64SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeFixed64(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v.$high, v.$low))), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 1))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - _tuple$2 = protowire.ConsumeFixed64(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfInt64((new $Int64(v$1.$high, v$1.$low))), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeSfixed64SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s};return $f; - }; - sizeSfixed64PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(llen, protowire.SizeFixed64()); - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeSfixed64PackedSliceValue, $c: true, $r, _r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s};return $f; - }; - appendSfixed64PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = $imul(llen, protowire.SizeFixed64()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Int(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = ((x = _r$8, new $Uint64(x.$high, x.$low))); - _r$9 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendSfixed64PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, x, $s};return $f; - }; - sizeFixed64 = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed64() >> 0; - return size; - }; - appendFixed64 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeFixed64 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(v); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFixed64, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - sizeFixed64NoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeFixed64() >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed64NoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendFixed64NoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v.$high === 0 && v.$low === 0)) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64NoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeFixed64Ptr = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed64() >> 0; - return size; - }; - appendFixed64Ptr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64Ptr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeFixed64Ptr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Uint64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$20.nil) { - vp.$set($newDataPointer(new $Uint64(0, 0), ptrType$20)); - } - vp.$get().$set(v); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFixed64Ptr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - sizeFixed64Slice = function(p, f, opts) { - var {_r$5, f, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - size = $imul(s.$length, ((f.tagsize + protowire.SizeFixed64() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed64Slice, $c: true, $r, _r$5, f, opts, p, s, size, $s};return $f; - }; - appendFixed64Slice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64Slice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeFixed64Slice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - _tuple$1 = protowire.ConsumeFixed64(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, v); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 1))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeFixed64(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), v$1)); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeFixed64Slice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s};return $f; - }; - sizeFixed64PackedSlice = function(p, f, opts) { - var {_r$5, f, n, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(s.$length, protowire.SizeFixed64()); - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed64PackedSlice, $c: true, $r, _r$5, f, n, opts, p, s, size, $s};return $f; - }; - appendFixed64PackedSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Uint64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = $imul(s.$length, protowire.SizeFixed64()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendFixed64(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64PackedSlice, $c: true, $r, _i, _r$5, _ref, b, f, n, opts, p, s, v, $s};return $f; - }; - sizeFixed64Value = function(v, tagsize, opts) { - var opts, tagsize, v; - return tagsize + protowire.SizeFixed64() >> 0; - }; - appendFixed64Value = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64Value, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeFixed64Value = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfUint64(v), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeFixed64SliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = $imul(_r$6, ((tagsize + protowire.SizeFixed64() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed64SliceValue, $c: true, $r, _r$5, _r$6, list, listv, opts, size, tagsize, $s};return $f; - }; - appendFixed64SliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - _r$9 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64SliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeFixed64SliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeFixed64(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint64(v), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 1))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - _tuple$2 = protowire.ConsumeFixed64(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfUint64(v$1), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeFixed64SliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s};return $f; - }; - sizeFixed64PackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(llen, protowire.SizeFixed64()); - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeFixed64PackedSliceValue, $c: true, $r, _r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s};return $f; - }; - appendFixed64PackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = $imul(llen, protowire.SizeFixed64()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Uint(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - _r$9 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendFixed64PackedSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s};return $f; - }; - sizeDouble = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed64() >> 0; - return size; - }; - appendDouble = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, math.Float64bits(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDouble, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeDouble = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(math.Float64frombits(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeDouble, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - sizeDoubleNoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v === 0) && !math.Signbit((v))) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeFixed64() >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeDoubleNoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendDoubleNoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if ((v === 0) && !math.Signbit((v))) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, math.Float64bits(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoubleNoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - sizeDoublePtr = function(p, f, opts) { - var f, opts, p, size; - size = 0; - size = f.tagsize + protowire.SizeFixed64() >> 0; - return size; - }; - appendDoublePtr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, math.Float64bits(v)); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoublePtr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeDoublePtr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Float64Ptr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$26.nil) { - vp.$set($newDataPointer(0, ptrType$26)); - } - vp.$get().$set(math.Float64frombits(v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeDoublePtr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - sizeDoubleSlice = function(p, f, opts) { - var {_r$5, f, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Float64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - size = $imul(s.$length, ((f.tagsize + protowire.SizeFixed64() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeDoubleSlice, $c: true, $r, _r$5, f, opts, p, s, size, $s};return $f; - }; - appendDoubleSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendFixed64(b, math.Float64bits(v)); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoubleSlice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeDoubleSlice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).Float64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (wtyp === 2) { - s = sp.$get(); - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errDecode; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - while (true) { - if (!(b$1.$length > 0)) { break; } - _tuple$1 = protowire.ConsumeFixed64(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - s = $append(s, math.Float64frombits(v)); - b$1 = $subslice(b$1, n$1); - } - sp.$set(s); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - if (!((wtyp === 1))) { - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = errUnknown; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - } - _tuple$2 = protowire.ConsumeFixed64(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$8 = $clone(out, unmarshalOutput); - _tmp$9 = errDecode; - unmarshalOutput.copy(out, _tmp$8); - err = _tmp$9; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), math.Float64frombits(v$1))); - out.n = n$2; - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeDoubleSlice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, f, n, n$1, n$2, opts, out, p, s, sp, v, v$1, wtyp, $s};return $f; - }; - sizeDoublePackedSlice = function(p, f, opts) { - var {_r$5, f, n, opts, p, s, size, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Float64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(s.$length, protowire.SizeFixed64()); - size = f.tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeDoublePackedSlice, $c: true, $r, _r$5, f, n, opts, p, s, size, $s};return $f; - }; - appendDoublePackedSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Float64Slice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - if (s.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - n = $imul(s.$length, protowire.SizeFixed64()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendFixed64(b, math.Float64bits(v)); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoublePackedSlice, $c: true, $r, _i, _r$5, _ref, b, f, n, opts, p, s, v, $s};return $f; - }; - sizeDoubleValue = function(v, tagsize, opts) { - var opts, tagsize, v; - return tagsize + protowire.SizeFixed64() >> 0; - }; - appendDoubleValue = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Float(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = math.Float64bits(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoubleValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, b, opts, v, wiretag, $s};return $f; - }; - consumeDoubleValue = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 1))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeFixed64(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfFloat64(math.Float64frombits(v)), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeDoubleSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - size = $imul(_r$6, ((tagsize + protowire.SizeFixed64() >> 0))); - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeDoubleSliceValue, $c: true, $r, _r$5, _r$6, list, listv, opts, size, tagsize, $s};return $f; - }; - appendDoubleSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Float(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = math.Float64bits(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoubleSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeDoubleSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - /* */ if (wtyp === 2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (wtyp === 2) { */ case 2: - _tuple = protowire.ConsumeBytes(b); - b$1 = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errDecode; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - /* while (true) { */ case 4: - /* if (!(b$1.$length > 0)) { break; } */ if(!(b$1.$length > 0)) { $s = 5; continue; } - _tuple$1 = protowire.ConsumeFixed64(b$1); - v = _tuple$1[0]; - n$1 = _tuple$1[1]; - if (n$1 < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfFloat64(math.Float64frombits(v)), protoreflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1 = $subslice(b$1, n$1); - $s = 4; continue; - case 5: - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* } */ case 3: - if (!((wtyp === 1))) { - _tmp$9 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = errUnknown; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - } - _tuple$2 = protowire.ConsumeFixed64(b); - v$1 = _tuple$2[0]; - n$2 = _tuple$2[1]; - if (n$2 < 0) { - _tmp$12 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$13 = $clone(out, unmarshalOutput); - _tmp$14 = errDecode; - protoreflect.Value.copy(_, _tmp$12); - unmarshalOutput.copy(out, _tmp$13); - err = _tmp$14; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfFloat64(math.Float64frombits(v$1)), protoreflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n$2; - _tmp$15 = $clone(listv, protoreflect.Value); - _tmp$16 = $clone(out, unmarshalOutput); - _tmp$17 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$15); - unmarshalOutput.copy(out, _tmp$16); - err = _tmp$17; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeDoubleSliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, b, b$1, err, list, listv, n, n$1, n$2, opts, out, param, v, v$1, wtyp, $s};return $f; - }; - sizeDoublePackedSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - size = 0; - $s = -1; return size; - } - n = $imul(llen, protowire.SizeFixed64()); - size = tagsize + protowire.SizeBytes(n) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeDoublePackedSliceValue, $c: true, $r, _r$5, _r$6, list, listv, llen, n, opts, size, tagsize, $s};return $f; - }; - appendDoublePackedSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - llen = _r$6; - if (llen === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, wiretag); - n = $imul(llen, protowire.SizeFixed64()); - b = protowire.AppendVarint(b, (new $Uint64(0, n))); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Float(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = math.Float64bits(_r$8); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$1 = _r$9; - _r$10 = protowire.AppendFixed64(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - b = _r$10; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendDoublePackedSliceValue, $c: true, $r, _arg, _arg$1, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, b, i, list, listv, llen, n, opts, v, wiretag, $s};return $f; - }; - sizeString = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeBytes(v.length) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeString, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendString = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendString, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeString = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(($bytesToString(v))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeString, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - appendStringValidateUTF8 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - if (!utf8.ValidString(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringValidateUTF8, $c: true, $r, _r$5, b, f, opts, p, v, x, $s};return $f; - }; - consumeStringValidateUTF8 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (!utf8.Valid(v)) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set(($bytesToString(v))); - out.n = n; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeStringValidateUTF8, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, $s};return $f; - }; - sizeStringNoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v.length === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeBytes(v.length) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeStringNoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendStringNoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v.length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringNoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - appendStringNoZeroValidateUTF8 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v.length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - if (!utf8.ValidString(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringNoZeroValidateUTF8, $c: true, $r, _r$5, b, f, opts, p, v, x, $s};return $f; - }; - sizeStringPtr = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).StringPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - size = f.tagsize + protowire.SizeBytes(v.length) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeStringPtr, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendStringPtr = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).StringPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringPtr, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeStringPtr = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).StringPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$29.nil) { - vp.$set($newDataPointer("", ptrType$29)); - } - vp.$get().$set(($bytesToString(v))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeStringPtr, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, $s};return $f; - }; - appendStringPtrValidateUTF8 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).StringPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get().$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - if (!utf8.ValidString(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringPtrValidateUTF8, $c: true, $r, _r$5, b, f, opts, p, v, x, $s};return $f; - }; - consumeStringPtrValidateUTF8 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (!utf8.Valid(v)) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).StringPtr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - vp = _r$5; - if (vp.$get() === ptrType$29.nil) { - vp.$set($newDataPointer("", ptrType$29)); - } - vp.$get().$set(($bytesToString(v))); - out.n = n; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeStringPtrValidateUTF8, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, vp, wtyp, x, $s};return $f; - }; - sizeStringSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).StringSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeBytes(v.length) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeStringSlice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendStringSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).StringSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringSlice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeStringSlice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).StringSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), ($bytesToString(v)))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeStringSlice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, $s};return $f; - }; - appendStringSliceValidateUTF8 = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).StringSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendString(b, v); - if (!utf8.ValidString(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringSliceValidateUTF8, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, x, $s};return $f; - }; - consumeStringSliceValidateUTF8 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, x, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (!utf8.Valid(v)) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).StringSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - sp.$set($append(sp.$get(), ($bytesToString(v)))); - out.n = n; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeStringSliceValidateUTF8, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, x, $s};return $f; - }; - sizeStringValue = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeBytes(_r$5.length); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeStringValue, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, $s};return $f; - }; - appendStringValue = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = protowire.AppendString(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeStringValue = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfString(($bytesToString(v))), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - appendStringValueValidateUTF8 = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, b, opts, v, wiretag, x, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = protowire.AppendString(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - _r$7 = $clone(v, protoreflect.Value).String(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = utf8.ValidString(_r$7); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!_r$8) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r$8) { */ case 3: - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - /* } */ case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringValueValidateUTF8, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, b, opts, v, wiretag, x, $s};return $f; - }; - consumeStringValueValidateUTF8 = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, b, err, n, opts, out, param, param$1, v, wtyp, x; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - if (!utf8.Valid(v)) { - _tmp$6 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - } - out.n = n; - _tmp$9 = $clone(protoreflect.ValueOfString(($bytesToString(v))), protoreflect.Value); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - return [_, out, err]; - }; - sizeStringSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeBytes(_r$8.length); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeStringSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendStringSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - _r$9 = protowire.AppendString(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendStringSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeStringSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, list, listv, n, opts, out, param, v, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - if (!((wtyp === 2))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfString(($bytesToString(v))), protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeStringSliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, list, listv, n, opts, out, param, v, wtyp, $s};return $f; - }; - sizeBytes = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - size = f.tagsize + protowire.SizeBytes(v.$length) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBytes, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendBytes = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendBytes(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytes, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeBytes = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set($appendSlice(new sliceType(emptyBuf), v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBytes, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - appendBytesValidateUTF8 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendBytes(b, v); - if (!utf8.Valid(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesValidateUTF8, $c: true, $r, _r$5, b, f, opts, p, v, x, $s};return $f; - }; - consumeBytesValidateUTF8 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (!utf8.Valid(v)) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set($appendSlice(new sliceType(emptyBuf), v)); - out.n = n; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBytesValidateUTF8, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, $s};return $f; - }; - sizeBytesNoZero = function(p, f, opts) { - var {_r$5, f, opts, p, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v.$length === 0) { - size = 0; - $s = -1; return size; - } - size = f.tagsize + protowire.SizeBytes(v.$length) >> 0; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBytesNoZero, $c: true, $r, _r$5, f, opts, p, size, v, $s};return $f; - }; - appendBytesNoZero = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendBytes(b, v); - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesNoZero, $c: true, $r, _r$5, b, f, opts, p, v, $s};return $f; - }; - consumeBytesNoZero = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set($appendSlice((sliceType.nil), v)); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBytesNoZero, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, v, wtyp, $s};return $f; - }; - appendBytesNoZeroValidateUTF8 = function(b, p, f, opts) { - var {_r$5, b, f, opts, p, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5.$get(); - if (v.$length === 0) { - $s = -1; return [b, $ifaceNil]; - } - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendBytes(b, v); - if (!utf8.Valid(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesNoZeroValidateUTF8, $c: true, $r, _r$5, b, f, opts, p, v, x, $s};return $f; - }; - consumeBytesNoZeroValidateUTF8 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (!utf8.Valid(v)) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5.$set($appendSlice((sliceType.nil), v)); - out.n = n; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBytesNoZeroValidateUTF8, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, v, wtyp, x, $s};return $f; - }; - sizeBytesSlice = function(p, f, opts) { - var {_i, _r$5, _ref, f, opts, p, s, size, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(p, pointer).BytesSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - size = size + ((f.tagsize + protowire.SizeBytes(v.$length) >> 0)) >> 0; - _i++; - } - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBytesSlice, $c: true, $r, _i, _r$5, _ref, f, opts, p, s, size, v, $s};return $f; - }; - appendBytesSlice = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).BytesSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendBytes(b, v); - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesSlice, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, $s};return $f; - }; - consumeBytesSlice = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(p, pointer).BytesSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - sp.$set($append(sp.$get(), $appendSlice(new sliceType(emptyBuf), v))); - out.n = n; - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBytesSlice, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, $s};return $f; - }; - appendBytesSliceValidateUTF8 = function(b, p, f, opts) { - var {_i, _r$5, _ref, b, f, opts, p, s, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).BytesSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5.$get(); - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = protowire.AppendVarint(b, f.wiretag); - b = protowire.AppendBytes(b, v); - if (!utf8.Valid(v)) { - $s = -1; return [b, (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x))]; - } - _i++; - } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesSliceValidateUTF8, $c: true, $r, _i, _r$5, _ref, b, f, opts, p, s, v, x, $s};return $f; - }; - consumeBytesSliceValidateUTF8 = function(b, p, wtyp, f, opts) { - var {_r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, x, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - if (!utf8.Valid(v)) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = (x = new errInvalidUTF8.ptr(), new x.constructor.elem(x)); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).BytesSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - sp = _r$5; - sp.$set($append(sp.$get(), $appendSlice(new sliceType(emptyBuf), v))); - out.n = n; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeBytesSliceValidateUTF8, $c: true, $r, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, err, f, n, opts, out, p, sp, v, wtyp, x, $s};return $f; - }; - sizeBytesValue = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeBytes(_r$5.$length); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = tagsize + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeBytesValue, $c: true, $r, $24r, _r$5, _r$6, opts, tagsize, v, $s};return $f; - }; - appendBytesValue = function(b, v, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _r$6 = protowire.AppendBytes(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, b, opts, v, wiretag, $s};return $f; - }; - consumeBytesValue = function(b, param, param$1, wtyp, opts) { - var _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, n, opts, out, param, param$1, v, wtyp; - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - return [_, out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - return [_, out, err]; - } - out.n = n; - _tmp$6 = $clone(protoreflect.ValueOfBytes($appendSlice(new sliceType(emptyBuf), v)), protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - return [_, out, err]; - }; - sizeBytesSliceValue = function(listv, tagsize, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - size = 0; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - _r$8 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = protowire.SizeBytes(_r$8.$length); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - size = size + ((tagsize + _r$9 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - size = size; - $s = -1; return size; - /* */ } return; } var $f = {$blk: sizeBytesSliceValue, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, opts, size, tagsize, v, $s};return $f; - }; - appendBytesSliceValue = function(b, listv, wiretag, opts) { - var {_arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v = $clone(_r$7, protoreflect.Value); - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$8 = $clone(v, protoreflect.Value).Bytes(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$1 = _r$8; - _r$9 = protowire.AppendBytes(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - b = _r$9; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendBytesSliceValue, $c: true, $r, _arg, _arg$1, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, b, i, list, listv, llen, opts, v, wiretag, $s};return $f; - }; - consumeBytesSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, list, listv, n, opts, out, param, v, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - if (!((wtyp === 2))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(protoreflect.ValueOfBytes($appendSlice(new sliceType(emptyBuf), v)), protoreflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - _tmp$6 = $clone(listv, protoreflect.Value); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeBytesSliceValue, $c: true, $r, _, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, b, err, list, listv, n, opts, out, param, v, wtyp, $s};return $f; - }; - errInvalidUTF8.ptr.prototype.Error = function() { - return "string field contains invalid UTF-8"; - }; - errInvalidUTF8.prototype.Error = function() { return this.$val.Error(); }; - errInvalidUTF8.ptr.prototype.InvalidUTF8 = function() { - return true; - }; - errInvalidUTF8.prototype.InvalidUTF8 = function() { return this.$val.InvalidUTF8(); }; - errInvalidUTF8.ptr.prototype.Unwrap = function() { - return errors.Error; - }; - errInvalidUTF8.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - MessageInfo.ptr.prototype.initOneofFieldCoders = function(od, si) { - var {_entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, cf, fd, fields, first, fs, ft, getInfo, i, lim, mi, needIsInit, num, od, oneofFields, ot, si, $s, $r, $c} = $restore(this, {od, si}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ft = [ft]; - getInfo = [getInfo]; - oneofFields = [oneofFields]; - mi = this; - _r$5 = od.Name(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - fs = $clone((_entry = si.oneofsByName[protoreflect.Name.keyFor(_r$5)], _entry !== undefined ? _entry.v : new reflect.StructField.ptr("", "", $ifaceNil, "", 0, sliceType$14.nil, false)), reflect.StructField); - ft[0] = fs.Type; - oneofFields[0] = {}; - needIsInit = false; - _r$6 = od.Fields(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - fields = _r$6; - _tmp = 0; - _r$7 = fields.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$1 = _r$7; - i = _tmp; - lim = _tmp$1; - /* while (true) { */ case 4: - /* if (!(i < lim)) { break; } */ if(!(i < lim)) { $s = 5; continue; } - cf = [cf]; - ot = [ot]; - _r$8 = od.Fields(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Get(i); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - fd = _r$9; - _r$10 = fd.Number(); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - num = _r$10; - cf[0] = $clone((_entry$1 = mi.coderMessageInfo.coderFields[protowire.Number.keyFor(num)], _entry$1 !== undefined ? _entry$1.v : ptrType$6.nil), coderFieldInfo); - ot[0] = (_entry$2 = si.oneofWrappersByNumber[protowire.Number.keyFor(num)], _entry$2 !== undefined ? _entry$2.v : $ifaceNil); - _r$11 = ot[0].Field(0); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - cf[0].ft = _r$11.Type; - _r$12 = fieldCoder(fd, cf[0].ft); /* */ $s = 10; case 10: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple = _r$12; - cf[0].mi = _tuple[0]; - pointerCoderFuncs.copy(cf[0].funcs, _tuple[1]); - _key = ot[0]; (oneofFields[0] || $throwRuntimeError("assignment to entry in nil map"))[reflect.Type.keyFor(_key)] = { k: _key, v: cf[0] }; - if (!(cf[0].funcs.isInit === $throwNilPointerError)) { - needIsInit = true; - } - (_entry$3 = mi.coderMessageInfo.coderFields[protowire.Number.keyFor(num)], _entry$3 !== undefined ? _entry$3.v : ptrType$6.nil).funcs.unmarshal = (function(cf, ft, getInfo, oneofFields, ot) { return function $b(b, p, wtyp, f, opts) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _tuple$1, _v, _v$1, b, err, f, opts, out, p, vi, vw, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vw = new reflect.Value.ptr(ptrType$7.nil, 0, 0); - _r$13 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - vi = _r$14; - if (!(!$clone(vi, reflect.Value).IsNil())) { _v$1 = false; $s = 7; continue s; } - _r$15 = $clone(vi, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, reflect.Value).IsNil(); /* */ $s = 9; case 9: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _v$1 = !_r$16; case 7: - if (!(_v$1)) { _v = false; $s = 6; continue s; } - _r$17 = $clone(vi, reflect.Value).Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, reflect.Value).Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, reflect.Value).Type(); /* */ $s = 12; case 12: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _v = $interfaceIsEqual(_r$19, ot[0]); case 6: - /* */ if (_v) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 3: - _r$20 = $clone(vi, reflect.Value).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - vw = _r$20; - $s = 5; continue; - /* } else { */ case 4: - vw = reflect.New(ot[0]); - /* } */ case 5: - _arg = b; - _r$21 = $clone(pointerOfValue($clone(vw, reflect.Value)), pointer).Apply($clone(zeroOffset, offset)); /* */ $s = 14; case 14: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$21, pointer); - _arg$2 = wtyp; - _arg$3 = cf[0]; - _arg$4 = $clone(opts, unmarshalOptions); - _r$22 = cf[0].funcs.unmarshal(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 15; case 15: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple$1 = _r$22; - out = $clone(_tuple$1[0], unmarshalOutput); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [out, err]; - } - $r = $clone(vi, reflect.Value).Set($clone(vw, reflect.Value)); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [out, $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _tuple$1, _v, _v$1, b, err, f, opts, out, p, vi, vw, wtyp, $s};return $f; - }; })(cf, ft, getInfo, oneofFields, ot); - i = i + (1) >> 0; - $s = 4; continue; - case 5: - getInfo[0] = (function(ft, getInfo, oneofFields) { return function $b(p) { - var {$24r, _entry$4, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, p, v, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$13 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - v = _r$14; - if ($clone(v, reflect.Value).IsNil()) { - $s = -1; return [new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)), ptrType$6.nil]; - } - _r$15 = $clone(v, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - v = _r$15; - if ($clone(v, reflect.Value).IsNil()) { - $s = -1; return [new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)), ptrType$6.nil]; - } - _r$16 = $clone(pointerOfValue($clone(v, reflect.Value)), pointer).Apply($clone(zeroOffset, offset)); /* */ $s = 4; case 4: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $clone(v, reflect.Value).Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, reflect.Value).Type(); /* */ $s = 6; case 6: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r = [_r$16, (_entry$4 = oneofFields[0][reflect.Type.keyFor(_r$18)], _entry$4 !== undefined ? _entry$4.v : ptrType$6.nil)]; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _entry$4, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, p, v, $s};return $f; - }; })(ft, getInfo, oneofFields); - _r$13 = od.Fields(); /* */ $s = 11; case 11: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = _r$13.Get(0); /* */ $s = 12; case 12: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = _r$14.Number(); /* */ $s = 13; case 13: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - first = (_entry$4 = mi.coderMessageInfo.coderFields[protowire.Number.keyFor(_r$15)], _entry$4 !== undefined ? _entry$4.v : ptrType$6.nil); - first.funcs.size = (function(ft, getInfo, oneofFields) { return function $b(p, param, opts) { - var {$24r, _r$16, _r$17, _tuple$1, info, opts, p, param, $s, $r, $c} = $restore(this, {p, param, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$16 = getInfo[0]($clone(p, pointer)); /* */ $s = 1; case 1: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$1 = _r$16; - p = $clone(_tuple$1[0], pointer); - info = _tuple$1[1]; - if (info === ptrType$6.nil || info.funcs.size === $throwNilPointerError) { - $s = -1; return 0; - } - _r$17 = info.funcs.size($clone(p, pointer), info, $clone(opts, marshalOptions)); /* */ $s = 2; case 2: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$16, _r$17, _tuple$1, info, opts, p, param, $s};return $f; - }; })(ft, getInfo, oneofFields); - first.funcs.marshal = (function(ft, getInfo, oneofFields) { return function $b(b, p, param, opts) { - var {$24r, _r$16, _r$17, _tuple$1, b, info, opts, p, param, $s, $r, $c} = $restore(this, {b, p, param, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$16 = getInfo[0]($clone(p, pointer)); /* */ $s = 1; case 1: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$1 = _r$16; - p = $clone(_tuple$1[0], pointer); - info = _tuple$1[1]; - if (info === ptrType$6.nil || info.funcs.marshal === $throwNilPointerError) { - $s = -1; return [b, $ifaceNil]; - } - _r$17 = info.funcs.marshal(b, $clone(p, pointer), info, $clone(opts, marshalOptions)); /* */ $s = 2; case 2: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$16, _r$17, _tuple$1, b, info, opts, p, param, $s};return $f; - }; })(ft, getInfo, oneofFields); - first.funcs.merge = (function(ft, getInfo, oneofFields) { return function $b(dst, src, param, opts) { - var {_r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _tuple$1, _tuple$2, dst, dstinfo, dstp, opts, param, src, srcinfo, srcp, $s, $r, $c} = $restore(this, {dst, src, param, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$16 = getInfo[0]($clone(src, pointer)); /* */ $s = 1; case 1: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$1 = _r$16; - srcp = $clone(_tuple$1[0], pointer); - srcinfo = _tuple$1[1]; - if (srcinfo === ptrType$6.nil || srcinfo.funcs.merge === $throwNilPointerError) { - $s = -1; return; - } - _r$17 = getInfo[0]($clone(dst, pointer)); /* */ $s = 2; case 2: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$2 = _r$17; - dstp = $clone(_tuple$2[0], pointer); - dstinfo = _tuple$2[1]; - /* */ if (!(dstinfo === srcinfo)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(dstinfo === srcinfo)) { */ case 3: - _r$18 = $clone(dst, pointer).AsValueOf(ft[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = $clone(_r$18, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $clone(src, pointer).AsValueOf(ft[0]); /* */ $s = 7; case 7: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = $clone(_r$20, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = $clone(_r$21, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = $clone(_r$22, reflect.Value).Elem(); /* */ $s = 10; case 10: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = $clone(_r$23, reflect.Value).Type(); /* */ $s = 11; case 11: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = reflect.New(_r$24); /* */ $s = 12; case 12: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - $r = $clone(_r$19, reflect.Value).Set($clone(_r$25, reflect.Value)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$26 = $clone(dst, pointer).AsValueOf(ft[0]); /* */ $s = 14; case 14: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = $clone(_r$26, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = $clone(_r$27, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$29 = pointerOfValue($clone(_r$28, reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$30 = $clone(_r$29, pointer).Apply($clone(zeroOffset, offset)); /* */ $s = 18; case 18: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - pointer.copy(dstp, _r$30); - /* } */ case 4: - $r = srcinfo.funcs.merge($clone(dstp, pointer), $clone(srcp, pointer), srcinfo, $clone(opts, mergeOptions)); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _tuple$1, _tuple$2, dst, dstinfo, dstp, opts, param, src, srcinfo, srcp, $s};return $f; - }; })(ft, getInfo, oneofFields); - if (needIsInit) { - first.funcs.isInit = (function(ft, getInfo, oneofFields) { return function $b(p, param) { - var {$24r, _r$16, _r$17, _tuple$1, info, p, param, $s, $r, $c} = $restore(this, {p, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$16 = getInfo[0]($clone(p, pointer)); /* */ $s = 1; case 1: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$1 = _r$16; - p = $clone(_tuple$1[0], pointer); - info = _tuple$1[1]; - if (info === ptrType$6.nil || info.funcs.isInit === $throwNilPointerError) { - $s = -1; return $ifaceNil; - } - _r$17 = info.funcs.isInit($clone(p, pointer), info); /* */ $s = 2; case 2: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r = _r$17; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$16, _r$17, _tuple$1, info, p, param, $s};return $f; - }; })(ft, getInfo, oneofFields); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.initOneofFieldCoders, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _key, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, cf, fd, fields, first, fs, ft, getInfo, i, lim, mi, needIsInit, num, od, oneofFields, ot, si, $s};return $f; - }; - MessageInfo.prototype.initOneofFieldCoders = function(od, si) { return this.$val.initOneofFieldCoders(od, si); }; - makeWeakMessageFieldCoder = function(fd) { - var fd, lazyInit, messageType, once; - once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - messageType = $ifaceNil; - lazyInit = (function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = once.Do((function $b() { - var {_r$5, _r$6, _r$7, _tuple, messageName, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = fd.Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.FullName(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - messageName = _r$6; - _r$7 = protoregistry.GlobalTypes.FindMessageByName(messageName); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - messageType = _tuple[0]; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, _r$7, _tuple, messageName, $s};return $f; - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }); - return new pointerCoderFuncs.ptr(ptrType$5.nil, (function $b(p, f, opts) { - var {$24r, _arg, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, f, m, ok, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).WeakFields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.get(f.num); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - m = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return 0; - } - $r = lazyInit(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(messageType, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(messageType, $ifaceNil)) { */ case 4: - _r$7 = fd.Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$8); - _r$9 = fmt.Sprintf("weak message %v is not linked in", new sliceType$1([_arg])); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $panic(new $String(_r$9)); - /* } */ case 5: - _r$10 = sizeMessage(m, f.tagsize, $clone(opts, marshalOptions)); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, f, m, ok, opts, p, $s};return $f; - }), (function $b(b, p, f, opts) { - var {$24r, _arg, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, f, m, ok, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).WeakFields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.get(f.num); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - m = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [b, $ifaceNil]; - } - $r = lazyInit(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(messageType, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(messageType, $ifaceNil)) { */ case 4: - _r$7 = fd.Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.FullName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$8); - _r$9 = fmt.Sprintf("weak message %v is not linked in", new sliceType$1([_arg])); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $panic(new $String(_r$9)); - /* } */ case 5: - _r$10 = appendMessage(b, m, f.wiretag, $clone(opts, marshalOptions)); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, f, m, ok, opts, p, $s};return $f; - }), (function $b(b, p, wtyp, f, opts) { - var {$24r, _r$5, _r$6, _r$7, _r$8, _tuple, b, f, fs, m, ok, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).WeakFields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - fs = _r$5; - _tuple = fs.get(f.num); - m = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - $r = lazyInit(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ($interfaceIsEqual(messageType, $ifaceNil)) { - $s = -1; return [new unmarshalOutput.ptr(0, false), errUnknown]; - } - _r$6 = messageType.New(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Interface(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - m = _r$7; - fs.set(f.num, m); - /* } */ case 3: - _r$8 = consumeMessage(b, m, wtyp, $clone(opts, unmarshalOptions)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, _tuple, b, f, fs, m, ok, opts, p, wtyp, $s};return $f; - }), (function $b(p, f) { - var {$24r, _r$5, _r$6, _r$7, _tuple, f, m, ok, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).WeakFields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.get(f.num); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - m = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return $ifaceNil; - } - _r$7 = proto.CheckInitialized(m); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$5, _r$6, _r$7, _tuple, f, m, ok, p, $s};return $f; - }), (function $b(dst, src, f, opts) { - var {_arg, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, dm, dst, f, ok, opts, sm, src, $s, $r, $c} = $restore(this, {dst, src, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(src, pointer).WeakFields(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.get(f.num); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - sm = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return; - } - _r$7 = $clone(dst, pointer).WeakFields(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.get(f.num); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - dm = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ok) { */ case 5: - $r = lazyInit(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(messageType, $ifaceNil)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($interfaceIsEqual(messageType, $ifaceNil)) { */ case 8: - _r$9 = fd.Message(); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.FullName(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg = new protoreflect.FullName(_r$10); - _r$11 = fmt.Sprintf("weak message %v is not linked in", new sliceType$1([_arg])); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $panic(new $String(_r$11)); - /* } */ case 9: - _r$12 = messageType.New(); /* */ $s = 13; case 13: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Interface(); /* */ $s = 14; case 14: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - dm = _r$13; - _r$14 = $clone(dst, pointer).WeakFields(); /* */ $s = 15; case 15: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $r = _r$14.set(f.num, dm); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $r = $clone(opts, mergeOptions).Merge(dm, sm); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _r$10, _r$11, _r$12, _r$13, _r$14, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, dm, dst, f, ok, opts, sm, src, $s};return $f; - })); - }; - makeMessageFieldCoder = function(fd, ft) { - var {_r$5, _r$6, fd, ft, funcs, mi, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ft = [ft]; - _r$5 = getMessageInfo(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mi = _r$5; - /* */ if (!(mi === ptrType$5.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(mi === ptrType$5.nil)) { */ case 2: - funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeMessageInfo, appendMessageInfo, consumeMessageInfo, $throwNilPointerError, mergeMessage); - _r$6 = needsInitCheck(mi.Desc); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$6) { */ case 5: - funcs.isInit = isInitMessageInfo; - /* } */ case 6: - $s = -1; return funcs; - /* } else { */ case 3: - $s = -1; return new pointerCoderFuncs.ptr(ptrType$5.nil, (function(ft) { return function $b(p, f, opts) { - var {$24r, _r$10, _r$7, _r$8, _r$9, f, m, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = asMessage($clone(_r$8, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - _r$10 = sizeMessage(m, f.tagsize, $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$7, _r$8, _r$9, f, m, opts, p, $s};return $f; - }; })(ft), (function(ft) { return function $b(b, p, f, opts) { - var {$24r, _r$10, _r$7, _r$8, _r$9, b, f, m, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = asMessage($clone(_r$8, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - _r$10 = appendMessage(b, m, f.wiretag, $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$7, _r$8, _r$9, b, f, m, opts, p, $s};return $f; - }; })(ft), (function(ft) { return function $b(b, p, wtyp, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$7, _r$8, _r$9, b, f, mp, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - mp = _r$8; - /* */ if ($clone(mp, reflect.Value).IsNil()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($clone(mp, reflect.Value).IsNil()) { */ case 3: - _r$9 = ft[0].Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = reflect.New(_r$9); /* */ $s = 6; case 6: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = $clone(mp, reflect.Value).Set($clone(_r$10, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - _arg = b; - _r$11 = asMessage($clone(mp, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg$1 = _r$11; - _arg$2 = wtyp; - _arg$3 = $clone(opts, unmarshalOptions); - _r$12 = consumeMessage(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 9; case 9: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r = _r$12; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$12, _r$7, _r$8, _r$9, b, f, mp, opts, p, wtyp, $s};return $f; - }; })(ft), (function(ft) { return function $b(p, f) { - var {$24r, _r$10, _r$7, _r$8, _r$9, f, m, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = asMessage($clone(_r$8, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - _r$10 = proto.CheckInitialized(m); /* */ $s = 4; case 4: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$7, _r$8, _r$9, f, m, p, $s};return $f; - }; })(ft), mergeMessage); - /* } */ case 4: - $s = -1; return new pointerCoderFuncs.ptr(ptrType$5.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - /* */ } return; } var $f = {$blk: makeMessageFieldCoder, $c: true, $r, _r$5, _r$6, fd, ft, funcs, mi, $s};return $f; - }; - sizeMessageInfo = function(p, f, opts) { - var {$24r, _r$5, _r$6, _r$7, f, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = f.mi.sizePointer($clone(_r$5, pointer), $clone(opts, marshalOptions)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protowire.SizeBytes(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7 + f.tagsize >> 0; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: sizeMessageInfo, $c: true, $r, $24r, _r$5, _r$6, _r$7, f, opts, p, $s};return $f; - }; - appendMessageInfo = function(b, p, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, f, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, f.wiretag); - _arg = b; - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = f.mi.sizePointer($clone(_r$5, pointer), $clone(opts, marshalOptions)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, _r$6)); - _r$7 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - b = _r$7; - _arg$2 = b; - _r$8 = $clone(p, pointer).Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$8, pointer); - _arg$4 = $clone(opts, marshalOptions); - _r$9 = f.mi.marshalAppendPointer(_arg$2, _arg$3, _arg$4); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: appendMessageInfo, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, f, opts, p, $s};return $f; - }; - consumeMessageInfo = function(b, p, wtyp, f, opts) { - var {_arg, _arg$1, _arg$2, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, f, n, o, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).IsNil(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$6) { */ case 1: - _r$7 = f.mi.GoReflectType.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = reflect.New(_r$7); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = pointerOfValue($clone(_r$8, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(p, pointer).SetPointer($clone(_r$9, pointer)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _arg = v; - _r$10 = $clone(p, pointer).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$10, pointer); - _arg$2 = $clone(opts, unmarshalOptions); - _r$11 = f.mi.unmarshalPointer(_arg, _arg$1, 0, _arg$2); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$1 = _r$11; - o = $clone(_tuple$1[0], unmarshalOutput); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = err; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - out.n = n; - out.initialized = o.initialized; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeMessageInfo, $c: true, $r, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, f, n, o, opts, out, p, v, wtyp, $s};return $f; - }; - isInitMessageInfo = function(p, f) { - var {$24r, _r$5, _r$6, f, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = f.mi.checkInitializedPointer($clone(_r$5, pointer)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: isInitMessageInfo, $c: true, $r, $24r, _r$5, _r$6, f, p, $s};return $f; - }; - sizeMessage = function(m, tagsize, param) { - var {$24r, _r$5, _r$6, m, param, tagsize, $s, $r, $c} = $restore(this, {m, tagsize, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = proto.Size(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = protowire.SizeBytes(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6 + tagsize >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeMessage, $c: true, $r, $24r, _r$5, _r$6, m, param, tagsize, $s};return $f; - }; - appendMessage = function(b, m, wiretag, opts) { - var {$24r, _arg, _arg$1, _r$5, _r$6, _r$7, b, m, opts, wiretag, $s, $r, $c} = $restore(this, {b, m, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _arg = b; - _r$5 = proto.Size(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = (new $Uint64(0, _r$5)); - _r$6 = protowire.AppendVarint(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - _r$7 = $clone($clone(opts, marshalOptions).Options(), proto.MarshalOptions).MarshalAppend(b, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: appendMessage, $c: true, $r, $24r, _arg, _arg$1, _r$5, _r$6, _r$7, b, m, opts, wiretag, $s};return $f; - }; - consumeMessage = function(b, m, wtyp, opts) { - var {_r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, m, n, o, opts, out, v, wtyp, $s, $r, $c} = $restore(this, {b, m, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone($clone(opts, unmarshalOptions).Options(), proto.UnmarshalOptions).UnmarshalState(new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), _r$5, v, 0, $ifaceNil, 0)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - o = $clone(_tuple$1[0], structType$5); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = err; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - out.n = n; - out.initialized = !((((o.Flags & 1) >>> 0) === 0)); - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeMessage, $c: true, $r, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, m, n, o, opts, out, v, wtyp, $s};return $f; - }; - sizeMessageValue = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, _r$7, m, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = sizeMessage(m, tagsize, $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: sizeMessageValue, $c: true, $r, $24r, _r$5, _r$6, _r$7, m, opts, tagsize, v, $s};return $f; - }; - appendMessageValue = function(b, v, wiretag, opts) { - var {$24r, _r$5, _r$6, _r$7, b, m, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = appendMessage(b, m, wiretag, $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: appendMessageValue, $c: true, $r, $24r, _r$5, _r$6, _r$7, b, m, opts, v, wiretag, $s};return $f; - }; - consumeMessageValue = function(b, v, param, wtyp, opts) { - var {_r$5, _r$6, _r$7, _tuple, b, err, m, opts, out, param, v, wtyp, $s, $r, $c} = $restore(this, {b, v, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = consumeMessage(b, m, wtyp, $clone(opts, unmarshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - out = $clone(_tuple[0], unmarshalOutput); - err = _tuple[1]; - $s = -1; return [v, out, err]; - /* */ } return; } var $f = {$blk: consumeMessageValue, $c: true, $r, _r$5, _r$6, _r$7, _tuple, b, err, m, opts, out, param, v, wtyp, $s};return $f; - }; - isInitMessageValue = function(v) { - var {$24r, _r$5, _r$6, _r$7, m, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = proto.CheckInitialized(m); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: isInitMessageValue, $c: true, $r, $24r, _r$5, _r$6, _r$7, m, v, $s};return $f; - }; - sizeGroupValue = function(v, tagsize, opts) { - var {$24r, _r$5, _r$6, _r$7, m, opts, tagsize, v, $s, $r, $c} = $restore(this, {v, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = sizeGroup(m, tagsize, $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: sizeGroupValue, $c: true, $r, $24r, _r$5, _r$6, _r$7, m, opts, tagsize, v, $s};return $f; - }; - appendGroupValue = function(b, v, wiretag, opts) { - var {$24r, _r$5, _r$6, _r$7, b, m, opts, v, wiretag, $s, $r, $c} = $restore(this, {b, v, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = appendGroup(b, m, wiretag, $clone(opts, marshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: appendGroupValue, $c: true, $r, $24r, _r$5, _r$6, _r$7, b, m, opts, v, wiretag, $s};return $f; - }; - consumeGroupValue = function(b, v, num, wtyp, opts) { - var {_r$5, _r$6, _r$7, _tuple, b, err, m, num, opts, out, v, wtyp, $s, $r, $c} = $restore(this, {b, v, num, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, protoreflect.Value).Message(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.Interface(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = consumeGroup(b, m, num, wtyp, $clone(opts, unmarshalOptions)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - out = $clone(_tuple[0], unmarshalOutput); - err = _tuple[1]; - $s = -1; return [v, out, err]; - /* */ } return; } var $f = {$blk: consumeGroupValue, $c: true, $r, _r$5, _r$6, _r$7, _tuple, b, err, m, num, opts, out, v, wtyp, $s};return $f; - }; - makeGroupFieldCoder = function(fd, ft) { - var {_r$5, _r$6, _r$7, fd, ft, funcs, mi, num, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ft = [ft]; - num = [num]; - _r$5 = fd.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - num[0] = _r$5; - _r$6 = getMessageInfo(ft[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - mi = _r$6; - /* */ if (!(mi === ptrType$5.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(mi === ptrType$5.nil)) { */ case 3: - funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeGroupType, appendGroupType, consumeGroupType, $throwNilPointerError, mergeMessage); - _r$7 = needsInitCheck(mi.Desc); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$7) { */ case 6: - funcs.isInit = isInitMessageInfo; - /* } */ case 7: - $s = -1; return funcs; - /* } else { */ case 4: - $s = -1; return new pointerCoderFuncs.ptr(ptrType$5.nil, (function(ft, num) { return function $b(p, f, opts) { - var {$24r, _r$10, _r$11, _r$8, _r$9, f, m, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = asMessage($clone(_r$9, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - m = _r$10; - _r$11 = sizeGroup(m, f.tagsize, $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$8, _r$9, f, m, opts, p, $s};return $f; - }; })(ft, num), (function(ft, num) { return function $b(b, p, f, opts) { - var {$24r, _r$10, _r$11, _r$8, _r$9, b, f, m, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = asMessage($clone(_r$9, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - m = _r$10; - _r$11 = appendGroup(b, m, f.wiretag, $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$8, _r$9, b, f, m, opts, p, $s};return $f; - }; })(ft, num), (function(ft, num) { return function $b(b, p, wtyp, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$8, _r$9, b, f, mp, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - mp = _r$9; - /* */ if ($clone(mp, reflect.Value).IsNil()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($clone(mp, reflect.Value).IsNil()) { */ case 3: - _r$10 = ft[0].Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = reflect.New(_r$10); /* */ $s = 6; case 6: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $r = $clone(mp, reflect.Value).Set($clone(_r$11, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - _arg = b; - _r$12 = asMessage($clone(mp, reflect.Value)); /* */ $s = 8; case 8: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$1 = _r$12; - _arg$2 = num[0]; - _arg$3 = wtyp; - _arg$4 = $clone(opts, unmarshalOptions); - _r$13 = consumeGroup(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 9; case 9: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = _r$13; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$10, _r$11, _r$12, _r$13, _r$8, _r$9, b, f, mp, opts, p, wtyp, $s};return $f; - }; })(ft, num), (function(ft, num) { return function $b(p, f) { - var {$24r, _r$10, _r$11, _r$8, _r$9, f, m, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = $clone(p, pointer).AsValueOf(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = asMessage($clone(_r$9, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - m = _r$10; - _r$11 = proto.CheckInitialized(m); /* */ $s = 4; case 4: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$10, _r$11, _r$8, _r$9, f, m, p, $s};return $f; - }; })(ft, num), mergeMessage); - /* } */ case 5: - $s = -1; return new pointerCoderFuncs.ptr(ptrType$5.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - /* */ } return; } var $f = {$blk: makeGroupFieldCoder, $c: true, $r, _r$5, _r$6, _r$7, fd, ft, funcs, mi, num, $s};return $f; - }; - sizeGroupType = function(p, f, opts) { - var {$24r, _r$5, _r$6, f, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = f.mi.sizePointer($clone(_r$5, pointer), $clone(opts, marshalOptions)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = ($imul(2, f.tagsize)) + _r$6 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sizeGroupType, $c: true, $r, $24r, _r$5, _r$6, f, opts, p, $s};return $f; - }; - appendGroupType = function(b, p, f, opts) { - var {_arg, _arg$1, _arg$2, _r$5, _r$6, _tuple, b, err, f, opts, p, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, f.wiretag); - _arg = b; - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$5, pointer); - _arg$2 = $clone(opts, marshalOptions); - _r$6 = f.mi.marshalAppendPointer(_arg, _arg$1, _arg$2); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - err = _tuple[1]; - b = protowire.AppendVarint(b, (x = f.wiretag, new $Uint64(x.$high + 0, x.$low + 1))); - $s = -1; return [b, err]; - /* */ } return; } var $f = {$blk: appendGroupType, $c: true, $r, _arg, _arg$1, _arg$2, _r$5, _r$6, _tuple, b, err, f, opts, p, x, $s};return $f; - }; - consumeGroupType = function(b, p, wtyp, f, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, f, opts, out, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 3))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _r$5 = $clone(p, pointer).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, pointer).IsNil(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$6) { */ case 1: - _r$7 = f.mi.GoReflectType.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = reflect.New(_r$7); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = pointerOfValue($clone(_r$8, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(p, pointer).SetPointer($clone(_r$9, pointer)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _arg = b; - _r$10 = $clone(p, pointer).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$10, pointer); - _arg$2 = f.num; - _arg$3 = $clone(opts, unmarshalOptions); - _r$11 = f.mi.unmarshalPointer(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple = _r$11; - unmarshalOutput.copy(out, _tuple[0]); - err = _tuple[1]; - $24r = [out, err]; - $s = 11; case 11: return $24r; - /* */ } return; } var $f = {$blk: consumeGroupType, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, f, opts, out, p, wtyp, $s};return $f; - }; - sizeGroup = function(m, tagsize, param) { - var {$24r, _r$5, m, param, tagsize, $s, $r, $c} = $restore(this, {m, tagsize, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = proto.Size(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = ($imul(2, tagsize)) + _r$5 >> 0; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: sizeGroup, $c: true, $r, $24r, _r$5, m, param, tagsize, $s};return $f; - }; - appendGroup = function(b, m, wiretag, opts) { - var {_r$5, _tuple, b, err, m, opts, wiretag, $s, $r, $c} = $restore(this, {b, m, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = protowire.AppendVarint(b, wiretag); - _r$5 = $clone($clone(opts, marshalOptions).Options(), proto.MarshalOptions).MarshalAppend(b, m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - b = _tuple[0]; - err = _tuple[1]; - b = protowire.AppendVarint(b, new $Uint64(wiretag.$high + 0, wiretag.$low + 1)); - $s = -1; return [b, err]; - /* */ } return; } var $f = {$blk: appendGroup, $c: true, $r, _r$5, _tuple, b, err, m, opts, wiretag, $s};return $f; - }; - consumeGroup = function(b, m, num, wtyp, opts) { - var {_r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, m, n, num, o, opts, out, wtyp, $s, $r, $c} = $restore(this, {b, m, num, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 3))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeGroup(num, b); - b = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = m.ProtoReflect(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone($clone(opts, unmarshalOptions).Options(), proto.UnmarshalOptions).UnmarshalState(new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), _r$5, b, 0, $ifaceNil, 0)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - o = $clone(_tuple$1[0], structType$5); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = err; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - out.n = n; - out.initialized = !((((o.Flags & 1) >>> 0) === 0)); - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeGroup, $c: true, $r, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, m, n, num, o, opts, out, wtyp, $s};return $f; - }; - makeMessageSliceFieldCoder = function(fd, ft) { - var {_r$5, _r$6, fd, ft, funcs, mi, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ft = [ft]; - _r$5 = getMessageInfo(ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mi = _r$5; - /* */ if (!(mi === ptrType$5.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(mi === ptrType$5.nil)) { */ case 2: - funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeMessageSliceInfo, appendMessageSliceInfo, consumeMessageSliceInfo, $throwNilPointerError, mergeMessageSlice); - _r$6 = needsInitCheck(mi.Desc); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$6) { */ case 4: - funcs.isInit = isInitMessageSliceInfo; - /* } */ case 5: - $s = -1; return funcs; - /* } */ case 3: - $s = -1; return new pointerCoderFuncs.ptr(ptrType$5.nil, (function(ft) { return function $b(p, f, opts) { - var {$24r, _r$7, f, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = sizeMessageSlice($clone(p, pointer), ft[0], f.tagsize, $clone(opts, marshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$7, f, opts, p, $s};return $f; - }; })(ft), (function(ft) { return function $b(b, p, f, opts) { - var {$24r, _r$7, b, f, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = appendMessageSlice(b, $clone(p, pointer), f.wiretag, ft[0], $clone(opts, marshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$7, b, f, opts, p, $s};return $f; - }; })(ft), (function(ft) { return function $b(b, p, wtyp, f, opts) { - var {$24r, _r$7, b, f, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = consumeMessageSlice(b, $clone(p, pointer), ft[0], wtyp, $clone(opts, unmarshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$7, b, f, opts, p, wtyp, $s};return $f; - }; })(ft), (function(ft) { return function $b(p, f) { - var {$24r, _r$7, f, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = isInitMessageSlice($clone(p, pointer), ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$7, f, p, $s};return $f; - }; })(ft), mergeMessageSlice); - /* */ } return; } var $f = {$blk: makeMessageSliceFieldCoder, $c: true, $r, _r$5, _r$6, fd, ft, funcs, mi, $s};return $f; - }; - sizeMessageSliceInfo = function(p, f, opts) { - var {_i, _r$5, _r$6, _r$7, _ref, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - n = 0; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = f.mi.sizePointer($clone(v, pointer), $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = protowire.SizeBytes(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - n = n + ((_r$7 + f.tagsize >> 0)) >> 0; - _i++; - $s = 2; continue; - case 3: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeMessageSliceInfo, $c: true, $r, _i, _r$5, _r$6, _r$7, _ref, f, n, opts, p, s, v, $s};return $f; - }; - appendMessageSliceInfo = function(b, p, f, opts) { - var {_i, _r$5, _r$6, _r$7, _ref, _tuple, b, err, f, opts, p, s, siz, v, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - err = $ifaceNil; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - b = protowire.AppendVarint(b, f.wiretag); - _r$6 = f.mi.sizePointer($clone(v, pointer), $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - siz = _r$6; - b = protowire.AppendVarint(b, (new $Uint64(0, siz))); - _r$7 = f.mi.marshalAppendPointer(b, $clone(v, pointer), $clone(opts, marshalOptions)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - _i++; - $s = 2; continue; - case 3: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendMessageSliceInfo, $c: true, $r, _i, _r$5, _r$6, _r$7, _ref, _tuple, b, err, f, opts, p, s, siz, v, $s};return $f; - }; - consumeMessageSliceInfo = function(b, p, wtyp, f, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, f, m, mp, n, o, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = f.mi.GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - m = _r$7; - _r$8 = pointerOfIface(m); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - mp = $clone(_r$8, pointer); - _r$9 = f.mi.unmarshalPointer(v, $clone(mp, pointer), 0, $clone(opts, unmarshalOptions)); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - o = $clone(_tuple$1[0], unmarshalOutput); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = err; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - $r = $clone(p, pointer).AppendPointerSlice($clone(mp, pointer)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - out.initialized = o.initialized; - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeMessageSliceInfo, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, f, m, mp, n, o, opts, out, p, v, wtyp, $s};return $f; - }; - isInitMessageSliceInfo = function(p, f) { - var {_i, _r$5, _r$6, _ref, err, f, p, s, v, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = f.mi.checkInitializedPointer($clone(v, pointer)); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _i++; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: isInitMessageSliceInfo, $c: true, $r, _i, _r$5, _r$6, _ref, err, f, p, s, v, $s};return $f; - }; - sizeMessageSlice = function(p, goType, tagsize, param) { - var {_i, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, goType, m, n, p, param, s, tagsize, v, $s, $r, $c} = $restore(this, {p, goType, tagsize, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - n = 0; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = goType.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(v, pointer).AsValueOf(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = asMessage($clone(_r$7, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - m = _r$8; - _r$9 = proto.Size(m); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.SizeBytes(_r$9); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + ((_r$10 + tagsize >> 0)) >> 0; - _i++; - $s = 2; continue; - case 3: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeMessageSlice, $c: true, $r, _i, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, goType, m, n, p, param, s, tagsize, v, $s};return $f; - }; - appendMessageSlice = function(b, p, wiretag, goType, opts) { - var {_i, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, b, err, goType, m, opts, p, s, siz, v, wiretag, $s, $r, $c} = $restore(this, {b, p, wiretag, goType, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - err = $ifaceNil; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = goType.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(v, pointer).AsValueOf(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = asMessage($clone(_r$7, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - m = _r$8; - b = protowire.AppendVarint(b, wiretag); - _r$9 = proto.Size(m); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - siz = _r$9; - b = protowire.AppendVarint(b, (new $Uint64(0, siz))); - _r$10 = $clone($clone(opts, marshalOptions).Options(), proto.MarshalOptions).MarshalAppend(b, m); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = _r$10; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - _i++; - $s = 2; continue; - case 3: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendMessageSlice, $c: true, $r, _i, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, b, err, goType, m, opts, p, s, siz, v, wiretag, $s};return $f; - }; - consumeMessageSlice = function(b, p, goType, wtyp, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, goType, mp, n, o, opts, out, p, v, wtyp, $s, $r, $c} = $restore(this, {b, p, goType, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 2))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = goType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - mp = _r$6; - _r$7 = asMessage($clone(mp, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone($clone(opts, unmarshalOptions).Options(), proto.UnmarshalOptions).UnmarshalState(new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), _r$8, v, 0, $ifaceNil, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - o = $clone(_tuple$1[0], structType$5); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = err; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - $r = $clone(p, pointer).AppendPointerSlice($clone(pointerOfValue($clone(mp, reflect.Value)), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - out.initialized = !((((o.Flags & 1) >>> 0) === 0)); - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeMessageSlice, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, goType, mp, n, o, opts, out, p, v, wtyp, $s};return $f; - }; - isInitMessageSlice = function(p, goType) { - var {_i, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, err, goType, m, p, s, v, $s, $r, $c} = $restore(this, {p, goType}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = goType.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(v, pointer).AsValueOf(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = asMessage($clone(_r$7, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - m = _r$8; - _r$9 = proto.CheckInitialized(m); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _i++; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: isInitMessageSlice, $c: true, $r, _i, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, err, goType, m, p, s, v, $s};return $f; - }; - sizeMessageSliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, m, n, opts, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - n = 0; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - _r$10 = proto.Size(m); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = protowire.SizeBytes(_r$10); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - n = n + ((_r$11 + tagsize >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeMessageSliceValue, $c: true, $r, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, m, n, opts, tagsize, $s};return $f; - }; - appendMessageSliceValue = function(b, listv, wiretag, opts) { - var {_r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, i, list, listv, llen, m, mopts, opts, siz, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - mopts = $clone($clone(opts, marshalOptions).Options(), proto.MarshalOptions); - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - b = protowire.AppendVarint(b, wiretag); - _r$10 = proto.Size(m); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - siz = _r$10; - b = protowire.AppendVarint(b, (new $Uint64(0, siz))); - err = $ifaceNil; - _r$11 = $clone(mopts, proto.MarshalOptions).MarshalAppend(b, m); /* */ $s = 9; case 9: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple = _r$11; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendMessageSliceValue, $c: true, $r, _r$10, _r$11, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, i, list, listv, llen, m, mopts, opts, siz, wiretag, $s};return $f; - }; - consumeMessageSliceValue = function(b, listv, param, wtyp, opts) { - var {_, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, list, listv, m, n, o, opts, out, param, v, wtyp, $s, $r, $c} = $restore(this, {b, listv, param, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - if (!((wtyp === 2))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - _tuple = protowire.ConsumeBytes(b); - v = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - _r$6 = list.NewElement(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = $clone(_r$6, protoreflect.Value); - _r$7 = $clone(m, protoreflect.Value).Message(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone($clone(opts, unmarshalOptions).Options(), proto.UnmarshalOptions).UnmarshalState(new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), _r$7, v, 0, $ifaceNil, 0)); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - o = $clone(_tuple$1[0], structType$5); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = err; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(m, protoreflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - out.initialized = !((((o.Flags & 1) >>> 0) === 0)); - _tmp$9 = $clone(listv, protoreflect.Value); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeMessageSliceValue, $c: true, $r, _, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, list, listv, m, n, o, opts, out, param, v, wtyp, $s};return $f; - }; - isInitMessageSliceValue = function(listv) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, err, i, list, listv, llen, m, $s, $r, $c} = $restore(this, {listv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - _r$10 = proto.CheckInitialized(m); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: isInitMessageSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, err, i, list, listv, llen, m, $s};return $f; - }; - sizeGroupSliceValue = function(listv, tagsize, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, m, n, opts, tagsize, $s, $r, $c} = $restore(this, {listv, tagsize, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - n = 0; - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - _r$10 = proto.Size(m); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - n = n + ((($imul(2, tagsize)) + _r$10 >> 0)) >> 0; - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeGroupSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, i, list, listv, llen, m, n, opts, tagsize, $s};return $f; - }; - appendGroupSliceValue = function(b, listv, wiretag, opts) { - var {_r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, i, list, listv, llen, m, mopts, opts, wiretag, $s, $r, $c} = $restore(this, {b, listv, wiretag, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - mopts = $clone($clone(opts, marshalOptions).Options(), proto.MarshalOptions); - _tmp = 0; - _r$6 = list.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$1 = _r$6; - i = _tmp; - llen = _tmp$1; - /* while (true) { */ case 3: - /* if (!(i < llen)) { break; } */ if(!(i < llen)) { $s = 4; continue; } - _r$7 = list.Get(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone(_r$7, protoreflect.Value).Message(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Interface(); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - m = _r$9; - b = protowire.AppendVarint(b, wiretag); - err = $ifaceNil; - _r$10 = $clone(mopts, proto.MarshalOptions).MarshalAppend(b, m); /* */ $s = 8; case 8: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = _r$10; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - b = protowire.AppendVarint(b, new $Uint64(wiretag.$high + 0, wiretag.$low + 1)); - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendGroupSliceValue, $c: true, $r, _r$10, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, b, err, i, list, listv, llen, m, mopts, opts, wiretag, $s};return $f; - }; - consumeGroupSliceValue = function(b, listv, num, wtyp, opts) { - var {_, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, list, listv, m, n, num, o, opts, out, wtyp, $s, $r, $c} = $restore(this, {b, listv, num, wtyp, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$5 = $clone(listv, protoreflect.Value).List(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - list = _r$5; - if (!((wtyp === 3))) { - _tmp = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$1 = $clone(out, unmarshalOutput); - _tmp$2 = errUnknown; - protoreflect.Value.copy(_, _tmp); - unmarshalOutput.copy(out, _tmp$1); - err = _tmp$2; - $s = -1; return [_, out, err]; - } - _tuple = protowire.ConsumeGroup(num, b); - b = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$3 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = errDecode; - protoreflect.Value.copy(_, _tmp$3); - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [_, out, err]; - } - _r$6 = list.NewElement(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = $clone(_r$6, protoreflect.Value); - _r$7 = $clone(m, protoreflect.Value).Message(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $clone($clone(opts, unmarshalOptions).Options(), proto.UnmarshalOptions).UnmarshalState(new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), _r$7, b, 0, $ifaceNil, 0)); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - o = $clone(_tuple$1[0], structType$5); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil); - _tmp$7 = $clone(out, unmarshalOutput); - _tmp$8 = err; - protoreflect.Value.copy(_, _tmp$6); - unmarshalOutput.copy(out, _tmp$7); - err = _tmp$8; - $s = -1; return [_, out, err]; - } - $r = list.Append($clone(m, protoreflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - out.initialized = !((((o.Flags & 1) >>> 0) === 0)); - _tmp$9 = $clone(listv, protoreflect.Value); - _tmp$10 = $clone(out, unmarshalOutput); - _tmp$11 = $ifaceNil; - protoreflect.Value.copy(_, _tmp$9); - unmarshalOutput.copy(out, _tmp$10); - err = _tmp$11; - $s = -1; return [_, out, err]; - /* */ } return; } var $f = {$blk: consumeGroupSliceValue, $c: true, $r, _, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, list, listv, m, n, num, o, opts, out, wtyp, $s};return $f; - }; - makeGroupSliceFieldCoder = function(fd, ft) { - var {_r$5, _r$6, _r$7, fd, ft, funcs, mi, num, $s, $r, $c} = $restore(this, {fd, ft}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ft = [ft]; - num = [num]; - _r$5 = fd.Number(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - num[0] = _r$5; - _r$6 = getMessageInfo(ft[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - mi = _r$6; - /* */ if (!(mi === ptrType$5.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(mi === ptrType$5.nil)) { */ case 3: - funcs = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeGroupSliceInfo, appendGroupSliceInfo, consumeGroupSliceInfo, $throwNilPointerError, mergeMessageSlice); - _r$7 = needsInitCheck(mi.Desc); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$7) { */ case 5: - funcs.isInit = isInitMessageSliceInfo; - /* } */ case 6: - $s = -1; return funcs; - /* } */ case 4: - $s = -1; return new pointerCoderFuncs.ptr(ptrType$5.nil, (function(ft, num) { return function $b(p, f, opts) { - var {$24r, _r$8, f, opts, p, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = sizeGroupSlice($clone(p, pointer), ft[0], f.tagsize, $clone(opts, marshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$8, f, opts, p, $s};return $f; - }; })(ft, num), (function(ft, num) { return function $b(b, p, f, opts) { - var {$24r, _r$8, b, f, opts, p, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = appendGroupSlice(b, $clone(p, pointer), f.wiretag, ft[0], $clone(opts, marshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$8, b, f, opts, p, $s};return $f; - }; })(ft, num), (function(ft, num) { return function $b(b, p, wtyp, f, opts) { - var {$24r, _r$8, b, f, opts, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = consumeGroupSlice(b, $clone(p, pointer), num[0], wtyp, ft[0], $clone(opts, unmarshalOptions)); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$8, b, f, opts, p, wtyp, $s};return $f; - }; })(ft, num), (function(ft, num) { return function $b(p, f) { - var {$24r, _r$8, f, p, $s, $r, $c} = $restore(this, {p, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = isInitMessageSlice($clone(p, pointer), ft[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$8, f, p, $s};return $f; - }; })(ft, num), mergeMessageSlice); - /* */ } return; } var $f = {$blk: makeGroupSliceFieldCoder, $c: true, $r, _r$5, _r$6, _r$7, fd, ft, funcs, mi, num, $s};return $f; - }; - sizeGroupSlice = function(p, messageType, tagsize, param) { - var {_i, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, m, messageType, n, p, param, s, tagsize, v, $s, $r, $c} = $restore(this, {p, messageType, tagsize, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - n = 0; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = messageType.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(v, pointer).AsValueOf(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = asMessage($clone(_r$7, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - m = _r$8; - _r$9 = proto.Size(m); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - n = n + ((($imul(2, tagsize)) + _r$9 >> 0)) >> 0; - _i++; - $s = 2; continue; - case 3: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeGroupSlice, $c: true, $r, _i, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, m, messageType, n, p, param, s, tagsize, v, $s};return $f; - }; - appendGroupSlice = function(b, p, wiretag, messageType, opts) { - var {_i, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, b, err, m, messageType, opts, p, s, v, wiretag, $s, $r, $c} = $restore(this, {b, p, wiretag, messageType, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - err = $ifaceNil; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = messageType.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(v, pointer).AsValueOf(_r$6); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = asMessage($clone(_r$7, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - m = _r$8; - b = protowire.AppendVarint(b, wiretag); - _r$9 = $clone($clone(opts, marshalOptions).Options(), proto.MarshalOptions).MarshalAppend(b, m); /* */ $s = 7; case 7: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - b = protowire.AppendVarint(b, new $Uint64(wiretag.$high + 0, wiretag.$low + 1)); - _i++; - $s = 2; continue; - case 3: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendGroupSlice, $c: true, $r, _i, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, b, err, m, messageType, opts, p, s, v, wiretag, $s};return $f; - }; - consumeGroupSlice = function(b, p, num, wtyp, goType, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, goType, mp, n, num, o, opts, out, p, wtyp, $s, $r, $c} = $restore(this, {b, p, num, wtyp, goType, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - if (!((wtyp === 3))) { - _tmp = $clone(out, unmarshalOutput); - _tmp$1 = errUnknown; - unmarshalOutput.copy(out, _tmp); - err = _tmp$1; - $s = -1; return [out, err]; - } - _tuple = protowire.ConsumeGroup(num, b); - b = _tuple[0]; - n = _tuple[1]; - if (n < 0) { - _tmp$2 = $clone(out, unmarshalOutput); - _tmp$3 = errDecode; - unmarshalOutput.copy(out, _tmp$2); - err = _tmp$3; - $s = -1; return [out, err]; - } - _r$5 = goType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - mp = _r$6; - _r$7 = asMessage($clone(mp, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone($clone(opts, unmarshalOptions).Options(), proto.UnmarshalOptions).UnmarshalState(new structType$4.ptr(new pragma.NoUnkeyedLiterals.ptr(), _r$8, b, 0, $ifaceNil, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - o = $clone(_tuple$1[0], structType$5); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = $clone(out, unmarshalOutput); - _tmp$5 = err; - unmarshalOutput.copy(out, _tmp$4); - err = _tmp$5; - $s = -1; return [out, err]; - } - $r = $clone(p, pointer).AppendPointerSlice($clone(pointerOfValue($clone(mp, reflect.Value)), pointer)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out.n = n; - out.initialized = !((((o.Flags & 1) >>> 0) === 0)); - _tmp$6 = $clone(out, unmarshalOutput); - _tmp$7 = $ifaceNil; - unmarshalOutput.copy(out, _tmp$6); - err = _tmp$7; - $s = -1; return [out, err]; - /* */ } return; } var $f = {$blk: consumeGroupSlice, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, goType, mp, n, num, o, opts, out, p, wtyp, $s};return $f; - }; - sizeGroupSliceInfo = function(p, f, opts) { - var {_i, _r$5, _r$6, _ref, f, n, opts, p, s, v, $s, $r, $c} = $restore(this, {p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - n = 0; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - _r$6 = f.mi.sizePointer($clone(v, pointer), $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - n = n + ((($imul(2, f.tagsize)) + _r$6 >> 0)) >> 0; - _i++; - $s = 2; continue; - case 3: - $s = -1; return n; - /* */ } return; } var $f = {$blk: sizeGroupSliceInfo, $c: true, $r, _i, _r$5, _r$6, _ref, f, n, opts, p, s, v, $s};return $f; - }; - appendGroupSliceInfo = function(b, p, f, opts) { - var {_i, _r$5, _r$6, _ref, _tuple, b, err, f, opts, p, s, v, x, $s, $r, $c} = $restore(this, {b, p, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(p, pointer).PointerSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - s = _r$5; - err = $ifaceNil; - _ref = s; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pointer); - b = protowire.AppendVarint(b, f.wiretag); - _r$6 = f.mi.marshalAppendPointer(b, $clone(v, pointer), $clone(opts, marshalOptions)); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [b, err]; - } - b = protowire.AppendVarint(b, (x = f.wiretag, new $Uint64(x.$high + 0, x.$low + 1))); - _i++; - $s = 2; continue; - case 3: - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: appendGroupSliceInfo, $c: true, $r, _i, _r$5, _r$6, _ref, _tuple, b, err, f, opts, p, s, v, x, $s};return $f; - }; - consumeGroupSliceInfo = function(b, p, wtyp, f, opts) { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, err, f, m, mp, opts, out, p, wtyp, $s, $r, $c} = $restore(this, {b, p, wtyp, f, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((wtyp === 3))) { - $s = -1; return [new unmarshalOutput.ptr(0, false), errUnknown]; - } - _r$5 = f.mi.GoReflectType.Elem(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = reflect.New(_r$5); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - m = _r$7; - _r$8 = pointerOfIface(m); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - mp = $clone(_r$8, pointer); - _r$9 = f.mi.unmarshalPointer(b, $clone(mp, pointer), f.num, $clone(opts, unmarshalOptions)); /* */ $s = 5; case 5: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - out = $clone(_tuple[0], unmarshalOutput); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [out, err]; - } - $r = $clone(p, pointer).AppendPointerSlice($clone(mp, pointer)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [out, $ifaceNil]; - /* */ } return; } var $f = {$blk: consumeGroupSliceInfo, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, b, err, f, m, mp, opts, out, p, wtyp, $s};return $f; - }; - asMessage = function(v) { - var {$24r, _r$5, _r$6, _r$7, _tuple, m, ok, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = $clone(v, reflect.Value).Interface(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = $assertType(_r$5, protoreflect.ProtoMessage, true); - m = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return m; - } - _r$6 = legacyWrapMessage($clone(v, reflect.Value)); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Interface(); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: asMessage, $c: true, $r, $24r, _r$5, _r$6, _r$7, _tuple, m, ok, v, $s};return $f; - }; - getExtensionFieldInfo = function(xt) { - var {$24r, _r$5, _r$6, _tuple, ok, xi, xt, $s, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(xt, ptrType$53, true); - xi = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r$5 = xi.lazyInit(); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return xi.info; - /* } */ case 2: - _r$6 = legacyLoadExtensionFieldInfo(xt); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: getExtensionFieldInfo, $c: true, $r, $24r, _r$5, _r$6, _tuple, ok, xi, xt, $s};return $f; - }; - legacyLoadExtensionFieldInfo = function(xt) { - var {_r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, e, e$1, ok, ok$1, xi, xt, $s, $r, $c} = $restore(this, {xt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = legacyExtensionFieldInfoCache.Load(xt); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - xi = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return $assertType(xi, ptrType$54); - } - _r$6 = xt.TypeDescriptor(); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = makeExtensionFieldInfo(_r$6); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - e = _r$7; - _r$8 = legacyMessageTypeCache.LoadOrStore(xt, e); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - e$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return $assertType(e$1, ptrType$54); - } - $s = -1; return e; - /* */ } return; } var $f = {$blk: legacyLoadExtensionFieldInfo, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, e, e$1, ok, ok$1, xi, xt, $s};return $f; - }; - makeExtensionFieldInfo = function(xd) { - var {_1, _arg, _arg$1, _entry, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, e, wiretag, xd, $s, $r, $c} = $restore(this, {xd}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wiretag = new $Uint64(0, 0); - _r$5 = xd.IsPacked(); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$5) { */ case 1: - _r$6 = xd.Number(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = _r$6; - _r$7 = xd.Kind(); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = (_entry = wireTypes[protoreflect.Kind.keyFor(_r$7)], _entry !== undefined ? _entry.v : 0); - _r$8 = protowire.EncodeTag(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - wiretag = _r$8; - $s = 3; continue; - /* } else { */ case 2: - _r$9 = xd.Number(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = protowire.EncodeTag(_r$9, 2); /* */ $s = 9; case 9: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - wiretag = _r$10; - /* } */ case 3: - _r$11 = encoderFuncsForValue(xd); /* */ $s = 10; case 10: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - e = new extensionFieldInfo.ptr(wiretag, protowire.SizeVarint(wiretag), false, $clone(_r$11, valueCoderFuncs), new validationInfo.ptr(ptrType$5.nil, 0, 0, 0, new $Uint64(0, 0))); - _r$12 = xd.Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _1 = _r$12; - /* */ if ((_1 === (11)) || (_1 === (10)) || (_1 === (14))) { $s = 13; continue; } - _r$13 = xd.Cardinality(); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (_r$13 === 3) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ((_1 === (11)) || (_1 === (10)) || (_1 === (14))) { */ case 13: - e.unmarshalNeedsValue = true; - $s = 15; continue; - /* } else if (_r$13 === 3) { */ case 14: - e.unmarshalNeedsValue = true; - /* } */ case 15: - case 11: - $s = -1; return e; - /* */ } return; } var $f = {$blk: makeExtensionFieldInfo, $c: true, $r, _1, _arg, _arg$1, _entry, _r$10, _r$11, _r$12, _r$13, _r$5, _r$6, _r$7, _r$8, _r$9, e, wiretag, xd, $s};return $f; - }; - ExtensionField.ptr.prototype.appendLazyBytes = function(xt, xi, num, wtyp, b) { - var b, f, num, wtyp, xi, xt; - f = this; - if (f.lazy === ptrType$40.nil) { - f.lazy = new lazyExtensionValue.ptr(0, new sync.Mutex.ptr(0, 0), xi, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), sliceType.nil, $throwNilPointerError); - } - f.typ = xt; - f.lazy.xi = xi; - f.lazy.b = protowire.AppendTag(f.lazy.b, num, wtyp); - f.lazy.b = $appendSlice(f.lazy.b, b); - }; - ExtensionField.prototype.appendLazyBytes = function(xt, xi, num, wtyp, b) { return this.$val.appendLazyBytes(xt, xi, num, wtyp, b); }; - ExtensionField.ptr.prototype.canLazy = function(xt) { - var f, x, xt; - f = this; - if ($interfaceIsEqual(f.typ, $ifaceNil)) { - return true; - } - if ($interfaceIsEqual(f.typ, xt) && !(f.lazy === ptrType$40.nil) && (atomic.LoadUint32((x = f.lazy, (x.$ptr_atomicOnce || (x.$ptr_atomicOnce = new ptrType$17(function() { return this.$target.atomicOnce; }, function($v) { this.$target.atomicOnce = $v; }, x))))) === 0)) { - return true; - } - return false; - }; - ExtensionField.prototype.canLazy = function(xt) { return this.$val.canLazy(xt); }; - ExtensionField.ptr.prototype.lazyInit = function() { - var {_r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, err, f, n, num, out, tag$1, val, wtyp, x, x$1, x$2, x$3, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - f = this; - $r = f.lazy.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(f.lazy.mu, "Unlock"), []]); - /* */ if (atomic.LoadUint32((x = f.lazy, (x.$ptr_atomicOnce || (x.$ptr_atomicOnce = new ptrType$17(function() { return this.$target.atomicOnce; }, function($v) { this.$target.atomicOnce = $v; }, x))))) === 1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (atomic.LoadUint32((x = f.lazy, (x.$ptr_atomicOnce || (x.$ptr_atomicOnce = new ptrType$17(function() { return this.$target.atomicOnce; }, function($v) { this.$target.atomicOnce = $v; }, x))))) === 1) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - /* */ if (!(f.lazy.xi === ptrType$54.nil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(f.lazy.xi === ptrType$54.nil)) { */ case 5: - b = f.lazy.b; - _r$5 = f.typ.New(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - val = $clone(_r$5, protoreflect.Value); - /* while (true) { */ case 9: - /* if (!(b.$length > 0)) { break; } */ if(!(b.$length > 0)) { $s = 10; continue; } - tag$1 = new $Uint64(0, 0); - /* */ if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { $s = 11; continue; } - /* */ if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) < 128) { */ case 11: - tag$1 = (new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))); - b = $subslice(b, 1); - $s = 14; continue; - /* } else if (b.$length >= 2 && (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) < 128) { */ case 12: - tag$1 = (x$1 = (new $Uint64(0, (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 127) >>> 0))), x$2 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 7), new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - b = $subslice(b, 2); - $s = 14; continue; - /* } else { */ case 13: - n = 0; - _tuple = protowire.ConsumeVarint(b); - tag$1 = _tuple[0]; - n = _tuple[1]; - /* */ if (n < 0) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (n < 0) { */ case 15: - _r$6 = errors.New("bad tag in lazy extension decoding", new sliceType$1([])); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(_r$6); - /* } */ case 16: - b = $subslice(b, n); - /* } */ case 14: - num = (($shiftRightUint64(tag$1, 3).$low >> 0)); - wtyp = ((new $Uint64(tag$1.$high & 0, (tag$1.$low & 7) >>> 0).$low << 24 >> 24)); - out = new unmarshalOutput.ptr(0, false); - err = $ifaceNil; - _r$7 = f.lazy.xi.funcs.unmarshal(b, $clone(val, protoreflect.Value), num, wtyp, $clone(lazyUnmarshalOptions, unmarshalOptions)); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - protoreflect.Value.copy(val, _tuple$1[0]); - unmarshalOutput.copy(out, _tuple$1[1]); - err = _tuple$1[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 19: - _r$8 = errors.New("decode failure in lazy extension decoding: %v", new sliceType$1([err])); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $panic(_r$8); - /* } */ case 20: - b = $subslice(b, out.n); - $s = 9; continue; - case 10: - protoreflect.Value.copy(f.lazy.value, val); - $s = 7; continue; - /* } else { */ case 6: - _r$9 = f.lazy.fn(); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - protoreflect.Value.copy(f.lazy.value, _r$9); - /* } */ case 7: - f.lazy.xi = ptrType$54.nil; - f.lazy.fn = $throwNilPointerError; - f.lazy.b = sliceType.nil; - atomic.StoreUint32((x$3 = f.lazy, (x$3.$ptr_atomicOnce || (x$3.$ptr_atomicOnce = new ptrType$17(function() { return this.$target.atomicOnce; }, function($v) { this.$target.atomicOnce = $v; }, x$3)))), 1); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ExtensionField.ptr.prototype.lazyInit, $c: true, $r, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, err, f, n, num, out, tag$1, val, wtyp, x, x$1, x$2, x$3, $s, $deferred};return $f; } } - }; - ExtensionField.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - ExtensionField.ptr.prototype.Set = function(t, v) { - var f, t, v; - f = this; - f.typ = t; - protoreflect.Value.copy(f.value, v); - f.lazy = ptrType$40.nil; - }; - ExtensionField.prototype.Set = function(t, v) { return this.$val.Set(t, v); }; - ExtensionField.ptr.prototype.SetLazy = function(t, fn) { - var f, fn, t; - f = this; - f.typ = t; - f.lazy = new lazyExtensionValue.ptr(0, new sync.Mutex.ptr(0, 0), ptrType$54.nil, new protoreflect.Value.ptr(arrayType$1.zero(), 0, new $Uint64(0, 0), "", sliceType.nil, $ifaceNil), sliceType.nil, fn); - }; - ExtensionField.prototype.SetLazy = function(t, fn) { return this.$val.SetLazy(t, fn); }; - ExtensionField.ptr.prototype.Value = function() { - var {f, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* */ if (!(f.lazy === ptrType$40.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f.lazy === ptrType$40.nil)) { */ case 1: - /* */ if (atomic.LoadUint32((x = f.lazy, (x.$ptr_atomicOnce || (x.$ptr_atomicOnce = new ptrType$17(function() { return this.$target.atomicOnce; }, function($v) { this.$target.atomicOnce = $v; }, x))))) === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (atomic.LoadUint32((x = f.lazy, (x.$ptr_atomicOnce || (x.$ptr_atomicOnce = new ptrType$17(function() { return this.$target.atomicOnce; }, function($v) { this.$target.atomicOnce = $v; }, x))))) === 0) { */ case 3: - $r = f.lazyInit(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $s = -1; return f.lazy.value; - /* } */ case 2: - $s = -1; return f.value; - /* */ } return; } var $f = {$blk: ExtensionField.ptr.prototype.Value, $c: true, $r, f, x, $s};return $f; - }; - ExtensionField.prototype.Value = function() { return this.$val.Value(); }; - ExtensionField.ptr.prototype.Type = function() { - var f; - f = this; - return f.typ; - }; - ExtensionField.prototype.Type = function() { return this.$val.Type(); }; - ExtensionField.ptr.prototype.IsSet = function() { - var f; - f = this; - return !($interfaceIsEqual(f.typ, $ifaceNil)); - }; - ExtensionField.prototype.IsSet = function() { return this.$val.IsSet(); }; - MessageInfo.ptr.prototype.checkInitialized = function(in$1) { - var {$24r, _r$5, _tuple, in$1, mi, ms, ok, p, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - p = new pointer.ptr(new reflect.Value.ptr(ptrType$7.nil, 0, 0)); - _tuple = $assertType(in$1.Message, ptrType, true); - ms = _tuple[0]; - ok = _tuple[1]; - if (ok) { - pointer.copy(p, ms.pointer()); - } else { - pointer.copy(p, $assertType(in$1.Message, ptrType$1).pointer()); - } - _r$5 = mi.checkInitializedPointer($clone(p, pointer)); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = [new structType$8.ptr(new pragma.NoUnkeyedLiterals.ptr()), _r$5]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.checkInitialized, $c: true, $r, $24r, _r$5, _tuple, in$1, mi, ms, ok, p, $s};return $f; - }; - MessageInfo.prototype.checkInitialized = function(in$1) { return this.$val.checkInitialized(in$1); }; - MessageInfo.ptr.prototype.checkInitializedPointer = function(p) { - var {$24r, $24r$1, _i, _i$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, e, err, err$1, f, f$1, fptr, mi, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - $r = mi.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!mi.coderMessageInfo.needsInitCheck) { - $s = -1; return $ifaceNil; - } - /* */ if ($clone(p, pointer).IsNil()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($clone(p, pointer).IsNil()) { */ case 2: - _ref = mi.coderMessageInfo.orderedCoderFields; - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (f.isRequired) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (f.isRequired) { */ case 6: - _r$5 = mi.Desc.Fields(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.ByNumber(f.num); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.FullName(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = errors.RequiredNotSet((_r$7)); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 12; case 12: return $24r; - /* } */ case 7: - _i++; - $s = 4; continue; - case 5: - $s = -1; return $ifaceNil; - /* } */ case 3: - /* */ if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($clone(mi.coderMessageInfo.extensionOffset, offset).IsValid()) { */ case 13: - _r$9 = $clone(p, pointer).Apply($clone(mi.coderMessageInfo.extensionOffset, offset)); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, pointer).Extensions(); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - e = _r$10; - _r$11 = mi.isInitExtensions(e); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err = _r$11; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 14: - _ref$1 = mi.coderMessageInfo.orderedCoderFields; - _i$1 = 0; - /* while (true) { */ case 18: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 19; continue; } - f$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (!f$1.isRequired && f$1.funcs.isInit === $throwNilPointerError) { - _i$1++; - /* continue; */ $s = 18; continue; - } - _r$12 = $clone(p, pointer).Apply($clone(f$1.offset, offset)); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - fptr = $clone(_r$12, pointer); - if (!(f$1.isPointer)) { _v = false; $s = 23; continue s; } - _r$13 = $clone(fptr, pointer).Elem(); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, pointer).IsNil(); /* */ $s = 25; case 25: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _v = _r$14; case 23: - /* */ if (_v) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_v) { */ case 21: - /* */ if (f$1.isRequired) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (f$1.isRequired) { */ case 26: - _r$15 = mi.Desc.Fields(); /* */ $s = 28; case 28: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.ByNumber(f$1.num); /* */ $s = 29; case 29: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = _r$16.FullName(); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = errors.RequiredNotSet((_r$17)); /* */ $s = 31; case 31: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$1 = _r$18; - $s = 32; case 32: return $24r$1; - /* } */ case 27: - _i$1++; - /* continue; */ $s = 18; continue; - /* } */ case 22: - if (f$1.funcs.isInit === $throwNilPointerError) { - _i$1++; - /* continue; */ $s = 18; continue; - } - _r$19 = f$1.funcs.isInit($clone(fptr, pointer), f$1); /* */ $s = 33; case 33: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - err$1 = _r$19; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _i$1++; - $s = 18; continue; - case 19: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.checkInitializedPointer, $c: true, $r, $24r, $24r$1, _i, _i$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _v, e, err, err$1, f, f$1, fptr, mi, p, $s};return $f; - }; - MessageInfo.prototype.checkInitializedPointer = function(p) { return this.$val.checkInitializedPointer(p); }; - MessageInfo.ptr.prototype.isInitExtensions = function(ext) { - var {_entry, _i, _keys, _r$5, _r$6, _r$7, _ref, ei, err, ext, mi, v, x, $s, $r, $c} = $restore(this, {ext}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mi = this; - if (ext === ptrType$36.nil) { - $s = -1; return $ifaceNil; - } - _ref = ext.$get(); - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - x = $clone(_entry.v, ExtensionField); - _r$5 = getExtensionFieldInfo($clone(x, ExtensionField).Type()); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ei = _r$5; - if (ei.funcs.isInit === $throwNilPointerError) { - _i++; - /* continue; */ $s = 1; continue; - } - _r$6 = x.Value(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - v = $clone(_r$6, protoreflect.Value); - if (!$clone(v, protoreflect.Value).IsValid()) { - _i++; - /* continue; */ $s = 1; continue; - } - _r$7 = ei.funcs.isInit($clone(v, protoreflect.Value)); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: MessageInfo.ptr.prototype.isInitExtensions, $c: true, $r, _entry, _i, _keys, _r$5, _r$6, _r$7, _ref, ei, err, ext, mi, v, x, $s};return $f; - }; - MessageInfo.prototype.isInitExtensions = function(ext) { return this.$val.isInitExtensions(ext); }; - needsInitCheck = function(md) { - var {$24r, $24r$1, _r$5, _r$6, _tuple, _tuple$1, has, md, ok, ok$1, v, $s, $deferred, $r, $c} = $restore(this, {md}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r$5 = needsInitCheckMap.Load(md); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - v = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _tuple$1 = $assertType(v, $Bool, true); - has = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok$1) { */ case 4: - $24r = has; - $s = 6; case 6: return $24r; - /* } */ case 5: - /* } */ case 3: - $r = needsInitCheckMu.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(needsInitCheckMu, "Unlock"), []]); - _r$6 = needsInitCheckLocked(md); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 9; case 9: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: needsInitCheck, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _tuple, _tuple$1, has, md, ok, ok$1, v, $s, $deferred};return $f; } } - }; - needsInitCheckLocked = function(md) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _v, fd, fmd, has, has$1, i, md, ok, ok$1, v, x, $s, $deferred, $r, $c} = $restore(this, {md}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - has = [has]; - md = [md]; - has[0] = false; - _r$5 = needsInitCheckMap.Load(md[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - v = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _tuple$1 = $assertType(v, $Bool, true); - has$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - has[0] = ok$1 && has$1; - $24r = has[0]; - $s = 4; case 4: return $24r; - /* } */ case 3: - $r = needsInitCheckMap.Store(md[0], (x = new structType$10.ptr(), new x.constructor.elem(x))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([(function(has, md) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = needsInitCheckMap.Store(md[0], new $Bool(has[0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(has, md), []]); - _r$6 = md[0].RequiredNumbers(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Len(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7 > 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$7 > 0) { */ case 6: - has[0] = true; - $24r$1 = has[0]; - $s = 10; case 10: return $24r$1; - /* } */ case 7: - _r$8 = md[0].ExtensionRanges(); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Len(); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (_r$9 > 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$9 > 0) { */ case 11: - has[0] = true; - $24r$2 = has[0]; - $s = 15; case 15: return $24r$2; - /* } */ case 12: - i = 0; - /* while (true) { */ case 16: - _r$10 = md[0].Fields(); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = _r$10.Len(); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* if (!(i < _r$11)) { break; } */ if(!(i < _r$11)) { $s = 17; continue; } - _r$12 = md[0].Fields(); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = _r$12.Get(i); /* */ $s = 21; case 21: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - fd = _r$13; - _r$14 = fd.IsMap(); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (_r$14) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_r$14) { */ case 22: - _r$15 = fd.MapValue(); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - fd = _r$15; - /* } */ case 23: - _r$16 = fd.Message(); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - fmd = _r$16; - if (!(!($interfaceIsEqual(fmd, $ifaceNil)))) { _v = false; $s = 29; continue s; } - _r$17 = needsInitCheckLocked(fmd); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _v = _r$17; case 29: - /* */ if (_v) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (_v) { */ case 27: - has[0] = true; - $24r$3 = has[0]; - $s = 31; case 31: return $24r$3; - /* } */ case 28: - i = i + (1) >> 0; - $s = 16; continue; - case 17: - has[0] = false; - $24r$4 = has[0]; - $s = 32; case 32: return $24r$4; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return has[0]; } if($curGoroutine.asleep) { var $f = {$blk: needsInitCheckLocked, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _v, fd, fmd, has, has$1, i, md, ok, ok$1, v, x, $s, $deferred};return $f; } } - }; - Export.ptr.prototype.NewError = function(f, x) { - var {$24r, _r$5, f, x, $s, $r, $c} = $restore(this, {f, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = errors.New(f, x); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.NewError, $c: true, $r, $24r, _r$5, f, x, $s};return $f; - }; - Export.prototype.NewError = function(f, x) { return this.$val.NewError(f, x); }; - Export.ptr.prototype.EnumOf = function(e) { - var {$24r, _r$5, _r$6, _ref, e, e$1, e$2, e$3, $s, $r, $c} = $restore(this, {e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = e; - /* */ if (_ref === $ifaceNil) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoreflect.Enum, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_ref === $ifaceNil) { */ case 1: - e$1 = _ref; - $s = -1; return $ifaceNil; - /* } else if ($assertType(_ref, protoreflect.Enum, true)[1]) { */ case 2: - e$2 = _ref; - $s = -1; return e$2; - /* } else { */ case 3: - e$3 = _ref; - _r$5 = reflect.ValueOf(e$3); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = legacyWrapEnum($clone(_r$5, reflect.Value)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 7; case 7: return $24r; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.EnumOf, $c: true, $r, $24r, _r$5, _r$6, _ref, e, e$1, e$2, e$3, $s};return $f; - }; - Export.prototype.EnumOf = function(e) { return this.$val.EnumOf(e); }; - Export.ptr.prototype.EnumDescriptorOf = function(e) { - var {$24r, $24r$1, _r$5, _r$6, _ref, e, e$1, e$2, e$3, $s, $r, $c} = $restore(this, {e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = e; - /* */ if (_ref === $ifaceNil) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoreflect.Enum, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_ref === $ifaceNil) { */ case 1: - e$1 = _ref; - $s = -1; return $ifaceNil; - /* } else if ($assertType(_ref, protoreflect.Enum, true)[1]) { */ case 2: - e$2 = _ref; - _r$5 = e$2.Descriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 6; case 6: return $24r; - /* } else { */ case 3: - e$3 = _ref; - _r$6 = LegacyLoadEnumDesc(reflect.TypeOf(e$3)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 8; case 8: return $24r$1; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.EnumDescriptorOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _ref, e, e$1, e$2, e$3, $s};return $f; - }; - Export.prototype.EnumDescriptorOf = function(e) { return this.$val.EnumDescriptorOf(e); }; - Export.ptr.prototype.EnumTypeOf = function(e) { - var {$24r, $24r$1, _r$5, _r$6, _ref, e, e$1, e$2, e$3, $s, $r, $c} = $restore(this, {e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = e; - /* */ if (_ref === $ifaceNil) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoreflect.Enum, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_ref === $ifaceNil) { */ case 1: - e$1 = _ref; - $s = -1; return $ifaceNil; - /* } else if ($assertType(_ref, protoreflect.Enum, true)[1]) { */ case 2: - e$2 = _ref; - _r$5 = e$2.Type(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 6; case 6: return $24r; - /* } else { */ case 3: - e$3 = _ref; - _r$6 = legacyLoadEnumType(reflect.TypeOf(e$3)); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 8; case 8: return $24r$1; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.EnumTypeOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _ref, e, e$1, e$2, e$3, $s};return $f; - }; - Export.prototype.EnumTypeOf = function(e) { return this.$val.EnumTypeOf(e); }; - Export.ptr.prototype.EnumStringOf = function(ed, n) { - var {$24r, _r$5, _r$6, _r$7, ed, ev, n, $s, $r, $c} = $restore(this, {ed, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = ed.Values(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = _r$5.ByNumber(n); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ev = _r$6; - /* */ if (!($interfaceIsEqual(ev, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(ev, $ifaceNil))) { */ case 3: - _r$7 = ev.Name(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = (_r$7); - $s = 6; case 6: return $24r; - /* } */ case 4: - $s = -1; return strconv.Itoa(((n >> 0))); - /* */ } return; } var $f = {$blk: Export.ptr.prototype.EnumStringOf, $c: true, $r, $24r, _r$5, _r$6, _r$7, ed, ev, n, $s};return $f; - }; - Export.prototype.EnumStringOf = function(ed, n) { return this.$val.EnumStringOf(ed, n); }; - legacyMessageWrapper.ptr.prototype.Reset = function() { - var {m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - $r = proto.Reset(m.m); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: legacyMessageWrapper.ptr.prototype.Reset, $c: true, $r, m, $s};return $f; - }; - legacyMessageWrapper.prototype.Reset = function() { return this.$val.Reset(); }; - legacyMessageWrapper.ptr.prototype.String = function() { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - _r$5 = new Export.ptr().MessageStringOf(m.m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: legacyMessageWrapper.ptr.prototype.String, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - legacyMessageWrapper.prototype.String = function() { return this.$val.String(); }; - legacyMessageWrapper.ptr.prototype.ProtoMessage = function() { - var m; - m = this; - }; - legacyMessageWrapper.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Export.ptr.prototype.ProtoMessageV1Of = function(m) { - var {$24r, _r$5, _r$6, _r$7, _ref, m, mv, mv$1, mv$2, mv$3, mv$4, x, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = m; - /* */ if (_ref === $ifaceNil) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoiface.MessageV1, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, unwrapper, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, protoreflect.ProtoMessage, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_ref === $ifaceNil) { */ case 1: - mv = _ref; - $s = -1; return $ifaceNil; - /* } else if ($assertType(_ref, protoiface.MessageV1, true)[1]) { */ case 2: - mv$1 = _ref; - $s = -1; return mv$1; - /* } else if ($assertType(_ref, unwrapper, true)[1]) { */ case 3: - mv$2 = _ref; - _r$5 = mv$2.protoUnwrap(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = new Export.ptr().ProtoMessageV1Of(_r$5); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 9; case 9: return $24r; - /* } else if ($assertType(_ref, protoreflect.ProtoMessage, true)[1]) { */ case 4: - mv$3 = _ref; - $s = -1; return (x = new legacyMessageWrapper.ptr(mv$3), new x.constructor.elem(x)); - /* } else { */ case 5: - mv$4 = _ref; - _r$7 = fmt.Sprintf("message %T is neither a v1 or v2 Message", new sliceType$1([m])); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $panic(new $String(_r$7)); - /* } */ case 6: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.ProtoMessageV1Of, $c: true, $r, $24r, _r$5, _r$6, _r$7, _ref, m, mv, mv$1, mv$2, mv$3, mv$4, x, $s};return $f; - }; - Export.prototype.ProtoMessageV1Of = function(m) { return this.$val.ProtoMessageV1Of(m); }; - Export.ptr.prototype.protoMessageV2Of = function(m) { - var {_r$5, _ref, m, mv, mv$1, mv$2, mv$3, mv$4, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = m; - /* */ if (_ref === $ifaceNil) { $s = 1; continue; } - /* */ if ($assertType(_ref, protoreflect.ProtoMessage, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, legacyMessageWrapper, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, protoiface.MessageV1, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_ref === $ifaceNil) { */ case 1: - mv = _ref; - $s = -1; return $ifaceNil; - /* } else if ($assertType(_ref, protoreflect.ProtoMessage, true)[1]) { */ case 2: - mv$1 = _ref; - $s = -1; return mv$1; - /* } else if ($assertType(_ref, legacyMessageWrapper, true)[1]) { */ case 3: - mv$2 = $clone(_ref.$val, legacyMessageWrapper); - $s = -1; return mv$2.m; - /* } else if ($assertType(_ref, protoiface.MessageV1, true)[1]) { */ case 4: - mv$3 = _ref; - $s = -1; return $ifaceNil; - /* } else { */ case 5: - mv$4 = _ref; - _r$5 = fmt.Sprintf("message %T is neither a v1 or v2 Message", new sliceType$1([m])); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 6: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.protoMessageV2Of, $c: true, $r, _r$5, _ref, m, mv, mv$1, mv$2, mv$3, mv$4, $s};return $f; - }; - Export.prototype.protoMessageV2Of = function(m) { return this.$val.protoMessageV2Of(m); }; - Export.ptr.prototype.ProtoMessageV2Of = function(m) { - var {$24r, _r$5, _r$6, _r$7, _r$8, m, mv, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$5 = $clone((new Export.ptr()), Export).protoMessageV2Of(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mv = _r$5; - if (!($interfaceIsEqual(mv, $ifaceNil))) { - $s = -1; return mv; - } - _r$6 = reflect.ValueOf(m); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = legacyWrapMessage($clone(_r$6, reflect.Value)); /* */ $s = 3; case 3: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Interface(); /* */ $s = 4; case 4: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.ProtoMessageV2Of, $c: true, $r, $24r, _r$5, _r$6, _r$7, _r$8, m, mv, $s};return $f; - }; - Export.prototype.ProtoMessageV2Of = function(m) { return this.$val.ProtoMessageV2Of(m); }; - Export.ptr.prototype.MessageOf = function(m) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$5 = $clone((new Export.ptr()), Export).protoMessageV2Of(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mv = _r$5; - /* */ if (!($interfaceIsEqual(mv, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(mv, $ifaceNil))) { */ case 2: - _r$6 = mv.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$7 = reflect.ValueOf(m); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = legacyWrapMessage($clone(_r$7, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.MessageOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, $s};return $f; - }; - Export.prototype.MessageOf = function(m) { return this.$val.MessageOf(m); }; - Export.ptr.prototype.MessageDescriptorOf = function(m) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$5 = $clone((new Export.ptr()), Export).protoMessageV2Of(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mv = _r$5; - /* */ if (!($interfaceIsEqual(mv, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(mv, $ifaceNil))) { */ case 2: - _r$6 = mv.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Descriptor(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$8 = LegacyLoadMessageDesc(reflect.TypeOf(m)); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.MessageDescriptorOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, $s};return $f; - }; - Export.prototype.MessageDescriptorOf = function(m) { return this.$val.MessageDescriptorOf(m); }; - Export.ptr.prototype.MessageTypeOf = function(m) { - var {$24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(m, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$5 = $clone((new Export.ptr()), Export).protoMessageV2Of(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mv = _r$5; - /* */ if (!($interfaceIsEqual(mv, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(mv, $ifaceNil))) { */ case 2: - _r$6 = mv.ProtoReflect(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = _r$6.Type(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$8 = legacyLoadMessageType(reflect.TypeOf(m), ""); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.MessageTypeOf, $c: true, $r, $24r, $24r$1, _r$5, _r$6, _r$7, _r$8, m, mv, $s};return $f; - }; - Export.prototype.MessageTypeOf = function(m) { return this.$val.MessageTypeOf(m); }; - Export.ptr.prototype.MessageStringOf = function(m) { - var {$24r, _r$5, m, $s, $r, $c} = $restore(this, {m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = new prototext.MarshalOptions.ptr(new pragma.NoUnkeyedLiterals.ptr(), false, "", false, false, false, false, $ifaceNil).Format(m); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Export.ptr.prototype.MessageStringOf, $c: true, $r, $24r, _r$5, m, $s};return $f; - }; - Export.prototype.MessageStringOf = function(m) { return this.$val.MessageStringOf(m); }; - weakFields.methods = [{prop: "get", name: "get", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protowire.Number], [protoreflect.ProtoMessage, $Bool], false)}]; - ptrType$34.methods = [{prop: "set", name: "set", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protowire.Number, protoreflect.ProtoMessage], [], false)}, {prop: "clear", name: "clear", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protowire.Number], [], false)}]; - ValidationStatus.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - offset.methods = [{prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; - pointer.methods = [{prop: "IsNil", name: "IsNil", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Apply", name: "Apply", pkg: "", typ: $funcType([offset], [pointer], false)}, {prop: "AsValueOf", name: "AsValueOf", pkg: "", typ: $funcType([reflect.Type], [reflect.Value], false)}, {prop: "AsIfaceOf", name: "AsIfaceOf", pkg: "", typ: $funcType([reflect.Type], [$emptyInterface], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([], [ptrType$8], false)}, {prop: "BoolPtr", name: "BoolPtr", pkg: "", typ: $funcType([], [ptrType$9], false)}, {prop: "BoolSlice", name: "BoolSlice", pkg: "", typ: $funcType([], [ptrType$10], false)}, {prop: "Int32", name: "Int32", pkg: "", typ: $funcType([], [ptrType$11], false)}, {prop: "Int32Ptr", name: "Int32Ptr", pkg: "", typ: $funcType([], [ptrType$12], false)}, {prop: "Int32Slice", name: "Int32Slice", pkg: "", typ: $funcType([], [ptrType$13], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [ptrType$14], false)}, {prop: "Int64Ptr", name: "Int64Ptr", pkg: "", typ: $funcType([], [ptrType$15], false)}, {prop: "Int64Slice", name: "Int64Slice", pkg: "", typ: $funcType([], [ptrType$16], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([], [ptrType$17], false)}, {prop: "Uint32Ptr", name: "Uint32Ptr", pkg: "", typ: $funcType([], [ptrType$18], false)}, {prop: "Uint32Slice", name: "Uint32Slice", pkg: "", typ: $funcType([], [ptrType$19], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [ptrType$20], false)}, {prop: "Uint64Ptr", name: "Uint64Ptr", pkg: "", typ: $funcType([], [ptrType$21], false)}, {prop: "Uint64Slice", name: "Uint64Slice", pkg: "", typ: $funcType([], [ptrType$22], false)}, {prop: "Float32", name: "Float32", pkg: "", typ: $funcType([], [ptrType$23], false)}, {prop: "Float32Ptr", name: "Float32Ptr", pkg: "", typ: $funcType([], [ptrType$24], false)}, {prop: "Float32Slice", name: "Float32Slice", pkg: "", typ: $funcType([], [ptrType$25], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [ptrType$26], false)}, {prop: "Float64Ptr", name: "Float64Ptr", pkg: "", typ: $funcType([], [ptrType$27], false)}, {prop: "Float64Slice", name: "Float64Slice", pkg: "", typ: $funcType([], [ptrType$28], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [ptrType$29], false)}, {prop: "StringPtr", name: "StringPtr", pkg: "", typ: $funcType([], [ptrType$30], false)}, {prop: "StringSlice", name: "StringSlice", pkg: "", typ: $funcType([], [ptrType$31], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [ptrType$3], false)}, {prop: "BytesPtr", name: "BytesPtr", pkg: "", typ: $funcType([], [ptrType$32], false)}, {prop: "BytesSlice", name: "BytesSlice", pkg: "", typ: $funcType([], [ptrType$33], false)}, {prop: "WeakFields", name: "WeakFields", pkg: "", typ: $funcType([], [ptrType$34], false)}, {prop: "Extensions", name: "Extensions", pkg: "", typ: $funcType([], [ptrType$36], false)}, {prop: "Elem", name: "Elem", pkg: "", typ: $funcType([], [pointer], false)}, {prop: "PointerSlice", name: "PointerSlice", pkg: "", typ: $funcType([], [sliceType$12], false)}, {prop: "AppendPointerSlice", name: "AppendPointerSlice", pkg: "", typ: $funcType([pointer], [], false)}, {prop: "SetPointer", name: "SetPointer", pkg: "", typ: $funcType([pointer], [], false)}]; - ptrType$55.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([ptrType$5], [ptrType$1], false)}]; - ptrType$39.methods = [{prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$17], [], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.ExtensionType], [$Bool], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([protoreflect.ExtensionType], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([protoreflect.ExtensionType], [protoreflect.Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([protoreflect.ExtensionType, protoreflect.Value], [], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([protoreflect.ExtensionType], [protoreflect.Value], false)}]; - ptrType.methods = [{prop: "pointer", name: "pointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [pointer], false)}, {prop: "messageInfo", name: "messageInfo", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [ptrType$5], false)}, {prop: "LoadMessageInfo", name: "LoadMessageInfo", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "StoreMessageInfo", name: "StoreMessageInfo", pkg: "", typ: $funcType([ptrType$5], [], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [protoreflect.MessageType], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}, {prop: "ProtoMethods", name: "ProtoMethods", pkg: "", typ: $funcType([], [ptrType$56], false)}, {prop: "ProtoMessageInfo", name: "ProtoMessageInfo", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$17], [], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [$Bool], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([protoreflect.FieldDescriptor, protoreflect.Value], [], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "NewField", name: "NewField", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "WhichOneof", name: "WhichOneof", pkg: "", typ: $funcType([protoreflect.OneofDescriptor], [protoreflect.FieldDescriptor], false)}, {prop: "GetUnknown", name: "GetUnknown", pkg: "", typ: $funcType([], [protoreflect.RawFields], false)}, {prop: "SetUnknown", name: "SetUnknown", pkg: "", typ: $funcType([protoreflect.RawFields], [], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$1.methods = [{prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [protoreflect.MessageType], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}, {prop: "ProtoMethods", name: "ProtoMethods", pkg: "", typ: $funcType([], [ptrType$56], false)}, {prop: "ProtoMessageInfo", name: "ProtoMessageInfo", pkg: "", typ: $funcType([], [ptrType$5], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$17], [], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [$Bool], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([protoreflect.FieldDescriptor, protoreflect.Value], [], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "NewField", name: "NewField", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "WhichOneof", name: "WhichOneof", pkg: "", typ: $funcType([protoreflect.OneofDescriptor], [protoreflect.FieldDescriptor], false)}, {prop: "GetUnknown", name: "GetUnknown", pkg: "", typ: $funcType([], [protoreflect.RawFields], false)}, {prop: "SetUnknown", name: "SetUnknown", pkg: "", typ: $funcType([protoreflect.RawFields], [], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "pointer", name: "pointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [pointer], false)}, {prop: "messageInfo", name: "messageInfo", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [ptrType$5], false)}]; - ptrType$2.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}]; - ptrType$5.methods = [{prop: "validate", name: "validate", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([sliceType, protowire.Number, unmarshalOptions], [unmarshalOutput, ValidationStatus], false)}, {prop: "makeReflectFuncs", name: "makeReflectFuncs", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([reflect.Type, structInfo], [], false)}, {prop: "makeKnownFieldsFunc", name: "makeKnownFieldsFunc", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structInfo], [], false)}, {prop: "makeUnknownFieldsFunc", name: "makeUnknownFieldsFunc", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([reflect.Type, structInfo], [], false)}, {prop: "makeExtensionFieldsFunc", name: "makeExtensionFieldsFunc", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([reflect.Type, structInfo], [], false)}, {prop: "makeFieldTypes", name: "makeFieldTypes", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structInfo], [], false)}, {prop: "MessageOf", name: "MessageOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.Message], false)}, {prop: "checkField", name: "checkField", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protoreflect.FieldDescriptor], [ptrType$37, protoreflect.ExtensionType], false)}, {prop: "init", name: "init", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [], false)}, {prop: "initOnce", name: "initOnce", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [], false)}, {prop: "getPointer", name: "getPointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protoreflect.Message], [pointer, $Bool], false)}, {prop: "makeStructInfo", name: "makeStructInfo", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([reflect.Type], [structInfo], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([$Int], [protoreflect.EnumType], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([$Int], [protoreflect.MessageType], false)}, {prop: "merge", name: "merge", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structType$6], [structType$5], false)}, {prop: "mergePointer", name: "mergePointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([pointer, pointer, mergeOptions], [], false)}, {prop: "size", name: "size", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structType], [structType$1], false)}, {prop: "sizePointer", name: "sizePointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([pointer, marshalOptions], [$Int], false)}, {prop: "sizePointerSlow", name: "sizePointerSlow", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([pointer, marshalOptions], [$Int], false)}, {prop: "marshal", name: "marshal", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structType$2], [structType$3, $error], false)}, {prop: "marshalAppendPointer", name: "marshalAppendPointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([sliceType, pointer, marshalOptions], [sliceType, $error], false)}, {prop: "sizeExtensions", name: "sizeExtensions", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([ptrType$36, marshalOptions], [$Int], false)}, {prop: "appendExtensions", name: "appendExtensions", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([sliceType, ptrType$36, marshalOptions], [sliceType, $error], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structType$4], [structType$5, $error], false)}, {prop: "unmarshalPointer", name: "unmarshalPointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([sliceType, pointer, protowire.Number, unmarshalOptions], [unmarshalOutput, $error], false)}, {prop: "unmarshalExtension", name: "unmarshalExtension", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([sliceType, protowire.Number, protowire.Type, mapType$1, unmarshalOptions], [unmarshalOutput, $error], false)}, {prop: "makeCoderMethods", name: "makeCoderMethods", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([reflect.Type, structInfo], [], false)}, {prop: "getUnknownBytes", name: "getUnknownBytes", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([pointer], [ptrType$3], false)}, {prop: "mutableUnknownBytes", name: "mutableUnknownBytes", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([pointer], [ptrType$3], false)}, {prop: "initOneofFieldCoders", name: "initOneofFieldCoders", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protoreflect.OneofDescriptor, structInfo], [], false)}, {prop: "checkInitialized", name: "checkInitialized", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([structType$7], [structType$8, $error], false)}, {prop: "checkInitializedPointer", name: "checkInitializedPointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([pointer], [$error], false)}, {prop: "isInitExtensions", name: "isInitExtensions", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([ptrType$36], [$error], false)}]; - mapEntryType.methods = [{prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([$Int], [protoreflect.EnumType], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([$Int], [protoreflect.MessageType], false)}]; - mergeOptions.methods = [{prop: "Merge", name: "Merge", pkg: "", typ: $funcType([protoreflect.ProtoMessage, protoreflect.ProtoMessage], [], false)}]; - placeholderEnumValues.methods = [{prop: "ByNumber", name: "ByNumber", pkg: "", typ: $funcType([protoreflect.EnumNumber], [protoreflect.EnumValueDescriptor], false)}]; - aberrantMessageType.methods = [{prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "GoType", name: "GoType", pkg: "", typ: $funcType([], [reflect.Type], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}]; - aberrantMessage.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [protoreflect.MessageType], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Interface", name: "Interface", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$17], [], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [$Bool], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([protoreflect.FieldDescriptor, protoreflect.Value], [], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "NewField", name: "NewField", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [protoreflect.Value], false)}, {prop: "WhichOneof", name: "WhichOneof", pkg: "", typ: $funcType([protoreflect.OneofDescriptor], [protoreflect.FieldDescriptor], false)}, {prop: "GetUnknown", name: "GetUnknown", pkg: "", typ: $funcType([], [protoreflect.RawFields], false)}, {prop: "SetUnknown", name: "SetUnknown", pkg: "", typ: $funcType([protoreflect.RawFields], [], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ProtoMethods", name: "ProtoMethods", pkg: "", typ: $funcType([], [ptrType$56], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}]; - resolverOnly.methods = [{prop: "FindFileByPath", name: "FindFileByPath", pkg: "", typ: $funcType([$String], [protoreflect.FileDescriptor, $error], false)}, {prop: "FindDescriptorByName", name: "FindDescriptorByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.Descriptor, $error], false)}, {prop: "RegisterFile", name: "RegisterFile", pkg: "", typ: $funcType([protoreflect.FileDescriptor], [$error], false)}]; - placeholderExtension.methods = [{prop: "ParentFile", name: "ParentFile", pkg: "", typ: $funcType([], [protoreflect.FileDescriptor], false)}, {prop: "Parent", name: "Parent", pkg: "", typ: $funcType([], [protoreflect.Descriptor], false)}, {prop: "Index", name: "Index", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Syntax", name: "Syntax", pkg: "", typ: $funcType([], [protoreflect.Syntax], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [protoreflect.Name], false)}, {prop: "FullName", name: "FullName", pkg: "", typ: $funcType([], [protoreflect.FullName], false)}, {prop: "IsPlaceholder", name: "IsPlaceholder", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Options", name: "Options", pkg: "", typ: $funcType([], [protoreflect.ProtoMessage], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protowire.Number], false)}, {prop: "Cardinality", name: "Cardinality", pkg: "", typ: $funcType([], [protoreflect.Cardinality], false)}, {prop: "Kind", name: "Kind", pkg: "", typ: $funcType([], [protoreflect.Kind], false)}, {prop: "HasJSONName", name: "HasJSONName", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "JSONName", name: "JSONName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TextName", name: "TextName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "HasPresence", name: "HasPresence", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasOptionalKeyword", name: "HasOptionalKeyword", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsExtension", name: "IsExtension", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsWeak", name: "IsWeak", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPacked", name: "IsPacked", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsList", name: "IsList", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMap", name: "IsMap", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "MapKey", name: "MapKey", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}, {prop: "MapValue", name: "MapValue", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}, {prop: "HasDefault", name: "HasDefault", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Default", name: "Default", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "DefaultEnumValue", name: "DefaultEnumValue", pkg: "", typ: $funcType([], [protoreflect.EnumValueDescriptor], false)}, {prop: "ContainingOneof", name: "ContainingOneof", pkg: "", typ: $funcType([], [protoreflect.OneofDescriptor], false)}, {prop: "ContainingMessage", name: "ContainingMessage", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "Enum", name: "Enum", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptor], false)}, {prop: "Message", name: "Message", pkg: "", typ: $funcType([], [protoreflect.MessageDescriptor], false)}, {prop: "ProtoType", name: "ProtoType", pkg: "", typ: $funcType([protoreflect.FieldDescriptor], [], false)}, {prop: "ProtoInternal", name: "ProtoInternal", pkg: "", typ: $funcType([pragma.DoNotImplement], [], false)}]; - ptrType$58.methods = [{prop: "New", name: "New", pkg: "", typ: $funcType([protoreflect.EnumNumber], [protoreflect.Enum], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptor], false)}]; - ptrType$4.methods = [{prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptor], false)}, {prop: "Type", name: "Type", pkg: "", typ: $funcType([], [protoreflect.EnumType], false)}, {prop: "Number", name: "Number", pkg: "", typ: $funcType([], [protoreflect.EnumNumber], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Enum], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}]; - ptrType$53.methods = [{prop: "initToLegacy", name: "initToLegacy", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [], false)}, {prop: "initFromLegacy", name: "initFromLegacy", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "ValueOf", name: "ValueOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.Value], false)}, {prop: "InterfaceOf", name: "InterfaceOf", pkg: "", typ: $funcType([protoreflect.Value], [$emptyInterface], false)}, {prop: "IsValidValue", name: "IsValidValue", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidInterface", name: "IsValidInterface", pkg: "", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "TypeDescriptor", name: "TypeDescriptor", pkg: "", typ: $funcType([], [protoreflect.ExtensionTypeDescriptor], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [Converter], false)}, {prop: "lazyInitSlow", name: "lazyInitSlow", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [], false)}]; - ptrType$59.methods = [{prop: "Type", name: "Type", pkg: "", typ: $funcType([], [protoreflect.ExtensionType], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.FieldDescriptor], false)}]; - ptrType$60.methods = [{prop: "New", name: "New", pkg: "", typ: $funcType([protoreflect.EnumNumber], [protoreflect.Enum], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [protoreflect.EnumDescriptor], false)}]; - marshalOptions.methods = [{prop: "Options", name: "Options", pkg: "", typ: $funcType([], [proto.MarshalOptions], false)}, {prop: "Deterministic", name: "Deterministic", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "UseCachedSize", name: "UseCachedSize", pkg: "", typ: $funcType([], [$Bool], false)}]; - unmarshalOptions.methods = [{prop: "Options", name: "Options", pkg: "", typ: $funcType([], [proto.UnmarshalOptions], false)}, {prop: "DiscardUnknown", name: "DiscardUnknown", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsDefault", name: "IsDefault", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$52.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$49.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([protoreflect.MapKey], [$Bool], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([protoreflect.MapKey], [protoreflect.Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([protoreflect.MapKey, protoreflect.Value], [], false)}, {prop: "Clear", name: "Clear", pkg: "", typ: $funcType([protoreflect.MapKey], [], false)}, {prop: "Mutable", name: "Mutable", pkg: "", typ: $funcType([protoreflect.MapKey], [protoreflect.Value], false)}, {prop: "Range", name: "Range", pkg: "", typ: $funcType([funcType$18], [], false)}, {prop: "NewValue", name: "NewValue", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}]; - ptrType$61.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$62.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$51.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int], [protoreflect.Value], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$Int, protoreflect.Value], [], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([protoreflect.Value], [], false)}, {prop: "AppendMutable", name: "AppendMutable", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Truncate", name: "Truncate", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "NewElement", name: "NewElement", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}]; - ptrType$63.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$64.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$65.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$66.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$67.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$68.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$69.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$70.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$71.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$72.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - ptrType$50.methods = [{prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "isNonPointer", name: "isNonPointer", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$Bool], false)}]; - errInvalidUTF8.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "InvalidUTF8", name: "InvalidUTF8", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - ExtensionField.methods = [{prop: "Type", name: "Type", pkg: "", typ: $funcType([], [protoreflect.ExtensionType], false)}, {prop: "IsSet", name: "IsSet", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$73.methods = [{prop: "appendLazyBytes", name: "appendLazyBytes", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protoreflect.ExtensionType, ptrType$54, protowire.Number, protowire.Type, sliceType], [], false)}, {prop: "canLazy", name: "canLazy", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([protoreflect.ExtensionType], [$Bool], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([protoreflect.ExtensionType, protoreflect.Value], [], false)}, {prop: "SetLazy", name: "SetLazy", pkg: "", typ: $funcType([protoreflect.ExtensionType, funcType$12], [], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]; - Export.methods = [{prop: "HasWeak", name: "HasWeak", pkg: "", typ: $funcType([mapType, protowire.Number], [$Bool], false)}, {prop: "ClearWeak", name: "ClearWeak", pkg: "", typ: $funcType([ptrType$35, protowire.Number], [], false)}, {prop: "GetWeak", name: "GetWeak", pkg: "", typ: $funcType([mapType, protowire.Number, protoreflect.FullName], [protoreflect.ProtoMessage], false)}, {prop: "SetWeak", name: "SetWeak", pkg: "", typ: $funcType([ptrType$35, protowire.Number, protoreflect.FullName, protoreflect.ProtoMessage], [], false)}, {prop: "MessageStateOf", name: "MessageStateOf", pkg: "", typ: $funcType([Pointer], [ptrType], false)}, {prop: "LegacyEnumName", name: "LegacyEnumName", pkg: "", typ: $funcType([protoreflect.EnumDescriptor], [$String], false)}, {prop: "LegacyMessageTypeOf", name: "LegacyMessageTypeOf", pkg: "", typ: $funcType([protoiface.MessageV1, protoreflect.FullName], [protoreflect.MessageType], false)}, {prop: "UnmarshalJSONEnum", name: "UnmarshalJSONEnum", pkg: "", typ: $funcType([protoreflect.EnumDescriptor, sliceType], [protoreflect.EnumNumber, $error], false)}, {prop: "CompressGZIP", name: "CompressGZIP", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "NewError", name: "NewError", pkg: "", typ: $funcType([$String, sliceType$1], [$error], true)}, {prop: "EnumOf", name: "EnumOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.Enum], false)}, {prop: "EnumDescriptorOf", name: "EnumDescriptorOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.EnumDescriptor], false)}, {prop: "EnumTypeOf", name: "EnumTypeOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.EnumType], false)}, {prop: "EnumStringOf", name: "EnumStringOf", pkg: "", typ: $funcType([protoreflect.EnumDescriptor, protoreflect.EnumNumber], [$String], false)}, {prop: "ProtoMessageV1Of", name: "ProtoMessageV1Of", pkg: "", typ: $funcType([$emptyInterface], [protoiface.MessageV1], false)}, {prop: "protoMessageV2Of", name: "protoMessageV2Of", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([$emptyInterface], [protoreflect.ProtoMessage], false)}, {prop: "ProtoMessageV2Of", name: "ProtoMessageV2Of", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.ProtoMessage], false)}, {prop: "MessageOf", name: "MessageOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.Message], false)}, {prop: "MessageDescriptorOf", name: "MessageDescriptorOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.MessageDescriptor], false)}, {prop: "MessageTypeOf", name: "MessageTypeOf", pkg: "", typ: $funcType([$emptyInterface], [protoreflect.MessageType], false)}, {prop: "MessageStringOf", name: "MessageStringOf", pkg: "", typ: $funcType([protoreflect.ProtoMessage], [$String], false)}]; - legacyMessageWrapper.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}]; - weakFields.init($Int32, protoreflect.ProtoMessage); - validationInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "mi", name: "mi", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "typ", name: "typ", embedded: false, exported: false, typ: validationType, tag: ""}, {prop: "keyType", name: "keyType", embedded: false, exported: false, typ: validationType, tag: ""}, {prop: "valType", name: "valType", embedded: false, exported: false, typ: validationType, tag: ""}, {prop: "requiredBit", name: "requiredBit", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - Pointer.init([]); - offset.init("google.golang.org/protobuf/internal/impl", [{prop: "index", name: "index", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "export$1", name: "export", embedded: false, exported: false, typ: exporter, tag: ""}]); - pointer.init("google.golang.org/protobuf/internal/impl", [{prop: "v", name: "v", embedded: false, exported: false, typ: reflect.Value, tag: ""}]); - atomicNilMessage.init("google.golang.org/protobuf/internal/impl", [{prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: messageReflectWrapper, tag: ""}]); - fieldInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "fieldDesc", name: "fieldDesc", embedded: false, exported: false, typ: protoreflect.FieldDescriptor, tag: ""}, {prop: "has", name: "has", embedded: false, exported: false, typ: funcType$7, tag: ""}, {prop: "clear", name: "clear", embedded: false, exported: false, typ: funcType$8, tag: ""}, {prop: "get", name: "get", embedded: false, exported: false, typ: funcType$9, tag: ""}, {prop: "set", name: "set", embedded: false, exported: false, typ: funcType$10, tag: ""}, {prop: "mutable", name: "mutable", embedded: false, exported: false, typ: funcType$9, tag: ""}, {prop: "newMessage", name: "newMessage", embedded: false, exported: false, typ: funcType$11, tag: ""}, {prop: "newField", name: "newField", embedded: false, exported: false, typ: funcType$12, tag: ""}]); - oneofInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "oneofDesc", name: "oneofDesc", embedded: false, exported: false, typ: protoreflect.OneofDescriptor, tag: ""}, {prop: "which", name: "which", embedded: false, exported: false, typ: funcType$13, tag: ""}]); - reflectMessageInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "fields", name: "fields", embedded: false, exported: false, typ: mapType$2, tag: ""}, {prop: "oneofs", name: "oneofs", embedded: false, exported: false, typ: mapType$3, tag: ""}, {prop: "fieldTypes", name: "fieldTypes", embedded: false, exported: false, typ: mapType$4, tag: ""}, {prop: "denseFields", name: "denseFields", embedded: false, exported: false, typ: sliceType$15, tag: ""}, {prop: "rangeInfos", name: "rangeInfos", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "getUnknown", name: "getUnknown", embedded: false, exported: false, typ: funcType$14, tag: ""}, {prop: "setUnknown", name: "setUnknown", embedded: false, exported: false, typ: funcType$15, tag: ""}, {prop: "extensionMap", name: "extensionMap", embedded: false, exported: false, typ: funcType$16, tag: ""}, {prop: "nilMessage", name: "nilMessage", embedded: false, exported: false, typ: atomicNilMessage, tag: ""}]); - extensionMap.init($Int32, ExtensionField); - MessageState.init("google.golang.org/protobuf/internal/impl", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "DoNotCompare", name: "DoNotCompare", embedded: true, exported: true, typ: pragma.DoNotCompare, tag: ""}, {prop: "DoNotCopy", name: "DoNotCopy", embedded: true, exported: true, typ: pragma.DoNotCopy, tag: ""}, {prop: "atomicMessageInfo", name: "atomicMessageInfo", embedded: false, exported: false, typ: ptrType$5, tag: ""}]); - messageState.init("google.golang.org/protobuf/internal/impl", [{prop: "NoUnkeyedLiterals", name: "NoUnkeyedLiterals", embedded: true, exported: true, typ: pragma.NoUnkeyedLiterals, tag: ""}, {prop: "DoNotCompare", name: "DoNotCompare", embedded: true, exported: true, typ: pragma.DoNotCompare, tag: ""}, {prop: "DoNotCopy", name: "DoNotCopy", embedded: true, exported: true, typ: pragma.DoNotCopy, tag: ""}, {prop: "atomicMessageInfo", name: "atomicMessageInfo", embedded: false, exported: false, typ: ptrType$5, tag: ""}]); - messageReflectWrapper.init("google.golang.org/protobuf/internal/impl", [{prop: "p", name: "p", embedded: false, exported: false, typ: pointer, tag: ""}, {prop: "mi", name: "mi", embedded: false, exported: false, typ: ptrType$5, tag: ""}]); - messageIfaceWrapper.init("google.golang.org/protobuf/internal/impl", [{prop: "p", name: "p", embedded: false, exported: false, typ: pointer, tag: ""}, {prop: "mi", name: "mi", embedded: false, exported: false, typ: ptrType$5, tag: ""}]); - MessageInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "GoReflectType", name: "GoReflectType", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "Desc", name: "Desc", embedded: false, exported: true, typ: protoreflect.MessageDescriptor, tag: ""}, {prop: "Exporter", name: "Exporter", embedded: false, exported: true, typ: exporter, tag: ""}, {prop: "OneofWrappers", name: "OneofWrappers", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "initMu", name: "initMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "initDone", name: "initDone", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "reflectMessageInfo", name: "reflectMessageInfo", embedded: true, exported: false, typ: reflectMessageInfo, tag: ""}, {prop: "coderMessageInfo", name: "coderMessageInfo", embedded: true, exported: false, typ: coderMessageInfo, tag: ""}]); - exporter.init([$emptyInterface, $Int], [$emptyInterface], false); - structInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "sizecacheOffset", name: "sizecacheOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "sizecacheType", name: "sizecacheType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "weakOffset", name: "weakOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "weakType", name: "weakType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "unknownOffset", name: "unknownOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "unknownType", name: "unknownType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "extensionOffset", name: "extensionOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "extensionType", name: "extensionType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "fieldsByNumber", name: "fieldsByNumber", embedded: false, exported: false, typ: mapType$5, tag: ""}, {prop: "oneofsByName", name: "oneofsByName", embedded: false, exported: false, typ: mapType$6, tag: ""}, {prop: "oneofWrappersByType", name: "oneofWrappersByType", embedded: false, exported: false, typ: mapType$7, tag: ""}, {prop: "oneofWrappersByNumber", name: "oneofWrappersByNumber", embedded: false, exported: false, typ: mapType$8, tag: ""}]); - mapEntryType.init("google.golang.org/protobuf/internal/impl", [{prop: "desc", name: "desc", embedded: false, exported: false, typ: protoreflect.MessageDescriptor, tag: ""}, {prop: "valType", name: "valType", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); - mergeOptions.init("", []); - placeholderEnumValues.init("", [{prop: "EnumValueDescriptors", name: "EnumValueDescriptors", embedded: true, exported: true, typ: protoreflect.EnumValueDescriptors, tag: ""}]); - legacyMarshaler.init([{prop: "Marshal", name: "Marshal", pkg: "", typ: $funcType([], [sliceType, $error], false)}]); - legacyUnmarshaler.init([{prop: "Unmarshal", name: "Unmarshal", pkg: "", typ: $funcType([sliceType], [$error], false)}]); - legacyMerger.init([{prop: "Merge", name: "Merge", pkg: "", typ: $funcType([protoiface.MessageV1], [], false)}]); - aberrantMessageType.init("google.golang.org/protobuf/internal/impl", [{prop: "t", name: "t", embedded: false, exported: false, typ: reflect.Type, tag: ""}]); - aberrantMessage.init("google.golang.org/protobuf/internal/impl", [{prop: "v", name: "v", embedded: false, exported: false, typ: reflect.Value, tag: ""}]); - enumV1.init([{prop: "EnumDescriptor", name: "EnumDescriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$14], false)}]); - messageV1.init([{prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$14], false)}]); - resolverOnly.init("google.golang.org/protobuf/internal/impl", [{prop: "reg", name: "reg", embedded: false, exported: false, typ: ptrType$57, tag: ""}]); - placeholderExtension.init("google.golang.org/protobuf/internal/impl", [{prop: "name", name: "name", embedded: false, exported: false, typ: protoreflect.FullName, tag: ""}, {prop: "number", name: "number", embedded: false, exported: false, typ: protowire.Number, tag: ""}]); - legacyEnumType.init("google.golang.org/protobuf/internal/impl", [{prop: "desc", name: "desc", embedded: false, exported: false, typ: protoreflect.EnumDescriptor, tag: ""}, {prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: sync.Map, tag: ""}]); - legacyEnumWrapper.init("google.golang.org/protobuf/internal/impl", [{prop: "num", name: "num", embedded: false, exported: false, typ: protoreflect.EnumNumber, tag: ""}, {prop: "pbTyp", name: "pbTyp", embedded: false, exported: false, typ: protoreflect.EnumType, tag: ""}, {prop: "goTyp", name: "goTyp", embedded: false, exported: false, typ: reflect.Type, tag: ""}]); - ExtensionInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "init", name: "init", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "desc", name: "desc", embedded: false, exported: false, typ: extensionTypeDescriptor, tag: ""}, {prop: "conv", name: "conv", embedded: false, exported: false, typ: Converter, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: ptrType$54, tag: ""}, {prop: "ExtendedType", name: "ExtendedType", embedded: false, exported: true, typ: protoiface.MessageV1, tag: ""}, {prop: "ExtensionType", name: "ExtensionType", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "Field", name: "Field", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Tag", name: "Tag", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Filename", name: "Filename", embedded: false, exported: true, typ: $String, tag: ""}]); - extensionTypeDescriptor.init("google.golang.org/protobuf/internal/impl", [{prop: "ExtensionDescriptor", name: "ExtensionDescriptor", embedded: true, exported: true, typ: protoreflect.FieldDescriptor, tag: ""}, {prop: "xi", name: "xi", embedded: false, exported: false, typ: ptrType$53, tag: ""}]); - EnumInfo.init("", [{prop: "GoReflectType", name: "GoReflectType", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "Desc", name: "Desc", embedded: false, exported: true, typ: protoreflect.EnumDescriptor, tag: ""}]); - marshalOptions.init("google.golang.org/protobuf/internal/impl", [{prop: "flags", name: "flags", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - unmarshalOptions.init("google.golang.org/protobuf/internal/impl", [{prop: "flags", name: "flags", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "resolver", name: "resolver", embedded: false, exported: false, typ: interfaceType, tag: ""}, {prop: "depth", name: "depth", embedded: false, exported: false, typ: $Int, tag: ""}]); - unmarshalOutput.init("google.golang.org/protobuf/internal/impl", [{prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "initialized", name: "initialized", embedded: false, exported: false, typ: $Bool, tag: ""}]); - mapConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "keyConv", name: "keyConv", embedded: false, exported: false, typ: Converter, tag: ""}, {prop: "valConv", name: "valConv", embedded: false, exported: false, typ: Converter, tag: ""}]); - mapReflect.init("google.golang.org/protobuf/internal/impl", [{prop: "v", name: "v", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "keyConv", name: "keyConv", embedded: false, exported: false, typ: Converter, tag: ""}, {prop: "valConv", name: "valConv", embedded: false, exported: false, typ: Converter, tag: ""}]); - listConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: Converter, tag: ""}]); - listPtrConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: Converter, tag: ""}]); - listReflect.init("google.golang.org/protobuf/internal/impl", [{prop: "v", name: "v", embedded: false, exported: false, typ: reflect.Value, tag: ""}, {prop: "conv", name: "conv", embedded: false, exported: false, typ: Converter, tag: ""}]); - unwrapper.init([{prop: "protoUnwrap", name: "protoUnwrap", pkg: "google.golang.org/protobuf/internal/impl", typ: $funcType([], [$emptyInterface], false)}]); - Converter.init([{prop: "GoValueOf", name: "GoValueOf", pkg: "", typ: $funcType([protoreflect.Value], [reflect.Value], false)}, {prop: "IsValidGo", name: "IsValidGo", pkg: "", typ: $funcType([reflect.Value], [$Bool], false)}, {prop: "IsValidPB", name: "IsValidPB", pkg: "", typ: $funcType([protoreflect.Value], [$Bool], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [protoreflect.Value], false)}, {prop: "PBValueOf", name: "PBValueOf", pkg: "", typ: $funcType([reflect.Value], [protoreflect.Value], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [protoreflect.Value], false)}]); - boolConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - int32Converter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - int64Converter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - uint32Converter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - uint64Converter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - float32Converter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - float64Converter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - stringConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - bytesConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - enumConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "def", name: "def", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}]); - messageConverter.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}]); - pointerCoderFuncs.init("google.golang.org/protobuf/internal/impl", [{prop: "mi", name: "mi", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: funcType$19, tag: ""}, {prop: "marshal", name: "marshal", embedded: false, exported: false, typ: funcType$20, tag: ""}, {prop: "unmarshal", name: "unmarshal", embedded: false, exported: false, typ: funcType$21, tag: ""}, {prop: "isInit", name: "isInit", embedded: false, exported: false, typ: funcType$22, tag: ""}, {prop: "merge", name: "merge", embedded: false, exported: false, typ: funcType$23, tag: ""}]); - valueCoderFuncs.init("google.golang.org/protobuf/internal/impl", [{prop: "size", name: "size", embedded: false, exported: false, typ: funcType$24, tag: ""}, {prop: "marshal", name: "marshal", embedded: false, exported: false, typ: funcType$25, tag: ""}, {prop: "unmarshal", name: "unmarshal", embedded: false, exported: false, typ: funcType$26, tag: ""}, {prop: "isInit", name: "isInit", embedded: false, exported: false, typ: funcType$27, tag: ""}, {prop: "merge", name: "merge", embedded: false, exported: false, typ: funcType$28, tag: ""}]); - coderMessageInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "methods", name: "methods", embedded: false, exported: false, typ: structType$9, tag: ""}, {prop: "orderedCoderFields", name: "orderedCoderFields", embedded: false, exported: false, typ: sliceType$16, tag: ""}, {prop: "denseCoderFields", name: "denseCoderFields", embedded: false, exported: false, typ: sliceType$16, tag: ""}, {prop: "coderFields", name: "coderFields", embedded: false, exported: false, typ: mapType$9, tag: ""}, {prop: "sizecacheOffset", name: "sizecacheOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "unknownOffset", name: "unknownOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "unknownPtrKind", name: "unknownPtrKind", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "extensionOffset", name: "extensionOffset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "needsInitCheck", name: "needsInitCheck", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "isMessageSet", name: "isMessageSet", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "numRequiredFields", name: "numRequiredFields", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - coderFieldInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "funcs", name: "funcs", embedded: false, exported: false, typ: pointerCoderFuncs, tag: ""}, {prop: "mi", name: "mi", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "ft", name: "ft", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "validation", name: "validation", embedded: false, exported: false, typ: validationInfo, tag: ""}, {prop: "num", name: "num", embedded: false, exported: false, typ: protowire.Number, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: offset, tag: ""}, {prop: "wiretag", name: "wiretag", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "tagsize", name: "tagsize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "isPointer", name: "isPointer", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "isRequired", name: "isRequired", embedded: false, exported: false, typ: $Bool, tag: ""}]); - mapInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "goType", name: "goType", embedded: false, exported: false, typ: reflect.Type, tag: ""}, {prop: "keyWiretag", name: "keyWiretag", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "valWiretag", name: "valWiretag", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "keyFuncs", name: "keyFuncs", embedded: false, exported: false, typ: valueCoderFuncs, tag: ""}, {prop: "valFuncs", name: "valFuncs", embedded: false, exported: false, typ: valueCoderFuncs, tag: ""}, {prop: "keyZero", name: "keyZero", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}, {prop: "keyKind", name: "keyKind", embedded: false, exported: false, typ: protoreflect.Kind, tag: ""}, {prop: "conv", name: "conv", embedded: false, exported: false, typ: ptrType$52, tag: ""}]); - errInvalidUTF8.init("", []); - extensionFieldInfo.init("google.golang.org/protobuf/internal/impl", [{prop: "wiretag", name: "wiretag", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "tagsize", name: "tagsize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "unmarshalNeedsValue", name: "unmarshalNeedsValue", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "funcs", name: "funcs", embedded: false, exported: false, typ: valueCoderFuncs, tag: ""}, {prop: "validation", name: "validation", embedded: false, exported: false, typ: validationInfo, tag: ""}]); - lazyExtensionValue.init("google.golang.org/protobuf/internal/impl", [{prop: "atomicOnce", name: "atomicOnce", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "xi", name: "xi", embedded: false, exported: false, typ: ptrType$54, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "fn", name: "fn", embedded: false, exported: false, typ: funcType$12, tag: ""}]); - ExtensionField.init("google.golang.org/protobuf/internal/impl", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: protoreflect.ExtensionType, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: protoreflect.Value, tag: ""}, {prop: "lazy", name: "lazy", embedded: false, exported: false, typ: ptrType$40, tag: ""}]); - Export.init("", []); - legacyMessageWrapper.init("google.golang.org/protobuf/internal/impl", [{prop: "m", name: "m", embedded: false, exported: false, typ: protoreflect.ProtoMessage, tag: ""}]); - validationState.init("google.golang.org/protobuf/internal/impl", [{prop: "typ", name: "typ", embedded: false, exported: false, typ: validationType, tag: ""}, {prop: "keyType", name: "keyType", embedded: false, exported: false, typ: validationType, tag: ""}, {prop: "valType", name: "valType", embedded: false, exported: false, typ: validationType, tag: ""}, {prop: "endGroup", name: "endGroup", embedded: false, exported: false, typ: protowire.Number, tag: ""}, {prop: "mi", name: "mi", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "tail", name: "tail", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "requiredMask", name: "requiredMask", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = gzip.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = json.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = prototext.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protowire.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = descopts.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = detrand.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = messageset.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = tag.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filedesc.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flags.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = genid.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = order.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pragma.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strs.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = proto.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoregistry.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoiface.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = crc32.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ioutil.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - legacyMessageTypeCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - legacyMessageDescCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - aberrantMessageDescLock = new sync.Mutex.ptr(0, 0); - aberrantMessageDescCache = false; - legacyFileDescCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - legacyEnumTypeCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - legacyEnumDescCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - aberrantEnumDescCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - emptyBuf = arrayType.zero(); - legacyExtensionFieldInfoCache = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - needsInitCheckMu = new sync.Mutex.ptr(0, 0); - needsInitCheckMap = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, 0); - invalidOffset = new offset.ptr(-1, $throwNilPointerError); - zeroOffset = new offset.ptr(0, $throwNilPointerError); - _r = reflect.ValueOf((sliceType.nil)); /* */ $s = 34; case 34: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - nilBytes = _r; - _r$1 = reflect.ValueOf(new sliceType([])); /* */ $s = 35; case 35: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - emptyBytes = _r$1; - sizecacheType = reflect.TypeOf(new $Int32(0)); - weakFieldsType = reflect.TypeOf(new mapType((false))); - unknownFieldsAType = reflect.TypeOf((sliceType.nil)); - unknownFieldsBType = reflect.TypeOf((ptrType$3.nil)); - extensionFieldsType = reflect.TypeOf(new mapType$1((false))); - aberrantProtoMethods = new structType$9.ptr(new pragma.NoUnkeyedLiterals.ptr(), new $Uint64(0, 1), $throwNilPointerError, legacyMarshal, legacyUnmarshal, legacyMerge, $throwNilPointerError); - _r$2 = errors.New("cannot parse invalid wire-format data", new sliceType$1([])); /* */ $s = 36; case 36: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - errDecode = _r$2; - _r$3 = errors.New("exceeded maximum recursion depth", new sliceType$1([])); /* */ $s = 37; case 37: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - errRecursionDepth = _r$3; - lazyUnmarshalOptions = new unmarshalOptions.ptr(0, protoregistry.GlobalTypes, 10000); - _r$4 = errors.New("unknown", new sliceType$1([])); /* */ $s = 38; case 38: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - errUnknown = _r$4; - boolType = reflect.TypeOf(new $Bool(false)); - int32Type = reflect.TypeOf(new $Int32(0)); - int64Type = reflect.TypeOf(new $Int64(0, 0)); - uint32Type = reflect.TypeOf(new $Uint32(0)); - uint64Type = reflect.TypeOf(new $Uint64(0, 0)); - float32Type = reflect.TypeOf(new $Float32(0)); - float64Type = reflect.TypeOf(new $Float64(0)); - stringType = reflect.TypeOf(new $String("")); - bytesType = reflect.TypeOf((sliceType.nil)); - byteType = reflect.TypeOf(new $Uint8(0)); - boolZero = $clone(protoreflect.ValueOfBool(false), protoreflect.Value); - int32Zero = $clone(protoreflect.ValueOfInt32(0), protoreflect.Value); - int64Zero = $clone(protoreflect.ValueOfInt64(new $Int64(0, 0)), protoreflect.Value); - uint32Zero = $clone(protoreflect.ValueOfUint32(0), protoreflect.Value); - uint64Zero = $clone(protoreflect.ValueOfUint64(new $Uint64(0, 0)), protoreflect.Value); - float32Zero = $clone(protoreflect.ValueOfFloat32(0), protoreflect.Value); - float64Zero = $clone(protoreflect.ValueOfFloat64(0), protoreflect.Value); - stringZero = $clone(protoreflect.ValueOfString(""), protoreflect.Value); - bytesZero = $clone(protoreflect.ValueOfBytes(sliceType.nil), protoreflect.Value); - coderEnum = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeEnum, appendEnum, consumeEnum, $throwNilPointerError, mergeEnum); - coderEnumNoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeEnumNoZero, appendEnumNoZero, consumeEnum, $throwNilPointerError, mergeEnumNoZero); - coderEnumPtr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeEnumPtr, appendEnumPtr, consumeEnumPtr, $throwNilPointerError, mergeEnumPtr); - coderEnumSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeEnumSlice, appendEnumSlice, consumeEnumSlice, $throwNilPointerError, mergeEnumSlice); - coderEnumPackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeEnumPackedSlice, appendEnumPackedSlice, consumeEnumSlice, $throwNilPointerError, mergeEnumSlice); - coderBool = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBool, appendBool, consumeBool, $throwNilPointerError, mergeBool); - coderBoolNoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBoolNoZero, appendBoolNoZero, consumeBool, $throwNilPointerError, mergeBoolNoZero); - coderBoolPtr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBoolPtr, appendBoolPtr, consumeBoolPtr, $throwNilPointerError, mergeBoolPtr); - coderBoolSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBoolSlice, appendBoolSlice, consumeBoolSlice, $throwNilPointerError, mergeBoolSlice); - coderBoolPackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBoolPackedSlice, appendBoolPackedSlice, consumeBoolSlice, $throwNilPointerError, mergeBoolSlice); - coderBoolValue = new valueCoderFuncs.ptr(sizeBoolValue, appendBoolValue, consumeBoolValue, $throwNilPointerError, mergeScalarValue); - coderBoolSliceValue = new valueCoderFuncs.ptr(sizeBoolSliceValue, appendBoolSliceValue, consumeBoolSliceValue, $throwNilPointerError, mergeListValue); - coderBoolPackedSliceValue = new valueCoderFuncs.ptr(sizeBoolPackedSliceValue, appendBoolPackedSliceValue, consumeBoolSliceValue, $throwNilPointerError, mergeListValue); - coderEnumValue = new valueCoderFuncs.ptr(sizeEnumValue, appendEnumValue, consumeEnumValue, $throwNilPointerError, mergeScalarValue); - coderEnumSliceValue = new valueCoderFuncs.ptr(sizeEnumSliceValue, appendEnumSliceValue, consumeEnumSliceValue, $throwNilPointerError, mergeListValue); - coderEnumPackedSliceValue = new valueCoderFuncs.ptr(sizeEnumPackedSliceValue, appendEnumPackedSliceValue, consumeEnumSliceValue, $throwNilPointerError, mergeListValue); - coderInt32 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt32, appendInt32, consumeInt32, $throwNilPointerError, mergeInt32); - coderInt32NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt32NoZero, appendInt32NoZero, consumeInt32, $throwNilPointerError, mergeInt32NoZero); - coderInt32Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt32Ptr, appendInt32Ptr, consumeInt32Ptr, $throwNilPointerError, mergeInt32Ptr); - coderInt32Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt32Slice, appendInt32Slice, consumeInt32Slice, $throwNilPointerError, mergeInt32Slice); - coderInt32PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt32PackedSlice, appendInt32PackedSlice, consumeInt32Slice, $throwNilPointerError, mergeInt32Slice); - coderInt32Value = new valueCoderFuncs.ptr(sizeInt32Value, appendInt32Value, consumeInt32Value, $throwNilPointerError, mergeScalarValue); - coderInt32SliceValue = new valueCoderFuncs.ptr(sizeInt32SliceValue, appendInt32SliceValue, consumeInt32SliceValue, $throwNilPointerError, mergeListValue); - coderInt32PackedSliceValue = new valueCoderFuncs.ptr(sizeInt32PackedSliceValue, appendInt32PackedSliceValue, consumeInt32SliceValue, $throwNilPointerError, mergeListValue); - coderSint32 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint32, appendSint32, consumeSint32, $throwNilPointerError, mergeInt32); - coderSint32NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint32NoZero, appendSint32NoZero, consumeSint32, $throwNilPointerError, mergeInt32NoZero); - coderSint32Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint32Ptr, appendSint32Ptr, consumeSint32Ptr, $throwNilPointerError, mergeInt32Ptr); - coderSint32Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint32Slice, appendSint32Slice, consumeSint32Slice, $throwNilPointerError, mergeInt32Slice); - coderSint32PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint32PackedSlice, appendSint32PackedSlice, consumeSint32Slice, $throwNilPointerError, mergeInt32Slice); - coderSint32Value = new valueCoderFuncs.ptr(sizeSint32Value, appendSint32Value, consumeSint32Value, $throwNilPointerError, mergeScalarValue); - coderSint32SliceValue = new valueCoderFuncs.ptr(sizeSint32SliceValue, appendSint32SliceValue, consumeSint32SliceValue, $throwNilPointerError, mergeListValue); - coderSint32PackedSliceValue = new valueCoderFuncs.ptr(sizeSint32PackedSliceValue, appendSint32PackedSliceValue, consumeSint32SliceValue, $throwNilPointerError, mergeListValue); - coderUint32 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint32, appendUint32, consumeUint32, $throwNilPointerError, mergeUint32); - coderUint32NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint32NoZero, appendUint32NoZero, consumeUint32, $throwNilPointerError, mergeUint32NoZero); - coderUint32Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint32Ptr, appendUint32Ptr, consumeUint32Ptr, $throwNilPointerError, mergeUint32Ptr); - coderUint32Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint32Slice, appendUint32Slice, consumeUint32Slice, $throwNilPointerError, mergeUint32Slice); - coderUint32PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint32PackedSlice, appendUint32PackedSlice, consumeUint32Slice, $throwNilPointerError, mergeUint32Slice); - coderUint32Value = new valueCoderFuncs.ptr(sizeUint32Value, appendUint32Value, consumeUint32Value, $throwNilPointerError, mergeScalarValue); - coderUint32SliceValue = new valueCoderFuncs.ptr(sizeUint32SliceValue, appendUint32SliceValue, consumeUint32SliceValue, $throwNilPointerError, mergeListValue); - coderUint32PackedSliceValue = new valueCoderFuncs.ptr(sizeUint32PackedSliceValue, appendUint32PackedSliceValue, consumeUint32SliceValue, $throwNilPointerError, mergeListValue); - coderInt64 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt64, appendInt64, consumeInt64, $throwNilPointerError, mergeInt64); - coderInt64NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt64NoZero, appendInt64NoZero, consumeInt64, $throwNilPointerError, mergeInt64NoZero); - coderInt64Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt64Ptr, appendInt64Ptr, consumeInt64Ptr, $throwNilPointerError, mergeInt64Ptr); - coderInt64Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt64Slice, appendInt64Slice, consumeInt64Slice, $throwNilPointerError, mergeInt64Slice); - coderInt64PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeInt64PackedSlice, appendInt64PackedSlice, consumeInt64Slice, $throwNilPointerError, mergeInt64Slice); - coderInt64Value = new valueCoderFuncs.ptr(sizeInt64Value, appendInt64Value, consumeInt64Value, $throwNilPointerError, mergeScalarValue); - coderInt64SliceValue = new valueCoderFuncs.ptr(sizeInt64SliceValue, appendInt64SliceValue, consumeInt64SliceValue, $throwNilPointerError, mergeListValue); - coderInt64PackedSliceValue = new valueCoderFuncs.ptr(sizeInt64PackedSliceValue, appendInt64PackedSliceValue, consumeInt64SliceValue, $throwNilPointerError, mergeListValue); - coderSint64 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint64, appendSint64, consumeSint64, $throwNilPointerError, mergeInt64); - coderSint64NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint64NoZero, appendSint64NoZero, consumeSint64, $throwNilPointerError, mergeInt64NoZero); - coderSint64Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint64Ptr, appendSint64Ptr, consumeSint64Ptr, $throwNilPointerError, mergeInt64Ptr); - coderSint64Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint64Slice, appendSint64Slice, consumeSint64Slice, $throwNilPointerError, mergeInt64Slice); - coderSint64PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSint64PackedSlice, appendSint64PackedSlice, consumeSint64Slice, $throwNilPointerError, mergeInt64Slice); - coderSint64Value = new valueCoderFuncs.ptr(sizeSint64Value, appendSint64Value, consumeSint64Value, $throwNilPointerError, mergeScalarValue); - coderSint64SliceValue = new valueCoderFuncs.ptr(sizeSint64SliceValue, appendSint64SliceValue, consumeSint64SliceValue, $throwNilPointerError, mergeListValue); - coderSint64PackedSliceValue = new valueCoderFuncs.ptr(sizeSint64PackedSliceValue, appendSint64PackedSliceValue, consumeSint64SliceValue, $throwNilPointerError, mergeListValue); - coderUint64 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint64, appendUint64, consumeUint64, $throwNilPointerError, mergeUint64); - coderUint64NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint64NoZero, appendUint64NoZero, consumeUint64, $throwNilPointerError, mergeUint64NoZero); - coderUint64Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint64Ptr, appendUint64Ptr, consumeUint64Ptr, $throwNilPointerError, mergeUint64Ptr); - coderUint64Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint64Slice, appendUint64Slice, consumeUint64Slice, $throwNilPointerError, mergeUint64Slice); - coderUint64PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeUint64PackedSlice, appendUint64PackedSlice, consumeUint64Slice, $throwNilPointerError, mergeUint64Slice); - coderUint64Value = new valueCoderFuncs.ptr(sizeUint64Value, appendUint64Value, consumeUint64Value, $throwNilPointerError, mergeScalarValue); - coderUint64SliceValue = new valueCoderFuncs.ptr(sizeUint64SliceValue, appendUint64SliceValue, consumeUint64SliceValue, $throwNilPointerError, mergeListValue); - coderUint64PackedSliceValue = new valueCoderFuncs.ptr(sizeUint64PackedSliceValue, appendUint64PackedSliceValue, consumeUint64SliceValue, $throwNilPointerError, mergeListValue); - coderSfixed32 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed32, appendSfixed32, consumeSfixed32, $throwNilPointerError, mergeInt32); - coderSfixed32NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed32NoZero, appendSfixed32NoZero, consumeSfixed32, $throwNilPointerError, mergeInt32NoZero); - coderSfixed32Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed32Ptr, appendSfixed32Ptr, consumeSfixed32Ptr, $throwNilPointerError, mergeInt32Ptr); - coderSfixed32Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed32Slice, appendSfixed32Slice, consumeSfixed32Slice, $throwNilPointerError, mergeInt32Slice); - coderSfixed32PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed32PackedSlice, appendSfixed32PackedSlice, consumeSfixed32Slice, $throwNilPointerError, mergeInt32Slice); - coderSfixed32Value = new valueCoderFuncs.ptr(sizeSfixed32Value, appendSfixed32Value, consumeSfixed32Value, $throwNilPointerError, mergeScalarValue); - coderSfixed32SliceValue = new valueCoderFuncs.ptr(sizeSfixed32SliceValue, appendSfixed32SliceValue, consumeSfixed32SliceValue, $throwNilPointerError, mergeListValue); - coderSfixed32PackedSliceValue = new valueCoderFuncs.ptr(sizeSfixed32PackedSliceValue, appendSfixed32PackedSliceValue, consumeSfixed32SliceValue, $throwNilPointerError, mergeListValue); - coderFixed32 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed32, appendFixed32, consumeFixed32, $throwNilPointerError, mergeUint32); - coderFixed32NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed32NoZero, appendFixed32NoZero, consumeFixed32, $throwNilPointerError, mergeUint32NoZero); - coderFixed32Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed32Ptr, appendFixed32Ptr, consumeFixed32Ptr, $throwNilPointerError, mergeUint32Ptr); - coderFixed32Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed32Slice, appendFixed32Slice, consumeFixed32Slice, $throwNilPointerError, mergeUint32Slice); - coderFixed32PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed32PackedSlice, appendFixed32PackedSlice, consumeFixed32Slice, $throwNilPointerError, mergeUint32Slice); - coderFixed32Value = new valueCoderFuncs.ptr(sizeFixed32Value, appendFixed32Value, consumeFixed32Value, $throwNilPointerError, mergeScalarValue); - coderFixed32SliceValue = new valueCoderFuncs.ptr(sizeFixed32SliceValue, appendFixed32SliceValue, consumeFixed32SliceValue, $throwNilPointerError, mergeListValue); - coderFixed32PackedSliceValue = new valueCoderFuncs.ptr(sizeFixed32PackedSliceValue, appendFixed32PackedSliceValue, consumeFixed32SliceValue, $throwNilPointerError, mergeListValue); - coderFloat = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFloat, appendFloat, consumeFloat, $throwNilPointerError, mergeFloat32); - coderFloatNoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFloatNoZero, appendFloatNoZero, consumeFloat, $throwNilPointerError, mergeFloat32NoZero); - coderFloatPtr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFloatPtr, appendFloatPtr, consumeFloatPtr, $throwNilPointerError, mergeFloat32Ptr); - coderFloatSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFloatSlice, appendFloatSlice, consumeFloatSlice, $throwNilPointerError, mergeFloat32Slice); - coderFloatPackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFloatPackedSlice, appendFloatPackedSlice, consumeFloatSlice, $throwNilPointerError, mergeFloat32Slice); - coderFloatValue = new valueCoderFuncs.ptr(sizeFloatValue, appendFloatValue, consumeFloatValue, $throwNilPointerError, mergeScalarValue); - coderFloatSliceValue = new valueCoderFuncs.ptr(sizeFloatSliceValue, appendFloatSliceValue, consumeFloatSliceValue, $throwNilPointerError, mergeListValue); - coderFloatPackedSliceValue = new valueCoderFuncs.ptr(sizeFloatPackedSliceValue, appendFloatPackedSliceValue, consumeFloatSliceValue, $throwNilPointerError, mergeListValue); - coderSfixed64 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed64, appendSfixed64, consumeSfixed64, $throwNilPointerError, mergeInt64); - coderSfixed64NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed64NoZero, appendSfixed64NoZero, consumeSfixed64, $throwNilPointerError, mergeInt64NoZero); - coderSfixed64Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed64Ptr, appendSfixed64Ptr, consumeSfixed64Ptr, $throwNilPointerError, mergeInt64Ptr); - coderSfixed64Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed64Slice, appendSfixed64Slice, consumeSfixed64Slice, $throwNilPointerError, mergeInt64Slice); - coderSfixed64PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeSfixed64PackedSlice, appendSfixed64PackedSlice, consumeSfixed64Slice, $throwNilPointerError, mergeInt64Slice); - coderSfixed64Value = new valueCoderFuncs.ptr(sizeSfixed64Value, appendSfixed64Value, consumeSfixed64Value, $throwNilPointerError, mergeScalarValue); - coderSfixed64SliceValue = new valueCoderFuncs.ptr(sizeSfixed64SliceValue, appendSfixed64SliceValue, consumeSfixed64SliceValue, $throwNilPointerError, mergeListValue); - coderSfixed64PackedSliceValue = new valueCoderFuncs.ptr(sizeSfixed64PackedSliceValue, appendSfixed64PackedSliceValue, consumeSfixed64SliceValue, $throwNilPointerError, mergeListValue); - coderFixed64 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed64, appendFixed64, consumeFixed64, $throwNilPointerError, mergeUint64); - coderFixed64NoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed64NoZero, appendFixed64NoZero, consumeFixed64, $throwNilPointerError, mergeUint64NoZero); - coderFixed64Ptr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed64Ptr, appendFixed64Ptr, consumeFixed64Ptr, $throwNilPointerError, mergeUint64Ptr); - coderFixed64Slice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed64Slice, appendFixed64Slice, consumeFixed64Slice, $throwNilPointerError, mergeUint64Slice); - coderFixed64PackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeFixed64PackedSlice, appendFixed64PackedSlice, consumeFixed64Slice, $throwNilPointerError, mergeUint64Slice); - coderFixed64Value = new valueCoderFuncs.ptr(sizeFixed64Value, appendFixed64Value, consumeFixed64Value, $throwNilPointerError, mergeScalarValue); - coderFixed64SliceValue = new valueCoderFuncs.ptr(sizeFixed64SliceValue, appendFixed64SliceValue, consumeFixed64SliceValue, $throwNilPointerError, mergeListValue); - coderFixed64PackedSliceValue = new valueCoderFuncs.ptr(sizeFixed64PackedSliceValue, appendFixed64PackedSliceValue, consumeFixed64SliceValue, $throwNilPointerError, mergeListValue); - coderDouble = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeDouble, appendDouble, consumeDouble, $throwNilPointerError, mergeFloat64); - coderDoubleNoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeDoubleNoZero, appendDoubleNoZero, consumeDouble, $throwNilPointerError, mergeFloat64NoZero); - coderDoublePtr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeDoublePtr, appendDoublePtr, consumeDoublePtr, $throwNilPointerError, mergeFloat64Ptr); - coderDoubleSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeDoubleSlice, appendDoubleSlice, consumeDoubleSlice, $throwNilPointerError, mergeFloat64Slice); - coderDoublePackedSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeDoublePackedSlice, appendDoublePackedSlice, consumeDoubleSlice, $throwNilPointerError, mergeFloat64Slice); - coderDoubleValue = new valueCoderFuncs.ptr(sizeDoubleValue, appendDoubleValue, consumeDoubleValue, $throwNilPointerError, mergeScalarValue); - coderDoubleSliceValue = new valueCoderFuncs.ptr(sizeDoubleSliceValue, appendDoubleSliceValue, consumeDoubleSliceValue, $throwNilPointerError, mergeListValue); - coderDoublePackedSliceValue = new valueCoderFuncs.ptr(sizeDoublePackedSliceValue, appendDoublePackedSliceValue, consumeDoubleSliceValue, $throwNilPointerError, mergeListValue); - coderString = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeString, appendString, consumeString, $throwNilPointerError, mergeString); - coderStringValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeString, appendStringValidateUTF8, consumeStringValidateUTF8, $throwNilPointerError, mergeString); - coderStringNoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeStringNoZero, appendStringNoZero, consumeString, $throwNilPointerError, mergeStringNoZero); - coderStringNoZeroValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeStringNoZero, appendStringNoZeroValidateUTF8, consumeStringValidateUTF8, $throwNilPointerError, mergeStringNoZero); - coderStringPtr = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeStringPtr, appendStringPtr, consumeStringPtr, $throwNilPointerError, mergeStringPtr); - coderStringPtrValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeStringPtr, appendStringPtrValidateUTF8, consumeStringPtrValidateUTF8, $throwNilPointerError, mergeStringPtr); - coderStringSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeStringSlice, appendStringSlice, consumeStringSlice, $throwNilPointerError, mergeStringSlice); - coderStringSliceValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeStringSlice, appendStringSliceValidateUTF8, consumeStringSliceValidateUTF8, $throwNilPointerError, mergeStringSlice); - coderStringValue = new valueCoderFuncs.ptr(sizeStringValue, appendStringValue, consumeStringValue, $throwNilPointerError, mergeScalarValue); - coderStringValueValidateUTF8 = new valueCoderFuncs.ptr(sizeStringValue, appendStringValueValidateUTF8, consumeStringValueValidateUTF8, $throwNilPointerError, mergeScalarValue); - coderStringSliceValue = new valueCoderFuncs.ptr(sizeStringSliceValue, appendStringSliceValue, consumeStringSliceValue, $throwNilPointerError, mergeListValue); - coderBytes = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBytes, appendBytes, consumeBytes, $throwNilPointerError, mergeBytes); - coderBytesValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBytes, appendBytesValidateUTF8, consumeBytesValidateUTF8, $throwNilPointerError, mergeBytes); - coderBytesNoZero = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBytesNoZero, appendBytesNoZero, consumeBytesNoZero, $throwNilPointerError, mergeBytesNoZero); - coderBytesNoZeroValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBytesNoZero, appendBytesNoZeroValidateUTF8, consumeBytesNoZeroValidateUTF8, $throwNilPointerError, mergeBytesNoZero); - coderBytesSlice = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBytesSlice, appendBytesSlice, consumeBytesSlice, $throwNilPointerError, mergeBytesSlice); - coderBytesSliceValidateUTF8 = new pointerCoderFuncs.ptr(ptrType$5.nil, sizeBytesSlice, appendBytesSliceValidateUTF8, consumeBytesSliceValidateUTF8, $throwNilPointerError, mergeBytesSlice); - coderBytesValue = new valueCoderFuncs.ptr(sizeBytesValue, appendBytesValue, consumeBytesValue, $throwNilPointerError, mergeBytesValue); - coderBytesSliceValue = new valueCoderFuncs.ptr(sizeBytesSliceValue, appendBytesSliceValue, consumeBytesSliceValue, $throwNilPointerError, mergeBytesListValue); - wireTypes = $makeMap(protoreflect.Kind.keyFor, [{ k: 8, v: 0 }, { k: 14, v: 0 }, { k: 5, v: 0 }, { k: 17, v: 0 }, { k: 13, v: 0 }, { k: 3, v: 0 }, { k: 18, v: 0 }, { k: 4, v: 0 }, { k: 15, v: 5 }, { k: 7, v: 5 }, { k: 2, v: 5 }, { k: 16, v: 1 }, { k: 6, v: 1 }, { k: 1, v: 1 }, { k: 9, v: 2 }, { k: 12, v: 2 }, { k: 11, v: 2 }, { k: 10, v: 3 }]); - coderMessageValue = new valueCoderFuncs.ptr(sizeMessageValue, appendMessageValue, consumeMessageValue, isInitMessageValue, mergeMessageValue); - coderGroupValue = new valueCoderFuncs.ptr(sizeGroupValue, appendGroupValue, consumeGroupValue, isInitMessageValue, mergeMessageValue); - coderMessageSliceValue = new valueCoderFuncs.ptr(sizeMessageSliceValue, appendMessageSliceValue, consumeMessageSliceValue, isInitMessageSliceValue, mergeMessageListValue); - coderGroupSliceValue = new valueCoderFuncs.ptr(sizeGroupSliceValue, appendGroupSliceValue, consumeGroupSliceValue, isInitMessageSliceValue, mergeMessageListValue); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/filetype"] = (function() { - var $pkg = {}, $init, descopts, filedesc, impl, protoreflect, protoregistry, reflect, Builder, Out, depIdxs, resolverByIndex, fileRegistry, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, interfaceType, sliceType$6, sliceType$7, ptrType, goTypeForPBKind; - descopts = $packages["google.golang.org/protobuf/internal/descopts"]; - filedesc = $packages["google.golang.org/protobuf/internal/filedesc"]; - impl = $packages["google.golang.org/protobuf/internal/impl"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoregistry = $packages["google.golang.org/protobuf/reflect/protoregistry"]; - reflect = $packages["reflect"]; - Builder = $pkg.Builder = $newType(0, $kindStruct, "filetype.Builder", true, "google.golang.org/protobuf/internal/filetype", true, function(File_, GoTypes_, DependencyIndexes_, EnumInfos_, MessageInfos_, ExtensionInfos_, TypeRegistry_) { - this.$val = this; - if (arguments.length === 0) { - this.File = new filedesc.Builder.ptr("", sliceType.nil, 0, 0, 0, 0, $ifaceNil, $ifaceNil); - this.GoTypes = sliceType$1.nil; - this.DependencyIndexes = sliceType$2.nil; - this.EnumInfos = sliceType$3.nil; - this.MessageInfos = sliceType$4.nil; - this.ExtensionInfos = sliceType$5.nil; - this.TypeRegistry = $ifaceNil; - return; - } - this.File = File_; - this.GoTypes = GoTypes_; - this.DependencyIndexes = DependencyIndexes_; - this.EnumInfos = EnumInfos_; - this.MessageInfos = MessageInfos_; - this.ExtensionInfos = ExtensionInfos_; - this.TypeRegistry = TypeRegistry_; - }); - Out = $pkg.Out = $newType(0, $kindStruct, "filetype.Out", true, "google.golang.org/protobuf/internal/filetype", true, function(File_) { - this.$val = this; - if (arguments.length === 0) { - this.File = $ifaceNil; - return; - } - this.File = File_; - }); - depIdxs = $pkg.depIdxs = $newType(12, $kindSlice, "filetype.depIdxs", true, "google.golang.org/protobuf/internal/filetype", false, null); - resolverByIndex = $pkg.resolverByIndex = $newType(0, $kindStruct, "filetype.resolverByIndex", true, "google.golang.org/protobuf/internal/filetype", false, function(goTypes_, depIdxs_, fileRegistry_) { - this.$val = this; - if (arguments.length === 0) { - this.goTypes = sliceType$1.nil; - this.depIdxs = depIdxs.nil; - this.fileRegistry = $ifaceNil; - return; - } - this.goTypes = goTypes_; - this.depIdxs = depIdxs_; - this.fileRegistry = fileRegistry_; - }); - fileRegistry = $pkg.fileRegistry = $newType(8, $kindInterface, "filetype.fileRegistry", true, "google.golang.org/protobuf/internal/filetype", false, null); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($emptyInterface); - sliceType$2 = $sliceType($Int32); - sliceType$3 = $sliceType(impl.EnumInfo); - sliceType$4 = $sliceType(impl.MessageInfo); - sliceType$5 = $sliceType(impl.ExtensionInfo); - interfaceType = $interfaceType([{prop: "RegisterEnum", name: "RegisterEnum", pkg: "", typ: $funcType([protoreflect.EnumType], [$error], false)}, {prop: "RegisterExtension", name: "RegisterExtension", pkg: "", typ: $funcType([protoreflect.ExtensionType], [$error], false)}, {prop: "RegisterMessage", name: "RegisterMessage", pkg: "", typ: $funcType([protoreflect.MessageType], [$error], false)}]); - sliceType$6 = $sliceType(filedesc.Enum); - sliceType$7 = $sliceType(filedesc.Message); - ptrType = $ptrType(resolverByIndex); - Builder.ptr.prototype.Build = function() { - var {_1, _2, _entry, _i, _i$1, _i$2, _i$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _ref$2, _ref$3, _v, depIdx, enumGoTypes, err, err$1, err$2, fbOut, goType, i, i$1, i$2, i$3, j, j$1, messageGoTypes, out, tb, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - out = new Out.ptr($ifaceNil); - tb = this; - if ($interfaceIsEqual(tb.File.FileRegistry, $ifaceNil)) { - tb.File.FileRegistry = protoregistry.GlobalFiles; - } - tb.File.FileRegistry = new resolverByIndex.ptr(tb.GoTypes, $convertSliceType(tb.DependencyIndexes, depIdxs), tb.File.FileRegistry); - if ($interfaceIsEqual(tb.TypeRegistry, $ifaceNil)) { - tb.TypeRegistry = protoregistry.GlobalTypes; - } - _r = $clone(tb.File, filedesc.Builder).Build(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - fbOut = $clone(_r, filedesc.Out); - out.File = fbOut.File; - enumGoTypes = $subslice(tb.GoTypes, 0, fbOut.Enums.$length); - if (!((tb.EnumInfos.$length === fbOut.Enums.$length))) { - $panic(new $String("mismatching enum lengths")); - } - /* */ if (fbOut.Enums.$length > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (fbOut.Enums.$length > 0) { */ case 2: - _ref = fbOut.Enums; - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - i = _i; - impl.EnumInfo.copy((x$1 = tb.EnumInfos, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])), new impl.EnumInfo.ptr(reflect.TypeOf(((i < 0 || i >= enumGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : enumGoTypes.$array[enumGoTypes.$offset + i])), (x = fbOut.Enums, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])))); - _r$1 = tb.TypeRegistry.RegisterEnum((x$2 = tb.EnumInfos, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i]))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - _i++; - $s = 4; continue; - case 5: - /* } */ case 3: - messageGoTypes = $subslice($subslice(tb.GoTypes, fbOut.Enums.$length), 0, fbOut.Messages.$length); - if (!((tb.MessageInfos.$length === fbOut.Messages.$length))) { - $panic(new $String("mismatching message lengths")); - } - /* */ if (fbOut.Messages.$length > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (fbOut.Messages.$length > 0) { */ case 7: - _ref$1 = fbOut.Messages; - _i$1 = 0; - /* while (true) { */ case 9: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 10; continue; } - i$1 = _i$1; - if ($interfaceIsEqual(((i$1 < 0 || i$1 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$1]), $ifaceNil)) { - _i$1++; - /* continue; */ $s = 9; continue; - } - (x$3 = tb.MessageInfos, ((i$1 < 0 || i$1 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$1])).GoReflectType = reflect.TypeOf(((i$1 < 0 || i$1 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$1])); - (x$5 = tb.MessageInfos, ((i$1 < 0 || i$1 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i$1])).Desc = (x$4 = fbOut.Messages, ((i$1 < 0 || i$1 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i$1])); - _r$2 = tb.TypeRegistry.RegisterMessage((x$6 = tb.MessageInfos, ((i$1 < 0 || i$1 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i$1]))); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $panic(err$1); - } - _i$1++; - $s = 9; continue; - case 10: - _r$3 = out.File.Path(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - if (!(_r$3 === "google/protobuf/descriptor.proto")) { _v = false; $s = 14; continue s; } - _r$4 = out.File.Package(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4 === "google.protobuf"; case 14: - /* */ if (_v) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_v) { */ case 12: - _ref$2 = fbOut.Messages; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - i$2 = _i$2; - _1 = (x$7 = fbOut.Messages, ((i$2 < 0 || i$2 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + i$2])).Base.Name(); - if (_1 === ("FileOptions")) { - descopts.File = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("EnumOptions")) { - descopts.Enum = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("EnumValueOptions")) { - descopts.EnumValue = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("MessageOptions")) { - descopts.Message = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("FieldOptions")) { - descopts.Field = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("OneofOptions")) { - descopts.Oneof = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("ExtensionRangeOptions")) { - descopts.ExtensionRange = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("ServiceOptions")) { - descopts.Service = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } else if (_1 === ("MethodOptions")) { - descopts.Method = $assertType(((i$2 < 0 || i$2 >= messageGoTypes.$length) ? ($throwRuntimeError("index out of range"), undefined) : messageGoTypes.$array[messageGoTypes.$offset + i$2]), protoreflect.ProtoMessage); - } - _i$2++; - } - /* } */ case 13: - /* } */ case 8: - if (!((tb.ExtensionInfos.$length === fbOut.Extensions.$length))) { - $panic(new $String("mismatching extension lengths")); - } - depIdx = 0; - _ref$3 = fbOut.Extensions; - _i$3 = 0; - /* while (true) { */ case 17: - /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 18; continue; } - i$3 = _i$3; - goType = $ifaceNil; - _2 = (x$8 = fbOut.Extensions, ((i$3 < 0 || i$3 >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + i$3])).L1.Kind; - if (_2 === (14)) { - j = $methodExpr(depIdxs, "Get")($convertSliceType(tb.DependencyIndexes, depIdxs), 2, depIdx); - goType = reflect.TypeOf((x$9 = tb.GoTypes, ((j < 0 || j >= x$9.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + j]))); - depIdx = depIdx + (1) >> 0; - } else if ((_2 === (11)) || (_2 === (10))) { - j$1 = $methodExpr(depIdxs, "Get")($convertSliceType(tb.DependencyIndexes, depIdxs), 2, depIdx); - goType = reflect.TypeOf((x$10 = tb.GoTypes, ((j$1 < 0 || j$1 >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + j$1]))); - depIdx = depIdx + (1) >> 0; - } else { - goType = (_entry = goTypeForPBKind[protoreflect.Kind.keyFor((x$11 = fbOut.Extensions, ((i$3 < 0 || i$3 >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + i$3])).L1.Kind)], _entry !== undefined ? _entry.v : $ifaceNil); - } - if ((x$12 = fbOut.Extensions, ((i$3 < 0 || i$3 >= x$12.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + i$3])).IsList()) { - goType = reflect.SliceOf(goType); - } - impl.InitExtensionInfo((x$13 = tb.ExtensionInfos, ((i$3 < 0 || i$3 >= x$13.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$13.$array[x$13.$offset + i$3])), (x$14 = fbOut.Extensions, ((i$3 < 0 || i$3 >= x$14.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$14.$array[x$14.$offset + i$3])), goType); - _r$5 = tb.TypeRegistry.RegisterExtension((x$15 = tb.ExtensionInfos, ((i$3 < 0 || i$3 >= x$15.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$15.$array[x$15.$offset + i$3]))); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$2 = _r$5; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $panic(err$2); - } - _i$3++; - $s = 17; continue; - case 18: - Out.copy(out, out); - $s = -1; return out; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.Build, $c: true, $r, _1, _2, _entry, _i, _i$1, _i$2, _i$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _ref$2, _ref$3, _v, depIdx, enumGoTypes, err, err$1, err$2, fbOut, goType, i, i$1, i$2, i$3, j, j$1, messageGoTypes, out, tb, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - Builder.prototype.Build = function() { return this.$val.Build(); }; - depIdxs.prototype.Get = function(i, j) { - var i, j, x, x$1, x$2; - x = this; - return (x$1 = (x$2 = (((x.$length >> 0)) - i >> 0) - 1 >> 0, ((x$2 < 0 || x$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$2])) + j >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - }; - $ptrType(depIdxs).prototype.Get = function(i, j) { return this.$get().Get(i, j); }; - resolverByIndex.ptr.prototype.FindEnumByIndex = function(i, j, es, ms) { - var {$24r, _r, depIdx, es, i, j, ms, r, x, $s, $r, $c} = $restore(this, {i, j, es, ms}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - depIdx = ((r.depIdxs.Get(i, j) >> 0)); - /* */ if ((depIdx) < (es.$length + ms.$length >> 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((depIdx) < (es.$length + ms.$length >> 0)) { */ case 1: - $s = -1; return ((depIdx < 0 || depIdx >= es.$length) ? ($throwRuntimeError("index out of range"), undefined) : es.$array[es.$offset + depIdx]); - /* } else { */ case 2: - _r = new impl.Export.ptr().EnumDescriptorOf((x = r.goTypes, ((depIdx < 0 || depIdx >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + depIdx]))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: resolverByIndex.ptr.prototype.FindEnumByIndex, $c: true, $r, $24r, _r, depIdx, es, i, j, ms, r, x, $s};return $f; - }; - resolverByIndex.prototype.FindEnumByIndex = function(i, j, es, ms) { return this.$val.FindEnumByIndex(i, j, es, ms); }; - resolverByIndex.ptr.prototype.FindMessageByIndex = function(i, j, es, ms) { - var {$24r, _r, depIdx, es, i, j, ms, r, x, x$1, $s, $r, $c} = $restore(this, {i, j, es, ms}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - depIdx = ((r.depIdxs.Get(i, j) >> 0)); - /* */ if (depIdx < (es.$length + ms.$length >> 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (depIdx < (es.$length + ms.$length >> 0)) { */ case 1: - $s = -1; return (x = depIdx - es.$length >> 0, ((x < 0 || x >= ms.$length) ? ($throwRuntimeError("index out of range"), undefined) : ms.$array[ms.$offset + x])); - /* } else { */ case 2: - _r = new impl.Export.ptr().MessageDescriptorOf((x$1 = r.goTypes, ((depIdx < 0 || depIdx >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + depIdx]))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: resolverByIndex.ptr.prototype.FindMessageByIndex, $c: true, $r, $24r, _r, depIdx, es, i, j, ms, r, x, x$1, $s};return $f; - }; - resolverByIndex.prototype.FindMessageByIndex = function(i, j, es, ms) { return this.$val.FindMessageByIndex(i, j, es, ms); }; - Builder.methods = [{prop: "Build", name: "Build", pkg: "", typ: $funcType([], [Out], false)}]; - depIdxs.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$Int32, $Int32], [$Int32], false)}]; - ptrType.methods = [{prop: "FindEnumByIndex", name: "FindEnumByIndex", pkg: "", typ: $funcType([$Int32, $Int32, sliceType$6, sliceType$7], [protoreflect.EnumDescriptor], false)}, {prop: "FindMessageByIndex", name: "FindMessageByIndex", pkg: "", typ: $funcType([$Int32, $Int32, sliceType$6, sliceType$7], [protoreflect.MessageDescriptor], false)}]; - Builder.init("", [{prop: "File", name: "File", embedded: false, exported: true, typ: filedesc.Builder, tag: ""}, {prop: "GoTypes", name: "GoTypes", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "DependencyIndexes", name: "DependencyIndexes", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "EnumInfos", name: "EnumInfos", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "MessageInfos", name: "MessageInfos", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "ExtensionInfos", name: "ExtensionInfos", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "TypeRegistry", name: "TypeRegistry", embedded: false, exported: true, typ: interfaceType, tag: ""}]); - Out.init("", [{prop: "File", name: "File", embedded: false, exported: true, typ: protoreflect.FileDescriptor, tag: ""}]); - depIdxs.init($Int32); - resolverByIndex.init("google.golang.org/protobuf/internal/filetype", [{prop: "goTypes", name: "goTypes", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "depIdxs", name: "depIdxs", embedded: false, exported: false, typ: depIdxs, tag: ""}, {prop: "fileRegistry", name: "fileRegistry", embedded: true, exported: false, typ: fileRegistry, tag: ""}]); - fileRegistry.init([{prop: "FindDescriptorByName", name: "FindDescriptorByName", pkg: "", typ: $funcType([protoreflect.FullName], [protoreflect.Descriptor, $error], false)}, {prop: "FindFileByPath", name: "FindFileByPath", pkg: "", typ: $funcType([$String], [protoreflect.FileDescriptor, $error], false)}, {prop: "RegisterFile", name: "RegisterFile", pkg: "", typ: $funcType([protoreflect.FileDescriptor], [$error], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = descopts.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filedesc.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = impl.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoregistry.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - goTypeForPBKind = $makeMap(protoreflect.Kind.keyFor, [{ k: 8, v: reflect.TypeOf(new $Bool(false)) }, { k: 5, v: reflect.TypeOf(new $Int32(0)) }, { k: 17, v: reflect.TypeOf(new $Int32(0)) }, { k: 15, v: reflect.TypeOf(new $Int32(0)) }, { k: 3, v: reflect.TypeOf(new $Int64(0, 0)) }, { k: 18, v: reflect.TypeOf(new $Int64(0, 0)) }, { k: 16, v: reflect.TypeOf(new $Int64(0, 0)) }, { k: 13, v: reflect.TypeOf(new $Uint32(0)) }, { k: 7, v: reflect.TypeOf(new $Uint32(0)) }, { k: 4, v: reflect.TypeOf(new $Uint64(0, 0)) }, { k: 6, v: reflect.TypeOf(new $Uint64(0, 0)) }, { k: 2, v: reflect.TypeOf(new $Float32(0)) }, { k: 1, v: reflect.TypeOf(new $Float64(0)) }, { k: 9, v: reflect.TypeOf(new $String("")) }, { k: 12, v: reflect.TypeOf((sliceType.nil)) }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/internal/version"] = (function() { - var $pkg = {}, $init, fmt, strings; - fmt = $packages["fmt"]; - strings = $packages["strings"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["google.golang.org/protobuf/runtime/protoimpl"] = (function() { - var $pkg = {}, $init, filedesc, filetype, impl, version; - filedesc = $packages["google.golang.org/protobuf/internal/filedesc"]; - filetype = $packages["google.golang.org/protobuf/internal/filetype"]; - impl = $packages["google.golang.org/protobuf/internal/impl"]; - version = $packages["google.golang.org/protobuf/internal/version"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = filedesc.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filetype.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = impl.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = version.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.X = new impl.Export.ptr(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["dnmshared/sharedprotos"] = (function() { - var $pkg = {}, $init, protoreflect, protoimpl, reflect, sync, Direction, Vec2D, Polygon2D, Vec2DList, Polygon2DList, x, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, sliceType$3, funcType, arrayType, arrayType$1, ptrType$5, sliceType$4, sliceType$5, sliceType$6, ptrType$6, ptrType$7, sliceType$7, sliceType$8, file_geometry_proto_rawDesc, file_geometry_proto_rawDescOnce, file_geometry_proto_rawDescData, file_geometry_proto_msgTypes, file_geometry_proto_goTypes, file_geometry_proto_depIdxs, file_geometry_proto_rawDescGZIP, init, file_geometry_proto_init; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoimpl = $packages["google.golang.org/protobuf/runtime/protoimpl"]; - reflect = $packages["reflect"]; - sync = $packages["sync"]; - Direction = $pkg.Direction = $newType(0, $kindStruct, "sharedprotos.Direction", true, "dnmshared/sharedprotos", true, function(state_, sizeCache_, unknownFields_, Dx_, Dy_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Dx = 0; - this.Dy = 0; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Dx = Dx_; - this.Dy = Dy_; - }); - Vec2D = $pkg.Vec2D = $newType(0, $kindStruct, "sharedprotos.Vec2D", true, "dnmshared/sharedprotos", true, function(state_, sizeCache_, unknownFields_, X_, Y_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.X = 0; - this.Y = 0; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.X = X_; - this.Y = Y_; - }); - Polygon2D = $pkg.Polygon2D = $newType(0, $kindStruct, "sharedprotos.Polygon2D", true, "dnmshared/sharedprotos", true, function(state_, sizeCache_, unknownFields_, Anchor_, Points_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Anchor = ptrType$1.nil; - this.Points = sliceType$5.nil; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Anchor = Anchor_; - this.Points = Points_; - }); - Vec2DList = $pkg.Vec2DList = $newType(0, $kindStruct, "sharedprotos.Vec2DList", true, "dnmshared/sharedprotos", true, function(state_, sizeCache_, unknownFields_, Eles_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Eles = sliceType$5.nil; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Eles = Eles_; - }); - Polygon2DList = $pkg.Polygon2DList = $newType(0, $kindStruct, "sharedprotos.Polygon2DList", true, "dnmshared/sharedprotos", true, function(state_, sizeCache_, unknownFields_, Eles_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Eles = sliceType$6.nil; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Eles = Eles_; - }); - x = $newType(0, $kindStruct, "sharedprotos.x", true, "dnmshared/sharedprotos", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - sliceType$2 = $sliceType($emptyInterface); - ptrType = $ptrType(Direction); - ptrType$1 = $ptrType(Vec2D); - ptrType$2 = $ptrType(Polygon2D); - ptrType$3 = $ptrType(Vec2DList); - ptrType$4 = $ptrType(Polygon2DList); - sliceType$3 = $sliceType($Int32); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - arrayType$1 = $arrayType(sync.Mutex, 0); - ptrType$5 = $ptrType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - sliceType$4 = $sliceType($Int); - sliceType$5 = $sliceType(ptrType$1); - sliceType$6 = $sliceType(ptrType$2); - ptrType$6 = $ptrType($Int32); - ptrType$7 = $ptrType(sliceType); - sliceType$7 = $sliceType($packages["google.golang.org/protobuf/internal/impl"].EnumInfo); - sliceType$8 = $sliceType($packages["google.golang.org/protobuf/internal/impl"].ExtensionInfo); - Direction.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - Direction.copy(x, new Direction.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType.nil, 0, 0)); - if (false) { - mi = (0 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 0]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - Direction.prototype.Reset = function() { return this.$val.Reset(); }; - Direction.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Direction.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Direction.prototype.String = function() { return this.$val.String(); }; - Direction.ptr.prototype.ProtoMessage = function() { - }; - Direction.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Direction.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (0 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 0]); - if (false && !(x === ptrType.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$5.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Direction.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - Direction.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - Direction.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_geometry_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([0])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Direction.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - Direction.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - Direction.ptr.prototype.GetDx = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Dx; - } - return 0; - }; - Direction.prototype.GetDx = function() { return this.$val.GetDx(); }; - Direction.ptr.prototype.GetDy = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Dy; - } - return 0; - }; - Direction.prototype.GetDy = function() { return this.$val.GetDy(); }; - Vec2D.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - Vec2D.copy(x, new Vec2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType.nil, 0, 0)); - if (false) { - mi = (1 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 1]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - Vec2D.prototype.Reset = function() { return this.$val.Reset(); }; - Vec2D.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Vec2D.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Vec2D.prototype.String = function() { return this.$val.String(); }; - Vec2D.ptr.prototype.ProtoMessage = function() { - }; - Vec2D.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Vec2D.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (1 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 1]); - if (false && !(x === ptrType$1.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$5.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Vec2D.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - Vec2D.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - Vec2D.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_geometry_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([1])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Vec2D.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - Vec2D.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - Vec2D.ptr.prototype.GetX = function() { - var x; - x = this; - if (!(x === ptrType$1.nil)) { - return x.X; - } - return 0; - }; - Vec2D.prototype.GetX = function() { return this.$val.GetX(); }; - Vec2D.ptr.prototype.GetY = function() { - var x; - x = this; - if (!(x === ptrType$1.nil)) { - return x.Y; - } - return 0; - }; - Vec2D.prototype.GetY = function() { return this.$val.GetY(); }; - Polygon2D.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - Polygon2D.copy(x, new Polygon2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType.nil, ptrType$1.nil, sliceType$5.nil)); - if (false) { - mi = (2 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 2]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - Polygon2D.prototype.Reset = function() { return this.$val.Reset(); }; - Polygon2D.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Polygon2D.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Polygon2D.prototype.String = function() { return this.$val.String(); }; - Polygon2D.ptr.prototype.ProtoMessage = function() { - }; - Polygon2D.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Polygon2D.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (2 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 2]); - if (false && !(x === ptrType$2.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$5.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Polygon2D.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - Polygon2D.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - Polygon2D.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_geometry_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([2])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Polygon2D.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - Polygon2D.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - Polygon2D.ptr.prototype.GetAnchor = function() { - var x; - x = this; - if (!(x === ptrType$2.nil)) { - return x.Anchor; - } - return ptrType$1.nil; - }; - Polygon2D.prototype.GetAnchor = function() { return this.$val.GetAnchor(); }; - Polygon2D.ptr.prototype.GetPoints = function() { - var x; - x = this; - if (!(x === ptrType$2.nil)) { - return x.Points; - } - return sliceType$5.nil; - }; - Polygon2D.prototype.GetPoints = function() { return this.$val.GetPoints(); }; - Vec2DList.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - Vec2DList.copy(x, new Vec2DList.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType.nil, sliceType$5.nil)); - if (false) { - mi = (3 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 3]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - Vec2DList.prototype.Reset = function() { return this.$val.Reset(); }; - Vec2DList.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Vec2DList.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Vec2DList.prototype.String = function() { return this.$val.String(); }; - Vec2DList.ptr.prototype.ProtoMessage = function() { - }; - Vec2DList.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Vec2DList.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (3 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 3]); - if (false && !(x === ptrType$3.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$5.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Vec2DList.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - Vec2DList.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - Vec2DList.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_geometry_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([3])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Vec2DList.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - Vec2DList.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - Vec2DList.ptr.prototype.GetEles = function() { - var x; - x = this; - if (!(x === ptrType$3.nil)) { - return x.Eles; - } - return sliceType$5.nil; - }; - Vec2DList.prototype.GetEles = function() { return this.$val.GetEles(); }; - Polygon2DList.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - Polygon2DList.copy(x, new Polygon2DList.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType.nil, sliceType$6.nil)); - if (false) { - mi = (4 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 4]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - Polygon2DList.prototype.Reset = function() { return this.$val.Reset(); }; - Polygon2DList.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Polygon2DList.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Polygon2DList.prototype.String = function() { return this.$val.String(); }; - Polygon2DList.ptr.prototype.ProtoMessage = function() { - }; - Polygon2DList.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Polygon2DList.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (4 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 4]); - if (false && !(x === ptrType$4.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$5.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Polygon2DList.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - Polygon2DList.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - Polygon2DList.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_geometry_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([4])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Polygon2DList.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - Polygon2DList.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - Polygon2DList.ptr.prototype.GetEles = function() { - var x; - x = this; - if (!(x === ptrType$4.nil)) { - return x.Eles; - } - return sliceType$6.nil; - }; - Polygon2DList.prototype.GetEles = function() { return this.$val.GetEles(); }; - file_geometry_proto_rawDescGZIP = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = file_geometry_proto_rawDescOnce.Do((function $b() { - var {_r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).CompressGZIP(file_geometry_proto_rawDescData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - file_geometry_proto_rawDescData = _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, $s};return $f; - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return file_geometry_proto_rawDescData; - /* */ } return; } var $f = {$blk: file_geometry_proto_rawDescGZIP, $c: true, $r, $s};return $f; - }; - init = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = file_geometry_proto_init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, $s};return $f; - }; - file_geometry_proto_init = function() { - var {_r, _r$1, out, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!($interfaceIsEqual($pkg.File_geometry_proto, $ifaceNil))) { - $s = -1; return; - } - /* */ if (true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true) { */ case 1: - (0 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 0]).Exporter = (function(v, i) { - var _1, i, v, v$1; - v$1 = $assertType(v, ptrType); - _1 = i; - if (_1 === (0)) { - return v$1.state; - } else if (_1 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$6(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_1 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$7(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (1 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 1]).Exporter = (function(v, i) { - var _2, i, v, v$1; - v$1 = $assertType(v, ptrType$1); - _2 = i; - if (_2 === (0)) { - return v$1.state; - } else if (_2 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$6(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_2 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$7(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (2 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 2]).Exporter = (function(v, i) { - var _3, i, v, v$1; - v$1 = $assertType(v, ptrType$2); - _3 = i; - if (_3 === (0)) { - return v$1.state; - } else if (_3 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$6(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_3 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$7(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (3 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 3]).Exporter = (function(v, i) { - var _4, i, v, v$1; - v$1 = $assertType(v, ptrType$3); - _4 = i; - if (_4 === (0)) { - return v$1.state; - } else if (_4 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$6(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_4 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$7(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (4 >= file_geometry_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_geometry_proto_msgTypes.$array[file_geometry_proto_msgTypes.$offset + 4]).Exporter = (function(v, i) { - var _5, i, v, v$1; - v$1 = $assertType(v, ptrType$4); - _5 = i; - if (_5 === (0)) { - return v$1.state; - } else if (_5 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$6(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_5 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$7(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - /* } */ case 2: - _r = reflect.TypeOf((x$1 = new x.ptr(), new x$1.constructor.elem(x$1))).PkgPath(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = new $packages["google.golang.org/protobuf/internal/filetype"].Builder.ptr(new $packages["google.golang.org/protobuf/internal/filedesc"].Builder.ptr(_r, file_geometry_proto_rawDesc, 0, 5, 0, 0, $ifaceNil, $ifaceNil), file_geometry_proto_goTypes, file_geometry_proto_depIdxs, sliceType$7.nil, file_geometry_proto_msgTypes, sliceType$8.nil, $ifaceNil).Build(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - out = $clone(_r$1, $packages["google.golang.org/protobuf/internal/filetype"].Out); - $pkg.File_geometry_proto = out.File; - file_geometry_proto_rawDesc = sliceType.nil; - file_geometry_proto_goTypes = sliceType$2.nil; - file_geometry_proto_depIdxs = sliceType$3.nil; - $s = -1; return; - /* */ } return; } var $f = {$blk: file_geometry_proto_init, $c: true, $r, _r, _r$1, out, x$1, $s};return $f; - }; - ptrType.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetDx", name: "GetDx", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetDy", name: "GetDy", pkg: "", typ: $funcType([], [$Int32], false)}]; - ptrType$1.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetX", name: "GetX", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetY", name: "GetY", pkg: "", typ: $funcType([], [$Float64], false)}]; - ptrType$2.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetAnchor", name: "GetAnchor", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "GetPoints", name: "GetPoints", pkg: "", typ: $funcType([], [sliceType$5], false)}]; - ptrType$3.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetEles", name: "GetEles", pkg: "", typ: $funcType([], [sliceType$5], false)}]; - ptrType$4.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetEles", name: "GetEles", pkg: "", typ: $funcType([], [sliceType$6], false)}]; - Direction.init("dnmshared/sharedprotos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Dx", name: "Dx", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=dx,proto3\" json:\"dx,omitempty\""}, {prop: "Dy", name: "Dy", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,2,opt,name=dy,proto3\" json:\"dy,omitempty\""}]); - Vec2D.init("dnmshared/sharedprotos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,1,opt,name=x,proto3\" json:\"x,omitempty\""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,2,opt,name=y,proto3\" json:\"y,omitempty\""}]); - Polygon2D.init("dnmshared/sharedprotos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Anchor", name: "Anchor", embedded: false, exported: true, typ: ptrType$1, tag: "protobuf:\"bytes,1,opt,name=anchor,proto3\" json:\"anchor,omitempty\""}, {prop: "Points", name: "Points", embedded: false, exported: true, typ: sliceType$5, tag: "protobuf:\"bytes,2,rep,name=points,proto3\" json:\"points,omitempty\""}]); - Vec2DList.init("dnmshared/sharedprotos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Eles", name: "Eles", embedded: false, exported: true, typ: sliceType$5, tag: "protobuf:\"bytes,1,rep,name=eles,proto3\" json:\"eles,omitempty\""}]); - Polygon2DList.init("dnmshared/sharedprotos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Eles", name: "Eles", embedded: false, exported: true, typ: sliceType$6, tag: "protobuf:\"bytes,1,rep,name=eles,proto3\" json:\"eles,omitempty\""}]); - x.init("", []); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = protoreflect.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoimpl.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.File_geometry_proto = $ifaceNil; - file_geometry_proto_rawDescOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - file_geometry_proto_rawDesc = new sliceType([10, 14, 103, 101, 111, 109, 101, 116, 114, 121, 46, 112, 114, 111, 116, 111, 18, 12, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 34, 43, 10, 9, 68, 105, 114, 101, 99, 116, 105, 111, 110, 18, 14, 10, 2, 100, 120, 24, 1, 32, 1, 40, 5, 82, 2, 100, 120, 18, 14, 10, 2, 100, 121, 24, 2, 32, 1, 40, 5, 82, 2, 100, 121, 34, 35, 10, 5, 86, 101, 99, 50, 68, 18, 12, 10, 1, 120, 24, 1, 32, 1, 40, 1, 82, 1, 120, 18, 12, 10, 1, 121, 24, 2, 32, 1, 40, 1, 82, 1, 121, 34, 101, 10, 9, 80, 111, 108, 121, 103, 111, 110, 50, 68, 18, 43, 10, 6, 97, 110, 99, 104, 111, 114, 24, 1, 32, 1, 40, 11, 50, 19, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 86, 101, 99, 50, 68, 82, 6, 97, 110, 99, 104, 111, 114, 18, 43, 10, 6, 112, 111, 105, 110, 116, 115, 24, 2, 32, 3, 40, 11, 50, 19, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 86, 101, 99, 50, 68, 82, 6, 112, 111, 105, 110, 116, 115, 34, 52, 10, 9, 86, 101, 99, 50, 68, 76, 105, 115, 116, 18, 39, 10, 4, 101, 108, 101, 115, 24, 1, 32, 3, 40, 11, 50, 19, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 86, 101, 99, 50, 68, 82, 4, 101, 108, 101, 115, 34, 60, 10, 13, 80, 111, 108, 121, 103, 111, 110, 50, 68, 76, 105, 115, 116, 18, 43, 10, 4, 101, 108, 101, 115, 24, 1, 32, 3, 40, 11, 50, 23, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 80, 111, 108, 121, 103, 111, 110, 50, 68, 82, 4, 101, 108, 101, 115, 66, 24, 90, 22, 100, 110, 109, 115, 104, 97, 114, 101, 100, 47, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 98, 6, 112, 114, 111, 116, 111, 51]); - file_geometry_proto_rawDescData = file_geometry_proto_rawDesc; - file_geometry_proto_msgTypes = $makeSlice(sliceType$1, 5); - file_geometry_proto_goTypes = new sliceType$2([(ptrType.nil), (ptrType$1.nil), (ptrType$2.nil), (ptrType$3.nil), (ptrType$4.nil)]); - file_geometry_proto_depIdxs = new sliceType$3([1, 1, 1, 2, 4, 4, 4, 4, 0]); - $r = init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/xml"] = (function() { - var $pkg = {}, $init, bufio, bytes, encoding, errors, fmt, io, reflect, strconv, strings, sync, unicode, utf8, SyntaxError, Name, Attr, Token, StartElement, EndElement, CharData, Comment, ProcInst, Directive, TokenReader, Decoder, stack, typeInfo, fieldInfo, fieldFlags, TagPathError, UnmarshalError, Unmarshaler, UnmarshalerAttr, Marshaler, MarshalerAttr, Encoder, printer, parentStack, UnsupportedTypeError, sliceType, sliceType$1, sliceType$2, sliceType$3, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, sliceType$4, ptrType$6, ptrType$7, ptrType$8, sliceType$5, ptrType$9, ptrType$10, sliceType$6, sliceType$7, ptrType$11, ptrType$12, sliceType$8, ptrType$13, ptrType$14, sliceType$9, ptrType$15, arrayType, ptrType$16, ptrType$17, ptrType$18, mapType, funcType, ptrType$19, ptrType$20, ptrType$21, errRawToken, entity, first, second, escQuot, escApos, escAmp, escLT, escGT, escTab, escNL, escCR, escFFFD, cdataStart, cdataEnd, cdataEscape, tinfoMap, nameType, attrType, unmarshalerType, unmarshalerAttrType, textUnmarshalerType, errExeceededMaxUnmarshalDepth, begComment, endComment, endProcInst, marshalerType, marshalerAttrType, textMarshalerType, ddBytes, x, x$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, makeCopy, isInCharacterRange, isNameByte, isName, isNameString, EscapeText, escapeText, emitCDATA, procInst, getTypeInfo, structFieldInfo, lookupXMLName, min, addFieldInfo, receiverType, copyValue, isValidDirective, defaultStart, indirect, isEmptyValue; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - encoding = $packages["encoding"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - reflect = $packages["reflect"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - SyntaxError = $pkg.SyntaxError = $newType(0, $kindStruct, "xml.SyntaxError", true, "encoding/xml", true, function(Msg_, Line_) { - this.$val = this; - if (arguments.length === 0) { - this.Msg = ""; - this.Line = 0; - return; - } - this.Msg = Msg_; - this.Line = Line_; - }); - Name = $pkg.Name = $newType(0, $kindStruct, "xml.Name", true, "encoding/xml", true, function(Space_, Local_) { - this.$val = this; - if (arguments.length === 0) { - this.Space = ""; - this.Local = ""; - return; - } - this.Space = Space_; - this.Local = Local_; - }); - Attr = $pkg.Attr = $newType(0, $kindStruct, "xml.Attr", true, "encoding/xml", true, function(Name_, Value_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = new Name.ptr("", ""); - this.Value = ""; - return; - } - this.Name = Name_; - this.Value = Value_; - }); - Token = $pkg.Token = $newType(8, $kindInterface, "xml.Token", true, "encoding/xml", true, null); - StartElement = $pkg.StartElement = $newType(0, $kindStruct, "xml.StartElement", true, "encoding/xml", true, function(Name_, Attr_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = new Name.ptr("", ""); - this.Attr = sliceType$4.nil; - return; - } - this.Name = Name_; - this.Attr = Attr_; - }); - EndElement = $pkg.EndElement = $newType(0, $kindStruct, "xml.EndElement", true, "encoding/xml", true, function(Name_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = new Name.ptr("", ""); - return; - } - this.Name = Name_; - }); - CharData = $pkg.CharData = $newType(12, $kindSlice, "xml.CharData", true, "encoding/xml", true, null); - Comment = $pkg.Comment = $newType(12, $kindSlice, "xml.Comment", true, "encoding/xml", true, null); - ProcInst = $pkg.ProcInst = $newType(0, $kindStruct, "xml.ProcInst", true, "encoding/xml", true, function(Target_, Inst_) { - this.$val = this; - if (arguments.length === 0) { - this.Target = ""; - this.Inst = sliceType$3.nil; - return; - } - this.Target = Target_; - this.Inst = Inst_; - }); - Directive = $pkg.Directive = $newType(12, $kindSlice, "xml.Directive", true, "encoding/xml", true, null); - TokenReader = $pkg.TokenReader = $newType(8, $kindInterface, "xml.TokenReader", true, "encoding/xml", true, null); - Decoder = $pkg.Decoder = $newType(0, $kindStruct, "xml.Decoder", true, "encoding/xml", true, function(Strict_, AutoClose_, Entity_, CharsetReader_, DefaultSpace_, r_, t_, buf_, saved_, stk_, free_, needClose_, toClose_, nextToken_, nextByte_, ns_, err_, line_, offset_, unmarshalDepth_) { - this.$val = this; - if (arguments.length === 0) { - this.Strict = false; - this.AutoClose = sliceType$2.nil; - this.Entity = false; - this.CharsetReader = $throwNilPointerError; - this.DefaultSpace = ""; - this.r = $ifaceNil; - this.t = $ifaceNil; - this.buf = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - this.saved = ptrType$6.nil; - this.stk = ptrType$7.nil; - this.free = ptrType$7.nil; - this.needClose = false; - this.toClose = new Name.ptr("", ""); - this.nextToken = $ifaceNil; - this.nextByte = 0; - this.ns = false; - this.err = $ifaceNil; - this.line = 0; - this.offset = new $Int64(0, 0); - this.unmarshalDepth = 0; - return; - } - this.Strict = Strict_; - this.AutoClose = AutoClose_; - this.Entity = Entity_; - this.CharsetReader = CharsetReader_; - this.DefaultSpace = DefaultSpace_; - this.r = r_; - this.t = t_; - this.buf = buf_; - this.saved = saved_; - this.stk = stk_; - this.free = free_; - this.needClose = needClose_; - this.toClose = toClose_; - this.nextToken = nextToken_; - this.nextByte = nextByte_; - this.ns = ns_; - this.err = err_; - this.line = line_; - this.offset = offset_; - this.unmarshalDepth = unmarshalDepth_; - }); - stack = $pkg.stack = $newType(0, $kindStruct, "xml.stack", true, "encoding/xml", false, function(next_, kind_, name_, ok_) { - this.$val = this; - if (arguments.length === 0) { - this.next = ptrType$7.nil; - this.kind = 0; - this.name = new Name.ptr("", ""); - this.ok = false; - return; - } - this.next = next_; - this.kind = kind_; - this.name = name_; - this.ok = ok_; - }); - typeInfo = $pkg.typeInfo = $newType(0, $kindStruct, "xml.typeInfo", true, "encoding/xml", false, function(xmlname_, fields_) { - this.$val = this; - if (arguments.length === 0) { - this.xmlname = ptrType$10.nil; - this.fields = sliceType$6.nil; - return; - } - this.xmlname = xmlname_; - this.fields = fields_; - }); - fieldInfo = $pkg.fieldInfo = $newType(0, $kindStruct, "xml.fieldInfo", true, "encoding/xml", false, function(idx_, name_, xmlns_, flags_, parents_) { - this.$val = this; - if (arguments.length === 0) { - this.idx = sliceType$7.nil; - this.name = ""; - this.xmlns = ""; - this.flags = 0; - this.parents = sliceType$2.nil; - return; - } - this.idx = idx_; - this.name = name_; - this.xmlns = xmlns_; - this.flags = flags_; - this.parents = parents_; - }); - fieldFlags = $pkg.fieldFlags = $newType(4, $kindInt, "xml.fieldFlags", true, "encoding/xml", false, null); - TagPathError = $pkg.TagPathError = $newType(0, $kindStruct, "xml.TagPathError", true, "encoding/xml", true, function(Struct_, Field1_, Tag1_, Field2_, Tag2_) { - this.$val = this; - if (arguments.length === 0) { - this.Struct = $ifaceNil; - this.Field1 = ""; - this.Tag1 = ""; - this.Field2 = ""; - this.Tag2 = ""; - return; - } - this.Struct = Struct_; - this.Field1 = Field1_; - this.Tag1 = Tag1_; - this.Field2 = Field2_; - this.Tag2 = Tag2_; - }); - UnmarshalError = $pkg.UnmarshalError = $newType(8, $kindString, "xml.UnmarshalError", true, "encoding/xml", true, null); - Unmarshaler = $pkg.Unmarshaler = $newType(8, $kindInterface, "xml.Unmarshaler", true, "encoding/xml", true, null); - UnmarshalerAttr = $pkg.UnmarshalerAttr = $newType(8, $kindInterface, "xml.UnmarshalerAttr", true, "encoding/xml", true, null); - Marshaler = $pkg.Marshaler = $newType(8, $kindInterface, "xml.Marshaler", true, "encoding/xml", true, null); - MarshalerAttr = $pkg.MarshalerAttr = $newType(8, $kindInterface, "xml.MarshalerAttr", true, "encoding/xml", true, null); - Encoder = $pkg.Encoder = $newType(0, $kindStruct, "xml.Encoder", true, "encoding/xml", true, function(p_) { - this.$val = this; - if (arguments.length === 0) { - this.p = new printer.ptr(ptrType$13.nil, ptrType$14.nil, 0, "", "", 0, false, false, false, false, sliceType$2.nil, sliceType$9.nil); - return; - } - this.p = p_; - }); - printer = $pkg.printer = $newType(0, $kindStruct, "xml.printer", true, "encoding/xml", false, function(Writer_, encoder_, seq_, indent_, prefix_, depth_, indentedIn_, putNewline_, attrNS_, attrPrefix_, prefixes_, tags_) { - this.$val = this; - if (arguments.length === 0) { - this.Writer = ptrType$13.nil; - this.encoder = ptrType$14.nil; - this.seq = 0; - this.indent = ""; - this.prefix = ""; - this.depth = 0; - this.indentedIn = false; - this.putNewline = false; - this.attrNS = false; - this.attrPrefix = false; - this.prefixes = sliceType$2.nil; - this.tags = sliceType$9.nil; - return; - } - this.Writer = Writer_; - this.encoder = encoder_; - this.seq = seq_; - this.indent = indent_; - this.prefix = prefix_; - this.depth = depth_; - this.indentedIn = indentedIn_; - this.putNewline = putNewline_; - this.attrNS = attrNS_; - this.attrPrefix = attrPrefix_; - this.prefixes = prefixes_; - this.tags = tags_; - }); - parentStack = $pkg.parentStack = $newType(0, $kindStruct, "xml.parentStack", true, "encoding/xml", false, function(p_, stack_) { - this.$val = this; - if (arguments.length === 0) { - this.p = ptrType$15.nil; - this.stack = sliceType$2.nil; - return; - } - this.p = p_; - this.stack = stack_; - }); - UnsupportedTypeError = $pkg.UnsupportedTypeError = $newType(0, $kindStruct, "xml.UnsupportedTypeError", true, "encoding/xml", true, function(Type_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = $ifaceNil; - return; - } - this.Type = Type_; - }); - sliceType = $sliceType(unicode.Range16); - sliceType$1 = $sliceType(unicode.Range32); - sliceType$2 = $sliceType($String); - sliceType$3 = $sliceType($Uint8); - ptrType = $ptrType(Unmarshaler); - ptrType$1 = $ptrType(UnmarshalerAttr); - ptrType$2 = $ptrType(encoding.TextUnmarshaler); - ptrType$3 = $ptrType(Marshaler); - ptrType$4 = $ptrType(MarshalerAttr); - ptrType$5 = $ptrType(encoding.TextMarshaler); - sliceType$4 = $sliceType(Attr); - ptrType$6 = $ptrType(bytes.Buffer); - ptrType$7 = $ptrType(stack); - ptrType$8 = $ptrType(Decoder); - sliceType$5 = $sliceType($emptyInterface); - ptrType$9 = $ptrType(typeInfo); - ptrType$10 = $ptrType(fieldInfo); - sliceType$6 = $sliceType(fieldInfo); - sliceType$7 = $sliceType($Int); - ptrType$11 = $ptrType(reflect.rtype); - ptrType$12 = $ptrType(StartElement); - sliceType$8 = $sliceType(reflect.Value); - ptrType$13 = $ptrType(bufio.Writer); - ptrType$14 = $ptrType(Encoder); - sliceType$9 = $sliceType(Name); - ptrType$15 = $ptrType(printer); - arrayType = $arrayType($Uint8, 64); - ptrType$16 = $ptrType(SyntaxError); - ptrType$17 = $ptrType(Name); - ptrType$18 = $ptrType(EndElement); - mapType = $mapType($String, $String); - funcType = $funcType([$String, io.Reader], [io.Reader, $error], false); - ptrType$19 = $ptrType(TagPathError); - ptrType$20 = $ptrType(parentStack); - ptrType$21 = $ptrType(UnsupportedTypeError); - SyntaxError.ptr.prototype.Error = function() { - var e; - e = this; - return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg; - }; - SyntaxError.prototype.Error = function() { return this.$val.Error(); }; - StartElement.ptr.prototype.Copy = function() { - var attrs, e; - e = this; - attrs = $makeSlice(sliceType$4, e.Attr.$length); - $copySlice(attrs, e.Attr); - e.Attr = attrs; - return e; - }; - StartElement.prototype.Copy = function() { return this.$val.Copy(); }; - StartElement.ptr.prototype.End = function() { - var e; - e = this; - return new EndElement.ptr($clone(e.Name, Name)); - }; - StartElement.prototype.End = function() { return this.$val.End(); }; - makeCopy = function(b) { - var b, b1; - b1 = $makeSlice(sliceType$3, b.$length); - $copySlice(b1, b); - return b1; - }; - CharData.prototype.Copy = function() { - var c; - c = this; - return ($convertSliceType(makeCopy($convertSliceType(c, sliceType$3)), CharData)); - }; - $ptrType(CharData).prototype.Copy = function() { return this.$get().Copy(); }; - Comment.prototype.Copy = function() { - var c; - c = this; - return ($convertSliceType(makeCopy($convertSliceType(c, sliceType$3)), Comment)); - }; - $ptrType(Comment).prototype.Copy = function() { return this.$get().Copy(); }; - ProcInst.ptr.prototype.Copy = function() { - var p; - p = this; - p.Inst = makeCopy(p.Inst); - return p; - }; - ProcInst.prototype.Copy = function() { return this.$val.Copy(); }; - Directive.prototype.Copy = function() { - var d; - d = this; - return ($convertSliceType(makeCopy($convertSliceType(d, sliceType$3)), Directive)); - }; - $ptrType(Directive).prototype.Copy = function() { return this.$get().Copy(); }; - Decoder.ptr.prototype.Token = function() { - var {_entry, _entry$1, _i, _i$1, _key, _key$1, _r$6, _r$7, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _tuple$3, a, d, err, i, ok, ok$1, ok$2, t, t1, t1$1, t1$2, v, v$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t1 = [t1]; - d = this; - t = $ifaceNil; - err = $ifaceNil; - if (!(d.stk === ptrType$7.nil) && (d.stk.kind === 2)) { - $s = -1; return [$ifaceNil, io.EOF]; - } - /* */ if (!($interfaceIsEqual(d.nextToken, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(d.nextToken, $ifaceNil))) { */ case 1: - t = d.nextToken; - d.nextToken = $ifaceNil; - $s = 3; continue; - /* } else { */ case 2: - _r$6 = d.rawToken(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - t = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(t, $ifaceNil) && !($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF) && !(d.stk === ptrType$7.nil) && !((d.stk.kind === 2))) { - err = d.syntaxError("unexpected EOF"); - } - $s = -1; return [$ifaceNil, err]; - } - err = $ifaceNil; - /* } */ case 3: - /* */ if (!d.Strict) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!d.Strict) { */ case 5: - _r$7 = d.autoClose(t); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - t1$1 = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - d.nextToken = t; - t = t1$1; - } - /* } */ case 6: - _ref = t; - if ($assertType(_ref, StartElement, true)[1]) { - t1$2 = $clone(_ref.$val, StartElement); - _ref$1 = t1$2.Attr; - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - a = $clone(((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]), Attr); - if (a.Name.Space === "xmlns") { - _tuple$2 = (_entry = d.ns[$String.keyFor(a.Name.Local)], _entry !== undefined ? [_entry.v, true] : ["", false]); - v = _tuple$2[0]; - ok$1 = _tuple$2[1]; - d.pushNs(a.Name.Local, v, ok$1); - _key = a.Name.Local; (d.ns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: a.Value }; - } - if (a.Name.Space === "" && a.Name.Local === "xmlns") { - _tuple$3 = (_entry$1 = d.ns[$String.keyFor("")], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]); - v$1 = _tuple$3[0]; - ok$2 = _tuple$3[1]; - d.pushNs("", v$1, ok$2); - _key$1 = ""; (d.ns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: a.Value }; - } - _i++; - } - d.translate(t1$2.Name, true); - _ref$2 = t1$2.Attr; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$2.$length)) { break; } - i = _i$1; - d.translate((x$2 = t1$2.Attr, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])).Name, false); - _i$1++; - } - d.pushElement($clone(t1$2.Name, Name)); - t = new t1$2.constructor.elem(t1$2); - } else if ($assertType(_ref, EndElement, true)[1]) { - t1[0] = $clone(_ref.$val, EndElement); - d.translate(t1[0].Name, true); - if (!d.popElement(t1[0])) { - $s = -1; return [$ifaceNil, d.err]; - } - t = new t1[0].constructor.elem(t1[0]); - } - $s = -1; return [t, err]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.Token, $c: true, $r, _entry, _entry$1, _i, _i$1, _key, _key$1, _r$6, _r$7, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _tuple$3, a, d, err, i, ok, ok$1, ok$2, t, t1, t1$1, t1$2, v, v$1, x$2, $s};return $f; - }; - Decoder.prototype.Token = function() { return this.$val.Token(); }; - Decoder.ptr.prototype.translate = function(n, isElementName) { - var _entry, _tuple, d, isElementName, n, ok, v; - d = this; - if (n.Space === "xmlns") { - return; - } else if (n.Space === "" && !isElementName) { - return; - } else if (n.Space === "xml") { - n.Space = "http://www.w3.org/XML/1998/namespace"; - } else if (n.Space === "" && n.Local === "xmlns") { - return; - } - _tuple = (_entry = d.ns[$String.keyFor(n.Space)], _entry !== undefined ? [_entry.v, true] : ["", false]); - v = _tuple[0]; - ok = _tuple[1]; - if (ok) { - n.Space = v; - } else if (n.Space === "") { - n.Space = d.DefaultSpace; - } - }; - Decoder.prototype.translate = function(n, isElementName) { return this.$val.translate(n, isElementName); }; - Decoder.ptr.prototype.switchToReader = function(r) { - var _tuple, d, ok, r, rb; - d = this; - _tuple = $assertType(r, io.ByteReader, true); - rb = _tuple[0]; - ok = _tuple[1]; - if (ok) { - d.r = rb; - } else { - d.r = bufio.NewReader(r); - } - }; - Decoder.prototype.switchToReader = function(r) { return this.$val.switchToReader(r); }; - Decoder.ptr.prototype.push = function(kind) { - var d, kind, s; - d = this; - s = d.free; - if (!(s === ptrType$7.nil)) { - d.free = s.next; - } else { - s = new stack.ptr(ptrType$7.nil, 0, new Name.ptr("", ""), false); - } - s.next = d.stk; - s.kind = kind; - d.stk = s; - return s; - }; - Decoder.prototype.push = function(kind) { return this.$val.push(kind); }; - Decoder.ptr.prototype.pop = function() { - var d, s; - d = this; - s = d.stk; - if (!(s === ptrType$7.nil)) { - d.stk = s.next; - s.next = d.free; - d.free = s; - } - return s; - }; - Decoder.prototype.pop = function() { return this.$val.pop(); }; - Decoder.ptr.prototype.pushEOF = function() { - var d, s, start; - d = this; - start = d.stk; - while (true) { - if (!(!((start.kind === 0)))) { break; } - start = start.next; - } - while (true) { - if (!(!(start.next === ptrType$7.nil) && (start.next.kind === 1))) { break; } - start = start.next; - } - s = d.free; - if (!(s === ptrType$7.nil)) { - d.free = s.next; - } else { - s = new stack.ptr(ptrType$7.nil, 0, new Name.ptr("", ""), false); - } - s.kind = 2; - s.next = start.next; - start.next = s; - }; - Decoder.prototype.pushEOF = function() { return this.$val.pushEOF(); }; - Decoder.ptr.prototype.popEOF = function() { - var d; - d = this; - if (d.stk === ptrType$7.nil || !((d.stk.kind === 2))) { - return false; - } - d.pop(); - return true; - }; - Decoder.prototype.popEOF = function() { return this.$val.popEOF(); }; - Decoder.ptr.prototype.pushElement = function(name) { - var d, name, s; - d = this; - s = d.push(0); - Name.copy(s.name, name); - }; - Decoder.prototype.pushElement = function(name) { return this.$val.pushElement(name); }; - Decoder.ptr.prototype.pushNs = function(local, url, ok) { - var d, local, ok, s, url; - d = this; - s = d.push(1); - s.name.Local = local; - s.name.Space = url; - s.ok = ok; - }; - Decoder.prototype.pushNs = function(local, url, ok) { return this.$val.pushNs(local, url, ok); }; - Decoder.ptr.prototype.syntaxError = function(msg) { - var d, msg; - d = this; - return new SyntaxError.ptr(msg, d.line); - }; - Decoder.prototype.syntaxError = function(msg) { return this.$val.syntaxError(msg); }; - Decoder.ptr.prototype.popElement = function(t) { - var _key, d, name, s, s$1, t; - d = this; - s = d.pop(); - name = $clone(t.Name, Name); - if (s === ptrType$7.nil || !((s.kind === 0))) { - d.err = d.syntaxError("unexpected end element "); - return false; - } else if (!(s.name.Local === name.Local)) { - if (!d.Strict) { - d.needClose = true; - Name.copy(d.toClose, t.Name); - Name.copy(t.Name, s.name); - return true; - } - d.err = d.syntaxError("element <" + s.name.Local + "> closed by "); - return false; - } else if (!(s.name.Space === name.Space)) { - d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space + "closed by in space " + name.Space); - return false; - } - while (true) { - if (!(!(d.stk === ptrType$7.nil) && !((d.stk.kind === 0)) && !((d.stk.kind === 2)))) { break; } - s$1 = d.pop(); - if (s$1.ok) { - _key = s$1.name.Local; (d.ns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: s$1.name.Space }; - } else { - delete d.ns[$String.keyFor(s$1.name.Local)]; - } - } - return true; - }; - Decoder.prototype.popElement = function(t) { return this.$val.popElement(t); }; - Decoder.ptr.prototype.autoClose = function(t) { - var {_i, _r$6, _r$7, _ref, _tuple, d, et, name, ok, s, t, x$2, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (d.stk === ptrType$7.nil || !((d.stk.kind === 0))) { - $s = -1; return [$ifaceNil, false]; - } - _r$6 = strings.ToLower(d.stk.name.Local); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - name = _r$6; - _ref = d.AutoClose; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$7 = strings.ToLower(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7 === name) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$7 === name) { */ case 4: - _tuple = $assertType(t, EndElement, true); - et = $clone(_tuple[0], EndElement); - ok = _tuple[1]; - if (!ok || !(et.Name.Local === name)) { - $s = -1; return [(x$2 = new EndElement.ptr($clone(d.stk.name, Name)), new x$2.constructor.elem(x$2)), true]; - } - /* break; */ $s = 3; continue; - /* } */ case 5: - _i++; - $s = 2; continue; - case 3: - $s = -1; return [$ifaceNil, false]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.autoClose, $c: true, $r, _i, _r$6, _r$7, _ref, _tuple, d, et, name, ok, s, t, x$2, $s};return $f; - }; - Decoder.prototype.autoClose = function(t) { return this.$val.autoClose(t); }; - Decoder.ptr.prototype.RawToken = function() { - var {$24r, _r$6, d, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (d.unmarshalDepth > 0) { - $s = -1; return [$ifaceNil, errRawToken]; - } - _r$6 = d.rawToken(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.RawToken, $c: true, $r, $24r, _r$6, d, $s};return $f; - }; - Decoder.prototype.RawToken = function() { return this.$val.RawToken(); }; - Decoder.ptr.prototype.rawToken = function() { - var {$24r, _1, _2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, a, attr, b, b0, b0$1, b0$2, b1, b1$1, content, d, data, data$1, data$2, data$3, data$4, depth, empty, enc, err, i, i$1, inquote, j, name, name$1, newr, ok, s, target, ver, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if (!($interfaceIsEqual(d.t, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(d.t, $ifaceNil))) { */ case 1: - _r$6 = d.t.Token(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 4; case 4: return $24r; - /* } */ case 2: - if (!($interfaceIsEqual(d.err, $ifaceNil))) { - $s = -1; return [$ifaceNil, d.err]; - } - if (d.needClose) { - d.needClose = false; - $s = -1; return [(x$2 = new EndElement.ptr($clone(d.toClose, Name)), new x$2.constructor.elem(x$2)), $ifaceNil]; - } - _r$7 = d.getc(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - /* */ if (!((b === 60))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!((b === 60))) { */ case 6: - d.ungetc(b); - _r$8 = d.text(-1, false); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - data = _r$8; - if (data === sliceType$3.nil) { - $s = -1; return [$ifaceNil, d.err]; - } - $s = -1; return [($convertSliceType(data, CharData)), $ifaceNil]; - /* } */ case 7: - _r$9 = d.mustgetc(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - b = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - _1 = b; - /* */ if (_1 === (47)) { $s = 11; continue; } - /* */ if (_1 === (63)) { $s = 12; continue; } - /* */ if (_1 === (33)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_1 === (47)) { */ case 11: - name = new Name.ptr("", ""); - _r$10 = d.nsname(); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$2 = _r$10; - Name.copy(name, _tuple$2[0]); - ok = _tuple$2[1]; - if (!ok) { - if ($interfaceIsEqual(d.err, $ifaceNil)) { - d.err = d.syntaxError("expected element name after "); - $s = -1; return [$ifaceNil, d.err]; - } - $s = -1; return [(x$3 = new EndElement.ptr($clone(name, Name)), new x$3.constructor.elem(x$3)), $ifaceNil]; - /* } else if (_1 === (63)) { */ case 12: - target = ""; - _r$12 = d.name(); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$4 = _r$12; - target = _tuple$4[0]; - ok = _tuple$4[1]; - if (!ok) { - if ($interfaceIsEqual(d.err, $ifaceNil)) { - d.err = d.syntaxError("expected target name after > 0)); - /* */ if (target === "xml") { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (target === "xml") { */ case 24: - content = ($bytesToString(data$1)); - ver = procInst("version", content); - /* */ if (!(ver === "") && !(ver === "1.0")) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!(ver === "") && !(ver === "1.0")) { */ case 26: - _r$15 = fmt.Errorf("xml: unsupported version %q; only version 1.0 is supported", new sliceType$5([new $String(ver)])); /* */ $s = 28; case 28: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - d.err = _r$15; - $s = -1; return [$ifaceNil, d.err]; - /* } */ case 27: - enc = procInst("encoding", content); - /* */ if (!(enc === "") && !(enc === "utf-8") && !(enc === "UTF-8") && !strings.EqualFold(enc, "utf-8")) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!(enc === "") && !(enc === "utf-8") && !(enc === "UTF-8") && !strings.EqualFold(enc, "utf-8")) { */ case 29: - /* */ if (d.CharsetReader === $throwNilPointerError) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (d.CharsetReader === $throwNilPointerError) { */ case 31: - _r$16 = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", new sliceType$5([new $String(enc)])); /* */ $s = 33; case 33: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - d.err = _r$16; - $s = -1; return [$ifaceNil, d.err]; - /* } */ case 32: - _r$17 = d.CharsetReader(enc, $assertType(d.r, io.Reader)); /* */ $s = 34; case 34: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$6 = _r$17; - newr = _tuple$6[0]; - err = _tuple$6[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 35: - _r$18 = fmt.Errorf("xml: opening charset %q: %v", new sliceType$5([new $String(enc), err])); /* */ $s = 37; case 37: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - d.err = _r$18; - $s = -1; return [$ifaceNil, d.err]; - /* } */ case 36: - if ($interfaceIsEqual(newr, $ifaceNil)) { - $panic(new $String("CharsetReader returned a nil Reader for charset " + enc)); - } - d.switchToReader(newr); - /* } */ case 30: - /* } */ case 25: - $s = -1; return [(x$4 = new ProcInst.ptr(target, data$1), new x$4.constructor.elem(x$4)), $ifaceNil]; - /* } else if (_1 === (33)) { */ case 13: - _r$19 = d.mustgetc(); /* */ $s = 38; case 38: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple$7 = _r$19; - b = _tuple$7[0]; - ok = _tuple$7[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - _2 = b; - /* */ if (_2 === (45)) { $s = 40; continue; } - /* */ if (_2 === (91)) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (_2 === (45)) { */ case 40: - _r$20 = d.mustgetc(); /* */ $s = 43; case 43: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _tuple$8 = _r$20; - b = _tuple$8[0]; - ok = _tuple$8[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - if (!((b === 45))) { - d.err = d.syntaxError("invalid sequence > 0)); - $s = -1; return [($convertSliceType(data$2, Comment)), $ifaceNil]; - /* } else if (_2 === (91)) { */ case 41: - i = 0; - /* while (true) { */ case 48: - /* if (!(i < 6)) { break; } */ if(!(i < 6)) { $s = 49; continue; } - _r$23 = d.mustgetc(); /* */ $s = 50; case 50: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _tuple$10 = _r$23; - b = _tuple$10[0]; - ok = _tuple$10[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - if (!((b === "CDATA[".charCodeAt(i)))) { - d.err = d.syntaxError("invalid > 0; - $s = 48; continue; - case 49: - _r$24 = d.text(-1, true); /* */ $s = 51; case 51: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - data$3 = _r$24; - if (data$3 === sliceType$3.nil) { - $s = -1; return [$ifaceNil, d.err]; - } - $s = -1; return [($convertSliceType(data$3, CharData)), $ifaceNil]; - /* } */ case 42: - case 39: - d.buf.Reset(); - _r$25 = d.buf.WriteByte(b); /* */ $s = 52; case 52: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - inquote = 0; - depth = 0; - /* while (true) { */ case 53: - _r$26 = d.mustgetc(); /* */ $s = 55; case 55: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _tuple$11 = _r$26; - b = _tuple$11[0]; - ok = _tuple$11[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - if ((inquote === 0) && (b === 62) && (depth === 0)) { - /* break; */ $s = 54; continue; - } - /* HandleB: */ case 56: - _r$27 = d.buf.WriteByte(b); /* */ $s = 57; case 57: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$27; - /* */ if ((b === inquote)) { $s = 59; continue; } - /* */ if (!((inquote === 0))) { $s = 60; continue; } - /* */ if ((b === 39) || (b === 34)) { $s = 61; continue; } - /* */ if ((b === 62) && (inquote === 0)) { $s = 62; continue; } - /* */ if ((b === 60) && (inquote === 0)) { $s = 63; continue; } - /* */ $s = 64; continue; - /* if ((b === inquote)) { */ case 59: - inquote = 0; - $s = 64; continue; - /* } else if (!((inquote === 0))) { */ case 60: - $s = 64; continue; - /* } else if ((b === 39) || (b === 34)) { */ case 61: - inquote = b; - $s = 64; continue; - /* } else if ((b === 62) && (inquote === 0)) { */ case 62: - depth = depth - (1) >> 0; - $s = 64; continue; - /* } else if ((b === 60) && (inquote === 0)) { */ case 63: - s = "!--"; - i$1 = 0; - /* while (true) { */ case 65: - /* if (!(i$1 < s.length)) { break; } */ if(!(i$1 < s.length)) { $s = 66; continue; } - _r$28 = d.mustgetc(); /* */ $s = 67; case 67: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _tuple$12 = _r$28; - b = _tuple$12[0]; - ok = _tuple$12[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - /* */ if (!((b === s.charCodeAt(i$1)))) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if (!((b === s.charCodeAt(i$1)))) { */ case 68: - j = 0; - /* while (true) { */ case 70: - /* if (!(j < i$1)) { break; } */ if(!(j < i$1)) { $s = 71; continue; } - _r$29 = d.buf.WriteByte(s.charCodeAt(j)); /* */ $s = 72; case 72: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$29; - j = j + (1) >> 0; - $s = 70; continue; - case 71: - depth = depth + (1) >> 0; - /* goto HandleB */ $s = 56; continue; - /* } */ case 69: - i$1 = i$1 + (1) >> 0; - $s = 65; continue; - case 66: - d.buf.Truncate(d.buf.Len() - 1 >> 0); - _tmp$4 = 0; - _tmp$5 = 0; - b0$2 = _tmp$4; - b1$1 = _tmp$5; - /* while (true) { */ case 73: - _r$30 = d.mustgetc(); /* */ $s = 75; case 75: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _tuple$13 = _r$30; - b = _tuple$13[0]; - ok = _tuple$13[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - if ((b0$2 === 45) && (b1$1 === 45) && (b === 62)) { - /* break; */ $s = 74; continue; - } - _tmp$6 = b1$1; - _tmp$7 = b; - b0$2 = _tmp$6; - b1$1 = _tmp$7; - $s = 73; continue; - case 74: - _r$31 = d.buf.WriteByte(32); /* */ $s = 76; case 76: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$31; - /* } */ case 64: - case 58: - $s = 53; continue; - case 54: - $s = -1; return [($convertSliceType(d.buf.Bytes(), Directive)), $ifaceNil]; - /* } */ case 14: - case 10: - d.ungetc(b); - name$1 = new Name.ptr("", ""); - empty = false; - attr = sliceType$4.nil; - _r$32 = d.nsname(); /* */ $s = 77; case 77: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _tuple$14 = _r$32; - Name.copy(name$1, _tuple$14[0]); - ok = _tuple$14[1]; - if (!ok) { - if ($interfaceIsEqual(d.err, $ifaceNil)) { - d.err = d.syntaxError("expected element name after <"); - } - $s = -1; return [$ifaceNil, d.err]; - } - attr = new sliceType$4([]); - /* while (true) { */ case 78: - $r = d.space(); /* */ $s = 80; case 80: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$33 = d.mustgetc(); /* */ $s = 81; case 81: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _tuple$15 = _r$33; - b = _tuple$15[0]; - ok = _tuple$15[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - /* */ if (b === 47) { $s = 82; continue; } - /* */ $s = 83; continue; - /* if (b === 47) { */ case 82: - empty = true; - _r$34 = d.mustgetc(); /* */ $s = 84; case 84: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _tuple$16 = _r$34; - b = _tuple$16[0]; - ok = _tuple$16[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - if (!((b === 62))) { - d.err = d.syntaxError("expected /> in element"); - $s = -1; return [$ifaceNil, d.err]; - } - /* break; */ $s = 79; continue; - /* } */ case 83: - if (b === 62) { - /* break; */ $s = 79; continue; - } - d.ungetc(b); - a = new Attr.ptr(new Name.ptr("", ""), ""); - _r$35 = d.nsname(); /* */ $s = 85; case 85: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _tuple$17 = _r$35; - Name.copy(a.Name, _tuple$17[0]); - ok = _tuple$17[1]; - if (!ok) { - if ($interfaceIsEqual(d.err, $ifaceNil)) { - d.err = d.syntaxError("expected attribute name in element"); - } - $s = -1; return [$ifaceNil, d.err]; - } - $r = d.space(); /* */ $s = 86; case 86: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$36 = d.mustgetc(); /* */ $s = 87; case 87: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _tuple$18 = _r$36; - b = _tuple$18[0]; - ok = _tuple$18[1]; - if (!ok) { - $s = -1; return [$ifaceNil, d.err]; - } - /* */ if (!((b === 61))) { $s = 88; continue; } - /* */ $s = 89; continue; - /* if (!((b === 61))) { */ case 88: - if (d.Strict) { - d.err = d.syntaxError("attribute name without = in element"); - $s = -1; return [$ifaceNil, d.err]; - } - d.ungetc(b); - a.Value = a.Name.Local; - $s = 90; continue; - /* } else { */ case 89: - $r = d.space(); /* */ $s = 91; case 91: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$37 = d.attrval(); /* */ $s = 92; case 92: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - data$4 = _r$37; - if (data$4 === sliceType$3.nil) { - $s = -1; return [$ifaceNil, d.err]; - } - a.Value = ($bytesToString(data$4)); - /* } */ case 90: - attr = $append(attr, a); - $s = 78; continue; - case 79: - if (empty) { - d.needClose = true; - Name.copy(d.toClose, name$1); - } - $s = -1; return [(x$5 = new StartElement.ptr($clone(name$1, Name), attr), new x$5.constructor.elem(x$5)), $ifaceNil]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.rawToken, $c: true, $r, $24r, _1, _2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, a, attr, b, b0, b0$1, b0$2, b1, b1$1, content, d, data, data$1, data$2, data$3, data$4, depth, empty, enc, err, i, i$1, inquote, j, name, name$1, newr, ok, s, target, ver, x$2, x$3, x$4, x$5, $s};return $f; - }; - Decoder.prototype.rawToken = function() { return this.$val.rawToken(); }; - Decoder.ptr.prototype.attrval = function() { - var {$24r, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, d, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$6 = d.mustgetc(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return sliceType$3.nil; - } - /* */ if ((b === 34) || (b === 39)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((b === 34) || (b === 39)) { */ case 2: - _r$7 = d.text(((b >> 0)), false); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 5; case 5: return $24r; - /* } */ case 3: - if (d.Strict) { - d.err = d.syntaxError("unquoted or missing attribute value in element"); - $s = -1; return sliceType$3.nil; - } - d.ungetc(b); - d.buf.Reset(); - /* while (true) { */ case 6: - _r$8 = d.mustgetc(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - b = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return sliceType$3.nil; - } - /* */ if (97 <= b && b <= 122 || 65 <= b && b <= 90 || 48 <= b && b <= 57 || (b === 95) || (b === 58) || (b === 45)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (97 <= b && b <= 122 || 65 <= b && b <= 90 || 48 <= b && b <= 57 || (b === 95) || (b === 58) || (b === 45)) { */ case 9: - _r$9 = d.buf.WriteByte(b); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = 11; continue; - /* } else { */ case 10: - d.ungetc(b); - /* break; */ $s = 7; continue; - /* } */ case 11: - $s = 6; continue; - case 7: - $s = -1; return d.buf.Bytes(); - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.attrval, $c: true, $r, $24r, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, d, ok, $s};return $f; - }; - Decoder.prototype.attrval = function() { return this.$val.attrval(); }; - Decoder.ptr.prototype.space = function() { - var {_1, _r$6, _tuple, b, d, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* while (true) { */ case 1: - _r$6 = d.getc(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return; - } - _1 = b; - if ((_1 === (32)) || (_1 === (13)) || (_1 === (10)) || (_1 === (9))) { - } else { - d.ungetc(b); - $s = -1; return; - } - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.space, $c: true, $r, _1, _r$6, _tuple, b, d, ok, $s};return $f; - }; - Decoder.prototype.space = function() { return this.$val.space(); }; - Decoder.ptr.prototype.getc = function() { - var {_r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, d, ok, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = 0; - ok = false; - d = this; - if (!($interfaceIsEqual(d.err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = false; - b = _tmp; - ok = _tmp$1; - $s = -1; return [b, ok]; - } - /* */ if (d.nextByte >= 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d.nextByte >= 0) { */ case 1: - b = ((d.nextByte << 24 >>> 24)); - d.nextByte = -1; - $s = 3; continue; - /* } else { */ case 2: - _r$6 = d.r.ReadByte(); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - d.err = _tuple[1]; - if (!($interfaceIsEqual(d.err, $ifaceNil))) { - _tmp$2 = 0; - _tmp$3 = false; - b = _tmp$2; - ok = _tmp$3; - $s = -1; return [b, ok]; - } - /* */ if (!(d.saved === ptrType$6.nil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(d.saved === ptrType$6.nil)) { */ case 5: - _r$7 = d.saved.WriteByte(b); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 6: - /* } */ case 3: - if (b === 10) { - d.line = d.line + (1) >> 0; - } - d.offset = (x$2 = d.offset, x$3 = new $Int64(0, 1), new $Int64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - _tmp$4 = b; - _tmp$5 = true; - b = _tmp$4; - ok = _tmp$5; - $s = -1; return [b, ok]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.getc, $c: true, $r, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, d, ok, x$2, x$3, $s};return $f; - }; - Decoder.prototype.getc = function() { return this.$val.getc(); }; - Decoder.ptr.prototype.InputOffset = function() { - var d; - d = this; - return d.offset; - }; - Decoder.prototype.InputOffset = function() { return this.$val.InputOffset(); }; - Decoder.ptr.prototype.savedOffset = function() { - var d, n; - d = this; - n = d.saved.Len(); - if (d.nextByte >= 0) { - n = n - (1) >> 0; - } - return n; - }; - Decoder.prototype.savedOffset = function() { return this.$val.savedOffset(); }; - Decoder.ptr.prototype.mustgetc = function() { - var {_r$6, _tuple, b, d, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = 0; - ok = false; - d = this; - _r$6 = d.getc(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - if ($interfaceIsEqual(d.err, io.EOF)) { - d.err = d.syntaxError("unexpected EOF"); - } - } - $s = -1; return [b, ok]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.mustgetc, $c: true, $r, _r$6, _tuple, b, d, ok, $s};return $f; - }; - Decoder.prototype.mustgetc = function() { return this.$val.mustgetc(); }; - Decoder.ptr.prototype.ungetc = function(b) { - var b, d, x$2, x$3; - d = this; - if (b === 10) { - d.line = d.line - (1) >> 0; - } - d.nextByte = ((b >> 0)); - d.offset = (x$2 = d.offset, x$3 = new $Int64(0, 1), new $Int64(x$2.$high - x$3.$high, x$2.$low - x$3.$low)); - }; - Decoder.prototype.ungetc = function(b) { return this.$val.ungetc(b); }; - Decoder.ptr.prototype.text = function(quote, cdata) { - var {_entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, b0, b1, base, before, buf, cdata, d, data, ent, err, haveText, n, name, ok, ok$1, ok$2, quote, r, r$1, s, s$1, size, start, text, trunc, $s, $r, $c} = $restore(this, {quote, cdata}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _tmp = 0; - _tmp$1 = 0; - b0 = _tmp; - b1 = _tmp$1; - trunc = 0; - d.buf.Reset(); - /* while (true) { */ case 1: - _r$6 = d.getc(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - if (cdata) { - if ($interfaceIsEqual(d.err, io.EOF)) { - d.err = d.syntaxError("unexpected EOF in CDATA section"); - } - $s = -1; return sliceType$3.nil; - } - /* break Input; */ $s = 2; continue s; - } - if ((b0 === 93) && (b1 === 93) && (b === 62)) { - if (cdata) { - trunc = 2; - /* break Input; */ $s = 2; continue s; - } - d.err = d.syntaxError("unescaped ]]> not in CDATA section"); - $s = -1; return sliceType$3.nil; - } - if ((b === 60) && !cdata) { - if (quote >= 0) { - d.err = d.syntaxError("unescaped < inside quoted string"); - $s = -1; return sliceType$3.nil; - } - d.ungetc(60); - /* break Input; */ $s = 2; continue s; - } - if (quote >= 0 && (b === ((quote << 24 >>> 24)))) { - /* break Input; */ $s = 2; continue s; - } - /* */ if ((b === 38) && !cdata) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((b === 38) && !cdata) { */ case 4: - before = d.buf.Len(); - _r$7 = d.buf.WriteByte(38); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - ok$1 = false; - text = ""; - haveText = false; - _r$8 = d.mustgetc(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - b = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (!ok$1) { - $s = -1; return sliceType$3.nil; - } - /* */ if (b === 35) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (b === 35) { */ case 8: - _r$9 = d.buf.WriteByte(b); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = d.mustgetc(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$2 = _r$10; - b = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (!ok$1) { - $s = -1; return sliceType$3.nil; - } - base = 10; - /* */ if (b === 120) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (b === 120) { */ case 13: - base = 16; - _r$11 = d.buf.WriteByte(b); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = d.mustgetc(); /* */ $s = 16; case 16: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$3 = _r$12; - b = _tuple$3[0]; - ok$1 = _tuple$3[1]; - if (!ok$1) { - $s = -1; return sliceType$3.nil; - } - /* } */ case 14: - start = d.buf.Len(); - /* while (true) { */ case 17: - /* if (!(48 <= b && b <= 57 || (base === 16) && 97 <= b && b <= 102 || (base === 16) && 65 <= b && b <= 70)) { break; } */ if(!(48 <= b && b <= 57 || (base === 16) && 97 <= b && b <= 102 || (base === 16) && 65 <= b && b <= 70)) { $s = 18; continue; } - _r$13 = d.buf.WriteByte(b); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - _r$14 = d.mustgetc(); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$4 = _r$14; - b = _tuple$4[0]; - ok$1 = _tuple$4[1]; - if (!ok$1) { - $s = -1; return sliceType$3.nil; - } - $s = 17; continue; - case 18: - /* */ if (!((b === 59))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!((b === 59))) { */ case 21: - d.ungetc(b); - $s = 23; continue; - /* } else { */ case 22: - s = ($bytesToString($subslice(d.buf.Bytes(), start))); - _r$15 = d.buf.WriteByte(59); /* */ $s = 24; case 24: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - _tuple$5 = strconv.ParseUint(s, base, 64); - n = _tuple$5[0]; - err = _tuple$5[1]; - if ($interfaceIsEqual(err, $ifaceNil) && (n.$high < 0 || (n.$high === 0 && n.$low <= 1114111))) { - text = ($encodeRune(((n.$low >> 0)))); - haveText = true; - } - /* } */ case 23: - $s = 10; continue; - /* } else { */ case 9: - d.ungetc(b); - _r$16 = d.readName(); /* */ $s = 27; case 27: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!_r$16) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!_r$16) { */ case 25: - if (!($interfaceIsEqual(d.err, $ifaceNil))) { - $s = -1; return sliceType$3.nil; - } - /* } */ case 26: - _r$17 = d.mustgetc(); /* */ $s = 28; case 28: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$6 = _r$17; - b = _tuple$6[0]; - ok$1 = _tuple$6[1]; - if (!ok$1) { - $s = -1; return sliceType$3.nil; - } - /* */ if (!((b === 59))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!((b === 59))) { */ case 29: - d.ungetc(b); - $s = 31; continue; - /* } else { */ case 30: - name = $subslice(d.buf.Bytes(), (before + 1 >> 0)); - _r$18 = d.buf.WriteByte(59); /* */ $s = 32; case 32: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - if (isName(name)) { - s$1 = ($bytesToString(name)); - _tuple$7 = (_entry = entity[$String.keyFor(s$1)], _entry !== undefined ? [_entry.v, true] : [0, false]); - r = _tuple$7[0]; - ok$2 = _tuple$7[1]; - if (ok$2) { - text = ($encodeRune(r)); - haveText = true; - } else if (!(d.Entity === false)) { - _tuple$8 = (_entry$1 = d.Entity[$String.keyFor(s$1)], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]); - text = _tuple$8[0]; - haveText = _tuple$8[1]; - } - } - /* } */ case 31: - /* } */ case 10: - /* */ if (haveText) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (haveText) { */ case 33: - d.buf.Truncate(before); - _r$19 = d.buf.Write((new sliceType$3($stringToBytes(text)))); /* */ $s = 35; case 35: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - _tmp$2 = 0; - _tmp$3 = 0; - b0 = _tmp$2; - b1 = _tmp$3; - /* continue Input; */ $s = 1; continue s; - /* } */ case 34: - if (!d.Strict) { - _tmp$4 = 0; - _tmp$5 = 0; - b0 = _tmp$4; - b1 = _tmp$5; - /* continue Input; */ $s = 1; continue s; - } - ent = ($bytesToString($subslice(d.buf.Bytes(), before))); - if (!((ent.charCodeAt((ent.length - 1 >> 0)) === 59))) { - ent = ent + (" (no semicolon)"); - } - d.err = d.syntaxError("invalid character entity " + ent); - $s = -1; return sliceType$3.nil; - /* } */ case 5: - /* */ if (b === 13) { $s = 36; continue; } - /* */ if ((b1 === 13) && (b === 10)) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (b === 13) { */ case 36: - _r$20 = d.buf.WriteByte(10); /* */ $s = 40; case 40: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - $s = 39; continue; - /* } else if ((b1 === 13) && (b === 10)) { */ case 37: - $s = 39; continue; - /* } else { */ case 38: - _r$21 = d.buf.WriteByte(b); /* */ $s = 41; case 41: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - /* } */ case 39: - _tmp$6 = b1; - _tmp$7 = b; - b0 = _tmp$6; - b1 = _tmp$7; - $s = 1; continue; - case 2: - data = d.buf.Bytes(); - data = $subslice(data, 0, (data.$length - trunc >> 0)); - buf = data; - /* while (true) { */ case 42: - /* if (!(buf.$length > 0)) { break; } */ if(!(buf.$length > 0)) { $s = 43; continue; } - _tuple$9 = utf8.DecodeRune(buf); - r$1 = _tuple$9[0]; - size = _tuple$9[1]; - if ((r$1 === 65533) && (size === 1)) { - d.err = d.syntaxError("invalid UTF-8"); - $s = -1; return sliceType$3.nil; - } - buf = $subslice(buf, size); - /* */ if (!isInCharacterRange(r$1)) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (!isInCharacterRange(r$1)) { */ case 44: - _r$22 = fmt.Sprintf("illegal character code %U", new sliceType$5([new $Int32(r$1)])); /* */ $s = 46; case 46: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = d.syntaxError(_r$22); /* */ $s = 47; case 47: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - d.err = _r$23; - $s = -1; return sliceType$3.nil; - /* } */ case 45: - $s = 42; continue; - case 43: - $s = -1; return data; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.text, $c: true, $r, _entry, _entry$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, b, b0, b1, base, before, buf, cdata, d, data, ent, err, haveText, n, name, ok, ok$1, ok$2, quote, r, r$1, s, s$1, size, start, text, trunc, $s};return $f; - }; - Decoder.prototype.text = function(quote, cdata) { return this.$val.text(quote, cdata); }; - isInCharacterRange = function(r) { - var inrange, r; - inrange = false; - inrange = (r === 9) || (r === 10) || (r === 13) || r >= 32 && r <= 55295 || r >= 57344 && r <= 65533 || r >= 65536 && r <= 1114111; - return inrange; - }; - Decoder.ptr.prototype.nsname = function() { - var {_r$6, _tmp, _tmp$1, _tuple, _tuple$1, d, local, name, ok, ok$1, s, space, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - name = new Name.ptr("", ""); - ok = false; - d = this; - _r$6 = d.name(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - s = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [name, ok]; - } - if (strings.Count(s, ":") > 1) { - name.Local = s; - } else { - _tuple$1 = strings.Cut(s, ":"); - space = _tuple$1[0]; - local = _tuple$1[1]; - ok$1 = _tuple$1[2]; - if (!ok$1 || space === "" || local === "") { - name.Local = s; - } else { - name.Space = space; - name.Local = local; - } - } - _tmp = $clone(name, Name); - _tmp$1 = true; - Name.copy(name, _tmp); - ok = _tmp$1; - $s = -1; return [name, ok]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.nsname, $c: true, $r, _r$6, _tmp, _tmp$1, _tuple, _tuple$1, d, local, name, ok, ok$1, s, space, $s};return $f; - }; - Decoder.prototype.nsname = function() { return this.$val.nsname(); }; - Decoder.ptr.prototype.name = function() { - var {_r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, d, ok, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = ""; - ok = false; - d = this; - d.buf.Reset(); - _r$6 = d.readName(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!_r$6) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$6) { */ case 1: - _tmp = ""; - _tmp$1 = false; - s = _tmp; - ok = _tmp$1; - $s = -1; return [s, ok]; - /* } */ case 2: - b = d.buf.Bytes(); - if (!isName(b)) { - d.err = d.syntaxError("invalid XML name: " + ($bytesToString(b))); - _tmp$2 = ""; - _tmp$3 = false; - s = _tmp$2; - ok = _tmp$3; - $s = -1; return [s, ok]; - } - _tmp$4 = ($bytesToString(b)); - _tmp$5 = true; - s = _tmp$4; - ok = _tmp$5; - $s = -1; return [s, ok]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.name, $c: true, $r, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, d, ok, s, $s};return $f; - }; - Decoder.prototype.name = function() { return this.$val.name(); }; - Decoder.ptr.prototype.readName = function() { - var {_r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, d, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ok = false; - d = this; - b = 0; - _r$6 = d.mustgetc(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return ok; - } - if (b < 128 && !isNameByte(b)) { - d.ungetc(b); - ok = false; - $s = -1; return ok; - } - _r$7 = d.buf.WriteByte(b); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* while (true) { */ case 3: - _r$8 = d.mustgetc(); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - b = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return ok; - } - if (b < 128 && !isNameByte(b)) { - d.ungetc(b); - /* break; */ $s = 4; continue; - } - _r$9 = d.buf.WriteByte(b); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = 3; continue; - case 4: - ok = true; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.readName, $c: true, $r, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, d, ok, $s};return $f; - }; - Decoder.prototype.readName = function() { return this.$val.readName(); }; - isNameByte = function(c) { - var c; - return 65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57 || (c === 95) || (c === 58) || (c === 46) || (c === 45); - }; - isName = function(s) { - var _tuple, _tuple$1, c, n, s; - if (s.$length === 0) { - return false; - } - _tuple = utf8.DecodeRune(s); - c = _tuple[0]; - n = _tuple[1]; - if ((c === 65533) && (n === 1)) { - return false; - } - if (!unicode.Is(first, c)) { - return false; - } - while (true) { - if (!(n < s.$length)) { break; } - s = $subslice(s, n); - _tuple$1 = utf8.DecodeRune(s); - c = _tuple$1[0]; - n = _tuple$1[1]; - if ((c === 65533) && (n === 1)) { - return false; - } - if (!unicode.Is(first, c) && !unicode.Is(second, c)) { - return false; - } - } - return true; - }; - isNameString = function(s) { - var _tuple, _tuple$1, c, n, s; - if (s.length === 0) { - return false; - } - _tuple = utf8.DecodeRuneInString(s); - c = _tuple[0]; - n = _tuple[1]; - if ((c === 65533) && (n === 1)) { - return false; - } - if (!unicode.Is(first, c)) { - return false; - } - while (true) { - if (!(n < s.length)) { break; } - s = $substring(s, n); - _tuple$1 = utf8.DecodeRuneInString(s); - c = _tuple$1[0]; - n = _tuple$1[1]; - if ((c === 65533) && (n === 1)) { - return false; - } - if (!unicode.Is(first, c) && !unicode.Is(second, c)) { - return false; - } - } - return true; - }; - EscapeText = function(w, s) { - var {$24r, _r$6, s, w, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = escapeText(w, s, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: EscapeText, $c: true, $r, $24r, _r$6, s, w, $s};return $f; - }; - $pkg.EscapeText = EscapeText; - escapeText = function(w, s, escapeNewline) { - var {_1, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, err$2, esc, escapeNewline, i, last, r, s, w, width, $s, $r, $c} = $restore(this, {w, s, escapeNewline}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - esc = sliceType$3.nil; - last = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 2; continue; } - _tuple = utf8.DecodeRune($subslice(s, i)); - r = _tuple[0]; - width = _tuple[1]; - i = i + (width) >> 0; - switch (0) { default: - _1 = r; - if (_1 === (34)) { - esc = escQuot; - } else if (_1 === (39)) { - esc = escApos; - } else if (_1 === (38)) { - esc = escAmp; - } else if (_1 === (60)) { - esc = escLT; - } else if (_1 === (62)) { - esc = escGT; - } else if (_1 === (9)) { - esc = escTab; - } else if (_1 === (10)) { - if (!escapeNewline) { - /* continue; */ $s = 1; continue; - } - esc = escNL; - } else if (_1 === (13)) { - esc = escCR; - } else { - if (!isInCharacterRange(r) || ((r === 65533) && (width === 1))) { - esc = escFFFD; - break; - } - /* continue; */ $s = 1; continue; - } - } - _r$6 = w.Write($subslice(s, last, (i - width >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$7 = w.Write(esc); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - last = i; - $s = 1; continue; - case 2: - _r$8 = w.Write($subslice(s, last)); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$3 = _r$8; - err$2 = _tuple$3[1]; - $s = -1; return err$2; - /* */ } return; } var $f = {$blk: escapeText, $c: true, $r, _1, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, err$2, esc, escapeNewline, i, last, r, s, w, width, $s};return $f; - }; - printer.ptr.prototype.EscapeString = function(s) { - var {_1, _r$6, _r$7, _r$8, _tuple, esc, i, last, p, r, s, width, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - esc = sliceType$3.nil; - last = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } - _tuple = utf8.DecodeRuneInString($substring(s, i)); - r = _tuple[0]; - width = _tuple[1]; - i = i + (width) >> 0; - switch (0) { default: - _1 = r; - if (_1 === (34)) { - esc = escQuot; - } else if (_1 === (39)) { - esc = escApos; - } else if (_1 === (38)) { - esc = escAmp; - } else if (_1 === (60)) { - esc = escLT; - } else if (_1 === (62)) { - esc = escGT; - } else if (_1 === (9)) { - esc = escTab; - } else if (_1 === (10)) { - esc = escNL; - } else if (_1 === (13)) { - esc = escCR; - } else { - if (!isInCharacterRange(r) || ((r === 65533) && (width === 1))) { - esc = escFFFD; - break; - } - /* continue; */ $s = 1; continue; - } - } - _r$6 = p.Writer.WriteString($substring(s, last, (i - width >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = p.Writer.Write(esc); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - last = i; - $s = 1; continue; - case 2: - _r$8 = p.Writer.WriteString($substring(s, last)); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = -1; return; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.EscapeString, $c: true, $r, _1, _r$6, _r$7, _r$8, _tuple, esc, i, last, p, r, s, width, $s};return $f; - }; - printer.prototype.EscapeString = function(s) { return this.$val.EscapeString(s); }; - emitCDATA = function(w, s) { - var {_r$10, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, after, before, err, err$1, err$2, err$3, err$4, ok, s, w, $s, $r, $c} = $restore(this, {w, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (s.$length === 0) { - $s = -1; return $ifaceNil; - } - _r$6 = w.Write(cdataStart); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* while (true) { */ case 2: - _tuple$1 = bytes.Cut(s, cdataEnd); - before = _tuple$1[0]; - after = _tuple$1[1]; - ok = _tuple$1[2]; - if (!ok) { - /* break; */ $s = 3; continue; - } - _r$7 = w.Write(before); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$8 = w.Write(cdataEscape); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$3 = _r$8; - err$2 = _tuple$3[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - s = after; - $s = 2; continue; - case 3: - _r$9 = w.Write(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$4 = _r$9; - err$3 = _tuple$4[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _r$10 = w.Write(cdataEnd); /* */ $s = 7; case 7: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$5 = _r$10; - err$4 = _tuple$5[1]; - $s = -1; return err$4; - /* */ } return; } var $f = {$blk: emitCDATA, $c: true, $r, _r$10, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, after, before, err, err$1, err$2, err$3, err$4, ok, s, w, $s};return $f; - }; - procInst = function(param, s) { - var _tuple, _tuple$1, ok, param, s, unquote, v; - param = param + "="; - _tuple = strings.Cut(s, param); - v = _tuple[1]; - if (v === "") { - return ""; - } - if (!((v.charCodeAt(0) === 39)) && !((v.charCodeAt(0) === 34))) { - return ""; - } - _tuple$1 = strings.Cut($substring(v, 1), $substring(v, 0, 1)); - unquote = _tuple$1[0]; - ok = _tuple$1[2]; - if (!ok) { - return ""; - } - return unquote; - }; - getTypeInfo = function(typ) { - var {_i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, err$2, err$3, f, finfo, finfo$1, i, inner, n, ok, t, ti, ti$1, tinfo, typ, $s, $r, $c} = $restore(this, {typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$6 = tinfoMap.Load(typ); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - ti = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [$assertType(ti, ptrType$9), $ifaceNil]; - } - tinfo = new typeInfo.ptr(ptrType$10.nil, sliceType$6.nil); - _r$7 = typ.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if ((_r$7 === 25) && !($interfaceIsEqual(typ, nameType))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((_r$7 === 25) && !($interfaceIsEqual(typ, nameType))) { */ case 2: - _r$8 = typ.NumField(); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - n = _r$8; - i = 0; - /* while (true) { */ case 6: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 7; continue; } - f = [f]; - finfo = [finfo]; - _r$9 = typ.Field(i); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - f[0] = $clone(_r$9, reflect.StructField); - if ((!$clone(f[0], reflect.StructField).IsExported() && !f[0].Anonymous) || new reflect.StructTag(f[0].Tag).Get("xml") === "-") { - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - } - /* */ if (f[0].Anonymous) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (f[0].Anonymous) { */ case 9: - t = f[0].Type; - _r$10 = t.Kind(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (_r$10 === 22) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$10 === 22) { */ case 11: - _r$11 = t.Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - t = _r$11; - /* } */ case 12: - _r$12 = t.Kind(); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12 === 25) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_r$12 === 25) { */ case 15: - _r$13 = getTypeInfo(t); /* */ $s = 18; case 18: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$1 = _r$13; - inner = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$9.nil, err]; - } - if (tinfo.xmlname === ptrType$10.nil) { - tinfo.xmlname = inner.xmlname; - } - _ref = inner.fields; - _i = 0; - /* while (true) { */ case 19: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 20; continue; } - finfo[0] = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), fieldInfo); - finfo[0].idx = $appendSlice(new sliceType$7([i]), finfo[0].idx); - _r$14 = addFieldInfo(typ, tinfo, finfo[0]); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err$1 = _r$14; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$9.nil, err$1]; - } - _i++; - $s = 19; continue; - case 20: - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - /* } */ case 16: - /* } */ case 10: - _r$15 = structFieldInfo(typ, f[0]); /* */ $s = 22; case 22: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tuple$2 = _r$15; - finfo$1 = _tuple$2[0]; - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [ptrType$9.nil, err$2]; - } - if (f[0].Name === "XMLName") { - tinfo.xmlname = finfo$1; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - } - _r$16 = addFieldInfo(typ, tinfo, finfo$1); /* */ $s = 23; case 23: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - err$3 = _r$16; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return [ptrType$9.nil, err$3]; - } - i = i + (1) >> 0; - $s = 6; continue; - case 7: - /* } */ case 3: - _r$17 = tinfoMap.LoadOrStore(typ, tinfo); /* */ $s = 24; case 24: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$3 = _r$17; - ti$1 = _tuple$3[0]; - $s = -1; return [$assertType(ti$1, ptrType$9), $ifaceNil]; - /* */ } return; } var $f = {$blk: getTypeInfo, $c: true, $r, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, err$2, err$3, f, finfo, finfo$1, i, inner, n, ok, t, ti, ti$1, tinfo, typ, $s};return $f; - }; - structFieldInfo = function(typ, f) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _1, _2, _i, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, f, finfo, flag, ftyp, mode, ns, ok, parents, t, tag, tokens, typ, valid, x$2, x$3, xmlname, xmlname$1, $s, $r, $c} = $restore(this, {typ, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - finfo = new fieldInfo.ptr(f.Index, "", "", 0, sliceType$2.nil); - tag = new reflect.StructTag(f.Tag).Get("xml"); - _tuple = strings.Cut(tag, " "); - ns = _tuple[0]; - t = _tuple[1]; - ok = _tuple[2]; - if (ok) { - _tmp = ns; - _tmp$1 = t; - finfo.xmlns = _tmp; - tag = _tmp$1; - } - tokens = strings.Split(tag, ","); - /* */ if (tokens.$length === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (tokens.$length === 1) { */ case 1: - finfo.flags = 1; - $s = 3; continue; - /* } else { */ case 2: - tag = (0 >= tokens.$length ? ($throwRuntimeError("index out of range"), undefined) : tokens.$array[tokens.$offset + 0]); - _ref = $subslice(tokens, 1); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - flag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _1 = flag; - if (_1 === ("attr")) { - finfo.flags = finfo.flags | (2); - } else if (_1 === ("cdata")) { - finfo.flags = finfo.flags | (4); - } else if (_1 === ("chardata")) { - finfo.flags = finfo.flags | (8); - } else if (_1 === ("innerxml")) { - finfo.flags = finfo.flags | (16); - } else if (_1 === ("comment")) { - finfo.flags = finfo.flags | (32); - } else if (_1 === ("any")) { - finfo.flags = finfo.flags | (64); - } else if (_1 === ("omitempty")) { - finfo.flags = finfo.flags | (128); - } - _i++; - } - valid = true; - mode = finfo.flags & 127; - _2 = mode; - if (_2 === (0)) { - finfo.flags = finfo.flags | (1); - } else if ((_2 === (2)) || (_2 === (4)) || (_2 === (8)) || (_2 === (16)) || (_2 === (32)) || (_2 === (64)) || (_2 === (66))) { - if (f.Name === "XMLName" || !(tag === "") && !((mode === 2))) { - valid = false; - } - } else { - valid = false; - } - if ((finfo.flags & 127) === 64) { - finfo.flags = finfo.flags | (1); - } - if (!(((finfo.flags & 128) === 0)) && ((finfo.flags & 3) === 0)) { - valid = false; - } - /* */ if (!valid) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!valid) { */ case 4: - _r$6 = fmt.Errorf("xml: invalid tag in field %s of type %s: %q", new sliceType$5([new $String(f.Name), typ, new $String(new reflect.StructTag(f.Tag).Get("xml"))])); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = [ptrType$10.nil, _r$6]; - $s = 7; case 7: return $24r; - /* } */ case 5: - /* } */ case 3: - /* */ if (!(finfo.xmlns === "") && tag === "") { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(finfo.xmlns === "") && tag === "") { */ case 8: - _r$7 = fmt.Errorf("xml: namespace without name in field %s of type %s: %q", new sliceType$5([new $String(f.Name), typ, new $String(new reflect.StructTag(f.Tag).Get("xml"))])); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = [ptrType$10.nil, _r$7]; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - if (f.Name === "XMLName") { - finfo.name = tag; - $s = -1; return [finfo, $ifaceNil]; - } - /* */ if (tag === "") { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (tag === "") { */ case 12: - _r$8 = lookupXMLName(f.Type); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - xmlname = _r$8; - if (!(xmlname === ptrType$10.nil)) { - _tmp$2 = xmlname.xmlns; - _tmp$3 = xmlname.name; - finfo.xmlns = _tmp$2; - finfo.name = _tmp$3; - } else { - finfo.name = f.Name; - } - $s = -1; return [finfo, $ifaceNil]; - /* } */ case 13: - parents = strings.Split(tag, ">"); - if ((0 >= parents.$length ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + 0]) === "") { - (0 >= parents.$length ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + 0] = f.Name); - } - /* */ if ((x$2 = parents.$length - 1 >> 0, ((x$2 < 0 || x$2 >= parents.$length) ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + x$2])) === "") { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ((x$2 = parents.$length - 1 >> 0, ((x$2 < 0 || x$2 >= parents.$length) ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + x$2])) === "") { */ case 15: - _r$9 = fmt.Errorf("xml: trailing '>' in field %s of type %s", new sliceType$5([new $String(f.Name), typ])); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$2 = [ptrType$10.nil, _r$9]; - $s = 18; case 18: return $24r$2; - /* } */ case 16: - finfo.name = (x$3 = parents.$length - 1 >> 0, ((x$3 < 0 || x$3 >= parents.$length) ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + x$3])); - /* */ if (parents.$length > 1) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (parents.$length > 1) { */ case 19: - /* */ if (((finfo.flags & 1)) === 0) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (((finfo.flags & 1)) === 0) { */ case 21: - _r$10 = fmt.Errorf("xml: %s chain not valid with %s flag", new sliceType$5([new $String(tag), new $String(strings.Join($subslice(tokens, 1), ","))])); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$3 = [ptrType$10.nil, _r$10]; - $s = 24; case 24: return $24r$3; - /* } */ case 22: - finfo.parents = $subslice(parents, 0, (parents.$length - 1 >> 0)); - /* } */ case 20: - /* */ if (!(((finfo.flags & 1) === 0))) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!(((finfo.flags & 1) === 0))) { */ case 25: - ftyp = f.Type; - _r$11 = lookupXMLName(ftyp); /* */ $s = 27; case 27: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - xmlname$1 = _r$11; - /* */ if (!(xmlname$1 === ptrType$10.nil) && !(xmlname$1.name === finfo.name)) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!(xmlname$1 === ptrType$10.nil) && !(xmlname$1.name === finfo.name)) { */ case 28: - _r$12 = fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName", new sliceType$5([new $String(finfo.name), typ, new $String(f.Name), new $String(xmlname$1.name), ftyp])); /* */ $s = 30; case 30: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$4 = [ptrType$10.nil, _r$12]; - $s = 31; case 31: return $24r$4; - /* } */ case 29: - /* } */ case 26: - $s = -1; return [finfo, $ifaceNil]; - /* */ } return; } var $f = {$blk: structFieldInfo, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _1, _2, _i, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, f, finfo, flag, ftyp, mode, ns, ok, parents, t, tag, tokens, typ, valid, x$2, x$3, xmlname, xmlname$1, $s};return $f; - }; - lookupXMLName = function(typ) { - var {_r$10, _r$11, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, err, f, finfo, i, n, typ, xmlname, $s, $r, $c} = $restore(this, {typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xmlname = ptrType$10.nil; - /* while (true) { */ case 1: - _r$6 = typ.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* if (!(_r$6 === 22)) { break; } */ if(!(_r$6 === 22)) { $s = 2; continue; } - _r$7 = typ.Elem(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - typ = _r$7; - $s = 1; continue; - case 2: - _r$8 = typ.Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!((_r$8 === 25))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((_r$8 === 25))) { */ case 5: - xmlname = ptrType$10.nil; - $s = -1; return xmlname; - /* } */ case 6: - _tmp = 0; - _r$9 = typ.NumField(); /* */ $s = 8; case 8: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tmp$1 = _r$9; - i = _tmp; - n = _tmp$1; - /* while (true) { */ case 9: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 10; continue; } - f = [f]; - _r$10 = typ.Field(i); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - f[0] = $clone(_r$10, reflect.StructField); - if (!(f[0].Name === "XMLName")) { - i = i + (1) >> 0; - /* continue; */ $s = 9; continue; - } - _r$11 = structFieldInfo(typ, f[0]); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple = _r$11; - finfo = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil) && !(finfo.name === "")) { - xmlname = finfo; - $s = -1; return xmlname; - } - /* break; */ $s = 10; continue; - case 10: - xmlname = ptrType$10.nil; - $s = -1; return xmlname; - /* */ } return; } var $f = {$blk: lookupXMLName, $c: true, $r, _r$10, _r$11, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, err, f, finfo, i, n, typ, xmlname, $s};return $f; - }; - min = function(a, b) { - var a, b; - if (a <= b) { - return a; - } - return b; - }; - addFieldInfo = function(typ, tinfo, newf) { - var {_i, _i$1, _i$2, _r$6, _r$7, _ref, _ref$1, _ref$2, c, conflicts, f1, f2, i, i$1, i$2, i$3, minl, newf, oldf, oldf$1, p, tinfo, typ, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {typ, tinfo, newf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conflicts = sliceType$7.nil; - _ref = tinfo.fields; - _i = 0; - Loop: - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - oldf = (x$2 = tinfo.fields, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])); - if (!(((oldf.flags & 127) === (newf.flags & 127)))) { - _i++; - continue; - } - if (!(oldf.xmlns === "") && !(newf.xmlns === "") && !(oldf.xmlns === newf.xmlns)) { - _i++; - continue; - } - minl = min(newf.parents.$length, oldf.parents.$length); - p = 0; - while (true) { - if (!(p < minl)) { break; } - if (!((x$3 = oldf.parents, ((p < 0 || p >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + p])) === (x$4 = newf.parents, ((p < 0 || p >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + p])))) { - _i++; - continue Loop; - } - p = p + (1) >> 0; - } - if (oldf.parents.$length > newf.parents.$length) { - if ((x$5 = oldf.parents, x$6 = newf.parents.$length, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])) === newf.name) { - conflicts = $append(conflicts, i); - } - } else if (oldf.parents.$length < newf.parents.$length) { - if ((x$7 = newf.parents, x$8 = oldf.parents.$length, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8])) === oldf.name) { - conflicts = $append(conflicts, i); - } - } else { - if (newf.name === oldf.name) { - conflicts = $append(conflicts, i); - } - } - _i++; - } - if (conflicts === sliceType$7.nil) { - tinfo.fields = $append(tinfo.fields, newf); - $s = -1; return $ifaceNil; - } - _ref$1 = conflicts; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if ((x$9 = tinfo.fields, ((i$1 < 0 || i$1 >= x$9.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + i$1])).idx.$length < newf.idx.$length) { - $s = -1; return $ifaceNil; - } - _i$1++; - } - _ref$2 = conflicts; - _i$2 = 0; - /* while (true) { */ case 1: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 2; continue; } - i$2 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - oldf$1 = (x$10 = tinfo.fields, ((i$2 < 0 || i$2 >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + i$2])); - /* */ if (oldf$1.idx.$length === newf.idx.$length) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (oldf$1.idx.$length === newf.idx.$length) { */ case 3: - _r$6 = typ.FieldByIndex(oldf$1.idx); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - f1 = $clone(_r$6, reflect.StructField); - _r$7 = typ.FieldByIndex(newf.idx); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - f2 = $clone(_r$7, reflect.StructField); - $s = -1; return new TagPathError.ptr(typ, f1.Name, new reflect.StructTag(f1.Tag).Get("xml"), f2.Name, new reflect.StructTag(f2.Tag).Get("xml")); - /* } */ case 4: - _i$2++; - $s = 1; continue; - case 2: - c = conflicts.$length - 1 >> 0; - while (true) { - if (!(c >= 0)) { break; } - i$3 = ((c < 0 || c >= conflicts.$length) ? ($throwRuntimeError("index out of range"), undefined) : conflicts.$array[conflicts.$offset + c]); - $copySlice($subslice(tinfo.fields, i$3), $subslice(tinfo.fields, (i$3 + 1 >> 0))); - tinfo.fields = $subslice(tinfo.fields, 0, (tinfo.fields.$length - 1 >> 0)); - c = c - (1) >> 0; - } - tinfo.fields = $append(tinfo.fields, newf); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: addFieldInfo, $c: true, $r, _i, _i$1, _i$2, _r$6, _r$7, _ref, _ref$1, _ref$2, c, conflicts, f1, f2, i, i$1, i$2, i$3, minl, newf, oldf, oldf$1, p, tinfo, typ, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - TagPathError.ptr.prototype.Error = function() { - var {$24r, _r$6, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$6 = fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", new sliceType$5([e.Struct, new $String(e.Field1), new $String(e.Tag1), new $String(e.Field2), new $String(e.Tag2)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: TagPathError.ptr.prototype.Error, $c: true, $r, $24r, _r$6, e, $s};return $f; - }; - TagPathError.prototype.Error = function() { return this.$val.Error(); }; - fieldInfo.ptr.prototype.value = function(v, shouldInitNilPointers) { - var {_i, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, _ref, _v, finfo, i, shouldInitNilPointers, t, v, x$2, $s, $r, $c} = $restore(this, {v, shouldInitNilPointers}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - finfo = this; - _ref = finfo.idx; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - x$2 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (i > 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (i > 0) { */ case 3: - t = $clone(v, reflect.Value).Type(); - _r$6 = t.Kind(); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - if (!(_r$6 === 22)) { _v = false; $s = 7; continue s; } - _r$7 = t.Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = _r$7.Kind(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8 === 25; case 7: - /* */ if (_v) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_v) { */ case 5: - /* */ if ($clone(v, reflect.Value).IsNil()) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($clone(v, reflect.Value).IsNil()) { */ case 11: - if (!shouldInitNilPointers) { - $s = -1; return new reflect.Value.ptr(ptrType$11.nil, 0, 0); - } - _r$9 = $clone(v, reflect.Value).Type().Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = reflect.New(_r$9); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$10, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - _r$11 = $clone(v, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - v = _r$11; - /* } */ case 6: - /* } */ case 4: - _r$12 = $clone(v, reflect.Value).Field(x$2); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - v = _r$12; - _i++; - $s = 1; continue; - case 2: - $s = -1; return v; - /* */ } return; } var $f = {$blk: fieldInfo.ptr.prototype.value, $c: true, $r, _i, _r$10, _r$11, _r$12, _r$6, _r$7, _r$8, _r$9, _ref, _v, finfo, i, shouldInitNilPointers, t, v, x$2, $s};return $f; - }; - fieldInfo.prototype.value = function(v, shouldInitNilPointers) { return this.$val.value(v, shouldInitNilPointers); }; - Decoder.ptr.prototype.Decode = function(v) { - var {$24r, _r$6, d, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$6 = d.DecodeElement(v, ptrType$12.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.Decode, $c: true, $r, $24r, _r$6, d, v, $s};return $f; - }; - Decoder.prototype.Decode = function(v) { return this.$val.Decode(v); }; - Decoder.ptr.prototype.DecodeElement = function(v, start) { - var {$24r, _r$6, _r$7, _r$8, d, start, v, val, $s, $r, $c} = $restore(this, {v, start}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$6 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - val = _r$6; - if (!(($clone(val, reflect.Value).Kind() === 22))) { - $s = -1; return errors.New("non-pointer passed to Unmarshal"); - } - _r$7 = $clone(val, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = d.unmarshal($clone(_r$7, reflect.Value), start, 0); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.DecodeElement, $c: true, $r, $24r, _r$6, _r$7, _r$8, d, start, v, val, $s};return $f; - }; - Decoder.prototype.DecodeElement = function(v, start) { return this.$val.DecodeElement(v, start); }; - UnmarshalError.prototype.Error = function() { - var e; - e = this.$val; - return (e); - }; - $ptrType(UnmarshalError).prototype.Error = function() { return new UnmarshalError(this.$get()).Error(); }; - receiverType = function(val) { - var {$24r, $24r$1, _r$6, _r$7, _r$8, t, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = reflect.TypeOf(val); - _r$6 = t.Name(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!(_r$6 === "")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(_r$6 === "")) { */ case 1: - _r$7 = t.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 5; case 5: return $24r; - /* } */ case 2: - _r$8 = t.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = "(" + _r$8 + ")"; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: receiverType, $c: true, $r, $24r, $24r$1, _r$6, _r$7, _r$8, t, val, $s};return $f; - }; - Decoder.ptr.prototype.unmarshalInterface = function(val, start) { - var {$24r, _arg, _arg$1, _r$6, _r$7, _r$8, d, err, start, val, $s, $r, $c} = $restore(this, {val, start}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - d.pushEOF(); - d.unmarshalDepth = d.unmarshalDepth + (1) >> 0; - _r$6 = val.UnmarshalXML(d, $clone(start, StartElement)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - d.unmarshalDepth = d.unmarshalDepth - (1) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - d.popEOF(); - $s = -1; return err; - } - /* */ if (!d.popEOF()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!d.popEOF()) { */ case 2: - _r$7 = receiverType(val); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg = new $String(_r$7); - _arg$1 = new $String(start.Name.Local); - _r$8 = fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", new sliceType$5([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 6; case 6: return $24r; - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.unmarshalInterface, $c: true, $r, $24r, _arg, _arg$1, _r$6, _r$7, _r$8, d, err, start, val, $s};return $f; - }; - Decoder.prototype.unmarshalInterface = function(val, start) { return this.$val.unmarshalInterface(val, start); }; - Decoder.ptr.prototype.unmarshalTextInterface = function(val) { - var {$24r, _r$6, _r$7, _ref, _tuple, buf, d, depth, err, t, t$1, t$2, t$3, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - buf = sliceType$3.nil; - depth = 1; - /* while (true) { */ case 1: - /* if (!(depth > 0)) { break; } */ if(!(depth > 0)) { $s = 2; continue; } - _r$6 = d.Token(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - t = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _ref = t; - if ($assertType(_ref, CharData, true)[1]) { - t$1 = _ref.$val; - if (depth === 1) { - buf = $appendSlice(buf, $convertSliceType(t$1, sliceType$3)); - } - } else if ($assertType(_ref, StartElement, true)[1]) { - t$2 = $clone(_ref.$val, StartElement); - depth = depth + (1) >> 0; - } else if ($assertType(_ref, EndElement, true)[1]) { - t$3 = $clone(_ref.$val, EndElement); - depth = depth - (1) >> 0; - } - $s = 1; continue; - case 2: - _r$7 = val.UnmarshalText(buf); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = _r$7; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.unmarshalTextInterface, $c: true, $r, $24r, _r$6, _r$7, _ref, _tuple, buf, d, depth, err, t, t$1, t$2, t$3, val, $s};return $f; - }; - Decoder.prototype.unmarshalTextInterface = function(val) { return this.$val.unmarshalTextInterface(val); }; - Decoder.ptr.prototype.unmarshalAttr = function(val, attr) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, attr, d, err, n, pv, pv$1, val, $s, $r, $c} = $restore(this, {val, attr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - /* */ if ($clone(val, reflect.Value).Kind() === 22) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(val, reflect.Value).Kind() === 22) { */ case 1: - /* */ if ($clone(val, reflect.Value).IsNil()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($clone(val, reflect.Value).IsNil()) { */ case 3: - _r$6 = $clone(val, reflect.Value).Type().Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.New(_r$6); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = $clone(val, reflect.Value).Set($clone(_r$7, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - _r$8 = $clone(val, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - val = _r$8; - /* } */ case 2: - if (!($clone(val, reflect.Value).CanInterface())) { _v = false; $s = 11; continue s; } - _r$9 = $clone(val, reflect.Value).Type().Implements(unmarshalerAttrType); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v = _r$9; case 11: - /* */ if (_v) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 9: - _r$10 = $clone(val, reflect.Value).Interface(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $assertType(_r$10, UnmarshalerAttr).UnmarshalXMLAttr($clone(attr, Attr)); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r = _r$11; - $s = 15; case 15: return $24r; - /* } */ case 10: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 16: - pv = $clone(val, reflect.Value).Addr(); - if (!($clone(pv, reflect.Value).CanInterface())) { _v$1 = false; $s = 20; continue s; } - _r$12 = $clone(pv, reflect.Value).Type().Implements(unmarshalerAttrType); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$1 = _r$12; case 20: - /* */ if (_v$1) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (_v$1) { */ case 18: - _r$13 = $clone(pv, reflect.Value).Interface(); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $assertType(_r$13, UnmarshalerAttr).UnmarshalXMLAttr($clone(attr, Attr)); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$1 = _r$14; - $s = 24; case 24: return $24r$1; - /* } */ case 19: - /* } */ case 17: - if (!($clone(val, reflect.Value).CanInterface())) { _v$2 = false; $s = 27; continue s; } - _r$15 = $clone(val, reflect.Value).Type().Implements(textUnmarshalerType); /* */ $s = 28; case 28: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _v$2 = _r$15; case 27: - /* */ if (_v$2) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_v$2) { */ case 25: - _r$16 = $clone(val, reflect.Value).Interface(); /* */ $s = 29; case 29: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $assertType(_r$16, encoding.TextUnmarshaler).UnmarshalText((new sliceType$3($stringToBytes(attr.Value)))); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$2 = _r$17; - $s = 31; case 31: return $24r$2; - /* } */ case 26: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 32: - pv$1 = $clone(val, reflect.Value).Addr(); - if (!($clone(pv$1, reflect.Value).CanInterface())) { _v$3 = false; $s = 36; continue s; } - _r$18 = $clone(pv$1, reflect.Value).Type().Implements(textUnmarshalerType); /* */ $s = 37; case 37: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _v$3 = _r$18; case 36: - /* */ if (_v$3) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (_v$3) { */ case 34: - _r$19 = $clone(pv$1, reflect.Value).Interface(); /* */ $s = 38; case 38: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = $assertType(_r$19, encoding.TextUnmarshaler).UnmarshalText((new sliceType$3($stringToBytes(attr.Value)))); /* */ $s = 39; case 39: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r$3 = _r$20; - $s = 40; case 40: return $24r$3; - /* } */ case 35: - /* } */ case 33: - _r$21 = $clone(val, reflect.Value).Type().Kind(); /* */ $s = 44; case 44: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - if (!(_r$21 === 23)) { _v$4 = false; $s = 43; continue s; } - _r$22 = $clone(val, reflect.Value).Type().Elem(); /* */ $s = 45; case 45: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = _r$22.Kind(); /* */ $s = 46; case 46: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _v$4 = !((_r$23 === 8)); case 43: - /* */ if (_v$4) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (_v$4) { */ case 41: - n = $clone(val, reflect.Value).Len(); - _arg = $clone(val, reflect.Value); - _r$24 = $clone(val, reflect.Value).Type().Elem(); /* */ $s = 47; case 47: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = reflect.Zero(_r$24); /* */ $s = 48; case 48: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$25, reflect.Value); - _r$26 = reflect.Append(_arg, new sliceType$8([_arg$1])); /* */ $s = 49; case 49: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $r = $clone(val, reflect.Value).Set($clone(_r$26, reflect.Value)); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$27 = $clone(val, reflect.Value).Index(n); /* */ $s = 51; case 51: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = d.unmarshalAttr($clone(_r$27, reflect.Value), $clone(attr, Attr)); /* */ $s = 52; case 52: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - err = _r$28; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $clone(val, reflect.Value).SetLen(n); - $s = -1; return err; - } - $s = -1; return $ifaceNil; - /* } */ case 42: - /* */ if ($interfaceIsEqual($clone(val, reflect.Value).Type(), attrType)) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if ($interfaceIsEqual($clone(val, reflect.Value).Type(), attrType)) { */ case 53: - _r$29 = reflect.ValueOf(new attr.constructor.elem(attr)); /* */ $s = 55; case 55: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - $r = $clone(val, reflect.Value).Set($clone(_r$29, reflect.Value)); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 54: - _r$30 = copyValue($clone(val, reflect.Value), (new sliceType$3($stringToBytes(attr.Value)))); /* */ $s = 57; case 57: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - $24r$4 = _r$30; - $s = 58; case 58: return $24r$4; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.unmarshalAttr, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$6, _r$7, _r$8, _r$9, _v, _v$1, _v$2, _v$3, _v$4, attr, d, err, n, pv, pv$1, val, $s};return $f; - }; - Decoder.prototype.unmarshalAttr = function(val, attr) { return this.$val.unmarshalAttr(val, attr); }; - Decoder.ptr.prototype.unmarshal = function(val, start, depth) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _1, _2, _3, _4, _5, _arg, _arg$1, _i, _i$1, _i$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$50, _r$51, _r$52, _r$53, _r$54, _r$55, _r$56, _r$57, _r$58, _r$59, _r$6, _r$60, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _v, _v$1, _v$2, _v$3, _v$4, _v$5, a, any, comment, consumed, d, data, depth, e, e$1, err, err$1, err$10, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, finfo, finfo$1, finfo$2, finfo$3, fv, handled, i, i$1, n, ok, ok$1, pv, pv$1, pv$2, saveAny, saveComment, saveData, saveXML, saveXMLData, saveXMLIndex, savedOffset, start, strv, strv$1, sv, t, t$1, t$2, t$3, t$4, t$5, t$6, tinfo, tok, tok$1, typ, typ$1, v, val, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {val, start, depth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (depth >= 10000) { - $s = -1; return errExeceededMaxUnmarshalDepth; - } - /* */ if (start === ptrType$12.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (start === ptrType$12.nil) { */ case 1: - /* while (true) { */ case 3: - t = [t]; - _r$6 = d.Token(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - tok = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = $assertType(tok, StartElement, true); - t[0] = $clone(_tuple$1[0], StartElement); - ok = _tuple$1[1]; - if (ok) { - start = t[0]; - /* break; */ $s = 4; continue; - } - $s = 3; continue; - case 4: - /* } */ case 2: - /* */ if (($clone(val, reflect.Value).Kind() === 20) && !$clone(val, reflect.Value).IsNil()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (($clone(val, reflect.Value).Kind() === 20) && !$clone(val, reflect.Value).IsNil()) { */ case 6: - _r$7 = $clone(val, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - e = _r$7; - if (($clone(e, reflect.Value).Kind() === 22) && !$clone(e, reflect.Value).IsNil()) { - val = e; - } - /* } */ case 7: - /* */ if ($clone(val, reflect.Value).Kind() === 22) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($clone(val, reflect.Value).Kind() === 22) { */ case 9: - /* */ if ($clone(val, reflect.Value).IsNil()) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($clone(val, reflect.Value).IsNil()) { */ case 11: - _r$8 = $clone(val, reflect.Value).Type().Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = reflect.New(_r$8); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(val, reflect.Value).Set($clone(_r$9, reflect.Value)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - _r$10 = $clone(val, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - val = _r$10; - /* } */ case 10: - if (!($clone(val, reflect.Value).CanInterface())) { _v = false; $s = 19; continue s; } - _r$11 = $clone(val, reflect.Value).Type().Implements(unmarshalerType); /* */ $s = 20; case 20: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _v = _r$11; case 19: - /* */ if (_v) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_v) { */ case 17: - _r$12 = $clone(val, reflect.Value).Interface(); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = d.unmarshalInterface($assertType(_r$12, Unmarshaler), start); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = _r$13; - $s = 23; case 23: return $24r; - /* } */ case 18: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 24: - pv = $clone(val, reflect.Value).Addr(); - if (!($clone(pv, reflect.Value).CanInterface())) { _v$1 = false; $s = 28; continue s; } - _r$14 = $clone(pv, reflect.Value).Type().Implements(unmarshalerType); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _v$1 = _r$14; case 28: - /* */ if (_v$1) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_v$1) { */ case 26: - _r$15 = $clone(pv, reflect.Value).Interface(); /* */ $s = 30; case 30: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = d.unmarshalInterface($assertType(_r$15, Unmarshaler), start); /* */ $s = 31; case 31: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$1 = _r$16; - $s = 32; case 32: return $24r$1; - /* } */ case 27: - /* } */ case 25: - if (!($clone(val, reflect.Value).CanInterface())) { _v$2 = false; $s = 35; continue s; } - _r$17 = $clone(val, reflect.Value).Type().Implements(textUnmarshalerType); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _v$2 = _r$17; case 35: - /* */ if (_v$2) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (_v$2) { */ case 33: - _r$18 = $clone(val, reflect.Value).Interface(); /* */ $s = 37; case 37: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = d.unmarshalTextInterface($assertType(_r$18, encoding.TextUnmarshaler)); /* */ $s = 38; case 38: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$2 = _r$19; - $s = 39; case 39: return $24r$2; - /* } */ case 34: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 40: - pv$1 = $clone(val, reflect.Value).Addr(); - if (!($clone(pv$1, reflect.Value).CanInterface())) { _v$3 = false; $s = 44; continue s; } - _r$20 = $clone(pv$1, reflect.Value).Type().Implements(textUnmarshalerType); /* */ $s = 45; case 45: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _v$3 = _r$20; case 44: - /* */ if (_v$3) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (_v$3) { */ case 42: - _r$21 = $clone(pv$1, reflect.Value).Interface(); /* */ $s = 46; case 46: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = d.unmarshalTextInterface($assertType(_r$21, encoding.TextUnmarshaler)); /* */ $s = 47; case 47: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $24r$3 = _r$22; - $s = 48; case 48: return $24r$3; - /* } */ case 43: - /* } */ case 41: - data = sliceType$3.nil; - saveData = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - comment = sliceType$3.nil; - saveComment = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - saveXML = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - saveXMLIndex = 0; - saveXMLData = sliceType$3.nil; - saveAny = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - sv = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - tinfo = ptrType$9.nil; - err$1 = $ifaceNil; - v = val; - _1 = $clone(v, reflect.Value).Kind(); - /* */ if (_1 === (20)) { $s = 50; continue; } - /* */ if (_1 === (23)) { $s = 51; continue; } - /* */ if ((_1 === (1)) || (_1 === (13)) || (_1 === (14)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (24))) { $s = 52; continue; } - /* */ if (_1 === (25)) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if (_1 === (20)) { */ case 50: - _r$23 = d.Skip(); /* */ $s = 56; case 56: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$4 = _r$23; - $s = 57; case 57: return $24r$4; - /* } else if (_1 === (23)) { */ case 51: - typ = $clone(v, reflect.Value).Type(); - _r$24 = typ.Elem(); /* */ $s = 60; case 60: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = _r$24.Kind(); /* */ $s = 61; case 61: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - /* */ if (_r$25 === 8) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (_r$25 === 8) { */ case 58: - saveData = v; - /* break; */ $s = 49; continue; - /* } */ case 59: - n = $clone(v, reflect.Value).Len(); - _arg = $clone(val, reflect.Value); - _r$26 = $clone(v, reflect.Value).Type().Elem(); /* */ $s = 62; case 62: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = reflect.Zero(_r$26); /* */ $s = 63; case 63: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$27, reflect.Value); - _r$28 = reflect.Append(_arg, new sliceType$8([_arg$1])); /* */ $s = 64; case 64: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$28, reflect.Value)); /* */ $s = 65; case 65: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$29 = $clone(v, reflect.Value).Index(n); /* */ $s = 66; case 66: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$30 = d.unmarshal($clone(_r$29, reflect.Value), start, depth + 1 >> 0); /* */ $s = 67; case 67: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - err$2 = _r$30; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $clone(v, reflect.Value).SetLen(n); - $s = -1; return err$2; - } - $s = -1; return $ifaceNil; - /* } else if ((_1 === (1)) || (_1 === (13)) || (_1 === (14)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (24))) { */ case 52: - saveData = v; - $s = 55; continue; - /* } else if (_1 === (25)) { */ case 53: - typ$1 = $clone(v, reflect.Value).Type(); - /* */ if ($interfaceIsEqual(typ$1, nameType)) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if ($interfaceIsEqual(typ$1, nameType)) { */ case 68: - _r$31 = reflect.ValueOf((x$2 = start.Name, new x$2.constructor.elem(x$2))); /* */ $s = 70; case 70: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$31, reflect.Value)); /* */ $s = 71; case 71: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 49; continue; - /* } */ case 69: - sv = v; - _r$32 = getTypeInfo(typ$1); /* */ $s = 72; case 72: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _tuple$2 = _r$32; - tinfo = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* */ if (!(tinfo.xmlname === ptrType$10.nil)) { $s = 73; continue; } - /* */ $s = 74; continue; - /* if (!(tinfo.xmlname === ptrType$10.nil)) { */ case 73: - finfo = tinfo.xmlname; - if (!(finfo.name === "") && !(finfo.name === start.Name.Local)) { - $s = -1; return new UnmarshalError(("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">")); - } - if (!(finfo.xmlns === "") && !(finfo.xmlns === start.Name.Space)) { - e$1 = "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have "; - if (start.Name.Space === "") { - e$1 = e$1 + ("no name space"); - } else { - e$1 = e$1 + (start.Name.Space); - } - $s = -1; return new UnmarshalError((e$1)); - } - _r$33 = finfo.value($clone(sv, reflect.Value), true); /* */ $s = 75; case 75: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - fv = _r$33; - _r$34 = $clone(fv, reflect.Value).Interface(); /* */ $s = 76; case 76: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _tuple$3 = $assertType(_r$34, Name, true); - ok$1 = _tuple$3[1]; - /* */ if (ok$1) { $s = 77; continue; } - /* */ $s = 78; continue; - /* if (ok$1) { */ case 77: - _r$35 = reflect.ValueOf((x$3 = start.Name, new x$3.constructor.elem(x$3))); /* */ $s = 79; case 79: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - $r = $clone(fv, reflect.Value).Set($clone(_r$35, reflect.Value)); /* */ $s = 80; case 80: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 78: - /* } */ case 74: - _ref = start.Attr; - _i = 0; - /* while (true) { */ case 81: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 82; continue; } - a = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), Attr); - handled = false; - any = -1; - _ref$1 = tinfo.fields; - _i$1 = 0; - /* while (true) { */ case 83: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 84; continue; } - i = _i$1; - finfo$1 = (x$4 = tinfo.fields, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])); - _2 = finfo$1.flags & 127; - /* */ if (_2 === (2)) { $s = 86; continue; } - /* */ if (_2 === (66)) { $s = 87; continue; } - /* */ $s = 88; continue; - /* if (_2 === (2)) { */ case 86: - _r$36 = finfo$1.value($clone(sv, reflect.Value), true); /* */ $s = 89; case 89: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - strv = _r$36; - /* */ if (a.Name.Local === finfo$1.name && (finfo$1.xmlns === "" || finfo$1.xmlns === a.Name.Space)) { $s = 90; continue; } - /* */ $s = 91; continue; - /* if (a.Name.Local === finfo$1.name && (finfo$1.xmlns === "" || finfo$1.xmlns === a.Name.Space)) { */ case 90: - _r$37 = d.unmarshalAttr($clone(strv, reflect.Value), $clone(a, Attr)); /* */ $s = 92; case 92: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - err$3 = _r$37; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - handled = true; - /* } */ case 91: - $s = 88; continue; - /* } else if (_2 === (66)) { */ case 87: - if (any === -1) { - any = i; - } - /* } */ case 88: - case 85: - _i$1++; - $s = 83; continue; - case 84: - /* */ if (!handled && any >= 0) { $s = 93; continue; } - /* */ $s = 94; continue; - /* if (!handled && any >= 0) { */ case 93: - finfo$2 = (x$5 = tinfo.fields, ((any < 0 || any >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + any])); - _r$38 = finfo$2.value($clone(sv, reflect.Value), true); /* */ $s = 95; case 95: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - strv$1 = _r$38; - _r$39 = d.unmarshalAttr($clone(strv$1, reflect.Value), $clone(a, Attr)); /* */ $s = 96; case 96: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - err$4 = _r$39; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - /* } */ case 94: - _i++; - $s = 81; continue; - case 82: - _ref$2 = tinfo.fields; - _i$2 = 0; - /* while (true) { */ case 97: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 98; continue; } - i$1 = _i$2; - finfo$3 = (x$6 = tinfo.fields, ((i$1 < 0 || i$1 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i$1])); - _3 = finfo$3.flags & 127; - /* */ if ((_3 === (4)) || (_3 === (8))) { $s = 100; continue; } - /* */ if (_3 === (32)) { $s = 101; continue; } - /* */ if ((_3 === (64)) || (_3 === (65))) { $s = 102; continue; } - /* */ if (_3 === (16)) { $s = 103; continue; } - /* */ $s = 104; continue; - /* if ((_3 === (4)) || (_3 === (8))) { */ case 100: - /* */ if (!$clone(saveData, reflect.Value).IsValid()) { $s = 105; continue; } - /* */ $s = 106; continue; - /* if (!$clone(saveData, reflect.Value).IsValid()) { */ case 105: - _r$40 = finfo$3.value($clone(sv, reflect.Value), true); /* */ $s = 107; case 107: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - saveData = _r$40; - /* } */ case 106: - $s = 104; continue; - /* } else if (_3 === (32)) { */ case 101: - /* */ if (!$clone(saveComment, reflect.Value).IsValid()) { $s = 108; continue; } - /* */ $s = 109; continue; - /* if (!$clone(saveComment, reflect.Value).IsValid()) { */ case 108: - _r$41 = finfo$3.value($clone(sv, reflect.Value), true); /* */ $s = 110; case 110: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - saveComment = _r$41; - /* } */ case 109: - $s = 104; continue; - /* } else if ((_3 === (64)) || (_3 === (65))) { */ case 102: - /* */ if (!$clone(saveAny, reflect.Value).IsValid()) { $s = 111; continue; } - /* */ $s = 112; continue; - /* if (!$clone(saveAny, reflect.Value).IsValid()) { */ case 111: - _r$42 = finfo$3.value($clone(sv, reflect.Value), true); /* */ $s = 113; case 113: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - saveAny = _r$42; - /* } */ case 112: - $s = 104; continue; - /* } else if (_3 === (16)) { */ case 103: - /* */ if (!$clone(saveXML, reflect.Value).IsValid()) { $s = 114; continue; } - /* */ $s = 115; continue; - /* if (!$clone(saveXML, reflect.Value).IsValid()) { */ case 114: - _r$43 = finfo$3.value($clone(sv, reflect.Value), true); /* */ $s = 116; case 116: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - saveXML = _r$43; - if (d.saved === ptrType$6.nil) { - saveXMLIndex = 0; - d.saved = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - } else { - saveXMLIndex = d.savedOffset(); - } - /* } */ case 115: - /* } */ case 104: - case 99: - _i$2++; - $s = 97; continue; - case 98: - $s = 55; continue; - /* } else { */ case 54: - _r$44 = $clone(v, reflect.Value).Type().String(); /* */ $s = 117; case 117: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - _r$45 = errors.New("unknown type " + _r$44); /* */ $s = 118; case 118: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - $24r$5 = _r$45; - $s = 119; case 119: return $24r$5; - /* } */ case 55: - case 49: - /* while (true) { */ case 120: - t$1 = [t$1]; - savedOffset = 0; - if ($clone(saveXML, reflect.Value).IsValid()) { - savedOffset = d.savedOffset(); - } - _r$46 = d.Token(); /* */ $s = 122; case 122: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } - _tuple$4 = _r$46; - tok$1 = _tuple$4[0]; - err$5 = _tuple$4[1]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - _ref$3 = tok$1; - /* */ if ($assertType(_ref$3, StartElement, true)[1]) { $s = 123; continue; } - /* */ if ($assertType(_ref$3, EndElement, true)[1]) { $s = 124; continue; } - /* */ if ($assertType(_ref$3, CharData, true)[1]) { $s = 125; continue; } - /* */ if ($assertType(_ref$3, Comment, true)[1]) { $s = 126; continue; } - /* */ $s = 127; continue; - /* if ($assertType(_ref$3, StartElement, true)[1]) { */ case 123: - t$1[0] = $clone(_ref$3.$val, StartElement); - consumed = false; - /* */ if ($clone(sv, reflect.Value).IsValid()) { $s = 128; continue; } - /* */ $s = 129; continue; - /* if ($clone(sv, reflect.Value).IsValid()) { */ case 128: - _r$47 = d.unmarshalPath(tinfo, $clone(sv, reflect.Value), sliceType$2.nil, t$1[0], depth); /* */ $s = 130; case 130: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } - _tuple$5 = _r$47; - consumed = _tuple$5[0]; - err$5 = _tuple$5[1]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - /* */ if (!consumed && $clone(saveAny, reflect.Value).IsValid()) { $s = 131; continue; } - /* */ $s = 132; continue; - /* if (!consumed && $clone(saveAny, reflect.Value).IsValid()) { */ case 131: - consumed = true; - _r$48 = d.unmarshal($clone(saveAny, reflect.Value), t$1[0], depth + 1 >> 0); /* */ $s = 133; case 133: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } - err$6 = _r$48; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - /* } */ case 132: - /* } */ case 129: - /* */ if (!consumed) { $s = 134; continue; } - /* */ $s = 135; continue; - /* if (!consumed) { */ case 134: - _r$49 = d.Skip(); /* */ $s = 136; case 136: if($c) { $c = false; _r$49 = _r$49.$blk(); } if (_r$49 && _r$49.$blk !== undefined) { break s; } - err$7 = _r$49; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - /* } */ case 135: - $s = 127; continue; - /* } else if ($assertType(_ref$3, EndElement, true)[1]) { */ case 124: - t$2 = $clone(_ref$3.$val, EndElement); - if ($clone(saveXML, reflect.Value).IsValid()) { - saveXMLData = $subslice(d.saved.Bytes(), saveXMLIndex, savedOffset); - if (saveXMLIndex === 0) { - d.saved = ptrType$6.nil; - } - } - /* break Loop; */ $s = 121; continue s; - $s = 127; continue; - /* } else if ($assertType(_ref$3, CharData, true)[1]) { */ case 125: - t$3 = _ref$3.$val; - if ($clone(saveData, reflect.Value).IsValid()) { - data = $appendSlice(data, $convertSliceType(t$3, sliceType$3)); - } - $s = 127; continue; - /* } else if ($assertType(_ref$3, Comment, true)[1]) { */ case 126: - t$4 = _ref$3.$val; - if ($clone(saveComment, reflect.Value).IsValid()) { - comment = $appendSlice(comment, $convertSliceType(t$4, sliceType$3)); - } - /* } */ case 127: - $s = 120; continue; - case 121: - if (!($clone(saveData, reflect.Value).IsValid() && $clone(saveData, reflect.Value).CanInterface())) { _v$4 = false; $s = 139; continue s; } - _r$50 = $clone(saveData, reflect.Value).Type().Implements(textUnmarshalerType); /* */ $s = 140; case 140: if($c) { $c = false; _r$50 = _r$50.$blk(); } if (_r$50 && _r$50.$blk !== undefined) { break s; } - _v$4 = _r$50; case 139: - /* */ if (_v$4) { $s = 137; continue; } - /* */ $s = 138; continue; - /* if (_v$4) { */ case 137: - _r$51 = $clone(saveData, reflect.Value).Interface(); /* */ $s = 141; case 141: if($c) { $c = false; _r$51 = _r$51.$blk(); } if (_r$51 && _r$51.$blk !== undefined) { break s; } - _r$52 = $assertType(_r$51, encoding.TextUnmarshaler).UnmarshalText(data); /* */ $s = 142; case 142: if($c) { $c = false; _r$52 = _r$52.$blk(); } if (_r$52 && _r$52.$blk !== undefined) { break s; } - err$8 = _r$52; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - saveData = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - /* } */ case 138: - /* */ if ($clone(saveData, reflect.Value).IsValid() && $clone(saveData, reflect.Value).CanAddr()) { $s = 143; continue; } - /* */ $s = 144; continue; - /* if ($clone(saveData, reflect.Value).IsValid() && $clone(saveData, reflect.Value).CanAddr()) { */ case 143: - pv$2 = $clone(saveData, reflect.Value).Addr(); - if (!($clone(pv$2, reflect.Value).CanInterface())) { _v$5 = false; $s = 147; continue s; } - _r$53 = $clone(pv$2, reflect.Value).Type().Implements(textUnmarshalerType); /* */ $s = 148; case 148: if($c) { $c = false; _r$53 = _r$53.$blk(); } if (_r$53 && _r$53.$blk !== undefined) { break s; } - _v$5 = _r$53; case 147: - /* */ if (_v$5) { $s = 145; continue; } - /* */ $s = 146; continue; - /* if (_v$5) { */ case 145: - _r$54 = $clone(pv$2, reflect.Value).Interface(); /* */ $s = 149; case 149: if($c) { $c = false; _r$54 = _r$54.$blk(); } if (_r$54 && _r$54.$blk !== undefined) { break s; } - _r$55 = $assertType(_r$54, encoding.TextUnmarshaler).UnmarshalText(data); /* */ $s = 150; case 150: if($c) { $c = false; _r$55 = _r$55.$blk(); } if (_r$55 && _r$55.$blk !== undefined) { break s; } - err$9 = _r$55; - if (!($interfaceIsEqual(err$9, $ifaceNil))) { - $s = -1; return err$9; - } - saveData = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - /* } */ case 146: - /* } */ case 144: - _r$56 = copyValue($clone(saveData, reflect.Value), data); /* */ $s = 151; case 151: if($c) { $c = false; _r$56 = _r$56.$blk(); } if (_r$56 && _r$56.$blk !== undefined) { break s; } - err$10 = _r$56; - if (!($interfaceIsEqual(err$10, $ifaceNil))) { - $s = -1; return err$10; - } - t$5 = saveComment; - _4 = $clone(t$5, reflect.Value).Kind(); - /* */ if (_4 === (24)) { $s = 153; continue; } - /* */ if (_4 === (23)) { $s = 154; continue; } - /* */ $s = 155; continue; - /* if (_4 === (24)) { */ case 153: - $clone(t$5, reflect.Value).SetString(($bytesToString(comment))); - $s = 155; continue; - /* } else if (_4 === (23)) { */ case 154: - _r$57 = reflect.ValueOf(comment); /* */ $s = 156; case 156: if($c) { $c = false; _r$57 = _r$57.$blk(); } if (_r$57 && _r$57.$blk !== undefined) { break s; } - $r = $clone(t$5, reflect.Value).Set($clone(_r$57, reflect.Value)); /* */ $s = 157; case 157: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 155: - case 152: - t$6 = saveXML; - _5 = $clone(t$6, reflect.Value).Kind(); - /* */ if (_5 === (24)) { $s = 159; continue; } - /* */ if (_5 === (23)) { $s = 160; continue; } - /* */ $s = 161; continue; - /* if (_5 === (24)) { */ case 159: - $clone(t$6, reflect.Value).SetString(($bytesToString(saveXMLData))); - $s = 161; continue; - /* } else if (_5 === (23)) { */ case 160: - _r$58 = $clone(t$6, reflect.Value).Type().Elem(); /* */ $s = 164; case 164: if($c) { $c = false; _r$58 = _r$58.$blk(); } if (_r$58 && _r$58.$blk !== undefined) { break s; } - _r$59 = _r$58.Kind(); /* */ $s = 165; case 165: if($c) { $c = false; _r$59 = _r$59.$blk(); } if (_r$59 && _r$59.$blk !== undefined) { break s; } - /* */ if (_r$59 === 8) { $s = 162; continue; } - /* */ $s = 163; continue; - /* if (_r$59 === 8) { */ case 162: - _r$60 = reflect.ValueOf(saveXMLData); /* */ $s = 166; case 166: if($c) { $c = false; _r$60 = _r$60.$blk(); } if (_r$60 && _r$60.$blk !== undefined) { break s; } - $r = $clone(t$6, reflect.Value).Set($clone(_r$60, reflect.Value)); /* */ $s = 167; case 167: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 163: - /* } */ case 161: - case 158: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.unmarshal, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _1, _2, _3, _4, _5, _arg, _arg$1, _i, _i$1, _i$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$50, _r$51, _r$52, _r$53, _r$54, _r$55, _r$56, _r$57, _r$58, _r$59, _r$6, _r$60, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _v, _v$1, _v$2, _v$3, _v$4, _v$5, a, any, comment, consumed, d, data, depth, e, e$1, err, err$1, err$10, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, finfo, finfo$1, finfo$2, finfo$3, fv, handled, i, i$1, n, ok, ok$1, pv, pv$1, pv$2, saveAny, saveComment, saveData, saveXML, saveXMLData, saveXMLIndex, savedOffset, start, strv, strv$1, sv, t, t$1, t$2, t$3, t$4, t$5, t$6, tinfo, tok, tok$1, typ, typ$1, v, val, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - Decoder.prototype.unmarshal = function(val, start, depth) { return this.$val.unmarshal(val, start, depth); }; - copyValue = function(dst, src) { - var {$24r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, dst, dst0, err, err$1, err$2, err$3, err$4, ftmp, itmp, src, utmp, value, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - dst0 = dst; - /* */ if ($clone(dst, reflect.Value).Kind() === 22) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(dst, reflect.Value).Kind() === 22) { */ case 1: - /* */ if ($clone(dst, reflect.Value).IsNil()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($clone(dst, reflect.Value).IsNil()) { */ case 3: - _r$6 = $clone(dst, reflect.Value).Type().Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.New(_r$6); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = $clone(dst, reflect.Value).Set($clone(_r$7, reflect.Value)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - _r$8 = $clone(dst, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - dst = _r$8; - /* } */ case 2: - _1 = $clone(dst, reflect.Value).Kind(); - /* */ if (_1 === (0)) { $s = 10; continue; } - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 11; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 12; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 13; continue; } - /* */ if (_1 === (1)) { $s = 14; continue; } - /* */ if (_1 === (24)) { $s = 15; continue; } - /* */ if (_1 === (23)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_1 === (0)) { */ case 10: - $s = 18; continue; - /* } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 11: - if (src.$length === 0) { - $clone(dst, reflect.Value).SetInt(new $Int64(0, 0)); - err = $ifaceNil; - $s = -1; return err; - } - _r$9 = strings.TrimSpace(($bytesToString(src))); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg = _r$9; - _r$10 = $clone(dst, reflect.Value).Type().Bits(); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = _r$10; - _r$11 = strconv.ParseInt(_arg, 10, _arg$1); /* */ $s = 21; case 21: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple = _r$11; - itmp = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - err = err$1; - $s = -1; return err; - } - $clone(dst, reflect.Value).SetInt(itmp); - $s = 18; continue; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 12: - if (src.$length === 0) { - $clone(dst, reflect.Value).SetUint(new $Uint64(0, 0)); - err = $ifaceNil; - $s = -1; return err; - } - _r$12 = strings.TrimSpace(($bytesToString(src))); /* */ $s = 22; case 22: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$2 = _r$12; - _r$13 = $clone(dst, reflect.Value).Type().Bits(); /* */ $s = 23; case 23: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$3 = _r$13; - _r$14 = strconv.ParseUint(_arg$2, 10, _arg$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$1 = _r$14; - utmp = _tuple$1[0]; - err$2 = _tuple$1[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - err = err$2; - $s = -1; return err; - } - $clone(dst, reflect.Value).SetUint(utmp); - $s = 18; continue; - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 13: - if (src.$length === 0) { - $clone(dst, reflect.Value).SetFloat(0); - err = $ifaceNil; - $s = -1; return err; - } - _r$15 = strings.TrimSpace(($bytesToString(src))); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$4 = _r$15; - _r$16 = $clone(dst, reflect.Value).Type().Bits(); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg$5 = _r$16; - _r$17 = strconv.ParseFloat(_arg$4, _arg$5); /* */ $s = 27; case 27: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$2 = _r$17; - ftmp = _tuple$2[0]; - err$3 = _tuple$2[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - err = err$3; - $s = -1; return err; - } - $clone(dst, reflect.Value).SetFloat(ftmp); - $s = 18; continue; - /* } else if (_1 === (1)) { */ case 14: - if (src.$length === 0) { - $clone(dst, reflect.Value).SetBool(false); - err = $ifaceNil; - $s = -1; return err; - } - _r$18 = strings.TrimSpace(($bytesToString(src))); /* */ $s = 28; case 28: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = strconv.ParseBool(_r$18); /* */ $s = 29; case 29: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple$3 = _r$19; - value = _tuple$3[0]; - err$4 = _tuple$3[1]; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - err = err$4; - $s = -1; return err; - } - $clone(dst, reflect.Value).SetBool(value); - $s = 18; continue; - /* } else if (_1 === (24)) { */ case 15: - $clone(dst, reflect.Value).SetString(($bytesToString(src))); - $s = 18; continue; - /* } else if (_1 === (23)) { */ case 16: - if (src.$length === 0) { - src = new sliceType$3([]); - } - $r = $clone(dst, reflect.Value).SetBytes(src); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 18; continue; - /* } else { */ case 17: - _r$20 = $clone(dst0, reflect.Value).Type().String(); /* */ $s = 31; case 31: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$21 = errors.New("cannot unmarshal into " + _r$20); /* */ $s = 32; case 32: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - err = _r$21; - $24r = err; - $s = 33; case 33: return $24r; - /* } */ case 18: - case 9: - err = $ifaceNil; - $s = -1; return err; - /* */ } return; } var $f = {$blk: copyValue, $c: true, $r, $24r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, dst, dst0, err, err$1, err$2, err$3, err$4, ftmp, itmp, src, utmp, value, $s};return $f; - }; - Decoder.ptr.prototype.unmarshalPath = function(tinfo, sv, parents, start, depth) { - var {$24r, _i, _i$1, _r$10, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, consumed, consumed2, d, depth, err, err$1, err$2, finfo, i, j, parents, recurse, start, sv, t, t$1, tinfo, tok, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {tinfo, sv, parents, start, depth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - consumed = false; - err = $ifaceNil; - d = this; - recurse = false; - _ref = tinfo.fields; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - finfo = (x$2 = tinfo.fields, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])); - if (((finfo.flags & 1) === 0) || finfo.parents.$length < parents.$length || !(finfo.xmlns === "") && !(finfo.xmlns === start.Name.Space)) { - _i++; - /* continue; */ $s = 1; continue; - } - _ref$1 = parents; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - j = _i$1; - if (!(((j < 0 || j >= parents.$length) ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + j]) === (x$3 = finfo.parents, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j])))) { - _i++; - /* continue Loop; */ $s = 1; continue s; - } - _i$1++; - } - /* */ if ((finfo.parents.$length === parents.$length) && finfo.name === start.Name.Local) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((finfo.parents.$length === parents.$length) && finfo.name === start.Name.Local) { */ case 3: - _tmp = true; - _r$6 = finfo.value($clone(sv, reflect.Value), true); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = d.unmarshal($clone(_r$6, reflect.Value), start, depth + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$1 = _r$7; - consumed = _tmp; - err = _tmp$1; - $24r = [consumed, err]; - $s = 7; case 7: return $24r; - /* } */ case 4: - if (finfo.parents.$length > parents.$length && (x$4 = finfo.parents, x$5 = parents.$length, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])) === start.Name.Local) { - recurse = true; - parents = $subslice(finfo.parents, 0, (parents.$length + 1 >> 0)); - /* break; */ $s = 2; continue; - } - _i++; - $s = 1; continue; - case 2: - if (!recurse) { - _tmp$2 = false; - _tmp$3 = $ifaceNil; - consumed = _tmp$2; - err = _tmp$3; - $s = -1; return [consumed, err]; - } - /* while (true) { */ case 8: - t = [t]; - tok = $ifaceNil; - _r$8 = d.Token(); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - tok = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = true; - _tmp$5 = err; - consumed = _tmp$4; - err = _tmp$5; - $s = -1; return [consumed, err]; - } - _ref$2 = tok; - /* */ if ($assertType(_ref$2, StartElement, true)[1]) { $s = 11; continue; } - /* */ if ($assertType(_ref$2, EndElement, true)[1]) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($assertType(_ref$2, StartElement, true)[1]) { */ case 11: - t[0] = $clone(_ref$2.$val, StartElement); - _r$9 = d.unmarshalPath(tinfo, $clone(sv, reflect.Value), parents, t[0], depth); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - consumed2 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$6 = true; - _tmp$7 = err$1; - consumed = _tmp$6; - err = _tmp$7; - $s = -1; return [consumed, err]; - } - /* */ if (!consumed2) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!consumed2) { */ case 15: - _r$10 = d.Skip(); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$2 = _r$10; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$8 = true; - _tmp$9 = err$2; - consumed = _tmp$8; - err = _tmp$9; - $s = -1; return [consumed, err]; - } - /* } */ case 16: - $s = 13; continue; - /* } else if ($assertType(_ref$2, EndElement, true)[1]) { */ case 12: - t$1 = $clone(_ref$2.$val, EndElement); - _tmp$10 = true; - _tmp$11 = $ifaceNil; - consumed = _tmp$10; - err = _tmp$11; - $s = -1; return [consumed, err]; - /* } */ case 13: - $s = 8; continue; - case 9: - $s = -1; return [consumed, err]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.unmarshalPath, $c: true, $r, $24r, _i, _i$1, _r$10, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, consumed, consumed2, d, depth, err, err$1, err$2, finfo, i, j, parents, recurse, start, sv, t, t$1, tinfo, tok, x$2, x$3, x$4, x$5, $s};return $f; - }; - Decoder.prototype.unmarshalPath = function(tinfo, sv, parents, start, depth) { return this.$val.unmarshalPath(tinfo, sv, parents, start, depth); }; - Decoder.ptr.prototype.Skip = function() { - var {_r$6, _ref, _tuple, d, depth, err, tok, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - depth = new $Int64(0, 0); - /* while (true) { */ case 1: - _r$6 = d.Token(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - tok = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _ref = tok; - if ($assertType(_ref, StartElement, true)[1]) { - depth = (x$2 = new $Int64(0, 1), new $Int64(depth.$high + x$2.$high, depth.$low + x$2.$low)); - } else if ($assertType(_ref, EndElement, true)[1]) { - if ((depth.$high === 0 && depth.$low === 0)) { - $s = -1; return $ifaceNil; - } - depth = (x$3 = new $Int64(0, 1), new $Int64(depth.$high - x$3.$high, depth.$low - x$3.$low)); - } - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.Skip, $c: true, $r, _r$6, _ref, _tuple, d, depth, err, tok, x$2, x$3, $s};return $f; - }; - Decoder.prototype.Skip = function() { return this.$val.Skip(); }; - Encoder.ptr.prototype.Indent = function(prefix, indent) { - var enc, indent, prefix; - enc = this; - enc.p.prefix = prefix; - enc.p.indent = indent; - }; - Encoder.prototype.Indent = function(prefix, indent) { return this.$val.Indent(prefix, indent); }; - Encoder.ptr.prototype.Encode = function(v) { - var {$24r, _r$6, _r$7, _r$8, enc, err, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - _r$6 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = enc.p.marshalValue($clone(_r$6, reflect.Value), ptrType$10.nil, ptrType$12.nil); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$8 = enc.p.Writer.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.Encode, $c: true, $r, $24r, _r$6, _r$7, _r$8, enc, err, v, $s};return $f; - }; - Encoder.prototype.Encode = function(v) { return this.$val.Encode(v); }; - Encoder.ptr.prototype.EncodeElement = function(v, start) { - var {$24r, _r$6, _r$7, _r$8, enc, err, start, v, $s, $r, $c} = $restore(this, {v, start}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = [start]; - enc = this; - _r$6 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = enc.p.marshalValue($clone(_r$6, reflect.Value), ptrType$10.nil, start[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$8 = enc.p.Writer.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.EncodeElement, $c: true, $r, $24r, _r$6, _r$7, _r$8, enc, err, start, v, $s};return $f; - }; - Encoder.prototype.EncodeElement = function(v, start) { return this.$val.EncodeElement(v, start); }; - Encoder.ptr.prototype.EncodeToken = function(t) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$6, _r$7, _r$8, _r$9, _ref, enc, err, err$1, p, t, t$1, t$2, t$3, t$4, t$5, t$6, t$7, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t$1 = [t$1]; - enc = this; - p = enc.p; - _ref = t; - /* */ if ($assertType(_ref, StartElement, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, EndElement, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, CharData, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, Comment, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, ProcInst, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, Directive, true)[1]) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($assertType(_ref, StartElement, true)[1]) { */ case 1: - t$1[0] = $clone(_ref.$val, StartElement); - _r$6 = p.writeStart(t$1[0]); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 8; continue; - /* } else if ($assertType(_ref, EndElement, true)[1]) { */ case 2: - t$2 = $clone(_ref.$val, EndElement); - _r$7 = p.writeEnd($clone(t$2.Name, Name)); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err$1 = _r$7; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 8; continue; - /* } else if ($assertType(_ref, CharData, true)[1]) { */ case 3: - t$3 = _ref.$val; - _r$8 = escapeText(p, $convertSliceType(t$3, sliceType$3), false); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = 8; continue; - /* } else if ($assertType(_ref, Comment, true)[1]) { */ case 4: - t$4 = _ref.$val; - /* */ if (bytes.Contains($convertSliceType(t$4, sliceType$3), endComment)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (bytes.Contains($convertSliceType(t$4, sliceType$3), endComment)) { */ case 12: - _r$9 = fmt.Errorf("xml: EncodeToken of Comment containing --> marker", new sliceType$5([])); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 15; case 15: return $24r; - /* } */ case 13: - _r$10 = p.Writer.WriteString(""); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = p.cachedWriteError(); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$1 = _r$13; - $s = 20; case 20: return $24r$1; - /* } else if ($assertType(_ref, ProcInst, true)[1]) { */ case 5: - t$5 = $clone(_ref.$val, ProcInst); - /* */ if (t$5.Target === "xml" && !((p.Writer.Buffered() === 0))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (t$5.Target === "xml" && !((p.Writer.Buffered() === 0))) { */ case 21: - _r$14 = fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded", new sliceType$5([])); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$2 = _r$14; - $s = 24; case 24: return $24r$2; - /* } */ case 22: - /* */ if (!isNameString(t$5.Target)) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!isNameString(t$5.Target)) { */ case 25: - _r$15 = fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target", new sliceType$5([])); /* */ $s = 27; case 27: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$3 = _r$15; - $s = 28; case 28: return $24r$3; - /* } */ case 26: - /* */ if (bytes.Contains(t$5.Inst, endProcInst)) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (bytes.Contains(t$5.Inst, endProcInst)) { */ case 29: - _r$16 = fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker", new sliceType$5([])); /* */ $s = 31; case 31: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$4 = _r$16; - $s = 32; case 32: return $24r$4; - /* } */ case 30: - _r$17 = p.Writer.WriteString(" 0) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (t$5.Inst.$length > 0) { */ case 35: - _r$19 = p.Writer.WriteByte(32); /* */ $s = 37; case 37: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - _r$20 = p.Writer.Write(t$5.Inst); /* */ $s = 38; case 38: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - /* } */ case 36: - _r$21 = p.Writer.WriteString("?>"); /* */ $s = 39; case 39: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - $s = 8; continue; - /* } else if ($assertType(_ref, Directive, true)[1]) { */ case 6: - t$6 = _ref.$val; - /* */ if (!isValidDirective(t$6)) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (!isValidDirective(t$6)) { */ case 40: - _r$22 = fmt.Errorf("xml: EncodeToken of Directive containing wrong < or > markers", new sliceType$5([])); /* */ $s = 42; case 42: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $24r$5 = _r$22; - $s = 43; case 43: return $24r$5; - /* } */ case 41: - _r$23 = p.Writer.WriteString(""); /* */ $s = 46; case 46: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - $s = 8; continue; - /* } else { */ case 7: - t$7 = _ref; - _r$26 = fmt.Errorf("xml: EncodeToken of invalid token type", new sliceType$5([])); /* */ $s = 47; case 47: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $24r$6 = _r$26; - $s = 48; case 48: return $24r$6; - /* } */ case 8: - _r$27 = p.cachedWriteError(); /* */ $s = 49; case 49: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $24r$7 = _r$27; - $s = 50; case 50: return $24r$7; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.EncodeToken, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$6, _r$7, _r$8, _r$9, _ref, enc, err, err$1, p, t, t$1, t$2, t$3, t$4, t$5, t$6, t$7, $s};return $f; - }; - Encoder.prototype.EncodeToken = function(t) { return this.$val.EncodeToken(t); }; - isValidDirective = function(dir) { - var _i, _ref, c, depth, dir, i, incomment, inquote, n; - depth = 0; - inquote = 0; - incomment = false; - _ref = dir; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (incomment) { - if (c === 62) { - n = (1 + i >> 0) - endComment.$length >> 0; - if (n >= 0 && bytes.Equal($convertSliceType($subslice(dir, n, (i + 1 >> 0)), sliceType$3), endComment)) { - incomment = false; - } - } - } else if (!((inquote === 0))) { - if (c === inquote) { - inquote = 0; - } - } else if ((c === 39) || (c === 34)) { - inquote = c; - } else if ((c === 60)) { - if ((i + begComment.$length >> 0) < dir.$length && bytes.Equal($convertSliceType($subslice(dir, i, (i + begComment.$length >> 0)), sliceType$3), begComment)) { - incomment = true; - } else { - depth = depth + (1) >> 0; - } - } else if ((c === 62)) { - if (depth === 0) { - return false; - } - depth = depth - (1) >> 0; - } - _i++; - } - return (depth === 0) && (inquote === 0) && !incomment; - }; - Encoder.ptr.prototype.Flush = function() { - var {$24r, _r$6, enc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - _r$6 = enc.p.Writer.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.Flush, $c: true, $r, $24r, _r$6, enc, $s};return $f; - }; - Encoder.prototype.Flush = function() { return this.$val.Flush(); }; - printer.ptr.prototype.createAttrPrefix = function(url) { - var {_entry, _entry$1, _entry$2, _key, _key$1, _r$10, _r$6, _r$7, _r$8, _r$9, i, id, p, prefix, prefix$1, url, $s, $r, $c} = $restore(this, {url}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - prefix = (_entry = p.attrPrefix[$String.keyFor(url)], _entry !== undefined ? _entry.v : ""); - if (!(prefix === "")) { - $s = -1; return prefix; - } - if (url === "http://www.w3.org/XML/1998/namespace") { - $s = -1; return "xml"; - } - if (p.attrPrefix === false) { - p.attrPrefix = {}; - p.attrNS = {}; - } - prefix$1 = strings.TrimRight(url, "/"); - i = strings.LastIndex(prefix$1, "/"); - if (i >= 0) { - prefix$1 = $substring(prefix$1, (i + 1 >> 0)); - } - if (prefix$1 === "" || !isName((new sliceType$3($stringToBytes(prefix$1)))) || strings.Contains(prefix$1, ":")) { - prefix$1 = "_"; - } - if (prefix$1.length >= 3 && strings.EqualFold($substring(prefix$1, 0, 3), "xml")) { - prefix$1 = "_" + prefix$1; - } - if (!((_entry$1 = p.attrNS[$String.keyFor(prefix$1)], _entry$1 !== undefined ? _entry$1.v : "") === "")) { - p.seq = p.seq + (1) >> 0; - while (true) { - id = prefix$1 + "_" + strconv.Itoa(p.seq); - if ((_entry$2 = p.attrNS[$String.keyFor(id)], _entry$2 !== undefined ? _entry$2.v : "") === "") { - prefix$1 = id; - break; - } - p.seq = p.seq + (1) >> 0; - } - } - _key = url; (p.attrPrefix || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: prefix$1 }; - _key$1 = prefix$1; (p.attrNS || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: url }; - _r$6 = p.Writer.WriteString("xmlns:"); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = p.Writer.WriteString(prefix$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = p.Writer.WriteString("=\""); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = EscapeText(p, (new sliceType$3($stringToBytes(url)))); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = p.Writer.WriteString("\" "); /* */ $s = 5; case 5: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - p.prefixes = $append(p.prefixes, prefix$1); - $s = -1; return prefix$1; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.createAttrPrefix, $c: true, $r, _entry, _entry$1, _entry$2, _key, _key$1, _r$10, _r$6, _r$7, _r$8, _r$9, i, id, p, prefix, prefix$1, url, $s};return $f; - }; - printer.prototype.createAttrPrefix = function(url) { return this.$val.createAttrPrefix(url); }; - printer.ptr.prototype.deleteAttrPrefix = function(prefix) { - var _entry, p, prefix; - p = this; - delete p.attrPrefix[$String.keyFor((_entry = p.attrNS[$String.keyFor(prefix)], _entry !== undefined ? _entry.v : ""))]; - delete p.attrNS[$String.keyFor(prefix)]; - }; - printer.prototype.deleteAttrPrefix = function(prefix) { return this.$val.deleteAttrPrefix(prefix); }; - printer.ptr.prototype.markPrefix = function() { - var p; - p = this; - p.prefixes = $append(p.prefixes, ""); - }; - printer.prototype.markPrefix = function() { return this.$val.markPrefix(); }; - printer.ptr.prototype.popPrefix = function() { - var p, prefix, x$2, x$3; - p = this; - while (true) { - if (!(p.prefixes.$length > 0)) { break; } - prefix = (x$2 = p.prefixes, x$3 = p.prefixes.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])); - p.prefixes = $subslice(p.prefixes, 0, (p.prefixes.$length - 1 >> 0)); - if (prefix === "") { - break; - } - p.deleteAttrPrefix(prefix); - } - }; - printer.prototype.popPrefix = function() { return this.$val.popPrefix(); }; - printer.ptr.prototype.marshalValue = function(val, finfo, startTemplate) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _v, _v$1, _v$2, _v$3, _v$4, b, err, err$1, err$2, err$3, err$4, err1, finfo, finfo$1, fv, fv$1, i, i$1, i$2, kind, n, name, name$1, ok, p, pv, pv$1, s, start, startTemplate, tinfo, typ, v, val, x$2, xmlname, $s, $r, $c} = $restore(this, {val, finfo, startTemplate}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = [start]; - p = this; - /* */ if (!(startTemplate === ptrType$12.nil) && startTemplate.Name.Local === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(startTemplate === ptrType$12.nil) && startTemplate.Name.Local === "") { */ case 1: - _r$6 = fmt.Errorf("xml: EncodeElement of StartElement with missing name", new sliceType$5([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 4; case 4: return $24r; - /* } */ case 2: - if (!$clone(val, reflect.Value).IsValid()) { - $s = -1; return $ifaceNil; - } - if (!(finfo === ptrType$10.nil) && !(((finfo.flags & 128) === 0)) && isEmptyValue($clone(val, reflect.Value))) { - $s = -1; return $ifaceNil; - } - /* while (true) { */ case 5: - /* if (!(($clone(val, reflect.Value).Kind() === 20) || ($clone(val, reflect.Value).Kind() === 22))) { break; } */ if(!(($clone(val, reflect.Value).Kind() === 20) || ($clone(val, reflect.Value).Kind() === 22))) { $s = 6; continue; } - if ($clone(val, reflect.Value).IsNil()) { - $s = -1; return $ifaceNil; - } - _r$7 = $clone(val, reflect.Value).Elem(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - val = _r$7; - $s = 5; continue; - case 6: - kind = $clone(val, reflect.Value).Kind(); - typ = $clone(val, reflect.Value).Type(); - if (!($clone(val, reflect.Value).CanInterface())) { _v = false; $s = 10; continue s; } - _r$8 = typ.Implements(marshalerType); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8; case 10: - /* */ if (_v) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v) { */ case 8: - _r$9 = $clone(val, reflect.Value).Interface(); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg = $assertType(_r$9, Marshaler); - _r$10 = defaultStart(typ, finfo, startTemplate); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$10, StartElement); - _r$11 = p.marshalInterface(_arg, _arg$1); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$1 = _r$11; - $s = 15; case 15: return $24r$1; - /* } */ case 9: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 16: - pv = $clone(val, reflect.Value).Addr(); - if (!($clone(pv, reflect.Value).CanInterface())) { _v$1 = false; $s = 20; continue s; } - _r$12 = $clone(pv, reflect.Value).Type().Implements(marshalerType); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$1 = _r$12; case 20: - /* */ if (_v$1) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (_v$1) { */ case 18: - _r$13 = $clone(pv, reflect.Value).Interface(); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$2 = $assertType(_r$13, Marshaler); - _r$14 = defaultStart($clone(pv, reflect.Value).Type(), finfo, startTemplate); /* */ $s = 23; case 23: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$14, StartElement); - _r$15 = p.marshalInterface(_arg$2, _arg$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$2 = _r$15; - $s = 25; case 25: return $24r$2; - /* } */ case 19: - /* } */ case 17: - if (!($clone(val, reflect.Value).CanInterface())) { _v$2 = false; $s = 28; continue s; } - _r$16 = typ.Implements(textMarshalerType); /* */ $s = 29; case 29: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _v$2 = _r$16; case 28: - /* */ if (_v$2) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_v$2) { */ case 26: - _r$17 = $clone(val, reflect.Value).Interface(); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$4 = $assertType(_r$17, encoding.TextMarshaler); - _r$18 = defaultStart(typ, finfo, startTemplate); /* */ $s = 31; case 31: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _arg$5 = $clone(_r$18, StartElement); - _r$19 = p.marshalTextInterface(_arg$4, _arg$5); /* */ $s = 32; case 32: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$3 = _r$19; - $s = 33; case 33: return $24r$3; - /* } */ case 27: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 34: - pv$1 = $clone(val, reflect.Value).Addr(); - if (!($clone(pv$1, reflect.Value).CanInterface())) { _v$3 = false; $s = 38; continue s; } - _r$20 = $clone(pv$1, reflect.Value).Type().Implements(textMarshalerType); /* */ $s = 39; case 39: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _v$3 = _r$20; case 38: - /* */ if (_v$3) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (_v$3) { */ case 36: - _r$21 = $clone(pv$1, reflect.Value).Interface(); /* */ $s = 40; case 40: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$6 = $assertType(_r$21, encoding.TextMarshaler); - _r$22 = defaultStart($clone(pv$1, reflect.Value).Type(), finfo, startTemplate); /* */ $s = 41; case 41: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _arg$7 = $clone(_r$22, StartElement); - _r$23 = p.marshalTextInterface(_arg$6, _arg$7); /* */ $s = 42; case 42: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$4 = _r$23; - $s = 43; case 43: return $24r$4; - /* } */ case 37: - /* } */ case 35: - if (!((kind === 23) || (kind === 17))) { _v$4 = false; $s = 46; continue s; } - _r$24 = typ.Elem(); /* */ $s = 47; case 47: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = _r$24.Kind(); /* */ $s = 48; case 48: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _v$4 = !((_r$25 === 8)); case 46: - /* */ if (_v$4) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (_v$4) { */ case 44: - _tmp = 0; - _tmp$1 = $clone(val, reflect.Value).Len(); - i = _tmp; - n = _tmp$1; - /* while (true) { */ case 49: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 50; continue; } - _r$26 = $clone(val, reflect.Value).Index(i); /* */ $s = 51; case 51: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = p.marshalValue($clone(_r$26, reflect.Value), finfo, startTemplate); /* */ $s = 52; case 52: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - err = _r$27; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = i + (1) >> 0; - $s = 49; continue; - case 50: - $s = -1; return $ifaceNil; - /* } */ case 45: - _r$28 = getTypeInfo(typ); /* */ $s = 53; case 53: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _tuple = _r$28; - tinfo = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - start[0] = new StartElement.ptr(new Name.ptr("", ""), sliceType$4.nil); - /* */ if (!(startTemplate === ptrType$12.nil)) { $s = 54; continue; } - /* */ if (!(tinfo.xmlname === ptrType$10.nil)) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if (!(startTemplate === ptrType$12.nil)) { */ case 54: - Name.copy(start[0].Name, startTemplate.Name); - start[0].Attr = $appendSlice(start[0].Attr, startTemplate.Attr); - $s = 56; continue; - /* } else if (!(tinfo.xmlname === ptrType$10.nil)) { */ case 55: - xmlname = tinfo.xmlname; - /* */ if (!(xmlname.name === "")) { $s = 57; continue; } - /* */ $s = 58; continue; - /* if (!(xmlname.name === "")) { */ case 57: - _tmp$2 = xmlname.xmlns; - _tmp$3 = xmlname.name; - start[0].Name.Space = _tmp$2; - start[0].Name.Local = _tmp$3; - $s = 59; continue; - /* } else { */ case 58: - _r$29 = xmlname.value($clone(val, reflect.Value), false); /* */ $s = 60; case 60: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - fv = _r$29; - _r$30 = $clone(fv, reflect.Value).Interface(); /* */ $s = 61; case 61: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _tuple$1 = $assertType(_r$30, Name, true); - v = $clone(_tuple$1[0], Name); - ok = _tuple$1[1]; - if (ok && !(v.Local === "")) { - Name.copy(start[0].Name, v); - } - /* } */ case 59: - /* } */ case 56: - if (start[0].Name.Local === "" && !(finfo === ptrType$10.nil)) { - _tmp$4 = finfo.xmlns; - _tmp$5 = finfo.name; - start[0].Name.Space = _tmp$4; - start[0].Name.Local = _tmp$5; - } - /* */ if (start[0].Name.Local === "") { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (start[0].Name.Local === "") { */ case 62: - _r$31 = typ.Name(); /* */ $s = 64; case 64: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - name = _r$31; - i$1 = strings.IndexByte(name, 91); - if (i$1 >= 0) { - name = $substring(name, 0, i$1); - } - if (name === "") { - $s = -1; return new UnsupportedTypeError.ptr(typ); - } - start[0].Name.Local = name; - /* } */ case 63: - _ref = tinfo.fields; - _i = 0; - /* while (true) { */ case 65: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 66; continue; } - i$2 = _i; - finfo$1 = (x$2 = tinfo.fields, ((i$2 < 0 || i$2 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$2])); - if ((finfo$1.flags & 2) === 0) { - _i++; - /* continue; */ $s = 65; continue; - } - _r$32 = finfo$1.value($clone(val, reflect.Value), false); /* */ $s = 67; case 67: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - fv$1 = _r$32; - if (!(((finfo$1.flags & 128) === 0)) && (!$clone(fv$1, reflect.Value).IsValid() || isEmptyValue($clone(fv$1, reflect.Value)))) { - _i++; - /* continue; */ $s = 65; continue; - } - if (($clone(fv$1, reflect.Value).Kind() === 20) && $clone(fv$1, reflect.Value).IsNil()) { - _i++; - /* continue; */ $s = 65; continue; - } - name$1 = new Name.ptr(finfo$1.xmlns, finfo$1.name); - _r$33 = p.marshalAttr(start[0], $clone(name$1, Name), $clone(fv$1, reflect.Value)); /* */ $s = 68; case 68: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - err$2 = _r$33; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _i++; - $s = 65; continue; - case 66: - _r$34 = p.writeStart(start[0]); /* */ $s = 69; case 69: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - err$3 = _r$34; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - /* */ if ($clone(val, reflect.Value).Kind() === 25) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if ($clone(val, reflect.Value).Kind() === 25) { */ case 70: - _r$35 = p.marshalStruct(tinfo, $clone(val, reflect.Value)); /* */ $s = 73; case 73: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - err$1 = _r$35; - $s = 72; continue; - /* } else { */ case 71: - _r$36 = p.marshalSimple(typ, $clone(val, reflect.Value)); /* */ $s = 74; case 74: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _tuple$2 = _r$36; - s = _tuple$2[0]; - b = _tuple$2[1]; - err1 = _tuple$2[2]; - /* */ if (!($interfaceIsEqual(err1, $ifaceNil))) { $s = 75; continue; } - /* */ if (!(b === sliceType$3.nil)) { $s = 76; continue; } - /* */ $s = 77; continue; - /* if (!($interfaceIsEqual(err1, $ifaceNil))) { */ case 75: - err$1 = err1; - $s = 78; continue; - /* } else if (!(b === sliceType$3.nil)) { */ case 76: - _r$37 = EscapeText(p, b); /* */ $s = 79; case 79: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _r$37; - $s = 78; continue; - /* } else { */ case 77: - $r = p.EscapeString(s); /* */ $s = 80; case 80: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 78: - /* } */ case 72: - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$38 = p.writeEnd($clone(start[0].Name, Name)); /* */ $s = 81; case 81: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - err$4 = _r$38; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - _r$39 = p.cachedWriteError(); /* */ $s = 82; case 82: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - $24r$5 = _r$39; - $s = 83; case 83: return $24r$5; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.marshalValue, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _v, _v$1, _v$2, _v$3, _v$4, b, err, err$1, err$2, err$3, err$4, err1, finfo, finfo$1, fv, fv$1, i, i$1, i$2, kind, n, name, name$1, ok, p, pv, pv$1, s, start, startTemplate, tinfo, typ, v, val, x$2, xmlname, $s};return $f; - }; - printer.prototype.marshalValue = function(val, finfo, startTemplate) { return this.$val.marshalValue(val, finfo, startTemplate); }; - printer.ptr.prototype.marshalAttr = function(start, name, val) { - var {_1, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, _v$1, _v$2, _v$3, _v$4, attr, attr$1, b, err, err$1, err$2, err$3, err$4, err$5, i, n, name, p, pv, pv$1, s, start, text, text$1, val, $s, $r, $c} = $restore(this, {start, name, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (!($clone(val, reflect.Value).CanInterface())) { _v = false; $s = 3; continue s; } - _r$6 = $clone(val, reflect.Value).Type().Implements(marshalerAttrType); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v = _r$6; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$7 = $clone(val, reflect.Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = $assertType(_r$7, MarshalerAttr).MarshalXMLAttr($clone(name, Name)); /* */ $s = 6; case 6: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - attr = $clone(_tuple[0], Attr); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (!(attr.Name.Local === "")) { - start.Attr = $append(start.Attr, attr); - } - $s = -1; return $ifaceNil; - /* } */ case 2: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 7: - pv = $clone(val, reflect.Value).Addr(); - if (!($clone(pv, reflect.Value).CanInterface())) { _v$1 = false; $s = 11; continue s; } - _r$9 = $clone(pv, reflect.Value).Type().Implements(marshalerAttrType); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = _r$9; case 11: - /* */ if (_v$1) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v$1) { */ case 9: - _r$10 = $clone(pv, reflect.Value).Interface(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $assertType(_r$10, MarshalerAttr).MarshalXMLAttr($clone(name, Name)); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$1 = _r$11; - attr$1 = $clone(_tuple$1[0], Attr); - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - if (!(attr$1.Name.Local === "")) { - start.Attr = $append(start.Attr, attr$1); - } - $s = -1; return $ifaceNil; - /* } */ case 10: - /* } */ case 8: - if (!($clone(val, reflect.Value).CanInterface())) { _v$2 = false; $s = 17; continue s; } - _r$12 = $clone(val, reflect.Value).Type().Implements(textMarshalerType); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$2 = _r$12; case 17: - /* */ if (_v$2) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_v$2) { */ case 15: - _r$13 = $clone(val, reflect.Value).Interface(); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $assertType(_r$13, encoding.TextMarshaler).MarshalText(); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$2 = _r$14; - text = _tuple$2[0]; - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - start.Attr = $append(start.Attr, new Attr.ptr($clone(name, Name), ($bytesToString(text)))); - $s = -1; return $ifaceNil; - /* } */ case 16: - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 21: - pv$1 = $clone(val, reflect.Value).Addr(); - if (!($clone(pv$1, reflect.Value).CanInterface())) { _v$3 = false; $s = 25; continue s; } - _r$15 = $clone(pv$1, reflect.Value).Type().Implements(textMarshalerType); /* */ $s = 26; case 26: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _v$3 = _r$15; case 25: - /* */ if (_v$3) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (_v$3) { */ case 23: - _r$16 = $clone(pv$1, reflect.Value).Interface(); /* */ $s = 27; case 27: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = $assertType(_r$16, encoding.TextMarshaler).MarshalText(); /* */ $s = 28; case 28: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$3 = _r$17; - text$1 = _tuple$3[0]; - err$3 = _tuple$3[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - start.Attr = $append(start.Attr, new Attr.ptr($clone(name, Name), ($bytesToString(text$1)))); - $s = -1; return $ifaceNil; - /* } */ case 24: - /* } */ case 22: - _1 = $clone(val, reflect.Value).Kind(); - /* */ if ((_1 === (22)) || (_1 === (20))) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if ((_1 === (22)) || (_1 === (20))) { */ case 30: - if ($clone(val, reflect.Value).IsNil()) { - $s = -1; return $ifaceNil; - } - _r$18 = $clone(val, reflect.Value).Elem(); /* */ $s = 32; case 32: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - val = _r$18; - /* } */ case 31: - case 29: - if (!($clone(val, reflect.Value).Kind() === 23)) { _v$4 = false; $s = 35; continue s; } - _r$19 = $clone(val, reflect.Value).Type().Elem(); /* */ $s = 36; case 36: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = _r$19.Kind(); /* */ $s = 37; case 37: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _v$4 = !((_r$20 === 8)); case 35: - /* */ if (_v$4) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (_v$4) { */ case 33: - n = $clone(val, reflect.Value).Len(); - i = 0; - /* while (true) { */ case 38: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 39; continue; } - _arg = start; - _arg$1 = $clone(name, Name); - _r$21 = $clone(val, reflect.Value).Index(i); /* */ $s = 40; case 40: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$2 = $clone(_r$21, reflect.Value); - _r$22 = p.marshalAttr(_arg, _arg$1, _arg$2); /* */ $s = 41; case 41: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - err$4 = _r$22; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - i = i + (1) >> 0; - $s = 38; continue; - case 39: - $s = -1; return $ifaceNil; - /* } */ case 34: - /* */ if ($interfaceIsEqual($clone(val, reflect.Value).Type(), attrType)) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if ($interfaceIsEqual($clone(val, reflect.Value).Type(), attrType)) { */ case 42: - _r$23 = $clone(val, reflect.Value).Interface(); /* */ $s = 44; case 44: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - start.Attr = $append(start.Attr, $assertType(_r$23, Attr)); - $s = -1; return $ifaceNil; - /* } */ case 43: - _r$24 = p.marshalSimple($clone(val, reflect.Value).Type(), $clone(val, reflect.Value)); /* */ $s = 45; case 45: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _tuple$4 = _r$24; - s = _tuple$4[0]; - b = _tuple$4[1]; - err$5 = _tuple$4[2]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - if (!(b === sliceType$3.nil)) { - s = ($bytesToString(b)); - } - start.Attr = $append(start.Attr, new Attr.ptr($clone(name, Name), s)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.marshalAttr, $c: true, $r, _1, _arg, _arg$1, _arg$2, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _v, _v$1, _v$2, _v$3, _v$4, attr, attr$1, b, err, err$1, err$2, err$3, err$4, err$5, i, n, name, p, pv, pv$1, s, start, text, text$1, val, $s};return $f; - }; - printer.prototype.marshalAttr = function(start, name, val) { return this.$val.marshalAttr(start, name, val); }; - defaultStart = function(typ, finfo, startTemplate) { - var {_r$6, _r$7, _r$8, _r$9, finfo, start, startTemplate, typ, $s, $r, $c} = $restore(this, {typ, finfo, startTemplate}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = new StartElement.ptr(new Name.ptr("", ""), sliceType$4.nil); - /* */ if (!(startTemplate === ptrType$12.nil)) { $s = 1; continue; } - /* */ if (!(finfo === ptrType$10.nil) && !(finfo.name === "")) { $s = 2; continue; } - _r$6 = typ.Name(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!(_r$6 === "")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(startTemplate === ptrType$12.nil)) { */ case 1: - Name.copy(start.Name, startTemplate.Name); - start.Attr = $appendSlice(start.Attr, startTemplate.Attr); - $s = 5; continue; - /* } else if (!(finfo === ptrType$10.nil) && !(finfo.name === "")) { */ case 2: - start.Name.Local = finfo.name; - start.Name.Space = finfo.xmlns; - $s = 5; continue; - /* } else if (!(_r$6 === "")) { */ case 3: - _r$7 = typ.Name(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - start.Name.Local = _r$7; - $s = 5; continue; - /* } else { */ case 4: - _r$8 = typ.Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = _r$8.Name(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - start.Name.Local = _r$9; - /* } */ case 5: - $s = -1; return start; - /* */ } return; } var $f = {$blk: defaultStart, $c: true, $r, _r$6, _r$7, _r$8, _r$9, finfo, start, startTemplate, typ, $s};return $f; - }; - printer.ptr.prototype.marshalInterface = function(val, start) { - var {$24r, _arg, _arg$1, _r$6, _r$7, _r$8, err, n, p, start, val, x$2, x$3, $s, $r, $c} = $restore(this, {val, start}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - p.tags = $append(p.tags, new Name.ptr("", "")); - n = p.tags.$length; - _r$6 = val.MarshalXML(p.encoder, $clone(start, StartElement)); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (p.tags.$length > n) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (p.tags.$length > n) { */ case 2: - _r$7 = receiverType(val); /* */ $s = 4; case 4: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg = new $String(_r$7); - _arg$1 = new $String((x$2 = p.tags, x$3 = p.tags.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])).Local); - _r$8 = fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", new sliceType$5([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 6; case 6: return $24r; - /* } */ case 3: - p.tags = $subslice(p.tags, 0, (n - 1 >> 0)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.marshalInterface, $c: true, $r, $24r, _arg, _arg$1, _r$6, _r$7, _r$8, err, n, p, start, val, x$2, x$3, $s};return $f; - }; - printer.prototype.marshalInterface = function(val, start) { return this.$val.marshalInterface(val, start); }; - printer.ptr.prototype.marshalTextInterface = function(val, start) { - var {$24r, _r$6, _r$7, _r$8, _r$9, _tuple, err, err$1, p, start, text, val, $s, $r, $c} = $restore(this, {val, start}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - start = [start]; - p = this; - _r$6 = p.writeStart(start[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$7 = val.MarshalText(); /* */ $s = 2; case 2: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - text = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$8 = EscapeText(p, text); /* */ $s = 3; case 3: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = p.writeEnd($clone(start[0].Name, Name)); /* */ $s = 4; case 4: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.marshalTextInterface, $c: true, $r, $24r, _r$6, _r$7, _r$8, _r$9, _tuple, err, err$1, p, start, text, val, $s};return $f; - }; - printer.prototype.marshalTextInterface = function(val, start) { return this.$val.marshalTextInterface(val, start); }; - printer.ptr.prototype.writeStart = function(start) { - var {$24r, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$6, _r$7, _r$8, _r$9, _ref, attr, name, p, start, $s, $r, $c} = $restore(this, {start}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (start.Name.Local === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (start.Name.Local === "") { */ case 1: - _r$6 = fmt.Errorf("xml: start tag with no name", new sliceType$5([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 4; case 4: return $24r; - /* } */ case 2: - p.tags = $append(p.tags, start.Name); - p.markPrefix(); - $r = p.writeIndent(1); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$7 = p.Writer.WriteByte(60); /* */ $s = 6; case 6: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = p.Writer.WriteString(start.Name.Local); /* */ $s = 7; case 7: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* */ if (!(start.Name.Space === "")) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(start.Name.Space === "")) { */ case 8: - _r$9 = p.Writer.WriteString(" xmlns=\""); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $r = p.EscapeString(start.Name.Space); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$10 = p.Writer.WriteByte(34); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - /* } */ case 9: - _ref = start.Attr; - _i = 0; - /* while (true) { */ case 13: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 14; continue; } - attr = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), Attr); - name = $clone(attr.Name, Name); - if (name.Local === "") { - _i++; - /* continue; */ $s = 13; continue; - } - _r$11 = p.Writer.WriteByte(32); /* */ $s = 15; case 15: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - /* */ if (!(name.Space === "")) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!(name.Space === "")) { */ case 16: - _r$12 = p.createAttrPrefix(name.Space); /* */ $s = 18; case 18: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = p.Writer.WriteString(_r$12); /* */ $s = 19; case 19: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - _r$14 = p.Writer.WriteByte(58); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - /* } */ case 17: - _r$15 = p.Writer.WriteString(name.Local); /* */ $s = 21; case 21: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - _r$16 = p.Writer.WriteString("=\""); /* */ $s = 22; case 22: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - $r = p.EscapeString(attr.Value); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$17 = p.Writer.WriteByte(34); /* */ $s = 24; case 24: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - _i++; - $s = 13; continue; - case 14: - _r$18 = p.Writer.WriteByte(62); /* */ $s = 25; case 25: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.writeStart, $c: true, $r, $24r, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$6, _r$7, _r$8, _r$9, _ref, attr, name, p, start, $s};return $f; - }; - printer.prototype.writeStart = function(start) { return this.$val.writeStart(start); }; - printer.ptr.prototype.writeEnd = function(name) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$10, _r$11, _r$12, _r$13, _r$6, _r$7, _r$8, _r$9, name, p, top, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (name.Local === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (name.Local === "") { */ case 1: - _r$6 = fmt.Errorf("xml: end tag with no name", new sliceType$5([])); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if ((p.tags.$length === 0) || (x$2 = p.tags, x$3 = p.tags.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])).Local === "") { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((p.tags.$length === 0) || (x$2 = p.tags, x$3 = p.tags.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])).Local === "") { */ case 5: - _r$7 = fmt.Errorf("xml: end tag without start tag", new sliceType$5([new $String(name.Local)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = _r$7; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - top = $clone((x$4 = p.tags, x$5 = p.tags.$length - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])), Name); - /* */ if (!($equal(top, name, Name))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($equal(top, name, Name))) { */ case 9: - /* */ if (!(top.Local === name.Local)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(top.Local === name.Local)) { */ case 11: - _r$8 = fmt.Errorf("xml: end tag does not match start tag <%s>", new sliceType$5([new $String(name.Local), new $String(top.Local)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$2 = _r$8; - $s = 14; case 14: return $24r$2; - /* } */ case 12: - _r$9 = fmt.Errorf("xml: end tag in namespace %s does not match start tag <%s> in namespace %s", new sliceType$5([new $String(name.Local), new $String(name.Space), new $String(top.Local), new $String(top.Space)])); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$3 = _r$9; - $s = 16; case 16: return $24r$3; - /* } */ case 10: - p.tags = $subslice(p.tags, 0, (p.tags.$length - 1 >> 0)); - $r = p.writeIndent(-1); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$10 = p.Writer.WriteByte(60); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - _r$11 = p.Writer.WriteByte(47); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = p.Writer.WriteString(name.Local); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = p.Writer.WriteByte(62); /* */ $s = 21; case 21: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - p.popPrefix(); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.writeEnd, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$10, _r$11, _r$12, _r$13, _r$6, _r$7, _r$8, _r$9, name, p, top, x$2, x$3, x$4, x$5, $s};return $f; - }; - printer.prototype.writeEnd = function(name) { return this.$val.writeEnd(name); }; - printer.ptr.prototype.marshalSimple = function(typ, val) { - var {$24r, $24r$1, $24r$2, _1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$6, _r$7, _r$8, _r$9, bytes$1, p, typ, val, $s, $r, $c} = $restore(this, {typ, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _1 = $clone(val, reflect.Value).Kind(); - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 2; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { $s = 3; continue; } - /* */ if ((_1 === (13)) || (_1 === (14))) { $s = 4; continue; } - /* */ if (_1 === (24)) { $s = 5; continue; } - /* */ if (_1 === (1)) { $s = 6; continue; } - /* */ if (_1 === (17)) { $s = 7; continue; } - /* */ if (_1 === (23)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 2: - $s = -1; return [strconv.FormatInt($clone(val, reflect.Value).Int(), 10), sliceType$3.nil, $ifaceNil]; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { */ case 3: - $s = -1; return [strconv.FormatUint($clone(val, reflect.Value).Uint(), 10), sliceType$3.nil, $ifaceNil]; - /* } else if ((_1 === (13)) || (_1 === (14))) { */ case 4: - _arg = $clone(val, reflect.Value).Float(); - _r$6 = $clone(val, reflect.Value).Type().Bits(); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = strconv.FormatFloat(_arg, 103, -1, _arg$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r = [_r$7, sliceType$3.nil, $ifaceNil]; - $s = 12; case 12: return $24r; - /* } else if (_1 === (24)) { */ case 5: - _r$8 = $clone(val, reflect.Value).String(); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = [_r$8, sliceType$3.nil, $ifaceNil]; - $s = 14; case 14: return $24r$1; - /* } else if (_1 === (1)) { */ case 6: - $s = -1; return [strconv.FormatBool($clone(val, reflect.Value).Bool()), sliceType$3.nil, $ifaceNil]; - /* } else if (_1 === (17)) { */ case 7: - _r$9 = typ.Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Kind(); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (!((_r$10 === 8))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!((_r$10 === 8))) { */ case 15: - /* break; */ $s = 1; continue; - /* } */ case 16: - bytes$1 = sliceType$3.nil; - /* */ if ($clone(val, reflect.Value).CanAddr()) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if ($clone(val, reflect.Value).CanAddr()) { */ case 19: - _r$11 = $clone(val, reflect.Value).Slice(0, $clone(val, reflect.Value).Len()); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).Bytes(); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - bytes$1 = _r$12; - $s = 21; continue; - /* } else { */ case 20: - bytes$1 = $makeSlice(sliceType$3, $clone(val, reflect.Value).Len()); - _r$13 = reflect.ValueOf(bytes$1); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = reflect.Copy($clone(_r$13, reflect.Value), $clone(val, reflect.Value)); /* */ $s = 25; case 25: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - /* } */ case 21: - $s = -1; return ["", bytes$1, $ifaceNil]; - /* } else if (_1 === (23)) { */ case 8: - _r$15 = typ.Elem(); /* */ $s = 28; case 28: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.Kind(); /* */ $s = 29; case 29: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!((_r$16 === 8))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!((_r$16 === 8))) { */ case 26: - /* break; */ $s = 1; continue; - /* } */ case 27: - _r$17 = $clone(val, reflect.Value).Bytes(); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$2 = ["", _r$17, $ifaceNil]; - $s = 31; case 31: return $24r$2; - /* } */ case 9: - case 1: - $s = -1; return ["", sliceType$3.nil, new UnsupportedTypeError.ptr(typ)]; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.marshalSimple, $c: true, $r, $24r, $24r$1, $24r$2, _1, _arg, _arg$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$6, _r$7, _r$8, _r$9, bytes$1, p, typ, val, $s};return $f; - }; - printer.prototype.marshalSimple = function(typ, val) { return this.$val.marshalSimple(typ, val); }; - indirect = function(vf) { - var {_r$6, vf, $s, $r, $c} = $restore(this, {vf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - /* if (!(($clone(vf, reflect.Value).Kind() === 20) || ($clone(vf, reflect.Value).Kind() === 22))) { break; } */ if(!(($clone(vf, reflect.Value).Kind() === 20) || ($clone(vf, reflect.Value).Kind() === 22))) { $s = 2; continue; } - if ($clone(vf, reflect.Value).IsNil()) { - $s = -1; return vf; - } - _r$6 = $clone(vf, reflect.Value).Elem(); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - vf = _r$6; - $s = 1; continue; - case 2: - $s = -1; return vf; - /* */ } return; } var $f = {$blk: indirect, $c: true, $r, _r$6, vf, $s};return $f; - }; - printer.ptr.prototype.marshalStruct = function(tinfo, val) { - var {$24r, $24r$1, $24r$2, _1, _2, _3, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _v, _v$1, _v$2, _v$3, b, dashDash, dashLast, data, data$1, elem, emit, err, err$1, err$10, err$11, err$12, err$13, err$14, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, finfo, i, iface, k, ok, p, pv, raw, raw$1, s, s$1, scratch, tinfo, val, vf, x$2, x$3, $s, $r, $c} = $restore(this, {tinfo, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - s = new parentStack.ptr(p, sliceType$2.nil); - _ref = tinfo.fields; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - finfo = (x$2 = tinfo.fields, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])); - if (!(((finfo.flags & 2) === 0))) { - _i++; - /* continue; */ $s = 1; continue; - } - _r$6 = finfo.value($clone(val, reflect.Value), false); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - vf = _r$6; - if (!$clone(vf, reflect.Value).IsValid()) { - _i++; - /* continue; */ $s = 1; continue; - } - _1 = finfo.flags & 127; - /* */ if ((_1 === (4)) || (_1 === (8))) { $s = 5; continue; } - /* */ if (_1 === (32)) { $s = 6; continue; } - /* */ if (_1 === (16)) { $s = 7; continue; } - /* */ if ((_1 === (1)) || (_1 === (65))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((_1 === (4)) || (_1 === (8))) { */ case 5: - emit = EscapeText; - if ((finfo.flags & 127) === 4) { - emit = emitCDATA; - } - _r$7 = s.trim(finfo.parents); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (!($clone(vf, reflect.Value).CanInterface())) { _v = false; $s = 13; continue s; } - _r$8 = $clone(vf, reflect.Value).Type().Implements(textMarshalerType); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8; case 13: - /* */ if (_v) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_v) { */ case 11: - _r$9 = $clone(vf, reflect.Value).Interface(); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $assertType(_r$9, encoding.TextMarshaler).MarshalText(); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = _r$10; - data = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$11 = emit(p, data); /* */ $s = 17; case 17: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$2 = _r$11; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _i++; - /* continue; */ $s = 1; continue; - /* } */ case 12: - /* */ if ($clone(vf, reflect.Value).CanAddr()) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ($clone(vf, reflect.Value).CanAddr()) { */ case 18: - pv = $clone(vf, reflect.Value).Addr(); - if (!($clone(pv, reflect.Value).CanInterface())) { _v$1 = false; $s = 22; continue s; } - _r$12 = $clone(pv, reflect.Value).Type().Implements(textMarshalerType); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$1 = _r$12; case 22: - /* */ if (_v$1) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_v$1) { */ case 20: - _r$13 = $clone(pv, reflect.Value).Interface(); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $assertType(_r$13, encoding.TextMarshaler).MarshalText(); /* */ $s = 25; case 25: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$1 = _r$14; - data$1 = _tuple$1[0]; - err$3 = _tuple$1[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _r$15 = emit(p, data$1); /* */ $s = 26; case 26: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err$4 = _r$15; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - _i++; - /* continue; */ $s = 1; continue; - /* } */ case 21: - /* } */ case 19: - scratch = arrayType.zero(); - _r$16 = indirect($clone(vf, reflect.Value)); /* */ $s = 27; case 27: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - vf = _r$16; - _2 = $clone(vf, reflect.Value).Kind(); - /* */ if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { $s = 29; continue; } - /* */ if ((_2 === (7)) || (_2 === (8)) || (_2 === (9)) || (_2 === (10)) || (_2 === (11)) || (_2 === (12))) { $s = 30; continue; } - /* */ if ((_2 === (13)) || (_2 === (14))) { $s = 31; continue; } - /* */ if (_2 === (1)) { $s = 32; continue; } - /* */ if (_2 === (24)) { $s = 33; continue; } - /* */ if (_2 === (23)) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { */ case 29: - _r$17 = emit(p, strconv.AppendInt($subslice(new sliceType$3(scratch), 0, 0), $clone(vf, reflect.Value).Int(), 10)); /* */ $s = 36; case 36: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - err$5 = _r$17; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - $s = 35; continue; - /* } else if ((_2 === (7)) || (_2 === (8)) || (_2 === (9)) || (_2 === (10)) || (_2 === (11)) || (_2 === (12))) { */ case 30: - _r$18 = emit(p, strconv.AppendUint($subslice(new sliceType$3(scratch), 0, 0), $clone(vf, reflect.Value).Uint(), 10)); /* */ $s = 37; case 37: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - err$6 = _r$18; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - $s = 35; continue; - /* } else if ((_2 === (13)) || (_2 === (14))) { */ case 31: - _arg = p; - _arg$1 = $subslice(new sliceType$3(scratch), 0, 0); - _arg$2 = $clone(vf, reflect.Value).Float(); - _r$19 = $clone(vf, reflect.Value).Type().Bits(); /* */ $s = 38; case 38: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _arg$3 = _r$19; - _r$20 = strconv.AppendFloat(_arg$1, _arg$2, 103, -1, _arg$3); /* */ $s = 39; case 39: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$4 = _r$20; - _r$21 = emit(_arg, _arg$4); /* */ $s = 40; case 40: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - err$7 = _r$21; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - $s = 35; continue; - /* } else if (_2 === (1)) { */ case 32: - _r$22 = emit(p, strconv.AppendBool($subslice(new sliceType$3(scratch), 0, 0), $clone(vf, reflect.Value).Bool())); /* */ $s = 41; case 41: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - err$8 = _r$22; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - $s = 35; continue; - /* } else if (_2 === (24)) { */ case 33: - _arg$5 = p; - _r$23 = $clone(vf, reflect.Value).String(); /* */ $s = 42; case 42: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _arg$6 = (new sliceType$3($stringToBytes(_r$23))); - _r$24 = emit(_arg$5, _arg$6); /* */ $s = 43; case 43: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - err$9 = _r$24; - if (!($interfaceIsEqual(err$9, $ifaceNil))) { - $s = -1; return err$9; - } - $s = 35; continue; - /* } else if (_2 === (23)) { */ case 34: - _r$25 = $clone(vf, reflect.Value).Interface(); /* */ $s = 44; case 44: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _tuple$2 = $assertType(_r$25, sliceType$3, true); - elem = _tuple$2[0]; - ok = _tuple$2[1]; - /* */ if (ok) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (ok) { */ case 45: - _r$26 = emit(p, elem); /* */ $s = 47; case 47: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - err$10 = _r$26; - if (!($interfaceIsEqual(err$10, $ifaceNil))) { - $s = -1; return err$10; - } - /* } */ case 46: - /* } */ case 35: - case 28: - _i++; - /* continue; */ $s = 1; continue; - $s = 9; continue; - /* } else if (_1 === (32)) { */ case 6: - _r$27 = s.trim(finfo.parents); /* */ $s = 48; case 48: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - err$11 = _r$27; - if (!($interfaceIsEqual(err$11, $ifaceNil))) { - $s = -1; return err$11; - } - _r$28 = indirect($clone(vf, reflect.Value)); /* */ $s = 49; case 49: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - vf = _r$28; - k = $clone(vf, reflect.Value).Kind(); - if (k === 24) { _v$2 = true; $s = 52; continue s; } - if (!(k === 23)) { _v$3 = false; $s = 53; continue s; } - _r$29 = $clone(vf, reflect.Value).Type().Elem(); /* */ $s = 54; case 54: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$30 = _r$29.Kind(); /* */ $s = 55; case 55: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _v$3 = _r$30 === 8; case 53: - _v$2 = _v$3; case 52: - /* */ if (!(_v$2)) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (!(_v$2)) { */ case 50: - _r$31 = fmt.Errorf("xml: bad type for comment field of %s", new sliceType$5([$clone(val, reflect.Value).Type()])); /* */ $s = 56; case 56: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - $24r = _r$31; - $s = 57; case 57: return $24r; - /* } */ case 51: - if ($clone(vf, reflect.Value).Len() === 0) { - _i++; - /* continue; */ $s = 1; continue; - } - $r = p.writeIndent(0); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$32 = p.Writer.WriteString(""); /* */ $s = 80; case 80: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$39; - _i++; - /* continue; */ $s = 1; continue; - $s = 9; continue; - /* } else if (_1 === (16)) { */ case 7: - _r$40 = indirect($clone(vf, reflect.Value)); /* */ $s = 81; case 81: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - vf = _r$40; - _r$41 = $clone(vf, reflect.Value).Interface(); /* */ $s = 82; case 82: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - iface = _r$41; - _ref$1 = iface; - /* */ if ($assertType(_ref$1, sliceType$3, true)[1]) { $s = 83; continue; } - /* */ if ($assertType(_ref$1, $String, true)[1]) { $s = 84; continue; } - /* */ $s = 85; continue; - /* if ($assertType(_ref$1, sliceType$3, true)[1]) { */ case 83: - raw = _ref$1.$val; - _r$42 = p.Writer.Write(raw); /* */ $s = 86; case 86: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - _r$42; - _i++; - /* continue; */ $s = 1; continue; - $s = 85; continue; - /* } else if ($assertType(_ref$1, $String, true)[1]) { */ case 84: - raw$1 = _ref$1.$val; - _r$43 = p.Writer.WriteString(raw$1); /* */ $s = 87; case 87: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - _r$43; - _i++; - /* continue; */ $s = 1; continue; - /* } */ case 85: - $s = 9; continue; - /* } else if ((_1 === (1)) || (_1 === (65))) { */ case 8: - _r$44 = s.trim(finfo.parents); /* */ $s = 88; case 88: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - err$12 = _r$44; - if (!($interfaceIsEqual(err$12, $ifaceNil))) { - $s = -1; return err$12; - } - /* */ if (finfo.parents.$length > s.stack.$length) { $s = 89; continue; } - /* */ $s = 90; continue; - /* if (finfo.parents.$length > s.stack.$length) { */ case 89: - /* */ if (!(($clone(vf, reflect.Value).Kind() === 22)) && !(($clone(vf, reflect.Value).Kind() === 20)) || !$clone(vf, reflect.Value).IsNil()) { $s = 91; continue; } - /* */ $s = 92; continue; - /* if (!(($clone(vf, reflect.Value).Kind() === 22)) && !(($clone(vf, reflect.Value).Kind() === 20)) || !$clone(vf, reflect.Value).IsNil()) { */ case 91: - _r$45 = s.push($subslice(finfo.parents, s.stack.$length)); /* */ $s = 93; case 93: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - err$13 = _r$45; - if (!($interfaceIsEqual(err$13, $ifaceNil))) { - $s = -1; return err$13; - } - /* } */ case 92: - /* } */ case 90: - /* } */ case 9: - case 4: - _r$46 = p.marshalValue($clone(vf, reflect.Value), finfo, ptrType$12.nil); /* */ $s = 94; case 94: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } - err$14 = _r$46; - if (!($interfaceIsEqual(err$14, $ifaceNil))) { - $s = -1; return err$14; - } - _i++; - $s = 1; continue; - case 2: - _r$47 = s.trim(sliceType$2.nil); /* */ $s = 95; case 95: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } - _r$47; - _r$48 = p.cachedWriteError(); /* */ $s = 96; case 96: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } - $24r$2 = _r$48; - $s = 97; case 97: return $24r$2; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.marshalStruct, $c: true, $r, $24r, $24r$1, $24r$2, _1, _2, _3, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _i, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _v, _v$1, _v$2, _v$3, b, dashDash, dashLast, data, data$1, elem, emit, err, err$1, err$10, err$11, err$12, err$13, err$14, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, finfo, i, iface, k, ok, p, pv, raw, raw$1, s, s$1, scratch, tinfo, val, vf, x$2, x$3, $s};return $f; - }; - printer.prototype.marshalStruct = function(tinfo, val) { return this.$val.marshalStruct(tinfo, val); }; - printer.ptr.prototype.cachedWriteError = function() { - var {_r$6, _tuple, err, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$6 = p.Writer.Write(sliceType$3.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.cachedWriteError, $c: true, $r, _r$6, _tuple, err, p, $s};return $f; - }; - printer.prototype.cachedWriteError = function() { return this.$val.cachedWriteError(); }; - printer.ptr.prototype.writeIndent = function(depthDelta) { - var {_r$6, _r$7, _r$8, depthDelta, i, p, $s, $r, $c} = $restore(this, {depthDelta}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if ((p.prefix.length === 0) && (p.indent.length === 0)) { - $s = -1; return; - } - if (depthDelta < 0) { - p.depth = p.depth - (1) >> 0; - if (p.indentedIn) { - p.indentedIn = false; - $s = -1; return; - } - p.indentedIn = false; - } - /* */ if (p.putNewline) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.putNewline) { */ case 1: - _r$6 = p.Writer.WriteByte(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 3; continue; - /* } else { */ case 2: - p.putNewline = true; - /* } */ case 3: - /* */ if (p.prefix.length > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (p.prefix.length > 0) { */ case 5: - _r$7 = p.Writer.WriteString(p.prefix); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 6: - /* */ if (p.indent.length > 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (p.indent.length > 0) { */ case 8: - i = 0; - /* while (true) { */ case 10: - /* if (!(i < p.depth)) { break; } */ if(!(i < p.depth)) { $s = 11; continue; } - _r$8 = p.Writer.WriteString(p.indent); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - i = i + (1) >> 0; - $s = 10; continue; - case 11: - /* } */ case 9: - if (depthDelta > 0) { - p.depth = p.depth + (1) >> 0; - p.indentedIn = true; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: printer.ptr.prototype.writeIndent, $c: true, $r, _r$6, _r$7, _r$8, depthDelta, i, p, $s};return $f; - }; - printer.prototype.writeIndent = function(depthDelta) { return this.$val.writeIndent(depthDelta); }; - parentStack.ptr.prototype.trim = function(parents) { - var {_r$6, err, i, parents, s, split, x$2, x$3, $s, $r, $c} = $restore(this, {parents}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - split = 0; - while (true) { - if (!(split < parents.$length && split < s.stack.$length)) { break; } - if (!(((split < 0 || split >= parents.$length) ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + split]) === (x$2 = s.stack, ((split < 0 || split >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + split])))) { - break; - } - split = split + (1) >> 0; - } - i = s.stack.$length - 1 >> 0; - /* while (true) { */ case 1: - /* if (!(i >= split)) { break; } */ if(!(i >= split)) { $s = 2; continue; } - _r$6 = s.p.writeEnd(new Name.ptr("", (x$3 = s.stack, ((i < 0 || i >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i])))); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = i - (1) >> 0; - $s = 1; continue; - case 2: - s.stack = $subslice(s.stack, 0, split); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: parentStack.ptr.prototype.trim, $c: true, $r, _r$6, err, i, parents, s, split, x$2, x$3, $s};return $f; - }; - parentStack.prototype.trim = function(parents) { return this.$val.trim(parents); }; - parentStack.ptr.prototype.push = function(parents) { - var {_r$6, err, i, parents, s, $s, $r, $c} = $restore(this, {parents}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < parents.$length)) { break; } */ if(!(i < parents.$length)) { $s = 2; continue; } - _r$6 = s.p.writeStart(new StartElement.ptr(new Name.ptr("", ((i < 0 || i >= parents.$length) ? ($throwRuntimeError("index out of range"), undefined) : parents.$array[parents.$offset + i])), sliceType$4.nil)); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - s.stack = $appendSlice(s.stack, parents); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: parentStack.ptr.prototype.push, $c: true, $r, _r$6, err, i, parents, s, $s};return $f; - }; - parentStack.prototype.push = function(parents) { return this.$val.push(parents); }; - UnsupportedTypeError.ptr.prototype.Error = function() { - var {$24r, _r$6, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$6 = e.Type.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = "xml: unsupported type: " + _r$6; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: UnsupportedTypeError.ptr.prototype.Error, $c: true, $r, $24r, _r$6, e, $s};return $f; - }; - UnsupportedTypeError.prototype.Error = function() { return this.$val.Error(); }; - isEmptyValue = function(v) { - var _1, v, x$2, x$3; - _1 = $clone(v, reflect.Value).Kind(); - if ((_1 === (17)) || (_1 === (21)) || (_1 === (23)) || (_1 === (24))) { - return $clone(v, reflect.Value).Len() === 0; - } else if (_1 === (1)) { - return !$clone(v, reflect.Value).Bool(); - } else if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - return (x$2 = $clone(v, reflect.Value).Int(), (x$2.$high === 0 && x$2.$low === 0)); - } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12))) { - return (x$3 = $clone(v, reflect.Value).Uint(), (x$3.$high === 0 && x$3.$low === 0)); - } else if ((_1 === (13)) || (_1 === (14))) { - return $clone(v, reflect.Value).Float() === 0; - } else if ((_1 === (20)) || (_1 === (22))) { - return $clone(v, reflect.Value).IsNil(); - } - return false; - }; - ptrType$16.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - StartElement.methods = [{prop: "Copy", name: "Copy", pkg: "", typ: $funcType([], [StartElement], false)}, {prop: "End", name: "End", pkg: "", typ: $funcType([], [EndElement], false)}]; - CharData.methods = [{prop: "Copy", name: "Copy", pkg: "", typ: $funcType([], [CharData], false)}]; - Comment.methods = [{prop: "Copy", name: "Copy", pkg: "", typ: $funcType([], [Comment], false)}]; - ProcInst.methods = [{prop: "Copy", name: "Copy", pkg: "", typ: $funcType([], [ProcInst], false)}]; - Directive.methods = [{prop: "Copy", name: "Copy", pkg: "", typ: $funcType([], [Directive], false)}]; - ptrType$8.methods = [{prop: "Token", name: "Token", pkg: "", typ: $funcType([], [Token, $error], false)}, {prop: "translate", name: "translate", pkg: "encoding/xml", typ: $funcType([ptrType$17, $Bool], [], false)}, {prop: "switchToReader", name: "switchToReader", pkg: "encoding/xml", typ: $funcType([io.Reader], [], false)}, {prop: "push", name: "push", pkg: "encoding/xml", typ: $funcType([$Int], [ptrType$7], false)}, {prop: "pop", name: "pop", pkg: "encoding/xml", typ: $funcType([], [ptrType$7], false)}, {prop: "pushEOF", name: "pushEOF", pkg: "encoding/xml", typ: $funcType([], [], false)}, {prop: "popEOF", name: "popEOF", pkg: "encoding/xml", typ: $funcType([], [$Bool], false)}, {prop: "pushElement", name: "pushElement", pkg: "encoding/xml", typ: $funcType([Name], [], false)}, {prop: "pushNs", name: "pushNs", pkg: "encoding/xml", typ: $funcType([$String, $String, $Bool], [], false)}, {prop: "syntaxError", name: "syntaxError", pkg: "encoding/xml", typ: $funcType([$String], [$error], false)}, {prop: "popElement", name: "popElement", pkg: "encoding/xml", typ: $funcType([ptrType$18], [$Bool], false)}, {prop: "autoClose", name: "autoClose", pkg: "encoding/xml", typ: $funcType([Token], [Token, $Bool], false)}, {prop: "RawToken", name: "RawToken", pkg: "", typ: $funcType([], [Token, $error], false)}, {prop: "rawToken", name: "rawToken", pkg: "encoding/xml", typ: $funcType([], [Token, $error], false)}, {prop: "attrval", name: "attrval", pkg: "encoding/xml", typ: $funcType([], [sliceType$3], false)}, {prop: "space", name: "space", pkg: "encoding/xml", typ: $funcType([], [], false)}, {prop: "getc", name: "getc", pkg: "encoding/xml", typ: $funcType([], [$Uint8, $Bool], false)}, {prop: "InputOffset", name: "InputOffset", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "savedOffset", name: "savedOffset", pkg: "encoding/xml", typ: $funcType([], [$Int], false)}, {prop: "mustgetc", name: "mustgetc", pkg: "encoding/xml", typ: $funcType([], [$Uint8, $Bool], false)}, {prop: "ungetc", name: "ungetc", pkg: "encoding/xml", typ: $funcType([$Uint8], [], false)}, {prop: "text", name: "text", pkg: "encoding/xml", typ: $funcType([$Int, $Bool], [sliceType$3], false)}, {prop: "nsname", name: "nsname", pkg: "encoding/xml", typ: $funcType([], [Name, $Bool], false)}, {prop: "name", name: "name", pkg: "encoding/xml", typ: $funcType([], [$String, $Bool], false)}, {prop: "readName", name: "readName", pkg: "encoding/xml", typ: $funcType([], [$Bool], false)}, {prop: "Decode", name: "Decode", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "DecodeElement", name: "DecodeElement", pkg: "", typ: $funcType([$emptyInterface, ptrType$12], [$error], false)}, {prop: "unmarshalInterface", name: "unmarshalInterface", pkg: "encoding/xml", typ: $funcType([Unmarshaler, ptrType$12], [$error], false)}, {prop: "unmarshalTextInterface", name: "unmarshalTextInterface", pkg: "encoding/xml", typ: $funcType([encoding.TextUnmarshaler], [$error], false)}, {prop: "unmarshalAttr", name: "unmarshalAttr", pkg: "encoding/xml", typ: $funcType([reflect.Value, Attr], [$error], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "encoding/xml", typ: $funcType([reflect.Value, ptrType$12, $Int], [$error], false)}, {prop: "unmarshalPath", name: "unmarshalPath", pkg: "encoding/xml", typ: $funcType([ptrType$9, reflect.Value, sliceType$2, ptrType$12, $Int], [$Bool, $error], false)}, {prop: "Skip", name: "Skip", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$10.methods = [{prop: "value", name: "value", pkg: "encoding/xml", typ: $funcType([reflect.Value, $Bool], [reflect.Value], false)}]; - ptrType$19.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - UnmarshalError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$14.methods = [{prop: "Indent", name: "Indent", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "EncodeElement", name: "EncodeElement", pkg: "", typ: $funcType([$emptyInterface, StartElement], [$error], false)}, {prop: "EncodeToken", name: "EncodeToken", pkg: "", typ: $funcType([Token], [$error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$15.methods = [{prop: "EscapeString", name: "EscapeString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "createAttrPrefix", name: "createAttrPrefix", pkg: "encoding/xml", typ: $funcType([$String], [$String], false)}, {prop: "deleteAttrPrefix", name: "deleteAttrPrefix", pkg: "encoding/xml", typ: $funcType([$String], [], false)}, {prop: "markPrefix", name: "markPrefix", pkg: "encoding/xml", typ: $funcType([], [], false)}, {prop: "popPrefix", name: "popPrefix", pkg: "encoding/xml", typ: $funcType([], [], false)}, {prop: "marshalValue", name: "marshalValue", pkg: "encoding/xml", typ: $funcType([reflect.Value, ptrType$10, ptrType$12], [$error], false)}, {prop: "marshalAttr", name: "marshalAttr", pkg: "encoding/xml", typ: $funcType([ptrType$12, Name, reflect.Value], [$error], false)}, {prop: "marshalInterface", name: "marshalInterface", pkg: "encoding/xml", typ: $funcType([Marshaler, StartElement], [$error], false)}, {prop: "marshalTextInterface", name: "marshalTextInterface", pkg: "encoding/xml", typ: $funcType([encoding.TextMarshaler, StartElement], [$error], false)}, {prop: "writeStart", name: "writeStart", pkg: "encoding/xml", typ: $funcType([ptrType$12], [$error], false)}, {prop: "writeEnd", name: "writeEnd", pkg: "encoding/xml", typ: $funcType([Name], [$error], false)}, {prop: "marshalSimple", name: "marshalSimple", pkg: "encoding/xml", typ: $funcType([reflect.Type, reflect.Value], [$String, sliceType$3, $error], false)}, {prop: "marshalStruct", name: "marshalStruct", pkg: "encoding/xml", typ: $funcType([ptrType$9, reflect.Value], [$error], false)}, {prop: "cachedWriteError", name: "cachedWriteError", pkg: "encoding/xml", typ: $funcType([], [$error], false)}, {prop: "writeIndent", name: "writeIndent", pkg: "encoding/xml", typ: $funcType([$Int], [], false)}]; - ptrType$20.methods = [{prop: "trim", name: "trim", pkg: "encoding/xml", typ: $funcType([sliceType$2], [$error], false)}, {prop: "push", name: "push", pkg: "encoding/xml", typ: $funcType([sliceType$2], [$error], false)}]; - ptrType$21.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - SyntaxError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Line", name: "Line", embedded: false, exported: true, typ: $Int, tag: ""}]); - Name.init("", [{prop: "Space", name: "Space", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Local", name: "Local", embedded: false, exported: true, typ: $String, tag: ""}]); - Attr.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: Name, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}]); - Token.init([]); - StartElement.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: Name, tag: ""}, {prop: "Attr", name: "Attr", embedded: false, exported: true, typ: sliceType$4, tag: ""}]); - EndElement.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: Name, tag: ""}]); - CharData.init($Uint8); - Comment.init($Uint8); - ProcInst.init("", [{prop: "Target", name: "Target", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Inst", name: "Inst", embedded: false, exported: true, typ: sliceType$3, tag: ""}]); - Directive.init($Uint8); - TokenReader.init([{prop: "Token", name: "Token", pkg: "", typ: $funcType([], [Token, $error], false)}]); - Decoder.init("encoding/xml", [{prop: "Strict", name: "Strict", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "AutoClose", name: "AutoClose", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Entity", name: "Entity", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "CharsetReader", name: "CharsetReader", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "DefaultSpace", name: "DefaultSpace", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.ByteReader, tag: ""}, {prop: "t", name: "t", embedded: false, exported: false, typ: TokenReader, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "saved", name: "saved", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "stk", name: "stk", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "free", name: "free", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "needClose", name: "needClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "toClose", name: "toClose", embedded: false, exported: false, typ: Name, tag: ""}, {prop: "nextToken", name: "nextToken", embedded: false, exported: false, typ: Token, tag: ""}, {prop: "nextByte", name: "nextByte", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ns", name: "ns", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "line", name: "line", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "unmarshalDepth", name: "unmarshalDepth", embedded: false, exported: false, typ: $Int, tag: ""}]); - stack.init("encoding/xml", [{prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "kind", name: "kind", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: Name, tag: ""}, {prop: "ok", name: "ok", embedded: false, exported: false, typ: $Bool, tag: ""}]); - typeInfo.init("encoding/xml", [{prop: "xmlname", name: "xmlname", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "fields", name: "fields", embedded: false, exported: false, typ: sliceType$6, tag: ""}]); - fieldInfo.init("encoding/xml", [{prop: "idx", name: "idx", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "xmlns", name: "xmlns", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: fieldFlags, tag: ""}, {prop: "parents", name: "parents", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - TagPathError.init("", [{prop: "Struct", name: "Struct", embedded: false, exported: true, typ: reflect.Type, tag: ""}, {prop: "Field1", name: "Field1", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Tag1", name: "Tag1", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Field2", name: "Field2", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Tag2", name: "Tag2", embedded: false, exported: true, typ: $String, tag: ""}]); - Unmarshaler.init([{prop: "UnmarshalXML", name: "UnmarshalXML", pkg: "", typ: $funcType([ptrType$8, StartElement], [$error], false)}]); - UnmarshalerAttr.init([{prop: "UnmarshalXMLAttr", name: "UnmarshalXMLAttr", pkg: "", typ: $funcType([Attr], [$error], false)}]); - Marshaler.init([{prop: "MarshalXML", name: "MarshalXML", pkg: "", typ: $funcType([ptrType$14, StartElement], [$error], false)}]); - MarshalerAttr.init([{prop: "MarshalXMLAttr", name: "MarshalXMLAttr", pkg: "", typ: $funcType([Name], [Attr, $error], false)}]); - Encoder.init("encoding/xml", [{prop: "p", name: "p", embedded: false, exported: false, typ: printer, tag: ""}]); - printer.init("encoding/xml", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: ptrType$13, tag: ""}, {prop: "encoder", name: "encoder", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "seq", name: "seq", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "indent", name: "indent", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "prefix", name: "prefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "depth", name: "depth", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "indentedIn", name: "indentedIn", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "putNewline", name: "putNewline", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "attrNS", name: "attrNS", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "attrPrefix", name: "attrPrefix", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "prefixes", name: "prefixes", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "tags", name: "tags", embedded: false, exported: false, typ: sliceType$9, tag: ""}]); - parentStack.init("encoding/xml", [{prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$15, tag: ""}, {prop: "stack", name: "stack", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - UnsupportedTypeError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = encoding.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - tinfoMap = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); - errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method"); - entity = $makeMap($String.keyFor, [{ k: "lt", v: 60 }, { k: "gt", v: 62 }, { k: "amp", v: 38 }, { k: "apos", v: 39 }, { k: "quot", v: 34 }]); - first = new unicode.RangeTable.ptr(new sliceType([new unicode.Range16.ptr(58, 58, 1), new unicode.Range16.ptr(65, 90, 1), new unicode.Range16.ptr(95, 95, 1), new unicode.Range16.ptr(97, 122, 1), new unicode.Range16.ptr(192, 214, 1), new unicode.Range16.ptr(216, 246, 1), new unicode.Range16.ptr(248, 255, 1), new unicode.Range16.ptr(256, 305, 1), new unicode.Range16.ptr(308, 318, 1), new unicode.Range16.ptr(321, 328, 1), new unicode.Range16.ptr(330, 382, 1), new unicode.Range16.ptr(384, 451, 1), new unicode.Range16.ptr(461, 496, 1), new unicode.Range16.ptr(500, 501, 1), new unicode.Range16.ptr(506, 535, 1), new unicode.Range16.ptr(592, 680, 1), new unicode.Range16.ptr(699, 705, 1), new unicode.Range16.ptr(902, 902, 1), new unicode.Range16.ptr(904, 906, 1), new unicode.Range16.ptr(908, 908, 1), new unicode.Range16.ptr(910, 929, 1), new unicode.Range16.ptr(931, 974, 1), new unicode.Range16.ptr(976, 982, 1), new unicode.Range16.ptr(986, 992, 2), new unicode.Range16.ptr(994, 1011, 1), new unicode.Range16.ptr(1025, 1036, 1), new unicode.Range16.ptr(1038, 1103, 1), new unicode.Range16.ptr(1105, 1116, 1), new unicode.Range16.ptr(1118, 1153, 1), new unicode.Range16.ptr(1168, 1220, 1), new unicode.Range16.ptr(1223, 1224, 1), new unicode.Range16.ptr(1227, 1228, 1), new unicode.Range16.ptr(1232, 1259, 1), new unicode.Range16.ptr(1262, 1269, 1), new unicode.Range16.ptr(1272, 1273, 1), new unicode.Range16.ptr(1329, 1366, 1), new unicode.Range16.ptr(1369, 1369, 1), new unicode.Range16.ptr(1377, 1414, 1), new unicode.Range16.ptr(1488, 1514, 1), new unicode.Range16.ptr(1520, 1522, 1), new unicode.Range16.ptr(1569, 1594, 1), new unicode.Range16.ptr(1601, 1610, 1), new unicode.Range16.ptr(1649, 1719, 1), new unicode.Range16.ptr(1722, 1726, 1), new unicode.Range16.ptr(1728, 1742, 1), new unicode.Range16.ptr(1744, 1747, 1), new unicode.Range16.ptr(1749, 1749, 1), new unicode.Range16.ptr(1765, 1766, 1), new unicode.Range16.ptr(2309, 2361, 1), new unicode.Range16.ptr(2365, 2365, 1), new unicode.Range16.ptr(2392, 2401, 1), new unicode.Range16.ptr(2437, 2444, 1), new unicode.Range16.ptr(2447, 2448, 1), new unicode.Range16.ptr(2451, 2472, 1), new unicode.Range16.ptr(2474, 2480, 1), new unicode.Range16.ptr(2482, 2482, 1), new unicode.Range16.ptr(2486, 2489, 1), new unicode.Range16.ptr(2524, 2525, 1), new unicode.Range16.ptr(2527, 2529, 1), new unicode.Range16.ptr(2544, 2545, 1), new unicode.Range16.ptr(2565, 2570, 1), new unicode.Range16.ptr(2575, 2576, 1), new unicode.Range16.ptr(2579, 2600, 1), new unicode.Range16.ptr(2602, 2608, 1), new unicode.Range16.ptr(2610, 2611, 1), new unicode.Range16.ptr(2613, 2614, 1), new unicode.Range16.ptr(2616, 2617, 1), new unicode.Range16.ptr(2649, 2652, 1), new unicode.Range16.ptr(2654, 2654, 1), new unicode.Range16.ptr(2674, 2676, 1), new unicode.Range16.ptr(2693, 2699, 1), new unicode.Range16.ptr(2701, 2701, 1), new unicode.Range16.ptr(2703, 2705, 1), new unicode.Range16.ptr(2707, 2728, 1), new unicode.Range16.ptr(2730, 2736, 1), new unicode.Range16.ptr(2738, 2739, 1), new unicode.Range16.ptr(2741, 2745, 1), new unicode.Range16.ptr(2749, 2784, 35), new unicode.Range16.ptr(2821, 2828, 1), new unicode.Range16.ptr(2831, 2832, 1), new unicode.Range16.ptr(2835, 2856, 1), new unicode.Range16.ptr(2858, 2864, 1), new unicode.Range16.ptr(2866, 2867, 1), new unicode.Range16.ptr(2870, 2873, 1), new unicode.Range16.ptr(2877, 2877, 1), new unicode.Range16.ptr(2908, 2909, 1), new unicode.Range16.ptr(2911, 2913, 1), new unicode.Range16.ptr(2949, 2954, 1), new unicode.Range16.ptr(2958, 2960, 1), new unicode.Range16.ptr(2962, 2965, 1), new unicode.Range16.ptr(2969, 2970, 1), new unicode.Range16.ptr(2972, 2972, 1), new unicode.Range16.ptr(2974, 2975, 1), new unicode.Range16.ptr(2979, 2980, 1), new unicode.Range16.ptr(2984, 2986, 1), new unicode.Range16.ptr(2990, 2997, 1), new unicode.Range16.ptr(2999, 3001, 1), new unicode.Range16.ptr(3077, 3084, 1), new unicode.Range16.ptr(3086, 3088, 1), new unicode.Range16.ptr(3090, 3112, 1), new unicode.Range16.ptr(3114, 3123, 1), new unicode.Range16.ptr(3125, 3129, 1), new unicode.Range16.ptr(3168, 3169, 1), new unicode.Range16.ptr(3205, 3212, 1), new unicode.Range16.ptr(3214, 3216, 1), new unicode.Range16.ptr(3218, 3240, 1), new unicode.Range16.ptr(3242, 3251, 1), new unicode.Range16.ptr(3253, 3257, 1), new unicode.Range16.ptr(3294, 3294, 1), new unicode.Range16.ptr(3296, 3297, 1), new unicode.Range16.ptr(3333, 3340, 1), new unicode.Range16.ptr(3342, 3344, 1), new unicode.Range16.ptr(3346, 3368, 1), new unicode.Range16.ptr(3370, 3385, 1), new unicode.Range16.ptr(3424, 3425, 1), new unicode.Range16.ptr(3585, 3630, 1), new unicode.Range16.ptr(3632, 3632, 1), new unicode.Range16.ptr(3634, 3635, 1), new unicode.Range16.ptr(3648, 3653, 1), new unicode.Range16.ptr(3713, 3714, 1), new unicode.Range16.ptr(3716, 3716, 1), new unicode.Range16.ptr(3719, 3720, 1), new unicode.Range16.ptr(3722, 3725, 3), new unicode.Range16.ptr(3732, 3735, 1), new unicode.Range16.ptr(3737, 3743, 1), new unicode.Range16.ptr(3745, 3747, 1), new unicode.Range16.ptr(3749, 3751, 2), new unicode.Range16.ptr(3754, 3755, 1), new unicode.Range16.ptr(3757, 3758, 1), new unicode.Range16.ptr(3760, 3760, 1), new unicode.Range16.ptr(3762, 3763, 1), new unicode.Range16.ptr(3773, 3773, 1), new unicode.Range16.ptr(3776, 3780, 1), new unicode.Range16.ptr(3904, 3911, 1), new unicode.Range16.ptr(3913, 3945, 1), new unicode.Range16.ptr(4256, 4293, 1), new unicode.Range16.ptr(4304, 4342, 1), new unicode.Range16.ptr(4352, 4352, 1), new unicode.Range16.ptr(4354, 4355, 1), new unicode.Range16.ptr(4357, 4359, 1), new unicode.Range16.ptr(4361, 4361, 1), new unicode.Range16.ptr(4363, 4364, 1), new unicode.Range16.ptr(4366, 4370, 1), new unicode.Range16.ptr(4412, 4416, 2), new unicode.Range16.ptr(4428, 4432, 2), new unicode.Range16.ptr(4436, 4437, 1), new unicode.Range16.ptr(4441, 4441, 1), new unicode.Range16.ptr(4447, 4449, 1), new unicode.Range16.ptr(4451, 4457, 2), new unicode.Range16.ptr(4461, 4462, 1), new unicode.Range16.ptr(4466, 4467, 1), new unicode.Range16.ptr(4469, 4510, 41), new unicode.Range16.ptr(4520, 4523, 3), new unicode.Range16.ptr(4526, 4527, 1), new unicode.Range16.ptr(4535, 4536, 1), new unicode.Range16.ptr(4538, 4538, 1), new unicode.Range16.ptr(4540, 4546, 1), new unicode.Range16.ptr(4587, 4592, 5), new unicode.Range16.ptr(4601, 4601, 1), new unicode.Range16.ptr(7680, 7835, 1), new unicode.Range16.ptr(7840, 7929, 1), new unicode.Range16.ptr(7936, 7957, 1), new unicode.Range16.ptr(7960, 7965, 1), new unicode.Range16.ptr(7968, 8005, 1), new unicode.Range16.ptr(8008, 8013, 1), new unicode.Range16.ptr(8016, 8023, 1), new unicode.Range16.ptr(8025, 8027, 2), new unicode.Range16.ptr(8029, 8029, 1), new unicode.Range16.ptr(8031, 8061, 1), new unicode.Range16.ptr(8064, 8116, 1), new unicode.Range16.ptr(8118, 8124, 1), new unicode.Range16.ptr(8126, 8126, 1), new unicode.Range16.ptr(8130, 8132, 1), new unicode.Range16.ptr(8134, 8140, 1), new unicode.Range16.ptr(8144, 8147, 1), new unicode.Range16.ptr(8150, 8155, 1), new unicode.Range16.ptr(8160, 8172, 1), new unicode.Range16.ptr(8178, 8180, 1), new unicode.Range16.ptr(8182, 8188, 1), new unicode.Range16.ptr(8486, 8486, 1), new unicode.Range16.ptr(8490, 8491, 1), new unicode.Range16.ptr(8494, 8494, 1), new unicode.Range16.ptr(8576, 8578, 1), new unicode.Range16.ptr(12295, 12295, 1), new unicode.Range16.ptr(12321, 12329, 1), new unicode.Range16.ptr(12353, 12436, 1), new unicode.Range16.ptr(12449, 12538, 1), new unicode.Range16.ptr(12549, 12588, 1), new unicode.Range16.ptr(19968, 40869, 1), new unicode.Range16.ptr(44032, 55203, 1)]), sliceType$1.nil, 0); - second = new unicode.RangeTable.ptr(new sliceType([new unicode.Range16.ptr(45, 46, 1), new unicode.Range16.ptr(48, 57, 1), new unicode.Range16.ptr(183, 183, 1), new unicode.Range16.ptr(720, 721, 1), new unicode.Range16.ptr(768, 837, 1), new unicode.Range16.ptr(864, 865, 1), new unicode.Range16.ptr(903, 903, 1), new unicode.Range16.ptr(1155, 1158, 1), new unicode.Range16.ptr(1425, 1441, 1), new unicode.Range16.ptr(1443, 1465, 1), new unicode.Range16.ptr(1467, 1469, 1), new unicode.Range16.ptr(1471, 1471, 1), new unicode.Range16.ptr(1473, 1474, 1), new unicode.Range16.ptr(1476, 1600, 124), new unicode.Range16.ptr(1611, 1618, 1), new unicode.Range16.ptr(1632, 1641, 1), new unicode.Range16.ptr(1648, 1648, 1), new unicode.Range16.ptr(1750, 1756, 1), new unicode.Range16.ptr(1757, 1759, 1), new unicode.Range16.ptr(1760, 1764, 1), new unicode.Range16.ptr(1767, 1768, 1), new unicode.Range16.ptr(1770, 1773, 1), new unicode.Range16.ptr(1776, 1785, 1), new unicode.Range16.ptr(2305, 2307, 1), new unicode.Range16.ptr(2364, 2364, 1), new unicode.Range16.ptr(2366, 2380, 1), new unicode.Range16.ptr(2381, 2381, 1), new unicode.Range16.ptr(2385, 2388, 1), new unicode.Range16.ptr(2402, 2403, 1), new unicode.Range16.ptr(2406, 2415, 1), new unicode.Range16.ptr(2433, 2435, 1), new unicode.Range16.ptr(2492, 2492, 1), new unicode.Range16.ptr(2494, 2495, 1), new unicode.Range16.ptr(2496, 2500, 1), new unicode.Range16.ptr(2503, 2504, 1), new unicode.Range16.ptr(2507, 2509, 1), new unicode.Range16.ptr(2519, 2519, 1), new unicode.Range16.ptr(2530, 2531, 1), new unicode.Range16.ptr(2534, 2543, 1), new unicode.Range16.ptr(2562, 2620, 58), new unicode.Range16.ptr(2622, 2623, 1), new unicode.Range16.ptr(2624, 2626, 1), new unicode.Range16.ptr(2631, 2632, 1), new unicode.Range16.ptr(2635, 2637, 1), new unicode.Range16.ptr(2662, 2671, 1), new unicode.Range16.ptr(2672, 2673, 1), new unicode.Range16.ptr(2689, 2691, 1), new unicode.Range16.ptr(2748, 2748, 1), new unicode.Range16.ptr(2750, 2757, 1), new unicode.Range16.ptr(2759, 2761, 1), new unicode.Range16.ptr(2763, 2765, 1), new unicode.Range16.ptr(2790, 2799, 1), new unicode.Range16.ptr(2817, 2819, 1), new unicode.Range16.ptr(2876, 2876, 1), new unicode.Range16.ptr(2878, 2883, 1), new unicode.Range16.ptr(2887, 2888, 1), new unicode.Range16.ptr(2891, 2893, 1), new unicode.Range16.ptr(2902, 2903, 1), new unicode.Range16.ptr(2918, 2927, 1), new unicode.Range16.ptr(2946, 2947, 1), new unicode.Range16.ptr(3006, 3010, 1), new unicode.Range16.ptr(3014, 3016, 1), new unicode.Range16.ptr(3018, 3021, 1), new unicode.Range16.ptr(3031, 3031, 1), new unicode.Range16.ptr(3047, 3055, 1), new unicode.Range16.ptr(3073, 3075, 1), new unicode.Range16.ptr(3134, 3140, 1), new unicode.Range16.ptr(3142, 3144, 1), new unicode.Range16.ptr(3146, 3149, 1), new unicode.Range16.ptr(3157, 3158, 1), new unicode.Range16.ptr(3174, 3183, 1), new unicode.Range16.ptr(3202, 3203, 1), new unicode.Range16.ptr(3262, 3268, 1), new unicode.Range16.ptr(3270, 3272, 1), new unicode.Range16.ptr(3274, 3277, 1), new unicode.Range16.ptr(3285, 3286, 1), new unicode.Range16.ptr(3302, 3311, 1), new unicode.Range16.ptr(3330, 3331, 1), new unicode.Range16.ptr(3390, 3395, 1), new unicode.Range16.ptr(3398, 3400, 1), new unicode.Range16.ptr(3402, 3405, 1), new unicode.Range16.ptr(3415, 3415, 1), new unicode.Range16.ptr(3430, 3439, 1), new unicode.Range16.ptr(3633, 3633, 1), new unicode.Range16.ptr(3636, 3642, 1), new unicode.Range16.ptr(3654, 3654, 1), new unicode.Range16.ptr(3655, 3662, 1), new unicode.Range16.ptr(3664, 3673, 1), new unicode.Range16.ptr(3761, 3761, 1), new unicode.Range16.ptr(3764, 3769, 1), new unicode.Range16.ptr(3771, 3772, 1), new unicode.Range16.ptr(3782, 3782, 1), new unicode.Range16.ptr(3784, 3789, 1), new unicode.Range16.ptr(3792, 3801, 1), new unicode.Range16.ptr(3864, 3865, 1), new unicode.Range16.ptr(3872, 3881, 1), new unicode.Range16.ptr(3893, 3897, 2), new unicode.Range16.ptr(3902, 3903, 1), new unicode.Range16.ptr(3953, 3972, 1), new unicode.Range16.ptr(3974, 3979, 1), new unicode.Range16.ptr(3984, 3989, 1), new unicode.Range16.ptr(3991, 3991, 1), new unicode.Range16.ptr(3993, 4013, 1), new unicode.Range16.ptr(4017, 4023, 1), new unicode.Range16.ptr(4025, 4025, 1), new unicode.Range16.ptr(8400, 8412, 1), new unicode.Range16.ptr(8417, 12293, 3876), new unicode.Range16.ptr(12330, 12335, 1), new unicode.Range16.ptr(12337, 12341, 1), new unicode.Range16.ptr(12441, 12442, 1), new unicode.Range16.ptr(12445, 12446, 1), new unicode.Range16.ptr(12540, 12542, 1)]), sliceType$1.nil, 0); - escQuot = (new sliceType$3($stringToBytes("""))); - escApos = (new sliceType$3($stringToBytes("'"))); - escAmp = (new sliceType$3($stringToBytes("&"))); - escLT = (new sliceType$3($stringToBytes("<"))); - escGT = (new sliceType$3($stringToBytes(">"))); - escTab = (new sliceType$3($stringToBytes(" "))); - escNL = (new sliceType$3($stringToBytes(" "))); - escCR = (new sliceType$3($stringToBytes(" "))); - escFFFD = (new sliceType$3($stringToBytes("\xEF\xBF\xBD"))); - cdataStart = (new sliceType$3($stringToBytes(""))); - cdataEscape = (new sliceType$3($stringToBytes("]]]]>"))); - nameType = reflect.TypeOf((x = new Name.ptr("", ""), new x.constructor.elem(x))); - attrType = reflect.TypeOf((x$1 = new Attr.ptr(new Name.ptr("", ""), ""), new x$1.constructor.elem(x$1))); - _r = reflect.TypeOf((ptrType.nil)).Elem(); /* */ $s = 13; case 13: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - unmarshalerType = _r; - _r$1 = reflect.TypeOf((ptrType$1.nil)).Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - unmarshalerAttrType = _r$1; - _r$2 = reflect.TypeOf((ptrType$2.nil)).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - textUnmarshalerType = _r$2; - errExeceededMaxUnmarshalDepth = errors.New("exceeded max depth"); - begComment = (new sliceType$3($stringToBytes(""))); - endProcInst = (new sliceType$3($stringToBytes("?>"))); - _r$3 = reflect.TypeOf((ptrType$3.nil)).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - marshalerType = _r$3; - _r$4 = reflect.TypeOf((ptrType$4.nil)).Elem(); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - marshalerAttrType = _r$4; - _r$5 = reflect.TypeOf((ptrType$5.nil)).Elem(); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - textMarshalerType = _r$5; - ddBytes = (new sliceType$3($stringToBytes("--"))); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["github.com/kvartborg/vector"] = (function() { - var $pkg = {}, $init, errors, fmt, math, Vector, Axis, sliceType, sliceType$1, sliceType$2, sliceType$3, Dot, axpyUnitaryTo, scalUnitaryTo; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - math = $packages["math"]; - Vector = $pkg.Vector = $newType(12, $kindSlice, "vector.Vector", true, "github.com/kvartborg/vector", true, null); - Axis = $pkg.Axis = $newType(4, $kindInt, "vector.Axis", true, "github.com/kvartborg/vector", true, null); - sliceType = $sliceType($Float64); - sliceType$1 = $sliceType($emptyInterface); - sliceType$2 = $sliceType(Vector); - sliceType$3 = $sliceType(Axis); - Vector.prototype.Clone = function() { - var clone, v; - v = this; - clone = $makeSlice(Vector, v.$length); - $copySlice(clone, v); - return clone; - }; - $ptrType(Vector).prototype.Clone = function() { return this.$get().Clone(); }; - Vector.prototype.Add = function(vs) { - var _i, _ref, dim, i, v, vs; - v = this; - dim = v.$length; - _ref = vs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]).$length > dim) { - axpyUnitaryTo($convertSliceType(v, sliceType), 1, $convertSliceType(v, sliceType), $convertSliceType($subslice(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), 0, dim), sliceType)); - } else { - axpyUnitaryTo($convertSliceType(v, sliceType), 1, $convertSliceType(v, sliceType), $convertSliceType(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), sliceType)); - } - _i++; - } - return v; - }; - $ptrType(Vector).prototype.Add = function(vs) { return this.$get().Add(vs); }; - Vector.prototype.Sub = function(vs) { - var _i, _ref, dim, i, v, vs; - v = this; - dim = v.$length; - _ref = vs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]).$length > dim) { - axpyUnitaryTo($convertSliceType(v, sliceType), -1, $convertSliceType($subslice(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), 0, dim), sliceType), $convertSliceType(v, sliceType)); - } else { - axpyUnitaryTo($convertSliceType(v, sliceType), -1, $convertSliceType(((i < 0 || i >= vs.$length) ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + i]), sliceType), $convertSliceType(v, sliceType)); - } - _i++; - } - return v; - }; - $ptrType(Vector).prototype.Sub = function(vs) { return this.$get().Sub(vs); }; - Vector.prototype.Scale = function(size) { - var size, v; - v = this; - scalUnitaryTo($convertSliceType(v, sliceType), size, $convertSliceType(v, sliceType)); - return v; - }; - $ptrType(Vector).prototype.Scale = function(size) { return this.$get().Scale(size); }; - Vector.prototype.Equal = function(v2) { - var _i, _ref, i, v, v2; - v = this; - if (!((v.$length === v2.$length))) { - return false; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (math.Abs(((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) - ((i < 0 || i >= v2.$length) ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + i])) > 1e-08) { - return false; - } - _i++; - } - return true; - }; - $ptrType(Vector).prototype.Equal = function(v2) { return this.$get().Equal(v2); }; - Vector.prototype.Magnitude = function() { - var _i, _ref, result, scalar, v; - v = this; - result = 0; - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - scalar = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - result = result + (scalar * scalar); - _i++; - } - return math.Sqrt(result); - }; - $ptrType(Vector).prototype.Magnitude = function() { return this.$get().Magnitude(); }; - Vector.prototype.Unit = function() { - var _i, _ref, i, l, v; - v = this; - l = v.Magnitude(); - if (l < 1e-08) { - return v; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i] = ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) / l); - _i++; - } - return v; - }; - $ptrType(Vector).prototype.Unit = function() { return this.$get().Unit(); }; - Dot = function(v1, v2) { - var _i, _ref, _tmp, _tmp$1, _tmp$2, dim1, dim2, i, result, v1, v2; - _tmp = 0; - _tmp$1 = v1.$length; - _tmp$2 = v2.$length; - result = _tmp; - dim1 = _tmp$1; - dim2 = _tmp$2; - if (dim1 > dim2) { - v2 = $appendSlice(v2, $convertSliceType($makeSlice(Vector, (dim1 - dim2 >> 0)), sliceType)); - } - if (dim1 < dim2) { - v1 = $appendSlice(v1, $convertSliceType($makeSlice(Vector, (dim2 - dim1 >> 0)), sliceType)); - } - _ref = v1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - result = result + (((i < 0 || i >= v1.$length) ? ($throwRuntimeError("index out of range"), undefined) : v1.$array[v1.$offset + i]) * ((i < 0 || i >= v2.$length) ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + i])); - _i++; - } - return result; - }; - $pkg.Dot = Dot; - Vector.prototype.Dot = function(v2) { - var v, v2; - v = this; - return Dot(v, v2); - }; - $ptrType(Vector).prototype.Dot = function(v2) { return this.$get().Dot(v2); }; - Vector.prototype.Cross = function(v2) { - var v, v2; - v = this; - if (!((v.$length === 3)) || !((v2.$length === 3))) { - return [Vector.nil, $pkg.ErrNot3Dimensional]; - } - return [new Vector([(1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) * (2 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 2]) - (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) * (1 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 1]), (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) * (0 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 0]) - (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) * (2 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 2]), (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) * (2 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 2]) - (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) * (0 >= v2.$length ? ($throwRuntimeError("index out of range"), undefined) : v2.$array[v2.$offset + 0])]), $ifaceNil]; - }; - $ptrType(Vector).prototype.Cross = function(v2) { return this.$get().Cross(v2); }; - Vector.prototype.Rotate = function(angle, as) { - var _1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, angle, as, axis, cos, dim, sin, v, x, y, z, z$1; - v = this; - _tmp = 2; - _tmp$1 = v.$length; - axis = _tmp; - dim = _tmp$1; - if (dim === 0) { - return v; - } - if (as.$length > 0) { - axis = (0 >= as.$length ? ($throwRuntimeError("index out of range"), undefined) : as.$array[as.$offset + 0]); - } - if ((dim === 1) && !((axis === 2))) { - v = $append(v, 0, 0); - } - if ((dim < 2 && (axis === 2)) || ((dim === 2) && !((axis === 2)))) { - v = $append(v, 0); - } - _tmp$2 = (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); - _tmp$3 = (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]); - x = _tmp$2; - y = _tmp$3; - _tmp$4 = math.Cos(angle); - _tmp$5 = math.Sin(angle); - cos = _tmp$4; - sin = _tmp$5; - _1 = axis; - if (_1 === (0)) { - z = (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]); - (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1] = y * cos - z * sin); - (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2] = y * sin + z * cos); - } else if (_1 === (1)) { - z$1 = (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]); - (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0] = x * cos + z$1 * sin); - (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2] = -x * sin + z$1 * cos); - } else if (_1 === (2)) { - (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0] = x * cos - y * sin); - (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1] = x * sin + y * cos); - } - if (dim > 3) { - return $subslice(v, 0, 3); - } - return v; - }; - $ptrType(Vector).prototype.Rotate = function(angle, as) { return this.$get().Rotate(angle, as); }; - Vector.prototype.String = function() { - var {_i, _r, _ref, i, str, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - str = ""; - v = this; - if (v === Vector.nil) { - str = "[]"; - $s = -1; return str; - } - _ref = v; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - /* */ if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) < 1e-08 && ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) > 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) < 1e-08 && ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) > 0) { */ case 3: - str = str + ("0 "); - $s = 5; continue; - /* } else { */ case 4: - _r = fmt.Sprint(new sliceType$1([new $Float64(((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]))])); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - str = str + (_r + " "); - /* } */ case 5: - _i++; - $s = 1; continue; - case 2: - str = "[" + $substring(str, 0, (str.length - 1 >> 0)) + "]"; - $s = -1; return str; - /* */ } return; } var $f = {$blk: Vector.prototype.String, $c: true, $r, _i, _r, _ref, i, str, v, $s};return $f; - }; - $ptrType(Vector).prototype.String = function() { return this.$get().String(); }; - Vector.prototype.X = function() { - var v; - v = this; - if (v.$length < 1) { - return 0; - } - return (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); - }; - $ptrType(Vector).prototype.X = function() { return this.$get().X(); }; - Vector.prototype.Y = function() { - var v; - v = this; - if (v.$length < 2) { - return 0; - } - return (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]); - }; - $ptrType(Vector).prototype.Y = function() { return this.$get().Y(); }; - Vector.prototype.Z = function() { - var v; - v = this; - if (v.$length < 3) { - return 0; - } - return (2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]); - }; - $ptrType(Vector).prototype.Z = function() { return this.$get().Z(); }; - axpyUnitaryTo = function(dst, alpha, x, y) { - var _i, _ref, alpha, dim, dst, i, v, x, y; - dim = y.$length; - _ref = x; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i === dim) { - return; - } - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = alpha * v + ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])); - _i++; - } - }; - scalUnitaryTo = function(dst, alpha, x) { - var _i, _ref, alpha, dst, i, x; - _ref = x; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i]) * (alpha)); - _i++; - } - }; - Vector.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([sliceType$2], [Vector], true)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([sliceType$2], [Vector], true)}, {prop: "Scale", name: "Scale", pkg: "", typ: $funcType([$Float64], [Vector], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([Vector], [$Bool], false)}, {prop: "Magnitude", name: "Magnitude", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Unit", name: "Unit", pkg: "", typ: $funcType([], [Vector], false)}, {prop: "Dot", name: "Dot", pkg: "", typ: $funcType([Vector], [$Float64], false)}, {prop: "Cross", name: "Cross", pkg: "", typ: $funcType([Vector], [Vector, $error], false)}, {prop: "Rotate", name: "Rotate", pkg: "", typ: $funcType([$Float64, sliceType$3], [Vector], true)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "X", name: "X", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Y", name: "Y", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Z", name: "Z", pkg: "", typ: $funcType([], [$Float64], false)}]; - Vector.init($Float64); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrNot3Dimensional = errors.New("vector is not 3 dimensional"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["github.com/solarlune/resolv"] = (function() { - var $pkg = {}, $init, vector, math, sort, Space, Shape, Line, ConvexPolygon, ContactSet, Circle, Projection, Object, Collision, Cell, ptrType, sliceType, sliceType$1, ptrType$1, ptrType$2, sliceType$2, sliceType$3, sliceType$4, ptrType$3, sliceType$5, ptrType$4, ptrType$5, ptrType$6, sliceType$6, ptrType$7, mapType, NewSpace, NewLine, NewConvexPolygon, NewContactSet, NewRectangle, NewCircle, NewObject, NewCollision, newCell; - vector = $packages["github.com/kvartborg/vector"]; - math = $packages["math"]; - sort = $packages["sort"]; - Space = $pkg.Space = $newType(0, $kindStruct, "resolv.Space", true, "github.com/solarlune/resolv", true, function(Cells_, CellWidth_, CellHeight_) { - this.$val = this; - if (arguments.length === 0) { - this.Cells = sliceType$1.nil; - this.CellWidth = 0; - this.CellHeight = 0; - return; - } - this.Cells = Cells_; - this.CellWidth = CellWidth_; - this.CellHeight = CellHeight_; - }); - Shape = $pkg.Shape = $newType(8, $kindInterface, "resolv.Shape", true, "github.com/solarlune/resolv", true, null); - Line = $pkg.Line = $newType(0, $kindStruct, "resolv.Line", true, "github.com/solarlune/resolv", true, function(Start_, End_) { - this.$val = this; - if (arguments.length === 0) { - this.Start = vector.Vector.nil; - this.End = vector.Vector.nil; - return; - } - this.Start = Start_; - this.End = End_; - }); - ConvexPolygon = $pkg.ConvexPolygon = $newType(0, $kindStruct, "resolv.ConvexPolygon", true, "github.com/solarlune/resolv", true, function(Points_, X_, Y_, Closed_) { - this.$val = this; - if (arguments.length === 0) { - this.Points = sliceType$3.nil; - this.X = 0; - this.Y = 0; - this.Closed = false; - return; - } - this.Points = Points_; - this.X = X_; - this.Y = Y_; - this.Closed = Closed_; - }); - ContactSet = $pkg.ContactSet = $newType(0, $kindStruct, "resolv.ContactSet", true, "github.com/solarlune/resolv", true, function(Points_, MTV_, Center_) { - this.$val = this; - if (arguments.length === 0) { - this.Points = sliceType$3.nil; - this.MTV = vector.Vector.nil; - this.Center = vector.Vector.nil; - return; - } - this.Points = Points_; - this.MTV = MTV_; - this.Center = Center_; - }); - Circle = $pkg.Circle = $newType(0, $kindStruct, "resolv.Circle", true, "github.com/solarlune/resolv", true, function(X_, Y_, Radius_) { - this.$val = this; - if (arguments.length === 0) { - this.X = 0; - this.Y = 0; - this.Radius = 0; - return; - } - this.X = X_; - this.Y = Y_; - this.Radius = Radius_; - }); - Projection = $pkg.Projection = $newType(0, $kindStruct, "resolv.Projection", true, "github.com/solarlune/resolv", true, function(Min_, Max_) { - this.$val = this; - if (arguments.length === 0) { - this.Min = 0; - this.Max = 0; - return; - } - this.Min = Min_; - this.Max = Max_; - }); - Object = $pkg.Object = $newType(0, $kindStruct, "resolv.Object", true, "github.com/solarlune/resolv", true, function(Shape_, Space_, X_, Y_, W_, H_, TouchingCells_, Data_, ignoreList_, tags_) { - this.$val = this; - if (arguments.length === 0) { - this.Shape = $ifaceNil; - this.Space = ptrType$1.nil; - this.X = 0; - this.Y = 0; - this.W = 0; - this.H = 0; - this.TouchingCells = sliceType.nil; - this.Data = $ifaceNil; - this.ignoreList = false; - this.tags = sliceType$6.nil; - return; - } - this.Shape = Shape_; - this.Space = Space_; - this.X = X_; - this.Y = Y_; - this.W = W_; - this.H = H_; - this.TouchingCells = TouchingCells_; - this.Data = Data_; - this.ignoreList = ignoreList_; - this.tags = tags_; - }); - Collision = $pkg.Collision = $newType(0, $kindStruct, "resolv.Collision", true, "github.com/solarlune/resolv", true, function(checkingObject_, dx_, dy_, Objects_, Cells_) { - this.$val = this; - if (arguments.length === 0) { - this.checkingObject = ptrType$2.nil; - this.dx = 0; - this.dy = 0; - this.Objects = sliceType$2.nil; - this.Cells = sliceType.nil; - return; - } - this.checkingObject = checkingObject_; - this.dx = dx_; - this.dy = dy_; - this.Objects = Objects_; - this.Cells = Cells_; - }); - Cell = $pkg.Cell = $newType(0, $kindStruct, "resolv.Cell", true, "github.com/solarlune/resolv", true, function(X_, Y_, Objects_) { - this.$val = this; - if (arguments.length === 0) { - this.X = 0; - this.Y = 0; - this.Objects = sliceType$2.nil; - return; - } - this.X = X_; - this.Y = Y_; - this.Objects = Objects_; - }); - ptrType = $ptrType(Cell); - sliceType = $sliceType(ptrType); - sliceType$1 = $sliceType(sliceType); - ptrType$1 = $ptrType(Space); - ptrType$2 = $ptrType(Object); - sliceType$2 = $sliceType(ptrType$2); - sliceType$3 = $sliceType(vector.Vector); - sliceType$4 = $sliceType($Float64); - ptrType$3 = $ptrType(Line); - sliceType$5 = $sliceType(ptrType$3); - ptrType$4 = $ptrType(Circle); - ptrType$5 = $ptrType(ConvexPolygon); - ptrType$6 = $ptrType(ContactSet); - sliceType$6 = $sliceType($String); - ptrType$7 = $ptrType(Collision); - mapType = $mapType(ptrType$2, $Bool); - NewSpace = function(spaceWidth, spaceHeight, cellWidth, cellHeight) { - var _q, _q$1, cellHeight, cellWidth, sp, spaceHeight, spaceWidth; - sp = new Space.ptr(sliceType$1.nil, cellWidth, cellHeight); - sp.Resize((_q = spaceWidth / cellWidth, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), (_q$1 = spaceHeight / cellHeight, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); - return sp; - }; - $pkg.NewSpace = NewSpace; - Space.ptr.prototype.Add = function(objects) { - var {_i, _ref, obj, objects, sp, $s, $r, $c} = $restore(this, {objects}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sp = this; - _ref = objects; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - obj.Space = sp; - $r = obj.Update(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Space.ptr.prototype.Add, $c: true, $r, _i, _ref, obj, objects, sp, $s};return $f; - }; - Space.prototype.Add = function(objects) { return this.$val.Add(objects); }; - Space.ptr.prototype.Remove = function(objects) { - var _i, _i$1, _ref, _ref$1, cell, obj, objects, sp; - sp = this; - _ref = objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = obj.TouchingCells; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - cell = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - cell.unregister(obj); - _i$1++; - } - obj.TouchingCells = new sliceType([]); - obj.Space = ptrType$1.nil; - _i++; - } - }; - Space.prototype.Remove = function(objects) { return this.$val.Remove(objects); }; - Space.ptr.prototype.Objects = function() { - var _entry, _i, _i$1, _i$2, _key, _ref, _ref$1, _ref$2, _tuple, added, cx, cy, o, objects, objectsAdded, sp, x, x$1, x$2; - sp = this; - objectsAdded = $makeMap(ptrType$2.keyFor, []); - objects = new sliceType$2([]); - _ref = sp.Cells; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cy = _i; - _ref$1 = (x = sp.Cells, ((cy < 0 || cy >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + cy])); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - cx = _i$1; - _ref$2 = (x$1 = (x$2 = sp.Cells, ((cy < 0 || cy >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + cy])), ((cx < 0 || cx >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + cx])).Objects; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - o = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - _tuple = (_entry = objectsAdded[ptrType$2.keyFor(o)], _entry !== undefined ? [_entry.v, true] : [false, false]); - added = _tuple[1]; - if (!added) { - objects = $append(objects, o); - _key = o; (objectsAdded || $throwRuntimeError("assignment to entry in nil map"))[ptrType$2.keyFor(_key)] = { k: _key, v: true }; - } - _i$2++; - } - _i$1++; - } - _i++; - } - return objects; - }; - Space.prototype.Objects = function() { return this.$val.Objects(); }; - Space.ptr.prototype.Resize = function(width, height) { - var height, sp, width, x, x$1, x$2, y; - sp = this; - sp.Cells = new sliceType$1([]); - y = 0; - while (true) { - if (!(y < height)) { break; } - sp.Cells = $append(sp.Cells, new sliceType([])); - x = 0; - while (true) { - if (!(x < width)) { break; } - (x$2 = sp.Cells, ((y < 0 || y >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + y] = $append((x$1 = sp.Cells, ((y < 0 || y >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + y])), newCell(x, y)))); - x = x + (1) >> 0; - } - y = y + (1) >> 0; - } - }; - Space.prototype.Resize = function(width, height) { return this.$val.Resize(width, height); }; - Space.ptr.prototype.Cell = function(x, y) { - var sp, x, x$1, x$2, x$3, y; - sp = this; - if (y >= 0 && y < sp.Cells.$length && x >= 0 && x < (x$1 = sp.Cells, ((y < 0 || y >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + y])).$length) { - return (x$2 = (x$3 = sp.Cells, ((y < 0 || y >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + y])), ((x < 0 || x >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x])); - } - return ptrType.nil; - }; - Space.prototype.Cell = function(x, y) { return this.$val.Cell(x, y); }; - Space.ptr.prototype.CheckCells = function(x, y, w, h, tags) { - var _i, _ref, cell, h, ix, iy, obj, sp, tags, w, x, x$1, y; - sp = this; - ix = x; - while (true) { - if (!(ix < (x + w >> 0))) { break; } - iy = y; - while (true) { - if (!(iy < (y + h >> 0))) { break; } - cell = sp.Cell(ix, iy); - if (!(cell === ptrType.nil)) { - if (tags.$length > 0) { - if (cell.ContainsTags(tags)) { - _ref = cell.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (obj.HasTags(tags)) { - return obj; - } - _i++; - } - } - } else if (cell.Occupied()) { - return (x$1 = cell.Objects, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - } - } - iy = iy + (1) >> 0; - } - ix = ix + (1) >> 0; - } - return ptrType$2.nil; - }; - Space.prototype.CheckCells = function(x, y, w, h, tags) { return this.$val.CheckCells(x, y, w, h, tags); }; - Space.ptr.prototype.UnregisterAllObjects = function() { - var cell, sp, x, x$1, x$2, x$3, y; - sp = this; - y = 0; - while (true) { - if (!(y < sp.Cells.$length)) { break; } - x = 0; - while (true) { - if (!(x < (x$1 = sp.Cells, ((y < 0 || y >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + y])).$length)) { break; } - cell = (x$2 = (x$3 = sp.Cells, ((y < 0 || y >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + y])), ((x < 0 || x >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x])); - sp.Remove(cell.Objects); - x = x + (1) >> 0; - } - y = y + (1) >> 0; - } - }; - Space.prototype.UnregisterAllObjects = function() { return this.$val.UnregisterAllObjects(); }; - Space.ptr.prototype.WorldToSpace = function(x, y) { - var fx, fy, sp, x, y; - sp = this; - fx = ((math.Floor(x / (sp.CellWidth)) >> 0)); - fy = ((math.Floor(y / (sp.CellHeight)) >> 0)); - return [fx, fy]; - }; - Space.prototype.WorldToSpace = function(x, y) { return this.$val.WorldToSpace(x, y); }; - Space.ptr.prototype.SpaceToWorld = function(x, y) { - var fx, fy, sp, x, y; - sp = this; - fx = (($imul(x, sp.CellWidth))); - fy = (($imul(y, sp.CellHeight))); - return [fx, fy]; - }; - Space.prototype.SpaceToWorld = function(x, y) { return this.$val.SpaceToWorld(x, y); }; - Space.ptr.prototype.Height = function() { - var sp; - sp = this; - return sp.Cells.$length; - }; - Space.prototype.Height = function() { return this.$val.Height(); }; - Space.ptr.prototype.Width = function() { - var sp, x; - sp = this; - if (sp.Cells.$length > 0) { - return (x = sp.Cells, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).$length; - } - return 0; - }; - Space.prototype.Width = function() { return this.$val.Width(); }; - Space.ptr.prototype.CellsInLine = function(startX, startY, endX, endY) { - var _q, _q$1, _q$2, _q$3, _tuple, _tuple$1, alternate, c, cell, cells, cx, cy, dv, endCell, endX, endY, p, pX, pY, sp, startX, startY; - sp = this; - cells = new sliceType([]); - cell = sp.Cell(startX, startY); - endCell = sp.Cell(endX, endY); - if (!(cell === ptrType.nil) && !(endCell === ptrType.nil)) { - dv = new vector.Vector([((endX - startX >> 0)), ((endY - startY >> 0))]).Unit(); - (0 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 0] = (0 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 0]) * (((_q = sp.CellWidth / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))))); - (1 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 1] = (1 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 1]) * (((_q$1 = sp.CellHeight / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))))); - _tuple = sp.SpaceToWorld(startX, startY); - pX = _tuple[0]; - pY = _tuple[1]; - p = new vector.Vector([pX + ((_q$2 = sp.CellWidth / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))), pY + ((_q$3 = sp.CellHeight / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")))]); - alternate = false; - while (true) { - if (!(!(cell === ptrType.nil))) { break; } - if (cell === endCell) { - cells = $append(cells, cell); - break; - } - cells = $append(cells, cell); - if (alternate) { - (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) + ((1 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 1]))); - } else { - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) + ((0 >= dv.$length ? ($throwRuntimeError("index out of range"), undefined) : dv.$array[dv.$offset + 0]))); - } - _tuple$1 = sp.WorldToSpace((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]), (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1])); - cx = _tuple$1[0]; - cy = _tuple$1[1]; - c = sp.Cell(cx, cy); - if (!(c === cell)) { - cell = c; - } - alternate = !alternate; - } - } - return cells; - }; - Space.prototype.CellsInLine = function(startX, startY, endX, endY) { return this.$val.CellsInLine(startX, startY, endX, endY); }; - NewLine = function(x, y, x2, y2) { - var x, x2, y, y2; - return new Line.ptr(new vector.Vector([x, y]), new vector.Vector([x2, y2])); - }; - $pkg.NewLine = NewLine; - Line.ptr.prototype.Project = function(axis) { - var axis, line; - line = this; - return line.Vector().Scale(axis.Dot(line.Start.Sub(new sliceType$3([line.End])))); - }; - Line.prototype.Project = function(axis) { return this.$val.Project(axis); }; - Line.ptr.prototype.Normal = function() { - var line, v; - line = this; - v = line.Vector(); - return new vector.Vector([(1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]), -(0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])]).Unit(); - }; - Line.prototype.Normal = function() { return this.$val.Normal(); }; - Line.ptr.prototype.Vector = function() { - var line; - line = this; - return line.End.Clone().Sub(new sliceType$3([line.Start])).Unit(); - }; - Line.prototype.Vector = function() { return this.$val.Vector(); }; - Line.ptr.prototype.IntersectionPointsLine = function(other) { - var det, dx, dy, gamma, lambda, line, other, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - line = this; - det = ((x = line.End, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) - (x$1 = line.Start, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0]))) * ((x$2 = other.End, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) - (x$3 = other.Start, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1]))) - ((x$4 = other.End, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])) - (x$5 = other.Start, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0]))) * ((x$6 = line.End, (1 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 1])) - (x$7 = line.Start, (1 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 1]))); - if (!((det === 0))) { - lambda = ((((x$8 = line.Start, (1 >= x$8.$length ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + 1])) - (x$9 = other.Start, (1 >= x$9.$length ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + 1]))) * ((x$10 = other.End, (0 >= x$10.$length ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + 0])) - (x$11 = other.Start, (0 >= x$11.$length ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + 0])))) - (((x$12 = line.Start, (0 >= x$12.$length ? ($throwRuntimeError("index out of range"), undefined) : x$12.$array[x$12.$offset + 0])) - (x$13 = other.Start, (0 >= x$13.$length ? ($throwRuntimeError("index out of range"), undefined) : x$13.$array[x$13.$offset + 0]))) * ((x$14 = other.End, (1 >= x$14.$length ? ($throwRuntimeError("index out of range"), undefined) : x$14.$array[x$14.$offset + 1])) - (x$15 = other.Start, (1 >= x$15.$length ? ($throwRuntimeError("index out of range"), undefined) : x$15.$array[x$15.$offset + 1])))) + 1) / det; - gamma = ((((x$16 = line.Start, (1 >= x$16.$length ? ($throwRuntimeError("index out of range"), undefined) : x$16.$array[x$16.$offset + 1])) - (x$17 = other.Start, (1 >= x$17.$length ? ($throwRuntimeError("index out of range"), undefined) : x$17.$array[x$17.$offset + 1]))) * ((x$18 = line.End, (0 >= x$18.$length ? ($throwRuntimeError("index out of range"), undefined) : x$18.$array[x$18.$offset + 0])) - (x$19 = line.Start, (0 >= x$19.$length ? ($throwRuntimeError("index out of range"), undefined) : x$19.$array[x$19.$offset + 0])))) - (((x$20 = line.Start, (0 >= x$20.$length ? ($throwRuntimeError("index out of range"), undefined) : x$20.$array[x$20.$offset + 0])) - (x$21 = other.Start, (0 >= x$21.$length ? ($throwRuntimeError("index out of range"), undefined) : x$21.$array[x$21.$offset + 0]))) * ((x$22 = line.End, (1 >= x$22.$length ? ($throwRuntimeError("index out of range"), undefined) : x$22.$array[x$22.$offset + 1])) - (x$23 = line.Start, (1 >= x$23.$length ? ($throwRuntimeError("index out of range"), undefined) : x$23.$array[x$23.$offset + 1])))) + 1) / det; - if ((0 < lambda && lambda < 1) && (0 < gamma && gamma < 1)) { - dx = (x$24 = line.End, (0 >= x$24.$length ? ($throwRuntimeError("index out of range"), undefined) : x$24.$array[x$24.$offset + 0])) - (x$25 = line.Start, (0 >= x$25.$length ? ($throwRuntimeError("index out of range"), undefined) : x$25.$array[x$25.$offset + 0])); - dy = (x$26 = line.End, (1 >= x$26.$length ? ($throwRuntimeError("index out of range"), undefined) : x$26.$array[x$26.$offset + 1])) - (x$27 = line.Start, (1 >= x$27.$length ? ($throwRuntimeError("index out of range"), undefined) : x$27.$array[x$27.$offset + 1])); - return new vector.Vector([(x$28 = line.Start, (0 >= x$28.$length ? ($throwRuntimeError("index out of range"), undefined) : x$28.$array[x$28.$offset + 0])) + (lambda * dx), (x$29 = line.Start, (1 >= x$29.$length ? ($throwRuntimeError("index out of range"), undefined) : x$29.$array[x$29.$offset + 1])) + (lambda * dy)]); - } - } - return vector.Vector.nil; - }; - Line.prototype.IntersectionPointsLine = function(other) { return this.$val.IntersectionPointsLine(other); }; - Line.ptr.prototype.IntersectionPointsCircle = function(circle) { - var a, b, c, circle, cp, det, diff, lEnd, lStart, line, points, t, t$1, x, x$1, x$2, x$3, x$4, x$5; - line = this; - points = new sliceType$3([]); - cp = new vector.Vector([circle.X, circle.Y]); - lStart = line.Start.Sub(new sliceType$3([cp])); - lEnd = line.End.Sub(new sliceType$3([cp])); - diff = lEnd.Sub(new sliceType$3([lStart])); - a = (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]) * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]) + (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1]) * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1]); - b = 2 * (((0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]) * (0 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 0])) + ((1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1]) * (1 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 1]))); - c = ((0 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 0]) * (0 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 0])) + ((1 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 1]) * (1 >= lStart.$length ? ($throwRuntimeError("index out of range"), undefined) : lStart.$array[lStart.$offset + 1])) - (circle.Radius * circle.Radius); - det = b * b - (4 * a * c); - if (det < 0) { - } else if (det === 0) { - t = -b / (2 * a); - if (t >= 0 && t <= 1) { - points = $append(points, new vector.Vector([(x = line.Start, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) + t * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]), (x$1 = line.Start, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) + t * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1])])); - } - } else { - t$1 = (-b + math.Sqrt(det)) / (2 * a); - if (t$1 >= 0 && t$1 <= 1) { - points = $append(points, new vector.Vector([(x$2 = line.Start, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) + t$1 * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]), (x$3 = line.Start, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1])) + t$1 * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1])])); - } - t$1 = (-b - math.Sqrt(det)) / (2 * a); - if (t$1 >= 0 && t$1 <= 1) { - points = $append(points, new vector.Vector([(x$4 = line.Start, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])) + t$1 * (0 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 0]), (x$5 = line.Start, (1 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 1])) + t$1 * (1 >= diff.$length ? ($throwRuntimeError("index out of range"), undefined) : diff.$array[diff.$offset + 1])])); - } - } - return points; - }; - Line.prototype.IntersectionPointsCircle = function(circle) { return this.$val.IntersectionPointsCircle(circle); }; - NewConvexPolygon = function(points) { - var cp, points; - cp = new ConvexPolygon.ptr(new sliceType$3([]), 0, 0, true); - cp.AddPoints(points); - return cp; - }; - $pkg.NewConvexPolygon = NewConvexPolygon; - ConvexPolygon.ptr.prototype.Clone = function() { - var _i, _ref, cp, newPoly, point, points; - cp = this; - points = new sliceType$3([]); - _ref = cp.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - points = $append(points, point.Clone()); - _i++; - } - newPoly = NewConvexPolygon(sliceType$4.nil); - newPoly.X = cp.X; - newPoly.Y = cp.Y; - newPoly.AddPointsVec(points); - newPoly.Closed = cp.Closed; - return newPoly; - }; - ConvexPolygon.prototype.Clone = function() { return this.$val.Clone(); }; - ConvexPolygon.ptr.prototype.AddPointsVec = function(points) { - var cp, points; - cp = this; - cp.Points = $appendSlice(cp.Points, points); - }; - ConvexPolygon.prototype.AddPointsVec = function(points) { return this.$val.AddPointsVec(points); }; - ConvexPolygon.ptr.prototype.AddPoints = function(vertexPositions) { - var cp, v, vertexPositions, x; - cp = this; - v = 0; - while (true) { - if (!(v < vertexPositions.$length)) { break; } - cp.Points = $append(cp.Points, new vector.Vector([((v < 0 || v >= vertexPositions.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertexPositions.$array[vertexPositions.$offset + v]), (x = v + 1 >> 0, ((x < 0 || x >= vertexPositions.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertexPositions.$array[vertexPositions.$offset + x]))])); - v = v + (2) >> 0; - } - }; - ConvexPolygon.prototype.AddPoints = function(vertexPositions) { return this.$val.AddPoints(vertexPositions); }; - ConvexPolygon.ptr.prototype.Lines = function() { - var _tmp, _tmp$1, cp, end, i, line, lines, start, vertices, x; - cp = this; - lines = new sliceType$5([]); - vertices = cp.Transformed(); - i = 0; - while (true) { - if (!(i < vertices.$length)) { break; } - _tmp = ((i < 0 || i >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + i]); - _tmp$1 = (0 >= vertices.$length ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + 0]); - start = _tmp; - end = _tmp$1; - if (i < (vertices.$length - 1 >> 0)) { - end = (x = i + 1 >> 0, ((x < 0 || x >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + x])); - } else if (!cp.Closed) { - break; - } - line = NewLine((0 >= start.$length ? ($throwRuntimeError("index out of range"), undefined) : start.$array[start.$offset + 0]), (1 >= start.$length ? ($throwRuntimeError("index out of range"), undefined) : start.$array[start.$offset + 1]), (0 >= end.$length ? ($throwRuntimeError("index out of range"), undefined) : end.$array[end.$offset + 0]), (1 >= end.$length ? ($throwRuntimeError("index out of range"), undefined) : end.$array[end.$offset + 1])); - lines = $append(lines, line); - i = i + (1) >> 0; - } - return lines; - }; - ConvexPolygon.prototype.Lines = function() { return this.$val.Lines(); }; - ConvexPolygon.ptr.prototype.Transformed = function() { - var _i, _ref, cp, point, transformed; - cp = this; - transformed = new sliceType$3([]); - _ref = cp.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - transformed = $append(transformed, new vector.Vector([(0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) + cp.X, (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) + cp.Y])); - _i++; - } - return transformed; - }; - ConvexPolygon.prototype.Transformed = function() { return this.$val.Transformed(); }; - ConvexPolygon.ptr.prototype.Bounds = function() { - var bottomRight, cp, i, point, topLeft, transformed, x, x$1; - cp = this; - transformed = cp.Transformed(); - topLeft = new vector.Vector([(x = (0 >= transformed.$length ? ($throwRuntimeError("index out of range"), undefined) : transformed.$array[transformed.$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), (x$1 = (0 >= transformed.$length ? ($throwRuntimeError("index out of range"), undefined) : transformed.$array[transformed.$offset + 0]), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))]); - bottomRight = topLeft.Clone(); - i = 0; - while (true) { - if (!(i < transformed.$length)) { break; } - point = ((i < 0 || i >= transformed.$length) ? ($throwRuntimeError("index out of range"), undefined) : transformed.$array[transformed.$offset + i]); - if ((0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) < (0 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 0])) { - (0 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 0] = (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0])); - } else if ((0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) > (0 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 0])) { - (0 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 0] = (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0])); - } - if ((1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) < (1 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 1])) { - (1 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 1] = (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1])); - } else if ((1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) > (1 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 1])) { - (1 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 1] = (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1])); - } - i = i + (1) >> 0; - } - return [topLeft, bottomRight]; - }; - ConvexPolygon.prototype.Bounds = function() { return this.$val.Bounds(); }; - ConvexPolygon.ptr.prototype.Position = function() { - var cp; - cp = this; - return [cp.X, cp.Y]; - }; - ConvexPolygon.prototype.Position = function() { return this.$val.Position(); }; - ConvexPolygon.ptr.prototype.SetPosition = function(x, y) { - var cp, x, y; - cp = this; - cp.X = x; - cp.Y = y; - }; - ConvexPolygon.prototype.SetPosition = function(x, y) { return this.$val.SetPosition(x, y); }; - ConvexPolygon.ptr.prototype.SetPositionVec = function(vec) { - var cp, vec; - cp = this; - cp.X = vec.X(); - cp.Y = vec.Y(); - }; - ConvexPolygon.prototype.SetPositionVec = function(vec) { return this.$val.SetPositionVec(vec); }; - ConvexPolygon.ptr.prototype.Move = function(x, y) { - var cp, x, y; - cp = this; - cp.X = cp.X + (x); - cp.Y = cp.Y + (y); - }; - ConvexPolygon.prototype.Move = function(x, y) { return this.$val.Move(x, y); }; - ConvexPolygon.ptr.prototype.MoveVec = function(vec) { - var cp, vec; - cp = this; - cp.X = cp.X + (vec.X()); - cp.Y = cp.Y + (vec.Y()); - }; - ConvexPolygon.prototype.MoveVec = function(vec) { return this.$val.MoveVec(vec); }; - ConvexPolygon.ptr.prototype.Center = function() { - var _i, _ref, cp, pos, v; - cp = this; - pos = new vector.Vector([0, 0]); - _ref = cp.Transformed(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - pos.Add(new sliceType$3([v])); - _i++; - } - (0 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 0] = (0 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 0]) / ((cp.Transformed().$length))); - (1 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 1] = (1 >= pos.$length ? ($throwRuntimeError("index out of range"), undefined) : pos.$array[pos.$offset + 1]) / ((cp.Transformed().$length))); - return pos; - }; - ConvexPolygon.prototype.Center = function() { return this.$val.Center(); }; - ConvexPolygon.ptr.prototype.Project = function(axis) { - var axis, cp, i, max, min, p, vertices, x, x$1, x$2, x$3; - cp = this; - axis = axis.Unit(); - vertices = cp.Transformed(); - min = axis.Dot(new vector.Vector([(x = (0 >= vertices.$length ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), (x$1 = (0 >= vertices.$length ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + 0]), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))])); - max = min; - i = 1; - while (true) { - if (!(i < vertices.$length)) { break; } - p = axis.Dot(new vector.Vector([(x$2 = ((i < 0 || i >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + i]), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), (x$3 = ((i < 0 || i >= vertices.$length) ? ($throwRuntimeError("index out of range"), undefined) : vertices.$array[vertices.$offset + i]), (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1]))])); - if (p < min) { - min = p; - } else if (p > max) { - max = p; - } - i = i + (1) >> 0; - } - return new Projection.ptr(min, max); - }; - ConvexPolygon.prototype.Project = function(axis) { return this.$val.Project(axis); }; - ConvexPolygon.ptr.prototype.SATAxes = function() { - var _i, _ref, axes, cp, line; - cp = this; - axes = new sliceType$3([]); - _ref = cp.Lines(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - axes = $append(axes, line.Normal()); - _i++; - } - return axes; - }; - ConvexPolygon.prototype.SATAxes = function() { return this.$val.SATAxes(); }; - ConvexPolygon.ptr.prototype.PointInside = function(point) { - var _i, _ref, contactCount, line, point, pointLine, polygon; - polygon = this; - pointLine = NewLine((0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]), (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]), (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) + 9.99999999999e+11, (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1])); - contactCount = 0; - _ref = polygon.Lines(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!(line.IntersectionPointsLine(pointLine) === vector.Vector.nil)) { - contactCount = contactCount + (1) >> 0; - } - _i++; - } - return contactCount === 1; - }; - ConvexPolygon.prototype.PointInside = function(point) { return this.$val.PointInside(point); }; - NewContactSet = function() { - return new ContactSet.ptr(new sliceType$3([]), new vector.Vector([0, 0]), new vector.Vector([0, 0])); - }; - $pkg.NewContactSet = NewContactSet; - ContactSet.ptr.prototype.LeftmostPoint = function() { - var _i, _ref, cs, left, point; - cs = this; - left = vector.Vector.nil; - _ref = cs.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (left === vector.Vector.nil || (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) < (0 >= left.$length ? ($throwRuntimeError("index out of range"), undefined) : left.$array[left.$offset + 0])) { - left = point; - } - _i++; - } - return left; - }; - ContactSet.prototype.LeftmostPoint = function() { return this.$val.LeftmostPoint(); }; - ContactSet.ptr.prototype.RightmostPoint = function() { - var _i, _ref, cs, point, right; - cs = this; - right = vector.Vector.nil; - _ref = cs.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (right === vector.Vector.nil || (0 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 0]) > (0 >= right.$length ? ($throwRuntimeError("index out of range"), undefined) : right.$array[right.$offset + 0])) { - right = point; - } - _i++; - } - return right; - }; - ContactSet.prototype.RightmostPoint = function() { return this.$val.RightmostPoint(); }; - ContactSet.ptr.prototype.TopmostPoint = function() { - var _i, _ref, cs, point, top; - cs = this; - top = vector.Vector.nil; - _ref = cs.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (top === vector.Vector.nil || (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) < (1 >= top.$length ? ($throwRuntimeError("index out of range"), undefined) : top.$array[top.$offset + 1])) { - top = point; - } - _i++; - } - return top; - }; - ContactSet.prototype.TopmostPoint = function() { return this.$val.TopmostPoint(); }; - ContactSet.ptr.prototype.BottommostPoint = function() { - var _i, _ref, bottom, cs, point; - cs = this; - bottom = vector.Vector.nil; - _ref = cs.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - point = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (bottom === vector.Vector.nil || (1 >= point.$length ? ($throwRuntimeError("index out of range"), undefined) : point.$array[point.$offset + 1]) > (1 >= bottom.$length ? ($throwRuntimeError("index out of range"), undefined) : bottom.$array[bottom.$offset + 1])) { - bottom = point; - } - _i++; - } - return bottom; - }; - ContactSet.prototype.BottommostPoint = function() { return this.$val.BottommostPoint(); }; - ConvexPolygon.ptr.prototype.Intersection = function(dx, dy, other) { - var {_i, _i$1, _i$2, _i$3, _r, _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, circle, contactSet, cp, deltaMagnitude, dx, dy, isCircle, isPoly, line, line$1, mtv, ogMagnitude, ogX, ogY, other, otherLine, point, point$1, poly, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {dx, dy, other}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cp = this; - contactSet = NewContactSet(); - ogX = cp.X; - ogY = cp.Y; - cp.X = cp.X + (dx); - cp.Y = cp.Y + (dy); - _tuple = $assertType(other, ptrType$4, true); - circle = _tuple[0]; - isCircle = _tuple[1]; - if (isCircle) { - _ref = cp.Lines(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - contactSet.Points = $appendSlice(contactSet.Points, line.IntersectionPointsCircle(circle)); - _i++; - } - } else { - _tuple$1 = $assertType(other, ptrType$5, true); - poly = _tuple$1[0]; - isPoly = _tuple$1[1]; - if (isPoly) { - _ref$1 = cp.Lines(); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - line$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _ref$2 = poly.Lines(); - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - otherLine = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - point = line$1.IntersectionPointsLine(otherLine); - if (!(point === vector.Vector.nil)) { - contactSet.Points = $append(contactSet.Points, point); - } - _i$2++; - } - _i$1++; - } - } - } - /* */ if (contactSet.Points.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (contactSet.Points.$length > 0) { */ case 1: - _ref$3 = contactSet.Points; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - point$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - contactSet.Center = contactSet.Center.Add(new sliceType$3([point$1])); - _i$3++; - } - (x$1 = contactSet.Center, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = (x = contactSet.Center, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) / ((contactSet.Points.$length)))); - (x$3 = contactSet.Center, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1] = (x$2 = contactSet.Center, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) / ((contactSet.Points.$length)))); - _r = cp.calculateMTV(contactSet, other); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - mtv = _r; - if (!(mtv === vector.Vector.nil)) { - contactSet.MTV = mtv; - } - $s = 3; continue; - /* } else { */ case 2: - contactSet = ptrType$6.nil; - /* } */ case 3: - if (!(contactSet === ptrType$6.nil) && (!((dx === 0)) || !((dy === 0)))) { - deltaMagnitude = new vector.Vector([dx, dy]).Magnitude(); - ogMagnitude = contactSet.MTV.Magnitude(); - contactSet.MTV = contactSet.MTV.Unit().Scale(ogMagnitude - deltaMagnitude); - } - cp.X = ogX; - cp.Y = ogY; - $s = -1; return contactSet; - /* */ } return; } var $f = {$blk: ConvexPolygon.ptr.prototype.Intersection, $c: true, $r, _i, _i$1, _i$2, _i$3, _r, _ref, _ref$1, _ref$2, _ref$3, _tuple, _tuple$1, circle, contactSet, cp, deltaMagnitude, dx, dy, isCircle, isPoly, line, line$1, mtv, ogMagnitude, ogX, ogY, other, otherLine, point, point$1, poly, x, x$1, x$2, x$3, $s};return $f; - }; - ConvexPolygon.prototype.Intersection = function(dx, dy, other) { return this.$val.Intersection(dx, dy, other); }; - ConvexPolygon.ptr.prototype.calculateMTV = function(contactSet, otherShape) { - var {_i, _i$1, _ref, _ref$1, _ref$2, axis, axis$1, center, contactSet, cp, delta, other, other$1, otherShape, overlap, overlap$1, smallest, verts, x, x$1, $s, $r, $c} = $restore(this, {contactSet, otherShape}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - center = [center]; - verts = [verts]; - cp = this; - delta = new vector.Vector([0, 0]); - smallest = new vector.Vector([1.7976931348623157e+308, 0]); - _ref = otherShape; - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$4, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$5, true)[1]) { */ case 1: - other = _ref.$val; - _ref$1 = cp.SATAxes(); - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - axis = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); - if (!$clone(cp.Project(axis), Projection).Overlapping($clone(other.Project(axis), Projection))) { - $s = -1; return vector.Vector.nil; - } - overlap = $clone(cp.Project(axis), Projection).Overlap($clone(other.Project(axis), Projection)); - if (smallest.Magnitude() > overlap) { - smallest = axis.Scale(overlap); - } - _i++; - } - _ref$2 = other.SATAxes(); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$2.$length)) { break; } - axis$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]); - if (!$clone(cp.Project(axis$1), Projection).Overlapping($clone(other.Project(axis$1), Projection))) { - $s = -1; return vector.Vector.nil; - } - overlap$1 = $clone(cp.Project(axis$1), Projection).Overlap($clone(other.Project(axis$1), Projection)); - if (smallest.Magnitude() > overlap$1) { - smallest = axis$1.Scale(overlap$1); - } - _i$1++; - } - $s = 3; continue; - /* } else if ($assertType(_ref, ptrType$4, true)[1]) { */ case 2: - other$1 = _ref.$val; - verts[0] = $appendSlice(new sliceType$3([]), cp.Transformed()); - verts[0] = $append(verts[0], contactSet.Center); - center[0] = new vector.Vector([other$1.X, other$1.Y]); - $r = sort.Slice(verts[0], (function(center, verts) { return function(i, j) { - var i, j; - return ((i < 0 || i >= verts[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : verts[0].$array[verts[0].$offset + i]).Sub(new sliceType$3([center[0]])).Magnitude() < ((j < 0 || j >= verts[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : verts[0].$array[verts[0].$offset + j]).Sub(new sliceType$3([center[0]])).Magnitude(); - }; })(center, verts)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - smallest = new vector.Vector([(0 >= center[0].$length ? ($throwRuntimeError("index out of range"), undefined) : center[0].$array[center[0].$offset + 0]) - (x = (0 >= verts[0].$length ? ($throwRuntimeError("index out of range"), undefined) : verts[0].$array[verts[0].$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), (1 >= center[0].$length ? ($throwRuntimeError("index out of range"), undefined) : center[0].$array[center[0].$offset + 1]) - (x$1 = (0 >= verts[0].$length ? ($throwRuntimeError("index out of range"), undefined) : verts[0].$array[verts[0].$offset + 0]), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))]); - smallest = smallest.Unit().Scale(smallest.Magnitude() - other$1.Radius); - /* } */ case 3: - (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = (0 >= smallest.$length ? ($throwRuntimeError("index out of range"), undefined) : smallest.$array[smallest.$offset + 0])); - (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = (1 >= smallest.$length ? ($throwRuntimeError("index out of range"), undefined) : smallest.$array[smallest.$offset + 1])); - $s = -1; return delta; - /* */ } return; } var $f = {$blk: ConvexPolygon.ptr.prototype.calculateMTV, $c: true, $r, _i, _i$1, _ref, _ref$1, _ref$2, axis, axis$1, center, contactSet, cp, delta, other, other$1, otherShape, overlap, overlap$1, smallest, verts, x, x$1, $s};return $f; - }; - ConvexPolygon.prototype.calculateMTV = function(contactSet, otherShape) { return this.$val.calculateMTV(contactSet, otherShape); }; - ConvexPolygon.ptr.prototype.ContainedBy = function(otherShape) { - var _i, _i$1, _ref, _ref$1, _ref$2, axis, axis$1, cp, other, otherShape; - cp = this; - _ref = otherShape; - if ($assertType(_ref, ptrType$5, true)[1]) { - other = _ref.$val; - _ref$1 = cp.SATAxes(); - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - axis = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); - if (!$clone(cp.Project(axis), Projection).IsInside($clone(other.Project(axis), Projection))) { - return false; - } - _i++; - } - _ref$2 = other.SATAxes(); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$2.$length)) { break; } - axis$1 = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]); - if (!$clone(cp.Project(axis$1), Projection).IsInside($clone(other.Project(axis$1), Projection))) { - return false; - } - _i$1++; - } - } - return true; - }; - ConvexPolygon.prototype.ContainedBy = function(otherShape) { return this.$val.ContainedBy(otherShape); }; - ConvexPolygon.ptr.prototype.FlipH = function() { - var _i, _ref, cp, v; - cp = this; - _ref = cp.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0] = -(0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])); - _i++; - } - cp.ReverseVertexOrder(); - }; - ConvexPolygon.prototype.FlipH = function() { return this.$val.FlipH(); }; - ConvexPolygon.ptr.prototype.FlipV = function() { - var _i, _ref, cp, v; - cp = this; - _ref = cp.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - (1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1] = -(1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1])); - _i++; - } - cp.ReverseVertexOrder(); - }; - ConvexPolygon.prototype.FlipV = function() { return this.$val.FlipV(); }; - ConvexPolygon.ptr.prototype.ReverseVertexOrder = function() { - var cp, i, verts, x, x$1; - cp = this; - verts = new sliceType$3([(x = cp.Points, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))]); - i = cp.Points.$length - 1 >> 0; - while (true) { - if (!(i >= 1)) { break; } - verts = $append(verts, (x$1 = cp.Points, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i]))); - i = i - (1) >> 0; - } - cp.Points = verts; - }; - ConvexPolygon.prototype.ReverseVertexOrder = function() { return this.$val.ReverseVertexOrder(); }; - NewRectangle = function(x, y, w, h) { - var h, w, x, y; - return NewConvexPolygon(new sliceType$4([x, y, x + w, y, x + w, y + h, x, y + h])); - }; - $pkg.NewRectangle = NewRectangle; - NewCircle = function(x, y, radius) { - var circle, radius, x, y; - circle = new Circle.ptr(x, y, radius); - return circle; - }; - $pkg.NewCircle = NewCircle; - Circle.ptr.prototype.Clone = function() { - var circle; - circle = this; - return NewCircle(circle.X, circle.Y, circle.Radius); - }; - Circle.prototype.Clone = function() { return this.$val.Clone(); }; - Circle.ptr.prototype.Bounds = function() { - var circle; - circle = this; - return [new vector.Vector([circle.X - circle.Radius, circle.Y - circle.Radius]), new vector.Vector([circle.X + circle.Radius, circle.Y + circle.Radius])]; - }; - Circle.prototype.Bounds = function() { return this.$val.Bounds(); }; - Circle.ptr.prototype.Intersection = function(dx, dy, other) { - var {_i, _r, _ref, _ref$1, circle, contactSet, dist, dx, dy, other, ox, oy, point, shape, shape$1, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {dx, dy, other}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - circle = this; - contactSet = ptrType$6.nil; - ox = circle.X; - oy = circle.Y; - circle.X = circle.X + (dx); - circle.Y = circle.Y + (dy); - _ref = other; - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$4, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$5, true)[1]) { */ case 1: - shape = _ref.$val; - _r = shape.Intersection(-dx, -dy, circle); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - contactSet = _r; - if (!(contactSet === ptrType$6.nil)) { - contactSet.MTV = contactSet.MTV.Scale(-1); - } - $s = 3; continue; - /* } else if ($assertType(_ref, ptrType$4, true)[1]) { */ case 2: - shape$1 = _ref.$val; - contactSet = NewContactSet(); - contactSet.Points = circle.IntersectionPointsCircle(shape$1); - if (contactSet.Points.$length === 0) { - $s = -1; return ptrType$6.nil; - } - contactSet.MTV = new vector.Vector([circle.X - shape$1.X, circle.Y - shape$1.Y]); - dist = contactSet.MTV.Magnitude(); - contactSet.MTV = contactSet.MTV.Unit().Scale(circle.Radius + shape$1.Radius - dist); - _ref$1 = contactSet.Points; - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - point = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); - contactSet.Center = contactSet.Center.Add(new sliceType$3([point])); - _i++; - } - (x$1 = contactSet.Center, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = (x = contactSet.Center, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) / ((contactSet.Points.$length)))); - (x$3 = contactSet.Center, (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1] = (x$2 = contactSet.Center, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) / ((contactSet.Points.$length)))); - /* } */ case 3: - circle.X = ox; - circle.Y = oy; - $s = -1; return contactSet; - /* */ } return; } var $f = {$blk: Circle.ptr.prototype.Intersection, $c: true, $r, _i, _r, _ref, _ref$1, circle, contactSet, dist, dx, dy, other, ox, oy, point, shape, shape$1, x, x$1, x$2, x$3, $s};return $f; - }; - Circle.prototype.Intersection = function(dx, dy, other) { return this.$val.Intersection(dx, dy, other); }; - Circle.ptr.prototype.Move = function(x, y) { - var circle, x, y; - circle = this; - circle.X = circle.X + (x); - circle.Y = circle.Y + (y); - }; - Circle.prototype.Move = function(x, y) { return this.$val.Move(x, y); }; - Circle.ptr.prototype.MoveVec = function(vec) { - var circle, vec; - circle = this; - circle.X = circle.X + (vec.X()); - circle.Y = circle.Y + (vec.Y()); - }; - Circle.prototype.MoveVec = function(vec) { return this.$val.MoveVec(vec); }; - Circle.ptr.prototype.SetPosition = function(x, y) { - var circle, x, y; - circle = this; - circle.X = x; - circle.Y = y; - }; - Circle.prototype.SetPosition = function(x, y) { return this.$val.SetPosition(x, y); }; - Circle.ptr.prototype.SetPositionVec = function(vec) { - var circle, vec; - circle = this; - circle.X = vec.X(); - circle.Y = vec.Y(); - }; - Circle.prototype.SetPositionVec = function(vec) { return this.$val.SetPositionVec(vec); }; - Circle.ptr.prototype.Position = function() { - var circle; - circle = this; - return [circle.X, circle.Y]; - }; - Circle.prototype.Position = function() { return this.$val.Position(); }; - Circle.ptr.prototype.PointInside = function(point) { - var circle, point; - circle = this; - return point.Sub(new sliceType$3([new vector.Vector([circle.X, circle.Y])])).Magnitude() <= circle.Radius; - }; - Circle.prototype.PointInside = function(point) { return this.$val.PointInside(point); }; - Circle.ptr.prototype.IntersectionPointsCircle = function(other) { - var a, circle, d, h, other, x2, y2; - circle = this; - d = math.Sqrt(math.Pow(other.X - circle.X, 2) + math.Pow(other.Y - circle.Y, 2)); - if (d > circle.Radius + other.Radius || d < math.Abs(circle.Radius - other.Radius) || (d === 0) && (circle.Radius === other.Radius)) { - return sliceType$3.nil; - } - a = (math.Pow(circle.Radius, 2) - math.Pow(other.Radius, 2) + math.Pow(d, 2)) / (2 * d); - h = math.Sqrt(math.Pow(circle.Radius, 2) - math.Pow(a, 2)); - x2 = circle.X + a * (other.X - circle.X) / d; - y2 = circle.Y + a * (other.Y - circle.Y) / d; - return new sliceType$3([new vector.Vector([x2 + h * (other.Y - circle.Y) / d, y2 - h * (other.X - circle.X) / d]), new vector.Vector([x2 - h * (other.Y - circle.Y) / d, y2 + h * (other.X - circle.X) / d])]); - }; - Circle.prototype.IntersectionPointsCircle = function(other) { return this.$val.IntersectionPointsCircle(other); }; - Projection.ptr.prototype.Overlapping = function(other) { - var other, projection; - projection = this; - return $clone(projection, Projection).Overlap($clone(other, Projection)) > 0; - }; - Projection.prototype.Overlapping = function(other) { return this.$val.Overlapping(other); }; - Projection.ptr.prototype.Overlap = function(other) { - var other, projection; - projection = this; - return math.Min(projection.Max, other.Max) - math.Max(projection.Min, other.Min); - }; - Projection.prototype.Overlap = function(other) { return this.$val.Overlap(other); }; - Projection.ptr.prototype.IsInside = function(other) { - var other, projection; - projection = this; - return projection.Min >= other.Min && projection.Max <= other.Max; - }; - Projection.prototype.IsInside = function(other) { return this.$val.IsInside(other); }; - NewObject = function(x, y, w, h, tags) { - var h, o, tags, w, x, y; - o = new Object.ptr($ifaceNil, ptrType$1.nil, x, y, w, h, sliceType.nil, $ifaceNil, $makeMap(ptrType$2.keyFor, []), new sliceType$6([])); - if (tags.$length > 0) { - o.AddTags(tags); - } - return o; - }; - $pkg.NewObject = NewObject; - Object.ptr.prototype.Clone = function() { - var {_entry, _i, _keys, _r, _ref, k, newObj, obj, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - obj = this; - newObj = NewObject(obj.X, obj.Y, obj.W, obj.H, obj.Tags()); - newObj.Data = obj.Data; - /* */ if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { */ case 1: - _r = obj.Shape.Clone(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = newObj.SetShape(_r); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _ref = obj.ignoreList; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - newObj.AddToIgnoreList(k); - _i++; - } - $s = -1; return newObj; - /* */ } return; } var $f = {$blk: Object.ptr.prototype.Clone, $c: true, $r, _entry, _i, _keys, _r, _ref, k, newObj, obj, $s};return $f; - }; - Object.prototype.Clone = function() { return this.$val.Clone(); }; - Object.ptr.prototype.Update = function() { - var {_tuple, c, cx, cy, ex, ey, obj, space, x, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - obj = this; - if (!(obj.Space === ptrType$1.nil)) { - space = obj.Space; - obj.Space.Remove(new sliceType$2([obj])); - obj.Space = space; - _tuple = obj.BoundsToSpace(0, 0); - cx = _tuple[0]; - cy = _tuple[1]; - ex = _tuple[2]; - ey = _tuple[3]; - y = cy; - while (true) { - if (!(y <= ey)) { break; } - x = cx; - while (true) { - if (!(x <= ex)) { break; } - c = obj.Space.Cell(x, y); - if (!(c === ptrType.nil)) { - c.register(obj); - obj.TouchingCells = $append(obj.TouchingCells, c); - } - x = x + (1) >> 0; - } - y = y + (1) >> 0; - } - } - /* */ if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(obj.Shape, $ifaceNil))) { */ case 1: - $r = obj.Shape.SetPosition(obj.X, obj.Y); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Object.ptr.prototype.Update, $c: true, $r, _tuple, c, cx, cy, ex, ey, obj, space, x, y, $s};return $f; - }; - Object.prototype.Update = function() { return this.$val.Update(); }; - Object.ptr.prototype.AddTags = function(tags) { - var obj, tags; - obj = this; - obj.tags = $appendSlice(obj.tags, tags); - }; - Object.prototype.AddTags = function(tags) { return this.$val.AddTags(tags); }; - Object.ptr.prototype.RemoveTags = function(tags) { - var _i, _i$1, _ref, _ref$1, i, obj, t, tag, tags; - obj = this; - _ref = tags; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - tag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = obj.tags; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - t = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (t === tag) { - obj.tags = $appendSlice($subslice(obj.tags, 0, i), $subslice(obj.tags, (i + 1 >> 0))); - break; - } - _i$1++; - } - _i++; - } - }; - Object.prototype.RemoveTags = function(tags) { return this.$val.RemoveTags(tags); }; - Object.ptr.prototype.HasTags = function(tags) { - var _i, _i$1, _ref, _ref$1, obj, t, tag, tags; - obj = this; - _ref = tags; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - tag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = obj.tags; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - t = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (t === tag) { - return true; - } - _i$1++; - } - _i++; - } - return false; - }; - Object.prototype.HasTags = function(tags) { return this.$val.HasTags(tags); }; - Object.ptr.prototype.Tags = function() { - var obj; - obj = this; - return $appendSlice(new sliceType$6([]), obj.tags); - }; - Object.prototype.Tags = function() { return this.$val.Tags(); }; - Object.ptr.prototype.SetShape = function(shape) { - var {obj, shape, $s, $r, $c} = $restore(this, {shape}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - obj = this; - /* */ if (!($interfaceIsEqual(obj.Shape, shape))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(obj.Shape, shape))) { */ case 1: - obj.Shape = shape; - $r = obj.Update(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Object.ptr.prototype.SetShape, $c: true, $r, obj, shape, $s};return $f; - }; - Object.prototype.SetShape = function(shape) { return this.$val.SetShape(shape); }; - Object.ptr.prototype.BoundsToSpace = function(dx, dy) { - var _tuple, _tuple$1, cx, cy, dx, dy, ex, ey, obj; - obj = this; - _tuple = obj.Space.WorldToSpace(obj.X + dx, obj.Y + dy); - cx = _tuple[0]; - cy = _tuple[1]; - _tuple$1 = obj.Space.WorldToSpace(obj.X + obj.W + dx - 1, obj.Y + obj.H + dy - 1); - ex = _tuple$1[0]; - ey = _tuple$1[1]; - return [cx, cy, ex, ey]; - }; - Object.prototype.BoundsToSpace = function(dx, dy) { return this.$val.BoundsToSpace(dx, dy); }; - Object.ptr.prototype.SharesCells = function(other) { - var _i, _ref, cell, obj, other; - obj = this; - _ref = obj.TouchingCells; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cell = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cell.Contains(other)) { - return true; - } - _i++; - } - return false; - }; - Object.prototype.SharesCells = function(other) { return this.$val.SharesCells(other); }; - Object.ptr.prototype.SharesCellsTags = function(tags) { - var _i, _ref, cell, obj, tags; - obj = this; - _ref = obj.TouchingCells; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cell = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cell.ContainsTags(tags)) { - return true; - } - _i++; - } - return false; - }; - Object.prototype.SharesCellsTags = function(tags) { return this.$val.SharesCellsTags(tags); }; - Object.ptr.prototype.Center = function() { - var obj; - obj = this; - return [obj.X + (obj.W / 2), obj.Y + (obj.H / 2)]; - }; - Object.prototype.Center = function() { return this.$val.Center(); }; - Object.ptr.prototype.SetCenter = function(x, y) { - var obj, x, y; - obj = this; - obj.X = x - (obj.W / 2); - obj.Y = y - (obj.H / 2); - }; - Object.prototype.SetCenter = function(x, y) { return this.$val.SetCenter(x, y); }; - Object.ptr.prototype.CellPosition = function() { - var _tuple, obj; - obj = this; - _tuple = obj.Center(); - return obj.Space.WorldToSpace(_tuple[0], _tuple[1]); - }; - Object.prototype.CellPosition = function() { return this.$val.CellPosition(); }; - Object.ptr.prototype.SetRight = function(x) { - var obj, x; - obj = this; - obj.X = x - obj.W; - }; - Object.prototype.SetRight = function(x) { return this.$val.SetRight(x); }; - Object.ptr.prototype.SetBottom = function(y) { - var obj, y; - obj = this; - obj.Y = y - obj.H; - }; - Object.prototype.SetBottom = function(y) { return this.$val.SetBottom(y); }; - Object.ptr.prototype.Bottom = function() { - var obj; - obj = this; - return obj.Y + obj.H; - }; - Object.prototype.Bottom = function() { return this.$val.Bottom(); }; - Object.ptr.prototype.Right = function() { - var obj; - obj = this; - return obj.X + obj.W; - }; - Object.prototype.Right = function() { return this.$val.Right(); }; - Object.ptr.prototype.SetBounds = function(topLeft, bottomRight) { - var bottomRight, obj, topLeft; - obj = this; - obj.X = (0 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 0]); - obj.Y = (1 >= topLeft.$length ? ($throwRuntimeError("index out of range"), undefined) : topLeft.$array[topLeft.$offset + 1]); - obj.W = (0 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 0]) - obj.X; - obj.H = (1 >= bottomRight.$length ? ($throwRuntimeError("index out of range"), undefined) : bottomRight.$array[bottomRight.$offset + 1]) - obj.Y; - }; - Object.prototype.SetBounds = function(topLeft, bottomRight) { return this.$val.SetBounds(topLeft, bottomRight); }; - Object.ptr.prototype.Check = function(dx, dy, tags) { - var {_entry, _entry$1, _entry$2, _i, _key, _key$1, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, added, added$1, c, cc, cellsAdded, ch, cw, cx, cy, dx, dy, ex, ey, ignored, o, obj, objectsAdded, oc, ox, oy, tags, x, y, $s, $r, $c} = $restore(this, {dx, dy, tags}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = [cc]; - ch = [ch]; - cw = [cw]; - oc = [oc]; - obj = this; - if (obj.Space === ptrType$1.nil) { - $s = -1; return ptrType$7.nil; - } - cc[0] = NewCollision(); - cc[0].checkingObject = obj; - if (dx < 0) { - dx = math.Min(dx, -1); - } else if (dx > 0) { - dx = math.Max(dx, 1); - } - if (dy < 0) { - dy = math.Min(dy, -1); - } else if (dy > 0) { - dy = math.Max(dy, 1); - } - cc[0].dx = dx; - cc[0].dy = dy; - _tuple = obj.BoundsToSpace(dx, dy); - cx = _tuple[0]; - cy = _tuple[1]; - ex = _tuple[2]; - ey = _tuple[3]; - objectsAdded = $makeMap(ptrType$2.keyFor, []); - cellsAdded = $makeMap(ptrType.keyFor, []); - y = cy; - while (true) { - if (!(y <= ey)) { break; } - x = cx; - while (true) { - if (!(x <= ex)) { break; } - c = obj.Space.Cell(x, y); - if (!(c === ptrType.nil)) { - _ref = c.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ignored = (_entry = obj.ignoreList[ptrType$2.keyFor(o)], _entry !== undefined ? _entry.v : false); - if (o === obj || ignored) { - _i++; - continue; - } - _tuple$1 = (_entry$1 = objectsAdded[ptrType$2.keyFor(o)], _entry$1 !== undefined ? [_entry$1.v, true] : [false, false]); - added = _tuple$1[1]; - if (((tags.$length === 0) || o.HasTags(tags)) && !added) { - cc[0].Objects = $append(cc[0].Objects, o); - _key = o; (objectsAdded || $throwRuntimeError("assignment to entry in nil map"))[ptrType$2.keyFor(_key)] = { k: _key, v: true }; - _tuple$2 = (_entry$2 = cellsAdded[ptrType.keyFor(c)], _entry$2 !== undefined ? [_entry$2.v, true] : [false, false]); - added$1 = _tuple$2[1]; - if (!added$1) { - cc[0].Cells = $append(cc[0].Cells, c); - _key$1 = c; (cellsAdded || $throwRuntimeError("assignment to entry in nil map"))[ptrType.keyFor(_key$1)] = { k: _key$1, v: true }; - } - _i++; - continue; - } - _i++; - } - } - x = x + (1) >> 0; - } - y = y + (1) >> 0; - } - if (cc[0].Objects.$length === 0) { - $s = -1; return ptrType$7.nil; - } - _tuple$3 = cc[0].checkingObject.Center(); - ox = _tuple$3[0]; - oy = _tuple$3[1]; - oc[0] = new vector.Vector([ox, oy]); - $r = sort.Slice(cc[0].Objects, (function(cc, ch, cw, oc) { return function(i, j) { - var _tuple$4, _tuple$5, i, ix, iy, j, jx, jy, x$1, x$2; - _tuple$4 = (x$1 = cc[0].Objects, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).Center(); - ix = _tuple$4[0]; - iy = _tuple$4[1]; - _tuple$5 = (x$2 = cc[0].Objects, ((j < 0 || j >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + j])).Center(); - jx = _tuple$5[0]; - jy = _tuple$5[1]; - return new vector.Vector([ix, iy]).Sub(new sliceType$3([oc[0]])).Magnitude() < new vector.Vector([jx, jy]).Sub(new sliceType$3([oc[0]])).Magnitude(); - }; })(cc, ch, cw, oc)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cw[0] = cc[0].checkingObject.Space.CellWidth; - ch[0] = cc[0].checkingObject.Space.CellHeight; - $r = sort.Slice(cc[0].Cells, (function(cc, ch, cw, oc) { return function(i, j) { - var _q, _q$1, _q$2, _q$3, i, j, x$1, x$2, x$3, x$4; - return new vector.Vector([((($imul((x$1 = cc[0].Cells, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).X, cw[0])) + ((_q = cw[0] / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0)), ((($imul((x$2 = cc[0].Cells, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])).Y, ch[0])) + ((_q$1 = ch[0] / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0))]).Sub(new sliceType$3([oc[0]])).Magnitude() < new vector.Vector([((($imul((x$3 = cc[0].Cells, ((j < 0 || j >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + j])).X, cw[0])) + ((_q$2 = cw[0] / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0)), ((($imul((x$4 = cc[0].Cells, ((j < 0 || j >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + j])).Y, ch[0])) + ((_q$3 = ch[0] / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0))]).Sub(new sliceType$3([oc[0]])).Magnitude(); - }; })(cc, ch, cw, oc)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return cc[0]; - /* */ } return; } var $f = {$blk: Object.ptr.prototype.Check, $c: true, $r, _entry, _entry$1, _entry$2, _i, _key, _key$1, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, added, added$1, c, cc, cellsAdded, ch, cw, cx, cy, dx, dy, ex, ey, ignored, o, obj, objectsAdded, oc, ox, oy, tags, x, y, $s};return $f; - }; - Object.prototype.Check = function(dx, dy, tags) { return this.$val.Check(dx, dy, tags); }; - Object.ptr.prototype.Overlaps = function(other) { - var obj, other; - obj = this; - return other.X <= obj.X + obj.W && other.X + other.W >= obj.X && other.Y <= obj.Y + obj.H && other.Y + other.H >= obj.Y; - }; - Object.prototype.Overlaps = function(other) { return this.$val.Overlaps(other); }; - Object.ptr.prototype.AddToIgnoreList = function(ignoreObj) { - var _key, ignoreObj, obj; - obj = this; - _key = ignoreObj; (obj.ignoreList || $throwRuntimeError("assignment to entry in nil map"))[ptrType$2.keyFor(_key)] = { k: _key, v: true }; - }; - Object.prototype.AddToIgnoreList = function(ignoreObj) { return this.$val.AddToIgnoreList(ignoreObj); }; - Object.ptr.prototype.RemoveFromIgnoreList = function(ignoreObj) { - var ignoreObj, obj; - obj = this; - delete obj.ignoreList[ptrType$2.keyFor(ignoreObj)]; - }; - Object.prototype.RemoveFromIgnoreList = function(ignoreObj) { return this.$val.RemoveFromIgnoreList(ignoreObj); }; - NewCollision = function() { - return new Collision.ptr(ptrType$2.nil, 0, 0, new sliceType$2([]), sliceType.nil); - }; - $pkg.NewCollision = NewCollision; - Collision.ptr.prototype.HasTags = function(tags) { - var _i, _ref, cc, o, tags; - cc = this; - _ref = cc.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (o === cc.checkingObject) { - _i++; - continue; - } - if (o.HasTags(tags)) { - return true; - } - _i++; - } - return false; - }; - Collision.prototype.HasTags = function(tags) { return this.$val.HasTags(tags); }; - Collision.ptr.prototype.ObjectsByTags = function(tags) { - var _i, _ref, cc, o, objects, tags; - cc = this; - objects = new sliceType$2([]); - _ref = cc.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (o === cc.checkingObject) { - _i++; - continue; - } - if (o.HasTags(tags)) { - objects = $append(objects, o); - } - _i++; - } - return objects; - }; - Collision.prototype.ObjectsByTags = function(tags) { return this.$val.ObjectsByTags(tags); }; - Collision.ptr.prototype.ContactWithObject = function(object) { - var cc, delta, object; - cc = this; - delta = new vector.Vector([0, 0]); - if (cc.dx < 0) { - (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = object.X + object.W - cc.checkingObject.X); - } else if (cc.dx > 0) { - (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = object.X - cc.checkingObject.W - cc.checkingObject.X); - } - if (cc.dy < 0) { - (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = object.Y + object.H - cc.checkingObject.Y); - } else if (cc.dy > 0) { - (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = object.Y - cc.checkingObject.H - cc.checkingObject.Y); - } - return delta; - }; - Collision.prototype.ContactWithObject = function(object) { return this.$val.ContactWithObject(object); }; - Collision.ptr.prototype.ContactWithCell = function(cell) { - var cc, cell, cx, cy, delta; - cc = this; - delta = new vector.Vector([0, 0]); - cx = (($imul(cell.X, cc.checkingObject.Space.CellWidth))); - cy = (($imul(cell.Y, cc.checkingObject.Space.CellHeight))); - if (cc.dx < 0) { - (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = cx + (cc.checkingObject.Space.CellWidth) - cc.checkingObject.X); - } else if (cc.dx > 0) { - (0 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 0] = cx - cc.checkingObject.W - cc.checkingObject.X); - } - if (cc.dy < 0) { - (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = cy + (cc.checkingObject.Space.CellHeight) - cc.checkingObject.Y); - } else if (cc.dy > 0) { - (1 >= delta.$length ? ($throwRuntimeError("index out of range"), undefined) : delta.$array[delta.$offset + 1] = cy - cc.checkingObject.H - cc.checkingObject.Y); - } - return delta; - }; - Collision.prototype.ContactWithCell = function(cell) { return this.$val.ContactWithCell(cell); }; - Collision.ptr.prototype.SlideAgainstCell = function(cell, avoidTags) { - var _tuple, _tuple$1, avoidTags, cc, ccX, ccY, cell, collidingCell, diffX, diffY, down, hX, hY, left, oX, oY, right, slide, sp, up, x; - cc = this; - sp = cc.checkingObject.Space; - collidingCell = (x = cc.Cells, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - _tuple = sp.SpaceToWorld(collidingCell.X, collidingCell.Y); - ccX = _tuple[0]; - ccY = _tuple[1]; - hX = (sp.CellWidth) / 2; - hY = (sp.CellHeight) / 2; - ccX = ccX + (hX); - ccY = ccY + (hY); - _tuple$1 = cc.checkingObject.Center(); - oX = _tuple$1[0]; - oY = _tuple$1[1]; - diffX = oX - ccX; - diffY = oY - ccY; - left = sp.Cell(collidingCell.X - 1 >> 0, collidingCell.Y); - right = sp.Cell(collidingCell.X + 1 >> 0, collidingCell.Y); - up = sp.Cell(collidingCell.X, collidingCell.Y - 1 >> 0); - down = sp.Cell(collidingCell.X, collidingCell.Y + 1 >> 0); - slide = new vector.Vector([0, 0]); - if (!((cc.dy === 0))) { - if (diffX > 0 && (right === ptrType.nil || !right.ContainsTags(avoidTags))) { - (0 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 0] = ccX + hX - cc.checkingObject.X); - } else if (diffX < 0 && (left === ptrType.nil || !left.ContainsTags(avoidTags))) { - (0 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 0] = ccX - hX - (cc.checkingObject.X + cc.checkingObject.W)); - } else { - return vector.Vector.nil; - } - } - if (!((cc.dx === 0))) { - if (diffY > 0 && (down === ptrType.nil || !down.ContainsTags(avoidTags))) { - (1 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 1] = ccY + hY - cc.checkingObject.Y); - } else if (diffY < 0 && (up === ptrType.nil || !up.ContainsTags(avoidTags))) { - (1 >= slide.$length ? ($throwRuntimeError("index out of range"), undefined) : slide.$array[slide.$offset + 1] = ccY - hY - (cc.checkingObject.Y + cc.checkingObject.H)); - } else { - return vector.Vector.nil; - } - } - return slide; - }; - Collision.prototype.SlideAgainstCell = function(cell, avoidTags) { return this.$val.SlideAgainstCell(cell, avoidTags); }; - newCell = function(x, y) { - var x, y; - return new Cell.ptr(x, y, new sliceType$2([])); - }; - Cell.ptr.prototype.register = function(obj) { - var cell, obj; - cell = this; - if (!cell.Contains(obj)) { - cell.Objects = $append(cell.Objects, obj); - } - }; - Cell.prototype.register = function(obj) { return this.$val.register(obj); }; - Cell.ptr.prototype.unregister = function(obj) { - var _i, _ref, cell, i, o, obj, x, x$1, x$2; - cell = this; - _ref = cell.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (o === obj) { - (x$2 = cell.Objects, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = (x = cell.Objects, x$1 = cell.Objects.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])))); - cell.Objects = $subslice(cell.Objects, 0, (cell.Objects.$length - 1 >> 0)); - break; - } - _i++; - } - }; - Cell.prototype.unregister = function(obj) { return this.$val.unregister(obj); }; - Cell.ptr.prototype.Contains = function(obj) { - var _i, _ref, cell, o, obj; - cell = this; - _ref = cell.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (o === obj) { - return true; - } - _i++; - } - return false; - }; - Cell.prototype.Contains = function(obj) { return this.$val.Contains(obj); }; - Cell.ptr.prototype.ContainsTags = function(tags) { - var _i, _ref, cell, o, tags; - cell = this; - _ref = cell.Objects; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - o = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (o.HasTags(tags)) { - return true; - } - _i++; - } - return false; - }; - Cell.prototype.ContainsTags = function(tags) { return this.$val.ContainsTags(tags); }; - Cell.ptr.prototype.Occupied = function() { - var cell; - cell = this; - return cell.Objects.$length > 0; - }; - Cell.prototype.Occupied = function() { return this.$val.Occupied(); }; - ptrType$1.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([sliceType$2], [], true)}, {prop: "Remove", name: "Remove", pkg: "", typ: $funcType([sliceType$2], [], true)}, {prop: "Objects", name: "Objects", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "Resize", name: "Resize", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Cell", name: "Cell", pkg: "", typ: $funcType([$Int, $Int], [ptrType], false)}, {prop: "CheckCells", name: "CheckCells", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int, sliceType$6], [ptrType$2], true)}, {prop: "UnregisterAllObjects", name: "UnregisterAllObjects", pkg: "", typ: $funcType([], [], false)}, {prop: "WorldToSpace", name: "WorldToSpace", pkg: "", typ: $funcType([$Float64, $Float64], [$Int, $Int], false)}, {prop: "SpaceToWorld", name: "SpaceToWorld", pkg: "", typ: $funcType([$Int, $Int], [$Float64, $Float64], false)}, {prop: "Height", name: "Height", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Width", name: "Width", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CellsInLine", name: "CellsInLine", pkg: "", typ: $funcType([$Int, $Int, $Int, $Int], [sliceType], false)}]; - ptrType$3.methods = [{prop: "Project", name: "Project", pkg: "", typ: $funcType([vector.Vector], [vector.Vector], false)}, {prop: "Normal", name: "Normal", pkg: "", typ: $funcType([], [vector.Vector], false)}, {prop: "Vector", name: "Vector", pkg: "", typ: $funcType([], [vector.Vector], false)}, {prop: "IntersectionPointsLine", name: "IntersectionPointsLine", pkg: "", typ: $funcType([ptrType$3], [vector.Vector], false)}, {prop: "IntersectionPointsCircle", name: "IntersectionPointsCircle", pkg: "", typ: $funcType([ptrType$4], [sliceType$3], false)}]; - ptrType$5.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Shape], false)}, {prop: "AddPointsVec", name: "AddPointsVec", pkg: "", typ: $funcType([sliceType$3], [], true)}, {prop: "AddPoints", name: "AddPoints", pkg: "", typ: $funcType([sliceType$4], [], true)}, {prop: "Lines", name: "Lines", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "Transformed", name: "Transformed", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [vector.Vector, vector.Vector], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "SetPosition", name: "SetPosition", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "SetPositionVec", name: "SetPositionVec", pkg: "", typ: $funcType([vector.Vector], [], false)}, {prop: "Move", name: "Move", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "MoveVec", name: "MoveVec", pkg: "", typ: $funcType([vector.Vector], [], false)}, {prop: "Center", name: "Center", pkg: "", typ: $funcType([], [vector.Vector], false)}, {prop: "Project", name: "Project", pkg: "", typ: $funcType([vector.Vector], [Projection], false)}, {prop: "SATAxes", name: "SATAxes", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "PointInside", name: "PointInside", pkg: "", typ: $funcType([vector.Vector], [$Bool], false)}, {prop: "Intersection", name: "Intersection", pkg: "", typ: $funcType([$Float64, $Float64, Shape], [ptrType$6], false)}, {prop: "calculateMTV", name: "calculateMTV", pkg: "github.com/solarlune/resolv", typ: $funcType([ptrType$6, Shape], [vector.Vector], false)}, {prop: "ContainedBy", name: "ContainedBy", pkg: "", typ: $funcType([Shape], [$Bool], false)}, {prop: "FlipH", name: "FlipH", pkg: "", typ: $funcType([], [], false)}, {prop: "FlipV", name: "FlipV", pkg: "", typ: $funcType([], [], false)}, {prop: "ReverseVertexOrder", name: "ReverseVertexOrder", pkg: "", typ: $funcType([], [], false)}]; - ptrType$6.methods = [{prop: "LeftmostPoint", name: "LeftmostPoint", pkg: "", typ: $funcType([], [vector.Vector], false)}, {prop: "RightmostPoint", name: "RightmostPoint", pkg: "", typ: $funcType([], [vector.Vector], false)}, {prop: "TopmostPoint", name: "TopmostPoint", pkg: "", typ: $funcType([], [vector.Vector], false)}, {prop: "BottommostPoint", name: "BottommostPoint", pkg: "", typ: $funcType([], [vector.Vector], false)}]; - ptrType$4.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Shape], false)}, {prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [vector.Vector, vector.Vector], false)}, {prop: "Intersection", name: "Intersection", pkg: "", typ: $funcType([$Float64, $Float64, Shape], [ptrType$6], false)}, {prop: "Move", name: "Move", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "MoveVec", name: "MoveVec", pkg: "", typ: $funcType([vector.Vector], [], false)}, {prop: "SetPosition", name: "SetPosition", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "SetPositionVec", name: "SetPositionVec", pkg: "", typ: $funcType([vector.Vector], [], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "PointInside", name: "PointInside", pkg: "", typ: $funcType([vector.Vector], [$Bool], false)}, {prop: "IntersectionPointsCircle", name: "IntersectionPointsCircle", pkg: "", typ: $funcType([ptrType$4], [sliceType$3], false)}]; - Projection.methods = [{prop: "Overlapping", name: "Overlapping", pkg: "", typ: $funcType([Projection], [$Bool], false)}, {prop: "Overlap", name: "Overlap", pkg: "", typ: $funcType([Projection], [$Float64], false)}, {prop: "IsInside", name: "IsInside", pkg: "", typ: $funcType([Projection], [$Bool], false)}]; - ptrType$2.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Update", name: "Update", pkg: "", typ: $funcType([], [], false)}, {prop: "AddTags", name: "AddTags", pkg: "", typ: $funcType([sliceType$6], [], true)}, {prop: "RemoveTags", name: "RemoveTags", pkg: "", typ: $funcType([sliceType$6], [], true)}, {prop: "HasTags", name: "HasTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "Tags", name: "Tags", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "SetShape", name: "SetShape", pkg: "", typ: $funcType([Shape], [], false)}, {prop: "BoundsToSpace", name: "BoundsToSpace", pkg: "", typ: $funcType([$Float64, $Float64], [$Int, $Int, $Int, $Int], false)}, {prop: "SharesCells", name: "SharesCells", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "SharesCellsTags", name: "SharesCellsTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "Center", name: "Center", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "SetCenter", name: "SetCenter", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}, {prop: "CellPosition", name: "CellPosition", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "SetRight", name: "SetRight", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "SetBottom", name: "SetBottom", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "Bottom", name: "Bottom", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Right", name: "Right", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "SetBounds", name: "SetBounds", pkg: "", typ: $funcType([vector.Vector, vector.Vector], [], false)}, {prop: "Check", name: "Check", pkg: "", typ: $funcType([$Float64, $Float64, sliceType$6], [ptrType$7], true)}, {prop: "Overlaps", name: "Overlaps", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "AddToIgnoreList", name: "AddToIgnoreList", pkg: "", typ: $funcType([ptrType$2], [], false)}, {prop: "RemoveFromIgnoreList", name: "RemoveFromIgnoreList", pkg: "", typ: $funcType([ptrType$2], [], false)}]; - ptrType$7.methods = [{prop: "HasTags", name: "HasTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "ObjectsByTags", name: "ObjectsByTags", pkg: "", typ: $funcType([sliceType$6], [sliceType$2], true)}, {prop: "ContactWithObject", name: "ContactWithObject", pkg: "", typ: $funcType([ptrType$2], [vector.Vector], false)}, {prop: "ContactWithCell", name: "ContactWithCell", pkg: "", typ: $funcType([ptrType], [vector.Vector], false)}, {prop: "SlideAgainstCell", name: "SlideAgainstCell", pkg: "", typ: $funcType([ptrType, sliceType$6], [vector.Vector], true)}]; - ptrType.methods = [{prop: "register", name: "register", pkg: "github.com/solarlune/resolv", typ: $funcType([ptrType$2], [], false)}, {prop: "unregister", name: "unregister", pkg: "github.com/solarlune/resolv", typ: $funcType([ptrType$2], [], false)}, {prop: "Contains", name: "Contains", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "ContainsTags", name: "ContainsTags", pkg: "", typ: $funcType([sliceType$6], [$Bool], true)}, {prop: "Occupied", name: "Occupied", pkg: "", typ: $funcType([], [$Bool], false)}]; - Space.init("", [{prop: "Cells", name: "Cells", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "CellWidth", name: "CellWidth", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "CellHeight", name: "CellHeight", embedded: false, exported: true, typ: $Int, tag: ""}]); - Shape.init([{prop: "Bounds", name: "Bounds", pkg: "", typ: $funcType([], [vector.Vector, vector.Vector], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Shape], false)}, {prop: "Intersection", name: "Intersection", pkg: "", typ: $funcType([$Float64, $Float64, Shape], [ptrType$6], false)}, {prop: "Position", name: "Position", pkg: "", typ: $funcType([], [$Float64, $Float64], false)}, {prop: "SetPosition", name: "SetPosition", pkg: "", typ: $funcType([$Float64, $Float64], [], false)}]); - Line.init("", [{prop: "Start", name: "Start", embedded: false, exported: true, typ: vector.Vector, tag: ""}, {prop: "End", name: "End", embedded: false, exported: true, typ: vector.Vector, tag: ""}]); - ConvexPolygon.init("", [{prop: "Points", name: "Points", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Closed", name: "Closed", embedded: false, exported: true, typ: $Bool, tag: ""}]); - ContactSet.init("", [{prop: "Points", name: "Points", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "MTV", name: "MTV", embedded: false, exported: true, typ: vector.Vector, tag: ""}, {prop: "Center", name: "Center", embedded: false, exported: true, typ: vector.Vector, tag: ""}]); - Circle.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Radius", name: "Radius", embedded: false, exported: true, typ: $Float64, tag: ""}]); - Projection.init("", [{prop: "Min", name: "Min", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Max", name: "Max", embedded: false, exported: true, typ: $Float64, tag: ""}]); - Object.init("github.com/solarlune/resolv", [{prop: "Shape", name: "Shape", embedded: false, exported: true, typ: Shape, tag: ""}, {prop: "Space", name: "Space", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "W", name: "W", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "H", name: "H", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "TouchingCells", name: "TouchingCells", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Data", name: "Data", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "ignoreList", name: "ignoreList", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "tags", name: "tags", embedded: false, exported: false, typ: sliceType$6, tag: ""}]); - Collision.init("github.com/solarlune/resolv", [{prop: "checkingObject", name: "checkingObject", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "dx", name: "dx", embedded: false, exported: false, typ: $Float64, tag: ""}, {prop: "dy", name: "dy", embedded: false, exported: false, typ: $Float64, tag: ""}, {prop: "Objects", name: "Objects", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Cells", name: "Cells", embedded: false, exported: true, typ: sliceType, tag: ""}]); - Cell.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Objects", name: "Objects", embedded: false, exported: true, typ: sliceType$2, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = vector.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["flag"] = (function() { - var $pkg = {}, $init, errors, fmt, io, os, reflect, sort, strconv, strings, time, boolValue, boolFlag, intValue, int64Value, uintValue, uint64Value, stringValue, float64Value, durationValue, funcValue, Value, ErrorHandling, FlagSet, Flag, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, sliceType$1, ptrType$11, ptrType$12, sliceType$2, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, sliceType$3, funcType, funcType$1, ptrType$20, funcType$2, mapType, errParse, errRange, x, numError, newBoolValue, newIntValue, newInt64Value, newUintValue, newUint64Value, newStringValue, newFloat64Value, newDurationValue, sortFlags, isZeroValue, UnquoteUsage, PrintDefaults, init, commandLineUsage, NewFlagSet; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - os = $packages["os"]; - reflect = $packages["reflect"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - time = $packages["time"]; - boolValue = $pkg.boolValue = $newType(1, $kindBool, "flag.boolValue", true, "flag", false, null); - boolFlag = $pkg.boolFlag = $newType(8, $kindInterface, "flag.boolFlag", true, "flag", false, null); - intValue = $pkg.intValue = $newType(4, $kindInt, "flag.intValue", true, "flag", false, null); - int64Value = $pkg.int64Value = $newType(8, $kindInt64, "flag.int64Value", true, "flag", false, null); - uintValue = $pkg.uintValue = $newType(4, $kindUint, "flag.uintValue", true, "flag", false, null); - uint64Value = $pkg.uint64Value = $newType(8, $kindUint64, "flag.uint64Value", true, "flag", false, null); - stringValue = $pkg.stringValue = $newType(8, $kindString, "flag.stringValue", true, "flag", false, null); - float64Value = $pkg.float64Value = $newType(8, $kindFloat64, "flag.float64Value", true, "flag", false, null); - durationValue = $pkg.durationValue = $newType(8, $kindInt64, "flag.durationValue", true, "flag", false, null); - funcValue = $pkg.funcValue = $newType(4, $kindFunc, "flag.funcValue", true, "flag", false, null); - Value = $pkg.Value = $newType(8, $kindInterface, "flag.Value", true, "flag", true, null); - ErrorHandling = $pkg.ErrorHandling = $newType(4, $kindInt, "flag.ErrorHandling", true, "flag", true, null); - FlagSet = $pkg.FlagSet = $newType(0, $kindStruct, "flag.FlagSet", true, "flag", true, function(Usage_, name_, parsed_, actual_, formal_, args_, errorHandling_, output_) { - this.$val = this; - if (arguments.length === 0) { - this.Usage = $throwNilPointerError; - this.name = ""; - this.parsed = false; - this.actual = false; - this.formal = false; - this.args = sliceType$3.nil; - this.errorHandling = 0; - this.output = $ifaceNil; - return; - } - this.Usage = Usage_; - this.name = name_; - this.parsed = parsed_; - this.actual = actual_; - this.formal = formal_; - this.args = args_; - this.errorHandling = errorHandling_; - this.output = output_; - }); - Flag = $pkg.Flag = $newType(0, $kindStruct, "flag.Flag", true, "flag", true, function(Name_, Usage_, Value_, DefValue_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.Usage = ""; - this.Value = $ifaceNil; - this.DefValue = ""; - return; - } - this.Name = Name_; - this.Usage = Usage_; - this.Value = Value_; - this.DefValue = DefValue_; - }); - sliceType = $sliceType($emptyInterface); - ptrType = $ptrType(strconv.NumError); - ptrType$1 = $ptrType(boolValue); - ptrType$2 = $ptrType(intValue); - ptrType$3 = $ptrType(int64Value); - ptrType$4 = $ptrType(uintValue); - ptrType$5 = $ptrType(uint64Value); - ptrType$6 = $ptrType(stringValue); - ptrType$7 = $ptrType(float64Value); - ptrType$8 = $ptrType(durationValue); - ptrType$9 = $ptrType(time.Duration); - ptrType$10 = $ptrType(Flag); - sliceType$1 = $sliceType(ptrType$10); - ptrType$11 = $ptrType(reflect.rtype); - ptrType$12 = $ptrType(strings.Builder); - sliceType$2 = $sliceType($Uint8); - ptrType$13 = $ptrType($Bool); - ptrType$14 = $ptrType($Int); - ptrType$15 = $ptrType($Int64); - ptrType$16 = $ptrType($Uint); - ptrType$17 = $ptrType($Uint64); - ptrType$18 = $ptrType($String); - ptrType$19 = $ptrType($Float64); - sliceType$3 = $sliceType($String); - funcType = $funcType([ptrType$10], [], false); - funcType$1 = $funcType([$String], [$error], false); - ptrType$20 = $ptrType(FlagSet); - funcType$2 = $funcType([], [], false); - mapType = $mapType($String, ptrType$10); - numError = function(err) { - var _tuple, err, ne, ok; - _tuple = $assertType(err, ptrType, true); - ne = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return err; - } - if ($interfaceIsEqual(ne.Err, strconv.ErrSyntax)) { - return errParse; - } - if ($interfaceIsEqual(ne.Err, strconv.ErrRange)) { - return errRange; - } - return err; - }; - newBoolValue = function(val, p) { - var _ptr, p, val; - p.$set(val); - return ((_ptr = p, new ptrType$1(function() { return _ptr.$get(); }, function($v) { _ptr.$set($v); }, _ptr.$target))); - }; - $ptrType(boolValue).prototype.Set = function(s) { - var _tuple, b, err, s, v; - b = this; - _tuple = strconv.ParseBool(s); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = errParse; - } - b.$set((v)); - return err; - }; - $ptrType(boolValue).prototype.Get = function() { - var b; - b = this; - return new $Bool((b.$get())); - }; - $ptrType(boolValue).prototype.String = function() { - var b; - b = this; - return strconv.FormatBool((b.$get())); - }; - $ptrType(boolValue).prototype.IsBoolFlag = function() { - var b; - b = this; - return true; - }; - newIntValue = function(val, p) { - var _ptr, p, val; - p.$set(val); - return ((_ptr = p, new ptrType$2(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target))); - }; - $ptrType(intValue).prototype.Set = function(s) { - var _tuple, err, i, s, v; - i = this; - _tuple = strconv.ParseInt(s, 0, 32); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = numError(err); - } - i.$set((((v.$low + ((v.$high >> 31) * 4294967296)) >> 0))); - return err; - }; - $ptrType(intValue).prototype.Get = function() { - var i; - i = this; - return new $Int(((i.$get() >> 0))); - }; - $ptrType(intValue).prototype.String = function() { - var i; - i = this; - return strconv.Itoa(((i.$get() >> 0))); - }; - newInt64Value = function(val, p) { - var _ptr, p, val, x$1; - p.$set(val); - return ((_ptr = p, new ptrType$3(function() { return (x$1 = _ptr.$get(), new int64Value(x$1.$high, x$1.$low)); }, function($v) { _ptr.$set(new $Int64($v.$high, $v.$low)); }, _ptr.$target))); - }; - $ptrType(int64Value).prototype.Set = function(s) { - var _tuple, err, i, s, v; - i = this; - _tuple = strconv.ParseInt(s, 0, 64); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = numError(err); - } - i.$set((new int64Value(v.$high, v.$low))); - return err; - }; - $ptrType(int64Value).prototype.Get = function() { - var i, x$1; - i = this; - return ((x$1 = i.$get(), new $Int64(x$1.$high, x$1.$low))); - }; - $ptrType(int64Value).prototype.String = function() { - var i, x$1; - i = this; - return strconv.FormatInt(((x$1 = i.$get(), new $Int64(x$1.$high, x$1.$low))), 10); - }; - newUintValue = function(val, p) { - var _ptr, p, val; - p.$set(val); - return ((_ptr = p, new ptrType$4(function() { return (_ptr.$get() >>> 0); }, function($v) { _ptr.$set(($v >>> 0)); }, _ptr.$target))); - }; - $ptrType(uintValue).prototype.Set = function(s) { - var _tuple, err, i, s, v; - i = this; - _tuple = strconv.ParseUint(s, 0, 32); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = numError(err); - } - i.$set(((v.$low >>> 0))); - return err; - }; - $ptrType(uintValue).prototype.Get = function() { - var i; - i = this; - return new $Uint(((i.$get() >>> 0))); - }; - $ptrType(uintValue).prototype.String = function() { - var i; - i = this; - return strconv.FormatUint((new $Uint64(0, i.$get())), 10); - }; - newUint64Value = function(val, p) { - var _ptr, p, val, x$1; - p.$set(val); - return ((_ptr = p, new ptrType$5(function() { return (x$1 = _ptr.$get(), new uint64Value(x$1.$high, x$1.$low)); }, function($v) { _ptr.$set(new $Uint64($v.$high, $v.$low)); }, _ptr.$target))); - }; - $ptrType(uint64Value).prototype.Set = function(s) { - var _tuple, err, i, s, v; - i = this; - _tuple = strconv.ParseUint(s, 0, 64); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = numError(err); - } - i.$set((new uint64Value(v.$high, v.$low))); - return err; - }; - $ptrType(uint64Value).prototype.Get = function() { - var i, x$1; - i = this; - return ((x$1 = i.$get(), new $Uint64(x$1.$high, x$1.$low))); - }; - $ptrType(uint64Value).prototype.String = function() { - var i, x$1; - i = this; - return strconv.FormatUint(((x$1 = i.$get(), new $Uint64(x$1.$high, x$1.$low))), 10); - }; - newStringValue = function(val, p) { - var _ptr, p, val; - p.$set(val); - return ((_ptr = p, new ptrType$6(function() { return _ptr.$get(); }, function($v) { _ptr.$set($v); }, _ptr.$target))); - }; - $ptrType(stringValue).prototype.Set = function(val) { - var s, val; - s = this; - s.$set((val)); - return $ifaceNil; - }; - $ptrType(stringValue).prototype.Get = function() { - var s; - s = this; - return new $String((s.$get())); - }; - $ptrType(stringValue).prototype.String = function() { - var s; - s = this; - return (s.$get()); - }; - newFloat64Value = function(val, p) { - var _ptr, p, val; - p.$set(val); - return ((_ptr = p, new ptrType$7(function() { return _ptr.$get(); }, function($v) { _ptr.$set($v); }, _ptr.$target))); - }; - $ptrType(float64Value).prototype.Set = function(s) { - var _tuple, err, f, s, v; - f = this; - _tuple = strconv.ParseFloat(s, 64); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = numError(err); - } - f.$set((v)); - return err; - }; - $ptrType(float64Value).prototype.Get = function() { - var f; - f = this; - return new $Float64((f.$get())); - }; - $ptrType(float64Value).prototype.String = function() { - var f; - f = this; - return strconv.FormatFloat((f.$get()), 103, -1, 64); - }; - newDurationValue = function(val, p) { - var _ptr, p, val, x$1; - p.$set(val); - return ((_ptr = p, new ptrType$8(function() { return (x$1 = _ptr.$get(), new durationValue(x$1.$high, x$1.$low)); }, function($v) { _ptr.$set(new time.Duration($v.$high, $v.$low)); }, _ptr.$target))); - }; - $ptrType(durationValue).prototype.Set = function(s) { - var _tuple, d, err, s, v; - d = this; - _tuple = time.ParseDuration(s); - v = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = errParse; - } - d.$set((new durationValue(v.$high, v.$low))); - return err; - }; - $ptrType(durationValue).prototype.Get = function() { - var d, x$1; - d = this; - return ((x$1 = d.$get(), new time.Duration(x$1.$high, x$1.$low))); - }; - $ptrType(durationValue).prototype.String = function() { - var _ptr, d, x$1; - d = this; - return ((_ptr = d, new ptrType$9(function() { return (x$1 = _ptr.$get(), new time.Duration(x$1.$high, x$1.$low)); }, function($v) { _ptr.$set(new durationValue($v.$high, $v.$low)); }, _ptr.$target))).String(); - }; - funcValue.prototype.Set = function(s) { - var {$24r, _r, f, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = f(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: funcValue.prototype.Set, $c: true, $r, $24r, _r, f, s, $s};return $f; - }; - $ptrType(funcValue).prototype.Set = function(s) { return new funcValue(this.$get()).Set(s); }; - funcValue.prototype.String = function() { - var f; - f = this.$val; - return ""; - }; - $ptrType(funcValue).prototype.String = function() { return new funcValue(this.$get()).String(); }; - sortFlags = function(flags) { - var {_entry, _i, _keys, _ref, f, flags, i, result, $s, $r, $c} = $restore(this, {flags}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - result = [result]; - result[0] = $makeSlice(sliceType$1, $keys(flags).length); - i = 0; - _ref = flags; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - f = _entry.v; - ((i < 0 || i >= result[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : result[0].$array[result[0].$offset + i] = f); - i = i + (1) >> 0; - _i++; - } - $r = sort.Slice(result[0], (function(result) { return function(i$1, j) { - var i$1, j; - return ((i$1 < 0 || i$1 >= result[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : result[0].$array[result[0].$offset + i$1]).Name < ((j < 0 || j >= result[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : result[0].$array[result[0].$offset + j]).Name; - }; })(result)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return result[0]; - /* */ } return; } var $f = {$blk: sortFlags, $c: true, $r, _entry, _i, _keys, _ref, f, flags, i, result, $s};return $f; - }; - FlagSet.ptr.prototype.Output = function() { - var f; - f = this; - if ($interfaceIsEqual(f.output, $ifaceNil)) { - return os.Stderr; - } - return f.output; - }; - FlagSet.prototype.Output = function() { return this.$val.Output(); }; - FlagSet.ptr.prototype.Name = function() { - var f; - f = this; - return f.name; - }; - FlagSet.prototype.Name = function() { return this.$val.Name(); }; - FlagSet.ptr.prototype.ErrorHandling = function() { - var f; - f = this; - return f.errorHandling; - }; - FlagSet.prototype.ErrorHandling = function() { return this.$val.ErrorHandling(); }; - FlagSet.ptr.prototype.SetOutput = function(output) { - var f, output; - f = this; - f.output = output; - }; - FlagSet.prototype.SetOutput = function(output) { return this.$val.SetOutput(output); }; - FlagSet.ptr.prototype.VisitAll = function(fn) { - var {_i, _r, _ref, f, flag, fn, $s, $r, $c} = $restore(this, {fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r = sortFlags(f.formal); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _ref = _r; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - flag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = fn(flag); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.VisitAll, $c: true, $r, _i, _r, _ref, f, flag, fn, $s};return $f; - }; - FlagSet.prototype.VisitAll = function(fn) { return this.$val.VisitAll(fn); }; - FlagSet.ptr.prototype.Visit = function(fn) { - var {_i, _r, _ref, f, flag, fn, $s, $r, $c} = $restore(this, {fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r = sortFlags(f.actual); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _ref = _r; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - flag = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = fn(flag); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Visit, $c: true, $r, _i, _r, _ref, f, flag, fn, $s};return $f; - }; - FlagSet.prototype.Visit = function(fn) { return this.$val.Visit(fn); }; - FlagSet.ptr.prototype.Lookup = function(name) { - var _entry, f, name; - f = this; - return (_entry = f.formal[$String.keyFor(name)], _entry !== undefined ? _entry.v : ptrType$10.nil); - }; - FlagSet.prototype.Lookup = function(name) { return this.$val.Lookup(name); }; - FlagSet.ptr.prototype.Set = function(name, value) { - var {$24r, _entry, _key, _r, _r$1, _tuple, err, f, flag, name, ok, value, $s, $r, $c} = $restore(this, {name, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _tuple = (_entry = f.formal[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - flag = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = fmt.Errorf("no such flag -%v", new sliceType([new $String(name)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = flag.Value.Set(value); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (f.actual === false) { - f.actual = {}; - } - _key = name; (f.actual || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: flag }; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Set, $c: true, $r, $24r, _entry, _key, _r, _r$1, _tuple, err, f, flag, name, ok, value, $s};return $f; - }; - FlagSet.prototype.Set = function(name, value) { return this.$val.Set(name, value); }; - isZeroValue = function(flag, value) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, flag, typ, value, z, $s, $r, $c} = $restore(this, {flag, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - typ = reflect.TypeOf(flag.Value); - z = new reflect.Value.ptr(ptrType$11.nil, 0, 0); - _r = typ.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r === 22) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r === 22) { */ case 1: - _r$1 = typ.Elem(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = reflect.New(_r$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z = _r$2; - $s = 3; continue; - /* } else { */ case 2: - _r$3 = reflect.Zero(typ); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - z = _r$3; - /* } */ case 3: - _r$4 = $clone(z, reflect.Value).Interface(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $assertType(_r$4, Value).String(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = value === _r$5; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: isZeroValue, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, flag, typ, value, z, $s};return $f; - }; - UnquoteUsage = function(flag) { - var _ref, _tmp, _tmp$1, flag, i, j, name, usage; - name = ""; - usage = ""; - usage = flag.Usage; - i = 0; - while (true) { - if (!(i < usage.length)) { break; } - if (usage.charCodeAt(i) === 96) { - j = i + 1 >> 0; - while (true) { - if (!(j < usage.length)) { break; } - if (usage.charCodeAt(j) === 96) { - name = $substring(usage, (i + 1 >> 0), j); - usage = $substring(usage, 0, i) + name + $substring(usage, (j + 1 >> 0)); - _tmp = name; - _tmp$1 = usage; - name = _tmp; - usage = _tmp$1; - return [name, usage]; - } - j = j + (1) >> 0; - } - break; - } - i = i + (1) >> 0; - } - name = "value"; - _ref = flag.Value; - if ($assertType(_ref, boolFlag, true)[1]) { - name = ""; - } else if ($assertType(_ref, ptrType$8, true)[1]) { - name = "duration"; - } else if ($assertType(_ref, ptrType$7, true)[1]) { - name = "float"; - } else if ($assertType(_ref, ptrType$2, true)[1] || $assertType(_ref, ptrType$3, true)[1]) { - name = "int"; - } else if ($assertType(_ref, ptrType$6, true)[1]) { - name = "string"; - } else if ($assertType(_ref, ptrType$4, true)[1] || $assertType(_ref, ptrType$5, true)[1]) { - name = "uint"; - } - return [name, usage]; - }; - $pkg.UnquoteUsage = UnquoteUsage; - FlagSet.ptr.prototype.PrintDefaults = function() { - var {f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = [f]; - f[0] = this; - $r = f[0].VisitAll((function(f) { return function $b(flag) { - var {_r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, b, flag, name, ok, usage, $s, $r, $c} = $restore(this, {flag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - b[0] = new strings.Builder.ptr(ptrType$12.nil, sliceType$2.nil); - _r = fmt.Fprintf(b[0], " -%s", new sliceType([new $String(flag.Name)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _tuple = UnquoteUsage(flag); - name = _tuple[0]; - usage = _tuple[1]; - if (name.length > 0) { - b[0].WriteString(" "); - b[0].WriteString(name); - } - if (b[0].Len() <= 4) { - b[0].WriteString("\t"); - } else { - b[0].WriteString("\n \t"); - } - b[0].WriteString(strings.ReplaceAll(usage, "\n", "\n \t")); - _r$1 = isZeroValue(flag, flag.DefValue); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!_r$1) { */ case 2: - _tuple$1 = $assertType(flag.Value, ptrType$6, true); - ok = _tuple$1[1]; - /* */ if (ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ok) { */ case 5: - _r$2 = fmt.Fprintf(b[0], " (default %q)", new sliceType([new $String(flag.DefValue)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = 7; continue; - /* } else { */ case 6: - _r$3 = fmt.Fprintf(b[0], " (default %v)", new sliceType([new $String(flag.DefValue)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 7: - /* } */ case 3: - _r$4 = fmt.Fprint(f[0].Output(), new sliceType([new $String(b[0].String()), new $String("\n")])); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, b, flag, name, ok, usage, $s};return $f; - }; })(f)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.PrintDefaults, $c: true, $r, f, $s};return $f; - }; - FlagSet.prototype.PrintDefaults = function() { return this.$val.PrintDefaults(); }; - PrintDefaults = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $pkg.CommandLine.PrintDefaults(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: PrintDefaults, $c: true, $r, $s};return $f; - }; - $pkg.PrintDefaults = PrintDefaults; - FlagSet.ptr.prototype.defaultUsage = function() { - var {_r, _r$1, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* */ if (f.name === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.name === "") { */ case 1: - _r = fmt.Fprintf(f.Output(), "Usage:\n", new sliceType([])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = 3; continue; - /* } else { */ case 2: - _r$1 = fmt.Fprintf(f.Output(), "Usage of %s:\n", new sliceType([new $String(f.name)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 3: - $r = f.PrintDefaults(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.defaultUsage, $c: true, $r, _r, _r$1, f, $s};return $f; - }; - FlagSet.prototype.defaultUsage = function() { return this.$val.defaultUsage(); }; - FlagSet.ptr.prototype.NFlag = function() { - var f; - f = this; - return $keys(f.actual).length; - }; - FlagSet.prototype.NFlag = function() { return this.$val.NFlag(); }; - FlagSet.ptr.prototype.Arg = function(i) { - var f, i, x$1; - f = this; - if (i < 0 || i >= f.args.$length) { - return ""; - } - return (x$1 = f.args, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])); - }; - FlagSet.prototype.Arg = function(i) { return this.$val.Arg(i); }; - FlagSet.ptr.prototype.NArg = function() { - var f; - f = this; - return f.args.$length; - }; - FlagSet.prototype.NArg = function() { return this.$val.NArg(); }; - FlagSet.ptr.prototype.Args = function() { - var f; - f = this; - return f.args; - }; - FlagSet.prototype.Args = function() { return this.$val.Args(); }; - FlagSet.ptr.prototype.BoolVar = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newBoolValue(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.BoolVar, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.BoolVar = function(p, name, value, usage) { return this.$val.BoolVar(p, name, value, usage); }; - FlagSet.ptr.prototype.Bool = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(false, ptrType$13); - $r = f.BoolVar(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Bool, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Bool = function(name, value, usage) { return this.$val.Bool(name, value, usage); }; - FlagSet.ptr.prototype.IntVar = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newIntValue(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.IntVar, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.IntVar = function(p, name, value, usage) { return this.$val.IntVar(p, name, value, usage); }; - FlagSet.ptr.prototype.Int = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(0, ptrType$14); - $r = f.IntVar(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Int, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Int = function(name, value, usage) { return this.$val.Int(name, value, usage); }; - FlagSet.ptr.prototype.Int64Var = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newInt64Value(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Int64Var, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Int64Var = function(p, name, value, usage) { return this.$val.Int64Var(p, name, value, usage); }; - FlagSet.ptr.prototype.Int64 = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(new $Int64(0, 0), ptrType$15); - $r = f.Int64Var(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Int64, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Int64 = function(name, value, usage) { return this.$val.Int64(name, value, usage); }; - FlagSet.ptr.prototype.UintVar = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newUintValue(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.UintVar, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.UintVar = function(p, name, value, usage) { return this.$val.UintVar(p, name, value, usage); }; - FlagSet.ptr.prototype.Uint = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(0, ptrType$16); - $r = f.UintVar(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Uint, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Uint = function(name, value, usage) { return this.$val.Uint(name, value, usage); }; - FlagSet.ptr.prototype.Uint64Var = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newUint64Value(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Uint64Var, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Uint64Var = function(p, name, value, usage) { return this.$val.Uint64Var(p, name, value, usage); }; - FlagSet.ptr.prototype.Uint64 = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(new $Uint64(0, 0), ptrType$17); - $r = f.Uint64Var(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Uint64, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Uint64 = function(name, value, usage) { return this.$val.Uint64(name, value, usage); }; - FlagSet.ptr.prototype.StringVar = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newStringValue(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.StringVar, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.StringVar = function(p, name, value, usage) { return this.$val.StringVar(p, name, value, usage); }; - FlagSet.ptr.prototype.String = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer("", ptrType$18); - $r = f.StringVar(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.String, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.String = function(name, value, usage) { return this.$val.String(name, value, usage); }; - FlagSet.ptr.prototype.Float64Var = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newFloat64Value(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Float64Var, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Float64Var = function(p, name, value, usage) { return this.$val.Float64Var(p, name, value, usage); }; - FlagSet.ptr.prototype.Float64 = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(0, ptrType$19); - $r = f.Float64Var(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Float64, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Float64 = function(name, value, usage) { return this.$val.Float64(name, value, usage); }; - FlagSet.ptr.prototype.DurationVar = function(p, name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {p, name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(newDurationValue(value, p), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.DurationVar, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.DurationVar = function(p, name, value, usage) { return this.$val.DurationVar(p, name, value, usage); }; - FlagSet.ptr.prototype.Duration = function(name, value, usage) { - var {f, name, p, usage, value, $s, $r, $c} = $restore(this, {name, value, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - p = $newDataPointer(new time.Duration(0, 0), ptrType$9); - $r = f.DurationVar(p, name, value, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return p; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Duration, $c: true, $r, f, name, p, usage, value, $s};return $f; - }; - FlagSet.prototype.Duration = function(name, value, usage) { return this.$val.Duration(name, value, usage); }; - FlagSet.ptr.prototype.Func = function(name, usage, fn) { - var {f, fn, name, usage, $s, $r, $c} = $restore(this, {name, usage, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $r = f.Var(new funcValue((fn)), name, usage); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Func, $c: true, $r, f, fn, name, usage, $s};return $f; - }; - FlagSet.prototype.Func = function(name, usage, fn) { return this.$val.Func(name, usage, fn); }; - FlagSet.ptr.prototype.Var = function(value, name, usage) { - var {_entry, _key, _r, _r$1, _r$2, _r$3, _r$4, _tuple, alreadythere, f, flag, msg, name, usage, value, $s, $r, $c} = $restore(this, {value, name, usage}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* */ if (strings.HasPrefix(name, "-")) { $s = 1; continue; } - /* */ if (strings.Contains(name, "=")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (strings.HasPrefix(name, "-")) { */ case 1: - _r = f.sprintf("flag %q begins with -", new sliceType([new $String(name)])); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - $s = 3; continue; - /* } else if (strings.Contains(name, "=")) { */ case 2: - _r$1 = f.sprintf("flag %q contains =", new sliceType([new $String(name)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 3: - _r$2 = value.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - flag = new Flag.ptr(name, usage, value, _r$2); - _tuple = (_entry = f.formal[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - alreadythere = _tuple[1]; - /* */ if (alreadythere) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (alreadythere) { */ case 7: - msg = ""; - /* */ if (f.name === "") { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (f.name === "") { */ case 9: - _r$3 = f.sprintf("flag redefined: %s", new sliceType([new $String(name)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - msg = _r$3; - $s = 11; continue; - /* } else { */ case 10: - _r$4 = f.sprintf("%s flag redefined: %s", new sliceType([new $String(f.name), new $String(name)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - msg = _r$4; - /* } */ case 11: - $panic(new $String(msg)); - /* } */ case 8: - if (f.formal === false) { - f.formal = {}; - } - _key = name; (f.formal || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: flag }; - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Var, $c: true, $r, _entry, _key, _r, _r$1, _r$2, _r$3, _r$4, _tuple, alreadythere, f, flag, msg, name, usage, value, $s};return $f; - }; - FlagSet.prototype.Var = function(value, name, usage) { return this.$val.Var(value, name, usage); }; - FlagSet.ptr.prototype.sprintf = function(format, a) { - var {_r, _r$1, a, f, format, msg, $s, $r, $c} = $restore(this, {format, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r = fmt.Sprintf(format, a); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - msg = _r; - _r$1 = fmt.Fprintln(f.Output(), new sliceType([new $String(msg)])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return msg; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.sprintf, $c: true, $r, _r, _r$1, a, f, format, msg, $s};return $f; - }; - FlagSet.prototype.sprintf = function(format, a) { return this.$val.sprintf(format, a); }; - FlagSet.ptr.prototype.failf = function(format, a) { - var {_r, a, f, format, msg, $s, $r, $c} = $restore(this, {format, a}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r = f.sprintf(format, a); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - msg = _r; - $r = f.usage(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return errors.New(msg); - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.failf, $c: true, $r, _r, a, f, format, msg, $s};return $f; - }; - FlagSet.prototype.failf = function(format, a) { return this.$val.failf(format, a); }; - FlagSet.ptr.prototype.usage = function() { - var {f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - /* */ if (f.Usage === $throwNilPointerError) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.Usage === $throwNilPointerError) { */ case 1: - $r = f.defaultUsage(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = f.Usage(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.usage, $c: true, $r, f, $s};return $f; - }; - FlagSet.prototype.usage = function() { return this.$val.usage(); }; - FlagSet.ptr.prototype.parseOne = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _entry, _key, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _v, alreadythere, err, err$1, err$2, f, flag, fv, hasValue, i, m, name, numMinuses, ok, s, value, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (f.args.$length === 0) { - $s = -1; return [false, $ifaceNil]; - } - s = (x$1 = f.args, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - if (s.length < 2 || !((s.charCodeAt(0) === 45))) { - $s = -1; return [false, $ifaceNil]; - } - numMinuses = 1; - if (s.charCodeAt(1) === 45) { - numMinuses = numMinuses + (1) >> 0; - if (s.length === 2) { - f.args = $subslice(f.args, 1); - $s = -1; return [false, $ifaceNil]; - } - } - name = $substring(s, numMinuses); - /* */ if ((name.length === 0) || (name.charCodeAt(0) === 45) || (name.charCodeAt(0) === 61)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((name.length === 0) || (name.charCodeAt(0) === 45) || (name.charCodeAt(0) === 61)) { */ case 1: - _r = f.failf("bad flag syntax: %s", new sliceType([new $String(s)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [false, _r]; - $s = 4; case 4: return $24r; - /* } */ case 2: - f.args = $subslice(f.args, 1); - hasValue = false; - value = ""; - i = 1; - while (true) { - if (!(i < name.length)) { break; } - if (name.charCodeAt(i) === 61) { - value = $substring(name, (i + 1 >> 0)); - hasValue = true; - name = $substring(name, 0, i); - break; - } - i = i + (1) >> 0; - } - m = f.formal; - _tuple = (_entry = m[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - flag = _tuple[0]; - alreadythere = _tuple[1]; - /* */ if (!alreadythere) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!alreadythere) { */ case 5: - /* */ if (name === "help" || name === "h") { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (name === "help" || name === "h") { */ case 7: - $r = f.usage(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [false, $pkg.ErrHelp]; - /* } */ case 8: - _r$1 = f.failf("flag provided but not defined: -%s", new sliceType([new $String(name)])); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = [false, _r$1]; - $s = 11; case 11: return $24r$1; - /* } */ case 6: - _tuple$1 = $assertType(flag.Value, boolFlag, true); - fv = _tuple$1[0]; - ok = _tuple$1[1]; - if (!(ok)) { _v = false; $s = 15; continue s; } - _r$2 = fv.IsBoolFlag(); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2; case 15: - /* */ if (_v) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_v) { */ case 12: - /* */ if (hasValue) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (hasValue) { */ case 17: - _r$3 = fv.Set(value); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 21: - _r$4 = f.failf("invalid boolean value %q for -%s: %v", new sliceType([new $String(value), new $String(name), err])); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = [false, _r$4]; - $s = 24; case 24: return $24r$2; - /* } */ case 22: - $s = 19; continue; - /* } else { */ case 18: - _r$5 = fv.Set("true"); /* */ $s = 25; case 25: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$1 = _r$5; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 26: - _r$6 = f.failf("invalid boolean flag %s: %v", new sliceType([new $String(name), err$1])); /* */ $s = 28; case 28: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = [false, _r$6]; - $s = 29; case 29: return $24r$3; - /* } */ case 27: - /* } */ case 19: - $s = 14; continue; - /* } else { */ case 13: - if (!hasValue && f.args.$length > 0) { - hasValue = true; - _tmp = (x$2 = f.args, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])); - _tmp$1 = $subslice(f.args, 1); - value = _tmp; - f.args = _tmp$1; - } - /* */ if (!hasValue) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!hasValue) { */ case 30: - _r$7 = f.failf("flag needs an argument: -%s", new sliceType([new $String(name)])); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$4 = [false, _r$7]; - $s = 33; case 33: return $24r$4; - /* } */ case 31: - _r$8 = flag.Value.Set(value); /* */ $s = 34; case 34: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 35: - _r$9 = f.failf("invalid value %q for flag -%s: %v", new sliceType([new $String(value), new $String(name), err$2])); /* */ $s = 37; case 37: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$5 = [false, _r$9]; - $s = 38; case 38: return $24r$5; - /* } */ case 36: - /* } */ case 14: - if (f.actual === false) { - f.actual = {}; - } - _key = name; (f.actual || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: flag }; - $s = -1; return [true, $ifaceNil]; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.parseOne, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _entry, _key, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _v, alreadythere, err, err$1, err$2, f, flag, fv, hasValue, i, m, name, numMinuses, ok, s, value, x$1, x$2, $s};return $f; - }; - FlagSet.prototype.parseOne = function() { return this.$val.parseOne(); }; - FlagSet.ptr.prototype.Parse = function(arguments$1) { - var {_1, _r, _tuple, arguments$1, err, f, seen, $s, $r, $c} = $restore(this, {arguments$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.parsed = true; - f.args = arguments$1; - /* while (true) { */ case 1: - _r = f.parseOne(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - seen = _tuple[0]; - err = _tuple[1]; - if (seen) { - /* continue; */ $s = 1; continue; - } - if ($interfaceIsEqual(err, $ifaceNil)) { - /* break; */ $s = 2; continue; - } - _1 = f.errorHandling; - /* */ if (_1 === (0)) { $s = 5; continue; } - /* */ if (_1 === (1)) { $s = 6; continue; } - /* */ if (_1 === (2)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (0)) { */ case 5: - $s = -1; return err; - /* } else if (_1 === (1)) { */ case 6: - /* */ if ($interfaceIsEqual(err, $pkg.ErrHelp)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(err, $pkg.ErrHelp)) { */ case 9: - $r = os.Exit(0); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - $r = os.Exit(2); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 8; continue; - /* } else if (_1 === (2)) { */ case 7: - $panic(err); - /* } */ case 8: - case 4: - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: FlagSet.ptr.prototype.Parse, $c: true, $r, _1, _r, _tuple, arguments$1, err, f, seen, $s};return $f; - }; - FlagSet.prototype.Parse = function(arguments$1) { return this.$val.Parse(arguments$1); }; - FlagSet.ptr.prototype.Parsed = function() { - var f; - f = this; - return f.parsed; - }; - FlagSet.prototype.Parsed = function() { return this.$val.Parsed(); }; - init = function() { - $pkg.CommandLine.Usage = commandLineUsage; - }; - commandLineUsage = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $pkg.Usage(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: commandLineUsage, $c: true, $r, $s};return $f; - }; - NewFlagSet = function(name, errorHandling) { - var errorHandling, f, name; - f = new FlagSet.ptr($throwNilPointerError, name, false, false, false, sliceType$3.nil, errorHandling, $ifaceNil); - f.Usage = $methodVal(f, "defaultUsage"); - return f; - }; - $pkg.NewFlagSet = NewFlagSet; - FlagSet.ptr.prototype.Init = function(name, errorHandling) { - var errorHandling, f, name; - f = this; - f.name = name; - f.errorHandling = errorHandling; - }; - FlagSet.prototype.Init = function(name, errorHandling) { return this.$val.Init(name, errorHandling); }; - ptrType$1.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsBoolFlag", name: "IsBoolFlag", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$2.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$3.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$4.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$5.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$6.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$7.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$8.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - funcValue.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$20.methods = [{prop: "Output", name: "Output", pkg: "", typ: $funcType([], [io.Writer], false)}, {prop: "Name", name: "Name", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ErrorHandling", name: "ErrorHandling", pkg: "", typ: $funcType([], [ErrorHandling], false)}, {prop: "SetOutput", name: "SetOutput", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "VisitAll", name: "VisitAll", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "Visit", name: "Visit", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "Lookup", name: "Lookup", pkg: "", typ: $funcType([$String], [ptrType$10], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "PrintDefaults", name: "PrintDefaults", pkg: "", typ: $funcType([], [], false)}, {prop: "defaultUsage", name: "defaultUsage", pkg: "flag", typ: $funcType([], [], false)}, {prop: "NFlag", name: "NFlag", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Arg", name: "Arg", pkg: "", typ: $funcType([$Int], [$String], false)}, {prop: "NArg", name: "NArg", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Args", name: "Args", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "BoolVar", name: "BoolVar", pkg: "", typ: $funcType([ptrType$13, $String, $Bool, $String], [], false)}, {prop: "Bool", name: "Bool", pkg: "", typ: $funcType([$String, $Bool, $String], [ptrType$13], false)}, {prop: "IntVar", name: "IntVar", pkg: "", typ: $funcType([ptrType$14, $String, $Int, $String], [], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([$String, $Int, $String], [ptrType$14], false)}, {prop: "Int64Var", name: "Int64Var", pkg: "", typ: $funcType([ptrType$15, $String, $Int64, $String], [], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([$String, $Int64, $String], [ptrType$15], false)}, {prop: "UintVar", name: "UintVar", pkg: "", typ: $funcType([ptrType$16, $String, $Uint, $String], [], false)}, {prop: "Uint", name: "Uint", pkg: "", typ: $funcType([$String, $Uint, $String], [ptrType$16], false)}, {prop: "Uint64Var", name: "Uint64Var", pkg: "", typ: $funcType([ptrType$17, $String, $Uint64, $String], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([$String, $Uint64, $String], [ptrType$17], false)}, {prop: "StringVar", name: "StringVar", pkg: "", typ: $funcType([ptrType$18, $String, $String, $String], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([$String, $String, $String], [ptrType$18], false)}, {prop: "Float64Var", name: "Float64Var", pkg: "", typ: $funcType([ptrType$19, $String, $Float64, $String], [], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([$String, $Float64, $String], [ptrType$19], false)}, {prop: "DurationVar", name: "DurationVar", pkg: "", typ: $funcType([ptrType$9, $String, time.Duration, $String], [], false)}, {prop: "Duration", name: "Duration", pkg: "", typ: $funcType([$String, time.Duration, $String], [ptrType$9], false)}, {prop: "Func", name: "Func", pkg: "", typ: $funcType([$String, $String, funcType$1], [], false)}, {prop: "Var", name: "Var", pkg: "", typ: $funcType([Value, $String, $String], [], false)}, {prop: "sprintf", name: "sprintf", pkg: "flag", typ: $funcType([$String, sliceType], [$String], true)}, {prop: "failf", name: "failf", pkg: "flag", typ: $funcType([$String, sliceType], [$error], true)}, {prop: "usage", name: "usage", pkg: "flag", typ: $funcType([], [], false)}, {prop: "parseOne", name: "parseOne", pkg: "flag", typ: $funcType([], [$Bool, $error], false)}, {prop: "Parse", name: "Parse", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "Parsed", name: "Parsed", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Init", name: "Init", pkg: "", typ: $funcType([$String, ErrorHandling], [], false)}]; - boolFlag.init([{prop: "IsBoolFlag", name: "IsBoolFlag", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); - funcValue.init([$String], [$error], false); - Value.init([{prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); - FlagSet.init("flag", [{prop: "Usage", name: "Usage", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "parsed", name: "parsed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "actual", name: "actual", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "formal", name: "formal", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "args", name: "args", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "errorHandling", name: "errorHandling", embedded: false, exported: false, typ: ErrorHandling, tag: ""}, {prop: "output", name: "output", embedded: false, exported: false, typ: io.Writer, tag: ""}]); - Flag.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Usage", name: "Usage", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: Value, tag: ""}, {prop: "DefValue", name: "DefValue", embedded: false, exported: true, typ: $String, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrHelp = errors.New("flag: help requested"); - errParse = errors.New("parse error"); - errRange = errors.New("value out of range"); - $pkg.CommandLine = NewFlagSet((x = os.Args, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), 1); - $pkg.Usage = (function $b() { - var {_r, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = fmt.Fprintf($pkg.CommandLine.Output(), "Usage of %s:\n", new sliceType([new $String((x$1 = os.Args, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])))])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $r = PrintDefaults(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, x$1, $s};return $f; - }); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/atomic"] = (function() { - var $pkg = {}, $init, math, atomic, time, Int32, Int64, Uint64, Bool, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$5, ptrType$6, ptrType$8, ptrType$9, NewInt32, truthy, boolToInt; - math = $packages["math"]; - atomic = $packages["sync/atomic"]; - time = $packages["time"]; - Int32 = $pkg.Int32 = $newType(0, $kindStruct, "atomic.Int32", true, "go.uber.org/atomic", true, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = 0; - return; - } - this.v = v_; - }); - Int64 = $pkg.Int64 = $newType(0, $kindStruct, "atomic.Int64", true, "go.uber.org/atomic", true, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = new $Int64(0, 0); - return; - } - this.v = v_; - }); - Uint64 = $pkg.Uint64 = $newType(0, $kindStruct, "atomic.Uint64", true, "go.uber.org/atomic", true, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = new $Uint64(0, 0); - return; - } - this.v = v_; - }); - Bool = $pkg.Bool = $newType(0, $kindStruct, "atomic.Bool", true, "go.uber.org/atomic", true, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = 0; - return; - } - this.v = v_; - }); - ptrType = $ptrType($Int32); - ptrType$1 = $ptrType($Int64); - ptrType$2 = $ptrType($Uint32); - ptrType$3 = $ptrType($Uint64); - ptrType$5 = $ptrType(Int32); - ptrType$6 = $ptrType(Int64); - ptrType$8 = $ptrType(Uint64); - ptrType$9 = $ptrType(Bool); - NewInt32 = function(i) { - var i; - return new Int32.ptr(i); - }; - $pkg.NewInt32 = NewInt32; - Int32.ptr.prototype.Load = function() { - var i; - i = this; - return atomic.LoadInt32((i.$ptr_v || (i.$ptr_v = new ptrType(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i)))); - }; - Int32.prototype.Load = function() { return this.$val.Load(); }; - Int32.ptr.prototype.Add = function(n) { - var i, n; - i = this; - return atomic.AddInt32((i.$ptr_v || (i.$ptr_v = new ptrType(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Int32.prototype.Add = function(n) { return this.$val.Add(n); }; - Int32.ptr.prototype.Sub = function(n) { - var i, n; - i = this; - return atomic.AddInt32((i.$ptr_v || (i.$ptr_v = new ptrType(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), -n); - }; - Int32.prototype.Sub = function(n) { return this.$val.Sub(n); }; - Int32.ptr.prototype.Inc = function() { - var i; - i = this; - return i.Add(1); - }; - Int32.prototype.Inc = function() { return this.$val.Inc(); }; - Int32.ptr.prototype.Dec = function() { - var i; - i = this; - return i.Sub(1); - }; - Int32.prototype.Dec = function() { return this.$val.Dec(); }; - Int32.ptr.prototype.CAS = function(old, new$1) { - var i, new$1, old; - i = this; - return atomic.CompareAndSwapInt32((i.$ptr_v || (i.$ptr_v = new ptrType(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), old, new$1); - }; - Int32.prototype.CAS = function(old, new$1) { return this.$val.CAS(old, new$1); }; - Int32.ptr.prototype.Store = function(n) { - var i, n; - i = this; - atomic.StoreInt32((i.$ptr_v || (i.$ptr_v = new ptrType(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Int32.prototype.Store = function(n) { return this.$val.Store(n); }; - Int32.ptr.prototype.Swap = function(n) { - var i, n; - i = this; - return atomic.SwapInt32((i.$ptr_v || (i.$ptr_v = new ptrType(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Int32.prototype.Swap = function(n) { return this.$val.Swap(n); }; - Int64.ptr.prototype.Load = function() { - var i; - i = this; - return atomic.LoadInt64((i.$ptr_v || (i.$ptr_v = new ptrType$1(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i)))); - }; - Int64.prototype.Load = function() { return this.$val.Load(); }; - Int64.ptr.prototype.Add = function(n) { - var i, n; - i = this; - return atomic.AddInt64((i.$ptr_v || (i.$ptr_v = new ptrType$1(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Int64.prototype.Add = function(n) { return this.$val.Add(n); }; - Int64.ptr.prototype.Sub = function(n) { - var i, n; - i = this; - return atomic.AddInt64((i.$ptr_v || (i.$ptr_v = new ptrType$1(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), new $Int64(-n.$high, -n.$low)); - }; - Int64.prototype.Sub = function(n) { return this.$val.Sub(n); }; - Int64.ptr.prototype.Inc = function() { - var i; - i = this; - return i.Add(new $Int64(0, 1)); - }; - Int64.prototype.Inc = function() { return this.$val.Inc(); }; - Int64.ptr.prototype.Dec = function() { - var i; - i = this; - return i.Sub(new $Int64(0, 1)); - }; - Int64.prototype.Dec = function() { return this.$val.Dec(); }; - Int64.ptr.prototype.CAS = function(old, new$1) { - var i, new$1, old; - i = this; - return atomic.CompareAndSwapInt64((i.$ptr_v || (i.$ptr_v = new ptrType$1(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), old, new$1); - }; - Int64.prototype.CAS = function(old, new$1) { return this.$val.CAS(old, new$1); }; - Int64.ptr.prototype.Store = function(n) { - var i, n; - i = this; - atomic.StoreInt64((i.$ptr_v || (i.$ptr_v = new ptrType$1(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Int64.prototype.Store = function(n) { return this.$val.Store(n); }; - Int64.ptr.prototype.Swap = function(n) { - var i, n; - i = this; - return atomic.SwapInt64((i.$ptr_v || (i.$ptr_v = new ptrType$1(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Int64.prototype.Swap = function(n) { return this.$val.Swap(n); }; - Uint64.ptr.prototype.Load = function() { - var i; - i = this; - return atomic.LoadUint64((i.$ptr_v || (i.$ptr_v = new ptrType$3(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i)))); - }; - Uint64.prototype.Load = function() { return this.$val.Load(); }; - Uint64.ptr.prototype.Add = function(n) { - var i, n; - i = this; - return atomic.AddUint64((i.$ptr_v || (i.$ptr_v = new ptrType$3(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Uint64.prototype.Add = function(n) { return this.$val.Add(n); }; - Uint64.ptr.prototype.Sub = function(n) { - var i, n, x; - i = this; - return atomic.AddUint64((i.$ptr_v || (i.$ptr_v = new ptrType$3(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), (x = new $Uint64(n.$high - 0, n.$low - 1), new $Uint64(~x.$high, ~x.$low >>> 0))); - }; - Uint64.prototype.Sub = function(n) { return this.$val.Sub(n); }; - Uint64.ptr.prototype.Inc = function() { - var i; - i = this; - return i.Add(new $Uint64(0, 1)); - }; - Uint64.prototype.Inc = function() { return this.$val.Inc(); }; - Uint64.ptr.prototype.Dec = function() { - var i; - i = this; - return i.Sub(new $Uint64(0, 1)); - }; - Uint64.prototype.Dec = function() { return this.$val.Dec(); }; - Uint64.ptr.prototype.CAS = function(old, new$1) { - var i, new$1, old; - i = this; - return atomic.CompareAndSwapUint64((i.$ptr_v || (i.$ptr_v = new ptrType$3(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), old, new$1); - }; - Uint64.prototype.CAS = function(old, new$1) { return this.$val.CAS(old, new$1); }; - Uint64.ptr.prototype.Store = function(n) { - var i, n; - i = this; - atomic.StoreUint64((i.$ptr_v || (i.$ptr_v = new ptrType$3(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Uint64.prototype.Store = function(n) { return this.$val.Store(n); }; - Uint64.ptr.prototype.Swap = function(n) { - var i, n; - i = this; - return atomic.SwapUint64((i.$ptr_v || (i.$ptr_v = new ptrType$3(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, i))), n); - }; - Uint64.prototype.Swap = function(n) { return this.$val.Swap(n); }; - Bool.ptr.prototype.Load = function() { - var b; - b = this; - return truthy(atomic.LoadUint32((b.$ptr_v || (b.$ptr_v = new ptrType$2(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, b))))); - }; - Bool.prototype.Load = function() { return this.$val.Load(); }; - Bool.ptr.prototype.CAS = function(old, new$1) { - var b, new$1, old; - b = this; - return atomic.CompareAndSwapUint32((b.$ptr_v || (b.$ptr_v = new ptrType$2(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, b))), boolToInt(old), boolToInt(new$1)); - }; - Bool.prototype.CAS = function(old, new$1) { return this.$val.CAS(old, new$1); }; - Bool.ptr.prototype.Store = function(new$1) { - var b, new$1; - b = this; - atomic.StoreUint32((b.$ptr_v || (b.$ptr_v = new ptrType$2(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, b))), boolToInt(new$1)); - }; - Bool.prototype.Store = function(new$1) { return this.$val.Store(new$1); }; - Bool.ptr.prototype.Swap = function(new$1) { - var b, new$1; - b = this; - return truthy(atomic.SwapUint32((b.$ptr_v || (b.$ptr_v = new ptrType$2(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, b))), boolToInt(new$1))); - }; - Bool.prototype.Swap = function(new$1) { return this.$val.Swap(new$1); }; - Bool.ptr.prototype.Toggle = function() { - var b; - b = this; - return truthy(atomic.AddUint32((b.$ptr_v || (b.$ptr_v = new ptrType$2(function() { return this.$target.v; }, function($v) { this.$target.v = $v; }, b))), 1) - 1 >>> 0); - }; - Bool.prototype.Toggle = function() { return this.$val.Toggle(); }; - truthy = function(n) { - var n; - return ((n & 1) >>> 0) === 1; - }; - boolToInt = function(b) { - var b; - if (b) { - return 1; - } - return 0; - }; - ptrType$5.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int32], [$Int32], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([$Int32], [$Int32], false)}, {prop: "Inc", name: "Inc", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "Dec", name: "Dec", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "CAS", name: "CAS", pkg: "", typ: $funcType([$Int32, $Int32], [$Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$Int32], [], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int32], [$Int32], false)}]; - ptrType$6.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$Int64], [$Int64], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([$Int64], [$Int64], false)}, {prop: "Inc", name: "Inc", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Dec", name: "Dec", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "CAS", name: "CAS", pkg: "", typ: $funcType([$Int64, $Int64], [$Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int64], [$Int64], false)}]; - ptrType$8.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$Uint64], [$Uint64], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([$Uint64], [$Uint64], false)}, {prop: "Inc", name: "Inc", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Dec", name: "Dec", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "CAS", name: "CAS", pkg: "", typ: $funcType([$Uint64, $Uint64], [$Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Uint64], [$Uint64], false)}]; - ptrType$9.methods = [{prop: "Load", name: "Load", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "CAS", name: "CAS", pkg: "", typ: $funcType([$Bool, $Bool], [$Bool], false)}, {prop: "Store", name: "Store", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Bool], [$Bool], false)}, {prop: "Toggle", name: "Toggle", pkg: "", typ: $funcType([], [$Bool], false)}]; - Int32.init("go.uber.org/atomic", [{prop: "v", name: "v", embedded: false, exported: false, typ: $Int32, tag: ""}]); - Int64.init("go.uber.org/atomic", [{prop: "v", name: "v", embedded: false, exported: false, typ: $Int64, tag: ""}]); - Uint64.init("go.uber.org/atomic", [{prop: "v", name: "v", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - Bool.init("go.uber.org/atomic", [{prop: "v", name: "v", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = math.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/multierr"] = (function() { - var $pkg = {}, $init, bytes, fmt, atomic, io, strings, sync, multiError, inspectResult, sliceType, sliceType$1, ptrType, sliceType$2, ptrType$1, _singlelineSeparator, _multilinePrefix, _multilineSeparator, _multilineIndent, _bufferPool, writePrefixLine, inspect, fromSlice, Append; - bytes = $packages["bytes"]; - fmt = $packages["fmt"]; - atomic = $packages["go.uber.org/atomic"]; - io = $packages["io"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - multiError = $pkg.multiError = $newType(0, $kindStruct, "multierr.multiError", true, "go.uber.org/multierr", false, function(copyNeeded_, errors_) { - this.$val = this; - if (arguments.length === 0) { - this.copyNeeded = new atomic.Bool.ptr(0); - this.errors = sliceType$2.nil; - return; - } - this.copyNeeded = copyNeeded_; - this.errors = errors_; - }); - inspectResult = $pkg.inspectResult = $newType(0, $kindStruct, "multierr.inspectResult", true, "go.uber.org/multierr", false, function(Count_, Capacity_, FirstErrorIdx_, ContainsMultiError_) { - this.$val = this; - if (arguments.length === 0) { - this.Count = 0; - this.Capacity = 0; - this.FirstErrorIdx = 0; - this.ContainsMultiError = false; - return; - } - this.Count = Count_; - this.Capacity = Capacity_; - this.FirstErrorIdx = FirstErrorIdx_; - this.ContainsMultiError = ContainsMultiError_; - }); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($emptyInterface); - ptrType = $ptrType(multiError); - sliceType$2 = $sliceType($error); - ptrType$1 = $ptrType(bytes.Buffer); - multiError.ptr.prototype.Errors = function() { - var merr; - merr = this; - if (merr === ptrType.nil) { - return sliceType$2.nil; - } - return merr.errors; - }; - multiError.prototype.Errors = function() { return this.$val.Errors(); }; - multiError.ptr.prototype.Error = function() { - var {_r, buff, merr, result, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - merr = this; - if (merr === ptrType.nil) { - $s = -1; return ""; - } - _r = _bufferPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buff = $assertType(_r, ptrType$1); - buff.Reset(); - $r = merr.writeSingleline(buff); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - result = buff.String(); - _bufferPool.Put(buff); - $s = -1; return result; - /* */ } return; } var $f = {$blk: multiError.ptr.prototype.Error, $c: true, $r, _r, buff, merr, result, $s};return $f; - }; - multiError.prototype.Error = function() { return this.$val.Error(); }; - multiError.ptr.prototype.Format = function(f, c) { - var {_r, _v, c, f, merr, $s, $r, $c} = $restore(this, {f, c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - merr = this; - if (!(c === 118)) { _v = false; $s = 4; continue s; } - _r = f.Flag(43); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 4: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $r = merr.writeMultiline(f); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = merr.writeSingleline(f); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: multiError.ptr.prototype.Format, $c: true, $r, _r, _v, c, f, merr, $s};return $f; - }; - multiError.prototype.Format = function(f, c) { return this.$val.Format(f, c); }; - multiError.ptr.prototype.writeSingleline = function(w) { - var {_arg, _arg$1, _i, _r, _r$1, _r$2, _ref, first, item, merr, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - merr = this; - first = true; - _ref = merr.errors; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - item = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (first) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (first) { */ case 3: - first = false; - $s = 5; continue; - /* } else { */ case 4: - _r = w.Write(_singlelineSeparator); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 5: - _arg = w; - _r$1 = item.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - _r$2 = io.WriteString(_arg, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: multiError.ptr.prototype.writeSingleline, $c: true, $r, _arg, _arg$1, _i, _r, _r$1, _r$2, _ref, first, item, merr, w, $s};return $f; - }; - multiError.prototype.writeSingleline = function(w) { return this.$val.writeSingleline(w); }; - multiError.ptr.prototype.writeMultiline = function(w) { - var {_arg, _arg$1, _arg$2, _i, _r, _r$1, _r$2, _ref, item, merr, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - merr = this; - _r = w.Write(_multilinePrefix); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _ref = merr.errors; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - item = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = w.Write(_multilineSeparator); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _arg = w; - _arg$1 = _multilineIndent; - _r$2 = fmt.Sprintf("%+v", new sliceType$1([item])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$2 = _r$2; - $r = writePrefixLine(_arg, _arg$1, _arg$2); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: multiError.ptr.prototype.writeMultiline, $c: true, $r, _arg, _arg$1, _arg$2, _i, _r, _r$1, _r$2, _ref, item, merr, w, $s};return $f; - }; - multiError.prototype.writeMultiline = function(w) { return this.$val.writeMultiline(w); }; - writePrefixLine = function(w, prefix, s) { - var {_r, _r$1, first, idx, prefix, s, w, $s, $r, $c} = $restore(this, {w, prefix, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - first = true; - /* while (true) { */ case 1: - /* if (!(s.length > 0)) { break; } */ if(!(s.length > 0)) { $s = 2; continue; } - /* */ if (first) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (first) { */ case 3: - first = false; - $s = 5; continue; - /* } else { */ case 4: - _r = w.Write(prefix); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 5: - idx = strings.IndexByte(s, 10); - if (idx < 0) { - idx = s.length - 1 >> 0; - } - _r$1 = io.WriteString(w, $substring(s, 0, (idx + 1 >> 0))); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - s = $substring(s, (idx + 1 >> 0)); - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: writePrefixLine, $c: true, $r, _r, _r$1, first, idx, prefix, s, w, $s};return $f; - }; - inspect = function(errors) { - var _i, _ref, _tuple, err, errors, first, i, merr, ok, res; - res = new inspectResult.ptr(0, 0, 0, false); - first = true; - _ref = errors; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - err = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ($interfaceIsEqual(err, $ifaceNil)) { - _i++; - continue; - } - res.Count = res.Count + (1) >> 0; - if (first) { - first = false; - res.FirstErrorIdx = i; - } - _tuple = $assertType(err, ptrType, true); - merr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - res.Capacity = res.Capacity + (merr.errors.$length) >> 0; - res.ContainsMultiError = true; - } else { - res.Capacity = res.Capacity + (1) >> 0; - } - _i++; - } - return res; - }; - fromSlice = function(errors) { - var _1, _i, _ref, _tuple, err, errors, nested, nonNilErrs, ok, res, x; - res = $clone(inspect(errors), inspectResult); - _1 = res.Count; - if (_1 === (0)) { - return $ifaceNil; - } else if (_1 === (1)) { - return (x = res.FirstErrorIdx, ((x < 0 || x >= errors.$length) ? ($throwRuntimeError("index out of range"), undefined) : errors.$array[errors.$offset + x])); - } else if (_1 === (errors.$length)) { - if (!res.ContainsMultiError) { - return new multiError.ptr(new atomic.Bool.ptr(0), errors); - } - } - nonNilErrs = $makeSlice(sliceType$2, 0, res.Capacity); - _ref = $subslice(errors, res.FirstErrorIdx); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - err = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ($interfaceIsEqual(err, $ifaceNil)) { - _i++; - continue; - } - _tuple = $assertType(err, ptrType, true); - nested = _tuple[0]; - ok = _tuple[1]; - if (ok) { - nonNilErrs = $appendSlice(nonNilErrs, nested.errors); - } else { - nonNilErrs = $append(nonNilErrs, err); - } - _i++; - } - return new multiError.ptr(new atomic.Bool.ptr(0), nonNilErrs); - }; - Append = function(left, right) { - var _tuple, _tuple$1, errors, errs, l, left, ok, ok$1, right; - if ($interfaceIsEqual(left, $ifaceNil)) { - return right; - } else if ($interfaceIsEqual(right, $ifaceNil)) { - return left; - } - _tuple = $assertType(right, ptrType, true); - ok = _tuple[1]; - if (!ok) { - _tuple$1 = $assertType(left, ptrType, true); - l = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1 && !l.copyNeeded.Swap(true)) { - errs = $append(l.errors, right); - return new multiError.ptr(new atomic.Bool.ptr(0), errs); - } else if (!ok$1) { - return new multiError.ptr(new atomic.Bool.ptr(0), new sliceType$2([left, right])); - } - } - errors = $toNativeArray($kindInterface, [left, right]); - return fromSlice($subslice(new sliceType$2(errors), 0)); - }; - $pkg.Append = Append; - ptrType.methods = [{prop: "Errors", name: "Errors", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "writeSingleline", name: "writeSingleline", pkg: "go.uber.org/multierr", typ: $funcType([io.Writer], [], false)}, {prop: "writeMultiline", name: "writeMultiline", pkg: "go.uber.org/multierr", typ: $funcType([io.Writer], [], false)}]; - multiError.init("go.uber.org/multierr", [{prop: "copyNeeded", name: "copyNeeded", embedded: false, exported: false, typ: atomic.Bool, tag: ""}, {prop: "errors", name: "errors", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - inspectResult.init("", [{prop: "Count", name: "Count", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Capacity", name: "Capacity", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "FirstErrorIdx", name: "FirstErrorIdx", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ContainsMultiError", name: "ContainsMultiError", embedded: false, exported: true, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _singlelineSeparator = (new sliceType($stringToBytes("; "))); - _multilinePrefix = (new sliceType($stringToBytes("the following errors occurred:"))); - _multilineSeparator = (new sliceType($stringToBytes("\n - "))); - _multilineIndent = (new sliceType($stringToBytes(" "))); - _bufferPool = new sync.Pool.ptr(sliceType$1.nil, (function() { - return new bytes.Buffer.ptr(sliceType.nil, 0, 0); - })); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/zap/buffer"] = (function() { - var $pkg = {}, $init, strconv, sync, Pool, Buffer, ptrType, sliceType, sliceType$1, ptrType$1, NewPool; - strconv = $packages["strconv"]; - sync = $packages["sync"]; - Pool = $pkg.Pool = $newType(0, $kindStruct, "buffer.Pool", true, "go.uber.org/zap/buffer", true, function(p_) { - this.$val = this; - if (arguments.length === 0) { - this.p = ptrType.nil; - return; - } - this.p = p_; - }); - Buffer = $pkg.Buffer = $newType(0, $kindStruct, "buffer.Buffer", true, "go.uber.org/zap/buffer", true, function(bs_, pool_) { - this.$val = this; - if (arguments.length === 0) { - this.bs = sliceType$1.nil; - this.pool = new Pool.ptr(ptrType.nil); - return; - } - this.bs = bs_; - this.pool = pool_; - }); - ptrType = $ptrType(sync.Pool); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - ptrType$1 = $ptrType(Buffer); - NewPool = function() { - return new Pool.ptr(new sync.Pool.ptr(sliceType.nil, (function() { - return new Buffer.ptr($makeSlice(sliceType$1, 0, 1024), new Pool.ptr(ptrType.nil)); - }))); - }; - $pkg.NewPool = NewPool; - Pool.ptr.prototype.Get = function() { - var {_r, buf, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.p.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buf = $assertType(_r, ptrType$1); - buf.Reset(); - Pool.copy(buf.pool, p); - $s = -1; return buf; - /* */ } return; } var $f = {$blk: Pool.ptr.prototype.Get, $c: true, $r, _r, buf, p, $s};return $f; - }; - Pool.prototype.Get = function() { return this.$val.Get(); }; - Pool.ptr.prototype.put = function(buf) { - var buf, p; - p = this; - p.p.Put(buf); - }; - Pool.prototype.put = function(buf) { return this.$val.put(buf); }; - Buffer.ptr.prototype.AppendByte = function(v) { - var b, v; - b = this; - b.bs = $append(b.bs, v); - }; - Buffer.prototype.AppendByte = function(v) { return this.$val.AppendByte(v); }; - Buffer.ptr.prototype.AppendString = function(s) { - var b, s; - b = this; - b.bs = $appendSlice(b.bs, s); - }; - Buffer.prototype.AppendString = function(s) { return this.$val.AppendString(s); }; - Buffer.ptr.prototype.AppendInt = function(i) { - var b, i; - b = this; - b.bs = strconv.AppendInt(b.bs, i, 10); - }; - Buffer.prototype.AppendInt = function(i) { return this.$val.AppendInt(i); }; - Buffer.ptr.prototype.AppendUint = function(i) { - var b, i; - b = this; - b.bs = strconv.AppendUint(b.bs, i, 10); - }; - Buffer.prototype.AppendUint = function(i) { return this.$val.AppendUint(i); }; - Buffer.ptr.prototype.AppendBool = function(v) { - var b, v; - b = this; - b.bs = strconv.AppendBool(b.bs, v); - }; - Buffer.prototype.AppendBool = function(v) { return this.$val.AppendBool(v); }; - Buffer.ptr.prototype.AppendFloat = function(f, bitSize) { - var b, bitSize, f; - b = this; - b.bs = strconv.AppendFloat(b.bs, f, 102, -1, bitSize); - }; - Buffer.prototype.AppendFloat = function(f, bitSize) { return this.$val.AppendFloat(f, bitSize); }; - Buffer.ptr.prototype.Len = function() { - var b; - b = this; - return b.bs.$length; - }; - Buffer.prototype.Len = function() { return this.$val.Len(); }; - Buffer.ptr.prototype.Cap = function() { - var b; - b = this; - return b.bs.$capacity; - }; - Buffer.prototype.Cap = function() { return this.$val.Cap(); }; - Buffer.ptr.prototype.Bytes = function() { - var b; - b = this; - return b.bs; - }; - Buffer.prototype.Bytes = function() { return this.$val.Bytes(); }; - Buffer.ptr.prototype.String = function() { - var b; - b = this; - return ($bytesToString(b.bs)); - }; - Buffer.prototype.String = function() { return this.$val.String(); }; - Buffer.ptr.prototype.Reset = function() { - var b; - b = this; - b.bs = $subslice(b.bs, 0, 0); - }; - Buffer.prototype.Reset = function() { return this.$val.Reset(); }; - Buffer.ptr.prototype.Write = function(bs) { - var b, bs; - b = this; - b.bs = $appendSlice(b.bs, bs); - return [bs.$length, $ifaceNil]; - }; - Buffer.prototype.Write = function(bs) { return this.$val.Write(bs); }; - Buffer.ptr.prototype.TrimNewline = function() { - var b, i, x; - b = this; - i = b.bs.$length - 1 >> 0; - if (i >= 0) { - if ((x = b.bs, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])) === 10) { - b.bs = $subslice(b.bs, 0, i); - } - } - }; - Buffer.prototype.TrimNewline = function() { return this.$val.TrimNewline(); }; - Buffer.ptr.prototype.Free = function() { - var b; - b = this; - $clone(b.pool, Pool).put(b); - }; - Buffer.prototype.Free = function() { return this.$val.Free(); }; - Pool.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "put", name: "put", pkg: "go.uber.org/zap/buffer", typ: $funcType([ptrType$1], [], false)}]; - ptrType$1.methods = [{prop: "AppendByte", name: "AppendByte", pkg: "", typ: $funcType([$Uint8], [], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "AppendInt", name: "AppendInt", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "AppendUint", name: "AppendUint", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "AppendBool", name: "AppendBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "AppendFloat", name: "AppendFloat", pkg: "", typ: $funcType([$Float64, $Int], [], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Cap", name: "Cap", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "TrimNewline", name: "TrimNewline", pkg: "", typ: $funcType([], [], false)}, {prop: "Free", name: "Free", pkg: "", typ: $funcType([], [], false)}]; - Pool.init("go.uber.org/zap/buffer", [{prop: "p", name: "p", embedded: false, exported: false, typ: ptrType, tag: ""}]); - Buffer.init("go.uber.org/zap/buffer", [{prop: "bs", name: "bs", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "pool", name: "pool", embedded: false, exported: false, typ: Pool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = strconv.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/zap/internal/bufferpool"] = (function() { - var $pkg = {}, $init, buffer, _pool; - buffer = $packages["go.uber.org/zap/buffer"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = buffer.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _pool = $clone(buffer.NewPool(), buffer.Pool); - $pkg.Get = $methodVal($clone(_pool, buffer.Pool), "Get"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/zap/internal/color"] = (function() { - var $pkg = {}, $init, fmt, Color, sliceType; - fmt = $packages["fmt"]; - Color = $pkg.Color = $newType(1, $kindUint8, "color.Color", true, "go.uber.org/zap/internal/color", true, null); - sliceType = $sliceType($emptyInterface); - Color.prototype.Add = function(s) { - var {$24r, _r, c, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this.$val; - _r = fmt.Sprintf("\x1B[%dm%s\x1B[0m", new sliceType([new $Uint8(((c << 24 >>> 24))), new $String(s)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Color.prototype.Add, $c: true, $r, $24r, _r, c, s, $s};return $f; - }; - $ptrType(Color).prototype.Add = function(s) { return new Color(this.$get()).Add(s); }; - Color.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String], [$String], false)}]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/zap/internal/exit"] = (function() { - var $pkg = {}, $init, os, real, Exit; - os = $packages["os"]; - Exit = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = real(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Exit, $c: true, $r, $s};return $f; - }; - $pkg.Exit = Exit; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = os.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - real = (function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = os.Exit(1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/zap/zapcore"] = (function() { - var $pkg = {}, $init, bytes, base64, json, errors, fmt, atomic, multierr, buffer, bufferpool, color, exit, io, math, reflect, strings, sync, time, utf8, WriteSyncer, lockedWriteSyncer, writerWrapper, multiWriteSyncer, counter, counters, sampler, MapObjectEncoder, sliceArrayEncoder, ObjectMarshaler, ArrayMarshaler, Level, LevelEnabler, jsonEncoder, FieldType, Field, errorGroup, errArray, errArrayElem, EntryCaller, Entry, CheckWriteAction, CheckedEntry, LevelEncoder, TimeEncoder, DurationEncoder, CallerEncoder, NameEncoder, EncoderConfig, ObjectEncoder, ArrayEncoder, PrimitiveArrayEncoder, Encoder, Core, nopCore, ioCore, consoleEncoder, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, sliceType$1, ptrType$4, sliceType$2, arrayType, arrayType$1, ptrType$5, mapType, sliceType$3, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, sliceType$5, ptrType$11, ptrType$12, ptrType$13, sliceType$6, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, ptrType$20, _levelToColor, _unknownLevelColor, _levelToLowercaseColorString, _levelToCapitalColorString, errUnmarshalNilLevel, _jsonPool, _errArrayElemPool, _cePool, _sliceEncoderPool, x, x$1, AddSync, Lock, NewMultiWriteSyncer, newCounters, fnv32a, NewSampler, NewMapObjectEncoder, init, getJSONEncoder, putJSONEncoder, NewJSONEncoder, newJSONEncoder, addFields, encodeError, newErrArrayElem, getCheckedEntry, putCheckedEntry, NewEntryCaller, LowercaseLevelEncoder, LowercaseColorLevelEncoder, CapitalLevelEncoder, CapitalColorLevelEncoder, EpochTimeEncoder, EpochMillisTimeEncoder, EpochNanosTimeEncoder, ISO8601TimeEncoder, SecondsDurationEncoder, NanosDurationEncoder, StringDurationEncoder, FullCallerEncoder, ShortCallerEncoder, FullNameEncoder, NewNopCore, NewCore, getSliceEncoder, putSliceEncoder, NewConsoleEncoder; - bytes = $packages["bytes"]; - base64 = $packages["encoding/base64"]; - json = $packages["encoding/json"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - atomic = $packages["go.uber.org/atomic"]; - multierr = $packages["go.uber.org/multierr"]; - buffer = $packages["go.uber.org/zap/buffer"]; - bufferpool = $packages["go.uber.org/zap/internal/bufferpool"]; - color = $packages["go.uber.org/zap/internal/color"]; - exit = $packages["go.uber.org/zap/internal/exit"]; - io = $packages["io"]; - math = $packages["math"]; - reflect = $packages["reflect"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - time = $packages["time"]; - utf8 = $packages["unicode/utf8"]; - WriteSyncer = $pkg.WriteSyncer = $newType(8, $kindInterface, "zapcore.WriteSyncer", true, "go.uber.org/zap/zapcore", true, null); - lockedWriteSyncer = $pkg.lockedWriteSyncer = $newType(0, $kindStruct, "zapcore.lockedWriteSyncer", true, "go.uber.org/zap/zapcore", false, function(Mutex_, ws_) { - this.$val = this; - if (arguments.length === 0) { - this.Mutex = new sync.Mutex.ptr(0, 0); - this.ws = $ifaceNil; - return; - } - this.Mutex = Mutex_; - this.ws = ws_; - }); - writerWrapper = $pkg.writerWrapper = $newType(0, $kindStruct, "zapcore.writerWrapper", true, "go.uber.org/zap/zapcore", false, function(Writer_) { - this.$val = this; - if (arguments.length === 0) { - this.Writer = $ifaceNil; - return; - } - this.Writer = Writer_; - }); - multiWriteSyncer = $pkg.multiWriteSyncer = $newType(12, $kindSlice, "zapcore.multiWriteSyncer", true, "go.uber.org/zap/zapcore", false, null); - counter = $pkg.counter = $newType(0, $kindStruct, "zapcore.counter", true, "go.uber.org/zap/zapcore", false, function(resetAt_, counter_) { - this.$val = this; - if (arguments.length === 0) { - this.resetAt = new atomic.Int64.ptr(new $Int64(0, 0)); - this.counter = new atomic.Uint64.ptr(new $Uint64(0, 0)); - return; - } - this.resetAt = resetAt_; - this.counter = counter_; - }); - counters = $pkg.counters = $newType(458752, $kindArray, "zapcore.counters", true, "go.uber.org/zap/zapcore", false, null); - sampler = $pkg.sampler = $newType(0, $kindStruct, "zapcore.sampler", true, "go.uber.org/zap/zapcore", false, function(Core_, counts_, tick_, first_, thereafter_) { - this.$val = this; - if (arguments.length === 0) { - this.Core = $ifaceNil; - this.counts = ptrType$5.nil; - this.tick = new time.Duration(0, 0); - this.first = new $Uint64(0, 0); - this.thereafter = new $Uint64(0, 0); - return; - } - this.Core = Core_; - this.counts = counts_; - this.tick = tick_; - this.first = first_; - this.thereafter = thereafter_; - }); - MapObjectEncoder = $pkg.MapObjectEncoder = $newType(0, $kindStruct, "zapcore.MapObjectEncoder", true, "go.uber.org/zap/zapcore", true, function(Fields_, cur_) { - this.$val = this; - if (arguments.length === 0) { - this.Fields = false; - this.cur = false; - return; - } - this.Fields = Fields_; - this.cur = cur_; - }); - sliceArrayEncoder = $pkg.sliceArrayEncoder = $newType(0, $kindStruct, "zapcore.sliceArrayEncoder", true, "go.uber.org/zap/zapcore", false, function(elems_) { - this.$val = this; - if (arguments.length === 0) { - this.elems = sliceType.nil; - return; - } - this.elems = elems_; - }); - ObjectMarshaler = $pkg.ObjectMarshaler = $newType(8, $kindInterface, "zapcore.ObjectMarshaler", true, "go.uber.org/zap/zapcore", true, null); - ArrayMarshaler = $pkg.ArrayMarshaler = $newType(8, $kindInterface, "zapcore.ArrayMarshaler", true, "go.uber.org/zap/zapcore", true, null); - Level = $pkg.Level = $newType(1, $kindInt8, "zapcore.Level", true, "go.uber.org/zap/zapcore", true, null); - LevelEnabler = $pkg.LevelEnabler = $newType(8, $kindInterface, "zapcore.LevelEnabler", true, "go.uber.org/zap/zapcore", true, null); - jsonEncoder = $pkg.jsonEncoder = $newType(0, $kindStruct, "zapcore.jsonEncoder", true, "go.uber.org/zap/zapcore", false, function(EncoderConfig_, buf_, spaced_, openNamespaces_, reflectBuf_, reflectEnc_) { - this.$val = this; - if (arguments.length === 0) { - this.EncoderConfig = ptrType.nil; - this.buf = ptrType$1.nil; - this.spaced = false; - this.openNamespaces = 0; - this.reflectBuf = ptrType$1.nil; - this.reflectEnc = ptrType$2.nil; - return; - } - this.EncoderConfig = EncoderConfig_; - this.buf = buf_; - this.spaced = spaced_; - this.openNamespaces = openNamespaces_; - this.reflectBuf = reflectBuf_; - this.reflectEnc = reflectEnc_; - }); - FieldType = $pkg.FieldType = $newType(1, $kindUint8, "zapcore.FieldType", true, "go.uber.org/zap/zapcore", true, null); - Field = $pkg.Field = $newType(0, $kindStruct, "zapcore.Field", true, "go.uber.org/zap/zapcore", true, function(Key_, Type_, Integer_, String_, Interface_) { - this.$val = this; - if (arguments.length === 0) { - this.Key = ""; - this.Type = 0; - this.Integer = new $Int64(0, 0); - this.String = ""; - this.Interface = $ifaceNil; - return; - } - this.Key = Key_; - this.Type = Type_; - this.Integer = Integer_; - this.String = String_; - this.Interface = Interface_; - }); - errorGroup = $pkg.errorGroup = $newType(8, $kindInterface, "zapcore.errorGroup", true, "go.uber.org/zap/zapcore", false, null); - errArray = $pkg.errArray = $newType(12, $kindSlice, "zapcore.errArray", true, "go.uber.org/zap/zapcore", false, null); - errArrayElem = $pkg.errArrayElem = $newType(0, $kindStruct, "zapcore.errArrayElem", true, "go.uber.org/zap/zapcore", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - return; - } - this.err = err_; - }); - EntryCaller = $pkg.EntryCaller = $newType(0, $kindStruct, "zapcore.EntryCaller", true, "go.uber.org/zap/zapcore", true, function(Defined_, PC_, File_, Line_) { - this.$val = this; - if (arguments.length === 0) { - this.Defined = false; - this.PC = 0; - this.File = ""; - this.Line = 0; - return; - } - this.Defined = Defined_; - this.PC = PC_; - this.File = File_; - this.Line = Line_; - }); - Entry = $pkg.Entry = $newType(0, $kindStruct, "zapcore.Entry", true, "go.uber.org/zap/zapcore", true, function(Level_, Time_, LoggerName_, Message_, Caller_, Stack_) { - this.$val = this; - if (arguments.length === 0) { - this.Level = 0; - this.Time = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil); - this.LoggerName = ""; - this.Message = ""; - this.Caller = new EntryCaller.ptr(false, 0, "", 0); - this.Stack = ""; - return; - } - this.Level = Level_; - this.Time = Time_; - this.LoggerName = LoggerName_; - this.Message = Message_; - this.Caller = Caller_; - this.Stack = Stack_; - }); - CheckWriteAction = $pkg.CheckWriteAction = $newType(1, $kindUint8, "zapcore.CheckWriteAction", true, "go.uber.org/zap/zapcore", true, null); - CheckedEntry = $pkg.CheckedEntry = $newType(0, $kindStruct, "zapcore.CheckedEntry", true, "go.uber.org/zap/zapcore", true, function(Entry_, ErrorOutput_, dirty_, should_, cores_) { - this.$val = this; - if (arguments.length === 0) { - this.Entry = new Entry.ptr(0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil), "", "", new EntryCaller.ptr(false, 0, "", 0), ""); - this.ErrorOutput = $ifaceNil; - this.dirty = false; - this.should = 0; - this.cores = sliceType$1.nil; - return; - } - this.Entry = Entry_; - this.ErrorOutput = ErrorOutput_; - this.dirty = dirty_; - this.should = should_; - this.cores = cores_; - }); - LevelEncoder = $pkg.LevelEncoder = $newType(4, $kindFunc, "zapcore.LevelEncoder", true, "go.uber.org/zap/zapcore", true, null); - TimeEncoder = $pkg.TimeEncoder = $newType(4, $kindFunc, "zapcore.TimeEncoder", true, "go.uber.org/zap/zapcore", true, null); - DurationEncoder = $pkg.DurationEncoder = $newType(4, $kindFunc, "zapcore.DurationEncoder", true, "go.uber.org/zap/zapcore", true, null); - CallerEncoder = $pkg.CallerEncoder = $newType(4, $kindFunc, "zapcore.CallerEncoder", true, "go.uber.org/zap/zapcore", true, null); - NameEncoder = $pkg.NameEncoder = $newType(4, $kindFunc, "zapcore.NameEncoder", true, "go.uber.org/zap/zapcore", true, null); - EncoderConfig = $pkg.EncoderConfig = $newType(0, $kindStruct, "zapcore.EncoderConfig", true, "go.uber.org/zap/zapcore", true, function(MessageKey_, LevelKey_, TimeKey_, NameKey_, CallerKey_, StacktraceKey_, LineEnding_, EncodeLevel_, EncodeTime_, EncodeDuration_, EncodeCaller_, EncodeName_) { - this.$val = this; - if (arguments.length === 0) { - this.MessageKey = ""; - this.LevelKey = ""; - this.TimeKey = ""; - this.NameKey = ""; - this.CallerKey = ""; - this.StacktraceKey = ""; - this.LineEnding = ""; - this.EncodeLevel = $throwNilPointerError; - this.EncodeTime = $throwNilPointerError; - this.EncodeDuration = $throwNilPointerError; - this.EncodeCaller = $throwNilPointerError; - this.EncodeName = $throwNilPointerError; - return; - } - this.MessageKey = MessageKey_; - this.LevelKey = LevelKey_; - this.TimeKey = TimeKey_; - this.NameKey = NameKey_; - this.CallerKey = CallerKey_; - this.StacktraceKey = StacktraceKey_; - this.LineEnding = LineEnding_; - this.EncodeLevel = EncodeLevel_; - this.EncodeTime = EncodeTime_; - this.EncodeDuration = EncodeDuration_; - this.EncodeCaller = EncodeCaller_; - this.EncodeName = EncodeName_; - }); - ObjectEncoder = $pkg.ObjectEncoder = $newType(8, $kindInterface, "zapcore.ObjectEncoder", true, "go.uber.org/zap/zapcore", true, null); - ArrayEncoder = $pkg.ArrayEncoder = $newType(8, $kindInterface, "zapcore.ArrayEncoder", true, "go.uber.org/zap/zapcore", true, null); - PrimitiveArrayEncoder = $pkg.PrimitiveArrayEncoder = $newType(8, $kindInterface, "zapcore.PrimitiveArrayEncoder", true, "go.uber.org/zap/zapcore", true, null); - Encoder = $pkg.Encoder = $newType(8, $kindInterface, "zapcore.Encoder", true, "go.uber.org/zap/zapcore", true, null); - Core = $pkg.Core = $newType(8, $kindInterface, "zapcore.Core", true, "go.uber.org/zap/zapcore", true, null); - nopCore = $pkg.nopCore = $newType(0, $kindStruct, "zapcore.nopCore", true, "go.uber.org/zap/zapcore", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - ioCore = $pkg.ioCore = $newType(0, $kindStruct, "zapcore.ioCore", true, "go.uber.org/zap/zapcore", false, function(LevelEnabler_, enc_, out_) { - this.$val = this; - if (arguments.length === 0) { - this.LevelEnabler = $ifaceNil; - this.enc = $ifaceNil; - this.out = $ifaceNil; - return; - } - this.LevelEnabler = LevelEnabler_; - this.enc = enc_; - this.out = out_; - }); - consoleEncoder = $pkg.consoleEncoder = $newType(0, $kindStruct, "zapcore.consoleEncoder", true, "go.uber.org/zap/zapcore", false, function(jsonEncoder_) { - this.$val = this; - if (arguments.length === 0) { - this.jsonEncoder = ptrType$7.nil; - return; - } - this.jsonEncoder = jsonEncoder_; - }); - sliceType = $sliceType($emptyInterface); - ptrType = $ptrType(EncoderConfig); - ptrType$1 = $ptrType(buffer.Buffer); - ptrType$2 = $ptrType(json.Encoder); - ptrType$3 = $ptrType(time.Location); - sliceType$1 = $sliceType(Core); - ptrType$4 = $ptrType(lockedWriteSyncer); - sliceType$2 = $sliceType(WriteSyncer); - arrayType = $arrayType(counter, 4096); - arrayType$1 = $arrayType(arrayType, 7); - ptrType$5 = $ptrType(counters); - mapType = $mapType($String, $emptyInterface); - sliceType$3 = $sliceType($Uint8); - ptrType$6 = $ptrType(Level); - ptrType$7 = $ptrType(jsonEncoder); - ptrType$8 = $ptrType(CheckedEntry); - ptrType$9 = $ptrType(errArrayElem); - ptrType$10 = $ptrType(sliceArrayEncoder); - sliceType$5 = $sliceType(Field); - ptrType$11 = $ptrType(counter); - ptrType$12 = $ptrType(sampler); - ptrType$13 = $ptrType(MapObjectEncoder); - sliceType$6 = $sliceType($error); - ptrType$15 = $ptrType(LevelEncoder); - ptrType$16 = $ptrType(TimeEncoder); - ptrType$17 = $ptrType(DurationEncoder); - ptrType$18 = $ptrType(CallerEncoder); - ptrType$19 = $ptrType(NameEncoder); - ptrType$20 = $ptrType(ioCore); - AddSync = function(w) { - var _ref, w, w$1, w$2, x$2; - _ref = w; - if ($assertType(_ref, WriteSyncer, true)[1]) { - w$1 = _ref; - return w$1; - } else { - w$2 = _ref; - return (x$2 = new writerWrapper.ptr(w$2), new x$2.constructor.elem(x$2)); - } - }; - $pkg.AddSync = AddSync; - Lock = function(ws) { - var _tuple, ok, ws; - _tuple = $assertType(ws, ptrType$4, true); - ok = _tuple[1]; - if (ok) { - return ws; - } - return new lockedWriteSyncer.ptr(new sync.Mutex.ptr(0, 0), ws); - }; - $pkg.Lock = Lock; - lockedWriteSyncer.ptr.prototype.Write = function(bs) { - var {_r, _tuple, bs, err, n, s, $s, $r, $c} = $restore(this, {bs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = s.ws.Write(bs); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $r = s.Mutex.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: lockedWriteSyncer.ptr.prototype.Write, $c: true, $r, _r, _tuple, bs, err, n, s, $s};return $f; - }; - lockedWriteSyncer.prototype.Write = function(bs) { return this.$val.Write(bs); }; - lockedWriteSyncer.ptr.prototype.Sync = function() { - var {_r, err, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = s.ws.Sync(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - $r = s.Mutex.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err; - /* */ } return; } var $f = {$blk: lockedWriteSyncer.ptr.prototype.Sync, $c: true, $r, _r, err, s, $s};return $f; - }; - lockedWriteSyncer.prototype.Sync = function() { return this.$val.Sync(); }; - writerWrapper.ptr.prototype.Sync = function() { - var w; - w = this; - return $ifaceNil; - }; - writerWrapper.prototype.Sync = function() { return this.$val.Sync(); }; - NewMultiWriteSyncer = function(ws) { - var ws; - if (ws.$length === 1) { - return (0 >= ws.$length ? ($throwRuntimeError("index out of range"), undefined) : ws.$array[ws.$offset + 0]); - } - return ($convertSliceType($appendSlice((sliceType$2.nil), ws), multiWriteSyncer)); - }; - $pkg.NewMultiWriteSyncer = NewMultiWriteSyncer; - multiWriteSyncer.prototype.Write = function(p) { - var {_i, _r, _ref, _tuple, err, n, nWritten, p, w, writeErr, ws, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ws = this; - writeErr = $ifaceNil; - nWritten = 0; - _ref = ws; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - w = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = w.Write(p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - writeErr = multierr.Append(writeErr, err); - if ((nWritten === 0) && !((n === 0))) { - nWritten = n; - } else if (n < nWritten) { - nWritten = n; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return [nWritten, writeErr]; - /* */ } return; } var $f = {$blk: multiWriteSyncer.prototype.Write, $c: true, $r, _i, _r, _ref, _tuple, err, n, nWritten, p, w, writeErr, ws, $s};return $f; - }; - $ptrType(multiWriteSyncer).prototype.Write = function(p) { return this.$get().Write(p); }; - multiWriteSyncer.prototype.Sync = function() { - var {_arg, _arg$1, _i, _r, _r$1, _ref, err, w, ws, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ws = this; - err = $ifaceNil; - _ref = ws; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - w = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _arg = err; - _r = w.Sync(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _r$1 = multierr.Append(_arg, _arg$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - _i++; - $s = 1; continue; - case 2: - $s = -1; return err; - /* */ } return; } var $f = {$blk: multiWriteSyncer.prototype.Sync, $c: true, $r, _arg, _arg$1, _i, _r, _r$1, _ref, err, w, ws, $s};return $f; - }; - $ptrType(multiWriteSyncer).prototype.Sync = function() { return this.$get().Sync(); }; - newCounters = function() { - return arrayType$1.zero(); - }; - counters.prototype.get = function(lvl, key) { - var _r, cs, i, j, key, lvl, x$2, x$3; - cs = this.$val; - i = lvl - -1 << 24 >> 24; - j = (_r = fnv32a(key) % 4096, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - return (x$2 = (x$3 = cs, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i])), ((j < 0 || j >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[j])); - }; - $ptrType(counters).prototype.get = function(lvl, key) { return (new counters(this.$get())).get(lvl, key); }; - fnv32a = function(s) { - var hash, i, s; - hash = 2166136261; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - hash = (hash ^ (((s.charCodeAt(i) >>> 0)))) >>> 0; - hash = $imul(hash, (16777619)) >>> 0; - i = i + (1) >> 0; - } - return hash; - }; - counter.ptr.prototype.IncCheckReset = function(t, tick) { - var c, newResetAfter, resetAfter, t, tick, tn, x$2; - c = this; - tn = $clone(t, time.Time).UnixNano(); - resetAfter = c.resetAt.Load(); - if ((resetAfter.$high > tn.$high || (resetAfter.$high === tn.$high && resetAfter.$low > tn.$low))) { - return c.counter.Inc(); - } - c.counter.Store(new $Uint64(0, 1)); - newResetAfter = (x$2 = tick.Nanoseconds(), new $Int64(tn.$high + x$2.$high, tn.$low + x$2.$low)); - if (!c.resetAt.CAS(resetAfter, newResetAfter)) { - return c.counter.Inc(); - } - return new $Uint64(0, 1); - }; - counter.prototype.IncCheckReset = function(t, tick) { return this.$val.IncCheckReset(t, tick); }; - NewSampler = function(core, tick, first, thereafter) { - var core, first, thereafter, tick; - return new sampler.ptr(core, newCounters(), tick, (new $Uint64(0, first)), (new $Uint64(0, thereafter))); - }; - $pkg.NewSampler = NewSampler; - sampler.ptr.prototype.With = function(fields) { - var {$24r, _r, fields, s, $s, $r, $c} = $restore(this, {fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.Core.With(fields); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new sampler.ptr(_r, s.counts, s.tick, s.first, s.thereafter); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: sampler.ptr.prototype.With, $c: true, $r, $24r, _r, fields, s, $s};return $f; - }; - sampler.prototype.With = function(fields) { return this.$val.With(fields); }; - sampler.ptr.prototype.Check = function(ent, ce) { - var {$24r, _r, _r$1, ce, counter$1, ent, n, s, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {ent, ce}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.Core.Enabled(ent.Level); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return ce; - /* } */ case 2: - counter$1 = new ptrType$5(s.counts).get(ent.Level, ent.Message); - n = counter$1.IncCheckReset($clone(ent.Time, time.Time), s.tick); - if ((x$2 = s.first, (n.$high > x$2.$high || (n.$high === x$2.$high && n.$low > x$2.$low))) && !((x$3 = $div64(((x$4 = s.first, new $Uint64(n.$high - x$4.$high, n.$low - x$4.$low))), s.thereafter, true), (x$3.$high === 0 && x$3.$low === 0)))) { - $s = -1; return ce; - } - _r$1 = s.Core.Check($clone(ent, Entry), ce); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: sampler.ptr.prototype.Check, $c: true, $r, $24r, _r, _r$1, ce, counter$1, ent, n, s, x$2, x$3, x$4, $s};return $f; - }; - sampler.prototype.Check = function(ent, ce) { return this.$val.Check(ent, ce); }; - NewMapObjectEncoder = function() { - var m; - m = {}; - return new MapObjectEncoder.ptr(m, m); - }; - $pkg.NewMapObjectEncoder = NewMapObjectEncoder; - MapObjectEncoder.ptr.prototype.AddArray = function(key, v) { - var {_key, _r, arr, err, key, m, v, $s, $r, $c} = $restore(this, {key, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - arr = new sliceArrayEncoder.ptr($makeSlice(sliceType, 0)); - _r = v.MarshalLogArray(arr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - _key = key; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: arr.elems }; - $s = -1; return err; - /* */ } return; } var $f = {$blk: MapObjectEncoder.ptr.prototype.AddArray, $c: true, $r, _key, _r, arr, err, key, m, v, $s};return $f; - }; - MapObjectEncoder.prototype.AddArray = function(key, v) { return this.$val.AddArray(key, v); }; - MapObjectEncoder.ptr.prototype.AddObject = function(k, v) { - var {$24r, _key, _r, k, m, newMap, v, $s, $r, $c} = $restore(this, {k, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - newMap = NewMapObjectEncoder(); - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new mapType(newMap.Fields) }; - _r = v.MarshalLogObject(newMap); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MapObjectEncoder.ptr.prototype.AddObject, $c: true, $r, $24r, _key, _r, k, m, newMap, v, $s};return $f; - }; - MapObjectEncoder.prototype.AddObject = function(k, v) { return this.$val.AddObject(k, v); }; - MapObjectEncoder.ptr.prototype.AddBinary = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - }; - MapObjectEncoder.prototype.AddBinary = function(k, v) { return this.$val.AddBinary(k, v); }; - MapObjectEncoder.ptr.prototype.AddByteString = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $String(($bytesToString(v))) }; - }; - MapObjectEncoder.prototype.AddByteString = function(k, v) { return this.$val.AddByteString(k, v); }; - MapObjectEncoder.ptr.prototype.AddBool = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Bool(v) }; - }; - MapObjectEncoder.prototype.AddBool = function(k, v) { return this.$val.AddBool(k, v); }; - MapObjectEncoder.ptr.prototype.AddDuration = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - }; - MapObjectEncoder.prototype.AddDuration = function(k, v) { return this.$val.AddDuration(k, v); }; - MapObjectEncoder.ptr.prototype.AddComplex128 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - }; - MapObjectEncoder.prototype.AddComplex128 = function(k, v) { return this.$val.AddComplex128(k, v); }; - MapObjectEncoder.ptr.prototype.AddComplex64 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - }; - MapObjectEncoder.prototype.AddComplex64 = function(k, v) { return this.$val.AddComplex64(k, v); }; - MapObjectEncoder.ptr.prototype.AddFloat64 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Float64(v) }; - }; - MapObjectEncoder.prototype.AddFloat64 = function(k, v) { return this.$val.AddFloat64(k, v); }; - MapObjectEncoder.ptr.prototype.AddFloat32 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Float32(v) }; - }; - MapObjectEncoder.prototype.AddFloat32 = function(k, v) { return this.$val.AddFloat32(k, v); }; - MapObjectEncoder.ptr.prototype.AddInt = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Int(v) }; - }; - MapObjectEncoder.prototype.AddInt = function(k, v) { return this.$val.AddInt(k, v); }; - MapObjectEncoder.ptr.prototype.AddInt64 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - }; - MapObjectEncoder.prototype.AddInt64 = function(k, v) { return this.$val.AddInt64(k, v); }; - MapObjectEncoder.ptr.prototype.AddInt32 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Int32(v) }; - }; - MapObjectEncoder.prototype.AddInt32 = function(k, v) { return this.$val.AddInt32(k, v); }; - MapObjectEncoder.ptr.prototype.AddInt16 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Int16(v) }; - }; - MapObjectEncoder.prototype.AddInt16 = function(k, v) { return this.$val.AddInt16(k, v); }; - MapObjectEncoder.ptr.prototype.AddInt8 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Int8(v) }; - }; - MapObjectEncoder.prototype.AddInt8 = function(k, v) { return this.$val.AddInt8(k, v); }; - MapObjectEncoder.ptr.prototype.AddString = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $String(v) }; - }; - MapObjectEncoder.prototype.AddString = function(k, v) { return this.$val.AddString(k, v); }; - MapObjectEncoder.ptr.prototype.AddTime = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new v.constructor.elem(v) }; - }; - MapObjectEncoder.prototype.AddTime = function(k, v) { return this.$val.AddTime(k, v); }; - MapObjectEncoder.ptr.prototype.AddUint = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Uint(v) }; - }; - MapObjectEncoder.prototype.AddUint = function(k, v) { return this.$val.AddUint(k, v); }; - MapObjectEncoder.ptr.prototype.AddUint64 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - }; - MapObjectEncoder.prototype.AddUint64 = function(k, v) { return this.$val.AddUint64(k, v); }; - MapObjectEncoder.ptr.prototype.AddUint32 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Uint32(v) }; - }; - MapObjectEncoder.prototype.AddUint32 = function(k, v) { return this.$val.AddUint32(k, v); }; - MapObjectEncoder.ptr.prototype.AddUint16 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Uint16(v) }; - }; - MapObjectEncoder.prototype.AddUint16 = function(k, v) { return this.$val.AddUint16(k, v); }; - MapObjectEncoder.ptr.prototype.AddUint8 = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Uint8(v) }; - }; - MapObjectEncoder.prototype.AddUint8 = function(k, v) { return this.$val.AddUint8(k, v); }; - MapObjectEncoder.ptr.prototype.AddUintptr = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new $Uintptr(v) }; - }; - MapObjectEncoder.prototype.AddUintptr = function(k, v) { return this.$val.AddUintptr(k, v); }; - MapObjectEncoder.ptr.prototype.AddReflected = function(k, v) { - var _key, k, m, v; - m = this; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - return $ifaceNil; - }; - MapObjectEncoder.prototype.AddReflected = function(k, v) { return this.$val.AddReflected(k, v); }; - MapObjectEncoder.ptr.prototype.OpenNamespace = function(k) { - var _key, k, m, ns; - m = this; - ns = {}; - _key = k; (m.cur || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new mapType(ns) }; - m.cur = ns; - }; - MapObjectEncoder.prototype.OpenNamespace = function(k) { return this.$val.OpenNamespace(k); }; - sliceArrayEncoder.ptr.prototype.AppendArray = function(v) { - var {_r, enc, err, s, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - enc = new sliceArrayEncoder.ptr(sliceType.nil); - _r = v.MarshalLogArray(enc); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - s.elems = $append(s.elems, enc.elems); - $s = -1; return err; - /* */ } return; } var $f = {$blk: sliceArrayEncoder.ptr.prototype.AppendArray, $c: true, $r, _r, enc, err, s, v, $s};return $f; - }; - sliceArrayEncoder.prototype.AppendArray = function(v) { return this.$val.AppendArray(v); }; - sliceArrayEncoder.ptr.prototype.AppendObject = function(v) { - var {_r, err, m, s, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - m = NewMapObjectEncoder(); - _r = v.MarshalLogObject(m); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - s.elems = $append(s.elems, new mapType(m.Fields)); - $s = -1; return err; - /* */ } return; } var $f = {$blk: sliceArrayEncoder.ptr.prototype.AppendObject, $c: true, $r, _r, err, m, s, v, $s};return $f; - }; - sliceArrayEncoder.prototype.AppendObject = function(v) { return this.$val.AppendObject(v); }; - sliceArrayEncoder.ptr.prototype.AppendReflected = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - return $ifaceNil; - }; - sliceArrayEncoder.prototype.AppendReflected = function(v) { return this.$val.AppendReflected(v); }; - sliceArrayEncoder.ptr.prototype.AppendBool = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Bool(v)); - }; - sliceArrayEncoder.prototype.AppendBool = function(v) { return this.$val.AppendBool(v); }; - sliceArrayEncoder.ptr.prototype.AppendByteString = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - }; - sliceArrayEncoder.prototype.AppendByteString = function(v) { return this.$val.AppendByteString(v); }; - sliceArrayEncoder.ptr.prototype.AppendComplex128 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - }; - sliceArrayEncoder.prototype.AppendComplex128 = function(v) { return this.$val.AppendComplex128(v); }; - sliceArrayEncoder.ptr.prototype.AppendComplex64 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - }; - sliceArrayEncoder.prototype.AppendComplex64 = function(v) { return this.$val.AppendComplex64(v); }; - sliceArrayEncoder.ptr.prototype.AppendDuration = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - }; - sliceArrayEncoder.prototype.AppendDuration = function(v) { return this.$val.AppendDuration(v); }; - sliceArrayEncoder.ptr.prototype.AppendFloat64 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Float64(v)); - }; - sliceArrayEncoder.prototype.AppendFloat64 = function(v) { return this.$val.AppendFloat64(v); }; - sliceArrayEncoder.ptr.prototype.AppendFloat32 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Float32(v)); - }; - sliceArrayEncoder.prototype.AppendFloat32 = function(v) { return this.$val.AppendFloat32(v); }; - sliceArrayEncoder.ptr.prototype.AppendInt = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Int(v)); - }; - sliceArrayEncoder.prototype.AppendInt = function(v) { return this.$val.AppendInt(v); }; - sliceArrayEncoder.ptr.prototype.AppendInt64 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - }; - sliceArrayEncoder.prototype.AppendInt64 = function(v) { return this.$val.AppendInt64(v); }; - sliceArrayEncoder.ptr.prototype.AppendInt32 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Int32(v)); - }; - sliceArrayEncoder.prototype.AppendInt32 = function(v) { return this.$val.AppendInt32(v); }; - sliceArrayEncoder.ptr.prototype.AppendInt16 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Int16(v)); - }; - sliceArrayEncoder.prototype.AppendInt16 = function(v) { return this.$val.AppendInt16(v); }; - sliceArrayEncoder.ptr.prototype.AppendInt8 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Int8(v)); - }; - sliceArrayEncoder.prototype.AppendInt8 = function(v) { return this.$val.AppendInt8(v); }; - sliceArrayEncoder.ptr.prototype.AppendString = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $String(v)); - }; - sliceArrayEncoder.prototype.AppendString = function(v) { return this.$val.AppendString(v); }; - sliceArrayEncoder.ptr.prototype.AppendTime = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new v.constructor.elem(v)); - }; - sliceArrayEncoder.prototype.AppendTime = function(v) { return this.$val.AppendTime(v); }; - sliceArrayEncoder.ptr.prototype.AppendUint = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Uint(v)); - }; - sliceArrayEncoder.prototype.AppendUint = function(v) { return this.$val.AppendUint(v); }; - sliceArrayEncoder.ptr.prototype.AppendUint64 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, v); - }; - sliceArrayEncoder.prototype.AppendUint64 = function(v) { return this.$val.AppendUint64(v); }; - sliceArrayEncoder.ptr.prototype.AppendUint32 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Uint32(v)); - }; - sliceArrayEncoder.prototype.AppendUint32 = function(v) { return this.$val.AppendUint32(v); }; - sliceArrayEncoder.ptr.prototype.AppendUint16 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Uint16(v)); - }; - sliceArrayEncoder.prototype.AppendUint16 = function(v) { return this.$val.AppendUint16(v); }; - sliceArrayEncoder.ptr.prototype.AppendUint8 = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Uint8(v)); - }; - sliceArrayEncoder.prototype.AppendUint8 = function(v) { return this.$val.AppendUint8(v); }; - sliceArrayEncoder.ptr.prototype.AppendUintptr = function(v) { - var s, v; - s = this; - s.elems = $append(s.elems, new $Uintptr(v)); - }; - sliceArrayEncoder.prototype.AppendUintptr = function(v) { return this.$val.AppendUintptr(v); }; - init = function() { - var {_entry, _i, _key, _key$1, _keys, _r, _r$1, _r$2, _r$3, _ref, color$1, level, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = _levelToColor; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - level = _entry.k; - color$1 = _entry.v; - _r = new Level(level).String(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = new color.Color(color$1).Add(_r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _key = level; (_levelToLowercaseColorString || $throwRuntimeError("assignment to entry in nil map"))[Level.keyFor(_key)] = { k: _key, v: _r$1 }; - _r$2 = new Level(level).CapitalString(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = new color.Color(color$1).Add(_r$2); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _key$1 = level; (_levelToCapitalColorString || $throwRuntimeError("assignment to entry in nil map"))[Level.keyFor(_key$1)] = { k: _key$1, v: _r$3 }; - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, _entry, _i, _key, _key$1, _keys, _r, _r$1, _r$2, _r$3, _ref, color$1, level, $s};return $f; - }; - Level.prototype.String = function() { - var {$24r, _1, _r, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this.$val; - _1 = l; - /* */ if (_1 === (-1)) { $s = 2; continue; } - /* */ if (_1 === (0)) { $s = 3; continue; } - /* */ if (_1 === (1)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ if (_1 === (3)) { $s = 6; continue; } - /* */ if (_1 === (4)) { $s = 7; continue; } - /* */ if (_1 === (5)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (-1)) { */ case 2: - $s = -1; return "debug"; - /* } else if (_1 === (0)) { */ case 3: - $s = -1; return "info"; - /* } else if (_1 === (1)) { */ case 4: - $s = -1; return "warn"; - /* } else if (_1 === (2)) { */ case 5: - $s = -1; return "error"; - /* } else if (_1 === (3)) { */ case 6: - $s = -1; return "dpanic"; - /* } else if (_1 === (4)) { */ case 7: - $s = -1; return "panic"; - /* } else if (_1 === (5)) { */ case 8: - $s = -1; return "fatal"; - /* } else { */ case 9: - _r = fmt.Sprintf("Level(%d)", new sliceType([new Level(l)])); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 12; case 12: return $24r; - /* } */ case 10: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Level.prototype.String, $c: true, $r, $24r, _1, _r, l, $s};return $f; - }; - $ptrType(Level).prototype.String = function() { return new Level(this.$get()).String(); }; - Level.prototype.CapitalString = function() { - var {$24r, _1, _r, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this.$val; - _1 = l; - /* */ if (_1 === (-1)) { $s = 2; continue; } - /* */ if (_1 === (0)) { $s = 3; continue; } - /* */ if (_1 === (1)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ if (_1 === (3)) { $s = 6; continue; } - /* */ if (_1 === (4)) { $s = 7; continue; } - /* */ if (_1 === (5)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_1 === (-1)) { */ case 2: - $s = -1; return "DEBUG"; - /* } else if (_1 === (0)) { */ case 3: - $s = -1; return "INFO"; - /* } else if (_1 === (1)) { */ case 4: - $s = -1; return "WARN"; - /* } else if (_1 === (2)) { */ case 5: - $s = -1; return "ERROR"; - /* } else if (_1 === (3)) { */ case 6: - $s = -1; return "DPANIC"; - /* } else if (_1 === (4)) { */ case 7: - $s = -1; return "PANIC"; - /* } else if (_1 === (5)) { */ case 8: - $s = -1; return "FATAL"; - /* } else { */ case 9: - _r = fmt.Sprintf("LEVEL(%d)", new sliceType([new Level(l)])); /* */ $s = 11; case 11: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 12; case 12: return $24r; - /* } */ case 10: - case 1: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Level.prototype.CapitalString, $c: true, $r, $24r, _1, _r, l, $s};return $f; - }; - $ptrType(Level).prototype.CapitalString = function() { return new Level(this.$get()).CapitalString(); }; - Level.prototype.MarshalText = function() { - var {$24r, _r, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this.$val; - _r = new Level(l).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [(new sliceType$3($stringToBytes(_r))), $ifaceNil]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Level.prototype.MarshalText, $c: true, $r, $24r, _r, l, $s};return $f; - }; - $ptrType(Level).prototype.MarshalText = function() { return new Level(this.$get()).MarshalText(); }; - $ptrType(Level).prototype.UnmarshalText = function(text) { - var {$24r, _r, _r$1, _r$2, _v, l, text, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (l === ptrType$6.nil) { - $s = -1; return errUnmarshalNilLevel; - } - if (!(!l.unmarshalText(text))) { _v = false; $s = 3; continue s; } - _r = bytes.ToLower(text); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = l.unmarshalText(_r); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$2 = fmt.Errorf("unrecognized level: %q", new sliceType([text])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 7; case 7: return $24r; - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $ptrType(Level).prototype.UnmarshalText, $c: true, $r, $24r, _r, _r$1, _r$2, _v, l, text, $s};return $f; - }; - $ptrType(Level).prototype.unmarshalText = function(text) { - var _1, l, text; - l = this; - _1 = ($bytesToString(text)); - if (_1 === ("debug") || _1 === ("DEBUG")) { - l.$set(-1); - } else if (_1 === ("info") || _1 === ("INFO") || _1 === ("")) { - l.$set(0); - } else if (_1 === ("warn") || _1 === ("WARN")) { - l.$set(1); - } else if (_1 === ("error") || _1 === ("ERROR")) { - l.$set(2); - } else if (_1 === ("dpanic") || _1 === ("DPANIC")) { - l.$set(3); - } else if (_1 === ("panic") || _1 === ("PANIC")) { - l.$set(4); - } else if (_1 === ("fatal") || _1 === ("FATAL")) { - l.$set(5); - } else { - return false; - } - return true; - }; - $ptrType(Level).prototype.Set = function(s) { - var {$24r, _r, l, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = l.UnmarshalText((new sliceType$3($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $ptrType(Level).prototype.Set, $c: true, $r, $24r, _r, l, s, $s};return $f; - }; - $ptrType(Level).prototype.Get = function() { - var l; - l = this; - return new Level(l.$get()); - }; - Level.prototype.Enabled = function(lvl) { - var l, lvl; - l = this.$val; - return lvl >= l; - }; - $ptrType(Level).prototype.Enabled = function(lvl) { return new Level(this.$get()).Enabled(lvl); }; - getJSONEncoder = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = _jsonPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = $assertType(_r, ptrType$7); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: getJSONEncoder, $c: true, $r, $24r, _r, $s};return $f; - }; - putJSONEncoder = function(enc) { - var enc; - if (!(enc.reflectBuf === ptrType$1.nil)) { - enc.reflectBuf.Free(); - } - enc.EncoderConfig = ptrType.nil; - enc.buf = ptrType$1.nil; - enc.spaced = false; - enc.openNamespaces = 0; - enc.reflectBuf = ptrType$1.nil; - enc.reflectEnc = ptrType$2.nil; - _jsonPool.Put(enc); - }; - NewJSONEncoder = function(cfg) { - var {$24r, _r, cfg, $s, $r, $c} = $restore(this, {cfg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newJSONEncoder($clone(cfg, EncoderConfig), false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewJSONEncoder, $c: true, $r, $24r, _r, cfg, $s};return $f; - }; - $pkg.NewJSONEncoder = NewJSONEncoder; - newJSONEncoder = function(cfg, spaced) { - var {$24r, _r, cfg, spaced, $s, $r, $c} = $restore(this, {cfg, spaced}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = [cfg]; - _r = bufferpool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new jsonEncoder.ptr(cfg[0], _r, spaced, 0, ptrType$1.nil, ptrType$2.nil); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: newJSONEncoder, $c: true, $r, $24r, _r, cfg, spaced, $s};return $f; - }; - jsonEncoder.ptr.prototype.AddArray = function(key, arr) { - var {$24r, _r, arr, enc, key, $s, $r, $c} = $restore(this, {key, arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - enc.addKey(key); - _r = enc.AppendArray(arr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AddArray, $c: true, $r, $24r, _r, arr, enc, key, $s};return $f; - }; - jsonEncoder.prototype.AddArray = function(key, arr) { return this.$val.AddArray(key, arr); }; - jsonEncoder.ptr.prototype.AddObject = function(key, obj) { - var {$24r, _r, enc, key, obj, $s, $r, $c} = $restore(this, {key, obj}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - enc.addKey(key); - _r = enc.AppendObject(obj); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AddObject, $c: true, $r, $24r, _r, enc, key, obj, $s};return $f; - }; - jsonEncoder.prototype.AddObject = function(key, obj) { return this.$val.AddObject(key, obj); }; - jsonEncoder.ptr.prototype.AddBinary = function(key, val) { - var enc, key, val; - enc = this; - enc.AddString(key, base64.StdEncoding.EncodeToString(val)); - }; - jsonEncoder.prototype.AddBinary = function(key, val) { return this.$val.AddBinary(key, val); }; - jsonEncoder.ptr.prototype.AddByteString = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendByteString(val); - }; - jsonEncoder.prototype.AddByteString = function(key, val) { return this.$val.AddByteString(key, val); }; - jsonEncoder.ptr.prototype.AddBool = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendBool(val); - }; - jsonEncoder.prototype.AddBool = function(key, val) { return this.$val.AddBool(key, val); }; - jsonEncoder.ptr.prototype.AddComplex128 = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendComplex128(val); - }; - jsonEncoder.prototype.AddComplex128 = function(key, val) { return this.$val.AddComplex128(key, val); }; - jsonEncoder.ptr.prototype.AddDuration = function(key, val) { - var {enc, key, val, $s, $r, $c} = $restore(this, {key, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - enc.addKey(key); - $r = enc.AppendDuration(val); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AddDuration, $c: true, $r, enc, key, val, $s};return $f; - }; - jsonEncoder.prototype.AddDuration = function(key, val) { return this.$val.AddDuration(key, val); }; - jsonEncoder.ptr.prototype.AddFloat64 = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendFloat64(val); - }; - jsonEncoder.prototype.AddFloat64 = function(key, val) { return this.$val.AddFloat64(key, val); }; - jsonEncoder.ptr.prototype.AddInt64 = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendInt64(val); - }; - jsonEncoder.prototype.AddInt64 = function(key, val) { return this.$val.AddInt64(key, val); }; - jsonEncoder.ptr.prototype.resetReflectBuf = function() { - var {_r, enc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - /* */ if (enc.reflectBuf === ptrType$1.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (enc.reflectBuf === ptrType$1.nil) { */ case 1: - _r = bufferpool.Get(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - enc.reflectBuf = _r; - enc.reflectEnc = json.NewEncoder(enc.reflectBuf); - $s = 3; continue; - /* } else { */ case 2: - enc.reflectBuf.Reset(); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.resetReflectBuf, $c: true, $r, _r, enc, $s};return $f; - }; - jsonEncoder.prototype.resetReflectBuf = function() { return this.$val.resetReflectBuf(); }; - jsonEncoder.ptr.prototype.AddReflected = function(key, obj) { - var {_r, _tuple, enc, err, key, obj, $s, $r, $c} = $restore(this, {key, obj}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - $r = enc.resetReflectBuf(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = enc.reflectEnc.Encode(obj); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - enc.reflectBuf.TrimNewline(); - enc.addKey(key); - _tuple = enc.buf.Write(enc.reflectBuf.Bytes()); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AddReflected, $c: true, $r, _r, _tuple, enc, err, key, obj, $s};return $f; - }; - jsonEncoder.prototype.AddReflected = function(key, obj) { return this.$val.AddReflected(key, obj); }; - jsonEncoder.ptr.prototype.OpenNamespace = function(key) { - var enc, key; - enc = this; - enc.addKey(key); - enc.buf.AppendByte(123); - enc.openNamespaces = enc.openNamespaces + (1) >> 0; - }; - jsonEncoder.prototype.OpenNamespace = function(key) { return this.$val.OpenNamespace(key); }; - jsonEncoder.ptr.prototype.AddString = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendString(val); - }; - jsonEncoder.prototype.AddString = function(key, val) { return this.$val.AddString(key, val); }; - jsonEncoder.ptr.prototype.AddTime = function(key, val) { - var {enc, key, val, $s, $r, $c} = $restore(this, {key, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - enc.addKey(key); - $r = enc.AppendTime($clone(val, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AddTime, $c: true, $r, enc, key, val, $s};return $f; - }; - jsonEncoder.prototype.AddTime = function(key, val) { return this.$val.AddTime(key, val); }; - jsonEncoder.ptr.prototype.AddUint64 = function(key, val) { - var enc, key, val; - enc = this; - enc.addKey(key); - enc.AppendUint64(val); - }; - jsonEncoder.prototype.AddUint64 = function(key, val) { return this.$val.AddUint64(key, val); }; - jsonEncoder.ptr.prototype.AppendArray = function(arr) { - var {_r, arr, enc, err, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - enc.addElementSeparator(); - enc.buf.AppendByte(91); - _r = arr.MarshalLogArray(enc); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - enc.buf.AppendByte(93); - $s = -1; return err; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AppendArray, $c: true, $r, _r, arr, enc, err, $s};return $f; - }; - jsonEncoder.prototype.AppendArray = function(arr) { return this.$val.AppendArray(arr); }; - jsonEncoder.ptr.prototype.AppendObject = function(obj) { - var {_r, enc, err, obj, $s, $r, $c} = $restore(this, {obj}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - enc.addElementSeparator(); - enc.buf.AppendByte(123); - _r = obj.MarshalLogObject(enc); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - enc.buf.AppendByte(125); - $s = -1; return err; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AppendObject, $c: true, $r, _r, enc, err, obj, $s};return $f; - }; - jsonEncoder.prototype.AppendObject = function(obj) { return this.$val.AppendObject(obj); }; - jsonEncoder.ptr.prototype.AppendBool = function(val) { - var enc, val; - enc = this; - enc.addElementSeparator(); - enc.buf.AppendBool(val); - }; - jsonEncoder.prototype.AppendBool = function(val) { return this.$val.AppendBool(val); }; - jsonEncoder.ptr.prototype.AppendByteString = function(val) { - var enc, val; - enc = this; - enc.addElementSeparator(); - enc.buf.AppendByte(34); - enc.safeAddByteString(val); - enc.buf.AppendByte(34); - }; - jsonEncoder.prototype.AppendByteString = function(val) { return this.$val.AppendByteString(val); }; - jsonEncoder.ptr.prototype.AppendComplex128 = function(val) { - var _tmp, _tmp$1, enc, i, r, val; - enc = this; - enc.addElementSeparator(); - _tmp = (val.$real); - _tmp$1 = (val.$imag); - r = _tmp; - i = _tmp$1; - enc.buf.AppendByte(34); - enc.buf.AppendFloat(r, 64); - enc.buf.AppendByte(43); - enc.buf.AppendFloat(i, 64); - enc.buf.AppendByte(105); - enc.buf.AppendByte(34); - }; - jsonEncoder.prototype.AppendComplex128 = function(val) { return this.$val.AppendComplex128(val); }; - jsonEncoder.ptr.prototype.AppendDuration = function(val) { - var {cur, enc, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - cur = enc.buf.Len(); - $r = enc.EncoderConfig.EncodeDuration(val, enc); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (cur === enc.buf.Len()) { - enc.AppendInt64((new $Int64(val.$high, val.$low))); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AppendDuration, $c: true, $r, cur, enc, val, $s};return $f; - }; - jsonEncoder.prototype.AppendDuration = function(val) { return this.$val.AppendDuration(val); }; - jsonEncoder.ptr.prototype.AppendInt64 = function(val) { - var enc, val; - enc = this; - enc.addElementSeparator(); - enc.buf.AppendInt(val); - }; - jsonEncoder.prototype.AppendInt64 = function(val) { return this.$val.AppendInt64(val); }; - jsonEncoder.ptr.prototype.AppendReflected = function(val) { - var {_r, _tuple, enc, err, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - $r = enc.resetReflectBuf(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = enc.reflectEnc.Encode(val); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - enc.reflectBuf.TrimNewline(); - enc.addElementSeparator(); - _tuple = enc.buf.Write(enc.reflectBuf.Bytes()); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AppendReflected, $c: true, $r, _r, _tuple, enc, err, val, $s};return $f; - }; - jsonEncoder.prototype.AppendReflected = function(val) { return this.$val.AppendReflected(val); }; - jsonEncoder.ptr.prototype.AppendString = function(val) { - var enc, val; - enc = this; - enc.addElementSeparator(); - enc.buf.AppendByte(34); - enc.safeAddString(val); - enc.buf.AppendByte(34); - }; - jsonEncoder.prototype.AppendString = function(val) { return this.$val.AppendString(val); }; - jsonEncoder.ptr.prototype.AppendTime = function(val) { - var {cur, enc, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - cur = enc.buf.Len(); - $r = enc.EncoderConfig.EncodeTime($clone(val, time.Time), enc); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (cur === enc.buf.Len()) { - enc.AppendInt64($clone(val, time.Time).UnixNano()); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.AppendTime, $c: true, $r, cur, enc, val, $s};return $f; - }; - jsonEncoder.prototype.AppendTime = function(val) { return this.$val.AppendTime(val); }; - jsonEncoder.ptr.prototype.AppendUint64 = function(val) { - var enc, val; - enc = this; - enc.addElementSeparator(); - enc.buf.AppendUint(val); - }; - jsonEncoder.prototype.AppendUint64 = function(val) { return this.$val.AppendUint64(val); }; - jsonEncoder.ptr.prototype.AddComplex64 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddComplex128(k, (new $Complex128(v.$real, v.$imag))); - }; - jsonEncoder.prototype.AddComplex64 = function(k, v) { return this.$val.AddComplex64(k, v); }; - jsonEncoder.ptr.prototype.AddFloat32 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddFloat64(k, (v)); - }; - jsonEncoder.prototype.AddFloat32 = function(k, v) { return this.$val.AddFloat32(k, v); }; - jsonEncoder.ptr.prototype.AddInt = function(k, v) { - var enc, k, v; - enc = this; - enc.AddInt64(k, (new $Int64(0, v))); - }; - jsonEncoder.prototype.AddInt = function(k, v) { return this.$val.AddInt(k, v); }; - jsonEncoder.ptr.prototype.AddInt32 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddInt64(k, (new $Int64(0, v))); - }; - jsonEncoder.prototype.AddInt32 = function(k, v) { return this.$val.AddInt32(k, v); }; - jsonEncoder.ptr.prototype.AddInt16 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddInt64(k, (new $Int64(0, v))); - }; - jsonEncoder.prototype.AddInt16 = function(k, v) { return this.$val.AddInt16(k, v); }; - jsonEncoder.ptr.prototype.AddInt8 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddInt64(k, (new $Int64(0, v))); - }; - jsonEncoder.prototype.AddInt8 = function(k, v) { return this.$val.AddInt8(k, v); }; - jsonEncoder.ptr.prototype.AddUint = function(k, v) { - var enc, k, v; - enc = this; - enc.AddUint64(k, (new $Uint64(0, v))); - }; - jsonEncoder.prototype.AddUint = function(k, v) { return this.$val.AddUint(k, v); }; - jsonEncoder.ptr.prototype.AddUint32 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddUint64(k, (new $Uint64(0, v))); - }; - jsonEncoder.prototype.AddUint32 = function(k, v) { return this.$val.AddUint32(k, v); }; - jsonEncoder.ptr.prototype.AddUint16 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddUint64(k, (new $Uint64(0, v))); - }; - jsonEncoder.prototype.AddUint16 = function(k, v) { return this.$val.AddUint16(k, v); }; - jsonEncoder.ptr.prototype.AddUint8 = function(k, v) { - var enc, k, v; - enc = this; - enc.AddUint64(k, (new $Uint64(0, v))); - }; - jsonEncoder.prototype.AddUint8 = function(k, v) { return this.$val.AddUint8(k, v); }; - jsonEncoder.ptr.prototype.AddUintptr = function(k, v) { - var enc, k, v; - enc = this; - enc.AddUint64(k, (new $Uint64(0, v.constructor === Number ? v : 1))); - }; - jsonEncoder.prototype.AddUintptr = function(k, v) { return this.$val.AddUintptr(k, v); }; - jsonEncoder.ptr.prototype.AppendComplex64 = function(v) { - var enc, v; - enc = this; - enc.AppendComplex128((new $Complex128(v.$real, v.$imag))); - }; - jsonEncoder.prototype.AppendComplex64 = function(v) { return this.$val.AppendComplex64(v); }; - jsonEncoder.ptr.prototype.AppendFloat64 = function(v) { - var enc, v; - enc = this; - enc.appendFloat(v, 64); - }; - jsonEncoder.prototype.AppendFloat64 = function(v) { return this.$val.AppendFloat64(v); }; - jsonEncoder.ptr.prototype.AppendFloat32 = function(v) { - var enc, v; - enc = this; - enc.appendFloat((v), 32); - }; - jsonEncoder.prototype.AppendFloat32 = function(v) { return this.$val.AppendFloat32(v); }; - jsonEncoder.ptr.prototype.AppendInt = function(v) { - var enc, v; - enc = this; - enc.AppendInt64((new $Int64(0, v))); - }; - jsonEncoder.prototype.AppendInt = function(v) { return this.$val.AppendInt(v); }; - jsonEncoder.ptr.prototype.AppendInt32 = function(v) { - var enc, v; - enc = this; - enc.AppendInt64((new $Int64(0, v))); - }; - jsonEncoder.prototype.AppendInt32 = function(v) { return this.$val.AppendInt32(v); }; - jsonEncoder.ptr.prototype.AppendInt16 = function(v) { - var enc, v; - enc = this; - enc.AppendInt64((new $Int64(0, v))); - }; - jsonEncoder.prototype.AppendInt16 = function(v) { return this.$val.AppendInt16(v); }; - jsonEncoder.ptr.prototype.AppendInt8 = function(v) { - var enc, v; - enc = this; - enc.AppendInt64((new $Int64(0, v))); - }; - jsonEncoder.prototype.AppendInt8 = function(v) { return this.$val.AppendInt8(v); }; - jsonEncoder.ptr.prototype.AppendUint = function(v) { - var enc, v; - enc = this; - enc.AppendUint64((new $Uint64(0, v))); - }; - jsonEncoder.prototype.AppendUint = function(v) { return this.$val.AppendUint(v); }; - jsonEncoder.ptr.prototype.AppendUint32 = function(v) { - var enc, v; - enc = this; - enc.AppendUint64((new $Uint64(0, v))); - }; - jsonEncoder.prototype.AppendUint32 = function(v) { return this.$val.AppendUint32(v); }; - jsonEncoder.ptr.prototype.AppendUint16 = function(v) { - var enc, v; - enc = this; - enc.AppendUint64((new $Uint64(0, v))); - }; - jsonEncoder.prototype.AppendUint16 = function(v) { return this.$val.AppendUint16(v); }; - jsonEncoder.ptr.prototype.AppendUint8 = function(v) { - var enc, v; - enc = this; - enc.AppendUint64((new $Uint64(0, v))); - }; - jsonEncoder.prototype.AppendUint8 = function(v) { return this.$val.AppendUint8(v); }; - jsonEncoder.ptr.prototype.AppendUintptr = function(v) { - var enc, v; - enc = this; - enc.AppendUint64((new $Uint64(0, v.constructor === Number ? v : 1))); - }; - jsonEncoder.prototype.AppendUintptr = function(v) { return this.$val.AppendUintptr(v); }; - jsonEncoder.ptr.prototype.Clone = function() { - var {_r, clone, enc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - _r = enc.clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - clone = _r; - clone.buf.Write(enc.buf.Bytes()); - $s = -1; return clone; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.Clone, $c: true, $r, _r, clone, enc, $s};return $f; - }; - jsonEncoder.prototype.Clone = function() { return this.$val.Clone(); }; - jsonEncoder.ptr.prototype.clone = function() { - var {_r, _r$1, clone, enc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - _r = getJSONEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - clone = _r; - clone.EncoderConfig = enc.EncoderConfig; - clone.spaced = enc.spaced; - clone.openNamespaces = enc.openNamespaces; - _r$1 = bufferpool.Get(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - clone.buf = _r$1; - $s = -1; return clone; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.clone, $c: true, $r, _r, _r$1, clone, enc, $s};return $f; - }; - jsonEncoder.prototype.clone = function() { return this.$val.clone(); }; - jsonEncoder.ptr.prototype.EncodeEntry = function(ent, fields) { - var {_r, _r$1, _r$2, cur, cur$1, cur$2, enc, ent, fields, final$1, nameEncoder, ret, $s, $r, $c} = $restore(this, {ent, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - enc = this; - _r = enc.clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - final$1 = _r; - final$1.buf.AppendByte(123); - /* */ if (!(final$1.EncoderConfig.LevelKey === "")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(final$1.EncoderConfig.LevelKey === "")) { */ case 2: - final$1.addKey(final$1.EncoderConfig.LevelKey); - cur = final$1.buf.Len(); - $r = final$1.EncoderConfig.EncodeLevel(ent.Level, final$1); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (cur === final$1.buf.Len()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (cur === final$1.buf.Len()) { */ case 5: - _r$1 = new Level(ent.Level).String(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = final$1.AppendString(_r$1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - /* } */ case 3: - /* */ if (!(final$1.EncoderConfig.TimeKey === "")) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(final$1.EncoderConfig.TimeKey === "")) { */ case 9: - $r = final$1.AddTime(final$1.EncoderConfig.TimeKey, $clone(ent.Time, time.Time)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* */ if (!(ent.LoggerName === "") && !(final$1.EncoderConfig.NameKey === "")) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!(ent.LoggerName === "") && !(final$1.EncoderConfig.NameKey === "")) { */ case 12: - final$1.addKey(final$1.EncoderConfig.NameKey); - cur$1 = final$1.buf.Len(); - nameEncoder = final$1.EncoderConfig.EncodeName; - if (nameEncoder === $throwNilPointerError) { - nameEncoder = FullNameEncoder; - } - $r = nameEncoder(ent.LoggerName, final$1); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (cur$1 === final$1.buf.Len()) { - final$1.AppendString(ent.LoggerName); - } - /* } */ case 13: - /* */ if (ent.Caller.Defined && !(final$1.EncoderConfig.CallerKey === "")) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (ent.Caller.Defined && !(final$1.EncoderConfig.CallerKey === "")) { */ case 15: - final$1.addKey(final$1.EncoderConfig.CallerKey); - cur$2 = final$1.buf.Len(); - $r = final$1.EncoderConfig.EncodeCaller($clone(ent.Caller, EntryCaller), final$1); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (cur$2 === final$1.buf.Len()) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (cur$2 === final$1.buf.Len()) { */ case 18: - _r$2 = $clone(ent.Caller, EntryCaller).String(); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = final$1.AppendString(_r$2); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 19: - /* } */ case 16: - if (!(final$1.EncoderConfig.MessageKey === "")) { - final$1.addKey(enc.EncoderConfig.MessageKey); - final$1.AppendString(ent.Message); - } - if (enc.buf.Len() > 0) { - final$1.addElementSeparator(); - final$1.buf.Write(enc.buf.Bytes()); - } - $r = addFields(final$1, fields); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - final$1.closeOpenNamespaces(); - if (!(ent.Stack === "") && !(final$1.EncoderConfig.StacktraceKey === "")) { - final$1.AddString(final$1.EncoderConfig.StacktraceKey, ent.Stack); - } - final$1.buf.AppendByte(125); - if (!(final$1.EncoderConfig.LineEnding === "")) { - final$1.buf.AppendString(final$1.EncoderConfig.LineEnding); - } else { - final$1.buf.AppendString("\n"); - } - ret = final$1.buf; - putJSONEncoder(final$1); - $s = -1; return [ret, $ifaceNil]; - /* */ } return; } var $f = {$blk: jsonEncoder.ptr.prototype.EncodeEntry, $c: true, $r, _r, _r$1, _r$2, cur, cur$1, cur$2, enc, ent, fields, final$1, nameEncoder, ret, $s};return $f; - }; - jsonEncoder.prototype.EncodeEntry = function(ent, fields) { return this.$val.EncodeEntry(ent, fields); }; - jsonEncoder.ptr.prototype.closeOpenNamespaces = function() { - var enc, i; - enc = this; - i = 0; - while (true) { - if (!(i < enc.openNamespaces)) { break; } - enc.buf.AppendByte(125); - i = i + (1) >> 0; - } - }; - jsonEncoder.prototype.closeOpenNamespaces = function() { return this.$val.closeOpenNamespaces(); }; - jsonEncoder.ptr.prototype.addKey = function(key) { - var enc, key; - enc = this; - enc.addElementSeparator(); - enc.buf.AppendByte(34); - enc.safeAddString(key); - enc.buf.AppendByte(34); - enc.buf.AppendByte(58); - if (enc.spaced) { - enc.buf.AppendByte(32); - } - }; - jsonEncoder.prototype.addKey = function(key) { return this.$val.addKey(key); }; - jsonEncoder.ptr.prototype.addElementSeparator = function() { - var _1, enc, last, x$2; - enc = this; - last = enc.buf.Len() - 1 >> 0; - if (last < 0) { - return; - } - _1 = (x$2 = enc.buf.Bytes(), ((last < 0 || last >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + last])); - if ((_1 === (123)) || (_1 === (91)) || (_1 === (58)) || (_1 === (44)) || (_1 === (32))) { - return; - } else { - enc.buf.AppendByte(44); - if (enc.spaced) { - enc.buf.AppendByte(32); - } - } - }; - jsonEncoder.prototype.addElementSeparator = function() { return this.$val.addElementSeparator(); }; - jsonEncoder.ptr.prototype.appendFloat = function(val, bitSize) { - var bitSize, enc, val; - enc = this; - enc.addElementSeparator(); - if (math.IsNaN(val)) { - enc.buf.AppendString("\"NaN\""); - } else if (math.IsInf(val, 1)) { - enc.buf.AppendString("\"+Inf\""); - } else if (math.IsInf(val, -1)) { - enc.buf.AppendString("\"-Inf\""); - } else { - enc.buf.AppendFloat(val, bitSize); - } - }; - jsonEncoder.prototype.appendFloat = function(val, bitSize) { return this.$val.appendFloat(val, bitSize); }; - jsonEncoder.ptr.prototype.safeAddString = function(s) { - var _tuple, enc, i, r, s, size; - enc = this; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (enc.tryAddRuneSelf(s.charCodeAt(i))) { - i = i + (1) >> 0; - continue; - } - _tuple = utf8.DecodeRuneInString($substring(s, i)); - r = _tuple[0]; - size = _tuple[1]; - if (enc.tryAddRuneError(r, size)) { - i = i + (1) >> 0; - continue; - } - enc.buf.AppendString($substring(s, i, (i + size >> 0))); - i = i + (size) >> 0; - } - }; - jsonEncoder.prototype.safeAddString = function(s) { return this.$val.safeAddString(s); }; - jsonEncoder.ptr.prototype.safeAddByteString = function(s) { - var _tuple, enc, i, r, s, size; - enc = this; - i = 0; - while (true) { - if (!(i < s.$length)) { break; } - if (enc.tryAddRuneSelf(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]))) { - i = i + (1) >> 0; - continue; - } - _tuple = utf8.DecodeRune($subslice(s, i)); - r = _tuple[0]; - size = _tuple[1]; - if (enc.tryAddRuneError(r, size)) { - i = i + (1) >> 0; - continue; - } - enc.buf.Write($subslice(s, i, (i + size >> 0))); - i = i + (size) >> 0; - } - }; - jsonEncoder.prototype.safeAddByteString = function(s) { return this.$val.safeAddByteString(s); }; - jsonEncoder.ptr.prototype.tryAddRuneSelf = function(b) { - var _1, b, enc; - enc = this; - if (b >= 128) { - return false; - } - if (32 <= b && !((b === 92)) && !((b === 34))) { - enc.buf.AppendByte(b); - return true; - } - _1 = b; - if ((_1 === (92)) || (_1 === (34))) { - enc.buf.AppendByte(92); - enc.buf.AppendByte(b); - } else if (_1 === (10)) { - enc.buf.AppendByte(92); - enc.buf.AppendByte(110); - } else if (_1 === (13)) { - enc.buf.AppendByte(92); - enc.buf.AppendByte(114); - } else if (_1 === (9)) { - enc.buf.AppendByte(92); - enc.buf.AppendByte(116); - } else { - enc.buf.AppendString("\\u00"); - enc.buf.AppendByte("0123456789abcdef".charCodeAt((b >>> 4 << 24 >>> 24))); - enc.buf.AppendByte("0123456789abcdef".charCodeAt(((b & 15) >>> 0))); - } - return true; - }; - jsonEncoder.prototype.tryAddRuneSelf = function(b) { return this.$val.tryAddRuneSelf(b); }; - jsonEncoder.ptr.prototype.tryAddRuneError = function(r, size) { - var enc, r, size; - enc = this; - if ((r === 65533) && (size === 1)) { - enc.buf.AppendString("\\ufffd"); - return true; - } - return false; - }; - jsonEncoder.prototype.tryAddRuneError = function(r, size) { return this.$val.tryAddRuneError(r, size); }; - Field.ptr.prototype.AddTo = function(enc) { - var {_1, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, enc, err, f, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = $ifaceNil; - _1 = f.Type; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ if (_1 === (4)) { $s = 5; continue; } - /* */ if (_1 === (5)) { $s = 6; continue; } - /* */ if (_1 === (6)) { $s = 7; continue; } - /* */ if (_1 === (7)) { $s = 8; continue; } - /* */ if (_1 === (8)) { $s = 9; continue; } - /* */ if (_1 === (9)) { $s = 10; continue; } - /* */ if (_1 === (10)) { $s = 11; continue; } - /* */ if (_1 === (11)) { $s = 12; continue; } - /* */ if (_1 === (12)) { $s = 13; continue; } - /* */ if (_1 === (13)) { $s = 14; continue; } - /* */ if (_1 === (14)) { $s = 15; continue; } - /* */ if (_1 === (15)) { $s = 16; continue; } - /* */ if (_1 === (16)) { $s = 17; continue; } - /* */ if (_1 === (17)) { $s = 18; continue; } - /* */ if (_1 === (18)) { $s = 19; continue; } - /* */ if (_1 === (19)) { $s = 20; continue; } - /* */ if (_1 === (20)) { $s = 21; continue; } - /* */ if (_1 === (21)) { $s = 22; continue; } - /* */ if (_1 === (22)) { $s = 23; continue; } - /* */ if (_1 === (23)) { $s = 24; continue; } - /* */ if (_1 === (24)) { $s = 25; continue; } - /* */ if (_1 === (25)) { $s = 26; continue; } - /* */ if (_1 === (26)) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (_1 === (1)) { */ case 2: - _r = enc.AddArray(f.Key, $assertType(f.Interface, ArrayMarshaler)); /* */ $s = 30; case 30: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - $s = 29; continue; - /* } else if (_1 === (2)) { */ case 3: - _r$1 = enc.AddObject(f.Key, $assertType(f.Interface, ObjectMarshaler)); /* */ $s = 31; case 31: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - $s = 29; continue; - /* } else if (_1 === (3)) { */ case 4: - $r = enc.AddBinary(f.Key, $assertType(f.Interface, sliceType$3)); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (4)) { */ case 5: - $r = enc.AddBool(f.Key, (x$2 = f.Integer, (x$2.$high === 0 && x$2.$low === 1))); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (5)) { */ case 6: - $r = enc.AddByteString(f.Key, $assertType(f.Interface, sliceType$3)); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (6)) { */ case 7: - $r = enc.AddComplex128(f.Key, $assertType(f.Interface, $Complex128)); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (7)) { */ case 8: - $r = enc.AddComplex64(f.Key, $assertType(f.Interface, $Complex64)); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (8)) { */ case 9: - $r = enc.AddDuration(f.Key, ((x$3 = f.Integer, new time.Duration(x$3.$high, x$3.$low)))); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (9)) { */ case 10: - $r = enc.AddFloat64(f.Key, math.Float64frombits(((x$4 = f.Integer, new $Uint64(x$4.$high, x$4.$low))))); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (10)) { */ case 11: - $r = enc.AddFloat32(f.Key, math.Float32frombits(((f.Integer.$low >>> 0)))); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (11)) { */ case 12: - $r = enc.AddInt64(f.Key, f.Integer); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (12)) { */ case 13: - $r = enc.AddInt32(f.Key, (((x$5 = f.Integer, x$5.$low + ((x$5.$high >> 31) * 4294967296)) >> 0))); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (13)) { */ case 14: - $r = enc.AddInt16(f.Key, (((x$6 = f.Integer, x$6.$low + ((x$6.$high >> 31) * 4294967296)) << 16 >> 16))); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (14)) { */ case 15: - $r = enc.AddInt8(f.Key, (((x$7 = f.Integer, x$7.$low + ((x$7.$high >> 31) * 4294967296)) << 24 >> 24))); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (15)) { */ case 16: - $r = enc.AddString(f.Key, f.String); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (16)) { */ case 17: - /* */ if (!($interfaceIsEqual(f.Interface, $ifaceNil))) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!($interfaceIsEqual(f.Interface, $ifaceNil))) { */ case 45: - $r = enc.AddTime(f.Key, $clone($clone(time.Unix(new $Int64(0, 0), f.Integer), time.Time).In($assertType(f.Interface, ptrType$3)), time.Time)); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 47; continue; - /* } else { */ case 46: - $r = enc.AddTime(f.Key, $clone(time.Unix(new $Int64(0, 0), f.Integer), time.Time)); /* */ $s = 49; case 49: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 47: - $s = 29; continue; - /* } else if (_1 === (17)) { */ case 18: - $r = enc.AddUint64(f.Key, ((x$8 = f.Integer, new $Uint64(x$8.$high, x$8.$low)))); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (18)) { */ case 19: - $r = enc.AddUint32(f.Key, ((f.Integer.$low >>> 0))); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (19)) { */ case 20: - $r = enc.AddUint16(f.Key, ((f.Integer.$low << 16 >>> 16))); /* */ $s = 52; case 52: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (20)) { */ case 21: - $r = enc.AddUint8(f.Key, ((f.Integer.$low << 24 >>> 24))); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (21)) { */ case 22: - $r = enc.AddUintptr(f.Key, ((f.Integer.$low >>> 0))); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (22)) { */ case 23: - _r$2 = enc.AddReflected(f.Key, f.Interface); /* */ $s = 55; case 55: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - $s = 29; continue; - /* } else if (_1 === (23)) { */ case 24: - $r = enc.OpenNamespace(f.Key); /* */ $s = 56; case 56: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (24)) { */ case 25: - _arg = f.Key; - _r$3 = $assertType(f.Interface, fmt.Stringer).String(); /* */ $s = 57; case 57: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = _r$3; - $r = enc.AddString(_arg, _arg$1); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 29; continue; - /* } else if (_1 === (25)) { */ case 26: - _r$4 = encodeError(f.Key, $assertType(f.Interface, $error), enc); /* */ $s = 59; case 59: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = 29; continue; - /* } else if (_1 === (26)) { */ case 27: - /* break; */ $s = 1; continue; - $s = 29; continue; - /* } else { */ case 28: - _r$5 = fmt.Sprintf("unknown field type: %v", new sliceType([new f.constructor.elem(f)])); /* */ $s = 60; case 60: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $panic(new $String(_r$5)); - /* } */ case 29: - case 1: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 61: - _r$6 = fmt.Sprintf("%sError", new sliceType([new $String(f.Key)])); /* */ $s = 63; case 63: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$2 = _r$6; - _r$7 = err.Error(); /* */ $s = 64; case 64: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$3 = _r$7; - $r = enc.AddString(_arg$2, _arg$3); /* */ $s = 65; case 65: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 62: - $s = -1; return; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.AddTo, $c: true, $r, _1, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, enc, err, f, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s};return $f; - }; - Field.prototype.AddTo = function(enc) { return this.$val.AddTo(enc); }; - Field.ptr.prototype.Equals = function(other) { - var {$24r, _1, _r, f, other, $s, $r, $c} = $restore(this, {other}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!((f.Type === other.Type))) { - $s = -1; return false; - } - if (!(f.Key === other.Key)) { - $s = -1; return false; - } - _1 = f.Type; - /* */ if ((_1 === (3)) || (_1 === (5))) { $s = 2; continue; } - /* */ if ((_1 === (1)) || (_1 === (2)) || (_1 === (25)) || (_1 === (22))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((_1 === (3)) || (_1 === (5))) { */ case 2: - $s = -1; return bytes.Equal($assertType(f.Interface, sliceType$3), $assertType(other.Interface, sliceType$3)); - /* } else if ((_1 === (1)) || (_1 === (2)) || (_1 === (25)) || (_1 === (22))) { */ case 3: - _r = reflect.DeepEqual(f.Interface, other.Interface); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - $s = -1; return $equal(f, other, Field); - /* } */ case 5: - case 1: - $s = -1; return false; - /* */ } return; } var $f = {$blk: Field.ptr.prototype.Equals, $c: true, $r, $24r, _1, _r, f, other, $s};return $f; - }; - Field.prototype.Equals = function(other) { return this.$val.Equals(other); }; - addFields = function(enc, fields) { - var {_i, _ref, enc, fields, i, $s, $r, $c} = $restore(this, {enc, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = fields; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = $clone(((i < 0 || i >= fields.$length) ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + i]), Field).AddTo(enc); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: addFields, $c: true, $r, _i, _ref, enc, fields, i, $s};return $f; - }; - encodeError = function(key, err, enc) { - var {$24r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _ref, basic, e, e$1, enc, err, key, verbose, $s, $r, $c} = $restore(this, {key, err, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - basic = _r; - $r = enc.AddString(key, basic); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = err; - /* */ if ($assertType(_ref, errorGroup, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, fmt.Formatter, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($assertType(_ref, errorGroup, true)[1]) { */ case 3: - e = _ref; - _arg = key + "Causes"; - _r$1 = e.Errors(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = ($convertSliceType(_r$1, errArray)); - _r$2 = enc.AddArray(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 8; case 8: return $24r; - /* } else if ($assertType(_ref, fmt.Formatter, true)[1]) { */ case 4: - e$1 = _ref; - _r$3 = fmt.Sprintf("%+v", new sliceType([e$1])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - verbose = _r$3; - /* */ if (!(verbose === basic)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(verbose === basic)) { */ case 10: - $r = enc.AddString(key + "Verbose", verbose); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - /* } */ case 5: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: encodeError, $c: true, $r, $24r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _ref, basic, e, e$1, enc, err, key, verbose, $s};return $f; - }; - errArray.prototype.MarshalLogArray = function(arr) { - var {_i, _r, _r$1, _ref, arr, el, errs, i, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - errs = this; - _ref = errs; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - if ($interfaceIsEqual(((i < 0 || i >= errs.$length) ? ($throwRuntimeError("index out of range"), undefined) : errs.$array[errs.$offset + i]), $ifaceNil)) { - _i++; - /* continue; */ $s = 1; continue; - } - _r = newErrArrayElem(((i < 0 || i >= errs.$length) ? ($throwRuntimeError("index out of range"), undefined) : errs.$array[errs.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - el = _r; - _r$1 = arr.AppendObject(el); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - el.Free(); - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: errArray.prototype.MarshalLogArray, $c: true, $r, _i, _r, _r$1, _ref, arr, el, errs, i, $s};return $f; - }; - $ptrType(errArray).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - newErrArrayElem = function(err) { - var {_r, e, err, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = _errArrayElemPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - e = $assertType(_r, ptrType$9); - e.err = err; - $s = -1; return e; - /* */ } return; } var $f = {$blk: newErrArrayElem, $c: true, $r, _r, e, err, $s};return $f; - }; - errArrayElem.ptr.prototype.MarshalLogArray = function(arr) { - var {$24r, _r, arr, e, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = arr.AppendObject(e); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: errArrayElem.ptr.prototype.MarshalLogArray, $c: true, $r, $24r, _r, arr, e, $s};return $f; - }; - errArrayElem.prototype.MarshalLogArray = function(arr) { return this.$val.MarshalLogArray(arr); }; - errArrayElem.ptr.prototype.MarshalLogObject = function(enc) { - var {$24r, _r, e, enc, $s, $r, $c} = $restore(this, {enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = encodeError("error", e.err, enc); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: errArrayElem.ptr.prototype.MarshalLogObject, $c: true, $r, $24r, _r, e, enc, $s};return $f; - }; - errArrayElem.prototype.MarshalLogObject = function(enc) { return this.$val.MarshalLogObject(enc); }; - errArrayElem.ptr.prototype.Free = function() { - var e; - e = this; - e.err = $ifaceNil; - _errArrayElemPool.Put(e); - }; - errArrayElem.prototype.Free = function() { return this.$val.Free(); }; - getCheckedEntry = function() { - var {_r, ce, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = _cePool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = $assertType(_r, ptrType$8); - ce.reset(); - $s = -1; return ce; - /* */ } return; } var $f = {$blk: getCheckedEntry, $c: true, $r, _r, ce, $s};return $f; - }; - putCheckedEntry = function(ce) { - var ce; - if (ce === ptrType$8.nil) { - return; - } - _cePool.Put(ce); - }; - NewEntryCaller = function(pc, file, line, ok) { - var file, line, ok, pc; - if (!ok) { - return new EntryCaller.ptr(false, 0, "", 0); - } - return new EntryCaller.ptr(true, pc, file, line); - }; - $pkg.NewEntryCaller = NewEntryCaller; - EntryCaller.ptr.prototype.String = function() { - var {$24r, _r, ec, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ec = this; - _r = $clone(ec, EntryCaller).FullPath(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: EntryCaller.ptr.prototype.String, $c: true, $r, $24r, _r, ec, $s};return $f; - }; - EntryCaller.prototype.String = function() { return this.$val.String(); }; - EntryCaller.ptr.prototype.FullPath = function() { - var {_r, buf, caller, ec, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ec = this; - if (!ec.Defined) { - $s = -1; return "undefined"; - } - _r = bufferpool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buf = _r; - buf.AppendString(ec.File); - buf.AppendByte(58); - buf.AppendInt((new $Int64(0, ec.Line))); - caller = buf.String(); - buf.Free(); - $s = -1; return caller; - /* */ } return; } var $f = {$blk: EntryCaller.ptr.prototype.FullPath, $c: true, $r, _r, buf, caller, ec, $s};return $f; - }; - EntryCaller.prototype.FullPath = function() { return this.$val.FullPath(); }; - EntryCaller.ptr.prototype.TrimmedPath = function() { - var {$24r, $24r$1, _r, _r$1, _r$2, buf, caller, ec, idx, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ec = this; - if (!ec.Defined) { - $s = -1; return "undefined"; - } - idx = strings.LastIndexByte(ec.File, 47); - /* */ if (idx === -1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (idx === -1) { */ case 1: - _r = $clone(ec, EntryCaller).FullPath(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - idx = strings.LastIndexByte($substring(ec.File, 0, idx), 47); - /* */ if (idx === -1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (idx === -1) { */ case 5: - _r$1 = $clone(ec, EntryCaller).FullPath(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - _r$2 = bufferpool.Get(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - buf = _r$2; - buf.AppendString($substring(ec.File, (idx + 1 >> 0))); - buf.AppendByte(58); - buf.AppendInt((new $Int64(0, ec.Line))); - caller = buf.String(); - buf.Free(); - $s = -1; return caller; - /* */ } return; } var $f = {$blk: EntryCaller.ptr.prototype.TrimmedPath, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, buf, caller, ec, idx, $s};return $f; - }; - EntryCaller.prototype.TrimmedPath = function() { return this.$val.TrimmedPath(); }; - CheckedEntry.ptr.prototype.reset = function() { - var _i, _ref, ce, i, x$2; - ce = this; - Entry.copy(ce.Entry, new Entry.ptr(0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil), "", "", new EntryCaller.ptr(false, 0, "", 0), "")); - ce.ErrorOutput = $ifaceNil; - ce.dirty = false; - ce.should = 0; - _ref = ce.cores; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - (x$2 = ce.cores, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = $ifaceNil)); - _i++; - } - ce.cores = $subslice(ce.cores, 0, 0); - }; - CheckedEntry.prototype.reset = function() { return this.$val.reset(); }; - CheckedEntry.ptr.prototype.Write = function(fields) { - var {_1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tmp, _tmp$1, ce, err, fields, i, msg, should, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ce = this; - if (ce === ptrType$8.nil) { - $s = -1; return; - } - /* */ if (ce.dirty) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ce.dirty) { */ case 1: - /* */ if (!($interfaceIsEqual(ce.ErrorOutput, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(ce.ErrorOutput, $ifaceNil))) { */ case 3: - _arg = ce.ErrorOutput; - _r = time.Now(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = (x$2 = _r, new x$2.constructor.elem(x$2)); - _arg$2 = (x$3 = ce.Entry, new x$3.constructor.elem(x$3)); - _r$1 = fmt.Fprintf(_arg, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", new sliceType([_arg$1, _arg$2])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = ce.ErrorOutput.Sync(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 4: - $s = -1; return; - /* } */ case 2: - ce.dirty = true; - err = $ifaceNil; - _ref = ce.cores; - _i = 0; - /* while (true) { */ case 8: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } - i = _i; - _arg$3 = err; - _r$3 = (x$4 = ce.cores, ((i < 0 || i >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i])).Write($clone(ce.Entry, Entry), fields); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$4 = _r$3; - _r$4 = multierr.Append(_arg$3, _arg$4); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - _i++; - $s = 8; continue; - case 9: - /* */ if (!($interfaceIsEqual(ce.ErrorOutput, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(ce.ErrorOutput, $ifaceNil))) { */ case 12: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - _arg$5 = ce.ErrorOutput; - _r$5 = time.Now(); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$6 = (x$5 = _r$5, new x$5.constructor.elem(x$5)); - _arg$7 = err; - _r$6 = fmt.Fprintf(_arg$5, "%v write error: %v\n", new sliceType([_arg$6, _arg$7])); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = ce.ErrorOutput.Sync(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 15: - /* } */ case 13: - _tmp = ce.should; - _tmp$1 = ce.Entry.Message; - should = _tmp; - msg = _tmp$1; - putCheckedEntry(ce); - _1 = should; - /* */ if (_1 === (1)) { $s = 20; continue; } - /* */ if (_1 === (2)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_1 === (1)) { */ case 20: - $panic(new $String(msg)); - $s = 22; continue; - /* } else if (_1 === (2)) { */ case 21: - $r = exit.Exit(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 22: - case 19: - $s = -1; return; - /* */ } return; } var $f = {$blk: CheckedEntry.ptr.prototype.Write, $c: true, $r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tmp, _tmp$1, ce, err, fields, i, msg, should, x$2, x$3, x$4, x$5, $s};return $f; - }; - CheckedEntry.prototype.Write = function(fields) { return this.$val.Write(fields); }; - CheckedEntry.ptr.prototype.AddCore = function(ent, core) { - var {_r, ce, core, ent, $s, $r, $c} = $restore(this, {ent, core}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ce = this; - /* */ if (ce === ptrType$8.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ce === ptrType$8.nil) { */ case 1: - _r = getCheckedEntry(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - Entry.copy(ce.Entry, ent); - /* } */ case 2: - ce.cores = $append(ce.cores, core); - $s = -1; return ce; - /* */ } return; } var $f = {$blk: CheckedEntry.ptr.prototype.AddCore, $c: true, $r, _r, ce, core, ent, $s};return $f; - }; - CheckedEntry.prototype.AddCore = function(ent, core) { return this.$val.AddCore(ent, core); }; - CheckedEntry.ptr.prototype.Should = function(ent, should) { - var {_r, ce, ent, should, $s, $r, $c} = $restore(this, {ent, should}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ce = this; - /* */ if (ce === ptrType$8.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ce === ptrType$8.nil) { */ case 1: - _r = getCheckedEntry(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - Entry.copy(ce.Entry, ent); - /* } */ case 2: - ce.should = should; - $s = -1; return ce; - /* */ } return; } var $f = {$blk: CheckedEntry.ptr.prototype.Should, $c: true, $r, _r, ce, ent, should, $s};return $f; - }; - CheckedEntry.prototype.Should = function(ent, should) { return this.$val.Should(ent, should); }; - LowercaseLevelEncoder = function(l, enc) { - var {_r, enc, l, $s, $r, $c} = $restore(this, {l, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = new Level(l).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = enc.AppendString(_r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: LowercaseLevelEncoder, $c: true, $r, _r, enc, l, $s};return $f; - }; - $pkg.LowercaseLevelEncoder = LowercaseLevelEncoder; - LowercaseColorLevelEncoder = function(l, enc) { - var {_entry, _r, _r$1, _tuple, enc, l, ok, s, $s, $r, $c} = $restore(this, {l, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = (_entry = _levelToLowercaseColorString[Level.keyFor(l)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = new Level(l).String(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = new color.Color(_unknownLevelColor).Add(_r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - s = _r$1; - /* } */ case 2: - $r = enc.AppendString(s); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: LowercaseColorLevelEncoder, $c: true, $r, _entry, _r, _r$1, _tuple, enc, l, ok, s, $s};return $f; - }; - $pkg.LowercaseColorLevelEncoder = LowercaseColorLevelEncoder; - CapitalLevelEncoder = function(l, enc) { - var {_r, enc, l, $s, $r, $c} = $restore(this, {l, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = new Level(l).CapitalString(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = enc.AppendString(_r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: CapitalLevelEncoder, $c: true, $r, _r, enc, l, $s};return $f; - }; - $pkg.CapitalLevelEncoder = CapitalLevelEncoder; - CapitalColorLevelEncoder = function(l, enc) { - var {_entry, _r, _r$1, _tuple, enc, l, ok, s, $s, $r, $c} = $restore(this, {l, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = (_entry = _levelToCapitalColorString[Level.keyFor(l)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = new Level(l).CapitalString(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = new color.Color(_unknownLevelColor).Add(_r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - s = _r$1; - /* } */ case 2: - $r = enc.AppendString(s); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: CapitalColorLevelEncoder, $c: true, $r, _entry, _r, _r$1, _tuple, enc, l, ok, s, $s};return $f; - }; - $pkg.CapitalColorLevelEncoder = CapitalColorLevelEncoder; - $ptrType(LevelEncoder).prototype.UnmarshalText = function(text) { - var _1, e, text; - e = this; - _1 = ($bytesToString(text)); - if (_1 === ("capital")) { - e.$set(CapitalLevelEncoder); - } else if (_1 === ("capitalColor")) { - e.$set(CapitalColorLevelEncoder); - } else if (_1 === ("color")) { - e.$set(LowercaseColorLevelEncoder); - } else { - e.$set(LowercaseLevelEncoder); - } - return $ifaceNil; - }; - EpochTimeEncoder = function(t, enc) { - var {enc, nanos, sec, t, $s, $r, $c} = $restore(this, {t, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nanos = $clone(t, time.Time).UnixNano(); - sec = ($flatten64(nanos)) / 1e+09; - $r = enc.AppendFloat64(sec); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: EpochTimeEncoder, $c: true, $r, enc, nanos, sec, t, $s};return $f; - }; - $pkg.EpochTimeEncoder = EpochTimeEncoder; - EpochMillisTimeEncoder = function(t, enc) { - var {enc, millis, nanos, t, $s, $r, $c} = $restore(this, {t, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nanos = $clone(t, time.Time).UnixNano(); - millis = ($flatten64(nanos)) / 1e+06; - $r = enc.AppendFloat64(millis); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: EpochMillisTimeEncoder, $c: true, $r, enc, millis, nanos, t, $s};return $f; - }; - $pkg.EpochMillisTimeEncoder = EpochMillisTimeEncoder; - EpochNanosTimeEncoder = function(t, enc) { - var {enc, t, $s, $r, $c} = $restore(this, {t, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = enc.AppendInt64($clone(t, time.Time).UnixNano()); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: EpochNanosTimeEncoder, $c: true, $r, enc, t, $s};return $f; - }; - $pkg.EpochNanosTimeEncoder = EpochNanosTimeEncoder; - ISO8601TimeEncoder = function(t, enc) { - var {_r, enc, t, $s, $r, $c} = $restore(this, {t, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(t, time.Time).Format("2006-01-02T15:04:05.000Z0700"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = enc.AppendString(_r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: ISO8601TimeEncoder, $c: true, $r, _r, enc, t, $s};return $f; - }; - $pkg.ISO8601TimeEncoder = ISO8601TimeEncoder; - $ptrType(TimeEncoder).prototype.UnmarshalText = function(text) { - var _1, e, text; - e = this; - _1 = ($bytesToString(text)); - if (_1 === ("iso8601") || _1 === ("ISO8601")) { - e.$set(ISO8601TimeEncoder); - } else if (_1 === ("millis")) { - e.$set(EpochMillisTimeEncoder); - } else if (_1 === ("nanos")) { - e.$set(EpochNanosTimeEncoder); - } else { - e.$set(EpochTimeEncoder); - } - return $ifaceNil; - }; - SecondsDurationEncoder = function(d, enc) { - var {d, enc, $s, $r, $c} = $restore(this, {d, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = enc.AppendFloat64(($flatten64(d)) / 1e+09); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SecondsDurationEncoder, $c: true, $r, d, enc, $s};return $f; - }; - $pkg.SecondsDurationEncoder = SecondsDurationEncoder; - NanosDurationEncoder = function(d, enc) { - var {d, enc, $s, $r, $c} = $restore(this, {d, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = enc.AppendInt64((new $Int64(d.$high, d.$low))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: NanosDurationEncoder, $c: true, $r, d, enc, $s};return $f; - }; - $pkg.NanosDurationEncoder = NanosDurationEncoder; - StringDurationEncoder = function(d, enc) { - var {d, enc, $s, $r, $c} = $restore(this, {d, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = enc.AppendString(d.String()); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: StringDurationEncoder, $c: true, $r, d, enc, $s};return $f; - }; - $pkg.StringDurationEncoder = StringDurationEncoder; - $ptrType(DurationEncoder).prototype.UnmarshalText = function(text) { - var _1, e, text; - e = this; - _1 = ($bytesToString(text)); - if (_1 === ("string")) { - e.$set(StringDurationEncoder); - } else if (_1 === ("nanos")) { - e.$set(NanosDurationEncoder); - } else { - e.$set(SecondsDurationEncoder); - } - return $ifaceNil; - }; - FullCallerEncoder = function(caller, enc) { - var {_r, caller, enc, $s, $r, $c} = $restore(this, {caller, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(caller, EntryCaller).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = enc.AppendString(_r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FullCallerEncoder, $c: true, $r, _r, caller, enc, $s};return $f; - }; - $pkg.FullCallerEncoder = FullCallerEncoder; - ShortCallerEncoder = function(caller, enc) { - var {_r, caller, enc, $s, $r, $c} = $restore(this, {caller, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(caller, EntryCaller).TrimmedPath(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = enc.AppendString(_r); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: ShortCallerEncoder, $c: true, $r, _r, caller, enc, $s};return $f; - }; - $pkg.ShortCallerEncoder = ShortCallerEncoder; - $ptrType(CallerEncoder).prototype.UnmarshalText = function(text) { - var _1, e, text; - e = this; - _1 = ($bytesToString(text)); - if (_1 === ("full")) { - e.$set(FullCallerEncoder); - } else { - e.$set(ShortCallerEncoder); - } - return $ifaceNil; - }; - FullNameEncoder = function(loggerName, enc) { - var {enc, loggerName, $s, $r, $c} = $restore(this, {loggerName, enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = enc.AppendString(loggerName); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: FullNameEncoder, $c: true, $r, enc, loggerName, $s};return $f; - }; - $pkg.FullNameEncoder = FullNameEncoder; - $ptrType(NameEncoder).prototype.UnmarshalText = function(text) { - var _1, e, text; - e = this; - _1 = ($bytesToString(text)); - if (_1 === ("full")) { - e.$set(FullNameEncoder); - } else { - e.$set(FullNameEncoder); - } - return $ifaceNil; - }; - NewNopCore = function() { - var x$2; - return (x$2 = new nopCore.ptr(), new x$2.constructor.elem(x$2)); - }; - $pkg.NewNopCore = NewNopCore; - nopCore.ptr.prototype.Enabled = function(param) { - var param; - return false; - }; - nopCore.prototype.Enabled = function(param) { return this.$val.Enabled(param); }; - nopCore.ptr.prototype.With = function(param) { - var n, param; - n = this; - return new n.constructor.elem(n); - }; - nopCore.prototype.With = function(param) { return this.$val.With(param); }; - nopCore.ptr.prototype.Check = function(param, ce) { - var ce, param; - return ce; - }; - nopCore.prototype.Check = function(param, ce) { return this.$val.Check(param, ce); }; - nopCore.ptr.prototype.Write = function(param, param$1) { - var param, param$1; - return $ifaceNil; - }; - nopCore.prototype.Write = function(param, param$1) { return this.$val.Write(param, param$1); }; - nopCore.ptr.prototype.Sync = function() { - return $ifaceNil; - }; - nopCore.prototype.Sync = function() { return this.$val.Sync(); }; - NewCore = function(enc, ws, enab) { - var enab, enc, ws; - return new ioCore.ptr(enab, enc, ws); - }; - $pkg.NewCore = NewCore; - ioCore.ptr.prototype.With = function(fields) { - var {_r, c, clone, fields, $s, $r, $c} = $restore(this, {fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - clone = _r; - $r = addFields(clone.enc, fields); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return clone; - /* */ } return; } var $f = {$blk: ioCore.ptr.prototype.With, $c: true, $r, _r, c, clone, fields, $s};return $f; - }; - ioCore.prototype.With = function(fields) { return this.$val.With(fields); }; - ioCore.ptr.prototype.Check = function(ent, ce) { - var {$24r, _r, _r$1, c, ce, ent, $s, $r, $c} = $restore(this, {ent, ce}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.LevelEnabler.Enabled(ent.Level); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r) { */ case 1: - _r$1 = ce.AddCore($clone(ent, Entry), c); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 2: - $s = -1; return ce; - /* */ } return; } var $f = {$blk: ioCore.ptr.prototype.Check, $c: true, $r, $24r, _r, _r$1, c, ce, ent, $s};return $f; - }; - ioCore.prototype.Check = function(ent, ce) { return this.$val.Check(ent, ce); }; - ioCore.ptr.prototype.Write = function(ent, fields) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, buf, c, ent, err, fields, $s, $r, $c} = $restore(this, {ent, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.enc.EncodeEntry($clone(ent, Entry), fields); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - buf = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$1 = c.out.Write(buf.Bytes()); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - err = _tuple$1[1]; - buf.Free(); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (ent.Level > 2) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ent.Level > 2) { */ case 3: - _r$2 = c.Sync(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ioCore.ptr.prototype.Write, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, buf, c, ent, err, fields, $s};return $f; - }; - ioCore.prototype.Write = function(ent, fields) { return this.$val.Write(ent, fields); }; - ioCore.ptr.prototype.Sync = function() { - var {$24r, _r, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.out.Sync(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ioCore.ptr.prototype.Sync, $c: true, $r, $24r, _r, c, $s};return $f; - }; - ioCore.prototype.Sync = function() { return this.$val.Sync(); }; - ioCore.ptr.prototype.clone = function() { - var {$24r, _r, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.enc.Clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new ioCore.ptr(c.LevelEnabler, _r, c.out); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ioCore.ptr.prototype.clone, $c: true, $r, $24r, _r, c, $s};return $f; - }; - ioCore.prototype.clone = function() { return this.$val.clone(); }; - getSliceEncoder = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = _sliceEncoderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = $assertType(_r, ptrType$10); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: getSliceEncoder, $c: true, $r, $24r, _r, $s};return $f; - }; - putSliceEncoder = function(e) { - var e; - e.elems = $subslice(e.elems, 0, 0); - _sliceEncoderPool.Put(e); - }; - NewConsoleEncoder = function(cfg) { - var {$24r, _r, cfg, x$2, $s, $r, $c} = $restore(this, {cfg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newJSONEncoder($clone(cfg, EncoderConfig), true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (x$2 = new consoleEncoder.ptr(_r), new x$2.constructor.elem(x$2)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewConsoleEncoder, $c: true, $r, $24r, _r, cfg, x$2, $s};return $f; - }; - $pkg.NewConsoleEncoder = NewConsoleEncoder; - consoleEncoder.ptr.prototype.Clone = function() { - var {$24r, _r, c, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.jsonEncoder.Clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (x$2 = new consoleEncoder.ptr($assertType(_r, ptrType$7)), new x$2.constructor.elem(x$2)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: consoleEncoder.ptr.prototype.Clone, $c: true, $r, $24r, _r, c, x$2, $s};return $f; - }; - consoleEncoder.prototype.Clone = function() { return this.$val.Clone(); }; - consoleEncoder.ptr.prototype.EncodeEntry = function(ent, fields) { - var {_i, _r, _r$1, _r$2, _ref, arr, c, ent, fields, i, line, nameEncoder, x$2, $s, $r, $c} = $restore(this, {ent, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = bufferpool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - line = _r; - _r$1 = getSliceEncoder(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - arr = _r$1; - /* */ if (!(c.jsonEncoder.EncoderConfig.TimeKey === "") && !(c.jsonEncoder.EncoderConfig.EncodeTime === $throwNilPointerError)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(c.jsonEncoder.EncoderConfig.TimeKey === "") && !(c.jsonEncoder.EncoderConfig.EncodeTime === $throwNilPointerError)) { */ case 3: - $r = c.jsonEncoder.EncoderConfig.EncodeTime($clone(ent.Time, time.Time), arr); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - /* */ if (!(c.jsonEncoder.EncoderConfig.LevelKey === "") && !(c.jsonEncoder.EncoderConfig.EncodeLevel === $throwNilPointerError)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(c.jsonEncoder.EncoderConfig.LevelKey === "") && !(c.jsonEncoder.EncoderConfig.EncodeLevel === $throwNilPointerError)) { */ case 6: - $r = c.jsonEncoder.EncoderConfig.EncodeLevel(ent.Level, arr); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - /* */ if (!(ent.LoggerName === "") && !(c.jsonEncoder.EncoderConfig.NameKey === "")) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(ent.LoggerName === "") && !(c.jsonEncoder.EncoderConfig.NameKey === "")) { */ case 9: - nameEncoder = c.jsonEncoder.EncoderConfig.EncodeName; - if (nameEncoder === $throwNilPointerError) { - nameEncoder = FullNameEncoder; - } - $r = nameEncoder(ent.LoggerName, arr); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* */ if (ent.Caller.Defined && !(c.jsonEncoder.EncoderConfig.CallerKey === "") && !(c.jsonEncoder.EncoderConfig.EncodeCaller === $throwNilPointerError)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (ent.Caller.Defined && !(c.jsonEncoder.EncoderConfig.CallerKey === "") && !(c.jsonEncoder.EncoderConfig.EncodeCaller === $throwNilPointerError)) { */ case 12: - $r = c.jsonEncoder.EncoderConfig.EncodeCaller($clone(ent.Caller, EntryCaller), arr); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - _ref = arr.elems; - _i = 0; - /* while (true) { */ case 15: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 16; continue; } - i = _i; - if (i > 0) { - line.AppendByte(9); - } - _r$2 = fmt.Fprint(line, new sliceType([(x$2 = arr.elems, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i]))])); /* */ $s = 17; case 17: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _i++; - $s = 15; continue; - case 16: - putSliceEncoder(arr); - if (!(c.jsonEncoder.EncoderConfig.MessageKey === "")) { - $clone(c, consoleEncoder).addTabIfNecessary(line); - line.AppendString(ent.Message); - } - $r = $clone(c, consoleEncoder).writeContext(line, fields); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(ent.Stack === "") && !(c.jsonEncoder.EncoderConfig.StacktraceKey === "")) { - line.AppendByte(10); - line.AppendString(ent.Stack); - } - if (!(c.jsonEncoder.EncoderConfig.LineEnding === "")) { - line.AppendString(c.jsonEncoder.EncoderConfig.LineEnding); - } else { - line.AppendString("\n"); - } - $s = -1; return [line, $ifaceNil]; - /* */ } return; } var $f = {$blk: consoleEncoder.ptr.prototype.EncodeEntry, $c: true, $r, _i, _r, _r$1, _r$2, _ref, arr, c, ent, fields, i, line, nameEncoder, x$2, $s};return $f; - }; - consoleEncoder.prototype.EncodeEntry = function(ent, fields) { return this.$val.EncodeEntry(ent, fields); }; - consoleEncoder.ptr.prototype.writeContext = function(line, extra) { - var {_r, c, context, extra, line, $s, $deferred, $r, $c} = $restore(this, {line, extra}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - _r = c.jsonEncoder.Clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - context = $assertType(_r, ptrType$7); - $deferred.push([$methodVal(context.buf, "Free"), []]); - $r = addFields(context, extra); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - context.closeOpenNamespaces(); - /* */ if (context.buf.Len() === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (context.buf.Len() === 0) { */ case 3: - $s = 5; case 5: return; - /* } */ case 4: - $clone(c, consoleEncoder).addTabIfNecessary(line); - line.AppendByte(123); - line.Write(context.buf.Bytes()); - line.AppendByte(125); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: consoleEncoder.ptr.prototype.writeContext, $c: true, $r, _r, c, context, extra, line, $s, $deferred};return $f; } } - }; - consoleEncoder.prototype.writeContext = function(line, extra) { return this.$val.writeContext(line, extra); }; - consoleEncoder.ptr.prototype.addTabIfNecessary = function(line) { - var c, line; - c = this; - if (line.Len() > 0) { - line.AppendByte(9); - } - }; - consoleEncoder.prototype.addTabIfNecessary = function(line) { return this.$val.addTabIfNecessary(line); }; - ptrType$4.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}]; - writerWrapper.methods = [{prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}]; - multiWriteSyncer.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$11.methods = [{prop: "IncCheckReset", name: "IncCheckReset", pkg: "", typ: $funcType([time.Time, time.Duration], [$Uint64], false)}]; - ptrType$5.methods = [{prop: "get", name: "get", pkg: "go.uber.org/zap/zapcore", typ: $funcType([Level, $String], [ptrType$11], false)}]; - ptrType$12.methods = [{prop: "With", name: "With", pkg: "", typ: $funcType([sliceType$5], [Core], false)}, {prop: "Check", name: "Check", pkg: "", typ: $funcType([Entry, ptrType$8], [ptrType$8], false)}]; - MapObjectEncoder.methods = [{prop: "AddDuration", name: "AddDuration", pkg: "", typ: $funcType([$String, time.Duration], [], false)}, {prop: "AddTime", name: "AddTime", pkg: "", typ: $funcType([$String, time.Time], [], false)}]; - ptrType$13.methods = [{prop: "AddArray", name: "AddArray", pkg: "", typ: $funcType([$String, ArrayMarshaler], [$error], false)}, {prop: "AddObject", name: "AddObject", pkg: "", typ: $funcType([$String, ObjectMarshaler], [$error], false)}, {prop: "AddBinary", name: "AddBinary", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddByteString", name: "AddByteString", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddBool", name: "AddBool", pkg: "", typ: $funcType([$String, $Bool], [], false)}, {prop: "AddComplex128", name: "AddComplex128", pkg: "", typ: $funcType([$String, $Complex128], [], false)}, {prop: "AddComplex64", name: "AddComplex64", pkg: "", typ: $funcType([$String, $Complex64], [], false)}, {prop: "AddFloat64", name: "AddFloat64", pkg: "", typ: $funcType([$String, $Float64], [], false)}, {prop: "AddFloat32", name: "AddFloat32", pkg: "", typ: $funcType([$String, $Float32], [], false)}, {prop: "AddInt", name: "AddInt", pkg: "", typ: $funcType([$String, $Int], [], false)}, {prop: "AddInt64", name: "AddInt64", pkg: "", typ: $funcType([$String, $Int64], [], false)}, {prop: "AddInt32", name: "AddInt32", pkg: "", typ: $funcType([$String, $Int32], [], false)}, {prop: "AddInt16", name: "AddInt16", pkg: "", typ: $funcType([$String, $Int16], [], false)}, {prop: "AddInt8", name: "AddInt8", pkg: "", typ: $funcType([$String, $Int8], [], false)}, {prop: "AddString", name: "AddString", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "AddUint", name: "AddUint", pkg: "", typ: $funcType([$String, $Uint], [], false)}, {prop: "AddUint64", name: "AddUint64", pkg: "", typ: $funcType([$String, $Uint64], [], false)}, {prop: "AddUint32", name: "AddUint32", pkg: "", typ: $funcType([$String, $Uint32], [], false)}, {prop: "AddUint16", name: "AddUint16", pkg: "", typ: $funcType([$String, $Uint16], [], false)}, {prop: "AddUint8", name: "AddUint8", pkg: "", typ: $funcType([$String, $Uint8], [], false)}, {prop: "AddUintptr", name: "AddUintptr", pkg: "", typ: $funcType([$String, $Uintptr], [], false)}, {prop: "AddReflected", name: "AddReflected", pkg: "", typ: $funcType([$String, $emptyInterface], [$error], false)}, {prop: "OpenNamespace", name: "OpenNamespace", pkg: "", typ: $funcType([$String], [], false)}]; - ptrType$10.methods = [{prop: "AppendArray", name: "AppendArray", pkg: "", typ: $funcType([ArrayMarshaler], [$error], false)}, {prop: "AppendObject", name: "AppendObject", pkg: "", typ: $funcType([ObjectMarshaler], [$error], false)}, {prop: "AppendReflected", name: "AppendReflected", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "AppendBool", name: "AppendBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "AppendByteString", name: "AppendByteString", pkg: "", typ: $funcType([sliceType$3], [], false)}, {prop: "AppendComplex128", name: "AppendComplex128", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "AppendComplex64", name: "AppendComplex64", pkg: "", typ: $funcType([$Complex64], [], false)}, {prop: "AppendDuration", name: "AppendDuration", pkg: "", typ: $funcType([time.Duration], [], false)}, {prop: "AppendFloat64", name: "AppendFloat64", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "AppendFloat32", name: "AppendFloat32", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "AppendInt", name: "AppendInt", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "AppendInt64", name: "AppendInt64", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "AppendInt32", name: "AppendInt32", pkg: "", typ: $funcType([$Int32], [], false)}, {prop: "AppendInt16", name: "AppendInt16", pkg: "", typ: $funcType([$Int16], [], false)}, {prop: "AppendInt8", name: "AppendInt8", pkg: "", typ: $funcType([$Int8], [], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "AppendTime", name: "AppendTime", pkg: "", typ: $funcType([time.Time], [], false)}, {prop: "AppendUint", name: "AppendUint", pkg: "", typ: $funcType([$Uint], [], false)}, {prop: "AppendUint64", name: "AppendUint64", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "AppendUint32", name: "AppendUint32", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AppendUint16", name: "AppendUint16", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "AppendUint8", name: "AppendUint8", pkg: "", typ: $funcType([$Uint8], [], false)}, {prop: "AppendUintptr", name: "AppendUintptr", pkg: "", typ: $funcType([$Uintptr], [], false)}]; - Level.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "CapitalString", name: "CapitalString", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$3, $error], false)}, {prop: "Enabled", name: "Enabled", pkg: "", typ: $funcType([Level], [$Bool], false)}]; - ptrType$6.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}, {prop: "unmarshalText", name: "unmarshalText", pkg: "go.uber.org/zap/zapcore", typ: $funcType([sliceType$3], [$Bool], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}]; - ptrType$7.methods = [{prop: "AddArray", name: "AddArray", pkg: "", typ: $funcType([$String, ArrayMarshaler], [$error], false)}, {prop: "AddObject", name: "AddObject", pkg: "", typ: $funcType([$String, ObjectMarshaler], [$error], false)}, {prop: "AddBinary", name: "AddBinary", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddByteString", name: "AddByteString", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddBool", name: "AddBool", pkg: "", typ: $funcType([$String, $Bool], [], false)}, {prop: "AddComplex128", name: "AddComplex128", pkg: "", typ: $funcType([$String, $Complex128], [], false)}, {prop: "AddDuration", name: "AddDuration", pkg: "", typ: $funcType([$String, time.Duration], [], false)}, {prop: "AddFloat64", name: "AddFloat64", pkg: "", typ: $funcType([$String, $Float64], [], false)}, {prop: "AddInt64", name: "AddInt64", pkg: "", typ: $funcType([$String, $Int64], [], false)}, {prop: "resetReflectBuf", name: "resetReflectBuf", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [], false)}, {prop: "AddReflected", name: "AddReflected", pkg: "", typ: $funcType([$String, $emptyInterface], [$error], false)}, {prop: "OpenNamespace", name: "OpenNamespace", pkg: "", typ: $funcType([$String], [], false)}, {prop: "AddString", name: "AddString", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "AddTime", name: "AddTime", pkg: "", typ: $funcType([$String, time.Time], [], false)}, {prop: "AddUint64", name: "AddUint64", pkg: "", typ: $funcType([$String, $Uint64], [], false)}, {prop: "AppendArray", name: "AppendArray", pkg: "", typ: $funcType([ArrayMarshaler], [$error], false)}, {prop: "AppendObject", name: "AppendObject", pkg: "", typ: $funcType([ObjectMarshaler], [$error], false)}, {prop: "AppendBool", name: "AppendBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "AppendByteString", name: "AppendByteString", pkg: "", typ: $funcType([sliceType$3], [], false)}, {prop: "AppendComplex128", name: "AppendComplex128", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "AppendDuration", name: "AppendDuration", pkg: "", typ: $funcType([time.Duration], [], false)}, {prop: "AppendInt64", name: "AppendInt64", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "AppendReflected", name: "AppendReflected", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "AppendTime", name: "AppendTime", pkg: "", typ: $funcType([time.Time], [], false)}, {prop: "AppendUint64", name: "AppendUint64", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "AddComplex64", name: "AddComplex64", pkg: "", typ: $funcType([$String, $Complex64], [], false)}, {prop: "AddFloat32", name: "AddFloat32", pkg: "", typ: $funcType([$String, $Float32], [], false)}, {prop: "AddInt", name: "AddInt", pkg: "", typ: $funcType([$String, $Int], [], false)}, {prop: "AddInt32", name: "AddInt32", pkg: "", typ: $funcType([$String, $Int32], [], false)}, {prop: "AddInt16", name: "AddInt16", pkg: "", typ: $funcType([$String, $Int16], [], false)}, {prop: "AddInt8", name: "AddInt8", pkg: "", typ: $funcType([$String, $Int8], [], false)}, {prop: "AddUint", name: "AddUint", pkg: "", typ: $funcType([$String, $Uint], [], false)}, {prop: "AddUint32", name: "AddUint32", pkg: "", typ: $funcType([$String, $Uint32], [], false)}, {prop: "AddUint16", name: "AddUint16", pkg: "", typ: $funcType([$String, $Uint16], [], false)}, {prop: "AddUint8", name: "AddUint8", pkg: "", typ: $funcType([$String, $Uint8], [], false)}, {prop: "AddUintptr", name: "AddUintptr", pkg: "", typ: $funcType([$String, $Uintptr], [], false)}, {prop: "AppendComplex64", name: "AppendComplex64", pkg: "", typ: $funcType([$Complex64], [], false)}, {prop: "AppendFloat64", name: "AppendFloat64", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "AppendFloat32", name: "AppendFloat32", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "AppendInt", name: "AppendInt", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "AppendInt32", name: "AppendInt32", pkg: "", typ: $funcType([$Int32], [], false)}, {prop: "AppendInt16", name: "AppendInt16", pkg: "", typ: $funcType([$Int16], [], false)}, {prop: "AppendInt8", name: "AppendInt8", pkg: "", typ: $funcType([$Int8], [], false)}, {prop: "AppendUint", name: "AppendUint", pkg: "", typ: $funcType([$Uint], [], false)}, {prop: "AppendUint32", name: "AppendUint32", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AppendUint16", name: "AppendUint16", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "AppendUint8", name: "AppendUint8", pkg: "", typ: $funcType([$Uint8], [], false)}, {prop: "AppendUintptr", name: "AppendUintptr", pkg: "", typ: $funcType([$Uintptr], [], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Encoder], false)}, {prop: "clone", name: "clone", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [ptrType$7], false)}, {prop: "EncodeEntry", name: "EncodeEntry", pkg: "", typ: $funcType([Entry, sliceType$5], [ptrType$1, $error], false)}, {prop: "truncate", name: "truncate", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [], false)}, {prop: "closeOpenNamespaces", name: "closeOpenNamespaces", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [], false)}, {prop: "addKey", name: "addKey", pkg: "go.uber.org/zap/zapcore", typ: $funcType([$String], [], false)}, {prop: "addElementSeparator", name: "addElementSeparator", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [], false)}, {prop: "appendFloat", name: "appendFloat", pkg: "go.uber.org/zap/zapcore", typ: $funcType([$Float64, $Int], [], false)}, {prop: "safeAddString", name: "safeAddString", pkg: "go.uber.org/zap/zapcore", typ: $funcType([$String], [], false)}, {prop: "safeAddByteString", name: "safeAddByteString", pkg: "go.uber.org/zap/zapcore", typ: $funcType([sliceType$3], [], false)}, {prop: "tryAddRuneSelf", name: "tryAddRuneSelf", pkg: "go.uber.org/zap/zapcore", typ: $funcType([$Uint8], [$Bool], false)}, {prop: "tryAddRuneError", name: "tryAddRuneError", pkg: "go.uber.org/zap/zapcore", typ: $funcType([$Int32, $Int], [$Bool], false)}]; - Field.methods = [{prop: "AddTo", name: "AddTo", pkg: "", typ: $funcType([ObjectEncoder], [], false)}, {prop: "Equals", name: "Equals", pkg: "", typ: $funcType([Field], [$Bool], false)}]; - errArray.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([ArrayEncoder], [$error], false)}]; - ptrType$9.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([ArrayEncoder], [$error], false)}, {prop: "MarshalLogObject", name: "MarshalLogObject", pkg: "", typ: $funcType([ObjectEncoder], [$error], false)}, {prop: "Free", name: "Free", pkg: "", typ: $funcType([], [], false)}]; - EntryCaller.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "FullPath", name: "FullPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "TrimmedPath", name: "TrimmedPath", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$8.methods = [{prop: "reset", name: "reset", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$5], [], true)}, {prop: "AddCore", name: "AddCore", pkg: "", typ: $funcType([Entry, Core], [ptrType$8], false)}, {prop: "Should", name: "Should", pkg: "", typ: $funcType([Entry, CheckWriteAction], [ptrType$8], false)}]; - ptrType$15.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; - ptrType$16.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; - ptrType$17.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; - ptrType$18.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; - ptrType$19.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$3], [$error], false)}]; - nopCore.methods = [{prop: "Enabled", name: "Enabled", pkg: "", typ: $funcType([Level], [$Bool], false)}, {prop: "With", name: "With", pkg: "", typ: $funcType([sliceType$5], [Core], false)}, {prop: "Check", name: "Check", pkg: "", typ: $funcType([Entry, ptrType$8], [ptrType$8], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([Entry, sliceType$5], [$error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$20.methods = [{prop: "With", name: "With", pkg: "", typ: $funcType([sliceType$5], [Core], false)}, {prop: "Check", name: "Check", pkg: "", typ: $funcType([Entry, ptrType$8], [ptrType$8], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([Entry, sliceType$5], [$error], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "clone", name: "clone", pkg: "go.uber.org/zap/zapcore", typ: $funcType([], [ptrType$20], false)}]; - consoleEncoder.methods = [{prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Encoder], false)}, {prop: "EncodeEntry", name: "EncodeEntry", pkg: "", typ: $funcType([Entry, sliceType$5], [ptrType$1, $error], false)}, {prop: "writeContext", name: "writeContext", pkg: "go.uber.org/zap/zapcore", typ: $funcType([ptrType$1, sliceType$5], [], false)}, {prop: "addTabIfNecessary", name: "addTabIfNecessary", pkg: "go.uber.org/zap/zapcore", typ: $funcType([ptrType$1], [], false)}]; - WriteSyncer.init([{prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]); - lockedWriteSyncer.init("go.uber.org/zap/zapcore", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: sync.Mutex, tag: ""}, {prop: "ws", name: "ws", embedded: false, exported: false, typ: WriteSyncer, tag: ""}]); - writerWrapper.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]); - multiWriteSyncer.init(WriteSyncer); - counter.init("go.uber.org/zap/zapcore", [{prop: "resetAt", name: "resetAt", embedded: false, exported: false, typ: atomic.Int64, tag: ""}, {prop: "counter", name: "counter", embedded: false, exported: false, typ: atomic.Uint64, tag: ""}]); - counters.init(arrayType, 7); - sampler.init("go.uber.org/zap/zapcore", [{prop: "Core", name: "Core", embedded: true, exported: true, typ: Core, tag: ""}, {prop: "counts", name: "counts", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "tick", name: "tick", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "first", name: "first", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "thereafter", name: "thereafter", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - MapObjectEncoder.init("go.uber.org/zap/zapcore", [{prop: "Fields", name: "Fields", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "cur", name: "cur", embedded: false, exported: false, typ: mapType, tag: ""}]); - sliceArrayEncoder.init("go.uber.org/zap/zapcore", [{prop: "elems", name: "elems", embedded: false, exported: false, typ: sliceType, tag: ""}]); - ObjectMarshaler.init([{prop: "MarshalLogObject", name: "MarshalLogObject", pkg: "", typ: $funcType([ObjectEncoder], [$error], false)}]); - ArrayMarshaler.init([{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([ArrayEncoder], [$error], false)}]); - LevelEnabler.init([{prop: "Enabled", name: "Enabled", pkg: "", typ: $funcType([Level], [$Bool], false)}]); - jsonEncoder.init("go.uber.org/zap/zapcore", [{prop: "EncoderConfig", name: "EncoderConfig", embedded: true, exported: true, typ: ptrType, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "spaced", name: "spaced", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "openNamespaces", name: "openNamespaces", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "reflectBuf", name: "reflectBuf", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "reflectEnc", name: "reflectEnc", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - Field.init("", [{prop: "Key", name: "Key", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: FieldType, tag: ""}, {prop: "Integer", name: "Integer", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "String", name: "String", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Interface", name: "Interface", embedded: false, exported: true, typ: $emptyInterface, tag: ""}]); - errorGroup.init([{prop: "Errors", name: "Errors", pkg: "", typ: $funcType([], [sliceType$6], false)}]); - errArray.init($error); - errArrayElem.init("go.uber.org/zap/zapcore", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - EntryCaller.init("", [{prop: "Defined", name: "Defined", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PC", name: "PC", embedded: false, exported: true, typ: $Uintptr, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Line", name: "Line", embedded: false, exported: true, typ: $Int, tag: ""}]); - Entry.init("", [{prop: "Level", name: "Level", embedded: false, exported: true, typ: Level, tag: ""}, {prop: "Time", name: "Time", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "LoggerName", name: "LoggerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Message", name: "Message", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Caller", name: "Caller", embedded: false, exported: true, typ: EntryCaller, tag: ""}, {prop: "Stack", name: "Stack", embedded: false, exported: true, typ: $String, tag: ""}]); - CheckedEntry.init("go.uber.org/zap/zapcore", [{prop: "Entry", name: "Entry", embedded: true, exported: true, typ: Entry, tag: ""}, {prop: "ErrorOutput", name: "ErrorOutput", embedded: false, exported: true, typ: WriteSyncer, tag: ""}, {prop: "dirty", name: "dirty", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "should", name: "should", embedded: false, exported: false, typ: CheckWriteAction, tag: ""}, {prop: "cores", name: "cores", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - LevelEncoder.init([Level, PrimitiveArrayEncoder], [], false); - TimeEncoder.init([time.Time, PrimitiveArrayEncoder], [], false); - DurationEncoder.init([time.Duration, PrimitiveArrayEncoder], [], false); - CallerEncoder.init([EntryCaller, PrimitiveArrayEncoder], [], false); - NameEncoder.init([$String, PrimitiveArrayEncoder], [], false); - EncoderConfig.init("", [{prop: "MessageKey", name: "MessageKey", embedded: false, exported: true, typ: $String, tag: "json:\"messageKey\" yaml:\"messageKey\""}, {prop: "LevelKey", name: "LevelKey", embedded: false, exported: true, typ: $String, tag: "json:\"levelKey\" yaml:\"levelKey\""}, {prop: "TimeKey", name: "TimeKey", embedded: false, exported: true, typ: $String, tag: "json:\"timeKey\" yaml:\"timeKey\""}, {prop: "NameKey", name: "NameKey", embedded: false, exported: true, typ: $String, tag: "json:\"nameKey\" yaml:\"nameKey\""}, {prop: "CallerKey", name: "CallerKey", embedded: false, exported: true, typ: $String, tag: "json:\"callerKey\" yaml:\"callerKey\""}, {prop: "StacktraceKey", name: "StacktraceKey", embedded: false, exported: true, typ: $String, tag: "json:\"stacktraceKey\" yaml:\"stacktraceKey\""}, {prop: "LineEnding", name: "LineEnding", embedded: false, exported: true, typ: $String, tag: "json:\"lineEnding\" yaml:\"lineEnding\""}, {prop: "EncodeLevel", name: "EncodeLevel", embedded: false, exported: true, typ: LevelEncoder, tag: "json:\"levelEncoder\" yaml:\"levelEncoder\""}, {prop: "EncodeTime", name: "EncodeTime", embedded: false, exported: true, typ: TimeEncoder, tag: "json:\"timeEncoder\" yaml:\"timeEncoder\""}, {prop: "EncodeDuration", name: "EncodeDuration", embedded: false, exported: true, typ: DurationEncoder, tag: "json:\"durationEncoder\" yaml:\"durationEncoder\""}, {prop: "EncodeCaller", name: "EncodeCaller", embedded: false, exported: true, typ: CallerEncoder, tag: "json:\"callerEncoder\" yaml:\"callerEncoder\""}, {prop: "EncodeName", name: "EncodeName", embedded: false, exported: true, typ: NameEncoder, tag: "json:\"nameEncoder\" yaml:\"nameEncoder\""}]); - ObjectEncoder.init([{prop: "AddArray", name: "AddArray", pkg: "", typ: $funcType([$String, ArrayMarshaler], [$error], false)}, {prop: "AddBinary", name: "AddBinary", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddBool", name: "AddBool", pkg: "", typ: $funcType([$String, $Bool], [], false)}, {prop: "AddByteString", name: "AddByteString", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddComplex128", name: "AddComplex128", pkg: "", typ: $funcType([$String, $Complex128], [], false)}, {prop: "AddComplex64", name: "AddComplex64", pkg: "", typ: $funcType([$String, $Complex64], [], false)}, {prop: "AddDuration", name: "AddDuration", pkg: "", typ: $funcType([$String, time.Duration], [], false)}, {prop: "AddFloat32", name: "AddFloat32", pkg: "", typ: $funcType([$String, $Float32], [], false)}, {prop: "AddFloat64", name: "AddFloat64", pkg: "", typ: $funcType([$String, $Float64], [], false)}, {prop: "AddInt", name: "AddInt", pkg: "", typ: $funcType([$String, $Int], [], false)}, {prop: "AddInt16", name: "AddInt16", pkg: "", typ: $funcType([$String, $Int16], [], false)}, {prop: "AddInt32", name: "AddInt32", pkg: "", typ: $funcType([$String, $Int32], [], false)}, {prop: "AddInt64", name: "AddInt64", pkg: "", typ: $funcType([$String, $Int64], [], false)}, {prop: "AddInt8", name: "AddInt8", pkg: "", typ: $funcType([$String, $Int8], [], false)}, {prop: "AddObject", name: "AddObject", pkg: "", typ: $funcType([$String, ObjectMarshaler], [$error], false)}, {prop: "AddReflected", name: "AddReflected", pkg: "", typ: $funcType([$String, $emptyInterface], [$error], false)}, {prop: "AddString", name: "AddString", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "AddTime", name: "AddTime", pkg: "", typ: $funcType([$String, time.Time], [], false)}, {prop: "AddUint", name: "AddUint", pkg: "", typ: $funcType([$String, $Uint], [], false)}, {prop: "AddUint16", name: "AddUint16", pkg: "", typ: $funcType([$String, $Uint16], [], false)}, {prop: "AddUint32", name: "AddUint32", pkg: "", typ: $funcType([$String, $Uint32], [], false)}, {prop: "AddUint64", name: "AddUint64", pkg: "", typ: $funcType([$String, $Uint64], [], false)}, {prop: "AddUint8", name: "AddUint8", pkg: "", typ: $funcType([$String, $Uint8], [], false)}, {prop: "AddUintptr", name: "AddUintptr", pkg: "", typ: $funcType([$String, $Uintptr], [], false)}, {prop: "OpenNamespace", name: "OpenNamespace", pkg: "", typ: $funcType([$String], [], false)}]); - ArrayEncoder.init([{prop: "AppendArray", name: "AppendArray", pkg: "", typ: $funcType([ArrayMarshaler], [$error], false)}, {prop: "AppendBool", name: "AppendBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "AppendByteString", name: "AppendByteString", pkg: "", typ: $funcType([sliceType$3], [], false)}, {prop: "AppendComplex128", name: "AppendComplex128", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "AppendComplex64", name: "AppendComplex64", pkg: "", typ: $funcType([$Complex64], [], false)}, {prop: "AppendDuration", name: "AppendDuration", pkg: "", typ: $funcType([time.Duration], [], false)}, {prop: "AppendFloat32", name: "AppendFloat32", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "AppendFloat64", name: "AppendFloat64", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "AppendInt", name: "AppendInt", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "AppendInt16", name: "AppendInt16", pkg: "", typ: $funcType([$Int16], [], false)}, {prop: "AppendInt32", name: "AppendInt32", pkg: "", typ: $funcType([$Int32], [], false)}, {prop: "AppendInt64", name: "AppendInt64", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "AppendInt8", name: "AppendInt8", pkg: "", typ: $funcType([$Int8], [], false)}, {prop: "AppendObject", name: "AppendObject", pkg: "", typ: $funcType([ObjectMarshaler], [$error], false)}, {prop: "AppendReflected", name: "AppendReflected", pkg: "", typ: $funcType([$emptyInterface], [$error], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "AppendTime", name: "AppendTime", pkg: "", typ: $funcType([time.Time], [], false)}, {prop: "AppendUint", name: "AppendUint", pkg: "", typ: $funcType([$Uint], [], false)}, {prop: "AppendUint16", name: "AppendUint16", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "AppendUint32", name: "AppendUint32", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AppendUint64", name: "AppendUint64", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "AppendUint8", name: "AppendUint8", pkg: "", typ: $funcType([$Uint8], [], false)}, {prop: "AppendUintptr", name: "AppendUintptr", pkg: "", typ: $funcType([$Uintptr], [], false)}]); - PrimitiveArrayEncoder.init([{prop: "AppendBool", name: "AppendBool", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "AppendByteString", name: "AppendByteString", pkg: "", typ: $funcType([sliceType$3], [], false)}, {prop: "AppendComplex128", name: "AppendComplex128", pkg: "", typ: $funcType([$Complex128], [], false)}, {prop: "AppendComplex64", name: "AppendComplex64", pkg: "", typ: $funcType([$Complex64], [], false)}, {prop: "AppendFloat32", name: "AppendFloat32", pkg: "", typ: $funcType([$Float32], [], false)}, {prop: "AppendFloat64", name: "AppendFloat64", pkg: "", typ: $funcType([$Float64], [], false)}, {prop: "AppendInt", name: "AppendInt", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "AppendInt16", name: "AppendInt16", pkg: "", typ: $funcType([$Int16], [], false)}, {prop: "AppendInt32", name: "AppendInt32", pkg: "", typ: $funcType([$Int32], [], false)}, {prop: "AppendInt64", name: "AppendInt64", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "AppendInt8", name: "AppendInt8", pkg: "", typ: $funcType([$Int8], [], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([$String], [], false)}, {prop: "AppendUint", name: "AppendUint", pkg: "", typ: $funcType([$Uint], [], false)}, {prop: "AppendUint16", name: "AppendUint16", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "AppendUint32", name: "AppendUint32", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AppendUint64", name: "AppendUint64", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "AppendUint8", name: "AppendUint8", pkg: "", typ: $funcType([$Uint8], [], false)}, {prop: "AppendUintptr", name: "AppendUintptr", pkg: "", typ: $funcType([$Uintptr], [], false)}]); - Encoder.init([{prop: "AddArray", name: "AddArray", pkg: "", typ: $funcType([$String, ArrayMarshaler], [$error], false)}, {prop: "AddBinary", name: "AddBinary", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddBool", name: "AddBool", pkg: "", typ: $funcType([$String, $Bool], [], false)}, {prop: "AddByteString", name: "AddByteString", pkg: "", typ: $funcType([$String, sliceType$3], [], false)}, {prop: "AddComplex128", name: "AddComplex128", pkg: "", typ: $funcType([$String, $Complex128], [], false)}, {prop: "AddComplex64", name: "AddComplex64", pkg: "", typ: $funcType([$String, $Complex64], [], false)}, {prop: "AddDuration", name: "AddDuration", pkg: "", typ: $funcType([$String, time.Duration], [], false)}, {prop: "AddFloat32", name: "AddFloat32", pkg: "", typ: $funcType([$String, $Float32], [], false)}, {prop: "AddFloat64", name: "AddFloat64", pkg: "", typ: $funcType([$String, $Float64], [], false)}, {prop: "AddInt", name: "AddInt", pkg: "", typ: $funcType([$String, $Int], [], false)}, {prop: "AddInt16", name: "AddInt16", pkg: "", typ: $funcType([$String, $Int16], [], false)}, {prop: "AddInt32", name: "AddInt32", pkg: "", typ: $funcType([$String, $Int32], [], false)}, {prop: "AddInt64", name: "AddInt64", pkg: "", typ: $funcType([$String, $Int64], [], false)}, {prop: "AddInt8", name: "AddInt8", pkg: "", typ: $funcType([$String, $Int8], [], false)}, {prop: "AddObject", name: "AddObject", pkg: "", typ: $funcType([$String, ObjectMarshaler], [$error], false)}, {prop: "AddReflected", name: "AddReflected", pkg: "", typ: $funcType([$String, $emptyInterface], [$error], false)}, {prop: "AddString", name: "AddString", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "AddTime", name: "AddTime", pkg: "", typ: $funcType([$String, time.Time], [], false)}, {prop: "AddUint", name: "AddUint", pkg: "", typ: $funcType([$String, $Uint], [], false)}, {prop: "AddUint16", name: "AddUint16", pkg: "", typ: $funcType([$String, $Uint16], [], false)}, {prop: "AddUint32", name: "AddUint32", pkg: "", typ: $funcType([$String, $Uint32], [], false)}, {prop: "AddUint64", name: "AddUint64", pkg: "", typ: $funcType([$String, $Uint64], [], false)}, {prop: "AddUint8", name: "AddUint8", pkg: "", typ: $funcType([$String, $Uint8], [], false)}, {prop: "AddUintptr", name: "AddUintptr", pkg: "", typ: $funcType([$String, $Uintptr], [], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Encoder], false)}, {prop: "EncodeEntry", name: "EncodeEntry", pkg: "", typ: $funcType([Entry, sliceType$5], [ptrType$1, $error], false)}, {prop: "OpenNamespace", name: "OpenNamespace", pkg: "", typ: $funcType([$String], [], false)}]); - Core.init([{prop: "Check", name: "Check", pkg: "", typ: $funcType([Entry, ptrType$8], [ptrType$8], false)}, {prop: "Enabled", name: "Enabled", pkg: "", typ: $funcType([Level], [$Bool], false)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "With", name: "With", pkg: "", typ: $funcType([sliceType$5], [Core], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([Entry, sliceType$5], [$error], false)}]); - nopCore.init("", []); - ioCore.init("go.uber.org/zap/zapcore", [{prop: "LevelEnabler", name: "LevelEnabler", embedded: true, exported: true, typ: LevelEnabler, tag: ""}, {prop: "enc", name: "enc", embedded: false, exported: false, typ: Encoder, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: WriteSyncer, tag: ""}]); - consoleEncoder.init("go.uber.org/zap/zapcore", [{prop: "jsonEncoder", name: "jsonEncoder", embedded: true, exported: false, typ: ptrType$7, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = base64.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = json.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = multierr.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = buffer.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bufferpool.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = color.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = exit.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _unknownLevelColor = 31; - errUnmarshalNilLevel = errors.New("can't unmarshal a nil *Level"); - _levelToColor = $makeMap(Level.keyFor, [{ k: -1, v: 35 }, { k: 0, v: 34 }, { k: 1, v: 33 }, { k: 2, v: 31 }, { k: 3, v: 31 }, { k: 4, v: 31 }, { k: 5, v: 31 }]); - _levelToLowercaseColorString = (x = $keys(_levelToColor).length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _levelToCapitalColorString = (x$1 = $keys(_levelToColor).length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _jsonPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new jsonEncoder.ptr(ptrType.nil, ptrType$1.nil, false, 0, ptrType$1.nil, ptrType$2.nil); - })); - _errArrayElemPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new errArrayElem.ptr($ifaceNil); - })); - _cePool = new sync.Pool.ptr(sliceType.nil, (function() { - return new CheckedEntry.ptr(new Entry.ptr(0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$3.nil), "", "", new EntryCaller.ptr(false, 0, "", 0), ""), $ifaceNil, false, 0, $makeSlice(sliceType$1, 4)); - })); - _sliceEncoderPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new sliceArrayEncoder.ptr($makeSlice(sliceType, 0, 2)); - })); - $r = init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["log"] = (function() { - var $pkg = {}, $init, fmt, nosync, io, os, runtime, atomic, time, Logger, sliceType, ptrType, arrayType, ptrType$1, sliceType$1, ptrType$2, std, New, itoa, Printf, Fatalf; - fmt = $packages["fmt"]; - nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; - io = $packages["io"]; - os = $packages["os"]; - runtime = $packages["runtime"]; - atomic = $packages["sync/atomic"]; - time = $packages["time"]; - Logger = $pkg.Logger = $newType(0, $kindStruct, "log.Logger", true, "log", true, function(mu_, prefix_, flag_, out_, buf_, isDiscard_) { - this.$val = this; - if (arguments.length === 0) { - this.mu = new nosync.Mutex.ptr(false); - this.prefix = ""; - this.flag = 0; - this.out = $ifaceNil; - this.buf = sliceType.nil; - this.isDiscard = 0; - return; - } - this.mu = mu_; - this.prefix = prefix_; - this.flag = flag_; - this.out = out_; - this.buf = buf_; - this.isDiscard = isDiscard_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType($Int32); - arrayType = $arrayType($Uint8, 20); - ptrType$1 = $ptrType(sliceType); - sliceType$1 = $sliceType($emptyInterface); - ptrType$2 = $ptrType(Logger); - New = function(out, prefix, flag) { - var flag, l, out, prefix; - l = new Logger.ptr(new nosync.Mutex.ptr(false), prefix, flag, out, sliceType.nil, 0); - if ($interfaceIsEqual(out, io.Discard)) { - l.isDiscard = 1; - } - return l; - }; - $pkg.New = New; - Logger.ptr.prototype.SetOutput = function(w) { - var isDiscard, l, w, $deferred; - /* */ var $err = null; try { $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - l.out = w; - isDiscard = 0; - if ($interfaceIsEqual(w, io.Discard)) { - isDiscard = 1; - } - atomic.StoreInt32((l.$ptr_isDiscard || (l.$ptr_isDiscard = new ptrType(function() { return this.$target.isDiscard; }, function($v) { this.$target.isDiscard = $v; }, l))), isDiscard); - /* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); } - }; - Logger.prototype.SetOutput = function(w) { return this.$val.SetOutput(w); }; - itoa = function(buf, i, wid) { - var _q, b, bp, buf, i, q, wid; - b = arrayType.zero(); - bp = 19; - while (true) { - if (!(i >= 10 || wid > 1)) { break; } - wid = wid - (1) >> 0; - q = (_q = i / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - ((bp < 0 || bp >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[bp] = ((((48 + i >> 0) - ($imul(q, 10)) >> 0) << 24 >>> 24))); - bp = bp - (1) >> 0; - i = q; - } - ((bp < 0 || bp >= b.length) ? ($throwRuntimeError("index out of range"), undefined) : b[bp] = (((48 + i >> 0) << 24 >>> 24))); - buf.$set($appendSlice(buf.$get(), $subslice(new sliceType(b), bp))); - }; - Logger.ptr.prototype.formatHeader = function(buf, t, file, line) { - var {_q, _r, _r$1, _tuple, _tuple$1, buf, day, file, hour, i, l, line, min, month, sec, short$1, t, year, $s, $r, $c} = $restore(this, {buf, t, file, line}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if ((l.flag & 64) === 0) { - buf.$set($appendSlice(buf.$get(), l.prefix)); - } - /* */ if (!(((l.flag & 7) === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(((l.flag & 7) === 0))) { */ case 1: - if (!(((l.flag & 32) === 0))) { - time.Time.copy(t, $clone(t, time.Time).UTC()); - } - /* */ if (!(((l.flag & 1) === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(((l.flag & 1) === 0))) { */ case 3: - _r = $clone(t, time.Time).Date(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - year = _tuple[0]; - month = _tuple[1]; - day = _tuple[2]; - itoa(buf, year, 4); - buf.$set($append(buf.$get(), 47)); - itoa(buf, ((month >> 0)), 2); - buf.$set($append(buf.$get(), 47)); - itoa(buf, day, 2); - buf.$set($append(buf.$get(), 32)); - /* } */ case 4: - /* */ if (!(((l.flag & 6) === 0))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(((l.flag & 6) === 0))) { */ case 6: - _r$1 = $clone(t, time.Time).Clock(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - hour = _tuple$1[0]; - min = _tuple$1[1]; - sec = _tuple$1[2]; - itoa(buf, hour, 2); - buf.$set($append(buf.$get(), 58)); - itoa(buf, min, 2); - buf.$set($append(buf.$get(), 58)); - itoa(buf, sec, 2); - if (!(((l.flag & 4) === 0))) { - buf.$set($append(buf.$get(), 46)); - itoa(buf, (_q = $clone(t, time.Time).Nanosecond() / 1000, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), 6); - } - buf.$set($append(buf.$get(), 32)); - /* } */ case 7: - /* } */ case 2: - if (!(((l.flag & 24) === 0))) { - if (!(((l.flag & 16) === 0))) { - short$1 = file; - i = file.length - 1 >> 0; - while (true) { - if (!(i > 0)) { break; } - if (file.charCodeAt(i) === 47) { - short$1 = $substring(file, (i + 1 >> 0)); - break; - } - i = i - (1) >> 0; - } - file = short$1; - } - buf.$set($appendSlice(buf.$get(), file)); - buf.$set($append(buf.$get(), 58)); - itoa(buf, line, -1); - buf.$set($appendSlice(buf.$get(), ": ")); - } - if (!(((l.flag & 64) === 0))) { - buf.$set($appendSlice(buf.$get(), l.prefix)); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.formatHeader, $c: true, $r, _q, _r, _r$1, _tuple, _tuple$1, buf, day, file, hour, i, l, line, min, month, sec, short$1, t, year, $s};return $f; - }; - Logger.prototype.formatHeader = function(buf, t, file, line) { return this.$val.formatHeader(buf, t, file, line); }; - Logger.ptr.prototype.Output = function(calldepth, s) { - var {$24r, _r, _r$1, _tuple, _tuple$1, calldepth, err, file, l, line, now, ok, s, $s, $deferred, $r, $c} = $restore(this, {calldepth, s}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - _r = time.Now(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - now = $clone(_r, time.Time); - file = ""; - line = 0; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - if (!(((l.flag & 24) === 0))) { - l.mu.Unlock(); - ok = false; - _tuple = runtime.Caller(calldepth); - file = _tuple[1]; - line = _tuple[2]; - ok = _tuple[3]; - if (!ok) { - file = "???"; - line = 0; - } - l.mu.Lock(); - } - l.buf = $subslice(l.buf, 0, 0); - $r = l.formatHeader((l.$ptr_buf || (l.$ptr_buf = new ptrType$1(function() { return this.$target.buf; }, function($v) { this.$target.buf = $v; }, l))), $clone(now, time.Time), file, line); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - l.buf = $appendSlice(l.buf, s); - if ((s.length === 0) || !((s.charCodeAt((s.length - 1 >> 0)) === 10))) { - l.buf = $append(l.buf, 10); - } - _r$1 = l.out.Write(l.buf); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - err = _tuple$1[1]; - $24r = err; - $s = 4; case 4: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Logger.ptr.prototype.Output, $c: true, $r, $24r, _r, _r$1, _tuple, _tuple$1, calldepth, err, file, l, line, now, ok, s, $s, $deferred};return $f; } } - }; - Logger.prototype.Output = function(calldepth, s) { return this.$val.Output(calldepth, s); }; - Logger.ptr.prototype.Printf = function(format, v) { - var {_arg, _r, _r$1, format, l, v, $s, $r, $c} = $restore(this, {format, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!((atomic.LoadInt32((l.$ptr_isDiscard || (l.$ptr_isDiscard = new ptrType(function() { return this.$target.isDiscard; }, function($v) { this.$target.isDiscard = $v; }, l)))) === 0))) { - $s = -1; return; - } - _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = l.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Printf, $c: true, $r, _arg, _r, _r$1, format, l, v, $s};return $f; - }; - Logger.prototype.Printf = function(format, v) { return this.$val.Printf(format, v); }; - Logger.ptr.prototype.Print = function(v) { - var {_arg, _r, _r$1, l, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!((atomic.LoadInt32((l.$ptr_isDiscard || (l.$ptr_isDiscard = new ptrType(function() { return this.$target.isDiscard; }, function($v) { this.$target.isDiscard = $v; }, l)))) === 0))) { - $s = -1; return; - } - _r = fmt.Sprint(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = l.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Print, $c: true, $r, _arg, _r, _r$1, l, v, $s};return $f; - }; - Logger.prototype.Print = function(v) { return this.$val.Print(v); }; - Logger.ptr.prototype.Println = function(v) { - var {_arg, _r, _r$1, l, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!((atomic.LoadInt32((l.$ptr_isDiscard || (l.$ptr_isDiscard = new ptrType(function() { return this.$target.isDiscard; }, function($v) { this.$target.isDiscard = $v; }, l)))) === 0))) { - $s = -1; return; - } - _r = fmt.Sprintln(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = l.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Println, $c: true, $r, _arg, _r, _r$1, l, v, $s};return $f; - }; - Logger.prototype.Println = function(v) { return this.$val.Println(v); }; - Logger.ptr.prototype.Fatal = function(v) { - var {_arg, _r, _r$1, l, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = fmt.Sprint(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = l.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = os.Exit(1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Fatal, $c: true, $r, _arg, _r, _r$1, l, v, $s};return $f; - }; - Logger.prototype.Fatal = function(v) { return this.$val.Fatal(v); }; - Logger.ptr.prototype.Fatalf = function(format, v) { - var {_arg, _r, _r$1, format, l, v, $s, $r, $c} = $restore(this, {format, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = l.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = os.Exit(1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Fatalf, $c: true, $r, _arg, _r, _r$1, format, l, v, $s};return $f; - }; - Logger.prototype.Fatalf = function(format, v) { return this.$val.Fatalf(format, v); }; - Logger.ptr.prototype.Fatalln = function(v) { - var {_arg, _r, _r$1, l, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = fmt.Sprintln(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = l.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = os.Exit(1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Fatalln, $c: true, $r, _arg, _r, _r$1, l, v, $s};return $f; - }; - Logger.prototype.Fatalln = function(v) { return this.$val.Fatalln(v); }; - Logger.ptr.prototype.Panic = function(v) { - var {_r, _r$1, l, s, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = fmt.Sprint(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - s = _r; - _r$1 = l.Output(2, s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $panic(new $String(s)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Panic, $c: true, $r, _r, _r$1, l, s, v, $s};return $f; - }; - Logger.prototype.Panic = function(v) { return this.$val.Panic(v); }; - Logger.ptr.prototype.Panicf = function(format, v) { - var {_r, _r$1, format, l, s, v, $s, $r, $c} = $restore(this, {format, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - s = _r; - _r$1 = l.Output(2, s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $panic(new $String(s)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Panicf, $c: true, $r, _r, _r$1, format, l, s, v, $s};return $f; - }; - Logger.prototype.Panicf = function(format, v) { return this.$val.Panicf(format, v); }; - Logger.ptr.prototype.Panicln = function(v) { - var {_r, _r$1, l, s, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r = fmt.Sprintln(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - s = _r; - _r$1 = l.Output(2, s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $panic(new $String(s)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Panicln, $c: true, $r, _r, _r$1, l, s, v, $s};return $f; - }; - Logger.prototype.Panicln = function(v) { return this.$val.Panicln(v); }; - Logger.ptr.prototype.Flags = function() { - var {$24r, l, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - $24r = l.flag; - $s = 1; case 1: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Logger.ptr.prototype.Flags, $c: true, $r, $24r, l, $s, $deferred};return $f; } } - }; - Logger.prototype.Flags = function() { return this.$val.Flags(); }; - Logger.ptr.prototype.SetFlags = function(flag) { - var flag, l, $deferred; - /* */ var $err = null; try { $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - l.flag = flag; - /* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); } - }; - Logger.prototype.SetFlags = function(flag) { return this.$val.SetFlags(flag); }; - Logger.ptr.prototype.Prefix = function() { - var {$24r, l, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - $24r = l.prefix; - $s = 1; case 1: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return ""; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Logger.ptr.prototype.Prefix, $c: true, $r, $24r, l, $s, $deferred};return $f; } } - }; - Logger.prototype.Prefix = function() { return this.$val.Prefix(); }; - Logger.ptr.prototype.SetPrefix = function(prefix) { - var l, prefix, $deferred; - /* */ var $err = null; try { $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - l.prefix = prefix; - /* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); } - }; - Logger.prototype.SetPrefix = function(prefix) { return this.$val.SetPrefix(prefix); }; - Logger.ptr.prototype.Writer = function() { - var {$24r, l, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - l = this; - l.mu.Lock(); - $deferred.push([$methodVal(l.mu, "Unlock"), []]); - $24r = l.out; - $s = 1; case 1: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Logger.ptr.prototype.Writer, $c: true, $r, $24r, l, $s, $deferred};return $f; } } - }; - Logger.prototype.Writer = function() { return this.$val.Writer(); }; - Printf = function(format, v) { - var {_arg, _r, _r$1, format, v, $s, $r, $c} = $restore(this, {format, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((atomic.LoadInt32((std.$ptr_isDiscard || (std.$ptr_isDiscard = new ptrType(function() { return this.$target.isDiscard; }, function($v) { this.$target.isDiscard = $v; }, std)))) === 0))) { - $s = -1; return; - } - _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = std.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: Printf, $c: true, $r, _arg, _r, _r$1, format, v, $s};return $f; - }; - $pkg.Printf = Printf; - Fatalf = function(format, v) { - var {_arg, _r, _r$1, format, v, $s, $r, $c} = $restore(this, {format, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = fmt.Sprintf(format, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg = _r; - _r$1 = std.Output(2, _arg); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = os.Exit(1); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Fatalf, $c: true, $r, _arg, _r, _r$1, format, v, $s};return $f; - }; - $pkg.Fatalf = Fatalf; - ptrType$2.methods = [{prop: "SetOutput", name: "SetOutput", pkg: "", typ: $funcType([io.Writer], [], false)}, {prop: "formatHeader", name: "formatHeader", pkg: "log", typ: $funcType([ptrType$1, time.Time, $String, $Int], [], false)}, {prop: "Output", name: "Output", pkg: "", typ: $funcType([$Int, $String], [$error], false)}, {prop: "Printf", name: "Printf", pkg: "", typ: $funcType([$String, sliceType$1], [], true)}, {prop: "Print", name: "Print", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Println", name: "Println", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Fatal", name: "Fatal", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Fatalf", name: "Fatalf", pkg: "", typ: $funcType([$String, sliceType$1], [], true)}, {prop: "Fatalln", name: "Fatalln", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Panic", name: "Panic", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Panicf", name: "Panicf", pkg: "", typ: $funcType([$String, sliceType$1], [], true)}, {prop: "Panicln", name: "Panicln", pkg: "", typ: $funcType([sliceType$1], [], true)}, {prop: "Flags", name: "Flags", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "SetFlags", name: "SetFlags", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Prefix", name: "Prefix", pkg: "", typ: $funcType([], [$String], false)}, {prop: "SetPrefix", name: "SetPrefix", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Writer", name: "Writer", pkg: "", typ: $funcType([], [io.Writer], false)}]; - Logger.init("log", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: nosync.Mutex, tag: ""}, {prop: "prefix", name: "prefix", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "flag", name: "flag", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "isDiscard", name: "isDiscard", embedded: false, exported: false, typ: $Int32, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nosync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - std = New(os.Stderr, "", 3); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["container/list"] = (function() { - var $pkg = {}, $init, Element, List, ptrType, ptrType$1, New; - Element = $pkg.Element = $newType(0, $kindStruct, "list.Element", true, "container/list", true, function(next_, prev_, list_, Value_) { - this.$val = this; - if (arguments.length === 0) { - this.next = ptrType$1.nil; - this.prev = ptrType$1.nil; - this.list = ptrType.nil; - this.Value = $ifaceNil; - return; - } - this.next = next_; - this.prev = prev_; - this.list = list_; - this.Value = Value_; - }); - List = $pkg.List = $newType(0, $kindStruct, "list.List", true, "container/list", true, function(root_, len_) { - this.$val = this; - if (arguments.length === 0) { - this.root = new Element.ptr(ptrType$1.nil, ptrType$1.nil, ptrType.nil, $ifaceNil); - this.len = 0; - return; - } - this.root = root_; - this.len = len_; - }); - ptrType = $ptrType(List); - ptrType$1 = $ptrType(Element); - Element.ptr.prototype.Next = function() { - var e, p; - e = this; - p = e.next; - if (!(e.list === ptrType.nil) && !(p === e.list.root)) { - return p; - } - return ptrType$1.nil; - }; - Element.prototype.Next = function() { return this.$val.Next(); }; - Element.ptr.prototype.Prev = function() { - var e, p; - e = this; - p = e.prev; - if (!(e.list === ptrType.nil) && !(p === e.list.root)) { - return p; - } - return ptrType$1.nil; - }; - Element.prototype.Prev = function() { return this.$val.Prev(); }; - List.ptr.prototype.Init = function() { - var l; - l = this; - l.root.next = l.root; - l.root.prev = l.root; - l.len = 0; - return l; - }; - List.prototype.Init = function() { return this.$val.Init(); }; - New = function() { - return new List.ptr(new Element.ptr(ptrType$1.nil, ptrType$1.nil, ptrType.nil, $ifaceNil), 0).Init(); - }; - $pkg.New = New; - List.ptr.prototype.Len = function() { - var l; - l = this; - return l.len; - }; - List.prototype.Len = function() { return this.$val.Len(); }; - List.ptr.prototype.Front = function() { - var l; - l = this; - if (l.len === 0) { - return ptrType$1.nil; - } - return l.root.next; - }; - List.prototype.Front = function() { return this.$val.Front(); }; - List.ptr.prototype.Back = function() { - var l; - l = this; - if (l.len === 0) { - return ptrType$1.nil; - } - return l.root.prev; - }; - List.prototype.Back = function() { return this.$val.Back(); }; - List.ptr.prototype.lazyInit = function() { - var l; - l = this; - if (l.root.next === ptrType$1.nil) { - l.Init(); - } - }; - List.prototype.lazyInit = function() { return this.$val.lazyInit(); }; - List.ptr.prototype.insert = function(e, at) { - var at, e, l; - l = this; - e.prev = at; - e.next = at.next; - e.prev.next = e; - e.next.prev = e; - e.list = l; - l.len = l.len + (1) >> 0; - return e; - }; - List.prototype.insert = function(e, at) { return this.$val.insert(e, at); }; - List.ptr.prototype.insertValue = function(v, at) { - var at, l, v; - l = this; - return l.insert(new Element.ptr(ptrType$1.nil, ptrType$1.nil, ptrType.nil, v), at); - }; - List.prototype.insertValue = function(v, at) { return this.$val.insertValue(v, at); }; - List.ptr.prototype.remove = function(e) { - var e, l; - l = this; - e.prev.next = e.next; - e.next.prev = e.prev; - e.next = ptrType$1.nil; - e.prev = ptrType$1.nil; - e.list = ptrType.nil; - l.len = l.len - (1) >> 0; - }; - List.prototype.remove = function(e) { return this.$val.remove(e); }; - List.ptr.prototype.move = function(e, at) { - var at, e, l; - l = this; - if (e === at) { - return; - } - e.prev.next = e.next; - e.next.prev = e.prev; - e.prev = at; - e.next = at.next; - e.prev.next = e; - e.next.prev = e; - }; - List.prototype.move = function(e, at) { return this.$val.move(e, at); }; - List.ptr.prototype.Remove = function(e) { - var e, l; - l = this; - if (e.list === l) { - l.remove(e); - } - return e.Value; - }; - List.prototype.Remove = function(e) { return this.$val.Remove(e); }; - List.ptr.prototype.PushFront = function(v) { - var l, v; - l = this; - l.lazyInit(); - return l.insertValue(v, l.root); - }; - List.prototype.PushFront = function(v) { return this.$val.PushFront(v); }; - List.ptr.prototype.PushBack = function(v) { - var l, v; - l = this; - l.lazyInit(); - return l.insertValue(v, l.root.prev); - }; - List.prototype.PushBack = function(v) { return this.$val.PushBack(v); }; - List.ptr.prototype.InsertBefore = function(v, mark) { - var l, mark, v; - l = this; - if (!(mark.list === l)) { - return ptrType$1.nil; - } - return l.insertValue(v, mark.prev); - }; - List.prototype.InsertBefore = function(v, mark) { return this.$val.InsertBefore(v, mark); }; - List.ptr.prototype.InsertAfter = function(v, mark) { - var l, mark, v; - l = this; - if (!(mark.list === l)) { - return ptrType$1.nil; - } - return l.insertValue(v, mark); - }; - List.prototype.InsertAfter = function(v, mark) { return this.$val.InsertAfter(v, mark); }; - List.ptr.prototype.MoveToFront = function(e) { - var e, l; - l = this; - if (!(e.list === l) || l.root.next === e) { - return; - } - l.move(e, l.root); - }; - List.prototype.MoveToFront = function(e) { return this.$val.MoveToFront(e); }; - List.ptr.prototype.MoveToBack = function(e) { - var e, l; - l = this; - if (!(e.list === l) || l.root.prev === e) { - return; - } - l.move(e, l.root.prev); - }; - List.prototype.MoveToBack = function(e) { return this.$val.MoveToBack(e); }; - List.ptr.prototype.MoveBefore = function(e, mark) { - var e, l, mark; - l = this; - if (!(e.list === l) || e === mark || !(mark.list === l)) { - return; - } - l.move(e, mark.prev); - }; - List.prototype.MoveBefore = function(e, mark) { return this.$val.MoveBefore(e, mark); }; - List.ptr.prototype.MoveAfter = function(e, mark) { - var e, l, mark; - l = this; - if (!(e.list === l) || e === mark || !(mark.list === l)) { - return; - } - l.move(e, mark); - }; - List.prototype.MoveAfter = function(e, mark) { return this.$val.MoveAfter(e, mark); }; - List.ptr.prototype.PushBackList = function(other) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, i, l, other; - l = this; - l.lazyInit(); - _tmp = other.Len(); - _tmp$1 = other.Front(); - i = _tmp; - e = _tmp$1; - while (true) { - if (!(i > 0)) { break; } - l.insertValue(e.Value, l.root.prev); - _tmp$2 = i - 1 >> 0; - _tmp$3 = e.Next(); - i = _tmp$2; - e = _tmp$3; - } - }; - List.prototype.PushBackList = function(other) { return this.$val.PushBackList(other); }; - List.ptr.prototype.PushFrontList = function(other) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, i, l, other; - l = this; - l.lazyInit(); - _tmp = other.Len(); - _tmp$1 = other.Back(); - i = _tmp; - e = _tmp$1; - while (true) { - if (!(i > 0)) { break; } - l.insertValue(e.Value, l.root); - _tmp$2 = i - 1 >> 0; - _tmp$3 = e.Prev(); - i = _tmp$2; - e = _tmp$3; - } - }; - List.prototype.PushFrontList = function(other) { return this.$val.PushFrontList(other); }; - ptrType$1.methods = [{prop: "Next", name: "Next", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Prev", name: "Prev", pkg: "", typ: $funcType([], [ptrType$1], false)}]; - ptrType.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Front", name: "Front", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Back", name: "Back", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "lazyInit", name: "lazyInit", pkg: "container/list", typ: $funcType([], [], false)}, {prop: "insert", name: "insert", pkg: "container/list", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "insertValue", name: "insertValue", pkg: "container/list", typ: $funcType([$emptyInterface, ptrType$1], [ptrType$1], false)}, {prop: "remove", name: "remove", pkg: "container/list", typ: $funcType([ptrType$1], [], false)}, {prop: "move", name: "move", pkg: "container/list", typ: $funcType([ptrType$1, ptrType$1], [], false)}, {prop: "Remove", name: "Remove", pkg: "", typ: $funcType([ptrType$1], [$emptyInterface], false)}, {prop: "PushFront", name: "PushFront", pkg: "", typ: $funcType([$emptyInterface], [ptrType$1], false)}, {prop: "PushBack", name: "PushBack", pkg: "", typ: $funcType([$emptyInterface], [ptrType$1], false)}, {prop: "InsertBefore", name: "InsertBefore", pkg: "", typ: $funcType([$emptyInterface, ptrType$1], [ptrType$1], false)}, {prop: "InsertAfter", name: "InsertAfter", pkg: "", typ: $funcType([$emptyInterface, ptrType$1], [ptrType$1], false)}, {prop: "MoveToFront", name: "MoveToFront", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "MoveToBack", name: "MoveToBack", pkg: "", typ: $funcType([ptrType$1], [], false)}, {prop: "MoveBefore", name: "MoveBefore", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [], false)}, {prop: "MoveAfter", name: "MoveAfter", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [], false)}, {prop: "PushBackList", name: "PushBackList", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "PushFrontList", name: "PushFrontList", pkg: "", typ: $funcType([ptrType], [], false)}]; - Element.init("container/list", [{prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "prev", name: "prev", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "list", name: "list", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $emptyInterface, tag: ""}]); - List.init("container/list", [{prop: "root", name: "root", embedded: false, exported: false, typ: Element, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["context"] = (function() { - var $pkg = {}, $init, errors, reflectlite, sync, atomic, time, Context, deadlineExceededError, emptyCtx, CancelFunc, canceler, cancelCtx, stringer, timerCtx, valueCtx, ptrType, structType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, chanType, ptrType$5, ptrType$6, ptrType$7, chanType$1, mapType, background, todo, goroutines, goroutines$24ptr, cancelCtxKey, cancelCtxKey$24ptr, closedchan, x, Background, WithCancel, newCancelCtx, propagateCancel, parentCancelCtx, removeChild, init, contextName, WithDeadline, WithTimeout, WithValue, stringify, value; - errors = $packages["errors"]; - reflectlite = $packages["internal/reflectlite"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - time = $packages["time"]; - Context = $pkg.Context = $newType(8, $kindInterface, "context.Context", true, "context", true, null); - deadlineExceededError = $pkg.deadlineExceededError = $newType(0, $kindStruct, "context.deadlineExceededError", true, "context", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - emptyCtx = $pkg.emptyCtx = $newType(4, $kindInt, "context.emptyCtx", true, "context", false, null); - CancelFunc = $pkg.CancelFunc = $newType(4, $kindFunc, "context.CancelFunc", true, "context", true, null); - canceler = $pkg.canceler = $newType(8, $kindInterface, "context.canceler", true, "context", false, null); - cancelCtx = $pkg.cancelCtx = $newType(0, $kindStruct, "context.cancelCtx", true, "context", false, function(Context_, mu_, done_, children_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.Context = $ifaceNil; - this.mu = new sync.Mutex.ptr(0, 0); - this.done = new atomic.Value.ptr($ifaceNil); - this.children = false; - this.err = $ifaceNil; - return; - } - this.Context = Context_; - this.mu = mu_; - this.done = done_; - this.children = children_; - this.err = err_; - }); - stringer = $pkg.stringer = $newType(8, $kindInterface, "context.stringer", true, "context", false, null); - timerCtx = $pkg.timerCtx = $newType(0, $kindStruct, "context.timerCtx", true, "context", false, function(cancelCtx_, timer_, deadline_) { - this.$val = this; - if (arguments.length === 0) { - this.cancelCtx = new cancelCtx.ptr($ifaceNil, new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, $ifaceNil); - this.timer = ptrType$5.nil; - this.deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); - return; - } - this.cancelCtx = cancelCtx_; - this.timer = timer_; - this.deadline = deadline_; - }); - valueCtx = $pkg.valueCtx = $newType(0, $kindStruct, "context.valueCtx", true, "context", false, function(Context_, key_, val_) { - this.$val = this; - if (arguments.length === 0) { - this.Context = $ifaceNil; - this.key = $ifaceNil; - this.val = $ifaceNil; - return; - } - this.Context = Context_; - this.key = key_; - this.val = val_; - }); - ptrType = $ptrType(emptyCtx); - structType = $structType("", []); - ptrType$1 = $ptrType(time.Location); - ptrType$2 = $ptrType($Int32); - ptrType$3 = $ptrType(cancelCtx); - ptrType$4 = $ptrType($Int); - chanType = $chanType(structType, false, false); - ptrType$5 = $ptrType(time.Timer); - ptrType$6 = $ptrType(valueCtx); - ptrType$7 = $ptrType(timerCtx); - chanType$1 = $chanType(structType, false, true); - mapType = $mapType(canceler, structType); - deadlineExceededError.ptr.prototype.Error = function() { - return "context deadline exceeded"; - }; - deadlineExceededError.prototype.Error = function() { return this.$val.Error(); }; - deadlineExceededError.ptr.prototype.Timeout = function() { - return true; - }; - deadlineExceededError.prototype.Timeout = function() { return this.$val.Timeout(); }; - deadlineExceededError.ptr.prototype.Temporary = function() { - return true; - }; - deadlineExceededError.prototype.Temporary = function() { return this.$val.Temporary(); }; - $ptrType(emptyCtx).prototype.Deadline = function() { - var deadline, ok; - deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); - ok = false; - return [deadline, ok]; - }; - $ptrType(emptyCtx).prototype.Done = function() { - return $chanNil; - }; - $ptrType(emptyCtx).prototype.Err = function() { - return $ifaceNil; - }; - $ptrType(emptyCtx).prototype.Value = function(key) { - var key; - return $ifaceNil; - }; - $ptrType(emptyCtx).prototype.String = function() { - var _1, e; - e = this; - _1 = e; - if (_1 === (background)) { - return "context.Background"; - } else if (_1 === (todo)) { - return "context.TODO"; - } - return "unknown empty Context"; - }; - Background = function() { - return background; - }; - $pkg.Background = Background; - WithCancel = function(parent) { - var {_tmp, _tmp$1, c, cancel, ctx, parent, $s, $r, $c} = $restore(this, {parent}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = [c]; - ctx = $ifaceNil; - cancel = $throwNilPointerError; - if ($interfaceIsEqual(parent, $ifaceNil)) { - $panic(new $String("cannot create context from nil parent")); - } - c[0] = $clone(newCancelCtx(parent), cancelCtx); - $r = propagateCancel(parent, c[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = c[0]; - _tmp$1 = (function(c) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = c[0].cancel(true, $pkg.Canceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(c); - ctx = _tmp; - cancel = _tmp$1; - $s = -1; return [ctx, cancel]; - /* */ } return; } var $f = {$blk: WithCancel, $c: true, $r, _tmp, _tmp$1, c, cancel, ctx, parent, $s};return $f; - }; - $pkg.WithCancel = WithCancel; - newCancelCtx = function(parent) { - var parent; - return new cancelCtx.ptr(parent, new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), false, $ifaceNil); - }; - propagateCancel = function(parent, child) { - var {_arg, _key, _r, _r$1, _r$2, _selection, _tuple, child, done, ok, p, parent, $s, $r, $c} = $restore(this, {parent, child}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - child = [child]; - parent = [parent]; - _r = parent[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - done = _r; - if (done === $chanNil) { - $s = -1; return; - } - _selection = $select([[done], []]); - /* */ if (_selection[0] === 0) { $s = 2; continue; } - /* */ if (_selection[0] === 1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_selection[0] === 0) { */ case 2: - _r$1 = parent[0].Err(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = _r$1; - $r = child[0].cancel(false, _arg); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } else if (_selection[0] === 1) { */ case 3: - /* } */ case 4: - _r$2 = parentCancelCtx(parent[0]); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ok) { */ case 8: - $r = p.mu.Lock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(p.err, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(p.err, $ifaceNil))) { */ case 12: - $r = child[0].cancel(false, p.err); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 14; continue; - /* } else { */ case 13: - if (p.children === false) { - p.children = {}; - } - _key = child[0]; (p.children || $throwRuntimeError("assignment to entry in nil map"))[canceler.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - /* } */ case 14: - $r = p.mu.Unlock(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 10; continue; - /* } else { */ case 9: - atomic.AddInt32((goroutines$24ptr || (goroutines$24ptr = new ptrType$2(function() { return goroutines; }, function($v) { goroutines = $v; }))), 1); - $go((function(child, parent) { return function $b() { - var {_arg$1, _r$3, _r$4, _r$5, _r$6, _selection$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = parent[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = child[0].Done(); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $select([[_r$3], [_r$4]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _selection$1 = _r$5; - /* */ if (_selection$1[0] === 0) { $s = 4; continue; } - /* */ if (_selection$1[0] === 1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_selection$1[0] === 0) { */ case 4: - _r$6 = parent[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - $r = child[0].cancel(false, _arg$1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - /* } else if (_selection$1[0] === 1) { */ case 5: - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg$1, _r$3, _r$4, _r$5, _r$6, _selection$1, $s};return $f; - }; })(child, parent), []); - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: propagateCancel, $c: true, $r, _arg, _key, _r, _r$1, _r$2, _selection, _tuple, child, done, ok, p, parent, $s};return $f; - }; - parentCancelCtx = function(parent) { - var {_r, _r$1, _tuple, _tuple$1, done, ok, p, parent, pdone, $s, $r, $c} = $restore(this, {parent}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = parent.Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - done = _r; - if (done === closedchan || done === $chanNil) { - $s = -1; return [ptrType$3.nil, false]; - } - _r$1 = parent.Value((cancelCtxKey$24ptr || (cancelCtxKey$24ptr = new ptrType$4(function() { return cancelCtxKey; }, function($v) { cancelCtxKey = $v; })))); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = $assertType(_r$1, ptrType$3, true); - p = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [ptrType$3.nil, false]; - } - _tuple$1 = $assertType(p.done.Load(), chanType, true); - pdone = _tuple$1[0]; - if (!(pdone === done)) { - $s = -1; return [ptrType$3.nil, false]; - } - $s = -1; return [p, true]; - /* */ } return; } var $f = {$blk: parentCancelCtx, $c: true, $r, _r, _r$1, _tuple, _tuple$1, done, ok, p, parent, pdone, $s};return $f; - }; - removeChild = function(parent, child) { - var {_r, _tuple, child, ok, p, parent, $s, $r, $c} = $restore(this, {parent, child}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = parentCancelCtx(parent); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return; - } - $r = p.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(p.children === false)) { - delete p.children[canceler.keyFor(child)]; - } - $r = p.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: removeChild, $c: true, $r, _r, _tuple, child, ok, p, parent, $s};return $f; - }; - init = function() { - $close(closedchan); - }; - cancelCtx.ptr.prototype.Value = function(key) { - var {$24r, _r, c, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if ($interfaceIsEqual(key, (cancelCtxKey$24ptr || (cancelCtxKey$24ptr = new ptrType$4(function() { return cancelCtxKey; }, function($v) { cancelCtxKey = $v; }))))) { - $s = -1; return c; - } - _r = value(c.Context, key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cancelCtx.ptr.prototype.Value, $c: true, $r, $24r, _r, c, key, $s};return $f; - }; - cancelCtx.prototype.Value = function(key) { return this.$val.Value(key); }; - cancelCtx.ptr.prototype.Done = function() { - var {$24r, $24r$1, c, d, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - d = c.done.Load(); - /* */ if (!($interfaceIsEqual(d, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(d, $ifaceNil))) { */ case 1: - $24r = $assertType(d, chanType); - $s = 3; case 3: return $24r; - /* } */ case 2: - $r = c.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mu, "Unlock"), []]); - d = c.done.Load(); - if ($interfaceIsEqual(d, $ifaceNil)) { - d = new chanType(new $Chan(structType, 0)); - c.done.Store(d); - } - $24r$1 = $assertType(d, chanType); - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: cancelCtx.ptr.prototype.Done, $c: true, $r, $24r, $24r$1, c, d, $s, $deferred};return $f; } } - }; - cancelCtx.prototype.Done = function() { return this.$val.Done(); }; - cancelCtx.ptr.prototype.Err = function() { - var {c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err = c.err; - $r = c.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err; - /* */ } return; } var $f = {$blk: cancelCtx.ptr.prototype.Err, $c: true, $r, c, err, $s};return $f; - }; - cancelCtx.prototype.Err = function() { return this.$val.Err(); }; - contextName = function(c) { - var {$24r, $24r$1, _r, _r$1, _tuple, c, ok, s, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(c, stringer, true); - s = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = s.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = reflectlite.TypeOf(c).String(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: contextName, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, c, ok, s, $s};return $f; - }; - cancelCtx.ptr.prototype.String = function() { - var {$24r, _r, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = contextName(c.Context); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r + ".WithCancel"; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cancelCtx.ptr.prototype.String, $c: true, $r, $24r, _r, c, $s};return $f; - }; - cancelCtx.prototype.String = function() { return this.$val.String(); }; - cancelCtx.ptr.prototype.cancel = function(removeFromParent, err) { - var {_entry, _i, _keys, _ref, _tuple, c, child, d, err, removeFromParent, $s, $r, $c} = $restore(this, {removeFromParent, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if ($interfaceIsEqual(err, $ifaceNil)) { - $panic(new $String("context: internal error: missing cancel error")); - } - $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(c.err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(c.err, $ifaceNil))) { */ case 2: - $r = c.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 3: - c.err = err; - _tuple = $assertType(c.done.Load(), chanType, true); - d = _tuple[0]; - if (d === $chanNil) { - c.done.Store(new chanType(closedchan)); - } else { - $close(d); - } - _ref = c.children; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 5: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 6; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 5; continue; - } - child = _entry.k; - $r = child.cancel(false, err); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 5; continue; - case 6: - c.children = false; - $r = c.mu.Unlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (removeFromParent) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (removeFromParent) { */ case 9: - $r = removeChild(c.Context, c); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: cancelCtx.ptr.prototype.cancel, $c: true, $r, _entry, _i, _keys, _ref, _tuple, c, child, d, err, removeFromParent, $s};return $f; - }; - cancelCtx.prototype.cancel = function(removeFromParent, err) { return this.$val.cancel(removeFromParent, err); }; - WithDeadline = function(parent, d) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _tuple, c, cur, d, dur, ok, parent, $s, $deferred, $r, $c} = $restore(this, {parent, d}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = [c]; - if ($interfaceIsEqual(parent, $ifaceNil)) { - $panic(new $String("cannot create context from nil parent")); - } - _r = parent.Deadline(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - cur = $clone(_tuple[0], time.Time); - ok = _tuple[1]; - /* */ if (ok && $clone(cur, time.Time).Before($clone(d, time.Time))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok && $clone(cur, time.Time).Before($clone(d, time.Time))) { */ case 2: - _r$1 = WithCancel(parent); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - c[0] = new timerCtx.ptr($clone(newCancelCtx(parent), cancelCtx), ptrType$5.nil, $clone(d, time.Time)); - $r = propagateCancel(parent, c[0]); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = time.Until($clone(d, time.Time)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - dur = _r$2; - /* */ if ((dur.$high < 0 || (dur.$high === 0 && dur.$low <= 0))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((dur.$high < 0 || (dur.$high === 0 && dur.$low <= 0))) { */ case 8: - $r = c[0].cancel(true, $pkg.DeadlineExceeded); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$1 = [c[0], (function(c) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = c[0].cancel(false, $pkg.Canceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(c)]; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - $r = c[0].cancelCtx.mu.Lock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c[0].cancelCtx.mu, "Unlock"), []]); - /* */ if ($interfaceIsEqual(c[0].cancelCtx.err, $ifaceNil)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($interfaceIsEqual(c[0].cancelCtx.err, $ifaceNil)) { */ case 13: - _r$3 = time.AfterFunc(dur, (function(c) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = c[0].cancel(true, $pkg.DeadlineExceeded); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(c)); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - c[0].timer = _r$3; - /* } */ case 14: - $24r$2 = [c[0], (function(c) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = c[0].cancel(true, $pkg.Canceled); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(c)]; - $s = 16; case 16: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $throwNilPointerError]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: WithDeadline, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _tuple, c, cur, d, dur, ok, parent, $s, $deferred};return $f; } } - }; - $pkg.WithDeadline = WithDeadline; - timerCtx.ptr.prototype.Deadline = function() { - var _tmp, _tmp$1, c, deadline, ok; - deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$1.nil); - ok = false; - c = this; - _tmp = $clone(c.deadline, time.Time); - _tmp$1 = true; - time.Time.copy(deadline, _tmp); - ok = _tmp$1; - return [deadline, ok]; - }; - timerCtx.prototype.Deadline = function() { return this.$val.Deadline(); }; - timerCtx.ptr.prototype.String = function() { - var {$24r, _r, _r$1, _r$2, _r$3, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = contextName(c.cancelCtx.Context); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = $clone(c.deadline, time.Time).String(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = time.Until($clone(c.deadline, time.Time)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r + ".WithDeadline(" + _r$1 + " [" + _r$3 + "])"; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: timerCtx.ptr.prototype.String, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, c, $s};return $f; - }; - timerCtx.prototype.String = function() { return this.$val.String(); }; - timerCtx.ptr.prototype.cancel = function(removeFromParent, err) { - var {c, err, removeFromParent, $s, $r, $c} = $restore(this, {removeFromParent, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - $r = c.cancelCtx.cancel(false, err); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (removeFromParent) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (removeFromParent) { */ case 2: - $r = removeChild(c.cancelCtx.Context, c); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $r = c.cancelCtx.mu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(c.timer === ptrType$5.nil)) { - c.timer.Stop(); - c.timer = ptrType$5.nil; - } - $r = c.cancelCtx.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: timerCtx.ptr.prototype.cancel, $c: true, $r, c, err, removeFromParent, $s};return $f; - }; - timerCtx.prototype.cancel = function(removeFromParent, err) { return this.$val.cancel(removeFromParent, err); }; - WithTimeout = function(parent, timeout) { - var {$24r, _arg, _arg$1, _r, _r$1, _r$2, parent, timeout, $s, $r, $c} = $restore(this, {parent, timeout}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = parent; - _r = time.Now(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = $clone(_r, time.Time).Add(timeout); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$1, time.Time); - _r$2 = WithDeadline(_arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: WithTimeout, $c: true, $r, $24r, _arg, _arg$1, _r, _r$1, _r$2, parent, timeout, $s};return $f; - }; - $pkg.WithTimeout = WithTimeout; - WithValue = function(parent, key, val) { - var {_r, key, parent, val, $s, $r, $c} = $restore(this, {parent, key, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(parent, $ifaceNil)) { - $panic(new $String("cannot create context from nil parent")); - } - if ($interfaceIsEqual(key, $ifaceNil)) { - $panic(new $String("nil key")); - } - _r = reflectlite.TypeOf(key).Comparable(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $panic(new $String("key is not comparable")); - /* } */ case 2: - $s = -1; return new valueCtx.ptr(parent, key, val); - /* */ } return; } var $f = {$blk: WithValue, $c: true, $r, _r, key, parent, val, $s};return $f; - }; - $pkg.WithValue = WithValue; - stringify = function(v) { - var {$24r, _r, _ref, s, s$1, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = v; - /* */ if ($assertType(_ref, stringer, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, $String, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, stringer, true)[1]) { */ case 1: - s = _ref; - _r = s.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 5; case 5: return $24r; - /* } else if ($assertType(_ref, $String, true)[1]) { */ case 2: - s$1 = _ref.$val; - $s = -1; return s$1; - /* } */ case 3: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: stringify, $c: true, $r, $24r, _r, _ref, s, s$1, v, $s};return $f; - }; - valueCtx.ptr.prototype.String = function() { - var {$24r, _r, _r$1, _r$2, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = contextName(c.Context); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = reflectlite.TypeOf(c.key).String(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = stringify(c.val); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r + ".WithValue(type " + _r$1 + ", val " + _r$2 + ")"; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: valueCtx.ptr.prototype.String, $c: true, $r, $24r, _r, _r$1, _r$2, c, $s};return $f; - }; - valueCtx.prototype.String = function() { return this.$val.String(); }; - valueCtx.ptr.prototype.Value = function(key) { - var {$24r, _r, c, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if ($interfaceIsEqual(c.key, key)) { - $s = -1; return c.val; - } - _r = value(c.Context, key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: valueCtx.ptr.prototype.Value, $c: true, $r, $24r, _r, c, key, $s};return $f; - }; - valueCtx.prototype.Value = function(key) { return this.$val.Value(key); }; - value = function(c, key) { - var {$24r, _r, _ref, c, ctx, ctx$1, ctx$2, ctx$3, ctx$4, key, $s, $r, $c} = $restore(this, {c, key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - _ref = c; - /* */ if ($assertType(_ref, ptrType$6, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, ptrType$3, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, ptrType$7, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, ptrType, true)[1]) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($assertType(_ref, ptrType$6, true)[1]) { */ case 3: - ctx = _ref.$val; - if ($interfaceIsEqual(key, ctx.key)) { - $s = -1; return ctx.val; - } - c = ctx.Context; - $s = 8; continue; - /* } else if ($assertType(_ref, ptrType$3, true)[1]) { */ case 4: - ctx$1 = _ref.$val; - if ($interfaceIsEqual(key, (cancelCtxKey$24ptr || (cancelCtxKey$24ptr = new ptrType$4(function() { return cancelCtxKey; }, function($v) { cancelCtxKey = $v; }))))) { - $s = -1; return c; - } - c = ctx$1.Context; - $s = 8; continue; - /* } else if ($assertType(_ref, ptrType$7, true)[1]) { */ case 5: - ctx$2 = _ref.$val; - if ($interfaceIsEqual(key, (cancelCtxKey$24ptr || (cancelCtxKey$24ptr = new ptrType$4(function() { return cancelCtxKey; }, function($v) { cancelCtxKey = $v; }))))) { - $s = -1; return ctx$2.cancelCtx; - } - c = ctx$2.cancelCtx.Context; - $s = 8; continue; - /* } else if ($assertType(_ref, ptrType, true)[1]) { */ case 6: - ctx$3 = _ref.$val; - $s = -1; return $ifaceNil; - /* } else { */ case 7: - ctx$4 = _ref; - _r = c.Value(key); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 10; case 10: return $24r; - /* } */ case 8: - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: value, $c: true, $r, $24r, _r, _ref, c, ctx, ctx$1, ctx$2, ctx$3, ctx$4, key, $s};return $f; - }; - deadlineExceededError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType.methods = [{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$1], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$3.methods = [{prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$1], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "cancel", name: "cancel", pkg: "context", typ: $funcType([$Bool, $error], [], false)}]; - ptrType$7.methods = [{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "cancel", name: "cancel", pkg: "context", typ: $funcType([$Bool, $error], [], false)}]; - ptrType$6.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}]; - Context.init([{prop: "Deadline", name: "Deadline", pkg: "", typ: $funcType([], [time.Time, $Bool], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$1], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}]); - deadlineExceededError.init("", []); - CancelFunc.init([], [], false); - canceler.init([{prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$1], false)}, {prop: "cancel", name: "cancel", pkg: "context", typ: $funcType([$Bool, $error], [], false)}]); - cancelCtx.init("context", [{prop: "Context", name: "Context", embedded: true, exported: true, typ: Context, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "children", name: "children", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - stringer.init([{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); - timerCtx.init("context", [{prop: "cancelCtx", name: "cancelCtx", embedded: true, exported: false, typ: cancelCtx, tag: ""}, {prop: "timer", name: "timer", embedded: false, exported: false, typ: ptrType$5, tag: ""}, {prop: "deadline", name: "deadline", embedded: false, exported: false, typ: time.Time, tag: ""}]); - valueCtx.init("context", [{prop: "Context", name: "Context", embedded: true, exported: true, typ: Context, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "val", name: "val", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflectlite.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - goroutines = 0; - cancelCtxKey = 0; - $pkg.Canceled = errors.New("context canceled"); - $pkg.DeadlineExceeded = (x = new deadlineExceededError.ptr(), new x.constructor.elem(x)); - background = $newDataPointer(0, ptrType); - todo = $newDataPointer(0, ptrType); - closedchan = new $Chan(structType, 0); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["math/rand"] = (function() { - var $pkg = {}, $init, nosync, math, rngSource, Source, Source64, Rand, lockedSource, ptrType, ptrType$1, ptrType$2, arrayType, ptrType$4, sliceType, ptrType$5, funcType, sliceType$1, rngCooked, globalRand, kn, wn, fn, ke, we, fe, seedrand, NewSource, New, read, Intn, Float64, absInt32; - nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; - math = $packages["math"]; - rngSource = $pkg.rngSource = $newType(0, $kindStruct, "rand.rngSource", true, "math/rand", false, function(tap_, feed_, vec_) { - this.$val = this; - if (arguments.length === 0) { - this.tap = 0; - this.feed = 0; - this.vec = arrayType.zero(); - return; - } - this.tap = tap_; - this.feed = feed_; - this.vec = vec_; - }); - Source = $pkg.Source = $newType(8, $kindInterface, "rand.Source", true, "math/rand", true, null); - Source64 = $pkg.Source64 = $newType(8, $kindInterface, "rand.Source64", true, "math/rand", true, null); - Rand = $pkg.Rand = $newType(0, $kindStruct, "rand.Rand", true, "math/rand", true, function(src_, s64_, readVal_, readPos_) { - this.$val = this; - if (arguments.length === 0) { - this.src = $ifaceNil; - this.s64 = $ifaceNil; - this.readVal = new $Int64(0, 0); - this.readPos = 0; - return; - } - this.src = src_; - this.s64 = s64_; - this.readVal = readVal_; - this.readPos = readPos_; - }); - lockedSource = $pkg.lockedSource = $newType(0, $kindStruct, "rand.lockedSource", true, "math/rand", false, function(lk_, src_) { - this.$val = this; - if (arguments.length === 0) { - this.lk = new nosync.Mutex.ptr(false); - this.src = ptrType.nil; - return; - } - this.lk = lk_; - this.src = src_; - }); - ptrType = $ptrType(rngSource); - ptrType$1 = $ptrType(lockedSource); - ptrType$2 = $ptrType(Rand); - arrayType = $arrayType($Int64, 607); - ptrType$4 = $ptrType($Int8); - sliceType = $sliceType($Int); - ptrType$5 = $ptrType($Int64); - funcType = $funcType([$Int, $Int], [], false); - sliceType$1 = $sliceType($Uint8); - seedrand = function(x) { - var _q, _r, hi, lo, x; - hi = (_q = x / 44488, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - lo = (_r = x % 44488, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - x = ($imul(48271, lo)) - ($imul(3399, hi)) >> 0; - if (x < 0) { - x = x + (2147483647) >> 0; - } - return x; - }; - rngSource.ptr.prototype.Seed = function(seed) { - var i, rng, seed, u, x, x$1, x$2, x$3, x$4, x$5; - rng = this; - rng.tap = 0; - rng.feed = 334; - seed = $div64(seed, new $Int64(0, 2147483647), true); - if ((seed.$high < 0 || (seed.$high === 0 && seed.$low < 0))) { - seed = (x = new $Int64(0, 2147483647), new $Int64(seed.$high + x.$high, seed.$low + x.$low)); - } - if ((seed.$high === 0 && seed.$low === 0)) { - seed = new $Int64(0, 89482311); - } - x$1 = (((seed.$low + ((seed.$high >> 31) * 4294967296)) >> 0)); - i = -20; - while (true) { - if (!(i < 607)) { break; } - x$1 = seedrand(x$1); - if (i >= 0) { - u = new $Int64(0, 0); - u = $shiftLeft64((new $Int64(0, x$1)), 40); - x$1 = seedrand(x$1); - u = (x$2 = $shiftLeft64((new $Int64(0, x$1)), 20), new $Int64(u.$high ^ x$2.$high, (u.$low ^ x$2.$low) >>> 0)); - x$1 = seedrand(x$1); - u = (x$3 = (new $Int64(0, x$1)), new $Int64(u.$high ^ x$3.$high, (u.$low ^ x$3.$low) >>> 0)); - u = (x$4 = ((i < 0 || i >= rngCooked.length) ? ($throwRuntimeError("index out of range"), undefined) : rngCooked[i]), new $Int64(u.$high ^ x$4.$high, (u.$low ^ x$4.$low) >>> 0)); - (x$5 = rng.vec, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i] = u)); - } - i = i + (1) >> 0; - } - }; - rngSource.prototype.Seed = function(seed) { return this.$val.Seed(seed); }; - rngSource.ptr.prototype.Int63 = function() { - var rng, x, x$1; - rng = this; - return ((x = (x$1 = rng.Uint64(), new $Uint64(x$1.$high & 2147483647, (x$1.$low & 4294967295) >>> 0)), new $Int64(x.$high, x.$low))); - }; - rngSource.prototype.Int63 = function() { return this.$val.Int63(); }; - rngSource.ptr.prototype.Uint64 = function() { - var rng, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; - rng = this; - rng.tap = rng.tap - (1) >> 0; - if (rng.tap < 0) { - rng.tap = rng.tap + (607) >> 0; - } - rng.feed = rng.feed - (1) >> 0; - if (rng.feed < 0) { - rng.feed = rng.feed + (607) >> 0; - } - x$6 = (x = (x$1 = rng.vec, x$2 = rng.feed, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])), x$3 = (x$4 = rng.vec, x$5 = rng.tap, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), new $Int64(x.$high + x$3.$high, x.$low + x$3.$low)); - (x$7 = rng.vec, x$8 = rng.feed, ((x$8 < 0 || x$8 >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[x$8] = x$6)); - return (new $Uint64(x$6.$high, x$6.$low)); - }; - rngSource.prototype.Uint64 = function() { return this.$val.Uint64(); }; - NewSource = function(seed) { - var rng, seed; - rng = new rngSource.ptr(0, 0, arrayType.zero()); - rng.Seed(seed); - return rng; - }; - $pkg.NewSource = NewSource; - New = function(src) { - var _tuple, s64, src; - _tuple = $assertType(src, Source64, true); - s64 = _tuple[0]; - return new Rand.ptr(src, s64, new $Int64(0, 0), 0); - }; - $pkg.New = New; - Rand.ptr.prototype.Seed = function(seed) { - var {_tuple, lk, ok, r, seed, $s, $r, $c} = $restore(this, {seed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _tuple = $assertType(r.src, ptrType$1, true); - lk = _tuple[0]; - ok = _tuple[1]; - if (ok) { - lk.seedPos(seed, (r.$ptr_readPos || (r.$ptr_readPos = new ptrType$4(function() { return this.$target.readPos; }, function($v) { this.$target.readPos = $v; }, r)))); - $s = -1; return; - } - $r = r.src.Seed(seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r.readPos = 0; - $s = -1; return; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Seed, $c: true, $r, _tuple, lk, ok, r, seed, $s};return $f; - }; - Rand.prototype.Seed = function(seed) { return this.$val.Seed(seed); }; - Rand.ptr.prototype.Int63 = function() { - var {$24r, _r, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.src.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Int63, $c: true, $r, $24r, _r, r, $s};return $f; - }; - Rand.prototype.Int63 = function() { return this.$val.Int63(); }; - Rand.ptr.prototype.Uint32 = function() { - var {$24r, _r, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (($shiftRightInt64(_r, 31).$low >>> 0)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Uint32, $c: true, $r, $24r, _r, r, $s};return $f; - }; - Rand.prototype.Uint32 = function() { return this.$val.Uint32(); }; - Rand.ptr.prototype.Uint64 = function() { - var {$24r, $24r$1, _r, _r$1, _r$2, r, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* */ if (!($interfaceIsEqual(r.s64, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(r.s64, $ifaceNil))) { */ case 1: - _r = r.s64.Uint64(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = r.Int63(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = r.Int63(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = (x = $shiftRightUint64(((x$1 = _r$1, new $Uint64(x$1.$high, x$1.$low))), 31), x$2 = $shiftLeft64(((x$3 = _r$2, new $Uint64(x$3.$high, x$3.$low))), 32), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Uint64, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, r, x, x$1, x$2, x$3, $s};return $f; - }; - Rand.prototype.Uint64 = function() { return this.$val.Uint64(); }; - Rand.ptr.prototype.Int31 = function() { - var {$24r, _r, r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (((x = $shiftRightInt64(_r, 32), x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Int31, $c: true, $r, $24r, _r, r, x, $s};return $f; - }; - Rand.prototype.Int31 = function() { return this.$val.Int31(); }; - Rand.ptr.prototype.Int = function() { - var {_r, r, u, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.Int63(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - u = ((_r.$low >>> 0)); - $s = -1; return ((((u << 1 >>> 0) >>> 1 >>> 0) >> 0)); - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Int, $c: true, $r, _r, r, u, $s};return $f; - }; - Rand.prototype.Int = function() { return this.$val.Int(); }; - Rand.ptr.prototype.Int63n = function(n) { - var {$24r, _r, _r$1, _r$2, max, n, r, v, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if ((n.$high < 0 || (n.$high === 0 && n.$low <= 0))) { - $panic(new $String("invalid argument to Int63n")); - } - /* */ if ((x = (x$1 = new $Int64(n.$high - 0, n.$low - 1), new $Int64(n.$high & x$1.$high, (n.$low & x$1.$low) >>> 0)), (x.$high === 0 && x.$low === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = (x$1 = new $Int64(n.$high - 0, n.$low - 1), new $Int64(n.$high & x$1.$high, (n.$low & x$1.$low) >>> 0)), (x.$high === 0 && x.$low === 0))) { */ case 1: - _r = r.Int63(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (x$2 = _r, x$3 = new $Int64(n.$high - 0, n.$low - 1), new $Int64(x$2.$high & x$3.$high, (x$2.$low & x$3.$low) >>> 0)); - $s = 4; case 4: return $24r; - /* } */ case 2: - max = ((x$4 = (x$5 = $div64(new $Uint64(2147483648, 0), (new $Uint64(n.$high, n.$low)), true), new $Uint64(2147483647 - x$5.$high, 4294967295 - x$5.$low)), new $Int64(x$4.$high, x$4.$low))); - _r$1 = r.Int63(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - /* while (true) { */ case 6: - /* if (!((v.$high > max.$high || (v.$high === max.$high && v.$low > max.$low)))) { break; } */ if(!((v.$high > max.$high || (v.$high === max.$high && v.$low > max.$low)))) { $s = 7; continue; } - _r$2 = r.Int63(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v = _r$2; - $s = 6; continue; - case 7: - $s = -1; return $div64(v, n, true); - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Int63n, $c: true, $r, $24r, _r, _r$1, _r$2, max, n, r, v, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - Rand.prototype.Int63n = function(n) { return this.$val.Int63n(n); }; - Rand.ptr.prototype.Int31n = function(n) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, max, n, r, v, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (n <= 0) { - $panic(new $String("invalid argument to Int31n")); - } - /* */ if ((n & ((n - 1 >> 0))) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((n & ((n - 1 >> 0))) === 0) { */ case 1: - _r = r.Int31(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r & ((n - 1 >> 0)); - $s = 4; case 4: return $24r; - /* } */ case 2: - max = (((2147483647 - (_r$1 = 2147483648 % ((n >>> 0)), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0) >> 0)); - _r$2 = r.Int31(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v = _r$2; - /* while (true) { */ case 6: - /* if (!(v > max)) { break; } */ if(!(v > max)) { $s = 7; continue; } - _r$3 = r.Int31(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = _r$3; - $s = 6; continue; - case 7: - $s = -1; return (_r$4 = v % n, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")); - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Int31n, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, max, n, r, v, $s};return $f; - }; - Rand.prototype.Int31n = function(n) { return this.$val.Int31n(n); }; - Rand.ptr.prototype.int31n = function(n) { - var {_r, _r$1, _r$2, low, n, prod, r, thresh, v, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.Uint32(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - prod = $mul64((new $Uint64(0, v)), (new $Uint64(0, n))); - low = ((prod.$low >>> 0)); - /* */ if (low < ((n >>> 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (low < ((n >>> 0))) { */ case 2: - thresh = (_r$1 = ((-n >>> 0)) % ((n >>> 0)), _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")); - /* while (true) { */ case 4: - /* if (!(low < thresh)) { break; } */ if(!(low < thresh)) { $s = 5; continue; } - _r$2 = r.Uint32(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v = _r$2; - prod = $mul64((new $Uint64(0, v)), (new $Uint64(0, n))); - low = ((prod.$low >>> 0)); - $s = 4; continue; - case 5: - /* } */ case 3: - $s = -1; return (($shiftRightUint64(prod, 32).$low >> 0)); - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.int31n, $c: true, $r, _r, _r$1, _r$2, low, n, prod, r, thresh, v, $s};return $f; - }; - Rand.prototype.int31n = function(n) { return this.$val.int31n(n); }; - Rand.ptr.prototype.Intn = function(n) { - var {$24r, $24r$1, _r, _r$1, n, r, x, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (n <= 0) { - $panic(new $String("invalid argument to Intn")); - } - /* */ if (n <= 2147483647) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n <= 2147483647) { */ case 1: - _r = r.Int31n(((n >> 0))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = ((_r >> 0)); - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = r.Int63n((new $Int64(0, n))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = (((x = _r$1, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Intn, $c: true, $r, $24r, $24r$1, _r, _r$1, n, r, x, $s};return $f; - }; - Rand.prototype.Intn = function(n) { return this.$val.Intn(n); }; - Rand.ptr.prototype.Float64 = function() { - var {_r, f, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* again: */ case 1: - _r = r.Int63(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = ($flatten64(_r)) / 9.223372036854776e+18; - /* */ if (f === 1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (f === 1) { */ case 3: - /* goto again */ $s = 1; continue; - /* } */ case 4: - $s = -1; return f; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Float64, $c: true, $r, _r, f, r, $s};return $f; - }; - Rand.prototype.Float64 = function() { return this.$val.Float64(); }; - Rand.ptr.prototype.Float32 = function() { - var {_r, f, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* again: */ case 1: - _r = r.Float64(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - f = ($fround(_r)); - /* */ if (f === 1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (f === 1) { */ case 3: - /* goto again */ $s = 1; continue; - /* } */ case 4: - $s = -1; return f; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Float32, $c: true, $r, _r, f, r, $s};return $f; - }; - Rand.prototype.Float32 = function() { return this.$val.Float32(); }; - Rand.ptr.prototype.Perm = function(n) { - var {_r, i, j, m, n, r, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - m = $makeSlice(sliceType, n); - i = 0; - /* while (true) { */ case 1: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } - _r = r.Intn(i + 1 >> 0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - j = _r; - ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i] = ((j < 0 || j >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + j])); - ((j < 0 || j >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + j] = i); - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return m; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Perm, $c: true, $r, _r, i, j, m, n, r, $s};return $f; - }; - Rand.prototype.Perm = function(n) { return this.$val.Perm(n); }; - Rand.ptr.prototype.Shuffle = function(n, swap) { - var {_r, _r$1, i, j, j$1, n, r, swap, x, $s, $r, $c} = $restore(this, {n, swap}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (n < 0) { - $panic(new $String("invalid argument to Shuffle")); - } - i = n - 1 >> 0; - /* while (true) { */ case 1: - /* if (!(i > 2147483646)) { break; } */ if(!(i > 2147483646)) { $s = 2; continue; } - _r = r.Int63n((new $Int64(0, (i + 1 >> 0)))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - j = (((x = _r, x.$low + ((x.$high >> 31) * 4294967296)) >> 0)); - $r = swap(i, j); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i - (1) >> 0; - $s = 1; continue; - case 2: - /* while (true) { */ case 5: - /* if (!(i > 0)) { break; } */ if(!(i > 0)) { $s = 6; continue; } - _r$1 = r.int31n((((i + 1 >> 0) >> 0))); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - j$1 = ((_r$1 >> 0)); - $r = swap(i, j$1); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i - (1) >> 0; - $s = 5; continue; - case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Shuffle, $c: true, $r, _r, _r$1, i, j, j$1, n, r, swap, x, $s};return $f; - }; - Rand.prototype.Shuffle = function(n, swap) { return this.$val.Shuffle(n, swap); }; - Rand.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, err, lk, n, ok, p, r, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - _tuple = $assertType(r.src, ptrType$1, true); - lk = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = lk.read(p, (r.$ptr_readVal || (r.$ptr_readVal = new ptrType$5(function() { return this.$target.readVal; }, function($v) { this.$target.readVal = $v; }, r))), (r.$ptr_readPos || (r.$ptr_readPos = new ptrType$4(function() { return this.$target.readPos; }, function($v) { this.$target.readPos = $v; }, r)))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = read(p, r.src, (r.$ptr_readVal || (r.$ptr_readVal = new ptrType$5(function() { return this.$target.readVal; }, function($v) { this.$target.readVal = $v; }, r))), (r.$ptr_readPos || (r.$ptr_readPos = new ptrType$4(function() { return this.$target.readPos; }, function($v) { this.$target.readPos = $v; }, r)))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - n = _tuple$2[0]; - err = _tuple$2[1]; - $24r$1 = [n, err]; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, err, lk, n, ok, p, r, $s};return $f; - }; - Rand.prototype.Read = function(p) { return this.$val.Read(p); }; - read = function(p, src, readVal, readPos) { - var {_r, _tuple, err, n, p, pos, readPos, readVal, rng, src, val, $s, $r, $c} = $restore(this, {p, src, readVal, readPos}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - pos = readPos.$get(); - val = readVal.$get(); - _tuple = $assertType(src, ptrType, true); - rng = _tuple[0]; - n = 0; - /* while (true) { */ case 1: - /* if (!(n < p.$length)) { break; } */ if(!(n < p.$length)) { $s = 2; continue; } - /* */ if (pos === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (pos === 0) { */ case 3: - /* */ if (!(rng === ptrType.nil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(rng === ptrType.nil)) { */ case 5: - val = rng.Int63(); - $s = 7; continue; - /* } else { */ case 6: - _r = src.Int63(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - val = _r; - /* } */ case 7: - pos = 7; - /* } */ case 4: - ((n < 0 || n >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + n] = ((val.$low << 24 >>> 24))); - val = $shiftRightInt64(val, (8)); - pos = pos - (1) << 24 >> 24; - n = n + (1) >> 0; - $s = 1; continue; - case 2: - readPos.$set(pos); - readVal.$set(val); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: read, $c: true, $r, _r, _tuple, err, n, p, pos, readPos, readVal, rng, src, val, $s};return $f; - }; - Intn = function(n) { - var {$24r, _r, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = globalRand.Intn(n); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Intn, $c: true, $r, $24r, _r, n, $s};return $f; - }; - $pkg.Intn = Intn; - Float64 = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = globalRand.Float64(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Float64, $c: true, $r, $24r, _r, $s};return $f; - }; - $pkg.Float64 = Float64; - lockedSource.ptr.prototype.Int63 = function() { - var n, r; - n = new $Int64(0, 0); - r = this; - r.lk.Lock(); - n = r.src.Int63(); - r.lk.Unlock(); - return n; - }; - lockedSource.prototype.Int63 = function() { return this.$val.Int63(); }; - lockedSource.ptr.prototype.Uint64 = function() { - var n, r; - n = new $Uint64(0, 0); - r = this; - r.lk.Lock(); - n = r.src.Uint64(); - r.lk.Unlock(); - return n; - }; - lockedSource.prototype.Uint64 = function() { return this.$val.Uint64(); }; - lockedSource.ptr.prototype.Seed = function(seed) { - var r, seed; - r = this; - r.lk.Lock(); - r.src.Seed(seed); - r.lk.Unlock(); - }; - lockedSource.prototype.Seed = function(seed) { return this.$val.Seed(seed); }; - lockedSource.ptr.prototype.seedPos = function(seed, readPos) { - var r, readPos, seed; - r = this; - r.lk.Lock(); - r.src.Seed(seed); - readPos.$set(0); - r.lk.Unlock(); - }; - lockedSource.prototype.seedPos = function(seed, readPos) { return this.$val.seedPos(seed, readPos); }; - lockedSource.ptr.prototype.read = function(p, readVal, readPos) { - var {_r, _tuple, err, n, p, r, readPos, readVal, $s, $r, $c} = $restore(this, {p, readVal, readPos}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - r.lk.Lock(); - _r = read(p, r.src, readVal, readPos); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - r.lk.Unlock(); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: lockedSource.ptr.prototype.read, $c: true, $r, _r, _tuple, err, n, p, r, readPos, readVal, $s};return $f; - }; - lockedSource.prototype.read = function(p, readVal, readPos) { return this.$val.read(p, readVal, readPos); }; - absInt32 = function(i) { - var i; - if (i < 0) { - return ((-i >>> 0)); - } - return ((i >>> 0)); - }; - Rand.ptr.prototype.NormFloat64 = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, i, j, r, x, x$1, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* while (true) { */ case 1: - _r = r.Uint32(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - j = ((_r >> 0)); - i = j & 127; - x = (j) * (((i < 0 || i >= wn.length) ? ($throwRuntimeError("index out of range"), undefined) : wn[i])); - if (absInt32(j) < ((i < 0 || i >= kn.length) ? ($throwRuntimeError("index out of range"), undefined) : kn[i])) { - $s = -1; return x; - } - /* */ if (i === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (i === 0) { */ case 4: - /* while (true) { */ case 6: - _r$1 = r.Float64(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = math.Log(_r$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - x = -_r$2 * 0.29047645161474317; - _r$3 = r.Float64(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = math.Log(_r$3); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - y = -_r$4; - if (y + y >= x * x) { - /* break; */ $s = 7; continue; - } - $s = 6; continue; - case 7: - if (j > 0) { - $s = -1; return 3.442619855899 + x; - } - $s = -1; return -3.442619855899 - x; - /* } */ case 5: - _r$5 = r.Float64(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if ($fround(((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]) + $fround(($fround(_r$5)) * ($fround((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[x$1])) - ((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]))))) < ($fround(math.Exp(-0.5 * x * x)))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($fround(((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]) + $fround(($fround(_r$5)) * ($fround((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[x$1])) - ((i < 0 || i >= fn.length) ? ($throwRuntimeError("index out of range"), undefined) : fn[i]))))) < ($fround(math.Exp(-0.5 * x * x)))) { */ case 12: - $s = -1; return x; - /* } */ case 13: - $s = 1; continue; - case 2: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.NormFloat64, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, i, j, r, x, x$1, y, $s};return $f; - }; - Rand.prototype.NormFloat64 = function() { return this.$val.NormFloat64(); }; - Rand.ptr.prototype.ExpFloat64 = function() { - var {$24r, _r, _r$1, _r$2, _r$3, i, j, r, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* while (true) { */ case 1: - _r = r.Uint32(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - j = _r; - i = (j & 255) >>> 0; - x = (j) * (((i < 0 || i >= we.length) ? ($throwRuntimeError("index out of range"), undefined) : we[i])); - if (j < ((i < 0 || i >= ke.length) ? ($throwRuntimeError("index out of range"), undefined) : ke[i])) { - $s = -1; return x; - } - /* */ if (i === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (i === 0) { */ case 4: - _r$1 = r.Float64(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = math.Log(_r$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = 7.69711747013105 - _r$2; - $s = 8; case 8: return $24r; - /* } */ case 5: - _r$3 = r.Float64(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if ($fround(((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]) + $fround(($fround(_r$3)) * ($fround((x$1 = i - 1 >>> 0, ((x$1 < 0 || x$1 >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[x$1])) - ((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]))))) < ($fround(math.Exp(-x)))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($fround(((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]) + $fround(($fround(_r$3)) * ($fround((x$1 = i - 1 >>> 0, ((x$1 < 0 || x$1 >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[x$1])) - ((i < 0 || i >= fe.length) ? ($throwRuntimeError("index out of range"), undefined) : fe[i]))))) < ($fround(math.Exp(-x)))) { */ case 9: - $s = -1; return x; - /* } */ case 10: - $s = 1; continue; - case 2: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Rand.ptr.prototype.ExpFloat64, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, i, j, r, x, x$1, $s};return $f; - }; - Rand.prototype.ExpFloat64 = function() { return this.$val.ExpFloat64(); }; - ptrType.methods = [{prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}]; - ptrType$2.methods = [{prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint32", name: "Uint32", pkg: "", typ: $funcType([], [$Uint32], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Int31", name: "Int31", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "Int", name: "Int", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Int63n", name: "Int63n", pkg: "", typ: $funcType([$Int64], [$Int64], false)}, {prop: "Int31n", name: "Int31n", pkg: "", typ: $funcType([$Int32], [$Int32], false)}, {prop: "int31n", name: "int31n", pkg: "math/rand", typ: $funcType([$Int32], [$Int32], false)}, {prop: "Intn", name: "Intn", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "Float64", name: "Float64", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "Float32", name: "Float32", pkg: "", typ: $funcType([], [$Float32], false)}, {prop: "Perm", name: "Perm", pkg: "", typ: $funcType([$Int], [sliceType], false)}, {prop: "Shuffle", name: "Shuffle", pkg: "", typ: $funcType([$Int, funcType], [], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "NormFloat64", name: "NormFloat64", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "ExpFloat64", name: "ExpFloat64", pkg: "", typ: $funcType([], [$Float64], false)}]; - ptrType$1.methods = [{prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "seedPos", name: "seedPos", pkg: "math/rand", typ: $funcType([$Int64, ptrType$4], [], false)}, {prop: "read", name: "read", pkg: "math/rand", typ: $funcType([sliceType$1, ptrType$5, ptrType$4], [$Int, $error], false)}]; - rngSource.init("math/rand", [{prop: "tap", name: "tap", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "feed", name: "feed", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "vec", name: "vec", embedded: false, exported: false, typ: arrayType, tag: ""}]); - Source.init([{prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}]); - Source64.init([{prop: "Int63", name: "Int63", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}]); - Rand.init("math/rand", [{prop: "src", name: "src", embedded: false, exported: false, typ: Source, tag: ""}, {prop: "s64", name: "s64", embedded: false, exported: false, typ: Source64, tag: ""}, {prop: "readVal", name: "readVal", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "readPos", name: "readPos", embedded: false, exported: false, typ: $Int8, tag: ""}]); - lockedSource.init("math/rand", [{prop: "lk", name: "lk", embedded: false, exported: false, typ: nosync.Mutex, tag: ""}, {prop: "src", name: "src", embedded: false, exported: false, typ: ptrType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = nosync.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - rngCooked = $toNativeArray($kindInt64, [new $Int64(-973649357, 3952672746), new $Int64(-1065661887, 3130416987), new $Int64(324977939, 3414273807), new $Int64(1241840476, 2806224363), new $Int64(-1477934308, 1997590414), new $Int64(2103305448, 2402795971), new $Int64(1663160183, 1140819369), new $Int64(1120601685, 1788868961), new $Int64(1848035537, 1089001426), new $Int64(1235702047, 873593504), new $Int64(1911387977, 581324885), new $Int64(-1654874170, 1609182556), new $Int64(1069394745, 1241596776), new $Int64(1895445337, 1771189259), new $Int64(-1374618802, 3467012610), new $Int64(-140526423, 2344407434), new $Int64(-1745367887, 782467244), new $Int64(26335124, 3404933915), new $Int64(1063924276, 618867887), new $Int64(-968700782, 520164395), new $Int64(-1591572833, 1341358184), new $Int64(-1515085039, 665794848), new $Int64(1527227641, 3183648150), new $Int64(1781176124, 696329606), new $Int64(1789146075, 4151988961), new $Int64(-2087444114, 998951326), new $Int64(-612324923, 1364957564), new $Int64(63173359, 4090230633), new $Int64(-1498029007, 4009697548), new $Int64(248009524, 2569622517), new $Int64(778703922, 3742421481), new $Int64(-1109106023, 1506914633), new $Int64(1738099768, 1983412561), new $Int64(236311649, 1436266083), new $Int64(-1111517500, 3922894967), new $Int64(-1336974714, 1792680179), new $Int64(563141142, 1188796351), new $Int64(1349617468, 405968250), new $Int64(1044074554, 433754187), new $Int64(870549669, 4073162024), new $Int64(-1094251604, 433121399), new $Int64(2451824, 4162580594), new $Int64(-137262572, 4132415622), new $Int64(-1536231048, 3033822028), new $Int64(2016407895, 824682382), new $Int64(2366218, 3583765414), new $Int64(-624604839, 535386927), new $Int64(1637219058, 2286693689), new $Int64(1453075389, 2968466525), new $Int64(193683513, 1351410206), new $Int64(-283806096, 1412813499), new $Int64(492736522, 4126267639), new $Int64(512765208, 2105529399), new $Int64(2132966268, 2413882233), new $Int64(947457634, 32226200), new $Int64(1149341356, 2032329073), new $Int64(106485445, 1356518208), new $Int64(-2067810156, 3430061722), new $Int64(-1484435135, 3820169661), new $Int64(-1665985194, 2981816134), new $Int64(1017155588, 4184371017), new $Int64(206574701, 2119206761), new $Int64(-852109057, 2472200560), new $Int64(-560457548, 2853524696), new $Int64(1307803389, 1681119904), new $Int64(-174986835, 95608918), new $Int64(392686347, 3690479145), new $Int64(-1205570926, 1397922290), new $Int64(-1159314025, 1516129515), new $Int64(-320178155, 1547420459), new $Int64(1311333971, 1470949486), new $Int64(-1953469798, 1336785672), new $Int64(-45086614, 4131677129), new $Int64(-1392278100, 4246329084), new $Int64(-1142500187, 3788585631), new $Int64(-66478285, 3080389532), new $Int64(-646438364, 2215402037), new $Int64(391002300, 1171593935), new $Int64(1408774047, 1423855166), new $Int64(-519177718, 2276716302), new $Int64(-368453140, 2068027241), new $Int64(1369359303, 3427553297), new $Int64(189241615, 3289637845), new $Int64(1057480830, 3486407650), new $Int64(-1512910664, 3071877822), new $Int64(1159653919, 3363620705), new $Int64(-934256930, 4159821533), new $Int64(-76621938, 1894661), new $Int64(-674493898, 1156868282), new $Int64(348271067, 776219088), new $Int64(-501428838, 2425634259), new $Int64(1716021749, 680510161), new $Int64(-574263456, 1310101429), new $Int64(1095885995, 2964454134), new $Int64(-325695512, 3467098407), new $Int64(1990672920, 2109628894), new $Int64(-2139648704, 1232604732), new $Int64(-1838070714, 3261916179), new $Int64(1699175360, 434597899), new $Int64(235436061, 1624796439), new $Int64(-1626402839, 3589632480), new $Int64(1198416575, 864579159), new $Int64(-1938748161, 1380889830), new $Int64(619206309, 2654509477), new $Int64(1419738251, 1468209306), new $Int64(-1744284772, 100794388), new $Int64(-1191421458, 2991674471), new $Int64(-208666741, 2224662036), new $Int64(-173659161, 977097250), new $Int64(1351320195, 726419512), new $Int64(-183459897, 1747974366), new $Int64(-753095183, 1556430604), new $Int64(-1049492215, 1080776742), new $Int64(-385846958, 280794874), new $Int64(117767733, 919835643), new $Int64(-967009426, 3434019658), new $Int64(-1951414480, 2461941785), new $Int64(133215641, 3615001066), new $Int64(417204809, 3103414427), new $Int64(790056561, 3380809712), new $Int64(-1267681408, 2724693469), new $Int64(547796833, 598827710), new $Int64(-1846559452, 3452273442), new $Int64(-75778224, 649274915), new $Int64(-801301329, 2585724112), new $Int64(-1510934263, 3165579553), new $Int64(1185578221, 2635894283), new $Int64(-52910178, 2053289721), new $Int64(985976581, 3169337108), new $Int64(1170569632, 144717764), new $Int64(1079216270, 1383666384), new $Int64(-124804942, 681540375), new $Int64(1375448925, 537050586), new $Int64(-1964768344, 315246468), new $Int64(226402871, 849323088), new $Int64(-885062465, 45543944), new $Int64(-946445250, 2319052083), new $Int64(-40708194, 3613090841), new $Int64(560472520, 2992171180), new $Int64(-381863169, 2068244785), new $Int64(917538188, 4239862634), new $Int64(-1369555809, 3892253031), new $Int64(720683925, 958186149), new $Int64(-423297785, 1877702262), new $Int64(1357886971, 837674867), new $Int64(1837048883, 1507589294), new $Int64(1905518400, 873336795), new $Int64(-1879761037, 2764496274), new $Int64(-1806480530, 4196182374), new $Int64(-1066765755, 550964545), new $Int64(818747069, 420611474), new $Int64(-1924830376, 204265180), new $Int64(1549974541, 1787046383), new $Int64(1215581865, 3102292318), new $Int64(418321538, 1552199393), new $Int64(1243493047, 980542004), new $Int64(267284263, 3293718720), new $Int64(1179528763, 3771917473), new $Int64(599484404, 2195808264), new $Int64(252818753, 3894702887), new $Int64(-1367475956, 2099949527), new $Int64(1424094358, 338442522), new $Int64(490737398, 637158004), new $Int64(-1727621530, 281976339), new $Int64(574970164, 3619802330), new $Int64(-431930823, 3084554784), new $Int64(-1264611183, 4129772886), new $Int64(-2104399043, 1680378557), new $Int64(-1621962591, 3339087776), new $Int64(1680500332, 4220317857), new $Int64(-1935828963, 2959322499), new $Int64(1675600481, 1488354890), new $Int64(-834863562, 3958162143), new $Int64(-1226511573, 2773705983), new $Int64(1876039582, 225908689), new $Int64(-1183735113, 908216283), new $Int64(-605696219, 3574646075), new $Int64(-1827723091, 1936937569), new $Int64(1519770881, 75492235), new $Int64(816689472, 1935193178), new $Int64(2142521206, 2018250883), new $Int64(455141620, 3943126022), new $Int64(-601399488, 3066544345), new $Int64(1932392669, 2793082663), new $Int64(-1239009361, 3297036421), new $Int64(1640597065, 2206987825), new $Int64(-553246738, 807894872), new $Int64(-1781325307, 766252117), new $Int64(2060649606, 3833114345), new $Int64(845619743, 1255067973), new $Int64(1201145605, 741697208), new $Int64(-1476242608, 2810093753), new $Int64(1109032642, 4229340371), new $Int64(1462188720, 1361684224), new $Int64(-1159399429, 1906263026), new $Int64(475781207, 3904421704), new $Int64(-623537128, 1769075545), new $Int64(1062308525, 2621599764), new $Int64(1279509432, 3431891480), new $Int64(-1742751146, 1871896503), new $Int64(128756421, 1412808876), new $Int64(1605404688, 952876175), new $Int64(-230443691, 1824438899), new $Int64(1662295856, 1005035476), new $Int64(-156574141, 527508597), new $Int64(1288873303, 3066806859), new $Int64(565995893, 3244940914), new $Int64(-889746188, 209092916), new $Int64(-247669406, 1242699167), new $Int64(-713830396, 456723774), new $Int64(1776978905, 1001252870), new $Int64(1468772157, 2026725874), new $Int64(857254202, 2137562569), new $Int64(765939740, 3183366709), new $Int64(1533887628, 2612072960), new $Int64(56977098, 1727148468), new $Int64(-1197583895, 3803658212), new $Int64(1883670356, 479946959), new $Int64(685713571, 1562982345), new $Int64(-1946242443, 1766109365), new $Int64(700596547, 3257093788), new $Int64(-184714929, 2365720207), new $Int64(93384808, 3742754173), new $Int64(-458385235, 2878193673), new $Int64(1096135042, 2174002182), new $Int64(-834260953, 3573511231), new $Int64(-754572527, 1760299077), new $Int64(-1375627191, 2260779833), new $Int64(-866019274, 1452805722), new $Int64(-1229671918, 2940011802), new $Int64(1890251082, 1886183802), new $Int64(893897673, 2514369088), new $Int64(1644345561, 3924317791), new $Int64(-1974867432, 500935732), new $Int64(1403501753, 676580929), new $Int64(-1565912283, 1184984890), new $Int64(-691968413, 1271474274), new $Int64(-1828754738, 3163791473), new $Int64(2051027584, 2842487377), new $Int64(1511537551, 2170968612), new $Int64(573262976, 3535856740), new $Int64(-2053227187, 1488599718), new $Int64(-1180531831, 3408913763), new $Int64(-2086531912, 2501050084), new $Int64(-875130448, 1639124157), new $Int64(-2009482504, 4088176393), new $Int64(1574896563, 3989947576), new $Int64(-165243708, 3414355209), new $Int64(-792329287, 2275136352), new $Int64(-2057774345, 2151835223), new $Int64(-931144933, 1654534827), new $Int64(-679921451, 377892833), new $Int64(-482716010, 660204544), new $Int64(85706799, 390828249), new $Int64(-1422172693, 3402783878), new $Int64(-1468634160, 3717936603), new $Int64(1113532086, 2211058823), new $Int64(1564224320, 2692150867), new $Int64(1952770442, 1928910388), new $Int64(788716862, 3931011137), new $Int64(1083670504, 1112701047), new $Int64(-68150572, 2452299106), new $Int64(-896164822, 2337204777), new $Int64(1774877857, 273889282), new $Int64(1798719843, 1462008793), new $Int64(2138834788, 1554494002), new $Int64(-1194967131, 182675323), new $Int64(-1598554764, 1882802136), new $Int64(589279648, 3700220025), new $Int64(381039426, 3083431543), new $Int64(-851859191, 3622207527), new $Int64(338126939, 432729309), new $Int64(-1667470126, 2391914317), new $Int64(-1849558151, 235747924), new $Int64(2120733629, 3088823825), new $Int64(-745079795, 2314658321), new $Int64(1165929723, 2957634338), new $Int64(501323675, 4117056981), new $Int64(1564699815, 1482500298), new $Int64(-740826490, 840489337), new $Int64(799522364, 3483178565), new $Int64(532129761, 2074004656), new $Int64(724246478, 3643392642), new $Int64(-665153481, 1583624461), new $Int64(-885822954, 287473085), new $Int64(1667835381, 3136843981), new $Int64(1138806821, 1266970974), new $Int64(135185781, 1998688839), new $Int64(392094735, 1492900209), new $Int64(1031326774, 1538112737), new $Int64(-2070568842, 2207265429), new $Int64(-1886797613, 963263315), new $Int64(1671145500, 2295892134), new $Int64(1068469660, 2002560897), new $Int64(-356250305, 1369254035), new $Int64(33436120, 3353312708), new $Int64(57507843, 947771099), new $Int64(-1945755145, 1747061399), new $Int64(1507240140, 2047354631), new $Int64(720000810, 4165367136), new $Int64(479265078, 3388864963), new $Int64(-952181250, 286492130), new $Int64(2045622690, 2795735007), new $Int64(-715730566, 3703961339), new $Int64(-148436487, 1797825479), new $Int64(1429039600, 1116589674), new $Int64(-1665420098, 2593309206), new $Int64(1329049334, 3404995677), new $Int64(-750579440, 3453462936), new $Int64(1014767077, 3016498634), new $Int64(75698599, 1650371545), new $Int64(1592007860, 212344364), new $Int64(1127766888, 3843932156), new $Int64(-748019856, 3573129983), new $Int64(-890581831, 665897820), new $Int64(1071492673, 1675628772), new $Int64(243225682, 2831752928), new $Int64(2120298836, 1486294219), new $Int64(-1954407413, 268782709), new $Int64(-1002123503, 4186179080), new $Int64(624342951, 1613720397), new $Int64(857179861, 2703686015), new $Int64(-911618704, 2205342611), new $Int64(-672703993, 1411666394), new $Int64(-1528454899, 677744900), new $Int64(-1876628533, 4172867247), new $Int64(135494707, 2163418403), new $Int64(849547544, 2841526879), new $Int64(-1117516959, 1082141470), new $Int64(-1770111792, 4046134367), new $Int64(51415528, 2142943655), new $Int64(-249824333, 3124627521), new $Int64(998228909, 219992939), new $Int64(-1078790951, 1756846531), new $Int64(1283749206, 1225118210), new $Int64(-525858006, 1647770243), new $Int64(-2035959705, 444807907), new $Int64(2036369448, 3952076173), new $Int64(53201823, 1461839639), new $Int64(315761893, 3699250910), new $Int64(702974850, 1373688981), new $Int64(734022261, 147523747), new $Int64(-2047330906, 1211276581), new $Int64(1294440951, 2548832680), new $Int64(1144696256, 1995631888), new $Int64(-1992983070, 2011457303), new $Int64(-1351022674, 3057425772), new $Int64(667839456, 81484597), new $Int64(-1681980888, 3646681560), new $Int64(-1372462725, 635548515), new $Int64(602489502, 2508044581), new $Int64(-1794220117, 1014917157), new $Int64(719992433, 3214891315), new $Int64(-1294799037, 959582252), new $Int64(226415134, 3347040449), new $Int64(-362868096, 4102971975), new $Int64(397887437, 4078022210), new $Int64(-536803826, 2851767182), new $Int64(-1398321012, 1540160644), new $Int64(-1549098876, 1057290595), new $Int64(-112592988, 3907769253), new $Int64(579300318, 4248952684), new $Int64(-1054576049, 132554364), new $Int64(-1085862414, 1029351092), new $Int64(697840928, 2583007416), new $Int64(298619124, 1486185789), new $Int64(55905697, 2871589073), new $Int64(2017643612, 723203291), new $Int64(146250550, 2494333952), new $Int64(-1082993397, 2230939180), new $Int64(-1804568072, 3943232912), new $Int64(1768732449, 2181367922), new $Int64(-729261111, 2889274791), new $Int64(1824032949, 2046728161), new $Int64(1653899792, 1376052477), new $Int64(1022327048, 381236993), new $Int64(-1113097690, 3188942166), new $Int64(-74480109, 350070824), new $Int64(144881592, 61758415), new $Int64(-741824226, 3492950336), new $Int64(-2030042720, 3093818430), new $Int64(-453590535, 2962480613), new $Int64(-1912050708, 3154871160), new $Int64(-1636478569, 3228564679), new $Int64(610731502, 888276216), new $Int64(-946702974, 3574998604), new $Int64(-1277068380, 1967526716), new $Int64(-1556147941, 1554691298), new $Int64(-1573024234, 339944798), new $Int64(1223764147, 1154515356), new $Int64(1825645307, 967516237), new $Int64(1546195135, 596588202), new $Int64(-1867600880, 3764362170), new $Int64(-1655392592, 266611402), new $Int64(-393255880, 2047856075), new $Int64(-1000726433, 21444105), new $Int64(-949424754, 3065563181), new $Int64(-232418803, 1140663212), new $Int64(633187674, 2323741028), new $Int64(2126290159, 3103873707), new $Int64(1008658319, 2766828349), new $Int64(-485587503, 1970872996), new $Int64(1628585413, 3766615585), new $Int64(-595148528, 2036813414), new $Int64(-1994877121, 3105536507), new $Int64(13954645, 3396176938), new $Int64(-721402003, 1377154485), new $Int64(-61839181, 3807014186), new $Int64(543009040, 3710110597), new $Int64(-1751425519, 916420443), new $Int64(734556788, 2103831255), new $Int64(-1766161494, 717331943), new $Int64(-1574598896, 3550505941), new $Int64(45939673, 378749927), new $Int64(-1997615719, 611017331), new $Int64(592130075, 758907650), new $Int64(1012992349, 154266815), new $Int64(-1040454942, 1407468696), new $Int64(-1678191250, 970098704), new $Int64(-285057486, 1971660656), new $Int64(998365243, 3332747885), new $Int64(1947089649, 1935189867), new $Int64(1510248801, 203520055), new $Int64(-1305165746, 3916463034), new $Int64(-388598655, 3474113316), new $Int64(1036101639, 316544223), new $Int64(-1773744891, 1650844677), new $Int64(-907191419, 4267565603), new $Int64(-1070275024, 2501167616), new $Int64(-1520651863, 3929401789), new $Int64(-2091360852, 337170252), new $Int64(-960502090, 2061966842), new $Int64(-304190848, 2508461464), new $Int64(-1941471116, 2791377107), new $Int64(1240791848, 1227227588), new $Int64(1813978778, 1709681848), new $Int64(1153692192, 3768820575), new $Int64(-1002297449, 2887126398), new $Int64(-1447111334, 296561685), new $Int64(700300844, 3729960077), new $Int64(-1572311344, 372833036), new $Int64(2078875613, 2409779288), new $Int64(1829161290, 555274064), new $Int64(-1105595719, 4239804901), new $Int64(1839403216, 3723486978), new $Int64(-1649093095, 2145871984), new $Int64(-1582765715, 3565480803), new $Int64(-1568653827, 2197313814), new $Int64(974785092, 3613674566), new $Int64(438638731, 3042093666), new $Int64(-96556264, 3324034321), new $Int64(869420878, 3708873369), new $Int64(946682149, 1698090092), new $Int64(1618900382, 4213940712), new $Int64(-1843479747, 2087477361), new $Int64(-1766167800, 2407950639), new $Int64(-1296225558, 3942568569), new $Int64(-1223900450, 4088074412), new $Int64(723260036, 2964773675), new $Int64(-673921829, 1539178386), new $Int64(1062961552, 2694849566), new $Int64(460977733, 2120273838), new $Int64(-1604570740, 2484608657), new $Int64(880846449, 2956190677), new $Int64(1970902366, 4223313749), new $Int64(662161910, 3502682327), new $Int64(705634754, 4133891139), new $Int64(-1031359300, 1166449596), new $Int64(1038247601, 3362705993), new $Int64(93734798, 3892921029), new $Int64(1876124043, 786869787), new $Int64(1057490746, 1046342263), new $Int64(242763728, 493777327), new $Int64(-853573201, 3304827646), new $Int64(616460742, 125356352), new $Int64(499300063, 74094113), new $Int64(-795586925, 2500816079), new $Int64(-490248444, 514015239), new $Int64(1377565129, 543520454), new $Int64(-2039776725, 3614531153), new $Int64(2056746300, 2356753985), new $Int64(1390062617, 2018141668), new $Int64(131272971, 2087974891), new $Int64(-1502927041, 3166972343), new $Int64(372256200, 1517638666), new $Int64(-935275664, 173466846), new $Int64(-695774461, 4241513471), new $Int64(-1413550842, 2783126920), new $Int64(1972004134, 4167264826), new $Int64(29260506, 3907395640), new $Int64(-910901561, 1539634186), new $Int64(-595957298, 178241987), new $Int64(-113277636, 182168164), new $Int64(-1102530459, 2386154934), new $Int64(1379126408, 4077374341), new $Int64(-2114679722, 1732699140), new $Int64(-421057745, 1041306002), new $Int64(1860414813, 2068001749), new $Int64(1005320202, 3208962910), new $Int64(844054010, 697710380), new $Int64(-1509359403, 2228431183), new $Int64(-810313977, 3554678728), new $Int64(-750989047, 173470263), new $Int64(-85886265, 3848297795), new $Int64(-926936977, 246236185), new $Int64(-1984190461, 2066374846), new $Int64(1771673660, 312890749), new $Int64(703378057, 3573310289), new $Int64(-598851901, 143166754), new $Int64(613554316, 2081511079), new $Int64(1197802104, 486038032), new $Int64(-1906483789, 2982218564), new $Int64(364901986, 1000939191), new $Int64(1902782651, 2750454885), new $Int64(-671844857, 3375313137), new $Int64(-1643868040, 881302957), new $Int64(-1508784745, 2514186393), new $Int64(-1703622845, 360024739), new $Int64(1399671872, 292500025), new $Int64(1381210821, 2276300752), new $Int64(521803381, 4069087683), new $Int64(-1938982667, 1637778212), new $Int64(720490469, 1676670893), new $Int64(1067262482, 3855174429), new $Int64(2114075974, 2067248671), new $Int64(-89426259, 2884561259), new $Int64(-805741095, 2456511185), new $Int64(983726246, 561175414), new $Int64(-1719489563, 432588903), new $Int64(885133709, 4059399550), new $Int64(-93096266, 1075014784), new $Int64(-1733832628, 2728058415), new $Int64(1839142064, 1299703678), new $Int64(1262333188, 2347583393), new $Int64(1285481956, 2468164145), new $Int64(-1158354011, 1140014346), new $Int64(2033889184, 1936972070), new $Int64(-1737578993, 3870530098), new $Int64(-484494257, 1717789158), new $Int64(-232997156, 1153452491), new $Int64(-990424416, 3948827651), new $Int64(-1357145630, 2101413152), new $Int64(1495744672, 3854091229), new $Int64(83644069, 4215565463), new $Int64(-1385277313, 1202710438), new $Int64(-564909037, 2072216740), new $Int64(705690639, 2066751068), new $Int64(-2113583312, 173902580), new $Int64(-741983806, 142459001), new $Int64(172391592, 1889151926), new $Int64(-498943125, 3034199774), new $Int64(1618587731, 516490102), new $Int64(93114264, 3692577783), new $Int64(-2078821353, 2953948865), new $Int64(-320938673, 4041040923), new $Int64(-1942517976, 592046130), new $Int64(-705643640, 384297211), new $Int64(-2051649464, 265863924), new $Int64(2101717619, 1333136237), new $Int64(1499611781, 1406273556), new $Int64(1074670496, 426305476), new $Int64(125704633, 2750898176), new $Int64(488068495, 1633944332), new $Int64(2037723464, 3236349343), new $Int64(-1703423246, 4013676611), new $Int64(1718532237, 2265047407), new $Int64(1433593806, 875071080), new $Int64(-343047503, 1418843655), new $Int64(2009228711, 451657300), new $Int64(1229446621, 1866374663), new $Int64(1653472867, 1551455622), new $Int64(577191481, 3560962459), new $Int64(1669204077, 3347903778), new $Int64(-298327194, 2675874918), new $Int64(-1831355577, 2762991672), new $Int64(530492383, 3689068477), new $Int64(844089962, 4071997905), new $Int64(1508155730, 1381702441), new $Int64(2089931018, 2373284878), new $Int64(-864267462, 2143983064), new $Int64(308739063, 1938207195), new $Int64(1754949306, 1188152253), new $Int64(1272345009, 615870490), new $Int64(742653194, 2662252621), new $Int64(1477718295, 3839976789), new $Int64(-2091334213, 306752547), new $Int64(-1426688067, 2162363077), new $Int64(-57052633, 2767224719), new $Int64(-1471624099, 2628837712), new $Int64(1678405918, 2967771969), new $Int64(1694285728, 499792248), new $Int64(-1744131281, 4285253508), new $Int64(962357072, 2856511070), new $Int64(679471692, 2526409716), new $Int64(-1793706473, 1240875658), new $Int64(-914893422, 2577342868), new $Int64(-1001298215, 4136853496), new $Int64(-1477114974, 2403540137), new $Int64(1372824515, 1371410668), new $Int64(-176562048, 371758825), new $Int64(-441063112, 1528834084), new $Int64(-71688630, 1504757260), new $Int64(-1461820072, 699052551), new $Int64(-505543539, 3347789870), new $Int64(1951619734, 3430604759), new $Int64(2119672219, 1935601723), new $Int64(966789690, 834676166)]); - globalRand = New(new lockedSource.ptr(new nosync.Mutex.ptr(false), $assertType(NewSource(new $Int64(0, 1)), ptrType))); - kn = $toNativeArray($kindUint32, [1991057938, 0, 1611602771, 1826899878, 1918584482, 1969227037, 2001281515, 2023368125, 2039498179, 2051788381, 2061460127, 2069267110, 2075699398, 2081089314, 2085670119, 2089610331, 2093034710, 2096037586, 2098691595, 2101053571, 2103168620, 2105072996, 2106796166, 2108362327, 2109791536, 2111100552, 2112303493, 2113412330, 2114437283, 2115387130, 2116269447, 2117090813, 2117856962, 2118572919, 2119243101, 2119871411, 2120461303, 2121015852, 2121537798, 2122029592, 2122493434, 2122931299, 2123344971, 2123736059, 2124106020, 2124456175, 2124787725, 2125101763, 2125399283, 2125681194, 2125948325, 2126201433, 2126441213, 2126668298, 2126883268, 2127086657, 2127278949, 2127460589, 2127631985, 2127793506, 2127945490, 2128088244, 2128222044, 2128347141, 2128463758, 2128572095, 2128672327, 2128764606, 2128849065, 2128925811, 2128994934, 2129056501, 2129110560, 2129157136, 2129196237, 2129227847, 2129251929, 2129268426, 2129277255, 2129278312, 2129271467, 2129256561, 2129233410, 2129201800, 2129161480, 2129112170, 2129053545, 2128985244, 2128906855, 2128817916, 2128717911, 2128606255, 2128482298, 2128345305, 2128194452, 2128028813, 2127847342, 2127648860, 2127432031, 2127195339, 2126937058, 2126655214, 2126347546, 2126011445, 2125643893, 2125241376, 2124799783, 2124314271, 2123779094, 2123187386, 2122530867, 2121799464, 2120980787, 2120059418, 2119015917, 2117825402, 2116455471, 2114863093, 2112989789, 2110753906, 2108037662, 2104664315, 2100355223, 2094642347, 2086670106, 2074676188, 2054300022, 2010539237]); - wn = $toNativeArray($kindFloat32, [1.7290404663583558e-09, 1.2680928529462676e-10, 1.689751810696194e-10, 1.9862687883343e-10, 2.223243117382978e-10, 2.4244936613904144e-10, 2.601613091623989e-10, 2.761198769629658e-10, 2.9073962681813725e-10, 3.042996965518796e-10, 3.169979556627567e-10, 3.289802041894774e-10, 3.4035738116777736e-10, 3.5121602848242617e-10, 3.61625090983253e-10, 3.7164057942185025e-10, 3.813085680537398e-10, 3.906675816178762e-10, 3.997501218933053e-10, 4.0858399996679395e-10, 4.1719308563337165e-10, 4.255982233303257e-10, 4.3381759295968436e-10, 4.4186720948857783e-10, 4.497613115272969e-10, 4.57512583373898e-10, 4.6513240481438345e-10, 4.726310454117311e-10, 4.800177477726209e-10, 4.873009773476156e-10, 4.944885056978876e-10, 5.015873272284921e-10, 5.086040477664255e-10, 5.155446070048697e-10, 5.224146670812502e-10, 5.292193350214802e-10, 5.359634958068682e-10, 5.426517013518151e-10, 5.492881705038144e-10, 5.558769555769061e-10, 5.624218868405251e-10, 5.689264614971989e-10, 5.75394121238304e-10, 5.818281967329142e-10, 5.882316855831959e-10, 5.946076964136182e-10, 6.009590047817426e-10, 6.072883862451306e-10, 6.135985053390414e-10, 6.19892026598734e-10, 6.261713370037114e-10, 6.324390455780815e-10, 6.386973727678935e-10, 6.449488165749528e-10, 6.511955974453087e-10, 6.574400468473129e-10, 6.636843297158634e-10, 6.699307220081607e-10, 6.761814441702541e-10, 6.824387166481927e-10, 6.887046488657234e-10, 6.949815167800466e-10, 7.012714853260604e-10, 7.075767749498141e-10, 7.13899661608508e-10, 7.202424212593428e-10, 7.266072743483676e-10, 7.329966078550854e-10, 7.394128087589991e-10, 7.458582640396116e-10, 7.523354716987285e-10, 7.588469852493063e-10, 7.653954137154528e-10, 7.719834771435785e-10, 7.786139510912449e-10, 7.852897221383159e-10, 7.920137878869582e-10, 7.987892014504894e-10, 8.056192379868321e-10, 8.125072836762115e-10, 8.194568912323064e-10, 8.264716688799467e-10, 8.3355555791087e-10, 8.407127216614185e-10, 8.479473234679347e-10, 8.552640262671218e-10, 8.626675485068347e-10, 8.701631637464402e-10, 8.777562010564566e-10, 8.854524335966119e-10, 8.932581896381464e-10, 9.011799639857543e-10, 9.092249730890956e-10, 9.174008219758889e-10, 9.25715837318819e-10, 9.341788453909317e-10, 9.42799727177146e-10, 9.515889187738935e-10, 9.605578554783278e-10, 9.697193048552322e-10, 9.790869226478094e-10, 9.886760299337993e-10, 9.985036131254788e-10, 1.008588212947359e-09, 1.0189509236369076e-09, 1.0296150598776421e-09, 1.040606933955246e-09, 1.0519566329136865e-09, 1.0636980185552147e-09, 1.0758701707302976e-09, 1.0885182755160372e-09, 1.101694735439196e-09, 1.115461056855338e-09, 1.1298901814171813e-09, 1.1450695946990663e-09, 1.1611052119775422e-09, 1.178127595480305e-09, 1.1962995039027646e-09, 1.2158286599728285e-09, 1.2369856250415978e-09, 1.2601323318151003e-09, 1.2857697129220469e-09, 1.3146201904845611e-09, 1.3477839955200466e-09, 1.3870635751089821e-09, 1.43574030442295e-09, 1.5008658760251592e-09, 1.6030947680434338e-09]); - fn = $toNativeArray($kindFloat32, [1, 0.963599681854248, 0.9362826943397522, 0.9130436182022095, 0.8922816514968872, 0.8732430338859558, 0.8555005788803101, 0.8387836217880249, 0.8229072093963623, 0.8077383041381836, 0.7931770086288452, 0.7791460752487183, 0.7655841708183289, 0.7524415850639343, 0.7396772503852844, 0.7272568941116333, 0.7151514887809753, 0.7033361196517944, 0.6917891502380371, 0.6804918646812439, 0.6694276928901672, 0.6585819721221924, 0.6479418277740479, 0.6374954581260681, 0.6272324919700623, 0.6171433925628662, 0.6072195172309875, 0.5974531769752502, 0.5878370404243469, 0.5783646702766418, 0.5690299868583679, 0.5598273873329163, 0.550751805305481, 0.5417983531951904, 0.5329626798629761, 0.5242405533790588, 0.5156282186508179, 0.5071220397949219, 0.49871864914894104, 0.4904148280620575, 0.48220765590667725, 0.47409430146217346, 0.466072142124176, 0.45813870429992676, 0.45029163360595703, 0.44252872467041016, 0.4348478317260742, 0.42724698781967163, 0.41972434520721436, 0.41227802634239197, 0.40490642189979553, 0.39760786294937134, 0.3903807997703552, 0.3832238018512726, 0.3761354684829712, 0.3691144585609436, 0.36215949058532715, 0.3552693724632263, 0.3484429717063904, 0.3416791558265686, 0.33497685194015503, 0.32833510637283325, 0.3217529058456421, 0.3152293860912323, 0.30876362323760986, 0.3023548424243927, 0.2960021495819092, 0.2897048592567444, 0.28346219658851624, 0.2772735059261322, 0.271138072013855, 0.2650552988052368, 0.25902456045150757, 0.25304529070854187, 0.24711695313453674, 0.24123899638652802, 0.23541094362735748, 0.22963231801986694, 0.22390270233154297, 0.21822164952754974, 0.21258877217769623, 0.20700371265411377, 0.20146611332893372, 0.1959756463766098, 0.19053204357624054, 0.18513499200344086, 0.17978426814079285, 0.1744796335697174, 0.16922089457511902, 0.16400785744190216, 0.1588403731584549, 0.15371830761432648, 0.14864157140254974, 0.14361007511615753, 0.13862377405166626, 0.13368265330791473, 0.12878671288490295, 0.12393598258495331, 0.11913054436445236, 0.11437050998210907, 0.10965602099895477, 0.1049872562289238, 0.10036443918943405, 0.09578784555196762, 0.09125780314207077, 0.08677466958761215, 0.08233889937400818, 0.07795098423957825, 0.07361150532960892, 0.06932111829519272, 0.06508058309555054, 0.06089077144861221, 0.05675266310572624, 0.05266740173101425, 0.048636294901371, 0.044660862535238266, 0.040742866694927216, 0.03688438981771469, 0.03308788686990738, 0.029356317594647408, 0.025693291798233986, 0.02210330404341221, 0.018592102453112602, 0.015167297795414925, 0.011839478276669979, 0.0086244847625494, 0.005548994988203049, 0.0026696291752159595]); - ke = $toNativeArray($kindUint32, [3801129273, 0, 2615860924, 3279400049, 3571300752, 3733536696, 3836274812, 3906990442, 3958562475, 3997804264, 4028649213, 4053523342, 4074002619, 4091154507, 4105727352, 4118261130, 4129155133, 4138710916, 4147160435, 4154685009, 4161428406, 4167506077, 4173011791, 4178022498, 4182601930, 4186803325, 4190671498, 4194244443, 4197554582, 4200629752, 4203493986, 4206168142, 4208670408, 4211016720, 4213221098, 4215295924, 4217252177, 4219099625, 4220846988, 4222502074, 4224071896, 4225562770, 4226980400, 4228329951, 4229616109, 4230843138, 4232014925, 4233135020, 4234206673, 4235232866, 4236216336, 4237159604, 4238064994, 4238934652, 4239770563, 4240574564, 4241348362, 4242093539, 4242811568, 4243503822, 4244171579, 4244816032, 4245438297, 4246039419, 4246620374, 4247182079, 4247725394, 4248251127, 4248760037, 4249252839, 4249730206, 4250192773, 4250641138, 4251075867, 4251497493, 4251906522, 4252303431, 4252688672, 4253062674, 4253425844, 4253778565, 4254121205, 4254454110, 4254777611, 4255092022, 4255397640, 4255694750, 4255983622, 4256264513, 4256537670, 4256803325, 4257061702, 4257313014, 4257557464, 4257795244, 4258026541, 4258251531, 4258470383, 4258683258, 4258890309, 4259091685, 4259287526, 4259477966, 4259663135, 4259843154, 4260018142, 4260188212, 4260353470, 4260514019, 4260669958, 4260821380, 4260968374, 4261111028, 4261249421, 4261383632, 4261513736, 4261639802, 4261761900, 4261880092, 4261994441, 4262105003, 4262211835, 4262314988, 4262414513, 4262510454, 4262602857, 4262691764, 4262777212, 4262859239, 4262937878, 4263013162, 4263085118, 4263153776, 4263219158, 4263281289, 4263340187, 4263395872, 4263448358, 4263497660, 4263543789, 4263586755, 4263626565, 4263663224, 4263696735, 4263727099, 4263754314, 4263778377, 4263799282, 4263817020, 4263831582, 4263842955, 4263851124, 4263856071, 4263857776, 4263856218, 4263851370, 4263843206, 4263831695, 4263816804, 4263798497, 4263776735, 4263751476, 4263722676, 4263690284, 4263654251, 4263614520, 4263571032, 4263523724, 4263472530, 4263417377, 4263358192, 4263294892, 4263227394, 4263155608, 4263079437, 4262998781, 4262913534, 4262823581, 4262728804, 4262629075, 4262524261, 4262414220, 4262298801, 4262177846, 4262051187, 4261918645, 4261780032, 4261635148, 4261483780, 4261325704, 4261160681, 4260988457, 4260808763, 4260621313, 4260425802, 4260221905, 4260009277, 4259787550, 4259556329, 4259315195, 4259063697, 4258801357, 4258527656, 4258242044, 4257943926, 4257632664, 4257307571, 4256967906, 4256612870, 4256241598, 4255853155, 4255446525, 4255020608, 4254574202, 4254106002, 4253614578, 4253098370, 4252555662, 4251984571, 4251383021, 4250748722, 4250079132, 4249371435, 4248622490, 4247828790, 4246986404, 4246090910, 4245137315, 4244119963, 4243032411, 4241867296, 4240616155, 4239269214, 4237815118, 4236240596, 4234530035, 4232664930, 4230623176, 4228378137, 4225897409, 4223141146, 4220059768, 4216590757, 4212654085, 4208145538, 4202926710, 4196809522, 4189531420, 4180713890, 4169789475, 4155865042, 4137444620, 4111806704, 4073393724, 4008685917, 3873074895]); - we = $toNativeArray($kindFloat32, [2.0249555365836613e-09, 1.4866739783681027e-11, 2.4409616689036184e-11, 3.1968806074589295e-11, 3.844677007314168e-11, 4.42282044321729e-11, 4.951644302919611e-11, 5.443358958023836e-11, 5.905943789574764e-11, 6.34494193296753e-11, 6.764381416113352e-11, 7.167294535648239e-11, 7.556032188826833e-11, 7.932458162551725e-11, 8.298078890689453e-11, 8.654132271912474e-11, 9.001651507523079e-11, 9.341507428706208e-11, 9.674443190998971e-11, 1.0001099254308699e-10, 1.0322031424037093e-10, 1.0637725422757427e-10, 1.0948611461891744e-10, 1.1255067711157807e-10, 1.1557434870246297e-10, 1.1856014781042035e-10, 1.2151082917633005e-10, 1.2442885610752796e-10, 1.2731647680563896e-10, 1.3017574518325858e-10, 1.330085347417409e-10, 1.3581656632677408e-10, 1.386014220061682e-10, 1.413645728254309e-10, 1.4410737880776736e-10, 1.4683107507629245e-10, 1.4953686899854546e-10, 1.522258291641876e-10, 1.5489899640730442e-10, 1.575573282952547e-10, 1.6020171300645814e-10, 1.628330109637588e-10, 1.6545202707884954e-10, 1.68059510752272e-10, 1.7065616975120435e-10, 1.73242697965037e-10, 1.758197337720091e-10, 1.783878739169964e-10, 1.8094774290045024e-10, 1.834998542005195e-10, 1.8604476292871652e-10, 1.8858298256319017e-10, 1.9111498494872592e-10, 1.9364125580789704e-10, 1.9616222535212557e-10, 1.9867835154840918e-10, 2.011900368525943e-10, 2.0369768372052732e-10, 2.062016807302669e-10, 2.0870240258208383e-10, 2.1120022397624894e-10, 2.136955057352452e-10, 2.1618855317040442e-10, 2.1867974098199738e-10, 2.2116936060356807e-10, 2.2365774510202385e-10, 2.2614519978869652e-10, 2.2863201609713002e-10, 2.3111849933865614e-10, 2.3360494094681883e-10, 2.3609159072179864e-10, 2.3857874009713953e-10, 2.4106666662859766e-10, 2.4355562011635357e-10, 2.460458781161634e-10, 2.485376904282077e-10, 2.5103127909709144e-10, 2.5352694943414633e-10, 2.560248957284017e-10, 2.585253955356137e-10, 2.610286709003873e-10, 2.6353494386732734e-10, 2.6604446423661443e-10, 2.6855745405285347e-10, 2.71074163116225e-10, 2.7359478571575835e-10, 2.7611959940720965e-10, 2.786487707240326e-10, 2.8118254946640775e-10, 2.8372118543451563e-10, 2.8626484516180994e-10, 2.8881380620404684e-10, 2.9136826285025563e-10, 2.9392840938946563e-10, 2.96494523377433e-10, 2.990667713476114e-10, 3.016454031001814e-10, 3.042306406797479e-10, 3.068226783753403e-10, 3.09421765987139e-10, 3.12028125559749e-10, 3.1464195138219964e-10, 3.17263521010247e-10, 3.1989300097734485e-10, 3.225306410836737e-10, 3.2517669112941405e-10, 3.2783134540359526e-10, 3.3049485370639786e-10, 3.3316743808242677e-10, 3.3584937608743815e-10, 3.385408342548857e-10, 3.4124211789610115e-10, 3.4395342130011386e-10, 3.4667499426710435e-10, 3.494071143528288e-10, 3.521500313574677e-10, 3.54903967325626e-10, 3.576691720574843e-10, 3.6044595086437425e-10, 3.632345535464765e-10, 3.660352021483959e-10, 3.688482297370399e-10, 3.716738583570134e-10, 3.7451239331964814e-10, 3.773641121807003e-10, 3.802292924959261e-10, 3.831082673322328e-10, 3.8600128648980103e-10, 3.8890865527996255e-10, 3.9183070676962473e-10, 3.9476774627011935e-10, 3.977200790927782e-10, 4.006880383045086e-10, 4.0367195697221803e-10, 4.066721681628138e-10, 4.0968900494320337e-10, 4.127228558914453e-10, 4.15774054074447e-10, 4.188429603146915e-10, 4.2192993543466173e-10, 4.25035395767992e-10, 4.2815970213716525e-10, 4.313032986313914e-10, 4.3446651831757777e-10, 4.376498607960855e-10, 4.408536868893975e-10, 4.4407846844229937e-10, 4.4732464954400086e-10, 4.5059267428371186e-10, 4.538830145062178e-10, 4.5719619756745544e-10, 4.605326675566346e-10, 4.638929240741163e-10, 4.672775499869886e-10, 4.706869893844612e-10, 4.74121908400349e-10, 4.775827511238617e-10, 4.810701836888143e-10, 4.845848167178701e-10, 4.881271498113904e-10, 4.916979601254923e-10, 4.952977472605369e-10, 4.989272883726414e-10, 5.025872495956207e-10, 5.062783525744408e-10, 5.100013189540675e-10, 5.13756870379467e-10, 5.175458395179078e-10, 5.21369003525507e-10, 5.252272505806843e-10, 5.29121357839557e-10, 5.330522134805449e-10, 5.3702081670437e-10, 5.41028055689452e-10, 5.450749851476644e-10, 5.491624932574268e-10, 5.532918012640664e-10, 5.574638528571541e-10, 5.616799247931681e-10, 5.659410717839819e-10, 5.702485705860738e-10, 5.746036979559221e-10, 5.790077306500052e-10, 5.83462111958255e-10, 5.879682296594524e-10, 5.925275825546805e-10, 5.971417249561739e-10, 6.01812211176167e-10, 6.065408175714992e-10, 6.113292094767075e-10, 6.16179329782085e-10, 6.21092954844471e-10, 6.260721940876124e-10, 6.311191569352559e-10, 6.362359528111483e-10, 6.414249686947926e-10, 6.466885360545405e-10, 6.520292639144998e-10, 6.574497612987784e-10, 6.629528592760892e-10, 6.685415554485985e-10, 6.742187919073217e-10, 6.799880103436351e-10, 6.858525969377638e-10, 6.918161599145378e-10, 6.978825850545434e-10, 7.040559801829716e-10, 7.103406751696184e-10, 7.167412219288849e-10, 7.232625609532306e-10, 7.2990985477972e-10, 7.366885990123251e-10, 7.436047333442275e-10, 7.506645305355164e-10, 7.57874762946642e-10, 7.652426470272644e-10, 7.727759543385559e-10, 7.804830115532013e-10, 7.883728114777e-10, 7.964550685635174e-10, 8.047402189070851e-10, 8.132396422944055e-10, 8.219657177122031e-10, 8.309318788590758e-10, 8.401527806789488e-10, 8.496445214056791e-10, 8.594246980742071e-10, 8.695127395874636e-10, 8.799300732498239e-10, 8.90700457834015e-10, 9.01850316648023e-10, 9.134091816243028e-10, 9.254100818978372e-10, 9.37890431984556e-10, 9.508922538259412e-10, 9.64463842123564e-10, 9.78660263939446e-10, 9.935448019859905e-10, 1.0091912860943353e-09, 1.0256859805934937e-09, 1.0431305819125214e-09, 1.0616465484503124e-09, 1.0813799855569073e-09, 1.1025096391392708e-09, 1.1252564435793033e-09, 1.149898620766976e-09, 1.176793218427008e-09, 1.2064089727203964e-09, 1.2393785997488749e-09, 1.2765849488616254e-09, 1.319313880365769e-09, 1.36954347862428e-09, 1.4305497897382224e-09, 1.5083649884672923e-09, 1.6160853766322703e-09, 1.7921247819074893e-09]); - fe = $toNativeArray($kindFloat32, [1, 0.9381436705589294, 0.900469958782196, 0.8717043399810791, 0.847785472869873, 0.8269932866096497, 0.8084216713905334, 0.7915276288986206, 0.7759568691253662, 0.7614634037017822, 0.7478685975074768, 0.7350381016731262, 0.7228676676750183, 0.7112747430801392, 0.7001926302909851, 0.6895664930343628, 0.6793505549430847, 0.669506311416626, 0.6600008606910706, 0.6508058309555054, 0.6418967247009277, 0.633251965045929, 0.62485271692276, 0.6166821718215942, 0.608725368976593, 0.6009689569473267, 0.5934008955955505, 0.5860103368759155, 0.5787873864173889, 0.5717230439186096, 0.5648092031478882, 0.5580382943153381, 0.5514034032821655, 0.5448982119560242, 0.5385168790817261, 0.5322538614273071, 0.526104211807251, 0.5200631618499756, 0.5141264200210571, 0.5082897543907166, 0.5025495290756226, 0.4969019889831543, 0.4913438558578491, 0.4858720004558563, 0.48048335313796997, 0.4751752018928528, 0.4699448347091675, 0.4647897481918335, 0.4597076177597046, 0.4546961486339569, 0.4497532546520233, 0.44487687945365906, 0.4400651156902313, 0.4353161156177521, 0.4306281507015228, 0.42599955201148987, 0.42142874002456665, 0.4169141948223114, 0.4124544560909271, 0.40804818272590637, 0.4036940038204193, 0.39939069747924805, 0.3951369822025299, 0.39093172550201416, 0.38677382469177246, 0.38266217708587646, 0.378595769405365, 0.37457355856895447, 0.37059465050697327, 0.366658091545105, 0.362762987613678, 0.358908474445343, 0.35509374737739563, 0.35131800174713135, 0.3475804924964905, 0.34388044476509094, 0.34021714329719543, 0.33658990263938904, 0.3329980671405792, 0.3294409513473511, 0.32591795921325684, 0.32242849469184875, 0.3189719021320343, 0.3155476748943329, 0.31215524673461914, 0.3087940812110901, 0.30546361207962036, 0.30216339230537415, 0.29889291524887085, 0.29565170407295227, 0.2924392819404602, 0.2892552316188812, 0.28609907627105713, 0.2829704284667969, 0.27986884117126465, 0.2767939269542694, 0.2737452983856201, 0.2707225978374481, 0.26772540807724, 0.26475343108177185, 0.2618062496185303, 0.258883535861969, 0.2559850215911865, 0.25311028957366943, 0.25025907158851624, 0.24743106961250305, 0.2446259707212448, 0.24184346199035645, 0.23908329010009766, 0.23634515702724457, 0.2336287796497345, 0.23093391954898834, 0.22826029360294342, 0.22560766339302063, 0.22297576069831848, 0.22036437690258026, 0.21777324378490448, 0.21520215272903442, 0.212650865316391, 0.21011915802955627, 0.20760682225227356, 0.20511364936828613, 0.20263944566249847, 0.20018397271633148, 0.19774706661701202, 0.1953285187482834, 0.19292815029621124, 0.19054576754570007, 0.18818120658397675, 0.18583425879478455, 0.18350479006767273, 0.18119260668754578, 0.17889754474163055, 0.17661945521831512, 0.17435817420482635, 0.1721135377883911, 0.16988539695739746, 0.16767361760139465, 0.16547803580760956, 0.16329853236675262, 0.16113494336605072, 0.1589871346950531, 0.15685498714447021, 0.15473836660385132, 0.15263713896274567, 0.1505511850118637, 0.1484803706407547, 0.14642459154129028, 0.1443837285041809, 0.14235764741897583, 0.1403462439775467, 0.13834942877292633, 0.136367067694664, 0.13439907133579254, 0.1324453204870224, 0.1305057406425476, 0.12858019769191742, 0.12666863203048706, 0.12477091699838638, 0.12288697808980942, 0.1210167184472084, 0.11916005611419678, 0.11731690168380737, 0.11548716574907303, 0.11367076635360718, 0.11186762899160385, 0.11007767915725708, 0.1083008274435997, 0.10653700679540634, 0.10478614270687103, 0.1030481606721878, 0.10132300108671188, 0.0996105819940567, 0.09791085124015808, 0.09622374176979065, 0.09454918652772903, 0.09288713335990906, 0.09123751521110535, 0.08960027992725372, 0.08797537535429001, 0.08636274188756943, 0.0847623273730278, 0.08317409455776215, 0.08159798383712769, 0.08003395050764084, 0.07848194986581802, 0.07694194465875626, 0.07541389018297195, 0.07389774918556213, 0.07239348441362381, 0.070901058614254, 0.06942043453454971, 0.06795158982276917, 0.06649449467658997, 0.06504911929368973, 0.06361543387174606, 0.06219341605901718, 0.06078304722905159, 0.0593843050301075, 0.05799717456102371, 0.05662164092063904, 0.05525768920779228, 0.05390531197190285, 0.05256449431180954, 0.05123523622751236, 0.04991753399372101, 0.04861138388514519, 0.047316793352365494, 0.04603376239538193, 0.044762298464775085, 0.04350241273641586, 0.04225412383675575, 0.04101744294166565, 0.039792392402887344, 0.03857899457216263, 0.03737728297710419, 0.03618728369474411, 0.03500903770327568, 0.03384258225560188, 0.0326879620552063, 0.031545232981443405, 0.030414443463087082, 0.0292956605553627, 0.028188949450850487, 0.027094384655356407, 0.02601204626262188, 0.024942025542259216, 0.023884421214461327, 0.022839335724711418, 0.021806888282299042, 0.020787203684449196, 0.019780423492193222, 0.018786700442433357, 0.017806200310587883, 0.016839107498526573, 0.015885621309280396, 0.014945968054234982, 0.01402039173990488, 0.013109165243804455, 0.012212592177093029, 0.011331013403832912, 0.010464809834957123, 0.009614413604140282, 0.008780314587056637, 0.007963077165186405, 0.007163353264331818, 0.0063819061033427715, 0.005619642324745655, 0.004877655766904354, 0.004157294984906912, 0.003460264764726162, 0.0027887988835573196, 0.0021459676790982485, 0.001536299823783338, 0.0009672692976891994, 0.0004541343660093844]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["math/big"] = (function() { - var $pkg = {}, $init, bytes, binary, errors, fmt, nosync, io, math, bits, rand, strconv, strings, divisor, nat, byteReader, Int, Word, arrayType, structType$1, sliceType, sliceType$1, ptrType$2, sliceType$2, ptrType$3, sliceType$3, sliceType$4, ptrType$4, arrayType$1, ptrType$5, errNoDigits, errInvalSep, leafSize, cacheBase10, natOne, natTwo, karatsubaThreshold, basicSqrThreshold, karatsubaSqrThreshold, natPool, intOne, divWVW, greaterThan, maxPow, pow, divisors, basicMul, karatsubaAdd, karatsubaSub, karatsuba, alias, addAt, max, karatsubaLen, basicSqr, karatsubaSqr, getNat, putNat, same, bigEndianWord, writeMultiple, scanSign, NewInt, low64, lehmerSimulate, lehmerUpdate, euclidUpdate, Jacobi, mulWW, addVV, subVV, addVW, subVW, shlVU, shrVU, mulAddVWW, addMulVVW, mulWW_g, mulAddWWW_g, nlz, addVV_g, subVV_g, addVW_g, addVWlarge, subVW_g, subVWlarge, shlVU_g, shrVU_g, mulAddVWW_g, addMulVVW_g, divWW, reciprocalWord; - bytes = $packages["bytes"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - nosync = $packages["github.com/gopherjs/gopherjs/nosync"]; - io = $packages["io"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - rand = $packages["math/rand"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - divisor = $pkg.divisor = $newType(0, $kindStruct, "big.divisor", true, "math/big", false, function(bbb_, nbits_, ndigits_) { - this.$val = this; - if (arguments.length === 0) { - this.bbb = nat.nil; - this.nbits = 0; - this.ndigits = 0; - return; - } - this.bbb = bbb_; - this.nbits = nbits_; - this.ndigits = ndigits_; - }); - nat = $pkg.nat = $newType(12, $kindSlice, "big.nat", true, "math/big", false, null); - byteReader = $pkg.byteReader = $newType(0, $kindStruct, "big.byteReader", true, "math/big", false, function(ScanState_) { - this.$val = this; - if (arguments.length === 0) { - this.ScanState = $ifaceNil; - return; - } - this.ScanState = ScanState_; - }); - Int = $pkg.Int = $newType(0, $kindStruct, "big.Int", true, "math/big", true, function(neg_, abs_) { - this.$val = this; - if (arguments.length === 0) { - this.neg = false; - this.abs = nat.nil; - return; - } - this.neg = neg_; - this.abs = abs_; - }); - Word = $pkg.Word = $newType(4, $kindUintptr, "big.Word", true, "math/big", true, null); - arrayType = $arrayType(divisor, 64); - structType$1 = $structType("math/big", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: nosync.Mutex, tag: ""}, {prop: "table", name: "table", embedded: false, exported: false, typ: arrayType, tag: ""}]); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - ptrType$2 = $ptrType(Int); - sliceType$2 = $sliceType(Word); - ptrType$3 = $ptrType(nat); - sliceType$3 = $sliceType(ptrType$3); - sliceType$4 = $sliceType(divisor); - ptrType$4 = $ptrType(Word); - arrayType$1 = $arrayType(nat, 16); - ptrType$5 = $ptrType(rand.Rand); - Int.ptr.prototype.ProbablyPrime = function(n) { - var {$24r, _1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, n, r, rA, rB, w, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (n < 0) { - $panic(new $String("negative n for ProbablyPrime")); - } - if (x.neg || (x.abs.$length === 0)) { - $s = -1; return false; - } - w = (x$1 = x.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - if ((x.abs.$length === 1) && w < 64) { - $s = -1; return !((x$2 = (x$3 = $shiftLeft64(new $Uint64(0, 1), w), new $Uint64(673221152 & x$3.$high, (2693408940 & x$3.$low) >>> 0)), (x$2.$high === 0 && x$2.$low === 0))); - } - if (((w & 1) >>> 0) === 0) { - $s = -1; return false; - } - _tmp = 0; - _tmp$1 = 0; - rA = _tmp; - rB = _tmp$1; - _1 = 32; - if (_1 === (32)) { - rA = ((x.abs.modW(4127218095) >>> 0)); - rB = ((x.abs.modW(3948078067) >>> 0)); - } else if (_1 === (64)) { - r = x.abs.modW(820596253); - rA = (((_r = r % 4127218095, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)); - rB = (((_r$1 = r % 3948078067, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0)); - } else { - $panic(new $String("math/big: invalid word size")); - } - if (((_r$2 = rA % 3, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$3 = rA % 5, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$4 = rA % 7, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$5 = rA % 11, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$6 = rA % 13, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$7 = rA % 17, _r$7 === _r$7 ? _r$7 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$8 = rA % 19, _r$8 === _r$8 ? _r$8 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$9 = rA % 23, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$10 = rA % 37, _r$10 === _r$10 ? _r$10 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$11 = rB % 29, _r$11 === _r$11 ? _r$11 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$12 = rB % 31, _r$12 === _r$12 ? _r$12 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$13 = rB % 41, _r$13 === _r$13 ? _r$13 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$14 = rB % 43, _r$14 === _r$14 ? _r$14 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$15 = rB % 47, _r$15 === _r$15 ? _r$15 : $throwRuntimeError("integer divide by zero")) === 0) || ((_r$16 = rB % 53, _r$16 === _r$16 ? _r$16 : $throwRuntimeError("integer divide by zero")) === 0)) { - $s = -1; return false; - } - _r$17 = x.abs.probablyPrimeMillerRabin(n + 1 >> 0, true); /* */ $s = 2; case 2: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - if (!(_r$17)) { _v = false; $s = 1; continue s; } - _r$18 = x.abs.probablyPrimeLucas(); /* */ $s = 3; case 3: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _v = _r$18; case 1: - $24r = _v; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.ProbablyPrime, $c: true, $r, $24r, _1, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _v, n, r, rA, rB, w, x, x$1, x$2, x$3, $s};return $f; - }; - Int.prototype.ProbablyPrime = function(n) { return this.$val.ProbablyPrime(n); }; - nat.prototype.probablyPrimeMillerRabin = function(reps, force2) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tuple, force2, i, j, k, n, nm1, nm3, nm3Len, q, quotient, rand$1, reps, x, x$1, y, $s, $r, $c} = $restore(this, {reps, force2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = this; - _r = (nat.nil).sub(n, natOne); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - nm1 = _r; - k = nm1.trailingZeroBits(); - q = (nat.nil).shr(nm1, k); - _r$1 = (nat.nil).sub(nm1, natTwo); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - nm3 = _r$1; - rand$1 = rand.New(rand.NewSource(((x = (0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]), new $Int64(0, x.constructor === Number ? x : 1))))); - _tmp = nat.nil; - _tmp$1 = nat.nil; - _tmp$2 = nat.nil; - x$1 = _tmp; - y = _tmp$1; - quotient = _tmp$2; - nm3Len = nm3.bitLen(); - i = 0; - /* while (true) { */ case 3: - /* if (!(i < reps)) { break; } */ if(!(i < reps)) { $s = 4; continue; } - /* */ if ((i === (reps - 1 >> 0)) && force2) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((i === (reps - 1 >> 0)) && force2) { */ case 5: - x$1 = x$1.set(natTwo); - $s = 7; continue; - /* } else { */ case 6: - _r$2 = x$1.random(rand$1, nm3, nm3Len); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - x$1 = _r$2; - _r$3 = x$1.add(x$1, natTwo); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - x$1 = _r$3; - /* } */ case 7: - _r$4 = y.expNN(x$1, q, n); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - y = _r$4; - if ((y.cmp(natOne) === 0) || (y.cmp(nm1) === 0)) { - i = i + (1) >> 0; - /* continue; */ $s = 3; continue; - } - j = 1; - /* while (true) { */ case 11: - /* if (!(j < k)) { break; } */ if(!(j < k)) { $s = 12; continue; } - _r$5 = y.sqr(y); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - y = _r$5; - _r$6 = quotient.div(y, y, n); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - quotient = _tuple[0]; - y = _tuple[1]; - if (y.cmp(nm1) === 0) { - i = i + (1) >> 0; - /* continue NextRandom; */ $s = 3; continue s; - } - if (y.cmp(natOne) === 0) { - $s = -1; return false; - } - j = j + (1) >>> 0; - $s = 11; continue; - case 12: - $s = -1; return false; - case 4: - $s = -1; return true; - /* */ } return; } var $f = {$blk: nat.prototype.probablyPrimeMillerRabin, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tuple, force2, i, j, k, n, nm1, nm3, nm3Len, q, quotient, rand$1, reps, x, x$1, y, $s};return $f; - }; - $ptrType(nat).prototype.probablyPrimeMillerRabin = function(reps, force2) { return this.$get().probablyPrimeMillerRabin(reps, force2); }; - nat.prototype.probablyPrimeLucas = function() { - var {_r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, d, i, intD, intN, j, n, natP, nm2, p, r, s, t, t1, t1$1, t2, t2$1, t3, vk, vk1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = this; - if ((n.$length === 0) || (n.cmp(natOne) === 0)) { - $s = -1; return false; - } - if ((((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) & 1) >>> 0) === 0) { - $s = -1; return n.cmp(natTwo) === 0; - } - p = 3; - d = new nat([1]); - t1 = (nat.nil); - intD = new Int.ptr(false, d); - intN = new Int.ptr(false, n); - /* while (true) { */ case 1: - /* */ if (p > 10000) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (p > 10000) { */ case 3: - _r = intN.String(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String("math/big: internal error: cannot find (D/n) = -1 for " + _r)); - /* } */ case 4: - (0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0] = (($imul(p, p) >>> 0) - 4 >>> 0)); - _r$1 = Jacobi(intD, intN); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - j = _r$1; - if (j === -1) { - /* break; */ $s = 2; continue; - } - if (j === 0) { - $s = -1; return (n.$length === 1) && ((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) === (p + 2 >>> 0)); - } - /* */ if (p === 40) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (p === 40) { */ case 7: - _r$2 = t1.sqrt(n); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - t1 = _r$2; - _r$3 = t1.sqr(t1); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - t1 = _r$3; - if (t1.cmp(n) === 0) { - $s = -1; return false; - } - /* } */ case 8: - p = p + (1) >>> 0; - $s = 1; continue; - case 2: - _r$4 = (nat.nil).add(n, natOne); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - s = _r$4; - r = ((s.trailingZeroBits() >> 0)); - s = s.shr(s, ((r >>> 0))); - _r$5 = (nat.nil).sub(n, natTwo); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - nm2 = _r$5; - natP = (nat.nil).setWord(p); - vk = (nat.nil).setWord(2); - vk1 = (nat.nil).setWord(p); - t2 = (nat.nil); - i = (s.bitLen()); - /* while (true) { */ case 13: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 14; continue; } - /* */ if (!((s.bit(((i >>> 0))) === 0))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!((s.bit(((i >>> 0))) === 0))) { */ case 15: - _r$6 = t1.mul(vk, vk1); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - t1 = _r$6; - _r$7 = t1.add(t1, n); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - t1 = _r$7; - _r$8 = t1.sub(t1, natP); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - t1 = _r$8; - _r$9 = t2.div(vk, t1, n); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - t2 = _tuple[0]; - vk = _tuple[1]; - _r$10 = t1.sqr(vk1); /* */ $s = 22; case 22: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - t1 = _r$10; - _r$11 = t1.add(t1, nm2); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - t1 = _r$11; - _r$12 = t2.div(vk1, t1, n); /* */ $s = 24; case 24: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$1 = _r$12; - t2 = _tuple$1[0]; - vk1 = _tuple$1[1]; - $s = 17; continue; - /* } else { */ case 16: - _r$13 = t1.mul(vk, vk1); /* */ $s = 25; case 25: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - t1 = _r$13; - _r$14 = t1.add(t1, n); /* */ $s = 26; case 26: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - t1 = _r$14; - _r$15 = t1.sub(t1, natP); /* */ $s = 27; case 27: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - t1 = _r$15; - _r$16 = t2.div(vk1, t1, n); /* */ $s = 28; case 28: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$2 = _r$16; - t2 = _tuple$2[0]; - vk1 = _tuple$2[1]; - _r$17 = t1.sqr(vk); /* */ $s = 29; case 29: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - t1 = _r$17; - _r$18 = t1.add(t1, nm2); /* */ $s = 30; case 30: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - t1 = _r$18; - _r$19 = t2.div(vk, t1, n); /* */ $s = 31; case 31: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple$3 = _r$19; - t2 = _tuple$3[0]; - vk = _tuple$3[1]; - /* } */ case 17: - i = i - (1) >> 0; - $s = 13; continue; - case 14: - /* */ if ((vk.cmp(natTwo) === 0) || (vk.cmp(nm2) === 0)) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if ((vk.cmp(natTwo) === 0) || (vk.cmp(nm2) === 0)) { */ case 32: - _r$20 = t1.mul(vk, natP); /* */ $s = 34; case 34: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - t1$1 = _r$20; - t2$1 = t2.shl(vk1, 1); - if (t1$1.cmp(t2$1) < 0) { - _tmp = t2$1; - _tmp$1 = t1$1; - t1$1 = _tmp; - t2$1 = _tmp$1; - } - _r$21 = t1$1.sub(t1$1, t2$1); /* */ $s = 35; case 35: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - t1$1 = _r$21; - t3 = vk1; - vk1 = nat.nil; - $unused(vk1); - _r$22 = t2$1.div(t3, t1$1, n); /* */ $s = 36; case 36: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple$4 = _r$22; - t2$1 = _tuple$4[0]; - t3 = _tuple$4[1]; - if (t3.$length === 0) { - $s = -1; return true; - } - /* } */ case 33: - t = 0; - /* while (true) { */ case 37: - /* if (!(t < (r - 1 >> 0))) { break; } */ if(!(t < (r - 1 >> 0))) { $s = 38; continue; } - if (vk.$length === 0) { - $s = -1; return true; - } - if ((vk.$length === 1) && ((0 >= vk.$length ? ($throwRuntimeError("index out of range"), undefined) : vk.$array[vk.$offset + 0]) === 2)) { - $s = -1; return false; - } - _r$23 = t1.sqr(vk); /* */ $s = 39; case 39: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - t1 = _r$23; - _r$24 = t1.sub(t1, natTwo); /* */ $s = 40; case 40: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - t1 = _r$24; - _r$25 = t2.div(vk, t1, n); /* */ $s = 41; case 41: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _tuple$5 = _r$25; - t2 = _tuple$5[0]; - vk = _tuple$5[1]; - t = t + (1) >> 0; - $s = 37; continue; - case 38: - $s = -1; return false; - /* */ } return; } var $f = {$blk: nat.prototype.probablyPrimeLucas, $c: true, $r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, d, i, intD, intN, j, n, natP, nm2, p, r, s, t, t1, t1$1, t2, t2$1, t3, vk, vk1, $s};return $f; - }; - $ptrType(nat).prototype.probablyPrimeLucas = function() { return this.$get().probablyPrimeLucas(); }; - nat.prototype.div = function(z2, u, v) { - var {_r, _tuple, _tuple$1, q, r, r2, u, v, z, z2, $s, $r, $c} = $restore(this, {z2, u, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - q = nat.nil; - r = nat.nil; - z = this; - if (v.$length === 0) { - $panic(new $String("division by zero")); - } - if (u.cmp(v) < 0) { - q = $subslice(z, 0, 0); - r = z2.set(u); - $s = -1; return [q, r]; - } - if (v.$length === 1) { - r2 = 0; - _tuple = z.divW(u, (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])); - q = _tuple[0]; - r2 = _tuple[1]; - r = z2.setWord(r2); - $s = -1; return [q, r]; - } - _r = z.divLarge(z2, u, v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - q = _tuple$1[0]; - r = _tuple$1[1]; - $s = -1; return [q, r]; - /* */ } return; } var $f = {$blk: nat.prototype.div, $c: true, $r, _r, _tuple, _tuple$1, q, r, r2, u, v, z, z2, $s};return $f; - }; - $ptrType(nat).prototype.div = function(z2, u, v) { return this.$get().div(z2, u, v); }; - nat.prototype.divW = function(x, y) { - var m, q, r, x, y, z; - q = nat.nil; - r = 0; - z = this; - m = x.$length; - if ((y === 0)) { - $panic(new $String("division by zero")); - } else if ((y === 1)) { - q = z.set(x); - return [q, r]; - } else if ((m === 0)) { - q = $subslice(z, 0, 0); - return [q, r]; - } - z = z.make(m); - r = divWVW($convertSliceType(z, sliceType$2), 0, $convertSliceType(x, sliceType$2), y); - q = z.norm(); - return [q, r]; - }; - $ptrType(nat).prototype.divW = function(x, y) { return this.$get().divW(x, y); }; - nat.prototype.modW = function(d) { - var d, q, r, x; - r = 0; - x = this; - q = nat.nil; - q = q.make(x.$length); - r = divWVW($convertSliceType(q, sliceType$2), 0, $convertSliceType(x, sliceType$2), d); - return r; - }; - $ptrType(nat).prototype.modW = function(d) { return this.$get().modW(d); }; - divWVW = function(z, xn, x, y) { - var _tuple, _tuple$1, i, qq, r, rec, rr, x, xn, y, z; - r = 0; - r = xn; - if (x.$length === 1) { - _tuple = bits.Div(((r >>> 0)), (((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]) >>> 0)), ((y >>> 0))); - qq = _tuple[0]; - rr = _tuple[1]; - (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((qq >>> 0))); - r = ((rr >>> 0)); - return r; - } - rec = reciprocalWord(y); - i = z.$length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - _tuple$1 = divWW(r, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), y, rec); - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple$1[0]); - r = _tuple$1[1]; - i = i - (1) >> 0; - } - r = r; - return r; - }; - nat.prototype.divLarge = function(u, uIn, vIn) { - var {_r, _tmp, _tmp$1, m, n, q, r, shift, u, uIn, v, vIn, vp, x, x$1, z, $s, $r, $c} = $restore(this, {u, uIn, vIn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - q = nat.nil; - r = nat.nil; - z = this; - n = vIn.$length; - m = uIn.$length - n >> 0; - shift = nlz((x = n - 1 >> 0, ((x < 0 || x >= vIn.$length) ? ($throwRuntimeError("index out of range"), undefined) : vIn.$array[vIn.$offset + x]))); - _r = getNat(n); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - vp = _r; - v = vp.$get(); - shlVU($convertSliceType(v, sliceType$2), $convertSliceType(vIn, sliceType$2), shift); - u = u.make(uIn.$length + 1 >> 0); - (x$1 = uIn.$length, ((x$1 < 0 || x$1 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$1] = shlVU($convertSliceType($subslice(u, 0, uIn.$length), sliceType$2), $convertSliceType(uIn, sliceType$2), shift))); - if (alias(z, u)) { - z = nat.nil; - } - q = z.make(m + 1 >> 0); - /* */ if (n < 100) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (n < 100) { */ case 2: - $r = q.divBasic(u, v); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; continue; - /* } else { */ case 3: - $r = q.divRecursive(u, v); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - putNat(vp); - q = q.norm(); - shrVU($convertSliceType(u, sliceType$2), $convertSliceType(u, sliceType$2), shift); - r = u.norm(); - _tmp = q; - _tmp$1 = r; - q = _tmp; - r = _tmp$1; - $s = -1; return [q, r]; - /* */ } return; } var $f = {$blk: nat.prototype.divLarge, $c: true, $r, _r, _tmp, _tmp$1, m, n, q, r, shift, u, uIn, v, vIn, vp, x, x$1, z, $s};return $f; - }; - $ptrType(nat).prototype.divLarge = function(u, uIn, vIn) { return this.$get().divLarge(u, uIn, vIn); }; - nat.prototype.divBasic = function(u, v) { - var {_index, _r, _tuple, _tuple$1, _tuple$2, c, c$1, j, m, n, prevRhat, q, qhat, qhatv, qhatvp, qhl, rec, rhat, u, ujn, ujn2, v, vn1, vn2, x, x$1, x$2, x$3, x$4, x1, x2, $s, $r, $c} = $restore(this, {u, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - q = this; - n = v.$length; - m = u.$length - n >> 0; - _r = getNat(n + 1 >> 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - qhatvp = _r; - qhatv = qhatvp.$get(); - vn1 = (x = n - 1 >> 0, ((x < 0 || x >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x])); - rec = reciprocalWord(vn1); - j = m; - while (true) { - if (!(j >= 0)) { break; } - qhat = 4294967295; - ujn = 0; - if ((j + n >> 0) < u.$length) { - ujn = (x$1 = j + n >> 0, ((x$1 < 0 || x$1 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$1])); - } - if (!((ujn === vn1))) { - rhat = 0; - _tuple = divWW(ujn, (x$2 = (j + n >> 0) - 1 >> 0, ((x$2 < 0 || x$2 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$2])), vn1, rec); - qhat = _tuple[0]; - rhat = _tuple[1]; - vn2 = (x$3 = n - 2 >> 0, ((x$3 < 0 || x$3 >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x$3])); - _tuple$1 = mulWW(qhat, vn2); - x1 = _tuple$1[0]; - x2 = _tuple$1[1]; - ujn2 = (x$4 = (j + n >> 0) - 2 >> 0, ((x$4 < 0 || x$4 >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + x$4])); - while (true) { - if (!(greaterThan(x1, x2, rhat, ujn2))) { break; } - qhat = qhat - (1) >>> 0; - prevRhat = rhat; - rhat = rhat + (vn1) >>> 0; - if (rhat < prevRhat) { - break; - } - _tuple$2 = mulWW(qhat, vn2); - x1 = _tuple$2[0]; - x2 = _tuple$2[1]; - } - } - ((n < 0 || n >= qhatv.$length) ? ($throwRuntimeError("index out of range"), undefined) : qhatv.$array[qhatv.$offset + n] = mulAddVWW($convertSliceType($subslice(qhatv, 0, n), sliceType$2), $convertSliceType(v, sliceType$2), qhat, 0)); - qhl = qhatv.$length; - if ((j + qhl >> 0) > u.$length && (((n < 0 || n >= qhatv.$length) ? ($throwRuntimeError("index out of range"), undefined) : qhatv.$array[qhatv.$offset + n]) === 0)) { - qhl = qhl - (1) >> 0; - } - c = subVV($convertSliceType($subslice(u, j, (j + qhl >> 0)), sliceType$2), $convertSliceType($subslice(u, j), sliceType$2), $convertSliceType(qhatv, sliceType$2)); - if (!((c === 0))) { - c$1 = addVV($convertSliceType($subslice(u, j, (j + n >> 0)), sliceType$2), $convertSliceType($subslice(u, j), sliceType$2), $convertSliceType(v, sliceType$2)); - if (n < qhl) { - _index = j + n >> 0; - ((_index < 0 || _index >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + _index] = (((_index < 0 || _index >= u.$length) ? ($throwRuntimeError("index out of range"), undefined) : u.$array[u.$offset + _index]) + (c$1) >>> 0)); - } - qhat = qhat - (1) >>> 0; - } - if ((j === m) && (m === q.$length) && (qhat === 0)) { - j = j - (1) >> 0; - continue; - } - ((j < 0 || j >= q.$length) ? ($throwRuntimeError("index out of range"), undefined) : q.$array[q.$offset + j] = qhat); - j = j - (1) >> 0; - } - putNat(qhatvp); - $s = -1; return; - /* */ } return; } var $f = {$blk: nat.prototype.divBasic, $c: true, $r, _index, _r, _tuple, _tuple$1, _tuple$2, c, c$1, j, m, n, prevRhat, q, qhat, qhatv, qhatvp, qhl, rec, rhat, u, ujn, ujn2, v, vn1, vn2, x, x$1, x$2, x$3, x$4, x1, x2, $s};return $f; - }; - $ptrType(nat).prototype.divBasic = function(u, v) { return this.$get().divBasic(u, v); }; - greaterThan = function(x1, x2, y1, y2) { - var x1, x2, y1, y2; - return x1 > y1 || (x1 === y1) && x2 > y2; - }; - nat.prototype.divRecursive = function(u, v) { - var {_i, _r, _ref, n, recDepth, temps, tmp, u, v, z, $s, $r, $c} = $restore(this, {u, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - recDepth = $imul(2, bits.Len(((v.$length >>> 0)))); - _r = getNat($imul(3, v.$length)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - tmp = _r; - temps = $makeSlice(sliceType$3, recDepth); - z.clear(); - $r = z.divRecursiveStep(u, v, 0, tmp, temps); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = temps; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!(n === ptrType$3.nil)) { - putNat(n); - } - _i++; - } - putNat(tmp); - $s = -1; return; - /* */ } return; } var $f = {$blk: nat.prototype.divRecursive, $c: true, $r, _i, _r, _ref, n, recDepth, temps, tmp, u, v, z, $s};return $f; - }; - $ptrType(nat).prototype.divRecursive = function(u, v) { return this.$get().divRecursive(u, v); }; - nat.prototype.divRecursiveStep = function(u, v, depth, tmp, temps) { - var {B, _q, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, c$1, c$2, c$3, depth, e, e$1, i, i$1, j, m, n, qhat, qhat$1, qhatv, qhatv$1, s, s$1, temps, tmp, u, uu, v, z, $s, $r, $c} = $restore(this, {u, v, depth, tmp, temps}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - u = u.norm(); - v = v.norm(); - if (u.$length === 0) { - z.clear(); - $s = -1; return; - } - n = v.$length; - /* */ if (n < 100) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n < 100) { */ case 1: - $r = z.divBasic(u, v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - m = u.$length - n >> 0; - if (m < 0) { - $s = -1; return; - } - B = (_q = n / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - /* */ if (((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth]) === ptrType$3.nil) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth]) === ptrType$3.nil) { */ case 4: - _r = getNat(n); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth] = _r); - $s = 6; continue; - /* } else { */ case 5: - ((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth]).$set(((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth]).make(B + 1 >> 0)); - /* } */ case 6: - j = m; - /* while (true) { */ case 8: - /* if (!(j > B)) { break; } */ if(!(j > B)) { $s = 9; continue; } - s = (B - 1 >> 0); - uu = $subslice(u, (j - B >> 0)); - qhat = ((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth]).$get(); - qhat.clear(); - $r = qhat.divRecursiveStep($subslice(uu, s, (B + n >> 0)), $subslice(v, s), depth + 1 >> 0, tmp, temps); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - qhat = qhat.norm(); - qhatv = tmp.make($imul(3, n)); - qhatv.clear(); - _r$1 = qhatv.mul(qhat, $subslice(v, 0, s)); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - qhatv = _r$1; - i = 0; - /* while (true) { */ case 12: - /* if (!(i < 2)) { break; } */ if(!(i < 2)) { $s = 13; continue; } - e = qhatv.cmp(uu.norm()); - if (e <= 0) { - /* break; */ $s = 13; continue; - } - _r$2 = subVW($convertSliceType(qhat, sliceType$2), $convertSliceType(qhat, sliceType$2), 1); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - c = subVV($convertSliceType($subslice(qhatv, 0, s), sliceType$2), $convertSliceType($subslice(qhatv, 0, s), sliceType$2), $convertSliceType($subslice(v, 0, s), sliceType$2)); - /* */ if (qhatv.$length > s) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (qhatv.$length > s) { */ case 15: - _r$3 = subVW($convertSliceType($subslice(qhatv, s), sliceType$2), $convertSliceType($subslice(qhatv, s), sliceType$2), c); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 16: - $r = addAt($subslice(uu, s), $subslice(v, s), 0); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (1) >> 0; - $s = 12; continue; - case 13: - if (qhatv.cmp(uu.norm()) > 0) { - $panic(new $String("impossible")); - } - c$1 = subVV($convertSliceType($subslice(uu, 0, qhatv.$length), sliceType$2), $convertSliceType($subslice(uu, 0, qhatv.$length), sliceType$2), $convertSliceType(qhatv, sliceType$2)); - /* */ if (c$1 > 0) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (c$1 > 0) { */ case 19: - _r$4 = subVW($convertSliceType($subslice(uu, qhatv.$length), sliceType$2), $convertSliceType($subslice(uu, qhatv.$length), sliceType$2), c$1); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 20: - $r = addAt(z, qhat, j - B >> 0); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - j = j - (B) >> 0; - $s = 8; continue; - case 9: - s$1 = B - 1 >> 0; - qhat$1 = ((depth < 0 || depth >= temps.$length) ? ($throwRuntimeError("index out of range"), undefined) : temps.$array[temps.$offset + depth]).$get(); - qhat$1.clear(); - $r = qhat$1.divRecursiveStep($subslice(u, s$1).norm(), $subslice(v, s$1), depth + 1 >> 0, tmp, temps); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - qhat$1 = qhat$1.norm(); - qhatv$1 = tmp.make($imul(3, n)); - qhatv$1.clear(); - _r$5 = qhatv$1.mul(qhat$1, $subslice(v, 0, s$1)); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - qhatv$1 = _r$5; - i$1 = 0; - /* while (true) { */ case 25: - /* if (!(i$1 < 2)) { break; } */ if(!(i$1 < 2)) { $s = 26; continue; } - e$1 = qhatv$1.cmp(u.norm()); - /* */ if (e$1 > 0) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (e$1 > 0) { */ case 27: - _r$6 = subVW($convertSliceType(qhat$1, sliceType$2), $convertSliceType(qhat$1, sliceType$2), 1); /* */ $s = 29; case 29: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - c$2 = subVV($convertSliceType($subslice(qhatv$1, 0, s$1), sliceType$2), $convertSliceType($subslice(qhatv$1, 0, s$1), sliceType$2), $convertSliceType($subslice(v, 0, s$1), sliceType$2)); - /* */ if (qhatv$1.$length > s$1) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (qhatv$1.$length > s$1) { */ case 30: - _r$7 = subVW($convertSliceType($subslice(qhatv$1, s$1), sliceType$2), $convertSliceType($subslice(qhatv$1, s$1), sliceType$2), c$2); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 31: - $r = addAt($subslice(u, s$1), $subslice(v, s$1), 0); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 28: - i$1 = i$1 + (1) >> 0; - $s = 25; continue; - case 26: - if (qhatv$1.cmp(u.norm()) > 0) { - $panic(new $String("impossible")); - } - c$3 = subVV($convertSliceType($subslice(u, 0, qhatv$1.$length), sliceType$2), $convertSliceType($subslice(u, 0, qhatv$1.$length), sliceType$2), $convertSliceType(qhatv$1, sliceType$2)); - /* */ if (c$3 > 0) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (c$3 > 0) { */ case 34: - _r$8 = subVW($convertSliceType($subslice(u, qhatv$1.$length), sliceType$2), $convertSliceType($subslice(u, qhatv$1.$length), sliceType$2), c$3); /* */ $s = 36; case 36: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - c$3 = _r$8; - /* } */ case 35: - if (c$3 > 0) { - $panic(new $String("impossible")); - } - $r = addAt(z, qhat$1.norm(), 0); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: nat.prototype.divRecursiveStep, $c: true, $r, B, _q, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, c$1, c$2, c$3, depth, e, e$1, i, i$1, j, m, n, qhat, qhat$1, qhatv, qhatv$1, s, s$1, temps, tmp, u, uu, v, z, $s};return $f; - }; - $ptrType(nat).prototype.divRecursiveStep = function(u, v, depth, tmp, temps) { return this.$get().divRecursiveStep(u, v, depth, tmp, temps); }; - maxPow = function(b) { - var _q, _tmp, _tmp$1, b, max$1, n, p; - p = 0; - n = 0; - _tmp = b; - _tmp$1 = 1; - p = _tmp; - n = _tmp$1; - max$1 = (_q = 4294967295 / b, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - while (true) { - if (!(p <= max$1)) { break; } - p = $imul(p, (b)) >>> 0; - n = n + (1) >> 0; - } - return [p, n]; - }; - pow = function(x, n) { - var n, p, x; - p = 0; - p = 1; - while (true) { - if (!(n > 0)) { break; } - if (!(((n & 1) === 0))) { - p = $imul(p, (x)) >>> 0; - } - x = $imul(x, (x)) >>> 0; - n = (n >> $min((1), 31)) >> 0; - } - return p; - }; - nat.prototype.scan = function(r, base, fracOk) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, b1, base, baseOk, bn, ch, count, d1, di, dp, err, fracOk, i, invalSep, n, prefix, prev, r, res, z, $s, $r, $c} = $restore(this, {r, base, fracOk}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - res = nat.nil; - b = 0; - count = 0; - err = $ifaceNil; - z = this; - baseOk = (base === 0) || !fracOk && 2 <= base && base <= 62 || fracOk && ((base === 2) || (base === 8) || (base === 10) || (base === 16)); - /* */ if (!baseOk) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!baseOk) { */ case 1: - _r = fmt.Sprintf("invalid number base %d", new sliceType([new $Int(base)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 2: - prev = 46; - invalSep = false; - _r$1 = r.ReadByte(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ch = _tuple[0]; - err = _tuple[1]; - _tmp = base; - _tmp$1 = 0; - b = _tmp; - prefix = _tmp$1; - /* */ if (base === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (base === 0) { */ case 5: - b = 10; - /* */ if ($interfaceIsEqual(err, $ifaceNil) && (ch === 48)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($interfaceIsEqual(err, $ifaceNil) && (ch === 48)) { */ case 7: - prev = 48; - count = 1; - _r$2 = r.ReadByte(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - ch = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 10: - _1 = ch; - if ((_1 === (98)) || (_1 === (66))) { - _tmp$2 = 2; - _tmp$3 = 98; - b = _tmp$2; - prefix = _tmp$3; - } else if ((_1 === (111)) || (_1 === (79))) { - _tmp$4 = 8; - _tmp$5 = 111; - b = _tmp$4; - prefix = _tmp$5; - } else if ((_1 === (120)) || (_1 === (88))) { - _tmp$6 = 16; - _tmp$7 = 120; - b = _tmp$6; - prefix = _tmp$7; - } else if (!fracOk) { - _tmp$8 = 8; - _tmp$9 = 48; - b = _tmp$8; - prefix = _tmp$9; - } - /* */ if (!((prefix === 0))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!((prefix === 0))) { */ case 12: - count = 0; - /* */ if (!((prefix === 48))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!((prefix === 48))) { */ case 14: - _r$3 = r.ReadByte(); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - ch = _tuple$2[0]; - err = _tuple$2[1]; - /* } */ case 15: - /* } */ case 13: - /* } */ case 11: - /* } */ case 8: - /* } */ case 6: - z = $subslice(z, 0, 0); - b1 = ((b >>> 0)); - _tuple$3 = maxPow(b1); - bn = _tuple$3[0]; - n = _tuple$3[1]; - di = 0; - i = 0; - dp = -1; - /* while (true) { */ case 17: - /* if (!($interfaceIsEqual(err, $ifaceNil))) { break; } */ if(!($interfaceIsEqual(err, $ifaceNil))) { $s = 18; continue; } - /* */ if ((ch === 46) && fracOk) { $s = 19; continue; } - /* */ if ((ch === 95) && (base === 0)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if ((ch === 46) && fracOk) { */ case 19: - fracOk = false; - if (prev === 95) { - invalSep = true; - } - prev = 46; - dp = count; - $s = 22; continue; - /* } else if ((ch === 95) && (base === 0)) { */ case 20: - if (!((prev === 48))) { - invalSep = true; - } - prev = 95; - $s = 22; continue; - /* } else { */ case 21: - d1 = 0; - if (48 <= ch && ch <= 57) { - d1 = (((ch - 48 << 24 >>> 24) >>> 0)); - } else if (97 <= ch && ch <= 122) { - d1 = ((((ch - 97 << 24 >>> 24) + 10 << 24 >>> 24) >>> 0)); - } else if (65 <= ch && ch <= 90) { - if (b <= 36) { - d1 = ((((ch - 65 << 24 >>> 24) + 10 << 24 >>> 24) >>> 0)); - } else { - d1 = ((((ch - 65 << 24 >>> 24) + 36 << 24 >>> 24) >>> 0)); - } - } else { - d1 = 63; - } - /* */ if (d1 >= b1) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (d1 >= b1) { */ case 23: - _r$4 = r.UnreadByte(); /* */ $s = 25; case 25: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* break; */ $s = 18; continue; - /* } */ case 24: - prev = 48; - count = count + (1) >> 0; - di = ($imul(di, b1) >>> 0) + d1 >>> 0; - i = i + (1) >> 0; - if (i === n) { - z = z.mulAddWW(z, bn, di); - di = 0; - i = 0; - } - /* } */ case 22: - _r$5 = r.ReadByte(); /* */ $s = 26; case 26: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$4 = _r$5; - ch = _tuple$4[0]; - err = _tuple$4[1]; - $s = 17; continue; - case 18: - if ($interfaceIsEqual(err, io.EOF)) { - err = $ifaceNil; - } - if ($interfaceIsEqual(err, $ifaceNil) && (invalSep || (prev === 95))) { - err = errInvalSep; - } - if (count === 0) { - if (prefix === 48) { - _tmp$10 = $subslice(z, 0, 0); - _tmp$11 = 10; - _tmp$12 = 1; - _tmp$13 = err; - res = _tmp$10; - b = _tmp$11; - count = _tmp$12; - err = _tmp$13; - $s = -1; return [res, b, count, err]; - } - err = errNoDigits; - } - if (i > 0) { - z = z.mulAddWW(z, pow(b1, i), di); - } - res = z.norm(); - if (dp >= 0) { - count = dp - count >> 0; - } - $s = -1; return [res, b, count, err]; - /* */ } return; } var $f = {$blk: nat.prototype.scan, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, b1, base, baseOk, bn, ch, count, d1, di, dp, err, fracOk, i, invalSep, n, prefix, prev, r, res, z, $s};return $f; - }; - $ptrType(nat).prototype.scan = function(r, base, fracOk) { return this.$get().scan(r, base, fracOk); }; - nat.prototype.utoa = function(base) { - var {$24r, _r, base, x, $s, $r, $c} = $restore(this, {base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = x.itoa(false, base); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: nat.prototype.utoa, $c: true, $r, $24r, _r, base, x, $s};return $f; - }; - $ptrType(nat).prototype.utoa = function(base) { return this.$get().utoa(base); }; - nat.prototype.itoa = function(neg, base) { - var {_r, _tuple, b, base, bb, i, k, mask, nbits, ndigits, neg, q, s, shift, table, w, x, y, y$1, y$2, y$3, y$4, $s, $r, $c} = $restore(this, {neg, base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (base < 2 || base > 62) { - $panic(new $String("invalid base")); - } - if (x.$length === 0) { - $s = -1; return (new sliceType$1($stringToBytes("0"))); - } - i = (((x.bitLen()) / math.Log2((base)) >> 0)) + 1 >> 0; - if (neg) { - i = i + (1) >> 0; - } - s = $makeSlice(sliceType$1, i); - b = ((base >>> 0)); - /* */ if (b === ((b & (-b >>> 0)) >>> 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (b === ((b & (-b >>> 0)) >>> 0)) { */ case 1: - shift = ((bits.TrailingZeros(((b >>> 0))) >>> 0)); - mask = ((((y = shift, y < 32 ? (1 << y) : 0) >>> 0) - 1 >>> 0)); - w = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]); - nbits = 32; - k = 1; - while (true) { - if (!(k < x.$length)) { break; } - while (true) { - if (!(nbits >= shift)) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt(((w & mask) >>> 0))); - w = (y$1 = (shift), y$1 < 32 ? (w >>> y$1) : 0) >>> 0; - nbits = nbits - (shift) >>> 0; - } - if (nbits === 0) { - w = ((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k]); - nbits = 32; - } else { - w = (w | (((y$2 = nbits, y$2 < 32 ? (((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k]) << y$2) : 0) >>> 0))) >>> 0; - i = i - (1) >> 0; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt(((w & mask) >>> 0))); - w = (y$3 = ((shift - nbits >>> 0)), y$3 < 32 ? (((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k]) >>> y$3) : 0) >>> 0; - nbits = 32 - ((shift - nbits >>> 0)) >>> 0; - } - k = k + (1) >> 0; - } - while (true) { - if (!(!((w === 0)))) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt(((w & mask) >>> 0))); - w = (y$4 = (shift), y$4 < 32 ? (w >>> y$4) : 0) >>> 0; - } - $s = 3; continue; - /* } else { */ case 2: - _tuple = maxPow(b); - bb = _tuple[0]; - ndigits = _tuple[1]; - _r = divisors(x.$length, b, ndigits, bb); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - table = _r; - q = (nat.nil).set(x); - $r = q.convertWords(s, b, ndigits, bb, table); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = 0; - while (true) { - if (!(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 48)) { break; } - i = i + (1) >> 0; - } - /* } */ case 3: - if (neg) { - i = i - (1) >> 0; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = 45); - } - $s = -1; return $subslice(s, i); - /* */ } return; } var $f = {$blk: nat.prototype.itoa, $c: true, $r, _r, _tuple, b, base, bb, i, k, mask, nbits, ndigits, neg, q, s, shift, table, w, x, y, y$1, y$2, y$3, y$4, $s};return $f; - }; - $ptrType(nat).prototype.itoa = function(neg, base) { return this.$get().itoa(neg, base); }; - nat.prototype.convertWords = function(s, b, ndigits, bb, table) { - var {_q, _q$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, bb, h, i, index, j, j$1, maxLength, minLength, ndigits, q, r, r$1, s, t, table, x, $s, $r, $c} = $restore(this, {s, b, ndigits, bb, table}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - q = this; - /* */ if (!(table === sliceType$4.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(table === sliceType$4.nil)) { */ case 1: - r = nat.nil; - index = table.$length - 1 >> 0; - /* while (true) { */ case 3: - /* if (!(q.$length > leafSize)) { break; } */ if(!(q.$length > leafSize)) { $s = 4; continue; } - maxLength = q.bitLen(); - minLength = maxLength >> 1 >> 0; - while (true) { - if (!(index > 0 && (x = index - 1 >> 0, ((x < 0 || x >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x])).nbits > minLength)) { break; } - index = index - (1) >> 0; - } - if (((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).nbits >= maxLength && ((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).bbb.cmp(q) >= 0) { - index = index - (1) >> 0; - if (index < 0) { - $panic(new $String("internal inconsistency")); - } - } - _r = q.div(r, q, ((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).bbb); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - q = _tuple[0]; - r = _tuple[1]; - h = s.$length - ((index < 0 || index >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + index]).ndigits >> 0; - $r = r.convertWords($subslice(s, h), b, ndigits, bb, $subslice(table, 0, index)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = $subslice(s, 0, h); - $s = 3; continue; - case 4: - /* } */ case 2: - i = s.$length; - r$1 = 0; - if (b === 10) { - while (true) { - if (!(q.$length > 0)) { break; } - _tuple$1 = q.divW(q, bb); - q = _tuple$1[0]; - r$1 = _tuple$1[1]; - j = 0; - while (true) { - if (!(j < ndigits && i > 0)) { break; } - i = i - (1) >> 0; - t = (_q = r$1 / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = (48 + (((r$1 - ($imul(t, 10) >>> 0) >>> 0) << 24 >>> 24)) << 24 >>> 24)); - r$1 = t; - j = j + (1) >> 0; - } - } - } else { - while (true) { - if (!(q.$length > 0)) { break; } - _tuple$2 = q.divW(q, bb); - q = _tuple$2[0]; - r$1 = _tuple$2[1]; - j$1 = 0; - while (true) { - if (!(j$1 < ndigits && i > 0)) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charCodeAt((_r$1 = r$1 % b, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")))); - r$1 = (_q$1 = r$1 / (b), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")); - j$1 = j$1 + (1) >> 0; - } - } - } - while (true) { - if (!(i > 0)) { break; } - i = i - (1) >> 0; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = 48); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: nat.prototype.convertWords, $c: true, $r, _q, _q$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, b, bb, h, i, index, j, j$1, maxLength, minLength, ndigits, q, r, r$1, s, t, table, x, $s};return $f; - }; - $ptrType(nat).prototype.convertWords = function(s, b, ndigits, bb, table) { return this.$get().convertWords(s, b, ndigits, bb, table); }; - nat.prototype.expWW = function(x, y) { - var {$24r, _r, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.expNN((nat.nil).setWord(x), (nat.nil).setWord(y), nat.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: nat.prototype.expWW, $c: true, $r, $24r, _r, x, y, z, $s};return $f; - }; - $ptrType(nat).prototype.expWW = function(x, y) { return this.$get().expWW(x, y); }; - divisors = function(m, b, ndigits, bb) { - var {_r, _r$1, b, bb, i, k, larger, m, ndigits, table, words, x, x$1, x$2, y, $s, $r, $c} = $restore(this, {m, b, ndigits, bb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ((leafSize === 0) || m <= leafSize) { - $s = -1; return sliceType$4.nil; - } - k = 1; - words = leafSize; - while (true) { - if (!(words < (m >> 1 >> 0) && k < 64)) { break; } - k = k + (1) >> 0; - words = (y = (1), y < 32 ? (words << y) : 0) >> 0; - } - table = sliceType$4.nil; - if (b === 10) { - cacheBase10.Mutex.Lock(); - table = $subslice(new sliceType$4(cacheBase10.table), 0, k); - } else { - table = $makeSlice(sliceType$4, k); - } - /* */ if ((x = k - 1 >> 0, ((x < 0 || x >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x])).ndigits === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = k - 1 >> 0, ((x < 0 || x >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x])).ndigits === 0) { */ case 1: - larger = nat.nil; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < k)) { break; } */ if(!(i < k)) { $s = 4; continue; } - /* */ if (((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits === 0) { */ case 5: - /* */ if (i === 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (i === 0) { */ case 7: - _r = (nat.nil).expWW(bb, ((leafSize >>> 0))); /* */ $s = 10; case 10: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - (0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]).bbb = _r; - (0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]).ndigits = $imul(ndigits, leafSize); - $s = 9; continue; - /* } else { */ case 8: - _r$1 = (nat.nil).sqr((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x$1])).bbb); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb = _r$1; - ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits = $imul(2, (x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + x$2])).ndigits); - /* } */ case 9: - larger = (nat.nil).set(((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb); - while (true) { - if (!(mulAddVWW($convertSliceType(larger, sliceType$2), $convertSliceType(larger, sliceType$2), b, 0) === 0)) { break; } - ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb = ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb.set(larger); - ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits = ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).ndigits + (1) >> 0; - } - ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).nbits = ((i < 0 || i >= table.$length) ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + i]).bbb.bitLen(); - /* } */ case 6: - i = i + (1) >> 0; - $s = 3; continue; - case 4: - /* } */ case 2: - if (b === 10) { - cacheBase10.Mutex.Unlock(); - } - $s = -1; return table; - /* */ } return; } var $f = {$blk: divisors, $c: true, $r, _r, _r$1, b, bb, i, k, larger, m, ndigits, table, words, x, x$1, x$2, y, $s};return $f; - }; - nat.prototype.clear = function() { - var _i, _ref, i, z; - z = this; - _ref = z; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = 0); - _i++; - } - }; - $ptrType(nat).prototype.clear = function() { return this.$get().clear(); }; - nat.prototype.norm = function() { - var i, x, z; - z = this; - i = z.$length; - while (true) { - if (!(i > 0 && ((x = i - 1 >> 0, ((x < 0 || x >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x])) === 0))) { break; } - i = i - (1) >> 0; - } - return $subslice(z, 0, i); - }; - $ptrType(nat).prototype.norm = function() { return this.$get().norm(); }; - nat.prototype.make = function(n) { - var n, z; - z = this; - if (n <= z.$capacity) { - return $subslice(z, 0, n); - } - if (n === 1) { - return $makeSlice(nat, 1); - } - return $makeSlice(nat, n, (n + 4 >> 0)); - }; - $ptrType(nat).prototype.make = function(n) { return this.$get().make(n); }; - nat.prototype.setWord = function(x) { - var x, z; - z = this; - if (x === 0) { - return $subslice(z, 0, 0); - } - z = z.make(1); - (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = x); - return z; - }; - $ptrType(nat).prototype.setWord = function(x) { return this.$get().setWord(x); }; - nat.prototype.setUint64 = function(x) { - var w, x, x$1, z; - z = this; - w = ((x.$low >>> 0)); - if ((x$1 = (new $Uint64(0, w.constructor === Number ? w : 1)), (x$1.$high === x.$high && x$1.$low === x.$low))) { - return z.setWord(w); - } - z = z.make(2); - (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = (($shiftRightUint64(x, 32).$low >>> 0))); - (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((x.$low >>> 0))); - return z; - }; - $ptrType(nat).prototype.setUint64 = function(x) { return this.$get().setUint64(x); }; - nat.prototype.set = function(x) { - var x, z; - z = this; - z = z.make(x.$length); - $copySlice(z, x); - return z; - }; - $ptrType(nat).prototype.set = function(x) { return this.$get().set(x); }; - nat.prototype.add = function(x, y) { - var {$24r, _r, _r$1, c, m, n, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - m = x.$length; - n = y.$length; - /* */ if (m < n) { $s = 2; continue; } - /* */ if ((m === 0)) { $s = 3; continue; } - /* */ if ((n === 0)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (m < n) { */ case 2: - _r = z.add(y, x); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if ((m === 0)) { */ case 3: - $s = -1; return $subslice(z, 0, 0); - /* } else if ((n === 0)) { */ case 4: - $s = -1; return z.set(x); - /* } */ case 5: - case 1: - z = z.make(m + 1 >> 0); - c = addVV($convertSliceType($subslice(z, 0, n), sliceType$2), $convertSliceType(x, sliceType$2), $convertSliceType(y, sliceType$2)); - /* */ if (m > n) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (m > n) { */ case 8: - _r$1 = addVW($convertSliceType($subslice(z, n, m), sliceType$2), $convertSliceType($subslice(x, n), sliceType$2), c); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - c = _r$1; - /* } */ case 9: - ((m < 0 || m >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + m] = c); - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.add, $c: true, $r, $24r, _r, _r$1, c, m, n, x, y, z, $s};return $f; - }; - $ptrType(nat).prototype.add = function(x, y) { return this.$get().add(x, y); }; - nat.prototype.sub = function(x, y) { - var {_r, c, m, n, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - m = x.$length; - n = y.$length; - if (m < n) { - $panic(new $String("underflow")); - } else if ((m === 0)) { - $s = -1; return $subslice(z, 0, 0); - } else if ((n === 0)) { - $s = -1; return z.set(x); - } - z = z.make(m); - c = subVV($convertSliceType($subslice(z, 0, n), sliceType$2), $convertSliceType(x, sliceType$2), $convertSliceType(y, sliceType$2)); - /* */ if (m > n) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (m > n) { */ case 1: - _r = subVW($convertSliceType($subslice(z, n), sliceType$2), $convertSliceType($subslice(x, n), sliceType$2), c); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - c = _r; - /* } */ case 2: - if (!((c === 0))) { - $panic(new $String("underflow")); - } - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.sub, $c: true, $r, _r, c, m, n, x, y, z, $s};return $f; - }; - $ptrType(nat).prototype.sub = function(x, y) { return this.$get().sub(x, y); }; - nat.prototype.cmp = function(y) { - var i, m, n, r, x, y; - r = 0; - x = this; - m = x.$length; - n = y.$length; - if (!((m === n)) || (m === 0)) { - if (m < n) { - r = -1; - } else if (m > n) { - r = 1; - } - return r; - } - i = m - 1 >> 0; - while (true) { - if (!(i > 0 && (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) === ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])))) { break; } - i = i - (1) >> 0; - } - if (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) < ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) { - r = -1; - } else if (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) > ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) { - r = 1; - } - return r; - }; - $ptrType(nat).prototype.cmp = function(y) { return this.$get().cmp(y); }; - nat.prototype.mulAddWW = function(x, y, r) { - var m, r, x, y, z; - z = this; - m = x.$length; - if ((m === 0) || (y === 0)) { - return z.setWord(r); - } - z = z.make(m + 1 >> 0); - ((m < 0 || m >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + m] = mulAddVWW($convertSliceType($subslice(z, 0, m), sliceType$2), $convertSliceType(x, sliceType$2), y, r)); - return z.norm(); - }; - $ptrType(nat).prototype.mulAddWW = function(x, y, r) { return this.$get().mulAddWW(x, y, r); }; - basicMul = function(z, x, y) { - var _i, _ref, d, i, x, x$1, y, z; - $subslice(z, 0, (x.$length + y.$length >> 0)).clear(); - _ref = y; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((d === 0))) { - (x$1 = x.$length + i >> 0, ((x$1 < 0 || x$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$1] = addMulVVW($convertSliceType($subslice(z, i, (i + x.$length >> 0)), sliceType$2), $convertSliceType(x, sliceType$2), d))); - } - _i++; - } - }; - nat.prototype.montgomery = function(x, y, m, k, n) { - var c, c2, c3, cx, cy, d, i, k, m, n, t, x, x$1, y, z; - z = this; - if (!((x.$length === n)) || !((y.$length === n)) || !((m.$length === n))) { - $panic(new $String("math/big: mismatched montgomery number lengths")); - } - z = z.make($imul(n, 2)); - z.clear(); - c = 0; - i = 0; - while (true) { - if (!(i < n)) { break; } - d = ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]); - c2 = addMulVVW($convertSliceType($subslice(z, i, (n + i >> 0)), sliceType$2), $convertSliceType(x, sliceType$2), d); - t = $imul(((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]), k) >>> 0; - c3 = addMulVVW($convertSliceType($subslice(z, i, (n + i >> 0)), sliceType$2), $convertSliceType(m, sliceType$2), t); - cx = c + c2 >>> 0; - cy = cx + c3 >>> 0; - (x$1 = n + i >> 0, ((x$1 < 0 || x$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$1] = cy)); - if (cx < c2 || cy < c3) { - c = 1; - } else { - c = 0; - } - i = i + (1) >> 0; - } - if (!((c === 0))) { - subVV($convertSliceType($subslice(z, 0, n), sliceType$2), $convertSliceType($subslice(z, n), sliceType$2), $convertSliceType(m, sliceType$2)); - } else { - $copySlice($subslice(z, 0, n), $subslice(z, n)); - } - return $subslice(z, 0, n); - }; - $ptrType(nat).prototype.montgomery = function(x, y, m, k, n) { return this.$get().montgomery(x, y, m, k, n); }; - karatsubaAdd = function(z, x, n) { - var {_r, c, n, x, z, $s, $r, $c} = $restore(this, {z, x, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = addVV($convertSliceType($subslice(z, 0, n), sliceType$2), $convertSliceType(z, sliceType$2), $convertSliceType(x, sliceType$2)); - /* */ if (!((c === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((c === 0))) { */ case 1: - _r = addVW($convertSliceType($subslice(z, n, (n + (n >> 1 >> 0) >> 0)), sliceType$2), $convertSliceType($subslice(z, n), sliceType$2), c); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: karatsubaAdd, $c: true, $r, _r, c, n, x, z, $s};return $f; - }; - karatsubaSub = function(z, x, n) { - var {_r, c, n, x, z, $s, $r, $c} = $restore(this, {z, x, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = subVV($convertSliceType($subslice(z, 0, n), sliceType$2), $convertSliceType(z, sliceType$2), $convertSliceType(x, sliceType$2)); - /* */ if (!((c === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((c === 0))) { */ case 1: - _r = subVW($convertSliceType($subslice(z, n, (n + (n >> 1 >> 0) >> 0)), sliceType$2), $convertSliceType($subslice(z, n), sliceType$2), c); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: karatsubaSub, $c: true, $r, _r, c, n, x, z, $s};return $f; - }; - karatsuba = function(z, x, y) { - var {_tmp, _tmp$1, _tmp$2, _tmp$3, n, n2, p, r, s, x, x0, x1, xd, y, y0, y1, yd, z, $s, $r, $c} = $restore(this, {z, x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = y.$length; - if (!(((n & 1) === 0)) || n < karatsubaThreshold || n < 2) { - basicMul(z, x, y); - $s = -1; return; - } - n2 = n >> 1 >> 0; - _tmp = $subslice(x, n2); - _tmp$1 = $subslice(x, 0, n2); - x1 = _tmp; - x0 = _tmp$1; - _tmp$2 = $subslice(y, n2); - _tmp$3 = $subslice(y, 0, n2); - y1 = _tmp$2; - y0 = _tmp$3; - $r = karatsuba(z, x0, y0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = karatsuba($subslice(z, n), x1, y1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = 1; - xd = $subslice(z, ($imul(2, n)), (($imul(2, n)) + n2 >> 0)); - if (!((subVV($convertSliceType(xd, sliceType$2), $convertSliceType(x1, sliceType$2), $convertSliceType(x0, sliceType$2)) === 0))) { - s = -s; - subVV($convertSliceType(xd, sliceType$2), $convertSliceType(x0, sliceType$2), $convertSliceType(x1, sliceType$2)); - } - yd = $subslice(z, (($imul(2, n)) + n2 >> 0), ($imul(3, n))); - if (!((subVV($convertSliceType(yd, sliceType$2), $convertSliceType(y0, sliceType$2), $convertSliceType(y1, sliceType$2)) === 0))) { - s = -s; - subVV($convertSliceType(yd, sliceType$2), $convertSliceType(y1, sliceType$2), $convertSliceType(y0, sliceType$2)); - } - p = $subslice(z, ($imul(n, 3))); - $r = karatsuba(p, xd, yd); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r = $subslice(z, ($imul(n, 4))); - $copySlice(r, $subslice(z, 0, ($imul(n, 2)))); - $r = karatsubaAdd($subslice(z, n2), r, n); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = karatsubaAdd($subslice(z, n2), $subslice(r, n), n); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (s > 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (s > 0) { */ case 6: - $r = karatsubaAdd($subslice(z, n2), p, n); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 8; continue; - /* } else { */ case 7: - $r = karatsubaSub($subslice(z, n2), p, n); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return; - /* */ } return; } var $f = {$blk: karatsuba, $c: true, $r, _tmp, _tmp$1, _tmp$2, _tmp$3, n, n2, p, r, s, x, x0, x1, xd, y, y0, y1, yd, z, $s};return $f; - }; - alias = function(x, y) { - var x, x$1, x$2, y; - return x.$capacity > 0 && y.$capacity > 0 && (x$1 = $subslice(x, 0, x.$capacity), $indexPtr(x$1.$array, x$1.$offset + (x.$capacity - 1 >> 0), ptrType$4)) === (x$2 = $subslice(y, 0, y.$capacity), $indexPtr(x$2.$array, x$2.$offset + (y.$capacity - 1 >> 0), ptrType$4)); - }; - addAt = function(z, x, i) { - var {_r, c, i, j, n, x, z, $s, $r, $c} = $restore(this, {z, x, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = x.$length; - /* */ if (n > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n > 0) { */ case 1: - c = addVV($convertSliceType($subslice(z, i, (i + n >> 0)), sliceType$2), $convertSliceType($subslice(z, i), sliceType$2), $convertSliceType(x, sliceType$2)); - /* */ if (!((c === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((c === 0))) { */ case 3: - j = i + n >> 0; - /* */ if (j < z.$length) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (j < z.$length) { */ case 5: - _r = addVW($convertSliceType($subslice(z, j), sliceType$2), $convertSliceType($subslice(z, j), sliceType$2), c); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 6: - /* } */ case 4: - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: addAt, $c: true, $r, _r, c, i, j, n, x, z, $s};return $f; - }; - max = function(x, y) { - var x, y; - if (x > y) { - return x; - } - return y; - }; - karatsubaLen = function(n, threshold) { - var i, n, threshold, y; - i = 0; - while (true) { - if (!(n > threshold)) { break; } - n = (n >> $min((1), 31)) >> 0; - i = i + (1) >>> 0; - } - return (y = i, y < 32 ? (n << y) : 0) >> 0; - }; - nat.prototype.mul = function(x, y) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, i, k, m, n, t, tp, x, x0, x0$1, xi, y, y0, y0$1, y1, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - m = x.$length; - n = y.$length; - /* */ if (m < n) { $s = 2; continue; } - /* */ if ((m === 0) || (n === 0)) { $s = 3; continue; } - /* */ if ((n === 1)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (m < n) { */ case 2: - _r = z.mul(y, x); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 7; case 7: return $24r; - /* } else if ((m === 0) || (n === 0)) { */ case 3: - $s = -1; return $subslice(z, 0, 0); - /* } else if ((n === 1)) { */ case 4: - $s = -1; return z.mulAddWW(x, (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0]), 0); - /* } */ case 5: - case 1: - if (alias(z, x) || alias(z, y)) { - z = nat.nil; - } - if (n < karatsubaThreshold) { - z = z.make(m + n >> 0); - basicMul(z, x, y); - $s = -1; return z.norm(); - } - k = karatsubaLen(n, karatsubaThreshold); - x0 = $subslice(x, 0, k); - y0 = $subslice(y, 0, k); - z = z.make(max($imul(6, k), m + n >> 0)); - $r = karatsuba(z, x0, y0); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - z = $subslice(z, 0, (m + n >> 0)); - $subslice(z, ($imul(2, k))).clear(); - /* */ if (k < n || !((m === n))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (k < n || !((m === n))) { */ case 9: - _r$1 = getNat($imul(3, k)); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - tp = _r$1; - t = tp.$get(); - x0$1 = x0.norm(); - y1 = $subslice(y, k); - _r$2 = t.mul(x0$1, y1); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - t = _r$2; - $r = addAt(z, t, k); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - y0$1 = y0.norm(); - i = k; - /* while (true) { */ case 14: - /* if (!(i < x.$length)) { break; } */ if(!(i < x.$length)) { $s = 15; continue; } - xi = $subslice(x, i); - if (xi.$length > k) { - xi = $subslice(xi, 0, k); - } - xi = xi.norm(); - _r$3 = t.mul(xi, y0$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - t = _r$3; - $r = addAt(z, t, i); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = t.mul(xi, y1); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - t = _r$4; - $r = addAt(z, t, i + k >> 0); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = i + (k) >> 0; - $s = 14; continue; - case 15: - putNat(tp); - /* } */ case 10: - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.mul, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, i, k, m, n, t, tp, x, x0, x0$1, xi, y, y0, y0$1, y1, z, $s};return $f; - }; - $ptrType(nat).prototype.mul = function(x, y) { return this.$get().mul(x, y); }; - basicSqr = function(z, x) { - var {_r, _tuple, _tuple$1, d, i, n, t, tp, x, x$1, x$2, x$3, x$4, z, $s, $r, $c} = $restore(this, {z, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = x.$length; - _r = getNat($imul(2, n)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - tp = _r; - t = tp.$get(); - t.clear(); - _tuple = mulWW((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = _tuple[0]); - (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = _tuple[1]); - i = 1; - while (true) { - if (!(i < n)) { break; } - d = ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]); - _tuple$1 = mulWW(d, d); - (x$1 = ($imul(2, i)) + 1 >> 0, ((x$1 < 0 || x$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$1] = _tuple$1[0])); - (x$2 = $imul(2, i), ((x$2 < 0 || x$2 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$2] = _tuple$1[1])); - (x$3 = $imul(2, i), ((x$3 < 0 || x$3 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x$3] = addMulVVW($convertSliceType($subslice(t, i, ($imul(2, i))), sliceType$2), $convertSliceType($subslice(x, 0, i), sliceType$2), d))); - i = i + (1) >> 0; - } - (x$4 = ($imul(2, n)) - 1 >> 0, ((x$4 < 0 || x$4 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x$4] = shlVU($convertSliceType($subslice(t, 1, (($imul(2, n)) - 1 >> 0)), sliceType$2), $convertSliceType($subslice(t, 1, (($imul(2, n)) - 1 >> 0)), sliceType$2), 1))); - addVV($convertSliceType(z, sliceType$2), $convertSliceType(z, sliceType$2), $convertSliceType(t, sliceType$2)); - putNat(tp); - $s = -1; return; - /* */ } return; } var $f = {$blk: basicSqr, $c: true, $r, _r, _tuple, _tuple$1, d, i, n, t, tp, x, x$1, x$2, x$3, x$4, z, $s};return $f; - }; - karatsubaSqr = function(z, x) { - var {_tmp, _tmp$1, n, n2, p, r, x, x0, x1, xd, z, $s, $r, $c} = $restore(this, {z, x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = x.$length; - /* */ if (!(((n & 1) === 0)) || n < karatsubaSqrThreshold || n < 2) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(((n & 1) === 0)) || n < karatsubaSqrThreshold || n < 2) { */ case 1: - $r = basicSqr($subslice(z, 0, ($imul(2, n))), x); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - n2 = n >> 1 >> 0; - _tmp = $subslice(x, n2); - _tmp$1 = $subslice(x, 0, n2); - x1 = _tmp; - x0 = _tmp$1; - $r = karatsubaSqr(z, x0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = karatsubaSqr($subslice(z, n), x1); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - xd = $subslice(z, ($imul(2, n)), (($imul(2, n)) + n2 >> 0)); - if (!((subVV($convertSliceType(xd, sliceType$2), $convertSliceType(x1, sliceType$2), $convertSliceType(x0, sliceType$2)) === 0))) { - subVV($convertSliceType(xd, sliceType$2), $convertSliceType(x0, sliceType$2), $convertSliceType(x1, sliceType$2)); - } - p = $subslice(z, ($imul(n, 3))); - $r = karatsubaSqr(p, xd); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r = $subslice(z, ($imul(n, 4))); - $copySlice(r, $subslice(z, 0, ($imul(n, 2)))); - $r = karatsubaAdd($subslice(z, n2), r, n); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = karatsubaAdd($subslice(z, n2), $subslice(r, n), n); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = karatsubaSub($subslice(z, n2), p, n); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: karatsubaSqr, $c: true, $r, _tmp, _tmp$1, n, n2, p, r, x, x0, x1, xd, z, $s};return $f; - }; - nat.prototype.sqr = function(x) { - var {_r, _r$1, _r$2, _tuple, d, k, n, t, tp, x, x0, x0$1, x1, z, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - n = x.$length; - if ((n === 0)) { - $s = -1; return $subslice(z, 0, 0); - } else if ((n === 1)) { - d = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]); - z = z.make(2); - _tuple = mulWW(d, d); - (1 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 1] = _tuple[0]); - (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = _tuple[1]); - $s = -1; return z.norm(); - } - if (alias(z, x)) { - z = nat.nil; - } - if (n < basicSqrThreshold) { - z = z.make($imul(2, n)); - basicMul(z, x, x); - $s = -1; return z.norm(); - } - /* */ if (n < karatsubaSqrThreshold) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n < karatsubaSqrThreshold) { */ case 1: - z = z.make($imul(2, n)); - $r = basicSqr(z, x); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return z.norm(); - /* } */ case 2: - k = karatsubaLen(n, karatsubaSqrThreshold); - x0 = $subslice(x, 0, k); - z = z.make(max($imul(6, k), $imul(2, n))); - $r = karatsubaSqr(z, x0); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - z = $subslice(z, 0, ($imul(2, n))); - $subslice(z, ($imul(2, k))).clear(); - /* */ if (k < n) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (k < n) { */ case 5: - _r = getNat($imul(2, k)); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - tp = _r; - t = tp.$get(); - x0$1 = x0.norm(); - x1 = $subslice(x, k); - _r$1 = t.mul(x0$1, x1); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t = _r$1; - $r = addAt(z, t, k); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = addAt(z, t, k); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = t.sqr(x1); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - t = _r$2; - $r = addAt(z, t, $imul(2, k)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - putNat(tp); - /* } */ case 6: - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.sqr, $c: true, $r, _r, _r$1, _r$2, _tuple, d, k, n, t, tp, x, x0, x0$1, x1, z, $s};return $f; - }; - $ptrType(nat).prototype.sqr = function(x) { return this.$get().sqr(x); }; - nat.prototype.mulRange = function(a, b) { - var {$24r, $24r$1, _arg, _arg$1, _r, _r$1, _r$2, _r$3, a, b, m, x, z, $s, $r, $c} = $restore(this, {a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if ((a.$high === 0 && a.$low === 0)) { $s = 2; continue; } - /* */ if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) { $s = 3; continue; } - /* */ if ((a.$high === b.$high && a.$low === b.$low)) { $s = 4; continue; } - /* */ if ((x = new $Uint64(a.$high + 0, a.$low + 1), (x.$high === b.$high && x.$low === b.$low))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((a.$high === 0 && a.$low === 0)) { */ case 2: - $s = -1; return z.setUint64(new $Uint64(0, 0)); - /* } else if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) { */ case 3: - $s = -1; return z.setUint64(new $Uint64(0, 1)); - /* } else if ((a.$high === b.$high && a.$low === b.$low)) { */ case 4: - $s = -1; return z.setUint64(a); - /* } else if ((x = new $Uint64(a.$high + 0, a.$low + 1), (x.$high === b.$high && x.$low === b.$low))) { */ case 5: - _r = z.mul((nat.nil).setUint64(a), (nat.nil).setUint64(b)); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 1: - m = $div64((new $Uint64(a.$high + b.$high, a.$low + b.$low)), new $Uint64(0, 2), false); - _r$1 = (nat.nil).mulRange(a, m); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = _r$1; - _r$2 = (nat.nil).mulRange(new $Uint64(m.$high + 0, m.$low + 1), b); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = z.mul(_arg, _arg$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 12; case 12: return $24r$1; - /* */ } return; } var $f = {$blk: nat.prototype.mulRange, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _r, _r$1, _r$2, _r$3, a, b, m, x, z, $s};return $f; - }; - $ptrType(nat).prototype.mulRange = function(a, b) { return this.$get().mulRange(a, b); }; - getNat = function(n) { - var {_r, n, v, z, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = ptrType$3.nil; - _r = natPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - if (!($interfaceIsEqual(v, $ifaceNil))) { - z = $assertType(v, ptrType$3); - } - if (z === ptrType$3.nil) { - z = $newDataPointer(nat.nil, ptrType$3); - } - z.$set(z.make(n)); - $s = -1; return z; - /* */ } return; } var $f = {$blk: getNat, $c: true, $r, _r, n, v, z, $s};return $f; - }; - putNat = function(x) { - var x; - natPool.Put(x); - }; - nat.prototype.bitLen = function() { - var i, x; - x = this; - i = x.$length - 1 >> 0; - if (i >= 0) { - return ($imul(i, 32)) + bits.Len(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0))) >> 0; - } - return 0; - }; - $ptrType(nat).prototype.bitLen = function() { return this.$get().bitLen(); }; - nat.prototype.trailingZeroBits = function() { - var i, x; - x = this; - if (x.$length === 0) { - return 0; - } - i = 0; - while (true) { - if (!(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) === 0)) { break; } - i = i + (1) >>> 0; - } - return (i * 32 >>> 0) + ((bits.TrailingZeros(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0))) >>> 0)) >>> 0; - }; - $ptrType(nat).prototype.trailingZeroBits = function() { return this.$get().trailingZeroBits(); }; - same = function(x, y) { - var x, y; - return (x.$length === y.$length) && x.$length > 0 && $indexPtr(x.$array, x.$offset + 0, ptrType$4) === $indexPtr(y.$array, y.$offset + 0, ptrType$4); - }; - nat.prototype.shl = function(x, s) { - var _q, _r, m, n, s, x, z; - z = this; - if (s === 0) { - if (same(z, x)) { - return z; - } - if (!alias(z, x)) { - return z.set(x); - } - } - m = x.$length; - if (m === 0) { - return $subslice(z, 0, 0); - } - n = m + (((_q = s / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)) >> 0; - z = z.make(n + 1 >> 0); - ((n < 0 || n >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + n] = shlVU($convertSliceType($subslice(z, (n - m >> 0), n), sliceType$2), $convertSliceType(x, sliceType$2), (_r = s % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero")))); - $subslice(z, 0, (n - m >> 0)).clear(); - return z.norm(); - }; - $ptrType(nat).prototype.shl = function(x, s) { return this.$get().shl(x, s); }; - nat.prototype.shr = function(x, s) { - var _q, _r, m, n, s, x, z; - z = this; - if (s === 0) { - if (same(z, x)) { - return z; - } - if (!alias(z, x)) { - return z.set(x); - } - } - m = x.$length; - n = m - (((_q = s / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)) >> 0; - if (n <= 0) { - return $subslice(z, 0, 0); - } - z = z.make(n); - shrVU($convertSliceType(z, sliceType$2), $convertSliceType($subslice(x, (m - n >> 0)), sliceType$2), (_r = s % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))); - return z.norm(); - }; - $ptrType(nat).prototype.shr = function(x, s) { return this.$get().shr(x, s); }; - nat.prototype.setBit = function(x, i, b) { - var _1, _q, _r, b, i, j, m, n, x, y, z; - z = this; - j = (((_q = i / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >> 0)); - m = (y = ((_r = i % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (1 << y) : 0) >>> 0; - n = x.$length; - _1 = b; - if (_1 === (0)) { - z = z.make(n); - $copySlice(z, x); - if (j >= n) { - return z; - } - ((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j] = ((((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j]) & ~(m)) >>> 0)); - return z.norm(); - } else if (_1 === (1)) { - if (j >= n) { - z = z.make(j + 1 >> 0); - $subslice(z, n).clear(); - } else { - z = z.make(n); - } - $copySlice(z, x); - ((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j] = ((((j < 0 || j >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + j]) | (m)) >>> 0)); - return z; - } - $panic(new $String("set bit is not 0 or 1")); - }; - $ptrType(nat).prototype.setBit = function(x, i, b) { return this.$get().setBit(x, i, b); }; - nat.prototype.bit = function(i) { - var _q, _r, i, j, x, y; - x = this; - j = (_q = i / 32, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - if (j >= ((x.$length >>> 0))) { - return 0; - } - return ((((((y = ((_r = i % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))), y < 32 ? (((j < 0 || j >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + j]) >>> y) : 0) >>> 0) & 1) >>> 0) >>> 0)); - }; - $ptrType(nat).prototype.bit = function(i) { return this.$get().bit(i); }; - nat.prototype.and = function(x, y) { - var i, m, n, x, y, z; - z = this; - m = x.$length; - n = y.$length; - if (m > n) { - m = n; - } - z = z.make(m); - i = 0; - while (true) { - if (!(i < m)) { break; } - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - return z.norm(); - }; - $ptrType(nat).prototype.and = function(x, y) { return this.$get().and(x, y); }; - nat.prototype.andNot = function(x, y) { - var i, m, n, x, y, z; - z = this; - m = x.$length; - n = y.$length; - if (n > m) { - n = m; - } - z = z.make(m); - i = 0; - while (true) { - if (!(i < n)) { break; } - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & ~((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - $copySlice($subslice(z, n, m), $subslice(x, n, m)); - return z.norm(); - }; - $ptrType(nat).prototype.andNot = function(x, y) { return this.$get().andNot(x, y); }; - nat.prototype.or = function(x, y) { - var _tmp, _tmp$1, i, m, n, s, x, y, z; - z = this; - m = x.$length; - n = y.$length; - s = x; - if (m < n) { - _tmp = m; - _tmp$1 = n; - n = _tmp; - m = _tmp$1; - s = y; - } - z = z.make(m); - i = 0; - while (true) { - if (!(i < n)) { break; } - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) | ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - $copySlice($subslice(z, n, m), $subslice(s, n, m)); - return z.norm(); - }; - $ptrType(nat).prototype.or = function(x, y) { return this.$get().or(x, y); }; - nat.prototype.xor = function(x, y) { - var _tmp, _tmp$1, i, m, n, s, x, y, z; - z = this; - m = x.$length; - n = y.$length; - s = x; - if (m < n) { - _tmp = m; - _tmp$1 = n; - n = _tmp; - m = _tmp$1; - s = y; - } - z = z.make(m); - i = 0; - while (true) { - if (!(i < n)) { break; } - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) ^ ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - $copySlice($subslice(z, n, m), $subslice(s, n, m)); - return z.norm(); - }; - $ptrType(nat).prototype.xor = function(x, y) { return this.$get().xor(x, y); }; - nat.prototype.random = function(rand$1, limit, n) { - var {_1, _i, _i$1, _index, _r, _r$1, _r$2, _ref, _ref$1, bitLengthOfMSW, i, i$1, limit, mask, n, rand$1, y, z, $s, $r, $c} = $restore(this, {rand$1, limit, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (alias(z, limit)) { - z = nat.nil; - } - z = z.make(limit.$length); - bitLengthOfMSW = (((_r = n % 32, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)); - if (bitLengthOfMSW === 0) { - bitLengthOfMSW = 32; - } - mask = (((((y = bitLengthOfMSW, y < 32 ? (1 << y) : 0) >>> 0)) - 1 >>> 0)); - /* while (true) { */ case 1: - _1 = 32; - /* */ if (_1 === (32)) { $s = 4; continue; } - /* */ if (_1 === (64)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (32)) { */ case 4: - _ref = z; - _i = 0; - /* while (true) { */ case 8: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } - i = _i; - _r$1 = rand$1.Uint32(); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((_r$1 >>> 0))); - _i++; - $s = 8; continue; - case 9: - $s = 7; continue; - /* } else if (_1 === (64)) { */ case 5: - _ref$1 = z; - _i$1 = 0; - /* while (true) { */ case 11: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 12; continue; } - i$1 = _i$1; - _r$2 = rand$1.Uint32(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - ((i$1 < 0 || i$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i$1] = ((((_r$2 >>> 0)) | 0) >>> 0)); - _i$1++; - $s = 11; continue; - case 12: - $s = 7; continue; - /* } else { */ case 6: - $panic(new $String("unknown word size")); - /* } */ case 7: - case 3: - _index = limit.$length - 1 >> 0; - ((_index < 0 || _index >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + _index] = ((((_index < 0 || _index >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + _index]) & (mask)) >>> 0)); - if (z.cmp(limit) < 0) { - /* break; */ $s = 2; continue; - } - $s = 1; continue; - case 2: - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.random, $c: true, $r, _1, _i, _i$1, _index, _r, _r$1, _r$2, _ref, _ref$1, bitLengthOfMSW, i, i$1, limit, mask, n, rand$1, y, z, $s};return $f; - }; - $ptrType(nat).prototype.random = function(rand$1, limit, n) { return this.$get().random(rand$1, limit, n); }; - nat.prototype.expNN = function(x, y, m) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, i, j, j$1, m, q, r, shift, v, w, x, x$1, y, y$1, y$2, y$3, z, zz, $s, $r, $c} = $restore(this, {x, y, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (alias(z, x) || alias(z, y)) { - z = nat.nil; - } - if ((m.$length === 1) && ((0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) === 1)) { - $s = -1; return z.setWord(0); - } - if (y.$length === 0) { - $s = -1; return z.setWord(1); - } - /* */ if ((y.$length === 1) && ((0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0]) === 1) && !((m.$length === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((y.$length === 1) && ((0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0]) === 1) && !((m.$length === 0))) { */ case 1: - _r = (nat.nil).div(z, x, m); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - z = _tuple[1]; - $s = -1; return z; - /* } */ case 2: - if (!((m.$length === 0))) { - z = z.make(m.$length); - } - z = z.set(x); - /* */ if (x.cmp(natOne) > 0 && y.$length > 1 && m.$length > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (x.cmp(natOne) > 0 && y.$length > 1 && m.$length > 0) { */ case 4: - /* */ if ((((0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) & 1) >>> 0) === 1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ((((0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) & 1) >>> 0) === 1) { */ case 6: - _r$1 = z.expNNMontgomery(x, y, m); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 9; case 9: return $24r; - /* } */ case 7: - _r$2 = z.expNNWindowed(x, y, m); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 11; case 11: return $24r$1; - /* } */ case 5: - v = (x$1 = y.$length - 1 >> 0, ((x$1 < 0 || x$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + x$1])); - shift = nlz(v) + 1 >>> 0; - v = (y$1 = (shift), y$1 < 32 ? (v << y$1) : 0) >>> 0; - q = nat.nil; - w = 32 - ((shift >> 0)) >> 0; - _tmp = nat.nil; - _tmp$1 = nat.nil; - zz = _tmp; - r = _tmp$1; - j = 0; - /* while (true) { */ case 12: - /* if (!(j < w)) { break; } */ if(!(j < w)) { $s = 13; continue; } - _r$3 = zz.sqr(z); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - zz = _r$3; - _tmp$2 = z; - _tmp$3 = zz; - zz = _tmp$2; - z = _tmp$3; - /* */ if (!((((v & 2147483648) >>> 0) === 0))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!((((v & 2147483648) >>> 0) === 0))) { */ case 15: - _r$4 = zz.mul(z, x); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - zz = _r$4; - _tmp$4 = z; - _tmp$5 = zz; - zz = _tmp$4; - z = _tmp$5; - /* } */ case 16: - /* */ if (!((m.$length === 0))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!((m.$length === 0))) { */ case 18: - _r$5 = zz.div(r, z, m); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - zz = _tuple$1[0]; - r = _tuple$1[1]; - _tmp$6 = q; - _tmp$7 = z; - _tmp$8 = zz; - _tmp$9 = r; - zz = _tmp$6; - r = _tmp$7; - q = _tmp$8; - z = _tmp$9; - /* } */ case 19: - v = (y$2 = (1), y$2 < 32 ? (v << y$2) : 0) >>> 0; - j = j + (1) >> 0; - $s = 12; continue; - case 13: - i = y.$length - 2 >> 0; - /* while (true) { */ case 21: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 22; continue; } - v = ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]); - j$1 = 0; - /* while (true) { */ case 23: - /* if (!(j$1 < 32)) { break; } */ if(!(j$1 < 32)) { $s = 24; continue; } - _r$6 = zz.sqr(z); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - zz = _r$6; - _tmp$10 = z; - _tmp$11 = zz; - zz = _tmp$10; - z = _tmp$11; - /* */ if (!((((v & 2147483648) >>> 0) === 0))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!((((v & 2147483648) >>> 0) === 0))) { */ case 26: - _r$7 = zz.mul(z, x); /* */ $s = 28; case 28: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - zz = _r$7; - _tmp$12 = z; - _tmp$13 = zz; - zz = _tmp$12; - z = _tmp$13; - /* } */ case 27: - /* */ if (!((m.$length === 0))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!((m.$length === 0))) { */ case 29: - _r$8 = zz.div(r, z, m); /* */ $s = 31; case 31: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$2 = _r$8; - zz = _tuple$2[0]; - r = _tuple$2[1]; - _tmp$14 = q; - _tmp$15 = z; - _tmp$16 = zz; - _tmp$17 = r; - zz = _tmp$14; - r = _tmp$15; - q = _tmp$16; - z = _tmp$17; - /* } */ case 30: - v = (y$3 = (1), y$3 < 32 ? (v << y$3) : 0) >>> 0; - j$1 = j$1 + (1) >> 0; - $s = 23; continue; - case 24: - i = i - (1) >> 0; - $s = 21; continue; - case 22: - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.expNN, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, i, j, j$1, m, q, r, shift, v, w, x, x$1, y, y$1, y$2, y$3, z, zz, $s};return $f; - }; - $ptrType(nat).prototype.expNN = function(x, y, m) { return this.$get().expNN(x, y, m); }; - nat.prototype.expNNWindowed = function(x, y, m) { - var {_q, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, i, i$1, j, m, p, p1, p2, powers, r, x, x$1, y, y$1, yi, z, zz, $s, $r, $c} = $restore(this, {x, y, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _tmp = nat.nil; - _tmp$1 = nat.nil; - zz = _tmp; - r = _tmp$1; - powers = arrayType$1.zero(); - powers[0] = natOne; - powers[1] = x; - i = 2; - /* while (true) { */ case 1: - /* if (!(i < 16)) { break; } */ if(!(i < 16)) { $s = 2; continue; } - _tmp$2 = $indexPtr(powers, (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ptrType$3); - _tmp$3 = $indexPtr(powers, i, ptrType$3); - _tmp$4 = $indexPtr(powers, (i + 1 >> 0), ptrType$3); - p2 = _tmp$2; - p = _tmp$3; - p1 = _tmp$4; - _r = p.sqr(p2.$get()); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p.$set(_r); - _r$1 = zz.div(r, p.$get(), m); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - zz = _tuple[0]; - r = _tuple[1]; - _tmp$5 = r; - _tmp$6 = p.$get(); - p.$set(_tmp$5); - r = _tmp$6; - _r$2 = p1.mul(p.$get(), x); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - p1.$set(_r$2); - _r$3 = zz.div(r, p1.$get(), m); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - zz = _tuple$1[0]; - r = _tuple$1[1]; - _tmp$7 = r; - _tmp$8 = p1.$get(); - p1.$set(_tmp$7); - r = _tmp$8; - i = i + (2) >> 0; - $s = 1; continue; - case 2: - z = z.setWord(1); - i$1 = y.$length - 1 >> 0; - /* while (true) { */ case 7: - /* if (!(i$1 >= 0)) { break; } */ if(!(i$1 >= 0)) { $s = 8; continue; } - yi = ((i$1 < 0 || i$1 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i$1]); - j = 0; - /* while (true) { */ case 9: - /* if (!(j < 32)) { break; } */ if(!(j < 32)) { $s = 10; continue; } - /* */ if (!((i$1 === (y.$length - 1 >> 0))) || !((j === 0))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!((i$1 === (y.$length - 1 >> 0))) || !((j === 0))) { */ case 11: - _r$4 = zz.sqr(z); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - zz = _r$4; - _tmp$9 = z; - _tmp$10 = zz; - zz = _tmp$9; - z = _tmp$10; - _r$5 = zz.div(r, z, m); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - zz = _tuple$2[0]; - r = _tuple$2[1]; - _tmp$11 = r; - _tmp$12 = z; - z = _tmp$11; - r = _tmp$12; - _r$6 = zz.sqr(z); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - zz = _r$6; - _tmp$13 = z; - _tmp$14 = zz; - zz = _tmp$13; - z = _tmp$14; - _r$7 = zz.div(r, z, m); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - zz = _tuple$3[0]; - r = _tuple$3[1]; - _tmp$15 = r; - _tmp$16 = z; - z = _tmp$15; - r = _tmp$16; - _r$8 = zz.sqr(z); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - zz = _r$8; - _tmp$17 = z; - _tmp$18 = zz; - zz = _tmp$17; - z = _tmp$18; - _r$9 = zz.div(r, z, m); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$4 = _r$9; - zz = _tuple$4[0]; - r = _tuple$4[1]; - _tmp$19 = r; - _tmp$20 = z; - z = _tmp$19; - r = _tmp$20; - _r$10 = zz.sqr(z); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - zz = _r$10; - _tmp$21 = z; - _tmp$22 = zz; - zz = _tmp$21; - z = _tmp$22; - _r$11 = zz.div(r, z, m); /* */ $s = 20; case 20: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$5 = _r$11; - zz = _tuple$5[0]; - r = _tuple$5[1]; - _tmp$23 = r; - _tmp$24 = z; - z = _tmp$23; - r = _tmp$24; - /* } */ case 12: - _r$12 = zz.mul(z, (x$1 = yi >>> 28 >>> 0, ((x$1 < 0 || x$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[x$1]))); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - zz = _r$12; - _tmp$25 = z; - _tmp$26 = zz; - zz = _tmp$25; - z = _tmp$26; - _r$13 = zz.div(r, z, m); /* */ $s = 22; case 22: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$6 = _r$13; - zz = _tuple$6[0]; - r = _tuple$6[1]; - _tmp$27 = r; - _tmp$28 = z; - z = _tmp$27; - r = _tmp$28; - yi = (y$1 = (4), y$1 < 32 ? (yi << y$1) : 0) >>> 0; - j = j + (4) >> 0; - $s = 9; continue; - case 10: - i$1 = i$1 - (1) >> 0; - $s = 7; continue; - case 8: - $s = -1; return z.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.expNNWindowed, $c: true, $r, _q, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, i, i$1, j, m, p, p1, p2, powers, r, x, x$1, y, y$1, yi, z, zz, $s};return $f; - }; - $ptrType(nat).prototype.expNNWindowed = function(x, y, m) { return this.$get().expNNWindowed(x, y, m); }; - nat.prototype.expNNMontgomery = function(x, y, m) { - var {RR, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, i, i$1, i$2, j, k0, m, numWords, one, powers, rr, t, x, x$1, x$2, y, y$1, y$2, yi, z, zz, $s, $r, $c} = $restore(this, {x, y, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - numWords = m.$length; - /* */ if (x.$length > numWords) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.$length > numWords) { */ case 1: - _r = (nat.nil).div(nat.nil, x, m); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - x = _tuple[1]; - /* } */ case 2: - if (x.$length < numWords) { - rr = $makeSlice(nat, numWords); - $copySlice(rr, x); - x = rr; - } - k0 = 2 - (0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) >>> 0; - t = (0 >= m.$length ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + 0]) - 1 >>> 0; - i = 1; - while (true) { - if (!(i < 32)) { break; } - t = $imul(t, (t)) >>> 0; - k0 = $imul(k0, (((t + 1 >>> 0)))) >>> 0; - i = (y$1 = (1), y$1 < 32 ? (i << y$1) : 0) >> 0; - } - k0 = -k0 >>> 0; - RR = (nat.nil).setWord(1); - zz = (nat.nil).shl(RR, ((($imul(($imul(2, numWords)), 32)) >>> 0))); - _r$1 = (nat.nil).div(RR, zz, m); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - RR = _tuple$1[1]; - if (RR.$length < numWords) { - zz = zz.make(numWords); - $copySlice(zz, RR); - RR = zz; - } - one = $makeSlice(nat, numWords); - (0 >= one.$length ? ($throwRuntimeError("index out of range"), undefined) : one.$array[one.$offset + 0] = 1); - powers = arrayType$1.zero(); - powers[0] = powers[0].montgomery(one, RR, m, k0, numWords); - powers[1] = powers[1].montgomery(x, RR, m, k0, numWords); - i$1 = 2; - while (true) { - if (!(i$1 < 16)) { break; } - ((i$1 < 0 || i$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[i$1] = ((i$1 < 0 || i$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[i$1]).montgomery((x$1 = i$1 - 1 >> 0, ((x$1 < 0 || x$1 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[x$1])), powers[1], m, k0, numWords)); - i$1 = i$1 + (1) >> 0; - } - z = z.make(numWords); - $copySlice(z, powers[0]); - zz = zz.make(numWords); - i$2 = y.$length - 1 >> 0; - while (true) { - if (!(i$2 >= 0)) { break; } - yi = ((i$2 < 0 || i$2 >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i$2]); - j = 0; - while (true) { - if (!(j < 32)) { break; } - if (!((i$2 === (y.$length - 1 >> 0))) || !((j === 0))) { - zz = zz.montgomery(z, z, m, k0, numWords); - z = z.montgomery(zz, zz, m, k0, numWords); - zz = zz.montgomery(z, z, m, k0, numWords); - z = z.montgomery(zz, zz, m, k0, numWords); - } - zz = zz.montgomery(z, (x$2 = yi >>> 28 >>> 0, ((x$2 < 0 || x$2 >= powers.length) ? ($throwRuntimeError("index out of range"), undefined) : powers[x$2])), m, k0, numWords); - _tmp = zz; - _tmp$1 = z; - z = _tmp; - zz = _tmp$1; - yi = (y$2 = (4), y$2 < 32 ? (yi << y$2) : 0) >>> 0; - j = j + (4) >> 0; - } - i$2 = i$2 - (1) >> 0; - } - zz = zz.montgomery(z, one, m, k0, numWords); - /* */ if (zz.cmp(m) >= 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (zz.cmp(m) >= 0) { */ case 5: - _r$2 = zz.sub(zz, m); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - zz = _r$2; - /* */ if (zz.cmp(m) >= 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (zz.cmp(m) >= 0) { */ case 8: - _r$3 = (nat.nil).div(nat.nil, zz, m); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - zz = _tuple$2[1]; - /* } */ case 9: - /* } */ case 6: - $s = -1; return zz.norm(); - /* */ } return; } var $f = {$blk: nat.prototype.expNNMontgomery, $c: true, $r, RR, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, i, i$1, i$2, j, k0, m, numWords, one, powers, rr, t, x, x$1, x$2, y, y$1, y$2, yi, z, zz, $s};return $f; - }; - $ptrType(nat).prototype.expNNMontgomery = function(x, y, m) { return this.$get().expNNMontgomery(x, y, m); }; - nat.prototype.bytes = function(buf) { - var _i, _ref, buf, d, i, j, y, z; - i = 0; - z = this; - i = buf.$length; - _ref = z; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - d = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - j = 0; - while (true) { - if (!(j < 4)) { break; } - i = i - (1) >> 0; - if (i >= 0) { - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = ((d << 24 >>> 24))); - } else if (!((((d << 24 >>> 24)) === 0))) { - $panic(new $String("math/big: buffer too small to fit value")); - } - d = (y = (8), y < 32 ? (d >>> y) : 0) >>> 0; - j = j + (1) >> 0; - } - _i++; - } - if (i < 0) { - i = 0; - } - while (true) { - if (!(i < buf.$length && (((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i]) === 0))) { break; } - i = i + (1) >> 0; - } - return i; - }; - $ptrType(nat).prototype.bytes = function(buf) { return this.$get().bytes(buf); }; - bigEndianWord = function(buf) { - var buf; - if (false) { - return (($clone(binary.BigEndian, binary.bigEndian).Uint64(buf).$low >>> 0)); - } - return (($clone(binary.BigEndian, binary.bigEndian).Uint32(buf) >>> 0)); - }; - nat.prototype.setBytes = function(buf) { - var _q, buf, d, i, k, s, x, x$1, y, z; - z = this; - z = z.make((_q = (((buf.$length + 4 >> 0) - 1 >> 0)) / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - i = buf.$length; - k = 0; - while (true) { - if (!(i >= 4)) { break; } - ((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k] = bigEndianWord($subslice(buf, (i - 4 >> 0), i))); - i = i - (4) >> 0; - k = k + (1) >> 0; - } - if (i > 0) { - d = 0; - s = 0; - while (true) { - if (!(i > 0)) { break; } - d = (d | (((y = s, y < 32 ? ((((x = i - 1 >> 0, ((x < 0 || x >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + x])) >>> 0)) << y) : 0) >>> 0))) >>> 0; - i = i - (1) >> 0; - s = s + (8) >>> 0; - } - (x$1 = z.$length - 1 >> 0, ((x$1 < 0 || x$1 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$1] = d)); - } - return z.norm(); - }; - $ptrType(nat).prototype.setBytes = function(buf) { return this.$get().setBytes(buf); }; - nat.prototype.sqrt = function(x) { - var {_q, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, n, x, z, z1, z2, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (x.cmp(natOne) <= 0) { - $s = -1; return z.set(x); - } - if (alias(z, x)) { - z = nat.nil; - } - _tmp = nat.nil; - _tmp$1 = nat.nil; - z1 = _tmp; - z2 = _tmp$1; - z1 = z; - z1 = z1.setUint64(new $Uint64(0, 1)); - z1 = z1.shl(z1, (_q = (((x.bitLen() + 1 >> 0) >>> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))); - n = 0; - /* while (true) { */ case 1: - _r = z2.div(nat.nil, x, z1); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - z2 = _tuple[0]; - _r$1 = z2.add(z2, z1); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z2 = _r$1; - z2 = z2.shr(z2, 1); - if (z2.cmp(z1) >= 0) { - if ((n & 1) === 0) { - $s = -1; return z1; - } - $s = -1; return z.set(z1); - } - _tmp$2 = z2; - _tmp$3 = z1; - z1 = _tmp$2; - z2 = _tmp$3; - n = n + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return nat.nil; - /* */ } return; } var $f = {$blk: nat.prototype.sqrt, $c: true, $r, _q, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, n, x, z, z1, z2, $s};return $f; - }; - $ptrType(nat).prototype.sqrt = function(x) { return this.$get().sqrt(x); }; - Int.ptr.prototype.GobEncode = function() { - var b, buf, i, x; - x = this; - if (x === ptrType$2.nil) { - return [sliceType$1.nil, $ifaceNil]; - } - buf = $makeSlice(sliceType$1, (1 + ($imul(x.abs.$length, 4)) >> 0)); - i = x.abs.bytes(buf) - 1 >> 0; - b = 2; - if (x.neg) { - b = (b | (1)) >>> 0; - } - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = b); - return [$subslice(buf, i), $ifaceNil]; - }; - Int.prototype.GobEncode = function() { return this.$val.GobEncode(); }; - Int.ptr.prototype.GobDecode = function(buf) { - var {$24r, _r, b, buf, z, $s, $r, $c} = $restore(this, {buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (buf.$length === 0) { - Int.copy(z, new Int.ptr(false, nat.nil)); - $s = -1; return $ifaceNil; - } - b = (0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]); - /* */ if (!(((b >>> 1 << 24 >>> 24) === 1))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(((b >>> 1 << 24 >>> 24) === 1))) { */ case 1: - _r = fmt.Errorf("Int.GobDecode: encoding version %d not supported", new sliceType([new $Uint8((b >>> 1 << 24 >>> 24))])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - z.neg = !((((b & 1) >>> 0) === 0)); - z.abs = z.abs.setBytes($subslice(buf, 1)); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.GobDecode, $c: true, $r, $24r, _r, b, buf, z, $s};return $f; - }; - Int.prototype.GobDecode = function(buf) { return this.$val.GobDecode(buf); }; - Int.ptr.prototype.MarshalText = function() { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, err, text, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - text = sliceType$1.nil; - err = $ifaceNil; - x = this; - if (x === ptrType$2.nil) { - _tmp = (new sliceType$1($stringToBytes(""))); - _tmp$1 = $ifaceNil; - text = _tmp; - err = _tmp$1; - $s = -1; return [text, err]; - } - _r = x.abs.itoa(x.neg, 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$2 = _r; - _tmp$3 = $ifaceNil; - text = _tmp$2; - err = _tmp$3; - $24r = [text, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.MarshalText, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, err, text, x, $s};return $f; - }; - Int.prototype.MarshalText = function() { return this.$val.MarshalText(); }; - Int.ptr.prototype.UnmarshalText = function(text) { - var {$24r, _r, _r$1, _tuple, ok, text, z, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.setFromScanner(bytes.NewReader(text), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = fmt.Errorf("math/big: cannot unmarshal %q into a *big.Int", new sliceType([text])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.UnmarshalText, $c: true, $r, $24r, _r, _r$1, _tuple, ok, text, z, $s};return $f; - }; - Int.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; - Int.ptr.prototype.MarshalJSON = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = x.MarshalText(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.MarshalJSON, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Int.prototype.MarshalJSON = function() { return this.$val.MarshalJSON(); }; - Int.ptr.prototype.UnmarshalJSON = function(text) { - var {$24r, _r, text, z, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (($bytesToString(text)) === "null") { - $s = -1; return $ifaceNil; - } - _r = z.UnmarshalText(text); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.UnmarshalJSON, $c: true, $r, $24r, _r, text, z, $s};return $f; - }; - Int.prototype.UnmarshalJSON = function(text) { return this.$val.UnmarshalJSON(text); }; - Int.ptr.prototype.Text = function(base) { - var {$24r, _r, base, x, $s, $r, $c} = $restore(this, {base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (x === ptrType$2.nil) { - $s = -1; return ""; - } - _r = x.abs.itoa(x.neg, base); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = ($bytesToString(_r)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Text, $c: true, $r, $24r, _r, base, x, $s};return $f; - }; - Int.prototype.Text = function(base) { return this.$val.Text(base); }; - Int.ptr.prototype.Append = function(buf, base) { - var {$24r, _arg, _arg$1, _r, base, buf, x, $s, $r, $c} = $restore(this, {buf, base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (x === ptrType$2.nil) { - $s = -1; return $appendSlice(buf, ""); - } - _arg = buf; - _r = x.abs.itoa(x.neg, base); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - $24r = $appendSlice(_arg, _arg$1); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Append, $c: true, $r, $24r, _arg, _arg$1, _r, base, buf, x, $s};return $f; - }; - Int.prototype.Append = function(buf, base) { return this.$val.Append(buf, base); }; - Int.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = x.Text(10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Int.prototype.String = function() { return this.$val.String(); }; - writeMultiple = function(s, text, count) { - var {_r, b, count, s, text, $s, $r, $c} = $restore(this, {s, text, count}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (text.length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (text.length > 0) { */ case 1: - b = (new sliceType$1($stringToBytes(text))); - /* while (true) { */ case 3: - /* if (!(count > 0)) { break; } */ if(!(count > 0)) { $s = 4; continue; } - _r = s.Write(b); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - count = count - (1) >> 0; - $s = 3; continue; - case 4: - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: writeMultiple, $c: true, $r, _r, b, count, s, text, $s};return $f; - }; - Int.ptr.prototype.Format = function(s, ch) { - var {_1, _2, _arg, _arg$1, _arg$2, _i, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, base, ch, d, d$1, digits, i, left, length, precision, precisionSet, prefix, right, s, sign, width, widthSet, x, zeros, $s, $r, $c} = $restore(this, {s, ch}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - base = 0; - _1 = ch; - /* */ if (_1 === (98)) { $s = 2; continue; } - /* */ if ((_1 === (111)) || (_1 === (79))) { $s = 3; continue; } - /* */ if ((_1 === (100)) || (_1 === (115)) || (_1 === (118))) { $s = 4; continue; } - /* */ if ((_1 === (120)) || (_1 === (88))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (98)) { */ case 2: - base = 2; - $s = 7; continue; - /* } else if ((_1 === (111)) || (_1 === (79))) { */ case 3: - base = 8; - $s = 7; continue; - /* } else if ((_1 === (100)) || (_1 === (115)) || (_1 === (118))) { */ case 4: - base = 10; - $s = 7; continue; - /* } else if ((_1 === (120)) || (_1 === (88))) { */ case 5: - base = 16; - $s = 7; continue; - /* } else { */ case 6: - _arg = s; - _arg$1 = new $Int32(ch); - _r = x.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$2 = new $String(_r); - _r$1 = fmt.Fprintf(_arg, "%%!%c(big.Int=%s)", new sliceType([_arg$1, _arg$2])); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* } */ case 7: - case 1: - /* */ if (x === ptrType$2.nil) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (x === ptrType$2.nil) { */ case 10: - _r$2 = fmt.Fprint(s, new sliceType([new $String("")])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return; - /* } */ case 11: - sign = ""; - /* */ if (x.neg) { $s = 14; continue; } - _r$3 = s.Flag(43); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 15; continue; } - _r$4 = s.Flag(32); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (x.neg) { */ case 14: - sign = "-"; - $s = 17; continue; - /* } else if (_r$3) { */ case 15: - sign = "+"; - $s = 17; continue; - /* } else if (_r$4) { */ case 16: - sign = " "; - /* } */ case 17: - case 13: - prefix = ""; - _r$5 = s.Flag(35); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_r$5) { */ case 20: - _2 = ch; - if (_2 === (98)) { - prefix = "0b"; - } else if (_2 === (111)) { - prefix = "0"; - } else if (_2 === (120)) { - prefix = "0x"; - } else if (_2 === (88)) { - prefix = "0X"; - } - /* } */ case 21: - if (ch === 79) { - prefix = "0o"; - } - _r$6 = x.abs.utoa(base); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - digits = _r$6; - if (ch === 88) { - _ref = digits; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - d = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (97 <= d && d <= 122) { - ((i < 0 || i >= digits.$length) ? ($throwRuntimeError("index out of range"), undefined) : digits.$array[digits.$offset + i] = (65 + ((d - 97 << 24 >>> 24)) << 24 >>> 24)); - } - _i++; - } - } - left = 0; - zeros = 0; - right = 0; - _r$7 = s.Precision(); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - precision = _tuple[0]; - precisionSet = _tuple[1]; - if (precisionSet) { - if (digits.$length < precision) { - zeros = precision - digits.$length >> 0; - } else if ((digits.$length === 1) && ((0 >= digits.$length ? ($throwRuntimeError("index out of range"), undefined) : digits.$array[digits.$offset + 0]) === 48) && (precision === 0)) { - $s = -1; return; - } - } - length = ((sign.length + prefix.length >> 0) + zeros >> 0) + digits.$length >> 0; - _r$8 = s.Width(); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - width = _tuple$1[0]; - widthSet = _tuple$1[1]; - /* */ if (widthSet && length < width) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (widthSet && length < width) { */ case 26: - d$1 = width - length >> 0; - _r$9 = s.Flag(45); /* */ $s = 33; case 33: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (_r$9) { $s = 29; continue; } - _r$10 = s.Flag(48); /* */ $s = 34; case 34: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if (_r$10 && !precisionSet) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_r$9) { */ case 29: - right = d$1; - $s = 32; continue; - /* } else if (_r$10 && !precisionSet) { */ case 30: - zeros = d$1; - $s = 32; continue; - /* } else { */ case 31: - left = d$1; - /* } */ case 32: - case 28: - /* } */ case 27: - $r = writeMultiple(s, " ", left); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = writeMultiple(s, sign, 1); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = writeMultiple(s, prefix, 1); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = writeMultiple(s, "0", zeros); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$11 = s.Write(digits); /* */ $s = 39; case 39: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $r = writeMultiple(s, " ", right); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Format, $c: true, $r, _1, _2, _arg, _arg$1, _arg$2, _i, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, base, ch, d, d$1, digits, i, left, length, precision, precisionSet, prefix, right, s, sign, width, widthSet, x, zeros, $s};return $f; - }; - Int.prototype.Format = function(s, ch) { return this.$val.Format(s, ch); }; - Int.ptr.prototype.scan = function(r, base) { - var {_r, _r$1, _tuple, _tuple$1, base, err, neg, r, z, $s, $r, $c} = $restore(this, {r, base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = scanSign(r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - neg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, 0, err]; - } - _r$1 = z.abs.scan(r, base, false); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - z.abs = _tuple$1[0]; - base = _tuple$1[1]; - err = _tuple$1[3]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, base, err]; - } - z.neg = z.abs.$length > 0 && neg; - $s = -1; return [z, base, $ifaceNil]; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.scan, $c: true, $r, _r, _r$1, _tuple, _tuple$1, base, err, neg, r, z, $s};return $f; - }; - Int.prototype.scan = function(r, base) { return this.$val.scan(r, base); }; - scanSign = function(r) { - var {_1, _r, _r$1, _tmp, _tmp$1, _tuple, ch, err, neg, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - neg = false; - err = $ifaceNil; - ch = 0; - _r = r.ReadByte(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ch = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = false; - _tmp$1 = err; - neg = _tmp; - err = _tmp$1; - $s = -1; return [neg, err]; - } - _1 = ch; - /* */ if (_1 === (45)) { $s = 3; continue; } - /* */ if (_1 === (43)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (45)) { */ case 3: - neg = true; - $s = 6; continue; - /* } else if (_1 === (43)) { */ case 4: - $s = 6; continue; - /* } else { */ case 5: - _r$1 = r.UnreadByte(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 6: - case 2: - $s = -1; return [neg, err]; - /* */ } return; } var $f = {$blk: scanSign, $c: true, $r, _1, _r, _r$1, _tmp, _tmp$1, _tuple, ch, err, neg, r, $s};return $f; - }; - byteReader.ptr.prototype.ReadByte = function() { - var {_r, _r$1, _tuple, ch, err, r, size, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.ScanState.ReadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ch = _tuple[0]; - size = _tuple[1]; - err = _tuple[2]; - /* */ if (!((size === 1)) && $interfaceIsEqual(err, $ifaceNil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((size === 1)) && $interfaceIsEqual(err, $ifaceNil)) { */ case 2: - _r$1 = fmt.Errorf("invalid rune %#U", new sliceType([new $Int32(ch)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* } */ case 3: - $s = -1; return [((ch << 24 >>> 24)), err]; - /* */ } return; } var $f = {$blk: byteReader.ptr.prototype.ReadByte, $c: true, $r, _r, _r$1, _tuple, ch, err, r, size, $s};return $f; - }; - byteReader.prototype.ReadByte = function() { return this.$val.ReadByte(); }; - byteReader.ptr.prototype.UnreadByte = function() { - var {$24r, _r, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.ScanState.UnreadRune(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: byteReader.ptr.prototype.UnreadByte, $c: true, $r, $24r, _r, r, $s};return $f; - }; - byteReader.prototype.UnreadByte = function() { return this.$val.UnreadByte(); }; - Int.ptr.prototype.Scan = function(s, ch) { - var {_1, _r, _tuple, base, ch, err, s, x, z, $s, $r, $c} = $restore(this, {s, ch}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - $r = s.SkipSpace(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - base = 0; - _1 = ch; - if (_1 === (98)) { - base = 2; - } else if (_1 === (111)) { - base = 8; - } else if (_1 === (100)) { - base = 10; - } else if ((_1 === (120)) || (_1 === (88))) { - base = 16; - } else if ((_1 === (115)) || (_1 === (118))) { - } else { - $s = -1; return errors.New("Int.Scan: invalid verb"); - } - _r = z.scan((x = new byteReader.ptr(s), new x.constructor.elem(x)), base); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[2]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Scan, $c: true, $r, _1, _r, _tuple, base, ch, err, s, x, z, $s};return $f; - }; - Int.prototype.Scan = function(s, ch) { return this.$val.Scan(s, ch); }; - Int.ptr.prototype.Sign = function() { - var x; - x = this; - if (x.abs.$length === 0) { - return 0; - } - if (x.neg) { - return -1; - } - return 1; - }; - Int.prototype.Sign = function() { return this.$val.Sign(); }; - Int.ptr.prototype.SetInt64 = function(x) { - var neg, x, z; - z = this; - neg = false; - if ((x.$high < 0 || (x.$high === 0 && x.$low < 0))) { - neg = true; - x = new $Int64(-x.$high, -x.$low); - } - z.abs = z.abs.setUint64((new $Uint64(x.$high, x.$low))); - z.neg = neg; - return z; - }; - Int.prototype.SetInt64 = function(x) { return this.$val.SetInt64(x); }; - Int.ptr.prototype.SetUint64 = function(x) { - var x, z; - z = this; - z.abs = z.abs.setUint64(x); - z.neg = false; - return z; - }; - Int.prototype.SetUint64 = function(x) { return this.$val.SetUint64(x); }; - NewInt = function(x) { - var x; - return new Int.ptr(false, nat.nil).SetInt64(x); - }; - $pkg.NewInt = NewInt; - Int.ptr.prototype.Set = function(x) { - var x, z; - z = this; - if (!(z === x)) { - z.abs = z.abs.set(x.abs); - z.neg = x.neg; - } - return z; - }; - Int.prototype.Set = function(x) { return this.$val.Set(x); }; - Int.ptr.prototype.Bits = function() { - var x; - x = this; - return $convertSliceType(x.abs, sliceType$2); - }; - Int.prototype.Bits = function() { return this.$val.Bits(); }; - Int.ptr.prototype.SetBits = function(abs) { - var abs, z; - z = this; - z.abs = ($convertSliceType(abs, nat)).norm(); - z.neg = false; - return z; - }; - Int.prototype.SetBits = function(abs) { return this.$val.SetBits(abs); }; - Int.ptr.prototype.Abs = function(x) { - var x, z; - z = this; - z.Set(x); - z.neg = false; - return z; - }; - Int.prototype.Abs = function(x) { return this.$val.Abs(x); }; - Int.ptr.prototype.Neg = function(x) { - var x, z; - z = this; - z.Set(x); - z.neg = z.abs.$length > 0 && !z.neg; - return z; - }; - Int.prototype.Neg = function(x) { return this.$val.Neg(x); }; - Int.ptr.prototype.Add = function(x, y) { - var {_r, _r$1, _r$2, neg, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - neg = x.neg; - /* */ if (x.neg === y.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg === y.neg) { */ case 1: - _r = z.abs.add(x.abs, y.abs); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - $s = 3; continue; - /* } else { */ case 2: - /* */ if (x.abs.cmp(y.abs) >= 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (x.abs.cmp(y.abs) >= 0) { */ case 5: - _r$1 = z.abs.sub(x.abs, y.abs); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - $s = 7; continue; - /* } else { */ case 6: - neg = !neg; - _r$2 = z.abs.sub(y.abs, x.abs); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z.abs = _r$2; - /* } */ case 7: - /* } */ case 3: - z.neg = z.abs.$length > 0 && neg; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Add, $c: true, $r, _r, _r$1, _r$2, neg, x, y, z, $s};return $f; - }; - Int.prototype.Add = function(x, y) { return this.$val.Add(x, y); }; - Int.ptr.prototype.Sub = function(x, y) { - var {_r, _r$1, _r$2, neg, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - neg = x.neg; - /* */ if (!(x.neg === y.neg)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(x.neg === y.neg)) { */ case 1: - _r = z.abs.add(x.abs, y.abs); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - $s = 3; continue; - /* } else { */ case 2: - /* */ if (x.abs.cmp(y.abs) >= 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (x.abs.cmp(y.abs) >= 0) { */ case 5: - _r$1 = z.abs.sub(x.abs, y.abs); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - $s = 7; continue; - /* } else { */ case 6: - neg = !neg; - _r$2 = z.abs.sub(y.abs, x.abs); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z.abs = _r$2; - /* } */ case 7: - /* } */ case 3: - z.neg = z.abs.$length > 0 && neg; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Sub, $c: true, $r, _r, _r$1, _r$2, neg, x, y, z, $s};return $f; - }; - Int.prototype.Sub = function(x, y) { return this.$val.Sub(x, y); }; - Int.ptr.prototype.Mul = function(x, y) { - var {_r, _r$1, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x === y) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x === y) { */ case 1: - _r = z.abs.sqr(x.abs); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - z.neg = false; - $s = -1; return z; - /* } */ case 2: - _r$1 = z.abs.mul(x.abs, y.abs); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - z.neg = z.abs.$length > 0 && !(x.neg === y.neg); - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Mul, $c: true, $r, _r, _r$1, x, y, z, $s};return $f; - }; - Int.prototype.Mul = function(x, y) { return this.$val.Mul(x, y); }; - Int.ptr.prototype.MulRange = function(a, b) { - var {_r, _tmp, _tmp$1, a, b, neg, x, x$1, z, $s, $r, $c} = $restore(this, {a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if ((a.$high > b.$high || (a.$high === b.$high && a.$low > b.$low))) { - $s = -1; return z.SetInt64(new $Int64(0, 1)); - } else if ((a.$high < 0 || (a.$high === 0 && a.$low <= 0)) && (b.$high > 0 || (b.$high === 0 && b.$low >= 0))) { - $s = -1; return z.SetInt64(new $Int64(0, 0)); - } - neg = false; - if ((a.$high < 0 || (a.$high === 0 && a.$low < 0))) { - neg = (x = (x$1 = new $Int64(b.$high - a.$high, b.$low - a.$low), new $Int64(x$1.$high & 0, (x$1.$low & 1) >>> 0)), (x.$high === 0 && x.$low === 0)); - _tmp = new $Int64(-b.$high, -b.$low); - _tmp$1 = new $Int64(-a.$high, -a.$low); - a = _tmp; - b = _tmp$1; - } - _r = z.abs.mulRange((new $Uint64(a.$high, a.$low)), (new $Uint64(b.$high, b.$low))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - z.neg = neg; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.MulRange, $c: true, $r, _r, _tmp, _tmp$1, a, b, neg, x, x$1, z, $s};return $f; - }; - Int.prototype.MulRange = function(a, b) { return this.$val.MulRange(a, b); }; - Int.ptr.prototype.Binomial = function(n, k) { - var {$24r, _r, _r$1, _r$2, _tmp, _tmp$1, a, b, k, n, x, x$1, z, $s, $r, $c} = $restore(this, {n, k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - b = [b]; - z = this; - if ((x = $div64(n, new $Int64(0, 2), false), (x.$high < k.$high || (x.$high === k.$high && x.$low < k.$low))) && (k.$high < n.$high || (k.$high === n.$high && k.$low <= n.$low))) { - k = new $Int64(n.$high - k.$high, n.$low - k.$low); - } - _tmp = new Int.ptr(false, nat.nil); - _tmp$1 = new Int.ptr(false, nat.nil); - a[0] = $clone(_tmp, Int); - b[0] = $clone(_tmp$1, Int); - _r = a[0].MulRange((x$1 = new $Int64(n.$high - k.$high, n.$low - k.$low), new $Int64(x$1.$high + 0, x$1.$low + 1)), n); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _r$1 = b[0].MulRange(new $Int64(0, 1), k); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = z.Quo(a[0], b[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Binomial, $c: true, $r, $24r, _r, _r$1, _r$2, _tmp, _tmp$1, a, b, k, n, x, x$1, z, $s};return $f; - }; - Int.prototype.Binomial = function(n, k) { return this.$val.Binomial(n, k); }; - Int.ptr.prototype.Quo = function(x, y) { - var {_r, _tuple, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.abs.div(nat.nil, x.abs, y.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - z.abs = _tuple[0]; - z.neg = z.abs.$length > 0 && !(x.neg === y.neg); - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Quo, $c: true, $r, _r, _tuple, x, y, z, $s};return $f; - }; - Int.prototype.Quo = function(x, y) { return this.$val.Quo(x, y); }; - Int.ptr.prototype.Rem = function(x, y) { - var {_r, _tuple, x, y, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = (nat.nil).div(z.abs, x.abs, y.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - z.abs = _tuple[1]; - z.neg = z.abs.$length > 0 && x.neg; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Rem, $c: true, $r, _r, _tuple, x, y, z, $s};return $f; - }; - Int.prototype.Rem = function(x, y) { return this.$val.Rem(x, y); }; - Int.ptr.prototype.QuoRem = function(x, y, r) { - var {_r, _tmp, _tmp$1, _tuple, r, x, y, z, $s, $r, $c} = $restore(this, {x, y, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.abs.div(r.abs, x.abs, y.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - z.abs = _tuple[0]; - r.abs = _tuple[1]; - _tmp = z.abs.$length > 0 && !(x.neg === y.neg); - _tmp$1 = r.abs.$length > 0 && x.neg; - z.neg = _tmp; - r.neg = _tmp$1; - $s = -1; return [z, r]; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.QuoRem, $c: true, $r, _r, _tmp, _tmp$1, _tuple, r, x, y, z, $s};return $f; - }; - Int.prototype.QuoRem = function(x, y, r) { return this.$val.QuoRem(x, y, r); }; - Int.ptr.prototype.Div = function(x, y) { - var {_r, _r$1, _r$2, r, x, y, y_neg, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = [r]; - z = this; - y_neg = y.neg; - r[0] = new Int.ptr(false, nat.nil); - _r = z.QuoRem(x, y, r[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* */ if (r[0].neg) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (r[0].neg) { */ case 2: - /* */ if (y_neg) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (y_neg) { */ case 4: - _r$1 = z.Add(z, intOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = 6; continue; - /* } else { */ case 5: - _r$2 = z.Sub(z, intOne); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 6: - /* } */ case 3: - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Div, $c: true, $r, _r, _r$1, _r$2, r, x, y, y_neg, z, $s};return $f; - }; - Int.prototype.Div = function(x, y) { return this.$val.Div(x, y); }; - Int.ptr.prototype.Mod = function(x, y) { - var {_r, _r$1, _r$2, q, x, y, y0, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - y0 = y; - if (z === y || alias(z.abs, y.abs)) { - y0 = new Int.ptr(false, nat.nil).Set(y); - } - q = new Int.ptr(false, nat.nil); - _r = q.QuoRem(x, y, z); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* */ if (z.neg) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (z.neg) { */ case 2: - /* */ if (y0.neg) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (y0.neg) { */ case 4: - _r$1 = z.Sub(z, y0); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = 6; continue; - /* } else { */ case 5: - _r$2 = z.Add(z, y0); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 6: - /* } */ case 3: - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Mod, $c: true, $r, _r, _r$1, _r$2, q, x, y, y0, z, $s};return $f; - }; - Int.prototype.Mod = function(x, y) { return this.$val.Mod(x, y); }; - Int.ptr.prototype.DivMod = function(x, y, m) { - var {_r, _r$1, _r$2, _r$3, _r$4, m, x, y, y0, z, $s, $r, $c} = $restore(this, {x, y, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - y0 = y; - if (z === y || alias(z.abs, y.abs)) { - y0 = new Int.ptr(false, nat.nil).Set(y); - } - _r = z.QuoRem(x, y, m); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* */ if (m.neg) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (m.neg) { */ case 2: - /* */ if (y0.neg) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (y0.neg) { */ case 4: - _r$1 = z.Add(z, intOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = m.Sub(m, y0); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = 6; continue; - /* } else { */ case 5: - _r$3 = z.Sub(z, intOne); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = m.Add(m, y0); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 6: - /* } */ case 3: - $s = -1; return [z, m]; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.DivMod, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, m, x, y, y0, z, $s};return $f; - }; - Int.prototype.DivMod = function(x, y, m) { return this.$val.DivMod(x, y, m); }; - Int.ptr.prototype.Cmp = function(y) { - var r, x, y; - r = 0; - x = this; - if (x === y) { - } else if (x.neg === y.neg) { - r = x.abs.cmp(y.abs); - if (x.neg) { - r = -r; - } - } else if (x.neg) { - r = -1; - } else { - r = 1; - } - return r; - }; - Int.prototype.Cmp = function(y) { return this.$val.Cmp(y); }; - Int.ptr.prototype.CmpAbs = function(y) { - var x, y; - x = this; - return x.abs.cmp(y.abs); - }; - Int.prototype.CmpAbs = function(y) { return this.$val.CmpAbs(y); }; - low64 = function(x) { - var v, x, x$1, x$2, x$3; - if (x.$length === 0) { - return new $Uint64(0, 0); - } - v = ((x$1 = (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]), new $Uint64(0, x$1.constructor === Number ? x$1 : 1))); - if (true && x.$length > 1) { - return (x$2 = $shiftLeft64(((x$3 = (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1]), new $Uint64(0, x$3.constructor === Number ? x$3 : 1))), 32), new $Uint64(x$2.$high | v.$high, (x$2.$low | v.$low) >>> 0)); - } - return v; - }; - Int.ptr.prototype.Int64 = function() { - var v, x, x$1; - x = this; - v = ((x$1 = low64(x.abs), new $Int64(x$1.$high, x$1.$low))); - if (x.neg) { - v = new $Int64(-v.$high, -v.$low); - } - return v; - }; - Int.prototype.Int64 = function() { return this.$val.Int64(); }; - Int.ptr.prototype.Uint64 = function() { - var x; - x = this; - return low64(x.abs); - }; - Int.prototype.Uint64 = function() { return this.$val.Uint64(); }; - Int.ptr.prototype.IsInt64 = function() { - var w, x, x$1, x$2; - x = this; - if (x.abs.$length <= 2) { - w = ((x$1 = low64(x.abs), new $Int64(x$1.$high, x$1.$low))); - return (w.$high > 0 || (w.$high === 0 && w.$low >= 0)) || x.neg && (x$2 = new $Int64(-w.$high, -w.$low), (w.$high === x$2.$high && w.$low === x$2.$low)); - } - return false; - }; - Int.prototype.IsInt64 = function() { return this.$val.IsInt64(); }; - Int.ptr.prototype.IsUint64 = function() { - var x; - x = this; - return !x.neg && x.abs.$length <= 2; - }; - Int.prototype.IsUint64 = function() { return this.$val.IsUint64(); }; - Int.ptr.prototype.SetString = function(s, base) { - var {$24r, _r, base, s, z, $s, $r, $c} = $restore(this, {s, base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.setFromScanner(strings.NewReader(s), base); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.SetString, $c: true, $r, $24r, _r, base, s, z, $s};return $f; - }; - Int.prototype.SetString = function(s, base) { return this.$val.SetString(s, base); }; - Int.ptr.prototype.setFromScanner = function(r, base) { - var {_r, _r$1, _tuple, _tuple$1, base, err, err$1, r, z, $s, $r, $c} = $restore(this, {r, base}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = z.scan(r, base); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, false]; - } - _r$1 = r.ReadByte(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, io.EOF))) { - $s = -1; return [ptrType$2.nil, false]; - } - $s = -1; return [z, true]; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.setFromScanner, $c: true, $r, _r, _r$1, _tuple, _tuple$1, base, err, err$1, r, z, $s};return $f; - }; - Int.prototype.setFromScanner = function(r, base) { return this.$val.setFromScanner(r, base); }; - Int.ptr.prototype.SetBytes = function(buf) { - var buf, z; - z = this; - z.abs = z.abs.setBytes(buf); - z.neg = false; - return z; - }; - Int.prototype.SetBytes = function(buf) { return this.$val.SetBytes(buf); }; - Int.ptr.prototype.Bytes = function() { - var buf, x; - x = this; - buf = $makeSlice(sliceType$1, ($imul(x.abs.$length, 4))); - return $subslice(buf, x.abs.bytes(buf)); - }; - Int.prototype.Bytes = function() { return this.$val.Bytes(); }; - Int.ptr.prototype.FillBytes = function(buf) { - var _i, _ref, buf, i, x; - x = this; - _ref = buf; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + i] = 0); - _i++; - } - x.abs.bytes(buf); - return buf; - }; - Int.prototype.FillBytes = function(buf) { return this.$val.FillBytes(buf); }; - Int.ptr.prototype.BitLen = function() { - var x; - x = this; - return x.abs.bitLen(); - }; - Int.prototype.BitLen = function() { return this.$val.BitLen(); }; - Int.ptr.prototype.TrailingZeroBits = function() { - var x; - x = this; - return x.abs.trailingZeroBits(); - }; - Int.prototype.TrailingZeroBits = function() { return this.$val.TrailingZeroBits(); }; - Int.ptr.prototype.Exp = function(x, y, m) { - var {_r, _r$1, _r$2, inverse, m, mWords, x, xWords, y, yWords, z, $s, $r, $c} = $restore(this, {x, y, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - xWords = x.abs; - /* */ if (y.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (y.neg) { */ case 1: - if (m === ptrType$2.nil || (m.abs.$length === 0)) { - $s = -1; return z.SetInt64(new $Int64(0, 1)); - } - _r = new Int.ptr(false, nat.nil).ModInverse(x, m); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - inverse = _r; - if (inverse === ptrType$2.nil) { - $s = -1; return ptrType$2.nil; - } - xWords = inverse.abs; - /* } */ case 2: - yWords = y.abs; - mWords = nat.nil; - if (!(m === ptrType$2.nil)) { - mWords = m.abs; - } - _r$1 = z.abs.expNN(xWords, yWords, mWords); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - z.neg = z.abs.$length > 0 && x.neg && yWords.$length > 0 && ((((0 >= yWords.$length ? ($throwRuntimeError("index out of range"), undefined) : yWords.$array[yWords.$offset + 0]) & 1) >>> 0) === 1); - /* */ if (z.neg && mWords.$length > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (z.neg && mWords.$length > 0) { */ case 5: - _r$2 = z.abs.sub(mWords, z.abs); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z.abs = _r$2; - z.neg = false; - /* } */ case 6: - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Exp, $c: true, $r, _r, _r$1, _r$2, inverse, m, mWords, x, xWords, y, yWords, z, $s};return $f; - }; - Int.prototype.Exp = function(x, y, m) { return this.$val.Exp(x, y, m); }; - Int.ptr.prototype.GCD = function(x, y, a, b) { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, lenA, lenB, negA, negB, x, y, z, $s, $r, $c} = $restore(this, {x, y, a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if ((a.abs.$length === 0) || (b.abs.$length === 0)) { - _tmp = a.abs.$length; - _tmp$1 = b.abs.$length; - _tmp$2 = a.neg; - _tmp$3 = b.neg; - lenA = _tmp; - lenB = _tmp$1; - negA = _tmp$2; - negB = _tmp$3; - if (lenA === 0) { - z.Set(b); - } else { - z.Set(a); - } - z.neg = false; - if (!(x === ptrType$2.nil)) { - if (lenA === 0) { - x.SetUint64(new $Uint64(0, 0)); - } else { - x.SetUint64(new $Uint64(0, 1)); - x.neg = negA; - } - } - if (!(y === ptrType$2.nil)) { - if (lenB === 0) { - y.SetUint64(new $Uint64(0, 0)); - } else { - y.SetUint64(new $Uint64(0, 1)); - y.neg = negB; - } - } - $s = -1; return z; - } - _r = z.lehmerGCD(x, y, a, b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.GCD, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, lenA, lenB, negA, negB, x, y, z, $s};return $f; - }; - Int.prototype.GCD = function(x, y, a, b) { return this.$val.GCD(x, y, a, b); }; - lehmerSimulate = function(A, B) { - var A, B, _q, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a1, a2, even, h, m, n, q, r, u0, u1, u2, v0, v1, v2, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1, y$2, y$3, y$4; - u0 = 0; - u1 = 0; - v0 = 0; - v1 = 0; - even = false; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = 0; - a1 = _tmp; - a2 = _tmp$1; - u2 = _tmp$2; - v2 = _tmp$3; - m = B.abs.$length; - n = A.abs.$length; - h = nlz((x = A.abs, x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1]))); - a1 = (((y = h, y < 32 ? ((x$2 = A.abs, x$3 = n - 1 >> 0, ((x$3 < 0 || x$3 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + x$3])) << y) : 0) >>> 0) | ((y$1 = ((32 - h >>> 0)), y$1 < 32 ? ((x$4 = A.abs, x$5 = n - 2 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])) >>> y$1) : 0) >>> 0)) >>> 0; - if ((n === m)) { - a2 = (((y$2 = h, y$2 < 32 ? ((x$6 = B.abs, x$7 = n - 1 >> 0, ((x$7 < 0 || x$7 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$7])) << y$2) : 0) >>> 0) | ((y$3 = ((32 - h >>> 0)), y$3 < 32 ? ((x$8 = B.abs, x$9 = n - 2 >> 0, ((x$9 < 0 || x$9 >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + x$9])) >>> y$3) : 0) >>> 0)) >>> 0; - } else if ((n === (m + 1 >> 0))) { - a2 = (y$4 = ((32 - h >>> 0)), y$4 < 32 ? ((x$10 = B.abs, x$11 = n - 2 >> 0, ((x$11 < 0 || x$11 >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + x$11])) >>> y$4) : 0) >>> 0; - } else { - a2 = 0; - } - even = false; - _tmp$4 = 0; - _tmp$5 = 1; - _tmp$6 = 0; - u0 = _tmp$4; - u1 = _tmp$5; - u2 = _tmp$6; - _tmp$7 = 0; - _tmp$8 = 0; - _tmp$9 = 1; - v0 = _tmp$7; - v1 = _tmp$8; - v2 = _tmp$9; - while (true) { - if (!(a2 >= v2 && (a1 - a2 >>> 0) >= (v1 + v2 >>> 0))) { break; } - _tmp$10 = (_q = a1 / a2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - _tmp$11 = (_r = a1 % a2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - q = _tmp$10; - r = _tmp$11; - _tmp$12 = a2; - _tmp$13 = r; - a1 = _tmp$12; - a2 = _tmp$13; - _tmp$14 = u1; - _tmp$15 = u2; - _tmp$16 = u1 + ($imul(q, u2) >>> 0) >>> 0; - u0 = _tmp$14; - u1 = _tmp$15; - u2 = _tmp$16; - _tmp$17 = v1; - _tmp$18 = v2; - _tmp$19 = v1 + ($imul(q, v2) >>> 0) >>> 0; - v0 = _tmp$17; - v1 = _tmp$18; - v2 = _tmp$19; - even = !even; - } - return [u0, u1, v0, v1, even]; - }; - lehmerUpdate = function(A, B, q, r, s, t, u0, u1, v0, v1, even) { - var {A, B, _r, _r$1, _r$2, _r$3, _r$4, _r$5, even, q, r, s, t, u0, u1, v0, v1, $s, $r, $c} = $restore(this, {A, B, q, r, s, t, u0, u1, v0, v1, even}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t.abs = t.abs.setWord(u0); - s.abs = s.abs.setWord(v0); - t.neg = !even; - s.neg = even; - _r = t.Mul(A, t); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _r$1 = s.Mul(B, s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - r.abs = r.abs.setWord(u1); - q.abs = q.abs.setWord(v1); - r.neg = even; - q.neg = !even; - _r$2 = r.Mul(A, r); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = q.Mul(B, q); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = A.Add(t, s); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = B.Add(r, q); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return; - /* */ } return; } var $f = {$blk: lehmerUpdate, $c: true, $r, A, B, _r, _r$1, _r$2, _r$3, _r$4, _r$5, even, q, r, s, t, u0, u1, v0, v1, $s};return $f; - }; - euclidUpdate = function(A, B, Ua, Ub, q, r, s, t, extended) { - var {A, B, Ua, Ub, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tuple, extended, q, r, s, t, $s, $r, $c} = $restore(this, {A, B, Ua, Ub, q, r, s, t, extended}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = q.QuoRem(A, B, r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - q = _tuple[0]; - r = _tuple[1]; - _tmp = $clone(B, Int); - _tmp$1 = $clone(r, Int); - _tmp$2 = $clone(A, Int); - Int.copy(A, _tmp); - Int.copy(B, _tmp$1); - Int.copy(r, _tmp$2); - /* */ if (extended) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (extended) { */ case 2: - t.Set(Ub); - _r$1 = s.Mul(Ub, q); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = Ub.Sub(Ua, s); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - Ua.Set(t); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: euclidUpdate, $c: true, $r, A, B, Ua, Ub, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tuple, extended, q, r, s, t, $s};return $f; - }; - Int.ptr.prototype.lehmerGCD = function(x, y, a, b) { - var {A, B, Ua, Ub, _q, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, a, aWord, b, bWord, even, even$1, extended, negA, q, q$1, r, r$1, s, t, u0, u1, ua, ub, v0, v1, va, vb, x, x$1, x$2, x$3, y, z, $s, $r, $c} = $restore(this, {x, y, a, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _tmp = ptrType$2.nil; - _tmp$1 = ptrType$2.nil; - _tmp$2 = ptrType$2.nil; - _tmp$3 = ptrType$2.nil; - A = _tmp; - B = _tmp$1; - Ua = _tmp$2; - Ub = _tmp$3; - A = new Int.ptr(false, nat.nil).Abs(a); - B = new Int.ptr(false, nat.nil).Abs(b); - extended = !(x === ptrType$2.nil) || !(y === ptrType$2.nil); - if (extended) { - Ua = new Int.ptr(false, nat.nil).SetInt64(new $Int64(0, 1)); - Ub = new Int.ptr(false, nat.nil); - } - q = new Int.ptr(false, nat.nil); - r = new Int.ptr(false, nat.nil); - s = new Int.ptr(false, nat.nil); - t = new Int.ptr(false, nat.nil); - if (A.abs.cmp(B.abs) < 0) { - _tmp$4 = B; - _tmp$5 = A; - A = _tmp$4; - B = _tmp$5; - _tmp$6 = Ua; - _tmp$7 = Ub; - Ub = _tmp$6; - Ua = _tmp$7; - } - /* while (true) { */ case 1: - /* if (!(B.abs.$length > 1)) { break; } */ if(!(B.abs.$length > 1)) { $s = 2; continue; } - _tuple = lehmerSimulate(A, B); - u0 = _tuple[0]; - u1 = _tuple[1]; - v0 = _tuple[2]; - v1 = _tuple[3]; - even = _tuple[4]; - /* */ if (!((v0 === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((v0 === 0))) { */ case 3: - $r = lehmerUpdate(A, B, q, r, s, t, u0, u1, v0, v1, even); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (extended) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (extended) { */ case 7: - $r = lehmerUpdate(Ua, Ub, q, r, s, t, u0, u1, v0, v1, even); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = 5; continue; - /* } else { */ case 4: - $r = euclidUpdate(A, B, Ua, Ub, q, r, s, t, extended); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = 1; continue; - case 2: - /* */ if (B.abs.$length > 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (B.abs.$length > 0) { */ case 11: - /* */ if (A.abs.$length > 1) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (A.abs.$length > 1) { */ case 13: - $r = euclidUpdate(A, B, Ua, Ub, q, r, s, t, extended); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - /* */ if (B.abs.$length > 0) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (B.abs.$length > 0) { */ case 16: - _tmp$8 = (x$1 = A.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - _tmp$9 = (x$2 = B.abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])); - aWord = _tmp$8; - bWord = _tmp$9; - /* */ if (extended) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (extended) { */ case 18: - _tmp$10 = 0; - _tmp$11 = 0; - _tmp$12 = 0; - _tmp$13 = 0; - ua = _tmp$10; - ub = _tmp$11; - va = _tmp$12; - vb = _tmp$13; - _tmp$14 = 1; - _tmp$15 = 0; - ua = _tmp$14; - ub = _tmp$15; - _tmp$16 = 0; - _tmp$17 = 1; - va = _tmp$16; - vb = _tmp$17; - even$1 = true; - while (true) { - if (!(!((bWord === 0)))) { break; } - _tmp$18 = (_q = aWord / bWord, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - _tmp$19 = (_r = aWord % bWord, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - q$1 = _tmp$18; - r$1 = _tmp$19; - _tmp$20 = bWord; - _tmp$21 = r$1; - aWord = _tmp$20; - bWord = _tmp$21; - _tmp$22 = ub; - _tmp$23 = ua + ($imul(q$1, ub) >>> 0) >>> 0; - ua = _tmp$22; - ub = _tmp$23; - _tmp$24 = vb; - _tmp$25 = va + ($imul(q$1, vb) >>> 0) >>> 0; - va = _tmp$24; - vb = _tmp$25; - even$1 = !even$1; - } - t.abs = t.abs.setWord(ua); - s.abs = s.abs.setWord(va); - t.neg = !even$1; - s.neg = even$1; - _r$1 = t.Mul(Ua, t); /* */ $s = 21; case 21: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = s.Mul(Ub, s); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = Ua.Add(t, s); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 20; continue; - /* } else { */ case 19: - while (true) { - if (!(!((bWord === 0)))) { break; } - _tmp$26 = bWord; - _tmp$27 = (_r$4 = aWord % bWord, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")); - aWord = _tmp$26; - bWord = _tmp$27; - } - /* } */ case 20: - (x$3 = A.abs, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0] = aWord)); - /* } */ case 17: - /* } */ case 12: - negA = a.neg; - /* */ if (!(y === ptrType$2.nil)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!(y === ptrType$2.nil)) { */ case 24: - if (y === b) { - B.Set(b); - } else { - B = b; - } - _r$5 = y.Mul(a, Ua); /* */ $s = 26; case 26: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - if (negA) { - y.neg = !y.neg; - } - _r$6 = y.Sub(A, y); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = y.Div(y, B); /* */ $s = 28; case 28: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 25: - if (!(x === ptrType$2.nil)) { - Int.copy(x, Ua); - if (negA) { - x.neg = !x.neg; - } - } - Int.copy(z, A); - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.lehmerGCD, $c: true, $r, A, B, Ua, Ub, _q, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, a, aWord, b, bWord, even, even$1, extended, negA, q, q$1, r, r$1, s, t, u0, u1, ua, ub, v0, v1, va, vb, x, x$1, x$2, x$3, y, z, $s};return $f; - }; - Int.prototype.lehmerGCD = function(x, y, a, b) { return this.$val.lehmerGCD(x, y, a, b); }; - Int.ptr.prototype.Rand = function(rnd, n) { - var {_r, n, rnd, z, $s, $r, $c} = $restore(this, {rnd, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - z.neg = false; - if (n.neg || (n.abs.$length === 0)) { - z.abs = nat.nil; - $s = -1; return z; - } - _r = z.abs.random(rnd, n.abs, n.abs.bitLen()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Rand, $c: true, $r, _r, n, rnd, z, $s};return $f; - }; - Int.prototype.Rand = function(rnd, n) { return this.$val.Rand(rnd, n); }; - Int.ptr.prototype.ModInverse = function(g, n) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, d, g, g2, n, n2, x, z, $s, $r, $c} = $restore(this, {g, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = [x]; - z = this; - if (n.neg) { - n2 = new Int.ptr(false, nat.nil); - n = n2.Neg(n); - } - /* */ if (g.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (g.neg) { */ case 1: - g2 = new Int.ptr(false, nat.nil); - _r = g2.Mod(g, n); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - g = _r; - /* } */ case 2: - _tmp = new Int.ptr(false, nat.nil); - _tmp$1 = new Int.ptr(false, nat.nil); - d = $clone(_tmp, Int); - x[0] = $clone(_tmp$1, Int); - _r$1 = d.GCD(x[0], ptrType$2.nil, g, n); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - if (!((d.Cmp(intOne) === 0))) { - $s = -1; return ptrType$2.nil; - } - /* */ if (x[0].neg) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (x[0].neg) { */ case 5: - _r$2 = z.Add(x[0], n); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = 7; continue; - /* } else { */ case 6: - z.Set(x[0]); - /* } */ case 7: - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.ModInverse, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, d, g, g2, n, n2, x, z, $s};return $f; - }; - Int.prototype.ModInverse = function(g, n) { return this.$val.ModInverse(g, n); }; - Jacobi = function(x, y) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, a, b, bmod8, c, j, s, x, x$1, x$2, x$3, x$4, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = [a]; - b = [b]; - c = [c]; - /* */ if ((y.abs.$length === 0) || ((((x$1 = y.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) & 1) >>> 0) === 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((y.abs.$length === 0) || ((((x$1 = y.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) & 1) >>> 0) === 0)) { */ case 1: - _r = fmt.Sprintf("big: invalid 2nd argument to Int.Jacobi: need odd integer but got %s", new sliceType([y])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 2: - _tmp = new Int.ptr(false, nat.nil); - _tmp$1 = new Int.ptr(false, nat.nil); - _tmp$2 = new Int.ptr(false, nat.nil); - a[0] = $clone(_tmp, Int); - b[0] = $clone(_tmp$1, Int); - c[0] = $clone(_tmp$2, Int); - a[0].Set(x); - b[0].Set(y); - j = 1; - if (b[0].neg) { - if (a[0].neg) { - j = -1; - } - b[0].neg = false; - } - /* while (true) { */ case 4: - if (b[0].Cmp(intOne) === 0) { - $s = -1; return j; - } - if (a[0].abs.$length === 0) { - $s = -1; return 0; - } - _r$1 = a[0].Mod(a[0], b[0]); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - if (a[0].abs.$length === 0) { - $s = -1; return 0; - } - s = a[0].abs.trailingZeroBits(); - if (!((((s & 1) >>> 0) === 0))) { - bmod8 = ((x$2 = b[0].abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) & 7) >>> 0; - if ((bmod8 === 3) || (bmod8 === 5)) { - j = -j; - } - } - _r$2 = c[0].Rsh(a[0], s); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - if (((((x$3 = b[0].abs, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) & 3) >>> 0) === 3) && ((((x$4 = c[0].abs, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])) & 3) >>> 0) === 3)) { - j = -j; - } - a[0].Set(b[0]); - b[0].Set(c[0]); - $s = 4; continue; - case 5: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Jacobi, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, a, b, bmod8, c, j, s, x, x$1, x$2, x$3, x$4, y, $s};return $f; - }; - $pkg.Jacobi = Jacobi; - Int.ptr.prototype.modSqrt3Mod4Prime = function(x, p) { - var {_r, _r$1, _r$2, e, p, x, z, $s, $r, $c} = $restore(this, {x, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = new Int.ptr(false, nat.nil).Add(p, intOne); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - e = _r; - _r$1 = e.Rsh(e, 2); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = z.Exp(x, e, p); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.modSqrt3Mod4Prime, $c: true, $r, _r, _r$1, _r$2, e, p, x, z, $s};return $f; - }; - Int.prototype.modSqrt3Mod4Prime = function(x, p) { return this.$val.modSqrt3Mod4Prime(x, p); }; - Int.ptr.prototype.modSqrt5Mod8Prime = function(x, p) { - var {_r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, alpha, beta, e, p, tx, x, z, $s, $r, $c} = $restore(this, {x, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = new Int.ptr(false, nat.nil).Rsh(p, 3); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - e = _r; - tx = new Int.ptr(false, nat.nil).Lsh(x, 1); - _r$1 = new Int.ptr(false, nat.nil).Exp(tx, e, p); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - alpha = _r$1; - _r$2 = new Int.ptr(false, nat.nil).Mul(alpha, alpha); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - beta = _r$2; - _r$3 = beta.Mod(beta, p); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = beta.Mul(beta, tx); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = beta.Mod(beta, p); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = beta.Sub(beta, intOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = beta.Mul(beta, x); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = beta.Mod(beta, p); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = beta.Mul(beta, alpha); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = z.Mod(beta, p); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.modSqrt5Mod8Prime, $c: true, $r, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, alpha, beta, e, p, tx, x, z, $s};return $f; - }; - Int.prototype.modSqrt5Mod8Prime = function(x, p) { return this.$val.modSqrt5Mod8Prime(x, p); }; - Int.ptr.prototype.modSqrtTonelliShanks = function(x, p) { - var {_r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, b, e, g, m, n, p, r, s, t, x, y, z, $s, $r, $c} = $restore(this, {x, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - g = [g]; - n = [n]; - s = [s]; - t = [t]; - y = [y]; - z = this; - s[0] = new Int.ptr(false, nat.nil); - _r = s[0].Sub(p, intOne); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - e = s[0].abs.trailingZeroBits(); - _r$1 = s[0].Rsh(s[0], e); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - n[0] = new Int.ptr(false, nat.nil); - n[0].SetInt64(new $Int64(0, 2)); - /* while (true) { */ case 3: - _r$2 = Jacobi(n[0], p); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* if (!(!((_r$2 === -1)))) { break; } */ if(!(!((_r$2 === -1)))) { $s = 4; continue; } - _r$3 = n[0].Add(n[0], intOne); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 3; continue; - case 4: - _tmp = new Int.ptr(false, nat.nil); - _tmp$1 = new Int.ptr(false, nat.nil); - _tmp$2 = new Int.ptr(false, nat.nil); - _tmp$3 = new Int.ptr(false, nat.nil); - y[0] = $clone(_tmp, Int); - b[0] = $clone(_tmp$1, Int); - g[0] = $clone(_tmp$2, Int); - t[0] = $clone(_tmp$3, Int); - _r$4 = y[0].Add(s[0], intOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = y[0].Rsh(y[0], 1); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = y[0].Exp(x, y[0], p); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = b[0].Exp(x, s[0], p); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = g[0].Exp(n[0], s[0], p); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - r = e; - /* while (true) { */ case 12: - m = 0; - t[0].Set(b[0]); - /* while (true) { */ case 14: - /* if (!(!((t[0].Cmp(intOne) === 0)))) { break; } */ if(!(!((t[0].Cmp(intOne) === 0)))) { $s = 15; continue; } - _r$9 = t[0].Mul(t[0], t[0]); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = _r$9.Mod(t[0], p); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - m = m + (1) >>> 0; - $s = 14; continue; - case 15: - if (m === 0) { - $s = -1; return z.Set(y[0]); - } - _r$11 = t[0].SetInt64(new $Int64(0, 0)).SetBit(t[0], ((((r - m >>> 0) - 1 >>> 0) >> 0)), 1); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = _r$11.Exp(g[0], t[0], p); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = g[0].Mul(t[0], t[0]); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = _r$13.Mod(g[0], p); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = y[0].Mul(y[0], t[0]); /* */ $s = 22; case 22: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.Mod(y[0], p); /* */ $s = 23; case 23: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = b[0].Mul(b[0], g[0]); /* */ $s = 24; case 24: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = _r$17.Mod(b[0], p); /* */ $s = 25; case 25: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - r = m; - $s = 12; continue; - case 13: - $s = -1; return ptrType$2.nil; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.modSqrtTonelliShanks, $c: true, $r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, b, e, g, m, n, p, r, s, t, x, y, z, $s};return $f; - }; - Int.prototype.modSqrtTonelliShanks = function(x, p) { return this.$val.modSqrtTonelliShanks(x, p); }; - Int.ptr.prototype.ModSqrt = function(x, p) { - var {$24r, $24r$1, $24r$2, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, p, x, x$1, x$2, z, $s, $r, $c} = $restore(this, {x, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - _r = Jacobi(x, p); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _1 = _r; - if (_1 === (-1)) { - $s = -1; return ptrType$2.nil; - } else if (_1 === (0)) { - $s = -1; return z.SetInt64(new $Int64(0, 0)); - } else if (_1 === (1)) { - /* break; */ $s = 1; continue; - } - case 1: - /* */ if (x.neg || x.Cmp(p) >= 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (x.neg || x.Cmp(p) >= 0) { */ case 3: - _r$1 = new Int.ptr(false, nat.nil).Mod(x, p); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - x = _r$1; - /* } */ case 4: - /* */ if (((_r$2 = (x$1 = p.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) % 4, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 3)) { $s = 7; continue; } - /* */ if (((_r$3 = (x$2 = p.abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) % 8, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 5)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (((_r$2 = (x$1 = p.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) % 4, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) === 3)) { */ case 7: - _r$4 = z.modSqrt3Mod4Prime(x, p); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 12; case 12: return $24r; - /* } else if (((_r$3 = (x$2 = p.abs, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])) % 8, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero")) === 5)) { */ case 8: - _r$5 = z.modSqrt5Mod8Prime(x, p); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = _r$5; - $s = 14; case 14: return $24r$1; - /* } else { */ case 9: - _r$6 = z.modSqrtTonelliShanks(x, p); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$2 = _r$6; - $s = 16; case 16: return $24r$2; - /* } */ case 10: - case 6: - $s = -1; return ptrType$2.nil; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.ModSqrt, $c: true, $r, $24r, $24r$1, $24r$2, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, p, x, x$1, x$2, z, $s};return $f; - }; - Int.prototype.ModSqrt = function(x, p) { return this.$val.ModSqrt(x, p); }; - Int.ptr.prototype.Lsh = function(x, n) { - var n, x, z; - z = this; - z.abs = z.abs.shl(x.abs, n); - z.neg = x.neg; - return z; - }; - Int.prototype.Lsh = function(x, n) { return this.$val.Lsh(x, n); }; - Int.ptr.prototype.Rsh = function(x, n) { - var {_r, _r$1, n, t, x, z, $s, $r, $c} = $restore(this, {x, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg) { */ case 1: - _r = z.abs.sub(x.abs, natOne); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - t = _r; - t = t.shr(t, n); - _r$1 = t.add(t, natOne); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - z.neg = true; - $s = -1; return z; - /* } */ case 2: - z.abs = z.abs.shr(x.abs, n); - z.neg = false; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Rsh, $c: true, $r, _r, _r$1, n, t, x, z, $s};return $f; - }; - Int.prototype.Rsh = function(x, n) { return this.$val.Rsh(x, n); }; - Int.ptr.prototype.Bit = function(i) { - var {_r, i, t, x, x$1, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (i === 0) { - if (x.abs.$length > 0) { - $s = -1; return (((((x$1 = x.abs, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])) & 1) >>> 0) >>> 0)); - } - $s = -1; return 0; - } - if (i < 0) { - $panic(new $String("negative bit index")); - } - /* */ if (x.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg) { */ case 1: - _r = (nat.nil).sub(x.abs, natOne); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - t = _r; - $s = -1; return (t.bit(((i >>> 0))) ^ 1) >>> 0; - /* } */ case 2: - $s = -1; return x.abs.bit(((i >>> 0))); - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Bit, $c: true, $r, _r, i, t, x, x$1, $s};return $f; - }; - Int.prototype.Bit = function(i) { return this.$val.Bit(i); }; - Int.ptr.prototype.SetBit = function(x, i, b) { - var {_r, _r$1, b, i, t, x, z, $s, $r, $c} = $restore(this, {x, i, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (i < 0) { - $panic(new $String("negative bit index")); - } - /* */ if (x.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg) { */ case 1: - _r = z.abs.sub(x.abs, natOne); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - t = _r; - t = t.setBit(t, ((i >>> 0)), (b ^ 1) >>> 0); - _r$1 = t.add(t, natOne); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - z.neg = z.abs.$length > 0; - $s = -1; return z; - /* } */ case 2: - z.abs = z.abs.setBit(x.abs, ((i >>> 0)), b); - z.neg = false; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.SetBit, $c: true, $r, _r, _r$1, b, i, t, x, z, $s};return $f; - }; - Int.prototype.SetBit = function(x, i, b) { return this.$val.SetBit(x, i, b); }; - Int.ptr.prototype.And = function(x, y) { - var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, x, x1, y, y1, y1$1, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x.neg === y.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg === y.neg) { */ case 1: - /* */ if (x.neg) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (x.neg) { */ case 3: - _r = (nat.nil).sub(x.abs, natOne); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x1 = _r; - _r$1 = (nat.nil).sub(y.abs, natOne); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - y1 = _r$1; - _r$2 = z.abs.add(z.abs.or(x1, y1), natOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z.abs = _r$2; - z.neg = true; - $s = -1; return z; - /* } */ case 4: - z.abs = z.abs.and(x.abs, y.abs); - z.neg = false; - $s = -1; return z; - /* } */ case 2: - if (x.neg) { - _tmp = y; - _tmp$1 = x; - x = _tmp; - y = _tmp$1; - } - _r$3 = (nat.nil).sub(y.abs, natOne); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - y1$1 = _r$3; - z.abs = z.abs.andNot(x.abs, y1$1); - z.neg = false; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.And, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, x, x1, y, y1, y1$1, z, $s};return $f; - }; - Int.prototype.And = function(x, y) { return this.$val.And(x, y); }; - Int.ptr.prototype.AndNot = function(x, y) { - var {_r, _r$1, _r$2, _r$3, _r$4, x, x1, x1$1, y, y1, y1$1, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x.neg === y.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg === y.neg) { */ case 1: - /* */ if (x.neg) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (x.neg) { */ case 3: - _r = (nat.nil).sub(x.abs, natOne); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x1 = _r; - _r$1 = (nat.nil).sub(y.abs, natOne); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - y1 = _r$1; - z.abs = z.abs.andNot(y1, x1); - z.neg = false; - $s = -1; return z; - /* } */ case 4: - z.abs = z.abs.andNot(x.abs, y.abs); - z.neg = false; - $s = -1; return z; - /* } */ case 2: - /* */ if (x.neg) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (x.neg) { */ case 7: - _r$2 = (nat.nil).sub(x.abs, natOne); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - x1$1 = _r$2; - _r$3 = z.abs.add(z.abs.or(x1$1, y.abs), natOne); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - z.abs = _r$3; - z.neg = true; - $s = -1; return z; - /* } */ case 8: - _r$4 = (nat.nil).sub(y.abs, natOne); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - y1$1 = _r$4; - z.abs = z.abs.and(x.abs, y1$1); - z.neg = false; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.AndNot, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, x, x1, x1$1, y, y1, y1$1, z, $s};return $f; - }; - Int.prototype.AndNot = function(x, y) { return this.$val.AndNot(x, y); }; - Int.ptr.prototype.Or = function(x, y) { - var {_r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, x, x1, y, y1, y1$1, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x.neg === y.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg === y.neg) { */ case 1: - /* */ if (x.neg) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (x.neg) { */ case 3: - _r = (nat.nil).sub(x.abs, natOne); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x1 = _r; - _r$1 = (nat.nil).sub(y.abs, natOne); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - y1 = _r$1; - _r$2 = z.abs.add(z.abs.and(x1, y1), natOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z.abs = _r$2; - z.neg = true; - $s = -1; return z; - /* } */ case 4: - z.abs = z.abs.or(x.abs, y.abs); - z.neg = false; - $s = -1; return z; - /* } */ case 2: - if (x.neg) { - _tmp = y; - _tmp$1 = x; - x = _tmp; - y = _tmp$1; - } - _r$3 = (nat.nil).sub(y.abs, natOne); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - y1$1 = _r$3; - _r$4 = z.abs.add(z.abs.andNot(y1$1, x.abs), natOne); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - z.abs = _r$4; - z.neg = true; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Or, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, x, x1, y, y1, y1$1, z, $s};return $f; - }; - Int.prototype.Or = function(x, y) { return this.$val.Or(x, y); }; - Int.ptr.prototype.Xor = function(x, y) { - var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, x, x1, y, y1, y1$1, z, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x.neg === y.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg === y.neg) { */ case 1: - /* */ if (x.neg) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (x.neg) { */ case 3: - _r = (nat.nil).sub(x.abs, natOne); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x1 = _r; - _r$1 = (nat.nil).sub(y.abs, natOne); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - y1 = _r$1; - z.abs = z.abs.xor(x1, y1); - z.neg = false; - $s = -1; return z; - /* } */ case 4: - z.abs = z.abs.xor(x.abs, y.abs); - z.neg = false; - $s = -1; return z; - /* } */ case 2: - if (x.neg) { - _tmp = y; - _tmp$1 = x; - x = _tmp; - y = _tmp$1; - } - _r$2 = (nat.nil).sub(y.abs, natOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - y1$1 = _r$2; - _r$3 = z.abs.add(z.abs.xor(x.abs, y1$1), natOne); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - z.abs = _r$3; - z.neg = true; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Xor, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, x, x1, y, y1, y1$1, z, $s};return $f; - }; - Int.prototype.Xor = function(x, y) { return this.$val.Xor(x, y); }; - Int.ptr.prototype.Not = function(x) { - var {_r, _r$1, x, z, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - /* */ if (x.neg) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (x.neg) { */ case 1: - _r = z.abs.sub(x.abs, natOne); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - z.neg = false; - $s = -1; return z; - /* } */ case 2: - _r$1 = z.abs.add(x.abs, natOne); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - z.abs = _r$1; - z.neg = true; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Not, $c: true, $r, _r, _r$1, x, z, $s};return $f; - }; - Int.prototype.Not = function(x) { return this.$val.Not(x); }; - Int.ptr.prototype.Sqrt = function(x) { - var {_r, x, z, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - z = this; - if (x.neg) { - $panic(new $String("square root of negative number")); - } - z.neg = false; - _r = z.abs.sqrt(x.abs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z.abs = _r; - $s = -1; return z; - /* */ } return; } var $f = {$blk: Int.ptr.prototype.Sqrt, $c: true, $r, _r, x, z, $s};return $f; - }; - Int.prototype.Sqrt = function(x) { return this.$val.Sqrt(x); }; - mulWW = function(x, y) { - var _tuple, x, y, z0, z1; - z1 = 0; - z0 = 0; - _tuple = mulWW_g(x, y); - z1 = _tuple[0]; - z0 = _tuple[1]; - return [z1, z0]; - }; - addVV = function(z, x, y) { - var c, x, y, z; - c = 0; - c = addVV_g(z, x, y); - return c; - }; - subVV = function(z, x, y) { - var c, x, y, z; - c = 0; - c = subVV_g(z, x, y); - return c; - }; - addVW = function(z, x, y) { - var {$24r, _r, c, fn, x, y, z, $s, $r, $c} = $restore(this, {z, x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = 0; - fn = addVW_g; - if (z.$length > 32) { - fn = addVWlarge; - } - _r = fn(z, x, y); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - c = _r; - $24r = c; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: addVW, $c: true, $r, $24r, _r, c, fn, x, y, z, $s};return $f; - }; - subVW = function(z, x, y) { - var {$24r, _r, c, fn, x, y, z, $s, $r, $c} = $restore(this, {z, x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = 0; - fn = subVW_g; - if (z.$length > 32) { - fn = subVWlarge; - } - _r = fn(z, x, y); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - c = _r; - $24r = c; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: subVW, $c: true, $r, $24r, _r, c, fn, x, y, z, $s};return $f; - }; - shlVU = function(z, x, s) { - var c, s, x, z; - c = 0; - c = shlVU_g(z, x, s); - return c; - }; - shrVU = function(z, x, s) { - var c, s, x, z; - c = 0; - c = shrVU_g(z, x, s); - return c; - }; - mulAddVWW = function(z, x, y, r) { - var c, r, x, y, z; - c = 0; - c = mulAddVWW_g(z, x, y, r); - return c; - }; - addMulVVW = function(z, x, y) { - var c, x, y, z; - c = 0; - c = addMulVVW_g(z, x, y); - return c; - }; - mulWW_g = function(x, y) { - var _tmp, _tmp$1, _tuple, hi, lo, x, y, z0, z1; - z1 = 0; - z0 = 0; - _tuple = bits.Mul(((x >>> 0)), ((y >>> 0))); - hi = _tuple[0]; - lo = _tuple[1]; - _tmp = ((hi >>> 0)); - _tmp$1 = ((lo >>> 0)); - z1 = _tmp; - z0 = _tmp$1; - return [z1, z0]; - }; - mulAddWWW_g = function(x, y, c) { - var _tmp, _tmp$1, _tuple, _tuple$1, c, cc, hi, lo, x, y, z0, z1; - z1 = 0; - z0 = 0; - _tuple = bits.Mul(((x >>> 0)), ((y >>> 0))); - hi = _tuple[0]; - lo = _tuple[1]; - cc = 0; - _tuple$1 = bits.Add(lo, ((c >>> 0)), 0); - lo = _tuple$1[0]; - cc = _tuple$1[1]; - _tmp = (((hi + cc >>> 0) >>> 0)); - _tmp$1 = ((lo >>> 0)); - z1 = _tmp; - z0 = _tmp$1; - return [z1, z0]; - }; - nlz = function(x) { - var x; - return ((bits.LeadingZeros(((x >>> 0))) >>> 0)); - }; - addVV_g = function(z, x, y) { - var _tuple, c, cc, i, x, y, z, zi; - c = 0; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length && i < y.$length)) { break; } - _tuple = bits.Add(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)), ((((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]) >>> 0)), ((c >>> 0))); - zi = _tuple[0]; - cc = _tuple[1]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((zi >>> 0))); - c = ((cc >>> 0)); - i = i + (1) >> 0; - } - return c; - }; - subVV_g = function(z, x, y) { - var _tuple, c, cc, i, x, y, z, zi; - c = 0; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length && i < y.$length)) { break; } - _tuple = bits.Sub(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)), ((((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]) >>> 0)), ((c >>> 0))); - zi = _tuple[0]; - cc = _tuple[1]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((zi >>> 0))); - c = ((cc >>> 0)); - i = i + (1) >> 0; - } - return c; - }; - addVW_g = function(z, x, y) { - var _tuple, c, cc, i, x, y, z, zi; - c = 0; - c = y; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length)) { break; } - _tuple = bits.Add(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)), ((c >>> 0)), 0); - zi = _tuple[0]; - cc = _tuple[1]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((zi >>> 0))); - c = ((cc >>> 0)); - i = i + (1) >> 0; - } - return c; - }; - addVWlarge = function(z, x, y) { - var _tuple, c, cc, i, x, y, z, zi; - c = 0; - c = y; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length)) { break; } - if (c === 0) { - $copySlice($subslice(z, i), $subslice(x, i)); - return c; - } - _tuple = bits.Add(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)), ((c >>> 0)), 0); - zi = _tuple[0]; - cc = _tuple[1]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((zi >>> 0))); - c = ((cc >>> 0)); - i = i + (1) >> 0; - } - return c; - }; - subVW_g = function(z, x, y) { - var _tuple, c, cc, i, x, y, z, zi; - c = 0; - c = y; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length)) { break; } - _tuple = bits.Sub(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)), ((c >>> 0)), 0); - zi = _tuple[0]; - cc = _tuple[1]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((zi >>> 0))); - c = ((cc >>> 0)); - i = i + (1) >> 0; - } - return c; - }; - subVWlarge = function(z, x, y) { - var _tuple, c, cc, i, x, y, z, zi; - c = 0; - c = y; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length)) { break; } - if (c === 0) { - $copySlice($subslice(z, i), $subslice(x, i)); - return c; - } - _tuple = bits.Sub(((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) >>> 0)), ((c >>> 0)), 0); - zi = _tuple[0]; - cc = _tuple[1]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((zi >>> 0))); - c = ((cc >>> 0)); - i = i + (1) >> 0; - } - return c; - }; - shlVU_g = function(z, x, s) { - var $C5$9D, c, i, s, x, x$1, x$2, y, y$1, y$2, y$3, z; - c = 0; - if (s === 0) { - $copySlice(z, x); - return c; - } - if (z.$length === 0) { - return c; - } - s = (s & (31)) >>> 0; - $C5$9D = 32 - s >>> 0; - $C5$9D = ($C5$9D & (31)) >>> 0; - c = (y = $C5$9D, y < 32 ? ((x$1 = z.$length - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) >>> y) : 0) >>> 0; - i = z.$length - 1 >> 0; - while (true) { - if (!(i > 0)) { break; } - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = ((((y$1 = s, y$1 < 32 ? (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) << y$1) : 0) >>> 0) | ((y$2 = $C5$9D, y$2 < 32 ? ((x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$2])) >>> y$2) : 0) >>> 0)) >>> 0)); - i = i - (1) >> 0; - } - (0 >= z.$length ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + 0] = ((y$3 = s, y$3 < 32 ? ((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]) << y$3) : 0) >>> 0)); - return c; - }; - shrVU_g = function(z, x, s) { - var $C5$9D, c, i, s, x, x$1, x$2, x$3, x$4, y, y$1, y$2, y$3, z; - c = 0; - if (s === 0) { - $copySlice(z, x); - return c; - } - if (z.$length === 0) { - return c; - } - if (!((x.$length === z.$length))) { - $panic(new $String("len(x) != len(z)")); - } - s = (s & (31)) >>> 0; - $C5$9D = 32 - s >>> 0; - $C5$9D = ($C5$9D & (31)) >>> 0; - c = (y = $C5$9D, y < 32 ? ((0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]) << y) : 0) >>> 0; - i = 1; - while (true) { - if (!(i < z.$length)) { break; } - (x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$2] = ((((y$1 = s, y$1 < 32 ? ((x$1 = i - 1 >> 0, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) >>> y$1) : 0) >>> 0) | ((y$2 = $C5$9D, y$2 < 32 ? (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) << y$2) : 0) >>> 0)) >>> 0))); - i = i + (1) >> 0; - } - (x$4 = z.$length - 1 >> 0, ((x$4 < 0 || x$4 >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + x$4] = ((y$3 = s, y$3 < 32 ? ((x$3 = z.$length - 1 >> 0, ((x$3 < 0 || x$3 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$3])) >>> y$3) : 0) >>> 0))); - return c; - }; - mulAddVWW_g = function(z, x, y, r) { - var _tuple, c, i, r, x, y, z; - c = 0; - c = r; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length)) { break; } - _tuple = mulAddWWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), y, c); - c = _tuple[0]; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tuple[1]); - i = i + (1) >> 0; - } - return c; - }; - addMulVVW_g = function(z, x, y) { - var _tmp, _tmp$1, _tuple, _tuple$1, c, cc, i, lo, x, y, z, z0, z1; - c = 0; - i = 0; - while (true) { - if (!(i < z.$length && i < x.$length)) { break; } - _tuple = mulAddWWW_g(((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]), y, ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i])); - z1 = _tuple[0]; - z0 = _tuple[1]; - _tuple$1 = bits.Add(((z0 >>> 0)), ((c >>> 0)), 0); - lo = _tuple$1[0]; - cc = _tuple$1[1]; - _tmp = ((cc >>> 0)); - _tmp$1 = ((lo >>> 0)); - c = _tmp; - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tmp$1); - c = c + (z1) >>> 0; - i = i + (1) >> 0; - } - return c; - }; - divWW = function(x1, x0, y, m) { - var _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, c, d, dq0, dq1, m, q, qq, r, r0, r1, s, t0, t1, x0, x1, y, y$1, y$2, y$3, y$4, y$5; - q = 0; - r = 0; - s = nlz(y); - if (!((s === 0))) { - x1 = (((y$1 = s, y$1 < 32 ? (x1 << y$1) : 0) >>> 0) | ((y$2 = ((32 - s >>> 0)), y$2 < 32 ? (x0 >>> y$2) : 0) >>> 0)) >>> 0; - x0 = (y$3 = (s), y$3 < 32 ? (x0 << y$3) : 0) >>> 0; - y = (y$4 = (s), y$4 < 32 ? (y << y$4) : 0) >>> 0; - } - d = ((y >>> 0)); - _tuple = bits.Mul(((m >>> 0)), ((x1 >>> 0))); - t1 = _tuple[0]; - t0 = _tuple[1]; - _tuple$1 = bits.Add(t0, ((x0 >>> 0)), 0); - c = _tuple$1[1]; - _tuple$2 = bits.Add(t1, ((x1 >>> 0)), c); - t1 = _tuple$2[0]; - qq = t1; - _tuple$3 = bits.Mul(d, qq); - dq1 = _tuple$3[0]; - dq0 = _tuple$3[1]; - _tuple$4 = bits.Sub(((x0 >>> 0)), dq0, 0); - r0 = _tuple$4[0]; - b = _tuple$4[1]; - _tuple$5 = bits.Sub(((x1 >>> 0)), dq1, b); - r1 = _tuple$5[0]; - if (!((r1 === 0))) { - qq = qq + (1) >>> 0; - r0 = r0 - (d) >>> 0; - } - if (r0 >= d) { - qq = qq + (1) >>> 0; - r0 = r0 - (d) >>> 0; - } - _tmp = ((qq >>> 0)); - _tmp$1 = ((((y$5 = s, y$5 < 32 ? (r0 >>> y$5) : 0) >>> 0) >>> 0)); - q = _tmp; - r = _tmp$1; - return [q, r]; - }; - reciprocalWord = function(d1) { - var _tuple, d1, rec, u, x0, x1, y; - u = ((((y = nlz(d1), y < 32 ? (d1 << y) : 0) >>> 0) >>> 0)); - x1 = ~u >>> 0; - x0 = 4294967295; - _tuple = bits.Div(x1, x0, u); - rec = _tuple[0]; - return ((rec >>> 0)); - }; - nat.methods = [{prop: "probablyPrimeMillerRabin", name: "probablyPrimeMillerRabin", pkg: "math/big", typ: $funcType([$Int, $Bool], [$Bool], false)}, {prop: "probablyPrimeLucas", name: "probablyPrimeLucas", pkg: "math/big", typ: $funcType([], [$Bool], false)}, {prop: "div", name: "div", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat, nat], false)}, {prop: "divW", name: "divW", pkg: "math/big", typ: $funcType([nat, Word], [nat, Word], false)}, {prop: "modW", name: "modW", pkg: "math/big", typ: $funcType([Word], [Word], false)}, {prop: "divLarge", name: "divLarge", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat, nat], false)}, {prop: "divBasic", name: "divBasic", pkg: "math/big", typ: $funcType([nat, nat], [], false)}, {prop: "divRecursive", name: "divRecursive", pkg: "math/big", typ: $funcType([nat, nat], [], false)}, {prop: "divRecursiveStep", name: "divRecursiveStep", pkg: "math/big", typ: $funcType([nat, nat, $Int, ptrType$3, sliceType$3], [], false)}, {prop: "scan", name: "scan", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int, $Bool], [nat, $Int, $Int, $error], false)}, {prop: "utoa", name: "utoa", pkg: "math/big", typ: $funcType([$Int], [sliceType$1], false)}, {prop: "itoa", name: "itoa", pkg: "math/big", typ: $funcType([$Bool, $Int], [sliceType$1], false)}, {prop: "convertWords", name: "convertWords", pkg: "math/big", typ: $funcType([sliceType$1, Word, $Int, Word, sliceType$4], [], false)}, {prop: "expWW", name: "expWW", pkg: "math/big", typ: $funcType([Word, Word], [nat], false)}, {prop: "clear", name: "clear", pkg: "math/big", typ: $funcType([], [], false)}, {prop: "norm", name: "norm", pkg: "math/big", typ: $funcType([], [nat], false)}, {prop: "make", name: "make", pkg: "math/big", typ: $funcType([$Int], [nat], false)}, {prop: "setWord", name: "setWord", pkg: "math/big", typ: $funcType([Word], [nat], false)}, {prop: "setUint64", name: "setUint64", pkg: "math/big", typ: $funcType([$Uint64], [nat], false)}, {prop: "set", name: "set", pkg: "math/big", typ: $funcType([nat], [nat], false)}, {prop: "add", name: "add", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "sub", name: "sub", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "cmp", name: "cmp", pkg: "math/big", typ: $funcType([nat], [$Int], false)}, {prop: "mulAddWW", name: "mulAddWW", pkg: "math/big", typ: $funcType([nat, Word, Word], [nat], false)}, {prop: "montgomery", name: "montgomery", pkg: "math/big", typ: $funcType([nat, nat, nat, Word, $Int], [nat], false)}, {prop: "mul", name: "mul", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "sqr", name: "sqr", pkg: "math/big", typ: $funcType([nat], [nat], false)}, {prop: "mulRange", name: "mulRange", pkg: "math/big", typ: $funcType([$Uint64, $Uint64], [nat], false)}, {prop: "bitLen", name: "bitLen", pkg: "math/big", typ: $funcType([], [$Int], false)}, {prop: "trailingZeroBits", name: "trailingZeroBits", pkg: "math/big", typ: $funcType([], [$Uint], false)}, {prop: "shl", name: "shl", pkg: "math/big", typ: $funcType([nat, $Uint], [nat], false)}, {prop: "shr", name: "shr", pkg: "math/big", typ: $funcType([nat, $Uint], [nat], false)}, {prop: "setBit", name: "setBit", pkg: "math/big", typ: $funcType([nat, $Uint, $Uint], [nat], false)}, {prop: "bit", name: "bit", pkg: "math/big", typ: $funcType([$Uint], [$Uint], false)}, {prop: "sticky", name: "sticky", pkg: "math/big", typ: $funcType([$Uint], [$Uint], false)}, {prop: "and", name: "and", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "andNot", name: "andNot", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "or", name: "or", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "xor", name: "xor", pkg: "math/big", typ: $funcType([nat, nat], [nat], false)}, {prop: "random", name: "random", pkg: "math/big", typ: $funcType([ptrType$5, nat, $Int], [nat], false)}, {prop: "expNN", name: "expNN", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat], false)}, {prop: "expNNWindowed", name: "expNNWindowed", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat], false)}, {prop: "expNNMontgomery", name: "expNNMontgomery", pkg: "math/big", typ: $funcType([nat, nat, nat], [nat], false)}, {prop: "bytes", name: "bytes", pkg: "math/big", typ: $funcType([sliceType$1], [$Int], false)}, {prop: "setBytes", name: "setBytes", pkg: "math/big", typ: $funcType([sliceType$1], [nat], false)}, {prop: "sqrt", name: "sqrt", pkg: "math/big", typ: $funcType([nat], [nat], false)}]; - byteReader.methods = [{prop: "ReadByte", name: "ReadByte", pkg: "", typ: $funcType([], [$Uint8, $error], false)}, {prop: "UnreadByte", name: "UnreadByte", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$2.methods = [{prop: "scaleDenom", name: "scaleDenom", pkg: "math/big", typ: $funcType([ptrType$2, nat], [], false)}, {prop: "ProbablyPrime", name: "ProbablyPrime", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "GobEncode", name: "GobEncode", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "GobDecode", name: "GobDecode", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "MarshalJSON", name: "MarshalJSON", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalJSON", name: "UnmarshalJSON", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "Text", name: "Text", pkg: "", typ: $funcType([$Int], [$String], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([sliceType$1, $Int], [sliceType$1], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Format", name: "Format", pkg: "", typ: $funcType([fmt.State, $Int32], [], false)}, {prop: "scan", name: "scan", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int], [ptrType$2, $Int, $error], false)}, {prop: "Scan", name: "Scan", pkg: "", typ: $funcType([fmt.ScanState, $Int32], [$error], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "SetInt64", name: "SetInt64", pkg: "", typ: $funcType([$Int64], [ptrType$2], false)}, {prop: "SetUint64", name: "SetUint64", pkg: "", typ: $funcType([$Uint64], [ptrType$2], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [sliceType$2], false)}, {prop: "SetBits", name: "SetBits", pkg: "", typ: $funcType([sliceType$2], [ptrType$2], false)}, {prop: "Abs", name: "Abs", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Neg", name: "Neg", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "MulRange", name: "MulRange", pkg: "", typ: $funcType([$Int64, $Int64], [ptrType$2], false)}, {prop: "Binomial", name: "Binomial", pkg: "", typ: $funcType([$Int64, $Int64], [ptrType$2], false)}, {prop: "Quo", name: "Quo", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Rem", name: "Rem", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "QuoRem", name: "QuoRem", pkg: "", typ: $funcType([ptrType$2, ptrType$2, ptrType$2], [ptrType$2, ptrType$2], false)}, {prop: "Div", name: "Div", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Mod", name: "Mod", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "DivMod", name: "DivMod", pkg: "", typ: $funcType([ptrType$2, ptrType$2, ptrType$2], [ptrType$2, ptrType$2], false)}, {prop: "Cmp", name: "Cmp", pkg: "", typ: $funcType([ptrType$2], [$Int], false)}, {prop: "CmpAbs", name: "CmpAbs", pkg: "", typ: $funcType([ptrType$2], [$Int], false)}, {prop: "Int64", name: "Int64", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "Uint64", name: "Uint64", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "IsInt64", name: "IsInt64", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsUint64", name: "IsUint64", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "SetString", name: "SetString", pkg: "", typ: $funcType([$String, $Int], [ptrType$2, $Bool], false)}, {prop: "setFromScanner", name: "setFromScanner", pkg: "math/big", typ: $funcType([io.ByteScanner, $Int], [ptrType$2, $Bool], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType$1], [ptrType$2], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType$1], false)}, {prop: "FillBytes", name: "FillBytes", pkg: "", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "BitLen", name: "BitLen", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "TrailingZeroBits", name: "TrailingZeroBits", pkg: "", typ: $funcType([], [$Uint], false)}, {prop: "Exp", name: "Exp", pkg: "", typ: $funcType([ptrType$2, ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "GCD", name: "GCD", pkg: "", typ: $funcType([ptrType$2, ptrType$2, ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "lehmerGCD", name: "lehmerGCD", pkg: "math/big", typ: $funcType([ptrType$2, ptrType$2, ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Rand", name: "Rand", pkg: "", typ: $funcType([ptrType$5, ptrType$2], [ptrType$2], false)}, {prop: "ModInverse", name: "ModInverse", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "modSqrt3Mod4Prime", name: "modSqrt3Mod4Prime", pkg: "math/big", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "modSqrt5Mod8Prime", name: "modSqrt5Mod8Prime", pkg: "math/big", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "modSqrtTonelliShanks", name: "modSqrtTonelliShanks", pkg: "math/big", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "ModSqrt", name: "ModSqrt", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Lsh", name: "Lsh", pkg: "", typ: $funcType([ptrType$2, $Uint], [ptrType$2], false)}, {prop: "Rsh", name: "Rsh", pkg: "", typ: $funcType([ptrType$2, $Uint], [ptrType$2], false)}, {prop: "Bit", name: "Bit", pkg: "", typ: $funcType([$Int], [$Uint], false)}, {prop: "SetBit", name: "SetBit", pkg: "", typ: $funcType([ptrType$2, $Int, $Uint], [ptrType$2], false)}, {prop: "And", name: "And", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "AndNot", name: "AndNot", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Or", name: "Or", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Xor", name: "Xor", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Not", name: "Not", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Sqrt", name: "Sqrt", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}]; - divisor.init("math/big", [{prop: "bbb", name: "bbb", embedded: false, exported: false, typ: nat, tag: ""}, {prop: "nbits", name: "nbits", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ndigits", name: "ndigits", embedded: false, exported: false, typ: $Int, tag: ""}]); - nat.init(Word); - byteReader.init("", [{prop: "ScanState", name: "ScanState", embedded: true, exported: true, typ: fmt.ScanState, tag: ""}]); - Int.init("math/big", [{prop: "neg", name: "neg", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "abs", name: "abs", embedded: false, exported: false, typ: nat, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nosync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cacheBase10 = new structType$1.ptr(new nosync.Mutex.ptr(false), arrayType.zero()); - natPool = new nosync.Pool.ptr(sliceType.nil, $throwNilPointerError); - errNoDigits = errors.New("number has no digits"); - errInvalSep = errors.New("'_' must separate successive digits"); - leafSize = 8; - natOne = new nat([1]); - natTwo = new nat([2]); - karatsubaThreshold = 40; - basicSqrThreshold = 20; - karatsubaSqrThreshold = 260; - intOne = new Int.ptr(false, natOne); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/rand"] = (function() { - var $pkg = {}, $init, errors, js$1, io, big, js, reader, sliceType, ptrType, ptrType$1, smallPrimesProduct, jsCrypto, uint8Array, Int, init, Read; - errors = $packages["errors"]; - js$1 = $packages["github.com/gopherjs/gopherjs/js"]; - io = $packages["io"]; - big = $packages["math/big"]; - js = $packages["syscall/js"]; - reader = $pkg.reader = $newType(0, $kindStruct, "rand.reader", true, "crypto/rand", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(big.Int); - ptrType$1 = $ptrType(reader); - Int = function(rand, max) { - var {_q, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, b, bitLen, bytes, err, k, max, n, rand, y, $s, $r, $c} = $restore(this, {rand, max}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = ptrType.nil; - err = $ifaceNil; - if (max.Sign() <= 0) { - $panic(new $String("crypto/rand: argument to Int is <= 0")); - } - n = new big.Int.ptr(false, big.nat.nil); - _r = n.Sub(max, n.SetUint64(new $Uint64(0, 1))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - bitLen = n.BitLen(); - if (bitLen === 0) { - $s = -1; return [n, err]; - } - k = (_q = ((bitLen + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - b = (((_r$1 = bitLen % 8, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >>> 0)); - if (b === 0) { - b = 8; - } - bytes = $makeSlice(sliceType, k); - /* while (true) { */ case 2: - _r$2 = io.ReadFull(rand, bytes); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = ptrType.nil; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - (0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0] = (((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) & (((((((y = b, y < 32 ? (1 << y) : 0) >> 0)) - 1 >> 0) << 24 >>> 24)))) >>> 0)); - n.SetBytes(bytes); - if (n.Cmp(max) < 0) { - $s = -1; return [n, err]; - } - $s = 2; continue; - case 3: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Int, $c: true, $r, _q, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, b, bitLen, bytes, err, k, max, n, rand, y, $s};return $f; - }; - $pkg.Int = Int; - init = function() { - $pkg.Reader = new reader.ptr(); - }; - Read = function(b) { - var {$24r, _r, _tuple, b, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - _r = io.ReadFull($pkg.Reader, b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Read, $c: true, $r, $24r, _r, _tuple, b, err, n, $s};return $f; - }; - $pkg.Read = Read; - reader.ptr.prototype.Read = function(b) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, array, b, crypto, err, n, offset, r, randomBytes, require; - n = 0; - err = $ifaceNil; - r = this; - array = b.$array; - offset = $parseInt(b.$offset) >> 0; - crypto = $global.crypto; - if (crypto === undefined) { - crypto = $global.msCrypto; - } - if (!(crypto === undefined)) { - if (!(crypto.getRandomValues === undefined)) { - n = b.$length; - if (n > 65536) { - n = 65536; - } - crypto.getRandomValues(array.subarray(offset, offset + n >> 0)); - _tmp = n; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - } - require = $global.require; - if (!(require === undefined)) { - randomBytes = require($externalize("crypto", $String)).randomBytes; - if (!(randomBytes === undefined)) { - array.set(randomBytes(b.$length), offset); - _tmp$2 = b.$length; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - } - _tmp$4 = 0; - _tmp$5 = errors.New("crypto/rand not available in this environment"); - n = _tmp$4; - err = _tmp$5; - return [n, err]; - }; - reader.prototype.Read = function(b) { return this.$val.Read(b); }; - ptrType$1.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; - reader.init("", []); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js$1.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Reader = $ifaceNil; - smallPrimesProduct = new big.Int.ptr(false, big.nat.nil).SetUint64(new $Uint64(3793877372, 820596253)); - jsCrypto = $clone($clone(js.Global(), js.Value).Get("crypto"), js.Value); - uint8Array = $clone($clone(js.Global(), js.Value).Get("Uint8Array"), js.Value); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto"] = (function() { - var $pkg = {}, $init, hash, io, strconv, Hash, PublicKey, PrivateKey, Signer, SignerOpts, Decrypter, DecrypterOpts, sliceType, funcType, sliceType$1, digestSizes, hashes, RegisterHash; - hash = $packages["hash"]; - io = $packages["io"]; - strconv = $packages["strconv"]; - Hash = $pkg.Hash = $newType(4, $kindUint, "crypto.Hash", true, "crypto", true, null); - PublicKey = $pkg.PublicKey = $newType(8, $kindInterface, "crypto.PublicKey", true, "crypto", true, null); - PrivateKey = $pkg.PrivateKey = $newType(8, $kindInterface, "crypto.PrivateKey", true, "crypto", true, null); - Signer = $pkg.Signer = $newType(8, $kindInterface, "crypto.Signer", true, "crypto", true, null); - SignerOpts = $pkg.SignerOpts = $newType(8, $kindInterface, "crypto.SignerOpts", true, "crypto", true, null); - Decrypter = $pkg.Decrypter = $newType(8, $kindInterface, "crypto.Decrypter", true, "crypto", true, null); - DecrypterOpts = $pkg.DecrypterOpts = $newType(8, $kindInterface, "crypto.DecrypterOpts", true, "crypto", true, null); - sliceType = $sliceType($Uint8); - funcType = $funcType([], [hash.Hash], false); - sliceType$1 = $sliceType(funcType); - Hash.prototype.HashFunc = function() { - var h; - h = this.$val; - return h; - }; - $ptrType(Hash).prototype.HashFunc = function() { return new Hash(this.$get()).HashFunc(); }; - Hash.prototype.String = function() { - var _1, h; - h = this.$val; - _1 = h; - if (_1 === (1)) { - return "MD4"; - } else if (_1 === (2)) { - return "MD5"; - } else if (_1 === (3)) { - return "SHA-1"; - } else if (_1 === (4)) { - return "SHA-224"; - } else if (_1 === (5)) { - return "SHA-256"; - } else if (_1 === (6)) { - return "SHA-384"; - } else if (_1 === (7)) { - return "SHA-512"; - } else if (_1 === (8)) { - return "MD5+SHA1"; - } else if (_1 === (9)) { - return "RIPEMD-160"; - } else if (_1 === (10)) { - return "SHA3-224"; - } else if (_1 === (11)) { - return "SHA3-256"; - } else if (_1 === (12)) { - return "SHA3-384"; - } else if (_1 === (13)) { - return "SHA3-512"; - } else if (_1 === (14)) { - return "SHA-512/224"; - } else if (_1 === (15)) { - return "SHA-512/256"; - } else if (_1 === (16)) { - return "BLAKE2s-256"; - } else if (_1 === (17)) { - return "BLAKE2b-256"; - } else if (_1 === (18)) { - return "BLAKE2b-384"; - } else if (_1 === (19)) { - return "BLAKE2b-512"; - } else { - return "unknown hash value " + strconv.Itoa(((h >> 0))); - } - }; - $ptrType(Hash).prototype.String = function() { return new Hash(this.$get()).String(); }; - Hash.prototype.Size = function() { - var h; - h = this.$val; - if (h > 0 && h < 20) { - return ((((h < 0 || h >= digestSizes.$length) ? ($throwRuntimeError("index out of range"), undefined) : digestSizes.$array[digestSizes.$offset + h]) >> 0)); - } - $panic(new $String("crypto: Size of unknown hash function")); - }; - $ptrType(Hash).prototype.Size = function() { return new Hash(this.$get()).Size(); }; - Hash.prototype.New = function() { - var {$24r, _r, f, h, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - /* */ if (h > 0 && h < 20) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (h > 0 && h < 20) { */ case 1: - f = ((h < 0 || h >= hashes.$length) ? ($throwRuntimeError("index out of range"), undefined) : hashes.$array[hashes.$offset + h]); - /* */ if (!(f === $throwNilPointerError)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(f === $throwNilPointerError)) { */ case 3: - _r = f(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 6; case 6: return $24r; - /* } */ case 4: - /* } */ case 2: - $panic(new $String("crypto: requested hash function #" + strconv.Itoa(((h >> 0))) + " is unavailable")); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Hash.prototype.New, $c: true, $r, $24r, _r, f, h, $s};return $f; - }; - $ptrType(Hash).prototype.New = function() { return new Hash(this.$get()).New(); }; - Hash.prototype.Available = function() { - var h; - h = this.$val; - return h < 20 && !(((h < 0 || h >= hashes.$length) ? ($throwRuntimeError("index out of range"), undefined) : hashes.$array[hashes.$offset + h]) === $throwNilPointerError); - }; - $ptrType(Hash).prototype.Available = function() { return new Hash(this.$get()).Available(); }; - RegisterHash = function(h, f) { - var f, h; - if (h >= 20) { - $panic(new $String("crypto: RegisterHash of unknown hash function")); - } - ((h < 0 || h >= hashes.$length) ? ($throwRuntimeError("index out of range"), undefined) : hashes.$array[hashes.$offset + h] = f); - }; - $pkg.RegisterHash = RegisterHash; - Hash.methods = [{prop: "HashFunc", name: "HashFunc", pkg: "", typ: $funcType([], [Hash], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "New", name: "New", pkg: "", typ: $funcType([], [hash.Hash], false)}, {prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Bool], false)}]; - PublicKey.init([]); - PrivateKey.init([]); - Signer.init([{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [PublicKey], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, SignerOpts], [sliceType, $error], false)}]); - SignerOpts.init([{prop: "HashFunc", name: "HashFunc", pkg: "", typ: $funcType([], [Hash], false)}]); - Decrypter.init([{prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([io.Reader, sliceType, DecrypterOpts], [sliceType, $error], false)}, {prop: "Public", name: "Public", pkg: "", typ: $funcType([], [PublicKey], false)}]); - DecrypterOpts.init([]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = hash.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - digestSizes = new sliceType([0, 16, 16, 20, 28, 32, 48, 64, 36, 20, 28, 32, 48, 64, 28, 32, 32, 32, 48, 64]); - hashes = $makeSlice(sliceType$1, 20); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/internal/subtle"] = (function() { - var $pkg = {}, $init, js, ptrType, InexactOverlap, AnyOverlap; - js = $packages["github.com/gopherjs/gopherjs/js"]; - ptrType = $ptrType($Uint8); - InexactOverlap = function(x, y) { - var x, y; - if ((x.$length === 0) || (y.$length === 0) || $indexPtr(x.$array, x.$offset + 0, ptrType) === $indexPtr(y.$array, y.$offset + 0, ptrType)) { - return false; - } - return AnyOverlap(x, y); - }; - $pkg.InexactOverlap = InexactOverlap; - AnyOverlap = function(x, y) { - var x, y; - return x.$length > 0 && y.$length > 0 && x.$array === y.$array && ($parseInt(x.$offset) >> 0) <= ((($parseInt(y.$offset) >> 0) + y.$length >> 0) - 1 >> 0) && ($parseInt(y.$offset) >> 0) <= ((($parseInt(x.$offset) >> 0) + x.$length >> 0) - 1 >> 0); - }; - $pkg.AnyOverlap = AnyOverlap; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/subtle"] = (function() { - var $pkg = {}, $init, ConstantTimeCompare, ConstantTimeSelect, ConstantTimeByteEq, ConstantTimeEq, ConstantTimeCopy, ConstantTimeLessOrEq; - ConstantTimeCompare = function(x, y) { - var i, v, x, y; - if (!((x.$length === y.$length))) { - return 0; - } - v = 0; - i = 0; - while (true) { - if (!(i < x.$length)) { break; } - v = (v | (((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) ^ ((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i])) << 24 >>> 24))) >>> 0; - i = i + (1) >> 0; - } - return ConstantTimeByteEq(v, 0); - }; - $pkg.ConstantTimeCompare = ConstantTimeCompare; - ConstantTimeSelect = function(v, x, y) { - var v, x, y; - return ((~((v - 1 >> 0)) >> 0) & x) | (((v - 1 >> 0)) & y); - }; - $pkg.ConstantTimeSelect = ConstantTimeSelect; - ConstantTimeByteEq = function(x, y) { - var x, y; - return (((((((((x ^ y) << 24 >>> 24) >>> 0)) - 1 >>> 0)) >>> 31 >>> 0) >> 0)); - }; - $pkg.ConstantTimeByteEq = ConstantTimeByteEq; - ConstantTimeEq = function(x, y) { - var x, x$1, y; - return (($shiftRightUint64(((x$1 = (new $Uint64(0, ((((x ^ y) >> 0) >>> 0)))), new $Uint64(x$1.$high - 0, x$1.$low - 1))), 63).$low >> 0)); - }; - $pkg.ConstantTimeEq = ConstantTimeEq; - ConstantTimeCopy = function(v, x, y) { - var i, v, x, xmask, y, ymask; - if (!((x.$length === y.$length))) { - $panic(new $String("subtle: slices have different lengths")); - } - xmask = (((v - 1 >> 0) << 24 >>> 24)); - ymask = (((~((v - 1 >> 0)) >> 0) << 24 >>> 24)); - i = 0; - while (true) { - if (!(i < x.$length)) { break; } - ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = ((((((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) & xmask) >>> 0) | ((((i < 0 || i >= y.$length) ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + i]) & ymask) >>> 0)) >>> 0)); - i = i + (1) >> 0; - } - }; - $pkg.ConstantTimeCopy = ConstantTimeCopy; - ConstantTimeLessOrEq = function(x, y) { - var x, x32, y, y32; - x32 = ((x >> 0)); - y32 = ((y >> 0)); - return ((((((((x32 - y32 >> 0) - 1 >> 0)) >> 31 >> 0)) & 1) >> 0)); - }; - $pkg.ConstantTimeLessOrEq = ConstantTimeLessOrEq; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/cipher"] = (function() { - var $pkg = {}, $init, subtle, subtle$1, binary, errors, io, runtime, StreamReader, AEAD, gcmAble, gcmFieldElement, gcm, ctr, ctrAble, Block, Stream, BlockMode, cbc, cbcEncrypter, cbcEncAble, cbcDecrypter, cbcDecAble, sliceType, sliceType$1, arrayType, arrayType$1, ptrType, ptrType$1, ptrType$3, ptrType$4, ptrType$5, ptrType$6, errOpen, gcmReductionTable, xorBytes, fastXORBytes, safeXORBytes, fastXORWords, xorWords, NewGCM, newGCMWithNonceAndTagSize, reverseBits, gcmAdd, gcmDouble, gcmInc32, sliceForAppend, NewCTR, dup, newCBC, NewCBCEncrypter, NewCBCDecrypter; - subtle = $packages["crypto/internal/subtle"]; - subtle$1 = $packages["crypto/subtle"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - io = $packages["io"]; - runtime = $packages["runtime"]; - StreamReader = $pkg.StreamReader = $newType(0, $kindStruct, "cipher.StreamReader", true, "crypto/cipher", true, function(S_, R_) { - this.$val = this; - if (arguments.length === 0) { - this.S = $ifaceNil; - this.R = $ifaceNil; - return; - } - this.S = S_; - this.R = R_; - }); - AEAD = $pkg.AEAD = $newType(8, $kindInterface, "cipher.AEAD", true, "crypto/cipher", true, null); - gcmAble = $pkg.gcmAble = $newType(8, $kindInterface, "cipher.gcmAble", true, "crypto/cipher", false, null); - gcmFieldElement = $pkg.gcmFieldElement = $newType(0, $kindStruct, "cipher.gcmFieldElement", true, "crypto/cipher", false, function(low_, high_) { - this.$val = this; - if (arguments.length === 0) { - this.low = new $Uint64(0, 0); - this.high = new $Uint64(0, 0); - return; - } - this.low = low_; - this.high = high_; - }); - gcm = $pkg.gcm = $newType(0, $kindStruct, "cipher.gcm", true, "crypto/cipher", false, function(cipher_, nonceSize_, tagSize_, productTable_) { - this.$val = this; - if (arguments.length === 0) { - this.cipher = $ifaceNil; - this.nonceSize = 0; - this.tagSize = 0; - this.productTable = arrayType$1.zero(); - return; - } - this.cipher = cipher_; - this.nonceSize = nonceSize_; - this.tagSize = tagSize_; - this.productTable = productTable_; - }); - ctr = $pkg.ctr = $newType(0, $kindStruct, "cipher.ctr", true, "crypto/cipher", false, function(b_, ctr_, out_, outUsed_) { - this.$val = this; - if (arguments.length === 0) { - this.b = $ifaceNil; - this.ctr = sliceType$1.nil; - this.out = sliceType$1.nil; - this.outUsed = 0; - return; - } - this.b = b_; - this.ctr = ctr_; - this.out = out_; - this.outUsed = outUsed_; - }); - ctrAble = $pkg.ctrAble = $newType(8, $kindInterface, "cipher.ctrAble", true, "crypto/cipher", false, null); - Block = $pkg.Block = $newType(8, $kindInterface, "cipher.Block", true, "crypto/cipher", true, null); - Stream = $pkg.Stream = $newType(8, $kindInterface, "cipher.Stream", true, "crypto/cipher", true, null); - BlockMode = $pkg.BlockMode = $newType(8, $kindInterface, "cipher.BlockMode", true, "crypto/cipher", true, null); - cbc = $pkg.cbc = $newType(0, $kindStruct, "cipher.cbc", true, "crypto/cipher", false, function(b_, blockSize_, iv_, tmp_) { - this.$val = this; - if (arguments.length === 0) { - this.b = $ifaceNil; - this.blockSize = 0; - this.iv = sliceType$1.nil; - this.tmp = sliceType$1.nil; - return; - } - this.b = b_; - this.blockSize = blockSize_; - this.iv = iv_; - this.tmp = tmp_; - }); - cbcEncrypter = $pkg.cbcEncrypter = $newType(0, $kindStruct, "cipher.cbcEncrypter", true, "crypto/cipher", false, function(b_, blockSize_, iv_, tmp_) { - this.$val = this; - if (arguments.length === 0) { - this.b = $ifaceNil; - this.blockSize = 0; - this.iv = sliceType$1.nil; - this.tmp = sliceType$1.nil; - return; - } - this.b = b_; - this.blockSize = blockSize_; - this.iv = iv_; - this.tmp = tmp_; - }); - cbcEncAble = $pkg.cbcEncAble = $newType(8, $kindInterface, "cipher.cbcEncAble", true, "crypto/cipher", false, null); - cbcDecrypter = $pkg.cbcDecrypter = $newType(0, $kindStruct, "cipher.cbcDecrypter", true, "crypto/cipher", false, function(b_, blockSize_, iv_, tmp_) { - this.$val = this; - if (arguments.length === 0) { - this.b = $ifaceNil; - this.blockSize = 0; - this.iv = sliceType$1.nil; - this.tmp = sliceType$1.nil; - return; - } - this.b = b_; - this.blockSize = blockSize_; - this.iv = iv_; - this.tmp = tmp_; - }); - cbcDecAble = $pkg.cbcDecAble = $newType(8, $kindInterface, "cipher.cbcDecAble", true, "crypto/cipher", false, null); - sliceType = $sliceType($Uint16); - sliceType$1 = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 16); - arrayType$1 = $arrayType(gcmFieldElement, 16); - ptrType = $ptrType(cbcEncrypter); - ptrType$1 = $ptrType(cbcDecrypter); - ptrType$3 = $ptrType(gcmFieldElement); - ptrType$4 = $ptrType(arrayType); - ptrType$5 = $ptrType(gcm); - ptrType$6 = $ptrType(ctr); - xorBytes = function(dst, a, b) { - var a, b, dst, n; - n = a.$length; - if (b.$length < n) { - n = b.$length; - } - if (n === 0) { - return 0; - } - if (false) { - fastXORBytes(dst, a, b, n); - } else { - safeXORBytes(dst, a, b, n); - } - return n; - }; - fastXORBytes = function(dst, a, b, n) { - var _q, _r, a, aw, b, bw, dst, dw, i, i$1, n, w, x; - $unused((x = n - 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x]))); - w = (_q = n / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (w > 0) { - dw = dst; - aw = a; - bw = b; - i = 0; - while (true) { - if (!(i < w)) { break; } - ((i < 0 || i >= dw.$length) ? ($throwRuntimeError("index out of range"), undefined) : dw.$array[dw.$offset + i] = ((((i < 0 || i >= aw.$length) ? ($throwRuntimeError("index out of range"), undefined) : aw.$array[aw.$offset + i]) ^ ((i < 0 || i >= bw.$length) ? ($throwRuntimeError("index out of range"), undefined) : bw.$array[bw.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - } - i$1 = (n - (_r = n % 4, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0); - while (true) { - if (!(i$1 < n)) { break; } - ((i$1 < 0 || i$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i$1] = ((((i$1 < 0 || i$1 >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i$1]) ^ ((i$1 < 0 || i$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i$1])) << 24 >>> 24)); - i$1 = i$1 + (1) >> 0; - } - }; - safeXORBytes = function(dst, a, b, n) { - var a, b, dst, i, n; - i = 0; - while (true) { - if (!(i < n)) { break; } - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = ((((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]) ^ ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])) << 24 >>> 24)); - i = i + (1) >> 0; - } - }; - fastXORWords = function(dst, a, b) { - var _q, a, aw, b, bw, dst, dw, i, n; - dw = dst; - aw = a; - bw = b; - n = (_q = b.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - i = 0; - while (true) { - if (!(i < n)) { break; } - ((i < 0 || i >= dw.$length) ? ($throwRuntimeError("index out of range"), undefined) : dw.$array[dw.$offset + i] = ((((i < 0 || i >= aw.$length) ? ($throwRuntimeError("index out of range"), undefined) : aw.$array[aw.$offset + i]) ^ ((i < 0 || i >= bw.$length) ? ($throwRuntimeError("index out of range"), undefined) : bw.$array[bw.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - }; - xorWords = function(dst, a, b) { - var a, b, dst; - if (false) { - fastXORWords(dst, a, b); - } else { - safeXORBytes(dst, a, b, b.$length); - } - }; - StreamReader.ptr.prototype.Read = function(dst) { - var {_r, _tuple, dst, err, n, r, $s, $r, $c} = $restore(this, {dst}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - _r = r.R.Read(dst); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $r = r.S.XORKeyStream($subslice(dst, 0, n), $subslice(dst, 0, n)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: StreamReader.ptr.prototype.Read, $c: true, $r, _r, _tuple, dst, err, n, r, $s};return $f; - }; - StreamReader.prototype.Read = function(dst) { return this.$val.Read(dst); }; - NewGCM = function(cipher) { - var {$24r, _r, cipher, $s, $r, $c} = $restore(this, {cipher}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = newGCMWithNonceAndTagSize(cipher, 12, 16); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewGCM, $c: true, $r, $24r, _r, cipher, $s};return $f; - }; - $pkg.NewGCM = NewGCM; - newGCMWithNonceAndTagSize = function(cipher, nonceSize, tagSize) { - var {$24r, _q, _r, _r$1, _tuple, cipher, cipher$1, g, i, key, nonceSize, ok, tagSize, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {cipher, nonceSize, tagSize}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = [x]; - if (tagSize < 12 || tagSize > 16) { - $s = -1; return [$ifaceNil, errors.New("cipher: incorrect tag size given to GCM")]; - } - if (nonceSize <= 0) { - $s = -1; return [$ifaceNil, errors.New("cipher: the nonce can't have zero length, or the security of the key will be immediately compromised")]; - } - _tuple = $assertType(cipher, gcmAble, true); - cipher$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = cipher$1.NewGCM(nonceSize, tagSize); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = cipher.BlockSize(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!((_r$1 === 16))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((_r$1 === 16))) { */ case 5: - $s = -1; return [$ifaceNil, errors.New("cipher: NewGCM requires 128-bit block cipher")]; - /* } */ case 6: - key = arrayType.zero(); - $r = cipher.Encrypt(new sliceType$1(key), new sliceType$1(key)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - g = new gcm.ptr(cipher, nonceSize, tagSize, arrayType$1.zero()); - x[0] = new gcmFieldElement.ptr($clone(binary.BigEndian, binary.bigEndian).Uint64($subslice(new sliceType$1(key), 0, 8)), $clone(binary.BigEndian, binary.bigEndian).Uint64($subslice(new sliceType$1(key), 8))); - gcmFieldElement.copy((x$1 = g.productTable, x$2 = reverseBits(1), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])), x[0]); - i = 2; - while (true) { - if (!(i < 16)) { break; } - gcmFieldElement.copy((x$5 = g.productTable, x$6 = reverseBits(i), ((x$6 < 0 || x$6 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[x$6])), gcmDouble((x$3 = g.productTable, x$4 = reverseBits((_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))), ((x$4 < 0 || x$4 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[x$4])))); - gcmFieldElement.copy((x$9 = g.productTable, x$10 = reverseBits(i + 1 >> 0), ((x$10 < 0 || x$10 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[x$10])), gcmAdd((x$7 = g.productTable, x$8 = reverseBits(i), ((x$8 < 0 || x$8 >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[x$8])), x[0])); - i = i + (2) >> 0; - } - $s = -1; return [g, $ifaceNil]; - /* */ } return; } var $f = {$blk: newGCMWithNonceAndTagSize, $c: true, $r, $24r, _q, _r, _r$1, _tuple, cipher, cipher$1, g, i, key, nonceSize, ok, tagSize, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - gcm.ptr.prototype.NonceSize = function() { - var g; - g = this; - return g.nonceSize; - }; - gcm.prototype.NonceSize = function() { return this.$val.NonceSize(); }; - gcm.ptr.prototype.Overhead = function() { - var g; - g = this; - return g.tagSize; - }; - gcm.prototype.Overhead = function() { return this.$val.Overhead(); }; - gcm.ptr.prototype.Seal = function(dst, nonce, plaintext, data) { - var {_r, _tmp, _tmp$1, _tuple, counter, data, dst, g, nonce, out, plaintext, ret, tag, tagMask, x, x$1, $s, $r, $c} = $restore(this, {dst, nonce, plaintext, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - counter = [counter]; - tagMask = [tagMask]; - g = this; - if (!((nonce.$length === g.nonceSize))) { - $panic(new $String("crypto/cipher: incorrect nonce length given to GCM")); - } - _r = g.cipher.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if ((x = (new $Uint64(0, plaintext.$length)), x$1 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = (new $Uint64(0, plaintext.$length)), x$1 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { */ case 1: - $panic(new $String("crypto/cipher: message too large for GCM")); - /* } */ case 2: - _tuple = sliceForAppend(dst, plaintext.$length + g.tagSize >> 0); - ret = _tuple[0]; - out = _tuple[1]; - if (subtle.InexactOverlap(out, plaintext)) { - $panic(new $String("crypto/cipher: invalid buffer overlap")); - } - _tmp = arrayType.zero(); - _tmp$1 = arrayType.zero(); - counter[0] = $clone(_tmp, arrayType); - tagMask[0] = $clone(_tmp$1, arrayType); - g.deriveCounter(counter[0], nonce); - $r = g.cipher.Encrypt(new sliceType$1(tagMask[0]), new sliceType$1(counter[0])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - gcmInc32(counter[0]); - $r = g.counterCrypt(out, plaintext, counter[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - tag = arrayType.zero(); - g.auth(new sliceType$1(tag), $subslice(out, 0, plaintext.$length), data, tagMask[0]); - $copySlice($subslice(out, plaintext.$length), new sliceType$1(tag)); - $s = -1; return ret; - /* */ } return; } var $f = {$blk: gcm.ptr.prototype.Seal, $c: true, $r, _r, _tmp, _tmp$1, _tuple, counter, data, dst, g, nonce, out, plaintext, ret, tag, tagMask, x, x$1, $s};return $f; - }; - gcm.prototype.Seal = function(dst, nonce, plaintext, data) { return this.$val.Seal(dst, nonce, plaintext, data); }; - gcm.ptr.prototype.Open = function(dst, nonce, ciphertext, data) { - var {_i, _r, _ref, _tmp, _tmp$1, _tuple, ciphertext, counter, data, dst, expectedTag, g, i, nonce, out, ret, tag, tagMask, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {dst, nonce, ciphertext, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - counter = [counter]; - tagMask = [tagMask]; - g = this; - if (!((nonce.$length === g.nonceSize))) { - $panic(new $String("crypto/cipher: incorrect nonce length given to GCM")); - } - if (g.tagSize < 12) { - $panic(new $String("crypto/cipher: incorrect GCM tag size")); - } - if (ciphertext.$length < g.tagSize) { - $s = -1; return [sliceType$1.nil, errOpen]; - } - _r = g.cipher.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if ((x = (new $Uint64(0, ciphertext.$length)), x$1 = (x$2 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), x$3 = (new $Uint64(0, g.tagSize)), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = (new $Uint64(0, ciphertext.$length)), x$1 = (x$2 = $mul64(new $Uint64(0, 4294967294), (new $Uint64(0, _r))), x$3 = (new $Uint64(0, g.tagSize)), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { */ case 1: - $s = -1; return [sliceType$1.nil, errOpen]; - /* } */ case 2: - tag = $subslice(ciphertext, (ciphertext.$length - g.tagSize >> 0)); - ciphertext = $subslice(ciphertext, 0, (ciphertext.$length - g.tagSize >> 0)); - _tmp = arrayType.zero(); - _tmp$1 = arrayType.zero(); - counter[0] = $clone(_tmp, arrayType); - tagMask[0] = $clone(_tmp$1, arrayType); - g.deriveCounter(counter[0], nonce); - $r = g.cipher.Encrypt(new sliceType$1(tagMask[0]), new sliceType$1(counter[0])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - gcmInc32(counter[0]); - expectedTag = arrayType.zero(); - g.auth(new sliceType$1(expectedTag), ciphertext, data, tagMask[0]); - _tuple = sliceForAppend(dst, ciphertext.$length); - ret = _tuple[0]; - out = _tuple[1]; - if (subtle.InexactOverlap(out, ciphertext)) { - $panic(new $String("crypto/cipher: invalid buffer overlap")); - } - if (!((subtle$1.ConstantTimeCompare($subslice(new sliceType$1(expectedTag), 0, g.tagSize), tag) === 1))) { - _ref = out; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = 0); - _i++; - } - $s = -1; return [sliceType$1.nil, errOpen]; - } - $r = g.counterCrypt(out, ciphertext, counter[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ret, $ifaceNil]; - /* */ } return; } var $f = {$blk: gcm.ptr.prototype.Open, $c: true, $r, _i, _r, _ref, _tmp, _tmp$1, _tuple, ciphertext, counter, data, dst, expectedTag, g, i, nonce, out, ret, tag, tagMask, x, x$1, x$2, x$3, $s};return $f; - }; - gcm.prototype.Open = function(dst, nonce, ciphertext, data) { return this.$val.Open(dst, nonce, ciphertext, data); }; - reverseBits = function(i) { - var i; - i = ((((i << 2 >> 0)) & 12)) | ((((i >> 2 >> 0)) & 3)); - i = ((((i << 1 >> 0)) & 10)) | ((((i >> 1 >> 0)) & 5)); - return i; - }; - gcmAdd = function(x, y) { - var x, x$1, x$2, x$3, x$4, y; - return new gcmFieldElement.ptr((x$1 = x.low, x$2 = y.low, new $Uint64(x$1.$high ^ x$2.$high, (x$1.$low ^ x$2.$low) >>> 0)), (x$3 = x.high, x$4 = y.high, new $Uint64(x$3.$high ^ x$4.$high, (x$3.$low ^ x$4.$low) >>> 0))); - }; - gcmDouble = function(x) { - var double$1, msbSet, x, x$1, x$2, x$3, x$4, x$5, x$6; - double$1 = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); - msbSet = (x$1 = (x$2 = x.high, new $Uint64(x$2.$high & 0, (x$2.$low & 1) >>> 0)), (x$1.$high === 0 && x$1.$low === 1)); - double$1.high = $shiftRightUint64(x.high, 1); - double$1.high = (x$3 = double$1.high, x$4 = $shiftLeft64(x.low, 63), new $Uint64(x$3.$high | x$4.$high, (x$3.$low | x$4.$low) >>> 0)); - double$1.low = $shiftRightUint64(x.low, 1); - if (msbSet) { - double$1.low = (x$5 = double$1.low, x$6 = new $Uint64(3774873600, 0), new $Uint64(x$5.$high ^ x$6.$high, (x$5.$low ^ x$6.$low) >>> 0)); - } - return double$1; - }; - gcm.ptr.prototype.mul = function(y) { - var g, i, j, msw, t, word, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, z; - g = this; - z = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); - i = 0; - while (true) { - if (!(i < 2)) { break; } - word = y.high; - if (i === 1) { - word = y.low; - } - j = 0; - while (true) { - if (!(j < 64)) { break; } - msw = (x = z.high, new $Uint64(x.$high & 0, (x.$low & 15) >>> 0)); - z.high = $shiftRightUint64(z.high, (4)); - z.high = (x$1 = z.high, x$2 = $shiftLeft64(z.low, 60), new $Uint64(x$1.$high | x$2.$high, (x$1.$low | x$2.$low) >>> 0)); - z.low = $shiftRightUint64(z.low, (4)); - z.low = (x$3 = z.low, x$4 = $shiftLeft64((new $Uint64(0, (($flatten64(msw) < 0 || $flatten64(msw) >= gcmReductionTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : gcmReductionTable.$array[gcmReductionTable.$offset + $flatten64(msw)]))), 48), new $Uint64(x$3.$high ^ x$4.$high, (x$3.$low ^ x$4.$low) >>> 0)); - t = (x$5 = g.productTable, x$6 = new $Uint64(word.$high & 0, (word.$low & 15) >>> 0), (($flatten64(x$6) < 0 || $flatten64(x$6) >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[$flatten64(x$6)])); - z.low = (x$7 = z.low, x$8 = t.low, new $Uint64(x$7.$high ^ x$8.$high, (x$7.$low ^ x$8.$low) >>> 0)); - z.high = (x$9 = z.high, x$10 = t.high, new $Uint64(x$9.$high ^ x$10.$high, (x$9.$low ^ x$10.$low) >>> 0)); - word = $shiftRightUint64(word, (4)); - j = j + (4) >> 0; - } - i = i + (1) >> 0; - } - gcmFieldElement.copy(y, z); - }; - gcm.prototype.mul = function(y) { return this.$val.mul(y); }; - gcm.ptr.prototype.updateBlocks = function(y, blocks) { - var blocks, g, x, x$1, x$2, x$3, y; - g = this; - while (true) { - if (!(blocks.$length > 0)) { break; } - y.low = (x = y.low, x$1 = $clone(binary.BigEndian, binary.bigEndian).Uint64(blocks), new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)); - y.high = (x$2 = y.high, x$3 = $clone(binary.BigEndian, binary.bigEndian).Uint64($subslice(blocks, 8)), new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0)); - g.mul(y); - blocks = $subslice(blocks, 16); - } - }; - gcm.prototype.updateBlocks = function(y, blocks) { return this.$val.updateBlocks(y, blocks); }; - gcm.ptr.prototype.update = function(y, data) { - var data, fullBlocks, g, partialBlock, y; - g = this; - fullBlocks = ((data.$length >> 4 >> 0)) << 4 >> 0; - g.updateBlocks(y, $subslice(data, 0, fullBlocks)); - if (!((data.$length === fullBlocks))) { - partialBlock = arrayType.zero(); - $copySlice(new sliceType$1(partialBlock), $subslice(data, fullBlocks)); - g.updateBlocks(y, new sliceType$1(partialBlock)); - } - }; - gcm.prototype.update = function(y, data) { return this.$val.update(y, data); }; - gcmInc32 = function(counterBlock) { - var counterBlock, ctr$1; - ctr$1 = $subslice(new sliceType$1(counterBlock), 12); - $clone(binary.BigEndian, binary.bigEndian).PutUint32(ctr$1, $clone(binary.BigEndian, binary.bigEndian).Uint32(ctr$1) + 1 >>> 0); - }; - sliceForAppend = function(in$1, n) { - var head, in$1, n, tail, total; - head = sliceType$1.nil; - tail = sliceType$1.nil; - total = in$1.$length + n >> 0; - if (in$1.$capacity >= total) { - head = $subslice(in$1, 0, total); - } else { - head = $makeSlice(sliceType$1, total); - $copySlice(head, in$1); - } - tail = $subslice(head, in$1.$length); - return [head, tail]; - }; - gcm.ptr.prototype.counterCrypt = function(out, in$1, counter) { - var {counter, g, in$1, mask, out, $s, $r, $c} = $restore(this, {out, in$1, counter}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this; - mask = arrayType.zero(); - /* while (true) { */ case 1: - /* if (!(in$1.$length >= 16)) { break; } */ if(!(in$1.$length >= 16)) { $s = 2; continue; } - $r = g.cipher.Encrypt(new sliceType$1(mask), new sliceType$1(counter)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - gcmInc32(counter); - xorWords(out, in$1, new sliceType$1(mask)); - out = $subslice(out, 16); - in$1 = $subslice(in$1, 16); - $s = 1; continue; - case 2: - /* */ if (in$1.$length > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (in$1.$length > 0) { */ case 4: - $r = g.cipher.Encrypt(new sliceType$1(mask), new sliceType$1(counter)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - gcmInc32(counter); - xorBytes(out, in$1, new sliceType$1(mask)); - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: gcm.ptr.prototype.counterCrypt, $c: true, $r, counter, g, in$1, mask, out, $s};return $f; - }; - gcm.prototype.counterCrypt = function(out, in$1, counter) { return this.$val.counterCrypt(out, in$1, counter); }; - gcm.ptr.prototype.deriveCounter = function(counter, nonce) { - var counter, g, nonce, x, x$1, y; - g = this; - if (nonce.$length === 12) { - $copySlice(new sliceType$1(counter), nonce); - counter.nilCheck, counter[15] = 1; - } else { - y = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); - g.update(y, nonce); - y.high = (x = y.high, x$1 = $mul64((new $Uint64(0, nonce.$length)), new $Uint64(0, 8)), new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)); - g.mul(y); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(counter), 0, 8), y.low); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(counter), 8), y.high); - } - }; - gcm.prototype.deriveCounter = function(counter, nonce) { return this.$val.deriveCounter(counter, nonce); }; - gcm.ptr.prototype.auth = function(out, ciphertext, additionalData, tagMask) { - var additionalData, ciphertext, g, out, tagMask, x, x$1, x$2, x$3, y; - g = this; - y = new gcmFieldElement.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); - g.update(y, additionalData); - g.update(y, ciphertext); - y.low = (x = y.low, x$1 = $mul64((new $Uint64(0, additionalData.$length)), new $Uint64(0, 8)), new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)); - y.high = (x$2 = y.high, x$3 = $mul64((new $Uint64(0, ciphertext.$length)), new $Uint64(0, 8)), new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0)); - g.mul(y); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(out, y.low); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(out, 8), y.high); - xorWords(out, out, new sliceType$1(tagMask)); - }; - gcm.prototype.auth = function(out, ciphertext, additionalData, tagMask) { return this.$val.auth(out, ciphertext, additionalData, tagMask); }; - NewCTR = function(block, iv) { - var {$24r, _r, _r$1, _r$2, _r$3, _tuple, block, bufSize, ctr$1, iv, ok, $s, $r, $c} = $restore(this, {block, iv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(block, ctrAble, true); - ctr$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = ctr$1.NewCTR(iv); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = block.BlockSize(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!((iv.$length === _r$1))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((iv.$length === _r$1))) { */ case 5: - $panic(new $String("cipher.NewCTR: IV length must equal block size")); - /* } */ case 6: - bufSize = 512; - _r$2 = block.BlockSize(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (bufSize < _r$2) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (bufSize < _r$2) { */ case 8: - _r$3 = block.BlockSize(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - bufSize = _r$3; - /* } */ case 9: - $s = -1; return new ctr.ptr(block, dup(iv), $makeSlice(sliceType$1, 0, bufSize), 0); - /* */ } return; } var $f = {$blk: NewCTR, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _tuple, block, bufSize, ctr$1, iv, ok, $s};return $f; - }; - $pkg.NewCTR = NewCTR; - ctr.ptr.prototype.refill = function() { - var {_r, bs, i, remain, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - remain = x.out.$length - x.outUsed >> 0; - $copySlice(x.out, $subslice(x.out, x.outUsed)); - x.out = $subslice(x.out, 0, x.out.$capacity); - _r = x.b.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - bs = _r; - /* while (true) { */ case 2: - /* if (!(remain <= (x.out.$length - bs >> 0))) { break; } */ if(!(remain <= (x.out.$length - bs >> 0))) { $s = 3; continue; } - $r = x.b.Encrypt($subslice(x.out, remain), x.ctr); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - remain = remain + (bs) >> 0; - i = x.ctr.$length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - (x$2 = x.ctr, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i] = ((x$1 = x.ctr, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])) + (1) << 24 >>> 24))); - if (!(((x$3 = x.ctr, ((i < 0 || i >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i])) === 0))) { - break; - } - i = i - (1) >> 0; - } - $s = 2; continue; - case 3: - x.out = $subslice(x.out, 0, remain); - x.outUsed = 0; - $s = -1; return; - /* */ } return; } var $f = {$blk: ctr.ptr.prototype.refill, $c: true, $r, _r, bs, i, remain, x, x$1, x$2, x$3, $s};return $f; - }; - ctr.prototype.refill = function() { return this.$val.refill(); }; - ctr.ptr.prototype.XORKeyStream = function(dst, src) { - var {_r, dst, n, src, x, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (dst.$length < src.$length) { - $panic(new $String("crypto/cipher: output smaller than input")); - } - if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { - $panic(new $String("crypto/cipher: invalid buffer overlap")); - } - /* while (true) { */ case 1: - /* if (!(src.$length > 0)) { break; } */ if(!(src.$length > 0)) { $s = 2; continue; } - _r = x.b.BlockSize(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (x.outUsed >= (x.out.$length - _r >> 0)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (x.outUsed >= (x.out.$length - _r >> 0)) { */ case 3: - $r = x.refill(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - n = xorBytes(dst, src, $subslice(x.out, x.outUsed)); - dst = $subslice(dst, n); - src = $subslice(src, n); - x.outUsed = x.outUsed + (n) >> 0; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: ctr.ptr.prototype.XORKeyStream, $c: true, $r, _r, dst, n, src, x, $s};return $f; - }; - ctr.prototype.XORKeyStream = function(dst, src) { return this.$val.XORKeyStream(dst, src); }; - dup = function(p) { - var p, q; - q = $makeSlice(sliceType$1, p.$length); - $copySlice(q, p); - return q; - }; - newCBC = function(b, iv) { - var {$24r, _r, _r$1, b, iv, $s, $r, $c} = $restore(this, {b, iv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = b.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = b.BlockSize(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = new cbc.ptr(b, _r, dup(iv), $makeSlice(sliceType$1, _r$1)); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: newCBC, $c: true, $r, $24r, _r, _r$1, b, iv, $s};return $f; - }; - NewCBCEncrypter = function(b, iv) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, b, cbc$1, iv, ok, $s, $r, $c} = $restore(this, {b, iv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = b.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((iv.$length === _r))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((iv.$length === _r))) { */ case 1: - $panic(new $String("cipher.NewCBCEncrypter: IV length must equal block size")); - /* } */ case 2: - _tuple = $assertType(b, cbcEncAble, true); - cbc$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok) { */ case 4: - _r$1 = cbc$1.NewCBCEncrypter(iv); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 5: - _r$2 = newCBC(b, iv); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = ($pointerOfStructConversion(_r$2, ptrType)); - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: NewCBCEncrypter, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, b, cbc$1, iv, ok, $s};return $f; - }; - $pkg.NewCBCEncrypter = NewCBCEncrypter; - cbcEncrypter.ptr.prototype.BlockSize = function() { - var x; - x = this; - return x.blockSize; - }; - cbcEncrypter.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - cbcEncrypter.ptr.prototype.CryptBlocks = function(dst, src) { - var {_r, dst, iv, src, x, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (!(((_r = src.$length % x.blockSize, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { - $panic(new $String("crypto/cipher: input not full blocks")); - } - if (dst.$length < src.$length) { - $panic(new $String("crypto/cipher: output smaller than input")); - } - if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { - $panic(new $String("crypto/cipher: invalid buffer overlap")); - } - iv = x.iv; - /* while (true) { */ case 1: - /* if (!(src.$length > 0)) { break; } */ if(!(src.$length > 0)) { $s = 2; continue; } - xorBytes($subslice(dst, 0, x.blockSize), $subslice(src, 0, x.blockSize), iv); - $r = x.b.Encrypt($subslice(dst, 0, x.blockSize), $subslice(dst, 0, x.blockSize)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - iv = $subslice(dst, 0, x.blockSize); - src = $subslice(src, x.blockSize); - dst = $subslice(dst, x.blockSize); - $s = 1; continue; - case 2: - $copySlice(x.iv, iv); - $s = -1; return; - /* */ } return; } var $f = {$blk: cbcEncrypter.ptr.prototype.CryptBlocks, $c: true, $r, _r, dst, iv, src, x, $s};return $f; - }; - cbcEncrypter.prototype.CryptBlocks = function(dst, src) { return this.$val.CryptBlocks(dst, src); }; - cbcEncrypter.ptr.prototype.SetIV = function(iv) { - var iv, x; - x = this; - if (!((iv.$length === x.iv.$length))) { - $panic(new $String("cipher: incorrect length IV")); - } - $copySlice(x.iv, iv); - }; - cbcEncrypter.prototype.SetIV = function(iv) { return this.$val.SetIV(iv); }; - NewCBCDecrypter = function(b, iv) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, b, cbc$1, iv, ok, $s, $r, $c} = $restore(this, {b, iv}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = b.BlockSize(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((iv.$length === _r))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((iv.$length === _r))) { */ case 1: - $panic(new $String("cipher.NewCBCDecrypter: IV length must equal block size")); - /* } */ case 2: - _tuple = $assertType(b, cbcDecAble, true); - cbc$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok) { */ case 4: - _r$1 = cbc$1.NewCBCDecrypter(iv); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 5: - _r$2 = newCBC(b, iv); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = ($pointerOfStructConversion(_r$2, ptrType$1)); - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: NewCBCDecrypter, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, b, cbc$1, iv, ok, $s};return $f; - }; - $pkg.NewCBCDecrypter = NewCBCDecrypter; - cbcDecrypter.ptr.prototype.BlockSize = function() { - var x; - x = this; - return x.blockSize; - }; - cbcDecrypter.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - cbcDecrypter.ptr.prototype.CryptBlocks = function(dst, src) { - var {_r, _tmp, _tmp$1, dst, end, prev, src, start, x, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - if (!(((_r = src.$length % x.blockSize, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { - $panic(new $String("crypto/cipher: input not full blocks")); - } - if (dst.$length < src.$length) { - $panic(new $String("crypto/cipher: output smaller than input")); - } - if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { - $panic(new $String("crypto/cipher: invalid buffer overlap")); - } - if (src.$length === 0) { - $s = -1; return; - } - end = src.$length; - start = end - x.blockSize >> 0; - prev = start - x.blockSize >> 0; - $copySlice(x.tmp, $subslice(src, start, end)); - /* while (true) { */ case 1: - /* if (!(start > 0)) { break; } */ if(!(start > 0)) { $s = 2; continue; } - $r = x.b.Decrypt($subslice(dst, start, end), $subslice(src, start, end)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - xorBytes($subslice(dst, start, end), $subslice(dst, start, end), $subslice(src, prev, start)); - end = start; - start = prev; - prev = prev - (x.blockSize) >> 0; - $s = 1; continue; - case 2: - $r = x.b.Decrypt($subslice(dst, start, end), $subslice(src, start, end)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - xorBytes($subslice(dst, start, end), $subslice(dst, start, end), x.iv); - _tmp = x.tmp; - _tmp$1 = x.iv; - x.iv = _tmp; - x.tmp = _tmp$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: cbcDecrypter.ptr.prototype.CryptBlocks, $c: true, $r, _r, _tmp, _tmp$1, dst, end, prev, src, start, x, $s};return $f; - }; - cbcDecrypter.prototype.CryptBlocks = function(dst, src) { return this.$val.CryptBlocks(dst, src); }; - cbcDecrypter.ptr.prototype.SetIV = function(iv) { - var iv, x; - x = this; - if (!((iv.$length === x.iv.$length))) { - $panic(new $String("cipher: incorrect length IV")); - } - $copySlice(x.iv, iv); - }; - cbcDecrypter.prototype.SetIV = function(iv) { return this.$val.SetIV(iv); }; - StreamReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; - ptrType$5.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1, $error], false)}, {prop: "mul", name: "mul", pkg: "crypto/cipher", typ: $funcType([ptrType$3], [], false)}, {prop: "updateBlocks", name: "updateBlocks", pkg: "crypto/cipher", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "update", name: "update", pkg: "crypto/cipher", typ: $funcType([ptrType$3, sliceType$1], [], false)}, {prop: "counterCrypt", name: "counterCrypt", pkg: "crypto/cipher", typ: $funcType([sliceType$1, sliceType$1, ptrType$4], [], false)}, {prop: "deriveCounter", name: "deriveCounter", pkg: "crypto/cipher", typ: $funcType([ptrType$4, sliceType$1], [], false)}, {prop: "auth", name: "auth", pkg: "crypto/cipher", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, ptrType$4], [], false)}]; - ptrType$6.methods = [{prop: "refill", name: "refill", pkg: "crypto/cipher", typ: $funcType([], [], false)}, {prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]; - ptrType.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "SetIV", name: "SetIV", pkg: "", typ: $funcType([sliceType$1], [], false)}]; - ptrType$1.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "SetIV", name: "SetIV", pkg: "", typ: $funcType([sliceType$1], [], false)}]; - StreamReader.init("", [{prop: "S", name: "S", embedded: false, exported: true, typ: Stream, tag: ""}, {prop: "R", name: "R", embedded: false, exported: true, typ: io.Reader, tag: ""}]); - AEAD.init([{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1, $error], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$1, sliceType$1, sliceType$1, sliceType$1], [sliceType$1], false)}]); - gcmAble.init([{prop: "NewGCM", name: "NewGCM", pkg: "", typ: $funcType([$Int, $Int], [AEAD, $error], false)}]); - gcmFieldElement.init("crypto/cipher", [{prop: "low", name: "low", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "high", name: "high", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - gcm.init("crypto/cipher", [{prop: "cipher", name: "cipher", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "nonceSize", name: "nonceSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tagSize", name: "tagSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "productTable", name: "productTable", embedded: false, exported: false, typ: arrayType$1, tag: ""}]); - ctr.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "ctr", name: "ctr", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "outUsed", name: "outUsed", embedded: false, exported: false, typ: $Int, tag: ""}]); - ctrAble.init([{prop: "NewCTR", name: "NewCTR", pkg: "", typ: $funcType([sliceType$1], [Stream], false)}]); - Block.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]); - Stream.init([{prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]); - BlockMode.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]); - cbc.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "blockSize", name: "blockSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "iv", name: "iv", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - cbcEncrypter.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "blockSize", name: "blockSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "iv", name: "iv", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - cbcEncAble.init([{prop: "NewCBCEncrypter", name: "NewCBCEncrypter", pkg: "", typ: $funcType([sliceType$1], [BlockMode], false)}]); - cbcDecrypter.init("crypto/cipher", [{prop: "b", name: "b", embedded: false, exported: false, typ: Block, tag: ""}, {prop: "blockSize", name: "blockSize", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "iv", name: "iv", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - cbcDecAble.init([{prop: "NewCBCDecrypter", name: "NewCBCDecrypter", pkg: "", typ: $funcType([sliceType$1], [BlockMode], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle$1.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - errOpen = errors.New("cipher: message authentication failed"); - gcmReductionTable = new sliceType([0, 7200, 14400, 9312, 28800, 27808, 18624, 21728, 57600, 64800, 55616, 50528, 37248, 36256, 43456, 46560]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/aes"] = (function() { - var $pkg = {}, $init, cipher, subtle, binary, strconv, aesCipher, KeySizeError, sliceType, sliceType$1, ptrType, powx, sbox0, sbox1, te0, te1, te2, te3, td0, td1, td2, td3, newCipher, NewCipher, newCipherGeneric, encryptBlockGo, decryptBlockGo, subw, rotw, expandKeyGo; - cipher = $packages["crypto/cipher"]; - subtle = $packages["crypto/internal/subtle"]; - binary = $packages["encoding/binary"]; - strconv = $packages["strconv"]; - aesCipher = $pkg.aesCipher = $newType(0, $kindStruct, "aes.aesCipher", true, "crypto/aes", false, function(enc_, dec_) { - this.$val = this; - if (arguments.length === 0) { - this.enc = sliceType.nil; - this.dec = sliceType.nil; - return; - } - this.enc = enc_; - this.dec = dec_; - }); - KeySizeError = $pkg.KeySizeError = $newType(4, $kindInt, "aes.KeySizeError", true, "crypto/aes", true, null); - sliceType = $sliceType($Uint32); - sliceType$1 = $sliceType($Uint8); - ptrType = $ptrType(aesCipher); - newCipher = function(key) { - var key; - return newCipherGeneric(key); - }; - KeySizeError.prototype.Error = function() { - var k; - k = this.$val; - return "crypto/aes: invalid key size " + strconv.Itoa(((k >> 0))); - }; - $ptrType(KeySizeError).prototype.Error = function() { return new KeySizeError(this.$get()).Error(); }; - NewCipher = function(key) { - var _1, k, key; - k = key.$length; - switch (0) { default: - _1 = k; - if ((_1 === (16)) || (_1 === (24)) || (_1 === (32))) { - break; - } else { - return [$ifaceNil, new KeySizeError(((k >> 0)))]; - } - } - return newCipher(key); - }; - $pkg.NewCipher = NewCipher; - newCipherGeneric = function(key) { - var c, key, n; - n = key.$length + 28 >> 0; - c = new aesCipher.ptr($makeSlice(sliceType, n), $makeSlice(sliceType, n)); - expandKeyGo(key, c.enc, c.dec); - return [c, $ifaceNil]; - }; - aesCipher.ptr.prototype.BlockSize = function() { - var c; - c = this; - return 16; - }; - aesCipher.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - aesCipher.ptr.prototype.Encrypt = function(dst, src) { - var c, dst, src; - c = this; - if (src.$length < 16) { - $panic(new $String("crypto/aes: input not full block")); - } - if (dst.$length < 16) { - $panic(new $String("crypto/aes: output not full block")); - } - if (subtle.InexactOverlap($subslice(dst, 0, 16), $subslice(src, 0, 16))) { - $panic(new $String("crypto/aes: invalid buffer overlap")); - } - encryptBlockGo(c.enc, dst, src); - }; - aesCipher.prototype.Encrypt = function(dst, src) { return this.$val.Encrypt(dst, src); }; - aesCipher.ptr.prototype.Decrypt = function(dst, src) { - var c, dst, src; - c = this; - if (src.$length < 16) { - $panic(new $String("crypto/aes: input not full block")); - } - if (dst.$length < 16) { - $panic(new $String("crypto/aes: output not full block")); - } - if (subtle.InexactOverlap($subslice(dst, 0, 16), $subslice(src, 0, 16))) { - $panic(new $String("crypto/aes: invalid buffer overlap")); - } - decryptBlockGo(c.dec, dst, src); - }; - aesCipher.prototype.Decrypt = function(dst, src) { return this.$val.Decrypt(dst, src); }; - encryptBlockGo = function(xk, dst, src) { - var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, dst, k, nr, r, s0, s1, s2, s3, src, t0, t1, t2, t3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$5, x$6, x$7, x$8, x$9, xk; - $unused((15 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 15])); - s0 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 0, 4)); - s1 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 4, 8)); - s2 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 8, 12)); - s3 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 12, 16)); - s0 = (s0 ^ ((0 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 0]))) >>> 0; - s1 = (s1 ^ ((1 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 1]))) >>> 0; - s2 = (s2 ^ ((2 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 2]))) >>> 0; - s3 = (s3 ^ ((3 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 3]))) >>> 0; - nr = (_q = xk.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - 2 >> 0; - k = 4; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = 0; - t0 = _tmp; - t1 = _tmp$1; - t2 = _tmp$2; - t3 = _tmp$3; - r = 0; - while (true) { - if (!(r < nr)) { break; } - t0 = ((((((((x = k + 0 >> 0, ((x < 0 || x >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x])) ^ (x$1 = (((s0 >>> 24 >>> 0) << 24 >>> 24)), ((x$1 < 0 || x$1 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$1]))) >>> 0) ^ (x$2 = (((s1 >>> 16 >>> 0) << 24 >>> 24)), ((x$2 < 0 || x$2 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$2]))) >>> 0) ^ (x$3 = (((s2 >>> 8 >>> 0) << 24 >>> 24)), ((x$3 < 0 || x$3 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$3]))) >>> 0) ^ (x$4 = ((s3 << 24 >>> 24)), ((x$4 < 0 || x$4 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$4]))) >>> 0; - t1 = ((((((((x$5 = k + 1 >> 0, ((x$5 < 0 || x$5 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$5])) ^ (x$6 = (((s1 >>> 24 >>> 0) << 24 >>> 24)), ((x$6 < 0 || x$6 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$6]))) >>> 0) ^ (x$7 = (((s2 >>> 16 >>> 0) << 24 >>> 24)), ((x$7 < 0 || x$7 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$7]))) >>> 0) ^ (x$8 = (((s3 >>> 8 >>> 0) << 24 >>> 24)), ((x$8 < 0 || x$8 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$8]))) >>> 0) ^ (x$9 = ((s0 << 24 >>> 24)), ((x$9 < 0 || x$9 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$9]))) >>> 0; - t2 = ((((((((x$10 = k + 2 >> 0, ((x$10 < 0 || x$10 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$10])) ^ (x$11 = (((s2 >>> 24 >>> 0) << 24 >>> 24)), ((x$11 < 0 || x$11 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$11]))) >>> 0) ^ (x$12 = (((s3 >>> 16 >>> 0) << 24 >>> 24)), ((x$12 < 0 || x$12 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$12]))) >>> 0) ^ (x$13 = (((s0 >>> 8 >>> 0) << 24 >>> 24)), ((x$13 < 0 || x$13 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$13]))) >>> 0) ^ (x$14 = ((s1 << 24 >>> 24)), ((x$14 < 0 || x$14 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$14]))) >>> 0; - t3 = ((((((((x$15 = k + 3 >> 0, ((x$15 < 0 || x$15 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$15])) ^ (x$16 = (((s3 >>> 24 >>> 0) << 24 >>> 24)), ((x$16 < 0 || x$16 >= te0.length) ? ($throwRuntimeError("index out of range"), undefined) : te0[x$16]))) >>> 0) ^ (x$17 = (((s0 >>> 16 >>> 0) << 24 >>> 24)), ((x$17 < 0 || x$17 >= te1.length) ? ($throwRuntimeError("index out of range"), undefined) : te1[x$17]))) >>> 0) ^ (x$18 = (((s1 >>> 8 >>> 0) << 24 >>> 24)), ((x$18 < 0 || x$18 >= te2.length) ? ($throwRuntimeError("index out of range"), undefined) : te2[x$18]))) >>> 0) ^ (x$19 = ((s2 << 24 >>> 24)), ((x$19 < 0 || x$19 >= te3.length) ? ($throwRuntimeError("index out of range"), undefined) : te3[x$19]))) >>> 0; - k = k + (4) >> 0; - _tmp$4 = t0; - _tmp$5 = t1; - _tmp$6 = t2; - _tmp$7 = t3; - s0 = _tmp$4; - s1 = _tmp$5; - s2 = _tmp$6; - s3 = _tmp$7; - r = r + (1) >> 0; - } - s0 = (((((((((x$20 = t0 >>> 24 >>> 0, ((x$20 < 0 || x$20 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$20])) >>> 0)) << 24 >>> 0) | ((((x$21 = ((t1 >>> 16 >>> 0) & 255) >>> 0, ((x$21 < 0 || x$21 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$21])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$22 = ((t2 >>> 8 >>> 0) & 255) >>> 0, ((x$22 < 0 || x$22 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$22])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$23 = (t3 & 255) >>> 0, ((x$23 < 0 || x$23 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$23])) >>> 0))) >>> 0; - s1 = (((((((((x$24 = t1 >>> 24 >>> 0, ((x$24 < 0 || x$24 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$24])) >>> 0)) << 24 >>> 0) | ((((x$25 = ((t2 >>> 16 >>> 0) & 255) >>> 0, ((x$25 < 0 || x$25 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$25])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$26 = ((t3 >>> 8 >>> 0) & 255) >>> 0, ((x$26 < 0 || x$26 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$26])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$27 = (t0 & 255) >>> 0, ((x$27 < 0 || x$27 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$27])) >>> 0))) >>> 0; - s2 = (((((((((x$28 = t2 >>> 24 >>> 0, ((x$28 < 0 || x$28 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$28])) >>> 0)) << 24 >>> 0) | ((((x$29 = ((t3 >>> 16 >>> 0) & 255) >>> 0, ((x$29 < 0 || x$29 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$29])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$30 = ((t0 >>> 8 >>> 0) & 255) >>> 0, ((x$30 < 0 || x$30 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$30])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$31 = (t1 & 255) >>> 0, ((x$31 < 0 || x$31 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$31])) >>> 0))) >>> 0; - s3 = (((((((((x$32 = t3 >>> 24 >>> 0, ((x$32 < 0 || x$32 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$32])) >>> 0)) << 24 >>> 0) | ((((x$33 = ((t0 >>> 16 >>> 0) & 255) >>> 0, ((x$33 < 0 || x$33 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$33])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$34 = ((t1 >>> 8 >>> 0) & 255) >>> 0, ((x$34 < 0 || x$34 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$34])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$35 = (t2 & 255) >>> 0, ((x$35 < 0 || x$35 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$35])) >>> 0))) >>> 0; - s0 = (s0 ^ ((x$36 = k + 0 >> 0, ((x$36 < 0 || x$36 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$36])))) >>> 0; - s1 = (s1 ^ ((x$37 = k + 1 >> 0, ((x$37 < 0 || x$37 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$37])))) >>> 0; - s2 = (s2 ^ ((x$38 = k + 2 >> 0, ((x$38 < 0 || x$38 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$38])))) >>> 0; - s3 = (s3 ^ ((x$39 = k + 3 >> 0, ((x$39 < 0 || x$39 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$39])))) >>> 0; - $unused((15 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 15])); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 0, 4), s0); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 4, 8), s1); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 8, 12), s2); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 12, 16), s3); - }; - decryptBlockGo = function(xk, dst, src) { - var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, dst, k, nr, r, s0, s1, s2, s3, src, t0, t1, t2, t3, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$5, x$6, x$7, x$8, x$9, xk; - $unused((15 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 15])); - s0 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 0, 4)); - s1 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 4, 8)); - s2 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 8, 12)); - s3 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(src, 12, 16)); - s0 = (s0 ^ ((0 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 0]))) >>> 0; - s1 = (s1 ^ ((1 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 1]))) >>> 0; - s2 = (s2 ^ ((2 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 2]))) >>> 0; - s3 = (s3 ^ ((3 >= xk.$length ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + 3]))) >>> 0; - nr = (_q = xk.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - 2 >> 0; - k = 4; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = 0; - t0 = _tmp; - t1 = _tmp$1; - t2 = _tmp$2; - t3 = _tmp$3; - r = 0; - while (true) { - if (!(r < nr)) { break; } - t0 = ((((((((x = k + 0 >> 0, ((x < 0 || x >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x])) ^ (x$1 = (((s0 >>> 24 >>> 0) << 24 >>> 24)), ((x$1 < 0 || x$1 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$1]))) >>> 0) ^ (x$2 = (((s3 >>> 16 >>> 0) << 24 >>> 24)), ((x$2 < 0 || x$2 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$2]))) >>> 0) ^ (x$3 = (((s2 >>> 8 >>> 0) << 24 >>> 24)), ((x$3 < 0 || x$3 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$3]))) >>> 0) ^ (x$4 = ((s1 << 24 >>> 24)), ((x$4 < 0 || x$4 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$4]))) >>> 0; - t1 = ((((((((x$5 = k + 1 >> 0, ((x$5 < 0 || x$5 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$5])) ^ (x$6 = (((s1 >>> 24 >>> 0) << 24 >>> 24)), ((x$6 < 0 || x$6 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$6]))) >>> 0) ^ (x$7 = (((s0 >>> 16 >>> 0) << 24 >>> 24)), ((x$7 < 0 || x$7 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$7]))) >>> 0) ^ (x$8 = (((s3 >>> 8 >>> 0) << 24 >>> 24)), ((x$8 < 0 || x$8 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$8]))) >>> 0) ^ (x$9 = ((s2 << 24 >>> 24)), ((x$9 < 0 || x$9 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$9]))) >>> 0; - t2 = ((((((((x$10 = k + 2 >> 0, ((x$10 < 0 || x$10 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$10])) ^ (x$11 = (((s2 >>> 24 >>> 0) << 24 >>> 24)), ((x$11 < 0 || x$11 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$11]))) >>> 0) ^ (x$12 = (((s1 >>> 16 >>> 0) << 24 >>> 24)), ((x$12 < 0 || x$12 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$12]))) >>> 0) ^ (x$13 = (((s0 >>> 8 >>> 0) << 24 >>> 24)), ((x$13 < 0 || x$13 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$13]))) >>> 0) ^ (x$14 = ((s3 << 24 >>> 24)), ((x$14 < 0 || x$14 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$14]))) >>> 0; - t3 = ((((((((x$15 = k + 3 >> 0, ((x$15 < 0 || x$15 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$15])) ^ (x$16 = (((s3 >>> 24 >>> 0) << 24 >>> 24)), ((x$16 < 0 || x$16 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$16]))) >>> 0) ^ (x$17 = (((s2 >>> 16 >>> 0) << 24 >>> 24)), ((x$17 < 0 || x$17 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$17]))) >>> 0) ^ (x$18 = (((s1 >>> 8 >>> 0) << 24 >>> 24)), ((x$18 < 0 || x$18 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$18]))) >>> 0) ^ (x$19 = ((s0 << 24 >>> 24)), ((x$19 < 0 || x$19 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$19]))) >>> 0; - k = k + (4) >> 0; - _tmp$4 = t0; - _tmp$5 = t1; - _tmp$6 = t2; - _tmp$7 = t3; - s0 = _tmp$4; - s1 = _tmp$5; - s2 = _tmp$6; - s3 = _tmp$7; - r = r + (1) >> 0; - } - s0 = (((((((((x$20 = t0 >>> 24 >>> 0, ((x$20 < 0 || x$20 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$20])) >>> 0)) << 24 >>> 0) | ((((x$21 = ((t3 >>> 16 >>> 0) & 255) >>> 0, ((x$21 < 0 || x$21 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$21])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$22 = ((t2 >>> 8 >>> 0) & 255) >>> 0, ((x$22 < 0 || x$22 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$22])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$23 = (t1 & 255) >>> 0, ((x$23 < 0 || x$23 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$23])) >>> 0))) >>> 0; - s1 = (((((((((x$24 = t1 >>> 24 >>> 0, ((x$24 < 0 || x$24 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$24])) >>> 0)) << 24 >>> 0) | ((((x$25 = ((t0 >>> 16 >>> 0) & 255) >>> 0, ((x$25 < 0 || x$25 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$25])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$26 = ((t3 >>> 8 >>> 0) & 255) >>> 0, ((x$26 < 0 || x$26 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$26])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$27 = (t2 & 255) >>> 0, ((x$27 < 0 || x$27 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$27])) >>> 0))) >>> 0; - s2 = (((((((((x$28 = t2 >>> 24 >>> 0, ((x$28 < 0 || x$28 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$28])) >>> 0)) << 24 >>> 0) | ((((x$29 = ((t1 >>> 16 >>> 0) & 255) >>> 0, ((x$29 < 0 || x$29 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$29])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$30 = ((t0 >>> 8 >>> 0) & 255) >>> 0, ((x$30 < 0 || x$30 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$30])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$31 = (t3 & 255) >>> 0, ((x$31 < 0 || x$31 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$31])) >>> 0))) >>> 0; - s3 = (((((((((x$32 = t3 >>> 24 >>> 0, ((x$32 < 0 || x$32 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$32])) >>> 0)) << 24 >>> 0) | ((((x$33 = ((t2 >>> 16 >>> 0) & 255) >>> 0, ((x$33 < 0 || x$33 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$33])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$34 = ((t1 >>> 8 >>> 0) & 255) >>> 0, ((x$34 < 0 || x$34 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$34])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$35 = (t0 & 255) >>> 0, ((x$35 < 0 || x$35 >= sbox1.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox1[x$35])) >>> 0))) >>> 0; - s0 = (s0 ^ ((x$36 = k + 0 >> 0, ((x$36 < 0 || x$36 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$36])))) >>> 0; - s1 = (s1 ^ ((x$37 = k + 1 >> 0, ((x$37 < 0 || x$37 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$37])))) >>> 0; - s2 = (s2 ^ ((x$38 = k + 2 >> 0, ((x$38 < 0 || x$38 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$38])))) >>> 0; - s3 = (s3 ^ ((x$39 = k + 3 >> 0, ((x$39 < 0 || x$39 >= xk.$length) ? ($throwRuntimeError("index out of range"), undefined) : xk.$array[xk.$offset + x$39])))) >>> 0; - $unused((15 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 15])); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 0, 4), s0); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 4, 8), s1); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 8, 12), s2); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(dst, 12, 16), s3); - }; - subw = function(w) { - var w, x, x$1, x$2, x$3; - return (((((((((x = w >>> 24 >>> 0, ((x < 0 || x >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x])) >>> 0)) << 24 >>> 0) | ((((x$1 = ((w >>> 16 >>> 0) & 255) >>> 0, ((x$1 < 0 || x$1 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$1])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$2 = ((w >>> 8 >>> 0) & 255) >>> 0, ((x$2 < 0 || x$2 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$2])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$3 = (w & 255) >>> 0, ((x$3 < 0 || x$3 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$3])) >>> 0))) >>> 0; - }; - rotw = function(w) { - var w; - return ((w << 8 >>> 0) | (w >>> 24 >>> 0)) >>> 0; - }; - expandKeyGo = function(key, enc, dec) { - var _q, _q$1, _r, _r$1, dec, ei, enc, i, i$1, j, key, n, nk, t, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - i = 0; - nk = (_q = key.$length / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - i = 0; - while (true) { - if (!(i < nk)) { break; } - ((i < 0 || i >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + i] = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(key, ($imul(4, i))))); - i = i + (1) >> 0; - } - while (true) { - if (!(i < enc.$length)) { break; } - t = (x = i - 1 >> 0, ((x < 0 || x >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + x])); - if ((_r = i % nk, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0) { - t = (subw(rotw(t)) ^ (((((x$1 = (_q$1 = i / nk, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) - 1 >> 0, ((x$1 < 0 || x$1 >= powx.length) ? ($throwRuntimeError("index out of range"), undefined) : powx[x$1])) >>> 0)) << 24 >>> 0))) >>> 0; - } else if (nk > 6 && ((_r$1 = i % nk, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 4)) { - t = subw(t); - } - ((i < 0 || i >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + i] = (((x$2 = i - nk >> 0, ((x$2 < 0 || x$2 >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + x$2])) ^ t) >>> 0)); - i = i + (1) >> 0; - } - if (dec === sliceType.nil) { - return; - } - n = enc.$length; - i$1 = 0; - while (true) { - if (!(i$1 < n)) { break; } - ei = (n - i$1 >> 0) - 4 >> 0; - j = 0; - while (true) { - if (!(j < 4)) { break; } - x$4 = (x$3 = ei + j >> 0, ((x$3 < 0 || x$3 >= enc.$length) ? ($throwRuntimeError("index out of range"), undefined) : enc.$array[enc.$offset + x$3])); - if (i$1 > 0 && (i$1 + 4 >> 0) < n) { - x$4 = ((((((x$5 = (x$6 = x$4 >>> 24 >>> 0, ((x$6 < 0 || x$6 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$6])), ((x$5 < 0 || x$5 >= td0.length) ? ($throwRuntimeError("index out of range"), undefined) : td0[x$5])) ^ (x$7 = (x$8 = ((x$4 >>> 16 >>> 0) & 255) >>> 0, ((x$8 < 0 || x$8 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$8])), ((x$7 < 0 || x$7 >= td1.length) ? ($throwRuntimeError("index out of range"), undefined) : td1[x$7]))) >>> 0) ^ (x$9 = (x$10 = ((x$4 >>> 8 >>> 0) & 255) >>> 0, ((x$10 < 0 || x$10 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$10])), ((x$9 < 0 || x$9 >= td2.length) ? ($throwRuntimeError("index out of range"), undefined) : td2[x$9]))) >>> 0) ^ (x$11 = (x$12 = (x$4 & 255) >>> 0, ((x$12 < 0 || x$12 >= sbox0.length) ? ($throwRuntimeError("index out of range"), undefined) : sbox0[x$12])), ((x$11 < 0 || x$11 >= td3.length) ? ($throwRuntimeError("index out of range"), undefined) : td3[x$11]))) >>> 0; - } - (x$13 = i$1 + j >> 0, ((x$13 < 0 || x$13 >= dec.$length) ? ($throwRuntimeError("index out of range"), undefined) : dec.$array[dec.$offset + x$13] = x$4)); - j = j + (1) >> 0; - } - i$1 = i$1 + (4) >> 0; - } - }; - ptrType.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]; - KeySizeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - aesCipher.init("crypto/aes", [{prop: "enc", name: "enc", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "dec", name: "dec", embedded: false, exported: false, typ: sliceType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - powx = $toNativeArray($kindUint8, [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47]); - sbox0 = $toNativeArray($kindUint8, [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22]); - sbox1 = $toNativeArray($kindUint8, [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125]); - te0 = $toNativeArray($kindUint32, [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986]); - te1 = $toNativeArray($kindUint32, [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766]); - te2 = $toNativeArray($kindUint32, [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126]); - te3 = $toNativeArray($kindUint32, [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436]); - td0 = $toNativeArray($kindUint32, [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890]); - td1 = $toNativeArray($kindUint32, [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935]); - td2 = $toNativeArray($kindUint32, [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239000, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600]); - td3 = $toNativeArray($kindUint32, [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998000, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/des"] = (function() { - var $pkg = {}, $init, cipher, subtle, binary, strconv, sync, KeySizeError, desCipher, tripleDESCipher, arrayType, arrayType$1, arrayType$2, arrayType$3, arrayType$4, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, permutationFunction, permutedChoice1, permutedChoice2, sBoxes, ksRotations, feistelBox, feistelBoxOnce, NewTripleDESCipher, cryptBlock, encryptBlock, decryptBlock, feistel, permuteBlock, initFeistelBox, permuteInitialBlock, permuteFinalBlock, ksRotate, unpack; - cipher = $packages["crypto/cipher"]; - subtle = $packages["crypto/internal/subtle"]; - binary = $packages["encoding/binary"]; - strconv = $packages["strconv"]; - sync = $packages["sync"]; - KeySizeError = $pkg.KeySizeError = $newType(4, $kindInt, "des.KeySizeError", true, "crypto/des", true, null); - desCipher = $pkg.desCipher = $newType(0, $kindStruct, "des.desCipher", true, "crypto/des", false, function(subkeys_) { - this.$val = this; - if (arguments.length === 0) { - this.subkeys = arrayType$4.zero(); - return; - } - this.subkeys = subkeys_; - }); - tripleDESCipher = $pkg.tripleDESCipher = $newType(0, $kindStruct, "des.tripleDESCipher", true, "crypto/des", false, function(cipher1_, cipher2_, cipher3_) { - this.$val = this; - if (arguments.length === 0) { - this.cipher1 = new desCipher.ptr(arrayType$4.zero()); - this.cipher2 = new desCipher.ptr(arrayType$4.zero()); - this.cipher3 = new desCipher.ptr(arrayType$4.zero()); - return; - } - this.cipher1 = cipher1_; - this.cipher2 = cipher2_; - this.cipher3 = cipher3_; - }); - arrayType = $arrayType($Uint32, 64); - arrayType$1 = $arrayType(arrayType, 8); - arrayType$2 = $arrayType($Uint8, 16); - arrayType$3 = $arrayType(arrayType$2, 4); - arrayType$4 = $arrayType($Uint64, 16); - sliceType = $sliceType($Uint64); - sliceType$1 = $sliceType($Uint8); - sliceType$2 = $sliceType($Uint32); - ptrType = $ptrType(desCipher); - ptrType$1 = $ptrType(tripleDESCipher); - KeySizeError.prototype.Error = function() { - var k; - k = this.$val; - return "crypto/des: invalid key size " + strconv.Itoa(((k >> 0))); - }; - $ptrType(KeySizeError).prototype.Error = function() { return new KeySizeError(this.$get()).Error(); }; - desCipher.ptr.prototype.BlockSize = function() { - var c; - c = this; - return 8; - }; - desCipher.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - desCipher.ptr.prototype.Encrypt = function(dst, src) { - var c, dst, src; - c = this; - if (src.$length < 8) { - $panic(new $String("crypto/des: input not full block")); - } - if (dst.$length < 8) { - $panic(new $String("crypto/des: output not full block")); - } - if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { - $panic(new $String("crypto/des: invalid buffer overlap")); - } - encryptBlock(new sliceType(c.subkeys), dst, src); - }; - desCipher.prototype.Encrypt = function(dst, src) { return this.$val.Encrypt(dst, src); }; - desCipher.ptr.prototype.Decrypt = function(dst, src) { - var c, dst, src; - c = this; - if (src.$length < 8) { - $panic(new $String("crypto/des: input not full block")); - } - if (dst.$length < 8) { - $panic(new $String("crypto/des: output not full block")); - } - if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { - $panic(new $String("crypto/des: invalid buffer overlap")); - } - decryptBlock(new sliceType(c.subkeys), dst, src); - }; - desCipher.prototype.Decrypt = function(dst, src) { return this.$val.Decrypt(dst, src); }; - NewTripleDESCipher = function(key) { - var {c, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((key.$length === 24))) { - $s = -1; return [$ifaceNil, new KeySizeError(((key.$length >> 0)))]; - } - c = new tripleDESCipher.ptr(new desCipher.ptr(arrayType$4.zero()), new desCipher.ptr(arrayType$4.zero()), new desCipher.ptr(arrayType$4.zero())); - $r = c.cipher1.generateSubkeys($subslice(key, 0, 8)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = c.cipher2.generateSubkeys($subslice(key, 8, 16)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = c.cipher3.generateSubkeys($subslice(key, 16)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: NewTripleDESCipher, $c: true, $r, c, key, $s};return $f; - }; - $pkg.NewTripleDESCipher = NewTripleDESCipher; - tripleDESCipher.ptr.prototype.BlockSize = function() { - var c; - c = this; - return 8; - }; - tripleDESCipher.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - tripleDESCipher.ptr.prototype.Encrypt = function(dst, src) { - var _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, dst, i, i$1, i$2, left, preOutput, right, src, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - c = this; - if (src.$length < 8) { - $panic(new $String("crypto/des: input not full block")); - } - if (dst.$length < 8) { - $panic(new $String("crypto/des: output not full block")); - } - if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { - $panic(new $String("crypto/des: invalid buffer overlap")); - } - b = $clone(binary.BigEndian, binary.bigEndian).Uint64(src); - b = permuteInitialBlock(b); - _tmp = (($shiftRightUint64(b, 32).$low >>> 0)); - _tmp$1 = ((b.$low >>> 0)); - left = _tmp; - right = _tmp$1; - left = (((left << 1 >>> 0)) | ((left >>> 31 >>> 0))) >>> 0; - right = (((right << 1 >>> 0)) | ((right >>> 31 >>> 0))) >>> 0; - i = 0; - while (true) { - if (!(i < 8)) { break; } - _tuple = feistel(left, right, (x = c.cipher1.subkeys, x$1 = $imul(2, i), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = c.cipher1.subkeys, x$3 = ($imul(2, i)) + 1 >> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))); - left = _tuple[0]; - right = _tuple[1]; - i = i + (1) >> 0; - } - i$1 = 0; - while (true) { - if (!(i$1 < 8)) { break; } - _tuple$1 = feistel(right, left, (x$4 = c.cipher2.subkeys, x$5 = 15 - ($imul(2, i$1)) >> 0, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), (x$6 = c.cipher2.subkeys, x$7 = 15 - ((($imul(2, i$1)) + 1 >> 0)) >> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))); - right = _tuple$1[0]; - left = _tuple$1[1]; - i$1 = i$1 + (1) >> 0; - } - i$2 = 0; - while (true) { - if (!(i$2 < 8)) { break; } - _tuple$2 = feistel(left, right, (x$8 = c.cipher3.subkeys, x$9 = $imul(2, i$2), ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])), (x$10 = c.cipher3.subkeys, x$11 = ($imul(2, i$2)) + 1 >> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))); - left = _tuple$2[0]; - right = _tuple$2[1]; - i$2 = i$2 + (1) >> 0; - } - left = (((left << 31 >>> 0)) | ((left >>> 1 >>> 0))) >>> 0; - right = (((right << 31 >>> 0)) | ((right >>> 1 >>> 0))) >>> 0; - preOutput = (x$12 = $shiftLeft64((new $Uint64(0, right)), 32), x$13 = (new $Uint64(0, left)), new $Uint64(x$12.$high | x$13.$high, (x$12.$low | x$13.$low) >>> 0)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(dst, permuteFinalBlock(preOutput)); - }; - tripleDESCipher.prototype.Encrypt = function(dst, src) { return this.$val.Encrypt(dst, src); }; - tripleDESCipher.ptr.prototype.Decrypt = function(dst, src) { - var _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, dst, i, i$1, i$2, left, preOutput, right, src, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - c = this; - if (src.$length < 8) { - $panic(new $String("crypto/des: input not full block")); - } - if (dst.$length < 8) { - $panic(new $String("crypto/des: output not full block")); - } - if (subtle.InexactOverlap($subslice(dst, 0, 8), $subslice(src, 0, 8))) { - $panic(new $String("crypto/des: invalid buffer overlap")); - } - b = $clone(binary.BigEndian, binary.bigEndian).Uint64(src); - b = permuteInitialBlock(b); - _tmp = (($shiftRightUint64(b, 32).$low >>> 0)); - _tmp$1 = ((b.$low >>> 0)); - left = _tmp; - right = _tmp$1; - left = (((left << 1 >>> 0)) | ((left >>> 31 >>> 0))) >>> 0; - right = (((right << 1 >>> 0)) | ((right >>> 31 >>> 0))) >>> 0; - i = 0; - while (true) { - if (!(i < 8)) { break; } - _tuple = feistel(left, right, (x = c.cipher3.subkeys, x$1 = 15 - ($imul(2, i)) >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), (x$2 = c.cipher3.subkeys, x$3 = 15 - ((($imul(2, i)) + 1 >> 0)) >> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))); - left = _tuple[0]; - right = _tuple[1]; - i = i + (1) >> 0; - } - i$1 = 0; - while (true) { - if (!(i$1 < 8)) { break; } - _tuple$1 = feistel(right, left, (x$4 = c.cipher2.subkeys, x$5 = $imul(2, i$1), ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5])), (x$6 = c.cipher2.subkeys, x$7 = ($imul(2, i$1)) + 1 >> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))); - right = _tuple$1[0]; - left = _tuple$1[1]; - i$1 = i$1 + (1) >> 0; - } - i$2 = 0; - while (true) { - if (!(i$2 < 8)) { break; } - _tuple$2 = feistel(left, right, (x$8 = c.cipher1.subkeys, x$9 = 15 - ($imul(2, i$2)) >> 0, ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])), (x$10 = c.cipher1.subkeys, x$11 = 15 - ((($imul(2, i$2)) + 1 >> 0)) >> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))); - left = _tuple$2[0]; - right = _tuple$2[1]; - i$2 = i$2 + (1) >> 0; - } - left = (((left << 31 >>> 0)) | ((left >>> 1 >>> 0))) >>> 0; - right = (((right << 31 >>> 0)) | ((right >>> 1 >>> 0))) >>> 0; - preOutput = (x$12 = $shiftLeft64((new $Uint64(0, right)), 32), x$13 = (new $Uint64(0, left)), new $Uint64(x$12.$high | x$13.$high, (x$12.$low | x$13.$low) >>> 0)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(dst, permuteFinalBlock(preOutput)); - }; - tripleDESCipher.prototype.Decrypt = function(dst, src) { return this.$val.Decrypt(dst, src); }; - cryptBlock = function(subkeys, dst, src, decrypt) { - var _tmp, _tmp$1, _tuple, _tuple$1, b, decrypt, dst, i, i$1, left, preOutput, right, src, subkeys, x, x$1, x$2, x$3, x$4, x$5; - b = $clone(binary.BigEndian, binary.bigEndian).Uint64(src); - b = permuteInitialBlock(b); - _tmp = (($shiftRightUint64(b, 32).$low >>> 0)); - _tmp$1 = ((b.$low >>> 0)); - left = _tmp; - right = _tmp$1; - left = (((left << 1 >>> 0)) | ((left >>> 31 >>> 0))) >>> 0; - right = (((right << 1 >>> 0)) | ((right >>> 31 >>> 0))) >>> 0; - if (decrypt) { - i = 0; - while (true) { - if (!(i < 8)) { break; } - _tuple = feistel(left, right, (x = 15 - ($imul(2, i)) >> 0, ((x < 0 || x >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x])), (x$1 = 15 - ((($imul(2, i)) + 1 >> 0)) >> 0, ((x$1 < 0 || x$1 >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x$1]))); - left = _tuple[0]; - right = _tuple[1]; - i = i + (1) >> 0; - } - } else { - i$1 = 0; - while (true) { - if (!(i$1 < 8)) { break; } - _tuple$1 = feistel(left, right, (x$2 = $imul(2, i$1), ((x$2 < 0 || x$2 >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x$2])), (x$3 = ($imul(2, i$1)) + 1 >> 0, ((x$3 < 0 || x$3 >= subkeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : subkeys.$array[subkeys.$offset + x$3]))); - left = _tuple$1[0]; - right = _tuple$1[1]; - i$1 = i$1 + (1) >> 0; - } - } - left = (((left << 31 >>> 0)) | ((left >>> 1 >>> 0))) >>> 0; - right = (((right << 31 >>> 0)) | ((right >>> 1 >>> 0))) >>> 0; - preOutput = (x$4 = $shiftLeft64((new $Uint64(0, right)), 32), x$5 = (new $Uint64(0, left)), new $Uint64(x$4.$high | x$5.$high, (x$4.$low | x$5.$low) >>> 0)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(dst, permuteFinalBlock(preOutput)); - }; - encryptBlock = function(subkeys, dst, src) { - var dst, src, subkeys; - cryptBlock(subkeys, dst, src, false); - }; - decryptBlock = function(subkeys, dst, src) { - var dst, src, subkeys; - cryptBlock(subkeys, dst, src, true); - }; - feistel = function(l, r, k0, k1) { - var _tmp, _tmp$1, k0, k1, l, lout, r, rout, t, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$4, x$5, x$6, x$7, x$8, x$9; - lout = 0; - rout = 0; - t = 0; - t = (r ^ (($shiftRightUint64(k0, 32).$low >>> 0))) >>> 0; - l = (l ^ ((((((((x = feistelBox[7], x$1 = (t & 63) >>> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])) ^ (x$2 = feistelBox[5], x$3 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$3 < 0 || x$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[x$3]))) >>> 0) ^ (x$4 = feistelBox[3], x$5 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$5 < 0 || x$5 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[x$5]))) >>> 0) ^ (x$6 = feistelBox[1], x$7 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7]))) >>> 0))) >>> 0; - t = ((((((r << 28 >>> 0)) | ((r >>> 4 >>> 0))) >>> 0)) ^ ((k0.$low >>> 0))) >>> 0; - l = (l ^ ((((((((x$8 = feistelBox[6], x$9 = ((t) & 63) >>> 0, ((x$9 < 0 || x$9 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[x$9])) ^ (x$10 = feistelBox[4], x$11 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$11 < 0 || x$11 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[x$11]))) >>> 0) ^ (x$12 = feistelBox[2], x$13 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$13 < 0 || x$13 >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[x$13]))) >>> 0) ^ (x$14 = feistelBox[0], x$15 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$15 < 0 || x$15 >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[x$15]))) >>> 0))) >>> 0; - t = (l ^ (($shiftRightUint64(k1, 32).$low >>> 0))) >>> 0; - r = (r ^ ((((((((x$16 = feistelBox[7], x$17 = (t & 63) >>> 0, ((x$17 < 0 || x$17 >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[x$17])) ^ (x$18 = feistelBox[5], x$19 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$19 < 0 || x$19 >= x$18.length) ? ($throwRuntimeError("index out of range"), undefined) : x$18[x$19]))) >>> 0) ^ (x$20 = feistelBox[3], x$21 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$21 < 0 || x$21 >= x$20.length) ? ($throwRuntimeError("index out of range"), undefined) : x$20[x$21]))) >>> 0) ^ (x$22 = feistelBox[1], x$23 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$23 < 0 || x$23 >= x$22.length) ? ($throwRuntimeError("index out of range"), undefined) : x$22[x$23]))) >>> 0))) >>> 0; - t = ((((((l << 28 >>> 0)) | ((l >>> 4 >>> 0))) >>> 0)) ^ ((k1.$low >>> 0))) >>> 0; - r = (r ^ ((((((((x$24 = feistelBox[6], x$25 = ((t) & 63) >>> 0, ((x$25 < 0 || x$25 >= x$24.length) ? ($throwRuntimeError("index out of range"), undefined) : x$24[x$25])) ^ (x$26 = feistelBox[4], x$27 = (((t >>> 8 >>> 0)) & 63) >>> 0, ((x$27 < 0 || x$27 >= x$26.length) ? ($throwRuntimeError("index out of range"), undefined) : x$26[x$27]))) >>> 0) ^ (x$28 = feistelBox[2], x$29 = (((t >>> 16 >>> 0)) & 63) >>> 0, ((x$29 < 0 || x$29 >= x$28.length) ? ($throwRuntimeError("index out of range"), undefined) : x$28[x$29]))) >>> 0) ^ (x$30 = feistelBox[0], x$31 = (((t >>> 24 >>> 0)) & 63) >>> 0, ((x$31 < 0 || x$31 >= x$30.length) ? ($throwRuntimeError("index out of range"), undefined) : x$30[x$31]))) >>> 0))) >>> 0; - _tmp = l; - _tmp$1 = r; - lout = _tmp; - rout = _tmp$1; - return [lout, rout]; - }; - permuteBlock = function(src, permutation) { - var _i, _ref, bit, block, n, permutation, position, src, x, x$1; - block = new $Uint64(0, 0); - _ref = permutation; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - position = _i; - n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - bit = (x = $shiftRightUint64(src, n), new $Uint64(x.$high & 0, (x.$low & 1) >>> 0)); - block = (x$1 = $shiftLeft64(bit, (((((permutation.$length - 1 >> 0)) - position >> 0) >>> 0))), new $Uint64(block.$high | x$1.$high, (block.$low | x$1.$low) >>> 0)); - _i++; - } - return block; - }; - initFeistelBox = function() { - var _i, _ref, col, f, i, j, row, s, t, x, x$1, x$2, x$3, x$4; - _ref = sBoxes; - _i = 0; - while (true) { - if (!(_i < 8)) { break; } - s = _i; - i = 0; - while (true) { - if (!(i < 4)) { break; } - j = 0; - while (true) { - if (!(j < 16)) { break; } - f = $shiftLeft64((new $Uint64(0, (x = (x$1 = ((s < 0 || s >= sBoxes.length) ? ($throwRuntimeError("index out of range"), undefined) : sBoxes[s]), ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])), ((j < 0 || j >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[j])))), ((4 * ((7 - ((s >>> 0)) >>> 0)) >>> 0))); - f = permuteBlock(f, new sliceType$1(permutationFunction)); - row = (((((((i & 2)) << 4 >> 0)) | (i & 1)) << 24 >>> 24)); - col = (((j << 1 >> 0) << 24 >>> 24)); - t = (row | col) >>> 0; - f = (x$2 = $shiftLeft64(f, 1), x$3 = $shiftRightUint64(f, 31), new $Uint64(x$2.$high | x$3.$high, (x$2.$low | x$3.$low) >>> 0)); - (x$4 = ((s < 0 || s >= feistelBox.length) ? ($throwRuntimeError("index out of range"), undefined) : feistelBox[s]), ((t < 0 || t >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[t] = ((f.$low >>> 0)))); - j = j + (1) >> 0; - } - i = i + (1) >> 0; - } - _i++; - } - }; - permuteInitialBlock = function(block) { - var b1, b2, block, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - b1 = $shiftRightUint64(block, 48); - b2 = $shiftLeft64(block, 48); - block = (x = (x$1 = (x$2 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$3 = $shiftLeft64(b1, 48), new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0)), x$4 = $shiftRightUint64(b2, 48), new $Uint64(x$1.$high ^ x$4.$high, (x$1.$low ^ x$4.$low) >>> 0)), new $Uint64(block.$high ^ x.$high, (block.$low ^ x.$low) >>> 0)); - b1 = (x$5 = $shiftRightUint64(block, 32), new $Uint64(x$5.$high & 0, (x$5.$low & 16711935) >>> 0)); - b2 = new $Uint64(block.$high & 0, (block.$low & 4278255360) >>> 0); - block = (x$6 = (x$7 = (x$8 = (x$9 = $shiftLeft64(b1, 32), new $Uint64(x$9.$high ^ b2.$high, (x$9.$low ^ b2.$low) >>> 0)), x$10 = $shiftLeft64(b1, 8), new $Uint64(x$8.$high ^ x$10.$high, (x$8.$low ^ x$10.$low) >>> 0)), x$11 = $shiftLeft64(b2, 24), new $Uint64(x$7.$high ^ x$11.$high, (x$7.$low ^ x$11.$low) >>> 0)), new $Uint64(block.$high ^ x$6.$high, (block.$low ^ x$6.$low) >>> 0)); - b1 = new $Uint64(block.$high & 252641280, (block.$low & 252641280) >>> 0); - b2 = new $Uint64(block.$high & 61680, (block.$low & 61680) >>> 0); - block = (x$12 = (x$13 = (x$14 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$15 = $shiftRightUint64(b1, 12), new $Uint64(x$14.$high ^ x$15.$high, (x$14.$low ^ x$15.$low) >>> 0)), x$16 = $shiftLeft64(b2, 12), new $Uint64(x$13.$high ^ x$16.$high, (x$13.$low ^ x$16.$low) >>> 0)), new $Uint64(block.$high ^ x$12.$high, (block.$low ^ x$12.$low) >>> 0)); - b1 = new $Uint64(block.$high & 855651072, (block.$low & 855651072) >>> 0); - b2 = new $Uint64(block.$high & 13369548, (block.$low & 13369548) >>> 0); - block = (x$17 = (x$18 = (x$19 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$20 = $shiftRightUint64(b1, 6), new $Uint64(x$19.$high ^ x$20.$high, (x$19.$low ^ x$20.$low) >>> 0)), x$21 = $shiftLeft64(b2, 6), new $Uint64(x$18.$high ^ x$21.$high, (x$18.$low ^ x$21.$low) >>> 0)), new $Uint64(block.$high ^ x$17.$high, (block.$low ^ x$17.$low) >>> 0)); - b1 = new $Uint64(block.$high & 2863311530, (block.$low & 1431655765) >>> 0); - block = (x$22 = (x$23 = (x$24 = $shiftRightUint64(b1, 33), new $Uint64(b1.$high ^ x$24.$high, (b1.$low ^ x$24.$low) >>> 0)), x$25 = $shiftLeft64(b1, 33), new $Uint64(x$23.$high ^ x$25.$high, (x$23.$low ^ x$25.$low) >>> 0)), new $Uint64(block.$high ^ x$22.$high, (block.$low ^ x$22.$low) >>> 0)); - return block; - }; - permuteFinalBlock = function(block) { - var b1, b2, block, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - b1 = new $Uint64(block.$high & 2863311530, (block.$low & 1431655765) >>> 0); - block = (x = (x$1 = (x$2 = $shiftRightUint64(b1, 33), new $Uint64(b1.$high ^ x$2.$high, (b1.$low ^ x$2.$low) >>> 0)), x$3 = $shiftLeft64(b1, 33), new $Uint64(x$1.$high ^ x$3.$high, (x$1.$low ^ x$3.$low) >>> 0)), new $Uint64(block.$high ^ x.$high, (block.$low ^ x.$low) >>> 0)); - b1 = new $Uint64(block.$high & 855651072, (block.$low & 855651072) >>> 0); - b2 = new $Uint64(block.$high & 13369548, (block.$low & 13369548) >>> 0); - block = (x$4 = (x$5 = (x$6 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$7 = $shiftRightUint64(b1, 6), new $Uint64(x$6.$high ^ x$7.$high, (x$6.$low ^ x$7.$low) >>> 0)), x$8 = $shiftLeft64(b2, 6), new $Uint64(x$5.$high ^ x$8.$high, (x$5.$low ^ x$8.$low) >>> 0)), new $Uint64(block.$high ^ x$4.$high, (block.$low ^ x$4.$low) >>> 0)); - b1 = new $Uint64(block.$high & 252641280, (block.$low & 252641280) >>> 0); - b2 = new $Uint64(block.$high & 61680, (block.$low & 61680) >>> 0); - block = (x$9 = (x$10 = (x$11 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$12 = $shiftRightUint64(b1, 12), new $Uint64(x$11.$high ^ x$12.$high, (x$11.$low ^ x$12.$low) >>> 0)), x$13 = $shiftLeft64(b2, 12), new $Uint64(x$10.$high ^ x$13.$high, (x$10.$low ^ x$13.$low) >>> 0)), new $Uint64(block.$high ^ x$9.$high, (block.$low ^ x$9.$low) >>> 0)); - b1 = (x$14 = $shiftRightUint64(block, 32), new $Uint64(x$14.$high & 0, (x$14.$low & 16711935) >>> 0)); - b2 = new $Uint64(block.$high & 0, (block.$low & 4278255360) >>> 0); - block = (x$15 = (x$16 = (x$17 = (x$18 = $shiftLeft64(b1, 32), new $Uint64(x$18.$high ^ b2.$high, (x$18.$low ^ b2.$low) >>> 0)), x$19 = $shiftLeft64(b1, 8), new $Uint64(x$17.$high ^ x$19.$high, (x$17.$low ^ x$19.$low) >>> 0)), x$20 = $shiftLeft64(b2, 24), new $Uint64(x$16.$high ^ x$20.$high, (x$16.$low ^ x$20.$low) >>> 0)), new $Uint64(block.$high ^ x$15.$high, (block.$low ^ x$15.$low) >>> 0)); - b1 = $shiftRightUint64(block, 48); - b2 = $shiftLeft64(block, 48); - block = (x$21 = (x$22 = (x$23 = new $Uint64(b1.$high ^ b2.$high, (b1.$low ^ b2.$low) >>> 0), x$24 = $shiftLeft64(b1, 48), new $Uint64(x$23.$high ^ x$24.$high, (x$23.$low ^ x$24.$low) >>> 0)), x$25 = $shiftRightUint64(b2, 48), new $Uint64(x$22.$high ^ x$25.$high, (x$22.$low ^ x$25.$low) >>> 0)), new $Uint64(block.$high ^ x$21.$high, (block.$low ^ x$21.$low) >>> 0)); - return block; - }; - ksRotate = function(in$1) { - var i, in$1, last, left, out, right, y, y$1; - out = sliceType$2.nil; - out = $makeSlice(sliceType$2, 16); - last = in$1; - i = 0; - while (true) { - if (!(i < 16)) { break; } - left = (((y = ((4 + ((i < 0 || i >= ksRotations.length) ? ($throwRuntimeError("index out of range"), undefined) : ksRotations[i]) << 24 >>> 24)), y < 32 ? (last << y) : 0) >>> 0)) >>> 4 >>> 0; - right = (y$1 = ((32 - ((i < 0 || i >= ksRotations.length) ? ($throwRuntimeError("index out of range"), undefined) : ksRotations[i]) << 24 >>> 24)), y$1 < 32 ? (((last << 4 >>> 0)) >>> y$1) : 0) >>> 0; - ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = ((left | right) >>> 0)); - last = ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i]); - i = i + (1) >> 0; - } - return out; - }; - desCipher.ptr.prototype.generateSubkeys = function(keyBytes) { - var {c, i, key, keyBytes, leftRotations, pc2Input, permutedKey, rightRotations, x, x$1, x$2, $s, $r, $c} = $restore(this, {keyBytes}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - $r = feistelBoxOnce.Do(initFeistelBox); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - key = $clone(binary.BigEndian, binary.bigEndian).Uint64(keyBytes); - permutedKey = permuteBlock(key, new sliceType$1(permutedChoice1)); - leftRotations = ksRotate((($shiftRightUint64(permutedKey, 28).$low >>> 0))); - rightRotations = ksRotate((($shiftLeft64(permutedKey, 4).$low >>> 0)) >>> 4 >>> 0); - i = 0; - while (true) { - if (!(i < 16)) { break; } - pc2Input = (x = $shiftLeft64((new $Uint64(0, ((i < 0 || i >= leftRotations.$length) ? ($throwRuntimeError("index out of range"), undefined) : leftRotations.$array[leftRotations.$offset + i]))), 28), x$1 = (new $Uint64(0, ((i < 0 || i >= rightRotations.$length) ? ($throwRuntimeError("index out of range"), undefined) : rightRotations.$array[rightRotations.$offset + i]))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - (x$2 = c.subkeys, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i] = unpack(permuteBlock(pc2Input, new sliceType$1(permutedChoice2))))); - i = i + (1) >> 0; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: desCipher.ptr.prototype.generateSubkeys, $c: true, $r, c, i, key, keyBytes, leftRotations, pc2Input, permutedKey, rightRotations, x, x$1, x$2, $s};return $f; - }; - desCipher.prototype.generateSubkeys = function(keyBytes) { return this.$val.generateSubkeys(keyBytes); }; - unpack = function(x) { - var result, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - result = new $Uint64(0, 0); - result = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (x$7 = $shiftLeft64(((x$8 = $shiftRightUint64(x, 6), new $Uint64(x$8.$high & 0, (x$8.$low & 255) >>> 0))), 0), x$9 = $shiftLeft64(((x$10 = $shiftRightUint64(x, 18), new $Uint64(x$10.$high & 0, (x$10.$low & 255) >>> 0))), 8), new $Uint64(x$7.$high | x$9.$high, (x$7.$low | x$9.$low) >>> 0)), x$11 = $shiftLeft64(((x$12 = $shiftRightUint64(x, 30), new $Uint64(x$12.$high & 0, (x$12.$low & 255) >>> 0))), 16), new $Uint64(x$6.$high | x$11.$high, (x$6.$low | x$11.$low) >>> 0)), x$13 = $shiftLeft64(((x$14 = $shiftRightUint64(x, 42), new $Uint64(x$14.$high & 0, (x$14.$low & 255) >>> 0))), 24), new $Uint64(x$5.$high | x$13.$high, (x$5.$low | x$13.$low) >>> 0)), x$15 = $shiftLeft64(((x$16 = $shiftRightUint64(x, 0), new $Uint64(x$16.$high & 0, (x$16.$low & 255) >>> 0))), 32), new $Uint64(x$4.$high | x$15.$high, (x$4.$low | x$15.$low) >>> 0)), x$17 = $shiftLeft64(((x$18 = $shiftRightUint64(x, 12), new $Uint64(x$18.$high & 0, (x$18.$low & 255) >>> 0))), 40), new $Uint64(x$3.$high | x$17.$high, (x$3.$low | x$17.$low) >>> 0)), x$19 = $shiftLeft64(((x$20 = $shiftRightUint64(x, 24), new $Uint64(x$20.$high & 0, (x$20.$low & 255) >>> 0))), 48), new $Uint64(x$2.$high | x$19.$high, (x$2.$low | x$19.$low) >>> 0)), x$21 = $shiftLeft64(((x$22 = $shiftRightUint64(x, 36), new $Uint64(x$22.$high & 0, (x$22.$low & 255) >>> 0))), 56), new $Uint64(x$1.$high | x$21.$high, (x$1.$low | x$21.$low) >>> 0)); - return result; - }; - KeySizeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "generateSubkeys", name: "generateSubkeys", pkg: "crypto/des", typ: $funcType([sliceType$1], [], false)}]; - ptrType$1.methods = [{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encrypt", name: "Encrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [], false)}]; - desCipher.init("crypto/des", [{prop: "subkeys", name: "subkeys", embedded: false, exported: false, typ: arrayType$4, tag: ""}]); - tripleDESCipher.init("crypto/des", [{prop: "cipher1", name: "cipher1", embedded: false, exported: false, typ: desCipher, tag: ""}, {prop: "cipher2", name: "cipher2", embedded: false, exported: false, typ: desCipher, tag: ""}, {prop: "cipher3", name: "cipher3", embedded: false, exported: false, typ: desCipher, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - feistelBox = arrayType$1.zero(); - feistelBoxOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - permutationFunction = $toNativeArray($kindUint8, [16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7]); - permutedChoice1 = $toNativeArray($kindUint8, [7, 15, 23, 31, 39, 47, 55, 63, 6, 14, 22, 30, 38, 46, 54, 62, 5, 13, 21, 29, 37, 45, 53, 61, 4, 12, 20, 28, 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 36, 44, 52, 60]); - permutedChoice2 = $toNativeArray($kindUint8, [42, 39, 45, 32, 55, 51, 53, 28, 41, 50, 35, 46, 33, 37, 44, 52, 30, 48, 40, 49, 29, 36, 43, 54, 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, 12, 7, 17, 0, 22, 3, 10, 14, 6, 20, 27, 24]); - sBoxes = $toNativeArray($kindArray, [$toNativeArray($kindArray, [$toNativeArray($kindUint8, [14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5, 9, 0, 7]), $toNativeArray($kindUint8, [0, 15, 7, 4, 14, 2, 13, 1, 10, 6, 12, 11, 9, 5, 3, 8]), $toNativeArray($kindUint8, [4, 1, 14, 8, 13, 6, 2, 11, 15, 12, 9, 7, 3, 10, 5, 0]), $toNativeArray($kindUint8, [15, 12, 8, 2, 4, 9, 1, 7, 5, 11, 3, 14, 10, 0, 6, 13])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [15, 1, 8, 14, 6, 11, 3, 4, 9, 7, 2, 13, 12, 0, 5, 10]), $toNativeArray($kindUint8, [3, 13, 4, 7, 15, 2, 8, 14, 12, 0, 1, 10, 6, 9, 11, 5]), $toNativeArray($kindUint8, [0, 14, 7, 11, 10, 4, 13, 1, 5, 8, 12, 6, 9, 3, 2, 15]), $toNativeArray($kindUint8, [13, 8, 10, 1, 3, 15, 4, 2, 11, 6, 7, 12, 0, 5, 14, 9])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [10, 0, 9, 14, 6, 3, 15, 5, 1, 13, 12, 7, 11, 4, 2, 8]), $toNativeArray($kindUint8, [13, 7, 0, 9, 3, 4, 6, 10, 2, 8, 5, 14, 12, 11, 15, 1]), $toNativeArray($kindUint8, [13, 6, 4, 9, 8, 15, 3, 0, 11, 1, 2, 12, 5, 10, 14, 7]), $toNativeArray($kindUint8, [1, 10, 13, 0, 6, 9, 8, 7, 4, 15, 14, 3, 11, 5, 2, 12])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [7, 13, 14, 3, 0, 6, 9, 10, 1, 2, 8, 5, 11, 12, 4, 15]), $toNativeArray($kindUint8, [13, 8, 11, 5, 6, 15, 0, 3, 4, 7, 2, 12, 1, 10, 14, 9]), $toNativeArray($kindUint8, [10, 6, 9, 0, 12, 11, 7, 13, 15, 1, 3, 14, 5, 2, 8, 4]), $toNativeArray($kindUint8, [3, 15, 0, 6, 10, 1, 13, 8, 9, 4, 5, 11, 12, 7, 2, 14])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [2, 12, 4, 1, 7, 10, 11, 6, 8, 5, 3, 15, 13, 0, 14, 9]), $toNativeArray($kindUint8, [14, 11, 2, 12, 4, 7, 13, 1, 5, 0, 15, 10, 3, 9, 8, 6]), $toNativeArray($kindUint8, [4, 2, 1, 11, 10, 13, 7, 8, 15, 9, 12, 5, 6, 3, 0, 14]), $toNativeArray($kindUint8, [11, 8, 12, 7, 1, 14, 2, 13, 6, 15, 0, 9, 10, 4, 5, 3])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [12, 1, 10, 15, 9, 2, 6, 8, 0, 13, 3, 4, 14, 7, 5, 11]), $toNativeArray($kindUint8, [10, 15, 4, 2, 7, 12, 9, 5, 6, 1, 13, 14, 0, 11, 3, 8]), $toNativeArray($kindUint8, [9, 14, 15, 5, 2, 8, 12, 3, 7, 0, 4, 10, 1, 13, 11, 6]), $toNativeArray($kindUint8, [4, 3, 2, 12, 9, 5, 15, 10, 11, 14, 1, 7, 6, 0, 8, 13])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [4, 11, 2, 14, 15, 0, 8, 13, 3, 12, 9, 7, 5, 10, 6, 1]), $toNativeArray($kindUint8, [13, 0, 11, 7, 4, 9, 1, 10, 14, 3, 5, 12, 2, 15, 8, 6]), $toNativeArray($kindUint8, [1, 4, 11, 13, 12, 3, 7, 14, 10, 15, 6, 8, 0, 5, 9, 2]), $toNativeArray($kindUint8, [6, 11, 13, 8, 1, 4, 10, 7, 9, 5, 0, 15, 14, 2, 3, 12])]), $toNativeArray($kindArray, [$toNativeArray($kindUint8, [13, 2, 8, 4, 6, 15, 11, 1, 10, 9, 3, 14, 5, 0, 12, 7]), $toNativeArray($kindUint8, [1, 15, 13, 8, 10, 3, 7, 4, 12, 5, 6, 11, 0, 14, 9, 2]), $toNativeArray($kindUint8, [7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8]), $toNativeArray($kindUint8, [2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11])])]); - ksRotations = $toNativeArray($kindUint8, [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/elliptic/internal/fiat"] = (function() { - var $pkg = {}, $init, subtle, errors, bits, p521Uint1, p521MontgomeryDomainFieldElement, P521Element, p384Uint1, p384MontgomeryDomainFieldElement, P384Element, p224Uint1, p224MontgomeryDomainFieldElement, P224Element, arrayType, arrayType$1, arrayType$2, ptrType, arrayType$3, sliceType, ptrType$1, arrayType$4, ptrType$2, arrayType$5, ptrType$3, ptrType$4, ptrType$5, ptrType$6, p521ZeroEncoding, p521MinusOneEncoding, p384ZeroEncoding, p384MinusOneEncoding, p224ZeroEncoding, p224MinusOneEncoding, p521CmovznzU64, p521Mul, p521Square, p521Add, p521Sub, p521SetOne, p521FromMontgomery, p521ToMontgomery, p521Selectznz, p521ToBytes, p521FromBytes, p521InvertEndianness, p384CmovznzU64, p384Mul, p384Square, p384Add, p384Sub, p384SetOne, p384FromMontgomery, p384ToMontgomery, p384Selectznz, p384ToBytes, p384FromBytes, p384InvertEndianness, p224CmovznzU64, p224Mul, p224Square, p224Add, p224Sub, p224SetOne, p224FromMontgomery, p224ToMontgomery, p224Selectznz, p224ToBytes, p224FromBytes, p224InvertEndianness; - subtle = $packages["crypto/subtle"]; - errors = $packages["errors"]; - bits = $packages["math/bits"]; - p521Uint1 = $pkg.p521Uint1 = $newType(8, $kindUint64, "fiat.p521Uint1", true, "crypto/elliptic/internal/fiat", false, null); - p521MontgomeryDomainFieldElement = $pkg.p521MontgomeryDomainFieldElement = $newType(72, $kindArray, "fiat.p521MontgomeryDomainFieldElement", true, "crypto/elliptic/internal/fiat", false, null); - P521Element = $pkg.P521Element = $newType(0, $kindStruct, "fiat.P521Element", true, "crypto/elliptic/internal/fiat", true, function(x_) { - this.$val = this; - if (arguments.length === 0) { - this.x = arrayType.zero(); - return; - } - this.x = x_; - }); - p384Uint1 = $pkg.p384Uint1 = $newType(8, $kindUint64, "fiat.p384Uint1", true, "crypto/elliptic/internal/fiat", false, null); - p384MontgomeryDomainFieldElement = $pkg.p384MontgomeryDomainFieldElement = $newType(48, $kindArray, "fiat.p384MontgomeryDomainFieldElement", true, "crypto/elliptic/internal/fiat", false, null); - P384Element = $pkg.P384Element = $newType(0, $kindStruct, "fiat.P384Element", true, "crypto/elliptic/internal/fiat", true, function(x_) { - this.$val = this; - if (arguments.length === 0) { - this.x = arrayType$1.zero(); - return; - } - this.x = x_; - }); - p224Uint1 = $pkg.p224Uint1 = $newType(8, $kindUint64, "fiat.p224Uint1", true, "crypto/elliptic/internal/fiat", false, null); - p224MontgomeryDomainFieldElement = $pkg.p224MontgomeryDomainFieldElement = $newType(32, $kindArray, "fiat.p224MontgomeryDomainFieldElement", true, "crypto/elliptic/internal/fiat", false, null); - P224Element = $pkg.P224Element = $newType(0, $kindStruct, "fiat.P224Element", true, "crypto/elliptic/internal/fiat", true, function(x_) { - this.$val = this; - if (arguments.length === 0) { - this.x = arrayType$2.zero(); - return; - } - this.x = x_; - }); - arrayType = $arrayType($Uint64, 9); - arrayType$1 = $arrayType($Uint64, 6); - arrayType$2 = $arrayType($Uint64, 4); - ptrType = $ptrType($Uint64); - arrayType$3 = $arrayType($Uint8, 66); - sliceType = $sliceType($Uint8); - ptrType$1 = $ptrType(P521Element); - arrayType$4 = $arrayType($Uint8, 48); - ptrType$2 = $ptrType(P384Element); - arrayType$5 = $arrayType($Uint8, 28); - ptrType$3 = $ptrType(P224Element); - ptrType$4 = $ptrType(arrayType$3); - ptrType$5 = $ptrType(arrayType$4); - ptrType$6 = $ptrType(arrayType$5); - P521Element.ptr.prototype.Invert = function(x) { - var e, s, s$1, s$2, s$3, s$4, s$5, s$6, s$7, s$8, t0, x, z; - e = this; - z = new P521Element.ptr(arrayType.zero()).Set(e); - t0 = new P521Element.ptr(arrayType.zero()); - z.Square(x); - z.Mul(x, z); - t0.Square(z); - s = 1; - while (true) { - if (!(s < 2)) { break; } - t0.Square(t0); - s = s + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - s$1 = 1; - while (true) { - if (!(s$1 < 4)) { break; } - t0.Square(t0); - s$1 = s$1 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - s$2 = 1; - while (true) { - if (!(s$2 < 8)) { break; } - t0.Square(t0); - s$2 = s$2 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - s$3 = 1; - while (true) { - if (!(s$3 < 16)) { break; } - t0.Square(t0); - s$3 = s$3 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - s$4 = 1; - while (true) { - if (!(s$4 < 32)) { break; } - t0.Square(t0); - s$4 = s$4 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - t0.Mul(x, t0); - s$5 = 0; - while (true) { - if (!(s$5 < 64)) { break; } - t0.Square(t0); - s$5 = s$5 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - t0.Mul(x, t0); - s$6 = 0; - while (true) { - if (!(s$6 < 129)) { break; } - t0.Square(t0); - s$6 = s$6 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - t0.Mul(x, t0); - s$7 = 0; - while (true) { - if (!(s$7 < 259)) { break; } - t0.Square(t0); - s$7 = s$7 + (1) >> 0; - } - z.Mul(z, t0); - s$8 = 0; - while (true) { - if (!(s$8 < 2)) { break; } - z.Square(z); - s$8 = s$8 + (1) >> 0; - } - z.Mul(x, z); - return e.Set(z); - }; - P521Element.prototype.Invert = function(x) { return this.$val.Invert(x); }; - p521CmovznzU64 = function(out1, arg1, arg2, arg3) { - var arg1, arg2, arg3, out1, x, x$1, x$2, x1, x2; - x1 = $mul64((new $Uint64(arg1.$high, arg1.$low)), new $Uint64(4294967295, 4294967295)); - x2 = (x = new $Uint64(x1.$high & arg3.$high, (x1.$low & arg3.$low) >>> 0), x$1 = (x$2 = new $Uint64(~x1.$high, ~x1.$low >>> 0), new $Uint64(x$2.$high & arg2.$high, (x$2.$low & arg2.$low) >>> 0)), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - out1.$set(x2); - }; - p521Mul = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$199, _tuple$2, _tuple$20, _tuple$200, _tuple$201, _tuple$202, _tuple$203, _tuple$204, _tuple$205, _tuple$206, _tuple$207, _tuple$208, _tuple$209, _tuple$21, _tuple$210, _tuple$211, _tuple$212, _tuple$213, _tuple$214, _tuple$215, _tuple$216, _tuple$217, _tuple$218, _tuple$219, _tuple$22, _tuple$220, _tuple$221, _tuple$222, _tuple$223, _tuple$224, _tuple$225, _tuple$226, _tuple$227, _tuple$228, _tuple$229, _tuple$23, _tuple$230, _tuple$231, _tuple$232, _tuple$233, _tuple$234, _tuple$235, _tuple$236, _tuple$237, _tuple$238, _tuple$239, _tuple$24, _tuple$240, _tuple$241, _tuple$242, _tuple$243, _tuple$244, _tuple$245, _tuple$246, _tuple$247, _tuple$248, _tuple$249, _tuple$25, _tuple$250, _tuple$251, _tuple$252, _tuple$253, _tuple$254, _tuple$255, _tuple$256, _tuple$257, _tuple$258, _tuple$259, _tuple$26, _tuple$260, _tuple$261, _tuple$262, _tuple$263, _tuple$264, _tuple$265, _tuple$266, _tuple$267, _tuple$268, _tuple$269, _tuple$27, _tuple$270, _tuple$271, _tuple$272, _tuple$273, _tuple$274, _tuple$275, _tuple$276, _tuple$277, _tuple$278, _tuple$279, _tuple$28, _tuple$280, _tuple$281, _tuple$282, _tuple$283, _tuple$284, _tuple$285, _tuple$286, _tuple$287, _tuple$288, _tuple$289, _tuple$29, _tuple$290, _tuple$291, _tuple$292, _tuple$293, _tuple$294, _tuple$295, _tuple$296, _tuple$297, _tuple$298, _tuple$299, _tuple$3, _tuple$30, _tuple$300, _tuple$301, _tuple$302, _tuple$303, _tuple$304, _tuple$305, _tuple$306, _tuple$307, _tuple$308, _tuple$309, _tuple$31, _tuple$310, _tuple$311, _tuple$312, _tuple$313, _tuple$314, _tuple$315, _tuple$316, _tuple$317, _tuple$318, _tuple$319, _tuple$32, _tuple$320, _tuple$321, _tuple$322, _tuple$323, _tuple$324, _tuple$325, _tuple$326, _tuple$327, _tuple$328, _tuple$329, _tuple$33, _tuple$330, _tuple$331, _tuple$332, _tuple$333, _tuple$334, _tuple$335, _tuple$336, _tuple$337, _tuple$338, _tuple$339, _tuple$34, _tuple$340, _tuple$341, _tuple$342, _tuple$343, _tuple$344, _tuple$345, _tuple$346, _tuple$347, _tuple$348, _tuple$349, _tuple$35, _tuple$350, _tuple$351, _tuple$352, _tuple$353, _tuple$354, _tuple$355, _tuple$356, _tuple$357, _tuple$358, _tuple$359, _tuple$36, _tuple$360, _tuple$361, _tuple$362, _tuple$363, _tuple$364, _tuple$365, _tuple$366, _tuple$367, _tuple$368, _tuple$369, _tuple$37, _tuple$370, _tuple$371, _tuple$372, _tuple$373, _tuple$374, _tuple$375, _tuple$376, _tuple$377, _tuple$378, _tuple$379, _tuple$38, _tuple$380, _tuple$381, _tuple$382, _tuple$383, _tuple$384, _tuple$385, _tuple$386, _tuple$387, _tuple$388, _tuple$389, _tuple$39, _tuple$390, _tuple$391, _tuple$392, _tuple$393, _tuple$394, _tuple$395, _tuple$396, _tuple$397, _tuple$398, _tuple$399, _tuple$4, _tuple$40, _tuple$400, _tuple$401, _tuple$402, _tuple$403, _tuple$404, _tuple$405, _tuple$406, _tuple$407, _tuple$408, _tuple$409, _tuple$41, _tuple$410, _tuple$411, _tuple$412, _tuple$413, _tuple$414, _tuple$415, _tuple$416, _tuple$417, _tuple$418, _tuple$419, _tuple$42, _tuple$420, _tuple$421, _tuple$422, _tuple$423, _tuple$424, _tuple$425, _tuple$426, _tuple$427, _tuple$428, _tuple$429, _tuple$43, _tuple$430, _tuple$431, _tuple$432, _tuple$433, _tuple$434, _tuple$435, _tuple$436, _tuple$437, _tuple$438, _tuple$439, _tuple$44, _tuple$440, _tuple$441, _tuple$442, _tuple$443, _tuple$444, _tuple$445, _tuple$446, _tuple$447, _tuple$448, _tuple$449, _tuple$45, _tuple$450, _tuple$451, _tuple$452, _tuple$453, _tuple$454, _tuple$455, _tuple$456, _tuple$457, _tuple$458, _tuple$459, _tuple$46, _tuple$460, _tuple$461, _tuple$462, _tuple$463, _tuple$464, _tuple$465, _tuple$466, _tuple$467, _tuple$468, _tuple$469, _tuple$47, _tuple$470, _tuple$471, _tuple$472, _tuple$473, _tuple$474, _tuple$475, _tuple$476, _tuple$477, _tuple$478, _tuple$479, _tuple$48, _tuple$480, _tuple$481, _tuple$482, _tuple$483, _tuple$484, _tuple$485, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, arg2, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$165, x$166, x$167, x$168, x$169, x$17, x$170, x$171, x$172, x$173, x$174, x$175, x$176, x$177, x$178, x$179, x$18, x$180, x$181, x$182, x$183, x$184, x$185, x$186, x$187, x$188, x$189, x$19, x$190, x$191, x$192, x$193, x$194, x$195, x$196, x$197, x$198, x$199, x$2, x$20, x$200, x$201, x$202, x$203, x$204, x$205, x$206, x$207, x$208, x$209, x$21, x$210, x$211, x$212, x$213, x$214, x$215, x$216, x$217, x$218, x$219, x$22, x$220, x$221, x$222, x$223, x$224, x$225, x$226, x$227, x$228, x$229, x$23, x$230, x$231, x$232, x$233, x$234, x$235, x$236, x$237, x$238, x$239, x$24, x$240, x$241, x$242, x$243, x$244, x$245, x$246, x$247, x$248, x$249, x$25, x$250, x$251, x$252, x$253, x$254, x$255, x$256, x$257, x$258, x$259, x$26, x$260, x$261, x$262, x$263, x$264, x$265, x$266, x$267, x$268, x$269, x$27, x$270, x$271, x$272, x$273, x$274, x$275, x$276, x$277, x$278, x$279, x$28, x$280, x$281, x$282, x$283, x$284, x$285, x$286, x$287, x$288, x$289, x$29, x$290, x$291, x$292, x$293, x$294, x$295, x$296, x$297, x$298, x$299, x$3, x$30, x$300, x$301, x$302, x$303, x$304, x$305, x$306, x$307, x$308, x$309, x$31, x$310, x$311, x$312, x$313, x$314, x$315, x$316, x$317, x$318, x$319, x$32, x$320, x$321, x$322, x$323, x$324, x$325, x$326, x$327, x$328, x$329, x$33, x$330, x$331, x$332, x$333, x$334, x$335, x$336, x$337, x$338, x$339, x$34, x$340, x$341, x$342, x$343, x$344, x$345, x$346, x$347, x$348, x$349, x$35, x$350, x$351, x$352, x$353, x$354, x$355, x$356, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x1000, x1001, x1002, x1003, x1004, x1005, x1007, x1008, x1008$24ptr, x1009, x1009$24ptr, x101, x1010, x1010$24ptr, x1011, x1011$24ptr, x1012, x1012$24ptr, x1013, x1013$24ptr, x1014, x1014$24ptr, x1015, x1015$24ptr, x1016, x1016$24ptr, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x179, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x208, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x240, x241, x242, x243, x244, x245, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x261, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x285, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x302, x303, x304, x305, x306, x307, x308, x309, x31, x310, x311, x312, x313, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x338, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x354, x355, x356, x357, x358, x359, x36, x360, x361, x362, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x376, x377, x378, x379, x38, x380, x381, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x403, x404, x405, x406, x407, x408, x409, x41, x410, x411, x413, x414, x415, x416, x417, x418, x419, x42, x420, x421, x422, x423, x424, x425, x426, x427, x428, x429, x43, x430, x431, x432, x433, x434, x435, x436, x437, x438, x439, x44, x440, x441, x442, x443, x444, x445, x446, x447, x448, x449, x45, x450, x451, x452, x453, x454, x455, x456, x457, x458, x459, x46, x460, x461, x462, x463, x464, x465, x466, x467, x468, x469, x47, x470, x471, x472, x473, x474, x475, x476, x477, x478, x479, x48, x480, x481, x482, x483, x484, x485, x486, x487, x488, x489, x49, x490, x491, x492, x493, x494, x495, x496, x497, x498, x499, x5, x50, x500, x501, x502, x503, x504, x505, x506, x507, x508, x509, x51, x510, x511, x512, x513, x514, x515, x516, x517, x518, x519, x52, x520, x521, x522, x524, x525, x526, x527, x528, x529, x53, x530, x531, x532, x533, x534, x535, x536, x537, x538, x539, x54, x540, x541, x542, x543, x544, x545, x546, x547, x548, x549, x55, x550, x551, x552, x553, x554, x555, x556, x557, x558, x559, x56, x560, x561, x562, x563, x564, x565, x566, x567, x568, x569, x57, x570, x571, x572, x573, x574, x575, x576, x577, x578, x579, x58, x580, x581, x582, x583, x584, x585, x586, x587, x588, x589, x59, x590, x591, x592, x593, x594, x595, x596, x597, x598, x599, x6, x60, x600, x601, x602, x603, x604, x605, x606, x607, x608, x609, x61, x610, x611, x612, x613, x614, x615, x616, x617, x618, x619, x62, x620, x621, x622, x623, x624, x625, x626, x627, x628, x629, x63, x630, x631, x632, x633, x635, x636, x637, x638, x639, x64, x640, x641, x642, x643, x644, x645, x646, x647, x648, x649, x65, x650, x651, x652, x653, x654, x655, x656, x657, x658, x659, x66, x660, x661, x662, x663, x664, x665, x666, x667, x668, x669, x67, x670, x671, x672, x673, x674, x675, x676, x677, x678, x679, x68, x680, x681, x682, x683, x684, x685, x686, x687, x688, x689, x69, x690, x691, x692, x693, x694, x695, x696, x697, x698, x699, x7, x70, x700, x701, x702, x703, x704, x705, x706, x707, x708, x709, x71, x710, x711, x712, x713, x714, x715, x716, x717, x718, x719, x72, x720, x721, x722, x723, x724, x725, x726, x727, x728, x729, x73, x730, x731, x732, x733, x734, x735, x736, x737, x738, x739, x74, x740, x741, x742, x743, x744, x746, x747, x748, x749, x75, x750, x751, x752, x753, x754, x755, x756, x757, x758, x759, x76, x760, x761, x762, x763, x764, x765, x766, x767, x768, x769, x77, x770, x771, x772, x773, x774, x775, x776, x777, x778, x779, x78, x780, x781, x782, x783, x784, x785, x786, x787, x788, x789, x79, x790, x791, x792, x793, x794, x795, x796, x797, x798, x799, x8, x800, x801, x802, x803, x804, x805, x806, x807, x808, x809, x81, x810, x811, x812, x813, x814, x815, x816, x817, x818, x819, x82, x820, x821, x822, x823, x824, x825, x826, x827, x828, x829, x83, x830, x831, x832, x833, x834, x835, x836, x837, x838, x839, x84, x840, x841, x842, x843, x844, x845, x846, x847, x848, x849, x85, x850, x851, x852, x853, x854, x855, x857, x858, x859, x86, x860, x861, x862, x863, x864, x865, x866, x867, x868, x869, x87, x870, x871, x872, x873, x874, x875, x876, x877, x878, x879, x88, x880, x881, x882, x883, x884, x885, x886, x887, x888, x889, x89, x890, x891, x892, x893, x894, x895, x896, x897, x898, x899, x9, x90, x900, x901, x902, x903, x904, x905, x906, x907, x908, x909, x91, x910, x911, x912, x913, x914, x915, x916, x917, x918, x919, x92, x920, x921, x922, x923, x924, x925, x926, x927, x928, x929, x93, x930, x931, x932, x933, x934, x935, x936, x937, x938, x939, x94, x940, x941, x942, x943, x944, x945, x946, x947, x948, x949, x95, x950, x951, x952, x953, x954, x955, x956, x957, x958, x959, x96, x960, x961, x962, x963, x964, x965, x966, x968, x969, x97, x970, x971, x972, x973, x974, x975, x976, x977, x978, x979, x98, x980, x981, x982, x983, x984, x985, x986, x987, x988, x989, x99, x990, x991, x992, x993, x994, x995, x996, x997, x998, x999; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[4]; - x5 = arg1[5]; - x6 = arg1[6]; - x7 = arg1[7]; - x8 = arg1[8]; - x9 = arg1[0]; - x10 = new $Uint64(0, 0); - x11 = new $Uint64(0, 0); - _tuple = bits.Mul64(x9, arg2[8]); - x11 = _tuple[0]; - x10 = _tuple[1]; - x12 = new $Uint64(0, 0); - x13 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x9, arg2[7]); - x13 = _tuple$1[0]; - x12 = _tuple$1[1]; - x14 = new $Uint64(0, 0); - x15 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x9, arg2[6]); - x15 = _tuple$2[0]; - x14 = _tuple$2[1]; - x16 = new $Uint64(0, 0); - x17 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x9, arg2[5]); - x17 = _tuple$3[0]; - x16 = _tuple$3[1]; - x18 = new $Uint64(0, 0); - x19 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x9, arg2[4]); - x19 = _tuple$4[0]; - x18 = _tuple$4[1]; - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x9, arg2[3]); - x21 = _tuple$5[0]; - x20 = _tuple$5[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$6 = bits.Mul64(x9, arg2[2]); - x23 = _tuple$6[0]; - x22 = _tuple$6[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x9, arg2[1]); - x25 = _tuple$7[0]; - x24 = _tuple$7[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x9, arg2[0]); - x27 = _tuple$8[0]; - x26 = _tuple$8[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x27, x24, new $Uint64(0, 0)); - x28 = _tuple$9[0]; - x29 = _tuple$9[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x25, x22, ((x = (new p521Uint1(x29.$high, x29.$low)), new $Uint64(x.$high, x.$low)))); - x30 = _tuple$10[0]; - x31 = _tuple$10[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x23, x20, ((x$1 = (new p521Uint1(x31.$high, x31.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x32 = _tuple$11[0]; - x33 = _tuple$11[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x21, x18, ((x$2 = (new p521Uint1(x33.$high, x33.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x34 = _tuple$12[0]; - x35 = _tuple$12[1]; - x36 = new $Uint64(0, 0); - x37 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x19, x16, ((x$3 = (new p521Uint1(x35.$high, x35.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x36 = _tuple$13[0]; - x37 = _tuple$13[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x17, x14, ((x$4 = (new p521Uint1(x37.$high, x37.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x38 = _tuple$14[0]; - x39 = _tuple$14[1]; - x40 = new $Uint64(0, 0); - x41 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x15, x12, ((x$5 = (new p521Uint1(x39.$high, x39.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x40 = _tuple$15[0]; - x41 = _tuple$15[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x13, x10, ((x$6 = (new p521Uint1(x41.$high, x41.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x42 = _tuple$16[0]; - x43 = _tuple$16[1]; - x44 = (x$7 = ((x$8 = (new p521Uint1(x43.$high, x43.$low)), new $Uint64(x$8.$high, x$8.$low))), new $Uint64(x$7.$high + x11.$high, x$7.$low + x11.$low)); - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$17 = bits.Mul64(x26, new $Uint64(0, 511)); - x46 = _tuple$17[0]; - x45 = _tuple$17[1]; - x47 = new $Uint64(0, 0); - x48 = new $Uint64(0, 0); - _tuple$18 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x48 = _tuple$18[0]; - x47 = _tuple$18[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$19 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x50 = _tuple$19[0]; - x49 = _tuple$19[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$20 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x52 = _tuple$20[0]; - x51 = _tuple$20[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$21 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x54 = _tuple$21[0]; - x53 = _tuple$21[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$22 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x56 = _tuple$22[0]; - x55 = _tuple$22[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$23 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x58 = _tuple$23[0]; - x57 = _tuple$23[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$24 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x60 = _tuple$24[0]; - x59 = _tuple$24[1]; - x61 = new $Uint64(0, 0); - x62 = new $Uint64(0, 0); - _tuple$25 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x62 = _tuple$25[0]; - x61 = _tuple$25[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x62, x59, new $Uint64(0, 0)); - x63 = _tuple$26[0]; - x64 = _tuple$26[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x60, x57, ((x$9 = (new p521Uint1(x64.$high, x64.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x65 = _tuple$27[0]; - x66 = _tuple$27[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x58, x55, ((x$10 = (new p521Uint1(x66.$high, x66.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x67 = _tuple$28[0]; - x68 = _tuple$28[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(x56, x53, ((x$11 = (new p521Uint1(x68.$high, x68.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x69 = _tuple$29[0]; - x70 = _tuple$29[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$30 = bits.Add64(x54, x51, ((x$12 = (new p521Uint1(x70.$high, x70.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x71 = _tuple$30[0]; - x72 = _tuple$30[1]; - x73 = new $Uint64(0, 0); - x74 = new $Uint64(0, 0); - _tuple$31 = bits.Add64(x52, x49, ((x$13 = (new p521Uint1(x72.$high, x72.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x73 = _tuple$31[0]; - x74 = _tuple$31[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x50, x47, ((x$14 = (new p521Uint1(x74.$high, x74.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x75 = _tuple$32[0]; - x76 = _tuple$32[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x48, x45, ((x$15 = (new p521Uint1(x76.$high, x76.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x77 = _tuple$33[0]; - x78 = _tuple$33[1]; - x79 = (x$16 = ((x$17 = (new p521Uint1(x78.$high, x78.$low)), new $Uint64(x$17.$high, x$17.$low))), new $Uint64(x$16.$high + x46.$high, x$16.$low + x46.$low)); - x81 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x26, x61, new $Uint64(0, 0)); - x81 = _tuple$34[1]; - x82 = new $Uint64(0, 0); - x83 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x28, x63, ((x$18 = (new p521Uint1(x81.$high, x81.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x82 = _tuple$35[0]; - x83 = _tuple$35[1]; - x84 = new $Uint64(0, 0); - x85 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x30, x65, ((x$19 = (new p521Uint1(x83.$high, x83.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x84 = _tuple$36[0]; - x85 = _tuple$36[1]; - x86 = new $Uint64(0, 0); - x87 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x32, x67, ((x$20 = (new p521Uint1(x85.$high, x85.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x86 = _tuple$37[0]; - x87 = _tuple$37[1]; - x88 = new $Uint64(0, 0); - x89 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x34, x69, ((x$21 = (new p521Uint1(x87.$high, x87.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x88 = _tuple$38[0]; - x89 = _tuple$38[1]; - x90 = new $Uint64(0, 0); - x91 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x36, x71, ((x$22 = (new p521Uint1(x89.$high, x89.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x90 = _tuple$39[0]; - x91 = _tuple$39[1]; - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x38, x73, ((x$23 = (new p521Uint1(x91.$high, x91.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x92 = _tuple$40[0]; - x93 = _tuple$40[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$41 = bits.Add64(x40, x75, ((x$24 = (new p521Uint1(x93.$high, x93.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x94 = _tuple$41[0]; - x95 = _tuple$41[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$42 = bits.Add64(x42, x77, ((x$25 = (new p521Uint1(x95.$high, x95.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x96 = _tuple$42[0]; - x97 = _tuple$42[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x44, x79, ((x$26 = (new p521Uint1(x97.$high, x97.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x98 = _tuple$43[0]; - x99 = _tuple$43[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$44 = bits.Mul64(x1, arg2[8]); - x101 = _tuple$44[0]; - x100 = _tuple$44[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$45 = bits.Mul64(x1, arg2[7]); - x103 = _tuple$45[0]; - x102 = _tuple$45[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$46 = bits.Mul64(x1, arg2[6]); - x105 = _tuple$46[0]; - x104 = _tuple$46[1]; - x106 = new $Uint64(0, 0); - x107 = new $Uint64(0, 0); - _tuple$47 = bits.Mul64(x1, arg2[5]); - x107 = _tuple$47[0]; - x106 = _tuple$47[1]; - x108 = new $Uint64(0, 0); - x109 = new $Uint64(0, 0); - _tuple$48 = bits.Mul64(x1, arg2[4]); - x109 = _tuple$48[0]; - x108 = _tuple$48[1]; - x110 = new $Uint64(0, 0); - x111 = new $Uint64(0, 0); - _tuple$49 = bits.Mul64(x1, arg2[3]); - x111 = _tuple$49[0]; - x110 = _tuple$49[1]; - x112 = new $Uint64(0, 0); - x113 = new $Uint64(0, 0); - _tuple$50 = bits.Mul64(x1, arg2[2]); - x113 = _tuple$50[0]; - x112 = _tuple$50[1]; - x114 = new $Uint64(0, 0); - x115 = new $Uint64(0, 0); - _tuple$51 = bits.Mul64(x1, arg2[1]); - x115 = _tuple$51[0]; - x114 = _tuple$51[1]; - x116 = new $Uint64(0, 0); - x117 = new $Uint64(0, 0); - _tuple$52 = bits.Mul64(x1, arg2[0]); - x117 = _tuple$52[0]; - x116 = _tuple$52[1]; - x118 = new $Uint64(0, 0); - x119 = new $Uint64(0, 0); - _tuple$53 = bits.Add64(x117, x114, new $Uint64(0, 0)); - x118 = _tuple$53[0]; - x119 = _tuple$53[1]; - x120 = new $Uint64(0, 0); - x121 = new $Uint64(0, 0); - _tuple$54 = bits.Add64(x115, x112, ((x$27 = (new p521Uint1(x119.$high, x119.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x120 = _tuple$54[0]; - x121 = _tuple$54[1]; - x122 = new $Uint64(0, 0); - x123 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x113, x110, ((x$28 = (new p521Uint1(x121.$high, x121.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x122 = _tuple$55[0]; - x123 = _tuple$55[1]; - x124 = new $Uint64(0, 0); - x125 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x111, x108, ((x$29 = (new p521Uint1(x123.$high, x123.$low)), new $Uint64(x$29.$high, x$29.$low)))); - x124 = _tuple$56[0]; - x125 = _tuple$56[1]; - x126 = new $Uint64(0, 0); - x127 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x109, x106, ((x$30 = (new p521Uint1(x125.$high, x125.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x126 = _tuple$57[0]; - x127 = _tuple$57[1]; - x128 = new $Uint64(0, 0); - x129 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x107, x104, ((x$31 = (new p521Uint1(x127.$high, x127.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x128 = _tuple$58[0]; - x129 = _tuple$58[1]; - x130 = new $Uint64(0, 0); - x131 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x105, x102, ((x$32 = (new p521Uint1(x129.$high, x129.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x130 = _tuple$59[0]; - x131 = _tuple$59[1]; - x132 = new $Uint64(0, 0); - x133 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x103, x100, ((x$33 = (new p521Uint1(x131.$high, x131.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x132 = _tuple$60[0]; - x133 = _tuple$60[1]; - x134 = (x$34 = ((x$35 = (new p521Uint1(x133.$high, x133.$low)), new $Uint64(x$35.$high, x$35.$low))), new $Uint64(x$34.$high + x101.$high, x$34.$low + x101.$low)); - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x82, x116, new $Uint64(0, 0)); - x135 = _tuple$61[0]; - x136 = _tuple$61[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x84, x118, ((x$36 = (new p521Uint1(x136.$high, x136.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x137 = _tuple$62[0]; - x138 = _tuple$62[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x86, x120, ((x$37 = (new p521Uint1(x138.$high, x138.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x139 = _tuple$63[0]; - x140 = _tuple$63[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x88, x122, ((x$38 = (new p521Uint1(x140.$high, x140.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x141 = _tuple$64[0]; - x142 = _tuple$64[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x90, x124, ((x$39 = (new p521Uint1(x142.$high, x142.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x143 = _tuple$65[0]; - x144 = _tuple$65[1]; - x145 = new $Uint64(0, 0); - x146 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x92, x126, ((x$40 = (new p521Uint1(x144.$high, x144.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x145 = _tuple$66[0]; - x146 = _tuple$66[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x94, x128, ((x$41 = (new p521Uint1(x146.$high, x146.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x147 = _tuple$67[0]; - x148 = _tuple$67[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x96, x130, ((x$42 = (new p521Uint1(x148.$high, x148.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x149 = _tuple$68[0]; - x150 = _tuple$68[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x98, x132, ((x$43 = (new p521Uint1(x150.$high, x150.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x151 = _tuple$69[0]; - x152 = _tuple$69[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(((x$44 = (new p521Uint1(x99.$high, x99.$low)), new $Uint64(x$44.$high, x$44.$low))), x134, ((x$45 = (new p521Uint1(x152.$high, x152.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x153 = _tuple$70[0]; - x154 = _tuple$70[1]; - x155 = new $Uint64(0, 0); - x156 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x135, new $Uint64(0, 511)); - x156 = _tuple$71[0]; - x155 = _tuple$71[1]; - x157 = new $Uint64(0, 0); - x158 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x158 = _tuple$72[0]; - x157 = _tuple$72[1]; - x159 = new $Uint64(0, 0); - x160 = new $Uint64(0, 0); - _tuple$73 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x160 = _tuple$73[0]; - x159 = _tuple$73[1]; - x161 = new $Uint64(0, 0); - x162 = new $Uint64(0, 0); - _tuple$74 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x162 = _tuple$74[0]; - x161 = _tuple$74[1]; - x163 = new $Uint64(0, 0); - x164 = new $Uint64(0, 0); - _tuple$75 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x164 = _tuple$75[0]; - x163 = _tuple$75[1]; - x165 = new $Uint64(0, 0); - x166 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x166 = _tuple$76[0]; - x165 = _tuple$76[1]; - x167 = new $Uint64(0, 0); - x168 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x168 = _tuple$77[0]; - x167 = _tuple$77[1]; - x169 = new $Uint64(0, 0); - x170 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x170 = _tuple$78[0]; - x169 = _tuple$78[1]; - x171 = new $Uint64(0, 0); - x172 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x172 = _tuple$79[0]; - x171 = _tuple$79[1]; - x173 = new $Uint64(0, 0); - x174 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x172, x169, new $Uint64(0, 0)); - x173 = _tuple$80[0]; - x174 = _tuple$80[1]; - x175 = new $Uint64(0, 0); - x176 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x170, x167, ((x$46 = (new p521Uint1(x174.$high, x174.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x175 = _tuple$81[0]; - x176 = _tuple$81[1]; - x177 = new $Uint64(0, 0); - x178 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x168, x165, ((x$47 = (new p521Uint1(x176.$high, x176.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x177 = _tuple$82[0]; - x178 = _tuple$82[1]; - x179 = new $Uint64(0, 0); - x180 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x166, x163, ((x$48 = (new p521Uint1(x178.$high, x178.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x179 = _tuple$83[0]; - x180 = _tuple$83[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x164, x161, ((x$49 = (new p521Uint1(x180.$high, x180.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x181 = _tuple$84[0]; - x182 = _tuple$84[1]; - x183 = new $Uint64(0, 0); - x184 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x162, x159, ((x$50 = (new p521Uint1(x182.$high, x182.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x183 = _tuple$85[0]; - x184 = _tuple$85[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x160, x157, ((x$51 = (new p521Uint1(x184.$high, x184.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x185 = _tuple$86[0]; - x186 = _tuple$86[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$87 = bits.Add64(x158, x155, ((x$52 = (new p521Uint1(x186.$high, x186.$low)), new $Uint64(x$52.$high, x$52.$low)))); - x187 = _tuple$87[0]; - x188 = _tuple$87[1]; - x189 = (x$53 = ((x$54 = (new p521Uint1(x188.$high, x188.$low)), new $Uint64(x$54.$high, x$54.$low))), new $Uint64(x$53.$high + x156.$high, x$53.$low + x156.$low)); - x191 = new $Uint64(0, 0); - _tuple$88 = bits.Add64(x135, x171, new $Uint64(0, 0)); - x191 = _tuple$88[1]; - x192 = new $Uint64(0, 0); - x193 = new $Uint64(0, 0); - _tuple$89 = bits.Add64(x137, x173, ((x$55 = (new p521Uint1(x191.$high, x191.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x192 = _tuple$89[0]; - x193 = _tuple$89[1]; - x194 = new $Uint64(0, 0); - x195 = new $Uint64(0, 0); - _tuple$90 = bits.Add64(x139, x175, ((x$56 = (new p521Uint1(x193.$high, x193.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x194 = _tuple$90[0]; - x195 = _tuple$90[1]; - x196 = new $Uint64(0, 0); - x197 = new $Uint64(0, 0); - _tuple$91 = bits.Add64(x141, x177, ((x$57 = (new p521Uint1(x195.$high, x195.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x196 = _tuple$91[0]; - x197 = _tuple$91[1]; - x198 = new $Uint64(0, 0); - x199 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x143, x179, ((x$58 = (new p521Uint1(x197.$high, x197.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x198 = _tuple$92[0]; - x199 = _tuple$92[1]; - x200 = new $Uint64(0, 0); - x201 = new $Uint64(0, 0); - _tuple$93 = bits.Add64(x145, x181, ((x$59 = (new p521Uint1(x199.$high, x199.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x200 = _tuple$93[0]; - x201 = _tuple$93[1]; - x202 = new $Uint64(0, 0); - x203 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x147, x183, ((x$60 = (new p521Uint1(x201.$high, x201.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x202 = _tuple$94[0]; - x203 = _tuple$94[1]; - x204 = new $Uint64(0, 0); - x205 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x149, x185, ((x$61 = (new p521Uint1(x203.$high, x203.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x204 = _tuple$95[0]; - x205 = _tuple$95[1]; - x206 = new $Uint64(0, 0); - x207 = new $Uint64(0, 0); - _tuple$96 = bits.Add64(x151, x187, ((x$62 = (new p521Uint1(x205.$high, x205.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x206 = _tuple$96[0]; - x207 = _tuple$96[1]; - x208 = new $Uint64(0, 0); - x209 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x153, x189, ((x$63 = (new p521Uint1(x207.$high, x207.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x208 = _tuple$97[0]; - x209 = _tuple$97[1]; - x210 = (x$64 = ((x$65 = (new p521Uint1(x209.$high, x209.$low)), new $Uint64(x$65.$high, x$65.$low))), x$66 = ((x$67 = (new p521Uint1(x154.$high, x154.$low)), new $Uint64(x$67.$high, x$67.$low))), new $Uint64(x$64.$high + x$66.$high, x$64.$low + x$66.$low)); - x211 = new $Uint64(0, 0); - x212 = new $Uint64(0, 0); - _tuple$98 = bits.Mul64(x2, arg2[8]); - x212 = _tuple$98[0]; - x211 = _tuple$98[1]; - x213 = new $Uint64(0, 0); - x214 = new $Uint64(0, 0); - _tuple$99 = bits.Mul64(x2, arg2[7]); - x214 = _tuple$99[0]; - x213 = _tuple$99[1]; - x215 = new $Uint64(0, 0); - x216 = new $Uint64(0, 0); - _tuple$100 = bits.Mul64(x2, arg2[6]); - x216 = _tuple$100[0]; - x215 = _tuple$100[1]; - x217 = new $Uint64(0, 0); - x218 = new $Uint64(0, 0); - _tuple$101 = bits.Mul64(x2, arg2[5]); - x218 = _tuple$101[0]; - x217 = _tuple$101[1]; - x219 = new $Uint64(0, 0); - x220 = new $Uint64(0, 0); - _tuple$102 = bits.Mul64(x2, arg2[4]); - x220 = _tuple$102[0]; - x219 = _tuple$102[1]; - x221 = new $Uint64(0, 0); - x222 = new $Uint64(0, 0); - _tuple$103 = bits.Mul64(x2, arg2[3]); - x222 = _tuple$103[0]; - x221 = _tuple$103[1]; - x223 = new $Uint64(0, 0); - x224 = new $Uint64(0, 0); - _tuple$104 = bits.Mul64(x2, arg2[2]); - x224 = _tuple$104[0]; - x223 = _tuple$104[1]; - x225 = new $Uint64(0, 0); - x226 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x2, arg2[1]); - x226 = _tuple$105[0]; - x225 = _tuple$105[1]; - x227 = new $Uint64(0, 0); - x228 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x2, arg2[0]); - x228 = _tuple$106[0]; - x227 = _tuple$106[1]; - x229 = new $Uint64(0, 0); - x230 = new $Uint64(0, 0); - _tuple$107 = bits.Add64(x228, x225, new $Uint64(0, 0)); - x229 = _tuple$107[0]; - x230 = _tuple$107[1]; - x231 = new $Uint64(0, 0); - x232 = new $Uint64(0, 0); - _tuple$108 = bits.Add64(x226, x223, ((x$68 = (new p521Uint1(x230.$high, x230.$low)), new $Uint64(x$68.$high, x$68.$low)))); - x231 = _tuple$108[0]; - x232 = _tuple$108[1]; - x233 = new $Uint64(0, 0); - x234 = new $Uint64(0, 0); - _tuple$109 = bits.Add64(x224, x221, ((x$69 = (new p521Uint1(x232.$high, x232.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x233 = _tuple$109[0]; - x234 = _tuple$109[1]; - x235 = new $Uint64(0, 0); - x236 = new $Uint64(0, 0); - _tuple$110 = bits.Add64(x222, x219, ((x$70 = (new p521Uint1(x234.$high, x234.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x235 = _tuple$110[0]; - x236 = _tuple$110[1]; - x237 = new $Uint64(0, 0); - x238 = new $Uint64(0, 0); - _tuple$111 = bits.Add64(x220, x217, ((x$71 = (new p521Uint1(x236.$high, x236.$low)), new $Uint64(x$71.$high, x$71.$low)))); - x237 = _tuple$111[0]; - x238 = _tuple$111[1]; - x239 = new $Uint64(0, 0); - x240 = new $Uint64(0, 0); - _tuple$112 = bits.Add64(x218, x215, ((x$72 = (new p521Uint1(x238.$high, x238.$low)), new $Uint64(x$72.$high, x$72.$low)))); - x239 = _tuple$112[0]; - x240 = _tuple$112[1]; - x241 = new $Uint64(0, 0); - x242 = new $Uint64(0, 0); - _tuple$113 = bits.Add64(x216, x213, ((x$73 = (new p521Uint1(x240.$high, x240.$low)), new $Uint64(x$73.$high, x$73.$low)))); - x241 = _tuple$113[0]; - x242 = _tuple$113[1]; - x243 = new $Uint64(0, 0); - x244 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x214, x211, ((x$74 = (new p521Uint1(x242.$high, x242.$low)), new $Uint64(x$74.$high, x$74.$low)))); - x243 = _tuple$114[0]; - x244 = _tuple$114[1]; - x245 = (x$75 = ((x$76 = (new p521Uint1(x244.$high, x244.$low)), new $Uint64(x$76.$high, x$76.$low))), new $Uint64(x$75.$high + x212.$high, x$75.$low + x212.$low)); - x246 = new $Uint64(0, 0); - x247 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x192, x227, new $Uint64(0, 0)); - x246 = _tuple$115[0]; - x247 = _tuple$115[1]; - x248 = new $Uint64(0, 0); - x249 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x194, x229, ((x$77 = (new p521Uint1(x247.$high, x247.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x248 = _tuple$116[0]; - x249 = _tuple$116[1]; - x250 = new $Uint64(0, 0); - x251 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x196, x231, ((x$78 = (new p521Uint1(x249.$high, x249.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x250 = _tuple$117[0]; - x251 = _tuple$117[1]; - x252 = new $Uint64(0, 0); - x253 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x198, x233, ((x$79 = (new p521Uint1(x251.$high, x251.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x252 = _tuple$118[0]; - x253 = _tuple$118[1]; - x254 = new $Uint64(0, 0); - x255 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x200, x235, ((x$80 = (new p521Uint1(x253.$high, x253.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x254 = _tuple$119[0]; - x255 = _tuple$119[1]; - x256 = new $Uint64(0, 0); - x257 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x202, x237, ((x$81 = (new p521Uint1(x255.$high, x255.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x256 = _tuple$120[0]; - x257 = _tuple$120[1]; - x258 = new $Uint64(0, 0); - x259 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x204, x239, ((x$82 = (new p521Uint1(x257.$high, x257.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x258 = _tuple$121[0]; - x259 = _tuple$121[1]; - x260 = new $Uint64(0, 0); - x261 = new $Uint64(0, 0); - _tuple$122 = bits.Add64(x206, x241, ((x$83 = (new p521Uint1(x259.$high, x259.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x260 = _tuple$122[0]; - x261 = _tuple$122[1]; - x262 = new $Uint64(0, 0); - x263 = new $Uint64(0, 0); - _tuple$123 = bits.Add64(x208, x243, ((x$84 = (new p521Uint1(x261.$high, x261.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x262 = _tuple$123[0]; - x263 = _tuple$123[1]; - x264 = new $Uint64(0, 0); - x265 = new $Uint64(0, 0); - _tuple$124 = bits.Add64(x210, x245, ((x$85 = (new p521Uint1(x263.$high, x263.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x264 = _tuple$124[0]; - x265 = _tuple$124[1]; - x266 = new $Uint64(0, 0); - x267 = new $Uint64(0, 0); - _tuple$125 = bits.Mul64(x246, new $Uint64(0, 511)); - x267 = _tuple$125[0]; - x266 = _tuple$125[1]; - x268 = new $Uint64(0, 0); - x269 = new $Uint64(0, 0); - _tuple$126 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x269 = _tuple$126[0]; - x268 = _tuple$126[1]; - x270 = new $Uint64(0, 0); - x271 = new $Uint64(0, 0); - _tuple$127 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x271 = _tuple$127[0]; - x270 = _tuple$127[1]; - x272 = new $Uint64(0, 0); - x273 = new $Uint64(0, 0); - _tuple$128 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x273 = _tuple$128[0]; - x272 = _tuple$128[1]; - x274 = new $Uint64(0, 0); - x275 = new $Uint64(0, 0); - _tuple$129 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x275 = _tuple$129[0]; - x274 = _tuple$129[1]; - x276 = new $Uint64(0, 0); - x277 = new $Uint64(0, 0); - _tuple$130 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x277 = _tuple$130[0]; - x276 = _tuple$130[1]; - x278 = new $Uint64(0, 0); - x279 = new $Uint64(0, 0); - _tuple$131 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x279 = _tuple$131[0]; - x278 = _tuple$131[1]; - x280 = new $Uint64(0, 0); - x281 = new $Uint64(0, 0); - _tuple$132 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x281 = _tuple$132[0]; - x280 = _tuple$132[1]; - x282 = new $Uint64(0, 0); - x283 = new $Uint64(0, 0); - _tuple$133 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x283 = _tuple$133[0]; - x282 = _tuple$133[1]; - x284 = new $Uint64(0, 0); - x285 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x283, x280, new $Uint64(0, 0)); - x284 = _tuple$134[0]; - x285 = _tuple$134[1]; - x286 = new $Uint64(0, 0); - x287 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x281, x278, ((x$86 = (new p521Uint1(x285.$high, x285.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x286 = _tuple$135[0]; - x287 = _tuple$135[1]; - x288 = new $Uint64(0, 0); - x289 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x279, x276, ((x$87 = (new p521Uint1(x287.$high, x287.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x288 = _tuple$136[0]; - x289 = _tuple$136[1]; - x290 = new $Uint64(0, 0); - x291 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x277, x274, ((x$88 = (new p521Uint1(x289.$high, x289.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x290 = _tuple$137[0]; - x291 = _tuple$137[1]; - x292 = new $Uint64(0, 0); - x293 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x275, x272, ((x$89 = (new p521Uint1(x291.$high, x291.$low)), new $Uint64(x$89.$high, x$89.$low)))); - x292 = _tuple$138[0]; - x293 = _tuple$138[1]; - x294 = new $Uint64(0, 0); - x295 = new $Uint64(0, 0); - _tuple$139 = bits.Add64(x273, x270, ((x$90 = (new p521Uint1(x293.$high, x293.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x294 = _tuple$139[0]; - x295 = _tuple$139[1]; - x296 = new $Uint64(0, 0); - x297 = new $Uint64(0, 0); - _tuple$140 = bits.Add64(x271, x268, ((x$91 = (new p521Uint1(x295.$high, x295.$low)), new $Uint64(x$91.$high, x$91.$low)))); - x296 = _tuple$140[0]; - x297 = _tuple$140[1]; - x298 = new $Uint64(0, 0); - x299 = new $Uint64(0, 0); - _tuple$141 = bits.Add64(x269, x266, ((x$92 = (new p521Uint1(x297.$high, x297.$low)), new $Uint64(x$92.$high, x$92.$low)))); - x298 = _tuple$141[0]; - x299 = _tuple$141[1]; - x300 = (x$93 = ((x$94 = (new p521Uint1(x299.$high, x299.$low)), new $Uint64(x$94.$high, x$94.$low))), new $Uint64(x$93.$high + x267.$high, x$93.$low + x267.$low)); - x302 = new $Uint64(0, 0); - _tuple$142 = bits.Add64(x246, x282, new $Uint64(0, 0)); - x302 = _tuple$142[1]; - x303 = new $Uint64(0, 0); - x304 = new $Uint64(0, 0); - _tuple$143 = bits.Add64(x248, x284, ((x$95 = (new p521Uint1(x302.$high, x302.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x303 = _tuple$143[0]; - x304 = _tuple$143[1]; - x305 = new $Uint64(0, 0); - x306 = new $Uint64(0, 0); - _tuple$144 = bits.Add64(x250, x286, ((x$96 = (new p521Uint1(x304.$high, x304.$low)), new $Uint64(x$96.$high, x$96.$low)))); - x305 = _tuple$144[0]; - x306 = _tuple$144[1]; - x307 = new $Uint64(0, 0); - x308 = new $Uint64(0, 0); - _tuple$145 = bits.Add64(x252, x288, ((x$97 = (new p521Uint1(x306.$high, x306.$low)), new $Uint64(x$97.$high, x$97.$low)))); - x307 = _tuple$145[0]; - x308 = _tuple$145[1]; - x309 = new $Uint64(0, 0); - x310 = new $Uint64(0, 0); - _tuple$146 = bits.Add64(x254, x290, ((x$98 = (new p521Uint1(x308.$high, x308.$low)), new $Uint64(x$98.$high, x$98.$low)))); - x309 = _tuple$146[0]; - x310 = _tuple$146[1]; - x311 = new $Uint64(0, 0); - x312 = new $Uint64(0, 0); - _tuple$147 = bits.Add64(x256, x292, ((x$99 = (new p521Uint1(x310.$high, x310.$low)), new $Uint64(x$99.$high, x$99.$low)))); - x311 = _tuple$147[0]; - x312 = _tuple$147[1]; - x313 = new $Uint64(0, 0); - x314 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x258, x294, ((x$100 = (new p521Uint1(x312.$high, x312.$low)), new $Uint64(x$100.$high, x$100.$low)))); - x313 = _tuple$148[0]; - x314 = _tuple$148[1]; - x315 = new $Uint64(0, 0); - x316 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x260, x296, ((x$101 = (new p521Uint1(x314.$high, x314.$low)), new $Uint64(x$101.$high, x$101.$low)))); - x315 = _tuple$149[0]; - x316 = _tuple$149[1]; - x317 = new $Uint64(0, 0); - x318 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x262, x298, ((x$102 = (new p521Uint1(x316.$high, x316.$low)), new $Uint64(x$102.$high, x$102.$low)))); - x317 = _tuple$150[0]; - x318 = _tuple$150[1]; - x319 = new $Uint64(0, 0); - x320 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x264, x300, ((x$103 = (new p521Uint1(x318.$high, x318.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x319 = _tuple$151[0]; - x320 = _tuple$151[1]; - x321 = (x$104 = ((x$105 = (new p521Uint1(x320.$high, x320.$low)), new $Uint64(x$105.$high, x$105.$low))), x$106 = ((x$107 = (new p521Uint1(x265.$high, x265.$low)), new $Uint64(x$107.$high, x$107.$low))), new $Uint64(x$104.$high + x$106.$high, x$104.$low + x$106.$low)); - x322 = new $Uint64(0, 0); - x323 = new $Uint64(0, 0); - _tuple$152 = bits.Mul64(x3, arg2[8]); - x323 = _tuple$152[0]; - x322 = _tuple$152[1]; - x324 = new $Uint64(0, 0); - x325 = new $Uint64(0, 0); - _tuple$153 = bits.Mul64(x3, arg2[7]); - x325 = _tuple$153[0]; - x324 = _tuple$153[1]; - x326 = new $Uint64(0, 0); - x327 = new $Uint64(0, 0); - _tuple$154 = bits.Mul64(x3, arg2[6]); - x327 = _tuple$154[0]; - x326 = _tuple$154[1]; - x328 = new $Uint64(0, 0); - x329 = new $Uint64(0, 0); - _tuple$155 = bits.Mul64(x3, arg2[5]); - x329 = _tuple$155[0]; - x328 = _tuple$155[1]; - x330 = new $Uint64(0, 0); - x331 = new $Uint64(0, 0); - _tuple$156 = bits.Mul64(x3, arg2[4]); - x331 = _tuple$156[0]; - x330 = _tuple$156[1]; - x332 = new $Uint64(0, 0); - x333 = new $Uint64(0, 0); - _tuple$157 = bits.Mul64(x3, arg2[3]); - x333 = _tuple$157[0]; - x332 = _tuple$157[1]; - x334 = new $Uint64(0, 0); - x335 = new $Uint64(0, 0); - _tuple$158 = bits.Mul64(x3, arg2[2]); - x335 = _tuple$158[0]; - x334 = _tuple$158[1]; - x336 = new $Uint64(0, 0); - x337 = new $Uint64(0, 0); - _tuple$159 = bits.Mul64(x3, arg2[1]); - x337 = _tuple$159[0]; - x336 = _tuple$159[1]; - x338 = new $Uint64(0, 0); - x339 = new $Uint64(0, 0); - _tuple$160 = bits.Mul64(x3, arg2[0]); - x339 = _tuple$160[0]; - x338 = _tuple$160[1]; - x340 = new $Uint64(0, 0); - x341 = new $Uint64(0, 0); - _tuple$161 = bits.Add64(x339, x336, new $Uint64(0, 0)); - x340 = _tuple$161[0]; - x341 = _tuple$161[1]; - x342 = new $Uint64(0, 0); - x343 = new $Uint64(0, 0); - _tuple$162 = bits.Add64(x337, x334, ((x$108 = (new p521Uint1(x341.$high, x341.$low)), new $Uint64(x$108.$high, x$108.$low)))); - x342 = _tuple$162[0]; - x343 = _tuple$162[1]; - x344 = new $Uint64(0, 0); - x345 = new $Uint64(0, 0); - _tuple$163 = bits.Add64(x335, x332, ((x$109 = (new p521Uint1(x343.$high, x343.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x344 = _tuple$163[0]; - x345 = _tuple$163[1]; - x346 = new $Uint64(0, 0); - x347 = new $Uint64(0, 0); - _tuple$164 = bits.Add64(x333, x330, ((x$110 = (new p521Uint1(x345.$high, x345.$low)), new $Uint64(x$110.$high, x$110.$low)))); - x346 = _tuple$164[0]; - x347 = _tuple$164[1]; - x348 = new $Uint64(0, 0); - x349 = new $Uint64(0, 0); - _tuple$165 = bits.Add64(x331, x328, ((x$111 = (new p521Uint1(x347.$high, x347.$low)), new $Uint64(x$111.$high, x$111.$low)))); - x348 = _tuple$165[0]; - x349 = _tuple$165[1]; - x350 = new $Uint64(0, 0); - x351 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x329, x326, ((x$112 = (new p521Uint1(x349.$high, x349.$low)), new $Uint64(x$112.$high, x$112.$low)))); - x350 = _tuple$166[0]; - x351 = _tuple$166[1]; - x352 = new $Uint64(0, 0); - x353 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x327, x324, ((x$113 = (new p521Uint1(x351.$high, x351.$low)), new $Uint64(x$113.$high, x$113.$low)))); - x352 = _tuple$167[0]; - x353 = _tuple$167[1]; - x354 = new $Uint64(0, 0); - x355 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x325, x322, ((x$114 = (new p521Uint1(x353.$high, x353.$low)), new $Uint64(x$114.$high, x$114.$low)))); - x354 = _tuple$168[0]; - x355 = _tuple$168[1]; - x356 = (x$115 = ((x$116 = (new p521Uint1(x355.$high, x355.$low)), new $Uint64(x$116.$high, x$116.$low))), new $Uint64(x$115.$high + x323.$high, x$115.$low + x323.$low)); - x357 = new $Uint64(0, 0); - x358 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x303, x338, new $Uint64(0, 0)); - x357 = _tuple$169[0]; - x358 = _tuple$169[1]; - x359 = new $Uint64(0, 0); - x360 = new $Uint64(0, 0); - _tuple$170 = bits.Add64(x305, x340, ((x$117 = (new p521Uint1(x358.$high, x358.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x359 = _tuple$170[0]; - x360 = _tuple$170[1]; - x361 = new $Uint64(0, 0); - x362 = new $Uint64(0, 0); - _tuple$171 = bits.Add64(x307, x342, ((x$118 = (new p521Uint1(x360.$high, x360.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x361 = _tuple$171[0]; - x362 = _tuple$171[1]; - x363 = new $Uint64(0, 0); - x364 = new $Uint64(0, 0); - _tuple$172 = bits.Add64(x309, x344, ((x$119 = (new p521Uint1(x362.$high, x362.$low)), new $Uint64(x$119.$high, x$119.$low)))); - x363 = _tuple$172[0]; - x364 = _tuple$172[1]; - x365 = new $Uint64(0, 0); - x366 = new $Uint64(0, 0); - _tuple$173 = bits.Add64(x311, x346, ((x$120 = (new p521Uint1(x364.$high, x364.$low)), new $Uint64(x$120.$high, x$120.$low)))); - x365 = _tuple$173[0]; - x366 = _tuple$173[1]; - x367 = new $Uint64(0, 0); - x368 = new $Uint64(0, 0); - _tuple$174 = bits.Add64(x313, x348, ((x$121 = (new p521Uint1(x366.$high, x366.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x367 = _tuple$174[0]; - x368 = _tuple$174[1]; - x369 = new $Uint64(0, 0); - x370 = new $Uint64(0, 0); - _tuple$175 = bits.Add64(x315, x350, ((x$122 = (new p521Uint1(x368.$high, x368.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x369 = _tuple$175[0]; - x370 = _tuple$175[1]; - x371 = new $Uint64(0, 0); - x372 = new $Uint64(0, 0); - _tuple$176 = bits.Add64(x317, x352, ((x$123 = (new p521Uint1(x370.$high, x370.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x371 = _tuple$176[0]; - x372 = _tuple$176[1]; - x373 = new $Uint64(0, 0); - x374 = new $Uint64(0, 0); - _tuple$177 = bits.Add64(x319, x354, ((x$124 = (new p521Uint1(x372.$high, x372.$low)), new $Uint64(x$124.$high, x$124.$low)))); - x373 = _tuple$177[0]; - x374 = _tuple$177[1]; - x375 = new $Uint64(0, 0); - x376 = new $Uint64(0, 0); - _tuple$178 = bits.Add64(x321, x356, ((x$125 = (new p521Uint1(x374.$high, x374.$low)), new $Uint64(x$125.$high, x$125.$low)))); - x375 = _tuple$178[0]; - x376 = _tuple$178[1]; - x377 = new $Uint64(0, 0); - x378 = new $Uint64(0, 0); - _tuple$179 = bits.Mul64(x357, new $Uint64(0, 511)); - x378 = _tuple$179[0]; - x377 = _tuple$179[1]; - x379 = new $Uint64(0, 0); - x380 = new $Uint64(0, 0); - _tuple$180 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x380 = _tuple$180[0]; - x379 = _tuple$180[1]; - x381 = new $Uint64(0, 0); - x382 = new $Uint64(0, 0); - _tuple$181 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x382 = _tuple$181[0]; - x381 = _tuple$181[1]; - x383 = new $Uint64(0, 0); - x384 = new $Uint64(0, 0); - _tuple$182 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x384 = _tuple$182[0]; - x383 = _tuple$182[1]; - x385 = new $Uint64(0, 0); - x386 = new $Uint64(0, 0); - _tuple$183 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x386 = _tuple$183[0]; - x385 = _tuple$183[1]; - x387 = new $Uint64(0, 0); - x388 = new $Uint64(0, 0); - _tuple$184 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x388 = _tuple$184[0]; - x387 = _tuple$184[1]; - x389 = new $Uint64(0, 0); - x390 = new $Uint64(0, 0); - _tuple$185 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x390 = _tuple$185[0]; - x389 = _tuple$185[1]; - x391 = new $Uint64(0, 0); - x392 = new $Uint64(0, 0); - _tuple$186 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x392 = _tuple$186[0]; - x391 = _tuple$186[1]; - x393 = new $Uint64(0, 0); - x394 = new $Uint64(0, 0); - _tuple$187 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x394 = _tuple$187[0]; - x393 = _tuple$187[1]; - x395 = new $Uint64(0, 0); - x396 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x394, x391, new $Uint64(0, 0)); - x395 = _tuple$188[0]; - x396 = _tuple$188[1]; - x397 = new $Uint64(0, 0); - x398 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x392, x389, ((x$126 = (new p521Uint1(x396.$high, x396.$low)), new $Uint64(x$126.$high, x$126.$low)))); - x397 = _tuple$189[0]; - x398 = _tuple$189[1]; - x399 = new $Uint64(0, 0); - x400 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x390, x387, ((x$127 = (new p521Uint1(x398.$high, x398.$low)), new $Uint64(x$127.$high, x$127.$low)))); - x399 = _tuple$190[0]; - x400 = _tuple$190[1]; - x401 = new $Uint64(0, 0); - x402 = new $Uint64(0, 0); - _tuple$191 = bits.Add64(x388, x385, ((x$128 = (new p521Uint1(x400.$high, x400.$low)), new $Uint64(x$128.$high, x$128.$low)))); - x401 = _tuple$191[0]; - x402 = _tuple$191[1]; - x403 = new $Uint64(0, 0); - x404 = new $Uint64(0, 0); - _tuple$192 = bits.Add64(x386, x383, ((x$129 = (new p521Uint1(x402.$high, x402.$low)), new $Uint64(x$129.$high, x$129.$low)))); - x403 = _tuple$192[0]; - x404 = _tuple$192[1]; - x405 = new $Uint64(0, 0); - x406 = new $Uint64(0, 0); - _tuple$193 = bits.Add64(x384, x381, ((x$130 = (new p521Uint1(x404.$high, x404.$low)), new $Uint64(x$130.$high, x$130.$low)))); - x405 = _tuple$193[0]; - x406 = _tuple$193[1]; - x407 = new $Uint64(0, 0); - x408 = new $Uint64(0, 0); - _tuple$194 = bits.Add64(x382, x379, ((x$131 = (new p521Uint1(x406.$high, x406.$low)), new $Uint64(x$131.$high, x$131.$low)))); - x407 = _tuple$194[0]; - x408 = _tuple$194[1]; - x409 = new $Uint64(0, 0); - x410 = new $Uint64(0, 0); - _tuple$195 = bits.Add64(x380, x377, ((x$132 = (new p521Uint1(x408.$high, x408.$low)), new $Uint64(x$132.$high, x$132.$low)))); - x409 = _tuple$195[0]; - x410 = _tuple$195[1]; - x411 = (x$133 = ((x$134 = (new p521Uint1(x410.$high, x410.$low)), new $Uint64(x$134.$high, x$134.$low))), new $Uint64(x$133.$high + x378.$high, x$133.$low + x378.$low)); - x413 = new $Uint64(0, 0); - _tuple$196 = bits.Add64(x357, x393, new $Uint64(0, 0)); - x413 = _tuple$196[1]; - x414 = new $Uint64(0, 0); - x415 = new $Uint64(0, 0); - _tuple$197 = bits.Add64(x359, x395, ((x$135 = (new p521Uint1(x413.$high, x413.$low)), new $Uint64(x$135.$high, x$135.$low)))); - x414 = _tuple$197[0]; - x415 = _tuple$197[1]; - x416 = new $Uint64(0, 0); - x417 = new $Uint64(0, 0); - _tuple$198 = bits.Add64(x361, x397, ((x$136 = (new p521Uint1(x415.$high, x415.$low)), new $Uint64(x$136.$high, x$136.$low)))); - x416 = _tuple$198[0]; - x417 = _tuple$198[1]; - x418 = new $Uint64(0, 0); - x419 = new $Uint64(0, 0); - _tuple$199 = bits.Add64(x363, x399, ((x$137 = (new p521Uint1(x417.$high, x417.$low)), new $Uint64(x$137.$high, x$137.$low)))); - x418 = _tuple$199[0]; - x419 = _tuple$199[1]; - x420 = new $Uint64(0, 0); - x421 = new $Uint64(0, 0); - _tuple$200 = bits.Add64(x365, x401, ((x$138 = (new p521Uint1(x419.$high, x419.$low)), new $Uint64(x$138.$high, x$138.$low)))); - x420 = _tuple$200[0]; - x421 = _tuple$200[1]; - x422 = new $Uint64(0, 0); - x423 = new $Uint64(0, 0); - _tuple$201 = bits.Add64(x367, x403, ((x$139 = (new p521Uint1(x421.$high, x421.$low)), new $Uint64(x$139.$high, x$139.$low)))); - x422 = _tuple$201[0]; - x423 = _tuple$201[1]; - x424 = new $Uint64(0, 0); - x425 = new $Uint64(0, 0); - _tuple$202 = bits.Add64(x369, x405, ((x$140 = (new p521Uint1(x423.$high, x423.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x424 = _tuple$202[0]; - x425 = _tuple$202[1]; - x426 = new $Uint64(0, 0); - x427 = new $Uint64(0, 0); - _tuple$203 = bits.Add64(x371, x407, ((x$141 = (new p521Uint1(x425.$high, x425.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x426 = _tuple$203[0]; - x427 = _tuple$203[1]; - x428 = new $Uint64(0, 0); - x429 = new $Uint64(0, 0); - _tuple$204 = bits.Add64(x373, x409, ((x$142 = (new p521Uint1(x427.$high, x427.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x428 = _tuple$204[0]; - x429 = _tuple$204[1]; - x430 = new $Uint64(0, 0); - x431 = new $Uint64(0, 0); - _tuple$205 = bits.Add64(x375, x411, ((x$143 = (new p521Uint1(x429.$high, x429.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x430 = _tuple$205[0]; - x431 = _tuple$205[1]; - x432 = (x$144 = ((x$145 = (new p521Uint1(x431.$high, x431.$low)), new $Uint64(x$145.$high, x$145.$low))), x$146 = ((x$147 = (new p521Uint1(x376.$high, x376.$low)), new $Uint64(x$147.$high, x$147.$low))), new $Uint64(x$144.$high + x$146.$high, x$144.$low + x$146.$low)); - x433 = new $Uint64(0, 0); - x434 = new $Uint64(0, 0); - _tuple$206 = bits.Mul64(x4, arg2[8]); - x434 = _tuple$206[0]; - x433 = _tuple$206[1]; - x435 = new $Uint64(0, 0); - x436 = new $Uint64(0, 0); - _tuple$207 = bits.Mul64(x4, arg2[7]); - x436 = _tuple$207[0]; - x435 = _tuple$207[1]; - x437 = new $Uint64(0, 0); - x438 = new $Uint64(0, 0); - _tuple$208 = bits.Mul64(x4, arg2[6]); - x438 = _tuple$208[0]; - x437 = _tuple$208[1]; - x439 = new $Uint64(0, 0); - x440 = new $Uint64(0, 0); - _tuple$209 = bits.Mul64(x4, arg2[5]); - x440 = _tuple$209[0]; - x439 = _tuple$209[1]; - x441 = new $Uint64(0, 0); - x442 = new $Uint64(0, 0); - _tuple$210 = bits.Mul64(x4, arg2[4]); - x442 = _tuple$210[0]; - x441 = _tuple$210[1]; - x443 = new $Uint64(0, 0); - x444 = new $Uint64(0, 0); - _tuple$211 = bits.Mul64(x4, arg2[3]); - x444 = _tuple$211[0]; - x443 = _tuple$211[1]; - x445 = new $Uint64(0, 0); - x446 = new $Uint64(0, 0); - _tuple$212 = bits.Mul64(x4, arg2[2]); - x446 = _tuple$212[0]; - x445 = _tuple$212[1]; - x447 = new $Uint64(0, 0); - x448 = new $Uint64(0, 0); - _tuple$213 = bits.Mul64(x4, arg2[1]); - x448 = _tuple$213[0]; - x447 = _tuple$213[1]; - x449 = new $Uint64(0, 0); - x450 = new $Uint64(0, 0); - _tuple$214 = bits.Mul64(x4, arg2[0]); - x450 = _tuple$214[0]; - x449 = _tuple$214[1]; - x451 = new $Uint64(0, 0); - x452 = new $Uint64(0, 0); - _tuple$215 = bits.Add64(x450, x447, new $Uint64(0, 0)); - x451 = _tuple$215[0]; - x452 = _tuple$215[1]; - x453 = new $Uint64(0, 0); - x454 = new $Uint64(0, 0); - _tuple$216 = bits.Add64(x448, x445, ((x$148 = (new p521Uint1(x452.$high, x452.$low)), new $Uint64(x$148.$high, x$148.$low)))); - x453 = _tuple$216[0]; - x454 = _tuple$216[1]; - x455 = new $Uint64(0, 0); - x456 = new $Uint64(0, 0); - _tuple$217 = bits.Add64(x446, x443, ((x$149 = (new p521Uint1(x454.$high, x454.$low)), new $Uint64(x$149.$high, x$149.$low)))); - x455 = _tuple$217[0]; - x456 = _tuple$217[1]; - x457 = new $Uint64(0, 0); - x458 = new $Uint64(0, 0); - _tuple$218 = bits.Add64(x444, x441, ((x$150 = (new p521Uint1(x456.$high, x456.$low)), new $Uint64(x$150.$high, x$150.$low)))); - x457 = _tuple$218[0]; - x458 = _tuple$218[1]; - x459 = new $Uint64(0, 0); - x460 = new $Uint64(0, 0); - _tuple$219 = bits.Add64(x442, x439, ((x$151 = (new p521Uint1(x458.$high, x458.$low)), new $Uint64(x$151.$high, x$151.$low)))); - x459 = _tuple$219[0]; - x460 = _tuple$219[1]; - x461 = new $Uint64(0, 0); - x462 = new $Uint64(0, 0); - _tuple$220 = bits.Add64(x440, x437, ((x$152 = (new p521Uint1(x460.$high, x460.$low)), new $Uint64(x$152.$high, x$152.$low)))); - x461 = _tuple$220[0]; - x462 = _tuple$220[1]; - x463 = new $Uint64(0, 0); - x464 = new $Uint64(0, 0); - _tuple$221 = bits.Add64(x438, x435, ((x$153 = (new p521Uint1(x462.$high, x462.$low)), new $Uint64(x$153.$high, x$153.$low)))); - x463 = _tuple$221[0]; - x464 = _tuple$221[1]; - x465 = new $Uint64(0, 0); - x466 = new $Uint64(0, 0); - _tuple$222 = bits.Add64(x436, x433, ((x$154 = (new p521Uint1(x464.$high, x464.$low)), new $Uint64(x$154.$high, x$154.$low)))); - x465 = _tuple$222[0]; - x466 = _tuple$222[1]; - x467 = (x$155 = ((x$156 = (new p521Uint1(x466.$high, x466.$low)), new $Uint64(x$156.$high, x$156.$low))), new $Uint64(x$155.$high + x434.$high, x$155.$low + x434.$low)); - x468 = new $Uint64(0, 0); - x469 = new $Uint64(0, 0); - _tuple$223 = bits.Add64(x414, x449, new $Uint64(0, 0)); - x468 = _tuple$223[0]; - x469 = _tuple$223[1]; - x470 = new $Uint64(0, 0); - x471 = new $Uint64(0, 0); - _tuple$224 = bits.Add64(x416, x451, ((x$157 = (new p521Uint1(x469.$high, x469.$low)), new $Uint64(x$157.$high, x$157.$low)))); - x470 = _tuple$224[0]; - x471 = _tuple$224[1]; - x472 = new $Uint64(0, 0); - x473 = new $Uint64(0, 0); - _tuple$225 = bits.Add64(x418, x453, ((x$158 = (new p521Uint1(x471.$high, x471.$low)), new $Uint64(x$158.$high, x$158.$low)))); - x472 = _tuple$225[0]; - x473 = _tuple$225[1]; - x474 = new $Uint64(0, 0); - x475 = new $Uint64(0, 0); - _tuple$226 = bits.Add64(x420, x455, ((x$159 = (new p521Uint1(x473.$high, x473.$low)), new $Uint64(x$159.$high, x$159.$low)))); - x474 = _tuple$226[0]; - x475 = _tuple$226[1]; - x476 = new $Uint64(0, 0); - x477 = new $Uint64(0, 0); - _tuple$227 = bits.Add64(x422, x457, ((x$160 = (new p521Uint1(x475.$high, x475.$low)), new $Uint64(x$160.$high, x$160.$low)))); - x476 = _tuple$227[0]; - x477 = _tuple$227[1]; - x478 = new $Uint64(0, 0); - x479 = new $Uint64(0, 0); - _tuple$228 = bits.Add64(x424, x459, ((x$161 = (new p521Uint1(x477.$high, x477.$low)), new $Uint64(x$161.$high, x$161.$low)))); - x478 = _tuple$228[0]; - x479 = _tuple$228[1]; - x480 = new $Uint64(0, 0); - x481 = new $Uint64(0, 0); - _tuple$229 = bits.Add64(x426, x461, ((x$162 = (new p521Uint1(x479.$high, x479.$low)), new $Uint64(x$162.$high, x$162.$low)))); - x480 = _tuple$229[0]; - x481 = _tuple$229[1]; - x482 = new $Uint64(0, 0); - x483 = new $Uint64(0, 0); - _tuple$230 = bits.Add64(x428, x463, ((x$163 = (new p521Uint1(x481.$high, x481.$low)), new $Uint64(x$163.$high, x$163.$low)))); - x482 = _tuple$230[0]; - x483 = _tuple$230[1]; - x484 = new $Uint64(0, 0); - x485 = new $Uint64(0, 0); - _tuple$231 = bits.Add64(x430, x465, ((x$164 = (new p521Uint1(x483.$high, x483.$low)), new $Uint64(x$164.$high, x$164.$low)))); - x484 = _tuple$231[0]; - x485 = _tuple$231[1]; - x486 = new $Uint64(0, 0); - x487 = new $Uint64(0, 0); - _tuple$232 = bits.Add64(x432, x467, ((x$165 = (new p521Uint1(x485.$high, x485.$low)), new $Uint64(x$165.$high, x$165.$low)))); - x486 = _tuple$232[0]; - x487 = _tuple$232[1]; - x488 = new $Uint64(0, 0); - x489 = new $Uint64(0, 0); - _tuple$233 = bits.Mul64(x468, new $Uint64(0, 511)); - x489 = _tuple$233[0]; - x488 = _tuple$233[1]; - x490 = new $Uint64(0, 0); - x491 = new $Uint64(0, 0); - _tuple$234 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x491 = _tuple$234[0]; - x490 = _tuple$234[1]; - x492 = new $Uint64(0, 0); - x493 = new $Uint64(0, 0); - _tuple$235 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x493 = _tuple$235[0]; - x492 = _tuple$235[1]; - x494 = new $Uint64(0, 0); - x495 = new $Uint64(0, 0); - _tuple$236 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x495 = _tuple$236[0]; - x494 = _tuple$236[1]; - x496 = new $Uint64(0, 0); - x497 = new $Uint64(0, 0); - _tuple$237 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x497 = _tuple$237[0]; - x496 = _tuple$237[1]; - x498 = new $Uint64(0, 0); - x499 = new $Uint64(0, 0); - _tuple$238 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x499 = _tuple$238[0]; - x498 = _tuple$238[1]; - x500 = new $Uint64(0, 0); - x501 = new $Uint64(0, 0); - _tuple$239 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x501 = _tuple$239[0]; - x500 = _tuple$239[1]; - x502 = new $Uint64(0, 0); - x503 = new $Uint64(0, 0); - _tuple$240 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x503 = _tuple$240[0]; - x502 = _tuple$240[1]; - x504 = new $Uint64(0, 0); - x505 = new $Uint64(0, 0); - _tuple$241 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x505 = _tuple$241[0]; - x504 = _tuple$241[1]; - x506 = new $Uint64(0, 0); - x507 = new $Uint64(0, 0); - _tuple$242 = bits.Add64(x505, x502, new $Uint64(0, 0)); - x506 = _tuple$242[0]; - x507 = _tuple$242[1]; - x508 = new $Uint64(0, 0); - x509 = new $Uint64(0, 0); - _tuple$243 = bits.Add64(x503, x500, ((x$166 = (new p521Uint1(x507.$high, x507.$low)), new $Uint64(x$166.$high, x$166.$low)))); - x508 = _tuple$243[0]; - x509 = _tuple$243[1]; - x510 = new $Uint64(0, 0); - x511 = new $Uint64(0, 0); - _tuple$244 = bits.Add64(x501, x498, ((x$167 = (new p521Uint1(x509.$high, x509.$low)), new $Uint64(x$167.$high, x$167.$low)))); - x510 = _tuple$244[0]; - x511 = _tuple$244[1]; - x512 = new $Uint64(0, 0); - x513 = new $Uint64(0, 0); - _tuple$245 = bits.Add64(x499, x496, ((x$168 = (new p521Uint1(x511.$high, x511.$low)), new $Uint64(x$168.$high, x$168.$low)))); - x512 = _tuple$245[0]; - x513 = _tuple$245[1]; - x514 = new $Uint64(0, 0); - x515 = new $Uint64(0, 0); - _tuple$246 = bits.Add64(x497, x494, ((x$169 = (new p521Uint1(x513.$high, x513.$low)), new $Uint64(x$169.$high, x$169.$low)))); - x514 = _tuple$246[0]; - x515 = _tuple$246[1]; - x516 = new $Uint64(0, 0); - x517 = new $Uint64(0, 0); - _tuple$247 = bits.Add64(x495, x492, ((x$170 = (new p521Uint1(x515.$high, x515.$low)), new $Uint64(x$170.$high, x$170.$low)))); - x516 = _tuple$247[0]; - x517 = _tuple$247[1]; - x518 = new $Uint64(0, 0); - x519 = new $Uint64(0, 0); - _tuple$248 = bits.Add64(x493, x490, ((x$171 = (new p521Uint1(x517.$high, x517.$low)), new $Uint64(x$171.$high, x$171.$low)))); - x518 = _tuple$248[0]; - x519 = _tuple$248[1]; - x520 = new $Uint64(0, 0); - x521 = new $Uint64(0, 0); - _tuple$249 = bits.Add64(x491, x488, ((x$172 = (new p521Uint1(x519.$high, x519.$low)), new $Uint64(x$172.$high, x$172.$low)))); - x520 = _tuple$249[0]; - x521 = _tuple$249[1]; - x522 = (x$173 = ((x$174 = (new p521Uint1(x521.$high, x521.$low)), new $Uint64(x$174.$high, x$174.$low))), new $Uint64(x$173.$high + x489.$high, x$173.$low + x489.$low)); - x524 = new $Uint64(0, 0); - _tuple$250 = bits.Add64(x468, x504, new $Uint64(0, 0)); - x524 = _tuple$250[1]; - x525 = new $Uint64(0, 0); - x526 = new $Uint64(0, 0); - _tuple$251 = bits.Add64(x470, x506, ((x$175 = (new p521Uint1(x524.$high, x524.$low)), new $Uint64(x$175.$high, x$175.$low)))); - x525 = _tuple$251[0]; - x526 = _tuple$251[1]; - x527 = new $Uint64(0, 0); - x528 = new $Uint64(0, 0); - _tuple$252 = bits.Add64(x472, x508, ((x$176 = (new p521Uint1(x526.$high, x526.$low)), new $Uint64(x$176.$high, x$176.$low)))); - x527 = _tuple$252[0]; - x528 = _tuple$252[1]; - x529 = new $Uint64(0, 0); - x530 = new $Uint64(0, 0); - _tuple$253 = bits.Add64(x474, x510, ((x$177 = (new p521Uint1(x528.$high, x528.$low)), new $Uint64(x$177.$high, x$177.$low)))); - x529 = _tuple$253[0]; - x530 = _tuple$253[1]; - x531 = new $Uint64(0, 0); - x532 = new $Uint64(0, 0); - _tuple$254 = bits.Add64(x476, x512, ((x$178 = (new p521Uint1(x530.$high, x530.$low)), new $Uint64(x$178.$high, x$178.$low)))); - x531 = _tuple$254[0]; - x532 = _tuple$254[1]; - x533 = new $Uint64(0, 0); - x534 = new $Uint64(0, 0); - _tuple$255 = bits.Add64(x478, x514, ((x$179 = (new p521Uint1(x532.$high, x532.$low)), new $Uint64(x$179.$high, x$179.$low)))); - x533 = _tuple$255[0]; - x534 = _tuple$255[1]; - x535 = new $Uint64(0, 0); - x536 = new $Uint64(0, 0); - _tuple$256 = bits.Add64(x480, x516, ((x$180 = (new p521Uint1(x534.$high, x534.$low)), new $Uint64(x$180.$high, x$180.$low)))); - x535 = _tuple$256[0]; - x536 = _tuple$256[1]; - x537 = new $Uint64(0, 0); - x538 = new $Uint64(0, 0); - _tuple$257 = bits.Add64(x482, x518, ((x$181 = (new p521Uint1(x536.$high, x536.$low)), new $Uint64(x$181.$high, x$181.$low)))); - x537 = _tuple$257[0]; - x538 = _tuple$257[1]; - x539 = new $Uint64(0, 0); - x540 = new $Uint64(0, 0); - _tuple$258 = bits.Add64(x484, x520, ((x$182 = (new p521Uint1(x538.$high, x538.$low)), new $Uint64(x$182.$high, x$182.$low)))); - x539 = _tuple$258[0]; - x540 = _tuple$258[1]; - x541 = new $Uint64(0, 0); - x542 = new $Uint64(0, 0); - _tuple$259 = bits.Add64(x486, x522, ((x$183 = (new p521Uint1(x540.$high, x540.$low)), new $Uint64(x$183.$high, x$183.$low)))); - x541 = _tuple$259[0]; - x542 = _tuple$259[1]; - x543 = (x$184 = ((x$185 = (new p521Uint1(x542.$high, x542.$low)), new $Uint64(x$185.$high, x$185.$low))), x$186 = ((x$187 = (new p521Uint1(x487.$high, x487.$low)), new $Uint64(x$187.$high, x$187.$low))), new $Uint64(x$184.$high + x$186.$high, x$184.$low + x$186.$low)); - x544 = new $Uint64(0, 0); - x545 = new $Uint64(0, 0); - _tuple$260 = bits.Mul64(x5, arg2[8]); - x545 = _tuple$260[0]; - x544 = _tuple$260[1]; - x546 = new $Uint64(0, 0); - x547 = new $Uint64(0, 0); - _tuple$261 = bits.Mul64(x5, arg2[7]); - x547 = _tuple$261[0]; - x546 = _tuple$261[1]; - x548 = new $Uint64(0, 0); - x549 = new $Uint64(0, 0); - _tuple$262 = bits.Mul64(x5, arg2[6]); - x549 = _tuple$262[0]; - x548 = _tuple$262[1]; - x550 = new $Uint64(0, 0); - x551 = new $Uint64(0, 0); - _tuple$263 = bits.Mul64(x5, arg2[5]); - x551 = _tuple$263[0]; - x550 = _tuple$263[1]; - x552 = new $Uint64(0, 0); - x553 = new $Uint64(0, 0); - _tuple$264 = bits.Mul64(x5, arg2[4]); - x553 = _tuple$264[0]; - x552 = _tuple$264[1]; - x554 = new $Uint64(0, 0); - x555 = new $Uint64(0, 0); - _tuple$265 = bits.Mul64(x5, arg2[3]); - x555 = _tuple$265[0]; - x554 = _tuple$265[1]; - x556 = new $Uint64(0, 0); - x557 = new $Uint64(0, 0); - _tuple$266 = bits.Mul64(x5, arg2[2]); - x557 = _tuple$266[0]; - x556 = _tuple$266[1]; - x558 = new $Uint64(0, 0); - x559 = new $Uint64(0, 0); - _tuple$267 = bits.Mul64(x5, arg2[1]); - x559 = _tuple$267[0]; - x558 = _tuple$267[1]; - x560 = new $Uint64(0, 0); - x561 = new $Uint64(0, 0); - _tuple$268 = bits.Mul64(x5, arg2[0]); - x561 = _tuple$268[0]; - x560 = _tuple$268[1]; - x562 = new $Uint64(0, 0); - x563 = new $Uint64(0, 0); - _tuple$269 = bits.Add64(x561, x558, new $Uint64(0, 0)); - x562 = _tuple$269[0]; - x563 = _tuple$269[1]; - x564 = new $Uint64(0, 0); - x565 = new $Uint64(0, 0); - _tuple$270 = bits.Add64(x559, x556, ((x$188 = (new p521Uint1(x563.$high, x563.$low)), new $Uint64(x$188.$high, x$188.$low)))); - x564 = _tuple$270[0]; - x565 = _tuple$270[1]; - x566 = new $Uint64(0, 0); - x567 = new $Uint64(0, 0); - _tuple$271 = bits.Add64(x557, x554, ((x$189 = (new p521Uint1(x565.$high, x565.$low)), new $Uint64(x$189.$high, x$189.$low)))); - x566 = _tuple$271[0]; - x567 = _tuple$271[1]; - x568 = new $Uint64(0, 0); - x569 = new $Uint64(0, 0); - _tuple$272 = bits.Add64(x555, x552, ((x$190 = (new p521Uint1(x567.$high, x567.$low)), new $Uint64(x$190.$high, x$190.$low)))); - x568 = _tuple$272[0]; - x569 = _tuple$272[1]; - x570 = new $Uint64(0, 0); - x571 = new $Uint64(0, 0); - _tuple$273 = bits.Add64(x553, x550, ((x$191 = (new p521Uint1(x569.$high, x569.$low)), new $Uint64(x$191.$high, x$191.$low)))); - x570 = _tuple$273[0]; - x571 = _tuple$273[1]; - x572 = new $Uint64(0, 0); - x573 = new $Uint64(0, 0); - _tuple$274 = bits.Add64(x551, x548, ((x$192 = (new p521Uint1(x571.$high, x571.$low)), new $Uint64(x$192.$high, x$192.$low)))); - x572 = _tuple$274[0]; - x573 = _tuple$274[1]; - x574 = new $Uint64(0, 0); - x575 = new $Uint64(0, 0); - _tuple$275 = bits.Add64(x549, x546, ((x$193 = (new p521Uint1(x573.$high, x573.$low)), new $Uint64(x$193.$high, x$193.$low)))); - x574 = _tuple$275[0]; - x575 = _tuple$275[1]; - x576 = new $Uint64(0, 0); - x577 = new $Uint64(0, 0); - _tuple$276 = bits.Add64(x547, x544, ((x$194 = (new p521Uint1(x575.$high, x575.$low)), new $Uint64(x$194.$high, x$194.$low)))); - x576 = _tuple$276[0]; - x577 = _tuple$276[1]; - x578 = (x$195 = ((x$196 = (new p521Uint1(x577.$high, x577.$low)), new $Uint64(x$196.$high, x$196.$low))), new $Uint64(x$195.$high + x545.$high, x$195.$low + x545.$low)); - x579 = new $Uint64(0, 0); - x580 = new $Uint64(0, 0); - _tuple$277 = bits.Add64(x525, x560, new $Uint64(0, 0)); - x579 = _tuple$277[0]; - x580 = _tuple$277[1]; - x581 = new $Uint64(0, 0); - x582 = new $Uint64(0, 0); - _tuple$278 = bits.Add64(x527, x562, ((x$197 = (new p521Uint1(x580.$high, x580.$low)), new $Uint64(x$197.$high, x$197.$low)))); - x581 = _tuple$278[0]; - x582 = _tuple$278[1]; - x583 = new $Uint64(0, 0); - x584 = new $Uint64(0, 0); - _tuple$279 = bits.Add64(x529, x564, ((x$198 = (new p521Uint1(x582.$high, x582.$low)), new $Uint64(x$198.$high, x$198.$low)))); - x583 = _tuple$279[0]; - x584 = _tuple$279[1]; - x585 = new $Uint64(0, 0); - x586 = new $Uint64(0, 0); - _tuple$280 = bits.Add64(x531, x566, ((x$199 = (new p521Uint1(x584.$high, x584.$low)), new $Uint64(x$199.$high, x$199.$low)))); - x585 = _tuple$280[0]; - x586 = _tuple$280[1]; - x587 = new $Uint64(0, 0); - x588 = new $Uint64(0, 0); - _tuple$281 = bits.Add64(x533, x568, ((x$200 = (new p521Uint1(x586.$high, x586.$low)), new $Uint64(x$200.$high, x$200.$low)))); - x587 = _tuple$281[0]; - x588 = _tuple$281[1]; - x589 = new $Uint64(0, 0); - x590 = new $Uint64(0, 0); - _tuple$282 = bits.Add64(x535, x570, ((x$201 = (new p521Uint1(x588.$high, x588.$low)), new $Uint64(x$201.$high, x$201.$low)))); - x589 = _tuple$282[0]; - x590 = _tuple$282[1]; - x591 = new $Uint64(0, 0); - x592 = new $Uint64(0, 0); - _tuple$283 = bits.Add64(x537, x572, ((x$202 = (new p521Uint1(x590.$high, x590.$low)), new $Uint64(x$202.$high, x$202.$low)))); - x591 = _tuple$283[0]; - x592 = _tuple$283[1]; - x593 = new $Uint64(0, 0); - x594 = new $Uint64(0, 0); - _tuple$284 = bits.Add64(x539, x574, ((x$203 = (new p521Uint1(x592.$high, x592.$low)), new $Uint64(x$203.$high, x$203.$low)))); - x593 = _tuple$284[0]; - x594 = _tuple$284[1]; - x595 = new $Uint64(0, 0); - x596 = new $Uint64(0, 0); - _tuple$285 = bits.Add64(x541, x576, ((x$204 = (new p521Uint1(x594.$high, x594.$low)), new $Uint64(x$204.$high, x$204.$low)))); - x595 = _tuple$285[0]; - x596 = _tuple$285[1]; - x597 = new $Uint64(0, 0); - x598 = new $Uint64(0, 0); - _tuple$286 = bits.Add64(x543, x578, ((x$205 = (new p521Uint1(x596.$high, x596.$low)), new $Uint64(x$205.$high, x$205.$low)))); - x597 = _tuple$286[0]; - x598 = _tuple$286[1]; - x599 = new $Uint64(0, 0); - x600 = new $Uint64(0, 0); - _tuple$287 = bits.Mul64(x579, new $Uint64(0, 511)); - x600 = _tuple$287[0]; - x599 = _tuple$287[1]; - x601 = new $Uint64(0, 0); - x602 = new $Uint64(0, 0); - _tuple$288 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x602 = _tuple$288[0]; - x601 = _tuple$288[1]; - x603 = new $Uint64(0, 0); - x604 = new $Uint64(0, 0); - _tuple$289 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x604 = _tuple$289[0]; - x603 = _tuple$289[1]; - x605 = new $Uint64(0, 0); - x606 = new $Uint64(0, 0); - _tuple$290 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x606 = _tuple$290[0]; - x605 = _tuple$290[1]; - x607 = new $Uint64(0, 0); - x608 = new $Uint64(0, 0); - _tuple$291 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x608 = _tuple$291[0]; - x607 = _tuple$291[1]; - x609 = new $Uint64(0, 0); - x610 = new $Uint64(0, 0); - _tuple$292 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x610 = _tuple$292[0]; - x609 = _tuple$292[1]; - x611 = new $Uint64(0, 0); - x612 = new $Uint64(0, 0); - _tuple$293 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x612 = _tuple$293[0]; - x611 = _tuple$293[1]; - x613 = new $Uint64(0, 0); - x614 = new $Uint64(0, 0); - _tuple$294 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x614 = _tuple$294[0]; - x613 = _tuple$294[1]; - x615 = new $Uint64(0, 0); - x616 = new $Uint64(0, 0); - _tuple$295 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x616 = _tuple$295[0]; - x615 = _tuple$295[1]; - x617 = new $Uint64(0, 0); - x618 = new $Uint64(0, 0); - _tuple$296 = bits.Add64(x616, x613, new $Uint64(0, 0)); - x617 = _tuple$296[0]; - x618 = _tuple$296[1]; - x619 = new $Uint64(0, 0); - x620 = new $Uint64(0, 0); - _tuple$297 = bits.Add64(x614, x611, ((x$206 = (new p521Uint1(x618.$high, x618.$low)), new $Uint64(x$206.$high, x$206.$low)))); - x619 = _tuple$297[0]; - x620 = _tuple$297[1]; - x621 = new $Uint64(0, 0); - x622 = new $Uint64(0, 0); - _tuple$298 = bits.Add64(x612, x609, ((x$207 = (new p521Uint1(x620.$high, x620.$low)), new $Uint64(x$207.$high, x$207.$low)))); - x621 = _tuple$298[0]; - x622 = _tuple$298[1]; - x623 = new $Uint64(0, 0); - x624 = new $Uint64(0, 0); - _tuple$299 = bits.Add64(x610, x607, ((x$208 = (new p521Uint1(x622.$high, x622.$low)), new $Uint64(x$208.$high, x$208.$low)))); - x623 = _tuple$299[0]; - x624 = _tuple$299[1]; - x625 = new $Uint64(0, 0); - x626 = new $Uint64(0, 0); - _tuple$300 = bits.Add64(x608, x605, ((x$209 = (new p521Uint1(x624.$high, x624.$low)), new $Uint64(x$209.$high, x$209.$low)))); - x625 = _tuple$300[0]; - x626 = _tuple$300[1]; - x627 = new $Uint64(0, 0); - x628 = new $Uint64(0, 0); - _tuple$301 = bits.Add64(x606, x603, ((x$210 = (new p521Uint1(x626.$high, x626.$low)), new $Uint64(x$210.$high, x$210.$low)))); - x627 = _tuple$301[0]; - x628 = _tuple$301[1]; - x629 = new $Uint64(0, 0); - x630 = new $Uint64(0, 0); - _tuple$302 = bits.Add64(x604, x601, ((x$211 = (new p521Uint1(x628.$high, x628.$low)), new $Uint64(x$211.$high, x$211.$low)))); - x629 = _tuple$302[0]; - x630 = _tuple$302[1]; - x631 = new $Uint64(0, 0); - x632 = new $Uint64(0, 0); - _tuple$303 = bits.Add64(x602, x599, ((x$212 = (new p521Uint1(x630.$high, x630.$low)), new $Uint64(x$212.$high, x$212.$low)))); - x631 = _tuple$303[0]; - x632 = _tuple$303[1]; - x633 = (x$213 = ((x$214 = (new p521Uint1(x632.$high, x632.$low)), new $Uint64(x$214.$high, x$214.$low))), new $Uint64(x$213.$high + x600.$high, x$213.$low + x600.$low)); - x635 = new $Uint64(0, 0); - _tuple$304 = bits.Add64(x579, x615, new $Uint64(0, 0)); - x635 = _tuple$304[1]; - x636 = new $Uint64(0, 0); - x637 = new $Uint64(0, 0); - _tuple$305 = bits.Add64(x581, x617, ((x$215 = (new p521Uint1(x635.$high, x635.$low)), new $Uint64(x$215.$high, x$215.$low)))); - x636 = _tuple$305[0]; - x637 = _tuple$305[1]; - x638 = new $Uint64(0, 0); - x639 = new $Uint64(0, 0); - _tuple$306 = bits.Add64(x583, x619, ((x$216 = (new p521Uint1(x637.$high, x637.$low)), new $Uint64(x$216.$high, x$216.$low)))); - x638 = _tuple$306[0]; - x639 = _tuple$306[1]; - x640 = new $Uint64(0, 0); - x641 = new $Uint64(0, 0); - _tuple$307 = bits.Add64(x585, x621, ((x$217 = (new p521Uint1(x639.$high, x639.$low)), new $Uint64(x$217.$high, x$217.$low)))); - x640 = _tuple$307[0]; - x641 = _tuple$307[1]; - x642 = new $Uint64(0, 0); - x643 = new $Uint64(0, 0); - _tuple$308 = bits.Add64(x587, x623, ((x$218 = (new p521Uint1(x641.$high, x641.$low)), new $Uint64(x$218.$high, x$218.$low)))); - x642 = _tuple$308[0]; - x643 = _tuple$308[1]; - x644 = new $Uint64(0, 0); - x645 = new $Uint64(0, 0); - _tuple$309 = bits.Add64(x589, x625, ((x$219 = (new p521Uint1(x643.$high, x643.$low)), new $Uint64(x$219.$high, x$219.$low)))); - x644 = _tuple$309[0]; - x645 = _tuple$309[1]; - x646 = new $Uint64(0, 0); - x647 = new $Uint64(0, 0); - _tuple$310 = bits.Add64(x591, x627, ((x$220 = (new p521Uint1(x645.$high, x645.$low)), new $Uint64(x$220.$high, x$220.$low)))); - x646 = _tuple$310[0]; - x647 = _tuple$310[1]; - x648 = new $Uint64(0, 0); - x649 = new $Uint64(0, 0); - _tuple$311 = bits.Add64(x593, x629, ((x$221 = (new p521Uint1(x647.$high, x647.$low)), new $Uint64(x$221.$high, x$221.$low)))); - x648 = _tuple$311[0]; - x649 = _tuple$311[1]; - x650 = new $Uint64(0, 0); - x651 = new $Uint64(0, 0); - _tuple$312 = bits.Add64(x595, x631, ((x$222 = (new p521Uint1(x649.$high, x649.$low)), new $Uint64(x$222.$high, x$222.$low)))); - x650 = _tuple$312[0]; - x651 = _tuple$312[1]; - x652 = new $Uint64(0, 0); - x653 = new $Uint64(0, 0); - _tuple$313 = bits.Add64(x597, x633, ((x$223 = (new p521Uint1(x651.$high, x651.$low)), new $Uint64(x$223.$high, x$223.$low)))); - x652 = _tuple$313[0]; - x653 = _tuple$313[1]; - x654 = (x$224 = ((x$225 = (new p521Uint1(x653.$high, x653.$low)), new $Uint64(x$225.$high, x$225.$low))), x$226 = ((x$227 = (new p521Uint1(x598.$high, x598.$low)), new $Uint64(x$227.$high, x$227.$low))), new $Uint64(x$224.$high + x$226.$high, x$224.$low + x$226.$low)); - x655 = new $Uint64(0, 0); - x656 = new $Uint64(0, 0); - _tuple$314 = bits.Mul64(x6, arg2[8]); - x656 = _tuple$314[0]; - x655 = _tuple$314[1]; - x657 = new $Uint64(0, 0); - x658 = new $Uint64(0, 0); - _tuple$315 = bits.Mul64(x6, arg2[7]); - x658 = _tuple$315[0]; - x657 = _tuple$315[1]; - x659 = new $Uint64(0, 0); - x660 = new $Uint64(0, 0); - _tuple$316 = bits.Mul64(x6, arg2[6]); - x660 = _tuple$316[0]; - x659 = _tuple$316[1]; - x661 = new $Uint64(0, 0); - x662 = new $Uint64(0, 0); - _tuple$317 = bits.Mul64(x6, arg2[5]); - x662 = _tuple$317[0]; - x661 = _tuple$317[1]; - x663 = new $Uint64(0, 0); - x664 = new $Uint64(0, 0); - _tuple$318 = bits.Mul64(x6, arg2[4]); - x664 = _tuple$318[0]; - x663 = _tuple$318[1]; - x665 = new $Uint64(0, 0); - x666 = new $Uint64(0, 0); - _tuple$319 = bits.Mul64(x6, arg2[3]); - x666 = _tuple$319[0]; - x665 = _tuple$319[1]; - x667 = new $Uint64(0, 0); - x668 = new $Uint64(0, 0); - _tuple$320 = bits.Mul64(x6, arg2[2]); - x668 = _tuple$320[0]; - x667 = _tuple$320[1]; - x669 = new $Uint64(0, 0); - x670 = new $Uint64(0, 0); - _tuple$321 = bits.Mul64(x6, arg2[1]); - x670 = _tuple$321[0]; - x669 = _tuple$321[1]; - x671 = new $Uint64(0, 0); - x672 = new $Uint64(0, 0); - _tuple$322 = bits.Mul64(x6, arg2[0]); - x672 = _tuple$322[0]; - x671 = _tuple$322[1]; - x673 = new $Uint64(0, 0); - x674 = new $Uint64(0, 0); - _tuple$323 = bits.Add64(x672, x669, new $Uint64(0, 0)); - x673 = _tuple$323[0]; - x674 = _tuple$323[1]; - x675 = new $Uint64(0, 0); - x676 = new $Uint64(0, 0); - _tuple$324 = bits.Add64(x670, x667, ((x$228 = (new p521Uint1(x674.$high, x674.$low)), new $Uint64(x$228.$high, x$228.$low)))); - x675 = _tuple$324[0]; - x676 = _tuple$324[1]; - x677 = new $Uint64(0, 0); - x678 = new $Uint64(0, 0); - _tuple$325 = bits.Add64(x668, x665, ((x$229 = (new p521Uint1(x676.$high, x676.$low)), new $Uint64(x$229.$high, x$229.$low)))); - x677 = _tuple$325[0]; - x678 = _tuple$325[1]; - x679 = new $Uint64(0, 0); - x680 = new $Uint64(0, 0); - _tuple$326 = bits.Add64(x666, x663, ((x$230 = (new p521Uint1(x678.$high, x678.$low)), new $Uint64(x$230.$high, x$230.$low)))); - x679 = _tuple$326[0]; - x680 = _tuple$326[1]; - x681 = new $Uint64(0, 0); - x682 = new $Uint64(0, 0); - _tuple$327 = bits.Add64(x664, x661, ((x$231 = (new p521Uint1(x680.$high, x680.$low)), new $Uint64(x$231.$high, x$231.$low)))); - x681 = _tuple$327[0]; - x682 = _tuple$327[1]; - x683 = new $Uint64(0, 0); - x684 = new $Uint64(0, 0); - _tuple$328 = bits.Add64(x662, x659, ((x$232 = (new p521Uint1(x682.$high, x682.$low)), new $Uint64(x$232.$high, x$232.$low)))); - x683 = _tuple$328[0]; - x684 = _tuple$328[1]; - x685 = new $Uint64(0, 0); - x686 = new $Uint64(0, 0); - _tuple$329 = bits.Add64(x660, x657, ((x$233 = (new p521Uint1(x684.$high, x684.$low)), new $Uint64(x$233.$high, x$233.$low)))); - x685 = _tuple$329[0]; - x686 = _tuple$329[1]; - x687 = new $Uint64(0, 0); - x688 = new $Uint64(0, 0); - _tuple$330 = bits.Add64(x658, x655, ((x$234 = (new p521Uint1(x686.$high, x686.$low)), new $Uint64(x$234.$high, x$234.$low)))); - x687 = _tuple$330[0]; - x688 = _tuple$330[1]; - x689 = (x$235 = ((x$236 = (new p521Uint1(x688.$high, x688.$low)), new $Uint64(x$236.$high, x$236.$low))), new $Uint64(x$235.$high + x656.$high, x$235.$low + x656.$low)); - x690 = new $Uint64(0, 0); - x691 = new $Uint64(0, 0); - _tuple$331 = bits.Add64(x636, x671, new $Uint64(0, 0)); - x690 = _tuple$331[0]; - x691 = _tuple$331[1]; - x692 = new $Uint64(0, 0); - x693 = new $Uint64(0, 0); - _tuple$332 = bits.Add64(x638, x673, ((x$237 = (new p521Uint1(x691.$high, x691.$low)), new $Uint64(x$237.$high, x$237.$low)))); - x692 = _tuple$332[0]; - x693 = _tuple$332[1]; - x694 = new $Uint64(0, 0); - x695 = new $Uint64(0, 0); - _tuple$333 = bits.Add64(x640, x675, ((x$238 = (new p521Uint1(x693.$high, x693.$low)), new $Uint64(x$238.$high, x$238.$low)))); - x694 = _tuple$333[0]; - x695 = _tuple$333[1]; - x696 = new $Uint64(0, 0); - x697 = new $Uint64(0, 0); - _tuple$334 = bits.Add64(x642, x677, ((x$239 = (new p521Uint1(x695.$high, x695.$low)), new $Uint64(x$239.$high, x$239.$low)))); - x696 = _tuple$334[0]; - x697 = _tuple$334[1]; - x698 = new $Uint64(0, 0); - x699 = new $Uint64(0, 0); - _tuple$335 = bits.Add64(x644, x679, ((x$240 = (new p521Uint1(x697.$high, x697.$low)), new $Uint64(x$240.$high, x$240.$low)))); - x698 = _tuple$335[0]; - x699 = _tuple$335[1]; - x700 = new $Uint64(0, 0); - x701 = new $Uint64(0, 0); - _tuple$336 = bits.Add64(x646, x681, ((x$241 = (new p521Uint1(x699.$high, x699.$low)), new $Uint64(x$241.$high, x$241.$low)))); - x700 = _tuple$336[0]; - x701 = _tuple$336[1]; - x702 = new $Uint64(0, 0); - x703 = new $Uint64(0, 0); - _tuple$337 = bits.Add64(x648, x683, ((x$242 = (new p521Uint1(x701.$high, x701.$low)), new $Uint64(x$242.$high, x$242.$low)))); - x702 = _tuple$337[0]; - x703 = _tuple$337[1]; - x704 = new $Uint64(0, 0); - x705 = new $Uint64(0, 0); - _tuple$338 = bits.Add64(x650, x685, ((x$243 = (new p521Uint1(x703.$high, x703.$low)), new $Uint64(x$243.$high, x$243.$low)))); - x704 = _tuple$338[0]; - x705 = _tuple$338[1]; - x706 = new $Uint64(0, 0); - x707 = new $Uint64(0, 0); - _tuple$339 = bits.Add64(x652, x687, ((x$244 = (new p521Uint1(x705.$high, x705.$low)), new $Uint64(x$244.$high, x$244.$low)))); - x706 = _tuple$339[0]; - x707 = _tuple$339[1]; - x708 = new $Uint64(0, 0); - x709 = new $Uint64(0, 0); - _tuple$340 = bits.Add64(x654, x689, ((x$245 = (new p521Uint1(x707.$high, x707.$low)), new $Uint64(x$245.$high, x$245.$low)))); - x708 = _tuple$340[0]; - x709 = _tuple$340[1]; - x710 = new $Uint64(0, 0); - x711 = new $Uint64(0, 0); - _tuple$341 = bits.Mul64(x690, new $Uint64(0, 511)); - x711 = _tuple$341[0]; - x710 = _tuple$341[1]; - x712 = new $Uint64(0, 0); - x713 = new $Uint64(0, 0); - _tuple$342 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x713 = _tuple$342[0]; - x712 = _tuple$342[1]; - x714 = new $Uint64(0, 0); - x715 = new $Uint64(0, 0); - _tuple$343 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x715 = _tuple$343[0]; - x714 = _tuple$343[1]; - x716 = new $Uint64(0, 0); - x717 = new $Uint64(0, 0); - _tuple$344 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x717 = _tuple$344[0]; - x716 = _tuple$344[1]; - x718 = new $Uint64(0, 0); - x719 = new $Uint64(0, 0); - _tuple$345 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x719 = _tuple$345[0]; - x718 = _tuple$345[1]; - x720 = new $Uint64(0, 0); - x721 = new $Uint64(0, 0); - _tuple$346 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x721 = _tuple$346[0]; - x720 = _tuple$346[1]; - x722 = new $Uint64(0, 0); - x723 = new $Uint64(0, 0); - _tuple$347 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x723 = _tuple$347[0]; - x722 = _tuple$347[1]; - x724 = new $Uint64(0, 0); - x725 = new $Uint64(0, 0); - _tuple$348 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x725 = _tuple$348[0]; - x724 = _tuple$348[1]; - x726 = new $Uint64(0, 0); - x727 = new $Uint64(0, 0); - _tuple$349 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x727 = _tuple$349[0]; - x726 = _tuple$349[1]; - x728 = new $Uint64(0, 0); - x729 = new $Uint64(0, 0); - _tuple$350 = bits.Add64(x727, x724, new $Uint64(0, 0)); - x728 = _tuple$350[0]; - x729 = _tuple$350[1]; - x730 = new $Uint64(0, 0); - x731 = new $Uint64(0, 0); - _tuple$351 = bits.Add64(x725, x722, ((x$246 = (new p521Uint1(x729.$high, x729.$low)), new $Uint64(x$246.$high, x$246.$low)))); - x730 = _tuple$351[0]; - x731 = _tuple$351[1]; - x732 = new $Uint64(0, 0); - x733 = new $Uint64(0, 0); - _tuple$352 = bits.Add64(x723, x720, ((x$247 = (new p521Uint1(x731.$high, x731.$low)), new $Uint64(x$247.$high, x$247.$low)))); - x732 = _tuple$352[0]; - x733 = _tuple$352[1]; - x734 = new $Uint64(0, 0); - x735 = new $Uint64(0, 0); - _tuple$353 = bits.Add64(x721, x718, ((x$248 = (new p521Uint1(x733.$high, x733.$low)), new $Uint64(x$248.$high, x$248.$low)))); - x734 = _tuple$353[0]; - x735 = _tuple$353[1]; - x736 = new $Uint64(0, 0); - x737 = new $Uint64(0, 0); - _tuple$354 = bits.Add64(x719, x716, ((x$249 = (new p521Uint1(x735.$high, x735.$low)), new $Uint64(x$249.$high, x$249.$low)))); - x736 = _tuple$354[0]; - x737 = _tuple$354[1]; - x738 = new $Uint64(0, 0); - x739 = new $Uint64(0, 0); - _tuple$355 = bits.Add64(x717, x714, ((x$250 = (new p521Uint1(x737.$high, x737.$low)), new $Uint64(x$250.$high, x$250.$low)))); - x738 = _tuple$355[0]; - x739 = _tuple$355[1]; - x740 = new $Uint64(0, 0); - x741 = new $Uint64(0, 0); - _tuple$356 = bits.Add64(x715, x712, ((x$251 = (new p521Uint1(x739.$high, x739.$low)), new $Uint64(x$251.$high, x$251.$low)))); - x740 = _tuple$356[0]; - x741 = _tuple$356[1]; - x742 = new $Uint64(0, 0); - x743 = new $Uint64(0, 0); - _tuple$357 = bits.Add64(x713, x710, ((x$252 = (new p521Uint1(x741.$high, x741.$low)), new $Uint64(x$252.$high, x$252.$low)))); - x742 = _tuple$357[0]; - x743 = _tuple$357[1]; - x744 = (x$253 = ((x$254 = (new p521Uint1(x743.$high, x743.$low)), new $Uint64(x$254.$high, x$254.$low))), new $Uint64(x$253.$high + x711.$high, x$253.$low + x711.$low)); - x746 = new $Uint64(0, 0); - _tuple$358 = bits.Add64(x690, x726, new $Uint64(0, 0)); - x746 = _tuple$358[1]; - x747 = new $Uint64(0, 0); - x748 = new $Uint64(0, 0); - _tuple$359 = bits.Add64(x692, x728, ((x$255 = (new p521Uint1(x746.$high, x746.$low)), new $Uint64(x$255.$high, x$255.$low)))); - x747 = _tuple$359[0]; - x748 = _tuple$359[1]; - x749 = new $Uint64(0, 0); - x750 = new $Uint64(0, 0); - _tuple$360 = bits.Add64(x694, x730, ((x$256 = (new p521Uint1(x748.$high, x748.$low)), new $Uint64(x$256.$high, x$256.$low)))); - x749 = _tuple$360[0]; - x750 = _tuple$360[1]; - x751 = new $Uint64(0, 0); - x752 = new $Uint64(0, 0); - _tuple$361 = bits.Add64(x696, x732, ((x$257 = (new p521Uint1(x750.$high, x750.$low)), new $Uint64(x$257.$high, x$257.$low)))); - x751 = _tuple$361[0]; - x752 = _tuple$361[1]; - x753 = new $Uint64(0, 0); - x754 = new $Uint64(0, 0); - _tuple$362 = bits.Add64(x698, x734, ((x$258 = (new p521Uint1(x752.$high, x752.$low)), new $Uint64(x$258.$high, x$258.$low)))); - x753 = _tuple$362[0]; - x754 = _tuple$362[1]; - x755 = new $Uint64(0, 0); - x756 = new $Uint64(0, 0); - _tuple$363 = bits.Add64(x700, x736, ((x$259 = (new p521Uint1(x754.$high, x754.$low)), new $Uint64(x$259.$high, x$259.$low)))); - x755 = _tuple$363[0]; - x756 = _tuple$363[1]; - x757 = new $Uint64(0, 0); - x758 = new $Uint64(0, 0); - _tuple$364 = bits.Add64(x702, x738, ((x$260 = (new p521Uint1(x756.$high, x756.$low)), new $Uint64(x$260.$high, x$260.$low)))); - x757 = _tuple$364[0]; - x758 = _tuple$364[1]; - x759 = new $Uint64(0, 0); - x760 = new $Uint64(0, 0); - _tuple$365 = bits.Add64(x704, x740, ((x$261 = (new p521Uint1(x758.$high, x758.$low)), new $Uint64(x$261.$high, x$261.$low)))); - x759 = _tuple$365[0]; - x760 = _tuple$365[1]; - x761 = new $Uint64(0, 0); - x762 = new $Uint64(0, 0); - _tuple$366 = bits.Add64(x706, x742, ((x$262 = (new p521Uint1(x760.$high, x760.$low)), new $Uint64(x$262.$high, x$262.$low)))); - x761 = _tuple$366[0]; - x762 = _tuple$366[1]; - x763 = new $Uint64(0, 0); - x764 = new $Uint64(0, 0); - _tuple$367 = bits.Add64(x708, x744, ((x$263 = (new p521Uint1(x762.$high, x762.$low)), new $Uint64(x$263.$high, x$263.$low)))); - x763 = _tuple$367[0]; - x764 = _tuple$367[1]; - x765 = (x$264 = ((x$265 = (new p521Uint1(x764.$high, x764.$low)), new $Uint64(x$265.$high, x$265.$low))), x$266 = ((x$267 = (new p521Uint1(x709.$high, x709.$low)), new $Uint64(x$267.$high, x$267.$low))), new $Uint64(x$264.$high + x$266.$high, x$264.$low + x$266.$low)); - x766 = new $Uint64(0, 0); - x767 = new $Uint64(0, 0); - _tuple$368 = bits.Mul64(x7, arg2[8]); - x767 = _tuple$368[0]; - x766 = _tuple$368[1]; - x768 = new $Uint64(0, 0); - x769 = new $Uint64(0, 0); - _tuple$369 = bits.Mul64(x7, arg2[7]); - x769 = _tuple$369[0]; - x768 = _tuple$369[1]; - x770 = new $Uint64(0, 0); - x771 = new $Uint64(0, 0); - _tuple$370 = bits.Mul64(x7, arg2[6]); - x771 = _tuple$370[0]; - x770 = _tuple$370[1]; - x772 = new $Uint64(0, 0); - x773 = new $Uint64(0, 0); - _tuple$371 = bits.Mul64(x7, arg2[5]); - x773 = _tuple$371[0]; - x772 = _tuple$371[1]; - x774 = new $Uint64(0, 0); - x775 = new $Uint64(0, 0); - _tuple$372 = bits.Mul64(x7, arg2[4]); - x775 = _tuple$372[0]; - x774 = _tuple$372[1]; - x776 = new $Uint64(0, 0); - x777 = new $Uint64(0, 0); - _tuple$373 = bits.Mul64(x7, arg2[3]); - x777 = _tuple$373[0]; - x776 = _tuple$373[1]; - x778 = new $Uint64(0, 0); - x779 = new $Uint64(0, 0); - _tuple$374 = bits.Mul64(x7, arg2[2]); - x779 = _tuple$374[0]; - x778 = _tuple$374[1]; - x780 = new $Uint64(0, 0); - x781 = new $Uint64(0, 0); - _tuple$375 = bits.Mul64(x7, arg2[1]); - x781 = _tuple$375[0]; - x780 = _tuple$375[1]; - x782 = new $Uint64(0, 0); - x783 = new $Uint64(0, 0); - _tuple$376 = bits.Mul64(x7, arg2[0]); - x783 = _tuple$376[0]; - x782 = _tuple$376[1]; - x784 = new $Uint64(0, 0); - x785 = new $Uint64(0, 0); - _tuple$377 = bits.Add64(x783, x780, new $Uint64(0, 0)); - x784 = _tuple$377[0]; - x785 = _tuple$377[1]; - x786 = new $Uint64(0, 0); - x787 = new $Uint64(0, 0); - _tuple$378 = bits.Add64(x781, x778, ((x$268 = (new p521Uint1(x785.$high, x785.$low)), new $Uint64(x$268.$high, x$268.$low)))); - x786 = _tuple$378[0]; - x787 = _tuple$378[1]; - x788 = new $Uint64(0, 0); - x789 = new $Uint64(0, 0); - _tuple$379 = bits.Add64(x779, x776, ((x$269 = (new p521Uint1(x787.$high, x787.$low)), new $Uint64(x$269.$high, x$269.$low)))); - x788 = _tuple$379[0]; - x789 = _tuple$379[1]; - x790 = new $Uint64(0, 0); - x791 = new $Uint64(0, 0); - _tuple$380 = bits.Add64(x777, x774, ((x$270 = (new p521Uint1(x789.$high, x789.$low)), new $Uint64(x$270.$high, x$270.$low)))); - x790 = _tuple$380[0]; - x791 = _tuple$380[1]; - x792 = new $Uint64(0, 0); - x793 = new $Uint64(0, 0); - _tuple$381 = bits.Add64(x775, x772, ((x$271 = (new p521Uint1(x791.$high, x791.$low)), new $Uint64(x$271.$high, x$271.$low)))); - x792 = _tuple$381[0]; - x793 = _tuple$381[1]; - x794 = new $Uint64(0, 0); - x795 = new $Uint64(0, 0); - _tuple$382 = bits.Add64(x773, x770, ((x$272 = (new p521Uint1(x793.$high, x793.$low)), new $Uint64(x$272.$high, x$272.$low)))); - x794 = _tuple$382[0]; - x795 = _tuple$382[1]; - x796 = new $Uint64(0, 0); - x797 = new $Uint64(0, 0); - _tuple$383 = bits.Add64(x771, x768, ((x$273 = (new p521Uint1(x795.$high, x795.$low)), new $Uint64(x$273.$high, x$273.$low)))); - x796 = _tuple$383[0]; - x797 = _tuple$383[1]; - x798 = new $Uint64(0, 0); - x799 = new $Uint64(0, 0); - _tuple$384 = bits.Add64(x769, x766, ((x$274 = (new p521Uint1(x797.$high, x797.$low)), new $Uint64(x$274.$high, x$274.$low)))); - x798 = _tuple$384[0]; - x799 = _tuple$384[1]; - x800 = (x$275 = ((x$276 = (new p521Uint1(x799.$high, x799.$low)), new $Uint64(x$276.$high, x$276.$low))), new $Uint64(x$275.$high + x767.$high, x$275.$low + x767.$low)); - x801 = new $Uint64(0, 0); - x802 = new $Uint64(0, 0); - _tuple$385 = bits.Add64(x747, x782, new $Uint64(0, 0)); - x801 = _tuple$385[0]; - x802 = _tuple$385[1]; - x803 = new $Uint64(0, 0); - x804 = new $Uint64(0, 0); - _tuple$386 = bits.Add64(x749, x784, ((x$277 = (new p521Uint1(x802.$high, x802.$low)), new $Uint64(x$277.$high, x$277.$low)))); - x803 = _tuple$386[0]; - x804 = _tuple$386[1]; - x805 = new $Uint64(0, 0); - x806 = new $Uint64(0, 0); - _tuple$387 = bits.Add64(x751, x786, ((x$278 = (new p521Uint1(x804.$high, x804.$low)), new $Uint64(x$278.$high, x$278.$low)))); - x805 = _tuple$387[0]; - x806 = _tuple$387[1]; - x807 = new $Uint64(0, 0); - x808 = new $Uint64(0, 0); - _tuple$388 = bits.Add64(x753, x788, ((x$279 = (new p521Uint1(x806.$high, x806.$low)), new $Uint64(x$279.$high, x$279.$low)))); - x807 = _tuple$388[0]; - x808 = _tuple$388[1]; - x809 = new $Uint64(0, 0); - x810 = new $Uint64(0, 0); - _tuple$389 = bits.Add64(x755, x790, ((x$280 = (new p521Uint1(x808.$high, x808.$low)), new $Uint64(x$280.$high, x$280.$low)))); - x809 = _tuple$389[0]; - x810 = _tuple$389[1]; - x811 = new $Uint64(0, 0); - x812 = new $Uint64(0, 0); - _tuple$390 = bits.Add64(x757, x792, ((x$281 = (new p521Uint1(x810.$high, x810.$low)), new $Uint64(x$281.$high, x$281.$low)))); - x811 = _tuple$390[0]; - x812 = _tuple$390[1]; - x813 = new $Uint64(0, 0); - x814 = new $Uint64(0, 0); - _tuple$391 = bits.Add64(x759, x794, ((x$282 = (new p521Uint1(x812.$high, x812.$low)), new $Uint64(x$282.$high, x$282.$low)))); - x813 = _tuple$391[0]; - x814 = _tuple$391[1]; - x815 = new $Uint64(0, 0); - x816 = new $Uint64(0, 0); - _tuple$392 = bits.Add64(x761, x796, ((x$283 = (new p521Uint1(x814.$high, x814.$low)), new $Uint64(x$283.$high, x$283.$low)))); - x815 = _tuple$392[0]; - x816 = _tuple$392[1]; - x817 = new $Uint64(0, 0); - x818 = new $Uint64(0, 0); - _tuple$393 = bits.Add64(x763, x798, ((x$284 = (new p521Uint1(x816.$high, x816.$low)), new $Uint64(x$284.$high, x$284.$low)))); - x817 = _tuple$393[0]; - x818 = _tuple$393[1]; - x819 = new $Uint64(0, 0); - x820 = new $Uint64(0, 0); - _tuple$394 = bits.Add64(x765, x800, ((x$285 = (new p521Uint1(x818.$high, x818.$low)), new $Uint64(x$285.$high, x$285.$low)))); - x819 = _tuple$394[0]; - x820 = _tuple$394[1]; - x821 = new $Uint64(0, 0); - x822 = new $Uint64(0, 0); - _tuple$395 = bits.Mul64(x801, new $Uint64(0, 511)); - x822 = _tuple$395[0]; - x821 = _tuple$395[1]; - x823 = new $Uint64(0, 0); - x824 = new $Uint64(0, 0); - _tuple$396 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x824 = _tuple$396[0]; - x823 = _tuple$396[1]; - x825 = new $Uint64(0, 0); - x826 = new $Uint64(0, 0); - _tuple$397 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x826 = _tuple$397[0]; - x825 = _tuple$397[1]; - x827 = new $Uint64(0, 0); - x828 = new $Uint64(0, 0); - _tuple$398 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x828 = _tuple$398[0]; - x827 = _tuple$398[1]; - x829 = new $Uint64(0, 0); - x830 = new $Uint64(0, 0); - _tuple$399 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x830 = _tuple$399[0]; - x829 = _tuple$399[1]; - x831 = new $Uint64(0, 0); - x832 = new $Uint64(0, 0); - _tuple$400 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x832 = _tuple$400[0]; - x831 = _tuple$400[1]; - x833 = new $Uint64(0, 0); - x834 = new $Uint64(0, 0); - _tuple$401 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x834 = _tuple$401[0]; - x833 = _tuple$401[1]; - x835 = new $Uint64(0, 0); - x836 = new $Uint64(0, 0); - _tuple$402 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x836 = _tuple$402[0]; - x835 = _tuple$402[1]; - x837 = new $Uint64(0, 0); - x838 = new $Uint64(0, 0); - _tuple$403 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x838 = _tuple$403[0]; - x837 = _tuple$403[1]; - x839 = new $Uint64(0, 0); - x840 = new $Uint64(0, 0); - _tuple$404 = bits.Add64(x838, x835, new $Uint64(0, 0)); - x839 = _tuple$404[0]; - x840 = _tuple$404[1]; - x841 = new $Uint64(0, 0); - x842 = new $Uint64(0, 0); - _tuple$405 = bits.Add64(x836, x833, ((x$286 = (new p521Uint1(x840.$high, x840.$low)), new $Uint64(x$286.$high, x$286.$low)))); - x841 = _tuple$405[0]; - x842 = _tuple$405[1]; - x843 = new $Uint64(0, 0); - x844 = new $Uint64(0, 0); - _tuple$406 = bits.Add64(x834, x831, ((x$287 = (new p521Uint1(x842.$high, x842.$low)), new $Uint64(x$287.$high, x$287.$low)))); - x843 = _tuple$406[0]; - x844 = _tuple$406[1]; - x845 = new $Uint64(0, 0); - x846 = new $Uint64(0, 0); - _tuple$407 = bits.Add64(x832, x829, ((x$288 = (new p521Uint1(x844.$high, x844.$low)), new $Uint64(x$288.$high, x$288.$low)))); - x845 = _tuple$407[0]; - x846 = _tuple$407[1]; - x847 = new $Uint64(0, 0); - x848 = new $Uint64(0, 0); - _tuple$408 = bits.Add64(x830, x827, ((x$289 = (new p521Uint1(x846.$high, x846.$low)), new $Uint64(x$289.$high, x$289.$low)))); - x847 = _tuple$408[0]; - x848 = _tuple$408[1]; - x849 = new $Uint64(0, 0); - x850 = new $Uint64(0, 0); - _tuple$409 = bits.Add64(x828, x825, ((x$290 = (new p521Uint1(x848.$high, x848.$low)), new $Uint64(x$290.$high, x$290.$low)))); - x849 = _tuple$409[0]; - x850 = _tuple$409[1]; - x851 = new $Uint64(0, 0); - x852 = new $Uint64(0, 0); - _tuple$410 = bits.Add64(x826, x823, ((x$291 = (new p521Uint1(x850.$high, x850.$low)), new $Uint64(x$291.$high, x$291.$low)))); - x851 = _tuple$410[0]; - x852 = _tuple$410[1]; - x853 = new $Uint64(0, 0); - x854 = new $Uint64(0, 0); - _tuple$411 = bits.Add64(x824, x821, ((x$292 = (new p521Uint1(x852.$high, x852.$low)), new $Uint64(x$292.$high, x$292.$low)))); - x853 = _tuple$411[0]; - x854 = _tuple$411[1]; - x855 = (x$293 = ((x$294 = (new p521Uint1(x854.$high, x854.$low)), new $Uint64(x$294.$high, x$294.$low))), new $Uint64(x$293.$high + x822.$high, x$293.$low + x822.$low)); - x857 = new $Uint64(0, 0); - _tuple$412 = bits.Add64(x801, x837, new $Uint64(0, 0)); - x857 = _tuple$412[1]; - x858 = new $Uint64(0, 0); - x859 = new $Uint64(0, 0); - _tuple$413 = bits.Add64(x803, x839, ((x$295 = (new p521Uint1(x857.$high, x857.$low)), new $Uint64(x$295.$high, x$295.$low)))); - x858 = _tuple$413[0]; - x859 = _tuple$413[1]; - x860 = new $Uint64(0, 0); - x861 = new $Uint64(0, 0); - _tuple$414 = bits.Add64(x805, x841, ((x$296 = (new p521Uint1(x859.$high, x859.$low)), new $Uint64(x$296.$high, x$296.$low)))); - x860 = _tuple$414[0]; - x861 = _tuple$414[1]; - x862 = new $Uint64(0, 0); - x863 = new $Uint64(0, 0); - _tuple$415 = bits.Add64(x807, x843, ((x$297 = (new p521Uint1(x861.$high, x861.$low)), new $Uint64(x$297.$high, x$297.$low)))); - x862 = _tuple$415[0]; - x863 = _tuple$415[1]; - x864 = new $Uint64(0, 0); - x865 = new $Uint64(0, 0); - _tuple$416 = bits.Add64(x809, x845, ((x$298 = (new p521Uint1(x863.$high, x863.$low)), new $Uint64(x$298.$high, x$298.$low)))); - x864 = _tuple$416[0]; - x865 = _tuple$416[1]; - x866 = new $Uint64(0, 0); - x867 = new $Uint64(0, 0); - _tuple$417 = bits.Add64(x811, x847, ((x$299 = (new p521Uint1(x865.$high, x865.$low)), new $Uint64(x$299.$high, x$299.$low)))); - x866 = _tuple$417[0]; - x867 = _tuple$417[1]; - x868 = new $Uint64(0, 0); - x869 = new $Uint64(0, 0); - _tuple$418 = bits.Add64(x813, x849, ((x$300 = (new p521Uint1(x867.$high, x867.$low)), new $Uint64(x$300.$high, x$300.$low)))); - x868 = _tuple$418[0]; - x869 = _tuple$418[1]; - x870 = new $Uint64(0, 0); - x871 = new $Uint64(0, 0); - _tuple$419 = bits.Add64(x815, x851, ((x$301 = (new p521Uint1(x869.$high, x869.$low)), new $Uint64(x$301.$high, x$301.$low)))); - x870 = _tuple$419[0]; - x871 = _tuple$419[1]; - x872 = new $Uint64(0, 0); - x873 = new $Uint64(0, 0); - _tuple$420 = bits.Add64(x817, x853, ((x$302 = (new p521Uint1(x871.$high, x871.$low)), new $Uint64(x$302.$high, x$302.$low)))); - x872 = _tuple$420[0]; - x873 = _tuple$420[1]; - x874 = new $Uint64(0, 0); - x875 = new $Uint64(0, 0); - _tuple$421 = bits.Add64(x819, x855, ((x$303 = (new p521Uint1(x873.$high, x873.$low)), new $Uint64(x$303.$high, x$303.$low)))); - x874 = _tuple$421[0]; - x875 = _tuple$421[1]; - x876 = (x$304 = ((x$305 = (new p521Uint1(x875.$high, x875.$low)), new $Uint64(x$305.$high, x$305.$low))), x$306 = ((x$307 = (new p521Uint1(x820.$high, x820.$low)), new $Uint64(x$307.$high, x$307.$low))), new $Uint64(x$304.$high + x$306.$high, x$304.$low + x$306.$low)); - x877 = new $Uint64(0, 0); - x878 = new $Uint64(0, 0); - _tuple$422 = bits.Mul64(x8, arg2[8]); - x878 = _tuple$422[0]; - x877 = _tuple$422[1]; - x879 = new $Uint64(0, 0); - x880 = new $Uint64(0, 0); - _tuple$423 = bits.Mul64(x8, arg2[7]); - x880 = _tuple$423[0]; - x879 = _tuple$423[1]; - x881 = new $Uint64(0, 0); - x882 = new $Uint64(0, 0); - _tuple$424 = bits.Mul64(x8, arg2[6]); - x882 = _tuple$424[0]; - x881 = _tuple$424[1]; - x883 = new $Uint64(0, 0); - x884 = new $Uint64(0, 0); - _tuple$425 = bits.Mul64(x8, arg2[5]); - x884 = _tuple$425[0]; - x883 = _tuple$425[1]; - x885 = new $Uint64(0, 0); - x886 = new $Uint64(0, 0); - _tuple$426 = bits.Mul64(x8, arg2[4]); - x886 = _tuple$426[0]; - x885 = _tuple$426[1]; - x887 = new $Uint64(0, 0); - x888 = new $Uint64(0, 0); - _tuple$427 = bits.Mul64(x8, arg2[3]); - x888 = _tuple$427[0]; - x887 = _tuple$427[1]; - x889 = new $Uint64(0, 0); - x890 = new $Uint64(0, 0); - _tuple$428 = bits.Mul64(x8, arg2[2]); - x890 = _tuple$428[0]; - x889 = _tuple$428[1]; - x891 = new $Uint64(0, 0); - x892 = new $Uint64(0, 0); - _tuple$429 = bits.Mul64(x8, arg2[1]); - x892 = _tuple$429[0]; - x891 = _tuple$429[1]; - x893 = new $Uint64(0, 0); - x894 = new $Uint64(0, 0); - _tuple$430 = bits.Mul64(x8, arg2[0]); - x894 = _tuple$430[0]; - x893 = _tuple$430[1]; - x895 = new $Uint64(0, 0); - x896 = new $Uint64(0, 0); - _tuple$431 = bits.Add64(x894, x891, new $Uint64(0, 0)); - x895 = _tuple$431[0]; - x896 = _tuple$431[1]; - x897 = new $Uint64(0, 0); - x898 = new $Uint64(0, 0); - _tuple$432 = bits.Add64(x892, x889, ((x$308 = (new p521Uint1(x896.$high, x896.$low)), new $Uint64(x$308.$high, x$308.$low)))); - x897 = _tuple$432[0]; - x898 = _tuple$432[1]; - x899 = new $Uint64(0, 0); - x900 = new $Uint64(0, 0); - _tuple$433 = bits.Add64(x890, x887, ((x$309 = (new p521Uint1(x898.$high, x898.$low)), new $Uint64(x$309.$high, x$309.$low)))); - x899 = _tuple$433[0]; - x900 = _tuple$433[1]; - x901 = new $Uint64(0, 0); - x902 = new $Uint64(0, 0); - _tuple$434 = bits.Add64(x888, x885, ((x$310 = (new p521Uint1(x900.$high, x900.$low)), new $Uint64(x$310.$high, x$310.$low)))); - x901 = _tuple$434[0]; - x902 = _tuple$434[1]; - x903 = new $Uint64(0, 0); - x904 = new $Uint64(0, 0); - _tuple$435 = bits.Add64(x886, x883, ((x$311 = (new p521Uint1(x902.$high, x902.$low)), new $Uint64(x$311.$high, x$311.$low)))); - x903 = _tuple$435[0]; - x904 = _tuple$435[1]; - x905 = new $Uint64(0, 0); - x906 = new $Uint64(0, 0); - _tuple$436 = bits.Add64(x884, x881, ((x$312 = (new p521Uint1(x904.$high, x904.$low)), new $Uint64(x$312.$high, x$312.$low)))); - x905 = _tuple$436[0]; - x906 = _tuple$436[1]; - x907 = new $Uint64(0, 0); - x908 = new $Uint64(0, 0); - _tuple$437 = bits.Add64(x882, x879, ((x$313 = (new p521Uint1(x906.$high, x906.$low)), new $Uint64(x$313.$high, x$313.$low)))); - x907 = _tuple$437[0]; - x908 = _tuple$437[1]; - x909 = new $Uint64(0, 0); - x910 = new $Uint64(0, 0); - _tuple$438 = bits.Add64(x880, x877, ((x$314 = (new p521Uint1(x908.$high, x908.$low)), new $Uint64(x$314.$high, x$314.$low)))); - x909 = _tuple$438[0]; - x910 = _tuple$438[1]; - x911 = (x$315 = ((x$316 = (new p521Uint1(x910.$high, x910.$low)), new $Uint64(x$316.$high, x$316.$low))), new $Uint64(x$315.$high + x878.$high, x$315.$low + x878.$low)); - x912 = new $Uint64(0, 0); - x913 = new $Uint64(0, 0); - _tuple$439 = bits.Add64(x858, x893, new $Uint64(0, 0)); - x912 = _tuple$439[0]; - x913 = _tuple$439[1]; - x914 = new $Uint64(0, 0); - x915 = new $Uint64(0, 0); - _tuple$440 = bits.Add64(x860, x895, ((x$317 = (new p521Uint1(x913.$high, x913.$low)), new $Uint64(x$317.$high, x$317.$low)))); - x914 = _tuple$440[0]; - x915 = _tuple$440[1]; - x916 = new $Uint64(0, 0); - x917 = new $Uint64(0, 0); - _tuple$441 = bits.Add64(x862, x897, ((x$318 = (new p521Uint1(x915.$high, x915.$low)), new $Uint64(x$318.$high, x$318.$low)))); - x916 = _tuple$441[0]; - x917 = _tuple$441[1]; - x918 = new $Uint64(0, 0); - x919 = new $Uint64(0, 0); - _tuple$442 = bits.Add64(x864, x899, ((x$319 = (new p521Uint1(x917.$high, x917.$low)), new $Uint64(x$319.$high, x$319.$low)))); - x918 = _tuple$442[0]; - x919 = _tuple$442[1]; - x920 = new $Uint64(0, 0); - x921 = new $Uint64(0, 0); - _tuple$443 = bits.Add64(x866, x901, ((x$320 = (new p521Uint1(x919.$high, x919.$low)), new $Uint64(x$320.$high, x$320.$low)))); - x920 = _tuple$443[0]; - x921 = _tuple$443[1]; - x922 = new $Uint64(0, 0); - x923 = new $Uint64(0, 0); - _tuple$444 = bits.Add64(x868, x903, ((x$321 = (new p521Uint1(x921.$high, x921.$low)), new $Uint64(x$321.$high, x$321.$low)))); - x922 = _tuple$444[0]; - x923 = _tuple$444[1]; - x924 = new $Uint64(0, 0); - x925 = new $Uint64(0, 0); - _tuple$445 = bits.Add64(x870, x905, ((x$322 = (new p521Uint1(x923.$high, x923.$low)), new $Uint64(x$322.$high, x$322.$low)))); - x924 = _tuple$445[0]; - x925 = _tuple$445[1]; - x926 = new $Uint64(0, 0); - x927 = new $Uint64(0, 0); - _tuple$446 = bits.Add64(x872, x907, ((x$323 = (new p521Uint1(x925.$high, x925.$low)), new $Uint64(x$323.$high, x$323.$low)))); - x926 = _tuple$446[0]; - x927 = _tuple$446[1]; - x928 = new $Uint64(0, 0); - x929 = new $Uint64(0, 0); - _tuple$447 = bits.Add64(x874, x909, ((x$324 = (new p521Uint1(x927.$high, x927.$low)), new $Uint64(x$324.$high, x$324.$low)))); - x928 = _tuple$447[0]; - x929 = _tuple$447[1]; - x930 = new $Uint64(0, 0); - x931 = new $Uint64(0, 0); - _tuple$448 = bits.Add64(x876, x911, ((x$325 = (new p521Uint1(x929.$high, x929.$low)), new $Uint64(x$325.$high, x$325.$low)))); - x930 = _tuple$448[0]; - x931 = _tuple$448[1]; - x932 = new $Uint64(0, 0); - x933 = new $Uint64(0, 0); - _tuple$449 = bits.Mul64(x912, new $Uint64(0, 511)); - x933 = _tuple$449[0]; - x932 = _tuple$449[1]; - x934 = new $Uint64(0, 0); - x935 = new $Uint64(0, 0); - _tuple$450 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x935 = _tuple$450[0]; - x934 = _tuple$450[1]; - x936 = new $Uint64(0, 0); - x937 = new $Uint64(0, 0); - _tuple$451 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x937 = _tuple$451[0]; - x936 = _tuple$451[1]; - x938 = new $Uint64(0, 0); - x939 = new $Uint64(0, 0); - _tuple$452 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x939 = _tuple$452[0]; - x938 = _tuple$452[1]; - x940 = new $Uint64(0, 0); - x941 = new $Uint64(0, 0); - _tuple$453 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x941 = _tuple$453[0]; - x940 = _tuple$453[1]; - x942 = new $Uint64(0, 0); - x943 = new $Uint64(0, 0); - _tuple$454 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x943 = _tuple$454[0]; - x942 = _tuple$454[1]; - x944 = new $Uint64(0, 0); - x945 = new $Uint64(0, 0); - _tuple$455 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x945 = _tuple$455[0]; - x944 = _tuple$455[1]; - x946 = new $Uint64(0, 0); - x947 = new $Uint64(0, 0); - _tuple$456 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x947 = _tuple$456[0]; - x946 = _tuple$456[1]; - x948 = new $Uint64(0, 0); - x949 = new $Uint64(0, 0); - _tuple$457 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x949 = _tuple$457[0]; - x948 = _tuple$457[1]; - x950 = new $Uint64(0, 0); - x951 = new $Uint64(0, 0); - _tuple$458 = bits.Add64(x949, x946, new $Uint64(0, 0)); - x950 = _tuple$458[0]; - x951 = _tuple$458[1]; - x952 = new $Uint64(0, 0); - x953 = new $Uint64(0, 0); - _tuple$459 = bits.Add64(x947, x944, ((x$326 = (new p521Uint1(x951.$high, x951.$low)), new $Uint64(x$326.$high, x$326.$low)))); - x952 = _tuple$459[0]; - x953 = _tuple$459[1]; - x954 = new $Uint64(0, 0); - x955 = new $Uint64(0, 0); - _tuple$460 = bits.Add64(x945, x942, ((x$327 = (new p521Uint1(x953.$high, x953.$low)), new $Uint64(x$327.$high, x$327.$low)))); - x954 = _tuple$460[0]; - x955 = _tuple$460[1]; - x956 = new $Uint64(0, 0); - x957 = new $Uint64(0, 0); - _tuple$461 = bits.Add64(x943, x940, ((x$328 = (new p521Uint1(x955.$high, x955.$low)), new $Uint64(x$328.$high, x$328.$low)))); - x956 = _tuple$461[0]; - x957 = _tuple$461[1]; - x958 = new $Uint64(0, 0); - x959 = new $Uint64(0, 0); - _tuple$462 = bits.Add64(x941, x938, ((x$329 = (new p521Uint1(x957.$high, x957.$low)), new $Uint64(x$329.$high, x$329.$low)))); - x958 = _tuple$462[0]; - x959 = _tuple$462[1]; - x960 = new $Uint64(0, 0); - x961 = new $Uint64(0, 0); - _tuple$463 = bits.Add64(x939, x936, ((x$330 = (new p521Uint1(x959.$high, x959.$low)), new $Uint64(x$330.$high, x$330.$low)))); - x960 = _tuple$463[0]; - x961 = _tuple$463[1]; - x962 = new $Uint64(0, 0); - x963 = new $Uint64(0, 0); - _tuple$464 = bits.Add64(x937, x934, ((x$331 = (new p521Uint1(x961.$high, x961.$low)), new $Uint64(x$331.$high, x$331.$low)))); - x962 = _tuple$464[0]; - x963 = _tuple$464[1]; - x964 = new $Uint64(0, 0); - x965 = new $Uint64(0, 0); - _tuple$465 = bits.Add64(x935, x932, ((x$332 = (new p521Uint1(x963.$high, x963.$low)), new $Uint64(x$332.$high, x$332.$low)))); - x964 = _tuple$465[0]; - x965 = _tuple$465[1]; - x966 = (x$333 = ((x$334 = (new p521Uint1(x965.$high, x965.$low)), new $Uint64(x$334.$high, x$334.$low))), new $Uint64(x$333.$high + x933.$high, x$333.$low + x933.$low)); - x968 = new $Uint64(0, 0); - _tuple$466 = bits.Add64(x912, x948, new $Uint64(0, 0)); - x968 = _tuple$466[1]; - x969 = new $Uint64(0, 0); - x970 = new $Uint64(0, 0); - _tuple$467 = bits.Add64(x914, x950, ((x$335 = (new p521Uint1(x968.$high, x968.$low)), new $Uint64(x$335.$high, x$335.$low)))); - x969 = _tuple$467[0]; - x970 = _tuple$467[1]; - x971 = new $Uint64(0, 0); - x972 = new $Uint64(0, 0); - _tuple$468 = bits.Add64(x916, x952, ((x$336 = (new p521Uint1(x970.$high, x970.$low)), new $Uint64(x$336.$high, x$336.$low)))); - x971 = _tuple$468[0]; - x972 = _tuple$468[1]; - x973 = new $Uint64(0, 0); - x974 = new $Uint64(0, 0); - _tuple$469 = bits.Add64(x918, x954, ((x$337 = (new p521Uint1(x972.$high, x972.$low)), new $Uint64(x$337.$high, x$337.$low)))); - x973 = _tuple$469[0]; - x974 = _tuple$469[1]; - x975 = new $Uint64(0, 0); - x976 = new $Uint64(0, 0); - _tuple$470 = bits.Add64(x920, x956, ((x$338 = (new p521Uint1(x974.$high, x974.$low)), new $Uint64(x$338.$high, x$338.$low)))); - x975 = _tuple$470[0]; - x976 = _tuple$470[1]; - x977 = new $Uint64(0, 0); - x978 = new $Uint64(0, 0); - _tuple$471 = bits.Add64(x922, x958, ((x$339 = (new p521Uint1(x976.$high, x976.$low)), new $Uint64(x$339.$high, x$339.$low)))); - x977 = _tuple$471[0]; - x978 = _tuple$471[1]; - x979 = new $Uint64(0, 0); - x980 = new $Uint64(0, 0); - _tuple$472 = bits.Add64(x924, x960, ((x$340 = (new p521Uint1(x978.$high, x978.$low)), new $Uint64(x$340.$high, x$340.$low)))); - x979 = _tuple$472[0]; - x980 = _tuple$472[1]; - x981 = new $Uint64(0, 0); - x982 = new $Uint64(0, 0); - _tuple$473 = bits.Add64(x926, x962, ((x$341 = (new p521Uint1(x980.$high, x980.$low)), new $Uint64(x$341.$high, x$341.$low)))); - x981 = _tuple$473[0]; - x982 = _tuple$473[1]; - x983 = new $Uint64(0, 0); - x984 = new $Uint64(0, 0); - _tuple$474 = bits.Add64(x928, x964, ((x$342 = (new p521Uint1(x982.$high, x982.$low)), new $Uint64(x$342.$high, x$342.$low)))); - x983 = _tuple$474[0]; - x984 = _tuple$474[1]; - x985 = new $Uint64(0, 0); - x986 = new $Uint64(0, 0); - _tuple$475 = bits.Add64(x930, x966, ((x$343 = (new p521Uint1(x984.$high, x984.$low)), new $Uint64(x$343.$high, x$343.$low)))); - x985 = _tuple$475[0]; - x986 = _tuple$475[1]; - x987 = (x$344 = ((x$345 = (new p521Uint1(x986.$high, x986.$low)), new $Uint64(x$345.$high, x$345.$low))), x$346 = ((x$347 = (new p521Uint1(x931.$high, x931.$low)), new $Uint64(x$347.$high, x$347.$low))), new $Uint64(x$344.$high + x$346.$high, x$344.$low + x$346.$low)); - x988 = new $Uint64(0, 0); - x989 = new $Uint64(0, 0); - _tuple$476 = bits.Sub64(x969, new $Uint64(4294967295, 4294967295), new $Uint64(0, 0)); - x988 = _tuple$476[0]; - x989 = _tuple$476[1]; - x990 = new $Uint64(0, 0); - x991 = new $Uint64(0, 0); - _tuple$477 = bits.Sub64(x971, new $Uint64(4294967295, 4294967295), ((x$348 = (new p521Uint1(x989.$high, x989.$low)), new $Uint64(x$348.$high, x$348.$low)))); - x990 = _tuple$477[0]; - x991 = _tuple$477[1]; - x992 = new $Uint64(0, 0); - x993 = new $Uint64(0, 0); - _tuple$478 = bits.Sub64(x973, new $Uint64(4294967295, 4294967295), ((x$349 = (new p521Uint1(x991.$high, x991.$low)), new $Uint64(x$349.$high, x$349.$low)))); - x992 = _tuple$478[0]; - x993 = _tuple$478[1]; - x994 = new $Uint64(0, 0); - x995 = new $Uint64(0, 0); - _tuple$479 = bits.Sub64(x975, new $Uint64(4294967295, 4294967295), ((x$350 = (new p521Uint1(x993.$high, x993.$low)), new $Uint64(x$350.$high, x$350.$low)))); - x994 = _tuple$479[0]; - x995 = _tuple$479[1]; - x996 = new $Uint64(0, 0); - x997 = new $Uint64(0, 0); - _tuple$480 = bits.Sub64(x977, new $Uint64(4294967295, 4294967295), ((x$351 = (new p521Uint1(x995.$high, x995.$low)), new $Uint64(x$351.$high, x$351.$low)))); - x996 = _tuple$480[0]; - x997 = _tuple$480[1]; - x998 = new $Uint64(0, 0); - x999 = new $Uint64(0, 0); - _tuple$481 = bits.Sub64(x979, new $Uint64(4294967295, 4294967295), ((x$352 = (new p521Uint1(x997.$high, x997.$low)), new $Uint64(x$352.$high, x$352.$low)))); - x998 = _tuple$481[0]; - x999 = _tuple$481[1]; - x1000 = new $Uint64(0, 0); - x1001 = new $Uint64(0, 0); - _tuple$482 = bits.Sub64(x981, new $Uint64(4294967295, 4294967295), ((x$353 = (new p521Uint1(x999.$high, x999.$low)), new $Uint64(x$353.$high, x$353.$low)))); - x1000 = _tuple$482[0]; - x1001 = _tuple$482[1]; - x1002 = new $Uint64(0, 0); - x1003 = new $Uint64(0, 0); - _tuple$483 = bits.Sub64(x983, new $Uint64(4294967295, 4294967295), ((x$354 = (new p521Uint1(x1001.$high, x1001.$low)), new $Uint64(x$354.$high, x$354.$low)))); - x1002 = _tuple$483[0]; - x1003 = _tuple$483[1]; - x1004 = new $Uint64(0, 0); - x1005 = new $Uint64(0, 0); - _tuple$484 = bits.Sub64(x985, new $Uint64(0, 511), ((x$355 = (new p521Uint1(x1003.$high, x1003.$low)), new $Uint64(x$355.$high, x$355.$low)))); - x1004 = _tuple$484[0]; - x1005 = _tuple$484[1]; - x1007 = new $Uint64(0, 0); - _tuple$485 = bits.Sub64(x987, new $Uint64(0, 0), ((x$356 = (new p521Uint1(x1005.$high, x1005.$low)), new $Uint64(x$356.$high, x$356.$low)))); - x1007 = _tuple$485[1]; - x1008 = new $Uint64(0, 0); - p521CmovznzU64((x1008$24ptr || (x1008$24ptr = new ptrType(function() { return x1008; }, function($v) { x1008 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x988, x969); - x1009 = new $Uint64(0, 0); - p521CmovznzU64((x1009$24ptr || (x1009$24ptr = new ptrType(function() { return x1009; }, function($v) { x1009 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x990, x971); - x1010 = new $Uint64(0, 0); - p521CmovznzU64((x1010$24ptr || (x1010$24ptr = new ptrType(function() { return x1010; }, function($v) { x1010 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x992, x973); - x1011 = new $Uint64(0, 0); - p521CmovznzU64((x1011$24ptr || (x1011$24ptr = new ptrType(function() { return x1011; }, function($v) { x1011 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x994, x975); - x1012 = new $Uint64(0, 0); - p521CmovznzU64((x1012$24ptr || (x1012$24ptr = new ptrType(function() { return x1012; }, function($v) { x1012 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x996, x977); - x1013 = new $Uint64(0, 0); - p521CmovznzU64((x1013$24ptr || (x1013$24ptr = new ptrType(function() { return x1013; }, function($v) { x1013 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x998, x979); - x1014 = new $Uint64(0, 0); - p521CmovznzU64((x1014$24ptr || (x1014$24ptr = new ptrType(function() { return x1014; }, function($v) { x1014 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x1000, x981); - x1015 = new $Uint64(0, 0); - p521CmovznzU64((x1015$24ptr || (x1015$24ptr = new ptrType(function() { return x1015; }, function($v) { x1015 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x1002, x983); - x1016 = new $Uint64(0, 0); - p521CmovznzU64((x1016$24ptr || (x1016$24ptr = new ptrType(function() { return x1016; }, function($v) { x1016 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x1004, x985); - out1.nilCheck, out1[0] = x1008; - out1.nilCheck, out1[1] = x1009; - out1.nilCheck, out1[2] = x1010; - out1.nilCheck, out1[3] = x1011; - out1.nilCheck, out1[4] = x1012; - out1.nilCheck, out1[5] = x1013; - out1.nilCheck, out1[6] = x1014; - out1.nilCheck, out1[7] = x1015; - out1.nilCheck, out1[8] = x1016; - }; - p521Square = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$199, _tuple$2, _tuple$20, _tuple$200, _tuple$201, _tuple$202, _tuple$203, _tuple$204, _tuple$205, _tuple$206, _tuple$207, _tuple$208, _tuple$209, _tuple$21, _tuple$210, _tuple$211, _tuple$212, _tuple$213, _tuple$214, _tuple$215, _tuple$216, _tuple$217, _tuple$218, _tuple$219, _tuple$22, _tuple$220, _tuple$221, _tuple$222, _tuple$223, _tuple$224, _tuple$225, _tuple$226, _tuple$227, _tuple$228, _tuple$229, _tuple$23, _tuple$230, _tuple$231, _tuple$232, _tuple$233, _tuple$234, _tuple$235, _tuple$236, _tuple$237, _tuple$238, _tuple$239, _tuple$24, _tuple$240, _tuple$241, _tuple$242, _tuple$243, _tuple$244, _tuple$245, _tuple$246, _tuple$247, _tuple$248, _tuple$249, _tuple$25, _tuple$250, _tuple$251, _tuple$252, _tuple$253, _tuple$254, _tuple$255, _tuple$256, _tuple$257, _tuple$258, _tuple$259, _tuple$26, _tuple$260, _tuple$261, _tuple$262, _tuple$263, _tuple$264, _tuple$265, _tuple$266, _tuple$267, _tuple$268, _tuple$269, _tuple$27, _tuple$270, _tuple$271, _tuple$272, _tuple$273, _tuple$274, _tuple$275, _tuple$276, _tuple$277, _tuple$278, _tuple$279, _tuple$28, _tuple$280, _tuple$281, _tuple$282, _tuple$283, _tuple$284, _tuple$285, _tuple$286, _tuple$287, _tuple$288, _tuple$289, _tuple$29, _tuple$290, _tuple$291, _tuple$292, _tuple$293, _tuple$294, _tuple$295, _tuple$296, _tuple$297, _tuple$298, _tuple$299, _tuple$3, _tuple$30, _tuple$300, _tuple$301, _tuple$302, _tuple$303, _tuple$304, _tuple$305, _tuple$306, _tuple$307, _tuple$308, _tuple$309, _tuple$31, _tuple$310, _tuple$311, _tuple$312, _tuple$313, _tuple$314, _tuple$315, _tuple$316, _tuple$317, _tuple$318, _tuple$319, _tuple$32, _tuple$320, _tuple$321, _tuple$322, _tuple$323, _tuple$324, _tuple$325, _tuple$326, _tuple$327, _tuple$328, _tuple$329, _tuple$33, _tuple$330, _tuple$331, _tuple$332, _tuple$333, _tuple$334, _tuple$335, _tuple$336, _tuple$337, _tuple$338, _tuple$339, _tuple$34, _tuple$340, _tuple$341, _tuple$342, _tuple$343, _tuple$344, _tuple$345, _tuple$346, _tuple$347, _tuple$348, _tuple$349, _tuple$35, _tuple$350, _tuple$351, _tuple$352, _tuple$353, _tuple$354, _tuple$355, _tuple$356, _tuple$357, _tuple$358, _tuple$359, _tuple$36, _tuple$360, _tuple$361, _tuple$362, _tuple$363, _tuple$364, _tuple$365, _tuple$366, _tuple$367, _tuple$368, _tuple$369, _tuple$37, _tuple$370, _tuple$371, _tuple$372, _tuple$373, _tuple$374, _tuple$375, _tuple$376, _tuple$377, _tuple$378, _tuple$379, _tuple$38, _tuple$380, _tuple$381, _tuple$382, _tuple$383, _tuple$384, _tuple$385, _tuple$386, _tuple$387, _tuple$388, _tuple$389, _tuple$39, _tuple$390, _tuple$391, _tuple$392, _tuple$393, _tuple$394, _tuple$395, _tuple$396, _tuple$397, _tuple$398, _tuple$399, _tuple$4, _tuple$40, _tuple$400, _tuple$401, _tuple$402, _tuple$403, _tuple$404, _tuple$405, _tuple$406, _tuple$407, _tuple$408, _tuple$409, _tuple$41, _tuple$410, _tuple$411, _tuple$412, _tuple$413, _tuple$414, _tuple$415, _tuple$416, _tuple$417, _tuple$418, _tuple$419, _tuple$42, _tuple$420, _tuple$421, _tuple$422, _tuple$423, _tuple$424, _tuple$425, _tuple$426, _tuple$427, _tuple$428, _tuple$429, _tuple$43, _tuple$430, _tuple$431, _tuple$432, _tuple$433, _tuple$434, _tuple$435, _tuple$436, _tuple$437, _tuple$438, _tuple$439, _tuple$44, _tuple$440, _tuple$441, _tuple$442, _tuple$443, _tuple$444, _tuple$445, _tuple$446, _tuple$447, _tuple$448, _tuple$449, _tuple$45, _tuple$450, _tuple$451, _tuple$452, _tuple$453, _tuple$454, _tuple$455, _tuple$456, _tuple$457, _tuple$458, _tuple$459, _tuple$46, _tuple$460, _tuple$461, _tuple$462, _tuple$463, _tuple$464, _tuple$465, _tuple$466, _tuple$467, _tuple$468, _tuple$469, _tuple$47, _tuple$470, _tuple$471, _tuple$472, _tuple$473, _tuple$474, _tuple$475, _tuple$476, _tuple$477, _tuple$478, _tuple$479, _tuple$48, _tuple$480, _tuple$481, _tuple$482, _tuple$483, _tuple$484, _tuple$485, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$165, x$166, x$167, x$168, x$169, x$17, x$170, x$171, x$172, x$173, x$174, x$175, x$176, x$177, x$178, x$179, x$18, x$180, x$181, x$182, x$183, x$184, x$185, x$186, x$187, x$188, x$189, x$19, x$190, x$191, x$192, x$193, x$194, x$195, x$196, x$197, x$198, x$199, x$2, x$20, x$200, x$201, x$202, x$203, x$204, x$205, x$206, x$207, x$208, x$209, x$21, x$210, x$211, x$212, x$213, x$214, x$215, x$216, x$217, x$218, x$219, x$22, x$220, x$221, x$222, x$223, x$224, x$225, x$226, x$227, x$228, x$229, x$23, x$230, x$231, x$232, x$233, x$234, x$235, x$236, x$237, x$238, x$239, x$24, x$240, x$241, x$242, x$243, x$244, x$245, x$246, x$247, x$248, x$249, x$25, x$250, x$251, x$252, x$253, x$254, x$255, x$256, x$257, x$258, x$259, x$26, x$260, x$261, x$262, x$263, x$264, x$265, x$266, x$267, x$268, x$269, x$27, x$270, x$271, x$272, x$273, x$274, x$275, x$276, x$277, x$278, x$279, x$28, x$280, x$281, x$282, x$283, x$284, x$285, x$286, x$287, x$288, x$289, x$29, x$290, x$291, x$292, x$293, x$294, x$295, x$296, x$297, x$298, x$299, x$3, x$30, x$300, x$301, x$302, x$303, x$304, x$305, x$306, x$307, x$308, x$309, x$31, x$310, x$311, x$312, x$313, x$314, x$315, x$316, x$317, x$318, x$319, x$32, x$320, x$321, x$322, x$323, x$324, x$325, x$326, x$327, x$328, x$329, x$33, x$330, x$331, x$332, x$333, x$334, x$335, x$336, x$337, x$338, x$339, x$34, x$340, x$341, x$342, x$343, x$344, x$345, x$346, x$347, x$348, x$349, x$35, x$350, x$351, x$352, x$353, x$354, x$355, x$356, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x1000, x1001, x1002, x1003, x1004, x1005, x1007, x1008, x1008$24ptr, x1009, x1009$24ptr, x101, x1010, x1010$24ptr, x1011, x1011$24ptr, x1012, x1012$24ptr, x1013, x1013$24ptr, x1014, x1014$24ptr, x1015, x1015$24ptr, x1016, x1016$24ptr, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x179, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x208, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x240, x241, x242, x243, x244, x245, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x261, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x285, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x302, x303, x304, x305, x306, x307, x308, x309, x31, x310, x311, x312, x313, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x338, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x354, x355, x356, x357, x358, x359, x36, x360, x361, x362, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x376, x377, x378, x379, x38, x380, x381, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x403, x404, x405, x406, x407, x408, x409, x41, x410, x411, x413, x414, x415, x416, x417, x418, x419, x42, x420, x421, x422, x423, x424, x425, x426, x427, x428, x429, x43, x430, x431, x432, x433, x434, x435, x436, x437, x438, x439, x44, x440, x441, x442, x443, x444, x445, x446, x447, x448, x449, x45, x450, x451, x452, x453, x454, x455, x456, x457, x458, x459, x46, x460, x461, x462, x463, x464, x465, x466, x467, x468, x469, x47, x470, x471, x472, x473, x474, x475, x476, x477, x478, x479, x48, x480, x481, x482, x483, x484, x485, x486, x487, x488, x489, x49, x490, x491, x492, x493, x494, x495, x496, x497, x498, x499, x5, x50, x500, x501, x502, x503, x504, x505, x506, x507, x508, x509, x51, x510, x511, x512, x513, x514, x515, x516, x517, x518, x519, x52, x520, x521, x522, x524, x525, x526, x527, x528, x529, x53, x530, x531, x532, x533, x534, x535, x536, x537, x538, x539, x54, x540, x541, x542, x543, x544, x545, x546, x547, x548, x549, x55, x550, x551, x552, x553, x554, x555, x556, x557, x558, x559, x56, x560, x561, x562, x563, x564, x565, x566, x567, x568, x569, x57, x570, x571, x572, x573, x574, x575, x576, x577, x578, x579, x58, x580, x581, x582, x583, x584, x585, x586, x587, x588, x589, x59, x590, x591, x592, x593, x594, x595, x596, x597, x598, x599, x6, x60, x600, x601, x602, x603, x604, x605, x606, x607, x608, x609, x61, x610, x611, x612, x613, x614, x615, x616, x617, x618, x619, x62, x620, x621, x622, x623, x624, x625, x626, x627, x628, x629, x63, x630, x631, x632, x633, x635, x636, x637, x638, x639, x64, x640, x641, x642, x643, x644, x645, x646, x647, x648, x649, x65, x650, x651, x652, x653, x654, x655, x656, x657, x658, x659, x66, x660, x661, x662, x663, x664, x665, x666, x667, x668, x669, x67, x670, x671, x672, x673, x674, x675, x676, x677, x678, x679, x68, x680, x681, x682, x683, x684, x685, x686, x687, x688, x689, x69, x690, x691, x692, x693, x694, x695, x696, x697, x698, x699, x7, x70, x700, x701, x702, x703, x704, x705, x706, x707, x708, x709, x71, x710, x711, x712, x713, x714, x715, x716, x717, x718, x719, x72, x720, x721, x722, x723, x724, x725, x726, x727, x728, x729, x73, x730, x731, x732, x733, x734, x735, x736, x737, x738, x739, x74, x740, x741, x742, x743, x744, x746, x747, x748, x749, x75, x750, x751, x752, x753, x754, x755, x756, x757, x758, x759, x76, x760, x761, x762, x763, x764, x765, x766, x767, x768, x769, x77, x770, x771, x772, x773, x774, x775, x776, x777, x778, x779, x78, x780, x781, x782, x783, x784, x785, x786, x787, x788, x789, x79, x790, x791, x792, x793, x794, x795, x796, x797, x798, x799, x8, x800, x801, x802, x803, x804, x805, x806, x807, x808, x809, x81, x810, x811, x812, x813, x814, x815, x816, x817, x818, x819, x82, x820, x821, x822, x823, x824, x825, x826, x827, x828, x829, x83, x830, x831, x832, x833, x834, x835, x836, x837, x838, x839, x84, x840, x841, x842, x843, x844, x845, x846, x847, x848, x849, x85, x850, x851, x852, x853, x854, x855, x857, x858, x859, x86, x860, x861, x862, x863, x864, x865, x866, x867, x868, x869, x87, x870, x871, x872, x873, x874, x875, x876, x877, x878, x879, x88, x880, x881, x882, x883, x884, x885, x886, x887, x888, x889, x89, x890, x891, x892, x893, x894, x895, x896, x897, x898, x899, x9, x90, x900, x901, x902, x903, x904, x905, x906, x907, x908, x909, x91, x910, x911, x912, x913, x914, x915, x916, x917, x918, x919, x92, x920, x921, x922, x923, x924, x925, x926, x927, x928, x929, x93, x930, x931, x932, x933, x934, x935, x936, x937, x938, x939, x94, x940, x941, x942, x943, x944, x945, x946, x947, x948, x949, x95, x950, x951, x952, x953, x954, x955, x956, x957, x958, x959, x96, x960, x961, x962, x963, x964, x965, x966, x968, x969, x97, x970, x971, x972, x973, x974, x975, x976, x977, x978, x979, x98, x980, x981, x982, x983, x984, x985, x986, x987, x988, x989, x99, x990, x991, x992, x993, x994, x995, x996, x997, x998, x999; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[4]; - x5 = arg1[5]; - x6 = arg1[6]; - x7 = arg1[7]; - x8 = arg1[8]; - x9 = arg1[0]; - x10 = new $Uint64(0, 0); - x11 = new $Uint64(0, 0); - _tuple = bits.Mul64(x9, arg1[8]); - x11 = _tuple[0]; - x10 = _tuple[1]; - x12 = new $Uint64(0, 0); - x13 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x9, arg1[7]); - x13 = _tuple$1[0]; - x12 = _tuple$1[1]; - x14 = new $Uint64(0, 0); - x15 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x9, arg1[6]); - x15 = _tuple$2[0]; - x14 = _tuple$2[1]; - x16 = new $Uint64(0, 0); - x17 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x9, arg1[5]); - x17 = _tuple$3[0]; - x16 = _tuple$3[1]; - x18 = new $Uint64(0, 0); - x19 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x9, arg1[4]); - x19 = _tuple$4[0]; - x18 = _tuple$4[1]; - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x9, arg1[3]); - x21 = _tuple$5[0]; - x20 = _tuple$5[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$6 = bits.Mul64(x9, arg1[2]); - x23 = _tuple$6[0]; - x22 = _tuple$6[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x9, arg1[1]); - x25 = _tuple$7[0]; - x24 = _tuple$7[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x9, arg1[0]); - x27 = _tuple$8[0]; - x26 = _tuple$8[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x27, x24, new $Uint64(0, 0)); - x28 = _tuple$9[0]; - x29 = _tuple$9[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x25, x22, ((x = (new p521Uint1(x29.$high, x29.$low)), new $Uint64(x.$high, x.$low)))); - x30 = _tuple$10[0]; - x31 = _tuple$10[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x23, x20, ((x$1 = (new p521Uint1(x31.$high, x31.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x32 = _tuple$11[0]; - x33 = _tuple$11[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x21, x18, ((x$2 = (new p521Uint1(x33.$high, x33.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x34 = _tuple$12[0]; - x35 = _tuple$12[1]; - x36 = new $Uint64(0, 0); - x37 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x19, x16, ((x$3 = (new p521Uint1(x35.$high, x35.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x36 = _tuple$13[0]; - x37 = _tuple$13[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x17, x14, ((x$4 = (new p521Uint1(x37.$high, x37.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x38 = _tuple$14[0]; - x39 = _tuple$14[1]; - x40 = new $Uint64(0, 0); - x41 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x15, x12, ((x$5 = (new p521Uint1(x39.$high, x39.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x40 = _tuple$15[0]; - x41 = _tuple$15[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x13, x10, ((x$6 = (new p521Uint1(x41.$high, x41.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x42 = _tuple$16[0]; - x43 = _tuple$16[1]; - x44 = (x$7 = ((x$8 = (new p521Uint1(x43.$high, x43.$low)), new $Uint64(x$8.$high, x$8.$low))), new $Uint64(x$7.$high + x11.$high, x$7.$low + x11.$low)); - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$17 = bits.Mul64(x26, new $Uint64(0, 511)); - x46 = _tuple$17[0]; - x45 = _tuple$17[1]; - x47 = new $Uint64(0, 0); - x48 = new $Uint64(0, 0); - _tuple$18 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x48 = _tuple$18[0]; - x47 = _tuple$18[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$19 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x50 = _tuple$19[0]; - x49 = _tuple$19[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$20 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x52 = _tuple$20[0]; - x51 = _tuple$20[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$21 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x54 = _tuple$21[0]; - x53 = _tuple$21[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$22 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x56 = _tuple$22[0]; - x55 = _tuple$22[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$23 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x58 = _tuple$23[0]; - x57 = _tuple$23[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$24 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x60 = _tuple$24[0]; - x59 = _tuple$24[1]; - x61 = new $Uint64(0, 0); - x62 = new $Uint64(0, 0); - _tuple$25 = bits.Mul64(x26, new $Uint64(4294967295, 4294967295)); - x62 = _tuple$25[0]; - x61 = _tuple$25[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x62, x59, new $Uint64(0, 0)); - x63 = _tuple$26[0]; - x64 = _tuple$26[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x60, x57, ((x$9 = (new p521Uint1(x64.$high, x64.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x65 = _tuple$27[0]; - x66 = _tuple$27[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x58, x55, ((x$10 = (new p521Uint1(x66.$high, x66.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x67 = _tuple$28[0]; - x68 = _tuple$28[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(x56, x53, ((x$11 = (new p521Uint1(x68.$high, x68.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x69 = _tuple$29[0]; - x70 = _tuple$29[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$30 = bits.Add64(x54, x51, ((x$12 = (new p521Uint1(x70.$high, x70.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x71 = _tuple$30[0]; - x72 = _tuple$30[1]; - x73 = new $Uint64(0, 0); - x74 = new $Uint64(0, 0); - _tuple$31 = bits.Add64(x52, x49, ((x$13 = (new p521Uint1(x72.$high, x72.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x73 = _tuple$31[0]; - x74 = _tuple$31[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x50, x47, ((x$14 = (new p521Uint1(x74.$high, x74.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x75 = _tuple$32[0]; - x76 = _tuple$32[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x48, x45, ((x$15 = (new p521Uint1(x76.$high, x76.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x77 = _tuple$33[0]; - x78 = _tuple$33[1]; - x79 = (x$16 = ((x$17 = (new p521Uint1(x78.$high, x78.$low)), new $Uint64(x$17.$high, x$17.$low))), new $Uint64(x$16.$high + x46.$high, x$16.$low + x46.$low)); - x81 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x26, x61, new $Uint64(0, 0)); - x81 = _tuple$34[1]; - x82 = new $Uint64(0, 0); - x83 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x28, x63, ((x$18 = (new p521Uint1(x81.$high, x81.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x82 = _tuple$35[0]; - x83 = _tuple$35[1]; - x84 = new $Uint64(0, 0); - x85 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x30, x65, ((x$19 = (new p521Uint1(x83.$high, x83.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x84 = _tuple$36[0]; - x85 = _tuple$36[1]; - x86 = new $Uint64(0, 0); - x87 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x32, x67, ((x$20 = (new p521Uint1(x85.$high, x85.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x86 = _tuple$37[0]; - x87 = _tuple$37[1]; - x88 = new $Uint64(0, 0); - x89 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x34, x69, ((x$21 = (new p521Uint1(x87.$high, x87.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x88 = _tuple$38[0]; - x89 = _tuple$38[1]; - x90 = new $Uint64(0, 0); - x91 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x36, x71, ((x$22 = (new p521Uint1(x89.$high, x89.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x90 = _tuple$39[0]; - x91 = _tuple$39[1]; - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x38, x73, ((x$23 = (new p521Uint1(x91.$high, x91.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x92 = _tuple$40[0]; - x93 = _tuple$40[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$41 = bits.Add64(x40, x75, ((x$24 = (new p521Uint1(x93.$high, x93.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x94 = _tuple$41[0]; - x95 = _tuple$41[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$42 = bits.Add64(x42, x77, ((x$25 = (new p521Uint1(x95.$high, x95.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x96 = _tuple$42[0]; - x97 = _tuple$42[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x44, x79, ((x$26 = (new p521Uint1(x97.$high, x97.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x98 = _tuple$43[0]; - x99 = _tuple$43[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$44 = bits.Mul64(x1, arg1[8]); - x101 = _tuple$44[0]; - x100 = _tuple$44[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$45 = bits.Mul64(x1, arg1[7]); - x103 = _tuple$45[0]; - x102 = _tuple$45[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$46 = bits.Mul64(x1, arg1[6]); - x105 = _tuple$46[0]; - x104 = _tuple$46[1]; - x106 = new $Uint64(0, 0); - x107 = new $Uint64(0, 0); - _tuple$47 = bits.Mul64(x1, arg1[5]); - x107 = _tuple$47[0]; - x106 = _tuple$47[1]; - x108 = new $Uint64(0, 0); - x109 = new $Uint64(0, 0); - _tuple$48 = bits.Mul64(x1, arg1[4]); - x109 = _tuple$48[0]; - x108 = _tuple$48[1]; - x110 = new $Uint64(0, 0); - x111 = new $Uint64(0, 0); - _tuple$49 = bits.Mul64(x1, arg1[3]); - x111 = _tuple$49[0]; - x110 = _tuple$49[1]; - x112 = new $Uint64(0, 0); - x113 = new $Uint64(0, 0); - _tuple$50 = bits.Mul64(x1, arg1[2]); - x113 = _tuple$50[0]; - x112 = _tuple$50[1]; - x114 = new $Uint64(0, 0); - x115 = new $Uint64(0, 0); - _tuple$51 = bits.Mul64(x1, arg1[1]); - x115 = _tuple$51[0]; - x114 = _tuple$51[1]; - x116 = new $Uint64(0, 0); - x117 = new $Uint64(0, 0); - _tuple$52 = bits.Mul64(x1, arg1[0]); - x117 = _tuple$52[0]; - x116 = _tuple$52[1]; - x118 = new $Uint64(0, 0); - x119 = new $Uint64(0, 0); - _tuple$53 = bits.Add64(x117, x114, new $Uint64(0, 0)); - x118 = _tuple$53[0]; - x119 = _tuple$53[1]; - x120 = new $Uint64(0, 0); - x121 = new $Uint64(0, 0); - _tuple$54 = bits.Add64(x115, x112, ((x$27 = (new p521Uint1(x119.$high, x119.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x120 = _tuple$54[0]; - x121 = _tuple$54[1]; - x122 = new $Uint64(0, 0); - x123 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x113, x110, ((x$28 = (new p521Uint1(x121.$high, x121.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x122 = _tuple$55[0]; - x123 = _tuple$55[1]; - x124 = new $Uint64(0, 0); - x125 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x111, x108, ((x$29 = (new p521Uint1(x123.$high, x123.$low)), new $Uint64(x$29.$high, x$29.$low)))); - x124 = _tuple$56[0]; - x125 = _tuple$56[1]; - x126 = new $Uint64(0, 0); - x127 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x109, x106, ((x$30 = (new p521Uint1(x125.$high, x125.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x126 = _tuple$57[0]; - x127 = _tuple$57[1]; - x128 = new $Uint64(0, 0); - x129 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x107, x104, ((x$31 = (new p521Uint1(x127.$high, x127.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x128 = _tuple$58[0]; - x129 = _tuple$58[1]; - x130 = new $Uint64(0, 0); - x131 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x105, x102, ((x$32 = (new p521Uint1(x129.$high, x129.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x130 = _tuple$59[0]; - x131 = _tuple$59[1]; - x132 = new $Uint64(0, 0); - x133 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x103, x100, ((x$33 = (new p521Uint1(x131.$high, x131.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x132 = _tuple$60[0]; - x133 = _tuple$60[1]; - x134 = (x$34 = ((x$35 = (new p521Uint1(x133.$high, x133.$low)), new $Uint64(x$35.$high, x$35.$low))), new $Uint64(x$34.$high + x101.$high, x$34.$low + x101.$low)); - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x82, x116, new $Uint64(0, 0)); - x135 = _tuple$61[0]; - x136 = _tuple$61[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x84, x118, ((x$36 = (new p521Uint1(x136.$high, x136.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x137 = _tuple$62[0]; - x138 = _tuple$62[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x86, x120, ((x$37 = (new p521Uint1(x138.$high, x138.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x139 = _tuple$63[0]; - x140 = _tuple$63[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x88, x122, ((x$38 = (new p521Uint1(x140.$high, x140.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x141 = _tuple$64[0]; - x142 = _tuple$64[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x90, x124, ((x$39 = (new p521Uint1(x142.$high, x142.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x143 = _tuple$65[0]; - x144 = _tuple$65[1]; - x145 = new $Uint64(0, 0); - x146 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x92, x126, ((x$40 = (new p521Uint1(x144.$high, x144.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x145 = _tuple$66[0]; - x146 = _tuple$66[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x94, x128, ((x$41 = (new p521Uint1(x146.$high, x146.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x147 = _tuple$67[0]; - x148 = _tuple$67[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x96, x130, ((x$42 = (new p521Uint1(x148.$high, x148.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x149 = _tuple$68[0]; - x150 = _tuple$68[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x98, x132, ((x$43 = (new p521Uint1(x150.$high, x150.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x151 = _tuple$69[0]; - x152 = _tuple$69[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(((x$44 = (new p521Uint1(x99.$high, x99.$low)), new $Uint64(x$44.$high, x$44.$low))), x134, ((x$45 = (new p521Uint1(x152.$high, x152.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x153 = _tuple$70[0]; - x154 = _tuple$70[1]; - x155 = new $Uint64(0, 0); - x156 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x135, new $Uint64(0, 511)); - x156 = _tuple$71[0]; - x155 = _tuple$71[1]; - x157 = new $Uint64(0, 0); - x158 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x158 = _tuple$72[0]; - x157 = _tuple$72[1]; - x159 = new $Uint64(0, 0); - x160 = new $Uint64(0, 0); - _tuple$73 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x160 = _tuple$73[0]; - x159 = _tuple$73[1]; - x161 = new $Uint64(0, 0); - x162 = new $Uint64(0, 0); - _tuple$74 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x162 = _tuple$74[0]; - x161 = _tuple$74[1]; - x163 = new $Uint64(0, 0); - x164 = new $Uint64(0, 0); - _tuple$75 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x164 = _tuple$75[0]; - x163 = _tuple$75[1]; - x165 = new $Uint64(0, 0); - x166 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x166 = _tuple$76[0]; - x165 = _tuple$76[1]; - x167 = new $Uint64(0, 0); - x168 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x168 = _tuple$77[0]; - x167 = _tuple$77[1]; - x169 = new $Uint64(0, 0); - x170 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x170 = _tuple$78[0]; - x169 = _tuple$78[1]; - x171 = new $Uint64(0, 0); - x172 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x135, new $Uint64(4294967295, 4294967295)); - x172 = _tuple$79[0]; - x171 = _tuple$79[1]; - x173 = new $Uint64(0, 0); - x174 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x172, x169, new $Uint64(0, 0)); - x173 = _tuple$80[0]; - x174 = _tuple$80[1]; - x175 = new $Uint64(0, 0); - x176 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x170, x167, ((x$46 = (new p521Uint1(x174.$high, x174.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x175 = _tuple$81[0]; - x176 = _tuple$81[1]; - x177 = new $Uint64(0, 0); - x178 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x168, x165, ((x$47 = (new p521Uint1(x176.$high, x176.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x177 = _tuple$82[0]; - x178 = _tuple$82[1]; - x179 = new $Uint64(0, 0); - x180 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x166, x163, ((x$48 = (new p521Uint1(x178.$high, x178.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x179 = _tuple$83[0]; - x180 = _tuple$83[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x164, x161, ((x$49 = (new p521Uint1(x180.$high, x180.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x181 = _tuple$84[0]; - x182 = _tuple$84[1]; - x183 = new $Uint64(0, 0); - x184 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x162, x159, ((x$50 = (new p521Uint1(x182.$high, x182.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x183 = _tuple$85[0]; - x184 = _tuple$85[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x160, x157, ((x$51 = (new p521Uint1(x184.$high, x184.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x185 = _tuple$86[0]; - x186 = _tuple$86[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$87 = bits.Add64(x158, x155, ((x$52 = (new p521Uint1(x186.$high, x186.$low)), new $Uint64(x$52.$high, x$52.$low)))); - x187 = _tuple$87[0]; - x188 = _tuple$87[1]; - x189 = (x$53 = ((x$54 = (new p521Uint1(x188.$high, x188.$low)), new $Uint64(x$54.$high, x$54.$low))), new $Uint64(x$53.$high + x156.$high, x$53.$low + x156.$low)); - x191 = new $Uint64(0, 0); - _tuple$88 = bits.Add64(x135, x171, new $Uint64(0, 0)); - x191 = _tuple$88[1]; - x192 = new $Uint64(0, 0); - x193 = new $Uint64(0, 0); - _tuple$89 = bits.Add64(x137, x173, ((x$55 = (new p521Uint1(x191.$high, x191.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x192 = _tuple$89[0]; - x193 = _tuple$89[1]; - x194 = new $Uint64(0, 0); - x195 = new $Uint64(0, 0); - _tuple$90 = bits.Add64(x139, x175, ((x$56 = (new p521Uint1(x193.$high, x193.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x194 = _tuple$90[0]; - x195 = _tuple$90[1]; - x196 = new $Uint64(0, 0); - x197 = new $Uint64(0, 0); - _tuple$91 = bits.Add64(x141, x177, ((x$57 = (new p521Uint1(x195.$high, x195.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x196 = _tuple$91[0]; - x197 = _tuple$91[1]; - x198 = new $Uint64(0, 0); - x199 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x143, x179, ((x$58 = (new p521Uint1(x197.$high, x197.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x198 = _tuple$92[0]; - x199 = _tuple$92[1]; - x200 = new $Uint64(0, 0); - x201 = new $Uint64(0, 0); - _tuple$93 = bits.Add64(x145, x181, ((x$59 = (new p521Uint1(x199.$high, x199.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x200 = _tuple$93[0]; - x201 = _tuple$93[1]; - x202 = new $Uint64(0, 0); - x203 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x147, x183, ((x$60 = (new p521Uint1(x201.$high, x201.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x202 = _tuple$94[0]; - x203 = _tuple$94[1]; - x204 = new $Uint64(0, 0); - x205 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x149, x185, ((x$61 = (new p521Uint1(x203.$high, x203.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x204 = _tuple$95[0]; - x205 = _tuple$95[1]; - x206 = new $Uint64(0, 0); - x207 = new $Uint64(0, 0); - _tuple$96 = bits.Add64(x151, x187, ((x$62 = (new p521Uint1(x205.$high, x205.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x206 = _tuple$96[0]; - x207 = _tuple$96[1]; - x208 = new $Uint64(0, 0); - x209 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x153, x189, ((x$63 = (new p521Uint1(x207.$high, x207.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x208 = _tuple$97[0]; - x209 = _tuple$97[1]; - x210 = (x$64 = ((x$65 = (new p521Uint1(x209.$high, x209.$low)), new $Uint64(x$65.$high, x$65.$low))), x$66 = ((x$67 = (new p521Uint1(x154.$high, x154.$low)), new $Uint64(x$67.$high, x$67.$low))), new $Uint64(x$64.$high + x$66.$high, x$64.$low + x$66.$low)); - x211 = new $Uint64(0, 0); - x212 = new $Uint64(0, 0); - _tuple$98 = bits.Mul64(x2, arg1[8]); - x212 = _tuple$98[0]; - x211 = _tuple$98[1]; - x213 = new $Uint64(0, 0); - x214 = new $Uint64(0, 0); - _tuple$99 = bits.Mul64(x2, arg1[7]); - x214 = _tuple$99[0]; - x213 = _tuple$99[1]; - x215 = new $Uint64(0, 0); - x216 = new $Uint64(0, 0); - _tuple$100 = bits.Mul64(x2, arg1[6]); - x216 = _tuple$100[0]; - x215 = _tuple$100[1]; - x217 = new $Uint64(0, 0); - x218 = new $Uint64(0, 0); - _tuple$101 = bits.Mul64(x2, arg1[5]); - x218 = _tuple$101[0]; - x217 = _tuple$101[1]; - x219 = new $Uint64(0, 0); - x220 = new $Uint64(0, 0); - _tuple$102 = bits.Mul64(x2, arg1[4]); - x220 = _tuple$102[0]; - x219 = _tuple$102[1]; - x221 = new $Uint64(0, 0); - x222 = new $Uint64(0, 0); - _tuple$103 = bits.Mul64(x2, arg1[3]); - x222 = _tuple$103[0]; - x221 = _tuple$103[1]; - x223 = new $Uint64(0, 0); - x224 = new $Uint64(0, 0); - _tuple$104 = bits.Mul64(x2, arg1[2]); - x224 = _tuple$104[0]; - x223 = _tuple$104[1]; - x225 = new $Uint64(0, 0); - x226 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x2, arg1[1]); - x226 = _tuple$105[0]; - x225 = _tuple$105[1]; - x227 = new $Uint64(0, 0); - x228 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x2, arg1[0]); - x228 = _tuple$106[0]; - x227 = _tuple$106[1]; - x229 = new $Uint64(0, 0); - x230 = new $Uint64(0, 0); - _tuple$107 = bits.Add64(x228, x225, new $Uint64(0, 0)); - x229 = _tuple$107[0]; - x230 = _tuple$107[1]; - x231 = new $Uint64(0, 0); - x232 = new $Uint64(0, 0); - _tuple$108 = bits.Add64(x226, x223, ((x$68 = (new p521Uint1(x230.$high, x230.$low)), new $Uint64(x$68.$high, x$68.$low)))); - x231 = _tuple$108[0]; - x232 = _tuple$108[1]; - x233 = new $Uint64(0, 0); - x234 = new $Uint64(0, 0); - _tuple$109 = bits.Add64(x224, x221, ((x$69 = (new p521Uint1(x232.$high, x232.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x233 = _tuple$109[0]; - x234 = _tuple$109[1]; - x235 = new $Uint64(0, 0); - x236 = new $Uint64(0, 0); - _tuple$110 = bits.Add64(x222, x219, ((x$70 = (new p521Uint1(x234.$high, x234.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x235 = _tuple$110[0]; - x236 = _tuple$110[1]; - x237 = new $Uint64(0, 0); - x238 = new $Uint64(0, 0); - _tuple$111 = bits.Add64(x220, x217, ((x$71 = (new p521Uint1(x236.$high, x236.$low)), new $Uint64(x$71.$high, x$71.$low)))); - x237 = _tuple$111[0]; - x238 = _tuple$111[1]; - x239 = new $Uint64(0, 0); - x240 = new $Uint64(0, 0); - _tuple$112 = bits.Add64(x218, x215, ((x$72 = (new p521Uint1(x238.$high, x238.$low)), new $Uint64(x$72.$high, x$72.$low)))); - x239 = _tuple$112[0]; - x240 = _tuple$112[1]; - x241 = new $Uint64(0, 0); - x242 = new $Uint64(0, 0); - _tuple$113 = bits.Add64(x216, x213, ((x$73 = (new p521Uint1(x240.$high, x240.$low)), new $Uint64(x$73.$high, x$73.$low)))); - x241 = _tuple$113[0]; - x242 = _tuple$113[1]; - x243 = new $Uint64(0, 0); - x244 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x214, x211, ((x$74 = (new p521Uint1(x242.$high, x242.$low)), new $Uint64(x$74.$high, x$74.$low)))); - x243 = _tuple$114[0]; - x244 = _tuple$114[1]; - x245 = (x$75 = ((x$76 = (new p521Uint1(x244.$high, x244.$low)), new $Uint64(x$76.$high, x$76.$low))), new $Uint64(x$75.$high + x212.$high, x$75.$low + x212.$low)); - x246 = new $Uint64(0, 0); - x247 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x192, x227, new $Uint64(0, 0)); - x246 = _tuple$115[0]; - x247 = _tuple$115[1]; - x248 = new $Uint64(0, 0); - x249 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x194, x229, ((x$77 = (new p521Uint1(x247.$high, x247.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x248 = _tuple$116[0]; - x249 = _tuple$116[1]; - x250 = new $Uint64(0, 0); - x251 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x196, x231, ((x$78 = (new p521Uint1(x249.$high, x249.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x250 = _tuple$117[0]; - x251 = _tuple$117[1]; - x252 = new $Uint64(0, 0); - x253 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x198, x233, ((x$79 = (new p521Uint1(x251.$high, x251.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x252 = _tuple$118[0]; - x253 = _tuple$118[1]; - x254 = new $Uint64(0, 0); - x255 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x200, x235, ((x$80 = (new p521Uint1(x253.$high, x253.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x254 = _tuple$119[0]; - x255 = _tuple$119[1]; - x256 = new $Uint64(0, 0); - x257 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x202, x237, ((x$81 = (new p521Uint1(x255.$high, x255.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x256 = _tuple$120[0]; - x257 = _tuple$120[1]; - x258 = new $Uint64(0, 0); - x259 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x204, x239, ((x$82 = (new p521Uint1(x257.$high, x257.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x258 = _tuple$121[0]; - x259 = _tuple$121[1]; - x260 = new $Uint64(0, 0); - x261 = new $Uint64(0, 0); - _tuple$122 = bits.Add64(x206, x241, ((x$83 = (new p521Uint1(x259.$high, x259.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x260 = _tuple$122[0]; - x261 = _tuple$122[1]; - x262 = new $Uint64(0, 0); - x263 = new $Uint64(0, 0); - _tuple$123 = bits.Add64(x208, x243, ((x$84 = (new p521Uint1(x261.$high, x261.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x262 = _tuple$123[0]; - x263 = _tuple$123[1]; - x264 = new $Uint64(0, 0); - x265 = new $Uint64(0, 0); - _tuple$124 = bits.Add64(x210, x245, ((x$85 = (new p521Uint1(x263.$high, x263.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x264 = _tuple$124[0]; - x265 = _tuple$124[1]; - x266 = new $Uint64(0, 0); - x267 = new $Uint64(0, 0); - _tuple$125 = bits.Mul64(x246, new $Uint64(0, 511)); - x267 = _tuple$125[0]; - x266 = _tuple$125[1]; - x268 = new $Uint64(0, 0); - x269 = new $Uint64(0, 0); - _tuple$126 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x269 = _tuple$126[0]; - x268 = _tuple$126[1]; - x270 = new $Uint64(0, 0); - x271 = new $Uint64(0, 0); - _tuple$127 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x271 = _tuple$127[0]; - x270 = _tuple$127[1]; - x272 = new $Uint64(0, 0); - x273 = new $Uint64(0, 0); - _tuple$128 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x273 = _tuple$128[0]; - x272 = _tuple$128[1]; - x274 = new $Uint64(0, 0); - x275 = new $Uint64(0, 0); - _tuple$129 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x275 = _tuple$129[0]; - x274 = _tuple$129[1]; - x276 = new $Uint64(0, 0); - x277 = new $Uint64(0, 0); - _tuple$130 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x277 = _tuple$130[0]; - x276 = _tuple$130[1]; - x278 = new $Uint64(0, 0); - x279 = new $Uint64(0, 0); - _tuple$131 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x279 = _tuple$131[0]; - x278 = _tuple$131[1]; - x280 = new $Uint64(0, 0); - x281 = new $Uint64(0, 0); - _tuple$132 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x281 = _tuple$132[0]; - x280 = _tuple$132[1]; - x282 = new $Uint64(0, 0); - x283 = new $Uint64(0, 0); - _tuple$133 = bits.Mul64(x246, new $Uint64(4294967295, 4294967295)); - x283 = _tuple$133[0]; - x282 = _tuple$133[1]; - x284 = new $Uint64(0, 0); - x285 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x283, x280, new $Uint64(0, 0)); - x284 = _tuple$134[0]; - x285 = _tuple$134[1]; - x286 = new $Uint64(0, 0); - x287 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x281, x278, ((x$86 = (new p521Uint1(x285.$high, x285.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x286 = _tuple$135[0]; - x287 = _tuple$135[1]; - x288 = new $Uint64(0, 0); - x289 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x279, x276, ((x$87 = (new p521Uint1(x287.$high, x287.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x288 = _tuple$136[0]; - x289 = _tuple$136[1]; - x290 = new $Uint64(0, 0); - x291 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x277, x274, ((x$88 = (new p521Uint1(x289.$high, x289.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x290 = _tuple$137[0]; - x291 = _tuple$137[1]; - x292 = new $Uint64(0, 0); - x293 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x275, x272, ((x$89 = (new p521Uint1(x291.$high, x291.$low)), new $Uint64(x$89.$high, x$89.$low)))); - x292 = _tuple$138[0]; - x293 = _tuple$138[1]; - x294 = new $Uint64(0, 0); - x295 = new $Uint64(0, 0); - _tuple$139 = bits.Add64(x273, x270, ((x$90 = (new p521Uint1(x293.$high, x293.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x294 = _tuple$139[0]; - x295 = _tuple$139[1]; - x296 = new $Uint64(0, 0); - x297 = new $Uint64(0, 0); - _tuple$140 = bits.Add64(x271, x268, ((x$91 = (new p521Uint1(x295.$high, x295.$low)), new $Uint64(x$91.$high, x$91.$low)))); - x296 = _tuple$140[0]; - x297 = _tuple$140[1]; - x298 = new $Uint64(0, 0); - x299 = new $Uint64(0, 0); - _tuple$141 = bits.Add64(x269, x266, ((x$92 = (new p521Uint1(x297.$high, x297.$low)), new $Uint64(x$92.$high, x$92.$low)))); - x298 = _tuple$141[0]; - x299 = _tuple$141[1]; - x300 = (x$93 = ((x$94 = (new p521Uint1(x299.$high, x299.$low)), new $Uint64(x$94.$high, x$94.$low))), new $Uint64(x$93.$high + x267.$high, x$93.$low + x267.$low)); - x302 = new $Uint64(0, 0); - _tuple$142 = bits.Add64(x246, x282, new $Uint64(0, 0)); - x302 = _tuple$142[1]; - x303 = new $Uint64(0, 0); - x304 = new $Uint64(0, 0); - _tuple$143 = bits.Add64(x248, x284, ((x$95 = (new p521Uint1(x302.$high, x302.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x303 = _tuple$143[0]; - x304 = _tuple$143[1]; - x305 = new $Uint64(0, 0); - x306 = new $Uint64(0, 0); - _tuple$144 = bits.Add64(x250, x286, ((x$96 = (new p521Uint1(x304.$high, x304.$low)), new $Uint64(x$96.$high, x$96.$low)))); - x305 = _tuple$144[0]; - x306 = _tuple$144[1]; - x307 = new $Uint64(0, 0); - x308 = new $Uint64(0, 0); - _tuple$145 = bits.Add64(x252, x288, ((x$97 = (new p521Uint1(x306.$high, x306.$low)), new $Uint64(x$97.$high, x$97.$low)))); - x307 = _tuple$145[0]; - x308 = _tuple$145[1]; - x309 = new $Uint64(0, 0); - x310 = new $Uint64(0, 0); - _tuple$146 = bits.Add64(x254, x290, ((x$98 = (new p521Uint1(x308.$high, x308.$low)), new $Uint64(x$98.$high, x$98.$low)))); - x309 = _tuple$146[0]; - x310 = _tuple$146[1]; - x311 = new $Uint64(0, 0); - x312 = new $Uint64(0, 0); - _tuple$147 = bits.Add64(x256, x292, ((x$99 = (new p521Uint1(x310.$high, x310.$low)), new $Uint64(x$99.$high, x$99.$low)))); - x311 = _tuple$147[0]; - x312 = _tuple$147[1]; - x313 = new $Uint64(0, 0); - x314 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x258, x294, ((x$100 = (new p521Uint1(x312.$high, x312.$low)), new $Uint64(x$100.$high, x$100.$low)))); - x313 = _tuple$148[0]; - x314 = _tuple$148[1]; - x315 = new $Uint64(0, 0); - x316 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x260, x296, ((x$101 = (new p521Uint1(x314.$high, x314.$low)), new $Uint64(x$101.$high, x$101.$low)))); - x315 = _tuple$149[0]; - x316 = _tuple$149[1]; - x317 = new $Uint64(0, 0); - x318 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x262, x298, ((x$102 = (new p521Uint1(x316.$high, x316.$low)), new $Uint64(x$102.$high, x$102.$low)))); - x317 = _tuple$150[0]; - x318 = _tuple$150[1]; - x319 = new $Uint64(0, 0); - x320 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x264, x300, ((x$103 = (new p521Uint1(x318.$high, x318.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x319 = _tuple$151[0]; - x320 = _tuple$151[1]; - x321 = (x$104 = ((x$105 = (new p521Uint1(x320.$high, x320.$low)), new $Uint64(x$105.$high, x$105.$low))), x$106 = ((x$107 = (new p521Uint1(x265.$high, x265.$low)), new $Uint64(x$107.$high, x$107.$low))), new $Uint64(x$104.$high + x$106.$high, x$104.$low + x$106.$low)); - x322 = new $Uint64(0, 0); - x323 = new $Uint64(0, 0); - _tuple$152 = bits.Mul64(x3, arg1[8]); - x323 = _tuple$152[0]; - x322 = _tuple$152[1]; - x324 = new $Uint64(0, 0); - x325 = new $Uint64(0, 0); - _tuple$153 = bits.Mul64(x3, arg1[7]); - x325 = _tuple$153[0]; - x324 = _tuple$153[1]; - x326 = new $Uint64(0, 0); - x327 = new $Uint64(0, 0); - _tuple$154 = bits.Mul64(x3, arg1[6]); - x327 = _tuple$154[0]; - x326 = _tuple$154[1]; - x328 = new $Uint64(0, 0); - x329 = new $Uint64(0, 0); - _tuple$155 = bits.Mul64(x3, arg1[5]); - x329 = _tuple$155[0]; - x328 = _tuple$155[1]; - x330 = new $Uint64(0, 0); - x331 = new $Uint64(0, 0); - _tuple$156 = bits.Mul64(x3, arg1[4]); - x331 = _tuple$156[0]; - x330 = _tuple$156[1]; - x332 = new $Uint64(0, 0); - x333 = new $Uint64(0, 0); - _tuple$157 = bits.Mul64(x3, arg1[3]); - x333 = _tuple$157[0]; - x332 = _tuple$157[1]; - x334 = new $Uint64(0, 0); - x335 = new $Uint64(0, 0); - _tuple$158 = bits.Mul64(x3, arg1[2]); - x335 = _tuple$158[0]; - x334 = _tuple$158[1]; - x336 = new $Uint64(0, 0); - x337 = new $Uint64(0, 0); - _tuple$159 = bits.Mul64(x3, arg1[1]); - x337 = _tuple$159[0]; - x336 = _tuple$159[1]; - x338 = new $Uint64(0, 0); - x339 = new $Uint64(0, 0); - _tuple$160 = bits.Mul64(x3, arg1[0]); - x339 = _tuple$160[0]; - x338 = _tuple$160[1]; - x340 = new $Uint64(0, 0); - x341 = new $Uint64(0, 0); - _tuple$161 = bits.Add64(x339, x336, new $Uint64(0, 0)); - x340 = _tuple$161[0]; - x341 = _tuple$161[1]; - x342 = new $Uint64(0, 0); - x343 = new $Uint64(0, 0); - _tuple$162 = bits.Add64(x337, x334, ((x$108 = (new p521Uint1(x341.$high, x341.$low)), new $Uint64(x$108.$high, x$108.$low)))); - x342 = _tuple$162[0]; - x343 = _tuple$162[1]; - x344 = new $Uint64(0, 0); - x345 = new $Uint64(0, 0); - _tuple$163 = bits.Add64(x335, x332, ((x$109 = (new p521Uint1(x343.$high, x343.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x344 = _tuple$163[0]; - x345 = _tuple$163[1]; - x346 = new $Uint64(0, 0); - x347 = new $Uint64(0, 0); - _tuple$164 = bits.Add64(x333, x330, ((x$110 = (new p521Uint1(x345.$high, x345.$low)), new $Uint64(x$110.$high, x$110.$low)))); - x346 = _tuple$164[0]; - x347 = _tuple$164[1]; - x348 = new $Uint64(0, 0); - x349 = new $Uint64(0, 0); - _tuple$165 = bits.Add64(x331, x328, ((x$111 = (new p521Uint1(x347.$high, x347.$low)), new $Uint64(x$111.$high, x$111.$low)))); - x348 = _tuple$165[0]; - x349 = _tuple$165[1]; - x350 = new $Uint64(0, 0); - x351 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x329, x326, ((x$112 = (new p521Uint1(x349.$high, x349.$low)), new $Uint64(x$112.$high, x$112.$low)))); - x350 = _tuple$166[0]; - x351 = _tuple$166[1]; - x352 = new $Uint64(0, 0); - x353 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x327, x324, ((x$113 = (new p521Uint1(x351.$high, x351.$low)), new $Uint64(x$113.$high, x$113.$low)))); - x352 = _tuple$167[0]; - x353 = _tuple$167[1]; - x354 = new $Uint64(0, 0); - x355 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x325, x322, ((x$114 = (new p521Uint1(x353.$high, x353.$low)), new $Uint64(x$114.$high, x$114.$low)))); - x354 = _tuple$168[0]; - x355 = _tuple$168[1]; - x356 = (x$115 = ((x$116 = (new p521Uint1(x355.$high, x355.$low)), new $Uint64(x$116.$high, x$116.$low))), new $Uint64(x$115.$high + x323.$high, x$115.$low + x323.$low)); - x357 = new $Uint64(0, 0); - x358 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x303, x338, new $Uint64(0, 0)); - x357 = _tuple$169[0]; - x358 = _tuple$169[1]; - x359 = new $Uint64(0, 0); - x360 = new $Uint64(0, 0); - _tuple$170 = bits.Add64(x305, x340, ((x$117 = (new p521Uint1(x358.$high, x358.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x359 = _tuple$170[0]; - x360 = _tuple$170[1]; - x361 = new $Uint64(0, 0); - x362 = new $Uint64(0, 0); - _tuple$171 = bits.Add64(x307, x342, ((x$118 = (new p521Uint1(x360.$high, x360.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x361 = _tuple$171[0]; - x362 = _tuple$171[1]; - x363 = new $Uint64(0, 0); - x364 = new $Uint64(0, 0); - _tuple$172 = bits.Add64(x309, x344, ((x$119 = (new p521Uint1(x362.$high, x362.$low)), new $Uint64(x$119.$high, x$119.$low)))); - x363 = _tuple$172[0]; - x364 = _tuple$172[1]; - x365 = new $Uint64(0, 0); - x366 = new $Uint64(0, 0); - _tuple$173 = bits.Add64(x311, x346, ((x$120 = (new p521Uint1(x364.$high, x364.$low)), new $Uint64(x$120.$high, x$120.$low)))); - x365 = _tuple$173[0]; - x366 = _tuple$173[1]; - x367 = new $Uint64(0, 0); - x368 = new $Uint64(0, 0); - _tuple$174 = bits.Add64(x313, x348, ((x$121 = (new p521Uint1(x366.$high, x366.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x367 = _tuple$174[0]; - x368 = _tuple$174[1]; - x369 = new $Uint64(0, 0); - x370 = new $Uint64(0, 0); - _tuple$175 = bits.Add64(x315, x350, ((x$122 = (new p521Uint1(x368.$high, x368.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x369 = _tuple$175[0]; - x370 = _tuple$175[1]; - x371 = new $Uint64(0, 0); - x372 = new $Uint64(0, 0); - _tuple$176 = bits.Add64(x317, x352, ((x$123 = (new p521Uint1(x370.$high, x370.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x371 = _tuple$176[0]; - x372 = _tuple$176[1]; - x373 = new $Uint64(0, 0); - x374 = new $Uint64(0, 0); - _tuple$177 = bits.Add64(x319, x354, ((x$124 = (new p521Uint1(x372.$high, x372.$low)), new $Uint64(x$124.$high, x$124.$low)))); - x373 = _tuple$177[0]; - x374 = _tuple$177[1]; - x375 = new $Uint64(0, 0); - x376 = new $Uint64(0, 0); - _tuple$178 = bits.Add64(x321, x356, ((x$125 = (new p521Uint1(x374.$high, x374.$low)), new $Uint64(x$125.$high, x$125.$low)))); - x375 = _tuple$178[0]; - x376 = _tuple$178[1]; - x377 = new $Uint64(0, 0); - x378 = new $Uint64(0, 0); - _tuple$179 = bits.Mul64(x357, new $Uint64(0, 511)); - x378 = _tuple$179[0]; - x377 = _tuple$179[1]; - x379 = new $Uint64(0, 0); - x380 = new $Uint64(0, 0); - _tuple$180 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x380 = _tuple$180[0]; - x379 = _tuple$180[1]; - x381 = new $Uint64(0, 0); - x382 = new $Uint64(0, 0); - _tuple$181 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x382 = _tuple$181[0]; - x381 = _tuple$181[1]; - x383 = new $Uint64(0, 0); - x384 = new $Uint64(0, 0); - _tuple$182 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x384 = _tuple$182[0]; - x383 = _tuple$182[1]; - x385 = new $Uint64(0, 0); - x386 = new $Uint64(0, 0); - _tuple$183 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x386 = _tuple$183[0]; - x385 = _tuple$183[1]; - x387 = new $Uint64(0, 0); - x388 = new $Uint64(0, 0); - _tuple$184 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x388 = _tuple$184[0]; - x387 = _tuple$184[1]; - x389 = new $Uint64(0, 0); - x390 = new $Uint64(0, 0); - _tuple$185 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x390 = _tuple$185[0]; - x389 = _tuple$185[1]; - x391 = new $Uint64(0, 0); - x392 = new $Uint64(0, 0); - _tuple$186 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x392 = _tuple$186[0]; - x391 = _tuple$186[1]; - x393 = new $Uint64(0, 0); - x394 = new $Uint64(0, 0); - _tuple$187 = bits.Mul64(x357, new $Uint64(4294967295, 4294967295)); - x394 = _tuple$187[0]; - x393 = _tuple$187[1]; - x395 = new $Uint64(0, 0); - x396 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x394, x391, new $Uint64(0, 0)); - x395 = _tuple$188[0]; - x396 = _tuple$188[1]; - x397 = new $Uint64(0, 0); - x398 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x392, x389, ((x$126 = (new p521Uint1(x396.$high, x396.$low)), new $Uint64(x$126.$high, x$126.$low)))); - x397 = _tuple$189[0]; - x398 = _tuple$189[1]; - x399 = new $Uint64(0, 0); - x400 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x390, x387, ((x$127 = (new p521Uint1(x398.$high, x398.$low)), new $Uint64(x$127.$high, x$127.$low)))); - x399 = _tuple$190[0]; - x400 = _tuple$190[1]; - x401 = new $Uint64(0, 0); - x402 = new $Uint64(0, 0); - _tuple$191 = bits.Add64(x388, x385, ((x$128 = (new p521Uint1(x400.$high, x400.$low)), new $Uint64(x$128.$high, x$128.$low)))); - x401 = _tuple$191[0]; - x402 = _tuple$191[1]; - x403 = new $Uint64(0, 0); - x404 = new $Uint64(0, 0); - _tuple$192 = bits.Add64(x386, x383, ((x$129 = (new p521Uint1(x402.$high, x402.$low)), new $Uint64(x$129.$high, x$129.$low)))); - x403 = _tuple$192[0]; - x404 = _tuple$192[1]; - x405 = new $Uint64(0, 0); - x406 = new $Uint64(0, 0); - _tuple$193 = bits.Add64(x384, x381, ((x$130 = (new p521Uint1(x404.$high, x404.$low)), new $Uint64(x$130.$high, x$130.$low)))); - x405 = _tuple$193[0]; - x406 = _tuple$193[1]; - x407 = new $Uint64(0, 0); - x408 = new $Uint64(0, 0); - _tuple$194 = bits.Add64(x382, x379, ((x$131 = (new p521Uint1(x406.$high, x406.$low)), new $Uint64(x$131.$high, x$131.$low)))); - x407 = _tuple$194[0]; - x408 = _tuple$194[1]; - x409 = new $Uint64(0, 0); - x410 = new $Uint64(0, 0); - _tuple$195 = bits.Add64(x380, x377, ((x$132 = (new p521Uint1(x408.$high, x408.$low)), new $Uint64(x$132.$high, x$132.$low)))); - x409 = _tuple$195[0]; - x410 = _tuple$195[1]; - x411 = (x$133 = ((x$134 = (new p521Uint1(x410.$high, x410.$low)), new $Uint64(x$134.$high, x$134.$low))), new $Uint64(x$133.$high + x378.$high, x$133.$low + x378.$low)); - x413 = new $Uint64(0, 0); - _tuple$196 = bits.Add64(x357, x393, new $Uint64(0, 0)); - x413 = _tuple$196[1]; - x414 = new $Uint64(0, 0); - x415 = new $Uint64(0, 0); - _tuple$197 = bits.Add64(x359, x395, ((x$135 = (new p521Uint1(x413.$high, x413.$low)), new $Uint64(x$135.$high, x$135.$low)))); - x414 = _tuple$197[0]; - x415 = _tuple$197[1]; - x416 = new $Uint64(0, 0); - x417 = new $Uint64(0, 0); - _tuple$198 = bits.Add64(x361, x397, ((x$136 = (new p521Uint1(x415.$high, x415.$low)), new $Uint64(x$136.$high, x$136.$low)))); - x416 = _tuple$198[0]; - x417 = _tuple$198[1]; - x418 = new $Uint64(0, 0); - x419 = new $Uint64(0, 0); - _tuple$199 = bits.Add64(x363, x399, ((x$137 = (new p521Uint1(x417.$high, x417.$low)), new $Uint64(x$137.$high, x$137.$low)))); - x418 = _tuple$199[0]; - x419 = _tuple$199[1]; - x420 = new $Uint64(0, 0); - x421 = new $Uint64(0, 0); - _tuple$200 = bits.Add64(x365, x401, ((x$138 = (new p521Uint1(x419.$high, x419.$low)), new $Uint64(x$138.$high, x$138.$low)))); - x420 = _tuple$200[0]; - x421 = _tuple$200[1]; - x422 = new $Uint64(0, 0); - x423 = new $Uint64(0, 0); - _tuple$201 = bits.Add64(x367, x403, ((x$139 = (new p521Uint1(x421.$high, x421.$low)), new $Uint64(x$139.$high, x$139.$low)))); - x422 = _tuple$201[0]; - x423 = _tuple$201[1]; - x424 = new $Uint64(0, 0); - x425 = new $Uint64(0, 0); - _tuple$202 = bits.Add64(x369, x405, ((x$140 = (new p521Uint1(x423.$high, x423.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x424 = _tuple$202[0]; - x425 = _tuple$202[1]; - x426 = new $Uint64(0, 0); - x427 = new $Uint64(0, 0); - _tuple$203 = bits.Add64(x371, x407, ((x$141 = (new p521Uint1(x425.$high, x425.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x426 = _tuple$203[0]; - x427 = _tuple$203[1]; - x428 = new $Uint64(0, 0); - x429 = new $Uint64(0, 0); - _tuple$204 = bits.Add64(x373, x409, ((x$142 = (new p521Uint1(x427.$high, x427.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x428 = _tuple$204[0]; - x429 = _tuple$204[1]; - x430 = new $Uint64(0, 0); - x431 = new $Uint64(0, 0); - _tuple$205 = bits.Add64(x375, x411, ((x$143 = (new p521Uint1(x429.$high, x429.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x430 = _tuple$205[0]; - x431 = _tuple$205[1]; - x432 = (x$144 = ((x$145 = (new p521Uint1(x431.$high, x431.$low)), new $Uint64(x$145.$high, x$145.$low))), x$146 = ((x$147 = (new p521Uint1(x376.$high, x376.$low)), new $Uint64(x$147.$high, x$147.$low))), new $Uint64(x$144.$high + x$146.$high, x$144.$low + x$146.$low)); - x433 = new $Uint64(0, 0); - x434 = new $Uint64(0, 0); - _tuple$206 = bits.Mul64(x4, arg1[8]); - x434 = _tuple$206[0]; - x433 = _tuple$206[1]; - x435 = new $Uint64(0, 0); - x436 = new $Uint64(0, 0); - _tuple$207 = bits.Mul64(x4, arg1[7]); - x436 = _tuple$207[0]; - x435 = _tuple$207[1]; - x437 = new $Uint64(0, 0); - x438 = new $Uint64(0, 0); - _tuple$208 = bits.Mul64(x4, arg1[6]); - x438 = _tuple$208[0]; - x437 = _tuple$208[1]; - x439 = new $Uint64(0, 0); - x440 = new $Uint64(0, 0); - _tuple$209 = bits.Mul64(x4, arg1[5]); - x440 = _tuple$209[0]; - x439 = _tuple$209[1]; - x441 = new $Uint64(0, 0); - x442 = new $Uint64(0, 0); - _tuple$210 = bits.Mul64(x4, arg1[4]); - x442 = _tuple$210[0]; - x441 = _tuple$210[1]; - x443 = new $Uint64(0, 0); - x444 = new $Uint64(0, 0); - _tuple$211 = bits.Mul64(x4, arg1[3]); - x444 = _tuple$211[0]; - x443 = _tuple$211[1]; - x445 = new $Uint64(0, 0); - x446 = new $Uint64(0, 0); - _tuple$212 = bits.Mul64(x4, arg1[2]); - x446 = _tuple$212[0]; - x445 = _tuple$212[1]; - x447 = new $Uint64(0, 0); - x448 = new $Uint64(0, 0); - _tuple$213 = bits.Mul64(x4, arg1[1]); - x448 = _tuple$213[0]; - x447 = _tuple$213[1]; - x449 = new $Uint64(0, 0); - x450 = new $Uint64(0, 0); - _tuple$214 = bits.Mul64(x4, arg1[0]); - x450 = _tuple$214[0]; - x449 = _tuple$214[1]; - x451 = new $Uint64(0, 0); - x452 = new $Uint64(0, 0); - _tuple$215 = bits.Add64(x450, x447, new $Uint64(0, 0)); - x451 = _tuple$215[0]; - x452 = _tuple$215[1]; - x453 = new $Uint64(0, 0); - x454 = new $Uint64(0, 0); - _tuple$216 = bits.Add64(x448, x445, ((x$148 = (new p521Uint1(x452.$high, x452.$low)), new $Uint64(x$148.$high, x$148.$low)))); - x453 = _tuple$216[0]; - x454 = _tuple$216[1]; - x455 = new $Uint64(0, 0); - x456 = new $Uint64(0, 0); - _tuple$217 = bits.Add64(x446, x443, ((x$149 = (new p521Uint1(x454.$high, x454.$low)), new $Uint64(x$149.$high, x$149.$low)))); - x455 = _tuple$217[0]; - x456 = _tuple$217[1]; - x457 = new $Uint64(0, 0); - x458 = new $Uint64(0, 0); - _tuple$218 = bits.Add64(x444, x441, ((x$150 = (new p521Uint1(x456.$high, x456.$low)), new $Uint64(x$150.$high, x$150.$low)))); - x457 = _tuple$218[0]; - x458 = _tuple$218[1]; - x459 = new $Uint64(0, 0); - x460 = new $Uint64(0, 0); - _tuple$219 = bits.Add64(x442, x439, ((x$151 = (new p521Uint1(x458.$high, x458.$low)), new $Uint64(x$151.$high, x$151.$low)))); - x459 = _tuple$219[0]; - x460 = _tuple$219[1]; - x461 = new $Uint64(0, 0); - x462 = new $Uint64(0, 0); - _tuple$220 = bits.Add64(x440, x437, ((x$152 = (new p521Uint1(x460.$high, x460.$low)), new $Uint64(x$152.$high, x$152.$low)))); - x461 = _tuple$220[0]; - x462 = _tuple$220[1]; - x463 = new $Uint64(0, 0); - x464 = new $Uint64(0, 0); - _tuple$221 = bits.Add64(x438, x435, ((x$153 = (new p521Uint1(x462.$high, x462.$low)), new $Uint64(x$153.$high, x$153.$low)))); - x463 = _tuple$221[0]; - x464 = _tuple$221[1]; - x465 = new $Uint64(0, 0); - x466 = new $Uint64(0, 0); - _tuple$222 = bits.Add64(x436, x433, ((x$154 = (new p521Uint1(x464.$high, x464.$low)), new $Uint64(x$154.$high, x$154.$low)))); - x465 = _tuple$222[0]; - x466 = _tuple$222[1]; - x467 = (x$155 = ((x$156 = (new p521Uint1(x466.$high, x466.$low)), new $Uint64(x$156.$high, x$156.$low))), new $Uint64(x$155.$high + x434.$high, x$155.$low + x434.$low)); - x468 = new $Uint64(0, 0); - x469 = new $Uint64(0, 0); - _tuple$223 = bits.Add64(x414, x449, new $Uint64(0, 0)); - x468 = _tuple$223[0]; - x469 = _tuple$223[1]; - x470 = new $Uint64(0, 0); - x471 = new $Uint64(0, 0); - _tuple$224 = bits.Add64(x416, x451, ((x$157 = (new p521Uint1(x469.$high, x469.$low)), new $Uint64(x$157.$high, x$157.$low)))); - x470 = _tuple$224[0]; - x471 = _tuple$224[1]; - x472 = new $Uint64(0, 0); - x473 = new $Uint64(0, 0); - _tuple$225 = bits.Add64(x418, x453, ((x$158 = (new p521Uint1(x471.$high, x471.$low)), new $Uint64(x$158.$high, x$158.$low)))); - x472 = _tuple$225[0]; - x473 = _tuple$225[1]; - x474 = new $Uint64(0, 0); - x475 = new $Uint64(0, 0); - _tuple$226 = bits.Add64(x420, x455, ((x$159 = (new p521Uint1(x473.$high, x473.$low)), new $Uint64(x$159.$high, x$159.$low)))); - x474 = _tuple$226[0]; - x475 = _tuple$226[1]; - x476 = new $Uint64(0, 0); - x477 = new $Uint64(0, 0); - _tuple$227 = bits.Add64(x422, x457, ((x$160 = (new p521Uint1(x475.$high, x475.$low)), new $Uint64(x$160.$high, x$160.$low)))); - x476 = _tuple$227[0]; - x477 = _tuple$227[1]; - x478 = new $Uint64(0, 0); - x479 = new $Uint64(0, 0); - _tuple$228 = bits.Add64(x424, x459, ((x$161 = (new p521Uint1(x477.$high, x477.$low)), new $Uint64(x$161.$high, x$161.$low)))); - x478 = _tuple$228[0]; - x479 = _tuple$228[1]; - x480 = new $Uint64(0, 0); - x481 = new $Uint64(0, 0); - _tuple$229 = bits.Add64(x426, x461, ((x$162 = (new p521Uint1(x479.$high, x479.$low)), new $Uint64(x$162.$high, x$162.$low)))); - x480 = _tuple$229[0]; - x481 = _tuple$229[1]; - x482 = new $Uint64(0, 0); - x483 = new $Uint64(0, 0); - _tuple$230 = bits.Add64(x428, x463, ((x$163 = (new p521Uint1(x481.$high, x481.$low)), new $Uint64(x$163.$high, x$163.$low)))); - x482 = _tuple$230[0]; - x483 = _tuple$230[1]; - x484 = new $Uint64(0, 0); - x485 = new $Uint64(0, 0); - _tuple$231 = bits.Add64(x430, x465, ((x$164 = (new p521Uint1(x483.$high, x483.$low)), new $Uint64(x$164.$high, x$164.$low)))); - x484 = _tuple$231[0]; - x485 = _tuple$231[1]; - x486 = new $Uint64(0, 0); - x487 = new $Uint64(0, 0); - _tuple$232 = bits.Add64(x432, x467, ((x$165 = (new p521Uint1(x485.$high, x485.$low)), new $Uint64(x$165.$high, x$165.$low)))); - x486 = _tuple$232[0]; - x487 = _tuple$232[1]; - x488 = new $Uint64(0, 0); - x489 = new $Uint64(0, 0); - _tuple$233 = bits.Mul64(x468, new $Uint64(0, 511)); - x489 = _tuple$233[0]; - x488 = _tuple$233[1]; - x490 = new $Uint64(0, 0); - x491 = new $Uint64(0, 0); - _tuple$234 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x491 = _tuple$234[0]; - x490 = _tuple$234[1]; - x492 = new $Uint64(0, 0); - x493 = new $Uint64(0, 0); - _tuple$235 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x493 = _tuple$235[0]; - x492 = _tuple$235[1]; - x494 = new $Uint64(0, 0); - x495 = new $Uint64(0, 0); - _tuple$236 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x495 = _tuple$236[0]; - x494 = _tuple$236[1]; - x496 = new $Uint64(0, 0); - x497 = new $Uint64(0, 0); - _tuple$237 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x497 = _tuple$237[0]; - x496 = _tuple$237[1]; - x498 = new $Uint64(0, 0); - x499 = new $Uint64(0, 0); - _tuple$238 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x499 = _tuple$238[0]; - x498 = _tuple$238[1]; - x500 = new $Uint64(0, 0); - x501 = new $Uint64(0, 0); - _tuple$239 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x501 = _tuple$239[0]; - x500 = _tuple$239[1]; - x502 = new $Uint64(0, 0); - x503 = new $Uint64(0, 0); - _tuple$240 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x503 = _tuple$240[0]; - x502 = _tuple$240[1]; - x504 = new $Uint64(0, 0); - x505 = new $Uint64(0, 0); - _tuple$241 = bits.Mul64(x468, new $Uint64(4294967295, 4294967295)); - x505 = _tuple$241[0]; - x504 = _tuple$241[1]; - x506 = new $Uint64(0, 0); - x507 = new $Uint64(0, 0); - _tuple$242 = bits.Add64(x505, x502, new $Uint64(0, 0)); - x506 = _tuple$242[0]; - x507 = _tuple$242[1]; - x508 = new $Uint64(0, 0); - x509 = new $Uint64(0, 0); - _tuple$243 = bits.Add64(x503, x500, ((x$166 = (new p521Uint1(x507.$high, x507.$low)), new $Uint64(x$166.$high, x$166.$low)))); - x508 = _tuple$243[0]; - x509 = _tuple$243[1]; - x510 = new $Uint64(0, 0); - x511 = new $Uint64(0, 0); - _tuple$244 = bits.Add64(x501, x498, ((x$167 = (new p521Uint1(x509.$high, x509.$low)), new $Uint64(x$167.$high, x$167.$low)))); - x510 = _tuple$244[0]; - x511 = _tuple$244[1]; - x512 = new $Uint64(0, 0); - x513 = new $Uint64(0, 0); - _tuple$245 = bits.Add64(x499, x496, ((x$168 = (new p521Uint1(x511.$high, x511.$low)), new $Uint64(x$168.$high, x$168.$low)))); - x512 = _tuple$245[0]; - x513 = _tuple$245[1]; - x514 = new $Uint64(0, 0); - x515 = new $Uint64(0, 0); - _tuple$246 = bits.Add64(x497, x494, ((x$169 = (new p521Uint1(x513.$high, x513.$low)), new $Uint64(x$169.$high, x$169.$low)))); - x514 = _tuple$246[0]; - x515 = _tuple$246[1]; - x516 = new $Uint64(0, 0); - x517 = new $Uint64(0, 0); - _tuple$247 = bits.Add64(x495, x492, ((x$170 = (new p521Uint1(x515.$high, x515.$low)), new $Uint64(x$170.$high, x$170.$low)))); - x516 = _tuple$247[0]; - x517 = _tuple$247[1]; - x518 = new $Uint64(0, 0); - x519 = new $Uint64(0, 0); - _tuple$248 = bits.Add64(x493, x490, ((x$171 = (new p521Uint1(x517.$high, x517.$low)), new $Uint64(x$171.$high, x$171.$low)))); - x518 = _tuple$248[0]; - x519 = _tuple$248[1]; - x520 = new $Uint64(0, 0); - x521 = new $Uint64(0, 0); - _tuple$249 = bits.Add64(x491, x488, ((x$172 = (new p521Uint1(x519.$high, x519.$low)), new $Uint64(x$172.$high, x$172.$low)))); - x520 = _tuple$249[0]; - x521 = _tuple$249[1]; - x522 = (x$173 = ((x$174 = (new p521Uint1(x521.$high, x521.$low)), new $Uint64(x$174.$high, x$174.$low))), new $Uint64(x$173.$high + x489.$high, x$173.$low + x489.$low)); - x524 = new $Uint64(0, 0); - _tuple$250 = bits.Add64(x468, x504, new $Uint64(0, 0)); - x524 = _tuple$250[1]; - x525 = new $Uint64(0, 0); - x526 = new $Uint64(0, 0); - _tuple$251 = bits.Add64(x470, x506, ((x$175 = (new p521Uint1(x524.$high, x524.$low)), new $Uint64(x$175.$high, x$175.$low)))); - x525 = _tuple$251[0]; - x526 = _tuple$251[1]; - x527 = new $Uint64(0, 0); - x528 = new $Uint64(0, 0); - _tuple$252 = bits.Add64(x472, x508, ((x$176 = (new p521Uint1(x526.$high, x526.$low)), new $Uint64(x$176.$high, x$176.$low)))); - x527 = _tuple$252[0]; - x528 = _tuple$252[1]; - x529 = new $Uint64(0, 0); - x530 = new $Uint64(0, 0); - _tuple$253 = bits.Add64(x474, x510, ((x$177 = (new p521Uint1(x528.$high, x528.$low)), new $Uint64(x$177.$high, x$177.$low)))); - x529 = _tuple$253[0]; - x530 = _tuple$253[1]; - x531 = new $Uint64(0, 0); - x532 = new $Uint64(0, 0); - _tuple$254 = bits.Add64(x476, x512, ((x$178 = (new p521Uint1(x530.$high, x530.$low)), new $Uint64(x$178.$high, x$178.$low)))); - x531 = _tuple$254[0]; - x532 = _tuple$254[1]; - x533 = new $Uint64(0, 0); - x534 = new $Uint64(0, 0); - _tuple$255 = bits.Add64(x478, x514, ((x$179 = (new p521Uint1(x532.$high, x532.$low)), new $Uint64(x$179.$high, x$179.$low)))); - x533 = _tuple$255[0]; - x534 = _tuple$255[1]; - x535 = new $Uint64(0, 0); - x536 = new $Uint64(0, 0); - _tuple$256 = bits.Add64(x480, x516, ((x$180 = (new p521Uint1(x534.$high, x534.$low)), new $Uint64(x$180.$high, x$180.$low)))); - x535 = _tuple$256[0]; - x536 = _tuple$256[1]; - x537 = new $Uint64(0, 0); - x538 = new $Uint64(0, 0); - _tuple$257 = bits.Add64(x482, x518, ((x$181 = (new p521Uint1(x536.$high, x536.$low)), new $Uint64(x$181.$high, x$181.$low)))); - x537 = _tuple$257[0]; - x538 = _tuple$257[1]; - x539 = new $Uint64(0, 0); - x540 = new $Uint64(0, 0); - _tuple$258 = bits.Add64(x484, x520, ((x$182 = (new p521Uint1(x538.$high, x538.$low)), new $Uint64(x$182.$high, x$182.$low)))); - x539 = _tuple$258[0]; - x540 = _tuple$258[1]; - x541 = new $Uint64(0, 0); - x542 = new $Uint64(0, 0); - _tuple$259 = bits.Add64(x486, x522, ((x$183 = (new p521Uint1(x540.$high, x540.$low)), new $Uint64(x$183.$high, x$183.$low)))); - x541 = _tuple$259[0]; - x542 = _tuple$259[1]; - x543 = (x$184 = ((x$185 = (new p521Uint1(x542.$high, x542.$low)), new $Uint64(x$185.$high, x$185.$low))), x$186 = ((x$187 = (new p521Uint1(x487.$high, x487.$low)), new $Uint64(x$187.$high, x$187.$low))), new $Uint64(x$184.$high + x$186.$high, x$184.$low + x$186.$low)); - x544 = new $Uint64(0, 0); - x545 = new $Uint64(0, 0); - _tuple$260 = bits.Mul64(x5, arg1[8]); - x545 = _tuple$260[0]; - x544 = _tuple$260[1]; - x546 = new $Uint64(0, 0); - x547 = new $Uint64(0, 0); - _tuple$261 = bits.Mul64(x5, arg1[7]); - x547 = _tuple$261[0]; - x546 = _tuple$261[1]; - x548 = new $Uint64(0, 0); - x549 = new $Uint64(0, 0); - _tuple$262 = bits.Mul64(x5, arg1[6]); - x549 = _tuple$262[0]; - x548 = _tuple$262[1]; - x550 = new $Uint64(0, 0); - x551 = new $Uint64(0, 0); - _tuple$263 = bits.Mul64(x5, arg1[5]); - x551 = _tuple$263[0]; - x550 = _tuple$263[1]; - x552 = new $Uint64(0, 0); - x553 = new $Uint64(0, 0); - _tuple$264 = bits.Mul64(x5, arg1[4]); - x553 = _tuple$264[0]; - x552 = _tuple$264[1]; - x554 = new $Uint64(0, 0); - x555 = new $Uint64(0, 0); - _tuple$265 = bits.Mul64(x5, arg1[3]); - x555 = _tuple$265[0]; - x554 = _tuple$265[1]; - x556 = new $Uint64(0, 0); - x557 = new $Uint64(0, 0); - _tuple$266 = bits.Mul64(x5, arg1[2]); - x557 = _tuple$266[0]; - x556 = _tuple$266[1]; - x558 = new $Uint64(0, 0); - x559 = new $Uint64(0, 0); - _tuple$267 = bits.Mul64(x5, arg1[1]); - x559 = _tuple$267[0]; - x558 = _tuple$267[1]; - x560 = new $Uint64(0, 0); - x561 = new $Uint64(0, 0); - _tuple$268 = bits.Mul64(x5, arg1[0]); - x561 = _tuple$268[0]; - x560 = _tuple$268[1]; - x562 = new $Uint64(0, 0); - x563 = new $Uint64(0, 0); - _tuple$269 = bits.Add64(x561, x558, new $Uint64(0, 0)); - x562 = _tuple$269[0]; - x563 = _tuple$269[1]; - x564 = new $Uint64(0, 0); - x565 = new $Uint64(0, 0); - _tuple$270 = bits.Add64(x559, x556, ((x$188 = (new p521Uint1(x563.$high, x563.$low)), new $Uint64(x$188.$high, x$188.$low)))); - x564 = _tuple$270[0]; - x565 = _tuple$270[1]; - x566 = new $Uint64(0, 0); - x567 = new $Uint64(0, 0); - _tuple$271 = bits.Add64(x557, x554, ((x$189 = (new p521Uint1(x565.$high, x565.$low)), new $Uint64(x$189.$high, x$189.$low)))); - x566 = _tuple$271[0]; - x567 = _tuple$271[1]; - x568 = new $Uint64(0, 0); - x569 = new $Uint64(0, 0); - _tuple$272 = bits.Add64(x555, x552, ((x$190 = (new p521Uint1(x567.$high, x567.$low)), new $Uint64(x$190.$high, x$190.$low)))); - x568 = _tuple$272[0]; - x569 = _tuple$272[1]; - x570 = new $Uint64(0, 0); - x571 = new $Uint64(0, 0); - _tuple$273 = bits.Add64(x553, x550, ((x$191 = (new p521Uint1(x569.$high, x569.$low)), new $Uint64(x$191.$high, x$191.$low)))); - x570 = _tuple$273[0]; - x571 = _tuple$273[1]; - x572 = new $Uint64(0, 0); - x573 = new $Uint64(0, 0); - _tuple$274 = bits.Add64(x551, x548, ((x$192 = (new p521Uint1(x571.$high, x571.$low)), new $Uint64(x$192.$high, x$192.$low)))); - x572 = _tuple$274[0]; - x573 = _tuple$274[1]; - x574 = new $Uint64(0, 0); - x575 = new $Uint64(0, 0); - _tuple$275 = bits.Add64(x549, x546, ((x$193 = (new p521Uint1(x573.$high, x573.$low)), new $Uint64(x$193.$high, x$193.$low)))); - x574 = _tuple$275[0]; - x575 = _tuple$275[1]; - x576 = new $Uint64(0, 0); - x577 = new $Uint64(0, 0); - _tuple$276 = bits.Add64(x547, x544, ((x$194 = (new p521Uint1(x575.$high, x575.$low)), new $Uint64(x$194.$high, x$194.$low)))); - x576 = _tuple$276[0]; - x577 = _tuple$276[1]; - x578 = (x$195 = ((x$196 = (new p521Uint1(x577.$high, x577.$low)), new $Uint64(x$196.$high, x$196.$low))), new $Uint64(x$195.$high + x545.$high, x$195.$low + x545.$low)); - x579 = new $Uint64(0, 0); - x580 = new $Uint64(0, 0); - _tuple$277 = bits.Add64(x525, x560, new $Uint64(0, 0)); - x579 = _tuple$277[0]; - x580 = _tuple$277[1]; - x581 = new $Uint64(0, 0); - x582 = new $Uint64(0, 0); - _tuple$278 = bits.Add64(x527, x562, ((x$197 = (new p521Uint1(x580.$high, x580.$low)), new $Uint64(x$197.$high, x$197.$low)))); - x581 = _tuple$278[0]; - x582 = _tuple$278[1]; - x583 = new $Uint64(0, 0); - x584 = new $Uint64(0, 0); - _tuple$279 = bits.Add64(x529, x564, ((x$198 = (new p521Uint1(x582.$high, x582.$low)), new $Uint64(x$198.$high, x$198.$low)))); - x583 = _tuple$279[0]; - x584 = _tuple$279[1]; - x585 = new $Uint64(0, 0); - x586 = new $Uint64(0, 0); - _tuple$280 = bits.Add64(x531, x566, ((x$199 = (new p521Uint1(x584.$high, x584.$low)), new $Uint64(x$199.$high, x$199.$low)))); - x585 = _tuple$280[0]; - x586 = _tuple$280[1]; - x587 = new $Uint64(0, 0); - x588 = new $Uint64(0, 0); - _tuple$281 = bits.Add64(x533, x568, ((x$200 = (new p521Uint1(x586.$high, x586.$low)), new $Uint64(x$200.$high, x$200.$low)))); - x587 = _tuple$281[0]; - x588 = _tuple$281[1]; - x589 = new $Uint64(0, 0); - x590 = new $Uint64(0, 0); - _tuple$282 = bits.Add64(x535, x570, ((x$201 = (new p521Uint1(x588.$high, x588.$low)), new $Uint64(x$201.$high, x$201.$low)))); - x589 = _tuple$282[0]; - x590 = _tuple$282[1]; - x591 = new $Uint64(0, 0); - x592 = new $Uint64(0, 0); - _tuple$283 = bits.Add64(x537, x572, ((x$202 = (new p521Uint1(x590.$high, x590.$low)), new $Uint64(x$202.$high, x$202.$low)))); - x591 = _tuple$283[0]; - x592 = _tuple$283[1]; - x593 = new $Uint64(0, 0); - x594 = new $Uint64(0, 0); - _tuple$284 = bits.Add64(x539, x574, ((x$203 = (new p521Uint1(x592.$high, x592.$low)), new $Uint64(x$203.$high, x$203.$low)))); - x593 = _tuple$284[0]; - x594 = _tuple$284[1]; - x595 = new $Uint64(0, 0); - x596 = new $Uint64(0, 0); - _tuple$285 = bits.Add64(x541, x576, ((x$204 = (new p521Uint1(x594.$high, x594.$low)), new $Uint64(x$204.$high, x$204.$low)))); - x595 = _tuple$285[0]; - x596 = _tuple$285[1]; - x597 = new $Uint64(0, 0); - x598 = new $Uint64(0, 0); - _tuple$286 = bits.Add64(x543, x578, ((x$205 = (new p521Uint1(x596.$high, x596.$low)), new $Uint64(x$205.$high, x$205.$low)))); - x597 = _tuple$286[0]; - x598 = _tuple$286[1]; - x599 = new $Uint64(0, 0); - x600 = new $Uint64(0, 0); - _tuple$287 = bits.Mul64(x579, new $Uint64(0, 511)); - x600 = _tuple$287[0]; - x599 = _tuple$287[1]; - x601 = new $Uint64(0, 0); - x602 = new $Uint64(0, 0); - _tuple$288 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x602 = _tuple$288[0]; - x601 = _tuple$288[1]; - x603 = new $Uint64(0, 0); - x604 = new $Uint64(0, 0); - _tuple$289 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x604 = _tuple$289[0]; - x603 = _tuple$289[1]; - x605 = new $Uint64(0, 0); - x606 = new $Uint64(0, 0); - _tuple$290 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x606 = _tuple$290[0]; - x605 = _tuple$290[1]; - x607 = new $Uint64(0, 0); - x608 = new $Uint64(0, 0); - _tuple$291 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x608 = _tuple$291[0]; - x607 = _tuple$291[1]; - x609 = new $Uint64(0, 0); - x610 = new $Uint64(0, 0); - _tuple$292 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x610 = _tuple$292[0]; - x609 = _tuple$292[1]; - x611 = new $Uint64(0, 0); - x612 = new $Uint64(0, 0); - _tuple$293 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x612 = _tuple$293[0]; - x611 = _tuple$293[1]; - x613 = new $Uint64(0, 0); - x614 = new $Uint64(0, 0); - _tuple$294 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x614 = _tuple$294[0]; - x613 = _tuple$294[1]; - x615 = new $Uint64(0, 0); - x616 = new $Uint64(0, 0); - _tuple$295 = bits.Mul64(x579, new $Uint64(4294967295, 4294967295)); - x616 = _tuple$295[0]; - x615 = _tuple$295[1]; - x617 = new $Uint64(0, 0); - x618 = new $Uint64(0, 0); - _tuple$296 = bits.Add64(x616, x613, new $Uint64(0, 0)); - x617 = _tuple$296[0]; - x618 = _tuple$296[1]; - x619 = new $Uint64(0, 0); - x620 = new $Uint64(0, 0); - _tuple$297 = bits.Add64(x614, x611, ((x$206 = (new p521Uint1(x618.$high, x618.$low)), new $Uint64(x$206.$high, x$206.$low)))); - x619 = _tuple$297[0]; - x620 = _tuple$297[1]; - x621 = new $Uint64(0, 0); - x622 = new $Uint64(0, 0); - _tuple$298 = bits.Add64(x612, x609, ((x$207 = (new p521Uint1(x620.$high, x620.$low)), new $Uint64(x$207.$high, x$207.$low)))); - x621 = _tuple$298[0]; - x622 = _tuple$298[1]; - x623 = new $Uint64(0, 0); - x624 = new $Uint64(0, 0); - _tuple$299 = bits.Add64(x610, x607, ((x$208 = (new p521Uint1(x622.$high, x622.$low)), new $Uint64(x$208.$high, x$208.$low)))); - x623 = _tuple$299[0]; - x624 = _tuple$299[1]; - x625 = new $Uint64(0, 0); - x626 = new $Uint64(0, 0); - _tuple$300 = bits.Add64(x608, x605, ((x$209 = (new p521Uint1(x624.$high, x624.$low)), new $Uint64(x$209.$high, x$209.$low)))); - x625 = _tuple$300[0]; - x626 = _tuple$300[1]; - x627 = new $Uint64(0, 0); - x628 = new $Uint64(0, 0); - _tuple$301 = bits.Add64(x606, x603, ((x$210 = (new p521Uint1(x626.$high, x626.$low)), new $Uint64(x$210.$high, x$210.$low)))); - x627 = _tuple$301[0]; - x628 = _tuple$301[1]; - x629 = new $Uint64(0, 0); - x630 = new $Uint64(0, 0); - _tuple$302 = bits.Add64(x604, x601, ((x$211 = (new p521Uint1(x628.$high, x628.$low)), new $Uint64(x$211.$high, x$211.$low)))); - x629 = _tuple$302[0]; - x630 = _tuple$302[1]; - x631 = new $Uint64(0, 0); - x632 = new $Uint64(0, 0); - _tuple$303 = bits.Add64(x602, x599, ((x$212 = (new p521Uint1(x630.$high, x630.$low)), new $Uint64(x$212.$high, x$212.$low)))); - x631 = _tuple$303[0]; - x632 = _tuple$303[1]; - x633 = (x$213 = ((x$214 = (new p521Uint1(x632.$high, x632.$low)), new $Uint64(x$214.$high, x$214.$low))), new $Uint64(x$213.$high + x600.$high, x$213.$low + x600.$low)); - x635 = new $Uint64(0, 0); - _tuple$304 = bits.Add64(x579, x615, new $Uint64(0, 0)); - x635 = _tuple$304[1]; - x636 = new $Uint64(0, 0); - x637 = new $Uint64(0, 0); - _tuple$305 = bits.Add64(x581, x617, ((x$215 = (new p521Uint1(x635.$high, x635.$low)), new $Uint64(x$215.$high, x$215.$low)))); - x636 = _tuple$305[0]; - x637 = _tuple$305[1]; - x638 = new $Uint64(0, 0); - x639 = new $Uint64(0, 0); - _tuple$306 = bits.Add64(x583, x619, ((x$216 = (new p521Uint1(x637.$high, x637.$low)), new $Uint64(x$216.$high, x$216.$low)))); - x638 = _tuple$306[0]; - x639 = _tuple$306[1]; - x640 = new $Uint64(0, 0); - x641 = new $Uint64(0, 0); - _tuple$307 = bits.Add64(x585, x621, ((x$217 = (new p521Uint1(x639.$high, x639.$low)), new $Uint64(x$217.$high, x$217.$low)))); - x640 = _tuple$307[0]; - x641 = _tuple$307[1]; - x642 = new $Uint64(0, 0); - x643 = new $Uint64(0, 0); - _tuple$308 = bits.Add64(x587, x623, ((x$218 = (new p521Uint1(x641.$high, x641.$low)), new $Uint64(x$218.$high, x$218.$low)))); - x642 = _tuple$308[0]; - x643 = _tuple$308[1]; - x644 = new $Uint64(0, 0); - x645 = new $Uint64(0, 0); - _tuple$309 = bits.Add64(x589, x625, ((x$219 = (new p521Uint1(x643.$high, x643.$low)), new $Uint64(x$219.$high, x$219.$low)))); - x644 = _tuple$309[0]; - x645 = _tuple$309[1]; - x646 = new $Uint64(0, 0); - x647 = new $Uint64(0, 0); - _tuple$310 = bits.Add64(x591, x627, ((x$220 = (new p521Uint1(x645.$high, x645.$low)), new $Uint64(x$220.$high, x$220.$low)))); - x646 = _tuple$310[0]; - x647 = _tuple$310[1]; - x648 = new $Uint64(0, 0); - x649 = new $Uint64(0, 0); - _tuple$311 = bits.Add64(x593, x629, ((x$221 = (new p521Uint1(x647.$high, x647.$low)), new $Uint64(x$221.$high, x$221.$low)))); - x648 = _tuple$311[0]; - x649 = _tuple$311[1]; - x650 = new $Uint64(0, 0); - x651 = new $Uint64(0, 0); - _tuple$312 = bits.Add64(x595, x631, ((x$222 = (new p521Uint1(x649.$high, x649.$low)), new $Uint64(x$222.$high, x$222.$low)))); - x650 = _tuple$312[0]; - x651 = _tuple$312[1]; - x652 = new $Uint64(0, 0); - x653 = new $Uint64(0, 0); - _tuple$313 = bits.Add64(x597, x633, ((x$223 = (new p521Uint1(x651.$high, x651.$low)), new $Uint64(x$223.$high, x$223.$low)))); - x652 = _tuple$313[0]; - x653 = _tuple$313[1]; - x654 = (x$224 = ((x$225 = (new p521Uint1(x653.$high, x653.$low)), new $Uint64(x$225.$high, x$225.$low))), x$226 = ((x$227 = (new p521Uint1(x598.$high, x598.$low)), new $Uint64(x$227.$high, x$227.$low))), new $Uint64(x$224.$high + x$226.$high, x$224.$low + x$226.$low)); - x655 = new $Uint64(0, 0); - x656 = new $Uint64(0, 0); - _tuple$314 = bits.Mul64(x6, arg1[8]); - x656 = _tuple$314[0]; - x655 = _tuple$314[1]; - x657 = new $Uint64(0, 0); - x658 = new $Uint64(0, 0); - _tuple$315 = bits.Mul64(x6, arg1[7]); - x658 = _tuple$315[0]; - x657 = _tuple$315[1]; - x659 = new $Uint64(0, 0); - x660 = new $Uint64(0, 0); - _tuple$316 = bits.Mul64(x6, arg1[6]); - x660 = _tuple$316[0]; - x659 = _tuple$316[1]; - x661 = new $Uint64(0, 0); - x662 = new $Uint64(0, 0); - _tuple$317 = bits.Mul64(x6, arg1[5]); - x662 = _tuple$317[0]; - x661 = _tuple$317[1]; - x663 = new $Uint64(0, 0); - x664 = new $Uint64(0, 0); - _tuple$318 = bits.Mul64(x6, arg1[4]); - x664 = _tuple$318[0]; - x663 = _tuple$318[1]; - x665 = new $Uint64(0, 0); - x666 = new $Uint64(0, 0); - _tuple$319 = bits.Mul64(x6, arg1[3]); - x666 = _tuple$319[0]; - x665 = _tuple$319[1]; - x667 = new $Uint64(0, 0); - x668 = new $Uint64(0, 0); - _tuple$320 = bits.Mul64(x6, arg1[2]); - x668 = _tuple$320[0]; - x667 = _tuple$320[1]; - x669 = new $Uint64(0, 0); - x670 = new $Uint64(0, 0); - _tuple$321 = bits.Mul64(x6, arg1[1]); - x670 = _tuple$321[0]; - x669 = _tuple$321[1]; - x671 = new $Uint64(0, 0); - x672 = new $Uint64(0, 0); - _tuple$322 = bits.Mul64(x6, arg1[0]); - x672 = _tuple$322[0]; - x671 = _tuple$322[1]; - x673 = new $Uint64(0, 0); - x674 = new $Uint64(0, 0); - _tuple$323 = bits.Add64(x672, x669, new $Uint64(0, 0)); - x673 = _tuple$323[0]; - x674 = _tuple$323[1]; - x675 = new $Uint64(0, 0); - x676 = new $Uint64(0, 0); - _tuple$324 = bits.Add64(x670, x667, ((x$228 = (new p521Uint1(x674.$high, x674.$low)), new $Uint64(x$228.$high, x$228.$low)))); - x675 = _tuple$324[0]; - x676 = _tuple$324[1]; - x677 = new $Uint64(0, 0); - x678 = new $Uint64(0, 0); - _tuple$325 = bits.Add64(x668, x665, ((x$229 = (new p521Uint1(x676.$high, x676.$low)), new $Uint64(x$229.$high, x$229.$low)))); - x677 = _tuple$325[0]; - x678 = _tuple$325[1]; - x679 = new $Uint64(0, 0); - x680 = new $Uint64(0, 0); - _tuple$326 = bits.Add64(x666, x663, ((x$230 = (new p521Uint1(x678.$high, x678.$low)), new $Uint64(x$230.$high, x$230.$low)))); - x679 = _tuple$326[0]; - x680 = _tuple$326[1]; - x681 = new $Uint64(0, 0); - x682 = new $Uint64(0, 0); - _tuple$327 = bits.Add64(x664, x661, ((x$231 = (new p521Uint1(x680.$high, x680.$low)), new $Uint64(x$231.$high, x$231.$low)))); - x681 = _tuple$327[0]; - x682 = _tuple$327[1]; - x683 = new $Uint64(0, 0); - x684 = new $Uint64(0, 0); - _tuple$328 = bits.Add64(x662, x659, ((x$232 = (new p521Uint1(x682.$high, x682.$low)), new $Uint64(x$232.$high, x$232.$low)))); - x683 = _tuple$328[0]; - x684 = _tuple$328[1]; - x685 = new $Uint64(0, 0); - x686 = new $Uint64(0, 0); - _tuple$329 = bits.Add64(x660, x657, ((x$233 = (new p521Uint1(x684.$high, x684.$low)), new $Uint64(x$233.$high, x$233.$low)))); - x685 = _tuple$329[0]; - x686 = _tuple$329[1]; - x687 = new $Uint64(0, 0); - x688 = new $Uint64(0, 0); - _tuple$330 = bits.Add64(x658, x655, ((x$234 = (new p521Uint1(x686.$high, x686.$low)), new $Uint64(x$234.$high, x$234.$low)))); - x687 = _tuple$330[0]; - x688 = _tuple$330[1]; - x689 = (x$235 = ((x$236 = (new p521Uint1(x688.$high, x688.$low)), new $Uint64(x$236.$high, x$236.$low))), new $Uint64(x$235.$high + x656.$high, x$235.$low + x656.$low)); - x690 = new $Uint64(0, 0); - x691 = new $Uint64(0, 0); - _tuple$331 = bits.Add64(x636, x671, new $Uint64(0, 0)); - x690 = _tuple$331[0]; - x691 = _tuple$331[1]; - x692 = new $Uint64(0, 0); - x693 = new $Uint64(0, 0); - _tuple$332 = bits.Add64(x638, x673, ((x$237 = (new p521Uint1(x691.$high, x691.$low)), new $Uint64(x$237.$high, x$237.$low)))); - x692 = _tuple$332[0]; - x693 = _tuple$332[1]; - x694 = new $Uint64(0, 0); - x695 = new $Uint64(0, 0); - _tuple$333 = bits.Add64(x640, x675, ((x$238 = (new p521Uint1(x693.$high, x693.$low)), new $Uint64(x$238.$high, x$238.$low)))); - x694 = _tuple$333[0]; - x695 = _tuple$333[1]; - x696 = new $Uint64(0, 0); - x697 = new $Uint64(0, 0); - _tuple$334 = bits.Add64(x642, x677, ((x$239 = (new p521Uint1(x695.$high, x695.$low)), new $Uint64(x$239.$high, x$239.$low)))); - x696 = _tuple$334[0]; - x697 = _tuple$334[1]; - x698 = new $Uint64(0, 0); - x699 = new $Uint64(0, 0); - _tuple$335 = bits.Add64(x644, x679, ((x$240 = (new p521Uint1(x697.$high, x697.$low)), new $Uint64(x$240.$high, x$240.$low)))); - x698 = _tuple$335[0]; - x699 = _tuple$335[1]; - x700 = new $Uint64(0, 0); - x701 = new $Uint64(0, 0); - _tuple$336 = bits.Add64(x646, x681, ((x$241 = (new p521Uint1(x699.$high, x699.$low)), new $Uint64(x$241.$high, x$241.$low)))); - x700 = _tuple$336[0]; - x701 = _tuple$336[1]; - x702 = new $Uint64(0, 0); - x703 = new $Uint64(0, 0); - _tuple$337 = bits.Add64(x648, x683, ((x$242 = (new p521Uint1(x701.$high, x701.$low)), new $Uint64(x$242.$high, x$242.$low)))); - x702 = _tuple$337[0]; - x703 = _tuple$337[1]; - x704 = new $Uint64(0, 0); - x705 = new $Uint64(0, 0); - _tuple$338 = bits.Add64(x650, x685, ((x$243 = (new p521Uint1(x703.$high, x703.$low)), new $Uint64(x$243.$high, x$243.$low)))); - x704 = _tuple$338[0]; - x705 = _tuple$338[1]; - x706 = new $Uint64(0, 0); - x707 = new $Uint64(0, 0); - _tuple$339 = bits.Add64(x652, x687, ((x$244 = (new p521Uint1(x705.$high, x705.$low)), new $Uint64(x$244.$high, x$244.$low)))); - x706 = _tuple$339[0]; - x707 = _tuple$339[1]; - x708 = new $Uint64(0, 0); - x709 = new $Uint64(0, 0); - _tuple$340 = bits.Add64(x654, x689, ((x$245 = (new p521Uint1(x707.$high, x707.$low)), new $Uint64(x$245.$high, x$245.$low)))); - x708 = _tuple$340[0]; - x709 = _tuple$340[1]; - x710 = new $Uint64(0, 0); - x711 = new $Uint64(0, 0); - _tuple$341 = bits.Mul64(x690, new $Uint64(0, 511)); - x711 = _tuple$341[0]; - x710 = _tuple$341[1]; - x712 = new $Uint64(0, 0); - x713 = new $Uint64(0, 0); - _tuple$342 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x713 = _tuple$342[0]; - x712 = _tuple$342[1]; - x714 = new $Uint64(0, 0); - x715 = new $Uint64(0, 0); - _tuple$343 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x715 = _tuple$343[0]; - x714 = _tuple$343[1]; - x716 = new $Uint64(0, 0); - x717 = new $Uint64(0, 0); - _tuple$344 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x717 = _tuple$344[0]; - x716 = _tuple$344[1]; - x718 = new $Uint64(0, 0); - x719 = new $Uint64(0, 0); - _tuple$345 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x719 = _tuple$345[0]; - x718 = _tuple$345[1]; - x720 = new $Uint64(0, 0); - x721 = new $Uint64(0, 0); - _tuple$346 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x721 = _tuple$346[0]; - x720 = _tuple$346[1]; - x722 = new $Uint64(0, 0); - x723 = new $Uint64(0, 0); - _tuple$347 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x723 = _tuple$347[0]; - x722 = _tuple$347[1]; - x724 = new $Uint64(0, 0); - x725 = new $Uint64(0, 0); - _tuple$348 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x725 = _tuple$348[0]; - x724 = _tuple$348[1]; - x726 = new $Uint64(0, 0); - x727 = new $Uint64(0, 0); - _tuple$349 = bits.Mul64(x690, new $Uint64(4294967295, 4294967295)); - x727 = _tuple$349[0]; - x726 = _tuple$349[1]; - x728 = new $Uint64(0, 0); - x729 = new $Uint64(0, 0); - _tuple$350 = bits.Add64(x727, x724, new $Uint64(0, 0)); - x728 = _tuple$350[0]; - x729 = _tuple$350[1]; - x730 = new $Uint64(0, 0); - x731 = new $Uint64(0, 0); - _tuple$351 = bits.Add64(x725, x722, ((x$246 = (new p521Uint1(x729.$high, x729.$low)), new $Uint64(x$246.$high, x$246.$low)))); - x730 = _tuple$351[0]; - x731 = _tuple$351[1]; - x732 = new $Uint64(0, 0); - x733 = new $Uint64(0, 0); - _tuple$352 = bits.Add64(x723, x720, ((x$247 = (new p521Uint1(x731.$high, x731.$low)), new $Uint64(x$247.$high, x$247.$low)))); - x732 = _tuple$352[0]; - x733 = _tuple$352[1]; - x734 = new $Uint64(0, 0); - x735 = new $Uint64(0, 0); - _tuple$353 = bits.Add64(x721, x718, ((x$248 = (new p521Uint1(x733.$high, x733.$low)), new $Uint64(x$248.$high, x$248.$low)))); - x734 = _tuple$353[0]; - x735 = _tuple$353[1]; - x736 = new $Uint64(0, 0); - x737 = new $Uint64(0, 0); - _tuple$354 = bits.Add64(x719, x716, ((x$249 = (new p521Uint1(x735.$high, x735.$low)), new $Uint64(x$249.$high, x$249.$low)))); - x736 = _tuple$354[0]; - x737 = _tuple$354[1]; - x738 = new $Uint64(0, 0); - x739 = new $Uint64(0, 0); - _tuple$355 = bits.Add64(x717, x714, ((x$250 = (new p521Uint1(x737.$high, x737.$low)), new $Uint64(x$250.$high, x$250.$low)))); - x738 = _tuple$355[0]; - x739 = _tuple$355[1]; - x740 = new $Uint64(0, 0); - x741 = new $Uint64(0, 0); - _tuple$356 = bits.Add64(x715, x712, ((x$251 = (new p521Uint1(x739.$high, x739.$low)), new $Uint64(x$251.$high, x$251.$low)))); - x740 = _tuple$356[0]; - x741 = _tuple$356[1]; - x742 = new $Uint64(0, 0); - x743 = new $Uint64(0, 0); - _tuple$357 = bits.Add64(x713, x710, ((x$252 = (new p521Uint1(x741.$high, x741.$low)), new $Uint64(x$252.$high, x$252.$low)))); - x742 = _tuple$357[0]; - x743 = _tuple$357[1]; - x744 = (x$253 = ((x$254 = (new p521Uint1(x743.$high, x743.$low)), new $Uint64(x$254.$high, x$254.$low))), new $Uint64(x$253.$high + x711.$high, x$253.$low + x711.$low)); - x746 = new $Uint64(0, 0); - _tuple$358 = bits.Add64(x690, x726, new $Uint64(0, 0)); - x746 = _tuple$358[1]; - x747 = new $Uint64(0, 0); - x748 = new $Uint64(0, 0); - _tuple$359 = bits.Add64(x692, x728, ((x$255 = (new p521Uint1(x746.$high, x746.$low)), new $Uint64(x$255.$high, x$255.$low)))); - x747 = _tuple$359[0]; - x748 = _tuple$359[1]; - x749 = new $Uint64(0, 0); - x750 = new $Uint64(0, 0); - _tuple$360 = bits.Add64(x694, x730, ((x$256 = (new p521Uint1(x748.$high, x748.$low)), new $Uint64(x$256.$high, x$256.$low)))); - x749 = _tuple$360[0]; - x750 = _tuple$360[1]; - x751 = new $Uint64(0, 0); - x752 = new $Uint64(0, 0); - _tuple$361 = bits.Add64(x696, x732, ((x$257 = (new p521Uint1(x750.$high, x750.$low)), new $Uint64(x$257.$high, x$257.$low)))); - x751 = _tuple$361[0]; - x752 = _tuple$361[1]; - x753 = new $Uint64(0, 0); - x754 = new $Uint64(0, 0); - _tuple$362 = bits.Add64(x698, x734, ((x$258 = (new p521Uint1(x752.$high, x752.$low)), new $Uint64(x$258.$high, x$258.$low)))); - x753 = _tuple$362[0]; - x754 = _tuple$362[1]; - x755 = new $Uint64(0, 0); - x756 = new $Uint64(0, 0); - _tuple$363 = bits.Add64(x700, x736, ((x$259 = (new p521Uint1(x754.$high, x754.$low)), new $Uint64(x$259.$high, x$259.$low)))); - x755 = _tuple$363[0]; - x756 = _tuple$363[1]; - x757 = new $Uint64(0, 0); - x758 = new $Uint64(0, 0); - _tuple$364 = bits.Add64(x702, x738, ((x$260 = (new p521Uint1(x756.$high, x756.$low)), new $Uint64(x$260.$high, x$260.$low)))); - x757 = _tuple$364[0]; - x758 = _tuple$364[1]; - x759 = new $Uint64(0, 0); - x760 = new $Uint64(0, 0); - _tuple$365 = bits.Add64(x704, x740, ((x$261 = (new p521Uint1(x758.$high, x758.$low)), new $Uint64(x$261.$high, x$261.$low)))); - x759 = _tuple$365[0]; - x760 = _tuple$365[1]; - x761 = new $Uint64(0, 0); - x762 = new $Uint64(0, 0); - _tuple$366 = bits.Add64(x706, x742, ((x$262 = (new p521Uint1(x760.$high, x760.$low)), new $Uint64(x$262.$high, x$262.$low)))); - x761 = _tuple$366[0]; - x762 = _tuple$366[1]; - x763 = new $Uint64(0, 0); - x764 = new $Uint64(0, 0); - _tuple$367 = bits.Add64(x708, x744, ((x$263 = (new p521Uint1(x762.$high, x762.$low)), new $Uint64(x$263.$high, x$263.$low)))); - x763 = _tuple$367[0]; - x764 = _tuple$367[1]; - x765 = (x$264 = ((x$265 = (new p521Uint1(x764.$high, x764.$low)), new $Uint64(x$265.$high, x$265.$low))), x$266 = ((x$267 = (new p521Uint1(x709.$high, x709.$low)), new $Uint64(x$267.$high, x$267.$low))), new $Uint64(x$264.$high + x$266.$high, x$264.$low + x$266.$low)); - x766 = new $Uint64(0, 0); - x767 = new $Uint64(0, 0); - _tuple$368 = bits.Mul64(x7, arg1[8]); - x767 = _tuple$368[0]; - x766 = _tuple$368[1]; - x768 = new $Uint64(0, 0); - x769 = new $Uint64(0, 0); - _tuple$369 = bits.Mul64(x7, arg1[7]); - x769 = _tuple$369[0]; - x768 = _tuple$369[1]; - x770 = new $Uint64(0, 0); - x771 = new $Uint64(0, 0); - _tuple$370 = bits.Mul64(x7, arg1[6]); - x771 = _tuple$370[0]; - x770 = _tuple$370[1]; - x772 = new $Uint64(0, 0); - x773 = new $Uint64(0, 0); - _tuple$371 = bits.Mul64(x7, arg1[5]); - x773 = _tuple$371[0]; - x772 = _tuple$371[1]; - x774 = new $Uint64(0, 0); - x775 = new $Uint64(0, 0); - _tuple$372 = bits.Mul64(x7, arg1[4]); - x775 = _tuple$372[0]; - x774 = _tuple$372[1]; - x776 = new $Uint64(0, 0); - x777 = new $Uint64(0, 0); - _tuple$373 = bits.Mul64(x7, arg1[3]); - x777 = _tuple$373[0]; - x776 = _tuple$373[1]; - x778 = new $Uint64(0, 0); - x779 = new $Uint64(0, 0); - _tuple$374 = bits.Mul64(x7, arg1[2]); - x779 = _tuple$374[0]; - x778 = _tuple$374[1]; - x780 = new $Uint64(0, 0); - x781 = new $Uint64(0, 0); - _tuple$375 = bits.Mul64(x7, arg1[1]); - x781 = _tuple$375[0]; - x780 = _tuple$375[1]; - x782 = new $Uint64(0, 0); - x783 = new $Uint64(0, 0); - _tuple$376 = bits.Mul64(x7, arg1[0]); - x783 = _tuple$376[0]; - x782 = _tuple$376[1]; - x784 = new $Uint64(0, 0); - x785 = new $Uint64(0, 0); - _tuple$377 = bits.Add64(x783, x780, new $Uint64(0, 0)); - x784 = _tuple$377[0]; - x785 = _tuple$377[1]; - x786 = new $Uint64(0, 0); - x787 = new $Uint64(0, 0); - _tuple$378 = bits.Add64(x781, x778, ((x$268 = (new p521Uint1(x785.$high, x785.$low)), new $Uint64(x$268.$high, x$268.$low)))); - x786 = _tuple$378[0]; - x787 = _tuple$378[1]; - x788 = new $Uint64(0, 0); - x789 = new $Uint64(0, 0); - _tuple$379 = bits.Add64(x779, x776, ((x$269 = (new p521Uint1(x787.$high, x787.$low)), new $Uint64(x$269.$high, x$269.$low)))); - x788 = _tuple$379[0]; - x789 = _tuple$379[1]; - x790 = new $Uint64(0, 0); - x791 = new $Uint64(0, 0); - _tuple$380 = bits.Add64(x777, x774, ((x$270 = (new p521Uint1(x789.$high, x789.$low)), new $Uint64(x$270.$high, x$270.$low)))); - x790 = _tuple$380[0]; - x791 = _tuple$380[1]; - x792 = new $Uint64(0, 0); - x793 = new $Uint64(0, 0); - _tuple$381 = bits.Add64(x775, x772, ((x$271 = (new p521Uint1(x791.$high, x791.$low)), new $Uint64(x$271.$high, x$271.$low)))); - x792 = _tuple$381[0]; - x793 = _tuple$381[1]; - x794 = new $Uint64(0, 0); - x795 = new $Uint64(0, 0); - _tuple$382 = bits.Add64(x773, x770, ((x$272 = (new p521Uint1(x793.$high, x793.$low)), new $Uint64(x$272.$high, x$272.$low)))); - x794 = _tuple$382[0]; - x795 = _tuple$382[1]; - x796 = new $Uint64(0, 0); - x797 = new $Uint64(0, 0); - _tuple$383 = bits.Add64(x771, x768, ((x$273 = (new p521Uint1(x795.$high, x795.$low)), new $Uint64(x$273.$high, x$273.$low)))); - x796 = _tuple$383[0]; - x797 = _tuple$383[1]; - x798 = new $Uint64(0, 0); - x799 = new $Uint64(0, 0); - _tuple$384 = bits.Add64(x769, x766, ((x$274 = (new p521Uint1(x797.$high, x797.$low)), new $Uint64(x$274.$high, x$274.$low)))); - x798 = _tuple$384[0]; - x799 = _tuple$384[1]; - x800 = (x$275 = ((x$276 = (new p521Uint1(x799.$high, x799.$low)), new $Uint64(x$276.$high, x$276.$low))), new $Uint64(x$275.$high + x767.$high, x$275.$low + x767.$low)); - x801 = new $Uint64(0, 0); - x802 = new $Uint64(0, 0); - _tuple$385 = bits.Add64(x747, x782, new $Uint64(0, 0)); - x801 = _tuple$385[0]; - x802 = _tuple$385[1]; - x803 = new $Uint64(0, 0); - x804 = new $Uint64(0, 0); - _tuple$386 = bits.Add64(x749, x784, ((x$277 = (new p521Uint1(x802.$high, x802.$low)), new $Uint64(x$277.$high, x$277.$low)))); - x803 = _tuple$386[0]; - x804 = _tuple$386[1]; - x805 = new $Uint64(0, 0); - x806 = new $Uint64(0, 0); - _tuple$387 = bits.Add64(x751, x786, ((x$278 = (new p521Uint1(x804.$high, x804.$low)), new $Uint64(x$278.$high, x$278.$low)))); - x805 = _tuple$387[0]; - x806 = _tuple$387[1]; - x807 = new $Uint64(0, 0); - x808 = new $Uint64(0, 0); - _tuple$388 = bits.Add64(x753, x788, ((x$279 = (new p521Uint1(x806.$high, x806.$low)), new $Uint64(x$279.$high, x$279.$low)))); - x807 = _tuple$388[0]; - x808 = _tuple$388[1]; - x809 = new $Uint64(0, 0); - x810 = new $Uint64(0, 0); - _tuple$389 = bits.Add64(x755, x790, ((x$280 = (new p521Uint1(x808.$high, x808.$low)), new $Uint64(x$280.$high, x$280.$low)))); - x809 = _tuple$389[0]; - x810 = _tuple$389[1]; - x811 = new $Uint64(0, 0); - x812 = new $Uint64(0, 0); - _tuple$390 = bits.Add64(x757, x792, ((x$281 = (new p521Uint1(x810.$high, x810.$low)), new $Uint64(x$281.$high, x$281.$low)))); - x811 = _tuple$390[0]; - x812 = _tuple$390[1]; - x813 = new $Uint64(0, 0); - x814 = new $Uint64(0, 0); - _tuple$391 = bits.Add64(x759, x794, ((x$282 = (new p521Uint1(x812.$high, x812.$low)), new $Uint64(x$282.$high, x$282.$low)))); - x813 = _tuple$391[0]; - x814 = _tuple$391[1]; - x815 = new $Uint64(0, 0); - x816 = new $Uint64(0, 0); - _tuple$392 = bits.Add64(x761, x796, ((x$283 = (new p521Uint1(x814.$high, x814.$low)), new $Uint64(x$283.$high, x$283.$low)))); - x815 = _tuple$392[0]; - x816 = _tuple$392[1]; - x817 = new $Uint64(0, 0); - x818 = new $Uint64(0, 0); - _tuple$393 = bits.Add64(x763, x798, ((x$284 = (new p521Uint1(x816.$high, x816.$low)), new $Uint64(x$284.$high, x$284.$low)))); - x817 = _tuple$393[0]; - x818 = _tuple$393[1]; - x819 = new $Uint64(0, 0); - x820 = new $Uint64(0, 0); - _tuple$394 = bits.Add64(x765, x800, ((x$285 = (new p521Uint1(x818.$high, x818.$low)), new $Uint64(x$285.$high, x$285.$low)))); - x819 = _tuple$394[0]; - x820 = _tuple$394[1]; - x821 = new $Uint64(0, 0); - x822 = new $Uint64(0, 0); - _tuple$395 = bits.Mul64(x801, new $Uint64(0, 511)); - x822 = _tuple$395[0]; - x821 = _tuple$395[1]; - x823 = new $Uint64(0, 0); - x824 = new $Uint64(0, 0); - _tuple$396 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x824 = _tuple$396[0]; - x823 = _tuple$396[1]; - x825 = new $Uint64(0, 0); - x826 = new $Uint64(0, 0); - _tuple$397 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x826 = _tuple$397[0]; - x825 = _tuple$397[1]; - x827 = new $Uint64(0, 0); - x828 = new $Uint64(0, 0); - _tuple$398 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x828 = _tuple$398[0]; - x827 = _tuple$398[1]; - x829 = new $Uint64(0, 0); - x830 = new $Uint64(0, 0); - _tuple$399 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x830 = _tuple$399[0]; - x829 = _tuple$399[1]; - x831 = new $Uint64(0, 0); - x832 = new $Uint64(0, 0); - _tuple$400 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x832 = _tuple$400[0]; - x831 = _tuple$400[1]; - x833 = new $Uint64(0, 0); - x834 = new $Uint64(0, 0); - _tuple$401 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x834 = _tuple$401[0]; - x833 = _tuple$401[1]; - x835 = new $Uint64(0, 0); - x836 = new $Uint64(0, 0); - _tuple$402 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x836 = _tuple$402[0]; - x835 = _tuple$402[1]; - x837 = new $Uint64(0, 0); - x838 = new $Uint64(0, 0); - _tuple$403 = bits.Mul64(x801, new $Uint64(4294967295, 4294967295)); - x838 = _tuple$403[0]; - x837 = _tuple$403[1]; - x839 = new $Uint64(0, 0); - x840 = new $Uint64(0, 0); - _tuple$404 = bits.Add64(x838, x835, new $Uint64(0, 0)); - x839 = _tuple$404[0]; - x840 = _tuple$404[1]; - x841 = new $Uint64(0, 0); - x842 = new $Uint64(0, 0); - _tuple$405 = bits.Add64(x836, x833, ((x$286 = (new p521Uint1(x840.$high, x840.$low)), new $Uint64(x$286.$high, x$286.$low)))); - x841 = _tuple$405[0]; - x842 = _tuple$405[1]; - x843 = new $Uint64(0, 0); - x844 = new $Uint64(0, 0); - _tuple$406 = bits.Add64(x834, x831, ((x$287 = (new p521Uint1(x842.$high, x842.$low)), new $Uint64(x$287.$high, x$287.$low)))); - x843 = _tuple$406[0]; - x844 = _tuple$406[1]; - x845 = new $Uint64(0, 0); - x846 = new $Uint64(0, 0); - _tuple$407 = bits.Add64(x832, x829, ((x$288 = (new p521Uint1(x844.$high, x844.$low)), new $Uint64(x$288.$high, x$288.$low)))); - x845 = _tuple$407[0]; - x846 = _tuple$407[1]; - x847 = new $Uint64(0, 0); - x848 = new $Uint64(0, 0); - _tuple$408 = bits.Add64(x830, x827, ((x$289 = (new p521Uint1(x846.$high, x846.$low)), new $Uint64(x$289.$high, x$289.$low)))); - x847 = _tuple$408[0]; - x848 = _tuple$408[1]; - x849 = new $Uint64(0, 0); - x850 = new $Uint64(0, 0); - _tuple$409 = bits.Add64(x828, x825, ((x$290 = (new p521Uint1(x848.$high, x848.$low)), new $Uint64(x$290.$high, x$290.$low)))); - x849 = _tuple$409[0]; - x850 = _tuple$409[1]; - x851 = new $Uint64(0, 0); - x852 = new $Uint64(0, 0); - _tuple$410 = bits.Add64(x826, x823, ((x$291 = (new p521Uint1(x850.$high, x850.$low)), new $Uint64(x$291.$high, x$291.$low)))); - x851 = _tuple$410[0]; - x852 = _tuple$410[1]; - x853 = new $Uint64(0, 0); - x854 = new $Uint64(0, 0); - _tuple$411 = bits.Add64(x824, x821, ((x$292 = (new p521Uint1(x852.$high, x852.$low)), new $Uint64(x$292.$high, x$292.$low)))); - x853 = _tuple$411[0]; - x854 = _tuple$411[1]; - x855 = (x$293 = ((x$294 = (new p521Uint1(x854.$high, x854.$low)), new $Uint64(x$294.$high, x$294.$low))), new $Uint64(x$293.$high + x822.$high, x$293.$low + x822.$low)); - x857 = new $Uint64(0, 0); - _tuple$412 = bits.Add64(x801, x837, new $Uint64(0, 0)); - x857 = _tuple$412[1]; - x858 = new $Uint64(0, 0); - x859 = new $Uint64(0, 0); - _tuple$413 = bits.Add64(x803, x839, ((x$295 = (new p521Uint1(x857.$high, x857.$low)), new $Uint64(x$295.$high, x$295.$low)))); - x858 = _tuple$413[0]; - x859 = _tuple$413[1]; - x860 = new $Uint64(0, 0); - x861 = new $Uint64(0, 0); - _tuple$414 = bits.Add64(x805, x841, ((x$296 = (new p521Uint1(x859.$high, x859.$low)), new $Uint64(x$296.$high, x$296.$low)))); - x860 = _tuple$414[0]; - x861 = _tuple$414[1]; - x862 = new $Uint64(0, 0); - x863 = new $Uint64(0, 0); - _tuple$415 = bits.Add64(x807, x843, ((x$297 = (new p521Uint1(x861.$high, x861.$low)), new $Uint64(x$297.$high, x$297.$low)))); - x862 = _tuple$415[0]; - x863 = _tuple$415[1]; - x864 = new $Uint64(0, 0); - x865 = new $Uint64(0, 0); - _tuple$416 = bits.Add64(x809, x845, ((x$298 = (new p521Uint1(x863.$high, x863.$low)), new $Uint64(x$298.$high, x$298.$low)))); - x864 = _tuple$416[0]; - x865 = _tuple$416[1]; - x866 = new $Uint64(0, 0); - x867 = new $Uint64(0, 0); - _tuple$417 = bits.Add64(x811, x847, ((x$299 = (new p521Uint1(x865.$high, x865.$low)), new $Uint64(x$299.$high, x$299.$low)))); - x866 = _tuple$417[0]; - x867 = _tuple$417[1]; - x868 = new $Uint64(0, 0); - x869 = new $Uint64(0, 0); - _tuple$418 = bits.Add64(x813, x849, ((x$300 = (new p521Uint1(x867.$high, x867.$low)), new $Uint64(x$300.$high, x$300.$low)))); - x868 = _tuple$418[0]; - x869 = _tuple$418[1]; - x870 = new $Uint64(0, 0); - x871 = new $Uint64(0, 0); - _tuple$419 = bits.Add64(x815, x851, ((x$301 = (new p521Uint1(x869.$high, x869.$low)), new $Uint64(x$301.$high, x$301.$low)))); - x870 = _tuple$419[0]; - x871 = _tuple$419[1]; - x872 = new $Uint64(0, 0); - x873 = new $Uint64(0, 0); - _tuple$420 = bits.Add64(x817, x853, ((x$302 = (new p521Uint1(x871.$high, x871.$low)), new $Uint64(x$302.$high, x$302.$low)))); - x872 = _tuple$420[0]; - x873 = _tuple$420[1]; - x874 = new $Uint64(0, 0); - x875 = new $Uint64(0, 0); - _tuple$421 = bits.Add64(x819, x855, ((x$303 = (new p521Uint1(x873.$high, x873.$low)), new $Uint64(x$303.$high, x$303.$low)))); - x874 = _tuple$421[0]; - x875 = _tuple$421[1]; - x876 = (x$304 = ((x$305 = (new p521Uint1(x875.$high, x875.$low)), new $Uint64(x$305.$high, x$305.$low))), x$306 = ((x$307 = (new p521Uint1(x820.$high, x820.$low)), new $Uint64(x$307.$high, x$307.$low))), new $Uint64(x$304.$high + x$306.$high, x$304.$low + x$306.$low)); - x877 = new $Uint64(0, 0); - x878 = new $Uint64(0, 0); - _tuple$422 = bits.Mul64(x8, arg1[8]); - x878 = _tuple$422[0]; - x877 = _tuple$422[1]; - x879 = new $Uint64(0, 0); - x880 = new $Uint64(0, 0); - _tuple$423 = bits.Mul64(x8, arg1[7]); - x880 = _tuple$423[0]; - x879 = _tuple$423[1]; - x881 = new $Uint64(0, 0); - x882 = new $Uint64(0, 0); - _tuple$424 = bits.Mul64(x8, arg1[6]); - x882 = _tuple$424[0]; - x881 = _tuple$424[1]; - x883 = new $Uint64(0, 0); - x884 = new $Uint64(0, 0); - _tuple$425 = bits.Mul64(x8, arg1[5]); - x884 = _tuple$425[0]; - x883 = _tuple$425[1]; - x885 = new $Uint64(0, 0); - x886 = new $Uint64(0, 0); - _tuple$426 = bits.Mul64(x8, arg1[4]); - x886 = _tuple$426[0]; - x885 = _tuple$426[1]; - x887 = new $Uint64(0, 0); - x888 = new $Uint64(0, 0); - _tuple$427 = bits.Mul64(x8, arg1[3]); - x888 = _tuple$427[0]; - x887 = _tuple$427[1]; - x889 = new $Uint64(0, 0); - x890 = new $Uint64(0, 0); - _tuple$428 = bits.Mul64(x8, arg1[2]); - x890 = _tuple$428[0]; - x889 = _tuple$428[1]; - x891 = new $Uint64(0, 0); - x892 = new $Uint64(0, 0); - _tuple$429 = bits.Mul64(x8, arg1[1]); - x892 = _tuple$429[0]; - x891 = _tuple$429[1]; - x893 = new $Uint64(0, 0); - x894 = new $Uint64(0, 0); - _tuple$430 = bits.Mul64(x8, arg1[0]); - x894 = _tuple$430[0]; - x893 = _tuple$430[1]; - x895 = new $Uint64(0, 0); - x896 = new $Uint64(0, 0); - _tuple$431 = bits.Add64(x894, x891, new $Uint64(0, 0)); - x895 = _tuple$431[0]; - x896 = _tuple$431[1]; - x897 = new $Uint64(0, 0); - x898 = new $Uint64(0, 0); - _tuple$432 = bits.Add64(x892, x889, ((x$308 = (new p521Uint1(x896.$high, x896.$low)), new $Uint64(x$308.$high, x$308.$low)))); - x897 = _tuple$432[0]; - x898 = _tuple$432[1]; - x899 = new $Uint64(0, 0); - x900 = new $Uint64(0, 0); - _tuple$433 = bits.Add64(x890, x887, ((x$309 = (new p521Uint1(x898.$high, x898.$low)), new $Uint64(x$309.$high, x$309.$low)))); - x899 = _tuple$433[0]; - x900 = _tuple$433[1]; - x901 = new $Uint64(0, 0); - x902 = new $Uint64(0, 0); - _tuple$434 = bits.Add64(x888, x885, ((x$310 = (new p521Uint1(x900.$high, x900.$low)), new $Uint64(x$310.$high, x$310.$low)))); - x901 = _tuple$434[0]; - x902 = _tuple$434[1]; - x903 = new $Uint64(0, 0); - x904 = new $Uint64(0, 0); - _tuple$435 = bits.Add64(x886, x883, ((x$311 = (new p521Uint1(x902.$high, x902.$low)), new $Uint64(x$311.$high, x$311.$low)))); - x903 = _tuple$435[0]; - x904 = _tuple$435[1]; - x905 = new $Uint64(0, 0); - x906 = new $Uint64(0, 0); - _tuple$436 = bits.Add64(x884, x881, ((x$312 = (new p521Uint1(x904.$high, x904.$low)), new $Uint64(x$312.$high, x$312.$low)))); - x905 = _tuple$436[0]; - x906 = _tuple$436[1]; - x907 = new $Uint64(0, 0); - x908 = new $Uint64(0, 0); - _tuple$437 = bits.Add64(x882, x879, ((x$313 = (new p521Uint1(x906.$high, x906.$low)), new $Uint64(x$313.$high, x$313.$low)))); - x907 = _tuple$437[0]; - x908 = _tuple$437[1]; - x909 = new $Uint64(0, 0); - x910 = new $Uint64(0, 0); - _tuple$438 = bits.Add64(x880, x877, ((x$314 = (new p521Uint1(x908.$high, x908.$low)), new $Uint64(x$314.$high, x$314.$low)))); - x909 = _tuple$438[0]; - x910 = _tuple$438[1]; - x911 = (x$315 = ((x$316 = (new p521Uint1(x910.$high, x910.$low)), new $Uint64(x$316.$high, x$316.$low))), new $Uint64(x$315.$high + x878.$high, x$315.$low + x878.$low)); - x912 = new $Uint64(0, 0); - x913 = new $Uint64(0, 0); - _tuple$439 = bits.Add64(x858, x893, new $Uint64(0, 0)); - x912 = _tuple$439[0]; - x913 = _tuple$439[1]; - x914 = new $Uint64(0, 0); - x915 = new $Uint64(0, 0); - _tuple$440 = bits.Add64(x860, x895, ((x$317 = (new p521Uint1(x913.$high, x913.$low)), new $Uint64(x$317.$high, x$317.$low)))); - x914 = _tuple$440[0]; - x915 = _tuple$440[1]; - x916 = new $Uint64(0, 0); - x917 = new $Uint64(0, 0); - _tuple$441 = bits.Add64(x862, x897, ((x$318 = (new p521Uint1(x915.$high, x915.$low)), new $Uint64(x$318.$high, x$318.$low)))); - x916 = _tuple$441[0]; - x917 = _tuple$441[1]; - x918 = new $Uint64(0, 0); - x919 = new $Uint64(0, 0); - _tuple$442 = bits.Add64(x864, x899, ((x$319 = (new p521Uint1(x917.$high, x917.$low)), new $Uint64(x$319.$high, x$319.$low)))); - x918 = _tuple$442[0]; - x919 = _tuple$442[1]; - x920 = new $Uint64(0, 0); - x921 = new $Uint64(0, 0); - _tuple$443 = bits.Add64(x866, x901, ((x$320 = (new p521Uint1(x919.$high, x919.$low)), new $Uint64(x$320.$high, x$320.$low)))); - x920 = _tuple$443[0]; - x921 = _tuple$443[1]; - x922 = new $Uint64(0, 0); - x923 = new $Uint64(0, 0); - _tuple$444 = bits.Add64(x868, x903, ((x$321 = (new p521Uint1(x921.$high, x921.$low)), new $Uint64(x$321.$high, x$321.$low)))); - x922 = _tuple$444[0]; - x923 = _tuple$444[1]; - x924 = new $Uint64(0, 0); - x925 = new $Uint64(0, 0); - _tuple$445 = bits.Add64(x870, x905, ((x$322 = (new p521Uint1(x923.$high, x923.$low)), new $Uint64(x$322.$high, x$322.$low)))); - x924 = _tuple$445[0]; - x925 = _tuple$445[1]; - x926 = new $Uint64(0, 0); - x927 = new $Uint64(0, 0); - _tuple$446 = bits.Add64(x872, x907, ((x$323 = (new p521Uint1(x925.$high, x925.$low)), new $Uint64(x$323.$high, x$323.$low)))); - x926 = _tuple$446[0]; - x927 = _tuple$446[1]; - x928 = new $Uint64(0, 0); - x929 = new $Uint64(0, 0); - _tuple$447 = bits.Add64(x874, x909, ((x$324 = (new p521Uint1(x927.$high, x927.$low)), new $Uint64(x$324.$high, x$324.$low)))); - x928 = _tuple$447[0]; - x929 = _tuple$447[1]; - x930 = new $Uint64(0, 0); - x931 = new $Uint64(0, 0); - _tuple$448 = bits.Add64(x876, x911, ((x$325 = (new p521Uint1(x929.$high, x929.$low)), new $Uint64(x$325.$high, x$325.$low)))); - x930 = _tuple$448[0]; - x931 = _tuple$448[1]; - x932 = new $Uint64(0, 0); - x933 = new $Uint64(0, 0); - _tuple$449 = bits.Mul64(x912, new $Uint64(0, 511)); - x933 = _tuple$449[0]; - x932 = _tuple$449[1]; - x934 = new $Uint64(0, 0); - x935 = new $Uint64(0, 0); - _tuple$450 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x935 = _tuple$450[0]; - x934 = _tuple$450[1]; - x936 = new $Uint64(0, 0); - x937 = new $Uint64(0, 0); - _tuple$451 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x937 = _tuple$451[0]; - x936 = _tuple$451[1]; - x938 = new $Uint64(0, 0); - x939 = new $Uint64(0, 0); - _tuple$452 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x939 = _tuple$452[0]; - x938 = _tuple$452[1]; - x940 = new $Uint64(0, 0); - x941 = new $Uint64(0, 0); - _tuple$453 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x941 = _tuple$453[0]; - x940 = _tuple$453[1]; - x942 = new $Uint64(0, 0); - x943 = new $Uint64(0, 0); - _tuple$454 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x943 = _tuple$454[0]; - x942 = _tuple$454[1]; - x944 = new $Uint64(0, 0); - x945 = new $Uint64(0, 0); - _tuple$455 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x945 = _tuple$455[0]; - x944 = _tuple$455[1]; - x946 = new $Uint64(0, 0); - x947 = new $Uint64(0, 0); - _tuple$456 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x947 = _tuple$456[0]; - x946 = _tuple$456[1]; - x948 = new $Uint64(0, 0); - x949 = new $Uint64(0, 0); - _tuple$457 = bits.Mul64(x912, new $Uint64(4294967295, 4294967295)); - x949 = _tuple$457[0]; - x948 = _tuple$457[1]; - x950 = new $Uint64(0, 0); - x951 = new $Uint64(0, 0); - _tuple$458 = bits.Add64(x949, x946, new $Uint64(0, 0)); - x950 = _tuple$458[0]; - x951 = _tuple$458[1]; - x952 = new $Uint64(0, 0); - x953 = new $Uint64(0, 0); - _tuple$459 = bits.Add64(x947, x944, ((x$326 = (new p521Uint1(x951.$high, x951.$low)), new $Uint64(x$326.$high, x$326.$low)))); - x952 = _tuple$459[0]; - x953 = _tuple$459[1]; - x954 = new $Uint64(0, 0); - x955 = new $Uint64(0, 0); - _tuple$460 = bits.Add64(x945, x942, ((x$327 = (new p521Uint1(x953.$high, x953.$low)), new $Uint64(x$327.$high, x$327.$low)))); - x954 = _tuple$460[0]; - x955 = _tuple$460[1]; - x956 = new $Uint64(0, 0); - x957 = new $Uint64(0, 0); - _tuple$461 = bits.Add64(x943, x940, ((x$328 = (new p521Uint1(x955.$high, x955.$low)), new $Uint64(x$328.$high, x$328.$low)))); - x956 = _tuple$461[0]; - x957 = _tuple$461[1]; - x958 = new $Uint64(0, 0); - x959 = new $Uint64(0, 0); - _tuple$462 = bits.Add64(x941, x938, ((x$329 = (new p521Uint1(x957.$high, x957.$low)), new $Uint64(x$329.$high, x$329.$low)))); - x958 = _tuple$462[0]; - x959 = _tuple$462[1]; - x960 = new $Uint64(0, 0); - x961 = new $Uint64(0, 0); - _tuple$463 = bits.Add64(x939, x936, ((x$330 = (new p521Uint1(x959.$high, x959.$low)), new $Uint64(x$330.$high, x$330.$low)))); - x960 = _tuple$463[0]; - x961 = _tuple$463[1]; - x962 = new $Uint64(0, 0); - x963 = new $Uint64(0, 0); - _tuple$464 = bits.Add64(x937, x934, ((x$331 = (new p521Uint1(x961.$high, x961.$low)), new $Uint64(x$331.$high, x$331.$low)))); - x962 = _tuple$464[0]; - x963 = _tuple$464[1]; - x964 = new $Uint64(0, 0); - x965 = new $Uint64(0, 0); - _tuple$465 = bits.Add64(x935, x932, ((x$332 = (new p521Uint1(x963.$high, x963.$low)), new $Uint64(x$332.$high, x$332.$low)))); - x964 = _tuple$465[0]; - x965 = _tuple$465[1]; - x966 = (x$333 = ((x$334 = (new p521Uint1(x965.$high, x965.$low)), new $Uint64(x$334.$high, x$334.$low))), new $Uint64(x$333.$high + x933.$high, x$333.$low + x933.$low)); - x968 = new $Uint64(0, 0); - _tuple$466 = bits.Add64(x912, x948, new $Uint64(0, 0)); - x968 = _tuple$466[1]; - x969 = new $Uint64(0, 0); - x970 = new $Uint64(0, 0); - _tuple$467 = bits.Add64(x914, x950, ((x$335 = (new p521Uint1(x968.$high, x968.$low)), new $Uint64(x$335.$high, x$335.$low)))); - x969 = _tuple$467[0]; - x970 = _tuple$467[1]; - x971 = new $Uint64(0, 0); - x972 = new $Uint64(0, 0); - _tuple$468 = bits.Add64(x916, x952, ((x$336 = (new p521Uint1(x970.$high, x970.$low)), new $Uint64(x$336.$high, x$336.$low)))); - x971 = _tuple$468[0]; - x972 = _tuple$468[1]; - x973 = new $Uint64(0, 0); - x974 = new $Uint64(0, 0); - _tuple$469 = bits.Add64(x918, x954, ((x$337 = (new p521Uint1(x972.$high, x972.$low)), new $Uint64(x$337.$high, x$337.$low)))); - x973 = _tuple$469[0]; - x974 = _tuple$469[1]; - x975 = new $Uint64(0, 0); - x976 = new $Uint64(0, 0); - _tuple$470 = bits.Add64(x920, x956, ((x$338 = (new p521Uint1(x974.$high, x974.$low)), new $Uint64(x$338.$high, x$338.$low)))); - x975 = _tuple$470[0]; - x976 = _tuple$470[1]; - x977 = new $Uint64(0, 0); - x978 = new $Uint64(0, 0); - _tuple$471 = bits.Add64(x922, x958, ((x$339 = (new p521Uint1(x976.$high, x976.$low)), new $Uint64(x$339.$high, x$339.$low)))); - x977 = _tuple$471[0]; - x978 = _tuple$471[1]; - x979 = new $Uint64(0, 0); - x980 = new $Uint64(0, 0); - _tuple$472 = bits.Add64(x924, x960, ((x$340 = (new p521Uint1(x978.$high, x978.$low)), new $Uint64(x$340.$high, x$340.$low)))); - x979 = _tuple$472[0]; - x980 = _tuple$472[1]; - x981 = new $Uint64(0, 0); - x982 = new $Uint64(0, 0); - _tuple$473 = bits.Add64(x926, x962, ((x$341 = (new p521Uint1(x980.$high, x980.$low)), new $Uint64(x$341.$high, x$341.$low)))); - x981 = _tuple$473[0]; - x982 = _tuple$473[1]; - x983 = new $Uint64(0, 0); - x984 = new $Uint64(0, 0); - _tuple$474 = bits.Add64(x928, x964, ((x$342 = (new p521Uint1(x982.$high, x982.$low)), new $Uint64(x$342.$high, x$342.$low)))); - x983 = _tuple$474[0]; - x984 = _tuple$474[1]; - x985 = new $Uint64(0, 0); - x986 = new $Uint64(0, 0); - _tuple$475 = bits.Add64(x930, x966, ((x$343 = (new p521Uint1(x984.$high, x984.$low)), new $Uint64(x$343.$high, x$343.$low)))); - x985 = _tuple$475[0]; - x986 = _tuple$475[1]; - x987 = (x$344 = ((x$345 = (new p521Uint1(x986.$high, x986.$low)), new $Uint64(x$345.$high, x$345.$low))), x$346 = ((x$347 = (new p521Uint1(x931.$high, x931.$low)), new $Uint64(x$347.$high, x$347.$low))), new $Uint64(x$344.$high + x$346.$high, x$344.$low + x$346.$low)); - x988 = new $Uint64(0, 0); - x989 = new $Uint64(0, 0); - _tuple$476 = bits.Sub64(x969, new $Uint64(4294967295, 4294967295), new $Uint64(0, 0)); - x988 = _tuple$476[0]; - x989 = _tuple$476[1]; - x990 = new $Uint64(0, 0); - x991 = new $Uint64(0, 0); - _tuple$477 = bits.Sub64(x971, new $Uint64(4294967295, 4294967295), ((x$348 = (new p521Uint1(x989.$high, x989.$low)), new $Uint64(x$348.$high, x$348.$low)))); - x990 = _tuple$477[0]; - x991 = _tuple$477[1]; - x992 = new $Uint64(0, 0); - x993 = new $Uint64(0, 0); - _tuple$478 = bits.Sub64(x973, new $Uint64(4294967295, 4294967295), ((x$349 = (new p521Uint1(x991.$high, x991.$low)), new $Uint64(x$349.$high, x$349.$low)))); - x992 = _tuple$478[0]; - x993 = _tuple$478[1]; - x994 = new $Uint64(0, 0); - x995 = new $Uint64(0, 0); - _tuple$479 = bits.Sub64(x975, new $Uint64(4294967295, 4294967295), ((x$350 = (new p521Uint1(x993.$high, x993.$low)), new $Uint64(x$350.$high, x$350.$low)))); - x994 = _tuple$479[0]; - x995 = _tuple$479[1]; - x996 = new $Uint64(0, 0); - x997 = new $Uint64(0, 0); - _tuple$480 = bits.Sub64(x977, new $Uint64(4294967295, 4294967295), ((x$351 = (new p521Uint1(x995.$high, x995.$low)), new $Uint64(x$351.$high, x$351.$low)))); - x996 = _tuple$480[0]; - x997 = _tuple$480[1]; - x998 = new $Uint64(0, 0); - x999 = new $Uint64(0, 0); - _tuple$481 = bits.Sub64(x979, new $Uint64(4294967295, 4294967295), ((x$352 = (new p521Uint1(x997.$high, x997.$low)), new $Uint64(x$352.$high, x$352.$low)))); - x998 = _tuple$481[0]; - x999 = _tuple$481[1]; - x1000 = new $Uint64(0, 0); - x1001 = new $Uint64(0, 0); - _tuple$482 = bits.Sub64(x981, new $Uint64(4294967295, 4294967295), ((x$353 = (new p521Uint1(x999.$high, x999.$low)), new $Uint64(x$353.$high, x$353.$low)))); - x1000 = _tuple$482[0]; - x1001 = _tuple$482[1]; - x1002 = new $Uint64(0, 0); - x1003 = new $Uint64(0, 0); - _tuple$483 = bits.Sub64(x983, new $Uint64(4294967295, 4294967295), ((x$354 = (new p521Uint1(x1001.$high, x1001.$low)), new $Uint64(x$354.$high, x$354.$low)))); - x1002 = _tuple$483[0]; - x1003 = _tuple$483[1]; - x1004 = new $Uint64(0, 0); - x1005 = new $Uint64(0, 0); - _tuple$484 = bits.Sub64(x985, new $Uint64(0, 511), ((x$355 = (new p521Uint1(x1003.$high, x1003.$low)), new $Uint64(x$355.$high, x$355.$low)))); - x1004 = _tuple$484[0]; - x1005 = _tuple$484[1]; - x1007 = new $Uint64(0, 0); - _tuple$485 = bits.Sub64(x987, new $Uint64(0, 0), ((x$356 = (new p521Uint1(x1005.$high, x1005.$low)), new $Uint64(x$356.$high, x$356.$low)))); - x1007 = _tuple$485[1]; - x1008 = new $Uint64(0, 0); - p521CmovznzU64((x1008$24ptr || (x1008$24ptr = new ptrType(function() { return x1008; }, function($v) { x1008 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x988, x969); - x1009 = new $Uint64(0, 0); - p521CmovznzU64((x1009$24ptr || (x1009$24ptr = new ptrType(function() { return x1009; }, function($v) { x1009 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x990, x971); - x1010 = new $Uint64(0, 0); - p521CmovznzU64((x1010$24ptr || (x1010$24ptr = new ptrType(function() { return x1010; }, function($v) { x1010 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x992, x973); - x1011 = new $Uint64(0, 0); - p521CmovznzU64((x1011$24ptr || (x1011$24ptr = new ptrType(function() { return x1011; }, function($v) { x1011 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x994, x975); - x1012 = new $Uint64(0, 0); - p521CmovznzU64((x1012$24ptr || (x1012$24ptr = new ptrType(function() { return x1012; }, function($v) { x1012 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x996, x977); - x1013 = new $Uint64(0, 0); - p521CmovznzU64((x1013$24ptr || (x1013$24ptr = new ptrType(function() { return x1013; }, function($v) { x1013 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x998, x979); - x1014 = new $Uint64(0, 0); - p521CmovznzU64((x1014$24ptr || (x1014$24ptr = new ptrType(function() { return x1014; }, function($v) { x1014 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x1000, x981); - x1015 = new $Uint64(0, 0); - p521CmovznzU64((x1015$24ptr || (x1015$24ptr = new ptrType(function() { return x1015; }, function($v) { x1015 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x1002, x983); - x1016 = new $Uint64(0, 0); - p521CmovznzU64((x1016$24ptr || (x1016$24ptr = new ptrType(function() { return x1016; }, function($v) { x1016 = $v; }))), (new p521Uint1(x1007.$high, x1007.$low)), x1004, x985); - out1.nilCheck, out1[0] = x1008; - out1.nilCheck, out1[1] = x1009; - out1.nilCheck, out1[2] = x1010; - out1.nilCheck, out1[3] = x1011; - out1.nilCheck, out1[4] = x1012; - out1.nilCheck, out1[5] = x1013; - out1.nilCheck, out1[6] = x1014; - out1.nilCheck, out1[7] = x1015; - out1.nilCheck, out1[8] = x1016; - }; - p521Add = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, arg1, arg2, out1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x38, x39, x39$24ptr, x4, x40, x40$24ptr, x41, x41$24ptr, x42, x42$24ptr, x43, x43$24ptr, x44, x44$24ptr, x45, x45$24ptr, x46, x46$24ptr, x47, x47$24ptr, x5, x6, x7, x8, x9; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Add64(arg1[0], arg2[0], new $Uint64(0, 0)); - x1 = _tuple[0]; - x2 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Add64(arg1[1], arg2[1], ((x = (new p521Uint1(x2.$high, x2.$low)), new $Uint64(x.$high, x.$low)))); - x3 = _tuple$1[0]; - x4 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Add64(arg1[2], arg2[2], ((x$1 = (new p521Uint1(x4.$high, x4.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Add64(arg1[3], arg2[3], ((x$2 = (new p521Uint1(x6.$high, x6.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x7 = _tuple$3[0]; - x8 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(arg1[4], arg2[4], ((x$3 = (new p521Uint1(x8.$high, x8.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x9 = _tuple$4[0]; - x10 = _tuple$4[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(arg1[5], arg2[5], ((x$4 = (new p521Uint1(x10.$high, x10.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x11 = _tuple$5[0]; - x12 = _tuple$5[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(arg1[6], arg2[6], ((x$5 = (new p521Uint1(x12.$high, x12.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x13 = _tuple$6[0]; - x14 = _tuple$6[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(arg1[7], arg2[7], ((x$6 = (new p521Uint1(x14.$high, x14.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x15 = _tuple$7[0]; - x16 = _tuple$7[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$8 = bits.Add64(arg1[8], arg2[8], ((x$7 = (new p521Uint1(x16.$high, x16.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x17 = _tuple$8[0]; - x18 = _tuple$8[1]; - x19 = new $Uint64(0, 0); - x20 = new $Uint64(0, 0); - _tuple$9 = bits.Sub64(x1, new $Uint64(4294967295, 4294967295), new $Uint64(0, 0)); - x19 = _tuple$9[0]; - x20 = _tuple$9[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$10 = bits.Sub64(x3, new $Uint64(4294967295, 4294967295), ((x$8 = (new p521Uint1(x20.$high, x20.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x21 = _tuple$10[0]; - x22 = _tuple$10[1]; - x23 = new $Uint64(0, 0); - x24 = new $Uint64(0, 0); - _tuple$11 = bits.Sub64(x5, new $Uint64(4294967295, 4294967295), ((x$9 = (new p521Uint1(x22.$high, x22.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x23 = _tuple$11[0]; - x24 = _tuple$11[1]; - x25 = new $Uint64(0, 0); - x26 = new $Uint64(0, 0); - _tuple$12 = bits.Sub64(x7, new $Uint64(4294967295, 4294967295), ((x$10 = (new p521Uint1(x24.$high, x24.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x25 = _tuple$12[0]; - x26 = _tuple$12[1]; - x27 = new $Uint64(0, 0); - x28 = new $Uint64(0, 0); - _tuple$13 = bits.Sub64(x9, new $Uint64(4294967295, 4294967295), ((x$11 = (new p521Uint1(x26.$high, x26.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x27 = _tuple$13[0]; - x28 = _tuple$13[1]; - x29 = new $Uint64(0, 0); - x30 = new $Uint64(0, 0); - _tuple$14 = bits.Sub64(x11, new $Uint64(4294967295, 4294967295), ((x$12 = (new p521Uint1(x28.$high, x28.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x29 = _tuple$14[0]; - x30 = _tuple$14[1]; - x31 = new $Uint64(0, 0); - x32 = new $Uint64(0, 0); - _tuple$15 = bits.Sub64(x13, new $Uint64(4294967295, 4294967295), ((x$13 = (new p521Uint1(x30.$high, x30.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x31 = _tuple$15[0]; - x32 = _tuple$15[1]; - x33 = new $Uint64(0, 0); - x34 = new $Uint64(0, 0); - _tuple$16 = bits.Sub64(x15, new $Uint64(4294967295, 4294967295), ((x$14 = (new p521Uint1(x32.$high, x32.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x33 = _tuple$16[0]; - x34 = _tuple$16[1]; - x35 = new $Uint64(0, 0); - x36 = new $Uint64(0, 0); - _tuple$17 = bits.Sub64(x17, new $Uint64(0, 511), ((x$15 = (new p521Uint1(x34.$high, x34.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x35 = _tuple$17[0]; - x36 = _tuple$17[1]; - x38 = new $Uint64(0, 0); - _tuple$18 = bits.Sub64(((x$16 = (new p521Uint1(x18.$high, x18.$low)), new $Uint64(x$16.$high, x$16.$low))), new $Uint64(0, 0), ((x$17 = (new p521Uint1(x36.$high, x36.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x38 = _tuple$18[1]; - x39 = new $Uint64(0, 0); - p521CmovznzU64((x39$24ptr || (x39$24ptr = new ptrType(function() { return x39; }, function($v) { x39 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x19, x1); - x40 = new $Uint64(0, 0); - p521CmovznzU64((x40$24ptr || (x40$24ptr = new ptrType(function() { return x40; }, function($v) { x40 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x21, x3); - x41 = new $Uint64(0, 0); - p521CmovznzU64((x41$24ptr || (x41$24ptr = new ptrType(function() { return x41; }, function($v) { x41 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x23, x5); - x42 = new $Uint64(0, 0); - p521CmovznzU64((x42$24ptr || (x42$24ptr = new ptrType(function() { return x42; }, function($v) { x42 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x25, x7); - x43 = new $Uint64(0, 0); - p521CmovznzU64((x43$24ptr || (x43$24ptr = new ptrType(function() { return x43; }, function($v) { x43 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x27, x9); - x44 = new $Uint64(0, 0); - p521CmovznzU64((x44$24ptr || (x44$24ptr = new ptrType(function() { return x44; }, function($v) { x44 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x29, x11); - x45 = new $Uint64(0, 0); - p521CmovznzU64((x45$24ptr || (x45$24ptr = new ptrType(function() { return x45; }, function($v) { x45 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x31, x13); - x46 = new $Uint64(0, 0); - p521CmovznzU64((x46$24ptr || (x46$24ptr = new ptrType(function() { return x46; }, function($v) { x46 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x33, x15); - x47 = new $Uint64(0, 0); - p521CmovznzU64((x47$24ptr || (x47$24ptr = new ptrType(function() { return x47; }, function($v) { x47 = $v; }))), (new p521Uint1(x38.$high, x38.$low)), x35, x17); - out1.nilCheck, out1[0] = x39; - out1.nilCheck, out1[1] = x40; - out1.nilCheck, out1[2] = x41; - out1.nilCheck, out1[3] = x42; - out1.nilCheck, out1[4] = x43; - out1.nilCheck, out1[5] = x44; - out1.nilCheck, out1[6] = x45; - out1.nilCheck, out1[7] = x46; - out1.nilCheck, out1[8] = x47; - }; - p521Sub = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, arg1, arg2, out1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x19$24ptr, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x4, x5, x6, x7, x8, x9; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Sub64(arg1[0], arg2[0], new $Uint64(0, 0)); - x1 = _tuple[0]; - x2 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Sub64(arg1[1], arg2[1], ((x = (new p521Uint1(x2.$high, x2.$low)), new $Uint64(x.$high, x.$low)))); - x3 = _tuple$1[0]; - x4 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Sub64(arg1[2], arg2[2], ((x$1 = (new p521Uint1(x4.$high, x4.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Sub64(arg1[3], arg2[3], ((x$2 = (new p521Uint1(x6.$high, x6.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x7 = _tuple$3[0]; - x8 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$4 = bits.Sub64(arg1[4], arg2[4], ((x$3 = (new p521Uint1(x8.$high, x8.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x9 = _tuple$4[0]; - x10 = _tuple$4[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$5 = bits.Sub64(arg1[5], arg2[5], ((x$4 = (new p521Uint1(x10.$high, x10.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x11 = _tuple$5[0]; - x12 = _tuple$5[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$6 = bits.Sub64(arg1[6], arg2[6], ((x$5 = (new p521Uint1(x12.$high, x12.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x13 = _tuple$6[0]; - x14 = _tuple$6[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$7 = bits.Sub64(arg1[7], arg2[7], ((x$6 = (new p521Uint1(x14.$high, x14.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x15 = _tuple$7[0]; - x16 = _tuple$7[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$8 = bits.Sub64(arg1[8], arg2[8], ((x$7 = (new p521Uint1(x16.$high, x16.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x17 = _tuple$8[0]; - x18 = _tuple$8[1]; - x19 = new $Uint64(0, 0); - p521CmovznzU64((x19$24ptr || (x19$24ptr = new ptrType(function() { return x19; }, function($v) { x19 = $v; }))), (new p521Uint1(x18.$high, x18.$low)), new $Uint64(0, 0), new $Uint64(4294967295, 4294967295)); - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x1, x19, new $Uint64(0, 0)); - x20 = _tuple$9[0]; - x21 = _tuple$9[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x3, x19, ((x$8 = (new p521Uint1(x21.$high, x21.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x22 = _tuple$10[0]; - x23 = _tuple$10[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x5, x19, ((x$9 = (new p521Uint1(x23.$high, x23.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x24 = _tuple$11[0]; - x25 = _tuple$11[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x7, x19, ((x$10 = (new p521Uint1(x25.$high, x25.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x26 = _tuple$12[0]; - x27 = _tuple$12[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x9, x19, ((x$11 = (new p521Uint1(x27.$high, x27.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x28 = _tuple$13[0]; - x29 = _tuple$13[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x11, x19, ((x$12 = (new p521Uint1(x29.$high, x29.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x30 = _tuple$14[0]; - x31 = _tuple$14[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x13, x19, ((x$13 = (new p521Uint1(x31.$high, x31.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x32 = _tuple$15[0]; - x33 = _tuple$15[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x15, x19, ((x$14 = (new p521Uint1(x33.$high, x33.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x34 = _tuple$16[0]; - x35 = _tuple$16[1]; - x36 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x17, new $Uint64(x19.$high & 0, (x19.$low & 511) >>> 0), ((x$15 = (new p521Uint1(x35.$high, x35.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x36 = _tuple$17[0]; - out1.nilCheck, out1[0] = x20; - out1.nilCheck, out1[1] = x22; - out1.nilCheck, out1[2] = x24; - out1.nilCheck, out1[3] = x26; - out1.nilCheck, out1[4] = x28; - out1.nilCheck, out1[5] = x30; - out1.nilCheck, out1[6] = x32; - out1.nilCheck, out1[7] = x34; - out1.nilCheck, out1[8] = x36; - }; - p521SetOne = function(out1) { - var out1; - out1.nilCheck, out1[0] = new $Uint64(8388608, 0); - out1.nilCheck, out1[1] = new $Uint64(0, 0); - out1.nilCheck, out1[2] = new $Uint64(0, 0); - out1.nilCheck, out1[3] = new $Uint64(0, 0); - out1.nilCheck, out1[4] = new $Uint64(0, 0); - out1.nilCheck, out1[5] = new $Uint64(0, 0); - out1.nilCheck, out1[6] = new $Uint64(0, 0); - out1.nilCheck, out1[7] = new $Uint64(0, 0); - out1.nilCheck, out1[8] = new $Uint64(0, 0); - }; - p521FromMontgomery = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$199, _tuple$2, _tuple$20, _tuple$200, _tuple$201, _tuple$202, _tuple$203, _tuple$204, _tuple$205, _tuple$206, _tuple$207, _tuple$208, _tuple$209, _tuple$21, _tuple$210, _tuple$211, _tuple$212, _tuple$213, _tuple$214, _tuple$215, _tuple$216, _tuple$217, _tuple$218, _tuple$219, _tuple$22, _tuple$220, _tuple$221, _tuple$222, _tuple$223, _tuple$224, _tuple$225, _tuple$226, _tuple$227, _tuple$228, _tuple$229, _tuple$23, _tuple$230, _tuple$231, _tuple$232, _tuple$233, _tuple$234, _tuple$235, _tuple$236, _tuple$237, _tuple$238, _tuple$239, _tuple$24, _tuple$240, _tuple$241, _tuple$242, _tuple$243, _tuple$244, _tuple$245, _tuple$246, _tuple$247, _tuple$248, _tuple$249, _tuple$25, _tuple$250, _tuple$251, _tuple$252, _tuple$253, _tuple$254, _tuple$255, _tuple$256, _tuple$257, _tuple$258, _tuple$259, _tuple$26, _tuple$260, _tuple$261, _tuple$262, _tuple$263, _tuple$264, _tuple$265, _tuple$266, _tuple$267, _tuple$268, _tuple$269, _tuple$27, _tuple$270, _tuple$271, _tuple$272, _tuple$273, _tuple$274, _tuple$275, _tuple$276, _tuple$277, _tuple$278, _tuple$279, _tuple$28, _tuple$280, _tuple$281, _tuple$282, _tuple$283, _tuple$284, _tuple$285, _tuple$286, _tuple$287, _tuple$288, _tuple$289, _tuple$29, _tuple$290, _tuple$291, _tuple$292, _tuple$293, _tuple$294, _tuple$295, _tuple$296, _tuple$297, _tuple$298, _tuple$299, _tuple$3, _tuple$30, _tuple$300, _tuple$301, _tuple$302, _tuple$303, _tuple$304, _tuple$305, _tuple$306, _tuple$307, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$165, x$166, x$167, x$168, x$169, x$17, x$170, x$171, x$172, x$173, x$174, x$175, x$176, x$177, x$178, x$179, x$18, x$180, x$181, x$182, x$183, x$184, x$185, x$186, x$187, x$188, x$189, x$19, x$190, x$191, x$192, x$193, x$194, x$195, x$196, x$197, x$198, x$199, x$2, x$20, x$200, x$201, x$202, x$203, x$204, x$205, x$206, x$207, x$208, x$209, x$21, x$210, x$211, x$212, x$213, x$214, x$215, x$216, x$217, x$218, x$219, x$22, x$220, x$221, x$222, x$223, x$224, x$225, x$226, x$227, x$228, x$229, x$23, x$230, x$231, x$232, x$233, x$234, x$235, x$236, x$237, x$238, x$239, x$24, x$240, x$241, x$242, x$243, x$244, x$245, x$246, x$247, x$248, x$249, x$25, x$250, x$251, x$252, x$253, x$254, x$255, x$256, x$257, x$258, x$259, x$26, x$260, x$261, x$262, x$263, x$264, x$265, x$266, x$267, x$268, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x101, x102, x103, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x173, x174, x175, x176, x177, x178, x179, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x208, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x241, x242, x243, x244, x245, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x261, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x285, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x301, x302, x303, x304, x305, x306, x307, x309, x31, x310, x311, x312, x313, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x338, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x354, x355, x356, x357, x358, x359, x360, x361, x362, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x377, x378, x379, x38, x380, x381, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x403, x404, x405, x406, x407, x408, x409, x41, x410, x411, x412, x413, x414, x415, x416, x417, x418, x419, x42, x420, x421, x422, x423, x424, x425, x426, x427, x428, x429, x43, x430, x431, x432, x433, x434, x435, x436, x437, x438, x439, x44, x440, x441, x442, x443, x445, x446, x447, x448, x449, x45, x450, x451, x452, x453, x454, x455, x456, x457, x458, x459, x46, x460, x461, x462, x463, x464, x465, x466, x467, x468, x469, x47, x470, x471, x472, x473, x474, x475, x476, x477, x478, x479, x48, x480, x481, x482, x483, x484, x485, x486, x487, x488, x489, x49, x490, x491, x492, x493, x494, x495, x496, x497, x498, x499, x5, x50, x500, x501, x502, x503, x504, x505, x506, x507, x508, x509, x51, x510, x511, x513, x514, x515, x516, x517, x518, x519, x52, x520, x521, x522, x523, x524, x525, x526, x527, x528, x529, x53, x530, x531, x532, x533, x534, x535, x536, x537, x538, x539, x54, x540, x541, x542, x543, x544, x545, x546, x547, x548, x549, x55, x550, x551, x552, x553, x554, x555, x556, x557, x558, x559, x56, x560, x561, x562, x563, x564, x565, x566, x567, x568, x569, x57, x570, x571, x572, x573, x574, x575, x576, x577, x578, x579, x58, x581, x582, x583, x584, x585, x586, x587, x588, x589, x59, x590, x591, x592, x593, x594, x595, x596, x597, x598, x599, x6, x60, x600, x601, x602, x603, x604, x605, x606, x607, x608, x609, x61, x610, x611, x612, x613, x614, x615, x616, x618, x619, x619$24ptr, x62, x620, x620$24ptr, x621, x621$24ptr, x622, x622$24ptr, x623, x623$24ptr, x624, x624$24ptr, x625, x625$24ptr, x626, x626$24ptr, x627, x627$24ptr, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[0]; - x2 = new $Uint64(0, 0); - x3 = new $Uint64(0, 0); - _tuple = bits.Mul64(x1, new $Uint64(0, 511)); - x3 = _tuple[0]; - x2 = _tuple[1]; - x4 = new $Uint64(0, 0); - x5 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x5 = _tuple$1[0]; - x4 = _tuple$1[1]; - x6 = new $Uint64(0, 0); - x7 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x7 = _tuple$2[0]; - x6 = _tuple$2[1]; - x8 = new $Uint64(0, 0); - x9 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x9 = _tuple$3[0]; - x8 = _tuple$3[1]; - x10 = new $Uint64(0, 0); - x11 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x11 = _tuple$4[0]; - x10 = _tuple$4[1]; - x12 = new $Uint64(0, 0); - x13 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x13 = _tuple$5[0]; - x12 = _tuple$5[1]; - x14 = new $Uint64(0, 0); - x15 = new $Uint64(0, 0); - _tuple$6 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x15 = _tuple$6[0]; - x14 = _tuple$6[1]; - x16 = new $Uint64(0, 0); - x17 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x17 = _tuple$7[0]; - x16 = _tuple$7[1]; - x18 = new $Uint64(0, 0); - x19 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x19 = _tuple$8[0]; - x18 = _tuple$8[1]; - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x19, x16, new $Uint64(0, 0)); - x20 = _tuple$9[0]; - x21 = _tuple$9[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x17, x14, ((x = (new p521Uint1(x21.$high, x21.$low)), new $Uint64(x.$high, x.$low)))); - x22 = _tuple$10[0]; - x23 = _tuple$10[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x15, x12, ((x$1 = (new p521Uint1(x23.$high, x23.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x24 = _tuple$11[0]; - x25 = _tuple$11[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x13, x10, ((x$2 = (new p521Uint1(x25.$high, x25.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x26 = _tuple$12[0]; - x27 = _tuple$12[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x11, x8, ((x$3 = (new p521Uint1(x27.$high, x27.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x28 = _tuple$13[0]; - x29 = _tuple$13[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x9, x6, ((x$4 = (new p521Uint1(x29.$high, x29.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x30 = _tuple$14[0]; - x31 = _tuple$14[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x7, x4, ((x$5 = (new p521Uint1(x31.$high, x31.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x32 = _tuple$15[0]; - x33 = _tuple$15[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x5, x2, ((x$6 = (new p521Uint1(x33.$high, x33.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x34 = _tuple$16[0]; - x35 = _tuple$16[1]; - x37 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x1, x18, new $Uint64(0, 0)); - x37 = _tuple$17[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(new $Uint64(0, 0), x20, ((x$7 = (new p521Uint1(x37.$high, x37.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x38 = _tuple$18[0]; - x39 = _tuple$18[1]; - x40 = new $Uint64(0, 0); - x41 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(new $Uint64(0, 0), x22, ((x$8 = (new p521Uint1(x39.$high, x39.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x40 = _tuple$19[0]; - x41 = _tuple$19[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(new $Uint64(0, 0), x24, ((x$9 = (new p521Uint1(x41.$high, x41.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x42 = _tuple$20[0]; - x43 = _tuple$20[1]; - x44 = new $Uint64(0, 0); - x45 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(new $Uint64(0, 0), x26, ((x$10 = (new p521Uint1(x43.$high, x43.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x44 = _tuple$21[0]; - x45 = _tuple$21[1]; - x46 = new $Uint64(0, 0); - x47 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(new $Uint64(0, 0), x28, ((x$11 = (new p521Uint1(x45.$high, x45.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x46 = _tuple$22[0]; - x47 = _tuple$22[1]; - x48 = new $Uint64(0, 0); - x49 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(new $Uint64(0, 0), x30, ((x$12 = (new p521Uint1(x47.$high, x47.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x48 = _tuple$23[0]; - x49 = _tuple$23[1]; - x50 = new $Uint64(0, 0); - x51 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(new $Uint64(0, 0), x32, ((x$13 = (new p521Uint1(x49.$high, x49.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x50 = _tuple$24[0]; - x51 = _tuple$24[1]; - x52 = new $Uint64(0, 0); - x53 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(new $Uint64(0, 0), x34, ((x$14 = (new p521Uint1(x51.$high, x51.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x52 = _tuple$25[0]; - x53 = _tuple$25[1]; - x54 = new $Uint64(0, 0); - x55 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x38, arg1[1], new $Uint64(0, 0)); - x54 = _tuple$26[0]; - x55 = _tuple$26[1]; - x56 = new $Uint64(0, 0); - x57 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x40, new $Uint64(0, 0), ((x$15 = (new p521Uint1(x55.$high, x55.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x56 = _tuple$27[0]; - x57 = _tuple$27[1]; - x58 = new $Uint64(0, 0); - x59 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x42, new $Uint64(0, 0), ((x$16 = (new p521Uint1(x57.$high, x57.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x58 = _tuple$28[0]; - x59 = _tuple$28[1]; - x60 = new $Uint64(0, 0); - x61 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(x44, new $Uint64(0, 0), ((x$17 = (new p521Uint1(x59.$high, x59.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x60 = _tuple$29[0]; - x61 = _tuple$29[1]; - x62 = new $Uint64(0, 0); - x63 = new $Uint64(0, 0); - _tuple$30 = bits.Add64(x46, new $Uint64(0, 0), ((x$18 = (new p521Uint1(x61.$high, x61.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x62 = _tuple$30[0]; - x63 = _tuple$30[1]; - x64 = new $Uint64(0, 0); - x65 = new $Uint64(0, 0); - _tuple$31 = bits.Add64(x48, new $Uint64(0, 0), ((x$19 = (new p521Uint1(x63.$high, x63.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x64 = _tuple$31[0]; - x65 = _tuple$31[1]; - x66 = new $Uint64(0, 0); - x67 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x50, new $Uint64(0, 0), ((x$20 = (new p521Uint1(x65.$high, x65.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x66 = _tuple$32[0]; - x67 = _tuple$32[1]; - x68 = new $Uint64(0, 0); - x69 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x52, new $Uint64(0, 0), ((x$21 = (new p521Uint1(x67.$high, x67.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x68 = _tuple$33[0]; - x69 = _tuple$33[1]; - x70 = new $Uint64(0, 0); - x71 = new $Uint64(0, 0); - _tuple$34 = bits.Mul64(x54, new $Uint64(0, 511)); - x71 = _tuple$34[0]; - x70 = _tuple$34[1]; - x72 = new $Uint64(0, 0); - x73 = new $Uint64(0, 0); - _tuple$35 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x73 = _tuple$35[0]; - x72 = _tuple$35[1]; - x74 = new $Uint64(0, 0); - x75 = new $Uint64(0, 0); - _tuple$36 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x75 = _tuple$36[0]; - x74 = _tuple$36[1]; - x76 = new $Uint64(0, 0); - x77 = new $Uint64(0, 0); - _tuple$37 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x77 = _tuple$37[0]; - x76 = _tuple$37[1]; - x78 = new $Uint64(0, 0); - x79 = new $Uint64(0, 0); - _tuple$38 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x79 = _tuple$38[0]; - x78 = _tuple$38[1]; - x80 = new $Uint64(0, 0); - x81 = new $Uint64(0, 0); - _tuple$39 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x81 = _tuple$39[0]; - x80 = _tuple$39[1]; - x82 = new $Uint64(0, 0); - x83 = new $Uint64(0, 0); - _tuple$40 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x83 = _tuple$40[0]; - x82 = _tuple$40[1]; - x84 = new $Uint64(0, 0); - x85 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x85 = _tuple$41[0]; - x84 = _tuple$41[1]; - x86 = new $Uint64(0, 0); - x87 = new $Uint64(0, 0); - _tuple$42 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x87 = _tuple$42[0]; - x86 = _tuple$42[1]; - x88 = new $Uint64(0, 0); - x89 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x87, x84, new $Uint64(0, 0)); - x88 = _tuple$43[0]; - x89 = _tuple$43[1]; - x90 = new $Uint64(0, 0); - x91 = new $Uint64(0, 0); - _tuple$44 = bits.Add64(x85, x82, ((x$22 = (new p521Uint1(x89.$high, x89.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x90 = _tuple$44[0]; - x91 = _tuple$44[1]; - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x83, x80, ((x$23 = (new p521Uint1(x91.$high, x91.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x92 = _tuple$45[0]; - x93 = _tuple$45[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x81, x78, ((x$24 = (new p521Uint1(x93.$high, x93.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x94 = _tuple$46[0]; - x95 = _tuple$46[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x79, x76, ((x$25 = (new p521Uint1(x95.$high, x95.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x96 = _tuple$47[0]; - x97 = _tuple$47[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$48 = bits.Add64(x77, x74, ((x$26 = (new p521Uint1(x97.$high, x97.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x98 = _tuple$48[0]; - x99 = _tuple$48[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$49 = bits.Add64(x75, x72, ((x$27 = (new p521Uint1(x99.$high, x99.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x100 = _tuple$49[0]; - x101 = _tuple$49[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$50 = bits.Add64(x73, x70, ((x$28 = (new p521Uint1(x101.$high, x101.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x102 = _tuple$50[0]; - x103 = _tuple$50[1]; - x105 = new $Uint64(0, 0); - _tuple$51 = bits.Add64(x54, x86, new $Uint64(0, 0)); - x105 = _tuple$51[1]; - x106 = new $Uint64(0, 0); - x107 = new $Uint64(0, 0); - _tuple$52 = bits.Add64(x56, x88, ((x$29 = (new p521Uint1(x105.$high, x105.$low)), new $Uint64(x$29.$high, x$29.$low)))); - x106 = _tuple$52[0]; - x107 = _tuple$52[1]; - x108 = new $Uint64(0, 0); - x109 = new $Uint64(0, 0); - _tuple$53 = bits.Add64(x58, x90, ((x$30 = (new p521Uint1(x107.$high, x107.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x108 = _tuple$53[0]; - x109 = _tuple$53[1]; - x110 = new $Uint64(0, 0); - x111 = new $Uint64(0, 0); - _tuple$54 = bits.Add64(x60, x92, ((x$31 = (new p521Uint1(x109.$high, x109.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x110 = _tuple$54[0]; - x111 = _tuple$54[1]; - x112 = new $Uint64(0, 0); - x113 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x62, x94, ((x$32 = (new p521Uint1(x111.$high, x111.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x112 = _tuple$55[0]; - x113 = _tuple$55[1]; - x114 = new $Uint64(0, 0); - x115 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x64, x96, ((x$33 = (new p521Uint1(x113.$high, x113.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x114 = _tuple$56[0]; - x115 = _tuple$56[1]; - x116 = new $Uint64(0, 0); - x117 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x66, x98, ((x$34 = (new p521Uint1(x115.$high, x115.$low)), new $Uint64(x$34.$high, x$34.$low)))); - x116 = _tuple$57[0]; - x117 = _tuple$57[1]; - x118 = new $Uint64(0, 0); - x119 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x68, x100, ((x$35 = (new p521Uint1(x117.$high, x117.$low)), new $Uint64(x$35.$high, x$35.$low)))); - x118 = _tuple$58[0]; - x119 = _tuple$58[1]; - x120 = new $Uint64(0, 0); - x121 = new $Uint64(0, 0); - _tuple$59 = bits.Add64((x$36 = ((x$37 = (new p521Uint1(x69.$high, x69.$low)), new $Uint64(x$37.$high, x$37.$low))), x$38 = (x$39 = ((x$40 = (new p521Uint1(x53.$high, x53.$low)), new $Uint64(x$40.$high, x$40.$low))), x$41 = (x$42 = ((x$43 = (new p521Uint1(x35.$high, x35.$low)), new $Uint64(x$43.$high, x$43.$low))), new $Uint64(x$42.$high + x3.$high, x$42.$low + x3.$low)), new $Uint64(x$39.$high + x$41.$high, x$39.$low + x$41.$low)), new $Uint64(x$36.$high + x$38.$high, x$36.$low + x$38.$low)), x102, ((x$44 = (new p521Uint1(x119.$high, x119.$low)), new $Uint64(x$44.$high, x$44.$low)))); - x120 = _tuple$59[0]; - x121 = _tuple$59[1]; - x122 = new $Uint64(0, 0); - x123 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x106, arg1[2], new $Uint64(0, 0)); - x122 = _tuple$60[0]; - x123 = _tuple$60[1]; - x124 = new $Uint64(0, 0); - x125 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x108, new $Uint64(0, 0), ((x$45 = (new p521Uint1(x123.$high, x123.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x124 = _tuple$61[0]; - x125 = _tuple$61[1]; - x126 = new $Uint64(0, 0); - x127 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x110, new $Uint64(0, 0), ((x$46 = (new p521Uint1(x125.$high, x125.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x126 = _tuple$62[0]; - x127 = _tuple$62[1]; - x128 = new $Uint64(0, 0); - x129 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x112, new $Uint64(0, 0), ((x$47 = (new p521Uint1(x127.$high, x127.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x128 = _tuple$63[0]; - x129 = _tuple$63[1]; - x130 = new $Uint64(0, 0); - x131 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x114, new $Uint64(0, 0), ((x$48 = (new p521Uint1(x129.$high, x129.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x130 = _tuple$64[0]; - x131 = _tuple$64[1]; - x132 = new $Uint64(0, 0); - x133 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x116, new $Uint64(0, 0), ((x$49 = (new p521Uint1(x131.$high, x131.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x132 = _tuple$65[0]; - x133 = _tuple$65[1]; - x134 = new $Uint64(0, 0); - x135 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x118, new $Uint64(0, 0), ((x$50 = (new p521Uint1(x133.$high, x133.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x134 = _tuple$66[0]; - x135 = _tuple$66[1]; - x136 = new $Uint64(0, 0); - x137 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x120, new $Uint64(0, 0), ((x$51 = (new p521Uint1(x135.$high, x135.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x136 = _tuple$67[0]; - x137 = _tuple$67[1]; - x138 = new $Uint64(0, 0); - x139 = new $Uint64(0, 0); - _tuple$68 = bits.Mul64(x122, new $Uint64(0, 511)); - x139 = _tuple$68[0]; - x138 = _tuple$68[1]; - x140 = new $Uint64(0, 0); - x141 = new $Uint64(0, 0); - _tuple$69 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x141 = _tuple$69[0]; - x140 = _tuple$69[1]; - x142 = new $Uint64(0, 0); - x143 = new $Uint64(0, 0); - _tuple$70 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x143 = _tuple$70[0]; - x142 = _tuple$70[1]; - x144 = new $Uint64(0, 0); - x145 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x145 = _tuple$71[0]; - x144 = _tuple$71[1]; - x146 = new $Uint64(0, 0); - x147 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x147 = _tuple$72[0]; - x146 = _tuple$72[1]; - x148 = new $Uint64(0, 0); - x149 = new $Uint64(0, 0); - _tuple$73 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x149 = _tuple$73[0]; - x148 = _tuple$73[1]; - x150 = new $Uint64(0, 0); - x151 = new $Uint64(0, 0); - _tuple$74 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x151 = _tuple$74[0]; - x150 = _tuple$74[1]; - x152 = new $Uint64(0, 0); - x153 = new $Uint64(0, 0); - _tuple$75 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x153 = _tuple$75[0]; - x152 = _tuple$75[1]; - x154 = new $Uint64(0, 0); - x155 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x122, new $Uint64(4294967295, 4294967295)); - x155 = _tuple$76[0]; - x154 = _tuple$76[1]; - x156 = new $Uint64(0, 0); - x157 = new $Uint64(0, 0); - _tuple$77 = bits.Add64(x155, x152, new $Uint64(0, 0)); - x156 = _tuple$77[0]; - x157 = _tuple$77[1]; - x158 = new $Uint64(0, 0); - x159 = new $Uint64(0, 0); - _tuple$78 = bits.Add64(x153, x150, ((x$52 = (new p521Uint1(x157.$high, x157.$low)), new $Uint64(x$52.$high, x$52.$low)))); - x158 = _tuple$78[0]; - x159 = _tuple$78[1]; - x160 = new $Uint64(0, 0); - x161 = new $Uint64(0, 0); - _tuple$79 = bits.Add64(x151, x148, ((x$53 = (new p521Uint1(x159.$high, x159.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x160 = _tuple$79[0]; - x161 = _tuple$79[1]; - x162 = new $Uint64(0, 0); - x163 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x149, x146, ((x$54 = (new p521Uint1(x161.$high, x161.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x162 = _tuple$80[0]; - x163 = _tuple$80[1]; - x164 = new $Uint64(0, 0); - x165 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x147, x144, ((x$55 = (new p521Uint1(x163.$high, x163.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x164 = _tuple$81[0]; - x165 = _tuple$81[1]; - x166 = new $Uint64(0, 0); - x167 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x145, x142, ((x$56 = (new p521Uint1(x165.$high, x165.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x166 = _tuple$82[0]; - x167 = _tuple$82[1]; - x168 = new $Uint64(0, 0); - x169 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x143, x140, ((x$57 = (new p521Uint1(x167.$high, x167.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x168 = _tuple$83[0]; - x169 = _tuple$83[1]; - x170 = new $Uint64(0, 0); - x171 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x141, x138, ((x$58 = (new p521Uint1(x169.$high, x169.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x170 = _tuple$84[0]; - x171 = _tuple$84[1]; - x173 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x122, x154, new $Uint64(0, 0)); - x173 = _tuple$85[1]; - x174 = new $Uint64(0, 0); - x175 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x124, x156, ((x$59 = (new p521Uint1(x173.$high, x173.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x174 = _tuple$86[0]; - x175 = _tuple$86[1]; - x176 = new $Uint64(0, 0); - x177 = new $Uint64(0, 0); - _tuple$87 = bits.Add64(x126, x158, ((x$60 = (new p521Uint1(x175.$high, x175.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x176 = _tuple$87[0]; - x177 = _tuple$87[1]; - x178 = new $Uint64(0, 0); - x179 = new $Uint64(0, 0); - _tuple$88 = bits.Add64(x128, x160, ((x$61 = (new p521Uint1(x177.$high, x177.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x178 = _tuple$88[0]; - x179 = _tuple$88[1]; - x180 = new $Uint64(0, 0); - x181 = new $Uint64(0, 0); - _tuple$89 = bits.Add64(x130, x162, ((x$62 = (new p521Uint1(x179.$high, x179.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x180 = _tuple$89[0]; - x181 = _tuple$89[1]; - x182 = new $Uint64(0, 0); - x183 = new $Uint64(0, 0); - _tuple$90 = bits.Add64(x132, x164, ((x$63 = (new p521Uint1(x181.$high, x181.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x182 = _tuple$90[0]; - x183 = _tuple$90[1]; - x184 = new $Uint64(0, 0); - x185 = new $Uint64(0, 0); - _tuple$91 = bits.Add64(x134, x166, ((x$64 = (new p521Uint1(x183.$high, x183.$low)), new $Uint64(x$64.$high, x$64.$low)))); - x184 = _tuple$91[0]; - x185 = _tuple$91[1]; - x186 = new $Uint64(0, 0); - x187 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x136, x168, ((x$65 = (new p521Uint1(x185.$high, x185.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x186 = _tuple$92[0]; - x187 = _tuple$92[1]; - x188 = new $Uint64(0, 0); - x189 = new $Uint64(0, 0); - _tuple$93 = bits.Add64((x$66 = ((x$67 = (new p521Uint1(x137.$high, x137.$low)), new $Uint64(x$67.$high, x$67.$low))), x$68 = (x$69 = ((x$70 = (new p521Uint1(x121.$high, x121.$low)), new $Uint64(x$70.$high, x$70.$low))), x$71 = (x$72 = ((x$73 = (new p521Uint1(x103.$high, x103.$low)), new $Uint64(x$73.$high, x$73.$low))), new $Uint64(x$72.$high + x71.$high, x$72.$low + x71.$low)), new $Uint64(x$69.$high + x$71.$high, x$69.$low + x$71.$low)), new $Uint64(x$66.$high + x$68.$high, x$66.$low + x$68.$low)), x170, ((x$74 = (new p521Uint1(x187.$high, x187.$low)), new $Uint64(x$74.$high, x$74.$low)))); - x188 = _tuple$93[0]; - x189 = _tuple$93[1]; - x190 = new $Uint64(0, 0); - x191 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x174, arg1[3], new $Uint64(0, 0)); - x190 = _tuple$94[0]; - x191 = _tuple$94[1]; - x192 = new $Uint64(0, 0); - x193 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x176, new $Uint64(0, 0), ((x$75 = (new p521Uint1(x191.$high, x191.$low)), new $Uint64(x$75.$high, x$75.$low)))); - x192 = _tuple$95[0]; - x193 = _tuple$95[1]; - x194 = new $Uint64(0, 0); - x195 = new $Uint64(0, 0); - _tuple$96 = bits.Add64(x178, new $Uint64(0, 0), ((x$76 = (new p521Uint1(x193.$high, x193.$low)), new $Uint64(x$76.$high, x$76.$low)))); - x194 = _tuple$96[0]; - x195 = _tuple$96[1]; - x196 = new $Uint64(0, 0); - x197 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x180, new $Uint64(0, 0), ((x$77 = (new p521Uint1(x195.$high, x195.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x196 = _tuple$97[0]; - x197 = _tuple$97[1]; - x198 = new $Uint64(0, 0); - x199 = new $Uint64(0, 0); - _tuple$98 = bits.Add64(x182, new $Uint64(0, 0), ((x$78 = (new p521Uint1(x197.$high, x197.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x198 = _tuple$98[0]; - x199 = _tuple$98[1]; - x200 = new $Uint64(0, 0); - x201 = new $Uint64(0, 0); - _tuple$99 = bits.Add64(x184, new $Uint64(0, 0), ((x$79 = (new p521Uint1(x199.$high, x199.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x200 = _tuple$99[0]; - x201 = _tuple$99[1]; - x202 = new $Uint64(0, 0); - x203 = new $Uint64(0, 0); - _tuple$100 = bits.Add64(x186, new $Uint64(0, 0), ((x$80 = (new p521Uint1(x201.$high, x201.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x202 = _tuple$100[0]; - x203 = _tuple$100[1]; - x204 = new $Uint64(0, 0); - x205 = new $Uint64(0, 0); - _tuple$101 = bits.Add64(x188, new $Uint64(0, 0), ((x$81 = (new p521Uint1(x203.$high, x203.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x204 = _tuple$101[0]; - x205 = _tuple$101[1]; - x206 = new $Uint64(0, 0); - x207 = new $Uint64(0, 0); - _tuple$102 = bits.Mul64(x190, new $Uint64(0, 511)); - x207 = _tuple$102[0]; - x206 = _tuple$102[1]; - x208 = new $Uint64(0, 0); - x209 = new $Uint64(0, 0); - _tuple$103 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x209 = _tuple$103[0]; - x208 = _tuple$103[1]; - x210 = new $Uint64(0, 0); - x211 = new $Uint64(0, 0); - _tuple$104 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x211 = _tuple$104[0]; - x210 = _tuple$104[1]; - x212 = new $Uint64(0, 0); - x213 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x213 = _tuple$105[0]; - x212 = _tuple$105[1]; - x214 = new $Uint64(0, 0); - x215 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x215 = _tuple$106[0]; - x214 = _tuple$106[1]; - x216 = new $Uint64(0, 0); - x217 = new $Uint64(0, 0); - _tuple$107 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x217 = _tuple$107[0]; - x216 = _tuple$107[1]; - x218 = new $Uint64(0, 0); - x219 = new $Uint64(0, 0); - _tuple$108 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x219 = _tuple$108[0]; - x218 = _tuple$108[1]; - x220 = new $Uint64(0, 0); - x221 = new $Uint64(0, 0); - _tuple$109 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x221 = _tuple$109[0]; - x220 = _tuple$109[1]; - x222 = new $Uint64(0, 0); - x223 = new $Uint64(0, 0); - _tuple$110 = bits.Mul64(x190, new $Uint64(4294967295, 4294967295)); - x223 = _tuple$110[0]; - x222 = _tuple$110[1]; - x224 = new $Uint64(0, 0); - x225 = new $Uint64(0, 0); - _tuple$111 = bits.Add64(x223, x220, new $Uint64(0, 0)); - x224 = _tuple$111[0]; - x225 = _tuple$111[1]; - x226 = new $Uint64(0, 0); - x227 = new $Uint64(0, 0); - _tuple$112 = bits.Add64(x221, x218, ((x$82 = (new p521Uint1(x225.$high, x225.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x226 = _tuple$112[0]; - x227 = _tuple$112[1]; - x228 = new $Uint64(0, 0); - x229 = new $Uint64(0, 0); - _tuple$113 = bits.Add64(x219, x216, ((x$83 = (new p521Uint1(x227.$high, x227.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x228 = _tuple$113[0]; - x229 = _tuple$113[1]; - x230 = new $Uint64(0, 0); - x231 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x217, x214, ((x$84 = (new p521Uint1(x229.$high, x229.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x230 = _tuple$114[0]; - x231 = _tuple$114[1]; - x232 = new $Uint64(0, 0); - x233 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x215, x212, ((x$85 = (new p521Uint1(x231.$high, x231.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x232 = _tuple$115[0]; - x233 = _tuple$115[1]; - x234 = new $Uint64(0, 0); - x235 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x213, x210, ((x$86 = (new p521Uint1(x233.$high, x233.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x234 = _tuple$116[0]; - x235 = _tuple$116[1]; - x236 = new $Uint64(0, 0); - x237 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x211, x208, ((x$87 = (new p521Uint1(x235.$high, x235.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x236 = _tuple$117[0]; - x237 = _tuple$117[1]; - x238 = new $Uint64(0, 0); - x239 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x209, x206, ((x$88 = (new p521Uint1(x237.$high, x237.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x238 = _tuple$118[0]; - x239 = _tuple$118[1]; - x241 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x190, x222, new $Uint64(0, 0)); - x241 = _tuple$119[1]; - x242 = new $Uint64(0, 0); - x243 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x192, x224, ((x$89 = (new p521Uint1(x241.$high, x241.$low)), new $Uint64(x$89.$high, x$89.$low)))); - x242 = _tuple$120[0]; - x243 = _tuple$120[1]; - x244 = new $Uint64(0, 0); - x245 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x194, x226, ((x$90 = (new p521Uint1(x243.$high, x243.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x244 = _tuple$121[0]; - x245 = _tuple$121[1]; - x246 = new $Uint64(0, 0); - x247 = new $Uint64(0, 0); - _tuple$122 = bits.Add64(x196, x228, ((x$91 = (new p521Uint1(x245.$high, x245.$low)), new $Uint64(x$91.$high, x$91.$low)))); - x246 = _tuple$122[0]; - x247 = _tuple$122[1]; - x248 = new $Uint64(0, 0); - x249 = new $Uint64(0, 0); - _tuple$123 = bits.Add64(x198, x230, ((x$92 = (new p521Uint1(x247.$high, x247.$low)), new $Uint64(x$92.$high, x$92.$low)))); - x248 = _tuple$123[0]; - x249 = _tuple$123[1]; - x250 = new $Uint64(0, 0); - x251 = new $Uint64(0, 0); - _tuple$124 = bits.Add64(x200, x232, ((x$93 = (new p521Uint1(x249.$high, x249.$low)), new $Uint64(x$93.$high, x$93.$low)))); - x250 = _tuple$124[0]; - x251 = _tuple$124[1]; - x252 = new $Uint64(0, 0); - x253 = new $Uint64(0, 0); - _tuple$125 = bits.Add64(x202, x234, ((x$94 = (new p521Uint1(x251.$high, x251.$low)), new $Uint64(x$94.$high, x$94.$low)))); - x252 = _tuple$125[0]; - x253 = _tuple$125[1]; - x254 = new $Uint64(0, 0); - x255 = new $Uint64(0, 0); - _tuple$126 = bits.Add64(x204, x236, ((x$95 = (new p521Uint1(x253.$high, x253.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x254 = _tuple$126[0]; - x255 = _tuple$126[1]; - x256 = new $Uint64(0, 0); - x257 = new $Uint64(0, 0); - _tuple$127 = bits.Add64((x$96 = ((x$97 = (new p521Uint1(x205.$high, x205.$low)), new $Uint64(x$97.$high, x$97.$low))), x$98 = (x$99 = ((x$100 = (new p521Uint1(x189.$high, x189.$low)), new $Uint64(x$100.$high, x$100.$low))), x$101 = (x$102 = ((x$103 = (new p521Uint1(x171.$high, x171.$low)), new $Uint64(x$103.$high, x$103.$low))), new $Uint64(x$102.$high + x139.$high, x$102.$low + x139.$low)), new $Uint64(x$99.$high + x$101.$high, x$99.$low + x$101.$low)), new $Uint64(x$96.$high + x$98.$high, x$96.$low + x$98.$low)), x238, ((x$104 = (new p521Uint1(x255.$high, x255.$low)), new $Uint64(x$104.$high, x$104.$low)))); - x256 = _tuple$127[0]; - x257 = _tuple$127[1]; - x258 = new $Uint64(0, 0); - x259 = new $Uint64(0, 0); - _tuple$128 = bits.Add64(x242, arg1[4], new $Uint64(0, 0)); - x258 = _tuple$128[0]; - x259 = _tuple$128[1]; - x260 = new $Uint64(0, 0); - x261 = new $Uint64(0, 0); - _tuple$129 = bits.Add64(x244, new $Uint64(0, 0), ((x$105 = (new p521Uint1(x259.$high, x259.$low)), new $Uint64(x$105.$high, x$105.$low)))); - x260 = _tuple$129[0]; - x261 = _tuple$129[1]; - x262 = new $Uint64(0, 0); - x263 = new $Uint64(0, 0); - _tuple$130 = bits.Add64(x246, new $Uint64(0, 0), ((x$106 = (new p521Uint1(x261.$high, x261.$low)), new $Uint64(x$106.$high, x$106.$low)))); - x262 = _tuple$130[0]; - x263 = _tuple$130[1]; - x264 = new $Uint64(0, 0); - x265 = new $Uint64(0, 0); - _tuple$131 = bits.Add64(x248, new $Uint64(0, 0), ((x$107 = (new p521Uint1(x263.$high, x263.$low)), new $Uint64(x$107.$high, x$107.$low)))); - x264 = _tuple$131[0]; - x265 = _tuple$131[1]; - x266 = new $Uint64(0, 0); - x267 = new $Uint64(0, 0); - _tuple$132 = bits.Add64(x250, new $Uint64(0, 0), ((x$108 = (new p521Uint1(x265.$high, x265.$low)), new $Uint64(x$108.$high, x$108.$low)))); - x266 = _tuple$132[0]; - x267 = _tuple$132[1]; - x268 = new $Uint64(0, 0); - x269 = new $Uint64(0, 0); - _tuple$133 = bits.Add64(x252, new $Uint64(0, 0), ((x$109 = (new p521Uint1(x267.$high, x267.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x268 = _tuple$133[0]; - x269 = _tuple$133[1]; - x270 = new $Uint64(0, 0); - x271 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x254, new $Uint64(0, 0), ((x$110 = (new p521Uint1(x269.$high, x269.$low)), new $Uint64(x$110.$high, x$110.$low)))); - x270 = _tuple$134[0]; - x271 = _tuple$134[1]; - x272 = new $Uint64(0, 0); - x273 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x256, new $Uint64(0, 0), ((x$111 = (new p521Uint1(x271.$high, x271.$low)), new $Uint64(x$111.$high, x$111.$low)))); - x272 = _tuple$135[0]; - x273 = _tuple$135[1]; - x274 = new $Uint64(0, 0); - x275 = new $Uint64(0, 0); - _tuple$136 = bits.Mul64(x258, new $Uint64(0, 511)); - x275 = _tuple$136[0]; - x274 = _tuple$136[1]; - x276 = new $Uint64(0, 0); - x277 = new $Uint64(0, 0); - _tuple$137 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x277 = _tuple$137[0]; - x276 = _tuple$137[1]; - x278 = new $Uint64(0, 0); - x279 = new $Uint64(0, 0); - _tuple$138 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x279 = _tuple$138[0]; - x278 = _tuple$138[1]; - x280 = new $Uint64(0, 0); - x281 = new $Uint64(0, 0); - _tuple$139 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x281 = _tuple$139[0]; - x280 = _tuple$139[1]; - x282 = new $Uint64(0, 0); - x283 = new $Uint64(0, 0); - _tuple$140 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x283 = _tuple$140[0]; - x282 = _tuple$140[1]; - x284 = new $Uint64(0, 0); - x285 = new $Uint64(0, 0); - _tuple$141 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x285 = _tuple$141[0]; - x284 = _tuple$141[1]; - x286 = new $Uint64(0, 0); - x287 = new $Uint64(0, 0); - _tuple$142 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x287 = _tuple$142[0]; - x286 = _tuple$142[1]; - x288 = new $Uint64(0, 0); - x289 = new $Uint64(0, 0); - _tuple$143 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x289 = _tuple$143[0]; - x288 = _tuple$143[1]; - x290 = new $Uint64(0, 0); - x291 = new $Uint64(0, 0); - _tuple$144 = bits.Mul64(x258, new $Uint64(4294967295, 4294967295)); - x291 = _tuple$144[0]; - x290 = _tuple$144[1]; - x292 = new $Uint64(0, 0); - x293 = new $Uint64(0, 0); - _tuple$145 = bits.Add64(x291, x288, new $Uint64(0, 0)); - x292 = _tuple$145[0]; - x293 = _tuple$145[1]; - x294 = new $Uint64(0, 0); - x295 = new $Uint64(0, 0); - _tuple$146 = bits.Add64(x289, x286, ((x$112 = (new p521Uint1(x293.$high, x293.$low)), new $Uint64(x$112.$high, x$112.$low)))); - x294 = _tuple$146[0]; - x295 = _tuple$146[1]; - x296 = new $Uint64(0, 0); - x297 = new $Uint64(0, 0); - _tuple$147 = bits.Add64(x287, x284, ((x$113 = (new p521Uint1(x295.$high, x295.$low)), new $Uint64(x$113.$high, x$113.$low)))); - x296 = _tuple$147[0]; - x297 = _tuple$147[1]; - x298 = new $Uint64(0, 0); - x299 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x285, x282, ((x$114 = (new p521Uint1(x297.$high, x297.$low)), new $Uint64(x$114.$high, x$114.$low)))); - x298 = _tuple$148[0]; - x299 = _tuple$148[1]; - x300 = new $Uint64(0, 0); - x301 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x283, x280, ((x$115 = (new p521Uint1(x299.$high, x299.$low)), new $Uint64(x$115.$high, x$115.$low)))); - x300 = _tuple$149[0]; - x301 = _tuple$149[1]; - x302 = new $Uint64(0, 0); - x303 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x281, x278, ((x$116 = (new p521Uint1(x301.$high, x301.$low)), new $Uint64(x$116.$high, x$116.$low)))); - x302 = _tuple$150[0]; - x303 = _tuple$150[1]; - x304 = new $Uint64(0, 0); - x305 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x279, x276, ((x$117 = (new p521Uint1(x303.$high, x303.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x304 = _tuple$151[0]; - x305 = _tuple$151[1]; - x306 = new $Uint64(0, 0); - x307 = new $Uint64(0, 0); - _tuple$152 = bits.Add64(x277, x274, ((x$118 = (new p521Uint1(x305.$high, x305.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x306 = _tuple$152[0]; - x307 = _tuple$152[1]; - x309 = new $Uint64(0, 0); - _tuple$153 = bits.Add64(x258, x290, new $Uint64(0, 0)); - x309 = _tuple$153[1]; - x310 = new $Uint64(0, 0); - x311 = new $Uint64(0, 0); - _tuple$154 = bits.Add64(x260, x292, ((x$119 = (new p521Uint1(x309.$high, x309.$low)), new $Uint64(x$119.$high, x$119.$low)))); - x310 = _tuple$154[0]; - x311 = _tuple$154[1]; - x312 = new $Uint64(0, 0); - x313 = new $Uint64(0, 0); - _tuple$155 = bits.Add64(x262, x294, ((x$120 = (new p521Uint1(x311.$high, x311.$low)), new $Uint64(x$120.$high, x$120.$low)))); - x312 = _tuple$155[0]; - x313 = _tuple$155[1]; - x314 = new $Uint64(0, 0); - x315 = new $Uint64(0, 0); - _tuple$156 = bits.Add64(x264, x296, ((x$121 = (new p521Uint1(x313.$high, x313.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x314 = _tuple$156[0]; - x315 = _tuple$156[1]; - x316 = new $Uint64(0, 0); - x317 = new $Uint64(0, 0); - _tuple$157 = bits.Add64(x266, x298, ((x$122 = (new p521Uint1(x315.$high, x315.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x316 = _tuple$157[0]; - x317 = _tuple$157[1]; - x318 = new $Uint64(0, 0); - x319 = new $Uint64(0, 0); - _tuple$158 = bits.Add64(x268, x300, ((x$123 = (new p521Uint1(x317.$high, x317.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x318 = _tuple$158[0]; - x319 = _tuple$158[1]; - x320 = new $Uint64(0, 0); - x321 = new $Uint64(0, 0); - _tuple$159 = bits.Add64(x270, x302, ((x$124 = (new p521Uint1(x319.$high, x319.$low)), new $Uint64(x$124.$high, x$124.$low)))); - x320 = _tuple$159[0]; - x321 = _tuple$159[1]; - x322 = new $Uint64(0, 0); - x323 = new $Uint64(0, 0); - _tuple$160 = bits.Add64(x272, x304, ((x$125 = (new p521Uint1(x321.$high, x321.$low)), new $Uint64(x$125.$high, x$125.$low)))); - x322 = _tuple$160[0]; - x323 = _tuple$160[1]; - x324 = new $Uint64(0, 0); - x325 = new $Uint64(0, 0); - _tuple$161 = bits.Add64((x$126 = ((x$127 = (new p521Uint1(x273.$high, x273.$low)), new $Uint64(x$127.$high, x$127.$low))), x$128 = (x$129 = ((x$130 = (new p521Uint1(x257.$high, x257.$low)), new $Uint64(x$130.$high, x$130.$low))), x$131 = (x$132 = ((x$133 = (new p521Uint1(x239.$high, x239.$low)), new $Uint64(x$133.$high, x$133.$low))), new $Uint64(x$132.$high + x207.$high, x$132.$low + x207.$low)), new $Uint64(x$129.$high + x$131.$high, x$129.$low + x$131.$low)), new $Uint64(x$126.$high + x$128.$high, x$126.$low + x$128.$low)), x306, ((x$134 = (new p521Uint1(x323.$high, x323.$low)), new $Uint64(x$134.$high, x$134.$low)))); - x324 = _tuple$161[0]; - x325 = _tuple$161[1]; - x326 = new $Uint64(0, 0); - x327 = new $Uint64(0, 0); - _tuple$162 = bits.Add64(x310, arg1[5], new $Uint64(0, 0)); - x326 = _tuple$162[0]; - x327 = _tuple$162[1]; - x328 = new $Uint64(0, 0); - x329 = new $Uint64(0, 0); - _tuple$163 = bits.Add64(x312, new $Uint64(0, 0), ((x$135 = (new p521Uint1(x327.$high, x327.$low)), new $Uint64(x$135.$high, x$135.$low)))); - x328 = _tuple$163[0]; - x329 = _tuple$163[1]; - x330 = new $Uint64(0, 0); - x331 = new $Uint64(0, 0); - _tuple$164 = bits.Add64(x314, new $Uint64(0, 0), ((x$136 = (new p521Uint1(x329.$high, x329.$low)), new $Uint64(x$136.$high, x$136.$low)))); - x330 = _tuple$164[0]; - x331 = _tuple$164[1]; - x332 = new $Uint64(0, 0); - x333 = new $Uint64(0, 0); - _tuple$165 = bits.Add64(x316, new $Uint64(0, 0), ((x$137 = (new p521Uint1(x331.$high, x331.$low)), new $Uint64(x$137.$high, x$137.$low)))); - x332 = _tuple$165[0]; - x333 = _tuple$165[1]; - x334 = new $Uint64(0, 0); - x335 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x318, new $Uint64(0, 0), ((x$138 = (new p521Uint1(x333.$high, x333.$low)), new $Uint64(x$138.$high, x$138.$low)))); - x334 = _tuple$166[0]; - x335 = _tuple$166[1]; - x336 = new $Uint64(0, 0); - x337 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x320, new $Uint64(0, 0), ((x$139 = (new p521Uint1(x335.$high, x335.$low)), new $Uint64(x$139.$high, x$139.$low)))); - x336 = _tuple$167[0]; - x337 = _tuple$167[1]; - x338 = new $Uint64(0, 0); - x339 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x322, new $Uint64(0, 0), ((x$140 = (new p521Uint1(x337.$high, x337.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x338 = _tuple$168[0]; - x339 = _tuple$168[1]; - x340 = new $Uint64(0, 0); - x341 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x324, new $Uint64(0, 0), ((x$141 = (new p521Uint1(x339.$high, x339.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x340 = _tuple$169[0]; - x341 = _tuple$169[1]; - x342 = new $Uint64(0, 0); - x343 = new $Uint64(0, 0); - _tuple$170 = bits.Mul64(x326, new $Uint64(0, 511)); - x343 = _tuple$170[0]; - x342 = _tuple$170[1]; - x344 = new $Uint64(0, 0); - x345 = new $Uint64(0, 0); - _tuple$171 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x345 = _tuple$171[0]; - x344 = _tuple$171[1]; - x346 = new $Uint64(0, 0); - x347 = new $Uint64(0, 0); - _tuple$172 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x347 = _tuple$172[0]; - x346 = _tuple$172[1]; - x348 = new $Uint64(0, 0); - x349 = new $Uint64(0, 0); - _tuple$173 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x349 = _tuple$173[0]; - x348 = _tuple$173[1]; - x350 = new $Uint64(0, 0); - x351 = new $Uint64(0, 0); - _tuple$174 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x351 = _tuple$174[0]; - x350 = _tuple$174[1]; - x352 = new $Uint64(0, 0); - x353 = new $Uint64(0, 0); - _tuple$175 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x353 = _tuple$175[0]; - x352 = _tuple$175[1]; - x354 = new $Uint64(0, 0); - x355 = new $Uint64(0, 0); - _tuple$176 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x355 = _tuple$176[0]; - x354 = _tuple$176[1]; - x356 = new $Uint64(0, 0); - x357 = new $Uint64(0, 0); - _tuple$177 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x357 = _tuple$177[0]; - x356 = _tuple$177[1]; - x358 = new $Uint64(0, 0); - x359 = new $Uint64(0, 0); - _tuple$178 = bits.Mul64(x326, new $Uint64(4294967295, 4294967295)); - x359 = _tuple$178[0]; - x358 = _tuple$178[1]; - x360 = new $Uint64(0, 0); - x361 = new $Uint64(0, 0); - _tuple$179 = bits.Add64(x359, x356, new $Uint64(0, 0)); - x360 = _tuple$179[0]; - x361 = _tuple$179[1]; - x362 = new $Uint64(0, 0); - x363 = new $Uint64(0, 0); - _tuple$180 = bits.Add64(x357, x354, ((x$142 = (new p521Uint1(x361.$high, x361.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x362 = _tuple$180[0]; - x363 = _tuple$180[1]; - x364 = new $Uint64(0, 0); - x365 = new $Uint64(0, 0); - _tuple$181 = bits.Add64(x355, x352, ((x$143 = (new p521Uint1(x363.$high, x363.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x364 = _tuple$181[0]; - x365 = _tuple$181[1]; - x366 = new $Uint64(0, 0); - x367 = new $Uint64(0, 0); - _tuple$182 = bits.Add64(x353, x350, ((x$144 = (new p521Uint1(x365.$high, x365.$low)), new $Uint64(x$144.$high, x$144.$low)))); - x366 = _tuple$182[0]; - x367 = _tuple$182[1]; - x368 = new $Uint64(0, 0); - x369 = new $Uint64(0, 0); - _tuple$183 = bits.Add64(x351, x348, ((x$145 = (new p521Uint1(x367.$high, x367.$low)), new $Uint64(x$145.$high, x$145.$low)))); - x368 = _tuple$183[0]; - x369 = _tuple$183[1]; - x370 = new $Uint64(0, 0); - x371 = new $Uint64(0, 0); - _tuple$184 = bits.Add64(x349, x346, ((x$146 = (new p521Uint1(x369.$high, x369.$low)), new $Uint64(x$146.$high, x$146.$low)))); - x370 = _tuple$184[0]; - x371 = _tuple$184[1]; - x372 = new $Uint64(0, 0); - x373 = new $Uint64(0, 0); - _tuple$185 = bits.Add64(x347, x344, ((x$147 = (new p521Uint1(x371.$high, x371.$low)), new $Uint64(x$147.$high, x$147.$low)))); - x372 = _tuple$185[0]; - x373 = _tuple$185[1]; - x374 = new $Uint64(0, 0); - x375 = new $Uint64(0, 0); - _tuple$186 = bits.Add64(x345, x342, ((x$148 = (new p521Uint1(x373.$high, x373.$low)), new $Uint64(x$148.$high, x$148.$low)))); - x374 = _tuple$186[0]; - x375 = _tuple$186[1]; - x377 = new $Uint64(0, 0); - _tuple$187 = bits.Add64(x326, x358, new $Uint64(0, 0)); - x377 = _tuple$187[1]; - x378 = new $Uint64(0, 0); - x379 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x328, x360, ((x$149 = (new p521Uint1(x377.$high, x377.$low)), new $Uint64(x$149.$high, x$149.$low)))); - x378 = _tuple$188[0]; - x379 = _tuple$188[1]; - x380 = new $Uint64(0, 0); - x381 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x330, x362, ((x$150 = (new p521Uint1(x379.$high, x379.$low)), new $Uint64(x$150.$high, x$150.$low)))); - x380 = _tuple$189[0]; - x381 = _tuple$189[1]; - x382 = new $Uint64(0, 0); - x383 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x332, x364, ((x$151 = (new p521Uint1(x381.$high, x381.$low)), new $Uint64(x$151.$high, x$151.$low)))); - x382 = _tuple$190[0]; - x383 = _tuple$190[1]; - x384 = new $Uint64(0, 0); - x385 = new $Uint64(0, 0); - _tuple$191 = bits.Add64(x334, x366, ((x$152 = (new p521Uint1(x383.$high, x383.$low)), new $Uint64(x$152.$high, x$152.$low)))); - x384 = _tuple$191[0]; - x385 = _tuple$191[1]; - x386 = new $Uint64(0, 0); - x387 = new $Uint64(0, 0); - _tuple$192 = bits.Add64(x336, x368, ((x$153 = (new p521Uint1(x385.$high, x385.$low)), new $Uint64(x$153.$high, x$153.$low)))); - x386 = _tuple$192[0]; - x387 = _tuple$192[1]; - x388 = new $Uint64(0, 0); - x389 = new $Uint64(0, 0); - _tuple$193 = bits.Add64(x338, x370, ((x$154 = (new p521Uint1(x387.$high, x387.$low)), new $Uint64(x$154.$high, x$154.$low)))); - x388 = _tuple$193[0]; - x389 = _tuple$193[1]; - x390 = new $Uint64(0, 0); - x391 = new $Uint64(0, 0); - _tuple$194 = bits.Add64(x340, x372, ((x$155 = (new p521Uint1(x389.$high, x389.$low)), new $Uint64(x$155.$high, x$155.$low)))); - x390 = _tuple$194[0]; - x391 = _tuple$194[1]; - x392 = new $Uint64(0, 0); - x393 = new $Uint64(0, 0); - _tuple$195 = bits.Add64((x$156 = ((x$157 = (new p521Uint1(x341.$high, x341.$low)), new $Uint64(x$157.$high, x$157.$low))), x$158 = (x$159 = ((x$160 = (new p521Uint1(x325.$high, x325.$low)), new $Uint64(x$160.$high, x$160.$low))), x$161 = (x$162 = ((x$163 = (new p521Uint1(x307.$high, x307.$low)), new $Uint64(x$163.$high, x$163.$low))), new $Uint64(x$162.$high + x275.$high, x$162.$low + x275.$low)), new $Uint64(x$159.$high + x$161.$high, x$159.$low + x$161.$low)), new $Uint64(x$156.$high + x$158.$high, x$156.$low + x$158.$low)), x374, ((x$164 = (new p521Uint1(x391.$high, x391.$low)), new $Uint64(x$164.$high, x$164.$low)))); - x392 = _tuple$195[0]; - x393 = _tuple$195[1]; - x394 = new $Uint64(0, 0); - x395 = new $Uint64(0, 0); - _tuple$196 = bits.Add64(x378, arg1[6], new $Uint64(0, 0)); - x394 = _tuple$196[0]; - x395 = _tuple$196[1]; - x396 = new $Uint64(0, 0); - x397 = new $Uint64(0, 0); - _tuple$197 = bits.Add64(x380, new $Uint64(0, 0), ((x$165 = (new p521Uint1(x395.$high, x395.$low)), new $Uint64(x$165.$high, x$165.$low)))); - x396 = _tuple$197[0]; - x397 = _tuple$197[1]; - x398 = new $Uint64(0, 0); - x399 = new $Uint64(0, 0); - _tuple$198 = bits.Add64(x382, new $Uint64(0, 0), ((x$166 = (new p521Uint1(x397.$high, x397.$low)), new $Uint64(x$166.$high, x$166.$low)))); - x398 = _tuple$198[0]; - x399 = _tuple$198[1]; - x400 = new $Uint64(0, 0); - x401 = new $Uint64(0, 0); - _tuple$199 = bits.Add64(x384, new $Uint64(0, 0), ((x$167 = (new p521Uint1(x399.$high, x399.$low)), new $Uint64(x$167.$high, x$167.$low)))); - x400 = _tuple$199[0]; - x401 = _tuple$199[1]; - x402 = new $Uint64(0, 0); - x403 = new $Uint64(0, 0); - _tuple$200 = bits.Add64(x386, new $Uint64(0, 0), ((x$168 = (new p521Uint1(x401.$high, x401.$low)), new $Uint64(x$168.$high, x$168.$low)))); - x402 = _tuple$200[0]; - x403 = _tuple$200[1]; - x404 = new $Uint64(0, 0); - x405 = new $Uint64(0, 0); - _tuple$201 = bits.Add64(x388, new $Uint64(0, 0), ((x$169 = (new p521Uint1(x403.$high, x403.$low)), new $Uint64(x$169.$high, x$169.$low)))); - x404 = _tuple$201[0]; - x405 = _tuple$201[1]; - x406 = new $Uint64(0, 0); - x407 = new $Uint64(0, 0); - _tuple$202 = bits.Add64(x390, new $Uint64(0, 0), ((x$170 = (new p521Uint1(x405.$high, x405.$low)), new $Uint64(x$170.$high, x$170.$low)))); - x406 = _tuple$202[0]; - x407 = _tuple$202[1]; - x408 = new $Uint64(0, 0); - x409 = new $Uint64(0, 0); - _tuple$203 = bits.Add64(x392, new $Uint64(0, 0), ((x$171 = (new p521Uint1(x407.$high, x407.$low)), new $Uint64(x$171.$high, x$171.$low)))); - x408 = _tuple$203[0]; - x409 = _tuple$203[1]; - x410 = new $Uint64(0, 0); - x411 = new $Uint64(0, 0); - _tuple$204 = bits.Mul64(x394, new $Uint64(0, 511)); - x411 = _tuple$204[0]; - x410 = _tuple$204[1]; - x412 = new $Uint64(0, 0); - x413 = new $Uint64(0, 0); - _tuple$205 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x413 = _tuple$205[0]; - x412 = _tuple$205[1]; - x414 = new $Uint64(0, 0); - x415 = new $Uint64(0, 0); - _tuple$206 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x415 = _tuple$206[0]; - x414 = _tuple$206[1]; - x416 = new $Uint64(0, 0); - x417 = new $Uint64(0, 0); - _tuple$207 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x417 = _tuple$207[0]; - x416 = _tuple$207[1]; - x418 = new $Uint64(0, 0); - x419 = new $Uint64(0, 0); - _tuple$208 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x419 = _tuple$208[0]; - x418 = _tuple$208[1]; - x420 = new $Uint64(0, 0); - x421 = new $Uint64(0, 0); - _tuple$209 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x421 = _tuple$209[0]; - x420 = _tuple$209[1]; - x422 = new $Uint64(0, 0); - x423 = new $Uint64(0, 0); - _tuple$210 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x423 = _tuple$210[0]; - x422 = _tuple$210[1]; - x424 = new $Uint64(0, 0); - x425 = new $Uint64(0, 0); - _tuple$211 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x425 = _tuple$211[0]; - x424 = _tuple$211[1]; - x426 = new $Uint64(0, 0); - x427 = new $Uint64(0, 0); - _tuple$212 = bits.Mul64(x394, new $Uint64(4294967295, 4294967295)); - x427 = _tuple$212[0]; - x426 = _tuple$212[1]; - x428 = new $Uint64(0, 0); - x429 = new $Uint64(0, 0); - _tuple$213 = bits.Add64(x427, x424, new $Uint64(0, 0)); - x428 = _tuple$213[0]; - x429 = _tuple$213[1]; - x430 = new $Uint64(0, 0); - x431 = new $Uint64(0, 0); - _tuple$214 = bits.Add64(x425, x422, ((x$172 = (new p521Uint1(x429.$high, x429.$low)), new $Uint64(x$172.$high, x$172.$low)))); - x430 = _tuple$214[0]; - x431 = _tuple$214[1]; - x432 = new $Uint64(0, 0); - x433 = new $Uint64(0, 0); - _tuple$215 = bits.Add64(x423, x420, ((x$173 = (new p521Uint1(x431.$high, x431.$low)), new $Uint64(x$173.$high, x$173.$low)))); - x432 = _tuple$215[0]; - x433 = _tuple$215[1]; - x434 = new $Uint64(0, 0); - x435 = new $Uint64(0, 0); - _tuple$216 = bits.Add64(x421, x418, ((x$174 = (new p521Uint1(x433.$high, x433.$low)), new $Uint64(x$174.$high, x$174.$low)))); - x434 = _tuple$216[0]; - x435 = _tuple$216[1]; - x436 = new $Uint64(0, 0); - x437 = new $Uint64(0, 0); - _tuple$217 = bits.Add64(x419, x416, ((x$175 = (new p521Uint1(x435.$high, x435.$low)), new $Uint64(x$175.$high, x$175.$low)))); - x436 = _tuple$217[0]; - x437 = _tuple$217[1]; - x438 = new $Uint64(0, 0); - x439 = new $Uint64(0, 0); - _tuple$218 = bits.Add64(x417, x414, ((x$176 = (new p521Uint1(x437.$high, x437.$low)), new $Uint64(x$176.$high, x$176.$low)))); - x438 = _tuple$218[0]; - x439 = _tuple$218[1]; - x440 = new $Uint64(0, 0); - x441 = new $Uint64(0, 0); - _tuple$219 = bits.Add64(x415, x412, ((x$177 = (new p521Uint1(x439.$high, x439.$low)), new $Uint64(x$177.$high, x$177.$low)))); - x440 = _tuple$219[0]; - x441 = _tuple$219[1]; - x442 = new $Uint64(0, 0); - x443 = new $Uint64(0, 0); - _tuple$220 = bits.Add64(x413, x410, ((x$178 = (new p521Uint1(x441.$high, x441.$low)), new $Uint64(x$178.$high, x$178.$low)))); - x442 = _tuple$220[0]; - x443 = _tuple$220[1]; - x445 = new $Uint64(0, 0); - _tuple$221 = bits.Add64(x394, x426, new $Uint64(0, 0)); - x445 = _tuple$221[1]; - x446 = new $Uint64(0, 0); - x447 = new $Uint64(0, 0); - _tuple$222 = bits.Add64(x396, x428, ((x$179 = (new p521Uint1(x445.$high, x445.$low)), new $Uint64(x$179.$high, x$179.$low)))); - x446 = _tuple$222[0]; - x447 = _tuple$222[1]; - x448 = new $Uint64(0, 0); - x449 = new $Uint64(0, 0); - _tuple$223 = bits.Add64(x398, x430, ((x$180 = (new p521Uint1(x447.$high, x447.$low)), new $Uint64(x$180.$high, x$180.$low)))); - x448 = _tuple$223[0]; - x449 = _tuple$223[1]; - x450 = new $Uint64(0, 0); - x451 = new $Uint64(0, 0); - _tuple$224 = bits.Add64(x400, x432, ((x$181 = (new p521Uint1(x449.$high, x449.$low)), new $Uint64(x$181.$high, x$181.$low)))); - x450 = _tuple$224[0]; - x451 = _tuple$224[1]; - x452 = new $Uint64(0, 0); - x453 = new $Uint64(0, 0); - _tuple$225 = bits.Add64(x402, x434, ((x$182 = (new p521Uint1(x451.$high, x451.$low)), new $Uint64(x$182.$high, x$182.$low)))); - x452 = _tuple$225[0]; - x453 = _tuple$225[1]; - x454 = new $Uint64(0, 0); - x455 = new $Uint64(0, 0); - _tuple$226 = bits.Add64(x404, x436, ((x$183 = (new p521Uint1(x453.$high, x453.$low)), new $Uint64(x$183.$high, x$183.$low)))); - x454 = _tuple$226[0]; - x455 = _tuple$226[1]; - x456 = new $Uint64(0, 0); - x457 = new $Uint64(0, 0); - _tuple$227 = bits.Add64(x406, x438, ((x$184 = (new p521Uint1(x455.$high, x455.$low)), new $Uint64(x$184.$high, x$184.$low)))); - x456 = _tuple$227[0]; - x457 = _tuple$227[1]; - x458 = new $Uint64(0, 0); - x459 = new $Uint64(0, 0); - _tuple$228 = bits.Add64(x408, x440, ((x$185 = (new p521Uint1(x457.$high, x457.$low)), new $Uint64(x$185.$high, x$185.$low)))); - x458 = _tuple$228[0]; - x459 = _tuple$228[1]; - x460 = new $Uint64(0, 0); - x461 = new $Uint64(0, 0); - _tuple$229 = bits.Add64((x$186 = ((x$187 = (new p521Uint1(x409.$high, x409.$low)), new $Uint64(x$187.$high, x$187.$low))), x$188 = (x$189 = ((x$190 = (new p521Uint1(x393.$high, x393.$low)), new $Uint64(x$190.$high, x$190.$low))), x$191 = (x$192 = ((x$193 = (new p521Uint1(x375.$high, x375.$low)), new $Uint64(x$193.$high, x$193.$low))), new $Uint64(x$192.$high + x343.$high, x$192.$low + x343.$low)), new $Uint64(x$189.$high + x$191.$high, x$189.$low + x$191.$low)), new $Uint64(x$186.$high + x$188.$high, x$186.$low + x$188.$low)), x442, ((x$194 = (new p521Uint1(x459.$high, x459.$low)), new $Uint64(x$194.$high, x$194.$low)))); - x460 = _tuple$229[0]; - x461 = _tuple$229[1]; - x462 = new $Uint64(0, 0); - x463 = new $Uint64(0, 0); - _tuple$230 = bits.Add64(x446, arg1[7], new $Uint64(0, 0)); - x462 = _tuple$230[0]; - x463 = _tuple$230[1]; - x464 = new $Uint64(0, 0); - x465 = new $Uint64(0, 0); - _tuple$231 = bits.Add64(x448, new $Uint64(0, 0), ((x$195 = (new p521Uint1(x463.$high, x463.$low)), new $Uint64(x$195.$high, x$195.$low)))); - x464 = _tuple$231[0]; - x465 = _tuple$231[1]; - x466 = new $Uint64(0, 0); - x467 = new $Uint64(0, 0); - _tuple$232 = bits.Add64(x450, new $Uint64(0, 0), ((x$196 = (new p521Uint1(x465.$high, x465.$low)), new $Uint64(x$196.$high, x$196.$low)))); - x466 = _tuple$232[0]; - x467 = _tuple$232[1]; - x468 = new $Uint64(0, 0); - x469 = new $Uint64(0, 0); - _tuple$233 = bits.Add64(x452, new $Uint64(0, 0), ((x$197 = (new p521Uint1(x467.$high, x467.$low)), new $Uint64(x$197.$high, x$197.$low)))); - x468 = _tuple$233[0]; - x469 = _tuple$233[1]; - x470 = new $Uint64(0, 0); - x471 = new $Uint64(0, 0); - _tuple$234 = bits.Add64(x454, new $Uint64(0, 0), ((x$198 = (new p521Uint1(x469.$high, x469.$low)), new $Uint64(x$198.$high, x$198.$low)))); - x470 = _tuple$234[0]; - x471 = _tuple$234[1]; - x472 = new $Uint64(0, 0); - x473 = new $Uint64(0, 0); - _tuple$235 = bits.Add64(x456, new $Uint64(0, 0), ((x$199 = (new p521Uint1(x471.$high, x471.$low)), new $Uint64(x$199.$high, x$199.$low)))); - x472 = _tuple$235[0]; - x473 = _tuple$235[1]; - x474 = new $Uint64(0, 0); - x475 = new $Uint64(0, 0); - _tuple$236 = bits.Add64(x458, new $Uint64(0, 0), ((x$200 = (new p521Uint1(x473.$high, x473.$low)), new $Uint64(x$200.$high, x$200.$low)))); - x474 = _tuple$236[0]; - x475 = _tuple$236[1]; - x476 = new $Uint64(0, 0); - x477 = new $Uint64(0, 0); - _tuple$237 = bits.Add64(x460, new $Uint64(0, 0), ((x$201 = (new p521Uint1(x475.$high, x475.$low)), new $Uint64(x$201.$high, x$201.$low)))); - x476 = _tuple$237[0]; - x477 = _tuple$237[1]; - x478 = new $Uint64(0, 0); - x479 = new $Uint64(0, 0); - _tuple$238 = bits.Mul64(x462, new $Uint64(0, 511)); - x479 = _tuple$238[0]; - x478 = _tuple$238[1]; - x480 = new $Uint64(0, 0); - x481 = new $Uint64(0, 0); - _tuple$239 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x481 = _tuple$239[0]; - x480 = _tuple$239[1]; - x482 = new $Uint64(0, 0); - x483 = new $Uint64(0, 0); - _tuple$240 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x483 = _tuple$240[0]; - x482 = _tuple$240[1]; - x484 = new $Uint64(0, 0); - x485 = new $Uint64(0, 0); - _tuple$241 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x485 = _tuple$241[0]; - x484 = _tuple$241[1]; - x486 = new $Uint64(0, 0); - x487 = new $Uint64(0, 0); - _tuple$242 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x487 = _tuple$242[0]; - x486 = _tuple$242[1]; - x488 = new $Uint64(0, 0); - x489 = new $Uint64(0, 0); - _tuple$243 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x489 = _tuple$243[0]; - x488 = _tuple$243[1]; - x490 = new $Uint64(0, 0); - x491 = new $Uint64(0, 0); - _tuple$244 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x491 = _tuple$244[0]; - x490 = _tuple$244[1]; - x492 = new $Uint64(0, 0); - x493 = new $Uint64(0, 0); - _tuple$245 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x493 = _tuple$245[0]; - x492 = _tuple$245[1]; - x494 = new $Uint64(0, 0); - x495 = new $Uint64(0, 0); - _tuple$246 = bits.Mul64(x462, new $Uint64(4294967295, 4294967295)); - x495 = _tuple$246[0]; - x494 = _tuple$246[1]; - x496 = new $Uint64(0, 0); - x497 = new $Uint64(0, 0); - _tuple$247 = bits.Add64(x495, x492, new $Uint64(0, 0)); - x496 = _tuple$247[0]; - x497 = _tuple$247[1]; - x498 = new $Uint64(0, 0); - x499 = new $Uint64(0, 0); - _tuple$248 = bits.Add64(x493, x490, ((x$202 = (new p521Uint1(x497.$high, x497.$low)), new $Uint64(x$202.$high, x$202.$low)))); - x498 = _tuple$248[0]; - x499 = _tuple$248[1]; - x500 = new $Uint64(0, 0); - x501 = new $Uint64(0, 0); - _tuple$249 = bits.Add64(x491, x488, ((x$203 = (new p521Uint1(x499.$high, x499.$low)), new $Uint64(x$203.$high, x$203.$low)))); - x500 = _tuple$249[0]; - x501 = _tuple$249[1]; - x502 = new $Uint64(0, 0); - x503 = new $Uint64(0, 0); - _tuple$250 = bits.Add64(x489, x486, ((x$204 = (new p521Uint1(x501.$high, x501.$low)), new $Uint64(x$204.$high, x$204.$low)))); - x502 = _tuple$250[0]; - x503 = _tuple$250[1]; - x504 = new $Uint64(0, 0); - x505 = new $Uint64(0, 0); - _tuple$251 = bits.Add64(x487, x484, ((x$205 = (new p521Uint1(x503.$high, x503.$low)), new $Uint64(x$205.$high, x$205.$low)))); - x504 = _tuple$251[0]; - x505 = _tuple$251[1]; - x506 = new $Uint64(0, 0); - x507 = new $Uint64(0, 0); - _tuple$252 = bits.Add64(x485, x482, ((x$206 = (new p521Uint1(x505.$high, x505.$low)), new $Uint64(x$206.$high, x$206.$low)))); - x506 = _tuple$252[0]; - x507 = _tuple$252[1]; - x508 = new $Uint64(0, 0); - x509 = new $Uint64(0, 0); - _tuple$253 = bits.Add64(x483, x480, ((x$207 = (new p521Uint1(x507.$high, x507.$low)), new $Uint64(x$207.$high, x$207.$low)))); - x508 = _tuple$253[0]; - x509 = _tuple$253[1]; - x510 = new $Uint64(0, 0); - x511 = new $Uint64(0, 0); - _tuple$254 = bits.Add64(x481, x478, ((x$208 = (new p521Uint1(x509.$high, x509.$low)), new $Uint64(x$208.$high, x$208.$low)))); - x510 = _tuple$254[0]; - x511 = _tuple$254[1]; - x513 = new $Uint64(0, 0); - _tuple$255 = bits.Add64(x462, x494, new $Uint64(0, 0)); - x513 = _tuple$255[1]; - x514 = new $Uint64(0, 0); - x515 = new $Uint64(0, 0); - _tuple$256 = bits.Add64(x464, x496, ((x$209 = (new p521Uint1(x513.$high, x513.$low)), new $Uint64(x$209.$high, x$209.$low)))); - x514 = _tuple$256[0]; - x515 = _tuple$256[1]; - x516 = new $Uint64(0, 0); - x517 = new $Uint64(0, 0); - _tuple$257 = bits.Add64(x466, x498, ((x$210 = (new p521Uint1(x515.$high, x515.$low)), new $Uint64(x$210.$high, x$210.$low)))); - x516 = _tuple$257[0]; - x517 = _tuple$257[1]; - x518 = new $Uint64(0, 0); - x519 = new $Uint64(0, 0); - _tuple$258 = bits.Add64(x468, x500, ((x$211 = (new p521Uint1(x517.$high, x517.$low)), new $Uint64(x$211.$high, x$211.$low)))); - x518 = _tuple$258[0]; - x519 = _tuple$258[1]; - x520 = new $Uint64(0, 0); - x521 = new $Uint64(0, 0); - _tuple$259 = bits.Add64(x470, x502, ((x$212 = (new p521Uint1(x519.$high, x519.$low)), new $Uint64(x$212.$high, x$212.$low)))); - x520 = _tuple$259[0]; - x521 = _tuple$259[1]; - x522 = new $Uint64(0, 0); - x523 = new $Uint64(0, 0); - _tuple$260 = bits.Add64(x472, x504, ((x$213 = (new p521Uint1(x521.$high, x521.$low)), new $Uint64(x$213.$high, x$213.$low)))); - x522 = _tuple$260[0]; - x523 = _tuple$260[1]; - x524 = new $Uint64(0, 0); - x525 = new $Uint64(0, 0); - _tuple$261 = bits.Add64(x474, x506, ((x$214 = (new p521Uint1(x523.$high, x523.$low)), new $Uint64(x$214.$high, x$214.$low)))); - x524 = _tuple$261[0]; - x525 = _tuple$261[1]; - x526 = new $Uint64(0, 0); - x527 = new $Uint64(0, 0); - _tuple$262 = bits.Add64(x476, x508, ((x$215 = (new p521Uint1(x525.$high, x525.$low)), new $Uint64(x$215.$high, x$215.$low)))); - x526 = _tuple$262[0]; - x527 = _tuple$262[1]; - x528 = new $Uint64(0, 0); - x529 = new $Uint64(0, 0); - _tuple$263 = bits.Add64((x$216 = ((x$217 = (new p521Uint1(x477.$high, x477.$low)), new $Uint64(x$217.$high, x$217.$low))), x$218 = (x$219 = ((x$220 = (new p521Uint1(x461.$high, x461.$low)), new $Uint64(x$220.$high, x$220.$low))), x$221 = (x$222 = ((x$223 = (new p521Uint1(x443.$high, x443.$low)), new $Uint64(x$223.$high, x$223.$low))), new $Uint64(x$222.$high + x411.$high, x$222.$low + x411.$low)), new $Uint64(x$219.$high + x$221.$high, x$219.$low + x$221.$low)), new $Uint64(x$216.$high + x$218.$high, x$216.$low + x$218.$low)), x510, ((x$224 = (new p521Uint1(x527.$high, x527.$low)), new $Uint64(x$224.$high, x$224.$low)))); - x528 = _tuple$263[0]; - x529 = _tuple$263[1]; - x530 = new $Uint64(0, 0); - x531 = new $Uint64(0, 0); - _tuple$264 = bits.Add64(x514, arg1[8], new $Uint64(0, 0)); - x530 = _tuple$264[0]; - x531 = _tuple$264[1]; - x532 = new $Uint64(0, 0); - x533 = new $Uint64(0, 0); - _tuple$265 = bits.Add64(x516, new $Uint64(0, 0), ((x$225 = (new p521Uint1(x531.$high, x531.$low)), new $Uint64(x$225.$high, x$225.$low)))); - x532 = _tuple$265[0]; - x533 = _tuple$265[1]; - x534 = new $Uint64(0, 0); - x535 = new $Uint64(0, 0); - _tuple$266 = bits.Add64(x518, new $Uint64(0, 0), ((x$226 = (new p521Uint1(x533.$high, x533.$low)), new $Uint64(x$226.$high, x$226.$low)))); - x534 = _tuple$266[0]; - x535 = _tuple$266[1]; - x536 = new $Uint64(0, 0); - x537 = new $Uint64(0, 0); - _tuple$267 = bits.Add64(x520, new $Uint64(0, 0), ((x$227 = (new p521Uint1(x535.$high, x535.$low)), new $Uint64(x$227.$high, x$227.$low)))); - x536 = _tuple$267[0]; - x537 = _tuple$267[1]; - x538 = new $Uint64(0, 0); - x539 = new $Uint64(0, 0); - _tuple$268 = bits.Add64(x522, new $Uint64(0, 0), ((x$228 = (new p521Uint1(x537.$high, x537.$low)), new $Uint64(x$228.$high, x$228.$low)))); - x538 = _tuple$268[0]; - x539 = _tuple$268[1]; - x540 = new $Uint64(0, 0); - x541 = new $Uint64(0, 0); - _tuple$269 = bits.Add64(x524, new $Uint64(0, 0), ((x$229 = (new p521Uint1(x539.$high, x539.$low)), new $Uint64(x$229.$high, x$229.$low)))); - x540 = _tuple$269[0]; - x541 = _tuple$269[1]; - x542 = new $Uint64(0, 0); - x543 = new $Uint64(0, 0); - _tuple$270 = bits.Add64(x526, new $Uint64(0, 0), ((x$230 = (new p521Uint1(x541.$high, x541.$low)), new $Uint64(x$230.$high, x$230.$low)))); - x542 = _tuple$270[0]; - x543 = _tuple$270[1]; - x544 = new $Uint64(0, 0); - x545 = new $Uint64(0, 0); - _tuple$271 = bits.Add64(x528, new $Uint64(0, 0), ((x$231 = (new p521Uint1(x543.$high, x543.$low)), new $Uint64(x$231.$high, x$231.$low)))); - x544 = _tuple$271[0]; - x545 = _tuple$271[1]; - x546 = new $Uint64(0, 0); - x547 = new $Uint64(0, 0); - _tuple$272 = bits.Mul64(x530, new $Uint64(0, 511)); - x547 = _tuple$272[0]; - x546 = _tuple$272[1]; - x548 = new $Uint64(0, 0); - x549 = new $Uint64(0, 0); - _tuple$273 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x549 = _tuple$273[0]; - x548 = _tuple$273[1]; - x550 = new $Uint64(0, 0); - x551 = new $Uint64(0, 0); - _tuple$274 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x551 = _tuple$274[0]; - x550 = _tuple$274[1]; - x552 = new $Uint64(0, 0); - x553 = new $Uint64(0, 0); - _tuple$275 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x553 = _tuple$275[0]; - x552 = _tuple$275[1]; - x554 = new $Uint64(0, 0); - x555 = new $Uint64(0, 0); - _tuple$276 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x555 = _tuple$276[0]; - x554 = _tuple$276[1]; - x556 = new $Uint64(0, 0); - x557 = new $Uint64(0, 0); - _tuple$277 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x557 = _tuple$277[0]; - x556 = _tuple$277[1]; - x558 = new $Uint64(0, 0); - x559 = new $Uint64(0, 0); - _tuple$278 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x559 = _tuple$278[0]; - x558 = _tuple$278[1]; - x560 = new $Uint64(0, 0); - x561 = new $Uint64(0, 0); - _tuple$279 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x561 = _tuple$279[0]; - x560 = _tuple$279[1]; - x562 = new $Uint64(0, 0); - x563 = new $Uint64(0, 0); - _tuple$280 = bits.Mul64(x530, new $Uint64(4294967295, 4294967295)); - x563 = _tuple$280[0]; - x562 = _tuple$280[1]; - x564 = new $Uint64(0, 0); - x565 = new $Uint64(0, 0); - _tuple$281 = bits.Add64(x563, x560, new $Uint64(0, 0)); - x564 = _tuple$281[0]; - x565 = _tuple$281[1]; - x566 = new $Uint64(0, 0); - x567 = new $Uint64(0, 0); - _tuple$282 = bits.Add64(x561, x558, ((x$232 = (new p521Uint1(x565.$high, x565.$low)), new $Uint64(x$232.$high, x$232.$low)))); - x566 = _tuple$282[0]; - x567 = _tuple$282[1]; - x568 = new $Uint64(0, 0); - x569 = new $Uint64(0, 0); - _tuple$283 = bits.Add64(x559, x556, ((x$233 = (new p521Uint1(x567.$high, x567.$low)), new $Uint64(x$233.$high, x$233.$low)))); - x568 = _tuple$283[0]; - x569 = _tuple$283[1]; - x570 = new $Uint64(0, 0); - x571 = new $Uint64(0, 0); - _tuple$284 = bits.Add64(x557, x554, ((x$234 = (new p521Uint1(x569.$high, x569.$low)), new $Uint64(x$234.$high, x$234.$low)))); - x570 = _tuple$284[0]; - x571 = _tuple$284[1]; - x572 = new $Uint64(0, 0); - x573 = new $Uint64(0, 0); - _tuple$285 = bits.Add64(x555, x552, ((x$235 = (new p521Uint1(x571.$high, x571.$low)), new $Uint64(x$235.$high, x$235.$low)))); - x572 = _tuple$285[0]; - x573 = _tuple$285[1]; - x574 = new $Uint64(0, 0); - x575 = new $Uint64(0, 0); - _tuple$286 = bits.Add64(x553, x550, ((x$236 = (new p521Uint1(x573.$high, x573.$low)), new $Uint64(x$236.$high, x$236.$low)))); - x574 = _tuple$286[0]; - x575 = _tuple$286[1]; - x576 = new $Uint64(0, 0); - x577 = new $Uint64(0, 0); - _tuple$287 = bits.Add64(x551, x548, ((x$237 = (new p521Uint1(x575.$high, x575.$low)), new $Uint64(x$237.$high, x$237.$low)))); - x576 = _tuple$287[0]; - x577 = _tuple$287[1]; - x578 = new $Uint64(0, 0); - x579 = new $Uint64(0, 0); - _tuple$288 = bits.Add64(x549, x546, ((x$238 = (new p521Uint1(x577.$high, x577.$low)), new $Uint64(x$238.$high, x$238.$low)))); - x578 = _tuple$288[0]; - x579 = _tuple$288[1]; - x581 = new $Uint64(0, 0); - _tuple$289 = bits.Add64(x530, x562, new $Uint64(0, 0)); - x581 = _tuple$289[1]; - x582 = new $Uint64(0, 0); - x583 = new $Uint64(0, 0); - _tuple$290 = bits.Add64(x532, x564, ((x$239 = (new p521Uint1(x581.$high, x581.$low)), new $Uint64(x$239.$high, x$239.$low)))); - x582 = _tuple$290[0]; - x583 = _tuple$290[1]; - x584 = new $Uint64(0, 0); - x585 = new $Uint64(0, 0); - _tuple$291 = bits.Add64(x534, x566, ((x$240 = (new p521Uint1(x583.$high, x583.$low)), new $Uint64(x$240.$high, x$240.$low)))); - x584 = _tuple$291[0]; - x585 = _tuple$291[1]; - x586 = new $Uint64(0, 0); - x587 = new $Uint64(0, 0); - _tuple$292 = bits.Add64(x536, x568, ((x$241 = (new p521Uint1(x585.$high, x585.$low)), new $Uint64(x$241.$high, x$241.$low)))); - x586 = _tuple$292[0]; - x587 = _tuple$292[1]; - x588 = new $Uint64(0, 0); - x589 = new $Uint64(0, 0); - _tuple$293 = bits.Add64(x538, x570, ((x$242 = (new p521Uint1(x587.$high, x587.$low)), new $Uint64(x$242.$high, x$242.$low)))); - x588 = _tuple$293[0]; - x589 = _tuple$293[1]; - x590 = new $Uint64(0, 0); - x591 = new $Uint64(0, 0); - _tuple$294 = bits.Add64(x540, x572, ((x$243 = (new p521Uint1(x589.$high, x589.$low)), new $Uint64(x$243.$high, x$243.$low)))); - x590 = _tuple$294[0]; - x591 = _tuple$294[1]; - x592 = new $Uint64(0, 0); - x593 = new $Uint64(0, 0); - _tuple$295 = bits.Add64(x542, x574, ((x$244 = (new p521Uint1(x591.$high, x591.$low)), new $Uint64(x$244.$high, x$244.$low)))); - x592 = _tuple$295[0]; - x593 = _tuple$295[1]; - x594 = new $Uint64(0, 0); - x595 = new $Uint64(0, 0); - _tuple$296 = bits.Add64(x544, x576, ((x$245 = (new p521Uint1(x593.$high, x593.$low)), new $Uint64(x$245.$high, x$245.$low)))); - x594 = _tuple$296[0]; - x595 = _tuple$296[1]; - x596 = new $Uint64(0, 0); - x597 = new $Uint64(0, 0); - _tuple$297 = bits.Add64((x$246 = ((x$247 = (new p521Uint1(x545.$high, x545.$low)), new $Uint64(x$247.$high, x$247.$low))), x$248 = (x$249 = ((x$250 = (new p521Uint1(x529.$high, x529.$low)), new $Uint64(x$250.$high, x$250.$low))), x$251 = (x$252 = ((x$253 = (new p521Uint1(x511.$high, x511.$low)), new $Uint64(x$253.$high, x$253.$low))), new $Uint64(x$252.$high + x479.$high, x$252.$low + x479.$low)), new $Uint64(x$249.$high + x$251.$high, x$249.$low + x$251.$low)), new $Uint64(x$246.$high + x$248.$high, x$246.$low + x$248.$low)), x578, ((x$254 = (new p521Uint1(x595.$high, x595.$low)), new $Uint64(x$254.$high, x$254.$low)))); - x596 = _tuple$297[0]; - x597 = _tuple$297[1]; - x598 = (x$255 = ((x$256 = (new p521Uint1(x597.$high, x597.$low)), new $Uint64(x$256.$high, x$256.$low))), x$257 = (x$258 = ((x$259 = (new p521Uint1(x579.$high, x579.$low)), new $Uint64(x$259.$high, x$259.$low))), new $Uint64(x$258.$high + x547.$high, x$258.$low + x547.$low)), new $Uint64(x$255.$high + x$257.$high, x$255.$low + x$257.$low)); - x599 = new $Uint64(0, 0); - x600 = new $Uint64(0, 0); - _tuple$298 = bits.Sub64(x582, new $Uint64(4294967295, 4294967295), new $Uint64(0, 0)); - x599 = _tuple$298[0]; - x600 = _tuple$298[1]; - x601 = new $Uint64(0, 0); - x602 = new $Uint64(0, 0); - _tuple$299 = bits.Sub64(x584, new $Uint64(4294967295, 4294967295), ((x$260 = (new p521Uint1(x600.$high, x600.$low)), new $Uint64(x$260.$high, x$260.$low)))); - x601 = _tuple$299[0]; - x602 = _tuple$299[1]; - x603 = new $Uint64(0, 0); - x604 = new $Uint64(0, 0); - _tuple$300 = bits.Sub64(x586, new $Uint64(4294967295, 4294967295), ((x$261 = (new p521Uint1(x602.$high, x602.$low)), new $Uint64(x$261.$high, x$261.$low)))); - x603 = _tuple$300[0]; - x604 = _tuple$300[1]; - x605 = new $Uint64(0, 0); - x606 = new $Uint64(0, 0); - _tuple$301 = bits.Sub64(x588, new $Uint64(4294967295, 4294967295), ((x$262 = (new p521Uint1(x604.$high, x604.$low)), new $Uint64(x$262.$high, x$262.$low)))); - x605 = _tuple$301[0]; - x606 = _tuple$301[1]; - x607 = new $Uint64(0, 0); - x608 = new $Uint64(0, 0); - _tuple$302 = bits.Sub64(x590, new $Uint64(4294967295, 4294967295), ((x$263 = (new p521Uint1(x606.$high, x606.$low)), new $Uint64(x$263.$high, x$263.$low)))); - x607 = _tuple$302[0]; - x608 = _tuple$302[1]; - x609 = new $Uint64(0, 0); - x610 = new $Uint64(0, 0); - _tuple$303 = bits.Sub64(x592, new $Uint64(4294967295, 4294967295), ((x$264 = (new p521Uint1(x608.$high, x608.$low)), new $Uint64(x$264.$high, x$264.$low)))); - x609 = _tuple$303[0]; - x610 = _tuple$303[1]; - x611 = new $Uint64(0, 0); - x612 = new $Uint64(0, 0); - _tuple$304 = bits.Sub64(x594, new $Uint64(4294967295, 4294967295), ((x$265 = (new p521Uint1(x610.$high, x610.$low)), new $Uint64(x$265.$high, x$265.$low)))); - x611 = _tuple$304[0]; - x612 = _tuple$304[1]; - x613 = new $Uint64(0, 0); - x614 = new $Uint64(0, 0); - _tuple$305 = bits.Sub64(x596, new $Uint64(4294967295, 4294967295), ((x$266 = (new p521Uint1(x612.$high, x612.$low)), new $Uint64(x$266.$high, x$266.$low)))); - x613 = _tuple$305[0]; - x614 = _tuple$305[1]; - x615 = new $Uint64(0, 0); - x616 = new $Uint64(0, 0); - _tuple$306 = bits.Sub64(x598, new $Uint64(0, 511), ((x$267 = (new p521Uint1(x614.$high, x614.$low)), new $Uint64(x$267.$high, x$267.$low)))); - x615 = _tuple$306[0]; - x616 = _tuple$306[1]; - x618 = new $Uint64(0, 0); - _tuple$307 = bits.Sub64(new $Uint64(0, 0), new $Uint64(0, 0), ((x$268 = (new p521Uint1(x616.$high, x616.$low)), new $Uint64(x$268.$high, x$268.$low)))); - x618 = _tuple$307[1]; - x619 = new $Uint64(0, 0); - p521CmovznzU64((x619$24ptr || (x619$24ptr = new ptrType(function() { return x619; }, function($v) { x619 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x599, x582); - x620 = new $Uint64(0, 0); - p521CmovznzU64((x620$24ptr || (x620$24ptr = new ptrType(function() { return x620; }, function($v) { x620 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x601, x584); - x621 = new $Uint64(0, 0); - p521CmovznzU64((x621$24ptr || (x621$24ptr = new ptrType(function() { return x621; }, function($v) { x621 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x603, x586); - x622 = new $Uint64(0, 0); - p521CmovznzU64((x622$24ptr || (x622$24ptr = new ptrType(function() { return x622; }, function($v) { x622 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x605, x588); - x623 = new $Uint64(0, 0); - p521CmovznzU64((x623$24ptr || (x623$24ptr = new ptrType(function() { return x623; }, function($v) { x623 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x607, x590); - x624 = new $Uint64(0, 0); - p521CmovznzU64((x624$24ptr || (x624$24ptr = new ptrType(function() { return x624; }, function($v) { x624 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x609, x592); - x625 = new $Uint64(0, 0); - p521CmovznzU64((x625$24ptr || (x625$24ptr = new ptrType(function() { return x625; }, function($v) { x625 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x611, x594); - x626 = new $Uint64(0, 0); - p521CmovznzU64((x626$24ptr || (x626$24ptr = new ptrType(function() { return x626; }, function($v) { x626 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x613, x596); - x627 = new $Uint64(0, 0); - p521CmovznzU64((x627$24ptr || (x627$24ptr = new ptrType(function() { return x627; }, function($v) { x627 = $v; }))), (new p521Uint1(x618.$high, x618.$low)), x615, x598); - out1.nilCheck, out1[0] = x619; - out1.nilCheck, out1[1] = x620; - out1.nilCheck, out1[2] = x621; - out1.nilCheck, out1[3] = x622; - out1.nilCheck, out1[4] = x623; - out1.nilCheck, out1[5] = x624; - out1.nilCheck, out1[6] = x625; - out1.nilCheck, out1[7] = x626; - out1.nilCheck, out1[8] = x627; - }; - p521ToMontgomery = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$199, _tuple$2, _tuple$20, _tuple$200, _tuple$201, _tuple$202, _tuple$203, _tuple$204, _tuple$205, _tuple$206, _tuple$207, _tuple$208, _tuple$209, _tuple$21, _tuple$210, _tuple$211, _tuple$212, _tuple$213, _tuple$214, _tuple$215, _tuple$216, _tuple$217, _tuple$218, _tuple$219, _tuple$22, _tuple$220, _tuple$221, _tuple$222, _tuple$223, _tuple$224, _tuple$225, _tuple$226, _tuple$227, _tuple$228, _tuple$229, _tuple$23, _tuple$230, _tuple$231, _tuple$232, _tuple$233, _tuple$234, _tuple$235, _tuple$236, _tuple$237, _tuple$238, _tuple$239, _tuple$24, _tuple$240, _tuple$241, _tuple$242, _tuple$243, _tuple$244, _tuple$245, _tuple$246, _tuple$247, _tuple$248, _tuple$249, _tuple$25, _tuple$250, _tuple$251, _tuple$252, _tuple$253, _tuple$254, _tuple$255, _tuple$256, _tuple$257, _tuple$258, _tuple$259, _tuple$26, _tuple$260, _tuple$261, _tuple$262, _tuple$263, _tuple$264, _tuple$265, _tuple$266, _tuple$267, _tuple$268, _tuple$269, _tuple$27, _tuple$270, _tuple$271, _tuple$272, _tuple$273, _tuple$274, _tuple$275, _tuple$276, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$165, x$166, x$167, x$168, x$169, x$17, x$170, x$171, x$172, x$173, x$174, x$175, x$176, x$177, x$178, x$179, x$18, x$180, x$181, x$182, x$183, x$184, x$185, x$186, x$187, x$188, x$189, x$19, x$190, x$191, x$192, x$193, x$194, x$195, x$196, x$197, x$198, x$199, x$2, x$20, x$200, x$201, x$202, x$203, x$204, x$205, x$206, x$207, x$208, x$209, x$21, x$210, x$211, x$212, x$213, x$214, x$215, x$216, x$217, x$218, x$219, x$22, x$220, x$221, x$222, x$223, x$224, x$225, x$226, x$227, x$228, x$229, x$23, x$230, x$231, x$232, x$233, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x178, x179, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x208, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x240, x241, x242, x243, x244, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x261, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x285, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x301, x302, x303, x304, x305, x306, x307, x308, x309, x31, x310, x311, x312, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x338, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x354, x355, x356, x357, x358, x359, x36, x360, x361, x362, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x376, x377, x378, x379, x38, x380, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x403, x404, x405, x406, x407, x408, x409, x410, x411, x412, x413, x414, x415, x416, x417, x418, x419, x42, x420, x421, x422, x423, x424, x425, x426, x427, x428, x429, x43, x430, x431, x432, x433, x434, x435, x436, x437, x438, x439, x44, x440, x441, x442, x443, x444, x445, x446, x447, x448, x45, x450, x451, x452, x453, x454, x455, x456, x457, x458, x459, x46, x460, x461, x462, x463, x464, x465, x466, x467, x468, x469, x47, x470, x471, x472, x473, x474, x475, x476, x477, x478, x479, x48, x480, x481, x482, x483, x484, x485, x486, x487, x488, x489, x49, x490, x491, x492, x493, x494, x495, x496, x497, x498, x499, x5, x50, x500, x501, x502, x503, x504, x505, x506, x507, x508, x509, x51, x510, x511, x512, x513, x514, x515, x516, x518, x519, x52, x520, x521, x522, x523, x524, x525, x526, x527, x528, x529, x53, x530, x531, x532, x533, x534, x535, x536, x537, x538, x539, x54, x540, x541, x542, x543, x544, x545, x546, x547, x548, x549, x55, x550, x551, x552, x553, x555, x556, x556$24ptr, x557, x557$24ptr, x558, x558$24ptr, x559, x559$24ptr, x56, x560, x560$24ptr, x561, x561$24ptr, x562, x562$24ptr, x563, x563$24ptr, x564, x564$24ptr, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Mul64(arg1[0], new $Uint64(16384, 0)); - x2 = _tuple[0]; - x1 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(arg1[1], new $Uint64(16384, 0)); - x4 = _tuple$1[0]; - x3 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Add64(x2, x3, new $Uint64(0, 0)); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x1, new $Uint64(0, 511)); - x8 = _tuple$3[0]; - x7 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x10 = _tuple$4[0]; - x9 = _tuple$4[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x12 = _tuple$5[0]; - x11 = _tuple$5[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$6 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x14 = _tuple$6[0]; - x13 = _tuple$6[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x16 = _tuple$7[0]; - x15 = _tuple$7[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x18 = _tuple$8[0]; - x17 = _tuple$8[1]; - x19 = new $Uint64(0, 0); - x20 = new $Uint64(0, 0); - _tuple$9 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x20 = _tuple$9[0]; - x19 = _tuple$9[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$10 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x22 = _tuple$10[0]; - x21 = _tuple$10[1]; - x23 = new $Uint64(0, 0); - x24 = new $Uint64(0, 0); - _tuple$11 = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x24 = _tuple$11[0]; - x23 = _tuple$11[1]; - x25 = new $Uint64(0, 0); - x26 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x24, x21, new $Uint64(0, 0)); - x25 = _tuple$12[0]; - x26 = _tuple$12[1]; - x27 = new $Uint64(0, 0); - x28 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x22, x19, ((x = (new p521Uint1(x26.$high, x26.$low)), new $Uint64(x.$high, x.$low)))); - x27 = _tuple$13[0]; - x28 = _tuple$13[1]; - x29 = new $Uint64(0, 0); - x30 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x20, x17, ((x$1 = (new p521Uint1(x28.$high, x28.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x29 = _tuple$14[0]; - x30 = _tuple$14[1]; - x31 = new $Uint64(0, 0); - x32 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x18, x15, ((x$2 = (new p521Uint1(x30.$high, x30.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x31 = _tuple$15[0]; - x32 = _tuple$15[1]; - x33 = new $Uint64(0, 0); - x34 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x16, x13, ((x$3 = (new p521Uint1(x32.$high, x32.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x33 = _tuple$16[0]; - x34 = _tuple$16[1]; - x35 = new $Uint64(0, 0); - x36 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x14, x11, ((x$4 = (new p521Uint1(x34.$high, x34.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x35 = _tuple$17[0]; - x36 = _tuple$17[1]; - x37 = new $Uint64(0, 0); - x38 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(x12, x9, ((x$5 = (new p521Uint1(x36.$high, x36.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x37 = _tuple$18[0]; - x38 = _tuple$18[1]; - x39 = new $Uint64(0, 0); - x40 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(x10, x7, ((x$6 = (new p521Uint1(x38.$high, x38.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x39 = _tuple$19[0]; - x40 = _tuple$19[1]; - x42 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(x1, x23, new $Uint64(0, 0)); - x42 = _tuple$20[1]; - x43 = new $Uint64(0, 0); - x44 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x5, x25, ((x$7 = (new p521Uint1(x42.$high, x42.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x43 = _tuple$21[0]; - x44 = _tuple$21[1]; - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$22 = bits.Add64((x$8 = ((x$9 = (new p521Uint1(x6.$high, x6.$low)), new $Uint64(x$9.$high, x$9.$low))), new $Uint64(x$8.$high + x4.$high, x$8.$low + x4.$low)), x27, ((x$10 = (new p521Uint1(x44.$high, x44.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x45 = _tuple$22[0]; - x46 = _tuple$22[1]; - x47 = new $Uint64(0, 0); - x48 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(new $Uint64(0, 0), x29, ((x$11 = (new p521Uint1(x46.$high, x46.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x47 = _tuple$23[0]; - x48 = _tuple$23[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(new $Uint64(0, 0), x31, ((x$12 = (new p521Uint1(x48.$high, x48.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x49 = _tuple$24[0]; - x50 = _tuple$24[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(new $Uint64(0, 0), x33, ((x$13 = (new p521Uint1(x50.$high, x50.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x51 = _tuple$25[0]; - x52 = _tuple$25[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(new $Uint64(0, 0), x35, ((x$14 = (new p521Uint1(x52.$high, x52.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x53 = _tuple$26[0]; - x54 = _tuple$26[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(new $Uint64(0, 0), x37, ((x$15 = (new p521Uint1(x54.$high, x54.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x55 = _tuple$27[0]; - x56 = _tuple$27[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(new $Uint64(0, 0), x39, ((x$16 = (new p521Uint1(x56.$high, x56.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x57 = _tuple$28[0]; - x58 = _tuple$28[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$29 = bits.Mul64(arg1[2], new $Uint64(16384, 0)); - x60 = _tuple$29[0]; - x59 = _tuple$29[1]; - x61 = new $Uint64(0, 0); - x62 = new $Uint64(0, 0); - _tuple$30 = bits.Add64(x45, x59, new $Uint64(0, 0)); - x61 = _tuple$30[0]; - x62 = _tuple$30[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$31 = bits.Add64(x47, x60, ((x$17 = (new p521Uint1(x62.$high, x62.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x63 = _tuple$31[0]; - x64 = _tuple$31[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x49, new $Uint64(0, 0), ((x$18 = (new p521Uint1(x64.$high, x64.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x65 = _tuple$32[0]; - x66 = _tuple$32[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x51, new $Uint64(0, 0), ((x$19 = (new p521Uint1(x66.$high, x66.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x67 = _tuple$33[0]; - x68 = _tuple$33[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x53, new $Uint64(0, 0), ((x$20 = (new p521Uint1(x68.$high, x68.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x69 = _tuple$34[0]; - x70 = _tuple$34[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x55, new $Uint64(0, 0), ((x$21 = (new p521Uint1(x70.$high, x70.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x71 = _tuple$35[0]; - x72 = _tuple$35[1]; - x73 = new $Uint64(0, 0); - x74 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x57, new $Uint64(0, 0), ((x$22 = (new p521Uint1(x72.$high, x72.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x73 = _tuple$36[0]; - x74 = _tuple$36[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$37 = bits.Mul64(x43, new $Uint64(0, 511)); - x76 = _tuple$37[0]; - x75 = _tuple$37[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$38 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x78 = _tuple$38[0]; - x77 = _tuple$38[1]; - x79 = new $Uint64(0, 0); - x80 = new $Uint64(0, 0); - _tuple$39 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x80 = _tuple$39[0]; - x79 = _tuple$39[1]; - x81 = new $Uint64(0, 0); - x82 = new $Uint64(0, 0); - _tuple$40 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x82 = _tuple$40[0]; - x81 = _tuple$40[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x84 = _tuple$41[0]; - x83 = _tuple$41[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$42 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x86 = _tuple$42[0]; - x85 = _tuple$42[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$43 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x88 = _tuple$43[0]; - x87 = _tuple$43[1]; - x89 = new $Uint64(0, 0); - x90 = new $Uint64(0, 0); - _tuple$44 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x90 = _tuple$44[0]; - x89 = _tuple$44[1]; - x91 = new $Uint64(0, 0); - x92 = new $Uint64(0, 0); - _tuple$45 = bits.Mul64(x43, new $Uint64(4294967295, 4294967295)); - x92 = _tuple$45[0]; - x91 = _tuple$45[1]; - x93 = new $Uint64(0, 0); - x94 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x92, x89, new $Uint64(0, 0)); - x93 = _tuple$46[0]; - x94 = _tuple$46[1]; - x95 = new $Uint64(0, 0); - x96 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x90, x87, ((x$23 = (new p521Uint1(x94.$high, x94.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x95 = _tuple$47[0]; - x96 = _tuple$47[1]; - x97 = new $Uint64(0, 0); - x98 = new $Uint64(0, 0); - _tuple$48 = bits.Add64(x88, x85, ((x$24 = (new p521Uint1(x96.$high, x96.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x97 = _tuple$48[0]; - x98 = _tuple$48[1]; - x99 = new $Uint64(0, 0); - x100 = new $Uint64(0, 0); - _tuple$49 = bits.Add64(x86, x83, ((x$25 = (new p521Uint1(x98.$high, x98.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x99 = _tuple$49[0]; - x100 = _tuple$49[1]; - x101 = new $Uint64(0, 0); - x102 = new $Uint64(0, 0); - _tuple$50 = bits.Add64(x84, x81, ((x$26 = (new p521Uint1(x100.$high, x100.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x101 = _tuple$50[0]; - x102 = _tuple$50[1]; - x103 = new $Uint64(0, 0); - x104 = new $Uint64(0, 0); - _tuple$51 = bits.Add64(x82, x79, ((x$27 = (new p521Uint1(x102.$high, x102.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x103 = _tuple$51[0]; - x104 = _tuple$51[1]; - x105 = new $Uint64(0, 0); - x106 = new $Uint64(0, 0); - _tuple$52 = bits.Add64(x80, x77, ((x$28 = (new p521Uint1(x104.$high, x104.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x105 = _tuple$52[0]; - x106 = _tuple$52[1]; - x107 = new $Uint64(0, 0); - x108 = new $Uint64(0, 0); - _tuple$53 = bits.Add64(x78, x75, ((x$29 = (new p521Uint1(x106.$high, x106.$low)), new $Uint64(x$29.$high, x$29.$low)))); - x107 = _tuple$53[0]; - x108 = _tuple$53[1]; - x110 = new $Uint64(0, 0); - _tuple$54 = bits.Add64(x43, x91, new $Uint64(0, 0)); - x110 = _tuple$54[1]; - x111 = new $Uint64(0, 0); - x112 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x61, x93, ((x$30 = (new p521Uint1(x110.$high, x110.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x111 = _tuple$55[0]; - x112 = _tuple$55[1]; - x113 = new $Uint64(0, 0); - x114 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x63, x95, ((x$31 = (new p521Uint1(x112.$high, x112.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x113 = _tuple$56[0]; - x114 = _tuple$56[1]; - x115 = new $Uint64(0, 0); - x116 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x65, x97, ((x$32 = (new p521Uint1(x114.$high, x114.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x115 = _tuple$57[0]; - x116 = _tuple$57[1]; - x117 = new $Uint64(0, 0); - x118 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x67, x99, ((x$33 = (new p521Uint1(x116.$high, x116.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x117 = _tuple$58[0]; - x118 = _tuple$58[1]; - x119 = new $Uint64(0, 0); - x120 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x69, x101, ((x$34 = (new p521Uint1(x118.$high, x118.$low)), new $Uint64(x$34.$high, x$34.$low)))); - x119 = _tuple$59[0]; - x120 = _tuple$59[1]; - x121 = new $Uint64(0, 0); - x122 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x71, x103, ((x$35 = (new p521Uint1(x120.$high, x120.$low)), new $Uint64(x$35.$high, x$35.$low)))); - x121 = _tuple$60[0]; - x122 = _tuple$60[1]; - x123 = new $Uint64(0, 0); - x124 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x73, x105, ((x$36 = (new p521Uint1(x122.$high, x122.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x123 = _tuple$61[0]; - x124 = _tuple$61[1]; - x125 = new $Uint64(0, 0); - x126 = new $Uint64(0, 0); - _tuple$62 = bits.Add64((x$37 = ((x$38 = (new p521Uint1(x74.$high, x74.$low)), new $Uint64(x$38.$high, x$38.$low))), x$39 = (x$40 = ((x$41 = (new p521Uint1(x58.$high, x58.$low)), new $Uint64(x$41.$high, x$41.$low))), x$42 = (x$43 = ((x$44 = (new p521Uint1(x40.$high, x40.$low)), new $Uint64(x$44.$high, x$44.$low))), new $Uint64(x$43.$high + x8.$high, x$43.$low + x8.$low)), new $Uint64(x$40.$high + x$42.$high, x$40.$low + x$42.$low)), new $Uint64(x$37.$high + x$39.$high, x$37.$low + x$39.$low)), x107, ((x$45 = (new p521Uint1(x124.$high, x124.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x125 = _tuple$62[0]; - x126 = _tuple$62[1]; - x127 = new $Uint64(0, 0); - x128 = new $Uint64(0, 0); - _tuple$63 = bits.Mul64(arg1[3], new $Uint64(16384, 0)); - x128 = _tuple$63[0]; - x127 = _tuple$63[1]; - x129 = new $Uint64(0, 0); - x130 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x113, x127, new $Uint64(0, 0)); - x129 = _tuple$64[0]; - x130 = _tuple$64[1]; - x131 = new $Uint64(0, 0); - x132 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x115, x128, ((x$46 = (new p521Uint1(x130.$high, x130.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x131 = _tuple$65[0]; - x132 = _tuple$65[1]; - x133 = new $Uint64(0, 0); - x134 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x117, new $Uint64(0, 0), ((x$47 = (new p521Uint1(x132.$high, x132.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x133 = _tuple$66[0]; - x134 = _tuple$66[1]; - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x119, new $Uint64(0, 0), ((x$48 = (new p521Uint1(x134.$high, x134.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x135 = _tuple$67[0]; - x136 = _tuple$67[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x121, new $Uint64(0, 0), ((x$49 = (new p521Uint1(x136.$high, x136.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x137 = _tuple$68[0]; - x138 = _tuple$68[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x123, new $Uint64(0, 0), ((x$50 = (new p521Uint1(x138.$high, x138.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x139 = _tuple$69[0]; - x140 = _tuple$69[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(x125, new $Uint64(0, 0), ((x$51 = (new p521Uint1(x140.$high, x140.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x141 = _tuple$70[0]; - x142 = _tuple$70[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x111, new $Uint64(0, 511)); - x144 = _tuple$71[0]; - x143 = _tuple$71[1]; - x145 = new $Uint64(0, 0); - x146 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x146 = _tuple$72[0]; - x145 = _tuple$72[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$73 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x148 = _tuple$73[0]; - x147 = _tuple$73[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$74 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x150 = _tuple$74[0]; - x149 = _tuple$74[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$75 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x152 = _tuple$75[0]; - x151 = _tuple$75[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x154 = _tuple$76[0]; - x153 = _tuple$76[1]; - x155 = new $Uint64(0, 0); - x156 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x156 = _tuple$77[0]; - x155 = _tuple$77[1]; - x157 = new $Uint64(0, 0); - x158 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x158 = _tuple$78[0]; - x157 = _tuple$78[1]; - x159 = new $Uint64(0, 0); - x160 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x111, new $Uint64(4294967295, 4294967295)); - x160 = _tuple$79[0]; - x159 = _tuple$79[1]; - x161 = new $Uint64(0, 0); - x162 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x160, x157, new $Uint64(0, 0)); - x161 = _tuple$80[0]; - x162 = _tuple$80[1]; - x163 = new $Uint64(0, 0); - x164 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x158, x155, ((x$52 = (new p521Uint1(x162.$high, x162.$low)), new $Uint64(x$52.$high, x$52.$low)))); - x163 = _tuple$81[0]; - x164 = _tuple$81[1]; - x165 = new $Uint64(0, 0); - x166 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x156, x153, ((x$53 = (new p521Uint1(x164.$high, x164.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x165 = _tuple$82[0]; - x166 = _tuple$82[1]; - x167 = new $Uint64(0, 0); - x168 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x154, x151, ((x$54 = (new p521Uint1(x166.$high, x166.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x167 = _tuple$83[0]; - x168 = _tuple$83[1]; - x169 = new $Uint64(0, 0); - x170 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x152, x149, ((x$55 = (new p521Uint1(x168.$high, x168.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x169 = _tuple$84[0]; - x170 = _tuple$84[1]; - x171 = new $Uint64(0, 0); - x172 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x150, x147, ((x$56 = (new p521Uint1(x170.$high, x170.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x171 = _tuple$85[0]; - x172 = _tuple$85[1]; - x173 = new $Uint64(0, 0); - x174 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x148, x145, ((x$57 = (new p521Uint1(x172.$high, x172.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x173 = _tuple$86[0]; - x174 = _tuple$86[1]; - x175 = new $Uint64(0, 0); - x176 = new $Uint64(0, 0); - _tuple$87 = bits.Add64(x146, x143, ((x$58 = (new p521Uint1(x174.$high, x174.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x175 = _tuple$87[0]; - x176 = _tuple$87[1]; - x178 = new $Uint64(0, 0); - _tuple$88 = bits.Add64(x111, x159, new $Uint64(0, 0)); - x178 = _tuple$88[1]; - x179 = new $Uint64(0, 0); - x180 = new $Uint64(0, 0); - _tuple$89 = bits.Add64(x129, x161, ((x$59 = (new p521Uint1(x178.$high, x178.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x179 = _tuple$89[0]; - x180 = _tuple$89[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$90 = bits.Add64(x131, x163, ((x$60 = (new p521Uint1(x180.$high, x180.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x181 = _tuple$90[0]; - x182 = _tuple$90[1]; - x183 = new $Uint64(0, 0); - x184 = new $Uint64(0, 0); - _tuple$91 = bits.Add64(x133, x165, ((x$61 = (new p521Uint1(x182.$high, x182.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x183 = _tuple$91[0]; - x184 = _tuple$91[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x135, x167, ((x$62 = (new p521Uint1(x184.$high, x184.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x185 = _tuple$92[0]; - x186 = _tuple$92[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$93 = bits.Add64(x137, x169, ((x$63 = (new p521Uint1(x186.$high, x186.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x187 = _tuple$93[0]; - x188 = _tuple$93[1]; - x189 = new $Uint64(0, 0); - x190 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x139, x171, ((x$64 = (new p521Uint1(x188.$high, x188.$low)), new $Uint64(x$64.$high, x$64.$low)))); - x189 = _tuple$94[0]; - x190 = _tuple$94[1]; - x191 = new $Uint64(0, 0); - x192 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x141, x173, ((x$65 = (new p521Uint1(x190.$high, x190.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x191 = _tuple$95[0]; - x192 = _tuple$95[1]; - x193 = new $Uint64(0, 0); - x194 = new $Uint64(0, 0); - _tuple$96 = bits.Add64((x$66 = ((x$67 = (new p521Uint1(x142.$high, x142.$low)), new $Uint64(x$67.$high, x$67.$low))), x$68 = (x$69 = ((x$70 = (new p521Uint1(x126.$high, x126.$low)), new $Uint64(x$70.$high, x$70.$low))), x$71 = (x$72 = ((x$73 = (new p521Uint1(x108.$high, x108.$low)), new $Uint64(x$73.$high, x$73.$low))), new $Uint64(x$72.$high + x76.$high, x$72.$low + x76.$low)), new $Uint64(x$69.$high + x$71.$high, x$69.$low + x$71.$low)), new $Uint64(x$66.$high + x$68.$high, x$66.$low + x$68.$low)), x175, ((x$74 = (new p521Uint1(x192.$high, x192.$low)), new $Uint64(x$74.$high, x$74.$low)))); - x193 = _tuple$96[0]; - x194 = _tuple$96[1]; - x195 = new $Uint64(0, 0); - x196 = new $Uint64(0, 0); - _tuple$97 = bits.Mul64(arg1[4], new $Uint64(16384, 0)); - x196 = _tuple$97[0]; - x195 = _tuple$97[1]; - x197 = new $Uint64(0, 0); - x198 = new $Uint64(0, 0); - _tuple$98 = bits.Add64(x181, x195, new $Uint64(0, 0)); - x197 = _tuple$98[0]; - x198 = _tuple$98[1]; - x199 = new $Uint64(0, 0); - x200 = new $Uint64(0, 0); - _tuple$99 = bits.Add64(x183, x196, ((x$75 = (new p521Uint1(x198.$high, x198.$low)), new $Uint64(x$75.$high, x$75.$low)))); - x199 = _tuple$99[0]; - x200 = _tuple$99[1]; - x201 = new $Uint64(0, 0); - x202 = new $Uint64(0, 0); - _tuple$100 = bits.Add64(x185, new $Uint64(0, 0), ((x$76 = (new p521Uint1(x200.$high, x200.$low)), new $Uint64(x$76.$high, x$76.$low)))); - x201 = _tuple$100[0]; - x202 = _tuple$100[1]; - x203 = new $Uint64(0, 0); - x204 = new $Uint64(0, 0); - _tuple$101 = bits.Add64(x187, new $Uint64(0, 0), ((x$77 = (new p521Uint1(x202.$high, x202.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x203 = _tuple$101[0]; - x204 = _tuple$101[1]; - x205 = new $Uint64(0, 0); - x206 = new $Uint64(0, 0); - _tuple$102 = bits.Add64(x189, new $Uint64(0, 0), ((x$78 = (new p521Uint1(x204.$high, x204.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x205 = _tuple$102[0]; - x206 = _tuple$102[1]; - x207 = new $Uint64(0, 0); - x208 = new $Uint64(0, 0); - _tuple$103 = bits.Add64(x191, new $Uint64(0, 0), ((x$79 = (new p521Uint1(x206.$high, x206.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x207 = _tuple$103[0]; - x208 = _tuple$103[1]; - x209 = new $Uint64(0, 0); - x210 = new $Uint64(0, 0); - _tuple$104 = bits.Add64(x193, new $Uint64(0, 0), ((x$80 = (new p521Uint1(x208.$high, x208.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x209 = _tuple$104[0]; - x210 = _tuple$104[1]; - x211 = new $Uint64(0, 0); - x212 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x179, new $Uint64(0, 511)); - x212 = _tuple$105[0]; - x211 = _tuple$105[1]; - x213 = new $Uint64(0, 0); - x214 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x214 = _tuple$106[0]; - x213 = _tuple$106[1]; - x215 = new $Uint64(0, 0); - x216 = new $Uint64(0, 0); - _tuple$107 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x216 = _tuple$107[0]; - x215 = _tuple$107[1]; - x217 = new $Uint64(0, 0); - x218 = new $Uint64(0, 0); - _tuple$108 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x218 = _tuple$108[0]; - x217 = _tuple$108[1]; - x219 = new $Uint64(0, 0); - x220 = new $Uint64(0, 0); - _tuple$109 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x220 = _tuple$109[0]; - x219 = _tuple$109[1]; - x221 = new $Uint64(0, 0); - x222 = new $Uint64(0, 0); - _tuple$110 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x222 = _tuple$110[0]; - x221 = _tuple$110[1]; - x223 = new $Uint64(0, 0); - x224 = new $Uint64(0, 0); - _tuple$111 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x224 = _tuple$111[0]; - x223 = _tuple$111[1]; - x225 = new $Uint64(0, 0); - x226 = new $Uint64(0, 0); - _tuple$112 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x226 = _tuple$112[0]; - x225 = _tuple$112[1]; - x227 = new $Uint64(0, 0); - x228 = new $Uint64(0, 0); - _tuple$113 = bits.Mul64(x179, new $Uint64(4294967295, 4294967295)); - x228 = _tuple$113[0]; - x227 = _tuple$113[1]; - x229 = new $Uint64(0, 0); - x230 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x228, x225, new $Uint64(0, 0)); - x229 = _tuple$114[0]; - x230 = _tuple$114[1]; - x231 = new $Uint64(0, 0); - x232 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x226, x223, ((x$81 = (new p521Uint1(x230.$high, x230.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x231 = _tuple$115[0]; - x232 = _tuple$115[1]; - x233 = new $Uint64(0, 0); - x234 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x224, x221, ((x$82 = (new p521Uint1(x232.$high, x232.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x233 = _tuple$116[0]; - x234 = _tuple$116[1]; - x235 = new $Uint64(0, 0); - x236 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x222, x219, ((x$83 = (new p521Uint1(x234.$high, x234.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x235 = _tuple$117[0]; - x236 = _tuple$117[1]; - x237 = new $Uint64(0, 0); - x238 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x220, x217, ((x$84 = (new p521Uint1(x236.$high, x236.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x237 = _tuple$118[0]; - x238 = _tuple$118[1]; - x239 = new $Uint64(0, 0); - x240 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x218, x215, ((x$85 = (new p521Uint1(x238.$high, x238.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x239 = _tuple$119[0]; - x240 = _tuple$119[1]; - x241 = new $Uint64(0, 0); - x242 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x216, x213, ((x$86 = (new p521Uint1(x240.$high, x240.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x241 = _tuple$120[0]; - x242 = _tuple$120[1]; - x243 = new $Uint64(0, 0); - x244 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x214, x211, ((x$87 = (new p521Uint1(x242.$high, x242.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x243 = _tuple$121[0]; - x244 = _tuple$121[1]; - x246 = new $Uint64(0, 0); - _tuple$122 = bits.Add64(x179, x227, new $Uint64(0, 0)); - x246 = _tuple$122[1]; - x247 = new $Uint64(0, 0); - x248 = new $Uint64(0, 0); - _tuple$123 = bits.Add64(x197, x229, ((x$88 = (new p521Uint1(x246.$high, x246.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x247 = _tuple$123[0]; - x248 = _tuple$123[1]; - x249 = new $Uint64(0, 0); - x250 = new $Uint64(0, 0); - _tuple$124 = bits.Add64(x199, x231, ((x$89 = (new p521Uint1(x248.$high, x248.$low)), new $Uint64(x$89.$high, x$89.$low)))); - x249 = _tuple$124[0]; - x250 = _tuple$124[1]; - x251 = new $Uint64(0, 0); - x252 = new $Uint64(0, 0); - _tuple$125 = bits.Add64(x201, x233, ((x$90 = (new p521Uint1(x250.$high, x250.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x251 = _tuple$125[0]; - x252 = _tuple$125[1]; - x253 = new $Uint64(0, 0); - x254 = new $Uint64(0, 0); - _tuple$126 = bits.Add64(x203, x235, ((x$91 = (new p521Uint1(x252.$high, x252.$low)), new $Uint64(x$91.$high, x$91.$low)))); - x253 = _tuple$126[0]; - x254 = _tuple$126[1]; - x255 = new $Uint64(0, 0); - x256 = new $Uint64(0, 0); - _tuple$127 = bits.Add64(x205, x237, ((x$92 = (new p521Uint1(x254.$high, x254.$low)), new $Uint64(x$92.$high, x$92.$low)))); - x255 = _tuple$127[0]; - x256 = _tuple$127[1]; - x257 = new $Uint64(0, 0); - x258 = new $Uint64(0, 0); - _tuple$128 = bits.Add64(x207, x239, ((x$93 = (new p521Uint1(x256.$high, x256.$low)), new $Uint64(x$93.$high, x$93.$low)))); - x257 = _tuple$128[0]; - x258 = _tuple$128[1]; - x259 = new $Uint64(0, 0); - x260 = new $Uint64(0, 0); - _tuple$129 = bits.Add64(x209, x241, ((x$94 = (new p521Uint1(x258.$high, x258.$low)), new $Uint64(x$94.$high, x$94.$low)))); - x259 = _tuple$129[0]; - x260 = _tuple$129[1]; - x261 = new $Uint64(0, 0); - x262 = new $Uint64(0, 0); - _tuple$130 = bits.Add64((x$95 = ((x$96 = (new p521Uint1(x210.$high, x210.$low)), new $Uint64(x$96.$high, x$96.$low))), x$97 = (x$98 = ((x$99 = (new p521Uint1(x194.$high, x194.$low)), new $Uint64(x$99.$high, x$99.$low))), x$100 = (x$101 = ((x$102 = (new p521Uint1(x176.$high, x176.$low)), new $Uint64(x$102.$high, x$102.$low))), new $Uint64(x$101.$high + x144.$high, x$101.$low + x144.$low)), new $Uint64(x$98.$high + x$100.$high, x$98.$low + x$100.$low)), new $Uint64(x$95.$high + x$97.$high, x$95.$low + x$97.$low)), x243, ((x$103 = (new p521Uint1(x260.$high, x260.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x261 = _tuple$130[0]; - x262 = _tuple$130[1]; - x263 = new $Uint64(0, 0); - x264 = new $Uint64(0, 0); - _tuple$131 = bits.Mul64(arg1[5], new $Uint64(16384, 0)); - x264 = _tuple$131[0]; - x263 = _tuple$131[1]; - x265 = new $Uint64(0, 0); - x266 = new $Uint64(0, 0); - _tuple$132 = bits.Add64(x249, x263, new $Uint64(0, 0)); - x265 = _tuple$132[0]; - x266 = _tuple$132[1]; - x267 = new $Uint64(0, 0); - x268 = new $Uint64(0, 0); - _tuple$133 = bits.Add64(x251, x264, ((x$104 = (new p521Uint1(x266.$high, x266.$low)), new $Uint64(x$104.$high, x$104.$low)))); - x267 = _tuple$133[0]; - x268 = _tuple$133[1]; - x269 = new $Uint64(0, 0); - x270 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x253, new $Uint64(0, 0), ((x$105 = (new p521Uint1(x268.$high, x268.$low)), new $Uint64(x$105.$high, x$105.$low)))); - x269 = _tuple$134[0]; - x270 = _tuple$134[1]; - x271 = new $Uint64(0, 0); - x272 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x255, new $Uint64(0, 0), ((x$106 = (new p521Uint1(x270.$high, x270.$low)), new $Uint64(x$106.$high, x$106.$low)))); - x271 = _tuple$135[0]; - x272 = _tuple$135[1]; - x273 = new $Uint64(0, 0); - x274 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x257, new $Uint64(0, 0), ((x$107 = (new p521Uint1(x272.$high, x272.$low)), new $Uint64(x$107.$high, x$107.$low)))); - x273 = _tuple$136[0]; - x274 = _tuple$136[1]; - x275 = new $Uint64(0, 0); - x276 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x259, new $Uint64(0, 0), ((x$108 = (new p521Uint1(x274.$high, x274.$low)), new $Uint64(x$108.$high, x$108.$low)))); - x275 = _tuple$137[0]; - x276 = _tuple$137[1]; - x277 = new $Uint64(0, 0); - x278 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x261, new $Uint64(0, 0), ((x$109 = (new p521Uint1(x276.$high, x276.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x277 = _tuple$138[0]; - x278 = _tuple$138[1]; - x279 = new $Uint64(0, 0); - x280 = new $Uint64(0, 0); - _tuple$139 = bits.Mul64(x247, new $Uint64(0, 511)); - x280 = _tuple$139[0]; - x279 = _tuple$139[1]; - x281 = new $Uint64(0, 0); - x282 = new $Uint64(0, 0); - _tuple$140 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x282 = _tuple$140[0]; - x281 = _tuple$140[1]; - x283 = new $Uint64(0, 0); - x284 = new $Uint64(0, 0); - _tuple$141 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x284 = _tuple$141[0]; - x283 = _tuple$141[1]; - x285 = new $Uint64(0, 0); - x286 = new $Uint64(0, 0); - _tuple$142 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x286 = _tuple$142[0]; - x285 = _tuple$142[1]; - x287 = new $Uint64(0, 0); - x288 = new $Uint64(0, 0); - _tuple$143 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x288 = _tuple$143[0]; - x287 = _tuple$143[1]; - x289 = new $Uint64(0, 0); - x290 = new $Uint64(0, 0); - _tuple$144 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x290 = _tuple$144[0]; - x289 = _tuple$144[1]; - x291 = new $Uint64(0, 0); - x292 = new $Uint64(0, 0); - _tuple$145 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x292 = _tuple$145[0]; - x291 = _tuple$145[1]; - x293 = new $Uint64(0, 0); - x294 = new $Uint64(0, 0); - _tuple$146 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x294 = _tuple$146[0]; - x293 = _tuple$146[1]; - x295 = new $Uint64(0, 0); - x296 = new $Uint64(0, 0); - _tuple$147 = bits.Mul64(x247, new $Uint64(4294967295, 4294967295)); - x296 = _tuple$147[0]; - x295 = _tuple$147[1]; - x297 = new $Uint64(0, 0); - x298 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x296, x293, new $Uint64(0, 0)); - x297 = _tuple$148[0]; - x298 = _tuple$148[1]; - x299 = new $Uint64(0, 0); - x300 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x294, x291, ((x$110 = (new p521Uint1(x298.$high, x298.$low)), new $Uint64(x$110.$high, x$110.$low)))); - x299 = _tuple$149[0]; - x300 = _tuple$149[1]; - x301 = new $Uint64(0, 0); - x302 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x292, x289, ((x$111 = (new p521Uint1(x300.$high, x300.$low)), new $Uint64(x$111.$high, x$111.$low)))); - x301 = _tuple$150[0]; - x302 = _tuple$150[1]; - x303 = new $Uint64(0, 0); - x304 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x290, x287, ((x$112 = (new p521Uint1(x302.$high, x302.$low)), new $Uint64(x$112.$high, x$112.$low)))); - x303 = _tuple$151[0]; - x304 = _tuple$151[1]; - x305 = new $Uint64(0, 0); - x306 = new $Uint64(0, 0); - _tuple$152 = bits.Add64(x288, x285, ((x$113 = (new p521Uint1(x304.$high, x304.$low)), new $Uint64(x$113.$high, x$113.$low)))); - x305 = _tuple$152[0]; - x306 = _tuple$152[1]; - x307 = new $Uint64(0, 0); - x308 = new $Uint64(0, 0); - _tuple$153 = bits.Add64(x286, x283, ((x$114 = (new p521Uint1(x306.$high, x306.$low)), new $Uint64(x$114.$high, x$114.$low)))); - x307 = _tuple$153[0]; - x308 = _tuple$153[1]; - x309 = new $Uint64(0, 0); - x310 = new $Uint64(0, 0); - _tuple$154 = bits.Add64(x284, x281, ((x$115 = (new p521Uint1(x308.$high, x308.$low)), new $Uint64(x$115.$high, x$115.$low)))); - x309 = _tuple$154[0]; - x310 = _tuple$154[1]; - x311 = new $Uint64(0, 0); - x312 = new $Uint64(0, 0); - _tuple$155 = bits.Add64(x282, x279, ((x$116 = (new p521Uint1(x310.$high, x310.$low)), new $Uint64(x$116.$high, x$116.$low)))); - x311 = _tuple$155[0]; - x312 = _tuple$155[1]; - x314 = new $Uint64(0, 0); - _tuple$156 = bits.Add64(x247, x295, new $Uint64(0, 0)); - x314 = _tuple$156[1]; - x315 = new $Uint64(0, 0); - x316 = new $Uint64(0, 0); - _tuple$157 = bits.Add64(x265, x297, ((x$117 = (new p521Uint1(x314.$high, x314.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x315 = _tuple$157[0]; - x316 = _tuple$157[1]; - x317 = new $Uint64(0, 0); - x318 = new $Uint64(0, 0); - _tuple$158 = bits.Add64(x267, x299, ((x$118 = (new p521Uint1(x316.$high, x316.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x317 = _tuple$158[0]; - x318 = _tuple$158[1]; - x319 = new $Uint64(0, 0); - x320 = new $Uint64(0, 0); - _tuple$159 = bits.Add64(x269, x301, ((x$119 = (new p521Uint1(x318.$high, x318.$low)), new $Uint64(x$119.$high, x$119.$low)))); - x319 = _tuple$159[0]; - x320 = _tuple$159[1]; - x321 = new $Uint64(0, 0); - x322 = new $Uint64(0, 0); - _tuple$160 = bits.Add64(x271, x303, ((x$120 = (new p521Uint1(x320.$high, x320.$low)), new $Uint64(x$120.$high, x$120.$low)))); - x321 = _tuple$160[0]; - x322 = _tuple$160[1]; - x323 = new $Uint64(0, 0); - x324 = new $Uint64(0, 0); - _tuple$161 = bits.Add64(x273, x305, ((x$121 = (new p521Uint1(x322.$high, x322.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x323 = _tuple$161[0]; - x324 = _tuple$161[1]; - x325 = new $Uint64(0, 0); - x326 = new $Uint64(0, 0); - _tuple$162 = bits.Add64(x275, x307, ((x$122 = (new p521Uint1(x324.$high, x324.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x325 = _tuple$162[0]; - x326 = _tuple$162[1]; - x327 = new $Uint64(0, 0); - x328 = new $Uint64(0, 0); - _tuple$163 = bits.Add64(x277, x309, ((x$123 = (new p521Uint1(x326.$high, x326.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x327 = _tuple$163[0]; - x328 = _tuple$163[1]; - x329 = new $Uint64(0, 0); - x330 = new $Uint64(0, 0); - _tuple$164 = bits.Add64((x$124 = ((x$125 = (new p521Uint1(x278.$high, x278.$low)), new $Uint64(x$125.$high, x$125.$low))), x$126 = (x$127 = ((x$128 = (new p521Uint1(x262.$high, x262.$low)), new $Uint64(x$128.$high, x$128.$low))), x$129 = (x$130 = ((x$131 = (new p521Uint1(x244.$high, x244.$low)), new $Uint64(x$131.$high, x$131.$low))), new $Uint64(x$130.$high + x212.$high, x$130.$low + x212.$low)), new $Uint64(x$127.$high + x$129.$high, x$127.$low + x$129.$low)), new $Uint64(x$124.$high + x$126.$high, x$124.$low + x$126.$low)), x311, ((x$132 = (new p521Uint1(x328.$high, x328.$low)), new $Uint64(x$132.$high, x$132.$low)))); - x329 = _tuple$164[0]; - x330 = _tuple$164[1]; - x331 = new $Uint64(0, 0); - x332 = new $Uint64(0, 0); - _tuple$165 = bits.Mul64(arg1[6], new $Uint64(16384, 0)); - x332 = _tuple$165[0]; - x331 = _tuple$165[1]; - x333 = new $Uint64(0, 0); - x334 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x317, x331, new $Uint64(0, 0)); - x333 = _tuple$166[0]; - x334 = _tuple$166[1]; - x335 = new $Uint64(0, 0); - x336 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x319, x332, ((x$133 = (new p521Uint1(x334.$high, x334.$low)), new $Uint64(x$133.$high, x$133.$low)))); - x335 = _tuple$167[0]; - x336 = _tuple$167[1]; - x337 = new $Uint64(0, 0); - x338 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x321, new $Uint64(0, 0), ((x$134 = (new p521Uint1(x336.$high, x336.$low)), new $Uint64(x$134.$high, x$134.$low)))); - x337 = _tuple$168[0]; - x338 = _tuple$168[1]; - x339 = new $Uint64(0, 0); - x340 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x323, new $Uint64(0, 0), ((x$135 = (new p521Uint1(x338.$high, x338.$low)), new $Uint64(x$135.$high, x$135.$low)))); - x339 = _tuple$169[0]; - x340 = _tuple$169[1]; - x341 = new $Uint64(0, 0); - x342 = new $Uint64(0, 0); - _tuple$170 = bits.Add64(x325, new $Uint64(0, 0), ((x$136 = (new p521Uint1(x340.$high, x340.$low)), new $Uint64(x$136.$high, x$136.$low)))); - x341 = _tuple$170[0]; - x342 = _tuple$170[1]; - x343 = new $Uint64(0, 0); - x344 = new $Uint64(0, 0); - _tuple$171 = bits.Add64(x327, new $Uint64(0, 0), ((x$137 = (new p521Uint1(x342.$high, x342.$low)), new $Uint64(x$137.$high, x$137.$low)))); - x343 = _tuple$171[0]; - x344 = _tuple$171[1]; - x345 = new $Uint64(0, 0); - x346 = new $Uint64(0, 0); - _tuple$172 = bits.Add64(x329, new $Uint64(0, 0), ((x$138 = (new p521Uint1(x344.$high, x344.$low)), new $Uint64(x$138.$high, x$138.$low)))); - x345 = _tuple$172[0]; - x346 = _tuple$172[1]; - x347 = new $Uint64(0, 0); - x348 = new $Uint64(0, 0); - _tuple$173 = bits.Mul64(x315, new $Uint64(0, 511)); - x348 = _tuple$173[0]; - x347 = _tuple$173[1]; - x349 = new $Uint64(0, 0); - x350 = new $Uint64(0, 0); - _tuple$174 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x350 = _tuple$174[0]; - x349 = _tuple$174[1]; - x351 = new $Uint64(0, 0); - x352 = new $Uint64(0, 0); - _tuple$175 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x352 = _tuple$175[0]; - x351 = _tuple$175[1]; - x353 = new $Uint64(0, 0); - x354 = new $Uint64(0, 0); - _tuple$176 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x354 = _tuple$176[0]; - x353 = _tuple$176[1]; - x355 = new $Uint64(0, 0); - x356 = new $Uint64(0, 0); - _tuple$177 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x356 = _tuple$177[0]; - x355 = _tuple$177[1]; - x357 = new $Uint64(0, 0); - x358 = new $Uint64(0, 0); - _tuple$178 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x358 = _tuple$178[0]; - x357 = _tuple$178[1]; - x359 = new $Uint64(0, 0); - x360 = new $Uint64(0, 0); - _tuple$179 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x360 = _tuple$179[0]; - x359 = _tuple$179[1]; - x361 = new $Uint64(0, 0); - x362 = new $Uint64(0, 0); - _tuple$180 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x362 = _tuple$180[0]; - x361 = _tuple$180[1]; - x363 = new $Uint64(0, 0); - x364 = new $Uint64(0, 0); - _tuple$181 = bits.Mul64(x315, new $Uint64(4294967295, 4294967295)); - x364 = _tuple$181[0]; - x363 = _tuple$181[1]; - x365 = new $Uint64(0, 0); - x366 = new $Uint64(0, 0); - _tuple$182 = bits.Add64(x364, x361, new $Uint64(0, 0)); - x365 = _tuple$182[0]; - x366 = _tuple$182[1]; - x367 = new $Uint64(0, 0); - x368 = new $Uint64(0, 0); - _tuple$183 = bits.Add64(x362, x359, ((x$139 = (new p521Uint1(x366.$high, x366.$low)), new $Uint64(x$139.$high, x$139.$low)))); - x367 = _tuple$183[0]; - x368 = _tuple$183[1]; - x369 = new $Uint64(0, 0); - x370 = new $Uint64(0, 0); - _tuple$184 = bits.Add64(x360, x357, ((x$140 = (new p521Uint1(x368.$high, x368.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x369 = _tuple$184[0]; - x370 = _tuple$184[1]; - x371 = new $Uint64(0, 0); - x372 = new $Uint64(0, 0); - _tuple$185 = bits.Add64(x358, x355, ((x$141 = (new p521Uint1(x370.$high, x370.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x371 = _tuple$185[0]; - x372 = _tuple$185[1]; - x373 = new $Uint64(0, 0); - x374 = new $Uint64(0, 0); - _tuple$186 = bits.Add64(x356, x353, ((x$142 = (new p521Uint1(x372.$high, x372.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x373 = _tuple$186[0]; - x374 = _tuple$186[1]; - x375 = new $Uint64(0, 0); - x376 = new $Uint64(0, 0); - _tuple$187 = bits.Add64(x354, x351, ((x$143 = (new p521Uint1(x374.$high, x374.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x375 = _tuple$187[0]; - x376 = _tuple$187[1]; - x377 = new $Uint64(0, 0); - x378 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x352, x349, ((x$144 = (new p521Uint1(x376.$high, x376.$low)), new $Uint64(x$144.$high, x$144.$low)))); - x377 = _tuple$188[0]; - x378 = _tuple$188[1]; - x379 = new $Uint64(0, 0); - x380 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x350, x347, ((x$145 = (new p521Uint1(x378.$high, x378.$low)), new $Uint64(x$145.$high, x$145.$low)))); - x379 = _tuple$189[0]; - x380 = _tuple$189[1]; - x382 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x315, x363, new $Uint64(0, 0)); - x382 = _tuple$190[1]; - x383 = new $Uint64(0, 0); - x384 = new $Uint64(0, 0); - _tuple$191 = bits.Add64(x333, x365, ((x$146 = (new p521Uint1(x382.$high, x382.$low)), new $Uint64(x$146.$high, x$146.$low)))); - x383 = _tuple$191[0]; - x384 = _tuple$191[1]; - x385 = new $Uint64(0, 0); - x386 = new $Uint64(0, 0); - _tuple$192 = bits.Add64(x335, x367, ((x$147 = (new p521Uint1(x384.$high, x384.$low)), new $Uint64(x$147.$high, x$147.$low)))); - x385 = _tuple$192[0]; - x386 = _tuple$192[1]; - x387 = new $Uint64(0, 0); - x388 = new $Uint64(0, 0); - _tuple$193 = bits.Add64(x337, x369, ((x$148 = (new p521Uint1(x386.$high, x386.$low)), new $Uint64(x$148.$high, x$148.$low)))); - x387 = _tuple$193[0]; - x388 = _tuple$193[1]; - x389 = new $Uint64(0, 0); - x390 = new $Uint64(0, 0); - _tuple$194 = bits.Add64(x339, x371, ((x$149 = (new p521Uint1(x388.$high, x388.$low)), new $Uint64(x$149.$high, x$149.$low)))); - x389 = _tuple$194[0]; - x390 = _tuple$194[1]; - x391 = new $Uint64(0, 0); - x392 = new $Uint64(0, 0); - _tuple$195 = bits.Add64(x341, x373, ((x$150 = (new p521Uint1(x390.$high, x390.$low)), new $Uint64(x$150.$high, x$150.$low)))); - x391 = _tuple$195[0]; - x392 = _tuple$195[1]; - x393 = new $Uint64(0, 0); - x394 = new $Uint64(0, 0); - _tuple$196 = bits.Add64(x343, x375, ((x$151 = (new p521Uint1(x392.$high, x392.$low)), new $Uint64(x$151.$high, x$151.$low)))); - x393 = _tuple$196[0]; - x394 = _tuple$196[1]; - x395 = new $Uint64(0, 0); - x396 = new $Uint64(0, 0); - _tuple$197 = bits.Add64(x345, x377, ((x$152 = (new p521Uint1(x394.$high, x394.$low)), new $Uint64(x$152.$high, x$152.$low)))); - x395 = _tuple$197[0]; - x396 = _tuple$197[1]; - x397 = new $Uint64(0, 0); - x398 = new $Uint64(0, 0); - _tuple$198 = bits.Add64((x$153 = ((x$154 = (new p521Uint1(x346.$high, x346.$low)), new $Uint64(x$154.$high, x$154.$low))), x$155 = (x$156 = ((x$157 = (new p521Uint1(x330.$high, x330.$low)), new $Uint64(x$157.$high, x$157.$low))), x$158 = (x$159 = ((x$160 = (new p521Uint1(x312.$high, x312.$low)), new $Uint64(x$160.$high, x$160.$low))), new $Uint64(x$159.$high + x280.$high, x$159.$low + x280.$low)), new $Uint64(x$156.$high + x$158.$high, x$156.$low + x$158.$low)), new $Uint64(x$153.$high + x$155.$high, x$153.$low + x$155.$low)), x379, ((x$161 = (new p521Uint1(x396.$high, x396.$low)), new $Uint64(x$161.$high, x$161.$low)))); - x397 = _tuple$198[0]; - x398 = _tuple$198[1]; - x399 = new $Uint64(0, 0); - x400 = new $Uint64(0, 0); - _tuple$199 = bits.Mul64(arg1[7], new $Uint64(16384, 0)); - x400 = _tuple$199[0]; - x399 = _tuple$199[1]; - x401 = new $Uint64(0, 0); - x402 = new $Uint64(0, 0); - _tuple$200 = bits.Add64(x385, x399, new $Uint64(0, 0)); - x401 = _tuple$200[0]; - x402 = _tuple$200[1]; - x403 = new $Uint64(0, 0); - x404 = new $Uint64(0, 0); - _tuple$201 = bits.Add64(x387, x400, ((x$162 = (new p521Uint1(x402.$high, x402.$low)), new $Uint64(x$162.$high, x$162.$low)))); - x403 = _tuple$201[0]; - x404 = _tuple$201[1]; - x405 = new $Uint64(0, 0); - x406 = new $Uint64(0, 0); - _tuple$202 = bits.Add64(x389, new $Uint64(0, 0), ((x$163 = (new p521Uint1(x404.$high, x404.$low)), new $Uint64(x$163.$high, x$163.$low)))); - x405 = _tuple$202[0]; - x406 = _tuple$202[1]; - x407 = new $Uint64(0, 0); - x408 = new $Uint64(0, 0); - _tuple$203 = bits.Add64(x391, new $Uint64(0, 0), ((x$164 = (new p521Uint1(x406.$high, x406.$low)), new $Uint64(x$164.$high, x$164.$low)))); - x407 = _tuple$203[0]; - x408 = _tuple$203[1]; - x409 = new $Uint64(0, 0); - x410 = new $Uint64(0, 0); - _tuple$204 = bits.Add64(x393, new $Uint64(0, 0), ((x$165 = (new p521Uint1(x408.$high, x408.$low)), new $Uint64(x$165.$high, x$165.$low)))); - x409 = _tuple$204[0]; - x410 = _tuple$204[1]; - x411 = new $Uint64(0, 0); - x412 = new $Uint64(0, 0); - _tuple$205 = bits.Add64(x395, new $Uint64(0, 0), ((x$166 = (new p521Uint1(x410.$high, x410.$low)), new $Uint64(x$166.$high, x$166.$low)))); - x411 = _tuple$205[0]; - x412 = _tuple$205[1]; - x413 = new $Uint64(0, 0); - x414 = new $Uint64(0, 0); - _tuple$206 = bits.Add64(x397, new $Uint64(0, 0), ((x$167 = (new p521Uint1(x412.$high, x412.$low)), new $Uint64(x$167.$high, x$167.$low)))); - x413 = _tuple$206[0]; - x414 = _tuple$206[1]; - x415 = new $Uint64(0, 0); - x416 = new $Uint64(0, 0); - _tuple$207 = bits.Mul64(x383, new $Uint64(0, 511)); - x416 = _tuple$207[0]; - x415 = _tuple$207[1]; - x417 = new $Uint64(0, 0); - x418 = new $Uint64(0, 0); - _tuple$208 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x418 = _tuple$208[0]; - x417 = _tuple$208[1]; - x419 = new $Uint64(0, 0); - x420 = new $Uint64(0, 0); - _tuple$209 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x420 = _tuple$209[0]; - x419 = _tuple$209[1]; - x421 = new $Uint64(0, 0); - x422 = new $Uint64(0, 0); - _tuple$210 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x422 = _tuple$210[0]; - x421 = _tuple$210[1]; - x423 = new $Uint64(0, 0); - x424 = new $Uint64(0, 0); - _tuple$211 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x424 = _tuple$211[0]; - x423 = _tuple$211[1]; - x425 = new $Uint64(0, 0); - x426 = new $Uint64(0, 0); - _tuple$212 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x426 = _tuple$212[0]; - x425 = _tuple$212[1]; - x427 = new $Uint64(0, 0); - x428 = new $Uint64(0, 0); - _tuple$213 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x428 = _tuple$213[0]; - x427 = _tuple$213[1]; - x429 = new $Uint64(0, 0); - x430 = new $Uint64(0, 0); - _tuple$214 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x430 = _tuple$214[0]; - x429 = _tuple$214[1]; - x431 = new $Uint64(0, 0); - x432 = new $Uint64(0, 0); - _tuple$215 = bits.Mul64(x383, new $Uint64(4294967295, 4294967295)); - x432 = _tuple$215[0]; - x431 = _tuple$215[1]; - x433 = new $Uint64(0, 0); - x434 = new $Uint64(0, 0); - _tuple$216 = bits.Add64(x432, x429, new $Uint64(0, 0)); - x433 = _tuple$216[0]; - x434 = _tuple$216[1]; - x435 = new $Uint64(0, 0); - x436 = new $Uint64(0, 0); - _tuple$217 = bits.Add64(x430, x427, ((x$168 = (new p521Uint1(x434.$high, x434.$low)), new $Uint64(x$168.$high, x$168.$low)))); - x435 = _tuple$217[0]; - x436 = _tuple$217[1]; - x437 = new $Uint64(0, 0); - x438 = new $Uint64(0, 0); - _tuple$218 = bits.Add64(x428, x425, ((x$169 = (new p521Uint1(x436.$high, x436.$low)), new $Uint64(x$169.$high, x$169.$low)))); - x437 = _tuple$218[0]; - x438 = _tuple$218[1]; - x439 = new $Uint64(0, 0); - x440 = new $Uint64(0, 0); - _tuple$219 = bits.Add64(x426, x423, ((x$170 = (new p521Uint1(x438.$high, x438.$low)), new $Uint64(x$170.$high, x$170.$low)))); - x439 = _tuple$219[0]; - x440 = _tuple$219[1]; - x441 = new $Uint64(0, 0); - x442 = new $Uint64(0, 0); - _tuple$220 = bits.Add64(x424, x421, ((x$171 = (new p521Uint1(x440.$high, x440.$low)), new $Uint64(x$171.$high, x$171.$low)))); - x441 = _tuple$220[0]; - x442 = _tuple$220[1]; - x443 = new $Uint64(0, 0); - x444 = new $Uint64(0, 0); - _tuple$221 = bits.Add64(x422, x419, ((x$172 = (new p521Uint1(x442.$high, x442.$low)), new $Uint64(x$172.$high, x$172.$low)))); - x443 = _tuple$221[0]; - x444 = _tuple$221[1]; - x445 = new $Uint64(0, 0); - x446 = new $Uint64(0, 0); - _tuple$222 = bits.Add64(x420, x417, ((x$173 = (new p521Uint1(x444.$high, x444.$low)), new $Uint64(x$173.$high, x$173.$low)))); - x445 = _tuple$222[0]; - x446 = _tuple$222[1]; - x447 = new $Uint64(0, 0); - x448 = new $Uint64(0, 0); - _tuple$223 = bits.Add64(x418, x415, ((x$174 = (new p521Uint1(x446.$high, x446.$low)), new $Uint64(x$174.$high, x$174.$low)))); - x447 = _tuple$223[0]; - x448 = _tuple$223[1]; - x450 = new $Uint64(0, 0); - _tuple$224 = bits.Add64(x383, x431, new $Uint64(0, 0)); - x450 = _tuple$224[1]; - x451 = new $Uint64(0, 0); - x452 = new $Uint64(0, 0); - _tuple$225 = bits.Add64(x401, x433, ((x$175 = (new p521Uint1(x450.$high, x450.$low)), new $Uint64(x$175.$high, x$175.$low)))); - x451 = _tuple$225[0]; - x452 = _tuple$225[1]; - x453 = new $Uint64(0, 0); - x454 = new $Uint64(0, 0); - _tuple$226 = bits.Add64(x403, x435, ((x$176 = (new p521Uint1(x452.$high, x452.$low)), new $Uint64(x$176.$high, x$176.$low)))); - x453 = _tuple$226[0]; - x454 = _tuple$226[1]; - x455 = new $Uint64(0, 0); - x456 = new $Uint64(0, 0); - _tuple$227 = bits.Add64(x405, x437, ((x$177 = (new p521Uint1(x454.$high, x454.$low)), new $Uint64(x$177.$high, x$177.$low)))); - x455 = _tuple$227[0]; - x456 = _tuple$227[1]; - x457 = new $Uint64(0, 0); - x458 = new $Uint64(0, 0); - _tuple$228 = bits.Add64(x407, x439, ((x$178 = (new p521Uint1(x456.$high, x456.$low)), new $Uint64(x$178.$high, x$178.$low)))); - x457 = _tuple$228[0]; - x458 = _tuple$228[1]; - x459 = new $Uint64(0, 0); - x460 = new $Uint64(0, 0); - _tuple$229 = bits.Add64(x409, x441, ((x$179 = (new p521Uint1(x458.$high, x458.$low)), new $Uint64(x$179.$high, x$179.$low)))); - x459 = _tuple$229[0]; - x460 = _tuple$229[1]; - x461 = new $Uint64(0, 0); - x462 = new $Uint64(0, 0); - _tuple$230 = bits.Add64(x411, x443, ((x$180 = (new p521Uint1(x460.$high, x460.$low)), new $Uint64(x$180.$high, x$180.$low)))); - x461 = _tuple$230[0]; - x462 = _tuple$230[1]; - x463 = new $Uint64(0, 0); - x464 = new $Uint64(0, 0); - _tuple$231 = bits.Add64(x413, x445, ((x$181 = (new p521Uint1(x462.$high, x462.$low)), new $Uint64(x$181.$high, x$181.$low)))); - x463 = _tuple$231[0]; - x464 = _tuple$231[1]; - x465 = new $Uint64(0, 0); - x466 = new $Uint64(0, 0); - _tuple$232 = bits.Add64((x$182 = ((x$183 = (new p521Uint1(x414.$high, x414.$low)), new $Uint64(x$183.$high, x$183.$low))), x$184 = (x$185 = ((x$186 = (new p521Uint1(x398.$high, x398.$low)), new $Uint64(x$186.$high, x$186.$low))), x$187 = (x$188 = ((x$189 = (new p521Uint1(x380.$high, x380.$low)), new $Uint64(x$189.$high, x$189.$low))), new $Uint64(x$188.$high + x348.$high, x$188.$low + x348.$low)), new $Uint64(x$185.$high + x$187.$high, x$185.$low + x$187.$low)), new $Uint64(x$182.$high + x$184.$high, x$182.$low + x$184.$low)), x447, ((x$190 = (new p521Uint1(x464.$high, x464.$low)), new $Uint64(x$190.$high, x$190.$low)))); - x465 = _tuple$232[0]; - x466 = _tuple$232[1]; - x467 = new $Uint64(0, 0); - x468 = new $Uint64(0, 0); - _tuple$233 = bits.Mul64(arg1[8], new $Uint64(16384, 0)); - x468 = _tuple$233[0]; - x467 = _tuple$233[1]; - x469 = new $Uint64(0, 0); - x470 = new $Uint64(0, 0); - _tuple$234 = bits.Add64(x453, x467, new $Uint64(0, 0)); - x469 = _tuple$234[0]; - x470 = _tuple$234[1]; - x471 = new $Uint64(0, 0); - x472 = new $Uint64(0, 0); - _tuple$235 = bits.Add64(x455, x468, ((x$191 = (new p521Uint1(x470.$high, x470.$low)), new $Uint64(x$191.$high, x$191.$low)))); - x471 = _tuple$235[0]; - x472 = _tuple$235[1]; - x473 = new $Uint64(0, 0); - x474 = new $Uint64(0, 0); - _tuple$236 = bits.Add64(x457, new $Uint64(0, 0), ((x$192 = (new p521Uint1(x472.$high, x472.$low)), new $Uint64(x$192.$high, x$192.$low)))); - x473 = _tuple$236[0]; - x474 = _tuple$236[1]; - x475 = new $Uint64(0, 0); - x476 = new $Uint64(0, 0); - _tuple$237 = bits.Add64(x459, new $Uint64(0, 0), ((x$193 = (new p521Uint1(x474.$high, x474.$low)), new $Uint64(x$193.$high, x$193.$low)))); - x475 = _tuple$237[0]; - x476 = _tuple$237[1]; - x477 = new $Uint64(0, 0); - x478 = new $Uint64(0, 0); - _tuple$238 = bits.Add64(x461, new $Uint64(0, 0), ((x$194 = (new p521Uint1(x476.$high, x476.$low)), new $Uint64(x$194.$high, x$194.$low)))); - x477 = _tuple$238[0]; - x478 = _tuple$238[1]; - x479 = new $Uint64(0, 0); - x480 = new $Uint64(0, 0); - _tuple$239 = bits.Add64(x463, new $Uint64(0, 0), ((x$195 = (new p521Uint1(x478.$high, x478.$low)), new $Uint64(x$195.$high, x$195.$low)))); - x479 = _tuple$239[0]; - x480 = _tuple$239[1]; - x481 = new $Uint64(0, 0); - x482 = new $Uint64(0, 0); - _tuple$240 = bits.Add64(x465, new $Uint64(0, 0), ((x$196 = (new p521Uint1(x480.$high, x480.$low)), new $Uint64(x$196.$high, x$196.$low)))); - x481 = _tuple$240[0]; - x482 = _tuple$240[1]; - x483 = new $Uint64(0, 0); - x484 = new $Uint64(0, 0); - _tuple$241 = bits.Mul64(x451, new $Uint64(0, 511)); - x484 = _tuple$241[0]; - x483 = _tuple$241[1]; - x485 = new $Uint64(0, 0); - x486 = new $Uint64(0, 0); - _tuple$242 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x486 = _tuple$242[0]; - x485 = _tuple$242[1]; - x487 = new $Uint64(0, 0); - x488 = new $Uint64(0, 0); - _tuple$243 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x488 = _tuple$243[0]; - x487 = _tuple$243[1]; - x489 = new $Uint64(0, 0); - x490 = new $Uint64(0, 0); - _tuple$244 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x490 = _tuple$244[0]; - x489 = _tuple$244[1]; - x491 = new $Uint64(0, 0); - x492 = new $Uint64(0, 0); - _tuple$245 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x492 = _tuple$245[0]; - x491 = _tuple$245[1]; - x493 = new $Uint64(0, 0); - x494 = new $Uint64(0, 0); - _tuple$246 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x494 = _tuple$246[0]; - x493 = _tuple$246[1]; - x495 = new $Uint64(0, 0); - x496 = new $Uint64(0, 0); - _tuple$247 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x496 = _tuple$247[0]; - x495 = _tuple$247[1]; - x497 = new $Uint64(0, 0); - x498 = new $Uint64(0, 0); - _tuple$248 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x498 = _tuple$248[0]; - x497 = _tuple$248[1]; - x499 = new $Uint64(0, 0); - x500 = new $Uint64(0, 0); - _tuple$249 = bits.Mul64(x451, new $Uint64(4294967295, 4294967295)); - x500 = _tuple$249[0]; - x499 = _tuple$249[1]; - x501 = new $Uint64(0, 0); - x502 = new $Uint64(0, 0); - _tuple$250 = bits.Add64(x500, x497, new $Uint64(0, 0)); - x501 = _tuple$250[0]; - x502 = _tuple$250[1]; - x503 = new $Uint64(0, 0); - x504 = new $Uint64(0, 0); - _tuple$251 = bits.Add64(x498, x495, ((x$197 = (new p521Uint1(x502.$high, x502.$low)), new $Uint64(x$197.$high, x$197.$low)))); - x503 = _tuple$251[0]; - x504 = _tuple$251[1]; - x505 = new $Uint64(0, 0); - x506 = new $Uint64(0, 0); - _tuple$252 = bits.Add64(x496, x493, ((x$198 = (new p521Uint1(x504.$high, x504.$low)), new $Uint64(x$198.$high, x$198.$low)))); - x505 = _tuple$252[0]; - x506 = _tuple$252[1]; - x507 = new $Uint64(0, 0); - x508 = new $Uint64(0, 0); - _tuple$253 = bits.Add64(x494, x491, ((x$199 = (new p521Uint1(x506.$high, x506.$low)), new $Uint64(x$199.$high, x$199.$low)))); - x507 = _tuple$253[0]; - x508 = _tuple$253[1]; - x509 = new $Uint64(0, 0); - x510 = new $Uint64(0, 0); - _tuple$254 = bits.Add64(x492, x489, ((x$200 = (new p521Uint1(x508.$high, x508.$low)), new $Uint64(x$200.$high, x$200.$low)))); - x509 = _tuple$254[0]; - x510 = _tuple$254[1]; - x511 = new $Uint64(0, 0); - x512 = new $Uint64(0, 0); - _tuple$255 = bits.Add64(x490, x487, ((x$201 = (new p521Uint1(x510.$high, x510.$low)), new $Uint64(x$201.$high, x$201.$low)))); - x511 = _tuple$255[0]; - x512 = _tuple$255[1]; - x513 = new $Uint64(0, 0); - x514 = new $Uint64(0, 0); - _tuple$256 = bits.Add64(x488, x485, ((x$202 = (new p521Uint1(x512.$high, x512.$low)), new $Uint64(x$202.$high, x$202.$low)))); - x513 = _tuple$256[0]; - x514 = _tuple$256[1]; - x515 = new $Uint64(0, 0); - x516 = new $Uint64(0, 0); - _tuple$257 = bits.Add64(x486, x483, ((x$203 = (new p521Uint1(x514.$high, x514.$low)), new $Uint64(x$203.$high, x$203.$low)))); - x515 = _tuple$257[0]; - x516 = _tuple$257[1]; - x518 = new $Uint64(0, 0); - _tuple$258 = bits.Add64(x451, x499, new $Uint64(0, 0)); - x518 = _tuple$258[1]; - x519 = new $Uint64(0, 0); - x520 = new $Uint64(0, 0); - _tuple$259 = bits.Add64(x469, x501, ((x$204 = (new p521Uint1(x518.$high, x518.$low)), new $Uint64(x$204.$high, x$204.$low)))); - x519 = _tuple$259[0]; - x520 = _tuple$259[1]; - x521 = new $Uint64(0, 0); - x522 = new $Uint64(0, 0); - _tuple$260 = bits.Add64(x471, x503, ((x$205 = (new p521Uint1(x520.$high, x520.$low)), new $Uint64(x$205.$high, x$205.$low)))); - x521 = _tuple$260[0]; - x522 = _tuple$260[1]; - x523 = new $Uint64(0, 0); - x524 = new $Uint64(0, 0); - _tuple$261 = bits.Add64(x473, x505, ((x$206 = (new p521Uint1(x522.$high, x522.$low)), new $Uint64(x$206.$high, x$206.$low)))); - x523 = _tuple$261[0]; - x524 = _tuple$261[1]; - x525 = new $Uint64(0, 0); - x526 = new $Uint64(0, 0); - _tuple$262 = bits.Add64(x475, x507, ((x$207 = (new p521Uint1(x524.$high, x524.$low)), new $Uint64(x$207.$high, x$207.$low)))); - x525 = _tuple$262[0]; - x526 = _tuple$262[1]; - x527 = new $Uint64(0, 0); - x528 = new $Uint64(0, 0); - _tuple$263 = bits.Add64(x477, x509, ((x$208 = (new p521Uint1(x526.$high, x526.$low)), new $Uint64(x$208.$high, x$208.$low)))); - x527 = _tuple$263[0]; - x528 = _tuple$263[1]; - x529 = new $Uint64(0, 0); - x530 = new $Uint64(0, 0); - _tuple$264 = bits.Add64(x479, x511, ((x$209 = (new p521Uint1(x528.$high, x528.$low)), new $Uint64(x$209.$high, x$209.$low)))); - x529 = _tuple$264[0]; - x530 = _tuple$264[1]; - x531 = new $Uint64(0, 0); - x532 = new $Uint64(0, 0); - _tuple$265 = bits.Add64(x481, x513, ((x$210 = (new p521Uint1(x530.$high, x530.$low)), new $Uint64(x$210.$high, x$210.$low)))); - x531 = _tuple$265[0]; - x532 = _tuple$265[1]; - x533 = new $Uint64(0, 0); - x534 = new $Uint64(0, 0); - _tuple$266 = bits.Add64((x$211 = ((x$212 = (new p521Uint1(x482.$high, x482.$low)), new $Uint64(x$212.$high, x$212.$low))), x$213 = (x$214 = ((x$215 = (new p521Uint1(x466.$high, x466.$low)), new $Uint64(x$215.$high, x$215.$low))), x$216 = (x$217 = ((x$218 = (new p521Uint1(x448.$high, x448.$low)), new $Uint64(x$218.$high, x$218.$low))), new $Uint64(x$217.$high + x416.$high, x$217.$low + x416.$low)), new $Uint64(x$214.$high + x$216.$high, x$214.$low + x$216.$low)), new $Uint64(x$211.$high + x$213.$high, x$211.$low + x$213.$low)), x515, ((x$219 = (new p521Uint1(x532.$high, x532.$low)), new $Uint64(x$219.$high, x$219.$low)))); - x533 = _tuple$266[0]; - x534 = _tuple$266[1]; - x535 = (x$220 = ((x$221 = (new p521Uint1(x534.$high, x534.$low)), new $Uint64(x$221.$high, x$221.$low))), x$222 = (x$223 = ((x$224 = (new p521Uint1(x516.$high, x516.$low)), new $Uint64(x$224.$high, x$224.$low))), new $Uint64(x$223.$high + x484.$high, x$223.$low + x484.$low)), new $Uint64(x$220.$high + x$222.$high, x$220.$low + x$222.$low)); - x536 = new $Uint64(0, 0); - x537 = new $Uint64(0, 0); - _tuple$267 = bits.Sub64(x519, new $Uint64(4294967295, 4294967295), new $Uint64(0, 0)); - x536 = _tuple$267[0]; - x537 = _tuple$267[1]; - x538 = new $Uint64(0, 0); - x539 = new $Uint64(0, 0); - _tuple$268 = bits.Sub64(x521, new $Uint64(4294967295, 4294967295), ((x$225 = (new p521Uint1(x537.$high, x537.$low)), new $Uint64(x$225.$high, x$225.$low)))); - x538 = _tuple$268[0]; - x539 = _tuple$268[1]; - x540 = new $Uint64(0, 0); - x541 = new $Uint64(0, 0); - _tuple$269 = bits.Sub64(x523, new $Uint64(4294967295, 4294967295), ((x$226 = (new p521Uint1(x539.$high, x539.$low)), new $Uint64(x$226.$high, x$226.$low)))); - x540 = _tuple$269[0]; - x541 = _tuple$269[1]; - x542 = new $Uint64(0, 0); - x543 = new $Uint64(0, 0); - _tuple$270 = bits.Sub64(x525, new $Uint64(4294967295, 4294967295), ((x$227 = (new p521Uint1(x541.$high, x541.$low)), new $Uint64(x$227.$high, x$227.$low)))); - x542 = _tuple$270[0]; - x543 = _tuple$270[1]; - x544 = new $Uint64(0, 0); - x545 = new $Uint64(0, 0); - _tuple$271 = bits.Sub64(x527, new $Uint64(4294967295, 4294967295), ((x$228 = (new p521Uint1(x543.$high, x543.$low)), new $Uint64(x$228.$high, x$228.$low)))); - x544 = _tuple$271[0]; - x545 = _tuple$271[1]; - x546 = new $Uint64(0, 0); - x547 = new $Uint64(0, 0); - _tuple$272 = bits.Sub64(x529, new $Uint64(4294967295, 4294967295), ((x$229 = (new p521Uint1(x545.$high, x545.$low)), new $Uint64(x$229.$high, x$229.$low)))); - x546 = _tuple$272[0]; - x547 = _tuple$272[1]; - x548 = new $Uint64(0, 0); - x549 = new $Uint64(0, 0); - _tuple$273 = bits.Sub64(x531, new $Uint64(4294967295, 4294967295), ((x$230 = (new p521Uint1(x547.$high, x547.$low)), new $Uint64(x$230.$high, x$230.$low)))); - x548 = _tuple$273[0]; - x549 = _tuple$273[1]; - x550 = new $Uint64(0, 0); - x551 = new $Uint64(0, 0); - _tuple$274 = bits.Sub64(x533, new $Uint64(4294967295, 4294967295), ((x$231 = (new p521Uint1(x549.$high, x549.$low)), new $Uint64(x$231.$high, x$231.$low)))); - x550 = _tuple$274[0]; - x551 = _tuple$274[1]; - x552 = new $Uint64(0, 0); - x553 = new $Uint64(0, 0); - _tuple$275 = bits.Sub64(x535, new $Uint64(0, 511), ((x$232 = (new p521Uint1(x551.$high, x551.$low)), new $Uint64(x$232.$high, x$232.$low)))); - x552 = _tuple$275[0]; - x553 = _tuple$275[1]; - x555 = new $Uint64(0, 0); - _tuple$276 = bits.Sub64(new $Uint64(0, 0), new $Uint64(0, 0), ((x$233 = (new p521Uint1(x553.$high, x553.$low)), new $Uint64(x$233.$high, x$233.$low)))); - x555 = _tuple$276[1]; - x556 = new $Uint64(0, 0); - p521CmovznzU64((x556$24ptr || (x556$24ptr = new ptrType(function() { return x556; }, function($v) { x556 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x536, x519); - x557 = new $Uint64(0, 0); - p521CmovznzU64((x557$24ptr || (x557$24ptr = new ptrType(function() { return x557; }, function($v) { x557 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x538, x521); - x558 = new $Uint64(0, 0); - p521CmovznzU64((x558$24ptr || (x558$24ptr = new ptrType(function() { return x558; }, function($v) { x558 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x540, x523); - x559 = new $Uint64(0, 0); - p521CmovznzU64((x559$24ptr || (x559$24ptr = new ptrType(function() { return x559; }, function($v) { x559 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x542, x525); - x560 = new $Uint64(0, 0); - p521CmovznzU64((x560$24ptr || (x560$24ptr = new ptrType(function() { return x560; }, function($v) { x560 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x544, x527); - x561 = new $Uint64(0, 0); - p521CmovznzU64((x561$24ptr || (x561$24ptr = new ptrType(function() { return x561; }, function($v) { x561 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x546, x529); - x562 = new $Uint64(0, 0); - p521CmovznzU64((x562$24ptr || (x562$24ptr = new ptrType(function() { return x562; }, function($v) { x562 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x548, x531); - x563 = new $Uint64(0, 0); - p521CmovznzU64((x563$24ptr || (x563$24ptr = new ptrType(function() { return x563; }, function($v) { x563 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x550, x533); - x564 = new $Uint64(0, 0); - p521CmovznzU64((x564$24ptr || (x564$24ptr = new ptrType(function() { return x564; }, function($v) { x564 = $v; }))), (new p521Uint1(x555.$high, x555.$low)), x552, x535); - out1.nilCheck, out1[0] = x556; - out1.nilCheck, out1[1] = x557; - out1.nilCheck, out1[2] = x558; - out1.nilCheck, out1[3] = x559; - out1.nilCheck, out1[4] = x560; - out1.nilCheck, out1[5] = x561; - out1.nilCheck, out1[6] = x562; - out1.nilCheck, out1[7] = x563; - out1.nilCheck, out1[8] = x564; - }; - p521Selectznz = function(out1, arg1, arg2, arg3) { - var arg1, arg2, arg3, out1, x1, x1$24ptr, x2, x2$24ptr, x3, x3$24ptr, x4, x4$24ptr, x5, x5$24ptr, x6, x6$24ptr, x7, x7$24ptr, x8, x8$24ptr, x9, x9$24ptr; - x1 = new $Uint64(0, 0); - p521CmovznzU64((x1$24ptr || (x1$24ptr = new ptrType(function() { return x1; }, function($v) { x1 = $v; }))), arg1, arg2[0], arg3[0]); - x2 = new $Uint64(0, 0); - p521CmovznzU64((x2$24ptr || (x2$24ptr = new ptrType(function() { return x2; }, function($v) { x2 = $v; }))), arg1, arg2[1], arg3[1]); - x3 = new $Uint64(0, 0); - p521CmovznzU64((x3$24ptr || (x3$24ptr = new ptrType(function() { return x3; }, function($v) { x3 = $v; }))), arg1, arg2[2], arg3[2]); - x4 = new $Uint64(0, 0); - p521CmovznzU64((x4$24ptr || (x4$24ptr = new ptrType(function() { return x4; }, function($v) { x4 = $v; }))), arg1, arg2[3], arg3[3]); - x5 = new $Uint64(0, 0); - p521CmovznzU64((x5$24ptr || (x5$24ptr = new ptrType(function() { return x5; }, function($v) { x5 = $v; }))), arg1, arg2[4], arg3[4]); - x6 = new $Uint64(0, 0); - p521CmovznzU64((x6$24ptr || (x6$24ptr = new ptrType(function() { return x6; }, function($v) { x6 = $v; }))), arg1, arg2[5], arg3[5]); - x7 = new $Uint64(0, 0); - p521CmovznzU64((x7$24ptr || (x7$24ptr = new ptrType(function() { return x7; }, function($v) { x7 = $v; }))), arg1, arg2[6], arg3[6]); - x8 = new $Uint64(0, 0); - p521CmovznzU64((x8$24ptr || (x8$24ptr = new ptrType(function() { return x8; }, function($v) { x8 = $v; }))), arg1, arg2[7], arg3[7]); - x9 = new $Uint64(0, 0); - p521CmovznzU64((x9$24ptr || (x9$24ptr = new ptrType(function() { return x9; }, function($v) { x9 = $v; }))), arg1, arg2[8], arg3[8]); - out1.nilCheck, out1[0] = x1; - out1.nilCheck, out1[1] = x2; - out1.nilCheck, out1[2] = x3; - out1.nilCheck, out1[3] = x4; - out1.nilCheck, out1[4] = x5; - out1.nilCheck, out1[5] = x6; - out1.nilCheck, out1[6] = x7; - out1.nilCheck, out1[7] = x8; - out1.nilCheck, out1[8] = x9; - }; - p521ToBytes = function(out1, arg1) { - var arg1, out1, x, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[8]; - x2 = arg1[7]; - x3 = arg1[6]; - x4 = arg1[5]; - x5 = arg1[4]; - x6 = arg1[3]; - x7 = arg1[2]; - x8 = arg1[1]; - x9 = arg1[0]; - x10 = ((((x9.$low << 24 >>> 24)) & 255) >>> 0); - x11 = $shiftRightUint64(x9, 8); - x12 = ((((x11.$low << 24 >>> 24)) & 255) >>> 0); - x13 = $shiftRightUint64(x11, 8); - x14 = ((((x13.$low << 24 >>> 24)) & 255) >>> 0); - x15 = $shiftRightUint64(x13, 8); - x16 = ((((x15.$low << 24 >>> 24)) & 255) >>> 0); - x17 = $shiftRightUint64(x15, 8); - x18 = ((((x17.$low << 24 >>> 24)) & 255) >>> 0); - x19 = $shiftRightUint64(x17, 8); - x20 = ((((x19.$low << 24 >>> 24)) & 255) >>> 0); - x21 = $shiftRightUint64(x19, 8); - x22 = ((((x21.$low << 24 >>> 24)) & 255) >>> 0); - x23 = ((($shiftRightUint64(x21, 8)).$low << 24 >>> 24)); - x24 = ((((x8.$low << 24 >>> 24)) & 255) >>> 0); - x25 = $shiftRightUint64(x8, 8); - x26 = ((((x25.$low << 24 >>> 24)) & 255) >>> 0); - x27 = $shiftRightUint64(x25, 8); - x28 = ((((x27.$low << 24 >>> 24)) & 255) >>> 0); - x29 = $shiftRightUint64(x27, 8); - x30 = ((((x29.$low << 24 >>> 24)) & 255) >>> 0); - x31 = $shiftRightUint64(x29, 8); - x32 = ((((x31.$low << 24 >>> 24)) & 255) >>> 0); - x33 = $shiftRightUint64(x31, 8); - x34 = ((((x33.$low << 24 >>> 24)) & 255) >>> 0); - x35 = $shiftRightUint64(x33, 8); - x36 = ((((x35.$low << 24 >>> 24)) & 255) >>> 0); - x37 = ((($shiftRightUint64(x35, 8)).$low << 24 >>> 24)); - x38 = ((((x7.$low << 24 >>> 24)) & 255) >>> 0); - x39 = $shiftRightUint64(x7, 8); - x40 = ((((x39.$low << 24 >>> 24)) & 255) >>> 0); - x41 = $shiftRightUint64(x39, 8); - x42 = ((((x41.$low << 24 >>> 24)) & 255) >>> 0); - x43 = $shiftRightUint64(x41, 8); - x44 = ((((x43.$low << 24 >>> 24)) & 255) >>> 0); - x45 = $shiftRightUint64(x43, 8); - x46 = ((((x45.$low << 24 >>> 24)) & 255) >>> 0); - x47 = $shiftRightUint64(x45, 8); - x48 = ((((x47.$low << 24 >>> 24)) & 255) >>> 0); - x49 = $shiftRightUint64(x47, 8); - x50 = ((((x49.$low << 24 >>> 24)) & 255) >>> 0); - x51 = ((($shiftRightUint64(x49, 8)).$low << 24 >>> 24)); - x52 = ((((x6.$low << 24 >>> 24)) & 255) >>> 0); - x53 = $shiftRightUint64(x6, 8); - x54 = ((((x53.$low << 24 >>> 24)) & 255) >>> 0); - x55 = $shiftRightUint64(x53, 8); - x56 = ((((x55.$low << 24 >>> 24)) & 255) >>> 0); - x57 = $shiftRightUint64(x55, 8); - x58 = ((((x57.$low << 24 >>> 24)) & 255) >>> 0); - x59 = $shiftRightUint64(x57, 8); - x60 = ((((x59.$low << 24 >>> 24)) & 255) >>> 0); - x61 = $shiftRightUint64(x59, 8); - x62 = ((((x61.$low << 24 >>> 24)) & 255) >>> 0); - x63 = $shiftRightUint64(x61, 8); - x64 = ((((x63.$low << 24 >>> 24)) & 255) >>> 0); - x65 = ((($shiftRightUint64(x63, 8)).$low << 24 >>> 24)); - x66 = ((((x5.$low << 24 >>> 24)) & 255) >>> 0); - x67 = $shiftRightUint64(x5, 8); - x68 = ((((x67.$low << 24 >>> 24)) & 255) >>> 0); - x69 = $shiftRightUint64(x67, 8); - x70 = ((((x69.$low << 24 >>> 24)) & 255) >>> 0); - x71 = $shiftRightUint64(x69, 8); - x72 = ((((x71.$low << 24 >>> 24)) & 255) >>> 0); - x73 = $shiftRightUint64(x71, 8); - x74 = ((((x73.$low << 24 >>> 24)) & 255) >>> 0); - x75 = $shiftRightUint64(x73, 8); - x76 = ((((x75.$low << 24 >>> 24)) & 255) >>> 0); - x77 = $shiftRightUint64(x75, 8); - x78 = ((((x77.$low << 24 >>> 24)) & 255) >>> 0); - x79 = ((($shiftRightUint64(x77, 8)).$low << 24 >>> 24)); - x80 = ((((x4.$low << 24 >>> 24)) & 255) >>> 0); - x81 = $shiftRightUint64(x4, 8); - x82 = ((((x81.$low << 24 >>> 24)) & 255) >>> 0); - x83 = $shiftRightUint64(x81, 8); - x84 = ((((x83.$low << 24 >>> 24)) & 255) >>> 0); - x85 = $shiftRightUint64(x83, 8); - x86 = ((((x85.$low << 24 >>> 24)) & 255) >>> 0); - x87 = $shiftRightUint64(x85, 8); - x88 = ((((x87.$low << 24 >>> 24)) & 255) >>> 0); - x89 = $shiftRightUint64(x87, 8); - x90 = ((((x89.$low << 24 >>> 24)) & 255) >>> 0); - x91 = $shiftRightUint64(x89, 8); - x92 = ((((x91.$low << 24 >>> 24)) & 255) >>> 0); - x93 = ((($shiftRightUint64(x91, 8)).$low << 24 >>> 24)); - x94 = ((((x3.$low << 24 >>> 24)) & 255) >>> 0); - x95 = $shiftRightUint64(x3, 8); - x96 = ((((x95.$low << 24 >>> 24)) & 255) >>> 0); - x97 = $shiftRightUint64(x95, 8); - x98 = ((((x97.$low << 24 >>> 24)) & 255) >>> 0); - x99 = $shiftRightUint64(x97, 8); - x100 = ((((x99.$low << 24 >>> 24)) & 255) >>> 0); - x101 = $shiftRightUint64(x99, 8); - x102 = ((((x101.$low << 24 >>> 24)) & 255) >>> 0); - x103 = $shiftRightUint64(x101, 8); - x104 = ((((x103.$low << 24 >>> 24)) & 255) >>> 0); - x105 = $shiftRightUint64(x103, 8); - x106 = ((((x105.$low << 24 >>> 24)) & 255) >>> 0); - x107 = ((($shiftRightUint64(x105, 8)).$low << 24 >>> 24)); - x108 = ((((x2.$low << 24 >>> 24)) & 255) >>> 0); - x109 = $shiftRightUint64(x2, 8); - x110 = ((((x109.$low << 24 >>> 24)) & 255) >>> 0); - x111 = $shiftRightUint64(x109, 8); - x112 = ((((x111.$low << 24 >>> 24)) & 255) >>> 0); - x113 = $shiftRightUint64(x111, 8); - x114 = ((((x113.$low << 24 >>> 24)) & 255) >>> 0); - x115 = $shiftRightUint64(x113, 8); - x116 = ((((x115.$low << 24 >>> 24)) & 255) >>> 0); - x117 = $shiftRightUint64(x115, 8); - x118 = ((((x117.$low << 24 >>> 24)) & 255) >>> 0); - x119 = $shiftRightUint64(x117, 8); - x120 = ((((x119.$low << 24 >>> 24)) & 255) >>> 0); - x121 = ((($shiftRightUint64(x119, 8)).$low << 24 >>> 24)); - x122 = ((((x1.$low << 24 >>> 24)) & 255) >>> 0); - x123 = ((x = $shiftRightUint64(x1, 8), new p521Uint1(x.$high, x.$low))); - out1.nilCheck, out1[0] = x10; - out1.nilCheck, out1[1] = x12; - out1.nilCheck, out1[2] = x14; - out1.nilCheck, out1[3] = x16; - out1.nilCheck, out1[4] = x18; - out1.nilCheck, out1[5] = x20; - out1.nilCheck, out1[6] = x22; - out1.nilCheck, out1[7] = x23; - out1.nilCheck, out1[8] = x24; - out1.nilCheck, out1[9] = x26; - out1.nilCheck, out1[10] = x28; - out1.nilCheck, out1[11] = x30; - out1.nilCheck, out1[12] = x32; - out1.nilCheck, out1[13] = x34; - out1.nilCheck, out1[14] = x36; - out1.nilCheck, out1[15] = x37; - out1.nilCheck, out1[16] = x38; - out1.nilCheck, out1[17] = x40; - out1.nilCheck, out1[18] = x42; - out1.nilCheck, out1[19] = x44; - out1.nilCheck, out1[20] = x46; - out1.nilCheck, out1[21] = x48; - out1.nilCheck, out1[22] = x50; - out1.nilCheck, out1[23] = x51; - out1.nilCheck, out1[24] = x52; - out1.nilCheck, out1[25] = x54; - out1.nilCheck, out1[26] = x56; - out1.nilCheck, out1[27] = x58; - out1.nilCheck, out1[28] = x60; - out1.nilCheck, out1[29] = x62; - out1.nilCheck, out1[30] = x64; - out1.nilCheck, out1[31] = x65; - out1.nilCheck, out1[32] = x66; - out1.nilCheck, out1[33] = x68; - out1.nilCheck, out1[34] = x70; - out1.nilCheck, out1[35] = x72; - out1.nilCheck, out1[36] = x74; - out1.nilCheck, out1[37] = x76; - out1.nilCheck, out1[38] = x78; - out1.nilCheck, out1[39] = x79; - out1.nilCheck, out1[40] = x80; - out1.nilCheck, out1[41] = x82; - out1.nilCheck, out1[42] = x84; - out1.nilCheck, out1[43] = x86; - out1.nilCheck, out1[44] = x88; - out1.nilCheck, out1[45] = x90; - out1.nilCheck, out1[46] = x92; - out1.nilCheck, out1[47] = x93; - out1.nilCheck, out1[48] = x94; - out1.nilCheck, out1[49] = x96; - out1.nilCheck, out1[50] = x98; - out1.nilCheck, out1[51] = x100; - out1.nilCheck, out1[52] = x102; - out1.nilCheck, out1[53] = x104; - out1.nilCheck, out1[54] = x106; - out1.nilCheck, out1[55] = x107; - out1.nilCheck, out1[56] = x108; - out1.nilCheck, out1[57] = x110; - out1.nilCheck, out1[58] = x112; - out1.nilCheck, out1[59] = x114; - out1.nilCheck, out1[60] = x116; - out1.nilCheck, out1[61] = x118; - out1.nilCheck, out1[62] = x120; - out1.nilCheck, out1[63] = x121; - out1.nilCheck, out1[64] = x122; - out1.nilCheck, out1[65] = ((x123.$low << 24 >>> 24)); - }; - p521FromBytes = function(out1, arg1) { - var arg1, out1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = $shiftLeft64(((x = (new p521Uint1(0, arg1[65])), new $Uint64(x.$high, x.$low))), 8); - x2 = arg1[64]; - x3 = $shiftLeft64((new $Uint64(0, arg1[63])), 56); - x4 = $shiftLeft64((new $Uint64(0, arg1[62])), 48); - x5 = $shiftLeft64((new $Uint64(0, arg1[61])), 40); - x6 = $shiftLeft64((new $Uint64(0, arg1[60])), 32); - x7 = $shiftLeft64((new $Uint64(0, arg1[59])), 24); - x8 = $shiftLeft64((new $Uint64(0, arg1[58])), 16); - x9 = $shiftLeft64((new $Uint64(0, arg1[57])), 8); - x10 = arg1[56]; - x11 = $shiftLeft64((new $Uint64(0, arg1[55])), 56); - x12 = $shiftLeft64((new $Uint64(0, arg1[54])), 48); - x13 = $shiftLeft64((new $Uint64(0, arg1[53])), 40); - x14 = $shiftLeft64((new $Uint64(0, arg1[52])), 32); - x15 = $shiftLeft64((new $Uint64(0, arg1[51])), 24); - x16 = $shiftLeft64((new $Uint64(0, arg1[50])), 16); - x17 = $shiftLeft64((new $Uint64(0, arg1[49])), 8); - x18 = arg1[48]; - x19 = $shiftLeft64((new $Uint64(0, arg1[47])), 56); - x20 = $shiftLeft64((new $Uint64(0, arg1[46])), 48); - x21 = $shiftLeft64((new $Uint64(0, arg1[45])), 40); - x22 = $shiftLeft64((new $Uint64(0, arg1[44])), 32); - x23 = $shiftLeft64((new $Uint64(0, arg1[43])), 24); - x24 = $shiftLeft64((new $Uint64(0, arg1[42])), 16); - x25 = $shiftLeft64((new $Uint64(0, arg1[41])), 8); - x26 = arg1[40]; - x27 = $shiftLeft64((new $Uint64(0, arg1[39])), 56); - x28 = $shiftLeft64((new $Uint64(0, arg1[38])), 48); - x29 = $shiftLeft64((new $Uint64(0, arg1[37])), 40); - x30 = $shiftLeft64((new $Uint64(0, arg1[36])), 32); - x31 = $shiftLeft64((new $Uint64(0, arg1[35])), 24); - x32 = $shiftLeft64((new $Uint64(0, arg1[34])), 16); - x33 = $shiftLeft64((new $Uint64(0, arg1[33])), 8); - x34 = arg1[32]; - x35 = $shiftLeft64((new $Uint64(0, arg1[31])), 56); - x36 = $shiftLeft64((new $Uint64(0, arg1[30])), 48); - x37 = $shiftLeft64((new $Uint64(0, arg1[29])), 40); - x38 = $shiftLeft64((new $Uint64(0, arg1[28])), 32); - x39 = $shiftLeft64((new $Uint64(0, arg1[27])), 24); - x40 = $shiftLeft64((new $Uint64(0, arg1[26])), 16); - x41 = $shiftLeft64((new $Uint64(0, arg1[25])), 8); - x42 = arg1[24]; - x43 = $shiftLeft64((new $Uint64(0, arg1[23])), 56); - x44 = $shiftLeft64((new $Uint64(0, arg1[22])), 48); - x45 = $shiftLeft64((new $Uint64(0, arg1[21])), 40); - x46 = $shiftLeft64((new $Uint64(0, arg1[20])), 32); - x47 = $shiftLeft64((new $Uint64(0, arg1[19])), 24); - x48 = $shiftLeft64((new $Uint64(0, arg1[18])), 16); - x49 = $shiftLeft64((new $Uint64(0, arg1[17])), 8); - x50 = arg1[16]; - x51 = $shiftLeft64((new $Uint64(0, arg1[15])), 56); - x52 = $shiftLeft64((new $Uint64(0, arg1[14])), 48); - x53 = $shiftLeft64((new $Uint64(0, arg1[13])), 40); - x54 = $shiftLeft64((new $Uint64(0, arg1[12])), 32); - x55 = $shiftLeft64((new $Uint64(0, arg1[11])), 24); - x56 = $shiftLeft64((new $Uint64(0, arg1[10])), 16); - x57 = $shiftLeft64((new $Uint64(0, arg1[9])), 8); - x58 = arg1[8]; - x59 = $shiftLeft64((new $Uint64(0, arg1[7])), 56); - x60 = $shiftLeft64((new $Uint64(0, arg1[6])), 48); - x61 = $shiftLeft64((new $Uint64(0, arg1[5])), 40); - x62 = $shiftLeft64((new $Uint64(0, arg1[4])), 32); - x63 = $shiftLeft64((new $Uint64(0, arg1[3])), 24); - x64 = $shiftLeft64((new $Uint64(0, arg1[2])), 16); - x65 = $shiftLeft64((new $Uint64(0, arg1[1])), 8); - x66 = arg1[0]; - x67 = (x$1 = (new $Uint64(0, x66)), new $Uint64(x65.$high + x$1.$high, x65.$low + x$1.$low)); - x68 = new $Uint64(x64.$high + x67.$high, x64.$low + x67.$low); - x69 = new $Uint64(x63.$high + x68.$high, x63.$low + x68.$low); - x70 = new $Uint64(x62.$high + x69.$high, x62.$low + x69.$low); - x71 = new $Uint64(x61.$high + x70.$high, x61.$low + x70.$low); - x72 = new $Uint64(x60.$high + x71.$high, x60.$low + x71.$low); - x73 = new $Uint64(x59.$high + x72.$high, x59.$low + x72.$low); - x74 = (x$2 = (new $Uint64(0, x58)), new $Uint64(x57.$high + x$2.$high, x57.$low + x$2.$low)); - x75 = new $Uint64(x56.$high + x74.$high, x56.$low + x74.$low); - x76 = new $Uint64(x55.$high + x75.$high, x55.$low + x75.$low); - x77 = new $Uint64(x54.$high + x76.$high, x54.$low + x76.$low); - x78 = new $Uint64(x53.$high + x77.$high, x53.$low + x77.$low); - x79 = new $Uint64(x52.$high + x78.$high, x52.$low + x78.$low); - x80 = new $Uint64(x51.$high + x79.$high, x51.$low + x79.$low); - x81 = (x$3 = (new $Uint64(0, x50)), new $Uint64(x49.$high + x$3.$high, x49.$low + x$3.$low)); - x82 = new $Uint64(x48.$high + x81.$high, x48.$low + x81.$low); - x83 = new $Uint64(x47.$high + x82.$high, x47.$low + x82.$low); - x84 = new $Uint64(x46.$high + x83.$high, x46.$low + x83.$low); - x85 = new $Uint64(x45.$high + x84.$high, x45.$low + x84.$low); - x86 = new $Uint64(x44.$high + x85.$high, x44.$low + x85.$low); - x87 = new $Uint64(x43.$high + x86.$high, x43.$low + x86.$low); - x88 = (x$4 = (new $Uint64(0, x42)), new $Uint64(x41.$high + x$4.$high, x41.$low + x$4.$low)); - x89 = new $Uint64(x40.$high + x88.$high, x40.$low + x88.$low); - x90 = new $Uint64(x39.$high + x89.$high, x39.$low + x89.$low); - x91 = new $Uint64(x38.$high + x90.$high, x38.$low + x90.$low); - x92 = new $Uint64(x37.$high + x91.$high, x37.$low + x91.$low); - x93 = new $Uint64(x36.$high + x92.$high, x36.$low + x92.$low); - x94 = new $Uint64(x35.$high + x93.$high, x35.$low + x93.$low); - x95 = (x$5 = (new $Uint64(0, x34)), new $Uint64(x33.$high + x$5.$high, x33.$low + x$5.$low)); - x96 = new $Uint64(x32.$high + x95.$high, x32.$low + x95.$low); - x97 = new $Uint64(x31.$high + x96.$high, x31.$low + x96.$low); - x98 = new $Uint64(x30.$high + x97.$high, x30.$low + x97.$low); - x99 = new $Uint64(x29.$high + x98.$high, x29.$low + x98.$low); - x100 = new $Uint64(x28.$high + x99.$high, x28.$low + x99.$low); - x101 = new $Uint64(x27.$high + x100.$high, x27.$low + x100.$low); - x102 = (x$6 = (new $Uint64(0, x26)), new $Uint64(x25.$high + x$6.$high, x25.$low + x$6.$low)); - x103 = new $Uint64(x24.$high + x102.$high, x24.$low + x102.$low); - x104 = new $Uint64(x23.$high + x103.$high, x23.$low + x103.$low); - x105 = new $Uint64(x22.$high + x104.$high, x22.$low + x104.$low); - x106 = new $Uint64(x21.$high + x105.$high, x21.$low + x105.$low); - x107 = new $Uint64(x20.$high + x106.$high, x20.$low + x106.$low); - x108 = new $Uint64(x19.$high + x107.$high, x19.$low + x107.$low); - x109 = (x$7 = (new $Uint64(0, x18)), new $Uint64(x17.$high + x$7.$high, x17.$low + x$7.$low)); - x110 = new $Uint64(x16.$high + x109.$high, x16.$low + x109.$low); - x111 = new $Uint64(x15.$high + x110.$high, x15.$low + x110.$low); - x112 = new $Uint64(x14.$high + x111.$high, x14.$low + x111.$low); - x113 = new $Uint64(x13.$high + x112.$high, x13.$low + x112.$low); - x114 = new $Uint64(x12.$high + x113.$high, x12.$low + x113.$low); - x115 = new $Uint64(x11.$high + x114.$high, x11.$low + x114.$low); - x116 = (x$8 = (new $Uint64(0, x10)), new $Uint64(x9.$high + x$8.$high, x9.$low + x$8.$low)); - x117 = new $Uint64(x8.$high + x116.$high, x8.$low + x116.$low); - x118 = new $Uint64(x7.$high + x117.$high, x7.$low + x117.$low); - x119 = new $Uint64(x6.$high + x118.$high, x6.$low + x118.$low); - x120 = new $Uint64(x5.$high + x119.$high, x5.$low + x119.$low); - x121 = new $Uint64(x4.$high + x120.$high, x4.$low + x120.$low); - x122 = new $Uint64(x3.$high + x121.$high, x3.$low + x121.$low); - x123 = (x$9 = (new $Uint64(0, x2)), new $Uint64(x1.$high + x$9.$high, x1.$low + x$9.$low)); - out1.nilCheck, out1[0] = x73; - out1.nilCheck, out1[1] = x80; - out1.nilCheck, out1[2] = x87; - out1.nilCheck, out1[3] = x94; - out1.nilCheck, out1[4] = x101; - out1.nilCheck, out1[5] = x108; - out1.nilCheck, out1[6] = x115; - out1.nilCheck, out1[7] = x122; - out1.nilCheck, out1[8] = x123; - }; - P521Element.ptr.prototype.One = function() { - var e; - e = this; - p521SetOne(e.x); - return e; - }; - P521Element.prototype.One = function() { return this.$val.One(); }; - P521Element.ptr.prototype.Equal = function(t) { - var e, eBytes, t, tBytes; - e = this; - eBytes = e.Bytes(); - tBytes = t.Bytes(); - return subtle.ConstantTimeCompare(eBytes, tBytes); - }; - P521Element.prototype.Equal = function(t) { return this.$val.Equal(t); }; - P521Element.ptr.prototype.IsZero = function() { - var e, eBytes; - e = this; - eBytes = e.Bytes(); - return subtle.ConstantTimeCompare(eBytes, p521ZeroEncoding); - }; - P521Element.prototype.IsZero = function() { return this.$val.IsZero(); }; - P521Element.ptr.prototype.Set = function(t) { - var e, t; - e = this; - p521MontgomeryDomainFieldElement.copy(e.x, t.x); - return e; - }; - P521Element.prototype.Set = function(t) { return this.$val.Set(t); }; - P521Element.ptr.prototype.Bytes = function() { - var e, out; - e = this; - out = arrayType$3.zero(); - return e.bytes(out); - }; - P521Element.prototype.Bytes = function() { return this.$val.Bytes(); }; - P521Element.ptr.prototype.bytes = function(out) { - var e, out, tmp; - e = this; - tmp = arrayType.zero(); - p521FromMontgomery(tmp, e.x); - p521ToBytes(out, (tmp)); - p521InvertEndianness(new sliceType(out)); - return new sliceType(out); - }; - P521Element.prototype.bytes = function(out) { return this.$val.bytes(out); }; - P521Element.ptr.prototype.SetBytes = function(v) { - var _i, _ref, e, i, in$1, tmp, v; - e = this; - if (!((v.$length === 66))) { - return [ptrType$1.nil, errors.New("invalid P521Element encoding")]; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) < ((i < 0 || i >= p521MinusOneEncoding.$length) ? ($throwRuntimeError("index out of range"), undefined) : p521MinusOneEncoding.$array[p521MinusOneEncoding.$offset + i])) { - break; - } - if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) > ((i < 0 || i >= p521MinusOneEncoding.$length) ? ($throwRuntimeError("index out of range"), undefined) : p521MinusOneEncoding.$array[p521MinusOneEncoding.$offset + i])) { - return [ptrType$1.nil, errors.New("invalid P521Element encoding")]; - } - _i++; - } - in$1 = arrayType$3.zero(); - $copySlice(new sliceType(in$1), v); - p521InvertEndianness(new sliceType(in$1)); - tmp = arrayType.zero(); - p521FromBytes((tmp), in$1); - p521ToMontgomery(e.x, tmp); - return [e, $ifaceNil]; - }; - P521Element.prototype.SetBytes = function(v) { return this.$val.SetBytes(v); }; - P521Element.ptr.prototype.Add = function(t1, t2) { - var e, t1, t2; - e = this; - p521Add(e.x, t1.x, t2.x); - return e; - }; - P521Element.prototype.Add = function(t1, t2) { return this.$val.Add(t1, t2); }; - P521Element.ptr.prototype.Sub = function(t1, t2) { - var e, t1, t2; - e = this; - p521Sub(e.x, t1.x, t2.x); - return e; - }; - P521Element.prototype.Sub = function(t1, t2) { return this.$val.Sub(t1, t2); }; - P521Element.ptr.prototype.Mul = function(t1, t2) { - var e, t1, t2; - e = this; - p521Mul(e.x, t1.x, t2.x); - return e; - }; - P521Element.prototype.Mul = function(t1, t2) { return this.$val.Mul(t1, t2); }; - P521Element.ptr.prototype.Square = function(t) { - var e, t; - e = this; - p521Square(e.x, t.x); - return e; - }; - P521Element.prototype.Square = function(t) { return this.$val.Square(t); }; - P521Element.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, v; - v = this; - p521Selectznz((v.x), (new p521Uint1(0, cond)), (b.x), (a.x)); - return v; - }; - P521Element.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - p521InvertEndianness = function(v) { - var _q, _tmp, _tmp$1, i, v, x, x$1; - i = 0; - while (true) { - if (!(i < (_q = v.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) { break; } - _tmp = (x = (v.$length - 1 >> 0) - i >> 0, ((x < 0 || x >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x])); - _tmp$1 = ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]); - ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i] = _tmp); - (x$1 = (v.$length - 1 >> 0) - i >> 0, ((x$1 < 0 || x$1 >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x$1] = _tmp$1)); - i = i + (1) >> 0; - } - }; - P384Element.ptr.prototype.Invert = function(x) { - var e, s, s$1, s$10, s$2, s$3, s$4, s$5, s$6, s$7, s$8, s$9, t0, t1, t2, t3, x, z; - e = this; - z = new P384Element.ptr(arrayType$1.zero()).Set(e); - t0 = new P384Element.ptr(arrayType$1.zero()); - t1 = new P384Element.ptr(arrayType$1.zero()); - t2 = new P384Element.ptr(arrayType$1.zero()); - t3 = new P384Element.ptr(arrayType$1.zero()); - z.Square(x); - z.Mul(x, z); - z.Square(z); - t1.Mul(x, z); - z.Square(t1); - s = 1; - while (true) { - if (!(s < 3)) { break; } - z.Square(z); - s = s + (1) >> 0; - } - z.Mul(t1, z); - t0.Square(z); - s$1 = 1; - while (true) { - if (!(s$1 < 6)) { break; } - t0.Square(t0); - s$1 = s$1 + (1) >> 0; - } - t0.Mul(z, t0); - t2.Square(t0); - s$2 = 1; - while (true) { - if (!(s$2 < 12)) { break; } - t2.Square(t2); - s$2 = s$2 + (1) >> 0; - } - t0.Mul(t0, t2); - s$3 = 0; - while (true) { - if (!(s$3 < 6)) { break; } - t0.Square(t0); - s$3 = s$3 + (1) >> 0; - } - z.Mul(z, t0); - t0.Square(z); - t2.Mul(x, t0); - t0.Square(t2); - t0.Mul(x, t0); - t3.Square(t0); - s$4 = 1; - while (true) { - if (!(s$4 < 31)) { break; } - t3.Square(t3); - s$4 = s$4 + (1) >> 0; - } - t2.Mul(t2, t3); - t3.Square(t2); - s$5 = 1; - while (true) { - if (!(s$5 < 63)) { break; } - t3.Square(t3); - s$5 = s$5 + (1) >> 0; - } - t2.Mul(t2, t3); - t3.Square(t2); - s$6 = 1; - while (true) { - if (!(s$6 < 126)) { break; } - t3.Square(t3); - s$6 = s$6 + (1) >> 0; - } - t2.Mul(t2, t3); - s$7 = 0; - while (true) { - if (!(s$7 < 3)) { break; } - t2.Square(t2); - s$7 = s$7 + (1) >> 0; - } - t1.Mul(t1, t2); - s$8 = 0; - while (true) { - if (!(s$8 < 33)) { break; } - t1.Square(t1); - s$8 = s$8 + (1) >> 0; - } - t0.Mul(t0, t1); - s$9 = 0; - while (true) { - if (!(s$9 < 94)) { break; } - t0.Square(t0); - s$9 = s$9 + (1) >> 0; - } - z.Mul(z, t0); - s$10 = 0; - while (true) { - if (!(s$10 < 2)) { break; } - z.Square(z); - s$10 = s$10 + (1) >> 0; - } - z.Mul(x, z); - return e.Set(z); - }; - P384Element.prototype.Invert = function(x) { return this.$val.Invert(x); }; - p384CmovznzU64 = function(out1, arg1, arg2, arg3) { - var arg1, arg2, arg3, out1, x, x$1, x$2, x1, x2; - x1 = $mul64((new $Uint64(arg1.$high, arg1.$low)), new $Uint64(4294967295, 4294967295)); - x2 = (x = new $Uint64(x1.$high & arg3.$high, (x1.$low & arg3.$low) >>> 0), x$1 = (x$2 = new $Uint64(~x1.$high, ~x1.$low >>> 0), new $Uint64(x$2.$high & arg2.$high, (x$2.$low & arg2.$low) >>> 0)), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - out1.$set(x2); - }; - p384Mul = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$199, _tuple$2, _tuple$20, _tuple$200, _tuple$201, _tuple$202, _tuple$203, _tuple$204, _tuple$205, _tuple$206, _tuple$207, _tuple$208, _tuple$209, _tuple$21, _tuple$210, _tuple$211, _tuple$212, _tuple$213, _tuple$214, _tuple$215, _tuple$216, _tuple$217, _tuple$218, _tuple$219, _tuple$22, _tuple$220, _tuple$221, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, arg2, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x101, x102, x103, x104, x105, x106, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x179, x18, x180, x181, x182, x183, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x240, x241, x242, x243, x244, x245, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x301, x302, x303, x304, x305, x306, x307, x308, x309, x310, x311, x312, x313, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x354, x355, x356, x357, x358, x359, x36, x360, x361, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x376, x377, x378, x379, x38, x380, x381, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x403, x404, x405, x406, x407, x408, x409, x41, x410, x411, x412, x413, x414, x416, x417, x418, x419, x42, x420, x421, x422, x423, x424, x425, x426, x427, x428, x429, x43, x430, x431, x432, x433, x434, x435, x436, x437, x438, x44, x440, x441, x442, x443, x444, x445, x446, x447, x448, x449, x45, x450, x451, x452, x453, x454, x455, x456, x457, x458, x459, x46, x460, x461, x462, x463, x464, x465, x467, x468, x468$24ptr, x469, x469$24ptr, x47, x470, x470$24ptr, x471, x471$24ptr, x472, x472$24ptr, x473, x473$24ptr, x48, x49, x5, x50, x51, x52, x53, x54, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[4]; - x5 = arg1[5]; - x6 = arg1[0]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple = bits.Mul64(x6, arg2[5]); - x8 = _tuple[0]; - x7 = _tuple[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x6, arg2[4]); - x10 = _tuple$1[0]; - x9 = _tuple$1[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x6, arg2[3]); - x12 = _tuple$2[0]; - x11 = _tuple$2[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x6, arg2[2]); - x14 = _tuple$3[0]; - x13 = _tuple$3[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x6, arg2[1]); - x16 = _tuple$4[0]; - x15 = _tuple$4[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x6, arg2[0]); - x18 = _tuple$5[0]; - x17 = _tuple$5[1]; - x19 = new $Uint64(0, 0); - x20 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x18, x15, new $Uint64(0, 0)); - x19 = _tuple$6[0]; - x20 = _tuple$6[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(x16, x13, ((x = (new p384Uint1(x20.$high, x20.$low)), new $Uint64(x.$high, x.$low)))); - x21 = _tuple$7[0]; - x22 = _tuple$7[1]; - x23 = new $Uint64(0, 0); - x24 = new $Uint64(0, 0); - _tuple$8 = bits.Add64(x14, x11, ((x$1 = (new p384Uint1(x22.$high, x22.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x23 = _tuple$8[0]; - x24 = _tuple$8[1]; - x25 = new $Uint64(0, 0); - x26 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x12, x9, ((x$2 = (new p384Uint1(x24.$high, x24.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x25 = _tuple$9[0]; - x26 = _tuple$9[1]; - x27 = new $Uint64(0, 0); - x28 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x10, x7, ((x$3 = (new p384Uint1(x26.$high, x26.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x27 = _tuple$10[0]; - x28 = _tuple$10[1]; - x29 = (x$4 = ((x$5 = (new p384Uint1(x28.$high, x28.$low)), new $Uint64(x$5.$high, x$5.$low))), new $Uint64(x$4.$high + x8.$high, x$4.$low + x8.$low)); - x30 = new $Uint64(0, 0); - _tuple$11 = bits.Mul64(x17, new $Uint64(1, 1)); - x30 = _tuple$11[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$12 = bits.Mul64(x30, new $Uint64(4294967295, 4294967295)); - x33 = _tuple$12[0]; - x32 = _tuple$12[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$13 = bits.Mul64(x30, new $Uint64(4294967295, 4294967295)); - x35 = _tuple$13[0]; - x34 = _tuple$13[1]; - x36 = new $Uint64(0, 0); - x37 = new $Uint64(0, 0); - _tuple$14 = bits.Mul64(x30, new $Uint64(4294967295, 4294967295)); - x37 = _tuple$14[0]; - x36 = _tuple$14[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$15 = bits.Mul64(x30, new $Uint64(4294967295, 4294967294)); - x39 = _tuple$15[0]; - x38 = _tuple$15[1]; - x40 = new $Uint64(0, 0); - x41 = new $Uint64(0, 0); - _tuple$16 = bits.Mul64(x30, new $Uint64(4294967295, 0)); - x41 = _tuple$16[0]; - x40 = _tuple$16[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$17 = bits.Mul64(x30, new $Uint64(0, 4294967295)); - x43 = _tuple$17[0]; - x42 = _tuple$17[1]; - x44 = new $Uint64(0, 0); - x45 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(x43, x40, new $Uint64(0, 0)); - x44 = _tuple$18[0]; - x45 = _tuple$18[1]; - x46 = new $Uint64(0, 0); - x47 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(x41, x38, ((x$6 = (new p384Uint1(x45.$high, x45.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x46 = _tuple$19[0]; - x47 = _tuple$19[1]; - x48 = new $Uint64(0, 0); - x49 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(x39, x36, ((x$7 = (new p384Uint1(x47.$high, x47.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x48 = _tuple$20[0]; - x49 = _tuple$20[1]; - x50 = new $Uint64(0, 0); - x51 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x37, x34, ((x$8 = (new p384Uint1(x49.$high, x49.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x50 = _tuple$21[0]; - x51 = _tuple$21[1]; - x52 = new $Uint64(0, 0); - x53 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x35, x32, ((x$9 = (new p384Uint1(x51.$high, x51.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x52 = _tuple$22[0]; - x53 = _tuple$22[1]; - x54 = (x$10 = ((x$11 = (new p384Uint1(x53.$high, x53.$low)), new $Uint64(x$11.$high, x$11.$low))), new $Uint64(x$10.$high + x33.$high, x$10.$low + x33.$low)); - x56 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x17, x42, new $Uint64(0, 0)); - x56 = _tuple$23[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x19, x44, ((x$12 = (new p384Uint1(x56.$high, x56.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x57 = _tuple$24[0]; - x58 = _tuple$24[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(x21, x46, ((x$13 = (new p384Uint1(x58.$high, x58.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x59 = _tuple$25[0]; - x60 = _tuple$25[1]; - x61 = new $Uint64(0, 0); - x62 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x23, x48, ((x$14 = (new p384Uint1(x60.$high, x60.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x61 = _tuple$26[0]; - x62 = _tuple$26[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x25, x50, ((x$15 = (new p384Uint1(x62.$high, x62.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x63 = _tuple$27[0]; - x64 = _tuple$27[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x27, x52, ((x$16 = (new p384Uint1(x64.$high, x64.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x65 = _tuple$28[0]; - x66 = _tuple$28[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(x29, x54, ((x$17 = (new p384Uint1(x66.$high, x66.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x67 = _tuple$29[0]; - x68 = _tuple$29[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x1, arg2[5]); - x70 = _tuple$30[0]; - x69 = _tuple$30[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$31 = bits.Mul64(x1, arg2[4]); - x72 = _tuple$31[0]; - x71 = _tuple$31[1]; - x73 = new $Uint64(0, 0); - x74 = new $Uint64(0, 0); - _tuple$32 = bits.Mul64(x1, arg2[3]); - x74 = _tuple$32[0]; - x73 = _tuple$32[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$33 = bits.Mul64(x1, arg2[2]); - x76 = _tuple$33[0]; - x75 = _tuple$33[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$34 = bits.Mul64(x1, arg2[1]); - x78 = _tuple$34[0]; - x77 = _tuple$34[1]; - x79 = new $Uint64(0, 0); - x80 = new $Uint64(0, 0); - _tuple$35 = bits.Mul64(x1, arg2[0]); - x80 = _tuple$35[0]; - x79 = _tuple$35[1]; - x81 = new $Uint64(0, 0); - x82 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x80, x77, new $Uint64(0, 0)); - x81 = _tuple$36[0]; - x82 = _tuple$36[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x78, x75, ((x$18 = (new p384Uint1(x82.$high, x82.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x83 = _tuple$37[0]; - x84 = _tuple$37[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x76, x73, ((x$19 = (new p384Uint1(x84.$high, x84.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x85 = _tuple$38[0]; - x86 = _tuple$38[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x74, x71, ((x$20 = (new p384Uint1(x86.$high, x86.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x87 = _tuple$39[0]; - x88 = _tuple$39[1]; - x89 = new $Uint64(0, 0); - x90 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x72, x69, ((x$21 = (new p384Uint1(x88.$high, x88.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x89 = _tuple$40[0]; - x90 = _tuple$40[1]; - x91 = (x$22 = ((x$23 = (new p384Uint1(x90.$high, x90.$low)), new $Uint64(x$23.$high, x$23.$low))), new $Uint64(x$22.$high + x70.$high, x$22.$low + x70.$low)); - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$41 = bits.Add64(x57, x79, new $Uint64(0, 0)); - x92 = _tuple$41[0]; - x93 = _tuple$41[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$42 = bits.Add64(x59, x81, ((x$24 = (new p384Uint1(x93.$high, x93.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x94 = _tuple$42[0]; - x95 = _tuple$42[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x61, x83, ((x$25 = (new p384Uint1(x95.$high, x95.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x96 = _tuple$43[0]; - x97 = _tuple$43[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$44 = bits.Add64(x63, x85, ((x$26 = (new p384Uint1(x97.$high, x97.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x98 = _tuple$44[0]; - x99 = _tuple$44[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x65, x87, ((x$27 = (new p384Uint1(x99.$high, x99.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x100 = _tuple$45[0]; - x101 = _tuple$45[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x67, x89, ((x$28 = (new p384Uint1(x101.$high, x101.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x102 = _tuple$46[0]; - x103 = _tuple$46[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(((x$29 = (new p384Uint1(x68.$high, x68.$low)), new $Uint64(x$29.$high, x$29.$low))), x91, ((x$30 = (new p384Uint1(x103.$high, x103.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x104 = _tuple$47[0]; - x105 = _tuple$47[1]; - x106 = new $Uint64(0, 0); - _tuple$48 = bits.Mul64(x92, new $Uint64(1, 1)); - x106 = _tuple$48[1]; - x108 = new $Uint64(0, 0); - x109 = new $Uint64(0, 0); - _tuple$49 = bits.Mul64(x106, new $Uint64(4294967295, 4294967295)); - x109 = _tuple$49[0]; - x108 = _tuple$49[1]; - x110 = new $Uint64(0, 0); - x111 = new $Uint64(0, 0); - _tuple$50 = bits.Mul64(x106, new $Uint64(4294967295, 4294967295)); - x111 = _tuple$50[0]; - x110 = _tuple$50[1]; - x112 = new $Uint64(0, 0); - x113 = new $Uint64(0, 0); - _tuple$51 = bits.Mul64(x106, new $Uint64(4294967295, 4294967295)); - x113 = _tuple$51[0]; - x112 = _tuple$51[1]; - x114 = new $Uint64(0, 0); - x115 = new $Uint64(0, 0); - _tuple$52 = bits.Mul64(x106, new $Uint64(4294967295, 4294967294)); - x115 = _tuple$52[0]; - x114 = _tuple$52[1]; - x116 = new $Uint64(0, 0); - x117 = new $Uint64(0, 0); - _tuple$53 = bits.Mul64(x106, new $Uint64(4294967295, 0)); - x117 = _tuple$53[0]; - x116 = _tuple$53[1]; - x118 = new $Uint64(0, 0); - x119 = new $Uint64(0, 0); - _tuple$54 = bits.Mul64(x106, new $Uint64(0, 4294967295)); - x119 = _tuple$54[0]; - x118 = _tuple$54[1]; - x120 = new $Uint64(0, 0); - x121 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x119, x116, new $Uint64(0, 0)); - x120 = _tuple$55[0]; - x121 = _tuple$55[1]; - x122 = new $Uint64(0, 0); - x123 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x117, x114, ((x$31 = (new p384Uint1(x121.$high, x121.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x122 = _tuple$56[0]; - x123 = _tuple$56[1]; - x124 = new $Uint64(0, 0); - x125 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x115, x112, ((x$32 = (new p384Uint1(x123.$high, x123.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x124 = _tuple$57[0]; - x125 = _tuple$57[1]; - x126 = new $Uint64(0, 0); - x127 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x113, x110, ((x$33 = (new p384Uint1(x125.$high, x125.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x126 = _tuple$58[0]; - x127 = _tuple$58[1]; - x128 = new $Uint64(0, 0); - x129 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x111, x108, ((x$34 = (new p384Uint1(x127.$high, x127.$low)), new $Uint64(x$34.$high, x$34.$low)))); - x128 = _tuple$59[0]; - x129 = _tuple$59[1]; - x130 = (x$35 = ((x$36 = (new p384Uint1(x129.$high, x129.$low)), new $Uint64(x$36.$high, x$36.$low))), new $Uint64(x$35.$high + x109.$high, x$35.$low + x109.$low)); - x132 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x92, x118, new $Uint64(0, 0)); - x132 = _tuple$60[1]; - x133 = new $Uint64(0, 0); - x134 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x94, x120, ((x$37 = (new p384Uint1(x132.$high, x132.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x133 = _tuple$61[0]; - x134 = _tuple$61[1]; - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x96, x122, ((x$38 = (new p384Uint1(x134.$high, x134.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x135 = _tuple$62[0]; - x136 = _tuple$62[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x98, x124, ((x$39 = (new p384Uint1(x136.$high, x136.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x137 = _tuple$63[0]; - x138 = _tuple$63[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x100, x126, ((x$40 = (new p384Uint1(x138.$high, x138.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x139 = _tuple$64[0]; - x140 = _tuple$64[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x102, x128, ((x$41 = (new p384Uint1(x140.$high, x140.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x141 = _tuple$65[0]; - x142 = _tuple$65[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x104, x130, ((x$42 = (new p384Uint1(x142.$high, x142.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x143 = _tuple$66[0]; - x144 = _tuple$66[1]; - x145 = (x$43 = ((x$44 = (new p384Uint1(x144.$high, x144.$low)), new $Uint64(x$44.$high, x$44.$low))), x$45 = ((x$46 = (new p384Uint1(x105.$high, x105.$low)), new $Uint64(x$46.$high, x$46.$low))), new $Uint64(x$43.$high + x$45.$high, x$43.$low + x$45.$low)); - x146 = new $Uint64(0, 0); - x147 = new $Uint64(0, 0); - _tuple$67 = bits.Mul64(x2, arg2[5]); - x147 = _tuple$67[0]; - x146 = _tuple$67[1]; - x148 = new $Uint64(0, 0); - x149 = new $Uint64(0, 0); - _tuple$68 = bits.Mul64(x2, arg2[4]); - x149 = _tuple$68[0]; - x148 = _tuple$68[1]; - x150 = new $Uint64(0, 0); - x151 = new $Uint64(0, 0); - _tuple$69 = bits.Mul64(x2, arg2[3]); - x151 = _tuple$69[0]; - x150 = _tuple$69[1]; - x152 = new $Uint64(0, 0); - x153 = new $Uint64(0, 0); - _tuple$70 = bits.Mul64(x2, arg2[2]); - x153 = _tuple$70[0]; - x152 = _tuple$70[1]; - x154 = new $Uint64(0, 0); - x155 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x2, arg2[1]); - x155 = _tuple$71[0]; - x154 = _tuple$71[1]; - x156 = new $Uint64(0, 0); - x157 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x2, arg2[0]); - x157 = _tuple$72[0]; - x156 = _tuple$72[1]; - x158 = new $Uint64(0, 0); - x159 = new $Uint64(0, 0); - _tuple$73 = bits.Add64(x157, x154, new $Uint64(0, 0)); - x158 = _tuple$73[0]; - x159 = _tuple$73[1]; - x160 = new $Uint64(0, 0); - x161 = new $Uint64(0, 0); - _tuple$74 = bits.Add64(x155, x152, ((x$47 = (new p384Uint1(x159.$high, x159.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x160 = _tuple$74[0]; - x161 = _tuple$74[1]; - x162 = new $Uint64(0, 0); - x163 = new $Uint64(0, 0); - _tuple$75 = bits.Add64(x153, x150, ((x$48 = (new p384Uint1(x161.$high, x161.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x162 = _tuple$75[0]; - x163 = _tuple$75[1]; - x164 = new $Uint64(0, 0); - x165 = new $Uint64(0, 0); - _tuple$76 = bits.Add64(x151, x148, ((x$49 = (new p384Uint1(x163.$high, x163.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x164 = _tuple$76[0]; - x165 = _tuple$76[1]; - x166 = new $Uint64(0, 0); - x167 = new $Uint64(0, 0); - _tuple$77 = bits.Add64(x149, x146, ((x$50 = (new p384Uint1(x165.$high, x165.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x166 = _tuple$77[0]; - x167 = _tuple$77[1]; - x168 = (x$51 = ((x$52 = (new p384Uint1(x167.$high, x167.$low)), new $Uint64(x$52.$high, x$52.$low))), new $Uint64(x$51.$high + x147.$high, x$51.$low + x147.$low)); - x169 = new $Uint64(0, 0); - x170 = new $Uint64(0, 0); - _tuple$78 = bits.Add64(x133, x156, new $Uint64(0, 0)); - x169 = _tuple$78[0]; - x170 = _tuple$78[1]; - x171 = new $Uint64(0, 0); - x172 = new $Uint64(0, 0); - _tuple$79 = bits.Add64(x135, x158, ((x$53 = (new p384Uint1(x170.$high, x170.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x171 = _tuple$79[0]; - x172 = _tuple$79[1]; - x173 = new $Uint64(0, 0); - x174 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x137, x160, ((x$54 = (new p384Uint1(x172.$high, x172.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x173 = _tuple$80[0]; - x174 = _tuple$80[1]; - x175 = new $Uint64(0, 0); - x176 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x139, x162, ((x$55 = (new p384Uint1(x174.$high, x174.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x175 = _tuple$81[0]; - x176 = _tuple$81[1]; - x177 = new $Uint64(0, 0); - x178 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x141, x164, ((x$56 = (new p384Uint1(x176.$high, x176.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x177 = _tuple$82[0]; - x178 = _tuple$82[1]; - x179 = new $Uint64(0, 0); - x180 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x143, x166, ((x$57 = (new p384Uint1(x178.$high, x178.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x179 = _tuple$83[0]; - x180 = _tuple$83[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x145, x168, ((x$58 = (new p384Uint1(x180.$high, x180.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x181 = _tuple$84[0]; - x182 = _tuple$84[1]; - x183 = new $Uint64(0, 0); - _tuple$85 = bits.Mul64(x169, new $Uint64(1, 1)); - x183 = _tuple$85[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$86 = bits.Mul64(x183, new $Uint64(4294967295, 4294967295)); - x186 = _tuple$86[0]; - x185 = _tuple$86[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$87 = bits.Mul64(x183, new $Uint64(4294967295, 4294967295)); - x188 = _tuple$87[0]; - x187 = _tuple$87[1]; - x189 = new $Uint64(0, 0); - x190 = new $Uint64(0, 0); - _tuple$88 = bits.Mul64(x183, new $Uint64(4294967295, 4294967295)); - x190 = _tuple$88[0]; - x189 = _tuple$88[1]; - x191 = new $Uint64(0, 0); - x192 = new $Uint64(0, 0); - _tuple$89 = bits.Mul64(x183, new $Uint64(4294967295, 4294967294)); - x192 = _tuple$89[0]; - x191 = _tuple$89[1]; - x193 = new $Uint64(0, 0); - x194 = new $Uint64(0, 0); - _tuple$90 = bits.Mul64(x183, new $Uint64(4294967295, 0)); - x194 = _tuple$90[0]; - x193 = _tuple$90[1]; - x195 = new $Uint64(0, 0); - x196 = new $Uint64(0, 0); - _tuple$91 = bits.Mul64(x183, new $Uint64(0, 4294967295)); - x196 = _tuple$91[0]; - x195 = _tuple$91[1]; - x197 = new $Uint64(0, 0); - x198 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x196, x193, new $Uint64(0, 0)); - x197 = _tuple$92[0]; - x198 = _tuple$92[1]; - x199 = new $Uint64(0, 0); - x200 = new $Uint64(0, 0); - _tuple$93 = bits.Add64(x194, x191, ((x$59 = (new p384Uint1(x198.$high, x198.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x199 = _tuple$93[0]; - x200 = _tuple$93[1]; - x201 = new $Uint64(0, 0); - x202 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x192, x189, ((x$60 = (new p384Uint1(x200.$high, x200.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x201 = _tuple$94[0]; - x202 = _tuple$94[1]; - x203 = new $Uint64(0, 0); - x204 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x190, x187, ((x$61 = (new p384Uint1(x202.$high, x202.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x203 = _tuple$95[0]; - x204 = _tuple$95[1]; - x205 = new $Uint64(0, 0); - x206 = new $Uint64(0, 0); - _tuple$96 = bits.Add64(x188, x185, ((x$62 = (new p384Uint1(x204.$high, x204.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x205 = _tuple$96[0]; - x206 = _tuple$96[1]; - x207 = (x$63 = ((x$64 = (new p384Uint1(x206.$high, x206.$low)), new $Uint64(x$64.$high, x$64.$low))), new $Uint64(x$63.$high + x186.$high, x$63.$low + x186.$low)); - x209 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x169, x195, new $Uint64(0, 0)); - x209 = _tuple$97[1]; - x210 = new $Uint64(0, 0); - x211 = new $Uint64(0, 0); - _tuple$98 = bits.Add64(x171, x197, ((x$65 = (new p384Uint1(x209.$high, x209.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x210 = _tuple$98[0]; - x211 = _tuple$98[1]; - x212 = new $Uint64(0, 0); - x213 = new $Uint64(0, 0); - _tuple$99 = bits.Add64(x173, x199, ((x$66 = (new p384Uint1(x211.$high, x211.$low)), new $Uint64(x$66.$high, x$66.$low)))); - x212 = _tuple$99[0]; - x213 = _tuple$99[1]; - x214 = new $Uint64(0, 0); - x215 = new $Uint64(0, 0); - _tuple$100 = bits.Add64(x175, x201, ((x$67 = (new p384Uint1(x213.$high, x213.$low)), new $Uint64(x$67.$high, x$67.$low)))); - x214 = _tuple$100[0]; - x215 = _tuple$100[1]; - x216 = new $Uint64(0, 0); - x217 = new $Uint64(0, 0); - _tuple$101 = bits.Add64(x177, x203, ((x$68 = (new p384Uint1(x215.$high, x215.$low)), new $Uint64(x$68.$high, x$68.$low)))); - x216 = _tuple$101[0]; - x217 = _tuple$101[1]; - x218 = new $Uint64(0, 0); - x219 = new $Uint64(0, 0); - _tuple$102 = bits.Add64(x179, x205, ((x$69 = (new p384Uint1(x217.$high, x217.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x218 = _tuple$102[0]; - x219 = _tuple$102[1]; - x220 = new $Uint64(0, 0); - x221 = new $Uint64(0, 0); - _tuple$103 = bits.Add64(x181, x207, ((x$70 = (new p384Uint1(x219.$high, x219.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x220 = _tuple$103[0]; - x221 = _tuple$103[1]; - x222 = (x$71 = ((x$72 = (new p384Uint1(x221.$high, x221.$low)), new $Uint64(x$72.$high, x$72.$low))), x$73 = ((x$74 = (new p384Uint1(x182.$high, x182.$low)), new $Uint64(x$74.$high, x$74.$low))), new $Uint64(x$71.$high + x$73.$high, x$71.$low + x$73.$low)); - x223 = new $Uint64(0, 0); - x224 = new $Uint64(0, 0); - _tuple$104 = bits.Mul64(x3, arg2[5]); - x224 = _tuple$104[0]; - x223 = _tuple$104[1]; - x225 = new $Uint64(0, 0); - x226 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x3, arg2[4]); - x226 = _tuple$105[0]; - x225 = _tuple$105[1]; - x227 = new $Uint64(0, 0); - x228 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x3, arg2[3]); - x228 = _tuple$106[0]; - x227 = _tuple$106[1]; - x229 = new $Uint64(0, 0); - x230 = new $Uint64(0, 0); - _tuple$107 = bits.Mul64(x3, arg2[2]); - x230 = _tuple$107[0]; - x229 = _tuple$107[1]; - x231 = new $Uint64(0, 0); - x232 = new $Uint64(0, 0); - _tuple$108 = bits.Mul64(x3, arg2[1]); - x232 = _tuple$108[0]; - x231 = _tuple$108[1]; - x233 = new $Uint64(0, 0); - x234 = new $Uint64(0, 0); - _tuple$109 = bits.Mul64(x3, arg2[0]); - x234 = _tuple$109[0]; - x233 = _tuple$109[1]; - x235 = new $Uint64(0, 0); - x236 = new $Uint64(0, 0); - _tuple$110 = bits.Add64(x234, x231, new $Uint64(0, 0)); - x235 = _tuple$110[0]; - x236 = _tuple$110[1]; - x237 = new $Uint64(0, 0); - x238 = new $Uint64(0, 0); - _tuple$111 = bits.Add64(x232, x229, ((x$75 = (new p384Uint1(x236.$high, x236.$low)), new $Uint64(x$75.$high, x$75.$low)))); - x237 = _tuple$111[0]; - x238 = _tuple$111[1]; - x239 = new $Uint64(0, 0); - x240 = new $Uint64(0, 0); - _tuple$112 = bits.Add64(x230, x227, ((x$76 = (new p384Uint1(x238.$high, x238.$low)), new $Uint64(x$76.$high, x$76.$low)))); - x239 = _tuple$112[0]; - x240 = _tuple$112[1]; - x241 = new $Uint64(0, 0); - x242 = new $Uint64(0, 0); - _tuple$113 = bits.Add64(x228, x225, ((x$77 = (new p384Uint1(x240.$high, x240.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x241 = _tuple$113[0]; - x242 = _tuple$113[1]; - x243 = new $Uint64(0, 0); - x244 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x226, x223, ((x$78 = (new p384Uint1(x242.$high, x242.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x243 = _tuple$114[0]; - x244 = _tuple$114[1]; - x245 = (x$79 = ((x$80 = (new p384Uint1(x244.$high, x244.$low)), new $Uint64(x$80.$high, x$80.$low))), new $Uint64(x$79.$high + x224.$high, x$79.$low + x224.$low)); - x246 = new $Uint64(0, 0); - x247 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x210, x233, new $Uint64(0, 0)); - x246 = _tuple$115[0]; - x247 = _tuple$115[1]; - x248 = new $Uint64(0, 0); - x249 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x212, x235, ((x$81 = (new p384Uint1(x247.$high, x247.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x248 = _tuple$116[0]; - x249 = _tuple$116[1]; - x250 = new $Uint64(0, 0); - x251 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x214, x237, ((x$82 = (new p384Uint1(x249.$high, x249.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x250 = _tuple$117[0]; - x251 = _tuple$117[1]; - x252 = new $Uint64(0, 0); - x253 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x216, x239, ((x$83 = (new p384Uint1(x251.$high, x251.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x252 = _tuple$118[0]; - x253 = _tuple$118[1]; - x254 = new $Uint64(0, 0); - x255 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x218, x241, ((x$84 = (new p384Uint1(x253.$high, x253.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x254 = _tuple$119[0]; - x255 = _tuple$119[1]; - x256 = new $Uint64(0, 0); - x257 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x220, x243, ((x$85 = (new p384Uint1(x255.$high, x255.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x256 = _tuple$120[0]; - x257 = _tuple$120[1]; - x258 = new $Uint64(0, 0); - x259 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x222, x245, ((x$86 = (new p384Uint1(x257.$high, x257.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x258 = _tuple$121[0]; - x259 = _tuple$121[1]; - x260 = new $Uint64(0, 0); - _tuple$122 = bits.Mul64(x246, new $Uint64(1, 1)); - x260 = _tuple$122[1]; - x262 = new $Uint64(0, 0); - x263 = new $Uint64(0, 0); - _tuple$123 = bits.Mul64(x260, new $Uint64(4294967295, 4294967295)); - x263 = _tuple$123[0]; - x262 = _tuple$123[1]; - x264 = new $Uint64(0, 0); - x265 = new $Uint64(0, 0); - _tuple$124 = bits.Mul64(x260, new $Uint64(4294967295, 4294967295)); - x265 = _tuple$124[0]; - x264 = _tuple$124[1]; - x266 = new $Uint64(0, 0); - x267 = new $Uint64(0, 0); - _tuple$125 = bits.Mul64(x260, new $Uint64(4294967295, 4294967295)); - x267 = _tuple$125[0]; - x266 = _tuple$125[1]; - x268 = new $Uint64(0, 0); - x269 = new $Uint64(0, 0); - _tuple$126 = bits.Mul64(x260, new $Uint64(4294967295, 4294967294)); - x269 = _tuple$126[0]; - x268 = _tuple$126[1]; - x270 = new $Uint64(0, 0); - x271 = new $Uint64(0, 0); - _tuple$127 = bits.Mul64(x260, new $Uint64(4294967295, 0)); - x271 = _tuple$127[0]; - x270 = _tuple$127[1]; - x272 = new $Uint64(0, 0); - x273 = new $Uint64(0, 0); - _tuple$128 = bits.Mul64(x260, new $Uint64(0, 4294967295)); - x273 = _tuple$128[0]; - x272 = _tuple$128[1]; - x274 = new $Uint64(0, 0); - x275 = new $Uint64(0, 0); - _tuple$129 = bits.Add64(x273, x270, new $Uint64(0, 0)); - x274 = _tuple$129[0]; - x275 = _tuple$129[1]; - x276 = new $Uint64(0, 0); - x277 = new $Uint64(0, 0); - _tuple$130 = bits.Add64(x271, x268, ((x$87 = (new p384Uint1(x275.$high, x275.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x276 = _tuple$130[0]; - x277 = _tuple$130[1]; - x278 = new $Uint64(0, 0); - x279 = new $Uint64(0, 0); - _tuple$131 = bits.Add64(x269, x266, ((x$88 = (new p384Uint1(x277.$high, x277.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x278 = _tuple$131[0]; - x279 = _tuple$131[1]; - x280 = new $Uint64(0, 0); - x281 = new $Uint64(0, 0); - _tuple$132 = bits.Add64(x267, x264, ((x$89 = (new p384Uint1(x279.$high, x279.$low)), new $Uint64(x$89.$high, x$89.$low)))); - x280 = _tuple$132[0]; - x281 = _tuple$132[1]; - x282 = new $Uint64(0, 0); - x283 = new $Uint64(0, 0); - _tuple$133 = bits.Add64(x265, x262, ((x$90 = (new p384Uint1(x281.$high, x281.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x282 = _tuple$133[0]; - x283 = _tuple$133[1]; - x284 = (x$91 = ((x$92 = (new p384Uint1(x283.$high, x283.$low)), new $Uint64(x$92.$high, x$92.$low))), new $Uint64(x$91.$high + x263.$high, x$91.$low + x263.$low)); - x286 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x246, x272, new $Uint64(0, 0)); - x286 = _tuple$134[1]; - x287 = new $Uint64(0, 0); - x288 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x248, x274, ((x$93 = (new p384Uint1(x286.$high, x286.$low)), new $Uint64(x$93.$high, x$93.$low)))); - x287 = _tuple$135[0]; - x288 = _tuple$135[1]; - x289 = new $Uint64(0, 0); - x290 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x250, x276, ((x$94 = (new p384Uint1(x288.$high, x288.$low)), new $Uint64(x$94.$high, x$94.$low)))); - x289 = _tuple$136[0]; - x290 = _tuple$136[1]; - x291 = new $Uint64(0, 0); - x292 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x252, x278, ((x$95 = (new p384Uint1(x290.$high, x290.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x291 = _tuple$137[0]; - x292 = _tuple$137[1]; - x293 = new $Uint64(0, 0); - x294 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x254, x280, ((x$96 = (new p384Uint1(x292.$high, x292.$low)), new $Uint64(x$96.$high, x$96.$low)))); - x293 = _tuple$138[0]; - x294 = _tuple$138[1]; - x295 = new $Uint64(0, 0); - x296 = new $Uint64(0, 0); - _tuple$139 = bits.Add64(x256, x282, ((x$97 = (new p384Uint1(x294.$high, x294.$low)), new $Uint64(x$97.$high, x$97.$low)))); - x295 = _tuple$139[0]; - x296 = _tuple$139[1]; - x297 = new $Uint64(0, 0); - x298 = new $Uint64(0, 0); - _tuple$140 = bits.Add64(x258, x284, ((x$98 = (new p384Uint1(x296.$high, x296.$low)), new $Uint64(x$98.$high, x$98.$low)))); - x297 = _tuple$140[0]; - x298 = _tuple$140[1]; - x299 = (x$99 = ((x$100 = (new p384Uint1(x298.$high, x298.$low)), new $Uint64(x$100.$high, x$100.$low))), x$101 = ((x$102 = (new p384Uint1(x259.$high, x259.$low)), new $Uint64(x$102.$high, x$102.$low))), new $Uint64(x$99.$high + x$101.$high, x$99.$low + x$101.$low)); - x300 = new $Uint64(0, 0); - x301 = new $Uint64(0, 0); - _tuple$141 = bits.Mul64(x4, arg2[5]); - x301 = _tuple$141[0]; - x300 = _tuple$141[1]; - x302 = new $Uint64(0, 0); - x303 = new $Uint64(0, 0); - _tuple$142 = bits.Mul64(x4, arg2[4]); - x303 = _tuple$142[0]; - x302 = _tuple$142[1]; - x304 = new $Uint64(0, 0); - x305 = new $Uint64(0, 0); - _tuple$143 = bits.Mul64(x4, arg2[3]); - x305 = _tuple$143[0]; - x304 = _tuple$143[1]; - x306 = new $Uint64(0, 0); - x307 = new $Uint64(0, 0); - _tuple$144 = bits.Mul64(x4, arg2[2]); - x307 = _tuple$144[0]; - x306 = _tuple$144[1]; - x308 = new $Uint64(0, 0); - x309 = new $Uint64(0, 0); - _tuple$145 = bits.Mul64(x4, arg2[1]); - x309 = _tuple$145[0]; - x308 = _tuple$145[1]; - x310 = new $Uint64(0, 0); - x311 = new $Uint64(0, 0); - _tuple$146 = bits.Mul64(x4, arg2[0]); - x311 = _tuple$146[0]; - x310 = _tuple$146[1]; - x312 = new $Uint64(0, 0); - x313 = new $Uint64(0, 0); - _tuple$147 = bits.Add64(x311, x308, new $Uint64(0, 0)); - x312 = _tuple$147[0]; - x313 = _tuple$147[1]; - x314 = new $Uint64(0, 0); - x315 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x309, x306, ((x$103 = (new p384Uint1(x313.$high, x313.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x314 = _tuple$148[0]; - x315 = _tuple$148[1]; - x316 = new $Uint64(0, 0); - x317 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x307, x304, ((x$104 = (new p384Uint1(x315.$high, x315.$low)), new $Uint64(x$104.$high, x$104.$low)))); - x316 = _tuple$149[0]; - x317 = _tuple$149[1]; - x318 = new $Uint64(0, 0); - x319 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x305, x302, ((x$105 = (new p384Uint1(x317.$high, x317.$low)), new $Uint64(x$105.$high, x$105.$low)))); - x318 = _tuple$150[0]; - x319 = _tuple$150[1]; - x320 = new $Uint64(0, 0); - x321 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x303, x300, ((x$106 = (new p384Uint1(x319.$high, x319.$low)), new $Uint64(x$106.$high, x$106.$low)))); - x320 = _tuple$151[0]; - x321 = _tuple$151[1]; - x322 = (x$107 = ((x$108 = (new p384Uint1(x321.$high, x321.$low)), new $Uint64(x$108.$high, x$108.$low))), new $Uint64(x$107.$high + x301.$high, x$107.$low + x301.$low)); - x323 = new $Uint64(0, 0); - x324 = new $Uint64(0, 0); - _tuple$152 = bits.Add64(x287, x310, new $Uint64(0, 0)); - x323 = _tuple$152[0]; - x324 = _tuple$152[1]; - x325 = new $Uint64(0, 0); - x326 = new $Uint64(0, 0); - _tuple$153 = bits.Add64(x289, x312, ((x$109 = (new p384Uint1(x324.$high, x324.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x325 = _tuple$153[0]; - x326 = _tuple$153[1]; - x327 = new $Uint64(0, 0); - x328 = new $Uint64(0, 0); - _tuple$154 = bits.Add64(x291, x314, ((x$110 = (new p384Uint1(x326.$high, x326.$low)), new $Uint64(x$110.$high, x$110.$low)))); - x327 = _tuple$154[0]; - x328 = _tuple$154[1]; - x329 = new $Uint64(0, 0); - x330 = new $Uint64(0, 0); - _tuple$155 = bits.Add64(x293, x316, ((x$111 = (new p384Uint1(x328.$high, x328.$low)), new $Uint64(x$111.$high, x$111.$low)))); - x329 = _tuple$155[0]; - x330 = _tuple$155[1]; - x331 = new $Uint64(0, 0); - x332 = new $Uint64(0, 0); - _tuple$156 = bits.Add64(x295, x318, ((x$112 = (new p384Uint1(x330.$high, x330.$low)), new $Uint64(x$112.$high, x$112.$low)))); - x331 = _tuple$156[0]; - x332 = _tuple$156[1]; - x333 = new $Uint64(0, 0); - x334 = new $Uint64(0, 0); - _tuple$157 = bits.Add64(x297, x320, ((x$113 = (new p384Uint1(x332.$high, x332.$low)), new $Uint64(x$113.$high, x$113.$low)))); - x333 = _tuple$157[0]; - x334 = _tuple$157[1]; - x335 = new $Uint64(0, 0); - x336 = new $Uint64(0, 0); - _tuple$158 = bits.Add64(x299, x322, ((x$114 = (new p384Uint1(x334.$high, x334.$low)), new $Uint64(x$114.$high, x$114.$low)))); - x335 = _tuple$158[0]; - x336 = _tuple$158[1]; - x337 = new $Uint64(0, 0); - _tuple$159 = bits.Mul64(x323, new $Uint64(1, 1)); - x337 = _tuple$159[1]; - x339 = new $Uint64(0, 0); - x340 = new $Uint64(0, 0); - _tuple$160 = bits.Mul64(x337, new $Uint64(4294967295, 4294967295)); - x340 = _tuple$160[0]; - x339 = _tuple$160[1]; - x341 = new $Uint64(0, 0); - x342 = new $Uint64(0, 0); - _tuple$161 = bits.Mul64(x337, new $Uint64(4294967295, 4294967295)); - x342 = _tuple$161[0]; - x341 = _tuple$161[1]; - x343 = new $Uint64(0, 0); - x344 = new $Uint64(0, 0); - _tuple$162 = bits.Mul64(x337, new $Uint64(4294967295, 4294967295)); - x344 = _tuple$162[0]; - x343 = _tuple$162[1]; - x345 = new $Uint64(0, 0); - x346 = new $Uint64(0, 0); - _tuple$163 = bits.Mul64(x337, new $Uint64(4294967295, 4294967294)); - x346 = _tuple$163[0]; - x345 = _tuple$163[1]; - x347 = new $Uint64(0, 0); - x348 = new $Uint64(0, 0); - _tuple$164 = bits.Mul64(x337, new $Uint64(4294967295, 0)); - x348 = _tuple$164[0]; - x347 = _tuple$164[1]; - x349 = new $Uint64(0, 0); - x350 = new $Uint64(0, 0); - _tuple$165 = bits.Mul64(x337, new $Uint64(0, 4294967295)); - x350 = _tuple$165[0]; - x349 = _tuple$165[1]; - x351 = new $Uint64(0, 0); - x352 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x350, x347, new $Uint64(0, 0)); - x351 = _tuple$166[0]; - x352 = _tuple$166[1]; - x353 = new $Uint64(0, 0); - x354 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x348, x345, ((x$115 = (new p384Uint1(x352.$high, x352.$low)), new $Uint64(x$115.$high, x$115.$low)))); - x353 = _tuple$167[0]; - x354 = _tuple$167[1]; - x355 = new $Uint64(0, 0); - x356 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x346, x343, ((x$116 = (new p384Uint1(x354.$high, x354.$low)), new $Uint64(x$116.$high, x$116.$low)))); - x355 = _tuple$168[0]; - x356 = _tuple$168[1]; - x357 = new $Uint64(0, 0); - x358 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x344, x341, ((x$117 = (new p384Uint1(x356.$high, x356.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x357 = _tuple$169[0]; - x358 = _tuple$169[1]; - x359 = new $Uint64(0, 0); - x360 = new $Uint64(0, 0); - _tuple$170 = bits.Add64(x342, x339, ((x$118 = (new p384Uint1(x358.$high, x358.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x359 = _tuple$170[0]; - x360 = _tuple$170[1]; - x361 = (x$119 = ((x$120 = (new p384Uint1(x360.$high, x360.$low)), new $Uint64(x$120.$high, x$120.$low))), new $Uint64(x$119.$high + x340.$high, x$119.$low + x340.$low)); - x363 = new $Uint64(0, 0); - _tuple$171 = bits.Add64(x323, x349, new $Uint64(0, 0)); - x363 = _tuple$171[1]; - x364 = new $Uint64(0, 0); - x365 = new $Uint64(0, 0); - _tuple$172 = bits.Add64(x325, x351, ((x$121 = (new p384Uint1(x363.$high, x363.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x364 = _tuple$172[0]; - x365 = _tuple$172[1]; - x366 = new $Uint64(0, 0); - x367 = new $Uint64(0, 0); - _tuple$173 = bits.Add64(x327, x353, ((x$122 = (new p384Uint1(x365.$high, x365.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x366 = _tuple$173[0]; - x367 = _tuple$173[1]; - x368 = new $Uint64(0, 0); - x369 = new $Uint64(0, 0); - _tuple$174 = bits.Add64(x329, x355, ((x$123 = (new p384Uint1(x367.$high, x367.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x368 = _tuple$174[0]; - x369 = _tuple$174[1]; - x370 = new $Uint64(0, 0); - x371 = new $Uint64(0, 0); - _tuple$175 = bits.Add64(x331, x357, ((x$124 = (new p384Uint1(x369.$high, x369.$low)), new $Uint64(x$124.$high, x$124.$low)))); - x370 = _tuple$175[0]; - x371 = _tuple$175[1]; - x372 = new $Uint64(0, 0); - x373 = new $Uint64(0, 0); - _tuple$176 = bits.Add64(x333, x359, ((x$125 = (new p384Uint1(x371.$high, x371.$low)), new $Uint64(x$125.$high, x$125.$low)))); - x372 = _tuple$176[0]; - x373 = _tuple$176[1]; - x374 = new $Uint64(0, 0); - x375 = new $Uint64(0, 0); - _tuple$177 = bits.Add64(x335, x361, ((x$126 = (new p384Uint1(x373.$high, x373.$low)), new $Uint64(x$126.$high, x$126.$low)))); - x374 = _tuple$177[0]; - x375 = _tuple$177[1]; - x376 = (x$127 = ((x$128 = (new p384Uint1(x375.$high, x375.$low)), new $Uint64(x$128.$high, x$128.$low))), x$129 = ((x$130 = (new p384Uint1(x336.$high, x336.$low)), new $Uint64(x$130.$high, x$130.$low))), new $Uint64(x$127.$high + x$129.$high, x$127.$low + x$129.$low)); - x377 = new $Uint64(0, 0); - x378 = new $Uint64(0, 0); - _tuple$178 = bits.Mul64(x5, arg2[5]); - x378 = _tuple$178[0]; - x377 = _tuple$178[1]; - x379 = new $Uint64(0, 0); - x380 = new $Uint64(0, 0); - _tuple$179 = bits.Mul64(x5, arg2[4]); - x380 = _tuple$179[0]; - x379 = _tuple$179[1]; - x381 = new $Uint64(0, 0); - x382 = new $Uint64(0, 0); - _tuple$180 = bits.Mul64(x5, arg2[3]); - x382 = _tuple$180[0]; - x381 = _tuple$180[1]; - x383 = new $Uint64(0, 0); - x384 = new $Uint64(0, 0); - _tuple$181 = bits.Mul64(x5, arg2[2]); - x384 = _tuple$181[0]; - x383 = _tuple$181[1]; - x385 = new $Uint64(0, 0); - x386 = new $Uint64(0, 0); - _tuple$182 = bits.Mul64(x5, arg2[1]); - x386 = _tuple$182[0]; - x385 = _tuple$182[1]; - x387 = new $Uint64(0, 0); - x388 = new $Uint64(0, 0); - _tuple$183 = bits.Mul64(x5, arg2[0]); - x388 = _tuple$183[0]; - x387 = _tuple$183[1]; - x389 = new $Uint64(0, 0); - x390 = new $Uint64(0, 0); - _tuple$184 = bits.Add64(x388, x385, new $Uint64(0, 0)); - x389 = _tuple$184[0]; - x390 = _tuple$184[1]; - x391 = new $Uint64(0, 0); - x392 = new $Uint64(0, 0); - _tuple$185 = bits.Add64(x386, x383, ((x$131 = (new p384Uint1(x390.$high, x390.$low)), new $Uint64(x$131.$high, x$131.$low)))); - x391 = _tuple$185[0]; - x392 = _tuple$185[1]; - x393 = new $Uint64(0, 0); - x394 = new $Uint64(0, 0); - _tuple$186 = bits.Add64(x384, x381, ((x$132 = (new p384Uint1(x392.$high, x392.$low)), new $Uint64(x$132.$high, x$132.$low)))); - x393 = _tuple$186[0]; - x394 = _tuple$186[1]; - x395 = new $Uint64(0, 0); - x396 = new $Uint64(0, 0); - _tuple$187 = bits.Add64(x382, x379, ((x$133 = (new p384Uint1(x394.$high, x394.$low)), new $Uint64(x$133.$high, x$133.$low)))); - x395 = _tuple$187[0]; - x396 = _tuple$187[1]; - x397 = new $Uint64(0, 0); - x398 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x380, x377, ((x$134 = (new p384Uint1(x396.$high, x396.$low)), new $Uint64(x$134.$high, x$134.$low)))); - x397 = _tuple$188[0]; - x398 = _tuple$188[1]; - x399 = (x$135 = ((x$136 = (new p384Uint1(x398.$high, x398.$low)), new $Uint64(x$136.$high, x$136.$low))), new $Uint64(x$135.$high + x378.$high, x$135.$low + x378.$low)); - x400 = new $Uint64(0, 0); - x401 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x364, x387, new $Uint64(0, 0)); - x400 = _tuple$189[0]; - x401 = _tuple$189[1]; - x402 = new $Uint64(0, 0); - x403 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x366, x389, ((x$137 = (new p384Uint1(x401.$high, x401.$low)), new $Uint64(x$137.$high, x$137.$low)))); - x402 = _tuple$190[0]; - x403 = _tuple$190[1]; - x404 = new $Uint64(0, 0); - x405 = new $Uint64(0, 0); - _tuple$191 = bits.Add64(x368, x391, ((x$138 = (new p384Uint1(x403.$high, x403.$low)), new $Uint64(x$138.$high, x$138.$low)))); - x404 = _tuple$191[0]; - x405 = _tuple$191[1]; - x406 = new $Uint64(0, 0); - x407 = new $Uint64(0, 0); - _tuple$192 = bits.Add64(x370, x393, ((x$139 = (new p384Uint1(x405.$high, x405.$low)), new $Uint64(x$139.$high, x$139.$low)))); - x406 = _tuple$192[0]; - x407 = _tuple$192[1]; - x408 = new $Uint64(0, 0); - x409 = new $Uint64(0, 0); - _tuple$193 = bits.Add64(x372, x395, ((x$140 = (new p384Uint1(x407.$high, x407.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x408 = _tuple$193[0]; - x409 = _tuple$193[1]; - x410 = new $Uint64(0, 0); - x411 = new $Uint64(0, 0); - _tuple$194 = bits.Add64(x374, x397, ((x$141 = (new p384Uint1(x409.$high, x409.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x410 = _tuple$194[0]; - x411 = _tuple$194[1]; - x412 = new $Uint64(0, 0); - x413 = new $Uint64(0, 0); - _tuple$195 = bits.Add64(x376, x399, ((x$142 = (new p384Uint1(x411.$high, x411.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x412 = _tuple$195[0]; - x413 = _tuple$195[1]; - x414 = new $Uint64(0, 0); - _tuple$196 = bits.Mul64(x400, new $Uint64(1, 1)); - x414 = _tuple$196[1]; - x416 = new $Uint64(0, 0); - x417 = new $Uint64(0, 0); - _tuple$197 = bits.Mul64(x414, new $Uint64(4294967295, 4294967295)); - x417 = _tuple$197[0]; - x416 = _tuple$197[1]; - x418 = new $Uint64(0, 0); - x419 = new $Uint64(0, 0); - _tuple$198 = bits.Mul64(x414, new $Uint64(4294967295, 4294967295)); - x419 = _tuple$198[0]; - x418 = _tuple$198[1]; - x420 = new $Uint64(0, 0); - x421 = new $Uint64(0, 0); - _tuple$199 = bits.Mul64(x414, new $Uint64(4294967295, 4294967295)); - x421 = _tuple$199[0]; - x420 = _tuple$199[1]; - x422 = new $Uint64(0, 0); - x423 = new $Uint64(0, 0); - _tuple$200 = bits.Mul64(x414, new $Uint64(4294967295, 4294967294)); - x423 = _tuple$200[0]; - x422 = _tuple$200[1]; - x424 = new $Uint64(0, 0); - x425 = new $Uint64(0, 0); - _tuple$201 = bits.Mul64(x414, new $Uint64(4294967295, 0)); - x425 = _tuple$201[0]; - x424 = _tuple$201[1]; - x426 = new $Uint64(0, 0); - x427 = new $Uint64(0, 0); - _tuple$202 = bits.Mul64(x414, new $Uint64(0, 4294967295)); - x427 = _tuple$202[0]; - x426 = _tuple$202[1]; - x428 = new $Uint64(0, 0); - x429 = new $Uint64(0, 0); - _tuple$203 = bits.Add64(x427, x424, new $Uint64(0, 0)); - x428 = _tuple$203[0]; - x429 = _tuple$203[1]; - x430 = new $Uint64(0, 0); - x431 = new $Uint64(0, 0); - _tuple$204 = bits.Add64(x425, x422, ((x$143 = (new p384Uint1(x429.$high, x429.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x430 = _tuple$204[0]; - x431 = _tuple$204[1]; - x432 = new $Uint64(0, 0); - x433 = new $Uint64(0, 0); - _tuple$205 = bits.Add64(x423, x420, ((x$144 = (new p384Uint1(x431.$high, x431.$low)), new $Uint64(x$144.$high, x$144.$low)))); - x432 = _tuple$205[0]; - x433 = _tuple$205[1]; - x434 = new $Uint64(0, 0); - x435 = new $Uint64(0, 0); - _tuple$206 = bits.Add64(x421, x418, ((x$145 = (new p384Uint1(x433.$high, x433.$low)), new $Uint64(x$145.$high, x$145.$low)))); - x434 = _tuple$206[0]; - x435 = _tuple$206[1]; - x436 = new $Uint64(0, 0); - x437 = new $Uint64(0, 0); - _tuple$207 = bits.Add64(x419, x416, ((x$146 = (new p384Uint1(x435.$high, x435.$low)), new $Uint64(x$146.$high, x$146.$low)))); - x436 = _tuple$207[0]; - x437 = _tuple$207[1]; - x438 = (x$147 = ((x$148 = (new p384Uint1(x437.$high, x437.$low)), new $Uint64(x$148.$high, x$148.$low))), new $Uint64(x$147.$high + x417.$high, x$147.$low + x417.$low)); - x440 = new $Uint64(0, 0); - _tuple$208 = bits.Add64(x400, x426, new $Uint64(0, 0)); - x440 = _tuple$208[1]; - x441 = new $Uint64(0, 0); - x442 = new $Uint64(0, 0); - _tuple$209 = bits.Add64(x402, x428, ((x$149 = (new p384Uint1(x440.$high, x440.$low)), new $Uint64(x$149.$high, x$149.$low)))); - x441 = _tuple$209[0]; - x442 = _tuple$209[1]; - x443 = new $Uint64(0, 0); - x444 = new $Uint64(0, 0); - _tuple$210 = bits.Add64(x404, x430, ((x$150 = (new p384Uint1(x442.$high, x442.$low)), new $Uint64(x$150.$high, x$150.$low)))); - x443 = _tuple$210[0]; - x444 = _tuple$210[1]; - x445 = new $Uint64(0, 0); - x446 = new $Uint64(0, 0); - _tuple$211 = bits.Add64(x406, x432, ((x$151 = (new p384Uint1(x444.$high, x444.$low)), new $Uint64(x$151.$high, x$151.$low)))); - x445 = _tuple$211[0]; - x446 = _tuple$211[1]; - x447 = new $Uint64(0, 0); - x448 = new $Uint64(0, 0); - _tuple$212 = bits.Add64(x408, x434, ((x$152 = (new p384Uint1(x446.$high, x446.$low)), new $Uint64(x$152.$high, x$152.$low)))); - x447 = _tuple$212[0]; - x448 = _tuple$212[1]; - x449 = new $Uint64(0, 0); - x450 = new $Uint64(0, 0); - _tuple$213 = bits.Add64(x410, x436, ((x$153 = (new p384Uint1(x448.$high, x448.$low)), new $Uint64(x$153.$high, x$153.$low)))); - x449 = _tuple$213[0]; - x450 = _tuple$213[1]; - x451 = new $Uint64(0, 0); - x452 = new $Uint64(0, 0); - _tuple$214 = bits.Add64(x412, x438, ((x$154 = (new p384Uint1(x450.$high, x450.$low)), new $Uint64(x$154.$high, x$154.$low)))); - x451 = _tuple$214[0]; - x452 = _tuple$214[1]; - x453 = (x$155 = ((x$156 = (new p384Uint1(x452.$high, x452.$low)), new $Uint64(x$156.$high, x$156.$low))), x$157 = ((x$158 = (new p384Uint1(x413.$high, x413.$low)), new $Uint64(x$158.$high, x$158.$low))), new $Uint64(x$155.$high + x$157.$high, x$155.$low + x$157.$low)); - x454 = new $Uint64(0, 0); - x455 = new $Uint64(0, 0); - _tuple$215 = bits.Sub64(x441, new $Uint64(0, 4294967295), new $Uint64(0, 0)); - x454 = _tuple$215[0]; - x455 = _tuple$215[1]; - x456 = new $Uint64(0, 0); - x457 = new $Uint64(0, 0); - _tuple$216 = bits.Sub64(x443, new $Uint64(4294967295, 0), ((x$159 = (new p384Uint1(x455.$high, x455.$low)), new $Uint64(x$159.$high, x$159.$low)))); - x456 = _tuple$216[0]; - x457 = _tuple$216[1]; - x458 = new $Uint64(0, 0); - x459 = new $Uint64(0, 0); - _tuple$217 = bits.Sub64(x445, new $Uint64(4294967295, 4294967294), ((x$160 = (new p384Uint1(x457.$high, x457.$low)), new $Uint64(x$160.$high, x$160.$low)))); - x458 = _tuple$217[0]; - x459 = _tuple$217[1]; - x460 = new $Uint64(0, 0); - x461 = new $Uint64(0, 0); - _tuple$218 = bits.Sub64(x447, new $Uint64(4294967295, 4294967295), ((x$161 = (new p384Uint1(x459.$high, x459.$low)), new $Uint64(x$161.$high, x$161.$low)))); - x460 = _tuple$218[0]; - x461 = _tuple$218[1]; - x462 = new $Uint64(0, 0); - x463 = new $Uint64(0, 0); - _tuple$219 = bits.Sub64(x449, new $Uint64(4294967295, 4294967295), ((x$162 = (new p384Uint1(x461.$high, x461.$low)), new $Uint64(x$162.$high, x$162.$low)))); - x462 = _tuple$219[0]; - x463 = _tuple$219[1]; - x464 = new $Uint64(0, 0); - x465 = new $Uint64(0, 0); - _tuple$220 = bits.Sub64(x451, new $Uint64(4294967295, 4294967295), ((x$163 = (new p384Uint1(x463.$high, x463.$low)), new $Uint64(x$163.$high, x$163.$low)))); - x464 = _tuple$220[0]; - x465 = _tuple$220[1]; - x467 = new $Uint64(0, 0); - _tuple$221 = bits.Sub64(x453, new $Uint64(0, 0), ((x$164 = (new p384Uint1(x465.$high, x465.$low)), new $Uint64(x$164.$high, x$164.$low)))); - x467 = _tuple$221[1]; - x468 = new $Uint64(0, 0); - p384CmovznzU64((x468$24ptr || (x468$24ptr = new ptrType(function() { return x468; }, function($v) { x468 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x454, x441); - x469 = new $Uint64(0, 0); - p384CmovznzU64((x469$24ptr || (x469$24ptr = new ptrType(function() { return x469; }, function($v) { x469 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x456, x443); - x470 = new $Uint64(0, 0); - p384CmovznzU64((x470$24ptr || (x470$24ptr = new ptrType(function() { return x470; }, function($v) { x470 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x458, x445); - x471 = new $Uint64(0, 0); - p384CmovznzU64((x471$24ptr || (x471$24ptr = new ptrType(function() { return x471; }, function($v) { x471 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x460, x447); - x472 = new $Uint64(0, 0); - p384CmovznzU64((x472$24ptr || (x472$24ptr = new ptrType(function() { return x472; }, function($v) { x472 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x462, x449); - x473 = new $Uint64(0, 0); - p384CmovznzU64((x473$24ptr || (x473$24ptr = new ptrType(function() { return x473; }, function($v) { x473 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x464, x451); - out1.nilCheck, out1[0] = x468; - out1.nilCheck, out1[1] = x469; - out1.nilCheck, out1[2] = x470; - out1.nilCheck, out1[3] = x471; - out1.nilCheck, out1[4] = x472; - out1.nilCheck, out1[5] = x473; - }; - p384Square = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$199, _tuple$2, _tuple$20, _tuple$200, _tuple$201, _tuple$202, _tuple$203, _tuple$204, _tuple$205, _tuple$206, _tuple$207, _tuple$208, _tuple$209, _tuple$21, _tuple$210, _tuple$211, _tuple$212, _tuple$213, _tuple$214, _tuple$215, _tuple$216, _tuple$217, _tuple$218, _tuple$219, _tuple$22, _tuple$220, _tuple$221, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x101, x102, x103, x104, x105, x106, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x179, x18, x180, x181, x182, x183, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x240, x241, x242, x243, x244, x245, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x301, x302, x303, x304, x305, x306, x307, x308, x309, x310, x311, x312, x313, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x354, x355, x356, x357, x358, x359, x36, x360, x361, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x376, x377, x378, x379, x38, x380, x381, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x403, x404, x405, x406, x407, x408, x409, x41, x410, x411, x412, x413, x414, x416, x417, x418, x419, x42, x420, x421, x422, x423, x424, x425, x426, x427, x428, x429, x43, x430, x431, x432, x433, x434, x435, x436, x437, x438, x44, x440, x441, x442, x443, x444, x445, x446, x447, x448, x449, x45, x450, x451, x452, x453, x454, x455, x456, x457, x458, x459, x46, x460, x461, x462, x463, x464, x465, x467, x468, x468$24ptr, x469, x469$24ptr, x47, x470, x470$24ptr, x471, x471$24ptr, x472, x472$24ptr, x473, x473$24ptr, x48, x49, x5, x50, x51, x52, x53, x54, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[4]; - x5 = arg1[5]; - x6 = arg1[0]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple = bits.Mul64(x6, arg1[5]); - x8 = _tuple[0]; - x7 = _tuple[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x6, arg1[4]); - x10 = _tuple$1[0]; - x9 = _tuple$1[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x6, arg1[3]); - x12 = _tuple$2[0]; - x11 = _tuple$2[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x6, arg1[2]); - x14 = _tuple$3[0]; - x13 = _tuple$3[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x6, arg1[1]); - x16 = _tuple$4[0]; - x15 = _tuple$4[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x6, arg1[0]); - x18 = _tuple$5[0]; - x17 = _tuple$5[1]; - x19 = new $Uint64(0, 0); - x20 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x18, x15, new $Uint64(0, 0)); - x19 = _tuple$6[0]; - x20 = _tuple$6[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(x16, x13, ((x = (new p384Uint1(x20.$high, x20.$low)), new $Uint64(x.$high, x.$low)))); - x21 = _tuple$7[0]; - x22 = _tuple$7[1]; - x23 = new $Uint64(0, 0); - x24 = new $Uint64(0, 0); - _tuple$8 = bits.Add64(x14, x11, ((x$1 = (new p384Uint1(x22.$high, x22.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x23 = _tuple$8[0]; - x24 = _tuple$8[1]; - x25 = new $Uint64(0, 0); - x26 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x12, x9, ((x$2 = (new p384Uint1(x24.$high, x24.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x25 = _tuple$9[0]; - x26 = _tuple$9[1]; - x27 = new $Uint64(0, 0); - x28 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x10, x7, ((x$3 = (new p384Uint1(x26.$high, x26.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x27 = _tuple$10[0]; - x28 = _tuple$10[1]; - x29 = (x$4 = ((x$5 = (new p384Uint1(x28.$high, x28.$low)), new $Uint64(x$5.$high, x$5.$low))), new $Uint64(x$4.$high + x8.$high, x$4.$low + x8.$low)); - x30 = new $Uint64(0, 0); - _tuple$11 = bits.Mul64(x17, new $Uint64(1, 1)); - x30 = _tuple$11[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$12 = bits.Mul64(x30, new $Uint64(4294967295, 4294967295)); - x33 = _tuple$12[0]; - x32 = _tuple$12[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$13 = bits.Mul64(x30, new $Uint64(4294967295, 4294967295)); - x35 = _tuple$13[0]; - x34 = _tuple$13[1]; - x36 = new $Uint64(0, 0); - x37 = new $Uint64(0, 0); - _tuple$14 = bits.Mul64(x30, new $Uint64(4294967295, 4294967295)); - x37 = _tuple$14[0]; - x36 = _tuple$14[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$15 = bits.Mul64(x30, new $Uint64(4294967295, 4294967294)); - x39 = _tuple$15[0]; - x38 = _tuple$15[1]; - x40 = new $Uint64(0, 0); - x41 = new $Uint64(0, 0); - _tuple$16 = bits.Mul64(x30, new $Uint64(4294967295, 0)); - x41 = _tuple$16[0]; - x40 = _tuple$16[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$17 = bits.Mul64(x30, new $Uint64(0, 4294967295)); - x43 = _tuple$17[0]; - x42 = _tuple$17[1]; - x44 = new $Uint64(0, 0); - x45 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(x43, x40, new $Uint64(0, 0)); - x44 = _tuple$18[0]; - x45 = _tuple$18[1]; - x46 = new $Uint64(0, 0); - x47 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(x41, x38, ((x$6 = (new p384Uint1(x45.$high, x45.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x46 = _tuple$19[0]; - x47 = _tuple$19[1]; - x48 = new $Uint64(0, 0); - x49 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(x39, x36, ((x$7 = (new p384Uint1(x47.$high, x47.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x48 = _tuple$20[0]; - x49 = _tuple$20[1]; - x50 = new $Uint64(0, 0); - x51 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x37, x34, ((x$8 = (new p384Uint1(x49.$high, x49.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x50 = _tuple$21[0]; - x51 = _tuple$21[1]; - x52 = new $Uint64(0, 0); - x53 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x35, x32, ((x$9 = (new p384Uint1(x51.$high, x51.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x52 = _tuple$22[0]; - x53 = _tuple$22[1]; - x54 = (x$10 = ((x$11 = (new p384Uint1(x53.$high, x53.$low)), new $Uint64(x$11.$high, x$11.$low))), new $Uint64(x$10.$high + x33.$high, x$10.$low + x33.$low)); - x56 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x17, x42, new $Uint64(0, 0)); - x56 = _tuple$23[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x19, x44, ((x$12 = (new p384Uint1(x56.$high, x56.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x57 = _tuple$24[0]; - x58 = _tuple$24[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(x21, x46, ((x$13 = (new p384Uint1(x58.$high, x58.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x59 = _tuple$25[0]; - x60 = _tuple$25[1]; - x61 = new $Uint64(0, 0); - x62 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x23, x48, ((x$14 = (new p384Uint1(x60.$high, x60.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x61 = _tuple$26[0]; - x62 = _tuple$26[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x25, x50, ((x$15 = (new p384Uint1(x62.$high, x62.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x63 = _tuple$27[0]; - x64 = _tuple$27[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x27, x52, ((x$16 = (new p384Uint1(x64.$high, x64.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x65 = _tuple$28[0]; - x66 = _tuple$28[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(x29, x54, ((x$17 = (new p384Uint1(x66.$high, x66.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x67 = _tuple$29[0]; - x68 = _tuple$29[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x1, arg1[5]); - x70 = _tuple$30[0]; - x69 = _tuple$30[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$31 = bits.Mul64(x1, arg1[4]); - x72 = _tuple$31[0]; - x71 = _tuple$31[1]; - x73 = new $Uint64(0, 0); - x74 = new $Uint64(0, 0); - _tuple$32 = bits.Mul64(x1, arg1[3]); - x74 = _tuple$32[0]; - x73 = _tuple$32[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$33 = bits.Mul64(x1, arg1[2]); - x76 = _tuple$33[0]; - x75 = _tuple$33[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$34 = bits.Mul64(x1, arg1[1]); - x78 = _tuple$34[0]; - x77 = _tuple$34[1]; - x79 = new $Uint64(0, 0); - x80 = new $Uint64(0, 0); - _tuple$35 = bits.Mul64(x1, arg1[0]); - x80 = _tuple$35[0]; - x79 = _tuple$35[1]; - x81 = new $Uint64(0, 0); - x82 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x80, x77, new $Uint64(0, 0)); - x81 = _tuple$36[0]; - x82 = _tuple$36[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x78, x75, ((x$18 = (new p384Uint1(x82.$high, x82.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x83 = _tuple$37[0]; - x84 = _tuple$37[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x76, x73, ((x$19 = (new p384Uint1(x84.$high, x84.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x85 = _tuple$38[0]; - x86 = _tuple$38[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x74, x71, ((x$20 = (new p384Uint1(x86.$high, x86.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x87 = _tuple$39[0]; - x88 = _tuple$39[1]; - x89 = new $Uint64(0, 0); - x90 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x72, x69, ((x$21 = (new p384Uint1(x88.$high, x88.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x89 = _tuple$40[0]; - x90 = _tuple$40[1]; - x91 = (x$22 = ((x$23 = (new p384Uint1(x90.$high, x90.$low)), new $Uint64(x$23.$high, x$23.$low))), new $Uint64(x$22.$high + x70.$high, x$22.$low + x70.$low)); - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$41 = bits.Add64(x57, x79, new $Uint64(0, 0)); - x92 = _tuple$41[0]; - x93 = _tuple$41[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$42 = bits.Add64(x59, x81, ((x$24 = (new p384Uint1(x93.$high, x93.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x94 = _tuple$42[0]; - x95 = _tuple$42[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x61, x83, ((x$25 = (new p384Uint1(x95.$high, x95.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x96 = _tuple$43[0]; - x97 = _tuple$43[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$44 = bits.Add64(x63, x85, ((x$26 = (new p384Uint1(x97.$high, x97.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x98 = _tuple$44[0]; - x99 = _tuple$44[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x65, x87, ((x$27 = (new p384Uint1(x99.$high, x99.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x100 = _tuple$45[0]; - x101 = _tuple$45[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x67, x89, ((x$28 = (new p384Uint1(x101.$high, x101.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x102 = _tuple$46[0]; - x103 = _tuple$46[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(((x$29 = (new p384Uint1(x68.$high, x68.$low)), new $Uint64(x$29.$high, x$29.$low))), x91, ((x$30 = (new p384Uint1(x103.$high, x103.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x104 = _tuple$47[0]; - x105 = _tuple$47[1]; - x106 = new $Uint64(0, 0); - _tuple$48 = bits.Mul64(x92, new $Uint64(1, 1)); - x106 = _tuple$48[1]; - x108 = new $Uint64(0, 0); - x109 = new $Uint64(0, 0); - _tuple$49 = bits.Mul64(x106, new $Uint64(4294967295, 4294967295)); - x109 = _tuple$49[0]; - x108 = _tuple$49[1]; - x110 = new $Uint64(0, 0); - x111 = new $Uint64(0, 0); - _tuple$50 = bits.Mul64(x106, new $Uint64(4294967295, 4294967295)); - x111 = _tuple$50[0]; - x110 = _tuple$50[1]; - x112 = new $Uint64(0, 0); - x113 = new $Uint64(0, 0); - _tuple$51 = bits.Mul64(x106, new $Uint64(4294967295, 4294967295)); - x113 = _tuple$51[0]; - x112 = _tuple$51[1]; - x114 = new $Uint64(0, 0); - x115 = new $Uint64(0, 0); - _tuple$52 = bits.Mul64(x106, new $Uint64(4294967295, 4294967294)); - x115 = _tuple$52[0]; - x114 = _tuple$52[1]; - x116 = new $Uint64(0, 0); - x117 = new $Uint64(0, 0); - _tuple$53 = bits.Mul64(x106, new $Uint64(4294967295, 0)); - x117 = _tuple$53[0]; - x116 = _tuple$53[1]; - x118 = new $Uint64(0, 0); - x119 = new $Uint64(0, 0); - _tuple$54 = bits.Mul64(x106, new $Uint64(0, 4294967295)); - x119 = _tuple$54[0]; - x118 = _tuple$54[1]; - x120 = new $Uint64(0, 0); - x121 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x119, x116, new $Uint64(0, 0)); - x120 = _tuple$55[0]; - x121 = _tuple$55[1]; - x122 = new $Uint64(0, 0); - x123 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x117, x114, ((x$31 = (new p384Uint1(x121.$high, x121.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x122 = _tuple$56[0]; - x123 = _tuple$56[1]; - x124 = new $Uint64(0, 0); - x125 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x115, x112, ((x$32 = (new p384Uint1(x123.$high, x123.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x124 = _tuple$57[0]; - x125 = _tuple$57[1]; - x126 = new $Uint64(0, 0); - x127 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x113, x110, ((x$33 = (new p384Uint1(x125.$high, x125.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x126 = _tuple$58[0]; - x127 = _tuple$58[1]; - x128 = new $Uint64(0, 0); - x129 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x111, x108, ((x$34 = (new p384Uint1(x127.$high, x127.$low)), new $Uint64(x$34.$high, x$34.$low)))); - x128 = _tuple$59[0]; - x129 = _tuple$59[1]; - x130 = (x$35 = ((x$36 = (new p384Uint1(x129.$high, x129.$low)), new $Uint64(x$36.$high, x$36.$low))), new $Uint64(x$35.$high + x109.$high, x$35.$low + x109.$low)); - x132 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x92, x118, new $Uint64(0, 0)); - x132 = _tuple$60[1]; - x133 = new $Uint64(0, 0); - x134 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x94, x120, ((x$37 = (new p384Uint1(x132.$high, x132.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x133 = _tuple$61[0]; - x134 = _tuple$61[1]; - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x96, x122, ((x$38 = (new p384Uint1(x134.$high, x134.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x135 = _tuple$62[0]; - x136 = _tuple$62[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x98, x124, ((x$39 = (new p384Uint1(x136.$high, x136.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x137 = _tuple$63[0]; - x138 = _tuple$63[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x100, x126, ((x$40 = (new p384Uint1(x138.$high, x138.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x139 = _tuple$64[0]; - x140 = _tuple$64[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x102, x128, ((x$41 = (new p384Uint1(x140.$high, x140.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x141 = _tuple$65[0]; - x142 = _tuple$65[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x104, x130, ((x$42 = (new p384Uint1(x142.$high, x142.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x143 = _tuple$66[0]; - x144 = _tuple$66[1]; - x145 = (x$43 = ((x$44 = (new p384Uint1(x144.$high, x144.$low)), new $Uint64(x$44.$high, x$44.$low))), x$45 = ((x$46 = (new p384Uint1(x105.$high, x105.$low)), new $Uint64(x$46.$high, x$46.$low))), new $Uint64(x$43.$high + x$45.$high, x$43.$low + x$45.$low)); - x146 = new $Uint64(0, 0); - x147 = new $Uint64(0, 0); - _tuple$67 = bits.Mul64(x2, arg1[5]); - x147 = _tuple$67[0]; - x146 = _tuple$67[1]; - x148 = new $Uint64(0, 0); - x149 = new $Uint64(0, 0); - _tuple$68 = bits.Mul64(x2, arg1[4]); - x149 = _tuple$68[0]; - x148 = _tuple$68[1]; - x150 = new $Uint64(0, 0); - x151 = new $Uint64(0, 0); - _tuple$69 = bits.Mul64(x2, arg1[3]); - x151 = _tuple$69[0]; - x150 = _tuple$69[1]; - x152 = new $Uint64(0, 0); - x153 = new $Uint64(0, 0); - _tuple$70 = bits.Mul64(x2, arg1[2]); - x153 = _tuple$70[0]; - x152 = _tuple$70[1]; - x154 = new $Uint64(0, 0); - x155 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x2, arg1[1]); - x155 = _tuple$71[0]; - x154 = _tuple$71[1]; - x156 = new $Uint64(0, 0); - x157 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x2, arg1[0]); - x157 = _tuple$72[0]; - x156 = _tuple$72[1]; - x158 = new $Uint64(0, 0); - x159 = new $Uint64(0, 0); - _tuple$73 = bits.Add64(x157, x154, new $Uint64(0, 0)); - x158 = _tuple$73[0]; - x159 = _tuple$73[1]; - x160 = new $Uint64(0, 0); - x161 = new $Uint64(0, 0); - _tuple$74 = bits.Add64(x155, x152, ((x$47 = (new p384Uint1(x159.$high, x159.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x160 = _tuple$74[0]; - x161 = _tuple$74[1]; - x162 = new $Uint64(0, 0); - x163 = new $Uint64(0, 0); - _tuple$75 = bits.Add64(x153, x150, ((x$48 = (new p384Uint1(x161.$high, x161.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x162 = _tuple$75[0]; - x163 = _tuple$75[1]; - x164 = new $Uint64(0, 0); - x165 = new $Uint64(0, 0); - _tuple$76 = bits.Add64(x151, x148, ((x$49 = (new p384Uint1(x163.$high, x163.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x164 = _tuple$76[0]; - x165 = _tuple$76[1]; - x166 = new $Uint64(0, 0); - x167 = new $Uint64(0, 0); - _tuple$77 = bits.Add64(x149, x146, ((x$50 = (new p384Uint1(x165.$high, x165.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x166 = _tuple$77[0]; - x167 = _tuple$77[1]; - x168 = (x$51 = ((x$52 = (new p384Uint1(x167.$high, x167.$low)), new $Uint64(x$52.$high, x$52.$low))), new $Uint64(x$51.$high + x147.$high, x$51.$low + x147.$low)); - x169 = new $Uint64(0, 0); - x170 = new $Uint64(0, 0); - _tuple$78 = bits.Add64(x133, x156, new $Uint64(0, 0)); - x169 = _tuple$78[0]; - x170 = _tuple$78[1]; - x171 = new $Uint64(0, 0); - x172 = new $Uint64(0, 0); - _tuple$79 = bits.Add64(x135, x158, ((x$53 = (new p384Uint1(x170.$high, x170.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x171 = _tuple$79[0]; - x172 = _tuple$79[1]; - x173 = new $Uint64(0, 0); - x174 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x137, x160, ((x$54 = (new p384Uint1(x172.$high, x172.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x173 = _tuple$80[0]; - x174 = _tuple$80[1]; - x175 = new $Uint64(0, 0); - x176 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x139, x162, ((x$55 = (new p384Uint1(x174.$high, x174.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x175 = _tuple$81[0]; - x176 = _tuple$81[1]; - x177 = new $Uint64(0, 0); - x178 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x141, x164, ((x$56 = (new p384Uint1(x176.$high, x176.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x177 = _tuple$82[0]; - x178 = _tuple$82[1]; - x179 = new $Uint64(0, 0); - x180 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x143, x166, ((x$57 = (new p384Uint1(x178.$high, x178.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x179 = _tuple$83[0]; - x180 = _tuple$83[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x145, x168, ((x$58 = (new p384Uint1(x180.$high, x180.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x181 = _tuple$84[0]; - x182 = _tuple$84[1]; - x183 = new $Uint64(0, 0); - _tuple$85 = bits.Mul64(x169, new $Uint64(1, 1)); - x183 = _tuple$85[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$86 = bits.Mul64(x183, new $Uint64(4294967295, 4294967295)); - x186 = _tuple$86[0]; - x185 = _tuple$86[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$87 = bits.Mul64(x183, new $Uint64(4294967295, 4294967295)); - x188 = _tuple$87[0]; - x187 = _tuple$87[1]; - x189 = new $Uint64(0, 0); - x190 = new $Uint64(0, 0); - _tuple$88 = bits.Mul64(x183, new $Uint64(4294967295, 4294967295)); - x190 = _tuple$88[0]; - x189 = _tuple$88[1]; - x191 = new $Uint64(0, 0); - x192 = new $Uint64(0, 0); - _tuple$89 = bits.Mul64(x183, new $Uint64(4294967295, 4294967294)); - x192 = _tuple$89[0]; - x191 = _tuple$89[1]; - x193 = new $Uint64(0, 0); - x194 = new $Uint64(0, 0); - _tuple$90 = bits.Mul64(x183, new $Uint64(4294967295, 0)); - x194 = _tuple$90[0]; - x193 = _tuple$90[1]; - x195 = new $Uint64(0, 0); - x196 = new $Uint64(0, 0); - _tuple$91 = bits.Mul64(x183, new $Uint64(0, 4294967295)); - x196 = _tuple$91[0]; - x195 = _tuple$91[1]; - x197 = new $Uint64(0, 0); - x198 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x196, x193, new $Uint64(0, 0)); - x197 = _tuple$92[0]; - x198 = _tuple$92[1]; - x199 = new $Uint64(0, 0); - x200 = new $Uint64(0, 0); - _tuple$93 = bits.Add64(x194, x191, ((x$59 = (new p384Uint1(x198.$high, x198.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x199 = _tuple$93[0]; - x200 = _tuple$93[1]; - x201 = new $Uint64(0, 0); - x202 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x192, x189, ((x$60 = (new p384Uint1(x200.$high, x200.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x201 = _tuple$94[0]; - x202 = _tuple$94[1]; - x203 = new $Uint64(0, 0); - x204 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x190, x187, ((x$61 = (new p384Uint1(x202.$high, x202.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x203 = _tuple$95[0]; - x204 = _tuple$95[1]; - x205 = new $Uint64(0, 0); - x206 = new $Uint64(0, 0); - _tuple$96 = bits.Add64(x188, x185, ((x$62 = (new p384Uint1(x204.$high, x204.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x205 = _tuple$96[0]; - x206 = _tuple$96[1]; - x207 = (x$63 = ((x$64 = (new p384Uint1(x206.$high, x206.$low)), new $Uint64(x$64.$high, x$64.$low))), new $Uint64(x$63.$high + x186.$high, x$63.$low + x186.$low)); - x209 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x169, x195, new $Uint64(0, 0)); - x209 = _tuple$97[1]; - x210 = new $Uint64(0, 0); - x211 = new $Uint64(0, 0); - _tuple$98 = bits.Add64(x171, x197, ((x$65 = (new p384Uint1(x209.$high, x209.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x210 = _tuple$98[0]; - x211 = _tuple$98[1]; - x212 = new $Uint64(0, 0); - x213 = new $Uint64(0, 0); - _tuple$99 = bits.Add64(x173, x199, ((x$66 = (new p384Uint1(x211.$high, x211.$low)), new $Uint64(x$66.$high, x$66.$low)))); - x212 = _tuple$99[0]; - x213 = _tuple$99[1]; - x214 = new $Uint64(0, 0); - x215 = new $Uint64(0, 0); - _tuple$100 = bits.Add64(x175, x201, ((x$67 = (new p384Uint1(x213.$high, x213.$low)), new $Uint64(x$67.$high, x$67.$low)))); - x214 = _tuple$100[0]; - x215 = _tuple$100[1]; - x216 = new $Uint64(0, 0); - x217 = new $Uint64(0, 0); - _tuple$101 = bits.Add64(x177, x203, ((x$68 = (new p384Uint1(x215.$high, x215.$low)), new $Uint64(x$68.$high, x$68.$low)))); - x216 = _tuple$101[0]; - x217 = _tuple$101[1]; - x218 = new $Uint64(0, 0); - x219 = new $Uint64(0, 0); - _tuple$102 = bits.Add64(x179, x205, ((x$69 = (new p384Uint1(x217.$high, x217.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x218 = _tuple$102[0]; - x219 = _tuple$102[1]; - x220 = new $Uint64(0, 0); - x221 = new $Uint64(0, 0); - _tuple$103 = bits.Add64(x181, x207, ((x$70 = (new p384Uint1(x219.$high, x219.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x220 = _tuple$103[0]; - x221 = _tuple$103[1]; - x222 = (x$71 = ((x$72 = (new p384Uint1(x221.$high, x221.$low)), new $Uint64(x$72.$high, x$72.$low))), x$73 = ((x$74 = (new p384Uint1(x182.$high, x182.$low)), new $Uint64(x$74.$high, x$74.$low))), new $Uint64(x$71.$high + x$73.$high, x$71.$low + x$73.$low)); - x223 = new $Uint64(0, 0); - x224 = new $Uint64(0, 0); - _tuple$104 = bits.Mul64(x3, arg1[5]); - x224 = _tuple$104[0]; - x223 = _tuple$104[1]; - x225 = new $Uint64(0, 0); - x226 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x3, arg1[4]); - x226 = _tuple$105[0]; - x225 = _tuple$105[1]; - x227 = new $Uint64(0, 0); - x228 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x3, arg1[3]); - x228 = _tuple$106[0]; - x227 = _tuple$106[1]; - x229 = new $Uint64(0, 0); - x230 = new $Uint64(0, 0); - _tuple$107 = bits.Mul64(x3, arg1[2]); - x230 = _tuple$107[0]; - x229 = _tuple$107[1]; - x231 = new $Uint64(0, 0); - x232 = new $Uint64(0, 0); - _tuple$108 = bits.Mul64(x3, arg1[1]); - x232 = _tuple$108[0]; - x231 = _tuple$108[1]; - x233 = new $Uint64(0, 0); - x234 = new $Uint64(0, 0); - _tuple$109 = bits.Mul64(x3, arg1[0]); - x234 = _tuple$109[0]; - x233 = _tuple$109[1]; - x235 = new $Uint64(0, 0); - x236 = new $Uint64(0, 0); - _tuple$110 = bits.Add64(x234, x231, new $Uint64(0, 0)); - x235 = _tuple$110[0]; - x236 = _tuple$110[1]; - x237 = new $Uint64(0, 0); - x238 = new $Uint64(0, 0); - _tuple$111 = bits.Add64(x232, x229, ((x$75 = (new p384Uint1(x236.$high, x236.$low)), new $Uint64(x$75.$high, x$75.$low)))); - x237 = _tuple$111[0]; - x238 = _tuple$111[1]; - x239 = new $Uint64(0, 0); - x240 = new $Uint64(0, 0); - _tuple$112 = bits.Add64(x230, x227, ((x$76 = (new p384Uint1(x238.$high, x238.$low)), new $Uint64(x$76.$high, x$76.$low)))); - x239 = _tuple$112[0]; - x240 = _tuple$112[1]; - x241 = new $Uint64(0, 0); - x242 = new $Uint64(0, 0); - _tuple$113 = bits.Add64(x228, x225, ((x$77 = (new p384Uint1(x240.$high, x240.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x241 = _tuple$113[0]; - x242 = _tuple$113[1]; - x243 = new $Uint64(0, 0); - x244 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x226, x223, ((x$78 = (new p384Uint1(x242.$high, x242.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x243 = _tuple$114[0]; - x244 = _tuple$114[1]; - x245 = (x$79 = ((x$80 = (new p384Uint1(x244.$high, x244.$low)), new $Uint64(x$80.$high, x$80.$low))), new $Uint64(x$79.$high + x224.$high, x$79.$low + x224.$low)); - x246 = new $Uint64(0, 0); - x247 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x210, x233, new $Uint64(0, 0)); - x246 = _tuple$115[0]; - x247 = _tuple$115[1]; - x248 = new $Uint64(0, 0); - x249 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x212, x235, ((x$81 = (new p384Uint1(x247.$high, x247.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x248 = _tuple$116[0]; - x249 = _tuple$116[1]; - x250 = new $Uint64(0, 0); - x251 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x214, x237, ((x$82 = (new p384Uint1(x249.$high, x249.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x250 = _tuple$117[0]; - x251 = _tuple$117[1]; - x252 = new $Uint64(0, 0); - x253 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x216, x239, ((x$83 = (new p384Uint1(x251.$high, x251.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x252 = _tuple$118[0]; - x253 = _tuple$118[1]; - x254 = new $Uint64(0, 0); - x255 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x218, x241, ((x$84 = (new p384Uint1(x253.$high, x253.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x254 = _tuple$119[0]; - x255 = _tuple$119[1]; - x256 = new $Uint64(0, 0); - x257 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x220, x243, ((x$85 = (new p384Uint1(x255.$high, x255.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x256 = _tuple$120[0]; - x257 = _tuple$120[1]; - x258 = new $Uint64(0, 0); - x259 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x222, x245, ((x$86 = (new p384Uint1(x257.$high, x257.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x258 = _tuple$121[0]; - x259 = _tuple$121[1]; - x260 = new $Uint64(0, 0); - _tuple$122 = bits.Mul64(x246, new $Uint64(1, 1)); - x260 = _tuple$122[1]; - x262 = new $Uint64(0, 0); - x263 = new $Uint64(0, 0); - _tuple$123 = bits.Mul64(x260, new $Uint64(4294967295, 4294967295)); - x263 = _tuple$123[0]; - x262 = _tuple$123[1]; - x264 = new $Uint64(0, 0); - x265 = new $Uint64(0, 0); - _tuple$124 = bits.Mul64(x260, new $Uint64(4294967295, 4294967295)); - x265 = _tuple$124[0]; - x264 = _tuple$124[1]; - x266 = new $Uint64(0, 0); - x267 = new $Uint64(0, 0); - _tuple$125 = bits.Mul64(x260, new $Uint64(4294967295, 4294967295)); - x267 = _tuple$125[0]; - x266 = _tuple$125[1]; - x268 = new $Uint64(0, 0); - x269 = new $Uint64(0, 0); - _tuple$126 = bits.Mul64(x260, new $Uint64(4294967295, 4294967294)); - x269 = _tuple$126[0]; - x268 = _tuple$126[1]; - x270 = new $Uint64(0, 0); - x271 = new $Uint64(0, 0); - _tuple$127 = bits.Mul64(x260, new $Uint64(4294967295, 0)); - x271 = _tuple$127[0]; - x270 = _tuple$127[1]; - x272 = new $Uint64(0, 0); - x273 = new $Uint64(0, 0); - _tuple$128 = bits.Mul64(x260, new $Uint64(0, 4294967295)); - x273 = _tuple$128[0]; - x272 = _tuple$128[1]; - x274 = new $Uint64(0, 0); - x275 = new $Uint64(0, 0); - _tuple$129 = bits.Add64(x273, x270, new $Uint64(0, 0)); - x274 = _tuple$129[0]; - x275 = _tuple$129[1]; - x276 = new $Uint64(0, 0); - x277 = new $Uint64(0, 0); - _tuple$130 = bits.Add64(x271, x268, ((x$87 = (new p384Uint1(x275.$high, x275.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x276 = _tuple$130[0]; - x277 = _tuple$130[1]; - x278 = new $Uint64(0, 0); - x279 = new $Uint64(0, 0); - _tuple$131 = bits.Add64(x269, x266, ((x$88 = (new p384Uint1(x277.$high, x277.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x278 = _tuple$131[0]; - x279 = _tuple$131[1]; - x280 = new $Uint64(0, 0); - x281 = new $Uint64(0, 0); - _tuple$132 = bits.Add64(x267, x264, ((x$89 = (new p384Uint1(x279.$high, x279.$low)), new $Uint64(x$89.$high, x$89.$low)))); - x280 = _tuple$132[0]; - x281 = _tuple$132[1]; - x282 = new $Uint64(0, 0); - x283 = new $Uint64(0, 0); - _tuple$133 = bits.Add64(x265, x262, ((x$90 = (new p384Uint1(x281.$high, x281.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x282 = _tuple$133[0]; - x283 = _tuple$133[1]; - x284 = (x$91 = ((x$92 = (new p384Uint1(x283.$high, x283.$low)), new $Uint64(x$92.$high, x$92.$low))), new $Uint64(x$91.$high + x263.$high, x$91.$low + x263.$low)); - x286 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x246, x272, new $Uint64(0, 0)); - x286 = _tuple$134[1]; - x287 = new $Uint64(0, 0); - x288 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x248, x274, ((x$93 = (new p384Uint1(x286.$high, x286.$low)), new $Uint64(x$93.$high, x$93.$low)))); - x287 = _tuple$135[0]; - x288 = _tuple$135[1]; - x289 = new $Uint64(0, 0); - x290 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x250, x276, ((x$94 = (new p384Uint1(x288.$high, x288.$low)), new $Uint64(x$94.$high, x$94.$low)))); - x289 = _tuple$136[0]; - x290 = _tuple$136[1]; - x291 = new $Uint64(0, 0); - x292 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x252, x278, ((x$95 = (new p384Uint1(x290.$high, x290.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x291 = _tuple$137[0]; - x292 = _tuple$137[1]; - x293 = new $Uint64(0, 0); - x294 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x254, x280, ((x$96 = (new p384Uint1(x292.$high, x292.$low)), new $Uint64(x$96.$high, x$96.$low)))); - x293 = _tuple$138[0]; - x294 = _tuple$138[1]; - x295 = new $Uint64(0, 0); - x296 = new $Uint64(0, 0); - _tuple$139 = bits.Add64(x256, x282, ((x$97 = (new p384Uint1(x294.$high, x294.$low)), new $Uint64(x$97.$high, x$97.$low)))); - x295 = _tuple$139[0]; - x296 = _tuple$139[1]; - x297 = new $Uint64(0, 0); - x298 = new $Uint64(0, 0); - _tuple$140 = bits.Add64(x258, x284, ((x$98 = (new p384Uint1(x296.$high, x296.$low)), new $Uint64(x$98.$high, x$98.$low)))); - x297 = _tuple$140[0]; - x298 = _tuple$140[1]; - x299 = (x$99 = ((x$100 = (new p384Uint1(x298.$high, x298.$low)), new $Uint64(x$100.$high, x$100.$low))), x$101 = ((x$102 = (new p384Uint1(x259.$high, x259.$low)), new $Uint64(x$102.$high, x$102.$low))), new $Uint64(x$99.$high + x$101.$high, x$99.$low + x$101.$low)); - x300 = new $Uint64(0, 0); - x301 = new $Uint64(0, 0); - _tuple$141 = bits.Mul64(x4, arg1[5]); - x301 = _tuple$141[0]; - x300 = _tuple$141[1]; - x302 = new $Uint64(0, 0); - x303 = new $Uint64(0, 0); - _tuple$142 = bits.Mul64(x4, arg1[4]); - x303 = _tuple$142[0]; - x302 = _tuple$142[1]; - x304 = new $Uint64(0, 0); - x305 = new $Uint64(0, 0); - _tuple$143 = bits.Mul64(x4, arg1[3]); - x305 = _tuple$143[0]; - x304 = _tuple$143[1]; - x306 = new $Uint64(0, 0); - x307 = new $Uint64(0, 0); - _tuple$144 = bits.Mul64(x4, arg1[2]); - x307 = _tuple$144[0]; - x306 = _tuple$144[1]; - x308 = new $Uint64(0, 0); - x309 = new $Uint64(0, 0); - _tuple$145 = bits.Mul64(x4, arg1[1]); - x309 = _tuple$145[0]; - x308 = _tuple$145[1]; - x310 = new $Uint64(0, 0); - x311 = new $Uint64(0, 0); - _tuple$146 = bits.Mul64(x4, arg1[0]); - x311 = _tuple$146[0]; - x310 = _tuple$146[1]; - x312 = new $Uint64(0, 0); - x313 = new $Uint64(0, 0); - _tuple$147 = bits.Add64(x311, x308, new $Uint64(0, 0)); - x312 = _tuple$147[0]; - x313 = _tuple$147[1]; - x314 = new $Uint64(0, 0); - x315 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x309, x306, ((x$103 = (new p384Uint1(x313.$high, x313.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x314 = _tuple$148[0]; - x315 = _tuple$148[1]; - x316 = new $Uint64(0, 0); - x317 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x307, x304, ((x$104 = (new p384Uint1(x315.$high, x315.$low)), new $Uint64(x$104.$high, x$104.$low)))); - x316 = _tuple$149[0]; - x317 = _tuple$149[1]; - x318 = new $Uint64(0, 0); - x319 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x305, x302, ((x$105 = (new p384Uint1(x317.$high, x317.$low)), new $Uint64(x$105.$high, x$105.$low)))); - x318 = _tuple$150[0]; - x319 = _tuple$150[1]; - x320 = new $Uint64(0, 0); - x321 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x303, x300, ((x$106 = (new p384Uint1(x319.$high, x319.$low)), new $Uint64(x$106.$high, x$106.$low)))); - x320 = _tuple$151[0]; - x321 = _tuple$151[1]; - x322 = (x$107 = ((x$108 = (new p384Uint1(x321.$high, x321.$low)), new $Uint64(x$108.$high, x$108.$low))), new $Uint64(x$107.$high + x301.$high, x$107.$low + x301.$low)); - x323 = new $Uint64(0, 0); - x324 = new $Uint64(0, 0); - _tuple$152 = bits.Add64(x287, x310, new $Uint64(0, 0)); - x323 = _tuple$152[0]; - x324 = _tuple$152[1]; - x325 = new $Uint64(0, 0); - x326 = new $Uint64(0, 0); - _tuple$153 = bits.Add64(x289, x312, ((x$109 = (new p384Uint1(x324.$high, x324.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x325 = _tuple$153[0]; - x326 = _tuple$153[1]; - x327 = new $Uint64(0, 0); - x328 = new $Uint64(0, 0); - _tuple$154 = bits.Add64(x291, x314, ((x$110 = (new p384Uint1(x326.$high, x326.$low)), new $Uint64(x$110.$high, x$110.$low)))); - x327 = _tuple$154[0]; - x328 = _tuple$154[1]; - x329 = new $Uint64(0, 0); - x330 = new $Uint64(0, 0); - _tuple$155 = bits.Add64(x293, x316, ((x$111 = (new p384Uint1(x328.$high, x328.$low)), new $Uint64(x$111.$high, x$111.$low)))); - x329 = _tuple$155[0]; - x330 = _tuple$155[1]; - x331 = new $Uint64(0, 0); - x332 = new $Uint64(0, 0); - _tuple$156 = bits.Add64(x295, x318, ((x$112 = (new p384Uint1(x330.$high, x330.$low)), new $Uint64(x$112.$high, x$112.$low)))); - x331 = _tuple$156[0]; - x332 = _tuple$156[1]; - x333 = new $Uint64(0, 0); - x334 = new $Uint64(0, 0); - _tuple$157 = bits.Add64(x297, x320, ((x$113 = (new p384Uint1(x332.$high, x332.$low)), new $Uint64(x$113.$high, x$113.$low)))); - x333 = _tuple$157[0]; - x334 = _tuple$157[1]; - x335 = new $Uint64(0, 0); - x336 = new $Uint64(0, 0); - _tuple$158 = bits.Add64(x299, x322, ((x$114 = (new p384Uint1(x334.$high, x334.$low)), new $Uint64(x$114.$high, x$114.$low)))); - x335 = _tuple$158[0]; - x336 = _tuple$158[1]; - x337 = new $Uint64(0, 0); - _tuple$159 = bits.Mul64(x323, new $Uint64(1, 1)); - x337 = _tuple$159[1]; - x339 = new $Uint64(0, 0); - x340 = new $Uint64(0, 0); - _tuple$160 = bits.Mul64(x337, new $Uint64(4294967295, 4294967295)); - x340 = _tuple$160[0]; - x339 = _tuple$160[1]; - x341 = new $Uint64(0, 0); - x342 = new $Uint64(0, 0); - _tuple$161 = bits.Mul64(x337, new $Uint64(4294967295, 4294967295)); - x342 = _tuple$161[0]; - x341 = _tuple$161[1]; - x343 = new $Uint64(0, 0); - x344 = new $Uint64(0, 0); - _tuple$162 = bits.Mul64(x337, new $Uint64(4294967295, 4294967295)); - x344 = _tuple$162[0]; - x343 = _tuple$162[1]; - x345 = new $Uint64(0, 0); - x346 = new $Uint64(0, 0); - _tuple$163 = bits.Mul64(x337, new $Uint64(4294967295, 4294967294)); - x346 = _tuple$163[0]; - x345 = _tuple$163[1]; - x347 = new $Uint64(0, 0); - x348 = new $Uint64(0, 0); - _tuple$164 = bits.Mul64(x337, new $Uint64(4294967295, 0)); - x348 = _tuple$164[0]; - x347 = _tuple$164[1]; - x349 = new $Uint64(0, 0); - x350 = new $Uint64(0, 0); - _tuple$165 = bits.Mul64(x337, new $Uint64(0, 4294967295)); - x350 = _tuple$165[0]; - x349 = _tuple$165[1]; - x351 = new $Uint64(0, 0); - x352 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x350, x347, new $Uint64(0, 0)); - x351 = _tuple$166[0]; - x352 = _tuple$166[1]; - x353 = new $Uint64(0, 0); - x354 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x348, x345, ((x$115 = (new p384Uint1(x352.$high, x352.$low)), new $Uint64(x$115.$high, x$115.$low)))); - x353 = _tuple$167[0]; - x354 = _tuple$167[1]; - x355 = new $Uint64(0, 0); - x356 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x346, x343, ((x$116 = (new p384Uint1(x354.$high, x354.$low)), new $Uint64(x$116.$high, x$116.$low)))); - x355 = _tuple$168[0]; - x356 = _tuple$168[1]; - x357 = new $Uint64(0, 0); - x358 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x344, x341, ((x$117 = (new p384Uint1(x356.$high, x356.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x357 = _tuple$169[0]; - x358 = _tuple$169[1]; - x359 = new $Uint64(0, 0); - x360 = new $Uint64(0, 0); - _tuple$170 = bits.Add64(x342, x339, ((x$118 = (new p384Uint1(x358.$high, x358.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x359 = _tuple$170[0]; - x360 = _tuple$170[1]; - x361 = (x$119 = ((x$120 = (new p384Uint1(x360.$high, x360.$low)), new $Uint64(x$120.$high, x$120.$low))), new $Uint64(x$119.$high + x340.$high, x$119.$low + x340.$low)); - x363 = new $Uint64(0, 0); - _tuple$171 = bits.Add64(x323, x349, new $Uint64(0, 0)); - x363 = _tuple$171[1]; - x364 = new $Uint64(0, 0); - x365 = new $Uint64(0, 0); - _tuple$172 = bits.Add64(x325, x351, ((x$121 = (new p384Uint1(x363.$high, x363.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x364 = _tuple$172[0]; - x365 = _tuple$172[1]; - x366 = new $Uint64(0, 0); - x367 = new $Uint64(0, 0); - _tuple$173 = bits.Add64(x327, x353, ((x$122 = (new p384Uint1(x365.$high, x365.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x366 = _tuple$173[0]; - x367 = _tuple$173[1]; - x368 = new $Uint64(0, 0); - x369 = new $Uint64(0, 0); - _tuple$174 = bits.Add64(x329, x355, ((x$123 = (new p384Uint1(x367.$high, x367.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x368 = _tuple$174[0]; - x369 = _tuple$174[1]; - x370 = new $Uint64(0, 0); - x371 = new $Uint64(0, 0); - _tuple$175 = bits.Add64(x331, x357, ((x$124 = (new p384Uint1(x369.$high, x369.$low)), new $Uint64(x$124.$high, x$124.$low)))); - x370 = _tuple$175[0]; - x371 = _tuple$175[1]; - x372 = new $Uint64(0, 0); - x373 = new $Uint64(0, 0); - _tuple$176 = bits.Add64(x333, x359, ((x$125 = (new p384Uint1(x371.$high, x371.$low)), new $Uint64(x$125.$high, x$125.$low)))); - x372 = _tuple$176[0]; - x373 = _tuple$176[1]; - x374 = new $Uint64(0, 0); - x375 = new $Uint64(0, 0); - _tuple$177 = bits.Add64(x335, x361, ((x$126 = (new p384Uint1(x373.$high, x373.$low)), new $Uint64(x$126.$high, x$126.$low)))); - x374 = _tuple$177[0]; - x375 = _tuple$177[1]; - x376 = (x$127 = ((x$128 = (new p384Uint1(x375.$high, x375.$low)), new $Uint64(x$128.$high, x$128.$low))), x$129 = ((x$130 = (new p384Uint1(x336.$high, x336.$low)), new $Uint64(x$130.$high, x$130.$low))), new $Uint64(x$127.$high + x$129.$high, x$127.$low + x$129.$low)); - x377 = new $Uint64(0, 0); - x378 = new $Uint64(0, 0); - _tuple$178 = bits.Mul64(x5, arg1[5]); - x378 = _tuple$178[0]; - x377 = _tuple$178[1]; - x379 = new $Uint64(0, 0); - x380 = new $Uint64(0, 0); - _tuple$179 = bits.Mul64(x5, arg1[4]); - x380 = _tuple$179[0]; - x379 = _tuple$179[1]; - x381 = new $Uint64(0, 0); - x382 = new $Uint64(0, 0); - _tuple$180 = bits.Mul64(x5, arg1[3]); - x382 = _tuple$180[0]; - x381 = _tuple$180[1]; - x383 = new $Uint64(0, 0); - x384 = new $Uint64(0, 0); - _tuple$181 = bits.Mul64(x5, arg1[2]); - x384 = _tuple$181[0]; - x383 = _tuple$181[1]; - x385 = new $Uint64(0, 0); - x386 = new $Uint64(0, 0); - _tuple$182 = bits.Mul64(x5, arg1[1]); - x386 = _tuple$182[0]; - x385 = _tuple$182[1]; - x387 = new $Uint64(0, 0); - x388 = new $Uint64(0, 0); - _tuple$183 = bits.Mul64(x5, arg1[0]); - x388 = _tuple$183[0]; - x387 = _tuple$183[1]; - x389 = new $Uint64(0, 0); - x390 = new $Uint64(0, 0); - _tuple$184 = bits.Add64(x388, x385, new $Uint64(0, 0)); - x389 = _tuple$184[0]; - x390 = _tuple$184[1]; - x391 = new $Uint64(0, 0); - x392 = new $Uint64(0, 0); - _tuple$185 = bits.Add64(x386, x383, ((x$131 = (new p384Uint1(x390.$high, x390.$low)), new $Uint64(x$131.$high, x$131.$low)))); - x391 = _tuple$185[0]; - x392 = _tuple$185[1]; - x393 = new $Uint64(0, 0); - x394 = new $Uint64(0, 0); - _tuple$186 = bits.Add64(x384, x381, ((x$132 = (new p384Uint1(x392.$high, x392.$low)), new $Uint64(x$132.$high, x$132.$low)))); - x393 = _tuple$186[0]; - x394 = _tuple$186[1]; - x395 = new $Uint64(0, 0); - x396 = new $Uint64(0, 0); - _tuple$187 = bits.Add64(x382, x379, ((x$133 = (new p384Uint1(x394.$high, x394.$low)), new $Uint64(x$133.$high, x$133.$low)))); - x395 = _tuple$187[0]; - x396 = _tuple$187[1]; - x397 = new $Uint64(0, 0); - x398 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x380, x377, ((x$134 = (new p384Uint1(x396.$high, x396.$low)), new $Uint64(x$134.$high, x$134.$low)))); - x397 = _tuple$188[0]; - x398 = _tuple$188[1]; - x399 = (x$135 = ((x$136 = (new p384Uint1(x398.$high, x398.$low)), new $Uint64(x$136.$high, x$136.$low))), new $Uint64(x$135.$high + x378.$high, x$135.$low + x378.$low)); - x400 = new $Uint64(0, 0); - x401 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x364, x387, new $Uint64(0, 0)); - x400 = _tuple$189[0]; - x401 = _tuple$189[1]; - x402 = new $Uint64(0, 0); - x403 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x366, x389, ((x$137 = (new p384Uint1(x401.$high, x401.$low)), new $Uint64(x$137.$high, x$137.$low)))); - x402 = _tuple$190[0]; - x403 = _tuple$190[1]; - x404 = new $Uint64(0, 0); - x405 = new $Uint64(0, 0); - _tuple$191 = bits.Add64(x368, x391, ((x$138 = (new p384Uint1(x403.$high, x403.$low)), new $Uint64(x$138.$high, x$138.$low)))); - x404 = _tuple$191[0]; - x405 = _tuple$191[1]; - x406 = new $Uint64(0, 0); - x407 = new $Uint64(0, 0); - _tuple$192 = bits.Add64(x370, x393, ((x$139 = (new p384Uint1(x405.$high, x405.$low)), new $Uint64(x$139.$high, x$139.$low)))); - x406 = _tuple$192[0]; - x407 = _tuple$192[1]; - x408 = new $Uint64(0, 0); - x409 = new $Uint64(0, 0); - _tuple$193 = bits.Add64(x372, x395, ((x$140 = (new p384Uint1(x407.$high, x407.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x408 = _tuple$193[0]; - x409 = _tuple$193[1]; - x410 = new $Uint64(0, 0); - x411 = new $Uint64(0, 0); - _tuple$194 = bits.Add64(x374, x397, ((x$141 = (new p384Uint1(x409.$high, x409.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x410 = _tuple$194[0]; - x411 = _tuple$194[1]; - x412 = new $Uint64(0, 0); - x413 = new $Uint64(0, 0); - _tuple$195 = bits.Add64(x376, x399, ((x$142 = (new p384Uint1(x411.$high, x411.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x412 = _tuple$195[0]; - x413 = _tuple$195[1]; - x414 = new $Uint64(0, 0); - _tuple$196 = bits.Mul64(x400, new $Uint64(1, 1)); - x414 = _tuple$196[1]; - x416 = new $Uint64(0, 0); - x417 = new $Uint64(0, 0); - _tuple$197 = bits.Mul64(x414, new $Uint64(4294967295, 4294967295)); - x417 = _tuple$197[0]; - x416 = _tuple$197[1]; - x418 = new $Uint64(0, 0); - x419 = new $Uint64(0, 0); - _tuple$198 = bits.Mul64(x414, new $Uint64(4294967295, 4294967295)); - x419 = _tuple$198[0]; - x418 = _tuple$198[1]; - x420 = new $Uint64(0, 0); - x421 = new $Uint64(0, 0); - _tuple$199 = bits.Mul64(x414, new $Uint64(4294967295, 4294967295)); - x421 = _tuple$199[0]; - x420 = _tuple$199[1]; - x422 = new $Uint64(0, 0); - x423 = new $Uint64(0, 0); - _tuple$200 = bits.Mul64(x414, new $Uint64(4294967295, 4294967294)); - x423 = _tuple$200[0]; - x422 = _tuple$200[1]; - x424 = new $Uint64(0, 0); - x425 = new $Uint64(0, 0); - _tuple$201 = bits.Mul64(x414, new $Uint64(4294967295, 0)); - x425 = _tuple$201[0]; - x424 = _tuple$201[1]; - x426 = new $Uint64(0, 0); - x427 = new $Uint64(0, 0); - _tuple$202 = bits.Mul64(x414, new $Uint64(0, 4294967295)); - x427 = _tuple$202[0]; - x426 = _tuple$202[1]; - x428 = new $Uint64(0, 0); - x429 = new $Uint64(0, 0); - _tuple$203 = bits.Add64(x427, x424, new $Uint64(0, 0)); - x428 = _tuple$203[0]; - x429 = _tuple$203[1]; - x430 = new $Uint64(0, 0); - x431 = new $Uint64(0, 0); - _tuple$204 = bits.Add64(x425, x422, ((x$143 = (new p384Uint1(x429.$high, x429.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x430 = _tuple$204[0]; - x431 = _tuple$204[1]; - x432 = new $Uint64(0, 0); - x433 = new $Uint64(0, 0); - _tuple$205 = bits.Add64(x423, x420, ((x$144 = (new p384Uint1(x431.$high, x431.$low)), new $Uint64(x$144.$high, x$144.$low)))); - x432 = _tuple$205[0]; - x433 = _tuple$205[1]; - x434 = new $Uint64(0, 0); - x435 = new $Uint64(0, 0); - _tuple$206 = bits.Add64(x421, x418, ((x$145 = (new p384Uint1(x433.$high, x433.$low)), new $Uint64(x$145.$high, x$145.$low)))); - x434 = _tuple$206[0]; - x435 = _tuple$206[1]; - x436 = new $Uint64(0, 0); - x437 = new $Uint64(0, 0); - _tuple$207 = bits.Add64(x419, x416, ((x$146 = (new p384Uint1(x435.$high, x435.$low)), new $Uint64(x$146.$high, x$146.$low)))); - x436 = _tuple$207[0]; - x437 = _tuple$207[1]; - x438 = (x$147 = ((x$148 = (new p384Uint1(x437.$high, x437.$low)), new $Uint64(x$148.$high, x$148.$low))), new $Uint64(x$147.$high + x417.$high, x$147.$low + x417.$low)); - x440 = new $Uint64(0, 0); - _tuple$208 = bits.Add64(x400, x426, new $Uint64(0, 0)); - x440 = _tuple$208[1]; - x441 = new $Uint64(0, 0); - x442 = new $Uint64(0, 0); - _tuple$209 = bits.Add64(x402, x428, ((x$149 = (new p384Uint1(x440.$high, x440.$low)), new $Uint64(x$149.$high, x$149.$low)))); - x441 = _tuple$209[0]; - x442 = _tuple$209[1]; - x443 = new $Uint64(0, 0); - x444 = new $Uint64(0, 0); - _tuple$210 = bits.Add64(x404, x430, ((x$150 = (new p384Uint1(x442.$high, x442.$low)), new $Uint64(x$150.$high, x$150.$low)))); - x443 = _tuple$210[0]; - x444 = _tuple$210[1]; - x445 = new $Uint64(0, 0); - x446 = new $Uint64(0, 0); - _tuple$211 = bits.Add64(x406, x432, ((x$151 = (new p384Uint1(x444.$high, x444.$low)), new $Uint64(x$151.$high, x$151.$low)))); - x445 = _tuple$211[0]; - x446 = _tuple$211[1]; - x447 = new $Uint64(0, 0); - x448 = new $Uint64(0, 0); - _tuple$212 = bits.Add64(x408, x434, ((x$152 = (new p384Uint1(x446.$high, x446.$low)), new $Uint64(x$152.$high, x$152.$low)))); - x447 = _tuple$212[0]; - x448 = _tuple$212[1]; - x449 = new $Uint64(0, 0); - x450 = new $Uint64(0, 0); - _tuple$213 = bits.Add64(x410, x436, ((x$153 = (new p384Uint1(x448.$high, x448.$low)), new $Uint64(x$153.$high, x$153.$low)))); - x449 = _tuple$213[0]; - x450 = _tuple$213[1]; - x451 = new $Uint64(0, 0); - x452 = new $Uint64(0, 0); - _tuple$214 = bits.Add64(x412, x438, ((x$154 = (new p384Uint1(x450.$high, x450.$low)), new $Uint64(x$154.$high, x$154.$low)))); - x451 = _tuple$214[0]; - x452 = _tuple$214[1]; - x453 = (x$155 = ((x$156 = (new p384Uint1(x452.$high, x452.$low)), new $Uint64(x$156.$high, x$156.$low))), x$157 = ((x$158 = (new p384Uint1(x413.$high, x413.$low)), new $Uint64(x$158.$high, x$158.$low))), new $Uint64(x$155.$high + x$157.$high, x$155.$low + x$157.$low)); - x454 = new $Uint64(0, 0); - x455 = new $Uint64(0, 0); - _tuple$215 = bits.Sub64(x441, new $Uint64(0, 4294967295), new $Uint64(0, 0)); - x454 = _tuple$215[0]; - x455 = _tuple$215[1]; - x456 = new $Uint64(0, 0); - x457 = new $Uint64(0, 0); - _tuple$216 = bits.Sub64(x443, new $Uint64(4294967295, 0), ((x$159 = (new p384Uint1(x455.$high, x455.$low)), new $Uint64(x$159.$high, x$159.$low)))); - x456 = _tuple$216[0]; - x457 = _tuple$216[1]; - x458 = new $Uint64(0, 0); - x459 = new $Uint64(0, 0); - _tuple$217 = bits.Sub64(x445, new $Uint64(4294967295, 4294967294), ((x$160 = (new p384Uint1(x457.$high, x457.$low)), new $Uint64(x$160.$high, x$160.$low)))); - x458 = _tuple$217[0]; - x459 = _tuple$217[1]; - x460 = new $Uint64(0, 0); - x461 = new $Uint64(0, 0); - _tuple$218 = bits.Sub64(x447, new $Uint64(4294967295, 4294967295), ((x$161 = (new p384Uint1(x459.$high, x459.$low)), new $Uint64(x$161.$high, x$161.$low)))); - x460 = _tuple$218[0]; - x461 = _tuple$218[1]; - x462 = new $Uint64(0, 0); - x463 = new $Uint64(0, 0); - _tuple$219 = bits.Sub64(x449, new $Uint64(4294967295, 4294967295), ((x$162 = (new p384Uint1(x461.$high, x461.$low)), new $Uint64(x$162.$high, x$162.$low)))); - x462 = _tuple$219[0]; - x463 = _tuple$219[1]; - x464 = new $Uint64(0, 0); - x465 = new $Uint64(0, 0); - _tuple$220 = bits.Sub64(x451, new $Uint64(4294967295, 4294967295), ((x$163 = (new p384Uint1(x463.$high, x463.$low)), new $Uint64(x$163.$high, x$163.$low)))); - x464 = _tuple$220[0]; - x465 = _tuple$220[1]; - x467 = new $Uint64(0, 0); - _tuple$221 = bits.Sub64(x453, new $Uint64(0, 0), ((x$164 = (new p384Uint1(x465.$high, x465.$low)), new $Uint64(x$164.$high, x$164.$low)))); - x467 = _tuple$221[1]; - x468 = new $Uint64(0, 0); - p384CmovznzU64((x468$24ptr || (x468$24ptr = new ptrType(function() { return x468; }, function($v) { x468 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x454, x441); - x469 = new $Uint64(0, 0); - p384CmovznzU64((x469$24ptr || (x469$24ptr = new ptrType(function() { return x469; }, function($v) { x469 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x456, x443); - x470 = new $Uint64(0, 0); - p384CmovznzU64((x470$24ptr || (x470$24ptr = new ptrType(function() { return x470; }, function($v) { x470 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x458, x445); - x471 = new $Uint64(0, 0); - p384CmovznzU64((x471$24ptr || (x471$24ptr = new ptrType(function() { return x471; }, function($v) { x471 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x460, x447); - x472 = new $Uint64(0, 0); - p384CmovznzU64((x472$24ptr || (x472$24ptr = new ptrType(function() { return x472; }, function($v) { x472 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x462, x449); - x473 = new $Uint64(0, 0); - p384CmovznzU64((x473$24ptr || (x473$24ptr = new ptrType(function() { return x473; }, function($v) { x473 = $v; }))), (new p384Uint1(x467.$high, x467.$low)), x464, x451); - out1.nilCheck, out1[0] = x468; - out1.nilCheck, out1[1] = x469; - out1.nilCheck, out1[2] = x470; - out1.nilCheck, out1[3] = x471; - out1.nilCheck, out1[4] = x472; - out1.nilCheck, out1[5] = x473; - }; - p384Add = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, arg1, arg2, out1, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x26, x27, x27$24ptr, x28, x28$24ptr, x29, x29$24ptr, x3, x30, x30$24ptr, x31, x31$24ptr, x32, x32$24ptr, x4, x5, x6, x7, x8, x9; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Add64(arg1[0], arg2[0], new $Uint64(0, 0)); - x1 = _tuple[0]; - x2 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Add64(arg1[1], arg2[1], ((x = (new p384Uint1(x2.$high, x2.$low)), new $Uint64(x.$high, x.$low)))); - x3 = _tuple$1[0]; - x4 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Add64(arg1[2], arg2[2], ((x$1 = (new p384Uint1(x4.$high, x4.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Add64(arg1[3], arg2[3], ((x$2 = (new p384Uint1(x6.$high, x6.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x7 = _tuple$3[0]; - x8 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(arg1[4], arg2[4], ((x$3 = (new p384Uint1(x8.$high, x8.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x9 = _tuple$4[0]; - x10 = _tuple$4[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(arg1[5], arg2[5], ((x$4 = (new p384Uint1(x10.$high, x10.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x11 = _tuple$5[0]; - x12 = _tuple$5[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$6 = bits.Sub64(x1, new $Uint64(0, 4294967295), new $Uint64(0, 0)); - x13 = _tuple$6[0]; - x14 = _tuple$6[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$7 = bits.Sub64(x3, new $Uint64(4294967295, 0), ((x$5 = (new p384Uint1(x14.$high, x14.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x15 = _tuple$7[0]; - x16 = _tuple$7[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$8 = bits.Sub64(x5, new $Uint64(4294967295, 4294967294), ((x$6 = (new p384Uint1(x16.$high, x16.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x17 = _tuple$8[0]; - x18 = _tuple$8[1]; - x19 = new $Uint64(0, 0); - x20 = new $Uint64(0, 0); - _tuple$9 = bits.Sub64(x7, new $Uint64(4294967295, 4294967295), ((x$7 = (new p384Uint1(x18.$high, x18.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x19 = _tuple$9[0]; - x20 = _tuple$9[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$10 = bits.Sub64(x9, new $Uint64(4294967295, 4294967295), ((x$8 = (new p384Uint1(x20.$high, x20.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x21 = _tuple$10[0]; - x22 = _tuple$10[1]; - x23 = new $Uint64(0, 0); - x24 = new $Uint64(0, 0); - _tuple$11 = bits.Sub64(x11, new $Uint64(4294967295, 4294967295), ((x$9 = (new p384Uint1(x22.$high, x22.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x23 = _tuple$11[0]; - x24 = _tuple$11[1]; - x26 = new $Uint64(0, 0); - _tuple$12 = bits.Sub64(((x$10 = (new p384Uint1(x12.$high, x12.$low)), new $Uint64(x$10.$high, x$10.$low))), new $Uint64(0, 0), ((x$11 = (new p384Uint1(x24.$high, x24.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x26 = _tuple$12[1]; - x27 = new $Uint64(0, 0); - p384CmovznzU64((x27$24ptr || (x27$24ptr = new ptrType(function() { return x27; }, function($v) { x27 = $v; }))), (new p384Uint1(x26.$high, x26.$low)), x13, x1); - x28 = new $Uint64(0, 0); - p384CmovznzU64((x28$24ptr || (x28$24ptr = new ptrType(function() { return x28; }, function($v) { x28 = $v; }))), (new p384Uint1(x26.$high, x26.$low)), x15, x3); - x29 = new $Uint64(0, 0); - p384CmovznzU64((x29$24ptr || (x29$24ptr = new ptrType(function() { return x29; }, function($v) { x29 = $v; }))), (new p384Uint1(x26.$high, x26.$low)), x17, x5); - x30 = new $Uint64(0, 0); - p384CmovznzU64((x30$24ptr || (x30$24ptr = new ptrType(function() { return x30; }, function($v) { x30 = $v; }))), (new p384Uint1(x26.$high, x26.$low)), x19, x7); - x31 = new $Uint64(0, 0); - p384CmovznzU64((x31$24ptr || (x31$24ptr = new ptrType(function() { return x31; }, function($v) { x31 = $v; }))), (new p384Uint1(x26.$high, x26.$low)), x21, x9); - x32 = new $Uint64(0, 0); - p384CmovznzU64((x32$24ptr || (x32$24ptr = new ptrType(function() { return x32; }, function($v) { x32 = $v; }))), (new p384Uint1(x26.$high, x26.$low)), x23, x11); - out1.nilCheck, out1[0] = x27; - out1.nilCheck, out1[1] = x28; - out1.nilCheck, out1[2] = x29; - out1.nilCheck, out1[3] = x30; - out1.nilCheck, out1[4] = x31; - out1.nilCheck, out1[5] = x32; - }; - p384Sub = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, arg1, arg2, out1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, x1, x10, x11, x12, x13, x13$24ptr, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x3, x4, x5, x6, x7, x8, x9; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Sub64(arg1[0], arg2[0], new $Uint64(0, 0)); - x1 = _tuple[0]; - x2 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Sub64(arg1[1], arg2[1], ((x = (new p384Uint1(x2.$high, x2.$low)), new $Uint64(x.$high, x.$low)))); - x3 = _tuple$1[0]; - x4 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Sub64(arg1[2], arg2[2], ((x$1 = (new p384Uint1(x4.$high, x4.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Sub64(arg1[3], arg2[3], ((x$2 = (new p384Uint1(x6.$high, x6.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x7 = _tuple$3[0]; - x8 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$4 = bits.Sub64(arg1[4], arg2[4], ((x$3 = (new p384Uint1(x8.$high, x8.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x9 = _tuple$4[0]; - x10 = _tuple$4[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$5 = bits.Sub64(arg1[5], arg2[5], ((x$4 = (new p384Uint1(x10.$high, x10.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x11 = _tuple$5[0]; - x12 = _tuple$5[1]; - x13 = new $Uint64(0, 0); - p384CmovznzU64((x13$24ptr || (x13$24ptr = new ptrType(function() { return x13; }, function($v) { x13 = $v; }))), (new p384Uint1(x12.$high, x12.$low)), new $Uint64(0, 0), new $Uint64(4294967295, 4294967295)); - x14 = new $Uint64(0, 0); - x15 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x1, new $Uint64(x13.$high & 0, (x13.$low & 4294967295) >>> 0), new $Uint64(0, 0)); - x14 = _tuple$6[0]; - x15 = _tuple$6[1]; - x16 = new $Uint64(0, 0); - x17 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(x3, new $Uint64(x13.$high & 4294967295, (x13.$low & 0) >>> 0), ((x$5 = (new p384Uint1(x15.$high, x15.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x16 = _tuple$7[0]; - x17 = _tuple$7[1]; - x18 = new $Uint64(0, 0); - x19 = new $Uint64(0, 0); - _tuple$8 = bits.Add64(x5, new $Uint64(x13.$high & 4294967295, (x13.$low & 4294967294) >>> 0), ((x$6 = (new p384Uint1(x17.$high, x17.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x18 = _tuple$8[0]; - x19 = _tuple$8[1]; - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x7, x13, ((x$7 = (new p384Uint1(x19.$high, x19.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x20 = _tuple$9[0]; - x21 = _tuple$9[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x9, x13, ((x$8 = (new p384Uint1(x21.$high, x21.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x22 = _tuple$10[0]; - x23 = _tuple$10[1]; - x24 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x11, x13, ((x$9 = (new p384Uint1(x23.$high, x23.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x24 = _tuple$11[0]; - out1.nilCheck, out1[0] = x14; - out1.nilCheck, out1[1] = x16; - out1.nilCheck, out1[2] = x18; - out1.nilCheck, out1[3] = x20; - out1.nilCheck, out1[4] = x22; - out1.nilCheck, out1[5] = x24; - }; - p384SetOne = function(out1) { - var out1; - out1.nilCheck, out1[0] = new $Uint64(4294967295, 1); - out1.nilCheck, out1[1] = new $Uint64(0, 4294967295); - out1.nilCheck, out1[2] = new $Uint64(0, 1); - out1.nilCheck, out1[3] = new $Uint64(0, 0); - out1.nilCheck, out1[4] = new $Uint64(0, 0); - out1.nilCheck, out1[5] = new $Uint64(0, 0); - }; - p384FromMontgomery = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x101, x102, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x177, x178, x179, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x204, x205, x206, x207, x208, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x222, x223, x224, x225, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x24, x240, x241, x242, x243, x244, x245, x246, x247, x248, x249, x25, x250, x251, x252, x254, x255, x256, x257, x258, x259, x260, x261, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x277, x278, x279, x28, x280, x281, x282, x283, x284, x285, x286, x287, x288, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x30, x300, x301, x303, x304, x304$24ptr, x305, x305$24ptr, x306, x306$24ptr, x307, x307$24ptr, x308, x308$24ptr, x309, x309$24ptr, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[0]; - x2 = new $Uint64(0, 0); - _tuple = bits.Mul64(x1, new $Uint64(1, 1)); - x2 = _tuple[1]; - x4 = new $Uint64(0, 0); - x5 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x2, new $Uint64(4294967295, 4294967295)); - x5 = _tuple$1[0]; - x4 = _tuple$1[1]; - x6 = new $Uint64(0, 0); - x7 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x2, new $Uint64(4294967295, 4294967295)); - x7 = _tuple$2[0]; - x6 = _tuple$2[1]; - x8 = new $Uint64(0, 0); - x9 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x2, new $Uint64(4294967295, 4294967295)); - x9 = _tuple$3[0]; - x8 = _tuple$3[1]; - x10 = new $Uint64(0, 0); - x11 = new $Uint64(0, 0); - _tuple$4 = bits.Mul64(x2, new $Uint64(4294967295, 4294967294)); - x11 = _tuple$4[0]; - x10 = _tuple$4[1]; - x12 = new $Uint64(0, 0); - x13 = new $Uint64(0, 0); - _tuple$5 = bits.Mul64(x2, new $Uint64(4294967295, 0)); - x13 = _tuple$5[0]; - x12 = _tuple$5[1]; - x14 = new $Uint64(0, 0); - x15 = new $Uint64(0, 0); - _tuple$6 = bits.Mul64(x2, new $Uint64(0, 4294967295)); - x15 = _tuple$6[0]; - x14 = _tuple$6[1]; - x16 = new $Uint64(0, 0); - x17 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(x15, x12, new $Uint64(0, 0)); - x16 = _tuple$7[0]; - x17 = _tuple$7[1]; - x18 = new $Uint64(0, 0); - x19 = new $Uint64(0, 0); - _tuple$8 = bits.Add64(x13, x10, ((x = (new p384Uint1(x17.$high, x17.$low)), new $Uint64(x.$high, x.$low)))); - x18 = _tuple$8[0]; - x19 = _tuple$8[1]; - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(x11, x8, ((x$1 = (new p384Uint1(x19.$high, x19.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x20 = _tuple$9[0]; - x21 = _tuple$9[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x9, x6, ((x$2 = (new p384Uint1(x21.$high, x21.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x22 = _tuple$10[0]; - x23 = _tuple$10[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x7, x4, ((x$3 = (new p384Uint1(x23.$high, x23.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x24 = _tuple$11[0]; - x25 = _tuple$11[1]; - x27 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x1, x14, new $Uint64(0, 0)); - x27 = _tuple$12[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(new $Uint64(0, 0), x16, ((x$4 = (new p384Uint1(x27.$high, x27.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x28 = _tuple$13[0]; - x29 = _tuple$13[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(new $Uint64(0, 0), x18, ((x$5 = (new p384Uint1(x29.$high, x29.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x30 = _tuple$14[0]; - x31 = _tuple$14[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(new $Uint64(0, 0), x20, ((x$6 = (new p384Uint1(x31.$high, x31.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x32 = _tuple$15[0]; - x33 = _tuple$15[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(new $Uint64(0, 0), x22, ((x$7 = (new p384Uint1(x33.$high, x33.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x34 = _tuple$16[0]; - x35 = _tuple$16[1]; - x36 = new $Uint64(0, 0); - x37 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(new $Uint64(0, 0), x24, ((x$8 = (new p384Uint1(x35.$high, x35.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x36 = _tuple$17[0]; - x37 = _tuple$17[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(new $Uint64(0, 0), (x$9 = ((x$10 = (new p384Uint1(x25.$high, x25.$low)), new $Uint64(x$10.$high, x$10.$low))), new $Uint64(x$9.$high + x5.$high, x$9.$low + x5.$low)), ((x$11 = (new p384Uint1(x37.$high, x37.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x38 = _tuple$18[0]; - x39 = _tuple$18[1]; - x40 = new $Uint64(0, 0); - x41 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(x28, arg1[1], new $Uint64(0, 0)); - x40 = _tuple$19[0]; - x41 = _tuple$19[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(x30, new $Uint64(0, 0), ((x$12 = (new p384Uint1(x41.$high, x41.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x42 = _tuple$20[0]; - x43 = _tuple$20[1]; - x44 = new $Uint64(0, 0); - x45 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x32, new $Uint64(0, 0), ((x$13 = (new p384Uint1(x43.$high, x43.$low)), new $Uint64(x$13.$high, x$13.$low)))); - x44 = _tuple$21[0]; - x45 = _tuple$21[1]; - x46 = new $Uint64(0, 0); - x47 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x34, new $Uint64(0, 0), ((x$14 = (new p384Uint1(x45.$high, x45.$low)), new $Uint64(x$14.$high, x$14.$low)))); - x46 = _tuple$22[0]; - x47 = _tuple$22[1]; - x48 = new $Uint64(0, 0); - x49 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x36, new $Uint64(0, 0), ((x$15 = (new p384Uint1(x47.$high, x47.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x48 = _tuple$23[0]; - x49 = _tuple$23[1]; - x50 = new $Uint64(0, 0); - x51 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x38, new $Uint64(0, 0), ((x$16 = (new p384Uint1(x49.$high, x49.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x50 = _tuple$24[0]; - x51 = _tuple$24[1]; - x52 = new $Uint64(0, 0); - _tuple$25 = bits.Mul64(x40, new $Uint64(1, 1)); - x52 = _tuple$25[1]; - x54 = new $Uint64(0, 0); - x55 = new $Uint64(0, 0); - _tuple$26 = bits.Mul64(x52, new $Uint64(4294967295, 4294967295)); - x55 = _tuple$26[0]; - x54 = _tuple$26[1]; - x56 = new $Uint64(0, 0); - x57 = new $Uint64(0, 0); - _tuple$27 = bits.Mul64(x52, new $Uint64(4294967295, 4294967295)); - x57 = _tuple$27[0]; - x56 = _tuple$27[1]; - x58 = new $Uint64(0, 0); - x59 = new $Uint64(0, 0); - _tuple$28 = bits.Mul64(x52, new $Uint64(4294967295, 4294967295)); - x59 = _tuple$28[0]; - x58 = _tuple$28[1]; - x60 = new $Uint64(0, 0); - x61 = new $Uint64(0, 0); - _tuple$29 = bits.Mul64(x52, new $Uint64(4294967295, 4294967294)); - x61 = _tuple$29[0]; - x60 = _tuple$29[1]; - x62 = new $Uint64(0, 0); - x63 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x52, new $Uint64(4294967295, 0)); - x63 = _tuple$30[0]; - x62 = _tuple$30[1]; - x64 = new $Uint64(0, 0); - x65 = new $Uint64(0, 0); - _tuple$31 = bits.Mul64(x52, new $Uint64(0, 4294967295)); - x65 = _tuple$31[0]; - x64 = _tuple$31[1]; - x66 = new $Uint64(0, 0); - x67 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x65, x62, new $Uint64(0, 0)); - x66 = _tuple$32[0]; - x67 = _tuple$32[1]; - x68 = new $Uint64(0, 0); - x69 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x63, x60, ((x$17 = (new p384Uint1(x67.$high, x67.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x68 = _tuple$33[0]; - x69 = _tuple$33[1]; - x70 = new $Uint64(0, 0); - x71 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x61, x58, ((x$18 = (new p384Uint1(x69.$high, x69.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x70 = _tuple$34[0]; - x71 = _tuple$34[1]; - x72 = new $Uint64(0, 0); - x73 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x59, x56, ((x$19 = (new p384Uint1(x71.$high, x71.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x72 = _tuple$35[0]; - x73 = _tuple$35[1]; - x74 = new $Uint64(0, 0); - x75 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x57, x54, ((x$20 = (new p384Uint1(x73.$high, x73.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x74 = _tuple$36[0]; - x75 = _tuple$36[1]; - x77 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x40, x64, new $Uint64(0, 0)); - x77 = _tuple$37[1]; - x78 = new $Uint64(0, 0); - x79 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x42, x66, ((x$21 = (new p384Uint1(x77.$high, x77.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x78 = _tuple$38[0]; - x79 = _tuple$38[1]; - x80 = new $Uint64(0, 0); - x81 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x44, x68, ((x$22 = (new p384Uint1(x79.$high, x79.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x80 = _tuple$39[0]; - x81 = _tuple$39[1]; - x82 = new $Uint64(0, 0); - x83 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x46, x70, ((x$23 = (new p384Uint1(x81.$high, x81.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x82 = _tuple$40[0]; - x83 = _tuple$40[1]; - x84 = new $Uint64(0, 0); - x85 = new $Uint64(0, 0); - _tuple$41 = bits.Add64(x48, x72, ((x$24 = (new p384Uint1(x83.$high, x83.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x84 = _tuple$41[0]; - x85 = _tuple$41[1]; - x86 = new $Uint64(0, 0); - x87 = new $Uint64(0, 0); - _tuple$42 = bits.Add64(x50, x74, ((x$25 = (new p384Uint1(x85.$high, x85.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x86 = _tuple$42[0]; - x87 = _tuple$42[1]; - x88 = new $Uint64(0, 0); - x89 = new $Uint64(0, 0); - _tuple$43 = bits.Add64((x$26 = ((x$27 = (new p384Uint1(x51.$high, x51.$low)), new $Uint64(x$27.$high, x$27.$low))), x$28 = ((x$29 = (new p384Uint1(x39.$high, x39.$low)), new $Uint64(x$29.$high, x$29.$low))), new $Uint64(x$26.$high + x$28.$high, x$26.$low + x$28.$low)), (x$30 = ((x$31 = (new p384Uint1(x75.$high, x75.$low)), new $Uint64(x$31.$high, x$31.$low))), new $Uint64(x$30.$high + x55.$high, x$30.$low + x55.$low)), ((x$32 = (new p384Uint1(x87.$high, x87.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x88 = _tuple$43[0]; - x89 = _tuple$43[1]; - x90 = new $Uint64(0, 0); - x91 = new $Uint64(0, 0); - _tuple$44 = bits.Add64(x78, arg1[2], new $Uint64(0, 0)); - x90 = _tuple$44[0]; - x91 = _tuple$44[1]; - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x80, new $Uint64(0, 0), ((x$33 = (new p384Uint1(x91.$high, x91.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x92 = _tuple$45[0]; - x93 = _tuple$45[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x82, new $Uint64(0, 0), ((x$34 = (new p384Uint1(x93.$high, x93.$low)), new $Uint64(x$34.$high, x$34.$low)))); - x94 = _tuple$46[0]; - x95 = _tuple$46[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x84, new $Uint64(0, 0), ((x$35 = (new p384Uint1(x95.$high, x95.$low)), new $Uint64(x$35.$high, x$35.$low)))); - x96 = _tuple$47[0]; - x97 = _tuple$47[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$48 = bits.Add64(x86, new $Uint64(0, 0), ((x$36 = (new p384Uint1(x97.$high, x97.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x98 = _tuple$48[0]; - x99 = _tuple$48[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$49 = bits.Add64(x88, new $Uint64(0, 0), ((x$37 = (new p384Uint1(x99.$high, x99.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x100 = _tuple$49[0]; - x101 = _tuple$49[1]; - x102 = new $Uint64(0, 0); - _tuple$50 = bits.Mul64(x90, new $Uint64(1, 1)); - x102 = _tuple$50[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$51 = bits.Mul64(x102, new $Uint64(4294967295, 4294967295)); - x105 = _tuple$51[0]; - x104 = _tuple$51[1]; - x106 = new $Uint64(0, 0); - x107 = new $Uint64(0, 0); - _tuple$52 = bits.Mul64(x102, new $Uint64(4294967295, 4294967295)); - x107 = _tuple$52[0]; - x106 = _tuple$52[1]; - x108 = new $Uint64(0, 0); - x109 = new $Uint64(0, 0); - _tuple$53 = bits.Mul64(x102, new $Uint64(4294967295, 4294967295)); - x109 = _tuple$53[0]; - x108 = _tuple$53[1]; - x110 = new $Uint64(0, 0); - x111 = new $Uint64(0, 0); - _tuple$54 = bits.Mul64(x102, new $Uint64(4294967295, 4294967294)); - x111 = _tuple$54[0]; - x110 = _tuple$54[1]; - x112 = new $Uint64(0, 0); - x113 = new $Uint64(0, 0); - _tuple$55 = bits.Mul64(x102, new $Uint64(4294967295, 0)); - x113 = _tuple$55[0]; - x112 = _tuple$55[1]; - x114 = new $Uint64(0, 0); - x115 = new $Uint64(0, 0); - _tuple$56 = bits.Mul64(x102, new $Uint64(0, 4294967295)); - x115 = _tuple$56[0]; - x114 = _tuple$56[1]; - x116 = new $Uint64(0, 0); - x117 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x115, x112, new $Uint64(0, 0)); - x116 = _tuple$57[0]; - x117 = _tuple$57[1]; - x118 = new $Uint64(0, 0); - x119 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x113, x110, ((x$38 = (new p384Uint1(x117.$high, x117.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x118 = _tuple$58[0]; - x119 = _tuple$58[1]; - x120 = new $Uint64(0, 0); - x121 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x111, x108, ((x$39 = (new p384Uint1(x119.$high, x119.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x120 = _tuple$59[0]; - x121 = _tuple$59[1]; - x122 = new $Uint64(0, 0); - x123 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x109, x106, ((x$40 = (new p384Uint1(x121.$high, x121.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x122 = _tuple$60[0]; - x123 = _tuple$60[1]; - x124 = new $Uint64(0, 0); - x125 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x107, x104, ((x$41 = (new p384Uint1(x123.$high, x123.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x124 = _tuple$61[0]; - x125 = _tuple$61[1]; - x127 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x90, x114, new $Uint64(0, 0)); - x127 = _tuple$62[1]; - x128 = new $Uint64(0, 0); - x129 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x92, x116, ((x$42 = (new p384Uint1(x127.$high, x127.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x128 = _tuple$63[0]; - x129 = _tuple$63[1]; - x130 = new $Uint64(0, 0); - x131 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x94, x118, ((x$43 = (new p384Uint1(x129.$high, x129.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x130 = _tuple$64[0]; - x131 = _tuple$64[1]; - x132 = new $Uint64(0, 0); - x133 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x96, x120, ((x$44 = (new p384Uint1(x131.$high, x131.$low)), new $Uint64(x$44.$high, x$44.$low)))); - x132 = _tuple$65[0]; - x133 = _tuple$65[1]; - x134 = new $Uint64(0, 0); - x135 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x98, x122, ((x$45 = (new p384Uint1(x133.$high, x133.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x134 = _tuple$66[0]; - x135 = _tuple$66[1]; - x136 = new $Uint64(0, 0); - x137 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x100, x124, ((x$46 = (new p384Uint1(x135.$high, x135.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x136 = _tuple$67[0]; - x137 = _tuple$67[1]; - x138 = new $Uint64(0, 0); - x139 = new $Uint64(0, 0); - _tuple$68 = bits.Add64((x$47 = ((x$48 = (new p384Uint1(x101.$high, x101.$low)), new $Uint64(x$48.$high, x$48.$low))), x$49 = ((x$50 = (new p384Uint1(x89.$high, x89.$low)), new $Uint64(x$50.$high, x$50.$low))), new $Uint64(x$47.$high + x$49.$high, x$47.$low + x$49.$low)), (x$51 = ((x$52 = (new p384Uint1(x125.$high, x125.$low)), new $Uint64(x$52.$high, x$52.$low))), new $Uint64(x$51.$high + x105.$high, x$51.$low + x105.$low)), ((x$53 = (new p384Uint1(x137.$high, x137.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x138 = _tuple$68[0]; - x139 = _tuple$68[1]; - x140 = new $Uint64(0, 0); - x141 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x128, arg1[3], new $Uint64(0, 0)); - x140 = _tuple$69[0]; - x141 = _tuple$69[1]; - x142 = new $Uint64(0, 0); - x143 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(x130, new $Uint64(0, 0), ((x$54 = (new p384Uint1(x141.$high, x141.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x142 = _tuple$70[0]; - x143 = _tuple$70[1]; - x144 = new $Uint64(0, 0); - x145 = new $Uint64(0, 0); - _tuple$71 = bits.Add64(x132, new $Uint64(0, 0), ((x$55 = (new p384Uint1(x143.$high, x143.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x144 = _tuple$71[0]; - x145 = _tuple$71[1]; - x146 = new $Uint64(0, 0); - x147 = new $Uint64(0, 0); - _tuple$72 = bits.Add64(x134, new $Uint64(0, 0), ((x$56 = (new p384Uint1(x145.$high, x145.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x146 = _tuple$72[0]; - x147 = _tuple$72[1]; - x148 = new $Uint64(0, 0); - x149 = new $Uint64(0, 0); - _tuple$73 = bits.Add64(x136, new $Uint64(0, 0), ((x$57 = (new p384Uint1(x147.$high, x147.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x148 = _tuple$73[0]; - x149 = _tuple$73[1]; - x150 = new $Uint64(0, 0); - x151 = new $Uint64(0, 0); - _tuple$74 = bits.Add64(x138, new $Uint64(0, 0), ((x$58 = (new p384Uint1(x149.$high, x149.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x150 = _tuple$74[0]; - x151 = _tuple$74[1]; - x152 = new $Uint64(0, 0); - _tuple$75 = bits.Mul64(x140, new $Uint64(1, 1)); - x152 = _tuple$75[1]; - x154 = new $Uint64(0, 0); - x155 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x152, new $Uint64(4294967295, 4294967295)); - x155 = _tuple$76[0]; - x154 = _tuple$76[1]; - x156 = new $Uint64(0, 0); - x157 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x152, new $Uint64(4294967295, 4294967295)); - x157 = _tuple$77[0]; - x156 = _tuple$77[1]; - x158 = new $Uint64(0, 0); - x159 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x152, new $Uint64(4294967295, 4294967295)); - x159 = _tuple$78[0]; - x158 = _tuple$78[1]; - x160 = new $Uint64(0, 0); - x161 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x152, new $Uint64(4294967295, 4294967294)); - x161 = _tuple$79[0]; - x160 = _tuple$79[1]; - x162 = new $Uint64(0, 0); - x163 = new $Uint64(0, 0); - _tuple$80 = bits.Mul64(x152, new $Uint64(4294967295, 0)); - x163 = _tuple$80[0]; - x162 = _tuple$80[1]; - x164 = new $Uint64(0, 0); - x165 = new $Uint64(0, 0); - _tuple$81 = bits.Mul64(x152, new $Uint64(0, 4294967295)); - x165 = _tuple$81[0]; - x164 = _tuple$81[1]; - x166 = new $Uint64(0, 0); - x167 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x165, x162, new $Uint64(0, 0)); - x166 = _tuple$82[0]; - x167 = _tuple$82[1]; - x168 = new $Uint64(0, 0); - x169 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x163, x160, ((x$59 = (new p384Uint1(x167.$high, x167.$low)), new $Uint64(x$59.$high, x$59.$low)))); - x168 = _tuple$83[0]; - x169 = _tuple$83[1]; - x170 = new $Uint64(0, 0); - x171 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x161, x158, ((x$60 = (new p384Uint1(x169.$high, x169.$low)), new $Uint64(x$60.$high, x$60.$low)))); - x170 = _tuple$84[0]; - x171 = _tuple$84[1]; - x172 = new $Uint64(0, 0); - x173 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x159, x156, ((x$61 = (new p384Uint1(x171.$high, x171.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x172 = _tuple$85[0]; - x173 = _tuple$85[1]; - x174 = new $Uint64(0, 0); - x175 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x157, x154, ((x$62 = (new p384Uint1(x173.$high, x173.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x174 = _tuple$86[0]; - x175 = _tuple$86[1]; - x177 = new $Uint64(0, 0); - _tuple$87 = bits.Add64(x140, x164, new $Uint64(0, 0)); - x177 = _tuple$87[1]; - x178 = new $Uint64(0, 0); - x179 = new $Uint64(0, 0); - _tuple$88 = bits.Add64(x142, x166, ((x$63 = (new p384Uint1(x177.$high, x177.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x178 = _tuple$88[0]; - x179 = _tuple$88[1]; - x180 = new $Uint64(0, 0); - x181 = new $Uint64(0, 0); - _tuple$89 = bits.Add64(x144, x168, ((x$64 = (new p384Uint1(x179.$high, x179.$low)), new $Uint64(x$64.$high, x$64.$low)))); - x180 = _tuple$89[0]; - x181 = _tuple$89[1]; - x182 = new $Uint64(0, 0); - x183 = new $Uint64(0, 0); - _tuple$90 = bits.Add64(x146, x170, ((x$65 = (new p384Uint1(x181.$high, x181.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x182 = _tuple$90[0]; - x183 = _tuple$90[1]; - x184 = new $Uint64(0, 0); - x185 = new $Uint64(0, 0); - _tuple$91 = bits.Add64(x148, x172, ((x$66 = (new p384Uint1(x183.$high, x183.$low)), new $Uint64(x$66.$high, x$66.$low)))); - x184 = _tuple$91[0]; - x185 = _tuple$91[1]; - x186 = new $Uint64(0, 0); - x187 = new $Uint64(0, 0); - _tuple$92 = bits.Add64(x150, x174, ((x$67 = (new p384Uint1(x185.$high, x185.$low)), new $Uint64(x$67.$high, x$67.$low)))); - x186 = _tuple$92[0]; - x187 = _tuple$92[1]; - x188 = new $Uint64(0, 0); - x189 = new $Uint64(0, 0); - _tuple$93 = bits.Add64((x$68 = ((x$69 = (new p384Uint1(x151.$high, x151.$low)), new $Uint64(x$69.$high, x$69.$low))), x$70 = ((x$71 = (new p384Uint1(x139.$high, x139.$low)), new $Uint64(x$71.$high, x$71.$low))), new $Uint64(x$68.$high + x$70.$high, x$68.$low + x$70.$low)), (x$72 = ((x$73 = (new p384Uint1(x175.$high, x175.$low)), new $Uint64(x$73.$high, x$73.$low))), new $Uint64(x$72.$high + x155.$high, x$72.$low + x155.$low)), ((x$74 = (new p384Uint1(x187.$high, x187.$low)), new $Uint64(x$74.$high, x$74.$low)))); - x188 = _tuple$93[0]; - x189 = _tuple$93[1]; - x190 = new $Uint64(0, 0); - x191 = new $Uint64(0, 0); - _tuple$94 = bits.Add64(x178, arg1[4], new $Uint64(0, 0)); - x190 = _tuple$94[0]; - x191 = _tuple$94[1]; - x192 = new $Uint64(0, 0); - x193 = new $Uint64(0, 0); - _tuple$95 = bits.Add64(x180, new $Uint64(0, 0), ((x$75 = (new p384Uint1(x191.$high, x191.$low)), new $Uint64(x$75.$high, x$75.$low)))); - x192 = _tuple$95[0]; - x193 = _tuple$95[1]; - x194 = new $Uint64(0, 0); - x195 = new $Uint64(0, 0); - _tuple$96 = bits.Add64(x182, new $Uint64(0, 0), ((x$76 = (new p384Uint1(x193.$high, x193.$low)), new $Uint64(x$76.$high, x$76.$low)))); - x194 = _tuple$96[0]; - x195 = _tuple$96[1]; - x196 = new $Uint64(0, 0); - x197 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x184, new $Uint64(0, 0), ((x$77 = (new p384Uint1(x195.$high, x195.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x196 = _tuple$97[0]; - x197 = _tuple$97[1]; - x198 = new $Uint64(0, 0); - x199 = new $Uint64(0, 0); - _tuple$98 = bits.Add64(x186, new $Uint64(0, 0), ((x$78 = (new p384Uint1(x197.$high, x197.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x198 = _tuple$98[0]; - x199 = _tuple$98[1]; - x200 = new $Uint64(0, 0); - x201 = new $Uint64(0, 0); - _tuple$99 = bits.Add64(x188, new $Uint64(0, 0), ((x$79 = (new p384Uint1(x199.$high, x199.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x200 = _tuple$99[0]; - x201 = _tuple$99[1]; - x202 = new $Uint64(0, 0); - _tuple$100 = bits.Mul64(x190, new $Uint64(1, 1)); - x202 = _tuple$100[1]; - x204 = new $Uint64(0, 0); - x205 = new $Uint64(0, 0); - _tuple$101 = bits.Mul64(x202, new $Uint64(4294967295, 4294967295)); - x205 = _tuple$101[0]; - x204 = _tuple$101[1]; - x206 = new $Uint64(0, 0); - x207 = new $Uint64(0, 0); - _tuple$102 = bits.Mul64(x202, new $Uint64(4294967295, 4294967295)); - x207 = _tuple$102[0]; - x206 = _tuple$102[1]; - x208 = new $Uint64(0, 0); - x209 = new $Uint64(0, 0); - _tuple$103 = bits.Mul64(x202, new $Uint64(4294967295, 4294967295)); - x209 = _tuple$103[0]; - x208 = _tuple$103[1]; - x210 = new $Uint64(0, 0); - x211 = new $Uint64(0, 0); - _tuple$104 = bits.Mul64(x202, new $Uint64(4294967295, 4294967294)); - x211 = _tuple$104[0]; - x210 = _tuple$104[1]; - x212 = new $Uint64(0, 0); - x213 = new $Uint64(0, 0); - _tuple$105 = bits.Mul64(x202, new $Uint64(4294967295, 0)); - x213 = _tuple$105[0]; - x212 = _tuple$105[1]; - x214 = new $Uint64(0, 0); - x215 = new $Uint64(0, 0); - _tuple$106 = bits.Mul64(x202, new $Uint64(0, 4294967295)); - x215 = _tuple$106[0]; - x214 = _tuple$106[1]; - x216 = new $Uint64(0, 0); - x217 = new $Uint64(0, 0); - _tuple$107 = bits.Add64(x215, x212, new $Uint64(0, 0)); - x216 = _tuple$107[0]; - x217 = _tuple$107[1]; - x218 = new $Uint64(0, 0); - x219 = new $Uint64(0, 0); - _tuple$108 = bits.Add64(x213, x210, ((x$80 = (new p384Uint1(x217.$high, x217.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x218 = _tuple$108[0]; - x219 = _tuple$108[1]; - x220 = new $Uint64(0, 0); - x221 = new $Uint64(0, 0); - _tuple$109 = bits.Add64(x211, x208, ((x$81 = (new p384Uint1(x219.$high, x219.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x220 = _tuple$109[0]; - x221 = _tuple$109[1]; - x222 = new $Uint64(0, 0); - x223 = new $Uint64(0, 0); - _tuple$110 = bits.Add64(x209, x206, ((x$82 = (new p384Uint1(x221.$high, x221.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x222 = _tuple$110[0]; - x223 = _tuple$110[1]; - x224 = new $Uint64(0, 0); - x225 = new $Uint64(0, 0); - _tuple$111 = bits.Add64(x207, x204, ((x$83 = (new p384Uint1(x223.$high, x223.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x224 = _tuple$111[0]; - x225 = _tuple$111[1]; - x227 = new $Uint64(0, 0); - _tuple$112 = bits.Add64(x190, x214, new $Uint64(0, 0)); - x227 = _tuple$112[1]; - x228 = new $Uint64(0, 0); - x229 = new $Uint64(0, 0); - _tuple$113 = bits.Add64(x192, x216, ((x$84 = (new p384Uint1(x227.$high, x227.$low)), new $Uint64(x$84.$high, x$84.$low)))); - x228 = _tuple$113[0]; - x229 = _tuple$113[1]; - x230 = new $Uint64(0, 0); - x231 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x194, x218, ((x$85 = (new p384Uint1(x229.$high, x229.$low)), new $Uint64(x$85.$high, x$85.$low)))); - x230 = _tuple$114[0]; - x231 = _tuple$114[1]; - x232 = new $Uint64(0, 0); - x233 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x196, x220, ((x$86 = (new p384Uint1(x231.$high, x231.$low)), new $Uint64(x$86.$high, x$86.$low)))); - x232 = _tuple$115[0]; - x233 = _tuple$115[1]; - x234 = new $Uint64(0, 0); - x235 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x198, x222, ((x$87 = (new p384Uint1(x233.$high, x233.$low)), new $Uint64(x$87.$high, x$87.$low)))); - x234 = _tuple$116[0]; - x235 = _tuple$116[1]; - x236 = new $Uint64(0, 0); - x237 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x200, x224, ((x$88 = (new p384Uint1(x235.$high, x235.$low)), new $Uint64(x$88.$high, x$88.$low)))); - x236 = _tuple$117[0]; - x237 = _tuple$117[1]; - x238 = new $Uint64(0, 0); - x239 = new $Uint64(0, 0); - _tuple$118 = bits.Add64((x$89 = ((x$90 = (new p384Uint1(x201.$high, x201.$low)), new $Uint64(x$90.$high, x$90.$low))), x$91 = ((x$92 = (new p384Uint1(x189.$high, x189.$low)), new $Uint64(x$92.$high, x$92.$low))), new $Uint64(x$89.$high + x$91.$high, x$89.$low + x$91.$low)), (x$93 = ((x$94 = (new p384Uint1(x225.$high, x225.$low)), new $Uint64(x$94.$high, x$94.$low))), new $Uint64(x$93.$high + x205.$high, x$93.$low + x205.$low)), ((x$95 = (new p384Uint1(x237.$high, x237.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x238 = _tuple$118[0]; - x239 = _tuple$118[1]; - x240 = new $Uint64(0, 0); - x241 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x228, arg1[5], new $Uint64(0, 0)); - x240 = _tuple$119[0]; - x241 = _tuple$119[1]; - x242 = new $Uint64(0, 0); - x243 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x230, new $Uint64(0, 0), ((x$96 = (new p384Uint1(x241.$high, x241.$low)), new $Uint64(x$96.$high, x$96.$low)))); - x242 = _tuple$120[0]; - x243 = _tuple$120[1]; - x244 = new $Uint64(0, 0); - x245 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x232, new $Uint64(0, 0), ((x$97 = (new p384Uint1(x243.$high, x243.$low)), new $Uint64(x$97.$high, x$97.$low)))); - x244 = _tuple$121[0]; - x245 = _tuple$121[1]; - x246 = new $Uint64(0, 0); - x247 = new $Uint64(0, 0); - _tuple$122 = bits.Add64(x234, new $Uint64(0, 0), ((x$98 = (new p384Uint1(x245.$high, x245.$low)), new $Uint64(x$98.$high, x$98.$low)))); - x246 = _tuple$122[0]; - x247 = _tuple$122[1]; - x248 = new $Uint64(0, 0); - x249 = new $Uint64(0, 0); - _tuple$123 = bits.Add64(x236, new $Uint64(0, 0), ((x$99 = (new p384Uint1(x247.$high, x247.$low)), new $Uint64(x$99.$high, x$99.$low)))); - x248 = _tuple$123[0]; - x249 = _tuple$123[1]; - x250 = new $Uint64(0, 0); - x251 = new $Uint64(0, 0); - _tuple$124 = bits.Add64(x238, new $Uint64(0, 0), ((x$100 = (new p384Uint1(x249.$high, x249.$low)), new $Uint64(x$100.$high, x$100.$low)))); - x250 = _tuple$124[0]; - x251 = _tuple$124[1]; - x252 = new $Uint64(0, 0); - _tuple$125 = bits.Mul64(x240, new $Uint64(1, 1)); - x252 = _tuple$125[1]; - x254 = new $Uint64(0, 0); - x255 = new $Uint64(0, 0); - _tuple$126 = bits.Mul64(x252, new $Uint64(4294967295, 4294967295)); - x255 = _tuple$126[0]; - x254 = _tuple$126[1]; - x256 = new $Uint64(0, 0); - x257 = new $Uint64(0, 0); - _tuple$127 = bits.Mul64(x252, new $Uint64(4294967295, 4294967295)); - x257 = _tuple$127[0]; - x256 = _tuple$127[1]; - x258 = new $Uint64(0, 0); - x259 = new $Uint64(0, 0); - _tuple$128 = bits.Mul64(x252, new $Uint64(4294967295, 4294967295)); - x259 = _tuple$128[0]; - x258 = _tuple$128[1]; - x260 = new $Uint64(0, 0); - x261 = new $Uint64(0, 0); - _tuple$129 = bits.Mul64(x252, new $Uint64(4294967295, 4294967294)); - x261 = _tuple$129[0]; - x260 = _tuple$129[1]; - x262 = new $Uint64(0, 0); - x263 = new $Uint64(0, 0); - _tuple$130 = bits.Mul64(x252, new $Uint64(4294967295, 0)); - x263 = _tuple$130[0]; - x262 = _tuple$130[1]; - x264 = new $Uint64(0, 0); - x265 = new $Uint64(0, 0); - _tuple$131 = bits.Mul64(x252, new $Uint64(0, 4294967295)); - x265 = _tuple$131[0]; - x264 = _tuple$131[1]; - x266 = new $Uint64(0, 0); - x267 = new $Uint64(0, 0); - _tuple$132 = bits.Add64(x265, x262, new $Uint64(0, 0)); - x266 = _tuple$132[0]; - x267 = _tuple$132[1]; - x268 = new $Uint64(0, 0); - x269 = new $Uint64(0, 0); - _tuple$133 = bits.Add64(x263, x260, ((x$101 = (new p384Uint1(x267.$high, x267.$low)), new $Uint64(x$101.$high, x$101.$low)))); - x268 = _tuple$133[0]; - x269 = _tuple$133[1]; - x270 = new $Uint64(0, 0); - x271 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x261, x258, ((x$102 = (new p384Uint1(x269.$high, x269.$low)), new $Uint64(x$102.$high, x$102.$low)))); - x270 = _tuple$134[0]; - x271 = _tuple$134[1]; - x272 = new $Uint64(0, 0); - x273 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x259, x256, ((x$103 = (new p384Uint1(x271.$high, x271.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x272 = _tuple$135[0]; - x273 = _tuple$135[1]; - x274 = new $Uint64(0, 0); - x275 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x257, x254, ((x$104 = (new p384Uint1(x273.$high, x273.$low)), new $Uint64(x$104.$high, x$104.$low)))); - x274 = _tuple$136[0]; - x275 = _tuple$136[1]; - x277 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x240, x264, new $Uint64(0, 0)); - x277 = _tuple$137[1]; - x278 = new $Uint64(0, 0); - x279 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x242, x266, ((x$105 = (new p384Uint1(x277.$high, x277.$low)), new $Uint64(x$105.$high, x$105.$low)))); - x278 = _tuple$138[0]; - x279 = _tuple$138[1]; - x280 = new $Uint64(0, 0); - x281 = new $Uint64(0, 0); - _tuple$139 = bits.Add64(x244, x268, ((x$106 = (new p384Uint1(x279.$high, x279.$low)), new $Uint64(x$106.$high, x$106.$low)))); - x280 = _tuple$139[0]; - x281 = _tuple$139[1]; - x282 = new $Uint64(0, 0); - x283 = new $Uint64(0, 0); - _tuple$140 = bits.Add64(x246, x270, ((x$107 = (new p384Uint1(x281.$high, x281.$low)), new $Uint64(x$107.$high, x$107.$low)))); - x282 = _tuple$140[0]; - x283 = _tuple$140[1]; - x284 = new $Uint64(0, 0); - x285 = new $Uint64(0, 0); - _tuple$141 = bits.Add64(x248, x272, ((x$108 = (new p384Uint1(x283.$high, x283.$low)), new $Uint64(x$108.$high, x$108.$low)))); - x284 = _tuple$141[0]; - x285 = _tuple$141[1]; - x286 = new $Uint64(0, 0); - x287 = new $Uint64(0, 0); - _tuple$142 = bits.Add64(x250, x274, ((x$109 = (new p384Uint1(x285.$high, x285.$low)), new $Uint64(x$109.$high, x$109.$low)))); - x286 = _tuple$142[0]; - x287 = _tuple$142[1]; - x288 = new $Uint64(0, 0); - x289 = new $Uint64(0, 0); - _tuple$143 = bits.Add64((x$110 = ((x$111 = (new p384Uint1(x251.$high, x251.$low)), new $Uint64(x$111.$high, x$111.$low))), x$112 = ((x$113 = (new p384Uint1(x239.$high, x239.$low)), new $Uint64(x$113.$high, x$113.$low))), new $Uint64(x$110.$high + x$112.$high, x$110.$low + x$112.$low)), (x$114 = ((x$115 = (new p384Uint1(x275.$high, x275.$low)), new $Uint64(x$115.$high, x$115.$low))), new $Uint64(x$114.$high + x255.$high, x$114.$low + x255.$low)), ((x$116 = (new p384Uint1(x287.$high, x287.$low)), new $Uint64(x$116.$high, x$116.$low)))); - x288 = _tuple$143[0]; - x289 = _tuple$143[1]; - x290 = new $Uint64(0, 0); - x291 = new $Uint64(0, 0); - _tuple$144 = bits.Sub64(x278, new $Uint64(0, 4294967295), new $Uint64(0, 0)); - x290 = _tuple$144[0]; - x291 = _tuple$144[1]; - x292 = new $Uint64(0, 0); - x293 = new $Uint64(0, 0); - _tuple$145 = bits.Sub64(x280, new $Uint64(4294967295, 0), ((x$117 = (new p384Uint1(x291.$high, x291.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x292 = _tuple$145[0]; - x293 = _tuple$145[1]; - x294 = new $Uint64(0, 0); - x295 = new $Uint64(0, 0); - _tuple$146 = bits.Sub64(x282, new $Uint64(4294967295, 4294967294), ((x$118 = (new p384Uint1(x293.$high, x293.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x294 = _tuple$146[0]; - x295 = _tuple$146[1]; - x296 = new $Uint64(0, 0); - x297 = new $Uint64(0, 0); - _tuple$147 = bits.Sub64(x284, new $Uint64(4294967295, 4294967295), ((x$119 = (new p384Uint1(x295.$high, x295.$low)), new $Uint64(x$119.$high, x$119.$low)))); - x296 = _tuple$147[0]; - x297 = _tuple$147[1]; - x298 = new $Uint64(0, 0); - x299 = new $Uint64(0, 0); - _tuple$148 = bits.Sub64(x286, new $Uint64(4294967295, 4294967295), ((x$120 = (new p384Uint1(x297.$high, x297.$low)), new $Uint64(x$120.$high, x$120.$low)))); - x298 = _tuple$148[0]; - x299 = _tuple$148[1]; - x300 = new $Uint64(0, 0); - x301 = new $Uint64(0, 0); - _tuple$149 = bits.Sub64(x288, new $Uint64(4294967295, 4294967295), ((x$121 = (new p384Uint1(x299.$high, x299.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x300 = _tuple$149[0]; - x301 = _tuple$149[1]; - x303 = new $Uint64(0, 0); - _tuple$150 = bits.Sub64(((x$122 = (new p384Uint1(x289.$high, x289.$low)), new $Uint64(x$122.$high, x$122.$low))), new $Uint64(0, 0), ((x$123 = (new p384Uint1(x301.$high, x301.$low)), new $Uint64(x$123.$high, x$123.$low)))); - x303 = _tuple$150[1]; - x304 = new $Uint64(0, 0); - p384CmovznzU64((x304$24ptr || (x304$24ptr = new ptrType(function() { return x304; }, function($v) { x304 = $v; }))), (new p384Uint1(x303.$high, x303.$low)), x290, x278); - x305 = new $Uint64(0, 0); - p384CmovznzU64((x305$24ptr || (x305$24ptr = new ptrType(function() { return x305; }, function($v) { x305 = $v; }))), (new p384Uint1(x303.$high, x303.$low)), x292, x280); - x306 = new $Uint64(0, 0); - p384CmovznzU64((x306$24ptr || (x306$24ptr = new ptrType(function() { return x306; }, function($v) { x306 = $v; }))), (new p384Uint1(x303.$high, x303.$low)), x294, x282); - x307 = new $Uint64(0, 0); - p384CmovznzU64((x307$24ptr || (x307$24ptr = new ptrType(function() { return x307; }, function($v) { x307 = $v; }))), (new p384Uint1(x303.$high, x303.$low)), x296, x284); - x308 = new $Uint64(0, 0); - p384CmovznzU64((x308$24ptr || (x308$24ptr = new ptrType(function() { return x308; }, function($v) { x308 = $v; }))), (new p384Uint1(x303.$high, x303.$low)), x298, x286); - x309 = new $Uint64(0, 0); - p384CmovznzU64((x309$24ptr || (x309$24ptr = new ptrType(function() { return x309; }, function($v) { x309 = $v; }))), (new p384Uint1(x303.$high, x303.$low)), x300, x288); - out1.nilCheck, out1[0] = x304; - out1.nilCheck, out1[1] = x305; - out1.nilCheck, out1[2] = x306; - out1.nilCheck, out1[3] = x307; - out1.nilCheck, out1[4] = x308; - out1.nilCheck, out1[5] = x309; - }; - p384ToMontgomery = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$100, _tuple$101, _tuple$102, _tuple$103, _tuple$104, _tuple$105, _tuple$106, _tuple$107, _tuple$108, _tuple$109, _tuple$11, _tuple$110, _tuple$111, _tuple$112, _tuple$113, _tuple$114, _tuple$115, _tuple$116, _tuple$117, _tuple$118, _tuple$119, _tuple$12, _tuple$120, _tuple$121, _tuple$122, _tuple$123, _tuple$124, _tuple$125, _tuple$126, _tuple$127, _tuple$128, _tuple$129, _tuple$13, _tuple$130, _tuple$131, _tuple$132, _tuple$133, _tuple$134, _tuple$135, _tuple$136, _tuple$137, _tuple$138, _tuple$139, _tuple$14, _tuple$140, _tuple$141, _tuple$142, _tuple$143, _tuple$144, _tuple$145, _tuple$146, _tuple$147, _tuple$148, _tuple$149, _tuple$15, _tuple$150, _tuple$151, _tuple$152, _tuple$153, _tuple$154, _tuple$155, _tuple$156, _tuple$157, _tuple$158, _tuple$159, _tuple$16, _tuple$160, _tuple$161, _tuple$162, _tuple$163, _tuple$164, _tuple$165, _tuple$166, _tuple$167, _tuple$168, _tuple$169, _tuple$17, _tuple$170, _tuple$171, _tuple$172, _tuple$173, _tuple$174, _tuple$175, _tuple$176, _tuple$177, _tuple$178, _tuple$179, _tuple$18, _tuple$180, _tuple$181, _tuple$182, _tuple$183, _tuple$184, _tuple$185, _tuple$186, _tuple$187, _tuple$188, _tuple$189, _tuple$19, _tuple$190, _tuple$191, _tuple$192, _tuple$193, _tuple$194, _tuple$195, _tuple$196, _tuple$197, _tuple$198, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, _tuple$92, _tuple$93, _tuple$94, _tuple$95, _tuple$96, _tuple$97, _tuple$98, _tuple$99, arg1, out1, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x114, x115, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x198, x199, x2, x20, x200, x201, x202, x203, x204, x205, x206, x207, x208, x209, x21, x210, x211, x212, x213, x214, x215, x216, x217, x218, x219, x22, x220, x221, x223, x224, x225, x226, x227, x228, x229, x23, x230, x231, x232, x233, x234, x235, x236, x237, x238, x239, x240, x241, x242, x243, x244, x246, x247, x248, x249, x25, x250, x251, x252, x253, x254, x255, x256, x257, x258, x259, x26, x260, x261, x262, x263, x264, x265, x266, x267, x268, x269, x27, x270, x271, x272, x273, x274, x275, x276, x277, x278, x279, x28, x280, x281, x282, x283, x284, x285, x286, x287, x289, x29, x290, x291, x292, x293, x294, x295, x296, x297, x298, x299, x3, x30, x300, x301, x302, x303, x304, x305, x306, x307, x308, x309, x31, x310, x312, x313, x314, x315, x316, x317, x318, x319, x32, x320, x321, x322, x323, x324, x325, x326, x327, x328, x329, x33, x330, x331, x332, x333, x334, x335, x336, x337, x338, x339, x34, x340, x341, x342, x343, x344, x345, x346, x347, x348, x349, x35, x350, x351, x352, x353, x355, x356, x357, x358, x359, x36, x360, x361, x362, x363, x364, x365, x366, x367, x368, x369, x37, x370, x371, x372, x373, x374, x375, x376, x378, x379, x38, x380, x381, x382, x383, x384, x385, x386, x387, x388, x389, x39, x390, x391, x392, x393, x394, x395, x396, x397, x398, x399, x4, x40, x400, x401, x402, x404, x405, x405$24ptr, x406, x406$24ptr, x407, x407$24ptr, x408, x408$24ptr, x409, x409$24ptr, x41, x410, x410$24ptr, x42, x43, x44, x45, x46, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[4]; - x5 = arg1[5]; - x6 = arg1[0]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple = bits.Mul64(x6, new $Uint64(2, 0)); - x8 = _tuple[0]; - x7 = _tuple[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x6, new $Uint64(4294967294, 0)); - x10 = _tuple$1[0]; - x9 = _tuple$1[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x6, new $Uint64(2, 0)); - x12 = _tuple$2[0]; - x11 = _tuple$2[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x6, new $Uint64(4294967294, 1)); - x14 = _tuple$3[0]; - x13 = _tuple$3[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(x14, x11, new $Uint64(0, 0)); - x15 = _tuple$4[0]; - x16 = _tuple$4[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(x12, x9, ((x = (new p384Uint1(x16.$high, x16.$low)), new $Uint64(x.$high, x.$low)))); - x17 = _tuple$5[0]; - x18 = _tuple$5[1]; - x19 = new $Uint64(0, 0); - x20 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x10, x7, ((x$1 = (new p384Uint1(x18.$high, x18.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x19 = _tuple$6[0]; - x20 = _tuple$6[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(x8, x6, ((x$2 = (new p384Uint1(x20.$high, x20.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x21 = _tuple$7[0]; - x22 = _tuple$7[1]; - x23 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x13, new $Uint64(1, 1)); - x23 = _tuple$8[1]; - x25 = new $Uint64(0, 0); - x26 = new $Uint64(0, 0); - _tuple$9 = bits.Mul64(x23, new $Uint64(4294967295, 4294967295)); - x26 = _tuple$9[0]; - x25 = _tuple$9[1]; - x27 = new $Uint64(0, 0); - x28 = new $Uint64(0, 0); - _tuple$10 = bits.Mul64(x23, new $Uint64(4294967295, 4294967295)); - x28 = _tuple$10[0]; - x27 = _tuple$10[1]; - x29 = new $Uint64(0, 0); - x30 = new $Uint64(0, 0); - _tuple$11 = bits.Mul64(x23, new $Uint64(4294967295, 4294967295)); - x30 = _tuple$11[0]; - x29 = _tuple$11[1]; - x31 = new $Uint64(0, 0); - x32 = new $Uint64(0, 0); - _tuple$12 = bits.Mul64(x23, new $Uint64(4294967295, 4294967294)); - x32 = _tuple$12[0]; - x31 = _tuple$12[1]; - x33 = new $Uint64(0, 0); - x34 = new $Uint64(0, 0); - _tuple$13 = bits.Mul64(x23, new $Uint64(4294967295, 0)); - x34 = _tuple$13[0]; - x33 = _tuple$13[1]; - x35 = new $Uint64(0, 0); - x36 = new $Uint64(0, 0); - _tuple$14 = bits.Mul64(x23, new $Uint64(0, 4294967295)); - x36 = _tuple$14[0]; - x35 = _tuple$14[1]; - x37 = new $Uint64(0, 0); - x38 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x36, x33, new $Uint64(0, 0)); - x37 = _tuple$15[0]; - x38 = _tuple$15[1]; - x39 = new $Uint64(0, 0); - x40 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x34, x31, ((x$3 = (new p384Uint1(x38.$high, x38.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x39 = _tuple$16[0]; - x40 = _tuple$16[1]; - x41 = new $Uint64(0, 0); - x42 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x32, x29, ((x$4 = (new p384Uint1(x40.$high, x40.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x41 = _tuple$17[0]; - x42 = _tuple$17[1]; - x43 = new $Uint64(0, 0); - x44 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(x30, x27, ((x$5 = (new p384Uint1(x42.$high, x42.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x43 = _tuple$18[0]; - x44 = _tuple$18[1]; - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(x28, x25, ((x$6 = (new p384Uint1(x44.$high, x44.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x45 = _tuple$19[0]; - x46 = _tuple$19[1]; - x48 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(x13, x35, new $Uint64(0, 0)); - x48 = _tuple$20[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x15, x37, ((x$7 = (new p384Uint1(x48.$high, x48.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x49 = _tuple$21[0]; - x50 = _tuple$21[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x17, x39, ((x$8 = (new p384Uint1(x50.$high, x50.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x51 = _tuple$22[0]; - x52 = _tuple$22[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x19, x41, ((x$9 = (new p384Uint1(x52.$high, x52.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x53 = _tuple$23[0]; - x54 = _tuple$23[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x21, x43, ((x$10 = (new p384Uint1(x54.$high, x54.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x55 = _tuple$24[0]; - x56 = _tuple$24[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(((x$11 = (new p384Uint1(x22.$high, x22.$low)), new $Uint64(x$11.$high, x$11.$low))), x45, ((x$12 = (new p384Uint1(x56.$high, x56.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x57 = _tuple$25[0]; - x58 = _tuple$25[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(new $Uint64(0, 0), (x$13 = ((x$14 = (new p384Uint1(x46.$high, x46.$low)), new $Uint64(x$14.$high, x$14.$low))), new $Uint64(x$13.$high + x26.$high, x$13.$low + x26.$low)), ((x$15 = (new p384Uint1(x58.$high, x58.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x59 = _tuple$26[0]; - x60 = _tuple$26[1]; - x61 = new $Uint64(0, 0); - x62 = new $Uint64(0, 0); - _tuple$27 = bits.Mul64(x1, new $Uint64(2, 0)); - x62 = _tuple$27[0]; - x61 = _tuple$27[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$28 = bits.Mul64(x1, new $Uint64(4294967294, 0)); - x64 = _tuple$28[0]; - x63 = _tuple$28[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$29 = bits.Mul64(x1, new $Uint64(2, 0)); - x66 = _tuple$29[0]; - x65 = _tuple$29[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x1, new $Uint64(4294967294, 1)); - x68 = _tuple$30[0]; - x67 = _tuple$30[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$31 = bits.Add64(x68, x65, new $Uint64(0, 0)); - x69 = _tuple$31[0]; - x70 = _tuple$31[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x66, x63, ((x$16 = (new p384Uint1(x70.$high, x70.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x71 = _tuple$32[0]; - x72 = _tuple$32[1]; - x73 = new $Uint64(0, 0); - x74 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x64, x61, ((x$17 = (new p384Uint1(x72.$high, x72.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x73 = _tuple$33[0]; - x74 = _tuple$33[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x62, x1, ((x$18 = (new p384Uint1(x74.$high, x74.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x75 = _tuple$34[0]; - x76 = _tuple$34[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x49, x67, new $Uint64(0, 0)); - x77 = _tuple$35[0]; - x78 = _tuple$35[1]; - x79 = new $Uint64(0, 0); - x80 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x51, x69, ((x$19 = (new p384Uint1(x78.$high, x78.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x79 = _tuple$36[0]; - x80 = _tuple$36[1]; - x81 = new $Uint64(0, 0); - x82 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x53, x71, ((x$20 = (new p384Uint1(x80.$high, x80.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x81 = _tuple$37[0]; - x82 = _tuple$37[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x55, x73, ((x$21 = (new p384Uint1(x82.$high, x82.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x83 = _tuple$38[0]; - x84 = _tuple$38[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x57, x75, ((x$22 = (new p384Uint1(x84.$high, x84.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x85 = _tuple$39[0]; - x86 = _tuple$39[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x59, ((x$23 = (new p384Uint1(x76.$high, x76.$low)), new $Uint64(x$23.$high, x$23.$low))), ((x$24 = (new p384Uint1(x86.$high, x86.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x87 = _tuple$40[0]; - x88 = _tuple$40[1]; - x89 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x77, new $Uint64(1, 1)); - x89 = _tuple$41[1]; - x91 = new $Uint64(0, 0); - x92 = new $Uint64(0, 0); - _tuple$42 = bits.Mul64(x89, new $Uint64(4294967295, 4294967295)); - x92 = _tuple$42[0]; - x91 = _tuple$42[1]; - x93 = new $Uint64(0, 0); - x94 = new $Uint64(0, 0); - _tuple$43 = bits.Mul64(x89, new $Uint64(4294967295, 4294967295)); - x94 = _tuple$43[0]; - x93 = _tuple$43[1]; - x95 = new $Uint64(0, 0); - x96 = new $Uint64(0, 0); - _tuple$44 = bits.Mul64(x89, new $Uint64(4294967295, 4294967295)); - x96 = _tuple$44[0]; - x95 = _tuple$44[1]; - x97 = new $Uint64(0, 0); - x98 = new $Uint64(0, 0); - _tuple$45 = bits.Mul64(x89, new $Uint64(4294967295, 4294967294)); - x98 = _tuple$45[0]; - x97 = _tuple$45[1]; - x99 = new $Uint64(0, 0); - x100 = new $Uint64(0, 0); - _tuple$46 = bits.Mul64(x89, new $Uint64(4294967295, 0)); - x100 = _tuple$46[0]; - x99 = _tuple$46[1]; - x101 = new $Uint64(0, 0); - x102 = new $Uint64(0, 0); - _tuple$47 = bits.Mul64(x89, new $Uint64(0, 4294967295)); - x102 = _tuple$47[0]; - x101 = _tuple$47[1]; - x103 = new $Uint64(0, 0); - x104 = new $Uint64(0, 0); - _tuple$48 = bits.Add64(x102, x99, new $Uint64(0, 0)); - x103 = _tuple$48[0]; - x104 = _tuple$48[1]; - x105 = new $Uint64(0, 0); - x106 = new $Uint64(0, 0); - _tuple$49 = bits.Add64(x100, x97, ((x$25 = (new p384Uint1(x104.$high, x104.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x105 = _tuple$49[0]; - x106 = _tuple$49[1]; - x107 = new $Uint64(0, 0); - x108 = new $Uint64(0, 0); - _tuple$50 = bits.Add64(x98, x95, ((x$26 = (new p384Uint1(x106.$high, x106.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x107 = _tuple$50[0]; - x108 = _tuple$50[1]; - x109 = new $Uint64(0, 0); - x110 = new $Uint64(0, 0); - _tuple$51 = bits.Add64(x96, x93, ((x$27 = (new p384Uint1(x108.$high, x108.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x109 = _tuple$51[0]; - x110 = _tuple$51[1]; - x111 = new $Uint64(0, 0); - x112 = new $Uint64(0, 0); - _tuple$52 = bits.Add64(x94, x91, ((x$28 = (new p384Uint1(x110.$high, x110.$low)), new $Uint64(x$28.$high, x$28.$low)))); - x111 = _tuple$52[0]; - x112 = _tuple$52[1]; - x114 = new $Uint64(0, 0); - _tuple$53 = bits.Add64(x77, x101, new $Uint64(0, 0)); - x114 = _tuple$53[1]; - x115 = new $Uint64(0, 0); - x116 = new $Uint64(0, 0); - _tuple$54 = bits.Add64(x79, x103, ((x$29 = (new p384Uint1(x114.$high, x114.$low)), new $Uint64(x$29.$high, x$29.$low)))); - x115 = _tuple$54[0]; - x116 = _tuple$54[1]; - x117 = new $Uint64(0, 0); - x118 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x81, x105, ((x$30 = (new p384Uint1(x116.$high, x116.$low)), new $Uint64(x$30.$high, x$30.$low)))); - x117 = _tuple$55[0]; - x118 = _tuple$55[1]; - x119 = new $Uint64(0, 0); - x120 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x83, x107, ((x$31 = (new p384Uint1(x118.$high, x118.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x119 = _tuple$56[0]; - x120 = _tuple$56[1]; - x121 = new $Uint64(0, 0); - x122 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x85, x109, ((x$32 = (new p384Uint1(x120.$high, x120.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x121 = _tuple$57[0]; - x122 = _tuple$57[1]; - x123 = new $Uint64(0, 0); - x124 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x87, x111, ((x$33 = (new p384Uint1(x122.$high, x122.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x123 = _tuple$58[0]; - x124 = _tuple$58[1]; - x125 = new $Uint64(0, 0); - x126 = new $Uint64(0, 0); - _tuple$59 = bits.Add64((x$34 = ((x$35 = (new p384Uint1(x88.$high, x88.$low)), new $Uint64(x$35.$high, x$35.$low))), x$36 = ((x$37 = (new p384Uint1(x60.$high, x60.$low)), new $Uint64(x$37.$high, x$37.$low))), new $Uint64(x$34.$high + x$36.$high, x$34.$low + x$36.$low)), (x$38 = ((x$39 = (new p384Uint1(x112.$high, x112.$low)), new $Uint64(x$39.$high, x$39.$low))), new $Uint64(x$38.$high + x92.$high, x$38.$low + x92.$low)), ((x$40 = (new p384Uint1(x124.$high, x124.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x125 = _tuple$59[0]; - x126 = _tuple$59[1]; - x127 = new $Uint64(0, 0); - x128 = new $Uint64(0, 0); - _tuple$60 = bits.Mul64(x2, new $Uint64(2, 0)); - x128 = _tuple$60[0]; - x127 = _tuple$60[1]; - x129 = new $Uint64(0, 0); - x130 = new $Uint64(0, 0); - _tuple$61 = bits.Mul64(x2, new $Uint64(4294967294, 0)); - x130 = _tuple$61[0]; - x129 = _tuple$61[1]; - x131 = new $Uint64(0, 0); - x132 = new $Uint64(0, 0); - _tuple$62 = bits.Mul64(x2, new $Uint64(2, 0)); - x132 = _tuple$62[0]; - x131 = _tuple$62[1]; - x133 = new $Uint64(0, 0); - x134 = new $Uint64(0, 0); - _tuple$63 = bits.Mul64(x2, new $Uint64(4294967294, 1)); - x134 = _tuple$63[0]; - x133 = _tuple$63[1]; - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x134, x131, new $Uint64(0, 0)); - x135 = _tuple$64[0]; - x136 = _tuple$64[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x132, x129, ((x$41 = (new p384Uint1(x136.$high, x136.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x137 = _tuple$65[0]; - x138 = _tuple$65[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x130, x127, ((x$42 = (new p384Uint1(x138.$high, x138.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x139 = _tuple$66[0]; - x140 = _tuple$66[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x128, x2, ((x$43 = (new p384Uint1(x140.$high, x140.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x141 = _tuple$67[0]; - x142 = _tuple$67[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x115, x133, new $Uint64(0, 0)); - x143 = _tuple$68[0]; - x144 = _tuple$68[1]; - x145 = new $Uint64(0, 0); - x146 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x117, x135, ((x$44 = (new p384Uint1(x144.$high, x144.$low)), new $Uint64(x$44.$high, x$44.$low)))); - x145 = _tuple$69[0]; - x146 = _tuple$69[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(x119, x137, ((x$45 = (new p384Uint1(x146.$high, x146.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x147 = _tuple$70[0]; - x148 = _tuple$70[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$71 = bits.Add64(x121, x139, ((x$46 = (new p384Uint1(x148.$high, x148.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x149 = _tuple$71[0]; - x150 = _tuple$71[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$72 = bits.Add64(x123, x141, ((x$47 = (new p384Uint1(x150.$high, x150.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x151 = _tuple$72[0]; - x152 = _tuple$72[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$73 = bits.Add64(x125, ((x$48 = (new p384Uint1(x142.$high, x142.$low)), new $Uint64(x$48.$high, x$48.$low))), ((x$49 = (new p384Uint1(x152.$high, x152.$low)), new $Uint64(x$49.$high, x$49.$low)))); - x153 = _tuple$73[0]; - x154 = _tuple$73[1]; - x155 = new $Uint64(0, 0); - _tuple$74 = bits.Mul64(x143, new $Uint64(1, 1)); - x155 = _tuple$74[1]; - x157 = new $Uint64(0, 0); - x158 = new $Uint64(0, 0); - _tuple$75 = bits.Mul64(x155, new $Uint64(4294967295, 4294967295)); - x158 = _tuple$75[0]; - x157 = _tuple$75[1]; - x159 = new $Uint64(0, 0); - x160 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x155, new $Uint64(4294967295, 4294967295)); - x160 = _tuple$76[0]; - x159 = _tuple$76[1]; - x161 = new $Uint64(0, 0); - x162 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x155, new $Uint64(4294967295, 4294967295)); - x162 = _tuple$77[0]; - x161 = _tuple$77[1]; - x163 = new $Uint64(0, 0); - x164 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x155, new $Uint64(4294967295, 4294967294)); - x164 = _tuple$78[0]; - x163 = _tuple$78[1]; - x165 = new $Uint64(0, 0); - x166 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x155, new $Uint64(4294967295, 0)); - x166 = _tuple$79[0]; - x165 = _tuple$79[1]; - x167 = new $Uint64(0, 0); - x168 = new $Uint64(0, 0); - _tuple$80 = bits.Mul64(x155, new $Uint64(0, 4294967295)); - x168 = _tuple$80[0]; - x167 = _tuple$80[1]; - x169 = new $Uint64(0, 0); - x170 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x168, x165, new $Uint64(0, 0)); - x169 = _tuple$81[0]; - x170 = _tuple$81[1]; - x171 = new $Uint64(0, 0); - x172 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x166, x163, ((x$50 = (new p384Uint1(x170.$high, x170.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x171 = _tuple$82[0]; - x172 = _tuple$82[1]; - x173 = new $Uint64(0, 0); - x174 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x164, x161, ((x$51 = (new p384Uint1(x172.$high, x172.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x173 = _tuple$83[0]; - x174 = _tuple$83[1]; - x175 = new $Uint64(0, 0); - x176 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x162, x159, ((x$52 = (new p384Uint1(x174.$high, x174.$low)), new $Uint64(x$52.$high, x$52.$low)))); - x175 = _tuple$84[0]; - x176 = _tuple$84[1]; - x177 = new $Uint64(0, 0); - x178 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x160, x157, ((x$53 = (new p384Uint1(x176.$high, x176.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x177 = _tuple$85[0]; - x178 = _tuple$85[1]; - x180 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x143, x167, new $Uint64(0, 0)); - x180 = _tuple$86[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$87 = bits.Add64(x145, x169, ((x$54 = (new p384Uint1(x180.$high, x180.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x181 = _tuple$87[0]; - x182 = _tuple$87[1]; - x183 = new $Uint64(0, 0); - x184 = new $Uint64(0, 0); - _tuple$88 = bits.Add64(x147, x171, ((x$55 = (new p384Uint1(x182.$high, x182.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x183 = _tuple$88[0]; - x184 = _tuple$88[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$89 = bits.Add64(x149, x173, ((x$56 = (new p384Uint1(x184.$high, x184.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x185 = _tuple$89[0]; - x186 = _tuple$89[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$90 = bits.Add64(x151, x175, ((x$57 = (new p384Uint1(x186.$high, x186.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x187 = _tuple$90[0]; - x188 = _tuple$90[1]; - x189 = new $Uint64(0, 0); - x190 = new $Uint64(0, 0); - _tuple$91 = bits.Add64(x153, x177, ((x$58 = (new p384Uint1(x188.$high, x188.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x189 = _tuple$91[0]; - x190 = _tuple$91[1]; - x191 = new $Uint64(0, 0); - x192 = new $Uint64(0, 0); - _tuple$92 = bits.Add64((x$59 = ((x$60 = (new p384Uint1(x154.$high, x154.$low)), new $Uint64(x$60.$high, x$60.$low))), x$61 = ((x$62 = (new p384Uint1(x126.$high, x126.$low)), new $Uint64(x$62.$high, x$62.$low))), new $Uint64(x$59.$high + x$61.$high, x$59.$low + x$61.$low)), (x$63 = ((x$64 = (new p384Uint1(x178.$high, x178.$low)), new $Uint64(x$64.$high, x$64.$low))), new $Uint64(x$63.$high + x158.$high, x$63.$low + x158.$low)), ((x$65 = (new p384Uint1(x190.$high, x190.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x191 = _tuple$92[0]; - x192 = _tuple$92[1]; - x193 = new $Uint64(0, 0); - x194 = new $Uint64(0, 0); - _tuple$93 = bits.Mul64(x3, new $Uint64(2, 0)); - x194 = _tuple$93[0]; - x193 = _tuple$93[1]; - x195 = new $Uint64(0, 0); - x196 = new $Uint64(0, 0); - _tuple$94 = bits.Mul64(x3, new $Uint64(4294967294, 0)); - x196 = _tuple$94[0]; - x195 = _tuple$94[1]; - x197 = new $Uint64(0, 0); - x198 = new $Uint64(0, 0); - _tuple$95 = bits.Mul64(x3, new $Uint64(2, 0)); - x198 = _tuple$95[0]; - x197 = _tuple$95[1]; - x199 = new $Uint64(0, 0); - x200 = new $Uint64(0, 0); - _tuple$96 = bits.Mul64(x3, new $Uint64(4294967294, 1)); - x200 = _tuple$96[0]; - x199 = _tuple$96[1]; - x201 = new $Uint64(0, 0); - x202 = new $Uint64(0, 0); - _tuple$97 = bits.Add64(x200, x197, new $Uint64(0, 0)); - x201 = _tuple$97[0]; - x202 = _tuple$97[1]; - x203 = new $Uint64(0, 0); - x204 = new $Uint64(0, 0); - _tuple$98 = bits.Add64(x198, x195, ((x$66 = (new p384Uint1(x202.$high, x202.$low)), new $Uint64(x$66.$high, x$66.$low)))); - x203 = _tuple$98[0]; - x204 = _tuple$98[1]; - x205 = new $Uint64(0, 0); - x206 = new $Uint64(0, 0); - _tuple$99 = bits.Add64(x196, x193, ((x$67 = (new p384Uint1(x204.$high, x204.$low)), new $Uint64(x$67.$high, x$67.$low)))); - x205 = _tuple$99[0]; - x206 = _tuple$99[1]; - x207 = new $Uint64(0, 0); - x208 = new $Uint64(0, 0); - _tuple$100 = bits.Add64(x194, x3, ((x$68 = (new p384Uint1(x206.$high, x206.$low)), new $Uint64(x$68.$high, x$68.$low)))); - x207 = _tuple$100[0]; - x208 = _tuple$100[1]; - x209 = new $Uint64(0, 0); - x210 = new $Uint64(0, 0); - _tuple$101 = bits.Add64(x181, x199, new $Uint64(0, 0)); - x209 = _tuple$101[0]; - x210 = _tuple$101[1]; - x211 = new $Uint64(0, 0); - x212 = new $Uint64(0, 0); - _tuple$102 = bits.Add64(x183, x201, ((x$69 = (new p384Uint1(x210.$high, x210.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x211 = _tuple$102[0]; - x212 = _tuple$102[1]; - x213 = new $Uint64(0, 0); - x214 = new $Uint64(0, 0); - _tuple$103 = bits.Add64(x185, x203, ((x$70 = (new p384Uint1(x212.$high, x212.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x213 = _tuple$103[0]; - x214 = _tuple$103[1]; - x215 = new $Uint64(0, 0); - x216 = new $Uint64(0, 0); - _tuple$104 = bits.Add64(x187, x205, ((x$71 = (new p384Uint1(x214.$high, x214.$low)), new $Uint64(x$71.$high, x$71.$low)))); - x215 = _tuple$104[0]; - x216 = _tuple$104[1]; - x217 = new $Uint64(0, 0); - x218 = new $Uint64(0, 0); - _tuple$105 = bits.Add64(x189, x207, ((x$72 = (new p384Uint1(x216.$high, x216.$low)), new $Uint64(x$72.$high, x$72.$low)))); - x217 = _tuple$105[0]; - x218 = _tuple$105[1]; - x219 = new $Uint64(0, 0); - x220 = new $Uint64(0, 0); - _tuple$106 = bits.Add64(x191, ((x$73 = (new p384Uint1(x208.$high, x208.$low)), new $Uint64(x$73.$high, x$73.$low))), ((x$74 = (new p384Uint1(x218.$high, x218.$low)), new $Uint64(x$74.$high, x$74.$low)))); - x219 = _tuple$106[0]; - x220 = _tuple$106[1]; - x221 = new $Uint64(0, 0); - _tuple$107 = bits.Mul64(x209, new $Uint64(1, 1)); - x221 = _tuple$107[1]; - x223 = new $Uint64(0, 0); - x224 = new $Uint64(0, 0); - _tuple$108 = bits.Mul64(x221, new $Uint64(4294967295, 4294967295)); - x224 = _tuple$108[0]; - x223 = _tuple$108[1]; - x225 = new $Uint64(0, 0); - x226 = new $Uint64(0, 0); - _tuple$109 = bits.Mul64(x221, new $Uint64(4294967295, 4294967295)); - x226 = _tuple$109[0]; - x225 = _tuple$109[1]; - x227 = new $Uint64(0, 0); - x228 = new $Uint64(0, 0); - _tuple$110 = bits.Mul64(x221, new $Uint64(4294967295, 4294967295)); - x228 = _tuple$110[0]; - x227 = _tuple$110[1]; - x229 = new $Uint64(0, 0); - x230 = new $Uint64(0, 0); - _tuple$111 = bits.Mul64(x221, new $Uint64(4294967295, 4294967294)); - x230 = _tuple$111[0]; - x229 = _tuple$111[1]; - x231 = new $Uint64(0, 0); - x232 = new $Uint64(0, 0); - _tuple$112 = bits.Mul64(x221, new $Uint64(4294967295, 0)); - x232 = _tuple$112[0]; - x231 = _tuple$112[1]; - x233 = new $Uint64(0, 0); - x234 = new $Uint64(0, 0); - _tuple$113 = bits.Mul64(x221, new $Uint64(0, 4294967295)); - x234 = _tuple$113[0]; - x233 = _tuple$113[1]; - x235 = new $Uint64(0, 0); - x236 = new $Uint64(0, 0); - _tuple$114 = bits.Add64(x234, x231, new $Uint64(0, 0)); - x235 = _tuple$114[0]; - x236 = _tuple$114[1]; - x237 = new $Uint64(0, 0); - x238 = new $Uint64(0, 0); - _tuple$115 = bits.Add64(x232, x229, ((x$75 = (new p384Uint1(x236.$high, x236.$low)), new $Uint64(x$75.$high, x$75.$low)))); - x237 = _tuple$115[0]; - x238 = _tuple$115[1]; - x239 = new $Uint64(0, 0); - x240 = new $Uint64(0, 0); - _tuple$116 = bits.Add64(x230, x227, ((x$76 = (new p384Uint1(x238.$high, x238.$low)), new $Uint64(x$76.$high, x$76.$low)))); - x239 = _tuple$116[0]; - x240 = _tuple$116[1]; - x241 = new $Uint64(0, 0); - x242 = new $Uint64(0, 0); - _tuple$117 = bits.Add64(x228, x225, ((x$77 = (new p384Uint1(x240.$high, x240.$low)), new $Uint64(x$77.$high, x$77.$low)))); - x241 = _tuple$117[0]; - x242 = _tuple$117[1]; - x243 = new $Uint64(0, 0); - x244 = new $Uint64(0, 0); - _tuple$118 = bits.Add64(x226, x223, ((x$78 = (new p384Uint1(x242.$high, x242.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x243 = _tuple$118[0]; - x244 = _tuple$118[1]; - x246 = new $Uint64(0, 0); - _tuple$119 = bits.Add64(x209, x233, new $Uint64(0, 0)); - x246 = _tuple$119[1]; - x247 = new $Uint64(0, 0); - x248 = new $Uint64(0, 0); - _tuple$120 = bits.Add64(x211, x235, ((x$79 = (new p384Uint1(x246.$high, x246.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x247 = _tuple$120[0]; - x248 = _tuple$120[1]; - x249 = new $Uint64(0, 0); - x250 = new $Uint64(0, 0); - _tuple$121 = bits.Add64(x213, x237, ((x$80 = (new p384Uint1(x248.$high, x248.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x249 = _tuple$121[0]; - x250 = _tuple$121[1]; - x251 = new $Uint64(0, 0); - x252 = new $Uint64(0, 0); - _tuple$122 = bits.Add64(x215, x239, ((x$81 = (new p384Uint1(x250.$high, x250.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x251 = _tuple$122[0]; - x252 = _tuple$122[1]; - x253 = new $Uint64(0, 0); - x254 = new $Uint64(0, 0); - _tuple$123 = bits.Add64(x217, x241, ((x$82 = (new p384Uint1(x252.$high, x252.$low)), new $Uint64(x$82.$high, x$82.$low)))); - x253 = _tuple$123[0]; - x254 = _tuple$123[1]; - x255 = new $Uint64(0, 0); - x256 = new $Uint64(0, 0); - _tuple$124 = bits.Add64(x219, x243, ((x$83 = (new p384Uint1(x254.$high, x254.$low)), new $Uint64(x$83.$high, x$83.$low)))); - x255 = _tuple$124[0]; - x256 = _tuple$124[1]; - x257 = new $Uint64(0, 0); - x258 = new $Uint64(0, 0); - _tuple$125 = bits.Add64((x$84 = ((x$85 = (new p384Uint1(x220.$high, x220.$low)), new $Uint64(x$85.$high, x$85.$low))), x$86 = ((x$87 = (new p384Uint1(x192.$high, x192.$low)), new $Uint64(x$87.$high, x$87.$low))), new $Uint64(x$84.$high + x$86.$high, x$84.$low + x$86.$low)), (x$88 = ((x$89 = (new p384Uint1(x244.$high, x244.$low)), new $Uint64(x$89.$high, x$89.$low))), new $Uint64(x$88.$high + x224.$high, x$88.$low + x224.$low)), ((x$90 = (new p384Uint1(x256.$high, x256.$low)), new $Uint64(x$90.$high, x$90.$low)))); - x257 = _tuple$125[0]; - x258 = _tuple$125[1]; - x259 = new $Uint64(0, 0); - x260 = new $Uint64(0, 0); - _tuple$126 = bits.Mul64(x4, new $Uint64(2, 0)); - x260 = _tuple$126[0]; - x259 = _tuple$126[1]; - x261 = new $Uint64(0, 0); - x262 = new $Uint64(0, 0); - _tuple$127 = bits.Mul64(x4, new $Uint64(4294967294, 0)); - x262 = _tuple$127[0]; - x261 = _tuple$127[1]; - x263 = new $Uint64(0, 0); - x264 = new $Uint64(0, 0); - _tuple$128 = bits.Mul64(x4, new $Uint64(2, 0)); - x264 = _tuple$128[0]; - x263 = _tuple$128[1]; - x265 = new $Uint64(0, 0); - x266 = new $Uint64(0, 0); - _tuple$129 = bits.Mul64(x4, new $Uint64(4294967294, 1)); - x266 = _tuple$129[0]; - x265 = _tuple$129[1]; - x267 = new $Uint64(0, 0); - x268 = new $Uint64(0, 0); - _tuple$130 = bits.Add64(x266, x263, new $Uint64(0, 0)); - x267 = _tuple$130[0]; - x268 = _tuple$130[1]; - x269 = new $Uint64(0, 0); - x270 = new $Uint64(0, 0); - _tuple$131 = bits.Add64(x264, x261, ((x$91 = (new p384Uint1(x268.$high, x268.$low)), new $Uint64(x$91.$high, x$91.$low)))); - x269 = _tuple$131[0]; - x270 = _tuple$131[1]; - x271 = new $Uint64(0, 0); - x272 = new $Uint64(0, 0); - _tuple$132 = bits.Add64(x262, x259, ((x$92 = (new p384Uint1(x270.$high, x270.$low)), new $Uint64(x$92.$high, x$92.$low)))); - x271 = _tuple$132[0]; - x272 = _tuple$132[1]; - x273 = new $Uint64(0, 0); - x274 = new $Uint64(0, 0); - _tuple$133 = bits.Add64(x260, x4, ((x$93 = (new p384Uint1(x272.$high, x272.$low)), new $Uint64(x$93.$high, x$93.$low)))); - x273 = _tuple$133[0]; - x274 = _tuple$133[1]; - x275 = new $Uint64(0, 0); - x276 = new $Uint64(0, 0); - _tuple$134 = bits.Add64(x247, x265, new $Uint64(0, 0)); - x275 = _tuple$134[0]; - x276 = _tuple$134[1]; - x277 = new $Uint64(0, 0); - x278 = new $Uint64(0, 0); - _tuple$135 = bits.Add64(x249, x267, ((x$94 = (new p384Uint1(x276.$high, x276.$low)), new $Uint64(x$94.$high, x$94.$low)))); - x277 = _tuple$135[0]; - x278 = _tuple$135[1]; - x279 = new $Uint64(0, 0); - x280 = new $Uint64(0, 0); - _tuple$136 = bits.Add64(x251, x269, ((x$95 = (new p384Uint1(x278.$high, x278.$low)), new $Uint64(x$95.$high, x$95.$low)))); - x279 = _tuple$136[0]; - x280 = _tuple$136[1]; - x281 = new $Uint64(0, 0); - x282 = new $Uint64(0, 0); - _tuple$137 = bits.Add64(x253, x271, ((x$96 = (new p384Uint1(x280.$high, x280.$low)), new $Uint64(x$96.$high, x$96.$low)))); - x281 = _tuple$137[0]; - x282 = _tuple$137[1]; - x283 = new $Uint64(0, 0); - x284 = new $Uint64(0, 0); - _tuple$138 = bits.Add64(x255, x273, ((x$97 = (new p384Uint1(x282.$high, x282.$low)), new $Uint64(x$97.$high, x$97.$low)))); - x283 = _tuple$138[0]; - x284 = _tuple$138[1]; - x285 = new $Uint64(0, 0); - x286 = new $Uint64(0, 0); - _tuple$139 = bits.Add64(x257, ((x$98 = (new p384Uint1(x274.$high, x274.$low)), new $Uint64(x$98.$high, x$98.$low))), ((x$99 = (new p384Uint1(x284.$high, x284.$low)), new $Uint64(x$99.$high, x$99.$low)))); - x285 = _tuple$139[0]; - x286 = _tuple$139[1]; - x287 = new $Uint64(0, 0); - _tuple$140 = bits.Mul64(x275, new $Uint64(1, 1)); - x287 = _tuple$140[1]; - x289 = new $Uint64(0, 0); - x290 = new $Uint64(0, 0); - _tuple$141 = bits.Mul64(x287, new $Uint64(4294967295, 4294967295)); - x290 = _tuple$141[0]; - x289 = _tuple$141[1]; - x291 = new $Uint64(0, 0); - x292 = new $Uint64(0, 0); - _tuple$142 = bits.Mul64(x287, new $Uint64(4294967295, 4294967295)); - x292 = _tuple$142[0]; - x291 = _tuple$142[1]; - x293 = new $Uint64(0, 0); - x294 = new $Uint64(0, 0); - _tuple$143 = bits.Mul64(x287, new $Uint64(4294967295, 4294967295)); - x294 = _tuple$143[0]; - x293 = _tuple$143[1]; - x295 = new $Uint64(0, 0); - x296 = new $Uint64(0, 0); - _tuple$144 = bits.Mul64(x287, new $Uint64(4294967295, 4294967294)); - x296 = _tuple$144[0]; - x295 = _tuple$144[1]; - x297 = new $Uint64(0, 0); - x298 = new $Uint64(0, 0); - _tuple$145 = bits.Mul64(x287, new $Uint64(4294967295, 0)); - x298 = _tuple$145[0]; - x297 = _tuple$145[1]; - x299 = new $Uint64(0, 0); - x300 = new $Uint64(0, 0); - _tuple$146 = bits.Mul64(x287, new $Uint64(0, 4294967295)); - x300 = _tuple$146[0]; - x299 = _tuple$146[1]; - x301 = new $Uint64(0, 0); - x302 = new $Uint64(0, 0); - _tuple$147 = bits.Add64(x300, x297, new $Uint64(0, 0)); - x301 = _tuple$147[0]; - x302 = _tuple$147[1]; - x303 = new $Uint64(0, 0); - x304 = new $Uint64(0, 0); - _tuple$148 = bits.Add64(x298, x295, ((x$100 = (new p384Uint1(x302.$high, x302.$low)), new $Uint64(x$100.$high, x$100.$low)))); - x303 = _tuple$148[0]; - x304 = _tuple$148[1]; - x305 = new $Uint64(0, 0); - x306 = new $Uint64(0, 0); - _tuple$149 = bits.Add64(x296, x293, ((x$101 = (new p384Uint1(x304.$high, x304.$low)), new $Uint64(x$101.$high, x$101.$low)))); - x305 = _tuple$149[0]; - x306 = _tuple$149[1]; - x307 = new $Uint64(0, 0); - x308 = new $Uint64(0, 0); - _tuple$150 = bits.Add64(x294, x291, ((x$102 = (new p384Uint1(x306.$high, x306.$low)), new $Uint64(x$102.$high, x$102.$low)))); - x307 = _tuple$150[0]; - x308 = _tuple$150[1]; - x309 = new $Uint64(0, 0); - x310 = new $Uint64(0, 0); - _tuple$151 = bits.Add64(x292, x289, ((x$103 = (new p384Uint1(x308.$high, x308.$low)), new $Uint64(x$103.$high, x$103.$low)))); - x309 = _tuple$151[0]; - x310 = _tuple$151[1]; - x312 = new $Uint64(0, 0); - _tuple$152 = bits.Add64(x275, x299, new $Uint64(0, 0)); - x312 = _tuple$152[1]; - x313 = new $Uint64(0, 0); - x314 = new $Uint64(0, 0); - _tuple$153 = bits.Add64(x277, x301, ((x$104 = (new p384Uint1(x312.$high, x312.$low)), new $Uint64(x$104.$high, x$104.$low)))); - x313 = _tuple$153[0]; - x314 = _tuple$153[1]; - x315 = new $Uint64(0, 0); - x316 = new $Uint64(0, 0); - _tuple$154 = bits.Add64(x279, x303, ((x$105 = (new p384Uint1(x314.$high, x314.$low)), new $Uint64(x$105.$high, x$105.$low)))); - x315 = _tuple$154[0]; - x316 = _tuple$154[1]; - x317 = new $Uint64(0, 0); - x318 = new $Uint64(0, 0); - _tuple$155 = bits.Add64(x281, x305, ((x$106 = (new p384Uint1(x316.$high, x316.$low)), new $Uint64(x$106.$high, x$106.$low)))); - x317 = _tuple$155[0]; - x318 = _tuple$155[1]; - x319 = new $Uint64(0, 0); - x320 = new $Uint64(0, 0); - _tuple$156 = bits.Add64(x283, x307, ((x$107 = (new p384Uint1(x318.$high, x318.$low)), new $Uint64(x$107.$high, x$107.$low)))); - x319 = _tuple$156[0]; - x320 = _tuple$156[1]; - x321 = new $Uint64(0, 0); - x322 = new $Uint64(0, 0); - _tuple$157 = bits.Add64(x285, x309, ((x$108 = (new p384Uint1(x320.$high, x320.$low)), new $Uint64(x$108.$high, x$108.$low)))); - x321 = _tuple$157[0]; - x322 = _tuple$157[1]; - x323 = new $Uint64(0, 0); - x324 = new $Uint64(0, 0); - _tuple$158 = bits.Add64((x$109 = ((x$110 = (new p384Uint1(x286.$high, x286.$low)), new $Uint64(x$110.$high, x$110.$low))), x$111 = ((x$112 = (new p384Uint1(x258.$high, x258.$low)), new $Uint64(x$112.$high, x$112.$low))), new $Uint64(x$109.$high + x$111.$high, x$109.$low + x$111.$low)), (x$113 = ((x$114 = (new p384Uint1(x310.$high, x310.$low)), new $Uint64(x$114.$high, x$114.$low))), new $Uint64(x$113.$high + x290.$high, x$113.$low + x290.$low)), ((x$115 = (new p384Uint1(x322.$high, x322.$low)), new $Uint64(x$115.$high, x$115.$low)))); - x323 = _tuple$158[0]; - x324 = _tuple$158[1]; - x325 = new $Uint64(0, 0); - x326 = new $Uint64(0, 0); - _tuple$159 = bits.Mul64(x5, new $Uint64(2, 0)); - x326 = _tuple$159[0]; - x325 = _tuple$159[1]; - x327 = new $Uint64(0, 0); - x328 = new $Uint64(0, 0); - _tuple$160 = bits.Mul64(x5, new $Uint64(4294967294, 0)); - x328 = _tuple$160[0]; - x327 = _tuple$160[1]; - x329 = new $Uint64(0, 0); - x330 = new $Uint64(0, 0); - _tuple$161 = bits.Mul64(x5, new $Uint64(2, 0)); - x330 = _tuple$161[0]; - x329 = _tuple$161[1]; - x331 = new $Uint64(0, 0); - x332 = new $Uint64(0, 0); - _tuple$162 = bits.Mul64(x5, new $Uint64(4294967294, 1)); - x332 = _tuple$162[0]; - x331 = _tuple$162[1]; - x333 = new $Uint64(0, 0); - x334 = new $Uint64(0, 0); - _tuple$163 = bits.Add64(x332, x329, new $Uint64(0, 0)); - x333 = _tuple$163[0]; - x334 = _tuple$163[1]; - x335 = new $Uint64(0, 0); - x336 = new $Uint64(0, 0); - _tuple$164 = bits.Add64(x330, x327, ((x$116 = (new p384Uint1(x334.$high, x334.$low)), new $Uint64(x$116.$high, x$116.$low)))); - x335 = _tuple$164[0]; - x336 = _tuple$164[1]; - x337 = new $Uint64(0, 0); - x338 = new $Uint64(0, 0); - _tuple$165 = bits.Add64(x328, x325, ((x$117 = (new p384Uint1(x336.$high, x336.$low)), new $Uint64(x$117.$high, x$117.$low)))); - x337 = _tuple$165[0]; - x338 = _tuple$165[1]; - x339 = new $Uint64(0, 0); - x340 = new $Uint64(0, 0); - _tuple$166 = bits.Add64(x326, x5, ((x$118 = (new p384Uint1(x338.$high, x338.$low)), new $Uint64(x$118.$high, x$118.$low)))); - x339 = _tuple$166[0]; - x340 = _tuple$166[1]; - x341 = new $Uint64(0, 0); - x342 = new $Uint64(0, 0); - _tuple$167 = bits.Add64(x313, x331, new $Uint64(0, 0)); - x341 = _tuple$167[0]; - x342 = _tuple$167[1]; - x343 = new $Uint64(0, 0); - x344 = new $Uint64(0, 0); - _tuple$168 = bits.Add64(x315, x333, ((x$119 = (new p384Uint1(x342.$high, x342.$low)), new $Uint64(x$119.$high, x$119.$low)))); - x343 = _tuple$168[0]; - x344 = _tuple$168[1]; - x345 = new $Uint64(0, 0); - x346 = new $Uint64(0, 0); - _tuple$169 = bits.Add64(x317, x335, ((x$120 = (new p384Uint1(x344.$high, x344.$low)), new $Uint64(x$120.$high, x$120.$low)))); - x345 = _tuple$169[0]; - x346 = _tuple$169[1]; - x347 = new $Uint64(0, 0); - x348 = new $Uint64(0, 0); - _tuple$170 = bits.Add64(x319, x337, ((x$121 = (new p384Uint1(x346.$high, x346.$low)), new $Uint64(x$121.$high, x$121.$low)))); - x347 = _tuple$170[0]; - x348 = _tuple$170[1]; - x349 = new $Uint64(0, 0); - x350 = new $Uint64(0, 0); - _tuple$171 = bits.Add64(x321, x339, ((x$122 = (new p384Uint1(x348.$high, x348.$low)), new $Uint64(x$122.$high, x$122.$low)))); - x349 = _tuple$171[0]; - x350 = _tuple$171[1]; - x351 = new $Uint64(0, 0); - x352 = new $Uint64(0, 0); - _tuple$172 = bits.Add64(x323, ((x$123 = (new p384Uint1(x340.$high, x340.$low)), new $Uint64(x$123.$high, x$123.$low))), ((x$124 = (new p384Uint1(x350.$high, x350.$low)), new $Uint64(x$124.$high, x$124.$low)))); - x351 = _tuple$172[0]; - x352 = _tuple$172[1]; - x353 = new $Uint64(0, 0); - _tuple$173 = bits.Mul64(x341, new $Uint64(1, 1)); - x353 = _tuple$173[1]; - x355 = new $Uint64(0, 0); - x356 = new $Uint64(0, 0); - _tuple$174 = bits.Mul64(x353, new $Uint64(4294967295, 4294967295)); - x356 = _tuple$174[0]; - x355 = _tuple$174[1]; - x357 = new $Uint64(0, 0); - x358 = new $Uint64(0, 0); - _tuple$175 = bits.Mul64(x353, new $Uint64(4294967295, 4294967295)); - x358 = _tuple$175[0]; - x357 = _tuple$175[1]; - x359 = new $Uint64(0, 0); - x360 = new $Uint64(0, 0); - _tuple$176 = bits.Mul64(x353, new $Uint64(4294967295, 4294967295)); - x360 = _tuple$176[0]; - x359 = _tuple$176[1]; - x361 = new $Uint64(0, 0); - x362 = new $Uint64(0, 0); - _tuple$177 = bits.Mul64(x353, new $Uint64(4294967295, 4294967294)); - x362 = _tuple$177[0]; - x361 = _tuple$177[1]; - x363 = new $Uint64(0, 0); - x364 = new $Uint64(0, 0); - _tuple$178 = bits.Mul64(x353, new $Uint64(4294967295, 0)); - x364 = _tuple$178[0]; - x363 = _tuple$178[1]; - x365 = new $Uint64(0, 0); - x366 = new $Uint64(0, 0); - _tuple$179 = bits.Mul64(x353, new $Uint64(0, 4294967295)); - x366 = _tuple$179[0]; - x365 = _tuple$179[1]; - x367 = new $Uint64(0, 0); - x368 = new $Uint64(0, 0); - _tuple$180 = bits.Add64(x366, x363, new $Uint64(0, 0)); - x367 = _tuple$180[0]; - x368 = _tuple$180[1]; - x369 = new $Uint64(0, 0); - x370 = new $Uint64(0, 0); - _tuple$181 = bits.Add64(x364, x361, ((x$125 = (new p384Uint1(x368.$high, x368.$low)), new $Uint64(x$125.$high, x$125.$low)))); - x369 = _tuple$181[0]; - x370 = _tuple$181[1]; - x371 = new $Uint64(0, 0); - x372 = new $Uint64(0, 0); - _tuple$182 = bits.Add64(x362, x359, ((x$126 = (new p384Uint1(x370.$high, x370.$low)), new $Uint64(x$126.$high, x$126.$low)))); - x371 = _tuple$182[0]; - x372 = _tuple$182[1]; - x373 = new $Uint64(0, 0); - x374 = new $Uint64(0, 0); - _tuple$183 = bits.Add64(x360, x357, ((x$127 = (new p384Uint1(x372.$high, x372.$low)), new $Uint64(x$127.$high, x$127.$low)))); - x373 = _tuple$183[0]; - x374 = _tuple$183[1]; - x375 = new $Uint64(0, 0); - x376 = new $Uint64(0, 0); - _tuple$184 = bits.Add64(x358, x355, ((x$128 = (new p384Uint1(x374.$high, x374.$low)), new $Uint64(x$128.$high, x$128.$low)))); - x375 = _tuple$184[0]; - x376 = _tuple$184[1]; - x378 = new $Uint64(0, 0); - _tuple$185 = bits.Add64(x341, x365, new $Uint64(0, 0)); - x378 = _tuple$185[1]; - x379 = new $Uint64(0, 0); - x380 = new $Uint64(0, 0); - _tuple$186 = bits.Add64(x343, x367, ((x$129 = (new p384Uint1(x378.$high, x378.$low)), new $Uint64(x$129.$high, x$129.$low)))); - x379 = _tuple$186[0]; - x380 = _tuple$186[1]; - x381 = new $Uint64(0, 0); - x382 = new $Uint64(0, 0); - _tuple$187 = bits.Add64(x345, x369, ((x$130 = (new p384Uint1(x380.$high, x380.$low)), new $Uint64(x$130.$high, x$130.$low)))); - x381 = _tuple$187[0]; - x382 = _tuple$187[1]; - x383 = new $Uint64(0, 0); - x384 = new $Uint64(0, 0); - _tuple$188 = bits.Add64(x347, x371, ((x$131 = (new p384Uint1(x382.$high, x382.$low)), new $Uint64(x$131.$high, x$131.$low)))); - x383 = _tuple$188[0]; - x384 = _tuple$188[1]; - x385 = new $Uint64(0, 0); - x386 = new $Uint64(0, 0); - _tuple$189 = bits.Add64(x349, x373, ((x$132 = (new p384Uint1(x384.$high, x384.$low)), new $Uint64(x$132.$high, x$132.$low)))); - x385 = _tuple$189[0]; - x386 = _tuple$189[1]; - x387 = new $Uint64(0, 0); - x388 = new $Uint64(0, 0); - _tuple$190 = bits.Add64(x351, x375, ((x$133 = (new p384Uint1(x386.$high, x386.$low)), new $Uint64(x$133.$high, x$133.$low)))); - x387 = _tuple$190[0]; - x388 = _tuple$190[1]; - x389 = new $Uint64(0, 0); - x390 = new $Uint64(0, 0); - _tuple$191 = bits.Add64((x$134 = ((x$135 = (new p384Uint1(x352.$high, x352.$low)), new $Uint64(x$135.$high, x$135.$low))), x$136 = ((x$137 = (new p384Uint1(x324.$high, x324.$low)), new $Uint64(x$137.$high, x$137.$low))), new $Uint64(x$134.$high + x$136.$high, x$134.$low + x$136.$low)), (x$138 = ((x$139 = (new p384Uint1(x376.$high, x376.$low)), new $Uint64(x$139.$high, x$139.$low))), new $Uint64(x$138.$high + x356.$high, x$138.$low + x356.$low)), ((x$140 = (new p384Uint1(x388.$high, x388.$low)), new $Uint64(x$140.$high, x$140.$low)))); - x389 = _tuple$191[0]; - x390 = _tuple$191[1]; - x391 = new $Uint64(0, 0); - x392 = new $Uint64(0, 0); - _tuple$192 = bits.Sub64(x379, new $Uint64(0, 4294967295), new $Uint64(0, 0)); - x391 = _tuple$192[0]; - x392 = _tuple$192[1]; - x393 = new $Uint64(0, 0); - x394 = new $Uint64(0, 0); - _tuple$193 = bits.Sub64(x381, new $Uint64(4294967295, 0), ((x$141 = (new p384Uint1(x392.$high, x392.$low)), new $Uint64(x$141.$high, x$141.$low)))); - x393 = _tuple$193[0]; - x394 = _tuple$193[1]; - x395 = new $Uint64(0, 0); - x396 = new $Uint64(0, 0); - _tuple$194 = bits.Sub64(x383, new $Uint64(4294967295, 4294967294), ((x$142 = (new p384Uint1(x394.$high, x394.$low)), new $Uint64(x$142.$high, x$142.$low)))); - x395 = _tuple$194[0]; - x396 = _tuple$194[1]; - x397 = new $Uint64(0, 0); - x398 = new $Uint64(0, 0); - _tuple$195 = bits.Sub64(x385, new $Uint64(4294967295, 4294967295), ((x$143 = (new p384Uint1(x396.$high, x396.$low)), new $Uint64(x$143.$high, x$143.$low)))); - x397 = _tuple$195[0]; - x398 = _tuple$195[1]; - x399 = new $Uint64(0, 0); - x400 = new $Uint64(0, 0); - _tuple$196 = bits.Sub64(x387, new $Uint64(4294967295, 4294967295), ((x$144 = (new p384Uint1(x398.$high, x398.$low)), new $Uint64(x$144.$high, x$144.$low)))); - x399 = _tuple$196[0]; - x400 = _tuple$196[1]; - x401 = new $Uint64(0, 0); - x402 = new $Uint64(0, 0); - _tuple$197 = bits.Sub64(x389, new $Uint64(4294967295, 4294967295), ((x$145 = (new p384Uint1(x400.$high, x400.$low)), new $Uint64(x$145.$high, x$145.$low)))); - x401 = _tuple$197[0]; - x402 = _tuple$197[1]; - x404 = new $Uint64(0, 0); - _tuple$198 = bits.Sub64(((x$146 = (new p384Uint1(x390.$high, x390.$low)), new $Uint64(x$146.$high, x$146.$low))), new $Uint64(0, 0), ((x$147 = (new p384Uint1(x402.$high, x402.$low)), new $Uint64(x$147.$high, x$147.$low)))); - x404 = _tuple$198[1]; - x405 = new $Uint64(0, 0); - p384CmovznzU64((x405$24ptr || (x405$24ptr = new ptrType(function() { return x405; }, function($v) { x405 = $v; }))), (new p384Uint1(x404.$high, x404.$low)), x391, x379); - x406 = new $Uint64(0, 0); - p384CmovznzU64((x406$24ptr || (x406$24ptr = new ptrType(function() { return x406; }, function($v) { x406 = $v; }))), (new p384Uint1(x404.$high, x404.$low)), x393, x381); - x407 = new $Uint64(0, 0); - p384CmovznzU64((x407$24ptr || (x407$24ptr = new ptrType(function() { return x407; }, function($v) { x407 = $v; }))), (new p384Uint1(x404.$high, x404.$low)), x395, x383); - x408 = new $Uint64(0, 0); - p384CmovznzU64((x408$24ptr || (x408$24ptr = new ptrType(function() { return x408; }, function($v) { x408 = $v; }))), (new p384Uint1(x404.$high, x404.$low)), x397, x385); - x409 = new $Uint64(0, 0); - p384CmovznzU64((x409$24ptr || (x409$24ptr = new ptrType(function() { return x409; }, function($v) { x409 = $v; }))), (new p384Uint1(x404.$high, x404.$low)), x399, x387); - x410 = new $Uint64(0, 0); - p384CmovznzU64((x410$24ptr || (x410$24ptr = new ptrType(function() { return x410; }, function($v) { x410 = $v; }))), (new p384Uint1(x404.$high, x404.$low)), x401, x389); - out1.nilCheck, out1[0] = x405; - out1.nilCheck, out1[1] = x406; - out1.nilCheck, out1[2] = x407; - out1.nilCheck, out1[3] = x408; - out1.nilCheck, out1[4] = x409; - out1.nilCheck, out1[5] = x410; - }; - p384Selectznz = function(out1, arg1, arg2, arg3) { - var arg1, arg2, arg3, out1, x1, x1$24ptr, x2, x2$24ptr, x3, x3$24ptr, x4, x4$24ptr, x5, x5$24ptr, x6, x6$24ptr; - x1 = new $Uint64(0, 0); - p384CmovznzU64((x1$24ptr || (x1$24ptr = new ptrType(function() { return x1; }, function($v) { x1 = $v; }))), arg1, arg2[0], arg3[0]); - x2 = new $Uint64(0, 0); - p384CmovznzU64((x2$24ptr || (x2$24ptr = new ptrType(function() { return x2; }, function($v) { x2 = $v; }))), arg1, arg2[1], arg3[1]); - x3 = new $Uint64(0, 0); - p384CmovznzU64((x3$24ptr || (x3$24ptr = new ptrType(function() { return x3; }, function($v) { x3 = $v; }))), arg1, arg2[2], arg3[2]); - x4 = new $Uint64(0, 0); - p384CmovznzU64((x4$24ptr || (x4$24ptr = new ptrType(function() { return x4; }, function($v) { x4 = $v; }))), arg1, arg2[3], arg3[3]); - x5 = new $Uint64(0, 0); - p384CmovznzU64((x5$24ptr || (x5$24ptr = new ptrType(function() { return x5; }, function($v) { x5 = $v; }))), arg1, arg2[4], arg3[4]); - x6 = new $Uint64(0, 0); - p384CmovznzU64((x6$24ptr || (x6$24ptr = new ptrType(function() { return x6; }, function($v) { x6 = $v; }))), arg1, arg2[5], arg3[5]); - out1.nilCheck, out1[0] = x1; - out1.nilCheck, out1[1] = x2; - out1.nilCheck, out1[2] = x3; - out1.nilCheck, out1[3] = x4; - out1.nilCheck, out1[4] = x5; - out1.nilCheck, out1[5] = x6; - }; - p384ToBytes = function(out1, arg1) { - var arg1, out1, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90; - x1 = arg1[5]; - x2 = arg1[4]; - x3 = arg1[3]; - x4 = arg1[2]; - x5 = arg1[1]; - x6 = arg1[0]; - x7 = ((((x6.$low << 24 >>> 24)) & 255) >>> 0); - x8 = $shiftRightUint64(x6, 8); - x9 = ((((x8.$low << 24 >>> 24)) & 255) >>> 0); - x10 = $shiftRightUint64(x8, 8); - x11 = ((((x10.$low << 24 >>> 24)) & 255) >>> 0); - x12 = $shiftRightUint64(x10, 8); - x13 = ((((x12.$low << 24 >>> 24)) & 255) >>> 0); - x14 = $shiftRightUint64(x12, 8); - x15 = ((((x14.$low << 24 >>> 24)) & 255) >>> 0); - x16 = $shiftRightUint64(x14, 8); - x17 = ((((x16.$low << 24 >>> 24)) & 255) >>> 0); - x18 = $shiftRightUint64(x16, 8); - x19 = ((((x18.$low << 24 >>> 24)) & 255) >>> 0); - x20 = ((($shiftRightUint64(x18, 8)).$low << 24 >>> 24)); - x21 = ((((x5.$low << 24 >>> 24)) & 255) >>> 0); - x22 = $shiftRightUint64(x5, 8); - x23 = ((((x22.$low << 24 >>> 24)) & 255) >>> 0); - x24 = $shiftRightUint64(x22, 8); - x25 = ((((x24.$low << 24 >>> 24)) & 255) >>> 0); - x26 = $shiftRightUint64(x24, 8); - x27 = ((((x26.$low << 24 >>> 24)) & 255) >>> 0); - x28 = $shiftRightUint64(x26, 8); - x29 = ((((x28.$low << 24 >>> 24)) & 255) >>> 0); - x30 = $shiftRightUint64(x28, 8); - x31 = ((((x30.$low << 24 >>> 24)) & 255) >>> 0); - x32 = $shiftRightUint64(x30, 8); - x33 = ((((x32.$low << 24 >>> 24)) & 255) >>> 0); - x34 = ((($shiftRightUint64(x32, 8)).$low << 24 >>> 24)); - x35 = ((((x4.$low << 24 >>> 24)) & 255) >>> 0); - x36 = $shiftRightUint64(x4, 8); - x37 = ((((x36.$low << 24 >>> 24)) & 255) >>> 0); - x38 = $shiftRightUint64(x36, 8); - x39 = ((((x38.$low << 24 >>> 24)) & 255) >>> 0); - x40 = $shiftRightUint64(x38, 8); - x41 = ((((x40.$low << 24 >>> 24)) & 255) >>> 0); - x42 = $shiftRightUint64(x40, 8); - x43 = ((((x42.$low << 24 >>> 24)) & 255) >>> 0); - x44 = $shiftRightUint64(x42, 8); - x45 = ((((x44.$low << 24 >>> 24)) & 255) >>> 0); - x46 = $shiftRightUint64(x44, 8); - x47 = ((((x46.$low << 24 >>> 24)) & 255) >>> 0); - x48 = ((($shiftRightUint64(x46, 8)).$low << 24 >>> 24)); - x49 = ((((x3.$low << 24 >>> 24)) & 255) >>> 0); - x50 = $shiftRightUint64(x3, 8); - x51 = ((((x50.$low << 24 >>> 24)) & 255) >>> 0); - x52 = $shiftRightUint64(x50, 8); - x53 = ((((x52.$low << 24 >>> 24)) & 255) >>> 0); - x54 = $shiftRightUint64(x52, 8); - x55 = ((((x54.$low << 24 >>> 24)) & 255) >>> 0); - x56 = $shiftRightUint64(x54, 8); - x57 = ((((x56.$low << 24 >>> 24)) & 255) >>> 0); - x58 = $shiftRightUint64(x56, 8); - x59 = ((((x58.$low << 24 >>> 24)) & 255) >>> 0); - x60 = $shiftRightUint64(x58, 8); - x61 = ((((x60.$low << 24 >>> 24)) & 255) >>> 0); - x62 = ((($shiftRightUint64(x60, 8)).$low << 24 >>> 24)); - x63 = ((((x2.$low << 24 >>> 24)) & 255) >>> 0); - x64 = $shiftRightUint64(x2, 8); - x65 = ((((x64.$low << 24 >>> 24)) & 255) >>> 0); - x66 = $shiftRightUint64(x64, 8); - x67 = ((((x66.$low << 24 >>> 24)) & 255) >>> 0); - x68 = $shiftRightUint64(x66, 8); - x69 = ((((x68.$low << 24 >>> 24)) & 255) >>> 0); - x70 = $shiftRightUint64(x68, 8); - x71 = ((((x70.$low << 24 >>> 24)) & 255) >>> 0); - x72 = $shiftRightUint64(x70, 8); - x73 = ((((x72.$low << 24 >>> 24)) & 255) >>> 0); - x74 = $shiftRightUint64(x72, 8); - x75 = ((((x74.$low << 24 >>> 24)) & 255) >>> 0); - x76 = ((($shiftRightUint64(x74, 8)).$low << 24 >>> 24)); - x77 = ((((x1.$low << 24 >>> 24)) & 255) >>> 0); - x78 = $shiftRightUint64(x1, 8); - x79 = ((((x78.$low << 24 >>> 24)) & 255) >>> 0); - x80 = $shiftRightUint64(x78, 8); - x81 = ((((x80.$low << 24 >>> 24)) & 255) >>> 0); - x82 = $shiftRightUint64(x80, 8); - x83 = ((((x82.$low << 24 >>> 24)) & 255) >>> 0); - x84 = $shiftRightUint64(x82, 8); - x85 = ((((x84.$low << 24 >>> 24)) & 255) >>> 0); - x86 = $shiftRightUint64(x84, 8); - x87 = ((((x86.$low << 24 >>> 24)) & 255) >>> 0); - x88 = $shiftRightUint64(x86, 8); - x89 = ((((x88.$low << 24 >>> 24)) & 255) >>> 0); - x90 = ((($shiftRightUint64(x88, 8)).$low << 24 >>> 24)); - out1.nilCheck, out1[0] = x7; - out1.nilCheck, out1[1] = x9; - out1.nilCheck, out1[2] = x11; - out1.nilCheck, out1[3] = x13; - out1.nilCheck, out1[4] = x15; - out1.nilCheck, out1[5] = x17; - out1.nilCheck, out1[6] = x19; - out1.nilCheck, out1[7] = x20; - out1.nilCheck, out1[8] = x21; - out1.nilCheck, out1[9] = x23; - out1.nilCheck, out1[10] = x25; - out1.nilCheck, out1[11] = x27; - out1.nilCheck, out1[12] = x29; - out1.nilCheck, out1[13] = x31; - out1.nilCheck, out1[14] = x33; - out1.nilCheck, out1[15] = x34; - out1.nilCheck, out1[16] = x35; - out1.nilCheck, out1[17] = x37; - out1.nilCheck, out1[18] = x39; - out1.nilCheck, out1[19] = x41; - out1.nilCheck, out1[20] = x43; - out1.nilCheck, out1[21] = x45; - out1.nilCheck, out1[22] = x47; - out1.nilCheck, out1[23] = x48; - out1.nilCheck, out1[24] = x49; - out1.nilCheck, out1[25] = x51; - out1.nilCheck, out1[26] = x53; - out1.nilCheck, out1[27] = x55; - out1.nilCheck, out1[28] = x57; - out1.nilCheck, out1[29] = x59; - out1.nilCheck, out1[30] = x61; - out1.nilCheck, out1[31] = x62; - out1.nilCheck, out1[32] = x63; - out1.nilCheck, out1[33] = x65; - out1.nilCheck, out1[34] = x67; - out1.nilCheck, out1[35] = x69; - out1.nilCheck, out1[36] = x71; - out1.nilCheck, out1[37] = x73; - out1.nilCheck, out1[38] = x75; - out1.nilCheck, out1[39] = x76; - out1.nilCheck, out1[40] = x77; - out1.nilCheck, out1[41] = x79; - out1.nilCheck, out1[42] = x81; - out1.nilCheck, out1[43] = x83; - out1.nilCheck, out1[44] = x85; - out1.nilCheck, out1[45] = x87; - out1.nilCheck, out1[46] = x89; - out1.nilCheck, out1[47] = x90; - }; - p384FromBytes = function(out1, arg1) { - var arg1, out1, x, x$1, x$2, x$3, x$4, x$5, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90; - x1 = $shiftLeft64((new $Uint64(0, arg1[47])), 56); - x2 = $shiftLeft64((new $Uint64(0, arg1[46])), 48); - x3 = $shiftLeft64((new $Uint64(0, arg1[45])), 40); - x4 = $shiftLeft64((new $Uint64(0, arg1[44])), 32); - x5 = $shiftLeft64((new $Uint64(0, arg1[43])), 24); - x6 = $shiftLeft64((new $Uint64(0, arg1[42])), 16); - x7 = $shiftLeft64((new $Uint64(0, arg1[41])), 8); - x8 = arg1[40]; - x9 = $shiftLeft64((new $Uint64(0, arg1[39])), 56); - x10 = $shiftLeft64((new $Uint64(0, arg1[38])), 48); - x11 = $shiftLeft64((new $Uint64(0, arg1[37])), 40); - x12 = $shiftLeft64((new $Uint64(0, arg1[36])), 32); - x13 = $shiftLeft64((new $Uint64(0, arg1[35])), 24); - x14 = $shiftLeft64((new $Uint64(0, arg1[34])), 16); - x15 = $shiftLeft64((new $Uint64(0, arg1[33])), 8); - x16 = arg1[32]; - x17 = $shiftLeft64((new $Uint64(0, arg1[31])), 56); - x18 = $shiftLeft64((new $Uint64(0, arg1[30])), 48); - x19 = $shiftLeft64((new $Uint64(0, arg1[29])), 40); - x20 = $shiftLeft64((new $Uint64(0, arg1[28])), 32); - x21 = $shiftLeft64((new $Uint64(0, arg1[27])), 24); - x22 = $shiftLeft64((new $Uint64(0, arg1[26])), 16); - x23 = $shiftLeft64((new $Uint64(0, arg1[25])), 8); - x24 = arg1[24]; - x25 = $shiftLeft64((new $Uint64(0, arg1[23])), 56); - x26 = $shiftLeft64((new $Uint64(0, arg1[22])), 48); - x27 = $shiftLeft64((new $Uint64(0, arg1[21])), 40); - x28 = $shiftLeft64((new $Uint64(0, arg1[20])), 32); - x29 = $shiftLeft64((new $Uint64(0, arg1[19])), 24); - x30 = $shiftLeft64((new $Uint64(0, arg1[18])), 16); - x31 = $shiftLeft64((new $Uint64(0, arg1[17])), 8); - x32 = arg1[16]; - x33 = $shiftLeft64((new $Uint64(0, arg1[15])), 56); - x34 = $shiftLeft64((new $Uint64(0, arg1[14])), 48); - x35 = $shiftLeft64((new $Uint64(0, arg1[13])), 40); - x36 = $shiftLeft64((new $Uint64(0, arg1[12])), 32); - x37 = $shiftLeft64((new $Uint64(0, arg1[11])), 24); - x38 = $shiftLeft64((new $Uint64(0, arg1[10])), 16); - x39 = $shiftLeft64((new $Uint64(0, arg1[9])), 8); - x40 = arg1[8]; - x41 = $shiftLeft64((new $Uint64(0, arg1[7])), 56); - x42 = $shiftLeft64((new $Uint64(0, arg1[6])), 48); - x43 = $shiftLeft64((new $Uint64(0, arg1[5])), 40); - x44 = $shiftLeft64((new $Uint64(0, arg1[4])), 32); - x45 = $shiftLeft64((new $Uint64(0, arg1[3])), 24); - x46 = $shiftLeft64((new $Uint64(0, arg1[2])), 16); - x47 = $shiftLeft64((new $Uint64(0, arg1[1])), 8); - x48 = arg1[0]; - x49 = (x = (new $Uint64(0, x48)), new $Uint64(x47.$high + x.$high, x47.$low + x.$low)); - x50 = new $Uint64(x46.$high + x49.$high, x46.$low + x49.$low); - x51 = new $Uint64(x45.$high + x50.$high, x45.$low + x50.$low); - x52 = new $Uint64(x44.$high + x51.$high, x44.$low + x51.$low); - x53 = new $Uint64(x43.$high + x52.$high, x43.$low + x52.$low); - x54 = new $Uint64(x42.$high + x53.$high, x42.$low + x53.$low); - x55 = new $Uint64(x41.$high + x54.$high, x41.$low + x54.$low); - x56 = (x$1 = (new $Uint64(0, x40)), new $Uint64(x39.$high + x$1.$high, x39.$low + x$1.$low)); - x57 = new $Uint64(x38.$high + x56.$high, x38.$low + x56.$low); - x58 = new $Uint64(x37.$high + x57.$high, x37.$low + x57.$low); - x59 = new $Uint64(x36.$high + x58.$high, x36.$low + x58.$low); - x60 = new $Uint64(x35.$high + x59.$high, x35.$low + x59.$low); - x61 = new $Uint64(x34.$high + x60.$high, x34.$low + x60.$low); - x62 = new $Uint64(x33.$high + x61.$high, x33.$low + x61.$low); - x63 = (x$2 = (new $Uint64(0, x32)), new $Uint64(x31.$high + x$2.$high, x31.$low + x$2.$low)); - x64 = new $Uint64(x30.$high + x63.$high, x30.$low + x63.$low); - x65 = new $Uint64(x29.$high + x64.$high, x29.$low + x64.$low); - x66 = new $Uint64(x28.$high + x65.$high, x28.$low + x65.$low); - x67 = new $Uint64(x27.$high + x66.$high, x27.$low + x66.$low); - x68 = new $Uint64(x26.$high + x67.$high, x26.$low + x67.$low); - x69 = new $Uint64(x25.$high + x68.$high, x25.$low + x68.$low); - x70 = (x$3 = (new $Uint64(0, x24)), new $Uint64(x23.$high + x$3.$high, x23.$low + x$3.$low)); - x71 = new $Uint64(x22.$high + x70.$high, x22.$low + x70.$low); - x72 = new $Uint64(x21.$high + x71.$high, x21.$low + x71.$low); - x73 = new $Uint64(x20.$high + x72.$high, x20.$low + x72.$low); - x74 = new $Uint64(x19.$high + x73.$high, x19.$low + x73.$low); - x75 = new $Uint64(x18.$high + x74.$high, x18.$low + x74.$low); - x76 = new $Uint64(x17.$high + x75.$high, x17.$low + x75.$low); - x77 = (x$4 = (new $Uint64(0, x16)), new $Uint64(x15.$high + x$4.$high, x15.$low + x$4.$low)); - x78 = new $Uint64(x14.$high + x77.$high, x14.$low + x77.$low); - x79 = new $Uint64(x13.$high + x78.$high, x13.$low + x78.$low); - x80 = new $Uint64(x12.$high + x79.$high, x12.$low + x79.$low); - x81 = new $Uint64(x11.$high + x80.$high, x11.$low + x80.$low); - x82 = new $Uint64(x10.$high + x81.$high, x10.$low + x81.$low); - x83 = new $Uint64(x9.$high + x82.$high, x9.$low + x82.$low); - x84 = (x$5 = (new $Uint64(0, x8)), new $Uint64(x7.$high + x$5.$high, x7.$low + x$5.$low)); - x85 = new $Uint64(x6.$high + x84.$high, x6.$low + x84.$low); - x86 = new $Uint64(x5.$high + x85.$high, x5.$low + x85.$low); - x87 = new $Uint64(x4.$high + x86.$high, x4.$low + x86.$low); - x88 = new $Uint64(x3.$high + x87.$high, x3.$low + x87.$low); - x89 = new $Uint64(x2.$high + x88.$high, x2.$low + x88.$low); - x90 = new $Uint64(x1.$high + x89.$high, x1.$low + x89.$low); - out1.nilCheck, out1[0] = x55; - out1.nilCheck, out1[1] = x62; - out1.nilCheck, out1[2] = x69; - out1.nilCheck, out1[3] = x76; - out1.nilCheck, out1[4] = x83; - out1.nilCheck, out1[5] = x90; - }; - P384Element.ptr.prototype.One = function() { - var e; - e = this; - p384SetOne(e.x); - return e; - }; - P384Element.prototype.One = function() { return this.$val.One(); }; - P384Element.ptr.prototype.Equal = function(t) { - var e, eBytes, t, tBytes; - e = this; - eBytes = e.Bytes(); - tBytes = t.Bytes(); - return subtle.ConstantTimeCompare(eBytes, tBytes); - }; - P384Element.prototype.Equal = function(t) { return this.$val.Equal(t); }; - P384Element.ptr.prototype.IsZero = function() { - var e, eBytes; - e = this; - eBytes = e.Bytes(); - return subtle.ConstantTimeCompare(eBytes, p384ZeroEncoding); - }; - P384Element.prototype.IsZero = function() { return this.$val.IsZero(); }; - P384Element.ptr.prototype.Set = function(t) { - var e, t; - e = this; - p384MontgomeryDomainFieldElement.copy(e.x, t.x); - return e; - }; - P384Element.prototype.Set = function(t) { return this.$val.Set(t); }; - P384Element.ptr.prototype.Bytes = function() { - var e, out; - e = this; - out = arrayType$4.zero(); - return e.bytes(out); - }; - P384Element.prototype.Bytes = function() { return this.$val.Bytes(); }; - P384Element.ptr.prototype.bytes = function(out) { - var e, out, tmp; - e = this; - tmp = arrayType$1.zero(); - p384FromMontgomery(tmp, e.x); - p384ToBytes(out, (tmp)); - p384InvertEndianness(new sliceType(out)); - return new sliceType(out); - }; - P384Element.prototype.bytes = function(out) { return this.$val.bytes(out); }; - P384Element.ptr.prototype.SetBytes = function(v) { - var _i, _ref, e, i, in$1, tmp, v; - e = this; - if (!((v.$length === 48))) { - return [ptrType$2.nil, errors.New("invalid P384Element encoding")]; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) < ((i < 0 || i >= p384MinusOneEncoding.$length) ? ($throwRuntimeError("index out of range"), undefined) : p384MinusOneEncoding.$array[p384MinusOneEncoding.$offset + i])) { - break; - } - if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) > ((i < 0 || i >= p384MinusOneEncoding.$length) ? ($throwRuntimeError("index out of range"), undefined) : p384MinusOneEncoding.$array[p384MinusOneEncoding.$offset + i])) { - return [ptrType$2.nil, errors.New("invalid P384Element encoding")]; - } - _i++; - } - in$1 = arrayType$4.zero(); - $copySlice(new sliceType(in$1), v); - p384InvertEndianness(new sliceType(in$1)); - tmp = arrayType$1.zero(); - p384FromBytes((tmp), in$1); - p384ToMontgomery(e.x, tmp); - return [e, $ifaceNil]; - }; - P384Element.prototype.SetBytes = function(v) { return this.$val.SetBytes(v); }; - P384Element.ptr.prototype.Add = function(t1, t2) { - var e, t1, t2; - e = this; - p384Add(e.x, t1.x, t2.x); - return e; - }; - P384Element.prototype.Add = function(t1, t2) { return this.$val.Add(t1, t2); }; - P384Element.ptr.prototype.Sub = function(t1, t2) { - var e, t1, t2; - e = this; - p384Sub(e.x, t1.x, t2.x); - return e; - }; - P384Element.prototype.Sub = function(t1, t2) { return this.$val.Sub(t1, t2); }; - P384Element.ptr.prototype.Mul = function(t1, t2) { - var e, t1, t2; - e = this; - p384Mul(e.x, t1.x, t2.x); - return e; - }; - P384Element.prototype.Mul = function(t1, t2) { return this.$val.Mul(t1, t2); }; - P384Element.ptr.prototype.Square = function(t) { - var e, t; - e = this; - p384Square(e.x, t.x); - return e; - }; - P384Element.prototype.Square = function(t) { return this.$val.Square(t); }; - P384Element.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, v; - v = this; - p384Selectznz((v.x), (new p384Uint1(0, cond)), (b.x), (a.x)); - return v; - }; - P384Element.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - p384InvertEndianness = function(v) { - var _q, _tmp, _tmp$1, i, v, x, x$1; - i = 0; - while (true) { - if (!(i < (_q = v.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) { break; } - _tmp = (x = (v.$length - 1 >> 0) - i >> 0, ((x < 0 || x >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x])); - _tmp$1 = ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]); - ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i] = _tmp); - (x$1 = (v.$length - 1 >> 0) - i >> 0, ((x$1 < 0 || x$1 >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x$1] = _tmp$1)); - i = i + (1) >> 0; - } - }; - P224Element.ptr.prototype.Invert = function(x) { - var e, s, s$1, s$2, s$3, s$4, s$5, s$6, s$7, s$8, t0, t1, t2, x, z; - e = this; - z = new P224Element.ptr(arrayType$2.zero()).Set(e); - t0 = new P224Element.ptr(arrayType$2.zero()); - t1 = new P224Element.ptr(arrayType$2.zero()); - t2 = new P224Element.ptr(arrayType$2.zero()); - z.Square(x); - t0.Mul(x, z); - z.Square(t0); - z.Mul(x, z); - t1.Square(z); - s = 1; - while (true) { - if (!(s < 3)) { break; } - t1.Square(t1); - s = s + (1) >> 0; - } - t1.Mul(z, t1); - t2.Square(t1); - s$1 = 1; - while (true) { - if (!(s$1 < 6)) { break; } - t2.Square(t2); - s$1 = s$1 + (1) >> 0; - } - t1.Mul(t1, t2); - s$2 = 0; - while (true) { - if (!(s$2 < 2)) { break; } - t1.Square(t1); - s$2 = s$2 + (1) >> 0; - } - t0.Mul(t0, t1); - t1.Square(t0); - s$3 = 1; - while (true) { - if (!(s$3 < 3)) { break; } - t1.Square(t1); - s$3 = s$3 + (1) >> 0; - } - z.Mul(z, t1); - t1.Square(z); - s$4 = 1; - while (true) { - if (!(s$4 < 14)) { break; } - t1.Square(t1); - s$4 = s$4 + (1) >> 0; - } - t0.Mul(t0, t1); - t1.Square(t0); - s$5 = 1; - while (true) { - if (!(s$5 < 17)) { break; } - t1.Square(t1); - s$5 = s$5 + (1) >> 0; - } - z.Mul(z, t1); - t1.Square(z); - s$6 = 1; - while (true) { - if (!(s$6 < 48)) { break; } - t1.Square(t1); - s$6 = s$6 + (1) >> 0; - } - z.Mul(z, t1); - t1.Square(z); - s$7 = 1; - while (true) { - if (!(s$7 < 31)) { break; } - t1.Square(t1); - s$7 = s$7 + (1) >> 0; - } - t0.Mul(t0, t1); - s$8 = 0; - while (true) { - if (!(s$8 < 97)) { break; } - t0.Square(t0); - s$8 = s$8 + (1) >> 0; - } - z.Mul(z, t0); - return e.Set(z); - }; - P224Element.prototype.Invert = function(x) { return this.$val.Invert(x); }; - p224CmovznzU64 = function(out1, arg1, arg2, arg3) { - var arg1, arg2, arg3, out1, x, x$1, x$2, x1, x2; - x1 = $mul64((new $Uint64(arg1.$high, arg1.$low)), new $Uint64(4294967295, 4294967295)); - x2 = (x = new $Uint64(x1.$high & arg3.$high, (x1.$low & arg3.$low) >>> 0), x$1 = (x$2 = new $Uint64(~x1.$high, ~x1.$low >>> 0), new $Uint64(x$2.$high & arg2.$high, (x$2.$low & arg2.$low) >>> 0)), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - out1.$set(x2); - }; - p224Mul = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, arg1, arg2, out1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$8, x$9, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x199, x2, x20, x200, x200$24ptr, x201, x201$24ptr, x202, x202$24ptr, x203, x203$24ptr, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[0]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple = bits.Mul64(x4, arg2[3]); - x6 = _tuple[0]; - x5 = _tuple[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x4, arg2[2]); - x8 = _tuple$1[0]; - x7 = _tuple$1[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x4, arg2[1]); - x10 = _tuple$2[0]; - x9 = _tuple$2[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x4, arg2[0]); - x12 = _tuple$3[0]; - x11 = _tuple$3[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(x12, x9, new $Uint64(0, 0)); - x13 = _tuple$4[0]; - x14 = _tuple$4[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(x10, x7, ((x = (new p224Uint1(x14.$high, x14.$low)), new $Uint64(x.$high, x.$low)))); - x15 = _tuple$5[0]; - x16 = _tuple$5[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x8, x5, ((x$1 = (new p224Uint1(x16.$high, x16.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x17 = _tuple$6[0]; - x18 = _tuple$6[1]; - x19 = (x$2 = ((x$3 = (new p224Uint1(x18.$high, x18.$low)), new $Uint64(x$3.$high, x$3.$low))), new $Uint64(x$2.$high + x6.$high, x$2.$low + x6.$low)); - x20 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x11, new $Uint64(4294967295, 4294967295)); - x20 = _tuple$7[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x20, new $Uint64(0, 4294967295)); - x23 = _tuple$8[0]; - x22 = _tuple$8[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$9 = bits.Mul64(x20, new $Uint64(4294967295, 4294967295)); - x25 = _tuple$9[0]; - x24 = _tuple$9[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$10 = bits.Mul64(x20, new $Uint64(4294967295, 0)); - x27 = _tuple$10[0]; - x26 = _tuple$10[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x27, x24, new $Uint64(0, 0)); - x28 = _tuple$11[0]; - x29 = _tuple$11[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x25, x22, ((x$4 = (new p224Uint1(x29.$high, x29.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x30 = _tuple$12[0]; - x31 = _tuple$12[1]; - x32 = (x$5 = ((x$6 = (new p224Uint1(x31.$high, x31.$low)), new $Uint64(x$6.$high, x$6.$low))), new $Uint64(x$5.$high + x23.$high, x$5.$low + x23.$low)); - x34 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x11, x20, new $Uint64(0, 0)); - x34 = _tuple$13[1]; - x35 = new $Uint64(0, 0); - x36 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x13, x26, ((x$7 = (new p224Uint1(x34.$high, x34.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x35 = _tuple$14[0]; - x36 = _tuple$14[1]; - x37 = new $Uint64(0, 0); - x38 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x15, x28, ((x$8 = (new p224Uint1(x36.$high, x36.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x37 = _tuple$15[0]; - x38 = _tuple$15[1]; - x39 = new $Uint64(0, 0); - x40 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x17, x30, ((x$9 = (new p224Uint1(x38.$high, x38.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x39 = _tuple$16[0]; - x40 = _tuple$16[1]; - x41 = new $Uint64(0, 0); - x42 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x19, x32, ((x$10 = (new p224Uint1(x40.$high, x40.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x41 = _tuple$17[0]; - x42 = _tuple$17[1]; - x43 = new $Uint64(0, 0); - x44 = new $Uint64(0, 0); - _tuple$18 = bits.Mul64(x1, arg2[3]); - x44 = _tuple$18[0]; - x43 = _tuple$18[1]; - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$19 = bits.Mul64(x1, arg2[2]); - x46 = _tuple$19[0]; - x45 = _tuple$19[1]; - x47 = new $Uint64(0, 0); - x48 = new $Uint64(0, 0); - _tuple$20 = bits.Mul64(x1, arg2[1]); - x48 = _tuple$20[0]; - x47 = _tuple$20[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$21 = bits.Mul64(x1, arg2[0]); - x50 = _tuple$21[0]; - x49 = _tuple$21[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x50, x47, new $Uint64(0, 0)); - x51 = _tuple$22[0]; - x52 = _tuple$22[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x48, x45, ((x$11 = (new p224Uint1(x52.$high, x52.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x53 = _tuple$23[0]; - x54 = _tuple$23[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x46, x43, ((x$12 = (new p224Uint1(x54.$high, x54.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x55 = _tuple$24[0]; - x56 = _tuple$24[1]; - x57 = (x$13 = ((x$14 = (new p224Uint1(x56.$high, x56.$low)), new $Uint64(x$14.$high, x$14.$low))), new $Uint64(x$13.$high + x44.$high, x$13.$low + x44.$low)); - x58 = new $Uint64(0, 0); - x59 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(x35, x49, new $Uint64(0, 0)); - x58 = _tuple$25[0]; - x59 = _tuple$25[1]; - x60 = new $Uint64(0, 0); - x61 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x37, x51, ((x$15 = (new p224Uint1(x59.$high, x59.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x60 = _tuple$26[0]; - x61 = _tuple$26[1]; - x62 = new $Uint64(0, 0); - x63 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x39, x53, ((x$16 = (new p224Uint1(x61.$high, x61.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x62 = _tuple$27[0]; - x63 = _tuple$27[1]; - x64 = new $Uint64(0, 0); - x65 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x41, x55, ((x$17 = (new p224Uint1(x63.$high, x63.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x64 = _tuple$28[0]; - x65 = _tuple$28[1]; - x66 = new $Uint64(0, 0); - x67 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(((x$18 = (new p224Uint1(x42.$high, x42.$low)), new $Uint64(x$18.$high, x$18.$low))), x57, ((x$19 = (new p224Uint1(x65.$high, x65.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x66 = _tuple$29[0]; - x67 = _tuple$29[1]; - x68 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x58, new $Uint64(4294967295, 4294967295)); - x68 = _tuple$30[1]; - x70 = new $Uint64(0, 0); - x71 = new $Uint64(0, 0); - _tuple$31 = bits.Mul64(x68, new $Uint64(0, 4294967295)); - x71 = _tuple$31[0]; - x70 = _tuple$31[1]; - x72 = new $Uint64(0, 0); - x73 = new $Uint64(0, 0); - _tuple$32 = bits.Mul64(x68, new $Uint64(4294967295, 4294967295)); - x73 = _tuple$32[0]; - x72 = _tuple$32[1]; - x74 = new $Uint64(0, 0); - x75 = new $Uint64(0, 0); - _tuple$33 = bits.Mul64(x68, new $Uint64(4294967295, 0)); - x75 = _tuple$33[0]; - x74 = _tuple$33[1]; - x76 = new $Uint64(0, 0); - x77 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x75, x72, new $Uint64(0, 0)); - x76 = _tuple$34[0]; - x77 = _tuple$34[1]; - x78 = new $Uint64(0, 0); - x79 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x73, x70, ((x$20 = (new p224Uint1(x77.$high, x77.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x78 = _tuple$35[0]; - x79 = _tuple$35[1]; - x80 = (x$21 = ((x$22 = (new p224Uint1(x79.$high, x79.$low)), new $Uint64(x$22.$high, x$22.$low))), new $Uint64(x$21.$high + x71.$high, x$21.$low + x71.$low)); - x82 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x58, x68, new $Uint64(0, 0)); - x82 = _tuple$36[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x60, x74, ((x$23 = (new p224Uint1(x82.$high, x82.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x83 = _tuple$37[0]; - x84 = _tuple$37[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x62, x76, ((x$24 = (new p224Uint1(x84.$high, x84.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x85 = _tuple$38[0]; - x86 = _tuple$38[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x64, x78, ((x$25 = (new p224Uint1(x86.$high, x86.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x87 = _tuple$39[0]; - x88 = _tuple$39[1]; - x89 = new $Uint64(0, 0); - x90 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x66, x80, ((x$26 = (new p224Uint1(x88.$high, x88.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x89 = _tuple$40[0]; - x90 = _tuple$40[1]; - x91 = (x$27 = ((x$28 = (new p224Uint1(x90.$high, x90.$low)), new $Uint64(x$28.$high, x$28.$low))), x$29 = ((x$30 = (new p224Uint1(x67.$high, x67.$low)), new $Uint64(x$30.$high, x$30.$low))), new $Uint64(x$27.$high + x$29.$high, x$27.$low + x$29.$low)); - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x2, arg2[3]); - x93 = _tuple$41[0]; - x92 = _tuple$41[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$42 = bits.Mul64(x2, arg2[2]); - x95 = _tuple$42[0]; - x94 = _tuple$42[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$43 = bits.Mul64(x2, arg2[1]); - x97 = _tuple$43[0]; - x96 = _tuple$43[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$44 = bits.Mul64(x2, arg2[0]); - x99 = _tuple$44[0]; - x98 = _tuple$44[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x99, x96, new $Uint64(0, 0)); - x100 = _tuple$45[0]; - x101 = _tuple$45[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x97, x94, ((x$31 = (new p224Uint1(x101.$high, x101.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x102 = _tuple$46[0]; - x103 = _tuple$46[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x95, x92, ((x$32 = (new p224Uint1(x103.$high, x103.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x104 = _tuple$47[0]; - x105 = _tuple$47[1]; - x106 = (x$33 = ((x$34 = (new p224Uint1(x105.$high, x105.$low)), new $Uint64(x$34.$high, x$34.$low))), new $Uint64(x$33.$high + x93.$high, x$33.$low + x93.$low)); - x107 = new $Uint64(0, 0); - x108 = new $Uint64(0, 0); - _tuple$48 = bits.Add64(x83, x98, new $Uint64(0, 0)); - x107 = _tuple$48[0]; - x108 = _tuple$48[1]; - x109 = new $Uint64(0, 0); - x110 = new $Uint64(0, 0); - _tuple$49 = bits.Add64(x85, x100, ((x$35 = (new p224Uint1(x108.$high, x108.$low)), new $Uint64(x$35.$high, x$35.$low)))); - x109 = _tuple$49[0]; - x110 = _tuple$49[1]; - x111 = new $Uint64(0, 0); - x112 = new $Uint64(0, 0); - _tuple$50 = bits.Add64(x87, x102, ((x$36 = (new p224Uint1(x110.$high, x110.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x111 = _tuple$50[0]; - x112 = _tuple$50[1]; - x113 = new $Uint64(0, 0); - x114 = new $Uint64(0, 0); - _tuple$51 = bits.Add64(x89, x104, ((x$37 = (new p224Uint1(x112.$high, x112.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x113 = _tuple$51[0]; - x114 = _tuple$51[1]; - x115 = new $Uint64(0, 0); - x116 = new $Uint64(0, 0); - _tuple$52 = bits.Add64(x91, x106, ((x$38 = (new p224Uint1(x114.$high, x114.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x115 = _tuple$52[0]; - x116 = _tuple$52[1]; - x117 = new $Uint64(0, 0); - _tuple$53 = bits.Mul64(x107, new $Uint64(4294967295, 4294967295)); - x117 = _tuple$53[1]; - x119 = new $Uint64(0, 0); - x120 = new $Uint64(0, 0); - _tuple$54 = bits.Mul64(x117, new $Uint64(0, 4294967295)); - x120 = _tuple$54[0]; - x119 = _tuple$54[1]; - x121 = new $Uint64(0, 0); - x122 = new $Uint64(0, 0); - _tuple$55 = bits.Mul64(x117, new $Uint64(4294967295, 4294967295)); - x122 = _tuple$55[0]; - x121 = _tuple$55[1]; - x123 = new $Uint64(0, 0); - x124 = new $Uint64(0, 0); - _tuple$56 = bits.Mul64(x117, new $Uint64(4294967295, 0)); - x124 = _tuple$56[0]; - x123 = _tuple$56[1]; - x125 = new $Uint64(0, 0); - x126 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x124, x121, new $Uint64(0, 0)); - x125 = _tuple$57[0]; - x126 = _tuple$57[1]; - x127 = new $Uint64(0, 0); - x128 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x122, x119, ((x$39 = (new p224Uint1(x126.$high, x126.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x127 = _tuple$58[0]; - x128 = _tuple$58[1]; - x129 = (x$40 = ((x$41 = (new p224Uint1(x128.$high, x128.$low)), new $Uint64(x$41.$high, x$41.$low))), new $Uint64(x$40.$high + x120.$high, x$40.$low + x120.$low)); - x131 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x107, x117, new $Uint64(0, 0)); - x131 = _tuple$59[1]; - x132 = new $Uint64(0, 0); - x133 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x109, x123, ((x$42 = (new p224Uint1(x131.$high, x131.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x132 = _tuple$60[0]; - x133 = _tuple$60[1]; - x134 = new $Uint64(0, 0); - x135 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x111, x125, ((x$43 = (new p224Uint1(x133.$high, x133.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x134 = _tuple$61[0]; - x135 = _tuple$61[1]; - x136 = new $Uint64(0, 0); - x137 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x113, x127, ((x$44 = (new p224Uint1(x135.$high, x135.$low)), new $Uint64(x$44.$high, x$44.$low)))); - x136 = _tuple$62[0]; - x137 = _tuple$62[1]; - x138 = new $Uint64(0, 0); - x139 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x115, x129, ((x$45 = (new p224Uint1(x137.$high, x137.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x138 = _tuple$63[0]; - x139 = _tuple$63[1]; - x140 = (x$46 = ((x$47 = (new p224Uint1(x139.$high, x139.$low)), new $Uint64(x$47.$high, x$47.$low))), x$48 = ((x$49 = (new p224Uint1(x116.$high, x116.$low)), new $Uint64(x$49.$high, x$49.$low))), new $Uint64(x$46.$high + x$48.$high, x$46.$low + x$48.$low)); - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$64 = bits.Mul64(x3, arg2[3]); - x142 = _tuple$64[0]; - x141 = _tuple$64[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$65 = bits.Mul64(x3, arg2[2]); - x144 = _tuple$65[0]; - x143 = _tuple$65[1]; - x145 = new $Uint64(0, 0); - x146 = new $Uint64(0, 0); - _tuple$66 = bits.Mul64(x3, arg2[1]); - x146 = _tuple$66[0]; - x145 = _tuple$66[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$67 = bits.Mul64(x3, arg2[0]); - x148 = _tuple$67[0]; - x147 = _tuple$67[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x148, x145, new $Uint64(0, 0)); - x149 = _tuple$68[0]; - x150 = _tuple$68[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x146, x143, ((x$50 = (new p224Uint1(x150.$high, x150.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x151 = _tuple$69[0]; - x152 = _tuple$69[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(x144, x141, ((x$51 = (new p224Uint1(x152.$high, x152.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x153 = _tuple$70[0]; - x154 = _tuple$70[1]; - x155 = (x$52 = ((x$53 = (new p224Uint1(x154.$high, x154.$low)), new $Uint64(x$53.$high, x$53.$low))), new $Uint64(x$52.$high + x142.$high, x$52.$low + x142.$low)); - x156 = new $Uint64(0, 0); - x157 = new $Uint64(0, 0); - _tuple$71 = bits.Add64(x132, x147, new $Uint64(0, 0)); - x156 = _tuple$71[0]; - x157 = _tuple$71[1]; - x158 = new $Uint64(0, 0); - x159 = new $Uint64(0, 0); - _tuple$72 = bits.Add64(x134, x149, ((x$54 = (new p224Uint1(x157.$high, x157.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x158 = _tuple$72[0]; - x159 = _tuple$72[1]; - x160 = new $Uint64(0, 0); - x161 = new $Uint64(0, 0); - _tuple$73 = bits.Add64(x136, x151, ((x$55 = (new p224Uint1(x159.$high, x159.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x160 = _tuple$73[0]; - x161 = _tuple$73[1]; - x162 = new $Uint64(0, 0); - x163 = new $Uint64(0, 0); - _tuple$74 = bits.Add64(x138, x153, ((x$56 = (new p224Uint1(x161.$high, x161.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x162 = _tuple$74[0]; - x163 = _tuple$74[1]; - x164 = new $Uint64(0, 0); - x165 = new $Uint64(0, 0); - _tuple$75 = bits.Add64(x140, x155, ((x$57 = (new p224Uint1(x163.$high, x163.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x164 = _tuple$75[0]; - x165 = _tuple$75[1]; - x166 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x156, new $Uint64(4294967295, 4294967295)); - x166 = _tuple$76[1]; - x168 = new $Uint64(0, 0); - x169 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x166, new $Uint64(0, 4294967295)); - x169 = _tuple$77[0]; - x168 = _tuple$77[1]; - x170 = new $Uint64(0, 0); - x171 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x166, new $Uint64(4294967295, 4294967295)); - x171 = _tuple$78[0]; - x170 = _tuple$78[1]; - x172 = new $Uint64(0, 0); - x173 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x166, new $Uint64(4294967295, 0)); - x173 = _tuple$79[0]; - x172 = _tuple$79[1]; - x174 = new $Uint64(0, 0); - x175 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x173, x170, new $Uint64(0, 0)); - x174 = _tuple$80[0]; - x175 = _tuple$80[1]; - x176 = new $Uint64(0, 0); - x177 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x171, x168, ((x$58 = (new p224Uint1(x175.$high, x175.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x176 = _tuple$81[0]; - x177 = _tuple$81[1]; - x178 = (x$59 = ((x$60 = (new p224Uint1(x177.$high, x177.$low)), new $Uint64(x$60.$high, x$60.$low))), new $Uint64(x$59.$high + x169.$high, x$59.$low + x169.$low)); - x180 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x156, x166, new $Uint64(0, 0)); - x180 = _tuple$82[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x158, x172, ((x$61 = (new p224Uint1(x180.$high, x180.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x181 = _tuple$83[0]; - x182 = _tuple$83[1]; - x183 = new $Uint64(0, 0); - x184 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x160, x174, ((x$62 = (new p224Uint1(x182.$high, x182.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x183 = _tuple$84[0]; - x184 = _tuple$84[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x162, x176, ((x$63 = (new p224Uint1(x184.$high, x184.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x185 = _tuple$85[0]; - x186 = _tuple$85[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x164, x178, ((x$64 = (new p224Uint1(x186.$high, x186.$low)), new $Uint64(x$64.$high, x$64.$low)))); - x187 = _tuple$86[0]; - x188 = _tuple$86[1]; - x189 = (x$65 = ((x$66 = (new p224Uint1(x188.$high, x188.$low)), new $Uint64(x$66.$high, x$66.$low))), x$67 = ((x$68 = (new p224Uint1(x165.$high, x165.$low)), new $Uint64(x$68.$high, x$68.$low))), new $Uint64(x$65.$high + x$67.$high, x$65.$low + x$67.$low)); - x190 = new $Uint64(0, 0); - x191 = new $Uint64(0, 0); - _tuple$87 = bits.Sub64(x181, new $Uint64(0, 1), new $Uint64(0, 0)); - x190 = _tuple$87[0]; - x191 = _tuple$87[1]; - x192 = new $Uint64(0, 0); - x193 = new $Uint64(0, 0); - _tuple$88 = bits.Sub64(x183, new $Uint64(4294967295, 0), ((x$69 = (new p224Uint1(x191.$high, x191.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x192 = _tuple$88[0]; - x193 = _tuple$88[1]; - x194 = new $Uint64(0, 0); - x195 = new $Uint64(0, 0); - _tuple$89 = bits.Sub64(x185, new $Uint64(4294967295, 4294967295), ((x$70 = (new p224Uint1(x193.$high, x193.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x194 = _tuple$89[0]; - x195 = _tuple$89[1]; - x196 = new $Uint64(0, 0); - x197 = new $Uint64(0, 0); - _tuple$90 = bits.Sub64(x187, new $Uint64(0, 4294967295), ((x$71 = (new p224Uint1(x195.$high, x195.$low)), new $Uint64(x$71.$high, x$71.$low)))); - x196 = _tuple$90[0]; - x197 = _tuple$90[1]; - x199 = new $Uint64(0, 0); - _tuple$91 = bits.Sub64(x189, new $Uint64(0, 0), ((x$72 = (new p224Uint1(x197.$high, x197.$low)), new $Uint64(x$72.$high, x$72.$low)))); - x199 = _tuple$91[1]; - x200 = new $Uint64(0, 0); - p224CmovznzU64((x200$24ptr || (x200$24ptr = new ptrType(function() { return x200; }, function($v) { x200 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x190, x181); - x201 = new $Uint64(0, 0); - p224CmovznzU64((x201$24ptr || (x201$24ptr = new ptrType(function() { return x201; }, function($v) { x201 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x192, x183); - x202 = new $Uint64(0, 0); - p224CmovznzU64((x202$24ptr || (x202$24ptr = new ptrType(function() { return x202; }, function($v) { x202 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x194, x185); - x203 = new $Uint64(0, 0); - p224CmovznzU64((x203$24ptr || (x203$24ptr = new ptrType(function() { return x203; }, function($v) { x203 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x196, x187); - out1.nilCheck, out1[0] = x200; - out1.nilCheck, out1[1] = x201; - out1.nilCheck, out1[2] = x202; - out1.nilCheck, out1[3] = x203; - }; - p224Square = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$85, _tuple$86, _tuple$87, _tuple$88, _tuple$89, _tuple$9, _tuple$90, _tuple$91, arg1, out1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$8, x$9, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x115, x116, x117, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x146, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x157, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x168, x169, x17, x170, x171, x172, x173, x174, x175, x176, x177, x178, x18, x180, x181, x182, x183, x184, x185, x186, x187, x188, x189, x19, x190, x191, x192, x193, x194, x195, x196, x197, x199, x2, x20, x200, x200$24ptr, x201, x201$24ptr, x202, x202$24ptr, x203, x203$24ptr, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x66, x67, x68, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[0]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple = bits.Mul64(x4, arg1[3]); - x6 = _tuple[0]; - x5 = _tuple[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x4, arg1[2]); - x8 = _tuple$1[0]; - x7 = _tuple$1[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x4, arg1[1]); - x10 = _tuple$2[0]; - x9 = _tuple$2[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x4, arg1[0]); - x12 = _tuple$3[0]; - x11 = _tuple$3[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(x12, x9, new $Uint64(0, 0)); - x13 = _tuple$4[0]; - x14 = _tuple$4[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(x10, x7, ((x = (new p224Uint1(x14.$high, x14.$low)), new $Uint64(x.$high, x.$low)))); - x15 = _tuple$5[0]; - x16 = _tuple$5[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x8, x5, ((x$1 = (new p224Uint1(x16.$high, x16.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x17 = _tuple$6[0]; - x18 = _tuple$6[1]; - x19 = (x$2 = ((x$3 = (new p224Uint1(x18.$high, x18.$low)), new $Uint64(x$3.$high, x$3.$low))), new $Uint64(x$2.$high + x6.$high, x$2.$low + x6.$low)); - x20 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x11, new $Uint64(4294967295, 4294967295)); - x20 = _tuple$7[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x20, new $Uint64(0, 4294967295)); - x23 = _tuple$8[0]; - x22 = _tuple$8[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$9 = bits.Mul64(x20, new $Uint64(4294967295, 4294967295)); - x25 = _tuple$9[0]; - x24 = _tuple$9[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$10 = bits.Mul64(x20, new $Uint64(4294967295, 0)); - x27 = _tuple$10[0]; - x26 = _tuple$10[1]; - x28 = new $Uint64(0, 0); - x29 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x27, x24, new $Uint64(0, 0)); - x28 = _tuple$11[0]; - x29 = _tuple$11[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x25, x22, ((x$4 = (new p224Uint1(x29.$high, x29.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x30 = _tuple$12[0]; - x31 = _tuple$12[1]; - x32 = (x$5 = ((x$6 = (new p224Uint1(x31.$high, x31.$low)), new $Uint64(x$6.$high, x$6.$low))), new $Uint64(x$5.$high + x23.$high, x$5.$low + x23.$low)); - x34 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x11, x20, new $Uint64(0, 0)); - x34 = _tuple$13[1]; - x35 = new $Uint64(0, 0); - x36 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x13, x26, ((x$7 = (new p224Uint1(x34.$high, x34.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x35 = _tuple$14[0]; - x36 = _tuple$14[1]; - x37 = new $Uint64(0, 0); - x38 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x15, x28, ((x$8 = (new p224Uint1(x36.$high, x36.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x37 = _tuple$15[0]; - x38 = _tuple$15[1]; - x39 = new $Uint64(0, 0); - x40 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x17, x30, ((x$9 = (new p224Uint1(x38.$high, x38.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x39 = _tuple$16[0]; - x40 = _tuple$16[1]; - x41 = new $Uint64(0, 0); - x42 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x19, x32, ((x$10 = (new p224Uint1(x40.$high, x40.$low)), new $Uint64(x$10.$high, x$10.$low)))); - x41 = _tuple$17[0]; - x42 = _tuple$17[1]; - x43 = new $Uint64(0, 0); - x44 = new $Uint64(0, 0); - _tuple$18 = bits.Mul64(x1, arg1[3]); - x44 = _tuple$18[0]; - x43 = _tuple$18[1]; - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$19 = bits.Mul64(x1, arg1[2]); - x46 = _tuple$19[0]; - x45 = _tuple$19[1]; - x47 = new $Uint64(0, 0); - x48 = new $Uint64(0, 0); - _tuple$20 = bits.Mul64(x1, arg1[1]); - x48 = _tuple$20[0]; - x47 = _tuple$20[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$21 = bits.Mul64(x1, arg1[0]); - x50 = _tuple$21[0]; - x49 = _tuple$21[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x50, x47, new $Uint64(0, 0)); - x51 = _tuple$22[0]; - x52 = _tuple$22[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x48, x45, ((x$11 = (new p224Uint1(x52.$high, x52.$low)), new $Uint64(x$11.$high, x$11.$low)))); - x53 = _tuple$23[0]; - x54 = _tuple$23[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x46, x43, ((x$12 = (new p224Uint1(x54.$high, x54.$low)), new $Uint64(x$12.$high, x$12.$low)))); - x55 = _tuple$24[0]; - x56 = _tuple$24[1]; - x57 = (x$13 = ((x$14 = (new p224Uint1(x56.$high, x56.$low)), new $Uint64(x$14.$high, x$14.$low))), new $Uint64(x$13.$high + x44.$high, x$13.$low + x44.$low)); - x58 = new $Uint64(0, 0); - x59 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(x35, x49, new $Uint64(0, 0)); - x58 = _tuple$25[0]; - x59 = _tuple$25[1]; - x60 = new $Uint64(0, 0); - x61 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x37, x51, ((x$15 = (new p224Uint1(x59.$high, x59.$low)), new $Uint64(x$15.$high, x$15.$low)))); - x60 = _tuple$26[0]; - x61 = _tuple$26[1]; - x62 = new $Uint64(0, 0); - x63 = new $Uint64(0, 0); - _tuple$27 = bits.Add64(x39, x53, ((x$16 = (new p224Uint1(x61.$high, x61.$low)), new $Uint64(x$16.$high, x$16.$low)))); - x62 = _tuple$27[0]; - x63 = _tuple$27[1]; - x64 = new $Uint64(0, 0); - x65 = new $Uint64(0, 0); - _tuple$28 = bits.Add64(x41, x55, ((x$17 = (new p224Uint1(x63.$high, x63.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x64 = _tuple$28[0]; - x65 = _tuple$28[1]; - x66 = new $Uint64(0, 0); - x67 = new $Uint64(0, 0); - _tuple$29 = bits.Add64(((x$18 = (new p224Uint1(x42.$high, x42.$low)), new $Uint64(x$18.$high, x$18.$low))), x57, ((x$19 = (new p224Uint1(x65.$high, x65.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x66 = _tuple$29[0]; - x67 = _tuple$29[1]; - x68 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x58, new $Uint64(4294967295, 4294967295)); - x68 = _tuple$30[1]; - x70 = new $Uint64(0, 0); - x71 = new $Uint64(0, 0); - _tuple$31 = bits.Mul64(x68, new $Uint64(0, 4294967295)); - x71 = _tuple$31[0]; - x70 = _tuple$31[1]; - x72 = new $Uint64(0, 0); - x73 = new $Uint64(0, 0); - _tuple$32 = bits.Mul64(x68, new $Uint64(4294967295, 4294967295)); - x73 = _tuple$32[0]; - x72 = _tuple$32[1]; - x74 = new $Uint64(0, 0); - x75 = new $Uint64(0, 0); - _tuple$33 = bits.Mul64(x68, new $Uint64(4294967295, 0)); - x75 = _tuple$33[0]; - x74 = _tuple$33[1]; - x76 = new $Uint64(0, 0); - x77 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x75, x72, new $Uint64(0, 0)); - x76 = _tuple$34[0]; - x77 = _tuple$34[1]; - x78 = new $Uint64(0, 0); - x79 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x73, x70, ((x$20 = (new p224Uint1(x77.$high, x77.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x78 = _tuple$35[0]; - x79 = _tuple$35[1]; - x80 = (x$21 = ((x$22 = (new p224Uint1(x79.$high, x79.$low)), new $Uint64(x$22.$high, x$22.$low))), new $Uint64(x$21.$high + x71.$high, x$21.$low + x71.$low)); - x82 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x58, x68, new $Uint64(0, 0)); - x82 = _tuple$36[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x60, x74, ((x$23 = (new p224Uint1(x82.$high, x82.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x83 = _tuple$37[0]; - x84 = _tuple$37[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x62, x76, ((x$24 = (new p224Uint1(x84.$high, x84.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x85 = _tuple$38[0]; - x86 = _tuple$38[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$39 = bits.Add64(x64, x78, ((x$25 = (new p224Uint1(x86.$high, x86.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x87 = _tuple$39[0]; - x88 = _tuple$39[1]; - x89 = new $Uint64(0, 0); - x90 = new $Uint64(0, 0); - _tuple$40 = bits.Add64(x66, x80, ((x$26 = (new p224Uint1(x88.$high, x88.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x89 = _tuple$40[0]; - x90 = _tuple$40[1]; - x91 = (x$27 = ((x$28 = (new p224Uint1(x90.$high, x90.$low)), new $Uint64(x$28.$high, x$28.$low))), x$29 = ((x$30 = (new p224Uint1(x67.$high, x67.$low)), new $Uint64(x$30.$high, x$30.$low))), new $Uint64(x$27.$high + x$29.$high, x$27.$low + x$29.$low)); - x92 = new $Uint64(0, 0); - x93 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x2, arg1[3]); - x93 = _tuple$41[0]; - x92 = _tuple$41[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$42 = bits.Mul64(x2, arg1[2]); - x95 = _tuple$42[0]; - x94 = _tuple$42[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$43 = bits.Mul64(x2, arg1[1]); - x97 = _tuple$43[0]; - x96 = _tuple$43[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$44 = bits.Mul64(x2, arg1[0]); - x99 = _tuple$44[0]; - x98 = _tuple$44[1]; - x100 = new $Uint64(0, 0); - x101 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x99, x96, new $Uint64(0, 0)); - x100 = _tuple$45[0]; - x101 = _tuple$45[1]; - x102 = new $Uint64(0, 0); - x103 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x97, x94, ((x$31 = (new p224Uint1(x101.$high, x101.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x102 = _tuple$46[0]; - x103 = _tuple$46[1]; - x104 = new $Uint64(0, 0); - x105 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x95, x92, ((x$32 = (new p224Uint1(x103.$high, x103.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x104 = _tuple$47[0]; - x105 = _tuple$47[1]; - x106 = (x$33 = ((x$34 = (new p224Uint1(x105.$high, x105.$low)), new $Uint64(x$34.$high, x$34.$low))), new $Uint64(x$33.$high + x93.$high, x$33.$low + x93.$low)); - x107 = new $Uint64(0, 0); - x108 = new $Uint64(0, 0); - _tuple$48 = bits.Add64(x83, x98, new $Uint64(0, 0)); - x107 = _tuple$48[0]; - x108 = _tuple$48[1]; - x109 = new $Uint64(0, 0); - x110 = new $Uint64(0, 0); - _tuple$49 = bits.Add64(x85, x100, ((x$35 = (new p224Uint1(x108.$high, x108.$low)), new $Uint64(x$35.$high, x$35.$low)))); - x109 = _tuple$49[0]; - x110 = _tuple$49[1]; - x111 = new $Uint64(0, 0); - x112 = new $Uint64(0, 0); - _tuple$50 = bits.Add64(x87, x102, ((x$36 = (new p224Uint1(x110.$high, x110.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x111 = _tuple$50[0]; - x112 = _tuple$50[1]; - x113 = new $Uint64(0, 0); - x114 = new $Uint64(0, 0); - _tuple$51 = bits.Add64(x89, x104, ((x$37 = (new p224Uint1(x112.$high, x112.$low)), new $Uint64(x$37.$high, x$37.$low)))); - x113 = _tuple$51[0]; - x114 = _tuple$51[1]; - x115 = new $Uint64(0, 0); - x116 = new $Uint64(0, 0); - _tuple$52 = bits.Add64(x91, x106, ((x$38 = (new p224Uint1(x114.$high, x114.$low)), new $Uint64(x$38.$high, x$38.$low)))); - x115 = _tuple$52[0]; - x116 = _tuple$52[1]; - x117 = new $Uint64(0, 0); - _tuple$53 = bits.Mul64(x107, new $Uint64(4294967295, 4294967295)); - x117 = _tuple$53[1]; - x119 = new $Uint64(0, 0); - x120 = new $Uint64(0, 0); - _tuple$54 = bits.Mul64(x117, new $Uint64(0, 4294967295)); - x120 = _tuple$54[0]; - x119 = _tuple$54[1]; - x121 = new $Uint64(0, 0); - x122 = new $Uint64(0, 0); - _tuple$55 = bits.Mul64(x117, new $Uint64(4294967295, 4294967295)); - x122 = _tuple$55[0]; - x121 = _tuple$55[1]; - x123 = new $Uint64(0, 0); - x124 = new $Uint64(0, 0); - _tuple$56 = bits.Mul64(x117, new $Uint64(4294967295, 0)); - x124 = _tuple$56[0]; - x123 = _tuple$56[1]; - x125 = new $Uint64(0, 0); - x126 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x124, x121, new $Uint64(0, 0)); - x125 = _tuple$57[0]; - x126 = _tuple$57[1]; - x127 = new $Uint64(0, 0); - x128 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x122, x119, ((x$39 = (new p224Uint1(x126.$high, x126.$low)), new $Uint64(x$39.$high, x$39.$low)))); - x127 = _tuple$58[0]; - x128 = _tuple$58[1]; - x129 = (x$40 = ((x$41 = (new p224Uint1(x128.$high, x128.$low)), new $Uint64(x$41.$high, x$41.$low))), new $Uint64(x$40.$high + x120.$high, x$40.$low + x120.$low)); - x131 = new $Uint64(0, 0); - _tuple$59 = bits.Add64(x107, x117, new $Uint64(0, 0)); - x131 = _tuple$59[1]; - x132 = new $Uint64(0, 0); - x133 = new $Uint64(0, 0); - _tuple$60 = bits.Add64(x109, x123, ((x$42 = (new p224Uint1(x131.$high, x131.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x132 = _tuple$60[0]; - x133 = _tuple$60[1]; - x134 = new $Uint64(0, 0); - x135 = new $Uint64(0, 0); - _tuple$61 = bits.Add64(x111, x125, ((x$43 = (new p224Uint1(x133.$high, x133.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x134 = _tuple$61[0]; - x135 = _tuple$61[1]; - x136 = new $Uint64(0, 0); - x137 = new $Uint64(0, 0); - _tuple$62 = bits.Add64(x113, x127, ((x$44 = (new p224Uint1(x135.$high, x135.$low)), new $Uint64(x$44.$high, x$44.$low)))); - x136 = _tuple$62[0]; - x137 = _tuple$62[1]; - x138 = new $Uint64(0, 0); - x139 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x115, x129, ((x$45 = (new p224Uint1(x137.$high, x137.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x138 = _tuple$63[0]; - x139 = _tuple$63[1]; - x140 = (x$46 = ((x$47 = (new p224Uint1(x139.$high, x139.$low)), new $Uint64(x$47.$high, x$47.$low))), x$48 = ((x$49 = (new p224Uint1(x116.$high, x116.$low)), new $Uint64(x$49.$high, x$49.$low))), new $Uint64(x$46.$high + x$48.$high, x$46.$low + x$48.$low)); - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$64 = bits.Mul64(x3, arg1[3]); - x142 = _tuple$64[0]; - x141 = _tuple$64[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$65 = bits.Mul64(x3, arg1[2]); - x144 = _tuple$65[0]; - x143 = _tuple$65[1]; - x145 = new $Uint64(0, 0); - x146 = new $Uint64(0, 0); - _tuple$66 = bits.Mul64(x3, arg1[1]); - x146 = _tuple$66[0]; - x145 = _tuple$66[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$67 = bits.Mul64(x3, arg1[0]); - x148 = _tuple$67[0]; - x147 = _tuple$67[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x148, x145, new $Uint64(0, 0)); - x149 = _tuple$68[0]; - x150 = _tuple$68[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$69 = bits.Add64(x146, x143, ((x$50 = (new p224Uint1(x150.$high, x150.$low)), new $Uint64(x$50.$high, x$50.$low)))); - x151 = _tuple$69[0]; - x152 = _tuple$69[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$70 = bits.Add64(x144, x141, ((x$51 = (new p224Uint1(x152.$high, x152.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x153 = _tuple$70[0]; - x154 = _tuple$70[1]; - x155 = (x$52 = ((x$53 = (new p224Uint1(x154.$high, x154.$low)), new $Uint64(x$53.$high, x$53.$low))), new $Uint64(x$52.$high + x142.$high, x$52.$low + x142.$low)); - x156 = new $Uint64(0, 0); - x157 = new $Uint64(0, 0); - _tuple$71 = bits.Add64(x132, x147, new $Uint64(0, 0)); - x156 = _tuple$71[0]; - x157 = _tuple$71[1]; - x158 = new $Uint64(0, 0); - x159 = new $Uint64(0, 0); - _tuple$72 = bits.Add64(x134, x149, ((x$54 = (new p224Uint1(x157.$high, x157.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x158 = _tuple$72[0]; - x159 = _tuple$72[1]; - x160 = new $Uint64(0, 0); - x161 = new $Uint64(0, 0); - _tuple$73 = bits.Add64(x136, x151, ((x$55 = (new p224Uint1(x159.$high, x159.$low)), new $Uint64(x$55.$high, x$55.$low)))); - x160 = _tuple$73[0]; - x161 = _tuple$73[1]; - x162 = new $Uint64(0, 0); - x163 = new $Uint64(0, 0); - _tuple$74 = bits.Add64(x138, x153, ((x$56 = (new p224Uint1(x161.$high, x161.$low)), new $Uint64(x$56.$high, x$56.$low)))); - x162 = _tuple$74[0]; - x163 = _tuple$74[1]; - x164 = new $Uint64(0, 0); - x165 = new $Uint64(0, 0); - _tuple$75 = bits.Add64(x140, x155, ((x$57 = (new p224Uint1(x163.$high, x163.$low)), new $Uint64(x$57.$high, x$57.$low)))); - x164 = _tuple$75[0]; - x165 = _tuple$75[1]; - x166 = new $Uint64(0, 0); - _tuple$76 = bits.Mul64(x156, new $Uint64(4294967295, 4294967295)); - x166 = _tuple$76[1]; - x168 = new $Uint64(0, 0); - x169 = new $Uint64(0, 0); - _tuple$77 = bits.Mul64(x166, new $Uint64(0, 4294967295)); - x169 = _tuple$77[0]; - x168 = _tuple$77[1]; - x170 = new $Uint64(0, 0); - x171 = new $Uint64(0, 0); - _tuple$78 = bits.Mul64(x166, new $Uint64(4294967295, 4294967295)); - x171 = _tuple$78[0]; - x170 = _tuple$78[1]; - x172 = new $Uint64(0, 0); - x173 = new $Uint64(0, 0); - _tuple$79 = bits.Mul64(x166, new $Uint64(4294967295, 0)); - x173 = _tuple$79[0]; - x172 = _tuple$79[1]; - x174 = new $Uint64(0, 0); - x175 = new $Uint64(0, 0); - _tuple$80 = bits.Add64(x173, x170, new $Uint64(0, 0)); - x174 = _tuple$80[0]; - x175 = _tuple$80[1]; - x176 = new $Uint64(0, 0); - x177 = new $Uint64(0, 0); - _tuple$81 = bits.Add64(x171, x168, ((x$58 = (new p224Uint1(x175.$high, x175.$low)), new $Uint64(x$58.$high, x$58.$low)))); - x176 = _tuple$81[0]; - x177 = _tuple$81[1]; - x178 = (x$59 = ((x$60 = (new p224Uint1(x177.$high, x177.$low)), new $Uint64(x$60.$high, x$60.$low))), new $Uint64(x$59.$high + x169.$high, x$59.$low + x169.$low)); - x180 = new $Uint64(0, 0); - _tuple$82 = bits.Add64(x156, x166, new $Uint64(0, 0)); - x180 = _tuple$82[1]; - x181 = new $Uint64(0, 0); - x182 = new $Uint64(0, 0); - _tuple$83 = bits.Add64(x158, x172, ((x$61 = (new p224Uint1(x180.$high, x180.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x181 = _tuple$83[0]; - x182 = _tuple$83[1]; - x183 = new $Uint64(0, 0); - x184 = new $Uint64(0, 0); - _tuple$84 = bits.Add64(x160, x174, ((x$62 = (new p224Uint1(x182.$high, x182.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x183 = _tuple$84[0]; - x184 = _tuple$84[1]; - x185 = new $Uint64(0, 0); - x186 = new $Uint64(0, 0); - _tuple$85 = bits.Add64(x162, x176, ((x$63 = (new p224Uint1(x184.$high, x184.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x185 = _tuple$85[0]; - x186 = _tuple$85[1]; - x187 = new $Uint64(0, 0); - x188 = new $Uint64(0, 0); - _tuple$86 = bits.Add64(x164, x178, ((x$64 = (new p224Uint1(x186.$high, x186.$low)), new $Uint64(x$64.$high, x$64.$low)))); - x187 = _tuple$86[0]; - x188 = _tuple$86[1]; - x189 = (x$65 = ((x$66 = (new p224Uint1(x188.$high, x188.$low)), new $Uint64(x$66.$high, x$66.$low))), x$67 = ((x$68 = (new p224Uint1(x165.$high, x165.$low)), new $Uint64(x$68.$high, x$68.$low))), new $Uint64(x$65.$high + x$67.$high, x$65.$low + x$67.$low)); - x190 = new $Uint64(0, 0); - x191 = new $Uint64(0, 0); - _tuple$87 = bits.Sub64(x181, new $Uint64(0, 1), new $Uint64(0, 0)); - x190 = _tuple$87[0]; - x191 = _tuple$87[1]; - x192 = new $Uint64(0, 0); - x193 = new $Uint64(0, 0); - _tuple$88 = bits.Sub64(x183, new $Uint64(4294967295, 0), ((x$69 = (new p224Uint1(x191.$high, x191.$low)), new $Uint64(x$69.$high, x$69.$low)))); - x192 = _tuple$88[0]; - x193 = _tuple$88[1]; - x194 = new $Uint64(0, 0); - x195 = new $Uint64(0, 0); - _tuple$89 = bits.Sub64(x185, new $Uint64(4294967295, 4294967295), ((x$70 = (new p224Uint1(x193.$high, x193.$low)), new $Uint64(x$70.$high, x$70.$low)))); - x194 = _tuple$89[0]; - x195 = _tuple$89[1]; - x196 = new $Uint64(0, 0); - x197 = new $Uint64(0, 0); - _tuple$90 = bits.Sub64(x187, new $Uint64(0, 4294967295), ((x$71 = (new p224Uint1(x195.$high, x195.$low)), new $Uint64(x$71.$high, x$71.$low)))); - x196 = _tuple$90[0]; - x197 = _tuple$90[1]; - x199 = new $Uint64(0, 0); - _tuple$91 = bits.Sub64(x189, new $Uint64(0, 0), ((x$72 = (new p224Uint1(x197.$high, x197.$low)), new $Uint64(x$72.$high, x$72.$low)))); - x199 = _tuple$91[1]; - x200 = new $Uint64(0, 0); - p224CmovznzU64((x200$24ptr || (x200$24ptr = new ptrType(function() { return x200; }, function($v) { x200 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x190, x181); - x201 = new $Uint64(0, 0); - p224CmovznzU64((x201$24ptr || (x201$24ptr = new ptrType(function() { return x201; }, function($v) { x201 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x192, x183); - x202 = new $Uint64(0, 0); - p224CmovznzU64((x202$24ptr || (x202$24ptr = new ptrType(function() { return x202; }, function($v) { x202 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x194, x185); - x203 = new $Uint64(0, 0); - p224CmovznzU64((x203$24ptr || (x203$24ptr = new ptrType(function() { return x203; }, function($v) { x203 = $v; }))), (new p224Uint1(x199.$high, x199.$low)), x196, x187); - out1.nilCheck, out1[0] = x200; - out1.nilCheck, out1[1] = x201; - out1.nilCheck, out1[2] = x202; - out1.nilCheck, out1[3] = x203; - }; - p224Add = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, arg1, arg2, out1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x1, x10, x11, x12, x13, x14, x15, x16, x18, x19, x19$24ptr, x2, x20, x20$24ptr, x21, x21$24ptr, x22, x22$24ptr, x3, x4, x5, x6, x7, x8, x9; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Add64(arg1[0], arg2[0], new $Uint64(0, 0)); - x1 = _tuple[0]; - x2 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Add64(arg1[1], arg2[1], ((x = (new p224Uint1(x2.$high, x2.$low)), new $Uint64(x.$high, x.$low)))); - x3 = _tuple$1[0]; - x4 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Add64(arg1[2], arg2[2], ((x$1 = (new p224Uint1(x4.$high, x4.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Add64(arg1[3], arg2[3], ((x$2 = (new p224Uint1(x6.$high, x6.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x7 = _tuple$3[0]; - x8 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$4 = bits.Sub64(x1, new $Uint64(0, 1), new $Uint64(0, 0)); - x9 = _tuple$4[0]; - x10 = _tuple$4[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$5 = bits.Sub64(x3, new $Uint64(4294967295, 0), ((x$3 = (new p224Uint1(x10.$high, x10.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x11 = _tuple$5[0]; - x12 = _tuple$5[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$6 = bits.Sub64(x5, new $Uint64(4294967295, 4294967295), ((x$4 = (new p224Uint1(x12.$high, x12.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x13 = _tuple$6[0]; - x14 = _tuple$6[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$7 = bits.Sub64(x7, new $Uint64(0, 4294967295), ((x$5 = (new p224Uint1(x14.$high, x14.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x15 = _tuple$7[0]; - x16 = _tuple$7[1]; - x18 = new $Uint64(0, 0); - _tuple$8 = bits.Sub64(((x$6 = (new p224Uint1(x8.$high, x8.$low)), new $Uint64(x$6.$high, x$6.$low))), new $Uint64(0, 0), ((x$7 = (new p224Uint1(x16.$high, x16.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x18 = _tuple$8[1]; - x19 = new $Uint64(0, 0); - p224CmovznzU64((x19$24ptr || (x19$24ptr = new ptrType(function() { return x19; }, function($v) { x19 = $v; }))), (new p224Uint1(x18.$high, x18.$low)), x9, x1); - x20 = new $Uint64(0, 0); - p224CmovznzU64((x20$24ptr || (x20$24ptr = new ptrType(function() { return x20; }, function($v) { x20 = $v; }))), (new p224Uint1(x18.$high, x18.$low)), x11, x3); - x21 = new $Uint64(0, 0); - p224CmovznzU64((x21$24ptr || (x21$24ptr = new ptrType(function() { return x21; }, function($v) { x21 = $v; }))), (new p224Uint1(x18.$high, x18.$low)), x13, x5); - x22 = new $Uint64(0, 0); - p224CmovznzU64((x22$24ptr || (x22$24ptr = new ptrType(function() { return x22; }, function($v) { x22 = $v; }))), (new p224Uint1(x18.$high, x18.$low)), x15, x7); - out1.nilCheck, out1[0] = x19; - out1.nilCheck, out1[1] = x20; - out1.nilCheck, out1[2] = x21; - out1.nilCheck, out1[3] = x22; - }; - p224Sub = function(out1, arg1, arg2) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, arg1, arg2, out1, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x1, x10, x11, x12, x13, x14, x15, x16, x2, x3, x4, x5, x6, x7, x8, x9, x9$24ptr; - x1 = new $Uint64(0, 0); - x2 = new $Uint64(0, 0); - _tuple = bits.Sub64(arg1[0], arg2[0], new $Uint64(0, 0)); - x1 = _tuple[0]; - x2 = _tuple[1]; - x3 = new $Uint64(0, 0); - x4 = new $Uint64(0, 0); - _tuple$1 = bits.Sub64(arg1[1], arg2[1], ((x = (new p224Uint1(x2.$high, x2.$low)), new $Uint64(x.$high, x.$low)))); - x3 = _tuple$1[0]; - x4 = _tuple$1[1]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple$2 = bits.Sub64(arg1[2], arg2[2], ((x$1 = (new p224Uint1(x4.$high, x4.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x5 = _tuple$2[0]; - x6 = _tuple$2[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$3 = bits.Sub64(arg1[3], arg2[3], ((x$2 = (new p224Uint1(x6.$high, x6.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x7 = _tuple$3[0]; - x8 = _tuple$3[1]; - x9 = new $Uint64(0, 0); - p224CmovznzU64((x9$24ptr || (x9$24ptr = new ptrType(function() { return x9; }, function($v) { x9 = $v; }))), (new p224Uint1(x8.$high, x8.$low)), new $Uint64(0, 0), new $Uint64(4294967295, 4294967295)); - x10 = new $Uint64(0, 0); - x11 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(x1, ((x$3 = (x$4 = (new p224Uint1(x9.$high, x9.$low)), new p224Uint1(x$4.$high & 0, (x$4.$low & 1) >>> 0)), new $Uint64(x$3.$high, x$3.$low))), new $Uint64(0, 0)); - x10 = _tuple$4[0]; - x11 = _tuple$4[1]; - x12 = new $Uint64(0, 0); - x13 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(x3, new $Uint64(x9.$high & 4294967295, (x9.$low & 0) >>> 0), ((x$5 = (new p224Uint1(x11.$high, x11.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x12 = _tuple$5[0]; - x13 = _tuple$5[1]; - x14 = new $Uint64(0, 0); - x15 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x5, x9, ((x$6 = (new p224Uint1(x13.$high, x13.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x14 = _tuple$6[0]; - x15 = _tuple$6[1]; - x16 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(x7, new $Uint64(x9.$high & 0, (x9.$low & 4294967295) >>> 0), ((x$7 = (new p224Uint1(x15.$high, x15.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x16 = _tuple$7[0]; - out1.nilCheck, out1[0] = x10; - out1.nilCheck, out1[1] = x12; - out1.nilCheck, out1[2] = x14; - out1.nilCheck, out1[3] = x16; - }; - p224SetOne = function(out1) { - var out1; - out1.nilCheck, out1[0] = new $Uint64(4294967295, 0); - out1.nilCheck, out1[1] = new $Uint64(4294967295, 4294967295); - out1.nilCheck, out1[2] = new $Uint64(0, 0); - out1.nilCheck, out1[3] = new $Uint64(0, 0); - }; - p224FromMontgomery = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$6, _tuple$7, _tuple$8, _tuple$9, arg1, out1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$6, x$7, x$8, x$9, x1, x10, x100, x101, x102, x103, x104, x105, x106, x107, x108, x11, x110, x111, x111$24ptr, x112, x112$24ptr, x113, x113$24ptr, x114, x114$24ptr, x12, x13, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x56, x57, x58, x59, x6, x60, x61, x62, x63, x64, x65, x67, x68, x69, x7, x70, x71, x72, x73, x74, x75, x76, x77, x78, x79, x8, x80, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[0]; - x2 = new $Uint64(0, 0); - _tuple = bits.Mul64(x1, new $Uint64(4294967295, 4294967295)); - x2 = _tuple[1]; - x4 = new $Uint64(0, 0); - x5 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x2, new $Uint64(0, 4294967295)); - x5 = _tuple$1[0]; - x4 = _tuple$1[1]; - x6 = new $Uint64(0, 0); - x7 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x2, new $Uint64(4294967295, 4294967295)); - x7 = _tuple$2[0]; - x6 = _tuple$2[1]; - x8 = new $Uint64(0, 0); - x9 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x2, new $Uint64(4294967295, 0)); - x9 = _tuple$3[0]; - x8 = _tuple$3[1]; - x10 = new $Uint64(0, 0); - x11 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(x9, x6, new $Uint64(0, 0)); - x10 = _tuple$4[0]; - x11 = _tuple$4[1]; - x12 = new $Uint64(0, 0); - x13 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(x7, x4, ((x = (new p224Uint1(x11.$high, x11.$low)), new $Uint64(x.$high, x.$low)))); - x12 = _tuple$5[0]; - x13 = _tuple$5[1]; - x15 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x1, x2, new $Uint64(0, 0)); - x15 = _tuple$6[1]; - x16 = new $Uint64(0, 0); - x17 = new $Uint64(0, 0); - _tuple$7 = bits.Add64(new $Uint64(0, 0), x8, ((x$1 = (new p224Uint1(x15.$high, x15.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x16 = _tuple$7[0]; - x17 = _tuple$7[1]; - x18 = new $Uint64(0, 0); - x19 = new $Uint64(0, 0); - _tuple$8 = bits.Add64(new $Uint64(0, 0), x10, ((x$2 = (new p224Uint1(x17.$high, x17.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x18 = _tuple$8[0]; - x19 = _tuple$8[1]; - x20 = new $Uint64(0, 0); - x21 = new $Uint64(0, 0); - _tuple$9 = bits.Add64(new $Uint64(0, 0), x12, ((x$3 = (new p224Uint1(x19.$high, x19.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x20 = _tuple$9[0]; - x21 = _tuple$9[1]; - x22 = new $Uint64(0, 0); - x23 = new $Uint64(0, 0); - _tuple$10 = bits.Add64(x16, arg1[1], new $Uint64(0, 0)); - x22 = _tuple$10[0]; - x23 = _tuple$10[1]; - x24 = new $Uint64(0, 0); - x25 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x18, new $Uint64(0, 0), ((x$4 = (new p224Uint1(x23.$high, x23.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x24 = _tuple$11[0]; - x25 = _tuple$11[1]; - x26 = new $Uint64(0, 0); - x27 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x20, new $Uint64(0, 0), ((x$5 = (new p224Uint1(x25.$high, x25.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x26 = _tuple$12[0]; - x27 = _tuple$12[1]; - x28 = new $Uint64(0, 0); - _tuple$13 = bits.Mul64(x22, new $Uint64(4294967295, 4294967295)); - x28 = _tuple$13[1]; - x30 = new $Uint64(0, 0); - x31 = new $Uint64(0, 0); - _tuple$14 = bits.Mul64(x28, new $Uint64(0, 4294967295)); - x31 = _tuple$14[0]; - x30 = _tuple$14[1]; - x32 = new $Uint64(0, 0); - x33 = new $Uint64(0, 0); - _tuple$15 = bits.Mul64(x28, new $Uint64(4294967295, 4294967295)); - x33 = _tuple$15[0]; - x32 = _tuple$15[1]; - x34 = new $Uint64(0, 0); - x35 = new $Uint64(0, 0); - _tuple$16 = bits.Mul64(x28, new $Uint64(4294967295, 0)); - x35 = _tuple$16[0]; - x34 = _tuple$16[1]; - x36 = new $Uint64(0, 0); - x37 = new $Uint64(0, 0); - _tuple$17 = bits.Add64(x35, x32, new $Uint64(0, 0)); - x36 = _tuple$17[0]; - x37 = _tuple$17[1]; - x38 = new $Uint64(0, 0); - x39 = new $Uint64(0, 0); - _tuple$18 = bits.Add64(x33, x30, ((x$6 = (new p224Uint1(x37.$high, x37.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x38 = _tuple$18[0]; - x39 = _tuple$18[1]; - x41 = new $Uint64(0, 0); - _tuple$19 = bits.Add64(x22, x28, new $Uint64(0, 0)); - x41 = _tuple$19[1]; - x42 = new $Uint64(0, 0); - x43 = new $Uint64(0, 0); - _tuple$20 = bits.Add64(x24, x34, ((x$7 = (new p224Uint1(x41.$high, x41.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x42 = _tuple$20[0]; - x43 = _tuple$20[1]; - x44 = new $Uint64(0, 0); - x45 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x26, x36, ((x$8 = (new p224Uint1(x43.$high, x43.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x44 = _tuple$21[0]; - x45 = _tuple$21[1]; - x46 = new $Uint64(0, 0); - x47 = new $Uint64(0, 0); - _tuple$22 = bits.Add64((x$9 = ((x$10 = (new p224Uint1(x27.$high, x27.$low)), new $Uint64(x$10.$high, x$10.$low))), x$11 = (x$12 = ((x$13 = (new p224Uint1(x21.$high, x21.$low)), new $Uint64(x$13.$high, x$13.$low))), x$14 = (x$15 = ((x$16 = (new p224Uint1(x13.$high, x13.$low)), new $Uint64(x$16.$high, x$16.$low))), new $Uint64(x$15.$high + x5.$high, x$15.$low + x5.$low)), new $Uint64(x$12.$high + x$14.$high, x$12.$low + x$14.$low)), new $Uint64(x$9.$high + x$11.$high, x$9.$low + x$11.$low)), x38, ((x$17 = (new p224Uint1(x45.$high, x45.$low)), new $Uint64(x$17.$high, x$17.$low)))); - x46 = _tuple$22[0]; - x47 = _tuple$22[1]; - x48 = new $Uint64(0, 0); - x49 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x42, arg1[2], new $Uint64(0, 0)); - x48 = _tuple$23[0]; - x49 = _tuple$23[1]; - x50 = new $Uint64(0, 0); - x51 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x44, new $Uint64(0, 0), ((x$18 = (new p224Uint1(x49.$high, x49.$low)), new $Uint64(x$18.$high, x$18.$low)))); - x50 = _tuple$24[0]; - x51 = _tuple$24[1]; - x52 = new $Uint64(0, 0); - x53 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(x46, new $Uint64(0, 0), ((x$19 = (new p224Uint1(x51.$high, x51.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x52 = _tuple$25[0]; - x53 = _tuple$25[1]; - x54 = new $Uint64(0, 0); - _tuple$26 = bits.Mul64(x48, new $Uint64(4294967295, 4294967295)); - x54 = _tuple$26[1]; - x56 = new $Uint64(0, 0); - x57 = new $Uint64(0, 0); - _tuple$27 = bits.Mul64(x54, new $Uint64(0, 4294967295)); - x57 = _tuple$27[0]; - x56 = _tuple$27[1]; - x58 = new $Uint64(0, 0); - x59 = new $Uint64(0, 0); - _tuple$28 = bits.Mul64(x54, new $Uint64(4294967295, 4294967295)); - x59 = _tuple$28[0]; - x58 = _tuple$28[1]; - x60 = new $Uint64(0, 0); - x61 = new $Uint64(0, 0); - _tuple$29 = bits.Mul64(x54, new $Uint64(4294967295, 0)); - x61 = _tuple$29[0]; - x60 = _tuple$29[1]; - x62 = new $Uint64(0, 0); - x63 = new $Uint64(0, 0); - _tuple$30 = bits.Add64(x61, x58, new $Uint64(0, 0)); - x62 = _tuple$30[0]; - x63 = _tuple$30[1]; - x64 = new $Uint64(0, 0); - x65 = new $Uint64(0, 0); - _tuple$31 = bits.Add64(x59, x56, ((x$20 = (new p224Uint1(x63.$high, x63.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x64 = _tuple$31[0]; - x65 = _tuple$31[1]; - x67 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x48, x54, new $Uint64(0, 0)); - x67 = _tuple$32[1]; - x68 = new $Uint64(0, 0); - x69 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x50, x60, ((x$21 = (new p224Uint1(x67.$high, x67.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x68 = _tuple$33[0]; - x69 = _tuple$33[1]; - x70 = new $Uint64(0, 0); - x71 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x52, x62, ((x$22 = (new p224Uint1(x69.$high, x69.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x70 = _tuple$34[0]; - x71 = _tuple$34[1]; - x72 = new $Uint64(0, 0); - x73 = new $Uint64(0, 0); - _tuple$35 = bits.Add64((x$23 = ((x$24 = (new p224Uint1(x53.$high, x53.$low)), new $Uint64(x$24.$high, x$24.$low))), x$25 = (x$26 = ((x$27 = (new p224Uint1(x47.$high, x47.$low)), new $Uint64(x$27.$high, x$27.$low))), x$28 = (x$29 = ((x$30 = (new p224Uint1(x39.$high, x39.$low)), new $Uint64(x$30.$high, x$30.$low))), new $Uint64(x$29.$high + x31.$high, x$29.$low + x31.$low)), new $Uint64(x$26.$high + x$28.$high, x$26.$low + x$28.$low)), new $Uint64(x$23.$high + x$25.$high, x$23.$low + x$25.$low)), x64, ((x$31 = (new p224Uint1(x71.$high, x71.$low)), new $Uint64(x$31.$high, x$31.$low)))); - x72 = _tuple$35[0]; - x73 = _tuple$35[1]; - x74 = new $Uint64(0, 0); - x75 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x68, arg1[3], new $Uint64(0, 0)); - x74 = _tuple$36[0]; - x75 = _tuple$36[1]; - x76 = new $Uint64(0, 0); - x77 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x70, new $Uint64(0, 0), ((x$32 = (new p224Uint1(x75.$high, x75.$low)), new $Uint64(x$32.$high, x$32.$low)))); - x76 = _tuple$37[0]; - x77 = _tuple$37[1]; - x78 = new $Uint64(0, 0); - x79 = new $Uint64(0, 0); - _tuple$38 = bits.Add64(x72, new $Uint64(0, 0), ((x$33 = (new p224Uint1(x77.$high, x77.$low)), new $Uint64(x$33.$high, x$33.$low)))); - x78 = _tuple$38[0]; - x79 = _tuple$38[1]; - x80 = new $Uint64(0, 0); - _tuple$39 = bits.Mul64(x74, new $Uint64(4294967295, 4294967295)); - x80 = _tuple$39[1]; - x82 = new $Uint64(0, 0); - x83 = new $Uint64(0, 0); - _tuple$40 = bits.Mul64(x80, new $Uint64(0, 4294967295)); - x83 = _tuple$40[0]; - x82 = _tuple$40[1]; - x84 = new $Uint64(0, 0); - x85 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x80, new $Uint64(4294967295, 4294967295)); - x85 = _tuple$41[0]; - x84 = _tuple$41[1]; - x86 = new $Uint64(0, 0); - x87 = new $Uint64(0, 0); - _tuple$42 = bits.Mul64(x80, new $Uint64(4294967295, 0)); - x87 = _tuple$42[0]; - x86 = _tuple$42[1]; - x88 = new $Uint64(0, 0); - x89 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x87, x84, new $Uint64(0, 0)); - x88 = _tuple$43[0]; - x89 = _tuple$43[1]; - x90 = new $Uint64(0, 0); - x91 = new $Uint64(0, 0); - _tuple$44 = bits.Add64(x85, x82, ((x$34 = (new p224Uint1(x89.$high, x89.$low)), new $Uint64(x$34.$high, x$34.$low)))); - x90 = _tuple$44[0]; - x91 = _tuple$44[1]; - x93 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x74, x80, new $Uint64(0, 0)); - x93 = _tuple$45[1]; - x94 = new $Uint64(0, 0); - x95 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x76, x86, ((x$35 = (new p224Uint1(x93.$high, x93.$low)), new $Uint64(x$35.$high, x$35.$low)))); - x94 = _tuple$46[0]; - x95 = _tuple$46[1]; - x96 = new $Uint64(0, 0); - x97 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x78, x88, ((x$36 = (new p224Uint1(x95.$high, x95.$low)), new $Uint64(x$36.$high, x$36.$low)))); - x96 = _tuple$47[0]; - x97 = _tuple$47[1]; - x98 = new $Uint64(0, 0); - x99 = new $Uint64(0, 0); - _tuple$48 = bits.Add64((x$37 = ((x$38 = (new p224Uint1(x79.$high, x79.$low)), new $Uint64(x$38.$high, x$38.$low))), x$39 = (x$40 = ((x$41 = (new p224Uint1(x73.$high, x73.$low)), new $Uint64(x$41.$high, x$41.$low))), x$42 = (x$43 = ((x$44 = (new p224Uint1(x65.$high, x65.$low)), new $Uint64(x$44.$high, x$44.$low))), new $Uint64(x$43.$high + x57.$high, x$43.$low + x57.$low)), new $Uint64(x$40.$high + x$42.$high, x$40.$low + x$42.$low)), new $Uint64(x$37.$high + x$39.$high, x$37.$low + x$39.$low)), x90, ((x$45 = (new p224Uint1(x97.$high, x97.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x98 = _tuple$48[0]; - x99 = _tuple$48[1]; - x100 = (x$46 = ((x$47 = (new p224Uint1(x99.$high, x99.$low)), new $Uint64(x$47.$high, x$47.$low))), x$48 = (x$49 = ((x$50 = (new p224Uint1(x91.$high, x91.$low)), new $Uint64(x$50.$high, x$50.$low))), new $Uint64(x$49.$high + x83.$high, x$49.$low + x83.$low)), new $Uint64(x$46.$high + x$48.$high, x$46.$low + x$48.$low)); - x101 = new $Uint64(0, 0); - x102 = new $Uint64(0, 0); - _tuple$49 = bits.Sub64(x94, new $Uint64(0, 1), new $Uint64(0, 0)); - x101 = _tuple$49[0]; - x102 = _tuple$49[1]; - x103 = new $Uint64(0, 0); - x104 = new $Uint64(0, 0); - _tuple$50 = bits.Sub64(x96, new $Uint64(4294967295, 0), ((x$51 = (new p224Uint1(x102.$high, x102.$low)), new $Uint64(x$51.$high, x$51.$low)))); - x103 = _tuple$50[0]; - x104 = _tuple$50[1]; - x105 = new $Uint64(0, 0); - x106 = new $Uint64(0, 0); - _tuple$51 = bits.Sub64(x98, new $Uint64(4294967295, 4294967295), ((x$52 = (new p224Uint1(x104.$high, x104.$low)), new $Uint64(x$52.$high, x$52.$low)))); - x105 = _tuple$51[0]; - x106 = _tuple$51[1]; - x107 = new $Uint64(0, 0); - x108 = new $Uint64(0, 0); - _tuple$52 = bits.Sub64(x100, new $Uint64(0, 4294967295), ((x$53 = (new p224Uint1(x106.$high, x106.$low)), new $Uint64(x$53.$high, x$53.$low)))); - x107 = _tuple$52[0]; - x108 = _tuple$52[1]; - x110 = new $Uint64(0, 0); - _tuple$53 = bits.Sub64(new $Uint64(0, 0), new $Uint64(0, 0), ((x$54 = (new p224Uint1(x108.$high, x108.$low)), new $Uint64(x$54.$high, x$54.$low)))); - x110 = _tuple$53[1]; - x111 = new $Uint64(0, 0); - p224CmovznzU64((x111$24ptr || (x111$24ptr = new ptrType(function() { return x111; }, function($v) { x111 = $v; }))), (new p224Uint1(x110.$high, x110.$low)), x101, x94); - x112 = new $Uint64(0, 0); - p224CmovznzU64((x112$24ptr || (x112$24ptr = new ptrType(function() { return x112; }, function($v) { x112 = $v; }))), (new p224Uint1(x110.$high, x110.$low)), x103, x96); - x113 = new $Uint64(0, 0); - p224CmovznzU64((x113$24ptr || (x113$24ptr = new ptrType(function() { return x113; }, function($v) { x113 = $v; }))), (new p224Uint1(x110.$high, x110.$low)), x105, x98); - x114 = new $Uint64(0, 0); - p224CmovznzU64((x114$24ptr || (x114$24ptr = new ptrType(function() { return x114; }, function($v) { x114 = $v; }))), (new p224Uint1(x110.$high, x110.$low)), x107, x100); - out1.nilCheck, out1[0] = x111; - out1.nilCheck, out1[1] = x112; - out1.nilCheck, out1[2] = x113; - out1.nilCheck, out1[3] = x114; - }; - p224ToMontgomery = function(out1, arg1) { - var _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$33, _tuple$34, _tuple$35, _tuple$36, _tuple$37, _tuple$38, _tuple$39, _tuple$4, _tuple$40, _tuple$41, _tuple$42, _tuple$43, _tuple$44, _tuple$45, _tuple$46, _tuple$47, _tuple$48, _tuple$49, _tuple$5, _tuple$50, _tuple$51, _tuple$52, _tuple$53, _tuple$54, _tuple$55, _tuple$56, _tuple$57, _tuple$58, _tuple$59, _tuple$6, _tuple$60, _tuple$61, _tuple$62, _tuple$63, _tuple$64, _tuple$65, _tuple$66, _tuple$67, _tuple$68, _tuple$69, _tuple$7, _tuple$70, _tuple$71, _tuple$72, _tuple$73, _tuple$74, _tuple$75, _tuple$76, _tuple$77, _tuple$78, _tuple$79, _tuple$8, _tuple$80, _tuple$81, _tuple$82, _tuple$83, _tuple$84, _tuple$9, arg1, out1, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$9, x1, x10, x100, x101, x102, x103, x105, x106, x107, x108, x109, x11, x110, x111, x112, x113, x114, x116, x117, x118, x119, x12, x120, x121, x122, x123, x124, x125, x126, x127, x128, x129, x13, x130, x131, x132, x133, x134, x135, x136, x137, x138, x139, x14, x140, x141, x142, x143, x144, x145, x147, x148, x149, x15, x150, x151, x152, x153, x154, x155, x156, x158, x159, x16, x160, x161, x162, x163, x164, x165, x166, x167, x168, x169, x17, x170, x171, x172, x173, x175, x176, x176$24ptr, x177, x177$24ptr, x178, x178$24ptr, x179, x179$24ptr, x18, x19, x2, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x53, x54, x55, x56, x57, x58, x59, x6, x60, x61, x63, x64, x65, x66, x67, x68, x69, x7, x70, x71, x72, x74, x75, x76, x77, x78, x79, x8, x80, x81, x82, x83, x84, x85, x86, x87, x88, x89, x9, x90, x91, x92, x93, x94, x95, x96, x97, x98, x99; - x1 = arg1[1]; - x2 = arg1[2]; - x3 = arg1[3]; - x4 = arg1[0]; - x5 = new $Uint64(0, 0); - x6 = new $Uint64(0, 0); - _tuple = bits.Mul64(x4, new $Uint64(0, 4294967295)); - x6 = _tuple[0]; - x5 = _tuple[1]; - x7 = new $Uint64(0, 0); - x8 = new $Uint64(0, 0); - _tuple$1 = bits.Mul64(x4, new $Uint64(4294967294, 0)); - x8 = _tuple$1[0]; - x7 = _tuple$1[1]; - x9 = new $Uint64(0, 0); - x10 = new $Uint64(0, 0); - _tuple$2 = bits.Mul64(x4, new $Uint64(4294967295, 0)); - x10 = _tuple$2[0]; - x9 = _tuple$2[1]; - x11 = new $Uint64(0, 0); - x12 = new $Uint64(0, 0); - _tuple$3 = bits.Mul64(x4, new $Uint64(4294967295, 1)); - x12 = _tuple$3[0]; - x11 = _tuple$3[1]; - x13 = new $Uint64(0, 0); - x14 = new $Uint64(0, 0); - _tuple$4 = bits.Add64(x12, x9, new $Uint64(0, 0)); - x13 = _tuple$4[0]; - x14 = _tuple$4[1]; - x15 = new $Uint64(0, 0); - x16 = new $Uint64(0, 0); - _tuple$5 = bits.Add64(x10, x7, ((x = (new p224Uint1(x14.$high, x14.$low)), new $Uint64(x.$high, x.$low)))); - x15 = _tuple$5[0]; - x16 = _tuple$5[1]; - x17 = new $Uint64(0, 0); - x18 = new $Uint64(0, 0); - _tuple$6 = bits.Add64(x8, x5, ((x$1 = (new p224Uint1(x16.$high, x16.$low)), new $Uint64(x$1.$high, x$1.$low)))); - x17 = _tuple$6[0]; - x18 = _tuple$6[1]; - x19 = new $Uint64(0, 0); - _tuple$7 = bits.Mul64(x11, new $Uint64(4294967295, 4294967295)); - x19 = _tuple$7[1]; - x21 = new $Uint64(0, 0); - x22 = new $Uint64(0, 0); - _tuple$8 = bits.Mul64(x19, new $Uint64(0, 4294967295)); - x22 = _tuple$8[0]; - x21 = _tuple$8[1]; - x23 = new $Uint64(0, 0); - x24 = new $Uint64(0, 0); - _tuple$9 = bits.Mul64(x19, new $Uint64(4294967295, 4294967295)); - x24 = _tuple$9[0]; - x23 = _tuple$9[1]; - x25 = new $Uint64(0, 0); - x26 = new $Uint64(0, 0); - _tuple$10 = bits.Mul64(x19, new $Uint64(4294967295, 0)); - x26 = _tuple$10[0]; - x25 = _tuple$10[1]; - x27 = new $Uint64(0, 0); - x28 = new $Uint64(0, 0); - _tuple$11 = bits.Add64(x26, x23, new $Uint64(0, 0)); - x27 = _tuple$11[0]; - x28 = _tuple$11[1]; - x29 = new $Uint64(0, 0); - x30 = new $Uint64(0, 0); - _tuple$12 = bits.Add64(x24, x21, ((x$2 = (new p224Uint1(x28.$high, x28.$low)), new $Uint64(x$2.$high, x$2.$low)))); - x29 = _tuple$12[0]; - x30 = _tuple$12[1]; - x32 = new $Uint64(0, 0); - _tuple$13 = bits.Add64(x11, x19, new $Uint64(0, 0)); - x32 = _tuple$13[1]; - x33 = new $Uint64(0, 0); - x34 = new $Uint64(0, 0); - _tuple$14 = bits.Add64(x13, x25, ((x$3 = (new p224Uint1(x32.$high, x32.$low)), new $Uint64(x$3.$high, x$3.$low)))); - x33 = _tuple$14[0]; - x34 = _tuple$14[1]; - x35 = new $Uint64(0, 0); - x36 = new $Uint64(0, 0); - _tuple$15 = bits.Add64(x15, x27, ((x$4 = (new p224Uint1(x34.$high, x34.$low)), new $Uint64(x$4.$high, x$4.$low)))); - x35 = _tuple$15[0]; - x36 = _tuple$15[1]; - x37 = new $Uint64(0, 0); - x38 = new $Uint64(0, 0); - _tuple$16 = bits.Add64(x17, x29, ((x$5 = (new p224Uint1(x36.$high, x36.$low)), new $Uint64(x$5.$high, x$5.$low)))); - x37 = _tuple$16[0]; - x38 = _tuple$16[1]; - x39 = new $Uint64(0, 0); - x40 = new $Uint64(0, 0); - _tuple$17 = bits.Mul64(x1, new $Uint64(0, 4294967295)); - x40 = _tuple$17[0]; - x39 = _tuple$17[1]; - x41 = new $Uint64(0, 0); - x42 = new $Uint64(0, 0); - _tuple$18 = bits.Mul64(x1, new $Uint64(4294967294, 0)); - x42 = _tuple$18[0]; - x41 = _tuple$18[1]; - x43 = new $Uint64(0, 0); - x44 = new $Uint64(0, 0); - _tuple$19 = bits.Mul64(x1, new $Uint64(4294967295, 0)); - x44 = _tuple$19[0]; - x43 = _tuple$19[1]; - x45 = new $Uint64(0, 0); - x46 = new $Uint64(0, 0); - _tuple$20 = bits.Mul64(x1, new $Uint64(4294967295, 1)); - x46 = _tuple$20[0]; - x45 = _tuple$20[1]; - x47 = new $Uint64(0, 0); - x48 = new $Uint64(0, 0); - _tuple$21 = bits.Add64(x46, x43, new $Uint64(0, 0)); - x47 = _tuple$21[0]; - x48 = _tuple$21[1]; - x49 = new $Uint64(0, 0); - x50 = new $Uint64(0, 0); - _tuple$22 = bits.Add64(x44, x41, ((x$6 = (new p224Uint1(x48.$high, x48.$low)), new $Uint64(x$6.$high, x$6.$low)))); - x49 = _tuple$22[0]; - x50 = _tuple$22[1]; - x51 = new $Uint64(0, 0); - x52 = new $Uint64(0, 0); - _tuple$23 = bits.Add64(x42, x39, ((x$7 = (new p224Uint1(x50.$high, x50.$low)), new $Uint64(x$7.$high, x$7.$low)))); - x51 = _tuple$23[0]; - x52 = _tuple$23[1]; - x53 = new $Uint64(0, 0); - x54 = new $Uint64(0, 0); - _tuple$24 = bits.Add64(x33, x45, new $Uint64(0, 0)); - x53 = _tuple$24[0]; - x54 = _tuple$24[1]; - x55 = new $Uint64(0, 0); - x56 = new $Uint64(0, 0); - _tuple$25 = bits.Add64(x35, x47, ((x$8 = (new p224Uint1(x54.$high, x54.$low)), new $Uint64(x$8.$high, x$8.$low)))); - x55 = _tuple$25[0]; - x56 = _tuple$25[1]; - x57 = new $Uint64(0, 0); - x58 = new $Uint64(0, 0); - _tuple$26 = bits.Add64(x37, x49, ((x$9 = (new p224Uint1(x56.$high, x56.$low)), new $Uint64(x$9.$high, x$9.$low)))); - x57 = _tuple$26[0]; - x58 = _tuple$26[1]; - x59 = new $Uint64(0, 0); - x60 = new $Uint64(0, 0); - _tuple$27 = bits.Add64((x$10 = (x$11 = ((x$12 = (new p224Uint1(x38.$high, x38.$low)), new $Uint64(x$12.$high, x$12.$low))), x$13 = (x$14 = ((x$15 = (new p224Uint1(x18.$high, x18.$low)), new $Uint64(x$15.$high, x$15.$low))), new $Uint64(x$14.$high + x6.$high, x$14.$low + x6.$low)), new $Uint64(x$11.$high + x$13.$high, x$11.$low + x$13.$low)), x$16 = (x$17 = ((x$18 = (new p224Uint1(x30.$high, x30.$low)), new $Uint64(x$18.$high, x$18.$low))), new $Uint64(x$17.$high + x22.$high, x$17.$low + x22.$low)), new $Uint64(x$10.$high + x$16.$high, x$10.$low + x$16.$low)), x51, ((x$19 = (new p224Uint1(x58.$high, x58.$low)), new $Uint64(x$19.$high, x$19.$low)))); - x59 = _tuple$27[0]; - x60 = _tuple$27[1]; - x61 = new $Uint64(0, 0); - _tuple$28 = bits.Mul64(x53, new $Uint64(4294967295, 4294967295)); - x61 = _tuple$28[1]; - x63 = new $Uint64(0, 0); - x64 = new $Uint64(0, 0); - _tuple$29 = bits.Mul64(x61, new $Uint64(0, 4294967295)); - x64 = _tuple$29[0]; - x63 = _tuple$29[1]; - x65 = new $Uint64(0, 0); - x66 = new $Uint64(0, 0); - _tuple$30 = bits.Mul64(x61, new $Uint64(4294967295, 4294967295)); - x66 = _tuple$30[0]; - x65 = _tuple$30[1]; - x67 = new $Uint64(0, 0); - x68 = new $Uint64(0, 0); - _tuple$31 = bits.Mul64(x61, new $Uint64(4294967295, 0)); - x68 = _tuple$31[0]; - x67 = _tuple$31[1]; - x69 = new $Uint64(0, 0); - x70 = new $Uint64(0, 0); - _tuple$32 = bits.Add64(x68, x65, new $Uint64(0, 0)); - x69 = _tuple$32[0]; - x70 = _tuple$32[1]; - x71 = new $Uint64(0, 0); - x72 = new $Uint64(0, 0); - _tuple$33 = bits.Add64(x66, x63, ((x$20 = (new p224Uint1(x70.$high, x70.$low)), new $Uint64(x$20.$high, x$20.$low)))); - x71 = _tuple$33[0]; - x72 = _tuple$33[1]; - x74 = new $Uint64(0, 0); - _tuple$34 = bits.Add64(x53, x61, new $Uint64(0, 0)); - x74 = _tuple$34[1]; - x75 = new $Uint64(0, 0); - x76 = new $Uint64(0, 0); - _tuple$35 = bits.Add64(x55, x67, ((x$21 = (new p224Uint1(x74.$high, x74.$low)), new $Uint64(x$21.$high, x$21.$low)))); - x75 = _tuple$35[0]; - x76 = _tuple$35[1]; - x77 = new $Uint64(0, 0); - x78 = new $Uint64(0, 0); - _tuple$36 = bits.Add64(x57, x69, ((x$22 = (new p224Uint1(x76.$high, x76.$low)), new $Uint64(x$22.$high, x$22.$low)))); - x77 = _tuple$36[0]; - x78 = _tuple$36[1]; - x79 = new $Uint64(0, 0); - x80 = new $Uint64(0, 0); - _tuple$37 = bits.Add64(x59, x71, ((x$23 = (new p224Uint1(x78.$high, x78.$low)), new $Uint64(x$23.$high, x$23.$low)))); - x79 = _tuple$37[0]; - x80 = _tuple$37[1]; - x81 = new $Uint64(0, 0); - x82 = new $Uint64(0, 0); - _tuple$38 = bits.Mul64(x2, new $Uint64(0, 4294967295)); - x82 = _tuple$38[0]; - x81 = _tuple$38[1]; - x83 = new $Uint64(0, 0); - x84 = new $Uint64(0, 0); - _tuple$39 = bits.Mul64(x2, new $Uint64(4294967294, 0)); - x84 = _tuple$39[0]; - x83 = _tuple$39[1]; - x85 = new $Uint64(0, 0); - x86 = new $Uint64(0, 0); - _tuple$40 = bits.Mul64(x2, new $Uint64(4294967295, 0)); - x86 = _tuple$40[0]; - x85 = _tuple$40[1]; - x87 = new $Uint64(0, 0); - x88 = new $Uint64(0, 0); - _tuple$41 = bits.Mul64(x2, new $Uint64(4294967295, 1)); - x88 = _tuple$41[0]; - x87 = _tuple$41[1]; - x89 = new $Uint64(0, 0); - x90 = new $Uint64(0, 0); - _tuple$42 = bits.Add64(x88, x85, new $Uint64(0, 0)); - x89 = _tuple$42[0]; - x90 = _tuple$42[1]; - x91 = new $Uint64(0, 0); - x92 = new $Uint64(0, 0); - _tuple$43 = bits.Add64(x86, x83, ((x$24 = (new p224Uint1(x90.$high, x90.$low)), new $Uint64(x$24.$high, x$24.$low)))); - x91 = _tuple$43[0]; - x92 = _tuple$43[1]; - x93 = new $Uint64(0, 0); - x94 = new $Uint64(0, 0); - _tuple$44 = bits.Add64(x84, x81, ((x$25 = (new p224Uint1(x92.$high, x92.$low)), new $Uint64(x$25.$high, x$25.$low)))); - x93 = _tuple$44[0]; - x94 = _tuple$44[1]; - x95 = new $Uint64(0, 0); - x96 = new $Uint64(0, 0); - _tuple$45 = bits.Add64(x75, x87, new $Uint64(0, 0)); - x95 = _tuple$45[0]; - x96 = _tuple$45[1]; - x97 = new $Uint64(0, 0); - x98 = new $Uint64(0, 0); - _tuple$46 = bits.Add64(x77, x89, ((x$26 = (new p224Uint1(x96.$high, x96.$low)), new $Uint64(x$26.$high, x$26.$low)))); - x97 = _tuple$46[0]; - x98 = _tuple$46[1]; - x99 = new $Uint64(0, 0); - x100 = new $Uint64(0, 0); - _tuple$47 = bits.Add64(x79, x91, ((x$27 = (new p224Uint1(x98.$high, x98.$low)), new $Uint64(x$27.$high, x$27.$low)))); - x99 = _tuple$47[0]; - x100 = _tuple$47[1]; - x101 = new $Uint64(0, 0); - x102 = new $Uint64(0, 0); - _tuple$48 = bits.Add64((x$28 = (x$29 = ((x$30 = (new p224Uint1(x80.$high, x80.$low)), new $Uint64(x$30.$high, x$30.$low))), x$31 = (x$32 = ((x$33 = (new p224Uint1(x60.$high, x60.$low)), new $Uint64(x$33.$high, x$33.$low))), x$34 = (x$35 = ((x$36 = (new p224Uint1(x52.$high, x52.$low)), new $Uint64(x$36.$high, x$36.$low))), new $Uint64(x$35.$high + x40.$high, x$35.$low + x40.$low)), new $Uint64(x$32.$high + x$34.$high, x$32.$low + x$34.$low)), new $Uint64(x$29.$high + x$31.$high, x$29.$low + x$31.$low)), x$37 = (x$38 = ((x$39 = (new p224Uint1(x72.$high, x72.$low)), new $Uint64(x$39.$high, x$39.$low))), new $Uint64(x$38.$high + x64.$high, x$38.$low + x64.$low)), new $Uint64(x$28.$high + x$37.$high, x$28.$low + x$37.$low)), x93, ((x$40 = (new p224Uint1(x100.$high, x100.$low)), new $Uint64(x$40.$high, x$40.$low)))); - x101 = _tuple$48[0]; - x102 = _tuple$48[1]; - x103 = new $Uint64(0, 0); - _tuple$49 = bits.Mul64(x95, new $Uint64(4294967295, 4294967295)); - x103 = _tuple$49[1]; - x105 = new $Uint64(0, 0); - x106 = new $Uint64(0, 0); - _tuple$50 = bits.Mul64(x103, new $Uint64(0, 4294967295)); - x106 = _tuple$50[0]; - x105 = _tuple$50[1]; - x107 = new $Uint64(0, 0); - x108 = new $Uint64(0, 0); - _tuple$51 = bits.Mul64(x103, new $Uint64(4294967295, 4294967295)); - x108 = _tuple$51[0]; - x107 = _tuple$51[1]; - x109 = new $Uint64(0, 0); - x110 = new $Uint64(0, 0); - _tuple$52 = bits.Mul64(x103, new $Uint64(4294967295, 0)); - x110 = _tuple$52[0]; - x109 = _tuple$52[1]; - x111 = new $Uint64(0, 0); - x112 = new $Uint64(0, 0); - _tuple$53 = bits.Add64(x110, x107, new $Uint64(0, 0)); - x111 = _tuple$53[0]; - x112 = _tuple$53[1]; - x113 = new $Uint64(0, 0); - x114 = new $Uint64(0, 0); - _tuple$54 = bits.Add64(x108, x105, ((x$41 = (new p224Uint1(x112.$high, x112.$low)), new $Uint64(x$41.$high, x$41.$low)))); - x113 = _tuple$54[0]; - x114 = _tuple$54[1]; - x116 = new $Uint64(0, 0); - _tuple$55 = bits.Add64(x95, x103, new $Uint64(0, 0)); - x116 = _tuple$55[1]; - x117 = new $Uint64(0, 0); - x118 = new $Uint64(0, 0); - _tuple$56 = bits.Add64(x97, x109, ((x$42 = (new p224Uint1(x116.$high, x116.$low)), new $Uint64(x$42.$high, x$42.$low)))); - x117 = _tuple$56[0]; - x118 = _tuple$56[1]; - x119 = new $Uint64(0, 0); - x120 = new $Uint64(0, 0); - _tuple$57 = bits.Add64(x99, x111, ((x$43 = (new p224Uint1(x118.$high, x118.$low)), new $Uint64(x$43.$high, x$43.$low)))); - x119 = _tuple$57[0]; - x120 = _tuple$57[1]; - x121 = new $Uint64(0, 0); - x122 = new $Uint64(0, 0); - _tuple$58 = bits.Add64(x101, x113, ((x$44 = (new p224Uint1(x120.$high, x120.$low)), new $Uint64(x$44.$high, x$44.$low)))); - x121 = _tuple$58[0]; - x122 = _tuple$58[1]; - x123 = new $Uint64(0, 0); - x124 = new $Uint64(0, 0); - _tuple$59 = bits.Mul64(x3, new $Uint64(0, 4294967295)); - x124 = _tuple$59[0]; - x123 = _tuple$59[1]; - x125 = new $Uint64(0, 0); - x126 = new $Uint64(0, 0); - _tuple$60 = bits.Mul64(x3, new $Uint64(4294967294, 0)); - x126 = _tuple$60[0]; - x125 = _tuple$60[1]; - x127 = new $Uint64(0, 0); - x128 = new $Uint64(0, 0); - _tuple$61 = bits.Mul64(x3, new $Uint64(4294967295, 0)); - x128 = _tuple$61[0]; - x127 = _tuple$61[1]; - x129 = new $Uint64(0, 0); - x130 = new $Uint64(0, 0); - _tuple$62 = bits.Mul64(x3, new $Uint64(4294967295, 1)); - x130 = _tuple$62[0]; - x129 = _tuple$62[1]; - x131 = new $Uint64(0, 0); - x132 = new $Uint64(0, 0); - _tuple$63 = bits.Add64(x130, x127, new $Uint64(0, 0)); - x131 = _tuple$63[0]; - x132 = _tuple$63[1]; - x133 = new $Uint64(0, 0); - x134 = new $Uint64(0, 0); - _tuple$64 = bits.Add64(x128, x125, ((x$45 = (new p224Uint1(x132.$high, x132.$low)), new $Uint64(x$45.$high, x$45.$low)))); - x133 = _tuple$64[0]; - x134 = _tuple$64[1]; - x135 = new $Uint64(0, 0); - x136 = new $Uint64(0, 0); - _tuple$65 = bits.Add64(x126, x123, ((x$46 = (new p224Uint1(x134.$high, x134.$low)), new $Uint64(x$46.$high, x$46.$low)))); - x135 = _tuple$65[0]; - x136 = _tuple$65[1]; - x137 = new $Uint64(0, 0); - x138 = new $Uint64(0, 0); - _tuple$66 = bits.Add64(x117, x129, new $Uint64(0, 0)); - x137 = _tuple$66[0]; - x138 = _tuple$66[1]; - x139 = new $Uint64(0, 0); - x140 = new $Uint64(0, 0); - _tuple$67 = bits.Add64(x119, x131, ((x$47 = (new p224Uint1(x138.$high, x138.$low)), new $Uint64(x$47.$high, x$47.$low)))); - x139 = _tuple$67[0]; - x140 = _tuple$67[1]; - x141 = new $Uint64(0, 0); - x142 = new $Uint64(0, 0); - _tuple$68 = bits.Add64(x121, x133, ((x$48 = (new p224Uint1(x140.$high, x140.$low)), new $Uint64(x$48.$high, x$48.$low)))); - x141 = _tuple$68[0]; - x142 = _tuple$68[1]; - x143 = new $Uint64(0, 0); - x144 = new $Uint64(0, 0); - _tuple$69 = bits.Add64((x$49 = (x$50 = ((x$51 = (new p224Uint1(x122.$high, x122.$low)), new $Uint64(x$51.$high, x$51.$low))), x$52 = (x$53 = ((x$54 = (new p224Uint1(x102.$high, x102.$low)), new $Uint64(x$54.$high, x$54.$low))), x$55 = (x$56 = ((x$57 = (new p224Uint1(x94.$high, x94.$low)), new $Uint64(x$57.$high, x$57.$low))), new $Uint64(x$56.$high + x82.$high, x$56.$low + x82.$low)), new $Uint64(x$53.$high + x$55.$high, x$53.$low + x$55.$low)), new $Uint64(x$50.$high + x$52.$high, x$50.$low + x$52.$low)), x$58 = (x$59 = ((x$60 = (new p224Uint1(x114.$high, x114.$low)), new $Uint64(x$60.$high, x$60.$low))), new $Uint64(x$59.$high + x106.$high, x$59.$low + x106.$low)), new $Uint64(x$49.$high + x$58.$high, x$49.$low + x$58.$low)), x135, ((x$61 = (new p224Uint1(x142.$high, x142.$low)), new $Uint64(x$61.$high, x$61.$low)))); - x143 = _tuple$69[0]; - x144 = _tuple$69[1]; - x145 = new $Uint64(0, 0); - _tuple$70 = bits.Mul64(x137, new $Uint64(4294967295, 4294967295)); - x145 = _tuple$70[1]; - x147 = new $Uint64(0, 0); - x148 = new $Uint64(0, 0); - _tuple$71 = bits.Mul64(x145, new $Uint64(0, 4294967295)); - x148 = _tuple$71[0]; - x147 = _tuple$71[1]; - x149 = new $Uint64(0, 0); - x150 = new $Uint64(0, 0); - _tuple$72 = bits.Mul64(x145, new $Uint64(4294967295, 4294967295)); - x150 = _tuple$72[0]; - x149 = _tuple$72[1]; - x151 = new $Uint64(0, 0); - x152 = new $Uint64(0, 0); - _tuple$73 = bits.Mul64(x145, new $Uint64(4294967295, 0)); - x152 = _tuple$73[0]; - x151 = _tuple$73[1]; - x153 = new $Uint64(0, 0); - x154 = new $Uint64(0, 0); - _tuple$74 = bits.Add64(x152, x149, new $Uint64(0, 0)); - x153 = _tuple$74[0]; - x154 = _tuple$74[1]; - x155 = new $Uint64(0, 0); - x156 = new $Uint64(0, 0); - _tuple$75 = bits.Add64(x150, x147, ((x$62 = (new p224Uint1(x154.$high, x154.$low)), new $Uint64(x$62.$high, x$62.$low)))); - x155 = _tuple$75[0]; - x156 = _tuple$75[1]; - x158 = new $Uint64(0, 0); - _tuple$76 = bits.Add64(x137, x145, new $Uint64(0, 0)); - x158 = _tuple$76[1]; - x159 = new $Uint64(0, 0); - x160 = new $Uint64(0, 0); - _tuple$77 = bits.Add64(x139, x151, ((x$63 = (new p224Uint1(x158.$high, x158.$low)), new $Uint64(x$63.$high, x$63.$low)))); - x159 = _tuple$77[0]; - x160 = _tuple$77[1]; - x161 = new $Uint64(0, 0); - x162 = new $Uint64(0, 0); - _tuple$78 = bits.Add64(x141, x153, ((x$64 = (new p224Uint1(x160.$high, x160.$low)), new $Uint64(x$64.$high, x$64.$low)))); - x161 = _tuple$78[0]; - x162 = _tuple$78[1]; - x163 = new $Uint64(0, 0); - x164 = new $Uint64(0, 0); - _tuple$79 = bits.Add64(x143, x155, ((x$65 = (new p224Uint1(x162.$high, x162.$low)), new $Uint64(x$65.$high, x$65.$low)))); - x163 = _tuple$79[0]; - x164 = _tuple$79[1]; - x165 = (x$66 = (x$67 = ((x$68 = (new p224Uint1(x164.$high, x164.$low)), new $Uint64(x$68.$high, x$68.$low))), x$69 = (x$70 = ((x$71 = (new p224Uint1(x144.$high, x144.$low)), new $Uint64(x$71.$high, x$71.$low))), x$72 = (x$73 = ((x$74 = (new p224Uint1(x136.$high, x136.$low)), new $Uint64(x$74.$high, x$74.$low))), new $Uint64(x$73.$high + x124.$high, x$73.$low + x124.$low)), new $Uint64(x$70.$high + x$72.$high, x$70.$low + x$72.$low)), new $Uint64(x$67.$high + x$69.$high, x$67.$low + x$69.$low)), x$75 = (x$76 = ((x$77 = (new p224Uint1(x156.$high, x156.$low)), new $Uint64(x$77.$high, x$77.$low))), new $Uint64(x$76.$high + x148.$high, x$76.$low + x148.$low)), new $Uint64(x$66.$high + x$75.$high, x$66.$low + x$75.$low)); - x166 = new $Uint64(0, 0); - x167 = new $Uint64(0, 0); - _tuple$80 = bits.Sub64(x159, new $Uint64(0, 1), new $Uint64(0, 0)); - x166 = _tuple$80[0]; - x167 = _tuple$80[1]; - x168 = new $Uint64(0, 0); - x169 = new $Uint64(0, 0); - _tuple$81 = bits.Sub64(x161, new $Uint64(4294967295, 0), ((x$78 = (new p224Uint1(x167.$high, x167.$low)), new $Uint64(x$78.$high, x$78.$low)))); - x168 = _tuple$81[0]; - x169 = _tuple$81[1]; - x170 = new $Uint64(0, 0); - x171 = new $Uint64(0, 0); - _tuple$82 = bits.Sub64(x163, new $Uint64(4294967295, 4294967295), ((x$79 = (new p224Uint1(x169.$high, x169.$low)), new $Uint64(x$79.$high, x$79.$low)))); - x170 = _tuple$82[0]; - x171 = _tuple$82[1]; - x172 = new $Uint64(0, 0); - x173 = new $Uint64(0, 0); - _tuple$83 = bits.Sub64(x165, new $Uint64(0, 4294967295), ((x$80 = (new p224Uint1(x171.$high, x171.$low)), new $Uint64(x$80.$high, x$80.$low)))); - x172 = _tuple$83[0]; - x173 = _tuple$83[1]; - x175 = new $Uint64(0, 0); - _tuple$84 = bits.Sub64(new $Uint64(0, 0), new $Uint64(0, 0), ((x$81 = (new p224Uint1(x173.$high, x173.$low)), new $Uint64(x$81.$high, x$81.$low)))); - x175 = _tuple$84[1]; - x176 = new $Uint64(0, 0); - p224CmovznzU64((x176$24ptr || (x176$24ptr = new ptrType(function() { return x176; }, function($v) { x176 = $v; }))), (new p224Uint1(x175.$high, x175.$low)), x166, x159); - x177 = new $Uint64(0, 0); - p224CmovznzU64((x177$24ptr || (x177$24ptr = new ptrType(function() { return x177; }, function($v) { x177 = $v; }))), (new p224Uint1(x175.$high, x175.$low)), x168, x161); - x178 = new $Uint64(0, 0); - p224CmovznzU64((x178$24ptr || (x178$24ptr = new ptrType(function() { return x178; }, function($v) { x178 = $v; }))), (new p224Uint1(x175.$high, x175.$low)), x170, x163); - x179 = new $Uint64(0, 0); - p224CmovznzU64((x179$24ptr || (x179$24ptr = new ptrType(function() { return x179; }, function($v) { x179 = $v; }))), (new p224Uint1(x175.$high, x175.$low)), x172, x165); - out1.nilCheck, out1[0] = x176; - out1.nilCheck, out1[1] = x177; - out1.nilCheck, out1[2] = x178; - out1.nilCheck, out1[3] = x179; - }; - p224Selectznz = function(out1, arg1, arg2, arg3) { - var arg1, arg2, arg3, out1, x1, x1$24ptr, x2, x2$24ptr, x3, x3$24ptr, x4, x4$24ptr; - x1 = new $Uint64(0, 0); - p224CmovznzU64((x1$24ptr || (x1$24ptr = new ptrType(function() { return x1; }, function($v) { x1 = $v; }))), arg1, arg2[0], arg3[0]); - x2 = new $Uint64(0, 0); - p224CmovznzU64((x2$24ptr || (x2$24ptr = new ptrType(function() { return x2; }, function($v) { x2 = $v; }))), arg1, arg2[1], arg3[1]); - x3 = new $Uint64(0, 0); - p224CmovznzU64((x3$24ptr || (x3$24ptr = new ptrType(function() { return x3; }, function($v) { x3 = $v; }))), arg1, arg2[2], arg3[2]); - x4 = new $Uint64(0, 0); - p224CmovznzU64((x4$24ptr || (x4$24ptr = new ptrType(function() { return x4; }, function($v) { x4 = $v; }))), arg1, arg2[3], arg3[3]); - out1.nilCheck, out1[0] = x1; - out1.nilCheck, out1[1] = x2; - out1.nilCheck, out1[2] = x3; - out1.nilCheck, out1[3] = x4; - }; - p224ToBytes = function(out1, arg1) { - var arg1, out1, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x6, x7, x8, x9; - x1 = arg1[3]; - x2 = arg1[2]; - x3 = arg1[1]; - x4 = arg1[0]; - x5 = ((((x4.$low << 24 >>> 24)) & 255) >>> 0); - x6 = $shiftRightUint64(x4, 8); - x7 = ((((x6.$low << 24 >>> 24)) & 255) >>> 0); - x8 = $shiftRightUint64(x6, 8); - x9 = ((((x8.$low << 24 >>> 24)) & 255) >>> 0); - x10 = $shiftRightUint64(x8, 8); - x11 = ((((x10.$low << 24 >>> 24)) & 255) >>> 0); - x12 = $shiftRightUint64(x10, 8); - x13 = ((((x12.$low << 24 >>> 24)) & 255) >>> 0); - x14 = $shiftRightUint64(x12, 8); - x15 = ((((x14.$low << 24 >>> 24)) & 255) >>> 0); - x16 = $shiftRightUint64(x14, 8); - x17 = ((((x16.$low << 24 >>> 24)) & 255) >>> 0); - x18 = ((($shiftRightUint64(x16, 8)).$low << 24 >>> 24)); - x19 = ((((x3.$low << 24 >>> 24)) & 255) >>> 0); - x20 = $shiftRightUint64(x3, 8); - x21 = ((((x20.$low << 24 >>> 24)) & 255) >>> 0); - x22 = $shiftRightUint64(x20, 8); - x23 = ((((x22.$low << 24 >>> 24)) & 255) >>> 0); - x24 = $shiftRightUint64(x22, 8); - x25 = ((((x24.$low << 24 >>> 24)) & 255) >>> 0); - x26 = $shiftRightUint64(x24, 8); - x27 = ((((x26.$low << 24 >>> 24)) & 255) >>> 0); - x28 = $shiftRightUint64(x26, 8); - x29 = ((((x28.$low << 24 >>> 24)) & 255) >>> 0); - x30 = $shiftRightUint64(x28, 8); - x31 = ((((x30.$low << 24 >>> 24)) & 255) >>> 0); - x32 = ((($shiftRightUint64(x30, 8)).$low << 24 >>> 24)); - x33 = ((((x2.$low << 24 >>> 24)) & 255) >>> 0); - x34 = $shiftRightUint64(x2, 8); - x35 = ((((x34.$low << 24 >>> 24)) & 255) >>> 0); - x36 = $shiftRightUint64(x34, 8); - x37 = ((((x36.$low << 24 >>> 24)) & 255) >>> 0); - x38 = $shiftRightUint64(x36, 8); - x39 = ((((x38.$low << 24 >>> 24)) & 255) >>> 0); - x40 = $shiftRightUint64(x38, 8); - x41 = ((((x40.$low << 24 >>> 24)) & 255) >>> 0); - x42 = $shiftRightUint64(x40, 8); - x43 = ((((x42.$low << 24 >>> 24)) & 255) >>> 0); - x44 = $shiftRightUint64(x42, 8); - x45 = ((((x44.$low << 24 >>> 24)) & 255) >>> 0); - x46 = ((($shiftRightUint64(x44, 8)).$low << 24 >>> 24)); - x47 = ((((x1.$low << 24 >>> 24)) & 255) >>> 0); - x48 = $shiftRightUint64(x1, 8); - x49 = ((((x48.$low << 24 >>> 24)) & 255) >>> 0); - x50 = $shiftRightUint64(x48, 8); - x51 = ((((x50.$low << 24 >>> 24)) & 255) >>> 0); - x52 = ((($shiftRightUint64(x50, 8)).$low << 24 >>> 24)); - out1.nilCheck, out1[0] = x5; - out1.nilCheck, out1[1] = x7; - out1.nilCheck, out1[2] = x9; - out1.nilCheck, out1[3] = x11; - out1.nilCheck, out1[4] = x13; - out1.nilCheck, out1[5] = x15; - out1.nilCheck, out1[6] = x17; - out1.nilCheck, out1[7] = x18; - out1.nilCheck, out1[8] = x19; - out1.nilCheck, out1[9] = x21; - out1.nilCheck, out1[10] = x23; - out1.nilCheck, out1[11] = x25; - out1.nilCheck, out1[12] = x27; - out1.nilCheck, out1[13] = x29; - out1.nilCheck, out1[14] = x31; - out1.nilCheck, out1[15] = x32; - out1.nilCheck, out1[16] = x33; - out1.nilCheck, out1[17] = x35; - out1.nilCheck, out1[18] = x37; - out1.nilCheck, out1[19] = x39; - out1.nilCheck, out1[20] = x41; - out1.nilCheck, out1[21] = x43; - out1.nilCheck, out1[22] = x45; - out1.nilCheck, out1[23] = x46; - out1.nilCheck, out1[24] = x47; - out1.nilCheck, out1[25] = x49; - out1.nilCheck, out1[26] = x51; - out1.nilCheck, out1[27] = x52; - }; - p224FromBytes = function(out1, arg1) { - var arg1, out1, x, x$1, x$2, x$3, x1, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x2, x20, x21, x22, x23, x24, x25, x26, x27, x28, x29, x3, x30, x31, x32, x33, x34, x35, x36, x37, x38, x39, x4, x40, x41, x42, x43, x44, x45, x46, x47, x48, x49, x5, x50, x51, x52, x6, x7, x8, x9; - x1 = $shiftLeft64((new $Uint64(0, arg1[27])), 24); - x2 = $shiftLeft64((new $Uint64(0, arg1[26])), 16); - x3 = $shiftLeft64((new $Uint64(0, arg1[25])), 8); - x4 = arg1[24]; - x5 = $shiftLeft64((new $Uint64(0, arg1[23])), 56); - x6 = $shiftLeft64((new $Uint64(0, arg1[22])), 48); - x7 = $shiftLeft64((new $Uint64(0, arg1[21])), 40); - x8 = $shiftLeft64((new $Uint64(0, arg1[20])), 32); - x9 = $shiftLeft64((new $Uint64(0, arg1[19])), 24); - x10 = $shiftLeft64((new $Uint64(0, arg1[18])), 16); - x11 = $shiftLeft64((new $Uint64(0, arg1[17])), 8); - x12 = arg1[16]; - x13 = $shiftLeft64((new $Uint64(0, arg1[15])), 56); - x14 = $shiftLeft64((new $Uint64(0, arg1[14])), 48); - x15 = $shiftLeft64((new $Uint64(0, arg1[13])), 40); - x16 = $shiftLeft64((new $Uint64(0, arg1[12])), 32); - x17 = $shiftLeft64((new $Uint64(0, arg1[11])), 24); - x18 = $shiftLeft64((new $Uint64(0, arg1[10])), 16); - x19 = $shiftLeft64((new $Uint64(0, arg1[9])), 8); - x20 = arg1[8]; - x21 = $shiftLeft64((new $Uint64(0, arg1[7])), 56); - x22 = $shiftLeft64((new $Uint64(0, arg1[6])), 48); - x23 = $shiftLeft64((new $Uint64(0, arg1[5])), 40); - x24 = $shiftLeft64((new $Uint64(0, arg1[4])), 32); - x25 = $shiftLeft64((new $Uint64(0, arg1[3])), 24); - x26 = $shiftLeft64((new $Uint64(0, arg1[2])), 16); - x27 = $shiftLeft64((new $Uint64(0, arg1[1])), 8); - x28 = arg1[0]; - x29 = (x = (new $Uint64(0, x28)), new $Uint64(x27.$high + x.$high, x27.$low + x.$low)); - x30 = new $Uint64(x26.$high + x29.$high, x26.$low + x29.$low); - x31 = new $Uint64(x25.$high + x30.$high, x25.$low + x30.$low); - x32 = new $Uint64(x24.$high + x31.$high, x24.$low + x31.$low); - x33 = new $Uint64(x23.$high + x32.$high, x23.$low + x32.$low); - x34 = new $Uint64(x22.$high + x33.$high, x22.$low + x33.$low); - x35 = new $Uint64(x21.$high + x34.$high, x21.$low + x34.$low); - x36 = (x$1 = (new $Uint64(0, x20)), new $Uint64(x19.$high + x$1.$high, x19.$low + x$1.$low)); - x37 = new $Uint64(x18.$high + x36.$high, x18.$low + x36.$low); - x38 = new $Uint64(x17.$high + x37.$high, x17.$low + x37.$low); - x39 = new $Uint64(x16.$high + x38.$high, x16.$low + x38.$low); - x40 = new $Uint64(x15.$high + x39.$high, x15.$low + x39.$low); - x41 = new $Uint64(x14.$high + x40.$high, x14.$low + x40.$low); - x42 = new $Uint64(x13.$high + x41.$high, x13.$low + x41.$low); - x43 = (x$2 = (new $Uint64(0, x12)), new $Uint64(x11.$high + x$2.$high, x11.$low + x$2.$low)); - x44 = new $Uint64(x10.$high + x43.$high, x10.$low + x43.$low); - x45 = new $Uint64(x9.$high + x44.$high, x9.$low + x44.$low); - x46 = new $Uint64(x8.$high + x45.$high, x8.$low + x45.$low); - x47 = new $Uint64(x7.$high + x46.$high, x7.$low + x46.$low); - x48 = new $Uint64(x6.$high + x47.$high, x6.$low + x47.$low); - x49 = new $Uint64(x5.$high + x48.$high, x5.$low + x48.$low); - x50 = (x$3 = (new $Uint64(0, x4)), new $Uint64(x3.$high + x$3.$high, x3.$low + x$3.$low)); - x51 = new $Uint64(x2.$high + x50.$high, x2.$low + x50.$low); - x52 = new $Uint64(x1.$high + x51.$high, x1.$low + x51.$low); - out1.nilCheck, out1[0] = x35; - out1.nilCheck, out1[1] = x42; - out1.nilCheck, out1[2] = x49; - out1.nilCheck, out1[3] = x52; - }; - P224Element.ptr.prototype.One = function() { - var e; - e = this; - p224SetOne(e.x); - return e; - }; - P224Element.prototype.One = function() { return this.$val.One(); }; - P224Element.ptr.prototype.Equal = function(t) { - var e, eBytes, t, tBytes; - e = this; - eBytes = e.Bytes(); - tBytes = t.Bytes(); - return subtle.ConstantTimeCompare(eBytes, tBytes); - }; - P224Element.prototype.Equal = function(t) { return this.$val.Equal(t); }; - P224Element.ptr.prototype.IsZero = function() { - var e, eBytes; - e = this; - eBytes = e.Bytes(); - return subtle.ConstantTimeCompare(eBytes, p224ZeroEncoding); - }; - P224Element.prototype.IsZero = function() { return this.$val.IsZero(); }; - P224Element.ptr.prototype.Set = function(t) { - var e, t; - e = this; - p224MontgomeryDomainFieldElement.copy(e.x, t.x); - return e; - }; - P224Element.prototype.Set = function(t) { return this.$val.Set(t); }; - P224Element.ptr.prototype.Bytes = function() { - var e, out; - e = this; - out = arrayType$5.zero(); - return e.bytes(out); - }; - P224Element.prototype.Bytes = function() { return this.$val.Bytes(); }; - P224Element.ptr.prototype.bytes = function(out) { - var e, out, tmp; - e = this; - tmp = arrayType$2.zero(); - p224FromMontgomery(tmp, e.x); - p224ToBytes(out, (tmp)); - p224InvertEndianness(new sliceType(out)); - return new sliceType(out); - }; - P224Element.prototype.bytes = function(out) { return this.$val.bytes(out); }; - P224Element.ptr.prototype.SetBytes = function(v) { - var _i, _ref, e, i, in$1, tmp, v; - e = this; - if (!((v.$length === 28))) { - return [ptrType$3.nil, errors.New("invalid P224Element encoding")]; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) < ((i < 0 || i >= p224MinusOneEncoding.$length) ? ($throwRuntimeError("index out of range"), undefined) : p224MinusOneEncoding.$array[p224MinusOneEncoding.$offset + i])) { - break; - } - if (((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) > ((i < 0 || i >= p224MinusOneEncoding.$length) ? ($throwRuntimeError("index out of range"), undefined) : p224MinusOneEncoding.$array[p224MinusOneEncoding.$offset + i])) { - return [ptrType$3.nil, errors.New("invalid P224Element encoding")]; - } - _i++; - } - in$1 = arrayType$5.zero(); - $copySlice(new sliceType(in$1), v); - p224InvertEndianness(new sliceType(in$1)); - tmp = arrayType$2.zero(); - p224FromBytes((tmp), in$1); - p224ToMontgomery(e.x, tmp); - return [e, $ifaceNil]; - }; - P224Element.prototype.SetBytes = function(v) { return this.$val.SetBytes(v); }; - P224Element.ptr.prototype.Add = function(t1, t2) { - var e, t1, t2; - e = this; - p224Add(e.x, t1.x, t2.x); - return e; - }; - P224Element.prototype.Add = function(t1, t2) { return this.$val.Add(t1, t2); }; - P224Element.ptr.prototype.Sub = function(t1, t2) { - var e, t1, t2; - e = this; - p224Sub(e.x, t1.x, t2.x); - return e; - }; - P224Element.prototype.Sub = function(t1, t2) { return this.$val.Sub(t1, t2); }; - P224Element.ptr.prototype.Mul = function(t1, t2) { - var e, t1, t2; - e = this; - p224Mul(e.x, t1.x, t2.x); - return e; - }; - P224Element.prototype.Mul = function(t1, t2) { return this.$val.Mul(t1, t2); }; - P224Element.ptr.prototype.Square = function(t) { - var e, t; - e = this; - p224Square(e.x, t.x); - return e; - }; - P224Element.prototype.Square = function(t) { return this.$val.Square(t); }; - P224Element.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, v; - v = this; - p224Selectznz((v.x), (new p224Uint1(0, cond)), (b.x), (a.x)); - return v; - }; - P224Element.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - p224InvertEndianness = function(v) { - var _q, _tmp, _tmp$1, i, v, x, x$1; - i = 0; - while (true) { - if (!(i < (_q = v.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")))) { break; } - _tmp = (x = (v.$length - 1 >> 0) - i >> 0, ((x < 0 || x >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x])); - _tmp$1 = ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]); - ((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i] = _tmp); - (x$1 = (v.$length - 1 >> 0) - i >> 0, ((x$1 < 0 || x$1 >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + x$1] = _tmp$1)); - i = i + (1) >> 0; - } - }; - ptrType$1.methods = [{prop: "Invert", name: "Invert", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "One", name: "One", pkg: "", typ: $funcType([], [ptrType$1], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/elliptic/internal/fiat", typ: $funcType([ptrType$4], [sliceType], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType$1, $error], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Square", name: "Square", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$1, ptrType$1, $Int], [ptrType$1], false)}]; - ptrType$2.methods = [{prop: "Invert", name: "Invert", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "One", name: "One", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType$2], [$Int], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/elliptic/internal/fiat", typ: $funcType([ptrType$5], [sliceType], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType$2, $error], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType$2, ptrType$2], [ptrType$2], false)}, {prop: "Square", name: "Square", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$2, ptrType$2, $Int], [ptrType$2], false)}]; - ptrType$3.methods = [{prop: "Invert", name: "Invert", pkg: "", typ: $funcType([ptrType$3], [ptrType$3], false)}, {prop: "One", name: "One", pkg: "", typ: $funcType([], [ptrType$3], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType$3], [$Int], false)}, {prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$3], [ptrType$3], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/elliptic/internal/fiat", typ: $funcType([ptrType$6], [sliceType], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType$3, $error], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$3, ptrType$3], [ptrType$3], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType$3, ptrType$3], [ptrType$3], false)}, {prop: "Mul", name: "Mul", pkg: "", typ: $funcType([ptrType$3, ptrType$3], [ptrType$3], false)}, {prop: "Square", name: "Square", pkg: "", typ: $funcType([ptrType$3], [ptrType$3], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$3, ptrType$3, $Int], [ptrType$3], false)}]; - p521MontgomeryDomainFieldElement.init($Uint64, 9); - P521Element.init("crypto/elliptic/internal/fiat", [{prop: "x", name: "x", embedded: false, exported: false, typ: p521MontgomeryDomainFieldElement, tag: ""}]); - p384MontgomeryDomainFieldElement.init($Uint64, 6); - P384Element.init("crypto/elliptic/internal/fiat", [{prop: "x", name: "x", embedded: false, exported: false, typ: p384MontgomeryDomainFieldElement, tag: ""}]); - p224MontgomeryDomainFieldElement.init($Uint64, 4); - P224Element.init("crypto/elliptic/internal/fiat", [{prop: "x", name: "x", embedded: false, exported: false, typ: p224MontgomeryDomainFieldElement, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p521ZeroEncoding = new P521Element.ptr(arrayType.zero()).Bytes(); - p521MinusOneEncoding = new P521Element.ptr(arrayType.zero()).Sub(new P521Element.ptr(arrayType.zero()), new P521Element.ptr(arrayType.zero()).One()).Bytes(); - p384ZeroEncoding = new P384Element.ptr(arrayType$1.zero()).Bytes(); - p384MinusOneEncoding = new P384Element.ptr(arrayType$1.zero()).Sub(new P384Element.ptr(arrayType$1.zero()), new P384Element.ptr(arrayType$1.zero()).One()).Bytes(); - p224ZeroEncoding = new P224Element.ptr(arrayType$2.zero()).Bytes(); - p224MinusOneEncoding = new P224Element.ptr(arrayType$2.zero()).Sub(new P224Element.ptr(arrayType$2.zero()), new P224Element.ptr(arrayType$2.zero()).One()).Bytes(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/elliptic/internal/nistec"] = (function() { - var $pkg = {}, $init, fiat, subtle, errors, P521Point, P384Point, P224Point, arrayType, sliceType, arrayType$1, arrayType$2, ptrType, ptrType$1, arrayType$3, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, p521B, p521G, p384B, p384G, p224B, p224G, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, NewP521Point, NewP521Generator, p521CheckOnCurve, NewP384Point, NewP384Generator, p384CheckOnCurve, NewP224Point, NewP224Generator, p224CheckOnCurve; - fiat = $packages["crypto/elliptic/internal/fiat"]; - subtle = $packages["crypto/subtle"]; - errors = $packages["errors"]; - P521Point = $pkg.P521Point = $newType(0, $kindStruct, "nistec.P521Point", true, "crypto/elliptic/internal/nistec", true, function(x_, y_, z_) { - this.$val = this; - if (arguments.length === 0) { - this.x = ptrType.nil; - this.y = ptrType.nil; - this.z = ptrType.nil; - return; - } - this.x = x_; - this.y = y_; - this.z = z_; - }); - P384Point = $pkg.P384Point = $newType(0, $kindStruct, "nistec.P384Point", true, "crypto/elliptic/internal/nistec", true, function(x_, y_, z_) { - this.$val = this; - if (arguments.length === 0) { - this.x = ptrType$2.nil; - this.y = ptrType$2.nil; - this.z = ptrType$2.nil; - return; - } - this.x = x_; - this.y = y_; - this.z = z_; - }); - P224Point = $pkg.P224Point = $newType(0, $kindStruct, "nistec.P224Point", true, "crypto/elliptic/internal/nistec", true, function(x_, y_, z_) { - this.$val = this; - if (arguments.length === 0) { - this.x = ptrType$4.nil; - this.y = ptrType$4.nil; - this.z = ptrType$4.nil; - return; - } - this.x = x_; - this.y = y_; - this.z = z_; - }); - arrayType = $arrayType($Uint64, 9); - sliceType = $sliceType($Uint8); - arrayType$1 = $arrayType($Uint64, 6); - arrayType$2 = $arrayType($Uint64, 4); - ptrType = $ptrType(fiat.P521Element); - ptrType$1 = $ptrType(P521Point); - arrayType$3 = $arrayType($Uint8, 133); - ptrType$2 = $ptrType(fiat.P384Element); - ptrType$3 = $ptrType(P384Point); - ptrType$4 = $ptrType(fiat.P224Element); - ptrType$5 = $ptrType(P224Point); - ptrType$6 = $ptrType(arrayType$3); - NewP521Point = function() { - return new P521Point.ptr(new fiat.P521Element.ptr(arrayType.zero()), new fiat.P521Element.ptr(arrayType.zero()).One(), new fiat.P521Element.ptr(arrayType.zero())); - }; - $pkg.NewP521Point = NewP521Point; - NewP521Generator = function() { - return (new P521Point.ptr(new fiat.P521Element.ptr(arrayType.zero()), new fiat.P521Element.ptr(arrayType.zero()), new fiat.P521Element.ptr(arrayType.zero()))).Set(p521G); - }; - $pkg.NewP521Generator = NewP521Generator; - P521Point.ptr.prototype.Set = function(q) { - var p, q; - p = this; - p.x.Set(q.x); - p.y.Set(q.y); - p.z.Set(q.z); - return p; - }; - P521Point.prototype.Set = function(q) { return this.$val.Set(q); }; - P521Point.ptr.prototype.SetBytes = function(b) { - var _tuple$6, _tuple$7, b, err, err$1, p, x, y; - p = this; - if ((b.$length === 1) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 0)) { - return [p.Set(NewP521Point()), $ifaceNil]; - } else if ((b.$length === 133) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 4)) { - _tuple$6 = new fiat.P521Element.ptr(arrayType.zero()).SetBytes($subslice(b, 1, 67)); - x = _tuple$6[0]; - err = _tuple$6[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$1.nil, err]; - } - _tuple$7 = new fiat.P521Element.ptr(arrayType.zero()).SetBytes($subslice(b, 67)); - y = _tuple$7[0]; - err = _tuple$7[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$1.nil, err]; - } - err$1 = p521CheckOnCurve(x, y); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - return [ptrType$1.nil, err$1]; - } - p.x.Set(x); - p.y.Set(y); - p.z.One(); - return [p, $ifaceNil]; - } else if ((b.$length === 67) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 0)) { - return [ptrType$1.nil, errors.New("unimplemented")]; - } else { - return [ptrType$1.nil, errors.New("invalid P521 point encoding")]; - } - }; - P521Point.prototype.SetBytes = function(b) { return this.$val.SetBytes(b); }; - p521CheckOnCurve = function(x, y) { - var threeX, x, x3, y, y2; - x3 = new fiat.P521Element.ptr(arrayType.zero()).Square(x); - x3.Mul(x3, x); - threeX = new fiat.P521Element.ptr(arrayType.zero()).Add(x, x); - threeX.Add(threeX, x); - x3.Sub(x3, threeX); - x3.Add(x3, p521B); - y2 = new fiat.P521Element.ptr(arrayType.zero()).Square(y); - if (!((x3.Equal(y2) === 1))) { - return errors.New("P521 point not on curve"); - } - return $ifaceNil; - }; - P521Point.ptr.prototype.Bytes = function() { - var out, p; - p = this; - out = arrayType$3.zero(); - return p.bytes(out); - }; - P521Point.prototype.Bytes = function() { return this.$val.Bytes(); }; - P521Point.ptr.prototype.bytes = function(out) { - var buf, out, p, xx, yy, zinv; - p = this; - if (p.z.IsZero() === 1) { - return $append($subslice(new sliceType(out), 0, 0), 0); - } - zinv = new fiat.P521Element.ptr(arrayType.zero()).Invert(p.z); - xx = new fiat.P521Element.ptr(arrayType.zero()).Mul(p.x, zinv); - yy = new fiat.P521Element.ptr(arrayType.zero()).Mul(p.y, zinv); - buf = $append($subslice(new sliceType(out), 0, 0), 4); - buf = $appendSlice(buf, xx.Bytes()); - buf = $appendSlice(buf, yy.Bytes()); - return buf; - }; - P521Point.prototype.bytes = function(out) { return this.$val.bytes(out); }; - P521Point.ptr.prototype.Add = function(p1, p2) { - var p1, p2, q, t0, t1, t2, t3, t4, x3, y3, z3; - q = this; - t0 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p1.x, p2.x); - t1 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p1.y, p2.y); - t2 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p1.z, p2.z); - t3 = new fiat.P521Element.ptr(arrayType.zero()).Add(p1.x, p1.y); - t4 = new fiat.P521Element.ptr(arrayType.zero()).Add(p2.x, p2.y); - t3.Mul(t3, t4); - t4.Add(t0, t1); - t3.Sub(t3, t4); - t4.Add(p1.y, p1.z); - x3 = new fiat.P521Element.ptr(arrayType.zero()).Add(p2.y, p2.z); - t4.Mul(t4, x3); - x3.Add(t1, t2); - t4.Sub(t4, x3); - x3.Add(p1.x, p1.z); - y3 = new fiat.P521Element.ptr(arrayType.zero()).Add(p2.x, p2.z); - x3.Mul(x3, y3); - y3.Add(t0, t2); - y3.Sub(x3, y3); - z3 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p521B, t2); - x3.Sub(y3, z3); - z3.Add(x3, x3); - x3.Add(x3, z3); - z3.Sub(t1, x3); - x3.Add(t1, x3); - y3.Mul(p521B, y3); - t1.Add(t2, t2); - t2.Add(t1, t2); - y3.Sub(y3, t2); - y3.Sub(y3, t0); - t1.Add(y3, y3); - y3.Add(t1, y3); - t1.Add(t0, t0); - t0.Add(t1, t0); - t0.Sub(t0, t2); - t1.Mul(t4, y3); - t2.Mul(t0, y3); - y3.Mul(x3, z3); - y3.Add(y3, t2); - x3.Mul(t3, x3); - x3.Sub(x3, t1); - z3.Mul(t4, z3); - t1.Mul(t3, t0); - z3.Add(z3, t1); - q.x.Set(x3); - q.y.Set(y3); - q.z.Set(z3); - return q; - }; - P521Point.prototype.Add = function(p1, p2) { return this.$val.Add(p1, p2); }; - P521Point.ptr.prototype.Double = function(p) { - var p, q, t0, t1, t2, t3, x3, y3, z3; - q = this; - t0 = new fiat.P521Element.ptr(arrayType.zero()).Square(p.x); - t1 = new fiat.P521Element.ptr(arrayType.zero()).Square(p.y); - t2 = new fiat.P521Element.ptr(arrayType.zero()).Square(p.z); - t3 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p.x, p.y); - t3.Add(t3, t3); - z3 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p.x, p.z); - z3.Add(z3, z3); - y3 = new fiat.P521Element.ptr(arrayType.zero()).Mul(p521B, t2); - y3.Sub(y3, z3); - x3 = new fiat.P521Element.ptr(arrayType.zero()).Add(y3, y3); - y3.Add(x3, y3); - x3.Sub(t1, y3); - y3.Add(t1, y3); - y3.Mul(x3, y3); - x3.Mul(x3, t3); - t3.Add(t2, t2); - t2.Add(t2, t3); - z3.Mul(p521B, z3); - z3.Sub(z3, t2); - z3.Sub(z3, t0); - t3.Add(z3, z3); - z3.Add(z3, t3); - t3.Add(t0, t0); - t0.Add(t3, t0); - t0.Sub(t0, t2); - t0.Mul(t0, z3); - y3.Add(y3, t0); - t0.Mul(p.y, p.z); - t0.Add(t0, t0); - z3.Mul(t0, z3); - x3.Sub(x3, z3); - z3.Mul(t0, t1); - z3.Add(z3, z3); - z3.Add(z3, z3); - q.x.Set(x3); - q.y.Set(y3); - q.z.Set(z3); - return q; - }; - P521Point.prototype.Double = function(p) { return this.$val.Double(p); }; - P521Point.ptr.prototype.Select = function(p1, p2, cond) { - var cond, p1, p2, q; - q = this; - q.x.Select(p1.x, p2.x, cond); - q.y.Select(p1.y, p2.y, cond); - q.z.Select(p1.z, p2.z, cond); - return q; - }; - P521Point.prototype.Select = function(p1, p2, cond) { return this.$val.Select(p1, p2, cond); }; - P521Point.ptr.prototype.ScalarMult = function(q, scalar) { - var _i, _ref, byte$1, cond, cond$1, i, i$1, i$2, p, q, scalar, t, table, x; - p = this; - table = $toNativeArray($kindPtr, [NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point(), NewP521Point()]); - i = 1; - while (true) { - if (!(i < 16)) { break; } - ((i < 0 || i >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i]).Add((x = i - 1 >> 0, ((x < 0 || x >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[x])), q); - i = i + (1) >> 0; - } - t = NewP521Point(); - p.Set(NewP521Point()); - _ref = scalar; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - byte$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - p.Double(p); - p.Double(p); - p.Double(p); - p.Double(p); - i$1 = 0; - while (true) { - if (!(i$1 < 16)) { break; } - cond = subtle.ConstantTimeByteEq(byte$1 >>> 4 << 24 >>> 24, i$1); - t.Select(((i$1 < 0 || i$1 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$1]), t, cond); - i$1 = i$1 + (1) << 24 >>> 24; - } - p.Add(p, t); - p.Double(p); - p.Double(p); - p.Double(p); - p.Double(p); - i$2 = 0; - while (true) { - if (!(i$2 < 16)) { break; } - cond$1 = subtle.ConstantTimeByteEq((byte$1 & 15) >>> 0, i$2); - t.Select(((i$2 < 0 || i$2 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$2]), t, cond$1); - i$2 = i$2 + (1) << 24 >>> 24; - } - p.Add(p, t); - _i++; - } - return p; - }; - P521Point.prototype.ScalarMult = function(q, scalar) { return this.$val.ScalarMult(q, scalar); }; - NewP384Point = function() { - return new P384Point.ptr(new fiat.P384Element.ptr(arrayType$1.zero()), new fiat.P384Element.ptr(arrayType$1.zero()).One(), new fiat.P384Element.ptr(arrayType$1.zero())); - }; - $pkg.NewP384Point = NewP384Point; - NewP384Generator = function() { - return (new P384Point.ptr(new fiat.P384Element.ptr(arrayType$1.zero()), new fiat.P384Element.ptr(arrayType$1.zero()), new fiat.P384Element.ptr(arrayType$1.zero()))).Set(p384G); - }; - $pkg.NewP384Generator = NewP384Generator; - P384Point.ptr.prototype.Set = function(q) { - var p, q; - p = this; - p.x.Set(q.x); - p.y.Set(q.y); - p.z.Set(q.z); - return p; - }; - P384Point.prototype.Set = function(q) { return this.$val.Set(q); }; - P384Point.ptr.prototype.SetBytes = function(b) { - var _tuple$6, _tuple$7, b, err, err$1, p, x, y; - p = this; - if ((b.$length === 1) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 0)) { - return [p.Set(NewP384Point()), $ifaceNil]; - } else if ((b.$length === 97) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 4)) { - _tuple$6 = new fiat.P384Element.ptr(arrayType$1.zero()).SetBytes($subslice(b, 1, 49)); - x = _tuple$6[0]; - err = _tuple$6[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$3.nil, err]; - } - _tuple$7 = new fiat.P384Element.ptr(arrayType$1.zero()).SetBytes($subslice(b, 49)); - y = _tuple$7[0]; - err = _tuple$7[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$3.nil, err]; - } - err$1 = p384CheckOnCurve(x, y); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - return [ptrType$3.nil, err$1]; - } - p.x.Set(x); - p.y.Set(y); - p.z.One(); - return [p, $ifaceNil]; - } else if ((b.$length === 49) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 0)) { - return [ptrType$3.nil, errors.New("unimplemented")]; - } else { - return [ptrType$3.nil, errors.New("invalid P384 point encoding")]; - } - }; - P384Point.prototype.SetBytes = function(b) { return this.$val.SetBytes(b); }; - p384CheckOnCurve = function(x, y) { - var threeX, x, x3, y, y2; - x3 = new fiat.P384Element.ptr(arrayType$1.zero()).Square(x); - x3.Mul(x3, x); - threeX = new fiat.P384Element.ptr(arrayType$1.zero()).Add(x, x); - threeX.Add(threeX, x); - x3.Sub(x3, threeX); - x3.Add(x3, p384B); - y2 = new fiat.P384Element.ptr(arrayType$1.zero()).Square(y); - if (!((x3.Equal(y2) === 1))) { - return errors.New("P384 point not on curve"); - } - return $ifaceNil; - }; - P384Point.ptr.prototype.Bytes = function() { - var out, p; - p = this; - out = arrayType$3.zero(); - return p.bytes(out); - }; - P384Point.prototype.Bytes = function() { return this.$val.Bytes(); }; - P384Point.ptr.prototype.bytes = function(out) { - var buf, out, p, xx, yy, zinv; - p = this; - if (p.z.IsZero() === 1) { - return $append($subslice(new sliceType(out), 0, 0), 0); - } - zinv = new fiat.P384Element.ptr(arrayType$1.zero()).Invert(p.z); - xx = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p.x, zinv); - yy = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p.y, zinv); - buf = $append($subslice(new sliceType(out), 0, 0), 4); - buf = $appendSlice(buf, xx.Bytes()); - buf = $appendSlice(buf, yy.Bytes()); - return buf; - }; - P384Point.prototype.bytes = function(out) { return this.$val.bytes(out); }; - P384Point.ptr.prototype.Add = function(p1, p2) { - var p1, p2, q, t0, t1, t2, t3, t4, x3, y3, z3; - q = this; - t0 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p1.x, p2.x); - t1 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p1.y, p2.y); - t2 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p1.z, p2.z); - t3 = new fiat.P384Element.ptr(arrayType$1.zero()).Add(p1.x, p1.y); - t4 = new fiat.P384Element.ptr(arrayType$1.zero()).Add(p2.x, p2.y); - t3.Mul(t3, t4); - t4.Add(t0, t1); - t3.Sub(t3, t4); - t4.Add(p1.y, p1.z); - x3 = new fiat.P384Element.ptr(arrayType$1.zero()).Add(p2.y, p2.z); - t4.Mul(t4, x3); - x3.Add(t1, t2); - t4.Sub(t4, x3); - x3.Add(p1.x, p1.z); - y3 = new fiat.P384Element.ptr(arrayType$1.zero()).Add(p2.x, p2.z); - x3.Mul(x3, y3); - y3.Add(t0, t2); - y3.Sub(x3, y3); - z3 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p384B, t2); - x3.Sub(y3, z3); - z3.Add(x3, x3); - x3.Add(x3, z3); - z3.Sub(t1, x3); - x3.Add(t1, x3); - y3.Mul(p384B, y3); - t1.Add(t2, t2); - t2.Add(t1, t2); - y3.Sub(y3, t2); - y3.Sub(y3, t0); - t1.Add(y3, y3); - y3.Add(t1, y3); - t1.Add(t0, t0); - t0.Add(t1, t0); - t0.Sub(t0, t2); - t1.Mul(t4, y3); - t2.Mul(t0, y3); - y3.Mul(x3, z3); - y3.Add(y3, t2); - x3.Mul(t3, x3); - x3.Sub(x3, t1); - z3.Mul(t4, z3); - t1.Mul(t3, t0); - z3.Add(z3, t1); - q.x.Set(x3); - q.y.Set(y3); - q.z.Set(z3); - return q; - }; - P384Point.prototype.Add = function(p1, p2) { return this.$val.Add(p1, p2); }; - P384Point.ptr.prototype.Double = function(p) { - var p, q, t0, t1, t2, t3, x3, y3, z3; - q = this; - t0 = new fiat.P384Element.ptr(arrayType$1.zero()).Square(p.x); - t1 = new fiat.P384Element.ptr(arrayType$1.zero()).Square(p.y); - t2 = new fiat.P384Element.ptr(arrayType$1.zero()).Square(p.z); - t3 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p.x, p.y); - t3.Add(t3, t3); - z3 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p.x, p.z); - z3.Add(z3, z3); - y3 = new fiat.P384Element.ptr(arrayType$1.zero()).Mul(p384B, t2); - y3.Sub(y3, z3); - x3 = new fiat.P384Element.ptr(arrayType$1.zero()).Add(y3, y3); - y3.Add(x3, y3); - x3.Sub(t1, y3); - y3.Add(t1, y3); - y3.Mul(x3, y3); - x3.Mul(x3, t3); - t3.Add(t2, t2); - t2.Add(t2, t3); - z3.Mul(p384B, z3); - z3.Sub(z3, t2); - z3.Sub(z3, t0); - t3.Add(z3, z3); - z3.Add(z3, t3); - t3.Add(t0, t0); - t0.Add(t3, t0); - t0.Sub(t0, t2); - t0.Mul(t0, z3); - y3.Add(y3, t0); - t0.Mul(p.y, p.z); - t0.Add(t0, t0); - z3.Mul(t0, z3); - x3.Sub(x3, z3); - z3.Mul(t0, t1); - z3.Add(z3, z3); - z3.Add(z3, z3); - q.x.Set(x3); - q.y.Set(y3); - q.z.Set(z3); - return q; - }; - P384Point.prototype.Double = function(p) { return this.$val.Double(p); }; - P384Point.ptr.prototype.Select = function(p1, p2, cond) { - var cond, p1, p2, q; - q = this; - q.x.Select(p1.x, p2.x, cond); - q.y.Select(p1.y, p2.y, cond); - q.z.Select(p1.z, p2.z, cond); - return q; - }; - P384Point.prototype.Select = function(p1, p2, cond) { return this.$val.Select(p1, p2, cond); }; - P384Point.ptr.prototype.ScalarMult = function(q, scalar) { - var _i, _ref, byte$1, cond, cond$1, i, i$1, i$2, p, q, scalar, t, table, x; - p = this; - table = $toNativeArray($kindPtr, [NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point(), NewP384Point()]); - i = 1; - while (true) { - if (!(i < 16)) { break; } - ((i < 0 || i >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i]).Add((x = i - 1 >> 0, ((x < 0 || x >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[x])), q); - i = i + (1) >> 0; - } - t = NewP384Point(); - p.Set(NewP384Point()); - _ref = scalar; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - byte$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - p.Double(p); - p.Double(p); - p.Double(p); - p.Double(p); - i$1 = 0; - while (true) { - if (!(i$1 < 16)) { break; } - cond = subtle.ConstantTimeByteEq(byte$1 >>> 4 << 24 >>> 24, i$1); - t.Select(((i$1 < 0 || i$1 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$1]), t, cond); - i$1 = i$1 + (1) << 24 >>> 24; - } - p.Add(p, t); - p.Double(p); - p.Double(p); - p.Double(p); - p.Double(p); - i$2 = 0; - while (true) { - if (!(i$2 < 16)) { break; } - cond$1 = subtle.ConstantTimeByteEq((byte$1 & 15) >>> 0, i$2); - t.Select(((i$2 < 0 || i$2 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$2]), t, cond$1); - i$2 = i$2 + (1) << 24 >>> 24; - } - p.Add(p, t); - _i++; - } - return p; - }; - P384Point.prototype.ScalarMult = function(q, scalar) { return this.$val.ScalarMult(q, scalar); }; - NewP224Point = function() { - return new P224Point.ptr(new fiat.P224Element.ptr(arrayType$2.zero()), new fiat.P224Element.ptr(arrayType$2.zero()).One(), new fiat.P224Element.ptr(arrayType$2.zero())); - }; - $pkg.NewP224Point = NewP224Point; - NewP224Generator = function() { - return (new P224Point.ptr(new fiat.P224Element.ptr(arrayType$2.zero()), new fiat.P224Element.ptr(arrayType$2.zero()), new fiat.P224Element.ptr(arrayType$2.zero()))).Set(p224G); - }; - $pkg.NewP224Generator = NewP224Generator; - P224Point.ptr.prototype.Set = function(q) { - var p, q; - p = this; - p.x.Set(q.x); - p.y.Set(q.y); - p.z.Set(q.z); - return p; - }; - P224Point.prototype.Set = function(q) { return this.$val.Set(q); }; - P224Point.ptr.prototype.SetBytes = function(b) { - var _tuple$6, _tuple$7, b, err, err$1, p, x, y; - p = this; - if ((b.$length === 1) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 0)) { - return [p.Set(NewP224Point()), $ifaceNil]; - } else if ((b.$length === 57) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 4)) { - _tuple$6 = new fiat.P224Element.ptr(arrayType$2.zero()).SetBytes($subslice(b, 1, 29)); - x = _tuple$6[0]; - err = _tuple$6[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$5.nil, err]; - } - _tuple$7 = new fiat.P224Element.ptr(arrayType$2.zero()).SetBytes($subslice(b, 29)); - y = _tuple$7[0]; - err = _tuple$7[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$5.nil, err]; - } - err$1 = p224CheckOnCurve(x, y); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - return [ptrType$5.nil, err$1]; - } - p.x.Set(x); - p.y.Set(y); - p.z.One(); - return [p, $ifaceNil]; - } else if ((b.$length === 29) && ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 0)) { - return [ptrType$5.nil, errors.New("unimplemented")]; - } else { - return [ptrType$5.nil, errors.New("invalid P224 point encoding")]; - } - }; - P224Point.prototype.SetBytes = function(b) { return this.$val.SetBytes(b); }; - p224CheckOnCurve = function(x, y) { - var threeX, x, x3, y, y2; - x3 = new fiat.P224Element.ptr(arrayType$2.zero()).Square(x); - x3.Mul(x3, x); - threeX = new fiat.P224Element.ptr(arrayType$2.zero()).Add(x, x); - threeX.Add(threeX, x); - x3.Sub(x3, threeX); - x3.Add(x3, p224B); - y2 = new fiat.P224Element.ptr(arrayType$2.zero()).Square(y); - if (!((x3.Equal(y2) === 1))) { - return errors.New("P224 point not on curve"); - } - return $ifaceNil; - }; - P224Point.ptr.prototype.Bytes = function() { - var out, p; - p = this; - out = arrayType$3.zero(); - return p.bytes(out); - }; - P224Point.prototype.Bytes = function() { return this.$val.Bytes(); }; - P224Point.ptr.prototype.bytes = function(out) { - var buf, out, p, xx, yy, zinv; - p = this; - if (p.z.IsZero() === 1) { - return $append($subslice(new sliceType(out), 0, 0), 0); - } - zinv = new fiat.P224Element.ptr(arrayType$2.zero()).Invert(p.z); - xx = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p.x, zinv); - yy = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p.y, zinv); - buf = $append($subslice(new sliceType(out), 0, 0), 4); - buf = $appendSlice(buf, xx.Bytes()); - buf = $appendSlice(buf, yy.Bytes()); - return buf; - }; - P224Point.prototype.bytes = function(out) { return this.$val.bytes(out); }; - P224Point.ptr.prototype.Add = function(p1, p2) { - var p1, p2, q, t0, t1, t2, t3, t4, x3, y3, z3; - q = this; - t0 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p1.x, p2.x); - t1 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p1.y, p2.y); - t2 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p1.z, p2.z); - t3 = new fiat.P224Element.ptr(arrayType$2.zero()).Add(p1.x, p1.y); - t4 = new fiat.P224Element.ptr(arrayType$2.zero()).Add(p2.x, p2.y); - t3.Mul(t3, t4); - t4.Add(t0, t1); - t3.Sub(t3, t4); - t4.Add(p1.y, p1.z); - x3 = new fiat.P224Element.ptr(arrayType$2.zero()).Add(p2.y, p2.z); - t4.Mul(t4, x3); - x3.Add(t1, t2); - t4.Sub(t4, x3); - x3.Add(p1.x, p1.z); - y3 = new fiat.P224Element.ptr(arrayType$2.zero()).Add(p2.x, p2.z); - x3.Mul(x3, y3); - y3.Add(t0, t2); - y3.Sub(x3, y3); - z3 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p224B, t2); - x3.Sub(y3, z3); - z3.Add(x3, x3); - x3.Add(x3, z3); - z3.Sub(t1, x3); - x3.Add(t1, x3); - y3.Mul(p224B, y3); - t1.Add(t2, t2); - t2.Add(t1, t2); - y3.Sub(y3, t2); - y3.Sub(y3, t0); - t1.Add(y3, y3); - y3.Add(t1, y3); - t1.Add(t0, t0); - t0.Add(t1, t0); - t0.Sub(t0, t2); - t1.Mul(t4, y3); - t2.Mul(t0, y3); - y3.Mul(x3, z3); - y3.Add(y3, t2); - x3.Mul(t3, x3); - x3.Sub(x3, t1); - z3.Mul(t4, z3); - t1.Mul(t3, t0); - z3.Add(z3, t1); - q.x.Set(x3); - q.y.Set(y3); - q.z.Set(z3); - return q; - }; - P224Point.prototype.Add = function(p1, p2) { return this.$val.Add(p1, p2); }; - P224Point.ptr.prototype.Double = function(p) { - var p, q, t0, t1, t2, t3, x3, y3, z3; - q = this; - t0 = new fiat.P224Element.ptr(arrayType$2.zero()).Square(p.x); - t1 = new fiat.P224Element.ptr(arrayType$2.zero()).Square(p.y); - t2 = new fiat.P224Element.ptr(arrayType$2.zero()).Square(p.z); - t3 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p.x, p.y); - t3.Add(t3, t3); - z3 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p.x, p.z); - z3.Add(z3, z3); - y3 = new fiat.P224Element.ptr(arrayType$2.zero()).Mul(p224B, t2); - y3.Sub(y3, z3); - x3 = new fiat.P224Element.ptr(arrayType$2.zero()).Add(y3, y3); - y3.Add(x3, y3); - x3.Sub(t1, y3); - y3.Add(t1, y3); - y3.Mul(x3, y3); - x3.Mul(x3, t3); - t3.Add(t2, t2); - t2.Add(t2, t3); - z3.Mul(p224B, z3); - z3.Sub(z3, t2); - z3.Sub(z3, t0); - t3.Add(z3, z3); - z3.Add(z3, t3); - t3.Add(t0, t0); - t0.Add(t3, t0); - t0.Sub(t0, t2); - t0.Mul(t0, z3); - y3.Add(y3, t0); - t0.Mul(p.y, p.z); - t0.Add(t0, t0); - z3.Mul(t0, z3); - x3.Sub(x3, z3); - z3.Mul(t0, t1); - z3.Add(z3, z3); - z3.Add(z3, z3); - q.x.Set(x3); - q.y.Set(y3); - q.z.Set(z3); - return q; - }; - P224Point.prototype.Double = function(p) { return this.$val.Double(p); }; - P224Point.ptr.prototype.Select = function(p1, p2, cond) { - var cond, p1, p2, q; - q = this; - q.x.Select(p1.x, p2.x, cond); - q.y.Select(p1.y, p2.y, cond); - q.z.Select(p1.z, p2.z, cond); - return q; - }; - P224Point.prototype.Select = function(p1, p2, cond) { return this.$val.Select(p1, p2, cond); }; - P224Point.ptr.prototype.ScalarMult = function(q, scalar) { - var _i, _ref, byte$1, cond, cond$1, i, i$1, i$2, p, q, scalar, t, table, x; - p = this; - table = $toNativeArray($kindPtr, [NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point(), NewP224Point()]); - i = 1; - while (true) { - if (!(i < 16)) { break; } - ((i < 0 || i >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i]).Add((x = i - 1 >> 0, ((x < 0 || x >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[x])), q); - i = i + (1) >> 0; - } - t = NewP224Point(); - p.Set(NewP224Point()); - _ref = scalar; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - byte$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - p.Double(p); - p.Double(p); - p.Double(p); - p.Double(p); - i$1 = 0; - while (true) { - if (!(i$1 < 16)) { break; } - cond = subtle.ConstantTimeByteEq(byte$1 >>> 4 << 24 >>> 24, i$1); - t.Select(((i$1 < 0 || i$1 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$1]), t, cond); - i$1 = i$1 + (1) << 24 >>> 24; - } - p.Add(p, t); - p.Double(p); - p.Double(p); - p.Double(p); - p.Double(p); - i$2 = 0; - while (true) { - if (!(i$2 < 16)) { break; } - cond$1 = subtle.ConstantTimeByteEq((byte$1 & 15) >>> 0, i$2); - t.Select(((i$2 < 0 || i$2 >= table.length) ? ($throwRuntimeError("index out of range"), undefined) : table[i$2]), t, cond$1); - i$2 = i$2 + (1) << 24 >>> 24; - } - p.Add(p, t); - _i++; - } - return p; - }; - P224Point.prototype.ScalarMult = function(q, scalar) { return this.$val.ScalarMult(q, scalar); }; - ptrType$1.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType$1, $error], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/elliptic/internal/nistec", typ: $funcType([ptrType$6], [sliceType], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$1, ptrType$1, $Int], [ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, sliceType], [ptrType$1], false)}]; - ptrType$3.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$3], [ptrType$3], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType$3, $error], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/elliptic/internal/nistec", typ: $funcType([ptrType$6], [sliceType], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$3, ptrType$3], [ptrType$3], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$3], [ptrType$3], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$3, ptrType$3, $Int], [ptrType$3], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$3, sliceType], [ptrType$3], false)}]; - ptrType$5.methods = [{prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$5], [ptrType$5], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType$5, $error], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/elliptic/internal/nistec", typ: $funcType([ptrType$6], [sliceType], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$5, ptrType$5], [ptrType$5], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$5], [ptrType$5], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$5, ptrType$5, $Int], [ptrType$5], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$5, sliceType], [ptrType$5], false)}]; - P521Point.init("crypto/elliptic/internal/nistec", [{prop: "x", name: "x", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "y", name: "y", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "z", name: "z", embedded: false, exported: false, typ: ptrType, tag: ""}]); - P384Point.init("crypto/elliptic/internal/nistec", [{prop: "x", name: "x", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "y", name: "y", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "z", name: "z", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - P224Point.init("crypto/elliptic/internal/nistec", [{prop: "x", name: "x", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "y", name: "y", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "z", name: "z", embedded: false, exported: false, typ: ptrType$4, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fiat.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = new fiat.P521Element.ptr(arrayType.zero()).SetBytes(new sliceType([0, 81, 149, 62, 185, 97, 142, 28, 154, 31, 146, 154, 33, 160, 182, 133, 64, 238, 162, 218, 114, 91, 153, 179, 21, 243, 184, 180, 137, 145, 142, 241, 9, 225, 86, 25, 57, 81, 236, 126, 147, 123, 22, 82, 192, 189, 59, 177, 191, 7, 53, 115, 223, 136, 61, 44, 52, 241, 239, 69, 31, 212, 107, 80, 63, 0])); - p521B = _tuple[0]; - _tuple$1 = NewP521Point().SetBytes(new sliceType([4, 0, 198, 133, 142, 6, 183, 4, 4, 233, 205, 158, 62, 203, 102, 35, 149, 180, 66, 156, 100, 129, 57, 5, 63, 181, 33, 248, 40, 175, 96, 107, 77, 61, 186, 161, 75, 94, 119, 239, 231, 89, 40, 254, 29, 193, 39, 162, 255, 168, 222, 51, 72, 179, 193, 133, 106, 66, 155, 249, 126, 126, 49, 194, 229, 189, 102, 1, 24, 57, 41, 106, 120, 154, 59, 192, 4, 92, 138, 95, 180, 44, 125, 27, 217, 152, 245, 68, 73, 87, 155, 68, 104, 23, 175, 189, 23, 39, 62, 102, 44, 151, 238, 114, 153, 94, 244, 38, 64, 197, 80, 185, 1, 63, 173, 7, 97, 53, 60, 112, 134, 162, 114, 194, 64, 136, 190, 148, 118, 159, 209, 102, 80])); - p521G = _tuple$1[0]; - _tuple$2 = new fiat.P384Element.ptr(arrayType$1.zero()).SetBytes(new sliceType([179, 49, 47, 167, 226, 62, 231, 228, 152, 142, 5, 107, 227, 248, 45, 25, 24, 29, 156, 110, 254, 129, 65, 18, 3, 20, 8, 143, 80, 19, 135, 90, 198, 86, 57, 141, 138, 46, 209, 157, 42, 133, 200, 237, 211, 236, 42, 239])); - p384B = _tuple$2[0]; - _tuple$3 = NewP384Point().SetBytes(new sliceType([4, 170, 135, 202, 34, 190, 139, 5, 55, 142, 177, 199, 30, 243, 32, 173, 116, 110, 29, 59, 98, 139, 167, 155, 152, 89, 247, 65, 224, 130, 84, 42, 56, 85, 2, 242, 93, 191, 85, 41, 108, 58, 84, 94, 56, 114, 118, 10, 183, 54, 23, 222, 74, 150, 38, 44, 111, 93, 158, 152, 191, 146, 146, 220, 41, 248, 244, 29, 189, 40, 154, 20, 124, 233, 218, 49, 19, 181, 240, 184, 192, 10, 96, 177, 206, 29, 126, 129, 157, 122, 67, 29, 124, 144, 234, 14, 95])); - p384G = _tuple$3[0]; - _tuple$4 = new fiat.P224Element.ptr(arrayType$2.zero()).SetBytes(new sliceType([180, 5, 10, 133, 12, 4, 179, 171, 245, 65, 50, 86, 80, 68, 176, 183, 215, 191, 216, 186, 39, 11, 57, 67, 35, 85, 255, 180])); - p224B = _tuple$4[0]; - _tuple$5 = NewP224Point().SetBytes(new sliceType([4, 183, 14, 12, 189, 107, 180, 191, 127, 50, 19, 144, 185, 74, 3, 193, 211, 86, 194, 17, 34, 52, 50, 128, 214, 17, 92, 29, 33, 189, 55, 99, 136, 181, 247, 35, 251, 76, 34, 223, 230, 205, 67, 117, 160, 90, 7, 71, 100, 68, 213, 129, 153, 133, 0, 126, 52])); - p224G = _tuple$5[0]; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/elliptic"] = (function() { - var $pkg = {}, $init, nistec, rand, io, big, sync, p521Curve, p384Curve, p256Curve, p224Curve, Curve, CurveParams, ptrType, ptrType$1, sliceType, ptrType$2, ptrType$3, arrayType, arrayType$1, arrayType$2, arrayType$3, sliceType$1, arrayType$4, arrayType$5, ptrType$4, sliceType$2, p521, p384, p256, p256Params, p256RInverse, p256One, p256One$24ptr, p256Precomputed, p256Zero31, p224, mask, initonce, initP521, p521PointFromAffine, p521PointToAffine, p521RandomPoint, bigFromDecimal, bigFromHex, initP384, p384PointFromAffine, p384PointToAffine, p384RandomPoint, initP256Arch, initP256, p256GetScalar, nonZeroToAllOnes, p256ReduceCarry, p256Sum, p256Diff, p256ReduceDegree, p256Square, p256Mul, p256Assign, p256Invert, p256Scalar3, p256Scalar4, p256Scalar8, p256PointDouble, p256PointAddMixed, p256PointAdd, p256CopyConditional, p256SelectAffinePoint, p256SelectJacobianPoint, p256GetBit, p256ScalarBaseMult, p256PointToAffine, p256ToAffine, p256ScalarMult, p256FromBig, p256ToBig, initP224, p224PointFromAffine, p224PointToAffine, p224RandomPoint, matchesSpecificCurve, zForAffine, GenerateKey, Marshal, Unmarshal, initAll, P224, P256, P384, P521; - nistec = $packages["crypto/elliptic/internal/nistec"]; - rand = $packages["crypto/rand"]; - io = $packages["io"]; - big = $packages["math/big"]; - sync = $packages["sync"]; - p521Curve = $pkg.p521Curve = $newType(0, $kindStruct, "elliptic.p521Curve", true, "crypto/elliptic", false, function(params_) { - this.$val = this; - if (arguments.length === 0) { - this.params = ptrType.nil; - return; - } - this.params = params_; - }); - p384Curve = $pkg.p384Curve = $newType(0, $kindStruct, "elliptic.p384Curve", true, "crypto/elliptic", false, function(params_) { - this.$val = this; - if (arguments.length === 0) { - this.params = ptrType.nil; - return; - } - this.params = params_; - }); - p256Curve = $pkg.p256Curve = $newType(0, $kindStruct, "elliptic.p256Curve", true, "crypto/elliptic", false, function(CurveParams_) { - this.$val = this; - if (arguments.length === 0) { - this.CurveParams = ptrType.nil; - return; - } - this.CurveParams = CurveParams_; - }); - p224Curve = $pkg.p224Curve = $newType(0, $kindStruct, "elliptic.p224Curve", true, "crypto/elliptic", false, function(params_) { - this.$val = this; - if (arguments.length === 0) { - this.params = ptrType.nil; - return; - } - this.params = params_; - }); - Curve = $pkg.Curve = $newType(8, $kindInterface, "elliptic.Curve", true, "crypto/elliptic", true, null); - CurveParams = $pkg.CurveParams = $newType(0, $kindStruct, "elliptic.CurveParams", true, "crypto/elliptic", true, function(P_, N_, B_, Gx_, Gy_, BitSize_, Name_) { - this.$val = this; - if (arguments.length === 0) { - this.P = ptrType$1.nil; - this.N = ptrType$1.nil; - this.B = ptrType$1.nil; - this.Gx = ptrType$1.nil; - this.Gy = ptrType$1.nil; - this.BitSize = 0; - this.Name = ""; - return; - } - this.P = P_; - this.N = N_; - this.B = B_; - this.Gx = Gx_; - this.Gy = Gy_; - this.BitSize = BitSize_; - this.Name = Name_; - }); - ptrType = $ptrType(CurveParams); - ptrType$1 = $ptrType(big.Int); - sliceType = $sliceType($Uint8); - ptrType$2 = $ptrType(nistec.P521Point); - ptrType$3 = $ptrType(nistec.P384Point); - arrayType = $arrayType($Uint8, 32); - arrayType$1 = $arrayType($Uint32, 9); - arrayType$2 = $arrayType($Uint32, 18); - arrayType$3 = $arrayType($Uint64, 17); - sliceType$1 = $sliceType($Uint32); - arrayType$4 = $arrayType(arrayType$1, 3); - arrayType$5 = $arrayType(arrayType$4, 16); - ptrType$4 = $ptrType(nistec.P224Point); - sliceType$2 = $sliceType(Curve); - initP521 = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = bigFromDecimal("6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = bigFromDecimal("6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = bigFromHex("0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = bigFromHex("00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = bigFromHex("011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650"); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - p521.params = new CurveParams.ptr(_r, _r$1, _r$2, _r$3, _r$4, 521, "P-521"); - $s = -1; return; - /* */ } return; } var $f = {$blk: initP521, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, $s};return $f; - }; - p521Curve.ptr.prototype.Params = function() { - var curve; - curve = this; - return curve.params; - }; - p521Curve.prototype.Params = function() { return this.$val.Params(); }; - p521Curve.ptr.prototype.IsOnCurve = function(x, y) { - var {_r, _tuple, curve, ok, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - if ((x.Sign() === 0) && (y.Sign() === 0)) { - $s = -1; return false; - } - _r = p521PointFromAffine(x, y); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: p521Curve.ptr.prototype.IsOnCurve, $c: true, $r, _r, _tuple, curve, ok, x, y, $s};return $f; - }; - p521Curve.prototype.IsOnCurve = function(x, y) { return this.$val.IsOnCurve(x, y); }; - p521PointFromAffine = function(x, y) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, ok, p, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = ptrType$2.nil; - ok = false; - if ((x.Sign() === 0) && (y.Sign() === 0)) { - _tmp = nistec.NewP521Point(); - _tmp$1 = true; - p = _tmp; - ok = _tmp$1; - $s = -1; return [p, ok]; - } - if (x.Sign() < 0 || y.Sign() < 0) { - _tmp$2 = ptrType$2.nil; - _tmp$3 = false; - p = _tmp$2; - ok = _tmp$3; - $s = -1; return [p, ok]; - } - if (x.BitLen() > 521 || y.BitLen() > 521) { - _tmp$4 = ptrType$2.nil; - _tmp$5 = false; - p = _tmp$4; - ok = _tmp$5; - $s = -1; return [p, ok]; - } - _r = P521(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = Marshal(_r, x, y); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = nistec.NewP521Point().SetBytes(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - p = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = ptrType$2.nil; - _tmp$7 = false; - p = _tmp$6; - ok = _tmp$7; - $s = -1; return [p, ok]; - } - _tmp$8 = p; - _tmp$9 = true; - p = _tmp$8; - ok = _tmp$9; - $s = -1; return [p, ok]; - /* */ } return; } var $f = {$blk: p521PointFromAffine, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, ok, p, x, y, $s};return $f; - }; - p521PointToAffine = function(p) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, out, p, x, y, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - out = p.Bytes(); - if ((out.$length === 1) && ((0 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 0]) === 0)) { - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - } - _r = P521(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = Unmarshal(_r, out); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x = _tuple[0]; - y = _tuple[1]; - if (x === ptrType$1.nil) { - $panic(new $String("crypto/elliptic: internal error: Unmarshal rejected a valid point encoding")); - } - _tmp$2 = x; - _tmp$3 = y; - x = _tmp$2; - y = _tmp$3; - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: p521PointToAffine, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, out, p, x, y, $s};return $f; - }; - p521RandomPoint = function() { - var {_r, _r$1, _tmp, _tmp$1, _tuple, err, x, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - _r = P521(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = GenerateKey(_r, rand.Reader); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x = _tuple[1]; - y = _tuple[2]; - err = _tuple[3]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(new $String("crypto/elliptic: failed to generate random point")); - } - _tmp = x; - _tmp$1 = y; - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: p521RandomPoint, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tuple, err, x, y, $s};return $f; - }; - p521Curve.ptr.prototype.Add = function(x1, y1, x2, y2) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, ok, p1, p2, x1, x2, y1, y2, $s, $r, $c} = $restore(this, {x1, y1, x2, y2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p521PointFromAffine(x1, y1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p521RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p521PointFromAffine(x2, y2); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - p2 = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - _r$3 = p521RandomPoint(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - _r$4 = p521PointToAffine(p1.Add(p1, p2)); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 12; case 12: return $24r$2; - /* */ } return; } var $f = {$blk: p521Curve.ptr.prototype.Add, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, ok, p1, p2, x1, x2, y1, y2, $s};return $f; - }; - p521Curve.prototype.Add = function(x1, y1, x2, y2) { return this.$val.Add(x1, y1, x2, y2); }; - p521Curve.ptr.prototype.Double = function(x1, y1) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, ok, p, x1, y1, $s, $r, $c} = $restore(this, {x1, y1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p521PointFromAffine(x1, y1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p521RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p521PointToAffine(p.Double(p)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: p521Curve.ptr.prototype.Double, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, ok, p, x1, y1, $s};return $f; - }; - p521Curve.prototype.Double = function(x1, y1) { return this.$val.Double(x1, y1); }; - p521Curve.ptr.prototype.ScalarMult = function(Bx, By, scalar) { - var {$24r, $24r$1, Bx, By, _r, _r$1, _r$2, _tuple, ok, p, scalar, $s, $r, $c} = $restore(this, {Bx, By, scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p521PointFromAffine(Bx, By); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p521RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p521PointToAffine(p.ScalarMult(p, scalar)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: p521Curve.ptr.prototype.ScalarMult, $c: true, $r, $24r, $24r$1, Bx, By, _r, _r$1, _r$2, _tuple, ok, p, scalar, $s};return $f; - }; - p521Curve.prototype.ScalarMult = function(Bx, By, scalar) { return this.$val.ScalarMult(Bx, By, scalar); }; - p521Curve.ptr.prototype.ScalarBaseMult = function(scalar) { - var {$24r, _r, p, scalar, $s, $r, $c} = $restore(this, {scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = nistec.NewP521Generator(); - _r = p521PointToAffine(p.ScalarMult(p, scalar)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: p521Curve.ptr.prototype.ScalarBaseMult, $c: true, $r, $24r, _r, p, scalar, $s};return $f; - }; - p521Curve.prototype.ScalarBaseMult = function(scalar) { return this.$val.ScalarBaseMult(scalar); }; - bigFromDecimal = function(s) { - var {_r, _tuple, b, ok, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = new big.Int.ptr(false, big.nat.nil).SetString(s, 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $panic(new $String("invalid encoding")); - } - $s = -1; return b; - /* */ } return; } var $f = {$blk: bigFromDecimal, $c: true, $r, _r, _tuple, b, ok, s, $s};return $f; - }; - bigFromHex = function(s) { - var {_r, _tuple, b, ok, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = new big.Int.ptr(false, big.nat.nil).SetString(s, 16); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - b = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $panic(new $String("invalid encoding")); - } - $s = -1; return b; - /* */ } return; } var $f = {$blk: bigFromHex, $c: true, $r, _r, _tuple, b, ok, s, $s};return $f; - }; - initP384 = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = bigFromDecimal("39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = bigFromDecimal("39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = bigFromHex("b3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = bigFromHex("aa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = bigFromHex("3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - p384.params = new CurveParams.ptr(_r, _r$1, _r$2, _r$3, _r$4, 384, "P-384"); - $s = -1; return; - /* */ } return; } var $f = {$blk: initP384, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, $s};return $f; - }; - p384Curve.ptr.prototype.Params = function() { - var curve; - curve = this; - return curve.params; - }; - p384Curve.prototype.Params = function() { return this.$val.Params(); }; - p384Curve.ptr.prototype.IsOnCurve = function(x, y) { - var {_r, _tuple, curve, ok, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - if ((x.Sign() === 0) && (y.Sign() === 0)) { - $s = -1; return false; - } - _r = p384PointFromAffine(x, y); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: p384Curve.ptr.prototype.IsOnCurve, $c: true, $r, _r, _tuple, curve, ok, x, y, $s};return $f; - }; - p384Curve.prototype.IsOnCurve = function(x, y) { return this.$val.IsOnCurve(x, y); }; - p384PointFromAffine = function(x, y) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, ok, p, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = ptrType$3.nil; - ok = false; - if ((x.Sign() === 0) && (y.Sign() === 0)) { - _tmp = nistec.NewP384Point(); - _tmp$1 = true; - p = _tmp; - ok = _tmp$1; - $s = -1; return [p, ok]; - } - if (x.Sign() < 0 || y.Sign() < 0) { - _tmp$2 = ptrType$3.nil; - _tmp$3 = false; - p = _tmp$2; - ok = _tmp$3; - $s = -1; return [p, ok]; - } - if (x.BitLen() > 384 || y.BitLen() > 384) { - _tmp$4 = ptrType$3.nil; - _tmp$5 = false; - p = _tmp$4; - ok = _tmp$5; - $s = -1; return [p, ok]; - } - _r = P384(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = Marshal(_r, x, y); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = nistec.NewP384Point().SetBytes(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - p = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = ptrType$3.nil; - _tmp$7 = false; - p = _tmp$6; - ok = _tmp$7; - $s = -1; return [p, ok]; - } - _tmp$8 = p; - _tmp$9 = true; - p = _tmp$8; - ok = _tmp$9; - $s = -1; return [p, ok]; - /* */ } return; } var $f = {$blk: p384PointFromAffine, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, ok, p, x, y, $s};return $f; - }; - p384PointToAffine = function(p) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, out, p, x, y, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - out = p.Bytes(); - if ((out.$length === 1) && ((0 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 0]) === 0)) { - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - } - _r = P384(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = Unmarshal(_r, out); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x = _tuple[0]; - y = _tuple[1]; - if (x === ptrType$1.nil) { - $panic(new $String("crypto/elliptic: internal error: Unmarshal rejected a valid point encoding")); - } - _tmp$2 = x; - _tmp$3 = y; - x = _tmp$2; - y = _tmp$3; - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: p384PointToAffine, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, out, p, x, y, $s};return $f; - }; - p384RandomPoint = function() { - var {_r, _r$1, _tmp, _tmp$1, _tuple, err, x, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - _r = P384(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = GenerateKey(_r, rand.Reader); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x = _tuple[1]; - y = _tuple[2]; - err = _tuple[3]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(new $String("crypto/elliptic: failed to generate random point")); - } - _tmp = x; - _tmp$1 = y; - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: p384RandomPoint, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tuple, err, x, y, $s};return $f; - }; - p384Curve.ptr.prototype.Add = function(x1, y1, x2, y2) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, ok, p1, p2, x1, x2, y1, y2, $s, $r, $c} = $restore(this, {x1, y1, x2, y2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p384PointFromAffine(x1, y1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p384RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p384PointFromAffine(x2, y2); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - p2 = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - _r$3 = p384RandomPoint(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - _r$4 = p384PointToAffine(p1.Add(p1, p2)); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 12; case 12: return $24r$2; - /* */ } return; } var $f = {$blk: p384Curve.ptr.prototype.Add, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, ok, p1, p2, x1, x2, y1, y2, $s};return $f; - }; - p384Curve.prototype.Add = function(x1, y1, x2, y2) { return this.$val.Add(x1, y1, x2, y2); }; - p384Curve.ptr.prototype.Double = function(x1, y1) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, ok, p, x1, y1, $s, $r, $c} = $restore(this, {x1, y1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p384PointFromAffine(x1, y1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p384RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p384PointToAffine(p.Double(p)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: p384Curve.ptr.prototype.Double, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, ok, p, x1, y1, $s};return $f; - }; - p384Curve.prototype.Double = function(x1, y1) { return this.$val.Double(x1, y1); }; - p384Curve.ptr.prototype.ScalarMult = function(Bx, By, scalar) { - var {$24r, $24r$1, Bx, By, _r, _r$1, _r$2, _tuple, ok, p, scalar, $s, $r, $c} = $restore(this, {Bx, By, scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p384PointFromAffine(Bx, By); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p384RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p384PointToAffine(p.ScalarMult(p, scalar)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: p384Curve.ptr.prototype.ScalarMult, $c: true, $r, $24r, $24r$1, Bx, By, _r, _r$1, _r$2, _tuple, ok, p, scalar, $s};return $f; - }; - p384Curve.prototype.ScalarMult = function(Bx, By, scalar) { return this.$val.ScalarMult(Bx, By, scalar); }; - p384Curve.ptr.prototype.ScalarBaseMult = function(scalar) { - var {$24r, _r, p, scalar, $s, $r, $c} = $restore(this, {scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = nistec.NewP384Generator(); - _r = p384PointToAffine(p.ScalarMult(p, scalar)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: p384Curve.ptr.prototype.ScalarBaseMult, $c: true, $r, $24r, _r, p, scalar, $s};return $f; - }; - p384Curve.prototype.ScalarBaseMult = function(scalar) { return this.$val.ScalarBaseMult(scalar); }; - initP256Arch = function() { - p256Curve.copy(p256, new p256Curve.ptr(p256Params)); - }; - initP256 = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p256Params = new CurveParams.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, 0, "P-256"); - _r = new big.Int.ptr(false, big.nat.nil).SetString("115792089210356248762697446949407573530086143415290314195533631308867097853951", 10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p256Params.P = _tuple[0]; - _r$1 = new big.Int.ptr(false, big.nat.nil).SetString("115792089210356248762697446949407573529996955224135760342422259061068512044369", 10); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - p256Params.N = _tuple$1[0]; - _r$2 = new big.Int.ptr(false, big.nat.nil).SetString("5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", 16); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - p256Params.B = _tuple$2[0]; - _r$3 = new big.Int.ptr(false, big.nat.nil).SetString("6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", 16); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$3 = _r$3; - p256Params.Gx = _tuple$3[0]; - _r$4 = new big.Int.ptr(false, big.nat.nil).SetString("4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", 16); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$4 = _r$4; - p256Params.Gy = _tuple$4[0]; - p256Params.BitSize = 256; - _r$5 = new big.Int.ptr(false, big.nat.nil).SetString("7fffffff00000001fffffffe8000000100000000ffffffff0000000180000000", 16); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$5 = _r$5; - p256RInverse = _tuple$5[0]; - initP256Arch(); - $s = -1; return; - /* */ } return; } var $f = {$blk: initP256, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, $s};return $f; - }; - p256Curve.ptr.prototype.Params = function() { - var curve; - curve = this; - return curve.CurveParams; - }; - p256Curve.prototype.Params = function() { return this.$val.Params(); }; - p256GetScalar = function(out, in$1) { - var {_i, _r, _ref, i, in$1, n, out, scalarBytes, v, x, $s, $r, $c} = $restore(this, {out, in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new big.Int.ptr(false, big.nat.nil).SetBytes(in$1); - scalarBytes = sliceType.nil; - /* */ if (n.Cmp(p256Params.N) >= 0 || in$1.$length > 32) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n.Cmp(p256Params.N) >= 0 || in$1.$length > 32) { */ case 1: - _r = n.Mod(n, p256Params.N); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - scalarBytes = n.Bytes(); - $s = 3; continue; - /* } else { */ case 2: - scalarBytes = in$1; - /* } */ case 3: - _ref = scalarBytes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - (x = scalarBytes.$length - ((1 + i >> 0)) >> 0, out.nilCheck, ((x < 0 || x >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[x] = v)); - _i++; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: p256GetScalar, $c: true, $r, _i, _r, _ref, i, in$1, n, out, scalarBytes, v, x, $s};return $f; - }; - p256Curve.ptr.prototype.ScalarBaseMult = function(scalar) { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tuple, scalar, scalarReversed, x, x1, y, y1, z1, $s, $r, $c} = $restore(this, {scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - scalarReversed = [scalarReversed]; - x1 = [x1]; - y1 = [y1]; - z1 = [z1]; - x = ptrType$1.nil; - y = ptrType$1.nil; - scalarReversed[0] = arrayType.zero(); - $r = p256GetScalar(scalarReversed[0], scalar); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - _tmp$2 = arrayType$1.zero(); - x1[0] = $clone(_tmp, arrayType$1); - y1[0] = $clone(_tmp$1, arrayType$1); - z1[0] = $clone(_tmp$2, arrayType$1); - p256ScalarBaseMult(x1[0], y1[0], z1[0], scalarReversed[0]); - _r = p256ToAffine(x1[0], y1[0], z1[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - x = _tuple[0]; - y = _tuple[1]; - $24r = [x, y]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: p256Curve.ptr.prototype.ScalarBaseMult, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tuple, scalar, scalarReversed, x, x1, y, y1, z1, $s};return $f; - }; - p256Curve.prototype.ScalarBaseMult = function(scalar) { return this.$val.ScalarBaseMult(scalar); }; - p256Curve.ptr.prototype.ScalarMult = function(bigX, bigY, scalar) { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, bigX, bigY, px, py, scalar, scalarReversed, x, x1, y, y1, z1, $s, $r, $c} = $restore(this, {bigX, bigY, scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - px = [px]; - py = [py]; - scalarReversed = [scalarReversed]; - x1 = [x1]; - y1 = [y1]; - z1 = [z1]; - x = ptrType$1.nil; - y = ptrType$1.nil; - scalarReversed[0] = arrayType.zero(); - $r = p256GetScalar(scalarReversed[0], scalar); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - _tmp$2 = arrayType$1.zero(); - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - px[0] = $clone(_tmp, arrayType$1); - py[0] = $clone(_tmp$1, arrayType$1); - x1[0] = $clone(_tmp$2, arrayType$1); - y1[0] = $clone(_tmp$3, arrayType$1); - z1[0] = $clone(_tmp$4, arrayType$1); - $r = p256FromBig(px[0], bigX); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = p256FromBig(py[0], bigY); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p256ScalarMult(x1[0], y1[0], z1[0], px[0], py[0], scalarReversed[0]); - _r = p256ToAffine(x1[0], y1[0], z1[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - x = _tuple[0]; - y = _tuple[1]; - $24r = [x, y]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: p256Curve.ptr.prototype.ScalarMult, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, bigX, bigY, px, py, scalar, scalarReversed, x, x1, y, y1, z1, $s};return $f; - }; - p256Curve.prototype.ScalarMult = function(bigX, bigY, scalar) { return this.$val.ScalarMult(bigX, bigY, scalar); }; - nonZeroToAllOnes = function(x) { - var x; - return ((((x - 1 >>> 0)) >>> 31 >>> 0)) - 1 >>> 0; - }; - p256ReduceCarry = function(inout, carry) { - var carry, carry_mask, inout; - carry_mask = nonZeroToAllOnes(carry); - inout[0] = (inout[0] + ((carry << 1 >>> 0)) >>> 0); - inout[3] = (inout[3] + (((268435456 & carry_mask) >>> 0)) >>> 0); - inout[3] = (inout[3] - ((carry << 11 >>> 0)) >>> 0); - inout[4] = (inout[4] + (((536870911 & carry_mask) >>> 0)) >>> 0); - inout[5] = (inout[5] + (((268435455 & carry_mask) >>> 0)) >>> 0); - inout[6] = (inout[6] + (((536870911 & carry_mask) >>> 0)) >>> 0); - inout[6] = (inout[6] - ((carry << 22 >>> 0)) >>> 0); - inout[7] = (inout[7] - (((1 & carry_mask) >>> 0)) >>> 0); - inout[7] = (inout[7] + ((carry << 25 >>> 0)) >>> 0); - }; - p256Sum = function(out, in$1, in2) { - var carry, i, in$1, in2, out, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - carry = 0; - i = 0; - while (true) { - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((x = in$1, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) + (x$1 = in2, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) >>> 0)); - (x$3 = out, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i] = ((x$2 = out, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) + (carry) >>> 0))); - carry = (x$4 = out, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i])) >>> 29 >>> 0; - (x$6 = out, ((i < 0 || i >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i] = (((x$5 = out, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i])) & (536870911)) >>> 0))); - i = i + (1) >> 0; - if (i === 9) { - break; - } - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((x$7 = in$1, ((i < 0 || i >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[i])) + (x$8 = in2, ((i < 0 || i >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[i])) >>> 0)); - (x$10 = out, ((i < 0 || i >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[i] = ((x$9 = out, ((i < 0 || i >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i])) + (carry) >>> 0))); - carry = (x$11 = out, ((i < 0 || i >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i])) >>> 28 >>> 0; - (x$13 = out, ((i < 0 || i >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i] = (((x$12 = out, ((i < 0 || i >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[i])) & (268435455)) >>> 0))); - i = i + (1) >> 0; - } - p256ReduceCarry(out, carry); - }; - p256Diff = function(out, in$1, in2) { - var carry, i, in$1, in2, out, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - carry = 0; - i = 0; - while (true) { - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((x = in$1, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) - (x$1 = in2, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) >>> 0)); - (x$3 = out, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i] = ((x$2 = out, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) + (((i < 0 || i >= p256Zero31.length) ? ($throwRuntimeError("index out of range"), undefined) : p256Zero31[i])) >>> 0))); - (x$5 = out, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i] = ((x$4 = out, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i])) + (carry) >>> 0))); - carry = (x$6 = out, ((i < 0 || i >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i])) >>> 29 >>> 0; - (x$8 = out, ((i < 0 || i >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[i] = (((x$7 = out, ((i < 0 || i >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[i])) & (536870911)) >>> 0))); - i = i + (1) >> 0; - if (i === 9) { - break; - } - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = ((x$9 = in$1, ((i < 0 || i >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i])) - (x$10 = in2, ((i < 0 || i >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[i])) >>> 0)); - (x$12 = out, ((i < 0 || i >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[i] = ((x$11 = out, ((i < 0 || i >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i])) + (((i < 0 || i >= p256Zero31.length) ? ($throwRuntimeError("index out of range"), undefined) : p256Zero31[i])) >>> 0))); - (x$14 = out, ((i < 0 || i >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[i] = ((x$13 = out, ((i < 0 || i >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i])) + (carry) >>> 0))); - carry = (x$15 = out, ((i < 0 || i >= x$15.length) ? ($throwRuntimeError("index out of range"), undefined) : x$15[i])) >>> 28 >>> 0; - (x$17 = out, ((i < 0 || i >= x$17.length) ? ($throwRuntimeError("index out of range"), undefined) : x$17[i] = (((x$16 = out, ((i < 0 || i >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[i])) & (268435455)) >>> 0))); - i = i + (1) >> 0; - } - p256ReduceCarry(out, carry); - }; - p256ReduceDegree = function(out, tmp) { - var _index, _index$1, _index$10, _index$11, _index$12, _index$13, _index$14, _index$15, _index$16, _index$17, _index$18, _index$19, _index$2, _index$20, _index$21, _index$22, _index$23, _index$24, _index$3, _index$4, _index$5, _index$6, _index$7, _index$8, _index$9, _tmp, _tmp$1, _tmp$2, carry, i, i$1, i$2, out, tmp, tmp2, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xMask; - tmp2 = arrayType$2.zero(); - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - carry = _tmp; - x = _tmp$1; - xMask = _tmp$2; - tmp2[0] = ((((tmp[0].$low >>> 0)) & 536870911) >>> 0); - tmp2[1] = (((tmp[0].$low >>> 0)) >>> 29 >>> 0); - tmp2[1] = ((tmp2[1] | ((((((($shiftRightUint64(tmp[0], 32).$low >>> 0)) << 3 >>> 0)) & 268435455) >>> 0))) >>> 0); - tmp2[1] = (tmp2[1] + (((((tmp[1].$low >>> 0)) & 268435455) >>> 0)) >>> 0); - carry = tmp2[1] >>> 28 >>> 0; - tmp2[1] = ((tmp2[1] & (268435455)) >>> 0); - i = 2; - while (true) { - if (!(i < 17)) { break; } - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((($shiftRightUint64((x$1 = i - 2 >> 0, ((x$1 < 0 || x$1 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$1])), 32).$low >>> 0))) >>> 25 >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + ((((((x$2 = i - 1 >> 0, ((x$2 < 0 || x$2 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$2])).$low >>> 0))) >>> 28 >>> 0)) >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + ((((((($shiftRightUint64((x$3 = i - 1 >> 0, ((x$3 < 0 || x$3 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$3])), 32).$low >>> 0)) << 4 >>> 0)) & 536870911) >>> 0)) >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i]).$low >>> 0)) & 536870911) >>> 0)) >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (carry) >>> 0)); - carry = ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) >>> 29 >>> 0; - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = ((((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) & (536870911)) >>> 0)); - i = i + (1) >> 0; - if (i === 17) { - break; - } - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = ((($shiftRightUint64((x$4 = i - 2 >> 0, ((x$4 < 0 || x$4 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$4])), 32).$low >>> 0)) >>> 25 >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((x$5 = i - 1 >> 0, ((x$5 < 0 || x$5 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$5])).$low >>> 0)) >>> 29 >>> 0)) >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((((($shiftRightUint64((x$6 = i - 1 >> 0, ((x$6 < 0 || x$6 >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[x$6])), 32).$low >>> 0))) << 3 >>> 0)) & 268435455) >>> 0)) >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (((((((i < 0 || i >= tmp.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp[i]).$low >>> 0)) & 268435455) >>> 0)) >>> 0)); - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = (((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) + (carry) >>> 0)); - carry = ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) >>> 28 >>> 0; - ((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i] = ((((i < 0 || i >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i]) & (268435455)) >>> 0)); - i = i + (1) >> 0; - } - tmp2[17] = ((($shiftRightUint64(tmp[15], 32).$low >>> 0)) >>> 25 >>> 0); - tmp2[17] = (tmp2[17] + ((((tmp[16].$low >>> 0)) >>> 29 >>> 0)) >>> 0); - tmp2[17] = (tmp2[17] + (((($shiftRightUint64(tmp[16], 32).$low >>> 0)) << 3 >>> 0)) >>> 0); - tmp2[17] = (tmp2[17] + (carry) >>> 0); - i$1 = 0; - while (true) { - _index = i$1 + 1 >> 0; - ((_index < 0 || _index >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index] = (((_index < 0 || _index >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index]) + ((((i$1 < 0 || i$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i$1]) >>> 29 >>> 0)) >>> 0)); - x = (((i$1 < 0 || i$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i$1]) & 536870911) >>> 0; - xMask = nonZeroToAllOnes(x); - ((i$1 < 0 || i$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[i$1] = 0); - _index$1 = i$1 + 3 >> 0; - ((_index$1 < 0 || _index$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$1] = (((_index$1 < 0 || _index$1 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$1]) + (((((x << 10 >>> 0)) & 268435455) >>> 0)) >>> 0)); - _index$2 = i$1 + 4 >> 0; - ((_index$2 < 0 || _index$2 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$2] = (((_index$2 < 0 || _index$2 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$2]) + (((x >>> 18 >>> 0))) >>> 0)); - _index$3 = i$1 + 6 >> 0; - ((_index$3 < 0 || _index$3 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$3] = (((_index$3 < 0 || _index$3 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$3]) + (((((x << 21 >>> 0)) & 536870911) >>> 0)) >>> 0)); - _index$4 = i$1 + 7 >> 0; - ((_index$4 < 0 || _index$4 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$4] = (((_index$4 < 0 || _index$4 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$4]) + ((x >>> 8 >>> 0)) >>> 0)); - _index$5 = i$1 + 7 >> 0; - ((_index$5 < 0 || _index$5 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$5] = (((_index$5 < 0 || _index$5 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$5]) + (((268435456 & xMask) >>> 0)) >>> 0)); - _index$6 = i$1 + 8 >> 0; - ((_index$6 < 0 || _index$6 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$6] = (((_index$6 < 0 || _index$6 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$6]) + (((((x - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); - _index$7 = i$1 + 7 >> 0; - ((_index$7 < 0 || _index$7 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$7] = (((_index$7 < 0 || _index$7 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$7]) - (((((x << 24 >>> 0)) & 268435455) >>> 0)) >>> 0)); - _index$8 = i$1 + 8 >> 0; - ((_index$8 < 0 || _index$8 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$8] = (((_index$8 < 0 || _index$8 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$8]) - ((x >>> 4 >>> 0)) >>> 0)); - _index$9 = i$1 + 8 >> 0; - ((_index$9 < 0 || _index$9 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$9] = (((_index$9 < 0 || _index$9 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$9]) + (((536870912 & xMask) >>> 0)) >>> 0)); - _index$10 = i$1 + 8 >> 0; - ((_index$10 < 0 || _index$10 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$10] = (((_index$10 < 0 || _index$10 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$10]) - (x) >>> 0)); - _index$11 = i$1 + 8 >> 0; - ((_index$11 < 0 || _index$11 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$11] = (((_index$11 < 0 || _index$11 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$11]) + (((((x << 28 >>> 0)) & 536870911) >>> 0)) >>> 0)); - _index$12 = i$1 + 9 >> 0; - ((_index$12 < 0 || _index$12 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$12] = (((_index$12 < 0 || _index$12 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$12]) + (((((((x >>> 1 >>> 0)) - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); - if ((i$1 + 1 >> 0) === 9) { - break; - } - _index$13 = i$1 + 2 >> 0; - ((_index$13 < 0 || _index$13 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$13] = (((_index$13 < 0 || _index$13 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$13]) + (((x$7 = i$1 + 1 >> 0, ((x$7 < 0 || x$7 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$7])) >>> 28 >>> 0)) >>> 0)); - x = ((x$8 = i$1 + 1 >> 0, ((x$8 < 0 || x$8 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$8])) & 268435455) >>> 0; - xMask = nonZeroToAllOnes(x); - (x$9 = i$1 + 1 >> 0, ((x$9 < 0 || x$9 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$9] = 0)); - _index$14 = i$1 + 4 >> 0; - ((_index$14 < 0 || _index$14 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$14] = (((_index$14 < 0 || _index$14 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$14]) + (((((x << 11 >>> 0)) & 536870911) >>> 0)) >>> 0)); - _index$15 = i$1 + 5 >> 0; - ((_index$15 < 0 || _index$15 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$15] = (((_index$15 < 0 || _index$15 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$15]) + (((x >>> 18 >>> 0))) >>> 0)); - _index$16 = i$1 + 7 >> 0; - ((_index$16 < 0 || _index$16 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$16] = (((_index$16 < 0 || _index$16 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$16]) + (((((x << 21 >>> 0)) & 268435455) >>> 0)) >>> 0)); - _index$17 = i$1 + 8 >> 0; - ((_index$17 < 0 || _index$17 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$17] = (((_index$17 < 0 || _index$17 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$17]) + ((x >>> 7 >>> 0)) >>> 0)); - _index$18 = i$1 + 8 >> 0; - ((_index$18 < 0 || _index$18 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$18] = (((_index$18 < 0 || _index$18 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$18]) + (((536870912 & xMask) >>> 0)) >>> 0)); - _index$19 = i$1 + 9 >> 0; - ((_index$19 < 0 || _index$19 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$19] = (((_index$19 < 0 || _index$19 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$19]) + (((((x - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); - _index$20 = i$1 + 8 >> 0; - ((_index$20 < 0 || _index$20 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$20] = (((_index$20 < 0 || _index$20 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$20]) - (((((x << 25 >>> 0)) & 536870911) >>> 0)) >>> 0)); - _index$21 = i$1 + 9 >> 0; - ((_index$21 < 0 || _index$21 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$21] = (((_index$21 < 0 || _index$21 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$21]) - ((x >>> 4 >>> 0)) >>> 0)); - _index$22 = i$1 + 9 >> 0; - ((_index$22 < 0 || _index$22 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$22] = (((_index$22 < 0 || _index$22 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$22]) + (((268435456 & xMask) >>> 0)) >>> 0)); - _index$23 = i$1 + 9 >> 0; - ((_index$23 < 0 || _index$23 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$23] = (((_index$23 < 0 || _index$23 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$23]) - (x) >>> 0)); - _index$24 = i$1 + 10 >> 0; - ((_index$24 < 0 || _index$24 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$24] = (((_index$24 < 0 || _index$24 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[_index$24]) + (((((x - 1 >>> 0)) & xMask) >>> 0)) >>> 0)); - i$1 = i$1 + (2) >> 0; - } - carry = 0; - i$2 = 0; - while (true) { - if (!(i$2 < 8)) { break; } - out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = (x$10 = i$2 + 9 >> 0, ((x$10 < 0 || x$10 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$10]))); - (x$12 = out, ((i$2 < 0 || i$2 >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[i$2] = ((x$11 = out, ((i$2 < 0 || i$2 >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i$2])) + (carry) >>> 0))); - (x$15 = out, ((i$2 < 0 || i$2 >= x$15.length) ? ($throwRuntimeError("index out of range"), undefined) : x$15[i$2] = ((x$13 = out, ((i$2 < 0 || i$2 >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i$2])) + ((((((x$14 = i$2 + 10 >> 0, ((x$14 < 0 || x$14 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$14])) << 28 >>> 0)) & 536870911) >>> 0)) >>> 0))); - carry = (x$16 = out, ((i$2 < 0 || i$2 >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[i$2])) >>> 29 >>> 0; - (x$18 = out, ((i$2 < 0 || i$2 >= x$18.length) ? ($throwRuntimeError("index out of range"), undefined) : x$18[i$2] = (((x$17 = out, ((i$2 < 0 || i$2 >= x$17.length) ? ($throwRuntimeError("index out of range"), undefined) : x$17[i$2])) & (536870911)) >>> 0))); - i$2 = i$2 + (1) >> 0; - out.nilCheck, ((i$2 < 0 || i$2 >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i$2] = ((x$19 = i$2 + 9 >> 0, ((x$19 < 0 || x$19 >= tmp2.length) ? ($throwRuntimeError("index out of range"), undefined) : tmp2[x$19])) >>> 1 >>> 0)); - (x$21 = out, ((i$2 < 0 || i$2 >= x$21.length) ? ($throwRuntimeError("index out of range"), undefined) : x$21[i$2] = ((x$20 = out, ((i$2 < 0 || i$2 >= x$20.length) ? ($throwRuntimeError("index out of range"), undefined) : x$20[i$2])) + (carry) >>> 0))); - carry = (x$22 = out, ((i$2 < 0 || i$2 >= x$22.length) ? ($throwRuntimeError("index out of range"), undefined) : x$22[i$2])) >>> 28 >>> 0; - (x$24 = out, ((i$2 < 0 || i$2 >= x$24.length) ? ($throwRuntimeError("index out of range"), undefined) : x$24[i$2] = (((x$23 = out, ((i$2 < 0 || i$2 >= x$23.length) ? ($throwRuntimeError("index out of range"), undefined) : x$23[i$2])) & (268435455)) >>> 0))); - i$2 = i$2 + (1) >> 0; - } - out.nilCheck, out[8] = tmp2[17]; - out[8] = (out[8] + (carry) >>> 0); - carry = out[8] >>> 29 >>> 0; - out[8] = ((out[8] & (536870911)) >>> 0); - p256ReduceCarry(out, carry); - }; - p256Square = function(out, in$1) { - var in$1, out, tmp, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$6, x$7, x$8, x$9; - tmp = arrayType$3.zero(); - tmp[0] = $mul64((new $Uint64(0, in$1[0])), (new $Uint64(0, in$1[0]))); - tmp[1] = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[1])), 1))); - tmp[2] = (x = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[2])), 1))), x$1 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[1])), 1))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - tmp[3] = (x$2 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[3])), 1))), x$3 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[2])), 1))), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - tmp[4] = (x$4 = (x$5 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[4])), 1))), x$6 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[3])), 2))), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)), x$7 = $mul64((new $Uint64(0, in$1[2])), (new $Uint64(0, in$1[2]))), new $Uint64(x$4.$high + x$7.$high, x$4.$low + x$7.$low)); - tmp[5] = (x$8 = (x$9 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[5])), 1))), x$10 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[4])), 1))), new $Uint64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)), x$11 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in$1[3])), 1))), new $Uint64(x$8.$high + x$11.$high, x$8.$low + x$11.$low)); - tmp[6] = (x$12 = (x$13 = (x$14 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[6])), 1))), x$15 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[5])), 2))), new $Uint64(x$14.$high + x$15.$high, x$14.$low + x$15.$low)), x$16 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in$1[4])), 1))), new $Uint64(x$13.$high + x$16.$high, x$13.$low + x$16.$low)), x$17 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in$1[3])), 1))), new $Uint64(x$12.$high + x$17.$high, x$12.$low + x$17.$low)); - tmp[7] = (x$18 = (x$19 = (x$20 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[7])), 1))), x$21 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[6])), 1))), new $Uint64(x$20.$high + x$21.$high, x$20.$low + x$21.$low)), x$22 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in$1[5])), 1))), new $Uint64(x$19.$high + x$22.$high, x$19.$low + x$22.$low)), x$23 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in$1[4])), 1))), new $Uint64(x$18.$high + x$23.$high, x$18.$low + x$23.$low)); - tmp[8] = (x$24 = (x$25 = (x$26 = (x$27 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$28 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[7])), 2))), new $Uint64(x$27.$high + x$28.$high, x$27.$low + x$28.$low)), x$29 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in$1[6])), 1))), new $Uint64(x$26.$high + x$29.$high, x$26.$low + x$29.$low)), x$30 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in$1[5])), 2))), new $Uint64(x$25.$high + x$30.$high, x$25.$low + x$30.$low)), x$31 = $mul64((new $Uint64(0, in$1[4])), (new $Uint64(0, in$1[4]))), new $Uint64(x$24.$high + x$31.$high, x$24.$low + x$31.$low)); - tmp[9] = (x$32 = (x$33 = (x$34 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$35 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in$1[7])), 1))), new $Uint64(x$34.$high + x$35.$high, x$34.$low + x$35.$low)), x$36 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in$1[6])), 1))), new $Uint64(x$33.$high + x$36.$high, x$33.$low + x$36.$low)), x$37 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in$1[5])), 1))), new $Uint64(x$32.$high + x$37.$high, x$32.$low + x$37.$low)); - tmp[10] = (x$38 = (x$39 = (x$40 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$41 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in$1[7])), 2))), new $Uint64(x$40.$high + x$41.$high, x$40.$low + x$41.$low)), x$42 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in$1[6])), 1))), new $Uint64(x$39.$high + x$42.$high, x$39.$low + x$42.$low)), x$43 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in$1[5])), 1))), new $Uint64(x$38.$high + x$43.$high, x$38.$low + x$43.$low)); - tmp[11] = (x$44 = (x$45 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$46 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in$1[7])), 1))), new $Uint64(x$45.$high + x$46.$high, x$45.$low + x$46.$low)), x$47 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in$1[6])), 1))), new $Uint64(x$44.$high + x$47.$high, x$44.$low + x$47.$low)); - tmp[12] = (x$48 = (x$49 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$50 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in$1[7])), 2))), new $Uint64(x$49.$high + x$50.$high, x$49.$low + x$50.$low)), x$51 = $mul64((new $Uint64(0, in$1[6])), (new $Uint64(0, in$1[6]))), new $Uint64(x$48.$high + x$51.$high, x$48.$low + x$51.$low)); - tmp[13] = (x$52 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$53 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in$1[7])), 1))), new $Uint64(x$52.$high + x$53.$high, x$52.$low + x$53.$low)); - tmp[14] = (x$54 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))), x$55 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in$1[7])), 1))), new $Uint64(x$54.$high + x$55.$high, x$54.$low + x$55.$low)); - tmp[15] = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in$1[8])), 1))); - tmp[16] = $mul64((new $Uint64(0, in$1[8])), (new $Uint64(0, in$1[8]))); - p256ReduceDegree(out, $clone(tmp, arrayType$3)); - }; - p256Mul = function(out, in$1, in2) { - var in$1, in2, out, tmp, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99; - tmp = arrayType$3.zero(); - tmp[0] = $mul64((new $Uint64(0, in$1[0])), (new $Uint64(0, in2[0]))); - tmp[1] = (x = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[1])), 0))), x$1 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - tmp[2] = (x$2 = (x$3 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), x$4 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[1])), 1))), new $Uint64(x$3.$high + x$4.$high, x$3.$low + x$4.$low)), x$5 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$2.$high + x$5.$high, x$2.$low + x$5.$low)); - tmp[3] = (x$6 = (x$7 = (x$8 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[3])), 0))), x$9 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)), x$10 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[1])), 0))), new $Uint64(x$7.$high + x$10.$high, x$7.$low + x$10.$low)), x$11 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$6.$high + x$11.$high, x$6.$low + x$11.$low)); - tmp[4] = (x$12 = (x$13 = (x$14 = (x$15 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), x$16 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[3])), 1))), new $Uint64(x$15.$high + x$16.$high, x$15.$low + x$16.$low)), x$17 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$14.$high + x$17.$high, x$14.$low + x$17.$low)), x$18 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[1])), 1))), new $Uint64(x$13.$high + x$18.$high, x$13.$low + x$18.$low)), x$19 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$12.$high + x$19.$high, x$12.$low + x$19.$low)); - tmp[5] = (x$20 = (x$21 = (x$22 = (x$23 = (x$24 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[5])), 0))), x$25 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$24.$high + x$25.$high, x$24.$low + x$25.$low)), x$26 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[3])), 0))), new $Uint64(x$23.$high + x$26.$high, x$23.$low + x$26.$low)), x$27 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$22.$high + x$27.$high, x$22.$low + x$27.$low)), x$28 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[1])), 0))), new $Uint64(x$21.$high + x$28.$high, x$21.$low + x$28.$low)), x$29 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$20.$high + x$29.$high, x$20.$low + x$29.$low)); - tmp[6] = (x$30 = (x$31 = (x$32 = (x$33 = (x$34 = (x$35 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), x$36 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[5])), 1))), new $Uint64(x$35.$high + x$36.$high, x$35.$low + x$36.$low)), x$37 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$34.$high + x$37.$high, x$34.$low + x$37.$low)), x$38 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[3])), 1))), new $Uint64(x$33.$high + x$38.$high, x$33.$low + x$38.$low)), x$39 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$32.$high + x$39.$high, x$32.$low + x$39.$low)), x$40 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[1])), 1))), new $Uint64(x$31.$high + x$40.$high, x$31.$low + x$40.$low)), x$41 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$30.$high + x$41.$high, x$30.$low + x$41.$low)); - tmp[7] = (x$42 = (x$43 = (x$44 = (x$45 = (x$46 = (x$47 = (x$48 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[7])), 0))), x$49 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$48.$high + x$49.$high, x$48.$low + x$49.$low)), x$50 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[5])), 0))), new $Uint64(x$47.$high + x$50.$high, x$47.$low + x$50.$low)), x$51 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$46.$high + x$51.$high, x$46.$low + x$51.$low)), x$52 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[3])), 0))), new $Uint64(x$45.$high + x$52.$high, x$45.$low + x$52.$low)), x$53 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$44.$high + x$53.$high, x$44.$low + x$53.$low)), x$54 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[1])), 0))), new $Uint64(x$43.$high + x$54.$high, x$43.$low + x$54.$low)), x$55 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$42.$high + x$55.$high, x$42.$low + x$55.$low)); - tmp[8] = (x$56 = (x$57 = (x$58 = (x$59 = (x$60 = (x$61 = (x$62 = (x$63 = $mul64((new $Uint64(0, in$1[0])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$64 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[7])), 1))), new $Uint64(x$63.$high + x$64.$high, x$63.$low + x$64.$low)), x$65 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$62.$high + x$65.$high, x$62.$low + x$65.$low)), x$66 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[5])), 1))), new $Uint64(x$61.$high + x$66.$high, x$61.$low + x$66.$low)), x$67 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$60.$high + x$67.$high, x$60.$low + x$67.$low)), x$68 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[3])), 1))), new $Uint64(x$59.$high + x$68.$high, x$59.$low + x$68.$low)), x$69 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$58.$high + x$69.$high, x$58.$low + x$69.$low)), x$70 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[1])), 1))), new $Uint64(x$57.$high + x$70.$high, x$57.$low + x$70.$low)), x$71 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[0])), 0))), new $Uint64(x$56.$high + x$71.$high, x$56.$low + x$71.$low)); - tmp[9] = (x$72 = (x$73 = (x$74 = (x$75 = (x$76 = (x$77 = (x$78 = $mul64((new $Uint64(0, in$1[1])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$79 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[7])), 0))), new $Uint64(x$78.$high + x$79.$high, x$78.$low + x$79.$low)), x$80 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$77.$high + x$80.$high, x$77.$low + x$80.$low)), x$81 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[5])), 0))), new $Uint64(x$76.$high + x$81.$high, x$76.$low + x$81.$low)), x$82 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$75.$high + x$82.$high, x$75.$low + x$82.$low)), x$83 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[3])), 0))), new $Uint64(x$74.$high + x$83.$high, x$74.$low + x$83.$low)), x$84 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$73.$high + x$84.$high, x$73.$low + x$84.$low)), x$85 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[1])), 0))), new $Uint64(x$72.$high + x$85.$high, x$72.$low + x$85.$low)); - tmp[10] = (x$86 = (x$87 = (x$88 = (x$89 = (x$90 = (x$91 = $mul64((new $Uint64(0, in$1[2])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$92 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[7])), 1))), new $Uint64(x$91.$high + x$92.$high, x$91.$low + x$92.$low)), x$93 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$90.$high + x$93.$high, x$90.$low + x$93.$low)), x$94 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[5])), 1))), new $Uint64(x$89.$high + x$94.$high, x$89.$low + x$94.$low)), x$95 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$88.$high + x$95.$high, x$88.$low + x$95.$low)), x$96 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[3])), 1))), new $Uint64(x$87.$high + x$96.$high, x$87.$low + x$96.$low)), x$97 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[2])), 0))), new $Uint64(x$86.$high + x$97.$high, x$86.$low + x$97.$low)); - tmp[11] = (x$98 = (x$99 = (x$100 = (x$101 = (x$102 = $mul64((new $Uint64(0, in$1[3])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$103 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[7])), 0))), new $Uint64(x$102.$high + x$103.$high, x$102.$low + x$103.$low)), x$104 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$101.$high + x$104.$high, x$101.$low + x$104.$low)), x$105 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[5])), 0))), new $Uint64(x$100.$high + x$105.$high, x$100.$low + x$105.$low)), x$106 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$99.$high + x$106.$high, x$99.$low + x$106.$low)), x$107 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[3])), 0))), new $Uint64(x$98.$high + x$107.$high, x$98.$low + x$107.$low)); - tmp[12] = (x$108 = (x$109 = (x$110 = (x$111 = $mul64((new $Uint64(0, in$1[4])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$112 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[7])), 1))), new $Uint64(x$111.$high + x$112.$high, x$111.$low + x$112.$low)), x$113 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$110.$high + x$113.$high, x$110.$low + x$113.$low)), x$114 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[5])), 1))), new $Uint64(x$109.$high + x$114.$high, x$109.$low + x$114.$low)), x$115 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[4])), 0))), new $Uint64(x$108.$high + x$115.$high, x$108.$low + x$115.$low)); - tmp[13] = (x$116 = (x$117 = (x$118 = $mul64((new $Uint64(0, in$1[5])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$119 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[7])), 0))), new $Uint64(x$118.$high + x$119.$high, x$118.$low + x$119.$low)), x$120 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$117.$high + x$120.$high, x$117.$low + x$120.$low)), x$121 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[5])), 0))), new $Uint64(x$116.$high + x$121.$high, x$116.$low + x$121.$low)); - tmp[14] = (x$122 = (x$123 = $mul64((new $Uint64(0, in$1[6])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$124 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[7])), 1))), new $Uint64(x$123.$high + x$124.$high, x$123.$low + x$124.$low)), x$125 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[6])), 0))), new $Uint64(x$122.$high + x$125.$high, x$122.$low + x$125.$low)); - tmp[15] = (x$126 = $mul64((new $Uint64(0, in$1[7])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))), x$127 = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[7])), 0))), new $Uint64(x$126.$high + x$127.$high, x$126.$low + x$127.$low)); - tmp[16] = $mul64((new $Uint64(0, in$1[8])), ($shiftLeft64((new $Uint64(0, in2[8])), 0))); - p256ReduceDegree(out, $clone(tmp, arrayType$3)); - }; - p256Assign = function(out, in$1) { - var in$1, out; - arrayType$1.copy(out, in$1); - }; - p256Invert = function(out, in$1) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, e16, e2, e32, e4, e64, e8, ftmp, ftmp2, i, i$1, i$2, i$3, i$4, i$5, i$6, in$1, out; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - ftmp = $clone(_tmp, arrayType$1); - ftmp2 = $clone(_tmp$1, arrayType$1); - _tmp$2 = arrayType$1.zero(); - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - _tmp$5 = arrayType$1.zero(); - _tmp$6 = arrayType$1.zero(); - _tmp$7 = arrayType$1.zero(); - e2 = $clone(_tmp$2, arrayType$1); - e4 = $clone(_tmp$3, arrayType$1); - e8 = $clone(_tmp$4, arrayType$1); - e16 = $clone(_tmp$5, arrayType$1); - e32 = $clone(_tmp$6, arrayType$1); - e64 = $clone(_tmp$7, arrayType$1); - p256Square(ftmp, in$1); - p256Mul(ftmp, in$1, ftmp); - p256Assign(e2, ftmp); - p256Square(ftmp, ftmp); - p256Square(ftmp, ftmp); - p256Mul(ftmp, ftmp, e2); - p256Assign(e4, ftmp); - p256Square(ftmp, ftmp); - p256Square(ftmp, ftmp); - p256Square(ftmp, ftmp); - p256Square(ftmp, ftmp); - p256Mul(ftmp, ftmp, e4); - p256Assign(e8, ftmp); - i = 0; - while (true) { - if (!(i < 8)) { break; } - p256Square(ftmp, ftmp); - i = i + (1) >> 0; - } - p256Mul(ftmp, ftmp, e8); - p256Assign(e16, ftmp); - i$1 = 0; - while (true) { - if (!(i$1 < 16)) { break; } - p256Square(ftmp, ftmp); - i$1 = i$1 + (1) >> 0; - } - p256Mul(ftmp, ftmp, e16); - p256Assign(e32, ftmp); - i$2 = 0; - while (true) { - if (!(i$2 < 32)) { break; } - p256Square(ftmp, ftmp); - i$2 = i$2 + (1) >> 0; - } - p256Assign(e64, ftmp); - p256Mul(ftmp, ftmp, in$1); - i$3 = 0; - while (true) { - if (!(i$3 < 192)) { break; } - p256Square(ftmp, ftmp); - i$3 = i$3 + (1) >> 0; - } - p256Mul(ftmp2, e64, e32); - i$4 = 0; - while (true) { - if (!(i$4 < 16)) { break; } - p256Square(ftmp2, ftmp2); - i$4 = i$4 + (1) >> 0; - } - p256Mul(ftmp2, ftmp2, e16); - i$5 = 0; - while (true) { - if (!(i$5 < 8)) { break; } - p256Square(ftmp2, ftmp2); - i$5 = i$5 + (1) >> 0; - } - p256Mul(ftmp2, ftmp2, e8); - i$6 = 0; - while (true) { - if (!(i$6 < 4)) { break; } - p256Square(ftmp2, ftmp2); - i$6 = i$6 + (1) >> 0; - } - p256Mul(ftmp2, ftmp2, e4); - p256Square(ftmp2, ftmp2); - p256Square(ftmp2, ftmp2); - p256Mul(ftmp2, ftmp2, e2); - p256Square(ftmp2, ftmp2); - p256Square(ftmp2, ftmp2); - p256Mul(ftmp2, ftmp2, in$1); - p256Mul(out, ftmp2, ftmp); - }; - p256Scalar3 = function(out) { - var carry, i, out, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - carry = 0; - i = 0; - while (true) { - (x$1 = out, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i] = ($imul((x = out, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), (3)) >>> 0))); - (x$3 = out, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i] = ((x$2 = out, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) + (carry) >>> 0))); - carry = (x$4 = out, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i])) >>> 29 >>> 0; - (x$6 = out, ((i < 0 || i >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i] = (((x$5 = out, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i])) & (536870911)) >>> 0))); - i = i + (1) >> 0; - if (i === 9) { - break; - } - (x$8 = out, ((i < 0 || i >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[i] = ($imul((x$7 = out, ((i < 0 || i >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[i])), (3)) >>> 0))); - (x$10 = out, ((i < 0 || i >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[i] = ((x$9 = out, ((i < 0 || i >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i])) + (carry) >>> 0))); - carry = (x$11 = out, ((i < 0 || i >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i])) >>> 28 >>> 0; - (x$13 = out, ((i < 0 || i >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i] = (((x$12 = out, ((i < 0 || i >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[i])) & (268435455)) >>> 0))); - i = i + (1) >> 0; - } - p256ReduceCarry(out, carry); - }; - p256Scalar4 = function(out) { - var _tmp, _tmp$1, carry, i, nextCarry, out, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1; - _tmp = 0; - _tmp$1 = 0; - carry = _tmp; - nextCarry = _tmp$1; - i = 0; - while (true) { - nextCarry = (x = out, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) >>> 27 >>> 0; - (x$2 = out, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i] = ((y = (2), y < 32 ? ((x$1 = out, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) << y) : 0) >>> 0))); - (x$4 = out, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i] = (((x$3 = out, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i])) & (536870911)) >>> 0))); - (x$6 = out, ((i < 0 || i >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i] = ((x$5 = out, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i])) + (carry) >>> 0))); - carry = nextCarry + (((x$7 = out, ((i < 0 || i >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[i])) >>> 29 >>> 0)) >>> 0; - (x$9 = out, ((i < 0 || i >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i] = (((x$8 = out, ((i < 0 || i >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[i])) & (536870911)) >>> 0))); - i = i + (1) >> 0; - if (i === 9) { - break; - } - nextCarry = (x$10 = out, ((i < 0 || i >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[i])) >>> 26 >>> 0; - (x$12 = out, ((i < 0 || i >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[i] = ((y$1 = (2), y$1 < 32 ? ((x$11 = out, ((i < 0 || i >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i])) << y$1) : 0) >>> 0))); - (x$14 = out, ((i < 0 || i >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[i] = (((x$13 = out, ((i < 0 || i >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i])) & (268435455)) >>> 0))); - (x$16 = out, ((i < 0 || i >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[i] = ((x$15 = out, ((i < 0 || i >= x$15.length) ? ($throwRuntimeError("index out of range"), undefined) : x$15[i])) + (carry) >>> 0))); - carry = nextCarry + (((x$17 = out, ((i < 0 || i >= x$17.length) ? ($throwRuntimeError("index out of range"), undefined) : x$17[i])) >>> 28 >>> 0)) >>> 0; - (x$19 = out, ((i < 0 || i >= x$19.length) ? ($throwRuntimeError("index out of range"), undefined) : x$19[i] = (((x$18 = out, ((i < 0 || i >= x$18.length) ? ($throwRuntimeError("index out of range"), undefined) : x$18[i])) & (268435455)) >>> 0))); - i = i + (1) >> 0; - } - p256ReduceCarry(out, carry); - }; - p256Scalar8 = function(out) { - var _tmp, _tmp$1, carry, i, nextCarry, out, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y, y$1; - _tmp = 0; - _tmp$1 = 0; - carry = _tmp; - nextCarry = _tmp$1; - i = 0; - while (true) { - nextCarry = (x = out, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) >>> 26 >>> 0; - (x$2 = out, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i] = ((y = (3), y < 32 ? ((x$1 = out, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])) << y) : 0) >>> 0))); - (x$4 = out, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i] = (((x$3 = out, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i])) & (536870911)) >>> 0))); - (x$6 = out, ((i < 0 || i >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i] = ((x$5 = out, ((i < 0 || i >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i])) + (carry) >>> 0))); - carry = nextCarry + (((x$7 = out, ((i < 0 || i >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[i])) >>> 29 >>> 0)) >>> 0; - (x$9 = out, ((i < 0 || i >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i] = (((x$8 = out, ((i < 0 || i >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[i])) & (536870911)) >>> 0))); - i = i + (1) >> 0; - if (i === 9) { - break; - } - nextCarry = (x$10 = out, ((i < 0 || i >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[i])) >>> 25 >>> 0; - (x$12 = out, ((i < 0 || i >= x$12.length) ? ($throwRuntimeError("index out of range"), undefined) : x$12[i] = ((y$1 = (3), y$1 < 32 ? ((x$11 = out, ((i < 0 || i >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i])) << y$1) : 0) >>> 0))); - (x$14 = out, ((i < 0 || i >= x$14.length) ? ($throwRuntimeError("index out of range"), undefined) : x$14[i] = (((x$13 = out, ((i < 0 || i >= x$13.length) ? ($throwRuntimeError("index out of range"), undefined) : x$13[i])) & (268435455)) >>> 0))); - (x$16 = out, ((i < 0 || i >= x$16.length) ? ($throwRuntimeError("index out of range"), undefined) : x$16[i] = ((x$15 = out, ((i < 0 || i >= x$15.length) ? ($throwRuntimeError("index out of range"), undefined) : x$15[i])) + (carry) >>> 0))); - carry = nextCarry + (((x$17 = out, ((i < 0 || i >= x$17.length) ? ($throwRuntimeError("index out of range"), undefined) : x$17[i])) >>> 28 >>> 0)) >>> 0; - (x$19 = out, ((i < 0 || i >= x$19.length) ? ($throwRuntimeError("index out of range"), undefined) : x$19[i] = (((x$18 = out, ((i < 0 || i >= x$18.length) ? ($throwRuntimeError("index out of range"), undefined) : x$18[i])) & (268435455)) >>> 0))); - i = i + (1) >> 0; - } - p256ReduceCarry(out, carry); - }; - p256PointDouble = function(xOut, yOut, zOut, x, y, z) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, alpha, beta, delta, gamma, tmp, tmp2, x, xOut, y, yOut, z, zOut; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - _tmp$2 = arrayType$1.zero(); - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - _tmp$5 = arrayType$1.zero(); - delta = $clone(_tmp, arrayType$1); - gamma = $clone(_tmp$1, arrayType$1); - alpha = $clone(_tmp$2, arrayType$1); - beta = $clone(_tmp$3, arrayType$1); - tmp = $clone(_tmp$4, arrayType$1); - tmp2 = $clone(_tmp$5, arrayType$1); - p256Square(delta, z); - p256Square(gamma, y); - p256Mul(beta, x, gamma); - p256Sum(tmp, x, delta); - p256Diff(tmp2, x, delta); - p256Mul(alpha, tmp, tmp2); - p256Scalar3(alpha); - p256Sum(tmp, y, z); - p256Square(tmp, tmp); - p256Diff(tmp, tmp, gamma); - p256Diff(zOut, tmp, delta); - p256Scalar4(beta); - p256Square(xOut, alpha); - p256Diff(xOut, xOut, beta); - p256Diff(xOut, xOut, beta); - p256Diff(tmp, beta, xOut); - p256Mul(tmp, alpha, tmp); - p256Square(tmp2, gamma); - p256Scalar8(tmp2); - p256Diff(yOut, tmp, tmp2); - }; - p256PointAddMixed = function(xOut, yOut, zOut, x1, y1, z1, x2, y2) { - var _tmp, _tmp$1, _tmp$10, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, h, i, j, r, rr, s2, tmp, u2, v, x1, x2, xOut, y1, y2, yOut, z1, z1z1, z1z1z1, zOut; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - _tmp$2 = arrayType$1.zero(); - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - _tmp$5 = arrayType$1.zero(); - _tmp$6 = arrayType$1.zero(); - _tmp$7 = arrayType$1.zero(); - _tmp$8 = arrayType$1.zero(); - _tmp$9 = arrayType$1.zero(); - _tmp$10 = arrayType$1.zero(); - z1z1 = $clone(_tmp, arrayType$1); - z1z1z1 = $clone(_tmp$1, arrayType$1); - s2 = $clone(_tmp$2, arrayType$1); - u2 = $clone(_tmp$3, arrayType$1); - h = $clone(_tmp$4, arrayType$1); - i = $clone(_tmp$5, arrayType$1); - j = $clone(_tmp$6, arrayType$1); - r = $clone(_tmp$7, arrayType$1); - rr = $clone(_tmp$8, arrayType$1); - v = $clone(_tmp$9, arrayType$1); - tmp = $clone(_tmp$10, arrayType$1); - p256Square(z1z1, z1); - p256Sum(tmp, z1, z1); - p256Mul(u2, x2, z1z1); - p256Mul(z1z1z1, z1, z1z1); - p256Mul(s2, y2, z1z1z1); - p256Diff(h, u2, x1); - p256Sum(i, h, h); - p256Square(i, i); - p256Mul(j, h, i); - p256Diff(r, s2, y1); - p256Sum(r, r, r); - p256Mul(v, x1, i); - p256Mul(zOut, tmp, h); - p256Square(rr, r); - p256Diff(xOut, rr, j); - p256Diff(xOut, xOut, v); - p256Diff(xOut, xOut, v); - p256Diff(tmp, v, xOut); - p256Mul(yOut, tmp, r); - p256Mul(tmp, y1, j); - p256Diff(yOut, yOut, tmp); - p256Diff(yOut, yOut, tmp); - }; - p256PointAdd = function(xOut, yOut, zOut, x1, y1, z1, x2, y2, z2) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, h, i, j, r, rr, s1, s2, tmp, u1, u2, v, x1, x2, xOut, y1, y2, yOut, z1, z1z1, z1z1z1, z2, z2z2, z2z2z2, zOut; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - _tmp$2 = arrayType$1.zero(); - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - _tmp$5 = arrayType$1.zero(); - _tmp$6 = arrayType$1.zero(); - _tmp$7 = arrayType$1.zero(); - _tmp$8 = arrayType$1.zero(); - _tmp$9 = arrayType$1.zero(); - _tmp$10 = arrayType$1.zero(); - _tmp$11 = arrayType$1.zero(); - _tmp$12 = arrayType$1.zero(); - _tmp$13 = arrayType$1.zero(); - _tmp$14 = arrayType$1.zero(); - z1z1 = $clone(_tmp, arrayType$1); - z1z1z1 = $clone(_tmp$1, arrayType$1); - z2z2 = $clone(_tmp$2, arrayType$1); - z2z2z2 = $clone(_tmp$3, arrayType$1); - s1 = $clone(_tmp$4, arrayType$1); - s2 = $clone(_tmp$5, arrayType$1); - u1 = $clone(_tmp$6, arrayType$1); - u2 = $clone(_tmp$7, arrayType$1); - h = $clone(_tmp$8, arrayType$1); - i = $clone(_tmp$9, arrayType$1); - j = $clone(_tmp$10, arrayType$1); - r = $clone(_tmp$11, arrayType$1); - rr = $clone(_tmp$12, arrayType$1); - v = $clone(_tmp$13, arrayType$1); - tmp = $clone(_tmp$14, arrayType$1); - p256Square(z1z1, z1); - p256Square(z2z2, z2); - p256Mul(u1, x1, z2z2); - p256Sum(tmp, z1, z2); - p256Square(tmp, tmp); - p256Diff(tmp, tmp, z1z1); - p256Diff(tmp, tmp, z2z2); - p256Mul(z2z2z2, z2, z2z2); - p256Mul(s1, y1, z2z2z2); - p256Mul(u2, x2, z1z1); - p256Mul(z1z1z1, z1, z1z1); - p256Mul(s2, y2, z1z1z1); - p256Diff(h, u2, u1); - p256Sum(i, h, h); - p256Square(i, i); - p256Mul(j, h, i); - p256Diff(r, s2, s1); - p256Sum(r, r, r); - p256Mul(v, u1, i); - p256Mul(zOut, tmp, h); - p256Square(rr, r); - p256Diff(xOut, rr, j); - p256Diff(xOut, xOut, v); - p256Diff(xOut, xOut, v); - p256Diff(tmp, v, xOut); - p256Mul(yOut, tmp, r); - p256Mul(tmp, s1, j); - p256Diff(yOut, yOut, tmp); - p256Diff(yOut, yOut, tmp); - }; - p256CopyConditional = function(out, in$1, mask$1) { - var i, in$1, mask$1, out, tmp, x, x$1, x$2, x$3; - i = 0; - while (true) { - if (!(i < 9)) { break; } - tmp = (mask$1 & ((((x = in$1, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) ^ (x$1 = out, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i]))) >>> 0))) >>> 0; - (x$3 = out, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i] = (((x$2 = out, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) ^ (tmp)) >>> 0))); - i = i + (1) >> 0; - } - }; - p256SelectAffinePoint = function(xOut, yOut, table, index) { - var _i, _i$1, _i$2, _i$3, _ref, _ref$1, _ref$2, _ref$3, i, i$1, i$2, index, j, j$1, mask$1, table, x, x$1, x$2, x$3, xOut, yOut; - _ref = xOut; - _i = 0; - while (true) { - if (!(_i < 9)) { break; } - i = _i; - xOut.nilCheck, ((i < 0 || i >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i] = 0); - _i++; - } - _ref$1 = yOut; - _i$1 = 0; - while (true) { - if (!(_i$1 < 9)) { break; } - i$1 = _i$1; - yOut.nilCheck, ((i$1 < 0 || i$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$1] = 0); - _i$1++; - } - i$2 = 1; - while (true) { - if (!(i$2 < 16)) { break; } - mask$1 = (i$2 ^ index) >>> 0; - mask$1 = (mask$1 | ((mask$1 >>> 2 >>> 0))) >>> 0; - mask$1 = (mask$1 | ((mask$1 >>> 1 >>> 0))) >>> 0; - mask$1 = (mask$1 & (1)) >>> 0; - mask$1 = mask$1 - (1) >>> 0; - _ref$2 = xOut; - _i$2 = 0; - while (true) { - if (!(_i$2 < 9)) { break; } - j = _i$2; - (x$1 = xOut, ((j < 0 || j >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[j] = (((x = xOut, ((j < 0 || j >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[j])) | ((((0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]) & mask$1) >>> 0))) >>> 0))); - table = $subslice(table, 1); - _i$2++; - } - _ref$3 = yOut; - _i$3 = 0; - while (true) { - if (!(_i$3 < 9)) { break; } - j$1 = _i$3; - (x$3 = yOut, ((j$1 < 0 || j$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j$1] = (((x$2 = yOut, ((j$1 < 0 || j$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[j$1])) | ((((0 >= table.$length ? ($throwRuntimeError("index out of range"), undefined) : table.$array[table.$offset + 0]) & mask$1) >>> 0))) >>> 0))); - table = $subslice(table, 1); - _i$3++; - } - i$2 = i$2 + (1) >>> 0; - } - }; - p256SelectJacobianPoint = function(xOut, yOut, zOut, table, index) { - var _i, _i$1, _i$2, _i$3, _i$4, _i$5, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, i, i$1, i$2, i$3, index, j, j$1, j$2, mask$1, table, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, xOut, yOut, zOut; - _ref = xOut; - _i = 0; - while (true) { - if (!(_i < 9)) { break; } - i = _i; - xOut.nilCheck, ((i < 0 || i >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i] = 0); - _i++; - } - _ref$1 = yOut; - _i$1 = 0; - while (true) { - if (!(_i$1 < 9)) { break; } - i$1 = _i$1; - yOut.nilCheck, ((i$1 < 0 || i$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$1] = 0); - _i$1++; - } - _ref$2 = zOut; - _i$2 = 0; - while (true) { - if (!(_i$2 < 9)) { break; } - i$2 = _i$2; - zOut.nilCheck, ((i$2 < 0 || i$2 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[i$2] = 0); - _i$2++; - } - i$3 = 1; - while (true) { - if (!(i$3 < 16)) { break; } - mask$1 = (i$3 ^ index) >>> 0; - mask$1 = (mask$1 | ((mask$1 >>> 2 >>> 0))) >>> 0; - mask$1 = (mask$1 | ((mask$1 >>> 1 >>> 0))) >>> 0; - mask$1 = (mask$1 & (1)) >>> 0; - mask$1 = mask$1 - (1) >>> 0; - _ref$3 = xOut; - _i$3 = 0; - while (true) { - if (!(_i$3 < 9)) { break; } - j = _i$3; - (x$3 = xOut, ((j < 0 || j >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j] = (((x = xOut, ((j < 0 || j >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[j])) | ((((x$1 = (x$2 = table, ((i$3 < 0 || i$3 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$3]))[0], ((j < 0 || j >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[j])) & mask$1) >>> 0))) >>> 0))); - _i$3++; - } - _ref$4 = yOut; - _i$4 = 0; - while (true) { - if (!(_i$4 < 9)) { break; } - j$1 = _i$4; - (x$7 = yOut, ((j$1 < 0 || j$1 >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[j$1] = (((x$4 = yOut, ((j$1 < 0 || j$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[j$1])) | ((((x$5 = (x$6 = table, ((i$3 < 0 || i$3 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i$3]))[1], ((j$1 < 0 || j$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[j$1])) & mask$1) >>> 0))) >>> 0))); - _i$4++; - } - _ref$5 = zOut; - _i$5 = 0; - while (true) { - if (!(_i$5 < 9)) { break; } - j$2 = _i$5; - (x$11 = zOut, ((j$2 < 0 || j$2 >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[j$2] = (((x$8 = zOut, ((j$2 < 0 || j$2 >= x$8.length) ? ($throwRuntimeError("index out of range"), undefined) : x$8[j$2])) | ((((x$9 = (x$10 = table, ((i$3 < 0 || i$3 >= x$10.length) ? ($throwRuntimeError("index out of range"), undefined) : x$10[i$3]))[2], ((j$2 < 0 || j$2 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[j$2])) & mask$1) >>> 0))) >>> 0))); - _i$5++; - } - i$3 = i$3 + (1) >>> 0; - } - }; - p256GetBit = function(scalar, bit) { - var bit, scalar, x, x$1, y; - return (((((((y = (((bit & 7) >>> 0)), y < 32 ? (((x = scalar, x$1 = bit >>> 3 >>> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1]))) >>> y) : 0) << 24 >>> 24)) & 1) >>> 0) >>> 0)); - }; - p256ScalarBaseMult = function(xOut, yOut, zOut, scalar) { - var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, bit0, bit1, bit2, bit3, i, i$1, i$2, i$3, index, j, mask$1, nIsInfinityMask, pIsNoninfiniteMask, px, py, scalar, tableOffset, tx, ty, tz, xOut, yOut, zOut; - nIsInfinityMask = 4294967295; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - pIsNoninfiniteMask = _tmp; - mask$1 = _tmp$1; - tableOffset = _tmp$2; - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - _tmp$5 = arrayType$1.zero(); - _tmp$6 = arrayType$1.zero(); - _tmp$7 = arrayType$1.zero(); - px = $clone(_tmp$3, arrayType$1); - py = $clone(_tmp$4, arrayType$1); - tx = $clone(_tmp$5, arrayType$1); - ty = $clone(_tmp$6, arrayType$1); - tz = $clone(_tmp$7, arrayType$1); - _ref = xOut; - _i = 0; - while (true) { - if (!(_i < 9)) { break; } - i = _i; - xOut.nilCheck, ((i < 0 || i >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i] = 0); - _i++; - } - _ref$1 = yOut; - _i$1 = 0; - while (true) { - if (!(_i$1 < 9)) { break; } - i$1 = _i$1; - yOut.nilCheck, ((i$1 < 0 || i$1 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$1] = 0); - _i$1++; - } - _ref$2 = zOut; - _i$2 = 0; - while (true) { - if (!(_i$2 < 9)) { break; } - i$2 = _i$2; - zOut.nilCheck, ((i$2 < 0 || i$2 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[i$2] = 0); - _i$2++; - } - i$3 = 0; - while (true) { - if (!(i$3 < 32)) { break; } - if (!((i$3 === 0))) { - p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); - } - tableOffset = 0; - j = 0; - while (true) { - if (!(j <= 32)) { break; } - bit0 = p256GetBit(scalar, (31 - i$3 >>> 0) + j >>> 0); - bit1 = p256GetBit(scalar, (95 - i$3 >>> 0) + j >>> 0); - bit2 = p256GetBit(scalar, (159 - i$3 >>> 0) + j >>> 0); - bit3 = p256GetBit(scalar, (223 - i$3 >>> 0) + j >>> 0); - index = (((((bit0 | ((bit1 << 1 >>> 0))) >>> 0) | ((bit2 << 2 >>> 0))) >>> 0) | ((bit3 << 3 >>> 0))) >>> 0; - p256SelectAffinePoint(px, py, $subslice(new sliceType$1(p256Precomputed), tableOffset), index); - tableOffset = tableOffset + (270) >>> 0; - p256PointAddMixed(tx, ty, tz, xOut, yOut, zOut, px, py); - p256CopyConditional(xOut, px, nIsInfinityMask); - p256CopyConditional(yOut, py, nIsInfinityMask); - p256CopyConditional(zOut, p256One, nIsInfinityMask); - pIsNoninfiniteMask = nonZeroToAllOnes(index); - mask$1 = (pIsNoninfiniteMask & (~nIsInfinityMask >>> 0)) >>> 0; - p256CopyConditional(xOut, tx, mask$1); - p256CopyConditional(yOut, ty, mask$1); - p256CopyConditional(zOut, tz, mask$1); - nIsInfinityMask = (nIsInfinityMask & ~(pIsNoninfiniteMask)) >>> 0; - j = j + (32) >>> 0; - } - i$3 = i$3 + (1) >>> 0; - } - }; - p256PointToAffine = function(xOut, yOut, x, y, z) { - var _tmp, _tmp$1, x, xOut, y, yOut, z, zInv, zInvSq; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - zInv = $clone(_tmp, arrayType$1); - zInvSq = $clone(_tmp$1, arrayType$1); - p256Invert(zInv, z); - p256Square(zInvSq, zInv); - p256Mul(xOut, x, zInvSq); - p256Mul(zInv, zInv, zInvSq); - p256Mul(yOut, y, zInv); - }; - p256ToAffine = function(x, y, z) { - var {$24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, x, xOut, xx, y, yOut, yy, z, $s, $r, $c} = $restore(this, {x, y, z}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xx = [xx]; - yy = [yy]; - xOut = ptrType$1.nil; - yOut = ptrType$1.nil; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - xx[0] = $clone(_tmp, arrayType$1); - yy[0] = $clone(_tmp$1, arrayType$1); - p256PointToAffine(xx[0], yy[0], x, y, z); - _r = p256ToBig(xx[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$2 = _r; - _r$1 = p256ToBig(yy[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$3 = _r$1; - xOut = _tmp$2; - yOut = _tmp$3; - $24r = [xOut, yOut]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: p256ToAffine, $c: true, $r, $24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, x, xOut, xx, y, yOut, yy, z, $s};return $f; - }; - p256ScalarMult = function(xOut, yOut, zOut, x, y, scalar) { - var _i, _i$1, _i$2, _q, _q$1, _q$2, _q$3, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, i, i$1, i$2, i$3, i$4, index, mask$1, nIsInfinityMask, pIsNoninfiniteMask, precomp, px, py, pz, scalar, tx, ty, tz, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, xOut, y, y$1, yOut, zOut; - _tmp = arrayType$1.zero(); - _tmp$1 = arrayType$1.zero(); - _tmp$2 = arrayType$1.zero(); - _tmp$3 = arrayType$1.zero(); - _tmp$4 = arrayType$1.zero(); - _tmp$5 = arrayType$1.zero(); - px = $clone(_tmp, arrayType$1); - py = $clone(_tmp$1, arrayType$1); - pz = $clone(_tmp$2, arrayType$1); - tx = $clone(_tmp$3, arrayType$1); - ty = $clone(_tmp$4, arrayType$1); - tz = $clone(_tmp$5, arrayType$1); - precomp = arrayType$5.zero(); - _tmp$6 = 0; - _tmp$7 = 0; - _tmp$8 = 0; - _tmp$9 = 0; - nIsInfinityMask = _tmp$6; - index = _tmp$7; - pIsNoninfiniteMask = _tmp$8; - mask$1 = _tmp$9; - arrayType$1.copy(precomp[1][0], x); - arrayType$1.copy(precomp[1][1], y); - arrayType$1.copy(precomp[1][2], p256One); - i = 2; - while (true) { - if (!(i < 16)) { break; } - p256PointDouble(((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[0], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[1], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[2], (x$1 = (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$1]))[0], (x$2 = (_q$1 = i / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$2]))[1], (x$3 = (_q$2 = i / 2, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero")), ((x$3 < 0 || x$3 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$3]))[2]); - p256PointAddMixed((x$4 = i + 1 >> 0, ((x$4 < 0 || x$4 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$4]))[0], (x$5 = i + 1 >> 0, ((x$5 < 0 || x$5 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$5]))[1], (x$6 = i + 1 >> 0, ((x$6 < 0 || x$6 >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[x$6]))[2], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[0], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[1], ((i < 0 || i >= precomp.length) ? ($throwRuntimeError("index out of range"), undefined) : precomp[i])[2], x, y); - i = i + (2) >> 0; - } - _ref = xOut; - _i = 0; - while (true) { - if (!(_i < 9)) { break; } - i$1 = _i; - xOut.nilCheck, ((i$1 < 0 || i$1 >= xOut.length) ? ($throwRuntimeError("index out of range"), undefined) : xOut[i$1] = 0); - _i++; - } - _ref$1 = yOut; - _i$1 = 0; - while (true) { - if (!(_i$1 < 9)) { break; } - i$2 = _i$1; - yOut.nilCheck, ((i$2 < 0 || i$2 >= yOut.length) ? ($throwRuntimeError("index out of range"), undefined) : yOut[i$2] = 0); - _i$1++; - } - _ref$2 = zOut; - _i$2 = 0; - while (true) { - if (!(_i$2 < 9)) { break; } - i$3 = _i$2; - zOut.nilCheck, ((i$3 < 0 || i$3 >= zOut.length) ? ($throwRuntimeError("index out of range"), undefined) : zOut[i$3] = 0); - _i$2++; - } - nIsInfinityMask = 4294967295; - i$4 = 0; - while (true) { - if (!(i$4 < 64)) { break; } - if (!((i$4 === 0))) { - p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); - p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); - p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); - p256PointDouble(xOut, yOut, zOut, xOut, yOut, zOut); - } - index = (((x$7 = scalar, x$8 = 31 - (_q$3 = i$4 / 2, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0, ((x$8 < 0 || x$8 >= x$7.length) ? ($throwRuntimeError("index out of range"), undefined) : x$7[x$8])) >>> 0)); - if (((i$4 & 1)) === 1) { - index = (index & (15)) >>> 0; - } else { - index = (y$1 = (4), y$1 < 32 ? (index >>> y$1) : 0) >>> 0; - } - p256SelectJacobianPoint(px, py, pz, precomp, index); - p256PointAdd(tx, ty, tz, xOut, yOut, zOut, px, py, pz); - p256CopyConditional(xOut, px, nIsInfinityMask); - p256CopyConditional(yOut, py, nIsInfinityMask); - p256CopyConditional(zOut, pz, nIsInfinityMask); - pIsNoninfiniteMask = nonZeroToAllOnes(index); - mask$1 = (pIsNoninfiniteMask & (~nIsInfinityMask >>> 0)) >>> 0; - p256CopyConditional(xOut, tx, mask$1); - p256CopyConditional(yOut, ty, mask$1); - p256CopyConditional(zOut, tz, mask$1); - nIsInfinityMask = (nIsInfinityMask & ~(pIsNoninfiniteMask)) >>> 0; - i$4 = i$4 + (1) >> 0; - } - }; - p256FromBig = function(out, in$1) { - var {_r, _r$1, _r$2, bits, bits$1, i, in$1, out, tmp, $s, $r, $c} = $restore(this, {out, in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - tmp = new big.Int.ptr(false, big.nat.nil).Lsh(in$1, 257); - _r = tmp.Mod(tmp, p256Params.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < 9)) { break; } */ if(!(i < 9)) { $s = 3; continue; } - bits = tmp.Bits(); - if (bits.$length > 0) { - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((((0 >= bits.$length ? ($throwRuntimeError("index out of range"), undefined) : bits.$array[bits.$offset + 0]) >>> 0)) & 536870911) >>> 0)); - } else { - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = 0); - } - _r$1 = tmp.Rsh(tmp, 29); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - i = i + (1) >> 0; - if (i === 9) { - /* break; */ $s = 3; continue; - } - bits$1 = tmp.Bits(); - if (bits$1.$length > 0) { - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = (((((0 >= bits$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bits$1.$array[bits$1.$offset + 0]) >>> 0)) & 268435455) >>> 0)); - } else { - out.nilCheck, ((i < 0 || i >= out.length) ? ($throwRuntimeError("index out of range"), undefined) : out[i] = 0); - } - _r$2 = tmp.Rsh(tmp, 28); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: p256FromBig, $c: true, $r, _r, _r$1, _r$2, bits, bits$1, i, in$1, out, tmp, $s};return $f; - }; - p256ToBig = function(in$1) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, i, in$1, result, tmp, x, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - result = _tmp; - tmp = _tmp$1; - result.SetInt64((new $Int64(0, in$1[8]))); - i = 7; - /* while (true) { */ case 1: - /* if (!(i >= 0)) { break; } */ if(!(i >= 0)) { $s = 2; continue; } - if (((i & 1)) === 0) { - result.Lsh(result, 29); - } else { - result.Lsh(result, 28); - } - tmp.SetInt64((new $Int64(0, (x = in$1, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i]))))); - _r = result.Add(result, tmp); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - i = i - (1) >> 0; - $s = 1; continue; - case 2: - _r$1 = result.Mul(result, p256RInverse); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = result.Mod(result, p256Params.P); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return result; - /* */ } return; } var $f = {$blk: p256ToBig, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, i, in$1, result, tmp, x, $s};return $f; - }; - initP224 = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = bigFromDecimal("26959946667150639794667015087019630673557916260026308143510066298881"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = bigFromDecimal("26959946667150639794667015087019625940457807714424391721682722368061"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = bigFromHex("b4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = bigFromHex("b70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21"); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = bigFromHex("bd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - p224.params = new CurveParams.ptr(_r, _r$1, _r$2, _r$3, _r$4, 224, "P-224"); - $s = -1; return; - /* */ } return; } var $f = {$blk: initP224, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, $s};return $f; - }; - p224Curve.ptr.prototype.Params = function() { - var curve; - curve = this; - return curve.params; - }; - p224Curve.prototype.Params = function() { return this.$val.Params(); }; - p224Curve.ptr.prototype.IsOnCurve = function(x, y) { - var {_r, _tuple, curve, ok, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - if ((x.Sign() === 0) && (y.Sign() === 0)) { - $s = -1; return false; - } - _r = p224PointFromAffine(x, y); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ok = _tuple[1]; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: p224Curve.ptr.prototype.IsOnCurve, $c: true, $r, _r, _tuple, curve, ok, x, y, $s};return $f; - }; - p224Curve.prototype.IsOnCurve = function(x, y) { return this.$val.IsOnCurve(x, y); }; - p224PointFromAffine = function(x, y) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, ok, p, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = ptrType$4.nil; - ok = false; - if ((x.Sign() === 0) && (y.Sign() === 0)) { - _tmp = nistec.NewP224Point(); - _tmp$1 = true; - p = _tmp; - ok = _tmp$1; - $s = -1; return [p, ok]; - } - if (x.Sign() < 0 || y.Sign() < 0) { - _tmp$2 = ptrType$4.nil; - _tmp$3 = false; - p = _tmp$2; - ok = _tmp$3; - $s = -1; return [p, ok]; - } - if (x.BitLen() > 224 || y.BitLen() > 224) { - _tmp$4 = ptrType$4.nil; - _tmp$5 = false; - p = _tmp$4; - ok = _tmp$5; - $s = -1; return [p, ok]; - } - _r = P224(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = Marshal(_r, x, y); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = nistec.NewP224Point().SetBytes(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - p = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = ptrType$4.nil; - _tmp$7 = false; - p = _tmp$6; - ok = _tmp$7; - $s = -1; return [p, ok]; - } - _tmp$8 = p; - _tmp$9 = true; - p = _tmp$8; - ok = _tmp$9; - $s = -1; return [p, ok]; - /* */ } return; } var $f = {$blk: p224PointFromAffine, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, err, ok, p, x, y, $s};return $f; - }; - p224PointToAffine = function(p) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, out, p, x, y, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - out = p.Bytes(); - if ((out.$length === 1) && ((0 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 0]) === 0)) { - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - } - _r = P224(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = Unmarshal(_r, out); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x = _tuple[0]; - y = _tuple[1]; - if (x === ptrType$1.nil) { - $panic(new $String("crypto/elliptic: internal error: Unmarshal rejected a valid point encoding")); - } - _tmp$2 = x; - _tmp$3 = y; - x = _tmp$2; - y = _tmp$3; - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: p224PointToAffine, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, out, p, x, y, $s};return $f; - }; - p224RandomPoint = function() { - var {_r, _r$1, _tmp, _tmp$1, _tuple, err, x, y, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - _r = P224(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = GenerateKey(_r, rand.Reader); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x = _tuple[1]; - y = _tuple[2]; - err = _tuple[3]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(new $String("crypto/elliptic: failed to generate random point")); - } - _tmp = x; - _tmp$1 = y; - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: p224RandomPoint, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tuple, err, x, y, $s};return $f; - }; - p224Curve.ptr.prototype.Add = function(x1, y1, x2, y2) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, ok, p1, p2, x1, x2, y1, y2, $s, $r, $c} = $restore(this, {x1, y1, x2, y2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p224PointFromAffine(x1, y1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p224RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p224PointFromAffine(x2, y2); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - p2 = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - _r$3 = p224RandomPoint(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - _r$4 = p224PointToAffine(p1.Add(p1, p2)); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 12; case 12: return $24r$2; - /* */ } return; } var $f = {$blk: p224Curve.ptr.prototype.Add, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, ok, p1, p2, x1, x2, y1, y2, $s};return $f; - }; - p224Curve.prototype.Add = function(x1, y1, x2, y2) { return this.$val.Add(x1, y1, x2, y2); }; - p224Curve.ptr.prototype.Double = function(x1, y1) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, ok, p, x1, y1, $s, $r, $c} = $restore(this, {x1, y1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p224PointFromAffine(x1, y1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p224RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p224PointToAffine(p.Double(p)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: p224Curve.ptr.prototype.Double, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, ok, p, x1, y1, $s};return $f; - }; - p224Curve.prototype.Double = function(x1, y1) { return this.$val.Double(x1, y1); }; - p224Curve.ptr.prototype.ScalarMult = function(Bx, By, scalar) { - var {$24r, $24r$1, Bx, By, _r, _r$1, _r$2, _tuple, ok, p, scalar, $s, $r, $c} = $restore(this, {Bx, By, scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = p224PointFromAffine(Bx, By); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = p224RandomPoint(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = p224PointToAffine(p.ScalarMult(p, scalar)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: p224Curve.ptr.prototype.ScalarMult, $c: true, $r, $24r, $24r$1, Bx, By, _r, _r$1, _r$2, _tuple, ok, p, scalar, $s};return $f; - }; - p224Curve.prototype.ScalarMult = function(Bx, By, scalar) { return this.$val.ScalarMult(Bx, By, scalar); }; - p224Curve.ptr.prototype.ScalarBaseMult = function(scalar) { - var {$24r, _r, p, scalar, $s, $r, $c} = $restore(this, {scalar}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = nistec.NewP224Generator(); - _r = p224PointToAffine(p.ScalarMult(p, scalar)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: p224Curve.ptr.prototype.ScalarBaseMult, $c: true, $r, $24r, _r, p, scalar, $s};return $f; - }; - p224Curve.prototype.ScalarBaseMult = function(scalar) { return this.$val.ScalarBaseMult(scalar); }; - matchesSpecificCurve = function(params, available) { - var {_i, _r, _ref, available, c, params, $s, $r, $c} = $restore(this, {params, available}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = available; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = c.Params(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (params === _r) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (params === _r) { */ case 3: - $s = -1; return [c, true]; - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return [$ifaceNil, false]; - /* */ } return; } var $f = {$blk: matchesSpecificCurve, $c: true, $r, _i, _r, _ref, available, c, params, $s};return $f; - }; - CurveParams.ptr.prototype.Params = function() { - var curve; - curve = this; - return curve; - }; - CurveParams.prototype.Params = function() { return this.$val.Params(); }; - CurveParams.ptr.prototype.polynomial = function(x) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, curve, threeX, x, x3, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = new big.Int.ptr(false, big.nat.nil).Mul(x, x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - x3 = _r; - _r$1 = x3.Mul(x3, x); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - threeX = new big.Int.ptr(false, big.nat.nil).Lsh(x, 1); - _r$2 = threeX.Add(threeX, x); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = x3.Sub(x3, threeX); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = x3.Add(x3, curve.B); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = x3.Mod(x3, curve.P); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return x3; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.polynomial, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, curve, threeX, x, x3, $s};return $f; - }; - CurveParams.prototype.polynomial = function(x) { return this.$val.polynomial(x); }; - CurveParams.ptr.prototype.IsOnCurve = function(x, y) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, curve, ok, specific, x, y, y2, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = matchesSpecificCurve(curve, new sliceType$2([new p224.constructor.elem(p224), new p384.constructor.elem(p384), new p521.constructor.elem(p521)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - specific = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = specific.IsOnCurve(x, y); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - if (x.Sign() < 0 || x.Cmp(curve.P) >= 0 || y.Sign() < 0 || y.Cmp(curve.P) >= 0) { - $s = -1; return false; - } - _r$2 = new big.Int.ptr(false, big.nat.nil).Mul(y, y); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - y2 = _r$2; - _r$3 = y2.Mod(y2, curve.P); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = curve.polynomial(x); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = _r$4.Cmp(y2); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = _r$5 === 0; - $s = 10; case 10: return $24r$1; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.IsOnCurve, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, curve, ok, specific, x, y, y2, $s};return $f; - }; - CurveParams.prototype.IsOnCurve = function(x, y) { return this.$val.IsOnCurve(x, y); }; - zForAffine = function(x, y) { - var x, y, z; - z = new big.Int.ptr(false, big.nat.nil); - if (!((x.Sign() === 0)) || !((y.Sign() === 0))) { - z.SetInt64(new $Int64(0, 1)); - } - return z; - }; - CurveParams.ptr.prototype.affineFromJacobian = function(x, y, z) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, curve, x, xOut, y, yOut, z, zinv, zinvsq, $s, $r, $c} = $restore(this, {x, y, z}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - xOut = ptrType$1.nil; - yOut = ptrType$1.nil; - curve = this; - if (z.Sign() === 0) { - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - xOut = _tmp; - yOut = _tmp$1; - $s = -1; return [xOut, yOut]; - } - _r = new big.Int.ptr(false, big.nat.nil).ModInverse(z, curve.P); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - zinv = _r; - _r$1 = new big.Int.ptr(false, big.nat.nil).Mul(zinv, zinv); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - zinvsq = _r$1; - _r$2 = new big.Int.ptr(false, big.nat.nil).Mul(x, zinvsq); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - xOut = _r$2; - _r$3 = xOut.Mod(xOut, curve.P); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = zinvsq.Mul(zinvsq, zinv); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = new big.Int.ptr(false, big.nat.nil).Mul(y, zinvsq); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - yOut = _r$5; - _r$6 = yOut.Mod(yOut, curve.P); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return [xOut, yOut]; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.affineFromJacobian, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, curve, x, xOut, y, yOut, z, zinv, zinvsq, $s};return $f; - }; - CurveParams.prototype.affineFromJacobian = function(x, y, z) { return this.$val.affineFromJacobian(x, y, z); }; - CurveParams.ptr.prototype.Add = function(x1, y1, x2, y2) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, curve, ok, specific, x1, x2, y1, y2, z1, z2, $s, $r, $c} = $restore(this, {x1, y1, x2, y2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = matchesSpecificCurve(curve, new sliceType$2([new p224.constructor.elem(p224), new p384.constructor.elem(p384), new p521.constructor.elem(p521)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - specific = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = specific.Add(x1, y1, x2, y2); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - z1 = zForAffine(x1, y1); - z2 = zForAffine(x2, y2); - _r$2 = curve.addJacobian(x1, y1, z1, x2, y2, z2); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - _r$3 = curve.affineFromJacobian(_tuple$1[0], _tuple$1[1], _tuple$1[2]); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.Add, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, curve, ok, specific, x1, x2, y1, y2, z1, z2, $s};return $f; - }; - CurveParams.prototype.Add = function(x1, y1, x2, y2) { return this.$val.Add(x1, y1, x2, y2); }; - CurveParams.ptr.prototype.addJacobian = function(x1, y1, z1, x2, y2, z2) { - var {$24r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, curve, h, i, j, r, s1, s2, u1, u2, v, x1, x2, x3, xEqual, y1, y2, y3, yEqual, z1, z1z1, z2, z2z2, z3, $s, $r, $c} = $restore(this, {x1, y1, z1, x2, y2, z2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - _tmp$2 = new big.Int.ptr(false, big.nat.nil); - x3 = _tmp; - y3 = _tmp$1; - z3 = _tmp$2; - if (z1.Sign() === 0) { - x3.Set(x2); - y3.Set(y2); - z3.Set(z2); - $s = -1; return [x3, y3, z3]; - } - if (z2.Sign() === 0) { - x3.Set(x1); - y3.Set(y1); - z3.Set(z1); - $s = -1; return [x3, y3, z3]; - } - _r = new big.Int.ptr(false, big.nat.nil).Mul(z1, z1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - z1z1 = _r; - _r$1 = z1z1.Mod(z1z1, curve.P); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = new big.Int.ptr(false, big.nat.nil).Mul(z2, z2); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - z2z2 = _r$2; - _r$3 = z2z2.Mod(z2z2, curve.P); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = new big.Int.ptr(false, big.nat.nil).Mul(x1, z2z2); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - u1 = _r$4; - _r$5 = u1.Mod(u1, curve.P); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = new big.Int.ptr(false, big.nat.nil).Mul(x2, z1z1); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - u2 = _r$6; - _r$7 = u2.Mod(u2, curve.P); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = new big.Int.ptr(false, big.nat.nil).Sub(u2, u1); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - h = _r$8; - xEqual = h.Sign() === 0; - /* */ if (h.Sign() === -1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (h.Sign() === -1) { */ case 10: - _r$9 = h.Add(h, curve.P); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* } */ case 11: - i = new big.Int.ptr(false, big.nat.nil).Lsh(h, 1); - _r$10 = i.Mul(i, i); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - _r$11 = new big.Int.ptr(false, big.nat.nil).Mul(h, i); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - j = _r$11; - _r$12 = new big.Int.ptr(false, big.nat.nil).Mul(y1, z2); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - s1 = _r$12; - _r$13 = s1.Mul(s1, z2z2); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - _r$14 = s1.Mod(s1, curve.P); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = new big.Int.ptr(false, big.nat.nil).Mul(y2, z1); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - s2 = _r$15; - _r$16 = s2.Mul(s2, z1z1); /* */ $s = 19; case 19: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = s2.Mod(s2, curve.P); /* */ $s = 20; case 20: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - _r$18 = new big.Int.ptr(false, big.nat.nil).Sub(s2, s1); /* */ $s = 21; case 21: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - r = _r$18; - /* */ if (r.Sign() === -1) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (r.Sign() === -1) { */ case 22: - _r$19 = r.Add(r, curve.P); /* */ $s = 24; case 24: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - /* } */ case 23: - yEqual = r.Sign() === 0; - /* */ if (xEqual && yEqual) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (xEqual && yEqual) { */ case 25: - _r$20 = curve.doubleJacobian(x1, y1, z1); /* */ $s = 27; case 27: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r = _r$20; - $s = 28; case 28: return $24r; - /* } */ case 26: - r.Lsh(r, 1); - _r$21 = new big.Int.ptr(false, big.nat.nil).Mul(u1, i); /* */ $s = 29; case 29: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - v = _r$21; - x3.Set(r); - _r$22 = x3.Mul(x3, x3); /* */ $s = 30; case 30: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$22; - _r$23 = x3.Sub(x3, j); /* */ $s = 31; case 31: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$23; - _r$24 = x3.Sub(x3, v); /* */ $s = 32; case 32: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$24; - _r$25 = x3.Sub(x3, v); /* */ $s = 33; case 33: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - _r$26 = x3.Mod(x3, curve.P); /* */ $s = 34; case 34: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$26; - y3.Set(r); - _r$27 = v.Sub(v, x3); /* */ $s = 35; case 35: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$27; - _r$28 = y3.Mul(y3, v); /* */ $s = 36; case 36: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$28; - _r$29 = s1.Mul(s1, j); /* */ $s = 37; case 37: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$29; - s1.Lsh(s1, 1); - _r$30 = y3.Sub(y3, s1); /* */ $s = 38; case 38: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _r$30; - _r$31 = y3.Mod(y3, curve.P); /* */ $s = 39; case 39: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$31; - _r$32 = z3.Add(z1, z2); /* */ $s = 40; case 40: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _r$32; - _r$33 = z3.Mul(z3, z3); /* */ $s = 41; case 41: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$33; - _r$34 = z3.Sub(z3, z1z1); /* */ $s = 42; case 42: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _r$34; - _r$35 = z3.Sub(z3, z2z2); /* */ $s = 43; case 43: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _r$35; - _r$36 = z3.Mul(z3, h); /* */ $s = 44; case 44: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _r$36; - _r$37 = z3.Mod(z3, curve.P); /* */ $s = 45; case 45: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _r$37; - $s = -1; return [x3, y3, z3]; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.addJacobian, $c: true, $r, $24r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, curve, h, i, j, r, s1, s2, u1, u2, v, x1, x2, x3, xEqual, y1, y2, y3, yEqual, z1, z1z1, z2, z2z2, z3, $s};return $f; - }; - CurveParams.prototype.addJacobian = function(x1, y1, z1, x2, y2, z2) { return this.$val.addJacobian(x1, y1, z1, x2, y2, z2); }; - CurveParams.ptr.prototype.Double = function(x1, y1) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, curve, ok, specific, x1, y1, z1, $s, $r, $c} = $restore(this, {x1, y1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = matchesSpecificCurve(curve, new sliceType$2([new p224.constructor.elem(p224), new p384.constructor.elem(p384), new p521.constructor.elem(p521)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - specific = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = specific.Double(x1, y1); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - z1 = zForAffine(x1, y1); - _r$2 = curve.doubleJacobian(x1, y1, z1); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - _r$3 = curve.affineFromJacobian(_tuple$1[0], _tuple$1[1], _tuple$1[2]); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.Double, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, curve, ok, specific, x1, y1, z1, $s};return $f; - }; - CurveParams.prototype.Double = function(x1, y1) { return this.$val.Double(x1, y1); }; - CurveParams.ptr.prototype.doubleJacobian = function(x, y, z) { - var {_r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, alpha, alpha2, beta, beta8, curve, delta, gamma, x, x3, y, y3, z, z3, $s, $r, $c} = $restore(this, {x, y, z}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = new big.Int.ptr(false, big.nat.nil).Mul(z, z); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - delta = _r; - _r$1 = delta.Mod(delta, curve.P); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = new big.Int.ptr(false, big.nat.nil).Mul(y, y); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - gamma = _r$2; - _r$3 = gamma.Mod(gamma, curve.P); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = new big.Int.ptr(false, big.nat.nil).Sub(x, delta); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - alpha = _r$4; - /* */ if (alpha.Sign() === -1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (alpha.Sign() === -1) { */ case 6: - _r$5 = alpha.Add(alpha, curve.P); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 7: - _r$6 = new big.Int.ptr(false, big.nat.nil).Add(x, delta); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - alpha2 = _r$6; - _r$7 = alpha.Mul(alpha, alpha2); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - alpha2.Set(alpha); - alpha.Lsh(alpha, 1); - _r$8 = alpha.Add(alpha, alpha2); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = alpha2.Mul(x, gamma); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - beta = _r$9; - _r$10 = new big.Int.ptr(false, big.nat.nil).Mul(alpha, alpha); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - x3 = _r$10; - beta8 = new big.Int.ptr(false, big.nat.nil).Lsh(beta, 3); - _r$11 = beta8.Mod(beta8, curve.P); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = x3.Sub(x3, beta8); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - /* */ if (x3.Sign() === -1) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (x3.Sign() === -1) { */ case 16: - _r$13 = x3.Add(x3, curve.P); /* */ $s = 18; case 18: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - /* } */ case 17: - _r$14 = x3.Mod(x3, curve.P); /* */ $s = 19; case 19: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = new big.Int.ptr(false, big.nat.nil).Add(y, z); /* */ $s = 20; case 20: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - z3 = _r$15; - _r$16 = z3.Mul(z3, z3); /* */ $s = 21; case 21: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = z3.Sub(z3, gamma); /* */ $s = 22; case 22: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - /* */ if (z3.Sign() === -1) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (z3.Sign() === -1) { */ case 23: - _r$18 = z3.Add(z3, curve.P); /* */ $s = 25; case 25: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - /* } */ case 24: - _r$19 = z3.Sub(z3, delta); /* */ $s = 26; case 26: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - /* */ if (z3.Sign() === -1) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (z3.Sign() === -1) { */ case 27: - _r$20 = z3.Add(z3, curve.P); /* */ $s = 29; case 29: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - /* } */ case 28: - _r$21 = z3.Mod(z3, curve.P); /* */ $s = 30; case 30: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - beta.Lsh(beta, 2); - _r$22 = beta.Sub(beta, x3); /* */ $s = 31; case 31: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$22; - /* */ if (beta.Sign() === -1) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (beta.Sign() === -1) { */ case 32: - _r$23 = beta.Add(beta, curve.P); /* */ $s = 34; case 34: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$23; - /* } */ case 33: - _r$24 = alpha.Mul(alpha, beta); /* */ $s = 35; case 35: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - y3 = _r$24; - _r$25 = gamma.Mul(gamma, gamma); /* */ $s = 36; case 36: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - gamma.Lsh(gamma, 3); - _r$26 = gamma.Mod(gamma, curve.P); /* */ $s = 37; case 37: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$26; - _r$27 = y3.Sub(y3, gamma); /* */ $s = 38; case 38: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$27; - /* */ if (y3.Sign() === -1) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (y3.Sign() === -1) { */ case 39: - _r$28 = y3.Add(y3, curve.P); /* */ $s = 41; case 41: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$28; - /* } */ case 40: - _r$29 = y3.Mod(y3, curve.P); /* */ $s = 42; case 42: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$29; - $s = -1; return [x3, y3, z3]; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.doubleJacobian, $c: true, $r, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, alpha, alpha2, beta, beta8, curve, delta, gamma, x, x3, y, y3, z, z3, $s};return $f; - }; - CurveParams.prototype.doubleJacobian = function(x, y, z) { return this.$val.doubleJacobian(x, y, z); }; - CurveParams.ptr.prototype.ScalarMult = function(Bx, By, k) { - var {$24r, $24r$1, Bx, By, Bz, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, bitNum, byte$1, curve, k, ok, specific, x, y, y$1, z, $s, $r, $c} = $restore(this, {Bx, By, k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = matchesSpecificCurve(curve, new sliceType$2([new p224.constructor.elem(p224), new p256.constructor.elem(p256), new p384.constructor.elem(p384), new p521.constructor.elem(p521)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - specific = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = specific.ScalarMult(Bx, By, k); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - Bz = new big.Int.ptr(false, big.nat.nil).SetInt64(new $Int64(0, 1)); - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - _tmp$2 = new big.Int.ptr(false, big.nat.nil); - x = _tmp; - y = _tmp$1; - z = _tmp$2; - _ref = k; - _i = 0; - /* while (true) { */ case 6: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 7; continue; } - byte$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - bitNum = 0; - /* while (true) { */ case 8: - /* if (!(bitNum < 8)) { break; } */ if(!(bitNum < 8)) { $s = 9; continue; } - _r$2 = curve.doubleJacobian(x, y, z); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - x = _tuple$1[0]; - y = _tuple$1[1]; - z = _tuple$1[2]; - /* */ if (((byte$1 & 128) >>> 0) === 128) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (((byte$1 & 128) >>> 0) === 128) { */ case 11: - _r$3 = curve.addJacobian(Bx, By, Bz, x, y, z); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - x = _tuple$2[0]; - y = _tuple$2[1]; - z = _tuple$2[2]; - /* } */ case 12: - byte$1 = (y$1 = (1), y$1 < 32 ? (byte$1 << y$1) : 0) << 24 >>> 24; - bitNum = bitNum + (1) >> 0; - $s = 8; continue; - case 9: - _i++; - $s = 6; continue; - case 7: - _r$4 = curve.affineFromJacobian(x, y, z); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 15; case 15: return $24r$1; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.ScalarMult, $c: true, $r, $24r, $24r$1, Bx, By, Bz, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, bitNum, byte$1, curve, k, ok, specific, x, y, y$1, z, $s};return $f; - }; - CurveParams.prototype.ScalarMult = function(Bx, By, k) { return this.$val.ScalarMult(Bx, By, k); }; - CurveParams.ptr.prototype.ScalarBaseMult = function(k) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, curve, k, ok, specific, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curve = this; - _r = matchesSpecificCurve(curve, new sliceType$2([new p224.constructor.elem(p224), new p256.constructor.elem(p256), new p384.constructor.elem(p384), new p521.constructor.elem(p521)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - specific = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = specific.ScalarBaseMult(k); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$2 = curve.ScalarMult(curve.Gx, curve.Gy, k); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: CurveParams.ptr.prototype.ScalarBaseMult, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, curve, k, ok, specific, $s};return $f; - }; - CurveParams.prototype.ScalarBaseMult = function(k) { return this.$val.ScalarBaseMult(k); }; - GenerateKey = function(curve, rand$1) { - var {N, _q, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, bitSize, byteLen, curve, err, priv, rand$1, x, x$1, y, $s, $r, $c} = $restore(this, {curve, rand$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - priv = sliceType.nil; - x = ptrType$1.nil; - y = ptrType$1.nil; - err = $ifaceNil; - _r = curve.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - N = _r.N; - bitSize = N.BitLen(); - byteLen = (_q = ((bitSize + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - priv = $makeSlice(sliceType, byteLen); - /* while (true) { */ case 2: - /* if (!(x === ptrType$1.nil)) { break; } */ if(!(x === ptrType$1.nil)) { $s = 3; continue; } - _r$1 = io.ReadFull(rand$1, priv); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [priv, x, y, err]; - } - (0 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 0] = (((0 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 0]) & ((x$1 = (_r$2 = bitSize % 8, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= mask.$length) ? ($throwRuntimeError("index out of range"), undefined) : mask.$array[mask.$offset + x$1])))) >>> 0)); - (1 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 1] = (((1 >= priv.$length ? ($throwRuntimeError("index out of range"), undefined) : priv.$array[priv.$offset + 1]) ^ (66)) << 24 >>> 24)); - if (new big.Int.ptr(false, big.nat.nil).SetBytes(priv).Cmp(N) >= 0) { - /* continue; */ $s = 2; continue; - } - _r$3 = curve.ScalarBaseMult(priv); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - x = _tuple$1[0]; - y = _tuple$1[1]; - $s = 2; continue; - case 3: - $s = -1; return [priv, x, y, err]; - /* */ } return; } var $f = {$blk: GenerateKey, $c: true, $r, N, _q, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, bitSize, byteLen, curve, err, priv, rand$1, x, x$1, y, $s};return $f; - }; - $pkg.GenerateKey = GenerateKey; - Marshal = function(curve, x, y) { - var {_q, _r, byteLen, curve, ret, x, y, $s, $r, $c} = $restore(this, {curve, x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = curve.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - byteLen = (_q = ((_r.BitSize + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - ret = $makeSlice(sliceType, (1 + ($imul(2, byteLen)) >> 0)); - (0 >= ret.$length ? ($throwRuntimeError("index out of range"), undefined) : ret.$array[ret.$offset + 0] = 4); - x.FillBytes($subslice(ret, 1, (1 + byteLen >> 0))); - y.FillBytes($subslice(ret, (1 + byteLen >> 0), (1 + ($imul(2, byteLen)) >> 0))); - $s = -1; return ret; - /* */ } return; } var $f = {$blk: Marshal, $c: true, $r, _q, _r, byteLen, curve, ret, x, y, $s};return $f; - }; - $pkg.Marshal = Marshal; - Unmarshal = function(curve, data) { - var {_q, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, byteLen, curve, data, p, x, y, $s, $r, $c} = $restore(this, {curve, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = ptrType$1.nil; - y = ptrType$1.nil; - _r = curve.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - byteLen = (_q = ((_r.BitSize + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (!((data.$length === (1 + ($imul(2, byteLen)) >> 0)))) { - _tmp = ptrType$1.nil; - _tmp$1 = ptrType$1.nil; - x = _tmp; - y = _tmp$1; - $s = -1; return [x, y]; - } - if (!(((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 4))) { - _tmp$2 = ptrType$1.nil; - _tmp$3 = ptrType$1.nil; - x = _tmp$2; - y = _tmp$3; - $s = -1; return [x, y]; - } - _r$1 = curve.Params(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - p = _r$1.P; - x = new big.Int.ptr(false, big.nat.nil).SetBytes($subslice(data, 1, (1 + byteLen >> 0))); - y = new big.Int.ptr(false, big.nat.nil).SetBytes($subslice(data, (1 + byteLen >> 0))); - if (x.Cmp(p) >= 0 || y.Cmp(p) >= 0) { - _tmp$4 = ptrType$1.nil; - _tmp$5 = ptrType$1.nil; - x = _tmp$4; - y = _tmp$5; - $s = -1; return [x, y]; - } - _r$2 = curve.IsOnCurve(x, y); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r$2) { */ case 3: - _tmp$6 = ptrType$1.nil; - _tmp$7 = ptrType$1.nil; - x = _tmp$6; - y = _tmp$7; - $s = -1; return [x, y]; - /* } */ case 4: - $s = -1; return [x, y]; - /* */ } return; } var $f = {$blk: Unmarshal, $c: true, $r, _q, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, byteLen, curve, data, p, x, y, $s};return $f; - }; - $pkg.Unmarshal = Unmarshal; - initAll = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = initP224(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = initP256(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = initP384(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = initP521(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: initAll, $c: true, $r, $s};return $f; - }; - P224 = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new p224.constructor.elem(p224); - /* */ } return; } var $f = {$blk: P224, $c: true, $r, $s};return $f; - }; - $pkg.P224 = P224; - P256 = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new p256.constructor.elem(p256); - /* */ } return; } var $f = {$blk: P256, $c: true, $r, $s};return $f; - }; - $pkg.P256 = P256; - P384 = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new p384.constructor.elem(p384); - /* */ } return; } var $f = {$blk: P384, $c: true, $r, $s};return $f; - }; - $pkg.P384 = P384; - P521 = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = initonce.Do(initAll); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new p521.constructor.elem(p521); - /* */ } return; } var $f = {$blk: P521, $c: true, $r, $s};return $f; - }; - $pkg.P521 = P521; - p521Curve.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}]; - p384Curve.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}]; - p256Curve.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}]; - p224Curve.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}]; - ptrType.methods = [{prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "polynomial", name: "polynomial", pkg: "crypto/elliptic", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "affineFromJacobian", name: "affineFromJacobian", pkg: "crypto/elliptic", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "addJacobian", name: "addJacobian", pkg: "crypto/elliptic", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "doubleJacobian", name: "doubleJacobian", pkg: "crypto/elliptic", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}]; - p521Curve.init("crypto/elliptic", [{prop: "params", name: "params", embedded: false, exported: false, typ: ptrType, tag: ""}]); - p384Curve.init("crypto/elliptic", [{prop: "params", name: "params", embedded: false, exported: false, typ: ptrType, tag: ""}]); - p256Curve.init("", [{prop: "CurveParams", name: "CurveParams", embedded: true, exported: true, typ: ptrType, tag: ""}]); - p224Curve.init("crypto/elliptic", [{prop: "params", name: "params", embedded: false, exported: false, typ: ptrType, tag: ""}]); - Curve.init([{prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1, ptrType$1], false)}, {prop: "IsOnCurve", name: "IsOnCurve", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [$Bool], false)}, {prop: "Params", name: "Params", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([sliceType], [ptrType$1, ptrType$1], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType$1, sliceType], [ptrType$1, ptrType$1], false)}]); - CurveParams.init("", [{prop: "P", name: "P", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "B", name: "B", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Gx", name: "Gx", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Gy", name: "Gy", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "BitSize", name: "BitSize", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = nistec.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p521 = new p521Curve.ptr(ptrType.nil); - p384 = new p384Curve.ptr(ptrType.nil); - p256 = new p256Curve.ptr(ptrType.nil); - p256Params = ptrType.nil; - p256RInverse = ptrType$1.nil; - p224 = new p224Curve.ptr(ptrType.nil); - initonce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - p256One = $toNativeArray($kindUint32, [2, 0, 0, 268433408, 536870911, 268435455, 532676607, 33554431, 0]); - p256Precomputed = $toNativeArray($kindUint32, [290596984, 242421057, 230031737, 78635775, 310917853, 212721032, 295599836, 222981803, 51514350, 489335829, 254096764, 434396381, 96936400, 429049253, 170095751, 22329889, 21696699, 11419619, 222406006, 153287761, 37001551, 101408979, 373655214, 216620824, 535072883, 66729676, 99339564, 188755759, 22835391, 358715996, 94529284, 229187216, 215751807, 513877062, 236641822, 248061730, 40859512, 90604670, 168553630, 37024851, 439480858, 226879324, 90992905, 170293760, 190300240, 10025815, 178796492, 101451666, 217734681, 102476702, 92922779, 10691781, 131522279, 43478603, 532943434, 176956491, 484992866, 215358590, 405915872, 123172065, 496412073, 138651209, 205172986, 115533781, 124205610, 395011560, 67124891, 438243778, 7870186, 258227729, 93078495, 255999938, 425934842, 143782578, 305931036, 74112396, 88539357, 94251799, 388871183, 138291069, 185456137, 265411090, 56389202, 435020300, 219799744, 159190848, 184638233, 71951349, 14748830, 54179201, 90859435, 91714381, 501071970, 207073549, 21607325, 40541819, 204857247, 75982029, 124632266, 212120422, 244515755, 443842791, 92184193, 504621904, 256273651, 116484896, 79311219, 202804275, 365646905, 111382033, 121002173, 187258447, 66509915, 5486974, 321045696, 106813439, 60941558, 350622890, 153379607, 466107082, 182025965, 221826634, 260222982, 54653047, 174775689, 76106445, 166814421, 260313327, 455502422, 14152227, 65063826, 238663282, 111317018, 110789974, 518080, 163043539, 3185280, 449863551, 204453341, 213898269, 164542008, 273777244, 228642651, 135456897, 116610665, 111505196, 502845828, 3430432, 343397495, 23354801, 199756881, 203603518, 238413402, 451639968, 204952341, 258456729, 134076345, 421511614, 6366045, 46236905, 29730873, 75111974, 192722006, 155066973, 351520493, 214702793, 402536435, 77105545, 445695234, 49487938, 169309851, 184388732, 135863406, 500019767, 23199936, 276509345, 107743451, 282094082, 261267, 90308643, 376580903, 109796441, 40959228, 262999756, 241033666, 246105707, 50090300, 67630940, 195735859, 158359529, 193509607, 120899987, 31588239, 420833648, 180162304, 273063591, 53033664, 215783594, 30950397, 236240872, 364806751, 9130514, 246676327, 136101161, 197537558, 45546695, 257576489, 324406118, 202074818, 85649040, 222421617, 255761364, 30870187, 16949106, 121510965, 250023868, 181935023, 166511770, 141325342, 266780208, 392647399, 2348054, 528735877, 41804168, 107966648, 404542751, 158035532, 412033845, 173930329, 396852918, 267062899, 357230868, 49540177, 58878809, 194113917, 29829449, 325238538, 237239775, 173413552, 1015183, 495713, 136567250, 136396601, 287878667, 218717445, 193315010, 32289519, 38657156, 238414081, 406919754, 257809469, 58222217, 86139112, 95303012, 88256781, 148453957, 429206180, 160877633, 273786665, 79574169, 86713258, 278868094, 116766395, 528802279, 125439226, 281337663, 39453418, 184844341, 238149222, 208587427, 42902325, 42491940, 326299680, 16080181, 367290444, 254451223, 441087273, 213368497, 187332769, 447880991, 104209615, 113842077, 185816615, 308787572, 71338925, 482342488, 238904593, 13096815, 30177897, 243196699, 89107279, 2855247, 450001456, 215177118, 206574156, 84781712, 11616114, 184986229, 118447302, 373941674, 139088658, 53019708, 68960273, 332604433, 184854584, 225840429, 387167538, 195693571, 138420907, 113046977, 49566585, 25878640, 415883550, 34327194, 107956587, 65991316, 108331218, 226451772, 2997227, 192155704, 235148095, 360879757, 199853559, 28097562, 443192223, 54415606, 224812756, 189496278, 509228953, 112408647, 402282239, 106887472, 2219082, 45315673, 72416791, 188054373, 234221484, 356088815, 164846207, 288014687, 103081518, 177253935, 276753618, 32938942, 125660110, 91493268, 331777276, 156289296, 119886379, 231179651, 68086459, 534655626, 198581654, 220775303, 166165897, 307563584, 123325309, 57143092, 182626656, 152800220, 154428073, 16017903, 187603695, 221030257, 89005890, 8038985, 103901883, 37829774, 88235001, 468532794, 254222964, 526283558, 104949015, 245526642, 164552359, 7239219, 130619730, 226520526, 149071841, 239214106, 68733409, 31180944, 456743990, 169722229, 499445619, 144011060, 239820018, 453851672, 51989046, 113402911, 239342156, 170872490, 176956858, 261258967, 103265812, 121052362, 195126932, 68664323, 130066403, 163798041, 292069893, 146190349, 283373001, 163683314, 92807721, 455819618, 173862682, 356737579, 163398462, 56942669, 122161042, 97105331, 243662629, 67694423, 404017060, 18986011, 220498447, 61887010, 60535146, 209032813, 168001811, 172627817, 18857068, 152560910, 250363304, 379416236, 17569433, 172056915, 259148050, 365781175, 78428889, 99599866, 253038295, 1190737, 285520906, 213382210, 263923967, 111956938, 425804492, 129961897, 9795153, 81850901, 248789496, 66350037, 95217711, 285808310, 7188600, 268270935, 254724780, 212364780, 366392026, 157674697, 479376578, 2045969, 481329397, 47757316, 433176877, 253803846, 26550183, 171333315, 86221861, 265094802, 222617032, 320802651, 184028746, 215612532, 161199640, 47944780, 174534800, 29495521, 395087139, 21447555, 280523837, 159753563, 48711545, 5726520, 156793127, 321990906, 199251222, 167040537, 196486512, 161400209, 227830014, 487028781, 264711691, 117551768, 409175611, 140072120, 303696950, 166199007, 258257961, 163174174, 350418392, 260410682, 155381416, 228964197, 116240383, 178067660, 208004282, 477396614, 240036117, 427939745, 137975385, 86955234, 142427063, 58372379, 433230542, 260916882, 415434047, 143015443, 79775424, 113112410, 82068861, 370483849, 180850370, 442090914, 33721239, 119287041, 43353375, 67400827, 142103949, 131242660, 332936223, 148565975, 329029421, 112716405, 222993886, 267477976, 136140247, 173797224, 192622808, 199703919, 178815297, 228027521, 132622796, 415151985, 225918141, 334829905, 164675959, 29661816]); - p256Zero31 = $toNativeArray($kindUint32, [2147483640, 1073741820, 2147483644, 1073750012, 2147483644, 1073741820, 2164260860, 939524092, 2147483644]); - mask = new sliceType([255, 1, 3, 7, 15, 31, 63, 127]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/internal/randutil"] = (function() { - var $pkg = {}, $init, io, sync, structType, arrayType, sliceType, closedChanOnce, closedChan, MaybeReadByte; - io = $packages["io"]; - sync = $packages["sync"]; - structType = $structType("", []); - arrayType = $arrayType($Uint8, 1); - sliceType = $sliceType($Uint8); - MaybeReadByte = function(r) { - var {_r, _r$1, _selection, buf, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = closedChanOnce.Do((function() { - closedChan = new $Chan(structType, 0); - $close(closedChan); - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = $select([[closedChan], [closedChan]]); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _selection = _r; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_selection[0] === 0) { */ case 3: - $s = -1; return; - /* } else if (_selection[0] === 1) { */ case 4: - buf = arrayType.zero(); - _r$1 = r.Read(new sliceType(buf)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: MaybeReadByte, $c: true, $r, _r, _r$1, _selection, buf, r, $s};return $f; - }; - $pkg.MaybeReadByte = MaybeReadByte; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = io.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - closedChanOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - closedChan = $chanNil; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/sha512"] = (function() { - var $pkg = {}, $init, crypto, binary, errors, hash, bits, digest, sliceType, arrayType, sliceType$1, arrayType$1, arrayType$2, arrayType$3, arrayType$4, ptrType$3, _K, block, blockGeneric, init, appendUint64, consumeUint64, New, New512_224, New512_256, New384, Sum512; - crypto = $packages["crypto"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - hash = $packages["hash"]; - bits = $packages["math/bits"]; - digest = $pkg.digest = $newType(0, $kindStruct, "sha512.digest", true, "crypto/sha512", false, function(h_, x_, nx_, len_, function$4_) { - this.$val = this; - if (arguments.length === 0) { - this.h = arrayType$2.zero(); - this.x = arrayType$3.zero(); - this.nx = 0; - this.len = new $Uint64(0, 0); - this.function$4 = 0; - return; - } - this.h = h_; - this.x = x_; - this.nx = nx_; - this.len = len_; - this.function$4 = function$4_; - }); - sliceType = $sliceType($Uint64); - arrayType = $arrayType($Uint64, 80); - sliceType$1 = $sliceType($Uint8); - arrayType$1 = $arrayType($Uint8, 8); - arrayType$2 = $arrayType($Uint64, 8); - arrayType$3 = $arrayType($Uint8, 128); - arrayType$4 = $arrayType($Uint8, 64); - ptrType$3 = $ptrType(digest); - block = function(dig, p) { - var dig, p; - blockGeneric(dig, p); - }; - blockGeneric = function(dig, p) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, b, c, d, dig, e, f, g, h, h0, h1, h2, h3, h4, h5, h6, h7, i, i$1, i$2, j, p, t1, t1$1, t2, t2$1, v1, v2, w, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$7, x$8, x$9; - w = arrayType.zero(); - _tmp = dig.h[0]; - _tmp$1 = dig.h[1]; - _tmp$2 = dig.h[2]; - _tmp$3 = dig.h[3]; - _tmp$4 = dig.h[4]; - _tmp$5 = dig.h[5]; - _tmp$6 = dig.h[6]; - _tmp$7 = dig.h[7]; - h0 = _tmp; - h1 = _tmp$1; - h2 = _tmp$2; - h3 = _tmp$3; - h4 = _tmp$4; - h5 = _tmp$5; - h6 = _tmp$6; - h7 = _tmp$7; - while (true) { - if (!(p.$length >= 128)) { break; } - i = 0; - while (true) { - if (!(i < 16)) { break; } - j = $imul(i, 8); - ((i < 0 || i >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i] = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = $shiftLeft64((new $Uint64(0, ((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]))), 56), x$7 = $shiftLeft64((new $Uint64(0, (x$8 = j + 1 >> 0, ((x$8 < 0 || x$8 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$8])))), 48), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (x$10 = j + 2 >> 0, ((x$10 < 0 || x$10 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$10])))), 40), new $Uint64(x$5.$high | x$9.$high, (x$5.$low | x$9.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (x$12 = j + 3 >> 0, ((x$12 < 0 || x$12 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$12])))), 32), new $Uint64(x$4.$high | x$11.$high, (x$4.$low | x$11.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (x$14 = j + 4 >> 0, ((x$14 < 0 || x$14 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$14])))), 24), new $Uint64(x$3.$high | x$13.$high, (x$3.$low | x$13.$low) >>> 0)), x$15 = $shiftLeft64((new $Uint64(0, (x$16 = j + 5 >> 0, ((x$16 < 0 || x$16 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$16])))), 16), new $Uint64(x$2.$high | x$15.$high, (x$2.$low | x$15.$low) >>> 0)), x$17 = $shiftLeft64((new $Uint64(0, (x$18 = j + 6 >> 0, ((x$18 < 0 || x$18 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$18])))), 8), new $Uint64(x$1.$high | x$17.$high, (x$1.$low | x$17.$low) >>> 0)), x$19 = (new $Uint64(0, (x$20 = j + 7 >> 0, ((x$20 < 0 || x$20 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$20])))), new $Uint64(x.$high | x$19.$high, (x.$low | x$19.$low) >>> 0))); - i = i + (1) >> 0; - } - i$1 = 16; - while (true) { - if (!(i$1 < 80)) { break; } - v1 = (x$21 = i$1 - 2 >> 0, ((x$21 < 0 || x$21 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$21])); - t1 = (x$22 = (x$23 = bits.RotateLeft64(v1, -19), x$24 = bits.RotateLeft64(v1, -61), new $Uint64(x$23.$high ^ x$24.$high, (x$23.$low ^ x$24.$low) >>> 0)), x$25 = $shiftRightUint64(v1, 6), new $Uint64(x$22.$high ^ x$25.$high, (x$22.$low ^ x$25.$low) >>> 0)); - v2 = (x$26 = i$1 - 15 >> 0, ((x$26 < 0 || x$26 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$26])); - t2 = (x$27 = (x$28 = bits.RotateLeft64(v2, -1), x$29 = bits.RotateLeft64(v2, -8), new $Uint64(x$28.$high ^ x$29.$high, (x$28.$low ^ x$29.$low) >>> 0)), x$30 = $shiftRightUint64(v2, 7), new $Uint64(x$27.$high ^ x$30.$high, (x$27.$low ^ x$30.$low) >>> 0)); - ((i$1 < 0 || i$1 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$1] = (x$31 = (x$32 = (x$33 = (x$34 = i$1 - 7 >> 0, ((x$34 < 0 || x$34 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$34])), new $Uint64(t1.$high + x$33.$high, t1.$low + x$33.$low)), new $Uint64(x$32.$high + t2.$high, x$32.$low + t2.$low)), x$35 = (x$36 = i$1 - 16 >> 0, ((x$36 < 0 || x$36 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$36])), new $Uint64(x$31.$high + x$35.$high, x$31.$low + x$35.$low))); - i$1 = i$1 + (1) >> 0; - } - _tmp$8 = h0; - _tmp$9 = h1; - _tmp$10 = h2; - _tmp$11 = h3; - _tmp$12 = h4; - _tmp$13 = h5; - _tmp$14 = h6; - _tmp$15 = h7; - a = _tmp$8; - b = _tmp$9; - c = _tmp$10; - d = _tmp$11; - e = _tmp$12; - f = _tmp$13; - g = _tmp$14; - h = _tmp$15; - i$2 = 0; - while (true) { - if (!(i$2 < 80)) { break; } - t1$1 = (x$37 = (x$38 = (x$39 = (x$40 = (x$41 = (x$42 = bits.RotateLeft64(e, -14), x$43 = bits.RotateLeft64(e, -18), new $Uint64(x$42.$high ^ x$43.$high, (x$42.$low ^ x$43.$low) >>> 0)), x$44 = bits.RotateLeft64(e, -41), new $Uint64(x$41.$high ^ x$44.$high, (x$41.$low ^ x$44.$low) >>> 0)), new $Uint64(h.$high + x$40.$high, h.$low + x$40.$low)), x$45 = (x$46 = new $Uint64(e.$high & f.$high, (e.$low & f.$low) >>> 0), x$47 = (x$48 = new $Uint64(~e.$high, ~e.$low >>> 0), new $Uint64(x$48.$high & g.$high, (x$48.$low & g.$low) >>> 0)), new $Uint64(x$46.$high ^ x$47.$high, (x$46.$low ^ x$47.$low) >>> 0)), new $Uint64(x$39.$high + x$45.$high, x$39.$low + x$45.$low)), x$49 = ((i$2 < 0 || i$2 >= _K.$length) ? ($throwRuntimeError("index out of range"), undefined) : _K.$array[_K.$offset + i$2]), new $Uint64(x$38.$high + x$49.$high, x$38.$low + x$49.$low)), x$50 = ((i$2 < 0 || i$2 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$2]), new $Uint64(x$37.$high + x$50.$high, x$37.$low + x$50.$low)); - t2$1 = (x$51 = (x$52 = (x$53 = bits.RotateLeft64(a, -28), x$54 = bits.RotateLeft64(a, -34), new $Uint64(x$53.$high ^ x$54.$high, (x$53.$low ^ x$54.$low) >>> 0)), x$55 = bits.RotateLeft64(a, -39), new $Uint64(x$52.$high ^ x$55.$high, (x$52.$low ^ x$55.$low) >>> 0)), x$56 = (x$57 = (x$58 = new $Uint64(a.$high & b.$high, (a.$low & b.$low) >>> 0), x$59 = new $Uint64(a.$high & c.$high, (a.$low & c.$low) >>> 0), new $Uint64(x$58.$high ^ x$59.$high, (x$58.$low ^ x$59.$low) >>> 0)), x$60 = new $Uint64(b.$high & c.$high, (b.$low & c.$low) >>> 0), new $Uint64(x$57.$high ^ x$60.$high, (x$57.$low ^ x$60.$low) >>> 0)), new $Uint64(x$51.$high + x$56.$high, x$51.$low + x$56.$low)); - h = g; - g = f; - f = e; - e = new $Uint64(d.$high + t1$1.$high, d.$low + t1$1.$low); - d = c; - c = b; - b = a; - a = new $Uint64(t1$1.$high + t2$1.$high, t1$1.$low + t2$1.$low); - i$2 = i$2 + (1) >> 0; - } - h0 = (x$61 = a, new $Uint64(h0.$high + x$61.$high, h0.$low + x$61.$low)); - h1 = (x$62 = b, new $Uint64(h1.$high + x$62.$high, h1.$low + x$62.$low)); - h2 = (x$63 = c, new $Uint64(h2.$high + x$63.$high, h2.$low + x$63.$low)); - h3 = (x$64 = d, new $Uint64(h3.$high + x$64.$high, h3.$low + x$64.$low)); - h4 = (x$65 = e, new $Uint64(h4.$high + x$65.$high, h4.$low + x$65.$low)); - h5 = (x$66 = f, new $Uint64(h5.$high + x$66.$high, h5.$low + x$66.$low)); - h6 = (x$67 = g, new $Uint64(h6.$high + x$67.$high, h6.$low + x$67.$low)); - h7 = (x$68 = h, new $Uint64(h7.$high + x$68.$high, h7.$low + x$68.$low)); - p = $subslice(p, 128); - } - _tmp$16 = h0; - _tmp$17 = h1; - _tmp$18 = h2; - _tmp$19 = h3; - _tmp$20 = h4; - _tmp$21 = h5; - _tmp$22 = h6; - _tmp$23 = h7; - dig.h[0] = _tmp$16; - dig.h[1] = _tmp$17; - dig.h[2] = _tmp$18; - dig.h[3] = _tmp$19; - dig.h[4] = _tmp$20; - dig.h[5] = _tmp$21; - dig.h[6] = _tmp$22; - dig.h[7] = _tmp$23; - }; - init = function() { - crypto.RegisterHash(6, New384); - crypto.RegisterHash(7, New); - crypto.RegisterHash(14, New512_224); - crypto.RegisterHash(15, New512_256); - }; - digest.ptr.prototype.Reset = function() { - var _1, d; - d = this; - _1 = d.function$4; - if (_1 === (6)) { - d.h[0] = new $Uint64(3418070365, 3238371032); - d.h[1] = new $Uint64(1654270250, 914150663); - d.h[2] = new $Uint64(2438529370, 812702999); - d.h[3] = new $Uint64(355462360, 4144912697); - d.h[4] = new $Uint64(1731405415, 4290775857); - d.h[5] = new $Uint64(2394180231, 1750603025); - d.h[6] = new $Uint64(3675008525, 1694076839); - d.h[7] = new $Uint64(1203062813, 3204075428); - } else if (_1 === (14)) { - d.h[0] = new $Uint64(2352822216, 424955298); - d.h[1] = new $Uint64(1944164710, 2312950998); - d.h[2] = new $Uint64(502970286, 855612546); - d.h[3] = new $Uint64(1738396948, 1479516111); - d.h[4] = new $Uint64(258812777, 2077511080); - d.h[5] = new $Uint64(2011393907, 79989058); - d.h[6] = new $Uint64(1067287976, 1780299464); - d.h[7] = new $Uint64(286451373, 2446758561); - } else if (_1 === (15)) { - d.h[0] = new $Uint64(573645204, 4230739756); - d.h[1] = new $Uint64(2673172387, 3360449730); - d.h[2] = new $Uint64(596883563, 1867755857); - d.h[3] = new $Uint64(2520282905, 1497426621); - d.h[4] = new $Uint64(2519219938, 2827943907); - d.h[5] = new $Uint64(3193839141, 1401305490); - d.h[6] = new $Uint64(721525244, 746961066); - d.h[7] = new $Uint64(246885852, 2177182882); - } else { - d.h[0] = new $Uint64(1779033703, 4089235720); - d.h[1] = new $Uint64(3144134277, 2227873595); - d.h[2] = new $Uint64(1013904242, 4271175723); - d.h[3] = new $Uint64(2773480762, 1595750129); - d.h[4] = new $Uint64(1359893119, 2917565137); - d.h[5] = new $Uint64(2600822924, 725511199); - d.h[6] = new $Uint64(528734635, 4215389547); - d.h[7] = new $Uint64(1541459225, 327033209); - } - d.nx = 0; - d.len = new $Uint64(0, 0); - }; - digest.prototype.Reset = function() { return this.$val.Reset(); }; - digest.ptr.prototype.MarshalBinary = function() { - var _1, b, d; - d = this; - b = $makeSlice(sliceType$1, 0, 204); - _1 = d.function$4; - if (_1 === (6)) { - b = $appendSlice(b, "sha\x04"); - } else if (_1 === (14)) { - b = $appendSlice(b, "sha\x05"); - } else if (_1 === (15)) { - b = $appendSlice(b, "sha\x06"); - } else if (_1 === (7)) { - b = $appendSlice(b, "sha\x07"); - } else { - return [sliceType$1.nil, errors.New("crypto/sha512: invalid hash function")]; - } - b = appendUint64(b, d.h[0]); - b = appendUint64(b, d.h[1]); - b = appendUint64(b, d.h[2]); - b = appendUint64(b, d.h[3]); - b = appendUint64(b, d.h[4]); - b = appendUint64(b, d.h[5]); - b = appendUint64(b, d.h[6]); - b = appendUint64(b, d.h[7]); - b = $appendSlice(b, $subslice(new sliceType$1(d.x), 0, d.nx)); - b = $subslice(b, 0, ((b.$length + 128 >> 0) - (d.nx) >> 0)); - b = appendUint64(b, d.len); - return [b, $ifaceNil]; - }; - digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - digest.ptr.prototype.UnmarshalBinary = function(b) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, b, d; - d = this; - if (b.$length < 4) { - return errors.New("crypto/sha512: invalid hash state identifier"); - } - if ((d.function$4 === 6) && ($bytesToString($subslice(b, 0, 4))) === "sha\x04") { - } else if ((d.function$4 === 14) && ($bytesToString($subslice(b, 0, 4))) === "sha\x05") { - } else if ((d.function$4 === 15) && ($bytesToString($subslice(b, 0, 4))) === "sha\x06") { - } else if ((d.function$4 === 7) && ($bytesToString($subslice(b, 0, 4))) === "sha\x07") { - } else { - return errors.New("crypto/sha512: invalid hash state identifier"); - } - if (!((b.$length === 204))) { - return errors.New("crypto/sha512: invalid hash state size"); - } - b = $subslice(b, 4); - _tuple = consumeUint64(b); - b = _tuple[0]; - d.h[0] = _tuple[1]; - _tuple$1 = consumeUint64(b); - b = _tuple$1[0]; - d.h[1] = _tuple$1[1]; - _tuple$2 = consumeUint64(b); - b = _tuple$2[0]; - d.h[2] = _tuple$2[1]; - _tuple$3 = consumeUint64(b); - b = _tuple$3[0]; - d.h[3] = _tuple$3[1]; - _tuple$4 = consumeUint64(b); - b = _tuple$4[0]; - d.h[4] = _tuple$4[1]; - _tuple$5 = consumeUint64(b); - b = _tuple$5[0]; - d.h[5] = _tuple$5[1]; - _tuple$6 = consumeUint64(b); - b = _tuple$6[0]; - d.h[6] = _tuple$6[1]; - _tuple$7 = consumeUint64(b); - b = _tuple$7[0]; - d.h[7] = _tuple$7[1]; - b = $subslice(b, $copySlice(new sliceType$1(d.x), b)); - _tuple$8 = consumeUint64(b); - b = _tuple$8[0]; - d.len = _tuple$8[1]; - d.nx = (($div64(d.len, new $Uint64(0, 128), true).$low >> 0)); - return $ifaceNil; - }; - digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - appendUint64 = function(b, x) { - var a, b, x; - a = arrayType$1.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(new sliceType$1(a), x); - return $appendSlice(b, new sliceType$1(a)); - }; - consumeUint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - return [$subslice(b, 8), x$14]; - }; - New = function() { - var d; - d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), 7); - d.Reset(); - return d; - }; - $pkg.New = New; - New512_224 = function() { - var d; - d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), 14); - d.Reset(); - return d; - }; - $pkg.New512_224 = New512_224; - New512_256 = function() { - var d; - d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), 15); - d.Reset(); - return d; - }; - $pkg.New512_256 = New512_256; - New384 = function() { - var d; - d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), 6); - d.Reset(); - return d; - }; - $pkg.New384 = New384; - digest.ptr.prototype.Size = function() { - var _1, d; - d = this; - _1 = d.function$4; - if (_1 === (14)) { - return 28; - } else if (_1 === (15)) { - return 32; - } else if (_1 === (6)) { - return 48; - } else { - return 64; - } - }; - digest.prototype.Size = function() { return this.$val.Size(); }; - digest.ptr.prototype.BlockSize = function() { - var d; - d = this; - return 128; - }; - digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - digest.ptr.prototype.Write = function(p) { - var d, err, n, n$1, nn, p, x, x$1; - nn = 0; - err = $ifaceNil; - d = this; - nn = p.$length; - d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - if (d.nx > 0) { - n = $copySlice($subslice(new sliceType$1(d.x), d.nx), p); - d.nx = d.nx + (n) >> 0; - if (d.nx === 128) { - block(d, new sliceType$1(d.x)); - d.nx = 0; - } - p = $subslice(p, n); - } - if (p.$length >= 128) { - n$1 = (p.$length & ~127) >> 0; - block(d, $subslice(p, 0, n$1)); - p = $subslice(p, n$1); - } - if (p.$length > 0) { - d.nx = $copySlice(new sliceType$1(d.x), p); - } - return [nn, err]; - }; - digest.prototype.Write = function(p) { return this.$val.Write(p); }; - digest.ptr.prototype.Sum = function(in$1) { - var _1, d, d0, hash$1, in$1; - d = this; - d0 = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), 0); - digest.copy(d0, d); - hash$1 = $clone(d0.checkSum(), arrayType$4); - _1 = d0.function$4; - if (_1 === (6)) { - return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 48)); - } else if (_1 === (14)) { - return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 28)); - } else if (_1 === (15)) { - return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 32)); - } else { - return $appendSlice(in$1, new sliceType$1(hash$1)); - } - }; - digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; - digest.ptr.prototype.checkSum = function() { - var d, digest$1, len, tmp, x, x$1, x$2; - d = this; - len = d.len; - tmp = arrayType$3.zero(); - tmp[0] = 128; - if ((x = $div64(len, new $Uint64(0, 128), true), (x.$high < 0 || (x.$high === 0 && x.$low < 112)))) { - d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 128), true), new $Uint64(0 - x$1.$high, 112 - x$1.$low))))); - } else { - d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 128), true), new $Uint64(0 - x$2.$high, 240 - x$2.$low))))); - } - len = $shiftLeft64(len, (3)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(tmp), 0), new $Uint64(0, 0)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(tmp), 8), len); - d.Write($subslice(new sliceType$1(tmp), 0, 16)); - if (!((d.nx === 0))) { - $panic(new $String("d.nx != 0")); - } - digest$1 = arrayType$4.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 0), d.h[0]); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 8), d.h[1]); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 16), d.h[2]); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 24), d.h[3]); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 32), d.h[4]); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 40), d.h[5]); - if (!((d.function$4 === 6))) { - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 48), d.h[6]); - $clone(binary.BigEndian, binary.bigEndian).PutUint64($subslice(new sliceType$1(digest$1), 56), d.h[7]); - } - return digest$1; - }; - digest.prototype.checkSum = function() { return this.$val.checkSum(); }; - Sum512 = function(data) { - var d, data; - d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0), 7); - d.Reset(); - d.Write(data); - return d.checkSum(); - }; - $pkg.Sum512 = Sum512; - ptrType$3.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/sha512", typ: $funcType([], [arrayType$4], false)}]; - digest.init("crypto/sha512", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "function$4", name: "function", embedded: false, exported: false, typ: crypto.Hash, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _K = new sliceType([new $Uint64(1116352408, 3609767458), new $Uint64(1899447441, 602891725), new $Uint64(3049323471, 3964484399), new $Uint64(3921009573, 2173295548), new $Uint64(961987163, 4081628472), new $Uint64(1508970993, 3053834265), new $Uint64(2453635748, 2937671579), new $Uint64(2870763221, 3664609560), new $Uint64(3624381080, 2734883394), new $Uint64(310598401, 1164996542), new $Uint64(607225278, 1323610764), new $Uint64(1426881987, 3590304994), new $Uint64(1925078388, 4068182383), new $Uint64(2162078206, 991336113), new $Uint64(2614888103, 633803317), new $Uint64(3248222580, 3479774868), new $Uint64(3835390401, 2666613458), new $Uint64(4022224774, 944711139), new $Uint64(264347078, 2341262773), new $Uint64(604807628, 2007800933), new $Uint64(770255983, 1495990901), new $Uint64(1249150122, 1856431235), new $Uint64(1555081692, 3175218132), new $Uint64(1996064986, 2198950837), new $Uint64(2554220882, 3999719339), new $Uint64(2821834349, 766784016), new $Uint64(2952996808, 2566594879), new $Uint64(3210313671, 3203337956), new $Uint64(3336571891, 1034457026), new $Uint64(3584528711, 2466948901), new $Uint64(113926993, 3758326383), new $Uint64(338241895, 168717936), new $Uint64(666307205, 1188179964), new $Uint64(773529912, 1546045734), new $Uint64(1294757372, 1522805485), new $Uint64(1396182291, 2643833823), new $Uint64(1695183700, 2343527390), new $Uint64(1986661051, 1014477480), new $Uint64(2177026350, 1206759142), new $Uint64(2456956037, 344077627), new $Uint64(2730485921, 1290863460), new $Uint64(2820302411, 3158454273), new $Uint64(3259730800, 3505952657), new $Uint64(3345764771, 106217008), new $Uint64(3516065817, 3606008344), new $Uint64(3600352804, 1432725776), new $Uint64(4094571909, 1467031594), new $Uint64(275423344, 851169720), new $Uint64(430227734, 3100823752), new $Uint64(506948616, 1363258195), new $Uint64(659060556, 3750685593), new $Uint64(883997877, 3785050280), new $Uint64(958139571, 3318307427), new $Uint64(1322822218, 3812723403), new $Uint64(1537002063, 2003034995), new $Uint64(1747873779, 3602036899), new $Uint64(1955562222, 1575990012), new $Uint64(2024104815, 1125592928), new $Uint64(2227730452, 2716904306), new $Uint64(2361852424, 442776044), new $Uint64(2428436474, 593698344), new $Uint64(2756734187, 3733110249), new $Uint64(3204031479, 2999351573), new $Uint64(3329325298, 3815920427), new $Uint64(3391569614, 3928383900), new $Uint64(3515267271, 566280711), new $Uint64(3940187606, 3454069534), new $Uint64(4118630271, 4000239992), new $Uint64(116418474, 1914138554), new $Uint64(174292421, 2731055270), new $Uint64(289380356, 3203993006), new $Uint64(460393269, 320620315), new $Uint64(685471733, 587496836), new $Uint64(852142971, 1086792851), new $Uint64(1017036298, 365543100), new $Uint64(1126000580, 2618297676), new $Uint64(1288033470, 3409855158), new $Uint64(1501505948, 4234509866), new $Uint64(1607167915, 987167468), new $Uint64(1816402316, 1246189591)]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/asn1"] = (function() { - var $pkg = {}, $init, bytes, errors, fmt, math, big, reflect, sort, strconv, strings, time, utf16, utf8, encoder, byteEncoder, bytesEncoder, stringEncoder, multiEncoder, setEncoder, taggedEncoder, int64Encoder, bitStringEncoder, oidEncoder, tagAndLength, fieldParameters, StructuralError, SyntaxError, BitString, ObjectIdentifier, Enumerated, Flag, RawValue, RawContent, invalidUnmarshalError, sliceType, ptrType, sliceType$1, ptrType$1, sliceType$2, arrayType, sliceType$3, ptrType$2, ptrType$3, sliceType$4, arrayType$1, sliceType$5, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, byte00Encoder, byteFFEncoder, bigOne, bitStringType, objectIdentifierType, enumeratedType, flagType, timeType, rawValueType, rawContentsType, bigIntType, x, x$1, x$2, base128IntLength, appendBase128Int, makeBigInt, appendLength, lengthLength, appendTagAndLength, makeObjectIdentifier, makePrintableString, makeIA5String, makeNumericString, makeUTF8String, appendTwoDigits, appendFourDigits, outsideUTCRange, makeUTCTime, makeGeneralizedTime, appendUTCTime, appendGeneralizedTime, appendTimeCommon, stripTagAndLength, makeBody, makeField, Marshal, MarshalWithParams, parseFieldParameters, getUniversalType, parseBool, checkInteger, parseInt64, parseInt32, parseBigInt, parseBitString, parseObjectIdentifier, parseBase128Int, parseUTCTime, parseGeneralizedTime, parseNumericString, isNumeric, parsePrintableString, isPrintable, parseIA5String, parseT61String, parseUTF8String, parseBMPString, parseTagAndLength, parseSequenceOf, invalidLength, parseField, canHaveDefaultValue, setDefaultValue, Unmarshal, UnmarshalWithParams; - bytes = $packages["bytes"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - math = $packages["math"]; - big = $packages["math/big"]; - reflect = $packages["reflect"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - time = $packages["time"]; - utf16 = $packages["unicode/utf16"]; - utf8 = $packages["unicode/utf8"]; - encoder = $pkg.encoder = $newType(8, $kindInterface, "asn1.encoder", true, "encoding/asn1", false, null); - byteEncoder = $pkg.byteEncoder = $newType(1, $kindUint8, "asn1.byteEncoder", true, "encoding/asn1", false, null); - bytesEncoder = $pkg.bytesEncoder = $newType(12, $kindSlice, "asn1.bytesEncoder", true, "encoding/asn1", false, null); - stringEncoder = $pkg.stringEncoder = $newType(8, $kindString, "asn1.stringEncoder", true, "encoding/asn1", false, null); - multiEncoder = $pkg.multiEncoder = $newType(12, $kindSlice, "asn1.multiEncoder", true, "encoding/asn1", false, null); - setEncoder = $pkg.setEncoder = $newType(12, $kindSlice, "asn1.setEncoder", true, "encoding/asn1", false, null); - taggedEncoder = $pkg.taggedEncoder = $newType(0, $kindStruct, "asn1.taggedEncoder", true, "encoding/asn1", false, function(scratch_, tag_, body_) { - this.$val = this; - if (arguments.length === 0) { - this.scratch = arrayType$1.zero(); - this.tag = $ifaceNil; - this.body = $ifaceNil; - return; - } - this.scratch = scratch_; - this.tag = tag_; - this.body = body_; - }); - int64Encoder = $pkg.int64Encoder = $newType(8, $kindInt64, "asn1.int64Encoder", true, "encoding/asn1", false, null); - bitStringEncoder = $pkg.bitStringEncoder = $newType(0, $kindStruct, "asn1.bitStringEncoder", true, "encoding/asn1", false, function(Bytes_, BitLength_) { - this.$val = this; - if (arguments.length === 0) { - this.Bytes = sliceType.nil; - this.BitLength = 0; - return; - } - this.Bytes = Bytes_; - this.BitLength = BitLength_; - }); - oidEncoder = $pkg.oidEncoder = $newType(12, $kindSlice, "asn1.oidEncoder", true, "encoding/asn1", false, null); - tagAndLength = $pkg.tagAndLength = $newType(0, $kindStruct, "asn1.tagAndLength", true, "encoding/asn1", false, function(class$0_, tag_, length_, isCompound_) { - this.$val = this; - if (arguments.length === 0) { - this.class$0 = 0; - this.tag = 0; - this.length = 0; - this.isCompound = false; - return; - } - this.class$0 = class$0_; - this.tag = tag_; - this.length = length_; - this.isCompound = isCompound_; - }); - fieldParameters = $pkg.fieldParameters = $newType(0, $kindStruct, "asn1.fieldParameters", true, "encoding/asn1", false, function(optional_, explicit_, application_, private$3_, defaultValue_, tag_, stringType_, timeType_, set_, omitEmpty_) { - this.$val = this; - if (arguments.length === 0) { - this.optional = false; - this.explicit = false; - this.application = false; - this.private$3 = false; - this.defaultValue = ptrType$2.nil; - this.tag = ptrType$3.nil; - this.stringType = 0; - this.timeType = 0; - this.set = false; - this.omitEmpty = false; - return; - } - this.optional = optional_; - this.explicit = explicit_; - this.application = application_; - this.private$3 = private$3_; - this.defaultValue = defaultValue_; - this.tag = tag_; - this.stringType = stringType_; - this.timeType = timeType_; - this.set = set_; - this.omitEmpty = omitEmpty_; - }); - StructuralError = $pkg.StructuralError = $newType(0, $kindStruct, "asn1.StructuralError", true, "encoding/asn1", true, function(Msg_) { - this.$val = this; - if (arguments.length === 0) { - this.Msg = ""; - return; - } - this.Msg = Msg_; - }); - SyntaxError = $pkg.SyntaxError = $newType(0, $kindStruct, "asn1.SyntaxError", true, "encoding/asn1", true, function(Msg_) { - this.$val = this; - if (arguments.length === 0) { - this.Msg = ""; - return; - } - this.Msg = Msg_; - }); - BitString = $pkg.BitString = $newType(0, $kindStruct, "asn1.BitString", true, "encoding/asn1", true, function(Bytes_, BitLength_) { - this.$val = this; - if (arguments.length === 0) { - this.Bytes = sliceType.nil; - this.BitLength = 0; - return; - } - this.Bytes = Bytes_; - this.BitLength = BitLength_; - }); - ObjectIdentifier = $pkg.ObjectIdentifier = $newType(12, $kindSlice, "asn1.ObjectIdentifier", true, "encoding/asn1", true, null); - Enumerated = $pkg.Enumerated = $newType(4, $kindInt, "asn1.Enumerated", true, "encoding/asn1", true, null); - Flag = $pkg.Flag = $newType(1, $kindBool, "asn1.Flag", true, "encoding/asn1", true, null); - RawValue = $pkg.RawValue = $newType(0, $kindStruct, "asn1.RawValue", true, "encoding/asn1", true, function(Class_, Tag_, IsCompound_, Bytes_, FullBytes_) { - this.$val = this; - if (arguments.length === 0) { - this.Class = 0; - this.Tag = 0; - this.IsCompound = false; - this.Bytes = sliceType.nil; - this.FullBytes = sliceType.nil; - return; - } - this.Class = Class_; - this.Tag = Tag_; - this.IsCompound = IsCompound_; - this.Bytes = Bytes_; - this.FullBytes = FullBytes_; - }); - RawContent = $pkg.RawContent = $newType(12, $kindSlice, "asn1.RawContent", true, "encoding/asn1", true, null); - invalidUnmarshalError = $pkg.invalidUnmarshalError = $newType(0, $kindStruct, "asn1.invalidUnmarshalError", true, "encoding/asn1", false, function(Type_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = $ifaceNil; - return; - } - this.Type = Type_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(time.Location); - sliceType$1 = $sliceType(sliceType); - ptrType$1 = $ptrType(big.Int); - sliceType$2 = $sliceType(encoder); - arrayType = $arrayType($Uint8, 4); - sliceType$3 = $sliceType($Int); - ptrType$2 = $ptrType($Int64); - ptrType$3 = $ptrType($Int); - sliceType$4 = $sliceType($emptyInterface); - arrayType$1 = $arrayType($Uint8, 8); - sliceType$5 = $sliceType($Uint16); - ptrType$4 = $ptrType(reflect.rtype); - ptrType$5 = $ptrType(RawValue); - ptrType$6 = $ptrType(ObjectIdentifier); - ptrType$7 = $ptrType(BitString); - ptrType$8 = $ptrType(time.Time); - ptrType$9 = $ptrType(Enumerated); - ptrType$10 = $ptrType(Flag); - ptrType$11 = $ptrType(ptrType$1); - ptrType$12 = $ptrType(taggedEncoder); - ptrType$13 = $ptrType(invalidUnmarshalError); - byteEncoder.prototype.Len = function() { - var c; - c = this.$val; - return 1; - }; - $ptrType(byteEncoder).prototype.Len = function() { return new byteEncoder(this.$get()).Len(); }; - byteEncoder.prototype.Encode = function(dst) { - var c, dst; - c = this.$val; - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = ((c << 24 >>> 24))); - }; - $ptrType(byteEncoder).prototype.Encode = function(dst) { return new byteEncoder(this.$get()).Encode(dst); }; - bytesEncoder.prototype.Len = function() { - var b; - b = this; - return b.$length; - }; - $ptrType(bytesEncoder).prototype.Len = function() { return this.$get().Len(); }; - bytesEncoder.prototype.Encode = function(dst) { - var b, dst; - b = this; - if (!(($copySlice(dst, b) === b.$length))) { - $panic(new $String("internal error")); - } - }; - $ptrType(bytesEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; - stringEncoder.prototype.Len = function() { - var s; - s = this.$val; - return s.length; - }; - $ptrType(stringEncoder).prototype.Len = function() { return new stringEncoder(this.$get()).Len(); }; - stringEncoder.prototype.Encode = function(dst) { - var dst, s; - s = this.$val; - if (!(($copyString(dst, s) === s.length))) { - $panic(new $String("internal error")); - } - }; - $ptrType(stringEncoder).prototype.Encode = function(dst) { return new stringEncoder(this.$get()).Encode(dst); }; - multiEncoder.prototype.Len = function() { - var {_i, _r, _ref, e, m, size, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - size = 0; - _ref = m; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = e.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - size = size + (_r) >> 0; - _i++; - $s = 1; continue; - case 2: - $s = -1; return size; - /* */ } return; } var $f = {$blk: multiEncoder.prototype.Len, $c: true, $r, _i, _r, _ref, e, m, size, $s};return $f; - }; - $ptrType(multiEncoder).prototype.Len = function() { return this.$get().Len(); }; - multiEncoder.prototype.Encode = function(dst) { - var {_i, _r, _ref, dst, e, m, off, $s, $r, $c} = $restore(this, {dst}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - off = 0; - _ref = m; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = e.Encode($subslice(dst, off)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = e.Len(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - off = off + (_r) >> 0; - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: multiEncoder.prototype.Encode, $c: true, $r, _i, _r, _ref, dst, e, m, off, $s};return $f; - }; - $ptrType(multiEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; - setEncoder.prototype.Len = function() { - var {_i, _r, _ref, e, s, size, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - size = 0; - _ref = s; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = e.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - size = size + (_r) >> 0; - _i++; - $s = 1; continue; - case 2: - $s = -1; return size; - /* */ } return; } var $f = {$blk: setEncoder.prototype.Len, $c: true, $r, _i, _r, _ref, e, s, size, $s};return $f; - }; - $ptrType(setEncoder).prototype.Len = function() { return this.$get().Len(); }; - setEncoder.prototype.Encode = function(dst) { - var {_i, _i$1, _r, _ref, _ref$1, b, dst, e, i, l, off, s, $s, $r, $c} = $restore(this, {dst}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = [l]; - s = this; - l[0] = $makeSlice(sliceType$1, s.$length); - _ref = s; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = e.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ((i < 0 || i >= l[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : l[0].$array[l[0].$offset + i] = $makeSlice(sliceType, _r)); - $r = e.Encode(((i < 0 || i >= l[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : l[0].$array[l[0].$offset + i])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $r = sort.Slice(l[0], (function(l) { return function(i$1, j) { - var i$1, j; - return bytes.Compare(((i$1 < 0 || i$1 >= l[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : l[0].$array[l[0].$offset + i$1]), ((j < 0 || j >= l[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : l[0].$array[l[0].$offset + j])) < 0; - }; })(l)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - off = 0; - _ref$1 = l[0]; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - b = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $copySlice($subslice(dst, off), b); - off = off + (b.$length) >> 0; - _i$1++; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: setEncoder.prototype.Encode, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, b, dst, e, i, l, off, s, $s};return $f; - }; - $ptrType(setEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; - taggedEncoder.ptr.prototype.Len = function() { - var {$24r, _r, _r$1, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r = t.tag.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = t.body.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r + _r$1 >> 0; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: taggedEncoder.ptr.prototype.Len, $c: true, $r, $24r, _r, _r$1, t, $s};return $f; - }; - taggedEncoder.prototype.Len = function() { return this.$val.Len(); }; - taggedEncoder.ptr.prototype.Encode = function(dst) { - var {_r, dst, t, $s, $r, $c} = $restore(this, {dst}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - $r = t.tag.Encode(dst); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = t.tag.Len(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $r = t.body.Encode($subslice(dst, _r)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: taggedEncoder.ptr.prototype.Encode, $c: true, $r, _r, dst, t, $s};return $f; - }; - taggedEncoder.prototype.Encode = function(dst) { return this.$val.Encode(dst); }; - int64Encoder.prototype.Len = function() { - var i, n; - i = this; - n = 1; - while (true) { - if (!((i.$high > 0 || (i.$high === 0 && i.$low > 127)))) { break; } - n = n + (1) >> 0; - i = $shiftRightInt64(i, (8)); - } - while (true) { - if (!((i.$high < -1 || (i.$high === -1 && i.$low < 4294967168)))) { break; } - n = n + (1) >> 0; - i = $shiftRightInt64(i, (8)); - } - return n; - }; - $ptrType(int64Encoder).prototype.Len = function() { return this.$get().Len(); }; - int64Encoder.prototype.Encode = function(dst) { - var dst, i, j, n; - i = this; - n = i.Len(); - j = 0; - while (true) { - if (!(j < n)) { break; } - ((j < 0 || j >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + j] = (($shiftRightInt64(i, ((($imul((((n - 1 >> 0) - j >> 0)), 8)) >>> 0))).$low << 24 >>> 24))); - j = j + (1) >> 0; - } - }; - $ptrType(int64Encoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; - base128IntLength = function(n) { - var i, l, n; - if ((n.$high === 0 && n.$low === 0)) { - return 1; - } - l = 0; - i = n; - while (true) { - if (!((i.$high > 0 || (i.$high === 0 && i.$low > 0)))) { break; } - l = l + (1) >> 0; - i = $shiftRightInt64(i, (7)); - } - return l; - }; - appendBase128Int = function(dst, n) { - var dst, i, l, n, o; - l = base128IntLength(n); - i = l - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - o = (($shiftRightInt64(n, ((($imul(i, 7)) >>> 0))).$low << 24 >>> 24)); - o = (o & (127)) >>> 0; - if (!((i === 0))) { - o = (o | (128)) >>> 0; - } - dst = $append(dst, o); - i = i - (1) >> 0; - } - return dst; - }; - makeBigInt = function(n) { - var {_i, _r, _ref, bytes$1, bytes$2, i, n, nMinus1, x$3, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (n === ptrType$1.nil) { - $s = -1; return [$ifaceNil, (x$3 = new StructuralError.ptr("empty integer"), new x$3.constructor.elem(x$3))]; - } - /* */ if (n.Sign() < 0) { $s = 1; continue; } - /* */ if (n.Sign() === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (n.Sign() < 0) { */ case 1: - nMinus1 = new big.Int.ptr(false, big.nat.nil).Neg(n); - _r = nMinus1.Sub(nMinus1, bigOne); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - bytes$1 = nMinus1.Bytes(); - _ref = bytes$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + i] = ((((i < 0 || i >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + i]) ^ (255)) << 24 >>> 24)); - _i++; - } - if ((bytes$1.$length === 0) || ((((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) & 128) >>> 0) === 0)) { - $s = -1; return [($convertSliceType(new sliceType$2([byteFFEncoder, ($convertSliceType(bytes$1, bytesEncoder))]), multiEncoder)), $ifaceNil]; - } - $s = -1; return [($convertSliceType(bytes$1, bytesEncoder)), $ifaceNil]; - /* } else if (n.Sign() === 0) { */ case 2: - $s = -1; return [byte00Encoder, $ifaceNil]; - /* } else { */ case 3: - bytes$2 = n.Bytes(); - if (bytes$2.$length > 0 && !(((((0 >= bytes$2.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$2.$array[bytes$2.$offset + 0]) & 128) >>> 0) === 0))) { - $s = -1; return [($convertSliceType(new sliceType$2([byte00Encoder, ($convertSliceType(bytes$2, bytesEncoder))]), multiEncoder)), $ifaceNil]; - } - $s = -1; return [($convertSliceType(bytes$2, bytesEncoder)), $ifaceNil]; - /* } */ case 4: - $s = -1; return [$ifaceNil, $ifaceNil]; - /* */ } return; } var $f = {$blk: makeBigInt, $c: true, $r, _i, _r, _ref, bytes$1, bytes$2, i, n, nMinus1, x$3, $s};return $f; - }; - appendLength = function(dst, i) { - var dst, i, n; - n = lengthLength(i); - while (true) { - if (!(n > 0)) { break; } - dst = $append(dst, ((((i >> $min(((($imul(((n - 1 >> 0)), 8)) >>> 0)), 31)) >> 0) << 24 >>> 24))); - n = n - (1) >> 0; - } - return dst; - }; - lengthLength = function(i) { - var i, numBytes; - numBytes = 0; - numBytes = 1; - while (true) { - if (!(i > 255)) { break; } - numBytes = numBytes + (1) >> 0; - i = (i >> $min((8), 31)) >> 0; - } - return numBytes; - }; - appendTagAndLength = function(dst, t) { - var b, dst, l, t; - b = ((t.class$0 << 24 >>> 24)) << 6 << 24 >>> 24; - if (t.isCompound) { - b = (b | (32)) >>> 0; - } - if (t.tag >= 31) { - b = (b | (31)) >>> 0; - dst = $append(dst, b); - dst = appendBase128Int(dst, (new $Int64(0, t.tag))); - } else { - b = (b | (((t.tag << 24 >>> 24)))) >>> 0; - dst = $append(dst, b); - } - if (t.length >= 128) { - l = lengthLength(t.length); - dst = $append(dst, (128 | ((l << 24 >>> 24))) >>> 0); - dst = appendLength(dst, t.length); - } else { - dst = $append(dst, ((t.length << 24 >>> 24))); - } - return dst; - }; - bitStringEncoder.ptr.prototype.Len = function() { - var b; - b = this; - return b.Bytes.$length + 1 >> 0; - }; - bitStringEncoder.prototype.Len = function() { return this.$val.Len(); }; - bitStringEncoder.ptr.prototype.Encode = function(dst) { - var _r, _r$1, b, dst; - b = this; - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = (((_r = ((8 - (_r$1 = b.BitLength % 8, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0)) % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24))); - if (!(($copySlice($subslice(dst, 1), b.Bytes) === b.Bytes.$length))) { - $panic(new $String("internal error")); - } - }; - bitStringEncoder.prototype.Encode = function(dst) { return this.$val.Encode(dst); }; - oidEncoder.prototype.Len = function() { - var i, l, oid; - oid = this; - l = base128IntLength((new $Int64(0, (($imul((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]), 40)) + (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >> 0)))); - i = 2; - while (true) { - if (!(i < oid.$length)) { break; } - l = l + (base128IntLength((new $Int64(0, ((i < 0 || i >= oid.$length) ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + i]))))) >> 0; - i = i + (1) >> 0; - } - return l; - }; - $ptrType(oidEncoder).prototype.Len = function() { return this.$get().Len(); }; - oidEncoder.prototype.Encode = function(dst) { - var dst, i, oid; - oid = this; - dst = appendBase128Int($subslice(dst, 0, 0), (new $Int64(0, (($imul((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]), 40)) + (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >> 0)))); - i = 2; - while (true) { - if (!(i < oid.$length)) { break; } - dst = appendBase128Int(dst, (new $Int64(0, ((i < 0 || i >= oid.$length) ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + i])))); - i = i + (1) >> 0; - } - }; - $ptrType(oidEncoder).prototype.Encode = function(dst) { return this.$get().Encode(dst); }; - makeObjectIdentifier = function(oid) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, oid, x$3; - e = $ifaceNil; - err = $ifaceNil; - if (oid.$length < 2 || (0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]) > 2 || ((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]) < 2 && (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >= 40)) { - _tmp = $ifaceNil; - _tmp$1 = (x$3 = new StructuralError.ptr("invalid object identifier"), new x$3.constructor.elem(x$3)); - e = _tmp; - err = _tmp$1; - return [e, err]; - } - _tmp$2 = ($convertSliceType(oid, oidEncoder)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - return [e, err]; - }; - makePrintableString = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, i, s, x$3; - e = $ifaceNil; - err = $ifaceNil; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (!isPrintable(s.charCodeAt(i), true, false)) { - _tmp = $ifaceNil; - _tmp$1 = (x$3 = new StructuralError.ptr("PrintableString contains invalid character"), new x$3.constructor.elem(x$3)); - e = _tmp; - err = _tmp$1; - return [e, err]; - } - i = i + (1) >> 0; - } - _tmp$2 = new stringEncoder((s)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - return [e, err]; - }; - makeIA5String = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, i, s, x$3; - e = $ifaceNil; - err = $ifaceNil; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) > 127) { - _tmp = $ifaceNil; - _tmp$1 = (x$3 = new StructuralError.ptr("IA5String contains invalid character"), new x$3.constructor.elem(x$3)); - e = _tmp; - err = _tmp$1; - return [e, err]; - } - i = i + (1) >> 0; - } - _tmp$2 = new stringEncoder((s)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - return [e, err]; - }; - makeNumericString = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, e, err, i, s, x$3; - e = $ifaceNil; - err = $ifaceNil; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (!isNumeric(s.charCodeAt(i))) { - _tmp = $ifaceNil; - _tmp$1 = (x$3 = new StructuralError.ptr("NumericString contains invalid character"), new x$3.constructor.elem(x$3)); - e = _tmp; - err = _tmp$1; - return [e, err]; - } - i = i + (1) >> 0; - } - _tmp$2 = new stringEncoder((s)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - return [e, err]; - }; - makeUTF8String = function(s) { - var s; - return new stringEncoder((s)); - }; - appendTwoDigits = function(dst, v) { - var _q, _r, _r$1, dst, v; - return $append(dst, (((48 + (_r = ((_q = v / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$1 = v % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24))); - }; - appendFourDigits = function(dst, v) { - var _i, _q, _r, _ref, bytes$1, dst, i, v, x$3; - bytes$1 = arrayType.zero(); - _ref = bytes$1; - _i = 0; - while (true) { - if (!(_i < 4)) { break; } - i = _i; - (x$3 = 3 - i >> 0, ((x$3 < 0 || x$3 >= bytes$1.length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1[x$3] = (48 + (((_r = v % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) << 24 >>> 24))); - v = (_q = v / (10), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - _i++; - } - return $appendSlice(dst, new sliceType(bytes$1)); - }; - outsideUTCRange = function(t) { - var {_r, t, year, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - year = _r; - $s = -1; return year < 1950 || year >= 2050; - /* */ } return; } var $f = {$blk: outsideUTCRange, $c: true, $r, _r, t, year, $s};return $f; - }; - makeUTCTime = function(t) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dst, e, err, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = $ifaceNil; - err = $ifaceNil; - dst = $makeSlice(sliceType, 0, 18); - _r = appendUTCTime(dst, $clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - dst = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = $ifaceNil; - _tmp$1 = err; - e = _tmp; - err = _tmp$1; - $s = -1; return [e, err]; - } - _tmp$2 = ($convertSliceType(dst, bytesEncoder)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - $s = -1; return [e, err]; - /* */ } return; } var $f = {$blk: makeUTCTime, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dst, e, err, t, $s};return $f; - }; - makeGeneralizedTime = function(t) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dst, e, err, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = $ifaceNil; - err = $ifaceNil; - dst = $makeSlice(sliceType, 0, 20); - _r = appendGeneralizedTime(dst, $clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - dst = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = $ifaceNil; - _tmp$1 = err; - e = _tmp; - err = _tmp$1; - $s = -1; return [e, err]; - } - _tmp$2 = ($convertSliceType(dst, bytesEncoder)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - $s = -1; return [e, err]; - /* */ } return; } var $f = {$blk: makeGeneralizedTime, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, dst, e, err, t, $s};return $f; - }; - appendUTCTime = function(dst, t) { - var {$24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, err, ret, t, x$3, year, $s, $r, $c} = $restore(this, {dst, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = sliceType.nil; - err = $ifaceNil; - _r = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - year = _r; - if (1950 <= year && year < 2000) { - dst = appendTwoDigits(dst, year - 1900 >> 0); - } else if (2000 <= year && year < 2050) { - dst = appendTwoDigits(dst, year - 2000 >> 0); - } else { - _tmp = sliceType.nil; - _tmp$1 = (x$3 = new StructuralError.ptr("cannot represent time as UTCTime"), new x$3.constructor.elem(x$3)); - ret = _tmp; - err = _tmp$1; - $s = -1; return [ret, err]; - } - _r$1 = appendTimeCommon(dst, $clone(t, time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$2 = _r$1; - _tmp$3 = $ifaceNil; - ret = _tmp$2; - err = _tmp$3; - $24r = [ret, err]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: appendUTCTime, $c: true, $r, $24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, err, ret, t, x$3, year, $s};return $f; - }; - appendGeneralizedTime = function(dst, t) { - var {$24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, err, ret, t, x$3, year, $s, $r, $c} = $restore(this, {dst, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = sliceType.nil; - err = $ifaceNil; - _r = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - year = _r; - if (year < 0 || year > 9999) { - _tmp = sliceType.nil; - _tmp$1 = (x$3 = new StructuralError.ptr("cannot represent time as GeneralizedTime"), new x$3.constructor.elem(x$3)); - ret = _tmp; - err = _tmp$1; - $s = -1; return [ret, err]; - } - dst = appendFourDigits(dst, year); - _r$1 = appendTimeCommon(dst, $clone(t, time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$2 = _r$1; - _tmp$3 = $ifaceNil; - ret = _tmp$2; - err = _tmp$3; - $24r = [ret, err]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: appendGeneralizedTime, $c: true, $r, $24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, dst, err, ret, t, x$3, year, $s};return $f; - }; - appendTimeCommon = function(dst, t) { - var {_q, _q$1, _q$2, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, day, dst, hour, min, month, offset, offsetMinutes, sec, t, $s, $r, $c} = $restore(this, {dst, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(t, time.Time).Date(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - month = _tuple[1]; - day = _tuple[2]; - dst = appendTwoDigits(dst, ((month >> 0))); - dst = appendTwoDigits(dst, day); - _r$1 = $clone(t, time.Time).Clock(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - hour = _tuple$1[0]; - min = _tuple$1[1]; - sec = _tuple$1[2]; - dst = appendTwoDigits(dst, hour); - dst = appendTwoDigits(dst, min); - dst = appendTwoDigits(dst, sec); - _r$2 = $clone(t, time.Time).Zone(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - offset = _tuple$2[1]; - if (((_q = offset / 60, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === 0)) { - $s = -1; return $append(dst, 90); - } else if (offset > 0) { - dst = $append(dst, 43); - } else if (offset < 0) { - dst = $append(dst, 45); - } - offsetMinutes = (_q$1 = offset / 60, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); - if (offsetMinutes < 0) { - offsetMinutes = -offsetMinutes; - } - dst = appendTwoDigits(dst, (_q$2 = offsetMinutes / 60, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))); - dst = appendTwoDigits(dst, (_r$3 = offsetMinutes % 60, _r$3 === _r$3 ? _r$3 : $throwRuntimeError("integer divide by zero"))); - $s = -1; return dst; - /* */ } return; } var $f = {$blk: appendTimeCommon, $c: true, $r, _q, _q$1, _q$2, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, day, dst, hour, min, month, offset, offsetMinutes, sec, t, $s};return $f; - }; - stripTagAndLength = function(in$1) { - var _tuple, err, in$1, offset; - _tuple = parseTagAndLength(in$1, 0); - offset = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return in$1; - } - return $subslice(in$1, offset); - }; - makeBody = function(value, params) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _2, _3, _4, _5, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, _v, bytes$1, e, err, fp, i, i$1, i$2, l, m, m$1, n, n1, params, s, sliceType$4, startingField, t, t$1, v, value, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {value, params}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = $ifaceNil; - err = $ifaceNil; - _1 = $clone(value, reflect.Value).Type(); - /* */ if ($interfaceIsEqual(_1, (flagType))) { $s = 2; continue; } - /* */ if ($interfaceIsEqual(_1, (timeType))) { $s = 3; continue; } - /* */ if ($interfaceIsEqual(_1, (bitStringType))) { $s = 4; continue; } - /* */ if ($interfaceIsEqual(_1, (objectIdentifierType))) { $s = 5; continue; } - /* */ if ($interfaceIsEqual(_1, (bigIntType))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($interfaceIsEqual(_1, (flagType))) { */ case 2: - _tmp = (bytesEncoder.nil); - _tmp$1 = $ifaceNil; - e = _tmp; - err = _tmp$1; - $s = -1; return [e, err]; - /* } else if ($interfaceIsEqual(_1, (timeType))) { */ case 3: - _r = $clone(value, reflect.Value).Interface(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - t = $clone($assertType(_r, time.Time), time.Time); - if (params.timeType === 24) { _v = true; $s = 11; continue s; } - _r$1 = outsideUTCRange($clone(t, time.Time)); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 11: - /* */ if (_v) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 9: - _r$2 = makeGeneralizedTime($clone(t, time.Time)); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - e = _tuple[0]; - err = _tuple[1]; - $24r = [e, err]; - $s = 14; case 14: return $24r; - /* } */ case 10: - _r$3 = makeUTCTime($clone(t, time.Time)); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - e = _tuple$1[0]; - err = _tuple$1[1]; - $24r$1 = [e, err]; - $s = 16; case 16: return $24r$1; - /* } else if ($interfaceIsEqual(_1, (bitStringType))) { */ case 4: - _r$4 = $clone(value, reflect.Value).Interface(); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tmp$2 = (x$3 = ($clone($assertType(_r$4, BitString), bitStringEncoder)), new x$3.constructor.elem(x$3)); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - $24r$2 = [e, err]; - $s = 18; case 18: return $24r$2; - /* } else if ($interfaceIsEqual(_1, (objectIdentifierType))) { */ case 5: - _r$5 = $clone(value, reflect.Value).Interface(); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = makeObjectIdentifier($convertSliceType($assertType(_r$5, ObjectIdentifier), sliceType$3)); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - e = _tuple$2[0]; - err = _tuple$2[1]; - $24r$3 = [e, err]; - $s = 21; case 21: return $24r$3; - /* } else if ($interfaceIsEqual(_1, (bigIntType))) { */ case 6: - _r$7 = $clone(value, reflect.Value).Interface(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = makeBigInt($assertType(_r$7, ptrType$1)); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$3 = _r$8; - e = _tuple$3[0]; - err = _tuple$3[1]; - $24r$4 = [e, err]; - $s = 24; case 24: return $24r$4; - /* } */ case 7: - case 1: - v = value; - _2 = $clone(v, reflect.Value).Kind(); - /* */ if (_2 === (1)) { $s = 26; continue; } - /* */ if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { $s = 27; continue; } - /* */ if (_2 === (25)) { $s = 28; continue; } - /* */ if (_2 === (23)) { $s = 29; continue; } - /* */ if (_2 === (24)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (_2 === (1)) { */ case 26: - if ($clone(v, reflect.Value).Bool()) { - _tmp$4 = byteFFEncoder; - _tmp$5 = $ifaceNil; - e = _tmp$4; - err = _tmp$5; - $s = -1; return [e, err]; - } - _tmp$6 = byte00Encoder; - _tmp$7 = $ifaceNil; - e = _tmp$6; - err = _tmp$7; - $s = -1; return [e, err]; - /* } else if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { */ case 27: - _tmp$8 = ((x$4 = $clone(v, reflect.Value).Int(), new int64Encoder(x$4.$high, x$4.$low))); - _tmp$9 = $ifaceNil; - e = _tmp$8; - err = _tmp$9; - $s = -1; return [e, err]; - /* } else if (_2 === (25)) { */ case 28: - t$1 = $clone(v, reflect.Value).Type(); - i = 0; - /* while (true) { */ case 32: - _r$9 = t$1.NumField(); /* */ $s = 34; case 34: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* if (!(i < _r$9)) { break; } */ if(!(i < _r$9)) { $s = 33; continue; } - _r$10 = t$1.Field(i); /* */ $s = 37; case 37: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.StructField).IsExported(); /* */ $s = 38; case 38: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!_r$11) { */ case 35: - _tmp$10 = $ifaceNil; - _tmp$11 = (x$5 = new StructuralError.ptr("struct contains unexported fields"), new x$5.constructor.elem(x$5)); - e = _tmp$10; - err = _tmp$11; - $s = -1; return [e, err]; - /* } */ case 36: - i = i + (1) >> 0; - $s = 32; continue; - case 33: - startingField = 0; - _r$12 = t$1.NumField(); /* */ $s = 39; case 39: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - n = _r$12; - if (n === 0) { - _tmp$12 = (bytesEncoder.nil); - _tmp$13 = $ifaceNil; - e = _tmp$12; - err = _tmp$13; - $s = -1; return [e, err]; - } - _r$13 = t$1.Field(0); /* */ $s = 42; case 42: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$13.Type, rawContentsType)) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if ($interfaceIsEqual(_r$13.Type, rawContentsType)) { */ case 40: - _r$14 = $clone(v, reflect.Value).Field(0); /* */ $s = 43; case 43: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - s = _r$14; - /* */ if ($clone(s, reflect.Value).Len() > 0) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if ($clone(s, reflect.Value).Len() > 0) { */ case 44: - _r$15 = $clone(s, reflect.Value).Bytes(); /* */ $s = 46; case 46: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - bytes$1 = _r$15; - _tmp$14 = ($convertSliceType(stripTagAndLength(bytes$1), bytesEncoder)); - _tmp$15 = $ifaceNil; - e = _tmp$14; - err = _tmp$15; - $s = -1; return [e, err]; - /* } */ case 45: - startingField = 1; - /* } */ case 41: - n1 = n - startingField >> 0; - _3 = n1; - /* */ if (_3 === (0)) { $s = 48; continue; } - /* */ if (_3 === (1)) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (_3 === (0)) { */ case 48: - _tmp$16 = (bytesEncoder.nil); - _tmp$17 = $ifaceNil; - e = _tmp$16; - err = _tmp$17; - $s = -1; return [e, err]; - /* } else if (_3 === (1)) { */ case 49: - _r$16 = $clone(v, reflect.Value).Field(startingField); /* */ $s = 52; case 52: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg = $clone(_r$16, reflect.Value); - _r$17 = t$1.Field(startingField); /* */ $s = 53; case 53: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = new reflect.StructTag(_r$17.Tag).Get("asn1"); /* */ $s = 54; case 54: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = parseFieldParameters(_r$18); /* */ $s = 55; case 55: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$19, fieldParameters); - _r$20 = makeField(_arg, _arg$1); /* */ $s = 56; case 56: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _tuple$4 = _r$20; - e = _tuple$4[0]; - err = _tuple$4[1]; - $24r$5 = [e, err]; - $s = 57; case 57: return $24r$5; - /* } else { */ case 50: - m = $makeSlice(sliceType$2, n1); - i$1 = 0; - /* while (true) { */ case 58: - /* if (!(i$1 < n1)) { break; } */ if(!(i$1 < n1)) { $s = 59; continue; } - _r$21 = $clone(v, reflect.Value).Field(i$1 + startingField >> 0); /* */ $s = 60; case 60: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$2 = $clone(_r$21, reflect.Value); - _r$22 = t$1.Field(i$1 + startingField >> 0); /* */ $s = 61; case 61: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = new reflect.StructTag(_r$22.Tag).Get("asn1"); /* */ $s = 62; case 62: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = parseFieldParameters(_r$23); /* */ $s = 63; case 63: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _arg$3 = $clone(_r$24, fieldParameters); - _r$25 = makeField(_arg$2, _arg$3); /* */ $s = 64; case 64: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _tuple$5 = _r$25; - ((i$1 < 0 || i$1 >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i$1] = _tuple$5[0]); - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$18 = $ifaceNil; - _tmp$19 = err; - e = _tmp$18; - err = _tmp$19; - $s = -1; return [e, err]; - } - i$1 = i$1 + (1) >> 0; - $s = 58; continue; - case 59: - _tmp$20 = ($convertSliceType(m, multiEncoder)); - _tmp$21 = $ifaceNil; - e = _tmp$20; - err = _tmp$21; - $s = -1; return [e, err]; - /* } */ case 51: - case 47: - $s = 31; continue; - /* } else if (_2 === (23)) { */ case 29: - sliceType$4 = $clone(v, reflect.Value).Type(); - _r$26 = sliceType$4.Elem(); /* */ $s = 67; case 67: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = _r$26.Kind(); /* */ $s = 68; case 68: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* */ if (_r$27 === 8) { $s = 65; continue; } - /* */ $s = 66; continue; - /* if (_r$27 === 8) { */ case 65: - _r$28 = $clone(v, reflect.Value).Bytes(); /* */ $s = 69; case 69: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _tmp$22 = ($convertSliceType(_r$28, bytesEncoder)); - _tmp$23 = $ifaceNil; - e = _tmp$22; - err = _tmp$23; - $24r$6 = [e, err]; - $s = 70; case 70: return $24r$6; - /* } */ case 66: - fp = new fieldParameters.ptr(false, false, false, false, ptrType$2.nil, ptrType$3.nil, 0, 0, false, false); - l = $clone(v, reflect.Value).Len(); - _4 = l; - /* */ if (_4 === (0)) { $s = 72; continue; } - /* */ if (_4 === (1)) { $s = 73; continue; } - /* */ $s = 74; continue; - /* if (_4 === (0)) { */ case 72: - _tmp$24 = (bytesEncoder.nil); - _tmp$25 = $ifaceNil; - e = _tmp$24; - err = _tmp$25; - $s = -1; return [e, err]; - /* } else if (_4 === (1)) { */ case 73: - _r$29 = $clone(v, reflect.Value).Index(0); /* */ $s = 76; case 76: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$30 = makeField($clone(_r$29, reflect.Value), $clone(fp, fieldParameters)); /* */ $s = 77; case 77: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _tuple$6 = _r$30; - e = _tuple$6[0]; - err = _tuple$6[1]; - $24r$7 = [e, err]; - $s = 78; case 78: return $24r$7; - /* } else { */ case 74: - m$1 = $makeSlice(sliceType$2, l); - i$2 = 0; - /* while (true) { */ case 79: - /* if (!(i$2 < l)) { break; } */ if(!(i$2 < l)) { $s = 80; continue; } - _r$31 = $clone(v, reflect.Value).Index(i$2); /* */ $s = 81; case 81: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$32 = makeField($clone(_r$31, reflect.Value), $clone(fp, fieldParameters)); /* */ $s = 82; case 82: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _tuple$7 = _r$32; - ((i$2 < 0 || i$2 >= m$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : m$1.$array[m$1.$offset + i$2] = _tuple$7[0]); - err = _tuple$7[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$26 = $ifaceNil; - _tmp$27 = err; - e = _tmp$26; - err = _tmp$27; - $s = -1; return [e, err]; - } - i$2 = i$2 + (1) >> 0; - $s = 79; continue; - case 80: - if (params.set) { - _tmp$28 = ($convertSliceType(m$1, setEncoder)); - _tmp$29 = $ifaceNil; - e = _tmp$28; - err = _tmp$29; - $s = -1; return [e, err]; - } - _tmp$30 = ($convertSliceType(m$1, multiEncoder)); - _tmp$31 = $ifaceNil; - e = _tmp$30; - err = _tmp$31; - $s = -1; return [e, err]; - /* } */ case 75: - case 71: - $s = 31; continue; - /* } else if (_2 === (24)) { */ case 30: - _5 = params.stringType; - /* */ if (_5 === (22)) { $s = 84; continue; } - /* */ if (_5 === (19)) { $s = 85; continue; } - /* */ if (_5 === (18)) { $s = 86; continue; } - /* */ $s = 87; continue; - /* if (_5 === (22)) { */ case 84: - _r$33 = $clone(v, reflect.Value).String(); /* */ $s = 89; case 89: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$34 = makeIA5String(_r$33); /* */ $s = 90; case 90: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _tuple$8 = _r$34; - e = _tuple$8[0]; - err = _tuple$8[1]; - $24r$8 = [e, err]; - $s = 91; case 91: return $24r$8; - /* } else if (_5 === (19)) { */ case 85: - _r$35 = $clone(v, reflect.Value).String(); /* */ $s = 92; case 92: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _r$36 = makePrintableString(_r$35); /* */ $s = 93; case 93: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _tuple$9 = _r$36; - e = _tuple$9[0]; - err = _tuple$9[1]; - $24r$9 = [e, err]; - $s = 94; case 94: return $24r$9; - /* } else if (_5 === (18)) { */ case 86: - _r$37 = $clone(v, reflect.Value).String(); /* */ $s = 95; case 95: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _r$38 = makeNumericString(_r$37); /* */ $s = 96; case 96: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _tuple$10 = _r$38; - e = _tuple$10[0]; - err = _tuple$10[1]; - $24r$10 = [e, err]; - $s = 97; case 97: return $24r$10; - /* } else { */ case 87: - _r$39 = $clone(v, reflect.Value).String(); /* */ $s = 98; case 98: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$40 = makeUTF8String(_r$39); /* */ $s = 99; case 99: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - _tmp$32 = _r$40; - _tmp$33 = $ifaceNil; - e = _tmp$32; - err = _tmp$33; - $24r$11 = [e, err]; - $s = 100; case 100: return $24r$11; - /* } */ case 88: - case 83: - /* } */ case 31: - case 25: - _tmp$34 = $ifaceNil; - _tmp$35 = (x$6 = new StructuralError.ptr("unknown Go type"), new x$6.constructor.elem(x$6)); - e = _tmp$34; - err = _tmp$35; - $s = -1; return [e, err]; - /* */ } return; } var $f = {$blk: makeBody, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _2, _3, _4, _5, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, _v, bytes$1, e, err, fp, i, i$1, i$2, l, m, m$1, n, n1, params, s, sliceType$4, startingField, t, t$1, v, value, x$3, x$4, x$5, x$6, $s};return $f; - }; - makeField = function(v, params) { - var {$24r, $24r$1, $24r$2, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _i, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _rune, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, bodyLen, class$1, defaultValue, e, err, isCompound, matchAny, ok, params, r, rv, t, t$1, tag, tt, v, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {v, params}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = $ifaceNil; - err = $ifaceNil; - /* */ if (!$clone(v, reflect.Value).IsValid()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!$clone(v, reflect.Value).IsValid()) { */ case 1: - _tmp = $ifaceNil; - _r = fmt.Errorf("asn1: cannot marshal nil value", new sliceType$4([])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$1 = _r; - e = _tmp; - err = _tmp$1; - $24r = [e, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - if (!($clone(v, reflect.Value).Kind() === 20)) { _v = false; $s = 7; continue s; } - _r$1 = $clone(v, reflect.Value).Type().NumMethod(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === 0; case 7: - /* */ if (_v) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_v) { */ case 5: - _r$2 = $clone(v, reflect.Value).Elem(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = makeField($clone(_r$2, reflect.Value), $clone(params, fieldParameters)); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - e = _tuple[0]; - err = _tuple[1]; - $24r$1 = [e, err]; - $s = 11; case 11: return $24r$1; - /* } */ case 6: - if (($clone(v, reflect.Value).Kind() === 23) && ($clone(v, reflect.Value).Len() === 0) && params.omitEmpty) { - _tmp$2 = (bytesEncoder.nil); - _tmp$3 = $ifaceNil; - e = _tmp$2; - err = _tmp$3; - $s = -1; return [e, err]; - } - /* */ if (params.optional && !(params.defaultValue === ptrType$2.nil) && canHaveDefaultValue($clone(v, reflect.Value).Kind())) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (params.optional && !(params.defaultValue === ptrType$2.nil) && canHaveDefaultValue($clone(v, reflect.Value).Kind())) { */ case 12: - _r$4 = $clone(reflect.New($clone(v, reflect.Value).Type()), reflect.Value).Elem(); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - defaultValue = _r$4; - $clone(defaultValue, reflect.Value).SetInt(params.defaultValue.$get()); - _r$5 = $clone(v, reflect.Value).Interface(); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg = _r$5; - _r$6 = $clone(defaultValue, reflect.Value).Interface(); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = _r$6; - _r$7 = reflect.DeepEqual(_arg, _arg$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_r$7) { */ case 15: - _tmp$4 = (bytesEncoder.nil); - _tmp$5 = $ifaceNil; - e = _tmp$4; - err = _tmp$5; - $s = -1; return [e, err]; - /* } */ case 16: - /* } */ case 13: - /* */ if (params.optional && params.defaultValue === ptrType$2.nil) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (params.optional && params.defaultValue === ptrType$2.nil) { */ case 20: - _r$8 = $clone(v, reflect.Value).Interface(); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$2 = _r$8; - _r$9 = reflect.Zero($clone(v, reflect.Value).Type()); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = $clone(_r$9, reflect.Value).Interface(); /* */ $s = 26; case 26: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg$3 = _r$10; - _r$11 = reflect.DeepEqual(_arg$2, _arg$3); /* */ $s = 27; case 27: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (_r$11) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_r$11) { */ case 22: - _tmp$6 = (bytesEncoder.nil); - _tmp$7 = $ifaceNil; - e = _tmp$6; - err = _tmp$7; - $s = -1; return [e, err]; - /* } */ case 23: - /* } */ case 21: - /* */ if ($interfaceIsEqual($clone(v, reflect.Value).Type(), rawValueType)) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if ($interfaceIsEqual($clone(v, reflect.Value).Type(), rawValueType)) { */ case 28: - _r$12 = $clone(v, reflect.Value).Interface(); /* */ $s = 30; case 30: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - rv = $clone($assertType(_r$12, RawValue), RawValue); - if (!((rv.FullBytes.$length === 0))) { - _tmp$8 = ($convertSliceType(rv.FullBytes, bytesEncoder)); - _tmp$9 = $ifaceNil; - e = _tmp$8; - err = _tmp$9; - $s = -1; return [e, err]; - } - t = new taggedEncoder.ptr(arrayType$1.zero(), $ifaceNil, $ifaceNil); - t.tag = ($convertSliceType(appendTagAndLength($subslice(new sliceType(t.scratch), 0, 0), new tagAndLength.ptr(rv.Class, rv.Tag, rv.Bytes.$length, rv.IsCompound)), bytesEncoder)); - t.body = ($convertSliceType(rv.Bytes, bytesEncoder)); - _tmp$10 = t; - _tmp$11 = $ifaceNil; - e = _tmp$10; - err = _tmp$11; - $s = -1; return [e, err]; - /* } */ case 29: - _r$13 = getUniversalType($clone(v, reflect.Value).Type()); /* */ $s = 31; case 31: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$1 = _r$13; - matchAny = _tuple$1[0]; - tag = _tuple$1[1]; - isCompound = _tuple$1[2]; - ok = _tuple$1[3]; - /* */ if (!ok || matchAny) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!ok || matchAny) { */ case 32: - _tmp$12 = $ifaceNil; - _r$14 = fmt.Sprintf("unknown Go type: %v", new sliceType$4([$clone(v, reflect.Value).Type()])); /* */ $s = 34; case 34: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tmp$13 = (x$3 = new StructuralError.ptr(_r$14), new x$3.constructor.elem(x$3)); - e = _tmp$12; - err = _tmp$13; - $24r$2 = [e, err]; - $s = 35; case 35: return $24r$2; - /* } */ case 33: - if (!((params.timeType === 0)) && !((tag === 23))) { - _tmp$14 = $ifaceNil; - _tmp$15 = (x$4 = new StructuralError.ptr("explicit time type given to non-time member"), new x$4.constructor.elem(x$4)); - e = _tmp$14; - err = _tmp$15; - $s = -1; return [e, err]; - } - if (!((params.stringType === 0)) && !((tag === 19))) { - _tmp$16 = $ifaceNil; - _tmp$17 = (x$5 = new StructuralError.ptr("explicit string type given to non-string member"), new x$5.constructor.elem(x$5)); - e = _tmp$16; - err = _tmp$17; - $s = -1; return [e, err]; - } - _1 = tag; - /* */ if (_1 === (19)) { $s = 37; continue; } - /* */ if (_1 === (23)) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (_1 === (19)) { */ case 37: - /* */ if (params.stringType === 0) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (params.stringType === 0) { */ case 40: - _r$15 = $clone(v, reflect.Value).String(); /* */ $s = 43; case 43: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _ref = _r$15; - _i = 0; - /* while (true) { */ case 44: - /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 45; continue; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - /* */ if (r >= 128 || !isPrintable(((r << 24 >>> 24)), false, false)) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (r >= 128 || !isPrintable(((r << 24 >>> 24)), false, false)) { */ case 46: - _r$16 = $clone(v, reflect.Value).String(); /* */ $s = 50; case 50: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = utf8.ValidString(_r$16); /* */ $s = 51; case 51: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - /* */ if (!_r$17) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (!_r$17) { */ case 48: - _tmp$18 = $ifaceNil; - _tmp$19 = errors.New("asn1: string not valid UTF-8"); - e = _tmp$18; - err = _tmp$19; - $s = -1; return [e, err]; - /* } */ case 49: - tag = 12; - /* break; */ $s = 45; continue; - /* } */ case 47: - _i += _rune[1]; - $s = 44; continue; - case 45: - $s = 42; continue; - /* } else { */ case 41: - tag = params.stringType; - /* } */ case 42: - $s = 39; continue; - /* } else if (_1 === (23)) { */ case 38: - if (params.timeType === 24) { _v$1 = true; $s = 54; continue s; } - _r$18 = $clone(v, reflect.Value).Interface(); /* */ $s = 55; case 55: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = outsideUTCRange($clone($assertType(_r$18, time.Time), time.Time)); /* */ $s = 56; case 56: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _v$1 = _r$19; case 54: - /* */ if (_v$1) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (_v$1) { */ case 52: - tag = 24; - /* } */ case 53: - /* } */ case 39: - case 36: - if (params.set) { - if (!((tag === 16))) { - _tmp$20 = $ifaceNil; - _tmp$21 = (x$6 = new StructuralError.ptr("non sequence tagged as set"), new x$6.constructor.elem(x$6)); - e = _tmp$20; - err = _tmp$21; - $s = -1; return [e, err]; - } - tag = 17; - } - if ((tag === 17) && !params.set) { - params.set = true; - } - t$1 = new taggedEncoder.ptr(arrayType$1.zero(), $ifaceNil, $ifaceNil); - _r$20 = makeBody($clone(v, reflect.Value), $clone(params, fieldParameters)); /* */ $s = 57; case 57: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _tuple$2 = _r$20; - t$1.body = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$22 = $ifaceNil; - _tmp$23 = err; - e = _tmp$22; - err = _tmp$23; - $s = -1; return [e, err]; - } - _r$21 = t$1.body.Len(); /* */ $s = 58; case 58: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - bodyLen = _r$21; - class$1 = 0; - /* */ if (!(params.tag === ptrType$3.nil)) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (!(params.tag === ptrType$3.nil)) { */ case 59: - if (params.application) { - class$1 = 1; - } else if (params.private$3) { - class$1 = 3; - } else { - class$1 = 2; - } - /* */ if (params.explicit) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (params.explicit) { */ case 61: - t$1.tag = ($convertSliceType(appendTagAndLength($subslice(new sliceType(t$1.scratch), 0, 0), new tagAndLength.ptr(0, tag, bodyLen, isCompound)), bytesEncoder)); - tt = new taggedEncoder.ptr(arrayType$1.zero(), $ifaceNil, $ifaceNil); - tt.body = t$1; - _arg$4 = $subslice(new sliceType(tt.scratch), 0, 0); - _r$22 = t$1.tag.Len(); /* */ $s = 63; case 63: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _arg$5 = new tagAndLength.ptr(class$1, params.tag.$get(), bodyLen + _r$22 >> 0, true); - _r$23 = appendTagAndLength(_arg$4, _arg$5); /* */ $s = 64; case 64: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - tt.tag = ($convertSliceType(_r$23, bytesEncoder)); - _tmp$24 = tt; - _tmp$25 = $ifaceNil; - e = _tmp$24; - err = _tmp$25; - $s = -1; return [e, err]; - /* } */ case 62: - tag = params.tag.$get(); - /* } */ case 60: - t$1.tag = ($convertSliceType(appendTagAndLength($subslice(new sliceType(t$1.scratch), 0, 0), new tagAndLength.ptr(class$1, tag, bodyLen, isCompound)), bytesEncoder)); - _tmp$26 = t$1; - _tmp$27 = $ifaceNil; - e = _tmp$26; - err = _tmp$27; - $s = -1; return [e, err]; - /* */ } return; } var $f = {$blk: makeField, $c: true, $r, $24r, $24r$1, $24r$2, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _i, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _rune, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, bodyLen, class$1, defaultValue, e, err, isCompound, matchAny, ok, params, r, rv, t, t$1, tag, tt, v, x$3, x$4, x$5, x$6, $s};return $f; - }; - Marshal = function(val) { - var {$24r, _r, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = MarshalWithParams(val, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Marshal, $c: true, $r, $24r, _r, val, $s};return $f; - }; - $pkg.Marshal = Marshal; - MarshalWithParams = function(val, params) { - var {_r, _r$1, _r$2, _tuple, b, e, err, params, val, $s, $r, $c} = $restore(this, {val, params}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = reflect.ValueOf(val); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = makeField($clone(_r, reflect.Value), $clone(parseFieldParameters(params), fieldParameters)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - e = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - _r$2 = e.Len(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = $makeSlice(sliceType, _r$2); - $r = e.Encode(b); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [b, $ifaceNil]; - /* */ } return; } var $f = {$blk: MarshalWithParams, $c: true, $r, _r, _r$1, _r$2, _tuple, b, e, err, params, val, $s};return $f; - }; - $pkg.MarshalWithParams = MarshalWithParams; - parseFieldParameters = function(str) { - var _tuple, _tuple$1, _tuple$2, err, err$1, i, i$1, part, ret, str; - ret = new fieldParameters.ptr(false, false, false, false, ptrType$2.nil, ptrType$3.nil, 0, 0, false, false); - part = ""; - while (true) { - if (!(str.length > 0)) { break; } - _tuple = strings.Cut(str, ","); - part = _tuple[0]; - str = _tuple[1]; - if (part === "optional") { - ret.optional = true; - } else if (part === "explicit") { - ret.explicit = true; - if (ret.tag === ptrType$3.nil) { - ret.tag = $newDataPointer(0, ptrType$3); - } - } else if (part === "generalized") { - ret.timeType = 24; - } else if (part === "utc") { - ret.timeType = 23; - } else if (part === "ia5") { - ret.stringType = 22; - } else if (part === "printable") { - ret.stringType = 19; - } else if (part === "numeric") { - ret.stringType = 18; - } else if (part === "utf8") { - ret.stringType = 12; - } else if (strings.HasPrefix(part, "default:")) { - _tuple$1 = strconv.ParseInt($substring(part, 8), 10, 64); - i = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - ret.defaultValue = $newDataPointer(new $Int64(0, 0), ptrType$2); - ret.defaultValue.$set(i); - } - } else if (strings.HasPrefix(part, "tag:")) { - _tuple$2 = strconv.Atoi($substring(part, 4)); - i$1 = _tuple$2[0]; - err$1 = _tuple$2[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - ret.tag = $newDataPointer(0, ptrType$3); - ret.tag.$set(i$1); - } - } else if (part === "set") { - ret.set = true; - } else if (part === "application") { - ret.application = true; - if (ret.tag === ptrType$3.nil) { - ret.tag = $newDataPointer(0, ptrType$3); - } - } else if (part === "private") { - ret.private$3 = true; - if (ret.tag === ptrType$3.nil) { - ret.tag = $newDataPointer(0, ptrType$3); - } - } else if (part === "omitempty") { - ret.omitEmpty = true; - } - } - return ret; - }; - getUniversalType = function(t) { - var {_1, _2, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$6, _tmp$7, _tmp$8, _tmp$9, isCompound, matchAny, ok, t, tagNumber, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - matchAny = false; - tagNumber = 0; - isCompound = false; - ok = false; - _1 = t; - if ($interfaceIsEqual(_1, (rawValueType))) { - _tmp = true; - _tmp$1 = -1; - _tmp$2 = false; - _tmp$3 = true; - matchAny = _tmp; - tagNumber = _tmp$1; - isCompound = _tmp$2; - ok = _tmp$3; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - } else if ($interfaceIsEqual(_1, (objectIdentifierType))) { - _tmp$4 = false; - _tmp$5 = 6; - _tmp$6 = false; - _tmp$7 = true; - matchAny = _tmp$4; - tagNumber = _tmp$5; - isCompound = _tmp$6; - ok = _tmp$7; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - } else if ($interfaceIsEqual(_1, (bitStringType))) { - _tmp$8 = false; - _tmp$9 = 3; - _tmp$10 = false; - _tmp$11 = true; - matchAny = _tmp$8; - tagNumber = _tmp$9; - isCompound = _tmp$10; - ok = _tmp$11; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - } else if ($interfaceIsEqual(_1, (timeType))) { - _tmp$12 = false; - _tmp$13 = 23; - _tmp$14 = false; - _tmp$15 = true; - matchAny = _tmp$12; - tagNumber = _tmp$13; - isCompound = _tmp$14; - ok = _tmp$15; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - } else if ($interfaceIsEqual(_1, (enumeratedType))) { - _tmp$16 = false; - _tmp$17 = 10; - _tmp$18 = false; - _tmp$19 = true; - matchAny = _tmp$16; - tagNumber = _tmp$17; - isCompound = _tmp$18; - ok = _tmp$19; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - } else if ($interfaceIsEqual(_1, (bigIntType))) { - _tmp$20 = false; - _tmp$21 = 2; - _tmp$22 = false; - _tmp$23 = true; - matchAny = _tmp$20; - tagNumber = _tmp$21; - isCompound = _tmp$22; - ok = _tmp$23; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - } - _r = t.Kind(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _2 = _r; - /* */ if (_2 === (1)) { $s = 3; continue; } - /* */ if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { $s = 4; continue; } - /* */ if (_2 === (25)) { $s = 5; continue; } - /* */ if (_2 === (23)) { $s = 6; continue; } - /* */ if (_2 === (24)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_2 === (1)) { */ case 3: - _tmp$24 = false; - _tmp$25 = 1; - _tmp$26 = false; - _tmp$27 = true; - matchAny = _tmp$24; - tagNumber = _tmp$25; - isCompound = _tmp$26; - ok = _tmp$27; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } else if ((_2 === (2)) || (_2 === (3)) || (_2 === (4)) || (_2 === (5)) || (_2 === (6))) { */ case 4: - _tmp$28 = false; - _tmp$29 = 2; - _tmp$30 = false; - _tmp$31 = true; - matchAny = _tmp$28; - tagNumber = _tmp$29; - isCompound = _tmp$30; - ok = _tmp$31; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } else if (_2 === (25)) { */ case 5: - _tmp$32 = false; - _tmp$33 = 16; - _tmp$34 = true; - _tmp$35 = true; - matchAny = _tmp$32; - tagNumber = _tmp$33; - isCompound = _tmp$34; - ok = _tmp$35; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } else if (_2 === (23)) { */ case 6: - _r$1 = t.Elem(); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.Kind(); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2 === 8) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$2 === 8) { */ case 9: - _tmp$36 = false; - _tmp$37 = 4; - _tmp$38 = false; - _tmp$39 = true; - matchAny = _tmp$36; - tagNumber = _tmp$37; - isCompound = _tmp$38; - ok = _tmp$39; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } */ case 10: - _r$3 = t.Name(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = strings.HasSuffix(_r$3, "SET"); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_r$4) { */ case 13: - _tmp$40 = false; - _tmp$41 = 17; - _tmp$42 = true; - _tmp$43 = true; - matchAny = _tmp$40; - tagNumber = _tmp$41; - isCompound = _tmp$42; - ok = _tmp$43; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } */ case 14: - _tmp$44 = false; - _tmp$45 = 16; - _tmp$46 = true; - _tmp$47 = true; - matchAny = _tmp$44; - tagNumber = _tmp$45; - isCompound = _tmp$46; - ok = _tmp$47; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } else if (_2 === (24)) { */ case 7: - _tmp$48 = false; - _tmp$49 = 19; - _tmp$50 = false; - _tmp$51 = true; - matchAny = _tmp$48; - tagNumber = _tmp$49; - isCompound = _tmp$50; - ok = _tmp$51; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* } */ case 8: - case 1: - _tmp$52 = false; - _tmp$53 = 0; - _tmp$54 = false; - _tmp$55 = false; - matchAny = _tmp$52; - tagNumber = _tmp$53; - isCompound = _tmp$54; - ok = _tmp$55; - $s = -1; return [matchAny, tagNumber, isCompound, ok]; - /* */ } return; } var $f = {$blk: getUniversalType, $c: true, $r, _1, _2, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$5, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$6, _tmp$7, _tmp$8, _tmp$9, isCompound, matchAny, ok, t, tagNumber, $s};return $f; - }; - StructuralError.ptr.prototype.Error = function() { - var e; - e = this; - return "asn1: structure error: " + e.Msg; - }; - StructuralError.prototype.Error = function() { return this.$val.Error(); }; - SyntaxError.ptr.prototype.Error = function() { - var e; - e = this; - return "asn1: syntax error: " + e.Msg; - }; - SyntaxError.prototype.Error = function() { return this.$val.Error(); }; - parseBool = function(bytes$1) { - var _1, bytes$1, err, ret, x$3, x$4; - ret = false; - err = $ifaceNil; - if (!((bytes$1.$length === 1))) { - err = (x$3 = new SyntaxError.ptr("invalid boolean"), new x$3.constructor.elem(x$3)); - return [ret, err]; - } - _1 = (0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]); - if (_1 === (0)) { - ret = false; - } else if (_1 === (255)) { - ret = true; - } else { - err = (x$4 = new SyntaxError.ptr("invalid boolean"), new x$4.constructor.elem(x$4)); - } - return [ret, err]; - }; - checkInteger = function(bytes$1) { - var bytes$1, x$3, x$4; - if (bytes$1.$length === 0) { - return (x$3 = new StructuralError.ptr("empty integer"), new x$3.constructor.elem(x$3)); - } - if (bytes$1.$length === 1) { - return $ifaceNil; - } - if ((((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) === 0) && ((((1 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 1]) & 128) >>> 0) === 0)) || (((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) === 255) && ((((1 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 1]) & 128) >>> 0) === 128))) { - return (x$4 = new StructuralError.ptr("integer not minimally-encoded"), new x$4.constructor.elem(x$4)); - } - return $ifaceNil; - }; - parseInt64 = function(bytes$1) { - var bytes$1, bytesRead, err, ret, x$3, x$4; - ret = new $Int64(0, 0); - err = $ifaceNil; - err = checkInteger(bytes$1); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ret, err]; - } - if (bytes$1.$length > 8) { - err = (x$3 = new StructuralError.ptr("integer too large"), new x$3.constructor.elem(x$3)); - return [ret, err]; - } - bytesRead = 0; - while (true) { - if (!(bytesRead < bytes$1.$length)) { break; } - ret = $shiftLeft64(ret, (8)); - ret = (x$4 = (new $Int64(0, ((bytesRead < 0 || bytesRead >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + bytesRead]))), new $Int64(ret.$high | x$4.$high, (ret.$low | x$4.$low) >>> 0)); - bytesRead = bytesRead + (1) >> 0; - } - ret = $shiftLeft64(ret, ((64 - (((bytes$1.$length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24))); - ret = $shiftRightInt64(ret, ((64 - (((bytes$1.$length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24))); - return [ret, err]; - }; - parseInt32 = function(bytes$1) { - var _tuple, bytes$1, err, err$1, ret64, x$3, x$4; - err = checkInteger(bytes$1); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [0, err]; - } - _tuple = parseInt64(bytes$1); - ret64 = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - return [0, err$1]; - } - if (!((x$3 = (new $Int64(0, (((ret64.$low + ((ret64.$high >> 31) * 4294967296)) >> 0)))), (ret64.$high === x$3.$high && ret64.$low === x$3.$low)))) { - return [0, (x$4 = new StructuralError.ptr("integer too large"), new x$4.constructor.elem(x$4))]; - } - return [(((ret64.$low + ((ret64.$high >> 31) * 4294967296)) >> 0)), $ifaceNil]; - }; - parseBigInt = function(bytes$1) { - var {_i, _r, _ref, bytes$1, err, i, notBytes, ret, $s, $r, $c} = $restore(this, {bytes$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkInteger(bytes$1); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$1.nil, err]; - } - ret = new big.Int.ptr(false, big.nat.nil); - /* */ if (bytes$1.$length > 0 && ((((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) & 128) >>> 0) === 128)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (bytes$1.$length > 0 && ((((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) & 128) >>> 0) === 128)) { */ case 1: - notBytes = $makeSlice(sliceType, bytes$1.$length); - _ref = notBytes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= notBytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : notBytes.$array[notBytes.$offset + i] = (~((i < 0 || i >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + i]) << 24 >>> 24)); - _i++; - } - ret.SetBytes(notBytes); - _r = ret.Add(ret, bigOne); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - ret.Neg(ret); - $s = -1; return [ret, $ifaceNil]; - /* } */ case 2: - ret.SetBytes(bytes$1); - $s = -1; return [ret, $ifaceNil]; - /* */ } return; } var $f = {$blk: parseBigInt, $c: true, $r, _i, _r, _ref, bytes$1, err, i, notBytes, ret, $s};return $f; - }; - BitString.ptr.prototype.At = function(i) { - var _q, _r, b, i, x$3, x$4, y, y$1; - b = this; - if (i < 0 || i >= b.BitLength) { - return 0; - } - x$3 = (_q = i / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - y = 7 - (((_r = i % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)) >>> 0; - return ((((y$1 = y, y$1 < 32 ? ((x$4 = b.Bytes, ((x$3 < 0 || x$3 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$3])) >>> y$1) : 0) << 24 >>> 24) >> 0)) & 1; - }; - BitString.prototype.At = function(i) { return this.$val.At(i); }; - BitString.ptr.prototype.RightAlign = function() { - var _r, a, b, i, shift, x$3, x$4, x$5, x$6, y, y$1, y$2; - b = this; - shift = (((8 - ((_r = b.BitLength % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))) >> 0) >>> 0)); - if ((shift === 8) || (b.Bytes.$length === 0)) { - return b.Bytes; - } - a = $makeSlice(sliceType, b.Bytes.$length); - (0 >= a.$length ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + 0] = ((y = shift, y < 32 ? ((x$3 = b.Bytes, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])) >>> y) : 0) << 24 >>> 24)); - i = 1; - while (true) { - if (!(i < b.Bytes.$length)) { break; } - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = ((y$1 = ((8 - shift >>> 0)), y$1 < 32 ? ((x$4 = b.Bytes, x$5 = i - 1 >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])) << y$1) : 0) << 24 >>> 24)); - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = ((((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i]) | (((y$2 = shift, y$2 < 32 ? ((x$6 = b.Bytes, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])) >>> y$2) : 0) << 24 >>> 24))) >>> 0)); - i = i + (1) >> 0; - } - return a; - }; - BitString.prototype.RightAlign = function() { return this.$val.RightAlign(); }; - parseBitString = function(bytes$1) { - var bytes$1, err, paddingBits, ret, x$3, x$4, x$5, y; - ret = new BitString.ptr(sliceType.nil, 0); - err = $ifaceNil; - if (bytes$1.$length === 0) { - err = (x$3 = new SyntaxError.ptr("zero length BIT STRING"), new x$3.constructor.elem(x$3)); - return [ret, err]; - } - paddingBits = (((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) >> 0)); - if (paddingBits > 7 || (bytes$1.$length === 1) && paddingBits > 0 || !(((((x$4 = bytes$1.$length - 1 >> 0, ((x$4 < 0 || x$4 >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + x$4])) & (((((y = (0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]), y < 32 ? (1 << y) : 0) << 24 >>> 24)) - 1 << 24 >>> 24))) >>> 0) === 0))) { - err = (x$5 = new SyntaxError.ptr("invalid padding bits in BIT STRING"), new x$5.constructor.elem(x$5)); - return [ret, err]; - } - ret.BitLength = ($imul(((bytes$1.$length - 1 >> 0)), 8)) - paddingBits >> 0; - ret.Bytes = $subslice(bytes$1, 1); - return [ret, err]; - }; - ObjectIdentifier.prototype.Equal = function(other) { - var i, oi, other; - oi = this; - if (!((oi.$length === other.$length))) { - return false; - } - i = 0; - while (true) { - if (!(i < oi.$length)) { break; } - if (!((((i < 0 || i >= oi.$length) ? ($throwRuntimeError("index out of range"), undefined) : oi.$array[oi.$offset + i]) === ((i < 0 || i >= other.$length) ? ($throwRuntimeError("index out of range"), undefined) : other.$array[other.$offset + i])))) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - $ptrType(ObjectIdentifier).prototype.Equal = function(other) { return this.$get().Equal(other); }; - ObjectIdentifier.prototype.String = function() { - var _i, _ref, i, oi, s, v; - oi = this; - s = ""; - _ref = oi; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i > 0) { - s = s + ("."); - } - s = s + (strconv.Itoa(v)); - _i++; - } - return s; - }; - $ptrType(ObjectIdentifier).prototype.String = function() { return this.$get().String(); }; - parseObjectIdentifier = function(bytes$1) { - var _q, _r, _tuple, _tuple$1, bytes$1, err, i, offset, s, v, x$3; - s = ObjectIdentifier.nil; - err = $ifaceNil; - if (bytes$1.$length === 0) { - err = (x$3 = new SyntaxError.ptr("zero length OBJECT IDENTIFIER"), new x$3.constructor.elem(x$3)); - return [s, err]; - } - s = $convertSliceType($makeSlice(sliceType$3, (bytes$1.$length + 1 >> 0)), ObjectIdentifier); - _tuple = parseBase128Int(bytes$1, 0); - v = _tuple[0]; - offset = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [s, err]; - } - if (v < 80) { - (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0] = (_q = v / 40, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1] = (_r = v % 40, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))); - } else { - (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0] = 2); - (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1] = (v - 80 >> 0)); - } - i = 2; - while (true) { - if (!(offset < bytes$1.$length)) { break; } - _tuple$1 = parseBase128Int(bytes$1, offset); - v = _tuple$1[0]; - offset = _tuple$1[1]; - err = _tuple$1[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [s, err]; - } - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = v); - i = i + (1) >> 0; - } - s = $subslice(s, 0, i); - return [s, err]; - }; - parseBase128Int = function(bytes$1, initOffset) { - var b, bytes$1, err, initOffset, offset, ret, ret64, shifted, x$3, x$4, x$5, x$6, x$7; - ret = 0; - offset = 0; - err = $ifaceNil; - offset = initOffset; - ret64 = new $Int64(0, 0); - shifted = 0; - while (true) { - if (!(offset < bytes$1.$length)) { break; } - if (shifted === 5) { - err = (x$3 = new StructuralError.ptr("base 128 integer too large"), new x$3.constructor.elem(x$3)); - return [ret, offset, err]; - } - ret64 = $shiftLeft64(ret64, (7)); - b = ((offset < 0 || offset >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + offset]); - if ((shifted === 0) && (b === 128)) { - err = (x$4 = new SyntaxError.ptr("integer is not minimally encoded"), new x$4.constructor.elem(x$4)); - return [ret, offset, err]; - } - ret64 = (x$5 = (new $Int64(0, ((b & 127) >>> 0))), new $Int64(ret64.$high | x$5.$high, (ret64.$low | x$5.$low) >>> 0)); - offset = offset + (1) >> 0; - if (((b & 128) >>> 0) === 0) { - ret = (((ret64.$low + ((ret64.$high >> 31) * 4294967296)) >> 0)); - if ((ret64.$high > 0 || (ret64.$high === 0 && ret64.$low > 2147483647))) { - err = (x$6 = new StructuralError.ptr("base 128 integer too large"), new x$6.constructor.elem(x$6)); - } - return [ret, offset, err]; - } - shifted = shifted + (1) >> 0; - } - err = (x$7 = new SyntaxError.ptr("truncated base 128 integer"), new x$7.constructor.elem(x$7)); - return [ret, offset, err]; - }; - parseUTCTime = function(bytes$1) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, bytes$1, err, formatStr, ret, s, serialized, $s, $r, $c} = $restore(this, {bytes$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - err = $ifaceNil; - s = ($bytesToString(bytes$1)); - formatStr = "0601021504Z0700"; - _r = time.Parse(formatStr, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - time.Time.copy(ret, _tuple[0]); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - formatStr = "060102150405Z0700"; - _r$1 = time.Parse(formatStr, s); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - time.Time.copy(ret, _tuple$1[0]); - err = _tuple$1[1]; - /* } */ case 3: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ret, err]; - } - _r$2 = $clone(ret, time.Time).Format(formatStr); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - serialized = _r$2; - /* */ if (!(serialized === s)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(serialized === s)) { */ case 6: - _r$3 = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", new sliceType$4([new $String(s), new $String(serialized)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - $s = -1; return [ret, err]; - /* } */ case 7: - _r$4 = $clone(ret, time.Time).Year(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 >= 2050) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$4 >= 2050) { */ case 9: - _r$5 = $clone(ret, time.Time).AddDate(-100, 0, 0); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - time.Time.copy(ret, _r$5); - /* } */ case 10: - $s = -1; return [ret, err]; - /* */ } return; } var $f = {$blk: parseUTCTime, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, bytes$1, err, formatStr, ret, s, serialized, $s};return $f; - }; - parseGeneralizedTime = function(bytes$1) { - var {_r, _r$1, _r$2, _tuple, bytes$1, err, ret, s, serialized, $s, $r, $c} = $restore(this, {bytes$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - err = $ifaceNil; - s = ($bytesToString(bytes$1)); - _r = time.Parse("20060102150405Z0700", s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - time.Time.copy(ret, _tuple[0]); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ret, err]; - } - _r$1 = $clone(ret, time.Time).Format("20060102150405Z0700"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - serialized = _r$1; - /* */ if (!(serialized === s)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(serialized === s)) { */ case 3: - _r$2 = fmt.Errorf("asn1: time did not serialize back to the original value and may be invalid: given %q, but serialized as %q", new sliceType$4([new $String(s), new $String(serialized)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* } */ case 4: - $s = -1; return [ret, err]; - /* */ } return; } var $f = {$blk: parseGeneralizedTime, $c: true, $r, _r, _r$1, _r$2, _tuple, bytes$1, err, ret, s, serialized, $s};return $f; - }; - parseNumericString = function(bytes$1) { - var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, b, bytes$1, err, ret, x$3; - ret = ""; - err = $ifaceNil; - _ref = bytes$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!isNumeric(b)) { - _tmp = ""; - _tmp$1 = (x$3 = new SyntaxError.ptr("NumericString contains invalid character"), new x$3.constructor.elem(x$3)); - ret = _tmp; - err = _tmp$1; - return [ret, err]; - } - _i++; - } - _tmp$2 = ($bytesToString(bytes$1)); - _tmp$3 = $ifaceNil; - ret = _tmp$2; - err = _tmp$3; - return [ret, err]; - }; - isNumeric = function(b) { - var b; - return 48 <= b && b <= 57 || (b === 32); - }; - parsePrintableString = function(bytes$1) { - var _i, _ref, b, bytes$1, err, ret, x$3; - ret = ""; - err = $ifaceNil; - _ref = bytes$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!isPrintable(b, true, true)) { - err = (x$3 = new SyntaxError.ptr("PrintableString contains invalid character"), new x$3.constructor.elem(x$3)); - return [ret, err]; - } - _i++; - } - ret = ($bytesToString(bytes$1)); - return [ret, err]; - }; - isPrintable = function(b, asterisk, ampersand) { - var ampersand, asterisk, b; - return 97 <= b && b <= 122 || 65 <= b && b <= 90 || 48 <= b && b <= 57 || 39 <= b && b <= 41 || 43 <= b && b <= 47 || (b === 32) || (b === 58) || (b === 61) || (b === 63) || ((asterisk) && (b === 42)) || ((ampersand) && (b === 38)); - }; - parseIA5String = function(bytes$1) { - var _i, _ref, b, bytes$1, err, ret, x$3; - ret = ""; - err = $ifaceNil; - _ref = bytes$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (b >= 128) { - err = (x$3 = new SyntaxError.ptr("IA5String contains invalid character"), new x$3.constructor.elem(x$3)); - return [ret, err]; - } - _i++; - } - ret = ($bytesToString(bytes$1)); - return [ret, err]; - }; - parseT61String = function(bytes$1) { - var _tmp, _tmp$1, bytes$1, err, ret; - ret = ""; - err = $ifaceNil; - _tmp = ($bytesToString(bytes$1)); - _tmp$1 = $ifaceNil; - ret = _tmp; - err = _tmp$1; - return [ret, err]; - }; - parseUTF8String = function(bytes$1) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, bytes$1, err, ret; - ret = ""; - err = $ifaceNil; - if (!utf8.Valid(bytes$1)) { - _tmp = ""; - _tmp$1 = errors.New("asn1: invalid UTF-8 string"); - ret = _tmp; - err = _tmp$1; - return [ret, err]; - } - _tmp$2 = ($bytesToString(bytes$1)); - _tmp$3 = $ifaceNil; - ret = _tmp$2; - err = _tmp$3; - return [ret, err]; - }; - parseBMPString = function(bmpString) { - var _q, _r, bmpString, l, s, x$3, x$4; - if (!(((_r = bmpString.$length % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { - return ["", errors.New("pkcs12: odd-length BMP string")]; - } - l = bmpString.$length; - if (l >= 2 && ((x$3 = l - 1 >> 0, ((x$3 < 0 || x$3 >= bmpString.$length) ? ($throwRuntimeError("index out of range"), undefined) : bmpString.$array[bmpString.$offset + x$3])) === 0) && ((x$4 = l - 2 >> 0, ((x$4 < 0 || x$4 >= bmpString.$length) ? ($throwRuntimeError("index out of range"), undefined) : bmpString.$array[bmpString.$offset + x$4])) === 0)) { - bmpString = $subslice(bmpString, 0, (l - 2 >> 0)); - } - s = $makeSlice(sliceType$5, 0, (_q = bmpString.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - while (true) { - if (!(bmpString.$length > 0)) { break; } - s = $append(s, ((((0 >= bmpString.$length ? ($throwRuntimeError("index out of range"), undefined) : bmpString.$array[bmpString.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) + (((1 >= bmpString.$length ? ($throwRuntimeError("index out of range"), undefined) : bmpString.$array[bmpString.$offset + 1]) << 16 >>> 16)) << 16 >>> 16); - bmpString = $subslice(bmpString, 2); - } - return [($runesToString(utf16.Decode(s))), $ifaceNil]; - }; - parseTagAndLength = function(bytes$1, initOffset) { - var _tuple, b, bytes$1, err, i, initOffset, numBytes, offset, ret, x$3, x$4, x$5, x$6, x$7, x$8, x$9, y; - ret = new tagAndLength.ptr(0, 0, 0, false); - offset = 0; - err = $ifaceNil; - offset = initOffset; - if (offset >= bytes$1.$length) { - err = errors.New("asn1: internal error in parseTagAndLength"); - return [ret, offset, err]; - } - b = ((offset < 0 || offset >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + offset]); - offset = offset + (1) >> 0; - ret.class$0 = (((b >>> 6 << 24 >>> 24) >> 0)); - ret.isCompound = ((b & 32) >>> 0) === 32; - ret.tag = ((((b & 31) >>> 0) >> 0)); - if (ret.tag === 31) { - _tuple = parseBase128Int(bytes$1, offset); - ret.tag = _tuple[0]; - offset = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ret, offset, err]; - } - if (ret.tag < 31) { - err = (x$3 = new SyntaxError.ptr("non-minimal tag"), new x$3.constructor.elem(x$3)); - return [ret, offset, err]; - } - } - if (offset >= bytes$1.$length) { - err = (x$4 = new SyntaxError.ptr("truncated tag or length"), new x$4.constructor.elem(x$4)); - return [ret, offset, err]; - } - b = ((offset < 0 || offset >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + offset]); - offset = offset + (1) >> 0; - if (((b & 128) >>> 0) === 0) { - ret.length = ((((b & 127) >>> 0) >> 0)); - } else { - numBytes = ((((b & 127) >>> 0) >> 0)); - if (numBytes === 0) { - err = (x$5 = new SyntaxError.ptr("indefinite length found (not DER)"), new x$5.constructor.elem(x$5)); - return [ret, offset, err]; - } - ret.length = 0; - i = 0; - while (true) { - if (!(i < numBytes)) { break; } - if (offset >= bytes$1.$length) { - err = (x$6 = new SyntaxError.ptr("truncated tag or length"), new x$6.constructor.elem(x$6)); - return [ret, offset, err]; - } - b = ((offset < 0 || offset >= bytes$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + offset]); - offset = offset + (1) >> 0; - if (ret.length >= 8388608) { - err = (x$7 = new StructuralError.ptr("length too large"), new x$7.constructor.elem(x$7)); - return [ret, offset, err]; - } - ret.length = (y = (8), y < 32 ? (ret.length << y) : 0) >> 0; - ret.length = ret.length | (((b >> 0))); - if (ret.length === 0) { - err = (x$8 = new StructuralError.ptr("superfluous leading zeros in length"), new x$8.constructor.elem(x$8)); - return [ret, offset, err]; - } - i = i + (1) >> 0; - } - if (ret.length < 128) { - err = (x$9 = new StructuralError.ptr("non-minimal length"), new x$9.constructor.elem(x$9)); - return [ret, offset, err]; - } - } - return [ret, offset, err]; - }; - parseSequenceOf = function(bytes$1, sliceType$6, elemType) { - var {_1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, bytes$1, compoundType, elemType, err, expectedTag, i, matchAny, numElements, offset, offset$1, ok, params, ret, sliceType$6, t, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {bytes$1, sliceType$6, elemType}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = new reflect.Value.ptr(ptrType$4.nil, 0, 0); - err = $ifaceNil; - _r = getUniversalType(elemType); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - matchAny = _tuple[0]; - expectedTag = _tuple[1]; - compoundType = _tuple[2]; - ok = _tuple[3]; - if (!ok) { - err = (x$3 = new StructuralError.ptr("unknown Go type for slice"), new x$3.constructor.elem(x$3)); - $s = -1; return [ret, err]; - } - numElements = 0; - offset = 0; - while (true) { - if (!(offset < bytes$1.$length)) { break; } - t = new tagAndLength.ptr(0, 0, 0, false); - _tuple$1 = parseTagAndLength(bytes$1, offset); - tagAndLength.copy(t, _tuple$1[0]); - offset = _tuple$1[1]; - err = _tuple$1[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ret, err]; - } - _1 = t.tag; - if ((_1 === (22)) || (_1 === (27)) || (_1 === (20)) || (_1 === (12)) || (_1 === (18)) || (_1 === (30))) { - t.tag = 19; - } else if ((_1 === (24)) || (_1 === (23))) { - t.tag = 23; - } - if (!matchAny && (!((t.class$0 === 0)) || !(t.isCompound === compoundType) || !((t.tag === expectedTag)))) { - err = (x$4 = new StructuralError.ptr("sequence tag mismatch"), new x$4.constructor.elem(x$4)); - $s = -1; return [ret, err]; - } - if (invalidLength(offset, t.length, bytes$1.$length)) { - err = (x$5 = new SyntaxError.ptr("truncated sequence"), new x$5.constructor.elem(x$5)); - $s = -1; return [ret, err]; - } - offset = offset + (t.length) >> 0; - numElements = numElements + (1) >> 0; - } - _r$1 = reflect.MakeSlice(sliceType$6, numElements, numElements); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ret = _r$1; - params = new fieldParameters.ptr(false, false, false, false, ptrType$2.nil, ptrType$3.nil, 0, 0, false, false); - offset$1 = 0; - i = 0; - /* while (true) { */ case 3: - /* if (!(i < numElements)) { break; } */ if(!(i < numElements)) { $s = 4; continue; } - _r$2 = $clone(ret, reflect.Value).Index(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = parseField($clone(_r$2, reflect.Value), bytes$1, offset$1, $clone(params, fieldParameters)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - offset$1 = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ret, err]; - } - i = i + (1) >> 0; - $s = 3; continue; - case 4: - $s = -1; return [ret, err]; - /* */ } return; } var $f = {$blk: parseSequenceOf, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, bytes$1, compoundType, elemType, err, expectedTag, i, matchAny, numElements, offset, offset$1, ok, params, ret, sliceType$6, t, x$3, x$4, x$5, $s};return $f; - }; - invalidLength = function(offset, length, sliceLength) { - var length, offset, sliceLength; - return (offset + length >> 0) < offset || (offset + length >> 0) > sliceLength; - }; - parseField = function(v, bytes$1, initOffset, params) { - var {_1, _2, _3, _4, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, _v, _v$1, bytes$1, bytes$2, compoundType, err, err1, err1$1, err1$2, err1$3, err1$4, err1$5, expectedClass, expectedClass$1, expectedTag, field, fieldType, i, i$1, ifaceType, initOffset, innerBytes, innerBytes$1, innerOffset, matchAny, matchAnyClassAndTag, newSlice, offset, ok, ok$1, ok1, params, parsedBool, parsedInt, parsedInt$1, parsedInt$2, parsedInt$3, result, sliceType$6, structType, t, t$1, universalTag, v, v$1, v$2, v$3, v$4, v$5, v$6, v$7, v$8, val, x$10, x$11, x$12, x$13, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {v, bytes$1, initOffset, params}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - offset = 0; - err = $ifaceNil; - offset = initOffset; - fieldType = $clone(v, reflect.Value).Type(); - if (offset === bytes$1.$length) { - if (!setDefaultValue($clone(v, reflect.Value), $clone(params, fieldParameters))) { - err = (x$3 = new SyntaxError.ptr("sequence truncated"), new x$3.constructor.elem(x$3)); - } - $s = -1; return [offset, err]; - } - ifaceType = fieldType; - _r = ifaceType.Kind(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - if (!(_r === 20)) { _v = false; $s = 3; continue s; } - _r$1 = ifaceType.NumMethod(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === 0; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - t = new tagAndLength.ptr(0, 0, 0, false); - _tuple = parseTagAndLength(bytes$1, offset); - tagAndLength.copy(t, _tuple[0]); - offset = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [offset, err]; - } - if (invalidLength(offset, t.length, bytes$1.$length)) { - err = (x$4 = new SyntaxError.ptr("data truncated"), new x$4.constructor.elem(x$4)); - $s = -1; return [offset, err]; - } - result = $ifaceNil; - /* */ if (!t.isCompound && (t.class$0 === 0)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!t.isCompound && (t.class$0 === 0)) { */ case 6: - innerBytes = $subslice(bytes$1, offset, (offset + t.length >> 0)); - _1 = t.tag; - /* */ if (_1 === (19)) { $s = 9; continue; } - /* */ if (_1 === (18)) { $s = 10; continue; } - /* */ if (_1 === (22)) { $s = 11; continue; } - /* */ if (_1 === (20)) { $s = 12; continue; } - /* */ if (_1 === (12)) { $s = 13; continue; } - /* */ if (_1 === (2)) { $s = 14; continue; } - /* */ if (_1 === (3)) { $s = 15; continue; } - /* */ if (_1 === (6)) { $s = 16; continue; } - /* */ if (_1 === (23)) { $s = 17; continue; } - /* */ if (_1 === (24)) { $s = 18; continue; } - /* */ if (_1 === (4)) { $s = 19; continue; } - /* */ if (_1 === (30)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_1 === (19)) { */ case 9: - _tuple$1 = parsePrintableString(innerBytes); - result = new $String(_tuple$1[0]); - err = _tuple$1[1]; - $s = 21; continue; - /* } else if (_1 === (18)) { */ case 10: - _tuple$2 = parseNumericString(innerBytes); - result = new $String(_tuple$2[0]); - err = _tuple$2[1]; - $s = 21; continue; - /* } else if (_1 === (22)) { */ case 11: - _tuple$3 = parseIA5String(innerBytes); - result = new $String(_tuple$3[0]); - err = _tuple$3[1]; - $s = 21; continue; - /* } else if (_1 === (20)) { */ case 12: - _tuple$4 = parseT61String(innerBytes); - result = new $String(_tuple$4[0]); - err = _tuple$4[1]; - $s = 21; continue; - /* } else if (_1 === (12)) { */ case 13: - _tuple$5 = parseUTF8String(innerBytes); - result = new $String(_tuple$5[0]); - err = _tuple$5[1]; - $s = 21; continue; - /* } else if (_1 === (2)) { */ case 14: - _tuple$6 = parseInt64(innerBytes); - result = _tuple$6[0]; - err = _tuple$6[1]; - $s = 21; continue; - /* } else if (_1 === (3)) { */ case 15: - _tuple$7 = parseBitString(innerBytes); - result = new _tuple$7[0].constructor.elem(_tuple$7[0]); - err = _tuple$7[1]; - $s = 21; continue; - /* } else if (_1 === (6)) { */ case 16: - _tuple$8 = parseObjectIdentifier(innerBytes); - result = _tuple$8[0]; - err = _tuple$8[1]; - $s = 21; continue; - /* } else if (_1 === (23)) { */ case 17: - _r$2 = parseUTCTime(innerBytes); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$9 = _r$2; - result = new _tuple$9[0].constructor.elem(_tuple$9[0]); - err = _tuple$9[1]; - $s = 21; continue; - /* } else if (_1 === (24)) { */ case 18: - _r$3 = parseGeneralizedTime(innerBytes); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$10 = _r$3; - result = new _tuple$10[0].constructor.elem(_tuple$10[0]); - err = _tuple$10[1]; - $s = 21; continue; - /* } else if (_1 === (4)) { */ case 19: - result = innerBytes; - $s = 21; continue; - /* } else if (_1 === (30)) { */ case 20: - _tuple$11 = parseBMPString(innerBytes); - result = new $String(_tuple$11[0]); - err = _tuple$11[1]; - /* } */ case 21: - case 8: - /* } */ case 7: - offset = offset + (t.length) >> 0; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [offset, err]; - } - /* */ if (!($interfaceIsEqual(result, $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(result, $ifaceNil))) { */ case 24: - _r$4 = reflect.ValueOf(result); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = $clone(v, reflect.Value).Set($clone(_r$4, reflect.Value)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - $s = -1; return [offset, err]; - /* } */ case 2: - _tuple$12 = parseTagAndLength(bytes$1, offset); - t$1 = $clone(_tuple$12[0], tagAndLength); - offset = _tuple$12[1]; - err = _tuple$12[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [offset, err]; - } - if (params.explicit) { - expectedClass = 2; - if (params.application) { - expectedClass = 1; - } - if (offset === bytes$1.$length) { - err = (x$5 = new StructuralError.ptr("explicit tag has no child"), new x$5.constructor.elem(x$5)); - $s = -1; return [offset, err]; - } - if ((t$1.class$0 === expectedClass) && (t$1.tag === params.tag.$get()) && ((t$1.length === 0) || t$1.isCompound)) { - if ($interfaceIsEqual(fieldType, rawValueType)) { - } else if (t$1.length > 0) { - _tuple$13 = parseTagAndLength(bytes$1, offset); - tagAndLength.copy(t$1, _tuple$13[0]); - offset = _tuple$13[1]; - err = _tuple$13[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [offset, err]; - } - } else { - if (!($interfaceIsEqual(fieldType, flagType))) { - err = (x$6 = new StructuralError.ptr("zero length explicit tag was not an asn1.Flag"), new x$6.constructor.elem(x$6)); - $s = -1; return [offset, err]; - } - $clone(v, reflect.Value).SetBool(true); - $s = -1; return [offset, err]; - } - } else { - ok = setDefaultValue($clone(v, reflect.Value), $clone(params, fieldParameters)); - if (ok) { - offset = initOffset; - } else { - err = (x$7 = new StructuralError.ptr("explicitly tagged member didn't match"), new x$7.constructor.elem(x$7)); - } - $s = -1; return [offset, err]; - } - } - _r$5 = getUniversalType(fieldType); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$14 = _r$5; - matchAny = _tuple$14[0]; - universalTag = _tuple$14[1]; - compoundType = _tuple$14[2]; - ok1 = _tuple$14[3]; - /* */ if (!ok1) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!ok1) { */ case 29: - _r$6 = fmt.Sprintf("unknown Go type: %v", new sliceType$4([fieldType])); /* */ $s = 31; case 31: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = (x$8 = new StructuralError.ptr(_r$6), new x$8.constructor.elem(x$8)); - $s = -1; return [offset, err]; - /* } */ case 30: - if (universalTag === 19) { - if (t$1.class$0 === 0) { - _2 = t$1.tag; - if ((_2 === (22)) || (_2 === (27)) || (_2 === (20)) || (_2 === (12)) || (_2 === (18)) || (_2 === (30))) { - universalTag = t$1.tag; - } - } else if (!((params.stringType === 0))) { - universalTag = params.stringType; - } - } - if ((universalTag === 23) && (t$1.tag === 24) && (t$1.class$0 === 0)) { - universalTag = 24; - } - if (params.set) { - universalTag = 17; - } - matchAnyClassAndTag = matchAny; - expectedClass$1 = 0; - expectedTag = universalTag; - if (!params.explicit && !(params.tag === ptrType$3.nil)) { - expectedClass$1 = 2; - expectedTag = params.tag.$get(); - matchAnyClassAndTag = false; - } - if (!params.explicit && params.application && !(params.tag === ptrType$3.nil)) { - expectedClass$1 = 1; - expectedTag = params.tag.$get(); - matchAnyClassAndTag = false; - } - if (!params.explicit && params.private$3 && !(params.tag === ptrType$3.nil)) { - expectedClass$1 = 3; - expectedTag = params.tag.$get(); - matchAnyClassAndTag = false; - } - /* */ if (!matchAnyClassAndTag && (!((t$1.class$0 === expectedClass$1)) || !((t$1.tag === expectedTag))) || (!matchAny && !(t$1.isCompound === compoundType))) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!matchAnyClassAndTag && (!((t$1.class$0 === expectedClass$1)) || !((t$1.tag === expectedTag))) || (!matchAny && !(t$1.isCompound === compoundType))) { */ case 32: - ok$1 = setDefaultValue($clone(v, reflect.Value), $clone(params, fieldParameters)); - /* */ if (ok$1) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (ok$1) { */ case 34: - offset = initOffset; - $s = 36; continue; - /* } else { */ case 35: - _arg = new $Int(expectedTag); - _arg$1 = new t$1.constructor.elem(t$1); - _arg$2 = new params.constructor.elem(params); - _r$7 = fieldType.Name(); /* */ $s = 37; case 37: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$3 = new $String(_r$7); - _arg$4 = new $Int(offset); - _r$8 = fmt.Sprintf("tags don't match (%d vs %+v) %+v %s @%d", new sliceType$4([_arg, _arg$1, _arg$2, _arg$3, _arg$4])); /* */ $s = 38; case 38: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = (x$9 = new StructuralError.ptr(_r$8), new x$9.constructor.elem(x$9)); - /* } */ case 36: - $s = -1; return [offset, err]; - /* } */ case 33: - if (invalidLength(offset, t$1.length, bytes$1.$length)) { - err = (x$10 = new SyntaxError.ptr("data truncated"), new x$10.constructor.elem(x$10)); - $s = -1; return [offset, err]; - } - innerBytes$1 = $subslice(bytes$1, offset, (offset + t$1.length >> 0)); - offset = offset + (t$1.length) >> 0; - _r$9 = $clone($clone(v, reflect.Value).Addr(), reflect.Value).Interface(); /* */ $s = 39; case 39: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _ref = _r$9; - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 40; continue; } - /* */ if ($assertType(_ref, ptrType$6, true)[1]) { $s = 41; continue; } - /* */ if ($assertType(_ref, ptrType$7, true)[1]) { $s = 42; continue; } - /* */ if ($assertType(_ref, ptrType$8, true)[1]) { $s = 43; continue; } - /* */ if ($assertType(_ref, ptrType$9, true)[1]) { $s = 44; continue; } - /* */ if ($assertType(_ref, ptrType$10, true)[1]) { $s = 45; continue; } - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if ($assertType(_ref, ptrType$5, true)[1]) { */ case 40: - v$1 = _ref.$val; - RawValue.copy(v$1, new RawValue.ptr(t$1.class$0, t$1.tag, t$1.isCompound, innerBytes$1, $subslice(bytes$1, initOffset, offset))); - $s = -1; return [offset, err]; - /* } else if ($assertType(_ref, ptrType$6, true)[1]) { */ case 41: - v$2 = _ref.$val; - _tuple$15 = parseObjectIdentifier(innerBytes$1); - v$2.$set(_tuple$15[0]); - err = _tuple$15[1]; - $s = -1; return [offset, err]; - /* } else if ($assertType(_ref, ptrType$7, true)[1]) { */ case 42: - v$3 = _ref.$val; - _tuple$16 = parseBitString(innerBytes$1); - BitString.copy(v$3, _tuple$16[0]); - err = _tuple$16[1]; - $s = -1; return [offset, err]; - /* } else if ($assertType(_ref, ptrType$8, true)[1]) { */ case 43: - v$4 = _ref.$val; - /* */ if (universalTag === 23) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (universalTag === 23) { */ case 48: - _r$10 = parseUTCTime(innerBytes$1); /* */ $s = 50; case 50: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$17 = _r$10; - time.Time.copy(v$4, _tuple$17[0]); - err = _tuple$17[1]; - $s = -1; return [offset, err]; - /* } */ case 49: - _r$11 = parseGeneralizedTime(innerBytes$1); /* */ $s = 51; case 51: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$18 = _r$11; - time.Time.copy(v$4, _tuple$18[0]); - err = _tuple$18[1]; - $s = -1; return [offset, err]; - /* } else if ($assertType(_ref, ptrType$9, true)[1]) { */ case 44: - v$5 = _ref.$val; - _tuple$19 = parseInt32(innerBytes$1); - parsedInt = _tuple$19[0]; - err1 = _tuple$19[1]; - if ($interfaceIsEqual(err1, $ifaceNil)) { - v$5.$set(((parsedInt >> 0))); - } - err = err1; - $s = -1; return [offset, err]; - /* } else if ($assertType(_ref, ptrType$10, true)[1]) { */ case 45: - v$6 = _ref.$val; - v$6.$set(true); - $s = -1; return [offset, err]; - /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 46: - v$7 = _ref.$val; - _r$12 = parseBigInt(innerBytes$1); /* */ $s = 52; case 52: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$20 = _r$12; - parsedInt$1 = _tuple$20[0]; - err1$1 = _tuple$20[1]; - if ($interfaceIsEqual(err1$1, $ifaceNil)) { - v$7.$set(parsedInt$1); - } - err = err1$1; - $s = -1; return [offset, err]; - /* } */ case 47: - val = v; - _3 = $clone(val, reflect.Value).Kind(); - /* */ if (_3 === (1)) { $s = 54; continue; } - /* */ if ((_3 === (2)) || (_3 === (5)) || (_3 === (6))) { $s = 55; continue; } - /* */ if (_3 === (25)) { $s = 56; continue; } - /* */ if (_3 === (23)) { $s = 57; continue; } - /* */ if (_3 === (24)) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (_3 === (1)) { */ case 54: - _tuple$21 = parseBool(innerBytes$1); - parsedBool = _tuple$21[0]; - err1$2 = _tuple$21[1]; - if ($interfaceIsEqual(err1$2, $ifaceNil)) { - $clone(val, reflect.Value).SetBool(parsedBool); - } - err = err1$2; - $s = -1; return [offset, err]; - /* } else if ((_3 === (2)) || (_3 === (5)) || (_3 === (6))) { */ case 55: - _r$13 = $clone(val, reflect.Value).Type().Size(); /* */ $s = 63; case 63: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (_r$13 === 4) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (_r$13 === 4) { */ case 60: - _tuple$22 = parseInt32(innerBytes$1); - parsedInt$2 = _tuple$22[0]; - err1$3 = _tuple$22[1]; - if ($interfaceIsEqual(err1$3, $ifaceNil)) { - $clone(val, reflect.Value).SetInt((new $Int64(0, parsedInt$2))); - } - err = err1$3; - $s = 62; continue; - /* } else { */ case 61: - _tuple$23 = parseInt64(innerBytes$1); - parsedInt$3 = _tuple$23[0]; - err1$4 = _tuple$23[1]; - if ($interfaceIsEqual(err1$4, $ifaceNil)) { - $clone(val, reflect.Value).SetInt(parsedInt$3); - } - err = err1$4; - /* } */ case 62: - $s = -1; return [offset, err]; - /* } else if (_3 === (25)) { */ case 56: - structType = fieldType; - i = 0; - /* while (true) { */ case 64: - _r$14 = structType.NumField(); /* */ $s = 66; case 66: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* if (!(i < _r$14)) { break; } */ if(!(i < _r$14)) { $s = 65; continue; } - _r$15 = structType.Field(i); /* */ $s = 69; case 69: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $clone(_r$15, reflect.StructField).IsExported(); /* */ $s = 70; case 70: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - /* */ if (!_r$16) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if (!_r$16) { */ case 67: - err = (x$11 = new StructuralError.ptr("struct contains unexported fields"), new x$11.constructor.elem(x$11)); - $s = -1; return [offset, err]; - /* } */ case 68: - i = i + (1) >> 0; - $s = 64; continue; - case 65: - _r$17 = structType.NumField(); /* */ $s = 74; case 74: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - if (!(_r$17 > 0)) { _v$1 = false; $s = 73; continue s; } - _r$18 = structType.Field(0); /* */ $s = 75; case 75: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _v$1 = $interfaceIsEqual(_r$18.Type, rawContentsType); case 73: - /* */ if (_v$1) { $s = 71; continue; } - /* */ $s = 72; continue; - /* if (_v$1) { */ case 71: - bytes$2 = $subslice(bytes$1, initOffset, offset); - _r$19 = $clone(val, reflect.Value).Field(0); /* */ $s = 76; case 76: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = reflect.ValueOf(($convertSliceType(bytes$2, RawContent))); /* */ $s = 77; case 77: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $r = $clone(_r$19, reflect.Value).Set($clone(_r$20, reflect.Value)); /* */ $s = 78; case 78: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 72: - innerOffset = 0; - i$1 = 0; - /* while (true) { */ case 79: - _r$21 = structType.NumField(); /* */ $s = 81; case 81: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - /* if (!(i$1 < _r$21)) { break; } */ if(!(i$1 < _r$21)) { $s = 80; continue; } - _r$22 = structType.Field(i$1); /* */ $s = 82; case 82: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - field = $clone(_r$22, reflect.StructField); - if ((i$1 === 0) && $interfaceIsEqual(field.Type, rawContentsType)) { - i$1 = i$1 + (1) >> 0; - /* continue; */ $s = 79; continue; - } - _r$23 = $clone(val, reflect.Value).Field(i$1); /* */ $s = 83; case 83: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = parseField($clone(_r$23, reflect.Value), innerBytes$1, innerOffset, $clone(parseFieldParameters(new reflect.StructTag(field.Tag).Get("asn1")), fieldParameters)); /* */ $s = 84; case 84: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _tuple$24 = _r$24; - innerOffset = _tuple$24[0]; - err = _tuple$24[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [offset, err]; - } - i$1 = i$1 + (1) >> 0; - $s = 79; continue; - case 80: - $s = -1; return [offset, err]; - /* } else if (_3 === (23)) { */ case 57: - sliceType$6 = fieldType; - _r$25 = sliceType$6.Elem(); /* */ $s = 87; case 87: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = _r$25.Kind(); /* */ $s = 88; case 88: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - /* */ if (_r$26 === 8) { $s = 85; continue; } - /* */ $s = 86; continue; - /* if (_r$26 === 8) { */ case 85: - _r$27 = reflect.MakeSlice(sliceType$6, innerBytes$1.$length, innerBytes$1.$length); /* */ $s = 89; case 89: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $r = $clone(val, reflect.Value).Set($clone(_r$27, reflect.Value)); /* */ $s = 90; case 90: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _arg$5 = $clone(val, reflect.Value); - _r$28 = reflect.ValueOf(innerBytes$1); /* */ $s = 91; case 91: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _arg$6 = $clone(_r$28, reflect.Value); - _r$29 = reflect.Copy(_arg$5, _arg$6); /* */ $s = 92; case 92: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$29; - $s = -1; return [offset, err]; - /* } */ case 86: - _arg$7 = innerBytes$1; - _arg$8 = sliceType$6; - _r$30 = sliceType$6.Elem(); /* */ $s = 93; case 93: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _arg$9 = _r$30; - _r$31 = parseSequenceOf(_arg$7, _arg$8, _arg$9); /* */ $s = 94; case 94: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _tuple$25 = _r$31; - newSlice = _tuple$25[0]; - err1$5 = _tuple$25[1]; - /* */ if ($interfaceIsEqual(err1$5, $ifaceNil)) { $s = 95; continue; } - /* */ $s = 96; continue; - /* if ($interfaceIsEqual(err1$5, $ifaceNil)) { */ case 95: - $r = $clone(val, reflect.Value).Set($clone(newSlice, reflect.Value)); /* */ $s = 97; case 97: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 96: - err = err1$5; - $s = -1; return [offset, err]; - /* } else if (_3 === (24)) { */ case 58: - v$8 = ""; - _4 = universalTag; - /* */ if (_4 === (19)) { $s = 99; continue; } - /* */ if (_4 === (18)) { $s = 100; continue; } - /* */ if (_4 === (22)) { $s = 101; continue; } - /* */ if (_4 === (20)) { $s = 102; continue; } - /* */ if (_4 === (12)) { $s = 103; continue; } - /* */ if (_4 === (27)) { $s = 104; continue; } - /* */ if (_4 === (30)) { $s = 105; continue; } - /* */ $s = 106; continue; - /* if (_4 === (19)) { */ case 99: - _tuple$26 = parsePrintableString(innerBytes$1); - v$8 = _tuple$26[0]; - err = _tuple$26[1]; - $s = 107; continue; - /* } else if (_4 === (18)) { */ case 100: - _tuple$27 = parseNumericString(innerBytes$1); - v$8 = _tuple$27[0]; - err = _tuple$27[1]; - $s = 107; continue; - /* } else if (_4 === (22)) { */ case 101: - _tuple$28 = parseIA5String(innerBytes$1); - v$8 = _tuple$28[0]; - err = _tuple$28[1]; - $s = 107; continue; - /* } else if (_4 === (20)) { */ case 102: - _tuple$29 = parseT61String(innerBytes$1); - v$8 = _tuple$29[0]; - err = _tuple$29[1]; - $s = 107; continue; - /* } else if (_4 === (12)) { */ case 103: - _tuple$30 = parseUTF8String(innerBytes$1); - v$8 = _tuple$30[0]; - err = _tuple$30[1]; - $s = 107; continue; - /* } else if (_4 === (27)) { */ case 104: - _tuple$31 = parseT61String(innerBytes$1); - v$8 = _tuple$31[0]; - err = _tuple$31[1]; - $s = 107; continue; - /* } else if (_4 === (30)) { */ case 105: - _tuple$32 = parseBMPString(innerBytes$1); - v$8 = _tuple$32[0]; - err = _tuple$32[1]; - $s = 107; continue; - /* } else { */ case 106: - _r$32 = fmt.Sprintf("internal error: unknown string type %d", new sliceType$4([new $Int(universalTag)])); /* */ $s = 108; case 108: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - err = (x$12 = new SyntaxError.ptr(_r$32), new x$12.constructor.elem(x$12)); - /* } */ case 107: - case 98: - if ($interfaceIsEqual(err, $ifaceNil)) { - $clone(val, reflect.Value).SetString(v$8); - } - $s = -1; return [offset, err]; - /* } */ case 59: - case 53: - _r$33 = $clone(v, reflect.Value).Type().String(); /* */ $s = 109; case 109: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - err = (x$13 = new StructuralError.ptr("unsupported: " + _r$33), new x$13.constructor.elem(x$13)); - $s = -1; return [offset, err]; - /* */ } return; } var $f = {$blk: parseField, $c: true, $r, _1, _2, _3, _4, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _arg$8, _arg$9, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$20, _tuple$21, _tuple$22, _tuple$23, _tuple$24, _tuple$25, _tuple$26, _tuple$27, _tuple$28, _tuple$29, _tuple$3, _tuple$30, _tuple$31, _tuple$32, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, _v, _v$1, bytes$1, bytes$2, compoundType, err, err1, err1$1, err1$2, err1$3, err1$4, err1$5, expectedClass, expectedClass$1, expectedTag, field, fieldType, i, i$1, ifaceType, initOffset, innerBytes, innerBytes$1, innerOffset, matchAny, matchAnyClassAndTag, newSlice, offset, ok, ok$1, ok1, params, parsedBool, parsedInt, parsedInt$1, parsedInt$2, parsedInt$3, result, sliceType$6, structType, t, t$1, universalTag, v, v$1, v$2, v$3, v$4, v$5, v$6, v$7, v$8, val, x$10, x$11, x$12, x$13, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - canHaveDefaultValue = function(k) { - var _1, k; - _1 = k; - if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { - return true; - } - return false; - }; - setDefaultValue = function(v, params) { - var ok, params, v; - ok = false; - if (!params.optional) { - return ok; - } - ok = true; - if (params.defaultValue === ptrType$2.nil) { - return ok; - } - if (canHaveDefaultValue($clone(v, reflect.Value).Kind())) { - $clone(v, reflect.Value).SetInt(params.defaultValue.$get()); - } - return ok; - }; - Unmarshal = function(b, val) { - var {$24r, _r, _tuple, b, err, rest, val, $s, $r, $c} = $restore(this, {b, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rest = sliceType.nil; - err = $ifaceNil; - _r = UnmarshalWithParams(b, val, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - rest = _tuple[0]; - err = _tuple[1]; - $24r = [rest, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Unmarshal, $c: true, $r, $24r, _r, _tuple, b, err, rest, val, $s};return $f; - }; - $pkg.Unmarshal = Unmarshal; - invalidUnmarshalError.ptr.prototype.Error = function() { - var {$24r, $24r$1, _r, _r$1, _r$2, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - if ($interfaceIsEqual(e.Type, $ifaceNil)) { - $s = -1; return "asn1: Unmarshal recipient value is nil"; - } - _r = e.Type.Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 22))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 22))) { */ case 1: - _r$1 = e.Type.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = "asn1: Unmarshal recipient value is non-pointer " + _r$1; - $s = 5; case 5: return $24r; - /* } */ case 2: - _r$2 = e.Type.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = "asn1: Unmarshal recipient value is nil " + _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: invalidUnmarshalError.ptr.prototype.Error, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, e, $s};return $f; - }; - invalidUnmarshalError.prototype.Error = function() { return this.$val.Error(); }; - UnmarshalWithParams = function(b, val, params) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, offset, params, rest, v, val, $s, $r, $c} = $restore(this, {b, val, params}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rest = sliceType.nil; - err = $ifaceNil; - _r = reflect.ValueOf(val); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - if (!(($clone(v, reflect.Value).Kind() === 22)) || $clone(v, reflect.Value).IsNil()) { - _tmp = sliceType.nil; - _tmp$1 = new invalidUnmarshalError.ptr(reflect.TypeOf(val)); - rest = _tmp; - err = _tmp$1; - $s = -1; return [rest, err]; - } - _r$1 = $clone(v, reflect.Value).Elem(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = parseField($clone(_r$1, reflect.Value), b, 0, $clone(parseFieldParameters(params), fieldParameters)); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - offset = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = sliceType.nil; - _tmp$3 = err; - rest = _tmp$2; - err = _tmp$3; - $s = -1; return [rest, err]; - } - _tmp$4 = $subslice(b, offset); - _tmp$5 = $ifaceNil; - rest = _tmp$4; - err = _tmp$5; - $s = -1; return [rest, err]; - /* */ } return; } var $f = {$blk: UnmarshalWithParams, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, b, err, offset, params, rest, v, val, $s};return $f; - }; - $pkg.UnmarshalWithParams = UnmarshalWithParams; - byteEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - bytesEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - stringEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - multiEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - setEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - ptrType$12.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - int64Encoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - bitStringEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - oidEncoder.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}]; - StructuralError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - SyntaxError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - BitString.methods = [{prop: "At", name: "At", pkg: "", typ: $funcType([$Int], [$Int], false)}, {prop: "RightAlign", name: "RightAlign", pkg: "", typ: $funcType([], [sliceType], false)}]; - ObjectIdentifier.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ObjectIdentifier], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$13.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - encoder.init([{prop: "Encode", name: "Encode", pkg: "", typ: $funcType([sliceType], [], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}]); - bytesEncoder.init($Uint8); - multiEncoder.init(encoder); - setEncoder.init(encoder); - taggedEncoder.init("encoding/asn1", [{prop: "scratch", name: "scratch", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: encoder, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: encoder, tag: ""}]); - bitStringEncoder.init("", [{prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "BitLength", name: "BitLength", embedded: false, exported: true, typ: $Int, tag: ""}]); - oidEncoder.init($Int); - tagAndLength.init("encoding/asn1", [{prop: "class$0", name: "class", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "length", name: "length", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "isCompound", name: "isCompound", embedded: false, exported: false, typ: $Bool, tag: ""}]); - fieldParameters.init("encoding/asn1", [{prop: "optional", name: "optional", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "explicit", name: "explicit", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "application", name: "application", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "private$3", name: "private", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "defaultValue", name: "defaultValue", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "tag", name: "tag", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "stringType", name: "stringType", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "timeType", name: "timeType", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "set", name: "set", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "omitEmpty", name: "omitEmpty", embedded: false, exported: false, typ: $Bool, tag: ""}]); - StructuralError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}]); - SyntaxError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}]); - BitString.init("", [{prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "BitLength", name: "BitLength", embedded: false, exported: true, typ: $Int, tag: ""}]); - ObjectIdentifier.init($Int); - RawValue.init("", [{prop: "Class", name: "Class", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Tag", name: "Tag", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "IsCompound", name: "IsCompound", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "FullBytes", name: "FullBytes", embedded: false, exported: true, typ: sliceType, tag: ""}]); - RawContent.init($Uint8); - invalidUnmarshalError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: reflect.Type, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf16.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - byte00Encoder = new byteEncoder(0); - byteFFEncoder = new byteEncoder(255); - bigOne = big.NewInt(new $Int64(0, 1)); - $pkg.NullRawValue = new RawValue.ptr(0, 5, false, sliceType.nil, sliceType.nil); - $pkg.NullBytes = new sliceType([5, 0]); - bitStringType = reflect.TypeOf((x = new BitString.ptr(sliceType.nil, 0), new x.constructor.elem(x))); - objectIdentifierType = reflect.TypeOf(new ObjectIdentifier([])); - enumeratedType = reflect.TypeOf(new Enumerated(0)); - flagType = reflect.TypeOf(new Flag(false)); - timeType = reflect.TypeOf((x$1 = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), new x$1.constructor.elem(x$1))); - rawValueType = reflect.TypeOf((x$2 = new RawValue.ptr(0, 0, false, sliceType.nil, sliceType.nil), new x$2.constructor.elem(x$2))); - rawContentsType = reflect.TypeOf((RawContent.nil)); - bigIntType = reflect.TypeOf(new big.Int.ptr(false, big.nat.nil)); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/cryptobyte/asn1"] = (function() { - var $pkg = {}, $init, Tag; - Tag = $pkg.Tag = $newType(1, $kindUint8, "asn1.Tag", true, "vendor/golang.org/x/crypto/cryptobyte/asn1", true, null); - Tag.prototype.Constructed = function() { - var t; - t = this.$val; - return (t | 32) >>> 0; - }; - $ptrType(Tag).prototype.Constructed = function() { return new Tag(this.$get()).Constructed(); }; - Tag.prototype.ContextSpecific = function() { - var t; - t = this.$val; - return (t | 128) >>> 0; - }; - $ptrType(Tag).prototype.ContextSpecific = function() { return new Tag(this.$get()).ContextSpecific(); }; - Tag.methods = [{prop: "Constructed", name: "Constructed", pkg: "", typ: $funcType([], [Tag], false)}, {prop: "ContextSpecific", name: "ContextSpecific", pkg: "", typ: $funcType([], [Tag], false)}]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/cryptobyte"] = (function() { - var $pkg = {}, $init, asn1, errors, fmt, big, reflect, time, asn1$1, String, Builder, BuilderContinuation, BuildError, MarshalingValue, ptrType, sliceType, ptrType$1, ptrType$2, sliceType$1, ptrType$3, ptrType$4, ptrType$5, ptrType$6, sliceType$2, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, bigIntType, bigOne, _r, NewFixedBuilder, isValidOID, checkASN1Integer, asn1Signed, asn1Unsigned; - asn1 = $packages["encoding/asn1"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - big = $packages["math/big"]; - reflect = $packages["reflect"]; - time = $packages["time"]; - asn1$1 = $packages["vendor/golang.org/x/crypto/cryptobyte/asn1"]; - String = $pkg.String = $newType(12, $kindSlice, "cryptobyte.String", true, "vendor/golang.org/x/crypto/cryptobyte", true, null); - Builder = $pkg.Builder = $newType(0, $kindStruct, "cryptobyte.Builder", true, "vendor/golang.org/x/crypto/cryptobyte", true, function(err_, result_, fixedSize_, child_, offset_, pendingLenLen_, pendingIsASN1_, inContinuation_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - this.result = sliceType.nil; - this.fixedSize = false; - this.child = ptrType$1.nil; - this.offset = 0; - this.pendingLenLen = 0; - this.pendingIsASN1 = false; - this.inContinuation = ptrType$2.nil; - return; - } - this.err = err_; - this.result = result_; - this.fixedSize = fixedSize_; - this.child = child_; - this.offset = offset_; - this.pendingLenLen = pendingLenLen_; - this.pendingIsASN1 = pendingIsASN1_; - this.inContinuation = inContinuation_; - }); - BuilderContinuation = $pkg.BuilderContinuation = $newType(4, $kindFunc, "cryptobyte.BuilderContinuation", true, "vendor/golang.org/x/crypto/cryptobyte", true, null); - BuildError = $pkg.BuildError = $newType(0, $kindStruct, "cryptobyte.BuildError", true, "vendor/golang.org/x/crypto/cryptobyte", true, function(Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Err = $ifaceNil; - return; - } - this.Err = Err_; - }); - MarshalingValue = $pkg.MarshalingValue = $newType(8, $kindInterface, "cryptobyte.MarshalingValue", true, "vendor/golang.org/x/crypto/cryptobyte", true, null); - ptrType = $ptrType(big.Int); - sliceType = $sliceType($Uint8); - ptrType$1 = $ptrType(Builder); - ptrType$2 = $ptrType($Bool); - sliceType$1 = $sliceType($emptyInterface); - ptrType$3 = $ptrType($Uint8); - ptrType$4 = $ptrType(String); - ptrType$5 = $ptrType($Int64); - ptrType$6 = $ptrType($Uint64); - sliceType$2 = $sliceType($Int); - ptrType$7 = $ptrType($Int); - ptrType$8 = $ptrType(asn1$1.Tag); - ptrType$9 = $ptrType($Uint32); - ptrType$10 = $ptrType(sliceType); - ptrType$11 = $ptrType($Uint16); - ptrType$12 = $ptrType(asn1.ObjectIdentifier); - ptrType$13 = $ptrType(time.Time); - ptrType$14 = $ptrType(asn1.BitString); - $ptrType(String).prototype.read = function(n) { - var n, s, v; - s = this; - if (s.$get().$length < n || n < 0) { - return sliceType.nil; - } - v = $subslice((s.$get()), 0, n); - s.$set($subslice((s.$get()), n)); - return $convertSliceType(v, sliceType); - }; - $ptrType(String).prototype.Skip = function(n) { - var n, s; - s = this; - return !(s.read(n) === sliceType.nil); - }; - $ptrType(String).prototype.ReadUint8 = function(out) { - var out, s, v; - s = this; - v = s.read(1); - if (v === sliceType.nil) { - return false; - } - out.$set(((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]))); - return true; - }; - $ptrType(String).prototype.ReadUint16 = function(out) { - var out, s, v; - s = this; - v = s.read(2); - if (v === sliceType.nil) { - return false; - } - out.$set((((((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) << 16 >>> 16))) >>> 0); - return true; - }; - $ptrType(String).prototype.ReadUint24 = function(out) { - var out, s, v; - s = this; - v = s.read(3); - if (v === sliceType.nil) { - return false; - } - out.$set((((((((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) >>> 0))) >>> 0); - return true; - }; - $ptrType(String).prototype.ReadUint32 = function(out) { - var out, s, v; - s = this; - v = s.read(4); - if (v === sliceType.nil) { - return false; - } - out.$set((((((((((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]) >>> 0)) << 24 >>> 0) | ((((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((2 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 3]) >>> 0))) >>> 0); - return true; - }; - $ptrType(String).prototype.readUnsigned = function(out, length) { - var i, length, out, result, s, v, y; - s = this; - v = s.read(length); - if (v === sliceType.nil) { - return false; - } - result = 0; - i = 0; - while (true) { - if (!(i < length)) { break; } - result = (y = (8), y < 32 ? (result << y) : 0) >>> 0; - result = (result | (((((i < 0 || i >= v.$length) ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + i]) >>> 0)))) >>> 0; - i = i + (1) >> 0; - } - out.$set(result); - return true; - }; - $ptrType(String).prototype.readLengthPrefixed = function(lenLen, outChild) { - var _i, _ref, b, lenBytes, lenLen, length, outChild, s, v; - s = this; - lenBytes = s.read(lenLen); - if (lenBytes === sliceType.nil) { - return false; - } - length = 0; - _ref = lenBytes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - length = length << 8 >>> 0; - length = (length | ((b >>> 0))) >>> 0; - _i++; - } - v = s.read(((length >> 0))); - if (v === sliceType.nil) { - return false; - } - outChild.$set($convertSliceType(v, String)); - return true; - }; - $ptrType(String).prototype.ReadUint8LengthPrefixed = function(out) { - var out, s; - s = this; - return s.readLengthPrefixed(1, out); - }; - $ptrType(String).prototype.ReadUint16LengthPrefixed = function(out) { - var out, s; - s = this; - return s.readLengthPrefixed(2, out); - }; - $ptrType(String).prototype.ReadUint24LengthPrefixed = function(out) { - var out, s; - s = this; - return s.readLengthPrefixed(3, out); - }; - $ptrType(String).prototype.ReadBytes = function(out, n) { - var n, out, s, v; - s = this; - v = s.read(n); - if (v === sliceType.nil) { - return false; - } - out.$set(v); - return true; - }; - $ptrType(String).prototype.CopyBytes = function(out) { - var n, out, s, v; - s = this; - n = out.$length; - v = s.read(n); - if (v === sliceType.nil) { - return false; - } - return $copySlice(out, v) === n; - }; - String.prototype.Empty = function() { - var s; - s = this; - return s.$length === 0; - }; - $ptrType(String).prototype.Empty = function() { return this.$get().Empty(); }; - NewFixedBuilder = function(buffer) { - var buffer; - return new Builder.ptr($ifaceNil, buffer, true, ptrType$1.nil, 0, 0, false, ptrType$2.nil); - }; - $pkg.NewFixedBuilder = NewFixedBuilder; - Builder.ptr.prototype.SetError = function(err) { - var b, err; - b = this; - b.err = err; - }; - Builder.prototype.SetError = function(err) { return this.$val.SetError(err); }; - Builder.ptr.prototype.Bytes = function() { - var b; - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - return [sliceType.nil, b.err]; - } - return [$subslice(b.result, b.offset), $ifaceNil]; - }; - Builder.prototype.Bytes = function() { return this.$val.Bytes(); }; - Builder.ptr.prototype.BytesOrPanic = function() { - var b; - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $panic(b.err); - } - return $subslice(b.result, b.offset); - }; - Builder.prototype.BytesOrPanic = function() { return this.$val.BytesOrPanic(); }; - Builder.ptr.prototype.AddUint8 = function(v) { - var b, v; - b = this; - b.add(new sliceType([(v)])); - }; - Builder.prototype.AddUint8 = function(v) { return this.$val.AddUint8(v); }; - Builder.ptr.prototype.AddUint16 = function(v) { - var b, v; - b = this; - b.add(new sliceType([(((v >>> 8 << 16 >>> 16) << 24 >>> 24)), ((v << 24 >>> 24))])); - }; - Builder.prototype.AddUint16 = function(v) { return this.$val.AddUint16(v); }; - Builder.ptr.prototype.AddUint24 = function(v) { - var b, v; - b = this; - b.add(new sliceType([(((v >>> 16 >>> 0) << 24 >>> 24)), (((v >>> 8 >>> 0) << 24 >>> 24)), ((v << 24 >>> 24))])); - }; - Builder.prototype.AddUint24 = function(v) { return this.$val.AddUint24(v); }; - Builder.ptr.prototype.AddUint32 = function(v) { - var b, v; - b = this; - b.add(new sliceType([(((v >>> 24 >>> 0) << 24 >>> 24)), (((v >>> 16 >>> 0) << 24 >>> 24)), (((v >>> 8 >>> 0) << 24 >>> 24)), ((v << 24 >>> 24))])); - }; - Builder.prototype.AddUint32 = function(v) { return this.$val.AddUint32(v); }; - Builder.ptr.prototype.AddBytes = function(v) { - var b, v; - b = this; - b.add(v); - }; - Builder.prototype.AddBytes = function(v) { return this.$val.AddBytes(v); }; - Builder.ptr.prototype.AddUint8LengthPrefixed = function(f) { - var {b, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addLengthPrefixed(1, false, f); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddUint8LengthPrefixed, $c: true, $r, b, f, $s};return $f; - }; - Builder.prototype.AddUint8LengthPrefixed = function(f) { return this.$val.AddUint8LengthPrefixed(f); }; - Builder.ptr.prototype.AddUint16LengthPrefixed = function(f) { - var {b, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addLengthPrefixed(2, false, f); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddUint16LengthPrefixed, $c: true, $r, b, f, $s};return $f; - }; - Builder.prototype.AddUint16LengthPrefixed = function(f) { return this.$val.AddUint16LengthPrefixed(f); }; - Builder.ptr.prototype.AddUint24LengthPrefixed = function(f) { - var {b, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addLengthPrefixed(3, false, f); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddUint24LengthPrefixed, $c: true, $r, b, f, $s};return $f; - }; - Builder.prototype.AddUint24LengthPrefixed = function(f) { return this.$val.AddUint24LengthPrefixed(f); }; - Builder.ptr.prototype.AddUint32LengthPrefixed = function(f) { - var {b, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addLengthPrefixed(4, false, f); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddUint32LengthPrefixed, $c: true, $r, b, f, $s};return $f; - }; - Builder.prototype.AddUint32LengthPrefixed = function(f) { return this.$val.AddUint32LengthPrefixed(f); }; - Builder.ptr.prototype.callContinuation = function(f, arg) { - var {arg, b, f, $s, $deferred, $r, $c} = $restore(this, {f, arg}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - b = [b]; - b[0] = this; - /* */ if (!b[0].inContinuation.$get()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!b[0].inContinuation.$get()) { */ case 1: - b[0].inContinuation.$set(true); - $deferred.push([(function(b) { return function() { - var _tuple, buildError, ok, r; - b[0].inContinuation.$set(false); - r = $recover(); - if ($interfaceIsEqual(r, $ifaceNil)) { - return; - } - _tuple = $assertType(r, BuildError, true); - buildError = $clone(_tuple[0], BuildError); - ok = _tuple[1]; - if (ok) { - b[0].err = buildError.Err; - } else { - $panic(r); - } - }; })(b), []]); - /* } */ case 2: - $r = f(arg); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Builder.ptr.prototype.callContinuation, $c: true, $r, arg, b, f, $s, $deferred};return $f; } } - }; - Builder.prototype.callContinuation = function(f, arg) { return this.$val.callContinuation(f, arg); }; - Builder.ptr.prototype.addLengthPrefixed = function(lenLen, isASN1, f) { - var {b, f, isASN1, lenLen, offset, $s, $r, $c} = $restore(this, {lenLen, isASN1, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return; - } - offset = b.result.$length; - b.add($makeSlice(sliceType, lenLen)); - if (b.inContinuation === ptrType$2.nil) { - b.inContinuation = $newDataPointer(false, ptrType$2); - } - b.child = new Builder.ptr($ifaceNil, b.result, b.fixedSize, ptrType$1.nil, offset, lenLen, isASN1, b.inContinuation); - $r = b.callContinuation(f, b.child); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b.flushChild(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(b.child === ptrType$1.nil)) { - $panic(new $String("cryptobyte: internal error")); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.addLengthPrefixed, $c: true, $r, b, f, isASN1, lenLen, offset, $s};return $f; - }; - Builder.prototype.addLengthPrefixed = function(lenLen, isASN1, f) { return this.$val.addLengthPrefixed(lenLen, isASN1, f); }; - Builder.ptr.prototype.flushChild = function() { - var {_r$1, _tmp, _tmp$1, b, child, childStart, extraBytes, i, l, lenByte, lenLen, length, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (b.child === ptrType$1.nil) { - $s = -1; return; - } - $r = b.child.flushChild(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - child = b.child; - b.child = ptrType$1.nil; - if (!($interfaceIsEqual(child.err, $ifaceNil))) { - b.err = child.err; - $s = -1; return; - } - length = (child.result.$length - child.pendingLenLen >> 0) - child.offset >> 0; - if (length < 0) { - $panic(new $String("cryptobyte: internal error")); - } - if (child.pendingIsASN1) { - if (!((child.pendingLenLen === 1))) { - $panic(new $String("cryptobyte: internal error")); - } - _tmp = 0; - _tmp$1 = 0; - lenLen = _tmp; - lenByte = _tmp$1; - if ((x = (new $Int64(0, length)), (x.$high > 0 || (x.$high === 0 && x.$low > 4294967294)))) { - b.err = errors.New("pending ASN.1 child too long"); - $s = -1; return; - } else if (length > 16777215) { - lenLen = 5; - lenByte = 132; - } else if (length > 65535) { - lenLen = 4; - lenByte = 131; - } else if (length > 255) { - lenLen = 3; - lenByte = 130; - } else if (length > 127) { - lenLen = 2; - lenByte = 129; - } else { - lenLen = 1; - lenByte = ((length << 24 >>> 24)); - length = 0; - } - (x$1 = child.result, x$2 = child.offset, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2] = lenByte)); - extraBytes = (((lenLen - 1 << 24 >>> 24) >> 0)); - if (!((extraBytes === 0))) { - child.add($makeSlice(sliceType, extraBytes)); - childStart = child.offset + child.pendingLenLen >> 0; - $copySlice($subslice(child.result, (childStart + extraBytes >> 0)), $subslice(child.result, childStart)); - } - child.offset = child.offset + (1) >> 0; - child.pendingLenLen = extraBytes; - } - l = length; - i = child.pendingLenLen - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - (x$3 = child.result, x$4 = child.offset + i >> 0, ((x$4 < 0 || x$4 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + x$4] = ((l << 24 >>> 24)))); - l = (l >> $min((8), 31)) >> 0; - i = i - (1) >> 0; - } - /* */ if (!((l === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((l === 0))) { */ case 2: - _r$1 = fmt.Errorf("cryptobyte: pending child length %d exceeds %d-byte length prefix", new sliceType$1([new $Int(length), new $Int(child.pendingLenLen)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b.err = _r$1; - $s = -1; return; - /* } */ case 3: - if (b.fixedSize && !((x$5 = b.result, $indexPtr(x$5.$array, x$5.$offset + 0, ptrType$3)) === (x$6 = child.result, $indexPtr(x$6.$array, x$6.$offset + 0, ptrType$3)))) { - $panic(new $String("cryptobyte: BuilderContinuation reallocated a fixed-size buffer")); - } - b.result = child.result; - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.flushChild, $c: true, $r, _r$1, _tmp, _tmp$1, b, child, childStart, extraBytes, i, l, lenByte, lenLen, length, x, x$1, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - Builder.prototype.flushChild = function() { return this.$val.flushChild(); }; - Builder.ptr.prototype.add = function(bytes) { - var b, bytes; - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - return; - } - if (!(b.child === ptrType$1.nil)) { - $panic(new $String("cryptobyte: attempted write while child is pending")); - } - if ((b.result.$length + bytes.$length >> 0) < bytes.$length) { - b.err = errors.New("cryptobyte: length overflow"); - } - if (b.fixedSize && (b.result.$length + bytes.$length >> 0) > b.result.$capacity) { - b.err = errors.New("cryptobyte: Builder is exceeding its fixed-size buffer"); - return; - } - b.result = $appendSlice(b.result, bytes); - }; - Builder.prototype.add = function(bytes) { return this.$val.add(bytes); }; - Builder.ptr.prototype.Unwrite = function(n) { - var b, length, n; - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - return; - } - if (!(b.child === ptrType$1.nil)) { - $panic(new $String("cryptobyte: attempted unwrite while child is pending")); - } - length = (b.result.$length - b.pendingLenLen >> 0) - b.offset >> 0; - if (length < 0) { - $panic(new $String("cryptobyte: internal error")); - } - if (n > length) { - $panic(new $String("cryptobyte: attempted to unwrite more than was written")); - } - b.result = $subslice(b.result, 0, (b.result.$length - n >> 0)); - }; - Builder.prototype.Unwrite = function(n) { return this.$val.Unwrite(n); }; - Builder.ptr.prototype.AddValue = function(v) { - var {_r$1, b, err, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - _r$1 = v.Marshal(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - b.err = err; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddValue, $c: true, $r, _r$1, b, err, v, $s};return $f; - }; - Builder.prototype.AddValue = function(v) { return this.$val.AddValue(v); }; - Builder.ptr.prototype.AddASN1Int64 = function(v) { - var {b, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addASN1Signed(2, v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1Int64, $c: true, $r, b, v, $s};return $f; - }; - Builder.prototype.AddASN1Int64 = function(v) { return this.$val.AddASN1Int64(v); }; - Builder.ptr.prototype.AddASN1Int64WithTag = function(v, tag) { - var {b, tag, v, $s, $r, $c} = $restore(this, {v, tag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addASN1Signed(tag, v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1Int64WithTag, $c: true, $r, b, tag, v, $s};return $f; - }; - Builder.prototype.AddASN1Int64WithTag = function(v, tag) { return this.$val.AddASN1Int64WithTag(v, tag); }; - Builder.ptr.prototype.AddASN1Enum = function(v) { - var {b, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - $r = b.addASN1Signed(10, v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1Enum, $c: true, $r, b, v, $s};return $f; - }; - Builder.prototype.AddASN1Enum = function(v) { return this.$val.AddASN1Enum(v); }; - Builder.ptr.prototype.addASN1Signed = function(tag, v) { - var {b, tag, v, $s, $r, $c} = $restore(this, {tag, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - b = this; - $r = b.AddASN1(tag, (function(v) { return function(c) { - var c, i, i$1, length, x; - length = 1; - i = v[0]; - while (true) { - if (!((i.$high > 0 || (i.$high === 0 && i.$low >= 128)) || (i.$high < -1 || (i.$high === -1 && i.$low < 4294967168)))) { break; } - length = length + (1) >> 0; - i = $shiftRightInt64(i, (8)); - } - while (true) { - if (!(length > 0)) { break; } - i$1 = (x = $shiftRightInt64(v[0], ((($imul(((length - 1 >> 0)), 8)) >>> 0))), new $Int64(x.$high & 0, (x.$low & 255) >>> 0)); - c.AddUint8(((i$1.$low << 24 >>> 24))); - length = length - (1) >> 0; - } - }; })(v)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.addASN1Signed, $c: true, $r, b, tag, v, $s};return $f; - }; - Builder.prototype.addASN1Signed = function(tag, v) { return this.$val.addASN1Signed(tag, v); }; - Builder.ptr.prototype.AddASN1Uint64 = function(v) { - var {b, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - b = this; - $r = b.AddASN1(2, (function(v) { return function(c) { - var c, i, i$1, length, x; - length = 1; - i = v[0]; - while (true) { - if (!((i.$high > 0 || (i.$high === 0 && i.$low >= 128)))) { break; } - length = length + (1) >> 0; - i = $shiftRightUint64(i, (8)); - } - while (true) { - if (!(length > 0)) { break; } - i$1 = (x = $shiftRightUint64(v[0], ((($imul(((length - 1 >> 0)), 8)) >>> 0))), new $Uint64(x.$high & 0, (x.$low & 255) >>> 0)); - c.AddUint8(((i$1.$low << 24 >>> 24))); - length = length - (1) >> 0; - } - }; })(v)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1Uint64, $c: true, $r, b, v, $s};return $f; - }; - Builder.prototype.AddASN1Uint64 = function(v) { return this.$val.AddASN1Uint64(v); }; - Builder.ptr.prototype.AddASN1BigInt = function(n) { - var {b, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = [n]; - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return; - } - $r = b.AddASN1(2, (function(n) { return function $b(c) { - var {_i, _r$1, _ref, bytes, bytes$1, c, i, nMinus1, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (n[0].Sign() < 0) { $s = 1; continue; } - /* */ if (n[0].Sign() === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (n[0].Sign() < 0) { */ case 1: - nMinus1 = new big.Int.ptr(false, big.nat.nil).Neg(n[0]); - _r$1 = nMinus1.Sub(nMinus1, bigOne); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - bytes = nMinus1.Bytes(); - _ref = bytes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + i] = ((((i < 0 || i >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + i]) ^ (255)) << 24 >>> 24)); - _i++; - } - if ((bytes.$length === 0) || ((((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) & 128) >>> 0) === 0)) { - c.add(new sliceType([255])); - } - c.add(bytes); - $s = 4; continue; - /* } else if (n[0].Sign() === 0) { */ case 2: - c.add(new sliceType([0])); - $s = 4; continue; - /* } else { */ case 3: - bytes$1 = n[0].Bytes(); - if (!(((((0 >= bytes$1.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes$1.$array[bytes$1.$offset + 0]) & 128) >>> 0) === 0))) { - c.add(new sliceType([0])); - } - c.add(bytes$1); - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _r$1, _ref, bytes, bytes$1, c, i, nMinus1, $s};return $f; - }; })(n)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1BigInt, $c: true, $r, b, n, $s};return $f; - }; - Builder.prototype.AddASN1BigInt = function(n) { return this.$val.AddASN1BigInt(n); }; - Builder.ptr.prototype.AddASN1OctetString = function(bytes) { - var {b, bytes, $s, $r, $c} = $restore(this, {bytes}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bytes = [bytes]; - b = this; - $r = b.AddASN1(4, (function(bytes) { return function(c) { - var c; - c.AddBytes(bytes[0]); - }; })(bytes)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1OctetString, $c: true, $r, b, bytes, $s};return $f; - }; - Builder.prototype.AddASN1OctetString = function(bytes) { return this.$val.AddASN1OctetString(bytes); }; - Builder.ptr.prototype.AddASN1GeneralizedTime = function(t) { - var {_r$1, _r$2, _r$3, _v, b, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = [t]; - b = this; - _r$1 = $clone(t[0], time.Time).Year(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (_r$1 < 0) { _v = true; $s = 3; continue s; } - _r$2 = $clone(t[0], time.Time).Year(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2 > 9999; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$3 = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", new sliceType$1([new t[0].constructor.elem(t[0])])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b.err = _r$3; - $s = -1; return; - /* } */ case 2: - $r = b.AddASN1(24, (function(t) { return function $b(c) { - var {_r$4, c, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$4 = $clone(t[0], time.Time).Format("20060102150405Z0700"); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = c.AddBytes((new sliceType($stringToBytes(_r$4)))); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, c, $s};return $f; - }; })(t)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1GeneralizedTime, $c: true, $r, _r$1, _r$2, _r$3, _v, b, t, $s};return $f; - }; - Builder.prototype.AddASN1GeneralizedTime = function(t) { return this.$val.AddASN1GeneralizedTime(t); }; - Builder.ptr.prototype.AddASN1UTCTime = function(t) { - var {b, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - t = [t]; - b[0] = this; - $r = b[0].AddASN1(23, (function(b, t) { return function $b(c) { - var {_r$1, _r$2, _r$3, _r$4, _v, c, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = $clone(t[0], time.Time).Year(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (_r$1 < 1950) { _v = true; $s = 3; continue s; } - _r$2 = $clone(t[0], time.Time).Year(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2 >= 2050; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$3 = fmt.Errorf("cryptobyte: cannot represent %v as a UTCTime", new sliceType$1([new t[0].constructor.elem(t[0])])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - b[0].err = _r$3; - $s = -1; return; - /* } */ case 2: - _r$4 = $clone(t[0], time.Time).Format("060102150405Z0700"); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = c.AddBytes((new sliceType($stringToBytes(_r$4)))); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _v, c, $s};return $f; - }; })(b, t)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1UTCTime, $c: true, $r, b, t, $s};return $f; - }; - Builder.prototype.AddASN1UTCTime = function(t) { return this.$val.AddASN1UTCTime(t); }; - Builder.ptr.prototype.AddASN1BitString = function(data) { - var {b, data, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - data = [data]; - b = this; - $r = b.AddASN1(3, (function(data) { return function(b$1) { - var b$1; - b$1.AddUint8(0); - b$1.AddBytes(data[0]); - }; })(data)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1BitString, $c: true, $r, b, data, $s};return $f; - }; - Builder.prototype.AddASN1BitString = function(data) { return this.$val.AddASN1BitString(data); }; - Builder.ptr.prototype.addBase128Int = function(n) { - var b, i, i$1, length, n, o; - b = this; - length = 0; - if ((n.$high === 0 && n.$low === 0)) { - length = 1; - } else { - i = n; - while (true) { - if (!((i.$high > 0 || (i.$high === 0 && i.$low > 0)))) { break; } - length = length + (1) >> 0; - i = $shiftRightInt64(i, (7)); - } - } - i$1 = length - 1 >> 0; - while (true) { - if (!(i$1 >= 0)) { break; } - o = (($shiftRightInt64(n, ((($imul(i$1, 7)) >>> 0))).$low << 24 >>> 24)); - o = (o & (127)) >>> 0; - if (!((i$1 === 0))) { - o = (o | (128)) >>> 0; - } - b.add(new sliceType([o])); - i$1 = i$1 - (1) >> 0; - } - }; - Builder.prototype.addBase128Int = function(n) { return this.$val.addBase128Int(n); }; - isValidOID = function(oid) { - var _i, _ref, oid, v; - if (oid.$length < 2) { - return false; - } - if ((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]) > 2 || ((0 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 0]) <= 1 && (1 >= oid.$length ? ($throwRuntimeError("index out of range"), undefined) : oid.$array[oid.$offset + 1]) >= 40)) { - return false; - } - _ref = oid; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v < 0) { - return false; - } - _i++; - } - return true; - }; - Builder.ptr.prototype.AddASN1ObjectIdentifier = function(oid) { - var {b, oid, $s, $r, $c} = $restore(this, {oid}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - oid = [oid]; - b = this; - $r = b.AddASN1(6, (function(oid) { return function $b(b$1) { - var {_i, _r$1, _ref, b$1, v, x, x$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!isValidOID(oid[0])) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!isValidOID(oid[0])) { */ case 1: - _r$1 = fmt.Errorf("cryptobyte: invalid OID: %v", new sliceType$1([oid[0]])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b$1.err = _r$1; - $s = -1; return; - /* } */ case 2: - b$1.addBase128Int((x = $mul64((new $Int64(0, (0 >= oid[0].$length ? ($throwRuntimeError("index out of range"), undefined) : oid[0].$array[oid[0].$offset + 0]))), new $Int64(0, 40)), x$1 = (new $Int64(0, (1 >= oid[0].$length ? ($throwRuntimeError("index out of range"), undefined) : oid[0].$array[oid[0].$offset + 1]))), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low))); - _ref = $subslice(oid[0], 2); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$1.addBase128Int((new $Int64(0, v))); - _i++; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _r$1, _ref, b$1, v, x, x$1, $s};return $f; - }; })(oid)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1ObjectIdentifier, $c: true, $r, b, oid, $s};return $f; - }; - Builder.prototype.AddASN1ObjectIdentifier = function(oid) { return this.$val.AddASN1ObjectIdentifier(oid); }; - Builder.ptr.prototype.AddASN1Boolean = function(v) { - var {b, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = [v]; - b = this; - $r = b.AddASN1(1, (function(v) { return function(b$1) { - var b$1; - if (v[0]) { - b$1.AddUint8(255); - } else { - b$1.AddUint8(0); - } - }; })(v)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1Boolean, $c: true, $r, b, v, $s};return $f; - }; - Builder.prototype.AddASN1Boolean = function(v) { return this.$val.AddASN1Boolean(v); }; - Builder.ptr.prototype.AddASN1NULL = function() { - var b; - b = this; - b.add(new sliceType([5, 0])); - }; - Builder.prototype.AddASN1NULL = function() { return this.$val.AddASN1NULL(); }; - Builder.ptr.prototype.MarshalASN1 = function(v) { - var {_r$1, _tuple, b, bytes, err, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return; - } - _r$1 = asn1.Marshal(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - bytes = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - b.err = err; - $s = -1; return; - } - b.AddBytes(bytes); - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.MarshalASN1, $c: true, $r, _r$1, _tuple, b, bytes, err, v, $s};return $f; - }; - Builder.prototype.MarshalASN1 = function(v) { return this.$val.MarshalASN1(v); }; - Builder.ptr.prototype.AddASN1 = function(tag, f) { - var {_r$1, b, f, tag, $s, $r, $c} = $restore(this, {tag, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (!($interfaceIsEqual(b.err, $ifaceNil))) { - $s = -1; return; - } - /* */ if (((tag & 31) >>> 0) === 31) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (((tag & 31) >>> 0) === 31) { */ case 1: - _r$1 = fmt.Errorf("cryptobyte: high-tag number identifier octects not supported: 0x%x", new sliceType$1([new asn1$1.Tag(tag)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - b.err = _r$1; - $s = -1; return; - /* } */ case 2: - b.AddUint8(((tag << 24 >>> 24))); - $r = b.addLengthPrefixed(1, true, f); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Builder.ptr.prototype.AddASN1, $c: true, $r, _r$1, b, f, tag, $s};return $f; - }; - Builder.prototype.AddASN1 = function(tag, f) { return this.$val.AddASN1(tag, f); }; - $ptrType(String).prototype.ReadASN1Boolean = function(out) { - var _1, bytes, bytes$24ptr, out, s; - s = this; - bytes = String.nil; - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 1) || !((bytes.$length === 1))) { - return false; - } - _1 = (0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]); - if (_1 === (0)) { - out.$set(false); - } else if (_1 === (255)) { - out.$set(true); - } else { - return false; - } - return true; - }; - $ptrType(String).prototype.ReadASN1Integer = function(out) { - var {$24r, _1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, i, out, s, u, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = [i]; - u = [u]; - s = this; - _r$1 = reflect.TypeOf(out).Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!((_r$1 === 22))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$1 === 22))) { */ case 1: - $panic(new $String("out is not a pointer")); - /* } */ case 2: - _r$2 = reflect.ValueOf(out); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, reflect.Value).Elem(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(_r$3, reflect.Value).Kind(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _1 = _r$4; - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { $s = 8; continue; } - /* */ if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { $s = 9; continue; } - /* */ if (_1 === (25)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6))) { */ case 8: - i[0] = new $Int64(0, 0); - if (!s.readASN1Int64((i.$ptr || (i.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, i))))) { _v = true; $s = 14; continue s; } - _r$5 = reflect.ValueOf(out); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, reflect.Value).OverflowInt(i[0]); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = _r$7; case 14: - /* */ if (_v) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_v) { */ case 12: - $s = -1; return false; - /* } */ case 13: - _r$8 = reflect.ValueOf(out); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Elem(); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $r = $clone(_r$9, reflect.Value).SetInt(i[0]); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* } else if ((_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { */ case 9: - u[0] = new $Uint64(0, 0); - if (!s.readASN1Uint64((u.$ptr || (u.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, u))))) { _v$1 = true; $s = 23; continue s; } - _r$10 = reflect.ValueOf(out); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = $clone(_r$10, reflect.Value).Elem(); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = $clone(_r$11, reflect.Value).OverflowUint(u[0]); /* */ $s = 26; case 26: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$1 = _r$12; case 23: - /* */ if (_v$1) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_v$1) { */ case 21: - $s = -1; return false; - /* } */ case 22: - _r$13 = reflect.ValueOf(out); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = $clone(_r$13, reflect.Value).Elem(); /* */ $s = 28; case 28: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $r = $clone(_r$14, reflect.Value).SetUint(u[0]); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* } else if (_1 === (25)) { */ case 10: - _r$15 = reflect.TypeOf(out).Elem(); /* */ $s = 32; case 32: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_r$15, bigIntType)) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if ($interfaceIsEqual(_r$15, bigIntType)) { */ case 30: - _r$16 = s.readASN1BigInt($assertType(out, ptrType)); /* */ $s = 33; case 33: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r = _r$16; - $s = 34; case 34: return $24r; - /* } */ case 31: - /* } */ case 11: - case 4: - $panic(new $String("out does not point to an integer type")); - $s = -1; return false; - /* */ } return; } var $f = {$blk: $ptrType(String).prototype.ReadASN1Integer, $c: true, $r, $24r, _1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, _v$1, i, out, s, u, $s};return $f; - }; - checkASN1Integer = function(bytes) { - var bytes; - if (bytes.$length === 0) { - return false; - } - if (bytes.$length === 1) { - return true; - } - if (((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) === 0) && ((((1 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 1]) & 128) >>> 0) === 0) || ((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0]) === 255) && ((((1 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 1]) & 128) >>> 0) === 128)) { - return false; - } - return true; - }; - $ptrType(String).prototype.readASN1BigInt = function(out) { - var {_i, _r$1, _ref, b, bytes, i, neg, out, s, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bytes = [bytes]; - s = this; - bytes[0] = String.nil; - if (!s.ReadASN1((bytes.$ptr || (bytes.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, bytes))), 2) || !checkASN1Integer($convertSliceType(bytes[0], sliceType))) { - $s = -1; return false; - } - /* */ if ((((0 >= bytes[0].$length ? ($throwRuntimeError("index out of range"), undefined) : bytes[0].$array[bytes[0].$offset + 0]) & 128) >>> 0) === 128) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((((0 >= bytes[0].$length ? ($throwRuntimeError("index out of range"), undefined) : bytes[0].$array[bytes[0].$offset + 0]) & 128) >>> 0) === 128) { */ case 1: - neg = $makeSlice(sliceType, bytes[0].$length); - _ref = bytes[0]; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= neg.$length) ? ($throwRuntimeError("index out of range"), undefined) : neg.$array[neg.$offset + i] = (~b << 24 >>> 24)); - _i++; - } - out.SetBytes(neg); - _r$1 = out.Add(out, bigOne); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - out.Neg(out); - $s = 3; continue; - /* } else { */ case 2: - out.SetBytes($convertSliceType(bytes[0], sliceType)); - /* } */ case 3: - $s = -1; return true; - /* */ } return; } var $f = {$blk: $ptrType(String).prototype.readASN1BigInt, $c: true, $r, _i, _r$1, _ref, b, bytes, i, neg, out, s, $s};return $f; - }; - $ptrType(String).prototype.readASN1Int64 = function(out) { - var bytes, bytes$24ptr, out, s; - s = this; - bytes = String.nil; - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 2) || !checkASN1Integer($convertSliceType(bytes, sliceType)) || !asn1Signed(out, $convertSliceType(bytes, sliceType))) { - return false; - } - return true; - }; - asn1Signed = function(out, n) { - var i, length, n, out, x, x$1; - length = n.$length; - if (length > 8) { - return false; - } - i = 0; - while (true) { - if (!(i < length)) { break; } - out.$set($shiftLeft64(out.$get(), (8))); - out.$set((x = out.$get(), x$1 = (new $Int64(0, ((i < 0 || i >= n.$length) ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + i]))), new $Int64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0))); - i = i + (1) >> 0; - } - out.$set($shiftLeft64(out.$get(), ((64 - (((length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24)))); - out.$set($shiftRightInt64(out.$get(), ((64 - (((length << 24 >>> 24)) * 8 << 24 >>> 24) << 24 >>> 24)))); - return true; - }; - $ptrType(String).prototype.readASN1Uint64 = function(out) { - var bytes, bytes$24ptr, out, s; - s = this; - bytes = String.nil; - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 2) || !checkASN1Integer($convertSliceType(bytes, sliceType)) || !asn1Unsigned(out, $convertSliceType(bytes, sliceType))) { - return false; - } - return true; - }; - asn1Unsigned = function(out, n) { - var i, length, n, out, x, x$1; - length = n.$length; - if (length > 9 || (length === 9) && !(((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) === 0))) { - return false; - } - if (!(((((0 >= n.$length ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + 0]) & 128) >>> 0) === 0))) { - return false; - } - i = 0; - while (true) { - if (!(i < length)) { break; } - out.$set($shiftLeft64(out.$get(), (8))); - out.$set((x = out.$get(), x$1 = (new $Uint64(0, ((i < 0 || i >= n.$length) ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + i]))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0))); - i = i + (1) >> 0; - } - return true; - }; - $ptrType(String).prototype.ReadASN1Int64WithTag = function(out, tag) { - var bytes, bytes$24ptr, out, s, tag; - s = this; - bytes = String.nil; - return s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), tag) && checkASN1Integer($convertSliceType(bytes, sliceType)) && asn1Signed(out, $convertSliceType(bytes, sliceType)); - }; - $ptrType(String).prototype.ReadASN1Enum = function(out) { - var bytes, bytes$24ptr, i, i$24ptr, out, s, x; - s = this; - bytes = String.nil; - i = new $Int64(0, 0); - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 10) || !checkASN1Integer($convertSliceType(bytes, sliceType)) || !asn1Signed((i$24ptr || (i$24ptr = new ptrType$5(function() { return i; }, function($v) { i = $v; }))), $convertSliceType(bytes, sliceType))) { - return false; - } - if (!((x = (new $Int64(0, (((i.$low + ((i.$high >> 31) * 4294967296)) >> 0)))), (x.$high === i.$high && x.$low === i.$low)))) { - return false; - } - out.$set((((i.$low + ((i.$high >> 31) * 4294967296)) >> 0))); - return true; - }; - $ptrType(String).prototype.readBase128Int = function(out) { - var b, i, out, ret, s, x, y; - s = this; - ret = 0; - i = 0; - while (true) { - if (!(s.$get().$length > 0)) { break; } - if (i === 5) { - return false; - } - if (ret >= 16777216) { - return false; - } - ret = (y = (7), y < 32 ? (ret << y) : 0) >> 0; - b = (x = s.read(1), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - ret = ret | (((((b & 127) >>> 0) >> 0))); - if (((b & 128) >>> 0) === 0) { - out.$set(ret); - return true; - } - i = i + (1) >> 0; - } - return false; - }; - $ptrType(String).prototype.ReadASN1ObjectIdentifier = function(out) { - var _q, _r$1, bytes, bytes$24ptr, components, i, out, s, v, v$24ptr; - s = this; - bytes = String.nil; - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 6) || (bytes.$length === 0)) { - return false; - } - components = $makeSlice(sliceType$2, (bytes.$length + 1 >> 0)); - v = 0; - if (!(bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))).readBase128Int((v$24ptr || (v$24ptr = new ptrType$7(function() { return v; }, function($v) { v = $v; }))))) { - return false; - } - if (v < 80) { - (0 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 0] = (_q = v / 40, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - (1 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 1] = (_r$1 = v % 40, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero"))); - } else { - (0 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 0] = 2); - (1 >= components.$length ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + 1] = (v - 80 >> 0)); - } - i = 2; - while (true) { - if (!(bytes.$length > 0)) { break; } - if (!(bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))).readBase128Int((v$24ptr || (v$24ptr = new ptrType$7(function() { return v; }, function($v) { v = $v; }))))) { - return false; - } - ((i < 0 || i >= components.$length) ? ($throwRuntimeError("index out of range"), undefined) : components.$array[components.$offset + i] = v); - i = i + (1) >> 0; - } - out.$set($convertSliceType($subslice(components, 0, i), asn1.ObjectIdentifier)); - return true; - }; - $ptrType(String).prototype.ReadASN1GeneralizedTime = function(out) { - var {_r$1, _r$2, _tuple, bytes, err, out, res, s, serialized, t, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bytes = [bytes]; - s = this; - bytes[0] = String.nil; - if (!s.ReadASN1((bytes.$ptr || (bytes.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, bytes))), 24)) { - $s = -1; return false; - } - t = ($bytesToString(bytes[0])); - _r$1 = time.Parse("20060102150405Z0700", t); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - res = $clone(_tuple[0], time.Time); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - _r$2 = $clone(res, time.Time).Format("20060102150405Z0700"); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - serialized = _r$2; - if (!(serialized === t)) { - $s = -1; return false; - } - time.Time.copy(out, res); - $s = -1; return true; - /* */ } return; } var $f = {$blk: $ptrType(String).prototype.ReadASN1GeneralizedTime, $c: true, $r, _r$1, _r$2, _tuple, bytes, err, out, res, s, serialized, t, $s};return $f; - }; - $ptrType(String).prototype.ReadASN1UTCTime = function(out) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, bytes, err, formatStr, out, res, s, serialized, t, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bytes = [bytes]; - s = this; - bytes[0] = String.nil; - if (!s.ReadASN1((bytes.$ptr || (bytes.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, bytes))), 23)) { - $s = -1; return false; - } - t = ($bytesToString(bytes[0])); - formatStr = "060102150405Z0700"; - err = $ifaceNil; - _r$1 = time.Parse(formatStr, t); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - res = $clone(_tuple[0], time.Time); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - formatStr = "0601021504Z0700"; - _r$2 = time.Parse(formatStr, t); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - time.Time.copy(res, _tuple$1[0]); - err = _tuple$1[1]; - /* } */ case 3: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - _r$3 = $clone(res, time.Time).Format(formatStr); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - serialized = _r$3; - if (!(serialized === t)) { - $s = -1; return false; - } - _r$4 = $clone(res, time.Time).Year(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 >= 2050) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$4 >= 2050) { */ case 6: - _r$5 = $clone(res, time.Time).AddDate(-100, 0, 0); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - time.Time.copy(res, _r$5); - /* } */ case 7: - time.Time.copy(out, res); - $s = -1; return true; - /* */ } return; } var $f = {$blk: $ptrType(String).prototype.ReadASN1UTCTime, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, bytes, err, formatStr, out, res, s, serialized, t, $s};return $f; - }; - $ptrType(String).prototype.ReadASN1BitString = function(out) { - var _q, bytes, bytes$24ptr, out, paddingBits, s, x, y; - s = this; - bytes = String.nil; - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 3) || (bytes.$length === 0) || !(((_q = ($imul(bytes.$length, 8)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === bytes.$length))) { - return false; - } - paddingBits = ((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0])); - bytes = $subslice(bytes, 1); - if (paddingBits > 7 || (bytes.$length === 0) && !((paddingBits === 0)) || bytes.$length > 0 && !(((((x = bytes.$length - 1 >> 0, ((x < 0 || x >= bytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + x])) & ((((y = paddingBits, y < 32 ? (1 << y) : 0) << 24 >>> 24) - 1 << 24 >>> 24))) >>> 0) === 0))) { - return false; - } - out.BitLength = ($imul(bytes.$length, 8)) - ((paddingBits >> 0)) >> 0; - out.Bytes = $convertSliceType(bytes, sliceType); - return true; - }; - $ptrType(String).prototype.ReadASN1BitStringAsBytes = function(out) { - var bytes, bytes$24ptr, out, paddingBits, s; - s = this; - bytes = String.nil; - if (!s.ReadASN1((bytes$24ptr || (bytes$24ptr = new ptrType$4(function() { return bytes; }, function($v) { bytes = $convertSliceType($v, String); }))), 3) || (bytes.$length === 0)) { - return false; - } - paddingBits = ((0 >= bytes.$length ? ($throwRuntimeError("index out of range"), undefined) : bytes.$array[bytes.$offset + 0])); - if (!((paddingBits === 0))) { - return false; - } - out.$set($convertSliceType($subslice(bytes, 1), sliceType)); - return true; - }; - $ptrType(String).prototype.ReadASN1Bytes = function(out, tag) { - var _ptr, out, s, tag; - s = this; - return s.ReadASN1(((_ptr = out, new ptrType$4(function() { return $convertSliceType(_ptr.$get(), String); }, function($v) { _ptr.$set($convertSliceType($v, sliceType)); }, _ptr.$target))), tag); - }; - $ptrType(String).prototype.ReadASN1 = function(out, tag) { - var out, s, t, t$24ptr, tag; - s = this; - t = 0; - if (!s.ReadAnyASN1(out, (t$24ptr || (t$24ptr = new ptrType$8(function() { return t; }, function($v) { t = $v; })))) || !((t === tag))) { - return false; - } - return true; - }; - $ptrType(String).prototype.ReadASN1Element = function(out, tag) { - var out, s, t, t$24ptr, tag; - s = this; - t = 0; - if (!s.ReadAnyASN1Element(out, (t$24ptr || (t$24ptr = new ptrType$8(function() { return t; }, function($v) { t = $v; })))) || !((t === tag))) { - return false; - } - return true; - }; - $ptrType(String).prototype.ReadAnyASN1 = function(out, outTag) { - var out, outTag, s; - s = this; - return s.readASN1(out, outTag, true); - }; - $ptrType(String).prototype.ReadAnyASN1Element = function(out, outTag) { - var out, outTag, s; - s = this; - return s.readASN1(out, outTag, false); - }; - String.prototype.PeekASN1Tag = function(tag) { - var s, tag; - s = this; - if (s.$length === 0) { - return false; - } - return (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) << 24 >>> 24)) === tag; - }; - $ptrType(String).prototype.PeekASN1Tag = function(tag) { return this.$get().PeekASN1Tag(tag); }; - $ptrType(String).prototype.SkipASN1 = function(tag) { - var s, tag, unused, unused$24ptr; - s = this; - unused = String.nil; - return s.ReadASN1((unused$24ptr || (unused$24ptr = new ptrType$4(function() { return unused; }, function($v) { unused = $convertSliceType($v, String); }))), tag); - }; - $ptrType(String).prototype.ReadOptionalASN1 = function(out, outPresent, tag) { - var out, outPresent, present, s, tag; - s = this; - present = s.PeekASN1Tag(tag); - if (!(outPresent === ptrType$2.nil)) { - outPresent.$set(present); - } - if (present && !s.ReadASN1(out, tag)) { - return false; - } - return true; - }; - $ptrType(String).prototype.SkipOptionalASN1 = function(tag) { - var s, tag, unused, unused$24ptr; - s = this; - if (!s.PeekASN1Tag(tag)) { - return true; - } - unused = String.nil; - return s.ReadASN1((unused$24ptr || (unused$24ptr = new ptrType$4(function() { return unused; }, function($v) { unused = $convertSliceType($v, String); }))), tag); - }; - $ptrType(String).prototype.ReadOptionalASN1Integer = function(out, tag, defaultValue) { - var {_1, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, defaultValue, i, out, present, s, tag, $s, $r, $c} = $restore(this, {out, tag, defaultValue}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = [i]; - present = [present]; - s = this; - _r$1 = reflect.TypeOf(out).Kind(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!((_r$1 === 22))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r$1 === 22))) { */ case 1: - $panic(new $String("out is not a pointer")); - /* } */ case 2: - present[0] = false; - i[0] = String.nil; - if (!s.ReadOptionalASN1((i.$ptr || (i.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, i))), (present.$ptr || (present.$ptr = new ptrType$2(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, present))), tag)) { - $s = -1; return false; - } - /* */ if (!present[0]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!present[0]) { */ case 4: - _r$2 = reflect.ValueOf(out); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, reflect.Value).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(_r$3, reflect.Value).Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _1 = _r$4; - /* */ if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { $s = 10; continue; } - /* */ if (_1 === (25)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ((_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11))) { */ case 10: - _r$5 = reflect.ValueOf(out); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, reflect.Value).Elem(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = reflect.ValueOf(defaultValue); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = $clone(_r$6, reflect.Value).Set($clone(_r$7, reflect.Value)); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (25)) { */ case 11: - _r$8 = reflect.TypeOf(out).Elem(); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$8, bigIntType))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(_r$8, bigIntType))) { */ case 18: - $panic(new $String("invalid integer type")); - /* } */ case 19: - _r$9 = reflect.TypeOf(defaultValue).Kind(); /* */ $s = 24; case 24: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - if (!((_r$9 === 22))) { _v = true; $s = 23; continue s; } - _r$10 = reflect.TypeOf(defaultValue).Elem(); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v = !($interfaceIsEqual(_r$10, bigIntType)); case 23: - /* */ if (_v) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_v) { */ case 21: - $panic(new $String("out points to big.Int, but defaultValue does not")); - /* } */ case 22: - $assertType(out, ptrType).Set($assertType(defaultValue, ptrType)); - $s = 13; continue; - /* } else { */ case 12: - $panic(new $String("invalid integer type")); - /* } */ case 13: - case 6: - $s = -1; return true; - /* } */ case 5: - _r$11 = (i.$ptr || (i.$ptr = new ptrType$4(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, i))).ReadASN1Integer(out); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11 || !i[0].Empty()) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!_r$11 || !i[0].Empty()) { */ case 26: - $s = -1; return false; - /* } */ case 27: - $s = -1; return true; - /* */ } return; } var $f = {$blk: $ptrType(String).prototype.ReadOptionalASN1Integer, $c: true, $r, _1, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _v, defaultValue, i, out, present, s, tag, $s};return $f; - }; - $ptrType(String).prototype.ReadOptionalASN1OctetString = function(out, outPresent, tag) { - var child, child$24ptr, oct, oct$24ptr, out, outPresent, present, present$24ptr, s, tag; - s = this; - present = false; - child = String.nil; - if (!s.ReadOptionalASN1((child$24ptr || (child$24ptr = new ptrType$4(function() { return child; }, function($v) { child = $convertSliceType($v, String); }))), (present$24ptr || (present$24ptr = new ptrType$2(function() { return present; }, function($v) { present = $v; }))), tag)) { - return false; - } - if (!(outPresent === ptrType$2.nil)) { - outPresent.$set(present); - } - if (present) { - oct = String.nil; - if (!(child$24ptr || (child$24ptr = new ptrType$4(function() { return child; }, function($v) { child = $convertSliceType($v, String); }))).ReadASN1((oct$24ptr || (oct$24ptr = new ptrType$4(function() { return oct; }, function($v) { oct = $convertSliceType($v, String); }))), 4) || !child.Empty()) { - return false; - } - out.$set($convertSliceType(oct, sliceType)); - } else { - out.$set(sliceType.nil); - } - return true; - }; - $ptrType(String).prototype.ReadOptionalASN1Boolean = function(out, defaultValue) { - var child, child$24ptr, defaultValue, out, present, present$24ptr, s; - s = this; - present = false; - child = String.nil; - if (!s.ReadOptionalASN1((child$24ptr || (child$24ptr = new ptrType$4(function() { return child; }, function($v) { child = $convertSliceType($v, String); }))), (present$24ptr || (present$24ptr = new ptrType$2(function() { return present; }, function($v) { present = $v; }))), 1)) { - return false; - } - if (!present) { - out.$set(defaultValue); - return true; - } - return s.ReadASN1Boolean(out); - }; - $ptrType(String).prototype.readASN1 = function(out, outTag, skipHeader) { - var _ptr, _tmp, _tmp$1, _tmp$2, _tmp$3, headerLen, len32, len32$24ptr, lenByte, lenBytes, lenBytes$24ptr, lenLen, length, out, outTag, s, skipHeader, tag, x, x$1, y; - s = this; - if (s.$get().$length < 2) { - return false; - } - _tmp = (x = s.$get(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - _tmp$1 = (x$1 = s.$get(), (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])); - tag = _tmp; - lenByte = _tmp$1; - if (((tag & 31) >>> 0) === 31) { - return false; - } - if (!(outTag === ptrType$8.nil)) { - outTag.$set(((tag << 24 >>> 24))); - } - _tmp$2 = 0; - _tmp$3 = 0; - length = _tmp$2; - headerLen = _tmp$3; - if (((lenByte & 128) >>> 0) === 0) { - length = ((lenByte >>> 0)) + 2 >>> 0; - headerLen = 2; - } else { - lenLen = (lenByte & 127) >>> 0; - len32 = 0; - if ((lenLen === 0) || lenLen > 4 || s.$get().$length < (((2 + lenLen << 24 >>> 24) >> 0))) { - return false; - } - lenBytes = ($subslice((s.$get()), 2, (2 + lenLen << 24 >>> 24))); - if (!(lenBytes$24ptr || (lenBytes$24ptr = new ptrType$4(function() { return lenBytes; }, function($v) { lenBytes = $convertSliceType($v, String); }))).readUnsigned((len32$24ptr || (len32$24ptr = new ptrType$9(function() { return len32; }, function($v) { len32 = $v; }))), ((lenLen >> 0)))) { - return false; - } - if (len32 < 128) { - return false; - } - if (((y = ((((lenLen - 1 << 24 >>> 24)) * 8 << 24 >>> 24)), y < 32 ? (len32 >>> y) : 0) >>> 0) === 0) { - return false; - } - headerLen = 2 + ((lenLen >>> 0)) >>> 0; - if ((headerLen + len32 >>> 0) < len32) { - return false; - } - length = headerLen + len32 >>> 0; - } - if (((length >> 0)) < 0 || !s.ReadBytes(((_ptr = out, new ptrType$10(function() { return $convertSliceType(_ptr.$get(), sliceType); }, function($v) { _ptr.$set($convertSliceType($v, String)); }, _ptr.$target))), ((length >> 0)))) { - return false; - } - if (skipHeader && !out.Skip(((headerLen >> 0)))) { - $panic(new $String("cryptobyte: internal error")); - } - return true; - }; - String.methods = [{prop: "Empty", name: "Empty", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "PeekASN1Tag", name: "PeekASN1Tag", pkg: "", typ: $funcType([asn1$1.Tag], [$Bool], false)}]; - ptrType$4.methods = [{prop: "read", name: "read", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([$Int], [sliceType], false)}, {prop: "Skip", name: "Skip", pkg: "", typ: $funcType([$Int], [$Bool], false)}, {prop: "ReadUint8", name: "ReadUint8", pkg: "", typ: $funcType([ptrType$3], [$Bool], false)}, {prop: "ReadUint16", name: "ReadUint16", pkg: "", typ: $funcType([ptrType$11], [$Bool], false)}, {prop: "ReadUint24", name: "ReadUint24", pkg: "", typ: $funcType([ptrType$9], [$Bool], false)}, {prop: "ReadUint32", name: "ReadUint32", pkg: "", typ: $funcType([ptrType$9], [$Bool], false)}, {prop: "readUnsigned", name: "readUnsigned", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([ptrType$9, $Int], [$Bool], false)}, {prop: "readLengthPrefixed", name: "readLengthPrefixed", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([$Int, ptrType$4], [$Bool], false)}, {prop: "ReadUint8LengthPrefixed", name: "ReadUint8LengthPrefixed", pkg: "", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "ReadUint16LengthPrefixed", name: "ReadUint16LengthPrefixed", pkg: "", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "ReadUint24LengthPrefixed", name: "ReadUint24LengthPrefixed", pkg: "", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "ReadBytes", name: "ReadBytes", pkg: "", typ: $funcType([ptrType$10, $Int], [$Bool], false)}, {prop: "CopyBytes", name: "CopyBytes", pkg: "", typ: $funcType([sliceType], [$Bool], false)}, {prop: "ReadASN1Boolean", name: "ReadASN1Boolean", pkg: "", typ: $funcType([ptrType$2], [$Bool], false)}, {prop: "ReadASN1Integer", name: "ReadASN1Integer", pkg: "", typ: $funcType([$emptyInterface], [$Bool], false)}, {prop: "readASN1BigInt", name: "readASN1BigInt", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([ptrType], [$Bool], false)}, {prop: "readASN1Int64", name: "readASN1Int64", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([ptrType$5], [$Bool], false)}, {prop: "readASN1Uint64", name: "readASN1Uint64", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([ptrType$6], [$Bool], false)}, {prop: "ReadASN1Int64WithTag", name: "ReadASN1Int64WithTag", pkg: "", typ: $funcType([ptrType$5, asn1$1.Tag], [$Bool], false)}, {prop: "ReadASN1Enum", name: "ReadASN1Enum", pkg: "", typ: $funcType([ptrType$7], [$Bool], false)}, {prop: "readBase128Int", name: "readBase128Int", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([ptrType$7], [$Bool], false)}, {prop: "ReadASN1ObjectIdentifier", name: "ReadASN1ObjectIdentifier", pkg: "", typ: $funcType([ptrType$12], [$Bool], false)}, {prop: "ReadASN1GeneralizedTime", name: "ReadASN1GeneralizedTime", pkg: "", typ: $funcType([ptrType$13], [$Bool], false)}, {prop: "ReadASN1UTCTime", name: "ReadASN1UTCTime", pkg: "", typ: $funcType([ptrType$13], [$Bool], false)}, {prop: "ReadASN1BitString", name: "ReadASN1BitString", pkg: "", typ: $funcType([ptrType$14], [$Bool], false)}, {prop: "ReadASN1BitStringAsBytes", name: "ReadASN1BitStringAsBytes", pkg: "", typ: $funcType([ptrType$10], [$Bool], false)}, {prop: "ReadASN1Bytes", name: "ReadASN1Bytes", pkg: "", typ: $funcType([ptrType$10, asn1$1.Tag], [$Bool], false)}, {prop: "ReadASN1", name: "ReadASN1", pkg: "", typ: $funcType([ptrType$4, asn1$1.Tag], [$Bool], false)}, {prop: "ReadASN1Element", name: "ReadASN1Element", pkg: "", typ: $funcType([ptrType$4, asn1$1.Tag], [$Bool], false)}, {prop: "ReadAnyASN1", name: "ReadAnyASN1", pkg: "", typ: $funcType([ptrType$4, ptrType$8], [$Bool], false)}, {prop: "ReadAnyASN1Element", name: "ReadAnyASN1Element", pkg: "", typ: $funcType([ptrType$4, ptrType$8], [$Bool], false)}, {prop: "SkipASN1", name: "SkipASN1", pkg: "", typ: $funcType([asn1$1.Tag], [$Bool], false)}, {prop: "ReadOptionalASN1", name: "ReadOptionalASN1", pkg: "", typ: $funcType([ptrType$4, ptrType$2, asn1$1.Tag], [$Bool], false)}, {prop: "SkipOptionalASN1", name: "SkipOptionalASN1", pkg: "", typ: $funcType([asn1$1.Tag], [$Bool], false)}, {prop: "ReadOptionalASN1Integer", name: "ReadOptionalASN1Integer", pkg: "", typ: $funcType([$emptyInterface, asn1$1.Tag, $emptyInterface], [$Bool], false)}, {prop: "ReadOptionalASN1OctetString", name: "ReadOptionalASN1OctetString", pkg: "", typ: $funcType([ptrType$10, ptrType$2, asn1$1.Tag], [$Bool], false)}, {prop: "ReadOptionalASN1Boolean", name: "ReadOptionalASN1Boolean", pkg: "", typ: $funcType([ptrType$2, $Bool], [$Bool], false)}, {prop: "readASN1", name: "readASN1", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([ptrType$4, ptrType$8, $Bool], [$Bool], false)}]; - ptrType$1.methods = [{prop: "SetError", name: "SetError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "BytesOrPanic", name: "BytesOrPanic", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "AddUint8", name: "AddUint8", pkg: "", typ: $funcType([$Uint8], [], false)}, {prop: "AddUint16", name: "AddUint16", pkg: "", typ: $funcType([$Uint16], [], false)}, {prop: "AddUint24", name: "AddUint24", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AddUint32", name: "AddUint32", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AddBytes", name: "AddBytes", pkg: "", typ: $funcType([sliceType], [], false)}, {prop: "AddUint8LengthPrefixed", name: "AddUint8LengthPrefixed", pkg: "", typ: $funcType([BuilderContinuation], [], false)}, {prop: "AddUint16LengthPrefixed", name: "AddUint16LengthPrefixed", pkg: "", typ: $funcType([BuilderContinuation], [], false)}, {prop: "AddUint24LengthPrefixed", name: "AddUint24LengthPrefixed", pkg: "", typ: $funcType([BuilderContinuation], [], false)}, {prop: "AddUint32LengthPrefixed", name: "AddUint32LengthPrefixed", pkg: "", typ: $funcType([BuilderContinuation], [], false)}, {prop: "callContinuation", name: "callContinuation", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([BuilderContinuation, ptrType$1], [], false)}, {prop: "addLengthPrefixed", name: "addLengthPrefixed", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([$Int, $Bool, BuilderContinuation], [], false)}, {prop: "flushChild", name: "flushChild", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([], [], false)}, {prop: "add", name: "add", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([sliceType], [], true)}, {prop: "Unwrite", name: "Unwrite", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "AddValue", name: "AddValue", pkg: "", typ: $funcType([MarshalingValue], [], false)}, {prop: "AddASN1Int64", name: "AddASN1Int64", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "AddASN1Int64WithTag", name: "AddASN1Int64WithTag", pkg: "", typ: $funcType([$Int64, asn1$1.Tag], [], false)}, {prop: "AddASN1Enum", name: "AddASN1Enum", pkg: "", typ: $funcType([$Int64], [], false)}, {prop: "addASN1Signed", name: "addASN1Signed", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([asn1$1.Tag, $Int64], [], false)}, {prop: "AddASN1Uint64", name: "AddASN1Uint64", pkg: "", typ: $funcType([$Uint64], [], false)}, {prop: "AddASN1BigInt", name: "AddASN1BigInt", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "AddASN1OctetString", name: "AddASN1OctetString", pkg: "", typ: $funcType([sliceType], [], false)}, {prop: "AddASN1GeneralizedTime", name: "AddASN1GeneralizedTime", pkg: "", typ: $funcType([time.Time], [], false)}, {prop: "AddASN1UTCTime", name: "AddASN1UTCTime", pkg: "", typ: $funcType([time.Time], [], false)}, {prop: "AddASN1BitString", name: "AddASN1BitString", pkg: "", typ: $funcType([sliceType], [], false)}, {prop: "addBase128Int", name: "addBase128Int", pkg: "vendor/golang.org/x/crypto/cryptobyte", typ: $funcType([$Int64], [], false)}, {prop: "AddASN1ObjectIdentifier", name: "AddASN1ObjectIdentifier", pkg: "", typ: $funcType([asn1.ObjectIdentifier], [], false)}, {prop: "AddASN1Boolean", name: "AddASN1Boolean", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "AddASN1NULL", name: "AddASN1NULL", pkg: "", typ: $funcType([], [], false)}, {prop: "MarshalASN1", name: "MarshalASN1", pkg: "", typ: $funcType([$emptyInterface], [], false)}, {prop: "AddASN1", name: "AddASN1", pkg: "", typ: $funcType([asn1$1.Tag, BuilderContinuation], [], false)}]; - String.init($Uint8); - Builder.init("vendor/golang.org/x/crypto/cryptobyte", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "result", name: "result", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "fixedSize", name: "fixedSize", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "child", name: "child", embedded: false, exported: false, typ: ptrType$1, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "pendingLenLen", name: "pendingLenLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "pendingIsASN1", name: "pendingIsASN1", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "inContinuation", name: "inContinuation", embedded: false, exported: false, typ: ptrType$2, tag: ""}]); - BuilderContinuation.init([ptrType$1], [], false); - BuildError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - MarshalingValue.init([{prop: "Marshal", name: "Marshal", pkg: "", typ: $funcType([ptrType$1], [$error], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = asn1.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = asn1$1.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = reflect.TypeOf((ptrType.nil)).Elem(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - bigIntType = _r; - bigOne = big.NewInt(new $Int64(0, 1)); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/ecdsa"] = (function() { - var $pkg = {}, $init, crypto, aes, cipher, elliptic, randutil, sha512, errors, io, big, cryptobyte, asn1, invertible, combinedMult, PublicKey, PrivateKey, zr, ptrType, ptrType$1, ptrType$2, sliceType, ptrType$3, ptrType$4, ptrType$5, ptrType$6, one, errZeroParam, zeroReader, sign, verify, randFieldElement, hashToInt, fermatInverse, Sign, signGeneric, Verify, verifyGeneric, VerifyASN1; - crypto = $packages["crypto"]; - aes = $packages["crypto/aes"]; - cipher = $packages["crypto/cipher"]; - elliptic = $packages["crypto/elliptic"]; - randutil = $packages["crypto/internal/randutil"]; - sha512 = $packages["crypto/sha512"]; - errors = $packages["errors"]; - io = $packages["io"]; - big = $packages["math/big"]; - cryptobyte = $packages["vendor/golang.org/x/crypto/cryptobyte"]; - asn1 = $packages["vendor/golang.org/x/crypto/cryptobyte/asn1"]; - invertible = $pkg.invertible = $newType(8, $kindInterface, "ecdsa.invertible", true, "crypto/ecdsa", false, null); - combinedMult = $pkg.combinedMult = $newType(8, $kindInterface, "ecdsa.combinedMult", true, "crypto/ecdsa", false, null); - PublicKey = $pkg.PublicKey = $newType(0, $kindStruct, "ecdsa.PublicKey", true, "crypto/ecdsa", true, function(Curve_, X_, Y_) { - this.$val = this; - if (arguments.length === 0) { - this.Curve = $ifaceNil; - this.X = ptrType.nil; - this.Y = ptrType.nil; - return; - } - this.Curve = Curve_; - this.X = X_; - this.Y = Y_; - }); - PrivateKey = $pkg.PrivateKey = $newType(0, $kindStruct, "ecdsa.PrivateKey", true, "crypto/ecdsa", true, function(PublicKey_, D_) { - this.$val = this; - if (arguments.length === 0) { - this.PublicKey = new PublicKey.ptr($ifaceNil, ptrType.nil, ptrType.nil); - this.D = ptrType.nil; - return; - } - this.PublicKey = PublicKey_; - this.D = D_; - }); - zr = $pkg.zr = $newType(0, $kindStruct, "ecdsa.zr", true, "crypto/ecdsa", false, function(Reader_) { - this.$val = this; - if (arguments.length === 0) { - this.Reader = $ifaceNil; - return; - } - this.Reader = Reader_; - }); - ptrType = $ptrType(big.Int); - ptrType$1 = $ptrType(PublicKey); - ptrType$2 = $ptrType(PrivateKey); - sliceType = $sliceType($Uint8); - ptrType$3 = $ptrType(cryptobyte.Builder); - ptrType$4 = $ptrType($Bool); - ptrType$5 = $ptrType(cryptobyte.String); - ptrType$6 = $ptrType(zr); - sign = function(priv, csprng, c, hash) { - var {$24r, _r, _tuple, c, csprng, err, hash, priv, r, s, $s, $r, $c} = $restore(this, {priv, csprng, c, hash}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = ptrType.nil; - s = ptrType.nil; - err = $ifaceNil; - _r = signGeneric(priv, csprng, c, hash); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - r = _tuple[0]; - s = _tuple[1]; - err = _tuple[2]; - $24r = [r, s, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: sign, $c: true, $r, $24r, _r, _tuple, c, csprng, err, hash, priv, r, s, $s};return $f; - }; - verify = function(pub, c, hash, r, s) { - var {$24r, _r, c, hash, pub, r, s, $s, $r, $c} = $restore(this, {pub, c, hash, r, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = verifyGeneric(pub, c, hash, r, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: verify, $c: true, $r, $24r, _r, c, hash, pub, r, s, $s};return $f; - }; - PublicKey.ptr.prototype.Equal = function(x) { - var _tuple, ok, pub, x, xx; - pub = this; - _tuple = $assertType(x, ptrType$1, true); - xx = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return false; - } - return (pub.X.Cmp(xx.X) === 0) && (pub.Y.Cmp(xx.Y) === 0) && $interfaceIsEqual(pub.Curve, xx.Curve); - }; - PublicKey.prototype.Equal = function(x) { return this.$val.Equal(x); }; - PrivateKey.ptr.prototype.Public = function() { - var priv; - priv = this; - return priv.PublicKey; - }; - PrivateKey.prototype.Public = function() { return this.$val.Public(); }; - PrivateKey.ptr.prototype.Equal = function(x) { - var _tuple, ok, priv, x, xx; - priv = this; - _tuple = $assertType(x, ptrType$2, true); - xx = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return false; - } - return priv.PublicKey.Equal(xx.PublicKey) && (priv.D.Cmp(xx.D) === 0); - }; - PrivateKey.prototype.Equal = function(x) { return this.$val.Equal(x); }; - PrivateKey.ptr.prototype.Sign = function(rand, digest, opts) { - var {_r, _tuple, b, digest, err, opts, priv, r, rand, s, $s, $r, $c} = $restore(this, {rand, digest, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = [r]; - s = [s]; - priv = this; - _r = Sign(rand, priv, digest); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - r[0] = _tuple[0]; - s[0] = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType.nil, false, ptrType$3.nil, 0, 0, false, ptrType$4.nil); - $r = b.AddASN1(48, (function(r, s) { return function $b(b$1) { - var {b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$1.AddASN1BigInt(r[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddASN1BigInt(s[0]); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, $s};return $f; - }; })(r, s)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return b.Bytes(); - /* */ } return; } var $f = {$blk: PrivateKey.ptr.prototype.Sign, $c: true, $r, _r, _tuple, b, digest, err, opts, priv, r, rand, s, $s};return $f; - }; - PrivateKey.prototype.Sign = function(rand, digest, opts) { return this.$val.Sign(rand, digest, opts); }; - randFieldElement = function(c, rand) { - var {_q, _r, _r$1, _r$2, _r$3, _r$4, _tuple, b, c, err, k, n, params, rand, $s, $r, $c} = $restore(this, {c, rand}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = ptrType.nil; - err = $ifaceNil; - _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - params = _r; - b = $makeSlice(sliceType, ((_q = params.BitSize / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + 8 >> 0)); - _r$1 = io.ReadFull(rand, b); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [k, err]; - } - k = new big.Int.ptr(false, big.nat.nil).SetBytes(b); - _r$2 = new big.Int.ptr(false, big.nat.nil).Sub(params.N, one); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - n = _r$2; - _r$3 = k.Mod(k, n); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = k.Add(k, one); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return [k, err]; - /* */ } return; } var $f = {$blk: randFieldElement, $c: true, $r, _q, _r, _r$1, _r$2, _r$3, _r$4, _tuple, b, c, err, k, n, params, rand, $s};return $f; - }; - hashToInt = function(hash, c) { - var {_q, _r, _r$1, _r$2, c, excess, hash, orderBits, orderBytes, ret, $s, $r, $c} = $restore(this, {hash, c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.N.BitLen(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - orderBits = _r$1; - orderBytes = (_q = ((orderBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (hash.$length > orderBytes) { - hash = $subslice(hash, 0, orderBytes); - } - ret = new big.Int.ptr(false, big.nat.nil).SetBytes(hash); - excess = ($imul(hash.$length, 8)) - orderBits >> 0; - /* */ if (excess > 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (excess > 0) { */ case 3: - _r$2 = ret.Rsh(ret, ((excess >>> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 4: - $s = -1; return ret; - /* */ } return; } var $f = {$blk: hashToInt, $c: true, $r, _q, _r, _r$1, _r$2, c, excess, hash, orderBits, orderBytes, ret, $s};return $f; - }; - fermatInverse = function(k, N) { - var {$24r, N, _r, _r$1, k, nMinus2, two, $s, $r, $c} = $restore(this, {k, N}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - two = big.NewInt(new $Int64(0, 2)); - _r = new big.Int.ptr(false, big.nat.nil).Sub(N, two); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - nMinus2 = _r; - _r$1 = new big.Int.ptr(false, big.nat.nil).Exp(k, nMinus2, N); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: fermatInverse, $c: true, $r, $24r, N, _r, _r$1, k, nMinus2, two, $s};return $f; - }; - Sign = function(rand, priv, hash) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, block, c, csprng, entropy, err, hash, key, md, priv, r, rand, s, $s, $r, $c} = $restore(this, {rand, priv, hash}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - csprng = [csprng]; - r = ptrType.nil; - s = ptrType.nil; - err = $ifaceNil; - $r = randutil.MaybeReadByte(rand); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - entropy = $makeSlice(sliceType, 32); - _r = io.ReadFull(rand, entropy); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [r, s, err]; - } - md = sha512.New(); - _r$1 = md.Write(priv.D.Bytes()); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = md.Write(entropy); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = md.Write(hash); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = md.Sum(sliceType.nil); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - key = $subslice(_r$4, 0, 32); - _tuple$1 = aes.NewCipher(key); - block = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = ptrType.nil; - _tmp$1 = ptrType.nil; - _tmp$2 = err; - r = _tmp; - s = _tmp$1; - err = _tmp$2; - $s = -1; return [r, s, err]; - } - _r$5 = cipher.NewCTR(block, (new sliceType($stringToBytes("IV for ECDSA CTR")))); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - csprng[0] = new cipher.StreamReader.ptr(_r$5, zeroReader); - c = priv.PublicKey.Curve; - _r$6 = sign(priv, csprng[0], c, hash); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - r = _tuple$2[0]; - s = _tuple$2[1]; - err = _tuple$2[2]; - $24r = [r, s, err]; - $s = 9; case 9: return $24r; - /* */ } return; } var $f = {$blk: Sign, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, block, c, csprng, entropy, err, hash, key, md, priv, r, rand, s, $s};return $f; - }; - $pkg.Sign = Sign; - signGeneric = function(priv, csprng, c, hash) { - var {N, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, _tuple$1, _tuple$2, c, csprng, e, err, hash, in$1, k, kInv, ok, priv, r, s, x, $s, $r, $c} = $restore(this, {priv, csprng, c, hash}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = ptrType.nil; - s = ptrType.nil; - err = $ifaceNil; - _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - N = _r.N; - if (N.Sign() === 0) { - _tmp = ptrType.nil; - _tmp$1 = ptrType.nil; - _tmp$2 = errZeroParam; - r = _tmp; - s = _tmp$1; - err = _tmp$2; - $s = -1; return [r, s, err]; - } - _tmp$3 = ptrType.nil; - _tmp$4 = ptrType.nil; - k = _tmp$3; - kInv = _tmp$4; - /* while (true) { */ case 2: - /* while (true) { */ case 4: - _r$1 = randFieldElement(c, (x = csprng, new x.constructor.elem(x))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - k = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - r = ptrType.nil; - $s = -1; return [r, s, err]; - } - _tuple$1 = $assertType(priv.PublicKey.Curve, invertible, true); - in$1 = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (ok) { */ case 7: - _r$2 = in$1.Inverse(k); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - kInv = _r$2; - $s = 9; continue; - /* } else { */ case 8: - _r$3 = fermatInverse(k, N); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - kInv = _r$3; - /* } */ case 9: - _r$4 = priv.PublicKey.Curve.ScalarBaseMult(k.Bytes()); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - r = _tuple$2[0]; - _r$5 = r.Mod(r, N); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - if (!((r.Sign() === 0))) { - /* break; */ $s = 5; continue; - } - $s = 4; continue; - case 5: - _r$6 = hashToInt(hash, c); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - e = _r$6; - _r$7 = new big.Int.ptr(false, big.nat.nil).Mul(priv.D, r); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - s = _r$7; - _r$8 = s.Add(s, e); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = s.Mul(s, kInv); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = s.Mod(s, N); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - if (!((s.Sign() === 0))) { - /* break; */ $s = 3; continue; - } - $s = 2; continue; - case 3: - $s = -1; return [r, s, err]; - /* */ } return; } var $f = {$blk: signGeneric, $c: true, $r, N, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, _tuple$1, _tuple$2, c, csprng, e, err, hash, in$1, k, kInv, ok, priv, r, s, x, $s};return $f; - }; - Verify = function(pub, hash, r, s) { - var {$24r, N, _r, _r$1, c, hash, pub, r, s, $s, $r, $c} = $restore(this, {pub, hash, r, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = pub.Curve; - _r = c.Params(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - N = _r.N; - if (r.Sign() <= 0 || s.Sign() <= 0) { - $s = -1; return false; - } - if (r.Cmp(N) >= 0 || s.Cmp(N) >= 0) { - $s = -1; return false; - } - _r$1 = verify(pub, c, hash, r, s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Verify, $c: true, $r, $24r, N, _r, _r$1, c, hash, pub, r, s, $s};return $f; - }; - $pkg.Verify = Verify; - verifyGeneric = function(pub, c, hash, r, s) { - var {N, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, e, hash, in$1, ok, ok$1, opt, pub, r, s, u1, u2, w, x, x1, x2, y, y1, y2, $s, $r, $c} = $restore(this, {pub, c, hash, r, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = hashToInt(hash, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - e = _r; - w = ptrType.nil; - _r$1 = c.Params(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - N = _r$1.N; - _tuple = $assertType(c, invertible, true); - in$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ok) { */ case 3: - _r$2 = in$1.Inverse(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - w = _r$2; - $s = 5; continue; - /* } else { */ case 4: - _r$3 = new big.Int.ptr(false, big.nat.nil).ModInverse(s, N); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - w = _r$3; - /* } */ case 5: - _r$4 = e.Mul(e, w); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - u1 = _r$4; - _r$5 = u1.Mod(u1, N); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = w.Mul(r, w); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - u2 = _r$6; - _r$7 = u2.Mod(u2, N); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _tmp = ptrType.nil; - _tmp$1 = ptrType.nil; - x = _tmp; - y = _tmp$1; - _tuple$1 = $assertType(c, combinedMult, true); - opt = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (ok$1) { */ case 12: - _r$8 = opt.CombinedMult(pub.X, pub.Y, u1.Bytes(), u2.Bytes()); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$2 = _r$8; - x = _tuple$2[0]; - y = _tuple$2[1]; - $s = 14; continue; - /* } else { */ case 13: - _r$9 = c.ScalarBaseMult(u1.Bytes()); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$3 = _r$9; - x1 = _tuple$3[0]; - y1 = _tuple$3[1]; - _r$10 = c.ScalarMult(pub.X, pub.Y, u2.Bytes()); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$4 = _r$10; - x2 = _tuple$4[0]; - y2 = _tuple$4[1]; - _r$11 = c.Add(x1, y1, x2, y2); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$5 = _r$11; - x = _tuple$5[0]; - y = _tuple$5[1]; - /* } */ case 14: - if ((x.Sign() === 0) && (y.Sign() === 0)) { - $s = -1; return false; - } - _r$12 = x.Mod(x, N); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - $s = -1; return x.Cmp(r) === 0; - /* */ } return; } var $f = {$blk: verifyGeneric, $c: true, $r, N, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, e, hash, in$1, ok, ok$1, opt, pub, r, s, u1, u2, w, x, x1, x2, y, y1, y2, $s};return $f; - }; - VerifyASN1 = function(pub, hash, sig) { - var {$24r, _r, _r$1, _r$2, _tmp, _tmp$1, _v, _v$1, hash, inner, input, input$24ptr, pub, r, s, sig, $s, $r, $c} = $restore(this, {pub, hash, sig}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - inner = [inner]; - _tmp = new big.Int.ptr(false, big.nat.nil); - _tmp$1 = new big.Int.ptr(false, big.nat.nil); - r = _tmp; - s = _tmp$1; - inner[0] = cryptobyte.String.nil; - input = ($convertSliceType(sig, cryptobyte.String)); - if (!(input$24ptr || (input$24ptr = new ptrType$5(function() { return input; }, function($v) { input = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((inner.$ptr || (inner.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, inner))), 48) || !input.Empty()) { _v$1 = true; $s = 4; continue s; } - _r = (inner.$ptr || (inner.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, inner))).ReadASN1Integer(r); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v$1 = !_r; case 4: - if (_v$1) { _v = true; $s = 3; continue s; } - _r$1 = (inner.$ptr || (inner.$ptr = new ptrType$5(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, inner))).ReadASN1Integer(s); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 3: - /* */ if (_v || !inner[0].Empty()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v || !inner[0].Empty()) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _r$2 = Verify(pub, hash, r, s); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: VerifyASN1, $c: true, $r, $24r, _r, _r$1, _r$2, _tmp, _tmp$1, _v, _v$1, hash, inner, input, input$24ptr, pub, r, s, sig, $s};return $f; - }; - $pkg.VerifyASN1 = VerifyASN1; - zr.ptr.prototype.Read = function(dst) { - var _i, _ref, _tmp, _tmp$1, dst, err, i, n, z; - n = 0; - err = $ifaceNil; - z = this; - _ref = dst; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = 0); - _i++; - } - _tmp = dst.$length; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - zr.prototype.Read = function(dst) { return this.$val.Read(dst); }; - ptrType$1.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([crypto.PublicKey], [$Bool], false)}]; - ptrType$2.methods = [{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [crypto.PublicKey], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([crypto.PrivateKey], [$Bool], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.SignerOpts], [sliceType, $error], false)}]; - ptrType$6.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; - invertible.init([{prop: "Inverse", name: "Inverse", pkg: "", typ: $funcType([ptrType], [ptrType], false)}]); - combinedMult.init([{prop: "CombinedMult", name: "CombinedMult", pkg: "", typ: $funcType([ptrType, ptrType, sliceType, sliceType], [ptrType, ptrType], false)}]); - PublicKey.init("", [{prop: "Curve", name: "Curve", embedded: true, exported: true, typ: elliptic.Curve, tag: ""}, {prop: "X", name: "X", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: ptrType, tag: ""}]); - PrivateKey.init("", [{prop: "PublicKey", name: "PublicKey", embedded: true, exported: true, typ: PublicKey, tag: ""}, {prop: "D", name: "D", embedded: false, exported: true, typ: ptrType, tag: ""}]); - zr.init("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: io.Reader, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = aes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cipher.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = elliptic.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = randutil.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha512.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cryptobyte.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = asn1.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - one = new big.Int.ptr(false, big.nat.nil).SetInt64(new $Int64(0, 1)); - errZeroParam = errors.New("zero parameter"); - zeroReader = new zr.ptr($ifaceNil); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/ed25519/internal/edwards25519/field"] = (function() { - var $pkg = {}, $init, subtle, binary, bits, uint128, Element, arrayType, arrayType$1, sliceType, ptrType, ptrType$1, feZero, feOne, sqrtM1, mul64, addMul64, shiftRightBy51, feMulGeneric, feSquareGeneric, feMul, feSquare, mask64Bits, mul51; - subtle = $packages["crypto/subtle"]; - binary = $packages["encoding/binary"]; - bits = $packages["math/bits"]; - uint128 = $pkg.uint128 = $newType(0, $kindStruct, "field.uint128", true, "crypto/ed25519/internal/edwards25519/field", false, function(lo_, hi_) { - this.$val = this; - if (arguments.length === 0) { - this.lo = new $Uint64(0, 0); - this.hi = new $Uint64(0, 0); - return; - } - this.lo = lo_; - this.hi = hi_; - }); - Element = $pkg.Element = $newType(0, $kindStruct, "field.Element", true, "crypto/ed25519/internal/edwards25519/field", true, function(l0_, l1_, l2_, l3_, l4_) { - this.$val = this; - if (arguments.length === 0) { - this.l0 = new $Uint64(0, 0); - this.l1 = new $Uint64(0, 0); - this.l2 = new $Uint64(0, 0); - this.l3 = new $Uint64(0, 0); - this.l4 = new $Uint64(0, 0); - return; - } - this.l0 = l0_; - this.l1 = l1_; - this.l2 = l2_; - this.l3 = l3_; - this.l4 = l4_; - }); - arrayType = $arrayType($Uint8, 32); - arrayType$1 = $arrayType($Uint8, 8); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(Element); - ptrType$1 = $ptrType(arrayType); - mul64 = function(a, b) { - var _tuple, a, b, hi, lo; - _tuple = bits.Mul64(a, b); - hi = _tuple[0]; - lo = _tuple[1]; - return new uint128.ptr(lo, hi); - }; - addMul64 = function(v, a, b) { - var _tuple, _tuple$1, _tuple$2, a, b, c, hi, lo, v; - _tuple = bits.Mul64(a, b); - hi = _tuple[0]; - lo = _tuple[1]; - _tuple$1 = bits.Add64(lo, v.lo, new $Uint64(0, 0)); - lo = _tuple$1[0]; - c = _tuple$1[1]; - _tuple$2 = bits.Add64(hi, v.hi, c); - hi = _tuple$2[0]; - return new uint128.ptr(lo, hi); - }; - shiftRightBy51 = function(a) { - var a, x, x$1; - return (x = $shiftLeft64(a.hi, 13), x$1 = $shiftRightUint64(a.lo, 51), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - }; - feMulGeneric = function(v, a, b) { - var a, a0, a1, a1_19, a2, a2_19, a3, a3_19, a4, a4_19, b, b0, b1, b2, b3, b4, c0, c1, c2, c3, c4, r0, r1, r2, r3, r4, rr0, rr1, rr2, rr3, rr4, v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - a0 = a.l0; - a1 = a.l1; - a2 = a.l2; - a3 = a.l3; - a4 = a.l4; - b0 = b.l0; - b1 = b.l1; - b2 = b.l2; - b3 = b.l3; - b4 = b.l4; - a1_19 = $mul64(a1, new $Uint64(0, 19)); - a2_19 = $mul64(a2, new $Uint64(0, 19)); - a3_19 = $mul64(a3, new $Uint64(0, 19)); - a4_19 = $mul64(a4, new $Uint64(0, 19)); - r0 = $clone(mul64(a0, b0), uint128); - uint128.copy(r0, addMul64($clone(r0, uint128), a1_19, b4)); - uint128.copy(r0, addMul64($clone(r0, uint128), a2_19, b3)); - uint128.copy(r0, addMul64($clone(r0, uint128), a3_19, b2)); - uint128.copy(r0, addMul64($clone(r0, uint128), a4_19, b1)); - r1 = $clone(mul64(a0, b1), uint128); - uint128.copy(r1, addMul64($clone(r1, uint128), a1, b0)); - uint128.copy(r1, addMul64($clone(r1, uint128), a2_19, b4)); - uint128.copy(r1, addMul64($clone(r1, uint128), a3_19, b3)); - uint128.copy(r1, addMul64($clone(r1, uint128), a4_19, b2)); - r2 = $clone(mul64(a0, b2), uint128); - uint128.copy(r2, addMul64($clone(r2, uint128), a1, b1)); - uint128.copy(r2, addMul64($clone(r2, uint128), a2, b0)); - uint128.copy(r2, addMul64($clone(r2, uint128), a3_19, b4)); - uint128.copy(r2, addMul64($clone(r2, uint128), a4_19, b3)); - r3 = $clone(mul64(a0, b3), uint128); - uint128.copy(r3, addMul64($clone(r3, uint128), a1, b2)); - uint128.copy(r3, addMul64($clone(r3, uint128), a2, b1)); - uint128.copy(r3, addMul64($clone(r3, uint128), a3, b0)); - uint128.copy(r3, addMul64($clone(r3, uint128), a4_19, b4)); - r4 = $clone(mul64(a0, b4), uint128); - uint128.copy(r4, addMul64($clone(r4, uint128), a1, b3)); - uint128.copy(r4, addMul64($clone(r4, uint128), a2, b2)); - uint128.copy(r4, addMul64($clone(r4, uint128), a3, b1)); - uint128.copy(r4, addMul64($clone(r4, uint128), a4, b0)); - c0 = shiftRightBy51($clone(r0, uint128)); - c1 = shiftRightBy51($clone(r1, uint128)); - c2 = shiftRightBy51($clone(r2, uint128)); - c3 = shiftRightBy51($clone(r3, uint128)); - c4 = shiftRightBy51($clone(r4, uint128)); - rr0 = (x = (x$1 = r0.lo, new $Uint64(x$1.$high & 524287, (x$1.$low & 4294967295) >>> 0)), x$2 = $mul64(c4, new $Uint64(0, 19)), new $Uint64(x.$high + x$2.$high, x.$low + x$2.$low)); - rr1 = (x$3 = (x$4 = r1.lo, new $Uint64(x$4.$high & 524287, (x$4.$low & 4294967295) >>> 0)), new $Uint64(x$3.$high + c0.$high, x$3.$low + c0.$low)); - rr2 = (x$5 = (x$6 = r2.lo, new $Uint64(x$6.$high & 524287, (x$6.$low & 4294967295) >>> 0)), new $Uint64(x$5.$high + c1.$high, x$5.$low + c1.$low)); - rr3 = (x$7 = (x$8 = r3.lo, new $Uint64(x$8.$high & 524287, (x$8.$low & 4294967295) >>> 0)), new $Uint64(x$7.$high + c2.$high, x$7.$low + c2.$low)); - rr4 = (x$9 = (x$10 = r4.lo, new $Uint64(x$10.$high & 524287, (x$10.$low & 4294967295) >>> 0)), new $Uint64(x$9.$high + c3.$high, x$9.$low + c3.$low)); - Element.copy(v, new Element.ptr(rr0, rr1, rr2, rr3, rr4)); - v.carryPropagate(); - }; - feSquareGeneric = function(v, a) { - var a, c0, c1, c2, c3, c4, l0, l0_2, l1, l1_2, l1_38, l2, l2_38, l3, l3_19, l3_38, l4, l4_19, r0, r1, r2, r3, r4, rr0, rr1, rr2, rr3, rr4, v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - l0 = a.l0; - l1 = a.l1; - l2 = a.l2; - l3 = a.l3; - l4 = a.l4; - l0_2 = $mul64(l0, new $Uint64(0, 2)); - l1_2 = $mul64(l1, new $Uint64(0, 2)); - l1_38 = $mul64(l1, new $Uint64(0, 38)); - l2_38 = $mul64(l2, new $Uint64(0, 38)); - l3_38 = $mul64(l3, new $Uint64(0, 38)); - l3_19 = $mul64(l3, new $Uint64(0, 19)); - l4_19 = $mul64(l4, new $Uint64(0, 19)); - r0 = $clone(mul64(l0, l0), uint128); - uint128.copy(r0, addMul64($clone(r0, uint128), l1_38, l4)); - uint128.copy(r0, addMul64($clone(r0, uint128), l2_38, l3)); - r1 = $clone(mul64(l0_2, l1), uint128); - uint128.copy(r1, addMul64($clone(r1, uint128), l2_38, l4)); - uint128.copy(r1, addMul64($clone(r1, uint128), l3_19, l3)); - r2 = $clone(mul64(l0_2, l2), uint128); - uint128.copy(r2, addMul64($clone(r2, uint128), l1, l1)); - uint128.copy(r2, addMul64($clone(r2, uint128), l3_38, l4)); - r3 = $clone(mul64(l0_2, l3), uint128); - uint128.copy(r3, addMul64($clone(r3, uint128), l1_2, l2)); - uint128.copy(r3, addMul64($clone(r3, uint128), l4_19, l4)); - r4 = $clone(mul64(l0_2, l4), uint128); - uint128.copy(r4, addMul64($clone(r4, uint128), l1_2, l3)); - uint128.copy(r4, addMul64($clone(r4, uint128), l2, l2)); - c0 = shiftRightBy51($clone(r0, uint128)); - c1 = shiftRightBy51($clone(r1, uint128)); - c2 = shiftRightBy51($clone(r2, uint128)); - c3 = shiftRightBy51($clone(r3, uint128)); - c4 = shiftRightBy51($clone(r4, uint128)); - rr0 = (x = (x$1 = r0.lo, new $Uint64(x$1.$high & 524287, (x$1.$low & 4294967295) >>> 0)), x$2 = $mul64(c4, new $Uint64(0, 19)), new $Uint64(x.$high + x$2.$high, x.$low + x$2.$low)); - rr1 = (x$3 = (x$4 = r1.lo, new $Uint64(x$4.$high & 524287, (x$4.$low & 4294967295) >>> 0)), new $Uint64(x$3.$high + c0.$high, x$3.$low + c0.$low)); - rr2 = (x$5 = (x$6 = r2.lo, new $Uint64(x$6.$high & 524287, (x$6.$low & 4294967295) >>> 0)), new $Uint64(x$5.$high + c1.$high, x$5.$low + c1.$low)); - rr3 = (x$7 = (x$8 = r3.lo, new $Uint64(x$8.$high & 524287, (x$8.$low & 4294967295) >>> 0)), new $Uint64(x$7.$high + c2.$high, x$7.$low + c2.$low)); - rr4 = (x$9 = (x$10 = r4.lo, new $Uint64(x$10.$high & 524287, (x$10.$low & 4294967295) >>> 0)), new $Uint64(x$9.$high + c3.$high, x$9.$low + c3.$low)); - Element.copy(v, new Element.ptr(rr0, rr1, rr2, rr3, rr4)); - v.carryPropagate(); - }; - Element.ptr.prototype.carryPropagateGeneric = function() { - var c0, c1, c2, c3, c4, v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - c0 = $shiftRightUint64(v.l0, 51); - c1 = $shiftRightUint64(v.l1, 51); - c2 = $shiftRightUint64(v.l2, 51); - c3 = $shiftRightUint64(v.l3, 51); - c4 = $shiftRightUint64(v.l4, 51); - v.l0 = (x = (x$1 = v.l0, new $Uint64(x$1.$high & 524287, (x$1.$low & 4294967295) >>> 0)), x$2 = $mul64(c4, new $Uint64(0, 19)), new $Uint64(x.$high + x$2.$high, x.$low + x$2.$low)); - v.l1 = (x$3 = (x$4 = v.l1, new $Uint64(x$4.$high & 524287, (x$4.$low & 4294967295) >>> 0)), new $Uint64(x$3.$high + c0.$high, x$3.$low + c0.$low)); - v.l2 = (x$5 = (x$6 = v.l2, new $Uint64(x$6.$high & 524287, (x$6.$low & 4294967295) >>> 0)), new $Uint64(x$5.$high + c1.$high, x$5.$low + c1.$low)); - v.l3 = (x$7 = (x$8 = v.l3, new $Uint64(x$8.$high & 524287, (x$8.$low & 4294967295) >>> 0)), new $Uint64(x$7.$high + c2.$high, x$7.$low + c2.$low)); - v.l4 = (x$9 = (x$10 = v.l4, new $Uint64(x$10.$high & 524287, (x$10.$low & 4294967295) >>> 0)), new $Uint64(x$9.$high + c3.$high, x$9.$low + c3.$low)); - return v; - }; - Element.prototype.carryPropagateGeneric = function() { return this.$val.carryPropagateGeneric(); }; - Element.ptr.prototype.carryPropagate = function() { - var v; - v = this; - return v.carryPropagateGeneric(); - }; - Element.prototype.carryPropagate = function() { return this.$val.carryPropagate(); }; - feMul = function(v, x, y) { - var v, x, y; - feMulGeneric(v, x, y); - }; - feSquare = function(v, x) { - var v, x; - feSquareGeneric(v, x); - }; - Element.ptr.prototype.Zero = function() { - var v; - v = this; - Element.copy(v, feZero); - return v; - }; - Element.prototype.Zero = function() { return this.$val.Zero(); }; - Element.ptr.prototype.One = function() { - var v; - v = this; - Element.copy(v, feOne); - return v; - }; - Element.prototype.One = function() { return this.$val.One(); }; - Element.ptr.prototype.reduce = function() { - var c, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - v.carryPropagate(); - c = $shiftRightUint64(((x = v.l0, new $Uint64(x.$high + 0, x.$low + 19))), 51); - c = $shiftRightUint64(((x$1 = v.l1, new $Uint64(x$1.$high + c.$high, x$1.$low + c.$low))), 51); - c = $shiftRightUint64(((x$2 = v.l2, new $Uint64(x$2.$high + c.$high, x$2.$low + c.$low))), 51); - c = $shiftRightUint64(((x$3 = v.l3, new $Uint64(x$3.$high + c.$high, x$3.$low + c.$low))), 51); - c = $shiftRightUint64(((x$4 = v.l4, new $Uint64(x$4.$high + c.$high, x$4.$low + c.$low))), 51); - v.l0 = (x$5 = v.l0, x$6 = $mul64(new $Uint64(0, 19), c), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - v.l1 = (x$7 = v.l1, x$8 = $shiftRightUint64(v.l0, 51), new $Uint64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)); - v.l0 = (x$9 = v.l0, new $Uint64(x$9.$high & 524287, (x$9.$low & 4294967295) >>> 0)); - v.l2 = (x$10 = v.l2, x$11 = $shiftRightUint64(v.l1, 51), new $Uint64(x$10.$high + x$11.$high, x$10.$low + x$11.$low)); - v.l1 = (x$12 = v.l1, new $Uint64(x$12.$high & 524287, (x$12.$low & 4294967295) >>> 0)); - v.l3 = (x$13 = v.l3, x$14 = $shiftRightUint64(v.l2, 51), new $Uint64(x$13.$high + x$14.$high, x$13.$low + x$14.$low)); - v.l2 = (x$15 = v.l2, new $Uint64(x$15.$high & 524287, (x$15.$low & 4294967295) >>> 0)); - v.l4 = (x$16 = v.l4, x$17 = $shiftRightUint64(v.l3, 51), new $Uint64(x$16.$high + x$17.$high, x$16.$low + x$17.$low)); - v.l3 = (x$18 = v.l3, new $Uint64(x$18.$high & 524287, (x$18.$low & 4294967295) >>> 0)); - v.l4 = (x$19 = v.l4, new $Uint64(x$19.$high & 524287, (x$19.$low & 4294967295) >>> 0)); - return v; - }; - Element.prototype.reduce = function() { return this.$val.reduce(); }; - Element.ptr.prototype.Add = function(a, b) { - var a, b, v, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - v.l0 = (x = a.l0, x$1 = b.l0, new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - v.l1 = (x$2 = a.l1, x$3 = b.l1, new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - v.l2 = (x$4 = a.l2, x$5 = b.l2, new $Uint64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); - v.l3 = (x$6 = a.l3, x$7 = b.l3, new $Uint64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)); - v.l4 = (x$8 = a.l4, x$9 = b.l4, new $Uint64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)); - return v.carryPropagateGeneric(); - }; - Element.prototype.Add = function(a, b) { return this.$val.Add(a, b); }; - Element.ptr.prototype.Subtract = function(a, b) { - var a, b, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - v.l0 = (x = (x$1 = a.l0, new $Uint64(x$1.$high + 1048575, x$1.$low + 4294967258)), x$2 = b.l0, new $Uint64(x.$high - x$2.$high, x.$low - x$2.$low)); - v.l1 = (x$3 = (x$4 = a.l1, new $Uint64(x$4.$high + 1048575, x$4.$low + 4294967294)), x$5 = b.l1, new $Uint64(x$3.$high - x$5.$high, x$3.$low - x$5.$low)); - v.l2 = (x$6 = (x$7 = a.l2, new $Uint64(x$7.$high + 1048575, x$7.$low + 4294967294)), x$8 = b.l2, new $Uint64(x$6.$high - x$8.$high, x$6.$low - x$8.$low)); - v.l3 = (x$9 = (x$10 = a.l3, new $Uint64(x$10.$high + 1048575, x$10.$low + 4294967294)), x$11 = b.l3, new $Uint64(x$9.$high - x$11.$high, x$9.$low - x$11.$low)); - v.l4 = (x$12 = (x$13 = a.l4, new $Uint64(x$13.$high + 1048575, x$13.$low + 4294967294)), x$14 = b.l4, new $Uint64(x$12.$high - x$14.$high, x$12.$low - x$14.$low)); - return v.carryPropagate(); - }; - Element.prototype.Subtract = function(a, b) { return this.$val.Subtract(a, b); }; - Element.ptr.prototype.Negate = function(a) { - var a, v; - v = this; - return v.Subtract(feZero, a); - }; - Element.prototype.Negate = function(a) { return this.$val.Negate(a); }; - Element.ptr.prototype.Invert = function(z) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, i, i$1, i$2, i$3, i$4, i$5, i$6, t, v, z, z11, z2, z2_100_0, z2_10_0, z2_20_0, z2_50_0, z2_5_0, z9; - v = this; - _tmp = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$6 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$7 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$8 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - z2 = $clone(_tmp, Element); - z9 = $clone(_tmp$1, Element); - z11 = $clone(_tmp$2, Element); - z2_5_0 = $clone(_tmp$3, Element); - z2_10_0 = $clone(_tmp$4, Element); - z2_20_0 = $clone(_tmp$5, Element); - z2_50_0 = $clone(_tmp$6, Element); - z2_100_0 = $clone(_tmp$7, Element); - t = $clone(_tmp$8, Element); - z2.Square(z); - t.Square(z2); - t.Square(t); - z9.Multiply(t, z); - z11.Multiply(z9, z2); - t.Square(z11); - z2_5_0.Multiply(t, z9); - t.Square(z2_5_0); - i = 0; - while (true) { - if (!(i < 4)) { break; } - t.Square(t); - i = i + (1) >> 0; - } - z2_10_0.Multiply(t, z2_5_0); - t.Square(z2_10_0); - i$1 = 0; - while (true) { - if (!(i$1 < 9)) { break; } - t.Square(t); - i$1 = i$1 + (1) >> 0; - } - z2_20_0.Multiply(t, z2_10_0); - t.Square(z2_20_0); - i$2 = 0; - while (true) { - if (!(i$2 < 19)) { break; } - t.Square(t); - i$2 = i$2 + (1) >> 0; - } - t.Multiply(t, z2_20_0); - t.Square(t); - i$3 = 0; - while (true) { - if (!(i$3 < 9)) { break; } - t.Square(t); - i$3 = i$3 + (1) >> 0; - } - z2_50_0.Multiply(t, z2_10_0); - t.Square(z2_50_0); - i$4 = 0; - while (true) { - if (!(i$4 < 49)) { break; } - t.Square(t); - i$4 = i$4 + (1) >> 0; - } - z2_100_0.Multiply(t, z2_50_0); - t.Square(z2_100_0); - i$5 = 0; - while (true) { - if (!(i$5 < 99)) { break; } - t.Square(t); - i$5 = i$5 + (1) >> 0; - } - t.Multiply(t, z2_100_0); - t.Square(t); - i$6 = 0; - while (true) { - if (!(i$6 < 49)) { break; } - t.Square(t); - i$6 = i$6 + (1) >> 0; - } - t.Multiply(t, z2_50_0); - t.Square(t); - t.Square(t); - t.Square(t); - t.Square(t); - t.Square(t); - return v.Multiply(t, z11); - }; - Element.prototype.Invert = function(z) { return this.$val.Invert(z); }; - Element.ptr.prototype.Set = function(a) { - var a, v; - v = this; - Element.copy(v, a); - return v; - }; - Element.prototype.Set = function(a) { return this.$val.Set(a); }; - Element.ptr.prototype.SetBytes = function(x) { - var v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - if (!((x.$length === 32))) { - $panic(new $String("edwards25519: invalid field element input size")); - } - v.l0 = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 0, 8)); - v.l0 = (x$1 = v.l0, x$2 = new $Uint64(524287, 4294967295), new $Uint64(x$1.$high & x$2.$high, (x$1.$low & x$2.$low) >>> 0)); - v.l1 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 6, 14)), 3); - v.l1 = (x$3 = v.l1, x$4 = new $Uint64(524287, 4294967295), new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)); - v.l2 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 12, 20)), 6); - v.l2 = (x$5 = v.l2, x$6 = new $Uint64(524287, 4294967295), new $Uint64(x$5.$high & x$6.$high, (x$5.$low & x$6.$low) >>> 0)); - v.l3 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 19, 27)), 1); - v.l3 = (x$7 = v.l3, x$8 = new $Uint64(524287, 4294967295), new $Uint64(x$7.$high & x$8.$high, (x$7.$low & x$8.$low) >>> 0)); - v.l4 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 24, 32)), 12); - v.l4 = (x$9 = v.l4, x$10 = new $Uint64(524287, 4294967295), new $Uint64(x$9.$high & x$10.$high, (x$9.$low & x$10.$low) >>> 0)); - return v; - }; - Element.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; - Element.ptr.prototype.Bytes = function() { - var out, v; - v = this; - out = arrayType.zero(); - return v.bytes(out); - }; - Element.prototype.Bytes = function() { return this.$val.Bytes(); }; - Element.ptr.prototype.bytes = function(out) { - var _i, _i$1, _q, _r, _ref, _ref$1, bb, bitsOffset, buf, i, i$1, l, off, out, t, v, x, x$1; - v = this; - t = $clone(v, Element); - t.reduce(); - buf = arrayType$1.zero(); - _ref = $toNativeArray($kindUint64, [t.l0, t.l1, t.l2, t.l3, t.l4]); - _i = 0; - while (true) { - if (!(_i < 5)) { break; } - i = _i; - l = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); - bitsOffset = $imul(i, 51); - $clone(binary.LittleEndian, binary.littleEndian).PutUint64(new sliceType(buf), $shiftLeft64(l, (((_r = bitsOffset % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)))); - _ref$1 = buf; - _i$1 = 0; - while (true) { - if (!(_i$1 < 8)) { break; } - i$1 = _i$1; - bb = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); - off = (_q = bitsOffset / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + i$1 >> 0; - if (off >= 32) { - break; - } - (x$1 = out, ((off < 0 || off >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[off] = (((x = out, ((off < 0 || off >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[off])) | (bb)) >>> 0))); - _i$1++; - } - _i++; - } - return new sliceType(out); - }; - Element.prototype.bytes = function(out) { return this.$val.bytes(out); }; - Element.ptr.prototype.Equal = function(u) { - var _tmp, _tmp$1, sa, sv, u, v; - v = this; - _tmp = u.Bytes(); - _tmp$1 = v.Bytes(); - sa = _tmp; - sv = _tmp$1; - return subtle.ConstantTimeCompare(sa, sv); - }; - Element.prototype.Equal = function(u) { return this.$val.Equal(u); }; - mask64Bits = function(cond) { - var cond, x, x$1; - return (x = (x$1 = (new $Uint64(0, cond)), new $Uint64(x$1.$high - 0, x$1.$low - 1)), new $Uint64(~x.$high, ~x.$low >>> 0)); - }; - Element.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, m, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - m = mask64Bits(cond); - v.l0 = (x = (x$1 = a.l0, new $Uint64(m.$high & x$1.$high, (m.$low & x$1.$low) >>> 0)), x$2 = (x$3 = new $Uint64(~m.$high, ~m.$low >>> 0), x$4 = b.l0, new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); - v.l1 = (x$5 = (x$6 = a.l1, new $Uint64(m.$high & x$6.$high, (m.$low & x$6.$low) >>> 0)), x$7 = (x$8 = new $Uint64(~m.$high, ~m.$low >>> 0), x$9 = b.l1, new $Uint64(x$8.$high & x$9.$high, (x$8.$low & x$9.$low) >>> 0)), new $Uint64(x$5.$high | x$7.$high, (x$5.$low | x$7.$low) >>> 0)); - v.l2 = (x$10 = (x$11 = a.l2, new $Uint64(m.$high & x$11.$high, (m.$low & x$11.$low) >>> 0)), x$12 = (x$13 = new $Uint64(~m.$high, ~m.$low >>> 0), x$14 = b.l2, new $Uint64(x$13.$high & x$14.$high, (x$13.$low & x$14.$low) >>> 0)), new $Uint64(x$10.$high | x$12.$high, (x$10.$low | x$12.$low) >>> 0)); - v.l3 = (x$15 = (x$16 = a.l3, new $Uint64(m.$high & x$16.$high, (m.$low & x$16.$low) >>> 0)), x$17 = (x$18 = new $Uint64(~m.$high, ~m.$low >>> 0), x$19 = b.l3, new $Uint64(x$18.$high & x$19.$high, (x$18.$low & x$19.$low) >>> 0)), new $Uint64(x$15.$high | x$17.$high, (x$15.$low | x$17.$low) >>> 0)); - v.l4 = (x$20 = (x$21 = a.l4, new $Uint64(m.$high & x$21.$high, (m.$low & x$21.$low) >>> 0)), x$22 = (x$23 = new $Uint64(~m.$high, ~m.$low >>> 0), x$24 = b.l4, new $Uint64(x$23.$high & x$24.$high, (x$23.$low & x$24.$low) >>> 0)), new $Uint64(x$20.$high | x$22.$high, (x$20.$low | x$22.$low) >>> 0)); - return v; - }; - Element.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - Element.ptr.prototype.Swap = function(u, cond) { - var cond, m, t, u, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - m = mask64Bits(cond); - t = (x = (x$1 = v.l0, x$2 = u.l0, new $Uint64(x$1.$high ^ x$2.$high, (x$1.$low ^ x$2.$low) >>> 0)), new $Uint64(m.$high & x.$high, (m.$low & x.$low) >>> 0)); - v.l0 = (x$3 = v.l0, x$4 = t, new $Uint64(x$3.$high ^ x$4.$high, (x$3.$low ^ x$4.$low) >>> 0)); - u.l0 = (x$5 = u.l0, x$6 = t, new $Uint64(x$5.$high ^ x$6.$high, (x$5.$low ^ x$6.$low) >>> 0)); - t = (x$7 = (x$8 = v.l1, x$9 = u.l1, new $Uint64(x$8.$high ^ x$9.$high, (x$8.$low ^ x$9.$low) >>> 0)), new $Uint64(m.$high & x$7.$high, (m.$low & x$7.$low) >>> 0)); - v.l1 = (x$10 = v.l1, x$11 = t, new $Uint64(x$10.$high ^ x$11.$high, (x$10.$low ^ x$11.$low) >>> 0)); - u.l1 = (x$12 = u.l1, x$13 = t, new $Uint64(x$12.$high ^ x$13.$high, (x$12.$low ^ x$13.$low) >>> 0)); - t = (x$14 = (x$15 = v.l2, x$16 = u.l2, new $Uint64(x$15.$high ^ x$16.$high, (x$15.$low ^ x$16.$low) >>> 0)), new $Uint64(m.$high & x$14.$high, (m.$low & x$14.$low) >>> 0)); - v.l2 = (x$17 = v.l2, x$18 = t, new $Uint64(x$17.$high ^ x$18.$high, (x$17.$low ^ x$18.$low) >>> 0)); - u.l2 = (x$19 = u.l2, x$20 = t, new $Uint64(x$19.$high ^ x$20.$high, (x$19.$low ^ x$20.$low) >>> 0)); - t = (x$21 = (x$22 = v.l3, x$23 = u.l3, new $Uint64(x$22.$high ^ x$23.$high, (x$22.$low ^ x$23.$low) >>> 0)), new $Uint64(m.$high & x$21.$high, (m.$low & x$21.$low) >>> 0)); - v.l3 = (x$24 = v.l3, x$25 = t, new $Uint64(x$24.$high ^ x$25.$high, (x$24.$low ^ x$25.$low) >>> 0)); - u.l3 = (x$26 = u.l3, x$27 = t, new $Uint64(x$26.$high ^ x$27.$high, (x$26.$low ^ x$27.$low) >>> 0)); - t = (x$28 = (x$29 = v.l4, x$30 = u.l4, new $Uint64(x$29.$high ^ x$30.$high, (x$29.$low ^ x$30.$low) >>> 0)), new $Uint64(m.$high & x$28.$high, (m.$low & x$28.$low) >>> 0)); - v.l4 = (x$31 = v.l4, x$32 = t, new $Uint64(x$31.$high ^ x$32.$high, (x$31.$low ^ x$32.$low) >>> 0)); - u.l4 = (x$33 = u.l4, x$34 = t, new $Uint64(x$33.$high ^ x$34.$high, (x$33.$low ^ x$34.$low) >>> 0)); - }; - Element.prototype.Swap = function(u, cond) { return this.$val.Swap(u, cond); }; - Element.ptr.prototype.IsNegative = function() { - var v, x; - v = this; - return (((((x = v.Bytes(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) & 1) >>> 0) >> 0)); - }; - Element.prototype.IsNegative = function() { return this.$val.IsNegative(); }; - Element.ptr.prototype.Absolute = function(u) { - var u, v; - v = this; - return v.Select(new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Negate(u), u, u.IsNegative()); - }; - Element.prototype.Absolute = function(u) { return this.$val.Absolute(u); }; - Element.ptr.prototype.Multiply = function(x, y) { - var v, x, y; - v = this; - feMul(v, x, y); - return v; - }; - Element.prototype.Multiply = function(x, y) { return this.$val.Multiply(x, y); }; - Element.ptr.prototype.Square = function(x) { - var v, x; - v = this; - feSquare(v, x); - return v; - }; - Element.prototype.Square = function(x) { return this.$val.Square(x); }; - Element.ptr.prototype.Mult32 = function(x, y) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, v, x, x$1, x0hi, x0lo, x1hi, x1lo, x2hi, x2lo, x3hi, x3lo, x4hi, x4lo, y; - v = this; - _tuple = mul51(x.l0, y); - x0lo = _tuple[0]; - x0hi = _tuple[1]; - _tuple$1 = mul51(x.l1, y); - x1lo = _tuple$1[0]; - x1hi = _tuple$1[1]; - _tuple$2 = mul51(x.l2, y); - x2lo = _tuple$2[0]; - x2hi = _tuple$2[1]; - _tuple$3 = mul51(x.l3, y); - x3lo = _tuple$3[0]; - x3hi = _tuple$3[1]; - _tuple$4 = mul51(x.l4, y); - x4lo = _tuple$4[0]; - x4hi = _tuple$4[1]; - v.l0 = (x$1 = $mul64(new $Uint64(0, 19), x4hi), new $Uint64(x0lo.$high + x$1.$high, x0lo.$low + x$1.$low)); - v.l1 = new $Uint64(x1lo.$high + x0hi.$high, x1lo.$low + x0hi.$low); - v.l2 = new $Uint64(x2lo.$high + x1hi.$high, x2lo.$low + x1hi.$low); - v.l3 = new $Uint64(x3lo.$high + x2hi.$high, x3lo.$low + x2hi.$low); - v.l4 = new $Uint64(x4lo.$high + x3hi.$high, x4lo.$low + x3hi.$low); - return v; - }; - Element.prototype.Mult32 = function(x, y) { return this.$val.Mult32(x, y); }; - mul51 = function(a, b) { - var _tuple, a, b, hi, lo, mh, ml, x, x$1; - lo = new $Uint64(0, 0); - hi = new $Uint64(0, 0); - _tuple = bits.Mul64(a, (new $Uint64(0, b))); - mh = _tuple[0]; - ml = _tuple[1]; - lo = new $Uint64(ml.$high & 524287, (ml.$low & 4294967295) >>> 0); - hi = (x = $shiftLeft64(mh, 13), x$1 = $shiftRightUint64(ml, 51), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - return [lo, hi]; - }; - Element.ptr.prototype.Pow22523 = function(x) { - var _tmp, _tmp$1, _tmp$2, i, i$1, i$2, i$3, i$4, i$5, i$6, t0, t1, t2, v, x; - v = this; - _tmp = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - t0 = $clone(_tmp, Element); - t1 = $clone(_tmp$1, Element); - t2 = $clone(_tmp$2, Element); - t0.Square(x); - t1.Square(t0); - t1.Square(t1); - t1.Multiply(x, t1); - t0.Multiply(t0, t1); - t0.Square(t0); - t0.Multiply(t1, t0); - t1.Square(t0); - i = 1; - while (true) { - if (!(i < 5)) { break; } - t1.Square(t1); - i = i + (1) >> 0; - } - t0.Multiply(t1, t0); - t1.Square(t0); - i$1 = 1; - while (true) { - if (!(i$1 < 10)) { break; } - t1.Square(t1); - i$1 = i$1 + (1) >> 0; - } - t1.Multiply(t1, t0); - t2.Square(t1); - i$2 = 1; - while (true) { - if (!(i$2 < 20)) { break; } - t2.Square(t2); - i$2 = i$2 + (1) >> 0; - } - t1.Multiply(t2, t1); - t1.Square(t1); - i$3 = 1; - while (true) { - if (!(i$3 < 10)) { break; } - t1.Square(t1); - i$3 = i$3 + (1) >> 0; - } - t0.Multiply(t1, t0); - t1.Square(t0); - i$4 = 1; - while (true) { - if (!(i$4 < 50)) { break; } - t1.Square(t1); - i$4 = i$4 + (1) >> 0; - } - t1.Multiply(t1, t0); - t2.Square(t1); - i$5 = 1; - while (true) { - if (!(i$5 < 100)) { break; } - t2.Square(t2); - i$5 = i$5 + (1) >> 0; - } - t1.Multiply(t2, t1); - t1.Square(t1); - i$6 = 1; - while (true) { - if (!(i$6 < 50)) { break; } - t1.Square(t1); - i$6 = i$6 + (1) >> 0; - } - t0.Multiply(t1, t0); - t0.Square(t0); - t0.Square(t0); - return v.Multiply(t0, x); - }; - Element.prototype.Pow22523 = function(x) { return this.$val.Pow22523(x); }; - Element.ptr.prototype.SqrtRatio = function(u, v) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, check, correctSignSqrt, flippedSignSqrt, flippedSignSqrtI, r, rPrime, rr, u, uNeg, uv3, uv7, v, v2, wasSquare; - rr = ptrType.nil; - wasSquare = 0; - r = this; - _tmp = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - a = $clone(_tmp, Element); - b = $clone(_tmp$1, Element); - v2 = a.Square(v); - uv3 = b.Multiply(u, b.Multiply(v2, v)); - uv7 = a.Multiply(uv3, a.Square(v2)); - r.Multiply(uv3, r.Pow22523(uv7)); - check = a.Multiply(v, a.Square(r)); - uNeg = b.Negate(u); - correctSignSqrt = check.Equal(u); - flippedSignSqrt = check.Equal(uNeg); - flippedSignSqrtI = check.Equal(uNeg.Multiply(uNeg, sqrtM1)); - rPrime = b.Multiply(r, sqrtM1); - r.Select(rPrime, r, flippedSignSqrt | flippedSignSqrtI); - r.Absolute(r); - _tmp$2 = r; - _tmp$3 = correctSignSqrt | flippedSignSqrt; - rr = _tmp$2; - wasSquare = _tmp$3; - return [rr, wasSquare]; - }; - Element.prototype.SqrtRatio = function(u, v) { return this.$val.SqrtRatio(u, v); }; - ptrType.methods = [{prop: "carryPropagateGeneric", name: "carryPropagateGeneric", pkg: "crypto/ed25519/internal/edwards25519/field", typ: $funcType([], [ptrType], false)}, {prop: "carryPropagate", name: "carryPropagate", pkg: "crypto/ed25519/internal/edwards25519/field", typ: $funcType([], [ptrType], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "One", name: "One", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "reduce", name: "reduce", pkg: "crypto/ed25519/internal/edwards25519/field", typ: $funcType([], [ptrType], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Subtract", name: "Subtract", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Negate", name: "Negate", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Invert", name: "Invert", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/ed25519/internal/edwards25519/field", typ: $funcType([ptrType$1], [sliceType], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType], [$Int], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType, ptrType, $Int], [ptrType], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([ptrType, $Int], [], false)}, {prop: "IsNegative", name: "IsNegative", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Absolute", name: "Absolute", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Multiply", name: "Multiply", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Square", name: "Square", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Mult32", name: "Mult32", pkg: "", typ: $funcType([ptrType, $Uint32], [ptrType], false)}, {prop: "Pow22523", name: "Pow22523", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "SqrtRatio", name: "SqrtRatio", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType, $Int], false)}]; - uint128.init("crypto/ed25519/internal/edwards25519/field", [{prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - Element.init("crypto/ed25519/internal/edwards25519/field", [{prop: "l0", name: "l0", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l1", name: "l1", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l2", name: "l2", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l3", name: "l3", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l4", name: "l4", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - feZero = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - feOne = new Element.ptr(new $Uint64(0, 1), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - sqrtM1 = new Element.ptr(new $Uint64(400167, 1242472624), new $Uint64(54693, 4237236381), new $Uint64(520030, 2629635168), new $Uint64(492949, 2793426078), new $Uint64(178226, 1208286237)); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/ed25519/internal/edwards25519"] = (function() { - var $pkg = {}, $init, field, subtle, binary, errors, sync, projLookupTable, affineLookupTable, nafLookupTable5, nafLookupTable8, Scalar, projP1xP1, projP2, Point, incomparable, projCached, affineCached, arrayType, arrayType$1, structType, arrayType$2, structType$1, sliceType, funcType, arrayType$3, arrayType$4, ptrType, sliceType$1, arrayType$5, arrayType$6, arrayType$7, arrayType$8, ptrType$1, arrayType$9, arrayType$10, arrayType$11, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, basepointTablePrecomp, basepointNafTablePrecomp, scZero, scOne, scMinusOne, identity, generator, feOne, d, d2, _tuple, _tuple$1, basepointTable, basepointNafTable, NewScalar, isReduced, load3, load4, scMulAdd, scReduce, checkInitialized, NewIdentityPoint, NewGeneratorPoint, copyFieldElement; - field = $packages["crypto/ed25519/internal/edwards25519/field"]; - subtle = $packages["crypto/subtle"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - sync = $packages["sync"]; - projLookupTable = $pkg.projLookupTable = $newType(0, $kindStruct, "edwards25519.projLookupTable", true, "crypto/ed25519/internal/edwards25519", false, function(points_) { - this.$val = this; - if (arguments.length === 0) { - this.points = arrayType$5.zero(); - return; - } - this.points = points_; - }); - affineLookupTable = $pkg.affineLookupTable = $newType(0, $kindStruct, "edwards25519.affineLookupTable", true, "crypto/ed25519/internal/edwards25519", false, function(points_) { - this.$val = this; - if (arguments.length === 0) { - this.points = arrayType.zero(); - return; - } - this.points = points_; - }); - nafLookupTable5 = $pkg.nafLookupTable5 = $newType(0, $kindStruct, "edwards25519.nafLookupTable5", true, "crypto/ed25519/internal/edwards25519", false, function(points_) { - this.$val = this; - if (arguments.length === 0) { - this.points = arrayType$5.zero(); - return; - } - this.points = points_; - }); - nafLookupTable8 = $pkg.nafLookupTable8 = $newType(0, $kindStruct, "edwards25519.nafLookupTable8", true, "crypto/ed25519/internal/edwards25519", false, function(points_) { - this.$val = this; - if (arguments.length === 0) { - this.points = arrayType$2.zero(); - return; - } - this.points = points_; - }); - Scalar = $pkg.Scalar = $newType(0, $kindStruct, "edwards25519.Scalar", true, "crypto/ed25519/internal/edwards25519", true, function(s_) { - this.$val = this; - if (arguments.length === 0) { - this.s = arrayType$7.zero(); - return; - } - this.s = s_; - }); - projP1xP1 = $pkg.projP1xP1 = $newType(0, $kindStruct, "edwards25519.projP1xP1", true, "crypto/ed25519/internal/edwards25519", false, function(X_, Y_, Z_, T_) { - this.$val = this; - if (arguments.length === 0) { - this.X = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.Y = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.Z = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.T = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - return; - } - this.X = X_; - this.Y = Y_; - this.Z = Z_; - this.T = T_; - }); - projP2 = $pkg.projP2 = $newType(0, $kindStruct, "edwards25519.projP2", true, "crypto/ed25519/internal/edwards25519", false, function(X_, Y_, Z_) { - this.$val = this; - if (arguments.length === 0) { - this.X = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.Y = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.Z = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - return; - } - this.X = X_; - this.Y = Y_; - this.Z = Z_; - }); - Point = $pkg.Point = $newType(0, $kindStruct, "edwards25519.Point", true, "crypto/ed25519/internal/edwards25519", true, function(x_, y_, z_, t_, _$4_) { - this.$val = this; - if (arguments.length === 0) { - this.x = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.y = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.z = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.t = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this._$4 = arrayType$3.zero(); - return; - } - this.x = x_; - this.y = y_; - this.z = z_; - this.t = t_; - this._$4 = _$4_; - }); - incomparable = $pkg.incomparable = $newType(0, $kindArray, "edwards25519.incomparable", true, "crypto/ed25519/internal/edwards25519", false, null); - projCached = $pkg.projCached = $newType(0, $kindStruct, "edwards25519.projCached", true, "crypto/ed25519/internal/edwards25519", false, function(YplusX_, YminusX_, Z_, T2d_) { - this.$val = this; - if (arguments.length === 0) { - this.YplusX = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.YminusX = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.Z = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.T2d = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - return; - } - this.YplusX = YplusX_; - this.YminusX = YminusX_; - this.Z = Z_; - this.T2d = T2d_; - }); - affineCached = $pkg.affineCached = $newType(0, $kindStruct, "edwards25519.affineCached", true, "crypto/ed25519/internal/edwards25519", false, function(YplusX_, YminusX_, T2d_) { - this.$val = this; - if (arguments.length === 0) { - this.YplusX = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.YminusX = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - this.T2d = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - return; - } - this.YplusX = YplusX_; - this.YminusX = YminusX_; - this.T2d = T2d_; - }); - arrayType = $arrayType(affineCached, 8); - arrayType$1 = $arrayType(affineLookupTable, 32); - structType = $structType("crypto/ed25519/internal/edwards25519", [{prop: "table", name: "table", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "initOnce", name: "initOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}]); - arrayType$2 = $arrayType(affineCached, 64); - structType$1 = $structType("crypto/ed25519/internal/edwards25519", [{prop: "table", name: "table", embedded: false, exported: false, typ: nafLookupTable8, tag: ""}, {prop: "initOnce", name: "initOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}]); - sliceType = $sliceType($Uint8); - funcType = $funcType([], [], false); - arrayType$3 = $arrayType(funcType, 0); - arrayType$4 = $arrayType($Int8, 64); - ptrType = $ptrType(Point); - sliceType$1 = $sliceType(ptrType); - arrayType$5 = $arrayType(projCached, 8); - arrayType$6 = $arrayType($Int8, 256); - arrayType$7 = $arrayType($Uint8, 32); - arrayType$8 = $arrayType($Uint8, 64); - ptrType$1 = $ptrType(Scalar); - arrayType$9 = $arrayType($Int64, 23); - arrayType$10 = $arrayType($Int64, 17); - arrayType$11 = $arrayType($Uint64, 5); - ptrType$2 = $ptrType(projCached); - ptrType$3 = $ptrType(projLookupTable); - ptrType$4 = $ptrType(affineCached); - ptrType$5 = $ptrType(affineLookupTable); - ptrType$6 = $ptrType(nafLookupTable5); - ptrType$7 = $ptrType(nafLookupTable8); - ptrType$8 = $ptrType(projP1xP1); - ptrType$9 = $ptrType(projP2); - ptrType$10 = $ptrType(arrayType$7); - projLookupTable.ptr.prototype.FromP3 = function(q) { - var i, q, tmpP1xP1, tmpP3, v, x, x$1, x$2; - v = this; - v.points[0].FromP3(q); - tmpP3 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()); - tmpP1xP1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - i = 0; - while (true) { - if (!(i < 7)) { break; } - (x = v.points, x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])).FromP3(tmpP3.fromP1xP1(tmpP1xP1.Add(q, (x$2 = v.points, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i]))))); - i = i + (1) >> 0; - } - }; - projLookupTable.prototype.FromP3 = function(q) { return this.$val.FromP3(q); }; - affineLookupTable.ptr.prototype.FromP3 = function(q) { - var i, q, tmpP1xP1, tmpP3, v, x, x$1, x$2; - v = this; - v.points[0].FromP3(q); - tmpP3 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()); - tmpP1xP1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - i = 0; - while (true) { - if (!(i < 7)) { break; } - (x = v.points, x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])).FromP3(tmpP3.fromP1xP1(tmpP1xP1.AddAffine(q, (x$2 = v.points, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i]))))); - i = i + (1) >> 0; - } - }; - affineLookupTable.prototype.FromP3 = function(q) { return this.$val.FromP3(q); }; - nafLookupTable5.ptr.prototype.FromP3 = function(q) { - var i, q, q2, tmpP1xP1, tmpP3, v, x, x$1, x$2; - v = this; - v.points[0].FromP3(q); - q2 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()); - q2.Add(q, q); - tmpP3 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()); - tmpP1xP1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - i = 0; - while (true) { - if (!(i < 7)) { break; } - (x = v.points, x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])).FromP3(tmpP3.fromP1xP1(tmpP1xP1.Add(q2, (x$2 = v.points, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i]))))); - i = i + (1) >> 0; - } - }; - nafLookupTable5.prototype.FromP3 = function(q) { return this.$val.FromP3(q); }; - nafLookupTable8.ptr.prototype.FromP3 = function(q) { - var i, q, q2, tmpP1xP1, tmpP3, v, x, x$1, x$2; - v = this; - v.points[0].FromP3(q); - q2 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()); - q2.Add(q, q); - tmpP3 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()); - tmpP1xP1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - i = 0; - while (true) { - if (!(i < 63)) { break; } - (x = v.points, x$1 = i + 1 >> 0, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])).FromP3(tmpP3.fromP1xP1(tmpP1xP1.AddAffine(q2, (x$2 = v.points, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i]))))); - i = i + (1) >> 0; - } - }; - nafLookupTable8.prototype.FromP3 = function(q) { return this.$val.FromP3(q); }; - projLookupTable.ptr.prototype.SelectInto = function(dest, x) { - var cond, dest, j, v, x, x$1, x$2, xabs, xmask; - v = this; - xmask = x >> 7 << 24 >> 24; - xabs = ((((((x + xmask << 24 >> 24)) ^ xmask) << 24 >> 24) << 24 >>> 24)); - dest.Zero(); - j = 1; - while (true) { - if (!(j <= 8)) { break; } - cond = subtle.ConstantTimeByteEq(xabs, ((j << 24 >>> 24))); - dest.Select((x$1 = v.points, x$2 = j - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])), dest, cond); - j = j + (1) >> 0; - } - dest.CondNeg((((xmask & 1) >> 0))); - }; - projLookupTable.prototype.SelectInto = function(dest, x) { return this.$val.SelectInto(dest, x); }; - affineLookupTable.ptr.prototype.SelectInto = function(dest, x) { - var cond, dest, j, v, x, x$1, x$2, xabs, xmask; - v = this; - xmask = x >> 7 << 24 >> 24; - xabs = ((((((x + xmask << 24 >> 24)) ^ xmask) << 24 >> 24) << 24 >>> 24)); - dest.Zero(); - j = 1; - while (true) { - if (!(j <= 8)) { break; } - cond = subtle.ConstantTimeByteEq(xabs, ((j << 24 >>> 24))); - dest.Select((x$1 = v.points, x$2 = j - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])), dest, cond); - j = j + (1) >> 0; - } - dest.CondNeg((((xmask & 1) >> 0))); - }; - affineLookupTable.prototype.SelectInto = function(dest, x) { return this.$val.SelectInto(dest, x); }; - nafLookupTable5.ptr.prototype.SelectInto = function(dest, x) { - var _q, dest, v, x, x$1, x$2; - v = this; - projCached.copy(dest, (x$1 = v.points, x$2 = (_q = x / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2]))); - }; - nafLookupTable5.prototype.SelectInto = function(dest, x) { return this.$val.SelectInto(dest, x); }; - nafLookupTable8.ptr.prototype.SelectInto = function(dest, x) { - var _q, dest, v, x, x$1, x$2; - v = this; - affineCached.copy(dest, (x$1 = v.points, x$2 = (_q = x / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2]))); - }; - nafLookupTable8.prototype.SelectInto = function(dest, x) { return this.$val.SelectInto(dest, x); }; - basepointTable = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = basepointTablePrecomp.initOnce.Do((function() { - var i, j, p, x; - p = NewGeneratorPoint(); - i = 0; - while (true) { - if (!(i < 32)) { break; } - (x = basepointTablePrecomp.table, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])).FromP3(p); - j = 0; - while (true) { - if (!(j < 8)) { break; } - p.Add(p, p); - j = j + (1) >> 0; - } - i = i + (1) >> 0; - } - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return basepointTablePrecomp.table; - /* */ } return; } var $f = {$blk: basepointTable, $c: true, $r, $s};return $f; - }; - Point.ptr.prototype.ScalarBaseMult = function(x) { - var {_q, _q$1, _r, basepointTable$1, digits, i, i$1, multiple, tmp1, tmp2, v, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {x}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - _r = basepointTable(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - basepointTable$1 = _r; - digits = $clone(x.signedRadix16(), arrayType$4); - multiple = new affineCached.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp2 = new projP2.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - v.Set(NewIdentityPoint()); - i = 1; - while (true) { - if (!(i < 64)) { break; } - (x$1 = basepointTable$1, x$2 = (_q = i / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])).SelectInto(multiple, ((i < 0 || i >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i])); - tmp1.AddAffine(v, multiple); - v.fromP1xP1(tmp1); - i = i + (2) >> 0; - } - tmp2.FromP3(v); - tmp1.Double(tmp2); - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - v.fromP1xP1(tmp1); - i$1 = 0; - while (true) { - if (!(i$1 < 64)) { break; } - (x$3 = basepointTable$1, x$4 = (_q$1 = i$1 / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")), ((x$4 < 0 || x$4 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[x$4])).SelectInto(multiple, ((i$1 < 0 || i$1 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i$1])); - tmp1.AddAffine(v, multiple); - v.fromP1xP1(tmp1); - i$1 = i$1 + (2) >> 0; - } - $s = -1; return v; - /* */ } return; } var $f = {$blk: Point.ptr.prototype.ScalarBaseMult, $c: true, $r, _q, _q$1, _r, basepointTable$1, digits, i, i$1, multiple, tmp1, tmp2, v, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - Point.prototype.ScalarBaseMult = function(x) { return this.$val.ScalarBaseMult(x); }; - Point.ptr.prototype.ScalarMult = function(x, q) { - var digits, i, multiple, q, table, tmp1, tmp2, v, x; - v = this; - checkInitialized(new sliceType$1([q])); - table = new projLookupTable.ptr(arrayType$5.zero()); - table.FromP3(q); - digits = $clone(x.signedRadix16(), arrayType$4); - multiple = new projCached.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp2 = new projP2.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - table.SelectInto(multiple, digits[63]); - v.Set(NewIdentityPoint()); - tmp1.Add(v, multiple); - i = 62; - while (true) { - if (!(i >= 0)) { break; } - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - tmp2.FromP1xP1(tmp1); - tmp1.Double(tmp2); - v.fromP1xP1(tmp1); - table.SelectInto(multiple, ((i < 0 || i >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i])); - tmp1.Add(v, multiple); - i = i - (1) >> 0; - } - v.fromP1xP1(tmp1); - return v; - }; - Point.prototype.ScalarMult = function(x, q) { return this.$val.ScalarMult(x, q); }; - basepointNafTable = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = basepointNafTablePrecomp.initOnce.Do((function() { - basepointNafTablePrecomp.table.FromP3(NewGeneratorPoint()); - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return basepointNafTablePrecomp.table; - /* */ } return; } var $f = {$blk: basepointNafTable, $c: true, $r, $s};return $f; - }; - Point.ptr.prototype.VarTimeDoubleScalarBaseMult = function(a, A, b) { - var {A, _r, a, aNaf, aTable, b, bNaf, basepointNafTable$1, i, j, multA, multB, tmp1, tmp2, v, $s, $r, $c} = $restore(this, {a, A, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this; - checkInitialized(new sliceType$1([A])); - _r = basepointNafTable(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - basepointNafTable$1 = _r; - aTable = new nafLookupTable5.ptr(arrayType$5.zero()); - aTable.FromP3(A); - aNaf = $clone(a.nonAdjacentForm(5), arrayType$6); - bNaf = $clone(b.nonAdjacentForm(8), arrayType$6); - i = 255; - j = i; - while (true) { - if (!(j >= 0)) { break; } - if (!((((j < 0 || j >= aNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : aNaf[j]) === 0)) || !((((j < 0 || j >= bNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : bNaf[j]) === 0))) { - break; - } - j = j - (1) >> 0; - } - multA = new projCached.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - multB = new affineCached.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp1 = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp2 = new projP2.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))); - tmp2.Zero(); - while (true) { - if (!(i >= 0)) { break; } - tmp1.Double(tmp2); - if (((i < 0 || i >= aNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : aNaf[i]) > 0) { - v.fromP1xP1(tmp1); - aTable.SelectInto(multA, ((i < 0 || i >= aNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : aNaf[i])); - tmp1.Add(v, multA); - } else if (((i < 0 || i >= aNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : aNaf[i]) < 0) { - v.fromP1xP1(tmp1); - aTable.SelectInto(multA, -((i < 0 || i >= aNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : aNaf[i])); - tmp1.Sub(v, multA); - } - if (((i < 0 || i >= bNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : bNaf[i]) > 0) { - v.fromP1xP1(tmp1); - basepointNafTable$1.SelectInto(multB, ((i < 0 || i >= bNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : bNaf[i])); - tmp1.AddAffine(v, multB); - } else if (((i < 0 || i >= bNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : bNaf[i]) < 0) { - v.fromP1xP1(tmp1); - basepointNafTable$1.SelectInto(multB, -((i < 0 || i >= bNaf.length) ? ($throwRuntimeError("index out of range"), undefined) : bNaf[i])); - tmp1.SubAffine(v, multB); - } - tmp2.FromP1xP1(tmp1); - i = i - (1) >> 0; - } - v.fromP2(tmp2); - $s = -1; return v; - /* */ } return; } var $f = {$blk: Point.ptr.prototype.VarTimeDoubleScalarBaseMult, $c: true, $r, A, _r, a, aNaf, aTable, b, bNaf, basepointNafTable$1, i, j, multA, multB, tmp1, tmp2, v, $s};return $f; - }; - Point.prototype.VarTimeDoubleScalarBaseMult = function(a, A, b) { return this.$val.VarTimeDoubleScalarBaseMult(a, A, b); }; - NewScalar = function() { - return new Scalar.ptr(arrayType$7.zero()); - }; - $pkg.NewScalar = NewScalar; - Scalar.ptr.prototype.MultiplyAdd = function(x, y, z) { - var s, x, y, z; - s = this; - scMulAdd(s.s, x.s, y.s, z.s); - return s; - }; - Scalar.prototype.MultiplyAdd = function(x, y, z) { return this.$val.MultiplyAdd(x, y, z); }; - Scalar.ptr.prototype.Add = function(x, y) { - var s, x, y; - s = this; - scMulAdd(s.s, scOne.s, x.s, y.s); - return s; - }; - Scalar.prototype.Add = function(x, y) { return this.$val.Add(x, y); }; - Scalar.ptr.prototype.Subtract = function(x, y) { - var s, x, y; - s = this; - scMulAdd(s.s, scMinusOne.s, y.s, x.s); - return s; - }; - Scalar.prototype.Subtract = function(x, y) { return this.$val.Subtract(x, y); }; - Scalar.ptr.prototype.Negate = function(x) { - var s, x; - s = this; - scMulAdd(s.s, scMinusOne.s, x.s, scZero.s); - return s; - }; - Scalar.prototype.Negate = function(x) { return this.$val.Negate(x); }; - Scalar.ptr.prototype.Multiply = function(x, y) { - var s, x, y; - s = this; - scMulAdd(s.s, x.s, y.s, scZero.s); - return s; - }; - Scalar.prototype.Multiply = function(x, y) { return this.$val.Multiply(x, y); }; - Scalar.ptr.prototype.Set = function(x) { - var s, x; - s = this; - Scalar.copy(s, x); - return s; - }; - Scalar.prototype.Set = function(x) { return this.$val.Set(x); }; - Scalar.ptr.prototype.SetUniformBytes = function(x) { - var s, wideBytes, x; - s = this; - if (!((x.$length === 64))) { - $panic(new $String("edwards25519: invalid SetUniformBytes input length")); - } - wideBytes = arrayType$8.zero(); - $copySlice(new sliceType(wideBytes), x); - scReduce(s.s, wideBytes); - return s; - }; - Scalar.prototype.SetUniformBytes = function(x) { return this.$val.SetUniformBytes(x); }; - Scalar.ptr.prototype.SetCanonicalBytes = function(x) { - var s, ss, x; - s = this; - if (!((x.$length === 32))) { - return [ptrType$1.nil, errors.New("invalid scalar length")]; - } - ss = new Scalar.ptr(arrayType$7.zero()); - $copySlice(new sliceType(ss.s), x); - if (!isReduced(ss)) { - return [ptrType$1.nil, errors.New("invalid scalar encoding")]; - } - arrayType$7.copy(s.s, ss.s); - return [s, $ifaceNil]; - }; - Scalar.prototype.SetCanonicalBytes = function(x) { return this.$val.SetCanonicalBytes(x); }; - isReduced = function(s) { - var i, s, x, x$1, x$2, x$3; - i = 31; - while (true) { - if (!(i >= 0)) { break; } - if ((x = s.s, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) > (x$1 = scMinusOne.s, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i]))) { - return false; - } else if ((x$2 = s.s, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) < (x$3 = scMinusOne.s, ((i < 0 || i >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[i]))) { - return true; - } - i = i - (1) >> 0; - } - return true; - }; - Scalar.ptr.prototype.SetBytesWithClamping = function(x) { - var s, wideBytes, x; - s = this; - if (!((x.$length === 32))) { - $panic(new $String("edwards25519: invalid SetBytesWithClamping input length")); - } - wideBytes = arrayType$8.zero(); - $copySlice(new sliceType(wideBytes), x); - wideBytes[0] = ((wideBytes[0] & (248)) >>> 0); - wideBytes[31] = ((wideBytes[31] & (63)) >>> 0); - wideBytes[31] = ((wideBytes[31] | (64)) >>> 0); - scReduce(s.s, wideBytes); - return s; - }; - Scalar.prototype.SetBytesWithClamping = function(x) { return this.$val.SetBytesWithClamping(x); }; - Scalar.ptr.prototype.Bytes = function() { - var buf, s; - s = this; - buf = $makeSlice(sliceType, 32); - $copySlice(buf, new sliceType(s.s)); - return buf; - }; - Scalar.prototype.Bytes = function() { return this.$val.Bytes(); }; - Scalar.ptr.prototype.Equal = function(t) { - var s, t; - s = this; - return subtle.ConstantTimeCompare(new sliceType(s.s), new sliceType(t.s)); - }; - Scalar.prototype.Equal = function(t) { return this.$val.Equal(t); }; - load3 = function(in$1) { - var in$1, r, x, x$1; - r = (new $Int64(0, (0 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 0]))); - r = (x = $shiftLeft64((new $Int64(0, (1 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 1]))), 8), new $Int64(r.$high | x.$high, (r.$low | x.$low) >>> 0)); - r = (x$1 = $shiftLeft64((new $Int64(0, (2 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 2]))), 16), new $Int64(r.$high | x$1.$high, (r.$low | x$1.$low) >>> 0)); - return r; - }; - load4 = function(in$1) { - var in$1, r, x, x$1, x$2; - r = (new $Int64(0, (0 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 0]))); - r = (x = $shiftLeft64((new $Int64(0, (1 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 1]))), 8), new $Int64(r.$high | x.$high, (r.$low | x.$low) >>> 0)); - r = (x$1 = $shiftLeft64((new $Int64(0, (2 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 2]))), 16), new $Int64(r.$high | x$1.$high, (r.$low | x$1.$low) >>> 0)); - r = (x$2 = $shiftLeft64((new $Int64(0, (3 >= in$1.$length ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + 3]))), 24), new $Int64(r.$high | x$2.$high, (r.$low | x$2.$low) >>> 0)); - return r; - }; - scMulAdd = function(s, a, b, c) { - var a, a0, a1, a10, a11, a2, a3, a4, a5, a6, a7, a8, a9, b, b0, b1, b10, b11, b2, b3, b4, b5, b6, b7, b8, b9, c, c0, c1, c10, c11, c2, c3, c4, c5, c6, c7, c8, c9, carry, s, s0, s1, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s2, s20, s21, s22, s23, s3, s4, s5, s6, s7, s8, s9, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$165, x$166, x$167, x$168, x$169, x$17, x$170, x$171, x$172, x$173, x$174, x$175, x$176, x$177, x$178, x$179, x$18, x$180, x$181, x$182, x$183, x$184, x$185, x$186, x$187, x$188, x$189, x$19, x$190, x$191, x$192, x$193, x$194, x$195, x$196, x$197, x$198, x$199, x$2, x$20, x$200, x$201, x$202, x$203, x$204, x$205, x$206, x$207, x$208, x$209, x$21, x$210, x$211, x$212, x$213, x$214, x$215, x$216, x$217, x$218, x$219, x$22, x$220, x$221, x$222, x$223, x$224, x$225, x$226, x$227, x$228, x$229, x$23, x$230, x$231, x$232, x$233, x$234, x$235, x$236, x$237, x$238, x$239, x$24, x$240, x$241, x$242, x$243, x$244, x$245, x$246, x$247, x$248, x$249, x$25, x$250, x$251, x$252, x$253, x$254, x$255, x$256, x$257, x$258, x$259, x$26, x$260, x$261, x$262, x$263, x$264, x$265, x$266, x$267, x$268, x$269, x$27, x$270, x$271, x$272, x$273, x$274, x$275, x$276, x$277, x$278, x$279, x$28, x$280, x$281, x$282, x$283, x$284, x$285, x$286, x$287, x$288, x$289, x$29, x$290, x$291, x$292, x$293, x$294, x$295, x$296, x$297, x$298, x$299, x$3, x$30, x$300, x$301, x$302, x$303, x$304, x$305, x$306, x$307, x$308, x$309, x$31, x$310, x$311, x$312, x$313, x$314, x$315, x$316, x$317, x$318, x$319, x$32, x$320, x$321, x$322, x$323, x$324, x$325, x$326, x$327, x$328, x$329, x$33, x$330, x$331, x$332, x$333, x$334, x$335, x$336, x$337, x$338, x$339, x$34, x$340, x$341, x$342, x$343, x$344, x$345, x$346, x$347, x$348, x$349, x$35, x$350, x$351, x$352, x$353, x$354, x$355, x$356, x$357, x$358, x$359, x$36, x$360, x$361, x$362, x$363, x$364, x$365, x$366, x$367, x$368, x$369, x$37, x$370, x$371, x$372, x$373, x$374, x$375, x$376, x$377, x$378, x$379, x$38, x$380, x$381, x$382, x$383, x$384, x$385, x$386, x$387, x$388, x$389, x$39, x$390, x$391, x$392, x$393, x$394, x$395, x$396, x$397, x$398, x$399, x$4, x$40, x$400, x$401, x$402, x$403, x$404, x$405, x$406, x$407, x$408, x$409, x$41, x$410, x$411, x$412, x$413, x$414, x$415, x$416, x$417, x$418, x$419, x$42, x$420, x$421, x$422, x$423, x$424, x$425, x$426, x$427, x$428, x$429, x$43, x$430, x$431, x$432, x$433, x$434, x$435, x$436, x$437, x$438, x$439, x$44, x$440, x$441, x$442, x$443, x$444, x$445, x$446, x$447, x$448, x$449, x$45, x$450, x$451, x$452, x$453, x$454, x$455, x$456, x$457, x$458, x$459, x$46, x$460, x$461, x$462, x$463, x$464, x$465, x$466, x$467, x$468, x$469, x$47, x$470, x$471, x$472, x$473, x$474, x$475, x$476, x$477, x$478, x$479, x$48, x$480, x$481, x$482, x$483, x$484, x$485, x$486, x$487, x$488, x$489, x$49, x$490, x$491, x$492, x$493, x$494, x$495, x$496, x$497, x$498, x$499, x$5, x$50, x$500, x$501, x$502, x$503, x$504, x$505, x$506, x$507, x$508, x$509, x$51, x$510, x$511, x$512, x$513, x$514, x$515, x$516, x$517, x$518, x$519, x$52, x$520, x$521, x$522, x$523, x$524, x$525, x$526, x$527, x$528, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99; - a0 = (x = load3(new sliceType(a)), new $Int64(0 & x.$high, (2097151 & x.$low) >>> 0)); - a1 = (x$1 = $shiftRightInt64(load4($subslice(new sliceType(a), 2)), 5), new $Int64(0 & x$1.$high, (2097151 & x$1.$low) >>> 0)); - a2 = (x$2 = $shiftRightInt64(load3($subslice(new sliceType(a), 5)), 2), new $Int64(0 & x$2.$high, (2097151 & x$2.$low) >>> 0)); - a3 = (x$3 = $shiftRightInt64(load4($subslice(new sliceType(a), 7)), 7), new $Int64(0 & x$3.$high, (2097151 & x$3.$low) >>> 0)); - a4 = (x$4 = $shiftRightInt64(load4($subslice(new sliceType(a), 10)), 4), new $Int64(0 & x$4.$high, (2097151 & x$4.$low) >>> 0)); - a5 = (x$5 = $shiftRightInt64(load3($subslice(new sliceType(a), 13)), 1), new $Int64(0 & x$5.$high, (2097151 & x$5.$low) >>> 0)); - a6 = (x$6 = $shiftRightInt64(load4($subslice(new sliceType(a), 15)), 6), new $Int64(0 & x$6.$high, (2097151 & x$6.$low) >>> 0)); - a7 = (x$7 = $shiftRightInt64(load3($subslice(new sliceType(a), 18)), 3), new $Int64(0 & x$7.$high, (2097151 & x$7.$low) >>> 0)); - a8 = (x$8 = load3($subslice(new sliceType(a), 21)), new $Int64(0 & x$8.$high, (2097151 & x$8.$low) >>> 0)); - a9 = (x$9 = $shiftRightInt64(load4($subslice(new sliceType(a), 23)), 5), new $Int64(0 & x$9.$high, (2097151 & x$9.$low) >>> 0)); - a10 = (x$10 = $shiftRightInt64(load3($subslice(new sliceType(a), 26)), 2), new $Int64(0 & x$10.$high, (2097151 & x$10.$low) >>> 0)); - a11 = $shiftRightInt64(load4($subslice(new sliceType(a), 28)), 7); - b0 = (x$11 = load3(new sliceType(b)), new $Int64(0 & x$11.$high, (2097151 & x$11.$low) >>> 0)); - b1 = (x$12 = $shiftRightInt64(load4($subslice(new sliceType(b), 2)), 5), new $Int64(0 & x$12.$high, (2097151 & x$12.$low) >>> 0)); - b2 = (x$13 = $shiftRightInt64(load3($subslice(new sliceType(b), 5)), 2), new $Int64(0 & x$13.$high, (2097151 & x$13.$low) >>> 0)); - b3 = (x$14 = $shiftRightInt64(load4($subslice(new sliceType(b), 7)), 7), new $Int64(0 & x$14.$high, (2097151 & x$14.$low) >>> 0)); - b4 = (x$15 = $shiftRightInt64(load4($subslice(new sliceType(b), 10)), 4), new $Int64(0 & x$15.$high, (2097151 & x$15.$low) >>> 0)); - b5 = (x$16 = $shiftRightInt64(load3($subslice(new sliceType(b), 13)), 1), new $Int64(0 & x$16.$high, (2097151 & x$16.$low) >>> 0)); - b6 = (x$17 = $shiftRightInt64(load4($subslice(new sliceType(b), 15)), 6), new $Int64(0 & x$17.$high, (2097151 & x$17.$low) >>> 0)); - b7 = (x$18 = $shiftRightInt64(load3($subslice(new sliceType(b), 18)), 3), new $Int64(0 & x$18.$high, (2097151 & x$18.$low) >>> 0)); - b8 = (x$19 = load3($subslice(new sliceType(b), 21)), new $Int64(0 & x$19.$high, (2097151 & x$19.$low) >>> 0)); - b9 = (x$20 = $shiftRightInt64(load4($subslice(new sliceType(b), 23)), 5), new $Int64(0 & x$20.$high, (2097151 & x$20.$low) >>> 0)); - b10 = (x$21 = $shiftRightInt64(load3($subslice(new sliceType(b), 26)), 2), new $Int64(0 & x$21.$high, (2097151 & x$21.$low) >>> 0)); - b11 = $shiftRightInt64(load4($subslice(new sliceType(b), 28)), 7); - c0 = (x$22 = load3(new sliceType(c)), new $Int64(0 & x$22.$high, (2097151 & x$22.$low) >>> 0)); - c1 = (x$23 = $shiftRightInt64(load4($subslice(new sliceType(c), 2)), 5), new $Int64(0 & x$23.$high, (2097151 & x$23.$low) >>> 0)); - c2 = (x$24 = $shiftRightInt64(load3($subslice(new sliceType(c), 5)), 2), new $Int64(0 & x$24.$high, (2097151 & x$24.$low) >>> 0)); - c3 = (x$25 = $shiftRightInt64(load4($subslice(new sliceType(c), 7)), 7), new $Int64(0 & x$25.$high, (2097151 & x$25.$low) >>> 0)); - c4 = (x$26 = $shiftRightInt64(load4($subslice(new sliceType(c), 10)), 4), new $Int64(0 & x$26.$high, (2097151 & x$26.$low) >>> 0)); - c5 = (x$27 = $shiftRightInt64(load3($subslice(new sliceType(c), 13)), 1), new $Int64(0 & x$27.$high, (2097151 & x$27.$low) >>> 0)); - c6 = (x$28 = $shiftRightInt64(load4($subslice(new sliceType(c), 15)), 6), new $Int64(0 & x$28.$high, (2097151 & x$28.$low) >>> 0)); - c7 = (x$29 = $shiftRightInt64(load3($subslice(new sliceType(c), 18)), 3), new $Int64(0 & x$29.$high, (2097151 & x$29.$low) >>> 0)); - c8 = (x$30 = load3($subslice(new sliceType(c), 21)), new $Int64(0 & x$30.$high, (2097151 & x$30.$low) >>> 0)); - c9 = (x$31 = $shiftRightInt64(load4($subslice(new sliceType(c), 23)), 5), new $Int64(0 & x$31.$high, (2097151 & x$31.$low) >>> 0)); - c10 = (x$32 = $shiftRightInt64(load3($subslice(new sliceType(c), 26)), 2), new $Int64(0 & x$32.$high, (2097151 & x$32.$low) >>> 0)); - c11 = $shiftRightInt64(load4($subslice(new sliceType(c), 28)), 7); - carry = arrayType$9.zero(); - s0 = (x$33 = $mul64(a0, b0), new $Int64(c0.$high + x$33.$high, c0.$low + x$33.$low)); - s1 = (x$34 = (x$35 = $mul64(a0, b1), new $Int64(c1.$high + x$35.$high, c1.$low + x$35.$low)), x$36 = $mul64(a1, b0), new $Int64(x$34.$high + x$36.$high, x$34.$low + x$36.$low)); - s2 = (x$37 = (x$38 = (x$39 = $mul64(a0, b2), new $Int64(c2.$high + x$39.$high, c2.$low + x$39.$low)), x$40 = $mul64(a1, b1), new $Int64(x$38.$high + x$40.$high, x$38.$low + x$40.$low)), x$41 = $mul64(a2, b0), new $Int64(x$37.$high + x$41.$high, x$37.$low + x$41.$low)); - s3 = (x$42 = (x$43 = (x$44 = (x$45 = $mul64(a0, b3), new $Int64(c3.$high + x$45.$high, c3.$low + x$45.$low)), x$46 = $mul64(a1, b2), new $Int64(x$44.$high + x$46.$high, x$44.$low + x$46.$low)), x$47 = $mul64(a2, b1), new $Int64(x$43.$high + x$47.$high, x$43.$low + x$47.$low)), x$48 = $mul64(a3, b0), new $Int64(x$42.$high + x$48.$high, x$42.$low + x$48.$low)); - s4 = (x$49 = (x$50 = (x$51 = (x$52 = (x$53 = $mul64(a0, b4), new $Int64(c4.$high + x$53.$high, c4.$low + x$53.$low)), x$54 = $mul64(a1, b3), new $Int64(x$52.$high + x$54.$high, x$52.$low + x$54.$low)), x$55 = $mul64(a2, b2), new $Int64(x$51.$high + x$55.$high, x$51.$low + x$55.$low)), x$56 = $mul64(a3, b1), new $Int64(x$50.$high + x$56.$high, x$50.$low + x$56.$low)), x$57 = $mul64(a4, b0), new $Int64(x$49.$high + x$57.$high, x$49.$low + x$57.$low)); - s5 = (x$58 = (x$59 = (x$60 = (x$61 = (x$62 = (x$63 = $mul64(a0, b5), new $Int64(c5.$high + x$63.$high, c5.$low + x$63.$low)), x$64 = $mul64(a1, b4), new $Int64(x$62.$high + x$64.$high, x$62.$low + x$64.$low)), x$65 = $mul64(a2, b3), new $Int64(x$61.$high + x$65.$high, x$61.$low + x$65.$low)), x$66 = $mul64(a3, b2), new $Int64(x$60.$high + x$66.$high, x$60.$low + x$66.$low)), x$67 = $mul64(a4, b1), new $Int64(x$59.$high + x$67.$high, x$59.$low + x$67.$low)), x$68 = $mul64(a5, b0), new $Int64(x$58.$high + x$68.$high, x$58.$low + x$68.$low)); - s6 = (x$69 = (x$70 = (x$71 = (x$72 = (x$73 = (x$74 = (x$75 = $mul64(a0, b6), new $Int64(c6.$high + x$75.$high, c6.$low + x$75.$low)), x$76 = $mul64(a1, b5), new $Int64(x$74.$high + x$76.$high, x$74.$low + x$76.$low)), x$77 = $mul64(a2, b4), new $Int64(x$73.$high + x$77.$high, x$73.$low + x$77.$low)), x$78 = $mul64(a3, b3), new $Int64(x$72.$high + x$78.$high, x$72.$low + x$78.$low)), x$79 = $mul64(a4, b2), new $Int64(x$71.$high + x$79.$high, x$71.$low + x$79.$low)), x$80 = $mul64(a5, b1), new $Int64(x$70.$high + x$80.$high, x$70.$low + x$80.$low)), x$81 = $mul64(a6, b0), new $Int64(x$69.$high + x$81.$high, x$69.$low + x$81.$low)); - s7 = (x$82 = (x$83 = (x$84 = (x$85 = (x$86 = (x$87 = (x$88 = (x$89 = $mul64(a0, b7), new $Int64(c7.$high + x$89.$high, c7.$low + x$89.$low)), x$90 = $mul64(a1, b6), new $Int64(x$88.$high + x$90.$high, x$88.$low + x$90.$low)), x$91 = $mul64(a2, b5), new $Int64(x$87.$high + x$91.$high, x$87.$low + x$91.$low)), x$92 = $mul64(a3, b4), new $Int64(x$86.$high + x$92.$high, x$86.$low + x$92.$low)), x$93 = $mul64(a4, b3), new $Int64(x$85.$high + x$93.$high, x$85.$low + x$93.$low)), x$94 = $mul64(a5, b2), new $Int64(x$84.$high + x$94.$high, x$84.$low + x$94.$low)), x$95 = $mul64(a6, b1), new $Int64(x$83.$high + x$95.$high, x$83.$low + x$95.$low)), x$96 = $mul64(a7, b0), new $Int64(x$82.$high + x$96.$high, x$82.$low + x$96.$low)); - s8 = (x$97 = (x$98 = (x$99 = (x$100 = (x$101 = (x$102 = (x$103 = (x$104 = (x$105 = $mul64(a0, b8), new $Int64(c8.$high + x$105.$high, c8.$low + x$105.$low)), x$106 = $mul64(a1, b7), new $Int64(x$104.$high + x$106.$high, x$104.$low + x$106.$low)), x$107 = $mul64(a2, b6), new $Int64(x$103.$high + x$107.$high, x$103.$low + x$107.$low)), x$108 = $mul64(a3, b5), new $Int64(x$102.$high + x$108.$high, x$102.$low + x$108.$low)), x$109 = $mul64(a4, b4), new $Int64(x$101.$high + x$109.$high, x$101.$low + x$109.$low)), x$110 = $mul64(a5, b3), new $Int64(x$100.$high + x$110.$high, x$100.$low + x$110.$low)), x$111 = $mul64(a6, b2), new $Int64(x$99.$high + x$111.$high, x$99.$low + x$111.$low)), x$112 = $mul64(a7, b1), new $Int64(x$98.$high + x$112.$high, x$98.$low + x$112.$low)), x$113 = $mul64(a8, b0), new $Int64(x$97.$high + x$113.$high, x$97.$low + x$113.$low)); - s9 = (x$114 = (x$115 = (x$116 = (x$117 = (x$118 = (x$119 = (x$120 = (x$121 = (x$122 = (x$123 = $mul64(a0, b9), new $Int64(c9.$high + x$123.$high, c9.$low + x$123.$low)), x$124 = $mul64(a1, b8), new $Int64(x$122.$high + x$124.$high, x$122.$low + x$124.$low)), x$125 = $mul64(a2, b7), new $Int64(x$121.$high + x$125.$high, x$121.$low + x$125.$low)), x$126 = $mul64(a3, b6), new $Int64(x$120.$high + x$126.$high, x$120.$low + x$126.$low)), x$127 = $mul64(a4, b5), new $Int64(x$119.$high + x$127.$high, x$119.$low + x$127.$low)), x$128 = $mul64(a5, b4), new $Int64(x$118.$high + x$128.$high, x$118.$low + x$128.$low)), x$129 = $mul64(a6, b3), new $Int64(x$117.$high + x$129.$high, x$117.$low + x$129.$low)), x$130 = $mul64(a7, b2), new $Int64(x$116.$high + x$130.$high, x$116.$low + x$130.$low)), x$131 = $mul64(a8, b1), new $Int64(x$115.$high + x$131.$high, x$115.$low + x$131.$low)), x$132 = $mul64(a9, b0), new $Int64(x$114.$high + x$132.$high, x$114.$low + x$132.$low)); - s10 = (x$133 = (x$134 = (x$135 = (x$136 = (x$137 = (x$138 = (x$139 = (x$140 = (x$141 = (x$142 = (x$143 = $mul64(a0, b10), new $Int64(c10.$high + x$143.$high, c10.$low + x$143.$low)), x$144 = $mul64(a1, b9), new $Int64(x$142.$high + x$144.$high, x$142.$low + x$144.$low)), x$145 = $mul64(a2, b8), new $Int64(x$141.$high + x$145.$high, x$141.$low + x$145.$low)), x$146 = $mul64(a3, b7), new $Int64(x$140.$high + x$146.$high, x$140.$low + x$146.$low)), x$147 = $mul64(a4, b6), new $Int64(x$139.$high + x$147.$high, x$139.$low + x$147.$low)), x$148 = $mul64(a5, b5), new $Int64(x$138.$high + x$148.$high, x$138.$low + x$148.$low)), x$149 = $mul64(a6, b4), new $Int64(x$137.$high + x$149.$high, x$137.$low + x$149.$low)), x$150 = $mul64(a7, b3), new $Int64(x$136.$high + x$150.$high, x$136.$low + x$150.$low)), x$151 = $mul64(a8, b2), new $Int64(x$135.$high + x$151.$high, x$135.$low + x$151.$low)), x$152 = $mul64(a9, b1), new $Int64(x$134.$high + x$152.$high, x$134.$low + x$152.$low)), x$153 = $mul64(a10, b0), new $Int64(x$133.$high + x$153.$high, x$133.$low + x$153.$low)); - s11 = (x$154 = (x$155 = (x$156 = (x$157 = (x$158 = (x$159 = (x$160 = (x$161 = (x$162 = (x$163 = (x$164 = (x$165 = $mul64(a0, b11), new $Int64(c11.$high + x$165.$high, c11.$low + x$165.$low)), x$166 = $mul64(a1, b10), new $Int64(x$164.$high + x$166.$high, x$164.$low + x$166.$low)), x$167 = $mul64(a2, b9), new $Int64(x$163.$high + x$167.$high, x$163.$low + x$167.$low)), x$168 = $mul64(a3, b8), new $Int64(x$162.$high + x$168.$high, x$162.$low + x$168.$low)), x$169 = $mul64(a4, b7), new $Int64(x$161.$high + x$169.$high, x$161.$low + x$169.$low)), x$170 = $mul64(a5, b6), new $Int64(x$160.$high + x$170.$high, x$160.$low + x$170.$low)), x$171 = $mul64(a6, b5), new $Int64(x$159.$high + x$171.$high, x$159.$low + x$171.$low)), x$172 = $mul64(a7, b4), new $Int64(x$158.$high + x$172.$high, x$158.$low + x$172.$low)), x$173 = $mul64(a8, b3), new $Int64(x$157.$high + x$173.$high, x$157.$low + x$173.$low)), x$174 = $mul64(a9, b2), new $Int64(x$156.$high + x$174.$high, x$156.$low + x$174.$low)), x$175 = $mul64(a10, b1), new $Int64(x$155.$high + x$175.$high, x$155.$low + x$175.$low)), x$176 = $mul64(a11, b0), new $Int64(x$154.$high + x$176.$high, x$154.$low + x$176.$low)); - s12 = (x$177 = (x$178 = (x$179 = (x$180 = (x$181 = (x$182 = (x$183 = (x$184 = (x$185 = (x$186 = $mul64(a1, b11), x$187 = $mul64(a2, b10), new $Int64(x$186.$high + x$187.$high, x$186.$low + x$187.$low)), x$188 = $mul64(a3, b9), new $Int64(x$185.$high + x$188.$high, x$185.$low + x$188.$low)), x$189 = $mul64(a4, b8), new $Int64(x$184.$high + x$189.$high, x$184.$low + x$189.$low)), x$190 = $mul64(a5, b7), new $Int64(x$183.$high + x$190.$high, x$183.$low + x$190.$low)), x$191 = $mul64(a6, b6), new $Int64(x$182.$high + x$191.$high, x$182.$low + x$191.$low)), x$192 = $mul64(a7, b5), new $Int64(x$181.$high + x$192.$high, x$181.$low + x$192.$low)), x$193 = $mul64(a8, b4), new $Int64(x$180.$high + x$193.$high, x$180.$low + x$193.$low)), x$194 = $mul64(a9, b3), new $Int64(x$179.$high + x$194.$high, x$179.$low + x$194.$low)), x$195 = $mul64(a10, b2), new $Int64(x$178.$high + x$195.$high, x$178.$low + x$195.$low)), x$196 = $mul64(a11, b1), new $Int64(x$177.$high + x$196.$high, x$177.$low + x$196.$low)); - s13 = (x$197 = (x$198 = (x$199 = (x$200 = (x$201 = (x$202 = (x$203 = (x$204 = (x$205 = $mul64(a2, b11), x$206 = $mul64(a3, b10), new $Int64(x$205.$high + x$206.$high, x$205.$low + x$206.$low)), x$207 = $mul64(a4, b9), new $Int64(x$204.$high + x$207.$high, x$204.$low + x$207.$low)), x$208 = $mul64(a5, b8), new $Int64(x$203.$high + x$208.$high, x$203.$low + x$208.$low)), x$209 = $mul64(a6, b7), new $Int64(x$202.$high + x$209.$high, x$202.$low + x$209.$low)), x$210 = $mul64(a7, b6), new $Int64(x$201.$high + x$210.$high, x$201.$low + x$210.$low)), x$211 = $mul64(a8, b5), new $Int64(x$200.$high + x$211.$high, x$200.$low + x$211.$low)), x$212 = $mul64(a9, b4), new $Int64(x$199.$high + x$212.$high, x$199.$low + x$212.$low)), x$213 = $mul64(a10, b3), new $Int64(x$198.$high + x$213.$high, x$198.$low + x$213.$low)), x$214 = $mul64(a11, b2), new $Int64(x$197.$high + x$214.$high, x$197.$low + x$214.$low)); - s14 = (x$215 = (x$216 = (x$217 = (x$218 = (x$219 = (x$220 = (x$221 = (x$222 = $mul64(a3, b11), x$223 = $mul64(a4, b10), new $Int64(x$222.$high + x$223.$high, x$222.$low + x$223.$low)), x$224 = $mul64(a5, b9), new $Int64(x$221.$high + x$224.$high, x$221.$low + x$224.$low)), x$225 = $mul64(a6, b8), new $Int64(x$220.$high + x$225.$high, x$220.$low + x$225.$low)), x$226 = $mul64(a7, b7), new $Int64(x$219.$high + x$226.$high, x$219.$low + x$226.$low)), x$227 = $mul64(a8, b6), new $Int64(x$218.$high + x$227.$high, x$218.$low + x$227.$low)), x$228 = $mul64(a9, b5), new $Int64(x$217.$high + x$228.$high, x$217.$low + x$228.$low)), x$229 = $mul64(a10, b4), new $Int64(x$216.$high + x$229.$high, x$216.$low + x$229.$low)), x$230 = $mul64(a11, b3), new $Int64(x$215.$high + x$230.$high, x$215.$low + x$230.$low)); - s15 = (x$231 = (x$232 = (x$233 = (x$234 = (x$235 = (x$236 = (x$237 = $mul64(a4, b11), x$238 = $mul64(a5, b10), new $Int64(x$237.$high + x$238.$high, x$237.$low + x$238.$low)), x$239 = $mul64(a6, b9), new $Int64(x$236.$high + x$239.$high, x$236.$low + x$239.$low)), x$240 = $mul64(a7, b8), new $Int64(x$235.$high + x$240.$high, x$235.$low + x$240.$low)), x$241 = $mul64(a8, b7), new $Int64(x$234.$high + x$241.$high, x$234.$low + x$241.$low)), x$242 = $mul64(a9, b6), new $Int64(x$233.$high + x$242.$high, x$233.$low + x$242.$low)), x$243 = $mul64(a10, b5), new $Int64(x$232.$high + x$243.$high, x$232.$low + x$243.$low)), x$244 = $mul64(a11, b4), new $Int64(x$231.$high + x$244.$high, x$231.$low + x$244.$low)); - s16 = (x$245 = (x$246 = (x$247 = (x$248 = (x$249 = (x$250 = $mul64(a5, b11), x$251 = $mul64(a6, b10), new $Int64(x$250.$high + x$251.$high, x$250.$low + x$251.$low)), x$252 = $mul64(a7, b9), new $Int64(x$249.$high + x$252.$high, x$249.$low + x$252.$low)), x$253 = $mul64(a8, b8), new $Int64(x$248.$high + x$253.$high, x$248.$low + x$253.$low)), x$254 = $mul64(a9, b7), new $Int64(x$247.$high + x$254.$high, x$247.$low + x$254.$low)), x$255 = $mul64(a10, b6), new $Int64(x$246.$high + x$255.$high, x$246.$low + x$255.$low)), x$256 = $mul64(a11, b5), new $Int64(x$245.$high + x$256.$high, x$245.$low + x$256.$low)); - s17 = (x$257 = (x$258 = (x$259 = (x$260 = (x$261 = $mul64(a6, b11), x$262 = $mul64(a7, b10), new $Int64(x$261.$high + x$262.$high, x$261.$low + x$262.$low)), x$263 = $mul64(a8, b9), new $Int64(x$260.$high + x$263.$high, x$260.$low + x$263.$low)), x$264 = $mul64(a9, b8), new $Int64(x$259.$high + x$264.$high, x$259.$low + x$264.$low)), x$265 = $mul64(a10, b7), new $Int64(x$258.$high + x$265.$high, x$258.$low + x$265.$low)), x$266 = $mul64(a11, b6), new $Int64(x$257.$high + x$266.$high, x$257.$low + x$266.$low)); - s18 = (x$267 = (x$268 = (x$269 = (x$270 = $mul64(a7, b11), x$271 = $mul64(a8, b10), new $Int64(x$270.$high + x$271.$high, x$270.$low + x$271.$low)), x$272 = $mul64(a9, b9), new $Int64(x$269.$high + x$272.$high, x$269.$low + x$272.$low)), x$273 = $mul64(a10, b8), new $Int64(x$268.$high + x$273.$high, x$268.$low + x$273.$low)), x$274 = $mul64(a11, b7), new $Int64(x$267.$high + x$274.$high, x$267.$low + x$274.$low)); - s19 = (x$275 = (x$276 = (x$277 = $mul64(a8, b11), x$278 = $mul64(a9, b10), new $Int64(x$277.$high + x$278.$high, x$277.$low + x$278.$low)), x$279 = $mul64(a10, b9), new $Int64(x$276.$high + x$279.$high, x$276.$low + x$279.$low)), x$280 = $mul64(a11, b8), new $Int64(x$275.$high + x$280.$high, x$275.$low + x$280.$low)); - s20 = (x$281 = (x$282 = $mul64(a9, b11), x$283 = $mul64(a10, b10), new $Int64(x$282.$high + x$283.$high, x$282.$low + x$283.$low)), x$284 = $mul64(a11, b9), new $Int64(x$281.$high + x$284.$high, x$281.$low + x$284.$low)); - s21 = (x$285 = $mul64(a10, b11), x$286 = $mul64(a11, b10), new $Int64(x$285.$high + x$286.$high, x$285.$low + x$286.$low)); - s22 = $mul64(a11, b11); - s23 = new $Int64(0, 0); - carry[0] = $shiftRightInt64((new $Int64(s0.$high + 0, s0.$low + 1048576)), 21); - s1 = (x$287 = carry[0], new $Int64(s1.$high + x$287.$high, s1.$low + x$287.$low)); - s0 = (x$288 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$288.$high, s0.$low - x$288.$low)); - carry[2] = $shiftRightInt64((new $Int64(s2.$high + 0, s2.$low + 1048576)), 21); - s3 = (x$289 = carry[2], new $Int64(s3.$high + x$289.$high, s3.$low + x$289.$low)); - s2 = (x$290 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$290.$high, s2.$low - x$290.$low)); - carry[4] = $shiftRightInt64((new $Int64(s4.$high + 0, s4.$low + 1048576)), 21); - s5 = (x$291 = carry[4], new $Int64(s5.$high + x$291.$high, s5.$low + x$291.$low)); - s4 = (x$292 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$292.$high, s4.$low - x$292.$low)); - carry[6] = $shiftRightInt64((new $Int64(s6.$high + 0, s6.$low + 1048576)), 21); - s7 = (x$293 = carry[6], new $Int64(s7.$high + x$293.$high, s7.$low + x$293.$low)); - s6 = (x$294 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$294.$high, s6.$low - x$294.$low)); - carry[8] = $shiftRightInt64((new $Int64(s8.$high + 0, s8.$low + 1048576)), 21); - s9 = (x$295 = carry[8], new $Int64(s9.$high + x$295.$high, s9.$low + x$295.$low)); - s8 = (x$296 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$296.$high, s8.$low - x$296.$low)); - carry[10] = $shiftRightInt64((new $Int64(s10.$high + 0, s10.$low + 1048576)), 21); - s11 = (x$297 = carry[10], new $Int64(s11.$high + x$297.$high, s11.$low + x$297.$low)); - s10 = (x$298 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$298.$high, s10.$low - x$298.$low)); - carry[12] = $shiftRightInt64((new $Int64(s12.$high + 0, s12.$low + 1048576)), 21); - s13 = (x$299 = carry[12], new $Int64(s13.$high + x$299.$high, s13.$low + x$299.$low)); - s12 = (x$300 = $shiftLeft64(carry[12], 21), new $Int64(s12.$high - x$300.$high, s12.$low - x$300.$low)); - carry[14] = $shiftRightInt64((new $Int64(s14.$high + 0, s14.$low + 1048576)), 21); - s15 = (x$301 = carry[14], new $Int64(s15.$high + x$301.$high, s15.$low + x$301.$low)); - s14 = (x$302 = $shiftLeft64(carry[14], 21), new $Int64(s14.$high - x$302.$high, s14.$low - x$302.$low)); - carry[16] = $shiftRightInt64((new $Int64(s16.$high + 0, s16.$low + 1048576)), 21); - s17 = (x$303 = carry[16], new $Int64(s17.$high + x$303.$high, s17.$low + x$303.$low)); - s16 = (x$304 = $shiftLeft64(carry[16], 21), new $Int64(s16.$high - x$304.$high, s16.$low - x$304.$low)); - carry[18] = $shiftRightInt64((new $Int64(s18.$high + 0, s18.$low + 1048576)), 21); - s19 = (x$305 = carry[18], new $Int64(s19.$high + x$305.$high, s19.$low + x$305.$low)); - s18 = (x$306 = $shiftLeft64(carry[18], 21), new $Int64(s18.$high - x$306.$high, s18.$low - x$306.$low)); - carry[20] = $shiftRightInt64((new $Int64(s20.$high + 0, s20.$low + 1048576)), 21); - s21 = (x$307 = carry[20], new $Int64(s21.$high + x$307.$high, s21.$low + x$307.$low)); - s20 = (x$308 = $shiftLeft64(carry[20], 21), new $Int64(s20.$high - x$308.$high, s20.$low - x$308.$low)); - carry[22] = $shiftRightInt64((new $Int64(s22.$high + 0, s22.$low + 1048576)), 21); - s23 = (x$309 = carry[22], new $Int64(s23.$high + x$309.$high, s23.$low + x$309.$low)); - s22 = (x$310 = $shiftLeft64(carry[22], 21), new $Int64(s22.$high - x$310.$high, s22.$low - x$310.$low)); - carry[1] = $shiftRightInt64((new $Int64(s1.$high + 0, s1.$low + 1048576)), 21); - s2 = (x$311 = carry[1], new $Int64(s2.$high + x$311.$high, s2.$low + x$311.$low)); - s1 = (x$312 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$312.$high, s1.$low - x$312.$low)); - carry[3] = $shiftRightInt64((new $Int64(s3.$high + 0, s3.$low + 1048576)), 21); - s4 = (x$313 = carry[3], new $Int64(s4.$high + x$313.$high, s4.$low + x$313.$low)); - s3 = (x$314 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$314.$high, s3.$low - x$314.$low)); - carry[5] = $shiftRightInt64((new $Int64(s5.$high + 0, s5.$low + 1048576)), 21); - s6 = (x$315 = carry[5], new $Int64(s6.$high + x$315.$high, s6.$low + x$315.$low)); - s5 = (x$316 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$316.$high, s5.$low - x$316.$low)); - carry[7] = $shiftRightInt64((new $Int64(s7.$high + 0, s7.$low + 1048576)), 21); - s8 = (x$317 = carry[7], new $Int64(s8.$high + x$317.$high, s8.$low + x$317.$low)); - s7 = (x$318 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$318.$high, s7.$low - x$318.$low)); - carry[9] = $shiftRightInt64((new $Int64(s9.$high + 0, s9.$low + 1048576)), 21); - s10 = (x$319 = carry[9], new $Int64(s10.$high + x$319.$high, s10.$low + x$319.$low)); - s9 = (x$320 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$320.$high, s9.$low - x$320.$low)); - carry[11] = $shiftRightInt64((new $Int64(s11.$high + 0, s11.$low + 1048576)), 21); - s12 = (x$321 = carry[11], new $Int64(s12.$high + x$321.$high, s12.$low + x$321.$low)); - s11 = (x$322 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$322.$high, s11.$low - x$322.$low)); - carry[13] = $shiftRightInt64((new $Int64(s13.$high + 0, s13.$low + 1048576)), 21); - s14 = (x$323 = carry[13], new $Int64(s14.$high + x$323.$high, s14.$low + x$323.$low)); - s13 = (x$324 = $shiftLeft64(carry[13], 21), new $Int64(s13.$high - x$324.$high, s13.$low - x$324.$low)); - carry[15] = $shiftRightInt64((new $Int64(s15.$high + 0, s15.$low + 1048576)), 21); - s16 = (x$325 = carry[15], new $Int64(s16.$high + x$325.$high, s16.$low + x$325.$low)); - s15 = (x$326 = $shiftLeft64(carry[15], 21), new $Int64(s15.$high - x$326.$high, s15.$low - x$326.$low)); - carry[17] = $shiftRightInt64((new $Int64(s17.$high + 0, s17.$low + 1048576)), 21); - s18 = (x$327 = carry[17], new $Int64(s18.$high + x$327.$high, s18.$low + x$327.$low)); - s17 = (x$328 = $shiftLeft64(carry[17], 21), new $Int64(s17.$high - x$328.$high, s17.$low - x$328.$low)); - carry[19] = $shiftRightInt64((new $Int64(s19.$high + 0, s19.$low + 1048576)), 21); - s20 = (x$329 = carry[19], new $Int64(s20.$high + x$329.$high, s20.$low + x$329.$low)); - s19 = (x$330 = $shiftLeft64(carry[19], 21), new $Int64(s19.$high - x$330.$high, s19.$low - x$330.$low)); - carry[21] = $shiftRightInt64((new $Int64(s21.$high + 0, s21.$low + 1048576)), 21); - s22 = (x$331 = carry[21], new $Int64(s22.$high + x$331.$high, s22.$low + x$331.$low)); - s21 = (x$332 = $shiftLeft64(carry[21], 21), new $Int64(s21.$high - x$332.$high, s21.$low - x$332.$low)); - s11 = (x$333 = $mul64(s23, new $Int64(0, 666643)), new $Int64(s11.$high + x$333.$high, s11.$low + x$333.$low)); - s12 = (x$334 = $mul64(s23, new $Int64(0, 470296)), new $Int64(s12.$high + x$334.$high, s12.$low + x$334.$low)); - s13 = (x$335 = $mul64(s23, new $Int64(0, 654183)), new $Int64(s13.$high + x$335.$high, s13.$low + x$335.$low)); - s14 = (x$336 = $mul64(s23, new $Int64(0, 997805)), new $Int64(s14.$high - x$336.$high, s14.$low - x$336.$low)); - s15 = (x$337 = $mul64(s23, new $Int64(0, 136657)), new $Int64(s15.$high + x$337.$high, s15.$low + x$337.$low)); - s16 = (x$338 = $mul64(s23, new $Int64(0, 683901)), new $Int64(s16.$high - x$338.$high, s16.$low - x$338.$low)); - s23 = new $Int64(0, 0); - s10 = (x$339 = $mul64(s22, new $Int64(0, 666643)), new $Int64(s10.$high + x$339.$high, s10.$low + x$339.$low)); - s11 = (x$340 = $mul64(s22, new $Int64(0, 470296)), new $Int64(s11.$high + x$340.$high, s11.$low + x$340.$low)); - s12 = (x$341 = $mul64(s22, new $Int64(0, 654183)), new $Int64(s12.$high + x$341.$high, s12.$low + x$341.$low)); - s13 = (x$342 = $mul64(s22, new $Int64(0, 997805)), new $Int64(s13.$high - x$342.$high, s13.$low - x$342.$low)); - s14 = (x$343 = $mul64(s22, new $Int64(0, 136657)), new $Int64(s14.$high + x$343.$high, s14.$low + x$343.$low)); - s15 = (x$344 = $mul64(s22, new $Int64(0, 683901)), new $Int64(s15.$high - x$344.$high, s15.$low - x$344.$low)); - s22 = new $Int64(0, 0); - s9 = (x$345 = $mul64(s21, new $Int64(0, 666643)), new $Int64(s9.$high + x$345.$high, s9.$low + x$345.$low)); - s10 = (x$346 = $mul64(s21, new $Int64(0, 470296)), new $Int64(s10.$high + x$346.$high, s10.$low + x$346.$low)); - s11 = (x$347 = $mul64(s21, new $Int64(0, 654183)), new $Int64(s11.$high + x$347.$high, s11.$low + x$347.$low)); - s12 = (x$348 = $mul64(s21, new $Int64(0, 997805)), new $Int64(s12.$high - x$348.$high, s12.$low - x$348.$low)); - s13 = (x$349 = $mul64(s21, new $Int64(0, 136657)), new $Int64(s13.$high + x$349.$high, s13.$low + x$349.$low)); - s14 = (x$350 = $mul64(s21, new $Int64(0, 683901)), new $Int64(s14.$high - x$350.$high, s14.$low - x$350.$low)); - s21 = new $Int64(0, 0); - s8 = (x$351 = $mul64(s20, new $Int64(0, 666643)), new $Int64(s8.$high + x$351.$high, s8.$low + x$351.$low)); - s9 = (x$352 = $mul64(s20, new $Int64(0, 470296)), new $Int64(s9.$high + x$352.$high, s9.$low + x$352.$low)); - s10 = (x$353 = $mul64(s20, new $Int64(0, 654183)), new $Int64(s10.$high + x$353.$high, s10.$low + x$353.$low)); - s11 = (x$354 = $mul64(s20, new $Int64(0, 997805)), new $Int64(s11.$high - x$354.$high, s11.$low - x$354.$low)); - s12 = (x$355 = $mul64(s20, new $Int64(0, 136657)), new $Int64(s12.$high + x$355.$high, s12.$low + x$355.$low)); - s13 = (x$356 = $mul64(s20, new $Int64(0, 683901)), new $Int64(s13.$high - x$356.$high, s13.$low - x$356.$low)); - s20 = new $Int64(0, 0); - s7 = (x$357 = $mul64(s19, new $Int64(0, 666643)), new $Int64(s7.$high + x$357.$high, s7.$low + x$357.$low)); - s8 = (x$358 = $mul64(s19, new $Int64(0, 470296)), new $Int64(s8.$high + x$358.$high, s8.$low + x$358.$low)); - s9 = (x$359 = $mul64(s19, new $Int64(0, 654183)), new $Int64(s9.$high + x$359.$high, s9.$low + x$359.$low)); - s10 = (x$360 = $mul64(s19, new $Int64(0, 997805)), new $Int64(s10.$high - x$360.$high, s10.$low - x$360.$low)); - s11 = (x$361 = $mul64(s19, new $Int64(0, 136657)), new $Int64(s11.$high + x$361.$high, s11.$low + x$361.$low)); - s12 = (x$362 = $mul64(s19, new $Int64(0, 683901)), new $Int64(s12.$high - x$362.$high, s12.$low - x$362.$low)); - s19 = new $Int64(0, 0); - s6 = (x$363 = $mul64(s18, new $Int64(0, 666643)), new $Int64(s6.$high + x$363.$high, s6.$low + x$363.$low)); - s7 = (x$364 = $mul64(s18, new $Int64(0, 470296)), new $Int64(s7.$high + x$364.$high, s7.$low + x$364.$low)); - s8 = (x$365 = $mul64(s18, new $Int64(0, 654183)), new $Int64(s8.$high + x$365.$high, s8.$low + x$365.$low)); - s9 = (x$366 = $mul64(s18, new $Int64(0, 997805)), new $Int64(s9.$high - x$366.$high, s9.$low - x$366.$low)); - s10 = (x$367 = $mul64(s18, new $Int64(0, 136657)), new $Int64(s10.$high + x$367.$high, s10.$low + x$367.$low)); - s11 = (x$368 = $mul64(s18, new $Int64(0, 683901)), new $Int64(s11.$high - x$368.$high, s11.$low - x$368.$low)); - s18 = new $Int64(0, 0); - carry[6] = $shiftRightInt64((new $Int64(s6.$high + 0, s6.$low + 1048576)), 21); - s7 = (x$369 = carry[6], new $Int64(s7.$high + x$369.$high, s7.$low + x$369.$low)); - s6 = (x$370 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$370.$high, s6.$low - x$370.$low)); - carry[8] = $shiftRightInt64((new $Int64(s8.$high + 0, s8.$low + 1048576)), 21); - s9 = (x$371 = carry[8], new $Int64(s9.$high + x$371.$high, s9.$low + x$371.$low)); - s8 = (x$372 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$372.$high, s8.$low - x$372.$low)); - carry[10] = $shiftRightInt64((new $Int64(s10.$high + 0, s10.$low + 1048576)), 21); - s11 = (x$373 = carry[10], new $Int64(s11.$high + x$373.$high, s11.$low + x$373.$low)); - s10 = (x$374 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$374.$high, s10.$low - x$374.$low)); - carry[12] = $shiftRightInt64((new $Int64(s12.$high + 0, s12.$low + 1048576)), 21); - s13 = (x$375 = carry[12], new $Int64(s13.$high + x$375.$high, s13.$low + x$375.$low)); - s12 = (x$376 = $shiftLeft64(carry[12], 21), new $Int64(s12.$high - x$376.$high, s12.$low - x$376.$low)); - carry[14] = $shiftRightInt64((new $Int64(s14.$high + 0, s14.$low + 1048576)), 21); - s15 = (x$377 = carry[14], new $Int64(s15.$high + x$377.$high, s15.$low + x$377.$low)); - s14 = (x$378 = $shiftLeft64(carry[14], 21), new $Int64(s14.$high - x$378.$high, s14.$low - x$378.$low)); - carry[16] = $shiftRightInt64((new $Int64(s16.$high + 0, s16.$low + 1048576)), 21); - s17 = (x$379 = carry[16], new $Int64(s17.$high + x$379.$high, s17.$low + x$379.$low)); - s16 = (x$380 = $shiftLeft64(carry[16], 21), new $Int64(s16.$high - x$380.$high, s16.$low - x$380.$low)); - carry[7] = $shiftRightInt64((new $Int64(s7.$high + 0, s7.$low + 1048576)), 21); - s8 = (x$381 = carry[7], new $Int64(s8.$high + x$381.$high, s8.$low + x$381.$low)); - s7 = (x$382 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$382.$high, s7.$low - x$382.$low)); - carry[9] = $shiftRightInt64((new $Int64(s9.$high + 0, s9.$low + 1048576)), 21); - s10 = (x$383 = carry[9], new $Int64(s10.$high + x$383.$high, s10.$low + x$383.$low)); - s9 = (x$384 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$384.$high, s9.$low - x$384.$low)); - carry[11] = $shiftRightInt64((new $Int64(s11.$high + 0, s11.$low + 1048576)), 21); - s12 = (x$385 = carry[11], new $Int64(s12.$high + x$385.$high, s12.$low + x$385.$low)); - s11 = (x$386 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$386.$high, s11.$low - x$386.$low)); - carry[13] = $shiftRightInt64((new $Int64(s13.$high + 0, s13.$low + 1048576)), 21); - s14 = (x$387 = carry[13], new $Int64(s14.$high + x$387.$high, s14.$low + x$387.$low)); - s13 = (x$388 = $shiftLeft64(carry[13], 21), new $Int64(s13.$high - x$388.$high, s13.$low - x$388.$low)); - carry[15] = $shiftRightInt64((new $Int64(s15.$high + 0, s15.$low + 1048576)), 21); - s16 = (x$389 = carry[15], new $Int64(s16.$high + x$389.$high, s16.$low + x$389.$low)); - s15 = (x$390 = $shiftLeft64(carry[15], 21), new $Int64(s15.$high - x$390.$high, s15.$low - x$390.$low)); - s5 = (x$391 = $mul64(s17, new $Int64(0, 666643)), new $Int64(s5.$high + x$391.$high, s5.$low + x$391.$low)); - s6 = (x$392 = $mul64(s17, new $Int64(0, 470296)), new $Int64(s6.$high + x$392.$high, s6.$low + x$392.$low)); - s7 = (x$393 = $mul64(s17, new $Int64(0, 654183)), new $Int64(s7.$high + x$393.$high, s7.$low + x$393.$low)); - s8 = (x$394 = $mul64(s17, new $Int64(0, 997805)), new $Int64(s8.$high - x$394.$high, s8.$low - x$394.$low)); - s9 = (x$395 = $mul64(s17, new $Int64(0, 136657)), new $Int64(s9.$high + x$395.$high, s9.$low + x$395.$low)); - s10 = (x$396 = $mul64(s17, new $Int64(0, 683901)), new $Int64(s10.$high - x$396.$high, s10.$low - x$396.$low)); - s17 = new $Int64(0, 0); - s4 = (x$397 = $mul64(s16, new $Int64(0, 666643)), new $Int64(s4.$high + x$397.$high, s4.$low + x$397.$low)); - s5 = (x$398 = $mul64(s16, new $Int64(0, 470296)), new $Int64(s5.$high + x$398.$high, s5.$low + x$398.$low)); - s6 = (x$399 = $mul64(s16, new $Int64(0, 654183)), new $Int64(s6.$high + x$399.$high, s6.$low + x$399.$low)); - s7 = (x$400 = $mul64(s16, new $Int64(0, 997805)), new $Int64(s7.$high - x$400.$high, s7.$low - x$400.$low)); - s8 = (x$401 = $mul64(s16, new $Int64(0, 136657)), new $Int64(s8.$high + x$401.$high, s8.$low + x$401.$low)); - s9 = (x$402 = $mul64(s16, new $Int64(0, 683901)), new $Int64(s9.$high - x$402.$high, s9.$low - x$402.$low)); - s16 = new $Int64(0, 0); - s3 = (x$403 = $mul64(s15, new $Int64(0, 666643)), new $Int64(s3.$high + x$403.$high, s3.$low + x$403.$low)); - s4 = (x$404 = $mul64(s15, new $Int64(0, 470296)), new $Int64(s4.$high + x$404.$high, s4.$low + x$404.$low)); - s5 = (x$405 = $mul64(s15, new $Int64(0, 654183)), new $Int64(s5.$high + x$405.$high, s5.$low + x$405.$low)); - s6 = (x$406 = $mul64(s15, new $Int64(0, 997805)), new $Int64(s6.$high - x$406.$high, s6.$low - x$406.$low)); - s7 = (x$407 = $mul64(s15, new $Int64(0, 136657)), new $Int64(s7.$high + x$407.$high, s7.$low + x$407.$low)); - s8 = (x$408 = $mul64(s15, new $Int64(0, 683901)), new $Int64(s8.$high - x$408.$high, s8.$low - x$408.$low)); - s15 = new $Int64(0, 0); - s2 = (x$409 = $mul64(s14, new $Int64(0, 666643)), new $Int64(s2.$high + x$409.$high, s2.$low + x$409.$low)); - s3 = (x$410 = $mul64(s14, new $Int64(0, 470296)), new $Int64(s3.$high + x$410.$high, s3.$low + x$410.$low)); - s4 = (x$411 = $mul64(s14, new $Int64(0, 654183)), new $Int64(s4.$high + x$411.$high, s4.$low + x$411.$low)); - s5 = (x$412 = $mul64(s14, new $Int64(0, 997805)), new $Int64(s5.$high - x$412.$high, s5.$low - x$412.$low)); - s6 = (x$413 = $mul64(s14, new $Int64(0, 136657)), new $Int64(s6.$high + x$413.$high, s6.$low + x$413.$low)); - s7 = (x$414 = $mul64(s14, new $Int64(0, 683901)), new $Int64(s7.$high - x$414.$high, s7.$low - x$414.$low)); - s14 = new $Int64(0, 0); - s1 = (x$415 = $mul64(s13, new $Int64(0, 666643)), new $Int64(s1.$high + x$415.$high, s1.$low + x$415.$low)); - s2 = (x$416 = $mul64(s13, new $Int64(0, 470296)), new $Int64(s2.$high + x$416.$high, s2.$low + x$416.$low)); - s3 = (x$417 = $mul64(s13, new $Int64(0, 654183)), new $Int64(s3.$high + x$417.$high, s3.$low + x$417.$low)); - s4 = (x$418 = $mul64(s13, new $Int64(0, 997805)), new $Int64(s4.$high - x$418.$high, s4.$low - x$418.$low)); - s5 = (x$419 = $mul64(s13, new $Int64(0, 136657)), new $Int64(s5.$high + x$419.$high, s5.$low + x$419.$low)); - s6 = (x$420 = $mul64(s13, new $Int64(0, 683901)), new $Int64(s6.$high - x$420.$high, s6.$low - x$420.$low)); - s13 = new $Int64(0, 0); - s0 = (x$421 = $mul64(s12, new $Int64(0, 666643)), new $Int64(s0.$high + x$421.$high, s0.$low + x$421.$low)); - s1 = (x$422 = $mul64(s12, new $Int64(0, 470296)), new $Int64(s1.$high + x$422.$high, s1.$low + x$422.$low)); - s2 = (x$423 = $mul64(s12, new $Int64(0, 654183)), new $Int64(s2.$high + x$423.$high, s2.$low + x$423.$low)); - s3 = (x$424 = $mul64(s12, new $Int64(0, 997805)), new $Int64(s3.$high - x$424.$high, s3.$low - x$424.$low)); - s4 = (x$425 = $mul64(s12, new $Int64(0, 136657)), new $Int64(s4.$high + x$425.$high, s4.$low + x$425.$low)); - s5 = (x$426 = $mul64(s12, new $Int64(0, 683901)), new $Int64(s5.$high - x$426.$high, s5.$low - x$426.$low)); - s12 = new $Int64(0, 0); - carry[0] = $shiftRightInt64((new $Int64(s0.$high + 0, s0.$low + 1048576)), 21); - s1 = (x$427 = carry[0], new $Int64(s1.$high + x$427.$high, s1.$low + x$427.$low)); - s0 = (x$428 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$428.$high, s0.$low - x$428.$low)); - carry[2] = $shiftRightInt64((new $Int64(s2.$high + 0, s2.$low + 1048576)), 21); - s3 = (x$429 = carry[2], new $Int64(s3.$high + x$429.$high, s3.$low + x$429.$low)); - s2 = (x$430 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$430.$high, s2.$low - x$430.$low)); - carry[4] = $shiftRightInt64((new $Int64(s4.$high + 0, s4.$low + 1048576)), 21); - s5 = (x$431 = carry[4], new $Int64(s5.$high + x$431.$high, s5.$low + x$431.$low)); - s4 = (x$432 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$432.$high, s4.$low - x$432.$low)); - carry[6] = $shiftRightInt64((new $Int64(s6.$high + 0, s6.$low + 1048576)), 21); - s7 = (x$433 = carry[6], new $Int64(s7.$high + x$433.$high, s7.$low + x$433.$low)); - s6 = (x$434 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$434.$high, s6.$low - x$434.$low)); - carry[8] = $shiftRightInt64((new $Int64(s8.$high + 0, s8.$low + 1048576)), 21); - s9 = (x$435 = carry[8], new $Int64(s9.$high + x$435.$high, s9.$low + x$435.$low)); - s8 = (x$436 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$436.$high, s8.$low - x$436.$low)); - carry[10] = $shiftRightInt64((new $Int64(s10.$high + 0, s10.$low + 1048576)), 21); - s11 = (x$437 = carry[10], new $Int64(s11.$high + x$437.$high, s11.$low + x$437.$low)); - s10 = (x$438 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$438.$high, s10.$low - x$438.$low)); - carry[1] = $shiftRightInt64((new $Int64(s1.$high + 0, s1.$low + 1048576)), 21); - s2 = (x$439 = carry[1], new $Int64(s2.$high + x$439.$high, s2.$low + x$439.$low)); - s1 = (x$440 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$440.$high, s1.$low - x$440.$low)); - carry[3] = $shiftRightInt64((new $Int64(s3.$high + 0, s3.$low + 1048576)), 21); - s4 = (x$441 = carry[3], new $Int64(s4.$high + x$441.$high, s4.$low + x$441.$low)); - s3 = (x$442 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$442.$high, s3.$low - x$442.$low)); - carry[5] = $shiftRightInt64((new $Int64(s5.$high + 0, s5.$low + 1048576)), 21); - s6 = (x$443 = carry[5], new $Int64(s6.$high + x$443.$high, s6.$low + x$443.$low)); - s5 = (x$444 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$444.$high, s5.$low - x$444.$low)); - carry[7] = $shiftRightInt64((new $Int64(s7.$high + 0, s7.$low + 1048576)), 21); - s8 = (x$445 = carry[7], new $Int64(s8.$high + x$445.$high, s8.$low + x$445.$low)); - s7 = (x$446 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$446.$high, s7.$low - x$446.$low)); - carry[9] = $shiftRightInt64((new $Int64(s9.$high + 0, s9.$low + 1048576)), 21); - s10 = (x$447 = carry[9], new $Int64(s10.$high + x$447.$high, s10.$low + x$447.$low)); - s9 = (x$448 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$448.$high, s9.$low - x$448.$low)); - carry[11] = $shiftRightInt64((new $Int64(s11.$high + 0, s11.$low + 1048576)), 21); - s12 = (x$449 = carry[11], new $Int64(s12.$high + x$449.$high, s12.$low + x$449.$low)); - s11 = (x$450 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$450.$high, s11.$low - x$450.$low)); - s0 = (x$451 = $mul64(s12, new $Int64(0, 666643)), new $Int64(s0.$high + x$451.$high, s0.$low + x$451.$low)); - s1 = (x$452 = $mul64(s12, new $Int64(0, 470296)), new $Int64(s1.$high + x$452.$high, s1.$low + x$452.$low)); - s2 = (x$453 = $mul64(s12, new $Int64(0, 654183)), new $Int64(s2.$high + x$453.$high, s2.$low + x$453.$low)); - s3 = (x$454 = $mul64(s12, new $Int64(0, 997805)), new $Int64(s3.$high - x$454.$high, s3.$low - x$454.$low)); - s4 = (x$455 = $mul64(s12, new $Int64(0, 136657)), new $Int64(s4.$high + x$455.$high, s4.$low + x$455.$low)); - s5 = (x$456 = $mul64(s12, new $Int64(0, 683901)), new $Int64(s5.$high - x$456.$high, s5.$low - x$456.$low)); - s12 = new $Int64(0, 0); - carry[0] = $shiftRightInt64(s0, 21); - s1 = (x$457 = carry[0], new $Int64(s1.$high + x$457.$high, s1.$low + x$457.$low)); - s0 = (x$458 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$458.$high, s0.$low - x$458.$low)); - carry[1] = $shiftRightInt64(s1, 21); - s2 = (x$459 = carry[1], new $Int64(s2.$high + x$459.$high, s2.$low + x$459.$low)); - s1 = (x$460 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$460.$high, s1.$low - x$460.$low)); - carry[2] = $shiftRightInt64(s2, 21); - s3 = (x$461 = carry[2], new $Int64(s3.$high + x$461.$high, s3.$low + x$461.$low)); - s2 = (x$462 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$462.$high, s2.$low - x$462.$low)); - carry[3] = $shiftRightInt64(s3, 21); - s4 = (x$463 = carry[3], new $Int64(s4.$high + x$463.$high, s4.$low + x$463.$low)); - s3 = (x$464 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$464.$high, s3.$low - x$464.$low)); - carry[4] = $shiftRightInt64(s4, 21); - s5 = (x$465 = carry[4], new $Int64(s5.$high + x$465.$high, s5.$low + x$465.$low)); - s4 = (x$466 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$466.$high, s4.$low - x$466.$low)); - carry[5] = $shiftRightInt64(s5, 21); - s6 = (x$467 = carry[5], new $Int64(s6.$high + x$467.$high, s6.$low + x$467.$low)); - s5 = (x$468 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$468.$high, s5.$low - x$468.$low)); - carry[6] = $shiftRightInt64(s6, 21); - s7 = (x$469 = carry[6], new $Int64(s7.$high + x$469.$high, s7.$low + x$469.$low)); - s6 = (x$470 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$470.$high, s6.$low - x$470.$low)); - carry[7] = $shiftRightInt64(s7, 21); - s8 = (x$471 = carry[7], new $Int64(s8.$high + x$471.$high, s8.$low + x$471.$low)); - s7 = (x$472 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$472.$high, s7.$low - x$472.$low)); - carry[8] = $shiftRightInt64(s8, 21); - s9 = (x$473 = carry[8], new $Int64(s9.$high + x$473.$high, s9.$low + x$473.$low)); - s8 = (x$474 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$474.$high, s8.$low - x$474.$low)); - carry[9] = $shiftRightInt64(s9, 21); - s10 = (x$475 = carry[9], new $Int64(s10.$high + x$475.$high, s10.$low + x$475.$low)); - s9 = (x$476 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$476.$high, s9.$low - x$476.$low)); - carry[10] = $shiftRightInt64(s10, 21); - s11 = (x$477 = carry[10], new $Int64(s11.$high + x$477.$high, s11.$low + x$477.$low)); - s10 = (x$478 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$478.$high, s10.$low - x$478.$low)); - carry[11] = $shiftRightInt64(s11, 21); - s12 = (x$479 = carry[11], new $Int64(s12.$high + x$479.$high, s12.$low + x$479.$low)); - s11 = (x$480 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$480.$high, s11.$low - x$480.$low)); - s0 = (x$481 = $mul64(s12, new $Int64(0, 666643)), new $Int64(s0.$high + x$481.$high, s0.$low + x$481.$low)); - s1 = (x$482 = $mul64(s12, new $Int64(0, 470296)), new $Int64(s1.$high + x$482.$high, s1.$low + x$482.$low)); - s2 = (x$483 = $mul64(s12, new $Int64(0, 654183)), new $Int64(s2.$high + x$483.$high, s2.$low + x$483.$low)); - s3 = (x$484 = $mul64(s12, new $Int64(0, 997805)), new $Int64(s3.$high - x$484.$high, s3.$low - x$484.$low)); - s4 = (x$485 = $mul64(s12, new $Int64(0, 136657)), new $Int64(s4.$high + x$485.$high, s4.$low + x$485.$low)); - s5 = (x$486 = $mul64(s12, new $Int64(0, 683901)), new $Int64(s5.$high - x$486.$high, s5.$low - x$486.$low)); - s12 = new $Int64(0, 0); - carry[0] = $shiftRightInt64(s0, 21); - s1 = (x$487 = carry[0], new $Int64(s1.$high + x$487.$high, s1.$low + x$487.$low)); - s0 = (x$488 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$488.$high, s0.$low - x$488.$low)); - carry[1] = $shiftRightInt64(s1, 21); - s2 = (x$489 = carry[1], new $Int64(s2.$high + x$489.$high, s2.$low + x$489.$low)); - s1 = (x$490 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$490.$high, s1.$low - x$490.$low)); - carry[2] = $shiftRightInt64(s2, 21); - s3 = (x$491 = carry[2], new $Int64(s3.$high + x$491.$high, s3.$low + x$491.$low)); - s2 = (x$492 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$492.$high, s2.$low - x$492.$low)); - carry[3] = $shiftRightInt64(s3, 21); - s4 = (x$493 = carry[3], new $Int64(s4.$high + x$493.$high, s4.$low + x$493.$low)); - s3 = (x$494 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$494.$high, s3.$low - x$494.$low)); - carry[4] = $shiftRightInt64(s4, 21); - s5 = (x$495 = carry[4], new $Int64(s5.$high + x$495.$high, s5.$low + x$495.$low)); - s4 = (x$496 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$496.$high, s4.$low - x$496.$low)); - carry[5] = $shiftRightInt64(s5, 21); - s6 = (x$497 = carry[5], new $Int64(s6.$high + x$497.$high, s6.$low + x$497.$low)); - s5 = (x$498 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$498.$high, s5.$low - x$498.$low)); - carry[6] = $shiftRightInt64(s6, 21); - s7 = (x$499 = carry[6], new $Int64(s7.$high + x$499.$high, s7.$low + x$499.$low)); - s6 = (x$500 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$500.$high, s6.$low - x$500.$low)); - carry[7] = $shiftRightInt64(s7, 21); - s8 = (x$501 = carry[7], new $Int64(s8.$high + x$501.$high, s8.$low + x$501.$low)); - s7 = (x$502 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$502.$high, s7.$low - x$502.$low)); - carry[8] = $shiftRightInt64(s8, 21); - s9 = (x$503 = carry[8], new $Int64(s9.$high + x$503.$high, s9.$low + x$503.$low)); - s8 = (x$504 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$504.$high, s8.$low - x$504.$low)); - carry[9] = $shiftRightInt64(s9, 21); - s10 = (x$505 = carry[9], new $Int64(s10.$high + x$505.$high, s10.$low + x$505.$low)); - s9 = (x$506 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$506.$high, s9.$low - x$506.$low)); - carry[10] = $shiftRightInt64(s10, 21); - s11 = (x$507 = carry[10], new $Int64(s11.$high + x$507.$high, s11.$low + x$507.$low)); - s10 = (x$508 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$508.$high, s10.$low - x$508.$low)); - s.nilCheck, s[0] = (($shiftRightInt64(s0, 0).$low << 24 >>> 24)); - s.nilCheck, s[1] = (($shiftRightInt64(s0, 8).$low << 24 >>> 24)); - s.nilCheck, s[2] = (((x$509 = $shiftRightInt64(s0, 16), x$510 = $shiftLeft64(s1, 5), new $Int64(x$509.$high | x$510.$high, (x$509.$low | x$510.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[3] = (($shiftRightInt64(s1, 3).$low << 24 >>> 24)); - s.nilCheck, s[4] = (($shiftRightInt64(s1, 11).$low << 24 >>> 24)); - s.nilCheck, s[5] = (((x$511 = $shiftRightInt64(s1, 19), x$512 = $shiftLeft64(s2, 2), new $Int64(x$511.$high | x$512.$high, (x$511.$low | x$512.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[6] = (($shiftRightInt64(s2, 6).$low << 24 >>> 24)); - s.nilCheck, s[7] = (((x$513 = $shiftRightInt64(s2, 14), x$514 = $shiftLeft64(s3, 7), new $Int64(x$513.$high | x$514.$high, (x$513.$low | x$514.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[8] = (($shiftRightInt64(s3, 1).$low << 24 >>> 24)); - s.nilCheck, s[9] = (($shiftRightInt64(s3, 9).$low << 24 >>> 24)); - s.nilCheck, s[10] = (((x$515 = $shiftRightInt64(s3, 17), x$516 = $shiftLeft64(s4, 4), new $Int64(x$515.$high | x$516.$high, (x$515.$low | x$516.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[11] = (($shiftRightInt64(s4, 4).$low << 24 >>> 24)); - s.nilCheck, s[12] = (($shiftRightInt64(s4, 12).$low << 24 >>> 24)); - s.nilCheck, s[13] = (((x$517 = $shiftRightInt64(s4, 20), x$518 = $shiftLeft64(s5, 1), new $Int64(x$517.$high | x$518.$high, (x$517.$low | x$518.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[14] = (($shiftRightInt64(s5, 7).$low << 24 >>> 24)); - s.nilCheck, s[15] = (((x$519 = $shiftRightInt64(s5, 15), x$520 = $shiftLeft64(s6, 6), new $Int64(x$519.$high | x$520.$high, (x$519.$low | x$520.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[16] = (($shiftRightInt64(s6, 2).$low << 24 >>> 24)); - s.nilCheck, s[17] = (($shiftRightInt64(s6, 10).$low << 24 >>> 24)); - s.nilCheck, s[18] = (((x$521 = $shiftRightInt64(s6, 18), x$522 = $shiftLeft64(s7, 3), new $Int64(x$521.$high | x$522.$high, (x$521.$low | x$522.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[19] = (($shiftRightInt64(s7, 5).$low << 24 >>> 24)); - s.nilCheck, s[20] = (($shiftRightInt64(s7, 13).$low << 24 >>> 24)); - s.nilCheck, s[21] = (($shiftRightInt64(s8, 0).$low << 24 >>> 24)); - s.nilCheck, s[22] = (($shiftRightInt64(s8, 8).$low << 24 >>> 24)); - s.nilCheck, s[23] = (((x$523 = $shiftRightInt64(s8, 16), x$524 = $shiftLeft64(s9, 5), new $Int64(x$523.$high | x$524.$high, (x$523.$low | x$524.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[24] = (($shiftRightInt64(s9, 3).$low << 24 >>> 24)); - s.nilCheck, s[25] = (($shiftRightInt64(s9, 11).$low << 24 >>> 24)); - s.nilCheck, s[26] = (((x$525 = $shiftRightInt64(s9, 19), x$526 = $shiftLeft64(s10, 2), new $Int64(x$525.$high | x$526.$high, (x$525.$low | x$526.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[27] = (($shiftRightInt64(s10, 6).$low << 24 >>> 24)); - s.nilCheck, s[28] = (((x$527 = $shiftRightInt64(s10, 14), x$528 = $shiftLeft64(s11, 7), new $Int64(x$527.$high | x$528.$high, (x$527.$low | x$528.$low) >>> 0)).$low << 24 >>> 24)); - s.nilCheck, s[29] = (($shiftRightInt64(s11, 1).$low << 24 >>> 24)); - s.nilCheck, s[30] = (($shiftRightInt64(s11, 9).$low << 24 >>> 24)); - s.nilCheck, s[31] = (($shiftRightInt64(s11, 17).$low << 24 >>> 24)); - }; - scReduce = function(out, s) { - var carry, out, s, s0, s1, s10, s11, s12, s13, s14, s15, s16, s17, s18, s19, s2, s20, s21, s22, s23, s3, s4, s5, s6, s7, s8, s9, x, x$1, x$10, x$100, x$101, x$102, x$103, x$104, x$105, x$106, x$107, x$108, x$109, x$11, x$110, x$111, x$112, x$113, x$114, x$115, x$116, x$117, x$118, x$119, x$12, x$120, x$121, x$122, x$123, x$124, x$125, x$126, x$127, x$128, x$129, x$13, x$130, x$131, x$132, x$133, x$134, x$135, x$136, x$137, x$138, x$139, x$14, x$140, x$141, x$142, x$143, x$144, x$145, x$146, x$147, x$148, x$149, x$15, x$150, x$151, x$152, x$153, x$154, x$155, x$156, x$157, x$158, x$159, x$16, x$160, x$161, x$162, x$163, x$164, x$165, x$166, x$167, x$168, x$169, x$17, x$170, x$171, x$172, x$173, x$174, x$175, x$176, x$177, x$178, x$179, x$18, x$180, x$181, x$182, x$183, x$184, x$185, x$186, x$187, x$188, x$189, x$19, x$190, x$191, x$192, x$193, x$194, x$195, x$196, x$197, x$198, x$199, x$2, x$20, x$200, x$201, x$202, x$203, x$204, x$205, x$206, x$207, x$208, x$209, x$21, x$210, x$211, x$212, x$213, x$214, x$215, x$216, x$217, x$218, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$35, x$36, x$37, x$38, x$39, x$4, x$40, x$41, x$42, x$43, x$44, x$45, x$46, x$47, x$48, x$49, x$5, x$50, x$51, x$52, x$53, x$54, x$55, x$56, x$57, x$58, x$59, x$6, x$60, x$61, x$62, x$63, x$64, x$65, x$66, x$67, x$68, x$69, x$7, x$70, x$71, x$72, x$73, x$74, x$75, x$76, x$77, x$78, x$79, x$8, x$80, x$81, x$82, x$83, x$84, x$85, x$86, x$87, x$88, x$89, x$9, x$90, x$91, x$92, x$93, x$94, x$95, x$96, x$97, x$98, x$99; - s0 = (x = load3(new sliceType(s)), new $Int64(0 & x.$high, (2097151 & x.$low) >>> 0)); - s1 = (x$1 = $shiftRightInt64(load4($subslice(new sliceType(s), 2)), 5), new $Int64(0 & x$1.$high, (2097151 & x$1.$low) >>> 0)); - s2 = (x$2 = $shiftRightInt64(load3($subslice(new sliceType(s), 5)), 2), new $Int64(0 & x$2.$high, (2097151 & x$2.$low) >>> 0)); - s3 = (x$3 = $shiftRightInt64(load4($subslice(new sliceType(s), 7)), 7), new $Int64(0 & x$3.$high, (2097151 & x$3.$low) >>> 0)); - s4 = (x$4 = $shiftRightInt64(load4($subslice(new sliceType(s), 10)), 4), new $Int64(0 & x$4.$high, (2097151 & x$4.$low) >>> 0)); - s5 = (x$5 = $shiftRightInt64(load3($subslice(new sliceType(s), 13)), 1), new $Int64(0 & x$5.$high, (2097151 & x$5.$low) >>> 0)); - s6 = (x$6 = $shiftRightInt64(load4($subslice(new sliceType(s), 15)), 6), new $Int64(0 & x$6.$high, (2097151 & x$6.$low) >>> 0)); - s7 = (x$7 = $shiftRightInt64(load3($subslice(new sliceType(s), 18)), 3), new $Int64(0 & x$7.$high, (2097151 & x$7.$low) >>> 0)); - s8 = (x$8 = load3($subslice(new sliceType(s), 21)), new $Int64(0 & x$8.$high, (2097151 & x$8.$low) >>> 0)); - s9 = (x$9 = $shiftRightInt64(load4($subslice(new sliceType(s), 23)), 5), new $Int64(0 & x$9.$high, (2097151 & x$9.$low) >>> 0)); - s10 = (x$10 = $shiftRightInt64(load3($subslice(new sliceType(s), 26)), 2), new $Int64(0 & x$10.$high, (2097151 & x$10.$low) >>> 0)); - s11 = (x$11 = $shiftRightInt64(load4($subslice(new sliceType(s), 28)), 7), new $Int64(0 & x$11.$high, (2097151 & x$11.$low) >>> 0)); - s12 = (x$12 = $shiftRightInt64(load4($subslice(new sliceType(s), 31)), 4), new $Int64(0 & x$12.$high, (2097151 & x$12.$low) >>> 0)); - s13 = (x$13 = $shiftRightInt64(load3($subslice(new sliceType(s), 34)), 1), new $Int64(0 & x$13.$high, (2097151 & x$13.$low) >>> 0)); - s14 = (x$14 = $shiftRightInt64(load4($subslice(new sliceType(s), 36)), 6), new $Int64(0 & x$14.$high, (2097151 & x$14.$low) >>> 0)); - s15 = (x$15 = $shiftRightInt64(load3($subslice(new sliceType(s), 39)), 3), new $Int64(0 & x$15.$high, (2097151 & x$15.$low) >>> 0)); - s16 = (x$16 = load3($subslice(new sliceType(s), 42)), new $Int64(0 & x$16.$high, (2097151 & x$16.$low) >>> 0)); - s17 = (x$17 = $shiftRightInt64(load4($subslice(new sliceType(s), 44)), 5), new $Int64(0 & x$17.$high, (2097151 & x$17.$low) >>> 0)); - s18 = (x$18 = $shiftRightInt64(load3($subslice(new sliceType(s), 47)), 2), new $Int64(0 & x$18.$high, (2097151 & x$18.$low) >>> 0)); - s19 = (x$19 = $shiftRightInt64(load4($subslice(new sliceType(s), 49)), 7), new $Int64(0 & x$19.$high, (2097151 & x$19.$low) >>> 0)); - s20 = (x$20 = $shiftRightInt64(load4($subslice(new sliceType(s), 52)), 4), new $Int64(0 & x$20.$high, (2097151 & x$20.$low) >>> 0)); - s21 = (x$21 = $shiftRightInt64(load3($subslice(new sliceType(s), 55)), 1), new $Int64(0 & x$21.$high, (2097151 & x$21.$low) >>> 0)); - s22 = (x$22 = $shiftRightInt64(load4($subslice(new sliceType(s), 57)), 6), new $Int64(0 & x$22.$high, (2097151 & x$22.$low) >>> 0)); - s23 = $shiftRightInt64(load4($subslice(new sliceType(s), 60)), 3); - s11 = (x$23 = $mul64(s23, new $Int64(0, 666643)), new $Int64(s11.$high + x$23.$high, s11.$low + x$23.$low)); - s12 = (x$24 = $mul64(s23, new $Int64(0, 470296)), new $Int64(s12.$high + x$24.$high, s12.$low + x$24.$low)); - s13 = (x$25 = $mul64(s23, new $Int64(0, 654183)), new $Int64(s13.$high + x$25.$high, s13.$low + x$25.$low)); - s14 = (x$26 = $mul64(s23, new $Int64(0, 997805)), new $Int64(s14.$high - x$26.$high, s14.$low - x$26.$low)); - s15 = (x$27 = $mul64(s23, new $Int64(0, 136657)), new $Int64(s15.$high + x$27.$high, s15.$low + x$27.$low)); - s16 = (x$28 = $mul64(s23, new $Int64(0, 683901)), new $Int64(s16.$high - x$28.$high, s16.$low - x$28.$low)); - s23 = new $Int64(0, 0); - s10 = (x$29 = $mul64(s22, new $Int64(0, 666643)), new $Int64(s10.$high + x$29.$high, s10.$low + x$29.$low)); - s11 = (x$30 = $mul64(s22, new $Int64(0, 470296)), new $Int64(s11.$high + x$30.$high, s11.$low + x$30.$low)); - s12 = (x$31 = $mul64(s22, new $Int64(0, 654183)), new $Int64(s12.$high + x$31.$high, s12.$low + x$31.$low)); - s13 = (x$32 = $mul64(s22, new $Int64(0, 997805)), new $Int64(s13.$high - x$32.$high, s13.$low - x$32.$low)); - s14 = (x$33 = $mul64(s22, new $Int64(0, 136657)), new $Int64(s14.$high + x$33.$high, s14.$low + x$33.$low)); - s15 = (x$34 = $mul64(s22, new $Int64(0, 683901)), new $Int64(s15.$high - x$34.$high, s15.$low - x$34.$low)); - s22 = new $Int64(0, 0); - s9 = (x$35 = $mul64(s21, new $Int64(0, 666643)), new $Int64(s9.$high + x$35.$high, s9.$low + x$35.$low)); - s10 = (x$36 = $mul64(s21, new $Int64(0, 470296)), new $Int64(s10.$high + x$36.$high, s10.$low + x$36.$low)); - s11 = (x$37 = $mul64(s21, new $Int64(0, 654183)), new $Int64(s11.$high + x$37.$high, s11.$low + x$37.$low)); - s12 = (x$38 = $mul64(s21, new $Int64(0, 997805)), new $Int64(s12.$high - x$38.$high, s12.$low - x$38.$low)); - s13 = (x$39 = $mul64(s21, new $Int64(0, 136657)), new $Int64(s13.$high + x$39.$high, s13.$low + x$39.$low)); - s14 = (x$40 = $mul64(s21, new $Int64(0, 683901)), new $Int64(s14.$high - x$40.$high, s14.$low - x$40.$low)); - s21 = new $Int64(0, 0); - s8 = (x$41 = $mul64(s20, new $Int64(0, 666643)), new $Int64(s8.$high + x$41.$high, s8.$low + x$41.$low)); - s9 = (x$42 = $mul64(s20, new $Int64(0, 470296)), new $Int64(s9.$high + x$42.$high, s9.$low + x$42.$low)); - s10 = (x$43 = $mul64(s20, new $Int64(0, 654183)), new $Int64(s10.$high + x$43.$high, s10.$low + x$43.$low)); - s11 = (x$44 = $mul64(s20, new $Int64(0, 997805)), new $Int64(s11.$high - x$44.$high, s11.$low - x$44.$low)); - s12 = (x$45 = $mul64(s20, new $Int64(0, 136657)), new $Int64(s12.$high + x$45.$high, s12.$low + x$45.$low)); - s13 = (x$46 = $mul64(s20, new $Int64(0, 683901)), new $Int64(s13.$high - x$46.$high, s13.$low - x$46.$low)); - s20 = new $Int64(0, 0); - s7 = (x$47 = $mul64(s19, new $Int64(0, 666643)), new $Int64(s7.$high + x$47.$high, s7.$low + x$47.$low)); - s8 = (x$48 = $mul64(s19, new $Int64(0, 470296)), new $Int64(s8.$high + x$48.$high, s8.$low + x$48.$low)); - s9 = (x$49 = $mul64(s19, new $Int64(0, 654183)), new $Int64(s9.$high + x$49.$high, s9.$low + x$49.$low)); - s10 = (x$50 = $mul64(s19, new $Int64(0, 997805)), new $Int64(s10.$high - x$50.$high, s10.$low - x$50.$low)); - s11 = (x$51 = $mul64(s19, new $Int64(0, 136657)), new $Int64(s11.$high + x$51.$high, s11.$low + x$51.$low)); - s12 = (x$52 = $mul64(s19, new $Int64(0, 683901)), new $Int64(s12.$high - x$52.$high, s12.$low - x$52.$low)); - s19 = new $Int64(0, 0); - s6 = (x$53 = $mul64(s18, new $Int64(0, 666643)), new $Int64(s6.$high + x$53.$high, s6.$low + x$53.$low)); - s7 = (x$54 = $mul64(s18, new $Int64(0, 470296)), new $Int64(s7.$high + x$54.$high, s7.$low + x$54.$low)); - s8 = (x$55 = $mul64(s18, new $Int64(0, 654183)), new $Int64(s8.$high + x$55.$high, s8.$low + x$55.$low)); - s9 = (x$56 = $mul64(s18, new $Int64(0, 997805)), new $Int64(s9.$high - x$56.$high, s9.$low - x$56.$low)); - s10 = (x$57 = $mul64(s18, new $Int64(0, 136657)), new $Int64(s10.$high + x$57.$high, s10.$low + x$57.$low)); - s11 = (x$58 = $mul64(s18, new $Int64(0, 683901)), new $Int64(s11.$high - x$58.$high, s11.$low - x$58.$low)); - s18 = new $Int64(0, 0); - carry = arrayType$10.zero(); - carry[6] = $shiftRightInt64((new $Int64(s6.$high + 0, s6.$low + 1048576)), 21); - s7 = (x$59 = carry[6], new $Int64(s7.$high + x$59.$high, s7.$low + x$59.$low)); - s6 = (x$60 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$60.$high, s6.$low - x$60.$low)); - carry[8] = $shiftRightInt64((new $Int64(s8.$high + 0, s8.$low + 1048576)), 21); - s9 = (x$61 = carry[8], new $Int64(s9.$high + x$61.$high, s9.$low + x$61.$low)); - s8 = (x$62 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$62.$high, s8.$low - x$62.$low)); - carry[10] = $shiftRightInt64((new $Int64(s10.$high + 0, s10.$low + 1048576)), 21); - s11 = (x$63 = carry[10], new $Int64(s11.$high + x$63.$high, s11.$low + x$63.$low)); - s10 = (x$64 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$64.$high, s10.$low - x$64.$low)); - carry[12] = $shiftRightInt64((new $Int64(s12.$high + 0, s12.$low + 1048576)), 21); - s13 = (x$65 = carry[12], new $Int64(s13.$high + x$65.$high, s13.$low + x$65.$low)); - s12 = (x$66 = $shiftLeft64(carry[12], 21), new $Int64(s12.$high - x$66.$high, s12.$low - x$66.$low)); - carry[14] = $shiftRightInt64((new $Int64(s14.$high + 0, s14.$low + 1048576)), 21); - s15 = (x$67 = carry[14], new $Int64(s15.$high + x$67.$high, s15.$low + x$67.$low)); - s14 = (x$68 = $shiftLeft64(carry[14], 21), new $Int64(s14.$high - x$68.$high, s14.$low - x$68.$low)); - carry[16] = $shiftRightInt64((new $Int64(s16.$high + 0, s16.$low + 1048576)), 21); - s17 = (x$69 = carry[16], new $Int64(s17.$high + x$69.$high, s17.$low + x$69.$low)); - s16 = (x$70 = $shiftLeft64(carry[16], 21), new $Int64(s16.$high - x$70.$high, s16.$low - x$70.$low)); - carry[7] = $shiftRightInt64((new $Int64(s7.$high + 0, s7.$low + 1048576)), 21); - s8 = (x$71 = carry[7], new $Int64(s8.$high + x$71.$high, s8.$low + x$71.$low)); - s7 = (x$72 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$72.$high, s7.$low - x$72.$low)); - carry[9] = $shiftRightInt64((new $Int64(s9.$high + 0, s9.$low + 1048576)), 21); - s10 = (x$73 = carry[9], new $Int64(s10.$high + x$73.$high, s10.$low + x$73.$low)); - s9 = (x$74 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$74.$high, s9.$low - x$74.$low)); - carry[11] = $shiftRightInt64((new $Int64(s11.$high + 0, s11.$low + 1048576)), 21); - s12 = (x$75 = carry[11], new $Int64(s12.$high + x$75.$high, s12.$low + x$75.$low)); - s11 = (x$76 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$76.$high, s11.$low - x$76.$low)); - carry[13] = $shiftRightInt64((new $Int64(s13.$high + 0, s13.$low + 1048576)), 21); - s14 = (x$77 = carry[13], new $Int64(s14.$high + x$77.$high, s14.$low + x$77.$low)); - s13 = (x$78 = $shiftLeft64(carry[13], 21), new $Int64(s13.$high - x$78.$high, s13.$low - x$78.$low)); - carry[15] = $shiftRightInt64((new $Int64(s15.$high + 0, s15.$low + 1048576)), 21); - s16 = (x$79 = carry[15], new $Int64(s16.$high + x$79.$high, s16.$low + x$79.$low)); - s15 = (x$80 = $shiftLeft64(carry[15], 21), new $Int64(s15.$high - x$80.$high, s15.$low - x$80.$low)); - s5 = (x$81 = $mul64(s17, new $Int64(0, 666643)), new $Int64(s5.$high + x$81.$high, s5.$low + x$81.$low)); - s6 = (x$82 = $mul64(s17, new $Int64(0, 470296)), new $Int64(s6.$high + x$82.$high, s6.$low + x$82.$low)); - s7 = (x$83 = $mul64(s17, new $Int64(0, 654183)), new $Int64(s7.$high + x$83.$high, s7.$low + x$83.$low)); - s8 = (x$84 = $mul64(s17, new $Int64(0, 997805)), new $Int64(s8.$high - x$84.$high, s8.$low - x$84.$low)); - s9 = (x$85 = $mul64(s17, new $Int64(0, 136657)), new $Int64(s9.$high + x$85.$high, s9.$low + x$85.$low)); - s10 = (x$86 = $mul64(s17, new $Int64(0, 683901)), new $Int64(s10.$high - x$86.$high, s10.$low - x$86.$low)); - s17 = new $Int64(0, 0); - s4 = (x$87 = $mul64(s16, new $Int64(0, 666643)), new $Int64(s4.$high + x$87.$high, s4.$low + x$87.$low)); - s5 = (x$88 = $mul64(s16, new $Int64(0, 470296)), new $Int64(s5.$high + x$88.$high, s5.$low + x$88.$low)); - s6 = (x$89 = $mul64(s16, new $Int64(0, 654183)), new $Int64(s6.$high + x$89.$high, s6.$low + x$89.$low)); - s7 = (x$90 = $mul64(s16, new $Int64(0, 997805)), new $Int64(s7.$high - x$90.$high, s7.$low - x$90.$low)); - s8 = (x$91 = $mul64(s16, new $Int64(0, 136657)), new $Int64(s8.$high + x$91.$high, s8.$low + x$91.$low)); - s9 = (x$92 = $mul64(s16, new $Int64(0, 683901)), new $Int64(s9.$high - x$92.$high, s9.$low - x$92.$low)); - s16 = new $Int64(0, 0); - s3 = (x$93 = $mul64(s15, new $Int64(0, 666643)), new $Int64(s3.$high + x$93.$high, s3.$low + x$93.$low)); - s4 = (x$94 = $mul64(s15, new $Int64(0, 470296)), new $Int64(s4.$high + x$94.$high, s4.$low + x$94.$low)); - s5 = (x$95 = $mul64(s15, new $Int64(0, 654183)), new $Int64(s5.$high + x$95.$high, s5.$low + x$95.$low)); - s6 = (x$96 = $mul64(s15, new $Int64(0, 997805)), new $Int64(s6.$high - x$96.$high, s6.$low - x$96.$low)); - s7 = (x$97 = $mul64(s15, new $Int64(0, 136657)), new $Int64(s7.$high + x$97.$high, s7.$low + x$97.$low)); - s8 = (x$98 = $mul64(s15, new $Int64(0, 683901)), new $Int64(s8.$high - x$98.$high, s8.$low - x$98.$low)); - s15 = new $Int64(0, 0); - s2 = (x$99 = $mul64(s14, new $Int64(0, 666643)), new $Int64(s2.$high + x$99.$high, s2.$low + x$99.$low)); - s3 = (x$100 = $mul64(s14, new $Int64(0, 470296)), new $Int64(s3.$high + x$100.$high, s3.$low + x$100.$low)); - s4 = (x$101 = $mul64(s14, new $Int64(0, 654183)), new $Int64(s4.$high + x$101.$high, s4.$low + x$101.$low)); - s5 = (x$102 = $mul64(s14, new $Int64(0, 997805)), new $Int64(s5.$high - x$102.$high, s5.$low - x$102.$low)); - s6 = (x$103 = $mul64(s14, new $Int64(0, 136657)), new $Int64(s6.$high + x$103.$high, s6.$low + x$103.$low)); - s7 = (x$104 = $mul64(s14, new $Int64(0, 683901)), new $Int64(s7.$high - x$104.$high, s7.$low - x$104.$low)); - s14 = new $Int64(0, 0); - s1 = (x$105 = $mul64(s13, new $Int64(0, 666643)), new $Int64(s1.$high + x$105.$high, s1.$low + x$105.$low)); - s2 = (x$106 = $mul64(s13, new $Int64(0, 470296)), new $Int64(s2.$high + x$106.$high, s2.$low + x$106.$low)); - s3 = (x$107 = $mul64(s13, new $Int64(0, 654183)), new $Int64(s3.$high + x$107.$high, s3.$low + x$107.$low)); - s4 = (x$108 = $mul64(s13, new $Int64(0, 997805)), new $Int64(s4.$high - x$108.$high, s4.$low - x$108.$low)); - s5 = (x$109 = $mul64(s13, new $Int64(0, 136657)), new $Int64(s5.$high + x$109.$high, s5.$low + x$109.$low)); - s6 = (x$110 = $mul64(s13, new $Int64(0, 683901)), new $Int64(s6.$high - x$110.$high, s6.$low - x$110.$low)); - s13 = new $Int64(0, 0); - s0 = (x$111 = $mul64(s12, new $Int64(0, 666643)), new $Int64(s0.$high + x$111.$high, s0.$low + x$111.$low)); - s1 = (x$112 = $mul64(s12, new $Int64(0, 470296)), new $Int64(s1.$high + x$112.$high, s1.$low + x$112.$low)); - s2 = (x$113 = $mul64(s12, new $Int64(0, 654183)), new $Int64(s2.$high + x$113.$high, s2.$low + x$113.$low)); - s3 = (x$114 = $mul64(s12, new $Int64(0, 997805)), new $Int64(s3.$high - x$114.$high, s3.$low - x$114.$low)); - s4 = (x$115 = $mul64(s12, new $Int64(0, 136657)), new $Int64(s4.$high + x$115.$high, s4.$low + x$115.$low)); - s5 = (x$116 = $mul64(s12, new $Int64(0, 683901)), new $Int64(s5.$high - x$116.$high, s5.$low - x$116.$low)); - s12 = new $Int64(0, 0); - carry[0] = $shiftRightInt64((new $Int64(s0.$high + 0, s0.$low + 1048576)), 21); - s1 = (x$117 = carry[0], new $Int64(s1.$high + x$117.$high, s1.$low + x$117.$low)); - s0 = (x$118 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$118.$high, s0.$low - x$118.$low)); - carry[2] = $shiftRightInt64((new $Int64(s2.$high + 0, s2.$low + 1048576)), 21); - s3 = (x$119 = carry[2], new $Int64(s3.$high + x$119.$high, s3.$low + x$119.$low)); - s2 = (x$120 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$120.$high, s2.$low - x$120.$low)); - carry[4] = $shiftRightInt64((new $Int64(s4.$high + 0, s4.$low + 1048576)), 21); - s5 = (x$121 = carry[4], new $Int64(s5.$high + x$121.$high, s5.$low + x$121.$low)); - s4 = (x$122 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$122.$high, s4.$low - x$122.$low)); - carry[6] = $shiftRightInt64((new $Int64(s6.$high + 0, s6.$low + 1048576)), 21); - s7 = (x$123 = carry[6], new $Int64(s7.$high + x$123.$high, s7.$low + x$123.$low)); - s6 = (x$124 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$124.$high, s6.$low - x$124.$low)); - carry[8] = $shiftRightInt64((new $Int64(s8.$high + 0, s8.$low + 1048576)), 21); - s9 = (x$125 = carry[8], new $Int64(s9.$high + x$125.$high, s9.$low + x$125.$low)); - s8 = (x$126 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$126.$high, s8.$low - x$126.$low)); - carry[10] = $shiftRightInt64((new $Int64(s10.$high + 0, s10.$low + 1048576)), 21); - s11 = (x$127 = carry[10], new $Int64(s11.$high + x$127.$high, s11.$low + x$127.$low)); - s10 = (x$128 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$128.$high, s10.$low - x$128.$low)); - carry[1] = $shiftRightInt64((new $Int64(s1.$high + 0, s1.$low + 1048576)), 21); - s2 = (x$129 = carry[1], new $Int64(s2.$high + x$129.$high, s2.$low + x$129.$low)); - s1 = (x$130 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$130.$high, s1.$low - x$130.$low)); - carry[3] = $shiftRightInt64((new $Int64(s3.$high + 0, s3.$low + 1048576)), 21); - s4 = (x$131 = carry[3], new $Int64(s4.$high + x$131.$high, s4.$low + x$131.$low)); - s3 = (x$132 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$132.$high, s3.$low - x$132.$low)); - carry[5] = $shiftRightInt64((new $Int64(s5.$high + 0, s5.$low + 1048576)), 21); - s6 = (x$133 = carry[5], new $Int64(s6.$high + x$133.$high, s6.$low + x$133.$low)); - s5 = (x$134 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$134.$high, s5.$low - x$134.$low)); - carry[7] = $shiftRightInt64((new $Int64(s7.$high + 0, s7.$low + 1048576)), 21); - s8 = (x$135 = carry[7], new $Int64(s8.$high + x$135.$high, s8.$low + x$135.$low)); - s7 = (x$136 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$136.$high, s7.$low - x$136.$low)); - carry[9] = $shiftRightInt64((new $Int64(s9.$high + 0, s9.$low + 1048576)), 21); - s10 = (x$137 = carry[9], new $Int64(s10.$high + x$137.$high, s10.$low + x$137.$low)); - s9 = (x$138 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$138.$high, s9.$low - x$138.$low)); - carry[11] = $shiftRightInt64((new $Int64(s11.$high + 0, s11.$low + 1048576)), 21); - s12 = (x$139 = carry[11], new $Int64(s12.$high + x$139.$high, s12.$low + x$139.$low)); - s11 = (x$140 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$140.$high, s11.$low - x$140.$low)); - s0 = (x$141 = $mul64(s12, new $Int64(0, 666643)), new $Int64(s0.$high + x$141.$high, s0.$low + x$141.$low)); - s1 = (x$142 = $mul64(s12, new $Int64(0, 470296)), new $Int64(s1.$high + x$142.$high, s1.$low + x$142.$low)); - s2 = (x$143 = $mul64(s12, new $Int64(0, 654183)), new $Int64(s2.$high + x$143.$high, s2.$low + x$143.$low)); - s3 = (x$144 = $mul64(s12, new $Int64(0, 997805)), new $Int64(s3.$high - x$144.$high, s3.$low - x$144.$low)); - s4 = (x$145 = $mul64(s12, new $Int64(0, 136657)), new $Int64(s4.$high + x$145.$high, s4.$low + x$145.$low)); - s5 = (x$146 = $mul64(s12, new $Int64(0, 683901)), new $Int64(s5.$high - x$146.$high, s5.$low - x$146.$low)); - s12 = new $Int64(0, 0); - carry[0] = $shiftRightInt64(s0, 21); - s1 = (x$147 = carry[0], new $Int64(s1.$high + x$147.$high, s1.$low + x$147.$low)); - s0 = (x$148 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$148.$high, s0.$low - x$148.$low)); - carry[1] = $shiftRightInt64(s1, 21); - s2 = (x$149 = carry[1], new $Int64(s2.$high + x$149.$high, s2.$low + x$149.$low)); - s1 = (x$150 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$150.$high, s1.$low - x$150.$low)); - carry[2] = $shiftRightInt64(s2, 21); - s3 = (x$151 = carry[2], new $Int64(s3.$high + x$151.$high, s3.$low + x$151.$low)); - s2 = (x$152 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$152.$high, s2.$low - x$152.$low)); - carry[3] = $shiftRightInt64(s3, 21); - s4 = (x$153 = carry[3], new $Int64(s4.$high + x$153.$high, s4.$low + x$153.$low)); - s3 = (x$154 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$154.$high, s3.$low - x$154.$low)); - carry[4] = $shiftRightInt64(s4, 21); - s5 = (x$155 = carry[4], new $Int64(s5.$high + x$155.$high, s5.$low + x$155.$low)); - s4 = (x$156 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$156.$high, s4.$low - x$156.$low)); - carry[5] = $shiftRightInt64(s5, 21); - s6 = (x$157 = carry[5], new $Int64(s6.$high + x$157.$high, s6.$low + x$157.$low)); - s5 = (x$158 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$158.$high, s5.$low - x$158.$low)); - carry[6] = $shiftRightInt64(s6, 21); - s7 = (x$159 = carry[6], new $Int64(s7.$high + x$159.$high, s7.$low + x$159.$low)); - s6 = (x$160 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$160.$high, s6.$low - x$160.$low)); - carry[7] = $shiftRightInt64(s7, 21); - s8 = (x$161 = carry[7], new $Int64(s8.$high + x$161.$high, s8.$low + x$161.$low)); - s7 = (x$162 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$162.$high, s7.$low - x$162.$low)); - carry[8] = $shiftRightInt64(s8, 21); - s9 = (x$163 = carry[8], new $Int64(s9.$high + x$163.$high, s9.$low + x$163.$low)); - s8 = (x$164 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$164.$high, s8.$low - x$164.$low)); - carry[9] = $shiftRightInt64(s9, 21); - s10 = (x$165 = carry[9], new $Int64(s10.$high + x$165.$high, s10.$low + x$165.$low)); - s9 = (x$166 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$166.$high, s9.$low - x$166.$low)); - carry[10] = $shiftRightInt64(s10, 21); - s11 = (x$167 = carry[10], new $Int64(s11.$high + x$167.$high, s11.$low + x$167.$low)); - s10 = (x$168 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$168.$high, s10.$low - x$168.$low)); - carry[11] = $shiftRightInt64(s11, 21); - s12 = (x$169 = carry[11], new $Int64(s12.$high + x$169.$high, s12.$low + x$169.$low)); - s11 = (x$170 = $shiftLeft64(carry[11], 21), new $Int64(s11.$high - x$170.$high, s11.$low - x$170.$low)); - s0 = (x$171 = $mul64(s12, new $Int64(0, 666643)), new $Int64(s0.$high + x$171.$high, s0.$low + x$171.$low)); - s1 = (x$172 = $mul64(s12, new $Int64(0, 470296)), new $Int64(s1.$high + x$172.$high, s1.$low + x$172.$low)); - s2 = (x$173 = $mul64(s12, new $Int64(0, 654183)), new $Int64(s2.$high + x$173.$high, s2.$low + x$173.$low)); - s3 = (x$174 = $mul64(s12, new $Int64(0, 997805)), new $Int64(s3.$high - x$174.$high, s3.$low - x$174.$low)); - s4 = (x$175 = $mul64(s12, new $Int64(0, 136657)), new $Int64(s4.$high + x$175.$high, s4.$low + x$175.$low)); - s5 = (x$176 = $mul64(s12, new $Int64(0, 683901)), new $Int64(s5.$high - x$176.$high, s5.$low - x$176.$low)); - s12 = new $Int64(0, 0); - carry[0] = $shiftRightInt64(s0, 21); - s1 = (x$177 = carry[0], new $Int64(s1.$high + x$177.$high, s1.$low + x$177.$low)); - s0 = (x$178 = $shiftLeft64(carry[0], 21), new $Int64(s0.$high - x$178.$high, s0.$low - x$178.$low)); - carry[1] = $shiftRightInt64(s1, 21); - s2 = (x$179 = carry[1], new $Int64(s2.$high + x$179.$high, s2.$low + x$179.$low)); - s1 = (x$180 = $shiftLeft64(carry[1], 21), new $Int64(s1.$high - x$180.$high, s1.$low - x$180.$low)); - carry[2] = $shiftRightInt64(s2, 21); - s3 = (x$181 = carry[2], new $Int64(s3.$high + x$181.$high, s3.$low + x$181.$low)); - s2 = (x$182 = $shiftLeft64(carry[2], 21), new $Int64(s2.$high - x$182.$high, s2.$low - x$182.$low)); - carry[3] = $shiftRightInt64(s3, 21); - s4 = (x$183 = carry[3], new $Int64(s4.$high + x$183.$high, s4.$low + x$183.$low)); - s3 = (x$184 = $shiftLeft64(carry[3], 21), new $Int64(s3.$high - x$184.$high, s3.$low - x$184.$low)); - carry[4] = $shiftRightInt64(s4, 21); - s5 = (x$185 = carry[4], new $Int64(s5.$high + x$185.$high, s5.$low + x$185.$low)); - s4 = (x$186 = $shiftLeft64(carry[4], 21), new $Int64(s4.$high - x$186.$high, s4.$low - x$186.$low)); - carry[5] = $shiftRightInt64(s5, 21); - s6 = (x$187 = carry[5], new $Int64(s6.$high + x$187.$high, s6.$low + x$187.$low)); - s5 = (x$188 = $shiftLeft64(carry[5], 21), new $Int64(s5.$high - x$188.$high, s5.$low - x$188.$low)); - carry[6] = $shiftRightInt64(s6, 21); - s7 = (x$189 = carry[6], new $Int64(s7.$high + x$189.$high, s7.$low + x$189.$low)); - s6 = (x$190 = $shiftLeft64(carry[6], 21), new $Int64(s6.$high - x$190.$high, s6.$low - x$190.$low)); - carry[7] = $shiftRightInt64(s7, 21); - s8 = (x$191 = carry[7], new $Int64(s8.$high + x$191.$high, s8.$low + x$191.$low)); - s7 = (x$192 = $shiftLeft64(carry[7], 21), new $Int64(s7.$high - x$192.$high, s7.$low - x$192.$low)); - carry[8] = $shiftRightInt64(s8, 21); - s9 = (x$193 = carry[8], new $Int64(s9.$high + x$193.$high, s9.$low + x$193.$low)); - s8 = (x$194 = $shiftLeft64(carry[8], 21), new $Int64(s8.$high - x$194.$high, s8.$low - x$194.$low)); - carry[9] = $shiftRightInt64(s9, 21); - s10 = (x$195 = carry[9], new $Int64(s10.$high + x$195.$high, s10.$low + x$195.$low)); - s9 = (x$196 = $shiftLeft64(carry[9], 21), new $Int64(s9.$high - x$196.$high, s9.$low - x$196.$low)); - carry[10] = $shiftRightInt64(s10, 21); - s11 = (x$197 = carry[10], new $Int64(s11.$high + x$197.$high, s11.$low + x$197.$low)); - s10 = (x$198 = $shiftLeft64(carry[10], 21), new $Int64(s10.$high - x$198.$high, s10.$low - x$198.$low)); - out.nilCheck, out[0] = (($shiftRightInt64(s0, 0).$low << 24 >>> 24)); - out.nilCheck, out[1] = (($shiftRightInt64(s0, 8).$low << 24 >>> 24)); - out.nilCheck, out[2] = (((x$199 = $shiftRightInt64(s0, 16), x$200 = $shiftLeft64(s1, 5), new $Int64(x$199.$high | x$200.$high, (x$199.$low | x$200.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[3] = (($shiftRightInt64(s1, 3).$low << 24 >>> 24)); - out.nilCheck, out[4] = (($shiftRightInt64(s1, 11).$low << 24 >>> 24)); - out.nilCheck, out[5] = (((x$201 = $shiftRightInt64(s1, 19), x$202 = $shiftLeft64(s2, 2), new $Int64(x$201.$high | x$202.$high, (x$201.$low | x$202.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[6] = (($shiftRightInt64(s2, 6).$low << 24 >>> 24)); - out.nilCheck, out[7] = (((x$203 = $shiftRightInt64(s2, 14), x$204 = $shiftLeft64(s3, 7), new $Int64(x$203.$high | x$204.$high, (x$203.$low | x$204.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[8] = (($shiftRightInt64(s3, 1).$low << 24 >>> 24)); - out.nilCheck, out[9] = (($shiftRightInt64(s3, 9).$low << 24 >>> 24)); - out.nilCheck, out[10] = (((x$205 = $shiftRightInt64(s3, 17), x$206 = $shiftLeft64(s4, 4), new $Int64(x$205.$high | x$206.$high, (x$205.$low | x$206.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[11] = (($shiftRightInt64(s4, 4).$low << 24 >>> 24)); - out.nilCheck, out[12] = (($shiftRightInt64(s4, 12).$low << 24 >>> 24)); - out.nilCheck, out[13] = (((x$207 = $shiftRightInt64(s4, 20), x$208 = $shiftLeft64(s5, 1), new $Int64(x$207.$high | x$208.$high, (x$207.$low | x$208.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[14] = (($shiftRightInt64(s5, 7).$low << 24 >>> 24)); - out.nilCheck, out[15] = (((x$209 = $shiftRightInt64(s5, 15), x$210 = $shiftLeft64(s6, 6), new $Int64(x$209.$high | x$210.$high, (x$209.$low | x$210.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[16] = (($shiftRightInt64(s6, 2).$low << 24 >>> 24)); - out.nilCheck, out[17] = (($shiftRightInt64(s6, 10).$low << 24 >>> 24)); - out.nilCheck, out[18] = (((x$211 = $shiftRightInt64(s6, 18), x$212 = $shiftLeft64(s7, 3), new $Int64(x$211.$high | x$212.$high, (x$211.$low | x$212.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[19] = (($shiftRightInt64(s7, 5).$low << 24 >>> 24)); - out.nilCheck, out[20] = (($shiftRightInt64(s7, 13).$low << 24 >>> 24)); - out.nilCheck, out[21] = (($shiftRightInt64(s8, 0).$low << 24 >>> 24)); - out.nilCheck, out[22] = (($shiftRightInt64(s8, 8).$low << 24 >>> 24)); - out.nilCheck, out[23] = (((x$213 = $shiftRightInt64(s8, 16), x$214 = $shiftLeft64(s9, 5), new $Int64(x$213.$high | x$214.$high, (x$213.$low | x$214.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[24] = (($shiftRightInt64(s9, 3).$low << 24 >>> 24)); - out.nilCheck, out[25] = (($shiftRightInt64(s9, 11).$low << 24 >>> 24)); - out.nilCheck, out[26] = (((x$215 = $shiftRightInt64(s9, 19), x$216 = $shiftLeft64(s10, 2), new $Int64(x$215.$high | x$216.$high, (x$215.$low | x$216.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[27] = (($shiftRightInt64(s10, 6).$low << 24 >>> 24)); - out.nilCheck, out[28] = (((x$217 = $shiftRightInt64(s10, 14), x$218 = $shiftLeft64(s11, 7), new $Int64(x$217.$high | x$218.$high, (x$217.$low | x$218.$low) >>> 0)).$low << 24 >>> 24)); - out.nilCheck, out[29] = (($shiftRightInt64(s11, 1).$low << 24 >>> 24)); - out.nilCheck, out[30] = (($shiftRightInt64(s11, 9).$low << 24 >>> 24)); - out.nilCheck, out[31] = (($shiftRightInt64(s11, 17).$low << 24 >>> 24)); - }; - Scalar.ptr.prototype.nonAdjacentForm = function(w) { - var _q, _r, bitBuf, carry, digits, i, indexBit, indexU64, naf, pos, s, w, width, window, windowMask, x, x$1, x$2, x$3, x$4, x$5; - s = this; - if (s.s[31] > 127) { - $panic(new $String("scalar has high bit set illegally")); - } - if (w < 2) { - $panic(new $String("w must be at least 2 by the definition of NAF")); - } else if (w > 8) { - $panic(new $String("NAF digits must fit in int8")); - } - naf = arrayType$6.zero(); - digits = arrayType$11.zero(); - i = 0; - while (true) { - if (!(i < 4)) { break; } - ((i < 0 || i >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i] = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(s.s), ($imul(i, 8))))); - i = i + (1) >> 0; - } - width = ($shiftLeft64(new $Uint64(0, 1), w)); - windowMask = (new $Uint64(width.$high - 0, width.$low - 1)); - pos = 0; - carry = new $Uint64(0, 0); - while (true) { - if (!(pos < 256)) { break; } - indexU64 = (_q = pos / 64, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - indexBit = (_r = pos % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - bitBuf = new $Uint64(0, 0); - if (indexBit < (64 - w >>> 0)) { - bitBuf = $shiftRightUint64(((indexU64 < 0 || indexU64 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[indexU64]), indexBit); - } else { - bitBuf = (x = $shiftRightUint64(((indexU64 < 0 || indexU64 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[indexU64]), indexBit), x$1 = $shiftLeft64((x$2 = 1 + indexU64 >>> 0, ((x$2 < 0 || x$2 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[x$2])), ((64 - indexBit >>> 0))), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - } - window = (x$3 = new $Uint64(bitBuf.$high & windowMask.$high, (bitBuf.$low & windowMask.$low) >>> 0), new $Uint64(carry.$high + x$3.$high, carry.$low + x$3.$low)); - if ((x$4 = new $Uint64(window.$high & 0, (window.$low & 1) >>> 0), (x$4.$high === 0 && x$4.$low === 0))) { - pos = pos + (1) >>> 0; - continue; - } - if ((x$5 = $div64(width, new $Uint64(0, 2), false), (window.$high < x$5.$high || (window.$high === x$5.$high && window.$low < x$5.$low)))) { - carry = new $Uint64(0, 0); - ((pos < 0 || pos >= naf.length) ? ($throwRuntimeError("index out of range"), undefined) : naf[pos] = ((window.$low << 24 >> 24))); - } else { - carry = new $Uint64(0, 1); - ((pos < 0 || pos >= naf.length) ? ($throwRuntimeError("index out of range"), undefined) : naf[pos] = (((window.$low << 24 >> 24)) - ((width.$low << 24 >> 24)) << 24 >> 24)); - } - pos = pos + (w) >>> 0; - } - return naf; - }; - Scalar.prototype.nonAdjacentForm = function(w) { return this.$val.nonAdjacentForm(w); }; - Scalar.ptr.prototype.signedRadix16 = function() { - var _index, carry, digits, i, i$1, s, x, x$1, x$2, x$3; - s = this; - if (s.s[31] > 127) { - $panic(new $String("scalar has high bit set illegally")); - } - digits = arrayType$4.zero(); - i = 0; - while (true) { - if (!(i < 32)) { break; } - (x$1 = $imul(2, i), ((x$1 < 0 || x$1 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[x$1] = (((((x = s.s, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) & 15) >>> 0) << 24 >> 24)))); - (x$3 = ($imul(2, i)) + 1 >> 0, ((x$3 < 0 || x$3 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[x$3] = (((((((x$2 = s.s, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) >>> 4 << 24 >>> 24)) & 15) >>> 0) << 24 >> 24)))); - i = i + (1) >> 0; - } - i$1 = 0; - while (true) { - if (!(i$1 < 63)) { break; } - carry = ((((i$1 < 0 || i$1 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i$1]) + 8 << 24 >> 24)) >> 4 << 24 >> 24; - ((i$1 < 0 || i$1 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i$1] = (((i$1 < 0 || i$1 >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[i$1]) - ((carry << 4 << 24 >> 24)) << 24 >> 24)); - _index = i$1 + 1 >> 0; - ((_index < 0 || _index >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[_index] = (((_index < 0 || _index >= digits.length) ? ($throwRuntimeError("index out of range"), undefined) : digits[_index]) + (carry) << 24 >> 24)); - i$1 = i$1 + (1) >> 0; - } - return digits; - }; - Scalar.prototype.signedRadix16 = function() { return this.$val.signedRadix16(); }; - checkInitialized = function(points) { - var _i, _ref, p, points; - _ref = points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - p = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ($equal(p.x, (new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))), field.Element) && $equal(p.y, (new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))), field.Element)) { - $panic(new $String("edwards25519: use of uninitialized Point")); - } - _i++; - } - }; - projP2.ptr.prototype.Zero = function() { - var v; - v = this; - v.X.Zero(); - v.Y.One(); - v.Z.One(); - return v; - }; - projP2.prototype.Zero = function() { return this.$val.Zero(); }; - NewIdentityPoint = function() { - return new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()).Set(identity); - }; - $pkg.NewIdentityPoint = NewIdentityPoint; - NewGeneratorPoint = function() { - return new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()).Set(generator); - }; - $pkg.NewGeneratorPoint = NewGeneratorPoint; - projCached.ptr.prototype.Zero = function() { - var v; - v = this; - v.YplusX.One(); - v.YminusX.One(); - v.Z.One(); - v.T2d.Zero(); - return v; - }; - projCached.prototype.Zero = function() { return this.$val.Zero(); }; - affineCached.ptr.prototype.Zero = function() { - var v; - v = this; - v.YplusX.One(); - v.YminusX.One(); - v.T2d.Zero(); - return v; - }; - affineCached.prototype.Zero = function() { return this.$val.Zero(); }; - Point.ptr.prototype.Set = function(u) { - var u, v; - v = this; - Point.copy(v, u); - return v; - }; - Point.prototype.Set = function(u) { return this.$val.Set(u); }; - Point.ptr.prototype.Bytes = function() { - var buf, v; - v = this; - buf = arrayType$7.zero(); - return v.bytes(buf); - }; - Point.prototype.Bytes = function() { return this.$val.Bytes(); }; - Point.ptr.prototype.bytes = function(buf) { - var _tmp, _tmp$1, _tmp$2, buf, out, v, x, y, zInv; - v = this; - checkInitialized(new sliceType$1([v])); - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - zInv = $clone(_tmp, field.Element); - x = $clone(_tmp$1, field.Element); - y = $clone(_tmp$2, field.Element); - zInv.Invert(v.z); - x.Multiply(v.x, zInv); - y.Multiply(v.y, zInv); - out = copyFieldElement(buf, y); - (31 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 31] = (((31 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 31]) | ((((x.IsNegative() << 7 >> 0) << 24 >>> 24)))) >>> 0)); - return out; - }; - Point.prototype.bytes = function(buf) { return this.$val.bytes(buf); }; - Point.ptr.prototype.SetBytes = function(x) { - var _tuple$2, u, v, vv, wasSquare, x, xx, xxNeg, y, y2; - v = this; - if (!((x.$length === 32))) { - return [ptrType.nil, errors.New("edwards25519: invalid point encoding length")]; - } - y = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).SetBytes(x); - y2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Square(y); - u = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Subtract(y2, feOne); - vv = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Multiply(y2, d); - vv = vv.Add(vv, feOne); - _tuple$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).SqrtRatio(u, vv); - xx = _tuple$2[0]; - wasSquare = _tuple$2[1]; - if (wasSquare === 0) { - return [ptrType.nil, errors.New("edwards25519: invalid point encoding")]; - } - xxNeg = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Negate(xx); - xx = xx.Select(xxNeg, xx, ((((31 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 31]) >>> 7 << 24 >>> 24) >> 0))); - v.x.Set(xx); - v.y.Set(y); - v.z.One(); - v.t.Multiply(xx, y); - return [v, $ifaceNil]; - }; - Point.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; - copyFieldElement = function(buf, v) { - var buf, v; - $copySlice(new sliceType(buf), v.Bytes()); - return new sliceType(buf); - }; - projP2.ptr.prototype.FromP1xP1 = function(p) { - var p, v; - v = this; - v.X.Multiply(p.X, p.T); - v.Y.Multiply(p.Y, p.Z); - v.Z.Multiply(p.Z, p.T); - return v; - }; - projP2.prototype.FromP1xP1 = function(p) { return this.$val.FromP1xP1(p); }; - projP2.ptr.prototype.FromP3 = function(p) { - var p, v; - v = this; - v.X.Set(p.x); - v.Y.Set(p.y); - v.Z.Set(p.z); - return v; - }; - projP2.prototype.FromP3 = function(p) { return this.$val.FromP3(p); }; - Point.ptr.prototype.fromP1xP1 = function(p) { - var p, v; - v = this; - v.x.Multiply(p.X, p.T); - v.y.Multiply(p.Y, p.Z); - v.z.Multiply(p.Z, p.T); - v.t.Multiply(p.X, p.Y); - return v; - }; - Point.prototype.fromP1xP1 = function(p) { return this.$val.fromP1xP1(p); }; - Point.ptr.prototype.fromP2 = function(p) { - var p, v; - v = this; - v.x.Multiply(p.X, p.Z); - v.y.Multiply(p.Y, p.Z); - v.z.Square(p.Z); - v.t.Multiply(p.X, p.Y); - return v; - }; - Point.prototype.fromP2 = function(p) { return this.$val.fromP2(p); }; - projCached.ptr.prototype.FromP3 = function(p) { - var p, v; - v = this; - v.YplusX.Add(p.y, p.x); - v.YminusX.Subtract(p.y, p.x); - v.Z.Set(p.z); - v.T2d.Multiply(p.t, d2); - return v; - }; - projCached.prototype.FromP3 = function(p) { return this.$val.FromP3(p); }; - affineCached.ptr.prototype.FromP3 = function(p) { - var invZ, p, v; - v = this; - v.YplusX.Add(p.y, p.x); - v.YminusX.Subtract(p.y, p.x); - v.T2d.Multiply(p.t, d2); - invZ = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - invZ.Invert(p.z); - v.YplusX.Multiply(v.YplusX, invZ); - v.YminusX.Multiply(v.YminusX, invZ); - v.T2d.Multiply(v.T2d, invZ); - return v; - }; - affineCached.prototype.FromP3 = function(p) { return this.$val.FromP3(p); }; - Point.ptr.prototype.Add = function(p, q) { - var p, q, qCached, result, v; - v = this; - checkInitialized(new sliceType$1([p, q])); - qCached = new projCached.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))).FromP3(q); - result = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))).Add(p, qCached); - return v.fromP1xP1(result); - }; - Point.prototype.Add = function(p, q) { return this.$val.Add(p, q); }; - Point.ptr.prototype.Subtract = function(p, q) { - var p, q, qCached, result, v; - v = this; - checkInitialized(new sliceType$1([p, q])); - qCached = new projCached.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))).FromP3(q); - result = new projP1xP1.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0))).Sub(p, qCached); - return v.fromP1xP1(result); - }; - Point.prototype.Subtract = function(p, q) { return this.$val.Subtract(p, q); }; - projP1xP1.ptr.prototype.Add = function(p, q) { - var MM, PP, TT2d, YminusX, YplusX, ZZ2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, p, q, v; - v = this; - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - YplusX = $clone(_tmp, field.Element); - YminusX = $clone(_tmp$1, field.Element); - PP = $clone(_tmp$2, field.Element); - MM = $clone(_tmp$3, field.Element); - TT2d = $clone(_tmp$4, field.Element); - ZZ2 = $clone(_tmp$5, field.Element); - YplusX.Add(p.y, p.x); - YminusX.Subtract(p.y, p.x); - PP.Multiply(YplusX, q.YplusX); - MM.Multiply(YminusX, q.YminusX); - TT2d.Multiply(p.t, q.T2d); - ZZ2.Multiply(p.z, q.Z); - ZZ2.Add(ZZ2, ZZ2); - v.X.Subtract(PP, MM); - v.Y.Add(PP, MM); - v.Z.Add(ZZ2, TT2d); - v.T.Subtract(ZZ2, TT2d); - return v; - }; - projP1xP1.prototype.Add = function(p, q) { return this.$val.Add(p, q); }; - projP1xP1.ptr.prototype.Sub = function(p, q) { - var MM, PP, TT2d, YminusX, YplusX, ZZ2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, p, q, v; - v = this; - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - YplusX = $clone(_tmp, field.Element); - YminusX = $clone(_tmp$1, field.Element); - PP = $clone(_tmp$2, field.Element); - MM = $clone(_tmp$3, field.Element); - TT2d = $clone(_tmp$4, field.Element); - ZZ2 = $clone(_tmp$5, field.Element); - YplusX.Add(p.y, p.x); - YminusX.Subtract(p.y, p.x); - PP.Multiply(YplusX, q.YminusX); - MM.Multiply(YminusX, q.YplusX); - TT2d.Multiply(p.t, q.T2d); - ZZ2.Multiply(p.z, q.Z); - ZZ2.Add(ZZ2, ZZ2); - v.X.Subtract(PP, MM); - v.Y.Add(PP, MM); - v.Z.Subtract(ZZ2, TT2d); - v.T.Add(ZZ2, TT2d); - return v; - }; - projP1xP1.prototype.Sub = function(p, q) { return this.$val.Sub(p, q); }; - projP1xP1.ptr.prototype.AddAffine = function(p, q) { - var MM, PP, TT2d, YminusX, YplusX, Z2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, p, q, v; - v = this; - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - YplusX = $clone(_tmp, field.Element); - YminusX = $clone(_tmp$1, field.Element); - PP = $clone(_tmp$2, field.Element); - MM = $clone(_tmp$3, field.Element); - TT2d = $clone(_tmp$4, field.Element); - Z2 = $clone(_tmp$5, field.Element); - YplusX.Add(p.y, p.x); - YminusX.Subtract(p.y, p.x); - PP.Multiply(YplusX, q.YplusX); - MM.Multiply(YminusX, q.YminusX); - TT2d.Multiply(p.t, q.T2d); - Z2.Add(p.z, p.z); - v.X.Subtract(PP, MM); - v.Y.Add(PP, MM); - v.Z.Add(Z2, TT2d); - v.T.Subtract(Z2, TT2d); - return v; - }; - projP1xP1.prototype.AddAffine = function(p, q) { return this.$val.AddAffine(p, q); }; - projP1xP1.ptr.prototype.SubAffine = function(p, q) { - var MM, PP, TT2d, YminusX, YplusX, Z2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, p, q, v; - v = this; - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - YplusX = $clone(_tmp, field.Element); - YminusX = $clone(_tmp$1, field.Element); - PP = $clone(_tmp$2, field.Element); - MM = $clone(_tmp$3, field.Element); - TT2d = $clone(_tmp$4, field.Element); - Z2 = $clone(_tmp$5, field.Element); - YplusX.Add(p.y, p.x); - YminusX.Subtract(p.y, p.x); - PP.Multiply(YplusX, q.YminusX); - MM.Multiply(YminusX, q.YplusX); - TT2d.Multiply(p.t, q.T2d); - Z2.Add(p.z, p.z); - v.X.Subtract(PP, MM); - v.Y.Add(PP, MM); - v.Z.Subtract(Z2, TT2d); - v.T.Add(Z2, TT2d); - return v; - }; - projP1xP1.prototype.SubAffine = function(p, q) { return this.$val.SubAffine(p, q); }; - projP1xP1.ptr.prototype.Double = function(p) { - var XX, XplusYsq, YY, ZZ2, _tmp, _tmp$1, _tmp$2, _tmp$3, p, v; - v = this; - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - XX = $clone(_tmp, field.Element); - YY = $clone(_tmp$1, field.Element); - ZZ2 = $clone(_tmp$2, field.Element); - XplusYsq = $clone(_tmp$3, field.Element); - XX.Square(p.X); - YY.Square(p.Y); - ZZ2.Square(p.Z); - ZZ2.Add(ZZ2, ZZ2); - XplusYsq.Add(p.X, p.Y); - XplusYsq.Square(XplusYsq); - v.Y.Add(YY, XX); - v.Z.Subtract(YY, XX); - v.X.Subtract(XplusYsq, v.Y); - v.T.Subtract(ZZ2, v.Z); - return v; - }; - projP1xP1.prototype.Double = function(p) { return this.$val.Double(p); }; - Point.ptr.prototype.Negate = function(p) { - var p, v; - v = this; - checkInitialized(new sliceType$1([p])); - v.x.Negate(p.x); - v.y.Set(p.y); - v.z.Set(p.z); - v.t.Negate(p.t); - return v; - }; - Point.prototype.Negate = function(p) { return this.$val.Negate(p); }; - Point.ptr.prototype.Equal = function(u) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, t1, t2, t3, t4, u, v; - v = this; - checkInitialized(new sliceType$1([v, u])); - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - t1 = $clone(_tmp, field.Element); - t2 = $clone(_tmp$1, field.Element); - t3 = $clone(_tmp$2, field.Element); - t4 = $clone(_tmp$3, field.Element); - t1.Multiply(v.x, u.z); - t2.Multiply(u.x, v.z); - t3.Multiply(v.y, u.z); - t4.Multiply(u.y, v.z); - return t1.Equal(t2) & t3.Equal(t4); - }; - Point.prototype.Equal = function(u) { return this.$val.Equal(u); }; - projCached.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, v; - v = this; - v.YplusX.Select(a.YplusX, b.YplusX, cond); - v.YminusX.Select(a.YminusX, b.YminusX, cond); - v.Z.Select(a.Z, b.Z, cond); - v.T2d.Select(a.T2d, b.T2d, cond); - return v; - }; - projCached.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - affineCached.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, v; - v = this; - v.YplusX.Select(a.YplusX, b.YplusX, cond); - v.YminusX.Select(a.YminusX, b.YminusX, cond); - v.T2d.Select(a.T2d, b.T2d, cond); - return v; - }; - affineCached.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - projCached.ptr.prototype.CondNeg = function(cond) { - var cond, v; - v = this; - v.YplusX.Swap(v.YminusX, cond); - v.T2d.Select(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Negate(v.T2d), v.T2d, cond); - return v; - }; - projCached.prototype.CondNeg = function(cond) { return this.$val.CondNeg(cond); }; - affineCached.ptr.prototype.CondNeg = function(cond) { - var cond, v; - v = this; - v.YplusX.Swap(v.YminusX, cond); - v.T2d.Select(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Negate(v.T2d), v.T2d, cond); - return v; - }; - affineCached.prototype.CondNeg = function(cond) { return this.$val.CondNeg(cond); }; - ptrType$3.methods = [{prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "SelectInto", name: "SelectInto", pkg: "", typ: $funcType([ptrType$2, $Int8], [], false)}]; - ptrType$5.methods = [{prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "SelectInto", name: "SelectInto", pkg: "", typ: $funcType([ptrType$4, $Int8], [], false)}]; - ptrType$6.methods = [{prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "SelectInto", name: "SelectInto", pkg: "", typ: $funcType([ptrType$2, $Int8], [], false)}]; - ptrType$7.methods = [{prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [], false)}, {prop: "SelectInto", name: "SelectInto", pkg: "", typ: $funcType([ptrType$4, $Int8], [], false)}]; - ptrType$1.methods = [{prop: "MultiplyAdd", name: "MultiplyAdd", pkg: "", typ: $funcType([ptrType$1, ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Subtract", name: "Subtract", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Negate", name: "Negate", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "Multiply", name: "Multiply", pkg: "", typ: $funcType([ptrType$1, ptrType$1], [ptrType$1], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType$1], [ptrType$1], false)}, {prop: "SetUniformBytes", name: "SetUniformBytes", pkg: "", typ: $funcType([sliceType], [ptrType$1], false)}, {prop: "SetCanonicalBytes", name: "SetCanonicalBytes", pkg: "", typ: $funcType([sliceType], [ptrType$1, $error], false)}, {prop: "SetBytesWithClamping", name: "SetBytesWithClamping", pkg: "", typ: $funcType([sliceType], [ptrType$1], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType$1], [$Int], false)}, {prop: "nonAdjacentForm", name: "nonAdjacentForm", pkg: "crypto/ed25519/internal/edwards25519", typ: $funcType([$Uint], [arrayType$6], false)}, {prop: "signedRadix16", name: "signedRadix16", pkg: "crypto/ed25519/internal/edwards25519", typ: $funcType([], [arrayType$4], false)}]; - ptrType$8.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType, ptrType$2], [ptrType$8], false)}, {prop: "Sub", name: "Sub", pkg: "", typ: $funcType([ptrType, ptrType$2], [ptrType$8], false)}, {prop: "AddAffine", name: "AddAffine", pkg: "", typ: $funcType([ptrType, ptrType$4], [ptrType$8], false)}, {prop: "SubAffine", name: "SubAffine", pkg: "", typ: $funcType([ptrType, ptrType$4], [ptrType$8], false)}, {prop: "Double", name: "Double", pkg: "", typ: $funcType([ptrType$9], [ptrType$8], false)}]; - ptrType$9.methods = [{prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [ptrType$9], false)}, {prop: "FromP1xP1", name: "FromP1xP1", pkg: "", typ: $funcType([ptrType$8], [ptrType$9], false)}, {prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [ptrType$9], false)}]; - ptrType.methods = [{prop: "ScalarBaseMult", name: "ScalarBaseMult", pkg: "", typ: $funcType([ptrType$1], [ptrType], false)}, {prop: "ScalarMult", name: "ScalarMult", pkg: "", typ: $funcType([ptrType$1, ptrType], [ptrType], false)}, {prop: "VarTimeDoubleScalarBaseMult", name: "VarTimeDoubleScalarBaseMult", pkg: "", typ: $funcType([ptrType$1, ptrType, ptrType$1], [ptrType], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "crypto/ed25519/internal/edwards25519", typ: $funcType([ptrType$10], [sliceType], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType, $error], false)}, {prop: "fromP1xP1", name: "fromP1xP1", pkg: "crypto/ed25519/internal/edwards25519", typ: $funcType([ptrType$8], [ptrType], false)}, {prop: "fromP2", name: "fromP2", pkg: "crypto/ed25519/internal/edwards25519", typ: $funcType([ptrType$9], [ptrType], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Subtract", name: "Subtract", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Negate", name: "Negate", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType], [$Int], false)}]; - ptrType$2.methods = [{prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [ptrType$2], false)}, {prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [ptrType$2], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$2, ptrType$2, $Int], [ptrType$2], false)}, {prop: "CondNeg", name: "CondNeg", pkg: "", typ: $funcType([$Int], [ptrType$2], false)}]; - ptrType$4.methods = [{prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "FromP3", name: "FromP3", pkg: "", typ: $funcType([ptrType], [ptrType$4], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType$4, ptrType$4, $Int], [ptrType$4], false)}, {prop: "CondNeg", name: "CondNeg", pkg: "", typ: $funcType([$Int], [ptrType$4], false)}]; - projLookupTable.init("crypto/ed25519/internal/edwards25519", [{prop: "points", name: "points", embedded: false, exported: false, typ: arrayType$5, tag: ""}]); - affineLookupTable.init("crypto/ed25519/internal/edwards25519", [{prop: "points", name: "points", embedded: false, exported: false, typ: arrayType, tag: ""}]); - nafLookupTable5.init("crypto/ed25519/internal/edwards25519", [{prop: "points", name: "points", embedded: false, exported: false, typ: arrayType$5, tag: ""}]); - nafLookupTable8.init("crypto/ed25519/internal/edwards25519", [{prop: "points", name: "points", embedded: false, exported: false, typ: arrayType$2, tag: ""}]); - Scalar.init("crypto/ed25519/internal/edwards25519", [{prop: "s", name: "s", embedded: false, exported: false, typ: arrayType$7, tag: ""}]); - projP1xP1.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "Z", name: "Z", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "T", name: "T", embedded: false, exported: true, typ: field.Element, tag: ""}]); - projP2.init("", [{prop: "X", name: "X", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "Z", name: "Z", embedded: false, exported: true, typ: field.Element, tag: ""}]); - Point.init("crypto/ed25519/internal/edwards25519", [{prop: "x", name: "x", embedded: false, exported: false, typ: field.Element, tag: ""}, {prop: "y", name: "y", embedded: false, exported: false, typ: field.Element, tag: ""}, {prop: "z", name: "z", embedded: false, exported: false, typ: field.Element, tag: ""}, {prop: "t", name: "t", embedded: false, exported: false, typ: field.Element, tag: ""}, {prop: "_$4", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}]); - incomparable.init(funcType, 0); - projCached.init("", [{prop: "YplusX", name: "YplusX", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "YminusX", name: "YminusX", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "Z", name: "Z", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "T2d", name: "T2d", embedded: false, exported: true, typ: field.Element, tag: ""}]); - affineCached.init("", [{prop: "YplusX", name: "YplusX", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "YminusX", name: "YminusX", embedded: false, exported: true, typ: field.Element, tag: ""}, {prop: "T2d", name: "T2d", embedded: false, exported: true, typ: field.Element, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = field.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - basepointTablePrecomp = new structType.ptr(arrayType$1.zero(), new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0))); - basepointNafTablePrecomp = new structType$1.ptr(new nafLookupTable8.ptr(arrayType$2.zero()), new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0))); - scZero = new Scalar.ptr($toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])); - scOne = new Scalar.ptr($toNativeArray($kindUint8, [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])); - scMinusOne = new Scalar.ptr($toNativeArray($kindUint8, [236, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16])); - feOne = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).One(); - d = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).SetBytes(new sliceType([163, 120, 89, 19, 202, 77, 235, 117, 171, 216, 65, 65, 77, 10, 112, 0, 152, 232, 121, 119, 121, 64, 199, 140, 115, 254, 111, 43, 238, 108, 3, 82])); - _tuple = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()).SetBytes(new sliceType([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])); - identity = _tuple[0]; - _tuple$1 = new Point.ptr(new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$3.zero()).SetBytes(new sliceType([88, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102])); - generator = _tuple$1[0]; - d2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Add(d, d); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/ed25519"] = (function() { - var $pkg = {}, $init, bytes, crypto, edwards25519, rand, sha512, errors, io, strconv, PublicKey, PrivateKey, sliceType, arrayType, funcType, arrayType$1, NewKeyFromSeed, newKeyFromSeed, Sign, sign, Verify; - bytes = $packages["bytes"]; - crypto = $packages["crypto"]; - edwards25519 = $packages["crypto/ed25519/internal/edwards25519"]; - rand = $packages["crypto/rand"]; - sha512 = $packages["crypto/sha512"]; - errors = $packages["errors"]; - io = $packages["io"]; - strconv = $packages["strconv"]; - PublicKey = $pkg.PublicKey = $newType(12, $kindSlice, "ed25519.PublicKey", true, "crypto/ed25519", true, null); - PrivateKey = $pkg.PrivateKey = $newType(12, $kindSlice, "ed25519.PrivateKey", true, "crypto/ed25519", true, null); - sliceType = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 64); - funcType = $funcType([], [], false); - arrayType$1 = $arrayType(funcType, 0); - PublicKey.prototype.Equal = function(x) { - var _tuple, ok, pub, x, xx; - pub = this; - _tuple = $assertType(x, PublicKey, true); - xx = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return false; - } - return bytes.Equal($convertSliceType(pub, sliceType), $convertSliceType(xx, sliceType)); - }; - $ptrType(PublicKey).prototype.Equal = function(x) { return this.$get().Equal(x); }; - PrivateKey.prototype.Public = function() { - var priv, publicKey; - priv = this; - publicKey = $makeSlice(sliceType, 32); - $copySlice(publicKey, $subslice(priv, 32)); - return ($convertSliceType(publicKey, PublicKey)); - }; - $ptrType(PrivateKey).prototype.Public = function() { return this.$get().Public(); }; - PrivateKey.prototype.Equal = function(x) { - var _tuple, ok, priv, x, xx; - priv = this; - _tuple = $assertType(x, PrivateKey, true); - xx = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return false; - } - return bytes.Equal($convertSliceType(priv, sliceType), $convertSliceType(xx, sliceType)); - }; - $ptrType(PrivateKey).prototype.Equal = function(x) { return this.$get().Equal(x); }; - PrivateKey.prototype.Seed = function() { - var priv, seed; - priv = this; - seed = $makeSlice(sliceType, 32); - $copySlice(seed, $subslice(priv, 0, 32)); - return seed; - }; - $ptrType(PrivateKey).prototype.Seed = function() { return this.$get().Seed(); }; - PrivateKey.prototype.Sign = function(rand$1, message, opts) { - var {$24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, err, message, opts, priv, rand$1, signature, $s, $r, $c} = $restore(this, {rand$1, message, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - signature = sliceType.nil; - err = $ifaceNil; - priv = this; - _r = opts.HashFunc(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!((_r === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((_r === 0))) { */ case 1: - _tmp = sliceType.nil; - _tmp$1 = errors.New("ed25519: cannot sign hashed message"); - signature = _tmp; - err = _tmp$1; - $s = -1; return [signature, err]; - /* } */ case 2: - _r$1 = Sign(priv, message); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$2 = _r$1; - _tmp$3 = $ifaceNil; - signature = _tmp$2; - err = _tmp$3; - $24r = [signature, err]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: PrivateKey.prototype.Sign, $c: true, $r, $24r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, err, message, opts, priv, rand$1, signature, $s};return $f; - }; - $ptrType(PrivateKey).prototype.Sign = function(rand$1, message, opts) { return this.$get().Sign(rand$1, message, opts); }; - NewKeyFromSeed = function(seed) { - var {privateKey, seed, $s, $r, $c} = $restore(this, {seed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - privateKey = $makeSlice(sliceType, 64); - $r = newKeyFromSeed(privateKey, seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $convertSliceType(privateKey, PrivateKey); - /* */ } return; } var $f = {$blk: NewKeyFromSeed, $c: true, $r, privateKey, seed, $s};return $f; - }; - $pkg.NewKeyFromSeed = NewKeyFromSeed; - newKeyFromSeed = function(privateKey, seed) { - var {A, _r, h, l, privateKey, publicKey, s, seed, $s, $r, $c} = $restore(this, {privateKey, seed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = seed.$length; - if (!((l === 32))) { - $panic(new $String("ed25519: bad seed length: " + strconv.Itoa(l))); - } - h = $clone(sha512.Sum512(seed), arrayType); - s = edwards25519.NewScalar().SetBytesWithClamping($subslice(new sliceType(h), 0, 32)); - _r = (new edwards25519.Point.ptr(new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$1.zero())).ScalarBaseMult(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - A = _r; - publicKey = A.Bytes(); - $copySlice(privateKey, seed); - $copySlice($subslice(privateKey, 32), publicKey); - $s = -1; return; - /* */ } return; } var $f = {$blk: newKeyFromSeed, $c: true, $r, A, _r, h, l, privateKey, publicKey, s, seed, $s};return $f; - }; - Sign = function(privateKey, message) { - var {message, privateKey, signature, $s, $r, $c} = $restore(this, {privateKey, message}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - signature = $makeSlice(sliceType, 64); - $r = sign(signature, $convertSliceType(privateKey, sliceType), message); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return signature; - /* */ } return; } var $f = {$blk: Sign, $c: true, $r, message, privateKey, signature, $s};return $f; - }; - $pkg.Sign = Sign; - sign = function(signature, privateKey, message) { - var {R, S, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, h, hramDigest, k, kh, l, message, messageDigest, mh, prefix, privateKey, publicKey, r, s, seed, signature, $s, $r, $c} = $restore(this, {signature, privateKey, message}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = privateKey.$length; - if (!((l === 64))) { - $panic(new $String("ed25519: bad private key length: " + strconv.Itoa(l))); - } - _tmp = $subslice(privateKey, 0, 32); - _tmp$1 = $subslice(privateKey, 32); - seed = _tmp; - publicKey = _tmp$1; - h = $clone(sha512.Sum512(seed), arrayType); - s = edwards25519.NewScalar().SetBytesWithClamping($subslice(new sliceType(h), 0, 32)); - prefix = $subslice(new sliceType(h), 32); - mh = sha512.New(); - _r = mh.Write(prefix); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _r$1 = mh.Write(message); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - messageDigest = $makeSlice(sliceType, 0, 64); - _r$2 = mh.Sum(messageDigest); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - messageDigest = _r$2; - r = edwards25519.NewScalar().SetUniformBytes(messageDigest); - _r$3 = (new edwards25519.Point.ptr(new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$1.zero())).ScalarBaseMult(r); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - R = _r$3; - kh = sha512.New(); - _r$4 = kh.Write(R.Bytes()); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = kh.Write(publicKey); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = kh.Write(message); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - hramDigest = $makeSlice(sliceType, 0, 64); - _r$7 = kh.Sum(hramDigest); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - hramDigest = _r$7; - k = edwards25519.NewScalar().SetUniformBytes(hramDigest); - S = edwards25519.NewScalar().MultiplyAdd(k, s, r); - $copySlice($subslice(signature, 0, 32), R.Bytes()); - $copySlice($subslice(signature, 32), S.Bytes()); - $s = -1; return; - /* */ } return; } var $f = {$blk: sign, $c: true, $r, R, S, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, h, hramDigest, k, kh, l, message, messageDigest, mh, prefix, privateKey, publicKey, r, s, seed, signature, $s};return $f; - }; - Verify = function(publicKey, message, sig) { - var {A, R, S, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, err, hramDigest, k, kh, l, message, minusA, publicKey, sig, $s, $r, $c} = $restore(this, {publicKey, message, sig}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = publicKey.$length; - if (!((l === 32))) { - $panic(new $String("ed25519: bad public key length: " + strconv.Itoa(l))); - } - if (!((sig.$length === 64)) || !(((((63 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 63]) & 224) >>> 0) === 0))) { - $s = -1; return false; - } - _tuple = (new edwards25519.Point.ptr(new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$1.zero())).SetBytes($convertSliceType(publicKey, sliceType)); - A = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - kh = sha512.New(); - _r = kh.Write($subslice(sig, 0, 32)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _r$1 = kh.Write($convertSliceType(publicKey, sliceType)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = kh.Write(message); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - hramDigest = $makeSlice(sliceType, 0, 64); - _r$3 = kh.Sum(hramDigest); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - hramDigest = _r$3; - k = edwards25519.NewScalar().SetUniformBytes(hramDigest); - _tuple$1 = edwards25519.NewScalar().SetCanonicalBytes($subslice(sig, 32)); - S = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - minusA = (new edwards25519.Point.ptr(new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$1.zero())).Negate(A); - _r$4 = (new edwards25519.Point.ptr(new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), new $packages["crypto/ed25519/internal/edwards25519/field"].Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)), arrayType$1.zero())).VarTimeDoubleScalarBaseMult(k, minusA, S); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - R = _r$4; - $s = -1; return bytes.Equal($subslice(sig, 0, 32), R.Bytes()); - /* */ } return; } var $f = {$blk: Verify, $c: true, $r, A, R, S, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, err, hramDigest, k, kh, l, message, minusA, publicKey, sig, $s};return $f; - }; - $pkg.Verify = Verify; - PublicKey.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([crypto.PublicKey], [$Bool], false)}]; - PrivateKey.methods = [{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [crypto.PublicKey], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([crypto.PrivateKey], [$Bool], false)}, {prop: "Seed", name: "Seed", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.SignerOpts], [sliceType, $error], false)}]; - PublicKey.init($Uint8); - PrivateKey.init($Uint8); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = crypto.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = edwards25519.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha512.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/hmac"] = (function() { - var $pkg = {}, $init, subtle, hash, marshalable, hmac, sliceType, ptrType, New, Equal; - subtle = $packages["crypto/subtle"]; - hash = $packages["hash"]; - marshalable = $pkg.marshalable = $newType(8, $kindInterface, "hmac.marshalable", true, "crypto/hmac", false, null); - hmac = $pkg.hmac = $newType(0, $kindStruct, "hmac.hmac", true, "crypto/hmac", false, function(opad_, ipad_, outer_, inner_, marshaled_) { - this.$val = this; - if (arguments.length === 0) { - this.opad = sliceType.nil; - this.ipad = sliceType.nil; - this.outer = $ifaceNil; - this.inner = $ifaceNil; - this.marshaled = false; - return; - } - this.opad = opad_; - this.ipad = ipad_; - this.outer = outer_; - this.inner = inner_; - this.marshaled = marshaled_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(hmac); - hmac.ptr.prototype.Sum = function(in$1) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, err, h, in$1, origLen, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - origLen = in$1.$length; - _r = h.inner.Sum(in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - in$1 = _r; - /* */ if (h.marshaled) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (h.marshaled) { */ case 2: - _r$1 = $assertType(h.outer, marshalable).UnmarshalBinary(h.opad); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - $s = 4; continue; - /* } else { */ case 3: - $r = h.outer.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = h.outer.Write(h.opad); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 4: - _r$3 = h.outer.Write($subslice(in$1, origLen)); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = h.outer.Sum($subslice(in$1, 0, origLen)); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: hmac.ptr.prototype.Sum, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, err, h, in$1, origLen, $s};return $f; - }; - hmac.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; - hmac.ptr.prototype.Write = function(p) { - var {$24r, _r, _tuple, err, h, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - h = this; - _r = h.inner.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: hmac.ptr.prototype.Write, $c: true, $r, $24r, _r, _tuple, err, h, n, p, $s};return $f; - }; - hmac.prototype.Write = function(p) { return this.$val.Write(p); }; - hmac.ptr.prototype.Size = function() { - var {$24r, _r, h, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - _r = h.outer.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: hmac.ptr.prototype.Size, $c: true, $r, $24r, _r, h, $s};return $f; - }; - hmac.prototype.Size = function() { return this.$val.Size(); }; - hmac.ptr.prototype.BlockSize = function() { - var {$24r, _r, h, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - _r = h.inner.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: hmac.ptr.prototype.BlockSize, $c: true, $r, $24r, _r, h, $s};return $f; - }; - hmac.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - hmac.ptr.prototype.Reset = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, h, imarshal, innerOK, marshalableInner, marshalableOuter, omarshal, outerOK, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - /* */ if (h.marshaled) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (h.marshaled) { */ case 1: - _r = $assertType(h.inner, marshalable).UnmarshalBinary(h.ipad); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - $s = -1; return; - /* } */ case 2: - $r = h.inner.Reset(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = h.inner.Write(h.ipad); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _tuple = $assertType(h.inner, marshalable, true); - marshalableInner = _tuple[0]; - innerOK = _tuple[1]; - if (!innerOK) { - $s = -1; return; - } - _tuple$1 = $assertType(h.outer, marshalable, true); - marshalableOuter = _tuple$1[0]; - outerOK = _tuple$1[1]; - if (!outerOK) { - $s = -1; return; - } - _r$2 = marshalableInner.MarshalBinary(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - imarshal = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return; - } - $r = h.outer.Reset(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = h.outer.Write(h.opad); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = marshalableOuter.MarshalBinary(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - omarshal = _tuple$3[0]; - err$1 = _tuple$3[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return; - } - h.ipad = imarshal; - h.opad = omarshal; - h.marshaled = true; - $s = -1; return; - /* */ } return; } var $f = {$blk: hmac.ptr.prototype.Reset, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, h, imarshal, innerOK, marshalableInner, marshalableOuter, omarshal, outerOK, $s};return $f; - }; - hmac.prototype.Reset = function() { return this.$val.Reset(); }; - New = function(h, key) { - var {_i, _i$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, blocksize, h, hm, i, i$1, key, unique, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {h, key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hm = [hm]; - unique = [unique]; - hm[0] = new hmac.ptr(sliceType.nil, sliceType.nil, $ifaceNil, $ifaceNil, false); - _r = h(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - hm[0].outer = _r; - _r$1 = h(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - hm[0].inner = _r$1; - unique[0] = true; - $r = (function(hm, unique) { return function() { - var $deferred; - /* */ var $err = null; try { $deferred = []; $curGoroutine.deferStack.push($deferred); - $deferred.push([(function(hm, unique) { return function() { - $unused($recover()); - }; })(hm, unique), []]); - if ($interfaceIsEqual(hm[0].outer, hm[0].inner)) { - unique[0] = false; - } - /* */ } catch(err) { $err = err; } finally { $callDeferred($deferred, $err); } - }; })(hm, unique)(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!unique[0]) { - $panic(new $String("crypto/hmac: hash generation function does not produce unique values")); - } - _r$2 = hm[0].inner.BlockSize(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - blocksize = _r$2; - hm[0].ipad = $makeSlice(sliceType, blocksize); - hm[0].opad = $makeSlice(sliceType, blocksize); - /* */ if (key.$length > blocksize) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (key.$length > blocksize) { */ case 5: - _r$3 = hm[0].outer.Write(key); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = hm[0].outer.Sum(sliceType.nil); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - key = _r$4; - /* } */ case 6: - $copySlice(hm[0].ipad, key); - $copySlice(hm[0].opad, key); - _ref = hm[0].ipad; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - (x$1 = hm[0].ipad, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i] = (((x = hm[0].ipad, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])) ^ (54)) << 24 >>> 24))); - _i++; - } - _ref$1 = hm[0].opad; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - (x$3 = hm[0].opad, ((i$1 < 0 || i$1 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$1] = (((x$2 = hm[0].opad, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1])) ^ (92)) << 24 >>> 24))); - _i$1++; - } - _r$5 = hm[0].inner.Write(hm[0].ipad); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return hm[0]; - /* */ } return; } var $f = {$blk: New, $c: true, $r, _i, _i$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, blocksize, h, hm, i, i$1, key, unique, x, x$1, x$2, x$3, $s};return $f; - }; - $pkg.New = New; - Equal = function(mac1, mac2) { - var mac1, mac2; - return subtle.ConstantTimeCompare(mac1, mac2) === 1; - }; - $pkg.Equal = Equal; - ptrType.methods = [{prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}]; - marshalable.init([{prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}]); - hmac.init("crypto/hmac", [{prop: "opad", name: "opad", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "ipad", name: "ipad", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "outer", name: "outer", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "inner", name: "inner", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "marshaled", name: "marshaled", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/md5"] = (function() { - var $pkg = {}, $init, crypto, binary, errors, hash, bits, digest, sliceType, arrayType, arrayType$1, arrayType$2, arrayType$3, arrayType$4, ptrType, block, blockGeneric, init, appendUint64, appendUint32, consumeUint64, consumeUint32, New; - crypto = $packages["crypto"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - hash = $packages["hash"]; - bits = $packages["math/bits"]; - digest = $pkg.digest = $newType(0, $kindStruct, "md5.digest", true, "crypto/md5", false, function(s_, x_, nx_, len_) { - this.$val = this; - if (arguments.length === 0) { - this.s = arrayType$2.zero(); - this.x = arrayType$3.zero(); - this.nx = 0; - this.len = new $Uint64(0, 0); - return; - } - this.s = s_; - this.x = x_; - this.nx = nx_; - this.len = len_; - }); - sliceType = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 8); - arrayType$1 = $arrayType($Uint8, 4); - arrayType$2 = $arrayType($Uint32, 4); - arrayType$3 = $arrayType($Uint8, 64); - arrayType$4 = $arrayType($Uint8, 16); - ptrType = $ptrType(digest); - block = function(dig, p) { - var dig, p; - blockGeneric(dig, p); - }; - blockGeneric = function(dig, p) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, aa, b, bb, c, cc, d, dd, dig, i, p, q, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, xa, xb, xc, xd, xe, xf; - _tmp = dig.s[0]; - _tmp$1 = dig.s[1]; - _tmp$2 = dig.s[2]; - _tmp$3 = dig.s[3]; - a = _tmp; - b = _tmp$1; - c = _tmp$2; - d = _tmp$3; - i = 0; - while (true) { - if (!(i <= (p.$length - 64 >> 0))) { break; } - q = $subslice(p, i); - q = $subslice(q, 0, 64, 64); - _tmp$4 = a; - _tmp$5 = b; - _tmp$6 = c; - _tmp$7 = d; - aa = _tmp$4; - bb = _tmp$5; - cc = _tmp$6; - dd = _tmp$7; - x0 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 0)); - x1 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 4)); - x2 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 8)); - x3 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 12)); - x4 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 16)); - x5 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 20)); - x6 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 24)); - x7 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 28)); - x8 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 32)); - x9 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 36)); - xa = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 40)); - xb = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 44)); - xc = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 48)); - xd = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 52)); - xe = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 56)); - xf = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(q, 60)); - a = b + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + a >>> 0) + x0 >>> 0) + 3614090360 >>> 0, 7) >>> 0; - d = a + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + d >>> 0) + x1 >>> 0) + 3905402710 >>> 0, 12) >>> 0; - c = d + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + c >>> 0) + x2 >>> 0) + 606105819 >>> 0, 17) >>> 0; - b = c + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + b >>> 0) + x3 >>> 0) + 3250441966 >>> 0, 22) >>> 0; - a = b + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + a >>> 0) + x4 >>> 0) + 4118548399 >>> 0, 7) >>> 0; - d = a + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + d >>> 0) + x5 >>> 0) + 1200080426 >>> 0, 12) >>> 0; - c = d + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + c >>> 0) + x6 >>> 0) + 2821735955 >>> 0, 17) >>> 0; - b = c + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + b >>> 0) + x7 >>> 0) + 4249261313 >>> 0, 22) >>> 0; - a = b + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + a >>> 0) + x8 >>> 0) + 1770035416 >>> 0, 7) >>> 0; - d = a + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + d >>> 0) + x9 >>> 0) + 2336552879 >>> 0, 12) >>> 0; - c = d + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + c >>> 0) + xa >>> 0) + 4294925233 >>> 0, 17) >>> 0; - b = c + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + b >>> 0) + xb >>> 0) + 2304563134 >>> 0, 22) >>> 0; - a = b + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & b) >>> 0)) ^ d) >>> 0)) + a >>> 0) + xc >>> 0) + 1804603682 >>> 0, 7) >>> 0; - d = a + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & a) >>> 0)) ^ c) >>> 0)) + d >>> 0) + xd >>> 0) + 4254626195 >>> 0, 12) >>> 0; - c = d + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & d) >>> 0)) ^ b) >>> 0)) + c >>> 0) + xe >>> 0) + 2792965006 >>> 0, 17) >>> 0; - b = c + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & c) >>> 0)) ^ a) >>> 0)) + b >>> 0) + xf >>> 0) + 1236535329 >>> 0, 22) >>> 0; - a = b + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + a >>> 0) + x1 >>> 0) + 4129170786 >>> 0, 5) >>> 0; - d = a + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + d >>> 0) + x6 >>> 0) + 3225465664 >>> 0, 9) >>> 0; - c = d + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + c >>> 0) + xb >>> 0) + 643717713 >>> 0, 14) >>> 0; - b = c + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + b >>> 0) + x0 >>> 0) + 3921069994 >>> 0, 20) >>> 0; - a = b + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + a >>> 0) + x5 >>> 0) + 3593408605 >>> 0, 5) >>> 0; - d = a + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + d >>> 0) + xa >>> 0) + 38016083 >>> 0, 9) >>> 0; - c = d + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + c >>> 0) + xf >>> 0) + 3634488961 >>> 0, 14) >>> 0; - b = c + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + b >>> 0) + x4 >>> 0) + 3889429448 >>> 0, 20) >>> 0; - a = b + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + a >>> 0) + x9 >>> 0) + 568446438 >>> 0, 5) >>> 0; - d = a + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + d >>> 0) + xe >>> 0) + 3275163606 >>> 0, 9) >>> 0; - c = d + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + c >>> 0) + x3 >>> 0) + 4107603335 >>> 0, 14) >>> 0; - b = c + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + b >>> 0) + x8 >>> 0) + 1163531501 >>> 0, 20) >>> 0; - a = b + bits.RotateLeft32((((((((((((b ^ c) >>> 0)) & d) >>> 0)) ^ c) >>> 0)) + a >>> 0) + xd >>> 0) + 2850285829 >>> 0, 5) >>> 0; - d = a + bits.RotateLeft32((((((((((((a ^ b) >>> 0)) & c) >>> 0)) ^ b) >>> 0)) + d >>> 0) + x2 >>> 0) + 4243563512 >>> 0, 9) >>> 0; - c = d + bits.RotateLeft32((((((((((((d ^ a) >>> 0)) & b) >>> 0)) ^ a) >>> 0)) + c >>> 0) + x7 >>> 0) + 1735328473 >>> 0, 14) >>> 0; - b = c + bits.RotateLeft32((((((((((((c ^ d) >>> 0)) & a) >>> 0)) ^ d) >>> 0)) + b >>> 0) + xc >>> 0) + 2368359562 >>> 0, 20) >>> 0; - a = b + bits.RotateLeft32((((((((b ^ c) >>> 0) ^ d) >>> 0)) + a >>> 0) + x5 >>> 0) + 4294588738 >>> 0, 4) >>> 0; - d = a + bits.RotateLeft32((((((((a ^ b) >>> 0) ^ c) >>> 0)) + d >>> 0) + x8 >>> 0) + 2272392833 >>> 0, 11) >>> 0; - c = d + bits.RotateLeft32((((((((d ^ a) >>> 0) ^ b) >>> 0)) + c >>> 0) + xb >>> 0) + 1839030562 >>> 0, 16) >>> 0; - b = c + bits.RotateLeft32((((((((c ^ d) >>> 0) ^ a) >>> 0)) + b >>> 0) + xe >>> 0) + 4259657740 >>> 0, 23) >>> 0; - a = b + bits.RotateLeft32((((((((b ^ c) >>> 0) ^ d) >>> 0)) + a >>> 0) + x1 >>> 0) + 2763975236 >>> 0, 4) >>> 0; - d = a + bits.RotateLeft32((((((((a ^ b) >>> 0) ^ c) >>> 0)) + d >>> 0) + x4 >>> 0) + 1272893353 >>> 0, 11) >>> 0; - c = d + bits.RotateLeft32((((((((d ^ a) >>> 0) ^ b) >>> 0)) + c >>> 0) + x7 >>> 0) + 4139469664 >>> 0, 16) >>> 0; - b = c + bits.RotateLeft32((((((((c ^ d) >>> 0) ^ a) >>> 0)) + b >>> 0) + xa >>> 0) + 3200236656 >>> 0, 23) >>> 0; - a = b + bits.RotateLeft32((((((((b ^ c) >>> 0) ^ d) >>> 0)) + a >>> 0) + xd >>> 0) + 681279174 >>> 0, 4) >>> 0; - d = a + bits.RotateLeft32((((((((a ^ b) >>> 0) ^ c) >>> 0)) + d >>> 0) + x0 >>> 0) + 3936430074 >>> 0, 11) >>> 0; - c = d + bits.RotateLeft32((((((((d ^ a) >>> 0) ^ b) >>> 0)) + c >>> 0) + x3 >>> 0) + 3572445317 >>> 0, 16) >>> 0; - b = c + bits.RotateLeft32((((((((c ^ d) >>> 0) ^ a) >>> 0)) + b >>> 0) + x6 >>> 0) + 76029189 >>> 0, 23) >>> 0; - a = b + bits.RotateLeft32((((((((b ^ c) >>> 0) ^ d) >>> 0)) + a >>> 0) + x9 >>> 0) + 3654602809 >>> 0, 4) >>> 0; - d = a + bits.RotateLeft32((((((((a ^ b) >>> 0) ^ c) >>> 0)) + d >>> 0) + xc >>> 0) + 3873151461 >>> 0, 11) >>> 0; - c = d + bits.RotateLeft32((((((((d ^ a) >>> 0) ^ b) >>> 0)) + c >>> 0) + xf >>> 0) + 530742520 >>> 0, 16) >>> 0; - b = c + bits.RotateLeft32((((((((c ^ d) >>> 0) ^ a) >>> 0)) + b >>> 0) + x2 >>> 0) + 3299628645 >>> 0, 23) >>> 0; - a = b + bits.RotateLeft32((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + a >>> 0) + x0 >>> 0) + 4096336452 >>> 0, 6) >>> 0; - d = a + bits.RotateLeft32((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + d >>> 0) + x7 >>> 0) + 1126891415 >>> 0, 10) >>> 0; - c = d + bits.RotateLeft32((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + c >>> 0) + xe >>> 0) + 2878612391 >>> 0, 15) >>> 0; - b = c + bits.RotateLeft32((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + b >>> 0) + x5 >>> 0) + 4237533241 >>> 0, 21) >>> 0; - a = b + bits.RotateLeft32((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + a >>> 0) + xc >>> 0) + 1700485571 >>> 0, 6) >>> 0; - d = a + bits.RotateLeft32((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + d >>> 0) + x3 >>> 0) + 2399980690 >>> 0, 10) >>> 0; - c = d + bits.RotateLeft32((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + c >>> 0) + xa >>> 0) + 4293915773 >>> 0, 15) >>> 0; - b = c + bits.RotateLeft32((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + b >>> 0) + x1 >>> 0) + 2240044497 >>> 0, 21) >>> 0; - a = b + bits.RotateLeft32((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + a >>> 0) + x8 >>> 0) + 1873313359 >>> 0, 6) >>> 0; - d = a + bits.RotateLeft32((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + d >>> 0) + xf >>> 0) + 4264355552 >>> 0, 10) >>> 0; - c = d + bits.RotateLeft32((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + c >>> 0) + x6 >>> 0) + 2734768916 >>> 0, 15) >>> 0; - b = c + bits.RotateLeft32((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + b >>> 0) + xd >>> 0) + 1309151649 >>> 0, 21) >>> 0; - a = b + bits.RotateLeft32((((((c ^ (((b | (~d >>> 0)) >>> 0))) >>> 0)) + a >>> 0) + x4 >>> 0) + 4149444226 >>> 0, 6) >>> 0; - d = a + bits.RotateLeft32((((((b ^ (((a | (~c >>> 0)) >>> 0))) >>> 0)) + d >>> 0) + xb >>> 0) + 3174756917 >>> 0, 10) >>> 0; - c = d + bits.RotateLeft32((((((a ^ (((d | (~b >>> 0)) >>> 0))) >>> 0)) + c >>> 0) + x2 >>> 0) + 718787259 >>> 0, 15) >>> 0; - b = c + bits.RotateLeft32((((((d ^ (((c | (~a >>> 0)) >>> 0))) >>> 0)) + b >>> 0) + x9 >>> 0) + 3951481745 >>> 0, 21) >>> 0; - a = a + (aa) >>> 0; - b = b + (bb) >>> 0; - c = c + (cc) >>> 0; - d = d + (dd) >>> 0; - i = i + (64) >> 0; - } - _tmp$8 = a; - _tmp$9 = b; - _tmp$10 = c; - _tmp$11 = d; - dig.s[0] = _tmp$8; - dig.s[1] = _tmp$9; - dig.s[2] = _tmp$10; - dig.s[3] = _tmp$11; - }; - init = function() { - crypto.RegisterHash(2, New); - }; - digest.ptr.prototype.Reset = function() { - var d; - d = this; - d.s[0] = 1732584193; - d.s[1] = 4023233417; - d.s[2] = 2562383102; - d.s[3] = 271733878; - d.nx = 0; - d.len = new $Uint64(0, 0); - }; - digest.prototype.Reset = function() { return this.$val.Reset(); }; - digest.ptr.prototype.MarshalBinary = function() { - var b, d; - d = this; - b = $makeSlice(sliceType, 0, 92); - b = $appendSlice(b, "md5\x01"); - b = appendUint32(b, d.s[0]); - b = appendUint32(b, d.s[1]); - b = appendUint32(b, d.s[2]); - b = appendUint32(b, d.s[3]); - b = $appendSlice(b, $subslice(new sliceType(d.x), 0, d.nx)); - b = $subslice(b, 0, ((b.$length + 64 >> 0) - d.nx >> 0)); - b = appendUint64(b, d.len); - return [b, $ifaceNil]; - }; - digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - digest.ptr.prototype.UnmarshalBinary = function(b) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, d; - d = this; - if (b.$length < 4 || !(($bytesToString($subslice(b, 0, 4))) === "md5\x01")) { - return errors.New("crypto/md5: invalid hash state identifier"); - } - if (!((b.$length === 92))) { - return errors.New("crypto/md5: invalid hash state size"); - } - b = $subslice(b, 4); - _tuple = consumeUint32(b); - b = _tuple[0]; - d.s[0] = _tuple[1]; - _tuple$1 = consumeUint32(b); - b = _tuple$1[0]; - d.s[1] = _tuple$1[1]; - _tuple$2 = consumeUint32(b); - b = _tuple$2[0]; - d.s[2] = _tuple$2[1]; - _tuple$3 = consumeUint32(b); - b = _tuple$3[0]; - d.s[3] = _tuple$3[1]; - b = $subslice(b, $copySlice(new sliceType(d.x), b)); - _tuple$4 = consumeUint64(b); - b = _tuple$4[0]; - d.len = _tuple$4[1]; - d.nx = (($div64(d.len, new $Uint64(0, 64), true).$low >> 0)); - return $ifaceNil; - }; - digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - appendUint64 = function(b, x) { - var a, b, x; - a = arrayType.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(new sliceType(a), x); - return $appendSlice(b, new sliceType(a)); - }; - appendUint32 = function(b, x) { - var a, b, x; - a = arrayType$1.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint32(new sliceType(a), x); - return $appendSlice(b, new sliceType(a)); - }; - consumeUint64 = function(b) { - var b; - return [$subslice(b, 8), $clone(binary.BigEndian, binary.bigEndian).Uint64($subslice(b, 0, 8))]; - }; - consumeUint32 = function(b) { - var b; - return [$subslice(b, 4), $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(b, 0, 4))]; - }; - New = function() { - var d; - d = new digest.ptr(arrayType$2.zero(), arrayType$3.zero(), 0, new $Uint64(0, 0)); - d.Reset(); - return d; - }; - $pkg.New = New; - digest.ptr.prototype.Size = function() { - var d; - d = this; - return 16; - }; - digest.prototype.Size = function() { return this.$val.Size(); }; - digest.ptr.prototype.BlockSize = function() { - var d; - d = this; - return 64; - }; - digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - digest.ptr.prototype.Write = function(p) { - var d, err, n, n$1, nn, p, x, x$1; - nn = 0; - err = $ifaceNil; - d = this; - nn = p.$length; - d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - if (d.nx > 0) { - n = $copySlice($subslice(new sliceType(d.x), d.nx), p); - d.nx = d.nx + (n) >> 0; - if (d.nx === 64) { - if (false) { - block(d, new sliceType(d.x)); - } else { - blockGeneric(d, new sliceType(d.x)); - } - d.nx = 0; - } - p = $subslice(p, n); - } - if (p.$length >= 64) { - n$1 = (p.$length & ~63) >> 0; - if (false) { - block(d, $subslice(p, 0, n$1)); - } else { - blockGeneric(d, $subslice(p, 0, n$1)); - } - p = $subslice(p, n$1); - } - if (p.$length > 0) { - d.nx = $copySlice(new sliceType(d.x), p); - } - return [nn, err]; - }; - digest.prototype.Write = function(p) { return this.$val.Write(p); }; - digest.ptr.prototype.Sum = function(in$1) { - var d, d0, hash$1, in$1; - d = this; - d0 = $clone(d, digest); - hash$1 = $clone(d0.checkSum(), arrayType$4); - return $appendSlice(in$1, new sliceType(hash$1)); - }; - digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; - digest.ptr.prototype.checkSum = function() { - var d, digest$1, pad, tmp, x, x$1; - d = this; - tmp = $toNativeArray($kindUint8, [128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - pad = $div64(((x = d.len, new $Uint64(0 - x.$high, 55 - x.$low))), new $Uint64(0, 64), true); - $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(new sliceType(tmp), $flatten64(new $Uint64(0 + pad.$high, 1 + pad.$low))), $shiftLeft64(d.len, 3)); - d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$1 = new $Uint64(0 + pad.$high, 1 + pad.$low), new $Uint64(x$1.$high + 0, x$1.$low + 8))))); - if (!((d.nx === 0))) { - $panic(new $String("d.nx != 0")); - } - digest$1 = arrayType$4.zero(); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(digest$1), 0), d.s[0]); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(digest$1), 4), d.s[1]); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(digest$1), 8), d.s[2]); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(new sliceType(digest$1), 12), d.s[3]); - return digest$1; - }; - digest.prototype.checkSum = function() { return this.$val.checkSum(); }; - ptrType.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/md5", typ: $funcType([], [arrayType$4], false)}]; - digest.init("crypto/md5", [{prop: "s", name: "s", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/rc4"] = (function() { - var $pkg = {}, $init, subtle, strconv, Cipher, KeySizeError, ptrType, arrayType, sliceType, NewCipher; - subtle = $packages["crypto/internal/subtle"]; - strconv = $packages["strconv"]; - Cipher = $pkg.Cipher = $newType(0, $kindStruct, "rc4.Cipher", true, "crypto/rc4", true, function(s_, i_, j_) { - this.$val = this; - if (arguments.length === 0) { - this.s = arrayType.zero(); - this.i = 0; - this.j = 0; - return; - } - this.s = s_; - this.i = i_; - this.j = j_; - }); - KeySizeError = $pkg.KeySizeError = $newType(4, $kindInt, "rc4.KeySizeError", true, "crypto/rc4", true, null); - ptrType = $ptrType(Cipher); - arrayType = $arrayType($Uint32, 256); - sliceType = $sliceType($Uint8); - KeySizeError.prototype.Error = function() { - var k; - k = this.$val; - return "crypto/rc4: invalid key size " + strconv.Itoa(((k >> 0))); - }; - $ptrType(KeySizeError).prototype.Error = function() { return new KeySizeError(this.$get()).Error(); }; - NewCipher = function(key) { - var _r, _tmp, _tmp$1, c, i, i$1, j, k, key, x, x$1, x$2, x$3, x$4, x$5, x$6; - k = key.$length; - if (k < 1 || k > 256) { - return [ptrType.nil, new KeySizeError(((k >> 0)))]; - } - c = new Cipher.ptr(arrayType.zero(), 0, 0); - i = 0; - while (true) { - if (!(i < 256)) { break; } - (x = c.s, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = ((i >>> 0)))); - i = i + (1) >> 0; - } - j = 0; - i$1 = 0; - while (true) { - if (!(i$1 < 256)) { break; } - j = j + (((((x$1 = c.s, ((i$1 < 0 || i$1 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i$1])) << 24 >>> 24)) + (x$2 = (_r = i$1 % k, _r === _r ? _r : $throwRuntimeError("integer divide by zero")), ((x$2 < 0 || x$2 >= key.$length) ? ($throwRuntimeError("index out of range"), undefined) : key.$array[key.$offset + x$2])) << 24 >>> 24)) << 24 >>> 24; - _tmp = (x$3 = c.s, ((j < 0 || j >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j])); - _tmp$1 = (x$4 = c.s, ((i$1 < 0 || i$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i$1])); - (x$5 = c.s, ((i$1 < 0 || i$1 >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[i$1] = _tmp)); - (x$6 = c.s, ((j < 0 || j >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[j] = _tmp$1)); - i$1 = i$1 + (1) >> 0; - } - return [c, $ifaceNil]; - }; - $pkg.NewCipher = NewCipher; - Cipher.ptr.prototype.Reset = function() { - var _i, _ref, _tmp, _tmp$1, c, i, x; - c = this; - _ref = c.s; - _i = 0; - while (true) { - if (!(_i < 256)) { break; } - i = _i; - (x = c.s, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = 0)); - _i++; - } - _tmp = 0; - _tmp$1 = 0; - c.i = _tmp; - c.j = _tmp$1; - }; - Cipher.prototype.Reset = function() { return this.$val.Reset(); }; - Cipher.ptr.prototype.XORKeyStream = function(dst, src) { - var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, c, dst, i, j, k, src, v, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, y; - c = this; - if (src.$length === 0) { - return; - } - if (subtle.InexactOverlap($subslice(dst, 0, src.$length), src)) { - $panic(new $String("crypto/rc4: invalid buffer overlap")); - } - _tmp = c.i; - _tmp$1 = c.j; - i = _tmp; - j = _tmp$1; - $unused((x = src.$length - 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x]))); - dst = $subslice(dst, 0, src.$length); - _ref = src; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - k = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - i = i + (1) << 24 >>> 24; - x$2 = (x$1 = c.s, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])); - j = j + (((x$2 << 24 >>> 24))) << 24 >>> 24; - y = (x$3 = c.s, ((j < 0 || j >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[j])); - _tmp$2 = y; - _tmp$3 = x$2; - (x$4 = c.s, ((i < 0 || i >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i] = _tmp$2)); - (x$5 = c.s, ((j < 0 || j >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[j] = _tmp$3)); - ((k < 0 || k >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + k] = ((v ^ (((x$6 = c.s, x$7 = (((x$2 + y >>> 0) << 24 >>> 24)), ((x$7 < 0 || x$7 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[x$7])) << 24 >>> 24))) << 24 >>> 24)); - _i++; - } - _tmp$4 = i; - _tmp$5 = j; - c.i = _tmp$4; - c.j = _tmp$5; - }; - Cipher.prototype.XORKeyStream = function(dst, src) { return this.$val.XORKeyStream(dst, src); }; - ptrType.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}]; - KeySizeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - Cipher.init("crypto/rc4", [{prop: "s", name: "s", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "j", name: "j", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/rsa"] = (function() { - var $pkg = {}, $init, bytes, crypto, randutil, rand, subtle, errors, hash, io, math, big, PublicKey, OAEPOptions, PrivateKey, PrecomputedValues, CRTValue, PSSOptions, PKCS1v15DecryptOptions, sliceType, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, sliceType$1, sliceType$2, arrayType, arrayType$1, bigZero, bigOne, errPublicModulus, errPublicExponentSmall, errPublicExponentLarge, hashPrefixes, checkPub, incCounter, mgf1XOR, encrypt, decrypt, decryptAndCheck, DecryptOAEP, emsaPSSEncode, emsaPSSVerify, signPSSWithSalt, SignPSS, VerifyPSS, EncryptPKCS1v15, DecryptPKCS1v15, DecryptPKCS1v15SessionKey, decryptPKCS1v15, nonZeroRandomBytes, SignPKCS1v15, VerifyPKCS1v15, pkcs1v15HashInfo; - bytes = $packages["bytes"]; - crypto = $packages["crypto"]; - randutil = $packages["crypto/internal/randutil"]; - rand = $packages["crypto/rand"]; - subtle = $packages["crypto/subtle"]; - errors = $packages["errors"]; - hash = $packages["hash"]; - io = $packages["io"]; - math = $packages["math"]; - big = $packages["math/big"]; - PublicKey = $pkg.PublicKey = $newType(0, $kindStruct, "rsa.PublicKey", true, "crypto/rsa", true, function(N_, E_) { - this.$val = this; - if (arguments.length === 0) { - this.N = ptrType$1.nil; - this.E = 0; - return; - } - this.N = N_; - this.E = E_; - }); - OAEPOptions = $pkg.OAEPOptions = $newType(0, $kindStruct, "rsa.OAEPOptions", true, "crypto/rsa", true, function(Hash_, Label_) { - this.$val = this; - if (arguments.length === 0) { - this.Hash = 0; - this.Label = sliceType.nil; - return; - } - this.Hash = Hash_; - this.Label = Label_; - }); - PrivateKey = $pkg.PrivateKey = $newType(0, $kindStruct, "rsa.PrivateKey", true, "crypto/rsa", true, function(PublicKey_, D_, Primes_, Precomputed_) { - this.$val = this; - if (arguments.length === 0) { - this.PublicKey = new PublicKey.ptr(ptrType$1.nil, 0); - this.D = ptrType$1.nil; - this.Primes = sliceType$1.nil; - this.Precomputed = new PrecomputedValues.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, sliceType$2.nil); - return; - } - this.PublicKey = PublicKey_; - this.D = D_; - this.Primes = Primes_; - this.Precomputed = Precomputed_; - }); - PrecomputedValues = $pkg.PrecomputedValues = $newType(0, $kindStruct, "rsa.PrecomputedValues", true, "crypto/rsa", true, function(Dp_, Dq_, Qinv_, CRTValues_) { - this.$val = this; - if (arguments.length === 0) { - this.Dp = ptrType$1.nil; - this.Dq = ptrType$1.nil; - this.Qinv = ptrType$1.nil; - this.CRTValues = sliceType$2.nil; - return; - } - this.Dp = Dp_; - this.Dq = Dq_; - this.Qinv = Qinv_; - this.CRTValues = CRTValues_; - }); - CRTValue = $pkg.CRTValue = $newType(0, $kindStruct, "rsa.CRTValue", true, "crypto/rsa", true, function(Exp_, Coeff_, R_) { - this.$val = this; - if (arguments.length === 0) { - this.Exp = ptrType$1.nil; - this.Coeff = ptrType$1.nil; - this.R = ptrType$1.nil; - return; - } - this.Exp = Exp_; - this.Coeff = Coeff_; - this.R = R_; - }); - PSSOptions = $pkg.PSSOptions = $newType(0, $kindStruct, "rsa.PSSOptions", true, "crypto/rsa", true, function(SaltLength_, Hash_) { - this.$val = this; - if (arguments.length === 0) { - this.SaltLength = 0; - this.Hash = 0; - return; - } - this.SaltLength = SaltLength_; - this.Hash = Hash_; - }); - PKCS1v15DecryptOptions = $pkg.PKCS1v15DecryptOptions = $newType(0, $kindStruct, "rsa.PKCS1v15DecryptOptions", true, "crypto/rsa", true, function(SessionKeyLen_) { - this.$val = this; - if (arguments.length === 0) { - this.SessionKeyLen = 0; - return; - } - this.SessionKeyLen = SessionKeyLen_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(PublicKey); - ptrType$1 = $ptrType(big.Int); - ptrType$2 = $ptrType(PrivateKey); - ptrType$3 = $ptrType(PSSOptions); - ptrType$4 = $ptrType(OAEPOptions); - ptrType$5 = $ptrType(PKCS1v15DecryptOptions); - sliceType$1 = $sliceType(ptrType$1); - sliceType$2 = $sliceType(CRTValue); - arrayType = $arrayType($Uint8, 4); - arrayType$1 = $arrayType($Uint8, 8); - PublicKey.ptr.prototype.Size = function() { - var _q, pub; - pub = this; - return (_q = ((pub.N.BitLen() + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - }; - PublicKey.prototype.Size = function() { return this.$val.Size(); }; - PublicKey.ptr.prototype.Equal = function(x) { - var _tuple, ok, pub, x, xx; - pub = this; - _tuple = $assertType(x, ptrType, true); - xx = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return false; - } - return (pub.N.Cmp(xx.N) === 0) && (pub.E === xx.E); - }; - PublicKey.prototype.Equal = function(x) { return this.$val.Equal(x); }; - checkPub = function(pub) { - var pub; - if (pub.N === ptrType$1.nil) { - return errPublicModulus; - } - if (pub.E < 2) { - return errPublicExponentSmall; - } - if (pub.E > 2147483647) { - return errPublicExponentLarge; - } - return $ifaceNil; - }; - PrivateKey.ptr.prototype.Public = function() { - var priv; - priv = this; - return priv.PublicKey; - }; - PrivateKey.prototype.Public = function() { return this.$val.Public(); }; - PrivateKey.ptr.prototype.Equal = function(x) { - var _i, _ref, _tuple, i, ok, priv, x, x$1, x$2, xx; - priv = this; - _tuple = $assertType(x, ptrType$2, true); - xx = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return false; - } - if (!priv.PublicKey.Equal(xx.PublicKey) || !((priv.D.Cmp(xx.D) === 0))) { - return false; - } - if (!((priv.Primes.$length === xx.Primes.$length))) { - return false; - } - _ref = priv.Primes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (!(((x$1 = priv.Primes, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])).Cmp((x$2 = xx.Primes, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i]))) === 0))) { - return false; - } - _i++; - } - return true; - }; - PrivateKey.prototype.Equal = function(x) { return this.$val.Equal(x); }; - PrivateKey.ptr.prototype.Sign = function(rand$1, digest, opts) { - var {$24r, $24r$1, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _tuple, digest, ok, opts, priv, pssOpts, rand$1, $s, $r, $c} = $restore(this, {rand$1, digest, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - priv = this; - _tuple = $assertType(opts, ptrType$3, true); - pssOpts = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r = SignPSS(rand$1, priv, pssOpts.Hash, digest, pssOpts); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _arg = rand$1; - _arg$1 = priv; - _r$1 = opts.HashFunc(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$2 = _r$1; - _arg$3 = digest; - _r$2 = SignPKCS1v15(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: PrivateKey.ptr.prototype.Sign, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _tuple, digest, ok, opts, priv, pssOpts, rand$1, $s};return $f; - }; - PrivateKey.prototype.Sign = function(rand$1, digest, opts) { return this.$val.Sign(rand$1, digest, opts); }; - PrivateKey.ptr.prototype.Decrypt = function(rand$1, ciphertext, opts) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, ciphertext, err, err$1, err$2, l, opts, opts$1, opts$2, opts$3, plaintext, priv, rand$1, $s, $r, $c} = $restore(this, {rand$1, ciphertext, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - plaintext = sliceType.nil; - err = $ifaceNil; - priv = this; - /* */ if ($interfaceIsEqual(opts, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(opts, $ifaceNil)) { */ case 1: - _r = DecryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - plaintext = _tuple[0]; - err = _tuple[1]; - $24r = [plaintext, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _ref = opts; - /* */ if ($assertType(_ref, ptrType$4, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($assertType(_ref, ptrType$4, true)[1]) { */ case 5: - opts$1 = _ref.$val; - _r$1 = new crypto.Hash(opts$1.Hash).New(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = DecryptOAEP(_r$1, rand$1, priv, ciphertext, opts$1.Label); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - plaintext = _tuple$1[0]; - err = _tuple$1[1]; - $24r$1 = [plaintext, err]; - $s = 11; case 11: return $24r$1; - /* } else if ($assertType(_ref, ptrType$5, true)[1]) { */ case 6: - opts$2 = _ref.$val; - l = opts$2.SessionKeyLen; - /* */ if (l > 0) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (l > 0) { */ case 12: - plaintext = $makeSlice(sliceType, l); - _r$3 = io.ReadFull(rand$1, plaintext); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = sliceType.nil; - _tmp$1 = err$1; - plaintext = _tmp; - err = _tmp$1; - $s = -1; return [plaintext, err]; - } - _r$4 = DecryptPKCS1v15SessionKey(rand$1, priv, ciphertext, plaintext); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$2 = _r$4; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$2 = sliceType.nil; - _tmp$3 = err$2; - plaintext = _tmp$2; - err = _tmp$3; - $s = -1; return [plaintext, err]; - } - _tmp$4 = plaintext; - _tmp$5 = $ifaceNil; - plaintext = _tmp$4; - err = _tmp$5; - $s = -1; return [plaintext, err]; - /* } else { */ case 13: - _r$5 = DecryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - plaintext = _tuple$3[0]; - err = _tuple$3[1]; - $24r$2 = [plaintext, err]; - $s = 18; case 18: return $24r$2; - /* } */ case 14: - $s = 8; continue; - /* } else { */ case 7: - opts$3 = _ref; - _tmp$6 = sliceType.nil; - _tmp$7 = errors.New("crypto/rsa: invalid options for Decrypt"); - plaintext = _tmp$6; - err = _tmp$7; - $s = -1; return [plaintext, err]; - /* } */ case 8: - $s = -1; return [plaintext, err]; - /* */ } return; } var $f = {$blk: PrivateKey.ptr.prototype.Decrypt, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, ciphertext, err, err$1, err$2, l, opts, opts$1, opts$2, opts$3, plaintext, priv, rand$1, $s};return $f; - }; - PrivateKey.prototype.Decrypt = function(rand$1, ciphertext, opts) { return this.$val.Decrypt(rand$1, ciphertext, opts); }; - PrivateKey.ptr.prototype.Validate = function() { - var {_i, _i$1, _r, _r$1, _r$2, _r$3, _ref, _ref$1, congruence, de, err, modulus, pminus1, prime, prime$1, priv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - priv = this; - err = checkPub(priv.PublicKey); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - modulus = new big.Int.ptr(false, big.nat.nil).Set(bigOne); - _ref = priv.Primes; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - prime = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (prime.Cmp(bigOne) <= 0) { - $s = -1; return errors.New("crypto/rsa: invalid prime value"); - } - _r = modulus.Mul(modulus, prime); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _i++; - $s = 1; continue; - case 2: - if (!((modulus.Cmp(priv.PublicKey.N) === 0))) { - $s = -1; return errors.New("crypto/rsa: invalid modulus"); - } - congruence = new big.Int.ptr(false, big.nat.nil); - de = new big.Int.ptr(false, big.nat.nil).SetInt64((new $Int64(0, priv.PublicKey.E))); - _r$1 = de.Mul(de, priv.D); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _ref$1 = priv.Primes; - _i$1 = 0; - /* while (true) { */ case 5: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 6; continue; } - prime$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$2 = new big.Int.ptr(false, big.nat.nil).Sub(prime$1, bigOne); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - pminus1 = _r$2; - _r$3 = congruence.Mod(de, pminus1); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - if (!((congruence.Cmp(bigOne) === 0))) { - $s = -1; return errors.New("crypto/rsa: invalid exponents"); - } - _i$1++; - $s = 5; continue; - case 6: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: PrivateKey.ptr.prototype.Validate, $c: true, $r, _i, _i$1, _r, _r$1, _r$2, _r$3, _ref, _ref$1, congruence, de, err, modulus, pminus1, prime, prime$1, priv, $s};return $f; - }; - PrivateKey.prototype.Validate = function() { return this.$val.Validate(); }; - incCounter = function(c) { - var c; - c[3] = (c[3] + (1) << 24 >>> 24); - if (!((c[3] === 0))) { - return; - } - c[2] = (c[2] + (1) << 24 >>> 24); - if (!((c[2] === 0))) { - return; - } - c[1] = (c[1] + (1) << 24 >>> 24); - if (!((c[1] === 0))) { - return; - } - c[0] = (c[0] + (1) << 24 >>> 24); - }; - mgf1XOR = function(out, hash$1, seed) { - var {_r, _r$1, _r$2, counter, digest, done, hash$1, i, out, seed, $s, $r, $c} = $restore(this, {out, hash$1, seed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - counter = [counter]; - counter[0] = arrayType.zero(); - digest = sliceType.nil; - done = 0; - /* while (true) { */ case 1: - /* if (!(done < out.$length)) { break; } */ if(!(done < out.$length)) { $s = 2; continue; } - _r = hash$1.Write(seed); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _r$1 = hash$1.Write($subslice(new sliceType(counter[0]), 0, 4)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = hash$1.Sum($subslice(digest, 0, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - digest = _r$2; - $r = hash$1.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = 0; - while (true) { - if (!(i < digest.$length && done < out.$length)) { break; } - ((done < 0 || done >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + done] = ((((done < 0 || done >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + done]) ^ (((i < 0 || i >= digest.$length) ? ($throwRuntimeError("index out of range"), undefined) : digest.$array[digest.$offset + i]))) << 24 >>> 24)); - done = done + (1) >> 0; - i = i + (1) >> 0; - } - incCounter(counter[0]); - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: mgf1XOR, $c: true, $r, _r, _r$1, _r$2, counter, digest, done, hash$1, i, out, seed, $s};return $f; - }; - encrypt = function(c, pub, m) { - var {_r, c, e, m, pub, $s, $r, $c} = $restore(this, {c, pub, m}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = big.NewInt((new $Int64(0, pub.E))); - _r = c.Exp(m, e, pub.N); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return c; - /* */ } return; } var $f = {$blk: encrypt, $c: true, $r, _r, c, e, m, pub, $s};return $f; - }; - PrivateKey.ptr.prototype.Precompute = function() { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, i, prime, priv, r, values, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - priv = this; - if (!(priv.Precomputed.Dp === ptrType$1.nil)) { - $s = -1; return; - } - _r = new big.Int.ptr(false, big.nat.nil).Sub((x = priv.Primes, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), bigOne); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - priv.Precomputed.Dp = _r; - _r$1 = priv.Precomputed.Dp.Mod(priv.D, priv.Precomputed.Dp); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = new big.Int.ptr(false, big.nat.nil).Sub((x$1 = priv.Primes, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])), bigOne); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - priv.Precomputed.Dq = _r$2; - _r$3 = priv.Precomputed.Dq.Mod(priv.D, priv.Precomputed.Dq); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = new big.Int.ptr(false, big.nat.nil).ModInverse((x$2 = priv.Primes, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])), (x$3 = priv.Primes, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0]))); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - priv.Precomputed.Qinv = _r$4; - _r$5 = new big.Int.ptr(false, big.nat.nil).Mul((x$4 = priv.Primes, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0])), (x$5 = priv.Primes, (1 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 1]))); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - r = _r$5; - priv.Precomputed.CRTValues = $makeSlice(sliceType$2, (priv.Primes.$length - 2 >> 0)); - i = 2; - /* while (true) { */ case 7: - /* if (!(i < priv.Primes.$length)) { break; } */ if(!(i < priv.Primes.$length)) { $s = 8; continue; } - prime = (x$6 = priv.Primes, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])); - values = (x$7 = priv.Precomputed.CRTValues, x$8 = i - 2 >> 0, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8])); - _r$6 = new big.Int.ptr(false, big.nat.nil).Sub(prime, bigOne); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - values.Exp = _r$6; - _r$7 = values.Exp.Mod(priv.D, values.Exp); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - values.R = new big.Int.ptr(false, big.nat.nil).Set(r); - _r$8 = new big.Int.ptr(false, big.nat.nil).ModInverse(r, prime); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - values.Coeff = _r$8; - _r$9 = r.Mul(r, prime); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - i = i + (1) >> 0; - $s = 7; continue; - case 8: - $s = -1; return; - /* */ } return; } var $f = {$blk: PrivateKey.ptr.prototype.Precompute, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, i, prime, priv, r, values, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, $s};return $f; - }; - PrivateKey.prototype.Precompute = function() { return this.$val.Precompute(); }; - decrypt = function(random, priv, c) { - var {_i, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tuple, bigE, c, cCopy, err, i, ir, m, m2, ok, prime, priv, r, random, rpowe, values, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {random, priv, c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = ptrType$1.nil; - err = $ifaceNil; - if (c.Cmp(priv.PublicKey.N) > 0) { - err = $pkg.ErrDecryption; - $s = -1; return [m, err]; - } - if (priv.PublicKey.N.Sign() === 0) { - _tmp = ptrType$1.nil; - _tmp$1 = $pkg.ErrDecryption; - m = _tmp; - err = _tmp$1; - $s = -1; return [m, err]; - } - ir = ptrType$1.nil; - /* */ if (!($interfaceIsEqual(random, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(random, $ifaceNil))) { */ case 1: - $r = randutil.MaybeReadByte(random); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r = ptrType$1.nil; - ir = new big.Int.ptr(false, big.nat.nil); - /* while (true) { */ case 4: - _r = rand.Int(random, priv.PublicKey.N); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - r = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [m, err]; - } - if (r.Cmp(bigZero) === 0) { - r = bigOne; - } - _r$1 = ir.ModInverse(r, priv.PublicKey.N); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ok = _r$1; - if (!(ok === ptrType$1.nil)) { - /* break; */ $s = 5; continue; - } - $s = 4; continue; - case 5: - bigE = big.NewInt((new $Int64(0, priv.PublicKey.E))); - _r$2 = new big.Int.ptr(false, big.nat.nil).Exp(r, bigE, priv.PublicKey.N); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - rpowe = _r$2; - cCopy = new big.Int.ptr(false, big.nat.nil).Set(c); - _r$3 = cCopy.Mul(cCopy, rpowe); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = cCopy.Mod(cCopy, priv.PublicKey.N); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - c = cCopy; - /* } */ case 2: - /* */ if (priv.Precomputed.Dp === ptrType$1.nil) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (priv.Precomputed.Dp === ptrType$1.nil) { */ case 11: - _r$5 = new big.Int.ptr(false, big.nat.nil).Exp(c, priv.D, priv.PublicKey.N); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - m = _r$5; - $s = 13; continue; - /* } else { */ case 12: - _r$6 = new big.Int.ptr(false, big.nat.nil).Exp(c, priv.Precomputed.Dp, (x = priv.Primes, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - m = _r$6; - _r$7 = new big.Int.ptr(false, big.nat.nil).Exp(c, priv.Precomputed.Dq, (x$1 = priv.Primes, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1]))); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - m2 = _r$7; - _r$8 = m.Sub(m, m2); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* */ if (m.Sign() < 0) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (m.Sign() < 0) { */ case 18: - _r$9 = m.Add(m, (x$2 = priv.Primes, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0]))); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* } */ case 19: - _r$10 = m.Mul(m, priv.Precomputed.Qinv); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - _r$11 = m.Mod(m, (x$3 = priv.Primes, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0]))); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = m.Mul(m, (x$4 = priv.Primes, (1 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 1]))); /* */ $s = 23; case 23: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = m.Add(m, m2); /* */ $s = 24; case 24: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - _ref = priv.Precomputed.CRTValues; - _i = 0; - /* while (true) { */ case 25: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 26; continue; } - i = _i; - values = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), CRTValue); - prime = (x$5 = priv.Primes, x$6 = 2 + i >> 0, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); - _r$14 = m2.Exp(c, values.Exp, prime); /* */ $s = 27; case 27: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = m2.Sub(m2, m); /* */ $s = 28; case 28: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - _r$16 = m2.Mul(m2, values.Coeff); /* */ $s = 29; case 29: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = m2.Mod(m2, prime); /* */ $s = 30; case 30: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - /* */ if (m2.Sign() < 0) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (m2.Sign() < 0) { */ case 31: - _r$18 = m2.Add(m2, prime); /* */ $s = 33; case 33: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - /* } */ case 32: - _r$19 = m2.Mul(m2, values.R); /* */ $s = 34; case 34: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - _r$20 = m.Add(m, m2); /* */ $s = 35; case 35: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - _i++; - $s = 25; continue; - case 26: - /* } */ case 13: - /* */ if (!(ir === ptrType$1.nil)) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!(ir === ptrType$1.nil)) { */ case 36: - _r$21 = m.Mul(m, ir); /* */ $s = 38; case 38: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - _r$22 = m.Mod(m, priv.PublicKey.N); /* */ $s = 39; case 39: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$22; - /* } */ case 37: - $s = -1; return [m, err]; - /* */ } return; } var $f = {$blk: decrypt, $c: true, $r, _i, _r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tuple, bigE, c, cCopy, err, i, ir, m, m2, ok, prime, priv, r, random, rpowe, values, x, x$1, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - decryptAndCheck = function(random, priv, c) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, check, err, m, priv, random, $s, $r, $c} = $restore(this, {random, priv, c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = ptrType$1.nil; - err = $ifaceNil; - _r = decrypt(random, priv, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - m = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = ptrType$1.nil; - _tmp$1 = err; - m = _tmp; - err = _tmp$1; - $s = -1; return [m, err]; - } - _r$1 = encrypt(new big.Int.ptr(false, big.nat.nil), priv.PublicKey, m); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - check = _r$1; - if (!((c.Cmp(check) === 0))) { - _tmp$2 = ptrType$1.nil; - _tmp$3 = errors.New("rsa: internal error"); - m = _tmp$2; - err = _tmp$3; - $s = -1; return [m, err]; - } - _tmp$4 = m; - _tmp$5 = $ifaceNil; - m = _tmp$4; - err = _tmp$5; - $s = -1; return [m, err]; - /* */ } return; } var $f = {$blk: decryptAndCheck, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, check, err, m, priv, random, $s};return $f; - }; - DecryptOAEP = function(hash$1, random, priv, ciphertext, label) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tuple, _v, c, ciphertext, db, em, equals0, equals1, err, err$1, firstByteIsZero, hash$1, i, index, invalid, k, lHash, lHash2, lHash2Good, label, lookingForIndex, m, priv, random, rest, seed, $s, $r, $c} = $restore(this, {hash$1, random, priv, ciphertext, label}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPub(priv.PublicKey); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - k = priv.PublicKey.Size(); - if (ciphertext.$length > k) { _v = true; $s = 3; continue s; } - _r = hash$1.Size(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = k < (($imul(_r, 2)) + 2 >> 0); case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return [sliceType.nil, $pkg.ErrDecryption]; - /* } */ case 2: - c = new big.Int.ptr(false, big.nat.nil).SetBytes(ciphertext); - _r$1 = decrypt(random, priv, c); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - m = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [sliceType.nil, err$1]; - } - _r$2 = hash$1.Write(label); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hash$1.Sum(sliceType.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - lHash = _r$3; - $r = hash$1.Reset(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - em = m.FillBytes($makeSlice(sliceType, k)); - firstByteIsZero = subtle.ConstantTimeByteEq((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]), 0); - _r$4 = hash$1.Size(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - seed = $subslice(em, 1, (_r$4 + 1 >> 0)); - _r$5 = hash$1.Size(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - db = $subslice(em, (_r$5 + 1 >> 0)); - $r = mgf1XOR(seed, hash$1, db); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = mgf1XOR(db, hash$1, seed); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = hash$1.Size(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - lHash2 = $subslice(db, 0, _r$6); - lHash2Good = subtle.ConstantTimeCompare(lHash, lHash2); - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - lookingForIndex = _tmp; - index = _tmp$1; - invalid = _tmp$2; - lookingForIndex = 1; - _r$7 = hash$1.Size(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - rest = $subslice(db, _r$7); - i = 0; - while (true) { - if (!(i < rest.$length)) { break; } - equals0 = subtle.ConstantTimeByteEq(((i < 0 || i >= rest.$length) ? ($throwRuntimeError("index out of range"), undefined) : rest.$array[rest.$offset + i]), 0); - equals1 = subtle.ConstantTimeByteEq(((i < 0 || i >= rest.$length) ? ($throwRuntimeError("index out of range"), undefined) : rest.$array[rest.$offset + i]), 1); - index = subtle.ConstantTimeSelect(lookingForIndex & equals1, i, index); - lookingForIndex = subtle.ConstantTimeSelect(equals1, 0, lookingForIndex); - invalid = subtle.ConstantTimeSelect((lookingForIndex & ~equals0) >> 0, 1, invalid); - i = i + (1) >> 0; - } - if (!(((((((firstByteIsZero & lHash2Good) & ~invalid) >> 0) & ~lookingForIndex) >> 0) === 1))) { - $s = -1; return [sliceType.nil, $pkg.ErrDecryption]; - } - $s = -1; return [$subslice(rest, (index + 1 >> 0)), $ifaceNil]; - /* */ } return; } var $f = {$blk: DecryptOAEP, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tuple, _v, c, ciphertext, db, em, equals0, equals1, err, err$1, firstByteIsZero, hash$1, i, index, invalid, k, lHash, lHash2, lHash2Good, label, lookingForIndex, m, priv, random, rest, seed, $s};return $f; - }; - $pkg.DecryptOAEP = DecryptOAEP; - emsaPSSEncode = function(mHash, emBits, salt, hash$1) { - var {_q, _r, _r$1, _r$2, _r$3, _r$4, db, em, emBits, emLen, h, hLen, hash$1, mHash, prefix, psLen, sLen, salt, x, y, $s, $r, $c} = $restore(this, {mHash, emBits, salt, hash$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = hash$1.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - hLen = _r; - sLen = salt.$length; - emLen = (_q = ((emBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (!((mHash.$length === hLen))) { - $s = -1; return [sliceType.nil, errors.New("crypto/rsa: input must be hashed with given hash")]; - } - if (emLen < ((hLen + sLen >> 0) + 2 >> 0)) { - $s = -1; return [sliceType.nil, errors.New("crypto/rsa: key size too small for PSS signature")]; - } - em = $makeSlice(sliceType, emLen); - psLen = ((emLen - sLen >> 0) - hLen >> 0) - 2 >> 0; - db = $subslice(em, 0, ((psLen + 1 >> 0) + sLen >> 0)); - h = $subslice(em, ((psLen + 1 >> 0) + sLen >> 0), (emLen - 1 >> 0)); - prefix = arrayType$1.zero(); - _r$1 = hash$1.Write(new sliceType(prefix)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = hash$1.Write(mHash); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hash$1.Write(salt); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = hash$1.Sum($subslice(h, 0, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - h = _r$4; - $r = hash$1.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ((psLen < 0 || psLen >= db.$length) ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + psLen] = 1); - $copySlice($subslice(db, (psLen + 1 >> 0)), salt); - $r = mgf1XOR(db, hash$1, h); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0] = (((0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0]) & (((y = ((($imul(8, emLen)) - emBits >> 0)), y < 32 ? (255 >>> y) : 0) << 24 >>> 24))) >>> 0)); - (x = emLen - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x] = 188)); - $s = -1; return [em, $ifaceNil]; - /* */ } return; } var $f = {$blk: emsaPSSEncode, $c: true, $r, _q, _r, _r$1, _r$2, _r$3, _r$4, db, em, emBits, emLen, h, hLen, hash$1, mHash, prefix, psLen, sLen, salt, x, y, $s};return $f; - }; - emsaPSSVerify = function(mHash, em, emBits, sLen, hash$1) { - var {_i, _q, _r, _r$1, _r$2, _r$3, _r$4, _ref, bitMask, db, e, em, emBits, emLen, h, h0, hLen, hash$1, mHash, prefix, psLen, psLen$1, sLen, salt, x, y, $s, $r, $c} = $restore(this, {mHash, em, emBits, sLen, hash$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = hash$1.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - hLen = _r; - if (sLen === -1) { - sLen = hLen; - } - emLen = (_q = ((emBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (!((emLen === em.$length))) { - $s = -1; return errors.New("rsa: internal error: inconsistent length"); - } - if (!((hLen === mHash.$length))) { - $s = -1; return $pkg.ErrVerification; - } - if (emLen < ((hLen + sLen >> 0) + 2 >> 0)) { - $s = -1; return $pkg.ErrVerification; - } - if (!(((x = emLen - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x])) === 188))) { - $s = -1; return $pkg.ErrVerification; - } - db = $subslice(em, 0, ((emLen - hLen >> 0) - 1 >> 0)); - h = $subslice(em, ((emLen - hLen >> 0) - 1 >> 0), (emLen - 1 >> 0)); - bitMask = (y = ((($imul(8, emLen)) - emBits >> 0)), y < 32 ? (255 >>> y) : 0) << 24 >>> 24; - if (!(((((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]) & (~bitMask << 24 >>> 24)) >>> 0) === 0))) { - $s = -1; return $pkg.ErrVerification; - } - $r = mgf1XOR(db, hash$1, h); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0] = (((0 >= db.$length ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + 0]) & (bitMask)) >>> 0)); - if (sLen === 0) { - psLen = bytes.IndexByte(db, 1); - if (psLen < 0) { - $s = -1; return $pkg.ErrVerification; - } - sLen = (db.$length - psLen >> 0) - 1 >> 0; - } - psLen$1 = ((emLen - hLen >> 0) - sLen >> 0) - 2 >> 0; - _ref = $subslice(db, 0, psLen$1); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((e === 0))) { - $s = -1; return $pkg.ErrVerification; - } - _i++; - } - if (!((((psLen$1 < 0 || psLen$1 >= db.$length) ? ($throwRuntimeError("index out of range"), undefined) : db.$array[db.$offset + psLen$1]) === 1))) { - $s = -1; return $pkg.ErrVerification; - } - salt = $subslice(db, (db.$length - sLen >> 0)); - prefix = arrayType$1.zero(); - _r$1 = hash$1.Write(new sliceType(prefix)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = hash$1.Write(mHash); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hash$1.Write(salt); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = hash$1.Sum(sliceType.nil); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - h0 = _r$4; - if (!bytes.Equal(h0, h)) { - $s = -1; return $pkg.ErrVerification; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: emsaPSSVerify, $c: true, $r, _i, _q, _r, _r$1, _r$2, _r$3, _r$4, _ref, bitMask, db, e, em, emBits, emLen, h, h0, hLen, hash$1, mHash, prefix, psLen, psLen$1, sLen, salt, x, y, $s};return $f; - }; - signPSSWithSalt = function(rand$1, priv, hash$1, hashed, salt) { - var {_arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _tuple, _tuple$1, c, em, emBits, err, hash$1, hashed, m, priv, rand$1, s, salt, $s, $r, $c} = $restore(this, {rand$1, priv, hash$1, hashed, salt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - emBits = priv.PublicKey.N.BitLen() - 1 >> 0; - _arg = hashed; - _arg$1 = emBits; - _arg$2 = salt; - _r = new crypto.Hash(hash$1).New(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$3 = _r; - _r$1 = emsaPSSEncode(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - em = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - m = new big.Int.ptr(false, big.nat.nil).SetBytes(em); - _r$2 = decryptAndCheck(rand$1, priv, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - c = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - s = $makeSlice(sliceType, priv.PublicKey.Size()); - $s = -1; return [c.FillBytes(s), $ifaceNil]; - /* */ } return; } var $f = {$blk: signPSSWithSalt, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r, _r$1, _r$2, _tuple, _tuple$1, c, em, emBits, err, hash$1, hashed, m, priv, rand$1, s, salt, $s};return $f; - }; - PSSOptions.ptr.prototype.HashFunc = function() { - var opts; - opts = this; - return opts.Hash; - }; - PSSOptions.prototype.HashFunc = function() { return this.$val.HashFunc(); }; - PSSOptions.ptr.prototype.saltLength = function() { - var opts; - opts = this; - if (opts === ptrType$3.nil) { - return 0; - } - return opts.SaltLength; - }; - PSSOptions.prototype.saltLength = function() { return this.$val.saltLength(); }; - SignPSS = function(rand$1, priv, hash$1, digest, opts) { - var {$24r, _1, _q, _r, _r$1, _tuple, digest, err, hash$1, opts, priv, rand$1, salt, saltLength, $s, $r, $c} = $restore(this, {rand$1, priv, hash$1, digest, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!(opts === ptrType$3.nil) && !((opts.Hash === 0))) { - hash$1 = opts.Hash; - } - saltLength = opts.saltLength(); - _1 = saltLength; - if (_1 === (0)) { - saltLength = ((_q = (((priv.PublicKey.N.BitLen() - 1 >> 0) + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) - 2 >> 0) - new crypto.Hash(hash$1).Size() >> 0; - } else if (_1 === (-1)) { - saltLength = new crypto.Hash(hash$1).Size(); - } - salt = $makeSlice(sliceType, saltLength); - _r = io.ReadFull(rand$1, salt); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - _r$1 = signPSSWithSalt(rand$1, priv, hash$1, digest, salt); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: SignPSS, $c: true, $r, $24r, _1, _q, _r, _r$1, _tuple, digest, err, hash$1, opts, priv, rand$1, salt, saltLength, $s};return $f; - }; - $pkg.SignPSS = SignPSS; - VerifyPSS = function(pub, hash$1, digest, sig, opts) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _q, _r, _r$1, _r$2, digest, em, emBits, emLen, hash$1, m, opts, pub, s, sig, $s, $r, $c} = $restore(this, {pub, hash$1, digest, sig, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((sig.$length === pub.Size()))) { - $s = -1; return $pkg.ErrVerification; - } - s = new big.Int.ptr(false, big.nat.nil).SetBytes(sig); - _r = encrypt(new big.Int.ptr(false, big.nat.nil), pub, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - m = _r; - emBits = pub.N.BitLen() - 1 >> 0; - emLen = (_q = ((emBits + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - if (m.BitLen() > ($imul(emLen, 8))) { - $s = -1; return $pkg.ErrVerification; - } - em = m.FillBytes($makeSlice(sliceType, emLen)); - _arg = digest; - _arg$1 = em; - _arg$2 = emBits; - _arg$3 = opts.saltLength(); - _r$1 = new crypto.Hash(hash$1).New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$4 = _r$1; - _r$2 = emsaPSSVerify(_arg, _arg$1, _arg$2, _arg$3, _arg$4); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: VerifyPSS, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _q, _r, _r$1, _r$2, digest, em, emBits, emLen, hash$1, m, opts, pub, s, sig, $s};return $f; - }; - $pkg.VerifyPSS = VerifyPSS; - EncryptPKCS1v15 = function(rand$1, pub, msg) { - var {_r, _r$1, _tmp, _tmp$1, c, em, err, err$1, k, m, mm, msg, ps, pub, rand$1, x, $s, $r, $c} = $restore(this, {rand$1, pub, msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = randutil.MaybeReadByte(rand$1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err = checkPub(pub); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - k = pub.Size(); - if (msg.$length > (k - 11 >> 0)) { - $s = -1; return [sliceType.nil, $pkg.ErrMessageTooLong]; - } - em = $makeSlice(sliceType, k); - (1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1] = 2); - _tmp = $subslice(em, 2, ((em.$length - msg.$length >> 0) - 1 >> 0)); - _tmp$1 = $subslice(em, (em.$length - msg.$length >> 0)); - ps = _tmp; - mm = _tmp$1; - _r = nonZeroRandomBytes(ps, rand$1); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err$1 = _r; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [sliceType.nil, err$1]; - } - (x = (em.$length - msg.$length >> 0) - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x] = 0)); - $copySlice(mm, msg); - m = new big.Int.ptr(false, big.nat.nil).SetBytes(em); - _r$1 = encrypt(new big.Int.ptr(false, big.nat.nil), pub, m); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - c = _r$1; - $s = -1; return [c.FillBytes(em), $ifaceNil]; - /* */ } return; } var $f = {$blk: EncryptPKCS1v15, $c: true, $r, _r, _r$1, _tmp, _tmp$1, c, em, err, err$1, k, m, mm, msg, ps, pub, rand$1, x, $s};return $f; - }; - $pkg.EncryptPKCS1v15 = EncryptPKCS1v15; - DecryptPKCS1v15 = function(rand$1, priv, ciphertext) { - var {_r, _tuple, ciphertext, err, err$1, index, out, priv, rand$1, valid, $s, $r, $c} = $restore(this, {rand$1, priv, ciphertext}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPub(priv.PublicKey); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - _r = decryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - valid = _tuple[0]; - out = _tuple[1]; - index = _tuple[2]; - err$1 = _tuple[3]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [sliceType.nil, err$1]; - } - if (valid === 0) { - $s = -1; return [sliceType.nil, $pkg.ErrDecryption]; - } - $s = -1; return [$subslice(out, index), $ifaceNil]; - /* */ } return; } var $f = {$blk: DecryptPKCS1v15, $c: true, $r, _r, _tuple, ciphertext, err, err$1, index, out, priv, rand$1, valid, $s};return $f; - }; - $pkg.DecryptPKCS1v15 = DecryptPKCS1v15; - DecryptPKCS1v15SessionKey = function(rand$1, priv, ciphertext, key) { - var {_r, _tuple, ciphertext, em, err, err$1, index, k, key, priv, rand$1, valid, $s, $r, $c} = $restore(this, {rand$1, priv, ciphertext, key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = checkPub(priv.PublicKey); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - k = priv.PublicKey.Size(); - if ((k - (((key.$length + 3 >> 0) + 8 >> 0)) >> 0) < 0) { - $s = -1; return $pkg.ErrDecryption; - } - _r = decryptPKCS1v15(rand$1, priv, ciphertext); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - valid = _tuple[0]; - em = _tuple[1]; - index = _tuple[2]; - err$1 = _tuple[3]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - if (!((em.$length === k))) { - $s = -1; return $pkg.ErrDecryption; - } - valid = valid & (subtle.ConstantTimeEq((((em.$length - index >> 0) >> 0)), ((key.$length >> 0)))); - subtle.ConstantTimeCopy(valid, key, $subslice(em, (em.$length - key.$length >> 0))); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: DecryptPKCS1v15SessionKey, $c: true, $r, _r, _tuple, ciphertext, em, err, err$1, index, k, key, priv, rand$1, valid, $s};return $f; - }; - $pkg.DecryptPKCS1v15SessionKey = DecryptPKCS1v15SessionKey; - decryptPKCS1v15 = function(rand$1, priv, ciphertext) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, ciphertext, em, equals0, err, firstByteIsZero, i, index, k, lookingForIndex, m, priv, rand$1, secondByteIsTwo, valid, validPS, $s, $r, $c} = $restore(this, {rand$1, priv, ciphertext}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - valid = 0; - em = sliceType.nil; - index = 0; - err = $ifaceNil; - k = priv.PublicKey.Size(); - if (k < 11) { - err = $pkg.ErrDecryption; - $s = -1; return [valid, em, index, err]; - } - c = new big.Int.ptr(false, big.nat.nil).SetBytes(ciphertext); - _r = decrypt(rand$1, priv, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - m = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [valid, em, index, err]; - } - em = m.FillBytes($makeSlice(sliceType, k)); - firstByteIsZero = subtle.ConstantTimeByteEq((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]), 0); - secondByteIsTwo = subtle.ConstantTimeByteEq((1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1]), 2); - lookingForIndex = 1; - i = 2; - while (true) { - if (!(i < em.$length)) { break; } - equals0 = subtle.ConstantTimeByteEq(((i < 0 || i >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + i]), 0); - index = subtle.ConstantTimeSelect(lookingForIndex & equals0, i, index); - lookingForIndex = subtle.ConstantTimeSelect(equals0, 0, lookingForIndex); - i = i + (1) >> 0; - } - validPS = subtle.ConstantTimeLessOrEq(10, index); - valid = ((firstByteIsZero & secondByteIsTwo) & (((~lookingForIndex >> 0) & 1))) & validPS; - index = subtle.ConstantTimeSelect(valid, index + 1 >> 0, 0); - _tmp = valid; - _tmp$1 = em; - _tmp$2 = index; - _tmp$3 = $ifaceNil; - valid = _tmp; - em = _tmp$1; - index = _tmp$2; - err = _tmp$3; - $s = -1; return [valid, em, index, err]; - /* */ } return; } var $f = {$blk: decryptPKCS1v15, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, ciphertext, em, equals0, err, firstByteIsZero, i, index, k, lookingForIndex, m, priv, rand$1, secondByteIsTwo, valid, validPS, $s};return $f; - }; - nonZeroRandomBytes = function(s, rand$1) { - var {_r, _r$1, _tuple, _tuple$1, err, i, rand$1, s, $s, $r, $c} = $restore(this, {s, rand$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - _r = io.ReadFull(rand$1, s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = 0; - /* while (true) { */ case 2: - /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 3; continue; } - /* while (true) { */ case 4: - /* if (!(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 0)) { break; } */ if(!(((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 0)) { $s = 5; continue; } - _r$1 = io.ReadFull(rand$1, $subslice(s, i, (i + 1 >> 0))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) ^ (66)) << 24 >>> 24)); - $s = 4; continue; - case 5: - i = i + (1) >> 0; - $s = 2; continue; - case 3: - $s = -1; return err; - /* */ } return; } var $f = {$blk: nonZeroRandomBytes, $c: true, $r, _r, _r$1, _tuple, _tuple$1, err, i, rand$1, s, $s};return $f; - }; - SignPKCS1v15 = function(rand$1, priv, hash$1, hashed) { - var {_r, _tuple, _tuple$1, c, em, err, hash$1, hashLen, hashed, i, k, m, prefix, priv, rand$1, tLen, $s, $r, $c} = $restore(this, {rand$1, priv, hash$1, hashed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = pkcs1v15HashInfo(hash$1, hashed.$length); - hashLen = _tuple[0]; - prefix = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - tLen = prefix.$length + hashLen >> 0; - k = priv.PublicKey.Size(); - if (k < (tLen + 11 >> 0)) { - $s = -1; return [sliceType.nil, $pkg.ErrMessageTooLong]; - } - em = $makeSlice(sliceType, k); - (1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1] = 1); - i = 2; - while (true) { - if (!(i < ((k - tLen >> 0) - 1 >> 0))) { break; } - ((i < 0 || i >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + i] = 255); - i = i + (1) >> 0; - } - $copySlice($subslice(em, (k - tLen >> 0), (k - hashLen >> 0)), prefix); - $copySlice($subslice(em, (k - hashLen >> 0), k), hashed); - m = new big.Int.ptr(false, big.nat.nil).SetBytes(em); - _r = decryptAndCheck(rand$1, priv, m); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - c = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - $s = -1; return [c.FillBytes(em), $ifaceNil]; - /* */ } return; } var $f = {$blk: SignPKCS1v15, $c: true, $r, _r, _tuple, _tuple$1, c, em, err, hash$1, hashLen, hashed, i, k, m, prefix, priv, rand$1, tLen, $s};return $f; - }; - $pkg.SignPKCS1v15 = SignPKCS1v15; - VerifyPKCS1v15 = function(pub, hash$1, hashed, sig) { - var {_r, _tuple, c, em, err, hash$1, hashLen, hashed, i, k, m, ok, prefix, pub, sig, tLen, x, $s, $r, $c} = $restore(this, {pub, hash$1, hashed, sig}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = pkcs1v15HashInfo(hash$1, hashed.$length); - hashLen = _tuple[0]; - prefix = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - tLen = prefix.$length + hashLen >> 0; - k = pub.Size(); - if (k < (tLen + 11 >> 0)) { - $s = -1; return $pkg.ErrVerification; - } - if (!((k === sig.$length))) { - $s = -1; return $pkg.ErrVerification; - } - c = new big.Int.ptr(false, big.nat.nil).SetBytes(sig); - _r = encrypt(new big.Int.ptr(false, big.nat.nil), pub, c); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - m = _r; - em = m.FillBytes($makeSlice(sliceType, k)); - ok = subtle.ConstantTimeByteEq((0 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 0]), 0); - ok = ok & (subtle.ConstantTimeByteEq((1 >= em.$length ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + 1]), 1)); - ok = ok & (subtle.ConstantTimeCompare($subslice(em, (k - hashLen >> 0), k), hashed)); - ok = ok & (subtle.ConstantTimeCompare($subslice(em, (k - tLen >> 0), (k - hashLen >> 0)), prefix)); - ok = ok & (subtle.ConstantTimeByteEq((x = (k - tLen >> 0) - 1 >> 0, ((x < 0 || x >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + x])), 0)); - i = 2; - while (true) { - if (!(i < ((k - tLen >> 0) - 1 >> 0))) { break; } - ok = ok & (subtle.ConstantTimeByteEq(((i < 0 || i >= em.$length) ? ($throwRuntimeError("index out of range"), undefined) : em.$array[em.$offset + i]), 255)); - i = i + (1) >> 0; - } - if (!((ok === 1))) { - $s = -1; return $pkg.ErrVerification; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: VerifyPKCS1v15, $c: true, $r, _r, _tuple, c, em, err, hash$1, hashLen, hashed, i, k, m, ok, prefix, pub, sig, tLen, x, $s};return $f; - }; - $pkg.VerifyPKCS1v15 = VerifyPKCS1v15; - pkcs1v15HashInfo = function(hash$1, inLen) { - var _entry, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, err, hash$1, hashLen, inLen, ok, prefix; - hashLen = 0; - prefix = sliceType.nil; - err = $ifaceNil; - if (hash$1 === 0) { - _tmp = inLen; - _tmp$1 = sliceType.nil; - _tmp$2 = $ifaceNil; - hashLen = _tmp; - prefix = _tmp$1; - err = _tmp$2; - return [hashLen, prefix, err]; - } - hashLen = new crypto.Hash(hash$1).Size(); - if (!((inLen === hashLen))) { - _tmp$3 = 0; - _tmp$4 = sliceType.nil; - _tmp$5 = errors.New("crypto/rsa: input must be hashed message"); - hashLen = _tmp$3; - prefix = _tmp$4; - err = _tmp$5; - return [hashLen, prefix, err]; - } - _tuple = (_entry = hashPrefixes[crypto.Hash.keyFor(hash$1)], _entry !== undefined ? [_entry.v, true] : [sliceType.nil, false]); - prefix = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - _tmp$6 = 0; - _tmp$7 = sliceType.nil; - _tmp$8 = errors.New("crypto/rsa: unsupported hash function"); - hashLen = _tmp$6; - prefix = _tmp$7; - err = _tmp$8; - return [hashLen, prefix, err]; - } - return [hashLen, prefix, err]; - }; - ptrType.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([crypto.PublicKey], [$Bool], false)}]; - ptrType$2.methods = [{prop: "Public", name: "Public", pkg: "", typ: $funcType([], [crypto.PublicKey], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([crypto.PrivateKey], [$Bool], false)}, {prop: "Sign", name: "Sign", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.SignerOpts], [sliceType, $error], false)}, {prop: "Decrypt", name: "Decrypt", pkg: "", typ: $funcType([io.Reader, sliceType, crypto.DecrypterOpts], [sliceType, $error], false)}, {prop: "Validate", name: "Validate", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Precompute", name: "Precompute", pkg: "", typ: $funcType([], [], false)}]; - ptrType$3.methods = [{prop: "HashFunc", name: "HashFunc", pkg: "", typ: $funcType([], [crypto.Hash], false)}, {prop: "saltLength", name: "saltLength", pkg: "crypto/rsa", typ: $funcType([], [$Int], false)}]; - PublicKey.init("", [{prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "E", name: "E", embedded: false, exported: true, typ: $Int, tag: ""}]); - OAEPOptions.init("", [{prop: "Hash", name: "Hash", embedded: false, exported: true, typ: crypto.Hash, tag: ""}, {prop: "Label", name: "Label", embedded: false, exported: true, typ: sliceType, tag: ""}]); - PrivateKey.init("", [{prop: "PublicKey", name: "PublicKey", embedded: true, exported: true, typ: PublicKey, tag: ""}, {prop: "D", name: "D", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Primes", name: "Primes", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Precomputed", name: "Precomputed", embedded: false, exported: true, typ: PrecomputedValues, tag: ""}]); - PrecomputedValues.init("", [{prop: "Dp", name: "Dp", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Dq", name: "Dq", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Qinv", name: "Qinv", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "CRTValues", name: "CRTValues", embedded: false, exported: true, typ: sliceType$2, tag: ""}]); - CRTValue.init("", [{prop: "Exp", name: "Exp", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Coeff", name: "Coeff", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "R", name: "R", embedded: false, exported: true, typ: ptrType$1, tag: ""}]); - PSSOptions.init("", [{prop: "SaltLength", name: "SaltLength", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Hash", name: "Hash", embedded: false, exported: true, typ: crypto.Hash, tag: ""}]); - PKCS1v15DecryptOptions.init("", [{prop: "SessionKeyLen", name: "SessionKeyLen", embedded: false, exported: true, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = crypto.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = randutil.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bigZero = big.NewInt(new $Int64(0, 0)); - bigOne = big.NewInt(new $Int64(0, 1)); - errPublicModulus = errors.New("crypto/rsa: missing public modulus"); - errPublicExponentSmall = errors.New("crypto/rsa: public exponent too small"); - errPublicExponentLarge = errors.New("crypto/rsa: public exponent too large"); - $pkg.ErrMessageTooLong = errors.New("crypto/rsa: message too long for RSA public key size"); - $pkg.ErrDecryption = errors.New("crypto/rsa: decryption error"); - $pkg.ErrVerification = errors.New("crypto/rsa: verification error"); - hashPrefixes = $makeMap(crypto.Hash.keyFor, [{ k: 2, v: new sliceType([48, 32, 48, 12, 6, 8, 42, 134, 72, 134, 247, 13, 2, 5, 5, 0, 4, 16]) }, { k: 3, v: new sliceType([48, 33, 48, 9, 6, 5, 43, 14, 3, 2, 26, 5, 0, 4, 20]) }, { k: 4, v: new sliceType([48, 45, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 4, 5, 0, 4, 28]) }, { k: 5, v: new sliceType([48, 49, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 4, 32]) }, { k: 6, v: new sliceType([48, 65, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 4, 48]) }, { k: 7, v: new sliceType([48, 81, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 4, 64]) }, { k: 8, v: new sliceType([]) }, { k: 9, v: new sliceType([48, 32, 48, 8, 6, 6, 40, 207, 6, 3, 0, 49, 4, 20]) }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/sha1"] = (function() { - var $pkg = {}, $init, crypto, binary, errors, hash, bits, digest, arrayType, sliceType, arrayType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, ptrType, block, blockGeneric, init, appendUint64, appendUint32, consumeUint64, consumeUint32, New; - crypto = $packages["crypto"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - hash = $packages["hash"]; - bits = $packages["math/bits"]; - digest = $pkg.digest = $newType(0, $kindStruct, "sha1.digest", true, "crypto/sha1", false, function(h_, x_, nx_, len_) { - this.$val = this; - if (arguments.length === 0) { - this.h = arrayType$3.zero(); - this.x = arrayType$4.zero(); - this.nx = 0; - this.len = new $Uint64(0, 0); - return; - } - this.h = h_; - this.x = x_; - this.nx = nx_; - this.len = len_; - }); - arrayType = $arrayType($Uint32, 16); - sliceType = $sliceType($Uint8); - arrayType$1 = $arrayType($Uint8, 8); - arrayType$2 = $arrayType($Uint8, 4); - arrayType$3 = $arrayType($Uint32, 5); - arrayType$4 = $arrayType($Uint8, 64); - arrayType$5 = $arrayType($Uint8, 20); - ptrType = $ptrType(digest); - block = function(dig, p) { - var dig, p; - blockGeneric(dig, p); - }; - blockGeneric = function(dig, p) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, b, c, d, dig, e, f, f$1, f$2, f$3, f$4, h0, h1, h2, h3, h4, i, i$1, j, p, t, t$1, t$2, t$3, t$4, tmp, tmp$1, tmp$2, tmp$3, w, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - w = arrayType.zero(); - _tmp = dig.h[0]; - _tmp$1 = dig.h[1]; - _tmp$2 = dig.h[2]; - _tmp$3 = dig.h[3]; - _tmp$4 = dig.h[4]; - h0 = _tmp; - h1 = _tmp$1; - h2 = _tmp$2; - h3 = _tmp$3; - h4 = _tmp$4; - while (true) { - if (!(p.$length >= 64)) { break; } - i = 0; - while (true) { - if (!(i < 16)) { break; } - j = $imul(i, 4); - ((i < 0 || i >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i] = (((((((((((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) >>> 0)) << 24 >>> 0) | ((((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$2 = j + 3 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])) >>> 0))) >>> 0)); - i = i + (1) >> 0; - } - _tmp$5 = h0; - _tmp$6 = h1; - _tmp$7 = h2; - _tmp$8 = h3; - _tmp$9 = h4; - a = _tmp$5; - b = _tmp$6; - c = _tmp$7; - d = _tmp$8; - e = _tmp$9; - i$1 = 0; - while (true) { - if (!(i$1 < 16)) { break; } - f = (((b & c) >>> 0) | ((((~b >>> 0)) & d) >>> 0)) >>> 0; - t = (((bits.RotateLeft32(a, 5) + f >>> 0) + e >>> 0) + (x$3 = i$1 & 15, ((x$3 < 0 || x$3 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$3])) >>> 0) + 1518500249 >>> 0; - _tmp$10 = t; - _tmp$11 = a; - _tmp$12 = bits.RotateLeft32(b, 30); - _tmp$13 = c; - _tmp$14 = d; - a = _tmp$10; - b = _tmp$11; - c = _tmp$12; - d = _tmp$13; - e = _tmp$14; - i$1 = i$1 + (1) >> 0; - } - while (true) { - if (!(i$1 < 20)) { break; } - tmp = ((((((x$4 = ((i$1 - 3 >> 0)) & 15, ((x$4 < 0 || x$4 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$4])) ^ (x$5 = ((i$1 - 8 >> 0)) & 15, ((x$5 < 0 || x$5 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$5]))) >>> 0) ^ (x$6 = ((i$1 - 14 >> 0)) & 15, ((x$6 < 0 || x$6 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$6]))) >>> 0) ^ (x$7 = (i$1) & 15, ((x$7 < 0 || x$7 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$7]))) >>> 0; - (x$8 = i$1 & 15, ((x$8 < 0 || x$8 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$8] = (((tmp << 1 >>> 0) | (tmp >>> 31 >>> 0)) >>> 0))); - f$1 = (((b & c) >>> 0) | ((((~b >>> 0)) & d) >>> 0)) >>> 0; - t$1 = (((bits.RotateLeft32(a, 5) + f$1 >>> 0) + e >>> 0) + (x$9 = i$1 & 15, ((x$9 < 0 || x$9 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$9])) >>> 0) + 1518500249 >>> 0; - _tmp$15 = t$1; - _tmp$16 = a; - _tmp$17 = bits.RotateLeft32(b, 30); - _tmp$18 = c; - _tmp$19 = d; - a = _tmp$15; - b = _tmp$16; - c = _tmp$17; - d = _tmp$18; - e = _tmp$19; - i$1 = i$1 + (1) >> 0; - } - while (true) { - if (!(i$1 < 40)) { break; } - tmp$1 = ((((((x$10 = ((i$1 - 3 >> 0)) & 15, ((x$10 < 0 || x$10 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$10])) ^ (x$11 = ((i$1 - 8 >> 0)) & 15, ((x$11 < 0 || x$11 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$11]))) >>> 0) ^ (x$12 = ((i$1 - 14 >> 0)) & 15, ((x$12 < 0 || x$12 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$12]))) >>> 0) ^ (x$13 = (i$1) & 15, ((x$13 < 0 || x$13 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$13]))) >>> 0; - (x$14 = i$1 & 15, ((x$14 < 0 || x$14 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$14] = (((tmp$1 << 1 >>> 0) | (tmp$1 >>> 31 >>> 0)) >>> 0))); - f$2 = (((b ^ c) >>> 0) ^ d) >>> 0; - t$2 = (((bits.RotateLeft32(a, 5) + f$2 >>> 0) + e >>> 0) + (x$15 = i$1 & 15, ((x$15 < 0 || x$15 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$15])) >>> 0) + 1859775393 >>> 0; - _tmp$20 = t$2; - _tmp$21 = a; - _tmp$22 = bits.RotateLeft32(b, 30); - _tmp$23 = c; - _tmp$24 = d; - a = _tmp$20; - b = _tmp$21; - c = _tmp$22; - d = _tmp$23; - e = _tmp$24; - i$1 = i$1 + (1) >> 0; - } - while (true) { - if (!(i$1 < 60)) { break; } - tmp$2 = ((((((x$16 = ((i$1 - 3 >> 0)) & 15, ((x$16 < 0 || x$16 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$16])) ^ (x$17 = ((i$1 - 8 >> 0)) & 15, ((x$17 < 0 || x$17 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$17]))) >>> 0) ^ (x$18 = ((i$1 - 14 >> 0)) & 15, ((x$18 < 0 || x$18 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$18]))) >>> 0) ^ (x$19 = (i$1) & 15, ((x$19 < 0 || x$19 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$19]))) >>> 0; - (x$20 = i$1 & 15, ((x$20 < 0 || x$20 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$20] = (((tmp$2 << 1 >>> 0) | (tmp$2 >>> 31 >>> 0)) >>> 0))); - f$3 = (((((((b | c) >>> 0)) & d) >>> 0)) | (((b & c) >>> 0))) >>> 0; - t$3 = (((bits.RotateLeft32(a, 5) + f$3 >>> 0) + e >>> 0) + (x$21 = i$1 & 15, ((x$21 < 0 || x$21 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$21])) >>> 0) + 2400959708 >>> 0; - _tmp$25 = t$3; - _tmp$26 = a; - _tmp$27 = bits.RotateLeft32(b, 30); - _tmp$28 = c; - _tmp$29 = d; - a = _tmp$25; - b = _tmp$26; - c = _tmp$27; - d = _tmp$28; - e = _tmp$29; - i$1 = i$1 + (1) >> 0; - } - while (true) { - if (!(i$1 < 80)) { break; } - tmp$3 = ((((((x$22 = ((i$1 - 3 >> 0)) & 15, ((x$22 < 0 || x$22 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$22])) ^ (x$23 = ((i$1 - 8 >> 0)) & 15, ((x$23 < 0 || x$23 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$23]))) >>> 0) ^ (x$24 = ((i$1 - 14 >> 0)) & 15, ((x$24 < 0 || x$24 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$24]))) >>> 0) ^ (x$25 = (i$1) & 15, ((x$25 < 0 || x$25 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$25]))) >>> 0; - (x$26 = i$1 & 15, ((x$26 < 0 || x$26 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$26] = (((tmp$3 << 1 >>> 0) | (tmp$3 >>> 31 >>> 0)) >>> 0))); - f$4 = (((b ^ c) >>> 0) ^ d) >>> 0; - t$4 = (((bits.RotateLeft32(a, 5) + f$4 >>> 0) + e >>> 0) + (x$27 = i$1 & 15, ((x$27 < 0 || x$27 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$27])) >>> 0) + 3395469782 >>> 0; - _tmp$30 = t$4; - _tmp$31 = a; - _tmp$32 = bits.RotateLeft32(b, 30); - _tmp$33 = c; - _tmp$34 = d; - a = _tmp$30; - b = _tmp$31; - c = _tmp$32; - d = _tmp$33; - e = _tmp$34; - i$1 = i$1 + (1) >> 0; - } - h0 = h0 + (a) >>> 0; - h1 = h1 + (b) >>> 0; - h2 = h2 + (c) >>> 0; - h3 = h3 + (d) >>> 0; - h4 = h4 + (e) >>> 0; - p = $subslice(p, 64); - } - _tmp$35 = h0; - _tmp$36 = h1; - _tmp$37 = h2; - _tmp$38 = h3; - _tmp$39 = h4; - dig.h[0] = _tmp$35; - dig.h[1] = _tmp$36; - dig.h[2] = _tmp$37; - dig.h[3] = _tmp$38; - dig.h[4] = _tmp$39; - }; - init = function() { - crypto.RegisterHash(3, New); - }; - digest.ptr.prototype.MarshalBinary = function() { - var b, d; - d = this; - b = $makeSlice(sliceType, 0, 96); - b = $appendSlice(b, "sha\x01"); - b = appendUint32(b, d.h[0]); - b = appendUint32(b, d.h[1]); - b = appendUint32(b, d.h[2]); - b = appendUint32(b, d.h[3]); - b = appendUint32(b, d.h[4]); - b = $appendSlice(b, $subslice(new sliceType(d.x), 0, d.nx)); - b = $subslice(b, 0, ((b.$length + 64 >> 0) - (d.nx) >> 0)); - b = appendUint64(b, d.len); - return [b, $ifaceNil]; - }; - digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - digest.ptr.prototype.UnmarshalBinary = function(b) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, b, d; - d = this; - if (b.$length < 4 || !(($bytesToString($subslice(b, 0, 4))) === "sha\x01")) { - return errors.New("crypto/sha1: invalid hash state identifier"); - } - if (!((b.$length === 96))) { - return errors.New("crypto/sha1: invalid hash state size"); - } - b = $subslice(b, 4); - _tuple = consumeUint32(b); - b = _tuple[0]; - d.h[0] = _tuple[1]; - _tuple$1 = consumeUint32(b); - b = _tuple$1[0]; - d.h[1] = _tuple$1[1]; - _tuple$2 = consumeUint32(b); - b = _tuple$2[0]; - d.h[2] = _tuple$2[1]; - _tuple$3 = consumeUint32(b); - b = _tuple$3[0]; - d.h[3] = _tuple$3[1]; - _tuple$4 = consumeUint32(b); - b = _tuple$4[0]; - d.h[4] = _tuple$4[1]; - b = $subslice(b, $copySlice(new sliceType(d.x), b)); - _tuple$5 = consumeUint64(b); - b = _tuple$5[0]; - d.len = _tuple$5[1]; - d.nx = (($div64(d.len, new $Uint64(0, 64), true).$low >> 0)); - return $ifaceNil; - }; - digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - appendUint64 = function(b, x) { - var a, b, x; - a = arrayType$1.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(new sliceType(a), x); - return $appendSlice(b, new sliceType(a)); - }; - appendUint32 = function(b, x) { - var a, b, x; - a = arrayType$2.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint32(new sliceType(a), x); - return $appendSlice(b, new sliceType(a)); - }; - consumeUint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - return [$subslice(b, 8), x$14]; - }; - consumeUint32 = function(b) { - var b, x; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - x = ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; - return [$subslice(b, 4), x]; - }; - digest.ptr.prototype.Reset = function() { - var d; - d = this; - d.h[0] = 1732584193; - d.h[1] = 4023233417; - d.h[2] = 2562383102; - d.h[3] = 271733878; - d.h[4] = 3285377520; - d.nx = 0; - d.len = new $Uint64(0, 0); - }; - digest.prototype.Reset = function() { return this.$val.Reset(); }; - New = function() { - var d; - d = new digest.ptr(arrayType$3.zero(), arrayType$4.zero(), 0, new $Uint64(0, 0)); - d.Reset(); - return d; - }; - $pkg.New = New; - digest.ptr.prototype.Size = function() { - var d; - d = this; - return 20; - }; - digest.prototype.Size = function() { return this.$val.Size(); }; - digest.ptr.prototype.BlockSize = function() { - var d; - d = this; - return 64; - }; - digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - digest.ptr.prototype.Write = function(p) { - var d, err, n, n$1, nn, p, x, x$1; - nn = 0; - err = $ifaceNil; - d = this; - nn = p.$length; - d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - if (d.nx > 0) { - n = $copySlice($subslice(new sliceType(d.x), d.nx), p); - d.nx = d.nx + (n) >> 0; - if (d.nx === 64) { - block(d, new sliceType(d.x)); - d.nx = 0; - } - p = $subslice(p, n); - } - if (p.$length >= 64) { - n$1 = (p.$length & ~63) >> 0; - block(d, $subslice(p, 0, n$1)); - p = $subslice(p, n$1); - } - if (p.$length > 0) { - d.nx = $copySlice(new sliceType(d.x), p); - } - return [nn, err]; - }; - digest.prototype.Write = function(p) { return this.$val.Write(p); }; - digest.ptr.prototype.Sum = function(in$1) { - var d, d0, hash$1, in$1; - d = this; - d0 = $clone(d, digest); - hash$1 = $clone(d0.checkSum(), arrayType$5); - return $appendSlice(in$1, new sliceType(hash$1)); - }; - digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; - digest.ptr.prototype.checkSum = function() { - var d, digest$1, len, tmp, x, x$1, x$2; - d = this; - len = d.len; - tmp = arrayType$4.zero(); - tmp[0] = 128; - if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { - d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$1.$high, 56 - x$1.$low))))); - } else { - d.Write($subslice(new sliceType(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$2.$high, 120 - x$2.$low))))); - } - len = $shiftLeft64(len, (3)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(new sliceType(tmp), len); - d.Write($subslice(new sliceType(tmp), 0, 8)); - if (!((d.nx === 0))) { - $panic(new $String("d.nx != 0")); - } - digest$1 = arrayType$5.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType(digest$1), 0), d.h[0]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType(digest$1), 4), d.h[1]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType(digest$1), 8), d.h[2]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType(digest$1), 12), d.h[3]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType(digest$1), 16), d.h[4]); - return digest$1; - }; - digest.prototype.checkSum = function() { return this.$val.checkSum(); }; - digest.ptr.prototype.ConstantTimeSum = function(in$1) { - var d, d0, hash$1, in$1; - d = this; - d0 = $clone(d, digest); - hash$1 = $clone(d0.constSum(), arrayType$5); - return $appendSlice(in$1, new sliceType(hash$1)); - }; - digest.prototype.ConstantTimeSum = function(in$1) { return this.$val.ConstantTimeSum(in$1); }; - digest.ptr.prototype.constSum = function() { - var _i, _i$1, _index, _index$1, _index$2, _index$3, _ref, _ref$1, d, digest$1, i, i$1, i$2, i$3, i$4, l, length, mask, mask1b, nx, s, s$1, separator, t, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - d = this; - length = arrayType$1.zero(); - l = $shiftLeft64(d.len, 3); - i = 0; - while (true) { - if (!(i < 8)) { break; } - ((i < 0 || i >= length.length) ? ($throwRuntimeError("index out of range"), undefined) : length[i] = (($shiftRightUint64(l, ((56 - (8 * i >>> 0) >>> 0))).$low << 24 >>> 24))); - i = i + (1) >>> 0; - } - nx = ((d.nx << 24 >>> 24)); - t = nx - 56 << 24 >>> 24; - mask1b = (((((t << 24 >> 24)) >> 7 << 24 >> 24) << 24 >>> 24)); - separator = 128; - i$1 = 0; - while (true) { - if (!(i$1 < 64)) { break; } - mask = ((((((i$1 - nx << 24 >>> 24) << 24 >> 24)) >> 7 << 24 >> 24) << 24 >>> 24)); - (x$1 = d.x, ((i$1 < 0 || i$1 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i$1] = ((((((~mask << 24 >>> 24) & separator) >>> 0)) | (((mask & (x = d.x, ((i$1 < 0 || i$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i$1]))) >>> 0))) >>> 0))); - separator = (separator & (mask)) >>> 0; - if (i$1 >= 56) { - (x$4 = d.x, ((i$1 < 0 || i$1 >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[i$1] = (((x$2 = d.x, ((i$1 < 0 || i$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i$1])) | (((mask1b & (x$3 = i$1 - 56 << 24 >>> 24, ((x$3 < 0 || x$3 >= length.length) ? ($throwRuntimeError("index out of range"), undefined) : length[x$3]))) >>> 0))) >>> 0))); - } - i$1 = i$1 + (1) << 24 >>> 24; - } - block(d, new sliceType(d.x)); - digest$1 = arrayType$5.zero(); - _ref = d.h; - _i = 0; - while (true) { - if (!(_i < 5)) { break; } - i$2 = _i; - s = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); - (x$5 = $imul(i$2, 4), ((x$5 < 0 || x$5 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$5] = ((mask1b & (((s >>> 24 >>> 0) << 24 >>> 24))) >>> 0))); - (x$6 = ($imul(i$2, 4)) + 1 >> 0, ((x$6 < 0 || x$6 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$6] = ((mask1b & (((s >>> 16 >>> 0) << 24 >>> 24))) >>> 0))); - (x$7 = ($imul(i$2, 4)) + 2 >> 0, ((x$7 < 0 || x$7 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$7] = ((mask1b & (((s >>> 8 >>> 0) << 24 >>> 24))) >>> 0))); - (x$8 = ($imul(i$2, 4)) + 3 >> 0, ((x$8 < 0 || x$8 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[x$8] = ((mask1b & ((s << 24 >>> 24))) >>> 0))); - _i++; - } - i$3 = 0; - while (true) { - if (!(i$3 < 64)) { break; } - if (i$3 < 56) { - (x$9 = d.x, ((i$3 < 0 || i$3 >= x$9.length) ? ($throwRuntimeError("index out of range"), undefined) : x$9[i$3] = separator)); - separator = 0; - } else { - (x$11 = d.x, ((i$3 < 0 || i$3 >= x$11.length) ? ($throwRuntimeError("index out of range"), undefined) : x$11[i$3] = (x$10 = i$3 - 56 << 24 >>> 24, ((x$10 < 0 || x$10 >= length.length) ? ($throwRuntimeError("index out of range"), undefined) : length[x$10])))); - } - i$3 = i$3 + (1) << 24 >>> 24; - } - block(d, new sliceType(d.x)); - _ref$1 = d.h; - _i$1 = 0; - while (true) { - if (!(_i$1 < 5)) { break; } - i$4 = _i$1; - s$1 = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); - _index = $imul(i$4, 4); - ((_index < 0 || _index >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index] = ((((_index < 0 || _index >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index]) | ((((~mask1b << 24 >>> 24) & (((s$1 >>> 24 >>> 0) << 24 >>> 24))) >>> 0))) >>> 0)); - _index$1 = ($imul(i$4, 4)) + 1 >> 0; - ((_index$1 < 0 || _index$1 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$1] = ((((_index$1 < 0 || _index$1 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$1]) | ((((~mask1b << 24 >>> 24) & (((s$1 >>> 16 >>> 0) << 24 >>> 24))) >>> 0))) >>> 0)); - _index$2 = ($imul(i$4, 4)) + 2 >> 0; - ((_index$2 < 0 || _index$2 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$2] = ((((_index$2 < 0 || _index$2 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$2]) | ((((~mask1b << 24 >>> 24) & (((s$1 >>> 8 >>> 0) << 24 >>> 24))) >>> 0))) >>> 0)); - _index$3 = ($imul(i$4, 4)) + 3 >> 0; - ((_index$3 < 0 || _index$3 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$3] = ((((_index$3 < 0 || _index$3 >= digest$1.length) ? ($throwRuntimeError("index out of range"), undefined) : digest$1[_index$3]) | ((((~mask1b << 24 >>> 24) & ((s$1 << 24 >>> 24))) >>> 0))) >>> 0)); - _i$1++; - } - return digest$1; - }; - digest.prototype.constSum = function() { return this.$val.constSum(); }; - ptrType.methods = [{prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/sha1", typ: $funcType([], [arrayType$5], false)}, {prop: "ConstantTimeSum", name: "ConstantTimeSum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "constSum", name: "constSum", pkg: "crypto/sha1", typ: $funcType([], [arrayType$5], false)}]; - digest.init("crypto/sha1", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/sha256"] = (function() { - var $pkg = {}, $init, crypto, binary, errors, hash, bits, digest, sliceType, arrayType, sliceType$1, arrayType$1, arrayType$2, arrayType$3, arrayType$4, arrayType$5, arrayType$6, ptrType, ptrType$1, _K, block, blockGeneric, init, appendUint64, appendUint32, consumeUint64, consumeUint32, New, New224, Sum224; - crypto = $packages["crypto"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - hash = $packages["hash"]; - bits = $packages["math/bits"]; - digest = $pkg.digest = $newType(0, $kindStruct, "sha256.digest", true, "crypto/sha256", false, function(h_, x_, nx_, len_, is224_) { - this.$val = this; - if (arguments.length === 0) { - this.h = arrayType$3.zero(); - this.x = arrayType$4.zero(); - this.nx = 0; - this.len = new $Uint64(0, 0); - this.is224 = false; - return; - } - this.h = h_; - this.x = x_; - this.nx = nx_; - this.len = len_; - this.is224 = is224_; - }); - sliceType = $sliceType($Uint32); - arrayType = $arrayType($Uint32, 64); - sliceType$1 = $sliceType($Uint8); - arrayType$1 = $arrayType($Uint8, 8); - arrayType$2 = $arrayType($Uint8, 4); - arrayType$3 = $arrayType($Uint32, 8); - arrayType$4 = $arrayType($Uint8, 64); - arrayType$5 = $arrayType($Uint8, 32); - arrayType$6 = $arrayType($Uint8, 28); - ptrType = $ptrType(arrayType$6); - ptrType$1 = $ptrType(digest); - block = function(dig, p) { - var dig, p; - blockGeneric(dig, p); - }; - blockGeneric = function(dig, p) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, b, c, d, dig, e, f, g, h, h0, h1, h2, h3, h4, h5, h6, h7, i, i$1, i$2, j, p, t1, t1$1, t2, t2$1, v1, v2, w, x, x$1, x$2, x$3, x$4, x$5, x$6; - w = arrayType.zero(); - _tmp = dig.h[0]; - _tmp$1 = dig.h[1]; - _tmp$2 = dig.h[2]; - _tmp$3 = dig.h[3]; - _tmp$4 = dig.h[4]; - _tmp$5 = dig.h[5]; - _tmp$6 = dig.h[6]; - _tmp$7 = dig.h[7]; - h0 = _tmp; - h1 = _tmp$1; - h2 = _tmp$2; - h3 = _tmp$3; - h4 = _tmp$4; - h5 = _tmp$5; - h6 = _tmp$6; - h7 = _tmp$7; - while (true) { - if (!(p.$length >= 64)) { break; } - i = 0; - while (true) { - if (!(i < 16)) { break; } - j = $imul(i, 4); - ((i < 0 || i >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i] = (((((((((((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) >>> 0)) << 24 >>> 0) | ((((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) >>> 0)) << 16 >>> 0)) >>> 0) | ((((x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0)) << 8 >>> 0)) >>> 0) | (((x$2 = j + 3 >> 0, ((x$2 < 0 || x$2 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$2])) >>> 0))) >>> 0)); - i = i + (1) >> 0; - } - i$1 = 16; - while (true) { - if (!(i$1 < 64)) { break; } - v1 = (x$3 = i$1 - 2 >> 0, ((x$3 < 0 || x$3 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$3])); - t1 = ((((bits.RotateLeft32(v1, -17)) ^ (bits.RotateLeft32(v1, -19))) >>> 0) ^ ((v1 >>> 10 >>> 0))) >>> 0; - v2 = (x$4 = i$1 - 15 >> 0, ((x$4 < 0 || x$4 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$4])); - t2 = ((((bits.RotateLeft32(v2, -7)) ^ (bits.RotateLeft32(v2, -18))) >>> 0) ^ ((v2 >>> 3 >>> 0))) >>> 0; - ((i$1 < 0 || i$1 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$1] = (((t1 + (x$5 = i$1 - 7 >> 0, ((x$5 < 0 || x$5 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$5])) >>> 0) + t2 >>> 0) + (x$6 = i$1 - 16 >> 0, ((x$6 < 0 || x$6 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[x$6])) >>> 0)); - i$1 = i$1 + (1) >> 0; - } - _tmp$8 = h0; - _tmp$9 = h1; - _tmp$10 = h2; - _tmp$11 = h3; - _tmp$12 = h4; - _tmp$13 = h5; - _tmp$14 = h6; - _tmp$15 = h7; - a = _tmp$8; - b = _tmp$9; - c = _tmp$10; - d = _tmp$11; - e = _tmp$12; - f = _tmp$13; - g = _tmp$14; - h = _tmp$15; - i$2 = 0; - while (true) { - if (!(i$2 < 64)) { break; } - t1$1 = (((h + ((((((bits.RotateLeft32(e, -6)) ^ (bits.RotateLeft32(e, -11))) >>> 0) ^ (bits.RotateLeft32(e, -25))) >>> 0)) >>> 0) + ((((((e & f) >>> 0)) ^ ((((~e >>> 0) & g) >>> 0))) >>> 0)) >>> 0) + ((i$2 < 0 || i$2 >= _K.$length) ? ($throwRuntimeError("index out of range"), undefined) : _K.$array[_K.$offset + i$2]) >>> 0) + ((i$2 < 0 || i$2 >= w.length) ? ($throwRuntimeError("index out of range"), undefined) : w[i$2]) >>> 0; - t2$1 = ((((((bits.RotateLeft32(a, -2)) ^ (bits.RotateLeft32(a, -13))) >>> 0) ^ (bits.RotateLeft32(a, -22))) >>> 0)) + ((((((((a & b) >>> 0)) ^ (((a & c) >>> 0))) >>> 0) ^ (((b & c) >>> 0))) >>> 0)) >>> 0; - h = g; - g = f; - f = e; - e = d + t1$1 >>> 0; - d = c; - c = b; - b = a; - a = t1$1 + t2$1 >>> 0; - i$2 = i$2 + (1) >> 0; - } - h0 = h0 + (a) >>> 0; - h1 = h1 + (b) >>> 0; - h2 = h2 + (c) >>> 0; - h3 = h3 + (d) >>> 0; - h4 = h4 + (e) >>> 0; - h5 = h5 + (f) >>> 0; - h6 = h6 + (g) >>> 0; - h7 = h7 + (h) >>> 0; - p = $subslice(p, 64); - } - _tmp$16 = h0; - _tmp$17 = h1; - _tmp$18 = h2; - _tmp$19 = h3; - _tmp$20 = h4; - _tmp$21 = h5; - _tmp$22 = h6; - _tmp$23 = h7; - dig.h[0] = _tmp$16; - dig.h[1] = _tmp$17; - dig.h[2] = _tmp$18; - dig.h[3] = _tmp$19; - dig.h[4] = _tmp$20; - dig.h[5] = _tmp$21; - dig.h[6] = _tmp$22; - dig.h[7] = _tmp$23; - }; - init = function() { - crypto.RegisterHash(4, New224); - crypto.RegisterHash(5, New); - }; - digest.ptr.prototype.MarshalBinary = function() { - var b, d; - d = this; - b = $makeSlice(sliceType$1, 0, 108); - if (d.is224) { - b = $appendSlice(b, "sha\x02"); - } else { - b = $appendSlice(b, "sha\x03"); - } - b = appendUint32(b, d.h[0]); - b = appendUint32(b, d.h[1]); - b = appendUint32(b, d.h[2]); - b = appendUint32(b, d.h[3]); - b = appendUint32(b, d.h[4]); - b = appendUint32(b, d.h[5]); - b = appendUint32(b, d.h[6]); - b = appendUint32(b, d.h[7]); - b = $appendSlice(b, $subslice(new sliceType$1(d.x), 0, d.nx)); - b = $subslice(b, 0, ((b.$length + 64 >> 0) - (d.nx) >> 0)); - b = appendUint64(b, d.len); - return [b, $ifaceNil]; - }; - digest.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - digest.ptr.prototype.UnmarshalBinary = function(b) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, b, d; - d = this; - if (b.$length < 4 || (d.is224 && !(($bytesToString($subslice(b, 0, 4))) === "sha\x02")) || (!d.is224 && !(($bytesToString($subslice(b, 0, 4))) === "sha\x03"))) { - return errors.New("crypto/sha256: invalid hash state identifier"); - } - if (!((b.$length === 108))) { - return errors.New("crypto/sha256: invalid hash state size"); - } - b = $subslice(b, 4); - _tuple = consumeUint32(b); - b = _tuple[0]; - d.h[0] = _tuple[1]; - _tuple$1 = consumeUint32(b); - b = _tuple$1[0]; - d.h[1] = _tuple$1[1]; - _tuple$2 = consumeUint32(b); - b = _tuple$2[0]; - d.h[2] = _tuple$2[1]; - _tuple$3 = consumeUint32(b); - b = _tuple$3[0]; - d.h[3] = _tuple$3[1]; - _tuple$4 = consumeUint32(b); - b = _tuple$4[0]; - d.h[4] = _tuple$4[1]; - _tuple$5 = consumeUint32(b); - b = _tuple$5[0]; - d.h[5] = _tuple$5[1]; - _tuple$6 = consumeUint32(b); - b = _tuple$6[0]; - d.h[6] = _tuple$6[1]; - _tuple$7 = consumeUint32(b); - b = _tuple$7[0]; - d.h[7] = _tuple$7[1]; - b = $subslice(b, $copySlice(new sliceType$1(d.x), b)); - _tuple$8 = consumeUint64(b); - b = _tuple$8[0]; - d.len = _tuple$8[1]; - d.nx = (($div64(d.len, new $Uint64(0, 64), true).$low >> 0)); - return $ifaceNil; - }; - digest.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - appendUint64 = function(b, x) { - var a, b, x; - a = arrayType$1.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(new sliceType$1(a), x); - return $appendSlice(b, new sliceType$1(a)); - }; - appendUint32 = function(b, x) { - var a, b, x; - a = arrayType$2.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint32(new sliceType$1(a), x); - return $appendSlice(b, new sliceType$1(a)); - }; - consumeUint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - x$14 = (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - return [$subslice(b, 8), x$14]; - }; - consumeUint32 = function(b) { - var b, x; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - x = ((((((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >>> 0)) | ((((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >>> 0)) << 16 >>> 0)) >>> 0) | ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 0)) << 24 >>> 0)) >>> 0; - return [$subslice(b, 4), x]; - }; - digest.ptr.prototype.Reset = function() { - var d; - d = this; - if (!d.is224) { - d.h[0] = 1779033703; - d.h[1] = 3144134277; - d.h[2] = 1013904242; - d.h[3] = 2773480762; - d.h[4] = 1359893119; - d.h[5] = 2600822924; - d.h[6] = 528734635; - d.h[7] = 1541459225; - } else { - d.h[0] = 3238371032; - d.h[1] = 914150663; - d.h[2] = 812702999; - d.h[3] = 4144912697; - d.h[4] = 4290775857; - d.h[5] = 1750603025; - d.h[6] = 1694076839; - d.h[7] = 3204075428; - } - d.nx = 0; - d.len = new $Uint64(0, 0); - }; - digest.prototype.Reset = function() { return this.$val.Reset(); }; - New = function() { - var d; - d = new digest.ptr(arrayType$3.zero(), arrayType$4.zero(), 0, new $Uint64(0, 0), false); - d.Reset(); - return d; - }; - $pkg.New = New; - New224 = function() { - var d; - d = new digest.ptr(arrayType$3.zero(), arrayType$4.zero(), 0, new $Uint64(0, 0), false); - d.is224 = true; - d.Reset(); - return d; - }; - $pkg.New224 = New224; - digest.ptr.prototype.Size = function() { - var d; - d = this; - if (!d.is224) { - return 32; - } - return 28; - }; - digest.prototype.Size = function() { return this.$val.Size(); }; - digest.ptr.prototype.BlockSize = function() { - var d; - d = this; - return 64; - }; - digest.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - digest.ptr.prototype.Write = function(p) { - var d, err, n, n$1, nn, p, x, x$1; - nn = 0; - err = $ifaceNil; - d = this; - nn = p.$length; - d.len = (x = d.len, x$1 = (new $Uint64(0, nn)), new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - if (d.nx > 0) { - n = $copySlice($subslice(new sliceType$1(d.x), d.nx), p); - d.nx = d.nx + (n) >> 0; - if (d.nx === 64) { - block(d, new sliceType$1(d.x)); - d.nx = 0; - } - p = $subslice(p, n); - } - if (p.$length >= 64) { - n$1 = (p.$length & ~63) >> 0; - block(d, $subslice(p, 0, n$1)); - p = $subslice(p, n$1); - } - if (p.$length > 0) { - d.nx = $copySlice(new sliceType$1(d.x), p); - } - return [nn, err]; - }; - digest.prototype.Write = function(p) { return this.$val.Write(p); }; - digest.ptr.prototype.Sum = function(in$1) { - var d, d0, hash$1, in$1; - d = this; - d0 = $clone(d, digest); - hash$1 = $clone(d0.checkSum(), arrayType$5); - if (d0.is224) { - return $appendSlice(in$1, $subslice(new sliceType$1(hash$1), 0, 28)); - } - return $appendSlice(in$1, new sliceType$1(hash$1)); - }; - digest.prototype.Sum = function(in$1) { return this.$val.Sum(in$1); }; - digest.ptr.prototype.checkSum = function() { - var d, digest$1, len, tmp, x, x$1, x$2; - d = this; - len = d.len; - tmp = arrayType$4.zero(); - tmp[0] = 128; - if ((x = $div64(len, new $Uint64(0, 64), true), (x.$high < 0 || (x.$high === 0 && x.$low < 56)))) { - d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$1 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$1.$high, 56 - x$1.$low))))); - } else { - d.Write($subslice(new sliceType$1(tmp), 0, $flatten64((x$2 = $div64(len, new $Uint64(0, 64), true), new $Uint64(0 - x$2.$high, 120 - x$2.$low))))); - } - len = $shiftLeft64(len, (3)); - $clone(binary.BigEndian, binary.bigEndian).PutUint64(new sliceType$1(tmp), len); - d.Write($subslice(new sliceType$1(tmp), 0, 8)); - if (!((d.nx === 0))) { - $panic(new $String("d.nx != 0")); - } - digest$1 = arrayType$5.zero(); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 0), d.h[0]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 4), d.h[1]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 8), d.h[2]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 12), d.h[3]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 16), d.h[4]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 20), d.h[5]); - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 24), d.h[6]); - if (!d.is224) { - $clone(binary.BigEndian, binary.bigEndian).PutUint32($subslice(new sliceType$1(digest$1), 28), d.h[7]); - } - return digest$1; - }; - digest.prototype.checkSum = function() { return this.$val.checkSum(); }; - Sum224 = function(data) { - var ap, d, data, sum; - d = new digest.ptr(arrayType$3.zero(), arrayType$4.zero(), 0, new $Uint64(0, 0), false); - d.is224 = true; - d.Reset(); - d.Write(data); - sum = $clone(d.checkSum(), arrayType$5); - ap = ($sliceToGoArray(new sliceType$1(sum), ptrType)); - return ap; - }; - $pkg.Sum224 = Sum224; - ptrType$1.methods = [{prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$1], [$error], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$1], [sliceType$1], false)}, {prop: "checkSum", name: "checkSum", pkg: "crypto/sha256", typ: $funcType([], [arrayType$5], false)}]; - digest.init("crypto/sha256", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "nx", name: "nx", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "is224", name: "is224", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = crypto.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _K = new sliceType([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/dsa"] = (function() { - var $pkg = {}, $init, randutil, errors, io, big, Parameters, PublicKey, ptrType; - randutil = $packages["crypto/internal/randutil"]; - errors = $packages["errors"]; - io = $packages["io"]; - big = $packages["math/big"]; - Parameters = $pkg.Parameters = $newType(0, $kindStruct, "dsa.Parameters", true, "crypto/dsa", true, function(P_, Q_, G_) { - this.$val = this; - if (arguments.length === 0) { - this.P = ptrType.nil; - this.Q = ptrType.nil; - this.G = ptrType.nil; - return; - } - this.P = P_; - this.Q = Q_; - this.G = G_; - }); - PublicKey = $pkg.PublicKey = $newType(0, $kindStruct, "dsa.PublicKey", true, "crypto/dsa", true, function(Parameters_, Y_) { - this.$val = this; - if (arguments.length === 0) { - this.Parameters = new Parameters.ptr(ptrType.nil, ptrType.nil, ptrType.nil); - this.Y = ptrType.nil; - return; - } - this.Parameters = Parameters_; - this.Y = Y_; - }); - ptrType = $ptrType(big.Int); - Parameters.init("", [{prop: "P", name: "P", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Q", name: "Q", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "G", name: "G", embedded: false, exported: true, typ: ptrType, tag: ""}]); - PublicKey.init("", [{prop: "Parameters", name: "Parameters", embedded: true, exported: true, typ: Parameters, tag: ""}, {prop: "Y", name: "Y", embedded: false, exported: true, typ: ptrType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = randutil.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrInvalidPublicKey = errors.New("crypto/dsa: invalid public key"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/hex"] = (function() { - var $pkg = {}, $init, errors, fmt, io, strings, sliceType$1, EncodedLen, Encode, EncodeToString; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - strings = $packages["strings"]; - sliceType$1 = $sliceType($Uint8); - EncodedLen = function(n) { - var n; - return $imul(n, 2); - }; - $pkg.EncodedLen = EncodedLen; - Encode = function(dst, src) { - var _i, _ref, dst, j, src, v, x; - j = 0; - _ref = src; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((j < 0 || j >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + j] = "0123456789abcdef".charCodeAt((v >>> 4 << 24 >>> 24))); - (x = j + 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x] = "0123456789abcdef".charCodeAt(((v & 15) >>> 0)))); - j = j + (2) >> 0; - _i++; - } - return $imul(src.$length, 2); - }; - $pkg.Encode = Encode; - EncodeToString = function(src) { - var dst, src; - dst = $makeSlice(sliceType$1, EncodedLen(src.$length)); - Encode(dst, src); - return ($bytesToString(dst)); - }; - $pkg.EncodeToString = EncodeToString; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrLength = errors.New("encoding/hex: odd length hex string"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/x509/pkix"] = (function() { - var $pkg = {}, $init, asn1, hex, fmt, big, time, AlgorithmIdentifier, RDNSequence, RelativeDistinguishedNameSET, AttributeTypeAndValue, Extension, Name, CertificateList, TBSCertificateList, RevokedCertificate, sliceType, sliceType$1, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, ptrType, ptrType$1, ptrType$2, sliceType$8, sliceType$9, ptrType$3, ptrType$4, attributeTypeNames, oidCountry, oidOrganization, oidOrganizationalUnit, oidCommonName, oidSerialNumber, oidLocality, oidProvince, oidStreetAddress, oidPostalCode, oidInAttributeTypeAndValue; - asn1 = $packages["encoding/asn1"]; - hex = $packages["encoding/hex"]; - fmt = $packages["fmt"]; - big = $packages["math/big"]; - time = $packages["time"]; - AlgorithmIdentifier = $pkg.AlgorithmIdentifier = $newType(0, $kindStruct, "pkix.AlgorithmIdentifier", true, "crypto/x509/pkix", true, function(Algorithm_, Parameters_) { - this.$val = this; - if (arguments.length === 0) { - this.Algorithm = asn1.ObjectIdentifier.nil; - this.Parameters = new asn1.RawValue.ptr(0, 0, false, sliceType$6.nil, sliceType$6.nil); - return; - } - this.Algorithm = Algorithm_; - this.Parameters = Parameters_; - }); - RDNSequence = $pkg.RDNSequence = $newType(12, $kindSlice, "pkix.RDNSequence", true, "crypto/x509/pkix", true, null); - RelativeDistinguishedNameSET = $pkg.RelativeDistinguishedNameSET = $newType(12, $kindSlice, "pkix.RelativeDistinguishedNameSET", true, "crypto/x509/pkix", true, null); - AttributeTypeAndValue = $pkg.AttributeTypeAndValue = $newType(0, $kindStruct, "pkix.AttributeTypeAndValue", true, "crypto/x509/pkix", true, function(Type_, Value_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = asn1.ObjectIdentifier.nil; - this.Value = $ifaceNil; - return; - } - this.Type = Type_; - this.Value = Value_; - }); - Extension = $pkg.Extension = $newType(0, $kindStruct, "pkix.Extension", true, "crypto/x509/pkix", true, function(Id_, Critical_, Value_) { - this.$val = this; - if (arguments.length === 0) { - this.Id = asn1.ObjectIdentifier.nil; - this.Critical = false; - this.Value = sliceType$6.nil; - return; - } - this.Id = Id_; - this.Critical = Critical_; - this.Value = Value_; - }); - Name = $pkg.Name = $newType(0, $kindStruct, "pkix.Name", true, "crypto/x509/pkix", true, function(Country_, Organization_, OrganizationalUnit_, Locality_, Province_, StreetAddress_, PostalCode_, SerialNumber_, CommonName_, Names_, ExtraNames_) { - this.$val = this; - if (arguments.length === 0) { - this.Country = sliceType$4.nil; - this.Organization = sliceType$4.nil; - this.OrganizationalUnit = sliceType$4.nil; - this.Locality = sliceType$4.nil; - this.Province = sliceType$4.nil; - this.StreetAddress = sliceType$4.nil; - this.PostalCode = sliceType$4.nil; - this.SerialNumber = ""; - this.CommonName = ""; - this.Names = sliceType$3.nil; - this.ExtraNames = sliceType$3.nil; - return; - } - this.Country = Country_; - this.Organization = Organization_; - this.OrganizationalUnit = OrganizationalUnit_; - this.Locality = Locality_; - this.Province = Province_; - this.StreetAddress = StreetAddress_; - this.PostalCode = PostalCode_; - this.SerialNumber = SerialNumber_; - this.CommonName = CommonName_; - this.Names = Names_; - this.ExtraNames = ExtraNames_; - }); - CertificateList = $pkg.CertificateList = $newType(0, $kindStruct, "pkix.CertificateList", true, "crypto/x509/pkix", true, function(TBSCertList_, SignatureAlgorithm_, SignatureValue_) { - this.$val = this; - if (arguments.length === 0) { - this.TBSCertList = new TBSCertificateList.ptr(asn1.RawContent.nil, 0, new AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$6.nil, sliceType$6.nil)), RDNSequence.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil), sliceType$8.nil, sliceType$9.nil); - this.SignatureAlgorithm = new AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$6.nil, sliceType$6.nil)); - this.SignatureValue = new asn1.BitString.ptr(sliceType$6.nil, 0); - return; - } - this.TBSCertList = TBSCertList_; - this.SignatureAlgorithm = SignatureAlgorithm_; - this.SignatureValue = SignatureValue_; - }); - TBSCertificateList = $pkg.TBSCertificateList = $newType(0, $kindStruct, "pkix.TBSCertificateList", true, "crypto/x509/pkix", true, function(Raw_, Version_, Signature_, Issuer_, ThisUpdate_, NextUpdate_, RevokedCertificates_, Extensions_) { - this.$val = this; - if (arguments.length === 0) { - this.Raw = asn1.RawContent.nil; - this.Version = 0; - this.Signature = new AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$6.nil, sliceType$6.nil)); - this.Issuer = RDNSequence.nil; - this.ThisUpdate = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); - this.NextUpdate = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); - this.RevokedCertificates = sliceType$8.nil; - this.Extensions = sliceType$9.nil; - return; - } - this.Raw = Raw_; - this.Version = Version_; - this.Signature = Signature_; - this.Issuer = Issuer_; - this.ThisUpdate = ThisUpdate_; - this.NextUpdate = NextUpdate_; - this.RevokedCertificates = RevokedCertificates_; - this.Extensions = Extensions_; - }); - RevokedCertificate = $pkg.RevokedCertificate = $newType(0, $kindStruct, "pkix.RevokedCertificate", true, "crypto/x509/pkix", true, function(SerialNumber_, RevocationTime_, Extensions_) { - this.$val = this; - if (arguments.length === 0) { - this.SerialNumber = ptrType$4.nil; - this.RevocationTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$2.nil); - this.Extensions = sliceType$9.nil; - return; - } - this.SerialNumber = SerialNumber_; - this.RevocationTime = RevocationTime_; - this.Extensions = Extensions_; - }); - sliceType = $sliceType($Int); - sliceType$1 = $sliceType($emptyInterface); - sliceType$2 = $sliceType($Int32); - sliceType$3 = $sliceType(AttributeTypeAndValue); - sliceType$4 = $sliceType($String); - sliceType$5 = $sliceType(RelativeDistinguishedNameSET); - sliceType$6 = $sliceType($Uint8); - ptrType = $ptrType(RDNSequence); - ptrType$1 = $ptrType(Name); - ptrType$2 = $ptrType(time.Location); - sliceType$8 = $sliceType(RevokedCertificate); - sliceType$9 = $sliceType(Extension); - ptrType$3 = $ptrType(CertificateList); - ptrType$4 = $ptrType(big.Int); - RDNSequence.prototype.String = function() { - var {_1, _entry, _i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _tuple, _tuple$1, c, derBytes, err, escape, escaped, i, j, k, oidString, ok, r, rdn, s, tv, typeName, valueString, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - s = ""; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < r.$length)) { break; } */ if(!(i < r.$length)) { $s = 2; continue; } - rdn = (x = (r.$length - 1 >> 0) - i >> 0, ((x < 0 || x >= r.$length) ? ($throwRuntimeError("index out of range"), undefined) : r.$array[r.$offset + x])); - if (i > 0) { - s = s + (","); - } - _ref = rdn; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - j = _i; - tv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); - if (j > 0) { - s = s + ("+"); - } - oidString = tv.Type.String(); - _tuple = (_entry = attributeTypeNames[$String.keyFor(oidString)], _entry !== undefined ? [_entry.v, true] : ["", false]); - typeName = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ok) { */ case 5: - _r = asn1.Marshal(tv.Value); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - derBytes = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - s = s + (oidString + "=#" + hex.EncodeToString(derBytes)); - _i++; - /* continue; */ $s = 3; continue; - } - typeName = oidString; - /* } */ case 6: - _r$1 = fmt.Sprint(new sliceType$1([tv.Value])); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - valueString = _r$1; - escaped = $makeSlice(sliceType$2, 0, valueString.length); - _ref$1 = valueString; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.length)) { break; } - _rune = $decodeRune(_ref$1, _i$1); - k = _i$1; - c = _rune[0]; - escape = false; - _1 = c; - if ((_1 === (44)) || (_1 === (43)) || (_1 === (34)) || (_1 === (92)) || (_1 === (60)) || (_1 === (62)) || (_1 === (59))) { - escape = true; - } else if (_1 === (32)) { - escape = (k === 0) || (k === (valueString.length - 1 >> 0)); - } else if (_1 === (35)) { - escape = k === 0; - } - if (escape) { - escaped = $append(escaped, 92, c); - } else { - escaped = $append(escaped, c); - } - _i$1 += _rune[1]; - } - s = s + (typeName + "=" + ($runesToString(escaped))); - _i++; - $s = 3; continue; - case 4: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return s; - /* */ } return; } var $f = {$blk: RDNSequence.prototype.String, $c: true, $r, _1, _entry, _i, _i$1, _r, _r$1, _ref, _ref$1, _rune, _tuple, _tuple$1, c, derBytes, err, escape, escaped, i, j, k, oidString, ok, r, rdn, s, tv, typeName, valueString, x, $s};return $f; - }; - $ptrType(RDNSequence).prototype.String = function() { return this.$get().String(); }; - Name.ptr.prototype.FillFromRDNSequence = function(rdns) { - var _1, _i, _i$1, _ref, _ref$1, _tuple, atv, n, ok, rdn, rdns, t, value; - n = this; - _ref = rdns.$get(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - rdn = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (rdn.$length === 0) { - _i++; - continue; - } - _ref$1 = rdn; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - atv = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), AttributeTypeAndValue); - n.Names = $append(n.Names, atv); - _tuple = $assertType(atv.Value, $String, true); - value = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - _i$1++; - continue; - } - t = atv.Type; - if ((t.$length === 4) && ((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) === 2) && ((1 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 1]) === 5) && ((2 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 2]) === 4)) { - _1 = (3 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 3]); - if (_1 === (3)) { - n.CommonName = value; - } else if (_1 === (5)) { - n.SerialNumber = value; - } else if (_1 === (6)) { - n.Country = $append(n.Country, value); - } else if (_1 === (7)) { - n.Locality = $append(n.Locality, value); - } else if (_1 === (8)) { - n.Province = $append(n.Province, value); - } else if (_1 === (9)) { - n.StreetAddress = $append(n.StreetAddress, value); - } else if (_1 === (10)) { - n.Organization = $append(n.Organization, value); - } else if (_1 === (11)) { - n.OrganizationalUnit = $append(n.OrganizationalUnit, value); - } else if (_1 === (17)) { - n.PostalCode = $append(n.PostalCode, value); - } - } - _i$1++; - } - _i++; - } - }; - Name.prototype.FillFromRDNSequence = function(rdns) { return this.$val.FillFromRDNSequence(rdns); }; - Name.ptr.prototype.appendRDNs = function(in$1, values, oid) { - var _i, _ref, i, in$1, n, oid, s, value, values; - n = this; - if ((values.$length === 0) || oidInAttributeTypeAndValue(oid, n.ExtraNames)) { - return in$1; - } - s = $makeSlice(sliceType$3, values.$length); - _ref = values; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - value = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Type = oid; - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]).Value = new $String(value); - _i++; - } - return $append(in$1, $convertSliceType(s, RelativeDistinguishedNameSET)); - }; - Name.prototype.appendRDNs = function(in$1, values, oid) { return this.$val.appendRDNs(in$1, values, oid); }; - Name.ptr.prototype.ToRDNSequence = function() { - var _i, _ref, atv, n, ret; - ret = RDNSequence.nil; - n = this; - ret = $clone(n, Name).appendRDNs(ret, n.Country, $convertSliceType(oidCountry, asn1.ObjectIdentifier)); - ret = $clone(n, Name).appendRDNs(ret, n.Province, $convertSliceType(oidProvince, asn1.ObjectIdentifier)); - ret = $clone(n, Name).appendRDNs(ret, n.Locality, $convertSliceType(oidLocality, asn1.ObjectIdentifier)); - ret = $clone(n, Name).appendRDNs(ret, n.StreetAddress, $convertSliceType(oidStreetAddress, asn1.ObjectIdentifier)); - ret = $clone(n, Name).appendRDNs(ret, n.PostalCode, $convertSliceType(oidPostalCode, asn1.ObjectIdentifier)); - ret = $clone(n, Name).appendRDNs(ret, n.Organization, $convertSliceType(oidOrganization, asn1.ObjectIdentifier)); - ret = $clone(n, Name).appendRDNs(ret, n.OrganizationalUnit, $convertSliceType(oidOrganizationalUnit, asn1.ObjectIdentifier)); - if (n.CommonName.length > 0) { - ret = $clone(n, Name).appendRDNs(ret, new sliceType$4([n.CommonName]), $convertSliceType(oidCommonName, asn1.ObjectIdentifier)); - } - if (n.SerialNumber.length > 0) { - ret = $clone(n, Name).appendRDNs(ret, new sliceType$4([n.SerialNumber]), $convertSliceType(oidSerialNumber, asn1.ObjectIdentifier)); - } - _ref = n.ExtraNames; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - atv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); - ret = $append(ret, $convertSliceType(new sliceType$3([$clone(atv, AttributeTypeAndValue)]), RelativeDistinguishedNameSET)); - _i++; - } - ret = ret; - return ret; - }; - Name.prototype.ToRDNSequence = function() { return this.$val.ToRDNSequence(); }; - Name.ptr.prototype.String = function() { - var {$24r, _1, _i, _r, _ref, atv, n, rdns, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = this; - rdns = RDNSequence.nil; - if (n.ExtraNames === sliceType$3.nil) { - _ref = n.Names; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - atv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); - t = atv.Type; - if ((t.$length === 4) && ((0 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 0]) === 2) && ((1 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 1]) === 5) && ((2 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 2]) === 4)) { - _1 = (3 >= t.$length ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + 3]); - if ((_1 === (3)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (17))) { - _i++; - continue; - } - } - rdns = $append(rdns, $convertSliceType(new sliceType$3([$clone(atv, AttributeTypeAndValue)]), RelativeDistinguishedNameSET)); - _i++; - } - } - rdns = $appendSlice(rdns, $convertSliceType($clone(n, Name).ToRDNSequence(), sliceType$5)); - _r = rdns.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Name.ptr.prototype.String, $c: true, $r, $24r, _1, _i, _r, _ref, atv, n, rdns, t, $s};return $f; - }; - Name.prototype.String = function() { return this.$val.String(); }; - oidInAttributeTypeAndValue = function(oid, atv) { - var _i, _ref, a, atv, oid; - _ref = atv; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - a = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), AttributeTypeAndValue); - if (a.Type.Equal(oid)) { - return true; - } - _i++; - } - return false; - }; - CertificateList.ptr.prototype.HasExpired = function(now) { - var certList, now; - certList = this; - return !$clone(now, time.Time).Before($clone(certList.TBSCertList.NextUpdate, time.Time)); - }; - CertificateList.prototype.HasExpired = function(now) { return this.$val.HasExpired(now); }; - RDNSequence.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - Name.methods = [{prop: "appendRDNs", name: "appendRDNs", pkg: "crypto/x509/pkix", typ: $funcType([RDNSequence, sliceType$4, asn1.ObjectIdentifier], [RDNSequence], false)}, {prop: "ToRDNSequence", name: "ToRDNSequence", pkg: "", typ: $funcType([], [RDNSequence], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$1.methods = [{prop: "FillFromRDNSequence", name: "FillFromRDNSequence", pkg: "", typ: $funcType([ptrType], [], false)}]; - ptrType$3.methods = [{prop: "HasExpired", name: "HasExpired", pkg: "", typ: $funcType([time.Time], [$Bool], false)}]; - AlgorithmIdentifier.init("", [{prop: "Algorithm", name: "Algorithm", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Parameters", name: "Parameters", embedded: false, exported: true, typ: asn1.RawValue, tag: "asn1:\"optional\""}]); - RDNSequence.init(RelativeDistinguishedNameSET); - RelativeDistinguishedNameSET.init(AttributeTypeAndValue); - AttributeTypeAndValue.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $emptyInterface, tag: ""}]); - Extension.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "Critical", name: "Critical", embedded: false, exported: true, typ: $Bool, tag: "asn1:\"optional\""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: sliceType$6, tag: ""}]); - Name.init("", [{prop: "Country", name: "Country", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "Organization", name: "Organization", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "OrganizationalUnit", name: "OrganizationalUnit", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "Locality", name: "Locality", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "Province", name: "Province", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "StreetAddress", name: "StreetAddress", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "PostalCode", name: "PostalCode", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "CommonName", name: "CommonName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Names", name: "Names", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "ExtraNames", name: "ExtraNames", embedded: false, exported: true, typ: sliceType$3, tag: ""}]); - CertificateList.init("", [{prop: "TBSCertList", name: "TBSCertList", embedded: false, exported: true, typ: TBSCertificateList, tag: ""}, {prop: "SignatureAlgorithm", name: "SignatureAlgorithm", embedded: false, exported: true, typ: AlgorithmIdentifier, tag: ""}, {prop: "SignatureValue", name: "SignatureValue", embedded: false, exported: true, typ: asn1.BitString, tag: ""}]); - TBSCertificateList.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: asn1.RawContent, tag: ""}, {prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: "asn1:\"optional,default:0\""}, {prop: "Signature", name: "Signature", embedded: false, exported: true, typ: AlgorithmIdentifier, tag: ""}, {prop: "Issuer", name: "Issuer", embedded: false, exported: true, typ: RDNSequence, tag: ""}, {prop: "ThisUpdate", name: "ThisUpdate", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "NextUpdate", name: "NextUpdate", embedded: false, exported: true, typ: time.Time, tag: "asn1:\"optional\""}, {prop: "RevokedCertificates", name: "RevokedCertificates", embedded: false, exported: true, typ: sliceType$8, tag: "asn1:\"optional\""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$9, tag: "asn1:\"tag:0,optional,explicit\""}]); - RevokedCertificate.init("", [{prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "RevocationTime", name: "RevocationTime", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$9, tag: "asn1:\"optional\""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = asn1.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hex.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - attributeTypeNames = $makeMap($String.keyFor, [{ k: "2.5.4.6", v: "C" }, { k: "2.5.4.10", v: "O" }, { k: "2.5.4.11", v: "OU" }, { k: "2.5.4.3", v: "CN" }, { k: "2.5.4.5", v: "SERIALNUMBER" }, { k: "2.5.4.7", v: "L" }, { k: "2.5.4.8", v: "ST" }, { k: "2.5.4.9", v: "STREET" }, { k: "2.5.4.17", v: "POSTALCODE" }]); - oidCountry = new sliceType([2, 5, 4, 6]); - oidOrganization = new sliceType([2, 5, 4, 10]); - oidOrganizationalUnit = new sliceType([2, 5, 4, 11]); - oidCommonName = new sliceType([2, 5, 4, 3]); - oidSerialNumber = new sliceType([2, 5, 4, 5]); - oidLocality = new sliceType([2, 5, 4, 7]); - oidProvince = new sliceType([2, 5, 4, 8]); - oidStreetAddress = new sliceType([2, 5, 4, 9]); - oidPostalCode = new sliceType([2, 5, 4, 17]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["encoding/pem"] = (function() { - var $pkg = {}, $init, bytes, base64, errors, io, sort, strings, Block, sliceType, ptrType, mapType, pemStart, pemEnd, pemEndOfLine, colon, getLine, removeSpacesAndTabs, Decode; - bytes = $packages["bytes"]; - base64 = $packages["encoding/base64"]; - errors = $packages["errors"]; - io = $packages["io"]; - sort = $packages["sort"]; - strings = $packages["strings"]; - Block = $pkg.Block = $newType(0, $kindStruct, "pem.Block", true, "encoding/pem", true, function(Type_, Headers_, Bytes_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = ""; - this.Headers = false; - this.Bytes = sliceType.nil; - return; - } - this.Type = Type_; - this.Headers = Headers_; - this.Bytes = Bytes_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(Block); - mapType = $mapType($String, $String); - getLine = function(data) { - var _tmp, _tmp$1, data, i, j, line, rest, x; - line = sliceType.nil; - rest = sliceType.nil; - i = bytes.IndexByte(data, 10); - j = 0; - if (i < 0) { - i = data.$length; - j = i; - } else { - j = i + 1 >> 0; - if (i > 0 && ((x = i - 1 >> 0, ((x < 0 || x >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x])) === 13)) { - i = i - (1) >> 0; - } - } - _tmp = bytes.TrimRight($subslice(data, 0, i), " \t"); - _tmp$1 = $subslice(data, j); - line = _tmp; - rest = _tmp$1; - return [line, rest]; - }; - removeSpacesAndTabs = function(data) { - var _i, _ref, b, data, n, result; - if (!bytes.ContainsAny(data, " \t")) { - return data; - } - result = $makeSlice(sliceType, data.$length); - n = 0; - _ref = data; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ((b === 32) || (b === 9)) { - _i++; - continue; - } - ((n < 0 || n >= result.$length) ? ($throwRuntimeError("index out of range"), undefined) : result.$array[result.$offset + n] = b); - n = n + (1) >> 0; - _i++; - } - return $subslice(result, 0, n); - }; - Decode = function(data) { - var {_key, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, after, base64Data, data, endIndex, endTrailer, endTrailerIndex, endTrailerLen, err, key, line, n, next, ok, ok$1, p, rest, restOfEndLine, s, typeLine, val, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = ptrType.nil; - rest = sliceType.nil; - rest = data; - /* while (true) { */ case 1: - if (bytes.HasPrefix(rest, $subslice(pemStart, 1))) { - rest = $subslice(rest, (pemStart.$length - 1 >> 0)); - } else { - _tuple = bytes.Cut(rest, pemStart); - after = _tuple[1]; - ok = _tuple[2]; - if (ok) { - rest = after; - } else { - _tmp = ptrType.nil; - _tmp$1 = data; - p = _tmp; - rest = _tmp$1; - $s = -1; return [p, rest]; - } - } - typeLine = sliceType.nil; - _tuple$1 = getLine(rest); - typeLine = _tuple$1[0]; - rest = _tuple$1[1]; - if (!bytes.HasSuffix(typeLine, pemEndOfLine)) { - /* continue; */ $s = 1; continue; - } - typeLine = $subslice(typeLine, 0, (typeLine.$length - pemEndOfLine.$length >> 0)); - p = new Block.ptr(($bytesToString(typeLine)), {}, sliceType.nil); - /* while (true) { */ case 3: - if (rest.$length === 0) { - _tmp$2 = ptrType.nil; - _tmp$3 = data; - p = _tmp$2; - rest = _tmp$3; - $s = -1; return [p, rest]; - } - _tuple$2 = getLine(rest); - line = _tuple$2[0]; - next = _tuple$2[1]; - _tuple$3 = bytes.Cut(line, colon); - key = _tuple$3[0]; - val = _tuple$3[1]; - ok$1 = _tuple$3[2]; - if (!ok$1) { - /* break; */ $s = 4; continue; - } - _r = bytes.TrimSpace(key); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - key = _r; - _r$1 = bytes.TrimSpace(val); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - val = _r$1; - _key = ($bytesToString(key)); (p.Headers || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: ($bytesToString(val)) }; - rest = next; - $s = 3; continue; - case 4: - _tmp$4 = 0; - _tmp$5 = 0; - endIndex = _tmp$4; - endTrailerIndex = _tmp$5; - if (($keys(p.Headers).length === 0) && bytes.HasPrefix(rest, $subslice(pemEnd, 1))) { - endIndex = 0; - endTrailerIndex = pemEnd.$length - 1 >> 0; - } else { - endIndex = bytes.Index(rest, pemEnd); - endTrailerIndex = endIndex + pemEnd.$length >> 0; - } - if (endIndex < 0) { - /* continue; */ $s = 1; continue; - } - endTrailer = $subslice(rest, endTrailerIndex); - endTrailerLen = typeLine.$length + pemEndOfLine.$length >> 0; - if (endTrailer.$length < endTrailerLen) { - /* continue; */ $s = 1; continue; - } - restOfEndLine = $subslice(endTrailer, endTrailerLen); - endTrailer = $subslice(endTrailer, 0, endTrailerLen); - if (!bytes.HasPrefix(endTrailer, typeLine) || !bytes.HasSuffix(endTrailer, pemEndOfLine)) { - /* continue; */ $s = 1; continue; - } - _tuple$4 = getLine(restOfEndLine); - s = _tuple$4[0]; - if (!((s.$length === 0))) { - /* continue; */ $s = 1; continue; - } - base64Data = removeSpacesAndTabs($subslice(rest, 0, endIndex)); - p.Bytes = $makeSlice(sliceType, base64.StdEncoding.DecodedLen(base64Data.$length)); - _tuple$5 = base64.StdEncoding.Decode(p.Bytes, base64Data); - n = _tuple$5[0]; - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* continue; */ $s = 1; continue; - } - p.Bytes = $subslice(p.Bytes, 0, n); - _tuple$6 = getLine($subslice(rest, ((endIndex + pemEnd.$length >> 0) - 1 >> 0))); - rest = _tuple$6[1]; - _tmp$6 = p; - _tmp$7 = rest; - p = _tmp$6; - rest = _tmp$7; - $s = -1; return [p, rest]; - case 2: - $s = -1; return [p, rest]; - /* */ } return; } var $f = {$blk: Decode, $c: true, $r, _key, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, after, base64Data, data, endIndex, endTrailer, endTrailerIndex, endTrailerLen, err, key, line, n, next, ok, ok$1, p, rest, restOfEndLine, s, typeLine, val, $s};return $f; - }; - $pkg.Decode = Decode; - Block.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Headers", name: "Headers", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "Bytes", name: "Bytes", embedded: false, exported: true, typ: sliceType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = base64.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pemStart = (new sliceType($stringToBytes("\n-----BEGIN "))); - pemEnd = (new sliceType($stringToBytes("\n-----END "))); - pemEndOfLine = (new sliceType($stringToBytes("-----"))); - colon = (new sliceType($stringToBytes(":"))); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/godebug"] = (function() { - var $pkg = {}, $init, os, Get, get; - os = $packages["os"]; - Get = function(key) { - var {$24r, _r, _r$1, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = os.Getenv("GODEBUG"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = get(_r, key); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Get, $c: true, $r, $24r, _r, _r$1, key, $s};return $f; - }; - $pkg.Get = Get; - get = function(s, key) { - var _i, _ref, _rune, afterKey, b, i, i$1, key, s, val; - i = 0; - while (true) { - if (!(i < ((s.length - key.length >> 0) - 1 >> 0))) { break; } - if (i > 0 && !((s.charCodeAt((i - 1 >> 0)) === 44))) { - i = i + (1) >> 0; - continue; - } - afterKey = $substring(s, (i + key.length >> 0)); - if (!((afterKey.charCodeAt(0) === 61)) || !($substring(s, i, (i + key.length >> 0)) === key)) { - i = i + (1) >> 0; - continue; - } - val = $substring(afterKey, 1); - _ref = val; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i$1 = _i; - b = _rune[0]; - if (b === 44) { - return $substring(val, 0, i$1); - } - _i += _rune[1]; - } - return val; - } - return ""; - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = os.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/nettrace"] = (function() { - var $pkg = {}, $init, TraceKey, LookupIPAltResolverKey, Trace, funcType, sliceType, funcType$1, funcType$2, funcType$3; - TraceKey = $pkg.TraceKey = $newType(0, $kindStruct, "nettrace.TraceKey", true, "internal/nettrace", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - LookupIPAltResolverKey = $pkg.LookupIPAltResolverKey = $newType(0, $kindStruct, "nettrace.LookupIPAltResolverKey", true, "internal/nettrace", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - Trace = $pkg.Trace = $newType(0, $kindStruct, "nettrace.Trace", true, "internal/nettrace", true, function(DNSStart_, DNSDone_, ConnectStart_, ConnectDone_) { - this.$val = this; - if (arguments.length === 0) { - this.DNSStart = $throwNilPointerError; - this.DNSDone = $throwNilPointerError; - this.ConnectStart = $throwNilPointerError; - this.ConnectDone = $throwNilPointerError; - return; - } - this.DNSStart = DNSStart_; - this.DNSDone = DNSDone_; - this.ConnectStart = ConnectStart_; - this.ConnectDone = ConnectDone_; - }); - funcType = $funcType([$String], [], false); - sliceType = $sliceType($emptyInterface); - funcType$1 = $funcType([sliceType, $Bool, $error], [], false); - funcType$2 = $funcType([$String, $String], [], false); - funcType$3 = $funcType([$String, $String, $error], [], false); - TraceKey.init("", []); - LookupIPAltResolverKey.init("", []); - Trace.init("", [{prop: "DNSStart", name: "DNSStart", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "DNSDone", name: "DNSDone", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "ConnectStart", name: "ConnectStart", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "ConnectDone", name: "ConnectDone", embedded: false, exported: true, typ: funcType$3, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/singleflight"] = (function() { - var $pkg = {}, $init, sync, call, Group, Result, ptrType, chanType, sliceType, funcType, chanType$1, ptrType$1, mapType; - sync = $packages["sync"]; - call = $pkg.call = $newType(0, $kindStruct, "singleflight.call", true, "internal/singleflight", false, function(wg_, val_, err_, dups_, chans_) { - this.$val = this; - if (arguments.length === 0) { - this.wg = new sync.WaitGroup.ptr(0, $chanNil, new $Uint64(0, 0), 0); - this.val = $ifaceNil; - this.err = $ifaceNil; - this.dups = 0; - this.chans = sliceType.nil; - return; - } - this.wg = wg_; - this.val = val_; - this.err = err_; - this.dups = dups_; - this.chans = chans_; - }); - Group = $pkg.Group = $newType(0, $kindStruct, "singleflight.Group", true, "internal/singleflight", true, function(mu_, m_) { - this.$val = this; - if (arguments.length === 0) { - this.mu = new sync.Mutex.ptr(0, 0); - this.m = false; - return; - } - this.mu = mu_; - this.m = m_; - }); - Result = $pkg.Result = $newType(0, $kindStruct, "singleflight.Result", true, "internal/singleflight", true, function(Val_, Err_, Shared_) { - this.$val = this; - if (arguments.length === 0) { - this.Val = $ifaceNil; - this.Err = $ifaceNil; - this.Shared = false; - return; - } - this.Val = Val_; - this.Err = Err_; - this.Shared = Shared_; - }); - ptrType = $ptrType(call); - chanType = $chanType(Result, true, false); - sliceType = $sliceType(chanType); - funcType = $funcType([], [$emptyInterface, $error], false); - chanType$1 = $chanType(Result, false, true); - ptrType$1 = $ptrType(Group); - mapType = $mapType($String, ptrType); - Group.ptr.prototype.Do = function(key, fn) { - var {_entry, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, c$1, err, fn, g, key, ok, shared, v, $s, $r, $c} = $restore(this, {key, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = $ifaceNil; - err = $ifaceNil; - shared = false; - g = this; - $r = g.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (g.m === false) { - g.m = {}; - } - _tuple = (_entry = g.m[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType.nil, false]); - c = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - c.dups = c.dups + (1) >> 0; - $r = g.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = c.wg.Wait(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = c.val; - _tmp$1 = c.err; - _tmp$2 = true; - v = _tmp; - err = _tmp$1; - shared = _tmp$2; - $s = -1; return [v, err, shared]; - /* } */ case 3: - c$1 = new call.ptr(new sync.WaitGroup.ptr(0, $chanNil, new $Uint64(0, 0), 0), $ifaceNil, $ifaceNil, 0, sliceType.nil); - c$1.wg.Add(1); - _key = key; (g.m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: c$1 }; - $r = g.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = g.doCall(c$1, key, fn); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$3 = c$1.val; - _tmp$4 = c$1.err; - _tmp$5 = c$1.dups > 0; - v = _tmp$3; - err = _tmp$4; - shared = _tmp$5; - $s = -1; return [v, err, shared]; - /* */ } return; } var $f = {$blk: Group.ptr.prototype.Do, $c: true, $r, _entry, _key, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, c$1, err, fn, g, key, ok, shared, v, $s};return $f; - }; - Group.prototype.Do = function(key, fn) { return this.$val.Do(key, fn); }; - Group.ptr.prototype.DoChan = function(key, fn) { - var {_entry, _key, _tuple, c, c$1, ch, fn, g, key, ok, $s, $r, $c} = $restore(this, {key, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this; - ch = new $Chan(Result, 1); - $r = g.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (g.m === false) { - g.m = {}; - } - _tuple = (_entry = g.m[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType.nil, false]); - c = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - c.dups = c.dups + (1) >> 0; - c.chans = $append(c.chans, ch); - $r = g.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ch, false]; - /* } */ case 3: - c$1 = new call.ptr(new sync.WaitGroup.ptr(0, $chanNil, new $Uint64(0, 0), 0), $ifaceNil, $ifaceNil, 0, new sliceType([ch])); - c$1.wg.Add(1); - _key = key; (g.m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: c$1 }; - $r = g.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $go($methodVal(g, "doCall"), [c$1, key, fn]); - $s = -1; return [ch, true]; - /* */ } return; } var $f = {$blk: Group.ptr.prototype.DoChan, $c: true, $r, _entry, _key, _tuple, c, c$1, ch, fn, g, key, ok, $s};return $f; - }; - Group.prototype.DoChan = function(key, fn) { return this.$val.DoChan(key, fn); }; - Group.ptr.prototype.doCall = function(c, key, fn) { - var {_i, _r, _ref, _tuple, c, ch, fn, g, key, $s, $r, $c} = $restore(this, {c, key, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this; - _r = fn(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c.val = _tuple[0]; - c.err = _tuple[1]; - c.wg.Done(); - $r = g.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - delete g.m[$String.keyFor(key)]; - _ref = c.chans; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - ch = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = $send(ch, $clone(new Result.ptr(c.val, c.err, c.dups > 0), Result)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 3; continue; - case 4: - $r = g.mu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Group.ptr.prototype.doCall, $c: true, $r, _i, _r, _ref, _tuple, c, ch, fn, g, key, $s};return $f; - }; - Group.prototype.doCall = function(c, key, fn) { return this.$val.doCall(c, key, fn); }; - Group.ptr.prototype.ForgetUnshared = function(key) { - var {$24r, $24r$1, $24r$2, _entry, _tuple, c, g, key, ok, $s, $deferred, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - g = this; - $r = g.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(g.mu, "Unlock"), []]); - _tuple = (_entry = g.m[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [ptrType.nil, false]); - c = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - $24r = true; - $s = 4; case 4: return $24r; - /* } */ case 3: - /* */ if (c.dups === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (c.dups === 0) { */ case 5: - delete g.m[$String.keyFor(key)]; - $24r$1 = true; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - $24r$2 = false; - $s = 8; case 8: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Group.ptr.prototype.ForgetUnshared, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _tuple, c, g, key, ok, $s, $deferred};return $f; } } - }; - Group.prototype.ForgetUnshared = function(key) { return this.$val.ForgetUnshared(key); }; - ptrType$1.methods = [{prop: "Do", name: "Do", pkg: "", typ: $funcType([$String, funcType], [$emptyInterface, $error, $Bool], false)}, {prop: "DoChan", name: "DoChan", pkg: "", typ: $funcType([$String, funcType], [chanType$1, $Bool], false)}, {prop: "doCall", name: "doCall", pkg: "internal/singleflight", typ: $funcType([ptrType, $String, funcType], [], false)}, {prop: "ForgetUnshared", name: "ForgetUnshared", pkg: "", typ: $funcType([$String], [$Bool], false)}]; - call.init("internal/singleflight", [{prop: "wg", name: "wg", embedded: false, exported: false, typ: sync.WaitGroup, tag: ""}, {prop: "val", name: "val", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "dups", name: "dups", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "chans", name: "chans", embedded: false, exported: false, typ: sliceType, tag: ""}]); - Group.init("internal/singleflight", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: mapType, tag: ""}]); - Result.init("", [{prop: "Val", name: "Val", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}, {prop: "Shared", name: "Shared", embedded: false, exported: true, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = sync.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["internal/intern"] = (function() { - var $pkg = {}, $init, godebug, runtime, sync, Value, key, funcType, arrayType, ptrType, valSafe, _r, safeMap; - godebug = $packages["internal/godebug"]; - runtime = $packages["runtime"]; - sync = $packages["sync"]; - Value = $pkg.Value = $newType(0, $kindStruct, "intern.Value", true, "internal/intern", true, function(_$0_, cmpVal_, resurrected_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.cmpVal = $ifaceNil; - this.resurrected = false; - return; - } - this._$0 = _$0_; - this.cmpVal = cmpVal_; - this.resurrected = resurrected_; - }); - key = $pkg.key = $newType(0, $kindStruct, "intern.key", true, "internal/intern", false, function(s_, cmpVal_, isString_) { - this.$val = this; - if (arguments.length === 0) { - this.s = ""; - this.cmpVal = $ifaceNil; - this.isString = false; - return; - } - this.s = s_; - this.cmpVal = cmpVal_; - this.isString = isString_; - }); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - ptrType = $ptrType(Value); - Value.ptr.prototype.Get = function() { - var v; - v = this; - return v.cmpVal; - }; - Value.prototype.Get = function() { return this.$val.Get(); }; - key.ptr.prototype.Value = function() { - var k; - k = this; - if (k.isString) { - return new Value.ptr(arrayType.zero(), new $String(k.s), false); - } - return new Value.ptr(arrayType.zero(), k.cmpVal, false); - }; - key.prototype.Value = function() { return this.$val.Value(); }; - safeMap = function() { - var {_r$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = godebug.Get("intern"); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1 === "leaky") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$1 === "leaky") { */ case 1: - $s = -1; return $makeMap(key.keyFor, []); - /* } */ case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: safeMap, $c: true, $r, _r$1, $s};return $f; - }; - ptrType.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([], [$emptyInterface], false)}]; - key.methods = [{prop: "Value", name: "Value", pkg: "", typ: $funcType([], [ptrType], false)}]; - Value.init("internal/intern", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "cmpVal", name: "cmpVal", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "resurrected", name: "resurrected", embedded: false, exported: false, typ: $Bool, tag: ""}]); - key.init("internal/intern", [{prop: "s", name: "s", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "cmpVal", name: "cmpVal", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "isString", name: "isString", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = godebug.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = safeMap(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - valSafe = _r; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/netip"] = (function() { - var $pkg = {}, $init, errors, bytealg, intern, itoa, math, bits, strconv, uint128, parseAddrError, AddrPort, Prefix, Addr, funcType, arrayType, ptrType$1, arrayType$1, sliceType, arrayType$2, ptrType$2, arrayType$3, ptrType$3, ptrType$4, ptrType$5, ptrType$6, z0, z4, z6noz, mask6, IPv6Unspecified, IPv4Unspecified, AddrFrom4, AddrFrom16, ipv6Slice, ParseAddr, parseIPv4, parseIPv6, AddrFromSlice, appendDecimal, appendHex, appendHexPad, AddrPortFrom, splitAddrPort, ParseAddrPort, joinHostPort, PrefixFrom, ParsePrefix, stringsLastIndexByte, beUint64, bePutUint64, bePutUint32, leUint16, lePutUint16; - errors = $packages["errors"]; - bytealg = $packages["internal/bytealg"]; - intern = $packages["internal/intern"]; - itoa = $packages["internal/itoa"]; - math = $packages["math"]; - bits = $packages["math/bits"]; - strconv = $packages["strconv"]; - uint128 = $pkg.uint128 = $newType(0, $kindStruct, "netip.uint128", true, "net/netip", false, function(hi_, lo_) { - this.$val = this; - if (arguments.length === 0) { - this.hi = new $Uint64(0, 0); - this.lo = new $Uint64(0, 0); - return; - } - this.hi = hi_; - this.lo = lo_; - }); - parseAddrError = $pkg.parseAddrError = $newType(0, $kindStruct, "netip.parseAddrError", true, "net/netip", false, function(in$0_, msg_, at_) { - this.$val = this; - if (arguments.length === 0) { - this.in$0 = ""; - this.msg = ""; - this.at = ""; - return; - } - this.in$0 = in$0_; - this.msg = msg_; - this.at = at_; - }); - AddrPort = $pkg.AddrPort = $newType(0, $kindStruct, "netip.AddrPort", true, "net/netip", true, function(ip_, port_) { - this.$val = this; - if (arguments.length === 0) { - this.ip = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - this.port = 0; - return; - } - this.ip = ip_; - this.port = port_; - }); - Prefix = $pkg.Prefix = $newType(0, $kindStruct, "netip.Prefix", true, "net/netip", true, function(ip_, bits_) { - this.$val = this; - if (arguments.length === 0) { - this.ip = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - this.bits = 0; - return; - } - this.ip = ip_; - this.bits = bits_; - }); - Addr = $pkg.Addr = $newType(0, $kindStruct, "netip.Addr", true, "net/netip", true, function(addr_, z_) { - this.$val = this; - if (arguments.length === 0) { - this.addr = new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)); - this.z = ""; - return; - } - this.addr = addr_; - this.z = z_; - }); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - ptrType$1 = $ptrType($Uint64); - arrayType$1 = $arrayType($Uint8, 4); - sliceType = $sliceType($Uint8); - arrayType$2 = $arrayType($Uint8, 16); - ptrType$2 = $ptrType(arrayType$1); - arrayType$3 = $arrayType(ptrType$1, 2); - ptrType$3 = $ptrType(uint128); - ptrType$4 = $ptrType(AddrPort); - ptrType$5 = $ptrType(Prefix); - ptrType$6 = $ptrType(Addr); - mask6 = function(n) { - var n, x; - return new uint128.ptr((x = $shiftRightUint64(new $Uint64(4294967295, 4294967295), n), new $Uint64(~x.$high, ~x.$low >>> 0)), $shiftLeft64(new $Uint64(4294967295, 4294967295), ((128 - n >> 0)))); - }; - uint128.ptr.prototype.isZero = function() { - var u, x, x$1, x$2; - u = this; - return (x = (x$1 = u.hi, x$2 = u.lo, new $Uint64(x$1.$high | x$2.$high, (x$1.$low | x$2.$low) >>> 0)), (x.$high === 0 && x.$low === 0)); - }; - uint128.prototype.isZero = function() { return this.$val.isZero(); }; - uint128.ptr.prototype.and = function(m) { - var m, u, x, x$1, x$2, x$3; - u = this; - return new uint128.ptr((x = u.hi, x$1 = m.hi, new $Uint64(x.$high & x$1.$high, (x.$low & x$1.$low) >>> 0)), (x$2 = u.lo, x$3 = m.lo, new $Uint64(x$2.$high & x$3.$high, (x$2.$low & x$3.$low) >>> 0))); - }; - uint128.prototype.and = function(m) { return this.$val.and(m); }; - uint128.ptr.prototype.xor = function(m) { - var m, u, x, x$1, x$2, x$3; - u = this; - return new uint128.ptr((x = u.hi, x$1 = m.hi, new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0)), (x$2 = u.lo, x$3 = m.lo, new $Uint64(x$2.$high ^ x$3.$high, (x$2.$low ^ x$3.$low) >>> 0))); - }; - uint128.prototype.xor = function(m) { return this.$val.xor(m); }; - uint128.ptr.prototype.subOne = function() { - var _tuple, borrow, lo, u, x; - u = this; - _tuple = bits.Sub64(u.lo, new $Uint64(0, 1), new $Uint64(0, 0)); - lo = _tuple[0]; - borrow = _tuple[1]; - return new uint128.ptr((x = u.hi, new $Uint64(x.$high - borrow.$high, x.$low - borrow.$low)), lo); - }; - uint128.prototype.subOne = function() { return this.$val.subOne(); }; - uint128.ptr.prototype.addOne = function() { - var _tuple, carry, lo, u, x; - u = this; - _tuple = bits.Add64(u.lo, new $Uint64(0, 1), new $Uint64(0, 0)); - lo = _tuple[0]; - carry = _tuple[1]; - return new uint128.ptr((x = u.hi, new $Uint64(x.$high + carry.$high, x.$low + carry.$low)), lo); - }; - uint128.prototype.addOne = function() { return this.$val.addOne(); }; - uint128.ptr.prototype.halves = function() { - var u; - u = this; - return $toNativeArray($kindPtr, [(u.$ptr_hi || (u.$ptr_hi = new ptrType$1(function() { return this.$target.hi; }, function($v) { this.$target.hi = $v; }, u))), (u.$ptr_lo || (u.$ptr_lo = new ptrType$1(function() { return this.$target.lo; }, function($v) { this.$target.lo = $v; }, u)))]); - }; - uint128.prototype.halves = function() { return this.$val.halves(); }; - IPv6Unspecified = function() { - return new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), z6noz); - }; - $pkg.IPv6Unspecified = IPv6Unspecified; - IPv4Unspecified = function() { - return AddrFrom4(arrayType$1.zero()); - }; - $pkg.IPv4Unspecified = IPv4Unspecified; - AddrFrom4 = function(addr) { - var addr, x, x$1, x$2, x$3, x$4, x$5, x$6; - return new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), (x = (x$1 = (x$2 = (x$3 = $shiftLeft64((new $Uint64(0, addr[0])), 24), new $Uint64(65535 | x$3.$high, (0 | x$3.$low) >>> 0)), x$4 = $shiftLeft64((new $Uint64(0, addr[1])), 16), new $Uint64(x$2.$high | x$4.$high, (x$2.$low | x$4.$low) >>> 0)), x$5 = $shiftLeft64((new $Uint64(0, addr[2])), 8), new $Uint64(x$1.$high | x$5.$high, (x$1.$low | x$5.$low) >>> 0)), x$6 = (new $Uint64(0, addr[3])), new $Uint64(x.$high | x$6.$high, (x.$low | x$6.$low) >>> 0))), z4); - }; - $pkg.AddrFrom4 = AddrFrom4; - AddrFrom16 = function(addr) { - var addr; - return new Addr.ptr(new uint128.ptr(beUint64($subslice(new sliceType(addr), 0, 8)), beUint64($subslice(new sliceType(addr), 8))), z6noz); - }; - $pkg.AddrFrom16 = AddrFrom16; - ipv6Slice = function(addr) { - var addr; - return new Addr.ptr(new uint128.ptr(beUint64($subslice(addr, 0, 8)), beUint64($subslice(addr, 8))), z6noz); - }; - ParseAddr = function(s) { - var {$24r, _1, _r, i, s, x, x$1, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = 0; - /* while (true) { */ case 1: - /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } - _1 = s.charCodeAt(i); - /* */ if (_1 === (46)) { $s = 4; continue; } - /* */ if (_1 === (58)) { $s = 5; continue; } - /* */ if (_1 === (37)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (46)) { */ case 4: - $s = -1; return parseIPv4(s); - /* } else if (_1 === (58)) { */ case 5: - _r = parseIPv6(s); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 9; case 9: return $24r; - /* } else if (_1 === (37)) { */ case 6: - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x = new parseAddrError.ptr(s, "missing IPv6 address", ""), new x.constructor.elem(x))]; - /* } */ case 7: - case 3: - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$1 = new parseAddrError.ptr(s, "unable to parse IP", ""), new x$1.constructor.elem(x$1))]; - /* */ } return; } var $f = {$blk: ParseAddr, $c: true, $r, $24r, _1, _r, i, s, x, x$1, $s};return $f; - }; - $pkg.ParseAddr = ParseAddr; - parseAddrError.ptr.prototype.Error = function() { - var {$24r, $24r$1, _r, _r$1, _r$2, err, q, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = this; - q = strconv.Quote; - /* */ if (!(err.at === "")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(err.at === "")) { */ case 1: - _r = q(err.in$0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = q(err.at); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = "ParseAddr(" + _r + "): " + err.msg + " (at " + _r$1 + ")"; - $s = 5; case 5: return $24r; - /* } */ case 2: - _r$2 = q(err.in$0); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = "ParseAddr(" + _r$2 + "): " + err.msg; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: parseAddrError.ptr.prototype.Error, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, err, q, $s};return $f; - }; - parseAddrError.prototype.Error = function() { return this.$val.Error(); }; - parseIPv4 = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, digLen, err, fields, i, ip, pos, s, val, x, x$1, x$2, x$3, x$4, x$5; - ip = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - err = $ifaceNil; - fields = arrayType$1.zero(); - _tmp = 0; - _tmp$1 = 0; - val = _tmp; - pos = _tmp$1; - digLen = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) >= 48 && s.charCodeAt(i) <= 57) { - if ((digLen === 1) && (val === 0)) { - _tmp$2 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$3 = (x = new parseAddrError.ptr(s, "IPv4 field has octet with leading zero", ""), new x.constructor.elem(x)); - Addr.copy(ip, _tmp$2); - err = _tmp$3; - return [ip, err]; - } - val = (($imul(val, 10)) + ((s.charCodeAt(i) >> 0)) >> 0) - 48 >> 0; - digLen = digLen + (1) >> 0; - if (val > 255) { - _tmp$4 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$5 = (x$1 = new parseAddrError.ptr(s, "IPv4 field has value >255", ""), new x$1.constructor.elem(x$1)); - Addr.copy(ip, _tmp$4); - err = _tmp$5; - return [ip, err]; - } - } else if (s.charCodeAt(i) === 46) { - if ((i === 0) || (i === (s.length - 1 >> 0)) || (s.charCodeAt((i - 1 >> 0)) === 46)) { - _tmp$6 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$7 = (x$2 = new parseAddrError.ptr(s, "IPv4 field must have at least one digit", $substring(s, i)), new x$2.constructor.elem(x$2)); - Addr.copy(ip, _tmp$6); - err = _tmp$7; - return [ip, err]; - } - if (pos === 3) { - _tmp$8 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$9 = (x$3 = new parseAddrError.ptr(s, "IPv4 address too long", ""), new x$3.constructor.elem(x$3)); - Addr.copy(ip, _tmp$8); - err = _tmp$9; - return [ip, err]; - } - ((pos < 0 || pos >= fields.length) ? ($throwRuntimeError("index out of range"), undefined) : fields[pos] = ((val << 24 >>> 24))); - pos = pos + (1) >> 0; - val = 0; - digLen = 0; - } else { - _tmp$10 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$11 = (x$4 = new parseAddrError.ptr(s, "unexpected character", $substring(s, i)), new x$4.constructor.elem(x$4)); - Addr.copy(ip, _tmp$10); - err = _tmp$11; - return [ip, err]; - } - i = i + (1) >> 0; - } - if (pos < 3) { - _tmp$12 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$13 = (x$5 = new parseAddrError.ptr(s, "IPv4 address too short", ""), new x$5.constructor.elem(x$5)); - Addr.copy(ip, _tmp$12); - err = _tmp$13; - return [ip, err]; - } - fields[3] = ((val << 24 >>> 24)); - _tmp$14 = $clone(AddrFrom4($clone(fields, arrayType$1)), Addr); - _tmp$15 = $ifaceNil; - Addr.copy(ip, _tmp$14); - err = _tmp$15; - return [ip, err]; - }; - parseIPv6 = function(in$1) { - var {$24r, _r, _tmp, _tmp$1, _tuple, acc, c, ellipsis, err, i, in$1, ip, ip4, j, j$1, n, off, s, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, zone, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = in$1; - zone = ""; - i = bytealg.IndexByteString(s, 37); - if (!((i === -1))) { - _tmp = $substring(s, 0, i); - _tmp$1 = $substring(s, (i + 1 >> 0)); - s = _tmp; - zone = _tmp$1; - if (zone === "") { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x = new parseAddrError.ptr(in$1, "zone must be a non-empty string", ""), new x.constructor.elem(x))]; - } - } - ip = arrayType$2.zero(); - ellipsis = -1; - if (s.length >= 2 && (s.charCodeAt(0) === 58) && (s.charCodeAt(1) === 58)) { - ellipsis = 0; - s = $substring(s, 2); - if (s.length === 0) { - $s = -1; return [$clone(IPv6Unspecified(), Addr).WithZone(zone), $ifaceNil]; - } - } - i = 0; - /* while (true) { */ case 1: - /* if (!(i < 16)) { break; } */ if(!(i < 16)) { $s = 2; continue; } - off = 0; - acc = 0; - while (true) { - if (!(off < s.length)) { break; } - c = s.charCodeAt(off); - if (c >= 48 && c <= 57) { - acc = ((acc << 4 >>> 0)) + (((c - 48 << 24 >>> 24) >>> 0)) >>> 0; - } else if (c >= 97 && c <= 102) { - acc = ((acc << 4 >>> 0)) + ((((c - 97 << 24 >>> 24) + 10 << 24 >>> 24) >>> 0)) >>> 0; - } else if (c >= 65 && c <= 70) { - acc = ((acc << 4 >>> 0)) + ((((c - 65 << 24 >>> 24) + 10 << 24 >>> 24) >>> 0)) >>> 0; - } else { - break; - } - if (acc > 65535) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$1 = new parseAddrError.ptr(in$1, "IPv6 field has value >=2^16", s), new x$1.constructor.elem(x$1))]; - } - off = off + (1) >> 0; - } - if (off === 0) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$2 = new parseAddrError.ptr(in$1, "each colon-separated field must have at least one digit", s), new x$2.constructor.elem(x$2))]; - } - /* */ if (off < s.length && (s.charCodeAt(off) === 46)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (off < s.length && (s.charCodeAt(off) === 46)) { */ case 3: - if (ellipsis < 0 && !((i === 12))) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$3 = new parseAddrError.ptr(in$1, "embedded IPv4 address must replace the final 2 fields of the address", s), new x$3.constructor.elem(x$3))]; - } - if ((i + 4 >> 0) > 16) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$4 = new parseAddrError.ptr(in$1, "too many hex fields to fit an embedded IPv4 at the end of the address", s), new x$4.constructor.elem(x$4))]; - } - _tuple = parseIPv4(s); - ip4 = $clone(_tuple[0], Addr); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - _r = err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$5 = new parseAddrError.ptr(in$1, _r, s), new x$5.constructor.elem(x$5))]; - $s = 8; case 8: return $24r; - /* } */ case 6: - ((i < 0 || i >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[i] = $clone(ip4, Addr).v4(0)); - (x$6 = i + 1 >> 0, ((x$6 < 0 || x$6 >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[x$6] = $clone(ip4, Addr).v4(1))); - (x$7 = i + 2 >> 0, ((x$7 < 0 || x$7 >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[x$7] = $clone(ip4, Addr).v4(2))); - (x$8 = i + 3 >> 0, ((x$8 < 0 || x$8 >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[x$8] = $clone(ip4, Addr).v4(3))); - s = ""; - i = i + (4) >> 0; - /* break; */ $s = 2; continue; - /* } */ case 4: - ((i < 0 || i >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[i] = (((acc >>> 8 >>> 0) << 24 >>> 24))); - (x$9 = i + 1 >> 0, ((x$9 < 0 || x$9 >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[x$9] = ((acc << 24 >>> 24)))); - i = i + (2) >> 0; - s = $substring(s, off); - if (s.length === 0) { - /* break; */ $s = 2; continue; - } - if (!((s.charCodeAt(0) === 58))) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$10 = new parseAddrError.ptr(in$1, "unexpected character, want colon", s), new x$10.constructor.elem(x$10))]; - } else if (s.length === 1) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$11 = new parseAddrError.ptr(in$1, "colon must be followed by more characters", s), new x$11.constructor.elem(x$11))]; - } - s = $substring(s, 1); - if (s.charCodeAt(0) === 58) { - if (ellipsis >= 0) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$12 = new parseAddrError.ptr(in$1, "multiple :: in address", s), new x$12.constructor.elem(x$12))]; - } - ellipsis = i; - s = $substring(s, 1); - if (s.length === 0) { - /* break; */ $s = 2; continue; - } - } - $s = 1; continue; - case 2: - if (!((s.length === 0))) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$13 = new parseAddrError.ptr(in$1, "trailing garbage after address", s), new x$13.constructor.elem(x$13))]; - } - if (i < 16) { - if (ellipsis < 0) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$14 = new parseAddrError.ptr(in$1, "address string too short", ""), new x$14.constructor.elem(x$14))]; - } - n = 16 - i >> 0; - j = i - 1 >> 0; - while (true) { - if (!(j >= ellipsis)) { break; } - (x$15 = j + n >> 0, ((x$15 < 0 || x$15 >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[x$15] = ((j < 0 || j >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[j]))); - j = j - (1) >> 0; - } - j$1 = (ellipsis + n >> 0) - 1 >> 0; - while (true) { - if (!(j$1 >= ellipsis)) { break; } - ((j$1 < 0 || j$1 >= ip.length) ? ($throwRuntimeError("index out of range"), undefined) : ip[j$1] = 0); - j$1 = j$1 - (1) >> 0; - } - } else if (ellipsis >= 0) { - $s = -1; return [new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), (x$16 = new parseAddrError.ptr(in$1, "the :: must expand to at least one field of zeros", ""), new x$16.constructor.elem(x$16))]; - } - $s = -1; return [$clone(AddrFrom16($clone(ip, arrayType$2)), Addr).WithZone(zone), $ifaceNil]; - /* */ } return; } var $f = {$blk: parseIPv6, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tuple, acc, c, ellipsis, err, i, in$1, ip, ip4, j, j$1, n, off, s, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, zone, $s};return $f; - }; - AddrFromSlice = function(slice) { - var _1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, ip, ok, slice; - ip = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - ok = false; - _1 = slice.$length; - if (_1 === (4)) { - _tmp = $clone(AddrFrom4($clone(($sliceToGoArray(slice, ptrType$2)), arrayType$1)), Addr); - _tmp$1 = true; - Addr.copy(ip, _tmp); - ok = _tmp$1; - return [ip, ok]; - } else if (_1 === (16)) { - _tmp$2 = $clone(ipv6Slice(slice), Addr); - _tmp$3 = true; - Addr.copy(ip, _tmp$2); - ok = _tmp$3; - return [ip, ok]; - } - _tmp$4 = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - _tmp$5 = false; - Addr.copy(ip, _tmp$4); - ok = _tmp$5; - return [ip, ok]; - }; - $pkg.AddrFromSlice = AddrFromSlice; - Addr.ptr.prototype.v4 = function(i) { - var i, ip; - ip = this; - return (($shiftRightUint64(ip.addr.lo, ((((3 - i << 24 >>> 24)) * 8 << 24 >>> 24))).$low << 24 >>> 24)); - }; - Addr.prototype.v4 = function(i) { return this.$val.v4(i); }; - Addr.ptr.prototype.v6 = function(i) { - var _q, _r, _r$1, i, ip, x, x$1; - ip = this; - return (($shiftRightUint64(((x = ip.addr.halves(), x$1 = (_r = ((_q = i / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1]))).$get(), ((((7 - (_r$1 = i % 8, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) * 8 << 24 >>> 24))).$low << 24 >>> 24)); - }; - Addr.prototype.v6 = function(i) { return this.$val.v6(i); }; - Addr.ptr.prototype.v6u16 = function(i) { - var _q, _r, _r$1, i, ip, x, x$1; - ip = this; - return (($shiftRightUint64(((x = ip.addr.halves(), x$1 = (_r = ((_q = i / 4, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero"))) % 2, _r === _r ? _r : $throwRuntimeError("integer divide by zero")), ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1]))).$get(), ((((3 - (_r$1 = i % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) << 24 >>> 24)) * 16 << 24 >>> 24))).$low << 16 >>> 16)); - }; - Addr.prototype.v6u16 = function(i) { return this.$val.v6u16(i); }; - Addr.ptr.prototype.isZero = function() { - var ip; - ip = this; - return ip.z === z0; - }; - Addr.prototype.isZero = function() { return this.$val.isZero(); }; - Addr.ptr.prototype.IsValid = function() { - var ip; - ip = this; - return !(ip.z === z0); - }; - Addr.prototype.IsValid = function() { return this.$val.IsValid(); }; - Addr.ptr.prototype.BitLen = function() { - var _1, ip; - ip = this; - _1 = ip.z; - if (_1 === (z0)) { - return 0; - } else if (_1 === (z4)) { - return 32; - } - return 128; - }; - Addr.prototype.BitLen = function() { return this.$val.BitLen(); }; - Addr.ptr.prototype.Compare = function(ip2) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, f1, f2, hi1, hi2, ip, ip2, lo1, lo2, za, zb; - ip = this; - _tmp = $clone(ip, Addr).BitLen(); - _tmp$1 = $clone(ip2, Addr).BitLen(); - f1 = _tmp; - f2 = _tmp$1; - if (f1 < f2) { - return -1; - } - if (f1 > f2) { - return 1; - } - _tmp$2 = ip.addr.hi; - _tmp$3 = ip2.addr.hi; - hi1 = _tmp$2; - hi2 = _tmp$3; - if ((hi1.$high < hi2.$high || (hi1.$high === hi2.$high && hi1.$low < hi2.$low))) { - return -1; - } - if ((hi1.$high > hi2.$high || (hi1.$high === hi2.$high && hi1.$low > hi2.$low))) { - return 1; - } - _tmp$4 = ip.addr.lo; - _tmp$5 = ip2.addr.lo; - lo1 = _tmp$4; - lo2 = _tmp$5; - if ((lo1.$high < lo2.$high || (lo1.$high === lo2.$high && lo1.$low < lo2.$low))) { - return -1; - } - if ((lo1.$high > lo2.$high || (lo1.$high === lo2.$high && lo1.$low > lo2.$low))) { - return 1; - } - if ($clone(ip, Addr).Is6()) { - _tmp$6 = $clone(ip, Addr).Zone(); - _tmp$7 = $clone(ip2, Addr).Zone(); - za = _tmp$6; - zb = _tmp$7; - if (za < zb) { - return -1; - } - if (za > zb) { - return 1; - } - } - return 0; - }; - Addr.prototype.Compare = function(ip2) { return this.$val.Compare(ip2); }; - Addr.ptr.prototype.Less = function(ip2) { - var ip, ip2; - ip = this; - return $clone(ip, Addr).Compare($clone(ip2, Addr)) === -1; - }; - Addr.prototype.Less = function(ip2) { return this.$val.Less(ip2); }; - Addr.ptr.prototype.Is4 = function() { - var ip; - ip = this; - return ip.z === z4; - }; - Addr.prototype.Is4 = function() { return this.$val.Is4(); }; - Addr.ptr.prototype.Is4In6 = function() { - var ip, x, x$1; - ip = this; - return $clone(ip, Addr).Is6() && (x = ip.addr.hi, (x.$high === 0 && x.$low === 0)) && (x$1 = $shiftRightUint64(ip.addr.lo, 32), (x$1.$high === 0 && x$1.$low === 65535)); - }; - Addr.prototype.Is4In6 = function() { return this.$val.Is4In6(); }; - Addr.ptr.prototype.Is6 = function() { - var ip; - ip = this; - return !(ip.z === z0) && !(ip.z === z4); - }; - Addr.prototype.Is6 = function() { return this.$val.Is6(); }; - Addr.ptr.prototype.Unmap = function() { - var ip; - ip = this; - if ($clone(ip, Addr).Is4In6()) { - ip.z = z4; - } - return ip; - }; - Addr.prototype.Unmap = function() { return this.$val.Unmap(); }; - Addr.ptr.prototype.withoutZone = function() { - var ip; - ip = this; - if (!$clone(ip, Addr).Is6()) { - return ip; - } - ip.z = z6noz; - return ip; - }; - Addr.prototype.withoutZone = function() { return this.$val.withoutZone(); }; - Addr.ptr.prototype.hasZone = function() { - var ip; - ip = this; - return !(ip.z === z0) && !(ip.z === z4) && !(ip.z === z6noz); - }; - Addr.prototype.hasZone = function() { return this.$val.hasZone(); }; - Addr.ptr.prototype.IsLinkLocalUnicast = function() { - var ip; - ip = this; - if ($clone(ip, Addr).Is4()) { - return ($clone(ip, Addr).v4(0) === 169) && ($clone(ip, Addr).v4(1) === 254); - } - if ($clone(ip, Addr).Is6()) { - return (($clone(ip, Addr).v6u16(0) & 65472) >>> 0) === 65152; - } - return false; - }; - Addr.prototype.IsLinkLocalUnicast = function() { return this.$val.IsLinkLocalUnicast(); }; - Addr.ptr.prototype.IsLoopback = function() { - var ip, x, x$1; - ip = this; - if ($clone(ip, Addr).Is4()) { - return $clone(ip, Addr).v4(0) === 127; - } - if ($clone(ip, Addr).Is6()) { - return (x = ip.addr.hi, (x.$high === 0 && x.$low === 0)) && (x$1 = ip.addr.lo, (x$1.$high === 0 && x$1.$low === 1)); - } - return false; - }; - Addr.prototype.IsLoopback = function() { return this.$val.IsLoopback(); }; - Addr.ptr.prototype.IsMulticast = function() { - var ip, x; - ip = this; - if ($clone(ip, Addr).Is4()) { - return (($clone(ip, Addr).v4(0) & 240) >>> 0) === 224; - } - if ($clone(ip, Addr).Is6()) { - return (x = $shiftRightUint64(ip.addr.hi, 56), (x.$high === 0 && x.$low === 255)); - } - return false; - }; - Addr.prototype.IsMulticast = function() { return this.$val.IsMulticast(); }; - Addr.ptr.prototype.IsInterfaceLocalMulticast = function() { - var ip; - ip = this; - if ($clone(ip, Addr).Is6()) { - return (($clone(ip, Addr).v6u16(0) & 65295) >>> 0) === 65281; - } - return false; - }; - Addr.prototype.IsInterfaceLocalMulticast = function() { return this.$val.IsInterfaceLocalMulticast(); }; - Addr.ptr.prototype.IsLinkLocalMulticast = function() { - var ip; - ip = this; - if ($clone(ip, Addr).Is4()) { - return ($clone(ip, Addr).v4(0) === 224) && ($clone(ip, Addr).v4(1) === 0) && ($clone(ip, Addr).v4(2) === 0); - } - if ($clone(ip, Addr).Is6()) { - return (($clone(ip, Addr).v6u16(0) & 65295) >>> 0) === 65282; - } - return false; - }; - Addr.prototype.IsLinkLocalMulticast = function() { return this.$val.IsLinkLocalMulticast(); }; - Addr.ptr.prototype.IsGlobalUnicast = function() { - var ip; - ip = this; - if (ip.z === z0) { - return false; - } - if ($clone(ip, Addr).Is4() && ($equal(ip, IPv4Unspecified(), Addr) || $equal(ip, AddrFrom4($toNativeArray($kindUint8, [255, 255, 255, 255])), Addr))) { - return false; - } - return !($equal(ip, IPv6Unspecified(), Addr)) && !$clone(ip, Addr).IsLoopback() && !$clone(ip, Addr).IsMulticast() && !$clone(ip, Addr).IsLinkLocalUnicast(); - }; - Addr.prototype.IsGlobalUnicast = function() { return this.$val.IsGlobalUnicast(); }; - Addr.ptr.prototype.IsPrivate = function() { - var ip; - ip = this; - if ($clone(ip, Addr).Is4()) { - return ($clone(ip, Addr).v4(0) === 10) || (($clone(ip, Addr).v4(0) === 172) && ((($clone(ip, Addr).v4(1) & 240) >>> 0) === 16)) || (($clone(ip, Addr).v4(0) === 192) && ($clone(ip, Addr).v4(1) === 168)); - } - if ($clone(ip, Addr).Is6()) { - return (($clone(ip, Addr).v6(0) & 254) >>> 0) === 252; - } - return false; - }; - Addr.prototype.IsPrivate = function() { return this.$val.IsPrivate(); }; - Addr.ptr.prototype.IsUnspecified = function() { - var ip; - ip = this; - return $equal(ip, IPv4Unspecified(), Addr) || $equal(ip, IPv6Unspecified(), Addr); - }; - Addr.prototype.IsUnspecified = function() { return this.$val.IsUnspecified(); }; - Addr.ptr.prototype.Prefix = function(b) { - var _1, b, effectiveBits, ip; - ip = this; - if (b < 0) { - return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("negative Prefix bits")]; - } - effectiveBits = b; - _1 = ip.z; - if (_1 === (z0)) { - return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), $ifaceNil]; - } else if (_1 === (z4)) { - if (b > 32) { - return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("prefix length " + itoa.Itoa(b) + " too large for IPv4")]; - } - effectiveBits = effectiveBits + (96) >> 0; - } else if (b > 128) { - return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("prefix length " + itoa.Itoa(b) + " too large for IPv6")]; - } - uint128.copy(ip.addr, $clone(ip.addr, uint128).and($clone(mask6(effectiveBits), uint128))); - return [PrefixFrom($clone(ip, Addr), b), $ifaceNil]; - }; - Addr.prototype.Prefix = function(b) { return this.$val.Prefix(b); }; - Addr.ptr.prototype.As16 = function() { - var a16, ip; - a16 = arrayType$2.zero(); - ip = this; - bePutUint64($subslice(new sliceType(a16), 0, 8), ip.addr.hi); - bePutUint64($subslice(new sliceType(a16), 8), ip.addr.lo); - arrayType$2.copy(a16, a16); - return a16; - }; - Addr.prototype.As16 = function() { return this.$val.As16(); }; - Addr.ptr.prototype.As4 = function() { - var a4, ip; - a4 = arrayType$1.zero(); - ip = this; - if (ip.z === z4 || $clone(ip, Addr).Is4In6()) { - bePutUint32(new sliceType(a4), ((ip.addr.lo.$low >>> 0))); - arrayType$1.copy(a4, a4); - return a4; - } - if (ip.z === z0) { - $panic(new $String("As4 called on IP zero value")); - } - $panic(new $String("As4 called on IPv6 address")); - }; - Addr.prototype.As4 = function() { return this.$val.As4(); }; - Addr.ptr.prototype.AsSlice = function() { - var _1, ip, ret, ret$1; - ip = this; - _1 = ip.z; - if (_1 === (z0)) { - return sliceType.nil; - } else if (_1 === (z4)) { - ret = arrayType$1.zero(); - bePutUint32(new sliceType(ret), ((ip.addr.lo.$low >>> 0))); - return new sliceType(ret); - } else { - ret$1 = arrayType$2.zero(); - bePutUint64($subslice(new sliceType(ret$1), 0, 8), ip.addr.hi); - bePutUint64($subslice(new sliceType(ret$1), 8), ip.addr.lo); - return new sliceType(ret$1); - } - }; - Addr.prototype.AsSlice = function() { return this.$val.AsSlice(); }; - Addr.ptr.prototype.Next = function() { - var ip; - ip = this; - uint128.copy(ip.addr, $clone(ip.addr, uint128).addOne()); - if ($clone(ip, Addr).Is4()) { - if (((ip.addr.lo.$low >>> 0)) === 0) { - return new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - } - } else { - if ($clone(ip.addr, uint128).isZero()) { - return new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - } - } - return ip; - }; - Addr.prototype.Next = function() { return this.$val.Next(); }; - Addr.ptr.prototype.Prev = function() { - var ip; - ip = this; - if ($clone(ip, Addr).Is4()) { - if (((ip.addr.lo.$low >>> 0)) === 0) { - return new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - } - } else if ($clone(ip.addr, uint128).isZero()) { - return new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - } - uint128.copy(ip.addr, $clone(ip.addr, uint128).subOne()); - return ip; - }; - Addr.prototype.Prev = function() { return this.$val.Prev(); }; - Addr.ptr.prototype.String = function() { - var _1, ip, z; - ip = this; - _1 = ip.z; - if (_1 === (z0)) { - return "invalid IP"; - } else if (_1 === (z4)) { - return $clone(ip, Addr).string4(); - } else { - if ($clone(ip, Addr).Is4In6()) { - z = $clone(ip, Addr).Zone(); - if (!(z === "")) { - return "::ffff:" + $clone($clone(ip, Addr).Unmap(), Addr).String() + "%" + z; - } else { - return "::ffff:" + $clone($clone(ip, Addr).Unmap(), Addr).String(); - } - } - return $clone(ip, Addr).string6(); - } - }; - Addr.prototype.String = function() { return this.$val.String(); }; - Addr.ptr.prototype.AppendTo = function(b) { - var _1, b, ip, z; - ip = this; - _1 = ip.z; - if (_1 === (z0)) { - return b; - } else if (_1 === (z4)) { - return $clone(ip, Addr).appendTo4(b); - } else { - if ($clone(ip, Addr).Is4In6()) { - b = $appendSlice(b, "::ffff:"); - b = $clone($clone(ip, Addr).Unmap(), Addr).appendTo4(b); - z = $clone(ip, Addr).Zone(); - if (!(z === "")) { - b = $append(b, 37); - b = $appendSlice(b, z); - } - return b; - } - return $clone(ip, Addr).appendTo6(b); - } - }; - Addr.prototype.AppendTo = function(b) { return this.$val.AppendTo(b); }; - appendDecimal = function(b, x) { - var _q, _q$1, _r, _r$1, b, x; - if (x >= 100) { - b = $append(b, "0123456789abcdef".charCodeAt((_q = x / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")))); - } - if (x >= 10) { - b = $append(b, "0123456789abcdef".charCodeAt((_r = (_q$1 = x / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero")) % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")))); - } - return $append(b, "0123456789abcdef".charCodeAt((_r$1 = x % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")))); - }; - appendHex = function(b, x) { - var b, x; - if (x >= 4096) { - b = $append(b, "0123456789abcdef".charCodeAt((x >>> 12 << 16 >>> 16))); - } - if (x >= 256) { - b = $append(b, "0123456789abcdef".charCodeAt((((x >>> 8 << 16 >>> 16) & 15) >>> 0))); - } - if (x >= 16) { - b = $append(b, "0123456789abcdef".charCodeAt((((x >>> 4 << 16 >>> 16) & 15) >>> 0))); - } - return $append(b, "0123456789abcdef".charCodeAt(((x & 15) >>> 0))); - }; - appendHexPad = function(b, x) { - var b, x; - return $append(b, "0123456789abcdef".charCodeAt((x >>> 12 << 16 >>> 16)), "0123456789abcdef".charCodeAt((((x >>> 8 << 16 >>> 16) & 15) >>> 0)), "0123456789abcdef".charCodeAt((((x >>> 4 << 16 >>> 16) & 15) >>> 0)), "0123456789abcdef".charCodeAt(((x & 15) >>> 0))); - }; - Addr.ptr.prototype.string4 = function() { - var ip, ret; - ip = this; - ret = $makeSlice(sliceType, 0, 15); - ret = $clone(ip, Addr).appendTo4(ret); - return ($bytesToString(ret)); - }; - Addr.prototype.string4 = function() { return this.$val.string4(); }; - Addr.ptr.prototype.appendTo4 = function(ret) { - var ip, ret; - ip = this; - ret = appendDecimal(ret, $clone(ip, Addr).v4(0)); - ret = $append(ret, 46); - ret = appendDecimal(ret, $clone(ip, Addr).v4(1)); - ret = $append(ret, 46); - ret = appendDecimal(ret, $clone(ip, Addr).v4(2)); - ret = $append(ret, 46); - ret = appendDecimal(ret, $clone(ip, Addr).v4(3)); - return ret; - }; - Addr.prototype.appendTo4 = function(ret) { return this.$val.appendTo4(ret); }; - Addr.ptr.prototype.string6 = function() { - var ip, ret; - ip = this; - ret = $makeSlice(sliceType, 0, 46); - ret = $clone(ip, Addr).appendTo6(ret); - return ($bytesToString(ret)); - }; - Addr.prototype.string6 = function() { return this.$val.string6(); }; - Addr.ptr.prototype.appendTo6 = function(ret) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, i, i$1, ip, j, l, ret, zeroEnd, zeroStart; - ip = this; - _tmp = 255; - _tmp$1 = 255; - zeroStart = _tmp; - zeroEnd = _tmp$1; - i = 0; - while (true) { - if (!(i < 8)) { break; } - j = i; - while (true) { - if (!(j < 8 && ($clone(ip, Addr).v6u16(j) === 0))) { break; } - j = j + (1) << 24 >>> 24; - } - l = j - i << 24 >>> 24; - if (l >= 2 && l > (zeroEnd - zeroStart << 24 >>> 24)) { - _tmp$2 = i; - _tmp$3 = j; - zeroStart = _tmp$2; - zeroEnd = _tmp$3; - } - i = i + (1) << 24 >>> 24; - } - i$1 = 0; - while (true) { - if (!(i$1 < 8)) { break; } - if (i$1 === zeroStart) { - ret = $append(ret, 58, 58); - i$1 = zeroEnd; - if (i$1 >= 8) { - break; - } - } else if (i$1 > 0) { - ret = $append(ret, 58); - } - ret = appendHex(ret, $clone(ip, Addr).v6u16(i$1)); - i$1 = i$1 + (1) << 24 >>> 24; - } - if (!(ip.z === z6noz)) { - ret = $append(ret, 37); - ret = $appendSlice(ret, $clone(ip, Addr).Zone()); - } - return ret; - }; - Addr.prototype.appendTo6 = function(ret) { return this.$val.appendTo6(ret); }; - Addr.ptr.prototype.StringExpanded = function() { - var _1, i, ip, ret; - ip = this; - _1 = ip.z; - if (_1 === (z0) || _1 === (z4)) { - return $clone(ip, Addr).String(); - } - ret = $makeSlice(sliceType, 0, 39); - i = 0; - while (true) { - if (!(i < 8)) { break; } - if (i > 0) { - ret = $append(ret, 58); - } - ret = appendHexPad(ret, $clone(ip, Addr).v6u16(i)); - i = i + (1) << 24 >>> 24; - } - if (!(ip.z === z6noz)) { - ret = $append(ret, 37); - ret = $appendSlice(ret, $clone(ip, Addr).Zone()); - } - return ($bytesToString(ret)); - }; - Addr.prototype.StringExpanded = function() { return this.$val.StringExpanded(); }; - Addr.ptr.prototype.MarshalText = function() { - var _1, b, b$1, ip, max, max$1, z; - ip = this; - _1 = ip.z; - if (_1 === (z0)) { - return [(new sliceType($stringToBytes(""))), $ifaceNil]; - } else if (_1 === (z4)) { - max = 15; - b = $makeSlice(sliceType, 0, max); - return [$clone(ip, Addr).appendTo4(b), $ifaceNil]; - } else { - max$1 = 46; - b$1 = $makeSlice(sliceType, 0, max$1); - if ($clone(ip, Addr).Is4In6()) { - b$1 = $appendSlice(b$1, "::ffff:"); - b$1 = $clone($clone(ip, Addr).Unmap(), Addr).appendTo4(b$1); - z = $clone(ip, Addr).Zone(); - if (!(z === "")) { - b$1 = $append(b$1, 37); - b$1 = $appendSlice(b$1, z); - } - return [b$1, $ifaceNil]; - } - return [$clone(ip, Addr).appendTo6(b$1), $ifaceNil]; - } - }; - Addr.prototype.MarshalText = function() { return this.$val.MarshalText(); }; - Addr.ptr.prototype.UnmarshalText = function(text) { - var {_r, _tuple, err, ip, text, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ip = this; - if (text.$length === 0) { - Addr.copy(ip, new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), "")); - $s = -1; return $ifaceNil; - } - err = $ifaceNil; - _r = ParseAddr(($bytesToString(text))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - Addr.copy(ip, _tuple[0]); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Addr.ptr.prototype.UnmarshalText, $c: true, $r, _r, _tuple, err, ip, text, $s};return $f; - }; - Addr.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; - Addr.ptr.prototype.marshalBinaryWithTrailingBytes = function(trailingBytes) { - var _1, b, ip, trailingBytes, z; - ip = this; - b = sliceType.nil; - _1 = ip.z; - if (_1 === (z0)) { - b = $makeSlice(sliceType, trailingBytes); - } else if (_1 === (z4)) { - b = $makeSlice(sliceType, (4 + trailingBytes >> 0)); - bePutUint32(b, ((ip.addr.lo.$low >>> 0))); - } else { - z = $clone(ip, Addr).Zone(); - b = $makeSlice(sliceType, ((16 + z.length >> 0) + trailingBytes >> 0)); - bePutUint64($subslice(b, 0, 8), ip.addr.hi); - bePutUint64($subslice(b, 8), ip.addr.lo); - $copyString($subslice(b, 16), z); - } - return b; - }; - Addr.prototype.marshalBinaryWithTrailingBytes = function(trailingBytes) { return this.$val.marshalBinaryWithTrailingBytes(trailingBytes); }; - Addr.ptr.prototype.MarshalBinary = function() { - var ip; - ip = this; - return [$clone(ip, Addr).marshalBinaryWithTrailingBytes(0), $ifaceNil]; - }; - Addr.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - Addr.ptr.prototype.UnmarshalBinary = function(b) { - var b, ip, n; - ip = this; - n = b.$length; - if ((n === 0)) { - Addr.copy(ip, new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), "")); - return $ifaceNil; - } else if ((n === 4)) { - Addr.copy(ip, AddrFrom4($clone(($sliceToGoArray(b, ptrType$2)), arrayType$1))); - return $ifaceNil; - } else if ((n === 16)) { - Addr.copy(ip, ipv6Slice(b)); - return $ifaceNil; - } else if (n > 16) { - Addr.copy(ip, $clone(ipv6Slice($subslice(b, 0, 16)), Addr).WithZone(($bytesToString($subslice(b, 16))))); - return $ifaceNil; - } - return errors.New("unexpected slice size"); - }; - Addr.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - AddrPortFrom = function(ip, port) { - var ip, port; - return new AddrPort.ptr($clone(ip, Addr), port); - }; - $pkg.AddrPortFrom = AddrPortFrom; - AddrPort.ptr.prototype.Addr = function() { - var p; - p = this; - return p.ip; - }; - AddrPort.prototype.Addr = function() { return this.$val.Addr(); }; - AddrPort.ptr.prototype.Port = function() { - var p; - p = this; - return p.port; - }; - AddrPort.prototype.Port = function() { return this.$val.Port(); }; - splitAddrPort = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, err, i, ip, port, s, v6; - ip = ""; - port = ""; - v6 = false; - err = $ifaceNil; - i = stringsLastIndexByte(s, 58); - if (i === -1) { - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = false; - _tmp$3 = errors.New("not an ip:port"); - ip = _tmp; - port = _tmp$1; - v6 = _tmp$2; - err = _tmp$3; - return [ip, port, v6, err]; - } - _tmp$4 = $substring(s, 0, i); - _tmp$5 = $substring(s, (i + 1 >> 0)); - ip = _tmp$4; - port = _tmp$5; - if (ip.length === 0) { - _tmp$6 = ""; - _tmp$7 = ""; - _tmp$8 = false; - _tmp$9 = errors.New("no IP"); - ip = _tmp$6; - port = _tmp$7; - v6 = _tmp$8; - err = _tmp$9; - return [ip, port, v6, err]; - } - if (port.length === 0) { - _tmp$10 = ""; - _tmp$11 = ""; - _tmp$12 = false; - _tmp$13 = errors.New("no port"); - ip = _tmp$10; - port = _tmp$11; - v6 = _tmp$12; - err = _tmp$13; - return [ip, port, v6, err]; - } - if (ip.charCodeAt(0) === 91) { - if (ip.length < 2 || !((ip.charCodeAt((ip.length - 1 >> 0)) === 93))) { - _tmp$14 = ""; - _tmp$15 = ""; - _tmp$16 = false; - _tmp$17 = errors.New("missing ]"); - ip = _tmp$14; - port = _tmp$15; - v6 = _tmp$16; - err = _tmp$17; - return [ip, port, v6, err]; - } - ip = $substring(ip, 1, (ip.length - 1 >> 0)); - v6 = true; - } - _tmp$18 = ip; - _tmp$19 = port; - _tmp$20 = v6; - _tmp$21 = $ifaceNil; - ip = _tmp$18; - port = _tmp$19; - v6 = _tmp$20; - err = _tmp$21; - return [ip, port, v6, err]; - }; - ParseAddrPort = function(s) { - var {_r, _tuple, _tuple$1, _tuple$2, err, ip, ipp, port, port16, s, v6, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ipp = new AddrPort.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - _tuple = splitAddrPort(s); - ip = _tuple[0]; - port = _tuple[1]; - v6 = _tuple[2]; - err = _tuple[3]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ipp, err]; - } - _tuple$1 = strconv.ParseUint(port, 10, 16); - port16 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ipp, errors.New("invalid port " + strconv.Quote(port) + " parsing " + strconv.Quote(s))]; - } - ipp.port = ((port16.$low << 16 >>> 16)); - _r = ParseAddr(ip); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$2 = _r; - Addr.copy(ipp.ip, _tuple$2[0]); - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new AddrPort.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), err]; - } - if (v6 && $clone(ipp.ip, Addr).Is4()) { - $s = -1; return [new AddrPort.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("invalid ip:port " + strconv.Quote(s) + ", square brackets can only be used with IPv6 addresses")]; - } else if (!v6 && $clone(ipp.ip, Addr).Is6()) { - $s = -1; return [new AddrPort.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("invalid ip:port " + strconv.Quote(s) + ", IPv6 addresses must be surrounded by square brackets")]; - } - $s = -1; return [ipp, $ifaceNil]; - /* */ } return; } var $f = {$blk: ParseAddrPort, $c: true, $r, _r, _tuple, _tuple$1, _tuple$2, err, ip, ipp, port, port16, s, v6, $s};return $f; - }; - $pkg.ParseAddrPort = ParseAddrPort; - AddrPort.ptr.prototype.isZero = function() { - var p; - p = this; - return $equal(p, new AddrPort.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), AddrPort); - }; - AddrPort.prototype.isZero = function() { return this.$val.isZero(); }; - AddrPort.ptr.prototype.IsValid = function() { - var p; - p = this; - return $clone(p.ip, Addr).IsValid(); - }; - AddrPort.prototype.IsValid = function() { return this.$val.IsValid(); }; - AddrPort.ptr.prototype.String = function() { - var _1, _i, _ref, a, buf, i, p; - p = this; - _1 = p.ip.z; - if (_1 === (z0)) { - return "invalid AddrPort"; - } else if (_1 === (z4)) { - a = $clone($clone(p.ip, Addr).As4(), arrayType$1); - buf = $makeSlice(sliceType, 0, 21); - _ref = a; - _i = 0; - while (true) { - if (!(_i < 4)) { break; } - i = _i; - buf = strconv.AppendUint(buf, (new $Uint64(0, ((i < 0 || i >= a.length) ? ($throwRuntimeError("index out of range"), undefined) : a[i]))), 10); - buf = $append(buf, "...:".charCodeAt(i)); - _i++; - } - buf = strconv.AppendUint(buf, (new $Uint64(0, p.port)), 10); - return ($bytesToString(buf)); - } else { - return joinHostPort($clone(p.ip, Addr).String(), itoa.Itoa(((p.port >> 0)))); - } - }; - AddrPort.prototype.String = function() { return this.$val.String(); }; - joinHostPort = function(host, port) { - var host, port; - if (bytealg.IndexByteString(host, 58) >= 0) { - return "[" + host + "]:" + port; - } - return host + ":" + port; - }; - AddrPort.ptr.prototype.AppendTo = function(b) { - var _1, b, p, z; - p = this; - _1 = p.ip.z; - if (_1 === (z0)) { - return b; - } else if (_1 === (z4)) { - b = $clone(p.ip, Addr).appendTo4(b); - } else { - if ($clone(p.ip, Addr).Is4In6()) { - b = $appendSlice(b, "[::ffff:"); - b = $clone($clone(p.ip, Addr).Unmap(), Addr).appendTo4(b); - z = $clone(p.ip, Addr).Zone(); - if (!(z === "")) { - b = $append(b, 37); - b = $appendSlice(b, z); - } - } else { - b = $append(b, 91); - b = $clone(p.ip, Addr).appendTo6(b); - } - b = $append(b, 93); - } - b = $append(b, 58); - b = strconv.AppendInt(b, (new $Int64(0, p.port)), 10); - return b; - }; - AddrPort.prototype.AppendTo = function(b) { return this.$val.AppendTo(b); }; - AddrPort.ptr.prototype.MarshalText = function() { - var _1, b, max, p; - p = this; - max = 0; - _1 = p.ip.z; - if (_1 === (z0)) { - } else if (_1 === (z4)) { - max = 21; - } else { - max = 54; - } - b = $makeSlice(sliceType, 0, max); - b = $clone(p, AddrPort).AppendTo(b); - return [b, $ifaceNil]; - }; - AddrPort.prototype.MarshalText = function() { return this.$val.MarshalText(); }; - AddrPort.ptr.prototype.UnmarshalText = function(text) { - var {_r, _tuple, err, p, text, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (text.$length === 0) { - AddrPort.copy(p, new AddrPort.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0)); - $s = -1; return $ifaceNil; - } - err = $ifaceNil; - _r = ParseAddrPort(($bytesToString(text))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - AddrPort.copy(p, _tuple[0]); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: AddrPort.ptr.prototype.UnmarshalText, $c: true, $r, _r, _tuple, err, p, text, $s};return $f; - }; - AddrPort.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; - AddrPort.ptr.prototype.MarshalBinary = function() { - var b, p; - p = this; - b = $clone($clone(p, AddrPort).Addr(), Addr).marshalBinaryWithTrailingBytes(2); - lePutUint16($subslice(b, (b.$length - 2 >> 0)), $clone(p, AddrPort).Port()); - return [b, $ifaceNil]; - }; - AddrPort.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - AddrPort.ptr.prototype.UnmarshalBinary = function(b) { - var addr, b, err, p; - p = this; - if (b.$length < 2) { - return errors.New("unexpected slice size"); - } - addr = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - err = addr.UnmarshalBinary($subslice(b, 0, (b.$length - 2 >> 0))); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return err; - } - AddrPort.copy(p, AddrPortFrom($clone(addr, Addr), leUint16($subslice(b, (b.$length - 2 >> 0))))); - return $ifaceNil; - }; - AddrPort.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - PrefixFrom = function(ip, bits$1) { - var b16, bits$1, ip; - if (bits$1 < 0 || bits$1 > $clone(ip, Addr).BitLen()) { - bits$1 = -1; - } - b16 = ((bits$1 << 16 >> 16)); - return new Prefix.ptr($clone($clone(ip, Addr).withoutZone(), Addr), b16); - }; - $pkg.PrefixFrom = PrefixFrom; - Prefix.ptr.prototype.Addr = function() { - var p; - p = this; - return p.ip; - }; - Prefix.prototype.Addr = function() { return this.$val.Addr(); }; - Prefix.ptr.prototype.Bits = function() { - var p; - p = this; - return ((p.bits >> 0)); - }; - Prefix.prototype.Bits = function() { return this.$val.Bits(); }; - Prefix.ptr.prototype.IsValid = function() { - var p; - p = this; - return !$clone(p.ip, Addr).isZero() && p.bits >= 0 && ((p.bits >> 0)) <= $clone(p.ip, Addr).BitLen(); - }; - Prefix.prototype.IsValid = function() { return this.$val.IsValid(); }; - Prefix.ptr.prototype.isZero = function() { - var p; - p = this; - return $equal(p, new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), Prefix); - }; - Prefix.prototype.isZero = function() { return this.$val.isZero(); }; - Prefix.ptr.prototype.IsSingleIP = function() { - var p; - p = this; - return !((p.bits === 0)) && (((p.bits >> 0)) === $clone(p.ip, Addr).BitLen()); - }; - Prefix.prototype.IsSingleIP = function() { return this.$val.IsSingleIP(); }; - ParsePrefix = function(s) { - var {$24r, _r, _r$1, _r$2, _tuple, _tuple$1, bits$1, bitsStr, err, i, ip, maxBits, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = stringsLastIndexByte(s, 47); - if (i < 0) { - $s = -1; return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("netip.ParsePrefix(" + strconv.Quote(s) + "): no '/'")]; - } - _r = ParseAddr($substring(s, 0, i)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ip = $clone(_tuple[0], Addr); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$1 = err.Error(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = errors.New("netip.ParsePrefix(" + strconv.Quote(s) + "): " + _r$1); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), _r$2]; - $s = 6; case 6: return $24r; - /* } */ case 3: - bitsStr = $substring(s, (i + 1 >> 0)); - _tuple$1 = strconv.Atoi(bitsStr); - bits$1 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("netip.ParsePrefix(" + strconv.Quote(s) + ": bad bits after slash: " + strconv.Quote(bitsStr))]; - } - maxBits = 32; - if ($clone(ip, Addr).Is6()) { - maxBits = 128; - } - if (bits$1 < 0 || bits$1 > maxBits) { - $s = -1; return [new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0), errors.New("netip.ParsePrefix(" + strconv.Quote(s) + ": prefix length out of range")]; - } - $s = -1; return [PrefixFrom($clone(ip, Addr), bits$1), $ifaceNil]; - /* */ } return; } var $f = {$blk: ParsePrefix, $c: true, $r, $24r, _r, _r$1, _r$2, _tuple, _tuple$1, bits$1, bitsStr, err, i, ip, maxBits, s, $s};return $f; - }; - $pkg.ParsePrefix = ParsePrefix; - Prefix.ptr.prototype.Masked = function() { - var _tuple, err, m, p; - p = this; - _tuple = $clone(p.ip, Addr).Prefix(((p.bits >> 0))); - m = $clone(_tuple[0], Prefix); - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - return m; - } - return new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - }; - Prefix.prototype.Masked = function() { return this.$val.Masked(); }; - Prefix.ptr.prototype.Contains = function(ip) { - var _tmp, _tmp$1, f1, f2, ip, p, x, x$1; - p = this; - if (!$clone(p, Prefix).IsValid() || $clone(ip, Addr).hasZone()) { - return false; - } - _tmp = $clone(p.ip, Addr).BitLen(); - _tmp$1 = $clone(ip, Addr).BitLen(); - f1 = _tmp; - f2 = _tmp$1; - if ((f1 === 0) || (f2 === 0) || !((f1 === f2))) { - return false; - } - if ($clone(ip, Addr).Is4()) { - return (($shiftRightUint64(((x = ip.addr.lo, x$1 = p.ip.addr.lo, new $Uint64(x.$high ^ x$1.$high, (x.$low ^ x$1.$low) >>> 0))), ((((32 - p.bits << 16 >> 16)) & 63))).$low >>> 0)) === 0; - } else { - return $clone($clone($clone(ip.addr, uint128).xor($clone(p.ip.addr, uint128)), uint128).and($clone(mask6(((p.bits >> 0))), uint128)), uint128).isZero(); - } - }; - Prefix.prototype.Contains = function(ip) { return this.$val.Contains(ip); }; - Prefix.ptr.prototype.Overlaps = function(o) { - var _tuple, _tuple$1, err, minBits, o, p; - p = this; - if (!$clone(p, Prefix).IsValid() || !$clone(o, Prefix).IsValid()) { - return false; - } - if ($equal(p, o, Prefix)) { - return true; - } - if (!($clone(p.ip, Addr).Is4() === $clone(o.ip, Addr).Is4())) { - return false; - } - minBits = 0; - if (p.bits < o.bits) { - minBits = p.bits; - } else { - minBits = o.bits; - } - if (minBits === 0) { - return true; - } - err = $ifaceNil; - _tuple = $clone(p.ip, Addr).Prefix(((minBits >> 0))); - Prefix.copy(p, _tuple[0]); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return false; - } - _tuple$1 = $clone(o.ip, Addr).Prefix(((minBits >> 0))); - Prefix.copy(o, _tuple$1[0]); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return false; - } - return $equal(p.ip, o.ip, Addr); - }; - Prefix.prototype.Overlaps = function(o) { return this.$val.Overlaps(o); }; - Prefix.ptr.prototype.AppendTo = function(b) { - var b, p; - p = this; - if ($clone(p, Prefix).isZero()) { - return b; - } - if (!$clone(p, Prefix).IsValid()) { - return $appendSlice(b, "invalid Prefix"); - } - if (p.ip.z === z4) { - b = $clone(p.ip, Addr).appendTo4(b); - } else { - if ($clone(p.ip, Addr).Is4In6()) { - b = $appendSlice(b, "::ffff:"); - b = $clone($clone(p.ip, Addr).Unmap(), Addr).appendTo4(b); - } else { - b = $clone(p.ip, Addr).appendTo6(b); - } - } - b = $append(b, 47); - b = appendDecimal(b, ((p.bits << 24 >>> 24))); - return b; - }; - Prefix.prototype.AppendTo = function(b) { return this.$val.AppendTo(b); }; - Prefix.ptr.prototype.MarshalText = function() { - var _1, b, max, p; - p = this; - max = 0; - _1 = p.ip.z; - if (_1 === (z0)) { - } else if (_1 === (z4)) { - max = 18; - } else { - max = 50; - } - b = $makeSlice(sliceType, 0, max); - b = $clone(p, Prefix).AppendTo(b); - return [b, $ifaceNil]; - }; - Prefix.prototype.MarshalText = function() { return this.$val.MarshalText(); }; - Prefix.ptr.prototype.UnmarshalText = function(text) { - var {_r, _tuple, err, p, text, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - if (text.$length === 0) { - Prefix.copy(p, new Prefix.ptr(new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0)); - $s = -1; return $ifaceNil; - } - err = $ifaceNil; - _r = ParsePrefix(($bytesToString(text))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - Prefix.copy(p, _tuple[0]); - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Prefix.ptr.prototype.UnmarshalText, $c: true, $r, _r, _tuple, err, p, text, $s};return $f; - }; - Prefix.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; - Prefix.ptr.prototype.MarshalBinary = function() { - var b, p, x; - p = this; - b = $clone($clone($clone(p, Prefix).Addr(), Addr).withoutZone(), Addr).marshalBinaryWithTrailingBytes(1); - (x = b.$length - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x] = (($clone(p, Prefix).Bits() << 24 >>> 24)))); - return [b, $ifaceNil]; - }; - Prefix.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - Prefix.ptr.prototype.UnmarshalBinary = function(b) { - var addr, b, err, p, x; - p = this; - if (b.$length < 1) { - return errors.New("unexpected slice size"); - } - addr = new Addr.ptr(new uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - err = addr.UnmarshalBinary($subslice(b, 0, (b.$length - 1 >> 0))); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return err; - } - Prefix.copy(p, PrefixFrom($clone(addr, Addr), (((x = b.$length - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])) >> 0)))); - return $ifaceNil; - }; - Prefix.prototype.UnmarshalBinary = function(b) { return this.$val.UnmarshalBinary(b); }; - Prefix.ptr.prototype.String = function() { - var p; - p = this; - if (!$clone(p, Prefix).IsValid()) { - return "invalid Prefix"; - } - return $clone(p.ip, Addr).String() + "/" + itoa.Itoa(((p.bits >> 0))); - }; - Prefix.prototype.String = function() { return this.$val.String(); }; - stringsLastIndexByte = function(s, b) { - var b, i, s; - i = s.length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (s.charCodeAt(i) === b) { - return i; - } - i = i - (1) >> 0; - } - return -1; - }; - beUint64 = function(b) { - var b, x, x$1, x$10, x$11, x$12, x$13, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - return (x = (x$1 = (x$2 = (x$3 = (x$4 = (x$5 = (x$6 = (new $Uint64(0, (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7]))), x$7 = $shiftLeft64((new $Uint64(0, (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6]))), 8), new $Uint64(x$6.$high | x$7.$high, (x$6.$low | x$7.$low) >>> 0)), x$8 = $shiftLeft64((new $Uint64(0, (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5]))), 16), new $Uint64(x$5.$high | x$8.$high, (x$5.$low | x$8.$low) >>> 0)), x$9 = $shiftLeft64((new $Uint64(0, (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4]))), 24), new $Uint64(x$4.$high | x$9.$high, (x$4.$low | x$9.$low) >>> 0)), x$10 = $shiftLeft64((new $Uint64(0, (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]))), 32), new $Uint64(x$3.$high | x$10.$high, (x$3.$low | x$10.$low) >>> 0)), x$11 = $shiftLeft64((new $Uint64(0, (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]))), 40), new $Uint64(x$2.$high | x$11.$high, (x$2.$low | x$11.$low) >>> 0)), x$12 = $shiftLeft64((new $Uint64(0, (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]))), 48), new $Uint64(x$1.$high | x$12.$high, (x$1.$low | x$12.$low) >>> 0)), x$13 = $shiftLeft64((new $Uint64(0, (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]))), 56), new $Uint64(x.$high | x$13.$high, (x.$low | x$13.$low) >>> 0)); - }; - bePutUint64 = function(b, v) { - var b, v; - $unused((7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (($shiftRightUint64(v, 56).$low << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (($shiftRightUint64(v, 48).$low << 24 >>> 24))); - (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (($shiftRightUint64(v, 40).$low << 24 >>> 24))); - (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = (($shiftRightUint64(v, 32).$low << 24 >>> 24))); - (4 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 4] = (($shiftRightUint64(v, 24).$low << 24 >>> 24))); - (5 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 5] = (($shiftRightUint64(v, 16).$low << 24 >>> 24))); - (6 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 6] = (($shiftRightUint64(v, 8).$low << 24 >>> 24))); - (7 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 7] = ((v.$low << 24 >>> 24))); - }; - bePutUint32 = function(b, v) { - var b, v; - $unused((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = (((v >>> 24 >>> 0) << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 16 >>> 0) << 24 >>> 24))); - (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2] = (((v >>> 8 >>> 0) << 24 >>> 24))); - (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3] = ((v << 24 >>> 24))); - }; - leUint16 = function(b) { - var b; - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - return ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) << 16 >>> 16)) | ((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) << 16 >>> 16)) << 8 << 16 >>> 16)) >>> 0; - }; - lePutUint16 = function(b, v) { - var b, v; - $unused((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1])); - (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0] = ((v << 24 >>> 24))); - (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1] = (((v >>> 8 << 16 >>> 16) << 24 >>> 24))); - }; - Addr.ptr.prototype.Zone = function() { - var ip; - ip = this; - if (ip.z === z4 || ip.z === z6noz) { - return ""; - } - return ip.z; - }; - Addr.prototype.Zone = function() { return this.$val.Zone(); }; - Addr.ptr.prototype.WithZone = function(zone) { - var ip, zone; - ip = this; - if (!$clone(ip, Addr).Is6()) { - return ip; - } - if (zone === "") { - ip.z = z6noz; - return ip; - } - ip.z = zone; - return ip; - }; - Addr.prototype.WithZone = function(zone) { return this.$val.WithZone(zone); }; - uint128.methods = [{prop: "isZero", name: "isZero", pkg: "net/netip", typ: $funcType([], [$Bool], false)}, {prop: "and", name: "and", pkg: "net/netip", typ: $funcType([uint128], [uint128], false)}, {prop: "xor", name: "xor", pkg: "net/netip", typ: $funcType([uint128], [uint128], false)}, {prop: "or", name: "or", pkg: "net/netip", typ: $funcType([uint128], [uint128], false)}, {prop: "not", name: "not", pkg: "net/netip", typ: $funcType([], [uint128], false)}, {prop: "subOne", name: "subOne", pkg: "net/netip", typ: $funcType([], [uint128], false)}, {prop: "addOne", name: "addOne", pkg: "net/netip", typ: $funcType([], [uint128], false)}, {prop: "commonPrefixLen", name: "commonPrefixLen", pkg: "net/netip", typ: $funcType([uint128], [$Uint8], false)}, {prop: "bitsSetFrom", name: "bitsSetFrom", pkg: "net/netip", typ: $funcType([$Uint8], [uint128], false)}, {prop: "bitsClearedFrom", name: "bitsClearedFrom", pkg: "net/netip", typ: $funcType([$Uint8], [uint128], false)}]; - ptrType$3.methods = [{prop: "halves", name: "halves", pkg: "net/netip", typ: $funcType([], [arrayType$3], false)}]; - parseAddrError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - AddrPort.methods = [{prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Port", name: "Port", pkg: "", typ: $funcType([], [$Uint16], false)}, {prop: "isZero", name: "isZero", pkg: "net/netip", typ: $funcType([], [$Bool], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "AppendTo", name: "AppendTo", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}]; - ptrType$4.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}]; - Prefix.methods = [{prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Bits", name: "Bits", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "isZero", name: "isZero", pkg: "net/netip", typ: $funcType([], [$Bool], false)}, {prop: "IsSingleIP", name: "IsSingleIP", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Masked", name: "Masked", pkg: "", typ: $funcType([], [Prefix], false)}, {prop: "Contains", name: "Contains", pkg: "", typ: $funcType([Addr], [$Bool], false)}, {prop: "Overlaps", name: "Overlaps", pkg: "", typ: $funcType([Prefix], [$Bool], false)}, {prop: "AppendTo", name: "AppendTo", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$5.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}]; - Addr.methods = [{prop: "v4", name: "v4", pkg: "net/netip", typ: $funcType([$Uint8], [$Uint8], false)}, {prop: "v6", name: "v6", pkg: "net/netip", typ: $funcType([$Uint8], [$Uint8], false)}, {prop: "v6u16", name: "v6u16", pkg: "net/netip", typ: $funcType([$Uint8], [$Uint16], false)}, {prop: "isZero", name: "isZero", pkg: "net/netip", typ: $funcType([], [$Bool], false)}, {prop: "IsValid", name: "IsValid", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "BitLen", name: "BitLen", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Compare", name: "Compare", pkg: "", typ: $funcType([Addr], [$Int], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([Addr], [$Bool], false)}, {prop: "lessOrEq", name: "lessOrEq", pkg: "net/netip", typ: $funcType([Addr], [$Bool], false)}, {prop: "Is4", name: "Is4", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Is4In6", name: "Is4In6", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Is6", name: "Is6", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Unmap", name: "Unmap", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "withoutZone", name: "withoutZone", pkg: "net/netip", typ: $funcType([], [Addr], false)}, {prop: "hasZone", name: "hasZone", pkg: "net/netip", typ: $funcType([], [$Bool], false)}, {prop: "IsLinkLocalUnicast", name: "IsLinkLocalUnicast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLoopback", name: "IsLoopback", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMulticast", name: "IsMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsInterfaceLocalMulticast", name: "IsInterfaceLocalMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLinkLocalMulticast", name: "IsLinkLocalMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsGlobalUnicast", name: "IsGlobalUnicast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPrivate", name: "IsPrivate", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsUnspecified", name: "IsUnspecified", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Prefix", name: "Prefix", pkg: "", typ: $funcType([$Int], [Prefix, $error], false)}, {prop: "As16", name: "As16", pkg: "", typ: $funcType([], [arrayType$2], false)}, {prop: "As4", name: "As4", pkg: "", typ: $funcType([], [arrayType$1], false)}, {prop: "AsSlice", name: "AsSlice", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Prev", name: "Prev", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "AppendTo", name: "AppendTo", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "string4", name: "string4", pkg: "net/netip", typ: $funcType([], [$String], false)}, {prop: "appendTo4", name: "appendTo4", pkg: "net/netip", typ: $funcType([sliceType], [sliceType], false)}, {prop: "string6", name: "string6", pkg: "net/netip", typ: $funcType([], [$String], false)}, {prop: "appendTo6", name: "appendTo6", pkg: "net/netip", typ: $funcType([sliceType], [sliceType], false)}, {prop: "StringExpanded", name: "StringExpanded", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "marshalBinaryWithTrailingBytes", name: "marshalBinaryWithTrailingBytes", pkg: "net/netip", typ: $funcType([$Int], [sliceType], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "Zone", name: "Zone", pkg: "", typ: $funcType([], [$String], false)}, {prop: "WithZone", name: "WithZone", pkg: "", typ: $funcType([$String], [Addr], false)}]; - ptrType$6.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType], [$error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType], [$error], false)}]; - uint128.init("net/netip", [{prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - parseAddrError.init("net/netip", [{prop: "in$0", name: "in", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "at", name: "at", embedded: false, exported: false, typ: $String, tag: ""}]); - AddrPort.init("net/netip", [{prop: "ip", name: "ip", embedded: false, exported: false, typ: Addr, tag: ""}, {prop: "port", name: "port", embedded: false, exported: false, typ: $Uint16, tag: ""}]); - Prefix.init("net/netip", [{prop: "ip", name: "ip", embedded: false, exported: false, typ: Addr, tag: ""}, {prop: "bits", name: "bits", embedded: false, exported: false, typ: $Int16, tag: ""}]); - Addr.init("net/netip", [{prop: "addr", name: "addr", embedded: false, exported: false, typ: uint128, tag: ""}, {prop: "z", name: "z", embedded: false, exported: false, typ: $String, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = intern.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = itoa.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $unused(new intern.Value.ptr(arrayType.zero(), $ifaceNil, false)); - $unused(new intern.Value.ptr(arrayType.zero(), $ifaceNil, false)); - z0 = ""; - z4 = "\x00ipv4"; - z6noz = "\x00ipv6noz"; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/net/dns/dnsmessage"] = (function() { - var $pkg = {}, $init, errors, errBaseLen, errCalcLen, errReserved, errTooManyPtr, errInvalidPtr, errNilResouceBody, errResourceLen, errSegTooLong, errZeroSegLen, errResTooLong, errTooManyQuestions, errTooManyAnswers, errTooManyAuthorities, errTooManyAdditionals, errNonCanonicalName, errStringTooLong, errCompressedSRV; - errors = $packages["errors"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrNotStarted = errors.New("parsing/packing of this type isn't available yet"); - $pkg.ErrSectionDone = errors.New("parsing/packing of this section has completed"); - errBaseLen = errors.New("insufficient data for base length type"); - errCalcLen = errors.New("insufficient data for calculated length type"); - errReserved = errors.New("segment prefix is reserved"); - errTooManyPtr = errors.New("too many pointers (>10)"); - errInvalidPtr = errors.New("invalid pointer"); - errNilResouceBody = errors.New("nil resource body"); - errResourceLen = errors.New("insufficient data for resource body length"); - errSegTooLong = errors.New("segment length too long"); - errZeroSegLen = errors.New("zero length segment"); - errResTooLong = errors.New("resource length too long"); - errTooManyQuestions = errors.New("too many Questions to pack (>65535)"); - errTooManyAnswers = errors.New("too many Answers to pack (>65535)"); - errTooManyAuthorities = errors.New("too many Authorities to pack (>65535)"); - errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)"); - errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)"); - errStringTooLong = errors.New("character string exceeds maximum length (255)"); - errCompressedSRV = errors.New("compressed name in SRV resource data"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net"] = (function() { - var $pkg = {}, $init, context, errors, bytealg, itoa, nettrace, poll, singleflight, io, netip, os, runtime, sort, sync, syscall, time, dnsmessage, UnixAddr, UnixConn, UnixListener, UDPAddr, addrPortUDPAddr, UDPConn, TCPAddr, TCPConn, TCPListener, sockaddr, rawConn, rawListener, file, netFD, bufferedPipe, Addr, Conn, conn, PacketConn, Listener, Error, OpError, timeout, temporary, ParseError, AddrError, UnknownNetworkError, timeoutError, DNSError, writerOnly, HardwareAddr, Resolver, onlyValuesCtx, ipStackCapabilities, addrList, IPAddr, IPConn, IP, IPMask, IPNet, Interface, Flags, ipv6ZoneCache, SRV, MX, NS, Dialer, sysDialer, ListenConfig, sysListener, dialResult, ptrType, sliceType, ptrType$2, sliceType$1, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, arrayType, arrayType$1, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, ptrType$20, structType$2, ptrType$22, ptrType$23, ptrType$24, sliceType$2, ptrType$25, ptrType$26, ptrType$27, ptrType$28, sliceType$3, ptrType$29, sliceType$4, ptrType$30, sliceType$5, ptrType$31, sliceType$6, arrayType$2, sliceType$7, ptrType$32, sliceType$8, ptrType$33, funcType, sliceType$9, structType$3, sliceType$10, ptrType$34, ptrType$35, sliceType$11, sliceType$12, funcType$1, funcType$2, ptrType$36, chanType$5, chanType$6, ptrType$39, ptrType$40, ptrType$42, funcType$3, ptrType$43, funcType$4, ptrType$44, ptrType$45, mapType$1, mapType$2, ptrType$46, funcType$5, ptrType$47, ptrType$48, ptrType$49, onceReadServices, listenersMu, listeners, portCounterMu, portCounter, netGo, errNoSuitableAddress, errMissingAddress, errCanceled, aLongTimeAgo, errTimeout, errNoSuchHost, errClosed, protocols, services, dnsWaitGroup, errMalformedDNSRecordsDetail, ipStackCaps, v4InV6Prefix, classAMask, classBMask, classCMask, errInvalidInterface, errInvalidInterfaceIndex, errInvalidInterfaceName, errNoSuchInterface, errNoSuchMulticastInterface, flagNames, zoneCache, testHookDialTCP, testHookLookupIP, testHookSetKeepAlive, setReadMsgCloseOnExec, unixSocket, sotypeToNet, ResolveUnixAddr, newUnixConn, UDPAddrFromAddrPort, newUDPConn, setNoDelay, setKeepAlivePeriod, selfConnect, spuriousENOTAVAIL, newTCPConn, splice, setReadBuffer, setWriteBuffer, setKeepAlive, setLinger, sendFile, newRawConn, newRawListener, readServices, goLookupPort, parsePort, open, countAnyByte, splitAtBytes, getFields, dtoi, xtoi, appendHex, last, lowerASCIIBytes, nextPort, socket, newBufferedPipe, sysSocket, mapErr, genericReadFrom, lookupProtocol, lookupProtocolMap, lookupPortMap, withUnexpiredValuesPreserved, lookupIPReturn, ipAddrsEface, favoriteAddrFamily, internetSocket, ipToSockaddrInet4, ipToSockaddrInet6, ipToSockaddr, addrPortToSockaddrInet4, addrPortToSockaddrInet6, supportsIPv4, supportsIPv4map, isIPv4, filterAddrList, ipv4only, ipv6only, SplitHostPort, splitHostZone, JoinHostPort, loopbackIP, stripIPv4Header, newIPConn, IPv4, IPv4Mask, CIDRMask, isZeros, allFF, ubtoa, hexString, ipEmptyString, simpleMaskLength, networkNumberAndMask, parseIPv4, parseIPv6Zone, parseIPv6, ParseIP, parseIPZone, ParseCIDR, interfaceTable, interfaceAddrTable, interfaceMulticastAddrTable, isConnError, isDomainName, minNonzeroTime, partialDeadline, parseNetwork, Dial, Listen, init; - context = $packages["context"]; - errors = $packages["errors"]; - bytealg = $packages["internal/bytealg"]; - itoa = $packages["internal/itoa"]; - nettrace = $packages["internal/nettrace"]; - poll = $packages["internal/poll"]; - singleflight = $packages["internal/singleflight"]; - io = $packages["io"]; - netip = $packages["net/netip"]; - os = $packages["os"]; - runtime = $packages["runtime"]; - sort = $packages["sort"]; - sync = $packages["sync"]; - syscall = $packages["syscall"]; - time = $packages["time"]; - dnsmessage = $packages["vendor/golang.org/x/net/dns/dnsmessage"]; - UnixAddr = $pkg.UnixAddr = $newType(0, $kindStruct, "net.UnixAddr", true, "net", true, function(Name_, Net_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.Net = ""; - return; - } - this.Name = Name_; - this.Net = Net_; - }); - UnixConn = $pkg.UnixConn = $newType(0, $kindStruct, "net.UnixConn", true, "net", true, function(conn_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = new conn.ptr(ptrType$3.nil); - return; - } - this.conn = conn_; - }); - UnixListener = $pkg.UnixListener = $newType(0, $kindStruct, "net.UnixListener", true, "net", true, function(fd_, path_, unlink_, unlinkOnce_) { - this.$val = this; - if (arguments.length === 0) { - this.fd = ptrType$3.nil; - this.path = ""; - this.unlink = false; - this.unlinkOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - return; - } - this.fd = fd_; - this.path = path_; - this.unlink = unlink_; - this.unlinkOnce = unlinkOnce_; - }); - UDPAddr = $pkg.UDPAddr = $newType(0, $kindStruct, "net.UDPAddr", true, "net", true, function(IP_, Port_, Zone_) { - this.$val = this; - if (arguments.length === 0) { - this.IP = IP.nil; - this.Port = 0; - this.Zone = ""; - return; - } - this.IP = IP_; - this.Port = Port_; - this.Zone = Zone_; - }); - addrPortUDPAddr = $pkg.addrPortUDPAddr = $newType(0, $kindStruct, "net.addrPortUDPAddr", true, "net", false, function(AddrPort_) { - this.$val = this; - if (arguments.length === 0) { - this.AddrPort = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - return; - } - this.AddrPort = AddrPort_; - }); - UDPConn = $pkg.UDPConn = $newType(0, $kindStruct, "net.UDPConn", true, "net", true, function(conn_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = new conn.ptr(ptrType$3.nil); - return; - } - this.conn = conn_; - }); - TCPAddr = $pkg.TCPAddr = $newType(0, $kindStruct, "net.TCPAddr", true, "net", true, function(IP_, Port_, Zone_) { - this.$val = this; - if (arguments.length === 0) { - this.IP = IP.nil; - this.Port = 0; - this.Zone = ""; - return; - } - this.IP = IP_; - this.Port = Port_; - this.Zone = Zone_; - }); - TCPConn = $pkg.TCPConn = $newType(0, $kindStruct, "net.TCPConn", true, "net", true, function(conn_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = new conn.ptr(ptrType$3.nil); - return; - } - this.conn = conn_; - }); - TCPListener = $pkg.TCPListener = $newType(0, $kindStruct, "net.TCPListener", true, "net", true, function(fd_, lc_) { - this.$val = this; - if (arguments.length === 0) { - this.fd = ptrType$3.nil; - this.lc = new ListenConfig.ptr($throwNilPointerError, new time.Duration(0, 0)); - return; - } - this.fd = fd_; - this.lc = lc_; - }); - sockaddr = $pkg.sockaddr = $newType(8, $kindInterface, "net.sockaddr", true, "net", false, null); - rawConn = $pkg.rawConn = $newType(0, $kindStruct, "net.rawConn", true, "net", false, function(fd_) { - this.$val = this; - if (arguments.length === 0) { - this.fd = ptrType$3.nil; - return; - } - this.fd = fd_; - }); - rawListener = $pkg.rawListener = $newType(0, $kindStruct, "net.rawListener", true, "net", false, function(rawConn_) { - this.$val = this; - if (arguments.length === 0) { - this.rawConn = new rawConn.ptr(ptrType$3.nil); - return; - } - this.rawConn = rawConn_; - }); - file = $pkg.file = $newType(0, $kindStruct, "net.file", true, "net", false, function(file_, data_, atEOF_) { - this.$val = this; - if (arguments.length === 0) { - this.file = ptrType$7.nil; - this.data = sliceType$1.nil; - this.atEOF = false; - return; - } - this.file = file_; - this.data = data_; - this.atEOF = atEOF_; - }); - netFD = $pkg.netFD = $newType(0, $kindStruct, "net.netFD", true, "net", false, function(r_, w_, incoming_, closedMu_, closed_, listener_, family_, sotype_, net_, laddr_, raddr_, pfd_, isConnected_) { - this.$val = this; - if (arguments.length === 0) { - this.r = ptrType$23.nil; - this.w = ptrType$23.nil; - this.incoming = $chanNil; - this.closedMu = new sync.Mutex.ptr(0, 0); - this.closed = false; - this.listener = false; - this.family = 0; - this.sotype = 0; - this.net = ""; - this.laddr = $ifaceNil; - this.raddr = $ifaceNil; - this.pfd = new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), 0, new poll.pollDesc.ptr(ptrType$24.nil, false), ptrType$25.nil, 0, 0, false, false, false); - this.isConnected = false; - return; - } - this.r = r_; - this.w = w_; - this.incoming = incoming_; - this.closedMu = closedMu_; - this.closed = closed_; - this.listener = listener_; - this.family = family_; - this.sotype = sotype_; - this.net = net_; - this.laddr = laddr_; - this.raddr = raddr_; - this.pfd = pfd_; - this.isConnected = isConnected_; - }); - bufferedPipe = $pkg.bufferedPipe = $newType(0, $kindStruct, "net.bufferedPipe", true, "net", false, function(softLimit_, mu_, buf_, closed_, rCond_, wCond_, rDeadline_, wDeadline_) { - this.$val = this; - if (arguments.length === 0) { - this.softLimit = 0; - this.mu = new sync.Mutex.ptr(0, 0); - this.buf = sliceType$1.nil; - this.closed = false; - this.rCond = new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil); - this.wCond = new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil); - this.rDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.wDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - return; - } - this.softLimit = softLimit_; - this.mu = mu_; - this.buf = buf_; - this.closed = closed_; - this.rCond = rCond_; - this.wCond = wCond_; - this.rDeadline = rDeadline_; - this.wDeadline = wDeadline_; - }); - Addr = $pkg.Addr = $newType(8, $kindInterface, "net.Addr", true, "net", true, null); - Conn = $pkg.Conn = $newType(8, $kindInterface, "net.Conn", true, "net", true, null); - conn = $pkg.conn = $newType(0, $kindStruct, "net.conn", true, "net", false, function(fd_) { - this.$val = this; - if (arguments.length === 0) { - this.fd = ptrType$3.nil; - return; - } - this.fd = fd_; - }); - PacketConn = $pkg.PacketConn = $newType(8, $kindInterface, "net.PacketConn", true, "net", true, null); - Listener = $pkg.Listener = $newType(8, $kindInterface, "net.Listener", true, "net", true, null); - Error = $pkg.Error = $newType(8, $kindInterface, "net.Error", true, "net", true, null); - OpError = $pkg.OpError = $newType(0, $kindStruct, "net.OpError", true, "net", true, function(Op_, Net_, Source_, Addr_, Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Op = ""; - this.Net = ""; - this.Source = $ifaceNil; - this.Addr = $ifaceNil; - this.Err = $ifaceNil; - return; - } - this.Op = Op_; - this.Net = Net_; - this.Source = Source_; - this.Addr = Addr_; - this.Err = Err_; - }); - timeout = $pkg.timeout = $newType(8, $kindInterface, "net.timeout", true, "net", false, null); - temporary = $pkg.temporary = $newType(8, $kindInterface, "net.temporary", true, "net", false, null); - ParseError = $pkg.ParseError = $newType(0, $kindStruct, "net.ParseError", true, "net", true, function(Type_, Text_) { - this.$val = this; - if (arguments.length === 0) { - this.Type = ""; - this.Text = ""; - return; - } - this.Type = Type_; - this.Text = Text_; - }); - AddrError = $pkg.AddrError = $newType(0, $kindStruct, "net.AddrError", true, "net", true, function(Err_, Addr_) { - this.$val = this; - if (arguments.length === 0) { - this.Err = ""; - this.Addr = ""; - return; - } - this.Err = Err_; - this.Addr = Addr_; - }); - UnknownNetworkError = $pkg.UnknownNetworkError = $newType(8, $kindString, "net.UnknownNetworkError", true, "net", true, null); - timeoutError = $pkg.timeoutError = $newType(0, $kindStruct, "net.timeoutError", true, "net", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - DNSError = $pkg.DNSError = $newType(0, $kindStruct, "net.DNSError", true, "net", true, function(Err_, Name_, Server_, IsTimeout_, IsTemporary_, IsNotFound_) { - this.$val = this; - if (arguments.length === 0) { - this.Err = ""; - this.Name = ""; - this.Server = ""; - this.IsTimeout = false; - this.IsTemporary = false; - this.IsNotFound = false; - return; - } - this.Err = Err_; - this.Name = Name_; - this.Server = Server_; - this.IsTimeout = IsTimeout_; - this.IsTemporary = IsTemporary_; - this.IsNotFound = IsNotFound_; - }); - writerOnly = $pkg.writerOnly = $newType(0, $kindStruct, "net.writerOnly", true, "net", false, function(Writer_) { - this.$val = this; - if (arguments.length === 0) { - this.Writer = $ifaceNil; - return; - } - this.Writer = Writer_; - }); - HardwareAddr = $pkg.HardwareAddr = $newType(12, $kindSlice, "net.HardwareAddr", true, "net", true, null); - Resolver = $pkg.Resolver = $newType(0, $kindStruct, "net.Resolver", true, "net", true, function(PreferGo_, StrictErrors_, Dial_, lookupGroup_) { - this.$val = this; - if (arguments.length === 0) { - this.PreferGo = false; - this.StrictErrors = false; - this.Dial = $throwNilPointerError; - this.lookupGroup = new singleflight.Group.ptr(new sync.Mutex.ptr(0, 0), false); - return; - } - this.PreferGo = PreferGo_; - this.StrictErrors = StrictErrors_; - this.Dial = Dial_; - this.lookupGroup = lookupGroup_; - }); - onlyValuesCtx = $pkg.onlyValuesCtx = $newType(0, $kindStruct, "net.onlyValuesCtx", true, "net", false, function(Context_, lookupValues_) { - this.$val = this; - if (arguments.length === 0) { - this.Context = $ifaceNil; - this.lookupValues = $ifaceNil; - return; - } - this.Context = Context_; - this.lookupValues = lookupValues_; - }); - ipStackCapabilities = $pkg.ipStackCapabilities = $newType(0, $kindStruct, "net.ipStackCapabilities", true, "net", false, function(Once_, ipv4Enabled_, ipv6Enabled_, ipv4MappedIPv6Enabled_) { - this.$val = this; - if (arguments.length === 0) { - this.Once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.ipv4Enabled = false; - this.ipv6Enabled = false; - this.ipv4MappedIPv6Enabled = false; - return; - } - this.Once = Once_; - this.ipv4Enabled = ipv4Enabled_; - this.ipv6Enabled = ipv6Enabled_; - this.ipv4MappedIPv6Enabled = ipv4MappedIPv6Enabled_; - }); - addrList = $pkg.addrList = $newType(12, $kindSlice, "net.addrList", true, "net", false, null); - IPAddr = $pkg.IPAddr = $newType(0, $kindStruct, "net.IPAddr", true, "net", true, function(IP_, Zone_) { - this.$val = this; - if (arguments.length === 0) { - this.IP = IP.nil; - this.Zone = ""; - return; - } - this.IP = IP_; - this.Zone = Zone_; - }); - IPConn = $pkg.IPConn = $newType(0, $kindStruct, "net.IPConn", true, "net", true, function(conn_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = new conn.ptr(ptrType$3.nil); - return; - } - this.conn = conn_; - }); - IP = $pkg.IP = $newType(12, $kindSlice, "net.IP", true, "net", true, null); - IPMask = $pkg.IPMask = $newType(12, $kindSlice, "net.IPMask", true, "net", true, null); - IPNet = $pkg.IPNet = $newType(0, $kindStruct, "net.IPNet", true, "net", true, function(IP_, Mask_) { - this.$val = this; - if (arguments.length === 0) { - this.IP = IP.nil; - this.Mask = IPMask.nil; - return; - } - this.IP = IP_; - this.Mask = Mask_; - }); - Interface = $pkg.Interface = $newType(0, $kindStruct, "net.Interface", true, "net", true, function(Index_, MTU_, Name_, HardwareAddr_, Flags_) { - this.$val = this; - if (arguments.length === 0) { - this.Index = 0; - this.MTU = 0; - this.Name = ""; - this.HardwareAddr = HardwareAddr.nil; - this.Flags = 0; - return; - } - this.Index = Index_; - this.MTU = MTU_; - this.Name = Name_; - this.HardwareAddr = HardwareAddr_; - this.Flags = Flags_; - }); - Flags = $pkg.Flags = $newType(4, $kindUint, "net.Flags", true, "net", true, null); - ipv6ZoneCache = $pkg.ipv6ZoneCache = $newType(0, $kindStruct, "net.ipv6ZoneCache", true, "net", false, function(RWMutex_, lastFetched_, toIndex_, toName_) { - this.$val = this; - if (arguments.length === 0) { - this.RWMutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - this.lastFetched = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.toIndex = false; - this.toName = false; - return; - } - this.RWMutex = RWMutex_; - this.lastFetched = lastFetched_; - this.toIndex = toIndex_; - this.toName = toName_; - }); - SRV = $pkg.SRV = $newType(0, $kindStruct, "net.SRV", true, "net", true, function(Target_, Port_, Priority_, Weight_) { - this.$val = this; - if (arguments.length === 0) { - this.Target = ""; - this.Port = 0; - this.Priority = 0; - this.Weight = 0; - return; - } - this.Target = Target_; - this.Port = Port_; - this.Priority = Priority_; - this.Weight = Weight_; - }); - MX = $pkg.MX = $newType(0, $kindStruct, "net.MX", true, "net", true, function(Host_, Pref_) { - this.$val = this; - if (arguments.length === 0) { - this.Host = ""; - this.Pref = 0; - return; - } - this.Host = Host_; - this.Pref = Pref_; - }); - NS = $pkg.NS = $newType(0, $kindStruct, "net.NS", true, "net", true, function(Host_) { - this.$val = this; - if (arguments.length === 0) { - this.Host = ""; - return; - } - this.Host = Host_; - }); - Dialer = $pkg.Dialer = $newType(0, $kindStruct, "net.Dialer", true, "net", true, function(Timeout_, Deadline_, LocalAddr_, DualStack_, FallbackDelay_, KeepAlive_, Resolver_, Cancel_, Control_) { - this.$val = this; - if (arguments.length === 0) { - this.Timeout = new time.Duration(0, 0); - this.Deadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.LocalAddr = $ifaceNil; - this.DualStack = false; - this.FallbackDelay = new time.Duration(0, 0); - this.KeepAlive = new time.Duration(0, 0); - this.Resolver = ptrType$9.nil; - this.Cancel = $chanNil; - this.Control = $throwNilPointerError; - return; - } - this.Timeout = Timeout_; - this.Deadline = Deadline_; - this.LocalAddr = LocalAddr_; - this.DualStack = DualStack_; - this.FallbackDelay = FallbackDelay_; - this.KeepAlive = KeepAlive_; - this.Resolver = Resolver_; - this.Cancel = Cancel_; - this.Control = Control_; - }); - sysDialer = $pkg.sysDialer = $newType(0, $kindStruct, "net.sysDialer", true, "net", false, function(Dialer_, network_, address_) { - this.$val = this; - if (arguments.length === 0) { - this.Dialer = new Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$9.nil, $chanNil, $throwNilPointerError); - this.network = ""; - this.address = ""; - return; - } - this.Dialer = Dialer_; - this.network = network_; - this.address = address_; - }); - ListenConfig = $pkg.ListenConfig = $newType(0, $kindStruct, "net.ListenConfig", true, "net", true, function(Control_, KeepAlive_) { - this.$val = this; - if (arguments.length === 0) { - this.Control = $throwNilPointerError; - this.KeepAlive = new time.Duration(0, 0); - return; - } - this.Control = Control_; - this.KeepAlive = KeepAlive_; - }); - sysListener = $pkg.sysListener = $newType(0, $kindStruct, "net.sysListener", true, "net", false, function(ListenConfig_, network_, address_) { - this.$val = this; - if (arguments.length === 0) { - this.ListenConfig = new ListenConfig.ptr($throwNilPointerError, new time.Duration(0, 0)); - this.network = ""; - this.address = ""; - return; - } - this.ListenConfig = ListenConfig_; - this.network = network_; - this.address = address_; - }); - dialResult = $newType(0, $kindStruct, "net.dialResult", true, "net", false, function(Conn_, error_, primary_, done_) { - this.$val = this; - if (arguments.length === 0) { - this.Conn = $ifaceNil; - this.error = $ifaceNil; - this.primary = false; - this.done = false; - return; - } - this.Conn = Conn_; - this.error = error_; - this.primary = primary_; - this.done = done_; - }); - ptrType = $ptrType(time.Location); - sliceType = $sliceType($String); - ptrType$2 = $ptrType(onlyValuesCtx); - sliceType$1 = $sliceType($Uint8); - ptrType$3 = $ptrType(netFD); - ptrType$4 = $ptrType(syscall.SockaddrUnix); - ptrType$5 = $ptrType(UnixAddr); - ptrType$6 = $ptrType(UnixConn); - ptrType$7 = $ptrType(os.File); - ptrType$8 = $ptrType(UnixListener); - ptrType$9 = $ptrType(Resolver); - ptrType$10 = $ptrType(syscall.SockaddrInet4); - ptrType$11 = $ptrType(syscall.SockaddrInet6); - ptrType$12 = $ptrType(UDPAddr); - arrayType = $arrayType($Uint8, 4); - arrayType$1 = $arrayType($Uint8, 16); - ptrType$13 = $ptrType(UDPConn); - ptrType$14 = $ptrType(Interface); - ptrType$15 = $ptrType(TCPAddr); - ptrType$16 = $ptrType(TCPConn); - ptrType$17 = $ptrType(OpError); - ptrType$18 = $ptrType(os.SyscallError); - ptrType$19 = $ptrType(TCPListener); - ptrType$20 = $ptrType(rawConn); - structType$2 = $structType("", []); - ptrType$22 = $ptrType(file); - ptrType$23 = $ptrType(bufferedPipe); - ptrType$24 = $ptrType(poll.FD); - sliceType$2 = $sliceType(syscall.Iovec); - ptrType$25 = $ptrType(sliceType$2); - ptrType$26 = $ptrType(conn); - ptrType$27 = $ptrType(AddrError); - ptrType$28 = $ptrType(DNSError); - sliceType$3 = $sliceType(IPAddr); - ptrType$29 = $ptrType(SRV); - sliceType$4 = $sliceType(ptrType$29); - ptrType$30 = $ptrType(MX); - sliceType$5 = $sliceType(ptrType$30); - ptrType$31 = $ptrType(NS); - sliceType$6 = $sliceType(ptrType$31); - arrayType$2 = $arrayType($Uint8, 25); - sliceType$7 = $sliceType(IP); - ptrType$32 = $ptrType(IPAddr); - sliceType$8 = $sliceType(netip.Addr); - ptrType$33 = $ptrType(nettrace.Trace); - funcType = $funcType([context.Context, $String, $String], [sliceType$3, $error], false); - sliceType$9 = $sliceType($emptyInterface); - structType$3 = $structType("net", [{prop: "laddr", name: "laddr", embedded: false, exported: false, typ: TCPAddr, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $Int, tag: ""}]); - sliceType$10 = $sliceType(structType$3); - ptrType$34 = $ptrType(IPConn); - ptrType$35 = $ptrType(IPNet); - sliceType$11 = $sliceType(Interface); - sliceType$12 = $sliceType(Addr); - funcType$1 = $funcType([$Uintptr], [], false); - funcType$2 = $funcType([$Uintptr], [$Bool], false); - ptrType$36 = $ptrType(rawListener); - chanType$5 = $chanType(structType$2, false, true); - chanType$6 = $chanType(ptrType$3, false, false); - ptrType$39 = $ptrType(ParseError); - ptrType$40 = $ptrType(timeoutError); - ptrType$42 = $ptrType(singleflight.Group); - funcType$3 = $funcType([context.Context, $String, $String], [Conn, $error], false); - ptrType$43 = $ptrType(ipStackCapabilities); - funcType$4 = $funcType([Addr], [$Bool], false); - ptrType$44 = $ptrType(IP); - ptrType$45 = $ptrType(ipv6ZoneCache); - mapType$1 = $mapType($String, $Int); - mapType$2 = $mapType($Int, $String); - ptrType$46 = $ptrType(Dialer); - funcType$5 = $funcType([$String, $String, syscall.RawConn], [$error], false); - ptrType$47 = $ptrType(sysDialer); - ptrType$48 = $ptrType(ListenConfig); - ptrType$49 = $ptrType(sysListener); - setReadMsgCloseOnExec = function(oob) { - var oob; - }; - unixSocket = function(ctx, net, laddr, raddr, mode, ctrlFn) { - var {_1, _2, _r, _r$1, _r$2, _tuple, _v, _v$1, ctrlFn, ctx, err, fd, laddr, mode, net, raddr, sotype, $s, $r, $c} = $restore(this, {ctx, net, laddr, raddr, mode, ctrlFn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sotype = 0; - _1 = net; - if (_1 === ("unix")) { - sotype = 1; - } else if (_1 === ("unixgram")) { - sotype = 2; - } else if (_1 === ("unixpacket")) { - sotype = 4; - } else { - $s = -1; return [ptrType$3.nil, new UnknownNetworkError((net))]; - } - _2 = mode; - /* */ if (_2 === ("dial")) { $s = 2; continue; } - /* */ if (_2 === ("listen")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_2 === ("dial")) { */ case 2: - if (!(!($interfaceIsEqual(laddr, $ifaceNil)))) { _v = false; $s = 8; continue s; } - _r = laddr.isWildcard(); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 8: - /* */ if (_v) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_v) { */ case 6: - laddr = $ifaceNil; - /* } */ case 7: - if (!(!($interfaceIsEqual(raddr, $ifaceNil)))) { _v$1 = false; $s = 12; continue s; } - _r$1 = raddr.isWildcard(); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = _r$1; case 12: - /* */ if (_v$1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_v$1) { */ case 10: - raddr = $ifaceNil; - /* } */ case 11: - if ($interfaceIsEqual(raddr, $ifaceNil) && (!((sotype === 2)) || $interfaceIsEqual(laddr, $ifaceNil))) { - $s = -1; return [ptrType$3.nil, errMissingAddress]; - } - $s = 5; continue; - /* } else if (_2 === ("listen")) { */ case 3: - $s = 5; continue; - /* } else { */ case 4: - $s = -1; return [ptrType$3.nil, errors.New("unknown mode: " + mode)]; - /* } */ case 5: - case 1: - _r$2 = socket(ctx, net, 1, sotype, 0, false, laddr, raddr, ctrlFn); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$3.nil, err]; - } - $s = -1; return [fd, $ifaceNil]; - /* */ } return; } var $f = {$blk: unixSocket, $c: true, $r, _1, _2, _r, _r$1, _r$2, _tuple, _v, _v$1, ctrlFn, ctx, err, fd, laddr, mode, net, raddr, sotype, $s};return $f; - }; - sotypeToNet = function(sotype) { - var _1, sotype; - _1 = sotype; - if (_1 === (1)) { - return "unix"; - } else if (_1 === (2)) { - return "unixgram"; - } else if (_1 === (4)) { - return "unixpacket"; - } else { - $panic(new $String("sotypeToNet unknown socket type")); - } - }; - UnixAddr.ptr.prototype.family = function() { - var a; - a = this; - return 1; - }; - UnixAddr.prototype.family = function() { return this.$val.family(); }; - UnixAddr.ptr.prototype.sockaddr = function(family) { - var a, family; - a = this; - if (a === ptrType$5.nil) { - return [$ifaceNil, $ifaceNil]; - } - return [new syscall.SockaddrUnix.ptr(a.Name), $ifaceNil]; - }; - UnixAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; - UnixAddr.ptr.prototype.toLocal = function(net) { - var a, net; - a = this; - return a; - }; - UnixAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; - UnixConn.ptr.prototype.readFrom = function(b) { - var _ref, _tuple, addr, b, c, err, n, sa, sa$1; - c = this; - addr = ptrType$5.nil; - _tuple = c.conn.fd.readFrom(b); - n = _tuple[0]; - sa = _tuple[1]; - err = _tuple[2]; - _ref = sa; - if ($assertType(_ref, ptrType$4, true)[1]) { - sa$1 = _ref.$val; - if (!(sa$1.Name === "")) { - addr = new UnixAddr.ptr(sa$1.Name, sotypeToNet(c.conn.fd.sotype)); - } - } - return [n, addr, err]; - }; - UnixConn.prototype.readFrom = function(b) { return this.$val.readFrom(b); }; - UnixConn.ptr.prototype.readMsg = function(b, oob) { - var _ref, _tuple, addr, b, c, err, flags, n, oob, oobn, sa, sa$1; - n = 0; - oobn = 0; - flags = 0; - addr = ptrType$5.nil; - err = $ifaceNil; - c = this; - sa = $ifaceNil; - _tuple = c.conn.fd.readMsg(b, oob, 0); - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - sa = _tuple[3]; - err = _tuple[4]; - if (true && $interfaceIsEqual(err, $ifaceNil) && oobn > 0) { - setReadMsgCloseOnExec($subslice(oob, 0, oobn)); - } - _ref = sa; - if ($assertType(_ref, ptrType$4, true)[1]) { - sa$1 = _ref.$val; - if (!(sa$1.Name === "")) { - addr = new UnixAddr.ptr(sa$1.Name, sotypeToNet(c.conn.fd.sotype)); - } - } - return [n, oobn, flags, addr, err]; - }; - UnixConn.prototype.readMsg = function(b, oob) { return this.$val.readMsg(b, oob); }; - UnixConn.ptr.prototype.writeTo = function(b, addr) { - var addr, b, c, sa; - c = this; - if (c.conn.fd.isConnected) { - return [0, $pkg.ErrWriteToConnected]; - } - if (addr === ptrType$5.nil) { - return [0, errMissingAddress]; - } - if (!(addr.Net === sotypeToNet(c.conn.fd.sotype))) { - return [0, new syscall.Errno(97)]; - } - sa = new syscall.SockaddrUnix.ptr(addr.Name); - return c.conn.fd.writeTo(b, sa); - }; - UnixConn.prototype.writeTo = function(b, addr) { return this.$val.writeTo(b, addr); }; - UnixConn.ptr.prototype.writeMsg = function(b, oob, addr) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, c, err, n, oob, oobn, sa; - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if ((c.conn.fd.sotype === 2) && c.conn.fd.isConnected) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = $pkg.ErrWriteToConnected; - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - return [n, oobn, err]; - } - sa = $ifaceNil; - if (!(addr === ptrType$5.nil)) { - if (!(addr.Net === sotypeToNet(c.conn.fd.sotype))) { - _tmp$3 = 0; - _tmp$4 = 0; - _tmp$5 = new syscall.Errno(97); - n = _tmp$3; - oobn = _tmp$4; - err = _tmp$5; - return [n, oobn, err]; - } - sa = new syscall.SockaddrUnix.ptr(addr.Name); - } - _tuple = c.conn.fd.writeMsg(b, oob, sa); - n = _tuple[0]; - oobn = _tuple[1]; - err = _tuple[2]; - return [n, oobn, err]; - }; - UnixConn.prototype.writeMsg = function(b, oob, addr) { return this.$val.writeMsg(b, oob, addr); }; - sysDialer.ptr.prototype.dialUnix = function(ctx, laddr, raddr) { - var {_r, _tuple, ctx, err, fd, laddr, raddr, sd, $s, $r, $c} = $restore(this, {ctx, laddr, raddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _r = unixSocket(ctx, sd.network, laddr, raddr, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$6.nil, err]; - } - $s = -1; return [newUnixConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysDialer.ptr.prototype.dialUnix, $c: true, $r, _r, _tuple, ctx, err, fd, laddr, raddr, sd, $s};return $f; - }; - sysDialer.prototype.dialUnix = function(ctx, laddr, raddr) { return this.$val.dialUnix(ctx, laddr, raddr); }; - UnixListener.ptr.prototype.accept = function() { - var {_r, _tuple, err, fd, ln, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ln = this; - _r = ln.fd.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$6.nil, err]; - } - $s = -1; return [newUnixConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: UnixListener.ptr.prototype.accept, $c: true, $r, _r, _tuple, err, fd, ln, $s};return $f; - }; - UnixListener.prototype.accept = function() { return this.$val.accept(); }; - UnixListener.ptr.prototype.close = function() { - var {$24r, _r, ln, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ln = [ln]; - ln[0] = this; - $r = ln[0].unlinkOnce.Do((function(ln) { return function $b() { - var {_r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((ln[0].path.charCodeAt(0) === 64)) && ln[0].unlink) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((ln[0].path.charCodeAt(0) === 64)) && ln[0].unlink) { */ case 1: - _r = syscall.Unlink(ln[0].path); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, $s};return $f; - }; })(ln)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = ln[0].fd.Close(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: UnixListener.ptr.prototype.close, $c: true, $r, $24r, _r, ln, $s};return $f; - }; - UnixListener.prototype.close = function() { return this.$val.close(); }; - UnixListener.ptr.prototype.file = function() { - var _tuple, err, f, ln; - ln = this; - _tuple = ln.fd.dup(); - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$7.nil, err]; - } - return [f, $ifaceNil]; - }; - UnixListener.prototype.file = function() { return this.$val.file(); }; - UnixListener.ptr.prototype.SetUnlinkOnClose = function(unlink) { - var l, unlink; - l = this; - l.unlink = unlink; - }; - UnixListener.prototype.SetUnlinkOnClose = function(unlink) { return this.$val.SetUnlinkOnClose(unlink); }; - sysListener.ptr.prototype.listenUnix = function(ctx, laddr) { - var {$24r, _r, _r$1, _tuple, ctx, err, fd, laddr, sl, $s, $r, $c} = $restore(this, {ctx, laddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sl = this; - _r = unixSocket(ctx, sl.network, laddr, $ifaceNil, "listen", sl.ListenConfig.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$8.nil, err]; - } - _r$1 = fd.laddr.String(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [new UnixListener.ptr(fd, _r$1, true, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0))), $ifaceNil]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: sysListener.ptr.prototype.listenUnix, $c: true, $r, $24r, _r, _r$1, _tuple, ctx, err, fd, laddr, sl, $s};return $f; - }; - sysListener.prototype.listenUnix = function(ctx, laddr) { return this.$val.listenUnix(ctx, laddr); }; - sysListener.ptr.prototype.listenUnixgram = function(ctx, laddr) { - var {_r, _tuple, ctx, err, fd, laddr, sl, $s, $r, $c} = $restore(this, {ctx, laddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sl = this; - _r = unixSocket(ctx, sl.network, laddr, $ifaceNil, "listen", sl.ListenConfig.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$6.nil, err]; - } - $s = -1; return [newUnixConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysListener.ptr.prototype.listenUnixgram, $c: true, $r, _r, _tuple, ctx, err, fd, laddr, sl, $s};return $f; - }; - sysListener.prototype.listenUnixgram = function(ctx, laddr) { return this.$val.listenUnixgram(ctx, laddr); }; - UnixAddr.ptr.prototype.Network = function() { - var a; - a = this; - return a.Net; - }; - UnixAddr.prototype.Network = function() { return this.$val.Network(); }; - UnixAddr.ptr.prototype.String = function() { - var a; - a = this; - if (a === ptrType$5.nil) { - return ""; - } - return a.Name; - }; - UnixAddr.prototype.String = function() { return this.$val.String(); }; - UnixAddr.ptr.prototype.isWildcard = function() { - var a; - a = this; - return a === ptrType$5.nil || a.Name === ""; - }; - UnixAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; - UnixAddr.ptr.prototype.opAddr = function() { - var a; - a = this; - if (a === ptrType$5.nil) { - return $ifaceNil; - } - return a; - }; - UnixAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; - ResolveUnixAddr = function(network, address) { - var _1, address, network; - _1 = network; - if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { - return [new UnixAddr.ptr(address, network), $ifaceNil]; - } else { - return [ptrType$5.nil, new UnknownNetworkError((network))]; - } - }; - $pkg.ResolveUnixAddr = ResolveUnixAddr; - UnixConn.ptr.prototype.SyscallConn = function() { - var _returncast, c; - c = this; - if (!c.conn.ok()) { - return [$ifaceNil, new syscall.Errno(22)]; - } - _returncast = newRawConn(c.conn.fd); - return [_returncast[0], _returncast[1]]; - }; - UnixConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - UnixConn.ptr.prototype.CloseRead = function() { - var {_r, c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.conn.fd.closeRead(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: UnixConn.ptr.prototype.CloseRead, $c: true, $r, _r, c, err, $s};return $f; - }; - UnixConn.prototype.CloseRead = function() { return this.$val.CloseRead(); }; - UnixConn.ptr.prototype.CloseWrite = function() { - var {_r, c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.conn.fd.closeWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: UnixConn.ptr.prototype.CloseWrite, $c: true, $r, _r, c, err, $s};return $f; - }; - UnixConn.prototype.CloseWrite = function() { return this.$val.CloseWrite(); }; - UnixConn.ptr.prototype.ReadFromUnix = function(b) { - var _tuple, addr, b, c, err, n; - c = this; - if (!c.conn.ok()) { - return [0, ptrType$5.nil, new syscall.Errno(22)]; - } - _tuple = c.readFrom(b); - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - return [n, addr, err]; - }; - UnixConn.prototype.ReadFromUnix = function(b) { return this.$val.ReadFromUnix(b); }; - UnixConn.ptr.prototype.ReadFrom = function(b) { - var _tuple, addr, b, c, err, n; - c = this; - if (!c.conn.ok()) { - return [0, $ifaceNil, new syscall.Errno(22)]; - } - _tuple = c.readFrom(b); - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - if (addr === ptrType$5.nil) { - return [n, $ifaceNil, err]; - } - return [n, addr, err]; - }; - UnixConn.prototype.ReadFrom = function(b) { return this.$val.ReadFrom(b); }; - UnixConn.ptr.prototype.ReadMsgUnix = function(b, oob) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn; - n = 0; - oobn = 0; - flags = 0; - addr = ptrType$5.nil; - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = ptrType$5.nil; - _tmp$4 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - flags = _tmp$2; - addr = _tmp$3; - err = _tmp$4; - return [n, oobn, flags, addr, err]; - } - _tuple = c.readMsg(b, oob); - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - addr = _tuple[3]; - err = _tuple[4]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - return [n, oobn, flags, addr, err]; - }; - UnixConn.prototype.ReadMsgUnix = function(b, oob) { return this.$val.ReadMsgUnix(b, oob); }; - UnixConn.ptr.prototype.WriteToUnix = function(b, addr) { - var _tuple, addr, b, c, err, n; - c = this; - if (!c.conn.ok()) { - return [0, new syscall.Errno(22)]; - } - _tuple = c.writeTo(b, addr); - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); - } - return [n, err]; - }; - UnixConn.prototype.WriteToUnix = function(b, addr) { return this.$val.WriteToUnix(b, addr); }; - UnixConn.ptr.prototype.WriteTo = function(b, addr) { - var _tuple, _tuple$1, a, addr, b, c, err, n, ok; - c = this; - if (!c.conn.ok()) { - return [0, new syscall.Errno(22)]; - } - _tuple = $assertType(addr, ptrType$5, true); - a = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return [0, new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr, new syscall.Errno(22))]; - } - _tuple$1 = c.writeTo(b, a); - n = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, a.opAddr(), err); - } - return [n, err]; - }; - UnixConn.prototype.WriteTo = function(b, addr) { return this.$val.WriteTo(b, addr); }; - UnixConn.ptr.prototype.WriteMsgUnix = function(b, oob, addr) { - var _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn; - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - return [n, oobn, err]; - } - _tuple = c.writeMsg(b, oob, addr); - n = _tuple[0]; - oobn = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); - } - return [n, oobn, err]; - }; - UnixConn.prototype.WriteMsgUnix = function(b, oob, addr) { return this.$val.WriteMsgUnix(b, oob, addr); }; - newUnixConn = function(fd) { - var fd; - return new UnixConn.ptr(new conn.ptr(fd)); - }; - UnixListener.ptr.prototype.ok = function() { - var ln; - ln = this; - return !(ln === ptrType$8.nil) && !(ln.fd === ptrType$3.nil); - }; - UnixListener.prototype.ok = function() { return this.$val.ok(); }; - UnixListener.ptr.prototype.SyscallConn = function() { - var _returncast, l; - l = this; - if (!l.ok()) { - return [$ifaceNil, new syscall.Errno(22)]; - } - _returncast = newRawListener(l.fd); - return [_returncast[0], _returncast[1]]; - }; - UnixListener.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - UnixListener.ptr.prototype.AcceptUnix = function() { - var {_r, _tuple, c, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return [ptrType$6.nil, new syscall.Errno(22)]; - } - _r = l.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$6.nil, new OpError.ptr("accept", l.fd.net, $ifaceNil, l.fd.laddr, err)]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: UnixListener.ptr.prototype.AcceptUnix, $c: true, $r, _r, _tuple, c, err, l, $s};return $f; - }; - UnixListener.prototype.AcceptUnix = function() { return this.$val.AcceptUnix(); }; - UnixListener.ptr.prototype.Accept = function() { - var {_r, _tuple, c, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return [$ifaceNil, new syscall.Errno(22)]; - } - _r = l.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new OpError.ptr("accept", l.fd.net, $ifaceNil, l.fd.laddr, err)]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: UnixListener.ptr.prototype.Accept, $c: true, $r, _r, _tuple, c, err, l, $s};return $f; - }; - UnixListener.prototype.Accept = function() { return this.$val.Accept(); }; - UnixListener.ptr.prototype.Close = function() { - var {_r, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = l.close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("close", l.fd.net, $ifaceNil, l.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: UnixListener.ptr.prototype.Close, $c: true, $r, _r, err, l, $s};return $f; - }; - UnixListener.prototype.Close = function() { return this.$val.Close(); }; - UnixListener.ptr.prototype.Addr = function() { - var l; - l = this; - return l.fd.laddr; - }; - UnixListener.prototype.Addr = function() { return this.$val.Addr(); }; - UnixListener.ptr.prototype.SetDeadline = function(t) { - var {_r, err, l, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = l.fd.pfd.SetDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("set", l.fd.net, $ifaceNil, l.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: UnixListener.ptr.prototype.SetDeadline, $c: true, $r, _r, err, l, t, $s};return $f; - }; - UnixListener.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - UnixListener.ptr.prototype.File = function() { - var _tmp, _tmp$1, _tuple, err, f, l; - f = ptrType$7.nil; - err = $ifaceNil; - l = this; - if (!l.ok()) { - _tmp = ptrType$7.nil; - _tmp$1 = new syscall.Errno(22); - f = _tmp; - err = _tmp$1; - return [f, err]; - } - _tuple = l.file(); - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("file", l.fd.net, $ifaceNil, l.fd.laddr, err); - } - return [f, err]; - }; - UnixListener.prototype.File = function() { return this.$val.File(); }; - UDPAddr.ptr.prototype.family = function() { - var a; - a = this; - if (a === ptrType$12.nil || a.IP.$length <= 4) { - return 2; - } - if (!(a.IP.To4() === IP.nil)) { - return 2; - } - return 3; - }; - UDPAddr.prototype.family = function() { return this.$val.family(); }; - UDPAddr.ptr.prototype.sockaddr = function(family) { - var {$24r, _r, a, family, $s, $r, $c} = $restore(this, {family}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = this; - if (a === ptrType$12.nil) { - $s = -1; return [$ifaceNil, $ifaceNil]; - } - _r = ipToSockaddr(family, a.IP, a.Port, a.Zone); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: UDPAddr.ptr.prototype.sockaddr, $c: true, $r, $24r, _r, a, family, $s};return $f; - }; - UDPAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; - UDPAddr.ptr.prototype.toLocal = function(net) { - var a, net; - a = this; - return new UDPAddr.ptr(loopbackIP(net), a.Port, a.Zone); - }; - UDPAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; - UDPConn.ptr.prototype.readFrom = function(b, addr) { - var {_1, _r, _tuple, _tuple$1, addr, b, c, err, from, from$1, ip, ip$1, n, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - from = [from]; - from$1 = [from$1]; - c = this; - n = 0; - err = $ifaceNil; - _1 = c.conn.fd.family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - from[0] = new syscall.SockaddrInet4.ptr(0, arrayType.zero()); - _tuple = c.conn.fd.readFromInet4(b, from[0]); - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - ip = $clone(from[0].Addr, arrayType); - UDPAddr.copy(addr, new UDPAddr.ptr($convertSliceType(new sliceType$1(ip), IP), from[0].Port, "")); - } - $s = 4; continue; - /* } else if (_1 === (3)) { */ case 3: - from$1[0] = new syscall.SockaddrInet6.ptr(0, 0, arrayType$1.zero()); - _tuple$1 = c.conn.fd.readFromInet6(b, from$1[0]); - n = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 5: - ip$1 = $clone(from$1[0].Addr, arrayType$1); - _r = zoneCache.name(((from$1[0].ZoneId >> 0))); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - UDPAddr.copy(addr, new UDPAddr.ptr($convertSliceType(new sliceType$1(ip$1), IP), from$1[0].Port, _r)); - /* } */ case 6: - /* } */ case 4: - case 1: - if (!($interfaceIsEqual(err, $ifaceNil))) { - addr = ptrType$12.nil; - } - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.readFrom, $c: true, $r, _1, _r, _tuple, _tuple$1, addr, b, c, err, from, from$1, ip, ip$1, n, $s};return $f; - }; - UDPConn.prototype.readFrom = function(b, addr) { return this.$val.readFrom(b, addr); }; - UDPConn.ptr.prototype.readFromAddrPort = function(b) { - var {_1, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, addr, b, c, err, from, from$1, ip, n, port, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - from = [from]; - from$1 = [from$1]; - n = 0; - addr = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - err = $ifaceNil; - c = this; - ip = new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""); - port = 0; - _1 = c.conn.fd.family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - from[0] = new syscall.SockaddrInet4.ptr(0, arrayType.zero()); - _tuple = c.conn.fd.readFromInet4(b, from[0]); - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - netip.Addr.copy(ip, netip.AddrFrom4($clone(from[0].Addr, arrayType))); - port = from[0].Port; - } - $s = 4; continue; - /* } else if (_1 === (3)) { */ case 3: - from$1[0] = new syscall.SockaddrInet6.ptr(0, 0, arrayType$1.zero()); - _tuple$1 = c.conn.fd.readFromInet6(b, from$1[0]); - n = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 5: - _r = zoneCache.name(((from$1[0].ZoneId >> 0))); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = $clone(netip.AddrFrom16($clone(from$1[0].Addr, arrayType$1)), netip.Addr).WithZone(_r); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - netip.Addr.copy(ip, _r$1); - port = from$1[0].Port; - /* } */ case 6: - /* } */ case 4: - case 1: - if ($interfaceIsEqual(err, $ifaceNil)) { - netip.AddrPort.copy(addr, netip.AddrPortFrom($clone(ip, netip.Addr), ((port << 16 >>> 16)))); - } - _tmp = n; - _tmp$1 = $clone(addr, netip.AddrPort); - _tmp$2 = err; - n = _tmp; - netip.AddrPort.copy(addr, _tmp$1); - err = _tmp$2; - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.readFromAddrPort, $c: true, $r, _1, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, addr, b, c, err, from, from$1, ip, n, port, $s};return $f; - }; - UDPConn.prototype.readFromAddrPort = function(b) { return this.$val.readFromAddrPort(b); }; - UDPConn.ptr.prototype.readMsg = function(b, oob) { - var {_1, _r, _r$1, _tuple, _tuple$1, addr, b, c, err, flags, ip, ip$1, n, oob, oobn, sa, sa$1, $s, $r, $c} = $restore(this, {b, oob}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sa = [sa]; - sa$1 = [sa$1]; - n = 0; - oobn = 0; - flags = 0; - addr = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - err = $ifaceNil; - c = this; - _1 = c.conn.fd.family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - sa[0] = new syscall.SockaddrInet4.ptr(0, arrayType.zero()); - _tuple = c.conn.fd.readMsgInet4(b, oob, 0, sa[0]); - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - err = _tuple[3]; - ip = $clone(netip.AddrFrom4($clone(sa[0].Addr, arrayType)), netip.Addr); - netip.AddrPort.copy(addr, netip.AddrPortFrom($clone(ip, netip.Addr), ((sa[0].Port << 16 >>> 16)))); - $s = 4; continue; - /* } else if (_1 === (3)) { */ case 3: - sa$1[0] = new syscall.SockaddrInet6.ptr(0, 0, arrayType$1.zero()); - _tuple$1 = c.conn.fd.readMsgInet6(b, oob, 0, sa$1[0]); - n = _tuple$1[0]; - oobn = _tuple$1[1]; - flags = _tuple$1[2]; - err = _tuple$1[3]; - _r = zoneCache.name(((sa$1[0].ZoneId >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = $clone(netip.AddrFrom16($clone(sa$1[0].Addr, arrayType$1)), netip.Addr).WithZone(_r); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ip$1 = $clone(_r$1, netip.Addr); - netip.AddrPort.copy(addr, netip.AddrPortFrom($clone(ip$1, netip.Addr), ((sa$1[0].Port << 16 >>> 16)))); - /* } */ case 4: - case 1: - $s = -1; return [n, oobn, flags, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.readMsg, $c: true, $r, _1, _r, _r$1, _tuple, _tuple$1, addr, b, c, err, flags, ip, ip$1, n, oob, oobn, sa, sa$1, $s};return $f; - }; - UDPConn.prototype.readMsg = function(b, oob) { return this.$val.readMsg(b, oob); }; - UDPConn.ptr.prototype.writeTo = function(b, addr) { - var {_1, _r, _tuple, _tuple$1, addr, b, c, err, err$1, sa, sa$1, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sa = [sa]; - sa$1 = [sa$1]; - c = this; - if (c.conn.fd.isConnected) { - $s = -1; return [0, $pkg.ErrWriteToConnected]; - } - if (addr === ptrType$12.nil) { - $s = -1; return [0, errMissingAddress]; - } - _1 = c.conn.fd.family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - _tuple = ipToSockaddrInet4(addr.IP, addr.Port); - sa[0] = $clone(_tuple[0], syscall.SockaddrInet4); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - $s = -1; return c.conn.fd.writeToInet4(b, sa[0]); - /* } else if (_1 === (3)) { */ case 3: - _r = ipToSockaddrInet6(addr.IP, addr.Port, addr.Zone); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - sa$1[0] = $clone(_tuple$1[0], syscall.SockaddrInet6); - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [0, err$1]; - } - $s = -1; return c.conn.fd.writeToInet6(b, sa$1[0]); - /* } else { */ case 4: - $s = -1; return [0, new AddrError.ptr("invalid address family", addr.IP.String())]; - /* } */ case 5: - case 1: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.writeTo, $c: true, $r, _1, _r, _tuple, _tuple$1, addr, b, c, err, err$1, sa, sa$1, $s};return $f; - }; - UDPConn.prototype.writeTo = function(b, addr) { return this.$val.writeTo(b, addr); }; - UDPConn.ptr.prototype.writeToAddrPort = function(b, addr) { - var {_1, _r, _tuple, _tuple$1, addr, b, c, err, err$1, sa, sa$1, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sa = [sa]; - sa$1 = [sa$1]; - c = this; - if (c.conn.fd.isConnected) { - $s = -1; return [0, $pkg.ErrWriteToConnected]; - } - if (!$clone(addr, netip.AddrPort).IsValid()) { - $s = -1; return [0, errMissingAddress]; - } - _1 = c.conn.fd.family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - _tuple = addrPortToSockaddrInet4($clone(addr, netip.AddrPort)); - sa[0] = $clone(_tuple[0], syscall.SockaddrInet4); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - $s = -1; return c.conn.fd.writeToInet4(b, sa[0]); - /* } else if (_1 === (3)) { */ case 3: - _r = addrPortToSockaddrInet6($clone(addr, netip.AddrPort)); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - sa$1[0] = $clone(_tuple$1[0], syscall.SockaddrInet6); - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [0, err$1]; - } - $s = -1; return c.conn.fd.writeToInet6(b, sa$1[0]); - /* } else { */ case 4: - $s = -1; return [0, new AddrError.ptr("invalid address family", $clone($clone(addr, netip.AddrPort).Addr(), netip.Addr).String())]; - /* } */ case 5: - case 1: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.writeToAddrPort, $c: true, $r, _1, _r, _tuple, _tuple$1, addr, b, c, err, err$1, sa, sa$1, $s};return $f; - }; - UDPConn.prototype.writeToAddrPort = function(b, addr) { return this.$val.writeToAddrPort(b, addr); }; - UDPConn.ptr.prototype.writeMsg = function(b, oob, addr) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, addr, b, c, err, n, oob, oobn, sa, $s, $r, $c} = $restore(this, {b, oob, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (c.conn.fd.isConnected && !(addr === ptrType$12.nil)) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = $pkg.ErrWriteToConnected; - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - $s = -1; return [n, oobn, err]; - } - if (!c.conn.fd.isConnected && addr === ptrType$12.nil) { - _tmp$3 = 0; - _tmp$4 = 0; - _tmp$5 = errMissingAddress; - n = _tmp$3; - oobn = _tmp$4; - err = _tmp$5; - $s = -1; return [n, oobn, err]; - } - _r = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - sa = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = 0; - _tmp$7 = 0; - _tmp$8 = err; - n = _tmp$6; - oobn = _tmp$7; - err = _tmp$8; - $s = -1; return [n, oobn, err]; - } - _tuple$1 = c.conn.fd.writeMsg(b, oob, sa); - n = _tuple$1[0]; - oobn = _tuple$1[1]; - err = _tuple$1[2]; - $s = -1; return [n, oobn, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.writeMsg, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, addr, b, c, err, n, oob, oobn, sa, $s};return $f; - }; - UDPConn.prototype.writeMsg = function(b, oob, addr) { return this.$val.writeMsg(b, oob, addr); }; - UDPConn.ptr.prototype.writeMsgAddrPort = function(b, oob, addr) { - var {_1, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, addr, b, c, err, err$1, err$2, n, oob, oobn, sa, sa$1, $s, $r, $c} = $restore(this, {b, oob, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sa = [sa]; - sa$1 = [sa$1]; - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (c.conn.fd.isConnected && $clone(addr, netip.AddrPort).IsValid()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = $pkg.ErrWriteToConnected; - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - $s = -1; return [n, oobn, err]; - } - if (!c.conn.fd.isConnected && !$clone(addr, netip.AddrPort).IsValid()) { - _tmp$3 = 0; - _tmp$4 = 0; - _tmp$5 = errMissingAddress; - n = _tmp$3; - oobn = _tmp$4; - err = _tmp$5; - $s = -1; return [n, oobn, err]; - } - _1 = c.conn.fd.family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - _tuple = addrPortToSockaddrInet4($clone(addr, netip.AddrPort)); - sa[0] = $clone(_tuple[0], syscall.SockaddrInet4); - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp$6 = 0; - _tmp$7 = 0; - _tmp$8 = err$1; - n = _tmp$6; - oobn = _tmp$7; - err = _tmp$8; - $s = -1; return [n, oobn, err]; - } - _tuple$1 = c.conn.fd.writeMsgInet4(b, oob, sa[0]); - n = _tuple$1[0]; - oobn = _tuple$1[1]; - err = _tuple$1[2]; - $s = -1; return [n, oobn, err]; - /* } else if (_1 === (3)) { */ case 3: - _r = addrPortToSockaddrInet6($clone(addr, netip.AddrPort)); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$2 = _r; - sa$1[0] = $clone(_tuple$2[0], syscall.SockaddrInet6); - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$9 = 0; - _tmp$10 = 0; - _tmp$11 = err$2; - n = _tmp$9; - oobn = _tmp$10; - err = _tmp$11; - $s = -1; return [n, oobn, err]; - } - _tuple$3 = c.conn.fd.writeMsgInet6(b, oob, sa$1[0]); - n = _tuple$3[0]; - oobn = _tuple$3[1]; - err = _tuple$3[2]; - $s = -1; return [n, oobn, err]; - /* } else { */ case 4: - _tmp$12 = 0; - _tmp$13 = 0; - _tmp$14 = new AddrError.ptr("invalid address family", $clone($clone(addr, netip.AddrPort).Addr(), netip.Addr).String()); - n = _tmp$12; - oobn = _tmp$13; - err = _tmp$14; - $s = -1; return [n, oobn, err]; - /* } */ case 5: - case 1: - $s = -1; return [n, oobn, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.writeMsgAddrPort, $c: true, $r, _1, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, addr, b, c, err, err$1, err$2, n, oob, oobn, sa, sa$1, $s};return $f; - }; - UDPConn.prototype.writeMsgAddrPort = function(b, oob, addr) { return this.$val.writeMsgAddrPort(b, oob, addr); }; - sysDialer.ptr.prototype.dialUDP = function(ctx, laddr, raddr) { - var {_r, _tuple, ctx, err, fd, laddr, raddr, sd, $s, $r, $c} = $restore(this, {ctx, laddr, raddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _r = internetSocket(ctx, sd.network, laddr, raddr, 2, 0, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$13.nil, err]; - } - $s = -1; return [newUDPConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysDialer.ptr.prototype.dialUDP, $c: true, $r, _r, _tuple, ctx, err, fd, laddr, raddr, sd, $s};return $f; - }; - sysDialer.prototype.dialUDP = function(ctx, laddr, raddr) { return this.$val.dialUDP(ctx, laddr, raddr); }; - sysListener.ptr.prototype.listenUDP = function(ctx, laddr) { - var {_r, _tuple, ctx, err, fd, laddr, sl, $s, $r, $c} = $restore(this, {ctx, laddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sl = this; - _r = internetSocket(ctx, sl.network, laddr, $ifaceNil, 2, 0, "listen", sl.ListenConfig.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$13.nil, err]; - } - $s = -1; return [newUDPConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysListener.ptr.prototype.listenUDP, $c: true, $r, _r, _tuple, ctx, err, fd, laddr, sl, $s};return $f; - }; - sysListener.prototype.listenUDP = function(ctx, laddr) { return this.$val.listenUDP(ctx, laddr); }; - UDPAddr.ptr.prototype.AddrPort = function() { - var _tuple, a, na; - a = this; - if (a === ptrType$12.nil) { - return new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - } - _tuple = netip.AddrFromSlice($convertSliceType(a.IP, sliceType$1)); - na = $clone(_tuple[0], netip.Addr); - netip.Addr.copy(na, $clone(na, netip.Addr).WithZone(a.Zone)); - return netip.AddrPortFrom($clone(na, netip.Addr), ((a.Port << 16 >>> 16))); - }; - UDPAddr.prototype.AddrPort = function() { return this.$val.AddrPort(); }; - UDPAddr.ptr.prototype.Network = function() { - var a; - a = this; - return "udp"; - }; - UDPAddr.prototype.Network = function() { return this.$val.Network(); }; - UDPAddr.ptr.prototype.String = function() { - var a, ip; - a = this; - if (a === ptrType$12.nil) { - return ""; - } - ip = ipEmptyString(a.IP); - if (!(a.Zone === "")) { - return JoinHostPort(ip + "%" + a.Zone, itoa.Itoa(a.Port)); - } - return JoinHostPort(ip, itoa.Itoa(a.Port)); - }; - UDPAddr.prototype.String = function() { return this.$val.String(); }; - UDPAddr.ptr.prototype.isWildcard = function() { - var a; - a = this; - if (a === ptrType$12.nil || a.IP === IP.nil) { - return true; - } - return a.IP.IsUnspecified(); - }; - UDPAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; - UDPAddr.ptr.prototype.opAddr = function() { - var a; - a = this; - if (a === ptrType$12.nil) { - return $ifaceNil; - } - return a; - }; - UDPAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; - UDPAddrFromAddrPort = function(addr) { - var addr; - return new UDPAddr.ptr($convertSliceType($clone($clone(addr, netip.AddrPort).Addr(), netip.Addr).AsSlice(), IP), (($clone(addr, netip.AddrPort).Port() >> 0)), $clone($clone(addr, netip.AddrPort).Addr(), netip.Addr).Zone()); - }; - $pkg.UDPAddrFromAddrPort = UDPAddrFromAddrPort; - addrPortUDPAddr.ptr.prototype.Network = function() { - return "udp"; - }; - addrPortUDPAddr.prototype.Network = function() { return this.$val.Network(); }; - UDPConn.ptr.prototype.SyscallConn = function() { - var _returncast, c; - c = this; - if (!c.conn.ok()) { - return [$ifaceNil, new syscall.Errno(22)]; - } - _returncast = newRawConn(c.conn.fd); - return [_returncast[0], _returncast[1]]; - }; - UDPConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - UDPConn.ptr.prototype.ReadFromUDP = function(b) { - var {$24r, _r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - addr = ptrType$12.nil; - err = $ifaceNil; - c = this; - _r = c.readFromUDP(b, new UDPAddr.ptr(IP.nil, 0, "")); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - $24r = [n, addr, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.ReadFromUDP, $c: true, $r, $24r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - UDPConn.prototype.ReadFromUDP = function(b) { return this.$val.ReadFromUDP(b); }; - UDPConn.ptr.prototype.readFromUDP = function(b, addr) { - var {_r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, ptrType$12.nil, new syscall.Errno(22)]; - } - _r = c.readFrom(b, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.readFromUDP, $c: true, $r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - UDPConn.prototype.readFromUDP = function(b, addr) { return this.$val.readFromUDP(b, addr); }; - UDPConn.ptr.prototype.ReadFrom = function(b) { - var {_r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = c.readFromUDP(b, new UDPAddr.ptr(IP.nil, 0, "")); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - if (addr === ptrType$12.nil) { - $s = -1; return [n, $ifaceNil, err]; - } - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.ReadFrom, $c: true, $r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - UDPConn.prototype.ReadFrom = function(b) { return this.$val.ReadFrom(b); }; - UDPConn.ptr.prototype.ReadFromUDPAddrPort = function(b) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - addr = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - _tmp$2 = new syscall.Errno(22); - n = _tmp; - netip.AddrPort.copy(addr, _tmp$1); - err = _tmp$2; - $s = -1; return [n, addr, err]; - } - _r = c.readFromAddrPort(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - netip.AddrPort.copy(addr, _tuple[1]); - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - _tmp$3 = n; - _tmp$4 = $clone(addr, netip.AddrPort); - _tmp$5 = err; - n = _tmp$3; - netip.AddrPort.copy(addr, _tmp$4); - err = _tmp$5; - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.ReadFromUDPAddrPort, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, addr, b, c, err, n, $s};return $f; - }; - UDPConn.prototype.ReadFromUDPAddrPort = function(b) { return this.$val.ReadFromUDPAddrPort(b); }; - UDPConn.ptr.prototype.ReadMsgUDP = function(b, oob) { - var {_r, _tuple, addr, ap, b, c, err, flags, n, oob, oobn, $s, $r, $c} = $restore(this, {b, oob}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - flags = 0; - addr = ptrType$12.nil; - err = $ifaceNil; - c = this; - ap = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - _r = c.ReadMsgUDPAddrPort(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - netip.AddrPort.copy(ap, _tuple[3]); - err = _tuple[4]; - if ($clone(ap, netip.AddrPort).IsValid()) { - addr = UDPAddrFromAddrPort($clone(ap, netip.AddrPort)); - } - $s = -1; return [n, oobn, flags, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.ReadMsgUDP, $c: true, $r, _r, _tuple, addr, ap, b, c, err, flags, n, oob, oobn, $s};return $f; - }; - UDPConn.prototype.ReadMsgUDP = function(b, oob) { return this.$val.ReadMsgUDP(b, oob); }; - UDPConn.ptr.prototype.ReadMsgUDPAddrPort = function(b, oob) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s, $r, $c} = $restore(this, {b, oob}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - flags = 0; - addr = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - _tmp$4 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - flags = _tmp$2; - netip.AddrPort.copy(addr, _tmp$3); - err = _tmp$4; - $s = -1; return [n, oobn, flags, addr, err]; - } - _r = c.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - netip.AddrPort.copy(addr, _tuple[3]); - err = _tuple[4]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return [n, oobn, flags, addr, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.ReadMsgUDPAddrPort, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s};return $f; - }; - UDPConn.prototype.ReadMsgUDPAddrPort = function(b, oob) { return this.$val.ReadMsgUDPAddrPort(b, oob); }; - UDPConn.ptr.prototype.WriteToUDP = function(b, addr) { - var {_r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _r = c.writeTo(b, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.WriteToUDP, $c: true, $r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - UDPConn.prototype.WriteToUDP = function(b, addr) { return this.$val.WriteToUDP(b, addr); }; - UDPConn.ptr.prototype.WriteToUDPAddrPort = function(b, addr) { - var {_r, _tuple, addr, b, c, err, n, x, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _r = c.writeToAddrPort(b, $clone(addr, netip.AddrPort)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, (x = new addrPortUDPAddr.ptr($clone(addr, netip.AddrPort)), new x.constructor.elem(x)), err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.WriteToUDPAddrPort, $c: true, $r, _r, _tuple, addr, b, c, err, n, x, $s};return $f; - }; - UDPConn.prototype.WriteToUDPAddrPort = function(b, addr) { return this.$val.WriteToUDPAddrPort(b, addr); }; - UDPConn.ptr.prototype.WriteTo = function(b, addr) { - var {_r, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _tuple = $assertType(addr, ptrType$12, true); - a = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [0, new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr, new syscall.Errno(22))]; - } - _r = c.writeTo(b, a); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - n = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, a.opAddr(), err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.WriteTo, $c: true, $r, _r, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s};return $f; - }; - UDPConn.prototype.WriteTo = function(b, addr) { return this.$val.WriteTo(b, addr); }; - UDPConn.ptr.prototype.WriteMsgUDP = function(b, oob, addr) { - var {_r, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s, $r, $c} = $restore(this, {b, oob, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - $s = -1; return [n, oobn, err]; - } - _r = c.writeMsg(b, oob, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - oobn = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); - } - $s = -1; return [n, oobn, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.WriteMsgUDP, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s};return $f; - }; - UDPConn.prototype.WriteMsgUDP = function(b, oob, addr) { return this.$val.WriteMsgUDP(b, oob, addr); }; - UDPConn.ptr.prototype.WriteMsgUDPAddrPort = function(b, oob, addr) { - var {_r, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, x, $s, $r, $c} = $restore(this, {b, oob, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - $s = -1; return [n, oobn, err]; - } - _r = c.writeMsgAddrPort(b, oob, $clone(addr, netip.AddrPort)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - oobn = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, (x = new addrPortUDPAddr.ptr($clone(addr, netip.AddrPort)), new x.constructor.elem(x)), err); - } - $s = -1; return [n, oobn, err]; - /* */ } return; } var $f = {$blk: UDPConn.ptr.prototype.WriteMsgUDPAddrPort, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, x, $s};return $f; - }; - UDPConn.prototype.WriteMsgUDPAddrPort = function(b, oob, addr) { return this.$val.WriteMsgUDPAddrPort(b, oob, addr); }; - newUDPConn = function(fd) { - var fd; - return new UDPConn.ptr(new conn.ptr(fd)); - }; - setNoDelay = function(fd, noDelay) { - var fd, noDelay; - return new syscall.Errno(92); - }; - setKeepAlivePeriod = function(fd, d) { - var d, fd; - return new syscall.Errno(92); - }; - TCPAddr.ptr.prototype.family = function() { - var a; - a = this; - if (a === ptrType$15.nil || a.IP.$length <= 4) { - return 2; - } - if (!(a.IP.To4() === IP.nil)) { - return 2; - } - return 3; - }; - TCPAddr.prototype.family = function() { return this.$val.family(); }; - TCPAddr.ptr.prototype.sockaddr = function(family) { - var {$24r, _r, a, family, $s, $r, $c} = $restore(this, {family}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = this; - if (a === ptrType$15.nil) { - $s = -1; return [$ifaceNil, $ifaceNil]; - } - _r = ipToSockaddr(family, a.IP, a.Port, a.Zone); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: TCPAddr.ptr.prototype.sockaddr, $c: true, $r, $24r, _r, a, family, $s};return $f; - }; - TCPAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; - TCPAddr.ptr.prototype.toLocal = function(net) { - var a, net; - a = this; - return new TCPAddr.ptr(loopbackIP(net), a.Port, a.Zone); - }; - TCPAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; - TCPConn.ptr.prototype.readFrom = function(r) { - var {$24r, _r, _tuple, _tuple$1, c, err, err$1, handled, handled$1, n, n$1, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _tuple = splice(c.conn.fd, r); - n = _tuple[0]; - err = _tuple[1]; - handled = _tuple[2]; - if (handled) { - $s = -1; return [n, err]; - } - _tuple$1 = sendFile(c.conn.fd, r); - n$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - handled$1 = _tuple$1[2]; - if (handled$1) { - $s = -1; return [n$1, err$1]; - } - _r = genericReadFrom(c, r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: TCPConn.ptr.prototype.readFrom, $c: true, $r, $24r, _r, _tuple, _tuple$1, c, err, err$1, handled, handled$1, n, n$1, r, $s};return $f; - }; - TCPConn.prototype.readFrom = function(r) { return this.$val.readFrom(r); }; - sysDialer.ptr.prototype.dialTCP = function(ctx, laddr, raddr) { - var {$24r, $24r$1, _r, _r$1, ctx, laddr, raddr, sd, $s, $r, $c} = $restore(this, {ctx, laddr, raddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - /* */ if (!(testHookDialTCP === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(testHookDialTCP === $throwNilPointerError)) { */ case 1: - _r = testHookDialTCP(ctx, sd.network, laddr, raddr); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = sd.doDialTCP(ctx, laddr, raddr); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: sysDialer.ptr.prototype.dialTCP, $c: true, $r, $24r, $24r$1, _r, _r$1, ctx, laddr, raddr, sd, $s};return $f; - }; - sysDialer.prototype.dialTCP = function(ctx, laddr, raddr) { return this.$val.dialTCP(ctx, laddr, raddr); }; - sysDialer.ptr.prototype.doDialTCP = function(ctx, laddr, raddr) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, ctx, err, fd, i, laddr, raddr, sd, $s, $r, $c} = $restore(this, {ctx, laddr, raddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _r = internetSocket(ctx, sd.network, laddr, raddr, 1, 0, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - i = 0; - /* while (true) { */ case 2: - /* if (!(i < 2 && (laddr === ptrType$15.nil || (laddr.Port === 0)) && (selfConnect(fd, err) || spuriousENOTAVAIL(err)))) { break; } */ if(!(i < 2 && (laddr === ptrType$15.nil || (laddr.Port === 0)) && (selfConnect(fd, err) || spuriousENOTAVAIL(err)))) { $s = 3; continue; } - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 4: - _r$1 = fd.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 5: - _r$2 = internetSocket(ctx, sd.network, laddr, raddr, 1, 0, "dial", sd.Dialer.Control); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - fd = _tuple$1[0]; - err = _tuple$1[1]; - i = i + (1) >> 0; - $s = 2; continue; - case 3: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$16.nil, err]; - } - $s = -1; return [newTCPConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysDialer.ptr.prototype.doDialTCP, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, ctx, err, fd, i, laddr, raddr, sd, $s};return $f; - }; - sysDialer.prototype.doDialTCP = function(ctx, laddr, raddr) { return this.$val.doDialTCP(ctx, laddr, raddr); }; - selfConnect = function(fd, err) { - var err, fd, l, r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return false; - } - if ($interfaceIsEqual(fd.laddr, $ifaceNil) || $interfaceIsEqual(fd.raddr, $ifaceNil)) { - return true; - } - l = $assertType(fd.laddr, ptrType$15); - r = $assertType(fd.raddr, ptrType$15); - return (l.Port === r.Port) && l.IP.Equal(r.IP); - }; - spuriousENOTAVAIL = function(err) { - var _tuple, _tuple$1, err, ok, ok$1, op, sys; - _tuple = $assertType(err, ptrType$17, true); - op = _tuple[0]; - ok = _tuple[1]; - if (ok) { - err = op.Err; - } - _tuple$1 = $assertType(err, ptrType$18, true); - sys = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1) { - err = sys.Err; - } - return $interfaceIsEqual(err, new syscall.Errno(99)); - }; - TCPListener.ptr.prototype.ok = function() { - var ln; - ln = this; - return !(ln === ptrType$19.nil) && !(ln.fd === ptrType$3.nil); - }; - TCPListener.prototype.ok = function() { return this.$val.ok(); }; - TCPListener.ptr.prototype.accept = function() { - var {_r, _tuple, err, fd, ka, ln, tc, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ln = this; - _r = ln.fd.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$16.nil, err]; - } - tc = newTCPConn(fd); - if ((x = ln.lc.KeepAlive, (x.$high > 0 || (x.$high === 0 && x.$low >= 0)))) { - setKeepAlive(fd, true); - ka = ln.lc.KeepAlive; - if ((x$1 = ln.lc.KeepAlive, (x$1.$high === 0 && x$1.$low === 0))) { - ka = new time.Duration(3, 2115098112); - } - setKeepAlivePeriod(fd, ka); - } - $s = -1; return [tc, $ifaceNil]; - /* */ } return; } var $f = {$blk: TCPListener.ptr.prototype.accept, $c: true, $r, _r, _tuple, err, fd, ka, ln, tc, x, x$1, $s};return $f; - }; - TCPListener.prototype.accept = function() { return this.$val.accept(); }; - TCPListener.ptr.prototype.close = function() { - var {$24r, _r, ln, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ln = this; - _r = ln.fd.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: TCPListener.ptr.prototype.close, $c: true, $r, $24r, _r, ln, $s};return $f; - }; - TCPListener.prototype.close = function() { return this.$val.close(); }; - TCPListener.ptr.prototype.file = function() { - var _tuple, err, f, ln; - ln = this; - _tuple = ln.fd.dup(); - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [ptrType$7.nil, err]; - } - return [f, $ifaceNil]; - }; - TCPListener.prototype.file = function() { return this.$val.file(); }; - sysListener.ptr.prototype.listenTCP = function(ctx, laddr) { - var {_r, _tuple, ctx, err, fd, laddr, sl, $s, $r, $c} = $restore(this, {ctx, laddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sl = this; - _r = internetSocket(ctx, sl.network, laddr, $ifaceNil, 1, 0, "listen", sl.ListenConfig.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$19.nil, err]; - } - $s = -1; return [new TCPListener.ptr(fd, $clone(sl.ListenConfig, ListenConfig)), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysListener.ptr.prototype.listenTCP, $c: true, $r, _r, _tuple, ctx, err, fd, laddr, sl, $s};return $f; - }; - sysListener.prototype.listenTCP = function(ctx, laddr) { return this.$val.listenTCP(ctx, laddr); }; - TCPAddr.ptr.prototype.AddrPort = function() { - var _tuple, a, na; - a = this; - if (a === ptrType$15.nil) { - return new netip.AddrPort.ptr(new netip.Addr.ptr(new netip.uint128.ptr(new $Uint64(0, 0), new $Uint64(0, 0)), ""), 0); - } - _tuple = netip.AddrFromSlice($convertSliceType(a.IP, sliceType$1)); - na = $clone(_tuple[0], netip.Addr); - netip.Addr.copy(na, $clone(na, netip.Addr).WithZone(a.Zone)); - return netip.AddrPortFrom($clone(na, netip.Addr), ((a.Port << 16 >>> 16))); - }; - TCPAddr.prototype.AddrPort = function() { return this.$val.AddrPort(); }; - TCPAddr.ptr.prototype.Network = function() { - var a; - a = this; - return "tcp"; - }; - TCPAddr.prototype.Network = function() { return this.$val.Network(); }; - TCPAddr.ptr.prototype.String = function() { - var a, ip; - a = this; - if (a === ptrType$15.nil) { - return ""; - } - ip = ipEmptyString(a.IP); - if (!(a.Zone === "")) { - return JoinHostPort(ip + "%" + a.Zone, itoa.Itoa(a.Port)); - } - return JoinHostPort(ip, itoa.Itoa(a.Port)); - }; - TCPAddr.prototype.String = function() { return this.$val.String(); }; - TCPAddr.ptr.prototype.isWildcard = function() { - var a; - a = this; - if (a === ptrType$15.nil || a.IP === IP.nil) { - return true; - } - return a.IP.IsUnspecified(); - }; - TCPAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; - TCPAddr.ptr.prototype.opAddr = function() { - var a; - a = this; - if (a === ptrType$15.nil) { - return $ifaceNil; - } - return a; - }; - TCPAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; - TCPConn.ptr.prototype.SyscallConn = function() { - var _returncast, c; - c = this; - if (!c.conn.ok()) { - return [$ifaceNil, new syscall.Errno(22)]; - } - _returncast = newRawConn(c.conn.fd); - return [_returncast[0], _returncast[1]]; - }; - TCPConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - TCPConn.ptr.prototype.ReadFrom = function(r) { - var {_r, _tuple, c, err, n, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [new $Int64(0, 0), new syscall.Errno(22)]; - } - _r = c.readFrom(r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, io.EOF))) { - err = new OpError.ptr("readfrom", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: TCPConn.ptr.prototype.ReadFrom, $c: true, $r, _r, _tuple, c, err, n, r, $s};return $f; - }; - TCPConn.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; - TCPConn.ptr.prototype.CloseRead = function() { - var {_r, c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.conn.fd.closeRead(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: TCPConn.ptr.prototype.CloseRead, $c: true, $r, _r, c, err, $s};return $f; - }; - TCPConn.prototype.CloseRead = function() { return this.$val.CloseRead(); }; - TCPConn.ptr.prototype.CloseWrite = function() { - var {_r, c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.conn.fd.closeWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("close", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: TCPConn.ptr.prototype.CloseWrite, $c: true, $r, _r, c, err, $s};return $f; - }; - TCPConn.prototype.CloseWrite = function() { return this.$val.CloseWrite(); }; - TCPConn.ptr.prototype.SetLinger = function(sec) { - var c, err, sec; - c = this; - if (!c.conn.ok()) { - return new syscall.Errno(22); - } - err = setLinger(c.conn.fd, sec); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - return $ifaceNil; - }; - TCPConn.prototype.SetLinger = function(sec) { return this.$val.SetLinger(sec); }; - TCPConn.ptr.prototype.SetKeepAlive = function(keepalive) { - var c, err, keepalive; - c = this; - if (!c.conn.ok()) { - return new syscall.Errno(22); - } - err = setKeepAlive(c.conn.fd, keepalive); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - return $ifaceNil; - }; - TCPConn.prototype.SetKeepAlive = function(keepalive) { return this.$val.SetKeepAlive(keepalive); }; - TCPConn.ptr.prototype.SetKeepAlivePeriod = function(d) { - var c, d, err; - c = this; - if (!c.conn.ok()) { - return new syscall.Errno(22); - } - err = setKeepAlivePeriod(c.conn.fd, d); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - return $ifaceNil; - }; - TCPConn.prototype.SetKeepAlivePeriod = function(d) { return this.$val.SetKeepAlivePeriod(d); }; - TCPConn.ptr.prototype.SetNoDelay = function(noDelay) { - var c, err, noDelay; - c = this; - if (!c.conn.ok()) { - return new syscall.Errno(22); - } - err = setNoDelay(c.conn.fd, noDelay); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return new OpError.ptr("set", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - return $ifaceNil; - }; - TCPConn.prototype.SetNoDelay = function(noDelay) { return this.$val.SetNoDelay(noDelay); }; - newTCPConn = function(fd) { - var c, fd; - c = new TCPConn.ptr(new conn.ptr(fd)); - setNoDelay(c.conn.fd, true); - return c; - }; - TCPListener.ptr.prototype.SyscallConn = function() { - var _returncast, l; - l = this; - if (!l.ok()) { - return [$ifaceNil, new syscall.Errno(22)]; - } - _returncast = newRawListener(l.fd); - return [_returncast[0], _returncast[1]]; - }; - TCPListener.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - TCPListener.ptr.prototype.AcceptTCP = function() { - var {_r, _tuple, c, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return [ptrType$16.nil, new syscall.Errno(22)]; - } - _r = l.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$16.nil, new OpError.ptr("accept", l.fd.net, $ifaceNil, l.fd.laddr, err)]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: TCPListener.ptr.prototype.AcceptTCP, $c: true, $r, _r, _tuple, c, err, l, $s};return $f; - }; - TCPListener.prototype.AcceptTCP = function() { return this.$val.AcceptTCP(); }; - TCPListener.ptr.prototype.Accept = function() { - var {_r, _tuple, c, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return [$ifaceNil, new syscall.Errno(22)]; - } - _r = l.accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new OpError.ptr("accept", l.fd.net, $ifaceNil, l.fd.laddr, err)]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: TCPListener.ptr.prototype.Accept, $c: true, $r, _r, _tuple, c, err, l, $s};return $f; - }; - TCPListener.prototype.Accept = function() { return this.$val.Accept(); }; - TCPListener.ptr.prototype.Close = function() { - var {_r, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = l.close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("close", l.fd.net, $ifaceNil, l.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: TCPListener.ptr.prototype.Close, $c: true, $r, _r, err, l, $s};return $f; - }; - TCPListener.prototype.Close = function() { return this.$val.Close(); }; - TCPListener.ptr.prototype.Addr = function() { - var l; - l = this; - return l.fd.laddr; - }; - TCPListener.prototype.Addr = function() { return this.$val.Addr(); }; - TCPListener.ptr.prototype.SetDeadline = function(t) { - var {_r, err, l, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - if (!l.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = l.fd.pfd.SetDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("set", l.fd.net, $ifaceNil, l.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: TCPListener.ptr.prototype.SetDeadline, $c: true, $r, _r, err, l, t, $s};return $f; - }; - TCPListener.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - TCPListener.ptr.prototype.File = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, err, f, l; - f = ptrType$7.nil; - err = $ifaceNil; - l = this; - if (!l.ok()) { - _tmp = ptrType$7.nil; - _tmp$1 = new syscall.Errno(22); - f = _tmp; - err = _tmp$1; - return [f, err]; - } - _tuple = l.file(); - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = ptrType$7.nil; - _tmp$3 = new OpError.ptr("file", l.fd.net, $ifaceNil, l.fd.laddr, err); - f = _tmp$2; - err = _tmp$3; - return [f, err]; - } - return [f, err]; - }; - TCPListener.prototype.File = function() { return this.$val.File(); }; - splice = function(c, r) { - var c, r; - return [new $Int64(0, 0), $ifaceNil, false]; - }; - setReadBuffer = function(fd, bytes) { - var bytes, fd; - return new syscall.Errno(92); - }; - setWriteBuffer = function(fd, bytes) { - var bytes, fd; - return new syscall.Errno(92); - }; - setKeepAlive = function(fd, keepalive) { - var fd, keepalive; - return new syscall.Errno(92); - }; - setLinger = function(fd, sec) { - var fd, sec; - return new syscall.Errno(92); - }; - sendFile = function(c, r) { - var _tmp, _tmp$1, _tmp$2, c, err, handled, n, r; - n = new $Int64(0, 0); - err = $ifaceNil; - handled = false; - _tmp = new $Int64(0, 0); - _tmp$1 = $ifaceNil; - _tmp$2 = false; - n = _tmp; - err = _tmp$1; - handled = _tmp$2; - return [n, err, handled]; - }; - rawConn.ptr.prototype.ok = function() { - var c; - c = this; - return !(c === ptrType$20.nil) && !(c.fd === ptrType$3.nil); - }; - rawConn.prototype.ok = function() { return this.$val.ok(); }; - rawConn.ptr.prototype.Control = function(f) { - var {_r, c, err, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.pfd.RawControl(f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - runtime.KeepAlive(c.fd); - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("raw-control", c.fd.net, $ifaceNil, c.fd.laddr, err); - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: rawConn.ptr.prototype.Control, $c: true, $r, _r, c, err, f, $s};return $f; - }; - rawConn.prototype.Control = function(f) { return this.$val.Control(f); }; - rawConn.ptr.prototype.Read = function(f) { - var {_r, c, err, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.pfd.RawRead(f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - runtime.KeepAlive(c.fd); - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("raw-read", c.fd.net, c.fd.laddr, c.fd.raddr, err); - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: rawConn.ptr.prototype.Read, $c: true, $r, _r, c, err, f, $s};return $f; - }; - rawConn.prototype.Read = function(f) { return this.$val.Read(f); }; - rawConn.ptr.prototype.Write = function(f) { - var {_r, c, err, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.pfd.RawWrite(f); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - runtime.KeepAlive(c.fd); - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("raw-write", c.fd.net, c.fd.laddr, c.fd.raddr, err); - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: rawConn.ptr.prototype.Write, $c: true, $r, _r, c, err, f, $s};return $f; - }; - rawConn.prototype.Write = function(f) { return this.$val.Write(f); }; - newRawConn = function(fd) { - var fd; - return [new rawConn.ptr(fd), $ifaceNil]; - }; - rawListener.ptr.prototype.Read = function(param) { - var l, param; - l = this; - return new syscall.Errno(22); - }; - rawListener.prototype.Read = function(param) { return this.$val.Read(param); }; - rawListener.ptr.prototype.Write = function(param) { - var l, param; - l = this; - return new syscall.Errno(22); - }; - rawListener.prototype.Write = function(param) { return this.$val.Write(param); }; - newRawListener = function(fd) { - var fd; - return [new rawListener.ptr(new rawConn.ptr(fd)), $ifaceNil]; - }; - readServices = function() { - var {_entry, _key, _key$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, err, f, file$1, i, i$1, j, line, m, netw, ok, ok$1, ok1, port, portnet, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r = open("/etc/services"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - file$1 = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - $deferred.push([$methodVal(file$1, "close"), []]); - _r$1 = file$1.readLine(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - line = _tuple$1[0]; - ok = _tuple$1[1]; - /* while (true) { */ case 6: - /* if (!(ok)) { break; } */ if(!(ok)) { $s = 7; continue; } - i = bytealg.IndexByteString(line, 35); - if (i >= 0) { - line = $substring(line, 0, i); - } - f = getFields(line); - /* */ if (f.$length < 2) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (f.$length < 2) { */ case 8: - _r$2 = file$1.readLine(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - line = _tuple$2[0]; - ok = _tuple$2[1]; - /* continue; */ $s = 6; continue; - /* } */ case 9: - portnet = (1 >= f.$length ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + 1]); - _tuple$3 = dtoi(portnet); - port = _tuple$3[0]; - j = _tuple$3[1]; - ok$1 = _tuple$3[2]; - /* */ if (!ok$1 || port <= 0 || j >= portnet.length || !((portnet.charCodeAt(j) === 47))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!ok$1 || port <= 0 || j >= portnet.length || !((portnet.charCodeAt(j) === 47))) { */ case 11: - _r$3 = file$1.readLine(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$4 = _r$3; - line = _tuple$4[0]; - ok = _tuple$4[1]; - /* continue; */ $s = 6; continue; - /* } */ case 12: - netw = $substring(portnet, (j + 1 >> 0)); - _tuple$5 = (_entry = services[$String.keyFor(netw)], _entry !== undefined ? [_entry.v, true] : [false, false]); - m = _tuple$5[0]; - ok1 = _tuple$5[1]; - if (!ok1) { - m = {}; - _key = netw; (services || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: m }; - } - i$1 = 0; - while (true) { - if (!(i$1 < f.$length)) { break; } - if (!((i$1 === 1))) { - _key$1 = ((i$1 < 0 || i$1 >= f.$length) ? ($throwRuntimeError("index out of range"), undefined) : f.$array[f.$offset + i$1]); (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: port }; - } - i$1 = i$1 + (1) >> 0; - } - _r$4 = file$1.readLine(); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$6 = _r$4; - line = _tuple$6[0]; - ok = _tuple$6[1]; - $s = 6; continue; - case 7: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: readServices, $c: true, $r, _entry, _key, _key$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, err, f, file$1, i, i$1, j, line, m, netw, ok, ok$1, ok1, port, portnet, $s, $deferred};return $f; } } - }; - goLookupPort = function(network, service) { - var {_tuple, err, network, port, service, $s, $r, $c} = $restore(this, {network, service}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - port = 0; - err = $ifaceNil; - $r = onceReadServices.Do(readServices); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = lookupPortMap(network, service); - port = _tuple[0]; - err = _tuple[1]; - $s = -1; return [port, err]; - /* */ } return; } var $f = {$blk: goLookupPort, $c: true, $r, _tuple, err, network, port, service, $s};return $f; - }; - parsePort = function(service) { - var _i, _ref, _rune, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, n, needsLookup, neg, nn, port, service; - port = 0; - needsLookup = false; - if (service === "") { - _tmp = 0; - _tmp$1 = false; - port = _tmp; - needsLookup = _tmp$1; - return [port, needsLookup]; - } - neg = false; - if (service.charCodeAt(0) === 43) { - service = $substring(service, 1); - } else if (service.charCodeAt(0) === 45) { - neg = true; - service = $substring(service, 1); - } - n = 0; - _ref = service; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - d = _rune[0]; - if (48 <= d && d <= 57) { - d = d - (48) >> 0; - } else { - _tmp$2 = 0; - _tmp$3 = true; - port = _tmp$2; - needsLookup = _tmp$3; - return [port, needsLookup]; - } - if (n >= 1073741824) { - n = 4294967295; - break; - } - n = $imul(n, (10)) >>> 0; - nn = n + ((d >>> 0)) >>> 0; - if (nn < n || nn > 4294967295) { - n = 4294967295; - break; - } - n = nn; - _i += _rune[1]; - } - if (!neg && n >= 1073741824) { - port = 1073741823; - } else if (neg && n > 1073741824) { - port = 1073741824; - } else { - port = ((n >> 0)); - } - if (neg) { - port = -port; - } - _tmp$4 = port; - _tmp$5 = false; - port = _tmp$4; - needsLookup = _tmp$5; - return [port, needsLookup]; - }; - file.ptr.prototype.close = function() { - var {_r, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r = f.file.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: file.ptr.prototype.close, $c: true, $r, _r, f, $s};return $f; - }; - file.prototype.close = function() { return this.$val.close(); }; - file.ptr.prototype.getLineFromData = function() { - var data, f, i, n, ok, s; - s = ""; - ok = false; - f = this; - data = f.data; - i = 0; - i = 0; - while (true) { - if (!(i < data.$length)) { break; } - if (((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]) === 10) { - s = ($bytesToString($subslice(data, 0, i))); - ok = true; - i = i + (1) >> 0; - n = data.$length - i >> 0; - $copySlice($subslice(data, 0), $subslice(data, i)); - f.data = $subslice(data, 0, n); - return [s, ok]; - } - i = i + (1) >> 0; - } - if (f.atEOF && f.data.$length > 0) { - s = ($bytesToString(data)); - f.data = $subslice(f.data, 0, 0); - ok = true; - } - return [s, ok]; - }; - file.prototype.getLineFromData = function() { return this.$val.getLineFromData(); }; - file.ptr.prototype.readLine = function() { - var {_r, _tuple, _tuple$1, _tuple$2, err, f, ln, n, ok, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = ""; - ok = false; - f = this; - _tuple = f.getLineFromData(); - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [s, ok]; - } - /* */ if (f.data.$length < f.data.$capacity) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.data.$length < f.data.$capacity) { */ case 1: - ln = f.data.$length; - _r = io.ReadFull(f.file, $subslice(f.data, ln, f.data.$capacity)); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - n = _tuple$1[0]; - err = _tuple$1[1]; - if (n >= 0) { - f.data = $subslice(f.data, 0, (ln + n >> 0)); - } - if ($interfaceIsEqual(err, io.EOF) || $interfaceIsEqual(err, io.ErrUnexpectedEOF)) { - f.atEOF = true; - } - /* } */ case 2: - _tuple$2 = f.getLineFromData(); - s = _tuple$2[0]; - ok = _tuple$2[1]; - $s = -1; return [s, ok]; - /* */ } return; } var $f = {$blk: file.ptr.prototype.readLine, $c: true, $r, _r, _tuple, _tuple$1, _tuple$2, err, f, ln, n, ok, s, $s};return $f; - }; - file.prototype.readLine = function() { return this.$val.readLine(); }; - open = function(name) { - var {_r, _tuple, err, fd, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = os.Open(name); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - fd = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$22.nil, err]; - } - $s = -1; return [new file.ptr(fd, $makeSlice(sliceType$1, 0, 65536), false), $ifaceNil]; - /* */ } return; } var $f = {$blk: open, $c: true, $r, _r, _tuple, err, fd, name, $s};return $f; - }; - countAnyByte = function(s, t) { - var i, n, s, t; - n = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (bytealg.IndexByteString(t, s.charCodeAt(i)) >= 0) { - n = n + (1) >> 0; - } - i = i + (1) >> 0; - } - return n; - }; - splitAtBytes = function(s, t) { - var a, i, last$1, n, s, t; - a = $makeSlice(sliceType, (1 + countAnyByte(s, t) >> 0)); - n = 0; - last$1 = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (bytealg.IndexByteString(t, s.charCodeAt(i)) >= 0) { - if (last$1 < i) { - ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = $substring(s, last$1, i)); - n = n + (1) >> 0; - } - last$1 = i + 1 >> 0; - } - i = i + (1) >> 0; - } - if (last$1 < s.length) { - ((n < 0 || n >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + n] = $substring(s, last$1)); - n = n + (1) >> 0; - } - return $subslice(a, 0, n); - }; - getFields = function(s) { - var s; - return splitAtBytes(s, " \r\t\n"); - }; - dtoi = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, i, n, ok, s; - n = 0; - i = 0; - ok = false; - n = 0; - i = 0; - while (true) { - if (!(i < s.length && 48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57)) { break; } - n = ($imul(n, 10)) + (((s.charCodeAt(i) - 48 << 24 >>> 24) >> 0)) >> 0; - if (n >= 16777215) { - _tmp = 16777215; - _tmp$1 = i; - _tmp$2 = false; - n = _tmp; - i = _tmp$1; - ok = _tmp$2; - return [n, i, ok]; - } - i = i + (1) >> 0; - } - if (i === 0) { - _tmp$3 = 0; - _tmp$4 = 0; - _tmp$5 = false; - n = _tmp$3; - i = _tmp$4; - ok = _tmp$5; - return [n, i, ok]; - } - _tmp$6 = n; - _tmp$7 = i; - _tmp$8 = true; - n = _tmp$6; - i = _tmp$7; - ok = _tmp$8; - return [n, i, ok]; - }; - xtoi = function(s) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, i, n, ok, s; - n = 0; - i = 0; - ok = false; - n = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (48 <= s.charCodeAt(i) && s.charCodeAt(i) <= 57) { - n = $imul(n, (16)); - n = n + ((((s.charCodeAt(i) - 48 << 24 >>> 24) >> 0))) >> 0; - } else if (97 <= s.charCodeAt(i) && s.charCodeAt(i) <= 102) { - n = $imul(n, (16)); - n = n + (((((s.charCodeAt(i) - 97 << 24 >>> 24) >> 0)) + 10 >> 0)) >> 0; - } else if (65 <= s.charCodeAt(i) && s.charCodeAt(i) <= 70) { - n = $imul(n, (16)); - n = n + (((((s.charCodeAt(i) - 65 << 24 >>> 24) >> 0)) + 10 >> 0)) >> 0; - } else { - break; - } - if (n >= 16777215) { - _tmp = 0; - _tmp$1 = i; - _tmp$2 = false; - n = _tmp; - i = _tmp$1; - ok = _tmp$2; - return [n, i, ok]; - } - i = i + (1) >> 0; - } - if (i === 0) { - _tmp$3 = 0; - _tmp$4 = i; - _tmp$5 = false; - n = _tmp$3; - i = _tmp$4; - ok = _tmp$5; - return [n, i, ok]; - } - _tmp$6 = n; - _tmp$7 = i; - _tmp$8 = true; - n = _tmp$6; - i = _tmp$7; - ok = _tmp$8; - return [n, i, ok]; - }; - appendHex = function(dst, i) { - var dst, i, j, v, y; - if (i === 0) { - return $append(dst, 48); - } - j = 7; - while (true) { - if (!(j >= 0)) { break; } - v = (y = ((($imul(j, 4)) >>> 0)), y < 32 ? (i >>> y) : 0) >>> 0; - if (v > 0) { - dst = $append(dst, "0123456789abcdef".charCodeAt(((v & 15) >>> 0))); - } - j = j - (1) >> 0; - } - return dst; - }; - last = function(s, b) { - var b, i, s; - i = s.length; - i = i - (1) >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (s.charCodeAt(i) === b) { - break; - } - i = i - (1) >> 0; - } - return i; - }; - lowerASCIIBytes = function(x) { - var _i, _ref, b, i, x; - _ref = x; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (65 <= b && b <= 90) { - ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = (((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i]) + (32) << 24 >>> 24)); - } - _i++; - } - }; - nextPort = function() { - var {$24r, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = portCounterMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(portCounterMu, "Unlock"), []]); - portCounter = portCounter + (1) >> 0; - $24r = portCounter; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: nextPort, $c: true, $r, $24r, $s, $deferred};return $f; } } - }; - socket = function(ctx, net, family, sotype, proto, ipv6only$1, laddr, raddr, ctrlFn) { - var {_entry, _key, _r, _r$1, _tuple, ctrlFn, ctx, family, fd, fd2, ipv6only$1, l, l$1, laddr, net, ok, proto, raddr, sotype, $s, $r, $c} = $restore(this, {ctx, net, family, sotype, proto, ipv6only$1, laddr, raddr, ctrlFn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = new netFD.ptr(ptrType$23.nil, ptrType$23.nil, $chanNil, new sync.Mutex.ptr(0, 0), false, false, family, sotype, net, $ifaceNil, $ifaceNil, new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), 0, new poll.pollDesc.ptr(ptrType$24.nil, false), ptrType$25.nil, 0, 0, false, false, false), false); - /* */ if (!($interfaceIsEqual(laddr, $ifaceNil)) && $interfaceIsEqual(raddr, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(laddr, $ifaceNil)) && $interfaceIsEqual(raddr, $ifaceNil)) { */ case 1: - l = $assertType(laddr, ptrType$15); - _r = nextPort(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - fd.laddr = new TCPAddr.ptr(l.IP, _r, l.Zone); - fd.listener = true; - fd.incoming = new $Chan(ptrType$3, 1024); - $r = listenersMu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _key = $assertType(fd.laddr, ptrType$15).String(); (listeners || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: fd }; - $r = listenersMu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [fd, $ifaceNil]; - /* } */ case 2: - _r$1 = nextPort(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - fd.laddr = new TCPAddr.ptr(IPv4(127, 0, 0, 1), _r$1, ""); - fd.raddr = raddr; - fd.r = newBufferedPipe(65536); - fd.w = newBufferedPipe(65536); - fd2 = new netFD.ptr(ptrType$23.nil, ptrType$23.nil, $chanNil, new sync.Mutex.ptr(0, 0), false, false, fd.family, sotype, net, $ifaceNil, $ifaceNil, new poll.FD.ptr(new poll.fdMutex.ptr(new $Uint64(0, 0), 0, 0), 0, new poll.pollDesc.ptr(ptrType$24.nil, false), ptrType$25.nil, 0, 0, false, false, false), false); - fd2.laddr = fd.raddr; - fd2.raddr = fd.laddr; - fd2.r = fd.w; - fd2.w = fd.r; - $r = listenersMu.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = listeners[$String.keyFor($assertType(fd.raddr, ptrType$15).String())], _entry !== undefined ? [_entry.v, true] : [ptrType$3.nil, false]); - l$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!ok) { */ case 8: - $r = listenersMu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ptrType$3.nil, new syscall.Errno(111)]; - /* } */ case 9: - $r = $send(l$1.incoming, fd2); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = listenersMu.Unlock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [fd, $ifaceNil]; - /* */ } return; } var $f = {$blk: socket, $c: true, $r, _entry, _key, _r, _r$1, _tuple, ctrlFn, ctx, family, fd, fd2, ipv6only$1, l, l$1, laddr, net, ok, proto, raddr, sotype, $s};return $f; - }; - netFD.ptr.prototype.Read = function(p) { - var {$24r, _r, _tuple, err, fd, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - fd = this; - _r = fd.r.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.Read, $c: true, $r, $24r, _r, _tuple, err, fd, n, p, $s};return $f; - }; - netFD.prototype.Read = function(p) { return this.$val.Read(p); }; - netFD.ptr.prototype.Write = function(p) { - var {$24r, _r, _tuple, err, fd, nn, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nn = 0; - err = $ifaceNil; - fd = this; - _r = fd.w.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - nn = _tuple[0]; - err = _tuple[1]; - $24r = [nn, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.Write, $c: true, $r, $24r, _r, _tuple, err, fd, nn, p, $s};return $f; - }; - netFD.prototype.Write = function(p) { return this.$val.Write(p); }; - netFD.ptr.prototype.Close = function() { - var {_r, fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.closedMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (fd.closed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (fd.closed) { */ case 2: - $r = fd.closedMu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 3: - fd.closed = true; - $r = fd.closedMu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (fd.listener) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (fd.listener) { */ case 6: - $r = listenersMu.Lock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = fd.laddr.String(); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - delete listeners[$String.keyFor(_r)]; - $close(fd.incoming); - fd.listener = false; - $r = listenersMu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 7: - $r = fd.r.Close(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fd.w.Close(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.Close, $c: true, $r, _r, fd, $s};return $f; - }; - netFD.prototype.Close = function() { return this.$val.Close(); }; - netFD.ptr.prototype.closeRead = function() { - var {fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.r.Close(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.closeRead, $c: true, $r, fd, $s};return $f; - }; - netFD.prototype.closeRead = function() { return this.$val.closeRead(); }; - netFD.ptr.prototype.closeWrite = function() { - var {fd, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.w.Close(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.closeWrite, $c: true, $r, fd, $s};return $f; - }; - netFD.prototype.closeWrite = function() { return this.$val.closeWrite(); }; - netFD.ptr.prototype.accept = function() { - var {_r, _tuple, c, fd, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - _r = $recv(fd.incoming); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [ptrType$3.nil, new syscall.Errno(22)]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.accept, $c: true, $r, _r, _tuple, c, fd, ok, $s};return $f; - }; - netFD.prototype.accept = function() { return this.$val.accept(); }; - netFD.ptr.prototype.SetDeadline = function(t) { - var {fd, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.r.SetReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fd.w.SetWriteDeadline($clone(t, time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.SetDeadline, $c: true, $r, fd, t, $s};return $f; - }; - netFD.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - netFD.ptr.prototype.SetReadDeadline = function(t) { - var {fd, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.r.SetReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.SetReadDeadline, $c: true, $r, fd, t, $s};return $f; - }; - netFD.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; - netFD.ptr.prototype.SetWriteDeadline = function(t) { - var {fd, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = this; - $r = fd.w.SetWriteDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: netFD.ptr.prototype.SetWriteDeadline, $c: true, $r, fd, t, $s};return $f; - }; - netFD.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; - newBufferedPipe = function(softLimit) { - var p, softLimit; - p = new bufferedPipe.ptr(softLimit, new sync.Mutex.ptr(0, 0), sliceType$1.nil, false, new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); - p.rCond.L = p.mu; - p.wCond.L = p.mu; - return p; - }; - bufferedPipe.ptr.prototype.Read = function(b) { - var {$24r, $24r$1, $24r$2, _r, _r$1, b, d, n, p, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - /* while (true) { */ case 2: - /* */ if (p.closed && (p.buf.$length === 0)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (p.closed && (p.buf.$length === 0)) { */ case 4: - $24r = [0, io.EOF]; - $s = 6; case 6: return $24r; - /* } */ case 5: - /* */ if (!$clone(p.rDeadline, time.Time).IsZero()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!$clone(p.rDeadline, time.Time).IsZero()) { */ case 7: - _r = time.Until($clone(p.rDeadline, time.Time)); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = _r; - /* */ if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { */ case 10: - $24r$1 = [0, new syscall.Errno(11)]; - $s = 12; case 12: return $24r$1; - /* } */ case 11: - _r$1 = time.AfterFunc(d, $methodVal(p.rCond, "Broadcast")); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 8: - if (p.buf.$length > 0) { - /* break; */ $s = 3; continue; - } - $r = p.rCond.Wait(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 2; continue; - case 3: - n = $copySlice(b, p.buf); - p.buf = $subslice(p.buf, n); - $r = p.wCond.Broadcast(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$2 = [n, $ifaceNil]; - $s = 16; case 16: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: bufferedPipe.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, b, d, n, p, $s, $deferred};return $f; } } - }; - bufferedPipe.prototype.Read = function(b) { return this.$val.Read(b); }; - bufferedPipe.ptr.prototype.Write = function(b) { - var {$24r, $24r$1, $24r$2, _r, _r$1, b, d, p, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - /* while (true) { */ case 2: - /* */ if (p.closed) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (p.closed) { */ case 4: - $24r = [0, new syscall.Errno(107)]; - $s = 6; case 6: return $24r; - /* } */ case 5: - /* */ if (!$clone(p.wDeadline, time.Time).IsZero()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!$clone(p.wDeadline, time.Time).IsZero()) { */ case 7: - _r = time.Until($clone(p.wDeadline, time.Time)); /* */ $s = 9; case 9: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - d = _r; - /* */ if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ((d.$high < 0 || (d.$high === 0 && d.$low <= 0))) { */ case 10: - $24r$1 = [0, new syscall.Errno(11)]; - $s = 12; case 12: return $24r$1; - /* } */ case 11: - _r$1 = time.AfterFunc(d, $methodVal(p.wCond, "Broadcast")); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 8: - if (p.buf.$length <= p.softLimit) { - /* break; */ $s = 3; continue; - } - $r = p.wCond.Wait(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 2; continue; - case 3: - p.buf = $appendSlice(p.buf, b); - $r = p.rCond.Broadcast(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$2 = [b.$length, $ifaceNil]; - $s = 16; case 16: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: bufferedPipe.ptr.prototype.Write, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, b, d, p, $s, $deferred};return $f; } } - }; - bufferedPipe.prototype.Write = function(b) { return this.$val.Write(b); }; - bufferedPipe.ptr.prototype.Close = function() { - var {p, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - p.closed = true; - $r = p.rCond.Broadcast(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = p.wCond.Broadcast(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: bufferedPipe.ptr.prototype.Close, $c: true, $r, p, $s, $deferred};return $f; } } - }; - bufferedPipe.prototype.Close = function() { return this.$val.Close(); }; - bufferedPipe.ptr.prototype.SetReadDeadline = function(t) { - var {p, t, $s, $deferred, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - time.Time.copy(p.rDeadline, t); - $r = p.rCond.Broadcast(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: bufferedPipe.ptr.prototype.SetReadDeadline, $c: true, $r, p, t, $s, $deferred};return $f; } } - }; - bufferedPipe.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; - bufferedPipe.ptr.prototype.SetWriteDeadline = function(t) { - var {p, t, $s, $deferred, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - time.Time.copy(p.wDeadline, t); - $r = p.wCond.Broadcast(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: bufferedPipe.ptr.prototype.SetWriteDeadline, $c: true, $r, p, t, $s, $deferred};return $f; } } - }; - bufferedPipe.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; - sysSocket = function(family, sotype, proto) { - var family, proto, sotype; - return [0, new syscall.Errno(38)]; - }; - netFD.ptr.prototype.readFrom = function(p) { - var _tmp, _tmp$1, _tmp$2, err, fd, n, p, sa; - n = 0; - sa = $ifaceNil; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = $ifaceNil; - _tmp$2 = new syscall.Errno(38); - n = _tmp; - sa = _tmp$1; - err = _tmp$2; - return [n, sa, err]; - }; - netFD.prototype.readFrom = function(p) { return this.$val.readFrom(p); }; - netFD.ptr.prototype.readFromInet4 = function(p, sa) { - var _tmp, _tmp$1, err, fd, n, p, sa; - n = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - netFD.prototype.readFromInet4 = function(p, sa) { return this.$val.readFromInet4(p, sa); }; - netFD.ptr.prototype.readFromInet6 = function(p, sa) { - var _tmp, _tmp$1, err, fd, n, p, sa; - n = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - netFD.prototype.readFromInet6 = function(p, sa) { return this.$val.readFromInet6(p, sa); }; - netFD.ptr.prototype.readMsg = function(p, oob, flags) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, err, fd, flags, n, oob, oobn, p, retflags, sa; - n = 0; - oobn = 0; - retflags = 0; - sa = $ifaceNil; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = $ifaceNil; - _tmp$4 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - retflags = _tmp$2; - sa = _tmp$3; - err = _tmp$4; - return [n, oobn, retflags, sa, err]; - }; - netFD.prototype.readMsg = function(p, oob, flags) { return this.$val.readMsg(p, oob, flags); }; - netFD.ptr.prototype.readMsgInet4 = function(p, oob, flags, sa) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, err, fd, flags, n, oob, oobn, p, retflags, sa; - n = 0; - oobn = 0; - retflags = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - retflags = _tmp$2; - err = _tmp$3; - return [n, oobn, retflags, err]; - }; - netFD.prototype.readMsgInet4 = function(p, oob, flags, sa) { return this.$val.readMsgInet4(p, oob, flags, sa); }; - netFD.ptr.prototype.readMsgInet6 = function(p, oob, flags, sa) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, err, fd, flags, n, oob, oobn, p, retflags, sa; - n = 0; - oobn = 0; - retflags = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - retflags = _tmp$2; - err = _tmp$3; - return [n, oobn, retflags, err]; - }; - netFD.prototype.readMsgInet6 = function(p, oob, flags, sa) { return this.$val.readMsgInet6(p, oob, flags, sa); }; - netFD.ptr.prototype.writeMsgInet4 = function(p, oob, sa) { - var _tmp, _tmp$1, _tmp$2, err, fd, n, oob, oobn, p, sa; - n = 0; - oobn = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - return [n, oobn, err]; - }; - netFD.prototype.writeMsgInet4 = function(p, oob, sa) { return this.$val.writeMsgInet4(p, oob, sa); }; - netFD.ptr.prototype.writeMsgInet6 = function(p, oob, sa) { - var _tmp, _tmp$1, _tmp$2, err, fd, n, oob, oobn, p, sa; - n = 0; - oobn = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - return [n, oobn, err]; - }; - netFD.prototype.writeMsgInet6 = function(p, oob, sa) { return this.$val.writeMsgInet6(p, oob, sa); }; - netFD.ptr.prototype.writeTo = function(p, sa) { - var _tmp, _tmp$1, err, fd, n, p, sa; - n = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - netFD.prototype.writeTo = function(p, sa) { return this.$val.writeTo(p, sa); }; - netFD.ptr.prototype.writeToInet4 = function(p, sa) { - var _tmp, _tmp$1, err, fd, n, p, sa; - n = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - netFD.prototype.writeToInet4 = function(p, sa) { return this.$val.writeToInet4(p, sa); }; - netFD.ptr.prototype.writeToInet6 = function(p, sa) { - var _tmp, _tmp$1, err, fd, n, p, sa; - n = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = new syscall.Errno(38); - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - netFD.prototype.writeToInet6 = function(p, sa) { return this.$val.writeToInet6(p, sa); }; - netFD.ptr.prototype.writeMsg = function(p, oob, sa) { - var _tmp, _tmp$1, _tmp$2, err, fd, n, oob, oobn, p, sa; - n = 0; - oobn = 0; - err = $ifaceNil; - fd = this; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(38); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - return [n, oobn, err]; - }; - netFD.prototype.writeMsg = function(p, oob, sa) { return this.$val.writeMsg(p, oob, sa); }; - netFD.ptr.prototype.dup = function() { - var _tmp, _tmp$1, err, f, fd; - f = ptrType$7.nil; - err = $ifaceNil; - fd = this; - _tmp = ptrType$7.nil; - _tmp$1 = new syscall.Errno(38); - f = _tmp; - err = _tmp$1; - return [f, err]; - }; - netFD.prototype.dup = function() { return this.$val.dup(); }; - conn.ptr.prototype.ok = function() { - var c; - c = this; - return !(c === ptrType$26.nil) && !(c.fd === ptrType$3.nil); - }; - conn.prototype.ok = function() { return this.$val.ok(); }; - conn.ptr.prototype.Read = function(b) { - var {_r, _tuple, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _r = c.fd.Read(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, io.EOF))) { - err = new OpError.ptr("read", c.fd.net, c.fd.laddr, c.fd.raddr, err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.Read, $c: true, $r, _r, _tuple, b, c, err, n, $s};return $f; - }; - conn.prototype.Read = function(b) { return this.$val.Read(b); }; - conn.ptr.prototype.Write = function(b) { - var {_r, _tuple, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _r = c.fd.Write(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.fd.net, c.fd.laddr, c.fd.raddr, err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.Write, $c: true, $r, _r, _tuple, b, c, err, n, $s};return $f; - }; - conn.prototype.Write = function(b) { return this.$val.Write(b); }; - conn.ptr.prototype.Close = function() { - var {_r, c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("close", c.fd.net, c.fd.laddr, c.fd.raddr, err); - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.Close, $c: true, $r, _r, c, err, $s};return $f; - }; - conn.prototype.Close = function() { return this.$val.Close(); }; - conn.ptr.prototype.LocalAddr = function() { - var c; - c = this; - if (!c.ok()) { - return $ifaceNil; - } - return c.fd.laddr; - }; - conn.prototype.LocalAddr = function() { return this.$val.LocalAddr(); }; - conn.ptr.prototype.RemoteAddr = function() { - var c; - c = this; - if (!c.ok()) { - return $ifaceNil; - } - return c.fd.raddr; - }; - conn.prototype.RemoteAddr = function() { return this.$val.RemoteAddr(); }; - conn.ptr.prototype.SetDeadline = function(t) { - var {_r, c, err, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.SetDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.SetDeadline, $c: true, $r, _r, c, err, t, $s};return $f; - }; - conn.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - conn.ptr.prototype.SetReadDeadline = function(t) { - var {_r, c, err, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.SetReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.SetReadDeadline, $c: true, $r, _r, c, err, t, $s};return $f; - }; - conn.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; - conn.ptr.prototype.SetWriteDeadline = function(t) { - var {_r, c, err, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.ok()) { - $s = -1; return new syscall.Errno(22); - } - _r = c.fd.SetWriteDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.SetWriteDeadline, $c: true, $r, _r, c, err, t, $s};return $f; - }; - conn.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; - conn.ptr.prototype.SetReadBuffer = function(bytes) { - var bytes, c, err; - c = this; - if (!c.ok()) { - return new syscall.Errno(22); - } - err = setReadBuffer(c.fd, bytes); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); - } - return $ifaceNil; - }; - conn.prototype.SetReadBuffer = function(bytes) { return this.$val.SetReadBuffer(bytes); }; - conn.ptr.prototype.SetWriteBuffer = function(bytes) { - var bytes, c, err; - c = this; - if (!c.ok()) { - return new syscall.Errno(22); - } - err = setWriteBuffer(c.fd, bytes); - if (!($interfaceIsEqual(err, $ifaceNil))) { - return new OpError.ptr("set", c.fd.net, $ifaceNil, c.fd.laddr, err); - } - return $ifaceNil; - }; - conn.prototype.SetWriteBuffer = function(bytes) { return this.$val.SetWriteBuffer(bytes); }; - conn.ptr.prototype.File = function() { - var _tuple, c, err, f; - f = ptrType$7.nil; - err = $ifaceNil; - c = this; - _tuple = c.fd.dup(); - f = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("file", c.fd.net, c.fd.laddr, c.fd.raddr, err); - } - return [f, err]; - }; - conn.prototype.File = function() { return this.$val.File(); }; - mapErr = function(err) { - var _1, err; - _1 = err; - if ($interfaceIsEqual(_1, (context.Canceled))) { - return errCanceled; - } else if ($interfaceIsEqual(_1, (context.DeadlineExceeded))) { - return errTimeout; - } else { - return err; - } - }; - OpError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - OpError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - OpError.ptr.prototype.Error = function() { - var {_r, _r$1, _r$2, e, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - if (e === ptrType$17.nil) { - $s = -1; return ""; - } - s = e.Op; - if (!(e.Net === "")) { - s = s + (" " + e.Net); - } - /* */ if (!($interfaceIsEqual(e.Source, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(e.Source, $ifaceNil))) { */ case 1: - _r = e.Source.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - s = s + (" " + _r); - /* } */ case 2: - /* */ if (!($interfaceIsEqual(e.Addr, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(e.Addr, $ifaceNil))) { */ case 4: - if (!($interfaceIsEqual(e.Source, $ifaceNil))) { - s = s + ("->"); - } else { - s = s + (" "); - } - _r$1 = e.Addr.String(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - s = s + (_r$1); - /* } */ case 5: - _r$2 = e.Err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - s = s + (": " + _r$2); - $s = -1; return s; - /* */ } return; } var $f = {$blk: OpError.ptr.prototype.Error, $c: true, $r, _r, _r$1, _r$2, e, s, $s};return $f; - }; - OpError.prototype.Error = function() { return this.$val.Error(); }; - OpError.ptr.prototype.Timeout = function() { - var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, _v, _v$1, e, ne, ok, ok$1, ok$2, t, t$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _tuple = $assertType(e.Err, ptrType$18, true); - ne = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _tuple$1 = $assertType(ne.Err, timeout, true); - t = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (!(ok$1)) { _v = false; $s = 3; continue s; } - _r = t.Timeout(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 3: - $24r = _v; - $s = 5; case 5: return $24r; - /* } */ case 2: - _tuple$2 = $assertType(e.Err, timeout, true); - t$1 = _tuple$2[0]; - ok$2 = _tuple$2[1]; - if (!(ok$2)) { _v$1 = false; $s = 6; continue s; } - _r$1 = t$1.Timeout(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = _r$1; case 6: - $24r$1 = _v$1; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: OpError.ptr.prototype.Timeout, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, _v, _v$1, e, ne, ok, ok$1, ok$2, t, t$1, $s};return $f; - }; - OpError.prototype.Timeout = function() { return this.$val.Timeout(); }; - OpError.ptr.prototype.Temporary = function() { - var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, _v, _v$1, e, ne, ok, ok$1, ok$2, t, t$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - if (e.Op === "accept" && isConnError(e.Err)) { - $s = -1; return true; - } - _tuple = $assertType(e.Err, ptrType$18, true); - ne = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _tuple$1 = $assertType(ne.Err, temporary, true); - t = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (!(ok$1)) { _v = false; $s = 3; continue s; } - _r = t.Temporary(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 3: - $24r = _v; - $s = 5; case 5: return $24r; - /* } */ case 2: - _tuple$2 = $assertType(e.Err, temporary, true); - t$1 = _tuple$2[0]; - ok$2 = _tuple$2[1]; - if (!(ok$2)) { _v$1 = false; $s = 6; continue s; } - _r$1 = t$1.Temporary(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v$1 = _r$1; case 6: - $24r$1 = _v$1; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: OpError.ptr.prototype.Temporary, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, _v, _v$1, e, ne, ok, ok$1, ok$2, t, t$1, $s};return $f; - }; - OpError.prototype.Temporary = function() { return this.$val.Temporary(); }; - ParseError.ptr.prototype.Error = function() { - var e; - e = this; - return "invalid " + e.Type + ": " + e.Text; - }; - ParseError.prototype.Error = function() { return this.$val.Error(); }; - ParseError.ptr.prototype.Timeout = function() { - var e; - e = this; - return false; - }; - ParseError.prototype.Timeout = function() { return this.$val.Timeout(); }; - ParseError.ptr.prototype.Temporary = function() { - var e; - e = this; - return false; - }; - ParseError.prototype.Temporary = function() { return this.$val.Temporary(); }; - AddrError.ptr.prototype.Error = function() { - var e, s; - e = this; - if (e === ptrType$27.nil) { - return ""; - } - s = e.Err; - if (!(e.Addr === "")) { - s = "address " + e.Addr + ": " + s; - } - return s; - }; - AddrError.prototype.Error = function() { return this.$val.Error(); }; - AddrError.ptr.prototype.Timeout = function() { - var e; - e = this; - return false; - }; - AddrError.prototype.Timeout = function() { return this.$val.Timeout(); }; - AddrError.ptr.prototype.Temporary = function() { - var e; - e = this; - return false; - }; - AddrError.prototype.Temporary = function() { return this.$val.Temporary(); }; - UnknownNetworkError.prototype.Error = function() { - var e; - e = this.$val; - return "unknown network " + (e); - }; - $ptrType(UnknownNetworkError).prototype.Error = function() { return new UnknownNetworkError(this.$get()).Error(); }; - UnknownNetworkError.prototype.Timeout = function() { - var e; - e = this.$val; - return false; - }; - $ptrType(UnknownNetworkError).prototype.Timeout = function() { return new UnknownNetworkError(this.$get()).Timeout(); }; - UnknownNetworkError.prototype.Temporary = function() { - var e; - e = this.$val; - return false; - }; - $ptrType(UnknownNetworkError).prototype.Temporary = function() { return new UnknownNetworkError(this.$get()).Temporary(); }; - timeoutError.ptr.prototype.Error = function() { - var e; - e = this; - return "i/o timeout"; - }; - timeoutError.prototype.Error = function() { return this.$val.Error(); }; - timeoutError.ptr.prototype.Timeout = function() { - var e; - e = this; - return true; - }; - timeoutError.prototype.Timeout = function() { return this.$val.Timeout(); }; - timeoutError.ptr.prototype.Temporary = function() { - var e; - e = this; - return true; - }; - timeoutError.prototype.Temporary = function() { return this.$val.Temporary(); }; - DNSError.ptr.prototype.Error = function() { - var e, s; - e = this; - if (e === ptrType$28.nil) { - return ""; - } - s = "lookup " + e.Name; - if (!(e.Server === "")) { - s = s + (" on " + e.Server); - } - s = s + (": " + e.Err); - return s; - }; - DNSError.prototype.Error = function() { return this.$val.Error(); }; - DNSError.ptr.prototype.Timeout = function() { - var e; - e = this; - return e.IsTimeout; - }; - DNSError.prototype.Timeout = function() { return this.$val.Timeout(); }; - DNSError.ptr.prototype.Temporary = function() { - var e; - e = this; - return e.IsTimeout || e.IsTemporary; - }; - DNSError.prototype.Temporary = function() { return this.$val.Temporary(); }; - genericReadFrom = function(w, r) { - var {$24r, _r, _tuple, err, n, r, w, x, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - _r = io.Copy((x = new writerOnly.ptr(w), new x.constructor.elem(x)), r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: genericReadFrom, $c: true, $r, $24r, _r, _tuple, err, n, r, w, x, $s};return $f; - }; - HardwareAddr.prototype.String = function() { - var _i, _ref, a, b, buf, i; - a = this; - if (a.$length === 0) { - return ""; - } - buf = $makeSlice(sliceType$1, 0, (($imul(a.$length, 3)) - 1 >> 0)); - _ref = a; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (i > 0) { - buf = $append(buf, 58); - } - buf = $append(buf, "0123456789abcdef".charCodeAt((b >>> 4 << 24 >>> 24))); - buf = $append(buf, "0123456789abcdef".charCodeAt(((b & 15) >>> 0))); - _i++; - } - return ($bytesToString(buf)); - }; - $ptrType(HardwareAddr).prototype.String = function() { return this.$get().String(); }; - lookupProtocol = function(ctx, name) { - var _tuple, ctx, err, name, proto; - proto = 0; - err = $ifaceNil; - _tuple = lookupProtocolMap(name); - proto = _tuple[0]; - err = _tuple[1]; - return [proto, err]; - }; - Resolver.ptr.prototype.lookupHost = function(ctx, host) { - var _tmp, _tmp$1, addrs, ctx, err, host; - addrs = sliceType.nil; - err = $ifaceNil; - _tmp = sliceType.nil; - _tmp$1 = new syscall.Errno(92); - addrs = _tmp; - err = _tmp$1; - return [addrs, err]; - }; - Resolver.prototype.lookupHost = function(ctx, host) { return this.$val.lookupHost(ctx, host); }; - Resolver.ptr.prototype.lookupIP = function(ctx, network, host) { - var _tmp, _tmp$1, addrs, ctx, err, host, network; - addrs = sliceType$3.nil; - err = $ifaceNil; - _tmp = sliceType$3.nil; - _tmp$1 = new syscall.Errno(92); - addrs = _tmp; - err = _tmp$1; - return [addrs, err]; - }; - Resolver.prototype.lookupIP = function(ctx, network, host) { return this.$val.lookupIP(ctx, network, host); }; - Resolver.ptr.prototype.lookupPort = function(ctx, network, service) { - var {$24r, _r, _tuple, ctx, err, network, port, service, $s, $r, $c} = $restore(this, {ctx, network, service}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - port = 0; - err = $ifaceNil; - _r = goLookupPort(network, service); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - port = _tuple[0]; - err = _tuple[1]; - $24r = [port, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.lookupPort, $c: true, $r, $24r, _r, _tuple, ctx, err, network, port, service, $s};return $f; - }; - Resolver.prototype.lookupPort = function(ctx, network, service) { return this.$val.lookupPort(ctx, network, service); }; - Resolver.ptr.prototype.lookupCNAME = function(ctx, name) { - var _tmp, _tmp$1, cname, ctx, err, name; - cname = ""; - err = $ifaceNil; - _tmp = ""; - _tmp$1 = new syscall.Errno(92); - cname = _tmp; - err = _tmp$1; - return [cname, err]; - }; - Resolver.prototype.lookupCNAME = function(ctx, name) { return this.$val.lookupCNAME(ctx, name); }; - Resolver.ptr.prototype.lookupSRV = function(ctx, service, proto, name) { - var _tmp, _tmp$1, _tmp$2, cname, ctx, err, name, proto, service, srvs; - cname = ""; - srvs = sliceType$4.nil; - err = $ifaceNil; - _tmp = ""; - _tmp$1 = sliceType$4.nil; - _tmp$2 = new syscall.Errno(92); - cname = _tmp; - srvs = _tmp$1; - err = _tmp$2; - return [cname, srvs, err]; - }; - Resolver.prototype.lookupSRV = function(ctx, service, proto, name) { return this.$val.lookupSRV(ctx, service, proto, name); }; - Resolver.ptr.prototype.lookupMX = function(ctx, name) { - var _tmp, _tmp$1, ctx, err, mxs, name; - mxs = sliceType$5.nil; - err = $ifaceNil; - _tmp = sliceType$5.nil; - _tmp$1 = new syscall.Errno(92); - mxs = _tmp; - err = _tmp$1; - return [mxs, err]; - }; - Resolver.prototype.lookupMX = function(ctx, name) { return this.$val.lookupMX(ctx, name); }; - Resolver.ptr.prototype.lookupNS = function(ctx, name) { - var _tmp, _tmp$1, ctx, err, name, nss; - nss = sliceType$6.nil; - err = $ifaceNil; - _tmp = sliceType$6.nil; - _tmp$1 = new syscall.Errno(92); - nss = _tmp; - err = _tmp$1; - return [nss, err]; - }; - Resolver.prototype.lookupNS = function(ctx, name) { return this.$val.lookupNS(ctx, name); }; - Resolver.ptr.prototype.lookupTXT = function(ctx, name) { - var _tmp, _tmp$1, ctx, err, name, txts; - txts = sliceType.nil; - err = $ifaceNil; - _tmp = sliceType.nil; - _tmp$1 = new syscall.Errno(92); - txts = _tmp; - err = _tmp$1; - return [txts, err]; - }; - Resolver.prototype.lookupTXT = function(ctx, name) { return this.$val.lookupTXT(ctx, name); }; - Resolver.ptr.prototype.lookupAddr = function(ctx, addr) { - var _tmp, _tmp$1, addr, ctx, err, ptrs; - ptrs = sliceType.nil; - err = $ifaceNil; - _tmp = sliceType.nil; - _tmp$1 = new syscall.Errno(92); - ptrs = _tmp; - err = _tmp$1; - return [ptrs, err]; - }; - Resolver.prototype.lookupAddr = function(ctx, addr) { return this.$val.lookupAddr(ctx, addr); }; - lookupProtocolMap = function(name) { - var _entry, _tuple, found, lowerProtocol, n, name, proto; - lowerProtocol = arrayType$2.zero(); - n = $copyString(new sliceType$1(lowerProtocol), name); - lowerASCIIBytes($subslice(new sliceType$1(lowerProtocol), 0, n)); - _tuple = (_entry = protocols[$String.keyFor(($bytesToString($subslice(new sliceType$1(lowerProtocol), 0, n))))], _entry !== undefined ? [_entry.v, true] : [0, false]); - proto = _tuple[0]; - found = _tuple[1]; - if (!found || !((n === name.length))) { - return [0, new AddrError.ptr("unknown IP protocol specified", name)]; - } - return [proto, $ifaceNil]; - }; - lookupPortMap = function(network, service) { - var _1, _entry, _entry$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, error, lowerService, m, n, network, ok, ok$1, port, port$1, service; - port = 0; - error = $ifaceNil; - _1 = network; - if (_1 === ("tcp4") || _1 === ("tcp6")) { - network = "tcp"; - } else if (_1 === ("udp4") || _1 === ("udp6")) { - network = "udp"; - } - _tuple = (_entry = services[$String.keyFor(network)], _entry !== undefined ? [_entry.v, true] : [false, false]); - m = _tuple[0]; - ok = _tuple[1]; - if (ok) { - lowerService = arrayType$2.zero(); - n = $copyString(new sliceType$1(lowerService), service); - lowerASCIIBytes($subslice(new sliceType$1(lowerService), 0, n)); - _tuple$1 = (_entry$1 = m[$String.keyFor(($bytesToString($subslice(new sliceType$1(lowerService), 0, n))))], _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]); - port$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1 && (n === service.length)) { - _tmp = port$1; - _tmp$1 = $ifaceNil; - port = _tmp; - error = _tmp$1; - return [port, error]; - } - } - _tmp$2 = 0; - _tmp$3 = new AddrError.ptr("unknown port", network + "/" + service); - port = _tmp$2; - error = _tmp$3; - return [port, error]; - }; - Resolver.ptr.prototype.getLookupGroup = function() { - var r; - r = this; - if (r === ptrType$9.nil) { - return $pkg.DefaultResolver.lookupGroup; - } - return r.lookupGroup; - }; - Resolver.prototype.getLookupGroup = function() { return this.$val.getLookupGroup(); }; - Resolver.ptr.prototype.LookupHost = function(ctx, host) { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, addrs, ctx, err, host, ip, r, $s, $r, $c} = $restore(this, {ctx, host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addrs = sliceType.nil; - err = $ifaceNil; - r = this; - /* */ if (host === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (host === "") { */ case 1: - _tmp = sliceType.nil; - _r = errNoSuchHost.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$1 = new DNSError.ptr(_r, host, "", false, false, true); - addrs = _tmp; - err = _tmp$1; - $24r = [addrs, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _tuple = parseIPZone(host); - ip = _tuple[0]; - if (!(ip === IP.nil)) { - _tmp$2 = new sliceType([host]); - _tmp$3 = $ifaceNil; - addrs = _tmp$2; - err = _tmp$3; - $s = -1; return [addrs, err]; - } - _tuple$1 = r.lookupHost(ctx, host); - addrs = _tuple$1[0]; - err = _tuple$1[1]; - $s = -1; return [addrs, err]; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.LookupHost, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, addrs, ctx, err, host, ip, r, $s};return $f; - }; - Resolver.prototype.LookupHost = function(ctx, host) { return this.$val.LookupHost(ctx, host); }; - Resolver.ptr.prototype.LookupIPAddr = function(ctx, host) { - var {$24r, _r, ctx, host, r, $s, $r, $c} = $restore(this, {ctx, host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.lookupIPAddr(ctx, "ip", host); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.LookupIPAddr, $c: true, $r, $24r, _r, ctx, host, r, $s};return $f; - }; - Resolver.prototype.LookupIPAddr = function(ctx, host) { return this.$val.LookupIPAddr(ctx, host); }; - Resolver.ptr.prototype.LookupIP = function(ctx, network, host) { - var {_1, _i, _r, _ref, _tuple, _tuple$1, addr, addrs, afnet, ctx, err, host, ips, network, r, $s, $r, $c} = $restore(this, {ctx, network, host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _tuple = parseNetwork(ctx, network, false); - afnet = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$7.nil, err]; - } - _1 = afnet; - if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { - } else { - $s = -1; return [sliceType$7.nil, new UnknownNetworkError((network))]; - } - _r = r.internetAddrList(ctx, afnet, host); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - addrs = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$7.nil, err]; - } - ips = $makeSlice(sliceType$7, 0, addrs.$length); - _ref = addrs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - addr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ips = $append(ips, $assertType(addr, ptrType$32).IP); - _i++; - } - $s = -1; return [ips, $ifaceNil]; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.LookupIP, $c: true, $r, _1, _i, _r, _ref, _tuple, _tuple$1, addr, addrs, afnet, ctx, err, host, ips, network, r, $s};return $f; - }; - Resolver.prototype.LookupIP = function(ctx, network, host) { return this.$val.LookupIP(ctx, network, host); }; - Resolver.ptr.prototype.LookupNetIP = function(ctx, network, host) { - var {_i, _r, _ref, _tuple, _tuple$1, a, ctx, err, host, ip, ips, network, ok, r, ret, $s, $r, $c} = $restore(this, {ctx, network, host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.LookupIP(ctx, network, host); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - ips = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$8.nil, err]; - } - ret = $makeSlice(sliceType$8, 0, ips.$length); - _ref = ips; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - ip = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _tuple$1 = netip.AddrFromSlice($convertSliceType(ip, sliceType$1)); - a = $clone(_tuple$1[0], netip.Addr); - ok = _tuple$1[1]; - if (ok) { - ret = $append(ret, a); - } - _i++; - } - $s = -1; return [ret, $ifaceNil]; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.LookupNetIP, $c: true, $r, _i, _r, _ref, _tuple, _tuple$1, a, ctx, err, host, ip, ips, network, ok, r, ret, $s};return $f; - }; - Resolver.prototype.LookupNetIP = function(ctx, network, host) { return this.$val.LookupNetIP(ctx, network, host); }; - onlyValuesCtx.ptr.prototype.Value = function(key) { - var {$24r, _r, _r$1, _selection, key, ovc, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ovc = this; - _r = ovc.lookupValues.Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _selection = $select([[_r], []]); - /* */ if (_selection[0] === 0) { $s = 2; continue; } - /* */ if (_selection[0] === 1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_selection[0] === 0) { */ case 2: - $s = -1; return $ifaceNil; - /* } else if (_selection[0] === 1) { */ case 3: - _r$1 = ovc.lookupValues.Value(key); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* } */ case 4: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: onlyValuesCtx.ptr.prototype.Value, $c: true, $r, $24r, _r, _r$1, _selection, key, ovc, $s};return $f; - }; - onlyValuesCtx.prototype.Value = function(key) { return this.$val.Value(key); }; - withUnexpiredValuesPreserved = function(lookupCtx) { - var lookupCtx; - return new onlyValuesCtx.ptr(context.Background(), lookupCtx); - }; - Resolver.ptr.prototype.lookupIPAddr = function(ctx, network, host) { - var {$24r, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, addrs, alt, called, ch, ctx, ctxErr, err, err$1, host, ip, isTimeout, lookupGroupCancel, lookupGroupCtx, lookupKey, network, ok, ok$1, r, r$1, resolverFunc, terr, trace, x, x$1, zone, $s, $r, $c} = $restore(this, {ctx, network, host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ch = [ch]; - host = [host]; - lookupGroupCancel = [lookupGroupCancel]; - lookupGroupCtx = [lookupGroupCtx]; - network = [network]; - resolverFunc = [resolverFunc]; - r = this; - /* */ if (host[0] === "") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (host[0] === "") { */ case 1: - _r = errNoSuchHost.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [sliceType$3.nil, new DNSError.ptr(_r, host[0], "", false, false, true)]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _tuple = parseIPZone(host[0]); - ip = _tuple[0]; - zone = _tuple[1]; - if (!(ip === IP.nil)) { - $s = -1; return [new sliceType$3([new IPAddr.ptr(ip, zone)]), $ifaceNil]; - } - _r$1 = ctx.Value((x = new nettrace.TraceKey.ptr(), new x.constructor.elem(x))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = $assertType(_r$1, ptrType$33, true); - trace = _tuple$1[0]; - /* */ if (!(trace === ptrType$33.nil) && !(trace.DNSStart === $throwNilPointerError)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(trace === ptrType$33.nil) && !(trace.DNSStart === $throwNilPointerError)) { */ case 6: - $r = trace.DNSStart(host[0]); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - resolverFunc[0] = $methodVal(r, "lookupIP"); - _r$2 = ctx.Value((x$1 = new nettrace.LookupIPAltResolverKey.ptr(), new x$1.constructor.elem(x$1))); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = $assertType(_r$2, funcType, true); - alt = _tuple$2[0]; - if (!(alt === $throwNilPointerError)) { - resolverFunc[0] = alt; - } - _r$3 = context.WithCancel(withUnexpiredValuesPreserved(ctx)); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$3 = _r$3; - lookupGroupCtx[0] = _tuple$3[0]; - lookupGroupCancel[0] = _tuple$3[1]; - lookupKey = network[0] + "\x00" + host[0]; - dnsWaitGroup.Add(1); - _r$4 = r.getLookupGroup().DoChan(lookupKey, (function(ch, host, lookupGroupCancel, lookupGroupCtx, network, resolverFunc) { return function $b() { - var {$24r$1, _r$4, _returncast, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $deferred.push([$methodVal(dnsWaitGroup, "Done"), []]); - _r$4 = testHookLookupIP(lookupGroupCtx[0], resolverFunc[0], network[0], host[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _returncast = _r$4; - $24r$1 = [_returncast[0], _returncast[1]]; - $s = 2; case 2: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, $24r$1, _r$4, _returncast, $s, $deferred};return $f; } } - }; })(ch, host, lookupGroupCancel, lookupGroupCtx, network, resolverFunc)); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$4 = _r$4; - ch[0] = _tuple$4[0]; - called = _tuple$4[1]; - if (!called) { - dnsWaitGroup.Done(); - } - _r$5 = ctx.Done(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $select([[_r$5], [ch[0]]]); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _selection = _r$6; - /* */ if (_selection[0] === 0) { $s = 14; continue; } - /* */ if (_selection[0] === 1) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_selection[0] === 0) { */ case 14: - _r$7 = r.getLookupGroup().ForgetUnshared(lookupKey); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_r$7) { */ case 17: - $r = lookupGroupCancel[0](); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 19; continue; - /* } else { */ case 18: - $go((function(ch, host, lookupGroupCancel, lookupGroupCtx, network, resolverFunc) { return function $b() { - var {_r$8, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$8 = $recv(ch[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8[0]; - $r = lookupGroupCancel[0](); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$8, $s};return $f; - }; })(ch, host, lookupGroupCancel, lookupGroupCtx, network, resolverFunc), []); - /* } */ case 19: - _r$8 = ctx.Err(); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - ctxErr = _r$8; - _r$9 = mapErr(ctxErr).Error(); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = new DNSError.ptr(_r$9, host[0], "", $interfaceIsEqual(ctxErr, context.DeadlineExceeded), false, false); - /* */ if (!(trace === ptrType$33.nil) && !(trace.DNSDone === $throwNilPointerError)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!(trace === ptrType$33.nil) && !(trace.DNSDone === $throwNilPointerError)) { */ case 24: - $r = trace.DNSDone(sliceType$9.nil, false, err); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - $s = -1; return [sliceType$3.nil, err]; - /* } else if (_selection[0] === 1) { */ case 15: - r$1 = $clone(_selection[1][0], singleflight.Result); - $r = lookupGroupCancel[0](); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err$1 = r$1.Err; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 28: - _tuple$5 = $assertType(err$1, ptrType$28, true); - ok = _tuple$5[1]; - /* */ if (!ok) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!ok) { */ case 30: - isTimeout = false; - /* */ if ($interfaceIsEqual(err$1, context.DeadlineExceeded)) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if ($interfaceIsEqual(err$1, context.DeadlineExceeded)) { */ case 32: - isTimeout = true; - $s = 34; continue; - /* } else { */ case 33: - _tuple$6 = $assertType(err$1, timeout, true); - terr = _tuple$6[0]; - ok$1 = _tuple$6[1]; - /* */ if (ok$1) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (ok$1) { */ case 35: - _r$10 = terr.Timeout(); /* */ $s = 37; case 37: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - isTimeout = _r$10; - /* } */ case 36: - /* } */ case 34: - _r$11 = err$1.Error(); /* */ $s = 38; case 38: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$1 = new DNSError.ptr(_r$11, host[0], "", isTimeout, false, false); - /* } */ case 31: - /* } */ case 29: - /* */ if (!(trace === ptrType$33.nil) && !(trace.DNSDone === $throwNilPointerError)) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (!(trace === ptrType$33.nil) && !(trace.DNSDone === $throwNilPointerError)) { */ case 39: - _tuple$7 = $assertType(r$1.Val, sliceType$3, true); - addrs = _tuple$7[0]; - $r = trace.DNSDone(ipAddrsEface(addrs), r$1.Shared, err$1); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 40: - $s = -1; return lookupIPReturn(r$1.Val, err$1, r$1.Shared); - /* } */ case 16: - $s = -1; return [sliceType$3.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.lookupIPAddr, $c: true, $r, $24r, _r, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, addrs, alt, called, ch, ctx, ctxErr, err, err$1, host, ip, isTimeout, lookupGroupCancel, lookupGroupCtx, lookupKey, network, ok, ok$1, r, r$1, resolverFunc, terr, trace, x, x$1, zone, $s};return $f; - }; - Resolver.prototype.lookupIPAddr = function(ctx, network, host) { return this.$val.lookupIPAddr(ctx, network, host); }; - lookupIPReturn = function(addrsi, err, shared) { - var addrs, addrsi, clone, err, shared; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [sliceType$3.nil, err]; - } - addrs = $assertType(addrsi, sliceType$3); - if (shared) { - clone = $makeSlice(sliceType$3, addrs.$length); - $copySlice(clone, addrs); - addrs = clone; - } - return [addrs, $ifaceNil]; - }; - ipAddrsEface = function(addrs) { - var _i, _ref, addrs, i, s, v; - s = $makeSlice(sliceType$9, addrs.$length); - _ref = addrs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), IPAddr); - ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i] = new v.constructor.elem(v)); - _i++; - } - return s; - }; - Resolver.ptr.prototype.LookupPort = function(ctx, network, service) { - var {_1, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, ctx, err, needsLookup, network, port, r, service, $s, $r, $c} = $restore(this, {ctx, network, service}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - port = 0; - err = $ifaceNil; - r = this; - _tuple = parsePort(service); - port = _tuple[0]; - needsLookup = _tuple[1]; - /* */ if (needsLookup) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (needsLookup) { */ case 1: - _1 = network; - if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6") || _1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { - } else if (_1 === ("")) { - network = "ip"; - } else { - _tmp = 0; - _tmp$1 = new AddrError.ptr("unknown network", network); - port = _tmp; - err = _tmp$1; - $s = -1; return [port, err]; - } - _r = r.lookupPort(ctx, network, service); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - port = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = 0; - _tmp$3 = err; - port = _tmp$2; - err = _tmp$3; - $s = -1; return [port, err]; - } - /* } */ case 2: - if (0 > port || port > 65535) { - _tmp$4 = 0; - _tmp$5 = new AddrError.ptr("invalid port", service); - port = _tmp$4; - err = _tmp$5; - $s = -1; return [port, err]; - } - _tmp$6 = port; - _tmp$7 = $ifaceNil; - port = _tmp$6; - err = _tmp$7; - $s = -1; return [port, err]; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.LookupPort, $c: true, $r, _1, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, ctx, err, needsLookup, network, port, r, service, $s};return $f; - }; - Resolver.prototype.LookupPort = function(ctx, network, service) { return this.$val.LookupPort(ctx, network, service); }; - Resolver.ptr.prototype.LookupCNAME = function(ctx, host) { - var _tuple, cname, ctx, err, host, r; - r = this; - _tuple = r.lookupCNAME(ctx, host); - cname = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return ["", err]; - } - if (!isDomainName(cname)) { - return ["", new DNSError.ptr(errMalformedDNSRecordsDetail, host, "", false, false, false)]; - } - return [cname, $ifaceNil]; - }; - Resolver.prototype.LookupCNAME = function(ctx, host) { return this.$val.LookupCNAME(ctx, host); }; - Resolver.ptr.prototype.LookupSRV = function(ctx, service, proto, name) { - var _i, _ref, _tuple, addr, addrs, cname, ctx, err, filteredAddrs, name, proto, r, service; - r = this; - _tuple = r.lookupSRV(ctx, service, proto, name); - cname = _tuple[0]; - addrs = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return ["", sliceType$4.nil, err]; - } - if (!(cname === "") && !isDomainName(cname)) { - return ["", sliceType$4.nil, new DNSError.ptr("SRV header name is invalid", name, "", false, false, false)]; - } - filteredAddrs = $makeSlice(sliceType$4, 0, addrs.$length); - _ref = addrs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - addr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (addr === ptrType$29.nil) { - _i++; - continue; - } - if (!isDomainName(addr.Target)) { - _i++; - continue; - } - filteredAddrs = $append(filteredAddrs, addr); - _i++; - } - if (!((addrs.$length === filteredAddrs.$length))) { - return [cname, filteredAddrs, new DNSError.ptr(errMalformedDNSRecordsDetail, name, "", false, false, false)]; - } - return [cname, filteredAddrs, $ifaceNil]; - }; - Resolver.prototype.LookupSRV = function(ctx, service, proto, name) { return this.$val.LookupSRV(ctx, service, proto, name); }; - Resolver.ptr.prototype.LookupMX = function(ctx, name) { - var _i, _ref, _tuple, ctx, err, filteredMX, mx, name, r, records; - r = this; - _tuple = r.lookupMX(ctx, name); - records = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [sliceType$5.nil, err]; - } - filteredMX = $makeSlice(sliceType$5, 0, records.$length); - _ref = records; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - mx = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (mx === ptrType$30.nil) { - _i++; - continue; - } - if (!isDomainName(mx.Host)) { - _i++; - continue; - } - filteredMX = $append(filteredMX, mx); - _i++; - } - if (!((records.$length === filteredMX.$length))) { - return [filteredMX, new DNSError.ptr(errMalformedDNSRecordsDetail, name, "", false, false, false)]; - } - return [filteredMX, $ifaceNil]; - }; - Resolver.prototype.LookupMX = function(ctx, name) { return this.$val.LookupMX(ctx, name); }; - Resolver.ptr.prototype.LookupNS = function(ctx, name) { - var _i, _ref, _tuple, ctx, err, filteredNS, name, ns, r, records; - r = this; - _tuple = r.lookupNS(ctx, name); - records = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [sliceType$6.nil, err]; - } - filteredNS = $makeSlice(sliceType$6, 0, records.$length); - _ref = records; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - ns = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (ns === ptrType$31.nil) { - _i++; - continue; - } - if (!isDomainName(ns.Host)) { - _i++; - continue; - } - filteredNS = $append(filteredNS, ns); - _i++; - } - if (!((records.$length === filteredNS.$length))) { - return [filteredNS, new DNSError.ptr(errMalformedDNSRecordsDetail, name, "", false, false, false)]; - } - return [filteredNS, $ifaceNil]; - }; - Resolver.prototype.LookupNS = function(ctx, name) { return this.$val.LookupNS(ctx, name); }; - Resolver.ptr.prototype.LookupTXT = function(ctx, name) { - var ctx, name, r; - r = this; - return r.lookupTXT(ctx, name); - }; - Resolver.prototype.LookupTXT = function(ctx, name) { return this.$val.LookupTXT(ctx, name); }; - Resolver.ptr.prototype.LookupAddr = function(ctx, addr) { - var _i, _ref, _tuple, addr, ctx, err, filteredNames, name, names, r; - r = this; - _tuple = r.lookupAddr(ctx, addr); - names = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return [sliceType.nil, err]; - } - filteredNames = $makeSlice(sliceType, 0, names.$length); - _ref = names; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - name = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (isDomainName(name)) { - filteredNames = $append(filteredNames, name); - } - _i++; - } - if (!((names.$length === filteredNames.$length))) { - return [filteredNames, new DNSError.ptr(errMalformedDNSRecordsDetail, addr, "", false, false, false)]; - } - return [filteredNames, $ifaceNil]; - }; - Resolver.prototype.LookupAddr = function(ctx, addr) { return this.$val.LookupAddr(ctx, addr); }; - ipStackCapabilities.ptr.prototype.probe = function() { - var {_1, _2, _i, _r, _r$1, _ref, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, i, p, probes, s, s$1, sa, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - _tuple = sysSocket(2, 1, 6); - s = _tuple[0]; - err = _tuple[1]; - _1 = err; - /* */ if ($interfaceIsEqual(_1, new syscall.Errno((97))) || $interfaceIsEqual(_1, new syscall.Errno((93)))) { $s = 2; continue; } - /* */ if ($interfaceIsEqual(_1, $ifaceNil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($interfaceIsEqual(_1, new syscall.Errno((97))) || $interfaceIsEqual(_1, new syscall.Errno((93)))) { */ case 2: - $s = 4; continue; - /* } else if ($interfaceIsEqual(_1, $ifaceNil)) { */ case 3: - _r = poll.CloseFunc(s); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - p.ipv4Enabled = true; - /* } */ case 4: - case 1: - probes = new sliceType$10([new structType$3.ptr(new TCPAddr.ptr(ParseIP("::1"), 0, ""), 1), new structType$3.ptr(new TCPAddr.ptr(IPv4(127, 0, 0, 1), 0, ""), 0)]); - _2 = "js"; - if (_2 === ("dragonfly") || _2 === ("openbsd")) { - probes = $subslice(probes, 0, 1); - } - _ref = probes; - _i = 0; - /* while (true) { */ case 6: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 7; continue; } - i = _i; - _tuple$1 = sysSocket(3, 1, 6); - s$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _i++; - /* continue; */ $s = 6; continue; - } - $deferred.push([poll.CloseFunc, [s$1]]); - syscall.SetsockoptInt(s$1, 41, 1, ((i < 0 || i >= probes.$length) ? ($throwRuntimeError("index out of range"), undefined) : probes.$array[probes.$offset + i]).value); - _r$1 = ((i < 0 || i >= probes.$length) ? ($throwRuntimeError("index out of range"), undefined) : probes.$array[probes.$offset + i]).laddr.sockaddr(3); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - sa = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _i++; - /* continue; */ $s = 6; continue; - } - err$2 = syscall.Bind(s$1, sa); - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _i++; - /* continue; */ $s = 6; continue; - } - if (i === 0) { - p.ipv6Enabled = true; - } else { - p.ipv4MappedIPv6Enabled = true; - } - _i++; - $s = 6; continue; - case 7: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ipStackCapabilities.ptr.prototype.probe, $c: true, $r, _1, _2, _i, _r, _r$1, _ref, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, i, p, probes, s, s$1, sa, $s, $deferred};return $f; } } - }; - ipStackCapabilities.prototype.probe = function() { return this.$val.probe(); }; - favoriteAddrFamily = function(network, laddr, raddr, mode) { - var {$24r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, family, ipv6only$1, laddr, mode, network, raddr, $s, $r, $c} = $restore(this, {network, laddr, raddr, mode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - family = 0; - ipv6only$1 = false; - _1 = network.charCodeAt((network.length - 1 >> 0)); - if (_1 === (52)) { - _tmp = 2; - _tmp$1 = false; - family = _tmp; - ipv6only$1 = _tmp$1; - $s = -1; return [family, ipv6only$1]; - } else if (_1 === (54)) { - _tmp$2 = 3; - _tmp$3 = true; - family = _tmp$2; - ipv6only$1 = _tmp$3; - $s = -1; return [family, ipv6only$1]; - } - if (!(mode === "listen")) { _v = false; $s = 3; continue s; } - if ($interfaceIsEqual(laddr, $ifaceNil)) { _v$1 = true; $s = 4; continue s; } - _r = laddr.isWildcard(); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v$1 = _r; case 4: - _v = _v$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$1 = supportsIPv4map(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (_r$1) { _v$2 = true; $s = 8; continue s; } - _r$2 = supportsIPv4(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$2 = !_r$2; case 8: - /* */ if (_v$2) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_v$2) { */ case 6: - _tmp$4 = 3; - _tmp$5 = false; - family = _tmp$4; - ipv6only$1 = _tmp$5; - $s = -1; return [family, ipv6only$1]; - /* } */ case 7: - if ($interfaceIsEqual(laddr, $ifaceNil)) { - _tmp$6 = 2; - _tmp$7 = false; - family = _tmp$6; - ipv6only$1 = _tmp$7; - $s = -1; return [family, ipv6only$1]; - } - _r$3 = laddr.family(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tmp$8 = _r$3; - _tmp$9 = false; - family = _tmp$8; - ipv6only$1 = _tmp$9; - $24r = [family, ipv6only$1]; - $s = 12; case 12: return $24r; - /* } */ case 2: - if ($interfaceIsEqual(laddr, $ifaceNil)) { _v$4 = true; $s = 16; continue s; } - _r$4 = laddr.family(); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v$4 = _r$4 === 2; case 16: - if (!(_v$4)) { _v$3 = false; $s = 15; continue s; } - if ($interfaceIsEqual(raddr, $ifaceNil)) { _v$5 = true; $s = 18; continue s; } - _r$5 = raddr.family(); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v$5 = _r$5 === 2; case 18: - _v$3 = _v$5; case 15: - /* */ if (_v$3) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_v$3) { */ case 13: - _tmp$10 = 2; - _tmp$11 = false; - family = _tmp$10; - ipv6only$1 = _tmp$11; - $s = -1; return [family, ipv6only$1]; - /* } */ case 14: - _tmp$12 = 3; - _tmp$13 = false; - family = _tmp$12; - ipv6only$1 = _tmp$13; - $s = -1; return [family, ipv6only$1]; - /* */ } return; } var $f = {$blk: favoriteAddrFamily, $c: true, $r, $24r, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _v, _v$1, _v$2, _v$3, _v$4, _v$5, family, ipv6only$1, laddr, mode, network, raddr, $s};return $f; - }; - internetSocket = function(ctx, net, laddr, raddr, sotype, proto, mode, ctrlFn) { - var {$24r, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _v, ctrlFn, ctx, err, family, fd, ipv6only$1, laddr, mode, net, proto, raddr, sotype, $s, $r, $c} = $restore(this, {ctx, net, laddr, raddr, sotype, proto, mode, ctrlFn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = ptrType$3.nil; - err = $ifaceNil; - if (!(false && mode === "dial")) { _v = false; $s = 3; continue s; } - _r = raddr.isWildcard(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - _r$1 = raddr.toLocal(net); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - raddr = _r$1; - /* } */ case 2: - _r$2 = favoriteAddrFamily(net, laddr, raddr, mode); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - family = _tuple[0]; - ipv6only$1 = _tuple[1]; - _r$3 = socket(ctx, net, family, sotype, proto, ipv6only$1, laddr, raddr, ctrlFn); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - fd = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [fd, err]; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: internetSocket, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _v, ctrlFn, ctx, err, family, fd, ipv6only$1, laddr, mode, net, proto, raddr, sotype, $s};return $f; - }; - ipToSockaddrInet4 = function(ip, port) { - var ip, ip4, port, sa; - if (ip.$length === 0) { - ip = $pkg.IPv4zero; - } - ip4 = ip.To4(); - if (ip4 === IP.nil) { - return [new syscall.SockaddrInet4.ptr(0, arrayType.zero()), new AddrError.ptr("non-IPv4 address", ip.String())]; - } - sa = new syscall.SockaddrInet4.ptr(port, arrayType.zero()); - $copySlice(new sliceType$1(sa.Addr), ip4); - return [sa, $ifaceNil]; - }; - ipToSockaddrInet6 = function(ip, port, zone) { - var {_r, ip, ip6, port, sa, zone, $s, $r, $c} = $restore(this, {ip, port, zone}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ((ip.$length === 0) || ip.Equal($pkg.IPv4zero)) { - ip = $pkg.IPv6zero; - } - ip6 = ip.To16(); - if (ip6 === IP.nil) { - $s = -1; return [new syscall.SockaddrInet6.ptr(0, 0, arrayType$1.zero()), new AddrError.ptr("non-IPv6 address", ip.String())]; - } - _r = zoneCache.index(zone); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - sa = new syscall.SockaddrInet6.ptr(port, ((_r >>> 0)), arrayType$1.zero()); - $copySlice(new sliceType$1(sa.Addr), ip6); - $s = -1; return [sa, $ifaceNil]; - /* */ } return; } var $f = {$blk: ipToSockaddrInet6, $c: true, $r, _r, ip, ip6, port, sa, zone, $s};return $f; - }; - ipToSockaddr = function(family, ip, port, zone) { - var {_1, _r, _tuple, _tuple$1, err, err$1, family, ip, port, sa, sa$1, zone, $s, $r, $c} = $restore(this, {family, ip, port, zone}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sa = [sa]; - sa$1 = [sa$1]; - _1 = family; - /* */ if (_1 === (2)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (2)) { */ case 2: - _tuple = ipToSockaddrInet4(ip, port); - sa[0] = $clone(_tuple[0], syscall.SockaddrInet4); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - $s = -1; return [sa[0], $ifaceNil]; - /* } else if (_1 === (3)) { */ case 3: - _r = ipToSockaddrInet6(ip, port, zone); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - sa$1[0] = $clone(_tuple$1[0], syscall.SockaddrInet6); - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$1]; - } - $s = -1; return [sa$1[0], $ifaceNil]; - /* } */ case 4: - case 1: - $s = -1; return [$ifaceNil, new AddrError.ptr("invalid address family", ip.String())]; - /* */ } return; } var $f = {$blk: ipToSockaddr, $c: true, $r, _1, _r, _tuple, _tuple$1, err, err$1, family, ip, port, sa, sa$1, zone, $s};return $f; - }; - addrPortToSockaddrInet4 = function(ap) { - var addr, ap, sa; - addr = $clone($clone(ap, netip.AddrPort).Addr(), netip.Addr); - if (!$clone(addr, netip.Addr).Is4()) { - return [new syscall.SockaddrInet4.ptr(0, arrayType.zero()), new AddrError.ptr("non-IPv4 address", $clone(addr, netip.Addr).String())]; - } - sa = new syscall.SockaddrInet4.ptr((($clone(ap, netip.AddrPort).Port() >> 0)), $clone($clone(addr, netip.Addr).As4(), arrayType)); - return [sa, $ifaceNil]; - }; - addrPortToSockaddrInet6 = function(ap) { - var {_r, addr, ap, sa, $s, $r, $c} = $restore(this, {ap}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addr = $clone($clone(ap, netip.AddrPort).Addr(), netip.Addr); - if (!$clone(addr, netip.Addr).IsValid()) { - $s = -1; return [new syscall.SockaddrInet6.ptr(0, 0, arrayType$1.zero()), new AddrError.ptr("non-IPv6 address", $clone(addr, netip.Addr).String())]; - } - _r = zoneCache.index($clone(addr, netip.Addr).Zone()); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - sa = new syscall.SockaddrInet6.ptr((($clone(ap, netip.AddrPort).Port() >> 0)), ((_r >>> 0)), $clone($clone(addr, netip.Addr).As16(), arrayType$1)); - $s = -1; return [sa, $ifaceNil]; - /* */ } return; } var $f = {$blk: addrPortToSockaddrInet6, $c: true, $r, _r, addr, ap, sa, $s};return $f; - }; - supportsIPv4 = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = ipStackCaps.Once.Do($methodVal(ipStackCaps, "probe")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return ipStackCaps.ipv4Enabled; - /* */ } return; } var $f = {$blk: supportsIPv4, $c: true, $r, $s};return $f; - }; - supportsIPv4map = function() { - var {_1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = "js"; - if (_1 === ("dragonfly") || _1 === ("openbsd")) { - $s = -1; return false; - } - $r = ipStackCaps.Once.Do($methodVal(ipStackCaps, "probe")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return ipStackCaps.ipv4MappedIPv6Enabled; - /* */ } return; } var $f = {$blk: supportsIPv4map, $c: true, $r, _1, $s};return $f; - }; - isIPv4 = function(addr) { - var _ref, addr, addr$1, addr$2, addr$3; - _ref = addr; - if ($assertType(_ref, ptrType$15, true)[1]) { - addr$1 = _ref.$val; - return !(addr$1.IP.To4() === IP.nil); - } else if ($assertType(_ref, ptrType$12, true)[1]) { - addr$2 = _ref.$val; - return !(addr$2.IP.To4() === IP.nil); - } else if ($assertType(_ref, ptrType$32, true)[1]) { - addr$3 = _ref.$val; - return !(addr$3.IP.To4() === IP.nil); - } - return false; - }; - addrList.prototype.first = function(strategy) { - var {_i, _r, _ref, addr, addrs, strategy, $s, $r, $c} = $restore(this, {strategy}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addrs = this; - _ref = addrs; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - addr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = strategy(addr); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (_r) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r) { */ case 3: - $s = -1; return addr; - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return (0 >= addrs.$length ? ($throwRuntimeError("index out of range"), undefined) : addrs.$array[addrs.$offset + 0]); - /* */ } return; } var $f = {$blk: addrList.prototype.first, $c: true, $r, _i, _r, _ref, addr, addrs, strategy, $s};return $f; - }; - $ptrType(addrList).prototype.first = function(strategy) { return this.$get().first(strategy); }; - addrList.prototype.partition = function(strategy) { - var {_i, _r, _ref, addr, addrs, fallbacks, i, label, primaries, primaryLabel, strategy, $s, $r, $c} = $restore(this, {strategy}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - primaries = addrList.nil; - fallbacks = addrList.nil; - addrs = this; - primaryLabel = false; - _ref = addrs; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - addr = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = strategy(addr); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - label = _r; - if ((i === 0) || label === primaryLabel) { - primaryLabel = label; - primaries = $append(primaries, addr); - } else { - fallbacks = $append(fallbacks, addr); - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return [primaries, fallbacks]; - /* */ } return; } var $f = {$blk: addrList.prototype.partition, $c: true, $r, _i, _r, _ref, addr, addrs, fallbacks, i, label, primaries, primaryLabel, strategy, $s};return $f; - }; - $ptrType(addrList).prototype.partition = function(strategy) { return this.$get().partition(strategy); }; - filterAddrList = function(filter, ips, inetaddr, originalAddr) { - var {$24r, _i, _r, _r$1, _r$2, _ref, _v, addrs, filter, inetaddr, ip, ips, originalAddr, $s, $r, $c} = $restore(this, {filter, ips, inetaddr, originalAddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addrs = addrList.nil; - _ref = ips; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - ip = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), IPAddr); - if (filter === $throwNilPointerError) { _v = true; $s = 5; continue s; } - _r = filter($clone(ip, IPAddr)); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 5: - /* */ if (_v) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 3: - _r$1 = inetaddr($clone(ip, IPAddr)); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - addrs = $append(addrs, _r$1); - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - /* */ if (addrs.$length === 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (addrs.$length === 0) { */ case 8: - _r$2 = errNoSuitableAddress.Error(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [addrList.nil, new AddrError.ptr(_r$2, originalAddr)]; - $s = 11; case 11: return $24r; - /* } */ case 9: - $s = -1; return [addrs, $ifaceNil]; - /* */ } return; } var $f = {$blk: filterAddrList, $c: true, $r, $24r, _i, _r, _r$1, _r$2, _ref, _v, addrs, filter, inetaddr, ip, ips, originalAddr, $s};return $f; - }; - ipv4only = function(addr) { - var addr; - return !(addr.IP.To4() === IP.nil); - }; - ipv6only = function(addr) { - var addr; - return (addr.IP.$length === 16) && addr.IP.To4() === IP.nil; - }; - SplitHostPort = function(hostport) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, addrErr, end, err, host, hostport, i, j, k, port, $s, $r, $c} = $restore(this, {hostport}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - host = ""; - port = ""; - err = $ifaceNil; - addrErr = (function(addr, why) { - var _tmp, _tmp$1, _tmp$2, addr, err$1, host$1, port$1, why; - host$1 = ""; - port$1 = ""; - err$1 = $ifaceNil; - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = new AddrError.ptr(why, addr); - host$1 = _tmp; - port$1 = _tmp$1; - err$1 = _tmp$2; - return [host$1, port$1, err$1]; - }); - _tmp = 0; - _tmp$1 = 0; - j = _tmp; - k = _tmp$1; - i = last(hostport, 58); - /* */ if (i < 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (i < 0) { */ case 1: - _r = addrErr(hostport, "missing port in address"); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - $24r = [host, port, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if (hostport.charCodeAt(0) === 91) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (hostport.charCodeAt(0) === 91) { */ case 5: - end = bytealg.IndexByteString(hostport, 93); - /* */ if (end < 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (end < 0) { */ case 8: - _r$1 = addrErr(hostport, "missing ']' in address"); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - host = _tuple$1[0]; - port = _tuple$1[1]; - err = _tuple$1[2]; - $24r$1 = [host, port, err]; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - _1 = end + 1 >> 0; - /* */ if (_1 === (hostport.length)) { $s = 13; continue; } - /* */ if (_1 === (i)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_1 === (hostport.length)) { */ case 13: - _r$2 = addrErr(hostport, "missing port in address"); /* */ $s = 17; case 17: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - host = _tuple$2[0]; - port = _tuple$2[1]; - err = _tuple$2[2]; - $24r$2 = [host, port, err]; - $s = 18; case 18: return $24r$2; - /* } else if (_1 === (i)) { */ case 14: - $s = 16; continue; - /* } else { */ case 15: - /* */ if (hostport.charCodeAt((end + 1 >> 0)) === 58) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (hostport.charCodeAt((end + 1 >> 0)) === 58) { */ case 19: - _r$3 = addrErr(hostport, "too many colons in address"); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$3 = _r$3; - host = _tuple$3[0]; - port = _tuple$3[1]; - err = _tuple$3[2]; - $24r$3 = [host, port, err]; - $s = 22; case 22: return $24r$3; - /* } */ case 20: - _r$4 = addrErr(hostport, "missing port in address"); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$4 = _r$4; - host = _tuple$4[0]; - port = _tuple$4[1]; - err = _tuple$4[2]; - $24r$4 = [host, port, err]; - $s = 24; case 24: return $24r$4; - /* } */ case 16: - case 12: - host = $substring(hostport, 1, end); - _tmp$2 = 1; - _tmp$3 = end + 1 >> 0; - j = _tmp$2; - k = _tmp$3; - $s = 7; continue; - /* } else { */ case 6: - host = $substring(hostport, 0, i); - /* */ if (bytealg.IndexByteString(host, 58) >= 0) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (bytealg.IndexByteString(host, 58) >= 0) { */ case 25: - _r$5 = addrErr(hostport, "too many colons in address"); /* */ $s = 27; case 27: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$5 = _r$5; - host = _tuple$5[0]; - port = _tuple$5[1]; - err = _tuple$5[2]; - $24r$5 = [host, port, err]; - $s = 28; case 28: return $24r$5; - /* } */ case 26: - /* } */ case 7: - /* */ if (bytealg.IndexByteString($substring(hostport, j), 91) >= 0) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (bytealg.IndexByteString($substring(hostport, j), 91) >= 0) { */ case 29: - _r$6 = addrErr(hostport, "unexpected '[' in address"); /* */ $s = 31; case 31: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$6 = _r$6; - host = _tuple$6[0]; - port = _tuple$6[1]; - err = _tuple$6[2]; - $24r$6 = [host, port, err]; - $s = 32; case 32: return $24r$6; - /* } */ case 30: - /* */ if (bytealg.IndexByteString($substring(hostport, k), 93) >= 0) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (bytealg.IndexByteString($substring(hostport, k), 93) >= 0) { */ case 33: - _r$7 = addrErr(hostport, "unexpected ']' in address"); /* */ $s = 35; case 35: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$7 = _r$7; - host = _tuple$7[0]; - port = _tuple$7[1]; - err = _tuple$7[2]; - $24r$7 = [host, port, err]; - $s = 36; case 36: return $24r$7; - /* } */ case 34: - port = $substring(hostport, (i + 1 >> 0)); - _tmp$4 = host; - _tmp$5 = port; - _tmp$6 = $ifaceNil; - host = _tmp$4; - port = _tmp$5; - err = _tmp$6; - $s = -1; return [host, port, err]; - /* */ } return; } var $f = {$blk: SplitHostPort, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, addrErr, end, err, host, hostport, i, j, k, port, $s};return $f; - }; - $pkg.SplitHostPort = SplitHostPort; - splitHostZone = function(s) { - var _tmp, _tmp$1, host, i, s, zone; - host = ""; - zone = ""; - i = last(s, 37); - if (i > 0) { - _tmp = $substring(s, 0, i); - _tmp$1 = $substring(s, (i + 1 >> 0)); - host = _tmp; - zone = _tmp$1; - } else { - host = s; - } - return [host, zone]; - }; - JoinHostPort = function(host, port) { - var host, port; - if (bytealg.IndexByteString(host, 58) >= 0) { - return "[" + host + "]:" + port; - } - return host + ":" + port; - }; - $pkg.JoinHostPort = JoinHostPort; - Resolver.ptr.prototype.internetAddrList = function(ctx, net, addr) { - var {$24r, $24r$1, _1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, addr, ctx, err, filter, host, inetaddr, ips, net, port, portnum, r, $s, $r, $c} = $restore(this, {ctx, net, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - net = [net]; - portnum = [portnum]; - r = this; - err = $ifaceNil; - _tmp = ""; - _tmp$1 = ""; - host = _tmp; - port = _tmp$1; - portnum[0] = 0; - _1 = net[0]; - /* */ if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6") || _1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { $s = 2; continue; } - /* */ if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6") || _1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { */ case 2: - /* */ if (!(addr === "")) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(addr === "")) { */ case 6: - _r = SplitHostPort(addr); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [addrList.nil, err]; - } - _r$1 = r.LookupPort(ctx, net[0], port); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - portnum[0] = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [addrList.nil, err]; - } - /* } */ case 7: - $s = 5; continue; - /* } else if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { */ case 3: - if (!(addr === "")) { - host = addr; - } - $s = 5; continue; - /* } else { */ case 4: - $s = -1; return [addrList.nil, new UnknownNetworkError((net[0]))]; - /* } */ case 5: - case 1: - inetaddr = (function(net, portnum) { return function(ip) { - var _2, ip; - _2 = net[0]; - if (_2 === ("tcp") || _2 === ("tcp4") || _2 === ("tcp6")) { - return new TCPAddr.ptr(ip.IP, portnum[0], ip.Zone); - } else if (_2 === ("udp") || _2 === ("udp4") || _2 === ("udp6")) { - return new UDPAddr.ptr(ip.IP, portnum[0], ip.Zone); - } else if (_2 === ("ip") || _2 === ("ip4") || _2 === ("ip6")) { - return new IPAddr.ptr(ip.IP, ip.Zone); - } else { - $panic(new $String("unexpected network: " + net[0])); - } - }; })(net, portnum); - /* */ if (host === "") { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (host === "") { */ case 10: - _r$2 = inetaddr(new IPAddr.ptr(IP.nil, "")); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [new addrList([_r$2]), $ifaceNil]; - $s = 13; case 13: return $24r; - /* } */ case 11: - _r$3 = r.lookupIPAddr(ctx, net[0], host); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - ips = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [addrList.nil, err]; - } - if ((ips.$length === 1) && (0 >= ips.$length ? ($throwRuntimeError("index out of range"), undefined) : ips.$array[ips.$offset + 0]).IP.Equal($pkg.IPv6unspecified)) { - ips = $append(ips, new IPAddr.ptr($pkg.IPv4zero, "")); - } - filter = $throwNilPointerError; - if (!(net[0] === "") && (net[0].charCodeAt((net[0].length - 1 >> 0)) === 52)) { - filter = ipv4only; - } - if (!(net[0] === "") && (net[0].charCodeAt((net[0].length - 1 >> 0)) === 54)) { - filter = ipv6only; - } - _r$4 = filterAddrList(filter, ips, inetaddr, host); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 16; case 16: return $24r$1; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.internetAddrList, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, addr, ctx, err, filter, host, inetaddr, ips, net, port, portnum, r, $s};return $f; - }; - Resolver.prototype.internetAddrList = function(ctx, net, addr) { return this.$val.internetAddrList(ctx, net, addr); }; - loopbackIP = function(net) { - var net; - if (!(net === "") && (net.charCodeAt((net.length - 1 >> 0)) === 54)) { - return $pkg.IPv6loopback; - } - return new IP([127, 0, 0, 1]); - }; - IPAddr.ptr.prototype.family = function() { - var a; - a = this; - if (a === ptrType$32.nil || a.IP.$length <= 4) { - return 2; - } - if (!(a.IP.To4() === IP.nil)) { - return 2; - } - return 3; - }; - IPAddr.prototype.family = function() { return this.$val.family(); }; - IPAddr.ptr.prototype.sockaddr = function(family) { - var {$24r, _r, a, family, $s, $r, $c} = $restore(this, {family}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - a = this; - if (a === ptrType$32.nil) { - $s = -1; return [$ifaceNil, $ifaceNil]; - } - _r = ipToSockaddr(family, a.IP, 0, a.Zone); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: IPAddr.ptr.prototype.sockaddr, $c: true, $r, $24r, _r, a, family, $s};return $f; - }; - IPAddr.prototype.sockaddr = function(family) { return this.$val.sockaddr(family); }; - IPAddr.ptr.prototype.toLocal = function(net) { - var a, net; - a = this; - return new IPAddr.ptr(loopbackIP(net), a.Zone); - }; - IPAddr.prototype.toLocal = function(net) { return this.$val.toLocal(net); }; - IPConn.ptr.prototype.readFrom = function(b) { - var {_r, _ref, _tuple, addr, b, c, err, n, sa, sa$1, sa$2, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - addr = ptrType$32.nil; - _tuple = c.conn.fd.readFrom(b); - n = _tuple[0]; - sa = _tuple[1]; - err = _tuple[2]; - _ref = sa; - /* */ if ($assertType(_ref, ptrType$10, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$10, true)[1]) { */ case 1: - sa$1 = _ref.$val; - addr = new IPAddr.ptr($convertSliceType($subslice(new sliceType$1(sa$1.Addr), 0), IP), ""); - n = stripIPv4Header(n, b); - $s = 3; continue; - /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 2: - sa$2 = _ref.$val; - _r = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - addr = new IPAddr.ptr($convertSliceType($subslice(new sliceType$1(sa$2.Addr), 0), IP), _r); - /* } */ case 3: - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.readFrom, $c: true, $r, _r, _ref, _tuple, addr, b, c, err, n, sa, sa$1, sa$2, $s};return $f; - }; - IPConn.prototype.readFrom = function(b) { return this.$val.readFrom(b); }; - stripIPv4Header = function(n, b) { - var b, l, n; - if (b.$length < 20) { - return n; - } - l = (((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) & 15) >>> 0) >> 0)) << 2 >> 0; - if (20 > l || l > b.$length) { - return n; - } - if (!((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >>> 4 << 24 >>> 24) === 4))) { - return n; - } - $copySlice(b, $subslice(b, l)); - return n - l >> 0; - }; - IPConn.ptr.prototype.readMsg = function(b, oob) { - var {_r, _ref, _tuple, addr, b, c, err, flags, n, oob, oobn, sa, sa$1, sa$2, $s, $r, $c} = $restore(this, {b, oob}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - flags = 0; - addr = ptrType$32.nil; - err = $ifaceNil; - c = this; - sa = $ifaceNil; - _tuple = c.conn.fd.readMsg(b, oob, 0); - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - sa = _tuple[3]; - err = _tuple[4]; - _ref = sa; - /* */ if ($assertType(_ref, ptrType$10, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$10, true)[1]) { */ case 1: - sa$1 = _ref.$val; - addr = new IPAddr.ptr($convertSliceType($subslice(new sliceType$1(sa$1.Addr), 0), IP), ""); - $s = 3; continue; - /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 2: - sa$2 = _ref.$val; - _r = zoneCache.name(((sa$2.ZoneId >> 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - addr = new IPAddr.ptr($convertSliceType($subslice(new sliceType$1(sa$2.Addr), 0), IP), _r); - /* } */ case 3: - $s = -1; return [n, oobn, flags, addr, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.readMsg, $c: true, $r, _r, _ref, _tuple, addr, b, c, err, flags, n, oob, oobn, sa, sa$1, sa$2, $s};return $f; - }; - IPConn.prototype.readMsg = function(b, oob) { return this.$val.readMsg(b, oob); }; - IPConn.ptr.prototype.writeTo = function(b, addr) { - var {_r, _tuple, addr, b, c, err, sa, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.conn.fd.isConnected) { - $s = -1; return [0, $pkg.ErrWriteToConnected]; - } - if (addr === ptrType$32.nil) { - $s = -1; return [0, errMissingAddress]; - } - _r = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - sa = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [0, err]; - } - $s = -1; return c.conn.fd.writeTo(b, sa); - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.writeTo, $c: true, $r, _r, _tuple, addr, b, c, err, sa, $s};return $f; - }; - IPConn.prototype.writeTo = function(b, addr) { return this.$val.writeTo(b, addr); }; - IPConn.ptr.prototype.writeMsg = function(b, oob, addr) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, addr, b, c, err, n, oob, oobn, sa, $s, $r, $c} = $restore(this, {b, oob, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (c.conn.fd.isConnected) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = $pkg.ErrWriteToConnected; - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - $s = -1; return [n, oobn, err]; - } - if (addr === ptrType$32.nil) { - _tmp$3 = 0; - _tmp$4 = 0; - _tmp$5 = errMissingAddress; - n = _tmp$3; - oobn = _tmp$4; - err = _tmp$5; - $s = -1; return [n, oobn, err]; - } - _r = addr.sockaddr(c.conn.fd.family); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - sa = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = 0; - _tmp$7 = 0; - _tmp$8 = err; - n = _tmp$6; - oobn = _tmp$7; - err = _tmp$8; - $s = -1; return [n, oobn, err]; - } - _tuple$1 = c.conn.fd.writeMsg(b, oob, sa); - n = _tuple$1[0]; - oobn = _tuple$1[1]; - err = _tuple$1[2]; - $s = -1; return [n, oobn, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.writeMsg, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, addr, b, c, err, n, oob, oobn, sa, $s};return $f; - }; - IPConn.prototype.writeMsg = function(b, oob, addr) { return this.$val.writeMsg(b, oob, addr); }; - sysDialer.ptr.prototype.dialIP = function(ctx, laddr, raddr) { - var {_1, _r, _tuple, _tuple$1, ctx, err, fd, laddr, network, proto, raddr, sd, $s, $r, $c} = $restore(this, {ctx, laddr, raddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sd = this; - _tuple = parseNetwork(ctx, sd.network, true); - network = _tuple[0]; - proto = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$34.nil, err]; - } - _1 = network; - if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { - } else { - $s = -1; return [ptrType$34.nil, new UnknownNetworkError((sd.network))]; - } - _r = internetSocket(ctx, network, laddr, raddr, 3, proto, "dial", sd.Dialer.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - fd = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$34.nil, err]; - } - $s = -1; return [newIPConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysDialer.ptr.prototype.dialIP, $c: true, $r, _1, _r, _tuple, _tuple$1, ctx, err, fd, laddr, network, proto, raddr, sd, $s};return $f; - }; - sysDialer.prototype.dialIP = function(ctx, laddr, raddr) { return this.$val.dialIP(ctx, laddr, raddr); }; - sysListener.ptr.prototype.listenIP = function(ctx, laddr) { - var {_1, _r, _tuple, _tuple$1, ctx, err, fd, laddr, network, proto, sl, $s, $r, $c} = $restore(this, {ctx, laddr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sl = this; - _tuple = parseNetwork(ctx, sl.network, true); - network = _tuple[0]; - proto = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$34.nil, err]; - } - _1 = network; - if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { - } else { - $s = -1; return [ptrType$34.nil, new UnknownNetworkError((sl.network))]; - } - _r = internetSocket(ctx, network, laddr, $ifaceNil, 3, proto, "listen", sl.ListenConfig.Control); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - fd = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$34.nil, err]; - } - $s = -1; return [newIPConn(fd), $ifaceNil]; - /* */ } return; } var $f = {$blk: sysListener.ptr.prototype.listenIP, $c: true, $r, _1, _r, _tuple, _tuple$1, ctx, err, fd, laddr, network, proto, sl, $s};return $f; - }; - sysListener.prototype.listenIP = function(ctx, laddr) { return this.$val.listenIP(ctx, laddr); }; - IPAddr.ptr.prototype.Network = function() { - var a; - a = this; - return "ip"; - }; - IPAddr.prototype.Network = function() { return this.$val.Network(); }; - IPAddr.ptr.prototype.String = function() { - var a, ip; - a = this; - if (a === ptrType$32.nil) { - return ""; - } - ip = ipEmptyString(a.IP); - if (!(a.Zone === "")) { - return ip + "%" + a.Zone; - } - return ip; - }; - IPAddr.prototype.String = function() { return this.$val.String(); }; - IPAddr.ptr.prototype.isWildcard = function() { - var a; - a = this; - if (a === ptrType$32.nil || a.IP === IP.nil) { - return true; - } - return a.IP.IsUnspecified(); - }; - IPAddr.prototype.isWildcard = function() { return this.$val.isWildcard(); }; - IPAddr.ptr.prototype.opAddr = function() { - var a; - a = this; - if (a === ptrType$32.nil) { - return $ifaceNil; - } - return a; - }; - IPAddr.prototype.opAddr = function() { return this.$val.opAddr(); }; - IPConn.ptr.prototype.SyscallConn = function() { - var _returncast, c; - c = this; - if (!c.conn.ok()) { - return [$ifaceNil, new syscall.Errno(22)]; - } - _returncast = newRawConn(c.conn.fd); - return [_returncast[0], _returncast[1]]; - }; - IPConn.prototype.SyscallConn = function() { return this.$val.SyscallConn(); }; - IPConn.ptr.prototype.ReadFromIP = function(b) { - var {_r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, ptrType$32.nil, new syscall.Errno(22)]; - } - _r = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.ReadFromIP, $c: true, $r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - IPConn.prototype.ReadFromIP = function(b) { return this.$val.ReadFromIP(b); }; - IPConn.ptr.prototype.ReadFrom = function(b) { - var {_r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, $ifaceNil, new syscall.Errno(22)]; - } - _r = c.readFrom(b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - addr = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - if (addr === ptrType$32.nil) { - $s = -1; return [n, $ifaceNil, err]; - } - $s = -1; return [n, addr, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.ReadFrom, $c: true, $r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - IPConn.prototype.ReadFrom = function(b) { return this.$val.ReadFrom(b); }; - IPConn.ptr.prototype.ReadMsgIP = function(b, oob) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s, $r, $c} = $restore(this, {b, oob}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - flags = 0; - addr = ptrType$32.nil; - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - _tmp$3 = ptrType$32.nil; - _tmp$4 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - flags = _tmp$2; - addr = _tmp$3; - err = _tmp$4; - $s = -1; return [n, oobn, flags, addr, err]; - } - _r = c.readMsg(b, oob); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - oobn = _tuple[1]; - flags = _tuple[2]; - addr = _tuple[3]; - err = _tuple[4]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("read", c.conn.fd.net, c.conn.fd.laddr, c.conn.fd.raddr, err); - } - $s = -1; return [n, oobn, flags, addr, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.ReadMsgIP, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, addr, b, c, err, flags, n, oob, oobn, $s};return $f; - }; - IPConn.prototype.ReadMsgIP = function(b, oob) { return this.$val.ReadMsgIP(b, oob); }; - IPConn.ptr.prototype.WriteToIP = function(b, addr) { - var {_r, _tuple, addr, b, c, err, n, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _r = c.writeTo(b, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.WriteToIP, $c: true, $r, _r, _tuple, addr, b, c, err, n, $s};return $f; - }; - IPConn.prototype.WriteToIP = function(b, addr) { return this.$val.WriteToIP(b, addr); }; - IPConn.ptr.prototype.WriteTo = function(b, addr) { - var {_r, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s, $r, $c} = $restore(this, {b, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.conn.ok()) { - $s = -1; return [0, new syscall.Errno(22)]; - } - _tuple = $assertType(addr, ptrType$32, true); - a = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [0, new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr, new syscall.Errno(22))]; - } - _r = c.writeTo(b, a); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - n = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, a.opAddr(), err); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.WriteTo, $c: true, $r, _r, _tuple, _tuple$1, a, addr, b, c, err, n, ok, $s};return $f; - }; - IPConn.prototype.WriteTo = function(b, addr) { return this.$val.WriteTo(b, addr); }; - IPConn.ptr.prototype.WriteMsgIP = function(b, oob, addr) { - var {_r, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s, $r, $c} = $restore(this, {b, oob, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - oobn = 0; - err = $ifaceNil; - c = this; - if (!c.conn.ok()) { - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = new syscall.Errno(22); - n = _tmp; - oobn = _tmp$1; - err = _tmp$2; - $s = -1; return [n, oobn, err]; - } - _r = c.writeMsg(b, oob, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - oobn = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("write", c.conn.fd.net, c.conn.fd.laddr, addr.opAddr(), err); - } - $s = -1; return [n, oobn, err]; - /* */ } return; } var $f = {$blk: IPConn.ptr.prototype.WriteMsgIP, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tuple, addr, b, c, err, n, oob, oobn, $s};return $f; - }; - IPConn.prototype.WriteMsgIP = function(b, oob, addr) { return this.$val.WriteMsgIP(b, oob, addr); }; - newIPConn = function(fd) { - var fd; - return new IPConn.ptr(new conn.ptr(fd)); - }; - IPv4 = function(a, b, c, d) { - var a, b, c, d, p; - p = $makeSlice(IP, 16); - $copySlice(p, v4InV6Prefix); - (12 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 12] = a); - (13 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 13] = b); - (14 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 14] = c); - (15 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 15] = d); - return p; - }; - $pkg.IPv4 = IPv4; - IPv4Mask = function(a, b, c, d) { - var a, b, c, d, p; - p = $makeSlice(IPMask, 4); - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = a); - (1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1] = b); - (2 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 2] = c); - (3 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 3] = d); - return p; - }; - $pkg.IPv4Mask = IPv4Mask; - CIDRMask = function(ones, bits) { - var _q, bits, i, l, m, n, ones, y; - if (!((bits === 32)) && !((bits === 128))) { - return IPMask.nil; - } - if (ones < 0 || ones > bits) { - return IPMask.nil; - } - l = (_q = bits / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - m = $makeSlice(IPMask, l); - n = ((ones >>> 0)); - i = 0; - while (true) { - if (!(i < l)) { break; } - if (n >= 8) { - ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i] = 255); - n = n - (8) >>> 0; - i = i + (1) >> 0; - continue; - } - ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i] = (~(((y = n, y < 32 ? (255 >>> y) : 0) << 24 >>> 24)) << 24 >>> 24)); - n = 0; - i = i + (1) >> 0; - } - return m; - }; - $pkg.CIDRMask = CIDRMask; - IP.prototype.IsUnspecified = function() { - var ip; - ip = this; - return ip.Equal($pkg.IPv4zero) || ip.Equal($pkg.IPv6unspecified); - }; - $ptrType(IP).prototype.IsUnspecified = function() { return this.$get().IsUnspecified(); }; - IP.prototype.IsLoopback = function() { - var ip, ip4; - ip = this; - ip4 = ip.To4(); - if (!(ip4 === IP.nil)) { - return (0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 127; - } - return ip.Equal($pkg.IPv6loopback); - }; - $ptrType(IP).prototype.IsLoopback = function() { return this.$get().IsLoopback(); }; - IP.prototype.IsPrivate = function() { - var ip, ip4; - ip = this; - ip4 = ip.To4(); - if (!(ip4 === IP.nil)) { - return ((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 10) || (((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 172) && ((((1 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 1]) & 240) >>> 0) === 16)) || (((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 192) && ((1 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 1]) === 168)); - } - return (ip.$length === 16) && ((((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) & 254) >>> 0) === 252); - }; - $ptrType(IP).prototype.IsPrivate = function() { return this.$get().IsPrivate(); }; - IP.prototype.IsMulticast = function() { - var ip, ip4; - ip = this; - ip4 = ip.To4(); - if (!(ip4 === IP.nil)) { - return (((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) & 240) >>> 0) === 224; - } - return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 255); - }; - $ptrType(IP).prototype.IsMulticast = function() { return this.$get().IsMulticast(); }; - IP.prototype.IsInterfaceLocalMulticast = function() { - var ip; - ip = this; - return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 255) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 15) >>> 0) === 1); - }; - $ptrType(IP).prototype.IsInterfaceLocalMulticast = function() { return this.$get().IsInterfaceLocalMulticast(); }; - IP.prototype.IsLinkLocalMulticast = function() { - var ip, ip4; - ip = this; - ip4 = ip.To4(); - if (!(ip4 === IP.nil)) { - return ((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 224) && ((1 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 1]) === 0) && ((2 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 2]) === 0); - } - return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 255) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 15) >>> 0) === 2); - }; - $ptrType(IP).prototype.IsLinkLocalMulticast = function() { return this.$get().IsLinkLocalMulticast(); }; - IP.prototype.IsLinkLocalUnicast = function() { - var ip, ip4; - ip = this; - ip4 = ip.To4(); - if (!(ip4 === IP.nil)) { - return ((0 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 0]) === 169) && ((1 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 1]) === 254); - } - return (ip.$length === 16) && ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) === 254) && ((((1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]) & 192) >>> 0) === 128); - }; - $ptrType(IP).prototype.IsLinkLocalUnicast = function() { return this.$get().IsLinkLocalUnicast(); }; - IP.prototype.IsGlobalUnicast = function() { - var ip; - ip = this; - return ((ip.$length === 4) || (ip.$length === 16)) && !ip.Equal($pkg.IPv4bcast) && !ip.IsUnspecified() && !ip.IsLoopback() && !ip.IsMulticast() && !ip.IsLinkLocalUnicast(); - }; - $ptrType(IP).prototype.IsGlobalUnicast = function() { return this.$get().IsGlobalUnicast(); }; - isZeros = function(p) { - var i, p; - i = 0; - while (true) { - if (!(i < p.$length)) { break; } - if (!((((i < 0 || i >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i]) === 0))) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - IP.prototype.To4 = function() { - var ip; - ip = this; - if (ip.$length === 4) { - return ip; - } - if ((ip.$length === 16) && isZeros($subslice(ip, 0, 10)) && ((10 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 10]) === 255) && ((11 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 11]) === 255)) { - return $subslice(ip, 12, 16); - } - return IP.nil; - }; - $ptrType(IP).prototype.To4 = function() { return this.$get().To4(); }; - IP.prototype.To16 = function() { - var ip; - ip = this; - if (ip.$length === 4) { - return IPv4((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]), (1 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 1]), (2 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 2]), (3 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 3])); - } - if (ip.$length === 16) { - return ip; - } - return IP.nil; - }; - $ptrType(IP).prototype.To16 = function() { return this.$get().To16(); }; - IP.prototype.DefaultMask = function() { - var ip; - ip = this; - ip = ip.To4(); - if (ip === IP.nil) { - return IPMask.nil; - } - if ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) < 128) { - return classAMask; - } else if ((0 >= ip.$length ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + 0]) < 192) { - return classBMask; - } else { - return classCMask; - } - }; - $ptrType(IP).prototype.DefaultMask = function() { return this.$get().DefaultMask(); }; - allFF = function(b) { - var _i, _ref, b, c; - _ref = b; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((c === 255))) { - return false; - } - _i++; - } - return true; - }; - IP.prototype.Mask = function(mask) { - var i, ip, mask, n, out; - ip = this; - if ((mask.$length === 16) && (ip.$length === 4) && allFF($convertSliceType($subslice(mask, 0, 12), sliceType$1))) { - mask = $subslice(mask, 12); - } - if ((mask.$length === 4) && (ip.$length === 16) && bytealg.Equal($convertSliceType($subslice(ip, 0, 12), sliceType$1), v4InV6Prefix)) { - ip = $subslice(ip, 12); - } - n = ip.$length; - if (!((n === mask.$length))) { - return IP.nil; - } - out = $makeSlice(IP, n); - i = 0; - while (true) { - if (!(i < n)) { break; } - ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = ((((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]) & ((i < 0 || i >= mask.$length) ? ($throwRuntimeError("index out of range"), undefined) : mask.$array[mask.$offset + i])) >>> 0)); - i = i + (1) >> 0; - } - return out; - }; - $ptrType(IP).prototype.Mask = function(mask) { return this.$get().Mask(mask); }; - ubtoa = function(dst, start, v) { - var _q, _q$1, _q$2, _r, _r$1, _r$2, dst, start, v, x, x$1, x$2; - if (v < 10) { - ((start < 0 || start >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + start] = (v + 48 << 24 >>> 24)); - return 1; - } else if (v < 100) { - (x = start + 1 >> 0, ((x < 0 || x >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x] = ((_r = v % 10, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24))); - ((start < 0 || start >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + start] = ((_q = v / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24)); - return 2; - } - (x$1 = start + 2 >> 0, ((x$1 < 0 || x$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$1] = ((_r$1 = v % 10, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24))); - (x$2 = start + 1 >> 0, ((x$2 < 0 || x$2 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + x$2] = ((_r$2 = ((_q$1 = v / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >>> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24))); - ((start < 0 || start >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + start] = ((_q$2 = v / 100, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >>> 0 : $throwRuntimeError("integer divide by zero")) + 48 << 24 >>> 24)); - return 3; - }; - IP.prototype.String = function() { - var b, b$1, e0, e1, i, i$1, ip, j, n, p, p4, x, x$1; - ip = this; - p = ip; - if (ip.$length === 0) { - return ""; - } - p4 = p.To4(); - if (p4.$length === 4) { - b = $makeSlice(sliceType$1, 15); - n = ubtoa(b, 0, (0 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 0])); - ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = 46); - n = n + (1) >> 0; - n = n + (ubtoa(b, n, (1 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 1]))) >> 0; - ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = 46); - n = n + (1) >> 0; - n = n + (ubtoa(b, n, (2 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 2]))) >> 0; - ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = 46); - n = n + (1) >> 0; - n = n + (ubtoa(b, n, (3 >= p4.$length ? ($throwRuntimeError("index out of range"), undefined) : p4.$array[p4.$offset + 3]))) >> 0; - return ($bytesToString($subslice(b, 0, n))); - } - if (!((p.$length === 16))) { - return "?" + hexString($convertSliceType(ip, sliceType$1)); - } - e0 = -1; - e1 = -1; - i = 0; - while (true) { - if (!(i < 16)) { break; } - j = i; - while (true) { - if (!(j < 16 && (((j < 0 || j >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + j]) === 0) && ((x = j + 1 >> 0, ((x < 0 || x >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x])) === 0))) { break; } - j = j + (2) >> 0; - } - if (j > i && (j - i >> 0) > (e1 - e0 >> 0)) { - e0 = i; - e1 = j; - i = j; - } - i = i + (2) >> 0; - } - if ((e1 - e0 >> 0) <= 2) { - e0 = -1; - e1 = -1; - } - b$1 = $makeSlice(sliceType$1, 0, 39); - i$1 = 0; - while (true) { - if (!(i$1 < 16)) { break; } - if (i$1 === e0) { - b$1 = $append(b$1, 58, 58); - i$1 = e1; - if (i$1 >= 16) { - break; - } - } else if (i$1 > 0) { - b$1 = $append(b$1, 58); - } - b$1 = appendHex(b$1, (((((((i$1 < 0 || i$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + i$1]) >>> 0)) << 8 >>> 0)) | (((x$1 = i$1 + 1 >> 0, ((x$1 < 0 || x$1 >= p.$length) ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + x$1])) >>> 0))) >>> 0); - i$1 = i$1 + (2) >> 0; - } - return ($bytesToString(b$1)); - }; - $ptrType(IP).prototype.String = function() { return this.$get().String(); }; - hexString = function(b) { - var _i, _ref, _tmp, _tmp$1, b, i, s, tn, x, x$1; - s = $makeSlice(sliceType$1, ($imul(b.$length, 2))); - _ref = b; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - tn = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _tmp = "0123456789abcdef".charCodeAt((tn >>> 4 << 24 >>> 24)); - _tmp$1 = "0123456789abcdef".charCodeAt(((tn & 15) >>> 0)); - (x = $imul(i, 2), ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x] = _tmp)); - (x$1 = ($imul(i, 2)) + 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1] = _tmp$1)); - _i++; - } - return ($bytesToString(s)); - }; - ipEmptyString = function(ip) { - var ip; - if (ip.$length === 0) { - return ""; - } - return ip.String(); - }; - IP.prototype.MarshalText = function() { - var ip; - ip = this; - if (ip.$length === 0) { - return [(new sliceType$1($stringToBytes(""))), $ifaceNil]; - } - if (!((ip.$length === 4)) && !((ip.$length === 16))) { - return [sliceType$1.nil, new AddrError.ptr("invalid IP address", hexString($convertSliceType(ip, sliceType$1)))]; - } - return [(new sliceType$1($stringToBytes(ip.String()))), $ifaceNil]; - }; - $ptrType(IP).prototype.MarshalText = function() { return this.$get().MarshalText(); }; - $ptrType(IP).prototype.UnmarshalText = function(text) { - var ip, s, text, x; - ip = this; - if (text.$length === 0) { - ip.$set(IP.nil); - return $ifaceNil; - } - s = ($bytesToString(text)); - x = ParseIP(s); - if (x === IP.nil) { - return new ParseError.ptr("IP address", s); - } - ip.$set(x); - return $ifaceNil; - }; - IP.prototype.Equal = function(x) { - var ip, x; - ip = this; - if (ip.$length === x.$length) { - return bytealg.Equal($convertSliceType(ip, sliceType$1), $convertSliceType(x, sliceType$1)); - } - if ((ip.$length === 4) && (x.$length === 16)) { - return bytealg.Equal($convertSliceType($subslice(x, 0, 12), sliceType$1), v4InV6Prefix) && bytealg.Equal($convertSliceType(ip, sliceType$1), $convertSliceType($subslice(x, 12), sliceType$1)); - } - if ((ip.$length === 16) && (x.$length === 4)) { - return bytealg.Equal($convertSliceType($subslice(ip, 0, 12), sliceType$1), v4InV6Prefix) && bytealg.Equal($convertSliceType($subslice(ip, 12), sliceType$1), $convertSliceType(x, sliceType$1)); - } - return false; - }; - $ptrType(IP).prototype.Equal = function(x) { return this.$get().Equal(x); }; - IP.prototype.matchAddrFamily = function(x) { - var ip, x; - ip = this; - return !(ip.To4() === IP.nil) && !(x.To4() === IP.nil) || !(ip.To16() === IP.nil) && ip.To4() === IP.nil && !(x.To16() === IP.nil) && x.To4() === IP.nil; - }; - $ptrType(IP).prototype.matchAddrFamily = function(x) { return this.$get().matchAddrFamily(x); }; - simpleMaskLength = function(mask) { - var _i, _ref, i, mask, n, v, y; - n = 0; - _ref = mask; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v === 255) { - n = n + (8) >> 0; - _i++; - continue; - } - while (true) { - if (!(!((((v & 128) >>> 0) === 0)))) { break; } - n = n + (1) >> 0; - v = (y = (1), y < 32 ? (v << y) : 0) << 24 >>> 24; - } - if (!((v === 0))) { - return -1; - } - i = i + (1) >> 0; - while (true) { - if (!(i < mask.$length)) { break; } - if (!((((i < 0 || i >= mask.$length) ? ($throwRuntimeError("index out of range"), undefined) : mask.$array[mask.$offset + i]) === 0))) { - return -1; - } - i = i + (1) >> 0; - } - break; - } - return n; - }; - IPMask.prototype.Size = function() { - var _tmp, _tmp$1, _tmp$2, _tmp$3, bits, m, ones; - ones = 0; - bits = 0; - m = this; - _tmp = simpleMaskLength(m); - _tmp$1 = $imul(m.$length, 8); - ones = _tmp; - bits = _tmp$1; - if (ones === -1) { - _tmp$2 = 0; - _tmp$3 = 0; - ones = _tmp$2; - bits = _tmp$3; - return [ones, bits]; - } - return [ones, bits]; - }; - $ptrType(IPMask).prototype.Size = function() { return this.$get().Size(); }; - IPMask.prototype.String = function() { - var m; - m = this; - if (m.$length === 0) { - return ""; - } - return hexString($convertSliceType(m, sliceType$1)); - }; - $ptrType(IPMask).prototype.String = function() { return this.$get().String(); }; - networkNumberAndMask = function(n) { - var _1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, ip, m, n; - ip = IP.nil; - m = IPMask.nil; - ip = n.IP.To4(); - if (ip === IP.nil) { - ip = n.IP; - if (!((ip.$length === 16))) { - _tmp = IP.nil; - _tmp$1 = IPMask.nil; - ip = _tmp; - m = _tmp$1; - return [ip, m]; - } - } - m = n.Mask; - _1 = m.$length; - if (_1 === (4)) { - if (!((ip.$length === 4))) { - _tmp$2 = IP.nil; - _tmp$3 = IPMask.nil; - ip = _tmp$2; - m = _tmp$3; - return [ip, m]; - } - } else if (_1 === (16)) { - if (ip.$length === 4) { - m = $subslice(m, 12); - } - } else { - _tmp$4 = IP.nil; - _tmp$5 = IPMask.nil; - ip = _tmp$4; - m = _tmp$5; - return [ip, m]; - } - return [ip, m]; - }; - IPNet.ptr.prototype.Contains = function(ip) { - var _tuple, i, ip, l, m, n, nn, x; - n = this; - _tuple = networkNumberAndMask(n); - nn = _tuple[0]; - m = _tuple[1]; - x = ip.To4(); - if (!(x === IP.nil)) { - ip = x; - } - l = ip.$length; - if (!((l === nn.$length))) { - return false; - } - i = 0; - while (true) { - if (!(i < l)) { break; } - if (!((((((i < 0 || i >= nn.$length) ? ($throwRuntimeError("index out of range"), undefined) : nn.$array[nn.$offset + i]) & ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i])) >>> 0) === ((((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]) & ((i < 0 || i >= m.$length) ? ($throwRuntimeError("index out of range"), undefined) : m.$array[m.$offset + i])) >>> 0)))) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - IPNet.prototype.Contains = function(ip) { return this.$val.Contains(ip); }; - IPNet.ptr.prototype.Network = function() { - var n; - n = this; - return "ip+net"; - }; - IPNet.prototype.Network = function() { return this.$val.Network(); }; - IPNet.ptr.prototype.String = function() { - var _tuple, l, m, n, nn; - n = this; - if (n === ptrType$35.nil) { - return ""; - } - _tuple = networkNumberAndMask(n); - nn = _tuple[0]; - m = _tuple[1]; - if (nn === IP.nil || m === IPMask.nil) { - return ""; - } - l = simpleMaskLength(m); - if (l === -1) { - return nn.String() + "/" + m.String(); - } - return nn.String() + "/" + itoa.Uitoa(((l >>> 0))); - }; - IPNet.prototype.String = function() { return this.$val.String(); }; - parseIPv4 = function(s) { - var _tuple, c, i, n, ok, p, s; - p = arrayType.zero(); - i = 0; - while (true) { - if (!(i < 4)) { break; } - if (s.length === 0) { - return IP.nil; - } - if (i > 0) { - if (!((s.charCodeAt(0) === 46))) { - return IP.nil; - } - s = $substring(s, 1); - } - _tuple = dtoi(s); - n = _tuple[0]; - c = _tuple[1]; - ok = _tuple[2]; - if (!ok || n > 255) { - return IP.nil; - } - if (c > 1 && (s.charCodeAt(0) === 48)) { - return IP.nil; - } - s = $substring(s, c); - ((i < 0 || i >= p.length) ? ($throwRuntimeError("index out of range"), undefined) : p[i] = ((n << 24 >>> 24))); - i = i + (1) >> 0; - } - if (!((s.length === 0))) { - return IP.nil; - } - return IPv4(p[0], p[1], p[2], p[3]); - }; - parseIPv6Zone = function(s) { - var _tuple, s, zone; - _tuple = splitHostZone(s); - s = _tuple[0]; - zone = _tuple[1]; - return [parseIPv6(s), zone]; - }; - parseIPv6 = function(s) { - var _tuple, c, ellipsis, i, ip, ip4, j, j$1, n, n$1, ok, s, x, x$1, x$2, x$3, x$4; - ip = IP.nil; - ip = $makeSlice(IP, 16); - ellipsis = -1; - if (s.length >= 2 && (s.charCodeAt(0) === 58) && (s.charCodeAt(1) === 58)) { - ellipsis = 0; - s = $substring(s, 2); - if (s.length === 0) { - ip = ip; - return ip; - } - } - i = 0; - while (true) { - if (!(i < 16)) { break; } - _tuple = xtoi(s); - n = _tuple[0]; - c = _tuple[1]; - ok = _tuple[2]; - if (!ok || n > 65535) { - ip = IP.nil; - return ip; - } - if (c < s.length && (s.charCodeAt(c) === 46)) { - if (ellipsis < 0 && !((i === 12))) { - ip = IP.nil; - return ip; - } - if ((i + 4 >> 0) > 16) { - ip = IP.nil; - return ip; - } - ip4 = parseIPv4(s); - if (ip4 === IP.nil) { - ip = IP.nil; - return ip; - } - ((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i] = (12 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 12])); - (x = i + 1 >> 0, ((x < 0 || x >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x] = (13 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 13]))); - (x$1 = i + 2 >> 0, ((x$1 < 0 || x$1 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$1] = (14 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 14]))); - (x$2 = i + 3 >> 0, ((x$2 < 0 || x$2 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$2] = (15 >= ip4.$length ? ($throwRuntimeError("index out of range"), undefined) : ip4.$array[ip4.$offset + 15]))); - s = ""; - i = i + (4) >> 0; - break; - } - ((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i] = (((n >> 8 >> 0) << 24 >>> 24))); - (x$3 = i + 1 >> 0, ((x$3 < 0 || x$3 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$3] = ((n << 24 >>> 24)))); - i = i + (2) >> 0; - s = $substring(s, c); - if (s.length === 0) { - break; - } - if (!((s.charCodeAt(0) === 58)) || (s.length === 1)) { - ip = IP.nil; - return ip; - } - s = $substring(s, 1); - if (s.charCodeAt(0) === 58) { - if (ellipsis >= 0) { - ip = IP.nil; - return ip; - } - ellipsis = i; - s = $substring(s, 1); - if (s.length === 0) { - break; - } - } - } - if (!((s.length === 0))) { - ip = IP.nil; - return ip; - } - if (i < 16) { - if (ellipsis < 0) { - ip = IP.nil; - return ip; - } - n$1 = 16 - i >> 0; - j = i - 1 >> 0; - while (true) { - if (!(j >= ellipsis)) { break; } - (x$4 = j + n$1 >> 0, ((x$4 < 0 || x$4 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + x$4] = ((j < 0 || j >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + j]))); - j = j - (1) >> 0; - } - j$1 = (ellipsis + n$1 >> 0) - 1 >> 0; - while (true) { - if (!(j$1 >= ellipsis)) { break; } - ((j$1 < 0 || j$1 >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + j$1] = 0); - j$1 = j$1 - (1) >> 0; - } - } else if (ellipsis >= 0) { - ip = IP.nil; - return ip; - } - ip = ip; - return ip; - }; - ParseIP = function(s) { - var _1, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _1 = s.charCodeAt(i); - if (_1 === (46)) { - return parseIPv4(s); - } else if (_1 === (58)) { - return parseIPv6(s); - } - i = i + (1) >> 0; - } - return IP.nil; - }; - $pkg.ParseIP = ParseIP; - parseIPZone = function(s) { - var _1, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _1 = s.charCodeAt(i); - if (_1 === (46)) { - return [parseIPv4(s), ""]; - } else if (_1 === (58)) { - return parseIPv6Zone(s); - } - i = i + (1) >> 0; - } - return [IP.nil, ""]; - }; - ParseCIDR = function(s) { - var _tmp, _tmp$1, _tuple, addr, i, ip, iplen, m, mask, n, ok, s; - i = bytealg.IndexByteString(s, 47); - if (i < 0) { - return [IP.nil, ptrType$35.nil, new ParseError.ptr("CIDR address", s)]; - } - _tmp = $substring(s, 0, i); - _tmp$1 = $substring(s, (i + 1 >> 0)); - addr = _tmp; - mask = _tmp$1; - iplen = 4; - ip = parseIPv4(addr); - if (ip === IP.nil) { - iplen = 16; - ip = parseIPv6(addr); - } - _tuple = dtoi(mask); - n = _tuple[0]; - i = _tuple[1]; - ok = _tuple[2]; - if (ip === IP.nil || !ok || !((i === mask.length)) || n < 0 || n > ($imul(8, iplen))) { - return [IP.nil, ptrType$35.nil, new ParseError.ptr("CIDR address", s)]; - } - m = CIDRMask(n, $imul(8, iplen)); - return [ip, new IPNet.ptr(ip.Mask(m), m), $ifaceNil]; - }; - $pkg.ParseCIDR = ParseCIDR; - interfaceTable = function(ifindex) { - var ifindex; - return [sliceType$11.nil, $ifaceNil]; - }; - interfaceAddrTable = function(ifi) { - var ifi; - return [sliceType$12.nil, $ifaceNil]; - }; - interfaceMulticastAddrTable = function(ifi) { - var ifi; - return [sliceType$12.nil, $ifaceNil]; - }; - Flags.prototype.String = function() { - var _i, _ref, f, i, name, s, y; - f = this.$val; - s = ""; - _ref = flagNames; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - name = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((((f & (((y = ((i >>> 0)), y < 32 ? (1 << y) : 0) >>> 0))) >>> 0) === 0))) { - if (!(s === "")) { - s = s + ("|"); - } - s = s + (name); - } - _i++; - } - if (s === "") { - s = "0"; - } - return s; - }; - $ptrType(Flags).prototype.String = function() { return new Flags(this.$get()).String(); }; - Interface.ptr.prototype.Addrs = function() { - var _tuple, err, ifat, ifi; - ifi = this; - if (ifi === ptrType$14.nil) { - return [sliceType$12.nil, new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, errInvalidInterface)]; - } - _tuple = interfaceAddrTable(ifi); - ifat = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, err); - } - return [ifat, err]; - }; - Interface.prototype.Addrs = function() { return this.$val.Addrs(); }; - Interface.ptr.prototype.MulticastAddrs = function() { - var _tuple, err, ifat, ifi; - ifi = this; - if (ifi === ptrType$14.nil) { - return [sliceType$12.nil, new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, errInvalidInterface)]; - } - _tuple = interfaceMulticastAddrTable(ifi); - ifat = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = new OpError.ptr("route", "ip+net", $ifaceNil, $ifaceNil, err); - } - return [ifat, err]; - }; - Interface.prototype.MulticastAddrs = function() { return this.$val.MulticastAddrs(); }; - ipv6ZoneCache.ptr.prototype.update = function(ift, force) { - var {$24r, $24r$1, $24r$2, _entry, _i, _key, _key$1, _r, _ref, _tuple, _tuple$1, err, force, ifi, ift, now, ok, updated, x, x$1, zc, $s, $deferred, $r, $c} = $restore(this, {ift, force}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - updated = false; - zc = this; - $r = zc.RWMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(zc.RWMutex, "Unlock"), []]); - _r = time.Now(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - now = $clone(_r, time.Time); - /* */ if (!force && $clone(zc.lastFetched, time.Time).After($clone($clone(now, time.Time).Add(new time.Duration(-14, 129542144)), time.Time))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!force && $clone(zc.lastFetched, time.Time).After($clone($clone(now, time.Time).Add(new time.Duration(-14, 129542144)), time.Time))) { */ case 3: - updated = false; - $24r = updated; - $s = 5; case 5: return $24r; - /* } */ case 4: - time.Time.copy(zc.lastFetched, now); - /* */ if (ift.$length === 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (ift.$length === 0) { */ case 6: - err = $ifaceNil; - _tuple = interfaceTable(0); - ift = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: - updated = false; - $24r$1 = updated; - $s = 10; case 10: return $24r$1; - /* } */ case 9: - /* } */ case 7: - zc.toIndex = (x = ift.$length, ((x < 0 || x > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - zc.toName = (x$1 = ift.$length, ((x$1 < 0 || x$1 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = ift; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - ifi = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), Interface); - _key = ifi.Name; (zc.toIndex || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: ifi.Index }; - _tuple$1 = (_entry = zc.toName[$Int.keyFor(ifi.Index)], _entry !== undefined ? [_entry.v, true] : ["", false]); - ok = _tuple$1[1]; - if (!ok) { - _key$1 = ifi.Index; (zc.toName || $throwRuntimeError("assignment to entry in nil map"))[$Int.keyFor(_key$1)] = { k: _key$1, v: ifi.Name }; - } - _i++; - } - updated = true; - $24r$2 = updated; - $s = 11; case 11: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return updated; } if($curGoroutine.asleep) { var $f = {$blk: ipv6ZoneCache.ptr.prototype.update, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _i, _key, _key$1, _r, _ref, _tuple, _tuple$1, err, force, ifi, ift, now, ok, updated, x, x$1, zc, $s, $deferred};return $f; } } - }; - ipv6ZoneCache.prototype.update = function(ift, force) { return this.$val.update(ift, force); }; - ipv6ZoneCache.ptr.prototype.name = function(index) { - var {_entry, _entry$1, _r, _r$1, _tuple, _tuple$1, index, name, ok, updated, zc, $s, $r, $c} = $restore(this, {index}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - zc = this; - if (index === 0) { - $s = -1; return ""; - } - _r = zoneCache.update(sliceType$11.nil, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - updated = _r; - $r = zoneCache.RWMutex.RLock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = zoneCache.toName[$Int.keyFor(index)], _entry !== undefined ? [_entry.v, true] : ["", false]); - name = _tuple[0]; - ok = _tuple[1]; - $r = zoneCache.RWMutex.RUnlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!ok && !updated) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!ok && !updated) { */ case 4: - _r$1 = zoneCache.update(sliceType$11.nil, true); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = zoneCache.RWMutex.RLock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$1 = (_entry$1 = zoneCache.toName[$Int.keyFor(index)], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]); - name = _tuple$1[0]; - ok = _tuple$1[1]; - $r = zoneCache.RWMutex.RUnlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - if (!ok) { - name = itoa.Uitoa(((index >>> 0))); - } - $s = -1; return name; - /* */ } return; } var $f = {$blk: ipv6ZoneCache.ptr.prototype.name, $c: true, $r, _entry, _entry$1, _r, _r$1, _tuple, _tuple$1, index, name, ok, updated, zc, $s};return $f; - }; - ipv6ZoneCache.prototype.name = function(index) { return this.$val.name(index); }; - ipv6ZoneCache.ptr.prototype.index = function(name) { - var {_entry, _entry$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, index, name, ok, updated, zc, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - zc = this; - if (name === "") { - $s = -1; return 0; - } - _r = zoneCache.update(sliceType$11.nil, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - updated = _r; - $r = zoneCache.RWMutex.RLock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = zoneCache.toIndex[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [0, false]); - index = _tuple[0]; - ok = _tuple[1]; - $r = zoneCache.RWMutex.RUnlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!ok && !updated) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!ok && !updated) { */ case 4: - _r$1 = zoneCache.update(sliceType$11.nil, true); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = zoneCache.RWMutex.RLock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$1 = (_entry$1 = zoneCache.toIndex[$String.keyFor(name)], _entry$1 !== undefined ? [_entry$1.v, true] : [0, false]); - index = _tuple$1[0]; - ok = _tuple$1[1]; - $r = zoneCache.RWMutex.RUnlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - if (!ok) { - _tuple$2 = dtoi(name); - index = _tuple$2[0]; - } - $s = -1; return index; - /* */ } return; } var $f = {$blk: ipv6ZoneCache.ptr.prototype.index, $c: true, $r, _entry, _entry$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, index, name, ok, updated, zc, $s};return $f; - }; - ipv6ZoneCache.prototype.index = function(name) { return this.$val.index(name); }; - isConnError = function(err) { - var _tuple, err, ok, se; - _tuple = $assertType(err, syscall.Errno, true); - se = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return (se === 104) || (se === 103); - } - return false; - }; - isDomainName = function(s) { - var c, i, l, last$1, nonNumeric, partlen, s; - if (s === ".") { - return true; - } - l = s.length; - if ((l === 0) || l > 254 || (l === 254) && !((s.charCodeAt((l - 1 >> 0)) === 46))) { - return false; - } - last$1 = 46; - nonNumeric = false; - partlen = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (97 <= c && c <= 122 || 65 <= c && c <= 90 || (c === 95)) { - nonNumeric = true; - partlen = partlen + (1) >> 0; - } else if (48 <= c && c <= 57) { - partlen = partlen + (1) >> 0; - } else if ((c === 45)) { - if (last$1 === 46) { - return false; - } - partlen = partlen + (1) >> 0; - nonNumeric = true; - } else if ((c === 46)) { - if ((last$1 === 46) || (last$1 === 45)) { - return false; - } - if (partlen > 63 || (partlen === 0)) { - return false; - } - partlen = 0; - } else { - return false; - } - last$1 = c; - i = i + (1) >> 0; - } - if ((last$1 === 45) || partlen > 63) { - return false; - } - return nonNumeric; - }; - Dialer.ptr.prototype.dualStack = function() { - var d, x; - d = this; - return (x = d.FallbackDelay, (x.$high > 0 || (x.$high === 0 && x.$low >= 0))); - }; - Dialer.prototype.dualStack = function() { return this.$val.dualStack(); }; - minNonzeroTime = function(a, b) { - var a, b; - if ($clone(a, time.Time).IsZero()) { - return b; - } - if ($clone(b, time.Time).IsZero() || $clone(a, time.Time).Before($clone(b, time.Time))) { - return a; - } - return b; - }; - Dialer.ptr.prototype.deadline = function(ctx, now) { - var {_r, _tuple, ctx, d, d$1, earliest, now, ok, x, $s, $r, $c} = $restore(this, {ctx, now}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - earliest = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - d = this; - if (!((x = d.Timeout, (x.$high === 0 && x.$low === 0)))) { - time.Time.copy(earliest, $clone(now, time.Time).Add(d.Timeout)); - } - _r = ctx.Deadline(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - d$1 = $clone(_tuple[0], time.Time); - ok = _tuple[1]; - if (ok) { - time.Time.copy(earliest, minNonzeroTime($clone(earliest, time.Time), $clone(d$1, time.Time))); - } - time.Time.copy(earliest, minNonzeroTime($clone(earliest, time.Time), $clone(d.Deadline, time.Time))); - $s = -1; return earliest; - /* */ } return; } var $f = {$blk: Dialer.ptr.prototype.deadline, $c: true, $r, _r, _tuple, ctx, d, d$1, earliest, now, ok, x, $s};return $f; - }; - Dialer.prototype.deadline = function(ctx, now) { return this.$val.deadline(ctx, now); }; - Dialer.ptr.prototype.resolver = function() { - var d; - d = this; - if (!(d.Resolver === ptrType$9.nil)) { - return d.Resolver; - } - return $pkg.DefaultResolver; - }; - Dialer.prototype.resolver = function() { return this.$val.resolver(); }; - partialDeadline = function(now, deadline, addrsRemaining) { - var addrsRemaining, deadline, now, timeRemaining, timeout$1; - if ($clone(deadline, time.Time).IsZero()) { - return [deadline, $ifaceNil]; - } - timeRemaining = $clone(deadline, time.Time).Sub($clone(now, time.Time)); - if ((timeRemaining.$high < 0 || (timeRemaining.$high === 0 && timeRemaining.$low <= 0))) { - return [new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), errTimeout]; - } - timeout$1 = $div64(timeRemaining, (new time.Duration(0, addrsRemaining)), false); - if ((timeout$1.$high < 0 || (timeout$1.$high === 0 && timeout$1.$low < 2000000000))) { - if ((timeRemaining.$high < 0 || (timeRemaining.$high === 0 && timeRemaining.$low < 2000000000))) { - timeout$1 = timeRemaining; - } else { - timeout$1 = new time.Duration(0, 2000000000); - } - } - return [$clone(now, time.Time).Add(timeout$1), $ifaceNil]; - }; - Dialer.ptr.prototype.fallbackDelay = function() { - var d, x; - d = this; - if ((x = d.FallbackDelay, (x.$high > 0 || (x.$high === 0 && x.$low > 0)))) { - return d.FallbackDelay; - } else { - return new time.Duration(0, 300000000); - } - }; - Dialer.prototype.fallbackDelay = function() { return this.$val.fallbackDelay(); }; - parseNetwork = function(ctx, network, needsProto) { - var _1, _2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, afnet, ctx, err, i, i$1, needsProto, network, ok, proto, proto$1, protostr; - afnet = ""; - proto = 0; - err = $ifaceNil; - i = last(network, 58); - if (i < 0) { - _1 = network; - if (_1 === ("tcp") || _1 === ("tcp4") || _1 === ("tcp6")) { - } else if (_1 === ("udp") || _1 === ("udp4") || _1 === ("udp6")) { - } else if (_1 === ("ip") || _1 === ("ip4") || _1 === ("ip6")) { - if (needsProto) { - _tmp = ""; - _tmp$1 = 0; - _tmp$2 = new UnknownNetworkError((network)); - afnet = _tmp; - proto = _tmp$1; - err = _tmp$2; - return [afnet, proto, err]; - } - } else if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { - } else { - _tmp$3 = ""; - _tmp$4 = 0; - _tmp$5 = new UnknownNetworkError((network)); - afnet = _tmp$3; - proto = _tmp$4; - err = _tmp$5; - return [afnet, proto, err]; - } - _tmp$6 = network; - _tmp$7 = 0; - _tmp$8 = $ifaceNil; - afnet = _tmp$6; - proto = _tmp$7; - err = _tmp$8; - return [afnet, proto, err]; - } - afnet = $substring(network, 0, i); - _2 = afnet; - if (_2 === ("ip") || _2 === ("ip4") || _2 === ("ip6")) { - protostr = $substring(network, (i + 1 >> 0)); - _tuple = dtoi(protostr); - proto$1 = _tuple[0]; - i$1 = _tuple[1]; - ok = _tuple[2]; - if (!ok || !((i$1 === protostr.length))) { - _tuple$1 = lookupProtocol(ctx, protostr); - proto$1 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$9 = ""; - _tmp$10 = 0; - _tmp$11 = err; - afnet = _tmp$9; - proto = _tmp$10; - err = _tmp$11; - return [afnet, proto, err]; - } - } - _tmp$12 = afnet; - _tmp$13 = proto$1; - _tmp$14 = $ifaceNil; - afnet = _tmp$12; - proto = _tmp$13; - err = _tmp$14; - return [afnet, proto, err]; - } - _tmp$15 = ""; - _tmp$16 = 0; - _tmp$17 = new UnknownNetworkError((network)); - afnet = _tmp$15; - proto = _tmp$16; - err = _tmp$17; - return [afnet, proto, err]; - }; - Resolver.ptr.prototype.resolveAddrList = function(ctx, op, network, addr, hint) { - var {$24r, $24r$1, $24r$2, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _v, addr, addr$1, addr$2, addr$3, addr$4, addr$5, addrs, afnet, ctx, err, err$1, hint, hint$1, hint$2, hint$3, ip, naddrs, network, op, r, tcp, udp, wildcard, $s, $r, $c} = $restore(this, {ctx, op, network, addr, hint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _tuple = parseNetwork(ctx, network, true); - afnet = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [addrList.nil, err]; - } - if (op === "dial" && addr === "") { - $s = -1; return [addrList.nil, errMissingAddress]; - } - _1 = afnet; - /* */ if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === ("unix") || _1 === ("unixgram") || _1 === ("unixpacket")) { */ case 2: - _tuple$1 = ResolveUnixAddr(afnet, addr); - addr$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [addrList.nil, err$1]; - } - if (!(op === "dial" && !($interfaceIsEqual(hint, $ifaceNil)))) { _v = false; $s = 6; continue s; } - _r = hint.Network(); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = !(addr$1.Network() === _r); case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - _r$1 = hint.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [addrList.nil, new AddrError.ptr("mismatched local address type", _r$1)]; - $s = 9; case 9: return $24r; - /* } */ case 5: - $s = -1; return [new addrList([addr$1]), $ifaceNil]; - /* } */ case 3: - case 1: - _r$2 = r.internetAddrList(ctx, afnet, addr); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - addrs = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) || !(op === "dial") || $interfaceIsEqual(hint, $ifaceNil)) { - $s = -1; return [addrs, err]; - } - tcp = ptrType$15.nil; - udp = ptrType$12.nil; - ip = ptrType$32.nil; - wildcard = false; - _ref = hint; - if ($assertType(_ref, ptrType$15, true)[1]) { - hint$1 = _ref.$val; - tcp = hint$1; - wildcard = tcp.isWildcard(); - } else if ($assertType(_ref, ptrType$12, true)[1]) { - hint$2 = _ref.$val; - udp = hint$2; - wildcard = udp.isWildcard(); - } else if ($assertType(_ref, ptrType$32, true)[1]) { - hint$3 = _ref.$val; - ip = hint$3; - wildcard = ip.isWildcard(); - } - naddrs = $subslice(addrs, 0, 0); - _ref$1 = addrs; - _i = 0; - /* while (true) { */ case 11: - /* if (!(_i < _ref$1.$length)) { break; } */ if(!(_i < _ref$1.$length)) { $s = 12; continue; } - addr$2 = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); - _r$3 = addr$2.Network(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = hint.Network(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!(_r$3 === _r$4)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(_r$3 === _r$4)) { */ case 13: - _r$5 = hint.String(); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = [addrList.nil, new AddrError.ptr("mismatched local address type", _r$5)]; - $s = 18; case 18: return $24r$1; - /* } */ case 14: - _ref$2 = addr$2; - if ($assertType(_ref$2, ptrType$15, true)[1]) { - addr$3 = _ref$2.$val; - if (!wildcard && !addr$3.isWildcard() && !addr$3.IP.matchAddrFamily(tcp.IP)) { - _i++; - /* continue; */ $s = 11; continue; - } - naddrs = $append(naddrs, addr$3); - } else if ($assertType(_ref$2, ptrType$12, true)[1]) { - addr$4 = _ref$2.$val; - if (!wildcard && !addr$4.isWildcard() && !addr$4.IP.matchAddrFamily(udp.IP)) { - _i++; - /* continue; */ $s = 11; continue; - } - naddrs = $append(naddrs, addr$4); - } else if ($assertType(_ref$2, ptrType$32, true)[1]) { - addr$5 = _ref$2.$val; - if (!wildcard && !addr$5.isWildcard() && !addr$5.IP.matchAddrFamily(ip.IP)) { - _i++; - /* continue; */ $s = 11; continue; - } - naddrs = $append(naddrs, addr$5); - } - _i++; - $s = 11; continue; - case 12: - /* */ if (naddrs.$length === 0) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (naddrs.$length === 0) { */ case 19: - _r$6 = errNoSuitableAddress.Error(); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = hint.String(); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$2 = [addrList.nil, new AddrError.ptr(_r$6, _r$7)]; - $s = 23; case 23: return $24r$2; - /* } */ case 20: - $s = -1; return [naddrs, $ifaceNil]; - /* */ } return; } var $f = {$blk: Resolver.ptr.prototype.resolveAddrList, $c: true, $r, $24r, $24r$1, $24r$2, _1, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _v, addr, addr$1, addr$2, addr$3, addr$4, addr$5, addrs, afnet, ctx, err, err$1, hint, hint$1, hint$2, hint$3, ip, naddrs, network, op, r, tcp, udp, wildcard, $s};return $f; - }; - Resolver.prototype.resolveAddrList = function(ctx, op, network, addr, hint) { return this.$val.resolveAddrList(ctx, op, network, addr, hint); }; - Dial = function(network, address) { - var {$24r, _r, address, d, network, $s, $r, $c} = $restore(this, {network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = new Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$9.nil, $chanNil, $throwNilPointerError); - _r = d.Dial(network, address); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Dial, $c: true, $r, $24r, _r, address, d, network, $s};return $f; - }; - $pkg.Dial = Dial; - Dialer.ptr.prototype.Dial = function(network, address) { - var {$24r, _r, address, d, network, $s, $r, $c} = $restore(this, {network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r = d.DialContext(context.Background(), network, address); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Dialer.ptr.prototype.Dial, $c: true, $r, $24r, _r, address, d, network, $s};return $f; - }; - Dialer.prototype.Dial = function(network, address) { return this.$val.Dial(network, address); }; - Dialer.ptr.prototype.DialContext = function(ctx, network, address) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, address, addrs, c, cancel, cancel$1, ctx, d, d$1, deadline, err, fallbacks, ka, network, ok, ok$1, oldCancel, primaries, resolveCtx, sd, shadow, subCtx, subCtx$1, tc, trace, x, x$1, x$2, x$3, $s, $deferred, $r, $c} = $restore(this, {ctx, network, address}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cancel = [cancel]; - oldCancel = [oldCancel]; - shadow = [shadow]; - subCtx = [subCtx]; - d = this; - if ($interfaceIsEqual(ctx, $ifaceNil)) { - $panic(new $String("nil context")); - } - _arg = ctx; - _r = time.Now(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = $clone(_r, time.Time); - _r$1 = d.deadline(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - deadline = $clone(_r$1, time.Time); - /* */ if (!$clone(deadline, time.Time).IsZero()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!$clone(deadline, time.Time).IsZero()) { */ case 3: - _r$2 = ctx.Deadline(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - d$1 = $clone(_tuple[0], time.Time); - ok = _tuple[1]; - /* */ if (!ok || $clone(deadline, time.Time).Before($clone(d$1, time.Time))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!ok || $clone(deadline, time.Time).Before($clone(d$1, time.Time))) { */ case 6: - _r$3 = context.WithDeadline(ctx, $clone(deadline, time.Time)); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - subCtx$1 = _tuple$1[0]; - cancel$1 = _tuple$1[1]; - $deferred.push([cancel$1, []]); - ctx = subCtx$1; - /* } */ case 7: - /* } */ case 4: - oldCancel[0] = d.Cancel; - /* */ if (!(oldCancel[0] === $chanNil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(oldCancel[0] === $chanNil)) { */ case 9: - _r$4 = context.WithCancel(ctx); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - subCtx[0] = _tuple$2[0]; - cancel[0] = _tuple$2[1]; - $deferred.push([cancel[0], []]); - $go((function(cancel, oldCancel, shadow, subCtx) { return function $b() { - var {_r$5, _r$6, _selection, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$5 = subCtx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $select([[oldCancel[0]], [_r$5]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _selection = _r$6; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_selection[0] === 0) { */ case 3: - $r = cancel[0](); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if (_selection[0] === 1) { */ case 4: - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, _selection, $s};return $f; - }; })(cancel, oldCancel, shadow, subCtx), []); - ctx = subCtx[0]; - /* } */ case 10: - resolveCtx = ctx; - _r$5 = ctx.Value((x = new nettrace.TraceKey.ptr(), new x.constructor.elem(x))); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = $assertType(_r$5, ptrType$33, true); - trace = _tuple$3[0]; - /* */ if (!(trace === ptrType$33.nil)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(trace === ptrType$33.nil)) { */ case 13: - shadow[0] = $clone(trace, nettrace.Trace); - shadow[0].ConnectStart = $throwNilPointerError; - shadow[0].ConnectDone = $throwNilPointerError; - _r$6 = context.WithValue(resolveCtx, (x$1 = new nettrace.TraceKey.ptr(), new x$1.constructor.elem(x$1)), shadow[0]); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - resolveCtx = _r$6; - /* } */ case 14: - _r$7 = d.resolver().resolveAddrList(resolveCtx, "dial", network, address, d.LocalAddr); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$4 = _r$7; - addrs = _tuple$4[0]; - err = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 17: - $24r = [$ifaceNil, new OpError.ptr("dial", network, $ifaceNil, $ifaceNil, err)]; - $s = 19; case 19: return $24r; - /* } */ case 18: - sd = new sysDialer.ptr($clone(d, Dialer), network, address); - _tmp = addrList.nil; - _tmp$1 = addrList.nil; - primaries = _tmp; - fallbacks = _tmp$1; - /* */ if (d.dualStack() && network === "tcp") { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (d.dualStack() && network === "tcp") { */ case 20: - _r$8 = addrs.partition(isIPv4); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$5 = _r$8; - primaries = _tuple$5[0]; - fallbacks = _tuple$5[1]; - $s = 22; continue; - /* } else { */ case 21: - primaries = addrs; - /* } */ case 22: - c = $ifaceNil; - /* */ if (fallbacks.$length > 0) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (fallbacks.$length > 0) { */ case 24: - _r$9 = sd.dialParallel(ctx, primaries, fallbacks); /* */ $s = 27; case 27: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$6 = _r$9; - c = _tuple$6[0]; - err = _tuple$6[1]; - $s = 26; continue; - /* } else { */ case 25: - _r$10 = sd.dialSerial(ctx, primaries); /* */ $s = 28; case 28: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$7 = _r$10; - c = _tuple$7[0]; - err = _tuple$7[1]; - /* } */ case 26: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 29: - $24r$1 = [$ifaceNil, err]; - $s = 31; case 31: return $24r$1; - /* } */ case 30: - _tuple$8 = $assertType(c, ptrType$16, true); - tc = _tuple$8[0]; - ok$1 = _tuple$8[1]; - /* */ if (ok$1 && (x$2 = d.KeepAlive, (x$2.$high > 0 || (x$2.$high === 0 && x$2.$low >= 0)))) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (ok$1 && (x$2 = d.KeepAlive, (x$2.$high > 0 || (x$2.$high === 0 && x$2.$low >= 0)))) { */ case 32: - setKeepAlive(tc.conn.fd, true); - ka = d.KeepAlive; - if ((x$3 = d.KeepAlive, (x$3.$high === 0 && x$3.$low === 0))) { - ka = new time.Duration(3, 2115098112); - } - setKeepAlivePeriod(tc.conn.fd, ka); - $r = testHookSetKeepAlive(ka); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 33: - $24r$2 = [c, $ifaceNil]; - $s = 35; case 35: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Dialer.ptr.prototype.DialContext, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, address, addrs, c, cancel, cancel$1, ctx, d, d$1, deadline, err, fallbacks, ka, network, ok, ok$1, oldCancel, primaries, resolveCtx, sd, shadow, subCtx, subCtx$1, tc, trace, x, x$1, x$2, x$3, $s, $deferred};return $f; } } - }; - Dialer.prototype.DialContext = function(ctx, network, address) { return this.$val.DialContext(ctx, network, address); }; - sysDialer.ptr.prototype.dialParallel = function(ctx, primaries, fallbacks) { - var {$24r, $24r$1, $24r$2, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _selection, _tmp, _tmp$1, _tuple, _tuple$1, ctx, fallback, fallbackCancel, fallbackCtx, fallbackTimer, fallbacks, primaries, primary, primaryCancel, primaryCtx, res, results, returned, sd, startRacer, $s, $deferred, $r, $c} = $restore(this, {ctx, primaries, fallbacks}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fallbacks = [fallbacks]; - primaries = [primaries]; - results = [results]; - returned = [returned]; - sd = [sd]; - sd[0] = this; - /* */ if (fallbacks[0].$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fallbacks[0].$length === 0) { */ case 1: - _r = sd[0].dialSerial(ctx, primaries[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - returned[0] = new $Chan(structType$2, 0); - $deferred.push([function(_arg) { $close(_arg); }, [returned[0]]]); - results[0] = new $Chan(dialResult, 0); - startRacer = (function(fallbacks, primaries, results, returned, sd) { return function $b(ctx$1, primary) { - var {_r$1, _r$2, _r$3, _selection, _tuple, c, ctx$1, err, primary, ras, $s, $r, $c} = $restore(this, {ctx$1, primary}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ras = primaries[0]; - if (!primary) { - ras = fallbacks[0]; - } - _r$1 = sd[0].dialSerial(ctx$1, ras); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - c = _tuple[0]; - err = _tuple[1]; - _r$2 = $select([[results[0], new dialResult.ptr(c, err, primary, true)], [returned[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection = _r$2; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_selection[0] === 0) { */ case 3: - $s = 5; continue; - /* } else if (_selection[0] === 1) { */ case 4: - /* */ if (!($interfaceIsEqual(c, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(c, $ifaceNil))) { */ case 6: - _r$3 = c.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 7: - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _r$2, _r$3, _selection, _tuple, c, ctx$1, err, primary, ras, $s};return $f; - }; })(fallbacks, primaries, results, returned, sd); - _tmp = new dialResult.ptr($ifaceNil, $ifaceNil, false, false); - _tmp$1 = new dialResult.ptr($ifaceNil, $ifaceNil, false, false); - primary = $clone(_tmp, dialResult); - fallback = $clone(_tmp$1, dialResult); - _r$1 = context.WithCancel(ctx); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - primaryCtx = _tuple[0]; - primaryCancel = _tuple[1]; - $deferred.push([primaryCancel, []]); - $go(startRacer, [primaryCtx, true]); - _r$2 = time.NewTimer(sd[0].Dialer.fallbackDelay()); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - fallbackTimer = _r$2; - $deferred.push([$methodVal(fallbackTimer, "Stop"), []]); - /* while (true) { */ case 7: - _r$3 = $select([[fallbackTimer.C], [results[0]]]); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 10; continue; } - /* */ if (_selection[0] === 1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_selection[0] === 0) { */ case 10: - _r$4 = context.WithCancel(ctx); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - fallbackCtx = _tuple$1[0]; - fallbackCancel = _tuple$1[1]; - $deferred.push([fallbackCancel, []]); - $go(startRacer, [fallbackCtx, false]); - $s = 12; continue; - /* } else if (_selection[0] === 1) { */ case 11: - res = $clone(_selection[1][0], dialResult); - /* */ if ($interfaceIsEqual(res.error, $ifaceNil)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ($interfaceIsEqual(res.error, $ifaceNil)) { */ case 14: - $24r$1 = [res.Conn, $ifaceNil]; - $s = 16; case 16: return $24r$1; - /* } */ case 15: - if (res.primary) { - dialResult.copy(primary, res); - } else { - dialResult.copy(fallback, res); - } - /* */ if (primary.done && fallback.done) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (primary.done && fallback.done) { */ case 17: - $24r$2 = [$ifaceNil, primary.error]; - $s = 19; case 19: return $24r$2; - /* } */ case 18: - /* */ if (res.primary && fallbackTimer.Stop()) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (res.primary && fallbackTimer.Stop()) { */ case 20: - _r$5 = fallbackTimer.Reset(new time.Duration(0, 0)); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 21: - /* } */ case 12: - $s = 7; continue; - case 8: - $s = -1; return [$ifaceNil, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: sysDialer.ptr.prototype.dialParallel, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _selection, _tmp, _tmp$1, _tuple, _tuple$1, ctx, fallback, fallbackCancel, fallbackCtx, fallbackTimer, fallbacks, primaries, primary, primaryCancel, primaryCtx, res, results, returned, sd, startRacer, $s, $deferred};return $f; } } - }; - sysDialer.prototype.dialParallel = function(ctx, primaries, fallbacks) { return this.$val.dialParallel(ctx, primaries, fallbacks); }; - sysDialer.ptr.prototype.dialSerial = function(ctx, ras) { - var {$24r, $24r$1, $24r$2, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, c, cancel, ctx, deadline, dialCtx, err, err$1, firstErr, hasDeadline, i, partialDeadline$1, ra, ras, sd, $s, $deferred, $r, $c} = $restore(this, {ctx, ras}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - sd = this; - firstErr = $ifaceNil; - _ref = ras; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - ra = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = ctx.Done(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _selection = $select([[_r], []]); - /* */ if (_selection[0] === 0) { $s = 4; continue; } - /* */ if (_selection[0] === 1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_selection[0] === 0) { */ case 4: - _r$1 = ctx.Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = mapErr(_r$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [$ifaceNil, new OpError.ptr("dial", sd.network, sd.Dialer.LocalAddr, ra, _r$2)]; - $s = 9; case 9: return $24r; - /* } else if (_selection[0] === 1) { */ case 5: - /* } */ case 6: - dialCtx = ctx; - _r$3 = ctx.Deadline(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - deadline = $clone(_tuple[0], time.Time); - hasDeadline = _tuple[1]; - /* */ if (hasDeadline) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (hasDeadline) { */ case 11: - _r$4 = time.Now(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = partialDeadline($clone(_r$4, time.Time), $clone(deadline, time.Time), ras.$length - i >> 0); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - partialDeadline$1 = $clone(_tuple$1[0], time.Time); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(firstErr, $ifaceNil)) { - firstErr = new OpError.ptr("dial", sd.network, sd.Dialer.LocalAddr, ra, err); - } - /* break; */ $s = 2; continue; - } - /* */ if ($clone(partialDeadline$1, time.Time).Before($clone(deadline, time.Time))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($clone(partialDeadline$1, time.Time).Before($clone(deadline, time.Time))) { */ case 15: - cancel = $throwNilPointerError; - _r$6 = context.WithDeadline(ctx, $clone(partialDeadline$1, time.Time)); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - dialCtx = _tuple$2[0]; - cancel = _tuple$2[1]; - $deferred.push([cancel, []]); - /* } */ case 16: - /* } */ case 12: - _r$7 = sd.dialSingle(dialCtx, ra); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - c = _tuple$3[0]; - err$1 = _tuple$3[1]; - /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 19: - $24r$1 = [c, $ifaceNil]; - $s = 21; case 21: return $24r$1; - /* } */ case 20: - if ($interfaceIsEqual(firstErr, $ifaceNil)) { - firstErr = err$1; - } - _i++; - $s = 1; continue; - case 2: - if ($interfaceIsEqual(firstErr, $ifaceNil)) { - firstErr = new OpError.ptr("dial", sd.network, $ifaceNil, $ifaceNil, errMissingAddress); - } - $24r$2 = [$ifaceNil, firstErr]; - $s = 22; case 22: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: sysDialer.ptr.prototype.dialSerial, $c: true, $r, $24r, $24r$1, $24r$2, _i, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, c, cancel, ctx, deadline, dialCtx, err, err$1, firstErr, hasDeadline, i, partialDeadline$1, ra, ras, sd, $s, $deferred};return $f; } } - }; - sysDialer.prototype.dialSerial = function(ctx, ras) { return this.$val.dialSerial(ctx, ras); }; - sysDialer.ptr.prototype.dialSingle = function(ctx, ra) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, c, ctx, err, la, la$1, la$2, la$3, la$4, ra, ra$1, ra$2, ra$3, ra$4, ra$5, raStr, sd, trace, x, $s, $deferred, $r, $c} = $restore(this, {ctx, ra}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - raStr = [raStr]; - sd = [sd]; - trace = [trace]; - c = $ifaceNil; - err[0] = $ifaceNil; - sd[0] = this; - _r = ctx.Value((x = new nettrace.TraceKey.ptr(), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = $assertType(_r, ptrType$33, true); - trace[0] = _tuple[0]; - /* */ if (!(trace[0] === ptrType$33.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(trace[0] === ptrType$33.nil)) { */ case 2: - _r$1 = ra.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - raStr[0] = _r$1; - /* */ if (!(trace[0].ConnectStart === $throwNilPointerError)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(trace[0].ConnectStart === $throwNilPointerError)) { */ case 5: - $r = trace[0].ConnectStart(sd[0].network, raStr[0]); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - /* */ if (!(trace[0].ConnectDone === $throwNilPointerError)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(trace[0].ConnectDone === $throwNilPointerError)) { */ case 8: - $deferred.push([(function(err, raStr, sd, trace) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = trace[0].ConnectDone(sd[0].network, raStr[0], err[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(err, raStr, sd, trace), []]); - /* } */ case 9: - /* } */ case 3: - la = sd[0].Dialer.LocalAddr; - _ref = ra; - /* */ if ($assertType(_ref, ptrType$15, true)[1]) { $s = 10; continue; } - /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 11; continue; } - /* */ if ($assertType(_ref, ptrType$32, true)[1]) { $s = 12; continue; } - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($assertType(_ref, ptrType$15, true)[1]) { */ case 10: - ra$1 = _ref.$val; - _tuple$1 = $assertType(la, ptrType$15, true); - la$1 = _tuple$1[0]; - _r$2 = sd[0].dialTCP(ctx, la$1, ra$1); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - c = _tuple$2[0]; - err[0] = _tuple$2[1]; - $s = 15; continue; - /* } else if ($assertType(_ref, ptrType$12, true)[1]) { */ case 11: - ra$2 = _ref.$val; - _tuple$3 = $assertType(la, ptrType$12, true); - la$2 = _tuple$3[0]; - _r$3 = sd[0].dialUDP(ctx, la$2, ra$2); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$4 = _r$3; - c = _tuple$4[0]; - err[0] = _tuple$4[1]; - $s = 15; continue; - /* } else if ($assertType(_ref, ptrType$32, true)[1]) { */ case 12: - ra$3 = _ref.$val; - _tuple$5 = $assertType(la, ptrType$32, true); - la$3 = _tuple$5[0]; - _r$4 = sd[0].dialIP(ctx, la$3, ra$3); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$6 = _r$4; - c = _tuple$6[0]; - err[0] = _tuple$6[1]; - $s = 15; continue; - /* } else if ($assertType(_ref, ptrType$5, true)[1]) { */ case 13: - ra$4 = _ref.$val; - _tuple$7 = $assertType(la, ptrType$5, true); - la$4 = _tuple$7[0]; - _r$5 = sd[0].dialUnix(ctx, la$4, ra$4); /* */ $s = 19; case 19: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$8 = _r$5; - c = _tuple$8[0]; - err[0] = _tuple$8[1]; - $s = 15; continue; - /* } else { */ case 14: - ra$5 = _ref; - _tmp = $ifaceNil; - _tmp$1 = new OpError.ptr("dial", sd[0].network, la, ra$5, new AddrError.ptr("unexpected address type", sd[0].address)); - c = _tmp; - err[0] = _tmp$1; - $24r = [c, err[0]]; - $s = 20; case 20: return $24r; - /* } */ case 15: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 21: - _tmp$2 = $ifaceNil; - _tmp$3 = new OpError.ptr("dial", sd[0].network, la, ra, err[0]); - c = _tmp$2; - err[0] = _tmp$3; - $24r$1 = [c, err[0]]; - $s = 23; case 23: return $24r$1; - /* } */ case 22: - _tmp$4 = c; - _tmp$5 = $ifaceNil; - c = _tmp$4; - err[0] = _tmp$5; - $24r$2 = [c, err[0]]; - $s = 24; case 24: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [c, err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: sysDialer.ptr.prototype.dialSingle, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, c, ctx, err, la, la$1, la$2, la$3, la$4, ra, ra$1, ra$2, ra$3, ra$4, ra$5, raStr, sd, trace, x, $s, $deferred};return $f; } } - }; - sysDialer.prototype.dialSingle = function(ctx, ra) { return this.$val.dialSingle(ctx, ra); }; - ListenConfig.ptr.prototype.Listen = function(ctx, network, address) { - var {_r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, address, addrs, ctx, err, l, la, la$1, la$2, la$3, lc, network, sl, $s, $r, $c} = $restore(this, {ctx, network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lc = this; - _r = $pkg.DefaultResolver.resolveAddrList(ctx, "listen", network, address, $ifaceNil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - addrs = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new OpError.ptr("listen", network, $ifaceNil, $ifaceNil, err)]; - } - sl = new sysListener.ptr($clone(lc, ListenConfig), network, address); - l = $ifaceNil; - _r$1 = addrs.first(isIPv4); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - la = _r$1; - _ref = la; - /* */ if ($assertType(_ref, ptrType$15, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($assertType(_ref, ptrType$15, true)[1]) { */ case 3: - la$1 = _ref.$val; - _r$2 = sl.listenTCP(ctx, la$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - l = _tuple$1[0]; - err = _tuple$1[1]; - $s = 6; continue; - /* } else if ($assertType(_ref, ptrType$5, true)[1]) { */ case 4: - la$2 = _ref.$val; - _r$3 = sl.listenUnix(ctx, la$2); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - l = _tuple$2[0]; - err = _tuple$2[1]; - $s = 6; continue; - /* } else { */ case 5: - la$3 = _ref; - $s = -1; return [$ifaceNil, new OpError.ptr("listen", sl.network, $ifaceNil, la$3, new AddrError.ptr("unexpected address type", address))]; - /* } */ case 6: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new OpError.ptr("listen", sl.network, $ifaceNil, la, err)]; - } - $s = -1; return [l, $ifaceNil]; - /* */ } return; } var $f = {$blk: ListenConfig.ptr.prototype.Listen, $c: true, $r, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, address, addrs, ctx, err, l, la, la$1, la$2, la$3, lc, network, sl, $s};return $f; - }; - ListenConfig.prototype.Listen = function(ctx, network, address) { return this.$val.Listen(ctx, network, address); }; - ListenConfig.ptr.prototype.ListenPacket = function(ctx, network, address) { - var {_r, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, address, addrs, c, ctx, err, la, la$1, la$2, la$3, la$4, lc, network, sl, $s, $r, $c} = $restore(this, {ctx, network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lc = this; - _r = $pkg.DefaultResolver.resolveAddrList(ctx, "listen", network, address, $ifaceNil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - addrs = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new OpError.ptr("listen", network, $ifaceNil, $ifaceNil, err)]; - } - sl = new sysListener.ptr($clone(lc, ListenConfig), network, address); - c = $ifaceNil; - _r$1 = addrs.first(isIPv4); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - la = _r$1; - _ref = la; - /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, ptrType$32, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, ptrType$5, true)[1]) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($assertType(_ref, ptrType$12, true)[1]) { */ case 3: - la$1 = _ref.$val; - _r$2 = sl.listenUDP(ctx, la$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - c = _tuple$1[0]; - err = _tuple$1[1]; - $s = 7; continue; - /* } else if ($assertType(_ref, ptrType$32, true)[1]) { */ case 4: - la$2 = _ref.$val; - _r$3 = sl.listenIP(ctx, la$2); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - c = _tuple$2[0]; - err = _tuple$2[1]; - $s = 7; continue; - /* } else if ($assertType(_ref, ptrType$5, true)[1]) { */ case 5: - la$3 = _ref.$val; - _r$4 = sl.listenUnixgram(ctx, la$3); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - c = _tuple$3[0]; - err = _tuple$3[1]; - $s = 7; continue; - /* } else { */ case 6: - la$4 = _ref; - $s = -1; return [$ifaceNil, new OpError.ptr("listen", sl.network, $ifaceNil, la$4, new AddrError.ptr("unexpected address type", address))]; - /* } */ case 7: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, new OpError.ptr("listen", sl.network, $ifaceNil, la, err)]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: ListenConfig.ptr.prototype.ListenPacket, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, address, addrs, c, ctx, err, la, la$1, la$2, la$3, la$4, lc, network, sl, $s};return $f; - }; - ListenConfig.prototype.ListenPacket = function(ctx, network, address) { return this.$val.ListenPacket(ctx, network, address); }; - Listen = function(network, address) { - var {$24r, _r, address, lc, network, $s, $r, $c} = $restore(this, {network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lc = new ListenConfig.ptr($throwNilPointerError, new time.Duration(0, 0)); - _r = lc.Listen(context.Background(), network, address); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Listen, $c: true, $r, $24r, _r, address, lc, network, $s};return $f; - }; - $pkg.Listen = Listen; - init = function() { - netGo = true; - }; - ptrType$5.methods = [{prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}, {prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}]; - ptrType$6.methods = [{prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, ptrType$5, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$5, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, ptrType$5], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$5], [$Int, $Int, $error], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "CloseRead", name: "CloseRead", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadFromUnix", name: "ReadFromUnix", pkg: "", typ: $funcType([sliceType$1], [$Int, ptrType$5, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "ReadMsgUnix", name: "ReadMsgUnix", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$5, $error], false)}, {prop: "WriteToUnix", name: "WriteToUnix", pkg: "", typ: $funcType([sliceType$1, ptrType$5], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}, {prop: "WriteMsgUnix", name: "WriteMsgUnix", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$5], [$Int, $Int, $error], false)}]; - ptrType$8.methods = [{prop: "accept", name: "accept", pkg: "net", typ: $funcType([], [ptrType$6, $error], false)}, {prop: "close", name: "close", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "file", name: "file", pkg: "net", typ: $funcType([], [ptrType$7, $error], false)}, {prop: "SetUnlinkOnClose", name: "SetUnlinkOnClose", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "AcceptUnix", name: "AcceptUnix", pkg: "", typ: $funcType([], [ptrType$6, $error], false)}, {prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [Conn, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "File", name: "File", pkg: "", typ: $funcType([], [ptrType$7, $error], false)}]; - ptrType$12.methods = [{prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}, {prop: "AddrPort", name: "AddrPort", pkg: "", typ: $funcType([], [netip.AddrPort], false)}, {prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}]; - addrPortUDPAddr.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$13.methods = [{prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1, ptrType$12], [$Int, ptrType$12, $error], false)}, {prop: "readFromAddrPort", name: "readFromAddrPort", pkg: "net", typ: $funcType([sliceType$1], [$Int, netip.AddrPort, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, netip.AddrPort, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, ptrType$12], [$Int, $error], false)}, {prop: "writeToAddrPort", name: "writeToAddrPort", pkg: "net", typ: $funcType([sliceType$1, netip.AddrPort], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$12], [$Int, $Int, $error], false)}, {prop: "writeMsgAddrPort", name: "writeMsgAddrPort", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, netip.AddrPort], [$Int, $Int, $error], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "ReadFromUDP", name: "ReadFromUDP", pkg: "", typ: $funcType([sliceType$1], [$Int, ptrType$12, $error], false)}, {prop: "readFromUDP", name: "readFromUDP", pkg: "net", typ: $funcType([sliceType$1, ptrType$12], [$Int, ptrType$12, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "ReadFromUDPAddrPort", name: "ReadFromUDPAddrPort", pkg: "", typ: $funcType([sliceType$1], [$Int, netip.AddrPort, $error], false)}, {prop: "ReadMsgUDP", name: "ReadMsgUDP", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$12, $error], false)}, {prop: "ReadMsgUDPAddrPort", name: "ReadMsgUDPAddrPort", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, netip.AddrPort, $error], false)}, {prop: "WriteToUDP", name: "WriteToUDP", pkg: "", typ: $funcType([sliceType$1, ptrType$12], [$Int, $error], false)}, {prop: "WriteToUDPAddrPort", name: "WriteToUDPAddrPort", pkg: "", typ: $funcType([sliceType$1, netip.AddrPort], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}, {prop: "WriteMsgUDP", name: "WriteMsgUDP", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$12], [$Int, $Int, $error], false)}, {prop: "WriteMsgUDPAddrPort", name: "WriteMsgUDPAddrPort", pkg: "", typ: $funcType([sliceType$1, sliceType$1, netip.AddrPort], [$Int, $Int, $error], false)}]; - ptrType$15.methods = [{prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}, {prop: "AddrPort", name: "AddrPort", pkg: "", typ: $funcType([], [netip.AddrPort], false)}, {prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}]; - ptrType$16.methods = [{prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "CloseRead", name: "CloseRead", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "SetLinger", name: "SetLinger", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "SetKeepAlive", name: "SetKeepAlive", pkg: "", typ: $funcType([$Bool], [$error], false)}, {prop: "SetKeepAlivePeriod", name: "SetKeepAlivePeriod", pkg: "", typ: $funcType([time.Duration], [$error], false)}, {prop: "SetNoDelay", name: "SetNoDelay", pkg: "", typ: $funcType([$Bool], [$error], false)}]; - ptrType$19.methods = [{prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "accept", name: "accept", pkg: "net", typ: $funcType([], [ptrType$16, $error], false)}, {prop: "close", name: "close", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "file", name: "file", pkg: "net", typ: $funcType([], [ptrType$7, $error], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "AcceptTCP", name: "AcceptTCP", pkg: "", typ: $funcType([], [ptrType$16, $error], false)}, {prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [Conn, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "File", name: "File", pkg: "", typ: $funcType([], [ptrType$7, $error], false)}]; - ptrType$20.methods = [{prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "Control", name: "Control", pkg: "", typ: $funcType([funcType$1], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$2], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$2], [$error], false)}]; - ptrType$36.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([funcType$2], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([funcType$2], [$error], false)}]; - ptrType$22.methods = [{prop: "close", name: "close", pkg: "net", typ: $funcType([], [], false)}, {prop: "getLineFromData", name: "getLineFromData", pkg: "net", typ: $funcType([], [$String, $Bool], false)}, {prop: "readLine", name: "readLine", pkg: "net", typ: $funcType([], [$String, $Bool], false)}]; - ptrType$3.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "closeRead", name: "closeRead", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "closeWrite", name: "closeWrite", pkg: "net", typ: $funcType([], [$error], false)}, {prop: "accept", name: "accept", pkg: "net", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, syscall.Sockaddr, $error], false)}, {prop: "readFromInet4", name: "readFromInet4", pkg: "net", typ: $funcType([sliceType$1, ptrType$10], [$Int, $error], false)}, {prop: "readFromInet6", name: "readFromInet6", pkg: "net", typ: $funcType([sliceType$1, ptrType$11], [$Int, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, $Int], [$Int, $Int, $Int, syscall.Sockaddr, $error], false)}, {prop: "readMsgInet4", name: "readMsgInet4", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, $Int, ptrType$10], [$Int, $Int, $Int, $error], false)}, {prop: "readMsgInet6", name: "readMsgInet6", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, $Int, ptrType$11], [$Int, $Int, $Int, $error], false)}, {prop: "writeMsgInet4", name: "writeMsgInet4", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$10], [$Int, $Int, $error], false)}, {prop: "writeMsgInet6", name: "writeMsgInet6", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$11], [$Int, $Int, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, syscall.Sockaddr], [$Int, $error], false)}, {prop: "writeToInet4", name: "writeToInet4", pkg: "net", typ: $funcType([sliceType$1, ptrType$10], [$Int, $error], false)}, {prop: "writeToInet6", name: "writeToInet6", pkg: "net", typ: $funcType([sliceType$1, ptrType$11], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, syscall.Sockaddr], [$Int, $Int, $error], false)}, {prop: "dup", name: "dup", pkg: "net", typ: $funcType([], [ptrType$7, $error], false)}]; - ptrType$23.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [], false)}]; - ptrType$26.methods = [{prop: "ok", name: "ok", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "RemoteAddr", name: "RemoteAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadBuffer", name: "SetReadBuffer", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "SetWriteBuffer", name: "SetWriteBuffer", pkg: "", typ: $funcType([$Int], [$error], false)}, {prop: "File", name: "File", pkg: "", typ: $funcType([], [ptrType$7, $error], false)}]; - ptrType$17.methods = [{prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$39.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$27.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - UnknownNetworkError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$40.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$28.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - HardwareAddr.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$9.methods = [{prop: "lookupHost", name: "lookupHost", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "lookupIP", name: "lookupIP", pkg: "net", typ: $funcType([context.Context, $String, $String], [sliceType$3, $error], false)}, {prop: "lookupPort", name: "lookupPort", pkg: "net", typ: $funcType([context.Context, $String, $String], [$Int, $error], false)}, {prop: "lookupCNAME", name: "lookupCNAME", pkg: "net", typ: $funcType([context.Context, $String], [$String, $error], false)}, {prop: "lookupSRV", name: "lookupSRV", pkg: "net", typ: $funcType([context.Context, $String, $String, $String], [$String, sliceType$4, $error], false)}, {prop: "lookupMX", name: "lookupMX", pkg: "net", typ: $funcType([context.Context, $String], [sliceType$5, $error], false)}, {prop: "lookupNS", name: "lookupNS", pkg: "net", typ: $funcType([context.Context, $String], [sliceType$6, $error], false)}, {prop: "lookupTXT", name: "lookupTXT", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "lookupAddr", name: "lookupAddr", pkg: "net", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "preferGo", name: "preferGo", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "strictErrors", name: "strictErrors", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "getLookupGroup", name: "getLookupGroup", pkg: "net", typ: $funcType([], [ptrType$42], false)}, {prop: "LookupHost", name: "LookupHost", pkg: "", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "LookupIPAddr", name: "LookupIPAddr", pkg: "", typ: $funcType([context.Context, $String], [sliceType$3, $error], false)}, {prop: "LookupIP", name: "LookupIP", pkg: "", typ: $funcType([context.Context, $String, $String], [sliceType$7, $error], false)}, {prop: "LookupNetIP", name: "LookupNetIP", pkg: "", typ: $funcType([context.Context, $String, $String], [sliceType$8, $error], false)}, {prop: "lookupIPAddr", name: "lookupIPAddr", pkg: "net", typ: $funcType([context.Context, $String, $String], [sliceType$3, $error], false)}, {prop: "LookupPort", name: "LookupPort", pkg: "", typ: $funcType([context.Context, $String, $String], [$Int, $error], false)}, {prop: "LookupCNAME", name: "LookupCNAME", pkg: "", typ: $funcType([context.Context, $String], [$String, $error], false)}, {prop: "LookupSRV", name: "LookupSRV", pkg: "", typ: $funcType([context.Context, $String, $String, $String], [$String, sliceType$4, $error], false)}, {prop: "LookupMX", name: "LookupMX", pkg: "", typ: $funcType([context.Context, $String], [sliceType$5, $error], false)}, {prop: "LookupNS", name: "LookupNS", pkg: "", typ: $funcType([context.Context, $String], [sliceType$6, $error], false)}, {prop: "LookupTXT", name: "LookupTXT", pkg: "", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "LookupAddr", name: "LookupAddr", pkg: "", typ: $funcType([context.Context, $String], [sliceType, $error], false)}, {prop: "internetAddrList", name: "internetAddrList", pkg: "net", typ: $funcType([context.Context, $String, $String], [addrList, $error], false)}, {prop: "resolveAddrList", name: "resolveAddrList", pkg: "net", typ: $funcType([context.Context, $String, $String, $String, Addr], [addrList, $error], false)}]; - ptrType$2.methods = [{prop: "Value", name: "Value", pkg: "", typ: $funcType([$emptyInterface], [$emptyInterface], false)}]; - ptrType$43.methods = [{prop: "probe", name: "probe", pkg: "net", typ: $funcType([], [], false)}]; - addrList.methods = [{prop: "forResolve", name: "forResolve", pkg: "net", typ: $funcType([$String, $String], [Addr], false)}, {prop: "first", name: "first", pkg: "net", typ: $funcType([funcType$4], [Addr], false)}, {prop: "partition", name: "partition", pkg: "net", typ: $funcType([funcType$4], [addrList, addrList], false)}]; - ptrType$32.methods = [{prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}, {prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "opAddr", name: "opAddr", pkg: "net", typ: $funcType([], [Addr], false)}]; - ptrType$34.methods = [{prop: "readFrom", name: "readFrom", pkg: "net", typ: $funcType([sliceType$1], [$Int, ptrType$32, $error], false)}, {prop: "readMsg", name: "readMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$32, $error], false)}, {prop: "writeTo", name: "writeTo", pkg: "net", typ: $funcType([sliceType$1, ptrType$32], [$Int, $error], false)}, {prop: "writeMsg", name: "writeMsg", pkg: "net", typ: $funcType([sliceType$1, sliceType$1, ptrType$32], [$Int, $Int, $error], false)}, {prop: "SyscallConn", name: "SyscallConn", pkg: "", typ: $funcType([], [syscall.RawConn, $error], false)}, {prop: "ReadFromIP", name: "ReadFromIP", pkg: "", typ: $funcType([sliceType$1], [$Int, ptrType$32, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "ReadMsgIP", name: "ReadMsgIP", pkg: "", typ: $funcType([sliceType$1, sliceType$1], [$Int, $Int, $Int, ptrType$32, $error], false)}, {prop: "WriteToIP", name: "WriteToIP", pkg: "", typ: $funcType([sliceType$1, ptrType$32], [$Int, $error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}, {prop: "WriteMsgIP", name: "WriteMsgIP", pkg: "", typ: $funcType([sliceType$1, sliceType$1, ptrType$32], [$Int, $Int, $error], false)}]; - IP.methods = [{prop: "IsUnspecified", name: "IsUnspecified", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLoopback", name: "IsLoopback", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsPrivate", name: "IsPrivate", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsMulticast", name: "IsMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsInterfaceLocalMulticast", name: "IsInterfaceLocalMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLinkLocalMulticast", name: "IsLinkLocalMulticast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsLinkLocalUnicast", name: "IsLinkLocalUnicast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsGlobalUnicast", name: "IsGlobalUnicast", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "To4", name: "To4", pkg: "", typ: $funcType([], [IP], false)}, {prop: "To16", name: "To16", pkg: "", typ: $funcType([], [IP], false)}, {prop: "DefaultMask", name: "DefaultMask", pkg: "", typ: $funcType([], [IPMask], false)}, {prop: "Mask", name: "Mask", pkg: "", typ: $funcType([IPMask], [IP], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([IP], [$Bool], false)}, {prop: "matchAddrFamily", name: "matchAddrFamily", pkg: "net", typ: $funcType([IP], [$Bool], false)}]; - ptrType$44.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$1], [$error], false)}]; - IPMask.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int, $Int], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$35.methods = [{prop: "Contains", name: "Contains", pkg: "", typ: $funcType([IP], [$Bool], false)}, {prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$14.methods = [{prop: "Addrs", name: "Addrs", pkg: "", typ: $funcType([], [sliceType$12, $error], false)}, {prop: "MulticastAddrs", name: "MulticastAddrs", pkg: "", typ: $funcType([], [sliceType$12, $error], false)}]; - Flags.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$45.methods = [{prop: "update", name: "update", pkg: "net", typ: $funcType([sliceType$11, $Bool], [$Bool], false)}, {prop: "name", name: "name", pkg: "net", typ: $funcType([$Int], [$String], false)}, {prop: "index", name: "index", pkg: "net", typ: $funcType([$String], [$Int], false)}]; - ptrType$46.methods = [{prop: "dualStack", name: "dualStack", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "deadline", name: "deadline", pkg: "net", typ: $funcType([context.Context, time.Time], [time.Time], false)}, {prop: "resolver", name: "resolver", pkg: "net", typ: $funcType([], [ptrType$9], false)}, {prop: "fallbackDelay", name: "fallbackDelay", pkg: "net", typ: $funcType([], [time.Duration], false)}, {prop: "Dial", name: "Dial", pkg: "", typ: $funcType([$String, $String], [Conn, $error], false)}, {prop: "DialContext", name: "DialContext", pkg: "", typ: $funcType([context.Context, $String, $String], [Conn, $error], false)}]; - ptrType$47.methods = [{prop: "dialUnix", name: "dialUnix", pkg: "net", typ: $funcType([context.Context, ptrType$5, ptrType$5], [ptrType$6, $error], false)}, {prop: "dialUDP", name: "dialUDP", pkg: "net", typ: $funcType([context.Context, ptrType$12, ptrType$12], [ptrType$13, $error], false)}, {prop: "dialTCP", name: "dialTCP", pkg: "net", typ: $funcType([context.Context, ptrType$15, ptrType$15], [ptrType$16, $error], false)}, {prop: "doDialTCP", name: "doDialTCP", pkg: "net", typ: $funcType([context.Context, ptrType$15, ptrType$15], [ptrType$16, $error], false)}, {prop: "dialIP", name: "dialIP", pkg: "net", typ: $funcType([context.Context, ptrType$32, ptrType$32], [ptrType$34, $error], false)}, {prop: "dialParallel", name: "dialParallel", pkg: "net", typ: $funcType([context.Context, addrList, addrList], [Conn, $error], false)}, {prop: "dialSerial", name: "dialSerial", pkg: "net", typ: $funcType([context.Context, addrList], [Conn, $error], false)}, {prop: "dialSingle", name: "dialSingle", pkg: "net", typ: $funcType([context.Context, Addr], [Conn, $error], false)}]; - ptrType$48.methods = [{prop: "Listen", name: "Listen", pkg: "", typ: $funcType([context.Context, $String, $String], [Listener, $error], false)}, {prop: "ListenPacket", name: "ListenPacket", pkg: "", typ: $funcType([context.Context, $String, $String], [PacketConn, $error], false)}]; - ptrType$49.methods = [{prop: "listenUnix", name: "listenUnix", pkg: "net", typ: $funcType([context.Context, ptrType$5], [ptrType$8, $error], false)}, {prop: "listenUnixgram", name: "listenUnixgram", pkg: "net", typ: $funcType([context.Context, ptrType$5], [ptrType$6, $error], false)}, {prop: "listenUDP", name: "listenUDP", pkg: "net", typ: $funcType([context.Context, ptrType$12], [ptrType$13, $error], false)}, {prop: "listenMulticastUDP", name: "listenMulticastUDP", pkg: "net", typ: $funcType([context.Context, ptrType$14, ptrType$12], [ptrType$13, $error], false)}, {prop: "listenTCP", name: "listenTCP", pkg: "net", typ: $funcType([context.Context, ptrType$15], [ptrType$19, $error], false)}, {prop: "listenIP", name: "listenIP", pkg: "net", typ: $funcType([context.Context, ptrType$32], [ptrType$34, $error], false)}]; - UnixAddr.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Net", name: "Net", embedded: false, exported: true, typ: $String, tag: ""}]); - UnixConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); - UnixListener.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "unlink", name: "unlink", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "unlinkOnce", name: "unlinkOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}]); - UDPAddr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Zone", name: "Zone", embedded: false, exported: true, typ: $String, tag: ""}]); - addrPortUDPAddr.init("", [{prop: "AddrPort", name: "AddrPort", embedded: true, exported: true, typ: netip.AddrPort, tag: ""}]); - UDPConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); - TCPAddr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Zone", name: "Zone", embedded: false, exported: true, typ: $String, tag: ""}]); - TCPConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); - TCPListener.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "lc", name: "lc", embedded: false, exported: false, typ: ListenConfig, tag: ""}]); - sockaddr.init([{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "family", name: "family", pkg: "net", typ: $funcType([], [$Int], false)}, {prop: "isWildcard", name: "isWildcard", pkg: "net", typ: $funcType([], [$Bool], false)}, {prop: "sockaddr", name: "sockaddr", pkg: "net", typ: $funcType([$Int], [syscall.Sockaddr, $error], false)}, {prop: "toLocal", name: "toLocal", pkg: "net", typ: $funcType([$String], [sockaddr], false)}]); - rawConn.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$3, tag: ""}]); - rawListener.init("net", [{prop: "rawConn", name: "rawConn", embedded: true, exported: false, typ: rawConn, tag: ""}]); - file.init("net", [{prop: "file", name: "file", embedded: false, exported: false, typ: ptrType$7, tag: ""}, {prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "atEOF", name: "atEOF", embedded: false, exported: false, typ: $Bool, tag: ""}]); - netFD.init("net", [{prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$23, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: ptrType$23, tag: ""}, {prop: "incoming", name: "incoming", embedded: false, exported: false, typ: chanType$6, tag: ""}, {prop: "closedMu", name: "closedMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "listener", name: "listener", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "family", name: "family", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "sotype", name: "sotype", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "net", name: "net", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "laddr", name: "laddr", embedded: false, exported: false, typ: Addr, tag: ""}, {prop: "raddr", name: "raddr", embedded: false, exported: false, typ: Addr, tag: ""}, {prop: "pfd", name: "pfd", embedded: false, exported: false, typ: poll.FD, tag: ""}, {prop: "isConnected", name: "isConnected", embedded: false, exported: false, typ: $Bool, tag: ""}]); - bufferedPipe.init("net", [{prop: "softLimit", name: "softLimit", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rCond", name: "rCond", embedded: false, exported: false, typ: sync.Cond, tag: ""}, {prop: "wCond", name: "wCond", embedded: false, exported: false, typ: sync.Cond, tag: ""}, {prop: "rDeadline", name: "rDeadline", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "wDeadline", name: "wDeadline", embedded: false, exported: false, typ: time.Time, tag: ""}]); - Addr.init([{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]); - Conn.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "RemoteAddr", name: "RemoteAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]); - conn.init("net", [{prop: "fd", name: "fd", embedded: false, exported: false, typ: ptrType$3, tag: ""}]); - PacketConn.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([sliceType$1], [$Int, Addr, $error], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([sliceType$1, Addr], [$Int, $error], false)}]); - Listener.init([{prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [Conn, $error], false)}, {prop: "Addr", name: "Addr", pkg: "", typ: $funcType([], [Addr], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]); - Error.init([{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); - OpError.init("", [{prop: "Op", name: "Op", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Net", name: "Net", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Source", name: "Source", embedded: false, exported: true, typ: Addr, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: Addr, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - timeout.init([{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); - temporary.init([{prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]); - ParseError.init("", [{prop: "Type", name: "Type", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Text", name: "Text", embedded: false, exported: true, typ: $String, tag: ""}]); - AddrError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Addr", name: "Addr", embedded: false, exported: true, typ: $String, tag: ""}]); - timeoutError.init("", []); - DNSError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Server", name: "Server", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "IsTimeout", name: "IsTimeout", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsTemporary", name: "IsTemporary", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsNotFound", name: "IsNotFound", embedded: false, exported: true, typ: $Bool, tag: ""}]); - writerOnly.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]); - HardwareAddr.init($Uint8); - Resolver.init("net", [{prop: "PreferGo", name: "PreferGo", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "StrictErrors", name: "StrictErrors", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Dial", name: "Dial", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "lookupGroup", name: "lookupGroup", embedded: false, exported: false, typ: singleflight.Group, tag: ""}]); - onlyValuesCtx.init("net", [{prop: "Context", name: "Context", embedded: true, exported: true, typ: context.Context, tag: ""}, {prop: "lookupValues", name: "lookupValues", embedded: false, exported: false, typ: context.Context, tag: ""}]); - ipStackCapabilities.init("net", [{prop: "Once", name: "Once", embedded: true, exported: true, typ: sync.Once, tag: ""}, {prop: "ipv4Enabled", name: "ipv4Enabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ipv6Enabled", name: "ipv6Enabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ipv4MappedIPv6Enabled", name: "ipv4MappedIPv6Enabled", embedded: false, exported: false, typ: $Bool, tag: ""}]); - addrList.init(Addr); - IPAddr.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Zone", name: "Zone", embedded: false, exported: true, typ: $String, tag: ""}]); - IPConn.init("net", [{prop: "conn", name: "conn", embedded: true, exported: false, typ: conn, tag: ""}]); - IP.init($Uint8); - IPMask.init($Uint8); - IPNet.init("", [{prop: "IP", name: "IP", embedded: false, exported: true, typ: IP, tag: ""}, {prop: "Mask", name: "Mask", embedded: false, exported: true, typ: IPMask, tag: ""}]); - Interface.init("", [{prop: "Index", name: "Index", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MTU", name: "MTU", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "HardwareAddr", name: "HardwareAddr", embedded: false, exported: true, typ: HardwareAddr, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: Flags, tag: ""}]); - ipv6ZoneCache.init("net", [{prop: "RWMutex", name: "RWMutex", embedded: true, exported: true, typ: sync.RWMutex, tag: ""}, {prop: "lastFetched", name: "lastFetched", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "toIndex", name: "toIndex", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "toName", name: "toName", embedded: false, exported: false, typ: mapType$2, tag: ""}]); - SRV.init("", [{prop: "Target", name: "Target", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Priority", name: "Priority", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "Weight", name: "Weight", embedded: false, exported: true, typ: $Uint16, tag: ""}]); - MX.init("", [{prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Pref", name: "Pref", embedded: false, exported: true, typ: $Uint16, tag: ""}]); - NS.init("", [{prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}]); - Dialer.init("", [{prop: "Timeout", name: "Timeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "Deadline", name: "Deadline", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "LocalAddr", name: "LocalAddr", embedded: false, exported: true, typ: Addr, tag: ""}, {prop: "DualStack", name: "DualStack", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "FallbackDelay", name: "FallbackDelay", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "KeepAlive", name: "KeepAlive", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "Resolver", name: "Resolver", embedded: false, exported: true, typ: ptrType$9, tag: ""}, {prop: "Cancel", name: "Cancel", embedded: false, exported: true, typ: chanType$5, tag: ""}, {prop: "Control", name: "Control", embedded: false, exported: true, typ: funcType$5, tag: ""}]); - sysDialer.init("net", [{prop: "Dialer", name: "Dialer", embedded: true, exported: true, typ: Dialer, tag: ""}, {prop: "network", name: "network", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "address", name: "address", embedded: false, exported: false, typ: $String, tag: ""}]); - ListenConfig.init("", [{prop: "Control", name: "Control", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "KeepAlive", name: "KeepAlive", embedded: false, exported: true, typ: time.Duration, tag: ""}]); - sysListener.init("net", [{prop: "ListenConfig", name: "ListenConfig", embedded: true, exported: true, typ: ListenConfig, tag: ""}, {prop: "network", name: "network", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "address", name: "address", embedded: false, exported: false, typ: $String, tag: ""}]); - dialResult.init("net", [{prop: "Conn", name: "Conn", embedded: true, exported: true, typ: Conn, tag: ""}, {prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}, {prop: "primary", name: "primary", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = context.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytealg.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = itoa.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nettrace.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = poll.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = singleflight.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = netip.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = syscall.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = dnsmessage.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - onceReadServices = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - listenersMu = new sync.Mutex.ptr(0, 0); - portCounterMu = new sync.Mutex.ptr(0, 0); - netGo = false; - dnsWaitGroup = new sync.WaitGroup.ptr(0, $chanNil, new $Uint64(0, 0), 0); - ipStackCaps = new ipStackCapabilities.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), false, false, false); - testHookDialTCP = $throwNilPointerError; - listeners = {}; - portCounter = 0; - errNoSuitableAddress = errors.New("no suitable address found"); - errMissingAddress = errors.New("missing address"); - errCanceled = errors.New("operation was canceled"); - $pkg.ErrWriteToConnected = errors.New("use of WriteTo with pre-connected connection"); - aLongTimeAgo = $clone(time.Unix(new $Int64(0, 1), new $Int64(0, 0)), time.Time); - errTimeout = new timeoutError.ptr(); - errNoSuchHost = errors.New("no such host"); - errClosed = $clone(poll.ErrNetClosing, poll.errNetClosing); - $pkg.ErrClosed = new errClosed.constructor.elem(errClosed); - protocols = $makeMap($String.keyFor, [{ k: "icmp", v: 1 }, { k: "igmp", v: 2 }, { k: "tcp", v: 6 }, { k: "udp", v: 17 }, { k: "ipv6-icmp", v: 58 }]); - services = $makeMap($String.keyFor, [{ k: "udp", v: $makeMap($String.keyFor, [{ k: "domain", v: 53 }]) }, { k: "tcp", v: $makeMap($String.keyFor, [{ k: "ftp", v: 21 }, { k: "ftps", v: 990 }, { k: "gopher", v: 70 }, { k: "http", v: 80 }, { k: "https", v: 443 }, { k: "imap2", v: 143 }, { k: "imap3", v: 220 }, { k: "imaps", v: 993 }, { k: "pop3", v: 110 }, { k: "pop3s", v: 995 }, { k: "smtp", v: 25 }, { k: "ssh", v: 22 }, { k: "telnet", v: 23 }]) }]); - $pkg.DefaultResolver = new Resolver.ptr(false, false, $throwNilPointerError, new singleflight.Group.ptr(new sync.Mutex.ptr(0, 0), false)); - errMalformedDNSRecordsDetail = "DNS response contained records which contain invalid names"; - v4InV6Prefix = new sliceType$1([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255]); - $pkg.IPv4bcast = IPv4(255, 255, 255, 255); - $pkg.IPv4allsys = IPv4(224, 0, 0, 1); - $pkg.IPv4allrouter = IPv4(224, 0, 0, 2); - $pkg.IPv4zero = IPv4(0, 0, 0, 0); - $pkg.IPv6zero = new IP([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - $pkg.IPv6unspecified = new IP([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - $pkg.IPv6loopback = new IP([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]); - classAMask = IPv4Mask(255, 0, 0, 0); - classBMask = IPv4Mask(255, 255, 0, 0); - classCMask = IPv4Mask(255, 255, 255, 0); - errInvalidInterface = errors.New("invalid network interface"); - errInvalidInterfaceIndex = errors.New("invalid network interface index"); - errInvalidInterfaceName = errors.New("invalid network interface name"); - errNoSuchInterface = errors.New("no such network interface"); - errNoSuchMulticastInterface = errors.New("no such multicast network interface"); - flagNames = new sliceType(["up", "broadcast", "loopback", "pointtopoint", "multicast"]); - zoneCache = new ipv6ZoneCache.ptr(new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), {}, {}); - testHookLookupIP = (function $b(ctx, fn, network, host) { - var {$24r, _r, ctx, fn, host, network, $s, $r, $c} = $restore(this, {ctx, fn, network, host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = fn(ctx, network, host); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r, ctx, fn, host, network, $s};return $f; - }); - testHookSetKeepAlive = (function(param) { - var param; - }); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/url"] = (function() { - var $pkg = {}, $init, errors, fmt, sort, strconv, strings, Error, EscapeError, InvalidHostError, URL, Userinfo, Values, sliceType, interfaceType, interfaceType$1, ptrType, sliceType$1, arrayType, ptrType$1, ptrType$2, sliceType$2, ptrType$3, ishex, unhex, shouldEscape, QueryUnescape, unescape, QueryEscape, escape, User, UserPassword, getScheme, Parse, ParseRequestURI, parse, parseAuthority, parseHost, validEncoded, validOptionalPort, ParseQuery, parseQuery, resolvePath, splitHostPort, validUserinfo, stringContainsCTLByte; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - Error = $pkg.Error = $newType(0, $kindStruct, "url.Error", true, "net/url", true, function(Op_, URL_, Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Op = ""; - this.URL = ""; - this.Err = $ifaceNil; - return; - } - this.Op = Op_; - this.URL = URL_; - this.Err = Err_; - }); - EscapeError = $pkg.EscapeError = $newType(8, $kindString, "url.EscapeError", true, "net/url", true, null); - InvalidHostError = $pkg.InvalidHostError = $newType(8, $kindString, "url.InvalidHostError", true, "net/url", true, null); - URL = $pkg.URL = $newType(0, $kindStruct, "url.URL", true, "net/url", true, function(Scheme_, Opaque_, User_, Host_, Path_, RawPath_, ForceQuery_, RawQuery_, Fragment_, RawFragment_) { - this.$val = this; - if (arguments.length === 0) { - this.Scheme = ""; - this.Opaque = ""; - this.User = ptrType$1.nil; - this.Host = ""; - this.Path = ""; - this.RawPath = ""; - this.ForceQuery = false; - this.RawQuery = ""; - this.Fragment = ""; - this.RawFragment = ""; - return; - } - this.Scheme = Scheme_; - this.Opaque = Opaque_; - this.User = User_; - this.Host = Host_; - this.Path = Path_; - this.RawPath = RawPath_; - this.ForceQuery = ForceQuery_; - this.RawQuery = RawQuery_; - this.Fragment = Fragment_; - this.RawFragment = RawFragment_; - }); - Userinfo = $pkg.Userinfo = $newType(0, $kindStruct, "url.Userinfo", true, "net/url", true, function(username_, password_, passwordSet_) { - this.$val = this; - if (arguments.length === 0) { - this.username = ""; - this.password = ""; - this.passwordSet = false; - return; - } - this.username = username_; - this.password = password_; - this.passwordSet = passwordSet_; - }); - Values = $pkg.Values = $newType(4, $kindMap, "url.Values", true, "net/url", true, null); - sliceType = $sliceType($emptyInterface); - interfaceType = $interfaceType([{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}]); - interfaceType$1 = $interfaceType([{prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]); - ptrType = $ptrType(strings.Builder); - sliceType$1 = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 64); - ptrType$1 = $ptrType(Userinfo); - ptrType$2 = $ptrType(URL); - sliceType$2 = $sliceType($String); - ptrType$3 = $ptrType(Error); - Error.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.Err; - }; - Error.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - Error.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = fmt.Sprintf("%s %q: %s", new sliceType([new $String(e.Op), new $String(e.URL), e.Err])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Error.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - Error.prototype.Error = function() { return this.$val.Error(); }; - Error.ptr.prototype.Timeout = function() { - var {$24r, _r, _tuple, _v, e, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _tuple = $assertType(e.Err, interfaceType, true); - t = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 1; continue s; } - _r = t.Timeout(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Error.ptr.prototype.Timeout, $c: true, $r, $24r, _r, _tuple, _v, e, ok, t, $s};return $f; - }; - Error.prototype.Timeout = function() { return this.$val.Timeout(); }; - Error.ptr.prototype.Temporary = function() { - var {$24r, _r, _tuple, _v, e, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _tuple = $assertType(e.Err, interfaceType$1, true); - t = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 1; continue s; } - _r = t.Temporary(); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = _r; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Error.ptr.prototype.Temporary, $c: true, $r, $24r, _r, _tuple, _v, e, ok, t, $s};return $f; - }; - Error.prototype.Temporary = function() { return this.$val.Temporary(); }; - ishex = function(c) { - var c; - if (48 <= c && c <= 57) { - return true; - } else if (97 <= c && c <= 102) { - return true; - } else if (65 <= c && c <= 70) { - return true; - } - return false; - }; - unhex = function(c) { - var c; - if (48 <= c && c <= 57) { - return c - 48 << 24 >>> 24; - } else if (97 <= c && c <= 102) { - return (c - 97 << 24 >>> 24) + 10 << 24 >>> 24; - } else if (65 <= c && c <= 70) { - return (c - 65 << 24 >>> 24) + 10 << 24 >>> 24; - } - return 0; - }; - EscapeError.prototype.Error = function() { - var e; - e = this.$val; - return "invalid URL escape " + strconv.Quote((e)); - }; - $ptrType(EscapeError).prototype.Error = function() { return new EscapeError(this.$get()).Error(); }; - InvalidHostError.prototype.Error = function() { - var e; - e = this.$val; - return "invalid character " + strconv.Quote((e)) + " in host name"; - }; - $ptrType(InvalidHostError).prototype.Error = function() { return new InvalidHostError(this.$get()).Error(); }; - shouldEscape = function(c, mode) { - var _1, _2, _3, _4, c, mode; - if (97 <= c && c <= 122 || 65 <= c && c <= 90 || 48 <= c && c <= 57) { - return false; - } - if ((mode === 3) || (mode === 4)) { - _1 = c; - if ((_1 === (33)) || (_1 === (36)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (59)) || (_1 === (61)) || (_1 === (58)) || (_1 === (91)) || (_1 === (93)) || (_1 === (60)) || (_1 === (62)) || (_1 === (34))) { - return false; - } - } - _2 = c; - if ((_2 === (45)) || (_2 === (95)) || (_2 === (46)) || (_2 === (126))) { - return false; - } else if ((_2 === (36)) || (_2 === (38)) || (_2 === (43)) || (_2 === (44)) || (_2 === (47)) || (_2 === (58)) || (_2 === (59)) || (_2 === (61)) || (_2 === (63)) || (_2 === (64))) { - _3 = mode; - if (_3 === (1)) { - return c === 63; - } else if (_3 === (2)) { - return (c === 47) || (c === 59) || (c === 44) || (c === 63); - } else if (_3 === (5)) { - return (c === 64) || (c === 47) || (c === 63) || (c === 58); - } else if (_3 === (6)) { - return true; - } else if (_3 === (7)) { - return false; - } - } - if (mode === 7) { - _4 = c; - if ((_4 === (33)) || (_4 === (40)) || (_4 === (41)) || (_4 === (42))) { - return false; - } - } - return true; - }; - QueryUnescape = function(s) { - var s; - return unescape(s, 6); - }; - $pkg.QueryUnescape = QueryUnescape; - unescape = function(s, mode) { - var _1, _2, hasPlus, i, i$1, mode, n, s, t, v; - n = 0; - hasPlus = false; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _1 = s.charCodeAt(i); - if (_1 === (37)) { - n = n + (1) >> 0; - if ((i + 2 >> 0) >= s.length || !ishex(s.charCodeAt((i + 1 >> 0))) || !ishex(s.charCodeAt((i + 2 >> 0)))) { - s = $substring(s, i); - if (s.length > 3) { - s = $substring(s, 0, 3); - } - return ["", new EscapeError((s))]; - } - if ((mode === 3) && unhex(s.charCodeAt((i + 1 >> 0))) < 8 && !($substring(s, i, (i + 3 >> 0)) === "%25")) { - return ["", new EscapeError(($substring(s, i, (i + 3 >> 0))))]; - } - if (mode === 4) { - v = ((unhex(s.charCodeAt((i + 1 >> 0))) << 4 << 24 >>> 24) | unhex(s.charCodeAt((i + 2 >> 0)))) >>> 0; - if (!($substring(s, i, (i + 3 >> 0)) === "%25") && !((v === 32)) && shouldEscape(v, 3)) { - return ["", new EscapeError(($substring(s, i, (i + 3 >> 0))))]; - } - } - i = i + (3) >> 0; - } else if (_1 === (43)) { - hasPlus = mode === 6; - i = i + (1) >> 0; - } else { - if (((mode === 3) || (mode === 4)) && s.charCodeAt(i) < 128 && shouldEscape(s.charCodeAt(i), mode)) { - return ["", new InvalidHostError(($substring(s, i, (i + 1 >> 0))))]; - } - i = i + (1) >> 0; - } - } - if ((n === 0) && !hasPlus) { - return [s, $ifaceNil]; - } - t = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - t.Grow(s.length - ($imul(2, n)) >> 0); - i$1 = 0; - while (true) { - if (!(i$1 < s.length)) { break; } - _2 = s.charCodeAt(i$1); - if (_2 === (37)) { - t.WriteByte(((unhex(s.charCodeAt((i$1 + 1 >> 0))) << 4 << 24 >>> 24) | unhex(s.charCodeAt((i$1 + 2 >> 0)))) >>> 0); - i$1 = i$1 + (2) >> 0; - } else if (_2 === (43)) { - if (mode === 6) { - t.WriteByte(32); - } else { - t.WriteByte(43); - } - } else { - t.WriteByte(s.charCodeAt(i$1)); - } - i$1 = i$1 + (1) >> 0; - } - return [t.String(), $ifaceNil]; - }; - QueryEscape = function(s) { - var s; - return escape(s, 6); - }; - $pkg.QueryEscape = QueryEscape; - escape = function(s, mode) { - var _tmp, _tmp$1, buf, c, c$1, hexCount, i, i$1, i$2, j, mode, required, s, spaceCount, t, x, x$1; - _tmp = 0; - _tmp$1 = 0; - spaceCount = _tmp; - hexCount = _tmp$1; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (shouldEscape(c, mode)) { - if ((c === 32) && (mode === 6)) { - spaceCount = spaceCount + (1) >> 0; - } else { - hexCount = hexCount + (1) >> 0; - } - } - i = i + (1) >> 0; - } - if ((spaceCount === 0) && (hexCount === 0)) { - return s; - } - buf = arrayType.zero(); - t = sliceType$1.nil; - required = s.length + ($imul(2, hexCount)) >> 0; - if (required <= 64) { - t = $subslice(new sliceType$1(buf), 0, required); - } else { - t = $makeSlice(sliceType$1, required); - } - if (hexCount === 0) { - $copyString(t, s); - i$1 = 0; - while (true) { - if (!(i$1 < s.length)) { break; } - if (s.charCodeAt(i$1) === 32) { - ((i$1 < 0 || i$1 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + i$1] = 43); - } - i$1 = i$1 + (1) >> 0; - } - return ($bytesToString(t)); - } - j = 0; - i$2 = 0; - while (true) { - if (!(i$2 < s.length)) { break; } - c$1 = s.charCodeAt(i$2); - if ((c$1 === 32) && (mode === 6)) { - ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = 43); - j = j + (1) >> 0; - } else if (shouldEscape(c$1, mode)) { - ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = 37); - (x = j + 1 >> 0, ((x < 0 || x >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x] = "0123456789ABCDEF".charCodeAt((c$1 >>> 4 << 24 >>> 24)))); - (x$1 = j + 2 >> 0, ((x$1 < 0 || x$1 >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + x$1] = "0123456789ABCDEF".charCodeAt(((c$1 & 15) >>> 0)))); - j = j + (3) >> 0; - } else { - ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = s.charCodeAt(i$2)); - j = j + (1) >> 0; - } - i$2 = i$2 + (1) >> 0; - } - return ($bytesToString(t)); - }; - User = function(username) { - var username; - return new Userinfo.ptr(username, "", false); - }; - $pkg.User = User; - UserPassword = function(username, password) { - var password, username; - return new Userinfo.ptr(username, password, true); - }; - $pkg.UserPassword = UserPassword; - Userinfo.ptr.prototype.Username = function() { - var u; - u = this; - if (u === ptrType$1.nil) { - return ""; - } - return u.username; - }; - Userinfo.prototype.Username = function() { return this.$val.Username(); }; - Userinfo.ptr.prototype.Password = function() { - var u; - u = this; - if (u === ptrType$1.nil) { - return ["", false]; - } - return [u.password, u.passwordSet]; - }; - Userinfo.prototype.Password = function() { return this.$val.Password(); }; - Userinfo.ptr.prototype.String = function() { - var s, u; - u = this; - if (u === ptrType$1.nil) { - return ""; - } - s = escape(u.username, 5); - if (u.passwordSet) { - s = s + (":" + escape(u.password, 5)); - } - return s; - }; - Userinfo.prototype.String = function() { return this.$val.String(); }; - getScheme = function(rawURL) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c, err, i, path, rawURL, scheme; - scheme = ""; - path = ""; - err = $ifaceNil; - i = 0; - while (true) { - if (!(i < rawURL.length)) { break; } - c = rawURL.charCodeAt(i); - if (97 <= c && c <= 122 || 65 <= c && c <= 90) { - } else if (48 <= c && c <= 57 || (c === 43) || (c === 45) || (c === 46)) { - if (i === 0) { - _tmp = ""; - _tmp$1 = rawURL; - _tmp$2 = $ifaceNil; - scheme = _tmp; - path = _tmp$1; - err = _tmp$2; - return [scheme, path, err]; - } - } else if ((c === 58)) { - if (i === 0) { - _tmp$3 = ""; - _tmp$4 = ""; - _tmp$5 = errors.New("missing protocol scheme"); - scheme = _tmp$3; - path = _tmp$4; - err = _tmp$5; - return [scheme, path, err]; - } - _tmp$6 = $substring(rawURL, 0, i); - _tmp$7 = $substring(rawURL, (i + 1 >> 0)); - _tmp$8 = $ifaceNil; - scheme = _tmp$6; - path = _tmp$7; - err = _tmp$8; - return [scheme, path, err]; - } else { - _tmp$9 = ""; - _tmp$10 = rawURL; - _tmp$11 = $ifaceNil; - scheme = _tmp$9; - path = _tmp$10; - err = _tmp$11; - return [scheme, path, err]; - } - i = i + (1) >> 0; - } - _tmp$12 = ""; - _tmp$13 = rawURL; - _tmp$14 = $ifaceNil; - scheme = _tmp$12; - path = _tmp$13; - err = _tmp$14; - return [scheme, path, err]; - }; - Parse = function(rawURL) { - var {_r, _tuple, _tuple$1, err, frag, rawURL, u, url, $s, $r, $c} = $restore(this, {rawURL}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = strings.Cut(rawURL, "#"); - u = _tuple[0]; - frag = _tuple[1]; - _r = parse(u, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$1 = _r; - url = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, new Error.ptr("parse", u, err)]; - } - if (frag === "") { - $s = -1; return [url, $ifaceNil]; - } - err = url.setFragment(frag); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, new Error.ptr("parse", rawURL, err)]; - } - $s = -1; return [url, $ifaceNil]; - /* */ } return; } var $f = {$blk: Parse, $c: true, $r, _r, _tuple, _tuple$1, err, frag, rawURL, u, url, $s};return $f; - }; - $pkg.Parse = Parse; - ParseRequestURI = function(rawURL) { - var {_r, _tuple, err, rawURL, url, $s, $r, $c} = $restore(this, {rawURL}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = parse(rawURL, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - url = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, new Error.ptr("parse", rawURL, err)]; - } - $s = -1; return [url, $ifaceNil]; - /* */ } return; } var $f = {$blk: ParseRequestURI, $c: true, $r, _r, _tuple, err, rawURL, url, $s};return $f; - }; - $pkg.ParseRequestURI = ParseRequestURI; - parse = function(rawURL, viaRequest) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, authority, err, err$1, i, rawURL, rest, segment, url, viaRequest, $s, $r, $c} = $restore(this, {rawURL, viaRequest}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rest = ""; - err = $ifaceNil; - if (stringContainsCTLByte(rawURL)) { - $s = -1; return [ptrType$2.nil, errors.New("net/url: invalid control character in URL")]; - } - if (rawURL === "" && viaRequest) { - $s = -1; return [ptrType$2.nil, errors.New("empty url")]; - } - url = new URL.ptr("", "", ptrType$1.nil, "", "", "", false, "", "", ""); - if (rawURL === "*") { - url.Path = "*"; - $s = -1; return [url, $ifaceNil]; - } - _tuple = getScheme(rawURL); - url.Scheme = _tuple[0]; - rest = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, err]; - } - _r = strings.ToLower(url.Scheme); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - url.Scheme = _r; - if (strings.HasSuffix(rest, "?") && (strings.Count(rest, "?") === 1)) { - url.ForceQuery = true; - rest = $substring(rest, 0, (rest.length - 1 >> 0)); - } else { - _tuple$1 = strings.Cut(rest, "?"); - rest = _tuple$1[0]; - url.RawQuery = _tuple$1[1]; - } - if (!strings.HasPrefix(rest, "/")) { - if (!(url.Scheme === "")) { - url.Opaque = rest; - $s = -1; return [url, $ifaceNil]; - } - if (viaRequest) { - $s = -1; return [ptrType$2.nil, errors.New("invalid URI for request")]; - } - _tuple$2 = strings.Cut(rest, "/"); - segment = _tuple$2[0]; - if (strings.Contains(segment, ":")) { - $s = -1; return [ptrType$2.nil, errors.New("first path segment in URL cannot contain colon")]; - } - } - /* */ if ((!(url.Scheme === "") || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((!(url.Scheme === "") || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//")) { */ case 2: - authority = ""; - _tmp = $substring(rest, 2); - _tmp$1 = ""; - authority = _tmp; - rest = _tmp$1; - i = strings.Index(authority, "/"); - if (i >= 0) { - _tmp$2 = $substring(authority, 0, i); - _tmp$3 = $substring(authority, i); - authority = _tmp$2; - rest = _tmp$3; - } - _r$1 = parseAuthority(authority); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$3 = _r$1; - url.User = _tuple$3[0]; - url.Host = _tuple$3[1]; - err = _tuple$3[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, err]; - } - /* } */ case 3: - err$1 = url.setPath(rest); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, err$1]; - } - $s = -1; return [url, $ifaceNil]; - /* */ } return; } var $f = {$blk: parse, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, authority, err, err$1, i, rawURL, rest, segment, url, viaRequest, $s};return $f; - }; - parseAuthority = function(authority) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, authority, err, host, i, password, user, userinfo, username, $s, $r, $c} = $restore(this, {authority}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - user = ptrType$1.nil; - host = ""; - err = $ifaceNil; - i = strings.LastIndex(authority, "@"); - /* */ if (i < 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (i < 0) { */ case 1: - _r = parseHost(authority); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - host = _tuple[0]; - err = _tuple[1]; - $s = 3; continue; - /* } else { */ case 2: - _r$1 = parseHost($substring(authority, (i + 1 >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - host = _tuple$1[0]; - err = _tuple$1[1]; - /* } */ case 3: - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = ptrType$1.nil; - _tmp$1 = ""; - _tmp$2 = err; - user = _tmp; - host = _tmp$1; - err = _tmp$2; - $s = -1; return [user, host, err]; - } - if (i < 0) { - _tmp$3 = ptrType$1.nil; - _tmp$4 = host; - _tmp$5 = $ifaceNil; - user = _tmp$3; - host = _tmp$4; - err = _tmp$5; - $s = -1; return [user, host, err]; - } - userinfo = $substring(authority, 0, i); - if (!validUserinfo(userinfo)) { - _tmp$6 = ptrType$1.nil; - _tmp$7 = ""; - _tmp$8 = errors.New("net/url: invalid userinfo"); - user = _tmp$6; - host = _tmp$7; - err = _tmp$8; - $s = -1; return [user, host, err]; - } - if (!strings.Contains(userinfo, ":")) { - _tuple$2 = unescape(userinfo, 5); - userinfo = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$9 = ptrType$1.nil; - _tmp$10 = ""; - _tmp$11 = err; - user = _tmp$9; - host = _tmp$10; - err = _tmp$11; - $s = -1; return [user, host, err]; - } - user = User(userinfo); - } else { - _tuple$3 = strings.Cut(userinfo, ":"); - username = _tuple$3[0]; - password = _tuple$3[1]; - _tuple$4 = unescape(username, 5); - username = _tuple$4[0]; - err = _tuple$4[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$12 = ptrType$1.nil; - _tmp$13 = ""; - _tmp$14 = err; - user = _tmp$12; - host = _tmp$13; - err = _tmp$14; - $s = -1; return [user, host, err]; - } - _tuple$5 = unescape(password, 5); - password = _tuple$5[0]; - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$15 = ptrType$1.nil; - _tmp$16 = ""; - _tmp$17 = err; - user = _tmp$15; - host = _tmp$16; - err = _tmp$17; - $s = -1; return [user, host, err]; - } - user = UserPassword(username, password); - } - _tmp$18 = user; - _tmp$19 = host; - _tmp$20 = $ifaceNil; - user = _tmp$18; - host = _tmp$19; - err = _tmp$20; - $s = -1; return [user, host, err]; - /* */ } return; } var $f = {$blk: parseAuthority, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, authority, err, host, i, password, user, userinfo, username, $s};return $f; - }; - parseHost = function(host) { - var {$24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, _tuple$3, colonPort, colonPort$1, err, err$1, host, host1, host2, host3, i, i$1, zone, $s, $r, $c} = $restore(this, {host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (strings.HasPrefix(host, "[")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (strings.HasPrefix(host, "[")) { */ case 1: - i = strings.LastIndex(host, "]"); - if (i < 0) { - $s = -1; return ["", errors.New("missing ']' in host")]; - } - colonPort = $substring(host, (i + 1 >> 0)); - /* */ if (!validOptionalPort(colonPort)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!validOptionalPort(colonPort)) { */ case 4: - _r = fmt.Errorf("invalid port %q after host", new sliceType([new $String(colonPort)])); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = ["", _r]; - $s = 7; case 7: return $24r; - /* } */ case 5: - zone = strings.Index($substring(host, 0, i), "%25"); - if (zone >= 0) { - _tuple = unescape($substring(host, 0, zone), 3); - host1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", err]; - } - _tuple$1 = unescape($substring(host, zone, i), 4); - host2 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", err]; - } - _tuple$2 = unescape($substring(host, i), 3); - host3 = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", err]; - } - $s = -1; return [host1 + host2 + host3, $ifaceNil]; - } - $s = 3; continue; - /* } else { */ case 2: - i$1 = strings.LastIndex(host, ":"); - /* */ if (!((i$1 === -1))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!((i$1 === -1))) { */ case 8: - colonPort$1 = $substring(host, i$1); - /* */ if (!validOptionalPort(colonPort$1)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!validOptionalPort(colonPort$1)) { */ case 10: - _r$1 = fmt.Errorf("invalid port %q after host", new sliceType([new $String(colonPort$1)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = ["", _r$1]; - $s = 13; case 13: return $24r$1; - /* } */ case 11: - /* } */ case 9: - /* } */ case 3: - err$1 = $ifaceNil; - _tuple$3 = unescape(host, 3); - host = _tuple$3[0]; - err$1 = _tuple$3[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return ["", err$1]; - } - $s = -1; return [host, $ifaceNil]; - /* */ } return; } var $f = {$blk: parseHost, $c: true, $r, $24r, $24r$1, _r, _r$1, _tuple, _tuple$1, _tuple$2, _tuple$3, colonPort, colonPort$1, err, err$1, host, host1, host2, host3, i, i$1, zone, $s};return $f; - }; - URL.ptr.prototype.setPath = function(p) { - var _tuple, err, escp, p, path, u; - u = this; - _tuple = unescape(p, 1); - path = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return err; - } - u.Path = path; - escp = escape(path, 1); - if (p === escp) { - u.RawPath = ""; - } else { - u.RawPath = p; - } - return $ifaceNil; - }; - URL.prototype.setPath = function(p) { return this.$val.setPath(p); }; - URL.ptr.prototype.EscapedPath = function() { - var _tuple, err, p, u; - u = this; - if (!(u.RawPath === "") && validEncoded(u.RawPath, 1)) { - _tuple = unescape(u.RawPath, 1); - p = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil) && p === u.Path) { - return u.RawPath; - } - } - if (u.Path === "*") { - return "*"; - } - return escape(u.Path, 1); - }; - URL.prototype.EscapedPath = function() { return this.$val.EscapedPath(); }; - validEncoded = function(s, mode) { - var _1, i, mode, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _1 = s.charCodeAt(i); - if ((_1 === (33)) || (_1 === (36)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (59)) || (_1 === (61)) || (_1 === (58)) || (_1 === (64))) { - } else if ((_1 === (91)) || (_1 === (93))) { - } else if (_1 === (37)) { - } else if (shouldEscape(s.charCodeAt(i), mode)) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - URL.ptr.prototype.setFragment = function(f) { - var _tuple, err, escf, f, frag, u; - u = this; - _tuple = unescape(f, 7); - frag = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - return err; - } - u.Fragment = frag; - escf = escape(frag, 7); - if (f === escf) { - u.RawFragment = ""; - } else { - u.RawFragment = f; - } - return $ifaceNil; - }; - URL.prototype.setFragment = function(f) { return this.$val.setFragment(f); }; - URL.ptr.prototype.EscapedFragment = function() { - var _tuple, err, f, u; - u = this; - if (!(u.RawFragment === "") && validEncoded(u.RawFragment, 7)) { - _tuple = unescape(u.RawFragment, 7); - f = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil) && f === u.Fragment) { - return u.RawFragment; - } - } - return escape(u.Fragment, 7); - }; - URL.prototype.EscapedFragment = function() { return this.$val.EscapedFragment(); }; - validOptionalPort = function(port) { - var _i, _ref, _rune, b, port; - if (port === "") { - return true; - } - if (!((port.charCodeAt(0) === 58))) { - return false; - } - _ref = $substring(port, 1); - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - b = _rune[0]; - if (b < 48 || b > 57) { - return false; - } - _i += _rune[1]; - } - return true; - }; - URL.ptr.prototype.String = function() { - var _tuple, buf, h, path, segment, u, ui; - u = this; - buf = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - if (!(u.Scheme === "")) { - buf.WriteString(u.Scheme); - buf.WriteByte(58); - } - if (!(u.Opaque === "")) { - buf.WriteString(u.Opaque); - } else { - if (!(u.Scheme === "") || !(u.Host === "") || !(u.User === ptrType$1.nil)) { - if (!(u.Host === "") || !(u.Path === "") || !(u.User === ptrType$1.nil)) { - buf.WriteString("//"); - } - ui = u.User; - if (!(ui === ptrType$1.nil)) { - buf.WriteString(ui.String()); - buf.WriteByte(64); - } - h = u.Host; - if (!(h === "")) { - buf.WriteString(escape(h, 3)); - } - } - path = u.EscapedPath(); - if (!(path === "") && !((path.charCodeAt(0) === 47)) && !(u.Host === "")) { - buf.WriteByte(47); - } - if (buf.Len() === 0) { - _tuple = strings.Cut(path, "/"); - segment = _tuple[0]; - if (strings.Contains(segment, ":")) { - buf.WriteString("./"); - } - } - buf.WriteString(path); - } - if (u.ForceQuery || !(u.RawQuery === "")) { - buf.WriteByte(63); - buf.WriteString(u.RawQuery); - } - if (!(u.Fragment === "")) { - buf.WriteByte(35); - buf.WriteString(u.EscapedFragment()); - } - return buf.String(); - }; - URL.prototype.String = function() { return this.$val.String(); }; - URL.ptr.prototype.Redacted = function() { - var _tuple, has, ru, u; - u = this; - if (u === ptrType$2.nil) { - return ""; - } - ru = $clone(u, URL); - _tuple = ru.User.Password(); - has = _tuple[1]; - if (has) { - ru.User = UserPassword(ru.User.Username(), "xxxxx"); - } - return ru.String(); - }; - URL.prototype.Redacted = function() { return this.$val.Redacted(); }; - Values.prototype.Get = function(key) { - var _entry, key, v, vs; - v = this.$val; - if (v === false) { - return ""; - } - vs = (_entry = v[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (vs.$length === 0) { - return ""; - } - return (0 >= vs.$length ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + 0]); - }; - $ptrType(Values).prototype.Get = function(key) { return new Values(this.$get()).Get(key); }; - Values.prototype.Set = function(key, value) { - var _key, key, v, value; - v = this.$val; - _key = key; (v || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new sliceType$2([value]) }; - }; - $ptrType(Values).prototype.Set = function(key, value) { return new Values(this.$get()).Set(key, value); }; - Values.prototype.Add = function(key, value) { - var _entry, _key, key, v, value; - v = this.$val; - _key = key; (v || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = v[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), value) }; - }; - $ptrType(Values).prototype.Add = function(key, value) { return new Values(this.$get()).Add(key, value); }; - Values.prototype.Del = function(key) { - var key, v; - v = this.$val; - delete v[$String.keyFor(key)]; - }; - $ptrType(Values).prototype.Del = function(key) { return new Values(this.$get()).Del(key); }; - Values.prototype.Has = function(key) { - var _entry, _tuple, key, ok, v; - v = this.$val; - _tuple = (_entry = v[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - ok = _tuple[1]; - return ok; - }; - $ptrType(Values).prototype.Has = function(key) { return new Values(this.$get()).Has(key); }; - ParseQuery = function(query) { - var {_r, err, m, query, $s, $r, $c} = $restore(this, {query}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = {}; - _r = parseQuery(m, query); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - $s = -1; return [m, err]; - /* */ } return; } var $f = {$blk: ParseQuery, $c: true, $r, _r, err, m, query, $s};return $f; - }; - $pkg.ParseQuery = ParseQuery; - parseQuery = function(m, query) { - var {_entry, _key, _r, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err1, key, m, query, value, $s, $r, $c} = $restore(this, {m, query}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - /* while (true) { */ case 1: - /* if (!(!(query === ""))) { break; } */ if(!(!(query === ""))) { $s = 2; continue; } - key = ""; - _tuple = strings.Cut(query, "&"); - key = _tuple[0]; - query = _tuple[1]; - /* */ if (strings.Contains(key, ";")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (strings.Contains(key, ";")) { */ case 3: - _r = fmt.Errorf("invalid semicolon separator in query", new sliceType([])); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - /* continue; */ $s = 1; continue; - /* } */ case 4: - if (key === "") { - /* continue; */ $s = 1; continue; - } - _tuple$1 = strings.Cut(key, "="); - key = _tuple$1[0]; - value = _tuple$1[1]; - _tuple$2 = QueryUnescape(key); - key = _tuple$2[0]; - err1 = _tuple$2[1]; - if (!($interfaceIsEqual(err1, $ifaceNil))) { - if ($interfaceIsEqual(err, $ifaceNil)) { - err = err1; - } - /* continue; */ $s = 1; continue; - } - _tuple$3 = QueryUnescape(value); - value = _tuple$3[0]; - err1 = _tuple$3[1]; - if (!($interfaceIsEqual(err1, $ifaceNil))) { - if ($interfaceIsEqual(err, $ifaceNil)) { - err = err1; - } - /* continue; */ $s = 1; continue; - } - _key = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = m[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), value) }; - $s = 1; continue; - case 2: - err = err; - $s = -1; return err; - /* */ } return; } var $f = {$blk: parseQuery, $c: true, $r, _entry, _key, _r, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err1, key, m, query, value, $s};return $f; - }; - Values.prototype.Encode = function() { - var {_entry, _entry$1, _i, _i$1, _i$2, _keys, _ref, _ref$1, _ref$2, buf, k, k$1, keyEscaped, keys, v, v$1, vs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = this.$val; - if (v === false) { - $s = -1; return ""; - } - buf = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - keys = $makeSlice(sliceType$2, 0, $keys(v).length); - _ref = v; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - keys = $append(keys, k); - _i++; - } - $r = sort.Strings(keys); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref$1 = keys; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - k$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - vs = (_entry$1 = v[$String.keyFor(k$1)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - keyEscaped = QueryEscape(k$1); - _ref$2 = vs; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - v$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - if (buf.Len() > 0) { - buf.WriteByte(38); - } - buf.WriteString(keyEscaped); - buf.WriteByte(61); - buf.WriteString(QueryEscape(v$1)); - _i$2++; - } - _i$1++; - } - $s = -1; return buf.String(); - /* */ } return; } var $f = {$blk: Values.prototype.Encode, $c: true, $r, _entry, _entry$1, _i, _i$1, _i$2, _keys, _ref, _ref$1, _ref$2, buf, k, k$1, keyEscaped, keys, v, v$1, vs, $s};return $f; - }; - $ptrType(Values).prototype.Encode = function() { return new Values(this.$get()).Encode(); }; - resolvePath = function(base, ref) { - var _tuple, base, dst, elem, first, found, full, i, index, r, ref, remaining, str; - full = ""; - if (ref === "") { - full = base; - } else if (!((ref.charCodeAt(0) === 47))) { - i = strings.LastIndex(base, "/"); - full = $substring(base, 0, (i + 1 >> 0)) + ref; - } else { - full = ref; - } - if (full === "") { - return ""; - } - elem = ""; - dst = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - first = true; - remaining = full; - dst.WriteByte(47); - found = true; - while (true) { - if (!(found)) { break; } - _tuple = strings.Cut(remaining, "/"); - elem = _tuple[0]; - remaining = _tuple[1]; - found = _tuple[2]; - if (elem === ".") { - first = false; - continue; - } - if (elem === "..") { - str = $substring(dst.String(), 1); - index = strings.LastIndexByte(str, 47); - dst.Reset(); - dst.WriteByte(47); - if (index === -1) { - first = true; - } else { - dst.WriteString($substring(str, 0, index)); - } - } else { - if (!first) { - dst.WriteByte(47); - } - dst.WriteString(elem); - first = false; - } - } - if (elem === "." || elem === "..") { - dst.WriteByte(47); - } - r = dst.String(); - if (r.length > 1 && (r.charCodeAt(1) === 47)) { - r = $substring(r, 1); - } - return r; - }; - URL.ptr.prototype.IsAbs = function() { - var u; - u = this; - return !(u.Scheme === ""); - }; - URL.prototype.IsAbs = function() { return this.$val.IsAbs(); }; - URL.ptr.prototype.Parse = function(ref) { - var {_r, _tuple, err, ref, refURL, u, $s, $r, $c} = $restore(this, {ref}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - u = this; - _r = Parse(ref); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - refURL = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$2.nil, err]; - } - $s = -1; return [u.ResolveReference(refURL), $ifaceNil]; - /* */ } return; } var $f = {$blk: URL.ptr.prototype.Parse, $c: true, $r, _r, _tuple, err, ref, refURL, u, $s};return $f; - }; - URL.prototype.Parse = function(ref) { return this.$val.Parse(ref); }; - URL.ptr.prototype.ResolveReference = function(ref) { - var ref, u, url; - u = this; - url = $clone(ref, URL); - if (ref.Scheme === "") { - url.Scheme = u.Scheme; - } - if (!(ref.Scheme === "") || !(ref.Host === "") || !(ref.User === ptrType$1.nil)) { - url.setPath(resolvePath(ref.EscapedPath(), "")); - return url; - } - if (!(ref.Opaque === "")) { - url.User = ptrType$1.nil; - url.Host = ""; - url.Path = ""; - return url; - } - if (ref.Path === "" && !ref.ForceQuery && ref.RawQuery === "") { - url.RawQuery = u.RawQuery; - if (ref.Fragment === "") { - url.Fragment = u.Fragment; - url.RawFragment = u.RawFragment; - } - } - url.Host = u.Host; - url.User = u.User; - url.setPath(resolvePath(u.EscapedPath(), ref.EscapedPath())); - return url; - }; - URL.prototype.ResolveReference = function(ref) { return this.$val.ResolveReference(ref); }; - URL.ptr.prototype.Query = function() { - var {_r, _tuple, u, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - u = this; - _r = ParseQuery(u.RawQuery); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - v = _tuple[0]; - $s = -1; return v; - /* */ } return; } var $f = {$blk: URL.ptr.prototype.Query, $c: true, $r, _r, _tuple, u, v, $s};return $f; - }; - URL.prototype.Query = function() { return this.$val.Query(); }; - URL.ptr.prototype.RequestURI = function() { - var result, u; - u = this; - result = u.Opaque; - if (result === "") { - result = u.EscapedPath(); - if (result === "") { - result = "/"; - } - } else { - if (strings.HasPrefix(result, "//")) { - result = u.Scheme + ":" + result; - } - } - if (u.ForceQuery || !(u.RawQuery === "")) { - result = result + ("?" + u.RawQuery); - } - return result; - }; - URL.prototype.RequestURI = function() { return this.$val.RequestURI(); }; - URL.ptr.prototype.Hostname = function() { - var _tuple, host, u; - u = this; - _tuple = splitHostPort(u.Host); - host = _tuple[0]; - return host; - }; - URL.prototype.Hostname = function() { return this.$val.Hostname(); }; - URL.ptr.prototype.Port = function() { - var _tuple, port, u; - u = this; - _tuple = splitHostPort(u.Host); - port = _tuple[1]; - return port; - }; - URL.prototype.Port = function() { return this.$val.Port(); }; - splitHostPort = function(hostPort) { - var _tmp, _tmp$1, colon, host, hostPort, port; - host = ""; - port = ""; - host = hostPort; - colon = strings.LastIndexByte(host, 58); - if (!((colon === -1)) && validOptionalPort($substring(host, colon))) { - _tmp = $substring(host, 0, colon); - _tmp$1 = $substring(host, (colon + 1 >> 0)); - host = _tmp; - port = _tmp$1; - } - if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]")) { - host = $substring(host, 1, (host.length - 1 >> 0)); - } - return [host, port]; - }; - URL.ptr.prototype.MarshalBinary = function() { - var _tmp, _tmp$1, err, text, u; - text = sliceType$1.nil; - err = $ifaceNil; - u = this; - _tmp = (new sliceType$1($stringToBytes(u.String()))); - _tmp$1 = $ifaceNil; - text = _tmp; - err = _tmp$1; - return [text, err]; - }; - URL.prototype.MarshalBinary = function() { return this.$val.MarshalBinary(); }; - URL.ptr.prototype.UnmarshalBinary = function(text) { - var {_r, _tuple, err, text, u, u1, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - u = this; - _r = Parse(($bytesToString(text))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - u1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - URL.copy(u, u1); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: URL.ptr.prototype.UnmarshalBinary, $c: true, $r, _r, _tuple, err, text, u, u1, $s};return $f; - }; - URL.prototype.UnmarshalBinary = function(text) { return this.$val.UnmarshalBinary(text); }; - validUserinfo = function(s) { - var _1, _i, _ref, _rune, r, s; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - if (65 <= r && r <= 90) { - _i += _rune[1]; - continue; - } - if (97 <= r && r <= 122) { - _i += _rune[1]; - continue; - } - if (48 <= r && r <= 57) { - _i += _rune[1]; - continue; - } - _1 = r; - if ((_1 === (45)) || (_1 === (46)) || (_1 === (95)) || (_1 === (58)) || (_1 === (126)) || (_1 === (33)) || (_1 === (36)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (59)) || (_1 === (61)) || (_1 === (37)) || (_1 === (64))) { - _i += _rune[1]; - continue; - } else { - return false; - } - _i += _rune[1]; - } - return true; - }; - stringContainsCTLByte = function(s) { - var b, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - b = s.charCodeAt(i); - if (b < 32 || (b === 127)) { - return true; - } - i = i + (1) >> 0; - } - return false; - }; - ptrType$3.methods = [{prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - EscapeError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - InvalidHostError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$2.methods = [{prop: "setPath", name: "setPath", pkg: "net/url", typ: $funcType([$String], [$error], false)}, {prop: "EscapedPath", name: "EscapedPath", pkg: "", typ: $funcType([], [$String], false)}, {prop: "setFragment", name: "setFragment", pkg: "net/url", typ: $funcType([$String], [$error], false)}, {prop: "EscapedFragment", name: "EscapedFragment", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Redacted", name: "Redacted", pkg: "", typ: $funcType([], [$String], false)}, {prop: "IsAbs", name: "IsAbs", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Parse", name: "Parse", pkg: "", typ: $funcType([$String], [ptrType$2, $error], false)}, {prop: "ResolveReference", name: "ResolveReference", pkg: "", typ: $funcType([ptrType$2], [ptrType$2], false)}, {prop: "Query", name: "Query", pkg: "", typ: $funcType([], [Values], false)}, {prop: "RequestURI", name: "RequestURI", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Hostname", name: "Hostname", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Port", name: "Port", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$1, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$1], [$error], false)}]; - ptrType$1.methods = [{prop: "Username", name: "Username", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Password", name: "Password", pkg: "", typ: $funcType([], [$String, $Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - Values.methods = [{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Has", name: "Has", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "Encode", name: "Encode", pkg: "", typ: $funcType([], [$String], false)}]; - Error.init("", [{prop: "Op", name: "Op", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "URL", name: "URL", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - URL.init("", [{prop: "Scheme", name: "Scheme", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Opaque", name: "Opaque", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "User", name: "User", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Path", name: "Path", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RawPath", name: "RawPath", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ForceQuery", name: "ForceQuery", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "RawQuery", name: "RawQuery", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Fragment", name: "Fragment", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RawFragment", name: "RawFragment", embedded: false, exported: true, typ: $String, tag: ""}]); - Userinfo.init("net/url", [{prop: "username", name: "username", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "password", name: "password", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "passwordSet", name: "passwordSet", embedded: false, exported: false, typ: $Bool, tag: ""}]); - Values.init($String, sliceType$2); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["path/filepath"] = (function() { - var $pkg = {}, $init, errors, fs, os, runtime, sort, strings, syscall, utf8, lazybuf, sliceType$1, ptrType, volumeNameLen, join, Clean, FromSlash, Join, Base, VolumeName; - errors = $packages["errors"]; - fs = $packages["io/fs"]; - os = $packages["os"]; - runtime = $packages["runtime"]; - sort = $packages["sort"]; - strings = $packages["strings"]; - syscall = $packages["syscall"]; - utf8 = $packages["unicode/utf8"]; - lazybuf = $pkg.lazybuf = $newType(0, $kindStruct, "filepath.lazybuf", true, "path/filepath", false, function(path_, buf_, w_, volAndPath_, volLen_) { - this.$val = this; - if (arguments.length === 0) { - this.path = ""; - this.buf = sliceType$1.nil; - this.w = 0; - this.volAndPath = ""; - this.volLen = 0; - return; - } - this.path = path_; - this.buf = buf_; - this.w = w_; - this.volAndPath = volAndPath_; - this.volLen = volLen_; - }); - sliceType$1 = $sliceType($Uint8); - ptrType = $ptrType(lazybuf); - volumeNameLen = function(path) { - var path; - return 0; - }; - join = function(elem) { - var _i, _ref, e, elem, i; - _ref = elem; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - e = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!(e === "")) { - return Clean(strings.Join($subslice(elem, i), "/")); - } - _i++; - } - return ""; - }; - lazybuf.ptr.prototype.index = function(i) { - var b, i, x; - b = this; - if (!(b.buf === sliceType$1.nil)) { - return (x = b.buf, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - } - return b.path.charCodeAt(i); - }; - lazybuf.prototype.index = function(i) { return this.$val.index(i); }; - lazybuf.ptr.prototype.append = function(c) { - var b, c, x, x$1; - b = this; - if (b.buf === sliceType$1.nil) { - if (b.w < b.path.length && (b.path.charCodeAt(b.w) === c)) { - b.w = b.w + (1) >> 0; - return; - } - b.buf = $makeSlice(sliceType$1, b.path.length); - $copyString(b.buf, $substring(b.path, 0, b.w)); - } - (x = b.buf, x$1 = b.w, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = c)); - b.w = b.w + (1) >> 0; - }; - lazybuf.prototype.append = function(c) { return this.$val.append(c); }; - lazybuf.ptr.prototype.string = function() { - var b; - b = this; - if (b.buf === sliceType$1.nil) { - return $substring(b.volAndPath, 0, (b.volLen + b.w >> 0)); - } - return $substring(b.volAndPath, 0, b.volLen) + ($bytesToString($subslice(b.buf, 0, b.w))); - }; - lazybuf.prototype.string = function() { return this.$val.string(); }; - Clean = function(path) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, dotdot, n, originalPath, out, path, r, rooted, volLen; - originalPath = path; - volLen = volumeNameLen(path); - path = $substring(path, volLen); - if (path === "") { - if (volLen > 1 && !((originalPath.charCodeAt(1) === 58))) { - return FromSlash(originalPath); - } - return originalPath + "."; - } - rooted = os.IsPathSeparator(path.charCodeAt(0)); - n = path.length; - out = new lazybuf.ptr(path, sliceType$1.nil, 0, originalPath, volLen); - _tmp = 0; - _tmp$1 = 0; - r = _tmp; - dotdot = _tmp$1; - if (rooted) { - out.append(47); - _tmp$2 = 1; - _tmp$3 = 1; - r = _tmp$2; - dotdot = _tmp$3; - } - while (true) { - if (!(r < n)) { break; } - if (os.IsPathSeparator(path.charCodeAt(r))) { - r = r + (1) >> 0; - } else if ((path.charCodeAt(r) === 46) && ((r + 1 >> 0) === n)) { - r = r + (1) >> 0; - } else if ((path.charCodeAt(r) === 46) && os.IsPathSeparator(path.charCodeAt((r + 1 >> 0)))) { - r = r + (1) >> 0; - while (true) { - if (!(r < path.length && os.IsPathSeparator(path.charCodeAt(r)))) { break; } - r = r + (1) >> 0; - } - if ((out.w === 0) && volumeNameLen($substring(path, r)) > 0) { - out.append(46); - } - } else if ((path.charCodeAt(r) === 46) && (path.charCodeAt((r + 1 >> 0)) === 46) && (((r + 2 >> 0) === n) || os.IsPathSeparator(path.charCodeAt((r + 2 >> 0))))) { - r = r + (2) >> 0; - if (out.w > dotdot) { - out.w = out.w - (1) >> 0; - while (true) { - if (!(out.w > dotdot && !os.IsPathSeparator(out.index(out.w)))) { break; } - out.w = out.w - (1) >> 0; - } - } else if (!rooted) { - if (out.w > 0) { - out.append(47); - } - out.append(46); - out.append(46); - dotdot = out.w; - } - } else { - if (rooted && !((out.w === 1)) || !rooted && !((out.w === 0))) { - out.append(47); - } - while (true) { - if (!(r < n && !os.IsPathSeparator(path.charCodeAt(r)))) { break; } - out.append(path.charCodeAt(r)); - r = r + (1) >> 0; - } - } - } - if (out.w === 0) { - out.append(46); - } - return FromSlash(out.string()); - }; - $pkg.Clean = Clean; - FromSlash = function(path) { - var path; - if (true) { - return path; - } - return strings.ReplaceAll(path, "/", "/"); - }; - $pkg.FromSlash = FromSlash; - Join = function(elem) { - var elem; - return join(elem); - }; - $pkg.Join = Join; - Base = function(path) { - var i, path; - if (path === "") { - return "."; - } - while (true) { - if (!(path.length > 0 && os.IsPathSeparator(path.charCodeAt((path.length - 1 >> 0))))) { break; } - path = $substring(path, 0, (path.length - 1 >> 0)); - } - path = $substring(path, VolumeName(path).length); - i = path.length - 1 >> 0; - while (true) { - if (!(i >= 0 && !os.IsPathSeparator(path.charCodeAt(i)))) { break; } - i = i - (1) >> 0; - } - if (i >= 0) { - path = $substring(path, (i + 1 >> 0)); - } - if (path === "") { - return "/"; - } - return path; - }; - $pkg.Base = Base; - VolumeName = function(path) { - var path; - return $substring(path, 0, volumeNameLen(path)); - }; - $pkg.VolumeName = VolumeName; - ptrType.methods = [{prop: "index", name: "index", pkg: "path/filepath", typ: $funcType([$Int], [$Uint8], false)}, {prop: "append", name: "append", pkg: "path/filepath", typ: $funcType([$Uint8], [], false)}, {prop: "string", name: "string", pkg: "path/filepath", typ: $funcType([], [$String], false)}]; - lazybuf.init("path/filepath", [{prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "volAndPath", name: "volAndPath", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "volLen", name: "volLen", embedded: false, exported: false, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fs.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = syscall.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrBadPattern = errors.New("syntax error in pattern"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/x509"] = (function() { - var $pkg = {}, $init, bytes, crypto, aes, cipher, des, dsa, ecdsa, ed25519, elliptic, md5, rsa, sha1, sha256, sha512, pkix, asn1, hex, pem, errors, fmt, godebug, io, fs, big, net, url, os, filepath, reflect, runtime, strconv, strings, sync, time, unicode, utf16, utf8, cryptobyte, asn1$1, publicKeyInfo, authKeyId, SignatureAlgorithm, PublicKeyAlgorithm, pssParameters, KeyUsage, ExtKeyUsage, Certificate, InsecureAlgorithmError, ConstraintViolationError, UnhandledCriticalExtension, InvalidReason, CertificateInvalidError, HostnameError, UnknownAuthorityError, SystemRootsError, VerifyOptions, rfc2821Mailbox, ecPrivateKey, pkcs8, pkcs1PrivateKey, pkcs1AdditionalRSAPrime, pkcs1PublicKey, sum224, CertPool, lazyCert, ptrType, structType, sliceType, sliceType$1, structType$1, sliceType$2, sliceType$3, sliceType$4, ptrType$1, ptrType$2, ptrType$3, sliceType$6, ptrType$4, sliceType$8, ptrType$6, sliceType$11, ptrType$7, ptrType$8, sliceType$13, ptrType$9, sliceType$15, sliceType$18, ptrType$13, sliceType$19, ptrType$14, ptrType$16, ptrType$17, sliceType$20, sliceType$21, sliceType$22, ptrType$18, ptrType$19, sliceType$23, sliceType$24, ptrType$20, ptrType$21, sliceType$25, sliceType$26, sliceType$27, ptrType$23, ptrType$24, sliceType$28, sliceType$29, structType$3, sliceType$30, funcType, ptrType$25, mapType, funcType$2, mapType$1, mapType$2, publicKeyAlgoName, oidSignatureMD2WithRSA, oidSignatureMD5WithRSA, oidSignatureSHA1WithRSA, oidSignatureSHA256WithRSA, oidSignatureSHA384WithRSA, oidSignatureSHA512WithRSA, oidSignatureRSAPSS, oidSignatureDSAWithSHA1, oidSignatureDSAWithSHA256, oidSignatureECDSAWithSHA1, oidSignatureECDSAWithSHA256, oidSignatureECDSAWithSHA384, oidSignatureECDSAWithSHA512, oidSignatureEd25519, oidSHA256, oidSHA384, oidSHA512, oidMGF1, oidISOSignatureSHA1WithRSA, signatureAlgorithmDetails, hashToPSSParameters, oidPublicKeyRSA, oidPublicKeyDSA, oidPublicKeyECDSA, oidPublicKeyEd25519, oidNamedCurveP224, oidNamedCurveP256, oidNamedCurveP384, oidNamedCurveP521, oidExtKeyUsageAny, oidExtKeyUsageServerAuth, oidExtKeyUsageClientAuth, oidExtKeyUsageCodeSigning, oidExtKeyUsageEmailProtection, oidExtKeyUsageIPSECEndSystem, oidExtKeyUsageIPSECTunnel, oidExtKeyUsageIPSECUser, oidExtKeyUsageTimeStamping, oidExtKeyUsageOCSPSigning, oidExtKeyUsageMicrosoftServerGatedCrypto, oidExtKeyUsageNetscapeServerGatedCrypto, oidExtKeyUsageMicrosoftCommercialCodeSigning, oidExtKeyUsageMicrosoftKernelCodeSigning, extKeyUsageOIDs, debugAllowSHA1, oidExtensionAuthorityKeyId, oidExtensionSubjectAltName, oidExtensionNameConstraints, oidExtensionAuthorityInfoAccess, oidAuthorityInfoAccessOcsp, oidAuthorityInfoAccessIssuers, errNotParsed, certFiles, certDirectories, once, systemRoots, systemRootsErr, _r, getSignatureAlgorithmFromAI, getPublicKeyAlgorithmFromOID, namedCurveFromOID, extKeyUsageFromOID, signaturePublicKeyAlgoMismatchError, checkSignature, oidInExtensions, isIA5String, signingParamsForPublicKey, parseRFC2821Mailbox, domainToReverseLabels, matchEmailConstraint, matchURIConstraint, matchIPConstraint, matchDomainConstraint, appendToFreshChain, validHostnamePattern, validHostnameInput, validHostname, matchExactly, matchHostnames, toLowerCaseASCII, checkChainForKeyUsage, ParseECPrivateKey, parseECPrivateKey, loadSystemRoots, readUniqueDirectoryEntries, isSameDirSymlink, systemRootsPool, initSystemRoots, ParsePKCS8PrivateKey, ParsePKCS1PrivateKey, isPrintable, parseASN1String, parseName, parseAI, parseValidity, parseExtension, parsePublicKey, parseKeyUsageExtension, parseBasicConstraintsExtension, forEachSAN, parseSANExtension, parseExtKeyUsageExtension, parseCertificatePoliciesExtension, isValidIPMask, parseNameConstraintsExtension, processExtensions, parseCertificate, ParseCertificate, NewCertPool; - bytes = $packages["bytes"]; - crypto = $packages["crypto"]; - aes = $packages["crypto/aes"]; - cipher = $packages["crypto/cipher"]; - des = $packages["crypto/des"]; - dsa = $packages["crypto/dsa"]; - ecdsa = $packages["crypto/ecdsa"]; - ed25519 = $packages["crypto/ed25519"]; - elliptic = $packages["crypto/elliptic"]; - md5 = $packages["crypto/md5"]; - rsa = $packages["crypto/rsa"]; - sha1 = $packages["crypto/sha1"]; - sha256 = $packages["crypto/sha256"]; - sha512 = $packages["crypto/sha512"]; - pkix = $packages["crypto/x509/pkix"]; - asn1 = $packages["encoding/asn1"]; - hex = $packages["encoding/hex"]; - pem = $packages["encoding/pem"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - godebug = $packages["internal/godebug"]; - io = $packages["io"]; - fs = $packages["io/fs"]; - big = $packages["math/big"]; - net = $packages["net"]; - url = $packages["net/url"]; - os = $packages["os"]; - filepath = $packages["path/filepath"]; - reflect = $packages["reflect"]; - runtime = $packages["runtime"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - time = $packages["time"]; - unicode = $packages["unicode"]; - utf16 = $packages["unicode/utf16"]; - utf8 = $packages["unicode/utf8"]; - cryptobyte = $packages["vendor/golang.org/x/crypto/cryptobyte"]; - asn1$1 = $packages["vendor/golang.org/x/crypto/cryptobyte/asn1"]; - publicKeyInfo = $pkg.publicKeyInfo = $newType(0, $kindStruct, "x509.publicKeyInfo", true, "crypto/x509", false, function(Raw_, Algorithm_, PublicKey_) { - this.$val = this; - if (arguments.length === 0) { - this.Raw = asn1.RawContent.nil; - this.Algorithm = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - this.PublicKey = new asn1.BitString.ptr(sliceType$1.nil, 0); - return; - } - this.Raw = Raw_; - this.Algorithm = Algorithm_; - this.PublicKey = PublicKey_; - }); - authKeyId = $pkg.authKeyId = $newType(0, $kindStruct, "x509.authKeyId", true, "crypto/x509", false, function(Id_) { - this.$val = this; - if (arguments.length === 0) { - this.Id = sliceType$1.nil; - return; - } - this.Id = Id_; - }); - SignatureAlgorithm = $pkg.SignatureAlgorithm = $newType(4, $kindInt, "x509.SignatureAlgorithm", true, "crypto/x509", true, null); - PublicKeyAlgorithm = $pkg.PublicKeyAlgorithm = $newType(4, $kindInt, "x509.PublicKeyAlgorithm", true, "crypto/x509", true, null); - pssParameters = $pkg.pssParameters = $newType(0, $kindStruct, "x509.pssParameters", true, "crypto/x509", false, function(Hash_, MGF_, SaltLength_, TrailerField_) { - this.$val = this; - if (arguments.length === 0) { - this.Hash = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - this.MGF = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - this.SaltLength = 0; - this.TrailerField = 0; - return; - } - this.Hash = Hash_; - this.MGF = MGF_; - this.SaltLength = SaltLength_; - this.TrailerField = TrailerField_; - }); - KeyUsage = $pkg.KeyUsage = $newType(4, $kindInt, "x509.KeyUsage", true, "crypto/x509", true, null); - ExtKeyUsage = $pkg.ExtKeyUsage = $newType(4, $kindInt, "x509.ExtKeyUsage", true, "crypto/x509", true, null); - Certificate = $pkg.Certificate = $newType(0, $kindStruct, "x509.Certificate", true, "crypto/x509", true, function(Raw_, RawTBSCertificate_, RawSubjectPublicKeyInfo_, RawSubject_, RawIssuer_, Signature_, SignatureAlgorithm_, PublicKeyAlgorithm_, PublicKey_, Version_, SerialNumber_, Issuer_, Subject_, NotBefore_, NotAfter_, KeyUsage_, Extensions_, ExtraExtensions_, UnhandledCriticalExtensions_, ExtKeyUsage_, UnknownExtKeyUsage_, BasicConstraintsValid_, IsCA_, MaxPathLen_, MaxPathLenZero_, SubjectKeyId_, AuthorityKeyId_, OCSPServer_, IssuingCertificateURL_, DNSNames_, EmailAddresses_, IPAddresses_, URIs_, PermittedDNSDomainsCritical_, PermittedDNSDomains_, ExcludedDNSDomains_, PermittedIPRanges_, ExcludedIPRanges_, PermittedEmailAddresses_, ExcludedEmailAddresses_, PermittedURIDomains_, ExcludedURIDomains_, CRLDistributionPoints_, PolicyIdentifiers_) { - this.$val = this; - if (arguments.length === 0) { - this.Raw = sliceType$1.nil; - this.RawTBSCertificate = sliceType$1.nil; - this.RawSubjectPublicKeyInfo = sliceType$1.nil; - this.RawSubject = sliceType$1.nil; - this.RawIssuer = sliceType$1.nil; - this.Signature = sliceType$1.nil; - this.SignatureAlgorithm = 0; - this.PublicKeyAlgorithm = 0; - this.PublicKey = $ifaceNil; - this.Version = 0; - this.SerialNumber = ptrType$1.nil; - this.Issuer = new pkix.Name.ptr(sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, "", "", sliceType$15.nil, sliceType$15.nil); - this.Subject = new pkix.Name.ptr(sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, "", "", sliceType$15.nil, sliceType$15.nil); - this.NotBefore = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - this.NotAfter = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - this.KeyUsage = 0; - this.Extensions = sliceType$8.nil; - this.ExtraExtensions = sliceType$8.nil; - this.UnhandledCriticalExtensions = sliceType$11.nil; - this.ExtKeyUsage = sliceType$22.nil; - this.UnknownExtKeyUsage = sliceType$11.nil; - this.BasicConstraintsValid = false; - this.IsCA = false; - this.MaxPathLen = 0; - this.MaxPathLenZero = false; - this.SubjectKeyId = sliceType$1.nil; - this.AuthorityKeyId = sliceType$1.nil; - this.OCSPServer = sliceType$4.nil; - this.IssuingCertificateURL = sliceType$4.nil; - this.DNSNames = sliceType$4.nil; - this.EmailAddresses = sliceType$4.nil; - this.IPAddresses = sliceType$18.nil; - this.URIs = sliceType$19.nil; - this.PermittedDNSDomainsCritical = false; - this.PermittedDNSDomains = sliceType$4.nil; - this.ExcludedDNSDomains = sliceType$4.nil; - this.PermittedIPRanges = sliceType$28.nil; - this.ExcludedIPRanges = sliceType$28.nil; - this.PermittedEmailAddresses = sliceType$4.nil; - this.ExcludedEmailAddresses = sliceType$4.nil; - this.PermittedURIDomains = sliceType$4.nil; - this.ExcludedURIDomains = sliceType$4.nil; - this.CRLDistributionPoints = sliceType$4.nil; - this.PolicyIdentifiers = sliceType$11.nil; - return; - } - this.Raw = Raw_; - this.RawTBSCertificate = RawTBSCertificate_; - this.RawSubjectPublicKeyInfo = RawSubjectPublicKeyInfo_; - this.RawSubject = RawSubject_; - this.RawIssuer = RawIssuer_; - this.Signature = Signature_; - this.SignatureAlgorithm = SignatureAlgorithm_; - this.PublicKeyAlgorithm = PublicKeyAlgorithm_; - this.PublicKey = PublicKey_; - this.Version = Version_; - this.SerialNumber = SerialNumber_; - this.Issuer = Issuer_; - this.Subject = Subject_; - this.NotBefore = NotBefore_; - this.NotAfter = NotAfter_; - this.KeyUsage = KeyUsage_; - this.Extensions = Extensions_; - this.ExtraExtensions = ExtraExtensions_; - this.UnhandledCriticalExtensions = UnhandledCriticalExtensions_; - this.ExtKeyUsage = ExtKeyUsage_; - this.UnknownExtKeyUsage = UnknownExtKeyUsage_; - this.BasicConstraintsValid = BasicConstraintsValid_; - this.IsCA = IsCA_; - this.MaxPathLen = MaxPathLen_; - this.MaxPathLenZero = MaxPathLenZero_; - this.SubjectKeyId = SubjectKeyId_; - this.AuthorityKeyId = AuthorityKeyId_; - this.OCSPServer = OCSPServer_; - this.IssuingCertificateURL = IssuingCertificateURL_; - this.DNSNames = DNSNames_; - this.EmailAddresses = EmailAddresses_; - this.IPAddresses = IPAddresses_; - this.URIs = URIs_; - this.PermittedDNSDomainsCritical = PermittedDNSDomainsCritical_; - this.PermittedDNSDomains = PermittedDNSDomains_; - this.ExcludedDNSDomains = ExcludedDNSDomains_; - this.PermittedIPRanges = PermittedIPRanges_; - this.ExcludedIPRanges = ExcludedIPRanges_; - this.PermittedEmailAddresses = PermittedEmailAddresses_; - this.ExcludedEmailAddresses = ExcludedEmailAddresses_; - this.PermittedURIDomains = PermittedURIDomains_; - this.ExcludedURIDomains = ExcludedURIDomains_; - this.CRLDistributionPoints = CRLDistributionPoints_; - this.PolicyIdentifiers = PolicyIdentifiers_; - }); - InsecureAlgorithmError = $pkg.InsecureAlgorithmError = $newType(4, $kindInt, "x509.InsecureAlgorithmError", true, "crypto/x509", true, null); - ConstraintViolationError = $pkg.ConstraintViolationError = $newType(0, $kindStruct, "x509.ConstraintViolationError", true, "crypto/x509", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - UnhandledCriticalExtension = $pkg.UnhandledCriticalExtension = $newType(0, $kindStruct, "x509.UnhandledCriticalExtension", true, "crypto/x509", true, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - InvalidReason = $pkg.InvalidReason = $newType(4, $kindInt, "x509.InvalidReason", true, "crypto/x509", true, null); - CertificateInvalidError = $pkg.CertificateInvalidError = $newType(0, $kindStruct, "x509.CertificateInvalidError", true, "crypto/x509", true, function(Cert_, Reason_, Detail_) { - this.$val = this; - if (arguments.length === 0) { - this.Cert = ptrType$4.nil; - this.Reason = 0; - this.Detail = ""; - return; - } - this.Cert = Cert_; - this.Reason = Reason_; - this.Detail = Detail_; - }); - HostnameError = $pkg.HostnameError = $newType(0, $kindStruct, "x509.HostnameError", true, "crypto/x509", true, function(Certificate_, Host_) { - this.$val = this; - if (arguments.length === 0) { - this.Certificate = ptrType$4.nil; - this.Host = ""; - return; - } - this.Certificate = Certificate_; - this.Host = Host_; - }); - UnknownAuthorityError = $pkg.UnknownAuthorityError = $newType(0, $kindStruct, "x509.UnknownAuthorityError", true, "crypto/x509", true, function(Cert_, hintErr_, hintCert_) { - this.$val = this; - if (arguments.length === 0) { - this.Cert = ptrType$4.nil; - this.hintErr = $ifaceNil; - this.hintCert = ptrType$4.nil; - return; - } - this.Cert = Cert_; - this.hintErr = hintErr_; - this.hintCert = hintCert_; - }); - SystemRootsError = $pkg.SystemRootsError = $newType(0, $kindStruct, "x509.SystemRootsError", true, "crypto/x509", true, function(Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Err = $ifaceNil; - return; - } - this.Err = Err_; - }); - VerifyOptions = $pkg.VerifyOptions = $newType(0, $kindStruct, "x509.VerifyOptions", true, "crypto/x509", true, function(DNSName_, Intermediates_, Roots_, CurrentTime_, KeyUsages_, MaxConstraintComparisions_) { - this.$val = this; - if (arguments.length === 0) { - this.DNSName = ""; - this.Intermediates = ptrType.nil; - this.Roots = ptrType.nil; - this.CurrentTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - this.KeyUsages = sliceType$22.nil; - this.MaxConstraintComparisions = 0; - return; - } - this.DNSName = DNSName_; - this.Intermediates = Intermediates_; - this.Roots = Roots_; - this.CurrentTime = CurrentTime_; - this.KeyUsages = KeyUsages_; - this.MaxConstraintComparisions = MaxConstraintComparisions_; - }); - rfc2821Mailbox = $pkg.rfc2821Mailbox = $newType(0, $kindStruct, "x509.rfc2821Mailbox", true, "crypto/x509", false, function(local_, domain_) { - this.$val = this; - if (arguments.length === 0) { - this.local = ""; - this.domain = ""; - return; - } - this.local = local_; - this.domain = domain_; - }); - ecPrivateKey = $pkg.ecPrivateKey = $newType(0, $kindStruct, "x509.ecPrivateKey", true, "crypto/x509", false, function(Version_, PrivateKey_, NamedCurveOID_, PublicKey_) { - this.$val = this; - if (arguments.length === 0) { - this.Version = 0; - this.PrivateKey = sliceType$1.nil; - this.NamedCurveOID = asn1.ObjectIdentifier.nil; - this.PublicKey = new asn1.BitString.ptr(sliceType$1.nil, 0); - return; - } - this.Version = Version_; - this.PrivateKey = PrivateKey_; - this.NamedCurveOID = NamedCurveOID_; - this.PublicKey = PublicKey_; - }); - pkcs8 = $pkg.pkcs8 = $newType(0, $kindStruct, "x509.pkcs8", true, "crypto/x509", false, function(Version_, Algo_, PrivateKey_) { - this.$val = this; - if (arguments.length === 0) { - this.Version = 0; - this.Algo = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - this.PrivateKey = sliceType$1.nil; - return; - } - this.Version = Version_; - this.Algo = Algo_; - this.PrivateKey = PrivateKey_; - }); - pkcs1PrivateKey = $pkg.pkcs1PrivateKey = $newType(0, $kindStruct, "x509.pkcs1PrivateKey", true, "crypto/x509", false, function(Version_, N_, E_, D_, P_, Q_, Dp_, Dq_, Qinv_, AdditionalPrimes_) { - this.$val = this; - if (arguments.length === 0) { - this.Version = 0; - this.N = ptrType$1.nil; - this.E = 0; - this.D = ptrType$1.nil; - this.P = ptrType$1.nil; - this.Q = ptrType$1.nil; - this.Dp = ptrType$1.nil; - this.Dq = ptrType$1.nil; - this.Qinv = ptrType$1.nil; - this.AdditionalPrimes = sliceType$23.nil; - return; - } - this.Version = Version_; - this.N = N_; - this.E = E_; - this.D = D_; - this.P = P_; - this.Q = Q_; - this.Dp = Dp_; - this.Dq = Dq_; - this.Qinv = Qinv_; - this.AdditionalPrimes = AdditionalPrimes_; - }); - pkcs1AdditionalRSAPrime = $pkg.pkcs1AdditionalRSAPrime = $newType(0, $kindStruct, "x509.pkcs1AdditionalRSAPrime", true, "crypto/x509", false, function(Prime_, Exp_, Coeff_) { - this.$val = this; - if (arguments.length === 0) { - this.Prime = ptrType$1.nil; - this.Exp = ptrType$1.nil; - this.Coeff = ptrType$1.nil; - return; - } - this.Prime = Prime_; - this.Exp = Exp_; - this.Coeff = Coeff_; - }); - pkcs1PublicKey = $pkg.pkcs1PublicKey = $newType(0, $kindStruct, "x509.pkcs1PublicKey", true, "crypto/x509", false, function(N_, E_) { - this.$val = this; - if (arguments.length === 0) { - this.N = ptrType$1.nil; - this.E = 0; - return; - } - this.N = N_; - this.E = E_; - }); - sum224 = $pkg.sum224 = $newType(28, $kindArray, "x509.sum224", true, "crypto/x509", false, null); - CertPool = $pkg.CertPool = $newType(0, $kindStruct, "x509.CertPool", true, "crypto/x509", true, function(byName_, lazyCerts_, haveSum_, systemPool_) { - this.$val = this; - if (arguments.length === 0) { - this.byName = false; - this.lazyCerts = sliceType$29.nil; - this.haveSum = false; - this.systemPool = false; - return; - } - this.byName = byName_; - this.lazyCerts = lazyCerts_; - this.haveSum = haveSum_; - this.systemPool = systemPool_; - }); - lazyCert = $pkg.lazyCert = $newType(0, $kindStruct, "x509.lazyCert", true, "crypto/x509", false, function(rawSubject_, getCert_) { - this.$val = this; - if (arguments.length === 0) { - this.rawSubject = sliceType$1.nil; - this.getCert = $throwNilPointerError; - return; - } - this.rawSubject = rawSubject_; - this.getCert = getCert_; - }); - ptrType = $ptrType(CertPool); - structType = $structType("crypto/x509", [{prop: "algo", name: "algo", embedded: false, exported: false, typ: SignatureAlgorithm, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "oid", name: "oid", embedded: false, exported: false, typ: asn1.ObjectIdentifier, tag: ""}, {prop: "pubKeyAlgo", name: "pubKeyAlgo", embedded: false, exported: false, typ: PublicKeyAlgorithm, tag: ""}, {prop: "hash", name: "hash", embedded: false, exported: false, typ: crypto.Hash, tag: ""}]); - sliceType = $sliceType(structType); - sliceType$1 = $sliceType($Uint8); - structType$1 = $structType("crypto/x509", [{prop: "extKeyUsage", name: "extKeyUsage", embedded: false, exported: false, typ: ExtKeyUsage, tag: ""}, {prop: "oid", name: "oid", embedded: false, exported: false, typ: asn1.ObjectIdentifier, tag: ""}]); - sliceType$2 = $sliceType(structType$1); - sliceType$3 = $sliceType($Int); - sliceType$4 = $sliceType($String); - ptrType$1 = $ptrType(big.Int); - ptrType$2 = $ptrType(rsa.PublicKey); - ptrType$3 = $ptrType(ecdsa.PublicKey); - sliceType$6 = $sliceType($emptyInterface); - ptrType$4 = $ptrType(Certificate); - sliceType$8 = $sliceType(pkix.Extension); - ptrType$6 = $ptrType($Bool); - sliceType$11 = $sliceType(asn1.ObjectIdentifier); - ptrType$7 = $ptrType(time.Location); - ptrType$8 = $ptrType(pem.Block); - sliceType$13 = $sliceType(pkix.RevokedCertificate); - ptrType$9 = $ptrType(pkix.CertificateList); - sliceType$15 = $sliceType(pkix.AttributeTypeAndValue); - sliceType$18 = $sliceType(net.IP); - ptrType$13 = $ptrType(url.URL); - sliceType$19 = $sliceType(ptrType$13); - ptrType$14 = $ptrType(pkix.RDNSequence); - ptrType$16 = $ptrType($Int); - ptrType$17 = $ptrType(net.IPNet); - sliceType$20 = $sliceType(ptrType$4); - sliceType$21 = $sliceType(sliceType$20); - sliceType$22 = $sliceType(ExtKeyUsage); - ptrType$18 = $ptrType(asn1.ObjectIdentifier); - ptrType$19 = $ptrType(ecdsa.PrivateKey); - sliceType$23 = $sliceType(pkcs1AdditionalRSAPrime); - sliceType$24 = $sliceType(fs.DirEntry); - ptrType$20 = $ptrType(sliceType$1); - ptrType$21 = $ptrType(rsa.PrivateKey); - sliceType$25 = $sliceType(ptrType$1); - sliceType$26 = $sliceType(rsa.CRTValue); - sliceType$27 = $sliceType($Uint16); - ptrType$23 = $ptrType(cryptobyte.String); - ptrType$24 = $ptrType(asn1$1.Tag); - sliceType$28 = $sliceType(ptrType$17); - sliceType$29 = $sliceType(lazyCert); - structType$3 = $structType("crypto/x509", [{prop: "Once", name: "Once", embedded: true, exported: true, typ: sync.Once, tag: ""}, {prop: "v", name: "v", embedded: false, exported: false, typ: ptrType$4, tag: ""}]); - sliceType$30 = $sliceType(sliceType$1); - funcType = $funcType([$emptyInterface, $emptyInterface], [$Bool, $error], false); - ptrType$25 = $ptrType(VerifyOptions); - mapType = $mapType(ptrType$4, sliceType$21); - funcType$2 = $funcType([], [ptrType$4, $error], false); - mapType$1 = $mapType($String, sliceType$3); - mapType$2 = $mapType(sum224, $Bool); - SignatureAlgorithm.prototype.isRSAPSS = function() { - var _1, algo; - algo = this.$val; - _1 = algo; - if ((_1 === (13)) || (_1 === (14)) || (_1 === (15))) { - return true; - } else { - return false; - } - }; - $ptrType(SignatureAlgorithm).prototype.isRSAPSS = function() { return new SignatureAlgorithm(this.$get()).isRSAPSS(); }; - SignatureAlgorithm.prototype.String = function() { - var _i, _ref, algo, details; - algo = this.$val; - _ref = signatureAlgorithmDetails; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - details = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType); - if (details.algo === algo) { - return details.name; - } - _i++; - } - return strconv.Itoa(((algo >> 0))); - }; - $ptrType(SignatureAlgorithm).prototype.String = function() { return new SignatureAlgorithm(this.$get()).String(); }; - PublicKeyAlgorithm.prototype.String = function() { - var algo; - algo = this.$val; - if (0 < algo && ((algo >> 0)) < 5) { - return ((algo < 0 || algo >= publicKeyAlgoName.length) ? ($throwRuntimeError("index out of range"), undefined) : publicKeyAlgoName[algo]); - } - return strconv.Itoa(((algo >> 0))); - }; - $ptrType(PublicKeyAlgorithm).prototype.String = function() { return new PublicKeyAlgorithm(this.$get()).String(); }; - getSignatureAlgorithmFromAI = function(ai) { - var {_i, _r$1, _r$2, _ref, _tuple, _tuple$1, ai, details, err, err$1, mgf1HashFunc, params, $s, $r, $c} = $restore(this, {ai}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mgf1HashFunc = [mgf1HashFunc]; - params = [params]; - if (ai.Algorithm.Equal(oidSignatureEd25519)) { - if (!((ai.Parameters.FullBytes.$length === 0))) { - $s = -1; return 0; - } - } - if (!ai.Algorithm.Equal(oidSignatureRSAPSS)) { - _ref = signatureAlgorithmDetails; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - details = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType); - if (ai.Algorithm.Equal(details.oid)) { - $s = -1; return details.algo; - } - _i++; - } - $s = -1; return 0; - } - params[0] = new pssParameters.ptr(new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)), new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)), 0, 0); - _r$1 = asn1.Unmarshal(ai.Parameters.FullBytes, params[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return 0; - } - mgf1HashFunc[0] = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - _r$2 = asn1.Unmarshal(params[0].MGF.Parameters.FullBytes, mgf1HashFunc[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return 0; - } - if ((!((params[0].Hash.Parameters.FullBytes.$length === 0)) && !bytes.Equal(params[0].Hash.Parameters.FullBytes, asn1.NullBytes)) || !params[0].MGF.Algorithm.Equal(oidMGF1) || !mgf1HashFunc[0].Algorithm.Equal(params[0].Hash.Algorithm) || (!((mgf1HashFunc[0].Parameters.FullBytes.$length === 0)) && !bytes.Equal(mgf1HashFunc[0].Parameters.FullBytes, asn1.NullBytes)) || !((params[0].TrailerField === 1))) { - $s = -1; return 0; - } - if (params[0].Hash.Algorithm.Equal(oidSHA256) && (params[0].SaltLength === 32)) { - $s = -1; return 13; - } else if (params[0].Hash.Algorithm.Equal(oidSHA384) && (params[0].SaltLength === 48)) { - $s = -1; return 14; - } else if (params[0].Hash.Algorithm.Equal(oidSHA512) && (params[0].SaltLength === 64)) { - $s = -1; return 15; - } - $s = -1; return 0; - /* */ } return; } var $f = {$blk: getSignatureAlgorithmFromAI, $c: true, $r, _i, _r$1, _r$2, _ref, _tuple, _tuple$1, ai, details, err, err$1, mgf1HashFunc, params, $s};return $f; - }; - getPublicKeyAlgorithmFromOID = function(oid) { - var oid; - if (oid.Equal(oidPublicKeyRSA)) { - return 1; - } else if (oid.Equal(oidPublicKeyDSA)) { - return 2; - } else if (oid.Equal(oidPublicKeyECDSA)) { - return 3; - } else if (oid.Equal(oidPublicKeyEd25519)) { - return 4; - } - return 0; - }; - namedCurveFromOID = function(oid) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, oid, $s, $r, $c} = $restore(this, {oid}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (oid.Equal(oidNamedCurveP224)) { $s = 2; continue; } - /* */ if (oid.Equal(oidNamedCurveP256)) { $s = 3; continue; } - /* */ if (oid.Equal(oidNamedCurveP384)) { $s = 4; continue; } - /* */ if (oid.Equal(oidNamedCurveP521)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (oid.Equal(oidNamedCurveP224)) { */ case 2: - _r$1 = elliptic.P224(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 8; case 8: return $24r; - /* } else if (oid.Equal(oidNamedCurveP256)) { */ case 3: - _r$2 = elliptic.P256(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 10; case 10: return $24r$1; - /* } else if (oid.Equal(oidNamedCurveP384)) { */ case 4: - _r$3 = elliptic.P384(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 12; case 12: return $24r$2; - /* } else if (oid.Equal(oidNamedCurveP521)) { */ case 5: - _r$4 = elliptic.P521(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$3 = _r$4; - $s = 14; case 14: return $24r$3; - /* } */ case 6: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: namedCurveFromOID, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, oid, $s};return $f; - }; - extKeyUsageFromOID = function(oid) { - var _i, _ref, _tmp, _tmp$1, eku, oid, ok, pair; - eku = 0; - ok = false; - _ref = extKeyUsageOIDs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - pair = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType$1); - if (oid.Equal(pair.oid)) { - _tmp = pair.extKeyUsage; - _tmp$1 = true; - eku = _tmp; - ok = _tmp$1; - return [eku, ok]; - } - _i++; - } - return [eku, ok]; - }; - InsecureAlgorithmError.prototype.Error = function() { - var {$24r, _r$1, e, override, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - override = ""; - if ((((e >> 0)) === 3) || (((e >> 0)) === 9)) { - override = " (temporarily override with GODEBUG=x509sha1=1)"; - } - _r$1 = fmt.Sprintf("x509: cannot verify signature: insecure algorithm %v", new sliceType$6([new SignatureAlgorithm(((e >> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1 + override; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InsecureAlgorithmError.prototype.Error, $c: true, $r, $24r, _r$1, e, override, $s};return $f; - }; - $ptrType(InsecureAlgorithmError).prototype.Error = function() { return new InsecureAlgorithmError(this.$get()).Error(); }; - ConstraintViolationError.ptr.prototype.Error = function() { - return "x509: invalid signature: parent certificate cannot sign this kind of certificate"; - }; - ConstraintViolationError.prototype.Error = function() { return this.$val.Error(); }; - Certificate.ptr.prototype.Equal = function(other) { - var c, other; - c = this; - if (c === ptrType$4.nil || other === ptrType$4.nil) { - return c === other; - } - return bytes.Equal(c.Raw, other.Raw); - }; - Certificate.prototype.Equal = function(other) { return this.$val.Equal(other); }; - Certificate.ptr.prototype.hasSANExtension = function() { - var c; - c = this; - return oidInExtensions($convertSliceType(oidExtensionSubjectAltName, asn1.ObjectIdentifier), c.Extensions); - }; - Certificate.prototype.hasSANExtension = function() { return this.$val.hasSANExtension(); }; - Certificate.ptr.prototype.CheckSignatureFrom = function(parent) { - var {$24r, _r$1, c, parent, x, x$1, $s, $r, $c} = $restore(this, {parent}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if ((parent.Version === 3) && !parent.BasicConstraintsValid || parent.BasicConstraintsValid && !parent.IsCA) { - $s = -1; return (x = new ConstraintViolationError.ptr(), new x.constructor.elem(x)); - } - if (!((parent.KeyUsage === 0)) && ((parent.KeyUsage & 32) === 0)) { - $s = -1; return (x$1 = new ConstraintViolationError.ptr(), new x$1.constructor.elem(x$1)); - } - if (parent.PublicKeyAlgorithm === 0) { - $s = -1; return $pkg.ErrUnsupportedAlgorithm; - } - _r$1 = checkSignature(c.SignatureAlgorithm, c.RawTBSCertificate, c.Signature, parent.PublicKey, debugAllowSHA1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.CheckSignatureFrom, $c: true, $r, $24r, _r$1, c, parent, x, x$1, $s};return $f; - }; - Certificate.prototype.CheckSignatureFrom = function(parent) { return this.$val.CheckSignatureFrom(parent); }; - Certificate.ptr.prototype.CheckSignature = function(algo, signed, signature) { - var {$24r, _r$1, algo, c, signature, signed, $s, $r, $c} = $restore(this, {algo, signed, signature}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = checkSignature(algo, signed, signature, c.PublicKey, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.CheckSignature, $c: true, $r, $24r, _r$1, algo, c, signature, signed, $s};return $f; - }; - Certificate.prototype.CheckSignature = function(algo, signed, signature) { return this.$val.CheckSignature(algo, signed, signature); }; - Certificate.ptr.prototype.hasNameConstraints = function() { - var c; - c = this; - return oidInExtensions($convertSliceType(oidExtensionNameConstraints, asn1.ObjectIdentifier), c.Extensions); - }; - Certificate.prototype.hasNameConstraints = function() { return this.$val.hasNameConstraints(); }; - Certificate.ptr.prototype.getSANExtension = function() { - var _i, _ref, c, e; - c = this; - _ref = c.Extensions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.Extension); - if (e.Id.Equal($convertSliceType(oidExtensionSubjectAltName, asn1.ObjectIdentifier))) { - return e.Value; - } - _i++; - } - return sliceType$1.nil; - }; - Certificate.prototype.getSANExtension = function() { return this.$val.getSANExtension(); }; - signaturePublicKeyAlgoMismatchError = function(expectedPubKeyAlgo, pubKey) { - var {$24r, _r$1, expectedPubKeyAlgo, pubKey, $s, $r, $c} = $restore(this, {expectedPubKeyAlgo, pubKey}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fmt.Errorf("x509: signature algorithm specifies an %s public key, but have public key of type %T", new sliceType$6([new $String(new PublicKeyAlgorithm(expectedPubKeyAlgo).String()), pubKey])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: signaturePublicKeyAlgoMismatchError, $c: true, $r, $24r, _r$1, expectedPubKeyAlgo, pubKey, $s};return $f; - }; - checkSignature = function(algo, signed, signature, publicKey, allowSHA1) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _1, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, algo, allowSHA1, details, err, h, hashType, pub, pub$1, pub$2, pubKeyAlgo, publicKey, signature, signed, $s, $r, $c} = $restore(this, {algo, signed, signature, publicKey, allowSHA1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - hashType = 0; - pubKeyAlgo = 0; - _ref = signatureAlgorithmDetails; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - details = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), structType); - if (details.algo === algo) { - hashType = details.hash; - pubKeyAlgo = details.pubKeyAlgo; - } - _i++; - } - _1 = hashType; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (3)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (0)) { */ case 2: - if (!((pubKeyAlgo === 4))) { - err = $pkg.ErrUnsupportedAlgorithm; - $s = -1; return err; - } - $s = 6; continue; - /* } else if (_1 === (2)) { */ case 3: - err = new InsecureAlgorithmError(((algo >> 0))); - $s = -1; return err; - /* } else if (_1 === (3)) { */ case 4: - if (!allowSHA1) { - err = new InsecureAlgorithmError(((algo >> 0))); - $s = -1; return err; - } - if (!new crypto.Hash(hashType).Available()) { - err = $pkg.ErrUnsupportedAlgorithm; - $s = -1; return err; - } - _r$1 = new crypto.Hash(hashType).New(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - h = _r$1; - _r$2 = h.Write(signed); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = h.Sum(sliceType$1.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - signed = _r$3; - $s = 6; continue; - /* } else { */ case 5: - if (!new crypto.Hash(hashType).Available()) { - err = $pkg.ErrUnsupportedAlgorithm; - $s = -1; return err; - } - _r$4 = new crypto.Hash(hashType).New(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - h = _r$4; - _r$5 = h.Write(signed); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = h.Sum(sliceType$1.nil); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - signed = _r$6; - /* } */ case 6: - case 1: - _ref$1 = publicKey; - /* */ if ($assertType(_ref$1, ptrType$2, true)[1]) { $s = 13; continue; } - /* */ if ($assertType(_ref$1, ptrType$3, true)[1]) { $s = 14; continue; } - /* */ if ($assertType(_ref$1, ed25519.PublicKey, true)[1]) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($assertType(_ref$1, ptrType$2, true)[1]) { */ case 13: - pub = _ref$1.$val; - /* */ if (!((pubKeyAlgo === 1))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!((pubKeyAlgo === 1))) { */ case 17: - _r$7 = signaturePublicKeyAlgoMismatchError(pubKeyAlgo, pub); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - $24r = err; - $s = 20; case 20: return $24r; - /* } */ case 18: - /* */ if (new SignatureAlgorithm(algo).isRSAPSS()) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (new SignatureAlgorithm(algo).isRSAPSS()) { */ case 21: - _r$8 = rsa.VerifyPSS(pub, hashType, signed, signature, new rsa.PSSOptions.ptr(-1, 0)); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - $24r$1 = err; - $s = 25; case 25: return $24r$1; - /* } else { */ case 22: - _r$9 = rsa.VerifyPKCS1v15(pub, hashType, signed, signature); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - $24r$2 = err; - $s = 27; case 27: return $24r$2; - /* } */ case 23: - $s = 16; continue; - /* } else if ($assertType(_ref$1, ptrType$3, true)[1]) { */ case 14: - pub$1 = _ref$1.$val; - /* */ if (!((pubKeyAlgo === 3))) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!((pubKeyAlgo === 3))) { */ case 28: - _r$10 = signaturePublicKeyAlgoMismatchError(pubKeyAlgo, pub$1); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - $24r$3 = err; - $s = 31; case 31: return $24r$3; - /* } */ case 29: - _r$11 = ecdsa.VerifyASN1(pub$1, signed, signature); /* */ $s = 34; case 34: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - /* */ if (!_r$11) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!_r$11) { */ case 32: - err = errors.New("x509: ECDSA verification failure"); - $s = -1; return err; - /* } */ case 33: - $s = -1; return err; - /* } else if ($assertType(_ref$1, ed25519.PublicKey, true)[1]) { */ case 15: - pub$2 = _ref$1.$val; - /* */ if (!((pubKeyAlgo === 4))) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!((pubKeyAlgo === 4))) { */ case 35: - _r$12 = signaturePublicKeyAlgoMismatchError(pubKeyAlgo, pub$2); /* */ $s = 37; case 37: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err = _r$12; - $24r$4 = err; - $s = 38; case 38: return $24r$4; - /* } */ case 36: - _r$13 = ed25519.Verify(pub$2, signed, signature); /* */ $s = 41; case 41: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - /* */ if (!_r$13) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (!_r$13) { */ case 39: - err = errors.New("x509: Ed25519 verification failure"); - $s = -1; return err; - /* } */ case 40: - $s = -1; return err; - /* } */ case 16: - err = $pkg.ErrUnsupportedAlgorithm; - $s = -1; return err; - /* */ } return; } var $f = {$blk: checkSignature, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _1, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, algo, allowSHA1, details, err, h, hashType, pub, pub$1, pub$2, pubKeyAlgo, publicKey, signature, signed, $s};return $f; - }; - Certificate.ptr.prototype.CheckCRLSignature = function(crl) { - var {$24r, _r$1, _r$2, algo, c, crl, $s, $r, $c} = $restore(this, {crl}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = getSignatureAlgorithmFromAI($clone(crl.SignatureAlgorithm, pkix.AlgorithmIdentifier)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - algo = _r$1; - _r$2 = c.CheckSignature(algo, $convertSliceType(crl.TBSCertList.Raw, sliceType$1), $clone(crl.SignatureValue, asn1.BitString).RightAlign()); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.CheckCRLSignature, $c: true, $r, $24r, _r$1, _r$2, algo, c, crl, $s};return $f; - }; - Certificate.prototype.CheckCRLSignature = function(crl) { return this.$val.CheckCRLSignature(crl); }; - UnhandledCriticalExtension.ptr.prototype.Error = function() { - var h; - h = this; - return "x509: unhandled critical extension"; - }; - UnhandledCriticalExtension.prototype.Error = function() { return this.$val.Error(); }; - oidInExtensions = function(oid, extensions) { - var _i, _ref, e, extensions, oid; - _ref = extensions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.Extension); - if (e.Id.Equal(oid)) { - return true; - } - _i++; - } - return false; - }; - isIA5String = function(s) { - var {$24r, _i, _r$1, _ref, _rune, r, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = s; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.length)) { break; } */ if(!(_i < _ref.length)) { $s = 2; continue; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - /* */ if (r > 127) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (r > 127) { */ case 3: - _r$1 = fmt.Errorf("x509: %q cannot be encoded as an IA5String", new sliceType$6([new $String(s)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* } */ case 4: - _i += _rune[1]; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: isIA5String, $c: true, $r, $24r, _i, _r$1, _ref, _rune, r, s, $s};return $f; - }; - signingParamsForPublicKey = function(pub, requestedSigAlgo) { - var {_1, _entry, _i, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _tmp, _tmp$1, _v, details, err, found, hashFunc, pub, pub$1, pub$2, pub$3, pub$4, pubType, requestedSigAlgo, sigAlgo, $s, $r, $c} = $restore(this, {pub, requestedSigAlgo}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hashFunc = 0; - sigAlgo = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - err = $ifaceNil; - pubType = 0; - _ref = pub; - /* */ if ($assertType(_ref, ptrType$2, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$3, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, ed25519.PublicKey, true)[1]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($assertType(_ref, ptrType$2, true)[1]) { */ case 1: - pub$1 = _ref.$val; - pubType = 1; - hashFunc = 5; - sigAlgo.Algorithm = oidSignatureSHA256WithRSA; - asn1.RawValue.copy(sigAlgo.Parameters, asn1.NullRawValue); - $s = 5; continue; - /* } else if ($assertType(_ref, ptrType$3, true)[1]) { */ case 2: - pub$2 = _ref.$val; - pubType = 3; - _1 = pub$2.Curve; - _r$1 = elliptic.P224(); /* */ $s = 13; case 13: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if ($interfaceIsEqual(_1, (_r$1))) { _v = true; $s = 12; continue s; } - _r$2 = elliptic.P256(); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = $interfaceIsEqual(_1, (_r$2)); case 12: - /* */ if (_v) { $s = 7; continue; } - _r$3 = elliptic.P384(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$3))) { $s = 8; continue; } - _r$4 = elliptic.P521(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$4))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 7: - hashFunc = 5; - sigAlgo.Algorithm = oidSignatureECDSAWithSHA256; - $s = 11; continue; - /* } else if ($interfaceIsEqual(_1, (_r$3))) { */ case 8: - hashFunc = 6; - sigAlgo.Algorithm = oidSignatureECDSAWithSHA384; - $s = 11; continue; - /* } else if ($interfaceIsEqual(_1, (_r$4))) { */ case 9: - hashFunc = 7; - sigAlgo.Algorithm = oidSignatureECDSAWithSHA512; - $s = 11; continue; - /* } else { */ case 10: - err = errors.New("x509: unknown elliptic curve"); - /* } */ case 11: - case 6: - $s = 5; continue; - /* } else if ($assertType(_ref, ed25519.PublicKey, true)[1]) { */ case 3: - pub$3 = _ref.$val; - pubType = 4; - sigAlgo.Algorithm = oidSignatureEd25519; - $s = 5; continue; - /* } else { */ case 4: - pub$4 = _ref; - err = errors.New("x509: only RSA, ECDSA and Ed25519 keys supported"); - /* } */ case 5: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [hashFunc, sigAlgo, err]; - } - if (requestedSigAlgo === 0) { - $s = -1; return [hashFunc, sigAlgo, err]; - } - found = false; - _ref$1 = signatureAlgorithmDetails; - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - details = $clone(((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]), structType); - if (details.algo === requestedSigAlgo) { - if (!((details.pubKeyAlgo === pubType))) { - err = errors.New("x509: requested SignatureAlgorithm does not match private key type"); - $s = -1; return [hashFunc, sigAlgo, err]; - } - _tmp = details.oid; - _tmp$1 = details.hash; - sigAlgo.Algorithm = _tmp; - hashFunc = _tmp$1; - if ((hashFunc === 0) && !((pubType === 4))) { - err = errors.New("x509: cannot sign with hash function requested"); - $s = -1; return [hashFunc, sigAlgo, err]; - } - if (new SignatureAlgorithm(requestedSigAlgo).isRSAPSS()) { - asn1.RawValue.copy(sigAlgo.Parameters, (_entry = hashToPSSParameters[crypto.Hash.keyFor(hashFunc)], _entry !== undefined ? _entry.v : new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil))); - } - found = true; - break; - } - _i++; - } - if (!found) { - err = errors.New("x509: unknown SignatureAlgorithm"); - } - $s = -1; return [hashFunc, sigAlgo, err]; - /* */ } return; } var $f = {$blk: signingParamsForPublicKey, $c: true, $r, _1, _entry, _i, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _tmp, _tmp$1, _v, details, err, found, hashFunc, pub, pub$1, pub$2, pub$3, pub$4, pubType, requestedSigAlgo, sigAlgo, $s};return $f; - }; - Certificate.ptr.prototype.CreateCRL = function(rand, priv, revokedCerts, now, expiry) { - var {$24r, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, aki, c, crlBytes, err, expiry, h, hashFunc, i, key, now, ok, priv, rand, rc, revokedCerts, revokedCertsUTC, signature, signatureAlgorithm, signed, tbsCertList, tbsCertListContents, x, x$1, $s, $r, $c} = $restore(this, {rand, priv, revokedCerts, now, expiry}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - crlBytes = sliceType$1.nil; - err = $ifaceNil; - c = this; - _tuple = $assertType(priv, crypto.Signer, true); - key = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - _tmp = sliceType$1.nil; - _tmp$1 = errors.New("x509: certificate private key does not implement crypto.Signer"); - crlBytes = _tmp; - err = _tmp$1; - $s = -1; return [crlBytes, err]; - } - _r$1 = key.Public(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = signingParamsForPublicKey(_r$1, 0); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - hashFunc = _tuple$1[0]; - signatureAlgorithm = $clone(_tuple$1[1], pkix.AlgorithmIdentifier); - err = _tuple$1[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = sliceType$1.nil; - _tmp$3 = err; - crlBytes = _tmp$2; - err = _tmp$3; - $s = -1; return [crlBytes, err]; - } - revokedCertsUTC = $makeSlice(sliceType$13, revokedCerts.$length); - _ref = revokedCerts; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - rc = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.RevokedCertificate); - time.Time.copy(rc.RevocationTime, $clone(rc.RevocationTime, time.Time).UTC()); - pkix.RevokedCertificate.copy(((i < 0 || i >= revokedCertsUTC.$length) ? ($throwRuntimeError("index out of range"), undefined) : revokedCertsUTC.$array[revokedCertsUTC.$offset + i]), rc); - _i++; - } - tbsCertList = new pkix.TBSCertificateList.ptr(asn1.RawContent.nil, 1, $clone(signatureAlgorithm, pkix.AlgorithmIdentifier), $clone(c.Subject, pkix.Name).ToRDNSequence(), $clone($clone(now, time.Time).UTC(), time.Time), $clone($clone(expiry, time.Time).UTC(), time.Time), revokedCertsUTC, sliceType$8.nil); - /* */ if (c.SubjectKeyId.$length > 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (c.SubjectKeyId.$length > 0) { */ case 3: - aki = new pkix.Extension.ptr(asn1.ObjectIdentifier.nil, false, sliceType$1.nil); - aki.Id = $convertSliceType(oidExtensionAuthorityKeyId, asn1.ObjectIdentifier); - _r$3 = asn1.Marshal((x = new authKeyId.ptr(c.SubjectKeyId), new x.constructor.elem(x))); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - aki.Value = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [crlBytes, err]; - } - tbsCertList.Extensions = $append(tbsCertList.Extensions, aki); - /* } */ case 4: - _r$4 = asn1.Marshal(new tbsCertList.constructor.elem(tbsCertList)); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - tbsCertListContents = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [crlBytes, err]; - } - signed = tbsCertListContents; - /* */ if (!((hashFunc === 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((hashFunc === 0))) { */ case 7: - _r$5 = new crypto.Hash(hashFunc).New(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - h = _r$5; - _r$6 = h.Write(signed); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = h.Sum(sliceType$1.nil); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - signed = _r$7; - /* } */ case 8: - signature = sliceType$1.nil; - _r$8 = key.Sign(rand, signed, new crypto.Hash(hashFunc)); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$4 = _r$8; - signature = _tuple$4[0]; - err = _tuple$4[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [crlBytes, err]; - } - _r$9 = asn1.Marshal((x$1 = new pkix.CertificateList.ptr($clone(tbsCertList, pkix.TBSCertificateList), $clone(signatureAlgorithm, pkix.AlgorithmIdentifier), new asn1.BitString.ptr(signature, $imul(signature.$length, 8))), new x$1.constructor.elem(x$1))); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$5 = _r$9; - crlBytes = _tuple$5[0]; - err = _tuple$5[1]; - $24r = [crlBytes, err]; - $s = 14; case 14: return $24r; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.CreateCRL, $c: true, $r, $24r, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, aki, c, crlBytes, err, expiry, h, hashFunc, i, key, now, ok, priv, rand, rc, revokedCerts, revokedCertsUTC, signature, signatureAlgorithm, signed, tbsCertList, tbsCertListContents, x, x$1, $s};return $f; - }; - Certificate.prototype.CreateCRL = function(rand, priv, revokedCerts, now, expiry) { return this.$val.CreateCRL(rand, priv, revokedCerts, now, expiry); }; - CertificateInvalidError.ptr.prototype.Error = function() { - var _1, e; - e = this; - _1 = e.Reason; - if (_1 === (0)) { - return "x509: certificate is not authorized to sign other certificates"; - } else if (_1 === (1)) { - return "x509: certificate has expired or is not yet valid: " + e.Detail; - } else if (_1 === (2)) { - return "x509: a root or intermediate certificate is not authorized to sign for this name: " + e.Detail; - } else if (_1 === (9)) { - return "x509: a root or intermediate certificate is not authorized for an extended key usage: " + e.Detail; - } else if (_1 === (3)) { - return "x509: too many intermediates for path length constraint"; - } else if (_1 === (4)) { - return "x509: certificate specifies an incompatible key usage"; - } else if (_1 === (5)) { - return "x509: issuer name does not match subject from issuing certificate"; - } else if (_1 === (6)) { - return "x509: issuer has name constraints but leaf doesn't have a SAN extension"; - } else if (_1 === (7)) { - return "x509: issuer has name constraints but leaf contains unknown or unconstrained name: " + e.Detail; - } - return "x509: unknown error"; - }; - CertificateInvalidError.prototype.Error = function() { return this.$val.Error(); }; - HostnameError.ptr.prototype.Error = function() { - var _i, _ref, c, h, ip, san, valid; - h = this; - c = h.Certificate; - if (!c.hasSANExtension() && matchHostnames(c.Subject.CommonName, h.Host)) { - return "x509: certificate relies on legacy Common Name field, use SANs instead"; - } - valid = ""; - ip = net.ParseIP(h.Host); - if (!(ip === net.IP.nil)) { - if (c.IPAddresses.$length === 0) { - return "x509: cannot validate certificate for " + h.Host + " because it doesn't contain any IP SANs"; - } - _ref = c.IPAddresses; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - san = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (valid.length > 0) { - valid = valid + (", "); - } - valid = valid + (san.String()); - _i++; - } - } else { - valid = strings.Join(c.DNSNames, ", "); - } - if (valid.length === 0) { - return "x509: certificate is not valid for any names, but wanted to match " + h.Host; - } - return "x509: certificate is valid for " + valid + ", not " + h.Host; - }; - HostnameError.prototype.Error = function() { return this.$val.Error(); }; - UnknownAuthorityError.ptr.prototype.Error = function() { - var {_r$1, _r$2, certName, e, s, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - s = "x509: certificate signed by unknown authority"; - /* */ if (!($interfaceIsEqual(e.hintErr, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(e.hintErr, $ifaceNil))) { */ case 1: - certName = e.hintCert.Subject.CommonName; - /* */ if (certName.length === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (certName.length === 0) { */ case 3: - /* */ if (e.hintCert.Subject.Organization.$length > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (e.hintCert.Subject.Organization.$length > 0) { */ case 5: - certName = (x = e.hintCert.Subject.Organization, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - $s = 7; continue; - /* } else { */ case 6: - _r$1 = e.hintCert.SerialNumber.String(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - certName = "serial:" + _r$1; - /* } */ case 7: - /* } */ case 4: - _r$2 = fmt.Sprintf(" (possibly because of %q while trying to verify candidate authority certificate %q)", new sliceType$6([e.hintErr, new $String(certName)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - s = s + (_r$2); - /* } */ case 2: - $s = -1; return s; - /* */ } return; } var $f = {$blk: UnknownAuthorityError.ptr.prototype.Error, $c: true, $r, _r$1, _r$2, certName, e, s, x, $s};return $f; - }; - UnknownAuthorityError.prototype.Error = function() { return this.$val.Error(); }; - SystemRootsError.ptr.prototype.Error = function() { - var {$24r, _r$1, msg, se, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - se = this; - msg = "x509: failed to load system roots and no roots provided"; - /* */ if (!($interfaceIsEqual(se.Err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(se.Err, $ifaceNil))) { */ case 1: - _r$1 = se.Err.Error(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = msg + "; " + _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return msg; - /* */ } return; } var $f = {$blk: SystemRootsError.ptr.prototype.Error, $c: true, $r, $24r, _r$1, msg, se, $s};return $f; - }; - SystemRootsError.prototype.Error = function() { return this.$val.Error(); }; - SystemRootsError.ptr.prototype.Unwrap = function() { - var se; - se = this; - return se.Err; - }; - SystemRootsError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - parseRFC2821Mailbox = function(in$1) { - var _q, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, c$1, in$1, localPartBytes, mailbox, ok, ok$1, twoDots, x; - mailbox = new rfc2821Mailbox.ptr("", ""); - ok = false; - if (in$1.length === 0) { - _tmp = $clone(mailbox, rfc2821Mailbox); - _tmp$1 = false; - rfc2821Mailbox.copy(mailbox, _tmp); - ok = _tmp$1; - return [mailbox, ok]; - } - localPartBytes = $makeSlice(sliceType$1, 0, (_q = in$1.length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - if (in$1.charCodeAt(0) === 34) { - in$1 = $substring(in$1, 1); - QuotedString: - while (true) { - if (in$1.length === 0) { - _tmp$2 = $clone(mailbox, rfc2821Mailbox); - _tmp$3 = false; - rfc2821Mailbox.copy(mailbox, _tmp$2); - ok = _tmp$3; - return [mailbox, ok]; - } - c = in$1.charCodeAt(0); - in$1 = $substring(in$1, 1); - if ((c === 34)) { - break QuotedString; - } else if ((c === 92)) { - if (in$1.length === 0) { - _tmp$4 = $clone(mailbox, rfc2821Mailbox); - _tmp$5 = false; - rfc2821Mailbox.copy(mailbox, _tmp$4); - ok = _tmp$5; - return [mailbox, ok]; - } - if ((in$1.charCodeAt(0) === 11) || (in$1.charCodeAt(0) === 12) || (1 <= in$1.charCodeAt(0) && in$1.charCodeAt(0) <= 9) || (14 <= in$1.charCodeAt(0) && in$1.charCodeAt(0) <= 127)) { - localPartBytes = $append(localPartBytes, in$1.charCodeAt(0)); - in$1 = $substring(in$1, 1); - } else { - _tmp$6 = $clone(mailbox, rfc2821Mailbox); - _tmp$7 = false; - rfc2821Mailbox.copy(mailbox, _tmp$6); - ok = _tmp$7; - return [mailbox, ok]; - } - } else if ((c === 11) || (c === 12) || (c === 32) || (c === 33) || (c === 127) || (1 <= c && c <= 8) || (14 <= c && c <= 31) || (35 <= c && c <= 91) || (93 <= c && c <= 126)) { - localPartBytes = $append(localPartBytes, c); - } else { - _tmp$8 = $clone(mailbox, rfc2821Mailbox); - _tmp$9 = false; - rfc2821Mailbox.copy(mailbox, _tmp$8); - ok = _tmp$9; - return [mailbox, ok]; - } - } - } else { - NextChar: - while (true) { - if (!(in$1.length > 0)) { break; } - c$1 = in$1.charCodeAt(0); - if ((c$1 === 92)) { - in$1 = $substring(in$1, 1); - if (in$1.length === 0) { - _tmp$10 = $clone(mailbox, rfc2821Mailbox); - _tmp$11 = false; - rfc2821Mailbox.copy(mailbox, _tmp$10); - ok = _tmp$11; - return [mailbox, ok]; - } - localPartBytes = $append(localPartBytes, in$1.charCodeAt(0)); - in$1 = $substring(in$1, 1); - } else if ((48 <= c$1 && c$1 <= 57) || (97 <= c$1 && c$1 <= 122) || (65 <= c$1 && c$1 <= 90) || (c$1 === 33) || (c$1 === 35) || (c$1 === 36) || (c$1 === 37) || (c$1 === 38) || (c$1 === 39) || (c$1 === 42) || (c$1 === 43) || (c$1 === 45) || (c$1 === 47) || (c$1 === 61) || (c$1 === 63) || (c$1 === 94) || (c$1 === 95) || (c$1 === 96) || (c$1 === 123) || (c$1 === 124) || (c$1 === 125) || (c$1 === 126) || (c$1 === 46)) { - localPartBytes = $append(localPartBytes, in$1.charCodeAt(0)); - in$1 = $substring(in$1, 1); - } else { - break NextChar; - } - } - if (localPartBytes.$length === 0) { - _tmp$12 = $clone(mailbox, rfc2821Mailbox); - _tmp$13 = false; - rfc2821Mailbox.copy(mailbox, _tmp$12); - ok = _tmp$13; - return [mailbox, ok]; - } - twoDots = new sliceType$1([46, 46]); - if (((0 >= localPartBytes.$length ? ($throwRuntimeError("index out of range"), undefined) : localPartBytes.$array[localPartBytes.$offset + 0]) === 46) || ((x = localPartBytes.$length - 1 >> 0, ((x < 0 || x >= localPartBytes.$length) ? ($throwRuntimeError("index out of range"), undefined) : localPartBytes.$array[localPartBytes.$offset + x])) === 46) || bytes.Contains(localPartBytes, twoDots)) { - _tmp$14 = $clone(mailbox, rfc2821Mailbox); - _tmp$15 = false; - rfc2821Mailbox.copy(mailbox, _tmp$14); - ok = _tmp$15; - return [mailbox, ok]; - } - } - if ((in$1.length === 0) || !((in$1.charCodeAt(0) === 64))) { - _tmp$16 = $clone(mailbox, rfc2821Mailbox); - _tmp$17 = false; - rfc2821Mailbox.copy(mailbox, _tmp$16); - ok = _tmp$17; - return [mailbox, ok]; - } - in$1 = $substring(in$1, 1); - _tuple = domainToReverseLabels(in$1); - ok$1 = _tuple[1]; - if (!ok$1) { - _tmp$18 = $clone(mailbox, rfc2821Mailbox); - _tmp$19 = false; - rfc2821Mailbox.copy(mailbox, _tmp$18); - ok = _tmp$19; - return [mailbox, ok]; - } - mailbox.local = ($bytesToString(localPartBytes)); - mailbox.domain = in$1; - _tmp$20 = $clone(mailbox, rfc2821Mailbox); - _tmp$21 = true; - rfc2821Mailbox.copy(mailbox, _tmp$20); - ok = _tmp$21; - return [mailbox, ok]; - }; - domainToReverseLabels = function(domain) { - var _i, _i$1, _ref, _ref$1, _rune, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, c, domain, i, label, ok, reverseLabels; - reverseLabels = sliceType$4.nil; - ok = false; - while (true) { - if (!(domain.length > 0)) { break; } - i = strings.LastIndexByte(domain, 46); - if (i === -1) { - reverseLabels = $append(reverseLabels, domain); - domain = ""; - } else { - reverseLabels = $append(reverseLabels, $substring(domain, (i + 1 >> 0))); - domain = $substring(domain, 0, i); - } - } - if (reverseLabels.$length > 0 && ((0 >= reverseLabels.$length ? ($throwRuntimeError("index out of range"), undefined) : reverseLabels.$array[reverseLabels.$offset + 0]).length === 0)) { - _tmp = sliceType$4.nil; - _tmp$1 = false; - reverseLabels = _tmp; - ok = _tmp$1; - return [reverseLabels, ok]; - } - _ref = reverseLabels; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - label = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (label.length === 0) { - _tmp$2 = sliceType$4.nil; - _tmp$3 = false; - reverseLabels = _tmp$2; - ok = _tmp$3; - return [reverseLabels, ok]; - } - _ref$1 = label; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.length)) { break; } - _rune = $decodeRune(_ref$1, _i$1); - c = _rune[0]; - if (c < 33 || c > 126) { - _tmp$4 = sliceType$4.nil; - _tmp$5 = false; - reverseLabels = _tmp$4; - ok = _tmp$5; - return [reverseLabels, ok]; - } - _i$1 += _rune[1]; - } - _i++; - } - _tmp$6 = reverseLabels; - _tmp$7 = true; - reverseLabels = _tmp$6; - ok = _tmp$7; - return [reverseLabels, ok]; - }; - matchEmailConstraint = function(mailbox, constraint) { - var {$24r, $24r$1, _r$1, _r$2, _tuple, constraint, constraintMailbox, mailbox, ok, $s, $r, $c} = $restore(this, {mailbox, constraint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (strings.Contains(constraint, "@")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (strings.Contains(constraint, "@")) { */ case 1: - _tuple = parseRFC2821Mailbox(constraint); - constraintMailbox = $clone(_tuple[0], rfc2821Mailbox); - ok = _tuple[1]; - /* */ if (!ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!ok) { */ case 3: - _r$1 = fmt.Errorf("x509: internal error: cannot parse constraint %q", new sliceType$6([new $String(constraint)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [false, _r$1]; - $s = 6; case 6: return $24r; - /* } */ case 4: - $s = -1; return [mailbox.local === constraintMailbox.local && strings.EqualFold(mailbox.domain, constraintMailbox.domain), $ifaceNil]; - /* } */ case 2: - _r$2 = matchDomainConstraint(mailbox.domain, constraint); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 8; case 8: return $24r$1; - /* */ } return; } var $f = {$blk: matchEmailConstraint, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _tuple, constraint, constraintMailbox, mailbox, ok, $s};return $f; - }; - matchURIConstraint = function(uri, constraint) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _r$4, _tuple, constraint, err, host, uri, $s, $r, $c} = $restore(this, {uri, constraint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - host = uri.Host; - /* */ if (host.length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (host.length === 0) { */ case 1: - _r$1 = fmt.Errorf("URI with empty host (%q) cannot be matched against constraints", new sliceType$6([new $String(uri.String())])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [false, _r$1]; - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if (strings.Contains(host, ":") && !strings.HasSuffix(host, "]")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (strings.Contains(host, ":") && !strings.HasSuffix(host, "]")) { */ case 5: - err = $ifaceNil; - _r$2 = net.SplitHostPort(uri.Host); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - host = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [false, err]; - } - /* } */ case 6: - /* */ if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") || !(net.ParseIP(host) === net.IP.nil)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") || !(net.ParseIP(host) === net.IP.nil)) { */ case 8: - _r$3 = fmt.Errorf("URI with IP (%q) cannot be matched against constraints", new sliceType$6([new $String(uri.String())])); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = [false, _r$3]; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - _r$4 = matchDomainConstraint(host, constraint); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 13; case 13: return $24r$2; - /* */ } return; } var $f = {$blk: matchURIConstraint, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _r$4, _tuple, constraint, err, host, uri, $s};return $f; - }; - matchIPConstraint = function(ip, constraint) { - var _i, _ref, constraint, i, ip, mask, x, x$1; - if (!((ip.$length === constraint.IP.$length))) { - return [false, $ifaceNil]; - } - _ref = ip; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - mask = (x = constraint.Mask, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - if (!((((((i < 0 || i >= ip.$length) ? ($throwRuntimeError("index out of range"), undefined) : ip.$array[ip.$offset + i]) & mask) >>> 0) === (((x$1 = constraint.IP, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i])) & mask) >>> 0)))) { - return [false, $ifaceNil]; - } - _i++; - } - return [true, $ifaceNil]; - }; - matchDomainConstraint = function(domain, constraint) { - var {$24r, $24r$1, _i, _r$1, _r$2, _ref, _tuple, _tuple$1, constraint, constraintLabel, constraintLabels, domain, domainLabels, i, mustHaveSubdomains, ok, $s, $r, $c} = $restore(this, {domain, constraint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (constraint.length === 0) { - $s = -1; return [true, $ifaceNil]; - } - _tuple = domainToReverseLabels(domain); - domainLabels = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r$1 = fmt.Errorf("x509: internal error: cannot parse domain %q", new sliceType$6([new $String(domain)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [false, _r$1]; - $s = 4; case 4: return $24r; - /* } */ case 2: - mustHaveSubdomains = false; - if (constraint.charCodeAt(0) === 46) { - mustHaveSubdomains = true; - constraint = $substring(constraint, 1); - } - _tuple$1 = domainToReverseLabels(constraint); - constraintLabels = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ok) { */ case 5: - _r$2 = fmt.Errorf("x509: internal error: cannot parse domain %q", new sliceType$6([new $String(constraint)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [false, _r$2]; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - if (domainLabels.$length < constraintLabels.$length || (mustHaveSubdomains && (domainLabels.$length === constraintLabels.$length))) { - $s = -1; return [false, $ifaceNil]; - } - _ref = constraintLabels; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - constraintLabel = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!strings.EqualFold(constraintLabel, ((i < 0 || i >= domainLabels.$length) ? ($throwRuntimeError("index out of range"), undefined) : domainLabels.$array[domainLabels.$offset + i]))) { - $s = -1; return [false, $ifaceNil]; - } - _i++; - } - $s = -1; return [true, $ifaceNil]; - /* */ } return; } var $f = {$blk: matchDomainConstraint, $c: true, $r, $24r, $24r$1, _i, _r$1, _r$2, _ref, _tuple, _tuple$1, constraint, constraintLabel, constraintLabels, domain, domainLabels, i, mustHaveSubdomains, ok, $s};return $f; - }; - Certificate.ptr.prototype.checkNameConstraints = function(count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, constraint, constraint$1, count, err, err$1, excluded, excludedValue, i, i$1, match, match$1, maxConstraintComparisons, name, nameType, ok, parsedName, permitted, permittedValue, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = reflect.ValueOf(excluded); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - excludedValue = _r$1; - count.$set(count.$get() + ($clone(excludedValue, reflect.Value).Len()) >> 0); - if (count.$get() > maxConstraintComparisons) { - $s = -1; return (x = new CertificateInvalidError.ptr(c, 8, ""), new x.constructor.elem(x)); - } - i = 0; - /* while (true) { */ case 2: - /* if (!(i < $clone(excludedValue, reflect.Value).Len())) { break; } */ if(!(i < $clone(excludedValue, reflect.Value).Len())) { $s = 3; continue; } - _r$2 = $clone(excludedValue, reflect.Value).Index(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, reflect.Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - constraint = _r$3; - _r$4 = match(parsedName, constraint); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - match$1 = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - _r$5 = err.Error(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = (x$1 = new CertificateInvalidError.ptr(c, 2, _r$5), new x$1.constructor.elem(x$1)); - $s = 10; case 10: return $24r; - /* } */ case 8: - /* */ if (match$1) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (match$1) { */ case 11: - _r$6 = fmt.Sprintf("%s %q is excluded by constraint %q", new sliceType$6([new $String(nameType), new $String(name), constraint])); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = (x$2 = new CertificateInvalidError.ptr(c, 2, _r$6), new x$2.constructor.elem(x$2)); - $s = 14; case 14: return $24r$1; - /* } */ case 12: - i = i + (1) >> 0; - $s = 2; continue; - case 3: - _r$7 = reflect.ValueOf(permitted); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - permittedValue = _r$7; - count.$set(count.$get() + ($clone(permittedValue, reflect.Value).Len()) >> 0); - if (count.$get() > maxConstraintComparisons) { - $s = -1; return (x$3 = new CertificateInvalidError.ptr(c, 8, ""), new x$3.constructor.elem(x$3)); - } - ok = true; - i$1 = 0; - /* while (true) { */ case 16: - /* if (!(i$1 < $clone(permittedValue, reflect.Value).Len())) { break; } */ if(!(i$1 < $clone(permittedValue, reflect.Value).Len())) { $s = 17; continue; } - _r$8 = $clone(permittedValue, reflect.Value).Index(i$1); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, reflect.Value).Interface(); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - constraint$1 = _r$9; - err$1 = $ifaceNil; - _r$10 = match(parsedName, constraint$1); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$1 = _r$10; - ok = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 21: - _r$11 = err$1.Error(); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$2 = (x$4 = new CertificateInvalidError.ptr(c, 2, _r$11), new x$4.constructor.elem(x$4)); - $s = 24; case 24: return $24r$2; - /* } */ case 22: - if (ok) { - /* break; */ $s = 17; continue; - } - i$1 = i$1 + (1) >> 0; - $s = 16; continue; - case 17: - /* */ if (!ok) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!ok) { */ case 25: - _r$12 = fmt.Sprintf("%s %q is not permitted by any constraint", new sliceType$6([new $String(nameType), new $String(name)])); /* */ $s = 27; case 27: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$3 = (x$5 = new CertificateInvalidError.ptr(c, 2, _r$12), new x$5.constructor.elem(x$5)); - $s = 28; case 28: return $24r$3; - /* } */ case 26: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.checkNameConstraints, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, constraint, constraint$1, count, err, err$1, excluded, excludedValue, i, i$1, match, match$1, maxConstraintComparisons, name, nameType, ok, parsedName, permitted, permittedValue, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - Certificate.prototype.checkNameConstraints = function(count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded) { return this.$val.checkNameConstraints(count, maxConstraintComparisons, nameType, name, parsedName, match, permitted, excluded); }; - Certificate.ptr.prototype.isValid = function(certType, currentChain, opts) { - var {$24r, $24r$1, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, certType, child, comparisonCount, currentChain, err, leaf, maxConstraintComparisons, now, numIntermediates, opts, x, x$1, x$2, x$3, x$4, x$5, x$6, $s, $r, $c} = $restore(this, {certType, currentChain, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = [c]; - comparisonCount = [comparisonCount]; - maxConstraintComparisons = [maxConstraintComparisons]; - c[0] = this; - if (c[0].UnhandledCriticalExtensions.$length > 0) { - $s = -1; return (x = new UnhandledCriticalExtension.ptr(), new x.constructor.elem(x)); - } - if (currentChain.$length > 0) { - child = (x$1 = currentChain.$length - 1 >> 0, ((x$1 < 0 || x$1 >= currentChain.$length) ? ($throwRuntimeError("index out of range"), undefined) : currentChain.$array[currentChain.$offset + x$1])); - if (!bytes.Equal(child.RawIssuer, c[0].RawSubject)) { - $s = -1; return (x$2 = new CertificateInvalidError.ptr(c[0], 5, ""), new x$2.constructor.elem(x$2)); - } - } - now = $clone(opts.CurrentTime, time.Time); - /* */ if ($clone(now, time.Time).IsZero()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(now, time.Time).IsZero()) { */ case 1: - _r$1 = time.Now(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - time.Time.copy(now, _r$1); - /* } */ case 2: - /* */ if ($clone(now, time.Time).Before($clone(c[0].NotBefore, time.Time))) { $s = 4; continue; } - /* */ if ($clone(now, time.Time).After($clone(c[0].NotAfter, time.Time))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($clone(now, time.Time).Before($clone(c[0].NotBefore, time.Time))) { */ case 4: - _r$2 = $clone(now, time.Time).Format("2006-01-02T15:04:05Z07:00"); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg = new $String(_r$2); - _r$3 = $clone(c[0].NotBefore, time.Time).Format("2006-01-02T15:04:05Z07:00"); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = new $String(_r$3); - _r$4 = fmt.Sprintf("current time %s is before %s", new sliceType$6([_arg, _arg$1])); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = (x$3 = new CertificateInvalidError.ptr(c[0], 1, _r$4), new x$3.constructor.elem(x$3)); - $s = 10; case 10: return $24r; - /* } else if ($clone(now, time.Time).After($clone(c[0].NotAfter, time.Time))) { */ case 5: - _r$5 = $clone(now, time.Time).Format("2006-01-02T15:04:05Z07:00"); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$2 = new $String(_r$5); - _r$6 = $clone(c[0].NotAfter, time.Time).Format("2006-01-02T15:04:05Z07:00"); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$3 = new $String(_r$6); - _r$7 = fmt.Sprintf("current time %s is after %s", new sliceType$6([_arg$2, _arg$3])); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = (x$4 = new CertificateInvalidError.ptr(c[0], 1, _r$7), new x$4.constructor.elem(x$4)); - $s = 14; case 14: return $24r$1; - /* } */ case 6: - maxConstraintComparisons[0] = opts.MaxConstraintComparisions; - if (maxConstraintComparisons[0] === 0) { - maxConstraintComparisons[0] = 250000; - } - comparisonCount[0] = 0; - leaf = ptrType$4.nil; - if ((certType === 1) || (certType === 2)) { - if (currentChain.$length === 0) { - $s = -1; return errors.New("x509: internal error: empty chain when appending CA cert"); - } - leaf = (0 >= currentChain.$length ? ($throwRuntimeError("index out of range"), undefined) : currentChain.$array[currentChain.$offset + 0]); - } - /* */ if (((certType === 1) || (certType === 2)) && c[0].hasNameConstraints() && leaf.hasSANExtension()) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (((certType === 1) || (certType === 2)) && c[0].hasNameConstraints() && leaf.hasSANExtension()) { */ case 15: - _r$8 = forEachSAN($convertSliceType(leaf.getSANExtension(), cryptobyte.String), (function(c, comparisonCount, maxConstraintComparisons) { return function $b(tag, data) { - var {$24r$2, $24r$3, $24r$4, $24r$5, _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, data, err, err$1, err$2, err$3, err$4, ip, l, mailbox, name, name$1, name$2, ok, ok$1, tag, uri, $s, $r, $c} = $restore(this, {tag, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = tag; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (6)) { $s = 4; continue; } - /* */ if (_1 === (7)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (1)) { */ case 2: - name = ($bytesToString(data)); - _tuple = parseRFC2821Mailbox(name); - mailbox = $clone(_tuple[0], rfc2821Mailbox); - ok = _tuple[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - _r$8 = fmt.Errorf("x509: cannot parse rfc822Name %q", new sliceType$6([new mailbox.constructor.elem(mailbox)])); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$2 = _r$8; - $s = 10; case 10: return $24r$2; - /* } */ case 8: - _r$9 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "email address", name, new mailbox.constructor.elem(mailbox), (function(c, comparisonCount, maxConstraintComparisons) { return function $b(parsedName, constraint) { - var {$24r$3, _r$9, constraint, parsedName, $s, $r, $c} = $restore(this, {parsedName, constraint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$9 = matchEmailConstraint($clone($assertType(parsedName, rfc2821Mailbox), rfc2821Mailbox), $assertType(constraint, $String)); /* */ $s = 1; case 1: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$3 = _r$9; - $s = 2; case 2: return $24r$3; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$3, _r$9, constraint, parsedName, $s};return $f; - }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedEmailAddresses, c[0].ExcludedEmailAddresses); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 6; continue; - /* } else if (_1 === (2)) { */ case 3: - name$1 = ($bytesToString(data)); - _tuple$1 = domainToReverseLabels(name$1); - ok$1 = _tuple$1[1]; - /* */ if (!ok$1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!ok$1) { */ case 12: - _r$10 = fmt.Errorf("x509: cannot parse dnsName %q", new sliceType$6([new $String(name$1)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$3 = _r$10; - $s = 15; case 15: return $24r$3; - /* } */ case 13: - _r$11 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "DNS name", name$1, new $String(name$1), (function(c, comparisonCount, maxConstraintComparisons) { return function $b(parsedName, constraint) { - var {$24r$4, _r$11, constraint, parsedName, $s, $r, $c} = $restore(this, {parsedName, constraint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$11 = matchDomainConstraint($assertType(parsedName, $String), $assertType(constraint, $String)); /* */ $s = 1; case 1: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$4 = _r$11; - $s = 2; case 2: return $24r$4; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$4, _r$11, constraint, parsedName, $s};return $f; - }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedDNSDomains, c[0].ExcludedDNSDomains); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$1 = _r$11; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 6; continue; - /* } else if (_1 === (6)) { */ case 4: - name$2 = ($bytesToString(data)); - _r$12 = url.Parse(name$2); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$2 = _r$12; - uri = _tuple$2[0]; - err$2 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 18: - _r$13 = fmt.Errorf("x509: internal error: URI SAN %q failed to parse", new sliceType$6([new $String(name$2)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$4 = _r$13; - $s = 21; case 21: return $24r$4; - /* } */ case 19: - _r$14 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "URI", name$2, uri, (function(c, comparisonCount, maxConstraintComparisons) { return function $b(parsedName, constraint) { - var {$24r$5, _r$14, constraint, parsedName, $s, $r, $c} = $restore(this, {parsedName, constraint}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$14 = matchURIConstraint($assertType(parsedName, ptrType$13), $assertType(constraint, $String)); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$5 = _r$14; - $s = 2; case 2: return $24r$5; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$5, _r$14, constraint, parsedName, $s};return $f; - }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedURIDomains, c[0].ExcludedURIDomains); /* */ $s = 22; case 22: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err$3 = _r$14; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - $s = 6; continue; - /* } else if (_1 === (7)) { */ case 5: - ip = ($convertSliceType(data, net.IP)); - l = ip.$length; - /* */ if (!((l === 4)) && !((l === 16))) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!((l === 4)) && !((l === 16))) { */ case 23: - _r$15 = fmt.Errorf("x509: internal error: IP SAN %x failed to parse", new sliceType$6([data])); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$5 = _r$15; - $s = 26; case 26: return $24r$5; - /* } */ case 24: - _r$16 = c[0].checkNameConstraints((comparisonCount.$ptr || (comparisonCount.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, comparisonCount))), maxConstraintComparisons[0], "IP address", ip.String(), ip, (function(c, comparisonCount, maxConstraintComparisons) { return function(parsedName, constraint) { - var constraint, parsedName; - return matchIPConstraint($assertType(parsedName, net.IP), $assertType(constraint, ptrType$17)); - }; })(c, comparisonCount, maxConstraintComparisons), c[0].PermittedIPRanges, c[0].ExcludedIPRanges); /* */ $s = 27; case 27: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - err$4 = _r$16; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - /* } */ case 6: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r$2, $24r$3, $24r$4, $24r$5, _1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, data, err, err$1, err$2, err$3, err$4, ip, l, mailbox, name, name$1, name$2, ok, ok$1, tag, uri, $s};return $f; - }; })(c, comparisonCount, maxConstraintComparisons)); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 16: - if ((certType === 1) && (!c[0].BasicConstraintsValid || !c[0].IsCA)) { - $s = -1; return (x$5 = new CertificateInvalidError.ptr(c[0], 0, ""), new x$5.constructor.elem(x$5)); - } - if (c[0].BasicConstraintsValid && c[0].MaxPathLen >= 0) { - numIntermediates = currentChain.$length - 1 >> 0; - if (numIntermediates > c[0].MaxPathLen) { - $s = -1; return (x$6 = new CertificateInvalidError.ptr(c[0], 3, ""), new x$6.constructor.elem(x$6)); - } - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.isValid, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, certType, child, comparisonCount, currentChain, err, leaf, maxConstraintComparisons, now, numIntermediates, opts, x, x$1, x$2, x$3, x$4, x$5, x$6, $s};return $f; - }; - Certificate.prototype.isValid = function(certType, currentChain, opts) { return this.$val.isValid(certType, currentChain, opts); }; - Certificate.ptr.prototype.Verify = function(opts) { - var {$24r, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, c, c$1, candidate, candidateChains, chains, err, err$1, err$2, i, keyUsages, opts, platformChains, usage, x, x$1, $s, $r, $c} = $restore(this, {opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - opts = [opts]; - chains = sliceType$21.nil; - err = $ifaceNil; - c = this; - if (c.Raw.$length === 0) { - _tmp = sliceType$21.nil; - _tmp$1 = errNotParsed; - chains = _tmp; - err = _tmp$1; - $s = -1; return [chains, err]; - } - i = 0; - /* while (true) { */ case 1: - /* if (!(i < opts[0].Intermediates.len())) { break; } */ if(!(i < opts[0].Intermediates.len())) { $s = 2; continue; } - _r$1 = opts[0].Intermediates.cert(i); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - c$1 = _tuple[0]; - err$1 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 4: - _tmp$2 = sliceType$21.nil; - _r$2 = fmt.Errorf("crypto/x509: error fetching intermediate: %w", new sliceType$6([err$1])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp$3 = _r$2; - chains = _tmp$2; - err = _tmp$3; - $24r = [chains, err]; - $s = 7; case 7: return $24r; - /* } */ case 5: - if (c$1.Raw.$length === 0) { - _tmp$4 = sliceType$21.nil; - _tmp$5 = errNotParsed; - chains = _tmp$4; - err = _tmp$5; - $s = -1; return [chains, err]; - } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - if (false) { - if (opts[0].Roots === ptrType.nil) { - _tuple$1 = c.systemVerify(opts[0]); - chains = _tuple$1[0]; - err = _tuple$1[1]; - $s = -1; return [chains, err]; - } - if (!(opts[0].Roots === ptrType.nil) && opts[0].Roots.systemPool) { - _tuple$2 = c.systemVerify(opts[0]); - platformChains = _tuple$2[0]; - err$2 = _tuple$2[1]; - if ($interfaceIsEqual(err$2, $ifaceNil) || (opts[0].Roots.len() === 0)) { - _tmp$6 = platformChains; - _tmp$7 = err$2; - chains = _tmp$6; - err = _tmp$7; - $s = -1; return [chains, err]; - } - } - } - /* */ if (opts[0].Roots === ptrType.nil) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (opts[0].Roots === ptrType.nil) { */ case 8: - _r$3 = systemRootsPool(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - opts[0].Roots = _r$3; - if (opts[0].Roots === ptrType.nil) { - _tmp$8 = sliceType$21.nil; - _tmp$9 = (x = new SystemRootsError.ptr(systemRootsErr), new x.constructor.elem(x)); - chains = _tmp$8; - err = _tmp$9; - $s = -1; return [chains, err]; - } - /* } */ case 9: - _r$4 = c.isValid(0, sliceType$20.nil, opts[0]); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [chains, err]; - } - if (opts[0].DNSName.length > 0) { - err = c.VerifyHostname(opts[0].DNSName); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [chains, err]; - } - } - candidateChains = sliceType$21.nil; - /* */ if (opts[0].Roots.contains(c)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (opts[0].Roots.contains(c)) { */ case 12: - candidateChains = $append(candidateChains, new sliceType$20([c])); - $s = 14; continue; - /* } else { */ case 13: - _r$5 = c.buildChains(false, new sliceType$20([c]), ptrType$16.nil, opts[0]); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - candidateChains = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$10 = sliceType$21.nil; - _tmp$11 = err; - chains = _tmp$10; - err = _tmp$11; - $s = -1; return [chains, err]; - } - /* } */ case 14: - keyUsages = opts[0].KeyUsages; - if (keyUsages.$length === 0) { - keyUsages = new sliceType$22([1]); - } - _ref = keyUsages; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - usage = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (usage === 0) { - _tmp$12 = candidateChains; - _tmp$13 = $ifaceNil; - chains = _tmp$12; - err = _tmp$13; - $s = -1; return [chains, err]; - } - _i++; - } - _ref$1 = candidateChains; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - candidate = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (checkChainForKeyUsage(candidate, keyUsages)) { - chains = $append(chains, candidate); - } - _i$1++; - } - if (chains.$length === 0) { - _tmp$14 = sliceType$21.nil; - _tmp$15 = (x$1 = new CertificateInvalidError.ptr(c, 4, ""), new x$1.constructor.elem(x$1)); - chains = _tmp$14; - err = _tmp$15; - $s = -1; return [chains, err]; - } - _tmp$16 = chains; - _tmp$17 = $ifaceNil; - chains = _tmp$16; - err = _tmp$17; - $s = -1; return [chains, err]; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.Verify, $c: true, $r, $24r, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, c, c$1, candidate, candidateChains, chains, err, err$1, err$2, i, keyUsages, opts, platformChains, usage, x, x$1, $s};return $f; - }; - Certificate.prototype.Verify = function(opts) { return this.$val.Verify(opts); }; - appendToFreshChain = function(chain, cert) { - var cert, chain, n, x; - n = $makeSlice(sliceType$20, (chain.$length + 1 >> 0)); - $copySlice(n, chain); - (x = chain.$length, ((x < 0 || x >= n.$length) ? ($throwRuntimeError("index out of range"), undefined) : n.$array[n.$offset + x] = cert)); - return n; - }; - Certificate.ptr.prototype.buildChains = function(cache, currentChain, sigChecks, opts) { - var {_i, _i$1, _r$1, _r$2, _ref, _ref$1, c, cache, chains, considerCandidate, currentChain, err, hintCert, hintErr, intermediate, opts, root, sigChecks, x, $s, $r, $c} = $restore(this, {cache, currentChain, sigChecks, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = [c]; - cache = [cache]; - chains = [chains]; - currentChain = [currentChain]; - err = [err]; - hintCert = [hintCert]; - hintErr = [hintErr]; - opts = [opts]; - sigChecks = [sigChecks]; - chains[0] = sliceType$21.nil; - err[0] = $ifaceNil; - c[0] = this; - hintErr[0] = $ifaceNil; - hintCert[0] = ptrType$4.nil; - considerCandidate = (function(c, cache, chains, currentChain, err, hintCert, hintErr, opts, sigChecks) { return function $b(certType, candidate) { - var {_1, _entry, _i, _key, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, candidate, cert, certType, childChains, err$1, ok, $s, $r, $c} = $restore(this, {certType, candidate}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = currentChain[0]; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cert = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cert.Equal(candidate)) { - $s = -1; return; - } - _i++; - } - if (sigChecks[0] === ptrType$16.nil) { - sigChecks[0] = $newDataPointer(0, ptrType$16); - } - sigChecks[0].$set(sigChecks[0].$get() + (1) >> 0); - if (sigChecks[0].$get() > 100) { - err[0] = errors.New("x509: signature check attempts limit reached while verifying certificate chain"); - $s = -1; return; - } - _r$1 = c[0].CheckSignatureFrom(candidate); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err$1 = _r$1; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - if ($interfaceIsEqual(hintErr[0], $ifaceNil)) { - hintErr[0] = err$1; - hintCert[0] = candidate; - } - $s = -1; return; - } - _r$2 = candidate.isValid(certType, currentChain[0], opts[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err[0] = _r$2; - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return; - } - _1 = certType; - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ if (_1 === (1)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (2)) { */ case 4: - chains[0] = $append(chains[0], appendToFreshChain(currentChain[0], candidate)); - $s = 6; continue; - /* } else if (_1 === (1)) { */ case 5: - if (cache[0] === false) { - cache[0] = {}; - } - _tuple = (_entry = cache[0][ptrType$4.keyFor(candidate)], _entry !== undefined ? [_entry.v, true] : [sliceType$21.nil, false]); - childChains = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!ok) { */ case 7: - _r$3 = candidate.buildChains(cache[0], appendToFreshChain(currentChain[0], candidate), sigChecks[0], opts[0]); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - childChains = _tuple$1[0]; - err[0] = _tuple$1[1]; - _key = candidate; (cache[0] || $throwRuntimeError("assignment to entry in nil map"))[ptrType$4.keyFor(_key)] = { k: _key, v: childChains }; - /* } */ case 8: - chains[0] = $appendSlice(chains[0], childChains); - /* } */ case 6: - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _1, _entry, _i, _key, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, candidate, cert, certType, childChains, err$1, ok, $s};return $f; - }; })(c, cache, chains, currentChain, err, hintCert, hintErr, opts, sigChecks); - _r$1 = opts[0].Roots.findPotentialParents(c[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _ref = _r$1; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - root = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = considerCandidate(2, root); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - _r$2 = opts[0].Intermediates.findPotentialParents(c[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _ref$1 = _r$2; - _i$1 = 0; - /* while (true) { */ case 6: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 7; continue; } - intermediate = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $r = considerCandidate(1, intermediate); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 6; continue; - case 7: - if (chains[0].$length > 0) { - err[0] = $ifaceNil; - } - if ((chains[0].$length === 0) && $interfaceIsEqual(err[0], $ifaceNil)) { - err[0] = (x = new UnknownAuthorityError.ptr(c[0], hintErr[0], hintCert[0]), new x.constructor.elem(x)); - } - $s = -1; return [chains[0], err[0]]; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.buildChains, $c: true, $r, _i, _i$1, _r$1, _r$2, _ref, _ref$1, c, cache, chains, considerCandidate, currentChain, err, hintCert, hintErr, intermediate, opts, root, sigChecks, x, $s};return $f; - }; - Certificate.prototype.buildChains = function(cache, currentChain, sigChecks, opts) { return this.$val.buildChains(cache, currentChain, sigChecks, opts); }; - validHostnamePattern = function(host) { - var host; - return validHostname(host, true); - }; - validHostnameInput = function(host) { - var host; - return validHostname(host, false); - }; - validHostname = function(host, isPattern) { - var _i, _i$1, _ref, _ref$1, _rune, c, host, i, isPattern, j, part; - if (!isPattern) { - host = strings.TrimSuffix(host, "."); - } - if (host.length === 0) { - return false; - } - _ref = strings.Split(host, "."); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - part = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (part === "") { - return false; - } - if (isPattern && (i === 0) && part === "*") { - _i++; - continue; - } - _ref$1 = part; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.length)) { break; } - _rune = $decodeRune(_ref$1, _i$1); - j = _i$1; - c = _rune[0]; - if (97 <= c && c <= 122) { - _i$1 += _rune[1]; - continue; - } - if (48 <= c && c <= 57) { - _i$1 += _rune[1]; - continue; - } - if (65 <= c && c <= 90) { - _i$1 += _rune[1]; - continue; - } - if ((c === 45) && !((j === 0))) { - _i$1 += _rune[1]; - continue; - } - if (c === 95) { - _i$1 += _rune[1]; - continue; - } - return false; - } - _i++; - } - return true; - }; - matchExactly = function(hostA, hostB) { - var hostA, hostB; - if (hostA === "" || hostA === "." || hostB === "" || hostB === ".") { - return false; - } - return toLowerCaseASCII(hostA) === toLowerCaseASCII(hostB); - }; - matchHostnames = function(pattern, host) { - var _i, _ref, host, hostParts, i, pattern, patternPart, patternParts; - pattern = toLowerCaseASCII(pattern); - host = toLowerCaseASCII(strings.TrimSuffix(host, ".")); - if ((pattern.length === 0) || (host.length === 0)) { - return false; - } - patternParts = strings.Split(pattern, "."); - hostParts = strings.Split(host, "."); - if (!((patternParts.$length === hostParts.$length))) { - return false; - } - _ref = patternParts; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - patternPart = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ((i === 0) && patternPart === "*") { - _i++; - continue; - } - if (!(patternPart === ((i < 0 || i >= hostParts.$length) ? ($throwRuntimeError("index out of range"), undefined) : hostParts.$array[hostParts.$offset + i]))) { - return false; - } - _i++; - } - return true; - }; - toLowerCaseASCII = function(in$1) { - var _i, _i$1, _ref, _ref$1, _rune, c, c$1, i, in$1, isAlreadyLowerCase, out; - isAlreadyLowerCase = true; - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - c = _rune[0]; - if (c === 65533) { - isAlreadyLowerCase = false; - break; - } - if (65 <= c && c <= 90) { - isAlreadyLowerCase = false; - break; - } - _i += _rune[1]; - } - if (isAlreadyLowerCase) { - return in$1; - } - out = (new sliceType$1($stringToBytes(in$1))); - _ref$1 = out; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (65 <= c$1 && c$1 <= 90) { - ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = (((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i]) + (32) << 24 >>> 24)); - } - _i$1++; - } - return ($bytesToString(out)); - }; - Certificate.ptr.prototype.VerifyHostname = function(h) { - var _i, _i$1, _ref, _ref$1, c, candidate, candidateIP, candidateName, h, ip, match, validCandidateName, x, x$1; - c = this; - candidateIP = h; - if (h.length >= 3 && (h.charCodeAt(0) === 91) && (h.charCodeAt((h.length - 1 >> 0)) === 93)) { - candidateIP = $substring(h, 1, (h.length - 1 >> 0)); - } - ip = net.ParseIP(candidateIP); - if (!(ip === net.IP.nil)) { - _ref = c.IPAddresses; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - candidate = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (ip.Equal(candidate)) { - return $ifaceNil; - } - _i++; - } - return (x = new HostnameError.ptr(c, candidateIP), new x.constructor.elem(x)); - } - candidateName = toLowerCaseASCII(h); - validCandidateName = validHostnameInput(candidateName); - _ref$1 = c.DNSNames; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - match = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (validCandidateName && validHostnamePattern(match)) { - if (matchHostnames(match, candidateName)) { - return $ifaceNil; - } - } else { - if (matchExactly(match, candidateName)) { - return $ifaceNil; - } - } - _i$1++; - } - return (x$1 = new HostnameError.ptr(c, h), new x$1.constructor.elem(x$1)); - }; - Certificate.prototype.VerifyHostname = function(h) { return this.$val.VerifyHostname(h); }; - checkChainForKeyUsage = function(chain, keyUsages) { - var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, cert, chain, i, i$1, keyUsages, requestedUsage, usage, usage$1, usages, usagesRemaining; - usages = $makeSlice(sliceType$22, keyUsages.$length); - $copySlice(usages, keyUsages); - if (chain.$length === 0) { - return false; - } - usagesRemaining = usages.$length; - i = chain.$length - 1 >> 0; - NextCert: - while (true) { - if (!(i >= 0)) { break; } - cert = ((i < 0 || i >= chain.$length) ? ($throwRuntimeError("index out of range"), undefined) : chain.$array[chain.$offset + i]); - if ((cert.ExtKeyUsage.$length === 0) && (cert.UnknownExtKeyUsage.$length === 0)) { - i = i - (1) >> 0; - continue; - } - _ref = cert.ExtKeyUsage; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - usage = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (usage === 0) { - i = i - (1) >> 0; - continue NextCert; - } - _i++; - } - _ref$1 = usages; - _i$1 = 0; - NextRequestedUsage: - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - requestedUsage = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (requestedUsage === -1) { - _i$1++; - continue; - } - _ref$2 = cert.ExtKeyUsage; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - usage$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - if (requestedUsage === usage$1) { - _i$1++; - continue NextRequestedUsage; - } - _i$2++; - } - ((i$1 < 0 || i$1 >= usages.$length) ? ($throwRuntimeError("index out of range"), undefined) : usages.$array[usages.$offset + i$1] = -1); - usagesRemaining = usagesRemaining - (1) >> 0; - if (usagesRemaining === 0) { - return false; - } - _i$1++; - } - i = i - (1) >> 0; - } - return true; - }; - ParseECPrivateKey = function(der) { - var {$24r, _r$1, der, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = parseECPrivateKey(ptrType$18.nil, der); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ParseECPrivateKey, $c: true, $r, $24r, _r$1, der, $s};return $f; - }; - $pkg.ParseECPrivateKey = ParseECPrivateKey; - parseECPrivateKey = function(namedCurveOID, der) { - var {$24r, $24r$1, _q, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, curve, curveOrder, der, err, err$1, err$2, err$3, k, key, namedCurveOID, priv, privKey, privateKey$1, x, $s, $r, $c} = $restore(this, {namedCurveOID, der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - privKey = [privKey]; - key = ptrType$19.nil; - err = $ifaceNil; - privKey[0] = new ecPrivateKey.ptr(0, sliceType$1.nil, asn1.ObjectIdentifier.nil, new asn1.BitString.ptr(sliceType$1.nil, 0)); - _r$1 = asn1.Unmarshal(der, privKey[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err$1 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 2: - _r$2 = asn1.Unmarshal(der, new pkcs8.ptr(0, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)), sliceType$1.nil)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$2 = _tuple$1[1]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - _tmp = ptrType$19.nil; - _tmp$1 = errors.New("x509: failed to parse private key (use ParsePKCS8PrivateKey instead for this key format)"); - key = _tmp; - err = _tmp$1; - $s = -1; return [key, err]; - } - _r$3 = asn1.Unmarshal(der, new pkcs1PrivateKey.ptr(0, ptrType$1.nil, 0, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, sliceType$23.nil)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - err$3 = _tuple$2[1]; - if ($interfaceIsEqual(err$3, $ifaceNil)) { - _tmp$2 = ptrType$19.nil; - _tmp$3 = errors.New("x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format)"); - key = _tmp$2; - err = _tmp$3; - $s = -1; return [key, err]; - } - _tmp$4 = ptrType$19.nil; - _r$4 = err$1.Error(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = errors.New("x509: failed to parse EC private key: " + _r$4); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$5 = _r$5; - key = _tmp$4; - err = _tmp$5; - $24r = [key, err]; - $s = 8; case 8: return $24r; - /* } */ case 3: - /* */ if (!((privKey[0].Version === 1))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!((privKey[0].Version === 1))) { */ case 9: - _tmp$6 = ptrType$19.nil; - _r$6 = fmt.Errorf("x509: unknown EC private key version %d", new sliceType$6([new $Int(privKey[0].Version)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$7 = _r$6; - key = _tmp$6; - err = _tmp$7; - $24r$1 = [key, err]; - $s = 12; case 12: return $24r$1; - /* } */ case 10: - curve = $ifaceNil; - /* */ if (!(namedCurveOID === ptrType$18.nil)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(namedCurveOID === ptrType$18.nil)) { */ case 13: - _r$7 = namedCurveFromOID(namedCurveOID.$get()); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - curve = _r$7; - $s = 15; continue; - /* } else { */ case 14: - _r$8 = namedCurveFromOID(privKey[0].NamedCurveOID); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - curve = _r$8; - /* } */ case 15: - if ($interfaceIsEqual(curve, $ifaceNil)) { - _tmp$8 = ptrType$19.nil; - _tmp$9 = errors.New("x509: unknown elliptic curve"); - key = _tmp$8; - err = _tmp$9; - $s = -1; return [key, err]; - } - k = new big.Int.ptr(false, big.nat.nil).SetBytes(privKey[0].PrivateKey); - _r$9 = curve.Params(); /* */ $s = 18; case 18: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - curveOrder = _r$9.N; - if (k.Cmp(curveOrder) >= 0) { - _tmp$10 = ptrType$19.nil; - _tmp$11 = errors.New("x509: invalid elliptic curve private key value"); - key = _tmp$10; - err = _tmp$11; - $s = -1; return [key, err]; - } - priv = new ecdsa.PrivateKey.ptr(new ecdsa.PublicKey.ptr($ifaceNil, ptrType$1.nil, ptrType$1.nil), ptrType$1.nil); - priv.PublicKey.Curve = curve; - priv.D = k; - privateKey$1 = $makeSlice(sliceType$1, (_q = ((curveOrder.BitLen() + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - while (true) { - if (!(privKey[0].PrivateKey.$length > privateKey$1.$length)) { break; } - if (!(((x = privKey[0].PrivateKey, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 0))) { - _tmp$12 = ptrType$19.nil; - _tmp$13 = errors.New("x509: invalid private key length"); - key = _tmp$12; - err = _tmp$13; - $s = -1; return [key, err]; - } - privKey[0].PrivateKey = $subslice(privKey[0].PrivateKey, 1); - } - $copySlice($subslice(privateKey$1, (privateKey$1.$length - privKey[0].PrivateKey.$length >> 0)), privKey[0].PrivateKey); - _r$10 = curve.ScalarBaseMult(privateKey$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$3 = _r$10; - priv.PublicKey.X = _tuple$3[0]; - priv.PublicKey.Y = _tuple$3[1]; - _tmp$14 = priv; - _tmp$15 = $ifaceNil; - key = _tmp$14; - err = _tmp$15; - $s = -1; return [key, err]; - /* */ } return; } var $f = {$blk: parseECPrivateKey, $c: true, $r, $24r, $24r$1, _q, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, curve, curveOrder, der, err, err$1, err$2, err$3, k, key, namedCurveOID, priv, privKey, privateKey$1, x, $s};return $f; - }; - Certificate.ptr.prototype.systemVerify = function(opts) { - var _tmp, _tmp$1, c, chains, err, opts; - chains = sliceType$21.nil; - err = $ifaceNil; - c = this; - _tmp = sliceType$21.nil; - _tmp$1 = $ifaceNil; - chains = _tmp; - err = _tmp$1; - return [chains, err]; - }; - Certificate.prototype.systemVerify = function(opts) { return this.$val.systemVerify(opts); }; - loadSystemRoots = function() { - var {_i, _i$1, _i$2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, d, data, data$1, directory, dirs, err, err$1, err$2, f, fi, file, files, firstErr, fis, roots, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - roots = NewCertPool(); - files = certFiles; - _r$1 = os.Getenv("SSL_CERT_FILE"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - f = _r$1; - if (!(f === "")) { - files = new sliceType$4([f]); - } - firstErr = $ifaceNil; - _ref = files; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - file = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$2 = os.ReadFile(file); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - data = _tuple[0]; - err = _tuple[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 5: - _r$3 = roots.AppendCertsFromPEM(data); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* break; */ $s = 3; continue; - /* } */ case 6: - if ($interfaceIsEqual(firstErr, $ifaceNil) && !os.IsNotExist(err)) { - firstErr = err; - } - _i++; - $s = 2; continue; - case 3: - dirs = certDirectories; - _r$4 = os.Getenv("SSL_CERT_DIR"); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - d = _r$4; - if (!(d === "")) { - dirs = strings.Split(d, ":"); - } - _ref$1 = dirs; - _i$1 = 0; - /* while (true) { */ case 9: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 10; continue; } - directory = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$5 = readUniqueDirectoryEntries(directory); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - fis = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - if ($interfaceIsEqual(firstErr, $ifaceNil) && !os.IsNotExist(err$1)) { - firstErr = err$1; - } - _i$1++; - /* continue; */ $s = 9; continue; - } - _ref$2 = fis; - _i$2 = 0; - /* while (true) { */ case 12: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 13; continue; } - fi = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - _r$6 = fi.Name(); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = os.ReadFile(directory + "/" + _r$6); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - data$1 = _tuple$2[0]; - err$2 = _tuple$2[1]; - /* */ if ($interfaceIsEqual(err$2, $ifaceNil)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if ($interfaceIsEqual(err$2, $ifaceNil)) { */ case 16: - _r$8 = roots.AppendCertsFromPEM(data$1); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 17: - _i$2++; - $s = 12; continue; - case 13: - _i$1++; - $s = 9; continue; - case 10: - if (roots.len() > 0 || $interfaceIsEqual(firstErr, $ifaceNil)) { - $s = -1; return [roots, $ifaceNil]; - } - $s = -1; return [ptrType.nil, firstErr]; - /* */ } return; } var $f = {$blk: loadSystemRoots, $c: true, $r, _i, _i$1, _i$2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, d, data, data$1, directory, dirs, err, err$1, err$2, f, fi, file, files, firstErr, fis, roots, $s};return $f; - }; - readUniqueDirectoryEntries = function(dir) { - var {_i, _r$1, _r$2, _ref, _tuple, dir, err, f, files, uniq, $s, $r, $c} = $restore(this, {dir}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = os.ReadDir(dir); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - files = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$24.nil, err]; - } - uniq = $subslice(files, 0, 0); - _ref = files; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$2 = isSameDirSymlink(f, dir); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!_r$2) { */ case 4: - uniq = $append(uniq, f); - /* } */ case 5: - _i++; - $s = 2; continue; - case 3: - $s = -1; return [uniq, $ifaceNil]; - /* */ } return; } var $f = {$blk: readUniqueDirectoryEntries, $c: true, $r, _i, _r$1, _r$2, _ref, _tuple, dir, err, f, files, uniq, $s};return $f; - }; - isSameDirSymlink = function(f, dir) { - var {_arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _tuple, dir, err, f, target, $s, $r, $c} = $restore(this, {f, dir}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = f.Type(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (((_r$1 & 134217728) >>> 0) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (((_r$1 & 134217728) >>> 0) === 0) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _arg = dir; - _r$2 = f.Name(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = filepath.Join(new sliceType$4([_arg, _arg$1])); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = os.Readlink(_r$3); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - target = _tuple[0]; - err = _tuple[1]; - $s = -1; return $interfaceIsEqual(err, $ifaceNil) && !strings.Contains(target, "/"); - /* */ } return; } var $f = {$blk: isSameDirSymlink, $c: true, $r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _tuple, dir, err, f, target, $s};return $f; - }; - systemRootsPool = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = once.Do(initSystemRoots); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return systemRoots; - /* */ } return; } var $f = {$blk: systemRootsPool, $c: true, $r, $s};return $f; - }; - initSystemRoots = function() { - var {_r$1, _tuple, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = loadSystemRoots(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - systemRoots = _tuple[0]; - systemRootsErr = _tuple[1]; - if (!($interfaceIsEqual(systemRootsErr, $ifaceNil))) { - systemRoots = ptrType.nil; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: initSystemRoots, $c: true, $r, _r$1, _tuple, $s};return $f; - }; - ParsePKCS8PrivateKey = function(der) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, bytes$1, curvePrivateKey, der, err, err$1, err$2, err$3, err$4, err$5, key, l, l$1, namedCurveOID, privKey, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - curvePrivateKey = [curvePrivateKey]; - privKey = [privKey]; - key = $ifaceNil; - err = $ifaceNil; - privKey[0] = new pkcs8.ptr(0, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)), sliceType$1.nil); - _r$1 = asn1.Unmarshal(der, privKey[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err$1 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 2: - _r$2 = asn1.Unmarshal(der, new ecPrivateKey.ptr(0, sliceType$1.nil, asn1.ObjectIdentifier.nil, new asn1.BitString.ptr(sliceType$1.nil, 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$2 = _tuple$1[1]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - _tmp = $ifaceNil; - _tmp$1 = errors.New("x509: failed to parse private key (use ParseECPrivateKey instead for this key format)"); - key = _tmp; - err = _tmp$1; - $s = -1; return [key, err]; - } - _r$3 = asn1.Unmarshal(der, new pkcs1PrivateKey.ptr(0, ptrType$1.nil, 0, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, sliceType$23.nil)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - err$3 = _tuple$2[1]; - if ($interfaceIsEqual(err$3, $ifaceNil)) { - _tmp$2 = $ifaceNil; - _tmp$3 = errors.New("x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format)"); - key = _tmp$2; - err = _tmp$3; - $s = -1; return [key, err]; - } - _tmp$4 = $ifaceNil; - _tmp$5 = err$1; - key = _tmp$4; - err = _tmp$5; - $s = -1; return [key, err]; - /* } */ case 3: - /* */ if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyRSA)) { $s = 7; continue; } - /* */ if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyECDSA)) { $s = 8; continue; } - /* */ if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyEd25519)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyRSA)) { */ case 7: - _r$4 = ParsePKCS1PrivateKey(privKey[0].PrivateKey); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - key = _tuple$3[0]; - err = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 13: - _tmp$6 = $ifaceNil; - _r$5 = err.Error(); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = errors.New("x509: failed to parse RSA private key embedded in PKCS#8: " + _r$5); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$7 = _r$6; - key = _tmp$6; - err = _tmp$7; - $24r = [key, err]; - $s = 17; case 17: return $24r; - /* } */ case 14: - _tmp$8 = key; - _tmp$9 = $ifaceNil; - key = _tmp$8; - err = _tmp$9; - $s = -1; return [key, err]; - /* } else if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyECDSA)) { */ case 8: - bytes$1 = privKey[0].Algo.Parameters.FullBytes; - namedCurveOID = $newDataPointer(asn1.ObjectIdentifier.nil, ptrType$18); - _r$7 = asn1.Unmarshal(bytes$1, namedCurveOID); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$4 = _r$7; - err$4 = _tuple$4[1]; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - namedCurveOID = ptrType$18.nil; - } - _r$8 = parseECPrivateKey(namedCurveOID, privKey[0].PrivateKey); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$5 = _r$8; - key = _tuple$5[0]; - err = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 20: - _tmp$10 = $ifaceNil; - _r$9 = err.Error(); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = errors.New("x509: failed to parse EC private key embedded in PKCS#8: " + _r$9); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tmp$11 = _r$10; - key = _tmp$10; - err = _tmp$11; - $24r$1 = [key, err]; - $s = 24; case 24: return $24r$1; - /* } */ case 21: - _tmp$12 = key; - _tmp$13 = $ifaceNil; - key = _tmp$12; - err = _tmp$13; - $s = -1; return [key, err]; - /* } else if (privKey[0].Algo.Algorithm.Equal(oidPublicKeyEd25519)) { */ case 9: - l = privKey[0].Algo.Parameters.FullBytes.$length; - if (!((l === 0))) { - _tmp$14 = $ifaceNil; - _tmp$15 = errors.New("x509: invalid Ed25519 private key parameters"); - key = _tmp$14; - err = _tmp$15; - $s = -1; return [key, err]; - } - curvePrivateKey[0] = sliceType$1.nil; - _r$11 = asn1.Unmarshal(privKey[0].PrivateKey, (curvePrivateKey.$ptr || (curvePrivateKey.$ptr = new ptrType$20(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, curvePrivateKey)))); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$6 = _r$11; - err$5 = _tuple$6[1]; - /* */ if (!($interfaceIsEqual(err$5, $ifaceNil))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!($interfaceIsEqual(err$5, $ifaceNil))) { */ case 26: - _tmp$16 = $ifaceNil; - _r$12 = fmt.Errorf("x509: invalid Ed25519 private key: %v", new sliceType$6([err$5])); /* */ $s = 28; case 28: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tmp$17 = _r$12; - key = _tmp$16; - err = _tmp$17; - $24r$2 = [key, err]; - $s = 29; case 29: return $24r$2; - /* } */ case 27: - l$1 = curvePrivateKey[0].$length; - /* */ if (!((l$1 === 32))) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!((l$1 === 32))) { */ case 30: - _tmp$18 = $ifaceNil; - _r$13 = fmt.Errorf("x509: invalid Ed25519 private key length: %d", new sliceType$6([new $Int(l$1)])); /* */ $s = 32; case 32: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tmp$19 = _r$13; - key = _tmp$18; - err = _tmp$19; - $24r$3 = [key, err]; - $s = 33; case 33: return $24r$3; - /* } */ case 31: - _r$14 = ed25519.NewKeyFromSeed(curvePrivateKey[0]); /* */ $s = 34; case 34: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tmp$20 = _r$14; - _tmp$21 = $ifaceNil; - key = _tmp$20; - err = _tmp$21; - $24r$4 = [key, err]; - $s = 35; case 35: return $24r$4; - /* } else { */ case 10: - _tmp$22 = $ifaceNil; - _r$15 = fmt.Errorf("x509: PKCS#8 wrapping contained private key with unknown algorithm: %v", new sliceType$6([privKey[0].Algo.Algorithm])); /* */ $s = 36; case 36: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tmp$23 = _r$15; - key = _tmp$22; - err = _tmp$23; - $24r$5 = [key, err]; - $s = 37; case 37: return $24r$5; - /* } */ case 11: - case 6: - $s = -1; return [key, err]; - /* */ } return; } var $f = {$blk: ParsePKCS8PrivateKey, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, bytes$1, curvePrivateKey, der, err, err$1, err$2, err$3, err$4, err$5, key, l, l$1, namedCurveOID, privKey, $s};return $f; - }; - $pkg.ParsePKCS8PrivateKey = ParsePKCS8PrivateKey; - ParsePKCS1PrivateKey = function(der) { - var {_i, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, _tuple$2, a, der, err, err$1, err$2, i, key, priv, rest, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - priv = [priv]; - priv[0] = new pkcs1PrivateKey.ptr(0, ptrType$1.nil, 0, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, sliceType$23.nil); - _r$1 = asn1.Unmarshal(der, priv[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - rest = _tuple[0]; - err = _tuple[1]; - if (rest.$length > 0) { - $s = -1; return [ptrType$21.nil, (x = new asn1.SyntaxError.ptr("trailing data"), new x.constructor.elem(x))]; - } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$2 = asn1.Unmarshal(der, new ecPrivateKey.ptr(0, sliceType$1.nil, asn1.ObjectIdentifier.nil, new asn1.BitString.ptr(sliceType$1.nil, 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - $s = -1; return [ptrType$21.nil, errors.New("x509: failed to parse private key (use ParseECPrivateKey instead for this key format)")]; - } - _r$3 = asn1.Unmarshal(der, new pkcs8.ptr(0, new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)), sliceType$1.nil)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - err$2 = _tuple$2[1]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - $s = -1; return [ptrType$21.nil, errors.New("x509: failed to parse private key (use ParsePKCS8PrivateKey instead for this key format)")]; - } - $s = -1; return [ptrType$21.nil, err]; - /* } */ case 3: - if (priv[0].Version > 1) { - $s = -1; return [ptrType$21.nil, errors.New("x509: unsupported private key version")]; - } - if (priv[0].N.Sign() <= 0 || priv[0].D.Sign() <= 0 || priv[0].P.Sign() <= 0 || priv[0].Q.Sign() <= 0) { - $s = -1; return [ptrType$21.nil, errors.New("x509: private key contains zero or negative value")]; - } - key = new rsa.PrivateKey.ptr(new rsa.PublicKey.ptr(ptrType$1.nil, 0), ptrType$1.nil, sliceType$25.nil, new rsa.PrecomputedValues.ptr(ptrType$1.nil, ptrType$1.nil, ptrType$1.nil, sliceType$26.nil)); - rsa.PublicKey.copy(key.PublicKey, new rsa.PublicKey.ptr(priv[0].N, priv[0].E)); - key.D = priv[0].D; - key.Primes = $makeSlice(sliceType$25, (2 + priv[0].AdditionalPrimes.$length >> 0)); - (x$1 = key.Primes, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0] = priv[0].P)); - (x$2 = key.Primes, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1] = priv[0].Q)); - _ref = priv[0].AdditionalPrimes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - a = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkcs1AdditionalRSAPrime); - if (a.Prime.Sign() <= 0) { - $s = -1; return [ptrType$21.nil, errors.New("x509: private key contains zero or negative prime")]; - } - (x$3 = key.Primes, x$4 = i + 2 >> 0, ((x$4 < 0 || x$4 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + x$4] = a.Prime)); - _i++; - } - _r$4 = key.Validate(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$21.nil, err]; - } - $r = key.Precompute(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [key, $ifaceNil]; - /* */ } return; } var $f = {$blk: ParsePKCS1PrivateKey, $c: true, $r, _i, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, _tuple$2, a, der, err, err$1, err$2, i, key, priv, rest, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - $pkg.ParsePKCS1PrivateKey = ParsePKCS1PrivateKey; - isPrintable = function(b) { - var b; - return 97 <= b && b <= 122 || 65 <= b && b <= 90 || 48 <= b && b <= 57 || 39 <= b && b <= 41 || 43 <= b && b <= 47 || (b === 32) || (b === 58) || (b === 61) || (b === 63) || (b === 42) || (b === 38); - }; - parseASN1String = function(tag, value) { - var {$24r, _1, _i, _i$1, _q, _r$1, _r$2, _r$3, _ref, _ref$1, b, b$1, l, s, s$1, tag, value, x, x$1, $s, $r, $c} = $restore(this, {tag, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = tag; - /* */ if (_1 === (20)) { $s = 2; continue; } - /* */ if (_1 === (19)) { $s = 3; continue; } - /* */ if (_1 === (12)) { $s = 4; continue; } - /* */ if (_1 === (30)) { $s = 5; continue; } - /* */ if (_1 === (22)) { $s = 6; continue; } - /* */ if (_1 === (18)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (20)) { */ case 2: - $s = -1; return [($bytesToString(value)), $ifaceNil]; - /* } else if (_1 === (19)) { */ case 3: - _ref = value; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!isPrintable(b)) { - $s = -1; return ["", errors.New("invalid PrintableString")]; - } - _i++; - } - $s = -1; return [($bytesToString(value)), $ifaceNil]; - /* } else if (_1 === (12)) { */ case 4: - if (!utf8.Valid(value)) { - $s = -1; return ["", errors.New("invalid UTF-8 string")]; - } - $s = -1; return [($bytesToString(value)), $ifaceNil]; - /* } else if (_1 === (30)) { */ case 5: - if (!(((_r$1 = value.$length % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { - $s = -1; return ["", errors.New("invalid BMPString")]; - } - l = value.$length; - if (l >= 2 && ((x = l - 1 >> 0, ((x < 0 || x >= value.$length) ? ($throwRuntimeError("index out of range"), undefined) : value.$array[value.$offset + x])) === 0) && ((x$1 = l - 2 >> 0, ((x$1 < 0 || x$1 >= value.$length) ? ($throwRuntimeError("index out of range"), undefined) : value.$array[value.$offset + x$1])) === 0)) { - value = $subslice(value, 0, (l - 2 >> 0)); - } - s = $makeSlice(sliceType$27, 0, (_q = value.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - while (true) { - if (!(value.$length > 0)) { break; } - s = $append(s, ((((0 >= value.$length ? ($throwRuntimeError("index out of range"), undefined) : value.$array[value.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) + (((1 >= value.$length ? ($throwRuntimeError("index out of range"), undefined) : value.$array[value.$offset + 1]) << 16 >>> 16)) << 16 >>> 16); - value = $subslice(value, 2); - } - $s = -1; return [($runesToString(utf16.Decode(s))), $ifaceNil]; - /* } else if (_1 === (22)) { */ case 6: - s$1 = ($bytesToString(value)); - _r$2 = isIA5String(s$1); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(_r$2, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(_r$2, $ifaceNil))) { */ case 9: - $s = -1; return ["", errors.New("invalid IA5String")]; - /* } */ case 10: - $s = -1; return [s$1, $ifaceNil]; - /* } else if (_1 === (18)) { */ case 7: - _ref$1 = value; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (!(48 <= b$1 && b$1 <= 57 || (b$1 === 32))) { - $s = -1; return ["", errors.New("invalid NumericString")]; - } - _i$1++; - } - $s = -1; return [($bytesToString(value)), $ifaceNil]; - /* } */ case 8: - case 1: - _r$3 = fmt.Errorf("unsupported string type: %v", new sliceType$6([new asn1$1.Tag(tag)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = ["", _r$3]; - $s = 13; case 13: return $24r; - /* */ } return; } var $f = {$blk: parseASN1String, $c: true, $r, $24r, _1, _i, _i$1, _q, _r$1, _r$2, _r$3, _ref, _ref$1, b, b$1, l, s, s$1, tag, value, x, x$1, $s};return $f; - }; - parseName = function(raw) { - var {$24r, _r$1, _r$2, _tuple, atav, attr, err, raw, rawValue, rdnSeq, rdnSet, set, valueTag, $s, $r, $c} = $restore(this, {raw}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - raw = [raw]; - rdnSeq = [rdnSeq]; - if (!(raw.$ptr || (raw.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, raw))).ReadASN1((raw.$ptr || (raw.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, raw))), 48)) { - $s = -1; return [ptrType$14.nil, errors.New("x509: invalid RDNSequence")]; - } - rdnSeq[0] = pkix.RDNSequence.nil; - /* while (true) { */ case 1: - /* if (!(!raw[0].Empty())) { break; } */ if(!(!raw[0].Empty())) { $s = 2; continue; } - set = [set]; - rdnSet = pkix.RelativeDistinguishedNameSET.nil; - set[0] = cryptobyte.String.nil; - if (!(raw.$ptr || (raw.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, raw))).ReadASN1((set.$ptr || (set.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, set))), 49)) { - $s = -1; return [ptrType$14.nil, errors.New("x509: invalid RDNSequence")]; - } - /* while (true) { */ case 3: - /* if (!(!set[0].Empty())) { break; } */ if(!(!set[0].Empty())) { $s = 4; continue; } - atav = [atav]; - rawValue = [rawValue]; - valueTag = [valueTag]; - atav[0] = cryptobyte.String.nil; - if (!(set.$ptr || (set.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, set))).ReadASN1((atav.$ptr || (atav.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, atav))), 48)) { - $s = -1; return [ptrType$14.nil, errors.New("x509: invalid RDNSequence: invalid attribute")]; - } - attr = new pkix.AttributeTypeAndValue.ptr(asn1.ObjectIdentifier.nil, $ifaceNil); - if (!(atav.$ptr || (atav.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, atav))).ReadASN1ObjectIdentifier((attr.$ptr_Type || (attr.$ptr_Type = new ptrType$18(function() { return this.$target.Type; }, function($v) { this.$target.Type = $v; }, attr))))) { - $s = -1; return [ptrType$14.nil, errors.New("x509: invalid RDNSequence: invalid attribute type")]; - } - rawValue[0] = cryptobyte.String.nil; - valueTag[0] = 0; - if (!(atav.$ptr || (atav.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, atav))).ReadAnyASN1((rawValue.$ptr || (rawValue.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, rawValue))), (valueTag.$ptr || (valueTag.$ptr = new ptrType$24(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, valueTag))))) { - $s = -1; return [ptrType$14.nil, errors.New("x509: invalid RDNSequence: invalid attribute value")]; - } - err = $ifaceNil; - _r$1 = parseASN1String(valueTag[0], $convertSliceType(rawValue[0], sliceType$1)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - attr.Value = new $String(_tuple[0]); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - _r$2 = fmt.Errorf("x509: invalid RDNSequence: invalid attribute value: %s", new sliceType$6([err])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [ptrType$14.nil, _r$2]; - $s = 9; case 9: return $24r; - /* } */ case 7: - rdnSet = $append(rdnSet, attr); - $s = 3; continue; - case 4: - rdnSeq[0] = $append(rdnSeq[0], rdnSet); - $s = 1; continue; - case 2: - $s = -1; return [(rdnSeq.$ptr || (rdnSeq.$ptr = new ptrType$14(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, rdnSeq))), $ifaceNil]; - /* */ } return; } var $f = {$blk: parseName, $c: true, $r, $24r, _r$1, _r$2, _tuple, atav, attr, err, raw, rawValue, rdnSeq, rdnSet, set, valueTag, $s};return $f; - }; - parseAI = function(der) { - var ai, der, der$24ptr, params, params$24ptr, tag, tag$24ptr; - ai = new pkix.AlgorithmIdentifier.ptr(asn1.ObjectIdentifier.nil, new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, sliceType$1.nil)); - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1ObjectIdentifier((ai.$ptr_Algorithm || (ai.$ptr_Algorithm = new ptrType$18(function() { return this.$target.Algorithm; }, function($v) { this.$target.Algorithm = $v; }, ai))))) { - return [ai, errors.New("x509: malformed OID")]; - } - if (der.Empty()) { - return [ai, $ifaceNil]; - } - params = cryptobyte.String.nil; - tag = 0; - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadAnyASN1Element((params$24ptr || (params$24ptr = new ptrType$23(function() { return params; }, function($v) { params = $convertSliceType($v, cryptobyte.String); }))), (tag$24ptr || (tag$24ptr = new ptrType$24(function() { return tag; }, function($v) { tag = $v; }))))) { - return [ai, errors.New("x509: malformed parameters")]; - } - ai.Parameters.Tag = ((tag >> 0)); - ai.Parameters.FullBytes = $convertSliceType(params, sliceType$1); - return [ai, $ifaceNil]; - }; - parseValidity = function(der) { - var {_r$1, _r$2, _tuple, _tuple$1, der, err, extract, notAfter, notBefore, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - der = [der]; - extract = (function(der) { return function $b() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, err, formatStr, s, serialized, t, utc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = [t]; - utc = [utc]; - t[0] = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - /* */ if (der[0].PeekASN1Tag(23)) { $s = 2; continue; } - /* */ if (der[0].PeekASN1Tag(24)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (der[0].PeekASN1Tag(23)) { */ case 2: - utc[0] = cryptobyte.String.nil; - if (!(der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1((utc.$ptr || (utc.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, utc))), 23)) { - $s = -1; return [t[0], errors.New("x509: malformed UTCTime")]; - } - s = ($bytesToString(utc[0])); - formatStr = "0601021504Z0700"; - err = $ifaceNil; - _r$1 = time.Parse(formatStr, s); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - time.Time.copy(t[0], _tuple[0]); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - formatStr = "060102150405Z0700"; - _r$2 = time.Parse(formatStr, s); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - time.Time.copy(t[0], _tuple$1[0]); - err = _tuple$1[1]; - /* } */ case 8: - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [t[0], err]; - } - _r$3 = $clone(t[0], time.Time).Format(formatStr); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - serialized = _r$3; - if (!(serialized === s)) { - $s = -1; return [t[0], errors.New("x509: malformed UTCTime")]; - } - _r$4 = $clone(t[0], time.Time).Year(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4 >= 2050) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$4 >= 2050) { */ case 11: - _r$5 = $clone(t[0], time.Time).AddDate(-100, 0, 0); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - time.Time.copy(t[0], _r$5); - /* } */ case 12: - $s = 5; continue; - /* } else if (der[0].PeekASN1Tag(24)) { */ case 3: - _r$6 = (der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1GeneralizedTime(t[0]); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (!_r$6) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!_r$6) { */ case 15: - $s = -1; return [t[0], errors.New("x509: malformed GeneralizedTime")]; - /* } */ case 16: - $s = 5; continue; - /* } else { */ case 4: - $s = -1; return [t[0], errors.New("x509: unsupported time format")]; - /* } */ case 5: - case 1: - $s = -1; return [t[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, err, formatStr, s, serialized, t, utc, $s};return $f; - }; })(der); - _r$1 = extract(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - notBefore = $clone(_tuple[0], time.Time); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), err]; - } - _r$2 = extract(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - notAfter = $clone(_tuple$1[0], time.Time); - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), err]; - } - $s = -1; return [notBefore, notAfter, $ifaceNil]; - /* */ } return; } var $f = {$blk: parseValidity, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, der, err, extract, notAfter, notBefore, $s};return $f; - }; - parseExtension = function(der) { - var der, der$24ptr, ext, val, val$24ptr; - ext = new pkix.Extension.ptr(asn1.ObjectIdentifier.nil, false, sliceType$1.nil); - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1ObjectIdentifier((ext.$ptr_Id || (ext.$ptr_Id = new ptrType$18(function() { return this.$target.Id; }, function($v) { this.$target.Id = $v; }, ext))))) { - return [ext, errors.New("x509: malformed extension OID field")]; - } - if (der.PeekASN1Tag(1)) { - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1Boolean((ext.$ptr_Critical || (ext.$ptr_Critical = new ptrType$6(function() { return this.$target.Critical; }, function($v) { this.$target.Critical = $v; }, ext))))) { - return [ext, errors.New("x509: malformed extension critical field")]; - } - } - val = cryptobyte.String.nil; - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((val$24ptr || (val$24ptr = new ptrType$23(function() { return val; }, function($v) { val = $convertSliceType($v, cryptobyte.String); }))), 4)) { - return [ext, errors.New("x509: malformed extension value field")]; - } - ext.Value = $convertSliceType(val, sliceType$1); - return [ext, $ifaceNil]; - }; - parsePublicKey = function(algo, keyData) { - var {_1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _v, _v$1, _v$2, algo, der, keyData, namedCurve, namedCurveOID, p, paramsDer, paramsDer$1, paramsDer$24ptr, pub, pub$1, pub$2, x, y, y$1, $s, $r, $c} = $restore(this, {algo, keyData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - der = [der]; - paramsDer = [paramsDer]; - der[0] = ($convertSliceType($clone(keyData.PublicKey, asn1.BitString).RightAlign(), cryptobyte.String)); - _1 = algo; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ if (_1 === (4)) { $s = 4; continue; } - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (1)) { */ case 2: - if (!bytes.Equal(keyData.Algorithm.Parameters.FullBytes, asn1.NullBytes)) { - $s = -1; return [$ifaceNil, errors.New("x509: RSA key missing NULL parameters")]; - } - p = new pkcs1PublicKey.ptr(new big.Int.ptr(false, big.nat.nil), 0); - if (!(der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1((der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))), 48)) { - $s = -1; return [$ifaceNil, errors.New("x509: invalid RSA public key")]; - } - _r$1 = (der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1Integer(p.N); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!_r$1) { */ case 8: - $s = -1; return [$ifaceNil, errors.New("x509: invalid RSA modulus")]; - /* } */ case 9: - _r$2 = (der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1Integer((p.$ptr_E || (p.$ptr_E = new ptrType$16(function() { return this.$target.E; }, function($v) { this.$target.E = $v; }, p)))); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!_r$2) { */ case 11: - $s = -1; return [$ifaceNil, errors.New("x509: invalid RSA public exponent")]; - /* } */ case 12: - if (p.N.Sign() <= 0) { - $s = -1; return [$ifaceNil, errors.New("x509: RSA modulus is not a positive number")]; - } - if (p.E <= 0) { - $s = -1; return [$ifaceNil, errors.New("x509: RSA public exponent is not a positive number")]; - } - pub = new rsa.PublicKey.ptr(p.N, p.E); - $s = -1; return [pub, $ifaceNil]; - /* } else if (_1 === (3)) { */ case 3: - paramsDer$1 = ($convertSliceType(keyData.Algorithm.Parameters.FullBytes, cryptobyte.String)); - namedCurveOID = $newDataPointer(asn1.ObjectIdentifier.nil, ptrType$18); - if (!(paramsDer$24ptr || (paramsDer$24ptr = new ptrType$23(function() { return paramsDer$1; }, function($v) { paramsDer$1 = $convertSliceType($v, cryptobyte.String); }))).ReadASN1ObjectIdentifier(namedCurveOID)) { - $s = -1; return [$ifaceNil, errors.New("x509: invalid ECDSA parameters")]; - } - _r$3 = namedCurveFromOID(namedCurveOID.$get()); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - namedCurve = _r$3; - if ($interfaceIsEqual(namedCurve, $ifaceNil)) { - $s = -1; return [$ifaceNil, errors.New("x509: unsupported elliptic curve")]; - } - _r$4 = elliptic.Unmarshal(namedCurve, $convertSliceType(der[0], sliceType$1)); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - x = _tuple[0]; - y = _tuple[1]; - if (x === ptrType$1.nil) { - $s = -1; return [$ifaceNil, errors.New("x509: failed to unmarshal elliptic curve point")]; - } - pub$1 = new ecdsa.PublicKey.ptr(namedCurve, x, y); - $s = -1; return [pub$1, $ifaceNil]; - /* } else if (_1 === (4)) { */ case 4: - if (!((keyData.Algorithm.Parameters.FullBytes.$length === 0))) { - $s = -1; return [$ifaceNil, errors.New("x509: Ed25519 key encoded with illegal parameters")]; - } - if (!((der[0].$length === 32))) { - $s = -1; return [$ifaceNil, errors.New("x509: wrong Ed25519 public key size")]; - } - $s = -1; return [($convertSliceType(der[0], ed25519.PublicKey)), $ifaceNil]; - /* } else if (_1 === (2)) { */ case 5: - y$1 = new big.Int.ptr(false, big.nat.nil); - _r$5 = (der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1Integer(y$1); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!_r$5) { */ case 16: - $s = -1; return [$ifaceNil, errors.New("x509: invalid DSA public key")]; - /* } */ case 17: - pub$2 = new dsa.PublicKey.ptr(new dsa.Parameters.ptr(new big.Int.ptr(false, big.nat.nil), new big.Int.ptr(false, big.nat.nil), new big.Int.ptr(false, big.nat.nil)), y$1); - paramsDer[0] = ($convertSliceType(keyData.Algorithm.Parameters.FullBytes, cryptobyte.String)); - if (!(paramsDer.$ptr || (paramsDer.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, paramsDer))).ReadASN1((paramsDer.$ptr || (paramsDer.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, paramsDer))), 48)) { _v$2 = true; $s = 23; continue s; } - _r$6 = (paramsDer.$ptr || (paramsDer.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, paramsDer))).ReadASN1Integer(pub$2.Parameters.P); /* */ $s = 24; case 24: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _v$2 = !_r$6; case 23: - if (_v$2) { _v$1 = true; $s = 22; continue s; } - _r$7 = (paramsDer.$ptr || (paramsDer.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, paramsDer))).ReadASN1Integer(pub$2.Parameters.Q); /* */ $s = 25; case 25: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v$1 = !_r$7; case 22: - if (_v$1) { _v = true; $s = 21; continue s; } - _r$8 = (paramsDer.$ptr || (paramsDer.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, paramsDer))).ReadASN1Integer(pub$2.Parameters.G); /* */ $s = 26; case 26: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = !_r$8; case 21: - /* */ if (_v) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_v) { */ case 19: - $s = -1; return [$ifaceNil, errors.New("x509: invalid DSA parameters")]; - /* } */ case 20: - if (pub$2.Y.Sign() <= 0 || pub$2.Parameters.P.Sign() <= 0 || pub$2.Parameters.Q.Sign() <= 0 || pub$2.Parameters.G.Sign() <= 0) { - $s = -1; return [$ifaceNil, errors.New("x509: zero or negative DSA parameter")]; - } - $s = -1; return [pub$2, $ifaceNil]; - /* } else { */ case 6: - $s = -1; return [$ifaceNil, $ifaceNil]; - /* } */ case 7: - case 1: - $s = -1; return [$ifaceNil, $ifaceNil]; - /* */ } return; } var $f = {$blk: parsePublicKey, $c: true, $r, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _v, _v$1, _v$2, algo, der, keyData, namedCurve, namedCurveOID, p, paramsDer, paramsDer$1, paramsDer$24ptr, pub, pub$1, pub$2, x, y, y$1, $s};return $f; - }; - parseKeyUsageExtension = function(der) { - var der, der$24ptr, i, usage, usageBits, y; - usageBits = new asn1.BitString.ptr(sliceType$1.nil, 0); - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1BitString(usageBits)) { - return [0, errors.New("x509: invalid key usage")]; - } - usage = 0; - i = 0; - while (true) { - if (!(i < 9)) { break; } - if (!(($clone(usageBits, asn1.BitString).At(i) === 0))) { - usage = usage | (((y = ((i >>> 0)), y < 32 ? (1 << y) : 0) >> 0)); - } - i = i + (1) >> 0; - } - return [((usage >> 0)), $ifaceNil]; - }; - parseBasicConstraintsExtension = function(der) { - var {_r$1, der, isCA, maxPathLen, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - der = [der]; - isCA = [isCA]; - maxPathLen = [maxPathLen]; - isCA[0] = false; - if (!(der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1((der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))), 48)) { - $s = -1; return [false, 0, errors.New("x509: invalid basic constraints a")]; - } - if (der[0].PeekASN1Tag(1)) { - if (!(der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1Boolean((isCA.$ptr || (isCA.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, isCA))))) { - $s = -1; return [false, 0, errors.New("x509: invalid basic constraints b")]; - } - } - maxPathLen[0] = -1; - /* */ if (!der[0].Empty() && der[0].PeekASN1Tag(2)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!der[0].Empty() && der[0].PeekASN1Tag(2)) { */ case 1: - _r$1 = (der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1Integer((maxPathLen.$ptr || (maxPathLen.$ptr = new ptrType$16(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, maxPathLen)))); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r$1) { */ case 3: - $s = -1; return [false, 0, errors.New("x509: invalid basic constraints c")]; - /* } */ case 4: - /* } */ case 2: - $s = -1; return [isCA[0], maxPathLen[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: parseBasicConstraintsExtension, $c: true, $r, _r$1, der, isCA, maxPathLen, $s};return $f; - }; - forEachSAN = function(der, callback) { - var {_r$1, callback, der, err, san, tag, $s, $r, $c} = $restore(this, {der, callback}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - der = [der]; - if (!(der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadASN1((der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))), 48)) { - $s = -1; return errors.New("x509: invalid subject alternative names"); - } - /* while (true) { */ case 1: - /* if (!(!der[0].Empty())) { break; } */ if(!(!der[0].Empty())) { $s = 2; continue; } - san = [san]; - tag = [tag]; - san[0] = cryptobyte.String.nil; - tag[0] = 0; - if (!(der.$ptr || (der.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, der))).ReadAnyASN1((san.$ptr || (san.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, san))), (tag.$ptr || (tag.$ptr = new ptrType$24(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tag))))) { - $s = -1; return errors.New("x509: invalid subject alternative name"); - } - _r$1 = callback(((((tag[0] ^ 128) << 24 >>> 24) >> 0)), $convertSliceType(san[0], sliceType$1)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: forEachSAN, $c: true, $r, _r$1, callback, der, err, san, tag, $s};return $f; - }; - parseSANExtension = function(der) { - var {_r$1, der, dnsNames, emailAddresses, err, ipAddresses, uris, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dnsNames = [dnsNames]; - emailAddresses = [emailAddresses]; - ipAddresses = [ipAddresses]; - uris = [uris]; - dnsNames[0] = sliceType$4.nil; - emailAddresses[0] = sliceType$4.nil; - ipAddresses[0] = sliceType$18.nil; - uris[0] = sliceType$19.nil; - err = $ifaceNil; - _r$1 = forEachSAN(der, (function(dnsNames, emailAddresses, ipAddresses, uris) { return function $b(tag, data) { - var {$24r, $24r$1, _1, _2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, data, email, err$1, err$2, err$3, err$4, name, ok, tag, uri, uriStr, $s, $r, $c} = $restore(this, {tag, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = tag; - /* */ if (_1 === (1)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ if (_1 === (6)) { $s = 4; continue; } - /* */ if (_1 === (7)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (1)) { */ case 2: - email = ($bytesToString(data)); - _r$1 = isIA5String(email); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err$1 = _r$1; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return errors.New("x509: SAN rfc822Name is malformed"); - } - emailAddresses[0] = $append(emailAddresses[0], email); - $s = 6; continue; - /* } else if (_1 === (2)) { */ case 3: - name = ($bytesToString(data)); - _r$2 = isIA5String(name); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$2 = _r$2; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return errors.New("x509: SAN dNSName is malformed"); - } - dnsNames[0] = $append(dnsNames[0], (name)); - $s = 6; continue; - /* } else if (_1 === (6)) { */ case 4: - uriStr = ($bytesToString(data)); - _r$3 = isIA5String(uriStr); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$3 = _r$3; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return errors.New("x509: SAN uniformResourceIdentifier is malformed"); - } - _r$4 = url.Parse(uriStr); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - uri = _tuple[0]; - err$4 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 11: - _r$5 = fmt.Errorf("x509: cannot parse URI %q: %s", new sliceType$6([new $String(uriStr), err$4])); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 14; case 14: return $24r; - /* } */ case 12: - /* */ if (uri.Host.length > 0) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (uri.Host.length > 0) { */ case 15: - _tuple$1 = domainToReverseLabels(uri.Host); - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!ok) { */ case 17: - _r$6 = fmt.Errorf("x509: cannot parse URI %q: invalid domain", new sliceType$6([new $String(uriStr)])); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 20; case 20: return $24r$1; - /* } */ case 18: - /* } */ case 16: - uris[0] = $append(uris[0], uri); - $s = 6; continue; - /* } else if (_1 === (7)) { */ case 5: - _2 = data.$length; - if ((_2 === (4)) || (_2 === (16))) { - ipAddresses[0] = $append(ipAddresses[0], $convertSliceType(data, net.IP)); - } else { - $s = -1; return errors.New("x509: cannot parse IP address of length " + strconv.Itoa(data.$length)); - } - /* } */ case 6: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, _1, _2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, data, email, err$1, err$2, err$3, err$4, name, ok, tag, uri, uriStr, $s};return $f; - }; })(dnsNames, emailAddresses, ipAddresses, uris)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - $s = -1; return [dnsNames[0], emailAddresses[0], ipAddresses[0], uris[0], err]; - /* */ } return; } var $f = {$blk: parseSANExtension, $c: true, $r, _r$1, der, dnsNames, emailAddresses, err, ipAddresses, uris, $s};return $f; - }; - parseExtKeyUsageExtension = function(der) { - var _tuple, der, der$24ptr, eku, extKeyUsage, extKeyUsages, ok, unknownUsages; - extKeyUsages = sliceType$22.nil; - unknownUsages = sliceType$11.nil; - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))), 48)) { - return [sliceType$22.nil, sliceType$11.nil, errors.New("x509: invalid extended key usages")]; - } - while (true) { - if (!(!der.Empty())) { break; } - eku = [eku]; - eku[0] = asn1.ObjectIdentifier.nil; - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1ObjectIdentifier((eku.$ptr || (eku.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, eku))))) { - return [sliceType$22.nil, sliceType$11.nil, errors.New("x509: invalid extended key usages")]; - } - _tuple = extKeyUsageFromOID(eku[0]); - extKeyUsage = _tuple[0]; - ok = _tuple[1]; - if (ok) { - extKeyUsages = $append(extKeyUsages, extKeyUsage); - } else { - unknownUsages = $append(unknownUsages, eku[0]); - } - } - return [extKeyUsages, unknownUsages, $ifaceNil]; - }; - parseCertificatePoliciesExtension = function(der) { - var cp, der, der$24ptr, oid, oids; - oids = sliceType$11.nil; - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))), 48)) { - return [sliceType$11.nil, errors.New("x509: invalid certificate policies")]; - } - while (true) { - if (!(!der.Empty())) { break; } - cp = [cp]; - oid = [oid]; - cp[0] = cryptobyte.String.nil; - if (!(der$24ptr || (der$24ptr = new ptrType$23(function() { return der; }, function($v) { der = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((cp.$ptr || (cp.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, cp))), 48)) { - return [sliceType$11.nil, errors.New("x509: invalid certificate policies")]; - } - oid[0] = asn1.ObjectIdentifier.nil; - if (!(cp.$ptr || (cp.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, cp))).ReadASN1ObjectIdentifier((oid.$ptr || (oid.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, oid))))) { - return [sliceType$11.nil, errors.New("x509: invalid certificate policies")]; - } - oids = $append(oids, oid[0]); - } - return [oids, $ifaceNil]; - }; - isValidIPMask = function(mask) { - var _1, _i, _ref, b, mask, seenZero; - seenZero = false; - _ref = mask; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (seenZero) { - if (!((b === 0))) { - return false; - } - _i++; - continue; - } - _1 = b; - if ((_1 === (0)) || (_1 === (128)) || (_1 === (192)) || (_1 === (224)) || (_1 === (240)) || (_1 === (248)) || (_1 === (252)) || (_1 === (254))) { - seenZero = true; - } else if (_1 === (255)) { - } else { - return false; - } - _i++; - } - return true; - }; - parseNameConstraintsExtension = function(out, e) { - var {_r$1, _r$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, e, err, excluded, getValues, haveExcluded, havePermitted, out, outer, outer$24ptr, permitted, toplevel, unhandled, $s, $r, $c} = $restore(this, {out, e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - excluded = [excluded]; - haveExcluded = [haveExcluded]; - havePermitted = [havePermitted]; - permitted = [permitted]; - toplevel = [toplevel]; - unhandled = [unhandled]; - unhandled[0] = false; - err = $ifaceNil; - outer = ($convertSliceType(e.Value, cryptobyte.String)); - _tmp = cryptobyte.String.nil; - _tmp$1 = cryptobyte.String.nil; - _tmp$2 = cryptobyte.String.nil; - toplevel[0] = _tmp; - permitted[0] = _tmp$1; - excluded[0] = _tmp$2; - _tmp$3 = false; - _tmp$4 = false; - havePermitted[0] = _tmp$3; - haveExcluded[0] = _tmp$4; - if (!(outer$24ptr || (outer$24ptr = new ptrType$23(function() { return outer; }, function($v) { outer = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((toplevel.$ptr || (toplevel.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, toplevel))), 48) || !outer.Empty() || !(toplevel.$ptr || (toplevel.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, toplevel))).ReadOptionalASN1((permitted.$ptr || (permitted.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, permitted))), (havePermitted.$ptr || (havePermitted.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, havePermitted))), new asn1$1.Tag(new asn1$1.Tag(0).ContextSpecific()).Constructed()) || !(toplevel.$ptr || (toplevel.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, toplevel))).ReadOptionalASN1((excluded.$ptr || (excluded.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, excluded))), (haveExcluded.$ptr || (haveExcluded.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, haveExcluded))), new asn1$1.Tag(new asn1$1.Tag(1).ContextSpecific()).Constructed()) || !toplevel[0].Empty()) { - _tmp$5 = false; - _tmp$6 = errors.New("x509: invalid NameConstraints extension"); - unhandled[0] = _tmp$5; - err = _tmp$6; - $s = -1; return [unhandled[0], err]; - } - if (!havePermitted[0] && !haveExcluded[0] || (permitted[0].$length === 0) && (excluded[0].$length === 0)) { - _tmp$7 = false; - _tmp$8 = errors.New("x509: empty name constraints extension"); - unhandled[0] = _tmp$7; - err = _tmp$8; - $s = -1; return [unhandled[0], err]; - } - getValues = (function(excluded, haveExcluded, havePermitted, permitted, toplevel, unhandled) { return function $b(subtrees) { - var {$24r, $24r$1, $24r$10, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$70, _tmp$71, _tmp$72, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, constraint, dnsNames, dnsTag, domain, domain$1, domain$2, emailTag, emails, err$1, err$2, err$3, err$4, ip, ipTag, ips, l, mask, ok, ok$1, ok$2, ok$3, seq, subtrees, subtrees$24ptr, tag, trimmedDomain, trimmedDomain$1, uriDomains, uriTag, value, $s, $r, $c} = $restore(this, {subtrees}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dnsNames = sliceType$4.nil; - ips = sliceType$28.nil; - emails = sliceType$4.nil; - uriDomains = sliceType$4.nil; - err$1 = $ifaceNil; - /* while (true) { */ case 1: - /* if (!(!subtrees.Empty())) { break; } */ if(!(!subtrees.Empty())) { $s = 2; continue; } - seq = [seq]; - tag = [tag]; - value = [value]; - _tmp$9 = cryptobyte.String.nil; - _tmp$10 = cryptobyte.String.nil; - seq[0] = _tmp$9; - value[0] = _tmp$10; - tag[0] = 0; - /* */ if (!(subtrees$24ptr || (subtrees$24ptr = new ptrType$23(function() { return subtrees; }, function($v) { subtrees = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((seq.$ptr || (seq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))), 48) || !(seq.$ptr || (seq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))).ReadAnyASN1((value.$ptr || (value.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))), (tag.$ptr || (tag.$ptr = new ptrType$24(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tag))))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(subtrees$24ptr || (subtrees$24ptr = new ptrType$23(function() { return subtrees; }, function($v) { subtrees = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((seq.$ptr || (seq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))), 48) || !(seq.$ptr || (seq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, seq))).ReadAnyASN1((value.$ptr || (value.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, value))), (tag.$ptr || (tag.$ptr = new ptrType$24(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tag))))) { */ case 3: - _tmp$11 = sliceType$4.nil; - _tmp$12 = sliceType$28.nil; - _tmp$13 = sliceType$4.nil; - _tmp$14 = sliceType$4.nil; - _r$1 = fmt.Errorf("x509: invalid NameConstraints extension", new sliceType$6([])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$15 = _r$1; - dnsNames = _tmp$11; - ips = _tmp$12; - emails = _tmp$13; - uriDomains = _tmp$14; - err$1 = _tmp$15; - $24r = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 6; case 6: return $24r; - /* } */ case 4: - dnsTag = new asn1$1.Tag(2).ContextSpecific(); - emailTag = new asn1$1.Tag(1).ContextSpecific(); - ipTag = new asn1$1.Tag(7).ContextSpecific(); - uriTag = new asn1$1.Tag(6).ContextSpecific(); - _1 = tag[0]; - /* */ if (_1 === (dnsTag)) { $s = 8; continue; } - /* */ if (_1 === (ipTag)) { $s = 9; continue; } - /* */ if (_1 === (emailTag)) { $s = 10; continue; } - /* */ if (_1 === (uriTag)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_1 === (dnsTag)) { */ case 8: - domain = ($bytesToString(value[0])); - _r$2 = isIA5String(domain); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$2 = _r$2; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 15: - _tmp$16 = sliceType$4.nil; - _tmp$17 = sliceType$28.nil; - _tmp$18 = sliceType$4.nil; - _tmp$19 = sliceType$4.nil; - _r$3 = err$2.Error(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = errors.New("x509: invalid constraint value: " + _r$3); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tmp$20 = _r$4; - dnsNames = _tmp$16; - ips = _tmp$17; - emails = _tmp$18; - uriDomains = _tmp$19; - err$1 = _tmp$20; - $24r$1 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 19; case 19: return $24r$1; - /* } */ case 16: - trimmedDomain = domain; - if (trimmedDomain.length > 0 && (trimmedDomain.charCodeAt(0) === 46)) { - trimmedDomain = $substring(trimmedDomain, 1); - } - _tuple = domainToReverseLabels(trimmedDomain); - ok = _tuple[1]; - /* */ if (!ok) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!ok) { */ case 20: - _tmp$21 = sliceType$4.nil; - _tmp$22 = sliceType$28.nil; - _tmp$23 = sliceType$4.nil; - _tmp$24 = sliceType$4.nil; - _r$5 = fmt.Errorf("x509: failed to parse dnsName constraint %q", new sliceType$6([new $String(domain)])); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$25 = _r$5; - dnsNames = _tmp$21; - ips = _tmp$22; - emails = _tmp$23; - uriDomains = _tmp$24; - err$1 = _tmp$25; - $24r$2 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 23; case 23: return $24r$2; - /* } */ case 21: - dnsNames = $append(dnsNames, domain); - $s = 13; continue; - /* } else if (_1 === (ipTag)) { */ case 9: - l = value[0].$length; - _tmp$26 = sliceType$1.nil; - _tmp$27 = sliceType$1.nil; - ip = _tmp$26; - mask = _tmp$27; - _2 = l; - /* */ if (_2 === (8)) { $s = 25; continue; } - /* */ if (_2 === (32)) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_2 === (8)) { */ case 25: - ip = $convertSliceType($subslice(value[0], 0, 4), sliceType$1); - mask = $convertSliceType($subslice(value[0], 4), sliceType$1); - $s = 28; continue; - /* } else if (_2 === (32)) { */ case 26: - ip = $convertSliceType($subslice(value[0], 0, 16), sliceType$1); - mask = $convertSliceType($subslice(value[0], 16), sliceType$1); - $s = 28; continue; - /* } else { */ case 27: - _tmp$28 = sliceType$4.nil; - _tmp$29 = sliceType$28.nil; - _tmp$30 = sliceType$4.nil; - _tmp$31 = sliceType$4.nil; - _r$6 = fmt.Errorf("x509: IP constraint contained value of length %d", new sliceType$6([new $Int(l)])); /* */ $s = 29; case 29: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$32 = _r$6; - dnsNames = _tmp$28; - ips = _tmp$29; - emails = _tmp$30; - uriDomains = _tmp$31; - err$1 = _tmp$32; - $24r$3 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 30; case 30: return $24r$3; - /* } */ case 28: - case 24: - /* */ if (!isValidIPMask(mask)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!isValidIPMask(mask)) { */ case 31: - _tmp$33 = sliceType$4.nil; - _tmp$34 = sliceType$28.nil; - _tmp$35 = sliceType$4.nil; - _tmp$36 = sliceType$4.nil; - _r$7 = fmt.Errorf("x509: IP constraint contained invalid mask %x", new sliceType$6([mask])); /* */ $s = 33; case 33: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tmp$37 = _r$7; - dnsNames = _tmp$33; - ips = _tmp$34; - emails = _tmp$35; - uriDomains = _tmp$36; - err$1 = _tmp$37; - $24r$4 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 34; case 34: return $24r$4; - /* } */ case 32: - ips = $append(ips, new net.IPNet.ptr(($convertSliceType(ip, net.IP)), ($convertSliceType(mask, net.IPMask)))); - $s = 13; continue; - /* } else if (_1 === (emailTag)) { */ case 10: - constraint = ($bytesToString(value[0])); - _r$8 = isIA5String(constraint); /* */ $s = 35; case 35: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$3 = _r$8; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 36: - _tmp$38 = sliceType$4.nil; - _tmp$39 = sliceType$28.nil; - _tmp$40 = sliceType$4.nil; - _tmp$41 = sliceType$4.nil; - _r$9 = err$3.Error(); /* */ $s = 38; case 38: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = errors.New("x509: invalid constraint value: " + _r$9); /* */ $s = 39; case 39: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tmp$42 = _r$10; - dnsNames = _tmp$38; - ips = _tmp$39; - emails = _tmp$40; - uriDomains = _tmp$41; - err$1 = _tmp$42; - $24r$5 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 40; case 40: return $24r$5; - /* } */ case 37: - /* */ if (strings.Contains(constraint, "@")) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (strings.Contains(constraint, "@")) { */ case 41: - _tuple$1 = parseRFC2821Mailbox(constraint); - ok$1 = _tuple$1[1]; - /* */ if (!ok$1) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (!ok$1) { */ case 44: - _tmp$43 = sliceType$4.nil; - _tmp$44 = sliceType$28.nil; - _tmp$45 = sliceType$4.nil; - _tmp$46 = sliceType$4.nil; - _r$11 = fmt.Errorf("x509: failed to parse rfc822Name constraint %q", new sliceType$6([new $String(constraint)])); /* */ $s = 46; case 46: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tmp$47 = _r$11; - dnsNames = _tmp$43; - ips = _tmp$44; - emails = _tmp$45; - uriDomains = _tmp$46; - err$1 = _tmp$47; - $24r$6 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 47; case 47: return $24r$6; - /* } */ case 45: - $s = 43; continue; - /* } else { */ case 42: - domain$1 = constraint; - if (domain$1.length > 0 && (domain$1.charCodeAt(0) === 46)) { - domain$1 = $substring(domain$1, 1); - } - _tuple$2 = domainToReverseLabels(domain$1); - ok$2 = _tuple$2[1]; - /* */ if (!ok$2) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (!ok$2) { */ case 48: - _tmp$48 = sliceType$4.nil; - _tmp$49 = sliceType$28.nil; - _tmp$50 = sliceType$4.nil; - _tmp$51 = sliceType$4.nil; - _r$12 = fmt.Errorf("x509: failed to parse rfc822Name constraint %q", new sliceType$6([new $String(constraint)])); /* */ $s = 50; case 50: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tmp$52 = _r$12; - dnsNames = _tmp$48; - ips = _tmp$49; - emails = _tmp$50; - uriDomains = _tmp$51; - err$1 = _tmp$52; - $24r$7 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 51; case 51: return $24r$7; - /* } */ case 49: - /* } */ case 43: - emails = $append(emails, constraint); - $s = 13; continue; - /* } else if (_1 === (uriTag)) { */ case 11: - domain$2 = ($bytesToString(value[0])); - _r$13 = isIA5String(domain$2); /* */ $s = 52; case 52: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$4 = _r$13; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 53: - _tmp$53 = sliceType$4.nil; - _tmp$54 = sliceType$28.nil; - _tmp$55 = sliceType$4.nil; - _tmp$56 = sliceType$4.nil; - _r$14 = err$4.Error(); /* */ $s = 55; case 55: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = errors.New("x509: invalid constraint value: " + _r$14); /* */ $s = 56; case 56: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tmp$57 = _r$15; - dnsNames = _tmp$53; - ips = _tmp$54; - emails = _tmp$55; - uriDomains = _tmp$56; - err$1 = _tmp$57; - $24r$8 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 57; case 57: return $24r$8; - /* } */ case 54: - /* */ if (!(net.ParseIP(domain$2) === net.IP.nil)) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (!(net.ParseIP(domain$2) === net.IP.nil)) { */ case 58: - _tmp$58 = sliceType$4.nil; - _tmp$59 = sliceType$28.nil; - _tmp$60 = sliceType$4.nil; - _tmp$61 = sliceType$4.nil; - _r$16 = fmt.Errorf("x509: failed to parse URI constraint %q: cannot be IP address", new sliceType$6([new $String(domain$2)])); /* */ $s = 60; case 60: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tmp$62 = _r$16; - dnsNames = _tmp$58; - ips = _tmp$59; - emails = _tmp$60; - uriDomains = _tmp$61; - err$1 = _tmp$62; - $24r$9 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 61; case 61: return $24r$9; - /* } */ case 59: - trimmedDomain$1 = domain$2; - if (trimmedDomain$1.length > 0 && (trimmedDomain$1.charCodeAt(0) === 46)) { - trimmedDomain$1 = $substring(trimmedDomain$1, 1); - } - _tuple$3 = domainToReverseLabels(trimmedDomain$1); - ok$3 = _tuple$3[1]; - /* */ if (!ok$3) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (!ok$3) { */ case 62: - _tmp$63 = sliceType$4.nil; - _tmp$64 = sliceType$28.nil; - _tmp$65 = sliceType$4.nil; - _tmp$66 = sliceType$4.nil; - _r$17 = fmt.Errorf("x509: failed to parse URI constraint %q", new sliceType$6([new $String(domain$2)])); /* */ $s = 64; case 64: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tmp$67 = _r$17; - dnsNames = _tmp$63; - ips = _tmp$64; - emails = _tmp$65; - uriDomains = _tmp$66; - err$1 = _tmp$67; - $24r$10 = [dnsNames, ips, emails, uriDomains, err$1]; - $s = 65; case 65: return $24r$10; - /* } */ case 63: - uriDomains = $append(uriDomains, domain$2); - $s = 13; continue; - /* } else { */ case 12: - unhandled[0] = true; - /* } */ case 13: - case 7: - $s = 1; continue; - case 2: - _tmp$68 = dnsNames; - _tmp$69 = ips; - _tmp$70 = emails; - _tmp$71 = uriDomains; - _tmp$72 = $ifaceNil; - dnsNames = _tmp$68; - ips = _tmp$69; - emails = _tmp$70; - uriDomains = _tmp$71; - err$1 = _tmp$72; - $s = -1; return [dnsNames, ips, emails, uriDomains, err$1]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$10, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$44, _tmp$45, _tmp$46, _tmp$47, _tmp$48, _tmp$49, _tmp$50, _tmp$51, _tmp$52, _tmp$53, _tmp$54, _tmp$55, _tmp$56, _tmp$57, _tmp$58, _tmp$59, _tmp$60, _tmp$61, _tmp$62, _tmp$63, _tmp$64, _tmp$65, _tmp$66, _tmp$67, _tmp$68, _tmp$69, _tmp$70, _tmp$71, _tmp$72, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, constraint, dnsNames, dnsTag, domain, domain$1, domain$2, emailTag, emails, err$1, err$2, err$3, err$4, ip, ipTag, ips, l, mask, ok, ok$1, ok$2, ok$3, seq, subtrees, subtrees$24ptr, tag, trimmedDomain, trimmedDomain$1, uriDomains, uriTag, value, $s};return $f; - }; })(excluded, haveExcluded, havePermitted, permitted, toplevel, unhandled); - _r$1 = getValues(permitted[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - out.PermittedDNSDomains = _tuple[0]; - out.PermittedIPRanges = _tuple[1]; - out.PermittedEmailAddresses = _tuple[2]; - out.PermittedURIDomains = _tuple[3]; - err = _tuple[4]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$9 = false; - _tmp$10 = err; - unhandled[0] = _tmp$9; - err = _tmp$10; - $s = -1; return [unhandled[0], err]; - } - _r$2 = getValues(excluded[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - out.ExcludedDNSDomains = _tuple$1[0]; - out.ExcludedIPRanges = _tuple$1[1]; - out.ExcludedEmailAddresses = _tuple$1[2]; - out.ExcludedURIDomains = _tuple$1[3]; - err = _tuple$1[4]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$11 = false; - _tmp$12 = err; - unhandled[0] = _tmp$11; - err = _tmp$12; - $s = -1; return [unhandled[0], err]; - } - out.PermittedDNSDomainsCritical = e.Critical; - _tmp$13 = unhandled[0]; - _tmp$14 = $ifaceNil; - unhandled[0] = _tmp$13; - err = _tmp$14; - $s = -1; return [unhandled[0], err]; - /* */ } return; } var $f = {$blk: parseNameConstraintsExtension, $c: true, $r, _r$1, _r$2, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, e, err, excluded, getValues, haveExcluded, havePermitted, out, outer, outer$24ptr, permitted, toplevel, unhandled, $s};return $f; - }; - processExtensions = function(out) { - var {_1, _i, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, aiaDER, akid, dpDER, dpNameDER, dpNamePresent, e, err, method, out, skid, unhandled, uri, val, val$1, val$2, val$24ptr, val$24ptr$1, val$3, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - _ref = out.Extensions; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - akid = [akid]; - skid = [skid]; - val = [val]; - val$1 = [val$1]; - e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pkix.Extension); - unhandled = false; - /* */ if ((e.Id.$length === 4) && ((x = e.Id, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 2) && ((x$1 = e.Id, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) === 5) && ((x$2 = e.Id, (2 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 2])) === 29)) { $s = 3; continue; } - /* */ if (e.Id.Equal($convertSliceType(oidExtensionAuthorityInfoAccess, asn1.ObjectIdentifier))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((e.Id.$length === 4) && ((x = e.Id, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 2) && ((x$1 = e.Id, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) === 5) && ((x$2 = e.Id, (2 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 2])) === 29)) { */ case 3: - _1 = (x$3 = e.Id, (3 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 3])); - /* */ if (_1 === (15)) { $s = 8; continue; } - /* */ if (_1 === (19)) { $s = 9; continue; } - /* */ if (_1 === (17)) { $s = 10; continue; } - /* */ if (_1 === (30)) { $s = 11; continue; } - /* */ if (_1 === (31)) { $s = 12; continue; } - /* */ if (_1 === (35)) { $s = 13; continue; } - /* */ if (_1 === (37)) { $s = 14; continue; } - /* */ if (_1 === (14)) { $s = 15; continue; } - /* */ if (_1 === (32)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_1 === (15)) { */ case 8: - _tuple = parseKeyUsageExtension($convertSliceType(e.Value, cryptobyte.String)); - out.KeyUsage = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 18; continue; - /* } else if (_1 === (19)) { */ case 9: - _r$1 = parseBasicConstraintsExtension($convertSliceType(e.Value, cryptobyte.String)); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - out.IsCA = _tuple$1[0]; - out.MaxPathLen = _tuple$1[1]; - err = _tuple$1[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - out.BasicConstraintsValid = true; - out.MaxPathLenZero = out.MaxPathLen === 0; - $s = 18; continue; - /* } else if (_1 === (17)) { */ case 10: - _r$2 = parseSANExtension($convertSliceType(e.Value, cryptobyte.String)); /* */ $s = 20; case 20: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - out.DNSNames = _tuple$2[0]; - out.EmailAddresses = _tuple$2[1]; - out.IPAddresses = _tuple$2[2]; - out.URIs = _tuple$2[3]; - err = _tuple$2[4]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if ((out.DNSNames.$length === 0) && (out.EmailAddresses.$length === 0) && (out.IPAddresses.$length === 0) && (out.URIs.$length === 0)) { - unhandled = true; - } - $s = 18; continue; - /* } else if (_1 === (30)) { */ case 11: - _r$3 = parseNameConstraintsExtension(out, $clone(e, pkix.Extension)); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$3 = _r$3; - unhandled = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 18; continue; - /* } else if (_1 === (31)) { */ case 12: - val[0] = ($convertSliceType(e.Value, cryptobyte.String)); - if (!(val.$ptr || (val.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, val))).ReadASN1((val.$ptr || (val.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, val))), 48)) { - $s = -1; return errors.New("x509: invalid CRL distribution points"); - } - while (true) { - if (!(!val[0].Empty())) { break; } - dpDER = [dpDER]; - dpNameDER = [dpNameDER]; - dpNamePresent = [dpNamePresent]; - dpDER[0] = cryptobyte.String.nil; - if (!(val.$ptr || (val.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, val))).ReadASN1((dpDER.$ptr || (dpDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpDER))), 48)) { - $s = -1; return errors.New("x509: invalid CRL distribution point"); - } - dpNameDER[0] = cryptobyte.String.nil; - dpNamePresent[0] = false; - if (!(dpDER.$ptr || (dpDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpDER))).ReadOptionalASN1((dpNameDER.$ptr || (dpNameDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpNameDER))), (dpNamePresent.$ptr || (dpNamePresent.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpNamePresent))), new asn1$1.Tag(new asn1$1.Tag(0).Constructed()).ContextSpecific())) { - $s = -1; return errors.New("x509: invalid CRL distribution point"); - } - if (!dpNamePresent[0]) { - continue; - } - if (!(dpNameDER.$ptr || (dpNameDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpNameDER))).ReadASN1((dpNameDER.$ptr || (dpNameDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpNameDER))), new asn1$1.Tag(new asn1$1.Tag(0).Constructed()).ContextSpecific())) { - $s = -1; return errors.New("x509: invalid CRL distribution point"); - } - while (true) { - if (!(!dpNameDER[0].Empty())) { break; } - uri = [uri]; - if (!dpNameDER[0].PeekASN1Tag(new asn1$1.Tag(6).ContextSpecific())) { - break; - } - uri[0] = cryptobyte.String.nil; - if (!(dpNameDER.$ptr || (dpNameDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, dpNameDER))).ReadASN1((uri.$ptr || (uri.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, uri))), new asn1$1.Tag(6).ContextSpecific())) { - $s = -1; return errors.New("x509: invalid CRL distribution point"); - } - out.CRLDistributionPoints = $append(out.CRLDistributionPoints, ($bytesToString(uri[0]))); - } - } - $s = 18; continue; - /* } else if (_1 === (35)) { */ case 13: - val$2 = ($convertSliceType(e.Value, cryptobyte.String)); - akid[0] = cryptobyte.String.nil; - if (!(val$24ptr || (val$24ptr = new ptrType$23(function() { return val$2; }, function($v) { val$2 = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((akid.$ptr || (akid.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, akid))), 48)) { - $s = -1; return errors.New("x509: invalid authority key identifier"); - } - if (akid[0].PeekASN1Tag(new asn1$1.Tag(0).ContextSpecific())) { - if (!(akid.$ptr || (akid.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, akid))).ReadASN1((akid.$ptr || (akid.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, akid))), new asn1$1.Tag(0).ContextSpecific())) { - $s = -1; return errors.New("x509: invalid authority key identifier"); - } - out.AuthorityKeyId = $convertSliceType(akid[0], sliceType$1); - } - $s = 18; continue; - /* } else if (_1 === (37)) { */ case 14: - _tuple$4 = parseExtKeyUsageExtension($convertSliceType(e.Value, cryptobyte.String)); - out.ExtKeyUsage = _tuple$4[0]; - out.UnknownExtKeyUsage = _tuple$4[1]; - err = _tuple$4[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 18; continue; - /* } else if (_1 === (14)) { */ case 15: - val$3 = ($convertSliceType(e.Value, cryptobyte.String)); - skid[0] = cryptobyte.String.nil; - if (!(val$24ptr$1 || (val$24ptr$1 = new ptrType$23(function() { return val$3; }, function($v) { val$3 = $convertSliceType($v, cryptobyte.String); }))).ReadASN1((skid.$ptr || (skid.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, skid))), 4)) { - $s = -1; return errors.New("x509: invalid subject key identifier"); - } - out.SubjectKeyId = $convertSliceType(skid[0], sliceType$1); - $s = 18; continue; - /* } else if (_1 === (32)) { */ case 16: - _tuple$5 = parseCertificatePoliciesExtension($convertSliceType(e.Value, cryptobyte.String)); - out.PolicyIdentifiers = _tuple$5[0]; - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 18; continue; - /* } else { */ case 17: - unhandled = true; - /* } */ case 18: - case 7: - $s = 6; continue; - /* } else if (e.Id.Equal($convertSliceType(oidExtensionAuthorityInfoAccess, asn1.ObjectIdentifier))) { */ case 4: - val$1[0] = ($convertSliceType(e.Value, cryptobyte.String)); - if (!(val$1.$ptr || (val$1.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, val$1))).ReadASN1((val$1.$ptr || (val$1.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, val$1))), 48)) { - $s = -1; return errors.New("x509: invalid authority info access"); - } - while (true) { - if (!(!val$1[0].Empty())) { break; } - aiaDER = [aiaDER]; - method = [method]; - aiaDER[0] = cryptobyte.String.nil; - if (!(val$1.$ptr || (val$1.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, val$1))).ReadASN1((aiaDER.$ptr || (aiaDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, aiaDER))), 48)) { - $s = -1; return errors.New("x509: invalid authority info access"); - } - method[0] = asn1.ObjectIdentifier.nil; - if (!(aiaDER.$ptr || (aiaDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, aiaDER))).ReadASN1ObjectIdentifier((method.$ptr || (method.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, method))))) { - $s = -1; return errors.New("x509: invalid authority info access"); - } - if (!aiaDER[0].PeekASN1Tag(new asn1$1.Tag(6).ContextSpecific())) { - continue; - } - if (!(aiaDER.$ptr || (aiaDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, aiaDER))).ReadASN1((aiaDER.$ptr || (aiaDER.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, aiaDER))), new asn1$1.Tag(6).ContextSpecific())) { - $s = -1; return errors.New("x509: invalid authority info access"); - } - if (method[0].Equal(oidAuthorityInfoAccessOcsp)) { - out.OCSPServer = $append(out.OCSPServer, ($bytesToString(aiaDER[0]))); - } else if (method[0].Equal(oidAuthorityInfoAccessIssuers)) { - out.IssuingCertificateURL = $append(out.IssuingCertificateURL, ($bytesToString(aiaDER[0]))); - } - } - $s = 6; continue; - /* } else { */ case 5: - unhandled = true; - /* } */ case 6: - if (e.Critical && unhandled) { - out.UnhandledCriticalExtensions = $append(out.UnhandledCriticalExtensions, e.Id); - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: processExtensions, $c: true, $r, _1, _i, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, aiaDER, akid, dpDER, dpNameDER, dpNamePresent, e, err, method, out, skid, unhandled, uri, val, val$1, val$2, val$24ptr, val$24ptr$1, val$3, x, x$1, x$2, x$3, $s};return $f; - }; - parseCertificate = function(der) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, cert, der, err, err$1, ext, extension, extensions, input, issuerRDNs, issuerSeq, outerSigAISeq, pkAI, pkAISeq, present, serial, sigAI, sigAISeq, signature, spk, spki, subjectRDNs, subjectSeq, tbs, validity$1, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - extensions = [extensions]; - input = [input]; - issuerSeq = [issuerSeq]; - outerSigAISeq = [outerSigAISeq]; - pkAISeq = [pkAISeq]; - present = [present]; - sigAISeq = [sigAISeq]; - signature = [signature]; - spk = [spk]; - spki = [spki]; - subjectSeq = [subjectSeq]; - tbs = [tbs]; - validity$1 = [validity$1]; - cert = new Certificate.ptr(sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, sliceType$1.nil, 0, 0, $ifaceNil, 0, ptrType$1.nil, new pkix.Name.ptr(sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, "", "", sliceType$15.nil, sliceType$15.nil), new pkix.Name.ptr(sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, "", "", sliceType$15.nil, sliceType$15.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), 0, sliceType$8.nil, sliceType$8.nil, sliceType$11.nil, sliceType$22.nil, sliceType$11.nil, false, false, 0, false, sliceType$1.nil, sliceType$1.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$18.nil, sliceType$19.nil, false, sliceType$4.nil, sliceType$4.nil, sliceType$28.nil, sliceType$28.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$4.nil, sliceType$11.nil); - input[0] = ($convertSliceType(der, cryptobyte.String)); - if (!(input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))).ReadASN1Element((input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed certificate")]; - } - cert.Raw = $convertSliceType(input[0], sliceType$1); - if (!(input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))).ReadASN1((input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed certificate")]; - } - tbs[0] = cryptobyte.String.nil; - if (!(input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))).ReadASN1Element((tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed tbs certificate")]; - } - cert.RawTBSCertificate = $convertSliceType(tbs[0], sliceType$1); - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1((tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed tbs certificate")]; - } - _r$1 = (tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadOptionalASN1Integer((cert.$ptr_Version || (cert.$ptr_Version = new ptrType$16(function() { return this.$target.Version; }, function($v) { this.$target.Version = $v; }, cert))), new asn1$1.Tag(new asn1$1.Tag(0).Constructed()).ContextSpecific(), new $Int(0)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$1) { */ case 1: - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed version")]; - /* } */ case 2: - if (cert.Version < 0) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed version")]; - } - cert.Version = cert.Version + (1) >> 0; - if (cert.Version > 3) { - $s = -1; return [ptrType$4.nil, errors.New("x509: invalid version")]; - } - serial = new big.Int.ptr(false, big.nat.nil); - _r$2 = (tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1Integer(serial); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!_r$2) { */ case 4: - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed serial number")]; - /* } */ case 5: - cert.SerialNumber = serial; - sigAISeq[0] = cryptobyte.String.nil; - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1((sigAISeq.$ptr || (sigAISeq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAISeq))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed signature algorithm identifier")]; - } - outerSigAISeq[0] = cryptobyte.String.nil; - if (!(input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))).ReadASN1((outerSigAISeq.$ptr || (outerSigAISeq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, outerSigAISeq))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed algorithm identifier")]; - } - if (!bytes.Equal($convertSliceType(outerSigAISeq[0], sliceType$1), $convertSliceType(sigAISeq[0], sliceType$1))) { - $s = -1; return [ptrType$4.nil, errors.New("x509: inner and outer signature algorithm identifiers don't match")]; - } - _tuple = parseAI(sigAISeq[0]); - sigAI = $clone(_tuple[0], pkix.AlgorithmIdentifier); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - _r$3 = getSignatureAlgorithmFromAI($clone(sigAI, pkix.AlgorithmIdentifier)); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - cert.SignatureAlgorithm = _r$3; - issuerSeq[0] = cryptobyte.String.nil; - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1Element((issuerSeq.$ptr || (issuerSeq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, issuerSeq))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed issuer")]; - } - cert.RawIssuer = $convertSliceType(issuerSeq[0], sliceType$1); - _r$4 = parseName(issuerSeq[0]); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - issuerRDNs = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - cert.Issuer.FillFromRDNSequence(issuerRDNs); - validity$1[0] = cryptobyte.String.nil; - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1((validity$1.$ptr || (validity$1.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, validity$1))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed validity")]; - } - _r$5 = parseValidity(validity$1[0]); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - time.Time.copy(cert.NotBefore, _tuple$2[0]); - time.Time.copy(cert.NotAfter, _tuple$2[1]); - err = _tuple$2[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - subjectSeq[0] = cryptobyte.String.nil; - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1Element((subjectSeq.$ptr || (subjectSeq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, subjectSeq))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed issuer")]; - } - cert.RawSubject = $convertSliceType(subjectSeq[0], sliceType$1); - _r$6 = parseName(subjectSeq[0]); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$3 = _r$6; - subjectRDNs = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - cert.Subject.FillFromRDNSequence(subjectRDNs); - spki[0] = cryptobyte.String.nil; - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadASN1Element((spki.$ptr || (spki.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, spki))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed spki")]; - } - cert.RawSubjectPublicKeyInfo = $convertSliceType(spki[0], sliceType$1); - if (!(spki.$ptr || (spki.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, spki))).ReadASN1((spki.$ptr || (spki.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, spki))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed spki")]; - } - pkAISeq[0] = cryptobyte.String.nil; - if (!(spki.$ptr || (spki.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, spki))).ReadASN1((pkAISeq.$ptr || (pkAISeq.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, pkAISeq))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed public key algorithm identifier")]; - } - _tuple$4 = parseAI(pkAISeq[0]); - pkAI = $clone(_tuple$4[0], pkix.AlgorithmIdentifier); - err = _tuple$4[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - cert.PublicKeyAlgorithm = getPublicKeyAlgorithmFromOID(pkAI.Algorithm); - spk[0] = new asn1.BitString.ptr(sliceType$1.nil, 0); - if (!(spki.$ptr || (spki.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, spki))).ReadASN1BitString(spk[0])) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed subjectPublicKey")]; - } - _r$7 = parsePublicKey(cert.PublicKeyAlgorithm, new publicKeyInfo.ptr(asn1.RawContent.nil, $clone(pkAI, pkix.AlgorithmIdentifier), $clone(spk[0], asn1.BitString))); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$5 = _r$7; - cert.PublicKey = _tuple$5[0]; - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - /* */ if (cert.Version > 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (cert.Version > 1) { */ case 12: - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).SkipOptionalASN1(new asn1$1.Tag(1).ContextSpecific())) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed issuerUniqueID")]; - } - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).SkipOptionalASN1(new asn1$1.Tag(2).ContextSpecific())) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed subjectUniqueID")]; - } - /* */ if (cert.Version === 3) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (cert.Version === 3) { */ case 14: - extensions[0] = cryptobyte.String.nil; - present[0] = false; - if (!(tbs.$ptr || (tbs.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, tbs))).ReadOptionalASN1((extensions.$ptr || (extensions.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))), (present.$ptr || (present.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, present))), new asn1$1.Tag(new asn1$1.Tag(3).Constructed()).ContextSpecific())) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed extensions")]; - } - /* */ if (present[0]) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (present[0]) { */ case 16: - if (!(extensions.$ptr || (extensions.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))).ReadASN1((extensions.$ptr || (extensions.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed extensions")]; - } - while (true) { - if (!(!extensions[0].Empty())) { break; } - extension = [extension]; - extension[0] = cryptobyte.String.nil; - if (!(extensions.$ptr || (extensions.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))).ReadASN1((extension.$ptr || (extension.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension))), 48)) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed extension")]; - } - _tuple$6 = parseExtension(extension[0]); - ext = $clone(_tuple$6[0], pkix.Extension); - err$1 = _tuple$6[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err$1]; - } - cert.Extensions = $append(cert.Extensions, ext); - } - _r$8 = processExtensions(cert); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - /* } */ case 17: - /* } */ case 15: - /* } */ case 13: - signature[0] = new asn1.BitString.ptr(sliceType$1.nil, 0); - if (!(input.$ptr || (input.$ptr = new ptrType$23(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, input))).ReadASN1BitString(signature[0])) { - $s = -1; return [ptrType$4.nil, errors.New("x509: malformed signature")]; - } - cert.Signature = $clone(signature[0], asn1.BitString).RightAlign(); - $s = -1; return [cert, $ifaceNil]; - /* */ } return; } var $f = {$blk: parseCertificate, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, cert, der, err, err$1, ext, extension, extensions, input, issuerRDNs, issuerSeq, outerSigAISeq, pkAI, pkAISeq, present, serial, sigAI, sigAISeq, signature, spk, spki, subjectRDNs, subjectSeq, tbs, validity$1, $s};return $f; - }; - ParseCertificate = function(der) { - var {_r$1, _tuple, cert, der, err, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = parseCertificate(der); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cert = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$4.nil, err]; - } - if (!((der.$length === cert.Raw.$length))) { - $s = -1; return [ptrType$4.nil, errors.New("x509: trailing data")]; - } - $s = -1; return [cert, err]; - /* */ } return; } var $f = {$blk: ParseCertificate, $c: true, $r, _r$1, _tuple, cert, der, err, $s};return $f; - }; - $pkg.ParseCertificate = ParseCertificate; - NewCertPool = function() { - return new CertPool.ptr({}, sliceType$29.nil, {}, false); - }; - $pkg.NewCertPool = NewCertPool; - CertPool.ptr.prototype.len = function() { - var s; - s = this; - if (s === ptrType.nil) { - return 0; - } - return s.lazyCerts.$length; - }; - CertPool.prototype.len = function() { return this.$val.len(); }; - CertPool.ptr.prototype.cert = function(n) { - var {$24r, _r$1, n, s, x, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r$1 = (x = s.lazyCerts, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])).getCert(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: CertPool.ptr.prototype.cert, $c: true, $r, $24r, _r$1, n, s, x, $s};return $f; - }; - CertPool.prototype.cert = function(n) { return this.$val.cert(n); }; - CertPool.ptr.prototype.findPotentialParents = function(cert) { - var {_entry, _i, _r$1, _ref, _tmp, _tmp$1, _tmp$2, _tuple, c, candidate, candidates, cert, err, found, kidMatch, matchingKeyID, mismatchKeyID, oneKeyID, s, $s, $r, $c} = $restore(this, {cert}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (s === ptrType.nil) { - $s = -1; return sliceType$20.nil; - } - _tmp = sliceType$20.nil; - _tmp$1 = sliceType$20.nil; - _tmp$2 = sliceType$20.nil; - matchingKeyID = _tmp; - oneKeyID = _tmp$1; - mismatchKeyID = _tmp$2; - _ref = (_entry = s.byName[$String.keyFor(($bytesToString(cert.RawIssuer)))], _entry !== undefined ? _entry.v : sliceType$3.nil); - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = s.cert(c); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - candidate = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _i++; - /* continue; */ $s = 1; continue; - } - kidMatch = bytes.Equal(candidate.SubjectKeyId, cert.AuthorityKeyId); - if (kidMatch) { - matchingKeyID = $append(matchingKeyID, candidate); - } else if (((candidate.SubjectKeyId.$length === 0) && cert.AuthorityKeyId.$length > 0) || (candidate.SubjectKeyId.$length > 0 && (cert.AuthorityKeyId.$length === 0))) { - oneKeyID = $append(oneKeyID, candidate); - } else { - mismatchKeyID = $append(mismatchKeyID, candidate); - } - _i++; - $s = 1; continue; - case 2: - found = (matchingKeyID.$length + oneKeyID.$length >> 0) + mismatchKeyID.$length >> 0; - if (found === 0) { - $s = -1; return sliceType$20.nil; - } - candidates = $makeSlice(sliceType$20, 0, found); - candidates = $appendSlice(candidates, matchingKeyID); - candidates = $appendSlice(candidates, oneKeyID); - candidates = $appendSlice(candidates, mismatchKeyID); - $s = -1; return candidates; - /* */ } return; } var $f = {$blk: CertPool.ptr.prototype.findPotentialParents, $c: true, $r, _entry, _i, _r$1, _ref, _tmp, _tmp$1, _tmp$2, _tuple, c, candidate, candidates, cert, err, found, kidMatch, matchingKeyID, mismatchKeyID, oneKeyID, s, $s};return $f; - }; - CertPool.prototype.findPotentialParents = function(cert) { return this.$val.findPotentialParents(cert); }; - CertPool.ptr.prototype.contains = function(cert) { - var _entry, cert, s; - s = this; - if (s === ptrType.nil) { - return false; - } - return (_entry = s.haveSum[sum224.keyFor(sha256.Sum224(cert.Raw))], _entry !== undefined ? _entry.v : false); - }; - CertPool.prototype.contains = function(cert) { return this.$val.contains(cert); }; - CertPool.ptr.prototype.AddCert = function(cert) { - var cert, s; - s = this; - if (cert === ptrType$4.nil) { - $panic(new $String("adding nil Certificate to CertPool")); - } - s.addCertFunc($clone(sha256.Sum224(cert.Raw), sum224), ($bytesToString(cert.RawSubject)), (function() { - return [cert, $ifaceNil]; - })); - }; - CertPool.prototype.AddCert = function(cert) { return this.$val.AddCert(cert); }; - CertPool.ptr.prototype.addCertFunc = function(rawSum224, rawSubject, getCert) { - var _entry, _entry$1, _key, _key$1, getCert, rawSubject, rawSum224, s; - s = this; - if (getCert === $throwNilPointerError) { - $panic(new $String("getCert can't be nil")); - } - if ((_entry = s.haveSum[sum224.keyFor(rawSum224)], _entry !== undefined ? _entry.v : false)) { - return; - } - _key = $clone(rawSum224, sum224); (s.haveSum || $throwRuntimeError("assignment to entry in nil map"))[sum224.keyFor(_key)] = { k: _key, v: true }; - s.lazyCerts = $append(s.lazyCerts, new lazyCert.ptr((new sliceType$1($stringToBytes(rawSubject))), getCert)); - _key$1 = rawSubject; (s.byName || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$1 = s.byName[$String.keyFor(rawSubject)], _entry$1 !== undefined ? _entry$1.v : sliceType$3.nil), s.lazyCerts.$length - 1 >> 0) }; - }; - CertPool.prototype.addCertFunc = function(rawSum224, rawSubject, getCert) { return this.$val.addCertFunc(rawSum224, rawSubject, getCert); }; - CertPool.ptr.prototype.AppendCertsFromPEM = function(pemCerts) { - var {_r$1, _r$2, _tuple, _tuple$1, block, cert, certBytes, err, lazyCert$1, ok, pemCerts, s, $s, $r, $c} = $restore(this, {pemCerts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ok = false; - s = this; - /* while (true) { */ case 1: - /* if (!(pemCerts.$length > 0)) { break; } */ if(!(pemCerts.$length > 0)) { $s = 2; continue; } - certBytes = [certBytes]; - lazyCert$1 = [lazyCert$1]; - block = ptrType$8.nil; - _r$1 = pem.Decode(pemCerts); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - block = _tuple[0]; - pemCerts = _tuple[1]; - if (block === ptrType$8.nil) { - /* break; */ $s = 2; continue; - } - if (!(block.Type === "CERTIFICATE") || !(($keys(block.Headers).length === 0))) { - /* continue; */ $s = 1; continue; - } - certBytes[0] = block.Bytes; - _r$2 = ParseCertificate(certBytes[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - cert = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* continue; */ $s = 1; continue; - } - lazyCert$1[0] = new structType$3.ptr(new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), ptrType$4.nil); - s.addCertFunc($clone(sha256.Sum224(cert.Raw), sum224), ($bytesToString(cert.RawSubject)), (function(certBytes, lazyCert$1) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = lazyCert$1[0].Once.Do((function(certBytes, lazyCert$1) { return function $b() { - var {_r$3, _tuple$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = ParseCertificate(certBytes[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - lazyCert$1[0].v = _tuple$2[0]; - certBytes[0] = sliceType$1.nil; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$3, _tuple$2, $s};return $f; - }; })(certBytes, lazyCert$1)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [lazyCert$1[0].v, $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(certBytes, lazyCert$1)); - ok = true; - $s = 1; continue; - case 2: - ok = ok; - $s = -1; return ok; - /* */ } return; } var $f = {$blk: CertPool.ptr.prototype.AppendCertsFromPEM, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, block, cert, certBytes, err, lazyCert$1, ok, pemCerts, s, $s};return $f; - }; - CertPool.prototype.AppendCertsFromPEM = function(pemCerts) { return this.$val.AppendCertsFromPEM(pemCerts); }; - CertPool.ptr.prototype.Subjects = function() { - var _i, _ref, i, lc, res, s; - s = this; - res = $makeSlice(sliceType$30, s.len()); - _ref = s.lazyCerts; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - lc = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), lazyCert); - ((i < 0 || i >= res.$length) ? ($throwRuntimeError("index out of range"), undefined) : res.$array[res.$offset + i] = lc.rawSubject); - _i++; - } - return res; - }; - CertPool.prototype.Subjects = function() { return this.$val.Subjects(); }; - SignatureAlgorithm.methods = [{prop: "isRSAPSS", name: "isRSAPSS", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - PublicKeyAlgorithm.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$4.methods = [{prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "hasSANExtension", name: "hasSANExtension", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "CheckSignatureFrom", name: "CheckSignatureFrom", pkg: "", typ: $funcType([ptrType$4], [$error], false)}, {prop: "CheckSignature", name: "CheckSignature", pkg: "", typ: $funcType([SignatureAlgorithm, sliceType$1, sliceType$1], [$error], false)}, {prop: "hasNameConstraints", name: "hasNameConstraints", pkg: "crypto/x509", typ: $funcType([], [$Bool], false)}, {prop: "getSANExtension", name: "getSANExtension", pkg: "crypto/x509", typ: $funcType([], [sliceType$1], false)}, {prop: "CheckCRLSignature", name: "CheckCRLSignature", pkg: "", typ: $funcType([ptrType$9], [$error], false)}, {prop: "CreateCRL", name: "CreateCRL", pkg: "", typ: $funcType([io.Reader, $emptyInterface, sliceType$13, time.Time, time.Time], [sliceType$1, $error], false)}, {prop: "checkNameConstraints", name: "checkNameConstraints", pkg: "crypto/x509", typ: $funcType([ptrType$16, $Int, $String, $String, $emptyInterface, funcType, $emptyInterface, $emptyInterface], [$error], false)}, {prop: "isValid", name: "isValid", pkg: "crypto/x509", typ: $funcType([$Int, sliceType$20, ptrType$25], [$error], false)}, {prop: "Verify", name: "Verify", pkg: "", typ: $funcType([VerifyOptions], [sliceType$21, $error], false)}, {prop: "buildChains", name: "buildChains", pkg: "crypto/x509", typ: $funcType([mapType, sliceType$20, ptrType$16, ptrType$25], [sliceType$21, $error], false)}, {prop: "VerifyHostname", name: "VerifyHostname", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "systemVerify", name: "systemVerify", pkg: "crypto/x509", typ: $funcType([ptrType$25], [sliceType$21, $error], false)}]; - InsecureAlgorithmError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ConstraintViolationError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - UnhandledCriticalExtension.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - CertificateInvalidError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - HostnameError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - UnknownAuthorityError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - SystemRootsError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType.methods = [{prop: "len", name: "len", pkg: "crypto/x509", typ: $funcType([], [$Int], false)}, {prop: "cert", name: "cert", pkg: "crypto/x509", typ: $funcType([$Int], [ptrType$4, $error], false)}, {prop: "copy", name: "copy", pkg: "crypto/x509", typ: $funcType([], [ptrType], false)}, {prop: "findPotentialParents", name: "findPotentialParents", pkg: "crypto/x509", typ: $funcType([ptrType$4], [sliceType$20], false)}, {prop: "contains", name: "contains", pkg: "crypto/x509", typ: $funcType([ptrType$4], [$Bool], false)}, {prop: "AddCert", name: "AddCert", pkg: "", typ: $funcType([ptrType$4], [], false)}, {prop: "addCertFunc", name: "addCertFunc", pkg: "crypto/x509", typ: $funcType([sum224, $String, funcType$2], [], false)}, {prop: "AppendCertsFromPEM", name: "AppendCertsFromPEM", pkg: "", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "Subjects", name: "Subjects", pkg: "", typ: $funcType([], [sliceType$30], false)}]; - publicKeyInfo.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: asn1.RawContent, tag: ""}, {prop: "Algorithm", name: "Algorithm", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: ""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: asn1.BitString, tag: ""}]); - authKeyId.init("", [{prop: "Id", name: "Id", embedded: false, exported: true, typ: sliceType$1, tag: "asn1:\"optional,tag:0\""}]); - pssParameters.init("", [{prop: "Hash", name: "Hash", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: "asn1:\"explicit,tag:0\""}, {prop: "MGF", name: "MGF", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: "asn1:\"explicit,tag:1\""}, {prop: "SaltLength", name: "SaltLength", embedded: false, exported: true, typ: $Int, tag: "asn1:\"explicit,tag:2\""}, {prop: "TrailerField", name: "TrailerField", embedded: false, exported: true, typ: $Int, tag: "asn1:\"optional,explicit,tag:3,default:1\""}]); - Certificate.init("", [{prop: "Raw", name: "Raw", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "RawTBSCertificate", name: "RawTBSCertificate", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "RawSubjectPublicKeyInfo", name: "RawSubjectPublicKeyInfo", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "RawSubject", name: "RawSubject", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "RawIssuer", name: "RawIssuer", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "Signature", name: "Signature", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "SignatureAlgorithm", name: "SignatureAlgorithm", embedded: false, exported: true, typ: SignatureAlgorithm, tag: ""}, {prop: "PublicKeyAlgorithm", name: "PublicKeyAlgorithm", embedded: false, exported: true, typ: PublicKeyAlgorithm, tag: ""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: $emptyInterface, tag: ""}, {prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "SerialNumber", name: "SerialNumber", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Issuer", name: "Issuer", embedded: false, exported: true, typ: pkix.Name, tag: ""}, {prop: "Subject", name: "Subject", embedded: false, exported: true, typ: pkix.Name, tag: ""}, {prop: "NotBefore", name: "NotBefore", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "NotAfter", name: "NotAfter", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "KeyUsage", name: "KeyUsage", embedded: false, exported: true, typ: KeyUsage, tag: ""}, {prop: "Extensions", name: "Extensions", embedded: false, exported: true, typ: sliceType$8, tag: ""}, {prop: "ExtraExtensions", name: "ExtraExtensions", embedded: false, exported: true, typ: sliceType$8, tag: ""}, {prop: "UnhandledCriticalExtensions", name: "UnhandledCriticalExtensions", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "ExtKeyUsage", name: "ExtKeyUsage", embedded: false, exported: true, typ: sliceType$22, tag: ""}, {prop: "UnknownExtKeyUsage", name: "UnknownExtKeyUsage", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "BasicConstraintsValid", name: "BasicConstraintsValid", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IsCA", name: "IsCA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "MaxPathLen", name: "MaxPathLen", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxPathLenZero", name: "MaxPathLenZero", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SubjectKeyId", name: "SubjectKeyId", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "AuthorityKeyId", name: "AuthorityKeyId", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "OCSPServer", name: "OCSPServer", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "IssuingCertificateURL", name: "IssuingCertificateURL", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "DNSNames", name: "DNSNames", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "EmailAddresses", name: "EmailAddresses", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "IPAddresses", name: "IPAddresses", embedded: false, exported: true, typ: sliceType$18, tag: ""}, {prop: "URIs", name: "URIs", embedded: false, exported: true, typ: sliceType$19, tag: ""}, {prop: "PermittedDNSDomainsCritical", name: "PermittedDNSDomainsCritical", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PermittedDNSDomains", name: "PermittedDNSDomains", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "ExcludedDNSDomains", name: "ExcludedDNSDomains", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "PermittedIPRanges", name: "PermittedIPRanges", embedded: false, exported: true, typ: sliceType$28, tag: ""}, {prop: "ExcludedIPRanges", name: "ExcludedIPRanges", embedded: false, exported: true, typ: sliceType$28, tag: ""}, {prop: "PermittedEmailAddresses", name: "PermittedEmailAddresses", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "ExcludedEmailAddresses", name: "ExcludedEmailAddresses", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "PermittedURIDomains", name: "PermittedURIDomains", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "ExcludedURIDomains", name: "ExcludedURIDomains", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "CRLDistributionPoints", name: "CRLDistributionPoints", embedded: false, exported: true, typ: sliceType$4, tag: ""}, {prop: "PolicyIdentifiers", name: "PolicyIdentifiers", embedded: false, exported: true, typ: sliceType$11, tag: ""}]); - ConstraintViolationError.init("", []); - UnhandledCriticalExtension.init("", []); - CertificateInvalidError.init("", [{prop: "Cert", name: "Cert", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Reason", name: "Reason", embedded: false, exported: true, typ: InvalidReason, tag: ""}, {prop: "Detail", name: "Detail", embedded: false, exported: true, typ: $String, tag: ""}]); - HostnameError.init("", [{prop: "Certificate", name: "Certificate", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}]); - UnknownAuthorityError.init("crypto/x509", [{prop: "Cert", name: "Cert", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "hintErr", name: "hintErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "hintCert", name: "hintCert", embedded: false, exported: false, typ: ptrType$4, tag: ""}]); - SystemRootsError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - VerifyOptions.init("", [{prop: "DNSName", name: "DNSName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Intermediates", name: "Intermediates", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "Roots", name: "Roots", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "CurrentTime", name: "CurrentTime", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "KeyUsages", name: "KeyUsages", embedded: false, exported: true, typ: sliceType$22, tag: ""}, {prop: "MaxConstraintComparisions", name: "MaxConstraintComparisions", embedded: false, exported: true, typ: $Int, tag: ""}]); - rfc2821Mailbox.init("crypto/x509", [{prop: "local", name: "local", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "domain", name: "domain", embedded: false, exported: false, typ: $String, tag: ""}]); - ecPrivateKey.init("", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "PrivateKey", name: "PrivateKey", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "NamedCurveOID", name: "NamedCurveOID", embedded: false, exported: true, typ: asn1.ObjectIdentifier, tag: "asn1:\"optional,explicit,tag:0\""}, {prop: "PublicKey", name: "PublicKey", embedded: false, exported: true, typ: asn1.BitString, tag: "asn1:\"optional,explicit,tag:1\""}]); - pkcs8.init("", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Algo", name: "Algo", embedded: false, exported: true, typ: pkix.AlgorithmIdentifier, tag: ""}, {prop: "PrivateKey", name: "PrivateKey", embedded: false, exported: true, typ: sliceType$1, tag: ""}]); - pkcs1PrivateKey.init("", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "E", name: "E", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "D", name: "D", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "P", name: "P", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Q", name: "Q", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Dp", name: "Dp", embedded: false, exported: true, typ: ptrType$1, tag: "asn1:\"optional\""}, {prop: "Dq", name: "Dq", embedded: false, exported: true, typ: ptrType$1, tag: "asn1:\"optional\""}, {prop: "Qinv", name: "Qinv", embedded: false, exported: true, typ: ptrType$1, tag: "asn1:\"optional\""}, {prop: "AdditionalPrimes", name: "AdditionalPrimes", embedded: false, exported: true, typ: sliceType$23, tag: "asn1:\"optional,omitempty\""}]); - pkcs1AdditionalRSAPrime.init("", [{prop: "Prime", name: "Prime", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Exp", name: "Exp", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "Coeff", name: "Coeff", embedded: false, exported: true, typ: ptrType$1, tag: ""}]); - pkcs1PublicKey.init("", [{prop: "N", name: "N", embedded: false, exported: true, typ: ptrType$1, tag: ""}, {prop: "E", name: "E", embedded: false, exported: true, typ: $Int, tag: ""}]); - sum224.init($Uint8, 28); - CertPool.init("crypto/x509", [{prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "lazyCerts", name: "lazyCerts", embedded: false, exported: false, typ: sliceType$29, tag: ""}, {prop: "haveSum", name: "haveSum", embedded: false, exported: false, typ: mapType$2, tag: ""}, {prop: "systemPool", name: "systemPool", embedded: false, exported: false, typ: $Bool, tag: ""}]); - lazyCert.init("crypto/x509", [{prop: "rawSubject", name: "rawSubject", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "getCert", name: "getCert", embedded: false, exported: false, typ: funcType$2, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = crypto.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = aes.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cipher.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = des.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = dsa.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ecdsa.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ed25519.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = elliptic.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = md5.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rsa.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha1.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha256.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha512.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pkix.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = asn1.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hex.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pem.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = godebug.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fs.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = net.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = url.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filepath.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf16.$init(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cryptobyte.$init(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = asn1$1.$init(); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - systemRoots = ptrType.nil; - systemRootsErr = $ifaceNil; - publicKeyAlgoName = $toNativeArray($kindString, ["", "RSA", "DSA", "ECDSA", "Ed25519"]); - oidSignatureMD2WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 2]); - oidSignatureMD5WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 4]); - oidSignatureSHA1WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 5]); - oidSignatureSHA256WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 11]); - oidSignatureSHA384WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 12]); - oidSignatureSHA512WithRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 13]); - oidSignatureRSAPSS = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 10]); - oidSignatureDSAWithSHA1 = new asn1.ObjectIdentifier([1, 2, 840, 10040, 4, 3]); - oidSignatureDSAWithSHA256 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 3, 2]); - oidSignatureECDSAWithSHA1 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 1]); - oidSignatureECDSAWithSHA256 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 3, 2]); - oidSignatureECDSAWithSHA384 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 3, 3]); - oidSignatureECDSAWithSHA512 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 4, 3, 4]); - oidSignatureEd25519 = new asn1.ObjectIdentifier([1, 3, 101, 112]); - oidSHA256 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 2, 1]); - oidSHA384 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 2, 2]); - oidSHA512 = new asn1.ObjectIdentifier([2, 16, 840, 1, 101, 3, 4, 2, 3]); - oidMGF1 = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 8]); - oidISOSignatureSHA1WithRSA = new asn1.ObjectIdentifier([1, 3, 14, 3, 2, 29]); - signatureAlgorithmDetails = new sliceType([new structType.ptr(1, "MD2-RSA", oidSignatureMD2WithRSA, 1, 0), new structType.ptr(2, "MD5-RSA", oidSignatureMD5WithRSA, 1, 2), new structType.ptr(3, "SHA1-RSA", oidSignatureSHA1WithRSA, 1, 3), new structType.ptr(3, "SHA1-RSA", oidISOSignatureSHA1WithRSA, 1, 3), new structType.ptr(4, "SHA256-RSA", oidSignatureSHA256WithRSA, 1, 5), new structType.ptr(5, "SHA384-RSA", oidSignatureSHA384WithRSA, 1, 6), new structType.ptr(6, "SHA512-RSA", oidSignatureSHA512WithRSA, 1, 7), new structType.ptr(13, "SHA256-RSAPSS", oidSignatureRSAPSS, 1, 5), new structType.ptr(14, "SHA384-RSAPSS", oidSignatureRSAPSS, 1, 6), new structType.ptr(15, "SHA512-RSAPSS", oidSignatureRSAPSS, 1, 7), new structType.ptr(7, "DSA-SHA1", oidSignatureDSAWithSHA1, 2, 3), new structType.ptr(8, "DSA-SHA256", oidSignatureDSAWithSHA256, 2, 5), new structType.ptr(9, "ECDSA-SHA1", oidSignatureECDSAWithSHA1, 3, 3), new structType.ptr(10, "ECDSA-SHA256", oidSignatureECDSAWithSHA256, 3, 5), new structType.ptr(11, "ECDSA-SHA384", oidSignatureECDSAWithSHA384, 3, 6), new structType.ptr(12, "ECDSA-SHA512", oidSignatureECDSAWithSHA512, 3, 7), new structType.ptr(16, "Ed25519", oidSignatureEd25519, 4, 0)]); - hashToPSSParameters = $makeMap(crypto.Hash.keyFor, [{ k: 5, v: new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, new sliceType$1([48, 52, 160, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 161, 28, 48, 26, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 8, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 1, 5, 0, 162, 3, 2, 1, 32])) }, { k: 6, v: new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, new sliceType$1([48, 52, 160, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 161, 28, 48, 26, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 8, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 2, 5, 0, 162, 3, 2, 1, 48])) }, { k: 7, v: new asn1.RawValue.ptr(0, 0, false, sliceType$1.nil, new sliceType$1([48, 52, 160, 15, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 161, 28, 48, 26, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 8, 48, 13, 6, 9, 96, 134, 72, 1, 101, 3, 4, 2, 3, 5, 0, 162, 3, 2, 1, 64])) }]); - oidPublicKeyRSA = new asn1.ObjectIdentifier([1, 2, 840, 113549, 1, 1, 1]); - oidPublicKeyDSA = new asn1.ObjectIdentifier([1, 2, 840, 10040, 4, 1]); - oidPublicKeyECDSA = new asn1.ObjectIdentifier([1, 2, 840, 10045, 2, 1]); - oidPublicKeyEd25519 = oidSignatureEd25519; - oidNamedCurveP224 = new asn1.ObjectIdentifier([1, 3, 132, 0, 33]); - oidNamedCurveP256 = new asn1.ObjectIdentifier([1, 2, 840, 10045, 3, 1, 7]); - oidNamedCurveP384 = new asn1.ObjectIdentifier([1, 3, 132, 0, 34]); - oidNamedCurveP521 = new asn1.ObjectIdentifier([1, 3, 132, 0, 35]); - oidExtKeyUsageAny = new asn1.ObjectIdentifier([2, 5, 29, 37, 0]); - oidExtKeyUsageServerAuth = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 1]); - oidExtKeyUsageClientAuth = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 2]); - oidExtKeyUsageCodeSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 3]); - oidExtKeyUsageEmailProtection = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 4]); - oidExtKeyUsageIPSECEndSystem = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 5]); - oidExtKeyUsageIPSECTunnel = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 6]); - oidExtKeyUsageIPSECUser = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 7]); - oidExtKeyUsageTimeStamping = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 8]); - oidExtKeyUsageOCSPSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 3, 9]); - oidExtKeyUsageMicrosoftServerGatedCrypto = new asn1.ObjectIdentifier([1, 3, 6, 1, 4, 1, 311, 10, 3, 3]); - oidExtKeyUsageNetscapeServerGatedCrypto = new asn1.ObjectIdentifier([2, 16, 840, 1, 113730, 4, 1]); - oidExtKeyUsageMicrosoftCommercialCodeSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 4, 1, 311, 2, 1, 22]); - oidExtKeyUsageMicrosoftKernelCodeSigning = new asn1.ObjectIdentifier([1, 3, 6, 1, 4, 1, 311, 61, 1, 1]); - extKeyUsageOIDs = new sliceType$2([new structType$1.ptr(0, oidExtKeyUsageAny), new structType$1.ptr(1, oidExtKeyUsageServerAuth), new structType$1.ptr(2, oidExtKeyUsageClientAuth), new structType$1.ptr(3, oidExtKeyUsageCodeSigning), new structType$1.ptr(4, oidExtKeyUsageEmailProtection), new structType$1.ptr(5, oidExtKeyUsageIPSECEndSystem), new structType$1.ptr(6, oidExtKeyUsageIPSECTunnel), new structType$1.ptr(7, oidExtKeyUsageIPSECUser), new structType$1.ptr(8, oidExtKeyUsageTimeStamping), new structType$1.ptr(9, oidExtKeyUsageOCSPSigning), new structType$1.ptr(10, oidExtKeyUsageMicrosoftServerGatedCrypto), new structType$1.ptr(11, oidExtKeyUsageNetscapeServerGatedCrypto), new structType$1.ptr(12, oidExtKeyUsageMicrosoftCommercialCodeSigning), new structType$1.ptr(13, oidExtKeyUsageMicrosoftKernelCodeSigning)]); - $pkg.ErrUnsupportedAlgorithm = errors.New("x509: cannot verify signature: algorithm unimplemented"); - _r = godebug.Get("x509sha1"); /* */ $s = 40; case 40: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - debugAllowSHA1 = _r === "1"; - oidExtensionAuthorityKeyId = new sliceType$3([2, 5, 29, 35]); - oidExtensionSubjectAltName = new sliceType$3([2, 5, 29, 17]); - oidExtensionNameConstraints = new sliceType$3([2, 5, 29, 30]); - oidExtensionAuthorityInfoAccess = new sliceType$3([1, 3, 6, 1, 5, 5, 7, 1, 1]); - oidAuthorityInfoAccessOcsp = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 48, 1]); - oidAuthorityInfoAccessIssuers = new asn1.ObjectIdentifier([1, 3, 6, 1, 5, 5, 7, 48, 2]); - errNotParsed = errors.New("x509: missing ASN.1 contents; use ParseCertificate"); - certFiles = new sliceType$4([]); - certDirectories = new sliceType$4([]); - $pkg.IncorrectPasswordError = errors.New("x509: decryption password incorrect"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/internal/subtle"] = (function() { - var $pkg = {}, $init, js, reflect, ptrType, InexactOverlap, AnyOverlap; - js = $packages["github.com/gopherjs/gopherjs/js"]; - reflect = $packages["reflect"]; - ptrType = $ptrType($Uint8); - InexactOverlap = function(x, y) { - var x, y; - if ((x.$length === 0) || (y.$length === 0) || $indexPtr(x.$array, x.$offset + 0, ptrType) === $indexPtr(y.$array, y.$offset + 0, ptrType)) { - return false; - } - return AnyOverlap(x, y); - }; - $pkg.InexactOverlap = InexactOverlap; - AnyOverlap = function(x, y) { - var x, y; - return x.$length > 0 && y.$length > 0 && x.$array === y.$array && ($parseInt(x.$offset) >> 0) <= ((($parseInt(y.$offset) >> 0) + y.$length >> 0) - 1 >> 0) && ($parseInt(y.$offset) >> 0) <= ((($parseInt(x.$offset) >> 0) + x.$length >> 0) - 1 >> 0); - }; - $pkg.AnyOverlap = AnyOverlap; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = js.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/chacha20"] = (function() { - var $pkg = {}, $init, cipher, binary, errors, bits, runtime, subtle, Cipher, ptrType, arrayType, arrayType$1, arrayType$2, sliceType, addXor, NewUnauthenticatedCipher, newUnauthenticatedCipher, quarterRound, HChaCha20, hChaCha20; - cipher = $packages["crypto/cipher"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - bits = $packages["math/bits"]; - runtime = $packages["runtime"]; - subtle = $packages["vendor/golang.org/x/crypto/internal/subtle"]; - Cipher = $pkg.Cipher = $newType(0, $kindStruct, "chacha20.Cipher", true, "vendor/golang.org/x/crypto/chacha20", true, function(key_, counter_, nonce_, buf_, len_, overflow_, precompDone_, p1_, p5_, p9_, p13_, p2_, p6_, p10_, p14_, p3_, p7_, p11_, p15_) { - this.$val = this; - if (arguments.length === 0) { - this.key = arrayType.zero(); - this.counter = 0; - this.nonce = arrayType$1.zero(); - this.buf = arrayType$2.zero(); - this.len = 0; - this.overflow = false; - this.precompDone = false; - this.p1 = 0; - this.p5 = 0; - this.p9 = 0; - this.p13 = 0; - this.p2 = 0; - this.p6 = 0; - this.p10 = 0; - this.p14 = 0; - this.p3 = 0; - this.p7 = 0; - this.p11 = 0; - this.p15 = 0; - return; - } - this.key = key_; - this.counter = counter_; - this.nonce = nonce_; - this.buf = buf_; - this.len = len_; - this.overflow = overflow_; - this.precompDone = precompDone_; - this.p1 = p1_; - this.p5 = p5_; - this.p9 = p9_; - this.p13 = p13_; - this.p2 = p2_; - this.p6 = p6_; - this.p10 = p10_; - this.p14 = p14_; - this.p3 = p3_; - this.p7 = p7_; - this.p11 = p11_; - this.p15 = p15_; - }); - ptrType = $ptrType(Cipher); - arrayType = $arrayType($Uint32, 8); - arrayType$1 = $arrayType($Uint32, 3); - arrayType$2 = $arrayType($Uint8, 64); - sliceType = $sliceType($Uint8); - addXor = function(dst, src, a, b) { - var _tmp, _tmp$1, a, b, dst, src, v; - $unused((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3])); - $unused((3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3])); - if (false) { - v = (((0 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 0]) >>> 0)); - v = (v | (((((1 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 1]) >>> 0)) << 8 >>> 0))) >>> 0; - v = (v | (((((2 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 2]) >>> 0)) << 16 >>> 0))) >>> 0; - v = (v | (((((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3]) >>> 0)) << 24 >>> 0))) >>> 0; - v = (v ^ ((a + b >>> 0))) >>> 0; - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = ((v << 24 >>> 24))); - (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = (((v >>> 8 >>> 0) << 24 >>> 24))); - (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = (((v >>> 16 >>> 0) << 24 >>> 24))); - (3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3] = (((v >>> 24 >>> 0) << 24 >>> 24))); - } else { - a = a + (b) >>> 0; - (0 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 0] = (((0 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 0]) ^ ((a << 24 >>> 24))) << 24 >>> 24)); - (1 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 1] = (((1 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 1]) ^ (((a >>> 8 >>> 0) << 24 >>> 24))) << 24 >>> 24)); - (2 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 2] = (((2 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 2]) ^ (((a >>> 16 >>> 0) << 24 >>> 24))) << 24 >>> 24)); - (3 >= dst.$length ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + 3] = (((3 >= src.$length ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + 3]) ^ (((a >>> 24 >>> 0) << 24 >>> 24))) << 24 >>> 24)); - } - }; - Cipher.ptr.prototype.xorKeyStreamBlocks = function(dst, src) { - var dst, s, src; - s = this; - s.xorKeyStreamBlocksGeneric(dst, src); - }; - Cipher.prototype.xorKeyStreamBlocks = function(dst, src) { return this.$val.xorKeyStreamBlocks(dst, src); }; - NewUnauthenticatedCipher = function(key, nonce) { - var c, key, nonce; - c = new Cipher.ptr(arrayType.zero(), 0, arrayType$1.zero(), arrayType$2.zero(), 0, false, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - return newUnauthenticatedCipher(c, key, nonce); - }; - $pkg.NewUnauthenticatedCipher = NewUnauthenticatedCipher; - newUnauthenticatedCipher = function(c, key, nonce) { - var _tmp, _tmp$1, _tuple, c, cNonce, key, nonce; - if (!((key.$length === 32))) { - return [ptrType.nil, errors.New("chacha20: wrong key size")]; - } - if (nonce.$length === 24) { - _tuple = HChaCha20(key, $subslice(nonce, 0, 16)); - key = _tuple[0]; - cNonce = $makeSlice(sliceType, 12); - $copySlice($subslice(cNonce, 4, 12), $subslice(nonce, 16, 24)); - nonce = cNonce; - } else if (!((nonce.$length === 12))) { - return [ptrType.nil, errors.New("chacha20: wrong nonce size")]; - } - _tmp = $subslice(key, 0, 32); - _tmp$1 = $subslice(nonce, 0, 12); - key = _tmp; - nonce = _tmp$1; - arrayType.copy(c.key, $toNativeArray($kindUint32, [$clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 0, 4)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 4, 8)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 8, 12)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 12, 16)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 16, 20)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 20, 24)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 24, 28)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 28, 32))])); - arrayType$1.copy(c.nonce, $toNativeArray($kindUint32, [$clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 0, 4)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 4, 8)), $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 8, 12))])); - return [c, $ifaceNil]; - }; - quarterRound = function(a, b, c, d) { - var a, b, c, d; - a = a + (b) >>> 0; - d = (d ^ (a)) >>> 0; - d = bits.RotateLeft32(d, 16); - c = c + (d) >>> 0; - b = (b ^ (c)) >>> 0; - b = bits.RotateLeft32(b, 12); - a = a + (b) >>> 0; - d = (d ^ (a)) >>> 0; - d = bits.RotateLeft32(d, 8); - c = c + (d) >>> 0; - b = (b ^ (c)) >>> 0; - b = bits.RotateLeft32(b, 7); - return [a, b, c, d]; - }; - Cipher.ptr.prototype.SetCounter = function(counter) { - var _q, counter, outputCounter, s; - s = this; - outputCounter = s.counter - (_q = ((s.len >>> 0)) / 64, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) >>> 0; - if (s.overflow || counter < outputCounter) { - $panic(new $String("chacha20: SetCounter attempted to rollback counter")); - } - if (counter < s.counter) { - s.len = $imul((((s.counter - counter >>> 0) >> 0)), 64); - } else { - s.counter = counter; - s.len = 0; - } - }; - Cipher.prototype.SetCounter = function(counter) { return this.$val.SetCounter(counter); }; - Cipher.ptr.prototype.XORKeyStream = function(dst, src) { - var _i, _q, _r, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, b, buf, dst, full, i, keyStream, numBlocks, numBlocks$1, s, src, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8; - s = this; - if (src.$length === 0) { - return; - } - if (dst.$length < src.$length) { - $panic(new $String("chacha20: output smaller than input")); - } - dst = $subslice(dst, 0, src.$length); - if (subtle.InexactOverlap(dst, src)) { - $panic(new $String("chacha20: invalid buffer overlap")); - } - if (!((s.len === 0))) { - keyStream = $subslice(new sliceType(s.buf), (64 - s.len >> 0)); - if (src.$length < keyStream.$length) { - keyStream = $subslice(keyStream, 0, src.$length); - } - $unused((x = keyStream.$length - 1 >> 0, ((x < 0 || x >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + x]))); - _ref = keyStream; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = ((((i < 0 || i >= src.$length) ? ($throwRuntimeError("index out of range"), undefined) : src.$array[src.$offset + i]) ^ b) << 24 >>> 24)); - _i++; - } - s.len = s.len - (keyStream.$length) >> 0; - _tmp = $subslice(dst, keyStream.$length); - _tmp$1 = $subslice(src, keyStream.$length); - dst = _tmp; - src = _tmp$1; - } - if (src.$length === 0) { - return; - } - numBlocks = $div64(((x$1 = (x$2 = (new $Uint64(0, src.$length)), new $Uint64(x$2.$high + 0, x$2.$low + 64)), new $Uint64(x$1.$high - 0, x$1.$low - 1))), new $Uint64(0, 64), false); - if (s.overflow || (x$3 = (x$4 = (new $Uint64(0, s.counter)), new $Uint64(x$4.$high + numBlocks.$high, x$4.$low + numBlocks.$low)), (x$3.$high > 1 || (x$3.$high === 1 && x$3.$low > 0)))) { - $panic(new $String("chacha20: counter overflow")); - } else if ((x$5 = (x$6 = (new $Uint64(0, s.counter)), new $Uint64(x$6.$high + numBlocks.$high, x$6.$low + numBlocks.$low)), (x$5.$high === 1 && x$5.$low === 0))) { - s.overflow = true; - } - full = src.$length - (_r = src.$length % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0; - if (full > 0) { - s.xorKeyStreamBlocks($subslice(dst, 0, full), $subslice(src, 0, full)); - } - _tmp$2 = $subslice(dst, full); - _tmp$3 = $subslice(src, full); - dst = _tmp$2; - src = _tmp$3; - if ((x$7 = (x$8 = (new $Uint64(0, s.counter)), new $Uint64(x$8.$high + 0, x$8.$low + 1)), (x$7.$high > 1 || (x$7.$high === 1 && x$7.$low > 0)))) { - arrayType$2.copy(s.buf, arrayType$2.zero()); - numBlocks$1 = (_q = (((src.$length + 64 >> 0) - 1 >> 0)) / 64, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - buf = $subslice(new sliceType(s.buf), (64 - ($imul(numBlocks$1, 64)) >> 0)); - $copySlice(buf, src); - s.xorKeyStreamBlocksGeneric(buf, buf); - s.len = buf.$length - $copySlice(dst, buf) >> 0; - return; - } - if (src.$length > 0) { - arrayType$2.copy(s.buf, arrayType$2.zero()); - $copySlice(new sliceType(s.buf), src); - s.xorKeyStreamBlocks(new sliceType(s.buf), new sliceType(s.buf)); - s.len = 64 - $copySlice(dst, new sliceType(s.buf)) >> 0; - } - }; - Cipher.prototype.XORKeyStream = function(dst, src) { return this.$val.XORKeyStream(dst, src); }; - Cipher.ptr.prototype.xorKeyStreamBlocksGeneric = function(dst, src) { - var _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, c0, c1, c10, c11, c13, c14, c15, c2, c3, c4, c5, c6, c7, c8, c9, dst, fcr0, fcr12, fcr4, fcr8, i, s, src, x0, x1, x10, x11, x12, x13, x14, x15, x2, x3, x4, x5, x6, x7, x8, x9; - s = this; - if (!((dst.$length === src.$length)) || !(((_r = dst.$length % 64, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) === 0))) { - $panic(new $String("chacha20: internal error: wrong dst and/or src length")); - } - _tmp = 1634760805; - _tmp$1 = 857760878; - _tmp$2 = 2036477234; - _tmp$3 = 1797285236; - c0 = _tmp; - c1 = _tmp$1; - c2 = _tmp$2; - c3 = _tmp$3; - _tmp$4 = s.key[0]; - _tmp$5 = s.key[1]; - _tmp$6 = s.key[2]; - _tmp$7 = s.key[3]; - c4 = _tmp$4; - c5 = _tmp$5; - c6 = _tmp$6; - c7 = _tmp$7; - _tmp$8 = s.key[4]; - _tmp$9 = s.key[5]; - _tmp$10 = s.key[6]; - _tmp$11 = s.key[7]; - c8 = _tmp$8; - c9 = _tmp$9; - c10 = _tmp$10; - c11 = _tmp$11; - $unused(s.counter); - _tmp$13 = s.nonce[0]; - _tmp$14 = s.nonce[1]; - _tmp$15 = s.nonce[2]; - c13 = _tmp$13; - c14 = _tmp$14; - c15 = _tmp$15; - if (!s.precompDone) { - _tuple = quarterRound(c1, c5, c9, c13); - s.p1 = _tuple[0]; - s.p5 = _tuple[1]; - s.p9 = _tuple[2]; - s.p13 = _tuple[3]; - _tuple$1 = quarterRound(c2, c6, c10, c14); - s.p2 = _tuple$1[0]; - s.p6 = _tuple$1[1]; - s.p10 = _tuple$1[2]; - s.p14 = _tuple$1[3]; - _tuple$2 = quarterRound(c3, c7, c11, c15); - s.p3 = _tuple$2[0]; - s.p7 = _tuple$2[1]; - s.p11 = _tuple$2[2]; - s.p15 = _tuple$2[3]; - s.precompDone = true; - } - while (true) { - if (!(src.$length >= 64 && dst.$length >= 64)) { break; } - _tuple$3 = quarterRound(c0, c4, c8, s.counter); - fcr0 = _tuple$3[0]; - fcr4 = _tuple$3[1]; - fcr8 = _tuple$3[2]; - fcr12 = _tuple$3[3]; - _tuple$4 = quarterRound(fcr0, s.p5, s.p10, s.p15); - x0 = _tuple$4[0]; - x5 = _tuple$4[1]; - x10 = _tuple$4[2]; - x15 = _tuple$4[3]; - _tuple$5 = quarterRound(s.p1, s.p6, s.p11, fcr12); - x1 = _tuple$5[0]; - x6 = _tuple$5[1]; - x11 = _tuple$5[2]; - x12 = _tuple$5[3]; - _tuple$6 = quarterRound(s.p2, s.p7, fcr8, s.p13); - x2 = _tuple$6[0]; - x7 = _tuple$6[1]; - x8 = _tuple$6[2]; - x13 = _tuple$6[3]; - _tuple$7 = quarterRound(s.p3, fcr4, s.p9, s.p14); - x3 = _tuple$7[0]; - x4 = _tuple$7[1]; - x9 = _tuple$7[2]; - x14 = _tuple$7[3]; - i = 0; - while (true) { - if (!(i < 9)) { break; } - _tuple$8 = quarterRound(x0, x4, x8, x12); - x0 = _tuple$8[0]; - x4 = _tuple$8[1]; - x8 = _tuple$8[2]; - x12 = _tuple$8[3]; - _tuple$9 = quarterRound(x1, x5, x9, x13); - x1 = _tuple$9[0]; - x5 = _tuple$9[1]; - x9 = _tuple$9[2]; - x13 = _tuple$9[3]; - _tuple$10 = quarterRound(x2, x6, x10, x14); - x2 = _tuple$10[0]; - x6 = _tuple$10[1]; - x10 = _tuple$10[2]; - x14 = _tuple$10[3]; - _tuple$11 = quarterRound(x3, x7, x11, x15); - x3 = _tuple$11[0]; - x7 = _tuple$11[1]; - x11 = _tuple$11[2]; - x15 = _tuple$11[3]; - _tuple$12 = quarterRound(x0, x5, x10, x15); - x0 = _tuple$12[0]; - x5 = _tuple$12[1]; - x10 = _tuple$12[2]; - x15 = _tuple$12[3]; - _tuple$13 = quarterRound(x1, x6, x11, x12); - x1 = _tuple$13[0]; - x6 = _tuple$13[1]; - x11 = _tuple$13[2]; - x12 = _tuple$13[3]; - _tuple$14 = quarterRound(x2, x7, x8, x13); - x2 = _tuple$14[0]; - x7 = _tuple$14[1]; - x8 = _tuple$14[2]; - x13 = _tuple$14[3]; - _tuple$15 = quarterRound(x3, x4, x9, x14); - x3 = _tuple$15[0]; - x4 = _tuple$15[1]; - x9 = _tuple$15[2]; - x14 = _tuple$15[3]; - i = i + (1) >> 0; - } - addXor($subslice(dst, 0, 4), $subslice(src, 0, 4), x0, c0); - addXor($subslice(dst, 4, 8), $subslice(src, 4, 8), x1, c1); - addXor($subslice(dst, 8, 12), $subslice(src, 8, 12), x2, c2); - addXor($subslice(dst, 12, 16), $subslice(src, 12, 16), x3, c3); - addXor($subslice(dst, 16, 20), $subslice(src, 16, 20), x4, c4); - addXor($subslice(dst, 20, 24), $subslice(src, 20, 24), x5, c5); - addXor($subslice(dst, 24, 28), $subslice(src, 24, 28), x6, c6); - addXor($subslice(dst, 28, 32), $subslice(src, 28, 32), x7, c7); - addXor($subslice(dst, 32, 36), $subslice(src, 32, 36), x8, c8); - addXor($subslice(dst, 36, 40), $subslice(src, 36, 40), x9, c9); - addXor($subslice(dst, 40, 44), $subslice(src, 40, 44), x10, c10); - addXor($subslice(dst, 44, 48), $subslice(src, 44, 48), x11, c11); - addXor($subslice(dst, 48, 52), $subslice(src, 48, 52), x12, s.counter); - addXor($subslice(dst, 52, 56), $subslice(src, 52, 56), x13, c13); - addXor($subslice(dst, 56, 60), $subslice(src, 56, 60), x14, c14); - addXor($subslice(dst, 60, 64), $subslice(src, 60, 64), x15, c15); - s.counter = s.counter + (1) >>> 0; - _tmp$16 = $subslice(src, 64); - _tmp$17 = $subslice(dst, 64); - src = _tmp$16; - dst = _tmp$17; - } - }; - Cipher.prototype.xorKeyStreamBlocksGeneric = function(dst, src) { return this.$val.xorKeyStreamBlocksGeneric(dst, src); }; - HChaCha20 = function(key, nonce) { - var key, nonce, out; - out = $makeSlice(sliceType, 32); - return hChaCha20(out, key, nonce); - }; - $pkg.HChaCha20 = HChaCha20; - hChaCha20 = function(out, key, nonce) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, i, key, nonce, out, x0, x1, x10, x11, x12, x13, x14, x15, x2, x3, x4, x5, x6, x7, x8, x9; - if (!((key.$length === 32))) { - return [sliceType.nil, errors.New("chacha20: wrong HChaCha20 key size")]; - } - if (!((nonce.$length === 16))) { - return [sliceType.nil, errors.New("chacha20: wrong HChaCha20 nonce size")]; - } - _tmp = 1634760805; - _tmp$1 = 857760878; - _tmp$2 = 2036477234; - _tmp$3 = 1797285236; - x0 = _tmp; - x1 = _tmp$1; - x2 = _tmp$2; - x3 = _tmp$3; - x4 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 0, 4)); - x5 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 4, 8)); - x6 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 8, 12)); - x7 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 12, 16)); - x8 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 16, 20)); - x9 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 20, 24)); - x10 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 24, 28)); - x11 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(key, 28, 32)); - x12 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 0, 4)); - x13 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 4, 8)); - x14 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 8, 12)); - x15 = $clone(binary.LittleEndian, binary.littleEndian).Uint32($subslice(nonce, 12, 16)); - i = 0; - while (true) { - if (!(i < 10)) { break; } - _tuple = quarterRound(x0, x4, x8, x12); - x0 = _tuple[0]; - x4 = _tuple[1]; - x8 = _tuple[2]; - x12 = _tuple[3]; - _tuple$1 = quarterRound(x1, x5, x9, x13); - x1 = _tuple$1[0]; - x5 = _tuple$1[1]; - x9 = _tuple$1[2]; - x13 = _tuple$1[3]; - _tuple$2 = quarterRound(x2, x6, x10, x14); - x2 = _tuple$2[0]; - x6 = _tuple$2[1]; - x10 = _tuple$2[2]; - x14 = _tuple$2[3]; - _tuple$3 = quarterRound(x3, x7, x11, x15); - x3 = _tuple$3[0]; - x7 = _tuple$3[1]; - x11 = _tuple$3[2]; - x15 = _tuple$3[3]; - _tuple$4 = quarterRound(x0, x5, x10, x15); - x0 = _tuple$4[0]; - x5 = _tuple$4[1]; - x10 = _tuple$4[2]; - x15 = _tuple$4[3]; - _tuple$5 = quarterRound(x1, x6, x11, x12); - x1 = _tuple$5[0]; - x6 = _tuple$5[1]; - x11 = _tuple$5[2]; - x12 = _tuple$5[3]; - _tuple$6 = quarterRound(x2, x7, x8, x13); - x2 = _tuple$6[0]; - x7 = _tuple$6[1]; - x8 = _tuple$6[2]; - x13 = _tuple$6[3]; - _tuple$7 = quarterRound(x3, x4, x9, x14); - x3 = _tuple$7[0]; - x4 = _tuple$7[1]; - x9 = _tuple$7[2]; - x14 = _tuple$7[3]; - i = i + (1) >> 0; - } - $unused((31 >= out.$length ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + 31])); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 0, 4), x0); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 4, 8), x1); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 8, 12), x2); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 12, 16), x3); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 16, 20), x12); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 20, 24), x13); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 24, 28), x14); - $clone(binary.LittleEndian, binary.littleEndian).PutUint32($subslice(out, 28, 32), x15); - return [out, $ifaceNil]; - }; - ptrType.methods = [{prop: "xorKeyStreamBlocks", name: "xorKeyStreamBlocks", pkg: "vendor/golang.org/x/crypto/chacha20", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "SetCounter", name: "SetCounter", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "XORKeyStream", name: "XORKeyStream", pkg: "", typ: $funcType([sliceType, sliceType], [], false)}, {prop: "xorKeyStreamBlocksGeneric", name: "xorKeyStreamBlocksGeneric", pkg: "vendor/golang.org/x/crypto/chacha20", typ: $funcType([sliceType, sliceType], [], false)}]; - Cipher.init("vendor/golang.org/x/crypto/chacha20", [{prop: "key", name: "key", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "counter", name: "counter", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "nonce", name: "nonce", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "len", name: "len", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "overflow", name: "overflow", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "precompDone", name: "precompDone", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "p1", name: "p1", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p5", name: "p5", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p9", name: "p9", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p13", name: "p13", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p2", name: "p2", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p6", name: "p6", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p10", name: "p10", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p14", name: "p14", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p3", name: "p3", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p7", name: "p7", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p11", name: "p11", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p15", name: "p15", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/internal/poly1305"] = (function() { - var $pkg = {}, $init, subtle, binary, bits, macState, macGeneric, uint128, MAC, mac, arrayType, arrayType$1, arrayType$2, sliceType, ptrType, ptrType$1, ptrType$2, initialize, mul64, add128, shiftRightBy2, updateGeneric, select64, finalize, New, bitsAdd64, bitsSub64, bitsMul64; - subtle = $packages["crypto/subtle"]; - binary = $packages["encoding/binary"]; - bits = $packages["math/bits"]; - macState = $pkg.macState = $newType(0, $kindStruct, "poly1305.macState", true, "vendor/golang.org/x/crypto/internal/poly1305", false, function(h_, r_, s_) { - this.$val = this; - if (arguments.length === 0) { - this.h = arrayType.zero(); - this.r = arrayType$1.zero(); - this.s = arrayType$1.zero(); - return; - } - this.h = h_; - this.r = r_; - this.s = s_; - }); - macGeneric = $pkg.macGeneric = $newType(0, $kindStruct, "poly1305.macGeneric", true, "vendor/golang.org/x/crypto/internal/poly1305", false, function(macState_, buffer_, offset_) { - this.$val = this; - if (arguments.length === 0) { - this.macState = new macState.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$1.zero()); - this.buffer = arrayType$2.zero(); - this.offset = 0; - return; - } - this.macState = macState_; - this.buffer = buffer_; - this.offset = offset_; - }); - uint128 = $pkg.uint128 = $newType(0, $kindStruct, "poly1305.uint128", true, "vendor/golang.org/x/crypto/internal/poly1305", false, function(lo_, hi_) { - this.$val = this; - if (arguments.length === 0) { - this.lo = new $Uint64(0, 0); - this.hi = new $Uint64(0, 0); - return; - } - this.lo = lo_; - this.hi = hi_; - }); - MAC = $pkg.MAC = $newType(0, $kindStruct, "poly1305.MAC", true, "vendor/golang.org/x/crypto/internal/poly1305", true, function(mac_, finalized_) { - this.$val = this; - if (arguments.length === 0) { - this.mac = new mac.ptr(new macGeneric.ptr(new macState.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$1.zero()), arrayType$2.zero(), 0)); - this.finalized = false; - return; - } - this.mac = mac_; - this.finalized = finalized_; - }); - mac = $pkg.mac = $newType(0, $kindStruct, "poly1305.mac", true, "vendor/golang.org/x/crypto/internal/poly1305", false, function(macGeneric_) { - this.$val = this; - if (arguments.length === 0) { - this.macGeneric = new macGeneric.ptr(new macState.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$1.zero()), arrayType$2.zero(), 0); - return; - } - this.macGeneric = macGeneric_; - }); - arrayType = $arrayType($Uint64, 3); - arrayType$1 = $arrayType($Uint64, 2); - arrayType$2 = $arrayType($Uint8, 16); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(arrayType$2); - ptrType$1 = $ptrType(macGeneric); - ptrType$2 = $ptrType(MAC); - macGeneric.ptr.prototype.Write = function(p) { - var _r, h, n, n$1, nn, p; - h = this; - nn = p.$length; - if (h.offset > 0) { - n = $copySlice($subslice(new sliceType(h.buffer), h.offset), p); - if ((h.offset + n >> 0) < 16) { - h.offset = h.offset + (n) >> 0; - return [nn, $ifaceNil]; - } - p = $subslice(p, n); - h.offset = 0; - updateGeneric(h.macState, new sliceType(h.buffer)); - } - n$1 = p.$length - ((_r = p.$length % 16, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))) >> 0; - if (n$1 > 0) { - updateGeneric(h.macState, $subslice(p, 0, n$1)); - p = $subslice(p, n$1); - } - if (p.$length > 0) { - h.offset = h.offset + ($copySlice($subslice(new sliceType(h.buffer), h.offset), p)) >> 0; - } - return [nn, $ifaceNil]; - }; - macGeneric.prototype.Write = function(p) { return this.$val.Write(p); }; - macGeneric.ptr.prototype.Sum = function(out) { - var h, out, state; - h = this; - state = $clone(h.macState, macState); - if (h.offset > 0) { - updateGeneric(state, $subslice(new sliceType(h.buffer), 0, h.offset)); - } - finalize(out, state.h, state.s); - }; - macGeneric.prototype.Sum = function(out) { return this.$val.Sum(out); }; - initialize = function(key, m) { - var key, m, x, x$1; - m.r[0] = (x = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(key), 0, 8)), new $Uint64(x.$high & 268435452, (x.$low & 268435455) >>> 0)); - m.r[1] = (x$1 = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(key), 8, 16)), new $Uint64(x$1.$high & 268435452, (x$1.$low & 268435452) >>> 0)); - m.s[0] = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(key), 16, 24)); - m.s[1] = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(key), 24, 32)); - }; - mul64 = function(a, b) { - var _tuple, a, b, hi, lo; - _tuple = bitsMul64(a, b); - hi = _tuple[0]; - lo = _tuple[1]; - return new uint128.ptr(lo, hi); - }; - add128 = function(a, b) { - var _tuple, _tuple$1, a, b, c, hi, lo; - _tuple = bitsAdd64(a.lo, b.lo, new $Uint64(0, 0)); - lo = _tuple[0]; - c = _tuple[1]; - _tuple$1 = bitsAdd64(a.hi, b.hi, c); - hi = _tuple$1[0]; - c = _tuple$1[1]; - if (!((c.$high === 0 && c.$low === 0))) { - $panic(new $String("poly1305: unexpected overflow")); - } - return new uint128.ptr(lo, hi); - }; - shiftRightBy2 = function(a) { - var a, x, x$1, x$2; - a.lo = (x = $shiftRightUint64(a.lo, 2), x$1 = $shiftLeft64(((x$2 = a.hi, new $Uint64(x$2.$high & 0, (x$2.$low & 3) >>> 0))), 62), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - a.hi = $shiftRightUint64(a.hi, 2); - return a; - }; - updateGeneric = function(state, msg) { - var _tmp, _tmp$1, _tmp$10, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, buf, c, cc, h0, h0r0, h0r1, h1, h1r0, h1r1, h2, h2r0, h2r1, m0, m1, m2, m3, msg, r0, r1, state, t0, t1, t2, t3, x, x$1, x$2, x$3, x$4, x$5, x$6; - _tmp = state.h[0]; - _tmp$1 = state.h[1]; - _tmp$2 = state.h[2]; - h0 = _tmp; - h1 = _tmp$1; - h2 = _tmp$2; - _tmp$3 = state.r[0]; - _tmp$4 = state.r[1]; - r0 = _tmp$3; - r1 = _tmp$4; - while (true) { - if (!(msg.$length > 0)) { break; } - c = new $Uint64(0, 0); - if (msg.$length >= 16) { - _tuple = bitsAdd64(h0, $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(msg, 0, 8)), new $Uint64(0, 0)); - h0 = _tuple[0]; - c = _tuple[1]; - _tuple$1 = bitsAdd64(h1, $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(msg, 8, 16)), c); - h1 = _tuple$1[0]; - c = _tuple$1[1]; - h2 = (x = new $Uint64(c.$high + 0, c.$low + 1), new $Uint64(h2.$high + x.$high, h2.$low + x.$low)); - msg = $subslice(msg, 16); - } else { - buf = arrayType$2.zero(); - $copySlice(new sliceType(buf), msg); - (x$1 = msg.$length, ((x$1 < 0 || x$1 >= buf.length) ? ($throwRuntimeError("index out of range"), undefined) : buf[x$1] = 1)); - _tuple$2 = bitsAdd64(h0, $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(buf), 0, 8)), new $Uint64(0, 0)); - h0 = _tuple$2[0]; - c = _tuple$2[1]; - _tuple$3 = bitsAdd64(h1, $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(new sliceType(buf), 8, 16)), c); - h1 = _tuple$3[0]; - c = _tuple$3[1]; - h2 = (x$2 = c, new $Uint64(h2.$high + x$2.$high, h2.$low + x$2.$low)); - msg = sliceType.nil; - } - h0r0 = $clone(mul64(h0, r0), uint128); - h1r0 = $clone(mul64(h1, r0), uint128); - h2r0 = $clone(mul64(h2, r0), uint128); - h0r1 = $clone(mul64(h0, r1), uint128); - h1r1 = $clone(mul64(h1, r1), uint128); - h2r1 = $clone(mul64(h2, r1), uint128); - if (!((x$3 = h2r0.hi, (x$3.$high === 0 && x$3.$low === 0)))) { - $panic(new $String("poly1305: unexpected overflow")); - } - if (!((x$4 = h2r1.hi, (x$4.$high === 0 && x$4.$low === 0)))) { - $panic(new $String("poly1305: unexpected overflow")); - } - m0 = $clone(h0r0, uint128); - m1 = $clone(add128($clone(h1r0, uint128), $clone(h0r1, uint128)), uint128); - m2 = $clone(add128($clone(h2r0, uint128), $clone(h1r1, uint128)), uint128); - m3 = $clone(h2r1, uint128); - t0 = m0.lo; - _tuple$4 = bitsAdd64(m1.lo, m0.hi, new $Uint64(0, 0)); - t1 = _tuple$4[0]; - c = _tuple$4[1]; - _tuple$5 = bitsAdd64(m2.lo, m1.hi, c); - t2 = _tuple$5[0]; - c = _tuple$5[1]; - _tuple$6 = bitsAdd64(m3.lo, m2.hi, c); - t3 = _tuple$6[0]; - _tmp$5 = t0; - _tmp$6 = t1; - _tmp$7 = new $Uint64(t2.$high & 0, (t2.$low & 3) >>> 0); - h0 = _tmp$5; - h1 = _tmp$6; - h2 = _tmp$7; - cc = new uint128.ptr(new $Uint64(t2.$high & 4294967295, (t2.$low & 4294967292) >>> 0), t3); - _tuple$7 = bitsAdd64(h0, cc.lo, new $Uint64(0, 0)); - h0 = _tuple$7[0]; - c = _tuple$7[1]; - _tuple$8 = bitsAdd64(h1, cc.hi, c); - h1 = _tuple$8[0]; - c = _tuple$8[1]; - h2 = (x$5 = c, new $Uint64(h2.$high + x$5.$high, h2.$low + x$5.$low)); - uint128.copy(cc, shiftRightBy2($clone(cc, uint128))); - _tuple$9 = bitsAdd64(h0, cc.lo, new $Uint64(0, 0)); - h0 = _tuple$9[0]; - c = _tuple$9[1]; - _tuple$10 = bitsAdd64(h1, cc.hi, c); - h1 = _tuple$10[0]; - c = _tuple$10[1]; - h2 = (x$6 = c, new $Uint64(h2.$high + x$6.$high, h2.$low + x$6.$low)); - } - _tmp$8 = h0; - _tmp$9 = h1; - _tmp$10 = h2; - state.h[0] = _tmp$8; - state.h[1] = _tmp$9; - state.h[2] = _tmp$10; - }; - select64 = function(v, x, y) { - var v, x, x$1, x$2, x$3, x$4, x$5, y; - return (x$1 = (x$2 = (x$3 = new $Uint64(v.$high - 0, v.$low - 1), new $Uint64(~x$3.$high, ~x$3.$low >>> 0)), new $Uint64(x$2.$high & x.$high, (x$2.$low & x.$low) >>> 0)), x$4 = (x$5 = new $Uint64(v.$high - 0, v.$low - 1), new $Uint64(x$5.$high & y.$high, (x$5.$low & y.$low) >>> 0)), new $Uint64(x$1.$high | x$4.$high, (x$1.$low | x$4.$low) >>> 0)); - }; - finalize = function(out, h, s) { - var _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, c, h, h0, h1, h2, hMinusP0, hMinusP1, out, s; - _tmp = h[0]; - _tmp$1 = h[1]; - _tmp$2 = h[2]; - h0 = _tmp; - h1 = _tmp$1; - h2 = _tmp$2; - _tuple = bitsSub64(h0, new $Uint64(4294967295, 4294967291), new $Uint64(0, 0)); - hMinusP0 = _tuple[0]; - b = _tuple[1]; - _tuple$1 = bitsSub64(h1, new $Uint64(4294967295, 4294967295), b); - hMinusP1 = _tuple$1[0]; - b = _tuple$1[1]; - _tuple$2 = bitsSub64(h2, new $Uint64(0, 3), b); - b = _tuple$2[1]; - h0 = select64(b, h0, hMinusP0); - h1 = select64(b, h1, hMinusP1); - _tuple$3 = bitsAdd64(h0, s[0], new $Uint64(0, 0)); - h0 = _tuple$3[0]; - c = _tuple$3[1]; - _tuple$4 = bitsAdd64(h1, s[1], c); - h1 = _tuple$4[0]; - $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(new sliceType(out), 0, 8), h0); - $clone(binary.LittleEndian, binary.littleEndian).PutUint64($subslice(new sliceType(out), 8, 16), h1); - }; - New = function(key) { - var key, m; - m = new MAC.ptr(new mac.ptr(new macGeneric.ptr(new macState.ptr(arrayType.zero(), arrayType$1.zero(), arrayType$1.zero()), arrayType$2.zero(), 0)), false); - initialize(key, m.mac.macGeneric.macState); - return m; - }; - $pkg.New = New; - MAC.ptr.prototype.Size = function() { - var h; - h = this; - return 16; - }; - MAC.prototype.Size = function() { return this.$val.Size(); }; - MAC.ptr.prototype.Write = function(p) { - var _tuple, err, h, n, p; - n = 0; - err = $ifaceNil; - h = this; - if (h.finalized) { - $panic(new $String("poly1305: write to MAC after Sum or Verify")); - } - _tuple = h.mac.macGeneric.Write(p); - n = _tuple[0]; - err = _tuple[1]; - return [n, err]; - }; - MAC.prototype.Write = function(p) { return this.$val.Write(p); }; - MAC.ptr.prototype.Sum = function(b) { - var b, h, mac$1; - h = this; - mac$1 = arrayType$2.zero(); - h.mac.macGeneric.Sum(mac$1); - h.finalized = true; - return $appendSlice(b, new sliceType(mac$1)); - }; - MAC.prototype.Sum = function(b) { return this.$val.Sum(b); }; - MAC.ptr.prototype.Verify = function(expected) { - var expected, h, mac$1; - h = this; - mac$1 = arrayType$2.zero(); - h.mac.macGeneric.Sum(mac$1); - h.finalized = true; - return subtle.ConstantTimeCompare(expected, new sliceType(mac$1)) === 1; - }; - MAC.prototype.Verify = function(expected) { return this.$val.Verify(expected); }; - bitsAdd64 = function(x, y, carry) { - var _tuple, carry, carryOut, sum, x, y; - sum = new $Uint64(0, 0); - carryOut = new $Uint64(0, 0); - _tuple = bits.Add64(x, y, carry); - sum = _tuple[0]; - carryOut = _tuple[1]; - return [sum, carryOut]; - }; - bitsSub64 = function(x, y, borrow) { - var _tuple, borrow, borrowOut, diff, x, y; - diff = new $Uint64(0, 0); - borrowOut = new $Uint64(0, 0); - _tuple = bits.Sub64(x, y, borrow); - diff = _tuple[0]; - borrowOut = _tuple[1]; - return [diff, borrowOut]; - }; - bitsMul64 = function(x, y) { - var _tuple, hi, lo, x, y; - hi = new $Uint64(0, 0); - lo = new $Uint64(0, 0); - _tuple = bits.Mul64(x, y); - hi = _tuple[0]; - lo = _tuple[1]; - return [hi, lo]; - }; - ptrType$1.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([ptrType], [], false)}]; - ptrType$2.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType], [sliceType], false)}, {prop: "Verify", name: "Verify", pkg: "", typ: $funcType([sliceType], [$Bool], false)}]; - macState.init("vendor/golang.org/x/crypto/internal/poly1305", [{prop: "h", name: "h", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "s", name: "s", embedded: false, exported: false, typ: arrayType$1, tag: ""}]); - macGeneric.init("vendor/golang.org/x/crypto/internal/poly1305", [{prop: "macState", name: "macState", embedded: true, exported: false, typ: macState, tag: ""}, {prop: "buffer", name: "buffer", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: $Int, tag: ""}]); - uint128.init("vendor/golang.org/x/crypto/internal/poly1305", [{prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - MAC.init("vendor/golang.org/x/crypto/internal/poly1305", [{prop: "mac", name: "mac", embedded: true, exported: false, typ: mac, tag: ""}, {prop: "finalized", name: "finalized", embedded: false, exported: false, typ: $Bool, tag: ""}]); - mac.init("vendor/golang.org/x/crypto/internal/poly1305", [{prop: "macGeneric", name: "macGeneric", embedded: true, exported: false, typ: macGeneric, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/chacha20poly1305"] = (function() { - var $pkg = {}, $init, cipher, binary, errors, chacha20, poly1305, subtle, chacha20poly1305, arrayType, sliceType, arrayType$1, arrayType$2, ptrType$1, errOpen, writeWithPadding, writeUint64, New, sliceForAppend; - cipher = $packages["crypto/cipher"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - chacha20 = $packages["vendor/golang.org/x/crypto/chacha20"]; - poly1305 = $packages["vendor/golang.org/x/crypto/internal/poly1305"]; - subtle = $packages["vendor/golang.org/x/crypto/internal/subtle"]; - chacha20poly1305 = $pkg.chacha20poly1305 = $newType(0, $kindStruct, "chacha20poly1305.chacha20poly1305", true, "vendor/golang.org/x/crypto/chacha20poly1305", false, function(key_) { - this.$val = this; - if (arguments.length === 0) { - this.key = arrayType.zero(); - return; - } - this.key = key_; - }); - arrayType = $arrayType($Uint8, 32); - sliceType = $sliceType($Uint8); - arrayType$1 = $arrayType($Uint8, 16); - arrayType$2 = $arrayType($Uint8, 8); - ptrType$1 = $ptrType(chacha20poly1305); - chacha20poly1305.ptr.prototype.seal = function(dst, nonce, plaintext, additionalData) { - var additionalData, c, dst, nonce, plaintext; - c = this; - return c.sealGeneric(dst, nonce, plaintext, additionalData); - }; - chacha20poly1305.prototype.seal = function(dst, nonce, plaintext, additionalData) { return this.$val.seal(dst, nonce, plaintext, additionalData); }; - chacha20poly1305.ptr.prototype.open = function(dst, nonce, ciphertext, additionalData) { - var additionalData, c, ciphertext, dst, nonce; - c = this; - return c.openGeneric(dst, nonce, ciphertext, additionalData); - }; - chacha20poly1305.prototype.open = function(dst, nonce, ciphertext, additionalData) { return this.$val.open(dst, nonce, ciphertext, additionalData); }; - writeWithPadding = function(p, b) { - var _r, b, buf, p, padLen, rem; - p.Write(b); - rem = (_r = b.$length % 16, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - if (!((rem === 0))) { - buf = arrayType$1.zero(); - padLen = 16 - rem >> 0; - p.Write($subslice(new sliceType(buf), 0, padLen)); - } - }; - writeUint64 = function(p, n) { - var buf, n, p; - buf = arrayType$2.zero(); - $clone(binary.LittleEndian, binary.littleEndian).PutUint64(new sliceType(buf), (new $Uint64(0, n))); - p.Write(new sliceType(buf)); - }; - chacha20poly1305.ptr.prototype.sealGeneric = function(dst, nonce, plaintext, additionalData) { - var _tmp, _tmp$1, _tuple, _tuple$1, additionalData, c, ciphertext, dst, nonce, out, p, plaintext, polyKey, ret, s, tag; - c = this; - _tuple = sliceForAppend(dst, plaintext.$length + 16 >> 0); - ret = _tuple[0]; - out = _tuple[1]; - _tmp = $subslice(out, 0, plaintext.$length); - _tmp$1 = $subslice(out, plaintext.$length); - ciphertext = _tmp; - tag = _tmp$1; - if (subtle.InexactOverlap(out, plaintext)) { - $panic(new $String("chacha20poly1305: invalid buffer overlap")); - } - polyKey = arrayType.zero(); - _tuple$1 = chacha20.NewUnauthenticatedCipher(new sliceType(c.key), nonce); - s = _tuple$1[0]; - s.XORKeyStream(new sliceType(polyKey), new sliceType(polyKey)); - s.SetCounter(1); - s.XORKeyStream(ciphertext, plaintext); - p = poly1305.New(polyKey); - writeWithPadding(p, additionalData); - writeWithPadding(p, ciphertext); - writeUint64(p, additionalData.$length); - writeUint64(p, plaintext.$length); - p.Sum($subslice(tag, 0, 0)); - return ret; - }; - chacha20poly1305.prototype.sealGeneric = function(dst, nonce, plaintext, additionalData) { return this.$val.sealGeneric(dst, nonce, plaintext, additionalData); }; - chacha20poly1305.ptr.prototype.openGeneric = function(dst, nonce, ciphertext, additionalData) { - var _i, _ref, _tuple, _tuple$1, additionalData, c, ciphertext, dst, i, nonce, out, p, polyKey, ret, s, tag; - c = this; - tag = $subslice(ciphertext, (ciphertext.$length - 16 >> 0)); - ciphertext = $subslice(ciphertext, 0, (ciphertext.$length - 16 >> 0)); - polyKey = arrayType.zero(); - _tuple = chacha20.NewUnauthenticatedCipher(new sliceType(c.key), nonce); - s = _tuple[0]; - s.XORKeyStream(new sliceType(polyKey), new sliceType(polyKey)); - s.SetCounter(1); - p = poly1305.New(polyKey); - writeWithPadding(p, additionalData); - writeWithPadding(p, ciphertext); - writeUint64(p, additionalData.$length); - writeUint64(p, ciphertext.$length); - _tuple$1 = sliceForAppend(dst, ciphertext.$length); - ret = _tuple$1[0]; - out = _tuple$1[1]; - if (subtle.InexactOverlap(out, ciphertext)) { - $panic(new $String("chacha20poly1305: invalid buffer overlap")); - } - if (!p.Verify(tag)) { - _ref = out; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - ((i < 0 || i >= out.$length) ? ($throwRuntimeError("index out of range"), undefined) : out.$array[out.$offset + i] = 0); - _i++; - } - return [sliceType.nil, errOpen]; - } - s.XORKeyStream(out, ciphertext); - return [ret, $ifaceNil]; - }; - chacha20poly1305.prototype.openGeneric = function(dst, nonce, ciphertext, additionalData) { return this.$val.openGeneric(dst, nonce, ciphertext, additionalData); }; - New = function(key) { - var key, ret; - if (!((key.$length === 32))) { - return [$ifaceNil, errors.New("chacha20poly1305: bad key length")]; - } - ret = new chacha20poly1305.ptr(arrayType.zero()); - $copySlice(new sliceType(ret.key), key); - return [ret, $ifaceNil]; - }; - $pkg.New = New; - chacha20poly1305.ptr.prototype.NonceSize = function() { - var c; - c = this; - return 12; - }; - chacha20poly1305.prototype.NonceSize = function() { return this.$val.NonceSize(); }; - chacha20poly1305.ptr.prototype.Overhead = function() { - var c; - c = this; - return 16; - }; - chacha20poly1305.prototype.Overhead = function() { return this.$val.Overhead(); }; - chacha20poly1305.ptr.prototype.Seal = function(dst, nonce, plaintext, additionalData) { - var additionalData, c, dst, nonce, plaintext, x; - c = this; - if (!((nonce.$length === 12))) { - $panic(new $String("chacha20poly1305: bad nonce length passed to Seal")); - } - if ((x = (new $Uint64(0, plaintext.$length)), (x.$high > 63 || (x.$high === 63 && x.$low > 4294967232)))) { - $panic(new $String("chacha20poly1305: plaintext too large")); - } - return c.seal(dst, nonce, plaintext, additionalData); - }; - chacha20poly1305.prototype.Seal = function(dst, nonce, plaintext, additionalData) { return this.$val.Seal(dst, nonce, plaintext, additionalData); }; - chacha20poly1305.ptr.prototype.Open = function(dst, nonce, ciphertext, additionalData) { - var additionalData, c, ciphertext, dst, nonce, x; - c = this; - if (!((nonce.$length === 12))) { - $panic(new $String("chacha20poly1305: bad nonce length passed to Open")); - } - if (ciphertext.$length < 16) { - return [sliceType.nil, errOpen]; - } - if ((x = (new $Uint64(0, ciphertext.$length)), (x.$high > 63 || (x.$high === 63 && x.$low > 4294967248)))) { - $panic(new $String("chacha20poly1305: ciphertext too large")); - } - return c.open(dst, nonce, ciphertext, additionalData); - }; - chacha20poly1305.prototype.Open = function(dst, nonce, ciphertext, additionalData) { return this.$val.Open(dst, nonce, ciphertext, additionalData); }; - sliceForAppend = function(in$1, n) { - var head, in$1, n, tail, total; - head = sliceType.nil; - tail = sliceType.nil; - total = in$1.$length + n >> 0; - if (in$1.$capacity >= total) { - head = $subslice(in$1, 0, total); - } else { - head = $makeSlice(sliceType, total); - $copySlice(head, in$1); - } - tail = $subslice(head, in$1.$length); - return [head, tail]; - }; - ptrType$1.methods = [{prop: "seal", name: "seal", pkg: "vendor/golang.org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType], false)}, {prop: "open", name: "open", pkg: "vendor/golang.org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType, $error], false)}, {prop: "sealGeneric", name: "sealGeneric", pkg: "vendor/golang.org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType], false)}, {prop: "openGeneric", name: "openGeneric", pkg: "vendor/golang.org/x/crypto/chacha20poly1305", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType, $error], false)}, {prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType, sliceType, sliceType, sliceType], [sliceType, $error], false)}]; - chacha20poly1305.init("vendor/golang.org/x/crypto/chacha20poly1305", [{prop: "key", name: "key", embedded: false, exported: false, typ: arrayType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = cipher.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = chacha20.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = poly1305.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - errOpen = errors.New("chacha20poly1305: message authentication failed"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/curve25519/internal/field"] = (function() { - var $pkg = {}, $init, subtle, binary, bits, uint128, Element, arrayType, arrayType$1, sliceType, ptrType, ptrType$1, feZero, feOne, sqrtM1, mul64, addMul64, shiftRightBy51, feMulGeneric, feSquareGeneric, feMul, feSquare, mask64Bits, mul51; - subtle = $packages["crypto/subtle"]; - binary = $packages["encoding/binary"]; - bits = $packages["math/bits"]; - uint128 = $pkg.uint128 = $newType(0, $kindStruct, "field.uint128", true, "vendor/golang.org/x/crypto/curve25519/internal/field", false, function(lo_, hi_) { - this.$val = this; - if (arguments.length === 0) { - this.lo = new $Uint64(0, 0); - this.hi = new $Uint64(0, 0); - return; - } - this.lo = lo_; - this.hi = hi_; - }); - Element = $pkg.Element = $newType(0, $kindStruct, "field.Element", true, "vendor/golang.org/x/crypto/curve25519/internal/field", true, function(l0_, l1_, l2_, l3_, l4_) { - this.$val = this; - if (arguments.length === 0) { - this.l0 = new $Uint64(0, 0); - this.l1 = new $Uint64(0, 0); - this.l2 = new $Uint64(0, 0); - this.l3 = new $Uint64(0, 0); - this.l4 = new $Uint64(0, 0); - return; - } - this.l0 = l0_; - this.l1 = l1_; - this.l2 = l2_; - this.l3 = l3_; - this.l4 = l4_; - }); - arrayType = $arrayType($Uint8, 32); - arrayType$1 = $arrayType($Uint8, 8); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(Element); - ptrType$1 = $ptrType(arrayType); - mul64 = function(a, b) { - var _tuple, a, b, hi, lo; - _tuple = bits.Mul64(a, b); - hi = _tuple[0]; - lo = _tuple[1]; - return new uint128.ptr(lo, hi); - }; - addMul64 = function(v, a, b) { - var _tuple, _tuple$1, _tuple$2, a, b, c, hi, lo, v; - _tuple = bits.Mul64(a, b); - hi = _tuple[0]; - lo = _tuple[1]; - _tuple$1 = bits.Add64(lo, v.lo, new $Uint64(0, 0)); - lo = _tuple$1[0]; - c = _tuple$1[1]; - _tuple$2 = bits.Add64(hi, v.hi, c); - hi = _tuple$2[0]; - return new uint128.ptr(lo, hi); - }; - shiftRightBy51 = function(a) { - var a, x, x$1; - return (x = $shiftLeft64(a.hi, 13), x$1 = $shiftRightUint64(a.lo, 51), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - }; - feMulGeneric = function(v, a, b) { - var a, a0, a1, a1_19, a2, a2_19, a3, a3_19, a4, a4_19, b, b0, b1, b2, b3, b4, c0, c1, c2, c3, c4, r0, r1, r2, r3, r4, rr0, rr1, rr2, rr3, rr4, v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - a0 = a.l0; - a1 = a.l1; - a2 = a.l2; - a3 = a.l3; - a4 = a.l4; - b0 = b.l0; - b1 = b.l1; - b2 = b.l2; - b3 = b.l3; - b4 = b.l4; - a1_19 = $mul64(a1, new $Uint64(0, 19)); - a2_19 = $mul64(a2, new $Uint64(0, 19)); - a3_19 = $mul64(a3, new $Uint64(0, 19)); - a4_19 = $mul64(a4, new $Uint64(0, 19)); - r0 = $clone(mul64(a0, b0), uint128); - uint128.copy(r0, addMul64($clone(r0, uint128), a1_19, b4)); - uint128.copy(r0, addMul64($clone(r0, uint128), a2_19, b3)); - uint128.copy(r0, addMul64($clone(r0, uint128), a3_19, b2)); - uint128.copy(r0, addMul64($clone(r0, uint128), a4_19, b1)); - r1 = $clone(mul64(a0, b1), uint128); - uint128.copy(r1, addMul64($clone(r1, uint128), a1, b0)); - uint128.copy(r1, addMul64($clone(r1, uint128), a2_19, b4)); - uint128.copy(r1, addMul64($clone(r1, uint128), a3_19, b3)); - uint128.copy(r1, addMul64($clone(r1, uint128), a4_19, b2)); - r2 = $clone(mul64(a0, b2), uint128); - uint128.copy(r2, addMul64($clone(r2, uint128), a1, b1)); - uint128.copy(r2, addMul64($clone(r2, uint128), a2, b0)); - uint128.copy(r2, addMul64($clone(r2, uint128), a3_19, b4)); - uint128.copy(r2, addMul64($clone(r2, uint128), a4_19, b3)); - r3 = $clone(mul64(a0, b3), uint128); - uint128.copy(r3, addMul64($clone(r3, uint128), a1, b2)); - uint128.copy(r3, addMul64($clone(r3, uint128), a2, b1)); - uint128.copy(r3, addMul64($clone(r3, uint128), a3, b0)); - uint128.copy(r3, addMul64($clone(r3, uint128), a4_19, b4)); - r4 = $clone(mul64(a0, b4), uint128); - uint128.copy(r4, addMul64($clone(r4, uint128), a1, b3)); - uint128.copy(r4, addMul64($clone(r4, uint128), a2, b2)); - uint128.copy(r4, addMul64($clone(r4, uint128), a3, b1)); - uint128.copy(r4, addMul64($clone(r4, uint128), a4, b0)); - c0 = shiftRightBy51($clone(r0, uint128)); - c1 = shiftRightBy51($clone(r1, uint128)); - c2 = shiftRightBy51($clone(r2, uint128)); - c3 = shiftRightBy51($clone(r3, uint128)); - c4 = shiftRightBy51($clone(r4, uint128)); - rr0 = (x = (x$1 = r0.lo, new $Uint64(x$1.$high & 524287, (x$1.$low & 4294967295) >>> 0)), x$2 = $mul64(c4, new $Uint64(0, 19)), new $Uint64(x.$high + x$2.$high, x.$low + x$2.$low)); - rr1 = (x$3 = (x$4 = r1.lo, new $Uint64(x$4.$high & 524287, (x$4.$low & 4294967295) >>> 0)), new $Uint64(x$3.$high + c0.$high, x$3.$low + c0.$low)); - rr2 = (x$5 = (x$6 = r2.lo, new $Uint64(x$6.$high & 524287, (x$6.$low & 4294967295) >>> 0)), new $Uint64(x$5.$high + c1.$high, x$5.$low + c1.$low)); - rr3 = (x$7 = (x$8 = r3.lo, new $Uint64(x$8.$high & 524287, (x$8.$low & 4294967295) >>> 0)), new $Uint64(x$7.$high + c2.$high, x$7.$low + c2.$low)); - rr4 = (x$9 = (x$10 = r4.lo, new $Uint64(x$10.$high & 524287, (x$10.$low & 4294967295) >>> 0)), new $Uint64(x$9.$high + c3.$high, x$9.$low + c3.$low)); - Element.copy(v, new Element.ptr(rr0, rr1, rr2, rr3, rr4)); - v.carryPropagate(); - }; - feSquareGeneric = function(v, a) { - var a, c0, c1, c2, c3, c4, l0, l0_2, l1, l1_2, l1_38, l2, l2_38, l3, l3_19, l3_38, l4, l4_19, r0, r1, r2, r3, r4, rr0, rr1, rr2, rr3, rr4, v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - l0 = a.l0; - l1 = a.l1; - l2 = a.l2; - l3 = a.l3; - l4 = a.l4; - l0_2 = $mul64(l0, new $Uint64(0, 2)); - l1_2 = $mul64(l1, new $Uint64(0, 2)); - l1_38 = $mul64(l1, new $Uint64(0, 38)); - l2_38 = $mul64(l2, new $Uint64(0, 38)); - l3_38 = $mul64(l3, new $Uint64(0, 38)); - l3_19 = $mul64(l3, new $Uint64(0, 19)); - l4_19 = $mul64(l4, new $Uint64(0, 19)); - r0 = $clone(mul64(l0, l0), uint128); - uint128.copy(r0, addMul64($clone(r0, uint128), l1_38, l4)); - uint128.copy(r0, addMul64($clone(r0, uint128), l2_38, l3)); - r1 = $clone(mul64(l0_2, l1), uint128); - uint128.copy(r1, addMul64($clone(r1, uint128), l2_38, l4)); - uint128.copy(r1, addMul64($clone(r1, uint128), l3_19, l3)); - r2 = $clone(mul64(l0_2, l2), uint128); - uint128.copy(r2, addMul64($clone(r2, uint128), l1, l1)); - uint128.copy(r2, addMul64($clone(r2, uint128), l3_38, l4)); - r3 = $clone(mul64(l0_2, l3), uint128); - uint128.copy(r3, addMul64($clone(r3, uint128), l1_2, l2)); - uint128.copy(r3, addMul64($clone(r3, uint128), l4_19, l4)); - r4 = $clone(mul64(l0_2, l4), uint128); - uint128.copy(r4, addMul64($clone(r4, uint128), l1_2, l3)); - uint128.copy(r4, addMul64($clone(r4, uint128), l2, l2)); - c0 = shiftRightBy51($clone(r0, uint128)); - c1 = shiftRightBy51($clone(r1, uint128)); - c2 = shiftRightBy51($clone(r2, uint128)); - c3 = shiftRightBy51($clone(r3, uint128)); - c4 = shiftRightBy51($clone(r4, uint128)); - rr0 = (x = (x$1 = r0.lo, new $Uint64(x$1.$high & 524287, (x$1.$low & 4294967295) >>> 0)), x$2 = $mul64(c4, new $Uint64(0, 19)), new $Uint64(x.$high + x$2.$high, x.$low + x$2.$low)); - rr1 = (x$3 = (x$4 = r1.lo, new $Uint64(x$4.$high & 524287, (x$4.$low & 4294967295) >>> 0)), new $Uint64(x$3.$high + c0.$high, x$3.$low + c0.$low)); - rr2 = (x$5 = (x$6 = r2.lo, new $Uint64(x$6.$high & 524287, (x$6.$low & 4294967295) >>> 0)), new $Uint64(x$5.$high + c1.$high, x$5.$low + c1.$low)); - rr3 = (x$7 = (x$8 = r3.lo, new $Uint64(x$8.$high & 524287, (x$8.$low & 4294967295) >>> 0)), new $Uint64(x$7.$high + c2.$high, x$7.$low + c2.$low)); - rr4 = (x$9 = (x$10 = r4.lo, new $Uint64(x$10.$high & 524287, (x$10.$low & 4294967295) >>> 0)), new $Uint64(x$9.$high + c3.$high, x$9.$low + c3.$low)); - Element.copy(v, new Element.ptr(rr0, rr1, rr2, rr3, rr4)); - v.carryPropagate(); - }; - Element.ptr.prototype.carryPropagateGeneric = function() { - var c0, c1, c2, c3, c4, v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - c0 = $shiftRightUint64(v.l0, 51); - c1 = $shiftRightUint64(v.l1, 51); - c2 = $shiftRightUint64(v.l2, 51); - c3 = $shiftRightUint64(v.l3, 51); - c4 = $shiftRightUint64(v.l4, 51); - v.l0 = (x = (x$1 = v.l0, new $Uint64(x$1.$high & 524287, (x$1.$low & 4294967295) >>> 0)), x$2 = $mul64(c4, new $Uint64(0, 19)), new $Uint64(x.$high + x$2.$high, x.$low + x$2.$low)); - v.l1 = (x$3 = (x$4 = v.l1, new $Uint64(x$4.$high & 524287, (x$4.$low & 4294967295) >>> 0)), new $Uint64(x$3.$high + c0.$high, x$3.$low + c0.$low)); - v.l2 = (x$5 = (x$6 = v.l2, new $Uint64(x$6.$high & 524287, (x$6.$low & 4294967295) >>> 0)), new $Uint64(x$5.$high + c1.$high, x$5.$low + c1.$low)); - v.l3 = (x$7 = (x$8 = v.l3, new $Uint64(x$8.$high & 524287, (x$8.$low & 4294967295) >>> 0)), new $Uint64(x$7.$high + c2.$high, x$7.$low + c2.$low)); - v.l4 = (x$9 = (x$10 = v.l4, new $Uint64(x$10.$high & 524287, (x$10.$low & 4294967295) >>> 0)), new $Uint64(x$9.$high + c3.$high, x$9.$low + c3.$low)); - return v; - }; - Element.prototype.carryPropagateGeneric = function() { return this.$val.carryPropagateGeneric(); }; - Element.ptr.prototype.carryPropagate = function() { - var v; - v = this; - return v.carryPropagateGeneric(); - }; - Element.prototype.carryPropagate = function() { return this.$val.carryPropagate(); }; - feMul = function(v, x, y) { - var v, x, y; - feMulGeneric(v, x, y); - }; - feSquare = function(v, x) { - var v, x; - feSquareGeneric(v, x); - }; - Element.ptr.prototype.Zero = function() { - var v; - v = this; - Element.copy(v, feZero); - return v; - }; - Element.prototype.Zero = function() { return this.$val.Zero(); }; - Element.ptr.prototype.One = function() { - var v; - v = this; - Element.copy(v, feOne); - return v; - }; - Element.prototype.One = function() { return this.$val.One(); }; - Element.ptr.prototype.reduce = function() { - var c, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - v.carryPropagate(); - c = $shiftRightUint64(((x = v.l0, new $Uint64(x.$high + 0, x.$low + 19))), 51); - c = $shiftRightUint64(((x$1 = v.l1, new $Uint64(x$1.$high + c.$high, x$1.$low + c.$low))), 51); - c = $shiftRightUint64(((x$2 = v.l2, new $Uint64(x$2.$high + c.$high, x$2.$low + c.$low))), 51); - c = $shiftRightUint64(((x$3 = v.l3, new $Uint64(x$3.$high + c.$high, x$3.$low + c.$low))), 51); - c = $shiftRightUint64(((x$4 = v.l4, new $Uint64(x$4.$high + c.$high, x$4.$low + c.$low))), 51); - v.l0 = (x$5 = v.l0, x$6 = $mul64(new $Uint64(0, 19), c), new $Uint64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - v.l1 = (x$7 = v.l1, x$8 = $shiftRightUint64(v.l0, 51), new $Uint64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)); - v.l0 = (x$9 = v.l0, new $Uint64(x$9.$high & 524287, (x$9.$low & 4294967295) >>> 0)); - v.l2 = (x$10 = v.l2, x$11 = $shiftRightUint64(v.l1, 51), new $Uint64(x$10.$high + x$11.$high, x$10.$low + x$11.$low)); - v.l1 = (x$12 = v.l1, new $Uint64(x$12.$high & 524287, (x$12.$low & 4294967295) >>> 0)); - v.l3 = (x$13 = v.l3, x$14 = $shiftRightUint64(v.l2, 51), new $Uint64(x$13.$high + x$14.$high, x$13.$low + x$14.$low)); - v.l2 = (x$15 = v.l2, new $Uint64(x$15.$high & 524287, (x$15.$low & 4294967295) >>> 0)); - v.l4 = (x$16 = v.l4, x$17 = $shiftRightUint64(v.l3, 51), new $Uint64(x$16.$high + x$17.$high, x$16.$low + x$17.$low)); - v.l3 = (x$18 = v.l3, new $Uint64(x$18.$high & 524287, (x$18.$low & 4294967295) >>> 0)); - v.l4 = (x$19 = v.l4, new $Uint64(x$19.$high & 524287, (x$19.$low & 4294967295) >>> 0)); - return v; - }; - Element.prototype.reduce = function() { return this.$val.reduce(); }; - Element.ptr.prototype.Add = function(a, b) { - var a, b, v, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - v.l0 = (x = a.l0, x$1 = b.l0, new $Uint64(x.$high + x$1.$high, x.$low + x$1.$low)); - v.l1 = (x$2 = a.l1, x$3 = b.l1, new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)); - v.l2 = (x$4 = a.l2, x$5 = b.l2, new $Uint64(x$4.$high + x$5.$high, x$4.$low + x$5.$low)); - v.l3 = (x$6 = a.l3, x$7 = b.l3, new $Uint64(x$6.$high + x$7.$high, x$6.$low + x$7.$low)); - v.l4 = (x$8 = a.l4, x$9 = b.l4, new $Uint64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)); - return v.carryPropagateGeneric(); - }; - Element.prototype.Add = function(a, b) { return this.$val.Add(a, b); }; - Element.ptr.prototype.Subtract = function(a, b) { - var a, b, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - v.l0 = (x = (x$1 = a.l0, new $Uint64(x$1.$high + 1048575, x$1.$low + 4294967258)), x$2 = b.l0, new $Uint64(x.$high - x$2.$high, x.$low - x$2.$low)); - v.l1 = (x$3 = (x$4 = a.l1, new $Uint64(x$4.$high + 1048575, x$4.$low + 4294967294)), x$5 = b.l1, new $Uint64(x$3.$high - x$5.$high, x$3.$low - x$5.$low)); - v.l2 = (x$6 = (x$7 = a.l2, new $Uint64(x$7.$high + 1048575, x$7.$low + 4294967294)), x$8 = b.l2, new $Uint64(x$6.$high - x$8.$high, x$6.$low - x$8.$low)); - v.l3 = (x$9 = (x$10 = a.l3, new $Uint64(x$10.$high + 1048575, x$10.$low + 4294967294)), x$11 = b.l3, new $Uint64(x$9.$high - x$11.$high, x$9.$low - x$11.$low)); - v.l4 = (x$12 = (x$13 = a.l4, new $Uint64(x$13.$high + 1048575, x$13.$low + 4294967294)), x$14 = b.l4, new $Uint64(x$12.$high - x$14.$high, x$12.$low - x$14.$low)); - return v.carryPropagate(); - }; - Element.prototype.Subtract = function(a, b) { return this.$val.Subtract(a, b); }; - Element.ptr.prototype.Negate = function(a) { - var a, v; - v = this; - return v.Subtract(feZero, a); - }; - Element.prototype.Negate = function(a) { return this.$val.Negate(a); }; - Element.ptr.prototype.Invert = function(z) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, i, i$1, i$2, i$3, i$4, i$5, i$6, t, v, z, z11, z2, z2_100_0, z2_10_0, z2_20_0, z2_50_0, z2_5_0, z9; - v = this; - _tmp = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$6 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$7 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$8 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - z2 = $clone(_tmp, Element); - z9 = $clone(_tmp$1, Element); - z11 = $clone(_tmp$2, Element); - z2_5_0 = $clone(_tmp$3, Element); - z2_10_0 = $clone(_tmp$4, Element); - z2_20_0 = $clone(_tmp$5, Element); - z2_50_0 = $clone(_tmp$6, Element); - z2_100_0 = $clone(_tmp$7, Element); - t = $clone(_tmp$8, Element); - z2.Square(z); - t.Square(z2); - t.Square(t); - z9.Multiply(t, z); - z11.Multiply(z9, z2); - t.Square(z11); - z2_5_0.Multiply(t, z9); - t.Square(z2_5_0); - i = 0; - while (true) { - if (!(i < 4)) { break; } - t.Square(t); - i = i + (1) >> 0; - } - z2_10_0.Multiply(t, z2_5_0); - t.Square(z2_10_0); - i$1 = 0; - while (true) { - if (!(i$1 < 9)) { break; } - t.Square(t); - i$1 = i$1 + (1) >> 0; - } - z2_20_0.Multiply(t, z2_10_0); - t.Square(z2_20_0); - i$2 = 0; - while (true) { - if (!(i$2 < 19)) { break; } - t.Square(t); - i$2 = i$2 + (1) >> 0; - } - t.Multiply(t, z2_20_0); - t.Square(t); - i$3 = 0; - while (true) { - if (!(i$3 < 9)) { break; } - t.Square(t); - i$3 = i$3 + (1) >> 0; - } - z2_50_0.Multiply(t, z2_10_0); - t.Square(z2_50_0); - i$4 = 0; - while (true) { - if (!(i$4 < 49)) { break; } - t.Square(t); - i$4 = i$4 + (1) >> 0; - } - z2_100_0.Multiply(t, z2_50_0); - t.Square(z2_100_0); - i$5 = 0; - while (true) { - if (!(i$5 < 99)) { break; } - t.Square(t); - i$5 = i$5 + (1) >> 0; - } - t.Multiply(t, z2_100_0); - t.Square(t); - i$6 = 0; - while (true) { - if (!(i$6 < 49)) { break; } - t.Square(t); - i$6 = i$6 + (1) >> 0; - } - t.Multiply(t, z2_50_0); - t.Square(t); - t.Square(t); - t.Square(t); - t.Square(t); - t.Square(t); - return v.Multiply(t, z11); - }; - Element.prototype.Invert = function(z) { return this.$val.Invert(z); }; - Element.ptr.prototype.Set = function(a) { - var a, v; - v = this; - Element.copy(v, a); - return v; - }; - Element.prototype.Set = function(a) { return this.$val.Set(a); }; - Element.ptr.prototype.SetBytes = function(x) { - var v, x, x$1, x$10, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - if (!((x.$length === 32))) { - $panic(new $String("edwards25519: invalid field element input size")); - } - v.l0 = $clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 0, 8)); - v.l0 = (x$1 = v.l0, x$2 = new $Uint64(524287, 4294967295), new $Uint64(x$1.$high & x$2.$high, (x$1.$low & x$2.$low) >>> 0)); - v.l1 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 6, 14)), 3); - v.l1 = (x$3 = v.l1, x$4 = new $Uint64(524287, 4294967295), new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)); - v.l2 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 12, 20)), 6); - v.l2 = (x$5 = v.l2, x$6 = new $Uint64(524287, 4294967295), new $Uint64(x$5.$high & x$6.$high, (x$5.$low & x$6.$low) >>> 0)); - v.l3 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 19, 27)), 1); - v.l3 = (x$7 = v.l3, x$8 = new $Uint64(524287, 4294967295), new $Uint64(x$7.$high & x$8.$high, (x$7.$low & x$8.$low) >>> 0)); - v.l4 = $shiftRightUint64($clone(binary.LittleEndian, binary.littleEndian).Uint64($subslice(x, 24, 32)), 12); - v.l4 = (x$9 = v.l4, x$10 = new $Uint64(524287, 4294967295), new $Uint64(x$9.$high & x$10.$high, (x$9.$low & x$10.$low) >>> 0)); - return v; - }; - Element.prototype.SetBytes = function(x) { return this.$val.SetBytes(x); }; - Element.ptr.prototype.Bytes = function() { - var out, v; - v = this; - out = arrayType.zero(); - return v.bytes(out); - }; - Element.prototype.Bytes = function() { return this.$val.Bytes(); }; - Element.ptr.prototype.bytes = function(out) { - var _i, _i$1, _q, _r, _ref, _ref$1, bb, bitsOffset, buf, i, i$1, l, off, out, t, v, x, x$1; - v = this; - t = $clone(v, Element); - t.reduce(); - buf = arrayType$1.zero(); - _ref = $toNativeArray($kindUint64, [t.l0, t.l1, t.l2, t.l3, t.l4]); - _i = 0; - while (true) { - if (!(_i < 5)) { break; } - i = _i; - l = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); - bitsOffset = $imul(i, 51); - $clone(binary.LittleEndian, binary.littleEndian).PutUint64(new sliceType(buf), $shiftLeft64(l, (((_r = bitsOffset % 8, _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >>> 0)))); - _ref$1 = buf; - _i$1 = 0; - while (true) { - if (!(_i$1 < 8)) { break; } - i$1 = _i$1; - bb = ((_i$1 < 0 || _i$1 >= _ref$1.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1[_i$1]); - off = (_q = bitsOffset / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) + i$1 >> 0; - if (off >= 32) { - break; - } - (x$1 = out, ((off < 0 || off >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[off] = (((x = out, ((off < 0 || off >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[off])) | (bb)) >>> 0))); - _i$1++; - } - _i++; - } - return new sliceType(out); - }; - Element.prototype.bytes = function(out) { return this.$val.bytes(out); }; - Element.ptr.prototype.Equal = function(u) { - var _tmp, _tmp$1, sa, sv, u, v; - v = this; - _tmp = u.Bytes(); - _tmp$1 = v.Bytes(); - sa = _tmp; - sv = _tmp$1; - return subtle.ConstantTimeCompare(sa, sv); - }; - Element.prototype.Equal = function(u) { return this.$val.Equal(u); }; - mask64Bits = function(cond) { - var cond, x, x$1; - return (x = (x$1 = (new $Uint64(0, cond)), new $Uint64(x$1.$high - 0, x$1.$low - 1)), new $Uint64(~x.$high, ~x.$low >>> 0)); - }; - Element.ptr.prototype.Select = function(a, b, cond) { - var a, b, cond, m, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - m = mask64Bits(cond); - v.l0 = (x = (x$1 = a.l0, new $Uint64(m.$high & x$1.$high, (m.$low & x$1.$low) >>> 0)), x$2 = (x$3 = new $Uint64(~m.$high, ~m.$low >>> 0), x$4 = b.l0, new $Uint64(x$3.$high & x$4.$high, (x$3.$low & x$4.$low) >>> 0)), new $Uint64(x.$high | x$2.$high, (x.$low | x$2.$low) >>> 0)); - v.l1 = (x$5 = (x$6 = a.l1, new $Uint64(m.$high & x$6.$high, (m.$low & x$6.$low) >>> 0)), x$7 = (x$8 = new $Uint64(~m.$high, ~m.$low >>> 0), x$9 = b.l1, new $Uint64(x$8.$high & x$9.$high, (x$8.$low & x$9.$low) >>> 0)), new $Uint64(x$5.$high | x$7.$high, (x$5.$low | x$7.$low) >>> 0)); - v.l2 = (x$10 = (x$11 = a.l2, new $Uint64(m.$high & x$11.$high, (m.$low & x$11.$low) >>> 0)), x$12 = (x$13 = new $Uint64(~m.$high, ~m.$low >>> 0), x$14 = b.l2, new $Uint64(x$13.$high & x$14.$high, (x$13.$low & x$14.$low) >>> 0)), new $Uint64(x$10.$high | x$12.$high, (x$10.$low | x$12.$low) >>> 0)); - v.l3 = (x$15 = (x$16 = a.l3, new $Uint64(m.$high & x$16.$high, (m.$low & x$16.$low) >>> 0)), x$17 = (x$18 = new $Uint64(~m.$high, ~m.$low >>> 0), x$19 = b.l3, new $Uint64(x$18.$high & x$19.$high, (x$18.$low & x$19.$low) >>> 0)), new $Uint64(x$15.$high | x$17.$high, (x$15.$low | x$17.$low) >>> 0)); - v.l4 = (x$20 = (x$21 = a.l4, new $Uint64(m.$high & x$21.$high, (m.$low & x$21.$low) >>> 0)), x$22 = (x$23 = new $Uint64(~m.$high, ~m.$low >>> 0), x$24 = b.l4, new $Uint64(x$23.$high & x$24.$high, (x$23.$low & x$24.$low) >>> 0)), new $Uint64(x$20.$high | x$22.$high, (x$20.$low | x$22.$low) >>> 0)); - return v; - }; - Element.prototype.Select = function(a, b, cond) { return this.$val.Select(a, b, cond); }; - Element.ptr.prototype.Swap = function(u, cond) { - var cond, m, t, u, v, x, x$1, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$2, x$20, x$21, x$22, x$23, x$24, x$25, x$26, x$27, x$28, x$29, x$3, x$30, x$31, x$32, x$33, x$34, x$4, x$5, x$6, x$7, x$8, x$9; - v = this; - m = mask64Bits(cond); - t = (x = (x$1 = v.l0, x$2 = u.l0, new $Uint64(x$1.$high ^ x$2.$high, (x$1.$low ^ x$2.$low) >>> 0)), new $Uint64(m.$high & x.$high, (m.$low & x.$low) >>> 0)); - v.l0 = (x$3 = v.l0, x$4 = t, new $Uint64(x$3.$high ^ x$4.$high, (x$3.$low ^ x$4.$low) >>> 0)); - u.l0 = (x$5 = u.l0, x$6 = t, new $Uint64(x$5.$high ^ x$6.$high, (x$5.$low ^ x$6.$low) >>> 0)); - t = (x$7 = (x$8 = v.l1, x$9 = u.l1, new $Uint64(x$8.$high ^ x$9.$high, (x$8.$low ^ x$9.$low) >>> 0)), new $Uint64(m.$high & x$7.$high, (m.$low & x$7.$low) >>> 0)); - v.l1 = (x$10 = v.l1, x$11 = t, new $Uint64(x$10.$high ^ x$11.$high, (x$10.$low ^ x$11.$low) >>> 0)); - u.l1 = (x$12 = u.l1, x$13 = t, new $Uint64(x$12.$high ^ x$13.$high, (x$12.$low ^ x$13.$low) >>> 0)); - t = (x$14 = (x$15 = v.l2, x$16 = u.l2, new $Uint64(x$15.$high ^ x$16.$high, (x$15.$low ^ x$16.$low) >>> 0)), new $Uint64(m.$high & x$14.$high, (m.$low & x$14.$low) >>> 0)); - v.l2 = (x$17 = v.l2, x$18 = t, new $Uint64(x$17.$high ^ x$18.$high, (x$17.$low ^ x$18.$low) >>> 0)); - u.l2 = (x$19 = u.l2, x$20 = t, new $Uint64(x$19.$high ^ x$20.$high, (x$19.$low ^ x$20.$low) >>> 0)); - t = (x$21 = (x$22 = v.l3, x$23 = u.l3, new $Uint64(x$22.$high ^ x$23.$high, (x$22.$low ^ x$23.$low) >>> 0)), new $Uint64(m.$high & x$21.$high, (m.$low & x$21.$low) >>> 0)); - v.l3 = (x$24 = v.l3, x$25 = t, new $Uint64(x$24.$high ^ x$25.$high, (x$24.$low ^ x$25.$low) >>> 0)); - u.l3 = (x$26 = u.l3, x$27 = t, new $Uint64(x$26.$high ^ x$27.$high, (x$26.$low ^ x$27.$low) >>> 0)); - t = (x$28 = (x$29 = v.l4, x$30 = u.l4, new $Uint64(x$29.$high ^ x$30.$high, (x$29.$low ^ x$30.$low) >>> 0)), new $Uint64(m.$high & x$28.$high, (m.$low & x$28.$low) >>> 0)); - v.l4 = (x$31 = v.l4, x$32 = t, new $Uint64(x$31.$high ^ x$32.$high, (x$31.$low ^ x$32.$low) >>> 0)); - u.l4 = (x$33 = u.l4, x$34 = t, new $Uint64(x$33.$high ^ x$34.$high, (x$33.$low ^ x$34.$low) >>> 0)); - }; - Element.prototype.Swap = function(u, cond) { return this.$val.Swap(u, cond); }; - Element.ptr.prototype.IsNegative = function() { - var v, x; - v = this; - return (((((x = v.Bytes(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) & 1) >>> 0) >> 0)); - }; - Element.prototype.IsNegative = function() { return this.$val.IsNegative(); }; - Element.ptr.prototype.Absolute = function(u) { - var u, v; - v = this; - return v.Select(new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)).Negate(u), u, u.IsNegative()); - }; - Element.prototype.Absolute = function(u) { return this.$val.Absolute(u); }; - Element.ptr.prototype.Multiply = function(x, y) { - var v, x, y; - v = this; - feMul(v, x, y); - return v; - }; - Element.prototype.Multiply = function(x, y) { return this.$val.Multiply(x, y); }; - Element.ptr.prototype.Square = function(x) { - var v, x; - v = this; - feSquare(v, x); - return v; - }; - Element.prototype.Square = function(x) { return this.$val.Square(x); }; - Element.ptr.prototype.Mult32 = function(x, y) { - var _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, v, x, x$1, x0hi, x0lo, x1hi, x1lo, x2hi, x2lo, x3hi, x3lo, x4hi, x4lo, y; - v = this; - _tuple = mul51(x.l0, y); - x0lo = _tuple[0]; - x0hi = _tuple[1]; - _tuple$1 = mul51(x.l1, y); - x1lo = _tuple$1[0]; - x1hi = _tuple$1[1]; - _tuple$2 = mul51(x.l2, y); - x2lo = _tuple$2[0]; - x2hi = _tuple$2[1]; - _tuple$3 = mul51(x.l3, y); - x3lo = _tuple$3[0]; - x3hi = _tuple$3[1]; - _tuple$4 = mul51(x.l4, y); - x4lo = _tuple$4[0]; - x4hi = _tuple$4[1]; - v.l0 = (x$1 = $mul64(new $Uint64(0, 19), x4hi), new $Uint64(x0lo.$high + x$1.$high, x0lo.$low + x$1.$low)); - v.l1 = new $Uint64(x1lo.$high + x0hi.$high, x1lo.$low + x0hi.$low); - v.l2 = new $Uint64(x2lo.$high + x1hi.$high, x2lo.$low + x1hi.$low); - v.l3 = new $Uint64(x3lo.$high + x2hi.$high, x3lo.$low + x2hi.$low); - v.l4 = new $Uint64(x4lo.$high + x3hi.$high, x4lo.$low + x3hi.$low); - return v; - }; - Element.prototype.Mult32 = function(x, y) { return this.$val.Mult32(x, y); }; - mul51 = function(a, b) { - var _tuple, a, b, hi, lo, mh, ml, x, x$1; - lo = new $Uint64(0, 0); - hi = new $Uint64(0, 0); - _tuple = bits.Mul64(a, (new $Uint64(0, b))); - mh = _tuple[0]; - ml = _tuple[1]; - lo = new $Uint64(ml.$high & 524287, (ml.$low & 4294967295) >>> 0); - hi = (x = $shiftLeft64(mh, 13), x$1 = $shiftRightUint64(ml, 51), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0)); - return [lo, hi]; - }; - Element.ptr.prototype.Pow22523 = function(x) { - var _tmp, _tmp$1, _tmp$2, i, i$1, i$2, i$3, i$4, i$5, i$6, t0, t1, t2, v, x; - v = this; - _tmp = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - t0 = $clone(_tmp, Element); - t1 = $clone(_tmp$1, Element); - t2 = $clone(_tmp$2, Element); - t0.Square(x); - t1.Square(t0); - t1.Square(t1); - t1.Multiply(x, t1); - t0.Multiply(t0, t1); - t0.Square(t0); - t0.Multiply(t1, t0); - t1.Square(t0); - i = 1; - while (true) { - if (!(i < 5)) { break; } - t1.Square(t1); - i = i + (1) >> 0; - } - t0.Multiply(t1, t0); - t1.Square(t0); - i$1 = 1; - while (true) { - if (!(i$1 < 10)) { break; } - t1.Square(t1); - i$1 = i$1 + (1) >> 0; - } - t1.Multiply(t1, t0); - t2.Square(t1); - i$2 = 1; - while (true) { - if (!(i$2 < 20)) { break; } - t2.Square(t2); - i$2 = i$2 + (1) >> 0; - } - t1.Multiply(t2, t1); - t1.Square(t1); - i$3 = 1; - while (true) { - if (!(i$3 < 10)) { break; } - t1.Square(t1); - i$3 = i$3 + (1) >> 0; - } - t0.Multiply(t1, t0); - t1.Square(t0); - i$4 = 1; - while (true) { - if (!(i$4 < 50)) { break; } - t1.Square(t1); - i$4 = i$4 + (1) >> 0; - } - t1.Multiply(t1, t0); - t2.Square(t1); - i$5 = 1; - while (true) { - if (!(i$5 < 100)) { break; } - t2.Square(t2); - i$5 = i$5 + (1) >> 0; - } - t1.Multiply(t2, t1); - t1.Square(t1); - i$6 = 1; - while (true) { - if (!(i$6 < 50)) { break; } - t1.Square(t1); - i$6 = i$6 + (1) >> 0; - } - t0.Multiply(t1, t0); - t0.Square(t0); - t0.Square(t0); - return v.Multiply(t0, x); - }; - Element.prototype.Pow22523 = function(x) { return this.$val.Pow22523(x); }; - Element.ptr.prototype.SqrtRatio = function(u, v) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, check, correctSignSqrt, flippedSignSqrt, flippedSignSqrtI, r, rPrime, rr, u, uNeg, uv3, uv7, v, v2, wasSquare; - rr = ptrType.nil; - wasSquare = 0; - r = this; - _tmp = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - a = $clone(_tmp, Element); - b = $clone(_tmp$1, Element); - v2 = a.Square(v); - uv3 = b.Multiply(u, b.Multiply(v2, v)); - uv7 = a.Multiply(uv3, a.Square(v2)); - r.Multiply(uv3, r.Pow22523(uv7)); - check = a.Multiply(v, a.Square(r)); - uNeg = b.Negate(u); - correctSignSqrt = check.Equal(u); - flippedSignSqrt = check.Equal(uNeg); - flippedSignSqrtI = check.Equal(uNeg.Multiply(uNeg, sqrtM1)); - rPrime = b.Multiply(r, sqrtM1); - r.Select(rPrime, r, flippedSignSqrt | flippedSignSqrtI); - r.Absolute(r); - _tmp$2 = r; - _tmp$3 = correctSignSqrt | flippedSignSqrt; - rr = _tmp$2; - wasSquare = _tmp$3; - return [rr, wasSquare]; - }; - Element.prototype.SqrtRatio = function(u, v) { return this.$val.SqrtRatio(u, v); }; - ptrType.methods = [{prop: "carryPropagateGeneric", name: "carryPropagateGeneric", pkg: "vendor/golang.org/x/crypto/curve25519/internal/field", typ: $funcType([], [ptrType], false)}, {prop: "carryPropagate", name: "carryPropagate", pkg: "vendor/golang.org/x/crypto/curve25519/internal/field", typ: $funcType([], [ptrType], false)}, {prop: "Zero", name: "Zero", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "One", name: "One", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "reduce", name: "reduce", pkg: "vendor/golang.org/x/crypto/curve25519/internal/field", typ: $funcType([], [ptrType], false)}, {prop: "Add", name: "Add", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Subtract", name: "Subtract", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Negate", name: "Negate", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Invert", name: "Invert", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "SetBytes", name: "SetBytes", pkg: "", typ: $funcType([sliceType], [ptrType], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([], [sliceType], false)}, {prop: "bytes", name: "bytes", pkg: "vendor/golang.org/x/crypto/curve25519/internal/field", typ: $funcType([ptrType$1], [sliceType], false)}, {prop: "Equal", name: "Equal", pkg: "", typ: $funcType([ptrType], [$Int], false)}, {prop: "Select", name: "Select", pkg: "", typ: $funcType([ptrType, ptrType, $Int], [ptrType], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([ptrType, $Int], [], false)}, {prop: "IsNegative", name: "IsNegative", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Absolute", name: "Absolute", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Multiply", name: "Multiply", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType], false)}, {prop: "Square", name: "Square", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "Mult32", name: "Mult32", pkg: "", typ: $funcType([ptrType, $Uint32], [ptrType], false)}, {prop: "Pow22523", name: "Pow22523", pkg: "", typ: $funcType([ptrType], [ptrType], false)}, {prop: "SqrtRatio", name: "SqrtRatio", pkg: "", typ: $funcType([ptrType, ptrType], [ptrType, $Int], false)}]; - uint128.init("vendor/golang.org/x/crypto/curve25519/internal/field", [{prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - Element.init("vendor/golang.org/x/crypto/curve25519/internal/field", [{prop: "l0", name: "l0", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l1", name: "l1", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l2", name: "l2", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l3", name: "l3", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "l4", name: "l4", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bits.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - feZero = new Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - feOne = new Element.ptr(new $Uint64(0, 1), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - sqrtM1 = new Element.ptr(new $Uint64(400167, 1242472624), new $Uint64(54693, 4237236381), new $Uint64(520030, 2629635168), new $Uint64(492949, 2793426078), new $Uint64(178226, 1208286237)); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/curve25519"] = (function() { - var $pkg = {}, $init, subtle, fmt, field, sliceType, arrayType, sliceType$1, ptrType, basePoint, basePoint$24ptr, ScalarMult, ScalarBaseMult, init, checkBasepoint, X25519, x25519; - subtle = $packages["crypto/subtle"]; - fmt = $packages["fmt"]; - field = $packages["vendor/golang.org/x/crypto/curve25519/internal/field"]; - sliceType = $sliceType($Uint8); - arrayType = $arrayType($Uint8, 32); - sliceType$1 = $sliceType($emptyInterface); - ptrType = $ptrType($Uint8); - ScalarMult = function(dst, scalar, point) { - var _q, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, b, dst, e, point, pos, scalar, swap, tmp0, tmp1, x, x1, x2, x3, y, z2, z3; - e = arrayType.zero(); - $copySlice(new sliceType(e), new sliceType(scalar)); - e[0] = ((e[0] & (248)) >>> 0); - e[31] = ((e[31] & (127)) >>> 0); - e[31] = ((e[31] | (64)) >>> 0); - _tmp = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$1 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$2 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$3 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$4 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$5 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - _tmp$6 = new field.Element.ptr(new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0), new $Uint64(0, 0)); - x1 = $clone(_tmp, field.Element); - x2 = $clone(_tmp$1, field.Element); - z2 = $clone(_tmp$2, field.Element); - x3 = $clone(_tmp$3, field.Element); - z3 = $clone(_tmp$4, field.Element); - tmp0 = $clone(_tmp$5, field.Element); - tmp1 = $clone(_tmp$6, field.Element); - x1.SetBytes(new sliceType(point)); - x2.One(); - x3.Set(x1); - z3.One(); - swap = 0; - pos = 254; - while (true) { - if (!(pos >= 0)) { break; } - b = (y = (((pos & 7) >>> 0)), y < 32 ? ((x = (_q = pos / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")), ((x < 0 || x >= e.length) ? ($throwRuntimeError("index out of range"), undefined) : e[x])) >>> y) : 0) << 24 >>> 24; - b = (b & (1)) >>> 0; - swap = (swap ^ (((b >> 0)))) >> 0; - x2.Swap(x3, swap); - z2.Swap(z3, swap); - swap = ((b >> 0)); - tmp0.Subtract(x3, z3); - tmp1.Subtract(x2, z2); - x2.Add(x2, z2); - z2.Add(x3, z3); - z3.Multiply(tmp0, x2); - z2.Multiply(z2, tmp1); - tmp0.Square(tmp1); - tmp1.Square(x2); - x3.Add(z3, z2); - z2.Subtract(z3, z2); - x2.Multiply(tmp1, tmp0); - tmp1.Subtract(tmp1, tmp0); - z2.Square(z2); - z3.Mult32(tmp1, 121666); - x3.Square(x3); - tmp0.Add(tmp0, z3); - z3.Multiply(x1, z2); - z2.Multiply(tmp1, tmp0); - pos = pos - (1) >> 0; - } - x2.Swap(x3, swap); - z2.Swap(z3, swap); - z2.Invert(z2); - x2.Multiply(x2, z2); - $copySlice(new sliceType(dst), x2.Bytes()); - }; - $pkg.ScalarMult = ScalarMult; - ScalarBaseMult = function(dst, scalar) { - var dst, scalar; - ScalarMult(dst, scalar, basePoint); - }; - $pkg.ScalarBaseMult = ScalarBaseMult; - init = function() { - $pkg.Basepoint = new sliceType(basePoint); - }; - checkBasepoint = function() { - if (!((subtle.ConstantTimeCompare($pkg.Basepoint, new sliceType([9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])) === 1))) { - $panic(new $String("curve25519: global Basepoint value was modified")); - } - }; - X25519 = function(scalar, point) { - var {$24r, _r, dst, point, scalar, $s, $r, $c} = $restore(this, {scalar, point}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dst = [dst]; - dst[0] = arrayType.zero(); - _r = x25519(dst[0], scalar, point); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: X25519, $c: true, $r, $24r, _r, dst, point, scalar, $s};return $f; - }; - $pkg.X25519 = X25519; - x25519 = function(dst, scalar, point) { - var {$24r, $24r$1, $24r$2, _r, _r$1, _r$2, _tmp, _tmp$1, base, dst, in$1, l, l$1, point, scalar, zero, $s, $r, $c} = $restore(this, {dst, scalar, point}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - base = [base]; - in$1 = [in$1]; - in$1[0] = arrayType.zero(); - l = scalar.$length; - /* */ if (!((l === 32))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((l === 32))) { */ case 1: - _r = fmt.Errorf("bad scalar length: %d, expected %d", new sliceType$1([new $Int(l), new $Int(32)])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [sliceType.nil, _r]; - $s = 4; case 4: return $24r; - /* } */ case 2: - l$1 = point.$length; - /* */ if (!((l$1 === 32))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((l$1 === 32))) { */ case 5: - _r$1 = fmt.Errorf("bad point length: %d, expected %d", new sliceType$1([new $Int(l$1), new $Int(32)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = [sliceType.nil, _r$1]; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - $copySlice(new sliceType(in$1[0]), scalar); - /* */ if ($indexPtr(point.$array, point.$offset + 0, ptrType) === $indexPtr($pkg.Basepoint.$array, $pkg.Basepoint.$offset + 0, ptrType)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($indexPtr(point.$array, point.$offset + 0, ptrType) === $indexPtr($pkg.Basepoint.$array, $pkg.Basepoint.$offset + 0, ptrType)) { */ case 9: - checkBasepoint(); - ScalarBaseMult(dst, in$1[0]); - $s = 11; continue; - /* } else { */ case 10: - _tmp = arrayType.zero(); - _tmp$1 = arrayType.zero(); - base[0] = $clone(_tmp, arrayType); - zero = $clone(_tmp$1, arrayType); - $copySlice(new sliceType(base[0]), point); - ScalarMult(dst, in$1[0], base[0]); - /* */ if (subtle.ConstantTimeCompare(new sliceType(dst), new sliceType(zero)) === 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (subtle.ConstantTimeCompare(new sliceType(dst), new sliceType(zero)) === 1) { */ case 12: - _r$2 = fmt.Errorf("bad input point: low order point", new sliceType$1([])); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = [sliceType.nil, _r$2]; - $s = 15; case 15: return $24r$2; - /* } */ case 13: - /* } */ case 11: - $s = -1; return [new sliceType(dst), $ifaceNil]; - /* */ } return; } var $f = {$blk: x25519, $c: true, $r, $24r, $24r$1, $24r$2, _r, _r$1, _r$2, _tmp, _tmp$1, base, dst, in$1, l, l$1, point, scalar, zero, $s};return $f; - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = subtle.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = field.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Basepoint = sliceType.nil; - basePoint = $toNativeArray($kindUint8, [9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/crypto/hkdf"] = (function() { - var $pkg = {}, $init, hmac, errors, hash, io, hkdf, sliceType, ptrType, Extract, Expand; - hmac = $packages["crypto/hmac"]; - errors = $packages["errors"]; - hash = $packages["hash"]; - io = $packages["io"]; - hkdf = $pkg.hkdf = $newType(0, $kindStruct, "hkdf.hkdf", true, "vendor/golang.org/x/crypto/hkdf", false, function(expander_, size_, info_, counter_, prev_, buf_) { - this.$val = this; - if (arguments.length === 0) { - this.expander = $ifaceNil; - this.size = 0; - this.info = sliceType.nil; - this.counter = 0; - this.prev = sliceType.nil; - this.buf = sliceType.nil; - return; - } - this.expander = expander_; - this.size = size_; - this.info = info_; - this.counter = counter_; - this.prev = prev_; - this.buf = buf_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(hkdf); - Extract = function(hash$1, secret, salt) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, extractor, hash$1, salt, secret, $s, $r, $c} = $restore(this, {hash$1, secret, salt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (salt === sliceType.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (salt === sliceType.nil) { */ case 1: - _r = hash$1(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = _r.Size(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - salt = $makeSlice(sliceType, _r$1); - /* } */ case 2: - _r$2 = hmac.New(hash$1, salt); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - extractor = _r$2; - _r$3 = extractor.Write(secret); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = extractor.Sum(sliceType.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: Extract, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, extractor, hash$1, salt, secret, $s};return $f; - }; - $pkg.Extract = Extract; - hkdf.ptr.prototype.Read = function(p) { - var {_r, _r$1, _r$2, _r$3, f, n, need, p, remains, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - need = p.$length; - remains = f.buf.$length + ($imul(((((255 - f.counter << 24 >>> 24) + 1 << 24 >>> 24) >> 0)), f.size)) >> 0; - if (remains < need) { - $s = -1; return [0, errors.New("hkdf: entropy limit reached")]; - } - n = $copySlice(p, f.buf); - p = $subslice(p, n); - /* while (true) { */ case 1: - /* if (!(p.$length > 0)) { break; } */ if(!(p.$length > 0)) { $s = 2; continue; } - $r = f.expander.Reset(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = f.expander.Write(f.prev); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _r$1 = f.expander.Write(f.info); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = f.expander.Write(new sliceType([f.counter])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = f.expander.Sum($subslice(f.prev, 0, 0)); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - f.prev = _r$3; - f.counter = f.counter + (1) << 24 >>> 24; - f.buf = f.prev; - n = $copySlice(p, f.buf); - p = $subslice(p, n); - $s = 1; continue; - case 2: - f.buf = $subslice(f.buf, n); - $s = -1; return [need, $ifaceNil]; - /* */ } return; } var $f = {$blk: hkdf.ptr.prototype.Read, $c: true, $r, _r, _r$1, _r$2, _r$3, f, n, need, p, remains, $s};return $f; - }; - hkdf.prototype.Read = function(p) { return this.$val.Read(p); }; - Expand = function(hash$1, pseudorandomKey, info) { - var {$24r, _r, _r$1, expander, hash$1, info, pseudorandomKey, $s, $r, $c} = $restore(this, {hash$1, pseudorandomKey, info}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = hmac.New(hash$1, pseudorandomKey); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - expander = _r; - _r$1 = expander.Size(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = new hkdf.ptr(expander, _r$1, info, 1, sliceType.nil, sliceType.nil); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Expand, $c: true, $r, $24r, _r, _r$1, expander, hash$1, info, pseudorandomKey, $s};return $f; - }; - $pkg.Expand = Expand; - ptrType.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; - hkdf.init("vendor/golang.org/x/crypto/hkdf", [{prop: "expander", name: "expander", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "counter", name: "counter", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "prev", name: "prev", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = hmac.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["crypto/tls"] = (function() { - var $pkg = {}, $init, bytes, list, context, crypto, aes, cipher, des, ecdsa, ed25519, elliptic, hmac, md5, rand, rc4, rsa, sha1, sha256, sha512, subtle, x509, binary, pem, errors, fmt, hash, cpu, godebug, io, big, net, os, runtime, strconv, strings, sync, atomic, time, chacha20poly1305, cryptobyte, curve25519, hkdf, listener, Dialer, sessionState, sessionStateTLS13, finishedHash, ecdheParameters, nistParameters, x25519Parameters, keyAgreement, rsaKeyAgreement, ecdheKeyAgreement, serverHandshakeStateTLS13, serverHandshakeState, marshalingFunction, clientHelloMsg, serverHelloMsg, encryptedExtensionsMsg, endOfEarlyDataMsg, keyUpdateMsg, newSessionTicketMsgTLS13, certificateRequestMsgTLS13, certificateMsg, certificateMsgTLS13, serverKeyExchangeMsg, certificateStatusMsg, serverHelloDoneMsg, clientKeyExchangeMsg, finishedMsg, certificateRequestMsg, certificateVerifyMsg, newSessionTicketMsg, helloRequestMsg, clientHandshakeStateTLS13, clientHandshakeState, Conn, halfConn, permanentError, cbcMode, RecordHeaderError, atLeastReader, recordType, CurveID, keyShare, pskIdentity, ConnectionState, ClientAuthType, ClientSessionState, ClientSessionCache, SignatureScheme, ClientHelloInfo, CertificateRequestInfo, RenegotiationSupport, Config, ticketKey, Certificate, cipherSuite, cipherSuiteTLS13, aead, prefixNonceAEAD, xorNonceAEAD, constantTimeHash, cthWrapper, alert, binaryMarshaler, sliceType, ptrType, sliceType$1, sliceType$2, arrayType, sliceType$3, sliceType$4, sliceType$5, sliceType$6, ptrType$1, sliceType$7, ptrType$2, sliceType$8, ptrType$3, sliceType$9, structType, sliceType$10, ptrType$4, sliceType$11, ptrType$5, sliceType$12, sliceType$13, arrayType$1, arrayType$2, arrayType$3, arrayType$4, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, ptrType$16, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, ptrType$24, ptrType$25, ptrType$26, ptrType$27, ptrType$28, ptrType$29, ptrType$30, ptrType$31, ptrType$32, ptrType$33, ptrType$34, sliceType$14, sliceType$15, sliceType$16, ptrType$35, ptrType$36, ptrType$37, ptrType$38, ptrType$39, ptrType$40, ptrType$41, arrayType$5, ptrType$42, arrayType$6, ptrType$43, ptrType$44, ptrType$45, ptrType$46, structType$1, arrayType$7, ptrType$51, ptrType$52, ptrType$53, ptrType$54, ptrType$55, funcType, ptrType$56, ptrType$57, ptrType$58, ptrType$59, ptrType$60, ptrType$61, ptrType$62, ptrType$63, ptrType$64, funcType$1, funcType$2, ptrType$65, ptrType$66, ptrType$67, ptrType$68, ptrType$69, sliceType$18, funcType$3, mapType, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, funcType$10, funcType$11, funcType$12, ptrType$71, ptrType$72, ptrType$73, masterSecretLabel, keyExpansionLabel, clientFinishedLabel, serverFinishedLabel, errClientKeyExchange, errServerKeyExchange, outBufPool, errShutdown, errEarlyCloseWrite, _SignatureScheme_index_8, _CurveID_index_0, _ClientAuthType_index, directSigning, supportedSignatureAlgorithms, helloRetryRequestRandom, testingOnlyForceDowngradeCanary, deprecatedSessionTicketKey, supportedVersions, debugEnableTLS10, defaultCurvePreferences, errNoCertificates, writerMutex, emptyConfig, emptyConfig$24ptr, cipherSuites, cipherSuitesTLS13, cipherSuitesPreferenceOrder, cipherSuitesPreferenceOrderNoAES, disabledCipherSuites, defaultCipherSuitesLen, defaultCipherSuites, defaultCipherSuitesTLS13, defaultCipherSuitesTLS13NoAES, hasGCMAsmAMD64, hasGCMAsmARM64, hasGCMAsmS390X, hasAESGCMHardwareSupport, aesgcmCiphers, signaturePadding, rsaSignatureSchemes, alertText, _r, Server, Client, NewListener, dial, LoadX509KeyPair, X509KeyPair, parsePrivateKey, splitPreMasterSecret, pHash, prf10, prf12, prfAndHashForVersion, prfForVersion, masterFromPreMasterSecret, keysFromMasterSecret, newFinishedHash, noExportedKeyingMaterial, ekmFromMasterSecret, generateECDHEParameters, curveForCurveID, sha1Hash, md5SHA1Hash, hashForServerKeyExchange, cloneHash, illegalClientHelloChange, negotiateALPN, supportsECDHE, clientHelloInfo, addBytesWithLength, addUint64, readUint64, readUint8LengthPrefixed, readUint16LengthPrefixed, readUint24LengthPrefixed, marshalCertificate, unmarshalCertificate, checkALPN, certificateRequestInfoFromMsg, clientSessionCacheKey, hostnameInSNI, extractPadding, roundUp, sliceForAppend, requiresClientCert, supportedVersionsFromMax, defaultConfig, unexpectedMessageError, isSupportedSignatureAlgorithm, selectCipherSuite, aesgcmPreferred, cipherRC4, cipher3DES, cipherAES, macSHA1, macSHA256, aeadAESGCM, aeadAESGCMTLS13, aeadChaCha20Poly1305, newConstantTimeHash, tls10MAC, rsaKA, ecdheECDSAKA, ecdheRSAKA, mutualCipherSuite, cipherSuiteByID, mutualCipherSuiteTLS13, cipherSuiteTLS13ByID, verifyHandshakeSignature, signedMessage, typeAndHashFromSignatureScheme, legacyTypeAndHashFromPublicKey, signatureSchemesForCertificate, selectSignatureScheme, unsupportedCertificateError; - bytes = $packages["bytes"]; - list = $packages["container/list"]; - context = $packages["context"]; - crypto = $packages["crypto"]; - aes = $packages["crypto/aes"]; - cipher = $packages["crypto/cipher"]; - des = $packages["crypto/des"]; - ecdsa = $packages["crypto/ecdsa"]; - ed25519 = $packages["crypto/ed25519"]; - elliptic = $packages["crypto/elliptic"]; - hmac = $packages["crypto/hmac"]; - md5 = $packages["crypto/md5"]; - rand = $packages["crypto/rand"]; - rc4 = $packages["crypto/rc4"]; - rsa = $packages["crypto/rsa"]; - sha1 = $packages["crypto/sha1"]; - sha256 = $packages["crypto/sha256"]; - sha512 = $packages["crypto/sha512"]; - subtle = $packages["crypto/subtle"]; - x509 = $packages["crypto/x509"]; - binary = $packages["encoding/binary"]; - pem = $packages["encoding/pem"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - hash = $packages["hash"]; - cpu = $packages["internal/cpu"]; - godebug = $packages["internal/godebug"]; - io = $packages["io"]; - big = $packages["math/big"]; - net = $packages["net"]; - os = $packages["os"]; - runtime = $packages["runtime"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - time = $packages["time"]; - chacha20poly1305 = $packages["vendor/golang.org/x/crypto/chacha20poly1305"]; - cryptobyte = $packages["vendor/golang.org/x/crypto/cryptobyte"]; - curve25519 = $packages["vendor/golang.org/x/crypto/curve25519"]; - hkdf = $packages["vendor/golang.org/x/crypto/hkdf"]; - listener = $pkg.listener = $newType(0, $kindStruct, "tls.listener", true, "crypto/tls", false, function(Listener_, config_) { - this.$val = this; - if (arguments.length === 0) { - this.Listener = $ifaceNil; - this.config = ptrType$4.nil; - return; - } - this.Listener = Listener_; - this.config = config_; - }); - Dialer = $pkg.Dialer = $newType(0, $kindStruct, "tls.Dialer", true, "crypto/tls", true, function(NetDialer_, Config_) { - this.$val = this; - if (arguments.length === 0) { - this.NetDialer = ptrType$9.nil; - this.Config = ptrType$4.nil; - return; - } - this.NetDialer = NetDialer_; - this.Config = Config_; - }); - sessionState = $pkg.sessionState = $newType(0, $kindStruct, "tls.sessionState", true, "crypto/tls", false, function(vers_, cipherSuite_, createdAt_, masterSecret_, certificates_, usedOldKey_) { - this.$val = this; - if (arguments.length === 0) { - this.vers = 0; - this.cipherSuite = 0; - this.createdAt = new $Uint64(0, 0); - this.masterSecret = sliceType$5.nil; - this.certificates = sliceType$11.nil; - this.usedOldKey = false; - return; - } - this.vers = vers_; - this.cipherSuite = cipherSuite_; - this.createdAt = createdAt_; - this.masterSecret = masterSecret_; - this.certificates = certificates_; - this.usedOldKey = usedOldKey_; - }); - sessionStateTLS13 = $pkg.sessionStateTLS13 = $newType(0, $kindStruct, "tls.sessionStateTLS13", true, "crypto/tls", false, function(cipherSuite_, createdAt_, resumptionSecret_, certificate_) { - this.$val = this; - if (arguments.length === 0) { - this.cipherSuite = 0; - this.createdAt = new $Uint64(0, 0); - this.resumptionSecret = sliceType$5.nil; - this.certificate = new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil); - return; - } - this.cipherSuite = cipherSuite_; - this.createdAt = createdAt_; - this.resumptionSecret = resumptionSecret_; - this.certificate = certificate_; - }); - finishedHash = $pkg.finishedHash = $newType(0, $kindStruct, "tls.finishedHash", true, "crypto/tls", false, function(client_, server_, clientMD5_, serverMD5_, buffer_, version_, prf_) { - this.$val = this; - if (arguments.length === 0) { - this.client = $ifaceNil; - this.server = $ifaceNil; - this.clientMD5 = $ifaceNil; - this.serverMD5 = $ifaceNil; - this.buffer = sliceType$5.nil; - this.version = 0; - this.prf = $throwNilPointerError; - return; - } - this.client = client_; - this.server = server_; - this.clientMD5 = clientMD5_; - this.serverMD5 = serverMD5_; - this.buffer = buffer_; - this.version = version_; - this.prf = prf_; - }); - ecdheParameters = $pkg.ecdheParameters = $newType(8, $kindInterface, "tls.ecdheParameters", true, "crypto/tls", false, null); - nistParameters = $pkg.nistParameters = $newType(0, $kindStruct, "tls.nistParameters", true, "crypto/tls", false, function(privateKey_, x_, y_, curveID_) { - this.$val = this; - if (arguments.length === 0) { - this.privateKey = sliceType$5.nil; - this.x = ptrType$21.nil; - this.y = ptrType$21.nil; - this.curveID = 0; - return; - } - this.privateKey = privateKey_; - this.x = x_; - this.y = y_; - this.curveID = curveID_; - }); - x25519Parameters = $pkg.x25519Parameters = $newType(0, $kindStruct, "tls.x25519Parameters", true, "crypto/tls", false, function(privateKey_, publicKey_) { - this.$val = this; - if (arguments.length === 0) { - this.privateKey = sliceType$5.nil; - this.publicKey = sliceType$5.nil; - return; - } - this.privateKey = privateKey_; - this.publicKey = publicKey_; - }); - keyAgreement = $pkg.keyAgreement = $newType(8, $kindInterface, "tls.keyAgreement", true, "crypto/tls", false, null); - rsaKeyAgreement = $pkg.rsaKeyAgreement = $newType(0, $kindStruct, "tls.rsaKeyAgreement", true, "crypto/tls", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - ecdheKeyAgreement = $pkg.ecdheKeyAgreement = $newType(0, $kindStruct, "tls.ecdheKeyAgreement", true, "crypto/tls", false, function(version_, isRSA_, params_, ckx_, preMasterSecret_) { - this.$val = this; - if (arguments.length === 0) { - this.version = 0; - this.isRSA = false; - this.params = $ifaceNil; - this.ckx = ptrType$23.nil; - this.preMasterSecret = sliceType$5.nil; - return; - } - this.version = version_; - this.isRSA = isRSA_; - this.params = params_; - this.ckx = ckx_; - this.preMasterSecret = preMasterSecret_; - }); - serverHandshakeStateTLS13 = $pkg.serverHandshakeStateTLS13 = $newType(0, $kindStruct, "tls.serverHandshakeStateTLS13", true, "crypto/tls", false, function(c_, ctx_, clientHello_, hello_, sentDummyCCS_, usingPSK_, suite_, cert_, sigAlg_, earlySecret_, sharedKey_, handshakeSecret_, masterSecret_, trafficSecret_, transcript_, clientFinished_) { - this.$val = this; - if (arguments.length === 0) { - this.c = ptrType$6.nil; - this.ctx = $ifaceNil; - this.clientHello = ptrType$26.nil; - this.hello = ptrType$30.nil; - this.sentDummyCCS = false; - this.usingPSK = false; - this.suite = ptrType$2.nil; - this.cert = ptrType$31.nil; - this.sigAlg = 0; - this.earlySecret = sliceType$5.nil; - this.sharedKey = sliceType$5.nil; - this.handshakeSecret = sliceType$5.nil; - this.masterSecret = sliceType$5.nil; - this.trafficSecret = sliceType$5.nil; - this.transcript = $ifaceNil; - this.clientFinished = sliceType$5.nil; - return; - } - this.c = c_; - this.ctx = ctx_; - this.clientHello = clientHello_; - this.hello = hello_; - this.sentDummyCCS = sentDummyCCS_; - this.usingPSK = usingPSK_; - this.suite = suite_; - this.cert = cert_; - this.sigAlg = sigAlg_; - this.earlySecret = earlySecret_; - this.sharedKey = sharedKey_; - this.handshakeSecret = handshakeSecret_; - this.masterSecret = masterSecret_; - this.trafficSecret = trafficSecret_; - this.transcript = transcript_; - this.clientFinished = clientFinished_; - }); - serverHandshakeState = $pkg.serverHandshakeState = $newType(0, $kindStruct, "tls.serverHandshakeState", true, "crypto/tls", false, function(c_, ctx_, clientHello_, hello_, suite_, ecdheOk_, ecSignOk_, rsaDecryptOk_, rsaSignOk_, sessionState_, finishedHash_, masterSecret_, cert_) { - this.$val = this; - if (arguments.length === 0) { - this.c = ptrType$6.nil; - this.ctx = $ifaceNil; - this.clientHello = ptrType$26.nil; - this.hello = ptrType$30.nil; - this.suite = ptrType$3.nil; - this.ecdheOk = false; - this.ecSignOk = false; - this.rsaDecryptOk = false; - this.rsaSignOk = false; - this.sessionState = ptrType$32.nil; - this.finishedHash = new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$5.nil, 0, $throwNilPointerError); - this.masterSecret = sliceType$5.nil; - this.cert = ptrType$31.nil; - return; - } - this.c = c_; - this.ctx = ctx_; - this.clientHello = clientHello_; - this.hello = hello_; - this.suite = suite_; - this.ecdheOk = ecdheOk_; - this.ecSignOk = ecSignOk_; - this.rsaDecryptOk = rsaDecryptOk_; - this.rsaSignOk = rsaSignOk_; - this.sessionState = sessionState_; - this.finishedHash = finishedHash_; - this.masterSecret = masterSecret_; - this.cert = cert_; - }); - marshalingFunction = $pkg.marshalingFunction = $newType(4, $kindFunc, "tls.marshalingFunction", true, "crypto/tls", false, null); - clientHelloMsg = $pkg.clientHelloMsg = $newType(0, $kindStruct, "tls.clientHelloMsg", true, "crypto/tls", false, function(raw_, vers_, random_, sessionId_, cipherSuites_, compressionMethods_, serverName_, ocspStapling_, supportedCurves_, supportedPoints_, ticketSupported_, sessionTicket_, supportedSignatureAlgorithms_, supportedSignatureAlgorithmsCert_, secureRenegotiationSupported_, secureRenegotiation_, alpnProtocols_, scts_, supportedVersions_, cookie_, keyShares_, earlyData_, pskModes_, pskIdentities_, pskBinders_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.vers = 0; - this.random = sliceType$5.nil; - this.sessionId = sliceType$5.nil; - this.cipherSuites = sliceType$2.nil; - this.compressionMethods = sliceType$5.nil; - this.serverName = ""; - this.ocspStapling = false; - this.supportedCurves = sliceType$3.nil; - this.supportedPoints = sliceType$5.nil; - this.ticketSupported = false; - this.sessionTicket = sliceType$5.nil; - this.supportedSignatureAlgorithms = sliceType$7.nil; - this.supportedSignatureAlgorithmsCert = sliceType$7.nil; - this.secureRenegotiationSupported = false; - this.secureRenegotiation = sliceType$5.nil; - this.alpnProtocols = sliceType$1.nil; - this.scts = false; - this.supportedVersions = sliceType$2.nil; - this.cookie = sliceType$5.nil; - this.keyShares = sliceType$15.nil; - this.earlyData = false; - this.pskModes = sliceType$5.nil; - this.pskIdentities = sliceType$16.nil; - this.pskBinders = sliceType$11.nil; - return; - } - this.raw = raw_; - this.vers = vers_; - this.random = random_; - this.sessionId = sessionId_; - this.cipherSuites = cipherSuites_; - this.compressionMethods = compressionMethods_; - this.serverName = serverName_; - this.ocspStapling = ocspStapling_; - this.supportedCurves = supportedCurves_; - this.supportedPoints = supportedPoints_; - this.ticketSupported = ticketSupported_; - this.sessionTicket = sessionTicket_; - this.supportedSignatureAlgorithms = supportedSignatureAlgorithms_; - this.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithmsCert_; - this.secureRenegotiationSupported = secureRenegotiationSupported_; - this.secureRenegotiation = secureRenegotiation_; - this.alpnProtocols = alpnProtocols_; - this.scts = scts_; - this.supportedVersions = supportedVersions_; - this.cookie = cookie_; - this.keyShares = keyShares_; - this.earlyData = earlyData_; - this.pskModes = pskModes_; - this.pskIdentities = pskIdentities_; - this.pskBinders = pskBinders_; - }); - serverHelloMsg = $pkg.serverHelloMsg = $newType(0, $kindStruct, "tls.serverHelloMsg", true, "crypto/tls", false, function(raw_, vers_, random_, sessionId_, cipherSuite_, compressionMethod_, ocspStapling_, ticketSupported_, secureRenegotiationSupported_, secureRenegotiation_, alpnProtocol_, scts_, supportedVersion_, serverShare_, selectedIdentityPresent_, selectedIdentity_, supportedPoints_, cookie_, selectedGroup_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.vers = 0; - this.random = sliceType$5.nil; - this.sessionId = sliceType$5.nil; - this.cipherSuite = 0; - this.compressionMethod = 0; - this.ocspStapling = false; - this.ticketSupported = false; - this.secureRenegotiationSupported = false; - this.secureRenegotiation = sliceType$5.nil; - this.alpnProtocol = ""; - this.scts = sliceType$11.nil; - this.supportedVersion = 0; - this.serverShare = new keyShare.ptr(0, sliceType$5.nil); - this.selectedIdentityPresent = false; - this.selectedIdentity = 0; - this.supportedPoints = sliceType$5.nil; - this.cookie = sliceType$5.nil; - this.selectedGroup = 0; - return; - } - this.raw = raw_; - this.vers = vers_; - this.random = random_; - this.sessionId = sessionId_; - this.cipherSuite = cipherSuite_; - this.compressionMethod = compressionMethod_; - this.ocspStapling = ocspStapling_; - this.ticketSupported = ticketSupported_; - this.secureRenegotiationSupported = secureRenegotiationSupported_; - this.secureRenegotiation = secureRenegotiation_; - this.alpnProtocol = alpnProtocol_; - this.scts = scts_; - this.supportedVersion = supportedVersion_; - this.serverShare = serverShare_; - this.selectedIdentityPresent = selectedIdentityPresent_; - this.selectedIdentity = selectedIdentity_; - this.supportedPoints = supportedPoints_; - this.cookie = cookie_; - this.selectedGroup = selectedGroup_; - }); - encryptedExtensionsMsg = $pkg.encryptedExtensionsMsg = $newType(0, $kindStruct, "tls.encryptedExtensionsMsg", true, "crypto/tls", false, function(raw_, alpnProtocol_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.alpnProtocol = ""; - return; - } - this.raw = raw_; - this.alpnProtocol = alpnProtocol_; - }); - endOfEarlyDataMsg = $pkg.endOfEarlyDataMsg = $newType(0, $kindStruct, "tls.endOfEarlyDataMsg", true, "crypto/tls", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - keyUpdateMsg = $pkg.keyUpdateMsg = $newType(0, $kindStruct, "tls.keyUpdateMsg", true, "crypto/tls", false, function(raw_, updateRequested_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.updateRequested = false; - return; - } - this.raw = raw_; - this.updateRequested = updateRequested_; - }); - newSessionTicketMsgTLS13 = $pkg.newSessionTicketMsgTLS13 = $newType(0, $kindStruct, "tls.newSessionTicketMsgTLS13", true, "crypto/tls", false, function(raw_, lifetime_, ageAdd_, nonce_, label_, maxEarlyData_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.lifetime = 0; - this.ageAdd = 0; - this.nonce = sliceType$5.nil; - this.label = sliceType$5.nil; - this.maxEarlyData = 0; - return; - } - this.raw = raw_; - this.lifetime = lifetime_; - this.ageAdd = ageAdd_; - this.nonce = nonce_; - this.label = label_; - this.maxEarlyData = maxEarlyData_; - }); - certificateRequestMsgTLS13 = $pkg.certificateRequestMsgTLS13 = $newType(0, $kindStruct, "tls.certificateRequestMsgTLS13", true, "crypto/tls", false, function(raw_, ocspStapling_, scts_, supportedSignatureAlgorithms_, supportedSignatureAlgorithmsCert_, certificateAuthorities_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.ocspStapling = false; - this.scts = false; - this.supportedSignatureAlgorithms = sliceType$7.nil; - this.supportedSignatureAlgorithmsCert = sliceType$7.nil; - this.certificateAuthorities = sliceType$11.nil; - return; - } - this.raw = raw_; - this.ocspStapling = ocspStapling_; - this.scts = scts_; - this.supportedSignatureAlgorithms = supportedSignatureAlgorithms_; - this.supportedSignatureAlgorithmsCert = supportedSignatureAlgorithmsCert_; - this.certificateAuthorities = certificateAuthorities_; - }); - certificateMsg = $pkg.certificateMsg = $newType(0, $kindStruct, "tls.certificateMsg", true, "crypto/tls", false, function(raw_, certificates_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.certificates = sliceType$11.nil; - return; - } - this.raw = raw_; - this.certificates = certificates_; - }); - certificateMsgTLS13 = $pkg.certificateMsgTLS13 = $newType(0, $kindStruct, "tls.certificateMsgTLS13", true, "crypto/tls", false, function(raw_, certificate_, ocspStapling_, scts_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.certificate = new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil); - this.ocspStapling = false; - this.scts = false; - return; - } - this.raw = raw_; - this.certificate = certificate_; - this.ocspStapling = ocspStapling_; - this.scts = scts_; - }); - serverKeyExchangeMsg = $pkg.serverKeyExchangeMsg = $newType(0, $kindStruct, "tls.serverKeyExchangeMsg", true, "crypto/tls", false, function(raw_, key_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.key = sliceType$5.nil; - return; - } - this.raw = raw_; - this.key = key_; - }); - certificateStatusMsg = $pkg.certificateStatusMsg = $newType(0, $kindStruct, "tls.certificateStatusMsg", true, "crypto/tls", false, function(raw_, response_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.response = sliceType$5.nil; - return; - } - this.raw = raw_; - this.response = response_; - }); - serverHelloDoneMsg = $pkg.serverHelloDoneMsg = $newType(0, $kindStruct, "tls.serverHelloDoneMsg", true, "crypto/tls", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - clientKeyExchangeMsg = $pkg.clientKeyExchangeMsg = $newType(0, $kindStruct, "tls.clientKeyExchangeMsg", true, "crypto/tls", false, function(raw_, ciphertext_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.ciphertext = sliceType$5.nil; - return; - } - this.raw = raw_; - this.ciphertext = ciphertext_; - }); - finishedMsg = $pkg.finishedMsg = $newType(0, $kindStruct, "tls.finishedMsg", true, "crypto/tls", false, function(raw_, verifyData_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.verifyData = sliceType$5.nil; - return; - } - this.raw = raw_; - this.verifyData = verifyData_; - }); - certificateRequestMsg = $pkg.certificateRequestMsg = $newType(0, $kindStruct, "tls.certificateRequestMsg", true, "crypto/tls", false, function(raw_, hasSignatureAlgorithm_, certificateTypes_, supportedSignatureAlgorithms_, certificateAuthorities_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.hasSignatureAlgorithm = false; - this.certificateTypes = sliceType$5.nil; - this.supportedSignatureAlgorithms = sliceType$7.nil; - this.certificateAuthorities = sliceType$11.nil; - return; - } - this.raw = raw_; - this.hasSignatureAlgorithm = hasSignatureAlgorithm_; - this.certificateTypes = certificateTypes_; - this.supportedSignatureAlgorithms = supportedSignatureAlgorithms_; - this.certificateAuthorities = certificateAuthorities_; - }); - certificateVerifyMsg = $pkg.certificateVerifyMsg = $newType(0, $kindStruct, "tls.certificateVerifyMsg", true, "crypto/tls", false, function(raw_, hasSignatureAlgorithm_, signatureAlgorithm_, signature_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.hasSignatureAlgorithm = false; - this.signatureAlgorithm = 0; - this.signature = sliceType$5.nil; - return; - } - this.raw = raw_; - this.hasSignatureAlgorithm = hasSignatureAlgorithm_; - this.signatureAlgorithm = signatureAlgorithm_; - this.signature = signature_; - }); - newSessionTicketMsg = $pkg.newSessionTicketMsg = $newType(0, $kindStruct, "tls.newSessionTicketMsg", true, "crypto/tls", false, function(raw_, ticket_) { - this.$val = this; - if (arguments.length === 0) { - this.raw = sliceType$5.nil; - this.ticket = sliceType$5.nil; - return; - } - this.raw = raw_; - this.ticket = ticket_; - }); - helloRequestMsg = $pkg.helloRequestMsg = $newType(0, $kindStruct, "tls.helloRequestMsg", true, "crypto/tls", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - clientHandshakeStateTLS13 = $pkg.clientHandshakeStateTLS13 = $newType(0, $kindStruct, "tls.clientHandshakeStateTLS13", true, "crypto/tls", false, function(c_, ctx_, serverHello_, hello_, ecdheParams_, session_, earlySecret_, binderKey_, certReq_, usingPSK_, sentDummyCCS_, suite_, transcript_, masterSecret_, trafficSecret_) { - this.$val = this; - if (arguments.length === 0) { - this.c = ptrType$6.nil; - this.ctx = $ifaceNil; - this.serverHello = ptrType$30.nil; - this.hello = ptrType$26.nil; - this.ecdheParams = $ifaceNil; - this.session = ptrType$37.nil; - this.earlySecret = sliceType$5.nil; - this.binderKey = sliceType$5.nil; - this.certReq = ptrType$39.nil; - this.usingPSK = false; - this.sentDummyCCS = false; - this.suite = ptrType$2.nil; - this.transcript = $ifaceNil; - this.masterSecret = sliceType$5.nil; - this.trafficSecret = sliceType$5.nil; - return; - } - this.c = c_; - this.ctx = ctx_; - this.serverHello = serverHello_; - this.hello = hello_; - this.ecdheParams = ecdheParams_; - this.session = session_; - this.earlySecret = earlySecret_; - this.binderKey = binderKey_; - this.certReq = certReq_; - this.usingPSK = usingPSK_; - this.sentDummyCCS = sentDummyCCS_; - this.suite = suite_; - this.transcript = transcript_; - this.masterSecret = masterSecret_; - this.trafficSecret = trafficSecret_; - }); - clientHandshakeState = $pkg.clientHandshakeState = $newType(0, $kindStruct, "tls.clientHandshakeState", true, "crypto/tls", false, function(c_, ctx_, serverHello_, hello_, suite_, finishedHash_, masterSecret_, session_) { - this.$val = this; - if (arguments.length === 0) { - this.c = ptrType$6.nil; - this.ctx = $ifaceNil; - this.serverHello = ptrType$30.nil; - this.hello = ptrType$26.nil; - this.suite = ptrType$3.nil; - this.finishedHash = new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$5.nil, 0, $throwNilPointerError); - this.masterSecret = sliceType$5.nil; - this.session = ptrType$37.nil; - return; - } - this.c = c_; - this.ctx = ctx_; - this.serverHello = serverHello_; - this.hello = hello_; - this.suite = suite_; - this.finishedHash = finishedHash_; - this.masterSecret = masterSecret_; - this.session = session_; - }); - Conn = $pkg.Conn = $newType(0, $kindStruct, "tls.Conn", true, "crypto/tls", true, function(conn_, isClient_, handshakeFn_, handshakeStatus_, handshakeMutex_, handshakeErr_, vers_, haveVers_, config_, handshakes_, didResume_, cipherSuite_, ocspResponse_, scts_, peerCertificates_, verifiedChains_, serverName_, secureRenegotiation_, ekm_, resumptionSecret_, ticketKeys_, clientFinishedIsFirst_, closeNotifyErr_, closeNotifySent_, clientFinished_, serverFinished_, clientProtocol_, in$27_, out_, rawInput_, input_, hand_, buffering_, sendBuf_, bytesSent_, packetsSent_, retryCount_, activeCall_, tmp_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = $ifaceNil; - this.isClient = false; - this.handshakeFn = $throwNilPointerError; - this.handshakeStatus = 0; - this.handshakeMutex = new sync.Mutex.ptr(0, 0); - this.handshakeErr = $ifaceNil; - this.vers = 0; - this.haveVers = false; - this.config = ptrType$4.nil; - this.handshakes = 0; - this.didResume = false; - this.cipherSuite = 0; - this.ocspResponse = sliceType$5.nil; - this.scts = sliceType$11.nil; - this.peerCertificates = sliceType$12.nil; - this.verifiedChains = sliceType$13.nil; - this.serverName = ""; - this.secureRenegotiation = false; - this.ekm = $throwNilPointerError; - this.resumptionSecret = sliceType$5.nil; - this.ticketKeys = sliceType$4.nil; - this.clientFinishedIsFirst = false; - this.closeNotifyErr = $ifaceNil; - this.closeNotifySent = false; - this.clientFinished = arrayType$1.zero(); - this.serverFinished = arrayType$1.zero(); - this.clientProtocol = ""; - this.in$27 = new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$2.zero(), arrayType$3.zero(), $ifaceNil, $ifaceNil, sliceType$5.nil); - this.out = new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$2.zero(), arrayType$3.zero(), $ifaceNil, $ifaceNil, sliceType$5.nil); - this.rawInput = new bytes.Buffer.ptr(sliceType$5.nil, 0, 0); - this.input = new bytes.Reader.ptr(sliceType$5.nil, new $Int64(0, 0), 0); - this.hand = new bytes.Buffer.ptr(sliceType$5.nil, 0, 0); - this.buffering = false; - this.sendBuf = sliceType$5.nil; - this.bytesSent = new $Int64(0, 0); - this.packetsSent = new $Int64(0, 0); - this.retryCount = 0; - this.activeCall = 0; - this.tmp = arrayType$4.zero(); - return; - } - this.conn = conn_; - this.isClient = isClient_; - this.handshakeFn = handshakeFn_; - this.handshakeStatus = handshakeStatus_; - this.handshakeMutex = handshakeMutex_; - this.handshakeErr = handshakeErr_; - this.vers = vers_; - this.haveVers = haveVers_; - this.config = config_; - this.handshakes = handshakes_; - this.didResume = didResume_; - this.cipherSuite = cipherSuite_; - this.ocspResponse = ocspResponse_; - this.scts = scts_; - this.peerCertificates = peerCertificates_; - this.verifiedChains = verifiedChains_; - this.serverName = serverName_; - this.secureRenegotiation = secureRenegotiation_; - this.ekm = ekm_; - this.resumptionSecret = resumptionSecret_; - this.ticketKeys = ticketKeys_; - this.clientFinishedIsFirst = clientFinishedIsFirst_; - this.closeNotifyErr = closeNotifyErr_; - this.closeNotifySent = closeNotifySent_; - this.clientFinished = clientFinished_; - this.serverFinished = serverFinished_; - this.clientProtocol = clientProtocol_; - this.in$27 = in$27_; - this.out = out_; - this.rawInput = rawInput_; - this.input = input_; - this.hand = hand_; - this.buffering = buffering_; - this.sendBuf = sendBuf_; - this.bytesSent = bytesSent_; - this.packetsSent = packetsSent_; - this.retryCount = retryCount_; - this.activeCall = activeCall_; - this.tmp = tmp_; - }); - halfConn = $pkg.halfConn = $newType(0, $kindStruct, "tls.halfConn", true, "crypto/tls", false, function(Mutex_, err_, version_, cipher_, mac_, seq_, scratchBuf_, nextCipher_, nextMac_, trafficSecret_) { - this.$val = this; - if (arguments.length === 0) { - this.Mutex = new sync.Mutex.ptr(0, 0); - this.err = $ifaceNil; - this.version = 0; - this.cipher = $ifaceNil; - this.mac = $ifaceNil; - this.seq = arrayType$2.zero(); - this.scratchBuf = arrayType$3.zero(); - this.nextCipher = $ifaceNil; - this.nextMac = $ifaceNil; - this.trafficSecret = sliceType$5.nil; - return; - } - this.Mutex = Mutex_; - this.err = err_; - this.version = version_; - this.cipher = cipher_; - this.mac = mac_; - this.seq = seq_; - this.scratchBuf = scratchBuf_; - this.nextCipher = nextCipher_; - this.nextMac = nextMac_; - this.trafficSecret = trafficSecret_; - }); - permanentError = $pkg.permanentError = $newType(0, $kindStruct, "tls.permanentError", true, "crypto/tls", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - return; - } - this.err = err_; - }); - cbcMode = $pkg.cbcMode = $newType(8, $kindInterface, "tls.cbcMode", true, "crypto/tls", false, null); - RecordHeaderError = $pkg.RecordHeaderError = $newType(0, $kindStruct, "tls.RecordHeaderError", true, "crypto/tls", true, function(Msg_, RecordHeader_, Conn_) { - this.$val = this; - if (arguments.length === 0) { - this.Msg = ""; - this.RecordHeader = arrayType$6.zero(); - this.Conn = $ifaceNil; - return; - } - this.Msg = Msg_; - this.RecordHeader = RecordHeader_; - this.Conn = Conn_; - }); - atLeastReader = $pkg.atLeastReader = $newType(0, $kindStruct, "tls.atLeastReader", true, "crypto/tls", false, function(R_, N_) { - this.$val = this; - if (arguments.length === 0) { - this.R = $ifaceNil; - this.N = new $Int64(0, 0); - return; - } - this.R = R_; - this.N = N_; - }); - recordType = $pkg.recordType = $newType(1, $kindUint8, "tls.recordType", true, "crypto/tls", false, null); - CurveID = $pkg.CurveID = $newType(2, $kindUint16, "tls.CurveID", true, "crypto/tls", true, null); - keyShare = $pkg.keyShare = $newType(0, $kindStruct, "tls.keyShare", true, "crypto/tls", false, function(group_, data_) { - this.$val = this; - if (arguments.length === 0) { - this.group = 0; - this.data = sliceType$5.nil; - return; - } - this.group = group_; - this.data = data_; - }); - pskIdentity = $pkg.pskIdentity = $newType(0, $kindStruct, "tls.pskIdentity", true, "crypto/tls", false, function(label_, obfuscatedTicketAge_) { - this.$val = this; - if (arguments.length === 0) { - this.label = sliceType$5.nil; - this.obfuscatedTicketAge = 0; - return; - } - this.label = label_; - this.obfuscatedTicketAge = obfuscatedTicketAge_; - }); - ConnectionState = $pkg.ConnectionState = $newType(0, $kindStruct, "tls.ConnectionState", true, "crypto/tls", true, function(Version_, HandshakeComplete_, DidResume_, CipherSuite_, NegotiatedProtocol_, NegotiatedProtocolIsMutual_, ServerName_, PeerCertificates_, VerifiedChains_, SignedCertificateTimestamps_, OCSPResponse_, TLSUnique_, ekm_) { - this.$val = this; - if (arguments.length === 0) { - this.Version = 0; - this.HandshakeComplete = false; - this.DidResume = false; - this.CipherSuite = 0; - this.NegotiatedProtocol = ""; - this.NegotiatedProtocolIsMutual = false; - this.ServerName = ""; - this.PeerCertificates = sliceType$12.nil; - this.VerifiedChains = sliceType$13.nil; - this.SignedCertificateTimestamps = sliceType$11.nil; - this.OCSPResponse = sliceType$5.nil; - this.TLSUnique = sliceType$5.nil; - this.ekm = $throwNilPointerError; - return; - } - this.Version = Version_; - this.HandshakeComplete = HandshakeComplete_; - this.DidResume = DidResume_; - this.CipherSuite = CipherSuite_; - this.NegotiatedProtocol = NegotiatedProtocol_; - this.NegotiatedProtocolIsMutual = NegotiatedProtocolIsMutual_; - this.ServerName = ServerName_; - this.PeerCertificates = PeerCertificates_; - this.VerifiedChains = VerifiedChains_; - this.SignedCertificateTimestamps = SignedCertificateTimestamps_; - this.OCSPResponse = OCSPResponse_; - this.TLSUnique = TLSUnique_; - this.ekm = ekm_; - }); - ClientAuthType = $pkg.ClientAuthType = $newType(4, $kindInt, "tls.ClientAuthType", true, "crypto/tls", true, null); - ClientSessionState = $pkg.ClientSessionState = $newType(0, $kindStruct, "tls.ClientSessionState", true, "crypto/tls", true, function(sessionTicket_, vers_, cipherSuite_, masterSecret_, serverCertificates_, verifiedChains_, receivedAt_, ocspResponse_, scts_, nonce_, useBy_, ageAdd_) { - this.$val = this; - if (arguments.length === 0) { - this.sessionTicket = sliceType$5.nil; - this.vers = 0; - this.cipherSuite = 0; - this.masterSecret = sliceType$5.nil; - this.serverCertificates = sliceType$12.nil; - this.verifiedChains = sliceType$13.nil; - this.receivedAt = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - this.ocspResponse = sliceType$5.nil; - this.scts = sliceType$11.nil; - this.nonce = sliceType$5.nil; - this.useBy = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - this.ageAdd = 0; - return; - } - this.sessionTicket = sessionTicket_; - this.vers = vers_; - this.cipherSuite = cipherSuite_; - this.masterSecret = masterSecret_; - this.serverCertificates = serverCertificates_; - this.verifiedChains = verifiedChains_; - this.receivedAt = receivedAt_; - this.ocspResponse = ocspResponse_; - this.scts = scts_; - this.nonce = nonce_; - this.useBy = useBy_; - this.ageAdd = ageAdd_; - }); - ClientSessionCache = $pkg.ClientSessionCache = $newType(8, $kindInterface, "tls.ClientSessionCache", true, "crypto/tls", true, null); - SignatureScheme = $pkg.SignatureScheme = $newType(2, $kindUint16, "tls.SignatureScheme", true, "crypto/tls", true, null); - ClientHelloInfo = $pkg.ClientHelloInfo = $newType(0, $kindStruct, "tls.ClientHelloInfo", true, "crypto/tls", true, function(CipherSuites_, ServerName_, SupportedCurves_, SupportedPoints_, SignatureSchemes_, SupportedProtos_, SupportedVersions_, Conn_, config_, ctx_) { - this.$val = this; - if (arguments.length === 0) { - this.CipherSuites = sliceType$2.nil; - this.ServerName = ""; - this.SupportedCurves = sliceType$3.nil; - this.SupportedPoints = sliceType$5.nil; - this.SignatureSchemes = sliceType$7.nil; - this.SupportedProtos = sliceType$1.nil; - this.SupportedVersions = sliceType$2.nil; - this.Conn = $ifaceNil; - this.config = ptrType$4.nil; - this.ctx = $ifaceNil; - return; - } - this.CipherSuites = CipherSuites_; - this.ServerName = ServerName_; - this.SupportedCurves = SupportedCurves_; - this.SupportedPoints = SupportedPoints_; - this.SignatureSchemes = SignatureSchemes_; - this.SupportedProtos = SupportedProtos_; - this.SupportedVersions = SupportedVersions_; - this.Conn = Conn_; - this.config = config_; - this.ctx = ctx_; - }); - CertificateRequestInfo = $pkg.CertificateRequestInfo = $newType(0, $kindStruct, "tls.CertificateRequestInfo", true, "crypto/tls", true, function(AcceptableCAs_, SignatureSchemes_, Version_, ctx_) { - this.$val = this; - if (arguments.length === 0) { - this.AcceptableCAs = sliceType$11.nil; - this.SignatureSchemes = sliceType$7.nil; - this.Version = 0; - this.ctx = $ifaceNil; - return; - } - this.AcceptableCAs = AcceptableCAs_; - this.SignatureSchemes = SignatureSchemes_; - this.Version = Version_; - this.ctx = ctx_; - }); - RenegotiationSupport = $pkg.RenegotiationSupport = $newType(4, $kindInt, "tls.RenegotiationSupport", true, "crypto/tls", true, null); - Config = $pkg.Config = $newType(0, $kindStruct, "tls.Config", true, "crypto/tls", true, function(Rand_, Time_, Certificates_, NameToCertificate_, GetCertificate_, GetClientCertificate_, GetConfigForClient_, VerifyPeerCertificate_, VerifyConnection_, RootCAs_, NextProtos_, ServerName_, ClientAuth_, ClientCAs_, InsecureSkipVerify_, CipherSuites_, PreferServerCipherSuites_, SessionTicketsDisabled_, SessionTicketKey_, ClientSessionCache_, MinVersion_, MaxVersion_, CurvePreferences_, DynamicRecordSizingDisabled_, Renegotiation_, KeyLogWriter_, mutex_, sessionTicketKeys_, autoSessionTicketKeys_) { - this.$val = this; - if (arguments.length === 0) { - this.Rand = $ifaceNil; - this.Time = $throwNilPointerError; - this.Certificates = sliceType.nil; - this.NameToCertificate = false; - this.GetCertificate = $throwNilPointerError; - this.GetClientCertificate = $throwNilPointerError; - this.GetConfigForClient = $throwNilPointerError; - this.VerifyPeerCertificate = $throwNilPointerError; - this.VerifyConnection = $throwNilPointerError; - this.RootCAs = ptrType.nil; - this.NextProtos = sliceType$1.nil; - this.ServerName = ""; - this.ClientAuth = 0; - this.ClientCAs = ptrType.nil; - this.InsecureSkipVerify = false; - this.CipherSuites = sliceType$2.nil; - this.PreferServerCipherSuites = false; - this.SessionTicketsDisabled = false; - this.SessionTicketKey = arrayType.zero(); - this.ClientSessionCache = $ifaceNil; - this.MinVersion = 0; - this.MaxVersion = 0; - this.CurvePreferences = sliceType$3.nil; - this.DynamicRecordSizingDisabled = false; - this.Renegotiation = 0; - this.KeyLogWriter = $ifaceNil; - this.mutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - this.sessionTicketKeys = sliceType$4.nil; - this.autoSessionTicketKeys = sliceType$4.nil; - return; - } - this.Rand = Rand_; - this.Time = Time_; - this.Certificates = Certificates_; - this.NameToCertificate = NameToCertificate_; - this.GetCertificate = GetCertificate_; - this.GetClientCertificate = GetClientCertificate_; - this.GetConfigForClient = GetConfigForClient_; - this.VerifyPeerCertificate = VerifyPeerCertificate_; - this.VerifyConnection = VerifyConnection_; - this.RootCAs = RootCAs_; - this.NextProtos = NextProtos_; - this.ServerName = ServerName_; - this.ClientAuth = ClientAuth_; - this.ClientCAs = ClientCAs_; - this.InsecureSkipVerify = InsecureSkipVerify_; - this.CipherSuites = CipherSuites_; - this.PreferServerCipherSuites = PreferServerCipherSuites_; - this.SessionTicketsDisabled = SessionTicketsDisabled_; - this.SessionTicketKey = SessionTicketKey_; - this.ClientSessionCache = ClientSessionCache_; - this.MinVersion = MinVersion_; - this.MaxVersion = MaxVersion_; - this.CurvePreferences = CurvePreferences_; - this.DynamicRecordSizingDisabled = DynamicRecordSizingDisabled_; - this.Renegotiation = Renegotiation_; - this.KeyLogWriter = KeyLogWriter_; - this.mutex = mutex_; - this.sessionTicketKeys = sessionTicketKeys_; - this.autoSessionTicketKeys = autoSessionTicketKeys_; - }); - ticketKey = $pkg.ticketKey = $newType(0, $kindStruct, "tls.ticketKey", true, "crypto/tls", false, function(keyName_, aesKey_, hmacKey_, created_) { - this.$val = this; - if (arguments.length === 0) { - this.keyName = arrayType$4.zero(); - this.aesKey = arrayType$4.zero(); - this.hmacKey = arrayType$4.zero(); - this.created = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil); - return; - } - this.keyName = keyName_; - this.aesKey = aesKey_; - this.hmacKey = hmacKey_; - this.created = created_; - }); - Certificate = $pkg.Certificate = $newType(0, $kindStruct, "tls.Certificate", true, "crypto/tls", true, function(Certificate_, PrivateKey_, SupportedSignatureAlgorithms_, OCSPStaple_, SignedCertificateTimestamps_, Leaf_) { - this.$val = this; - if (arguments.length === 0) { - this.Certificate = sliceType$11.nil; - this.PrivateKey = $ifaceNil; - this.SupportedSignatureAlgorithms = sliceType$7.nil; - this.OCSPStaple = sliceType$5.nil; - this.SignedCertificateTimestamps = sliceType$11.nil; - this.Leaf = ptrType$5.nil; - return; - } - this.Certificate = Certificate_; - this.PrivateKey = PrivateKey_; - this.SupportedSignatureAlgorithms = SupportedSignatureAlgorithms_; - this.OCSPStaple = OCSPStaple_; - this.SignedCertificateTimestamps = SignedCertificateTimestamps_; - this.Leaf = Leaf_; - }); - cipherSuite = $pkg.cipherSuite = $newType(0, $kindStruct, "tls.cipherSuite", true, "crypto/tls", false, function(id_, keyLen_, macLen_, ivLen_, ka_, flags_, cipher_, mac_, aead_) { - this.$val = this; - if (arguments.length === 0) { - this.id = 0; - this.keyLen = 0; - this.macLen = 0; - this.ivLen = 0; - this.ka = $throwNilPointerError; - this.flags = 0; - this.cipher = $throwNilPointerError; - this.mac = $throwNilPointerError; - this.aead = $throwNilPointerError; - return; - } - this.id = id_; - this.keyLen = keyLen_; - this.macLen = macLen_; - this.ivLen = ivLen_; - this.ka = ka_; - this.flags = flags_; - this.cipher = cipher_; - this.mac = mac_; - this.aead = aead_; - }); - cipherSuiteTLS13 = $pkg.cipherSuiteTLS13 = $newType(0, $kindStruct, "tls.cipherSuiteTLS13", true, "crypto/tls", false, function(id_, keyLen_, aead_, hash_) { - this.$val = this; - if (arguments.length === 0) { - this.id = 0; - this.keyLen = 0; - this.aead = $throwNilPointerError; - this.hash = 0; - return; - } - this.id = id_; - this.keyLen = keyLen_; - this.aead = aead_; - this.hash = hash_; - }); - aead = $pkg.aead = $newType(8, $kindInterface, "tls.aead", true, "crypto/tls", false, null); - prefixNonceAEAD = $pkg.prefixNonceAEAD = $newType(0, $kindStruct, "tls.prefixNonceAEAD", true, "crypto/tls", false, function(nonce_, aead_) { - this.$val = this; - if (arguments.length === 0) { - this.nonce = arrayType$1.zero(); - this.aead = $ifaceNil; - return; - } - this.nonce = nonce_; - this.aead = aead_; - }); - xorNonceAEAD = $pkg.xorNonceAEAD = $newType(0, $kindStruct, "tls.xorNonceAEAD", true, "crypto/tls", false, function(nonceMask_, aead_) { - this.$val = this; - if (arguments.length === 0) { - this.nonceMask = arrayType$1.zero(); - this.aead = $ifaceNil; - return; - } - this.nonceMask = nonceMask_; - this.aead = aead_; - }); - constantTimeHash = $pkg.constantTimeHash = $newType(8, $kindInterface, "tls.constantTimeHash", true, "crypto/tls", false, null); - cthWrapper = $pkg.cthWrapper = $newType(0, $kindStruct, "tls.cthWrapper", true, "crypto/tls", false, function(h_) { - this.$val = this; - if (arguments.length === 0) { - this.h = $ifaceNil; - return; - } - this.h = h_; - }); - alert = $pkg.alert = $newType(1, $kindUint8, "tls.alert", true, "crypto/tls", false, null); - binaryMarshaler = $newType(8, $kindInterface, "tls.binaryMarshaler", true, "crypto/tls", false, null); - sliceType = $sliceType(Certificate); - ptrType = $ptrType(x509.CertPool); - sliceType$1 = $sliceType($String); - sliceType$2 = $sliceType($Uint16); - arrayType = $arrayType($Uint8, 32); - sliceType$3 = $sliceType(CurveID); - sliceType$4 = $sliceType(ticketKey); - sliceType$5 = $sliceType($Uint8); - sliceType$6 = $sliceType($emptyInterface); - ptrType$1 = $ptrType(sliceType$5); - sliceType$7 = $sliceType(SignatureScheme); - ptrType$2 = $ptrType(cipherSuiteTLS13); - sliceType$8 = $sliceType(ptrType$2); - ptrType$3 = $ptrType(cipherSuite); - sliceType$9 = $sliceType(ptrType$3); - structType = $structType("crypto/tls", [{prop: "scheme", name: "scheme", embedded: false, exported: false, typ: SignatureScheme, tag: ""}, {prop: "minModulusBytes", name: "minModulusBytes", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "maxVersion", name: "maxVersion", embedded: false, exported: false, typ: $Uint16, tag: ""}]); - sliceType$10 = $sliceType(structType); - ptrType$4 = $ptrType(Config); - sliceType$11 = $sliceType(sliceType$5); - ptrType$5 = $ptrType(x509.Certificate); - sliceType$12 = $sliceType(ptrType$5); - sliceType$13 = $sliceType(sliceType$12); - arrayType$1 = $arrayType($Uint8, 12); - arrayType$2 = $arrayType($Uint8, 8); - arrayType$3 = $arrayType($Uint8, 13); - arrayType$4 = $arrayType($Uint8, 16); - ptrType$6 = $ptrType(Conn); - ptrType$7 = $ptrType(time.Location); - ptrType$8 = $ptrType(net.Resolver); - ptrType$9 = $ptrType(net.Dialer); - ptrType$10 = $ptrType(pem.Block); - ptrType$11 = $ptrType(rsa.PublicKey); - ptrType$12 = $ptrType(ecdsa.PublicKey); - ptrType$13 = $ptrType(rsa.PrivateKey); - ptrType$14 = $ptrType(ecdsa.PrivateKey); - ptrType$15 = $ptrType(cryptobyte.Builder); - ptrType$16 = $ptrType($Bool); - ptrType$17 = $ptrType(cryptobyte.String); - ptrType$18 = $ptrType($Uint16); - ptrType$19 = $ptrType($Uint64); - ptrType$20 = $ptrType($Uint8); - ptrType$21 = $ptrType(big.Int); - ptrType$22 = $ptrType(serverKeyExchangeMsg); - ptrType$23 = $ptrType(clientKeyExchangeMsg); - ptrType$24 = $ptrType($Uint32); - ptrType$25 = $ptrType(keyShare); - ptrType$26 = $ptrType(clientHelloMsg); - ptrType$27 = $ptrType(certificateMsgTLS13); - ptrType$28 = $ptrType(certificateVerifyMsg); - ptrType$29 = $ptrType(finishedMsg); - ptrType$30 = $ptrType(serverHelloMsg); - ptrType$31 = $ptrType(Certificate); - ptrType$32 = $ptrType(sessionState); - ptrType$33 = $ptrType(certificateRequestMsg); - ptrType$34 = $ptrType(certificateMsg); - sliceType$14 = $sliceType(x509.ExtKeyUsage); - sliceType$15 = $sliceType(keyShare); - sliceType$16 = $sliceType(pskIdentity); - ptrType$35 = $ptrType(CurveID); - ptrType$36 = $ptrType(SignatureScheme); - ptrType$37 = $ptrType(ClientSessionState); - ptrType$38 = $ptrType(encryptedExtensionsMsg); - ptrType$39 = $ptrType(certificateRequestMsgTLS13); - ptrType$40 = $ptrType(certificateStatusMsg); - ptrType$41 = $ptrType(serverHelloDoneMsg); - arrayType$5 = $arrayType($Uint8, 24); - ptrType$42 = $ptrType(newSessionTicketMsg); - arrayType$6 = $arrayType($Uint8, 5); - ptrType$43 = $ptrType($Int32); - ptrType$44 = $ptrType(helloRequestMsg); - ptrType$45 = $ptrType(newSessionTicketMsgTLS13); - ptrType$46 = $ptrType(keyUpdateMsg); - structType$1 = $structType("", []); - arrayType$7 = $arrayType($Uint8, 64); - ptrType$51 = $ptrType(ed25519.PrivateKey); - ptrType$52 = $ptrType(listener); - ptrType$53 = $ptrType(Dialer); - ptrType$54 = $ptrType(sessionStateTLS13); - ptrType$55 = $ptrType(finishedHash); - funcType = $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [], false); - ptrType$56 = $ptrType(nistParameters); - ptrType$57 = $ptrType(x25519Parameters); - ptrType$58 = $ptrType(ecdheKeyAgreement); - ptrType$59 = $ptrType(serverHandshakeStateTLS13); - ptrType$60 = $ptrType(serverHandshakeState); - ptrType$61 = $ptrType(endOfEarlyDataMsg); - ptrType$62 = $ptrType(clientHandshakeStateTLS13); - ptrType$63 = $ptrType(clientHandshakeState); - ptrType$64 = $ptrType(CertificateRequestInfo); - funcType$1 = $funcType([context.Context], [$error], false); - funcType$2 = $funcType([$String, sliceType$5, $Int], [sliceType$5, $error], false); - ptrType$65 = $ptrType(halfConn); - ptrType$66 = $ptrType(permanentError); - ptrType$67 = $ptrType(atLeastReader); - ptrType$68 = $ptrType(ConnectionState); - ptrType$69 = $ptrType(ClientHelloInfo); - sliceType$18 = $sliceType(arrayType); - funcType$3 = $funcType([], [time.Time], false); - mapType = $mapType($String, ptrType$31); - funcType$4 = $funcType([ptrType$69], [ptrType$31, $error], false); - funcType$5 = $funcType([ptrType$64], [ptrType$31, $error], false); - funcType$6 = $funcType([ptrType$69], [ptrType$4, $error], false); - funcType$7 = $funcType([sliceType$11, sliceType$13], [$error], false); - funcType$8 = $funcType([ConnectionState], [$error], false); - funcType$9 = $funcType([$Uint16], [keyAgreement], false); - funcType$10 = $funcType([sliceType$5, sliceType$5, $Bool], [$emptyInterface], false); - funcType$11 = $funcType([sliceType$5], [hash.Hash], false); - funcType$12 = $funcType([sliceType$5, sliceType$5], [aead], false); - ptrType$71 = $ptrType(prefixNonceAEAD); - ptrType$72 = $ptrType(xorNonceAEAD); - ptrType$73 = $ptrType(cthWrapper); - Server = function(conn, config) { - var c, config, conn; - c = new Conn.ptr(conn, false, $throwNilPointerError, 0, new sync.Mutex.ptr(0, 0), $ifaceNil, 0, false, config, 0, false, 0, sliceType$5.nil, sliceType$11.nil, sliceType$12.nil, sliceType$13.nil, "", false, $throwNilPointerError, sliceType$5.nil, sliceType$4.nil, false, $ifaceNil, false, arrayType$1.zero(), arrayType$1.zero(), "", new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$2.zero(), arrayType$3.zero(), $ifaceNil, $ifaceNil, sliceType$5.nil), new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$2.zero(), arrayType$3.zero(), $ifaceNil, $ifaceNil, sliceType$5.nil), new bytes.Buffer.ptr(sliceType$5.nil, 0, 0), new bytes.Reader.ptr(sliceType$5.nil, new $Int64(0, 0), 0), new bytes.Buffer.ptr(sliceType$5.nil, 0, 0), false, sliceType$5.nil, new $Int64(0, 0), new $Int64(0, 0), 0, 0, arrayType$4.zero()); - c.handshakeFn = $methodVal(c, "serverHandshake"); - return c; - }; - $pkg.Server = Server; - Client = function(conn, config) { - var c, config, conn; - c = new Conn.ptr(conn, true, $throwNilPointerError, 0, new sync.Mutex.ptr(0, 0), $ifaceNil, 0, false, config, 0, false, 0, sliceType$5.nil, sliceType$11.nil, sliceType$12.nil, sliceType$13.nil, "", false, $throwNilPointerError, sliceType$5.nil, sliceType$4.nil, false, $ifaceNil, false, arrayType$1.zero(), arrayType$1.zero(), "", new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$2.zero(), arrayType$3.zero(), $ifaceNil, $ifaceNil, sliceType$5.nil), new halfConn.ptr(new sync.Mutex.ptr(0, 0), $ifaceNil, 0, $ifaceNil, $ifaceNil, arrayType$2.zero(), arrayType$3.zero(), $ifaceNil, $ifaceNil, sliceType$5.nil), new bytes.Buffer.ptr(sliceType$5.nil, 0, 0), new bytes.Reader.ptr(sliceType$5.nil, new $Int64(0, 0), 0), new bytes.Buffer.ptr(sliceType$5.nil, 0, 0), false, sliceType$5.nil, new $Int64(0, 0), new $Int64(0, 0), 0, 0, arrayType$4.zero()); - c.handshakeFn = $methodVal(c, "clientHandshake"); - return c; - }; - $pkg.Client = Client; - listener.ptr.prototype.Accept = function() { - var {_r$1, _tuple, c, err, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r$1 = l.Listener.Accept(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - $s = -1; return [Server(c, l.config), $ifaceNil]; - /* */ } return; } var $f = {$blk: listener.ptr.prototype.Accept, $c: true, $r, _r$1, _tuple, c, err, l, $s};return $f; - }; - listener.prototype.Accept = function() { return this.$val.Accept(); }; - NewListener = function(inner, config) { - var config, inner, l; - l = new listener.ptr($ifaceNil, ptrType$4.nil); - l.Listener = inner; - l.config = config; - return l; - }; - $pkg.NewListener = NewListener; - dial = function(ctx, netDialer, network, addr, config) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, addr, c, cancel, cancel$1, colonPos, config, conn, ctx, err, err$1, hostname, netDialer, network, rawConn, x, $s, $deferred, $r, $c} = $restore(this, {ctx, netDialer, network, addr, config}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - /* */ if (!((x = netDialer.Timeout, (x.$high === 0 && x.$low === 0)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x = netDialer.Timeout, (x.$high === 0 && x.$low === 0)))) { */ case 1: - cancel = $throwNilPointerError; - _r$1 = context.WithTimeout(ctx, netDialer.Timeout); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ctx = _tuple[0]; - cancel = _tuple[1]; - $deferred.push([cancel, []]); - /* } */ case 2: - /* */ if (!$clone(netDialer.Deadline, time.Time).IsZero()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!$clone(netDialer.Deadline, time.Time).IsZero()) { */ case 4: - cancel$1 = $throwNilPointerError; - _r$2 = context.WithDeadline(ctx, $clone(netDialer.Deadline, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - ctx = _tuple$1[0]; - cancel$1 = _tuple$1[1]; - $deferred.push([cancel$1, []]); - /* } */ case 5: - _r$3 = netDialer.DialContext(ctx, network, addr); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - rawConn = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: - $24r = [ptrType$6.nil, err]; - $s = 10; case 10: return $24r; - /* } */ case 9: - colonPos = strings.LastIndex(addr, ":"); - if (colonPos === -1) { - colonPos = addr.length; - } - hostname = $substring(addr, 0, colonPos); - if (config === ptrType$4.nil) { - config = defaultConfig(); - } - /* */ if (config.ServerName === "") { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (config.ServerName === "") { */ case 11: - _r$4 = config.Clone(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - c = _r$4; - c.ServerName = hostname; - config = c; - /* } */ case 12: - conn = Client(rawConn, config); - _r$5 = conn.HandshakeContext(ctx); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$1 = _r$5; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 15: - _r$6 = rawConn.Close(); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $24r$1 = [ptrType$6.nil, err$1]; - $s = 18; case 18: return $24r$1; - /* } */ case 16: - $24r$2 = [conn, $ifaceNil]; - $s = 19; case 19: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType$6.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: dial, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, addr, c, cancel, cancel$1, colonPos, config, conn, ctx, err, err$1, hostname, netDialer, network, rawConn, x, $s, $deferred};return $f; } } - }; - Dialer.ptr.prototype.Dial = function(network, addr) { - var {$24r, _r$1, addr, d, network, $s, $r, $c} = $restore(this, {network, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$1 = d.DialContext(context.Background(), network, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Dialer.ptr.prototype.Dial, $c: true, $r, $24r, _r$1, addr, d, network, $s};return $f; - }; - Dialer.prototype.Dial = function(network, addr) { return this.$val.Dial(network, addr); }; - Dialer.ptr.prototype.netDialer = function() { - var d; - d = this; - if (!(d.NetDialer === ptrType$9.nil)) { - return d.NetDialer; - } - return new net.Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$8.nil, $chanNil, $throwNilPointerError); - }; - Dialer.prototype.netDialer = function() { return this.$val.netDialer(); }; - Dialer.ptr.prototype.DialContext = function(ctx, network, addr) { - var {_r$1, _tuple, addr, c, ctx, d, err, network, $s, $r, $c} = $restore(this, {ctx, network, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - _r$1 = dial(ctx, d.netDialer(), network, addr, d.Config); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: Dialer.ptr.prototype.DialContext, $c: true, $r, _r$1, _tuple, addr, c, ctx, d, err, network, $s};return $f; - }; - Dialer.prototype.DialContext = function(ctx, network, addr) { return this.$val.DialContext(ctx, network, addr); }; - LoadX509KeyPair = function(certFile, keyFile) { - var {$24r, _r$1, _r$2, _r$3, _tuple, _tuple$1, certFile, certPEMBlock, err, keyFile, keyPEMBlock, $s, $r, $c} = $restore(this, {certFile, keyFile}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = os.ReadFile(certFile); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - certPEMBlock = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), err]; - } - _r$2 = os.ReadFile(keyFile); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - keyPEMBlock = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), err]; - } - _r$3 = X509KeyPair(certPEMBlock, keyPEMBlock); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 4; case 4: return $24r; - /* */ } return; } var $f = {$blk: LoadX509KeyPair, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, _tuple$1, certFile, certPEMBlock, err, keyFile, keyPEMBlock, $s};return $f; - }; - $pkg.LoadX509KeyPair = LoadX509KeyPair; - X509KeyPair = function(certPEMBlock, keyPEMBlock) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, cert, certDERBlock, certPEMBlock, err, fail, keyDERBlock, keyPEMBlock, ok, ok$1, ok$2, priv, priv$1, priv$2, pub, pub$1, pub$2, pub$3, skippedBlockTypes, x, x509Cert, $s, $r, $c} = $restore(this, {certPEMBlock, keyPEMBlock}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fail = (function(err) { - var err; - return [new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), err]; - }); - cert = new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil); - skippedBlockTypes = sliceType$1.nil; - /* while (true) { */ case 1: - certDERBlock = ptrType$10.nil; - _r$1 = pem.Decode(certPEMBlock); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - certDERBlock = _tuple[0]; - certPEMBlock = _tuple[1]; - if (certDERBlock === ptrType$10.nil) { - /* break; */ $s = 2; continue; - } - if (certDERBlock.Type === "CERTIFICATE") { - cert.Certificate = $append(cert.Certificate, certDERBlock.Bytes); - } else { - skippedBlockTypes = $append(skippedBlockTypes, certDERBlock.Type); - } - $s = 1; continue; - case 2: - /* */ if (cert.Certificate.$length === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (cert.Certificate.$length === 0) { */ case 4: - /* */ if (skippedBlockTypes.$length === 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (skippedBlockTypes.$length === 0) { */ case 6: - _r$2 = fail(errors.New("tls: failed to find any PEM data in certificate input")); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 9; case 9: return $24r; - /* } */ case 7: - /* */ if ((skippedBlockTypes.$length === 1) && strings.HasSuffix((0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]), "PRIVATE KEY")) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ((skippedBlockTypes.$length === 1) && strings.HasSuffix((0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]), "PRIVATE KEY")) { */ case 10: - _r$3 = fail(errors.New("tls: failed to find certificate PEM data in certificate input, but did find a private key; PEM inputs may have been switched")); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 13; case 13: return $24r$1; - /* } */ case 11: - _r$4 = fmt.Errorf("tls: failed to find \"CERTIFICATE\" PEM block in certificate input after skipping PEM blocks of the following types: %v", new sliceType$6([skippedBlockTypes])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = fail(_r$4); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = _r$5; - $s = 16; case 16: return $24r$2; - /* } */ case 5: - skippedBlockTypes = $subslice(skippedBlockTypes, 0, 0); - keyDERBlock = ptrType$10.nil; - /* while (true) { */ case 17: - _r$6 = pem.Decode(keyPEMBlock); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - keyDERBlock = _tuple$1[0]; - keyPEMBlock = _tuple$1[1]; - /* */ if (keyDERBlock === ptrType$10.nil) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (keyDERBlock === ptrType$10.nil) { */ case 20: - /* */ if (skippedBlockTypes.$length === 0) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (skippedBlockTypes.$length === 0) { */ case 22: - _r$7 = fail(errors.New("tls: failed to find any PEM data in key input")); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$3 = _r$7; - $s = 25; case 25: return $24r$3; - /* } */ case 23: - /* */ if ((skippedBlockTypes.$length === 1) && (0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]) === "CERTIFICATE") { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ((skippedBlockTypes.$length === 1) && (0 >= skippedBlockTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : skippedBlockTypes.$array[skippedBlockTypes.$offset + 0]) === "CERTIFICATE") { */ case 26: - _r$8 = fail(errors.New("tls: found a certificate rather than a key in the PEM for the private key")); /* */ $s = 28; case 28: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$4 = _r$8; - $s = 29; case 29: return $24r$4; - /* } */ case 27: - _r$9 = fmt.Errorf("tls: failed to find PEM block with type ending in \"PRIVATE KEY\" in key input after skipping PEM blocks of the following types: %v", new sliceType$6([skippedBlockTypes])); /* */ $s = 30; case 30: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = fail(_r$9); /* */ $s = 31; case 31: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$5 = _r$10; - $s = 32; case 32: return $24r$5; - /* } */ case 21: - if (keyDERBlock.Type === "PRIVATE KEY" || strings.HasSuffix(keyDERBlock.Type, " PRIVATE KEY")) { - /* break; */ $s = 18; continue; - } - skippedBlockTypes = $append(skippedBlockTypes, keyDERBlock.Type); - $s = 17; continue; - case 18: - _r$11 = x509.ParseCertificate((x = cert.Certificate, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))); /* */ $s = 33; case 33: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$2 = _r$11; - x509Cert = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 34: - _r$12 = fail(err); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$6 = _r$12; - $s = 37; case 37: return $24r$6; - /* } */ case 35: - _r$13 = parsePrivateKey(keyDERBlock.Bytes); /* */ $s = 38; case 38: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$3 = _r$13; - cert.PrivateKey = _tuple$3[0]; - err = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 39: - _r$14 = fail(err); /* */ $s = 41; case 41: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$7 = _r$14; - $s = 42; case 42: return $24r$7; - /* } */ case 40: - _ref = x509Cert.PublicKey; - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 43; continue; } - /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 44; continue; } - /* */ if ($assertType(_ref, ed25519.PublicKey, true)[1]) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if ($assertType(_ref, ptrType$11, true)[1]) { */ case 43: - pub = _ref.$val; - _tuple$4 = $assertType(cert.PrivateKey, ptrType$13, true); - priv = _tuple$4[0]; - ok = _tuple$4[1]; - /* */ if (!ok) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (!ok) { */ case 48: - _r$15 = fail(errors.New("tls: private key type does not match public key type")); /* */ $s = 50; case 50: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$8 = _r$15; - $s = 51; case 51: return $24r$8; - /* } */ case 49: - /* */ if (!((pub.N.Cmp(priv.PublicKey.N) === 0))) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (!((pub.N.Cmp(priv.PublicKey.N) === 0))) { */ case 52: - _r$16 = fail(errors.New("tls: private key does not match public key")); /* */ $s = 54; case 54: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$9 = _r$16; - $s = 55; case 55: return $24r$9; - /* } */ case 53: - $s = 47; continue; - /* } else if ($assertType(_ref, ptrType$12, true)[1]) { */ case 44: - pub$1 = _ref.$val; - _tuple$5 = $assertType(cert.PrivateKey, ptrType$14, true); - priv$1 = _tuple$5[0]; - ok$1 = _tuple$5[1]; - /* */ if (!ok$1) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (!ok$1) { */ case 56: - _r$17 = fail(errors.New("tls: private key type does not match public key type")); /* */ $s = 58; case 58: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$10 = _r$17; - $s = 59; case 59: return $24r$10; - /* } */ case 57: - /* */ if (!((pub$1.X.Cmp(priv$1.PublicKey.X) === 0)) || !((pub$1.Y.Cmp(priv$1.PublicKey.Y) === 0))) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (!((pub$1.X.Cmp(priv$1.PublicKey.X) === 0)) || !((pub$1.Y.Cmp(priv$1.PublicKey.Y) === 0))) { */ case 60: - _r$18 = fail(errors.New("tls: private key does not match public key")); /* */ $s = 62; case 62: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$11 = _r$18; - $s = 63; case 63: return $24r$11; - /* } */ case 61: - $s = 47; continue; - /* } else if ($assertType(_ref, ed25519.PublicKey, true)[1]) { */ case 45: - pub$2 = _ref.$val; - _tuple$6 = $assertType(cert.PrivateKey, ed25519.PrivateKey, true); - priv$2 = _tuple$6[0]; - ok$2 = _tuple$6[1]; - /* */ if (!ok$2) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (!ok$2) { */ case 64: - _r$19 = fail(errors.New("tls: private key type does not match public key type")); /* */ $s = 66; case 66: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$12 = _r$19; - $s = 67; case 67: return $24r$12; - /* } */ case 65: - /* */ if (!bytes.Equal($convertSliceType($assertType(priv$2.Public(), ed25519.PublicKey), sliceType$5), $convertSliceType(pub$2, sliceType$5))) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if (!bytes.Equal($convertSliceType($assertType(priv$2.Public(), ed25519.PublicKey), sliceType$5), $convertSliceType(pub$2, sliceType$5))) { */ case 68: - _r$20 = fail(errors.New("tls: private key does not match public key")); /* */ $s = 70; case 70: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r$13 = _r$20; - $s = 71; case 71: return $24r$13; - /* } */ case 69: - $s = 47; continue; - /* } else { */ case 46: - pub$3 = _ref; - _r$21 = fail(errors.New("tls: unknown public key algorithm")); /* */ $s = 72; case 72: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $24r$14 = _r$21; - $s = 73; case 73: return $24r$14; - /* } */ case 47: - $s = -1; return [cert, $ifaceNil]; - /* */ } return; } var $f = {$blk: X509KeyPair, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, cert, certDERBlock, certPEMBlock, err, fail, keyDERBlock, keyPEMBlock, ok, ok$1, ok$2, priv, priv$1, priv$2, pub, pub$1, pub$2, pub$3, skippedBlockTypes, x, x509Cert, $s};return $f; - }; - $pkg.X509KeyPair = X509KeyPair; - parsePrivateKey = function(der) { - var {_r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, der, err, err$1, err$2, key, key$1, key$2, key$3, key$4, $s, $r, $c} = $restore(this, {der}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = x509.ParsePKCS1PrivateKey(der); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - key = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return [key, $ifaceNil]; - } - _r$2 = x509.ParsePKCS8PrivateKey(der); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - key$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - _ref = key$1; - if ($assertType(_ref, ptrType$13, true)[1] || $assertType(_ref, ptrType$14, true)[1] || $assertType(_ref, ed25519.PrivateKey, true)[1]) { - key$2 = _ref; - $s = -1; return [key$2, $ifaceNil]; - } else { - key$3 = _ref; - $s = -1; return [$ifaceNil, errors.New("tls: found unknown private key type in PKCS#8 wrapping")]; - } - } - _r$3 = x509.ParseECPrivateKey(der); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - key$4 = _tuple$2[0]; - err$2 = _tuple$2[1]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - $s = -1; return [key$4, $ifaceNil]; - } - $s = -1; return [$ifaceNil, errors.New("tls: failed to parse private key")]; - /* */ } return; } var $f = {$blk: parsePrivateKey, $c: true, $r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, der, err, err$1, err$2, key, key$1, key$2, key$3, key$4, $s};return $f; - }; - sessionState.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - m = [m]; - m[0] = this; - b[0] = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b[0].AddUint16(m[0].vers); - b[0].AddUint16(m[0].cipherSuite); - addUint64(b[0], m[0].createdAt); - $r = b[0].AddUint16LengthPrefixed((function(b, m) { return function(b$1) { - var b$1; - b$1.AddBytes(m[0].masterSecret); - }; })(b, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b[0].AddUint24LengthPrefixed((function(b, m) { return function $b(b$1) { - var {_i, _ref, b$1, cert, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cert = [cert]; - _ref = m[0].certificates; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - cert[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = b$1.AddUint24LengthPrefixed((function(b, cert, m) { return function(b$2) { - var b$2; - b$2.AddBytes(cert[0]); - }; })(b, cert, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$1, cert, $s};return $f; - }; })(b, m)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return b[0].BytesOrPanic(); - /* */ } return; } var $f = {$blk: sessionState.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - sessionState.prototype.marshal = function() { return this.$val.marshal(); }; - sessionState.ptr.prototype.unmarshal = function(data) { - var cert, certList, certList$24ptr, data, m, ok, s, s$24ptr; - m = this; - sessionState.copy(m, new sessionState.ptr(0, 0, new $Uint64(0, 0), sliceType$5.nil, sliceType$11.nil, m.usedOldKey)); - s = ($convertSliceType(data, cryptobyte.String)); - ok = (s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((m.$ptr_vers || (m.$ptr_vers = new ptrType$18(function() { return this.$target.vers; }, function($v) { this.$target.vers = $v; }, m)))) && (s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((m.$ptr_cipherSuite || (m.$ptr_cipherSuite = new ptrType$18(function() { return this.$target.cipherSuite; }, function($v) { this.$target.cipherSuite = $v; }, m)))) && readUint64((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_createdAt || (m.$ptr_createdAt = new ptrType$19(function() { return this.$target.createdAt; }, function($v) { this.$target.createdAt = $v; }, m)))) && readUint16LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_masterSecret || (m.$ptr_masterSecret = new ptrType$1(function() { return this.$target.masterSecret; }, function($v) { this.$target.masterSecret = $v; }, m)))) && !((m.masterSecret.$length === 0)); - if (!ok) { - return false; - } - certList = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint24LengthPrefixed((certList$24ptr || (certList$24ptr = new ptrType$17(function() { return certList; }, function($v) { certList = $convertSliceType($v, cryptobyte.String); }))))) { - return false; - } - while (true) { - if (!(!certList.Empty())) { break; } - cert = [cert]; - cert[0] = sliceType$5.nil; - if (!readUint24LengthPrefixed((certList$24ptr || (certList$24ptr = new ptrType$17(function() { return certList; }, function($v) { certList = $convertSliceType($v, cryptobyte.String); }))), (cert.$ptr || (cert.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, cert))))) { - return false; - } - m.certificates = $append(m.certificates, cert[0]); - } - return s.Empty(); - }; - sessionState.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - sessionStateTLS13.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = [b]; - m = [m]; - m[0] = this; - b[0] = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b[0].AddUint16(772); - b[0].AddUint8(0); - b[0].AddUint16(m[0].cipherSuite); - addUint64(b[0], m[0].createdAt); - $r = b[0].AddUint8LengthPrefixed((function(b, m) { return function(b$1) { - var b$1; - b$1.AddBytes(m[0].resumptionSecret); - }; })(b, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = marshalCertificate(b[0], $clone(m[0].certificate, Certificate)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return b[0].BytesOrPanic(); - /* */ } return; } var $f = {$blk: sessionStateTLS13.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - sessionStateTLS13.prototype.marshal = function() { return this.$val.marshal(); }; - sessionStateTLS13.ptr.prototype.unmarshal = function(data) { - var data, m, revision, revision$24ptr, s, s$24ptr, version, version$24ptr; - m = this; - sessionStateTLS13.copy(m, new sessionStateTLS13.ptr(0, new $Uint64(0, 0), sliceType$5.nil, new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil))); - s = ($convertSliceType(data, cryptobyte.String)); - version = 0; - revision = 0; - return (s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((version$24ptr || (version$24ptr = new ptrType$18(function() { return version; }, function($v) { version = $v; })))) && (version === 772) && (s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint8((revision$24ptr || (revision$24ptr = new ptrType$20(function() { return revision; }, function($v) { revision = $v; })))) && (revision === 0) && (s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((m.$ptr_cipherSuite || (m.$ptr_cipherSuite = new ptrType$18(function() { return this.$target.cipherSuite; }, function($v) { this.$target.cipherSuite = $v; }, m)))) && readUint64((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_createdAt || (m.$ptr_createdAt = new ptrType$19(function() { return this.$target.createdAt; }, function($v) { this.$target.createdAt = $v; }, m)))) && readUint8LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_resumptionSecret || (m.$ptr_resumptionSecret = new ptrType$1(function() { return this.$target.resumptionSecret; }, function($v) { this.$target.resumptionSecret = $v; }, m)))) && !((m.resumptionSecret.$length === 0)) && unmarshalCertificate((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), m.certificate) && s.Empty(); - }; - sessionStateTLS13.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - Conn.ptr.prototype.encryptTicket = function(state) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, block, c, encrypted, err, err$1, iv, key, keyName, mac, macBytes, state, x, $s, $r, $c} = $restore(this, {state}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.ticketKeys.$length === 0) { - $s = -1; return [sliceType$5.nil, errors.New("tls: internal error: session ticket keys unavailable")]; - } - encrypted = $makeSlice(sliceType$5, ((32 + state.$length >> 0) + 32 >> 0)); - keyName = $subslice(encrypted, 0, 16); - iv = $subslice(encrypted, 16, 32); - macBytes = $subslice(encrypted, (encrypted.$length - 32 >> 0)); - _r$1 = io.ReadFull(c.config.rand(), iv); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$5.nil, err]; - } - key = $clone((x = c.ticketKeys, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), ticketKey); - $copySlice(keyName, new sliceType$5(key.keyName)); - _tuple$1 = aes.NewCipher(new sliceType$5(key.aesKey)); - block = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 2: - _r$2 = err$1.Error(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = errors.New("tls: failed to create cipher while encrypting ticket: " + _r$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [sliceType$5.nil, _r$3]; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$4 = cipher.NewCTR(block, iv); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = _r$4.XORKeyStream($subslice(encrypted, 32), state); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = hmac.New(sha256.New, new sliceType$5(key.hmacKey)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - mac = _r$5; - _r$6 = mac.Write($subslice(encrypted, 0, (encrypted.$length - 32 >> 0))); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = mac.Sum($subslice(macBytes, 0, 0)); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return [encrypted, $ifaceNil]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.encryptTicket, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, block, c, encrypted, err, err$1, iv, key, keyName, mac, macBytes, state, x, $s};return $f; - }; - Conn.prototype.encryptTicket = function(state) { return this.$val.encryptTicket(state); }; - Conn.ptr.prototype.decryptTicket = function(encrypted) { - var {_i, _r$1, _r$2, _r$3, _r$4, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, block, c, candidateKey, ciphertext, encrypted, err, expected, i, iv, key, keyIndex, keyName, mac, macBytes, plaintext, usedOldKey, x, $s, $r, $c} = $restore(this, {encrypted}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - plaintext = sliceType$5.nil; - usedOldKey = false; - c = this; - if (encrypted.$length < 64) { - _tmp = sliceType$5.nil; - _tmp$1 = false; - plaintext = _tmp; - usedOldKey = _tmp$1; - $s = -1; return [plaintext, usedOldKey]; - } - keyName = $subslice(encrypted, 0, 16); - iv = $subslice(encrypted, 16, 32); - macBytes = $subslice(encrypted, (encrypted.$length - 32 >> 0)); - ciphertext = $subslice(encrypted, 32, (encrypted.$length - 32 >> 0)); - keyIndex = -1; - _ref = c.ticketKeys; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - candidateKey = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), ticketKey); - if (bytes.Equal(keyName, new sliceType$5(candidateKey.keyName))) { - keyIndex = i; - break; - } - _i++; - } - if (keyIndex === -1) { - _tmp$2 = sliceType$5.nil; - _tmp$3 = false; - plaintext = _tmp$2; - usedOldKey = _tmp$3; - $s = -1; return [plaintext, usedOldKey]; - } - key = (x = c.ticketKeys, ((keyIndex < 0 || keyIndex >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + keyIndex])); - _r$1 = hmac.New(sha256.New, new sliceType$5(key.hmacKey)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - mac = _r$1; - _r$2 = mac.Write($subslice(encrypted, 0, (encrypted.$length - 32 >> 0))); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = mac.Sum(sliceType$5.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - expected = _r$3; - if (!((subtle.ConstantTimeCompare(macBytes, expected) === 1))) { - _tmp$4 = sliceType$5.nil; - _tmp$5 = false; - plaintext = _tmp$4; - usedOldKey = _tmp$5; - $s = -1; return [plaintext, usedOldKey]; - } - _tuple = aes.NewCipher(new sliceType$5(key.aesKey)); - block = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = sliceType$5.nil; - _tmp$7 = false; - plaintext = _tmp$6; - usedOldKey = _tmp$7; - $s = -1; return [plaintext, usedOldKey]; - } - plaintext = $makeSlice(sliceType$5, ciphertext.$length); - _r$4 = cipher.NewCTR(block, iv); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = _r$4.XORKeyStream(plaintext, ciphertext); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$8 = plaintext; - _tmp$9 = keyIndex > 0; - plaintext = _tmp$8; - usedOldKey = _tmp$9; - $s = -1; return [plaintext, usedOldKey]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.decryptTicket, $c: true, $r, _i, _r$1, _r$2, _r$3, _r$4, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, block, c, candidateKey, ciphertext, encrypted, err, expected, i, iv, key, keyIndex, keyName, mac, macBytes, plaintext, usedOldKey, x, $s};return $f; - }; - Conn.prototype.decryptTicket = function(encrypted) { return this.$val.decryptTicket(encrypted); }; - splitPreMasterSecret = function(secret) { - var _q, _q$1, s1, s2, secret; - s1 = sliceType$5.nil; - s2 = sliceType$5.nil; - s1 = $subslice(secret, 0, (_q = ((secret.$length + 1 >> 0)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - s2 = $subslice(secret, (_q$1 = secret.$length / 2, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero"))); - return [s1, s2]; - }; - pHash = function(result, secret, seed, hash$1) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, a, b, h, hash$1, j, result, secret, seed, $s, $r, $c} = $restore(this, {result, secret, seed, hash$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = hmac.New(hash$1, secret); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - h = _r$1; - _r$2 = h.Write(seed); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = h.Sum(sliceType$5.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - a = _r$3; - j = 0; - /* while (true) { */ case 4: - /* if (!(j < result.$length)) { break; } */ if(!(j < result.$length)) { $s = 5; continue; } - $r = h.Reset(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = h.Write(a); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = h.Write(seed); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = h.Sum(sliceType$5.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - b = _r$6; - $copySlice($subslice(result, j), b); - j = j + (b.$length) >> 0; - $r = h.Reset(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$7 = h.Write(a); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = h.Sum(sliceType$5.nil); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - a = _r$8; - $s = 4; continue; - case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: pHash, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, a, b, h, hash$1, j, result, secret, seed, $s};return $f; - }; - prf10 = function(result, secret, label, seed) { - var {_i, _ref, _tuple, b, hashMD5, hashSHA1, i, label, labelAndSeed, result, result2, s1, s2, secret, seed, $s, $r, $c} = $restore(this, {result, secret, label, seed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hashSHA1 = sha1.New; - hashMD5 = md5.New; - labelAndSeed = $makeSlice(sliceType$5, (label.$length + seed.$length >> 0)); - $copySlice(labelAndSeed, label); - $copySlice($subslice(labelAndSeed, label.$length), seed); - _tuple = splitPreMasterSecret(secret); - s1 = _tuple[0]; - s2 = _tuple[1]; - $r = pHash(result, s1, labelAndSeed, hashMD5); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - result2 = $makeSlice(sliceType$5, result.$length); - $r = pHash(result2, s2, labelAndSeed, hashSHA1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = result2; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= result.$length) ? ($throwRuntimeError("index out of range"), undefined) : result.$array[result.$offset + i] = ((((i < 0 || i >= result.$length) ? ($throwRuntimeError("index out of range"), undefined) : result.$array[result.$offset + i]) ^ (b)) << 24 >>> 24)); - _i++; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: prf10, $c: true, $r, _i, _ref, _tuple, b, hashMD5, hashSHA1, i, label, labelAndSeed, result, result2, s1, s2, secret, seed, $s};return $f; - }; - prf12 = function(hashFunc) { - var hashFunc; - return (function $b(result, secret, label, seed) { - var {label, labelAndSeed, result, secret, seed, $s, $r, $c} = $restore(this, {result, secret, label, seed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - labelAndSeed = $makeSlice(sliceType$5, (label.$length + seed.$length >> 0)); - $copySlice(labelAndSeed, label); - $copySlice($subslice(labelAndSeed, label.$length), seed); - $r = pHash(result, secret, labelAndSeed, hashFunc); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, label, labelAndSeed, result, secret, seed, $s};return $f; - }); - }; - prfAndHashForVersion = function(version, suite) { - var _1, suite, version; - _1 = version; - if ((_1 === (769)) || (_1 === (770))) { - return [prf10, 0]; - } else if (_1 === (771)) { - if (!(((suite.flags & 8) === 0))) { - return [prf12(sha512.New384), 6]; - } - return [prf12(sha256.New), 5]; - } else { - $panic(new $String("unknown version")); - } - }; - prfForVersion = function(version, suite) { - var _tuple, prf, suite, version; - _tuple = prfAndHashForVersion(version, suite); - prf = _tuple[0]; - return prf; - }; - masterFromPreMasterSecret = function(version, suite, preMasterSecret, clientRandom, serverRandom) { - var {clientRandom, masterSecret, preMasterSecret, seed, serverRandom, suite, version, $s, $r, $c} = $restore(this, {version, suite, preMasterSecret, clientRandom, serverRandom}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - seed = $makeSlice(sliceType$5, 0, (clientRandom.$length + serverRandom.$length >> 0)); - seed = $appendSlice(seed, clientRandom); - seed = $appendSlice(seed, serverRandom); - masterSecret = $makeSlice(sliceType$5, 48); - $r = prfForVersion(version, suite)(masterSecret, preMasterSecret, masterSecretLabel, seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return masterSecret; - /* */ } return; } var $f = {$blk: masterFromPreMasterSecret, $c: true, $r, clientRandom, masterSecret, preMasterSecret, seed, serverRandom, suite, version, $s};return $f; - }; - keysFromMasterSecret = function(version, suite, masterSecret, clientRandom, serverRandom, macLen, keyLen, ivLen) { - var {clientIV, clientKey, clientMAC, clientRandom, ivLen, keyLen, keyMaterial, macLen, masterSecret, n, seed, serverIV, serverKey, serverMAC, serverRandom, suite, version, $s, $r, $c} = $restore(this, {version, suite, masterSecret, clientRandom, serverRandom, macLen, keyLen, ivLen}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - clientMAC = sliceType$5.nil; - serverMAC = sliceType$5.nil; - clientKey = sliceType$5.nil; - serverKey = sliceType$5.nil; - clientIV = sliceType$5.nil; - serverIV = sliceType$5.nil; - seed = $makeSlice(sliceType$5, 0, (serverRandom.$length + clientRandom.$length >> 0)); - seed = $appendSlice(seed, serverRandom); - seed = $appendSlice(seed, clientRandom); - n = (($imul(2, macLen)) + ($imul(2, keyLen)) >> 0) + ($imul(2, ivLen)) >> 0; - keyMaterial = $makeSlice(sliceType$5, n); - $r = prfForVersion(version, suite)(keyMaterial, masterSecret, keyExpansionLabel, seed); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - clientMAC = $subslice(keyMaterial, 0, macLen); - keyMaterial = $subslice(keyMaterial, macLen); - serverMAC = $subslice(keyMaterial, 0, macLen); - keyMaterial = $subslice(keyMaterial, macLen); - clientKey = $subslice(keyMaterial, 0, keyLen); - keyMaterial = $subslice(keyMaterial, keyLen); - serverKey = $subslice(keyMaterial, 0, keyLen); - keyMaterial = $subslice(keyMaterial, keyLen); - clientIV = $subslice(keyMaterial, 0, ivLen); - keyMaterial = $subslice(keyMaterial, ivLen); - serverIV = $subslice(keyMaterial, 0, ivLen); - $s = -1; return [clientMAC, serverMAC, clientKey, serverKey, clientIV, serverIV]; - /* */ } return; } var $f = {$blk: keysFromMasterSecret, $c: true, $r, clientIV, clientKey, clientMAC, clientRandom, ivLen, keyLen, keyMaterial, macLen, masterSecret, n, seed, serverIV, serverKey, serverMAC, serverRandom, suite, version, $s};return $f; - }; - newFinishedHash = function(version, cipherSuite$1) { - var {$24r, _r$1, _r$2, _tuple, buffer, cipherSuite$1, hash$1, prf, version, $s, $r, $c} = $restore(this, {version, cipherSuite$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - buffer = sliceType$5.nil; - if (version >= 771) { - buffer = new sliceType$5([]); - } - _tuple = prfAndHashForVersion(version, cipherSuite$1); - prf = _tuple[0]; - hash$1 = _tuple[1]; - /* */ if (!((hash$1 === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((hash$1 === 0))) { */ case 1: - _r$1 = new crypto.Hash(hash$1).New(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = new crypto.Hash(hash$1).New(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = new finishedHash.ptr(_r$1, _r$2, $ifaceNil, $ifaceNil, buffer, version, prf); - $s = 5; case 5: return $24r; - /* } */ case 2: - $s = -1; return new finishedHash.ptr(sha1.New(), sha1.New(), md5.New(), md5.New(), buffer, version, prf); - /* */ } return; } var $f = {$blk: newFinishedHash, $c: true, $r, $24r, _r$1, _r$2, _tuple, buffer, cipherSuite$1, hash$1, prf, version, $s};return $f; - }; - finishedHash.ptr.prototype.Write = function(msg) { - var {_r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, err, h, msg, n, $s, $r, $c} = $restore(this, {msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - h = this; - _r$1 = h.client.Write(msg); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = h.server.Write(msg); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* */ if (h.version < 771) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (h.version < 771) { */ case 3: - _r$3 = h.clientMD5.Write(msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = h.serverMD5.Write(msg); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 4: - if (!(h.buffer === sliceType$5.nil)) { - h.buffer = $appendSlice(h.buffer, msg); - } - _tmp = msg.$length; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: finishedHash.ptr.prototype.Write, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, err, h, msg, n, $s};return $f; - }; - finishedHash.prototype.Write = function(msg) { return this.$val.Write(msg); }; - finishedHash.ptr.prototype.Sum = function() { - var {$24r, $24r$1, _r$1, _r$2, _r$3, h, out, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - /* */ if (h.version >= 771) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (h.version >= 771) { */ case 1: - _r$1 = h.client.Sum(sliceType$5.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - out = $makeSlice(sliceType$5, 0, 36); - _r$2 = h.clientMD5.Sum(out); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - out = _r$2; - _r$3 = h.client.Sum(out); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: finishedHash.ptr.prototype.Sum, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, h, out, $s};return $f; - }; - finishedHash.prototype.Sum = function() { return this.$val.Sum(); }; - finishedHash.ptr.prototype.clientSum = function(masterSecret) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$1, h, masterSecret, out, $s, $r, $c} = $restore(this, {masterSecret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - out = $makeSlice(sliceType$5, 12); - _arg = out; - _arg$1 = masterSecret; - _arg$2 = clientFinishedLabel; - _r$1 = $clone(h, finishedHash).Sum(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$3 = _r$1; - $r = h.prf(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return out; - /* */ } return; } var $f = {$blk: finishedHash.ptr.prototype.clientSum, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$1, h, masterSecret, out, $s};return $f; - }; - finishedHash.prototype.clientSum = function(masterSecret) { return this.$val.clientSum(masterSecret); }; - finishedHash.ptr.prototype.serverSum = function(masterSecret) { - var {_arg, _arg$1, _arg$2, _arg$3, _r$1, h, masterSecret, out, $s, $r, $c} = $restore(this, {masterSecret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - out = $makeSlice(sliceType$5, 12); - _arg = out; - _arg$1 = masterSecret; - _arg$2 = serverFinishedLabel; - _r$1 = $clone(h, finishedHash).Sum(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$3 = _r$1; - $r = h.prf(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return out; - /* */ } return; } var $f = {$blk: finishedHash.ptr.prototype.serverSum, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$1, h, masterSecret, out, $s};return $f; - }; - finishedHash.prototype.serverSum = function(masterSecret) { return this.$val.serverSum(masterSecret); }; - finishedHash.ptr.prototype.hashForClientCertificate = function(sigType, hashAlg, masterSecret) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _r$4, _r$5, h, hash$1, hashAlg, masterSecret, sigType, $s, $r, $c} = $restore(this, {sigType, hashAlg, masterSecret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - if ((h.version >= 771 || (sigType === 228)) && h.buffer === sliceType$5.nil) { - $panic(new $String("tls: handshake hash for a client certificate requested after discarding the handshake buffer")); - } - if (sigType === 228) { - $s = -1; return h.buffer; - } - /* */ if (h.version >= 771) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (h.version >= 771) { */ case 1: - _r$1 = new crypto.Hash(hashAlg).New(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - hash$1 = _r$1; - _r$2 = hash$1.Write(h.buffer); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hash$1.Sum(sliceType$5.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* } */ case 2: - /* */ if (sigType === 227) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (sigType === 227) { */ case 7: - _r$4 = h.server.Sum(sliceType$5.nil); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - _r$5 = $clone(h, finishedHash).Sum(); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = _r$5; - $s = 12; case 12: return $24r$2; - /* */ } return; } var $f = {$blk: finishedHash.ptr.prototype.hashForClientCertificate, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _r$4, _r$5, h, hash$1, hashAlg, masterSecret, sigType, $s};return $f; - }; - finishedHash.prototype.hashForClientCertificate = function(sigType, hashAlg, masterSecret) { return this.$val.hashForClientCertificate(sigType, hashAlg, masterSecret); }; - finishedHash.ptr.prototype.discardHandshakeBuffer = function() { - var h; - h = this; - h.buffer = sliceType$5.nil; - }; - finishedHash.prototype.discardHandshakeBuffer = function() { return this.$val.discardHandshakeBuffer(); }; - noExportedKeyingMaterial = function(label, context$1, length) { - var context$1, label, length; - return [sliceType$5.nil, errors.New("crypto/tls: ExportKeyingMaterial is unavailable when renegotiation is enabled")]; - }; - ekmFromMasterSecret = function(version, suite, masterSecret, clientRandom, serverRandom) { - var clientRandom, masterSecret, serverRandom, suite, version; - return (function $b(label, context$1, length) { - var {$24r, $24r$1, _1, _r$1, _r$2, context$1, keyMaterial, label, length, seed, seedLen, $s, $r, $c} = $restore(this, {label, context$1, length}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = label; - /* */ if (_1 === ("client finished") || _1 === ("server finished") || _1 === ("master secret") || _1 === ("key expansion")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_1 === ("client finished") || _1 === ("server finished") || _1 === ("master secret") || _1 === ("key expansion")) { */ case 2: - _r$1 = fmt.Errorf("crypto/tls: reserved ExportKeyingMaterial label: %s", new sliceType$6([new $String(label)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [sliceType$5.nil, _r$1]; - $s = 5; case 5: return $24r; - /* } */ case 3: - case 1: - seedLen = serverRandom.$length + clientRandom.$length >> 0; - if (!(context$1 === sliceType$5.nil)) { - seedLen = seedLen + ((2 + context$1.$length >> 0)) >> 0; - } - seed = $makeSlice(sliceType$5, 0, seedLen); - seed = $appendSlice(seed, clientRandom); - seed = $appendSlice(seed, serverRandom); - /* */ if (!(context$1 === sliceType$5.nil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(context$1 === sliceType$5.nil)) { */ case 6: - /* */ if (context$1.$length >= 65536) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (context$1.$length >= 65536) { */ case 8: - _r$2 = fmt.Errorf("crypto/tls: ExportKeyingMaterial context too long", new sliceType$6([])); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [sliceType$5.nil, _r$2]; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - seed = $append(seed, (((context$1.$length >> 8 >> 0) << 24 >>> 24)), ((context$1.$length << 24 >>> 24))); - seed = $appendSlice(seed, context$1); - /* } */ case 7: - keyMaterial = $makeSlice(sliceType$5, length); - $r = prfForVersion(version, suite)(keyMaterial, masterSecret, (new sliceType$5($stringToBytes(label))), seed); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [keyMaterial, $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, _1, _r$1, _r$2, context$1, keyMaterial, label, length, seed, seedLen, $s};return $f; - }); - }; - cipherSuiteTLS13.ptr.prototype.expandLabel = function(secret, label, context$1, length) { - var {_r$1, _r$2, _tuple, c, context$1, err, hkdfLabel, label, length, n, out, secret, $s, $r, $c} = $restore(this, {secret, label, context$1, length}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - context$1 = [context$1]; - label = [label]; - c = this; - hkdfLabel = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - hkdfLabel.AddUint16(((length << 16 >>> 16))); - $r = hkdfLabel.AddUint8LengthPrefixed((function(context$1, label) { return function(b) { - var b; - b.AddBytes((new sliceType$5($stringToBytes("tls13 ")))); - b.AddBytes((new sliceType$5($stringToBytes(label[0])))); - }; })(context$1, label)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hkdfLabel.AddUint8LengthPrefixed((function(context$1, label) { return function(b) { - var b; - b.AddBytes(context$1[0]); - }; })(context$1, label)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - out = $makeSlice(sliceType$5, length); - _r$1 = hkdf.Expand($methodVal(new crypto.Hash(c.hash), "New"), secret, hkdfLabel.BytesOrPanic()); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.Read(out); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) || !((n === length))) { - $panic(new $String("tls: HKDF-Expand-Label invocation failed unexpectedly")); - } - $s = -1; return out; - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.expandLabel, $c: true, $r, _r$1, _r$2, _tuple, c, context$1, err, hkdfLabel, label, length, n, out, secret, $s};return $f; - }; - cipherSuiteTLS13.prototype.expandLabel = function(secret, label, context$1, length) { return this.$val.expandLabel(secret, label, context$1, length); }; - cipherSuiteTLS13.ptr.prototype.deriveSecret = function(secret, label, transcript) { - var {$24r, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$2, _r$3, c, label, secret, transcript, $s, $r, $c} = $restore(this, {secret, label, transcript}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if ($interfaceIsEqual(transcript, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(transcript, $ifaceNil)) { */ case 1: - _r$1 = new crypto.Hash(c.hash).New(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - transcript = _r$1; - /* } */ case 2: - _arg = secret; - _arg$1 = label; - _r$2 = transcript.Sum(sliceType$5.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$2 = _r$2; - _arg$3 = new crypto.Hash(c.hash).Size(); - _r$3 = c.expandLabel(_arg, _arg$1, _arg$2, _arg$3); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.deriveSecret, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$2, _r$3, c, label, secret, transcript, $s};return $f; - }; - cipherSuiteTLS13.prototype.deriveSecret = function(secret, label, transcript) { return this.$val.deriveSecret(secret, label, transcript); }; - cipherSuiteTLS13.ptr.prototype.extract = function(newSecret, currentSecret) { - var {$24r, _r$1, c, currentSecret, newSecret, $s, $r, $c} = $restore(this, {newSecret, currentSecret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (newSecret === sliceType$5.nil) { - newSecret = $makeSlice(sliceType$5, new crypto.Hash(c.hash).Size()); - } - _r$1 = hkdf.Extract($methodVal(new crypto.Hash(c.hash), "New"), newSecret, currentSecret); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.extract, $c: true, $r, $24r, _r$1, c, currentSecret, newSecret, $s};return $f; - }; - cipherSuiteTLS13.prototype.extract = function(newSecret, currentSecret) { return this.$val.extract(newSecret, currentSecret); }; - cipherSuiteTLS13.ptr.prototype.nextTrafficSecret = function(trafficSecret) { - var {$24r, _r$1, c, trafficSecret, $s, $r, $c} = $restore(this, {trafficSecret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.expandLabel(trafficSecret, "traffic upd", sliceType$5.nil, new crypto.Hash(c.hash).Size()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.nextTrafficSecret, $c: true, $r, $24r, _r$1, c, trafficSecret, $s};return $f; - }; - cipherSuiteTLS13.prototype.nextTrafficSecret = function(trafficSecret) { return this.$val.nextTrafficSecret(trafficSecret); }; - cipherSuiteTLS13.ptr.prototype.trafficKey = function(trafficSecret) { - var {_r$1, _r$2, c, iv, key, trafficSecret, $s, $r, $c} = $restore(this, {trafficSecret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - key = sliceType$5.nil; - iv = sliceType$5.nil; - c = this; - _r$1 = c.expandLabel(trafficSecret, "key", sliceType$5.nil, c.keyLen); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - key = _r$1; - _r$2 = c.expandLabel(trafficSecret, "iv", sliceType$5.nil, 12); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - iv = _r$2; - $s = -1; return [key, iv]; - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.trafficKey, $c: true, $r, _r$1, _r$2, c, iv, key, trafficSecret, $s};return $f; - }; - cipherSuiteTLS13.prototype.trafficKey = function(trafficSecret) { return this.$val.trafficKey(trafficSecret); }; - cipherSuiteTLS13.ptr.prototype.finishedHash = function(baseKey, transcript) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, baseKey, c, finishedKey, transcript, verifyData, $s, $r, $c} = $restore(this, {baseKey, transcript}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.expandLabel(baseKey, "finished", sliceType$5.nil, new crypto.Hash(c.hash).Size()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - finishedKey = _r$1; - _r$2 = hmac.New($methodVal(new crypto.Hash(c.hash), "New"), finishedKey); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - verifyData = _r$2; - _r$3 = transcript.Sum(sliceType$5.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = verifyData.Write(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = verifyData.Sum(sliceType$5.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.finishedHash, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, baseKey, c, finishedKey, transcript, verifyData, $s};return $f; - }; - cipherSuiteTLS13.prototype.finishedHash = function(baseKey, transcript) { return this.$val.finishedHash(baseKey, transcript); }; - cipherSuiteTLS13.ptr.prototype.exportKeyingMaterial = function(masterSecret, transcript) { - var {_r$1, c, expMasterSecret, masterSecret, transcript, $s, $r, $c} = $restore(this, {masterSecret, transcript}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = [c]; - expMasterSecret = [expMasterSecret]; - c[0] = this; - _r$1 = c[0].deriveSecret(masterSecret, "exp master", transcript); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - expMasterSecret[0] = _r$1; - $s = -1; return (function(c, expMasterSecret) { return function $b(label, context$1, length) { - var {$24r, _arg, _arg$1, _arg$2, _r$2, _r$3, _r$4, _r$5, _r$6, context$1, h, label, length, secret, $s, $r, $c} = $restore(this, {label, context$1, length}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = c[0].deriveSecret(expMasterSecret[0], label, $ifaceNil); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - secret = _r$2; - _r$3 = new crypto.Hash(c[0].hash).New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - h = _r$3; - _r$4 = h.Write(context$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _arg = secret; - _r$5 = h.Sum(sliceType$5.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = _r$5; - _arg$2 = length; - _r$6 = c[0].expandLabel(_arg, "exporter", _arg$1, _arg$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = [_r$6, $ifaceNil]; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _arg, _arg$1, _arg$2, _r$2, _r$3, _r$4, _r$5, _r$6, context$1, h, label, length, secret, $s};return $f; - }; })(c, expMasterSecret); - /* */ } return; } var $f = {$blk: cipherSuiteTLS13.ptr.prototype.exportKeyingMaterial, $c: true, $r, _r$1, c, expMasterSecret, masterSecret, transcript, $s};return $f; - }; - cipherSuiteTLS13.prototype.exportKeyingMaterial = function(masterSecret, transcript) { return this.$val.exportKeyingMaterial(masterSecret, transcript); }; - generateECDHEParameters = function(rand$1, curveID) { - var {_r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, curve, curveID, err, err$1, err$2, ok, p, privateKey, publicKey, rand$1, $s, $r, $c} = $restore(this, {rand$1, curveID}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (curveID === 29) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (curveID === 29) { */ case 1: - privateKey = $makeSlice(sliceType$5, 32); - _r$1 = io.ReadFull(rand$1, privateKey); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - _r$2 = curve25519.X25519(privateKey, curve25519.Basepoint); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - publicKey = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$1]; - } - $s = -1; return [new x25519Parameters.ptr(privateKey, publicKey), $ifaceNil]; - /* } */ case 2: - _r$3 = curveForCurveID(curveID); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - curve = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - $s = -1; return [$ifaceNil, errors.New("tls: internal error: unsupported curve")]; - } - p = new nistParameters.ptr(sliceType$5.nil, ptrType$21.nil, ptrType$21.nil, curveID); - err$2 = $ifaceNil; - _r$4 = elliptic.GenerateKey(curve, rand$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - p.privateKey = _tuple$3[0]; - p.x = _tuple$3[1]; - p.y = _tuple$3[2]; - err$2 = _tuple$3[3]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$2]; - } - $s = -1; return [p, $ifaceNil]; - /* */ } return; } var $f = {$blk: generateECDHEParameters, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, curve, curveID, err, err$1, err$2, ok, p, privateKey, publicKey, rand$1, $s};return $f; - }; - curveForCurveID = function(id) { - var {$24r, $24r$1, $24r$2, _1, _r$1, _r$2, _r$3, id, $s, $r, $c} = $restore(this, {id}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = id; - /* */ if (_1 === (23)) { $s = 2; continue; } - /* */ if (_1 === (24)) { $s = 3; continue; } - /* */ if (_1 === (25)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (23)) { */ case 2: - _r$1 = elliptic.P256(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [_r$1, true]; - $s = 8; case 8: return $24r; - /* } else if (_1 === (24)) { */ case 3: - _r$2 = elliptic.P384(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [_r$2, true]; - $s = 10; case 10: return $24r$1; - /* } else if (_1 === (25)) { */ case 4: - _r$3 = elliptic.P521(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = [_r$3, true]; - $s = 12; case 12: return $24r$2; - /* } else { */ case 5: - $s = -1; return [$ifaceNil, false]; - /* } */ case 6: - case 1: - $s = -1; return [$ifaceNil, false]; - /* */ } return; } var $f = {$blk: curveForCurveID, $c: true, $r, $24r, $24r$1, $24r$2, _1, _r$1, _r$2, _r$3, id, $s};return $f; - }; - nistParameters.ptr.prototype.CurveID = function() { - var p; - p = this; - return p.curveID; - }; - nistParameters.prototype.CurveID = function() { return this.$val.CurveID(); }; - nistParameters.ptr.prototype.PublicKey = function() { - var {$24r, _r$1, _r$2, _tuple, curve, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$1 = curveForCurveID(p.curveID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - curve = _tuple[0]; - _r$2 = elliptic.Marshal(curve, p.x, p.y); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: nistParameters.ptr.prototype.PublicKey, $c: true, $r, $24r, _r$1, _r$2, _tuple, curve, p, $s};return $f; - }; - nistParameters.prototype.PublicKey = function() { return this.$val.PublicKey(); }; - nistParameters.ptr.prototype.SharedKey = function(peerPublicKey) { - var {_q, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, curve, p, peerPublicKey, sharedKey, x, xShared, y, $s, $r, $c} = $restore(this, {peerPublicKey}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$1 = curveForCurveID(p.curveID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - curve = _tuple[0]; - _r$2 = elliptic.Unmarshal(curve, peerPublicKey); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - x = _tuple$1[0]; - y = _tuple$1[1]; - if (x === ptrType$21.nil) { - $s = -1; return sliceType$5.nil; - } - _r$3 = curve.ScalarMult(x, y, p.privateKey); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - xShared = _tuple$2[0]; - _r$4 = curve.Params(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - sharedKey = $makeSlice(sliceType$5, (_q = ((_r$4.BitSize + 7 >> 0)) / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - $s = -1; return xShared.FillBytes(sharedKey); - /* */ } return; } var $f = {$blk: nistParameters.ptr.prototype.SharedKey, $c: true, $r, _q, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, curve, p, peerPublicKey, sharedKey, x, xShared, y, $s};return $f; - }; - nistParameters.prototype.SharedKey = function(peerPublicKey) { return this.$val.SharedKey(peerPublicKey); }; - x25519Parameters.ptr.prototype.CurveID = function() { - var p; - p = this; - return 29; - }; - x25519Parameters.prototype.CurveID = function() { return this.$val.CurveID(); }; - x25519Parameters.ptr.prototype.PublicKey = function() { - var p; - p = this; - return p.publicKey; - }; - x25519Parameters.prototype.PublicKey = function() { return this.$val.PublicKey(); }; - x25519Parameters.ptr.prototype.SharedKey = function(peerPublicKey) { - var {_r$1, _tuple, err, p, peerPublicKey, sharedKey, $s, $r, $c} = $restore(this, {peerPublicKey}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$1 = curve25519.X25519(p.privateKey, peerPublicKey); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - sharedKey = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return sliceType$5.nil; - } - $s = -1; return sharedKey; - /* */ } return; } var $f = {$blk: x25519Parameters.ptr.prototype.SharedKey, $c: true, $r, _r$1, _tuple, err, p, peerPublicKey, sharedKey, $s};return $f; - }; - x25519Parameters.prototype.SharedKey = function(peerPublicKey) { return this.$val.SharedKey(peerPublicKey); }; - rsaKeyAgreement.ptr.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { - var cert, clientHello, config, hello, ka; - ka = this; - return [ptrType$22.nil, $ifaceNil]; - }; - rsaKeyAgreement.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { return this.$val.generateServerKeyExchange(config, cert, clientHello, hello); }; - rsaKeyAgreement.ptr.prototype.processClientKeyExchange = function(config, cert, ckx, version) { - var {_r$1, _tuple, _tuple$1, cert, ciphertext, ciphertextLen, ckx, config, err, ka, ok, preMasterSecret, priv, version, x, x$1, $s, $r, $c} = $restore(this, {config, cert, ckx, version}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ka = this; - if (ckx.ciphertext.$length < 2) { - $s = -1; return [sliceType$5.nil, errClientKeyExchange]; - } - ciphertextLen = ((((x = ckx.ciphertext, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) >> 0)) << 8 >> 0) | (((x$1 = ckx.ciphertext, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) >> 0)); - if (!((ciphertextLen === (ckx.ciphertext.$length - 2 >> 0)))) { - $s = -1; return [sliceType$5.nil, errClientKeyExchange]; - } - ciphertext = $subslice(ckx.ciphertext, 2); - _tuple = $assertType(cert.PrivateKey, crypto.Decrypter, true); - priv = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [sliceType$5.nil, errors.New("tls: certificate private key does not implement crypto.Decrypter")]; - } - _r$1 = priv.Decrypt(config.rand(), ciphertext, new rsa.PKCS1v15DecryptOptions.ptr(48)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - preMasterSecret = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$5.nil, err]; - } - $s = -1; return [preMasterSecret, $ifaceNil]; - /* */ } return; } var $f = {$blk: rsaKeyAgreement.ptr.prototype.processClientKeyExchange, $c: true, $r, _r$1, _tuple, _tuple$1, cert, ciphertext, ciphertextLen, ckx, config, err, ka, ok, preMasterSecret, priv, version, x, x$1, $s};return $f; - }; - rsaKeyAgreement.prototype.processClientKeyExchange = function(config, cert, ckx, version) { return this.$val.processClientKeyExchange(config, cert, ckx, version); }; - rsaKeyAgreement.ptr.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { - var cert, clientHello, config, ka, serverHello, skx; - ka = this; - return errors.New("tls: unexpected ServerKeyExchange"); - }; - rsaKeyAgreement.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { return this.$val.processServerKeyExchange(config, clientHello, serverHello, cert, skx); }; - rsaKeyAgreement.ptr.prototype.generateClientKeyExchange = function(config, clientHello, cert) { - var {_r$1, _r$2, _tuple, _tuple$1, _tuple$2, cert, ckx, clientHello, config, encrypted, err, ka, ok, preMasterSecret, rsaKey, x, x$1, $s, $r, $c} = $restore(this, {config, clientHello, cert}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ka = this; - preMasterSecret = $makeSlice(sliceType$5, 48); - (0 >= preMasterSecret.$length ? ($throwRuntimeError("index out of range"), undefined) : preMasterSecret.$array[preMasterSecret.$offset + 0] = (((clientHello.vers >>> 8 << 16 >>> 16) << 24 >>> 24))); - (1 >= preMasterSecret.$length ? ($throwRuntimeError("index out of range"), undefined) : preMasterSecret.$array[preMasterSecret.$offset + 1] = ((clientHello.vers << 24 >>> 24))); - _r$1 = io.ReadFull(config.rand(), $subslice(preMasterSecret, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$5.nil, ptrType$23.nil, err]; - } - _tuple$1 = $assertType(cert.PublicKey, ptrType$11, true); - rsaKey = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return [sliceType$5.nil, ptrType$23.nil, errors.New("tls: server certificate contains incorrect key type for selected ciphersuite")]; - } - _r$2 = rsa.EncryptPKCS1v15(config.rand(), rsaKey, preMasterSecret); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - encrypted = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$5.nil, ptrType$23.nil, err]; - } - ckx = new clientKeyExchangeMsg.ptr(sliceType$5.nil, sliceType$5.nil); - ckx.ciphertext = $makeSlice(sliceType$5, (encrypted.$length + 2 >> 0)); - (x = ckx.ciphertext, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = (((encrypted.$length >> 8 >> 0) << 24 >>> 24)))); - (x$1 = ckx.ciphertext, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1] = ((encrypted.$length << 24 >>> 24)))); - $copySlice($subslice(ckx.ciphertext, 2), encrypted); - $s = -1; return [preMasterSecret, ckx, $ifaceNil]; - /* */ } return; } var $f = {$blk: rsaKeyAgreement.ptr.prototype.generateClientKeyExchange, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, cert, ckx, clientHello, config, encrypted, err, ka, ok, preMasterSecret, rsaKey, x, x$1, $s};return $f; - }; - rsaKeyAgreement.prototype.generateClientKeyExchange = function(config, clientHello, cert) { return this.$val.generateClientKeyExchange(config, clientHello, cert); }; - sha1Hash = function(slices) { - var {$24r, _i, _r$1, _r$2, _ref, hsha1, slice, slices, $s, $r, $c} = $restore(this, {slices}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hsha1 = sha1.New(); - _ref = slices; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = hsha1.Write(slice); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _i++; - $s = 1; continue; - case 2: - _r$2 = hsha1.Sum(sliceType$5.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: sha1Hash, $c: true, $r, $24r, _i, _r$1, _r$2, _ref, hsha1, slice, slices, $s};return $f; - }; - md5SHA1Hash = function(slices) { - var {_i, _r$1, _r$2, _r$3, _ref, hmd5, md5sha1, slice, slices, $s, $r, $c} = $restore(this, {slices}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - md5sha1 = $makeSlice(sliceType$5, 36); - hmd5 = md5.New(); - _ref = slices; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = hmd5.Write(slice); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _i++; - $s = 1; continue; - case 2: - _r$2 = hmd5.Sum(sliceType$5.nil); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $copySlice(md5sha1, _r$2); - _r$3 = sha1Hash(slices); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $copySlice($subslice(md5sha1, 16), _r$3); - $s = -1; return md5sha1; - /* */ } return; } var $f = {$blk: md5SHA1Hash, $c: true, $r, _i, _r$1, _r$2, _r$3, _ref, hmd5, md5sha1, slice, slices, $s};return $f; - }; - hashForServerKeyExchange = function(sigType, hashFunc, version, slices) { - var {$24r, $24r$1, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, digest, h, hashFunc, sigType, signed, slice, slice$1, slices, version, $s, $r, $c} = $restore(this, {sigType, hashFunc, version, slices}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (sigType === 228) { - signed = sliceType$5.nil; - _ref = slices; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - signed = $appendSlice(signed, slice); - _i++; - } - $s = -1; return signed; - } - /* */ if (version >= 771) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (version >= 771) { */ case 1: - _r$1 = new crypto.Hash(hashFunc).New(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - h = _r$1; - _ref$1 = slices; - _i$1 = 0; - /* while (true) { */ case 4: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } - slice$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$2 = h.Write(slice$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _i$1++; - $s = 4; continue; - case 5: - _r$3 = h.Sum(sliceType$5.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - digest = _r$3; - $s = -1; return digest; - /* } */ case 2: - /* */ if (sigType === 227) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (sigType === 227) { */ case 8: - _r$4 = sha1Hash(slices); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 11; case 11: return $24r; - /* } */ case 9: - _r$5 = md5SHA1Hash(slices); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = _r$5; - $s = 13; case 13: return $24r$1; - /* */ } return; } var $f = {$blk: hashForServerKeyExchange, $c: true, $r, $24r, $24r$1, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, digest, h, hashFunc, sigType, signed, slice, slice$1, slices, version, $s};return $f; - }; - ecdheKeyAgreement.ptr.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { - var {$24r, $24r$1, _i, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c, cert, clientHello, config, curveID, ecdhePublic, err, hello, k, ka, ok, ok$1, params, priv, serverECDHEParams, sig, sigAndHashLen, sigHash, sigType, signOpts, signatureAlgorithm, signed, skx, $s, $r, $c} = $restore(this, {config, cert, clientHello, hello}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ka = this; - curveID = 0; - _ref = clientHello.supportedCurves; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (config.supportsCurve(c)) { - curveID = c; - break; - } - _i++; - } - if (curveID === 0) { - $s = -1; return [ptrType$22.nil, errors.New("tls: no supported elliptic curves offered")]; - } - _r$1 = curveForCurveID(curveID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ok = _tuple[1]; - if (!((curveID === 29)) && !ok) { - $s = -1; return [ptrType$22.nil, errors.New("tls: CurvePreferences includes unsupported curve")]; - } - _r$2 = generateECDHEParameters(config.rand(), curveID); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - params = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$22.nil, err]; - } - ka.params = params; - _r$3 = params.PublicKey(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ecdhePublic = _r$3; - serverECDHEParams = $makeSlice(sliceType$5, (4 + ecdhePublic.$length >> 0)); - (0 >= serverECDHEParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHEParams.$array[serverECDHEParams.$offset + 0] = 3); - (1 >= serverECDHEParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHEParams.$array[serverECDHEParams.$offset + 1] = (((curveID >>> 8 << 16 >>> 16) << 24 >>> 24))); - (2 >= serverECDHEParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHEParams.$array[serverECDHEParams.$offset + 2] = ((curveID << 24 >>> 24))); - (3 >= serverECDHEParams.$length ? ($throwRuntimeError("index out of range"), undefined) : serverECDHEParams.$array[serverECDHEParams.$offset + 3] = ((ecdhePublic.$length << 24 >>> 24))); - $copySlice($subslice(serverECDHEParams, 4), ecdhePublic); - _tuple$2 = $assertType(cert.PrivateKey, crypto.Signer, true); - priv = _tuple$2[0]; - ok$1 = _tuple$2[1]; - /* */ if (!ok$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!ok$1) { */ case 4: - _r$4 = fmt.Errorf("tls: certificate private key of type %T does not implement crypto.Signer", new sliceType$6([cert.PrivateKey])); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = [ptrType$22.nil, _r$4]; - $s = 7; case 7: return $24r; - /* } */ case 5: - signatureAlgorithm = 0; - sigType = 0; - sigHash = 0; - /* */ if (ka.version >= 771) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ka.version >= 771) { */ case 8: - _r$5 = selectSignatureScheme(ka.version, cert, clientHello.supportedSignatureAlgorithms); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - signatureAlgorithm = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$22.nil, err]; - } - _r$6 = typeAndHashFromSignatureScheme(signatureAlgorithm); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$4 = _r$6; - sigType = _tuple$4[0]; - sigHash = _tuple$4[1]; - err = _tuple$4[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$22.nil, err]; - } - $s = 10; continue; - /* } else { */ case 9: - _r$7 = priv.Public(); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = legacyTypeAndHashFromPublicKey(_r$7); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$5 = _r$8; - sigType = _tuple$5[0]; - sigHash = _tuple$5[1]; - err = _tuple$5[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$22.nil, err]; - } - /* } */ case 10: - if (!(((sigType === 225) || (sigType === 226)) === ka.isRSA)) { - $s = -1; return [ptrType$22.nil, errors.New("tls: certificate cannot be used with the selected cipher suite")]; - } - _r$9 = hashForServerKeyExchange(sigType, sigHash, ka.version, new sliceType$11([clientHello.random, hello.random, serverECDHEParams])); /* */ $s = 15; case 15: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - signed = _r$9; - signOpts = (new crypto.Hash(sigHash)); - if (sigType === 226) { - signOpts = new rsa.PSSOptions.ptr(-1, sigHash); - } - _r$10 = priv.Sign(config.rand(), signed, signOpts); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$6 = _r$10; - sig = _tuple$6[0]; - err = _tuple$6[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 17: - _r$11 = err.Error(); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = errors.New("tls: failed to sign ECDHE parameters: " + _r$11); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$1 = [ptrType$22.nil, _r$12]; - $s = 21; case 21: return $24r$1; - /* } */ case 18: - skx = new serverKeyExchangeMsg.ptr(sliceType$5.nil, sliceType$5.nil); - sigAndHashLen = 0; - if (ka.version >= 771) { - sigAndHashLen = 2; - } - skx.key = $makeSlice(sliceType$5, (((serverECDHEParams.$length + sigAndHashLen >> 0) + 2 >> 0) + sig.$length >> 0)); - $copySlice(skx.key, serverECDHEParams); - k = $subslice(skx.key, serverECDHEParams.$length); - if (ka.version >= 771) { - (0 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 0] = (((signatureAlgorithm >>> 8 << 16 >>> 16) << 24 >>> 24))); - (1 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 1] = ((signatureAlgorithm << 24 >>> 24))); - k = $subslice(k, 2); - } - (0 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 0] = (((sig.$length >> 8 >> 0) << 24 >>> 24))); - (1 >= k.$length ? ($throwRuntimeError("index out of range"), undefined) : k.$array[k.$offset + 1] = ((sig.$length << 24 >>> 24))); - $copySlice($subslice(k, 2), sig); - $s = -1; return [skx, $ifaceNil]; - /* */ } return; } var $f = {$blk: ecdheKeyAgreement.ptr.prototype.generateServerKeyExchange, $c: true, $r, $24r, $24r$1, _i, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c, cert, clientHello, config, curveID, ecdhePublic, err, hello, k, ka, ok, ok$1, params, priv, serverECDHEParams, sig, sigAndHashLen, sigHash, sigType, signOpts, signatureAlgorithm, signed, skx, $s};return $f; - }; - ecdheKeyAgreement.prototype.generateServerKeyExchange = function(config, cert, clientHello, hello) { return this.$val.generateServerKeyExchange(config, cert, clientHello, hello); }; - ecdheKeyAgreement.ptr.prototype.processClientKeyExchange = function(config, cert, ckx, version) { - var {_r$1, cert, ckx, config, ka, preMasterSecret, version, x, $s, $r, $c} = $restore(this, {config, cert, ckx, version}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ka = this; - if ((ckx.ciphertext.$length === 0) || !(((((x = ckx.ciphertext, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) >> 0)) === (ckx.ciphertext.$length - 1 >> 0)))) { - $s = -1; return [sliceType$5.nil, errClientKeyExchange]; - } - _r$1 = ka.params.SharedKey($subslice(ckx.ciphertext, 1)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - preMasterSecret = _r$1; - if (preMasterSecret === sliceType$5.nil) { - $s = -1; return [sliceType$5.nil, errClientKeyExchange]; - } - $s = -1; return [preMasterSecret, $ifaceNil]; - /* */ } return; } var $f = {$blk: ecdheKeyAgreement.ptr.prototype.processClientKeyExchange, $c: true, $r, _r$1, cert, ckx, config, ka, preMasterSecret, version, x, $s};return $f; - }; - ecdheKeyAgreement.prototype.processClientKeyExchange = function(config, cert, ckx, version) { return this.$val.processClientKeyExchange(config, cert, ckx, version); }; - ecdheKeyAgreement.ptr.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { - var {$24r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, cert, clientHello, config, curveID, err, err$1, ka, ok, ourPublicKey, params, publicKey, publicLen, serverECDHEParams, serverHello, sig, sigHash, sigLen, sigType, signatureAlgorithm, signed, skx, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {config, clientHello, serverHello, cert, skx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ka = this; - if (skx.key.$length < 4) { - $s = -1; return errServerKeyExchange; - } - if (!(((x = skx.key, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 3))) { - $s = -1; return errors.New("tls: server selected unsupported curve"); - } - curveID = (((((x$1 = skx.key, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) << 16 >>> 16)) << 8 << 16 >>> 16) | (((x$2 = skx.key, (2 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 2])) << 16 >>> 16))) >>> 0; - publicLen = (((x$3 = skx.key, (3 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 3])) >> 0)); - if ((publicLen + 4 >> 0) > skx.key.$length) { - $s = -1; return errServerKeyExchange; - } - serverECDHEParams = $subslice(skx.key, 0, (4 + publicLen >> 0)); - publicKey = $subslice(serverECDHEParams, 4); - sig = $subslice(skx.key, (4 + publicLen >> 0)); - if (sig.$length < 2) { - $s = -1; return errServerKeyExchange; - } - _r$1 = curveForCurveID(curveID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ok = _tuple[1]; - if (!((curveID === 29)) && !ok) { - $s = -1; return errors.New("tls: server selected unsupported curve"); - } - _r$2 = generateECDHEParameters(config.rand(), curveID); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - params = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - ka.params = params; - _r$3 = params.SharedKey(publicKey); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ka.preMasterSecret = _r$3; - if (ka.preMasterSecret === sliceType$5.nil) { - $s = -1; return errServerKeyExchange; - } - _r$4 = params.PublicKey(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ourPublicKey = _r$4; - ka.ckx = new clientKeyExchangeMsg.ptr(sliceType$5.nil, sliceType$5.nil); - ka.ckx.ciphertext = $makeSlice(sliceType$5, (1 + ourPublicKey.$length >> 0)); - (x$4 = ka.ckx.ciphertext, (0 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 0] = ((ourPublicKey.$length << 24 >>> 24)))); - $copySlice($subslice(ka.ckx.ciphertext, 1), ourPublicKey); - sigType = 0; - sigHash = 0; - /* */ if (ka.version >= 771) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ka.version >= 771) { */ case 5: - signatureAlgorithm = (((((0 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 1]) << 16 >>> 16))) >>> 0; - sig = $subslice(sig, 2); - if (sig.$length < 2) { - $s = -1; return errServerKeyExchange; - } - if (!isSupportedSignatureAlgorithm(signatureAlgorithm, clientHello.supportedSignatureAlgorithms)) { - $s = -1; return errors.New("tls: certificate used with invalid signature algorithm"); - } - _r$5 = typeAndHashFromSignatureScheme(signatureAlgorithm); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - sigType = _tuple$2[0]; - sigHash = _tuple$2[1]; - err = _tuple$2[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 7; continue; - /* } else { */ case 6: - _r$6 = legacyTypeAndHashFromPublicKey(cert.PublicKey); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$3 = _r$6; - sigType = _tuple$3[0]; - sigHash = _tuple$3[1]; - err = _tuple$3[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 7: - if (!(((sigType === 225) || (sigType === 226)) === ka.isRSA)) { - $s = -1; return errServerKeyExchange; - } - sigLen = ((((0 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 0]) >> 0)) << 8 >> 0) | (((1 >= sig.$length ? ($throwRuntimeError("index out of range"), undefined) : sig.$array[sig.$offset + 1]) >> 0)); - if (!(((sigLen + 2 >> 0) === sig.$length))) { - $s = -1; return errServerKeyExchange; - } - sig = $subslice(sig, 2); - _r$7 = hashForServerKeyExchange(sigType, sigHash, ka.version, new sliceType$11([clientHello.random, serverHello.random, serverECDHEParams])); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - signed = _r$7; - _r$8 = verifyHandshakeSignature(sigType, cert.PublicKey, sigHash, signed, sig); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$1 = _r$8; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 12: - _r$9 = err$1.Error(); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = errors.New("tls: invalid signature by the server certificate: " + _r$9); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 16; case 16: return $24r; - /* } */ case 13: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ecdheKeyAgreement.ptr.prototype.processServerKeyExchange, $c: true, $r, $24r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, cert, clientHello, config, curveID, err, err$1, ka, ok, ourPublicKey, params, publicKey, publicLen, serverECDHEParams, serverHello, sig, sigHash, sigLen, sigType, signatureAlgorithm, signed, skx, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - ecdheKeyAgreement.prototype.processServerKeyExchange = function(config, clientHello, serverHello, cert, skx) { return this.$val.processServerKeyExchange(config, clientHello, serverHello, cert, skx); }; - ecdheKeyAgreement.ptr.prototype.generateClientKeyExchange = function(config, clientHello, cert) { - var cert, clientHello, config, ka; - ka = this; - if (ka.ckx === ptrType$23.nil) { - return [sliceType$5.nil, ptrType$23.nil, errors.New("tls: missing ServerKeyExchange message")]; - } - return [ka.preMasterSecret, ka.ckx, $ifaceNil]; - }; - ecdheKeyAgreement.prototype.generateClientKeyExchange = function(config, clientHello, cert) { return this.$val.generateClientKeyExchange(config, clientHello, cert); }; - serverHandshakeStateTLS13.ptr.prototype.handshake = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$2, err$3, err$4, err$5, err$6, err$7, err$8, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.processClientHello(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = hs.checkForResumption(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$3 = hs.pickCertificate(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$2 = _r$3; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - c.buffering = true; - _r$4 = hs.sendServerParameters(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$3 = _r$4; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _r$5 = hs.sendServerCertificate(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$4 = _r$5; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - _r$6 = hs.sendServerFinished(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err$5 = _r$6; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - _r$7 = c.flush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - err$6 = _tuple[1]; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - _r$8 = hs.readClientCertificate(); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$7 = _r$8; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - _r$9 = hs.readClientFinished(); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$8 = _r$9; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$24(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 1); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.handshake, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$2, err$3, err$4, err$5, err$6, err$7, err$8, hs, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.handshake = function() { return this.$val.handshake(); }; - serverHandshakeStateTLS13.ptr.prototype.processClientHello = function() { - var {_i, _i$1, _i$2, _i$3, _i$4, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, c, clientKeyShare, err, err$1, err$2, group, hs, id, ks, ok, params, preferenceList, preferredGroup, selectedGroup, suiteID, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - hs.hello = new serverHelloMsg.ptr(sliceType$5.nil, 0, sliceType$5.nil, sliceType$5.nil, 0, 0, false, false, false, sliceType$5.nil, "", sliceType$11.nil, 0, new keyShare.ptr(0, sliceType$5.nil), false, 0, sliceType$5.nil, sliceType$5.nil, 0); - hs.hello.vers = 771; - hs.hello.supportedVersion = c.vers; - /* */ if (hs.clientHello.supportedVersions.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hs.clientHello.supportedVersions.$length === 0) { */ case 1: - _r$1 = c.sendAlert(47); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: client used the legacy version field to negotiate TLS 1.3"); - /* } */ case 2: - _ref = hs.clientHello.cipherSuites; - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (id === 22016) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (id === 22016) { */ case 6: - /* */ if (c.vers < c.config.maxSupportedVersion(false)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (c.vers < c.config.maxSupportedVersion(false)) { */ case 8: - _r$2 = c.sendAlert(86); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return errors.New("tls: client using inappropriate protocol fallback"); - /* } */ case 9: - /* break; */ $s = 5; continue; - /* } */ case 7: - _i++; - $s = 4; continue; - case 5: - /* */ if (!((hs.clientHello.compressionMethods.$length === 1)) || !(((x = hs.clientHello.compressionMethods, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 0))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!((hs.clientHello.compressionMethods.$length === 1)) || !(((x = hs.clientHello.compressionMethods, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 0))) { */ case 11: - _r$3 = c.sendAlert(47); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return errors.New("tls: TLS 1.3 client supports illegal compression methods"); - /* } */ case 12: - hs.hello.random = $makeSlice(sliceType$5, 32); - _r$4 = io.ReadFull(c.config.rand(), hs.hello.random); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 15: - _r$5 = c.sendAlert(80); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return err; - /* } */ case 16: - /* */ if (!((hs.clientHello.secureRenegotiation.$length === 0))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!((hs.clientHello.secureRenegotiation.$length === 0))) { */ case 18: - _r$6 = c.sendAlert(40); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: initial handshake had non-empty renegotiation extension"); - /* } */ case 19: - /* */ if (hs.clientHello.earlyData) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (hs.clientHello.earlyData) { */ case 21: - _r$7 = c.sendAlert(110); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return errors.New("tls: client sent unexpected early data"); - /* } */ case 22: - hs.hello.sessionId = hs.clientHello.sessionId; - hs.hello.compressionMethod = 0; - preferenceList = defaultCipherSuitesTLS13; - if (!hasAESGCMHardwareSupport || !aesgcmPreferred(hs.clientHello.cipherSuites)) { - preferenceList = defaultCipherSuitesTLS13NoAES; - } - _ref$1 = preferenceList; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - suiteID = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - hs.suite = mutualCipherSuiteTLS13(hs.clientHello.cipherSuites, suiteID); - if (!(hs.suite === ptrType$2.nil)) { - break; - } - _i$1++; - } - /* */ if (hs.suite === ptrType$2.nil) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (hs.suite === ptrType$2.nil) { */ case 24: - _r$8 = c.sendAlert(40); /* */ $s = 26; case 26: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = -1; return errors.New("tls: no cipher suite supported by both client and server"); - /* } */ case 25: - c.cipherSuite = hs.suite.id; - hs.hello.cipherSuite = hs.suite.id; - _r$9 = new crypto.Hash(hs.suite.hash).New(); /* */ $s = 27; case 27: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - hs.transcript = _r$9; - selectedGroup = 0; - clientKeyShare = ptrType$25.nil; - _ref$2 = c.config.curvePreferences(); - _i$2 = 0; - GroupSelection: - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - ks = [ks]; - preferredGroup = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - _ref$3 = hs.clientHello.keyShares; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - ks[0] = $clone(((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]), keyShare); - if (ks[0].group === preferredGroup) { - selectedGroup = ks[0].group; - clientKeyShare = ks[0]; - break GroupSelection; - } - _i$3++; - } - if (!((selectedGroup === 0))) { - _i$2++; - continue; - } - _ref$4 = hs.clientHello.supportedCurves; - _i$4 = 0; - while (true) { - if (!(_i$4 < _ref$4.$length)) { break; } - group = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); - if (group === preferredGroup) { - selectedGroup = group; - break; - } - _i$4++; - } - _i$2++; - } - /* */ if (selectedGroup === 0) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (selectedGroup === 0) { */ case 28: - _r$10 = c.sendAlert(40); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return errors.New("tls: no ECDHE curve supported by both client and server"); - /* } */ case 29: - /* */ if (clientKeyShare === ptrType$25.nil) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (clientKeyShare === ptrType$25.nil) { */ case 31: - _r$11 = hs.doHelloRetryRequest(selectedGroup); /* */ $s = 33; case 33: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$1 = _r$11; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - clientKeyShare = (x$1 = hs.clientHello.keyShares, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - /* } */ case 32: - _r$12 = curveForCurveID(selectedGroup); /* */ $s = 34; case 34: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$1 = _r$12; - ok = _tuple$1[1]; - /* */ if (!((selectedGroup === 29)) && !ok) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!((selectedGroup === 29)) && !ok) { */ case 35: - _r$13 = c.sendAlert(80); /* */ $s = 37; case 37: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - $s = -1; return errors.New("tls: CurvePreferences includes unsupported curve"); - /* } */ case 36: - _r$14 = generateECDHEParameters(c.config.rand(), selectedGroup); /* */ $s = 38; case 38: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tuple$2 = _r$14; - params = _tuple$2[0]; - err$2 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 39: - _r$15 = c.sendAlert(80); /* */ $s = 41; case 41: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - $s = -1; return err$2; - /* } */ case 40: - _r$16 = params.PublicKey(); /* */ $s = 42; case 42: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - keyShare.copy(hs.hello.serverShare, new keyShare.ptr(selectedGroup, _r$16)); - _r$17 = params.SharedKey(clientKeyShare.data); /* */ $s = 43; case 43: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - hs.sharedKey = _r$17; - /* */ if (hs.sharedKey === sliceType$5.nil) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (hs.sharedKey === sliceType$5.nil) { */ case 44: - _r$18 = c.sendAlert(47); /* */ $s = 46; case 46: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - $s = -1; return errors.New("tls: invalid client key share"); - /* } */ case 45: - c.serverName = hs.clientHello.serverName; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.processClientHello, $c: true, $r, _i, _i$1, _i$2, _i$3, _i$4, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _tuple, _tuple$1, _tuple$2, c, clientKeyShare, err, err$1, err$2, group, hs, id, ks, ok, params, preferenceList, preferredGroup, selectedGroup, suiteID, x, x$1, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.processClientHello = function() { return this.$val.processClientHello(); }; - serverHandshakeStateTLS13.ptr.prototype.checkForResumption = function() { - var {_i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, binderKey, c, createdAt, err, hs, i, identity, mode, modeOK, needClientCerts, ok, plaintext, psk, pskBinder, pskSuite, sessionHasClientCerts, sessionState$1, transcript, x, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - if (c.config.SessionTicketsDisabled) { - $s = -1; return $ifaceNil; - } - modeOK = false; - _ref = hs.clientHello.pskModes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - mode = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (mode === 1) { - modeOK = true; - break; - } - _i++; - } - if (!modeOK) { - $s = -1; return $ifaceNil; - } - /* */ if (!((hs.clientHello.pskIdentities.$length === hs.clientHello.pskBinders.$length))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((hs.clientHello.pskIdentities.$length === hs.clientHello.pskBinders.$length))) { */ case 1: - _r$1 = c.sendAlert(47); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: invalid or missing PSK binders"); - /* } */ case 2: - if (hs.clientHello.pskIdentities.$length === 0) { - $s = -1; return $ifaceNil; - } - _ref$1 = hs.clientHello.pskIdentities; - _i$1 = 0; - /* while (true) { */ case 4: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } - i = _i$1; - identity = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), pskIdentity); - if (i >= 5) { - /* break; */ $s = 5; continue; - } - _r$2 = c.decryptTicket(identity.label); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - plaintext = _tuple[0]; - if (plaintext === sliceType$5.nil) { - _i$1++; - /* continue; */ $s = 4; continue; - } - sessionState$1 = new sessionStateTLS13.ptr(0, new $Uint64(0, 0), sliceType$5.nil, new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil)); - ok = sessionState$1.unmarshal(plaintext); - if (!ok) { - _i$1++; - /* continue; */ $s = 4; continue; - } - createdAt = $clone(time.Unix(((x = sessionState$1.createdAt, new $Int64(x.$high, x.$low))), new $Int64(0, 0)), time.Time); - _r$3 = c.config.time(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(_r$3, time.Time).Sub($clone(createdAt, time.Time)); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if ((x$1 = _r$4, (x$1.$high > 140815 || (x$1.$high === 140815 && x$1.$low > 4180213760)))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((x$1 = _r$4, (x$1.$high > 140815 || (x$1.$high === 140815 && x$1.$low > 4180213760)))) { */ case 7: - _i$1++; - /* continue; */ $s = 4; continue; - /* } */ case 8: - pskSuite = cipherSuiteTLS13ByID(sessionState$1.cipherSuite); - if (pskSuite === ptrType$2.nil || !((pskSuite.hash === hs.suite.hash))) { - _i$1++; - /* continue; */ $s = 4; continue; - } - sessionHasClientCerts = !((sessionState$1.certificate.Certificate.$length === 0)); - needClientCerts = requiresClientCert(c.config.ClientAuth); - if (needClientCerts && !sessionHasClientCerts) { - _i$1++; - /* continue; */ $s = 4; continue; - } - if (sessionHasClientCerts && (c.config.ClientAuth === 0)) { - _i$1++; - /* continue; */ $s = 4; continue; - } - _r$5 = hs.suite.expandLabel(sessionState$1.resumptionSecret, "resumption", sliceType$5.nil, new crypto.Hash(hs.suite.hash).Size()); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - psk = _r$5; - _r$6 = hs.suite.extract(psk, sliceType$5.nil); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - hs.earlySecret = _r$6; - _r$7 = hs.suite.deriveSecret(hs.earlySecret, "res binder", $ifaceNil); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - binderKey = _r$7; - _r$8 = cloneHash(hs.transcript, hs.suite.hash); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - transcript = _r$8; - /* */ if ($interfaceIsEqual(transcript, $ifaceNil)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($interfaceIsEqual(transcript, $ifaceNil)) { */ case 15: - _r$9 = c.sendAlert(80); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = -1; return errors.New("tls: internal error: failed to clone hash"); - /* } */ case 16: - _r$10 = hs.clientHello.marshalWithoutBinders(); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = transcript.Write(_r$10); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = hs.suite.finishedHash(binderKey, transcript); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - pskBinder = _r$12; - /* */ if (!hmac.Equal((x$2 = hs.clientHello.pskBinders, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])), pskBinder)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!hmac.Equal((x$2 = hs.clientHello.pskBinders, ((i < 0 || i >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i])), pskBinder)) { */ case 21: - _r$13 = c.sendAlert(51); /* */ $s = 23; case 23: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - $s = -1; return errors.New("tls: invalid PSK binder"); - /* } */ case 22: - c.didResume = true; - _r$14 = c.processCertsFromClient($clone(sessionState$1.certificate, Certificate)); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err = _r$14; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - hs.hello.selectedIdentityPresent = true; - hs.hello.selectedIdentity = ((i << 16 >>> 16)); - hs.usingPSK = true; - $s = -1; return $ifaceNil; - case 5: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.checkForResumption, $c: true, $r, _i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, binderKey, c, createdAt, err, hs, i, identity, mode, modeOK, needClientCerts, ok, plaintext, psk, pskBinder, pskSuite, sessionHasClientCerts, sessionState$1, transcript, x, x$1, x$2, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.checkForResumption = function() { return this.$val.checkForResumption(); }; - cloneHash = function(in$1, h) { - var {_r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, err, err$1, h, in$1, marshaler, ok, out, state, unmarshaler, $s, $r, $c} = $restore(this, {in$1, h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(in$1, binaryMarshaler, true); - marshaler = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return $ifaceNil; - } - _r$1 = marshaler.MarshalBinary(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - state = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return $ifaceNil; - } - _r$2 = new crypto.Hash(h).New(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - out = _r$2; - _tuple$2 = $assertType(out, binaryMarshaler, true); - unmarshaler = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - $s = -1; return $ifaceNil; - } - _r$3 = unmarshaler.UnmarshalBinary(state); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return $ifaceNil; - } - $s = -1; return out; - /* */ } return; } var $f = {$blk: cloneHash, $c: true, $r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, err, err$1, h, in$1, marshaler, ok, out, state, unmarshaler, $s};return $f; - }; - serverHandshakeStateTLS13.ptr.prototype.pickCertificate = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, certificate, err, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - if (hs.usingPSK) { - $s = -1; return $ifaceNil; - } - /* */ if (hs.clientHello.supportedSignatureAlgorithms.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hs.clientHello.supportedSignatureAlgorithms.$length === 0) { */ case 1: - _r$1 = c.sendAlert(109); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$2 = c.config.getCertificate(clientHelloInfo(hs.ctx, c, hs.clientHello)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - certificate = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - /* */ if ($interfaceIsEqual(err, errNoCertificates)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($interfaceIsEqual(err, errNoCertificates)) { */ case 8: - _r$3 = c.sendAlert(112); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 10; continue; - /* } else { */ case 9: - _r$4 = c.sendAlert(80); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 10: - $s = -1; return err; - /* } */ case 7: - _r$5 = selectSignatureScheme(c.vers, certificate, hs.clientHello.supportedSignatureAlgorithms); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - hs.sigAlg = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - _r$6 = c.sendAlert(40); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return err; - /* } */ case 15: - hs.cert = certificate; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.pickCertificate, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, certificate, err, hs, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.pickCertificate = function() { return this.$val.pickCertificate(); }; - serverHandshakeStateTLS13.ptr.prototype.sendDummyChangeCipherSpec = function() { - var {_r$1, _tuple, err, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - if (hs.sentDummyCCS) { - $s = -1; return $ifaceNil; - } - hs.sentDummyCCS = true; - _r$1 = hs.c.writeRecord(20, new sliceType$5([1])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.sendDummyChangeCipherSpec, $c: true, $r, _r$1, _tuple, err, hs, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.sendDummyChangeCipherSpec = function() { return this.$val.sendDummyChangeCipherSpec(); }; - serverHandshakeStateTLS13.ptr.prototype.doHelloRetryRequest = function(selectedGroup) { - var {$24r, _arg, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, chHash, clientHello, err, err$1, err$2, helloRetryRequest, hs, msg, ok, selectedGroup, x, $s, $r, $c} = $restore(this, {selectedGroup}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.clientHello.marshal(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = hs.transcript.Write(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hs.transcript.Sum(sliceType$5.nil); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - chHash = _r$3; - $r = hs.transcript.Reset(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = hs.transcript.Write(new sliceType$5([254, 0, 0, ((chHash.$length << 24 >>> 24))])); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = hs.transcript.Write(chHash); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - helloRetryRequest = new serverHelloMsg.ptr(sliceType$5.nil, hs.hello.vers, helloRetryRequestRandom, hs.hello.sessionId, hs.hello.cipherSuite, hs.hello.compressionMethod, false, false, false, sliceType$5.nil, "", sliceType$11.nil, hs.hello.supportedVersion, new keyShare.ptr(0, sliceType$5.nil), false, 0, sliceType$5.nil, sliceType$5.nil, selectedGroup); - _r$6 = helloRetryRequest.marshal(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = hs.transcript.Write(_r$6); /* */ $s = 8; case 8: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = helloRetryRequest.marshal(); /* */ $s = 9; case 9: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg = _r$8; - _r$9 = c.writeRecord(22, _arg); /* */ $s = 10; case 10: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$10 = hs.sendDummyChangeCipherSpec(); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$1 = _r$10; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$11 = c.readHandshake(); /* */ $s = 12; case 12: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$1 = _r$11; - msg = _tuple$1[0]; - err$2 = _tuple$1[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _tuple$2 = $assertType(msg, ptrType$26, true); - clientHello = _tuple$2[0]; - ok = _tuple$2[1]; - /* */ if (!ok) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!ok) { */ case 13: - _r$12 = c.sendAlert(10); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = unexpectedMessageError(clientHello, msg); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = _r$13; - $s = 17; case 17: return $24r; - /* } */ case 14: - /* */ if (!((clientHello.keyShares.$length === 1)) || !(((x = clientHello.keyShares, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).group === selectedGroup))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!((clientHello.keyShares.$length === 1)) || !(((x = clientHello.keyShares, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).group === selectedGroup))) { */ case 18: - _r$14 = c.sendAlert(47); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $s = -1; return errors.New("tls: client sent invalid key share in second ClientHello"); - /* } */ case 19: - /* */ if (clientHello.earlyData) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (clientHello.earlyData) { */ case 21: - _r$15 = c.sendAlert(47); /* */ $s = 23; case 23: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - $s = -1; return errors.New("tls: client indicated early data in second ClientHello"); - /* } */ case 22: - /* */ if (illegalClientHelloChange(clientHello, hs.clientHello)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (illegalClientHelloChange(clientHello, hs.clientHello)) { */ case 24: - _r$16 = c.sendAlert(47); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - $s = -1; return errors.New("tls: client illegally modified second ClientHello"); - /* } */ case 25: - hs.clientHello = clientHello; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.doHelloRetryRequest, $c: true, $r, $24r, _arg, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, chHash, clientHello, err, err$1, err$2, helloRetryRequest, hs, msg, ok, selectedGroup, x, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.doHelloRetryRequest = function(selectedGroup) { return this.$val.doHelloRetryRequest(selectedGroup); }; - illegalClientHelloChange = function(ch, ch1) { - var _i, _i$1, _i$2, _i$3, _i$4, _i$5, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, ch, ch1, i, i$1, i$2, i$3, i$4, i$5, x, x$1, x$10, x$11, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9; - if (!((ch.supportedVersions.$length === ch1.supportedVersions.$length)) || !((ch.cipherSuites.$length === ch1.cipherSuites.$length)) || !((ch.supportedCurves.$length === ch1.supportedCurves.$length)) || !((ch.supportedSignatureAlgorithms.$length === ch1.supportedSignatureAlgorithms.$length)) || !((ch.supportedSignatureAlgorithmsCert.$length === ch1.supportedSignatureAlgorithmsCert.$length)) || !((ch.alpnProtocols.$length === ch1.alpnProtocols.$length))) { - return true; - } - _ref = ch.supportedVersions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (!(((x = ch.supportedVersions, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])) === (x$1 = ch1.supportedVersions, ((i < 0 || i >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + i]))))) { - return true; - } - _i++; - } - _ref$1 = ch.cipherSuites; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - if (!(((x$2 = ch.cipherSuites, ((i$1 < 0 || i$1 >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + i$1])) === (x$3 = ch1.cipherSuites, ((i$1 < 0 || i$1 >= x$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + i$1]))))) { - return true; - } - _i$1++; - } - _ref$2 = ch.supportedCurves; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - i$2 = _i$2; - if (!(((x$4 = ch.supportedCurves, ((i$2 < 0 || i$2 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + i$2])) === (x$5 = ch1.supportedCurves, ((i$2 < 0 || i$2 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i$2]))))) { - return true; - } - _i$2++; - } - _ref$3 = ch.supportedSignatureAlgorithms; - _i$3 = 0; - while (true) { - if (!(_i$3 < _ref$3.$length)) { break; } - i$3 = _i$3; - if (!(((x$6 = ch.supportedSignatureAlgorithms, ((i$3 < 0 || i$3 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i$3])) === (x$7 = ch1.supportedSignatureAlgorithms, ((i$3 < 0 || i$3 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + i$3]))))) { - return true; - } - _i$3++; - } - _ref$4 = ch.supportedSignatureAlgorithmsCert; - _i$4 = 0; - while (true) { - if (!(_i$4 < _ref$4.$length)) { break; } - i$4 = _i$4; - if (!(((x$8 = ch.supportedSignatureAlgorithmsCert, ((i$4 < 0 || i$4 >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + i$4])) === (x$9 = ch1.supportedSignatureAlgorithmsCert, ((i$4 < 0 || i$4 >= x$9.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$9.$array[x$9.$offset + i$4]))))) { - return true; - } - _i$4++; - } - _ref$5 = ch.alpnProtocols; - _i$5 = 0; - while (true) { - if (!(_i$5 < _ref$5.$length)) { break; } - i$5 = _i$5; - if (!((x$10 = ch.alpnProtocols, ((i$5 < 0 || i$5 >= x$10.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$10.$array[x$10.$offset + i$5])) === (x$11 = ch1.alpnProtocols, ((i$5 < 0 || i$5 >= x$11.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$11.$array[x$11.$offset + i$5])))) { - return true; - } - _i$5++; - } - return !((ch.vers === ch1.vers)) || !bytes.Equal(ch.random, ch1.random) || !bytes.Equal(ch.sessionId, ch1.sessionId) || !bytes.Equal(ch.compressionMethods, ch1.compressionMethods) || !(ch.serverName === ch1.serverName) || !(ch.ocspStapling === ch1.ocspStapling) || !bytes.Equal(ch.supportedPoints, ch1.supportedPoints) || !(ch.ticketSupported === ch1.ticketSupported) || !bytes.Equal(ch.sessionTicket, ch1.sessionTicket) || !(ch.secureRenegotiationSupported === ch1.secureRenegotiationSupported) || !bytes.Equal(ch.secureRenegotiation, ch1.secureRenegotiation) || !(ch.scts === ch1.scts) || !bytes.Equal(ch.cookie, ch1.cookie) || !bytes.Equal(ch.pskModes, ch1.pskModes); - }; - serverHandshakeStateTLS13.ptr.prototype.sendServerParameters = function() { - var {_arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, clientSecret, earlySecret, encryptedExtensions, err, err$1, err$2, err$3, hs, selectedProto, serverSecret, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.clientHello.marshal(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = hs.transcript.Write(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hs.hello.marshal(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = hs.transcript.Write(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = hs.hello.marshal(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg = _r$5; - _r$6 = c.writeRecord(22, _arg); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$7 = hs.sendDummyChangeCipherSpec(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err$1 = _r$7; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - earlySecret = hs.earlySecret; - /* */ if (earlySecret === sliceType$5.nil) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (earlySecret === sliceType$5.nil) { */ case 8: - _r$8 = hs.suite.extract(sliceType$5.nil, sliceType$5.nil); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - earlySecret = _r$8; - /* } */ case 9: - _arg$1 = hs.sharedKey; - _r$9 = hs.suite.deriveSecret(earlySecret, "derived", $ifaceNil); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$2 = _r$9; - _r$10 = hs.suite.extract(_arg$1, _arg$2); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - hs.handshakeSecret = _r$10; - _r$11 = hs.suite.deriveSecret(hs.handshakeSecret, "c hs traffic", hs.transcript); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - clientSecret = _r$11; - $r = c.in$27.setTrafficSecret(hs.suite, clientSecret); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$12 = hs.suite.deriveSecret(hs.handshakeSecret, "s hs traffic", hs.transcript); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - serverSecret = _r$12; - $r = c.out.setTrafficSecret(hs.suite, serverSecret); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$13 = c.config.writeKeyLog("CLIENT_HANDSHAKE_TRAFFIC_SECRET", hs.clientHello.random, clientSecret); /* */ $s = 17; case 17: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$2 = _r$13; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 18: - _r$14 = c.sendAlert(80); /* */ $s = 20; case 20: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $s = -1; return err$2; - /* } */ case 19: - _r$15 = c.config.writeKeyLog("SERVER_HANDSHAKE_TRAFFIC_SECRET", hs.clientHello.random, serverSecret); /* */ $s = 21; case 21: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err$2 = _r$15; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 22: - _r$16 = c.sendAlert(80); /* */ $s = 24; case 24: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - $s = -1; return err$2; - /* } */ case 23: - encryptedExtensions = new encryptedExtensionsMsg.ptr(sliceType$5.nil, ""); - _r$17 = negotiateALPN(c.config.NextProtos, hs.clientHello.alpnProtocols); /* */ $s = 25; case 25: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$1 = _r$17; - selectedProto = _tuple$1[0]; - err$2 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 26: - _r$18 = c.sendAlert(120); /* */ $s = 28; case 28: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - $s = -1; return err$2; - /* } */ case 27: - encryptedExtensions.alpnProtocol = selectedProto; - c.clientProtocol = selectedProto; - _r$19 = encryptedExtensions.marshal(); /* */ $s = 29; case 29: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = hs.transcript.Write(_r$19); /* */ $s = 30; case 30: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - _r$21 = encryptedExtensions.marshal(); /* */ $s = 31; case 31: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _arg$3 = _r$21; - _r$22 = c.writeRecord(22, _arg$3); /* */ $s = 32; case 32: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple$2 = _r$22; - err$3 = _tuple$2[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.sendServerParameters, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, clientSecret, earlySecret, encryptedExtensions, err, err$1, err$2, err$3, hs, selectedProto, serverSecret, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.sendServerParameters = function() { return this.$val.sendServerParameters(); }; - serverHandshakeStateTLS13.ptr.prototype.requestClientCert = function() { - var hs; - hs = this; - return hs.c.config.ClientAuth >= 1 && !hs.usingPSK; - }; - serverHandshakeStateTLS13.prototype.requestClientCert = function() { return this.$val.requestClientCert(); }; - serverHandshakeStateTLS13.ptr.prototype.sendServerCertificate = function() { - var {$24r, $24r$1, _arg, _arg$1, _arg$2, _q, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, certMsg, certReq, certVerifyMsg, err, err$1, err$2, err$3, hs, ok, public$1, rsaKey, sig, sigHash, sigType, signOpts, signed, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - if (hs.usingPSK) { - $s = -1; return $ifaceNil; - } - /* */ if (hs.requestClientCert()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hs.requestClientCert()) { */ case 1: - certReq = new certificateRequestMsgTLS13.ptr(sliceType$5.nil, false, false, sliceType$7.nil, sliceType$7.nil, sliceType$11.nil); - certReq.ocspStapling = true; - certReq.scts = true; - certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms; - if (!(c.config.ClientCAs === ptrType.nil)) { - certReq.certificateAuthorities = c.config.ClientCAs.Subjects(); - } - _r$1 = certReq.marshal(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = hs.transcript.Write(_r$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = certReq.marshal(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg = _r$3; - _r$4 = c.writeRecord(22, _arg); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 2: - certMsg = new certificateMsgTLS13.ptr(sliceType$5.nil, new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), false, false); - Certificate.copy(certMsg.certificate, hs.cert); - certMsg.scts = hs.clientHello.scts && hs.cert.SignedCertificateTimestamps.$length > 0; - certMsg.ocspStapling = hs.clientHello.ocspStapling && hs.cert.OCSPStaple.$length > 0; - _r$5 = certMsg.marshal(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = hs.transcript.Write(_r$5); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = certMsg.marshal(); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$1 = _r$7; - _r$8 = c.writeRecord(22, _arg$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - certVerifyMsg = new certificateVerifyMsg.ptr(sliceType$5.nil, false, 0, sliceType$5.nil); - certVerifyMsg.hasSignatureAlgorithm = true; - certVerifyMsg.signatureAlgorithm = hs.sigAlg; - _r$9 = typeAndHashFromSignatureScheme(hs.sigAlg); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$2 = _r$9; - sigType = _tuple$2[0]; - sigHash = _tuple$2[1]; - err$2 = _tuple$2[2]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 12: - _r$10 = c.sendAlert(80); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 15; case 15: return $24r; - /* } */ case 13: - _r$11 = signedMessage(sigHash, "TLS 1.3, server CertificateVerify\x00", hs.transcript); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - signed = _r$11; - signOpts = (new crypto.Hash(sigHash)); - if (sigType === 226) { - signOpts = new rsa.PSSOptions.ptr(-1, sigHash); - } - _r$12 = $assertType(hs.cert.PrivateKey, crypto.Signer).Sign(c.config.rand(), signed, signOpts); /* */ $s = 17; case 17: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$3 = _r$12; - sig = _tuple$3[0]; - err$2 = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 18: - _r$13 = $assertType(hs.cert.PrivateKey, crypto.Signer).Public(); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - public$1 = _r$13; - _tuple$4 = $assertType(public$1, ptrType$11, true); - rsaKey = _tuple$4[0]; - ok = _tuple$4[1]; - /* */ if (ok && (sigType === 226) && (_q = rsaKey.N.BitLen() / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) < (($imul(new crypto.Hash(sigHash).Size(), 2)) + 2 >> 0)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (ok && (sigType === 226) && (_q = rsaKey.N.BitLen() / 8, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) < (($imul(new crypto.Hash(sigHash).Size(), 2)) + 2 >> 0)) { */ case 21: - _r$14 = c.sendAlert(40); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $s = 23; continue; - /* } else { */ case 22: - _r$15 = c.sendAlert(80); /* */ $s = 25; case 25: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - /* } */ case 23: - _r$16 = err$2.Error(); /* */ $s = 26; case 26: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$17 = errors.New("tls: failed to sign handshake: " + _r$16); /* */ $s = 27; case 27: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$1 = _r$17; - $s = 28; case 28: return $24r$1; - /* } */ case 19: - certVerifyMsg.signature = sig; - _r$18 = certVerifyMsg.marshal(); /* */ $s = 29; case 29: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$19 = hs.transcript.Write(_r$18); /* */ $s = 30; case 30: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - _r$20 = certVerifyMsg.marshal(); /* */ $s = 31; case 31: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _arg$2 = _r$20; - _r$21 = c.writeRecord(22, _arg$2); /* */ $s = 32; case 32: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _tuple$5 = _r$21; - err$3 = _tuple$5[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.sendServerCertificate, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _arg$2, _q, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, certMsg, certReq, certVerifyMsg, err, err$1, err$2, err$3, hs, ok, public$1, rsaKey, sig, sigHash, sigType, signOpts, signed, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.sendServerCertificate = function() { return this.$val.sendServerCertificate(); }; - serverHandshakeStateTLS13.ptr.prototype.sendServerFinished = function() { - var {_arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$2, finished, hs, serverSecret, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.suite.finishedHash(c.out.trafficSecret, hs.transcript); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - finished = new finishedMsg.ptr(sliceType$5.nil, _r$1); - _r$2 = finished.marshal(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = hs.transcript.Write(_r$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = finished.marshal(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg = _r$4; - _r$5 = c.writeRecord(22, _arg); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _arg$1 = sliceType$5.nil; - _r$6 = hs.suite.deriveSecret(hs.handshakeSecret, "derived", $ifaceNil); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$2 = _r$6; - _r$7 = hs.suite.extract(_arg$1, _arg$2); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - hs.masterSecret = _r$7; - _r$8 = hs.suite.deriveSecret(hs.masterSecret, "c ap traffic", hs.transcript); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - hs.trafficSecret = _r$8; - _r$9 = hs.suite.deriveSecret(hs.masterSecret, "s ap traffic", hs.transcript); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - serverSecret = _r$9; - $r = c.out.setTrafficSecret(hs.suite, serverSecret); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$10 = c.config.writeKeyLog("CLIENT_TRAFFIC_SECRET_0", hs.clientHello.random, hs.trafficSecret); /* */ $s = 11; case 11: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$1 = _r$10; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 12: - _r$11 = c.sendAlert(80); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return err$1; - /* } */ case 13: - _r$12 = c.config.writeKeyLog("SERVER_TRAFFIC_SECRET_0", hs.clientHello.random, serverSecret); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$1 = _r$12; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 16: - _r$13 = c.sendAlert(80); /* */ $s = 18; case 18: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - $s = -1; return err$1; - /* } */ case 17: - _r$14 = hs.suite.exportKeyingMaterial(hs.masterSecret, hs.transcript); /* */ $s = 19; case 19: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - c.ekm = _r$14; - /* */ if (!hs.requestClientCert()) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!hs.requestClientCert()) { */ case 20: - _r$15 = hs.sendSessionTickets(); /* */ $s = 22; case 22: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err$2 = _r$15; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* } */ case 21: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.sendServerFinished, $c: true, $r, _arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$2, finished, hs, serverSecret, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.sendServerFinished = function() { return this.$val.sendServerFinished(); }; - serverHandshakeStateTLS13.ptr.prototype.shouldSendSessionTickets = function() { - var _i, _ref, hs, pskMode; - hs = this; - if (hs.c.config.SessionTicketsDisabled) { - return false; - } - _ref = hs.clientHello.pskModes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - pskMode = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (pskMode === 1) { - return true; - } - _i++; - } - return false; - }; - serverHandshakeStateTLS13.prototype.shouldSendSessionTickets = function() { return this.$val.shouldSendSessionTickets(); }; - serverHandshakeStateTLS13.ptr.prototype.sendSessionTickets = function() { - var {_arg, _i, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, ageAdd, c, cert, certsFromClient, err, err$1, finishedMsg$1, hs, m, resumptionSecret, state, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.suite.finishedHash(c.in$27.trafficSecret, hs.transcript); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - hs.clientFinished = _r$1; - finishedMsg$1 = new finishedMsg.ptr(sliceType$5.nil, hs.clientFinished); - _r$2 = finishedMsg$1.marshal(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = hs.transcript.Write(_r$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - if (!hs.shouldSendSessionTickets()) { - $s = -1; return $ifaceNil; - } - _r$4 = hs.suite.deriveSecret(hs.masterSecret, "res master", hs.transcript); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - resumptionSecret = _r$4; - m = new newSessionTicketMsgTLS13.ptr(sliceType$5.nil, 0, 0, sliceType$5.nil, sliceType$5.nil, 0); - certsFromClient = sliceType$11.nil; - _ref = c.peerCertificates; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cert = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - certsFromClient = $append(certsFromClient, cert.Raw); - _i++; - } - _r$5 = c.config.time(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, time.Time).Unix(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - state = new sessionStateTLS13.ptr(hs.suite.id, ((x = _r$6, new $Uint64(x.$high, x.$low))), resumptionSecret, new Certificate.ptr(certsFromClient, $ifaceNil, sliceType$7.nil, c.ocspResponse, c.scts, ptrType$5.nil)); - err = $ifaceNil; - _r$7 = state.marshal(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = c.encryptTicket(_r$7); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple = _r$8; - m.label = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - m.lifetime = 604800; - ageAdd = $makeSlice(sliceType$5, 4); - _r$9 = hs.c.config.rand().Read(ageAdd); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - m.ageAdd = $clone(binary.LittleEndian, binary.littleEndian).Uint32(ageAdd); - _r$10 = m.marshal(); /* */ $s = 10; case 10: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg = _r$10; - _r$11 = c.writeRecord(22, _arg); /* */ $s = 11; case 11: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$2 = _r$11; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.sendSessionTickets, $c: true, $r, _arg, _i, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, ageAdd, c, cert, certsFromClient, err, err$1, finishedMsg$1, hs, m, resumptionSecret, state, x, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.sendSessionTickets = function() { return this.$val.sendSessionTickets(); }; - serverHandshakeStateTLS13.ptr.prototype.readClientCertificate = function() { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, c, certMsg, certVerify, err, err$1, err$2, err$3, err$4, err$5, err$6, hs, msg, ok, ok$1, sigHash, sigType, signed, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - /* */ if (!hs.requestClientCert()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!hs.requestClientCert()) { */ case 1: - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 3: - _r$1 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - _r$2 = c.sendAlert(42); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return err; - /* } */ case 7: - /* } */ case 4: - $s = -1; return $ifaceNil; - /* } */ case 2: - _r$3 = c.readHandshake(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - msg = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _tuple$1 = $assertType(msg, ptrType$27, true); - certMsg = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!ok) { */ case 10: - _r$4 = c.sendAlert(10); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = unexpectedMessageError(certMsg, msg); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = _r$5; - $s = 14; case 14: return $24r; - /* } */ case 11: - _r$6 = certMsg.marshal(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = hs.transcript.Write(_r$6); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = c.processCertsFromClient($clone(certMsg.certificate, Certificate)); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 18: - _r$9 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$3 = _r$9; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 21: - _r$10 = c.sendAlert(42); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return err$3; - /* } */ case 22: - /* } */ case 19: - /* */ if (!((certMsg.certificate.Certificate.$length === 0))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!((certMsg.certificate.Certificate.$length === 0))) { */ case 24: - _r$11 = c.readHandshake(); /* */ $s = 26; case 26: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$2 = _r$11; - msg = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _tuple$3 = $assertType(msg, ptrType$28, true); - certVerify = _tuple$3[0]; - ok$1 = _tuple$3[1]; - /* */ if (!ok$1) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!ok$1) { */ case 27: - _r$12 = c.sendAlert(10); /* */ $s = 29; case 29: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = unexpectedMessageError(certVerify, msg); /* */ $s = 30; case 30: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$1 = _r$13; - $s = 31; case 31: return $24r$1; - /* } */ case 28: - /* */ if (!isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms)) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms)) { */ case 32: - _r$14 = c.sendAlert(47); /* */ $s = 34; case 34: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $s = -1; return errors.New("tls: client certificate used with invalid signature algorithm"); - /* } */ case 33: - _r$15 = typeAndHashFromSignatureScheme(certVerify.signatureAlgorithm); /* */ $s = 35; case 35: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tuple$4 = _r$15; - sigType = _tuple$4[0]; - sigHash = _tuple$4[1]; - err$4 = _tuple$4[2]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 36: - _r$16 = c.sendAlert(80); /* */ $s = 38; case 38: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$2 = _r$16; - $s = 39; case 39: return $24r$2; - /* } */ case 37: - /* */ if ((sigType === 225) || (sigHash === 3)) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if ((sigType === 225) || (sigHash === 3)) { */ case 40: - _r$17 = c.sendAlert(47); /* */ $s = 42; case 42: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - $s = -1; return errors.New("tls: client certificate used with invalid signature algorithm"); - /* } */ case 41: - _r$18 = signedMessage(sigHash, "TLS 1.3, client CertificateVerify\x00", hs.transcript); /* */ $s = 43; case 43: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - signed = _r$18; - _r$19 = verifyHandshakeSignature(sigType, (x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).PublicKey, sigHash, signed, certVerify.signature); /* */ $s = 44; case 44: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - err$5 = _r$19; - /* */ if (!($interfaceIsEqual(err$5, $ifaceNil))) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!($interfaceIsEqual(err$5, $ifaceNil))) { */ case 45: - _r$20 = c.sendAlert(51); /* */ $s = 47; case 47: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - _r$21 = err$5.Error(); /* */ $s = 48; case 48: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$22 = errors.New("tls: invalid signature by the client certificate: " + _r$21); /* */ $s = 49; case 49: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $24r$3 = _r$22; - $s = 50; case 50: return $24r$3; - /* } */ case 46: - _r$23 = certVerify.marshal(); /* */ $s = 51; case 51: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = hs.transcript.Write(_r$23); /* */ $s = 52; case 52: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$24; - /* } */ case 25: - _r$25 = hs.sendSessionTickets(); /* */ $s = 53; case 53: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - err$6 = _r$25; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.readClientCertificate, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, c, certMsg, certVerify, err, err$1, err$2, err$3, err$4, err$5, err$6, hs, msg, ok, ok$1, sigHash, sigType, signed, x, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.readClientCertificate = function() { return this.$val.readClientCertificate(); }; - serverHandshakeStateTLS13.ptr.prototype.readClientFinished = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, c, err, finished, hs, msg, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = $assertType(msg, ptrType$29, true); - finished = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(finished, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* } */ case 3: - /* */ if (!hmac.Equal(hs.clientFinished, finished.verifyData)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!hmac.Equal(hs.clientFinished, finished.verifyData)) { */ case 7: - _r$4 = c.sendAlert(51); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return errors.New("tls: invalid client finished hash"); - /* } */ case 8: - $r = c.in$27.setTrafficSecret(hs.suite, hs.trafficSecret); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeStateTLS13.ptr.prototype.readClientFinished, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, c, err, finished, hs, msg, ok, $s};return $f; - }; - serverHandshakeStateTLS13.prototype.readClientFinished = function() { return this.$val.readClientFinished(); }; - Conn.ptr.prototype.serverHandshake = function(ctx) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _tuple, c, clientHello, ctx, err, hs, hs$1, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.readClientHello(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - clientHello = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (c.vers === 772) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (c.vers === 772) { */ case 2: - hs = new serverHandshakeStateTLS13.ptr(c, ctx, clientHello, ptrType$30.nil, false, false, ptrType$2.nil, ptrType$31.nil, 0, sliceType$5.nil, sliceType$5.nil, sliceType$5.nil, sliceType$5.nil, sliceType$5.nil, $ifaceNil, sliceType$5.nil); - _r$2 = hs.handshake(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 3: - hs$1 = new serverHandshakeState.ptr(c, ctx, clientHello, ptrType$30.nil, ptrType$3.nil, false, false, false, false, ptrType$32.nil, new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$5.nil, 0, $throwNilPointerError), sliceType$5.nil, ptrType$31.nil); - _r$3 = hs$1.handshake(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.serverHandshake, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _tuple, c, clientHello, ctx, err, hs, hs$1, $s};return $f; - }; - Conn.prototype.serverHandshake = function(ctx) { return this.$val.serverHandshake(ctx); }; - serverHandshakeState.ptr.prototype.handshake = function() { - var {_r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, err, err$1, err$10, err$11, err$12, err$13, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.processClientHello(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - c.buffering = true; - _r$2 = hs.checkForResumption(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_r$2) { */ case 2: - c.didResume = true; - _r$3 = hs.doResumeHandshake(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$4 = hs.establishKeys(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$2 = _r$4; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _r$5 = hs.sendSessionTicket(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$3 = _r$5; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _r$6 = hs.sendFinished(new sliceType$5(c.serverFinished)); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err$4 = _r$6; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - _r$7 = c.flush(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - err$5 = _tuple[1]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - c.clientFinishedIsFirst = false; - _r$8 = hs.readFinished(sliceType$5.nil); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$6 = _r$8; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - $s = 4; continue; - /* } else { */ case 3: - _r$9 = hs.pickCipherSuite(); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$7 = _r$9; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - _r$10 = hs.doFullHandshake(); /* */ $s = 13; case 13: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$8 = _r$10; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - _r$11 = hs.establishKeys(); /* */ $s = 14; case 14: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$9 = _r$11; - if (!($interfaceIsEqual(err$9, $ifaceNil))) { - $s = -1; return err$9; - } - _r$12 = hs.readFinished(new sliceType$5(c.clientFinished)); /* */ $s = 15; case 15: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$10 = _r$12; - if (!($interfaceIsEqual(err$10, $ifaceNil))) { - $s = -1; return err$10; - } - c.clientFinishedIsFirst = true; - c.buffering = true; - _r$13 = hs.sendSessionTicket(); /* */ $s = 16; case 16: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$11 = _r$13; - if (!($interfaceIsEqual(err$11, $ifaceNil))) { - $s = -1; return err$11; - } - _r$14 = hs.sendFinished(sliceType$5.nil); /* */ $s = 17; case 17: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err$12 = _r$14; - if (!($interfaceIsEqual(err$12, $ifaceNil))) { - $s = -1; return err$12; - } - _r$15 = c.flush(); /* */ $s = 18; case 18: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tuple$1 = _r$15; - err$13 = _tuple$1[1]; - if (!($interfaceIsEqual(err$13, $ifaceNil))) { - $s = -1; return err$13; - } - /* } */ case 4: - c.ekm = ekmFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.clientHello.random, hs.hello.random); - atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$24(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 1); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.handshake, $c: true, $r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, err, err$1, err$10, err$11, err$12, err$13, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, $s};return $f; - }; - serverHandshakeState.prototype.handshake = function() { return this.$val.handshake(); }; - Conn.ptr.prototype.readClientHello = function(ctx) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, c, chi, clientHello, clientVersions, configForClient, ctx, err, msg, ok, originalConfig, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$26.nil, err]; - } - _tuple$1 = $assertType(msg, ptrType$26, true); - clientHello = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(clientHello, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [ptrType$26.nil, _r$3]; - $s = 6; case 6: return $24r; - /* } */ case 3: - configForClient = ptrType$4.nil; - originalConfig = c.config; - /* */ if (!(c.config.GetConfigForClient === $throwNilPointerError)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(c.config.GetConfigForClient === $throwNilPointerError)) { */ case 7: - chi = clientHelloInfo(ctx, c, clientHello); - _r$4 = c.config.GetConfigForClient(chi); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - configForClient = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 10; continue; } - /* */ if (!(configForClient === ptrType$4.nil)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 10: - _r$5 = c.sendAlert(80); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return [ptrType$26.nil, err]; - /* } else if (!(configForClient === ptrType$4.nil)) { */ case 11: - c.config = configForClient; - /* } */ case 12: - /* } */ case 8: - _r$6 = originalConfig.ticketKeys(configForClient); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - c.ticketKeys = _r$6; - clientVersions = clientHello.supportedVersions; - if (clientHello.supportedVersions.$length === 0) { - clientVersions = supportedVersionsFromMax(clientHello.vers); - } - _tuple$3 = c.config.mutualVersion(false, clientVersions); - c.vers = _tuple$3[0]; - ok = _tuple$3[1]; - /* */ if (!ok) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!ok) { */ case 15: - _r$7 = c.sendAlert(70); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = fmt.Errorf("tls: client offered only unsupported versions: %x", new sliceType$6([clientVersions])); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = [ptrType$26.nil, _r$8]; - $s = 19; case 19: return $24r$1; - /* } */ case 16: - c.haveVers = true; - c.in$27.version = c.vers; - c.out.version = c.vers; - $s = -1; return [clientHello, $ifaceNil]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.readClientHello, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, c, chi, clientHello, clientVersions, configForClient, ctx, err, msg, ok, originalConfig, $s};return $f; - }; - Conn.prototype.readClientHello = function(ctx) { return this.$val.readClientHello(ctx); }; - serverHandshakeState.ptr.prototype.processClientHello = function() { - var {$24r, $24r$1, _arg, _arg$1, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, c, compression, err, foundCompression, hs, maxVers, ok, ok$1, priv, priv$1, selectedProto, serverRandom, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - hs.hello = new serverHelloMsg.ptr(sliceType$5.nil, 0, sliceType$5.nil, sliceType$5.nil, 0, 0, false, false, false, sliceType$5.nil, "", sliceType$11.nil, 0, new keyShare.ptr(0, sliceType$5.nil), false, 0, sliceType$5.nil, sliceType$5.nil, 0); - hs.hello.vers = c.vers; - foundCompression = false; - _ref = hs.clientHello.compressionMethods; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - compression = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (compression === 0) { - foundCompression = true; - break; - } - _i++; - } - /* */ if (!foundCompression) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!foundCompression) { */ case 1: - _r$1 = c.sendAlert(40); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: client does not support uncompressed connections"); - /* } */ case 2: - hs.hello.random = $makeSlice(sliceType$5, 32); - serverRandom = hs.hello.random; - maxVers = c.config.maxSupportedVersion(false); - if (maxVers >= 771 && c.vers < maxVers || testingOnlyForceDowngradeCanary) { - if (c.vers === 771) { - $copyString($subslice(serverRandom, 24), "DOWNGRD\x01"); - } else { - $copyString($subslice(serverRandom, 24), "DOWNGRD\x00"); - } - serverRandom = $subslice(serverRandom, 0, 24); - } - _r$2 = io.ReadFull(c.config.rand(), serverRandom); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - _r$3 = c.sendAlert(80); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return err; - /* } */ case 6: - /* */ if (!((hs.clientHello.secureRenegotiation.$length === 0))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!((hs.clientHello.secureRenegotiation.$length === 0))) { */ case 8: - _r$4 = c.sendAlert(40); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return errors.New("tls: initial handshake had non-empty renegotiation extension"); - /* } */ case 9: - hs.hello.secureRenegotiationSupported = hs.clientHello.secureRenegotiationSupported; - hs.hello.compressionMethod = 0; - if (hs.clientHello.serverName.length > 0) { - c.serverName = hs.clientHello.serverName; - } - _r$5 = negotiateALPN(c.config.NextProtos, hs.clientHello.alpnProtocols); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - selectedProto = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 12: - _r$6 = c.sendAlert(120); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return err; - /* } */ case 13: - hs.hello.alpnProtocol = selectedProto; - c.clientProtocol = selectedProto; - _r$7 = c.config.getCertificate(clientHelloInfo(hs.ctx, c, hs.clientHello)); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - hs.cert = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 16: - /* */ if ($interfaceIsEqual(err, errNoCertificates)) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ($interfaceIsEqual(err, errNoCertificates)) { */ case 18: - _r$8 = c.sendAlert(112); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = 20; continue; - /* } else { */ case 19: - _r$9 = c.sendAlert(80); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* } */ case 20: - $s = -1; return err; - /* } */ case 17: - if (hs.clientHello.scts) { - hs.hello.scts = hs.cert.SignedCertificateTimestamps; - } - hs.ecdheOk = supportsECDHE(c.config, hs.clientHello.supportedCurves, hs.clientHello.supportedPoints); - if (hs.ecdheOk && hs.clientHello.supportedPoints.$length > 0) { - hs.hello.supportedPoints = new sliceType$5([0]); - } - _tuple$3 = $assertType(hs.cert.PrivateKey, crypto.Signer, true); - priv = _tuple$3[0]; - ok = _tuple$3[1]; - /* */ if (ok) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (ok) { */ case 23: - _r$10 = priv.Public(); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _ref$1 = _r$10; - /* */ if ($assertType(_ref$1, ptrType$12, true)[1]) { $s = 26; continue; } - /* */ if ($assertType(_ref$1, ed25519.PublicKey, true)[1]) { $s = 27; continue; } - /* */ if ($assertType(_ref$1, ptrType$11, true)[1]) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if ($assertType(_ref$1, ptrType$12, true)[1]) { */ case 26: - hs.ecSignOk = true; - $s = 30; continue; - /* } else if ($assertType(_ref$1, ed25519.PublicKey, true)[1]) { */ case 27: - hs.ecSignOk = true; - $s = 30; continue; - /* } else if ($assertType(_ref$1, ptrType$11, true)[1]) { */ case 28: - hs.rsaSignOk = true; - $s = 30; continue; - /* } else { */ case 29: - _r$11 = c.sendAlert(80); /* */ $s = 31; case 31: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = priv.Public(); /* */ $s = 32; case 32: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg = _r$12; - _r$13 = fmt.Errorf("tls: unsupported signing key type (%T)", new sliceType$6([_arg])); /* */ $s = 33; case 33: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r = _r$13; - $s = 34; case 34: return $24r; - /* } */ case 30: - /* } */ case 24: - _tuple$4 = $assertType(hs.cert.PrivateKey, crypto.Decrypter, true); - priv$1 = _tuple$4[0]; - ok$1 = _tuple$4[1]; - /* */ if (ok$1) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (ok$1) { */ case 35: - _r$14 = priv$1.Public(); /* */ $s = 37; case 37: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _ref$2 = _r$14; - /* */ if ($assertType(_ref$2, ptrType$11, true)[1]) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if ($assertType(_ref$2, ptrType$11, true)[1]) { */ case 38: - hs.rsaDecryptOk = true; - $s = 40; continue; - /* } else { */ case 39: - _r$15 = c.sendAlert(80); /* */ $s = 41; case 41: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - _r$16 = priv$1.Public(); /* */ $s = 42; case 42: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg$1 = _r$16; - _r$17 = fmt.Errorf("tls: unsupported decryption key type (%T)", new sliceType$6([_arg$1])); /* */ $s = 43; case 43: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - $24r$1 = _r$17; - $s = 44; case 44: return $24r$1; - /* } */ case 40: - /* } */ case 36: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.processClientHello, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, c, compression, err, foundCompression, hs, maxVers, ok, ok$1, priv, priv$1, selectedProto, serverRandom, $s};return $f; - }; - serverHandshakeState.prototype.processClientHello = function() { return this.$val.processClientHello(); }; - negotiateALPN = function(serverProtos, clientProtos) { - var {$24r, _i, _i$1, _r$1, _ref, _ref$1, c, clientProtos, http11fallback, s, serverProtos, $s, $r, $c} = $restore(this, {serverProtos, clientProtos}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ((serverProtos.$length === 0) || (clientProtos.$length === 0)) { - $s = -1; return ["", $ifaceNil]; - } - http11fallback = false; - _ref = serverProtos; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = clientProtos; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - c = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (s === c) { - $s = -1; return [s, $ifaceNil]; - } - if (s === "h2" && c === "http/1.1") { - http11fallback = true; - } - _i$1++; - } - _i++; - } - if (http11fallback) { - $s = -1; return ["", $ifaceNil]; - } - _r$1 = fmt.Errorf("tls: client requested unsupported application protocols (%s)", new sliceType$6([clientProtos])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = ["", _r$1]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: negotiateALPN, $c: true, $r, $24r, _i, _i$1, _r$1, _ref, _ref$1, c, clientProtos, http11fallback, s, serverProtos, $s};return $f; - }; - supportsECDHE = function(c, supportedCurves, supportedPoints) { - var _i, _i$1, _ref, _ref$1, c, curve, pointFormat, supportedCurves, supportedPoints, supportsCurve, supportsPointFormat; - supportsCurve = false; - _ref = supportedCurves; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - curve = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (c.supportsCurve(curve)) { - supportsCurve = true; - break; - } - _i++; - } - supportsPointFormat = false; - _ref$1 = supportedPoints; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - pointFormat = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (pointFormat === 0) { - supportsPointFormat = true; - break; - } - _i$1++; - } - if (supportedPoints.$length === 0) { - supportsPointFormat = true; - } - return supportsCurve && supportsPointFormat; - }; - serverHandshakeState.ptr.prototype.pickCipherSuite = function() { - var {_i, _i$1, _i$2, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$2, c, configCipherSuites, hs, id, id$1, preferenceList, preferenceOrder, suiteID, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - preferenceOrder = cipherSuitesPreferenceOrder; - if (!hasAESGCMHardwareSupport || !aesgcmPreferred(hs.clientHello.cipherSuites)) { - preferenceOrder = cipherSuitesPreferenceOrderNoAES; - } - configCipherSuites = c.config.cipherSuites(); - preferenceList = $makeSlice(sliceType$2, 0, configCipherSuites.$length); - _ref = preferenceOrder; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - suiteID = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = configCipherSuites; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - id = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (id === suiteID) { - preferenceList = $append(preferenceList, id); - break; - } - _i$1++; - } - _i++; - } - _r$1 = selectCipherSuite(preferenceList, hs.clientHello.cipherSuites, $methodVal(hs, "cipherSuiteOk")); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - hs.suite = _r$1; - /* */ if (hs.suite === ptrType$3.nil) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (hs.suite === ptrType$3.nil) { */ case 2: - _r$2 = c.sendAlert(40); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return errors.New("tls: no cipher suite supported by both client and server"); - /* } */ case 3: - c.cipherSuite = hs.suite.id; - _ref$2 = hs.clientHello.cipherSuites; - _i$2 = 0; - /* while (true) { */ case 5: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 6; continue; } - id$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - /* */ if (id$1 === 22016) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (id$1 === 22016) { */ case 7: - /* */ if (hs.clientHello.vers < c.config.maxSupportedVersion(false)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (hs.clientHello.vers < c.config.maxSupportedVersion(false)) { */ case 9: - _r$3 = c.sendAlert(86); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return errors.New("tls: client using inappropriate protocol fallback"); - /* } */ case 10: - /* break; */ $s = 6; continue; - /* } */ case 8: - _i$2++; - $s = 5; continue; - case 6: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.pickCipherSuite, $c: true, $r, _i, _i$1, _i$2, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$2, c, configCipherSuites, hs, id, id$1, preferenceList, preferenceOrder, suiteID, $s};return $f; - }; - serverHandshakeState.prototype.pickCipherSuite = function() { return this.$val.pickCipherSuite(); }; - serverHandshakeState.ptr.prototype.cipherSuiteOk = function(c) { - var c, hs; - hs = this; - if (!(((c.flags & 1) === 0))) { - if (!hs.ecdheOk) { - return false; - } - if (!(((c.flags & 2) === 0))) { - if (!hs.ecSignOk) { - return false; - } - } else if (!hs.rsaSignOk) { - return false; - } - } else if (!hs.rsaDecryptOk) { - return false; - } - if (hs.c.vers < 771 && !(((c.flags & 4) === 0))) { - return false; - } - return true; - }; - serverHandshakeState.prototype.cipherSuiteOk = function(c) { return this.$val.cipherSuiteOk(c); }; - serverHandshakeState.ptr.prototype.checkForResumption = function() { - var {_i, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, c, cipherSuiteOk, createdAt, hs, id, needClientCerts, ok, plaintext, sessionHasClientCerts, usedOldKey, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - if (c.config.SessionTicketsDisabled) { - $s = -1; return false; - } - _r$1 = c.decryptTicket(hs.clientHello.sessionTicket); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - plaintext = _tuple[0]; - usedOldKey = _tuple[1]; - if (plaintext === sliceType$5.nil) { - $s = -1; return false; - } - hs.sessionState = new sessionState.ptr(0, 0, new $Uint64(0, 0), sliceType$5.nil, sliceType$11.nil, usedOldKey); - ok = hs.sessionState.unmarshal(plaintext); - if (!ok) { - $s = -1; return false; - } - createdAt = $clone(time.Unix(((x = hs.sessionState.createdAt, new $Int64(x.$high, x.$low))), new $Int64(0, 0)), time.Time); - _r$2 = c.config.time(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, time.Time).Sub($clone(createdAt, time.Time)); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if ((x$1 = _r$3, (x$1.$high > 140815 || (x$1.$high === 140815 && x$1.$low > 4180213760)))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((x$1 = _r$3, (x$1.$high > 140815 || (x$1.$high === 140815 && x$1.$low > 4180213760)))) { */ case 2: - $s = -1; return false; - /* } */ case 3: - if (!((c.vers === hs.sessionState.vers))) { - $s = -1; return false; - } - cipherSuiteOk = false; - _ref = hs.clientHello.cipherSuites; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (id === hs.sessionState.cipherSuite) { - cipherSuiteOk = true; - break; - } - _i++; - } - if (!cipherSuiteOk) { - $s = -1; return false; - } - _r$4 = selectCipherSuite(new sliceType$2([hs.sessionState.cipherSuite]), c.config.cipherSuites(), $methodVal(hs, "cipherSuiteOk")); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - hs.suite = _r$4; - if (hs.suite === ptrType$3.nil) { - $s = -1; return false; - } - sessionHasClientCerts = !((hs.sessionState.certificates.$length === 0)); - needClientCerts = requiresClientCert(c.config.ClientAuth); - if (needClientCerts && !sessionHasClientCerts) { - $s = -1; return false; - } - if (sessionHasClientCerts && (c.config.ClientAuth === 0)) { - $s = -1; return false; - } - $s = -1; return true; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.checkForResumption, $c: true, $r, _i, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, c, cipherSuiteOk, createdAt, hs, id, needClientCerts, ok, plaintext, sessionHasClientCerts, usedOldKey, x, x$1, $s};return $f; - }; - serverHandshakeState.prototype.checkForResumption = function() { return this.$val.checkForResumption(); }; - serverHandshakeState.ptr.prototype.doResumeHandshake = function() { - var {_arg, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$2, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - hs.hello.cipherSuite = hs.suite.id; - c.cipherSuite = hs.suite.id; - hs.hello.sessionId = hs.clientHello.sessionId; - hs.hello.ticketSupported = hs.sessionState.usedOldKey; - _r$1 = newFinishedHash(c.vers, hs.suite); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - finishedHash.copy(hs.finishedHash, _r$1); - hs.finishedHash.discardHandshakeBuffer(); - _r$2 = hs.clientHello.marshal(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = hs.finishedHash.Write(_r$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = hs.hello.marshal(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = hs.finishedHash.Write(_r$4); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = hs.hello.marshal(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = _r$6; - _r$7 = c.writeRecord(22, _arg); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$8 = c.processCertsFromClient(new Certificate.ptr(hs.sessionState.certificates, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil)); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$1 = _r$8; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 9: - _r$9 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$2 = _r$9; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 12: - _r$10 = c.sendAlert(42); /* */ $s = 14; case 14: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return err$2; - /* } */ case 13: - /* } */ case 10: - hs.masterSecret = hs.sessionState.masterSecret; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.doResumeHandshake, $c: true, $r, _arg, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$2, hs, $s};return $f; - }; - serverHandshakeState.prototype.doResumeHandshake = function() { return this.$val.doResumeHandshake(); }; - serverHandshakeState.ptr.prototype.doFullHandshake = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _arg$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$54, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, c, certMsg, certMsg$1, certReq, certStatus, certVerify, ckx, err, err$1, err$10, err$11, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, helloDone, hs, keyAgreement$1, msg, ok, ok$1, ok$2, preMasterSecret, pub, sigHash, sigType, signed, skx, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - if (hs.clientHello.ocspStapling && hs.cert.OCSPStaple.$length > 0) { - hs.hello.ocspStapling = true; - } - hs.hello.ticketSupported = hs.clientHello.ticketSupported && !c.config.SessionTicketsDisabled; - hs.hello.cipherSuite = hs.suite.id; - _r$1 = newFinishedHash(hs.c.vers, hs.suite); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - finishedHash.copy(hs.finishedHash, _r$1); - if (c.config.ClientAuth === 0) { - hs.finishedHash.discardHandshakeBuffer(); - } - _r$2 = hs.clientHello.marshal(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = hs.finishedHash.Write(_r$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = hs.hello.marshal(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = hs.finishedHash.Write(_r$4); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = hs.hello.marshal(); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg = _r$6; - _r$7 = c.writeRecord(22, _arg); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple = _r$7; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - certMsg = new certificateMsg.ptr(sliceType$5.nil, sliceType$11.nil); - certMsg.certificates = hs.cert.Certificate; - _r$8 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 8; case 8: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = c.writeRecord(22, certMsg.marshal()); /* */ $s = 9; case 9: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$1 = _r$9; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* */ if (hs.hello.ocspStapling) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (hs.hello.ocspStapling) { */ case 10: - certStatus = new certificateStatusMsg.ptr(sliceType$5.nil, sliceType$5.nil); - certStatus.response = hs.cert.OCSPStaple; - _r$10 = certStatus.marshal(); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = hs.finishedHash.Write(_r$10); /* */ $s = 13; case 13: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = certStatus.marshal(); /* */ $s = 14; case 14: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$1 = _r$12; - _r$13 = c.writeRecord(22, _arg$1); /* */ $s = 15; case 15: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$2 = _r$13; - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* } */ case 11: - _r$14 = hs.suite.ka(c.vers); /* */ $s = 16; case 16: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - keyAgreement$1 = _r$14; - _r$15 = keyAgreement$1.generateServerKeyExchange(c.config, hs.cert, hs.clientHello, hs.hello); /* */ $s = 17; case 17: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _tuple$3 = _r$15; - skx = _tuple$3[0]; - err$3 = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 18: - _r$16 = c.sendAlert(40); /* */ $s = 20; case 20: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - $s = -1; return err$3; - /* } */ case 19: - /* */ if (!(skx === ptrType$22.nil)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!(skx === ptrType$22.nil)) { */ case 21: - _r$17 = hs.finishedHash.Write(skx.marshal()); /* */ $s = 23; case 23: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - _r$18 = c.writeRecord(22, skx.marshal()); /* */ $s = 24; case 24: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _tuple$4 = _r$18; - err$4 = _tuple$4[1]; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - /* } */ case 22: - certReq = ptrType$33.nil; - /* */ if (c.config.ClientAuth >= 1) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (c.config.ClientAuth >= 1) { */ case 25: - certReq = new certificateRequestMsg.ptr(sliceType$5.nil, false, sliceType$5.nil, sliceType$7.nil, sliceType$11.nil); - certReq.certificateTypes = new sliceType$5([1, 64]); - if (c.vers >= 771) { - certReq.hasSignatureAlgorithm = true; - certReq.supportedSignatureAlgorithms = supportedSignatureAlgorithms; - } - if (!(c.config.ClientCAs === ptrType.nil)) { - certReq.certificateAuthorities = c.config.ClientCAs.Subjects(); - } - _r$19 = hs.finishedHash.Write(certReq.marshal()); /* */ $s = 27; case 27: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - _r$20 = c.writeRecord(22, certReq.marshal()); /* */ $s = 28; case 28: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _tuple$5 = _r$20; - err$5 = _tuple$5[1]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - /* } */ case 26: - helloDone = new serverHelloDoneMsg.ptr(); - _r$21 = hs.finishedHash.Write(helloDone.marshal()); /* */ $s = 29; case 29: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - _r$22 = c.writeRecord(22, helloDone.marshal()); /* */ $s = 30; case 30: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple$6 = _r$22; - err$6 = _tuple$6[1]; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - _r$23 = c.flush(); /* */ $s = 31; case 31: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _tuple$7 = _r$23; - err$7 = _tuple$7[1]; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - pub = $ifaceNil; - _r$24 = c.readHandshake(); /* */ $s = 32; case 32: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _tuple$8 = _r$24; - msg = _tuple$8[0]; - err$3 = _tuple$8[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - /* */ if (c.config.ClientAuth >= 1) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (c.config.ClientAuth >= 1) { */ case 33: - _tuple$9 = $assertType(msg, ptrType$34, true); - certMsg$1 = _tuple$9[0]; - ok = _tuple$9[1]; - /* */ if (!ok) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!ok) { */ case 35: - _r$25 = c.sendAlert(10); /* */ $s = 37; case 37: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - _r$26 = unexpectedMessageError(certMsg$1, msg); /* */ $s = 38; case 38: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - $24r = _r$26; - $s = 39; case 39: return $24r; - /* } */ case 36: - _r$27 = hs.finishedHash.Write(certMsg$1.marshal()); /* */ $s = 40; case 40: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$27; - _r$28 = c.processCertsFromClient(new Certificate.ptr(certMsg$1.certificates, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil)); /* */ $s = 41; case 41: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - err$8 = _r$28; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - if (!((certMsg$1.certificates.$length === 0))) { - pub = (x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).PublicKey; - } - _r$29 = c.readHandshake(); /* */ $s = 42; case 42: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _tuple$10 = _r$29; - msg = _tuple$10[0]; - err$3 = _tuple$10[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - /* } */ case 34: - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 43; continue; } - /* */ $s = 44; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 43: - _r$30 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 45; case 45: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - err$9 = _r$30; - /* */ if (!($interfaceIsEqual(err$9, $ifaceNil))) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (!($interfaceIsEqual(err$9, $ifaceNil))) { */ case 46: - _r$31 = c.sendAlert(42); /* */ $s = 48; case 48: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$31; - $s = -1; return err$9; - /* } */ case 47: - /* } */ case 44: - _tuple$11 = $assertType(msg, ptrType$23, true); - ckx = _tuple$11[0]; - ok$1 = _tuple$11[1]; - /* */ if (!ok$1) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (!ok$1) { */ case 49: - _r$32 = c.sendAlert(10); /* */ $s = 51; case 51: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _r$32; - _r$33 = unexpectedMessageError(ckx, msg); /* */ $s = 52; case 52: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - $24r$1 = _r$33; - $s = 53; case 53: return $24r$1; - /* } */ case 50: - _r$34 = hs.finishedHash.Write(ckx.marshal()); /* */ $s = 54; case 54: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _r$34; - _r$35 = keyAgreement$1.processClientKeyExchange(c.config, hs.cert, ckx, c.vers); /* */ $s = 55; case 55: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _tuple$12 = _r$35; - preMasterSecret = _tuple$12[0]; - err$3 = _tuple$12[1]; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 56: - _r$36 = c.sendAlert(40); /* */ $s = 58; case 58: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _r$36; - $s = -1; return err$3; - /* } */ case 57: - _r$37 = masterFromPreMasterSecret(c.vers, hs.suite, preMasterSecret, hs.clientHello.random, hs.hello.random); /* */ $s = 59; case 59: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - hs.masterSecret = _r$37; - _r$38 = c.config.writeKeyLog("CLIENT_RANDOM", hs.clientHello.random, hs.masterSecret); /* */ $s = 60; case 60: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - err$10 = _r$38; - /* */ if (!($interfaceIsEqual(err$10, $ifaceNil))) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (!($interfaceIsEqual(err$10, $ifaceNil))) { */ case 61: - _r$39 = c.sendAlert(80); /* */ $s = 63; case 63: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$39; - $s = -1; return err$10; - /* } */ case 62: - /* */ if (c.peerCertificates.$length > 0) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (c.peerCertificates.$length > 0) { */ case 64: - _r$40 = c.readHandshake(); /* */ $s = 66; case 66: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - _tuple$13 = _r$40; - msg = _tuple$13[0]; - err$3 = _tuple$13[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _tuple$14 = $assertType(msg, ptrType$28, true); - certVerify = _tuple$14[0]; - ok$2 = _tuple$14[1]; - /* */ if (!ok$2) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if (!ok$2) { */ case 67: - _r$41 = c.sendAlert(10); /* */ $s = 69; case 69: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - _r$41; - _r$42 = unexpectedMessageError(certVerify, msg); /* */ $s = 70; case 70: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - $24r$2 = _r$42; - $s = 71; case 71: return $24r$2; - /* } */ case 68: - sigType = 0; - sigHash = 0; - /* */ if (c.vers >= 771) { $s = 72; continue; } - /* */ $s = 73; continue; - /* if (c.vers >= 771) { */ case 72: - /* */ if (!isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, certReq.supportedSignatureAlgorithms)) { $s = 75; continue; } - /* */ $s = 76; continue; - /* if (!isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, certReq.supportedSignatureAlgorithms)) { */ case 75: - _r$43 = c.sendAlert(47); /* */ $s = 77; case 77: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - _r$43; - $s = -1; return errors.New("tls: client certificate used with invalid signature algorithm"); - /* } */ case 76: - _r$44 = typeAndHashFromSignatureScheme(certVerify.signatureAlgorithm); /* */ $s = 78; case 78: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - _tuple$15 = _r$44; - sigType = _tuple$15[0]; - sigHash = _tuple$15[1]; - err$3 = _tuple$15[2]; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 79; continue; } - /* */ $s = 80; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 79: - _r$45 = c.sendAlert(80); /* */ $s = 81; case 81: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - $24r$3 = _r$45; - $s = 82; case 82: return $24r$3; - /* } */ case 80: - $s = 74; continue; - /* } else { */ case 73: - _r$46 = legacyTypeAndHashFromPublicKey(pub); /* */ $s = 83; case 83: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } - _tuple$16 = _r$46; - sigType = _tuple$16[0]; - sigHash = _tuple$16[1]; - err$3 = _tuple$16[2]; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 84; continue; } - /* */ $s = 85; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 84: - _r$47 = c.sendAlert(47); /* */ $s = 86; case 86: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } - _r$47; - $s = -1; return err$3; - /* } */ case 85: - /* } */ case 74: - _r$48 = $clone(hs.finishedHash, finishedHash).hashForClientCertificate(sigType, sigHash, hs.masterSecret); /* */ $s = 87; case 87: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } - signed = _r$48; - _r$49 = verifyHandshakeSignature(sigType, pub, sigHash, signed, certVerify.signature); /* */ $s = 88; case 88: if($c) { $c = false; _r$49 = _r$49.$blk(); } if (_r$49 && _r$49.$blk !== undefined) { break s; } - err$11 = _r$49; - /* */ if (!($interfaceIsEqual(err$11, $ifaceNil))) { $s = 89; continue; } - /* */ $s = 90; continue; - /* if (!($interfaceIsEqual(err$11, $ifaceNil))) { */ case 89: - _r$50 = c.sendAlert(51); /* */ $s = 91; case 91: if($c) { $c = false; _r$50 = _r$50.$blk(); } if (_r$50 && _r$50.$blk !== undefined) { break s; } - _r$50; - _r$51 = err$11.Error(); /* */ $s = 92; case 92: if($c) { $c = false; _r$51 = _r$51.$blk(); } if (_r$51 && _r$51.$blk !== undefined) { break s; } - _r$52 = errors.New("tls: invalid signature by the client certificate: " + _r$51); /* */ $s = 93; case 93: if($c) { $c = false; _r$52 = _r$52.$blk(); } if (_r$52 && _r$52.$blk !== undefined) { break s; } - $24r$4 = _r$52; - $s = 94; case 94: return $24r$4; - /* } */ case 90: - _r$53 = certVerify.marshal(); /* */ $s = 95; case 95: if($c) { $c = false; _r$53 = _r$53.$blk(); } if (_r$53 && _r$53.$blk !== undefined) { break s; } - _r$54 = hs.finishedHash.Write(_r$53); /* */ $s = 96; case 96: if($c) { $c = false; _r$54 = _r$54.$blk(); } if (_r$54 && _r$54.$blk !== undefined) { break s; } - _r$54; - /* } */ case 65: - hs.finishedHash.discardHandshakeBuffer(); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.doFullHandshake, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _arg$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$52, _r$53, _r$54, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, c, certMsg, certMsg$1, certReq, certStatus, certVerify, ckx, err, err$1, err$10, err$11, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, helloDone, hs, keyAgreement$1, msg, ok, ok$1, ok$2, preMasterSecret, pub, sigHash, sigType, signed, skx, x, $s};return $f; - }; - serverHandshakeState.prototype.doFullHandshake = function() { return this.$val.doFullHandshake(); }; - serverHandshakeState.ptr.prototype.establishKeys = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, clientCipher, clientHash, clientIV, clientKey, clientMAC, hs, serverCipher, serverHash, serverIV, serverKey, serverMAC, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = keysFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.clientHello.random, hs.hello.random, hs.suite.macLen, hs.suite.keyLen, hs.suite.ivLen); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - clientMAC = _tuple[0]; - serverMAC = _tuple[1]; - clientKey = _tuple[2]; - serverKey = _tuple[3]; - clientIV = _tuple[4]; - serverIV = _tuple[5]; - _tmp = $ifaceNil; - _tmp$1 = $ifaceNil; - clientCipher = _tmp; - serverCipher = _tmp$1; - _tmp$2 = $ifaceNil; - _tmp$3 = $ifaceNil; - clientHash = _tmp$2; - serverHash = _tmp$3; - /* */ if (hs.suite.aead === $throwNilPointerError) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (hs.suite.aead === $throwNilPointerError) { */ case 2: - _r$2 = hs.suite.cipher(clientKey, clientIV, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - clientCipher = _r$2; - _r$3 = hs.suite.mac(clientMAC); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - clientHash = _r$3; - _r$4 = hs.suite.cipher(serverKey, serverIV, false); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - serverCipher = _r$4; - _r$5 = hs.suite.mac(serverMAC); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - serverHash = _r$5; - $s = 4; continue; - /* } else { */ case 3: - _r$6 = hs.suite.aead(clientKey, clientIV); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - clientCipher = _r$6; - _r$7 = hs.suite.aead(serverKey, serverIV); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - serverCipher = _r$7; - /* } */ case 4: - c.in$27.prepareCipherSpec(c.vers, clientCipher, clientHash); - c.out.prepareCipherSpec(c.vers, serverCipher, serverHash); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.establishKeys, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, clientCipher, clientHash, clientIV, clientKey, clientMAC, hs, serverCipher, serverHash, serverIV, serverKey, serverMAC, $s};return $f; - }; - serverHandshakeState.prototype.establishKeys = function() { return this.$val.establishKeys(); }; - serverHandshakeState.ptr.prototype.readFinished = function(out) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, c, clientFinished, err, err$1, hs, msg, ok, out, verify, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.readChangeCipherSpec(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = c.readHandshake(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - msg = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _tuple$1 = $assertType(msg, ptrType$29, true); - clientFinished = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!ok) { */ case 3: - _r$3 = c.sendAlert(10); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = unexpectedMessageError(clientFinished, msg); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 7; case 7: return $24r; - /* } */ case 4: - _r$5 = $clone(hs.finishedHash, finishedHash).clientSum(hs.masterSecret); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - verify = _r$5; - /* */ if (!((verify.$length === clientFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, clientFinished.verifyData) === 1))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!((verify.$length === clientFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, clientFinished.verifyData) === 1))) { */ case 9: - _r$6 = c.sendAlert(40); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: client's Finished message is incorrect"); - /* } */ case 10: - _r$7 = clientFinished.marshal(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = hs.finishedHash.Write(_r$7); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $copySlice(out, verify); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.readFinished, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, c, clientFinished, err, err$1, hs, msg, ok, out, verify, $s};return $f; - }; - serverHandshakeState.prototype.readFinished = function(out) { return this.$val.readFinished(out); }; - serverHandshakeState.ptr.prototype.sendSessionTicket = function() { - var {_i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, _tuple$1, c, cert, certsFromClient, createdAt, err, err$1, hs, m, state, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - if (!hs.hello.ticketSupported) { - $s = -1; return $ifaceNil; - } - c = hs.c; - m = new newSessionTicketMsg.ptr(sliceType$5.nil, sliceType$5.nil); - _r$1 = c.config.time(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Unix(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - createdAt = ((x = _r$2, new $Uint64(x.$high, x.$low))); - if (!(hs.sessionState === ptrType$32.nil)) { - createdAt = hs.sessionState.createdAt; - } - certsFromClient = sliceType$11.nil; - _ref = c.peerCertificates; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cert = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - certsFromClient = $append(certsFromClient, cert.Raw); - _i++; - } - state = new sessionState.ptr(c.vers, hs.suite.id, createdAt, hs.masterSecret, certsFromClient, false); - err = $ifaceNil; - _r$3 = state.marshal(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = c.encryptTicket(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - m.ticket = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$5 = hs.finishedHash.Write(m.marshal()); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = c.writeRecord(22, m.marshal()); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.sendSessionTicket, $c: true, $r, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, _tuple$1, c, cert, certsFromClient, createdAt, err, err$1, hs, m, state, x, $s};return $f; - }; - serverHandshakeState.prototype.sendSessionTicket = function() { return this.$val.sendSessionTicket(); }; - serverHandshakeState.ptr.prototype.sendFinished = function(out) { - var {_arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, err, err$1, finished, hs, out, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.writeRecord(20, new sliceType$5([1])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - finished = new finishedMsg.ptr(sliceType$5.nil, sliceType$5.nil); - _r$2 = $clone(hs.finishedHash, finishedHash).serverSum(hs.masterSecret); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - finished.verifyData = _r$2; - _r$3 = finished.marshal(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = hs.finishedHash.Write(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = finished.marshal(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg = _r$5; - _r$6 = c.writeRecord(22, _arg); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $copySlice(out, finished.verifyData); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: serverHandshakeState.ptr.prototype.sendFinished, $c: true, $r, _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, err, err$1, finished, hs, out, $s};return $f; - }; - serverHandshakeState.prototype.sendFinished = function(out) { return this.$val.sendFinished(out); }; - Conn.ptr.prototype.processCertsFromClient = function(certificate) { - var {$24r, $24r$1, $24r$2, _i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, asn1Data, c, cert, certificate, certificates, certs, chains, err, err$1, err$2, i, opts, $s, $r, $c} = $restore(this, {certificate}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - certificates = certificate.Certificate; - certs = $makeSlice(sliceType$12, certificates.$length); - err = $ifaceNil; - _ref = certificates; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - asn1Data = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = x509.ParseCertificate(asn1Data); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ((i < 0 || i >= certs.$length) ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + i] = _tuple[0]); - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - _r$2 = c.sendAlert(42); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = errors.New("tls: failed to parse client certificate: " + _r$3); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 9; case 9: return $24r; - /* } */ case 5: - _i++; - $s = 1; continue; - case 2: - /* */ if ((certs.$length === 0) && requiresClientCert(c.config.ClientAuth)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ((certs.$length === 0) && requiresClientCert(c.config.ClientAuth)) { */ case 10: - _r$5 = c.sendAlert(42); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return errors.New("tls: client didn't provide a certificate"); - /* } */ case 11: - /* */ if (c.config.ClientAuth >= 3 && certs.$length > 0) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (c.config.ClientAuth >= 3 && certs.$length > 0) { */ case 13: - _r$6 = c.config.time(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - opts = new x509.VerifyOptions.ptr("", x509.NewCertPool(), c.config.ClientCAs, $clone(_r$6, time.Time), new sliceType$14([2]), 0); - _ref$1 = $subslice(certs, 1); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - cert = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - opts.Intermediates.AddCert(cert); - _i$1++; - } - _r$7 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).Verify($clone(opts, x509.VerifyOptions)); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - chains = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 17: - _r$8 = c.sendAlert(42); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = err$1.Error(); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = errors.New("tls: failed to verify client certificate: " + _r$9); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$1 = _r$10; - $s = 22; case 22: return $24r$1; - /* } */ case 18: - c.verifiedChains = chains; - /* } */ case 14: - c.peerCertificates = certs; - c.ocspResponse = certificate.OCSPStaple; - c.scts = certificate.SignedCertificateTimestamps; - /* */ if (certs.$length > 0) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (certs.$length > 0) { */ case 23: - _ref$2 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey; - /* */ if ($assertType(_ref$2, ptrType$12, true)[1] || $assertType(_ref$2, ptrType$11, true)[1] || $assertType(_ref$2, ed25519.PublicKey, true)[1]) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if ($assertType(_ref$2, ptrType$12, true)[1] || $assertType(_ref$2, ptrType$11, true)[1] || $assertType(_ref$2, ed25519.PublicKey, true)[1]) { */ case 25: - $s = 27; continue; - /* } else { */ case 26: - _r$11 = c.sendAlert(43); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = fmt.Errorf("tls: client certificate contains an unsupported public key of type %T", new sliceType$6([(0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey])); /* */ $s = 29; case 29: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$2 = _r$12; - $s = 30; case 30: return $24r$2; - /* } */ case 27: - /* } */ case 24: - /* */ if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { */ case 31: - _r$13 = c.config.VerifyPeerCertificate(certificates, c.verifiedChains); /* */ $s = 33; case 33: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$2 = _r$13; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 34: - _r$14 = c.sendAlert(42); /* */ $s = 36; case 36: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $s = -1; return err$2; - /* } */ case 35: - /* } */ case 32: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.processCertsFromClient, $c: true, $r, $24r, $24r$1, $24r$2, _i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, asn1Data, c, cert, certificate, certificates, certs, chains, err, err$1, err$2, i, opts, $s};return $f; - }; - Conn.prototype.processCertsFromClient = function(certificate) { return this.$val.processCertsFromClient(certificate); }; - clientHelloInfo = function(ctx, c, clientHello) { - var c, clientHello, ctx, supportedVersions$1; - supportedVersions$1 = clientHello.supportedVersions; - if (clientHello.supportedVersions.$length === 0) { - supportedVersions$1 = supportedVersionsFromMax(clientHello.vers); - } - return new ClientHelloInfo.ptr(clientHello.cipherSuites, clientHello.serverName, clientHello.supportedCurves, clientHello.supportedPoints, clientHello.supportedSignatureAlgorithms, clientHello.alpnProtocols, supportedVersions$1, c.conn, c.config, ctx); - }; - marshalingFunction.prototype.Marshal = function(b) { - var {$24r, _r$1, b, f, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r$1 = f(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: marshalingFunction.prototype.Marshal, $c: true, $r, $24r, _r$1, b, f, $s};return $f; - }; - $ptrType(marshalingFunction).prototype.Marshal = function(b) { return new marshalingFunction(this.$get()).Marshal(b); }; - addBytesWithLength = function(b, v, n) { - var {b, n, v, $s, $r, $c} = $restore(this, {b, v, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = [n]; - v = [v]; - $r = b.AddValue(new marshalingFunction(((function(n, v) { return function $b(b$1) { - var {$24r, _r$1, b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((v[0].$length === n[0]))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((v[0].$length === n[0]))) { */ case 1: - _r$1 = fmt.Errorf("invalid value length: expected %d, got %d", new sliceType$6([new $Int(n[0]), new $Int(v[0].$length)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - b$1.AddBytes(v[0]); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, b$1, $s};return $f; - }; })(n, v)))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: addBytesWithLength, $c: true, $r, b, n, v, $s};return $f; - }; - addUint64 = function(b, v) { - var b, v; - b.AddUint32((($shiftRightUint64(v, 32).$low >>> 0))); - b.AddUint32(((v.$low >>> 0))); - }; - readUint64 = function(s, out) { - var _tmp, _tmp$1, hi, hi$24ptr, lo, lo$24ptr, out, s, x, x$1; - _tmp = 0; - _tmp$1 = 0; - hi = _tmp; - lo = _tmp$1; - if (!s.ReadUint32((hi$24ptr || (hi$24ptr = new ptrType$24(function() { return hi; }, function($v) { hi = $v; })))) || !s.ReadUint32((lo$24ptr || (lo$24ptr = new ptrType$24(function() { return lo; }, function($v) { lo = $v; }))))) { - return false; - } - out.$set((x = $shiftLeft64((new $Uint64(0, hi)), 32), x$1 = (new $Uint64(0, lo)), new $Uint64(x.$high | x$1.$high, (x.$low | x$1.$low) >>> 0))); - return true; - }; - readUint8LengthPrefixed = function(s, out) { - var _ptr, out, s; - return s.ReadUint8LengthPrefixed(((_ptr = out, new ptrType$17(function() { return $convertSliceType(_ptr.$get(), cryptobyte.String); }, function($v) { _ptr.$set($convertSliceType($v, sliceType$5)); }, _ptr.$target)))); - }; - readUint16LengthPrefixed = function(s, out) { - var _ptr, out, s; - return s.ReadUint16LengthPrefixed(((_ptr = out, new ptrType$17(function() { return $convertSliceType(_ptr.$get(), cryptobyte.String); }, function($v) { _ptr.$set($convertSliceType($v, sliceType$5)); }, _ptr.$target)))); - }; - readUint24LengthPrefixed = function(s, out) { - var _ptr, out, s; - return s.ReadUint24LengthPrefixed(((_ptr = out, new ptrType$17(function() { return $convertSliceType(_ptr.$get(), cryptobyte.String); }, function($v) { _ptr.$set($convertSliceType($v, sliceType$5)); }, _ptr.$target)))); - }; - clientHelloMsg.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(1); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, bWithoutExtensions, extensionsPresent, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - extensionsPresent = [extensionsPresent]; - b$1.AddUint16(m[0].vers); - $r = addBytesWithLength(b$1, m[0].random, 32); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].sessionId); - }; })(extensionsPresent, m)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$2) { - var _i, _ref, b$2, suite; - _ref = m[0].cipherSuites; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - suite = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$2.AddUint16(suite); - _i++; - } - }; })(extensionsPresent, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].compressionMethods); - }; })(extensionsPresent, m)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - extensionsPresent[0] = false; - bWithoutExtensions = $clone(b$1, cryptobyte.Builder); - $r = b$1.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$2) { - var {b$2, $s, $r, $c} = $restore(this, {b$2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (m[0].serverName.length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (m[0].serverName.length > 0) { */ case 1: - b$2.AddUint16(0); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {b$4, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$4.AddUint8(0); - $r = b$4.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$5) { - var b$5; - b$5.AddBytes((new sliceType$5($stringToBytes(m[0].serverName)))); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$4, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* */ if (m[0].ocspStapling) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (m[0].ocspStapling) { */ case 4: - b$2.AddUint16(5); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$3) { - var b$3; - b$3.AddUint8(1); - b$3.AddUint16(0); - b$3.AddUint16(0); - }; })(extensionsPresent, m)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - /* */ if (m[0].supportedCurves.$length > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (m[0].supportedCurves.$length > 0) { */ case 7: - b$2.AddUint16(10); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var _i, _ref, b$4, curve; - _ref = m[0].supportedCurves; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - curve = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$4.AddUint16(((curve << 16 >>> 16))); - _i++; - } - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - /* */ if (m[0].supportedPoints.$length > 0) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (m[0].supportedPoints.$length > 0) { */ case 10: - b$2.AddUint16(11); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].supportedPoints); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - /* */ if (m[0].ticketSupported) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (m[0].ticketSupported) { */ case 13: - b$2.AddUint16(35); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$3) { - var b$3; - b$3.AddBytes(m[0].sessionTicket); - }; })(extensionsPresent, m)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - /* */ if (m[0].supportedSignatureAlgorithms.$length > 0) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (m[0].supportedSignatureAlgorithms.$length > 0) { */ case 16: - b$2.AddUint16(13); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var _i, _ref, b$4, sigAlgo; - _ref = m[0].supportedSignatureAlgorithms; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - sigAlgo = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$4.AddUint16(((sigAlgo << 16 >>> 16))); - _i++; - } - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - /* */ if (m[0].supportedSignatureAlgorithmsCert.$length > 0) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (m[0].supportedSignatureAlgorithmsCert.$length > 0) { */ case 19: - b$2.AddUint16(50); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var _i, _ref, b$4, sigAlgo; - _ref = m[0].supportedSignatureAlgorithmsCert; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - sigAlgo = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$4.AddUint16(((sigAlgo << 16 >>> 16))); - _i++; - } - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 20: - /* */ if (m[0].secureRenegotiationSupported) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (m[0].secureRenegotiationSupported) { */ case 22: - b$2.AddUint16(65281); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].secureRenegotiation); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 23: - /* */ if (m[0].alpnProtocols.$length > 0) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (m[0].alpnProtocols.$length > 0) { */ case 25: - b$2.AddUint16(16); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {_i, _ref, b$4, proto, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - proto = [proto]; - _ref = m[0].alpnProtocols; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - proto[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = b$4.AddUint8LengthPrefixed((function(extensionsPresent, m, proto) { return function(b$5) { - var b$5; - b$5.AddBytes((new sliceType$5($stringToBytes(proto[0])))); - }; })(extensionsPresent, m, proto)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$4, proto, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 26: - if (m[0].scts) { - b$2.AddUint16(18); - b$2.AddUint16(0); - } - /* */ if (m[0].supportedVersions.$length > 0) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (m[0].supportedVersions.$length > 0) { */ case 28: - b$2.AddUint16(43); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var _i, _ref, b$4, vers; - _ref = m[0].supportedVersions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - vers = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$4.AddUint16(vers); - _i++; - } - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 29: - /* */ if (m[0].cookie.$length > 0) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (m[0].cookie.$length > 0) { */ case 31: - b$2.AddUint16(44); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].cookie); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 32: - /* */ if (m[0].keyShares.$length > 0) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (m[0].keyShares.$length > 0) { */ case 34: - b$2.AddUint16(51); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {_i, _ref, b$4, ks, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ks = [ks]; - _ref = m[0].keyShares; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - ks[0] = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), keyShare); - b$4.AddUint16(((ks[0].group << 16 >>> 16))); - $r = b$4.AddUint16LengthPrefixed((function(extensionsPresent, ks, m) { return function(b$5) { - var b$5; - b$5.AddBytes(ks[0].data); - }; })(extensionsPresent, ks, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$4, ks, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 35: - if (m[0].earlyData) { - b$2.AddUint16(42); - b$2.AddUint16(0); - } - /* */ if (m[0].pskModes.$length > 0) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (m[0].pskModes.$length > 0) { */ case 37: - b$2.AddUint16(45); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].pskModes); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 38: - /* */ if (m[0].pskIdentities.$length > 0) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (m[0].pskIdentities.$length > 0) { */ case 40: - b$2.AddUint16(41); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {_i, _ref, b$4, psk, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - psk = [psk]; - _ref = m[0].pskIdentities; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - psk[0] = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), pskIdentity); - $r = b$4.AddUint16LengthPrefixed((function(extensionsPresent, m, psk) { return function(b$5) { - var b$5; - b$5.AddBytes(psk[0].label); - }; })(extensionsPresent, m, psk)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$4.AddUint32(psk[0].obfuscatedTicketAge); - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$4, psk, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {_i, _ref, b$4, binder, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - binder = [binder]; - _ref = m[0].pskBinders; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - binder[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = b$4.AddUint8LengthPrefixed((function(binder, extensionsPresent, m) { return function(b$5) { - var b$5; - b$5.AddBytes(binder[0]); - }; })(binder, extensionsPresent, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$4, binder, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 41: - extensionsPresent[0] = b$2.BytesOrPanic().$length > 2; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$2, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!extensionsPresent[0]) { - cryptobyte.Builder.copy(b$1, bWithoutExtensions); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, bWithoutExtensions, extensionsPresent, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: clientHelloMsg.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - clientHelloMsg.prototype.marshal = function() { return this.$val.marshal(); }; - clientHelloMsg.ptr.prototype.marshalWithoutBinders = function() { - var {_i, _r$1, _ref, binder, bindersLen, fullMessage, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = this; - bindersLen = 2; - _ref = m.pskBinders; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - binder = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - bindersLen = bindersLen + (1) >> 0; - bindersLen = bindersLen + (binder.$length) >> 0; - _i++; - } - _r$1 = m.marshal(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - fullMessage = _r$1; - $s = -1; return $subslice(fullMessage, 0, (fullMessage.$length - bindersLen >> 0)); - /* */ } return; } var $f = {$blk: clientHelloMsg.ptr.prototype.marshalWithoutBinders, $c: true, $r, _i, _r$1, _ref, binder, bindersLen, fullMessage, m, $s};return $f; - }; - clientHelloMsg.prototype.marshalWithoutBinders = function() { return this.$val.marshalWithoutBinders(); }; - clientHelloMsg.ptr.prototype.updateBinders = function(pskBinders) { - var {_i, _r$1, _ref, _tuple, b, err, i, lenWithoutBinders, m, out, pskBinders, x, $s, $r, $c} = $restore(this, {pskBinders}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!((pskBinders.$length === m[0].pskBinders.$length))) { - $panic(new $String("tls: internal error: pskBinders length mismatch")); - } - _ref = m[0].pskBinders; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - if (!((((i < 0 || i >= pskBinders.$length) ? ($throwRuntimeError("index out of range"), undefined) : pskBinders.$array[pskBinders.$offset + i]).$length === (x = m[0].pskBinders, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])).$length))) { - $panic(new $String("tls: internal error: pskBinders length mismatch")); - } - _i++; - } - m[0].pskBinders = pskBinders; - /* */ if (!(m[0].raw === sliceType$5.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(m[0].raw === sliceType$5.nil)) { */ case 1: - _r$1 = m[0].marshalWithoutBinders(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - lenWithoutBinders = _r$1.$length; - b = cryptobyte.NewFixedBuilder($subslice(m[0].raw, 0, lenWithoutBinders)); - $r = b.AddUint16LengthPrefixed((function(m) { return function $b(b$1) { - var {_i$1, _ref$1, b$1, binder, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - binder = [binder]; - _ref$1 = m[0].pskBinders; - _i$1 = 0; - /* while (true) { */ case 1: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } - binder[0] = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $r = b$1.AddUint8LengthPrefixed((function(binder, m) { return function(b$2) { - var b$2; - b$2.AddBytes(binder[0]); - }; })(binder, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i$1, _ref$1, b$1, binder, $s};return $f; - }; })(m)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = b.Bytes(); - out = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) || !((out.$length === m[0].raw.$length))) { - $panic(new $String("tls: internal error: failed to update binders")); - } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: clientHelloMsg.ptr.prototype.updateBinders, $c: true, $r, _i, _r$1, _ref, _tuple, b, err, i, lenWithoutBinders, m, out, pskBinders, x, $s};return $f; - }; - clientHelloMsg.prototype.updateBinders = function(pskBinders) { return this.$val.updateBinders(pskBinders); }; - clientHelloMsg.ptr.prototype.unmarshal = function(data) { - var _1, _ptr, binder, binders, cipherSuites$1, cipherSuites$24ptr, clientShares, curve, curves, data, extData, extension, extensions, extensions$24ptr, identities, ignored, ks, m, nameList, nameType, proto, protoList, psk, s, s$24ptr, serverName, sigAndAlg, sigAndAlg$1, sigAndAlgs, sigAndAlgs$1, statusType, suite, vers, versList; - m = this; - clientHelloMsg.copy(m, new clientHelloMsg.ptr(data, 0, sliceType$5.nil, sliceType$5.nil, sliceType$2.nil, sliceType$5.nil, "", false, sliceType$3.nil, sliceType$5.nil, false, sliceType$5.nil, sliceType$7.nil, sliceType$7.nil, false, sliceType$5.nil, sliceType$1.nil, false, sliceType$2.nil, sliceType$5.nil, sliceType$15.nil, false, sliceType$5.nil, sliceType$16.nil, sliceType$11.nil)); - s = ($convertSliceType(data, cryptobyte.String)); - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((m.$ptr_vers || (m.$ptr_vers = new ptrType$18(function() { return this.$target.vers; }, function($v) { this.$target.vers = $v; }, m)))) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadBytes((m.$ptr_random || (m.$ptr_random = new ptrType$1(function() { return this.$target.random; }, function($v) { this.$target.random = $v; }, m))), 32) || !readUint8LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_sessionId || (m.$ptr_sessionId = new ptrType$1(function() { return this.$target.sessionId; }, function($v) { this.$target.sessionId = $v; }, m))))) { - return false; - } - cipherSuites$1 = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((cipherSuites$24ptr || (cipherSuites$24ptr = new ptrType$17(function() { return cipherSuites$1; }, function($v) { cipherSuites$1 = $convertSliceType($v, cryptobyte.String); }))))) { - return false; - } - m.cipherSuites = new sliceType$2([]); - m.secureRenegotiationSupported = false; - while (true) { - if (!(!cipherSuites$1.Empty())) { break; } - suite = [suite]; - suite[0] = 0; - if (!(cipherSuites$24ptr || (cipherSuites$24ptr = new ptrType$17(function() { return cipherSuites$1; }, function($v) { cipherSuites$1 = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((suite.$ptr || (suite.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, suite))))) { - return false; - } - if (suite[0] === 255) { - m.secureRenegotiationSupported = true; - } - m.cipherSuites = $append(m.cipherSuites, suite[0]); - } - if (!readUint8LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_compressionMethods || (m.$ptr_compressionMethods = new ptrType$1(function() { return this.$target.compressionMethods; }, function($v) { this.$target.compressionMethods = $v; }, m))))) { - return false; - } - if (s.Empty()) { - return true; - } - extensions = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); })))) || !s.Empty()) { - return false; - } - while (true) { - if (!(!extensions.Empty())) { break; } - binders = [binders]; - clientShares = [clientShares]; - curves = [curves]; - extData = [extData]; - extension = [extension]; - identities = [identities]; - ignored = [ignored]; - nameList = [nameList]; - protoList = [protoList]; - sigAndAlgs = [sigAndAlgs]; - sigAndAlgs$1 = [sigAndAlgs$1]; - statusType = [statusType]; - versList = [versList]; - extension[0] = 0; - extData[0] = cryptobyte.String.nil; - if (!(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((extension.$ptr || (extension.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension)))) || !(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))))) { - return false; - } - _1 = extension[0]; - if (_1 === (0)) { - nameList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((nameList.$ptr || (nameList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, nameList)))) || nameList[0].Empty()) { - return false; - } - while (true) { - if (!(!nameList[0].Empty())) { break; } - nameType = [nameType]; - serverName = [serverName]; - nameType[0] = 0; - serverName[0] = cryptobyte.String.nil; - if (!(nameList.$ptr || (nameList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, nameList))).ReadUint8((nameType.$ptr || (nameType.$ptr = new ptrType$20(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, nameType)))) || !(nameList.$ptr || (nameList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, nameList))).ReadUint16LengthPrefixed((serverName.$ptr || (serverName.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, serverName)))) || serverName[0].Empty()) { - return false; - } - if (!((nameType[0] === 0))) { - continue; - } - if (!((m.serverName.length === 0))) { - return false; - } - m.serverName = ($bytesToString(serverName[0])); - if (strings.HasSuffix(m.serverName, ".")) { - return false; - } - } - } else if (_1 === (5)) { - statusType[0] = 0; - ignored[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint8((statusType.$ptr || (statusType.$ptr = new ptrType$20(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, statusType)))) || !(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((ignored.$ptr || (ignored.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, ignored)))) || !(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((ignored.$ptr || (ignored.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, ignored))))) { - return false; - } - m.ocspStapling = statusType[0] === 1; - } else if (_1 === (10)) { - curves[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((curves.$ptr || (curves.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, curves)))) || curves[0].Empty()) { - return false; - } - while (true) { - if (!(!curves[0].Empty())) { break; } - curve = [curve]; - curve[0] = 0; - if (!(curves.$ptr || (curves.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, curves))).ReadUint16((curve.$ptr || (curve.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, curve))))) { - return false; - } - m.supportedCurves = $append(m.supportedCurves, ((curve[0] << 16 >>> 16))); - } - } else if (_1 === (11)) { - if (!readUint8LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_supportedPoints || (m.$ptr_supportedPoints = new ptrType$1(function() { return this.$target.supportedPoints; }, function($v) { this.$target.supportedPoints = $v; }, m)))) || (m.supportedPoints.$length === 0)) { - return false; - } - } else if (_1 === (35)) { - m.ticketSupported = true; - (extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadBytes((m.$ptr_sessionTicket || (m.$ptr_sessionTicket = new ptrType$1(function() { return this.$target.sessionTicket; }, function($v) { this.$target.sessionTicket = $v; }, m))), extData[0].$length); - } else if (_1 === (13)) { - sigAndAlgs[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((sigAndAlgs.$ptr || (sigAndAlgs.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs)))) || sigAndAlgs[0].Empty()) { - return false; - } - while (true) { - if (!(!sigAndAlgs[0].Empty())) { break; } - sigAndAlg = [sigAndAlg]; - sigAndAlg[0] = 0; - if (!(sigAndAlgs.$ptr || (sigAndAlgs.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs))).ReadUint16((sigAndAlg.$ptr || (sigAndAlg.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlg))))) { - return false; - } - m.supportedSignatureAlgorithms = $append(m.supportedSignatureAlgorithms, ((sigAndAlg[0] << 16 >>> 16))); - } - } else if (_1 === (50)) { - sigAndAlgs$1[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((sigAndAlgs$1.$ptr || (sigAndAlgs$1.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs$1)))) || sigAndAlgs$1[0].Empty()) { - return false; - } - while (true) { - if (!(!sigAndAlgs$1[0].Empty())) { break; } - sigAndAlg$1 = [sigAndAlg$1]; - sigAndAlg$1[0] = 0; - if (!(sigAndAlgs$1.$ptr || (sigAndAlgs$1.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs$1))).ReadUint16((sigAndAlg$1.$ptr || (sigAndAlg$1.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlg$1))))) { - return false; - } - m.supportedSignatureAlgorithmsCert = $append(m.supportedSignatureAlgorithmsCert, ((sigAndAlg$1[0] << 16 >>> 16))); - } - } else if (_1 === (65281)) { - if (!readUint8LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_secureRenegotiation || (m.$ptr_secureRenegotiation = new ptrType$1(function() { return this.$target.secureRenegotiation; }, function($v) { this.$target.secureRenegotiation = $v; }, m))))) { - return false; - } - m.secureRenegotiationSupported = true; - } else if (_1 === (16)) { - protoList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((protoList.$ptr || (protoList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, protoList)))) || protoList[0].Empty()) { - return false; - } - while (true) { - if (!(!protoList[0].Empty())) { break; } - proto = [proto]; - proto[0] = cryptobyte.String.nil; - if (!(protoList.$ptr || (protoList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, protoList))).ReadUint8LengthPrefixed((proto.$ptr || (proto.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, proto)))) || proto[0].Empty()) { - return false; - } - m.alpnProtocols = $append(m.alpnProtocols, ($bytesToString(proto[0]))); - } - } else if (_1 === (18)) { - m.scts = true; - } else if (_1 === (43)) { - versList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint8LengthPrefixed((versList.$ptr || (versList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, versList)))) || versList[0].Empty()) { - return false; - } - while (true) { - if (!(!versList[0].Empty())) { break; } - vers = [vers]; - vers[0] = 0; - if (!(versList.$ptr || (versList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, versList))).ReadUint16((vers.$ptr || (vers.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, vers))))) { - return false; - } - m.supportedVersions = $append(m.supportedVersions, vers[0]); - } - } else if (_1 === (44)) { - if (!readUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_cookie || (m.$ptr_cookie = new ptrType$1(function() { return this.$target.cookie; }, function($v) { this.$target.cookie = $v; }, m)))) || (m.cookie.$length === 0)) { - return false; - } - } else if (_1 === (51)) { - clientShares[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((clientShares.$ptr || (clientShares.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, clientShares))))) { - return false; - } - while (true) { - if (!(!clientShares[0].Empty())) { break; } - ks = new keyShare.ptr(0, sliceType$5.nil); - if (!(clientShares.$ptr || (clientShares.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, clientShares))).ReadUint16(((_ptr = (ks.$ptr_group || (ks.$ptr_group = new ptrType$35(function() { return this.$target.group; }, function($v) { this.$target.group = $v; }, ks))), new ptrType$18(function() { return (_ptr.$get() << 16 >>> 16); }, function($v) { _ptr.$set(($v << 16 >>> 16)); }, _ptr.$target)))) || !readUint16LengthPrefixed((clientShares.$ptr || (clientShares.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, clientShares))), (ks.$ptr_data || (ks.$ptr_data = new ptrType$1(function() { return this.$target.data; }, function($v) { this.$target.data = $v; }, ks)))) || (ks.data.$length === 0)) { - return false; - } - m.keyShares = $append(m.keyShares, ks); - } - } else if (_1 === (42)) { - m.earlyData = true; - } else if (_1 === (45)) { - if (!readUint8LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_pskModes || (m.$ptr_pskModes = new ptrType$1(function() { return this.$target.pskModes; }, function($v) { this.$target.pskModes = $v; }, m))))) { - return false; - } - } else if (_1 === (41)) { - if (!extensions.Empty()) { - return false; - } - identities[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((identities.$ptr || (identities.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, identities)))) || identities[0].Empty()) { - return false; - } - while (true) { - if (!(!identities[0].Empty())) { break; } - psk = new pskIdentity.ptr(sliceType$5.nil, 0); - if (!readUint16LengthPrefixed((identities.$ptr || (identities.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, identities))), (psk.$ptr_label || (psk.$ptr_label = new ptrType$1(function() { return this.$target.label; }, function($v) { this.$target.label = $v; }, psk)))) || !(identities.$ptr || (identities.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, identities))).ReadUint32((psk.$ptr_obfuscatedTicketAge || (psk.$ptr_obfuscatedTicketAge = new ptrType$24(function() { return this.$target.obfuscatedTicketAge; }, function($v) { this.$target.obfuscatedTicketAge = $v; }, psk)))) || (psk.label.$length === 0)) { - return false; - } - m.pskIdentities = $append(m.pskIdentities, psk); - } - binders[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((binders.$ptr || (binders.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, binders)))) || binders[0].Empty()) { - return false; - } - while (true) { - if (!(!binders[0].Empty())) { break; } - binder = [binder]; - binder[0] = sliceType$5.nil; - if (!readUint8LengthPrefixed((binders.$ptr || (binders.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, binders))), (binder.$ptr || (binder.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, binder)))) || (binder[0].$length === 0)) { - return false; - } - m.pskBinders = $append(m.pskBinders, binder[0]); - } - } else { - continue; - } - if (!extData[0].Empty()) { - return false; - } - } - return true; - }; - clientHelloMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - serverHelloMsg.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(2); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, bWithoutExtensions, extensionsPresent, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - extensionsPresent = [extensionsPresent]; - b$1.AddUint16(m[0].vers); - $r = addBytesWithLength(b$1, m[0].random, 32); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].sessionId); - }; })(extensionsPresent, m)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b$1.AddUint16(m[0].cipherSuite); - b$1.AddUint8(m[0].compressionMethod); - extensionsPresent[0] = false; - bWithoutExtensions = $clone(b$1, cryptobyte.Builder); - $r = b$1.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$2) { - var {b$2, $s, $r, $c} = $restore(this, {b$2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (m[0].ocspStapling) { - b$2.AddUint16(5); - b$2.AddUint16(0); - } - if (m[0].ticketSupported) { - b$2.AddUint16(35); - b$2.AddUint16(0); - } - /* */ if (m[0].secureRenegotiationSupported) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (m[0].secureRenegotiationSupported) { */ case 1: - b$2.AddUint16(65281); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].secureRenegotiation); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* */ if (m[0].alpnProtocol.length > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (m[0].alpnProtocol.length > 0) { */ case 4: - b$2.AddUint16(16); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {b$4, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$4.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$5) { - var b$5; - b$5.AddBytes((new sliceType$5($stringToBytes(m[0].alpnProtocol)))); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$4, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - /* */ if (m[0].scts.$length > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (m[0].scts.$length > 0) { */ case 7: - b$2.AddUint16(18); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$4) { - var {_i, _ref, b$4, sct, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sct = [sct]; - _ref = m[0].scts; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - sct[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = b$4.AddUint16LengthPrefixed((function(extensionsPresent, m, sct) { return function(b$5) { - var b$5; - b$5.AddBytes(sct[0]); - }; })(extensionsPresent, m, sct)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$4, sct, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - /* */ if (!((m[0].supportedVersion === 0))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!((m[0].supportedVersion === 0))) { */ case 10: - b$2.AddUint16(43); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$3) { - var b$3; - b$3.AddUint16(m[0].supportedVersion); - }; })(extensionsPresent, m)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - /* */ if (!((m[0].serverShare.group === 0))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!((m[0].serverShare.group === 0))) { */ case 13: - b$2.AddUint16(51); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$3.AddUint16(((m[0].serverShare.group << 16 >>> 16))); - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].serverShare.data); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - /* */ if (m[0].selectedIdentityPresent) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (m[0].selectedIdentityPresent) { */ case 16: - b$2.AddUint16(41); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$3) { - var b$3; - b$3.AddUint16(m[0].selectedIdentity); - }; })(extensionsPresent, m)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - /* */ if (m[0].cookie.$length > 0) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (m[0].cookie.$length > 0) { */ case 19: - b$2.AddUint16(44); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].cookie); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 20: - /* */ if (!((m[0].selectedGroup === 0))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!((m[0].selectedGroup === 0))) { */ case 22: - b$2.AddUint16(51); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function(b$3) { - var b$3; - b$3.AddUint16(((m[0].selectedGroup << 16 >>> 16))); - }; })(extensionsPresent, m)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 23: - /* */ if (m[0].supportedPoints.$length > 0) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (m[0].supportedPoints.$length > 0) { */ case 25: - b$2.AddUint16(11); - $r = b$2.AddUint16LengthPrefixed((function(extensionsPresent, m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint8LengthPrefixed((function(extensionsPresent, m) { return function(b$4) { - var b$4; - b$4.AddBytes(m[0].supportedPoints); - }; })(extensionsPresent, m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 26: - extensionsPresent[0] = b$2.BytesOrPanic().$length > 2; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$2, $s};return $f; - }; })(extensionsPresent, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!extensionsPresent[0]) { - cryptobyte.Builder.copy(b$1, bWithoutExtensions); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, bWithoutExtensions, extensionsPresent, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: serverHelloMsg.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - serverHelloMsg.prototype.marshal = function() { return this.$val.marshal(); }; - serverHelloMsg.ptr.prototype.unmarshal = function(data) { - var _1, _ptr, _ptr$1, data, extData, extension, extensions, extensions$24ptr, m, proto, protoList, s, s$24ptr, sct, sctList, x, x$1; - m = this; - serverHelloMsg.copy(m, new serverHelloMsg.ptr(data, 0, sliceType$5.nil, sliceType$5.nil, 0, 0, false, false, false, sliceType$5.nil, "", sliceType$11.nil, 0, new keyShare.ptr(0, sliceType$5.nil), false, 0, sliceType$5.nil, sliceType$5.nil, 0)); - s = ($convertSliceType(data, cryptobyte.String)); - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((m.$ptr_vers || (m.$ptr_vers = new ptrType$18(function() { return this.$target.vers; }, function($v) { this.$target.vers = $v; }, m)))) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadBytes((m.$ptr_random || (m.$ptr_random = new ptrType$1(function() { return this.$target.random; }, function($v) { this.$target.random = $v; }, m))), 32) || !readUint8LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_sessionId || (m.$ptr_sessionId = new ptrType$1(function() { return this.$target.sessionId; }, function($v) { this.$target.sessionId = $v; }, m)))) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((m.$ptr_cipherSuite || (m.$ptr_cipherSuite = new ptrType$18(function() { return this.$target.cipherSuite; }, function($v) { this.$target.cipherSuite = $v; }, m)))) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint8((m.$ptr_compressionMethod || (m.$ptr_compressionMethod = new ptrType$20(function() { return this.$target.compressionMethod; }, function($v) { this.$target.compressionMethod = $v; }, m))))) { - return false; - } - if (s.Empty()) { - return true; - } - extensions = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); })))) || !s.Empty()) { - return false; - } - while (true) { - if (!(!extensions.Empty())) { break; } - extData = [extData]; - extension = [extension]; - proto = [proto]; - protoList = [protoList]; - sctList = [sctList]; - extension[0] = 0; - extData[0] = cryptobyte.String.nil; - if (!(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((extension.$ptr || (extension.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension)))) || !(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))))) { - return false; - } - _1 = extension[0]; - if (_1 === (5)) { - m.ocspStapling = true; - } else if (_1 === (35)) { - m.ticketSupported = true; - } else if (_1 === (65281)) { - if (!readUint8LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_secureRenegotiation || (m.$ptr_secureRenegotiation = new ptrType$1(function() { return this.$target.secureRenegotiation; }, function($v) { this.$target.secureRenegotiation = $v; }, m))))) { - return false; - } - m.secureRenegotiationSupported = true; - } else if (_1 === (16)) { - protoList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((protoList.$ptr || (protoList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, protoList)))) || protoList[0].Empty()) { - return false; - } - proto[0] = cryptobyte.String.nil; - if (!(protoList.$ptr || (protoList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, protoList))).ReadUint8LengthPrefixed((proto.$ptr || (proto.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, proto)))) || proto[0].Empty() || !protoList[0].Empty()) { - return false; - } - m.alpnProtocol = ($bytesToString(proto[0])); - } else if (_1 === (18)) { - sctList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((sctList.$ptr || (sctList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sctList)))) || sctList[0].Empty()) { - return false; - } - while (true) { - if (!(!sctList[0].Empty())) { break; } - sct = [sct]; - sct[0] = sliceType$5.nil; - if (!readUint16LengthPrefixed((sctList.$ptr || (sctList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sctList))), (sct.$ptr || (sct.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sct)))) || (sct[0].$length === 0)) { - return false; - } - m.scts = $append(m.scts, sct[0]); - } - } else if (_1 === (43)) { - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16((m.$ptr_supportedVersion || (m.$ptr_supportedVersion = new ptrType$18(function() { return this.$target.supportedVersion; }, function($v) { this.$target.supportedVersion = $v; }, m))))) { - return false; - } - } else if (_1 === (44)) { - if (!readUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_cookie || (m.$ptr_cookie = new ptrType$1(function() { return this.$target.cookie; }, function($v) { this.$target.cookie = $v; }, m)))) || (m.cookie.$length === 0)) { - return false; - } - } else if (_1 === (51)) { - if (extData[0].$length === 2) { - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16(((_ptr = (m.$ptr_selectedGroup || (m.$ptr_selectedGroup = new ptrType$35(function() { return this.$target.selectedGroup; }, function($v) { this.$target.selectedGroup = $v; }, m))), new ptrType$18(function() { return (_ptr.$get() << 16 >>> 16); }, function($v) { _ptr.$set(($v << 16 >>> 16)); }, _ptr.$target))))) { - return false; - } - } else { - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16(((_ptr$1 = (x = m.serverShare, (x.$ptr_group || (x.$ptr_group = new ptrType$35(function() { return this.$target.group; }, function($v) { this.$target.group = $v; }, x)))), new ptrType$18(function() { return (_ptr$1.$get() << 16 >>> 16); }, function($v) { _ptr$1.$set(($v << 16 >>> 16)); }, _ptr$1.$target)))) || !readUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (x$1 = m.serverShare, (x$1.$ptr_data || (x$1.$ptr_data = new ptrType$1(function() { return this.$target.data; }, function($v) { this.$target.data = $v; }, x$1)))))) { - return false; - } - } - } else if (_1 === (41)) { - m.selectedIdentityPresent = true; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16((m.$ptr_selectedIdentity || (m.$ptr_selectedIdentity = new ptrType$18(function() { return this.$target.selectedIdentity; }, function($v) { this.$target.selectedIdentity = $v; }, m))))) { - return false; - } - } else if (_1 === (11)) { - if (!readUint8LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (m.$ptr_supportedPoints || (m.$ptr_supportedPoints = new ptrType$1(function() { return this.$target.supportedPoints; }, function($v) { this.$target.supportedPoints = $v; }, m)))) || (m.supportedPoints.$length === 0)) { - return false; - } - } else { - continue; - } - if (!extData[0].Empty()) { - return false; - } - } - return true; - }; - serverHelloMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - encryptedExtensionsMsg.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(8); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$1.AddUint16LengthPrefixed((function(m) { return function $b(b$2) { - var {b$2, $s, $r, $c} = $restore(this, {b$2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (m[0].alpnProtocol.length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (m[0].alpnProtocol.length > 0) { */ case 1: - b$2.AddUint16(16); - $r = b$2.AddUint16LengthPrefixed((function(m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(m) { return function $b(b$4) { - var {b$4, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$4.AddUint8LengthPrefixed((function(m) { return function(b$5) { - var b$5; - b$5.AddBytes((new sliceType$5($stringToBytes(m[0].alpnProtocol)))); - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$4, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$2, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: encryptedExtensionsMsg.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - encryptedExtensionsMsg.prototype.marshal = function() { return this.$val.marshal(); }; - encryptedExtensionsMsg.ptr.prototype.unmarshal = function(data) { - var _1, data, extData, extension, extensions, extensions$24ptr, m, proto, protoList, s, s$24ptr; - m = this; - encryptedExtensionsMsg.copy(m, new encryptedExtensionsMsg.ptr(data, "")); - s = ($convertSliceType(data, cryptobyte.String)); - extensions = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); })))) || !s.Empty()) { - return false; - } - while (true) { - if (!(!extensions.Empty())) { break; } - extData = [extData]; - extension = [extension]; - proto = [proto]; - protoList = [protoList]; - extension[0] = 0; - extData[0] = cryptobyte.String.nil; - if (!(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((extension.$ptr || (extension.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension)))) || !(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))))) { - return false; - } - _1 = extension[0]; - if (_1 === (16)) { - protoList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((protoList.$ptr || (protoList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, protoList)))) || protoList[0].Empty()) { - return false; - } - proto[0] = cryptobyte.String.nil; - if (!(protoList.$ptr || (protoList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, protoList))).ReadUint8LengthPrefixed((proto.$ptr || (proto.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, proto)))) || proto[0].Empty() || !protoList[0].Empty()) { - return false; - } - m.alpnProtocol = ($bytesToString(proto[0])); - } else { - continue; - } - if (!extData[0].Empty()) { - return false; - } - } - return true; - }; - encryptedExtensionsMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - endOfEarlyDataMsg.ptr.prototype.marshal = function() { - var m, x; - m = this; - x = $makeSlice(sliceType$5, 4); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 5); - return x; - }; - endOfEarlyDataMsg.prototype.marshal = function() { return this.$val.marshal(); }; - endOfEarlyDataMsg.ptr.prototype.unmarshal = function(data) { - var data, m; - m = this; - return data.$length === 4; - }; - endOfEarlyDataMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - keyUpdateMsg.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(24); - $r = b.AddUint24LengthPrefixed((function(m) { return function(b$1) { - var b$1; - if (m[0].updateRequested) { - b$1.AddUint8(1); - } else { - b$1.AddUint8(0); - } - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: keyUpdateMsg.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - keyUpdateMsg.prototype.marshal = function() { return this.$val.marshal(); }; - keyUpdateMsg.ptr.prototype.unmarshal = function(data) { - var _1, data, m, s, s$24ptr, updateRequested, updateRequested$24ptr; - m = this; - m.raw = data; - s = ($convertSliceType(data, cryptobyte.String)); - updateRequested = 0; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint8((updateRequested$24ptr || (updateRequested$24ptr = new ptrType$20(function() { return updateRequested; }, function($v) { updateRequested = $v; })))) || !s.Empty()) { - return false; - } - _1 = updateRequested; - if (_1 === (0)) { - m.updateRequested = false; - } else if (_1 === (1)) { - m.updateRequested = true; - } else { - return false; - } - return true; - }; - keyUpdateMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - newSessionTicketMsgTLS13.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(4); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$1.AddUint32(m[0].lifetime); - b$1.AddUint32(m[0].ageAdd); - $r = b$1.AddUint8LengthPrefixed((function(m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].nonce); - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint16LengthPrefixed((function(m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].label); - }; })(m)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint16LengthPrefixed((function(m) { return function $b(b$2) { - var {b$2, $s, $r, $c} = $restore(this, {b$2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (m[0].maxEarlyData > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (m[0].maxEarlyData > 0) { */ case 1: - b$2.AddUint16(42); - $r = b$2.AddUint16LengthPrefixed((function(m) { return function(b$3) { - var b$3; - b$3.AddUint32(m[0].maxEarlyData); - }; })(m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$2, $s};return $f; - }; })(m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: newSessionTicketMsgTLS13.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - newSessionTicketMsgTLS13.prototype.marshal = function() { return this.$val.marshal(); }; - newSessionTicketMsgTLS13.ptr.prototype.unmarshal = function(data) { - var _1, data, extData, extension, extensions, extensions$24ptr, m, s, s$24ptr; - m = this; - newSessionTicketMsgTLS13.copy(m, new newSessionTicketMsgTLS13.ptr(data, 0, 0, sliceType$5.nil, sliceType$5.nil, 0)); - s = ($convertSliceType(data, cryptobyte.String)); - extensions = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint32((m.$ptr_lifetime || (m.$ptr_lifetime = new ptrType$24(function() { return this.$target.lifetime; }, function($v) { this.$target.lifetime = $v; }, m)))) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint32((m.$ptr_ageAdd || (m.$ptr_ageAdd = new ptrType$24(function() { return this.$target.ageAdd; }, function($v) { this.$target.ageAdd = $v; }, m)))) || !readUint8LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_nonce || (m.$ptr_nonce = new ptrType$1(function() { return this.$target.nonce; }, function($v) { this.$target.nonce = $v; }, m)))) || !readUint16LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_label || (m.$ptr_label = new ptrType$1(function() { return this.$target.label; }, function($v) { this.$target.label = $v; }, m)))) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); })))) || !s.Empty()) { - return false; - } - while (true) { - if (!(!extensions.Empty())) { break; } - extData = [extData]; - extension = [extension]; - extension[0] = 0; - extData[0] = cryptobyte.String.nil; - if (!(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((extension.$ptr || (extension.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension)))) || !(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))))) { - return false; - } - _1 = extension[0]; - if (_1 === (42)) { - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint32((m.$ptr_maxEarlyData || (m.$ptr_maxEarlyData = new ptrType$24(function() { return this.$target.maxEarlyData; }, function($v) { this.$target.maxEarlyData = $v; }, m))))) { - return false; - } - } else { - continue; - } - if (!extData[0].Empty()) { - return false; - } - } - return true; - }; - newSessionTicketMsgTLS13.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - certificateRequestMsgTLS13.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(13); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$1.AddUint8(0); - $r = b$1.AddUint16LengthPrefixed((function(m) { return function $b(b$2) { - var {b$2, $s, $r, $c} = $restore(this, {b$2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (m[0].ocspStapling) { - b$2.AddUint16(5); - b$2.AddUint16(0); - } - if (m[0].scts) { - b$2.AddUint16(18); - b$2.AddUint16(0); - } - /* */ if (m[0].supportedSignatureAlgorithms.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (m[0].supportedSignatureAlgorithms.$length > 0) { */ case 1: - b$2.AddUint16(13); - $r = b$2.AddUint16LengthPrefixed((function(m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(m) { return function(b$4) { - var _i, _ref, b$4, sigAlgo; - _ref = m[0].supportedSignatureAlgorithms; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - sigAlgo = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$4.AddUint16(((sigAlgo << 16 >>> 16))); - _i++; - } - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* */ if (m[0].supportedSignatureAlgorithmsCert.$length > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (m[0].supportedSignatureAlgorithmsCert.$length > 0) { */ case 4: - b$2.AddUint16(50); - $r = b$2.AddUint16LengthPrefixed((function(m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(m) { return function(b$4) { - var _i, _ref, b$4, sigAlgo; - _ref = m[0].supportedSignatureAlgorithmsCert; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - sigAlgo = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b$4.AddUint16(((sigAlgo << 16 >>> 16))); - _i++; - } - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(m)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - /* */ if (m[0].certificateAuthorities.$length > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (m[0].certificateAuthorities.$length > 0) { */ case 7: - b$2.AddUint16(47); - $r = b$2.AddUint16LengthPrefixed((function(m) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(m) { return function $b(b$4) { - var {_i, _ref, b$4, ca, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ca = [ca]; - _ref = m[0].certificateAuthorities; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - ca[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = b$4.AddUint16LengthPrefixed((function(ca, m) { return function(b$5) { - var b$5; - b$5.AddBytes(ca[0]); - }; })(ca, m)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$4, ca, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(m)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$2, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: certificateRequestMsgTLS13.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - certificateRequestMsgTLS13.prototype.marshal = function() { return this.$val.marshal(); }; - certificateRequestMsgTLS13.ptr.prototype.unmarshal = function(data) { - var _1, _tmp, _tmp$1, auths, ca, context$1, context$24ptr, data, extData, extension, extensions, extensions$24ptr, m, s, s$24ptr, sigAndAlg, sigAndAlg$1, sigAndAlgs, sigAndAlgs$1; - m = this; - certificateRequestMsgTLS13.copy(m, new certificateRequestMsgTLS13.ptr(data, false, false, sliceType$7.nil, sliceType$7.nil, sliceType$11.nil)); - s = ($convertSliceType(data, cryptobyte.String)); - _tmp = cryptobyte.String.nil; - _tmp$1 = cryptobyte.String.nil; - context$1 = _tmp; - extensions = _tmp$1; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint8LengthPrefixed((context$24ptr || (context$24ptr = new ptrType$17(function() { return context$1; }, function($v) { context$1 = $convertSliceType($v, cryptobyte.String); })))) || !context$1.Empty() || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); })))) || !s.Empty()) { - return false; - } - while (true) { - if (!(!extensions.Empty())) { break; } - auths = [auths]; - extData = [extData]; - extension = [extension]; - sigAndAlgs = [sigAndAlgs]; - sigAndAlgs$1 = [sigAndAlgs$1]; - extension[0] = 0; - extData[0] = cryptobyte.String.nil; - if (!(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16((extension.$ptr || (extension.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension)))) || !(extensions$24ptr || (extensions$24ptr = new ptrType$17(function() { return extensions; }, function($v) { extensions = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))))) { - return false; - } - _1 = extension[0]; - if (_1 === (5)) { - m.ocspStapling = true; - } else if (_1 === (18)) { - m.scts = true; - } else if (_1 === (13)) { - sigAndAlgs[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((sigAndAlgs.$ptr || (sigAndAlgs.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs)))) || sigAndAlgs[0].Empty()) { - return false; - } - while (true) { - if (!(!sigAndAlgs[0].Empty())) { break; } - sigAndAlg = [sigAndAlg]; - sigAndAlg[0] = 0; - if (!(sigAndAlgs.$ptr || (sigAndAlgs.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs))).ReadUint16((sigAndAlg.$ptr || (sigAndAlg.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlg))))) { - return false; - } - m.supportedSignatureAlgorithms = $append(m.supportedSignatureAlgorithms, ((sigAndAlg[0] << 16 >>> 16))); - } - } else if (_1 === (50)) { - sigAndAlgs$1[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((sigAndAlgs$1.$ptr || (sigAndAlgs$1.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs$1)))) || sigAndAlgs$1[0].Empty()) { - return false; - } - while (true) { - if (!(!sigAndAlgs$1[0].Empty())) { break; } - sigAndAlg$1 = [sigAndAlg$1]; - sigAndAlg$1[0] = 0; - if (!(sigAndAlgs$1.$ptr || (sigAndAlgs$1.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlgs$1))).ReadUint16((sigAndAlg$1.$ptr || (sigAndAlg$1.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sigAndAlg$1))))) { - return false; - } - m.supportedSignatureAlgorithmsCert = $append(m.supportedSignatureAlgorithmsCert, ((sigAndAlg$1[0] << 16 >>> 16))); - } - } else if (_1 === (47)) { - auths[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((auths.$ptr || (auths.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, auths)))) || auths[0].Empty()) { - return false; - } - while (true) { - if (!(!auths[0].Empty())) { break; } - ca = [ca]; - ca[0] = sliceType$5.nil; - if (!readUint16LengthPrefixed((auths.$ptr || (auths.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, auths))), (ca.$ptr || (ca.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, ca)))) || (ca[0].$length === 0)) { - return false; - } - m.certificateAuthorities = $append(m.certificateAuthorities, ca[0]); - } - } else { - continue; - } - if (!extData[0].Empty()) { - return false; - } - } - return true; - }; - certificateRequestMsgTLS13.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - certificateMsg.ptr.prototype.marshal = function() { - var _i, _i$1, _ref, _ref$1, certificateOctets, i, length, m, slice, slice$1, x, y; - x = sliceType$5.nil; - m = this; - if (!(m.raw === sliceType$5.nil)) { - x = m.raw; - return x; - } - i = 0; - _ref = m.certificates; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - slice = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - i = i + (slice.$length) >> 0; - _i++; - } - length = (3 + ($imul(3, m.certificates.$length)) >> 0) + i >> 0; - x = $makeSlice(sliceType$5, (4 + length >> 0)); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 11); - (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); - (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); - (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); - certificateOctets = length - 3 >> 0; - (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = (((certificateOctets >> 16 >> 0) << 24 >>> 24))); - (5 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 5] = (((certificateOctets >> 8 >> 0) << 24 >>> 24))); - (6 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 6] = ((certificateOctets << 24 >>> 24))); - y = $subslice(x, 7); - _ref$1 = m.certificates; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - slice$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((slice$1.$length >> 16 >> 0) << 24 >>> 24))); - (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = (((slice$1.$length >> 8 >> 0) << 24 >>> 24))); - (2 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 2] = ((slice$1.$length << 24 >>> 24))); - $copySlice($subslice(y, 3), slice$1); - y = $subslice(y, (3 + slice$1.$length >> 0)); - _i$1++; - } - m.raw = x; - return x; - }; - certificateMsg.prototype.marshal = function() { return this.$val.marshal(); }; - certificateMsg.ptr.prototype.unmarshal = function(data) { - var certLen, certLen$1, certsLen, d, data, i, m, numCerts, x; - m = this; - if (data.$length < 7) { - return false; - } - m.raw = data; - certsLen = (((((((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) >>> 0)) << 16 >>> 0) | ((((5 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 5]) >>> 0)) << 8 >>> 0)) >>> 0) | (((6 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 6]) >>> 0))) >>> 0; - if (!((((data.$length >>> 0)) === (certsLen + 7 >>> 0)))) { - return false; - } - numCerts = 0; - d = $subslice(data, 7); - while (true) { - if (!(certsLen > 0)) { break; } - if (d.$length < 4) { - return false; - } - certLen = (((((((0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 2]) >>> 0))) >>> 0; - if (((d.$length >>> 0)) < (3 + certLen >>> 0)) { - return false; - } - d = $subslice(d, (3 + certLen >>> 0)); - certsLen = certsLen - ((3 + certLen >>> 0)) >>> 0; - numCerts = numCerts + (1) >> 0; - } - m.certificates = $makeSlice(sliceType$11, numCerts); - d = $subslice(data, 7); - i = 0; - while (true) { - if (!(i < numCerts)) { break; } - certLen$1 = (((((((0 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= d.$length ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + 2]) >>> 0))) >>> 0; - (x = m.certificates, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = $subslice(d, 3, (3 + certLen$1 >>> 0)))); - d = $subslice(d, (3 + certLen$1 >>> 0)); - i = i + (1) >> 0; - } - return true; - }; - certificateMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - certificateMsgTLS13.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(11); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, certificate, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$1.AddUint8(0); - certificate = $clone(m[0].certificate, Certificate); - if (!m[0].ocspStapling) { - certificate.OCSPStaple = sliceType$5.nil; - } - if (!m[0].scts) { - certificate.SignedCertificateTimestamps = sliceType$11.nil; - } - $r = marshalCertificate(b$1, $clone(certificate, Certificate)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, certificate, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: certificateMsgTLS13.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - certificateMsgTLS13.prototype.marshal = function() { return this.$val.marshal(); }; - marshalCertificate = function(b, certificate) { - var {b, certificate, $s, $r, $c} = $restore(this, {b, certificate}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - certificate = [certificate]; - $r = b.AddUint24LengthPrefixed((function(certificate) { return function $b(b$1) { - var {_i, _ref, b$1, cert, i, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cert = [cert]; - i = [i]; - _ref = certificate[0].Certificate; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i[0] = _i; - cert[0] = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = b$1.AddUint24LengthPrefixed((function(cert, certificate, i) { return function(b$2) { - var b$2; - b$2.AddBytes(cert[0]); - }; })(cert, certificate, i)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = b$1.AddUint16LengthPrefixed((function(cert, certificate, i) { return function $b(b$2) { - var {b$2, $s, $r, $c} = $restore(this, {b$2}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (i[0] > 0) { - $s = -1; return; - } - /* */ if (!(certificate[0].OCSPStaple === sliceType$5.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(certificate[0].OCSPStaple === sliceType$5.nil)) { */ case 1: - b$2.AddUint16(5); - $r = b$2.AddUint16LengthPrefixed((function(cert, certificate, i) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$3.AddUint8(1); - $r = b$3.AddUint24LengthPrefixed((function(cert, certificate, i) { return function(b$4) { - var b$4; - b$4.AddBytes(certificate[0].OCSPStaple); - }; })(cert, certificate, i)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(cert, certificate, i)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* */ if (!(certificate[0].SignedCertificateTimestamps === sliceType$11.nil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(certificate[0].SignedCertificateTimestamps === sliceType$11.nil)) { */ case 4: - b$2.AddUint16(18); - $r = b$2.AddUint16LengthPrefixed((function(cert, certificate, i) { return function $b(b$3) { - var {b$3, $s, $r, $c} = $restore(this, {b$3}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = b$3.AddUint16LengthPrefixed((function(cert, certificate, i) { return function $b(b$4) { - var {_i$1, _ref$1, b$4, sct, $s, $r, $c} = $restore(this, {b$4}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sct = [sct]; - _ref$1 = certificate[0].SignedCertificateTimestamps; - _i$1 = 0; - /* while (true) { */ case 1: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } - sct[0] = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $r = b$4.AddUint16LengthPrefixed((function(cert, certificate, i, sct) { return function(b$5) { - var b$5; - b$5.AddBytes(sct[0]); - }; })(cert, certificate, i, sct)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i$1, _ref$1, b$4, sct, $s};return $f; - }; })(cert, certificate, i)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$3, $s};return $f; - }; })(cert, certificate, i)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$2, $s};return $f; - }; })(cert, certificate, i)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _ref, b$1, cert, i, $s};return $f; - }; })(certificate)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: marshalCertificate, $c: true, $r, b, certificate, $s};return $f; - }; - certificateMsgTLS13.ptr.prototype.unmarshal = function(data) { - var context$1, context$24ptr, data, m, s, s$24ptr; - m = this; - certificateMsgTLS13.copy(m, new certificateMsgTLS13.ptr(data, new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), false, false)); - s = ($convertSliceType(data, cryptobyte.String)); - context$1 = cryptobyte.String.nil; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint8LengthPrefixed((context$24ptr || (context$24ptr = new ptrType$17(function() { return context$1; }, function($v) { context$1 = $convertSliceType($v, cryptobyte.String); })))) || !context$1.Empty() || !unmarshalCertificate((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), m.certificate) || !s.Empty()) { - return false; - } - m.scts = !(m.certificate.SignedCertificateTimestamps === sliceType$11.nil); - m.ocspStapling = !(m.certificate.OCSPStaple === sliceType$5.nil); - return true; - }; - certificateMsgTLS13.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - unmarshalCertificate = function(s, certificate) { - var _1, cert, certList, certList$24ptr, certificate, extData, extension, extensions, s, sct, sctList, statusType; - certList = cryptobyte.String.nil; - if (!s.ReadUint24LengthPrefixed((certList$24ptr || (certList$24ptr = new ptrType$17(function() { return certList; }, function($v) { certList = $convertSliceType($v, cryptobyte.String); }))))) { - return false; - } - while (true) { - if (!(!certList.Empty())) { break; } - cert = [cert]; - extensions = [extensions]; - cert[0] = sliceType$5.nil; - extensions[0] = cryptobyte.String.nil; - if (!readUint24LengthPrefixed((certList$24ptr || (certList$24ptr = new ptrType$17(function() { return certList; }, function($v) { certList = $convertSliceType($v, cryptobyte.String); }))), (cert.$ptr || (cert.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, cert)))) || !(certList$24ptr || (certList$24ptr = new ptrType$17(function() { return certList; }, function($v) { certList = $convertSliceType($v, cryptobyte.String); }))).ReadUint16LengthPrefixed((extensions.$ptr || (extensions.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))))) { - return false; - } - certificate.Certificate = $append(certificate.Certificate, cert[0]); - while (true) { - if (!(!extensions[0].Empty())) { break; } - extData = [extData]; - extension = [extension]; - sctList = [sctList]; - statusType = [statusType]; - extension[0] = 0; - extData[0] = cryptobyte.String.nil; - if (!(extensions.$ptr || (extensions.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))).ReadUint16((extension.$ptr || (extension.$ptr = new ptrType$18(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extension)))) || !(extensions.$ptr || (extensions.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extensions))).ReadUint16LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))))) { - return false; - } - if (certificate.Certificate.$length > 1) { - continue; - } - _1 = extension[0]; - if (_1 === (5)) { - statusType[0] = 0; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint8((statusType.$ptr || (statusType.$ptr = new ptrType$20(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, statusType)))) || !((statusType[0] === 1)) || !readUint24LengthPrefixed((extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))), (certificate.$ptr_OCSPStaple || (certificate.$ptr_OCSPStaple = new ptrType$1(function() { return this.$target.OCSPStaple; }, function($v) { this.$target.OCSPStaple = $v; }, certificate)))) || (certificate.OCSPStaple.$length === 0)) { - return false; - } - } else if (_1 === (18)) { - sctList[0] = cryptobyte.String.nil; - if (!(extData.$ptr || (extData.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, extData))).ReadUint16LengthPrefixed((sctList.$ptr || (sctList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sctList)))) || sctList[0].Empty()) { - return false; - } - while (true) { - if (!(!sctList[0].Empty())) { break; } - sct = [sct]; - sct[0] = sliceType$5.nil; - if (!readUint16LengthPrefixed((sctList.$ptr || (sctList.$ptr = new ptrType$17(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sctList))), (sct.$ptr || (sct.$ptr = new ptrType$1(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, sct)))) || (sct[0].$length === 0)) { - return false; - } - certificate.SignedCertificateTimestamps = $append(certificate.SignedCertificateTimestamps, sct[0]); - } - } else { - continue; - } - if (!extData[0].Empty()) { - return false; - } - } - } - return true; - }; - serverKeyExchangeMsg.ptr.prototype.marshal = function() { - var length, m, x; - m = this; - if (!(m.raw === sliceType$5.nil)) { - return m.raw; - } - length = m.key.$length; - x = $makeSlice(sliceType$5, (length + 4 >> 0)); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 12); - (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); - (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); - (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); - $copySlice($subslice(x, 4), m.key); - m.raw = x; - return x; - }; - serverKeyExchangeMsg.prototype.marshal = function() { return this.$val.marshal(); }; - serverKeyExchangeMsg.ptr.prototype.unmarshal = function(data) { - var data, m; - m = this; - m.raw = data; - if (data.$length < 4) { - return false; - } - m.key = $subslice(data, 4); - return true; - }; - serverKeyExchangeMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - certificateStatusMsg.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(22); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b$1.AddUint8(1); - $r = b$1.AddUint24LengthPrefixed((function(m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].response); - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: certificateStatusMsg.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - certificateStatusMsg.prototype.marshal = function() { return this.$val.marshal(); }; - certificateStatusMsg.ptr.prototype.unmarshal = function(data) { - var data, m, s, s$24ptr, statusType, statusType$24ptr; - m = this; - m.raw = data; - s = ($convertSliceType(data, cryptobyte.String)); - statusType = 0; - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4) || !(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint8((statusType$24ptr || (statusType$24ptr = new ptrType$20(function() { return statusType; }, function($v) { statusType = $v; })))) || !((statusType === 1)) || !readUint24LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_response || (m.$ptr_response = new ptrType$1(function() { return this.$target.response; }, function($v) { this.$target.response = $v; }, m)))) || (m.response.$length === 0) || !s.Empty()) { - return false; - } - return true; - }; - certificateStatusMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - serverHelloDoneMsg.ptr.prototype.marshal = function() { - var m, x; - m = this; - x = $makeSlice(sliceType$5, 4); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 14); - return x; - }; - serverHelloDoneMsg.prototype.marshal = function() { return this.$val.marshal(); }; - serverHelloDoneMsg.ptr.prototype.unmarshal = function(data) { - var data, m; - m = this; - return data.$length === 4; - }; - serverHelloDoneMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - clientKeyExchangeMsg.ptr.prototype.marshal = function() { - var length, m, x; - m = this; - if (!(m.raw === sliceType$5.nil)) { - return m.raw; - } - length = m.ciphertext.$length; - x = $makeSlice(sliceType$5, (length + 4 >> 0)); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 16); - (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); - (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); - (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); - $copySlice($subslice(x, 4), m.ciphertext); - m.raw = x; - return x; - }; - clientKeyExchangeMsg.prototype.marshal = function() { return this.$val.marshal(); }; - clientKeyExchangeMsg.ptr.prototype.unmarshal = function(data) { - var data, l, m; - m = this; - m.raw = data; - if (data.$length < 4) { - return false; - } - l = (((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)) << 16 >> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0)) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); - if (!((l === (data.$length - 4 >> 0)))) { - return false; - } - m.ciphertext = $subslice(data, 4); - return true; - }; - clientKeyExchangeMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - finishedMsg.ptr.prototype.marshal = function() { - var {b, m, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - $s = -1; return m[0].raw; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(20); - $r = b.AddUint24LengthPrefixed((function(m) { return function(b$1) { - var b$1; - b$1.AddBytes(m[0].verifyData); - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - $s = -1; return m[0].raw; - /* */ } return; } var $f = {$blk: finishedMsg.ptr.prototype.marshal, $c: true, $r, b, m, $s};return $f; - }; - finishedMsg.prototype.marshal = function() { return this.$val.marshal(); }; - finishedMsg.ptr.prototype.unmarshal = function(data) { - var data, m, s, s$24ptr; - m = this; - m.raw = data; - s = ($convertSliceType(data, cryptobyte.String)); - return (s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(1) && readUint24LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_verifyData || (m.$ptr_verifyData = new ptrType$1(function() { return this.$target.verifyData; }, function($v) { this.$target.verifyData = $v; }, m)))) && s.Empty(); - }; - finishedMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - certificateRequestMsg.ptr.prototype.marshal = function() { - var _i, _i$1, _i$2, _ref, _ref$1, _ref$2, ca, ca$1, casLength, length, m, n, sigAlgo, x, y; - x = sliceType$5.nil; - m = this; - if (!(m.raw === sliceType$5.nil)) { - x = m.raw; - return x; - } - length = (1 + m.certificateTypes.$length >> 0) + 2 >> 0; - casLength = 0; - _ref = m.certificateAuthorities; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - ca = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - casLength = casLength + ((2 + ca.$length >> 0)) >> 0; - _i++; - } - length = length + (casLength) >> 0; - if (m.hasSignatureAlgorithm) { - length = length + ((2 + ($imul(2, m.supportedSignatureAlgorithms.$length)) >> 0)) >> 0; - } - x = $makeSlice(sliceType$5, (4 + length >> 0)); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 13); - (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); - (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); - (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); - (4 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 4] = ((m.certificateTypes.$length << 24 >>> 24))); - $copySlice($subslice(x, 5), m.certificateTypes); - y = $subslice(x, (5 + m.certificateTypes.$length >> 0)); - if (m.hasSignatureAlgorithm) { - n = $imul(m.supportedSignatureAlgorithms.$length, 2); - (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((n >> 8 >> 0) << 24 >>> 24))); - (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((n << 24 >>> 24))); - y = $subslice(y, 2); - _ref$1 = m.supportedSignatureAlgorithms; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - sigAlgo = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((sigAlgo >>> 8 << 16 >>> 16) << 24 >>> 24))); - (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((sigAlgo << 24 >>> 24))); - y = $subslice(y, 2); - _i$1++; - } - } - (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((casLength >> 8 >> 0) << 24 >>> 24))); - (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((casLength << 24 >>> 24))); - y = $subslice(y, 2); - _ref$2 = m.certificateAuthorities; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.$length)) { break; } - ca$1 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - (0 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 0] = (((ca$1.$length >> 8 >> 0) << 24 >>> 24))); - (1 >= y.$length ? ($throwRuntimeError("index out of range"), undefined) : y.$array[y.$offset + 1] = ((ca$1.$length << 24 >>> 24))); - y = $subslice(y, 2); - $copySlice(y, ca$1); - y = $subslice(y, ca$1.$length); - _i$2++; - } - m.raw = x; - return x; - }; - certificateRequestMsg.prototype.marshal = function() { return this.$val.marshal(); }; - certificateRequestMsg.ptr.prototype.unmarshal = function(data) { - var _i, _q, _ref, caLen, cas, casLength, data, i, length, m, numCertTypes, numSigAlgos, sigAndHashLen, x; - m = this; - m.raw = data; - if (data.$length < 5) { - return false; - } - length = (((((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >>> 0)) << 16 >>> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >>> 0))) >>> 0; - if (!(((((data.$length >>> 0)) - 4 >>> 0) === length))) { - return false; - } - numCertTypes = (((4 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 4]) >> 0)); - data = $subslice(data, 5); - if ((numCertTypes === 0) || data.$length <= numCertTypes) { - return false; - } - m.certificateTypes = $makeSlice(sliceType$5, numCertTypes); - if (!(($copySlice(m.certificateTypes, data) === numCertTypes))) { - return false; - } - data = $subslice(data, numCertTypes); - if (m.hasSignatureAlgorithm) { - if (data.$length < 2) { - return false; - } - sigAndHashLen = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; - data = $subslice(data, 2); - if (!((((sigAndHashLen & 1) >>> 0) === 0))) { - return false; - } - if (data.$length < ((sigAndHashLen >> 0))) { - return false; - } - numSigAlgos = (_q = sigAndHashLen / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")); - m.supportedSignatureAlgorithms = $makeSlice(sliceType$7, numSigAlgos); - _ref = m.supportedSignatureAlgorithms; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - (x = m.supportedSignatureAlgorithms, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = ((((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0))); - data = $subslice(data, 2); - _i++; - } - } - if (data.$length < 2) { - return false; - } - casLength = (((((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 16 >>> 16))) >>> 0; - data = $subslice(data, 2); - if (data.$length < ((casLength >> 0))) { - return false; - } - cas = $makeSlice(sliceType$5, casLength); - $copySlice(cas, data); - data = $subslice(data, casLength); - m.certificateAuthorities = sliceType$11.nil; - while (true) { - if (!(cas.$length > 0)) { break; } - if (cas.$length < 2) { - return false; - } - caLen = (((((0 >= cas.$length ? ($throwRuntimeError("index out of range"), undefined) : cas.$array[cas.$offset + 0]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((1 >= cas.$length ? ($throwRuntimeError("index out of range"), undefined) : cas.$array[cas.$offset + 1]) << 16 >>> 16))) >>> 0; - cas = $subslice(cas, 2); - if (cas.$length < ((caLen >> 0))) { - return false; - } - m.certificateAuthorities = $append(m.certificateAuthorities, $subslice(cas, 0, caLen)); - cas = $subslice(cas, caLen); - } - return data.$length === 0; - }; - certificateRequestMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - certificateVerifyMsg.ptr.prototype.marshal = function() { - var {b, m, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - m = [m]; - x = sliceType$5.nil; - m[0] = this; - if (!(m[0].raw === sliceType$5.nil)) { - x = m[0].raw; - $s = -1; return x; - } - b = new cryptobyte.Builder.ptr($ifaceNil, sliceType$5.nil, false, ptrType$15.nil, 0, 0, false, ptrType$16.nil); - b.AddUint8(15); - $r = b.AddUint24LengthPrefixed((function(m) { return function $b(b$1) { - var {b$1, $s, $r, $c} = $restore(this, {b$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (m[0].hasSignatureAlgorithm) { - b$1.AddUint16(((m[0].signatureAlgorithm << 16 >>> 16))); - } - $r = b$1.AddUint16LengthPrefixed((function(m) { return function(b$2) { - var b$2; - b$2.AddBytes(m[0].signature); - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, b$1, $s};return $f; - }; })(m)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m[0].raw = b.BytesOrPanic(); - x = m[0].raw; - $s = -1; return x; - /* */ } return; } var $f = {$blk: certificateVerifyMsg.ptr.prototype.marshal, $c: true, $r, b, m, x, $s};return $f; - }; - certificateVerifyMsg.prototype.marshal = function() { return this.$val.marshal(); }; - certificateVerifyMsg.ptr.prototype.unmarshal = function(data) { - var _ptr, data, m, s, s$24ptr; - m = this; - m.raw = data; - s = ($convertSliceType(data, cryptobyte.String)); - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).Skip(4)) { - return false; - } - if (m.hasSignatureAlgorithm) { - if (!(s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))).ReadUint16(((_ptr = (m.$ptr_signatureAlgorithm || (m.$ptr_signatureAlgorithm = new ptrType$36(function() { return this.$target.signatureAlgorithm; }, function($v) { this.$target.signatureAlgorithm = $v; }, m))), new ptrType$18(function() { return (_ptr.$get() << 16 >>> 16); }, function($v) { _ptr.$set(($v << 16 >>> 16)); }, _ptr.$target))))) { - return false; - } - } - return readUint16LengthPrefixed((s$24ptr || (s$24ptr = new ptrType$17(function() { return s; }, function($v) { s = $convertSliceType($v, cryptobyte.String); }))), (m.$ptr_signature || (m.$ptr_signature = new ptrType$1(function() { return this.$target.signature; }, function($v) { this.$target.signature = $v; }, m)))) && s.Empty(); - }; - certificateVerifyMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - newSessionTicketMsg.ptr.prototype.marshal = function() { - var length, m, ticketLen, x; - x = sliceType$5.nil; - m = this; - if (!(m.raw === sliceType$5.nil)) { - x = m.raw; - return x; - } - ticketLen = m.ticket.$length; - length = 6 + ticketLen >> 0; - x = $makeSlice(sliceType$5, (4 + length >> 0)); - (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0] = 4); - (1 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 1] = (((length >> 16 >> 0) << 24 >>> 24))); - (2 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 2] = (((length >> 8 >> 0) << 24 >>> 24))); - (3 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 3] = ((length << 24 >>> 24))); - (8 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 8] = (((ticketLen >> 8 >> 0) << 24 >>> 24))); - (9 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 9] = ((ticketLen << 24 >>> 24))); - $copySlice($subslice(x, 10), m.ticket); - m.raw = x; - return x; - }; - newSessionTicketMsg.prototype.marshal = function() { return this.$val.marshal(); }; - newSessionTicketMsg.ptr.prototype.unmarshal = function(data) { - var data, length, m, ticketLen; - m = this; - m.raw = data; - if (data.$length < 10) { - return false; - } - length = (((((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >>> 0)) << 16 >>> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >>> 0)) << 8 >>> 0)) >>> 0) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >>> 0))) >>> 0; - if (!(((((data.$length >>> 0)) - 4 >>> 0) === length))) { - return false; - } - ticketLen = ((((8 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 8]) >> 0)) << 8 >> 0) + (((9 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 9]) >> 0)) >> 0; - if (!(((data.$length - 10 >> 0) === ticketLen))) { - return false; - } - m.ticket = $subslice(data, 10); - return true; - }; - newSessionTicketMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - helloRequestMsg.ptr.prototype.marshal = function() { - return new sliceType$5([0, 0, 0, 0]); - }; - helloRequestMsg.prototype.marshal = function() { return this.$val.marshal(); }; - helloRequestMsg.ptr.prototype.unmarshal = function(data) { - var data; - return data.$length === 4; - }; - helloRequestMsg.prototype.unmarshal = function(data) { return this.$val.unmarshal(data); }; - clientHandshakeStateTLS13.ptr.prototype.handshake = function() { - var {$24r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$10, err$11, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - /* */ if (c.handshakes > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (c.handshakes > 0) { */ case 1: - _r$1 = c.sendAlert(70); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: server selected TLS 1.3 in a renegotiation"); - /* } */ case 2: - /* */ if ($interfaceIsEqual(hs.ecdheParams, $ifaceNil) || !((hs.hello.keyShares.$length === 1))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(hs.ecdheParams, $ifaceNil) || !((hs.hello.keyShares.$length === 1))) { */ case 4: - _r$2 = c.sendAlert(80); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 7; case 7: return $24r; - /* } */ case 5: - _r$3 = hs.checkServerHelloOrHRR(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$4 = new crypto.Hash(hs.suite.hash).New(); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - hs.transcript = _r$4; - _r$5 = hs.hello.marshal(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = hs.transcript.Write(_r$5); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* */ if (bytes.Equal(hs.serverHello.random, helloRetryRequestRandom)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (bytes.Equal(hs.serverHello.random, helloRetryRequestRandom)) { */ case 12: - _r$7 = hs.sendDummyChangeCipherSpec(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err$1 = _r$7; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$8 = hs.processHelloRetryRequest(); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* } */ case 13: - _r$9 = hs.serverHello.marshal(); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = hs.transcript.Write(_r$9); /* */ $s = 17; case 17: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - c.buffering = true; - _r$11 = hs.processServerHello(); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$3 = _r$11; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - _r$12 = hs.sendDummyChangeCipherSpec(); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$4 = _r$12; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - _r$13 = hs.establishHandshakeKeys(); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$5 = _r$13; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - _r$14 = hs.readServerParameters(); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err$6 = _r$14; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - _r$15 = hs.readServerCertificate(); /* */ $s = 22; case 22: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err$7 = _r$15; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - _r$16 = hs.readServerFinished(); /* */ $s = 23; case 23: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - err$8 = _r$16; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - _r$17 = hs.sendClientCertificate(); /* */ $s = 24; case 24: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - err$9 = _r$17; - if (!($interfaceIsEqual(err$9, $ifaceNil))) { - $s = -1; return err$9; - } - _r$18 = hs.sendClientFinished(); /* */ $s = 25; case 25: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - err$10 = _r$18; - if (!($interfaceIsEqual(err$10, $ifaceNil))) { - $s = -1; return err$10; - } - _r$19 = c.flush(); /* */ $s = 26; case 26: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple = _r$19; - err$11 = _tuple[1]; - if (!($interfaceIsEqual(err$11, $ifaceNil))) { - $s = -1; return err$11; - } - atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$24(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 1); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.handshake, $c: true, $r, $24r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, err, err$1, err$10, err$11, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.handshake = function() { return this.$val.handshake(); }; - clientHandshakeStateTLS13.ptr.prototype.checkServerHelloOrHRR = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, hs, selectedSuite, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - /* */ if (hs.serverHello.supportedVersion === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hs.serverHello.supportedVersion === 0) { */ case 1: - _r$1 = c.sendAlert(109); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: server selected TLS 1.3 using the legacy version field"); - /* } */ case 2: - /* */ if (!((hs.serverHello.supportedVersion === 772))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((hs.serverHello.supportedVersion === 772))) { */ case 4: - _r$2 = c.sendAlert(47); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return errors.New("tls: server selected an invalid version after a HelloRetryRequest"); - /* } */ case 5: - /* */ if (!((hs.serverHello.vers === 771))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((hs.serverHello.vers === 771))) { */ case 7: - _r$3 = c.sendAlert(47); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return errors.New("tls: server sent an incorrect legacy version"); - /* } */ case 8: - /* */ if (hs.serverHello.ocspStapling || hs.serverHello.ticketSupported || hs.serverHello.secureRenegotiationSupported || !((hs.serverHello.secureRenegotiation.$length === 0)) || !((hs.serverHello.alpnProtocol.length === 0)) || !((hs.serverHello.scts.$length === 0))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (hs.serverHello.ocspStapling || hs.serverHello.ticketSupported || hs.serverHello.secureRenegotiationSupported || !((hs.serverHello.secureRenegotiation.$length === 0)) || !((hs.serverHello.alpnProtocol.length === 0)) || !((hs.serverHello.scts.$length === 0))) { */ case 10: - _r$4 = c.sendAlert(110); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return errors.New("tls: server sent a ServerHello extension forbidden in TLS 1.3"); - /* } */ case 11: - /* */ if (!bytes.Equal(hs.hello.sessionId, hs.serverHello.sessionId)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!bytes.Equal(hs.hello.sessionId, hs.serverHello.sessionId)) { */ case 13: - _r$5 = c.sendAlert(47); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return errors.New("tls: server did not echo the legacy session ID"); - /* } */ case 14: - /* */ if (!((hs.serverHello.compressionMethod === 0))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!((hs.serverHello.compressionMethod === 0))) { */ case 16: - _r$6 = c.sendAlert(47); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: server selected unsupported compression format"); - /* } */ case 17: - selectedSuite = mutualCipherSuiteTLS13(hs.hello.cipherSuites, hs.serverHello.cipherSuite); - /* */ if (!(hs.suite === ptrType$2.nil) && !(selectedSuite === hs.suite)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!(hs.suite === ptrType$2.nil) && !(selectedSuite === hs.suite)) { */ case 19: - _r$7 = c.sendAlert(47); /* */ $s = 21; case 21: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return errors.New("tls: server changed cipher suite after a HelloRetryRequest"); - /* } */ case 20: - /* */ if (selectedSuite === ptrType$2.nil) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (selectedSuite === ptrType$2.nil) { */ case 22: - _r$8 = c.sendAlert(47); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = -1; return errors.New("tls: server chose an unconfigured cipher suite"); - /* } */ case 23: - hs.suite = selectedSuite; - c.cipherSuite = hs.suite.id; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.checkServerHelloOrHRR, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, hs, selectedSuite, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.checkServerHelloOrHRR = function() { return this.$val.checkServerHelloOrHRR(); }; - clientHandshakeStateTLS13.ptr.prototype.sendDummyChangeCipherSpec = function() { - var {_r$1, _tuple, err, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - if (hs.sentDummyCCS) { - $s = -1; return $ifaceNil; - } - hs.sentDummyCCS = true; - _r$1 = hs.c.writeRecord(20, new sliceType$5([1])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.sendDummyChangeCipherSpec, $c: true, $r, _r$1, _tuple, err, hs, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.sendDummyChangeCipherSpec = function() { return this.$val.sendDummyChangeCipherSpec(); }; - clientHandshakeStateTLS13.ptr.prototype.processHelloRetryRequest = function() { - var {$24r, $24r$1, _arg, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, c, chHash, curveID, curveOK, err, err$1, err$2, err$3, hs, id, msg, ok, ok$1, params, pskBinders, pskSuite, serverHello, ticketAge, transcript, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.transcript.Sum(sliceType$5.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - chHash = _r$1; - $r = hs.transcript.Reset(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = hs.transcript.Write(new sliceType$5([254, 0, 0, ((chHash.$length << 24 >>> 24))])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = hs.transcript.Write(chHash); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = hs.serverHello.marshal(); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = hs.transcript.Write(_r$4); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* */ if ((hs.serverHello.selectedGroup === 0) && hs.serverHello.cookie === sliceType$5.nil) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((hs.serverHello.selectedGroup === 0) && hs.serverHello.cookie === sliceType$5.nil) { */ case 7: - _r$6 = c.sendAlert(47); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: server sent an unnecessary HelloRetryRequest message"); - /* } */ case 8: - if (!(hs.serverHello.cookie === sliceType$5.nil)) { - hs.hello.cookie = hs.serverHello.cookie; - } - /* */ if (!((hs.serverHello.serverShare.group === 0))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!((hs.serverHello.serverShare.group === 0))) { */ case 10: - _r$7 = c.sendAlert(50); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return errors.New("tls: received malformed key_share extension"); - /* } */ case 11: - curveID = hs.serverHello.selectedGroup; - /* */ if (!((curveID === 0))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!((curveID === 0))) { */ case 13: - curveOK = false; - _ref = hs.hello.supportedCurves; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (id === curveID) { - curveOK = true; - break; - } - _i++; - } - /* */ if (!curveOK) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!curveOK) { */ case 15: - _r$8 = c.sendAlert(47); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = -1; return errors.New("tls: server selected unsupported group"); - /* } */ case 16: - _r$9 = hs.ecdheParams.CurveID(); /* */ $s = 20; case 20: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (_r$9 === curveID) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (_r$9 === curveID) { */ case 18: - _r$10 = c.sendAlert(47); /* */ $s = 21; case 21: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return errors.New("tls: server sent an unnecessary HelloRetryRequest key_share"); - /* } */ case 19: - _r$11 = curveForCurveID(curveID); /* */ $s = 22; case 22: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple = _r$11; - ok = _tuple[1]; - /* */ if (!((curveID === 29)) && !ok) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!((curveID === 29)) && !ok) { */ case 23: - _r$12 = c.sendAlert(80); /* */ $s = 25; case 25: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - $s = -1; return errors.New("tls: CurvePreferences includes unsupported curve"); - /* } */ case 24: - _r$13 = generateECDHEParameters(c.config.rand(), curveID); /* */ $s = 26; case 26: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$1 = _r$13; - params = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 27: - _r$14 = c.sendAlert(80); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - $s = -1; return err; - /* } */ case 28: - hs.ecdheParams = params; - _r$15 = params.PublicKey(); /* */ $s = 30; case 30: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - hs.hello.keyShares = new sliceType$15([new keyShare.ptr(curveID, _r$15)]); - /* } */ case 14: - hs.hello.raw = sliceType$5.nil; - /* */ if (hs.hello.pskIdentities.$length > 0) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (hs.hello.pskIdentities.$length > 0) { */ case 31: - pskSuite = cipherSuiteTLS13ByID(hs.session.cipherSuite); - /* */ if (pskSuite === ptrType$2.nil) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (pskSuite === ptrType$2.nil) { */ case 33: - _r$16 = c.sendAlert(80); /* */ $s = 35; case 35: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r = _r$16; - $s = 36; case 36: return $24r; - /* } */ case 34: - /* */ if (pskSuite.hash === hs.suite.hash) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (pskSuite.hash === hs.suite.hash) { */ case 37: - _r$17 = c.config.time(); /* */ $s = 40; case 40: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $clone(_r$17, time.Time).Sub($clone(hs.session.receivedAt, time.Time)); /* */ $s = 41; case 41: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - ticketAge = (($div64(_r$18, new time.Duration(0, 1000000), false).$low >>> 0)); - (x = hs.hello.pskIdentities, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).obfuscatedTicketAge = ticketAge + hs.session.ageAdd >>> 0; - _r$19 = new crypto.Hash(hs.suite.hash).New(); /* */ $s = 42; case 42: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - transcript = _r$19; - _r$20 = transcript.Write(new sliceType$5([254, 0, 0, ((chHash.$length << 24 >>> 24))])); /* */ $s = 43; case 43: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - _r$21 = transcript.Write(chHash); /* */ $s = 44; case 44: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - _r$22 = hs.serverHello.marshal(); /* */ $s = 45; case 45: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = transcript.Write(_r$22); /* */ $s = 46; case 46: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$23; - _r$24 = hs.hello.marshalWithoutBinders(); /* */ $s = 47; case 47: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = transcript.Write(_r$24); /* */ $s = 48; case 48: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - _r$26 = hs.suite.finishedHash(hs.binderKey, transcript); /* */ $s = 49; case 49: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - pskBinders = new sliceType$11([_r$26]); - $r = hs.hello.updateBinders(pskBinders); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 39; continue; - /* } else { */ case 38: - hs.hello.pskIdentities = sliceType$16.nil; - hs.hello.pskBinders = sliceType$11.nil; - /* } */ case 39: - /* } */ case 32: - _r$27 = hs.hello.marshal(); /* */ $s = 51; case 51: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$28 = hs.transcript.Write(_r$27); /* */ $s = 52; case 52: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$28; - _r$29 = hs.hello.marshal(); /* */ $s = 53; case 53: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _arg = _r$29; - _r$30 = c.writeRecord(22, _arg); /* */ $s = 54; case 54: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _tuple$2 = _r$30; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$31 = c.readHandshake(); /* */ $s = 55; case 55: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _tuple$3 = _r$31; - msg = _tuple$3[0]; - err$2 = _tuple$3[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _tuple$4 = $assertType(msg, ptrType$30, true); - serverHello = _tuple$4[0]; - ok$1 = _tuple$4[1]; - /* */ if (!ok$1) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (!ok$1) { */ case 56: - _r$32 = c.sendAlert(10); /* */ $s = 58; case 58: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _r$32; - _r$33 = unexpectedMessageError(serverHello, msg); /* */ $s = 59; case 59: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - $24r$1 = _r$33; - $s = 60; case 60: return $24r$1; - /* } */ case 57: - hs.serverHello = serverHello; - _r$34 = hs.checkServerHelloOrHRR(); /* */ $s = 61; case 61: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - err$3 = _r$34; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.processHelloRetryRequest, $c: true, $r, $24r, $24r$1, _arg, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, c, chHash, curveID, curveOK, err, err$1, err$2, err$3, hs, id, msg, ok, ok$1, params, pskBinders, pskSuite, serverHello, ticketAge, transcript, x, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.processHelloRetryRequest = function() { return this.$val.processHelloRetryRequest(); }; - clientHandshakeStateTLS13.ptr.prototype.processServerHello = function() { - var {$24r, $24r$1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, hs, pskSuite, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - /* */ if (bytes.Equal(hs.serverHello.random, helloRetryRequestRandom)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (bytes.Equal(hs.serverHello.random, helloRetryRequestRandom)) { */ case 1: - _r$1 = c.sendAlert(10); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: server sent two HelloRetryRequest messages"); - /* } */ case 2: - /* */ if (!((hs.serverHello.cookie.$length === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((hs.serverHello.cookie.$length === 0))) { */ case 4: - _r$2 = c.sendAlert(110); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return errors.New("tls: server sent a cookie in a normal ServerHello"); - /* } */ case 5: - /* */ if (!((hs.serverHello.selectedGroup === 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((hs.serverHello.selectedGroup === 0))) { */ case 7: - _r$3 = c.sendAlert(50); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return errors.New("tls: malformed key_share extension"); - /* } */ case 8: - /* */ if (hs.serverHello.serverShare.group === 0) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (hs.serverHello.serverShare.group === 0) { */ case 10: - _r$4 = c.sendAlert(47); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return errors.New("tls: server did not send a key share"); - /* } */ case 11: - _r$5 = hs.ecdheParams.CurveID(); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!((hs.serverHello.serverShare.group === _r$5))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!((hs.serverHello.serverShare.group === _r$5))) { */ case 13: - _r$6 = c.sendAlert(47); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: server selected unsupported group"); - /* } */ case 14: - if (!hs.serverHello.selectedIdentityPresent) { - $s = -1; return $ifaceNil; - } - /* */ if (((hs.serverHello.selectedIdentity >> 0)) >= hs.hello.pskIdentities.$length) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (((hs.serverHello.selectedIdentity >> 0)) >= hs.hello.pskIdentities.$length) { */ case 17: - _r$7 = c.sendAlert(47); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return errors.New("tls: server selected an invalid PSK"); - /* } */ case 18: - /* */ if (!((hs.hello.pskIdentities.$length === 1)) || hs.session === ptrType$37.nil) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!((hs.hello.pskIdentities.$length === 1)) || hs.session === ptrType$37.nil) { */ case 20: - _r$8 = c.sendAlert(80); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 23; case 23: return $24r; - /* } */ case 21: - pskSuite = cipherSuiteTLS13ByID(hs.session.cipherSuite); - /* */ if (pskSuite === ptrType$2.nil) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (pskSuite === ptrType$2.nil) { */ case 24: - _r$9 = c.sendAlert(80); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$1 = _r$9; - $s = 27; case 27: return $24r$1; - /* } */ case 25: - /* */ if (!((pskSuite.hash === hs.suite.hash))) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!((pskSuite.hash === hs.suite.hash))) { */ case 28: - _r$10 = c.sendAlert(47); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return errors.New("tls: server selected an invalid PSK and cipher suite pair"); - /* } */ case 29: - hs.usingPSK = true; - c.didResume = true; - c.peerCertificates = hs.session.serverCertificates; - c.verifiedChains = hs.session.verifiedChains; - c.ocspResponse = hs.session.ocspResponse; - c.scts = hs.session.scts; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.processServerHello, $c: true, $r, $24r, $24r$1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, hs, pskSuite, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.processServerHello = function() { return this.$val.processServerHello(); }; - clientHandshakeStateTLS13.ptr.prototype.establishHandshakeKeys = function() { - var {_arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, clientSecret, earlySecret, err, handshakeSecret, hs, serverSecret, sharedKey, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.ecdheParams.SharedKey(hs.serverHello.serverShare.data); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - sharedKey = _r$1; - /* */ if (sharedKey === sliceType$5.nil) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (sharedKey === sliceType$5.nil) { */ case 2: - _r$2 = c.sendAlert(47); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return errors.New("tls: invalid server key share"); - /* } */ case 3: - earlySecret = hs.earlySecret; - /* */ if (!hs.usingPSK) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!hs.usingPSK) { */ case 5: - _r$3 = hs.suite.extract(sliceType$5.nil, sliceType$5.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - earlySecret = _r$3; - /* } */ case 6: - _arg = sharedKey; - _r$4 = hs.suite.deriveSecret(earlySecret, "derived", $ifaceNil); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = _r$4; - _r$5 = hs.suite.extract(_arg, _arg$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - handshakeSecret = _r$5; - _r$6 = hs.suite.deriveSecret(handshakeSecret, "c hs traffic", hs.transcript); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - clientSecret = _r$6; - $r = c.out.setTrafficSecret(hs.suite, clientSecret); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$7 = hs.suite.deriveSecret(handshakeSecret, "s hs traffic", hs.transcript); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - serverSecret = _r$7; - $r = c.in$27.setTrafficSecret(hs.suite, serverSecret); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$8 = c.config.writeKeyLog("CLIENT_HANDSHAKE_TRAFFIC_SECRET", hs.hello.random, clientSecret); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 15: - _r$9 = c.sendAlert(80); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = -1; return err; - /* } */ case 16: - _r$10 = c.config.writeKeyLog("SERVER_HANDSHAKE_TRAFFIC_SECRET", hs.hello.random, serverSecret); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 19: - _r$11 = c.sendAlert(80); /* */ $s = 21; case 21: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return err; - /* } */ case 20: - _arg$2 = sliceType$5.nil; - _r$12 = hs.suite.deriveSecret(handshakeSecret, "derived", $ifaceNil); /* */ $s = 22; case 22: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$3 = _r$12; - _r$13 = hs.suite.extract(_arg$2, _arg$3); /* */ $s = 23; case 23: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - hs.masterSecret = _r$13; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.establishHandshakeKeys, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, clientSecret, earlySecret, err, handshakeSecret, hs, serverSecret, sharedKey, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.establishHandshakeKeys = function() { return this.$val.establishHandshakeKeys(); }; - clientHandshakeStateTLS13.ptr.prototype.readServerParameters = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, encryptedExtensions, err, err$1, hs, msg, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = $assertType(msg, ptrType$38, true); - encryptedExtensions = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(encryptedExtensions, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$4 = encryptedExtensions.marshal(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = hs.transcript.Write(_r$4); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - err$1 = checkALPN(hs.hello.alpnProtocols, encryptedExtensions.alpnProtocol); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 9: - _r$6 = c.sendAlert(110); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return err$1; - /* } */ case 10: - c.clientProtocol = encryptedExtensions.alpnProtocol; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.readServerParameters, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, encryptedExtensions, err, err$1, hs, msg, ok, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.readServerParameters = function() { return this.$val.readServerParameters(); }; - clientHandshakeStateTLS13.ptr.prototype.readServerCertificate = function() { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c, certMsg, certReq, certVerify, err, err$1, err$2, err$3, hs, msg, ok, sigHash, sigType, signed, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - /* */ if (hs.usingPSK) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hs.usingPSK) { */ case 1: - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 3: - _r$1 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - _r$2 = c.sendAlert(42); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return err; - /* } */ case 7: - /* } */ case 4: - $s = -1; return $ifaceNil; - /* } */ case 2: - _r$3 = c.readHandshake(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - msg = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _tuple$1 = $assertType(msg, ptrType$39, true); - certReq = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (ok) { */ case 10: - _r$4 = certReq.marshal(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = hs.transcript.Write(_r$4); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - hs.certReq = certReq; - _r$6 = c.readHandshake(); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - msg = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* } */ case 11: - _tuple$3 = $assertType(msg, ptrType$27, true); - certMsg = _tuple$3[0]; - ok = _tuple$3[1]; - /* */ if (!ok) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!ok) { */ case 15: - _r$7 = c.sendAlert(10); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = unexpectedMessageError(certMsg, msg); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r = _r$8; - $s = 19; case 19: return $24r; - /* } */ case 16: - /* */ if (certMsg.certificate.Certificate.$length === 0) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (certMsg.certificate.Certificate.$length === 0) { */ case 20: - _r$9 = c.sendAlert(50); /* */ $s = 22; case 22: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = -1; return errors.New("tls: received empty certificates message"); - /* } */ case 21: - _r$10 = certMsg.marshal(); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = hs.transcript.Write(_r$10); /* */ $s = 24; case 24: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - c.scts = certMsg.certificate.SignedCertificateTimestamps; - c.ocspResponse = certMsg.certificate.OCSPStaple; - _r$12 = c.verifyServerCertificate(certMsg.certificate.Certificate); /* */ $s = 25; case 25: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$2 = _r$12; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _r$13 = c.readHandshake(); /* */ $s = 26; case 26: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$4 = _r$13; - msg = _tuple$4[0]; - err$1 = _tuple$4[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _tuple$5 = $assertType(msg, ptrType$28, true); - certVerify = _tuple$5[0]; - ok = _tuple$5[1]; - /* */ if (!ok) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!ok) { */ case 27: - _r$14 = c.sendAlert(10); /* */ $s = 29; case 29: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = unexpectedMessageError(certVerify, msg); /* */ $s = 30; case 30: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$1 = _r$15; - $s = 31; case 31: return $24r$1; - /* } */ case 28: - /* */ if (!isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms)) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!isSupportedSignatureAlgorithm(certVerify.signatureAlgorithm, supportedSignatureAlgorithms)) { */ case 32: - _r$16 = c.sendAlert(47); /* */ $s = 34; case 34: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - $s = -1; return errors.New("tls: certificate used with invalid signature algorithm"); - /* } */ case 33: - _r$17 = typeAndHashFromSignatureScheme(certVerify.signatureAlgorithm); /* */ $s = 35; case 35: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$6 = _r$17; - sigType = _tuple$6[0]; - sigHash = _tuple$6[1]; - err$1 = _tuple$6[2]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 36: - _r$18 = c.sendAlert(80); /* */ $s = 38; case 38: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$2 = _r$18; - $s = 39; case 39: return $24r$2; - /* } */ case 37: - /* */ if ((sigType === 225) || (sigHash === 3)) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if ((sigType === 225) || (sigHash === 3)) { */ case 40: - _r$19 = c.sendAlert(47); /* */ $s = 42; case 42: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - $s = -1; return errors.New("tls: certificate used with invalid signature algorithm"); - /* } */ case 41: - _r$20 = signedMessage(sigHash, "TLS 1.3, server CertificateVerify\x00", hs.transcript); /* */ $s = 43; case 43: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - signed = _r$20; - _r$21 = verifyHandshakeSignature(sigType, (x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).PublicKey, sigHash, signed, certVerify.signature); /* */ $s = 44; case 44: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - err$3 = _r$21; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 45: - _r$22 = c.sendAlert(51); /* */ $s = 47; case 47: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$22; - _r$23 = err$3.Error(); /* */ $s = 48; case 48: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$24 = errors.New("tls: invalid signature by the server certificate: " + _r$23); /* */ $s = 49; case 49: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - $24r$3 = _r$24; - $s = 50; case 50: return $24r$3; - /* } */ case 46: - _r$25 = certVerify.marshal(); /* */ $s = 51; case 51: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$26 = hs.transcript.Write(_r$25); /* */ $s = 52; case 52: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$26; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.readServerCertificate, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, c, certMsg, certReq, certVerify, err, err$1, err$2, err$3, hs, msg, ok, sigHash, sigType, signed, x, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.readServerCertificate = function() { return this.$val.readServerCertificate(); }; - clientHandshakeStateTLS13.ptr.prototype.readServerFinished = function() { - var {$24r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, err, expectedMAC, finished, hs, msg, ok, serverSecret, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = $assertType(msg, ptrType$29, true); - finished = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(finished, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$4 = hs.suite.finishedHash(c.in$27.trafficSecret, hs.transcript); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - expectedMAC = _r$4; - /* */ if (!hmac.Equal(expectedMAC, finished.verifyData)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!hmac.Equal(expectedMAC, finished.verifyData)) { */ case 8: - _r$5 = c.sendAlert(51); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return errors.New("tls: invalid server finished hash"); - /* } */ case 9: - _r$6 = finished.marshal(); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = hs.transcript.Write(_r$6); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = hs.suite.deriveSecret(hs.masterSecret, "c ap traffic", hs.transcript); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - hs.trafficSecret = _r$8; - _r$9 = hs.suite.deriveSecret(hs.masterSecret, "s ap traffic", hs.transcript); /* */ $s = 14; case 14: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - serverSecret = _r$9; - $r = c.in$27.setTrafficSecret(hs.suite, serverSecret); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$10 = c.config.writeKeyLog("CLIENT_TRAFFIC_SECRET_0", hs.hello.random, hs.trafficSecret); /* */ $s = 16; case 16: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 17: - _r$11 = c.sendAlert(80); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return err; - /* } */ case 18: - _r$12 = c.config.writeKeyLog("SERVER_TRAFFIC_SECRET_0", hs.hello.random, serverSecret); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err = _r$12; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 21: - _r$13 = c.sendAlert(80); /* */ $s = 23; case 23: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - $s = -1; return err; - /* } */ case 22: - _r$14 = hs.suite.exportKeyingMaterial(hs.masterSecret, hs.transcript); /* */ $s = 24; case 24: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - c.ekm = _r$14; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.readServerFinished, $c: true, $r, $24r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, c, err, expectedMAC, finished, hs, msg, ok, serverSecret, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.readServerFinished = function() { return this.$val.readServerFinished(); }; - clientHandshakeStateTLS13.ptr.prototype.sendClientCertificate = function() { - var {$24r, $24r$1, _arg, _arg$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, cert, certMsg, certVerifyMsg, err, err$1, err$2, hs, sig, sigHash, sigType, signOpts, signed, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - if (hs.certReq === ptrType$39.nil) { - $s = -1; return $ifaceNil; - } - _r$1 = c.getClientCertificate(new CertificateRequestInfo.ptr(hs.certReq.certificateAuthorities, hs.certReq.supportedSignatureAlgorithms, c.vers, hs.ctx)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cert = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - certMsg = new certificateMsgTLS13.ptr(sliceType$5.nil, new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), false, false); - Certificate.copy(certMsg.certificate, cert); - certMsg.scts = hs.certReq.scts && cert.SignedCertificateTimestamps.$length > 0; - certMsg.ocspStapling = hs.certReq.ocspStapling && cert.OCSPStaple.$length > 0; - _r$2 = certMsg.marshal(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = hs.transcript.Write(_r$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = certMsg.marshal(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg = _r$4; - _r$5 = c.writeRecord(22, _arg); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - if (cert.Certificate.$length === 0) { - $s = -1; return $ifaceNil; - } - certVerifyMsg = new certificateVerifyMsg.ptr(sliceType$5.nil, false, 0, sliceType$5.nil); - certVerifyMsg.hasSignatureAlgorithm = true; - _r$6 = selectSignatureScheme(c.vers, cert, hs.certReq.supportedSignatureAlgorithms); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$2 = _r$6; - certVerifyMsg.signatureAlgorithm = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - _r$7 = c.sendAlert(40); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return err; - /* } */ case 8: - _r$8 = typeAndHashFromSignatureScheme(certVerifyMsg.signatureAlgorithm); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$3 = _r$8; - sigType = _tuple$3[0]; - sigHash = _tuple$3[1]; - err = _tuple$3[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: - _r$9 = c.sendAlert(80); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r = _r$9; - $s = 14; case 14: return $24r; - /* } */ case 12: - _r$10 = signedMessage(sigHash, "TLS 1.3, client CertificateVerify\x00", hs.transcript); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - signed = _r$10; - signOpts = (new crypto.Hash(sigHash)); - if (sigType === 226) { - signOpts = new rsa.PSSOptions.ptr(-1, sigHash); - } - _r$11 = $assertType(cert.PrivateKey, crypto.Signer).Sign(c.config.rand(), signed, signOpts); /* */ $s = 16; case 16: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$4 = _r$11; - sig = _tuple$4[0]; - err = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 17: - _r$12 = c.sendAlert(80); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - _r$13 = err.Error(); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = errors.New("tls: failed to sign handshake: " + _r$13); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$1 = _r$14; - $s = 22; case 22: return $24r$1; - /* } */ case 18: - certVerifyMsg.signature = sig; - _r$15 = certVerifyMsg.marshal(); /* */ $s = 23; case 23: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = hs.transcript.Write(_r$15); /* */ $s = 24; case 24: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - _r$17 = certVerifyMsg.marshal(); /* */ $s = 25; case 25: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _arg$1 = _r$17; - _r$18 = c.writeRecord(22, _arg$1); /* */ $s = 26; case 26: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _tuple$5 = _r$18; - err$2 = _tuple$5[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.sendClientCertificate, $c: true, $r, $24r, $24r$1, _arg, _arg$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, c, cert, certMsg, certVerifyMsg, err, err$1, err$2, hs, sig, sigHash, sigType, signOpts, signed, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.sendClientCertificate = function() { return this.$val.sendClientCertificate(); }; - clientHandshakeStateTLS13.ptr.prototype.sendClientFinished = function() { - var {_arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, c, err, finished, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.suite.finishedHash(c.out.trafficSecret, hs.transcript); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - finished = new finishedMsg.ptr(sliceType$5.nil, _r$1); - _r$2 = finished.marshal(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = hs.transcript.Write(_r$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = finished.marshal(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg = _r$4; - _r$5 = c.writeRecord(22, _arg); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $r = c.out.setTrafficSecret(hs.suite, hs.trafficSecret); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!c.config.SessionTicketsDisabled && !($interfaceIsEqual(c.config.ClientSessionCache, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!c.config.SessionTicketsDisabled && !($interfaceIsEqual(c.config.ClientSessionCache, $ifaceNil))) { */ case 7: - _r$6 = hs.suite.deriveSecret(hs.masterSecret, "res master", hs.transcript); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - c.resumptionSecret = _r$6; - /* } */ case 8: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeStateTLS13.ptr.prototype.sendClientFinished, $c: true, $r, _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, c, err, finished, hs, $s};return $f; - }; - clientHandshakeStateTLS13.prototype.sendClientFinished = function() { return this.$val.sendClientFinished(); }; - Conn.ptr.prototype.handleNewSessionTicket = function(msg) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, cacheKey, cipherSuite$1, lifetime, msg, session, $s, $r, $c} = $restore(this, {msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!c.isClient) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!c.isClient) { */ case 1: - _r$1 = c.sendAlert(10); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: received new session ticket from a client"); - /* } */ case 2: - if (c.config.SessionTicketsDisabled || $interfaceIsEqual(c.config.ClientSessionCache, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - if (msg.lifetime === 0) { - $s = -1; return $ifaceNil; - } - lifetime = $mul64((new time.Duration(0, msg.lifetime)), new time.Duration(0, 1000000000)); - /* */ if ((lifetime.$high > 140815 || (lifetime.$high === 140815 && lifetime.$low > 4180213760))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((lifetime.$high > 140815 || (lifetime.$high === 140815 && lifetime.$low > 4180213760))) { */ case 4: - _r$2 = c.sendAlert(47); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return errors.New("tls: received a session ticket with invalid lifetime"); - /* } */ case 5: - cipherSuite$1 = cipherSuiteTLS13ByID(c.cipherSuite); - /* */ if (cipherSuite$1 === ptrType$2.nil || c.resumptionSecret === sliceType$5.nil) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (cipherSuite$1 === ptrType$2.nil || c.resumptionSecret === sliceType$5.nil) { */ case 7: - _r$3 = c.sendAlert(80); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 10; case 10: return $24r; - /* } */ case 8: - _r$4 = c.config.time(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = c.config.time(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, time.Time).Add(lifetime); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - session = new ClientSessionState.ptr(msg.label, c.vers, c.cipherSuite, c.resumptionSecret, c.peerCertificates, c.verifiedChains, $clone(_r$4, time.Time), c.ocspResponse, c.scts, msg.nonce, $clone(_r$6, time.Time), msg.ageAdd); - _r$7 = c.conn.RemoteAddr(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = clientSessionCacheKey(_r$7, c.config); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - cacheKey = _r$8; - $r = c.config.ClientSessionCache.Put(cacheKey, session); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.handleNewSessionTicket, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, c, cacheKey, cipherSuite$1, lifetime, msg, session, $s};return $f; - }; - Conn.prototype.handleNewSessionTicket = function(msg) { return this.$val.handleNewSessionTicket(msg); }; - Conn.ptr.prototype.makeClientHello = function() { - var {$24r, $24r$1, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, c, clientHelloVersion, config, configCipherSuites, curveID, err, err$1, hello, l, nextProtosLength, ok, params, preferenceOrder, proto, suite, suiteId, supportedVersions$1, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - config = c.config; - if ((config.ServerName.length === 0) && !config.InsecureSkipVerify) { - $s = -1; return [ptrType$26.nil, $ifaceNil, errors.New("tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config")]; - } - nextProtosLength = 0; - _ref = config.NextProtos; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - proto = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - l = proto.length; - if ((l === 0) || l > 255) { - $s = -1; return [ptrType$26.nil, $ifaceNil, errors.New("tls: invalid NextProtos value")]; - } else { - nextProtosLength = nextProtosLength + ((1 + l >> 0)) >> 0; - } - _i++; - } - if (nextProtosLength > 65535) { - $s = -1; return [ptrType$26.nil, $ifaceNil, errors.New("tls: NextProtos values too large")]; - } - supportedVersions$1 = config.supportedVersions(true); - if (supportedVersions$1.$length === 0) { - $s = -1; return [ptrType$26.nil, $ifaceNil, errors.New("tls: no supported versions satisfy MinVersion and MaxVersion")]; - } - clientHelloVersion = config.maxSupportedVersion(true); - if (clientHelloVersion > 771) { - clientHelloVersion = 771; - } - hello = new clientHelloMsg.ptr(sliceType$5.nil, clientHelloVersion, $makeSlice(sliceType$5, 32), $makeSlice(sliceType$5, 32), sliceType$2.nil, new sliceType$5([0]), hostnameInSNI(config.ServerName), true, config.curvePreferences(), new sliceType$5([0]), false, sliceType$5.nil, sliceType$7.nil, sliceType$7.nil, true, sliceType$5.nil, config.NextProtos, true, supportedVersions$1, sliceType$5.nil, sliceType$15.nil, false, sliceType$5.nil, sliceType$16.nil, sliceType$11.nil); - if (c.handshakes > 0) { - hello.secureRenegotiation = new sliceType$5(c.clientFinished); - } - preferenceOrder = cipherSuitesPreferenceOrder; - if (!hasAESGCMHardwareSupport) { - preferenceOrder = cipherSuitesPreferenceOrderNoAES; - } - configCipherSuites = config.cipherSuites(); - hello.cipherSuites = $makeSlice(sliceType$2, 0, configCipherSuites.$length); - _ref$1 = preferenceOrder; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - suiteId = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - suite = mutualCipherSuite(configCipherSuites, suiteId); - if (suite === ptrType$3.nil) { - _i$1++; - continue; - } - if (hello.vers < 771 && !(((suite.flags & 4) === 0))) { - _i$1++; - continue; - } - hello.cipherSuites = $append(hello.cipherSuites, suiteId); - _i$1++; - } - _r$1 = io.ReadFull(config.rand(), hello.random); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$2 = err.Error(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = errors.New("tls: short read from Rand: " + _r$2); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [ptrType$26.nil, $ifaceNil, _r$3]; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$4 = io.ReadFull(config.rand(), hello.sessionId); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: - _r$5 = err$1.Error(); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = errors.New("tls: short read from Rand: " + _r$5); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = [ptrType$26.nil, $ifaceNil, _r$6]; - $s = 12; case 12: return $24r$1; - /* } */ case 9: - if (hello.vers >= 771) { - hello.supportedSignatureAlgorithms = supportedSignatureAlgorithms; - } - params = $ifaceNil; - /* */ if ((x = hello.supportedVersions, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 772) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ((x = hello.supportedVersions, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 772) { */ case 13: - if (hasAESGCMHardwareSupport) { - hello.cipherSuites = $appendSlice(hello.cipherSuites, defaultCipherSuitesTLS13); - } else { - hello.cipherSuites = $appendSlice(hello.cipherSuites, defaultCipherSuitesTLS13NoAES); - } - curveID = (x$1 = config.curvePreferences(), (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - _r$7 = curveForCurveID(curveID); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - ok = _tuple$2[1]; - if (!((curveID === 29)) && !ok) { - $s = -1; return [ptrType$26.nil, $ifaceNil, errors.New("tls: CurvePreferences includes unsupported curve")]; - } - _r$8 = generateECDHEParameters(config.rand(), curveID); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$3 = _r$8; - params = _tuple$3[0]; - err = _tuple$3[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$26.nil, $ifaceNil, err]; - } - _r$9 = params.PublicKey(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - hello.keyShares = new sliceType$15([new keyShare.ptr(curveID, _r$9)]); - /* } */ case 14: - $s = -1; return [hello, params, $ifaceNil]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.makeClientHello, $c: true, $r, $24r, $24r$1, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, c, clientHelloVersion, config, configCipherSuites, curveID, err, err$1, hello, l, nextProtosLength, ok, params, preferenceOrder, proto, suite, suiteId, supportedVersions$1, x, x$1, $s};return $f; - }; - Conn.prototype.makeClientHello = function() { return this.$val.makeClientHello(); }; - Conn.ptr.prototype.clientHandshake = function(ctx) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _arg, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, binderKey, c, cacheKey, ctx, earlySecret, ecdheParams, err, err$1, err$2, err$3, hello, hs, hs$1, maxVers, msg, ok, serverHello, session, tls11Downgrade, tls12Downgrade, $s, $deferred, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = [c]; - cacheKey = [cacheKey]; - err = [err]; - err[0] = $ifaceNil; - c[0] = this; - if (c[0].config === ptrType$4.nil) { - c[0].config = defaultConfig(); - } - c[0].didResume = false; - _r$1 = c[0].makeClientHello(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - hello = _tuple[0]; - ecdheParams = _tuple[1]; - err[0] = _tuple[2]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 2: - err[0] = err[0]; - $24r = err[0]; - $s = 4; case 4: return $24r; - /* } */ case 3: - c[0].serverName = hello.serverName; - _r$2 = c[0].loadSession(hello); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - cacheKey[0] = _tuple$1[0]; - session = _tuple$1[1]; - earlySecret = _tuple$1[2]; - binderKey = _tuple$1[3]; - /* */ if (!(cacheKey[0] === "") && !(session === ptrType$37.nil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(cacheKey[0] === "") && !(session === ptrType$37.nil)) { */ case 6: - $deferred.push([(function(c, cacheKey, err) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 1: - $r = c[0].config.ClientSessionCache.Put(cacheKey[0], ptrType$37.nil); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(c, cacheKey, err), []]); - /* } */ case 7: - _r$3 = hello.marshal(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg = _r$3; - _r$4 = c[0].writeRecord(22, _arg); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - err$1 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 10: - err[0] = err$1; - $24r$1 = err[0]; - $s = 12; case 12: return $24r$1; - /* } */ case 11: - _r$5 = c[0].readHandshake(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - msg = _tuple$3[0]; - err[0] = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 14: - err[0] = err[0]; - $24r$2 = err[0]; - $s = 16; case 16: return $24r$2; - /* } */ case 15: - _tuple$4 = $assertType(msg, ptrType$30, true); - serverHello = _tuple$4[0]; - ok = _tuple$4[1]; - /* */ if (!ok) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!ok) { */ case 17: - _r$6 = c[0].sendAlert(10); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = unexpectedMessageError(serverHello, msg); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err[0] = _r$7; - $24r$3 = err[0]; - $s = 21; case 21: return $24r$3; - /* } */ case 18: - _r$8 = c[0].pickTLSVersion(serverHello); /* */ $s = 22; case 22: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 23: - err[0] = err$2; - $24r$4 = err[0]; - $s = 25; case 25: return $24r$4; - /* } */ case 24: - maxVers = c[0].config.maxSupportedVersion(true); - tls12Downgrade = ($bytesToString($subslice(serverHello.random, 24))) === "DOWNGRD\x01"; - tls11Downgrade = ($bytesToString($subslice(serverHello.random, 24))) === "DOWNGRD\x00"; - /* */ if ((maxVers === 772) && c[0].vers <= 771 && (tls12Downgrade || tls11Downgrade) || (maxVers === 771) && c[0].vers <= 770 && tls11Downgrade) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ((maxVers === 772) && c[0].vers <= 771 && (tls12Downgrade || tls11Downgrade) || (maxVers === 771) && c[0].vers <= 770 && tls11Downgrade) { */ case 26: - _r$9 = c[0].sendAlert(47); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - err[0] = errors.New("tls: downgrade attempt detected, possibly due to a MitM attack or a broken middlebox"); - $24r$5 = err[0]; - $s = 29; case 29: return $24r$5; - /* } */ case 27: - /* */ if (c[0].vers === 772) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (c[0].vers === 772) { */ case 30: - hs = new clientHandshakeStateTLS13.ptr(c[0], ctx, serverHello, hello, ecdheParams, session, earlySecret, binderKey, ptrType$39.nil, false, false, ptrType$2.nil, $ifaceNil, sliceType$5.nil, sliceType$5.nil); - _r$10 = hs.handshake(); /* */ $s = 32; case 32: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err[0] = _r$10; - $24r$6 = err[0]; - $s = 33; case 33: return $24r$6; - /* } */ case 31: - hs$1 = new clientHandshakeState.ptr(c[0], ctx, serverHello, hello, ptrType$3.nil, new finishedHash.ptr($ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, sliceType$5.nil, 0, $throwNilPointerError), sliceType$5.nil, session); - _r$11 = hs$1.handshake(); /* */ $s = 34; case 34: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$3 = _r$11; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 35: - err[0] = err$3; - $24r$7 = err[0]; - $s = 37; case 37: return $24r$7; - /* } */ case 36: - /* */ if (!(cacheKey[0] === "") && !(hs$1.session === ptrType$37.nil) && !(session === hs$1.session)) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (!(cacheKey[0] === "") && !(hs$1.session === ptrType$37.nil) && !(session === hs$1.session)) { */ case 38: - $r = c[0].config.ClientSessionCache.Put(cacheKey[0], hs$1.session); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 39: - err[0] = $ifaceNil; - $24r$8 = err[0]; - $s = 41; case 41: return $24r$8; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.clientHandshake, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _arg, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, binderKey, c, cacheKey, ctx, earlySecret, ecdheParams, err, err$1, err$2, err$3, hello, hs, hs$1, maxVers, msg, ok, serverHello, session, tls11Downgrade, tls12Downgrade, $s, $deferred};return $f; } } - }; - Conn.prototype.clientHandshake = function(ctx) { return this.$val.clientHandshake(ctx); }; - Conn.ptr.prototype.loadSession = function(hello) { - var {_i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, binderKey, c, cacheKey, cipherSuite$1, cipherSuiteOk, earlySecret, err, hello, identity, offeredID, offeredSuite, ok, psk, pskBinders, serverCert, session, ticketAge, transcript, v, versOk, x, x$1, $s, $r, $c} = $restore(this, {hello}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cacheKey = ""; - session = ptrType$37.nil; - earlySecret = sliceType$5.nil; - binderKey = sliceType$5.nil; - c = this; - if (c.config.SessionTicketsDisabled || $interfaceIsEqual(c.config.ClientSessionCache, $ifaceNil)) { - _tmp = ""; - _tmp$1 = ptrType$37.nil; - _tmp$2 = sliceType$5.nil; - _tmp$3 = sliceType$5.nil; - cacheKey = _tmp; - session = _tmp$1; - earlySecret = _tmp$2; - binderKey = _tmp$3; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - hello.ticketSupported = true; - if ((x = hello.supportedVersions, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === 772) { - hello.pskModes = new sliceType$5([1]); - } - if (!((c.handshakes === 0))) { - _tmp$4 = ""; - _tmp$5 = ptrType$37.nil; - _tmp$6 = sliceType$5.nil; - _tmp$7 = sliceType$5.nil; - cacheKey = _tmp$4; - session = _tmp$5; - earlySecret = _tmp$6; - binderKey = _tmp$7; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - _r$1 = c.conn.RemoteAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = clientSessionCacheKey(_r$1, c.config); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - cacheKey = _r$2; - _r$3 = c.config.ClientSessionCache.Get(cacheKey); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - session = _tuple[0]; - ok = _tuple[1]; - if (!ok || session === ptrType$37.nil) { - _tmp$8 = cacheKey; - _tmp$9 = ptrType$37.nil; - _tmp$10 = sliceType$5.nil; - _tmp$11 = sliceType$5.nil; - cacheKey = _tmp$8; - session = _tmp$9; - earlySecret = _tmp$10; - binderKey = _tmp$11; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - versOk = false; - _ref = hello.supportedVersions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v === session.vers) { - versOk = true; - break; - } - _i++; - } - if (!versOk) { - _tmp$12 = cacheKey; - _tmp$13 = ptrType$37.nil; - _tmp$14 = sliceType$5.nil; - _tmp$15 = sliceType$5.nil; - cacheKey = _tmp$12; - session = _tmp$13; - earlySecret = _tmp$14; - binderKey = _tmp$15; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - /* */ if (!c.config.InsecureSkipVerify) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!c.config.InsecureSkipVerify) { */ case 4: - if (session.verifiedChains.$length === 0) { - _tmp$16 = cacheKey; - _tmp$17 = ptrType$37.nil; - _tmp$18 = sliceType$5.nil; - _tmp$19 = sliceType$5.nil; - cacheKey = _tmp$16; - session = _tmp$17; - earlySecret = _tmp$18; - binderKey = _tmp$19; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - serverCert = (x$1 = session.serverCertificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])); - _r$4 = c.config.time(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $clone(_r$4, time.Time).After($clone(serverCert.NotAfter, time.Time)); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$5) { */ case 6: - $r = c.config.ClientSessionCache.Put(cacheKey, ptrType$37.nil); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$20 = cacheKey; - _tmp$21 = ptrType$37.nil; - _tmp$22 = sliceType$5.nil; - _tmp$23 = sliceType$5.nil; - cacheKey = _tmp$20; - session = _tmp$21; - earlySecret = _tmp$22; - binderKey = _tmp$23; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - /* } */ case 7: - err = serverCert.VerifyHostname(c.config.ServerName); - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$24 = cacheKey; - _tmp$25 = ptrType$37.nil; - _tmp$26 = sliceType$5.nil; - _tmp$27 = sliceType$5.nil; - cacheKey = _tmp$24; - session = _tmp$25; - earlySecret = _tmp$26; - binderKey = _tmp$27; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - /* } */ case 5: - if (!((session.vers === 772))) { - if (mutualCipherSuite(hello.cipherSuites, session.cipherSuite) === ptrType$3.nil) { - _tmp$28 = cacheKey; - _tmp$29 = ptrType$37.nil; - _tmp$30 = sliceType$5.nil; - _tmp$31 = sliceType$5.nil; - cacheKey = _tmp$28; - session = _tmp$29; - earlySecret = _tmp$30; - binderKey = _tmp$31; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - hello.sessionTicket = session.sessionTicket; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - _r$6 = c.config.time(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $clone(_r$6, time.Time).After($clone(session.useBy, time.Time)); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (_r$7) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$7) { */ case 11: - $r = c.config.ClientSessionCache.Put(cacheKey, ptrType$37.nil); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$32 = cacheKey; - _tmp$33 = ptrType$37.nil; - _tmp$34 = sliceType$5.nil; - _tmp$35 = sliceType$5.nil; - cacheKey = _tmp$32; - session = _tmp$33; - earlySecret = _tmp$34; - binderKey = _tmp$35; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - /* } */ case 12: - cipherSuite$1 = cipherSuiteTLS13ByID(session.cipherSuite); - if (cipherSuite$1 === ptrType$2.nil) { - _tmp$36 = cacheKey; - _tmp$37 = ptrType$37.nil; - _tmp$38 = sliceType$5.nil; - _tmp$39 = sliceType$5.nil; - cacheKey = _tmp$36; - session = _tmp$37; - earlySecret = _tmp$38; - binderKey = _tmp$39; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - cipherSuiteOk = false; - _ref$1 = hello.cipherSuites; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - offeredID = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - offeredSuite = cipherSuiteTLS13ByID(offeredID); - if (!(offeredSuite === ptrType$2.nil) && (offeredSuite.hash === cipherSuite$1.hash)) { - cipherSuiteOk = true; - break; - } - _i$1++; - } - if (!cipherSuiteOk) { - _tmp$40 = cacheKey; - _tmp$41 = ptrType$37.nil; - _tmp$42 = sliceType$5.nil; - _tmp$43 = sliceType$5.nil; - cacheKey = _tmp$40; - session = _tmp$41; - earlySecret = _tmp$42; - binderKey = _tmp$43; - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - } - _r$8 = c.config.time(); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, time.Time).Sub($clone(session.receivedAt, time.Time)); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - ticketAge = (($div64(_r$9, new time.Duration(0, 1000000), false).$low >>> 0)); - identity = new pskIdentity.ptr(session.sessionTicket, ticketAge + session.ageAdd >>> 0); - hello.pskIdentities = new sliceType$16([$clone(identity, pskIdentity)]); - hello.pskBinders = new sliceType$11([$makeSlice(sliceType$5, new crypto.Hash(cipherSuite$1.hash).Size())]); - _r$10 = cipherSuite$1.expandLabel(session.masterSecret, "resumption", session.nonce, new crypto.Hash(cipherSuite$1.hash).Size()); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - psk = _r$10; - _r$11 = cipherSuite$1.extract(psk, sliceType$5.nil); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - earlySecret = _r$11; - _r$12 = cipherSuite$1.deriveSecret(earlySecret, "res binder", $ifaceNil); /* */ $s = 20; case 20: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - binderKey = _r$12; - _r$13 = new crypto.Hash(cipherSuite$1.hash).New(); /* */ $s = 21; case 21: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - transcript = _r$13; - _r$14 = hello.marshalWithoutBinders(); /* */ $s = 22; case 22: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = transcript.Write(_r$14); /* */ $s = 23; case 23: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - _r$16 = cipherSuite$1.finishedHash(binderKey, transcript); /* */ $s = 24; case 24: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - pskBinders = new sliceType$11([_r$16]); - $r = hello.updateBinders(pskBinders); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [cacheKey, session, earlySecret, binderKey]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.loadSession, $c: true, $r, _i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$30, _tmp$31, _tmp$32, _tmp$33, _tmp$34, _tmp$35, _tmp$36, _tmp$37, _tmp$38, _tmp$39, _tmp$4, _tmp$40, _tmp$41, _tmp$42, _tmp$43, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, binderKey, c, cacheKey, cipherSuite$1, cipherSuiteOk, earlySecret, err, hello, identity, offeredID, offeredSuite, ok, psk, pskBinders, serverCert, session, ticketAge, transcript, v, versOk, x, x$1, $s};return $f; - }; - Conn.prototype.loadSession = function(hello) { return this.$val.loadSession(hello); }; - Conn.ptr.prototype.pickTLSVersion = function(serverHello) { - var {$24r, _r$1, _r$2, _tuple, c, ok, peerVersion, serverHello, vers, $s, $r, $c} = $restore(this, {serverHello}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - peerVersion = serverHello.vers; - if (!((serverHello.supportedVersion === 0))) { - peerVersion = serverHello.supportedVersion; - } - _tuple = c.config.mutualVersion(true, new sliceType$2([peerVersion])); - vers = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r$1 = c.sendAlert(70); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = fmt.Errorf("tls: server selected unsupported protocol version %x", new sliceType$6([new $Uint16(peerVersion)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 2: - c.vers = vers; - c.haveVers = true; - c.in$27.version = vers; - c.out.version = vers; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.pickTLSVersion, $c: true, $r, $24r, _r$1, _r$2, _tuple, c, ok, peerVersion, serverHello, vers, $s};return $f; - }; - Conn.prototype.pickTLSVersion = function(serverHello) { return this.$val.pickTLSVersion(serverHello); }; - clientHandshakeState.ptr.prototype.handshake = function() { - var {_r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, err, err$1, err$10, err$11, err$12, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, isResume, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.processServerHello(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - isResume = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = newFinishedHash(c.vers, hs.suite); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - finishedHash.copy(hs.finishedHash, _r$2); - if (isResume || ((c.config.Certificates.$length === 0) && c.config.GetClientCertificate === $throwNilPointerError)) { - hs.finishedHash.discardHandshakeBuffer(); - } - _r$3 = hs.hello.marshal(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = hs.finishedHash.Write(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = hs.serverHello.marshal(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = hs.finishedHash.Write(_r$5); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - c.buffering = true; - c.didResume = isResume; - /* */ if (isResume) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (isResume) { */ case 7: - _r$7 = hs.establishKeys(); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err$1 = _r$7; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$8 = hs.readSessionTicket(); /* */ $s = 11; case 11: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _r$9 = hs.readFinished(new sliceType$5(c.serverFinished)); /* */ $s = 12; case 12: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$3 = _r$9; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - c.clientFinishedIsFirst = false; - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 13: - _r$10 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 15; case 15: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$4 = _r$10; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 16: - _r$11 = c.sendAlert(42); /* */ $s = 18; case 18: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return err$4; - /* } */ case 17: - /* } */ case 14: - _r$12 = hs.sendFinished(new sliceType$5(c.clientFinished)); /* */ $s = 19; case 19: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$5 = _r$12; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - _r$13 = c.flush(); /* */ $s = 20; case 20: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tuple$1 = _r$13; - err$6 = _tuple$1[1]; - if (!($interfaceIsEqual(err$6, $ifaceNil))) { - $s = -1; return err$6; - } - $s = 9; continue; - /* } else { */ case 8: - _r$14 = hs.doFullHandshake(); /* */ $s = 21; case 21: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err$7 = _r$14; - if (!($interfaceIsEqual(err$7, $ifaceNil))) { - $s = -1; return err$7; - } - _r$15 = hs.establishKeys(); /* */ $s = 22; case 22: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err$8 = _r$15; - if (!($interfaceIsEqual(err$8, $ifaceNil))) { - $s = -1; return err$8; - } - _r$16 = hs.sendFinished(new sliceType$5(c.clientFinished)); /* */ $s = 23; case 23: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - err$9 = _r$16; - if (!($interfaceIsEqual(err$9, $ifaceNil))) { - $s = -1; return err$9; - } - _r$17 = c.flush(); /* */ $s = 24; case 24: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _tuple$2 = _r$17; - err$10 = _tuple$2[1]; - if (!($interfaceIsEqual(err$10, $ifaceNil))) { - $s = -1; return err$10; - } - c.clientFinishedIsFirst = true; - _r$18 = hs.readSessionTicket(); /* */ $s = 25; case 25: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - err$11 = _r$18; - if (!($interfaceIsEqual(err$11, $ifaceNil))) { - $s = -1; return err$11; - } - _r$19 = hs.readFinished(new sliceType$5(c.serverFinished)); /* */ $s = 26; case 26: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - err$12 = _r$19; - if (!($interfaceIsEqual(err$12, $ifaceNil))) { - $s = -1; return err$12; - } - /* } */ case 9: - c.ekm = ekmFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.hello.random, hs.serverHello.random); - atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$24(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 1); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.handshake, $c: true, $r, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, c, err, err$1, err$10, err$11, err$12, err$2, err$3, err$4, err$5, err$6, err$7, err$8, err$9, hs, isResume, $s};return $f; - }; - clientHandshakeState.prototype.handshake = function() { return this.$val.handshake(); }; - clientHandshakeState.ptr.prototype.pickCipherSuite = function() { - var {_r$1, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - hs.suite = mutualCipherSuite(hs.hello.cipherSuites, hs.serverHello.cipherSuite); - /* */ if (hs.suite === ptrType$3.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hs.suite === ptrType$3.nil) { */ case 1: - _r$1 = hs.c.sendAlert(40); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return errors.New("tls: server chose an unconfigured cipher suite"); - /* } */ case 2: - hs.c.cipherSuite = hs.suite.id; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.pickCipherSuite, $c: true, $r, _r$1, hs, $s};return $f; - }; - clientHandshakeState.prototype.pickCipherSuite = function() { return this.$val.pickCipherSuite(); }; - clientHandshakeState.ptr.prototype.doFullHandshake = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, c, certMsg, certReq, certRequested, certVerify, chainToSend, ckx, cri, cs, err, err$1, err$2, err$3, err$4, err$5, err$6, hs, key, keyAgreement$1, msg, ok, ok$1, preMasterSecret, shd, sigHash, sigType, signOpts, signatureAlgorithm, signed, skx, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = $assertType(msg, ptrType$34, true); - certMsg = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok || (certMsg.certificates.$length === 0)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok || (certMsg.certificates.$length === 0)) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(certMsg, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$4 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = c.readHandshake(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - msg = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$3 = $assertType(msg, ptrType$40, true); - cs = _tuple$3[0]; - ok = _tuple$3[1]; - /* */ if (ok) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (ok) { */ case 9: - /* */ if (!hs.serverHello.ocspStapling) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!hs.serverHello.ocspStapling) { */ case 11: - _r$6 = c.sendAlert(10); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: received unexpected CertificateStatus message"); - /* } */ case 12: - _r$7 = cs.marshal(); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = hs.finishedHash.Write(_r$7); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - c.ocspResponse = cs.response; - _r$9 = c.readHandshake(); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$4 = _r$9; - msg = _tuple$4[0]; - err = _tuple$4[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 10: - /* */ if (c.handshakes === 0) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (c.handshakes === 0) { */ case 17: - _r$10 = c.verifyServerCertificate(certMsg.certificates); /* */ $s = 20; case 20: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$1 = _r$10; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 19; continue; - /* } else { */ case 18: - /* */ if (!bytes.Equal((x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).Raw, (x$1 = certMsg.certificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!bytes.Equal((x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).Raw, (x$1 = certMsg.certificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])))) { */ case 21: - _r$11 = c.sendAlert(42); /* */ $s = 23; case 23: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return errors.New("tls: server's identity changed during renegotiation"); - /* } */ case 22: - /* } */ case 19: - _r$12 = hs.suite.ka(c.vers); /* */ $s = 24; case 24: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - keyAgreement$1 = _r$12; - _tuple$5 = $assertType(msg, ptrType$22, true); - skx = _tuple$5[0]; - ok = _tuple$5[1]; - /* */ if (ok) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (ok) { */ case 25: - _r$13 = hs.finishedHash.Write(skx.marshal()); /* */ $s = 27; case 27: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - _r$14 = keyAgreement$1.processServerKeyExchange(c.config, hs.hello, hs.serverHello, (x$2 = c.peerCertificates, (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), skx); /* */ $s = 28; case 28: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err = _r$14; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 29: - _r$15 = c.sendAlert(10); /* */ $s = 31; case 31: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - $s = -1; return err; - /* } */ case 30: - _r$16 = c.readHandshake(); /* */ $s = 32; case 32: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$6 = _r$16; - msg = _tuple$6[0]; - err = _tuple$6[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 26: - chainToSend = ptrType$31.nil; - certRequested = false; - _tuple$7 = $assertType(msg, ptrType$33, true); - certReq = _tuple$7[0]; - ok = _tuple$7[1]; - /* */ if (ok) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (ok) { */ case 33: - certRequested = true; - _r$17 = hs.finishedHash.Write(certReq.marshal()); /* */ $s = 35; case 35: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - _r$18 = certificateRequestInfoFromMsg(hs.ctx, c.vers, certReq); /* */ $s = 36; case 36: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - cri = _r$18; - _r$19 = c.getClientCertificate(cri); /* */ $s = 37; case 37: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple$8 = _r$19; - chainToSend = _tuple$8[0]; - err = _tuple$8[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 38: - _r$20 = c.sendAlert(80); /* */ $s = 40; case 40: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - $s = -1; return err; - /* } */ case 39: - _r$21 = c.readHandshake(); /* */ $s = 41; case 41: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _tuple$9 = _r$21; - msg = _tuple$9[0]; - err = _tuple$9[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 34: - _tuple$10 = $assertType(msg, ptrType$41, true); - shd = _tuple$10[0]; - ok = _tuple$10[1]; - /* */ if (!ok) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (!ok) { */ case 42: - _r$22 = c.sendAlert(10); /* */ $s = 44; case 44: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$22; - _r$23 = unexpectedMessageError(shd, msg); /* */ $s = 45; case 45: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$1 = _r$23; - $s = 46; case 46: return $24r$1; - /* } */ case 43: - _r$24 = hs.finishedHash.Write(shd.marshal()); /* */ $s = 47; case 47: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$24; - /* */ if (certRequested) { $s = 48; continue; } - /* */ $s = 49; continue; - /* if (certRequested) { */ case 48: - certMsg = new certificateMsg.ptr(sliceType$5.nil, sliceType$11.nil); - certMsg.certificates = chainToSend.Certificate; - _r$25 = hs.finishedHash.Write(certMsg.marshal()); /* */ $s = 50; case 50: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _r$25; - _r$26 = c.writeRecord(22, certMsg.marshal()); /* */ $s = 51; case 51: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _tuple$11 = _r$26; - err$2 = _tuple$11[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* } */ case 49: - _r$27 = keyAgreement$1.generateClientKeyExchange(c.config, hs.hello, (x$3 = c.peerCertificates, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0]))); /* */ $s = 52; case 52: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _tuple$12 = _r$27; - preMasterSecret = _tuple$12[0]; - ckx = _tuple$12[1]; - err = _tuple$12[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 53: - _r$28 = c.sendAlert(80); /* */ $s = 55; case 55: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _r$28; - $s = -1; return err; - /* } */ case 54: - /* */ if (!(ckx === ptrType$23.nil)) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (!(ckx === ptrType$23.nil)) { */ case 56: - _r$29 = hs.finishedHash.Write(ckx.marshal()); /* */ $s = 58; case 58: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$29; - _r$30 = c.writeRecord(22, ckx.marshal()); /* */ $s = 59; case 59: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _tuple$13 = _r$30; - err$3 = _tuple$13[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - /* } */ case 57: - /* */ if (!(chainToSend === ptrType$31.nil) && chainToSend.Certificate.$length > 0) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (!(chainToSend === ptrType$31.nil) && chainToSend.Certificate.$length > 0) { */ case 60: - certVerify = new certificateVerifyMsg.ptr(sliceType$5.nil, false, 0, sliceType$5.nil); - _tuple$14 = $assertType(chainToSend.PrivateKey, crypto.Signer, true); - key = _tuple$14[0]; - ok$1 = _tuple$14[1]; - /* */ if (!ok$1) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (!ok$1) { */ case 62: - _r$31 = c.sendAlert(80); /* */ $s = 64; case 64: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$31; - _r$32 = fmt.Errorf("tls: client certificate private key of type %T does not implement crypto.Signer", new sliceType$6([chainToSend.PrivateKey])); /* */ $s = 65; case 65: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - $24r$2 = _r$32; - $s = 66; case 66: return $24r$2; - /* } */ case 63: - sigType = 0; - sigHash = 0; - /* */ if (c.vers >= 771) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if (c.vers >= 771) { */ case 67: - _r$33 = selectSignatureScheme(c.vers, chainToSend, certReq.supportedSignatureAlgorithms); /* */ $s = 70; case 70: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _tuple$15 = _r$33; - signatureAlgorithm = _tuple$15[0]; - err$4 = _tuple$15[1]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 71; continue; } - /* */ $s = 72; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 71: - _r$34 = c.sendAlert(47); /* */ $s = 73; case 73: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - _r$34; - $s = -1; return err$4; - /* } */ case 72: - _r$35 = typeAndHashFromSignatureScheme(signatureAlgorithm); /* */ $s = 74; case 74: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - _tuple$16 = _r$35; - sigType = _tuple$16[0]; - sigHash = _tuple$16[1]; - err$4 = _tuple$16[2]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 75; continue; } - /* */ $s = 76; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 75: - _r$36 = c.sendAlert(80); /* */ $s = 77; case 77: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - $24r$3 = _r$36; - $s = 78; case 78: return $24r$3; - /* } */ case 76: - certVerify.hasSignatureAlgorithm = true; - certVerify.signatureAlgorithm = signatureAlgorithm; - $s = 69; continue; - /* } else { */ case 68: - _r$37 = key.Public(); /* */ $s = 79; case 79: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - _r$38 = legacyTypeAndHashFromPublicKey(_r$37); /* */ $s = 80; case 80: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _tuple$17 = _r$38; - sigType = _tuple$17[0]; - sigHash = _tuple$17[1]; - err = _tuple$17[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 81; continue; } - /* */ $s = 82; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 81: - _r$39 = c.sendAlert(47); /* */ $s = 83; case 83: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$39; - $s = -1; return err; - /* } */ case 82: - /* } */ case 69: - _r$40 = $clone(hs.finishedHash, finishedHash).hashForClientCertificate(sigType, sigHash, hs.masterSecret); /* */ $s = 84; case 84: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - signed = _r$40; - signOpts = (new crypto.Hash(sigHash)); - if (sigType === 226) { - signOpts = new rsa.PSSOptions.ptr(-1, sigHash); - } - _r$41 = key.Sign(c.config.rand(), signed, signOpts); /* */ $s = 85; case 85: if($c) { $c = false; _r$41 = _r$41.$blk(); } if (_r$41 && _r$41.$blk !== undefined) { break s; } - _tuple$18 = _r$41; - certVerify.signature = _tuple$18[0]; - err = _tuple$18[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 86; continue; } - /* */ $s = 87; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 86: - _r$42 = c.sendAlert(80); /* */ $s = 88; case 88: if($c) { $c = false; _r$42 = _r$42.$blk(); } if (_r$42 && _r$42.$blk !== undefined) { break s; } - _r$42; - $s = -1; return err; - /* } */ case 87: - _r$43 = certVerify.marshal(); /* */ $s = 89; case 89: if($c) { $c = false; _r$43 = _r$43.$blk(); } if (_r$43 && _r$43.$blk !== undefined) { break s; } - _r$44 = hs.finishedHash.Write(_r$43); /* */ $s = 90; case 90: if($c) { $c = false; _r$44 = _r$44.$blk(); } if (_r$44 && _r$44.$blk !== undefined) { break s; } - _r$44; - _r$45 = certVerify.marshal(); /* */ $s = 91; case 91: if($c) { $c = false; _r$45 = _r$45.$blk(); } if (_r$45 && _r$45.$blk !== undefined) { break s; } - _arg = _r$45; - _r$46 = c.writeRecord(22, _arg); /* */ $s = 92; case 92: if($c) { $c = false; _r$46 = _r$46.$blk(); } if (_r$46 && _r$46.$blk !== undefined) { break s; } - _tuple$19 = _r$46; - err$5 = _tuple$19[1]; - if (!($interfaceIsEqual(err$5, $ifaceNil))) { - $s = -1; return err$5; - } - /* } */ case 61: - _r$47 = masterFromPreMasterSecret(c.vers, hs.suite, preMasterSecret, hs.hello.random, hs.serverHello.random); /* */ $s = 93; case 93: if($c) { $c = false; _r$47 = _r$47.$blk(); } if (_r$47 && _r$47.$blk !== undefined) { break s; } - hs.masterSecret = _r$47; - _r$48 = c.config.writeKeyLog("CLIENT_RANDOM", hs.hello.random, hs.masterSecret); /* */ $s = 94; case 94: if($c) { $c = false; _r$48 = _r$48.$blk(); } if (_r$48 && _r$48.$blk !== undefined) { break s; } - err$6 = _r$48; - /* */ if (!($interfaceIsEqual(err$6, $ifaceNil))) { $s = 95; continue; } - /* */ $s = 96; continue; - /* if (!($interfaceIsEqual(err$6, $ifaceNil))) { */ case 95: - _r$49 = c.sendAlert(80); /* */ $s = 97; case 97: if($c) { $c = false; _r$49 = _r$49.$blk(); } if (_r$49 && _r$49.$blk !== undefined) { break s; } - _r$49; - _r$50 = err$6.Error(); /* */ $s = 98; case 98: if($c) { $c = false; _r$50 = _r$50.$blk(); } if (_r$50 && _r$50.$blk !== undefined) { break s; } - _r$51 = errors.New("tls: failed to write to key log: " + _r$50); /* */ $s = 99; case 99: if($c) { $c = false; _r$51 = _r$51.$blk(); } if (_r$51 && _r$51.$blk !== undefined) { break s; } - $24r$4 = _r$51; - $s = 100; case 100: return $24r$4; - /* } */ case 96: - hs.finishedHash.discardHandshakeBuffer(); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.doFullHandshake, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _arg, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$41, _r$42, _r$43, _r$44, _r$45, _r$46, _r$47, _r$48, _r$49, _r$5, _r$50, _r$51, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$10, _tuple$11, _tuple$12, _tuple$13, _tuple$14, _tuple$15, _tuple$16, _tuple$17, _tuple$18, _tuple$19, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, c, certMsg, certReq, certRequested, certVerify, chainToSend, ckx, cri, cs, err, err$1, err$2, err$3, err$4, err$5, err$6, hs, key, keyAgreement$1, msg, ok, ok$1, preMasterSecret, shd, sigHash, sigType, signOpts, signatureAlgorithm, signed, skx, x, x$1, x$2, x$3, $s};return $f; - }; - clientHandshakeState.prototype.doFullHandshake = function() { return this.$val.doFullHandshake(); }; - clientHandshakeState.ptr.prototype.establishKeys = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, clientCipher, clientHash, clientIV, clientKey, clientMAC, hs, serverCipher, serverHash, serverIV, serverKey, serverMAC, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = keysFromMasterSecret(c.vers, hs.suite, hs.masterSecret, hs.hello.random, hs.serverHello.random, hs.suite.macLen, hs.suite.keyLen, hs.suite.ivLen); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - clientMAC = _tuple[0]; - serverMAC = _tuple[1]; - clientKey = _tuple[2]; - serverKey = _tuple[3]; - clientIV = _tuple[4]; - serverIV = _tuple[5]; - _tmp = $ifaceNil; - _tmp$1 = $ifaceNil; - clientCipher = _tmp; - serverCipher = _tmp$1; - _tmp$2 = $ifaceNil; - _tmp$3 = $ifaceNil; - clientHash = _tmp$2; - serverHash = _tmp$3; - /* */ if (!(hs.suite.cipher === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(hs.suite.cipher === $throwNilPointerError)) { */ case 2: - _r$2 = hs.suite.cipher(clientKey, clientIV, false); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - clientCipher = _r$2; - _r$3 = hs.suite.mac(clientMAC); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - clientHash = _r$3; - _r$4 = hs.suite.cipher(serverKey, serverIV, true); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - serverCipher = _r$4; - _r$5 = hs.suite.mac(serverMAC); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - serverHash = _r$5; - $s = 4; continue; - /* } else { */ case 3: - _r$6 = hs.suite.aead(clientKey, clientIV); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - clientCipher = _r$6; - _r$7 = hs.suite.aead(serverKey, serverIV); /* */ $s = 10; case 10: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - serverCipher = _r$7; - /* } */ case 4: - c.in$27.prepareCipherSpec(c.vers, serverCipher, serverHash); - c.out.prepareCipherSpec(c.vers, clientCipher, clientHash); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.establishKeys, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, c, clientCipher, clientHash, clientIV, clientKey, clientMAC, hs, serverCipher, serverHash, serverIV, serverKey, serverMAC, $s};return $f; - }; - clientHandshakeState.prototype.establishKeys = function() { return this.$val.establishKeys(); }; - clientHandshakeState.ptr.prototype.serverResumedSession = function() { - var hs; - hs = this; - return !(hs.session === ptrType$37.nil) && !(hs.hello.sessionId === sliceType$5.nil) && bytes.Equal(hs.serverHello.sessionId, hs.hello.sessionId); - }; - clientHandshakeState.prototype.serverResumedSession = function() { return this.$val.serverResumedSession(); }; - clientHandshakeState.ptr.prototype.processServerHello = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, c, err, err$1, expectedSecureRenegotiation, hs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = hs.pickCipherSuite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [false, err]; - } - /* */ if (!((hs.serverHello.compressionMethod === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((hs.serverHello.compressionMethod === 0))) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return [false, errors.New("tls: server selected unsupported compression format")]; - /* } */ case 3: - /* */ if ((c.handshakes === 0) && hs.serverHello.secureRenegotiationSupported) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((c.handshakes === 0) && hs.serverHello.secureRenegotiationSupported) { */ case 5: - c.secureRenegotiation = true; - /* */ if (!((hs.serverHello.secureRenegotiation.$length === 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((hs.serverHello.secureRenegotiation.$length === 0))) { */ case 7: - _r$3 = c.sendAlert(40); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return [false, errors.New("tls: initial handshake had non-empty renegotiation extension")]; - /* } */ case 8: - /* } */ case 6: - /* */ if (c.handshakes > 0 && c.secureRenegotiation) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (c.handshakes > 0 && c.secureRenegotiation) { */ case 10: - expectedSecureRenegotiation = arrayType$5.zero(); - $copySlice(new sliceType$5(expectedSecureRenegotiation), new sliceType$5(c.clientFinished)); - $copySlice($subslice(new sliceType$5(expectedSecureRenegotiation), 12), new sliceType$5(c.serverFinished)); - /* */ if (!bytes.Equal(hs.serverHello.secureRenegotiation, new sliceType$5(expectedSecureRenegotiation))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!bytes.Equal(hs.serverHello.secureRenegotiation, new sliceType$5(expectedSecureRenegotiation))) { */ case 12: - _r$4 = c.sendAlert(40); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return [false, errors.New("tls: incorrect renegotiation extension contents")]; - /* } */ case 13: - /* } */ case 11: - err$1 = checkALPN(hs.hello.alpnProtocols, hs.serverHello.alpnProtocol); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 15: - _r$5 = c.sendAlert(110); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = -1; return [false, err$1]; - /* } */ case 16: - c.clientProtocol = hs.serverHello.alpnProtocol; - c.scts = hs.serverHello.scts; - if (!hs.serverResumedSession()) { - $s = -1; return [false, $ifaceNil]; - } - /* */ if (!((hs.session.vers === c.vers))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!((hs.session.vers === c.vers))) { */ case 18: - _r$6 = c.sendAlert(40); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return [false, errors.New("tls: server resumed a session with a different version")]; - /* } */ case 19: - /* */ if (!((hs.session.cipherSuite === hs.suite.id))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!((hs.session.cipherSuite === hs.suite.id))) { */ case 21: - _r$7 = c.sendAlert(40); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return [false, errors.New("tls: server resumed a session with a different cipher suite")]; - /* } */ case 22: - hs.masterSecret = hs.session.masterSecret; - c.peerCertificates = hs.session.serverCertificates; - c.verifiedChains = hs.session.verifiedChains; - c.ocspResponse = hs.session.ocspResponse; - if ((c.scts.$length === 0) && !((hs.session.scts.$length === 0))) { - c.scts = hs.session.scts; - } - $s = -1; return [true, $ifaceNil]; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.processServerHello, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, c, err, err$1, expectedSecureRenegotiation, hs, $s};return $f; - }; - clientHandshakeState.prototype.processServerHello = function() { return this.$val.processServerHello(); }; - checkALPN = function(clientProtos, serverProto) { - var _i, _ref, clientProtos, proto, serverProto; - if (serverProto === "") { - return $ifaceNil; - } - if (clientProtos.$length === 0) { - return errors.New("tls: server advertised unrequested ALPN extension"); - } - _ref = clientProtos; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - proto = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (proto === serverProto) { - return $ifaceNil; - } - _i++; - } - return errors.New("tls: server selected unadvertised ALPN protocol"); - }; - clientHandshakeState.ptr.prototype.readFinished = function(out) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, c, err, err$1, hs, msg, ok, out, serverFinished, verify, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.readChangeCipherSpec(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = c.readHandshake(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - msg = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _tuple$1 = $assertType(msg, ptrType$29, true); - serverFinished = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!ok) { */ case 3: - _r$3 = c.sendAlert(10); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = unexpectedMessageError(serverFinished, msg); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 7; case 7: return $24r; - /* } */ case 4: - _r$5 = $clone(hs.finishedHash, finishedHash).serverSum(hs.masterSecret); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - verify = _r$5; - /* */ if (!((verify.$length === serverFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, serverFinished.verifyData) === 1))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!((verify.$length === serverFinished.verifyData.$length)) || !((subtle.ConstantTimeCompare(verify, serverFinished.verifyData) === 1))) { */ case 9: - _r$6 = c.sendAlert(40); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return errors.New("tls: server's Finished message was incorrect"); - /* } */ case 10: - _r$7 = serverFinished.marshal(); /* */ $s = 12; case 12: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = hs.finishedHash.Write(_r$7); /* */ $s = 13; case 13: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $copySlice(out, verify); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.readFinished, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, c, err, err$1, hs, msg, ok, out, serverFinished, verify, $s};return $f; - }; - clientHandshakeState.prototype.readFinished = function(out) { return this.$val.readFinished(out); }; - clientHandshakeState.ptr.prototype.readSessionTicket = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, c, err, hs, msg, ok, sessionTicketMsg, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - if (!hs.serverHello.ticketSupported) { - $s = -1; return $ifaceNil; - } - c = hs.c; - _r$1 = c.readHandshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = $assertType(msg, ptrType$42, true); - sessionTicketMsg = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$2 = c.sendAlert(10); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(sessionTicketMsg, msg); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 6; case 6: return $24r; - /* } */ case 3: - _r$4 = hs.finishedHash.Write(sessionTicketMsg.marshal()); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = c.config.time(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - hs.session = new ClientSessionState.ptr(sessionTicketMsg.ticket, c.vers, hs.suite.id, hs.masterSecret, c.peerCertificates, c.verifiedChains, $clone(_r$5, time.Time), c.ocspResponse, c.scts, sliceType$5.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil), 0); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.readSessionTicket, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, c, err, hs, msg, ok, sessionTicketMsg, $s};return $f; - }; - clientHandshakeState.prototype.readSessionTicket = function() { return this.$val.readSessionTicket(); }; - clientHandshakeState.ptr.prototype.sendFinished = function(out) { - var {_arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, err, err$1, finished, hs, out, $s, $r, $c} = $restore(this, {out}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hs = this; - c = hs.c; - _r$1 = c.writeRecord(20, new sliceType$5([1])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - finished = new finishedMsg.ptr(sliceType$5.nil, sliceType$5.nil); - _r$2 = $clone(hs.finishedHash, finishedHash).clientSum(hs.masterSecret); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - finished.verifyData = _r$2; - _r$3 = finished.marshal(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = hs.finishedHash.Write(_r$3); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = finished.marshal(); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg = _r$5; - _r$6 = c.writeRecord(22, _arg); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $copySlice(out, finished.verifyData); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: clientHandshakeState.ptr.prototype.sendFinished, $c: true, $r, _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, c, err, err$1, finished, hs, out, $s};return $f; - }; - clientHandshakeState.prototype.sendFinished = function(out) { return this.$val.sendFinished(out); }; - Conn.ptr.prototype.verifyServerCertificate = function(certificates) { - var {$24r, $24r$1, _i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, asn1Data, c, cert, cert$1, certificates, certs, err, err$1, err$2, err$3, i, opts, $s, $r, $c} = $restore(this, {certificates}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - certs = $makeSlice(sliceType$12, certificates.$length); - _ref = certificates; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - asn1Data = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = x509.ParseCertificate(asn1Data); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cert = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - _r$2 = c.sendAlert(42); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = err.Error(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = errors.New("tls: failed to parse certificate from server: " + _r$3); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 9; case 9: return $24r; - /* } */ case 5: - ((i < 0 || i >= certs.$length) ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + i] = cert); - _i++; - $s = 1; continue; - case 2: - /* */ if (!c.config.InsecureSkipVerify) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!c.config.InsecureSkipVerify) { */ case 10: - _r$5 = c.config.time(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - opts = new x509.VerifyOptions.ptr(c.config.ServerName, x509.NewCertPool(), c.config.RootCAs, $clone(_r$5, time.Time), sliceType$14.nil, 0); - _ref$1 = $subslice(certs, 1); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - cert$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - opts.Intermediates.AddCert(cert$1); - _i$1++; - } - err$1 = $ifaceNil; - _r$6 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).Verify($clone(opts, x509.VerifyOptions)); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - c.verifiedChains = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 14: - _r$7 = c.sendAlert(42); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = -1; return err$1; - /* } */ case 15: - /* } */ case 11: - _ref$2 = (0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey; - /* */ if ($assertType(_ref$2, ptrType$11, true)[1] || $assertType(_ref$2, ptrType$12, true)[1] || $assertType(_ref$2, ed25519.PublicKey, true)[1]) { $s = 17; continue; } - /* */ $s = 18; continue; - /* switch (0) { default: if ($assertType(_ref$2, ptrType$11, true)[1] || $assertType(_ref$2, ptrType$12, true)[1] || $assertType(_ref$2, ed25519.PublicKey, true)[1]) { */ case 17: - /* break; */ $s = 19; continue; - $s = 19; continue; - /* } else { */ case 18: - _r$8 = c.sendAlert(43); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = fmt.Errorf("tls: server's certificate contains an unsupported type of public key: %T", new sliceType$6([(0 >= certs.$length ? ($throwRuntimeError("index out of range"), undefined) : certs.$array[certs.$offset + 0]).PublicKey])); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$1 = _r$9; - $s = 22; case 22: return $24r$1; - /* } } */ case 19: - c.peerCertificates = certs; - /* */ if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!(c.config.VerifyPeerCertificate === $throwNilPointerError)) { */ case 23: - _r$10 = c.config.VerifyPeerCertificate(certificates, c.verifiedChains); /* */ $s = 25; case 25: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err$2 = _r$10; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 26: - _r$11 = c.sendAlert(42); /* */ $s = 28; case 28: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = -1; return err$2; - /* } */ case 27: - /* } */ case 24: - /* */ if (!(c.config.VerifyConnection === $throwNilPointerError)) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!(c.config.VerifyConnection === $throwNilPointerError)) { */ case 29: - _r$12 = c.config.VerifyConnection($clone(c.connectionStateLocked(), ConnectionState)); /* */ $s = 31; case 31: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err$3 = _r$12; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 32: - _r$13 = c.sendAlert(42); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - $s = -1; return err$3; - /* } */ case 33: - /* } */ case 30: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.verifyServerCertificate, $c: true, $r, $24r, $24r$1, _i, _i$1, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _tuple, _tuple$1, asn1Data, c, cert, cert$1, certificates, certs, err, err$1, err$2, err$3, i, opts, $s};return $f; - }; - Conn.prototype.verifyServerCertificate = function(certificates) { return this.$val.verifyServerCertificate(certificates); }; - certificateRequestInfoFromMsg = function(ctx, vers, certReq) { - var {_1, _2, _i, _i$1, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tuple, certReq, certType, cri, ctx, ecAvail, err, rsaAvail, sigScheme, sigType, vers, $s, $r, $c} = $restore(this, {ctx, vers, certReq}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cri = new CertificateRequestInfo.ptr(certReq.certificateAuthorities, sliceType$7.nil, vers, ctx); - _tmp = false; - _tmp$1 = false; - rsaAvail = _tmp; - ecAvail = _tmp$1; - _ref = certReq.certificateTypes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - certType = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _1 = certType; - if (_1 === (1)) { - rsaAvail = true; - } else if (_1 === (64)) { - ecAvail = true; - } - _i++; - } - if (!certReq.hasSignatureAlgorithm) { - if (rsaAvail && ecAvail) { - cri.SignatureSchemes = new sliceType$7([1027, 1283, 1539, 1025, 1281, 1537, 513]); - } else if (rsaAvail) { - cri.SignatureSchemes = new sliceType$7([1025, 1281, 1537, 513]); - } else if (ecAvail) { - cri.SignatureSchemes = new sliceType$7([1027, 1283, 1539]); - } - $s = -1; return cri; - } - cri.SignatureSchemes = $makeSlice(sliceType$7, 0, certReq.supportedSignatureAlgorithms.$length); - _ref$1 = certReq.supportedSignatureAlgorithms; - _i$1 = 0; - /* while (true) { */ case 1: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } - sigScheme = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$1 = typeAndHashFromSignatureScheme(sigScheme); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - sigType = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _i$1++; - /* continue; */ $s = 1; continue; - } - _2 = sigType; - if ((_2 === (227)) || (_2 === (228))) { - if (ecAvail) { - cri.SignatureSchemes = $append(cri.SignatureSchemes, sigScheme); - } - } else if ((_2 === (226)) || (_2 === (225))) { - if (rsaAvail) { - cri.SignatureSchemes = $append(cri.SignatureSchemes, sigScheme); - } - } - _i$1++; - $s = 1; continue; - case 2: - $s = -1; return cri; - /* */ } return; } var $f = {$blk: certificateRequestInfoFromMsg, $c: true, $r, _1, _2, _i, _i$1, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tuple, certReq, certType, cri, ctx, ecAvail, err, rsaAvail, sigScheme, sigType, vers, $s};return $f; - }; - Conn.ptr.prototype.getClientCertificate = function(cri) { - var {$24r, _i, _r$1, _r$2, _ref, c, chain, cri, err, $s, $r, $c} = $restore(this, {cri}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - chain = [chain]; - c = this; - /* */ if (!(c.config.GetClientCertificate === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(c.config.GetClientCertificate === $throwNilPointerError)) { */ case 1: - _r$1 = c.config.GetClientCertificate(cri); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _ref = c.config.Certificates; - _i = 0; - /* while (true) { */ case 5: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } - chain[0] = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), Certificate); - _r$2 = cri.SupportsCertificate(chain[0]); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _i++; - /* continue; */ $s = 5; continue; - } - $s = -1; return [chain[0], $ifaceNil]; - case 6: - $s = -1; return [new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), $ifaceNil]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.getClientCertificate, $c: true, $r, $24r, _i, _r$1, _r$2, _ref, c, chain, cri, err, $s};return $f; - }; - Conn.prototype.getClientCertificate = function(cri) { return this.$val.getClientCertificate(cri); }; - clientSessionCacheKey = function(serverAddr, config) { - var {$24r, _r$1, config, serverAddr, $s, $r, $c} = $restore(this, {serverAddr, config}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (config.ServerName.length > 0) { - $s = -1; return config.ServerName; - } - _r$1 = serverAddr.String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: clientSessionCacheKey, $c: true, $r, $24r, _r$1, config, serverAddr, $s};return $f; - }; - hostnameInSNI = function(name) { - var host, i, name; - host = name; - if (host.length > 0 && (host.charCodeAt(0) === 91) && (host.charCodeAt((host.length - 1 >> 0)) === 93)) { - host = $substring(host, 1, (host.length - 1 >> 0)); - } - i = strings.LastIndex(host, "%"); - if (i > 0) { - host = $substring(host, 0, i); - } - if (!(net.ParseIP(host) === net.IP.nil)) { - return ""; - } - while (true) { - if (!(name.length > 0 && (name.charCodeAt((name.length - 1 >> 0)) === 46))) { break; } - name = $substring(name, 0, (name.length - 1 >> 0)); - } - return name; - }; - Conn.ptr.prototype.LocalAddr = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.conn.LocalAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.LocalAddr, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - Conn.prototype.LocalAddr = function() { return this.$val.LocalAddr(); }; - Conn.ptr.prototype.RemoteAddr = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.conn.RemoteAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.RemoteAddr, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - Conn.prototype.RemoteAddr = function() { return this.$val.RemoteAddr(); }; - Conn.ptr.prototype.SetDeadline = function(t) { - var {$24r, _r$1, c, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.conn.SetDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.SetDeadline, $c: true, $r, $24r, _r$1, c, t, $s};return $f; - }; - Conn.prototype.SetDeadline = function(t) { return this.$val.SetDeadline(t); }; - Conn.ptr.prototype.SetReadDeadline = function(t) { - var {$24r, _r$1, c, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.conn.SetReadDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.SetReadDeadline, $c: true, $r, $24r, _r$1, c, t, $s};return $f; - }; - Conn.prototype.SetReadDeadline = function(t) { return this.$val.SetReadDeadline(t); }; - Conn.ptr.prototype.SetWriteDeadline = function(t) { - var {$24r, _r$1, c, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.conn.SetWriteDeadline($clone(t, time.Time)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.SetWriteDeadline, $c: true, $r, $24r, _r$1, c, t, $s};return $f; - }; - Conn.prototype.SetWriteDeadline = function(t) { return this.$val.SetWriteDeadline(t); }; - Conn.ptr.prototype.NetConn = function() { - var c; - c = this; - return c.conn; - }; - Conn.prototype.NetConn = function() { return this.$val.NetConn(); }; - permanentError.ptr.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$1 = e.err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: permanentError.ptr.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - permanentError.prototype.Error = function() { return this.$val.Error(); }; - permanentError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.err; - }; - permanentError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - permanentError.ptr.prototype.Timeout = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$1 = e.err.Timeout(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: permanentError.ptr.prototype.Timeout, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - permanentError.prototype.Timeout = function() { return this.$val.Timeout(); }; - permanentError.ptr.prototype.Temporary = function() { - var e; - e = this; - return false; - }; - permanentError.prototype.Temporary = function() { return this.$val.Temporary(); }; - halfConn.ptr.prototype.setErrorLocked = function(err) { - var _tuple, e, err, hc, ok; - hc = this; - _tuple = $assertType(err, net.Error, true); - e = _tuple[0]; - ok = _tuple[1]; - if (ok) { - hc.err = new permanentError.ptr(e); - } else { - hc.err = err; - } - return hc.err; - }; - halfConn.prototype.setErrorLocked = function(err) { return this.$val.setErrorLocked(err); }; - halfConn.ptr.prototype.prepareCipherSpec = function(version, cipher$1, mac) { - var cipher$1, hc, mac, version; - hc = this; - hc.version = version; - hc.nextCipher = cipher$1; - hc.nextMac = mac; - }; - halfConn.prototype.prepareCipherSpec = function(version, cipher$1, mac) { return this.$val.prepareCipherSpec(version, cipher$1, mac); }; - halfConn.ptr.prototype.changeCipherSpec = function() { - var _i, _ref, hc, i, x; - hc = this; - if ($interfaceIsEqual(hc.nextCipher, $ifaceNil) || (hc.version === 772)) { - return new alert(80); - } - hc.cipher = hc.nextCipher; - hc.mac = hc.nextMac; - hc.nextCipher = $ifaceNil; - hc.nextMac = $ifaceNil; - _ref = hc.seq; - _i = 0; - while (true) { - if (!(_i < 8)) { break; } - i = _i; - (x = hc.seq, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = 0)); - _i++; - } - return $ifaceNil; - }; - halfConn.prototype.changeCipherSpec = function() { return this.$val.changeCipherSpec(); }; - halfConn.ptr.prototype.setTrafficSecret = function(suite, secret) { - var {_i, _r$1, _r$2, _ref, _tuple, hc, i, iv, key, secret, suite, x, $s, $r, $c} = $restore(this, {suite, secret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hc = this; - hc.trafficSecret = secret; - _r$1 = suite.trafficKey(secret); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - key = _tuple[0]; - iv = _tuple[1]; - _r$2 = suite.aead(key, iv); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - hc.cipher = _r$2; - _ref = hc.seq; - _i = 0; - while (true) { - if (!(_i < 8)) { break; } - i = _i; - (x = hc.seq, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i] = 0)); - _i++; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: halfConn.ptr.prototype.setTrafficSecret, $c: true, $r, _i, _r$1, _r$2, _ref, _tuple, hc, i, iv, key, secret, suite, x, $s};return $f; - }; - halfConn.prototype.setTrafficSecret = function(suite, secret) { return this.$val.setTrafficSecret(suite, secret); }; - halfConn.ptr.prototype.incSeq = function() { - var hc, i, x, x$1, x$2; - hc = this; - i = 7; - while (true) { - if (!(i >= 0)) { break; } - (x$1 = hc.seq, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i] = ((x = hc.seq, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) + (1) << 24 >>> 24))); - if (!(((x$2 = hc.seq, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])) === 0))) { - return; - } - i = i - (1) >> 0; - } - $panic(new $String("TLS: sequence number wraparound")); - }; - halfConn.prototype.incSeq = function() { return this.$val.incSeq(); }; - halfConn.ptr.prototype.explicitNonceLen = function() { - var {$24r, $24r$1, _r$1, _r$2, _ref, c, c$1, c$2, c$3, hc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hc = this; - if ($interfaceIsEqual(hc.cipher, $ifaceNil)) { - $s = -1; return 0; - } - _ref = hc.cipher; - /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, aead, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 1: - c = _ref; - $s = -1; return 0; - /* } else if ($assertType(_ref, aead, true)[1]) { */ case 2: - c$1 = _ref; - _r$1 = c$1.explicitNonceLen(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 3: - c$2 = _ref; - /* */ if (hc.version >= 770) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (hc.version >= 770) { */ case 8: - _r$2 = c$2.BlockSize(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - $s = -1; return 0; - /* } else { */ case 4: - c$3 = _ref; - $panic(new $String("unknown cipher type")); - /* } */ case 5: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: halfConn.ptr.prototype.explicitNonceLen, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _ref, c, c$1, c$2, c$3, hc, $s};return $f; - }; - halfConn.prototype.explicitNonceLen = function() { return this.$val.explicitNonceLen(); }; - extractPadding = function(payload) { - var _tmp, _tmp$1, b, good, i, mask, paddingLen, payload, t, t$1, toCheck, toRemove, x, x$1; - toRemove = 0; - good = 0; - if (payload.$length < 1) { - _tmp = 0; - _tmp$1 = 0; - toRemove = _tmp; - good = _tmp$1; - return [toRemove, good]; - } - paddingLen = (x = payload.$length - 1 >> 0, ((x < 0 || x >= payload.$length) ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + x])); - t = (((payload.$length - 1 >> 0) >>> 0)) - ((paddingLen >>> 0)) >>> 0; - good = ((((((~t >>> 0) >> 0)) >> 31 >> 0) << 24 >>> 24)); - toCheck = 256; - if (toCheck > payload.$length) { - toCheck = payload.$length; - } - i = 0; - while (true) { - if (!(i < toCheck)) { break; } - t$1 = ((paddingLen >>> 0)) - ((i >>> 0)) >>> 0; - mask = ((((((~t$1 >>> 0) >> 0)) >> 31 >> 0) << 24 >>> 24)); - b = (x$1 = (payload.$length - 1 >> 0) - i >> 0, ((x$1 < 0 || x$1 >= payload.$length) ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + x$1])); - good = (good & ~(((((mask & paddingLen) >>> 0) ^ ((mask & b) >>> 0)) << 24 >>> 24))) << 24 >>> 24; - i = i + (1) >> 0; - } - good = (good & ((good << 4 << 24 >>> 24))) >>> 0; - good = (good & ((good << 2 << 24 >>> 24))) >>> 0; - good = (good & ((good << 1 << 24 >>> 24))) >>> 0; - good = (((((good << 24 >> 24)) >> 7 << 24 >> 24) << 24 >>> 24)); - paddingLen = (paddingLen & (good)) >>> 0; - toRemove = ((paddingLen >> 0)) + 1 >> 0; - return [toRemove, good]; - }; - roundUp = function(a, b) { - var _r$1, _r$2, a, b; - return a + (_r$1 = ((b - (_r$2 = a % b, _r$2 === _r$2 ? _r$2 : $throwRuntimeError("integer divide by zero")) >> 0)) % b, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0; - }; - halfConn.ptr.prototype.decrypt = function(record) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, additionalData, blockSize, c, c$1, c$2, c$3, err, explicitNonceLen, hc, i, localMAC, macAndPaddingGood, macSize, minPayload, n, n$1, nonce, paddingGood, paddingLen, payload, plaintext, record, remoteMAC, typ, $s, $r, $c} = $restore(this, {record}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hc = this; - plaintext = sliceType$5.nil; - typ = (((0 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 0]) << 24 >>> 24)); - payload = $subslice(record, 5); - if ((hc.version === 772) && (typ === 20)) { - $s = -1; return [payload, typ, $ifaceNil]; - } - paddingGood = 255; - paddingLen = 0; - _r$1 = hc.explicitNonceLen(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - explicitNonceLen = _r$1; - /* */ if (!($interfaceIsEqual(hc.cipher, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(hc.cipher, $ifaceNil))) { */ case 2: - _ref = hc.cipher; - /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, aead, true)[1]) { $s = 6; continue; } - /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 5: - c = _ref; - $r = c.XORKeyStream(payload, payload); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else if ($assertType(_ref, aead, true)[1]) { */ case 6: - c$1 = _ref; - if (payload.$length < explicitNonceLen) { - $s = -1; return [sliceType$5.nil, 0, new alert(20)]; - } - nonce = $subslice(payload, 0, explicitNonceLen); - if (nonce.$length === 0) { - nonce = new sliceType$5(hc.seq); - } - payload = $subslice(payload, explicitNonceLen); - additionalData = sliceType$5.nil; - /* */ if (hc.version === 772) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (hc.version === 772) { */ case 11: - additionalData = $subslice(record, 0, 5); - $s = 13; continue; - /* } else { */ case 12: - additionalData = $appendSlice($subslice(new sliceType$5(hc.scratchBuf), 0, 0), new sliceType$5(hc.seq)); - additionalData = $appendSlice(additionalData, $subslice(record, 0, 3)); - _r$2 = c$1.Overhead(); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - n = payload.$length - _r$2 >> 0; - additionalData = $append(additionalData, (((n >> 8 >> 0) << 24 >>> 24)), ((n << 24 >>> 24))); - /* } */ case 13: - err = $ifaceNil; - _r$3 = c$1.Open($subslice(payload, 0, 0), nonce, payload, additionalData); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - plaintext = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$5.nil, 0, new alert(20)]; - } - $s = 9; continue; - /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 7: - c$2 = _ref; - _r$4 = c$2.BlockSize(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - blockSize = _r$4; - _r$5 = hc.mac.Size(); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = roundUp(_r$5 + 1 >> 0, blockSize); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - minPayload = explicitNonceLen + _r$6 >> 0; - if (!(((_r$7 = payload.$length % blockSize, _r$7 === _r$7 ? _r$7 : $throwRuntimeError("integer divide by zero")) === 0)) || payload.$length < minPayload) { - $s = -1; return [sliceType$5.nil, 0, new alert(20)]; - } - /* */ if (explicitNonceLen > 0) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (explicitNonceLen > 0) { */ case 19: - $r = c$2.SetIV($subslice(payload, 0, explicitNonceLen)); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - payload = $subslice(payload, explicitNonceLen); - /* } */ case 20: - $r = c$2.CryptBlocks(payload, payload); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$1 = extractPadding(payload); - paddingLen = _tuple$1[0]; - paddingGood = _tuple$1[1]; - $s = 9; continue; - /* } else { */ case 8: - c$3 = _ref; - $panic(new $String("unknown cipher type")); - /* } */ case 9: - if (hc.version === 772) { - if (!((typ === 23))) { - $s = -1; return [sliceType$5.nil, 0, new alert(10)]; - } - if (plaintext.$length > 16385) { - $s = -1; return [sliceType$5.nil, 0, new alert(22)]; - } - i = plaintext.$length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - if (!((((i < 0 || i >= plaintext.$length) ? ($throwRuntimeError("index out of range"), undefined) : plaintext.$array[plaintext.$offset + i]) === 0))) { - typ = ((((i < 0 || i >= plaintext.$length) ? ($throwRuntimeError("index out of range"), undefined) : plaintext.$array[plaintext.$offset + i]) << 24 >>> 24)); - plaintext = $subslice(plaintext, 0, i); - break; - } - if (i === 0) { - $s = -1; return [sliceType$5.nil, 0, new alert(10)]; - } - i = i - (1) >> 0; - } - } - $s = 4; continue; - /* } else { */ case 3: - plaintext = payload; - /* } */ case 4: - /* */ if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!($interfaceIsEqual(hc.mac, $ifaceNil))) { */ case 23: - _r$8 = hc.mac.Size(); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - macSize = _r$8; - if (payload.$length < macSize) { - $s = -1; return [sliceType$5.nil, 0, new alert(20)]; - } - n$1 = (payload.$length - macSize >> 0) - paddingLen >> 0; - n$1 = subtle.ConstantTimeSelect((((((n$1 >>> 0)) >>> 31 >>> 0) >> 0)), 0, n$1); - (3 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 3] = (((n$1 >> 8 >> 0) << 24 >>> 24))); - (4 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 4] = ((n$1 << 24 >>> 24))); - remoteMAC = $subslice(payload, n$1, (n$1 + macSize >> 0)); - _r$9 = tls10MAC(hc.mac, $subslice(new sliceType$5(hc.scratchBuf), 0, 0), new sliceType$5(hc.seq), $subslice(record, 0, 5), $subslice(payload, 0, n$1), $subslice(payload, (n$1 + macSize >> 0))); /* */ $s = 26; case 26: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - localMAC = _r$9; - macAndPaddingGood = subtle.ConstantTimeCompare(localMAC, remoteMAC) & ((paddingGood >> 0)); - if (!((macAndPaddingGood === 1))) { - $s = -1; return [sliceType$5.nil, 0, new alert(20)]; - } - plaintext = $subslice(payload, 0, n$1); - /* } */ case 24: - hc.incSeq(); - $s = -1; return [plaintext, typ, $ifaceNil]; - /* */ } return; } var $f = {$blk: halfConn.ptr.prototype.decrypt, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, additionalData, blockSize, c, c$1, c$2, c$3, err, explicitNonceLen, hc, i, localMAC, macAndPaddingGood, macSize, minPayload, n, n$1, nonce, paddingGood, paddingLen, payload, plaintext, record, remoteMAC, typ, $s};return $f; - }; - halfConn.prototype.decrypt = function(record) { return this.$val.decrypt(record); }; - sliceForAppend = function(in$1, n) { - var head, in$1, n, tail, total; - head = sliceType$5.nil; - tail = sliceType$5.nil; - total = in$1.$length + n >> 0; - if (in$1.$capacity >= total) { - head = $subslice(in$1, 0, total); - } else { - head = $makeSlice(sliceType$5, total); - $copySlice(head, in$1); - } - tail = $subslice(head, in$1.$length); - return [head, tail]; - }; - halfConn.ptr.prototype.encrypt = function(record, payload, rand$1) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, additionalData, blockSize, c, c$1, c$2, c$3, dst, err, explicitNonce, explicitNonceLen, hc, i, isCBC, mac, mac$1, n, n$1, nonce, paddingLen, payload, plaintextLen, rand$1, record, $s, $r, $c} = $restore(this, {record, payload, rand$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hc = this; - if ($interfaceIsEqual(hc.cipher, $ifaceNil)) { - $s = -1; return [$appendSlice(record, payload), $ifaceNil]; - } - explicitNonce = sliceType$5.nil; - _r$1 = hc.explicitNonceLen(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - explicitNonceLen = _r$1; - /* */ if (explicitNonceLen > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (explicitNonceLen > 0) { */ case 2: - _tuple = sliceForAppend(record, explicitNonceLen); - record = _tuple[0]; - explicitNonce = _tuple[1]; - _tuple$1 = $assertType(hc.cipher, cbcMode, true); - isCBC = _tuple$1[1]; - /* */ if (!isCBC && explicitNonceLen < 16) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!isCBC && explicitNonceLen < 16) { */ case 4: - $copySlice(explicitNonce, new sliceType$5(hc.seq)); - $s = 6; continue; - /* } else { */ case 5: - _r$2 = io.ReadFull(rand$1, explicitNonce); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$5.nil, err]; - } - /* } */ case 6: - /* } */ case 3: - dst = sliceType$5.nil; - _ref = hc.cipher; - /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 8; continue; } - /* */ if ($assertType(_ref, aead, true)[1]) { $s = 9; continue; } - /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 8: - c = _ref; - _r$3 = tls10MAC(hc.mac, $subslice(new sliceType$5(hc.scratchBuf), 0, 0), new sliceType$5(hc.seq), $subslice(record, 0, 5), payload, sliceType$5.nil); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - mac = _r$3; - _tuple$3 = sliceForAppend(record, payload.$length + mac.$length >> 0); - record = _tuple$3[0]; - dst = _tuple$3[1]; - $r = c.XORKeyStream($subslice(dst, 0, payload.$length), payload); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = c.XORKeyStream($subslice(dst, payload.$length), mac); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 12; continue; - /* } else if ($assertType(_ref, aead, true)[1]) { */ case 9: - c$1 = _ref; - nonce = explicitNonce; - if (nonce.$length === 0) { - nonce = new sliceType$5(hc.seq); - } - /* */ if (hc.version === 772) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (hc.version === 772) { */ case 16: - record = $appendSlice(record, payload); - record = $append(record, (0 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 0])); - (0 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 0] = 23); - _r$4 = c$1.Overhead(); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - n = (payload.$length + 1 >> 0) + _r$4 >> 0; - (3 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 3] = (((n >> 8 >> 0) << 24 >>> 24))); - (4 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 4] = ((n << 24 >>> 24))); - _r$5 = c$1.Seal($subslice(record, 0, 5), nonce, $subslice(record, 5), $subslice(record, 0, 5)); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - record = _r$5; - $s = 18; continue; - /* } else { */ case 17: - additionalData = $appendSlice($subslice(new sliceType$5(hc.scratchBuf), 0, 0), new sliceType$5(hc.seq)); - additionalData = $appendSlice(additionalData, $subslice(record, 0, 5)); - _r$6 = c$1.Seal(record, nonce, payload, additionalData); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - record = _r$6; - /* } */ case 18: - $s = 12; continue; - /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 10: - c$2 = _ref; - _r$7 = tls10MAC(hc.mac, $subslice(new sliceType$5(hc.scratchBuf), 0, 0), new sliceType$5(hc.seq), $subslice(record, 0, 5), payload, sliceType$5.nil); /* */ $s = 22; case 22: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - mac$1 = _r$7; - _r$8 = c$2.BlockSize(); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - blockSize = _r$8; - plaintextLen = payload.$length + mac$1.$length >> 0; - paddingLen = blockSize - (_r$9 = plaintextLen % blockSize, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")) >> 0; - _tuple$4 = sliceForAppend(record, plaintextLen + paddingLen >> 0); - record = _tuple$4[0]; - dst = _tuple$4[1]; - $copySlice(dst, payload); - $copySlice($subslice(dst, payload.$length), mac$1); - i = plaintextLen; - while (true) { - if (!(i < dst.$length)) { break; } - ((i < 0 || i >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + i] = (((paddingLen - 1 >> 0) << 24 >>> 24))); - i = i + (1) >> 0; - } - /* */ if (explicitNonce.$length > 0) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (explicitNonce.$length > 0) { */ case 24: - $r = c$2.SetIV(explicitNonce); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - $r = c$2.CryptBlocks(dst, dst); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 12; continue; - /* } else { */ case 11: - c$3 = _ref; - $panic(new $String("unknown cipher type")); - /* } */ case 12: - n$1 = record.$length - 5 >> 0; - (3 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 3] = (((n$1 >> 8 >> 0) << 24 >>> 24))); - (4 >= record.$length ? ($throwRuntimeError("index out of range"), undefined) : record.$array[record.$offset + 4] = ((n$1 << 24 >>> 24))); - hc.incSeq(); - $s = -1; return [record, $ifaceNil]; - /* */ } return; } var $f = {$blk: halfConn.ptr.prototype.encrypt, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, additionalData, blockSize, c, c$1, c$2, c$3, dst, err, explicitNonce, explicitNonceLen, hc, i, isCBC, mac, mac$1, n, n$1, nonce, paddingLen, payload, plaintextLen, rand$1, record, $s};return $f; - }; - halfConn.prototype.encrypt = function(record, payload, rand$1) { return this.$val.encrypt(record, payload, rand$1); }; - RecordHeaderError.ptr.prototype.Error = function() { - var e; - e = this; - return "tls: " + e.Msg; - }; - RecordHeaderError.prototype.Error = function() { return this.$val.Error(); }; - Conn.ptr.prototype.newRecordHeaderError = function(conn, msg) { - var c, conn, err, msg; - err = new RecordHeaderError.ptr("", arrayType$6.zero(), $ifaceNil); - c = this; - err.Msg = msg; - err.Conn = conn; - $copySlice(new sliceType$5(err.RecordHeader), c.rawInput.Bytes()); - RecordHeaderError.copy(err, err); - return err; - }; - Conn.prototype.newRecordHeaderError = function(conn, msg) { return this.$val.newRecordHeaderError(conn, msg); }; - Conn.ptr.prototype.readRecord = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.readRecordOrCCS(false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.readRecord, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - Conn.prototype.readRecord = function() { return this.$val.readRecord(); }; - Conn.ptr.prototype.readChangeCipherSpec = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.readRecordOrCCS(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.readChangeCipherSpec, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - Conn.prototype.readChangeCipherSpec = function() { return this.$val.readChangeCipherSpec(); }; - Conn.ptr.prototype.readRecordOrCCS = function(expectChangeCipherSpec) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, c, data, e, e$1, err, err$1, err$2, err$3, expectChangeCipherSpec, handshakeComplete, hdr, msg, msg$1, n, ok, ok$1, record, typ, vers, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {expectChangeCipherSpec}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!($interfaceIsEqual(c.in$27.err, $ifaceNil))) { - $s = -1; return c.in$27.err; - } - handshakeComplete = c.handshakeComplete(); - if (!((c.input.Len() === 0))) { - $s = -1; return c.in$27.setErrorLocked(errors.New("tls: internal error: attempted to read record with pending application data")); - } - c.input.Reset(sliceType$5.nil); - _r$1 = c.readFromUntil(c.conn, 5); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - if ($interfaceIsEqual(err, io.ErrUnexpectedEOF) && (c.rawInput.Len() === 0)) { - err = io.EOF; - } - _tuple = $assertType(err, net.Error, true); - e = _tuple[0]; - ok = _tuple[1]; - if (!ok) { _v = true; $s = 6; continue s; } - _r$2 = e.Temporary(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = !_r$2; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - c.in$27.setErrorLocked(err); - /* } */ case 5: - $s = -1; return err; - /* } */ case 3: - hdr = $subslice(c.rawInput.Bytes(), 0, 5); - typ = (((0 >= hdr.$length ? ($throwRuntimeError("index out of range"), undefined) : hdr.$array[hdr.$offset + 0]) << 24 >>> 24)); - /* */ if (!handshakeComplete && (typ === 128)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!handshakeComplete && (typ === 128)) { */ case 8: - _r$3 = c.sendAlert(70); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return c.in$27.setErrorLocked((x = c.newRecordHeaderError($ifaceNil, "unsupported SSLv2 handshake received"), new x.constructor.elem(x))); - /* } */ case 9: - vers = (((((1 >= hdr.$length ? ($throwRuntimeError("index out of range"), undefined) : hdr.$array[hdr.$offset + 1]) << 16 >>> 16)) << 8 << 16 >>> 16) | (((2 >= hdr.$length ? ($throwRuntimeError("index out of range"), undefined) : hdr.$array[hdr.$offset + 2]) << 16 >>> 16))) >>> 0; - n = ((((3 >= hdr.$length ? ($throwRuntimeError("index out of range"), undefined) : hdr.$array[hdr.$offset + 3]) >> 0)) << 8 >> 0) | (((4 >= hdr.$length ? ($throwRuntimeError("index out of range"), undefined) : hdr.$array[hdr.$offset + 4]) >> 0)); - /* */ if (c.haveVers && !((c.vers === 772)) && !((vers === c.vers))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (c.haveVers && !((c.vers === 772)) && !((vers === c.vers))) { */ case 11: - _r$4 = c.sendAlert(70); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = fmt.Sprintf("received record with version %x when expecting version %x", new sliceType$6([new $Uint16(vers), new $Uint16(c.vers)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - msg = _r$5; - $s = -1; return c.in$27.setErrorLocked((x$1 = c.newRecordHeaderError($ifaceNil, msg), new x$1.constructor.elem(x$1))); - /* } */ case 12: - if (!c.haveVers) { - if ((!((typ === 21)) && !((typ === 22))) || vers >= 4096) { - $s = -1; return c.in$27.setErrorLocked((x$2 = c.newRecordHeaderError(c.conn, "first record does not look like a TLS handshake"), new x$2.constructor.elem(x$2))); - } - } - /* */ if ((c.vers === 772) && n > 16640 || n > 18432) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ((c.vers === 772) && n > 16640 || n > 18432) { */ case 15: - _r$6 = c.sendAlert(22); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = fmt.Sprintf("oversized record received with length %d", new sliceType$6([new $Int(n)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - msg$1 = _r$7; - $s = -1; return c.in$27.setErrorLocked((x$3 = c.newRecordHeaderError($ifaceNil, msg$1), new x$3.constructor.elem(x$3))); - /* } */ case 16: - _r$8 = c.readFromUntil(c.conn, 5 + n >> 0); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$1 = _r$8; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 20: - _tuple$1 = $assertType(err$1, net.Error, true); - e$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (!ok$1) { _v$1 = true; $s = 24; continue s; } - _r$9 = e$1.Temporary(); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v$1 = !_r$9; case 24: - /* */ if (_v$1) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_v$1) { */ case 22: - c.in$27.setErrorLocked(err$1); - /* } */ case 23: - $s = -1; return err$1; - /* } */ case 21: - record = c.rawInput.Next(5 + n >> 0); - _r$10 = c.in$27.decrypt(record); /* */ $s = 26; case 26: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$2 = _r$10; - data = _tuple$2[0]; - typ = _tuple$2[1]; - err$2 = _tuple$2[2]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 27: - _r$11 = c.sendAlert($assertType(err$2, alert)); /* */ $s = 29; case 29: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = c.in$27.setErrorLocked(_r$11); /* */ $s = 30; case 30: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r = _r$12; - $s = 31; case 31: return $24r; - /* } */ case 28: - /* */ if (data.$length > 16384) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (data.$length > 16384) { */ case 32: - _r$13 = c.sendAlert(22); /* */ $s = 34; case 34: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = c.in$27.setErrorLocked(_r$13); /* */ $s = 35; case 35: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$1 = _r$14; - $s = 36; case 36: return $24r$1; - /* } */ case 33: - /* */ if ($interfaceIsEqual(c.in$27.cipher, $ifaceNil) && (typ === 23)) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if ($interfaceIsEqual(c.in$27.cipher, $ifaceNil) && (typ === 23)) { */ case 37: - _r$15 = c.sendAlert(10); /* */ $s = 39; case 39: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = c.in$27.setErrorLocked(_r$15); /* */ $s = 40; case 40: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$2 = _r$16; - $s = 41; case 41: return $24r$2; - /* } */ case 38: - if (!((typ === 21)) && !((typ === 20)) && data.$length > 0) { - c.retryCount = 0; - } - /* */ if ((c.vers === 772) && !((typ === 22)) && c.hand.Len() > 0) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if ((c.vers === 772) && !((typ === 22)) && c.hand.Len() > 0) { */ case 42: - _r$17 = c.sendAlert(10); /* */ $s = 44; case 44: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = c.in$27.setErrorLocked(_r$17); /* */ $s = 45; case 45: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$3 = _r$18; - $s = 46; case 46: return $24r$3; - /* } */ case 43: - _1 = typ; - /* */ if (_1 === (21)) { $s = 48; continue; } - /* */ if (_1 === (20)) { $s = 49; continue; } - /* */ if (_1 === (23)) { $s = 50; continue; } - /* */ if (_1 === (22)) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (_1 === (21)) { */ case 48: - /* */ if (!((data.$length === 2))) { $s = 54; continue; } - /* */ $s = 55; continue; - /* if (!((data.$length === 2))) { */ case 54: - _r$19 = c.sendAlert(10); /* */ $s = 56; case 56: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$20 = c.in$27.setErrorLocked(_r$19); /* */ $s = 57; case 57: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - $24r$4 = _r$20; - $s = 58; case 58: return $24r$4; - /* } */ case 55: - if ((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 24 >>> 24)) === 0) { - $s = -1; return c.in$27.setErrorLocked(io.EOF); - } - if (c.vers === 772) { - $s = -1; return c.in$27.setErrorLocked(new net.OpError.ptr("remote error", "", $ifaceNil, $ifaceNil, new alert((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 24 >>> 24))))); - } - _2 = (0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]); - /* */ if (_2 === (1)) { $s = 60; continue; } - /* */ if (_2 === (2)) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (_2 === (1)) { */ case 60: - _r$21 = c.retryReadRecord(expectChangeCipherSpec); /* */ $s = 64; case 64: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - $24r$5 = _r$21; - $s = 65; case 65: return $24r$5; - /* } else if (_2 === (2)) { */ case 61: - $s = -1; return c.in$27.setErrorLocked(new net.OpError.ptr("remote error", "", $ifaceNil, $ifaceNil, new alert((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) << 24 >>> 24))))); - /* } else { */ case 62: - _r$22 = c.sendAlert(10); /* */ $s = 66; case 66: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$23 = c.in$27.setErrorLocked(_r$22); /* */ $s = 67; case 67: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - $24r$6 = _r$23; - $s = 68; case 68: return $24r$6; - /* } */ case 63: - case 59: - $s = 53; continue; - /* } else if (_1 === (20)) { */ case 49: - /* */ if (!((data.$length === 1)) || !(((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 1))) { $s = 69; continue; } - /* */ $s = 70; continue; - /* if (!((data.$length === 1)) || !(((0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]) === 1))) { */ case 69: - _r$24 = c.sendAlert(50); /* */ $s = 71; case 71: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = c.in$27.setErrorLocked(_r$24); /* */ $s = 72; case 72: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - $24r$7 = _r$25; - $s = 73; case 73: return $24r$7; - /* } */ case 70: - /* */ if (c.hand.Len() > 0) { $s = 74; continue; } - /* */ $s = 75; continue; - /* if (c.hand.Len() > 0) { */ case 74: - _r$26 = c.sendAlert(10); /* */ $s = 76; case 76: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$27 = c.in$27.setErrorLocked(_r$26); /* */ $s = 77; case 77: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - $24r$8 = _r$27; - $s = 78; case 78: return $24r$8; - /* } */ case 75: - /* */ if (c.vers === 772) { $s = 79; continue; } - /* */ $s = 80; continue; - /* if (c.vers === 772) { */ case 79: - _r$28 = c.retryReadRecord(expectChangeCipherSpec); /* */ $s = 81; case 81: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - $24r$9 = _r$28; - $s = 82; case 82: return $24r$9; - /* } */ case 80: - /* */ if (!expectChangeCipherSpec) { $s = 83; continue; } - /* */ $s = 84; continue; - /* if (!expectChangeCipherSpec) { */ case 83: - _r$29 = c.sendAlert(10); /* */ $s = 85; case 85: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$30 = c.in$27.setErrorLocked(_r$29); /* */ $s = 86; case 86: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - $24r$10 = _r$30; - $s = 87; case 87: return $24r$10; - /* } */ case 84: - err$3 = c.in$27.changeCipherSpec(); - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 88; continue; } - /* */ $s = 89; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 88: - _r$31 = c.sendAlert($assertType(err$3, alert)); /* */ $s = 90; case 90: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$32 = c.in$27.setErrorLocked(_r$31); /* */ $s = 91; case 91: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - $24r$11 = _r$32; - $s = 92; case 92: return $24r$11; - /* } */ case 89: - $s = 53; continue; - /* } else if (_1 === (23)) { */ case 50: - /* */ if (!handshakeComplete || expectChangeCipherSpec) { $s = 93; continue; } - /* */ $s = 94; continue; - /* if (!handshakeComplete || expectChangeCipherSpec) { */ case 93: - _r$33 = c.sendAlert(10); /* */ $s = 95; case 95: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$34 = c.in$27.setErrorLocked(_r$33); /* */ $s = 96; case 96: if($c) { $c = false; _r$34 = _r$34.$blk(); } if (_r$34 && _r$34.$blk !== undefined) { break s; } - $24r$12 = _r$34; - $s = 97; case 97: return $24r$12; - /* } */ case 94: - /* */ if (data.$length === 0) { $s = 98; continue; } - /* */ $s = 99; continue; - /* if (data.$length === 0) { */ case 98: - _r$35 = c.retryReadRecord(expectChangeCipherSpec); /* */ $s = 100; case 100: if($c) { $c = false; _r$35 = _r$35.$blk(); } if (_r$35 && _r$35.$blk !== undefined) { break s; } - $24r$13 = _r$35; - $s = 101; case 101: return $24r$13; - /* } */ case 99: - c.input.Reset(data); - $s = 53; continue; - /* } else if (_1 === (22)) { */ case 51: - /* */ if ((data.$length === 0) || expectChangeCipherSpec) { $s = 102; continue; } - /* */ $s = 103; continue; - /* if ((data.$length === 0) || expectChangeCipherSpec) { */ case 102: - _r$36 = c.sendAlert(10); /* */ $s = 104; case 104: if($c) { $c = false; _r$36 = _r$36.$blk(); } if (_r$36 && _r$36.$blk !== undefined) { break s; } - _r$37 = c.in$27.setErrorLocked(_r$36); /* */ $s = 105; case 105: if($c) { $c = false; _r$37 = _r$37.$blk(); } if (_r$37 && _r$37.$blk !== undefined) { break s; } - $24r$14 = _r$37; - $s = 106; case 106: return $24r$14; - /* } */ case 103: - _r$38 = c.hand.Write(data); /* */ $s = 107; case 107: if($c) { $c = false; _r$38 = _r$38.$blk(); } if (_r$38 && _r$38.$blk !== undefined) { break s; } - _r$38; - $s = 53; continue; - /* } else { */ case 52: - _r$39 = c.sendAlert(10); /* */ $s = 108; case 108: if($c) { $c = false; _r$39 = _r$39.$blk(); } if (_r$39 && _r$39.$blk !== undefined) { break s; } - _r$40 = c.in$27.setErrorLocked(_r$39); /* */ $s = 109; case 109: if($c) { $c = false; _r$40 = _r$40.$blk(); } if (_r$40 && _r$40.$blk !== undefined) { break s; } - $24r$15 = _r$40; - $s = 110; case 110: return $24r$15; - /* } */ case 53: - case 47: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.readRecordOrCCS, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _1, _2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$34, _r$35, _r$36, _r$37, _r$38, _r$39, _r$4, _r$40, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _v, _v$1, c, data, e, e$1, err, err$1, err$2, err$3, expectChangeCipherSpec, handshakeComplete, hdr, msg, msg$1, n, ok, ok$1, record, typ, vers, x, x$1, x$2, x$3, $s};return $f; - }; - Conn.prototype.readRecordOrCCS = function(expectChangeCipherSpec) { return this.$val.readRecordOrCCS(expectChangeCipherSpec); }; - Conn.ptr.prototype.retryReadRecord = function(expectChangeCipherSpec) { - var {$24r, _r$1, _r$2, c, expectChangeCipherSpec, $s, $r, $c} = $restore(this, {expectChangeCipherSpec}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - c.retryCount = c.retryCount + (1) >> 0; - /* */ if (c.retryCount > 16) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (c.retryCount > 16) { */ case 1: - _r$1 = c.sendAlert(10); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return c.in$27.setErrorLocked(errors.New("tls: too many ignored records")); - /* } */ case 2: - _r$2 = c.readRecordOrCCS(expectChangeCipherSpec); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.retryReadRecord, $c: true, $r, $24r, _r$1, _r$2, c, expectChangeCipherSpec, $s};return $f; - }; - Conn.prototype.retryReadRecord = function(expectChangeCipherSpec) { return this.$val.retryReadRecord(expectChangeCipherSpec); }; - atLeastReader.ptr.prototype.Read = function(p) { - var {_r$1, _tuple, err, n, p, r, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if ((x = r.N, (x.$high < 0 || (x.$high === 0 && x.$low <= 0)))) { - $s = -1; return [0, io.EOF]; - } - _r$1 = r.R.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - r.N = (x$1 = r.N, x$2 = (new $Int64(0, n)), new $Int64(x$1.$high - x$2.$high, x$1.$low - x$2.$low)); - if ((x$3 = r.N, (x$3.$high > 0 || (x$3.$high === 0 && x$3.$low > 0))) && $interfaceIsEqual(err, io.EOF)) { - $s = -1; return [n, io.ErrUnexpectedEOF]; - } - if ((x$4 = r.N, (x$4.$high < 0 || (x$4.$high === 0 && x$4.$low <= 0))) && $interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return [n, io.EOF]; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: atLeastReader.ptr.prototype.Read, $c: true, $r, _r$1, _tuple, err, n, p, r, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - atLeastReader.prototype.Read = function(p) { return this.$val.Read(p); }; - Conn.ptr.prototype.readFromUntil = function(r, n) { - var {_r$1, _tuple, c, err, n, needs, r, $s, $r, $c} = $restore(this, {r, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.rawInput.Len() >= n) { - $s = -1; return $ifaceNil; - } - needs = n - c.rawInput.Len() >> 0; - $r = c.rawInput.Grow(needs + 512 >> 0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = c.rawInput.ReadFrom(new atLeastReader.ptr(r, (new $Int64(0, needs)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.readFromUntil, $c: true, $r, _r$1, _tuple, c, err, n, needs, r, $s};return $f; - }; - Conn.prototype.readFromUntil = function(r, n) { return this.$val.readFromUntil(r, n); }; - Conn.ptr.prototype.sendAlertLocked = function(err) { - var {_1, _r$1, _tuple, c, err, writeErr, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _1 = err; - if ((_1 === (100)) || (_1 === (0))) { - c.tmp[0] = 1; - } else { - c.tmp[0] = 2; - } - c.tmp[1] = ((err << 24 >>> 24)); - _r$1 = c.writeRecordLocked(21, $subslice(new sliceType$5(c.tmp), 0, 2)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - writeErr = _tuple[1]; - if (err === 0) { - $s = -1; return writeErr; - } - $s = -1; return c.out.setErrorLocked(new net.OpError.ptr("local error", "", $ifaceNil, $ifaceNil, new alert(err))); - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.sendAlertLocked, $c: true, $r, _1, _r$1, _tuple, c, err, writeErr, $s};return $f; - }; - Conn.prototype.sendAlertLocked = function(err) { return this.$val.sendAlertLocked(err); }; - Conn.ptr.prototype.sendAlert = function(err) { - var {$24r, _r$1, c, err, $s, $deferred, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.out.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); - _r$1 = c.sendAlertLocked(err); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.sendAlert, $c: true, $r, $24r, _r$1, c, err, $s, $deferred};return $f; } } - }; - Conn.prototype.sendAlert = function(err) { return this.$val.sendAlert(err); }; - Conn.ptr.prototype.maxPayloadSizeForWrite = function(typ) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _ref, blockSize, c, ciph, ciph$1, ciph$2, ciph$3, n, payloadBytes, pkt, typ, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {typ}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.config.DynamicRecordSizingDisabled || !((typ === 23))) { - $s = -1; return 16384; - } - if ((x = c.bytesSent, (x.$high > 0 || (x.$high === 0 && x.$low >= 131072)))) { - $s = -1; return 16384; - } - _r$1 = c.out.explicitNonceLen(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - payloadBytes = 1203 - _r$1 >> 0; - /* */ if (!($interfaceIsEqual(c.out.cipher, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(c.out.cipher, $ifaceNil))) { */ case 2: - _ref = c.out.cipher; - /* */ if ($assertType(_ref, cipher.Stream, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, cipher.AEAD, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, cbcMode, true)[1]) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ($assertType(_ref, cipher.Stream, true)[1]) { */ case 4: - ciph = _ref; - _r$2 = c.out.mac.Size(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - payloadBytes = payloadBytes - (_r$2) >> 0; - $s = 8; continue; - /* } else if ($assertType(_ref, cipher.AEAD, true)[1]) { */ case 5: - ciph$1 = _ref; - _r$3 = ciph$1.Overhead(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - payloadBytes = payloadBytes - (_r$3) >> 0; - $s = 8; continue; - /* } else if ($assertType(_ref, cbcMode, true)[1]) { */ case 6: - ciph$2 = _ref; - _r$4 = ciph$2.BlockSize(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - blockSize = _r$4; - payloadBytes = ((payloadBytes & (~((blockSize - 1 >> 0)) >> 0))) - 1 >> 0; - _r$5 = c.out.mac.Size(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - payloadBytes = payloadBytes - (_r$5) >> 0; - $s = 8; continue; - /* } else { */ case 7: - ciph$3 = _ref; - $panic(new $String("unknown cipher type")); - /* } */ case 8: - /* } */ case 3: - if (c.vers === 772) { - payloadBytes = payloadBytes - (1) >> 0; - } - pkt = c.packetsSent; - c.packetsSent = (x$1 = c.packetsSent, x$2 = new $Int64(0, 1), new $Int64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)); - if ((pkt.$high > 0 || (pkt.$high === 0 && pkt.$low > 1000))) { - $s = -1; return 16384; - } - n = $imul(payloadBytes, (((x$3 = new $Int64(pkt.$high + 0, pkt.$low + 1), x$3.$low + ((x$3.$high >> 31) * 4294967296)) >> 0))); - if (n > 16384) { - n = 16384; - } - $s = -1; return n; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.maxPayloadSizeForWrite, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, blockSize, c, ciph, ciph$1, ciph$2, ciph$3, n, payloadBytes, pkt, typ, x, x$1, x$2, x$3, $s};return $f; - }; - Conn.prototype.maxPayloadSizeForWrite = function(typ) { return this.$val.maxPayloadSizeForWrite(typ); }; - Conn.ptr.prototype.write = function(data) { - var {_r$1, _tuple, c, data, err, n, x, x$1, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.buffering) { - c.sendBuf = $appendSlice(c.sendBuf, data); - $s = -1; return [data.$length, $ifaceNil]; - } - _r$1 = c.conn.Write(data); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - c.bytesSent = (x = c.bytesSent, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.write, $c: true, $r, _r$1, _tuple, c, data, err, n, x, x$1, $s};return $f; - }; - Conn.prototype.write = function(data) { return this.$val.write(data); }; - Conn.ptr.prototype.flush = function() { - var {_r$1, _tuple, c, err, n, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c.sendBuf.$length === 0) { - $s = -1; return [0, $ifaceNil]; - } - _r$1 = c.conn.Write(c.sendBuf); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - c.bytesSent = (x = c.bytesSent, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - c.sendBuf = sliceType$5.nil; - c.buffering = false; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.flush, $c: true, $r, _r$1, _tuple, c, err, n, x, x$1, $s};return $f; - }; - Conn.prototype.flush = function() { return this.$val.flush(); }; - Conn.ptr.prototype.writeRecordLocked = function(typ, data) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, c, data, err, err$1, err$2, m, maxPayload, n, outBuf, outBufPtr, typ, vers, $s, $deferred, $r, $c} = $restore(this, {typ, data}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - outBuf = [outBuf]; - outBufPtr = [outBufPtr]; - c = this; - _r$1 = outBufPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - outBufPtr[0] = $assertType(_r$1, ptrType$1); - outBuf[0] = outBufPtr[0].$get(); - $deferred.push([(function(outBuf, outBufPtr) { return function() { - outBufPtr[0].$set(outBuf[0]); - outBufPool.Put(outBufPtr[0]); - }; })(outBuf, outBufPtr), []]); - n = 0; - /* while (true) { */ case 2: - /* if (!(data.$length > 0)) { break; } */ if(!(data.$length > 0)) { $s = 3; continue; } - m = data.$length; - _r$2 = c.maxPayloadSizeForWrite(typ); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - maxPayload = _r$2; - if (m > maxPayload) { - m = maxPayload; - } - _tuple = sliceForAppend($subslice(outBuf[0], 0, 0), 5); - outBuf[0] = _tuple[1]; - (0 >= outBuf[0].$length ? ($throwRuntimeError("index out of range"), undefined) : outBuf[0].$array[outBuf[0].$offset + 0] = ((typ << 24 >>> 24))); - vers = c.vers; - if (vers === 0) { - vers = 769; - } else if (vers === 772) { - vers = 771; - } - (1 >= outBuf[0].$length ? ($throwRuntimeError("index out of range"), undefined) : outBuf[0].$array[outBuf[0].$offset + 1] = (((vers >>> 8 << 16 >>> 16) << 24 >>> 24))); - (2 >= outBuf[0].$length ? ($throwRuntimeError("index out of range"), undefined) : outBuf[0].$array[outBuf[0].$offset + 2] = ((vers << 24 >>> 24))); - (3 >= outBuf[0].$length ? ($throwRuntimeError("index out of range"), undefined) : outBuf[0].$array[outBuf[0].$offset + 3] = (((m >> 8 >> 0) << 24 >>> 24))); - (4 >= outBuf[0].$length ? ($throwRuntimeError("index out of range"), undefined) : outBuf[0].$array[outBuf[0].$offset + 4] = ((m << 24 >>> 24))); - err = $ifaceNil; - _r$3 = c.out.encrypt(outBuf[0], $subslice(data, 0, m), c.config.rand()); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - outBuf[0] = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $24r = [n, err]; - $s = 8; case 8: return $24r; - /* } */ case 7: - _r$4 = c.write(outBuf[0]); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - err$1 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 10: - $24r$1 = [n, err$1]; - $s = 12; case 12: return $24r$1; - /* } */ case 11: - n = n + (m) >> 0; - data = $subslice(data, m); - $s = 2; continue; - case 3: - /* */ if ((typ === 20) && !((c.vers === 772))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ((typ === 20) && !((c.vers === 772))) { */ case 13: - err$2 = c.out.changeCipherSpec(); - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 15: - _r$5 = c.sendAlertLocked($assertType(err$2, alert)); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = [n, _r$5]; - $s = 18; case 18: return $24r$2; - /* } */ case 16: - /* } */ case 14: - $24r$3 = [n, $ifaceNil]; - $s = 19; case 19: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.writeRecordLocked, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, c, data, err, err$1, err$2, m, maxPayload, n, outBuf, outBufPtr, typ, vers, $s, $deferred};return $f; } } - }; - Conn.prototype.writeRecordLocked = function(typ, data) { return this.$val.writeRecordLocked(typ, data); }; - Conn.ptr.prototype.writeRecord = function(typ, data) { - var {$24r, _r$1, c, data, typ, $s, $deferred, $r, $c} = $restore(this, {typ, data}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.out.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); - _r$1 = c.writeRecordLocked(typ, data); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.writeRecord, $c: true, $r, $24r, _r$1, c, data, typ, $s, $deferred};return $f; } } - }; - Conn.prototype.writeRecord = function(typ, data) { return this.$val.writeRecord(typ, data); }; - Conn.ptr.prototype.readHandshake = function() { - var {$24r, $24r$1, $24r$2, _1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, data, err, err$1, m, n, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* while (true) { */ case 1: - /* if (!(c.hand.Len() < 4)) { break; } */ if(!(c.hand.Len() < 4)) { $s = 2; continue; } - _r$1 = c.readRecord(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - $s = 1; continue; - case 2: - data = c.hand.Bytes(); - n = (((((1 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 1]) >> 0)) << 16 >> 0) | ((((2 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 2]) >> 0)) << 8 >> 0)) | (((3 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 3]) >> 0)); - /* */ if (n > 65536) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (n > 65536) { */ case 4: - _r$2 = c.sendAlertLocked(80); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = fmt.Errorf("tls: handshake message of length %d bytes exceeds maximum of %d bytes", new sliceType$6([new $Int(n), new $Int(65536)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = c.in$27.setErrorLocked(_r$3); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = [$ifaceNil, _r$4]; - $s = 9; case 9: return $24r; - /* } */ case 5: - /* while (true) { */ case 10: - /* if (!(c.hand.Len() < (4 + n >> 0))) { break; } */ if(!(c.hand.Len() < (4 + n >> 0))) { $s = 11; continue; } - _r$5 = c.readRecord(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$1 = _r$5; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$1]; - } - $s = 10; continue; - case 11: - data = c.hand.Next(4 + n >> 0); - m = $ifaceNil; - _1 = (0 >= data.$length ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + 0]); - /* */ if (_1 === (0)) { $s = 14; continue; } - /* */ if (_1 === (1)) { $s = 15; continue; } - /* */ if (_1 === (2)) { $s = 16; continue; } - /* */ if (_1 === (4)) { $s = 17; continue; } - /* */ if (_1 === (11)) { $s = 18; continue; } - /* */ if (_1 === (13)) { $s = 19; continue; } - /* */ if (_1 === (22)) { $s = 20; continue; } - /* */ if (_1 === (12)) { $s = 21; continue; } - /* */ if (_1 === (14)) { $s = 22; continue; } - /* */ if (_1 === (16)) { $s = 23; continue; } - /* */ if (_1 === (15)) { $s = 24; continue; } - /* */ if (_1 === (20)) { $s = 25; continue; } - /* */ if (_1 === (8)) { $s = 26; continue; } - /* */ if (_1 === (5)) { $s = 27; continue; } - /* */ if (_1 === (24)) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (_1 === (0)) { */ case 14: - m = new helloRequestMsg.ptr(); - $s = 30; continue; - /* } else if (_1 === (1)) { */ case 15: - m = new clientHelloMsg.ptr(sliceType$5.nil, 0, sliceType$5.nil, sliceType$5.nil, sliceType$2.nil, sliceType$5.nil, "", false, sliceType$3.nil, sliceType$5.nil, false, sliceType$5.nil, sliceType$7.nil, sliceType$7.nil, false, sliceType$5.nil, sliceType$1.nil, false, sliceType$2.nil, sliceType$5.nil, sliceType$15.nil, false, sliceType$5.nil, sliceType$16.nil, sliceType$11.nil); - $s = 30; continue; - /* } else if (_1 === (2)) { */ case 16: - m = new serverHelloMsg.ptr(sliceType$5.nil, 0, sliceType$5.nil, sliceType$5.nil, 0, 0, false, false, false, sliceType$5.nil, "", sliceType$11.nil, 0, new keyShare.ptr(0, sliceType$5.nil), false, 0, sliceType$5.nil, sliceType$5.nil, 0); - $s = 30; continue; - /* } else if (_1 === (4)) { */ case 17: - if (c.vers === 772) { - m = new newSessionTicketMsgTLS13.ptr(sliceType$5.nil, 0, 0, sliceType$5.nil, sliceType$5.nil, 0); - } else { - m = new newSessionTicketMsg.ptr(sliceType$5.nil, sliceType$5.nil); - } - $s = 30; continue; - /* } else if (_1 === (11)) { */ case 18: - if (c.vers === 772) { - m = new certificateMsgTLS13.ptr(sliceType$5.nil, new Certificate.ptr(sliceType$11.nil, $ifaceNil, sliceType$7.nil, sliceType$5.nil, sliceType$11.nil, ptrType$5.nil), false, false); - } else { - m = new certificateMsg.ptr(sliceType$5.nil, sliceType$11.nil); - } - $s = 30; continue; - /* } else if (_1 === (13)) { */ case 19: - if (c.vers === 772) { - m = new certificateRequestMsgTLS13.ptr(sliceType$5.nil, false, false, sliceType$7.nil, sliceType$7.nil, sliceType$11.nil); - } else { - m = new certificateRequestMsg.ptr(sliceType$5.nil, c.vers >= 771, sliceType$5.nil, sliceType$7.nil, sliceType$11.nil); - } - $s = 30; continue; - /* } else if (_1 === (22)) { */ case 20: - m = new certificateStatusMsg.ptr(sliceType$5.nil, sliceType$5.nil); - $s = 30; continue; - /* } else if (_1 === (12)) { */ case 21: - m = new serverKeyExchangeMsg.ptr(sliceType$5.nil, sliceType$5.nil); - $s = 30; continue; - /* } else if (_1 === (14)) { */ case 22: - m = new serverHelloDoneMsg.ptr(); - $s = 30; continue; - /* } else if (_1 === (16)) { */ case 23: - m = new clientKeyExchangeMsg.ptr(sliceType$5.nil, sliceType$5.nil); - $s = 30; continue; - /* } else if (_1 === (15)) { */ case 24: - m = new certificateVerifyMsg.ptr(sliceType$5.nil, c.vers >= 771, 0, sliceType$5.nil); - $s = 30; continue; - /* } else if (_1 === (20)) { */ case 25: - m = new finishedMsg.ptr(sliceType$5.nil, sliceType$5.nil); - $s = 30; continue; - /* } else if (_1 === (8)) { */ case 26: - m = new encryptedExtensionsMsg.ptr(sliceType$5.nil, ""); - $s = 30; continue; - /* } else if (_1 === (5)) { */ case 27: - m = new endOfEarlyDataMsg.ptr(); - $s = 30; continue; - /* } else if (_1 === (24)) { */ case 28: - m = new keyUpdateMsg.ptr(sliceType$5.nil, false); - $s = 30; continue; - /* } else { */ case 29: - _r$6 = c.sendAlert(10); /* */ $s = 31; case 31: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = c.in$27.setErrorLocked(_r$6); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = [$ifaceNil, _r$7]; - $s = 33; case 33: return $24r$1; - /* } */ case 30: - case 13: - data = $appendSlice((sliceType$5.nil), data); - _r$8 = m.unmarshal(data); /* */ $s = 36; case 36: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if (!_r$8) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!_r$8) { */ case 34: - _r$9 = c.sendAlert(10); /* */ $s = 37; case 37: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = c.in$27.setErrorLocked(_r$9); /* */ $s = 38; case 38: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$2 = [$ifaceNil, _r$10]; - $s = 39; case 39: return $24r$2; - /* } */ case 35: - $s = -1; return [m, $ifaceNil]; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.readHandshake, $c: true, $r, $24r, $24r$1, $24r$2, _1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, c, data, err, err$1, m, n, $s};return $f; - }; - Conn.prototype.readHandshake = function() { return this.$val.readHandshake(); }; - Conn.ptr.prototype.Write = function(b) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, err, err$1, err$2, err$3, m, n, n$1, ok, x, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - /* while (true) { */ case 1: - x = atomic.LoadInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$43(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c)))); - /* */ if (!(((x & 1) === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(((x & 1) === 0))) { */ case 3: - $24r = [0, net.ErrClosed]; - $s = 5; case 5: return $24r; - /* } */ case 4: - if (atomic.CompareAndSwapInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$43(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c))), x, x + 2 >> 0)) { - /* break; */ $s = 2; continue; - } - $s = 1; continue; - case 2: - $deferred.push([atomic.AddInt32, [(c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$43(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c))), -2]]); - _r$1 = c.Handshake(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - $24r$1 = [0, err]; - $s = 9; case 9: return $24r$1; - /* } */ case 8: - $r = c.out.Mutex.Lock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); - err$1 = c.out.err; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 11: - $24r$2 = [0, err$1]; - $s = 13; case 13: return $24r$2; - /* } */ case 12: - /* */ if (!c.handshakeComplete()) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!c.handshakeComplete()) { */ case 14: - $24r$3 = [0, new alert(80)]; - $s = 16; case 16: return $24r$3; - /* } */ case 15: - /* */ if (c.closeNotifySent) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (c.closeNotifySent) { */ case 17: - $24r$4 = [0, errShutdown]; - $s = 19; case 19: return $24r$4; - /* } */ case 18: - m = 0; - /* */ if (b.$length > 1 && (c.vers === 769)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (b.$length > 1 && (c.vers === 769)) { */ case 20: - _tuple = $assertType(c.out.cipher, cipher.BlockMode, true); - ok = _tuple[1]; - /* */ if (ok) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (ok) { */ case 22: - _r$2 = c.writeRecordLocked(23, $subslice(b, 0, 1)); /* */ $s = 24; case 24: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err$2 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 25: - $24r$5 = [n, c.out.setErrorLocked(err$2)]; - $s = 27; case 27: return $24r$5; - /* } */ case 26: - _tmp = 1; - _tmp$1 = $subslice(b, 1); - m = _tmp; - b = _tmp$1; - /* } */ case 23: - /* } */ case 21: - _r$3 = c.writeRecordLocked(23, b); /* */ $s = 28; case 28: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - n$1 = _tuple$2[0]; - err$3 = _tuple$2[1]; - $24r$6 = [n$1 + m >> 0, c.out.setErrorLocked(err$3)]; - $s = 29; case 29: return $24r$6; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.Write, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, b, c, err, err$1, err$2, err$3, m, n, n$1, ok, x, $s, $deferred};return $f; } } - }; - Conn.prototype.Write = function(b) { return this.$val.Write(b); }; - Conn.ptr.prototype.handleRenegotiation = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, c, err, helloReq, msg, ok, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - /* */ if (c.vers === 772) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (c.vers === 772) { */ case 1: - $24r = errors.New("tls: internal error: unexpected renegotiation"); - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = c.readHandshake(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - msg = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - $24r$1 = err; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - _tuple$1 = $assertType(msg, ptrType$44, true); - helloReq = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (!ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!ok) { */ case 8: - _r$2 = c.sendAlert(10); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = unexpectedMessageError(helloReq, msg); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 12; case 12: return $24r$2; - /* } */ case 9: - /* */ if (!c.isClient) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!c.isClient) { */ case 13: - _r$4 = c.sendAlert(100); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$3 = _r$4; - $s = 16; case 16: return $24r$3; - /* } */ case 14: - _1 = c.config.Renegotiation; - /* */ if (_1 === (0)) { $s = 18; continue; } - /* */ if (_1 === (1)) { $s = 19; continue; } - /* */ if (_1 === (2)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_1 === (0)) { */ case 18: - _r$5 = c.sendAlert(100); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$4 = _r$5; - $s = 24; case 24: return $24r$4; - /* } else if (_1 === (1)) { */ case 19: - /* */ if (c.handshakes > 1) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (c.handshakes > 1) { */ case 25: - _r$6 = c.sendAlert(100); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$5 = _r$6; - $s = 28; case 28: return $24r$5; - /* } */ case 26: - $s = 22; continue; - /* } else if (_1 === (2)) { */ case 20: - $s = 22; continue; - /* } else { */ case 21: - _r$7 = c.sendAlert(80); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $24r$6 = errors.New("tls: unknown Renegotiation value"); - $s = 30; case 30: return $24r$6; - /* } */ case 22: - case 17: - $r = c.handshakeMutex.Lock(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); - atomic.StoreUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$24(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c))), 0); - _r$8 = c.clientHandshake(context.Background()); /* */ $s = 32; case 32: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - c.handshakeErr = _r$8; - if ($interfaceIsEqual(c.handshakeErr, $ifaceNil)) { - c.handshakes = c.handshakes + (1) >> 0; - } - $24r$7 = c.handshakeErr; - $s = 33; case 33: return $24r$7; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.handleRenegotiation, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, c, err, helloReq, msg, ok, $s, $deferred};return $f; } } - }; - Conn.prototype.handleRenegotiation = function() { return this.$val.handleRenegotiation(); }; - Conn.ptr.prototype.handlePostHandshakeMessage = function() { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, c, err, msg, msg$1, msg$2, msg$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - /* */ if (!((c.vers === 772))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((c.vers === 772))) { */ case 1: - _r$1 = c.handleRenegotiation(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$2 = c.readHandshake(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - msg = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - c.retryCount = c.retryCount + (1) >> 0; - /* */ if (c.retryCount > 16) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (c.retryCount > 16) { */ case 6: - _r$3 = c.sendAlert(10); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return c.in$27.setErrorLocked(errors.New("tls: too many non-advancing records")); - /* } */ case 7: - _ref = msg; - /* */ if ($assertType(_ref, ptrType$45, true)[1]) { $s = 9; continue; } - /* */ if ($assertType(_ref, ptrType$46, true)[1]) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ($assertType(_ref, ptrType$45, true)[1]) { */ case 9: - msg$1 = _ref.$val; - _r$4 = c.handleNewSessionTicket(msg$1); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 14; case 14: return $24r$1; - /* } else if ($assertType(_ref, ptrType$46, true)[1]) { */ case 10: - msg$2 = _ref.$val; - _r$5 = c.handleKeyUpdate(msg$2); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = _r$5; - $s = 16; case 16: return $24r$2; - /* } else { */ case 11: - msg$3 = _ref; - _r$6 = c.sendAlert(10); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = fmt.Errorf("tls: received unexpected handshake message of type %T", new sliceType$6([msg$3])); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$3 = _r$7; - $s = 19; case 19: return $24r$3; - /* } */ case 12: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.handlePostHandshakeMessage, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, c, err, msg, msg$1, msg$2, msg$3, $s};return $f; - }; - Conn.prototype.handlePostHandshakeMessage = function() { return this.$val.handlePostHandshakeMessage(); }; - Conn.ptr.prototype.handleKeyUpdate = function(keyUpdate) { - var {$24r, $24r$1, $24r$2, _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, c, cipherSuite$1, err, keyUpdate, msg, newSecret, newSecret$1, $s, $deferred, $r, $c} = $restore(this, {keyUpdate}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - cipherSuite$1 = cipherSuiteTLS13ByID(c.cipherSuite); - /* */ if (cipherSuite$1 === ptrType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (cipherSuite$1 === ptrType$2.nil) { */ case 1: - _r$1 = c.sendAlert(80); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = c.in$27.setErrorLocked(_r$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 2: - _r$3 = cipherSuite$1.nextTrafficSecret(c.in$27.trafficSecret); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - newSecret = _r$3; - $r = c.in$27.setTrafficSecret(cipherSuite$1, newSecret); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (keyUpdate.updateRequested) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (keyUpdate.updateRequested) { */ case 8: - $r = c.out.Mutex.Lock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); - msg = new keyUpdateMsg.ptr(sliceType$5.nil, false); - _r$4 = msg.marshal(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg = _r$4; - _r$5 = c.writeRecordLocked(22, _arg); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 13: - c.out.setErrorLocked(err); - $24r$1 = $ifaceNil; - $s = 15; case 15: return $24r$1; - /* } */ case 14: - _r$6 = cipherSuite$1.nextTrafficSecret(c.out.trafficSecret); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - newSecret$1 = _r$6; - $r = c.out.setTrafficSecret(cipherSuite$1, newSecret$1); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - $24r$2 = $ifaceNil; - $s = 18; case 18: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.handleKeyUpdate, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, c, cipherSuite$1, err, keyUpdate, msg, newSecret, newSecret$1, $s, $deferred};return $f; } } - }; - Conn.prototype.handleKeyUpdate = function(keyUpdate) { return this.$val.handleKeyUpdate(keyUpdate); }; - Conn.ptr.prototype.Read = function(b) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _r$3, _r$4, _tuple, b, c, err, err$1, err$2, err$3, n, x, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - _r$1 = c.Handshake(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [0, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - /* */ if (b.$length === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (b.$length === 0) { */ case 5: - $24r$1 = [0, $ifaceNil]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - $r = c.in$27.Mutex.Lock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.in$27.Mutex, "Unlock"), []]); - /* while (true) { */ case 9: - /* if (!(c.input.Len() === 0)) { break; } */ if(!(c.input.Len() === 0)) { $s = 10; continue; } - _r$2 = c.readRecord(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 12: - $24r$2 = [0, err$1]; - $s = 14; case 14: return $24r$2; - /* } */ case 13: - /* while (true) { */ case 15: - /* if (!(c.hand.Len() > 0)) { break; } */ if(!(c.hand.Len() > 0)) { $s = 16; continue; } - _r$3 = c.handlePostHandshakeMessage(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$2 = _r$3; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 18: - $24r$3 = [0, err$2]; - $s = 20; case 20: return $24r$3; - /* } */ case 19: - $s = 15; continue; - case 16: - $s = 9; continue; - case 10: - _tuple = c.input.Read(b); - n = _tuple[0]; - /* */ if (!((n === 0)) && (c.input.Len() === 0) && c.rawInput.Len() > 0 && ((((x = c.rawInput.Bytes(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) << 24 >>> 24)) === 21)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!((n === 0)) && (c.input.Len() === 0) && c.rawInput.Len() > 0 && ((((x = c.rawInput.Bytes(), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) << 24 >>> 24)) === 21)) { */ case 21: - _r$4 = c.readRecord(); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$3 = _r$4; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 24: - $24r$4 = [n, err$3]; - $s = 26; case 26: return $24r$4; - /* } */ case 25: - /* } */ case 22: - $24r$5 = [n, $ifaceNil]; - $s = 27; case 27: return $24r$5; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [0, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _r$3, _r$4, _tuple, b, c, err, err$1, err$2, err$3, n, x, $s, $deferred};return $f; } } - }; - Conn.prototype.Read = function(b) { return this.$val.Read(b); }; - Conn.ptr.prototype.Close = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, alertErr, c, err, err$1, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - x = 0; - while (true) { - x = atomic.LoadInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$43(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c)))); - if (!(((x & 1) === 0))) { - $s = -1; return net.ErrClosed; - } - if (atomic.CompareAndSwapInt32((c.$ptr_activeCall || (c.$ptr_activeCall = new ptrType$43(function() { return this.$target.activeCall; }, function($v) { this.$target.activeCall = $v; }, c))), x, x | 1)) { - break; - } - } - /* */ if (!((x === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x === 0))) { */ case 1: - _r$1 = c.conn.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - alertErr = $ifaceNil; - /* */ if (c.handshakeComplete()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (c.handshakeComplete()) { */ case 5: - _r$2 = c.closeNotify(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: - _r$3 = fmt.Errorf("tls: failed to send closeNotify alert (but connection was closed anyway): %w", new sliceType$6([err])); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - alertErr = _r$3; - /* } */ case 9: - /* } */ case 6: - _r$4 = c.conn.Close(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$1 = _r$4; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = -1; return alertErr; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.Close, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, alertErr, c, err, err$1, x, $s};return $f; - }; - Conn.prototype.Close = function() { return this.$val.Close(); }; - Conn.ptr.prototype.CloseWrite = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!c.handshakeComplete()) { - $s = -1; return errEarlyCloseWrite; - } - _r$1 = c.closeNotify(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.CloseWrite, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - Conn.prototype.CloseWrite = function() { return this.$val.CloseWrite(); }; - Conn.ptr.prototype.closeNotify = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, c, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.out.Mutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.out.Mutex, "Unlock"), []]); - /* */ if (!c.closeNotifySent) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!c.closeNotifySent) { */ case 2: - _r$1 = time.Now(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Add(new time.Duration(1, 705032704)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = c.SetWriteDeadline($clone(_r$2, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = c.sendAlertLocked(0); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - c.closeNotifyErr = _r$4; - c.closeNotifySent = true; - _r$5 = time.Now(); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = c.SetWriteDeadline($clone(_r$5, time.Time)); /* */ $s = 9; case 9: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 3: - $24r = c.closeNotifyErr; - $s = 10; case 10: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.closeNotify, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, c, $s, $deferred};return $f; } } - }; - Conn.prototype.closeNotify = function() { return this.$val.closeNotify(); }; - Conn.ptr.prototype.Handshake = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.HandshakeContext(context.Background()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.Handshake, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - Conn.prototype.Handshake = function() { return this.$val.Handshake(); }; - Conn.ptr.prototype.HandshakeContext = function(ctx) { - var {$24r, _r$1, c, ctx, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.handshakeContext(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Conn.ptr.prototype.HandshakeContext, $c: true, $r, $24r, _r$1, c, ctx, $s};return $f; - }; - Conn.prototype.HandshakeContext = function(ctx) { return this.$val.HandshakeContext(ctx); }; - Conn.ptr.prototype.handshakeContext = function(ctx) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _tuple, c, cancel, ctx, done, err, handshakeCtx, interruptRes, ret, $s, $deferred, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = [c]; - done = [done]; - handshakeCtx = [handshakeCtx]; - interruptRes = [interruptRes]; - ret = [ret]; - ret[0] = $ifaceNil; - c[0] = this; - /* */ if (c[0].handshakeComplete()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (c[0].handshakeComplete()) { */ case 1: - ret[0] = $ifaceNil; - $24r = ret[0]; - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = context.WithCancel(ctx); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - handshakeCtx[0] = _tuple[0]; - cancel = _tuple[1]; - $deferred.push([cancel, []]); - _r$2 = ctx.Done(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!(_r$2 === $chanNil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(_r$2 === $chanNil)) { */ case 5: - done[0] = new $Chan(structType$1, 0); - interruptRes[0] = new $Chan($error, 1); - $deferred.push([(function(c, done, handshakeCtx, interruptRes, ret) { return function $b() { - var {_r$3, ctxErr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $close(done[0]); - _r$3 = $recv(interruptRes[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ctxErr = _r$3[0]; - if (!($interfaceIsEqual(ctxErr, $ifaceNil))) { - ret[0] = ctxErr; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$3, ctxErr, $s};return $f; - }; })(c, done, handshakeCtx, interruptRes, ret), []]); - $go((function(c, done, handshakeCtx, interruptRes, ret) { return function $b() { - var {_r$3, _r$4, _r$5, _r$6, _selection, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$3 = handshakeCtx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $select([[_r$3], [done[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _selection = _r$4; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_selection[0] === 0) { */ case 3: - _r$5 = c[0].conn.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $unused(_r$5); - _r$6 = handshakeCtx[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = $send(interruptRes[0], _r$6); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if (_selection[0] === 1) { */ case 4: - $r = $send(interruptRes[0], $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$3, _r$4, _r$5, _r$6, _selection, $s};return $f; - }; })(c, done, handshakeCtx, interruptRes, ret), []); - /* } */ case 6: - $r = c[0].handshakeMutex.Lock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c[0].handshakeMutex, "Unlock"), []]); - err = c[0].handshakeErr; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 9: - ret[0] = err; - $24r$1 = ret[0]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - /* */ if (c[0].handshakeComplete()) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (c[0].handshakeComplete()) { */ case 12: - ret[0] = $ifaceNil; - $24r$2 = ret[0]; - $s = 14; case 14: return $24r$2; - /* } */ case 13: - $r = c[0].in$27.Mutex.Lock(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c[0].in$27.Mutex, "Unlock"), []]); - _r$3 = c[0].handshakeFn(handshakeCtx[0]); /* */ $s = 16; case 16: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - c[0].handshakeErr = _r$3; - /* */ if ($interfaceIsEqual(c[0].handshakeErr, $ifaceNil)) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if ($interfaceIsEqual(c[0].handshakeErr, $ifaceNil)) { */ case 17: - c[0].handshakes = c[0].handshakes + (1) >> 0; - $s = 19; continue; - /* } else { */ case 18: - _r$4 = c[0].flush(); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 19: - if ($interfaceIsEqual(c[0].handshakeErr, $ifaceNil) && !c[0].handshakeComplete()) { - c[0].handshakeErr = errors.New("tls: internal error: handshake should have had a result"); - } - if (!($interfaceIsEqual(c[0].handshakeErr, $ifaceNil)) && c[0].handshakeComplete()) { - $panic(new $String("tls: internal error: handshake returned an error but is marked successful")); - } - ret[0] = c[0].handshakeErr; - $24r$3 = ret[0]; - $s = 21; case 21: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return ret[0]; } if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.handshakeContext, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _tuple, c, cancel, ctx, done, err, handshakeCtx, interruptRes, ret, $s, $deferred};return $f; } } - }; - Conn.prototype.handshakeContext = function(ctx) { return this.$val.handshakeContext(ctx); }; - Conn.ptr.prototype.ConnectionState = function() { - var {$24r, c, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); - $24r = c.connectionStateLocked(); - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return new ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$12.nil, sliceType$13.nil, sliceType$11.nil, sliceType$5.nil, sliceType$5.nil, $throwNilPointerError); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.ConnectionState, $c: true, $r, $24r, c, $s, $deferred};return $f; } } - }; - Conn.prototype.ConnectionState = function() { return this.$val.ConnectionState(); }; - Conn.ptr.prototype.connectionStateLocked = function() { - var c, state; - c = this; - state = new ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$12.nil, sliceType$13.nil, sliceType$11.nil, sliceType$5.nil, sliceType$5.nil, $throwNilPointerError); - state.HandshakeComplete = c.handshakeComplete(); - state.Version = c.vers; - state.NegotiatedProtocol = c.clientProtocol; - state.DidResume = c.didResume; - state.NegotiatedProtocolIsMutual = true; - state.ServerName = c.serverName; - state.CipherSuite = c.cipherSuite; - state.PeerCertificates = c.peerCertificates; - state.VerifiedChains = c.verifiedChains; - state.SignedCertificateTimestamps = c.scts; - state.OCSPResponse = c.ocspResponse; - if (!c.didResume && !((c.vers === 772))) { - if (c.clientFinishedIsFirst) { - state.TLSUnique = new sliceType$5(c.clientFinished); - } else { - state.TLSUnique = new sliceType$5(c.serverFinished); - } - } - if (!((c.config.Renegotiation === 0))) { - state.ekm = noExportedKeyingMaterial; - } else { - state.ekm = c.ekm; - } - return state; - }; - Conn.prototype.connectionStateLocked = function() { return this.$val.connectionStateLocked(); }; - Conn.ptr.prototype.OCSPResponse = function() { - var {$24r, c, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); - $24r = c.ocspResponse; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType$5.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.OCSPResponse, $c: true, $r, $24r, c, $s, $deferred};return $f; } } - }; - Conn.prototype.OCSPResponse = function() { return this.$val.OCSPResponse(); }; - Conn.ptr.prototype.VerifyHostname = function(host) { - var {$24r, $24r$1, $24r$2, $24r$3, c, host, x, $s, $deferred, $r, $c} = $restore(this, {host}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.handshakeMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.handshakeMutex, "Unlock"), []]); - /* */ if (!c.isClient) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!c.isClient) { */ case 2: - $24r = errors.New("tls: VerifyHostname called on TLS server connection"); - $s = 4; case 4: return $24r; - /* } */ case 3: - /* */ if (!c.handshakeComplete()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!c.handshakeComplete()) { */ case 5: - $24r$1 = errors.New("tls: handshake has not yet been performed"); - $s = 7; case 7: return $24r$1; - /* } */ case 6: - /* */ if (c.verifiedChains.$length === 0) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (c.verifiedChains.$length === 0) { */ case 8: - $24r$2 = errors.New("tls: handshake did not verify certificate chain"); - $s = 10; case 10: return $24r$2; - /* } */ case 9: - $24r$3 = (x = c.peerCertificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])).VerifyHostname(host); - $s = 11; case 11: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Conn.ptr.prototype.VerifyHostname, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, c, host, x, $s, $deferred};return $f; } } - }; - Conn.prototype.VerifyHostname = function(host) { return this.$val.VerifyHostname(host); }; - Conn.ptr.prototype.handshakeComplete = function() { - var c; - c = this; - return atomic.LoadUint32((c.$ptr_handshakeStatus || (c.$ptr_handshakeStatus = new ptrType$24(function() { return this.$target.handshakeStatus; }, function($v) { this.$target.handshakeStatus = $v; }, c)))) === 1; - }; - Conn.prototype.handshakeComplete = function() { return this.$val.handshakeComplete(); }; - SignatureScheme.prototype.String = function() { - var i, x; - i = this.$val; - if ((i === 513)) { - return "PKCS1WithSHA1"; - } else if ((i === 515)) { - return "ECDSAWithSHA1"; - } else if ((i === 1025)) { - return "PKCS1WithSHA256"; - } else if ((i === 1027)) { - return "ECDSAWithP256AndSHA256"; - } else if ((i === 1281)) { - return "PKCS1WithSHA384"; - } else if ((i === 1283)) { - return "ECDSAWithP384AndSHA384"; - } else if ((i === 1537)) { - return "PKCS1WithSHA512"; - } else if ((i === 1539)) { - return "ECDSAWithP521AndSHA512"; - } else if (2052 <= i && i <= 2055) { - i = i - (2052) << 16 >>> 16; - return $substring("PSSWithSHA256PSSWithSHA384PSSWithSHA512Ed25519", ((i < 0 || i >= _SignatureScheme_index_8.length) ? ($throwRuntimeError("index out of range"), undefined) : _SignatureScheme_index_8[i]), (x = i + 1 << 16 >>> 16, ((x < 0 || x >= _SignatureScheme_index_8.length) ? ($throwRuntimeError("index out of range"), undefined) : _SignatureScheme_index_8[x]))); - } else { - return "SignatureScheme(" + strconv.FormatInt((new $Int64(0, i)), 10) + ")"; - } - }; - $ptrType(SignatureScheme).prototype.String = function() { return new SignatureScheme(this.$get()).String(); }; - CurveID.prototype.String = function() { - var i, x; - i = this.$val; - if (23 <= i && i <= 25) { - i = i - (23) << 16 >>> 16; - return $substring("CurveP256CurveP384CurveP521", ((i < 0 || i >= _CurveID_index_0.length) ? ($throwRuntimeError("index out of range"), undefined) : _CurveID_index_0[i]), (x = i + 1 << 16 >>> 16, ((x < 0 || x >= _CurveID_index_0.length) ? ($throwRuntimeError("index out of range"), undefined) : _CurveID_index_0[x]))); - } else if ((i === 29)) { - return "X25519"; - } else { - return "CurveID(" + strconv.FormatInt((new $Int64(0, i)), 10) + ")"; - } - }; - $ptrType(CurveID).prototype.String = function() { return new CurveID(this.$get()).String(); }; - ClientAuthType.prototype.String = function() { - var i, x; - i = this.$val; - if (i < 0 || i >= 5) { - return "ClientAuthType(" + strconv.FormatInt((new $Int64(0, i)), 10) + ")"; - } - return $substring("NoClientCertRequestClientCertRequireAnyClientCertVerifyClientCertIfGivenRequireAndVerifyClientCert", ((i < 0 || i >= _ClientAuthType_index.length) ? ($throwRuntimeError("index out of range"), undefined) : _ClientAuthType_index[i]), (x = i + 1 >> 0, ((x < 0 || x >= _ClientAuthType_index.length) ? ($throwRuntimeError("index out of range"), undefined) : _ClientAuthType_index[x]))); - }; - $ptrType(ClientAuthType).prototype.String = function() { return new ClientAuthType(this.$get()).String(); }; - ConnectionState.ptr.prototype.ExportKeyingMaterial = function(label, context$1, length) { - var {$24r, _r$1, context$1, cs, label, length, $s, $r, $c} = $restore(this, {label, context$1, length}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cs = this; - _r$1 = cs.ekm(label, context$1, length); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ConnectionState.ptr.prototype.ExportKeyingMaterial, $c: true, $r, $24r, _r$1, context$1, cs, label, length, $s};return $f; - }; - ConnectionState.prototype.ExportKeyingMaterial = function(label, context$1, length) { return this.$val.ExportKeyingMaterial(label, context$1, length); }; - requiresClientCert = function(c) { - var _1, c; - _1 = c; - if ((_1 === (2)) || (_1 === (4))) { - return true; - } else { - return false; - } - }; - ClientHelloInfo.ptr.prototype.Context = function() { - var c; - c = this; - return c.ctx; - }; - ClientHelloInfo.prototype.Context = function() { return this.$val.Context(); }; - CertificateRequestInfo.ptr.prototype.Context = function() { - var c; - c = this; - return c.ctx; - }; - CertificateRequestInfo.prototype.Context = function() { return this.$val.Context(); }; - Config.ptr.prototype.ticketKeyFromBytes = function(b) { - var {_r$1, b, c, hashed, key, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - key = new ticketKey.ptr(arrayType$4.zero(), arrayType$4.zero(), arrayType$4.zero(), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType$7.nil)); - c = this; - hashed = $clone(sha512.Sum512(new sliceType$5(b)), arrayType$7); - $copySlice(new sliceType$5(key.keyName), $subslice(new sliceType$5(hashed), 0, 16)); - $copySlice(new sliceType$5(key.aesKey), $subslice(new sliceType$5(hashed), 16, 32)); - $copySlice(new sliceType$5(key.hmacKey), $subslice(new sliceType$5(hashed), 32, 48)); - _r$1 = c.time(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - time.Time.copy(key.created, _r$1); - ticketKey.copy(key, key); - $s = -1; return key; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.ticketKeyFromBytes, $c: true, $r, _r$1, b, c, hashed, key, $s};return $f; - }; - Config.prototype.ticketKeyFromBytes = function(b) { return this.$val.ticketKeyFromBytes(b); }; - Config.ptr.prototype.Clone = function() { - var {$24r, $24r$1, c, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - /* */ if (c === ptrType$4.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (c === ptrType$4.nil) { */ case 1: - $24r = ptrType$4.nil; - $s = 3; case 3: return $24r; - /* } */ case 2: - $r = c.mutex.RLock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mutex, "RUnlock"), []]); - $24r$1 = new Config.ptr(c.Rand, c.Time, c.Certificates, c.NameToCertificate, c.GetCertificate, c.GetClientCertificate, c.GetConfigForClient, c.VerifyPeerCertificate, c.VerifyConnection, c.RootCAs, c.NextProtos, c.ServerName, c.ClientAuth, c.ClientCAs, c.InsecureSkipVerify, c.CipherSuites, c.PreferServerCipherSuites, c.SessionTicketsDisabled, $clone(c.SessionTicketKey, arrayType), c.ClientSessionCache, c.MinVersion, c.MaxVersion, c.CurvePreferences, c.DynamicRecordSizingDisabled, c.Renegotiation, c.KeyLogWriter, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), c.sessionTicketKeys, c.autoSessionTicketKeys); - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return ptrType$4.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Config.ptr.prototype.Clone, $c: true, $r, $24r, $24r$1, c, $s, $deferred};return $f; } } - }; - Config.prototype.Clone = function() { return this.$val.Clone(); }; - Config.ptr.prototype.initLegacySessionTicketKeyRLocked = function() { - var {_r$1, _r$2, _r$3, _tuple, c, err, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - /* */ if (!($equal(c.SessionTicketKey, arrayType.zero(), arrayType)) && (bytes.HasPrefix(new sliceType$5(c.SessionTicketKey), deprecatedSessionTicketKey) || c.sessionTicketKeys.$length > 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($equal(c.SessionTicketKey, arrayType.zero(), arrayType)) && (bytes.HasPrefix(new sliceType$5(c.SessionTicketKey), deprecatedSessionTicketKey) || c.sessionTicketKeys.$length > 0)) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - $r = c.mutex.RUnlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mutex, "RLock"), []]); - $r = c.mutex.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mutex, "Unlock"), []]); - /* */ if ($equal(c.SessionTicketKey, arrayType.zero(), arrayType)) { $s = 6; continue; } - /* */ if (!bytes.HasPrefix(new sliceType$5(c.SessionTicketKey), deprecatedSessionTicketKey) && (c.sessionTicketKeys.$length === 0)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($equal(c.SessionTicketKey, arrayType.zero(), arrayType)) { */ case 6: - _r$1 = io.ReadFull(c.rand(), new sliceType$5(c.SessionTicketKey)); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 10: - _r$2 = fmt.Sprintf("tls: unable to generate random session ticket key: %v", new sliceType$6([err])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $panic(new $String(_r$2)); - /* } */ case 11: - $copySlice(new sliceType$5(c.SessionTicketKey), deprecatedSessionTicketKey); - $s = 8; continue; - /* } else if (!bytes.HasPrefix(new sliceType$5(c.SessionTicketKey), deprecatedSessionTicketKey) && (c.sessionTicketKeys.$length === 0)) { */ case 7: - _r$3 = c.ticketKeyFromBytes($clone(c.SessionTicketKey, arrayType)); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - c.sessionTicketKeys = new sliceType$4([$clone(_r$3, ticketKey)]); - /* } */ case 8: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Config.ptr.prototype.initLegacySessionTicketKeyRLocked, $c: true, $r, _r$1, _r$2, _r$3, _tuple, c, err, $s, $deferred};return $f; } } - }; - Config.prototype.initLegacySessionTicketKeyRLocked = function() { return this.$val.initLegacySessionTicketKeyRLocked(); }; - Config.ptr.prototype.ticketKeys = function(configForClient) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _v, _v$1, c, configForClient, err, k, newKey, ret, valid, x, x$1, x$2, x$3, x$4, $s, $deferred, $r, $c} = $restore(this, {configForClient}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - /* */ if (!(configForClient === ptrType$4.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(configForClient === ptrType$4.nil)) { */ case 1: - $r = configForClient.mutex.RLock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (configForClient.SessionTicketsDisabled) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (configForClient.SessionTicketsDisabled) { */ case 4: - $24r = sliceType$4.nil; - $s = 6; case 6: return $24r; - /* } */ case 5: - $r = configForClient.initLegacySessionTicketKeyRLocked(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((configForClient.sessionTicketKeys.$length === 0))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!((configForClient.sessionTicketKeys.$length === 0))) { */ case 8: - ret = configForClient.sessionTicketKeys; - $r = configForClient.mutex.RUnlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$1 = ret; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - $r = configForClient.mutex.RUnlock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $r = c.mutex.RLock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mutex, "RUnlock"), []]); - /* */ if (c.SessionTicketsDisabled) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (c.SessionTicketsDisabled) { */ case 14: - $24r$2 = sliceType$4.nil; - $s = 16; case 16: return $24r$2; - /* } */ case 15: - $r = c.initLegacySessionTicketKeyRLocked(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((c.sessionTicketKeys.$length === 0))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!((c.sessionTicketKeys.$length === 0))) { */ case 18: - $24r$3 = c.sessionTicketKeys; - $s = 20; case 20: return $24r$3; - /* } */ case 19: - if (!(c.autoSessionTicketKeys.$length > 0)) { _v = false; $s = 23; continue s; } - _r$1 = c.time(); /* */ $s = 24; case 24: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Sub($clone((x$1 = c.autoSessionTicketKeys, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])).created, time.Time)); /* */ $s = 25; case 25: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = (x = _r$2, (x.$high < 20116 || (x.$high === 20116 && x.$low < 2437873664))); case 23: - /* */ if (_v) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_v) { */ case 21: - $24r$4 = c.autoSessionTicketKeys; - $s = 26; case 26: return $24r$4; - /* } */ case 22: - $r = c.mutex.RUnlock(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mutex, "RLock"), []]); - $r = c.mutex.Lock(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mutex, "Unlock"), []]); - if (c.autoSessionTicketKeys.$length === 0) { _v$1 = true; $s = 31; continue s; } - _r$3 = c.time(); /* */ $s = 32; case 32: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = $clone(_r$3, time.Time).Sub($clone((x$3 = c.autoSessionTicketKeys, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])).created, time.Time)); /* */ $s = 33; case 33: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v$1 = (x$2 = _r$4, (x$2.$high > 20116 || (x$2.$high === 20116 && x$2.$low >= 2437873664))); case 31: - /* */ if (_v$1) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (_v$1) { */ case 29: - newKey = arrayType.zero(); - _r$5 = io.ReadFull(c.rand(), new sliceType$5(newKey)); /* */ $s = 34; case 34: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 35: - _r$6 = fmt.Sprintf("unable to generate random session ticket key: %v", new sliceType$6([err])); /* */ $s = 37; case 37: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $panic(new $String(_r$6)); - /* } */ case 36: - valid = $makeSlice(sliceType$4, 0, (c.autoSessionTicketKeys.$length + 1 >> 0)); - _r$7 = c.ticketKeyFromBytes($clone(newKey, arrayType)); /* */ $s = 38; case 38: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - valid = $append(valid, _r$7); - _ref = c.autoSessionTicketKeys; - _i = 0; - /* while (true) { */ case 39: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 40; continue; } - k = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), ticketKey); - _r$8 = c.time(); /* */ $s = 43; case 43: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $clone(_r$8, time.Time).Sub($clone(k.created, time.Time)); /* */ $s = 44; case 44: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if ((x$4 = _r$9, (x$4.$high < 140815 || (x$4.$high === 140815 && x$4.$low < 4180213760)))) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if ((x$4 = _r$9, (x$4.$high < 140815 || (x$4.$high === 140815 && x$4.$low < 4180213760)))) { */ case 41: - valid = $append(valid, k); - /* } */ case 42: - _i++; - $s = 39; continue; - case 40: - c.autoSessionTicketKeys = valid; - /* } */ case 30: - $24r$5 = c.autoSessionTicketKeys; - $s = 45; case 45: return $24r$5; - /* */ } return; } } catch(err) { $err = err; $s = -1; return sliceType$4.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Config.ptr.prototype.ticketKeys, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _v, _v$1, c, configForClient, err, k, newKey, ret, valid, x, x$1, x$2, x$3, x$4, $s, $deferred};return $f; } } - }; - Config.prototype.ticketKeys = function(configForClient) { return this.$val.ticketKeys(configForClient); }; - Config.ptr.prototype.SetSessionTicketKeys = function(keys) { - var {_i, _r$1, _ref, bytes$1, c, i, keys, newKeys, $s, $r, $c} = $restore(this, {keys}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (keys.$length === 0) { - $panic(new $String("tls: keys must have at least one key")); - } - newKeys = $makeSlice(sliceType$4, keys.$length); - _ref = keys; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - bytes$1 = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), arrayType); - _r$1 = c.ticketKeyFromBytes($clone(bytes$1, arrayType)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ticketKey.copy(((i < 0 || i >= newKeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : newKeys.$array[newKeys.$offset + i]), _r$1); - _i++; - $s = 1; continue; - case 2: - $r = c.mutex.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - c.sessionTicketKeys = newKeys; - $r = c.mutex.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.SetSessionTicketKeys, $c: true, $r, _i, _r$1, _ref, bytes$1, c, i, keys, newKeys, $s};return $f; - }; - Config.prototype.SetSessionTicketKeys = function(keys) { return this.$val.SetSessionTicketKeys(keys); }; - Config.ptr.prototype.rand = function() { - var c, r; - c = this; - r = c.Rand; - if ($interfaceIsEqual(r, $ifaceNil)) { - return rand.Reader; - } - return r; - }; - Config.prototype.rand = function() { return this.$val.rand(); }; - Config.ptr.prototype.time = function() { - var {$24r, _r$1, c, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - t = c.Time; - if (t === $throwNilPointerError) { - t = time.Now; - } - _r$1 = t(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.time, $c: true, $r, $24r, _r$1, c, t, $s};return $f; - }; - Config.prototype.time = function() { return this.$val.time(); }; - Config.ptr.prototype.cipherSuites = function() { - var c; - c = this; - if (!(c.CipherSuites === sliceType$2.nil)) { - return c.CipherSuites; - } - return defaultCipherSuites; - }; - Config.prototype.cipherSuites = function() { return this.$val.cipherSuites(); }; - Config.ptr.prototype.supportedVersions = function(isClient) { - var _i, _ref, c, isClient, v, versions; - c = this; - versions = $makeSlice(sliceType$2, 0, supportedVersions.$length); - _ref = supportedVersions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ((c === ptrType$4.nil || (c.MinVersion === 0)) && !debugEnableTLS10 && isClient && v < 771) { - _i++; - continue; - } - if (!(c === ptrType$4.nil) && !((c.MinVersion === 0)) && v < c.MinVersion) { - _i++; - continue; - } - if (!(c === ptrType$4.nil) && !((c.MaxVersion === 0)) && v > c.MaxVersion) { - _i++; - continue; - } - versions = $append(versions, v); - _i++; - } - return versions; - }; - Config.prototype.supportedVersions = function(isClient) { return this.$val.supportedVersions(isClient); }; - Config.ptr.prototype.maxSupportedVersion = function(isClient) { - var c, isClient, supportedVersions$1; - c = this; - supportedVersions$1 = c.supportedVersions(isClient); - if (supportedVersions$1.$length === 0) { - return 0; - } - return (0 >= supportedVersions$1.$length ? ($throwRuntimeError("index out of range"), undefined) : supportedVersions$1.$array[supportedVersions$1.$offset + 0]); - }; - Config.prototype.maxSupportedVersion = function(isClient) { return this.$val.maxSupportedVersion(isClient); }; - supportedVersionsFromMax = function(maxVersion) { - var _i, _ref, maxVersion, v, versions; - versions = $makeSlice(sliceType$2, 0, supportedVersions.$length); - _ref = supportedVersions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v > maxVersion) { - _i++; - continue; - } - versions = $append(versions, v); - _i++; - } - return versions; - }; - Config.ptr.prototype.curvePreferences = function() { - var c; - c = this; - if (c === ptrType$4.nil || (c.CurvePreferences.$length === 0)) { - return defaultCurvePreferences; - } - return c.CurvePreferences; - }; - Config.prototype.curvePreferences = function() { return this.$val.curvePreferences(); }; - Config.ptr.prototype.supportsCurve = function(curve) { - var _i, _ref, c, cc, curve; - c = this; - _ref = c.curvePreferences(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cc = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cc === curve) { - return true; - } - _i++; - } - return false; - }; - Config.prototype.supportsCurve = function(curve) { return this.$val.supportsCurve(curve); }; - Config.ptr.prototype.mutualVersion = function(isClient, peerVersions) { - var _i, _i$1, _ref, _ref$1, c, isClient, peerVersion, peerVersions, supportedVersions$1, v; - c = this; - supportedVersions$1 = c.supportedVersions(isClient); - _ref = peerVersions; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - peerVersion = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = supportedVersions$1; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (v === peerVersion) { - return [v, true]; - } - _i$1++; - } - _i++; - } - return [0, false]; - }; - Config.prototype.mutualVersion = function(isClient, peerVersions) { return this.$val.mutualVersion(isClient, peerVersions); }; - Config.ptr.prototype.getCertificate = function(clientHello) { - var {_entry, _entry$1, _i, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, c, cert, cert$1, cert$2, cert$3, clientHello, err, err$1, labels, name, ok, ok$1, wildcardName, x, x$1, $s, $r, $c} = $restore(this, {clientHello}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cert = [cert]; - c = this; - /* */ if (!(c.GetCertificate === $throwNilPointerError) && ((c.Certificates.$length === 0) || clientHello.ServerName.length > 0)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(c.GetCertificate === $throwNilPointerError) && ((c.Certificates.$length === 0) || clientHello.ServerName.length > 0)) { */ case 1: - _r$1 = c.GetCertificate(clientHello); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cert$1 = _tuple[0]; - err = _tuple[1]; - if (!(cert$1 === ptrType$31.nil) || !($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [cert$1, err]; - } - /* } */ case 2: - if (c.Certificates.$length === 0) { - $s = -1; return [ptrType$31.nil, errNoCertificates]; - } - if (c.Certificates.$length === 1) { - $s = -1; return [(x = c.Certificates, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])), $ifaceNil]; - } - /* */ if (!(c.NameToCertificate === false)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(c.NameToCertificate === false)) { */ case 4: - _r$2 = strings.ToLower(clientHello.ServerName); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - name = _r$2; - _tuple$1 = (_entry = c.NameToCertificate[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [ptrType$31.nil, false]); - cert$2 = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - $s = -1; return [cert$2, $ifaceNil]; - } - if (name.length > 0) { - labels = strings.Split(name, "."); - (0 >= labels.$length ? ($throwRuntimeError("index out of range"), undefined) : labels.$array[labels.$offset + 0] = "*"); - wildcardName = strings.Join(labels, "."); - _tuple$2 = (_entry$1 = c.NameToCertificate[$String.keyFor(wildcardName)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$31.nil, false]); - cert$3 = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (ok$1) { - $s = -1; return [cert$3, $ifaceNil]; - } - } - /* } */ case 5: - _ref = c.Certificates; - _i = 0; - /* while (true) { */ case 7: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 8; continue; } - cert[0] = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), Certificate); - _r$3 = clientHello.SupportsCertificate(cert[0]); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - $s = -1; return [cert[0], $ifaceNil]; - } - _i++; - $s = 7; continue; - case 8: - $s = -1; return [(x$1 = c.Certificates, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), $ifaceNil]; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.getCertificate, $c: true, $r, _entry, _entry$1, _i, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, _tuple$2, c, cert, cert$1, cert$2, cert$3, clientHello, err, err$1, labels, name, ok, ok$1, wildcardName, x, x$1, $s};return $f; - }; - Config.prototype.getCertificate = function(clientHello) { return this.$val.getCertificate(clientHello); }; - ClientHelloInfo.ptr.prototype.SupportsCertificate = function(c) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, c, c$1, chi, cipherSuite$1, config, curve, curveOk, ecdsaCipherSuite, err, err$1, err$2, ok, ok$1, priv, pub, pub$1, pub$2, pub$3, supportsRSAFallback, vers, x509Cert, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = [c]; - chi = [chi]; - config = [config]; - ecdsaCipherSuite = [ecdsaCipherSuite]; - vers = [vers]; - chi[0] = this; - config[0] = chi[0].config; - if (config[0] === ptrType$4.nil) { - config[0] = new Config.ptr($ifaceNil, $throwNilPointerError, sliceType.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType.nil, sliceType$1.nil, "", 0, ptrType.nil, false, sliceType$2.nil, false, false, arrayType.zero(), $ifaceNil, 0, 0, sliceType$3.nil, false, 0, $ifaceNil, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$4.nil, sliceType$4.nil); - } - _tuple = config[0].mutualVersion(false, chi[0].SupportedVersions); - vers[0] = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return errors.New("no mutually supported protocol versions"); - } - /* */ if (!(chi[0].ServerName === "")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(chi[0].ServerName === "")) { */ case 1: - _r$1 = c[0].leaf(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - x509Cert = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - _r$2 = fmt.Errorf("failed to parse certificate: %w", new sliceType$6([err])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 7; case 7: return $24r; - /* } */ case 5: - err$1 = x509Cert.VerifyHostname(chi[0].ServerName); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: - _r$3 = fmt.Errorf("certificate is not valid for requested server name: %w", new sliceType$6([err$1])); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - /* } */ case 2: - supportsRSAFallback = (function(c, chi, config, ecdsaCipherSuite, vers) { return function $b(unsupported) { - var {_r$4, _r$5, _tuple$2, _tuple$3, ok$1, ok$2, priv, rsaCipherSuite, unsupported, $s, $r, $c} = $restore(this, {unsupported}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (vers[0] === 772) { - $s = -1; return unsupported; - } - _tuple$2 = $assertType(c[0].PrivateKey, crypto.Decrypter, true); - priv = _tuple$2[0]; - ok$1 = _tuple$2[1]; - /* */ if (ok$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok$1) { */ case 1: - _r$4 = priv.Public(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = $assertType(_r$4, ptrType$11, true); - ok$2 = _tuple$3[1]; - if (!ok$2) { - $s = -1; return unsupported; - } - $s = 3; continue; - /* } else { */ case 2: - $s = -1; return unsupported; - /* } */ case 3: - _r$5 = selectCipherSuite(chi[0].CipherSuites, config[0].cipherSuites(), (function(c, chi, config, ecdsaCipherSuite, vers) { return function(c$1) { - var c$1; - if (!(((c$1.flags & 1) === 0))) { - return false; - } - if (vers[0] < 771 && !(((c$1.flags & 4) === 0))) { - return false; - } - return true; - }; })(c, chi, config, ecdsaCipherSuite, vers)); /* */ $s = 5; case 5: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rsaCipherSuite = _r$5; - if (rsaCipherSuite === ptrType$3.nil) { - $s = -1; return unsupported; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, _r$5, _tuple$2, _tuple$3, ok$1, ok$2, priv, rsaCipherSuite, unsupported, $s};return $f; - }; })(c, chi, config, ecdsaCipherSuite, vers); - /* */ if (chi[0].SignatureSchemes.$length > 0) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (chi[0].SignatureSchemes.$length > 0) { */ case 12: - _r$4 = selectSignatureScheme(vers[0], c[0], chi[0].SignatureSchemes); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - err$2 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 15: - _r$5 = supportsRSAFallback(err$2); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = _r$5; - $s = 18; case 18: return $24r$2; - /* } */ case 16: - /* } */ case 13: - if (vers[0] === 772) { - $s = -1; return $ifaceNil; - } - /* */ if (!supportsECDHE(config[0], chi[0].SupportedCurves, chi[0].SupportedPoints)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!supportsECDHE(config[0], chi[0].SupportedCurves, chi[0].SupportedPoints)) { */ case 19: - _r$6 = supportsRSAFallback(errors.New("client doesn't support ECDHE, can only use legacy RSA key exchange")); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = _r$6; - $s = 22; case 22: return $24r$3; - /* } */ case 20: - ecdsaCipherSuite[0] = false; - _tuple$3 = $assertType(c[0].PrivateKey, crypto.Signer, true); - priv = _tuple$3[0]; - ok$1 = _tuple$3[1]; - /* */ if (ok$1) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (ok$1) { */ case 23: - _r$7 = priv.Public(); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _ref = _r$7; - /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 27; continue; } - /* */ if ($assertType(_ref, ed25519.PublicKey, true)[1]) { $s = 28; continue; } - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if ($assertType(_ref, ptrType$12, true)[1]) { */ case 27: - pub = _ref.$val; - curve = 0; - _1 = pub.Curve; - _r$8 = elliptic.P256(); /* */ $s = 38; case 38: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$8))) { $s = 33; continue; } - _r$9 = elliptic.P384(); /* */ $s = 39; case 39: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$9))) { $s = 34; continue; } - _r$10 = elliptic.P521(); /* */ $s = 40; case 40: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$10))) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if ($interfaceIsEqual(_1, (_r$8))) { */ case 33: - curve = 23; - $s = 37; continue; - /* } else if ($interfaceIsEqual(_1, (_r$9))) { */ case 34: - curve = 24; - $s = 37; continue; - /* } else if ($interfaceIsEqual(_1, (_r$10))) { */ case 35: - curve = 25; - $s = 37; continue; - /* } else { */ case 36: - _r$11 = unsupportedCertificateError(c[0]); /* */ $s = 41; case 41: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = supportsRSAFallback(_r$11); /* */ $s = 42; case 42: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$4 = _r$12; - $s = 43; case 43: return $24r$4; - /* } */ case 37: - case 32: - curveOk = false; - _ref$1 = chi[0].SupportedCurves; - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - c$1 = ((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]); - if ((c$1 === curve) && config[0].supportsCurve(c$1)) { - curveOk = true; - break; - } - _i++; - } - if (!curveOk) { - $s = -1; return errors.New("client doesn't support certificate curve"); - } - ecdsaCipherSuite[0] = true; - $s = 31; continue; - /* } else if ($assertType(_ref, ed25519.PublicKey, true)[1]) { */ case 28: - pub$1 = _ref.$val; - if (vers[0] < 771 || (chi[0].SignatureSchemes.$length === 0)) { - $s = -1; return errors.New("connection doesn't support Ed25519"); - } - ecdsaCipherSuite[0] = true; - $s = 31; continue; - /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 29: - pub$2 = _ref.$val; - $s = 31; continue; - /* } else { */ case 30: - pub$3 = _ref; - _r$13 = unsupportedCertificateError(c[0]); /* */ $s = 44; case 44: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$14 = supportsRSAFallback(_r$13); /* */ $s = 45; case 45: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $24r$5 = _r$14; - $s = 46; case 46: return $24r$5; - /* } */ case 31: - $s = 25; continue; - /* } else { */ case 24: - _r$15 = unsupportedCertificateError(c[0]); /* */ $s = 47; case 47: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = supportsRSAFallback(_r$15); /* */ $s = 48; case 48: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - $24r$6 = _r$16; - $s = 49; case 49: return $24r$6; - /* } */ case 25: - _r$17 = selectCipherSuite(chi[0].CipherSuites, config[0].cipherSuites(), (function(c, chi, config, ecdsaCipherSuite, vers) { return function(c$2) { - var c$2; - if ((c$2.flags & 1) === 0) { - return false; - } - if (!(((c$2.flags & 2) === 0))) { - if (!ecdsaCipherSuite[0]) { - return false; - } - } else { - if (ecdsaCipherSuite[0]) { - return false; - } - } - if (vers[0] < 771 && !(((c$2.flags & 4) === 0))) { - return false; - } - return true; - }; })(c, chi, config, ecdsaCipherSuite, vers)); /* */ $s = 50; case 50: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - cipherSuite$1 = _r$17; - /* */ if (cipherSuite$1 === ptrType$3.nil) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (cipherSuite$1 === ptrType$3.nil) { */ case 51: - _r$18 = supportsRSAFallback(errors.New("client doesn't support any cipher suites compatible with the certificate")); /* */ $s = 53; case 53: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$7 = _r$18; - $s = 54; case 54: return $24r$7; - /* } */ case 52: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ClientHelloInfo.ptr.prototype.SupportsCertificate, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _i, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _tuple$1, _tuple$2, _tuple$3, c, c$1, chi, cipherSuite$1, config, curve, curveOk, ecdsaCipherSuite, err, err$1, err$2, ok, ok$1, priv, pub, pub$1, pub$2, pub$3, supportsRSAFallback, vers, x509Cert, $s};return $f; - }; - ClientHelloInfo.prototype.SupportsCertificate = function(c) { return this.$val.SupportsCertificate(c); }; - CertificateRequestInfo.ptr.prototype.SupportsCertificate = function(c) { - var {$24r, _i, _i$1, _r$1, _r$2, _r$3, _ref, _ref$1, _tuple, _tuple$1, c, ca, cert, cri, err, err$1, j, x509Cert, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cri = this; - _r$1 = selectSignatureScheme(cri.Version, c, cri.SignatureSchemes); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (cri.AcceptableCAs.$length === 0) { - $s = -1; return $ifaceNil; - } - _ref = c.Certificate; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - j = _i; - cert = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - x509Cert = c.Leaf; - /* */ if (!((j === 0)) || x509Cert === ptrType$5.nil) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((j === 0)) || x509Cert === ptrType$5.nil) { */ case 4: - err$1 = $ifaceNil; - _r$2 = x509.ParseCertificate(cert); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - x509Cert = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 7: - _r$3 = fmt.Errorf("failed to parse certificate #%d in the chain: %w", new sliceType$6([new $Int(j), err$1])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 10; case 10: return $24r; - /* } */ case 8: - /* } */ case 5: - _ref$1 = cri.AcceptableCAs; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - ca = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (bytes.Equal(x509Cert.RawIssuer, ca)) { - $s = -1; return $ifaceNil; - } - _i$1++; - } - _i++; - $s = 2; continue; - case 3: - $s = -1; return errors.New("chain is not signed by an acceptable CA"); - /* */ } return; } var $f = {$blk: CertificateRequestInfo.ptr.prototype.SupportsCertificate, $c: true, $r, $24r, _i, _i$1, _r$1, _r$2, _r$3, _ref, _ref$1, _tuple, _tuple$1, c, ca, cert, cri, err, err$1, j, x509Cert, $s};return $f; - }; - CertificateRequestInfo.prototype.SupportsCertificate = function(c) { return this.$val.SupportsCertificate(c); }; - Config.ptr.prototype.BuildNameToCertificate = function() { - var {_i, _i$1, _key, _key$1, _r$1, _ref, _ref$1, _tuple, c, cert, err, i, san, x, x509Cert, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - c.NameToCertificate = {}; - _ref = c.Certificates; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - cert = (x = c.Certificates, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i])); - _r$1 = cert.leaf(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - x509Cert = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _i++; - /* continue; */ $s = 1; continue; - } - if (!(x509Cert.Subject.CommonName === "") && (x509Cert.DNSNames.$length === 0)) { - _key = x509Cert.Subject.CommonName; (c.NameToCertificate || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: cert }; - } - _ref$1 = x509Cert.DNSNames; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - san = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _key$1 = san; (c.NameToCertificate || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: cert }; - _i$1++; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.BuildNameToCertificate, $c: true, $r, _i, _i$1, _key, _key$1, _r$1, _ref, _ref$1, _tuple, c, cert, err, i, san, x, x509Cert, $s};return $f; - }; - Config.prototype.BuildNameToCertificate = function() { return this.$val.BuildNameToCertificate(); }; - Config.ptr.prototype.writeKeyLog = function(label, clientRandom, secret) { - var {_r$1, _r$2, _tuple, c, clientRandom, err, label, logLine, secret, $s, $r, $c} = $restore(this, {label, clientRandom, secret}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if ($interfaceIsEqual(c.KeyLogWriter, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$1 = fmt.Sprintf("%s %x %x\n", new sliceType$6([new $String(label), clientRandom, secret])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - logLine = (new sliceType$5($stringToBytes(_r$1))); - $r = writerMutex.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = c.KeyLogWriter.Write(logLine); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err = _tuple[1]; - $r = writerMutex.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.writeKeyLog, $c: true, $r, _r$1, _r$2, _tuple, c, clientRandom, err, label, logLine, secret, $s};return $f; - }; - Config.prototype.writeKeyLog = function(label, clientRandom, secret) { return this.$val.writeKeyLog(label, clientRandom, secret); }; - Certificate.ptr.prototype.leaf = function() { - var {$24r, _r$1, c, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!(c.Leaf === ptrType$5.nil)) { - $s = -1; return [c.Leaf, $ifaceNil]; - } - _r$1 = x509.ParseCertificate((x = c.Certificate, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Certificate.ptr.prototype.leaf, $c: true, $r, $24r, _r$1, c, x, $s};return $f; - }; - Certificate.prototype.leaf = function() { return this.$val.leaf(); }; - defaultConfig = function() { - return emptyConfig; - }; - unexpectedMessageError = function(wanted, got) { - var {$24r, _r$1, got, wanted, $s, $r, $c} = $restore(this, {wanted, got}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fmt.Errorf("tls: received unexpected handshake message of type %T when waiting for %T", new sliceType$6([got, wanted])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: unexpectedMessageError, $c: true, $r, $24r, _r$1, got, wanted, $s};return $f; - }; - isSupportedSignatureAlgorithm = function(sigAlg, supportedSignatureAlgorithms$1) { - var _i, _ref, s, sigAlg, supportedSignatureAlgorithms$1; - _ref = supportedSignatureAlgorithms$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (s === sigAlg) { - return true; - } - _i++; - } - return false; - }; - selectCipherSuite = function(ids, supportedIDs, ok) { - var {_i, _i$1, _r$1, _ref, _ref$1, _v, candidate, id, ids, ok, suppID, supportedIDs, $s, $r, $c} = $restore(this, {ids, supportedIDs, ok}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = ids; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - candidate = cipherSuiteByID(id); - if (candidate === ptrType$3.nil) { _v = true; $s = 5; continue s; } - _r$1 = ok(candidate); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 5: - /* */ if (_v) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_v) { */ case 3: - _i++; - /* continue; */ $s = 1; continue; - /* } */ case 4: - _ref$1 = supportedIDs; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - suppID = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (id === suppID) { - $s = -1; return candidate; - } - _i$1++; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return ptrType$3.nil; - /* */ } return; } var $f = {$blk: selectCipherSuite, $c: true, $r, _i, _i$1, _r$1, _ref, _ref$1, _v, candidate, id, ids, ok, suppID, supportedIDs, $s};return $f; - }; - aesgcmPreferred = function(ciphers) { - var _entry, _entry$1, _i, _ref, c, c$1, cID, ciphers; - _ref = ciphers; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cID = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - c = cipherSuiteByID(cID); - if (!(c === ptrType$3.nil)) { - return (_entry = aesgcmCiphers[$Uint16.keyFor(cID)], _entry !== undefined ? _entry.v : false); - } - c$1 = cipherSuiteTLS13ByID(cID); - if (!(c$1 === ptrType$2.nil)) { - return (_entry$1 = aesgcmCiphers[$Uint16.keyFor(cID)], _entry$1 !== undefined ? _entry$1.v : false); - } - _i++; - } - return false; - }; - cipherRC4 = function(key, iv, isRead) { - var _tuple, cipher$1, isRead, iv, key; - _tuple = rc4.NewCipher(key); - cipher$1 = _tuple[0]; - return cipher$1; - }; - cipher3DES = function(key, iv, isRead) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _tuple, block, isRead, iv, key, $s, $r, $c} = $restore(this, {key, iv, isRead}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = des.NewTripleDESCipher(key); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - block = _tuple[0]; - /* */ if (isRead) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (isRead) { */ case 2: - _r$2 = cipher.NewCBCDecrypter(block, iv); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$3 = cipher.NewCBCEncrypter(block, iv); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: cipher3DES, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _tuple, block, isRead, iv, key, $s};return $f; - }; - cipherAES = function(key, iv, isRead) { - var {$24r, $24r$1, _r$1, _r$2, _tuple, block, isRead, iv, key, $s, $r, $c} = $restore(this, {key, iv, isRead}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = aes.NewCipher(key); - block = _tuple[0]; - /* */ if (isRead) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (isRead) { */ case 1: - _r$1 = cipher.NewCBCDecrypter(block, iv); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$2 = cipher.NewCBCEncrypter(block, iv); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: cipherAES, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _tuple, block, isRead, iv, key, $s};return $f; - }; - macSHA1 = function(key) { - var {$24r, _r$1, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = hmac.New(newConstantTimeHash(sha1.New), key); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: macSHA1, $c: true, $r, $24r, _r$1, key, $s};return $f; - }; - macSHA256 = function(key) { - var {$24r, _r$1, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = hmac.New(sha256.New, key); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: macSHA256, $c: true, $r, $24r, _r$1, key, $s};return $f; - }; - prefixNonceAEAD.ptr.prototype.NonceSize = function() { - var f; - f = this; - return 8; - }; - prefixNonceAEAD.prototype.NonceSize = function() { return this.$val.NonceSize(); }; - prefixNonceAEAD.ptr.prototype.Overhead = function() { - var {$24r, _r$1, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$1 = f.aead.Overhead(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: prefixNonceAEAD.ptr.prototype.Overhead, $c: true, $r, $24r, _r$1, f, $s};return $f; - }; - prefixNonceAEAD.prototype.Overhead = function() { return this.$val.Overhead(); }; - prefixNonceAEAD.ptr.prototype.explicitNonceLen = function() { - var f; - f = this; - return f.NonceSize(); - }; - prefixNonceAEAD.prototype.explicitNonceLen = function() { return this.$val.explicitNonceLen(); }; - prefixNonceAEAD.ptr.prototype.Seal = function(out, nonce, plaintext, additionalData) { - var {$24r, _r$1, additionalData, f, nonce, out, plaintext, $s, $r, $c} = $restore(this, {out, nonce, plaintext, additionalData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $copySlice($subslice(new sliceType$5(f.nonce), 4), nonce); - _r$1 = f.aead.Seal(out, new sliceType$5(f.nonce), plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: prefixNonceAEAD.ptr.prototype.Seal, $c: true, $r, $24r, _r$1, additionalData, f, nonce, out, plaintext, $s};return $f; - }; - prefixNonceAEAD.prototype.Seal = function(out, nonce, plaintext, additionalData) { return this.$val.Seal(out, nonce, plaintext, additionalData); }; - prefixNonceAEAD.ptr.prototype.Open = function(out, nonce, ciphertext, additionalData) { - var {$24r, _r$1, additionalData, ciphertext, f, nonce, out, $s, $r, $c} = $restore(this, {out, nonce, ciphertext, additionalData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - $copySlice($subslice(new sliceType$5(f.nonce), 4), nonce); - _r$1 = f.aead.Open(out, new sliceType$5(f.nonce), ciphertext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: prefixNonceAEAD.ptr.prototype.Open, $c: true, $r, $24r, _r$1, additionalData, ciphertext, f, nonce, out, $s};return $f; - }; - prefixNonceAEAD.prototype.Open = function(out, nonce, ciphertext, additionalData) { return this.$val.Open(out, nonce, ciphertext, additionalData); }; - xorNonceAEAD.ptr.prototype.NonceSize = function() { - var f; - f = this; - return 8; - }; - xorNonceAEAD.prototype.NonceSize = function() { return this.$val.NonceSize(); }; - xorNonceAEAD.ptr.prototype.Overhead = function() { - var {$24r, _r$1, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$1 = f.aead.Overhead(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: xorNonceAEAD.ptr.prototype.Overhead, $c: true, $r, $24r, _r$1, f, $s};return $f; - }; - xorNonceAEAD.prototype.Overhead = function() { return this.$val.Overhead(); }; - xorNonceAEAD.ptr.prototype.explicitNonceLen = function() { - var f; - f = this; - return 0; - }; - xorNonceAEAD.prototype.explicitNonceLen = function() { return this.$val.explicitNonceLen(); }; - xorNonceAEAD.ptr.prototype.Seal = function(out, nonce, plaintext, additionalData) { - var {_i, _i$1, _index, _index$1, _r$1, _ref, _ref$1, additionalData, b, b$1, f, i, i$1, nonce, out, plaintext, result, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {out, nonce, plaintext, additionalData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _ref = nonce; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _index = 4 + i >> 0; - (x$1 = f.nonceMask, ((_index < 0 || _index >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[_index] = (((x = f.nonceMask, ((_index < 0 || _index >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[_index])) ^ (b)) << 24 >>> 24))); - _i++; - } - _r$1 = f.aead.Seal(out, new sliceType$5(f.nonceMask), plaintext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - result = _r$1; - _ref$1 = nonce; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _index$1 = 4 + i$1 >> 0; - (x$3 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[_index$1] = (((x$2 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[_index$1])) ^ (b$1)) << 24 >>> 24))); - _i$1++; - } - $s = -1; return result; - /* */ } return; } var $f = {$blk: xorNonceAEAD.ptr.prototype.Seal, $c: true, $r, _i, _i$1, _index, _index$1, _r$1, _ref, _ref$1, additionalData, b, b$1, f, i, i$1, nonce, out, plaintext, result, x, x$1, x$2, x$3, $s};return $f; - }; - xorNonceAEAD.prototype.Seal = function(out, nonce, plaintext, additionalData) { return this.$val.Seal(out, nonce, plaintext, additionalData); }; - xorNonceAEAD.ptr.prototype.Open = function(out, nonce, ciphertext, additionalData) { - var {_i, _i$1, _index, _index$1, _r$1, _ref, _ref$1, _tuple, additionalData, b, b$1, ciphertext, err, f, i, i$1, nonce, out, result, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {out, nonce, ciphertext, additionalData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _ref = nonce; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _index = 4 + i >> 0; - (x$1 = f.nonceMask, ((_index < 0 || _index >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[_index] = (((x = f.nonceMask, ((_index < 0 || _index >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[_index])) ^ (b)) << 24 >>> 24))); - _i++; - } - _r$1 = f.aead.Open(out, new sliceType$5(f.nonceMask), ciphertext, additionalData); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - result = _tuple[0]; - err = _tuple[1]; - _ref$1 = nonce; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - b$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _index$1 = 4 + i$1 >> 0; - (x$3 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[_index$1] = (((x$2 = f.nonceMask, ((_index$1 < 0 || _index$1 >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[_index$1])) ^ (b$1)) << 24 >>> 24))); - _i$1++; - } - $s = -1; return [result, err]; - /* */ } return; } var $f = {$blk: xorNonceAEAD.ptr.prototype.Open, $c: true, $r, _i, _i$1, _index, _index$1, _r$1, _ref, _ref$1, _tuple, additionalData, b, b$1, ciphertext, err, f, i, i$1, nonce, out, result, x, x$1, x$2, x$3, $s};return $f; - }; - xorNonceAEAD.prototype.Open = function(out, nonce, ciphertext, additionalData) { return this.$val.Open(out, nonce, ciphertext, additionalData); }; - aeadAESGCM = function(key, noncePrefix) { - var {_r$1, _tuple, _tuple$1, aead$1, aes$1, err, key, noncePrefix, ret, $s, $r, $c} = $restore(this, {key, noncePrefix}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((noncePrefix.$length === 4))) { - $panic(new $String("tls: internal error: wrong nonce length")); - } - _tuple = aes.NewCipher(key); - aes$1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - _r$1 = cipher.NewGCM(aes$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - aead$1 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - ret = new prefixNonceAEAD.ptr(arrayType$1.zero(), aead$1); - $copySlice(new sliceType$5(ret.nonce), noncePrefix); - $s = -1; return ret; - /* */ } return; } var $f = {$blk: aeadAESGCM, $c: true, $r, _r$1, _tuple, _tuple$1, aead$1, aes$1, err, key, noncePrefix, ret, $s};return $f; - }; - aeadAESGCMTLS13 = function(key, nonceMask) { - var {_r$1, _tuple, _tuple$1, aead$1, aes$1, err, key, nonceMask, ret, $s, $r, $c} = $restore(this, {key, nonceMask}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!((nonceMask.$length === 12))) { - $panic(new $String("tls: internal error: wrong nonce length")); - } - _tuple = aes.NewCipher(key); - aes$1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - _r$1 = cipher.NewGCM(aes$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - aead$1 = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - ret = new xorNonceAEAD.ptr(arrayType$1.zero(), aead$1); - $copySlice(new sliceType$5(ret.nonceMask), nonceMask); - $s = -1; return ret; - /* */ } return; } var $f = {$blk: aeadAESGCMTLS13, $c: true, $r, _r$1, _tuple, _tuple$1, aead$1, aes$1, err, key, nonceMask, ret, $s};return $f; - }; - aeadChaCha20Poly1305 = function(key, nonceMask) { - var _tuple, aead$1, err, key, nonceMask, ret; - if (!((nonceMask.$length === 12))) { - $panic(new $String("tls: internal error: wrong nonce length")); - } - _tuple = chacha20poly1305.New(key); - aead$1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $panic(err); - } - ret = new xorNonceAEAD.ptr(arrayType$1.zero(), aead$1); - $copySlice(new sliceType$5(ret.nonceMask), nonceMask); - return ret; - }; - cthWrapper.ptr.prototype.Size = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.h.Size(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cthWrapper.ptr.prototype.Size, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - cthWrapper.prototype.Size = function() { return this.$val.Size(); }; - cthWrapper.ptr.prototype.BlockSize = function() { - var {$24r, _r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.h.BlockSize(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cthWrapper.ptr.prototype.BlockSize, $c: true, $r, $24r, _r$1, c, $s};return $f; - }; - cthWrapper.prototype.BlockSize = function() { return this.$val.BlockSize(); }; - cthWrapper.ptr.prototype.Reset = function() { - var {c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - $r = c.h.Reset(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: cthWrapper.ptr.prototype.Reset, $c: true, $r, c, $s};return $f; - }; - cthWrapper.prototype.Reset = function() { return this.$val.Reset(); }; - cthWrapper.ptr.prototype.Write = function(p) { - var {$24r, _r$1, c, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.h.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cthWrapper.ptr.prototype.Write, $c: true, $r, $24r, _r$1, c, p, $s};return $f; - }; - cthWrapper.prototype.Write = function(p) { return this.$val.Write(p); }; - cthWrapper.ptr.prototype.Sum = function(b) { - var {$24r, _r$1, b, c, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.h.ConstantTimeSum(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cthWrapper.ptr.prototype.Sum, $c: true, $r, $24r, _r$1, b, c, $s};return $f; - }; - cthWrapper.prototype.Sum = function(b) { return this.$val.Sum(b); }; - newConstantTimeHash = function(h) { - var h; - return (function $b() { - var {$24r, _r$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = h(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = new cthWrapper.ptr($assertType(_r$1, constantTimeHash)); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, $s};return $f; - }); - }; - tls10MAC = function(h, out, seq, header, data, extra) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, data, extra, h, header, out, res, seq, $s, $r, $c} = $restore(this, {h, out, seq, header, data, extra}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = h.Reset(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = h.Write(seq); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = h.Write(header); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = h.Write(data); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = h.Sum(out); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - res = _r$4; - /* */ if (!(extra === sliceType$5.nil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(extra === sliceType$5.nil)) { */ case 6: - _r$5 = h.Write(extra); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 7: - $s = -1; return res; - /* */ } return; } var $f = {$blk: tls10MAC, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, data, extra, h, header, out, res, seq, $s};return $f; - }; - rsaKA = function(version) { - var version, x; - return (x = new rsaKeyAgreement.ptr(), new x.constructor.elem(x)); - }; - ecdheECDSAKA = function(version) { - var version; - return new ecdheKeyAgreement.ptr(version, false, $ifaceNil, ptrType$23.nil, sliceType$5.nil); - }; - ecdheRSAKA = function(version) { - var version; - return new ecdheKeyAgreement.ptr(version, true, $ifaceNil, ptrType$23.nil, sliceType$5.nil); - }; - mutualCipherSuite = function(have, want) { - var _i, _ref, have, id, want; - _ref = have; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (id === want) { - return cipherSuiteByID(id); - } - _i++; - } - return ptrType$3.nil; - }; - cipherSuiteByID = function(id) { - var _i, _ref, cipherSuite$1, id; - _ref = cipherSuites; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cipherSuite$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cipherSuite$1.id === id) { - return cipherSuite$1; - } - _i++; - } - return ptrType$3.nil; - }; - mutualCipherSuiteTLS13 = function(have, want) { - var _i, _ref, have, id, want; - _ref = have; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - id = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (id === want) { - return cipherSuiteTLS13ByID(id); - } - _i++; - } - return ptrType$2.nil; - }; - cipherSuiteTLS13ByID = function(id) { - var _i, _ref, cipherSuite$1, id; - _ref = cipherSuitesTLS13; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cipherSuite$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (cipherSuite$1.id === id) { - return cipherSuite$1; - } - _i++; - } - return ptrType$2.nil; - }; - verifyHandshakeSignature = function(sigType, pubkey, hashFunc, signed, sig) { - var {$24r, $24r$1, $24r$2, $24r$3, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, hashFunc, ok, ok$1, ok$2, ok$3, pubKey, pubKey$1, pubKey$2, pubKey$3, pubkey, sig, sigType, signOpts, signed, $s, $r, $c} = $restore(this, {sigType, pubkey, hashFunc, signed, sig}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = sigType; - /* */ if (_1 === (227)) { $s = 2; continue; } - /* */ if (_1 === (228)) { $s = 3; continue; } - /* */ if (_1 === (225)) { $s = 4; continue; } - /* */ if (_1 === (226)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (227)) { */ case 2: - _tuple = $assertType(pubkey, ptrType$12, true); - pubKey = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!ok) { */ case 8: - _r$1 = fmt.Errorf("expected an ECDSA public key, got %T", new sliceType$6([pubkey])); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 11; case 11: return $24r; - /* } */ case 9: - _r$2 = ecdsa.VerifyASN1(pubKey, signed, sig); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!_r$2) { */ case 12: - $s = -1; return errors.New("ECDSA verification failure"); - /* } */ case 13: - $s = 7; continue; - /* } else if (_1 === (228)) { */ case 3: - _tuple$1 = $assertType(pubkey, ed25519.PublicKey, true); - pubKey$1 = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (!ok$1) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!ok$1) { */ case 15: - _r$3 = fmt.Errorf("expected an Ed25519 public key, got %T", new sliceType$6([pubkey])); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 18; case 18: return $24r$1; - /* } */ case 16: - _r$4 = ed25519.Verify(pubKey$1, signed, sig); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!_r$4) { */ case 19: - $s = -1; return errors.New("Ed25519 verification failure"); - /* } */ case 20: - $s = 7; continue; - /* } else if (_1 === (225)) { */ case 4: - _tuple$2 = $assertType(pubkey, ptrType$11, true); - pubKey$2 = _tuple$2[0]; - ok$2 = _tuple$2[1]; - /* */ if (!ok$2) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!ok$2) { */ case 22: - _r$5 = fmt.Errorf("expected an RSA public key, got %T", new sliceType$6([pubkey])); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = _r$5; - $s = 25; case 25: return $24r$2; - /* } */ case 23: - _r$6 = rsa.VerifyPKCS1v15(pubKey$2, hashFunc, signed, sig); /* */ $s = 26; case 26: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $s = 7; continue; - /* } else if (_1 === (226)) { */ case 5: - _tuple$3 = $assertType(pubkey, ptrType$11, true); - pubKey$3 = _tuple$3[0]; - ok$3 = _tuple$3[1]; - /* */ if (!ok$3) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!ok$3) { */ case 27: - _r$7 = fmt.Errorf("expected an RSA public key, got %T", new sliceType$6([pubkey])); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$3 = _r$7; - $s = 30; case 30: return $24r$3; - /* } */ case 28: - signOpts = new rsa.PSSOptions.ptr(-1, 0); - _r$8 = rsa.VerifyPSS(pubKey$3, hashFunc, signed, sig, signOpts); /* */ $s = 31; case 31: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$1 = _r$8; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - $s = 7; continue; - /* } else { */ case 6: - $s = -1; return errors.New("internal error: unknown signature type"); - /* } */ case 7: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: verifyHandshakeSignature, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, err, err$1, hashFunc, ok, ok$1, ok$2, ok$3, pubKey, pubKey$1, pubKey$2, pubKey$3, pubkey, sig, sigType, signOpts, signed, $s};return $f; - }; - signedMessage = function(sigHash, context$1, transcript) { - var {$24r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, context$1, h, sigHash, transcript, $s, $r, $c} = $restore(this, {sigHash, context$1, transcript}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (sigHash === directSigning) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (sigHash === directSigning) { */ case 1: - b = new bytes.Buffer.ptr(sliceType$5.nil, 0, 0); - _r$1 = b.Write(signaturePadding); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = io.WriteString(b, context$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = transcript.Sum(sliceType$5.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = b.Write(_r$3); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = -1; return b.Bytes(); - /* } */ case 2: - _r$5 = new crypto.Hash(sigHash).New(); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - h = _r$5; - _r$6 = h.Write(signaturePadding); /* */ $s = 8; case 8: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = io.WriteString(h, context$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = transcript.Sum(sliceType$5.nil); /* */ $s = 10; case 10: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = h.Write(_r$8); /* */ $s = 11; case 11: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = h.Sum(sliceType$5.nil); /* */ $s = 12; case 12: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r = _r$10; - $s = 13; case 13: return $24r; - /* */ } return; } var $f = {$blk: signedMessage, $c: true, $r, $24r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, b, context$1, h, sigHash, transcript, $s};return $f; - }; - typeAndHashFromSignatureScheme = function(signatureAlgorithm) { - var {$24r, $24r$1, _1, _2, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, err, hash$1, sigType, signatureAlgorithm, $s, $r, $c} = $restore(this, {signatureAlgorithm}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sigType = 0; - hash$1 = 0; - err = $ifaceNil; - _1 = signatureAlgorithm; - /* */ if ((_1 === (513)) || (_1 === (1025)) || (_1 === (1281)) || (_1 === (1537))) { $s = 2; continue; } - /* */ if ((_1 === (2052)) || (_1 === (2053)) || (_1 === (2054))) { $s = 3; continue; } - /* */ if ((_1 === (515)) || (_1 === (1027)) || (_1 === (1283)) || (_1 === (1539))) { $s = 4; continue; } - /* */ if (_1 === (2055)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ((_1 === (513)) || (_1 === (1025)) || (_1 === (1281)) || (_1 === (1537))) { */ case 2: - sigType = 225; - $s = 7; continue; - /* } else if ((_1 === (2052)) || (_1 === (2053)) || (_1 === (2054))) { */ case 3: - sigType = 226; - $s = 7; continue; - /* } else if ((_1 === (515)) || (_1 === (1027)) || (_1 === (1283)) || (_1 === (1539))) { */ case 4: - sigType = 227; - $s = 7; continue; - /* } else if (_1 === (2055)) { */ case 5: - sigType = 228; - $s = 7; continue; - /* } else { */ case 6: - _tmp = 0; - _tmp$1 = 0; - _r$1 = fmt.Errorf("unsupported signature algorithm: %v", new sliceType$6([new SignatureScheme(signatureAlgorithm)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$2 = _r$1; - sigType = _tmp; - hash$1 = _tmp$1; - err = _tmp$2; - $24r = [sigType, hash$1, err]; - $s = 9; case 9: return $24r; - /* } */ case 7: - case 1: - _2 = signatureAlgorithm; - /* */ if ((_2 === (513)) || (_2 === (515))) { $s = 11; continue; } - /* */ if ((_2 === (1025)) || (_2 === (2052)) || (_2 === (1027))) { $s = 12; continue; } - /* */ if ((_2 === (1281)) || (_2 === (2053)) || (_2 === (1283))) { $s = 13; continue; } - /* */ if ((_2 === (1537)) || (_2 === (2054)) || (_2 === (1539))) { $s = 14; continue; } - /* */ if (_2 === (2055)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ((_2 === (513)) || (_2 === (515))) { */ case 11: - hash$1 = 3; - $s = 17; continue; - /* } else if ((_2 === (1025)) || (_2 === (2052)) || (_2 === (1027))) { */ case 12: - hash$1 = 5; - $s = 17; continue; - /* } else if ((_2 === (1281)) || (_2 === (2053)) || (_2 === (1283))) { */ case 13: - hash$1 = 6; - $s = 17; continue; - /* } else if ((_2 === (1537)) || (_2 === (2054)) || (_2 === (1539))) { */ case 14: - hash$1 = 7; - $s = 17; continue; - /* } else if (_2 === (2055)) { */ case 15: - hash$1 = directSigning; - $s = 17; continue; - /* } else { */ case 16: - _tmp$3 = 0; - _tmp$4 = 0; - _r$2 = fmt.Errorf("unsupported signature algorithm: %v", new sliceType$6([new SignatureScheme(signatureAlgorithm)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp$5 = _r$2; - sigType = _tmp$3; - hash$1 = _tmp$4; - err = _tmp$5; - $24r$1 = [sigType, hash$1, err]; - $s = 19; case 19: return $24r$1; - /* } */ case 17: - case 10: - _tmp$6 = sigType; - _tmp$7 = hash$1; - _tmp$8 = $ifaceNil; - sigType = _tmp$6; - hash$1 = _tmp$7; - err = _tmp$8; - $s = -1; return [sigType, hash$1, err]; - /* */ } return; } var $f = {$blk: typeAndHashFromSignatureScheme, $c: true, $r, $24r, $24r$1, _1, _2, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, err, hash$1, sigType, signatureAlgorithm, $s};return $f; - }; - legacyTypeAndHashFromPublicKey = function(pub) { - var {$24r, $24r$1, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, err, hash$1, pub, sigType, $s, $r, $c} = $restore(this, {pub}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sigType = 0; - hash$1 = 0; - err = $ifaceNil; - _ref = pub; - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, ed25519.PublicKey, true)[1]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($assertType(_ref, ptrType$11, true)[1]) { */ case 1: - _tmp = 225; - _tmp$1 = 8; - _tmp$2 = $ifaceNil; - sigType = _tmp; - hash$1 = _tmp$1; - err = _tmp$2; - $s = -1; return [sigType, hash$1, err]; - /* } else if ($assertType(_ref, ptrType$12, true)[1]) { */ case 2: - _tmp$3 = 227; - _tmp$4 = 3; - _tmp$5 = $ifaceNil; - sigType = _tmp$3; - hash$1 = _tmp$4; - err = _tmp$5; - $s = -1; return [sigType, hash$1, err]; - /* } else if ($assertType(_ref, ed25519.PublicKey, true)[1]) { */ case 3: - _tmp$6 = 0; - _tmp$7 = 0; - _r$1 = fmt.Errorf("tls: Ed25519 public keys are not supported before TLS 1.2", new sliceType$6([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$8 = _r$1; - sigType = _tmp$6; - hash$1 = _tmp$7; - err = _tmp$8; - $24r = [sigType, hash$1, err]; - $s = 7; case 7: return $24r; - /* } else { */ case 4: - _tmp$9 = 0; - _tmp$10 = 0; - _r$2 = fmt.Errorf("tls: unsupported public key: %T", new sliceType$6([pub])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp$11 = _r$2; - sigType = _tmp$9; - hash$1 = _tmp$10; - err = _tmp$11; - $24r$1 = [sigType, hash$1, err]; - $s = 9; case 9: return $24r$1; - /* } */ case 5: - $s = -1; return [sigType, hash$1, err]; - /* */ } return; } var $f = {$blk: legacyTypeAndHashFromPublicKey, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, err, hash$1, pub, sigType, $s};return $f; - }; - signatureSchemesForCertificate = function(version, cert) { - var {_1, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _ref$2, _tuple, candidate, cert, filteredSigAlgs, ok, priv, pub, pub$1, pub$2, pub$3, sigAlg, sigAlgs, size, version, $s, $r, $c} = $restore(this, {version, cert}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = $assertType(cert.PrivateKey, crypto.Signer, true); - priv = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return sliceType$7.nil; - } - sigAlgs = sliceType$7.nil; - _r$1 = priv.Public(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _ref = _r$1; - /* */ if ($assertType(_ref, ptrType$12, true)[1]) { $s = 2; continue; } - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, ed25519.PublicKey, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* switch (0) { default: if ($assertType(_ref, ptrType$12, true)[1]) { */ case 2: - pub = _ref.$val; - if (!((version === 772))) { - sigAlgs = new sliceType$7([1027, 1283, 1539, 515]); - /* break; */ $s = 6; continue; - } - _1 = pub.Curve; - _r$2 = elliptic.P256(); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$2))) { $s = 8; continue; } - _r$3 = elliptic.P384(); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$3))) { $s = 9; continue; } - _r$4 = elliptic.P521(); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$4))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ($interfaceIsEqual(_1, (_r$2))) { */ case 8: - sigAlgs = new sliceType$7([1027]); - $s = 12; continue; - /* } else if ($interfaceIsEqual(_1, (_r$3))) { */ case 9: - sigAlgs = new sliceType$7([1283]); - $s = 12; continue; - /* } else if ($interfaceIsEqual(_1, (_r$4))) { */ case 10: - sigAlgs = new sliceType$7([1539]); - $s = 12; continue; - /* } else { */ case 11: - $s = -1; return sliceType$7.nil; - /* } */ case 12: - case 7: - $s = 6; continue; - /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 3: - pub$1 = _ref.$val; - size = pub$1.Size(); - sigAlgs = $makeSlice(sliceType$7, 0, rsaSignatureSchemes.$length); - _ref$1 = rsaSignatureSchemes; - _i = 0; - while (true) { - if (!(_i < _ref$1.$length)) { break; } - candidate = $clone(((_i < 0 || _i >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i]), structType); - if (size >= candidate.minModulusBytes && version <= candidate.maxVersion) { - sigAlgs = $append(sigAlgs, candidate.scheme); - } - _i++; - } - $s = 6; continue; - /* } else if ($assertType(_ref, ed25519.PublicKey, true)[1]) { */ case 4: - pub$2 = _ref.$val; - sigAlgs = new sliceType$7([2055]); - $s = 6; continue; - /* } else { */ case 5: - pub$3 = _ref; - $s = -1; return sliceType$7.nil; - /* } } */ case 6: - if (!(cert.SupportedSignatureAlgorithms === sliceType$7.nil)) { - filteredSigAlgs = sliceType$7.nil; - _ref$2 = sigAlgs; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$2.$length)) { break; } - sigAlg = ((_i$1 < 0 || _i$1 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$1]); - if (isSupportedSignatureAlgorithm(sigAlg, cert.SupportedSignatureAlgorithms)) { - filteredSigAlgs = $append(filteredSigAlgs, sigAlg); - } - _i$1++; - } - $s = -1; return filteredSigAlgs; - } - $s = -1; return sigAlgs; - /* */ } return; } var $f = {$blk: signatureSchemesForCertificate, $c: true, $r, _1, _i, _i$1, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _ref$2, _tuple, candidate, cert, filteredSigAlgs, ok, priv, pub, pub$1, pub$2, pub$3, sigAlg, sigAlgs, size, version, $s};return $f; - }; - selectSignatureScheme = function(vers, c, peerAlgs) { - var {$24r, _i, _r$1, _r$2, _ref, c, peerAlgs, preferredAlg, supportedAlgs, vers, $s, $r, $c} = $restore(this, {vers, c, peerAlgs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = signatureSchemesForCertificate(vers, c); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - supportedAlgs = _r$1; - /* */ if (supportedAlgs.$length === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (supportedAlgs.$length === 0) { */ case 2: - _r$2 = unsupportedCertificateError(c); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [0, _r$2]; - $s = 5; case 5: return $24r; - /* } */ case 3: - if ((peerAlgs.$length === 0) && (vers === 771)) { - peerAlgs = new sliceType$7([513, 515]); - } - _ref = peerAlgs; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - preferredAlg = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (isSupportedSignatureAlgorithm(preferredAlg, supportedAlgs)) { - $s = -1; return [preferredAlg, $ifaceNil]; - } - _i++; - } - $s = -1; return [0, errors.New("tls: peer doesn't support any of the certificate's signature algorithms")]; - /* */ } return; } var $f = {$blk: selectSignatureScheme, $c: true, $r, $24r, _i, _r$1, _r$2, _ref, c, peerAlgs, preferredAlg, supportedAlgs, vers, $s};return $f; - }; - unsupportedCertificateError = function(cert) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _arg, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, cert, ok, pub, pub$1, pub$2, pub$3, signer, $s, $r, $c} = $restore(this, {cert}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = cert.PrivateKey; - /* */ if ($assertType(_ref, rsa.PrivateKey, true)[1] || $assertType(_ref, ecdsa.PrivateKey, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$51, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, rsa.PrivateKey, true)[1] || $assertType(_ref, ecdsa.PrivateKey, true)[1]) { */ case 1: - _r$1 = fmt.Errorf("tls: unsupported certificate: private key is %T, expected *%T", new sliceType$6([cert.PrivateKey, cert.PrivateKey])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } else if ($assertType(_ref, ptrType$51, true)[1]) { */ case 2: - _r$2 = fmt.Errorf("tls: unsupported certificate: private key is *ed25519.PrivateKey, expected ed25519.PrivateKey", new sliceType$6([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* } */ case 3: - _tuple = $assertType(cert.PrivateKey, crypto.Signer, true); - signer = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!ok) { */ case 8: - _r$3 = fmt.Errorf("tls: certificate private key (%T) does not implement crypto.Signer", new sliceType$6([cert.PrivateKey])); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 11; case 11: return $24r$2; - /* } */ case 9: - _r$4 = signer.Public(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _ref$1 = _r$4; - /* */ if ($assertType(_ref$1, ptrType$12, true)[1]) { $s = 13; continue; } - /* */ if ($assertType(_ref$1, ptrType$11, true)[1]) { $s = 14; continue; } - /* */ if ($assertType(_ref$1, ed25519.PublicKey, true)[1]) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($assertType(_ref$1, ptrType$12, true)[1]) { */ case 13: - pub = _ref$1.$val; - _1 = pub.Curve; - _r$5 = elliptic.P256(); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$5))) { $s = 19; continue; } - _r$6 = elliptic.P384(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$6))) { $s = 20; continue; } - _r$7 = elliptic.P521(); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(_1, (_r$7))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if ($interfaceIsEqual(_1, (_r$5))) { */ case 19: - $s = 23; continue; - /* } else if ($interfaceIsEqual(_1, (_r$6))) { */ case 20: - $s = 23; continue; - /* } else if ($interfaceIsEqual(_1, (_r$7))) { */ case 21: - $s = 23; continue; - /* } else { */ case 22: - _r$8 = pub.Curve.Params(); /* */ $s = 27; case 27: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg = new $String(_r$8.Name); - _r$9 = fmt.Errorf("tls: unsupported certificate curve (%s)", new sliceType$6([_arg])); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$3 = _r$9; - $s = 29; case 29: return $24r$3; - /* } */ case 23: - case 18: - $s = 17; continue; - /* } else if ($assertType(_ref$1, ptrType$11, true)[1]) { */ case 14: - pub$1 = _ref$1.$val; - _r$10 = fmt.Errorf("tls: certificate RSA key size too small for supported signature algorithms", new sliceType$6([])); /* */ $s = 30; case 30: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$4 = _r$10; - $s = 31; case 31: return $24r$4; - /* } else if ($assertType(_ref$1, ed25519.PublicKey, true)[1]) { */ case 15: - pub$2 = _ref$1.$val; - $s = 17; continue; - /* } else { */ case 16: - pub$3 = _ref$1; - _r$11 = fmt.Errorf("tls: unsupported certificate key (%T)", new sliceType$6([pub$3])); /* */ $s = 32; case 32: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - $24r$5 = _r$11; - $s = 33; case 33: return $24r$5; - /* } */ case 17: - /* */ if (!(cert.SupportedSignatureAlgorithms === sliceType$7.nil)) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!(cert.SupportedSignatureAlgorithms === sliceType$7.nil)) { */ case 34: - _r$12 = fmt.Errorf("tls: peer doesn't support the certificate custom signature algorithms", new sliceType$6([])); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$6 = _r$12; - $s = 37; case 37: return $24r$6; - /* } */ case 35: - _r$13 = fmt.Errorf("tls: internal error: unsupported key (%T)", new sliceType$6([cert.PrivateKey])); /* */ $s = 38; case 38: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - $24r$7 = _r$13; - $s = 39; case 39: return $24r$7; - /* */ } return; } var $f = {$blk: unsupportedCertificateError, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _1, _arg, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, cert, ok, pub, pub$1, pub$2, pub$3, signer, $s};return $f; - }; - alert.prototype.String = function() { - var _entry, _tuple, e, ok, s; - e = this.$val; - _tuple = (_entry = alertText[alert.keyFor(e)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return "tls: " + s; - } - return "tls: alert(" + strconv.Itoa(((e >> 0))) + ")"; - }; - $ptrType(alert).prototype.String = function() { return new alert(this.$get()).String(); }; - alert.prototype.Error = function() { - var e; - e = this.$val; - return new alert(e).String(); - }; - $ptrType(alert).prototype.Error = function() { return new alert(this.$get()).Error(); }; - ptrType$52.methods = [{prop: "Accept", name: "Accept", pkg: "", typ: $funcType([], [net.Conn, $error], false)}]; - ptrType$53.methods = [{prop: "Dial", name: "Dial", pkg: "", typ: $funcType([$String, $String], [net.Conn, $error], false)}, {prop: "netDialer", name: "netDialer", pkg: "crypto/tls", typ: $funcType([], [ptrType$9], false)}, {prop: "DialContext", name: "DialContext", pkg: "", typ: $funcType([context.Context, $String, $String], [net.Conn, $error], false)}]; - ptrType$32.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$54.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - finishedHash.methods = [{prop: "Sum", name: "Sum", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "clientSum", name: "clientSum", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5], false)}, {prop: "serverSum", name: "serverSum", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5], false)}, {prop: "hashForClientCertificate", name: "hashForClientCertificate", pkg: "crypto/tls", typ: $funcType([$Uint8, crypto.Hash, sliceType$5], [sliceType$5], false)}]; - ptrType$55.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "discardHandshakeBuffer", name: "discardHandshakeBuffer", pkg: "crypto/tls", typ: $funcType([], [], false)}]; - ptrType$56.methods = [{prop: "CurveID", name: "CurveID", pkg: "", typ: $funcType([], [CurveID], false)}, {prop: "PublicKey", name: "PublicKey", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "SharedKey", name: "SharedKey", pkg: "", typ: $funcType([sliceType$5], [sliceType$5], false)}]; - ptrType$57.methods = [{prop: "CurveID", name: "CurveID", pkg: "", typ: $funcType([], [CurveID], false)}, {prop: "PublicKey", name: "PublicKey", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "SharedKey", name: "SharedKey", pkg: "", typ: $funcType([sliceType$5], [sliceType$5], false)}]; - rsaKeyAgreement.methods = [{prop: "generateServerKeyExchange", name: "generateServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$31, ptrType$26, ptrType$30], [ptrType$22, $error], false)}, {prop: "processClientKeyExchange", name: "processClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$31, ptrType$23, $Uint16], [sliceType$5, $error], false)}, {prop: "processServerKeyExchange", name: "processServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$26, ptrType$30, ptrType$5, ptrType$22], [$error], false)}, {prop: "generateClientKeyExchange", name: "generateClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$26, ptrType$5], [sliceType$5, ptrType$23, $error], false)}]; - ptrType$58.methods = [{prop: "generateServerKeyExchange", name: "generateServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$31, ptrType$26, ptrType$30], [ptrType$22, $error], false)}, {prop: "processClientKeyExchange", name: "processClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$31, ptrType$23, $Uint16], [sliceType$5, $error], false)}, {prop: "processServerKeyExchange", name: "processServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$26, ptrType$30, ptrType$5, ptrType$22], [$error], false)}, {prop: "generateClientKeyExchange", name: "generateClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$26, ptrType$5], [sliceType$5, ptrType$23, $error], false)}]; - ptrType$59.methods = [{prop: "handshake", name: "handshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "processClientHello", name: "processClientHello", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "checkForResumption", name: "checkForResumption", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "pickCertificate", name: "pickCertificate", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendDummyChangeCipherSpec", name: "sendDummyChangeCipherSpec", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "doHelloRetryRequest", name: "doHelloRetryRequest", pkg: "crypto/tls", typ: $funcType([CurveID], [$error], false)}, {prop: "sendServerParameters", name: "sendServerParameters", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "requestClientCert", name: "requestClientCert", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "sendServerCertificate", name: "sendServerCertificate", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendServerFinished", name: "sendServerFinished", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "shouldSendSessionTickets", name: "shouldSendSessionTickets", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "sendSessionTickets", name: "sendSessionTickets", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readClientCertificate", name: "readClientCertificate", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readClientFinished", name: "readClientFinished", pkg: "crypto/tls", typ: $funcType([], [$error], false)}]; - ptrType$60.methods = [{prop: "handshake", name: "handshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "processClientHello", name: "processClientHello", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "pickCipherSuite", name: "pickCipherSuite", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "cipherSuiteOk", name: "cipherSuiteOk", pkg: "crypto/tls", typ: $funcType([ptrType$3], [$Bool], false)}, {prop: "checkForResumption", name: "checkForResumption", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "doResumeHandshake", name: "doResumeHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "doFullHandshake", name: "doFullHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "establishKeys", name: "establishKeys", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readFinished", name: "readFinished", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$error], false)}, {prop: "sendSessionTicket", name: "sendSessionTicket", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendFinished", name: "sendFinished", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$error], false)}]; - marshalingFunction.methods = [{prop: "Marshal", name: "Marshal", pkg: "", typ: $funcType([ptrType$15], [$error], false)}]; - ptrType$26.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "marshalWithoutBinders", name: "marshalWithoutBinders", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "updateBinders", name: "updateBinders", pkg: "crypto/tls", typ: $funcType([sliceType$11], [], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$30.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$38.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$61.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$46.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$45.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$39.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$34.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$27.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$22.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$40.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$41.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$23.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$29.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$33.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$28.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$42.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$44.methods = [{prop: "marshal", name: "marshal", pkg: "crypto/tls", typ: $funcType([], [sliceType$5], false)}, {prop: "unmarshal", name: "unmarshal", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Bool], false)}]; - ptrType$62.methods = [{prop: "handshake", name: "handshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "checkServerHelloOrHRR", name: "checkServerHelloOrHRR", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendDummyChangeCipherSpec", name: "sendDummyChangeCipherSpec", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "processHelloRetryRequest", name: "processHelloRetryRequest", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "processServerHello", name: "processServerHello", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "establishHandshakeKeys", name: "establishHandshakeKeys", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readServerParameters", name: "readServerParameters", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readServerCertificate", name: "readServerCertificate", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readServerFinished", name: "readServerFinished", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendClientCertificate", name: "sendClientCertificate", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendClientFinished", name: "sendClientFinished", pkg: "crypto/tls", typ: $funcType([], [$error], false)}]; - ptrType$63.methods = [{prop: "handshake", name: "handshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "pickCipherSuite", name: "pickCipherSuite", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "doFullHandshake", name: "doFullHandshake", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "establishKeys", name: "establishKeys", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "serverResumedSession", name: "serverResumedSession", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}, {prop: "processServerHello", name: "processServerHello", pkg: "crypto/tls", typ: $funcType([], [$Bool, $error], false)}, {prop: "readFinished", name: "readFinished", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$error], false)}, {prop: "readSessionTicket", name: "readSessionTicket", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "sendFinished", name: "sendFinished", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$error], false)}]; - ptrType$6.methods = [{prop: "encryptTicket", name: "encryptTicket", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5, $error], false)}, {prop: "decryptTicket", name: "decryptTicket", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5, $Bool], false)}, {prop: "serverHandshake", name: "serverHandshake", pkg: "crypto/tls", typ: $funcType([context.Context], [$error], false)}, {prop: "readClientHello", name: "readClientHello", pkg: "crypto/tls", typ: $funcType([context.Context], [ptrType$26, $error], false)}, {prop: "processCertsFromClient", name: "processCertsFromClient", pkg: "crypto/tls", typ: $funcType([Certificate], [$error], false)}, {prop: "handleNewSessionTicket", name: "handleNewSessionTicket", pkg: "crypto/tls", typ: $funcType([ptrType$45], [$error], false)}, {prop: "makeClientHello", name: "makeClientHello", pkg: "crypto/tls", typ: $funcType([], [ptrType$26, ecdheParameters, $error], false)}, {prop: "clientHandshake", name: "clientHandshake", pkg: "crypto/tls", typ: $funcType([context.Context], [$error], false)}, {prop: "loadSession", name: "loadSession", pkg: "crypto/tls", typ: $funcType([ptrType$26], [$String, ptrType$37, sliceType$5, sliceType$5], false)}, {prop: "pickTLSVersion", name: "pickTLSVersion", pkg: "crypto/tls", typ: $funcType([ptrType$30], [$error], false)}, {prop: "verifyServerCertificate", name: "verifyServerCertificate", pkg: "crypto/tls", typ: $funcType([sliceType$11], [$error], false)}, {prop: "getClientCertificate", name: "getClientCertificate", pkg: "crypto/tls", typ: $funcType([ptrType$64], [ptrType$31, $error], false)}, {prop: "LocalAddr", name: "LocalAddr", pkg: "", typ: $funcType([], [net.Addr], false)}, {prop: "RemoteAddr", name: "RemoteAddr", pkg: "", typ: $funcType([], [net.Addr], false)}, {prop: "SetDeadline", name: "SetDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetReadDeadline", name: "SetReadDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "SetWriteDeadline", name: "SetWriteDeadline", pkg: "", typ: $funcType([time.Time], [$error], false)}, {prop: "NetConn", name: "NetConn", pkg: "", typ: $funcType([], [net.Conn], false)}, {prop: "newRecordHeaderError", name: "newRecordHeaderError", pkg: "crypto/tls", typ: $funcType([net.Conn, $String], [RecordHeaderError], false)}, {prop: "readRecord", name: "readRecord", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readChangeCipherSpec", name: "readChangeCipherSpec", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "readRecordOrCCS", name: "readRecordOrCCS", pkg: "crypto/tls", typ: $funcType([$Bool], [$error], false)}, {prop: "retryReadRecord", name: "retryReadRecord", pkg: "crypto/tls", typ: $funcType([$Bool], [$error], false)}, {prop: "readFromUntil", name: "readFromUntil", pkg: "crypto/tls", typ: $funcType([io.Reader, $Int], [$error], false)}, {prop: "sendAlertLocked", name: "sendAlertLocked", pkg: "crypto/tls", typ: $funcType([alert], [$error], false)}, {prop: "sendAlert", name: "sendAlert", pkg: "crypto/tls", typ: $funcType([alert], [$error], false)}, {prop: "maxPayloadSizeForWrite", name: "maxPayloadSizeForWrite", pkg: "crypto/tls", typ: $funcType([recordType], [$Int], false)}, {prop: "write", name: "write", pkg: "crypto/tls", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "flush", name: "flush", pkg: "crypto/tls", typ: $funcType([], [$Int, $error], false)}, {prop: "writeRecordLocked", name: "writeRecordLocked", pkg: "crypto/tls", typ: $funcType([recordType, sliceType$5], [$Int, $error], false)}, {prop: "writeRecord", name: "writeRecord", pkg: "crypto/tls", typ: $funcType([recordType, sliceType$5], [$Int, $error], false)}, {prop: "readHandshake", name: "readHandshake", pkg: "crypto/tls", typ: $funcType([], [$emptyInterface, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "handleRenegotiation", name: "handleRenegotiation", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "handlePostHandshakeMessage", name: "handlePostHandshakeMessage", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "handleKeyUpdate", name: "handleKeyUpdate", pkg: "crypto/tls", typ: $funcType([ptrType$46], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}, {prop: "closeNotify", name: "closeNotify", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "Handshake", name: "Handshake", pkg: "", typ: $funcType([], [$error], false)}, {prop: "HandshakeContext", name: "HandshakeContext", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "handshakeContext", name: "handshakeContext", pkg: "crypto/tls", typ: $funcType([context.Context], [$error], false)}, {prop: "ConnectionState", name: "ConnectionState", pkg: "", typ: $funcType([], [ConnectionState], false)}, {prop: "connectionStateLocked", name: "connectionStateLocked", pkg: "crypto/tls", typ: $funcType([], [ConnectionState], false)}, {prop: "OCSPResponse", name: "OCSPResponse", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "VerifyHostname", name: "VerifyHostname", pkg: "", typ: $funcType([$String], [$error], false)}, {prop: "handshakeComplete", name: "handshakeComplete", pkg: "crypto/tls", typ: $funcType([], [$Bool], false)}]; - ptrType$65.methods = [{prop: "setErrorLocked", name: "setErrorLocked", pkg: "crypto/tls", typ: $funcType([$error], [$error], false)}, {prop: "prepareCipherSpec", name: "prepareCipherSpec", pkg: "crypto/tls", typ: $funcType([$Uint16, $emptyInterface, hash.Hash], [], false)}, {prop: "changeCipherSpec", name: "changeCipherSpec", pkg: "crypto/tls", typ: $funcType([], [$error], false)}, {prop: "setTrafficSecret", name: "setTrafficSecret", pkg: "crypto/tls", typ: $funcType([ptrType$2, sliceType$5], [], false)}, {prop: "incSeq", name: "incSeq", pkg: "crypto/tls", typ: $funcType([], [], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}, {prop: "decrypt", name: "decrypt", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5, recordType, $error], false)}, {prop: "encrypt", name: "encrypt", pkg: "crypto/tls", typ: $funcType([sliceType$5, sliceType$5, io.Reader], [sliceType$5, $error], false)}]; - ptrType$66.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - RecordHeaderError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$67.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}]; - CurveID.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$68.methods = [{prop: "ExportKeyingMaterial", name: "ExportKeyingMaterial", pkg: "", typ: $funcType([$String, sliceType$5, $Int], [sliceType$5, $error], false)}]; - ClientAuthType.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - SignatureScheme.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$69.methods = [{prop: "Context", name: "Context", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "SupportsCertificate", name: "SupportsCertificate", pkg: "", typ: $funcType([ptrType$31], [$error], false)}]; - ptrType$64.methods = [{prop: "Context", name: "Context", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "SupportsCertificate", name: "SupportsCertificate", pkg: "", typ: $funcType([ptrType$31], [$error], false)}]; - ptrType$4.methods = [{prop: "ticketKeyFromBytes", name: "ticketKeyFromBytes", pkg: "crypto/tls", typ: $funcType([arrayType], [ticketKey], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [ptrType$4], false)}, {prop: "initLegacySessionTicketKeyRLocked", name: "initLegacySessionTicketKeyRLocked", pkg: "crypto/tls", typ: $funcType([], [], false)}, {prop: "ticketKeys", name: "ticketKeys", pkg: "crypto/tls", typ: $funcType([ptrType$4], [sliceType$4], false)}, {prop: "SetSessionTicketKeys", name: "SetSessionTicketKeys", pkg: "", typ: $funcType([sliceType$18], [], false)}, {prop: "rand", name: "rand", pkg: "crypto/tls", typ: $funcType([], [io.Reader], false)}, {prop: "time", name: "time", pkg: "crypto/tls", typ: $funcType([], [time.Time], false)}, {prop: "cipherSuites", name: "cipherSuites", pkg: "crypto/tls", typ: $funcType([], [sliceType$2], false)}, {prop: "supportedVersions", name: "supportedVersions", pkg: "crypto/tls", typ: $funcType([$Bool], [sliceType$2], false)}, {prop: "maxSupportedVersion", name: "maxSupportedVersion", pkg: "crypto/tls", typ: $funcType([$Bool], [$Uint16], false)}, {prop: "curvePreferences", name: "curvePreferences", pkg: "crypto/tls", typ: $funcType([], [sliceType$3], false)}, {prop: "supportsCurve", name: "supportsCurve", pkg: "crypto/tls", typ: $funcType([CurveID], [$Bool], false)}, {prop: "mutualVersion", name: "mutualVersion", pkg: "crypto/tls", typ: $funcType([$Bool, sliceType$2], [$Uint16, $Bool], false)}, {prop: "getCertificate", name: "getCertificate", pkg: "crypto/tls", typ: $funcType([ptrType$69], [ptrType$31, $error], false)}, {prop: "BuildNameToCertificate", name: "BuildNameToCertificate", pkg: "", typ: $funcType([], [], false)}, {prop: "writeKeyLog", name: "writeKeyLog", pkg: "crypto/tls", typ: $funcType([$String, sliceType$5, sliceType$5], [$error], false)}]; - ptrType$31.methods = [{prop: "leaf", name: "leaf", pkg: "crypto/tls", typ: $funcType([], [ptrType$5, $error], false)}]; - ptrType$2.methods = [{prop: "expandLabel", name: "expandLabel", pkg: "crypto/tls", typ: $funcType([sliceType$5, $String, sliceType$5, $Int], [sliceType$5], false)}, {prop: "deriveSecret", name: "deriveSecret", pkg: "crypto/tls", typ: $funcType([sliceType$5, $String, hash.Hash], [sliceType$5], false)}, {prop: "extract", name: "extract", pkg: "crypto/tls", typ: $funcType([sliceType$5, sliceType$5], [sliceType$5], false)}, {prop: "nextTrafficSecret", name: "nextTrafficSecret", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5], false)}, {prop: "trafficKey", name: "trafficKey", pkg: "crypto/tls", typ: $funcType([sliceType$5], [sliceType$5, sliceType$5], false)}, {prop: "finishedHash", name: "finishedHash", pkg: "crypto/tls", typ: $funcType([sliceType$5, hash.Hash], [sliceType$5], false)}, {prop: "exportKeyingMaterial", name: "exportKeyingMaterial", pkg: "crypto/tls", typ: $funcType([sliceType$5, hash.Hash], [funcType$2], false)}]; - ptrType$71.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [sliceType$5], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [sliceType$5, $error], false)}]; - ptrType$72.methods = [{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [sliceType$5], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [sliceType$5, $error], false)}]; - ptrType$73.methods = [{prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$5], [sliceType$5], false)}]; - alert.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - listener.init("crypto/tls", [{prop: "Listener", name: "Listener", embedded: true, exported: true, typ: net.Listener, tag: ""}, {prop: "config", name: "config", embedded: false, exported: false, typ: ptrType$4, tag: ""}]); - Dialer.init("", [{prop: "NetDialer", name: "NetDialer", embedded: false, exported: true, typ: ptrType$9, tag: ""}, {prop: "Config", name: "Config", embedded: false, exported: true, typ: ptrType$4, tag: ""}]); - sessionState.init("crypto/tls", [{prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "createdAt", name: "createdAt", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "certificates", name: "certificates", embedded: false, exported: false, typ: sliceType$11, tag: ""}, {prop: "usedOldKey", name: "usedOldKey", embedded: false, exported: false, typ: $Bool, tag: ""}]); - sessionStateTLS13.init("crypto/tls", [{prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "createdAt", name: "createdAt", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "resumptionSecret", name: "resumptionSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "certificate", name: "certificate", embedded: false, exported: false, typ: Certificate, tag: ""}]); - finishedHash.init("crypto/tls", [{prop: "client", name: "client", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "server", name: "server", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "clientMD5", name: "clientMD5", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "serverMD5", name: "serverMD5", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "buffer", name: "buffer", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "version", name: "version", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "prf", name: "prf", embedded: false, exported: false, typ: funcType, tag: ""}]); - ecdheParameters.init([{prop: "CurveID", name: "CurveID", pkg: "", typ: $funcType([], [CurveID], false)}, {prop: "PublicKey", name: "PublicKey", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "SharedKey", name: "SharedKey", pkg: "", typ: $funcType([sliceType$5], [sliceType$5], false)}]); - nistParameters.init("crypto/tls", [{prop: "privateKey", name: "privateKey", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "x", name: "x", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "y", name: "y", embedded: false, exported: false, typ: ptrType$21, tag: ""}, {prop: "curveID", name: "curveID", embedded: false, exported: false, typ: CurveID, tag: ""}]); - x25519Parameters.init("crypto/tls", [{prop: "privateKey", name: "privateKey", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "publicKey", name: "publicKey", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - keyAgreement.init([{prop: "generateClientKeyExchange", name: "generateClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$26, ptrType$5], [sliceType$5, ptrType$23, $error], false)}, {prop: "generateServerKeyExchange", name: "generateServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$31, ptrType$26, ptrType$30], [ptrType$22, $error], false)}, {prop: "processClientKeyExchange", name: "processClientKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$31, ptrType$23, $Uint16], [sliceType$5, $error], false)}, {prop: "processServerKeyExchange", name: "processServerKeyExchange", pkg: "crypto/tls", typ: $funcType([ptrType$4, ptrType$26, ptrType$30, ptrType$5, ptrType$22], [$error], false)}]); - rsaKeyAgreement.init("", []); - ecdheKeyAgreement.init("crypto/tls", [{prop: "version", name: "version", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "isRSA", name: "isRSA", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "params", name: "params", embedded: false, exported: false, typ: ecdheParameters, tag: ""}, {prop: "ckx", name: "ckx", embedded: false, exported: false, typ: ptrType$23, tag: ""}, {prop: "preMasterSecret", name: "preMasterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - serverHandshakeStateTLS13.init("crypto/tls", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "clientHello", name: "clientHello", embedded: false, exported: false, typ: ptrType$26, tag: ""}, {prop: "hello", name: "hello", embedded: false, exported: false, typ: ptrType$30, tag: ""}, {prop: "sentDummyCCS", name: "sentDummyCCS", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "usingPSK", name: "usingPSK", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "suite", name: "suite", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "cert", name: "cert", embedded: false, exported: false, typ: ptrType$31, tag: ""}, {prop: "sigAlg", name: "sigAlg", embedded: false, exported: false, typ: SignatureScheme, tag: ""}, {prop: "earlySecret", name: "earlySecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "sharedKey", name: "sharedKey", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "handshakeSecret", name: "handshakeSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "trafficSecret", name: "trafficSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "transcript", name: "transcript", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "clientFinished", name: "clientFinished", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - serverHandshakeState.init("crypto/tls", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "clientHello", name: "clientHello", embedded: false, exported: false, typ: ptrType$26, tag: ""}, {prop: "hello", name: "hello", embedded: false, exported: false, typ: ptrType$30, tag: ""}, {prop: "suite", name: "suite", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "ecdheOk", name: "ecdheOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ecSignOk", name: "ecSignOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rsaDecryptOk", name: "rsaDecryptOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rsaSignOk", name: "rsaSignOk", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sessionState", name: "sessionState", embedded: false, exported: false, typ: ptrType$32, tag: ""}, {prop: "finishedHash", name: "finishedHash", embedded: false, exported: false, typ: finishedHash, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "cert", name: "cert", embedded: false, exported: false, typ: ptrType$31, tag: ""}]); - marshalingFunction.init([ptrType$15], [$error], false); - clientHelloMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "random", name: "random", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "sessionId", name: "sessionId", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "cipherSuites", name: "cipherSuites", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "compressionMethods", name: "compressionMethods", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "serverName", name: "serverName", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "ocspStapling", name: "ocspStapling", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "supportedCurves", name: "supportedCurves", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "supportedPoints", name: "supportedPoints", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "ticketSupported", name: "ticketSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sessionTicket", name: "sessionTicket", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "supportedSignatureAlgorithms", name: "supportedSignatureAlgorithms", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "supportedSignatureAlgorithmsCert", name: "supportedSignatureAlgorithmsCert", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "secureRenegotiationSupported", name: "secureRenegotiationSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "secureRenegotiation", name: "secureRenegotiation", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "alpnProtocols", name: "alpnProtocols", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "supportedVersions", name: "supportedVersions", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "cookie", name: "cookie", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "keyShares", name: "keyShares", embedded: false, exported: false, typ: sliceType$15, tag: ""}, {prop: "earlyData", name: "earlyData", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pskModes", name: "pskModes", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "pskIdentities", name: "pskIdentities", embedded: false, exported: false, typ: sliceType$16, tag: ""}, {prop: "pskBinders", name: "pskBinders", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); - serverHelloMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "random", name: "random", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "sessionId", name: "sessionId", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "compressionMethod", name: "compressionMethod", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "ocspStapling", name: "ocspStapling", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ticketSupported", name: "ticketSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "secureRenegotiationSupported", name: "secureRenegotiationSupported", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "secureRenegotiation", name: "secureRenegotiation", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "alpnProtocol", name: "alpnProtocol", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: sliceType$11, tag: ""}, {prop: "supportedVersion", name: "supportedVersion", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "serverShare", name: "serverShare", embedded: false, exported: false, typ: keyShare, tag: ""}, {prop: "selectedIdentityPresent", name: "selectedIdentityPresent", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "selectedIdentity", name: "selectedIdentity", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "supportedPoints", name: "supportedPoints", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "cookie", name: "cookie", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "selectedGroup", name: "selectedGroup", embedded: false, exported: false, typ: CurveID, tag: ""}]); - encryptedExtensionsMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "alpnProtocol", name: "alpnProtocol", embedded: false, exported: false, typ: $String, tag: ""}]); - endOfEarlyDataMsg.init("", []); - keyUpdateMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "updateRequested", name: "updateRequested", embedded: false, exported: false, typ: $Bool, tag: ""}]); - newSessionTicketMsgTLS13.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "lifetime", name: "lifetime", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "ageAdd", name: "ageAdd", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "nonce", name: "nonce", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "label", name: "label", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "maxEarlyData", name: "maxEarlyData", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - certificateRequestMsgTLS13.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "ocspStapling", name: "ocspStapling", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "supportedSignatureAlgorithms", name: "supportedSignatureAlgorithms", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "supportedSignatureAlgorithmsCert", name: "supportedSignatureAlgorithmsCert", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "certificateAuthorities", name: "certificateAuthorities", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); - certificateMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "certificates", name: "certificates", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); - certificateMsgTLS13.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "certificate", name: "certificate", embedded: false, exported: false, typ: Certificate, tag: ""}, {prop: "ocspStapling", name: "ocspStapling", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: $Bool, tag: ""}]); - serverKeyExchangeMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - certificateStatusMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "response", name: "response", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - serverHelloDoneMsg.init("", []); - clientKeyExchangeMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "ciphertext", name: "ciphertext", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - finishedMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "verifyData", name: "verifyData", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - certificateRequestMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "hasSignatureAlgorithm", name: "hasSignatureAlgorithm", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "certificateTypes", name: "certificateTypes", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "supportedSignatureAlgorithms", name: "supportedSignatureAlgorithms", embedded: false, exported: false, typ: sliceType$7, tag: ""}, {prop: "certificateAuthorities", name: "certificateAuthorities", embedded: false, exported: false, typ: sliceType$11, tag: ""}]); - certificateVerifyMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "hasSignatureAlgorithm", name: "hasSignatureAlgorithm", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "signatureAlgorithm", name: "signatureAlgorithm", embedded: false, exported: false, typ: SignatureScheme, tag: ""}, {prop: "signature", name: "signature", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - newSessionTicketMsg.init("crypto/tls", [{prop: "raw", name: "raw", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "ticket", name: "ticket", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - helloRequestMsg.init("", []); - clientHandshakeStateTLS13.init("crypto/tls", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "serverHello", name: "serverHello", embedded: false, exported: false, typ: ptrType$30, tag: ""}, {prop: "hello", name: "hello", embedded: false, exported: false, typ: ptrType$26, tag: ""}, {prop: "ecdheParams", name: "ecdheParams", embedded: false, exported: false, typ: ecdheParameters, tag: ""}, {prop: "session", name: "session", embedded: false, exported: false, typ: ptrType$37, tag: ""}, {prop: "earlySecret", name: "earlySecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "binderKey", name: "binderKey", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "certReq", name: "certReq", embedded: false, exported: false, typ: ptrType$39, tag: ""}, {prop: "usingPSK", name: "usingPSK", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentDummyCCS", name: "sentDummyCCS", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "suite", name: "suite", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "transcript", name: "transcript", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "trafficSecret", name: "trafficSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - clientHandshakeState.init("crypto/tls", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "serverHello", name: "serverHello", embedded: false, exported: false, typ: ptrType$30, tag: ""}, {prop: "hello", name: "hello", embedded: false, exported: false, typ: ptrType$26, tag: ""}, {prop: "suite", name: "suite", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "finishedHash", name: "finishedHash", embedded: false, exported: false, typ: finishedHash, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "session", name: "session", embedded: false, exported: false, typ: ptrType$37, tag: ""}]); - Conn.init("crypto/tls", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "isClient", name: "isClient", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "handshakeFn", name: "handshakeFn", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "handshakeStatus", name: "handshakeStatus", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "handshakeMutex", name: "handshakeMutex", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "handshakeErr", name: "handshakeErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "haveVers", name: "haveVers", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "config", name: "config", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "handshakes", name: "handshakes", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "didResume", name: "didResume", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "ocspResponse", name: "ocspResponse", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: sliceType$11, tag: ""}, {prop: "peerCertificates", name: "peerCertificates", embedded: false, exported: false, typ: sliceType$12, tag: ""}, {prop: "verifiedChains", name: "verifiedChains", embedded: false, exported: false, typ: sliceType$13, tag: ""}, {prop: "serverName", name: "serverName", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "secureRenegotiation", name: "secureRenegotiation", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ekm", name: "ekm", embedded: false, exported: false, typ: funcType$2, tag: ""}, {prop: "resumptionSecret", name: "resumptionSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "ticketKeys", name: "ticketKeys", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "clientFinishedIsFirst", name: "clientFinishedIsFirst", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closeNotifyErr", name: "closeNotifyErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "closeNotifySent", name: "closeNotifySent", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "clientFinished", name: "clientFinished", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "serverFinished", name: "serverFinished", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "clientProtocol", name: "clientProtocol", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "in$27", name: "in", embedded: false, exported: false, typ: halfConn, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: halfConn, tag: ""}, {prop: "rawInput", name: "rawInput", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "input", name: "input", embedded: false, exported: false, typ: bytes.Reader, tag: ""}, {prop: "hand", name: "hand", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "buffering", name: "buffering", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sendBuf", name: "sendBuf", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "bytesSent", name: "bytesSent", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "packetsSent", name: "packetsSent", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "retryCount", name: "retryCount", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "activeCall", name: "activeCall", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: arrayType$4, tag: ""}]); - halfConn.init("crypto/tls", [{prop: "Mutex", name: "Mutex", embedded: true, exported: true, typ: sync.Mutex, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "version", name: "version", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "cipher", name: "cipher", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "mac", name: "mac", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "seq", name: "seq", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "scratchBuf", name: "scratchBuf", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "nextCipher", name: "nextCipher", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "nextMac", name: "nextMac", embedded: false, exported: false, typ: hash.Hash, tag: ""}, {prop: "trafficSecret", name: "trafficSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - permanentError.init("crypto/tls", [{prop: "err", name: "err", embedded: false, exported: false, typ: net.Error, tag: ""}]); - cbcMode.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CryptBlocks", name: "CryptBlocks", pkg: "", typ: $funcType([sliceType$5, sliceType$5], [], false)}, {prop: "SetIV", name: "SetIV", pkg: "", typ: $funcType([sliceType$5], [], false)}]); - RecordHeaderError.init("", [{prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RecordHeader", name: "RecordHeader", embedded: false, exported: true, typ: arrayType$6, tag: ""}, {prop: "Conn", name: "Conn", embedded: false, exported: true, typ: net.Conn, tag: ""}]); - atLeastReader.init("", [{prop: "R", name: "R", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "N", name: "N", embedded: false, exported: true, typ: $Int64, tag: ""}]); - keyShare.init("crypto/tls", [{prop: "group", name: "group", embedded: false, exported: false, typ: CurveID, tag: ""}, {prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - pskIdentity.init("crypto/tls", [{prop: "label", name: "label", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "obfuscatedTicketAge", name: "obfuscatedTicketAge", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - ConnectionState.init("crypto/tls", [{prop: "Version", name: "Version", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "HandshakeComplete", name: "HandshakeComplete", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "DidResume", name: "DidResume", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "CipherSuite", name: "CipherSuite", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "NegotiatedProtocol", name: "NegotiatedProtocol", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "NegotiatedProtocolIsMutual", name: "NegotiatedProtocolIsMutual", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ServerName", name: "ServerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "PeerCertificates", name: "PeerCertificates", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "VerifiedChains", name: "VerifiedChains", embedded: false, exported: true, typ: sliceType$13, tag: ""}, {prop: "SignedCertificateTimestamps", name: "SignedCertificateTimestamps", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "OCSPResponse", name: "OCSPResponse", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "TLSUnique", name: "TLSUnique", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "ekm", name: "ekm", embedded: false, exported: false, typ: funcType$2, tag: ""}]); - ClientSessionState.init("crypto/tls", [{prop: "sessionTicket", name: "sessionTicket", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "vers", name: "vers", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "cipherSuite", name: "cipherSuite", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "masterSecret", name: "masterSecret", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "serverCertificates", name: "serverCertificates", embedded: false, exported: false, typ: sliceType$12, tag: ""}, {prop: "verifiedChains", name: "verifiedChains", embedded: false, exported: false, typ: sliceType$13, tag: ""}, {prop: "receivedAt", name: "receivedAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "ocspResponse", name: "ocspResponse", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "scts", name: "scts", embedded: false, exported: false, typ: sliceType$11, tag: ""}, {prop: "nonce", name: "nonce", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "useBy", name: "useBy", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "ageAdd", name: "ageAdd", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - ClientSessionCache.init([{prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [ptrType$37, $Bool], false)}, {prop: "Put", name: "Put", pkg: "", typ: $funcType([$String, ptrType$37], [], false)}]); - ClientHelloInfo.init("crypto/tls", [{prop: "CipherSuites", name: "CipherSuites", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "ServerName", name: "ServerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "SupportedCurves", name: "SupportedCurves", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "SupportedPoints", name: "SupportedPoints", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "SignatureSchemes", name: "SignatureSchemes", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "SupportedProtos", name: "SupportedProtos", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "SupportedVersions", name: "SupportedVersions", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Conn", name: "Conn", embedded: false, exported: true, typ: net.Conn, tag: ""}, {prop: "config", name: "config", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}]); - CertificateRequestInfo.init("crypto/tls", [{prop: "AcceptableCAs", name: "AcceptableCAs", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "SignatureSchemes", name: "SignatureSchemes", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "Version", name: "Version", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}]); - Config.init("crypto/tls", [{prop: "Rand", name: "Rand", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "Time", name: "Time", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Certificates", name: "Certificates", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "NameToCertificate", name: "NameToCertificate", embedded: false, exported: true, typ: mapType, tag: ""}, {prop: "GetCertificate", name: "GetCertificate", embedded: false, exported: true, typ: funcType$4, tag: ""}, {prop: "GetClientCertificate", name: "GetClientCertificate", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "GetConfigForClient", name: "GetConfigForClient", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "VerifyPeerCertificate", name: "VerifyPeerCertificate", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "VerifyConnection", name: "VerifyConnection", embedded: false, exported: true, typ: funcType$8, tag: ""}, {prop: "RootCAs", name: "RootCAs", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "NextProtos", name: "NextProtos", embedded: false, exported: true, typ: sliceType$1, tag: ""}, {prop: "ServerName", name: "ServerName", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ClientAuth", name: "ClientAuth", embedded: false, exported: true, typ: ClientAuthType, tag: ""}, {prop: "ClientCAs", name: "ClientCAs", embedded: false, exported: true, typ: ptrType, tag: ""}, {prop: "InsecureSkipVerify", name: "InsecureSkipVerify", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "CipherSuites", name: "CipherSuites", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "PreferServerCipherSuites", name: "PreferServerCipherSuites", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SessionTicketsDisabled", name: "SessionTicketsDisabled", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SessionTicketKey", name: "SessionTicketKey", embedded: false, exported: true, typ: arrayType, tag: ""}, {prop: "ClientSessionCache", name: "ClientSessionCache", embedded: false, exported: true, typ: ClientSessionCache, tag: ""}, {prop: "MinVersion", name: "MinVersion", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "MaxVersion", name: "MaxVersion", embedded: false, exported: true, typ: $Uint16, tag: ""}, {prop: "CurvePreferences", name: "CurvePreferences", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "DynamicRecordSizingDisabled", name: "DynamicRecordSizingDisabled", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Renegotiation", name: "Renegotiation", embedded: false, exported: true, typ: RenegotiationSupport, tag: ""}, {prop: "KeyLogWriter", name: "KeyLogWriter", embedded: false, exported: true, typ: io.Writer, tag: ""}, {prop: "mutex", name: "mutex", embedded: false, exported: false, typ: sync.RWMutex, tag: ""}, {prop: "sessionTicketKeys", name: "sessionTicketKeys", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "autoSessionTicketKeys", name: "autoSessionTicketKeys", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); - ticketKey.init("crypto/tls", [{prop: "keyName", name: "keyName", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "aesKey", name: "aesKey", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "hmacKey", name: "hmacKey", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "created", name: "created", embedded: false, exported: false, typ: time.Time, tag: ""}]); - Certificate.init("", [{prop: "Certificate", name: "Certificate", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "PrivateKey", name: "PrivateKey", embedded: false, exported: true, typ: crypto.PrivateKey, tag: ""}, {prop: "SupportedSignatureAlgorithms", name: "SupportedSignatureAlgorithms", embedded: false, exported: true, typ: sliceType$7, tag: ""}, {prop: "OCSPStaple", name: "OCSPStaple", embedded: false, exported: true, typ: sliceType$5, tag: ""}, {prop: "SignedCertificateTimestamps", name: "SignedCertificateTimestamps", embedded: false, exported: true, typ: sliceType$11, tag: ""}, {prop: "Leaf", name: "Leaf", embedded: false, exported: true, typ: ptrType$5, tag: ""}]); - cipherSuite.init("crypto/tls", [{prop: "id", name: "id", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "keyLen", name: "keyLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "macLen", name: "macLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ivLen", name: "ivLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "ka", name: "ka", embedded: false, exported: false, typ: funcType$9, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "cipher", name: "cipher", embedded: false, exported: false, typ: funcType$10, tag: ""}, {prop: "mac", name: "mac", embedded: false, exported: false, typ: funcType$11, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: funcType$12, tag: ""}]); - cipherSuiteTLS13.init("crypto/tls", [{prop: "id", name: "id", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "keyLen", name: "keyLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: funcType$12, tag: ""}, {prop: "hash", name: "hash", embedded: false, exported: false, typ: crypto.Hash, tag: ""}]); - aead.init([{prop: "NonceSize", name: "NonceSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Open", name: "Open", pkg: "", typ: $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [sliceType$5, $error], false)}, {prop: "Overhead", name: "Overhead", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Seal", name: "Seal", pkg: "", typ: $funcType([sliceType$5, sliceType$5, sliceType$5, sliceType$5], [sliceType$5], false)}, {prop: "explicitNonceLen", name: "explicitNonceLen", pkg: "crypto/tls", typ: $funcType([], [$Int], false)}]); - prefixNonceAEAD.init("crypto/tls", [{prop: "nonce", name: "nonce", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: cipher.AEAD, tag: ""}]); - xorNonceAEAD.init("crypto/tls", [{prop: "nonceMask", name: "nonceMask", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "aead", name: "aead", embedded: false, exported: false, typ: cipher.AEAD, tag: ""}]); - constantTimeHash.init([{prop: "BlockSize", name: "BlockSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "ConstantTimeSum", name: "ConstantTimeSum", pkg: "", typ: $funcType([sliceType$5], [sliceType$5], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Sum", name: "Sum", pkg: "", typ: $funcType([sliceType$5], [sliceType$5], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$5], [$Int, $error], false)}]); - cthWrapper.init("crypto/tls", [{prop: "h", name: "h", embedded: false, exported: false, typ: constantTimeHash, tag: ""}]); - binaryMarshaler.init([{prop: "MarshalBinary", name: "MarshalBinary", pkg: "", typ: $funcType([], [sliceType$5, $error], false)}, {prop: "UnmarshalBinary", name: "UnmarshalBinary", pkg: "", typ: $funcType([sliceType$5], [$error], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = list.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = context.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = crypto.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = aes.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cipher.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = des.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ecdsa.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ed25519.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = elliptic.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hmac.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = md5.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rc4.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rsa.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha1.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha256.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sha512.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = subtle.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = x509.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pem.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hash.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cpu.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = godebug.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = big.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = net.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = chacha20poly1305.$init(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cryptobyte.$init(); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = curve25519.$init(); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hkdf.$init(); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - testingOnlyForceDowngradeCanary = false; - writerMutex = new sync.Mutex.ptr(0, 0); - emptyConfig = new Config.ptr($ifaceNil, $throwNilPointerError, sliceType.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType.nil, sliceType$1.nil, "", 0, ptrType.nil, false, sliceType$2.nil, false, false, arrayType.zero(), $ifaceNil, 0, 0, sliceType$3.nil, false, 0, $ifaceNil, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$4.nil, sliceType$4.nil); - masterSecretLabel = (new sliceType$5($stringToBytes("master secret"))); - keyExpansionLabel = (new sliceType$5($stringToBytes("key expansion"))); - clientFinishedLabel = (new sliceType$5($stringToBytes("client finished"))); - serverFinishedLabel = (new sliceType$5($stringToBytes("server finished"))); - errClientKeyExchange = errors.New("tls: invalid ClientKeyExchange message"); - errServerKeyExchange = errors.New("tls: invalid ServerKeyExchange message"); - outBufPool = new sync.Pool.ptr(sliceType$6.nil, (function() { - return $newDataPointer(sliceType$5.nil, ptrType$1); - })); - errShutdown = errors.New("tls: protocol is shutdown"); - errEarlyCloseWrite = errors.New("tls: CloseWrite called before handshake complete"); - _SignatureScheme_index_8 = $toNativeArray($kindUint8, [0, 13, 26, 39, 46]); - _CurveID_index_0 = $toNativeArray($kindUint8, [0, 9, 18, 27]); - _ClientAuthType_index = $toNativeArray($kindUint8, [0, 12, 29, 49, 72, 98]); - directSigning = 0; - helloRetryRequestRandom = new sliceType$5([207, 33, 173, 116, 229, 154, 97, 17, 190, 29, 140, 2, 30, 101, 184, 145, 194, 162, 17, 22, 122, 187, 140, 94, 7, 158, 9, 226, 200, 168, 51, 156]); - supportedSignatureAlgorithms = new sliceType$7([2052, 1027, 2055, 2053, 2054, 1025, 1281, 1537, 1283, 1539, 513, 515]); - deprecatedSessionTicketKey = (new sliceType$5($stringToBytes("DEPRECATED"))); - supportedVersions = new sliceType$2([772, 771, 770, 769]); - _r = godebug.Get("tls10default"); /* */ $s = 42; case 42: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - debugEnableTLS10 = _r === "1"; - defaultCurvePreferences = new sliceType$3([29, 23, 24, 25]); - errNoCertificates = errors.New("tls: no certificates configured"); - hasGCMAsmAMD64 = cpu.X86.HasAES && cpu.X86.HasPCLMULQDQ; - hasGCMAsmARM64 = cpu.ARM64.HasAES && cpu.ARM64.HasPMULL; - hasGCMAsmS390X = cpu.S390X.HasAES && cpu.S390X.HasAESCBC && cpu.S390X.HasAESCTR && (cpu.S390X.HasGHASH || cpu.S390X.HasAESGCM); - hasAESGCMHardwareSupport = false && hasGCMAsmAMD64 || false && hasGCMAsmARM64 || false && hasGCMAsmS390X; - disabledCipherSuites = new sliceType$2([49187, 49191, 60, 49159, 49169, 5]); - aesgcmCiphers = $makeMap($Uint16.keyFor, [{ k: 49199, v: true }, { k: 49200, v: true }, { k: 49195, v: true }, { k: 49196, v: true }, { k: 4865, v: true }, { k: 4866, v: true }]); - cipherSuitesTLS13 = new sliceType$8([new cipherSuiteTLS13.ptr(4865, 16, aeadAESGCMTLS13, 5), new cipherSuiteTLS13.ptr(4867, 32, aeadChaCha20Poly1305, 5), new cipherSuiteTLS13.ptr(4866, 32, aeadAESGCMTLS13, 6)]); - defaultCipherSuitesTLS13 = new sliceType$2([4865, 4866, 4867]); - defaultCipherSuitesTLS13NoAES = new sliceType$2([4867, 4865, 4866]); - cipherSuites = new sliceType$9([new cipherSuite.ptr(52392, 32, 0, 12, ecdheRSAKA, 5, $throwNilPointerError, $throwNilPointerError, aeadChaCha20Poly1305), new cipherSuite.ptr(52393, 32, 0, 12, ecdheECDSAKA, 7, $throwNilPointerError, $throwNilPointerError, aeadChaCha20Poly1305), new cipherSuite.ptr(49199, 16, 0, 4, ecdheRSAKA, 5, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49195, 16, 0, 4, ecdheECDSAKA, 7, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49200, 32, 0, 4, ecdheRSAKA, 13, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49196, 32, 0, 4, ecdheECDSAKA, 15, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(49191, 16, 32, 16, ecdheRSAKA, 5, cipherAES, macSHA256, $throwNilPointerError), new cipherSuite.ptr(49171, 16, 20, 16, ecdheRSAKA, 1, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49187, 16, 32, 16, ecdheECDSAKA, 7, cipherAES, macSHA256, $throwNilPointerError), new cipherSuite.ptr(49161, 16, 20, 16, ecdheECDSAKA, 3, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49172, 32, 20, 16, ecdheRSAKA, 1, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49162, 32, 20, 16, ecdheECDSAKA, 3, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(156, 16, 0, 4, rsaKA, 4, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(157, 32, 0, 4, rsaKA, 12, $throwNilPointerError, $throwNilPointerError, aeadAESGCM), new cipherSuite.ptr(60, 16, 32, 16, rsaKA, 4, cipherAES, macSHA256, $throwNilPointerError), new cipherSuite.ptr(47, 16, 20, 16, rsaKA, 0, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(53, 32, 20, 16, rsaKA, 0, cipherAES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49170, 24, 20, 8, ecdheRSAKA, 1, cipher3DES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(10, 24, 20, 8, rsaKA, 0, cipher3DES, macSHA1, $throwNilPointerError), new cipherSuite.ptr(5, 16, 20, 0, rsaKA, 0, cipherRC4, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49169, 16, 20, 0, ecdheRSAKA, 1, cipherRC4, macSHA1, $throwNilPointerError), new cipherSuite.ptr(49159, 16, 20, 0, ecdheECDSAKA, 3, cipherRC4, macSHA1, $throwNilPointerError)]); - cipherSuitesPreferenceOrder = new sliceType$2([49195, 49199, 49196, 49200, 52393, 52392, 49161, 49171, 49162, 49172, 156, 157, 47, 53, 49170, 10, 49187, 49191, 60, 49159, 49169, 5]); - cipherSuitesPreferenceOrderNoAES = new sliceType$2([52393, 52392, 49195, 49199, 49196, 49200, 49161, 49171, 49162, 49172, 156, 157, 47, 53, 49170, 10, 49187, 49191, 60, 49159, 49169, 5]); - defaultCipherSuitesLen = cipherSuitesPreferenceOrder.$length - disabledCipherSuites.$length >> 0; - defaultCipherSuites = $subslice(cipherSuitesPreferenceOrder, 0, defaultCipherSuitesLen); - signaturePadding = new sliceType$5([32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32]); - rsaSignatureSchemes = new sliceType$10([new structType.ptr(2052, ($imul(new crypto.Hash(5).Size(), 2)) + 2 >> 0, 772), new structType.ptr(2053, ($imul(new crypto.Hash(6).Size(), 2)) + 2 >> 0, 772), new structType.ptr(2054, ($imul(new crypto.Hash(7).Size(), 2)) + 2 >> 0, 772), new structType.ptr(1025, (19 + new crypto.Hash(5).Size() >> 0) + 11 >> 0, 771), new structType.ptr(1281, (19 + new crypto.Hash(6).Size() >> 0) + 11 >> 0, 771), new structType.ptr(1537, (19 + new crypto.Hash(7).Size() >> 0) + 11 >> 0, 771), new structType.ptr(513, (15 + new crypto.Hash(3).Size() >> 0) + 11 >> 0, 771)]); - alertText = $makeMap(alert.keyFor, [{ k: 0, v: "close notify" }, { k: 10, v: "unexpected message" }, { k: 20, v: "bad record MAC" }, { k: 21, v: "decryption failed" }, { k: 22, v: "record overflow" }, { k: 30, v: "decompression failure" }, { k: 40, v: "handshake failure" }, { k: 42, v: "bad certificate" }, { k: 43, v: "unsupported certificate" }, { k: 44, v: "revoked certificate" }, { k: 45, v: "expired certificate" }, { k: 46, v: "unknown certificate" }, { k: 47, v: "illegal parameter" }, { k: 48, v: "unknown certificate authority" }, { k: 49, v: "access denied" }, { k: 50, v: "error decoding message" }, { k: 51, v: "error decrypting message" }, { k: 60, v: "export restriction" }, { k: 70, v: "protocol version not supported" }, { k: 71, v: "insufficient security level" }, { k: 80, v: "internal error" }, { k: 86, v: "inappropriate fallback" }, { k: 90, v: "user canceled" }, { k: 100, v: "no renegotiation" }, { k: 109, v: "missing extension" }, { k: 110, v: "unsupported extension" }, { k: 111, v: "certificate unobtainable" }, { k: 112, v: "unrecognized name" }, { k: 113, v: "bad certificate status response" }, { k: 114, v: "bad certificate hash value" }, { k: 115, v: "unknown PSK identity" }, { k: 116, v: "certificate required" }, { k: 120, v: "no application protocol" }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["mime"] = (function() { - var $pkg = {}, $init, bufio, bytes, base64, errors, fmt, io, os, sort, strings, sync, unicode, utf8, sliceType, sliceType$1, sliceType$2, ptrType, mimeGlobs, typeFiles, mimeTypes, mimeTypes$24ptr, mimeTypesLower, mimeTypesLower$24ptr, extensionsMu, extensions, extensions$24ptr, osInitMime, errInvalidWord, maxBase64Len, init, loadMimeGlobsFile, loadMimeFile, initMimeUnix, setExtensionType, FormatMediaType, checkMediaTypeDisposition, ParseMediaType, decode2231Enc, isNotTokenChar, consumeToken, consumeValue, consumeMediaParam, percentHexUnescape, ishex, unhex, isTSpecial, isTokenChar, isToken, needsEncoding; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - base64 = $packages["encoding/base64"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - os = $packages["os"]; - sort = $packages["sort"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - unicode = $packages["unicode"]; - utf8 = $packages["unicode/utf8"]; - sliceType = $sliceType($String); - sliceType$1 = $sliceType($Uint8); - sliceType$2 = $sliceType($emptyInterface); - ptrType = $ptrType(strings.Builder); - init = function() { - osInitMime = initMimeUnix; - }; - loadMimeGlobsFile = function(filename) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, err, err$1, extension, f, fields, filename, ok, scanner, $s, $deferred, $r, $c} = $restore(this, {filename}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r = os.Open(filename); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - f = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = err; - $s = 4; case 4: return $24r; - /* } */ case 3: - $deferred.push([$methodVal(f, "Close"), []]); - scanner = bufio.NewScanner(f); - /* while (true) { */ case 5: - _r$1 = scanner.Scan(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* if (!(_r$1)) { break; } */ if(!(_r$1)) { $s = 6; continue; } - fields = strings.Split(scanner.Text(), ":"); - if (fields.$length < 3 || (0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).length < 1 || (2 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 2]).length < 2) { - /* continue; */ $s = 5; continue; - } else if (((0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).charCodeAt(0) === 35) || !(((2 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 2]).charCodeAt(0) === 42))) { - /* continue; */ $s = 5; continue; - } - extension = $substring((2 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 2]), 1); - _r$2 = mimeTypes.Load(new $String(extension)); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - ok = _tuple$1[1]; - if (ok) { - /* continue; */ $s = 5; continue; - } - _r$3 = setExtensionType(extension, (1 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 1])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 5; continue; - case 6: - err$1 = scanner.Err(); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $panic(err$1); - } - $24r$1 = $ifaceNil; - $s = 10; case 10: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: loadMimeGlobsFile, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _tuple, _tuple$1, err, err$1, extension, f, fields, filename, ok, scanner, $s, $deferred};return $f; } } - }; - loadMimeFile = function(filename) { - var {_i, _r, _r$1, _r$2, _r$3, _ref, _tuple, err, err$1, ext, f, fields, filename, mimeType, scanner, $s, $deferred, $r, $c} = $restore(this, {filename}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r = os.Open(filename); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - f = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - $deferred.push([$methodVal(f, "Close"), []]); - scanner = bufio.NewScanner(f); - /* while (true) { */ case 5: - _r$1 = scanner.Scan(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* if (!(_r$1)) { break; } */ if(!(_r$1)) { $s = 6; continue; } - _r$2 = strings.Fields(scanner.Text()); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - fields = _r$2; - if (fields.$length <= 1 || ((0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]).charCodeAt(0) === 35)) { - /* continue; */ $s = 5; continue; - } - mimeType = (0 >= fields.$length ? ($throwRuntimeError("index out of range"), undefined) : fields.$array[fields.$offset + 0]); - _ref = $subslice(fields, 1); - _i = 0; - /* while (true) { */ case 9: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 10; continue; } - ext = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (ext.charCodeAt(0) === 35) { - /* break; */ $s = 10; continue; - } - _r$3 = setExtensionType("." + ext, mimeType); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _i++; - $s = 9; continue; - case 10: - $s = 5; continue; - case 6: - err$1 = scanner.Err(); - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $panic(err$1); - } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: loadMimeFile, $c: true, $r, _i, _r, _r$1, _r$2, _r$3, _ref, _tuple, err, err$1, ext, f, fields, filename, mimeType, scanner, $s, $deferred};return $f; } } - }; - initMimeUnix = function() { - var {_i, _i$1, _r, _ref, _ref$1, err, filename, filename$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = mimeGlobs; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - filename = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = loadMimeGlobsFile(filename); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return; - } - _i++; - $s = 1; continue; - case 2: - _ref$1 = typeFiles; - _i$1 = 0; - /* while (true) { */ case 4: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } - filename$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $r = loadMimeFile(filename$1); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 4; continue; - case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: initMimeUnix, $c: true, $r, _i, _i$1, _r, _ref, _ref$1, err, filename, filename$1, $s};return $f; - }; - setExtensionType = function(extension, mimeType) { - var {$24r, $24r$1, $24r$2, _entry, _i, _key, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, ei, err, extLower, extension, exts, justType, mimeType, ok, param, v, $s, $deferred, $r, $c} = $restore(this, {extension, mimeType}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r = ParseMediaType(mimeType); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - justType = _tuple[0]; - param = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = err; - $s = 4; case 4: return $24r; - /* } */ case 3: - /* */ if (strings.HasPrefix(mimeType, "text/") && (_entry = param[$String.keyFor("charset")], _entry !== undefined ? _entry.v : "") === "") { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (strings.HasPrefix(mimeType, "text/") && (_entry = param[$String.keyFor("charset")], _entry !== undefined ? _entry.v : "") === "") { */ case 5: - _key = "charset"; (param || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: "utf-8" }; - _r$1 = FormatMediaType(mimeType, param); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - mimeType = _r$1; - /* } */ case 6: - _r$2 = strings.ToLower(extension); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - extLower = _r$2; - $r = mimeTypes.Store(new $String(extension), new $String(mimeType)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = mimeTypesLower.Store(new $String(extLower), new $String(mimeType)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = extensionsMu.Lock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(extensionsMu, "Unlock"), []]); - exts = sliceType.nil; - _r$3 = extensions.Load(new $String(justType)); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - ei = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - exts = $assertType(ei, sliceType); - } - _ref = exts; - _i = 0; - /* while (true) { */ case 13: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 14; continue; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (v === extLower) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (v === extLower) { */ case 15: - $24r$1 = $ifaceNil; - $s = 17; case 17: return $24r$1; - /* } */ case 16: - _i++; - $s = 13; continue; - case 14: - $r = extensions.Store(new $String(justType), $append(exts, extLower)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$2 = $ifaceNil; - $s = 19; case 19: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: setExtensionType, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _i, _key, _r, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, ei, err, extLower, extension, exts, justType, mimeType, ok, param, v, $s, $deferred};return $f; } } - }; - FormatMediaType = function(t, param) { - var {_entry, _entry$1, _i, _i$1, _keys, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _v, a, attribute, attrs, b, ch, character, index, index$1, major, needEnc, offset, offset$1, ok, param, sub, t, value, $s, $r, $c} = $restore(this, {t, param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - _tuple = strings.Cut(t, "/"); - major = _tuple[0]; - sub = _tuple[1]; - ok = _tuple[2]; - /* */ if (!ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!ok) { */ case 1: - _r = isToken(t); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!_r) { */ case 4: - $s = -1; return ""; - /* } */ case 5: - _r$1 = strings.ToLower(t); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = b.WriteString(_r$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = 3; continue; - /* } else { */ case 2: - _r$3 = isToken(major); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - if (!_r$3) { _v = true; $s = 11; continue s; } - _r$4 = isToken(sub); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = !_r$4; case 11: - /* */ if (_v) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 9: - $s = -1; return ""; - /* } */ case 10: - _r$5 = strings.ToLower(major); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = b.WriteString(_r$5); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - b.WriteByte(47); - _r$7 = strings.ToLower(sub); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = b.WriteString(_r$7); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 3: - attrs = $makeSlice(sliceType, 0, $keys(param).length); - _ref = param; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - a = _entry.k; - attrs = $append(attrs, a); - _i++; - } - $r = sort.Strings(attrs); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref$1 = attrs; - _i$1 = 0; - /* while (true) { */ case 19: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 20; continue; } - attribute = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - value = (_entry$1 = param[$String.keyFor(attribute)], _entry$1 !== undefined ? _entry$1.v : ""); - b.WriteByte(59); - b.WriteByte(32); - _r$9 = isToken(attribute); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (!_r$9) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!_r$9) { */ case 21: - $s = -1; return ""; - /* } */ case 22: - _r$10 = strings.ToLower(attribute); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = b.WriteString(_r$10); /* */ $s = 25; case 25: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - needEnc = needsEncoding(value); - if (needEnc) { - b.WriteByte(42); - } - b.WriteByte(61); - if (needEnc) { - b.WriteString("utf-8''"); - offset = 0; - index = 0; - while (true) { - if (!(index < value.length)) { break; } - ch = value.charCodeAt(index); - if (ch <= 32 || ch >= 127 || (ch === 42) || (ch === 39) || (ch === 37) || isTSpecial(((ch >> 0)))) { - b.WriteString($substring(value, offset, index)); - offset = index + 1 >> 0; - b.WriteByte(37); - b.WriteByte("0123456789ABCDEF".charCodeAt((ch >>> 4 << 24 >>> 24))); - b.WriteByte("0123456789ABCDEF".charCodeAt(((ch & 15) >>> 0))); - } - index = index + (1) >> 0; - } - b.WriteString($substring(value, offset)); - _i$1++; - /* continue; */ $s = 19; continue; - } - _r$12 = isToken(value); /* */ $s = 28; case 28: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - /* */ if (_r$12) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_r$12) { */ case 26: - b.WriteString(value); - _i$1++; - /* continue; */ $s = 19; continue; - /* } */ case 27: - b.WriteByte(34); - offset$1 = 0; - index$1 = 0; - while (true) { - if (!(index$1 < value.length)) { break; } - character = value.charCodeAt(index$1); - if ((character === 34) || (character === 92)) { - b.WriteString($substring(value, offset$1, index$1)); - offset$1 = index$1; - b.WriteByte(92); - } - index$1 = index$1 + (1) >> 0; - } - b.WriteString($substring(value, offset$1)); - b.WriteByte(34); - _i$1++; - $s = 19; continue; - case 20: - $s = -1; return b.String(); - /* */ } return; } var $f = {$blk: FormatMediaType, $c: true, $r, _entry, _entry$1, _i, _i$1, _keys, _r, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tuple, _v, a, attribute, attrs, b, ch, character, index, index$1, major, needEnc, offset, offset$1, ok, param, sub, t, value, $s};return $f; - }; - $pkg.FormatMediaType = FormatMediaType; - checkMediaTypeDisposition = function(s) { - var {_r, _r$1, _tuple, _tuple$1, rest, s, subtype, typ, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = consumeToken(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - typ = _tuple[0]; - rest = _tuple[1]; - if (typ === "") { - $s = -1; return errors.New("mime: no media type"); - } - if (rest === "") { - $s = -1; return $ifaceNil; - } - if (!strings.HasPrefix(rest, "/")) { - $s = -1; return errors.New("mime: expected slash after first token"); - } - _r$1 = consumeToken($substring(rest, 1)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - subtype = _tuple$1[0]; - rest = _tuple$1[1]; - if (subtype === "") { - $s = -1; return errors.New("mime: expected token after slash"); - } - if (!(rest === "")) { - $s = -1; return errors.New("mime: unexpected content after media subtype"); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: checkMediaTypeDisposition, $c: true, $r, _r, _r$1, _tuple, _tuple$1, rest, s, subtype, typ, $s};return $f; - }; - ParseMediaType = function(v) { - var {_entry, _entry$1, _entry$2, _entry$3, _entry$4, _entry$5, _entry$6, _i, _key, _key$1, _key$2, _key$3, _keys, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, base, baseName, buf, continuation, decv, decv$1, decv$2, encodedPart, err, exists, key, key$1, mediatype, n, ok, ok$1, ok$2, ok$3, ok$4, ok$5, ok$6, params, pieceMap, pmap, rest, simplePart, singlePartKey, v, v$1, v$2, v$3, valid, value, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mediatype = ""; - params = false; - err = $ifaceNil; - _tuple = strings.Cut(v, ";"); - base = _tuple[0]; - _r = strings.ToLower(base); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = strings.TrimSpace(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - mediatype = _r$1; - _r$2 = checkMediaTypeDisposition(mediatype); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp = ""; - _tmp$1 = false; - _tmp$2 = err; - mediatype = _tmp; - params = _tmp$1; - err = _tmp$2; - $s = -1; return [mediatype, params, err]; - } - params = {}; - continuation = false; - v = $substring(v, base.length); - /* while (true) { */ case 4: - /* if (!(v.length > 0)) { break; } */ if(!(v.length > 0)) { $s = 5; continue; } - _r$3 = strings.TrimLeftFunc(v, unicode.IsSpace); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - v = _r$3; - if (v.length === 0) { - /* break; */ $s = 5; continue; - } - _r$4 = consumeMediaParam(v); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - key = _tuple$1[0]; - value = _tuple$1[1]; - rest = _tuple$1[2]; - /* */ if (key === "") { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (key === "") { */ case 8: - _r$5 = strings.TrimSpace(rest); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5 === ";") { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_r$5 === ";") { */ case 10: - /* break; */ $s = 5; continue; - /* } */ case 11: - _tmp$3 = mediatype; - _tmp$4 = false; - _tmp$5 = $pkg.ErrInvalidMediaParameter; - mediatype = _tmp$3; - params = _tmp$4; - err = _tmp$5; - $s = -1; return [mediatype, params, err]; - /* } */ case 9: - pmap = params; - _tuple$2 = strings.Cut(key, "*"); - baseName = _tuple$2[0]; - ok = _tuple$2[2]; - if (ok) { - if (continuation === false) { - continuation = {}; - } - ok$1 = false; - _tuple$3 = (_entry = continuation[$String.keyFor(baseName)], _entry !== undefined ? [_entry.v, true] : [false, false]); - pmap = _tuple$3[0]; - ok$1 = _tuple$3[1]; - if (!ok$1) { - _key = baseName; (continuation || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: {} }; - pmap = (_entry$1 = continuation[$String.keyFor(baseName)], _entry$1 !== undefined ? _entry$1.v : false); - } - } - _tuple$4 = (_entry$2 = pmap[$String.keyFor(key)], _entry$2 !== undefined ? [_entry$2.v, true] : ["", false]); - exists = _tuple$4[1]; - if (exists) { - _tmp$6 = ""; - _tmp$7 = false; - _tmp$8 = errors.New("mime: duplicate parameter name"); - mediatype = _tmp$6; - params = _tmp$7; - err = _tmp$8; - $s = -1; return [mediatype, params, err]; - } - _key$1 = key; (pmap || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: value }; - v = rest; - $s = 4; continue; - case 5: - buf = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - _ref = continuation; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 13: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 14; continue; } - _entry$3 = _ref[_keys[_i]]; - if (_entry$3 === undefined) { - _i++; - /* continue; */ $s = 13; continue; - } - key$1 = _entry$3.k; - pieceMap = _entry$3.v; - singlePartKey = key$1 + "*"; - _tuple$5 = (_entry$4 = pieceMap[$String.keyFor(singlePartKey)], _entry$4 !== undefined ? [_entry$4.v, true] : ["", false]); - v$1 = _tuple$5[0]; - ok$2 = _tuple$5[1]; - /* */ if (ok$2) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (ok$2) { */ case 15: - _r$6 = decode2231Enc(v$1); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$6 = _r$6; - decv = _tuple$6[0]; - ok$3 = _tuple$6[1]; - if (ok$3) { - _key$2 = key$1; (params || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$2)] = { k: _key$2, v: decv }; - } - _i++; - /* continue; */ $s = 13; continue; - /* } */ case 16: - buf.Reset(); - valid = false; - n = 0; - /* while (true) { */ case 18: - _r$7 = fmt.Sprintf("%s*%d", new sliceType$2([new $String(key$1), new $Int(n)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - simplePart = _r$7; - _tuple$7 = (_entry$5 = pieceMap[$String.keyFor(simplePart)], _entry$5 !== undefined ? [_entry$5.v, true] : ["", false]); - v$2 = _tuple$7[0]; - ok$4 = _tuple$7[1]; - if (ok$4) { - valid = true; - buf.WriteString(v$2); - n = n + (1) >> 0; - /* continue; */ $s = 18; continue; - } - encodedPart = simplePart + "*"; - _tuple$8 = (_entry$6 = pieceMap[$String.keyFor(encodedPart)], _entry$6 !== undefined ? [_entry$6.v, true] : ["", false]); - v$3 = _tuple$8[0]; - ok$5 = _tuple$8[1]; - if (!ok$5) { - /* break; */ $s = 19; continue; - } - valid = true; - /* */ if (n === 0) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (n === 0) { */ case 21: - _r$8 = decode2231Enc(v$3); /* */ $s = 24; case 24: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$9 = _r$8; - decv$1 = _tuple$9[0]; - ok$6 = _tuple$9[1]; - if (ok$6) { - buf.WriteString(decv$1); - } - $s = 23; continue; - /* } else { */ case 22: - _r$9 = percentHexUnescape(v$3); /* */ $s = 25; case 25: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$10 = _r$9; - decv$2 = _tuple$10[0]; - buf.WriteString(decv$2); - /* } */ case 23: - n = n + (1) >> 0; - $s = 18; continue; - case 19: - if (valid) { - _key$3 = key$1; (params || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$3)] = { k: _key$3, v: buf.String() }; - } - _i++; - $s = 13; continue; - case 14: - $s = -1; return [mediatype, params, err]; - /* */ } return; } var $f = {$blk: ParseMediaType, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _entry$4, _entry$5, _entry$6, _i, _key, _key$1, _key$2, _key$3, _keys, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, base, baseName, buf, continuation, decv, decv$1, decv$2, encodedPart, err, exists, key, key$1, mediatype, n, ok, ok$1, ok$2, ok$3, ok$4, ok$5, ok$6, params, pieceMap, pmap, rest, simplePart, singlePartKey, v, v$1, v$2, v$3, valid, value, $s};return $f; - }; - $pkg.ParseMediaType = ParseMediaType; - decode2231Enc = function(v) { - var {_r, _r$1, _tuple, charset, encv, err, sv, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sv = strings.SplitN(v, "'", 3); - if (!((sv.$length === 3))) { - $s = -1; return ["", false]; - } - _r = strings.ToLower((0 >= sv.$length ? ($throwRuntimeError("index out of range"), undefined) : sv.$array[sv.$offset + 0])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - charset = _r; - if (charset.length === 0) { - $s = -1; return ["", false]; - } - if (!(charset === "us-ascii") && !(charset === "utf-8")) { - $s = -1; return ["", false]; - } - _r$1 = percentHexUnescape((2 >= sv.$length ? ($throwRuntimeError("index out of range"), undefined) : sv.$array[sv.$offset + 2])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - encv = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", false]; - } - $s = -1; return [encv, true]; - /* */ } return; } var $f = {$blk: decode2231Enc, $c: true, $r, _r, _r$1, _tuple, charset, encv, err, sv, v, $s};return $f; - }; - isNotTokenChar = function(r) { - var r; - return !isTokenChar(r); - }; - consumeToken = function(v) { - var {_r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, notPos, rest, token, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - token = ""; - rest = ""; - _r = strings.IndexFunc(v, isNotTokenChar); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - notPos = _r; - if (notPos === -1) { - _tmp = v; - _tmp$1 = ""; - token = _tmp; - rest = _tmp$1; - $s = -1; return [token, rest]; - } - if (notPos === 0) { - _tmp$2 = ""; - _tmp$3 = v; - token = _tmp$2; - rest = _tmp$3; - $s = -1; return [token, rest]; - } - _tmp$4 = $substring(v, 0, notPos); - _tmp$5 = $substring(v, notPos); - token = _tmp$4; - rest = _tmp$5; - $s = -1; return [token, rest]; - /* */ } return; } var $f = {$blk: consumeToken, $c: true, $r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, notPos, rest, token, v, $s};return $f; - }; - consumeValue = function(v) { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buffer, i, r, rest, v, value, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - value = ""; - rest = ""; - if (v === "") { - $s = -1; return [value, rest]; - } - /* */ if (!((v.charCodeAt(0) === 34))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((v.charCodeAt(0) === 34))) { */ case 1: - _r = consumeToken(v); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - value = _tuple[0]; - rest = _tuple[1]; - $24r = [value, rest]; - $s = 4; case 4: return $24r; - /* } */ case 2: - buffer = new strings.Builder.ptr(ptrType.nil, sliceType$1.nil); - i = 1; - while (true) { - if (!(i < v.length)) { break; } - r = v.charCodeAt(i); - if (r === 34) { - _tmp = buffer.String(); - _tmp$1 = $substring(v, (i + 1 >> 0)); - value = _tmp; - rest = _tmp$1; - $s = -1; return [value, rest]; - } - if ((r === 92) && (i + 1 >> 0) < v.length && isTSpecial(((v.charCodeAt((i + 1 >> 0)) >> 0)))) { - buffer.WriteByte(v.charCodeAt((i + 1 >> 0))); - i = i + (1) >> 0; - i = i + (1) >> 0; - continue; - } - if ((r === 13) || (r === 10)) { - _tmp$2 = ""; - _tmp$3 = v; - value = _tmp$2; - rest = _tmp$3; - $s = -1; return [value, rest]; - } - buffer.WriteByte(v.charCodeAt(i)); - i = i + (1) >> 0; - } - _tmp$4 = ""; - _tmp$5 = v; - value = _tmp$4; - rest = _tmp$5; - $s = -1; return [value, rest]; - /* */ } return; } var $f = {$blk: consumeValue, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buffer, i, r, rest, v, value, $s};return $f; - }; - consumeMediaParam = function(v) { - var {_r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, param, rest, rest2, v, value, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - param = ""; - value = ""; - rest = ""; - _r = strings.TrimLeftFunc(v, unicode.IsSpace); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - rest = _r; - if (!strings.HasPrefix(rest, ";")) { - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = v; - param = _tmp; - value = _tmp$1; - rest = _tmp$2; - $s = -1; return [param, value, rest]; - } - rest = $substring(rest, 1); - _r$1 = strings.TrimLeftFunc(rest, unicode.IsSpace); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - rest = _r$1; - _r$2 = consumeToken(rest); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - param = _tuple[0]; - rest = _tuple[1]; - _r$3 = strings.ToLower(param); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - param = _r$3; - if (param === "") { - _tmp$3 = ""; - _tmp$4 = ""; - _tmp$5 = v; - param = _tmp$3; - value = _tmp$4; - rest = _tmp$5; - $s = -1; return [param, value, rest]; - } - _r$4 = strings.TrimLeftFunc(rest, unicode.IsSpace); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - rest = _r$4; - if (!strings.HasPrefix(rest, "=")) { - _tmp$6 = ""; - _tmp$7 = ""; - _tmp$8 = v; - param = _tmp$6; - value = _tmp$7; - rest = _tmp$8; - $s = -1; return [param, value, rest]; - } - rest = $substring(rest, 1); - _r$5 = strings.TrimLeftFunc(rest, unicode.IsSpace); /* */ $s = 6; case 6: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rest = _r$5; - _r$6 = consumeValue(rest); /* */ $s = 7; case 7: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - value = _tuple$1[0]; - rest2 = _tuple$1[1]; - if (value === "" && rest2 === rest) { - _tmp$9 = ""; - _tmp$10 = ""; - _tmp$11 = v; - param = _tmp$9; - value = _tmp$10; - rest = _tmp$11; - $s = -1; return [param, value, rest]; - } - rest = rest2; - _tmp$12 = param; - _tmp$13 = value; - _tmp$14 = rest; - param = _tmp$12; - value = _tmp$13; - rest = _tmp$14; - $s = -1; return [param, value, rest]; - /* */ } return; } var $f = {$blk: consumeMediaParam, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, param, rest, rest2, v, value, $s};return $f; - }; - percentHexUnescape = function(s) { - var {$24r, _1, _r, i, i$1, j, percents, s, t, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - percents = 0; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < s.length)) { break; } */ if(!(i < s.length)) { $s = 2; continue; } - if (!((s.charCodeAt(i) === 37))) { - i = i + (1) >> 0; - /* continue; */ $s = 1; continue; - } - percents = percents + (1) >> 0; - /* */ if ((i + 2 >> 0) >= s.length || !ishex(s.charCodeAt((i + 1 >> 0))) || !ishex(s.charCodeAt((i + 2 >> 0)))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((i + 2 >> 0) >= s.length || !ishex(s.charCodeAt((i + 1 >> 0))) || !ishex(s.charCodeAt((i + 2 >> 0)))) { */ case 3: - s = $substring(s, i); - if (s.length > 3) { - s = $substring(s, 0, 3); - } - _r = fmt.Errorf("mime: bogus characters after %%: %q", new sliceType$2([new $String(s)])); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = ["", _r]; - $s = 6; case 6: return $24r; - /* } */ case 4: - i = i + (3) >> 0; - $s = 1; continue; - case 2: - if (percents === 0) { - $s = -1; return [s, $ifaceNil]; - } - t = $makeSlice(sliceType$1, (s.length - ($imul(2, percents)) >> 0)); - j = 0; - i$1 = 0; - while (true) { - if (!(i$1 < s.length)) { break; } - _1 = s.charCodeAt(i$1); - if (_1 === (37)) { - ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = (((unhex(s.charCodeAt((i$1 + 1 >> 0))) << 4 << 24 >>> 24) | unhex(s.charCodeAt((i$1 + 2 >> 0)))) >>> 0)); - j = j + (1) >> 0; - i$1 = i$1 + (3) >> 0; - } else { - ((j < 0 || j >= t.$length) ? ($throwRuntimeError("index out of range"), undefined) : t.$array[t.$offset + j] = s.charCodeAt(i$1)); - j = j + (1) >> 0; - i$1 = i$1 + (1) >> 0; - } - } - $s = -1; return [($bytesToString(t)), $ifaceNil]; - /* */ } return; } var $f = {$blk: percentHexUnescape, $c: true, $r, $24r, _1, _r, i, i$1, j, percents, s, t, $s};return $f; - }; - ishex = function(c) { - var c; - if (48 <= c && c <= 57) { - return true; - } else if (97 <= c && c <= 102) { - return true; - } else if (65 <= c && c <= 70) { - return true; - } - return false; - }; - unhex = function(c) { - var c; - if (48 <= c && c <= 57) { - return c - 48 << 24 >>> 24; - } else if (97 <= c && c <= 102) { - return (c - 97 << 24 >>> 24) + 10 << 24 >>> 24; - } else if (65 <= c && c <= 70) { - return (c - 65 << 24 >>> 24) + 10 << 24 >>> 24; - } - return 0; - }; - isTSpecial = function(r) { - var r; - return strings.ContainsRune("()<>@,;:\\\"/[]?=", r); - }; - isTokenChar = function(r) { - var r; - return r > 32 && r < 127 && !isTSpecial(r); - }; - isToken = function(s) { - var {$24r, _r, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (s === "") { - $s = -1; return false; - } - _r = strings.IndexFunc(s, isNotTokenChar); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r < 0; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: isToken, $c: true, $r, $24r, _r, s, $s};return $f; - }; - needsEncoding = function(s) { - var _i, _ref, _rune, b, s; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - b = _rune[0]; - if ((b < 32 || b > 126) && !((b === 9))) { - return true; - } - _i += _rune[1]; - } - return false; - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = base64.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - mimeTypes = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); - mimeTypesLower = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); - extensionsMu = new sync.Mutex.ptr(0, 0); - extensions = new sync.Map.ptr(new sync.Mutex.ptr(0, 0), new $packages["sync/atomic"].Value.ptr($ifaceNil), false, 0); - osInitMime = $throwNilPointerError; - mimeGlobs = new sliceType(["/usr/local/share/mime/globs2", "/usr/share/mime/globs2"]); - typeFiles = new sliceType(["/etc/mime.types", "/etc/apache2/mime.types", "/etc/apache/mime.types", "/etc/httpd/conf/mime.types"]); - $pkg.ErrInvalidMediaParameter = errors.New("mime: invalid media parameter"); - errInvalidWord = errors.New("mime: invalid RFC 2047 encoded-word"); - maxBase64Len = base64.StdEncoding.DecodedLen(63); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["mime/quotedprintable"] = (function() { - var $pkg = {}, $init, bufio, bytes, fmt, io, Reader, sliceType, ptrType, sliceType$1, ptrType$2, crlf, lf, softSuffix, NewReader, fromHex, readHexByte, isQPDiscardWhitespace; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - Reader = $pkg.Reader = $newType(0, $kindStruct, "quotedprintable.Reader", true, "mime/quotedprintable", true, function(br_, rerr_, line_) { - this.$val = this; - if (arguments.length === 0) { - this.br = ptrType.nil; - this.rerr = $ifaceNil; - this.line = sliceType.nil; - return; - } - this.br = br_; - this.rerr = rerr_; - this.line = line_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(bufio.Reader); - sliceType$1 = $sliceType($emptyInterface); - ptrType$2 = $ptrType(Reader); - NewReader = function(r) { - var r; - return new Reader.ptr(bufio.NewReader(r), $ifaceNil, sliceType.nil); - }; - $pkg.NewReader = NewReader; - fromHex = function(b) { - var {$24r, _r, b, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (b >= 48 && b <= 57) { - $s = -1; return [b - 48 << 24 >>> 24, $ifaceNil]; - } else if (b >= 65 && b <= 70) { - $s = -1; return [(b - 65 << 24 >>> 24) + 10 << 24 >>> 24, $ifaceNil]; - } else if (b >= 97 && b <= 102) { - $s = -1; return [(b - 97 << 24 >>> 24) + 10 << 24 >>> 24, $ifaceNil]; - } - _r = fmt.Errorf("quotedprintable: invalid hex byte 0x%02x", new sliceType$1([new $Uint8(b)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [0, _r]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: fromHex, $c: true, $r, $24r, _r, b, $s};return $f; - }; - readHexByte = function(v) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, hb, lb, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = 0; - err = $ifaceNil; - if (v.$length < 2) { - _tmp = 0; - _tmp$1 = io.ErrUnexpectedEOF; - b = _tmp; - err = _tmp$1; - $s = -1; return [b, err]; - } - _tmp$2 = 0; - _tmp$3 = 0; - hb = _tmp$2; - lb = _tmp$3; - _r = fromHex((0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - hb = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = 0; - _tmp$5 = err; - b = _tmp$4; - err = _tmp$5; - $s = -1; return [b, err]; - } - _r$1 = fromHex((1 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 1])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - lb = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$6 = 0; - _tmp$7 = err; - b = _tmp$6; - err = _tmp$7; - $s = -1; return [b, err]; - } - _tmp$8 = ((hb << 4 << 24 >>> 24) | lb) >>> 0; - _tmp$9 = $ifaceNil; - b = _tmp$8; - err = _tmp$9; - $s = -1; return [b, err]; - /* */ } return; } var $f = {$blk: readHexByte, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, b, err, hb, lb, v, $s};return $f; - }; - isQPDiscardWhitespace = function(r) { - var _1, r; - _1 = r; - if ((_1 === (10)) || (_1 === (13)) || (_1 === (32)) || (_1 === (9))) { - return true; - } - return false; - }; - Reader.ptr.prototype.Read = function(p) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, hasCR, hasLF, n, p, r, rightStripped, wholeLine, x, x$1, x$2, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - r = this; - /* while (true) { */ case 1: - /* if (!(p.$length > 0)) { break; } */ if(!(p.$length > 0)) { $s = 2; continue; } - /* */ if (r.line.$length === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (r.line.$length === 0) { */ case 3: - if (!($interfaceIsEqual(r.rerr, $ifaceNil))) { - _tmp = n; - _tmp$1 = r.rerr; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r = r.br.ReadSlice(10); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - r.line = _tuple[0]; - r.rerr = _tuple[1]; - hasLF = bytes.HasSuffix(r.line, lf); - hasCR = bytes.HasSuffix(r.line, crlf); - wholeLine = r.line; - _r$1 = bytes.TrimRightFunc(wholeLine, isQPDiscardWhitespace); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - r.line = _r$1; - /* */ if (bytes.HasSuffix(r.line, softSuffix)) { $s = 7; continue; } - /* */ if (hasLF) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (bytes.HasSuffix(r.line, softSuffix)) { */ case 7: - rightStripped = $subslice(wholeLine, r.line.$length); - r.line = $subslice(r.line, 0, (r.line.$length - 1 >> 0)); - /* */ if (!bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) && !((rightStripped.$length === 0) && r.line.$length > 0 && $interfaceIsEqual(r.rerr, io.EOF))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) && !((rightStripped.$length === 0) && r.line.$length > 0 && $interfaceIsEqual(r.rerr, io.EOF))) { */ case 10: - _r$2 = fmt.Errorf("quotedprintable: invalid bytes after =: %q", new sliceType$1([rightStripped])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - r.rerr = _r$2; - /* } */ case 11: - $s = 9; continue; - /* } else if (hasLF) { */ case 8: - if (hasCR) { - r.line = $append(r.line, 13, 10); - } else { - r.line = $append(r.line, 10); - } - /* } */ case 9: - /* continue; */ $s = 1; continue; - /* } */ case 4: - b = (x = r.line, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if ((b === 61)) { $s = 14; continue; } - /* */ if ((b === 9) || (b === 13) || (b === 10)) { $s = 15; continue; } - /* */ if (b >= 128) { $s = 16; continue; } - /* */ if (b < 32 || b > 126) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if ((b === 61)) { */ case 14: - _r$3 = readHexByte($subslice(r.line, 1)); /* */ $s = 19; case 19: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - b = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if (r.line.$length >= 2 && !(((x$1 = r.line, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])) === 13)) && !(((x$2 = r.line, (1 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 1])) === 10))) { - b = 61; - /* break; */ $s = 13; continue; - } - _tmp$2 = n; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - r.line = $subslice(r.line, 2); - $s = 18; continue; - /* } else if ((b === 9) || (b === 13) || (b === 10)) { */ case 15: - /* break; */ $s = 13; continue; - $s = 18; continue; - /* } else if (b >= 128) { */ case 16: - /* break; */ $s = 13; continue; - $s = 18; continue; - /* } else if (b < 32 || b > 126) { */ case 17: - _tmp$4 = n; - _r$4 = fmt.Errorf("quotedprintable: invalid unescaped byte 0x%02x in body", new sliceType$1([new $Uint8(b)])); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tmp$5 = _r$4; - n = _tmp$4; - err = _tmp$5; - $24r = [n, err]; - $s = 21; case 21: return $24r; - /* } */ case 18: - case 13: - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = b); - p = $subslice(p, 1); - r.line = $subslice(r.line, 1); - n = n + (1) >> 0; - $s = 1; continue; - case 2: - _tmp$6 = n; - _tmp$7 = $ifaceNil; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.Read, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, b, err, hasCR, hasLF, n, p, r, rightStripped, wholeLine, x, x$1, x$2, $s};return $f; - }; - Reader.prototype.Read = function(p) { return this.$val.Read(p); }; - ptrType$2.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; - Reader.init("mime/quotedprintable", [{prop: "br", name: "br", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "rerr", name: "rerr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "line", name: "line", embedded: false, exported: false, typ: sliceType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - crlf = (new sliceType($stringToBytes("\r\n"))); - lf = (new sliceType($stringToBytes("\n"))); - softSuffix = (new sliceType($stringToBytes("="))); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/textproto"] = (function() { - var $pkg = {}, $init, bufio, bytes, fmt, io, net, strconv, strings, sync, Error, ProtocolError, Reader, dotReader, MIMEHeader, sliceType, sliceType$1, ptrType$3, ptrType$4, ptrType$6, sliceType$2, ptrType$7, funcType, colon, nl, commonHeader, commonHeaderOnce, isTokenTable, TrimString, isASCIISpace, isASCIILetter, NewReader, trim, parseCodeLine, noValidation, mustHaveFieldNameColon, CanonicalMIMEHeaderKey, validHeaderFieldByte, canonicalMIMEHeaderKey, initCommonHeader; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - net = $packages["net"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - Error = $pkg.Error = $newType(0, $kindStruct, "textproto.Error", true, "net/textproto", true, function(Code_, Msg_) { - this.$val = this; - if (arguments.length === 0) { - this.Code = 0; - this.Msg = ""; - return; - } - this.Code = Code_; - this.Msg = Msg_; - }); - ProtocolError = $pkg.ProtocolError = $newType(8, $kindString, "textproto.ProtocolError", true, "net/textproto", true, null); - Reader = $pkg.Reader = $newType(0, $kindStruct, "textproto.Reader", true, "net/textproto", true, function(R_, dot_, buf_) { - this.$val = this; - if (arguments.length === 0) { - this.R = ptrType$3.nil; - this.dot = ptrType$4.nil; - this.buf = sliceType.nil; - return; - } - this.R = R_; - this.dot = dot_; - this.buf = buf_; - }); - dotReader = $pkg.dotReader = $newType(0, $kindStruct, "textproto.dotReader", true, "net/textproto", false, function(r_, state_) { - this.$val = this; - if (arguments.length === 0) { - this.r = ptrType$6.nil; - this.state = 0; - return; - } - this.r = r_; - this.state = state_; - }); - MIMEHeader = $pkg.MIMEHeader = $newType(4, $kindMap, "textproto.MIMEHeader", true, "net/textproto", true, null); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($emptyInterface); - ptrType$3 = $ptrType(bufio.Reader); - ptrType$4 = $ptrType(dotReader); - ptrType$6 = $ptrType(Reader); - sliceType$2 = $sliceType($String); - ptrType$7 = $ptrType(Error); - funcType = $funcType([sliceType], [$error], false); - Error.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = fmt.Sprintf("%03d %s", new sliceType$1([new $Int(e.Code), new $String(e.Msg)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Error.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - Error.prototype.Error = function() { return this.$val.Error(); }; - ProtocolError.prototype.Error = function() { - var p; - p = this.$val; - return (p); - }; - $ptrType(ProtocolError).prototype.Error = function() { return new ProtocolError(this.$get()).Error(); }; - TrimString = function(s) { - var s; - while (true) { - if (!(s.length > 0 && isASCIISpace(s.charCodeAt(0)))) { break; } - s = $substring(s, 1); - } - while (true) { - if (!(s.length > 0 && isASCIISpace(s.charCodeAt((s.length - 1 >> 0))))) { break; } - s = $substring(s, 0, (s.length - 1 >> 0)); - } - return s; - }; - $pkg.TrimString = TrimString; - isASCIISpace = function(b) { - var b; - return (b === 32) || (b === 9) || (b === 10) || (b === 13); - }; - isASCIILetter = function(b) { - var b; - b = (b | (32)) >>> 0; - return 97 <= b && b <= 122; - }; - NewReader = function(r) { - var {r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = commonHeaderOnce.Do(initCommonHeader); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new Reader.ptr(r, ptrType$4.nil, sliceType.nil); - /* */ } return; } var $f = {$blk: NewReader, $c: true, $r, r, $s};return $f; - }; - $pkg.NewReader = NewReader; - Reader.ptr.prototype.ReadLine = function() { - var {_r, _tuple, err, line, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.readLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - $s = -1; return [($bytesToString(line)), err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadLine, $c: true, $r, _r, _tuple, err, line, r, $s};return $f; - }; - Reader.prototype.ReadLine = function() { return this.$val.ReadLine(); }; - Reader.ptr.prototype.ReadLineBytes = function() { - var {_r, _tuple, buf, err, line, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.readLineSlice(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - if (!(line === sliceType.nil)) { - buf = $makeSlice(sliceType, line.$length); - $copySlice(buf, line); - line = buf; - } - $s = -1; return [line, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadLineBytes, $c: true, $r, _r, _tuple, buf, err, line, r, $s};return $f; - }; - Reader.prototype.ReadLineBytes = function() { return this.$val.ReadLineBytes(); }; - Reader.ptr.prototype.readLineSlice = function() { - var {_r, _tuple, err, l, line, more, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - $r = r.closeDot(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - line = sliceType.nil; - /* while (true) { */ case 2: - _r = r.R.ReadLine(); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - l = _tuple[0]; - more = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - if (line === sliceType.nil && !more) { - $s = -1; return [l, $ifaceNil]; - } - line = $appendSlice(line, l); - if (!more) { - /* break; */ $s = 3; continue; - } - $s = 2; continue; - case 3: - $s = -1; return [line, $ifaceNil]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.readLineSlice, $c: true, $r, _r, _tuple, err, l, line, more, r, $s};return $f; - }; - Reader.prototype.readLineSlice = function() { return this.$val.readLineSlice(); }; - Reader.ptr.prototype.ReadContinuedLine = function() { - var {_r, _tuple, err, line, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.readContinuedLineSlice(noValidation); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - $s = -1; return [($bytesToString(line)), err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadContinuedLine, $c: true, $r, _r, _tuple, err, line, r, $s};return $f; - }; - Reader.prototype.ReadContinuedLine = function() { return this.$val.ReadContinuedLine(); }; - trim = function(s) { - var i, n, s, x, x$1; - i = 0; - while (true) { - if (!(i < s.$length && ((((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 32) || (((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]) === 9)))) { break; } - i = i + (1) >> 0; - } - n = s.$length; - while (true) { - if (!(n > i && (((x = n - 1 >> 0, ((x < 0 || x >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x])) === 32) || ((x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + x$1])) === 9)))) { break; } - n = n - (1) >> 0; - } - return $subslice(s, i, n); - }; - Reader.ptr.prototype.ReadContinuedLineBytes = function() { - var {_r, _tuple, buf, err, line, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.readContinuedLineSlice(noValidation); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - if (!(line === sliceType.nil)) { - buf = $makeSlice(sliceType, line.$length); - $copySlice(buf, line); - line = buf; - } - $s = -1; return [line, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadContinuedLineBytes, $c: true, $r, _r, _tuple, buf, err, line, r, $s};return $f; - }; - Reader.prototype.ReadContinuedLineBytes = function() { return this.$val.ReadContinuedLineBytes(); }; - Reader.ptr.prototype.readContinuedLineSlice = function(validateFirstLine) { - var {$24r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, line, line$1, peek, r, validateFirstLine, $s, $r, $c} = $restore(this, {validateFirstLine}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* */ if (validateFirstLine === $throwNilPointerError) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (validateFirstLine === $throwNilPointerError) { */ case 1: - _r = fmt.Errorf("missing validateFirstLine func", new sliceType$1([])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [sliceType.nil, _r]; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$1 = r.readLineSlice(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - line = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - if (line.$length === 0) { - $s = -1; return [line, $ifaceNil]; - } - _r$2 = validateFirstLine(line); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [sliceType.nil, err$1]; - } - /* */ if (r.R.Buffered() > 1) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (r.R.Buffered() > 1) { */ case 7: - _r$3 = r.R.Peek(2); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - peek = _tuple$1[0]; - if (peek.$length > 0 && (isASCIILetter((0 >= peek.$length ? ($throwRuntimeError("index out of range"), undefined) : peek.$array[peek.$offset + 0])) || ((0 >= peek.$length ? ($throwRuntimeError("index out of range"), undefined) : peek.$array[peek.$offset + 0]) === 10)) || (peek.$length === 2) && ((0 >= peek.$length ? ($throwRuntimeError("index out of range"), undefined) : peek.$array[peek.$offset + 0]) === 13) && ((1 >= peek.$length ? ($throwRuntimeError("index out of range"), undefined) : peek.$array[peek.$offset + 1]) === 10)) { - $s = -1; return [trim(line), $ifaceNil]; - } - /* } */ case 8: - r.buf = $appendSlice($subslice(r.buf, 0, 0), trim(line)); - /* while (true) { */ case 10: - _r$4 = r.skipSpace(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* if (!(_r$4 > 0)) { break; } */ if(!(_r$4 > 0)) { $s = 11; continue; } - _r$5 = r.readLineSlice(); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - line$1 = _tuple$2[0]; - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - /* break; */ $s = 11; continue; - } - r.buf = $append(r.buf, 32); - r.buf = $appendSlice(r.buf, trim(line$1)); - $s = 10; continue; - case 11: - $s = -1; return [r.buf, $ifaceNil]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.readContinuedLineSlice, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, line, line$1, peek, r, validateFirstLine, $s};return $f; - }; - Reader.prototype.readContinuedLineSlice = function(validateFirstLine) { return this.$val.readContinuedLineSlice(validateFirstLine); }; - Reader.ptr.prototype.skipSpace = function() { - var {_r, _tuple, c, err, n, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - n = 0; - /* while (true) { */ case 1: - _r = r.R.ReadByte(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 2; continue; - } - if (!((c === 32)) && !((c === 9))) { - r.R.UnreadByte(); - /* break; */ $s = 2; continue; - } - n = n + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return n; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.skipSpace, $c: true, $r, _r, _tuple, c, err, n, r, $s};return $f; - }; - Reader.prototype.skipSpace = function() { return this.$val.skipSpace(); }; - Reader.ptr.prototype.readCodeLine = function(expectCode) { - var {_r, _tuple, _tuple$1, code, continued, err, expectCode, line, message, r, $s, $r, $c} = $restore(this, {expectCode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - code = 0; - continued = false; - message = ""; - err = $ifaceNil; - r = this; - _r = r.ReadLine(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [code, continued, message, err]; - } - _tuple$1 = parseCodeLine(line, expectCode); - code = _tuple$1[0]; - continued = _tuple$1[1]; - message = _tuple$1[2]; - err = _tuple$1[3]; - $s = -1; return [code, continued, message, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.readCodeLine, $c: true, $r, _r, _tuple, _tuple$1, code, continued, err, expectCode, line, message, r, $s};return $f; - }; - Reader.prototype.readCodeLine = function(expectCode) { return this.$val.readCodeLine(expectCode); }; - parseCodeLine = function(line, expectCode) { - var _q, _q$1, _tuple, code, continued, err, expectCode, line, message; - code = 0; - continued = false; - message = ""; - err = $ifaceNil; - if (line.length < 4 || !((line.charCodeAt(3) === 32)) && !((line.charCodeAt(3) === 45))) { - err = new ProtocolError(("short response: " + line)); - return [code, continued, message, err]; - } - continued = line.charCodeAt(3) === 45; - _tuple = strconv.Atoi($substring(line, 0, 3)); - code = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) || code < 100) { - err = new ProtocolError(("invalid response code: " + line)); - return [code, continued, message, err]; - } - message = $substring(line, 4); - if (1 <= expectCode && expectCode < 10 && !(((_q = code / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === expectCode)) || 10 <= expectCode && expectCode < 100 && !(((_q$1 = code / 10, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) === expectCode)) || 100 <= expectCode && expectCode < 1000 && !((code === expectCode))) { - err = new Error.ptr(code, message); - } - return [code, continued, message, err]; - }; - Reader.ptr.prototype.ReadCodeLine = function(expectCode) { - var {_r, _tuple, code, continued, err, expectCode, message, r, $s, $r, $c} = $restore(this, {expectCode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - code = 0; - message = ""; - err = $ifaceNil; - r = this; - _r = r.readCodeLine(expectCode); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - code = _tuple[0]; - continued = _tuple[1]; - message = _tuple[2]; - err = _tuple[3]; - if ($interfaceIsEqual(err, $ifaceNil) && continued) { - err = new ProtocolError(("unexpected multi-line response: " + message)); - } - $s = -1; return [code, message, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadCodeLine, $c: true, $r, _r, _tuple, code, continued, err, expectCode, message, r, $s};return $f; - }; - Reader.prototype.ReadCodeLine = function(expectCode) { return this.$val.ReadCodeLine(expectCode); }; - Reader.ptr.prototype.ReadResponse = function(expectCode) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, code, code2, continued, err, err$1, expectCode, line, message, moreMessage, multi, r, $s, $r, $c} = $restore(this, {expectCode}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - code = 0; - message = ""; - err = $ifaceNil; - r = this; - _r = r.readCodeLine(expectCode); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - code = _tuple[0]; - continued = _tuple[1]; - message = _tuple[2]; - err = _tuple[3]; - multi = continued; - /* while (true) { */ case 2: - /* if (!(continued)) { break; } */ if(!(continued)) { $s = 3; continue; } - _r$1 = r.ReadLine(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - line = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = 0; - _tmp$1 = ""; - _tmp$2 = err$1; - code = _tmp; - message = _tmp$1; - err = _tmp$2; - $s = -1; return [code, message, err]; - } - code2 = 0; - moreMessage = ""; - _tuple$2 = parseCodeLine(line, 0); - code2 = _tuple$2[0]; - continued = _tuple$2[1]; - moreMessage = _tuple$2[2]; - err$1 = _tuple$2[3]; - if (!($interfaceIsEqual(err$1, $ifaceNil)) || !((code2 === code))) { - message = message + ("\n" + strings.TrimRight(line, "\r\n")); - continued = true; - /* continue; */ $s = 2; continue; - } - message = message + ("\n" + moreMessage); - $s = 2; continue; - case 3: - if (!($interfaceIsEqual(err, $ifaceNil)) && multi && !(message === "")) { - err = new Error.ptr(code, message); - } - $s = -1; return [code, message, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadResponse, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, _tuple$2, code, code2, continued, err, err$1, expectCode, line, message, moreMessage, multi, r, $s};return $f; - }; - Reader.prototype.ReadResponse = function(expectCode) { return this.$val.ReadResponse(expectCode); }; - Reader.ptr.prototype.DotReader = function() { - var {r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - $r = r.closeDot(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r.dot = new dotReader.ptr(r, 0); - $s = -1; return r.dot; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.DotReader, $c: true, $r, r, $s};return $f; - }; - Reader.prototype.DotReader = function() { return this.$val.DotReader(); }; - dotReader.ptr.prototype.Read = function(b) { - var {_1, _r, _tuple, b, br, c, d, err, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - d = this; - br = d.r.R; - /* while (true) { */ case 1: - /* if (!(n < b.$length && !((d.state === 5)))) { break; } */ if(!(n < b.$length && !((d.state === 5)))) { $s = 2; continue; } - c = 0; - _r = br.ReadByte(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - err = io.ErrUnexpectedEOF; - } - /* break; */ $s = 2; continue; - } - switch (0) { default: - _1 = d.state; - if (_1 === (0)) { - if (c === 46) { - d.state = 1; - /* continue; */ $s = 1; continue; - } - if (c === 13) { - d.state = 3; - /* continue; */ $s = 1; continue; - } - d.state = 4; - } else if (_1 === (1)) { - if (c === 13) { - d.state = 2; - /* continue; */ $s = 1; continue; - } - if (c === 10) { - d.state = 5; - /* continue; */ $s = 1; continue; - } - d.state = 4; - } else if (_1 === (2)) { - if (c === 10) { - d.state = 5; - /* continue; */ $s = 1; continue; - } - br.UnreadByte(); - c = 13; - d.state = 4; - } else if (_1 === (3)) { - if (c === 10) { - d.state = 0; - break; - } - br.UnreadByte(); - c = 13; - d.state = 4; - } else if (_1 === (4)) { - if (c === 13) { - d.state = 3; - /* continue; */ $s = 1; continue; - } - if (c === 10) { - d.state = 0; - } - } - } - ((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n] = c); - n = n + (1) >> 0; - $s = 1; continue; - case 2: - if ($interfaceIsEqual(err, $ifaceNil) && (d.state === 5)) { - err = io.EOF; - } - if (!($interfaceIsEqual(err, $ifaceNil)) && d.r.dot === d) { - d.r.dot = ptrType$4.nil; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: dotReader.ptr.prototype.Read, $c: true, $r, _1, _r, _tuple, b, br, c, d, err, n, $s};return $f; - }; - dotReader.prototype.Read = function(b) { return this.$val.Read(b); }; - Reader.ptr.prototype.closeDot = function() { - var {_r, buf, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (r.dot === ptrType$4.nil) { - $s = -1; return; - } - buf = $makeSlice(sliceType, 128); - /* while (true) { */ case 1: - /* if (!(!(r.dot === ptrType$4.nil))) { break; } */ if(!(!(r.dot === ptrType$4.nil))) { $s = 2; continue; } - _r = r.dot.Read(buf); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.closeDot, $c: true, $r, _r, buf, r, $s};return $f; - }; - Reader.prototype.closeDot = function() { return this.$val.closeDot(); }; - Reader.ptr.prototype.ReadDotBytes = function() { - var {$24r, _r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.DotReader(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = io.ReadAll(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadDotBytes, $c: true, $r, $24r, _r, _r$1, r, $s};return $f; - }; - Reader.prototype.ReadDotBytes = function() { return this.$val.ReadDotBytes(); }; - Reader.ptr.prototype.ReadDotLines = function() { - var {_r, _tuple, err, line, r, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - v = sliceType$2.nil; - err = $ifaceNil; - /* while (true) { */ case 1: - line = ""; - _r = r.ReadLine(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - err = io.ErrUnexpectedEOF; - } - /* break; */ $s = 2; continue; - } - if (line.length > 0 && (line.charCodeAt(0) === 46)) { - if (line.length === 1) { - /* break; */ $s = 2; continue; - } - line = $substring(line, 1); - } - v = $append(v, line); - $s = 1; continue; - case 2: - $s = -1; return [v, err]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadDotLines, $c: true, $r, _r, _tuple, err, line, r, v, $s};return $f; - }; - Reader.prototype.ReadDotLines = function() { return this.$val.ReadDotLines(); }; - Reader.ptr.prototype.ReadMIMEHeader = function() { - var {_entry, _key, _key$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, err, err$1, err$2, hint, k, key, kv, line, m, ok, r, strs, v, value, vv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - strs = sliceType$2.nil; - _r = r.upcomingHeaderNewlines(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - hint = _r; - if (hint > 0) { - strs = $makeSlice(sliceType$2, hint); - } - m = ((hint < 0 || hint > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {}); - _r$1 = r.R.Peek(1); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - buf = _tuple[0]; - err = _tuple[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil) && (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 32) || ((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 9))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($interfaceIsEqual(err, $ifaceNil) && (((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 32) || ((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) === 9))) { */ case 3: - _r$2 = r.readLineSlice(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - line = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [m, err$1]; - } - $s = -1; return [m, new ProtocolError(("malformed MIME header initial line: " + ($bytesToString(line))))]; - /* } */ case 4: - /* while (true) { */ case 6: - _r$3 = r.readContinuedLineSlice(mustHaveFieldNameColon); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - kv = _tuple$2[0]; - err$2 = _tuple$2[1]; - if (kv.$length === 0) { - $s = -1; return [m, err$2]; - } - _tuple$3 = bytes.Cut(kv, colon); - k = _tuple$3[0]; - v = _tuple$3[1]; - ok = _tuple$3[2]; - if (!ok) { - $s = -1; return [m, new ProtocolError(("malformed MIME header line: " + ($bytesToString(kv))))]; - } - key = canonicalMIMEHeaderKey(k); - if (key === "") { - /* continue; */ $s = 6; continue; - } - value = strings.TrimLeft(($bytesToString(v)), " \t"); - vv = (_entry = m[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (vv === sliceType$2.nil && strs.$length > 0) { - _tmp = $subslice(strs, 0, 1, 1); - _tmp$1 = $subslice(strs, 1); - vv = _tmp; - strs = _tmp$1; - (0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0] = value); - _key = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - } else { - _key$1 = key; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append(vv, value) }; - } - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [m, err$2]; - } - $s = 6; continue; - case 7: - $s = -1; return [false, $ifaceNil]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadMIMEHeader, $c: true, $r, _entry, _key, _key$1, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, err, err$1, err$2, hint, k, key, kv, line, m, ok, r, strs, v, value, vv, $s};return $f; - }; - Reader.prototype.ReadMIMEHeader = function() { return this.$val.ReadMIMEHeader(); }; - noValidation = function(param) { - var param; - return $ifaceNil; - }; - mustHaveFieldNameColon = function(line) { - var {$24r, _r, line, $s, $r, $c} = $restore(this, {line}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (bytes.IndexByte(line, 58) < 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (bytes.IndexByte(line, 58) < 0) { */ case 1: - _r = fmt.Sprintf("malformed MIME header: missing colon: %q", new sliceType$1([line])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = new ProtocolError((_r)); - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: mustHaveFieldNameColon, $c: true, $r, $24r, _r, line, $s};return $f; - }; - Reader.ptr.prototype.upcomingHeaderNewlines = function() { - var {_r, _r$1, _tuple, n, peek, r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - r = this; - _r = r.R.Peek(1); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - s = r.R.Buffered(); - if (s === 0) { - $s = -1; return n; - } - _r$1 = r.R.Peek(s); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - peek = _tuple[0]; - n = bytes.Count(peek, nl); - $s = -1; return n; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.upcomingHeaderNewlines, $c: true, $r, _r, _r$1, _tuple, n, peek, r, s, $s};return $f; - }; - Reader.prototype.upcomingHeaderNewlines = function() { return this.$val.upcomingHeaderNewlines(); }; - CanonicalMIMEHeaderKey = function(s) { - var {c, i, s, upper, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = commonHeaderOnce.Do(initCommonHeader); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - upper = true; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (!validHeaderFieldByte(c)) { - $s = -1; return s; - } - if (upper && 97 <= c && c <= 122) { - $s = -1; return canonicalMIMEHeaderKey((new sliceType($stringToBytes(s)))); - } - if (!upper && 65 <= c && c <= 90) { - $s = -1; return canonicalMIMEHeaderKey((new sliceType($stringToBytes(s)))); - } - upper = c === 45; - i = i + (1) >> 0; - } - $s = -1; return s; - /* */ } return; } var $f = {$blk: CanonicalMIMEHeaderKey, $c: true, $r, c, i, s, upper, $s};return $f; - }; - $pkg.CanonicalMIMEHeaderKey = CanonicalMIMEHeaderKey; - validHeaderFieldByte = function(b) { - var b; - return ((b >> 0)) < 127 && ((b < 0 || b >= isTokenTable.length) ? ($throwRuntimeError("index out of range"), undefined) : isTokenTable[b]); - }; - canonicalMIMEHeaderKey = function(a) { - var _entry, _i, _i$1, _ref, _ref$1, a, c, c$1, i, upper, v; - _ref = a; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (validHeaderFieldByte(c)) { - _i++; - continue; - } - return ($bytesToString(a)); - } - upper = true; - _ref$1 = a; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (upper && 97 <= c$1 && c$1 <= 122) { - c$1 = c$1 - (32) << 24 >>> 24; - } else if (!upper && 65 <= c$1 && c$1 <= 90) { - c$1 = c$1 + (32) << 24 >>> 24; - } - ((i < 0 || i >= a.$length) ? ($throwRuntimeError("index out of range"), undefined) : a.$array[a.$offset + i] = c$1); - upper = c$1 === 45; - _i$1++; - } - v = (_entry = commonHeader[$String.keyFor(($bytesToString(a)))], _entry !== undefined ? _entry.v : ""); - if (!(v === "")) { - return v; - } - return ($bytesToString(a)); - }; - initCommonHeader = function() { - var _i, _key, _ref, v; - commonHeader = {}; - _ref = new sliceType$2(["Accept", "Accept-Charset", "Accept-Encoding", "Accept-Language", "Accept-Ranges", "Cache-Control", "Cc", "Connection", "Content-Id", "Content-Language", "Content-Length", "Content-Transfer-Encoding", "Content-Type", "Cookie", "Date", "Dkim-Signature", "Etag", "Expires", "From", "Host", "If-Modified-Since", "If-None-Match", "In-Reply-To", "Last-Modified", "Location", "Message-Id", "Mime-Version", "Pragma", "Received", "Return-Path", "Server", "Set-Cookie", "Subject", "To", "User-Agent", "Via", "X-Forwarded-For", "X-Imforwards", "X-Powered-By"]); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _key = v; (commonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - _i++; - } - }; - MIMEHeader.prototype.Add = function(key, value) { - var {_entry, _key, _r, h, key, value, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r = CanonicalMIMEHeaderKey(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - key = _r; - _key = key; (h || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = h[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), value) }; - $s = -1; return; - /* */ } return; } var $f = {$blk: MIMEHeader.prototype.Add, $c: true, $r, _entry, _key, _r, h, key, value, $s};return $f; - }; - $ptrType(MIMEHeader).prototype.Add = function(key, value) { return new MIMEHeader(this.$get()).Add(key, value); }; - MIMEHeader.prototype.Set = function(key, value) { - var {_key, _r, h, key, value, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r = CanonicalMIMEHeaderKey(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _key = _r; (h || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new sliceType$2([value]) }; - $s = -1; return; - /* */ } return; } var $f = {$blk: MIMEHeader.prototype.Set, $c: true, $r, _key, _r, h, key, value, $s};return $f; - }; - $ptrType(MIMEHeader).prototype.Set = function(key, value) { return new MIMEHeader(this.$get()).Set(key, value); }; - MIMEHeader.prototype.Get = function(key) { - var {_entry, _r, h, key, v, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - if (h === false) { - $s = -1; return ""; - } - _r = CanonicalMIMEHeaderKey(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = (_entry = h[$String.keyFor(_r)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (v.$length === 0) { - $s = -1; return ""; - } - $s = -1; return (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); - /* */ } return; } var $f = {$blk: MIMEHeader.prototype.Get, $c: true, $r, _entry, _r, h, key, v, $s};return $f; - }; - $ptrType(MIMEHeader).prototype.Get = function(key) { return new MIMEHeader(this.$get()).Get(key); }; - MIMEHeader.prototype.Values = function(key) { - var {$24r, _entry, _r, h, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - if (h === false) { - $s = -1; return sliceType$2.nil; - } - _r = CanonicalMIMEHeaderKey(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = (_entry = h[$String.keyFor(_r)], _entry !== undefined ? _entry.v : sliceType$2.nil); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MIMEHeader.prototype.Values, $c: true, $r, $24r, _entry, _r, h, key, $s};return $f; - }; - $ptrType(MIMEHeader).prototype.Values = function(key) { return new MIMEHeader(this.$get()).Values(key); }; - MIMEHeader.prototype.Del = function(key) { - var {_r, h, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r = CanonicalMIMEHeaderKey(key); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - delete h[$String.keyFor(_r)]; - $s = -1; return; - /* */ } return; } var $f = {$blk: MIMEHeader.prototype.Del, $c: true, $r, _r, h, key, $s};return $f; - }; - $ptrType(MIMEHeader).prototype.Del = function(key) { return new MIMEHeader(this.$get()).Del(key); }; - ptrType$7.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ProtocolError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$6.methods = [{prop: "ReadLine", name: "ReadLine", pkg: "", typ: $funcType([], [$String, $error], false)}, {prop: "ReadLineBytes", name: "ReadLineBytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "readLineSlice", name: "readLineSlice", pkg: "net/textproto", typ: $funcType([], [sliceType, $error], false)}, {prop: "ReadContinuedLine", name: "ReadContinuedLine", pkg: "", typ: $funcType([], [$String, $error], false)}, {prop: "ReadContinuedLineBytes", name: "ReadContinuedLineBytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "readContinuedLineSlice", name: "readContinuedLineSlice", pkg: "net/textproto", typ: $funcType([funcType], [sliceType, $error], false)}, {prop: "skipSpace", name: "skipSpace", pkg: "net/textproto", typ: $funcType([], [$Int], false)}, {prop: "readCodeLine", name: "readCodeLine", pkg: "net/textproto", typ: $funcType([$Int], [$Int, $Bool, $String, $error], false)}, {prop: "ReadCodeLine", name: "ReadCodeLine", pkg: "", typ: $funcType([$Int], [$Int, $String, $error], false)}, {prop: "ReadResponse", name: "ReadResponse", pkg: "", typ: $funcType([$Int], [$Int, $String, $error], false)}, {prop: "DotReader", name: "DotReader", pkg: "", typ: $funcType([], [io.Reader], false)}, {prop: "closeDot", name: "closeDot", pkg: "net/textproto", typ: $funcType([], [], false)}, {prop: "ReadDotBytes", name: "ReadDotBytes", pkg: "", typ: $funcType([], [sliceType, $error], false)}, {prop: "ReadDotLines", name: "ReadDotLines", pkg: "", typ: $funcType([], [sliceType$2, $error], false)}, {prop: "ReadMIMEHeader", name: "ReadMIMEHeader", pkg: "", typ: $funcType([], [MIMEHeader, $error], false)}, {prop: "upcomingHeaderNewlines", name: "upcomingHeaderNewlines", pkg: "net/textproto", typ: $funcType([], [$Int], false)}]; - ptrType$4.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; - MIMEHeader.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([$String], [sliceType$2], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}]; - Error.init("", [{prop: "Code", name: "Code", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Msg", name: "Msg", embedded: false, exported: true, typ: $String, tag: ""}]); - Reader.init("net/textproto", [{prop: "R", name: "R", embedded: false, exported: true, typ: ptrType$3, tag: ""}, {prop: "dot", name: "dot", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType, tag: ""}]); - dotReader.init("net/textproto", [{prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$6, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: $Int, tag: ""}]); - MIMEHeader.init($String, sliceType$2); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = net.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - commonHeader = false; - commonHeaderOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - colon = (new sliceType($stringToBytes(":"))); - nl = (new sliceType($stringToBytes("\n"))); - isTokenTable = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, true, true, true, true, false, false, true, true, false, true, true, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["mime/multipart"] = (function() { - var $pkg = {}, $init, bufio, bytes, rand, errors, fmt, io, math, mime, quotedprintable, textproto, os, filepath, sort, strings, Part, stickyErrorReader, partReader, Reader, Form, FileHeader, File, sectionReadCloser, sliceType, sliceType$1, sliceType$2, ptrType$2, ptrType$3, ptrType$4, ptrType$5, sliceType$3, ptrType$6, sliceType$4, mapType, ptrType$7, mapType$1, mapType$2, ptrType$8, quoteEscaper, emptyParams, NewReader, newPart, scanUntilBoundary, matchAfterPrefix, skipLWSPChar; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - rand = $packages["crypto/rand"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - math = $packages["math"]; - mime = $packages["mime"]; - quotedprintable = $packages["mime/quotedprintable"]; - textproto = $packages["net/textproto"]; - os = $packages["os"]; - filepath = $packages["path/filepath"]; - sort = $packages["sort"]; - strings = $packages["strings"]; - Part = $pkg.Part = $newType(0, $kindStruct, "multipart.Part", true, "mime/multipart", true, function(Header_, mr_, disposition_, dispositionParams_, r_, n_, total_, err_, readErr_) { - this.$val = this; - if (arguments.length === 0) { - this.Header = false; - this.mr = ptrType$4.nil; - this.disposition = ""; - this.dispositionParams = false; - this.r = $ifaceNil; - this.n = 0; - this.total = new $Int64(0, 0); - this.err = $ifaceNil; - this.readErr = $ifaceNil; - return; - } - this.Header = Header_; - this.mr = mr_; - this.disposition = disposition_; - this.dispositionParams = dispositionParams_; - this.r = r_; - this.n = n_; - this.total = total_; - this.err = err_; - this.readErr = readErr_; - }); - stickyErrorReader = $pkg.stickyErrorReader = $newType(0, $kindStruct, "multipart.stickyErrorReader", true, "mime/multipart", false, function(r_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.r = $ifaceNil; - this.err = $ifaceNil; - return; - } - this.r = r_; - this.err = err_; - }); - partReader = $pkg.partReader = $newType(0, $kindStruct, "multipart.partReader", true, "mime/multipart", false, function(p_) { - this.$val = this; - if (arguments.length === 0) { - this.p = ptrType$3.nil; - return; - } - this.p = p_; - }); - Reader = $pkg.Reader = $newType(0, $kindStruct, "multipart.Reader", true, "mime/multipart", true, function(bufReader_, currentPart_, partsRead_, nl_, nlDashBoundary_, dashBoundaryDash_, dashBoundary_) { - this.$val = this; - if (arguments.length === 0) { - this.bufReader = ptrType$2.nil; - this.currentPart = ptrType$3.nil; - this.partsRead = 0; - this.nl = sliceType$1.nil; - this.nlDashBoundary = sliceType$1.nil; - this.dashBoundaryDash = sliceType$1.nil; - this.dashBoundary = sliceType$1.nil; - return; - } - this.bufReader = bufReader_; - this.currentPart = currentPart_; - this.partsRead = partsRead_; - this.nl = nl_; - this.nlDashBoundary = nlDashBoundary_; - this.dashBoundaryDash = dashBoundaryDash_; - this.dashBoundary = dashBoundary_; - }); - Form = $pkg.Form = $newType(0, $kindStruct, "multipart.Form", true, "mime/multipart", true, function(Value_, File_) { - this.$val = this; - if (arguments.length === 0) { - this.Value = false; - this.File = false; - return; - } - this.Value = Value_; - this.File = File_; - }); - FileHeader = $pkg.FileHeader = $newType(0, $kindStruct, "multipart.FileHeader", true, "mime/multipart", true, function(Filename_, Header_, Size_, content_, tmpfile_) { - this.$val = this; - if (arguments.length === 0) { - this.Filename = ""; - this.Header = false; - this.Size = new $Int64(0, 0); - this.content = sliceType$1.nil; - this.tmpfile = ""; - return; - } - this.Filename = Filename_; - this.Header = Header_; - this.Size = Size_; - this.content = content_; - this.tmpfile = tmpfile_; - }); - File = $pkg.File = $newType(8, $kindInterface, "multipart.File", true, "mime/multipart", true, null); - sectionReadCloser = $pkg.sectionReadCloser = $newType(0, $kindStruct, "multipart.sectionReadCloser", true, "mime/multipart", false, function(SectionReader_) { - this.$val = this; - if (arguments.length === 0) { - this.SectionReader = ptrType$8.nil; - return; - } - this.SectionReader = SectionReader_; - }); - sliceType = $sliceType($String); - sliceType$1 = $sliceType($Uint8); - sliceType$2 = $sliceType($emptyInterface); - ptrType$2 = $ptrType(bufio.Reader); - ptrType$3 = $ptrType(Part); - ptrType$4 = $ptrType(Reader); - ptrType$5 = $ptrType(Form); - sliceType$3 = $sliceType(io.Reader); - ptrType$6 = $ptrType(FileHeader); - sliceType$4 = $sliceType(ptrType$6); - mapType = $mapType($String, $String); - ptrType$7 = $ptrType(stickyErrorReader); - mapType$1 = $mapType($String, sliceType); - mapType$2 = $mapType($String, sliceType$4); - ptrType$8 = $ptrType(io.SectionReader); - Part.ptr.prototype.FormName = function() { - var {_entry, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (p.dispositionParams === false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.dispositionParams === false) { */ case 1: - $r = p.parseContentDisposition(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (!(p.disposition === "form-data")) { - $s = -1; return ""; - } - $s = -1; return (_entry = p.dispositionParams[$String.keyFor("name")], _entry !== undefined ? _entry.v : ""); - /* */ } return; } var $f = {$blk: Part.ptr.prototype.FormName, $c: true, $r, _entry, p, $s};return $f; - }; - Part.prototype.FormName = function() { return this.$val.FormName(); }; - Part.ptr.prototype.FileName = function() { - var {_entry, filename, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (p.dispositionParams === false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.dispositionParams === false) { */ case 1: - $r = p.parseContentDisposition(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - filename = (_entry = p.dispositionParams[$String.keyFor("filename")], _entry !== undefined ? _entry.v : ""); - if (filename === "") { - $s = -1; return ""; - } - $s = -1; return filepath.Base(filename); - /* */ } return; } var $f = {$blk: Part.ptr.prototype.FileName, $c: true, $r, _entry, filename, p, $s};return $f; - }; - Part.prototype.FileName = function() { return this.$val.FileName(); }; - Part.ptr.prototype.parseContentDisposition = function() { - var {_r, _r$1, _tuple, err, p, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = new textproto.MIMEHeader(p.Header).Get("Content-Disposition"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - v = _r; - err = $ifaceNil; - _r$1 = mime.ParseMediaType(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - p.disposition = _tuple[0]; - p.dispositionParams = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - p.dispositionParams = emptyParams; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: Part.ptr.prototype.parseContentDisposition, $c: true, $r, _r, _r$1, _tuple, err, p, v, $s};return $f; - }; - Part.prototype.parseContentDisposition = function() { return this.$val.parseContentDisposition(); }; - NewReader = function(r, boundary) { - var b, boundary, r; - b = (new sliceType$1($stringToBytes("\r\n--" + boundary + "--"))); - return new Reader.ptr(bufio.NewReaderSize(new stickyErrorReader.ptr(r, $ifaceNil), 4096), ptrType$3.nil, 0, $subslice(b, 0, 2), $subslice(b, 0, (b.$length - 2 >> 0)), $subslice(b, 2), $subslice(b, 2, (b.$length - 2 >> 0))); - }; - $pkg.NewReader = NewReader; - stickyErrorReader.ptr.prototype.Read = function(p) { - var {_, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, n, p, r, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - _ = $ifaceNil; - r = this; - if (!($interfaceIsEqual(r.err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = r.err; - n = _tmp; - _ = _tmp$1; - $s = -1; return [n, _]; - } - _r = r.r.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - r.err = _tuple[1]; - _tmp$2 = n; - _tmp$3 = r.err; - n = _tmp$2; - _ = _tmp$3; - $s = -1; return [n, _]; - /* */ } return; } var $f = {$blk: stickyErrorReader.ptr.prototype.Read, $c: true, $r, _, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, n, p, r, $s};return $f; - }; - stickyErrorReader.prototype.Read = function(p) { return this.$val.Read(p); }; - newPart = function(mr, rawPart) { - var {_r, _r$1, _r$2, bp, err, mr, rawPart, x, $s, $r, $c} = $restore(this, {mr, rawPart}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bp = new Part.ptr({}, mr, "", false, $ifaceNil, 0, new $Int64(0, 0), $ifaceNil, $ifaceNil); - _r = bp.populateHeaders(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$3.nil, err]; - } - bp.r = (x = new partReader.ptr(bp), new x.constructor.elem(x)); - /* */ if (!rawPart) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!rawPart) { */ case 2: - _r$1 = new textproto.MIMEHeader(bp.Header).Get("Content-Transfer-Encoding"); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = strings.EqualFold(_r$1, "quoted-printable"); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$2) { */ case 4: - $r = new textproto.MIMEHeader(bp.Header).Del("Content-Transfer-Encoding"); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bp.r = quotedprintable.NewReader(bp.r); - /* } */ case 5: - /* } */ case 3: - $s = -1; return [bp, $ifaceNil]; - /* */ } return; } var $f = {$blk: newPart, $c: true, $r, _r, _r$1, _r$2, bp, err, mr, rawPart, x, $s};return $f; - }; - Part.ptr.prototype.populateHeaders = function() { - var {_r, _r$1, _tuple, bp, err, header, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bp = this; - _r = textproto.NewReader(bp.mr.bufReader); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - r = _r; - _r$1 = r.ReadMIMEHeader(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - header = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - bp.Header = header; - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: Part.ptr.prototype.populateHeaders, $c: true, $r, _r, _r$1, _tuple, bp, err, header, r, $s};return $f; - }; - Part.prototype.populateHeaders = function() { return this.$val.populateHeaders(); }; - Part.ptr.prototype.Read = function(d) { - var {$24r, _r, _tuple, d, err, n, p, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - p = this; - _r = p.r.Read(d); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Part.ptr.prototype.Read, $c: true, $r, $24r, _r, _tuple, d, err, n, p, $s};return $f; - }; - Part.prototype.Read = function(d) { return this.$val.Read(d); }; - partReader.ptr.prototype.Read = function(d) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, br, d, n, p, peek, pr, x, x$1, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pr = this; - p = pr.p; - br = p.mr.bufReader; - /* while (true) { */ case 1: - /* if (!((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil))) { break; } */ if(!((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil))) { $s = 2; continue; } - _r = br.Peek(br.Buffered()); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - peek = _tuple[0]; - _tuple$1 = scanUntilBoundary(peek, p.mr.dashBoundary, p.mr.nlDashBoundary, p.total, p.readErr); - p.n = _tuple$1[0]; - p.err = _tuple$1[1]; - /* */ if ((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ((p.n === 0) && $interfaceIsEqual(p.err, $ifaceNil)) { */ case 4: - _r$1 = br.Peek(peek.$length + 1 >> 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - p.readErr = _tuple$2[1]; - if ($interfaceIsEqual(p.readErr, io.EOF)) { - p.readErr = io.ErrUnexpectedEOF; - } - /* } */ case 5: - $s = 1; continue; - case 2: - if (p.n === 0) { - $s = -1; return [0, p.err]; - } - n = d.$length; - if (n > p.n) { - n = p.n; - } - _r$2 = br.Read($subslice(d, 0, n)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$3 = _r$2; - n = _tuple$3[0]; - p.total = (x = p.total, x$1 = (new $Int64(0, n)), new $Int64(x.$high + x$1.$high, x.$low + x$1.$low)); - p.n = p.n - (n) >> 0; - if (p.n === 0) { - $s = -1; return [n, p.err]; - } - $s = -1; return [n, $ifaceNil]; - /* */ } return; } var $f = {$blk: partReader.ptr.prototype.Read, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, br, d, n, p, peek, pr, x, x$1, $s};return $f; - }; - partReader.prototype.Read = function(d) { return this.$val.Read(d); }; - scanUntilBoundary = function(buf, dashBoundary, nlDashBoundary, total, readErr) { - var _1, _2, buf, dashBoundary, i, i$1, nlDashBoundary, readErr, total; - if ((total.$high === 0 && total.$low === 0)) { - if (bytes.HasPrefix(buf, dashBoundary)) { - _1 = matchAfterPrefix(buf, dashBoundary, readErr); - if (_1 === (-1)) { - return [dashBoundary.$length, $ifaceNil]; - } else if (_1 === (0)) { - return [0, $ifaceNil]; - } else if (_1 === (1)) { - return [0, io.EOF]; - } - } - if (bytes.HasPrefix(dashBoundary, buf)) { - return [0, readErr]; - } - } - i = bytes.Index(buf, nlDashBoundary); - if (i >= 0) { - _2 = matchAfterPrefix($subslice(buf, i), nlDashBoundary, readErr); - if (_2 === (-1)) { - return [i + nlDashBoundary.$length >> 0, $ifaceNil]; - } else if (_2 === (0)) { - return [i, $ifaceNil]; - } else if (_2 === (1)) { - return [i, io.EOF]; - } - } - if (bytes.HasPrefix(nlDashBoundary, buf)) { - return [0, readErr]; - } - i$1 = bytes.LastIndexByte(buf, (0 >= nlDashBoundary.$length ? ($throwRuntimeError("index out of range"), undefined) : nlDashBoundary.$array[nlDashBoundary.$offset + 0])); - if (i$1 >= 0 && bytes.HasPrefix(nlDashBoundary, $subslice(buf, i$1))) { - return [i$1, $ifaceNil]; - } - return [buf.$length, readErr]; - }; - matchAfterPrefix = function(buf, prefix, readErr) { - var buf, c, prefix, readErr, x; - if (buf.$length === prefix.$length) { - if (!($interfaceIsEqual(readErr, $ifaceNil))) { - return 1; - } - return 0; - } - c = (x = prefix.$length, ((x < 0 || x >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + x])); - if ((c === 32) || (c === 9) || (c === 13) || (c === 10) || (c === 45)) { - return 1; - } - return -1; - }; - Part.ptr.prototype.Close = function() { - var {_r, p, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = io.Copy(io.Discard, p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Part.ptr.prototype.Close, $c: true, $r, _r, p, $s};return $f; - }; - Part.prototype.Close = function() { return this.$val.Close(); }; - Reader.ptr.prototype.NextPart = function() { - var {$24r, _r, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.nextPart(false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.NextPart, $c: true, $r, $24r, _r, r, $s};return $f; - }; - Reader.prototype.NextPart = function() { return this.$val.NextPart(); }; - Reader.ptr.prototype.NextRawPart = function() { - var {$24r, _r, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.nextPart(true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.NextRawPart, $c: true, $r, $24r, _r, r, $s};return $f; - }; - Reader.prototype.NextRawPart = function() { return this.$val.NextRawPart(); }; - Reader.ptr.prototype.nextPart = function(rawPart) { - var {$24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, bp, err, err$1, expectNewPart, line, r, rawPart, $s, $r, $c} = $restore(this, {rawPart}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* */ if (!(r.currentPart === ptrType$3.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(r.currentPart === ptrType$3.nil)) { */ case 1: - _r = r.currentPart.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 2: - /* */ if (($bytesToString(r.dashBoundary)) === "--") { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (($bytesToString(r.dashBoundary)) === "--") { */ case 4: - _r$1 = fmt.Errorf("multipart: boundary is empty", new sliceType$2([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [ptrType$3.nil, _r$1]; - $s = 7; case 7: return $24r; - /* } */ case 5: - expectNewPart = false; - /* while (true) { */ case 8: - _r$2 = r.bufReader.ReadSlice(10); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - line = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, io.EOF) && r.isFinalBoundary(line)) { - $s = -1; return [ptrType$3.nil, io.EOF]; - } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: - _r$3 = fmt.Errorf("multipart: NextPart: %v", new sliceType$2([err])); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = [ptrType$3.nil, _r$3]; - $s = 14; case 14: return $24r$1; - /* } */ case 12: - /* */ if (r.isBoundaryDelimiterLine(line)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (r.isBoundaryDelimiterLine(line)) { */ case 15: - r.partsRead = r.partsRead + (1) >> 0; - _r$4 = newPart(r, rawPart); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - bp = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$3.nil, err$1]; - } - r.currentPart = bp; - $s = -1; return [bp, $ifaceNil]; - /* } */ case 16: - if (r.isFinalBoundary(line)) { - $s = -1; return [ptrType$3.nil, io.EOF]; - } - /* */ if (expectNewPart) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (expectNewPart) { */ case 18: - _r$5 = fmt.Errorf("multipart: expecting a new Part; got line %q", new sliceType$2([new $String(($bytesToString(line)))])); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = [ptrType$3.nil, _r$5]; - $s = 21; case 21: return $24r$2; - /* } */ case 19: - if (r.partsRead === 0) { - /* continue; */ $s = 8; continue; - } - if (bytes.Equal(line, r.nl)) { - expectNewPart = true; - /* continue; */ $s = 8; continue; - } - _r$6 = fmt.Errorf("multipart: unexpected line in Next(): %q", new sliceType$2([line])); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = [ptrType$3.nil, _r$6]; - $s = 23; case 23: return $24r$3; - case 9: - $s = -1; return [ptrType$3.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.nextPart, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, bp, err, err$1, expectNewPart, line, r, rawPart, $s};return $f; - }; - Reader.prototype.nextPart = function(rawPart) { return this.$val.nextPart(rawPart); }; - Reader.ptr.prototype.isFinalBoundary = function(line) { - var line, mr, rest; - mr = this; - if (!bytes.HasPrefix(line, mr.dashBoundaryDash)) { - return false; - } - rest = $subslice(line, mr.dashBoundaryDash.$length); - rest = skipLWSPChar(rest); - return (rest.$length === 0) || bytes.Equal(rest, mr.nl); - }; - Reader.prototype.isFinalBoundary = function(line) { return this.$val.isFinalBoundary(line); }; - Reader.ptr.prototype.isBoundaryDelimiterLine = function(line) { - var line, mr, rest, ret; - ret = false; - mr = this; - if (!bytes.HasPrefix(line, mr.dashBoundary)) { - ret = false; - return ret; - } - rest = $subslice(line, mr.dashBoundary.$length); - rest = skipLWSPChar(rest); - if ((mr.partsRead === 0) && (rest.$length === 1) && ((0 >= rest.$length ? ($throwRuntimeError("index out of range"), undefined) : rest.$array[rest.$offset + 0]) === 10)) { - mr.nl = $subslice(mr.nl, 1); - mr.nlDashBoundary = $subslice(mr.nlDashBoundary, 1); - } - ret = bytes.Equal(rest, mr.nl); - return ret; - }; - Reader.prototype.isBoundaryDelimiterLine = function(line) { return this.$val.isBoundaryDelimiterLine(line); }; - skipLWSPChar = function(b) { - var b; - while (true) { - if (!(b.$length > 0 && (((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 32) || ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 9)))) { break; } - b = $subslice(b, 1); - } - return b; - }; - Reader.ptr.prototype.ReadForm = function(maxMemory) { - var {$24r, _r, maxMemory, r, $s, $r, $c} = $restore(this, {maxMemory}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r = r.readForm(maxMemory); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Reader.ptr.prototype.ReadForm, $c: true, $r, $24r, _r, maxMemory, r, $s};return $f; - }; - Reader.prototype.ReadForm = function(maxMemory) { return this.$val.ReadForm(maxMemory); }; - Reader.ptr.prototype.readForm = function(maxMemory) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _, _entry, _entry$1, _key, _key$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, cerr, err, err$1, err$2, err$3, fh, file, filename, form, maxMemory, maxValueBytes, n, n$1, name, p, r, size, x, x$1, x$2, $s, $deferred, $r, $c} = $restore(this, {maxMemory}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - form = [form]; - _ = ptrType$5.nil; - err[0] = $ifaceNil; - r = this; - form[0] = new Form.ptr({}, {}); - $deferred.push([(function(err, form) { return function $b() { - var {_r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 1: - _r = form[0].RemoveAll(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, $s};return $f; - }; })(err, form), []]); - maxValueBytes = new $Int64(maxMemory.$high + 0, maxMemory.$low + 10485760); - if ((maxValueBytes.$high < 0 || (maxValueBytes.$high === 0 && maxValueBytes.$low <= 0))) { - if ((maxMemory.$high < 0 || (maxMemory.$high === 0 && maxMemory.$low < 0))) { - maxValueBytes = new $Int64(0, 0); - } else { - maxValueBytes = new $Int64(2147483647, 4294967295); - } - } - /* while (true) { */ case 1: - b = [b]; - _r = r.NextPart(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - err$1 = _tuple[1]; - if ($interfaceIsEqual(err$1, io.EOF)) { - /* break; */ $s = 2; continue; - } - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 4: - _tmp = ptrType$5.nil; - _tmp$1 = err$1; - _ = _tmp; - err[0] = _tmp$1; - $24r = [_, err[0]]; - $s = 6; case 6: return $24r; - /* } */ case 5: - _r$1 = p.FormName(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - name = _r$1; - if (name === "") { - /* continue; */ $s = 1; continue; - } - _r$2 = p.FileName(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - filename = _r$2; - b[0] = new bytes.Buffer.ptr(sliceType$1.nil, 0, 0); - /* */ if (filename === "") { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (filename === "") { */ case 9: - _r$3 = io.CopyN(b[0], p, new $Int64(maxValueBytes.$high + 0, maxValueBytes.$low + 1)); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - n = _tuple$1[0]; - err$2 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil)) && !($interfaceIsEqual(err$2, io.EOF))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil)) && !($interfaceIsEqual(err$2, io.EOF))) { */ case 12: - _tmp$2 = ptrType$5.nil; - _tmp$3 = err$2; - _ = _tmp$2; - err[0] = _tmp$3; - $24r$1 = [_, err[0]]; - $s = 14; case 14: return $24r$1; - /* } */ case 13: - maxValueBytes = (x = n, new $Int64(maxValueBytes.$high - x.$high, maxValueBytes.$low - x.$low)); - /* */ if ((maxValueBytes.$high < 0 || (maxValueBytes.$high === 0 && maxValueBytes.$low < 0))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ((maxValueBytes.$high < 0 || (maxValueBytes.$high === 0 && maxValueBytes.$low < 0))) { */ case 15: - _tmp$4 = ptrType$5.nil; - _tmp$5 = $pkg.ErrMessageTooLarge; - _ = _tmp$4; - err[0] = _tmp$5; - $24r$2 = [_, err[0]]; - $s = 17; case 17: return $24r$2; - /* } */ case 16: - _key = name; (form[0].Value || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = form[0].Value[$String.keyFor(name)], _entry !== undefined ? _entry.v : sliceType.nil), b[0].String()) }; - /* continue; */ $s = 1; continue; - /* } */ case 10: - fh = new FileHeader.ptr(filename, p.Header, new $Int64(0, 0), sliceType$1.nil, ""); - _r$4 = io.CopyN(b[0], p, new $Int64(maxMemory.$high + 0, maxMemory.$low + 1)); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - n$1 = _tuple$2[0]; - err$1 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, io.EOF))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, io.EOF))) { */ case 19: - _tmp$6 = ptrType$5.nil; - _tmp$7 = err$1; - _ = _tmp$6; - err[0] = _tmp$7; - $24r$3 = [_, err[0]]; - $s = 21; case 21: return $24r$3; - /* } */ case 20: - /* */ if ((n$1.$high > maxMemory.$high || (n$1.$high === maxMemory.$high && n$1.$low > maxMemory.$low))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if ((n$1.$high > maxMemory.$high || (n$1.$high === maxMemory.$high && n$1.$low > maxMemory.$low))) { */ case 22: - _r$5 = os.CreateTemp("", "multipart-"); /* */ $s = 25; case 25: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - file = _tuple$3[0]; - err$3 = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 26: - _tmp$8 = ptrType$5.nil; - _tmp$9 = err$3; - _ = _tmp$8; - err[0] = _tmp$9; - $24r$4 = [_, err[0]]; - $s = 28; case 28: return $24r$4; - /* } */ case 27: - _r$6 = io.Copy(file, io.MultiReader(new sliceType$3([b[0], p]))); /* */ $s = 29; case 29: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$4 = _r$6; - size = _tuple$4[0]; - err$3 = _tuple$4[1]; - _r$7 = file.Close(); /* */ $s = 30; case 30: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - cerr = _r$7; - if ($interfaceIsEqual(err$3, $ifaceNil)) { - err$3 = cerr; - } - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 31: - _r$8 = os.Remove(file.Name()); /* */ $s = 33; case 33: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _tmp$10 = ptrType$5.nil; - _tmp$11 = err$3; - _ = _tmp$10; - err[0] = _tmp$11; - $24r$5 = [_, err[0]]; - $s = 34; case 34: return $24r$5; - /* } */ case 32: - fh.tmpfile = file.Name(); - fh.Size = size; - $s = 24; continue; - /* } else { */ case 23: - fh.content = b[0].Bytes(); - fh.Size = (new $Int64(0, fh.content.$length)); - maxMemory = (x$1 = n$1, new $Int64(maxMemory.$high - x$1.$high, maxMemory.$low - x$1.$low)); - maxValueBytes = (x$2 = n$1, new $Int64(maxValueBytes.$high - x$2.$high, maxValueBytes.$low - x$2.$low)); - /* } */ case 24: - _key$1 = name; (form[0].File || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$1 = form[0].File[$String.keyFor(name)], _entry$1 !== undefined ? _entry$1.v : sliceType$4.nil), fh) }; - $s = 1; continue; - case 2: - _tmp$12 = form[0]; - _tmp$13 = $ifaceNil; - _ = _tmp$12; - err[0] = _tmp$13; - $24r$6 = [_, err[0]]; - $s = 35; case 35: return $24r$6; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [_, err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: Reader.ptr.prototype.readForm, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _, _entry, _entry$1, _key, _key$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, cerr, err, err$1, err$2, err$3, fh, file, filename, form, maxMemory, maxValueBytes, n, n$1, name, p, r, size, x, x$1, x$2, $s, $deferred};return $f; } } - }; - Reader.prototype.readForm = function(maxMemory) { return this.$val.readForm(maxMemory); }; - Form.ptr.prototype.RemoveAll = function() { - var {_entry, _i, _i$1, _keys, _r, _ref, _ref$1, e, err, f, fh, fhs, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - err = $ifaceNil; - _ref = f.File; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - fhs = _entry.v; - _ref$1 = fhs; - _i$1 = 0; - /* while (true) { */ case 3: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 4; continue; } - fh = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - /* */ if (!(fh.tmpfile === "")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(fh.tmpfile === "")) { */ case 5: - _r = os.Remove(fh.tmpfile); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - e = _r; - if (!($interfaceIsEqual(e, $ifaceNil)) && $interfaceIsEqual(err, $ifaceNil)) { - err = e; - } - /* } */ case 6: - _i$1++; - $s = 3; continue; - case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return err; - /* */ } return; } var $f = {$blk: Form.ptr.prototype.RemoveAll, $c: true, $r, _entry, _i, _i$1, _keys, _r, _ref, _ref$1, e, err, f, fh, fhs, $s};return $f; - }; - Form.prototype.RemoveAll = function() { return this.$val.RemoveAll(); }; - FileHeader.ptr.prototype.Open = function() { - var {$24r, _r, _returncast, b, fh, r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fh = this; - b = fh.content; - if (!(b === sliceType$1.nil)) { - r = io.NewSectionReader(bytes.NewReader(b), new $Int64(0, 0), (new $Int64(0, b.$length))); - $s = -1; return [(x = new sectionReadCloser.ptr(r), new x.constructor.elem(x)), $ifaceNil]; - } - _r = os.Open(fh.tmpfile); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _returncast = _r; - $24r = [_returncast[0], _returncast[1]]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: FileHeader.ptr.prototype.Open, $c: true, $r, $24r, _r, _returncast, b, fh, r, x, $s};return $f; - }; - FileHeader.prototype.Open = function() { return this.$val.Open(); }; - sectionReadCloser.ptr.prototype.Close = function() { - var rc; - rc = this; - return $ifaceNil; - }; - sectionReadCloser.prototype.Close = function() { return this.$val.Close(); }; - ptrType$3.methods = [{prop: "FormName", name: "FormName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "FileName", name: "FileName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "parseContentDisposition", name: "parseContentDisposition", pkg: "mime/multipart", typ: $funcType([], [], false)}, {prop: "populateHeaders", name: "populateHeaders", pkg: "mime/multipart", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$7.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; - partReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}]; - ptrType$4.methods = [{prop: "NextPart", name: "NextPart", pkg: "", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "NextRawPart", name: "NextRawPart", pkg: "", typ: $funcType([], [ptrType$3, $error], false)}, {prop: "nextPart", name: "nextPart", pkg: "mime/multipart", typ: $funcType([$Bool], [ptrType$3, $error], false)}, {prop: "isFinalBoundary", name: "isFinalBoundary", pkg: "mime/multipart", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "isBoundaryDelimiterLine", name: "isBoundaryDelimiterLine", pkg: "mime/multipart", typ: $funcType([sliceType$1], [$Bool], false)}, {prop: "ReadForm", name: "ReadForm", pkg: "", typ: $funcType([$Int64], [ptrType$5, $error], false)}, {prop: "readForm", name: "readForm", pkg: "mime/multipart", typ: $funcType([$Int64], [ptrType$5, $error], false)}]; - ptrType$5.methods = [{prop: "RemoveAll", name: "RemoveAll", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$6.methods = [{prop: "Open", name: "Open", pkg: "", typ: $funcType([], [File, $error], false)}]; - sectionReadCloser.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - Part.init("mime/multipart", [{prop: "Header", name: "Header", embedded: false, exported: true, typ: textproto.MIMEHeader, tag: ""}, {prop: "mr", name: "mr", embedded: false, exported: false, typ: ptrType$4, tag: ""}, {prop: "disposition", name: "disposition", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "dispositionParams", name: "dispositionParams", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "total", name: "total", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "readErr", name: "readErr", embedded: false, exported: false, typ: $error, tag: ""}]); - stickyErrorReader.init("mime/multipart", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - partReader.init("mime/multipart", [{prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$3, tag: ""}]); - Reader.init("mime/multipart", [{prop: "bufReader", name: "bufReader", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "currentPart", name: "currentPart", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "partsRead", name: "partsRead", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "nl", name: "nl", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "nlDashBoundary", name: "nlDashBoundary", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "dashBoundaryDash", name: "dashBoundaryDash", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "dashBoundary", name: "dashBoundary", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - Form.init("", [{prop: "Value", name: "Value", embedded: false, exported: true, typ: mapType$1, tag: ""}, {prop: "File", name: "File", embedded: false, exported: true, typ: mapType$2, tag: ""}]); - FileHeader.init("mime/multipart", [{prop: "Filename", name: "Filename", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: textproto.MIMEHeader, tag: ""}, {prop: "Size", name: "Size", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "content", name: "content", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "tmpfile", name: "tmpfile", embedded: false, exported: false, typ: $String, tag: ""}]); - File.init([{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "ReadAt", name: "ReadAt", pkg: "", typ: $funcType([sliceType$1, $Int64], [$Int, $error], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}]); - sectionReadCloser.init("", [{prop: "SectionReader", name: "SectionReader", embedded: true, exported: true, typ: ptrType$8, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = mime.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = quotedprintable.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = textproto.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filepath.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - quoteEscaper = strings.NewReplacer(new sliceType(["\\", "\\\\", "\"", "\\\""])); - emptyParams = {}; - $pkg.ErrMessageTooLarge = errors.New("multipart: message too large"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/http/httptrace"] = (function() { - var $pkg = {}, $init, context, tls, nettrace, net, textproto, reflect, time, clientEventContextKey, ClientTrace, WroteRequestInfo, DNSStartInfo, DNSDoneInfo, GotConnInfo, ptrType, sliceType, funcType, funcType$1, funcType$2, funcType$3, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, sliceType$1, funcType$10, funcType$11, ContextClientTrace; - context = $packages["context"]; - tls = $packages["crypto/tls"]; - nettrace = $packages["internal/nettrace"]; - net = $packages["net"]; - textproto = $packages["net/textproto"]; - reflect = $packages["reflect"]; - time = $packages["time"]; - clientEventContextKey = $pkg.clientEventContextKey = $newType(0, $kindStruct, "httptrace.clientEventContextKey", true, "net/http/httptrace", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - ClientTrace = $pkg.ClientTrace = $newType(0, $kindStruct, "httptrace.ClientTrace", true, "net/http/httptrace", true, function(GetConn_, GotConn_, PutIdleConn_, GotFirstResponseByte_, Got100Continue_, Got1xxResponse_, DNSStart_, DNSDone_, ConnectStart_, ConnectDone_, TLSHandshakeStart_, TLSHandshakeDone_, WroteHeaderField_, WroteHeaders_, Wait100Continue_, WroteRequest_) { - this.$val = this; - if (arguments.length === 0) { - this.GetConn = $throwNilPointerError; - this.GotConn = $throwNilPointerError; - this.PutIdleConn = $throwNilPointerError; - this.GotFirstResponseByte = $throwNilPointerError; - this.Got100Continue = $throwNilPointerError; - this.Got1xxResponse = $throwNilPointerError; - this.DNSStart = $throwNilPointerError; - this.DNSDone = $throwNilPointerError; - this.ConnectStart = $throwNilPointerError; - this.ConnectDone = $throwNilPointerError; - this.TLSHandshakeStart = $throwNilPointerError; - this.TLSHandshakeDone = $throwNilPointerError; - this.WroteHeaderField = $throwNilPointerError; - this.WroteHeaders = $throwNilPointerError; - this.Wait100Continue = $throwNilPointerError; - this.WroteRequest = $throwNilPointerError; - return; - } - this.GetConn = GetConn_; - this.GotConn = GotConn_; - this.PutIdleConn = PutIdleConn_; - this.GotFirstResponseByte = GotFirstResponseByte_; - this.Got100Continue = Got100Continue_; - this.Got1xxResponse = Got1xxResponse_; - this.DNSStart = DNSStart_; - this.DNSDone = DNSDone_; - this.ConnectStart = ConnectStart_; - this.ConnectDone = ConnectDone_; - this.TLSHandshakeStart = TLSHandshakeStart_; - this.TLSHandshakeDone = TLSHandshakeDone_; - this.WroteHeaderField = WroteHeaderField_; - this.WroteHeaders = WroteHeaders_; - this.Wait100Continue = Wait100Continue_; - this.WroteRequest = WroteRequest_; - }); - WroteRequestInfo = $pkg.WroteRequestInfo = $newType(0, $kindStruct, "httptrace.WroteRequestInfo", true, "net/http/httptrace", true, function(Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Err = $ifaceNil; - return; - } - this.Err = Err_; - }); - DNSStartInfo = $pkg.DNSStartInfo = $newType(0, $kindStruct, "httptrace.DNSStartInfo", true, "net/http/httptrace", true, function(Host_) { - this.$val = this; - if (arguments.length === 0) { - this.Host = ""; - return; - } - this.Host = Host_; - }); - DNSDoneInfo = $pkg.DNSDoneInfo = $newType(0, $kindStruct, "httptrace.DNSDoneInfo", true, "net/http/httptrace", true, function(Addrs_, Err_, Coalesced_) { - this.$val = this; - if (arguments.length === 0) { - this.Addrs = sliceType.nil; - this.Err = $ifaceNil; - this.Coalesced = false; - return; - } - this.Addrs = Addrs_; - this.Err = Err_; - this.Coalesced = Coalesced_; - }); - GotConnInfo = $pkg.GotConnInfo = $newType(0, $kindStruct, "httptrace.GotConnInfo", true, "net/http/httptrace", true, function(Conn_, Reused_, WasIdle_, IdleTime_) { - this.$val = this; - if (arguments.length === 0) { - this.Conn = $ifaceNil; - this.Reused = false; - this.WasIdle = false; - this.IdleTime = new time.Duration(0, 0); - return; - } - this.Conn = Conn_; - this.Reused = Reused_; - this.WasIdle = WasIdle_; - this.IdleTime = IdleTime_; - }); - ptrType = $ptrType(ClientTrace); - sliceType = $sliceType(net.IPAddr); - funcType = $funcType([$String], [], false); - funcType$1 = $funcType([GotConnInfo], [], false); - funcType$2 = $funcType([$error], [], false); - funcType$3 = $funcType([], [], false); - funcType$4 = $funcType([$Int, textproto.MIMEHeader], [$error], false); - funcType$5 = $funcType([DNSStartInfo], [], false); - funcType$6 = $funcType([DNSDoneInfo], [], false); - funcType$7 = $funcType([$String, $String], [], false); - funcType$8 = $funcType([$String, $String, $error], [], false); - funcType$9 = $funcType([tls.ConnectionState, $error], [], false); - sliceType$1 = $sliceType($String); - funcType$10 = $funcType([$String, sliceType$1], [], false); - funcType$11 = $funcType([WroteRequestInfo], [], false); - ContextClientTrace = function(ctx) { - var {_r, _tuple, ctx, trace, x, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = ctx.Value((x = new clientEventContextKey.ptr(), new x.constructor.elem(x))); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = $assertType(_r, ptrType, true); - trace = _tuple[0]; - $s = -1; return trace; - /* */ } return; } var $f = {$blk: ContextClientTrace, $c: true, $r, _r, _tuple, ctx, trace, x, $s};return $f; - }; - $pkg.ContextClientTrace = ContextClientTrace; - ptrType.methods = [{prop: "compose", name: "compose", pkg: "net/http/httptrace", typ: $funcType([ptrType], [], false)}, {prop: "hasNetHooks", name: "hasNetHooks", pkg: "net/http/httptrace", typ: $funcType([], [$Bool], false)}]; - clientEventContextKey.init("", []); - ClientTrace.init("", [{prop: "GetConn", name: "GetConn", embedded: false, exported: true, typ: funcType, tag: ""}, {prop: "GotConn", name: "GotConn", embedded: false, exported: true, typ: funcType$1, tag: ""}, {prop: "PutIdleConn", name: "PutIdleConn", embedded: false, exported: true, typ: funcType$2, tag: ""}, {prop: "GotFirstResponseByte", name: "GotFirstResponseByte", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Got100Continue", name: "Got100Continue", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Got1xxResponse", name: "Got1xxResponse", embedded: false, exported: true, typ: funcType$4, tag: ""}, {prop: "DNSStart", name: "DNSStart", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "DNSDone", name: "DNSDone", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "ConnectStart", name: "ConnectStart", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "ConnectDone", name: "ConnectDone", embedded: false, exported: true, typ: funcType$8, tag: ""}, {prop: "TLSHandshakeStart", name: "TLSHandshakeStart", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "TLSHandshakeDone", name: "TLSHandshakeDone", embedded: false, exported: true, typ: funcType$9, tag: ""}, {prop: "WroteHeaderField", name: "WroteHeaderField", embedded: false, exported: true, typ: funcType$10, tag: ""}, {prop: "WroteHeaders", name: "WroteHeaders", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "Wait100Continue", name: "Wait100Continue", embedded: false, exported: true, typ: funcType$3, tag: ""}, {prop: "WroteRequest", name: "WroteRequest", embedded: false, exported: true, typ: funcType$11, tag: ""}]); - WroteRequestInfo.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - DNSStartInfo.init("", [{prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}]); - DNSDoneInfo.init("", [{prop: "Addrs", name: "Addrs", embedded: false, exported: true, typ: sliceType, tag: ""}, {prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}, {prop: "Coalesced", name: "Coalesced", embedded: false, exported: true, typ: $Bool, tag: ""}]); - GotConnInfo.init("", [{prop: "Conn", name: "Conn", embedded: false, exported: true, typ: net.Conn, tag: ""}, {prop: "Reused", name: "Reused", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "WasIdle", name: "WasIdle", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IdleTime", name: "IdleTime", embedded: false, exported: true, typ: time.Duration, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = context.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = tls.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = nettrace.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = net.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = textproto.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/http/internal"] = (function() { - var $pkg = {}, $init, bufio, bytes, errors, fmt, io, chunkedReader, chunkedWriter, FlushAfterChunkWriter, sliceType, ptrType, arrayType, sliceType$1, ptrType$1, ptrType$2, ptrType$3, ptrType$4, semi, NewChunkedReader, readChunkLine, trimTrailingWhitespace, isASCIISpace, removeChunkExtension, NewChunkedWriter, parseHexUint; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - chunkedReader = $pkg.chunkedReader = $newType(0, $kindStruct, "internal.chunkedReader", true, "net/http/internal", false, function(r_, n_, err_, buf_, checkEnd_) { - this.$val = this; - if (arguments.length === 0) { - this.r = ptrType.nil; - this.n = new $Uint64(0, 0); - this.err = $ifaceNil; - this.buf = arrayType.zero(); - this.checkEnd = false; - return; - } - this.r = r_; - this.n = n_; - this.err = err_; - this.buf = buf_; - this.checkEnd = checkEnd_; - }); - chunkedWriter = $pkg.chunkedWriter = $newType(0, $kindStruct, "internal.chunkedWriter", true, "net/http/internal", false, function(Wire_) { - this.$val = this; - if (arguments.length === 0) { - this.Wire = $ifaceNil; - return; - } - this.Wire = Wire_; - }); - FlushAfterChunkWriter = $pkg.FlushAfterChunkWriter = $newType(0, $kindStruct, "internal.FlushAfterChunkWriter", true, "net/http/internal", true, function(Writer_) { - this.$val = this; - if (arguments.length === 0) { - this.Writer = ptrType$4.nil; - return; - } - this.Writer = Writer_; - }); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(bufio.Reader); - arrayType = $arrayType($Uint8, 2); - sliceType$1 = $sliceType($emptyInterface); - ptrType$1 = $ptrType(FlushAfterChunkWriter); - ptrType$2 = $ptrType(chunkedReader); - ptrType$3 = $ptrType(chunkedWriter); - ptrType$4 = $ptrType(bufio.Writer); - NewChunkedReader = function(r) { - var _tuple, br, ok, r; - _tuple = $assertType(r, ptrType, true); - br = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - br = bufio.NewReader(r); - } - return new chunkedReader.ptr(br, new $Uint64(0, 0), $ifaceNil, arrayType.zero(), false); - }; - $pkg.NewChunkedReader = NewChunkedReader; - chunkedReader.ptr.prototype.beginChunk = function() { - var {_r, _tuple, _tuple$1, cr, line, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - line = sliceType.nil; - _r = readChunkLine(cr.r); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - line = _tuple[0]; - cr.err = _tuple[1]; - if (!($interfaceIsEqual(cr.err, $ifaceNil))) { - $s = -1; return; - } - _tuple$1 = parseHexUint(line); - cr.n = _tuple$1[0]; - cr.err = _tuple$1[1]; - if (!($interfaceIsEqual(cr.err, $ifaceNil))) { - $s = -1; return; - } - if ((x = cr.n, (x.$high === 0 && x.$low === 0))) { - cr.err = io.EOF; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: chunkedReader.ptr.prototype.beginChunk, $c: true, $r, _r, _tuple, _tuple$1, cr, line, x, $s};return $f; - }; - chunkedReader.prototype.beginChunk = function() { return this.$val.beginChunk(); }; - chunkedReader.ptr.prototype.chunkHeaderAvailable = function() { - var {_r, _tuple, cr, n, peek, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - n = cr.r.Buffered(); - /* */ if (n > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n > 0) { */ case 1: - _r = cr.r.Peek(n); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - peek = _tuple[0]; - $s = -1; return bytes.IndexByte(peek, 10) >= 0; - /* } */ case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: chunkedReader.ptr.prototype.chunkHeaderAvailable, $c: true, $r, _r, _tuple, cr, n, peek, $s};return $f; - }; - chunkedReader.prototype.chunkHeaderAvailable = function() { return this.$val.chunkHeaderAvailable(); }; - chunkedReader.ptr.prototype.Read = function(b) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _v, b, cr, err, n, n0, rbuf, x, x$1, x$2, x$3, x$4, x$5, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - cr = this; - /* while (true) { */ case 1: - /* if (!($interfaceIsEqual(cr.err, $ifaceNil))) { break; } */ if(!($interfaceIsEqual(cr.err, $ifaceNil))) { $s = 2; continue; } - /* */ if (cr.checkEnd) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (cr.checkEnd) { */ case 3: - if (n > 0 && cr.r.Buffered() < 2) { - /* break; */ $s = 2; continue; - } - _r = io.ReadFull(cr.r, $subslice(new sliceType(cr.buf), 0, 2)); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - cr.err = _tuple[1]; - if ($interfaceIsEqual(cr.err, $ifaceNil)) { - if (!(($bytesToString(new sliceType(cr.buf))) === "\r\n")) { - cr.err = errors.New("malformed chunked encoding"); - /* break; */ $s = 2; continue; - } - } else { - if ($interfaceIsEqual(cr.err, io.EOF)) { - cr.err = io.ErrUnexpectedEOF; - } - /* break; */ $s = 2; continue; - } - cr.checkEnd = false; - /* } */ case 4: - /* */ if ((x = cr.n, (x.$high === 0 && x.$low === 0))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ((x = cr.n, (x.$high === 0 && x.$low === 0))) { */ case 6: - if (!(n > 0)) { _v = false; $s = 10; continue s; } - _r$1 = cr.chunkHeaderAvailable(); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 10: - /* */ if (_v) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v) { */ case 8: - /* break; */ $s = 2; continue; - /* } */ case 9: - $r = cr.beginChunk(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* continue; */ $s = 1; continue; - /* } */ case 7: - if (b.$length === 0) { - /* break; */ $s = 2; continue; - } - rbuf = b; - if ((x$1 = (new $Uint64(0, rbuf.$length)), x$2 = cr.n, (x$1.$high > x$2.$high || (x$1.$high === x$2.$high && x$1.$low > x$2.$low)))) { - rbuf = $subslice(rbuf, 0, $flatten64(cr.n)); - } - n0 = 0; - _r$2 = cr.r.Read(rbuf); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n0 = _tuple$1[0]; - cr.err = _tuple$1[1]; - n = n + (n0) >> 0; - b = $subslice(b, n0); - cr.n = (x$3 = cr.n, x$4 = (new $Uint64(0, n0)), new $Uint64(x$3.$high - x$4.$high, x$3.$low - x$4.$low)); - if ((x$5 = cr.n, (x$5.$high === 0 && x$5.$low === 0)) && $interfaceIsEqual(cr.err, $ifaceNil)) { - cr.checkEnd = true; - } else if ($interfaceIsEqual(cr.err, io.EOF)) { - cr.err = io.ErrUnexpectedEOF; - } - $s = 1; continue; - case 2: - _tmp = n; - _tmp$1 = cr.err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: chunkedReader.ptr.prototype.Read, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, _v, b, cr, err, n, n0, rbuf, x, x$1, x$2, x$3, x$4, x$5, $s};return $f; - }; - chunkedReader.prototype.Read = function(b) { return this.$val.Read(b); }; - readChunkLine = function(b) { - var {_r, _tuple, _tuple$1, b, err, p, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = b.ReadSlice(10); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - err = io.ErrUnexpectedEOF; - } else if ($interfaceIsEqual(err, bufio.ErrBufferFull)) { - err = $pkg.ErrLineTooLong; - } - $s = -1; return [sliceType.nil, err]; - } - if (p.$length >= 4096) { - $s = -1; return [sliceType.nil, $pkg.ErrLineTooLong]; - } - p = trimTrailingWhitespace(p); - _tuple$1 = removeChunkExtension(p); - p = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType.nil, err]; - } - $s = -1; return [p, $ifaceNil]; - /* */ } return; } var $f = {$blk: readChunkLine, $c: true, $r, _r, _tuple, _tuple$1, b, err, p, $s};return $f; - }; - trimTrailingWhitespace = function(b) { - var b, x; - while (true) { - if (!(b.$length > 0 && isASCIISpace((x = b.$length - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x]))))) { break; } - b = $subslice(b, 0, (b.$length - 1 >> 0)); - } - return b; - }; - isASCIISpace = function(b) { - var b; - return (b === 32) || (b === 9) || (b === 10) || (b === 13); - }; - removeChunkExtension = function(p) { - var _tuple, p; - _tuple = bytes.Cut(p, semi); - p = _tuple[0]; - return [p, $ifaceNil]; - }; - NewChunkedWriter = function(w) { - var w; - return new chunkedWriter.ptr(w); - }; - $pkg.NewChunkedWriter = NewChunkedWriter; - chunkedWriter.ptr.prototype.Write = function(data) { - var {_r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, bw, cw, data, err, n, ok, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - cw = this; - if (data.$length === 0) { - _tmp = 0; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r = fmt.Fprintf(cw.Wire, "%x\r\n", new sliceType$1([new $Int(data.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = 0; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - _r$1 = cw.Wire.Write(data); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - n = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - if (!((n === data.$length))) { - err = io.ErrShortWrite; - $s = -1; return [n, err]; - } - _r$2 = io.WriteString(cw.Wire, "\r\n"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [n, err]; - } - _tuple$3 = $assertType(cw.Wire, ptrType$1, true); - bw = _tuple$3[0]; - ok = _tuple$3[1]; - /* */ if (ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok) { */ case 4: - _r$3 = bw.Writer.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - /* } */ case 5: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: chunkedWriter.ptr.prototype.Write, $c: true, $r, _r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, _tuple$3, bw, cw, data, err, n, ok, $s};return $f; - }; - chunkedWriter.prototype.Write = function(data) { return this.$val.Write(data); }; - chunkedWriter.ptr.prototype.Close = function() { - var {_r, _tuple, cw, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cw = this; - _r = io.WriteString(cw.Wire, "0\r\n"); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - $s = -1; return err; - /* */ } return; } var $f = {$blk: chunkedWriter.ptr.prototype.Close, $c: true, $r, _r, _tuple, cw, err, $s};return $f; - }; - chunkedWriter.prototype.Close = function() { return this.$val.Close(); }; - parseHexUint = function(v) { - var _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, b, err, i, n, v, x; - n = new $Uint64(0, 0); - err = $ifaceNil; - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (48 <= b && b <= 57) { - b = b - 48 << 24 >>> 24; - } else if (97 <= b && b <= 102) { - b = (b - 97 << 24 >>> 24) + 10 << 24 >>> 24; - } else if (65 <= b && b <= 70) { - b = (b - 65 << 24 >>> 24) + 10 << 24 >>> 24; - } else { - _tmp = new $Uint64(0, 0); - _tmp$1 = errors.New("invalid byte in chunk length"); - n = _tmp; - err = _tmp$1; - return [n, err]; - } - if (i === 16) { - _tmp$2 = new $Uint64(0, 0); - _tmp$3 = errors.New("http chunk length too large"); - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - n = $shiftLeft64(n, (4)); - n = (x = (new $Uint64(0, b)), new $Uint64(n.$high | x.$high, (n.$low | x.$low) >>> 0)); - _i++; - } - return [n, err]; - }; - ptrType$2.methods = [{prop: "beginChunk", name: "beginChunk", pkg: "net/http/internal", typ: $funcType([], [], false)}, {prop: "chunkHeaderAvailable", name: "chunkHeaderAvailable", pkg: "net/http/internal", typ: $funcType([], [$Bool], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}]; - ptrType$3.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - chunkedReader.init("net/http/internal", [{prop: "r", name: "r", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "checkEnd", name: "checkEnd", embedded: false, exported: false, typ: $Bool, tag: ""}]); - chunkedWriter.init("", [{prop: "Wire", name: "Wire", embedded: false, exported: true, typ: io.Writer, tag: ""}]); - FlushAfterChunkWriter.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: ptrType$4, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrLineTooLong = errors.New("header line too long"); - semi = (new sliceType($stringToBytes(";"))); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/http/internal/ascii"] = (function() { - var $pkg = {}, $init, strings, unicode, EqualFold, lower, IsPrint, Is, ToLower; - strings = $packages["strings"]; - unicode = $packages["unicode"]; - EqualFold = function(s, t) { - var i, s, t; - if (!((s.length === t.length))) { - return false; - } - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (!((lower(s.charCodeAt(i)) === lower(t.charCodeAt(i))))) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - $pkg.EqualFold = EqualFold; - lower = function(b) { - var b; - if (65 <= b && b <= 90) { - return b + 32 << 24 >>> 24; - } - return b; - }; - IsPrint = function(s) { - var i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) < 32 || s.charCodeAt(i) > 126) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - $pkg.IsPrint = IsPrint; - Is = function(s) { - var i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) > 127) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - $pkg.Is = Is; - ToLower = function(s) { - var {$24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, lower$1, ok, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lower$1 = ""; - ok = false; - if (!IsPrint(s)) { - _tmp = ""; - _tmp$1 = false; - lower$1 = _tmp; - ok = _tmp$1; - $s = -1; return [lower$1, ok]; - } - _r = strings.ToLower(s); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp$2 = _r; - _tmp$3 = true; - lower$1 = _tmp$2; - ok = _tmp$3; - $24r = [lower$1, ok]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ToLower, $c: true, $r, $24r, _r, _tmp, _tmp$1, _tmp$2, _tmp$3, lower$1, ok, s, $s};return $f; - }; - $pkg.ToLower = ToLower; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = strings.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = unicode.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/text/transform"] = (function() { - var $pkg = {}, $init, bytes, errors, io, utf8, errInconsistentByteCount, errShortInternal; - bytes = $packages["bytes"]; - errors = $packages["errors"]; - io = $packages["io"]; - utf8 = $packages["unicode/utf8"]; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.ErrShortDst = errors.New("transform: short destination buffer"); - $pkg.ErrShortSrc = errors.New("transform: short source buffer"); - $pkg.ErrEndOfSpan = errors.New("transform: input and output are not identical"); - errInconsistentByteCount = errors.New("transform: inconsistent byte count returned"); - errShortInternal = errors.New("transform: short internal buffer"); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/text/unicode/bidi"] = (function() { - var $pkg = {}, $init, bytes, list, fmt, log, sort, utf8, Class, bidiTrie, Properties, arrayType, sliceType$1, sliceType$2, ptrType$4, bidiValues, bidiIndex, trie, controlByteToClass, newBidiTrie, LookupRune, Lookup, LookupString; - bytes = $packages["bytes"]; - list = $packages["container/list"]; - fmt = $packages["fmt"]; - log = $packages["log"]; - sort = $packages["sort"]; - utf8 = $packages["unicode/utf8"]; - Class = $pkg.Class = $newType(4, $kindUint, "bidi.Class", true, "vendor/golang.org/x/text/unicode/bidi", true, null); - bidiTrie = $pkg.bidiTrie = $newType(0, $kindStruct, "bidi.bidiTrie", true, "vendor/golang.org/x/text/unicode/bidi", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - Properties = $pkg.Properties = $newType(0, $kindStruct, "bidi.Properties", true, "vendor/golang.org/x/text/unicode/bidi", true, function(entry_, last_) { - this.$val = this; - if (arguments.length === 0) { - this.entry = 0; - this.last = 0; - return; - } - this.entry = entry_; - this.last = last_; - }); - arrayType = $arrayType($Uint8, 4); - sliceType$1 = $sliceType($Uint8); - sliceType$2 = $sliceType(Class); - ptrType$4 = $ptrType(bidiTrie); - newBidiTrie = function(i) { - var i; - return new bidiTrie.ptr(); - }; - bidiTrie.ptr.prototype.lookupValue = function(n, b) { - var b, n, t, x; - t = this; - return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= bidiValues.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiValues[x]))); - }; - bidiTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; - Properties.ptr.prototype.Class = function() { - var c, p, x; - p = this; - c = ((((p.entry & 15) >>> 0) >>> 0)); - if (c === 14) { - c = (x = (p.last & 15) >>> 0, ((x < 0 || x >= controlByteToClass.length) ? ($throwRuntimeError("index out of range"), undefined) : controlByteToClass[x])); - } - return c; - }; - Properties.prototype.Class = function() { return this.$val.Class(); }; - Properties.ptr.prototype.IsBracket = function() { - var p; - p = this; - return !((((p.entry & 240) >>> 0) === 0)); - }; - Properties.prototype.IsBracket = function() { return this.$val.IsBracket(); }; - Properties.ptr.prototype.IsOpeningBracket = function() { - var p; - p = this; - return !((((p.entry & 16) >>> 0) === 0)); - }; - Properties.prototype.IsOpeningBracket = function() { return this.$val.IsOpeningBracket(); }; - LookupRune = function(r) { - var _tuple, buf, n, p, r, size; - p = new Properties.ptr(0, 0); - size = 0; - buf = arrayType.zero(); - n = utf8.EncodeRune(new sliceType$1(buf), r); - _tuple = Lookup($subslice(new sliceType$1(buf), 0, n)); - Properties.copy(p, _tuple[0]); - size = _tuple[1]; - return [p, size]; - }; - $pkg.LookupRune = LookupRune; - Lookup = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, p, s, sz; - p = new Properties.ptr(0, 0); - sz = 0; - c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); - if (c0 < 128) { - _tmp = new Properties.ptr(((c0 < 0 || c0 >= bidiValues.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiValues[c0]), 0); - _tmp$1 = 1; - Properties.copy(p, _tmp); - sz = _tmp$1; - return [p, sz]; - } else if (c0 < 194) { - _tmp$2 = new Properties.ptr(0, 0); - _tmp$3 = 1; - Properties.copy(p, _tmp$2); - sz = _tmp$3; - return [p, sz]; - } else if (c0 < 224) { - if (s.$length < 2) { - _tmp$4 = new Properties.ptr(0, 0); - _tmp$5 = 0; - Properties.copy(p, _tmp$4); - sz = _tmp$5; - return [p, sz]; - } - i = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); - c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = new Properties.ptr(0, 0); - _tmp$7 = 1; - Properties.copy(p, _tmp$6); - sz = _tmp$7; - return [p, sz]; - } - _tmp$8 = new Properties.ptr(trie.lookupValue(((i >>> 0)), c1), 0); - _tmp$9 = 2; - Properties.copy(p, _tmp$8); - sz = _tmp$9; - return [p, sz]; - } else if (c0 < 240) { - if (s.$length < 3) { - _tmp$10 = new Properties.ptr(0, 0); - _tmp$11 = 0; - Properties.copy(p, _tmp$10); - sz = _tmp$11; - return [p, sz]; - } - i$1 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); - c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = new Properties.ptr(0, 0); - _tmp$13 = 1; - Properties.copy(p, _tmp$12); - sz = _tmp$13; - return [p, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o]); - c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = new Properties.ptr(0, 0); - _tmp$15 = 1; - Properties.copy(p, _tmp$14); - sz = _tmp$15; - return [p, sz]; - } - _tmp$16 = new Properties.ptr(trie.lookupValue(((i$1 >>> 0)), c2), c2); - _tmp$17 = 3; - Properties.copy(p, _tmp$16); - sz = _tmp$17; - return [p, sz]; - } else if (c0 < 248) { - if (s.$length < 4) { - _tmp$18 = new Properties.ptr(0, 0); - _tmp$19 = 0; - Properties.copy(p, _tmp$18); - sz = _tmp$19; - return [p, sz]; - } - i$2 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); - c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = new Properties.ptr(0, 0); - _tmp$21 = 1; - Properties.copy(p, _tmp$20); - sz = _tmp$21; - return [p, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); - c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = new Properties.ptr(0, 0); - _tmp$23 = 1; - Properties.copy(p, _tmp$22); - sz = _tmp$23; - return [p, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); - c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = new Properties.ptr(0, 0); - _tmp$25 = 1; - Properties.copy(p, _tmp$24); - sz = _tmp$25; - return [p, sz]; - } - _tmp$26 = new Properties.ptr(trie.lookupValue(((i$2 >>> 0)), c3), 0); - _tmp$27 = 4; - Properties.copy(p, _tmp$26); - sz = _tmp$27; - return [p, sz]; - } - _tmp$28 = new Properties.ptr(0, 0); - _tmp$29 = 1; - Properties.copy(p, _tmp$28); - sz = _tmp$29; - return [p, sz]; - }; - $pkg.Lookup = Lookup; - LookupString = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, p, s, sz; - p = new Properties.ptr(0, 0); - sz = 0; - c0 = s.charCodeAt(0); - if (c0 < 128) { - _tmp = new Properties.ptr(((c0 < 0 || c0 >= bidiValues.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiValues[c0]), 0); - _tmp$1 = 1; - Properties.copy(p, _tmp); - sz = _tmp$1; - return [p, sz]; - } else if (c0 < 194) { - _tmp$2 = new Properties.ptr(0, 0); - _tmp$3 = 1; - Properties.copy(p, _tmp$2); - sz = _tmp$3; - return [p, sz]; - } else if (c0 < 224) { - if (s.length < 2) { - _tmp$4 = new Properties.ptr(0, 0); - _tmp$5 = 0; - Properties.copy(p, _tmp$4); - sz = _tmp$5; - return [p, sz]; - } - i = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); - c1 = s.charCodeAt(1); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = new Properties.ptr(0, 0); - _tmp$7 = 1; - Properties.copy(p, _tmp$6); - sz = _tmp$7; - return [p, sz]; - } - _tmp$8 = new Properties.ptr(trie.lookupValue(((i >>> 0)), c1), 0); - _tmp$9 = 2; - Properties.copy(p, _tmp$8); - sz = _tmp$9; - return [p, sz]; - } else if (c0 < 240) { - if (s.length < 3) { - _tmp$10 = new Properties.ptr(0, 0); - _tmp$11 = 0; - Properties.copy(p, _tmp$10); - sz = _tmp$11; - return [p, sz]; - } - i$1 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); - c1$1 = s.charCodeAt(1); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = new Properties.ptr(0, 0); - _tmp$13 = 1; - Properties.copy(p, _tmp$12); - sz = _tmp$13; - return [p, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o]); - c2 = s.charCodeAt(2); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = new Properties.ptr(0, 0); - _tmp$15 = 1; - Properties.copy(p, _tmp$14); - sz = _tmp$15; - return [p, sz]; - } - _tmp$16 = new Properties.ptr(trie.lookupValue(((i$1 >>> 0)), c2), c2); - _tmp$17 = 3; - Properties.copy(p, _tmp$16); - sz = _tmp$17; - return [p, sz]; - } else if (c0 < 248) { - if (s.length < 4) { - _tmp$18 = new Properties.ptr(0, 0); - _tmp$19 = 0; - Properties.copy(p, _tmp$18); - sz = _tmp$19; - return [p, sz]; - } - i$2 = ((c0 < 0 || c0 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[c0]); - c1$2 = s.charCodeAt(1); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = new Properties.ptr(0, 0); - _tmp$21 = 1; - Properties.copy(p, _tmp$20); - sz = _tmp$21; - return [p, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); - c2$1 = s.charCodeAt(2); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = new Properties.ptr(0, 0); - _tmp$23 = 1; - Properties.copy(p, _tmp$22); - sz = _tmp$23; - return [p, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= bidiIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : bidiIndex[o$1]); - c3 = s.charCodeAt(3); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = new Properties.ptr(0, 0); - _tmp$25 = 1; - Properties.copy(p, _tmp$24); - sz = _tmp$25; - return [p, sz]; - } - _tmp$26 = new Properties.ptr(trie.lookupValue(((i$2 >>> 0)), c3), 0); - _tmp$27 = 4; - Properties.copy(p, _tmp$26); - sz = _tmp$27; - return [p, sz]; - } - _tmp$28 = new Properties.ptr(0, 0); - _tmp$29 = 1; - Properties.copy(p, _tmp$28); - sz = _tmp$29; - return [p, sz]; - }; - $pkg.LookupString = LookupString; - Class.methods = [{prop: "in$", name: "in", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([sliceType$2], [$Bool], true)}]; - ptrType$4.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([sliceType$1], [$Uint8, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([sliceType$1], [$Uint8], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([$String], [$Uint8, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([$String], [$Uint8], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([$Uint32, $Uint8], [$Uint8], false)}]; - Properties.methods = [{prop: "Class", name: "Class", pkg: "", typ: $funcType([], [Class], false)}, {prop: "IsBracket", name: "IsBracket", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "IsOpeningBracket", name: "IsOpeningBracket", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "reverseBracket", name: "reverseBracket", pkg: "vendor/golang.org/x/text/unicode/bidi", typ: $funcType([$Int32], [$Int32], false)}]; - bidiTrie.init("", []); - Properties.init("vendor/golang.org/x/text/unicode/bidi", [{prop: "entry", name: "entry", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "last", name: "last", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = list.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = log.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bidiValues = $toNativeArray($kindUint8, [11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 7, 8, 9, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 7, 7, 7, 8, 9, 10, 10, 4, 4, 4, 10, 10, 58, 42, 10, 3, 6, 3, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 7, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 6, 10, 4, 4, 4, 4, 10, 10, 10, 10, 0, 10, 10, 11, 10, 10, 4, 4, 2, 2, 10, 0, 10, 10, 10, 2, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 10, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 10, 4, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 12, 1, 12, 12, 1, 12, 12, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 10, 10, 13, 4, 4, 13, 6, 13, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 13, 13, 13, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 5, 10, 12, 12, 12, 12, 12, 12, 13, 13, 12, 12, 10, 12, 12, 12, 12, 13, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 10, 10, 10, 10, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 12, 12, 12, 1, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 5, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 0, 0, 12, 12, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 4, 10, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, 12, 58, 42, 58, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 4, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 10, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 0, 0, 0, 12, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 0, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 7, 14, 14, 14, 14, 14, 6, 4, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 154, 138, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 11, 11, 11, 11, 11, 11, 14, 14, 14, 14, 11, 11, 11, 11, 11, 11, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 10, 154, 138, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 10, 154, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 10, 10, 10, 10, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 10, 0, 10, 0, 10, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 3, 4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 154, 138, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 154, 138, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 122, 106, 154, 138, 186, 170, 154, 138, 122, 106, 218, 42, 58, 202, 154, 138, 122, 106, 154, 138, 186, 170, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 9, 10, 10, 10, 10, 0, 0, 0, 58, 42, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 58, 42, 58, 42, 58, 42, 58, 42, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 10, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 10, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 10, 10, 10, 10, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 10, 6, 0, 10, 6, 10, 10, 10, 154, 138, 122, 106, 154, 138, 4, 10, 10, 3, 3, 10, 10, 10, 0, 10, 4, 4, 10, 0, 0, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 11, 0, 10, 10, 4, 4, 4, 10, 10, 58, 42, 10, 3, 6, 3, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 10, 74, 10, 250, 234, 10, 58, 42, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 10, 10, 10, 4, 4, 0, 10, 10, 10, 10, 10, 10, 10, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10, 10, 10, 11, 11, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 12, 12, 1, 1, 1, 1, 1, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 12, 0, 0, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 0, 0, 0, 12, 0, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 12, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 12, 12, 12, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 12, 12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]); - bidiIndex = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 0, 0, 9, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 8, 17, 18, 18, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 28, 30, 31, 32, 33, 34, 35, 36, 26, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 54, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 57, 58, 59, 60, 61, 0, 62, 0, 63, 64, 0, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 0, 0, 75, 0, 0, 0, 76, 0, 0, 0, 0, 0, 0, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 86, 86, 86, 88, 89, 90, 86, 91, 92, 93, 94, 86, 86, 86, 86, 86, 86, 95, 86, 86, 96, 86, 97, 0, 0, 0, 0, 86, 86, 98, 99, 86, 86, 86, 86, 86, 100, 101, 86, 0, 0, 0, 102, 0, 103, 0, 104, 105, 106, 107, 108, 86, 86, 86, 109, 110, 0, 111, 112, 0, 0, 0, 113, 114, 115, 116, 117, 0, 118, 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 121, 0, 0, 0, 0, 122, 123, 124, 125, 126, 0, 127, 0, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 0, 139, 0, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 141, 142, 14, 14, 14, 14, 14, 14, 143, 14, 14, 144, 145, 146, 14, 147, 148, 149, 0, 150, 0, 0, 0, 0, 151, 86, 152, 153, 0, 0, 0, 154, 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, 156, 156, 156, 157, 156, 156, 156, 158, 156, 156, 159, 160, 156, 156, 156, 156, 156, 156, 156, 161, 156, 156, 156, 156, 162, 163, 156, 164, 165, 156, 156, 166, 167, 168, 0, 169, 170, 171, 172, 173, 0, 0, 174, 38, 175, 0, 0, 176, 177, 178, 179, 0, 0, 180, 181, 182, 183, 184, 0, 185, 0, 0, 0, 186, 0, 0, 0, 187, 188, 0, 189, 190, 191, 192, 0, 0, 0, 0, 0, 193, 0, 194, 0, 195, 196, 197, 0, 0, 0, 0, 198, 0, 0, 0, 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 203, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 206, 207, 0, 86, 208, 0, 0, 86, 209, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 211, 212, 213, 214, 0, 0, 0, 0, 0, 0, 0, 0, 215, 216, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 218, 0, 0, 0, 201, 0, 0, 0, 0, 0, 0, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156, 156, 156, 220, 156, 221, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 164, 14, 156, 14, 222, 156, 156, 14, 14, 14, 223, 156, 156, 156, 156, 224, 86, 225, 226, 227, 228, 229, 0, 0, 230, 0, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 231, 86, 108, 86, 232, 233, 234, 235, 0, 86, 236, 86, 237, 86, 238, 239, 240, 86, 86, 241, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, 0, 0, 0, 11, 0, 0, 0, 0, 12, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 244, 244, 244, 244, 5, 5, 5, 245, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - trie = newBidiTrie(0); - controlByteToClass = $toNativeArray($kindUint, [0, 0, 0, 0, 0, 0, 21, 22, 23, 24, 18, 19, 20, 16, 17, 0]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/text/secure/bidirule"] = (function() { - var $pkg = {}, $init, errors, utf8, transform, bidi, ruleState, ruleTransition, Transformer, arrayType, arrayType$1, sliceType, ptrType, transitions, asciiTable, DirectionString, ValidString, init; - errors = $packages["errors"]; - utf8 = $packages["unicode/utf8"]; - transform = $packages["vendor/golang.org/x/text/transform"]; - bidi = $packages["vendor/golang.org/x/text/unicode/bidi"]; - ruleState = $pkg.ruleState = $newType(1, $kindUint8, "bidirule.ruleState", true, "vendor/golang.org/x/text/secure/bidirule", false, null); - ruleTransition = $pkg.ruleTransition = $newType(0, $kindStruct, "bidirule.ruleTransition", true, "vendor/golang.org/x/text/secure/bidirule", false, function(next_, mask_) { - this.$val = this; - if (arguments.length === 0) { - this.next = 0; - this.mask = 0; - return; - } - this.next = next_; - this.mask = mask_; - }); - Transformer = $pkg.Transformer = $newType(0, $kindStruct, "bidirule.Transformer", true, "vendor/golang.org/x/text/secure/bidirule", true, function(state_, hasRTL_, seen_) { - this.$val = this; - if (arguments.length === 0) { - this.state = 0; - this.hasRTL = false; - this.seen = 0; - return; - } - this.state = state_; - this.hasRTL = hasRTL_; - this.seen = seen_; - }); - arrayType = $arrayType(bidi.Properties, 128); - arrayType$1 = $arrayType(ruleTransition, 2); - sliceType = $sliceType($Uint8); - ptrType = $ptrType(Transformer); - Transformer.ptr.prototype.isFinal = function() { - var t; - t = this; - return (t.state === 2) || (t.state === 4) || (t.state === 0); - }; - Transformer.prototype.isFinal = function() { return this.$val.isFinal(); }; - DirectionString = function(s) { - var _tuple, c, e, i, s, sz; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _tuple = bidi.LookupString($substring(s, i)); - e = $clone(_tuple[0], bidi.Properties); - sz = _tuple[1]; - if (sz === 0) { - i = i + (1) >> 0; - continue; - } - c = $clone(e, bidi.Properties).Class(); - if ((c === 1) || (c === 13) || (c === 5)) { - return 1; - } - i = i + (sz) >> 0; - } - return 0; - }; - $pkg.DirectionString = DirectionString; - ValidString = function(s) { - var _tuple, n, ok, s, t; - t = new Transformer.ptr(0, false, 0); - _tuple = t.advanceString(s); - n = _tuple[0]; - ok = _tuple[1]; - if (!ok || n < s.length) { - return false; - } - return t.isFinal(); - }; - $pkg.ValidString = ValidString; - Transformer.ptr.prototype.isRTL = function() { - var t; - t = this; - return !((((t.seen & 8226) >>> 0) === 0)); - }; - Transformer.prototype.isRTL = function() { return this.$val.isRTL(); }; - Transformer.ptr.prototype.Reset = function() { - var t; - t = this; - Transformer.copy(t, new Transformer.ptr(0, false, 0)); - }; - Transformer.prototype.Reset = function() { return this.$val.Reset(); }; - Transformer.ptr.prototype.Transform = function(dst, src, atEOF) { - var _tmp, _tmp$1, _tmp$2, _tuple, atEOF, dst, err, err1, n, nDst, nSrc, src, t; - nDst = 0; - nSrc = 0; - err = $ifaceNil; - t = this; - if (dst.$length < src.$length) { - src = $subslice(src, 0, dst.$length); - atEOF = false; - err = transform.ErrShortDst; - } - _tuple = t.Span(src, atEOF); - n = _tuple[0]; - err1 = _tuple[1]; - $copySlice(dst, $subslice(src, 0, n)); - if ($interfaceIsEqual(err, $ifaceNil) || !($interfaceIsEqual(err1, $ifaceNil)) && !($interfaceIsEqual(err1, transform.ErrShortSrc))) { - err = err1; - } - _tmp = n; - _tmp$1 = n; - _tmp$2 = err; - nDst = _tmp; - nSrc = _tmp$1; - err = _tmp$2; - return [nDst, nSrc, err]; - }; - Transformer.prototype.Transform = function(dst, src, atEOF) { return this.$val.Transform(dst, src, atEOF); }; - Transformer.ptr.prototype.Span = function(src, atEOF) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, atEOF, err, n, ok, src, t; - n = 0; - err = $ifaceNil; - t = this; - if ((t.state === 5) && t.isRTL()) { - _tmp = 0; - _tmp$1 = $pkg.ErrInvalid; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - _tuple = t.advance(src); - n = _tuple[0]; - ok = _tuple[1]; - switch (0) { default: - if (!ok) { - err = $pkg.ErrInvalid; - } else if (n < src.$length) { - if (!atEOF) { - err = transform.ErrShortSrc; - break; - } - err = $pkg.ErrInvalid; - } else if (!t.isFinal()) { - err = $pkg.ErrInvalid; - } - } - _tmp$2 = n; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - }; - Transformer.prototype.Span = function(src, atEOF) { return this.$val.Span(src, atEOF); }; - init = function() { - var _i, _ref, _tuple, i, p; - _ref = asciiTable; - _i = 0; - while (true) { - if (!(_i < 128)) { break; } - i = _i; - _tuple = bidi.LookupRune(((i >> 0))); - p = $clone(_tuple[0], bidi.Properties); - bidi.Properties.copy(((i < 0 || i >= asciiTable.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiTable[i]), p); - _i++; - } - }; - Transformer.ptr.prototype.advance = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, e, n, ok, s, sz, t, tr, x, x$1, y; - n = 0; - ok = false; - t = this; - e = new bidi.Properties.ptr(0, 0); - sz = 0; - while (true) { - if (!(n < s.$length)) { break; } - if (((n < 0 || n >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + n]) < 128) { - _tmp = $clone((x = ((n < 0 || n >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + n]), ((x < 0 || x >= asciiTable.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiTable[x])), bidi.Properties); - _tmp$1 = 1; - bidi.Properties.copy(e, _tmp); - sz = _tmp$1; - } else { - _tuple = bidi.Lookup($subslice(s, n)); - bidi.Properties.copy(e, _tuple[0]); - sz = _tuple[1]; - if (sz <= 1) { - if (sz === 1) { - _tmp$2 = n; - _tmp$3 = false; - n = _tmp$2; - ok = _tmp$3; - return [n, ok]; - } - _tmp$4 = n; - _tmp$5 = true; - n = _tmp$4; - ok = _tmp$5; - return [n, ok]; - } - } - c = (((y = $clone(e, bidi.Properties).Class(), y < 32 ? (1 << y) : 0) << 16 >>> 16)); - t.seen = (t.seen | (c)) >>> 0; - if (((t.seen & 36) >>> 0) === 36) { - t.state = 5; - _tmp$6 = n; - _tmp$7 = false; - n = _tmp$6; - ok = _tmp$7; - return [n, ok]; - } - tr = $clone((x$1 = t.state, ((x$1 < 0 || x$1 >= transitions.length) ? ($throwRuntimeError("index out of range"), undefined) : transitions[x$1])), arrayType$1); - if (!((((tr[0].mask & c) >>> 0) === 0))) { - t.state = tr[0].next; - } else if (!((((tr[1].mask & c) >>> 0) === 0))) { - t.state = tr[1].next; - } else { - t.state = 5; - if (t.isRTL()) { - _tmp$8 = n; - _tmp$9 = false; - n = _tmp$8; - ok = _tmp$9; - return [n, ok]; - } - } - n = n + (sz) >> 0; - } - _tmp$10 = n; - _tmp$11 = true; - n = _tmp$10; - ok = _tmp$11; - return [n, ok]; - }; - Transformer.prototype.advance = function(s) { return this.$val.advance(s); }; - Transformer.ptr.prototype.advanceString = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, c, e, n, ok, s, sz, t, tr, x, x$1, y; - n = 0; - ok = false; - t = this; - e = new bidi.Properties.ptr(0, 0); - sz = 0; - while (true) { - if (!(n < s.length)) { break; } - if (s.charCodeAt(n) < 128) { - _tmp = $clone((x = s.charCodeAt(n), ((x < 0 || x >= asciiTable.length) ? ($throwRuntimeError("index out of range"), undefined) : asciiTable[x])), bidi.Properties); - _tmp$1 = 1; - bidi.Properties.copy(e, _tmp); - sz = _tmp$1; - } else { - _tuple = bidi.LookupString($substring(s, n)); - bidi.Properties.copy(e, _tuple[0]); - sz = _tuple[1]; - if (sz <= 1) { - if (sz === 1) { - _tmp$2 = n; - _tmp$3 = false; - n = _tmp$2; - ok = _tmp$3; - return [n, ok]; - } - _tmp$4 = n; - _tmp$5 = true; - n = _tmp$4; - ok = _tmp$5; - return [n, ok]; - } - } - c = (((y = $clone(e, bidi.Properties).Class(), y < 32 ? (1 << y) : 0) << 16 >>> 16)); - t.seen = (t.seen | (c)) >>> 0; - if (((t.seen & 36) >>> 0) === 36) { - t.state = 5; - _tmp$6 = n; - _tmp$7 = false; - n = _tmp$6; - ok = _tmp$7; - return [n, ok]; - } - tr = $clone((x$1 = t.state, ((x$1 < 0 || x$1 >= transitions.length) ? ($throwRuntimeError("index out of range"), undefined) : transitions[x$1])), arrayType$1); - if (!((((tr[0].mask & c) >>> 0) === 0))) { - t.state = tr[0].next; - } else if (!((((tr[1].mask & c) >>> 0) === 0))) { - t.state = tr[1].next; - } else { - t.state = 5; - if (t.isRTL()) { - _tmp$8 = n; - _tmp$9 = false; - n = _tmp$8; - ok = _tmp$9; - return [n, ok]; - } - } - n = n + (sz) >> 0; - } - _tmp$10 = n; - _tmp$11 = true; - n = _tmp$10; - ok = _tmp$11; - return [n, ok]; - }; - Transformer.prototype.advanceString = function(s) { return this.$val.advanceString(s); }; - ptrType.methods = [{prop: "isFinal", name: "isFinal", pkg: "vendor/golang.org/x/text/secure/bidirule", typ: $funcType([], [$Bool], false)}, {prop: "isRTL", name: "isRTL", pkg: "vendor/golang.org/x/text/secure/bidirule", typ: $funcType([], [$Bool], false)}, {prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Transform", name: "Transform", pkg: "", typ: $funcType([sliceType, sliceType, $Bool], [$Int, $Int, $error], false)}, {prop: "Span", name: "Span", pkg: "", typ: $funcType([sliceType, $Bool], [$Int, $error], false)}, {prop: "advance", name: "advance", pkg: "vendor/golang.org/x/text/secure/bidirule", typ: $funcType([sliceType], [$Int, $Bool], false)}, {prop: "advanceString", name: "advanceString", pkg: "vendor/golang.org/x/text/secure/bidirule", typ: $funcType([$String], [$Int, $Bool], false)}]; - ruleTransition.init("vendor/golang.org/x/text/secure/bidirule", [{prop: "next", name: "next", embedded: false, exported: false, typ: ruleState, tag: ""}, {prop: "mask", name: "mask", embedded: false, exported: false, typ: $Uint16, tag: ""}]); - Transformer.init("vendor/golang.org/x/text/secure/bidirule", [{prop: "state", name: "state", embedded: false, exported: false, typ: ruleState, tag: ""}, {prop: "hasRTL", name: "hasRTL", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "seen", name: "seen", embedded: false, exported: false, typ: $Uint16, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = transform.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bidi.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - asciiTable = arrayType.zero(); - $pkg.ErrInvalid = errors.New("bidirule: failed Bidi Rule"); - transitions = $toNativeArray($kindArray, [$toNativeArray($kindStruct, [new ruleTransition.ptr(2, 1), new ruleTransition.ptr(4, 8194)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(2, 5), new ruleTransition.ptr(1, 7256)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(2, 4101), new ruleTransition.ptr(1, 3160)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(4, 8230), new ruleTransition.ptr(3, 7256)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(4, 12326), new ruleTransition.ptr(3, 3160)]), $toNativeArray($kindStruct, [new ruleTransition.ptr(5, 0), new ruleTransition.ptr(5, 0)])]); - init(); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/text/unicode/norm"] = (function() { - var $pkg = {}, $init, binary, fmt, io, sync, utf8, transform, valueRange, sparseBlocks, nfcTrie, nfkcTrie, normWriter, normReader, Form, Iter, iterFunc, input, Properties, lookupFunc, formInfo, qcInfo, ssState, streamSafe, reorderBuffer, insertErr, sliceType, sliceType$1, sliceType$2, ptrType, sliceType$3, arrayType, arrayType$1, sliceType$4, ptrType$1, arrayType$2, sliceType$5, arrayType$3, sliceType$6, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, funcType, nfcSparse, nfkcSparse, nfcData, nfkcData, errs, ccc, decomps, nfcValues, nfcIndex, nfcSparseOffset, nfcSparseValues, nfkcValues, nfkcIndex, nfkcSparseOffset, nfkcSparseValues, recompMap, recompMapOnce, formTable, flushTransform, newNfcTrie, newNfkcTrie, cmpNormalBytes, patchTail, appendQuick, doAppend, doAppendInner, lastBoundary, decomposeSegment, lastRuneStart, decomposeToLastBoundary, nextASCIIBytes, nextASCIIString, nextHangul, nextDone, nextMulti, nextMultiNorm, nextDecomposed, doNormDecomposed, nextCGJDecompose, nextComposed, doNormComposed, nextCGJCompose, inputBytes, inputString, buildRecompMap, combine, lookupInfoNFC, lookupInfoNFKC, compInfo, appendFlush, isHangul, isHangulString, isJamoVT, decomposeHangul; - binary = $packages["encoding/binary"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - sync = $packages["sync"]; - utf8 = $packages["unicode/utf8"]; - transform = $packages["vendor/golang.org/x/text/transform"]; - valueRange = $pkg.valueRange = $newType(0, $kindStruct, "norm.valueRange", true, "vendor/golang.org/x/text/unicode/norm", false, function(value_, lo_, hi_) { - this.$val = this; - if (arguments.length === 0) { - this.value = 0; - this.lo = 0; - this.hi = 0; - return; - } - this.value = value_; - this.lo = lo_; - this.hi = hi_; - }); - sparseBlocks = $pkg.sparseBlocks = $newType(0, $kindStruct, "norm.sparseBlocks", true, "vendor/golang.org/x/text/unicode/norm", false, function(values_, offset_) { - this.$val = this; - if (arguments.length === 0) { - this.values = sliceType$2.nil; - this.offset = sliceType$1.nil; - return; - } - this.values = values_; - this.offset = offset_; - }); - nfcTrie = $pkg.nfcTrie = $newType(0, $kindStruct, "norm.nfcTrie", true, "vendor/golang.org/x/text/unicode/norm", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - nfkcTrie = $pkg.nfkcTrie = $newType(0, $kindStruct, "norm.nfkcTrie", true, "vendor/golang.org/x/text/unicode/norm", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - normWriter = $pkg.normWriter = $newType(0, $kindStruct, "norm.normWriter", true, "vendor/golang.org/x/text/unicode/norm", false, function(rb_, w_, buf_) { - this.$val = this; - if (arguments.length === 0) { - this.rb = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - this.w = $ifaceNil; - this.buf = sliceType$4.nil; - return; - } - this.rb = rb_; - this.w = w_; - this.buf = buf_; - }); - normReader = $pkg.normReader = $newType(0, $kindStruct, "norm.normReader", true, "vendor/golang.org/x/text/unicode/norm", false, function(rb_, r_, inbuf_, outbuf_, bufStart_, lastBoundary_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.rb = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - this.r = $ifaceNil; - this.inbuf = sliceType$4.nil; - this.outbuf = sliceType$4.nil; - this.bufStart = 0; - this.lastBoundary = 0; - this.err = $ifaceNil; - return; - } - this.rb = rb_; - this.r = r_; - this.inbuf = inbuf_; - this.outbuf = outbuf_; - this.bufStart = bufStart_; - this.lastBoundary = lastBoundary_; - this.err = err_; - }); - Form = $pkg.Form = $newType(4, $kindInt, "norm.Form", true, "vendor/golang.org/x/text/unicode/norm", true, null); - Iter = $pkg.Iter = $newType(0, $kindStruct, "norm.Iter", true, "vendor/golang.org/x/text/unicode/norm", true, function(rb_, buf_, info_, next_, asciiF_, p_, multiSeg_) { - this.$val = this; - if (arguments.length === 0) { - this.rb = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - this.buf = arrayType$1.zero(); - this.info = new Properties.ptr(0, 0, 0, 0, 0, 0, 0); - this.next = $throwNilPointerError; - this.asciiF = $throwNilPointerError; - this.p = 0; - this.multiSeg = sliceType$4.nil; - return; - } - this.rb = rb_; - this.buf = buf_; - this.info = info_; - this.next = next_; - this.asciiF = asciiF_; - this.p = p_; - this.multiSeg = multiSeg_; - }); - iterFunc = $pkg.iterFunc = $newType(4, $kindFunc, "norm.iterFunc", true, "vendor/golang.org/x/text/unicode/norm", false, null); - input = $pkg.input = $newType(0, $kindStruct, "norm.input", true, "vendor/golang.org/x/text/unicode/norm", false, function(str_, bytes_) { - this.$val = this; - if (arguments.length === 0) { - this.str = ""; - this.bytes = sliceType$4.nil; - return; - } - this.str = str_; - this.bytes = bytes_; - }); - Properties = $pkg.Properties = $newType(0, $kindStruct, "norm.Properties", true, "vendor/golang.org/x/text/unicode/norm", true, function(pos_, size_, ccc_, tccc_, nLead_, flags_, index_) { - this.$val = this; - if (arguments.length === 0) { - this.pos = 0; - this.size = 0; - this.ccc = 0; - this.tccc = 0; - this.nLead = 0; - this.flags = 0; - this.index = 0; - return; - } - this.pos = pos_; - this.size = size_; - this.ccc = ccc_; - this.tccc = tccc_; - this.nLead = nLead_; - this.flags = flags_; - this.index = index_; - }); - lookupFunc = $pkg.lookupFunc = $newType(4, $kindFunc, "norm.lookupFunc", true, "vendor/golang.org/x/text/unicode/norm", false, null); - formInfo = $pkg.formInfo = $newType(0, $kindStruct, "norm.formInfo", true, "vendor/golang.org/x/text/unicode/norm", false, function(form_, composing_, compatibility_, info_, nextMain_) { - this.$val = this; - if (arguments.length === 0) { - this.form = 0; - this.composing = false; - this.compatibility = false; - this.info = $throwNilPointerError; - this.nextMain = $throwNilPointerError; - return; - } - this.form = form_; - this.composing = composing_; - this.compatibility = compatibility_; - this.info = info_; - this.nextMain = nextMain_; - }); - qcInfo = $pkg.qcInfo = $newType(1, $kindUint8, "norm.qcInfo", true, "vendor/golang.org/x/text/unicode/norm", false, null); - ssState = $pkg.ssState = $newType(4, $kindInt, "norm.ssState", true, "vendor/golang.org/x/text/unicode/norm", false, null); - streamSafe = $pkg.streamSafe = $newType(1, $kindUint8, "norm.streamSafe", true, "vendor/golang.org/x/text/unicode/norm", false, null); - reorderBuffer = $pkg.reorderBuffer = $newType(0, $kindStruct, "norm.reorderBuffer", true, "vendor/golang.org/x/text/unicode/norm", false, function(rune_, byte$1_, nbyte_, ss_, nrune_, f_, src_, nsrc_, tmpBytes_, out_, flushF_) { - this.$val = this; - if (arguments.length === 0) { - this.rune = arrayType.zero(); - this.byte$1 = arrayType$1.zero(); - this.nbyte = 0; - this.ss = 0; - this.nrune = 0; - this.f = new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError); - this.src = new input.ptr("", sliceType$4.nil); - this.nsrc = 0; - this.tmpBytes = new input.ptr("", sliceType$4.nil); - this.out = sliceType$4.nil; - this.flushF = $throwNilPointerError; - return; - } - this.rune = rune_; - this.byte$1 = byte$1_; - this.nbyte = nbyte_; - this.ss = ss_; - this.nrune = nrune_; - this.f = f_; - this.src = src_; - this.nsrc = nsrc_; - this.tmpBytes = tmpBytes_; - this.out = out_; - this.flushF = flushF_; - }); - insertErr = $pkg.insertErr = $newType(4, $kindInt, "norm.insertErr", true, "vendor/golang.org/x/text/unicode/norm", false, null); - sliceType = $sliceType($error); - sliceType$1 = $sliceType($Uint16); - sliceType$2 = $sliceType(valueRange); - ptrType = $ptrType(formInfo); - sliceType$3 = $sliceType(ptrType); - arrayType = $arrayType(Properties, 32); - arrayType$1 = $arrayType($Uint8, 128); - sliceType$4 = $sliceType($Uint8); - ptrType$1 = $ptrType(streamSafe); - arrayType$2 = $arrayType(Properties, 31); - sliceType$5 = $sliceType($emptyInterface); - arrayType$3 = $arrayType($Uint8, 8); - sliceType$6 = $sliceType(Properties); - ptrType$2 = $ptrType(sparseBlocks); - ptrType$3 = $ptrType(nfcTrie); - ptrType$4 = $ptrType(nfkcTrie); - ptrType$5 = $ptrType(normWriter); - ptrType$6 = $ptrType(normReader); - ptrType$7 = $ptrType(Iter); - ptrType$8 = $ptrType(input); - ptrType$9 = $ptrType(reorderBuffer); - funcType = $funcType([ptrType$9], [$Bool], false); - sparseBlocks.ptr.prototype.lookup = function(n, b) { - var _q, b, header, hi, lo, m, n, offset, r, t, x, x$1, x$2; - t = this; - offset = (x = t.offset, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])); - header = $clone((x$1 = t.values, ((offset < 0 || offset >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + offset])), valueRange); - lo = offset + 1 << 16 >>> 16; - hi = lo + ((header.lo << 16 >>> 16)) << 16 >>> 16; - while (true) { - if (!(lo < hi)) { break; } - m = lo + (_q = ((hi - lo << 16 >>> 16)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) << 16 >>> 16; - r = $clone((x$2 = t.values, ((m < 0 || m >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + m])), valueRange); - if (r.lo <= b && b <= r.hi) { - return r.value + ((((b - r.lo << 24 >>> 24) << 16 >>> 16)) * header.value << 16 >>> 16) << 16 >>> 16; - } - if (b < r.lo) { - hi = m; - } else { - lo = m + 1 << 16 >>> 16; - } - } - return 0; - }; - sparseBlocks.prototype.lookup = function(n, b) { return this.$val.lookup(n, b); }; - Form.prototype.Reset = function() { - }; - $ptrType(Form).prototype.Reset = function() { return new Form(this.$get()).Reset(); }; - Form.prototype.Transform = function(dst, src, atEOF) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, atEOF, b, dst, eof, err, f, i, n, nDst, nSrc, ns, ok, src, $s, $r, $c} = $restore(this, {dst, src, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nDst = 0; - nSrc = 0; - err = $ifaceNil; - f = this.$val; - b = src; - eof = atEOF; - ns = dst.$length; - if (ns < b.$length) { - err = transform.ErrShortDst; - eof = false; - b = $subslice(b, 0, ns); - } - _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputBytes(b), input), 0, b.$length, eof); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - i = _tuple[0]; - ok = _tuple[1]; - n = $copySlice(dst, $subslice(b, 0, i)); - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$1 = new Form(f).transform($subslice(dst, n), $subslice(src, n), atEOF); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - nDst = _tuple$1[0]; - nSrc = _tuple$1[1]; - err = _tuple$1[2]; - _tmp = nDst + n >> 0; - _tmp$1 = nSrc + n >> 0; - _tmp$2 = err; - nDst = _tmp; - nSrc = _tmp$1; - err = _tmp$2; - $s = -1; return [nDst, nSrc, err]; - /* } */ case 3: - if ($interfaceIsEqual(err, $ifaceNil) && n < src.$length && !atEOF) { - err = transform.ErrShortSrc; - } - _tmp$3 = n; - _tmp$4 = n; - _tmp$5 = err; - nDst = _tmp$3; - nSrc = _tmp$4; - err = _tmp$5; - $s = -1; return [nDst, nSrc, err]; - /* */ } return; } var $f = {$blk: Form.prototype.Transform, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, atEOF, b, dst, eof, err, f, i, n, nDst, nSrc, ns, ok, src, $s};return $f; - }; - $ptrType(Form).prototype.Transform = function(dst, src, atEOF) { return new Form(this.$get()).Transform(dst, src, atEOF); }; - flushTransform = function(rb) { - var rb; - if (rb.out.$length < ($imul(rb.nrune, 4))) { - return false; - } - rb.out = $subslice(rb.out, rb.flushCopy(rb.out)); - return true; - }; - Form.prototype.transform = function(dst, src, atEOF) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, atEOF, dst, end, eof, err, f, n, n$1, nDst, nSrc, ok, rb, src, x, $s, $r, $c} = $restore(this, {dst, src, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = [rb]; - nDst = 0; - nSrc = 0; - err = $ifaceNil; - f = this.$val; - rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - rb[0].init(f, src); - /* while (true) { */ case 1: - rb[0].setFlusher($subslice(dst, nDst), flushTransform); - _r = decomposeSegment(rb[0], nSrc, atEOF); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - end = _r; - if (end < 0) { - _tmp = nDst; - _tmp$1 = nSrc; - _tmp$2 = (x = -end, ((x < 0 || x >= errs.$length) ? ($throwRuntimeError("index out of range"), undefined) : errs.$array[errs.$offset + x])); - nDst = _tmp; - nSrc = _tmp$1; - err = _tmp$2; - $s = -1; return [nDst, nSrc, err]; - } - nDst = dst.$length - rb[0].out.$length >> 0; - nSrc = end; - end = rb[0].nsrc; - eof = atEOF; - n = (nSrc + dst.$length >> 0) - nDst >> 0; - if (n < end) { - err = transform.ErrShortDst; - end = n; - eof = false; - } - _r$1 = rb[0].f.quickSpan($clone(rb[0].src, input), nSrc, end, eof); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - end = _tuple[0]; - ok = _tuple[1]; - n$1 = $copySlice($subslice(dst, nDst), $subslice(rb[0].src.bytes, nSrc, end)); - nSrc = nSrc + (n$1) >> 0; - nDst = nDst + (n$1) >> 0; - if (ok) { - if ($interfaceIsEqual(err, $ifaceNil) && n$1 < rb[0].nsrc && !atEOF) { - err = transform.ErrShortSrc; - } - _tmp$3 = nDst; - _tmp$4 = nSrc; - _tmp$5 = err; - nDst = _tmp$3; - nSrc = _tmp$4; - err = _tmp$5; - $s = -1; return [nDst, nSrc, err]; - } - $s = 1; continue; - case 2: - $s = -1; return [nDst, nSrc, err]; - /* */ } return; } var $f = {$blk: Form.prototype.transform, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, atEOF, dst, end, eof, err, f, n, n$1, nDst, nSrc, ok, rb, src, x, $s};return $f; - }; - $ptrType(Form).prototype.transform = function(dst, src, atEOF) { return new Form(this.$get()).transform(dst, src, atEOF); }; - nfcTrie.ptr.prototype.lookup = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; - v = 0; - sz = 0; - t = this; - c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); - if (c0 < 128) { - _tmp = ((c0 < 0 || c0 >= nfcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcValues[c0]); - _tmp$1 = 1; - v = _tmp; - sz = _tmp$1; - return [v, sz]; - } else if (c0 < 194) { - _tmp$2 = 0; - _tmp$3 = 1; - v = _tmp$2; - sz = _tmp$3; - return [v, sz]; - } else if (c0 < 224) { - if (s.$length < 2) { - _tmp$4 = 0; - _tmp$5 = 0; - v = _tmp$4; - sz = _tmp$5; - return [v, sz]; - } - i = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); - c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = 0; - _tmp$7 = 1; - v = _tmp$6; - sz = _tmp$7; - return [v, sz]; - } - _tmp$8 = t.lookupValue(((i >>> 0)), c1); - _tmp$9 = 2; - v = _tmp$8; - sz = _tmp$9; - return [v, sz]; - } else if (c0 < 240) { - if (s.$length < 3) { - _tmp$10 = 0; - _tmp$11 = 0; - v = _tmp$10; - sz = _tmp$11; - return [v, sz]; - } - i$1 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); - c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = 0; - _tmp$13 = 1; - v = _tmp$12; - sz = _tmp$13; - return [v, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o]); - c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = 0; - _tmp$15 = 2; - v = _tmp$14; - sz = _tmp$15; - return [v, sz]; - } - _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); - _tmp$17 = 3; - v = _tmp$16; - sz = _tmp$17; - return [v, sz]; - } else if (c0 < 248) { - if (s.$length < 4) { - _tmp$18 = 0; - _tmp$19 = 0; - v = _tmp$18; - sz = _tmp$19; - return [v, sz]; - } - i$2 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); - c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = 0; - _tmp$21 = 1; - v = _tmp$20; - sz = _tmp$21; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); - c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = 0; - _tmp$23 = 2; - v = _tmp$22; - sz = _tmp$23; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); - c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = 0; - _tmp$25 = 3; - v = _tmp$24; - sz = _tmp$25; - return [v, sz]; - } - _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); - _tmp$27 = 4; - v = _tmp$26; - sz = _tmp$27; - return [v, sz]; - } - _tmp$28 = 0; - _tmp$29 = 1; - v = _tmp$28; - sz = _tmp$29; - return [v, sz]; - }; - nfcTrie.prototype.lookup = function(s) { return this.$val.lookup(s); }; - nfcTrie.ptr.prototype.lookupString = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; - v = 0; - sz = 0; - t = this; - c0 = s.charCodeAt(0); - if (c0 < 128) { - _tmp = ((c0 < 0 || c0 >= nfcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcValues[c0]); - _tmp$1 = 1; - v = _tmp; - sz = _tmp$1; - return [v, sz]; - } else if (c0 < 194) { - _tmp$2 = 0; - _tmp$3 = 1; - v = _tmp$2; - sz = _tmp$3; - return [v, sz]; - } else if (c0 < 224) { - if (s.length < 2) { - _tmp$4 = 0; - _tmp$5 = 0; - v = _tmp$4; - sz = _tmp$5; - return [v, sz]; - } - i = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); - c1 = s.charCodeAt(1); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = 0; - _tmp$7 = 1; - v = _tmp$6; - sz = _tmp$7; - return [v, sz]; - } - _tmp$8 = t.lookupValue(((i >>> 0)), c1); - _tmp$9 = 2; - v = _tmp$8; - sz = _tmp$9; - return [v, sz]; - } else if (c0 < 240) { - if (s.length < 3) { - _tmp$10 = 0; - _tmp$11 = 0; - v = _tmp$10; - sz = _tmp$11; - return [v, sz]; - } - i$1 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); - c1$1 = s.charCodeAt(1); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = 0; - _tmp$13 = 1; - v = _tmp$12; - sz = _tmp$13; - return [v, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o]); - c2 = s.charCodeAt(2); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = 0; - _tmp$15 = 2; - v = _tmp$14; - sz = _tmp$15; - return [v, sz]; - } - _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); - _tmp$17 = 3; - v = _tmp$16; - sz = _tmp$17; - return [v, sz]; - } else if (c0 < 248) { - if (s.length < 4) { - _tmp$18 = 0; - _tmp$19 = 0; - v = _tmp$18; - sz = _tmp$19; - return [v, sz]; - } - i$2 = ((c0 < 0 || c0 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[c0]); - c1$2 = s.charCodeAt(1); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = 0; - _tmp$21 = 1; - v = _tmp$20; - sz = _tmp$21; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); - c2$1 = s.charCodeAt(2); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = 0; - _tmp$23 = 2; - v = _tmp$22; - sz = _tmp$23; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcIndex[o$1]); - c3 = s.charCodeAt(3); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = 0; - _tmp$25 = 3; - v = _tmp$24; - sz = _tmp$25; - return [v, sz]; - } - _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); - _tmp$27 = 4; - v = _tmp$26; - sz = _tmp$27; - return [v, sz]; - } - _tmp$28 = 0; - _tmp$29 = 1; - v = _tmp$28; - sz = _tmp$29; - return [v, sz]; - }; - nfcTrie.prototype.lookupString = function(s) { return this.$val.lookupString(s); }; - newNfcTrie = function(i) { - var i; - return new nfcTrie.ptr(); - }; - nfcTrie.ptr.prototype.lookupValue = function(n, b) { - var b, n, t, x; - t = this; - if (n < 46) { - return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= nfcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfcValues[x]))); - } else { - n = n - (46) >>> 0; - return (nfcSparse.lookup(n, b)); - } - }; - nfcTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; - nfkcTrie.ptr.prototype.lookup = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; - v = 0; - sz = 0; - t = this; - c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); - if (c0 < 128) { - _tmp = ((c0 < 0 || c0 >= nfkcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcValues[c0]); - _tmp$1 = 1; - v = _tmp; - sz = _tmp$1; - return [v, sz]; - } else if (c0 < 194) { - _tmp$2 = 0; - _tmp$3 = 1; - v = _tmp$2; - sz = _tmp$3; - return [v, sz]; - } else if (c0 < 224) { - if (s.$length < 2) { - _tmp$4 = 0; - _tmp$5 = 0; - v = _tmp$4; - sz = _tmp$5; - return [v, sz]; - } - i = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); - c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = 0; - _tmp$7 = 1; - v = _tmp$6; - sz = _tmp$7; - return [v, sz]; - } - _tmp$8 = t.lookupValue(((i >>> 0)), c1); - _tmp$9 = 2; - v = _tmp$8; - sz = _tmp$9; - return [v, sz]; - } else if (c0 < 240) { - if (s.$length < 3) { - _tmp$10 = 0; - _tmp$11 = 0; - v = _tmp$10; - sz = _tmp$11; - return [v, sz]; - } - i$1 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); - c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = 0; - _tmp$13 = 1; - v = _tmp$12; - sz = _tmp$13; - return [v, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o]); - c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = 0; - _tmp$15 = 2; - v = _tmp$14; - sz = _tmp$15; - return [v, sz]; - } - _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); - _tmp$17 = 3; - v = _tmp$16; - sz = _tmp$17; - return [v, sz]; - } else if (c0 < 248) { - if (s.$length < 4) { - _tmp$18 = 0; - _tmp$19 = 0; - v = _tmp$18; - sz = _tmp$19; - return [v, sz]; - } - i$2 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); - c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = 0; - _tmp$21 = 1; - v = _tmp$20; - sz = _tmp$21; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); - c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = 0; - _tmp$23 = 2; - v = _tmp$22; - sz = _tmp$23; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); - c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = 0; - _tmp$25 = 3; - v = _tmp$24; - sz = _tmp$25; - return [v, sz]; - } - _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); - _tmp$27 = 4; - v = _tmp$26; - sz = _tmp$27; - return [v, sz]; - } - _tmp$28 = 0; - _tmp$29 = 1; - v = _tmp$28; - sz = _tmp$29; - return [v, sz]; - }; - nfkcTrie.prototype.lookup = function(s) { return this.$val.lookup(s); }; - nfkcTrie.ptr.prototype.lookupString = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; - v = 0; - sz = 0; - t = this; - c0 = s.charCodeAt(0); - if (c0 < 128) { - _tmp = ((c0 < 0 || c0 >= nfkcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcValues[c0]); - _tmp$1 = 1; - v = _tmp; - sz = _tmp$1; - return [v, sz]; - } else if (c0 < 194) { - _tmp$2 = 0; - _tmp$3 = 1; - v = _tmp$2; - sz = _tmp$3; - return [v, sz]; - } else if (c0 < 224) { - if (s.length < 2) { - _tmp$4 = 0; - _tmp$5 = 0; - v = _tmp$4; - sz = _tmp$5; - return [v, sz]; - } - i = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); - c1 = s.charCodeAt(1); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = 0; - _tmp$7 = 1; - v = _tmp$6; - sz = _tmp$7; - return [v, sz]; - } - _tmp$8 = t.lookupValue(((i >>> 0)), c1); - _tmp$9 = 2; - v = _tmp$8; - sz = _tmp$9; - return [v, sz]; - } else if (c0 < 240) { - if (s.length < 3) { - _tmp$10 = 0; - _tmp$11 = 0; - v = _tmp$10; - sz = _tmp$11; - return [v, sz]; - } - i$1 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); - c1$1 = s.charCodeAt(1); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = 0; - _tmp$13 = 1; - v = _tmp$12; - sz = _tmp$13; - return [v, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o]); - c2 = s.charCodeAt(2); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = 0; - _tmp$15 = 2; - v = _tmp$14; - sz = _tmp$15; - return [v, sz]; - } - _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); - _tmp$17 = 3; - v = _tmp$16; - sz = _tmp$17; - return [v, sz]; - } else if (c0 < 248) { - if (s.length < 4) { - _tmp$18 = 0; - _tmp$19 = 0; - v = _tmp$18; - sz = _tmp$19; - return [v, sz]; - } - i$2 = ((c0 < 0 || c0 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[c0]); - c1$2 = s.charCodeAt(1); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = 0; - _tmp$21 = 1; - v = _tmp$20; - sz = _tmp$21; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); - c2$1 = s.charCodeAt(2); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = 0; - _tmp$23 = 2; - v = _tmp$22; - sz = _tmp$23; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= nfkcIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcIndex[o$1]); - c3 = s.charCodeAt(3); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = 0; - _tmp$25 = 3; - v = _tmp$24; - sz = _tmp$25; - return [v, sz]; - } - _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); - _tmp$27 = 4; - v = _tmp$26; - sz = _tmp$27; - return [v, sz]; - } - _tmp$28 = 0; - _tmp$29 = 1; - v = _tmp$28; - sz = _tmp$29; - return [v, sz]; - }; - nfkcTrie.prototype.lookupString = function(s) { return this.$val.lookupString(s); }; - newNfkcTrie = function(i) { - var i; - return new nfkcTrie.ptr(); - }; - nfkcTrie.ptr.prototype.lookupValue = function(n, b) { - var b, n, t, x; - t = this; - if (n < 92) { - return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= nfkcValues.length) ? ($throwRuntimeError("index out of range"), undefined) : nfkcValues[x]))); - } else { - n = n - (92) >>> 0; - return (nfkcSparse.lookup(n, b)); - } - }; - nfkcTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; - normWriter.ptr.prototype.Write = function(data) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, bn, data, err, i, m, n, w, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - /* while (true) { */ case 1: - /* if (!(data.$length > 0)) { break; } */ if(!(data.$length > 0)) { $s = 2; continue; } - m = data.$length; - if (m > 4000) { - m = 4000; - } - input.copy(w.rb.src, inputBytes($subslice(data, 0, m))); - w.rb.nsrc = m; - _r = doAppend(w.rb, w.buf, 0); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - w.buf = _r; - data = $subslice(data, m); - n = n + (m) >> 0; - _r$1 = lastBoundary(w.rb.f, w.buf); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - i = _r$1; - if (i === -1) { - i = 0; - } - /* */ if (i > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (i > 0) { */ case 5: - _r$2 = w.w.Write($subslice(w.buf, 0, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 2; continue; - } - bn = $copySlice(w.buf, $subslice(w.buf, i)); - w.buf = $subslice(w.buf, 0, bn); - /* } */ case 6: - $s = 1; continue; - case 2: - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: normWriter.ptr.prototype.Write, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, bn, data, err, i, m, n, w, $s};return $f; - }; - normWriter.prototype.Write = function(data) { return this.$val.Write(data); }; - normWriter.ptr.prototype.Close = function() { - var {_r, _tuple, err, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - /* */ if (w.buf.$length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (w.buf.$length > 0) { */ case 1: - _r = w.w.Write(w.buf); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: normWriter.ptr.prototype.Close, $c: true, $r, _r, _tuple, err, w, $s};return $f; - }; - normWriter.prototype.Close = function() { return this.$val.Close(); }; - Form.prototype.Writer = function(w) { - var f, w, wr; - f = this.$val; - wr = new normWriter.ptr(new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError), w, sliceType$4.nil); - wr.rb.init(f, sliceType$4.nil); - return wr; - }; - $ptrType(Form).prototype.Writer = function(w) { return new Form(this.$get()).Writer(w); }; - normReader.ptr.prototype.Read = function(p) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tuple, err, n, n$1, outn, p, r, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* while (true) { */ case 1: - if ((r.lastBoundary - r.bufStart >> 0) > 0) { - n = $copySlice(p, $subslice(r.outbuf, r.bufStart, r.lastBoundary)); - r.bufStart = r.bufStart + (n) >> 0; - if ((r.lastBoundary - r.bufStart >> 0) > 0) { - $s = -1; return [n, $ifaceNil]; - } - $s = -1; return [n, r.err]; - } - if (!($interfaceIsEqual(r.err, $ifaceNil))) { - $s = -1; return [0, r.err]; - } - outn = $copySlice(r.outbuf, $subslice(r.outbuf, r.lastBoundary)); - r.outbuf = $subslice(r.outbuf, 0, outn); - r.bufStart = 0; - _r = r.r.Read(r.inbuf); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n$1 = _tuple[0]; - err = _tuple[1]; - input.copy(r.rb.src, inputBytes($subslice(r.inbuf, 0, n$1))); - _tmp = n$1; - _tmp$1 = err; - r.rb.nsrc = _tmp; - r.err = _tmp$1; - /* */ if (n$1 > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (n$1 > 0) { */ case 4: - _r$1 = doAppend(r.rb, r.outbuf, 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - r.outbuf = _r$1; - /* } */ case 5: - /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($interfaceIsEqual(err, io.EOF)) { */ case 7: - r.lastBoundary = r.outbuf.$length; - $s = 9; continue; - /* } else { */ case 8: - _r$2 = lastBoundary(r.rb.f, r.outbuf); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - r.lastBoundary = _r$2; - if (r.lastBoundary === -1) { - r.lastBoundary = 0; - } - /* } */ case 9: - $s = 1; continue; - case 2: - $s = -1; return [0, $ifaceNil]; - /* */ } return; } var $f = {$blk: normReader.ptr.prototype.Read, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tuple, err, n, n$1, outn, p, r, $s};return $f; - }; - normReader.prototype.Read = function(p) { return this.$val.Read(p); }; - Form.prototype.Reader = function(r) { - var buf, f, r, rr; - f = this.$val; - buf = $makeSlice(sliceType$4, 4000); - rr = new normReader.ptr(new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, new formInfo.ptr(0, false, false, $throwNilPointerError, $throwNilPointerError), new input.ptr("", sliceType$4.nil), 0, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError), r, buf, sliceType$4.nil, 0, 0, $ifaceNil); - rr.rb.init(f, buf); - return rr; - }; - $ptrType(Form).prototype.Reader = function(r) { return new Form(this.$get()).Reader(r); }; - Form.prototype.Bytes = function(b) { - var {$24r, _r, _r$1, _tuple, b, f, ft, n, ok, out, rb, src, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = [rb]; - f = this.$val; - src = $clone(inputBytes(b), input); - ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - _r = ft.quickSpan($clone(src, input), 0, b.$length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return b; - } - out = $makeSlice(sliceType$4, n, b.$length); - $copySlice(out, $subslice(b, 0, n)); - rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), b.$length, new input.ptr("", sliceType$4.nil), out, appendFlush); - _r$1 = doAppendInner(rb[0], n); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.Bytes, $c: true, $r, $24r, _r, _r$1, _tuple, b, f, ft, n, ok, out, rb, src, $s};return $f; - }; - $ptrType(Form).prototype.Bytes = function(b) { return new Form(this.$get()).Bytes(b); }; - Form.prototype.String = function(s) { - var {$24r, _r, _r$1, _tuple, f, ft, n, ok, out, rb, s, src, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = [rb]; - f = this.$val; - src = $clone(inputString(s), input); - ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - _r = ft.quickSpan($clone(src, input), 0, s.length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return s; - } - out = $makeSlice(sliceType$4, n, s.length); - $copyString(out, $substring(s, 0, n)); - rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), s.length, new input.ptr("", sliceType$4.nil), out, appendFlush); - _r$1 = doAppendInner(rb[0], n); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = ($bytesToString(_r$1)); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.String, $c: true, $r, $24r, _r, _r$1, _tuple, f, ft, n, ok, out, rb, s, src, $s};return $f; - }; - $ptrType(Form).prototype.String = function(s) { return new Form(this.$get()).String(s); }; - Form.prototype.IsNormal = function(b) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, b, bp, f, ft, ok, rb, src, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = [rb]; - f = this.$val; - src = $clone(inputBytes(b), input); - ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - _r = ft.quickSpan($clone(src, input), 0, b.$length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - bp = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return true; - } - rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), b.$length, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - rb[0].setFlusher(sliceType$4.nil, cmpNormalBytes); - /* while (true) { */ case 2: - /* if (!(bp < b.$length)) { break; } */ if(!(bp < b.$length)) { $s = 3; continue; } - rb[0].out = $subslice(b, bp); - _r$1 = decomposeSegment(rb[0], bp, true); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - bp = _r$1; - if (bp < 0) { - $s = -1; return false; - } - _r$2 = rb[0].f.quickSpan($clone(rb[0].src, input), bp, b.$length, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - bp = _tuple$1[0]; - $s = 2; continue; - case 3: - $s = -1; return true; - /* */ } return; } var $f = {$blk: Form.prototype.IsNormal, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, b, bp, f, ft, ok, rb, src, $s};return $f; - }; - $ptrType(Form).prototype.IsNormal = function(b) { return new Form(this.$get()).IsNormal(b); }; - cmpNormalBytes = function(rb) { - var b, i, info, p, pe, rb, x, x$1; - b = rb.out; - i = 0; - while (true) { - if (!(i < rb.nrune)) { break; } - info = $clone((x = rb.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), Properties); - if (((info.size >> 0)) > b.$length) { - return false; - } - p = info.pos; - pe = p + info.size << 24 >>> 24; - while (true) { - if (!(p < pe)) { break; } - if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === (x$1 = rb.byte$1, ((p < 0 || p >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[p]))))) { - return false; - } - b = $subslice(b, 1); - p = p + (1) << 24 >>> 24; - } - i = i + (1) >> 0; - } - return true; - }; - Form.prototype.IsNormalString = function(s) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, bp, f, ft, ok, rb, s, src, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bp = [bp]; - rb = [rb]; - s = [s]; - f = this.$val; - src = $clone(inputString(s[0]), input); - ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - _r = ft.quickSpan($clone(src, input), 0, s[0].length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - bp[0] = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return true; - } - rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), s[0].length, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - rb[0].setFlusher(sliceType$4.nil, (function(bp, rb, s) { return function(rb$1) { - var i, info, p, pe, rb$1, x, x$1; - i = 0; - while (true) { - if (!(i < rb$1.nrune)) { break; } - info = $clone((x = rb$1.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), Properties); - if ((bp[0] + ((info.size >> 0)) >> 0) > s[0].length) { - return false; - } - p = info.pos; - pe = p + info.size << 24 >>> 24; - while (true) { - if (!(p < pe)) { break; } - if (!((s[0].charCodeAt(bp[0]) === (x$1 = rb$1.byte$1, ((p < 0 || p >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[p]))))) { - return false; - } - bp[0] = bp[0] + (1) >> 0; - p = p + (1) << 24 >>> 24; - } - i = i + (1) >> 0; - } - return true; - }; })(bp, rb, s)); - /* while (true) { */ case 2: - /* if (!(bp[0] < s[0].length)) { break; } */ if(!(bp[0] < s[0].length)) { $s = 3; continue; } - _r$1 = decomposeSegment(rb[0], bp[0], true); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - bp[0] = _r$1; - if (bp[0] < 0) { - $s = -1; return false; - } - _r$2 = rb[0].f.quickSpan($clone(rb[0].src, input), bp[0], s[0].length, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - bp[0] = _tuple$1[0]; - $s = 2; continue; - case 3: - $s = -1; return true; - /* */ } return; } var $f = {$blk: Form.prototype.IsNormalString, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, bp, f, ft, ok, rb, s, src, $s};return $f; - }; - $ptrType(Form).prototype.IsNormalString = function(s) { return new Form(this.$get()).IsNormalString(s); }; - patchTail = function(rb) { - var {_r, _r$1, _r$2, _r$3, _tuple, buf, end, extra, info, p, rb, s, x, $s, $r, $c} = $restore(this, {rb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = lastRuneStart(rb.f, rb.out); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - info = $clone(_tuple[0], Properties); - p = _tuple[1]; - if ((p === -1) || (info.size === 0)) { - $s = -1; return true; - } - end = p + ((info.size >> 0)) >> 0; - extra = rb.out.$length - end >> 0; - /* */ if (extra > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (extra > 0) { */ case 2: - x = $makeSlice(sliceType$4, 0); - x = $appendSlice(x, $subslice(rb.out, (rb.out.$length - extra >> 0))); - rb.out = $subslice(rb.out, 0, end); - $r = decomposeToLastBoundary(rb); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = rb.doFlush(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - rb.out = $appendSlice(rb.out, x); - $s = -1; return false; - /* } */ case 3: - buf = $subslice(rb.out, p); - rb.out = $subslice(rb.out, 0, p); - $r = decomposeToLastBoundary(rb); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s = (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).next($clone(info, Properties)); - /* */ if (s === 1) { $s = 7; continue; } - /* */ if (s === 2) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (s === 1) { */ case 7: - _r$2 = rb.doFlush(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).first($clone(info, Properties)); - $s = 9; continue; - /* } else if (s === 2) { */ case 8: - _r$3 = rb.doFlush(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - rb.insertCGJ(); - rb.ss = 0; - /* } */ case 9: - $r = rb.insertUnsafe($clone(inputBytes(buf), input), 0, $clone(info, Properties)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* */ } return; } var $f = {$blk: patchTail, $c: true, $r, _r, _r$1, _r$2, _r$3, _tuple, buf, end, extra, info, p, rb, s, x, $s};return $f; - }; - appendQuick = function(rb, i) { - var {_r, _tuple, end, i, rb, $s, $r, $c} = $restore(this, {rb, i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (rb.nsrc === i) { - $s = -1; return i; - } - _r = rb.f.quickSpan($clone(rb.src, input), i, rb.nsrc, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - end = _tuple[0]; - rb.out = rb.src.appendSlice(rb.out, i, end); - $s = -1; return end; - /* */ } return; } var $f = {$blk: appendQuick, $c: true, $r, _r, _tuple, end, i, rb, $s};return $f; - }; - Form.prototype.Append = function(out, src) { - var {$24r, _r, f, out, src, $s, $r, $c} = $restore(this, {out, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = new Form(f).doAppend(out, $clone(inputBytes(src), input), src.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.Append, $c: true, $r, $24r, _r, f, out, src, $s};return $f; - }; - $ptrType(Form).prototype.Append = function(out, src) { return new Form(this.$get()).Append(out, src); }; - Form.prototype.doAppend = function(out, src, n) { - var {$24r, $24r$1, _r, _r$1, _r$2, _tuple, f, ft, n, out, p, rb, rb$1, src, $s, $r, $c} = $restore(this, {out, src, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = [rb]; - rb$1 = [rb$1]; - f = this.$val; - if (n === 0) { - $s = -1; return out; - } - ft = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - /* */ if (out.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (out.$length === 0) { */ case 1: - _r = ft.quickSpan($clone(src, input), 0, n, true); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - p = _tuple[0]; - out = src.appendSlice(out, 0, p); - if (p === n) { - $s = -1; return out; - } - rb[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), n, new input.ptr("", sliceType$4.nil), out, appendFlush); - _r$1 = doAppendInner(rb[0], p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 2: - rb$1[0] = new reorderBuffer.ptr(arrayType.zero(), arrayType$1.zero(), 0, 0, 0, $clone(ft, formInfo), $clone(src, input), n, new input.ptr("", sliceType$4.nil), sliceType$4.nil, $throwNilPointerError); - _r$2 = doAppend(rb$1[0], out, 0); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: Form.prototype.doAppend, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _tuple, f, ft, n, out, p, rb, rb$1, src, $s};return $f; - }; - $ptrType(Form).prototype.doAppend = function(out, src, n) { return new Form(this.$get()).doAppend(out, src, n); }; - doAppend = function(rb, out, p) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, doMerge, fd, info, n, out, p, q, rb, src, $s, $r, $c} = $restore(this, {rb, out, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb.setFlusher(out, appendFlush); - _tmp = $clone(rb.src, input); - _tmp$1 = rb.nsrc; - src = $clone(_tmp, input); - n = _tmp$1; - doMerge = out.$length > 0; - q = src.skipContinuationBytes(p); - /* */ if (q > p) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (q > p) { */ case 1: - rb.out = src.appendSlice(rb.out, p, q); - p = q; - _r = patchTail(rb); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - doMerge = _r; - /* } */ case 2: - fd = rb.f; - /* */ if (doMerge) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (doMerge) { */ case 4: - info = new Properties.ptr(0, 0, 0, 0, 0, 0, 0); - /* */ if (p < n) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (p < n) { */ case 6: - _r$1 = fd.info($clone(src, input), p); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Properties.copy(info, _r$1); - /* */ if (!$clone(info, Properties).BoundaryBefore() || $clone(info, Properties).nLeadingNonStarters() > 0) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!$clone(info, Properties).BoundaryBefore() || $clone(info, Properties).nLeadingNonStarters() > 0) { */ case 9: - /* */ if (p === 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (p === 0) { */ case 11: - $r = decomposeToLastBoundary(rb); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - _r$2 = decomposeSegment(rb, p, true); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - p = _r$2; - /* } */ case 10: - /* } */ case 7: - /* */ if (info.size === 0) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (info.size === 0) { */ case 15: - _r$3 = rb.doFlush(); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return src.appendSlice(rb.out, p, n); - /* } */ case 16: - /* */ if (rb.nrune > 0) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (rb.nrune > 0) { */ case 18: - _r$4 = doAppendInner(rb, p); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 21; case 21: return $24r; - /* } */ case 19: - /* } */ case 5: - _r$5 = appendQuick(rb, p); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - p = _r$5; - _r$6 = doAppendInner(rb, p); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 24; case 24: return $24r$1; - /* */ } return; } var $f = {$blk: doAppend, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, doMerge, fd, info, n, out, p, q, rb, src, $s};return $f; - }; - doAppendInner = function(rb, p) { - var {_r, _r$1, n, p, rb, $s, $r, $c} = $restore(this, {rb, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = rb.nsrc; - /* while (true) { */ case 1: - /* if (!(p < n)) { break; } */ if(!(p < n)) { $s = 2; continue; } - _r = decomposeSegment(rb, p, true); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - p = _r; - _r$1 = appendQuick(rb, p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - p = _r$1; - $s = 1; continue; - case 2: - $s = -1; return rb.out; - /* */ } return; } var $f = {$blk: doAppendInner, $c: true, $r, _r, _r$1, n, p, rb, $s};return $f; - }; - Form.prototype.AppendString = function(out, src) { - var {$24r, _r, f, out, src, $s, $r, $c} = $restore(this, {out, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = new Form(f).doAppend(out, $clone(inputString(src), input), src.length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.AppendString, $c: true, $r, $24r, _r, f, out, src, $s};return $f; - }; - $ptrType(Form).prototype.AppendString = function(out, src) { return new Form(this.$get()).AppendString(out, src); }; - Form.prototype.QuickSpan = function(b) { - var {_r, _tuple, b, f, n, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputBytes(b), input), 0, b.$length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - $s = -1; return n; - /* */ } return; } var $f = {$blk: Form.prototype.QuickSpan, $c: true, $r, _r, _tuple, b, f, n, $s};return $f; - }; - $ptrType(Form).prototype.QuickSpan = function(b) { return new Form(this.$get()).QuickSpan(b); }; - Form.prototype.Span = function(b, atEOF) { - var {_r, _tmp, _tmp$1, _tuple, atEOF, b, err, f, n, ok, $s, $r, $c} = $restore(this, {b, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this.$val; - _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputBytes(b), input), 0, b.$length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - ok = _tuple[1]; - if (n < b.$length) { - if (!ok) { - err = transform.ErrEndOfSpan; - } else { - err = transform.ErrShortSrc; - } - } - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Form.prototype.Span, $c: true, $r, _r, _tmp, _tmp$1, _tuple, atEOF, b, err, f, n, ok, $s};return $f; - }; - $ptrType(Form).prototype.Span = function(b, atEOF) { return new Form(this.$get()).Span(b, atEOF); }; - Form.prototype.SpanString = function(s, atEOF) { - var {_r, _tmp, _tmp$1, _tuple, atEOF, err, f, n, ok, s, $s, $r, $c} = $restore(this, {s, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - f = this.$val; - _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputString(s), input), 0, s.length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - ok = _tuple[1]; - if (n < s.length) { - if (!ok) { - err = transform.ErrEndOfSpan; - } else { - err = transform.ErrShortSrc; - } - } - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Form.prototype.SpanString, $c: true, $r, _r, _tmp, _tmp$1, _tuple, atEOF, err, f, n, ok, s, $s};return $f; - }; - $ptrType(Form).prototype.SpanString = function(s, atEOF) { return new Form(this.$get()).SpanString(s, atEOF); }; - formInfo.ptr.prototype.quickSpan = function(src, i, end, atEOF) { - var {_1, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, atEOF, end, f, i, info, j, lastCC, lastSegStart, n, ok, src, ss, ss$24ptr, $s, $r, $c} = $restore(this, {src, i, end, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - ok = false; - f = this; - lastCC = 0; - ss = 0; - lastSegStart = i; - n = end; - /* while (true) { */ case 1: - /* if (!(i < n)) { break; } */ if(!(i < n)) { $s = 2; continue; } - j = src.skipASCII(i, n); - if (!((i === j))) { - i = j; - lastSegStart = i - 1 >> 0; - lastCC = 0; - ss = 0; - /* continue; */ $s = 1; continue; - } - _r = f.info($clone(src, input), i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - if (info.size === 0) { - if (atEOF) { - _tmp = n; - _tmp$1 = true; - n = _tmp; - ok = _tmp$1; - $s = -1; return [n, ok]; - } - _tmp$2 = lastSegStart; - _tmp$3 = true; - n = _tmp$2; - ok = _tmp$3; - $s = -1; return [n, ok]; - } - _1 = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).next($clone(info, Properties)); - if (_1 === (1)) { - lastSegStart = i; - } else if (_1 === (2)) { - _tmp$4 = lastSegStart; - _tmp$5 = false; - n = _tmp$4; - ok = _tmp$5; - $s = -1; return [n, ok]; - } else if (_1 === (0)) { - if (lastCC > info.ccc) { - _tmp$6 = lastSegStart; - _tmp$7 = false; - n = _tmp$6; - ok = _tmp$7; - $s = -1; return [n, ok]; - } - } - if (f.composing) { - if (!$clone(info, Properties).isYesC()) { - /* break; */ $s = 2; continue; - } - } else { - if (!$clone(info, Properties).isYesD()) { - /* break; */ $s = 2; continue; - } - } - lastCC = info.ccc; - i = i + (((info.size >> 0))) >> 0; - $s = 1; continue; - case 2: - if (i === n) { - if (!atEOF) { - n = lastSegStart; - } - _tmp$8 = n; - _tmp$9 = true; - n = _tmp$8; - ok = _tmp$9; - $s = -1; return [n, ok]; - } - _tmp$10 = lastSegStart; - _tmp$11 = false; - n = _tmp$10; - ok = _tmp$11; - $s = -1; return [n, ok]; - /* */ } return; } var $f = {$blk: formInfo.ptr.prototype.quickSpan, $c: true, $r, _1, _r, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, atEOF, end, f, i, info, j, lastCC, lastSegStart, n, ok, src, ss, ss$24ptr, $s};return $f; - }; - formInfo.prototype.quickSpan = function(src, i, end, atEOF) { return this.$val.quickSpan(src, i, end, atEOF); }; - Form.prototype.QuickSpanString = function(s) { - var {_r, _tuple, f, n, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]).quickSpan($clone(inputString(s), input), 0, s.length, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - n = _tuple[0]; - $s = -1; return n; - /* */ } return; } var $f = {$blk: Form.prototype.QuickSpanString, $c: true, $r, _r, _tuple, f, n, s, $s};return $f; - }; - $ptrType(Form).prototype.QuickSpanString = function(s) { return new Form(this.$get()).QuickSpanString(s); }; - Form.prototype.FirstBoundary = function(b) { - var {$24r, _r, b, f, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = new Form(f).firstBoundary($clone(inputBytes(b), input), b.$length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.FirstBoundary, $c: true, $r, $24r, _r, b, f, $s};return $f; - }; - $ptrType(Form).prototype.FirstBoundary = function(b) { return new Form(this.$get()).FirstBoundary(b); }; - Form.prototype.firstBoundary = function(src, nsrc) { - var {_r, f, fd, i, info, nsrc, s, src, ss, ss$24ptr, $s, $r, $c} = $restore(this, {src, nsrc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - i = src.skipContinuationBytes(0); - if (i >= nsrc) { - $s = -1; return -1; - } - fd = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - ss = 0; - /* while (true) { */ case 1: - _r = fd.info($clone(src, input), i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - if (info.size === 0) { - $s = -1; return -1; - } - s = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).next($clone(info, Properties)); - if (!((s === 0))) { - $s = -1; return i; - } - i = i + (((info.size >> 0))) >> 0; - if (i >= nsrc) { - if (!$clone(info, Properties).BoundaryAfter() && !new streamSafe(ss).isMax()) { - $s = -1; return -1; - } - $s = -1; return nsrc; - } - $s = 1; continue; - case 2: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: Form.prototype.firstBoundary, $c: true, $r, _r, f, fd, i, info, nsrc, s, src, ss, ss$24ptr, $s};return $f; - }; - $ptrType(Form).prototype.firstBoundary = function(src, nsrc) { return new Form(this.$get()).firstBoundary(src, nsrc); }; - Form.prototype.FirstBoundaryInString = function(s) { - var {$24r, _r, f, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = new Form(f).firstBoundary($clone(inputString(s), input), s.length); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.FirstBoundaryInString, $c: true, $r, $24r, _r, f, s, $s};return $f; - }; - $ptrType(Form).prototype.FirstBoundaryInString = function(s) { return new Form(this.$get()).FirstBoundaryInString(s); }; - Form.prototype.NextBoundary = function(b, atEOF) { - var {$24r, _r, atEOF, b, f, $s, $r, $c} = $restore(this, {b, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = new Form(f).nextBoundary($clone(inputBytes(b), input), b.$length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.NextBoundary, $c: true, $r, $24r, _r, atEOF, b, f, $s};return $f; - }; - $ptrType(Form).prototype.NextBoundary = function(b, atEOF) { return new Form(this.$get()).NextBoundary(b, atEOF); }; - Form.prototype.NextBoundaryInString = function(s, atEOF) { - var {$24r, _r, atEOF, f, s, $s, $r, $c} = $restore(this, {s, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = new Form(f).nextBoundary($clone(inputString(s), input), s.length, atEOF); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.NextBoundaryInString, $c: true, $r, $24r, _r, atEOF, f, s, $s};return $f; - }; - $ptrType(Form).prototype.NextBoundaryInString = function(s, atEOF) { return new Form(this.$get()).NextBoundaryInString(s, atEOF); }; - Form.prototype.nextBoundary = function(src, nsrc, atEOF) { - var {_r, _r$1, atEOF, f, fd, i, info, nsrc, s, src, ss, ss$24ptr, $s, $r, $c} = $restore(this, {src, nsrc, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - if (nsrc === 0) { - if (atEOF) { - $s = -1; return 0; - } - $s = -1; return -1; - } - fd = ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]); - _r = fd.info($clone(src, input), 0); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - if (info.size === 0) { - if (atEOF) { - $s = -1; return 1; - } - $s = -1; return -1; - } - ss = 0; - (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).first($clone(info, Properties)); - i = ((info.size >> 0)); - /* while (true) { */ case 2: - /* if (!(i < nsrc)) { break; } */ if(!(i < nsrc)) { $s = 3; continue; } - _r$1 = fd.info($clone(src, input), i); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Properties.copy(info, _r$1); - if (info.size === 0) { - if (atEOF) { - $s = -1; return i; - } - $s = -1; return -1; - } - s = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).next($clone(info, Properties)); - if (!((s === 0))) { - $s = -1; return i; - } - i = i + (((info.size >> 0))) >> 0; - $s = 2; continue; - case 3: - if (!atEOF && !$clone(info, Properties).BoundaryAfter() && !new streamSafe(ss).isMax()) { - $s = -1; return -1; - } - $s = -1; return nsrc; - /* */ } return; } var $f = {$blk: Form.prototype.nextBoundary, $c: true, $r, _r, _r$1, atEOF, f, fd, i, info, nsrc, s, src, ss, ss$24ptr, $s};return $f; - }; - $ptrType(Form).prototype.nextBoundary = function(src, nsrc, atEOF) { return new Form(this.$get()).nextBoundary(src, nsrc, atEOF); }; - Form.prototype.LastBoundary = function(b) { - var {$24r, _r, b, f, $s, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - _r = lastBoundary(((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f]), b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Form.prototype.LastBoundary, $c: true, $r, $24r, _r, b, f, $s};return $f; - }; - $ptrType(Form).prototype.LastBoundary = function(b) { return new Form(this.$get()).LastBoundary(b); }; - lastBoundary = function(fd, b) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, fd, i, info, p, ss, ss$24ptr, v, $s, $r, $c} = $restore(this, {fd, b}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = b.$length; - _r = lastRuneStart(fd, b); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - info = $clone(_tuple[0], Properties); - p = _tuple[1]; - if (p === -1) { - $s = -1; return -1; - } - /* */ if (info.size === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (info.size === 0) { */ case 2: - if (p === 0) { - $s = -1; return -1; - } - i = p; - _r$1 = lastRuneStart(fd, $subslice(b, 0, i)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - Properties.copy(info, _tuple$1[0]); - p = _tuple$1[1]; - if (p === -1) { - $s = -1; return i; - } - /* } */ case 3: - if (!(((p + ((info.size >> 0)) >> 0) === i))) { - $s = -1; return i; - } - if ($clone(info, Properties).BoundaryAfter()) { - $s = -1; return i; - } - ss = 0; - v = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).backwards($clone(info, Properties)); - i = p; - /* while (true) { */ case 5: - /* if (!(i >= 0 && !((v === 1)))) { break; } */ if(!(i >= 0 && !((v === 1)))) { $s = 6; continue; } - _r$2 = lastRuneStart(fd, $subslice(b, 0, i)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - Properties.copy(info, _tuple$2[0]); - p = _tuple$2[1]; - v = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).backwards($clone(info, Properties)); - if (v === 2) { - /* break; */ $s = 6; continue; - } - if (!(((p + ((info.size >> 0)) >> 0) === i))) { - if (p === -1) { - $s = -1; return -1; - } - $s = -1; return i; - } - i = p; - $s = 5; continue; - case 6: - $s = -1; return i; - /* */ } return; } var $f = {$blk: lastBoundary, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, fd, i, info, p, ss, ss$24ptr, v, $s};return $f; - }; - decomposeSegment = function(rb, sp, atEOF) { - var {_r, _r$1, _r$2, _r$3, _r$4, atEOF, err, err$1, info, rb, s, s$1, sp, $s, $r, $c} = $restore(this, {rb, sp, atEOF}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = rb.f.info($clone(rb.src, input), sp); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - if (info.size === 0) { - $s = -1; return 0; - } - s = (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).next($clone(info, Properties)); - /* */ if (s === 1) { $s = 2; continue; } - /* */ if (s === 2) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (s === 1) { */ case 2: - /* */ if (rb.nrune > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (rb.nrune > 0) { */ case 5: - /* goto end */ $s = 7; continue; - /* } */ case 6: - $s = 4; continue; - /* } else if (s === 2) { */ case 3: - rb.insertCGJ(); - /* goto end */ $s = 7; continue; - /* } */ case 4: - _r$1 = rb.insertFlush($clone(rb.src, input), sp, $clone(info, Properties)); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!((err === 0))) { - $s = -1; return ((err >> 0)); - } - /* while (true) { */ case 9: - sp = sp + (((info.size >> 0))) >> 0; - if (sp >= rb.nsrc) { - if (!atEOF && !$clone(info, Properties).BoundaryAfter()) { - $s = -1; return -2; - } - /* break; */ $s = 10; continue; - } - _r$2 = rb.f.info($clone(rb.src, input), sp); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - Properties.copy(info, _r$2); - if (info.size === 0) { - if (!atEOF) { - $s = -1; return -2; - } - /* break; */ $s = 10; continue; - } - s$1 = (rb.$ptr_ss || (rb.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, rb))).next($clone(info, Properties)); - if (s$1 === 1) { - /* break; */ $s = 10; continue; - } else if (s$1 === 2) { - rb.insertCGJ(); - /* break; */ $s = 10; continue; - } - _r$3 = rb.insertFlush($clone(rb.src, input), sp, $clone(info, Properties)); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$1 = _r$3; - if (!((err$1 === 0))) { - $s = -1; return ((err$1 >> 0)); - } - $s = 9; continue; - case 10: - /* end: */ case 7: - _r$4 = rb.doFlush(); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!_r$4) { */ case 13: - $s = -1; return -1; - /* } */ case 14: - $s = -1; return sp; - /* */ } return; } var $f = {$blk: decomposeSegment, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, atEOF, err, err$1, info, rb, s, s$1, sp, $s};return $f; - }; - lastRuneStart = function(fd, buf) { - var {$24r, _r, buf, fd, p, $s, $r, $c} = $restore(this, {fd, buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = buf.$length - 1 >> 0; - while (true) { - if (!(p >= 0 && !utf8.RuneStart(((p < 0 || p >= buf.$length) ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + p])))) { break; } - p = p - (1) >> 0; - } - if (p < 0) { - $s = -1; return [new Properties.ptr(0, 0, 0, 0, 0, 0, 0), -1]; - } - _r = fd.info($clone(inputBytes(buf), input), p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, p]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: lastRuneStart, $c: true, $r, $24r, _r, buf, fd, p, $s};return $f; - }; - decomposeToLastBoundary = function(rb) { - var {_r, _r$1, _tuple, _tuple$1, add, buf, cp, fd, i, info, p, padd, rb, ss, ss$24ptr, v, $s, $r, $c} = $restore(this, {rb}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fd = rb.f; - _r = lastRuneStart(fd, rb.out); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - info = $clone(_tuple[0], Properties); - i = _tuple[1]; - if (!((((info.size >> 0)) === (rb.out.$length - i >> 0)))) { - $s = -1; return; - } - if ($clone(info, Properties).BoundaryAfter()) { - $s = -1; return; - } - add = arrayType$2.zero(); - padd = 0; - ss = 0; - p = rb.out.$length; - /* while (true) { */ case 2: - Properties.copy(((padd < 0 || padd >= add.length) ? ($throwRuntimeError("index out of range"), undefined) : add[padd]), info); - v = (ss$24ptr || (ss$24ptr = new ptrType$1(function() { return ss; }, function($v) { ss = $v; }))).backwards($clone(info, Properties)); - if (v === 2) { - /* break; */ $s = 3; continue; - } - padd = padd + (1) >> 0; - p = p - (((info.size >> 0))) >> 0; - if ((v === 1) || p < 0) { - /* break; */ $s = 3; continue; - } - _r$1 = lastRuneStart(fd, $subslice(rb.out, 0, p)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - Properties.copy(info, _tuple$1[0]); - i = _tuple$1[1]; - if (!((((info.size >> 0)) === (p - i >> 0)))) { - /* break; */ $s = 3; continue; - } - $s = 2; continue; - case 3: - rb.ss = ss; - buf = arrayType$1.zero(); - cp = $subslice(new sliceType$4(buf), 0, $copySlice(new sliceType$4(buf), $subslice(rb.out, p))); - rb.out = $subslice(rb.out, 0, p); - padd = padd - (1) >> 0; - /* while (true) { */ case 5: - /* if (!(padd >= 0)) { break; } */ if(!(padd >= 0)) { $s = 6; continue; } - Properties.copy(info, ((padd < 0 || padd >= add.length) ? ($throwRuntimeError("index out of range"), undefined) : add[padd])); - $r = rb.insertUnsafe($clone(inputBytes(cp), input), 0, $clone(info, Properties)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cp = $subslice(cp, info.size); - padd = padd - (1) >> 0; - $s = 5; continue; - case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: decomposeToLastBoundary, $c: true, $r, _r, _r$1, _tuple, _tuple$1, add, buf, cp, fd, i, info, p, padd, rb, ss, ss$24ptr, v, $s};return $f; - }; - Iter.ptr.prototype.Init = function(f, src) { - var {_r, f, i, src, x, $s, $r, $c} = $restore(this, {f, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = this; - i.p = 0; - if (src.$length === 0) { - i.setDone(); - i.rb.nsrc = 0; - $s = -1; return; - } - i.multiSeg = sliceType$4.nil; - i.rb.init(f, src); - i.next = i.rb.f.nextMain; - i.asciiF = nextASCIIBytes; - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Iter.ptr.prototype.Init, $c: true, $r, _r, f, i, src, x, $s};return $f; - }; - Iter.prototype.Init = function(f, src) { return this.$val.Init(f, src); }; - Iter.ptr.prototype.InitString = function(f, src) { - var {_r, f, i, src, x, $s, $r, $c} = $restore(this, {f, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = this; - i.p = 0; - if (src.length === 0) { - i.setDone(); - i.rb.nsrc = 0; - $s = -1; return; - } - i.multiSeg = sliceType$4.nil; - i.rb.initString(f, src); - i.next = i.rb.f.nextMain; - i.asciiF = nextASCIIString; - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); - $s = -1; return; - /* */ } return; } var $f = {$blk: Iter.ptr.prototype.InitString, $c: true, $r, _r, f, i, src, x, $s};return $f; - }; - Iter.prototype.InitString = function(f, src) { return this.$val.InitString(f, src); }; - Iter.ptr.prototype.Seek = function(offset, whence) { - var {$24r, $24r$1, _1, _r, _r$1, _r$2, abs, i, offset, whence, x, x$1, x$2, $s, $r, $c} = $restore(this, {offset, whence}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = this; - abs = new $Int64(0, 0); - _1 = whence; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (1)) { $s = 3; continue; } - /* */ if (_1 === (2)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === (0)) { */ case 2: - abs = offset; - $s = 6; continue; - /* } else if (_1 === (1)) { */ case 3: - abs = (x = (new $Int64(0, i.p)), new $Int64(x.$high + offset.$high, x.$low + offset.$low)); - $s = 6; continue; - /* } else if (_1 === (2)) { */ case 4: - abs = (x$1 = (new $Int64(0, i.rb.nsrc)), new $Int64(x$1.$high + offset.$high, x$1.$low + offset.$low)); - $s = 6; continue; - /* } else { */ case 5: - _r = fmt.Errorf("norm: invalid whence", new sliceType$5([])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [new $Int64(0, 0), _r]; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 1: - /* */ if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ((abs.$high < 0 || (abs.$high === 0 && abs.$low < 0))) { */ case 9: - _r$1 = fmt.Errorf("norm: negative position", new sliceType$5([])); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = [new $Int64(0, 0), _r$1]; - $s = 12; case 12: return $24r$1; - /* } */ case 10: - if ((((abs.$low + ((abs.$high >> 31) * 4294967296)) >> 0)) >= i.rb.nsrc) { - i.setDone(); - $s = -1; return [(new $Int64(0, i.p)), $ifaceNil]; - } - i.p = (((abs.$low + ((abs.$high >> 31) * 4294967296)) >> 0)); - i.multiSeg = sliceType$4.nil; - i.next = i.rb.f.nextMain; - _r$2 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - Properties.copy(i.info, _r$2); - (x$2 = i.rb, (x$2.$ptr_ss || (x$2.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$2)))).first($clone(i.info, Properties)); - $s = -1; return [abs, $ifaceNil]; - /* */ } return; } var $f = {$blk: Iter.ptr.prototype.Seek, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, _r$2, abs, i, offset, whence, x, x$1, x$2, $s};return $f; - }; - Iter.prototype.Seek = function(offset, whence) { return this.$val.Seek(offset, whence); }; - Iter.ptr.prototype.returnSlice = function(a, b) { - var a, b, i; - i = this; - if (i.rb.src.bytes === sliceType$4.nil) { - return $subslice(new sliceType$4(i.buf), 0, $copyString(new sliceType$4(i.buf), $substring(i.rb.src.str, a, b))); - } - return $subslice(i.rb.src.bytes, a, b); - }; - Iter.prototype.returnSlice = function(a, b) { return this.$val.returnSlice(a, b); }; - Iter.ptr.prototype.Pos = function() { - var i; - i = this; - return i.p; - }; - Iter.prototype.Pos = function() { return this.$val.Pos(); }; - Iter.ptr.prototype.setDone = function() { - var i; - i = this; - i.next = nextDone; - i.p = i.rb.nsrc; - }; - Iter.prototype.setDone = function() { return this.$val.setDone(); }; - Iter.ptr.prototype.Done = function() { - var i; - i = this; - return i.p >= i.rb.nsrc; - }; - Iter.prototype.Done = function() { return this.$val.Done(); }; - Iter.ptr.prototype.Next = function() { - var {$24r, _r, i, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = this; - _r = i.next(i); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Iter.ptr.prototype.Next, $c: true, $r, $24r, _r, i, $s};return $f; - }; - Iter.prototype.Next = function() { return this.$val.Next(); }; - nextASCIIBytes = function(i) { - var {$24r, _r, _r$1, i, p, p0, p0$1, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = i.p + 1 >> 0; - if (p >= i.rb.nsrc) { - p0 = i.p; - i.setDone(); - $s = -1; return $subslice(i.rb.src.bytes, p0, p); - } - if ((x = i.rb.src.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p])) < 128) { - p0$1 = i.p; - i.p = p; - $s = -1; return $subslice(i.rb.src.bytes, p0$1, p); - } - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - i.next = i.rb.f.nextMain; - _r$1 = i.next(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: nextASCIIBytes, $c: true, $r, $24r, _r, _r$1, i, p, p0, p0$1, x, $s};return $f; - }; - nextASCIIString = function(i) { - var {$24r, _r, _r$1, i, p, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = i.p + 1 >> 0; - if (p >= i.rb.nsrc) { - i.buf[0] = i.rb.src.str.charCodeAt(i.p); - i.setDone(); - $s = -1; return $subslice(new sliceType$4(i.buf), 0, 1); - } - if (i.rb.src.str.charCodeAt(p) < 128) { - i.buf[0] = i.rb.src.str.charCodeAt(i.p); - i.p = p; - $s = -1; return $subslice(new sliceType$4(i.buf), 0, 1); - } - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - i.next = i.rb.f.nextMain; - _r$1 = i.next(i); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: nextASCIIString, $c: true, $r, $24r, _r, _r$1, i, p, $s};return $f; - }; - nextHangul = function(i) { - var {$24r, _r, _r$1, i, next, p, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = i.p; - next = p + 3 >> 0; - /* */ if (next >= i.rb.nsrc) { $s = 1; continue; } - /* */ if (i.rb.src.hangul(next) === 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (next >= i.rb.nsrc) { */ case 1: - i.setDone(); - $s = 3; continue; - /* } else if (i.rb.src.hangul(next) === 0) { */ case 2: - (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - i.next = i.rb.f.nextMain; - _r$1 = i.next(i); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* } */ case 3: - i.p = next; - $s = -1; return $subslice(new sliceType$4(i.buf), 0, decomposeHangul(new sliceType$4(i.buf), i.rb.src.hangul(p))); - /* */ } return; } var $f = {$blk: nextHangul, $c: true, $r, $24r, _r, _r$1, i, next, p, x, $s};return $f; - }; - nextDone = function(i) { - var i; - return sliceType$4.nil; - }; - nextMulti = function(i) { - var {$24r, _r, _r$1, d, i, info, j, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - j = 0; - d = i.multiSeg; - j = 1; - while (true) { - if (!(j < d.$length && !utf8.RuneStart(((j < 0 || j >= d.$length) ? ($throwRuntimeError("index out of range"), undefined) : d.$array[d.$offset + j])))) { break; } - j = j + (1) >> 0; - } - /* while (true) { */ case 1: - /* if (!(j < d.$length)) { break; } */ if(!(j < d.$length)) { $s = 2; continue; } - _r = i.rb.f.info(new input.ptr("", d), j); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - if ($clone(info, Properties).BoundaryBefore()) { - i.multiSeg = $subslice(d, j); - $s = -1; return $subslice(d, 0, j); - } - j = j + (((info.size >> 0))) >> 0; - $s = 1; continue; - case 2: - i.next = i.rb.f.nextMain; - _r$1 = i.next(i); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: nextMulti, $c: true, $r, $24r, _r, _r$1, d, i, info, j, $s};return $f; - }; - nextMultiNorm = function(i) { - var {$24r, _r, _r$1, d, i, info, j, seg, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - j = 0; - d = i.multiSeg; - /* while (true) { */ case 1: - /* if (!(j < d.$length)) { break; } */ if(!(j < d.$length)) { $s = 2; continue; } - _r = i.rb.f.info(new input.ptr("", d), j); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - /* */ if ($clone(info, Properties).BoundaryBefore()) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($clone(info, Properties).BoundaryBefore()) { */ case 4: - $r = i.rb.compose(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - seg = $subslice(new sliceType$4(i.buf), 0, i.rb.flushCopy(new sliceType$4(i.buf))); - $r = i.rb.insertUnsafe(new input.ptr("", d), j, $clone(info, Properties)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i.multiSeg = $subslice(d, (j + ((info.size >> 0)) >> 0)); - $s = -1; return seg; - /* } */ case 5: - $r = i.rb.insertUnsafe(new input.ptr("", d), j, $clone(info, Properties)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - j = j + (((info.size >> 0))) >> 0; - $s = 1; continue; - case 2: - i.multiSeg = sliceType$4.nil; - i.next = nextComposed; - _r$1 = doNormComposed(i); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: nextMultiNorm, $c: true, $r, $24r, _r, _r$1, d, i, info, j, seg, $s};return $f; - }; - nextDecomposed = function(i) { - var {$24r, $24r$1, _1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, i, inCopyStart, next, outCopyStart, outp, p, p$1, p$2, prevCC, prevCC$1, r, sz, v, x, x$1, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - next = sliceType$4.nil; - outp = 0; - _tmp = i.p; - _tmp$1 = 0; - inCopyStart = _tmp; - outCopyStart = _tmp$1; - /* while (true) { */ case 1: - sz = ((i.info.size >> 0)); - /* */ if (sz <= 1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (sz <= 1) { */ case 3: - i.rb.ss = 0; - p = i.p; - i.p = i.p + (1) >> 0; - if (i.p >= i.rb.nsrc) { - i.setDone(); - next = i.returnSlice(p, i.p); - $s = -1; return next; - } else if (i.rb.src._byte(i.p) < 128) { - i.next = i.asciiF; - next = i.returnSlice(p, i.p); - $s = -1; return next; - } - outp = outp + (1) >> 0; - $s = 5; continue; - /* } else { */ case 4: - d = $clone(i.info, Properties).Decomposition(); - /* */ if (!(d === sliceType$4.nil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(d === sliceType$4.nil)) { */ case 6: - p$1 = outp + d.$length >> 0; - /* */ if (outp > 0) { $s = 9; continue; } - /* */ if ($clone(i.info, Properties).multiSegment()) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (outp > 0) { */ case 9: - i.rb.src.copySlice($subslice(new sliceType$4(i.buf), outCopyStart), inCopyStart, i.p); - if (p$1 > 128) { - next = $subslice(new sliceType$4(i.buf), 0, outp); - $s = -1; return next; - } - $s = 11; continue; - /* } else if ($clone(i.info, Properties).multiSegment()) { */ case 10: - /* */ if (i.multiSeg === sliceType$4.nil) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (i.multiSeg === sliceType$4.nil) { */ case 12: - i.multiSeg = d; - i.next = nextMulti; - _r = nextMulti(i); /* */ $s = 14; case 14: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - next = _r; - $24r = next; - $s = 15; case 15: return $24r; - /* } */ case 13: - d = i.multiSeg; - i.multiSeg = sliceType$4.nil; - p$1 = d.$length; - /* } */ case 11: - prevCC = i.info.tccc; - i.p = i.p + (sz) >> 0; - /* */ if (i.p >= i.rb.nsrc) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (i.p >= i.rb.nsrc) { */ case 16: - i.setDone(); - Properties.copy(i.info, new Properties.ptr(0, 0, 0, 0, 0, 0, 0)); - $s = 18; continue; - /* } else { */ case 17: - _r$1 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Properties.copy(i.info, _r$1); - /* } */ case 18: - _1 = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); - if (_1 === (2)) { - i.next = nextCGJDecompose; - if (outp > 0) { - $copySlice($subslice(new sliceType$4(i.buf), outp), d); - next = $subslice(new sliceType$4(i.buf), 0, p$1); - $s = -1; return next; - } - next = d; - $s = -1; return next; - } else if (_1 === (1)) { - if (outp > 0) { - $copySlice($subslice(new sliceType$4(i.buf), outp), d); - next = $subslice(new sliceType$4(i.buf), 0, p$1); - $s = -1; return next; - } - next = d; - $s = -1; return next; - } - $copySlice($subslice(new sliceType$4(i.buf), outp), d); - outp = p$1; - _tmp$2 = i.p; - _tmp$3 = outp; - inCopyStart = _tmp$2; - outCopyStart = _tmp$3; - /* */ if (i.info.ccc < prevCC) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (i.info.ccc < prevCC) { */ case 20: - /* goto doNorm */ $s = 22; continue; - /* } */ case 21: - /* continue; */ $s = 1; continue; - $s = 8; continue; - /* } else { */ case 7: - r = i.rb.src.hangul(i.p); - if (!((r === 0))) { - outp = decomposeHangul(new sliceType$4(i.buf), r); - i.p = i.p + (3) >> 0; - _tmp$4 = i.p; - _tmp$5 = outp; - inCopyStart = _tmp$4; - outCopyStart = _tmp$5; - if (i.p >= i.rb.nsrc) { - i.setDone(); - /* break; */ $s = 2; continue; - } else if (!((i.rb.src.hangul(i.p) === 0))) { - i.next = nextHangul; - next = $subslice(new sliceType$4(i.buf), 0, outp); - $s = -1; return next; - } - } else { - p$2 = outp + sz >> 0; - if (p$2 > 128) { - /* break; */ $s = 2; continue; - } - outp = p$2; - i.p = i.p + (sz) >> 0; - } - /* } */ case 8: - /* } */ case 5: - if (i.p >= i.rb.nsrc) { - i.setDone(); - /* break; */ $s = 2; continue; - } - prevCC$1 = i.info.tccc; - _r$2 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 23; case 23: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - Properties.copy(i.info, _r$2); - v = (x$1 = i.rb, (x$1.$ptr_ss || (x$1.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$1)))).next($clone(i.info, Properties)); - if (v === 1) { - /* break; */ $s = 2; continue; - } else if (v === 2) { - i.next = nextCGJDecompose; - /* break; */ $s = 2; continue; - } - /* */ if (i.info.ccc < prevCC$1) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (i.info.ccc < prevCC$1) { */ case 24: - /* goto doNorm */ $s = 22; continue; - /* } */ case 25: - $s = 1; continue; - case 2: - if (outCopyStart === 0) { - next = i.returnSlice(inCopyStart, i.p); - $s = -1; return next; - } else if (inCopyStart < i.p) { - i.rb.src.copySlice($subslice(new sliceType$4(i.buf), outCopyStart), inCopyStart, i.p); - } - next = $subslice(new sliceType$4(i.buf), 0, outp); - $s = -1; return next; - /* doNorm: */ case 22: - i.rb.src.copySlice($subslice(new sliceType$4(i.buf), outCopyStart), inCopyStart, i.p); - _r$3 = i.rb.insertDecomposed($subslice(new sliceType$4(i.buf), 0, outp)); /* */ $s = 26; case 26: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = doNormDecomposed(i); /* */ $s = 27; case 27: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - next = _r$4; - $24r$1 = next; - $s = 28; case 28: return $24r$1; - /* */ } return; } var $f = {$blk: nextDecomposed, $c: true, $r, $24r, $24r$1, _1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, i, inCopyStart, next, outCopyStart, outp, p, p$1, p$2, prevCC, prevCC$1, r, sz, v, x, x$1, $s};return $f; - }; - doNormDecomposed = function(i) { - var {_r, i, s, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i.p = i.p + (((i.info.size >> 0))) >> 0; - if (i.p >= i.rb.nsrc) { - i.setDone(); - /* break; */ $s = 2; continue; - } - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - if (i.info.ccc === 0) { - /* break; */ $s = 2; continue; - } - s = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); - if (s === 2) { - i.next = nextCGJDecompose; - /* break; */ $s = 2; continue; - } - $s = 1; continue; - case 2: - $s = -1; return $subslice(new sliceType$4(i.buf), 0, i.rb.flushCopy(new sliceType$4(i.buf))); - /* */ } return; } var $f = {$blk: doNormDecomposed, $c: true, $r, _r, i, s, x, $s};return $f; - }; - nextCGJDecompose = function(i) { - var {_r, buf, i, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i.rb.ss = 0; - i.rb.insertCGJ(); - i.next = nextDecomposed; - (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); - _r = doNormDecomposed(i); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buf = _r; - $s = -1; return buf; - /* */ } return; } var $f = {$blk: nextCGJDecompose, $c: true, $r, _r, buf, i, x, $s};return $f; - }; - nextComposed = function(i) { - var {$24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, d, i, info, outp, p, prevCC, startp, sz, v, x, x$1, x$2, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = 0; - _tmp$1 = i.p; - outp = _tmp; - startp = _tmp$1; - prevCC = 0; - /* while (true) { */ case 1: - /* */ if (!$clone(i.info, Properties).isYesC()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!$clone(i.info, Properties).isYesC()) { */ case 3: - /* goto doNorm */ $s = 5; continue; - /* } */ case 4: - prevCC = i.info.tccc; - sz = ((i.info.size >> 0)); - if (sz === 0) { - sz = 1; - } - p = outp + sz >> 0; - if (p > 128) { - /* break; */ $s = 2; continue; - } - outp = p; - i.p = i.p + (sz) >> 0; - if (i.p >= i.rb.nsrc) { - i.setDone(); - /* break; */ $s = 2; continue; - } else if (i.rb.src._byte(i.p) < 128) { - i.rb.ss = 0; - i.next = i.asciiF; - /* break; */ $s = 2; continue; - } - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - v = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); - if (v === 1) { - /* break; */ $s = 2; continue; - } else if (v === 2) { - i.next = nextCGJCompose; - /* break; */ $s = 2; continue; - } - /* */ if (i.info.ccc < prevCC) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (i.info.ccc < prevCC) { */ case 7: - /* goto doNorm */ $s = 5; continue; - /* } */ case 8: - $s = 1; continue; - case 2: - $s = -1; return i.returnSlice(startp, i.p); - /* doNorm: */ case 5: - i.p = startp; - _r$1 = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - Properties.copy(i.info, _r$1); - (x$1 = i.rb, (x$1.$ptr_ss || (x$1.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$1)))).first($clone(i.info, Properties)); - /* */ if ($clone(i.info, Properties).multiSegment()) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ($clone(i.info, Properties).multiSegment()) { */ case 10: - d = $clone(i.info, Properties).Decomposition(); - _r$2 = i.rb.f.info(new input.ptr("", d), 0); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - info = $clone(_r$2, Properties); - $r = i.rb.insertUnsafe(new input.ptr("", d), 0, $clone(info, Properties)); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i.multiSeg = $subslice(d, ((info.size >> 0))); - i.next = nextMultiNorm; - _r$3 = nextMultiNorm(i); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 15; case 15: return $24r; - /* } */ case 11: - (x$2 = i.rb, (x$2.$ptr_ss || (x$2.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x$2)))).first($clone(i.info, Properties)); - $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = doNormComposed(i); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 18; case 18: return $24r$1; - /* */ } return; } var $f = {$blk: nextComposed, $c: true, $r, $24r, $24r$1, _r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, d, i, info, outp, p, prevCC, startp, sz, v, x, x$1, x$2, $s};return $f; - }; - doNormComposed = function(i) { - var {_r, i, s, seg, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* while (true) { */ case 1: - i.p = i.p + (((i.info.size >> 0))) >> 0; - if (i.p >= i.rb.nsrc) { - i.setDone(); - /* break; */ $s = 2; continue; - } - _r = i.rb.f.info($clone(i.rb.src, input), i.p); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - Properties.copy(i.info, _r); - s = (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).next($clone(i.info, Properties)); - if (s === 1) { - /* break; */ $s = 2; continue; - } else if (s === 2) { - i.next = nextCGJCompose; - /* break; */ $s = 2; continue; - } - $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 1; continue; - case 2: - $r = i.rb.compose(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - seg = $subslice(new sliceType$4(i.buf), 0, i.rb.flushCopy(new sliceType$4(i.buf))); - $s = -1; return seg; - /* */ } return; } var $f = {$blk: doNormComposed, $c: true, $r, _r, i, s, seg, x, $s};return $f; - }; - nextCGJCompose = function(i) { - var {$24r, _r, i, x, $s, $r, $c} = $restore(this, {i}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i.rb.ss = 0; - i.rb.insertCGJ(); - i.next = nextComposed; - (x = i.rb, (x.$ptr_ss || (x.$ptr_ss = new ptrType$1(function() { return this.$target.ss; }, function($v) { this.$target.ss = $v; }, x)))).first($clone(i.info, Properties)); - $r = i.rb.insertUnsafe($clone(i.rb.src, input), i.p, $clone(i.info, Properties)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r = doNormComposed(i); /* */ $s = 2; case 2: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: nextCGJCompose, $c: true, $r, $24r, _r, i, x, $s};return $f; - }; - inputBytes = function(str) { - var str; - return new input.ptr("", str); - }; - inputString = function(str) { - var str; - return new input.ptr(str, sliceType$4.nil); - }; - input.ptr.prototype.setBytes = function(str) { - var in$1, str; - in$1 = this; - in$1.str = ""; - in$1.bytes = str; - }; - input.prototype.setBytes = function(str) { return this.$val.setBytes(str); }; - input.ptr.prototype.setString = function(str) { - var in$1, str; - in$1 = this; - in$1.str = str; - in$1.bytes = sliceType$4.nil; - }; - input.prototype.setString = function(str) { return this.$val.setString(str); }; - input.ptr.prototype._byte = function(p) { - var in$1, p, x; - in$1 = this; - if (in$1.bytes === sliceType$4.nil) { - return in$1.str.charCodeAt(p); - } - return (x = in$1.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p])); - }; - input.prototype._byte = function(p) { return this.$val._byte(p); }; - input.ptr.prototype.skipASCII = function(p, max) { - var in$1, max, p, x; - in$1 = this; - if (in$1.bytes === sliceType$4.nil) { - while (true) { - if (!(p < max && in$1.str.charCodeAt(p) < 128)) { break; } - p = p + (1) >> 0; - } - } else { - while (true) { - if (!(p < max && (x = in$1.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p])) < 128)) { break; } - p = p + (1) >> 0; - } - } - return p; - }; - input.prototype.skipASCII = function(p, max) { return this.$val.skipASCII(p, max); }; - input.ptr.prototype.skipContinuationBytes = function(p) { - var in$1, p, x; - in$1 = this; - if (in$1.bytes === sliceType$4.nil) { - while (true) { - if (!(p < in$1.str.length && !utf8.RuneStart(in$1.str.charCodeAt(p)))) { break; } - p = p + (1) >> 0; - } - } else { - while (true) { - if (!(p < in$1.bytes.$length && !utf8.RuneStart((x = in$1.bytes, ((p < 0 || p >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + p]))))) { break; } - p = p + (1) >> 0; - } - } - return p; - }; - input.prototype.skipContinuationBytes = function(p) { return this.$val.skipContinuationBytes(p); }; - input.ptr.prototype.appendSlice = function(buf, b, e) { - var b, buf, e, i, in$1; - in$1 = this; - if (!(in$1.bytes === sliceType$4.nil)) { - return $appendSlice(buf, $subslice(in$1.bytes, b, e)); - } - i = b; - while (true) { - if (!(i < e)) { break; } - buf = $append(buf, in$1.str.charCodeAt(i)); - i = i + (1) >> 0; - } - return buf; - }; - input.prototype.appendSlice = function(buf, b, e) { return this.$val.appendSlice(buf, b, e); }; - input.ptr.prototype.copySlice = function(buf, b, e) { - var b, buf, e, in$1; - in$1 = this; - if (in$1.bytes === sliceType$4.nil) { - return $copyString(buf, $substring(in$1.str, b, e)); - } - return $copySlice(buf, $subslice(in$1.bytes, b, e)); - }; - input.prototype.copySlice = function(buf, b, e) { return this.$val.copySlice(buf, b, e); }; - input.ptr.prototype.charinfoNFC = function(p) { - var in$1, p; - in$1 = this; - if (in$1.bytes === sliceType$4.nil) { - return nfcData.lookupString($substring(in$1.str, p)); - } - return nfcData.lookup($subslice(in$1.bytes, p)); - }; - input.prototype.charinfoNFC = function(p) { return this.$val.charinfoNFC(p); }; - input.ptr.prototype.charinfoNFKC = function(p) { - var in$1, p; - in$1 = this; - if (in$1.bytes === sliceType$4.nil) { - return nfkcData.lookupString($substring(in$1.str, p)); - } - return nfkcData.lookup($subslice(in$1.bytes, p)); - }; - input.prototype.charinfoNFKC = function(p) { return this.$val.charinfoNFKC(p); }; - input.ptr.prototype.hangul = function(p) { - var _tuple, _tuple$1, in$1, p, r, size; - r = 0; - in$1 = this; - size = 0; - if (in$1.bytes === sliceType$4.nil) { - if (!isHangulString($substring(in$1.str, p))) { - r = 0; - return r; - } - _tuple = utf8.DecodeRuneInString($substring(in$1.str, p)); - r = _tuple[0]; - size = _tuple[1]; - } else { - if (!isHangul($subslice(in$1.bytes, p))) { - r = 0; - return r; - } - _tuple$1 = utf8.DecodeRune($subslice(in$1.bytes, p)); - r = _tuple$1[0]; - size = _tuple$1[1]; - } - if (!((size === 3))) { - r = 0; - return r; - } - r = r; - return r; - }; - input.prototype.hangul = function(p) { return this.$val.hangul(p); }; - Properties.ptr.prototype.BoundaryBefore = function() { - var p; - p = this; - if ((p.ccc === 0) && !$clone(p, Properties).combinesBackward()) { - return true; - } - return false; - }; - Properties.prototype.BoundaryBefore = function() { return this.$val.BoundaryBefore(); }; - Properties.ptr.prototype.BoundaryAfter = function() { - var p; - p = this; - return $clone(p, Properties).isInert(); - }; - Properties.prototype.BoundaryAfter = function() { return this.$val.BoundaryAfter(); }; - Properties.ptr.prototype.isYesC = function() { - var p; - p = this; - return ((p.flags & 16) >>> 0) === 0; - }; - Properties.prototype.isYesC = function() { return this.$val.isYesC(); }; - Properties.ptr.prototype.isYesD = function() { - var p; - p = this; - return ((p.flags & 4) >>> 0) === 0; - }; - Properties.prototype.isYesD = function() { return this.$val.isYesD(); }; - Properties.ptr.prototype.combinesBackward = function() { - var p; - p = this; - return !((((p.flags & 8) >>> 0) === 0)); - }; - Properties.prototype.combinesBackward = function() { return this.$val.combinesBackward(); }; - Properties.ptr.prototype.hasDecomposition = function() { - var p; - p = this; - return !((((p.flags & 4) >>> 0) === 0)); - }; - Properties.prototype.hasDecomposition = function() { return this.$val.hasDecomposition(); }; - Properties.ptr.prototype.isInert = function() { - var p; - p = this; - return (((p.flags & 63) >>> 0) === 0) && (p.ccc === 0); - }; - Properties.prototype.isInert = function() { return this.$val.isInert(); }; - Properties.ptr.prototype.multiSegment = function() { - var p; - p = this; - return p.index >= 6256 && p.index < 12151; - }; - Properties.prototype.multiSegment = function() { return this.$val.multiSegment(); }; - Properties.ptr.prototype.nLeadingNonStarters = function() { - var p; - p = this; - return p.nLead; - }; - Properties.prototype.nLeadingNonStarters = function() { return this.$val.nLeadingNonStarters(); }; - Properties.ptr.prototype.nTrailingNonStarters = function() { - var p; - p = this; - return ((((p.flags & 3) >>> 0) << 24 >>> 24)); - }; - Properties.prototype.nTrailingNonStarters = function() { return this.$val.nTrailingNonStarters(); }; - Properties.ptr.prototype.Decomposition = function() { - var i, n, p; - p = this; - if (p.index === 0) { - return sliceType$4.nil; - } - i = p.index; - n = (((i < 0 || i >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[i]) & 63) >>> 0; - i = i + (1) << 16 >>> 16; - return $subslice(new sliceType$4(decomps), i, (i + ((n << 16 >>> 16)) << 16 >>> 16)); - }; - Properties.prototype.Decomposition = function() { return this.$val.Decomposition(); }; - Properties.ptr.prototype.Size = function() { - var p; - p = this; - return ((p.size >> 0)); - }; - Properties.prototype.Size = function() { return this.$val.Size(); }; - Properties.ptr.prototype.CCC = function() { - var p, x; - p = this; - if (p.index >= 19087) { - return 0; - } - return (x = p.ccc, ((x < 0 || x >= ccc.length) ? ($throwRuntimeError("index out of range"), undefined) : ccc[x])); - }; - Properties.prototype.CCC = function() { return this.$val.CCC(); }; - Properties.ptr.prototype.LeadCCC = function() { - var p, x; - p = this; - return (x = p.ccc, ((x < 0 || x >= ccc.length) ? ($throwRuntimeError("index out of range"), undefined) : ccc[x])); - }; - Properties.prototype.LeadCCC = function() { return this.$val.LeadCCC(); }; - Properties.ptr.prototype.TrailCCC = function() { - var p, x; - p = this; - return (x = p.tccc, ((x < 0 || x >= ccc.length) ? ($throwRuntimeError("index out of range"), undefined) : ccc[x])); - }; - Properties.prototype.TrailCCC = function() { return this.$val.TrailCCC(); }; - buildRecompMap = function() { - var _key, buf, i, key, val; - recompMap = {}; - buf = arrayType$3.zero(); - i = 0; - while (true) { - if (!(i < 7528)) { break; } - $copyString(new sliceType$4(buf), $substring("\x00A\x03\x00\x00\x00\x00\xC0\x00A\x03\x01\x00\x00\x00\xC1\x00A\x03\x02\x00\x00\x00\xC2\x00A\x03\x03\x00\x00\x00\xC3\x00A\x03\b\x00\x00\x00\xC4\x00A\x03\n\x00\x00\x00\xC5\x00C\x03'\x00\x00\x00\xC7\x00E\x03\x00\x00\x00\x00\xC8\x00E\x03\x01\x00\x00\x00\xC9\x00E\x03\x02\x00\x00\x00\xCA\x00E\x03\b\x00\x00\x00\xCB\x00I\x03\x00\x00\x00\x00\xCC\x00I\x03\x01\x00\x00\x00\xCD\x00I\x03\x02\x00\x00\x00\xCE\x00I\x03\b\x00\x00\x00\xCF\x00N\x03\x03\x00\x00\x00\xD1\x00O\x03\x00\x00\x00\x00\xD2\x00O\x03\x01\x00\x00\x00\xD3\x00O\x03\x02\x00\x00\x00\xD4\x00O\x03\x03\x00\x00\x00\xD5\x00O\x03\b\x00\x00\x00\xD6\x00U\x03\x00\x00\x00\x00\xD9\x00U\x03\x01\x00\x00\x00\xDA\x00U\x03\x02\x00\x00\x00\xDB\x00U\x03\b\x00\x00\x00\xDC\x00Y\x03\x01\x00\x00\x00\xDD\x00a\x03\x00\x00\x00\x00\xE0\x00a\x03\x01\x00\x00\x00\xE1\x00a\x03\x02\x00\x00\x00\xE2\x00a\x03\x03\x00\x00\x00\xE3\x00a\x03\b\x00\x00\x00\xE4\x00a\x03\n\x00\x00\x00\xE5\x00c\x03'\x00\x00\x00\xE7\x00e\x03\x00\x00\x00\x00\xE8\x00e\x03\x01\x00\x00\x00\xE9\x00e\x03\x02\x00\x00\x00\xEA\x00e\x03\b\x00\x00\x00\xEB\x00i\x03\x00\x00\x00\x00\xEC\x00i\x03\x01\x00\x00\x00\xED\x00i\x03\x02\x00\x00\x00\xEE\x00i\x03\b\x00\x00\x00\xEF\x00n\x03\x03\x00\x00\x00\xF1\x00o\x03\x00\x00\x00\x00\xF2\x00o\x03\x01\x00\x00\x00\xF3\x00o\x03\x02\x00\x00\x00\xF4\x00o\x03\x03\x00\x00\x00\xF5\x00o\x03\b\x00\x00\x00\xF6\x00u\x03\x00\x00\x00\x00\xF9\x00u\x03\x01\x00\x00\x00\xFA\x00u\x03\x02\x00\x00\x00\xFB\x00u\x03\b\x00\x00\x00\xFC\x00y\x03\x01\x00\x00\x00\xFD\x00y\x03\b\x00\x00\x00\xFF\x00A\x03\x04\x00\x00\x01\x00\x00a\x03\x04\x00\x00\x01\x01\x00A\x03\x06\x00\x00\x01\x02\x00a\x03\x06\x00\x00\x01\x03\x00A\x03(\x00\x00\x01\x04\x00a\x03(\x00\x00\x01\x05\x00C\x03\x01\x00\x00\x01\x06\x00c\x03\x01\x00\x00\x01\x07\x00C\x03\x02\x00\x00\x01\b\x00c\x03\x02\x00\x00\x01\t\x00C\x03\x07\x00\x00\x01\n\x00c\x03\x07\x00\x00\x01\v\x00C\x03\f\x00\x00\x01\f\x00c\x03\f\x00\x00\x01\r\x00D\x03\f\x00\x00\x01\x0E\x00d\x03\f\x00\x00\x01\x0F\x00E\x03\x04\x00\x00\x01\x12\x00e\x03\x04\x00\x00\x01\x13\x00E\x03\x06\x00\x00\x01\x14\x00e\x03\x06\x00\x00\x01\x15\x00E\x03\x07\x00\x00\x01\x16\x00e\x03\x07\x00\x00\x01\x17\x00E\x03(\x00\x00\x01\x18\x00e\x03(\x00\x00\x01\x19\x00E\x03\f\x00\x00\x01\x1A\x00e\x03\f\x00\x00\x01\x1B\x00G\x03\x02\x00\x00\x01\x1C\x00g\x03\x02\x00\x00\x01\x1D\x00G\x03\x06\x00\x00\x01\x1E\x00g\x03\x06\x00\x00\x01\x1F\x00G\x03\x07\x00\x00\x01 \x00g\x03\x07\x00\x00\x01!\x00G\x03'\x00\x00\x01\"\x00g\x03'\x00\x00\x01#\x00H\x03\x02\x00\x00\x01$\x00h\x03\x02\x00\x00\x01%\x00I\x03\x03\x00\x00\x01(\x00i\x03\x03\x00\x00\x01)\x00I\x03\x04\x00\x00\x01*\x00i\x03\x04\x00\x00\x01+\x00I\x03\x06\x00\x00\x01,\x00i\x03\x06\x00\x00\x01-\x00I\x03(\x00\x00\x01.\x00i\x03(\x00\x00\x01/\x00I\x03\x07\x00\x00\x010\x00J\x03\x02\x00\x00\x014\x00j\x03\x02\x00\x00\x015\x00K\x03'\x00\x00\x016\x00k\x03'\x00\x00\x017\x00L\x03\x01\x00\x00\x019\x00l\x03\x01\x00\x00\x01:\x00L\x03'\x00\x00\x01;\x00l\x03'\x00\x00\x01<\x00L\x03\f\x00\x00\x01=\x00l\x03\f\x00\x00\x01>\x00N\x03\x01\x00\x00\x01C\x00n\x03\x01\x00\x00\x01D\x00N\x03'\x00\x00\x01E\x00n\x03'\x00\x00\x01F\x00N\x03\f\x00\x00\x01G\x00n\x03\f\x00\x00\x01H\x00O\x03\x04\x00\x00\x01L\x00o\x03\x04\x00\x00\x01M\x00O\x03\x06\x00\x00\x01N\x00o\x03\x06\x00\x00\x01O\x00O\x03\v\x00\x00\x01P\x00o\x03\v\x00\x00\x01Q\x00R\x03\x01\x00\x00\x01T\x00r\x03\x01\x00\x00\x01U\x00R\x03'\x00\x00\x01V\x00r\x03'\x00\x00\x01W\x00R\x03\f\x00\x00\x01X\x00r\x03\f\x00\x00\x01Y\x00S\x03\x01\x00\x00\x01Z\x00s\x03\x01\x00\x00\x01[\x00S\x03\x02\x00\x00\x01\\\x00s\x03\x02\x00\x00\x01]\x00S\x03'\x00\x00\x01^\x00s\x03'\x00\x00\x01_\x00S\x03\f\x00\x00\x01`\x00s\x03\f\x00\x00\x01a\x00T\x03'\x00\x00\x01b\x00t\x03'\x00\x00\x01c\x00T\x03\f\x00\x00\x01d\x00t\x03\f\x00\x00\x01e\x00U\x03\x03\x00\x00\x01h\x00u\x03\x03\x00\x00\x01i\x00U\x03\x04\x00\x00\x01j\x00u\x03\x04\x00\x00\x01k\x00U\x03\x06\x00\x00\x01l\x00u\x03\x06\x00\x00\x01m\x00U\x03\n\x00\x00\x01n\x00u\x03\n\x00\x00\x01o\x00U\x03\v\x00\x00\x01p\x00u\x03\v\x00\x00\x01q\x00U\x03(\x00\x00\x01r\x00u\x03(\x00\x00\x01s\x00W\x03\x02\x00\x00\x01t\x00w\x03\x02\x00\x00\x01u\x00Y\x03\x02\x00\x00\x01v\x00y\x03\x02\x00\x00\x01w\x00Y\x03\b\x00\x00\x01x\x00Z\x03\x01\x00\x00\x01y\x00z\x03\x01\x00\x00\x01z\x00Z\x03\x07\x00\x00\x01{\x00z\x03\x07\x00\x00\x01|\x00Z\x03\f\x00\x00\x01}\x00z\x03\f\x00\x00\x01~\x00O\x03\x1B\x00\x00\x01\xA0\x00o\x03\x1B\x00\x00\x01\xA1\x00U\x03\x1B\x00\x00\x01\xAF\x00u\x03\x1B\x00\x00\x01\xB0\x00A\x03\f\x00\x00\x01\xCD\x00a\x03\f\x00\x00\x01\xCE\x00I\x03\f\x00\x00\x01\xCF\x00i\x03\f\x00\x00\x01\xD0\x00O\x03\f\x00\x00\x01\xD1\x00o\x03\f\x00\x00\x01\xD2\x00U\x03\f\x00\x00\x01\xD3\x00u\x03\f\x00\x00\x01\xD4\x00\xDC\x03\x04\x00\x00\x01\xD5\x00\xFC\x03\x04\x00\x00\x01\xD6\x00\xDC\x03\x01\x00\x00\x01\xD7\x00\xFC\x03\x01\x00\x00\x01\xD8\x00\xDC\x03\f\x00\x00\x01\xD9\x00\xFC\x03\f\x00\x00\x01\xDA\x00\xDC\x03\x00\x00\x00\x01\xDB\x00\xFC\x03\x00\x00\x00\x01\xDC\x00\xC4\x03\x04\x00\x00\x01\xDE\x00\xE4\x03\x04\x00\x00\x01\xDF\x02&\x03\x04\x00\x00\x01\xE0\x02'\x03\x04\x00\x00\x01\xE1\x00\xC6\x03\x04\x00\x00\x01\xE2\x00\xE6\x03\x04\x00\x00\x01\xE3\x00G\x03\f\x00\x00\x01\xE6\x00g\x03\f\x00\x00\x01\xE7\x00K\x03\f\x00\x00\x01\xE8\x00k\x03\f\x00\x00\x01\xE9\x00O\x03(\x00\x00\x01\xEA\x00o\x03(\x00\x00\x01\xEB\x01\xEA\x03\x04\x00\x00\x01\xEC\x01\xEB\x03\x04\x00\x00\x01\xED\x01\xB7\x03\f\x00\x00\x01\xEE\x02\x92\x03\f\x00\x00\x01\xEF\x00j\x03\f\x00\x00\x01\xF0\x00G\x03\x01\x00\x00\x01\xF4\x00g\x03\x01\x00\x00\x01\xF5\x00N\x03\x00\x00\x00\x01\xF8\x00n\x03\x00\x00\x00\x01\xF9\x00\xC5\x03\x01\x00\x00\x01\xFA\x00\xE5\x03\x01\x00\x00\x01\xFB\x00\xC6\x03\x01\x00\x00\x01\xFC\x00\xE6\x03\x01\x00\x00\x01\xFD\x00\xD8\x03\x01\x00\x00\x01\xFE\x00\xF8\x03\x01\x00\x00\x01\xFF\x00A\x03\x0F\x00\x00\x02\x00\x00a\x03\x0F\x00\x00\x02\x01\x00A\x03\x11\x00\x00\x02\x02\x00a\x03\x11\x00\x00\x02\x03\x00E\x03\x0F\x00\x00\x02\x04\x00e\x03\x0F\x00\x00\x02\x05\x00E\x03\x11\x00\x00\x02\x06\x00e\x03\x11\x00\x00\x02\x07\x00I\x03\x0F\x00\x00\x02\b\x00i\x03\x0F\x00\x00\x02\t\x00I\x03\x11\x00\x00\x02\n\x00i\x03\x11\x00\x00\x02\v\x00O\x03\x0F\x00\x00\x02\f\x00o\x03\x0F\x00\x00\x02\r\x00O\x03\x11\x00\x00\x02\x0E\x00o\x03\x11\x00\x00\x02\x0F\x00R\x03\x0F\x00\x00\x02\x10\x00r\x03\x0F\x00\x00\x02\x11\x00R\x03\x11\x00\x00\x02\x12\x00r\x03\x11\x00\x00\x02\x13\x00U\x03\x0F\x00\x00\x02\x14\x00u\x03\x0F\x00\x00\x02\x15\x00U\x03\x11\x00\x00\x02\x16\x00u\x03\x11\x00\x00\x02\x17\x00S\x03&\x00\x00\x02\x18\x00s\x03&\x00\x00\x02\x19\x00T\x03&\x00\x00\x02\x1A\x00t\x03&\x00\x00\x02\x1B\x00H\x03\f\x00\x00\x02\x1E\x00h\x03\f\x00\x00\x02\x1F\x00A\x03\x07\x00\x00\x02&\x00a\x03\x07\x00\x00\x02'\x00E\x03'\x00\x00\x02(\x00e\x03'\x00\x00\x02)\x00\xD6\x03\x04\x00\x00\x02*\x00\xF6\x03\x04\x00\x00\x02+\x00\xD5\x03\x04\x00\x00\x02,\x00\xF5\x03\x04\x00\x00\x02-\x00O\x03\x07\x00\x00\x02.\x00o\x03\x07\x00\x00\x02/\x02.\x03\x04\x00\x00\x020\x02/\x03\x04\x00\x00\x021\x00Y\x03\x04\x00\x00\x022\x00y\x03\x04\x00\x00\x023\x00\xA8\x03\x01\x00\x00\x03\x85\x03\x91\x03\x01\x00\x00\x03\x86\x03\x95\x03\x01\x00\x00\x03\x88\x03\x97\x03\x01\x00\x00\x03\x89\x03\x99\x03\x01\x00\x00\x03\x8A\x03\x9F\x03\x01\x00\x00\x03\x8C\x03\xA5\x03\x01\x00\x00\x03\x8E\x03\xA9\x03\x01\x00\x00\x03\x8F\x03\xCA\x03\x01\x00\x00\x03\x90\x03\x99\x03\b\x00\x00\x03\xAA\x03\xA5\x03\b\x00\x00\x03\xAB\x03\xB1\x03\x01\x00\x00\x03\xAC\x03\xB5\x03\x01\x00\x00\x03\xAD\x03\xB7\x03\x01\x00\x00\x03\xAE\x03\xB9\x03\x01\x00\x00\x03\xAF\x03\xCB\x03\x01\x00\x00\x03\xB0\x03\xB9\x03\b\x00\x00\x03\xCA\x03\xC5\x03\b\x00\x00\x03\xCB\x03\xBF\x03\x01\x00\x00\x03\xCC\x03\xC5\x03\x01\x00\x00\x03\xCD\x03\xC9\x03\x01\x00\x00\x03\xCE\x03\xD2\x03\x01\x00\x00\x03\xD3\x03\xD2\x03\b\x00\x00\x03\xD4\x04\x15\x03\x00\x00\x00\x04\x00\x04\x15\x03\b\x00\x00\x04\x01\x04\x13\x03\x01\x00\x00\x04\x03\x04\x06\x03\b\x00\x00\x04\x07\x04\x1A\x03\x01\x00\x00\x04\f\x04\x18\x03\x00\x00\x00\x04\r\x04#\x03\x06\x00\x00\x04\x0E\x04\x18\x03\x06\x00\x00\x04\x19\x048\x03\x06\x00\x00\x049\x045\x03\x00\x00\x00\x04P\x045\x03\b\x00\x00\x04Q\x043\x03\x01\x00\x00\x04S\x04V\x03\b\x00\x00\x04W\x04:\x03\x01\x00\x00\x04\\\x048\x03\x00\x00\x00\x04]\x04C\x03\x06\x00\x00\x04^\x04t\x03\x0F\x00\x00\x04v\x04u\x03\x0F\x00\x00\x04w\x04\x16\x03\x06\x00\x00\x04\xC1\x046\x03\x06\x00\x00\x04\xC2\x04\x10\x03\x06\x00\x00\x04\xD0\x040\x03\x06\x00\x00\x04\xD1\x04\x10\x03\b\x00\x00\x04\xD2\x040\x03\b\x00\x00\x04\xD3\x04\x15\x03\x06\x00\x00\x04\xD6\x045\x03\x06\x00\x00\x04\xD7\x04\xD8\x03\b\x00\x00\x04\xDA\x04\xD9\x03\b\x00\x00\x04\xDB\x04\x16\x03\b\x00\x00\x04\xDC\x046\x03\b\x00\x00\x04\xDD\x04\x17\x03\b\x00\x00\x04\xDE\x047\x03\b\x00\x00\x04\xDF\x04\x18\x03\x04\x00\x00\x04\xE2\x048\x03\x04\x00\x00\x04\xE3\x04\x18\x03\b\x00\x00\x04\xE4\x048\x03\b\x00\x00\x04\xE5\x04\x1E\x03\b\x00\x00\x04\xE6\x04>\x03\b\x00\x00\x04\xE7\x04\xE8\x03\b\x00\x00\x04\xEA\x04\xE9\x03\b\x00\x00\x04\xEB\x04-\x03\b\x00\x00\x04\xEC\x04M\x03\b\x00\x00\x04\xED\x04#\x03\x04\x00\x00\x04\xEE\x04C\x03\x04\x00\x00\x04\xEF\x04#\x03\b\x00\x00\x04\xF0\x04C\x03\b\x00\x00\x04\xF1\x04#\x03\v\x00\x00\x04\xF2\x04C\x03\v\x00\x00\x04\xF3\x04'\x03\b\x00\x00\x04\xF4\x04G\x03\b\x00\x00\x04\xF5\x04+\x03\b\x00\x00\x04\xF8\x04K\x03\b\x00\x00\x04\xF9\x06'\x06S\x00\x00\x06\"\x06'\x06T\x00\x00\x06#\x06H\x06T\x00\x00\x06$\x06'\x06U\x00\x00\x06%\x06J\x06T\x00\x00\x06&\x06\xD5\x06T\x00\x00\x06\xC0\x06\xC1\x06T\x00\x00\x06\xC2\x06\xD2\x06T\x00\x00\x06\xD3\t(\t<\x00\x00\t)\t0\t<\x00\x00\t1\t3\t<\x00\x00\t4\t\xC7\t\xBE\x00\x00\t\xCB\t\xC7\t\xD7\x00\x00\t\xCC\vG\vV\x00\x00\vH\vG\v>\x00\x00\vK\vG\vW\x00\x00\vL\v\x92\v\xD7\x00\x00\v\x94\v\xC6\v\xBE\x00\x00\v\xCA\v\xC7\v\xBE\x00\x00\v\xCB\v\xC6\v\xD7\x00\x00\v\xCC\fF\fV\x00\x00\fH\f\xBF\f\xD5\x00\x00\f\xC0\f\xC6\f\xD5\x00\x00\f\xC7\f\xC6\f\xD6\x00\x00\f\xC8\f\xC6\f\xC2\x00\x00\f\xCA\f\xCA\f\xD5\x00\x00\f\xCB\rF\r>\x00\x00\rJ\rG\r>\x00\x00\rK\rF\rW\x00\x00\rL\r\xD9\r\xCA\x00\x00\r\xDA\r\xD9\r\xCF\x00\x00\r\xDC\r\xDC\r\xCA\x00\x00\r\xDD\r\xD9\r\xDF\x00\x00\r\xDE\x10%\x10.\x00\x00\x10&\x1B\x05\x1B5\x00\x00\x1B\x06\x1B\x07\x1B5\x00\x00\x1B\b\x1B\t\x1B5\x00\x00\x1B\n\x1B\v\x1B5\x00\x00\x1B\f\x1B\r\x1B5\x00\x00\x1B\x0E\x1B\x11\x1B5\x00\x00\x1B\x12\x1B:\x1B5\x00\x00\x1B;\x1B<\x1B5\x00\x00\x1B=\x1B>\x1B5\x00\x00\x1B@\x1B?\x1B5\x00\x00\x1BA\x1BB\x1B5\x00\x00\x1BC\x00A\x03%\x00\x00\x1E\x00\x00a\x03%\x00\x00\x1E\x01\x00B\x03\x07\x00\x00\x1E\x02\x00b\x03\x07\x00\x00\x1E\x03\x00B\x03#\x00\x00\x1E\x04\x00b\x03#\x00\x00\x1E\x05\x00B\x031\x00\x00\x1E\x06\x00b\x031\x00\x00\x1E\x07\x00\xC7\x03\x01\x00\x00\x1E\b\x00\xE7\x03\x01\x00\x00\x1E\t\x00D\x03\x07\x00\x00\x1E\n\x00d\x03\x07\x00\x00\x1E\v\x00D\x03#\x00\x00\x1E\f\x00d\x03#\x00\x00\x1E\r\x00D\x031\x00\x00\x1E\x0E\x00d\x031\x00\x00\x1E\x0F\x00D\x03'\x00\x00\x1E\x10\x00d\x03'\x00\x00\x1E\x11\x00D\x03-\x00\x00\x1E\x12\x00d\x03-\x00\x00\x1E\x13\x01\x12\x03\x00\x00\x00\x1E\x14\x01\x13\x03\x00\x00\x00\x1E\x15\x01\x12\x03\x01\x00\x00\x1E\x16\x01\x13\x03\x01\x00\x00\x1E\x17\x00E\x03-\x00\x00\x1E\x18\x00e\x03-\x00\x00\x1E\x19\x00E\x030\x00\x00\x1E\x1A\x00e\x030\x00\x00\x1E\x1B\x02(\x03\x06\x00\x00\x1E\x1C\x02)\x03\x06\x00\x00\x1E\x1D\x00F\x03\x07\x00\x00\x1E\x1E\x00f\x03\x07\x00\x00\x1E\x1F\x00G\x03\x04\x00\x00\x1E \x00g\x03\x04\x00\x00\x1E!\x00H\x03\x07\x00\x00\x1E\"\x00h\x03\x07\x00\x00\x1E#\x00H\x03#\x00\x00\x1E$\x00h\x03#\x00\x00\x1E%\x00H\x03\b\x00\x00\x1E&\x00h\x03\b\x00\x00\x1E'\x00H\x03'\x00\x00\x1E(\x00h\x03'\x00\x00\x1E)\x00H\x03.\x00\x00\x1E*\x00h\x03.\x00\x00\x1E+\x00I\x030\x00\x00\x1E,\x00i\x030\x00\x00\x1E-\x00\xCF\x03\x01\x00\x00\x1E.\x00\xEF\x03\x01\x00\x00\x1E/\x00K\x03\x01\x00\x00\x1E0\x00k\x03\x01\x00\x00\x1E1\x00K\x03#\x00\x00\x1E2\x00k\x03#\x00\x00\x1E3\x00K\x031\x00\x00\x1E4\x00k\x031\x00\x00\x1E5\x00L\x03#\x00\x00\x1E6\x00l\x03#\x00\x00\x1E7\x1E6\x03\x04\x00\x00\x1E8\x1E7\x03\x04\x00\x00\x1E9\x00L\x031\x00\x00\x1E:\x00l\x031\x00\x00\x1E;\x00L\x03-\x00\x00\x1E<\x00l\x03-\x00\x00\x1E=\x00M\x03\x01\x00\x00\x1E>\x00m\x03\x01\x00\x00\x1E?\x00M\x03\x07\x00\x00\x1E@\x00m\x03\x07\x00\x00\x1EA\x00M\x03#\x00\x00\x1EB\x00m\x03#\x00\x00\x1EC\x00N\x03\x07\x00\x00\x1ED\x00n\x03\x07\x00\x00\x1EE\x00N\x03#\x00\x00\x1EF\x00n\x03#\x00\x00\x1EG\x00N\x031\x00\x00\x1EH\x00n\x031\x00\x00\x1EI\x00N\x03-\x00\x00\x1EJ\x00n\x03-\x00\x00\x1EK\x00\xD5\x03\x01\x00\x00\x1EL\x00\xF5\x03\x01\x00\x00\x1EM\x00\xD5\x03\b\x00\x00\x1EN\x00\xF5\x03\b\x00\x00\x1EO\x01L\x03\x00\x00\x00\x1EP\x01M\x03\x00\x00\x00\x1EQ\x01L\x03\x01\x00\x00\x1ER\x01M\x03\x01\x00\x00\x1ES\x00P\x03\x01\x00\x00\x1ET\x00p\x03\x01\x00\x00\x1EU\x00P\x03\x07\x00\x00\x1EV\x00p\x03\x07\x00\x00\x1EW\x00R\x03\x07\x00\x00\x1EX\x00r\x03\x07\x00\x00\x1EY\x00R\x03#\x00\x00\x1EZ\x00r\x03#\x00\x00\x1E[\x1EZ\x03\x04\x00\x00\x1E\\\x1E[\x03\x04\x00\x00\x1E]\x00R\x031\x00\x00\x1E^\x00r\x031\x00\x00\x1E_\x00S\x03\x07\x00\x00\x1E`\x00s\x03\x07\x00\x00\x1Ea\x00S\x03#\x00\x00\x1Eb\x00s\x03#\x00\x00\x1Ec\x01Z\x03\x07\x00\x00\x1Ed\x01[\x03\x07\x00\x00\x1Ee\x01`\x03\x07\x00\x00\x1Ef\x01a\x03\x07\x00\x00\x1Eg\x1Eb\x03\x07\x00\x00\x1Eh\x1Ec\x03\x07\x00\x00\x1Ei\x00T\x03\x07\x00\x00\x1Ej\x00t\x03\x07\x00\x00\x1Ek\x00T\x03#\x00\x00\x1El\x00t\x03#\x00\x00\x1Em\x00T\x031\x00\x00\x1En\x00t\x031\x00\x00\x1Eo\x00T\x03-\x00\x00\x1Ep\x00t\x03-\x00\x00\x1Eq\x00U\x03$\x00\x00\x1Er\x00u\x03$\x00\x00\x1Es\x00U\x030\x00\x00\x1Et\x00u\x030\x00\x00\x1Eu\x00U\x03-\x00\x00\x1Ev\x00u\x03-\x00\x00\x1Ew\x01h\x03\x01\x00\x00\x1Ex\x01i\x03\x01\x00\x00\x1Ey\x01j\x03\b\x00\x00\x1Ez\x01k\x03\b\x00\x00\x1E{\x00V\x03\x03\x00\x00\x1E|\x00v\x03\x03\x00\x00\x1E}\x00V\x03#\x00\x00\x1E~\x00v\x03#\x00\x00\x1E\x7F\x00W\x03\x00\x00\x00\x1E\x80\x00w\x03\x00\x00\x00\x1E\x81\x00W\x03\x01\x00\x00\x1E\x82\x00w\x03\x01\x00\x00\x1E\x83\x00W\x03\b\x00\x00\x1E\x84\x00w\x03\b\x00\x00\x1E\x85\x00W\x03\x07\x00\x00\x1E\x86\x00w\x03\x07\x00\x00\x1E\x87\x00W\x03#\x00\x00\x1E\x88\x00w\x03#\x00\x00\x1E\x89\x00X\x03\x07\x00\x00\x1E\x8A\x00x\x03\x07\x00\x00\x1E\x8B\x00X\x03\b\x00\x00\x1E\x8C\x00x\x03\b\x00\x00\x1E\x8D\x00Y\x03\x07\x00\x00\x1E\x8E\x00y\x03\x07\x00\x00\x1E\x8F\x00Z\x03\x02\x00\x00\x1E\x90\x00z\x03\x02\x00\x00\x1E\x91\x00Z\x03#\x00\x00\x1E\x92\x00z\x03#\x00\x00\x1E\x93\x00Z\x031\x00\x00\x1E\x94\x00z\x031\x00\x00\x1E\x95\x00h\x031\x00\x00\x1E\x96\x00t\x03\b\x00\x00\x1E\x97\x00w\x03\n\x00\x00\x1E\x98\x00y\x03\n\x00\x00\x1E\x99\x01\x7F\x03\x07\x00\x00\x1E\x9B\x00A\x03#\x00\x00\x1E\xA0\x00a\x03#\x00\x00\x1E\xA1\x00A\x03\t\x00\x00\x1E\xA2\x00a\x03\t\x00\x00\x1E\xA3\x00\xC2\x03\x01\x00\x00\x1E\xA4\x00\xE2\x03\x01\x00\x00\x1E\xA5\x00\xC2\x03\x00\x00\x00\x1E\xA6\x00\xE2\x03\x00\x00\x00\x1E\xA7\x00\xC2\x03\t\x00\x00\x1E\xA8\x00\xE2\x03\t\x00\x00\x1E\xA9\x00\xC2\x03\x03\x00\x00\x1E\xAA\x00\xE2\x03\x03\x00\x00\x1E\xAB\x1E\xA0\x03\x02\x00\x00\x1E\xAC\x1E\xA1\x03\x02\x00\x00\x1E\xAD\x01\x02\x03\x01\x00\x00\x1E\xAE\x01\x03\x03\x01\x00\x00\x1E\xAF\x01\x02\x03\x00\x00\x00\x1E\xB0\x01\x03\x03\x00\x00\x00\x1E\xB1\x01\x02\x03\t\x00\x00\x1E\xB2\x01\x03\x03\t\x00\x00\x1E\xB3\x01\x02\x03\x03\x00\x00\x1E\xB4\x01\x03\x03\x03\x00\x00\x1E\xB5\x1E\xA0\x03\x06\x00\x00\x1E\xB6\x1E\xA1\x03\x06\x00\x00\x1E\xB7\x00E\x03#\x00\x00\x1E\xB8\x00e\x03#\x00\x00\x1E\xB9\x00E\x03\t\x00\x00\x1E\xBA\x00e\x03\t\x00\x00\x1E\xBB\x00E\x03\x03\x00\x00\x1E\xBC\x00e\x03\x03\x00\x00\x1E\xBD\x00\xCA\x03\x01\x00\x00\x1E\xBE\x00\xEA\x03\x01\x00\x00\x1E\xBF\x00\xCA\x03\x00\x00\x00\x1E\xC0\x00\xEA\x03\x00\x00\x00\x1E\xC1\x00\xCA\x03\t\x00\x00\x1E\xC2\x00\xEA\x03\t\x00\x00\x1E\xC3\x00\xCA\x03\x03\x00\x00\x1E\xC4\x00\xEA\x03\x03\x00\x00\x1E\xC5\x1E\xB8\x03\x02\x00\x00\x1E\xC6\x1E\xB9\x03\x02\x00\x00\x1E\xC7\x00I\x03\t\x00\x00\x1E\xC8\x00i\x03\t\x00\x00\x1E\xC9\x00I\x03#\x00\x00\x1E\xCA\x00i\x03#\x00\x00\x1E\xCB\x00O\x03#\x00\x00\x1E\xCC\x00o\x03#\x00\x00\x1E\xCD\x00O\x03\t\x00\x00\x1E\xCE\x00o\x03\t\x00\x00\x1E\xCF\x00\xD4\x03\x01\x00\x00\x1E\xD0\x00\xF4\x03\x01\x00\x00\x1E\xD1\x00\xD4\x03\x00\x00\x00\x1E\xD2\x00\xF4\x03\x00\x00\x00\x1E\xD3\x00\xD4\x03\t\x00\x00\x1E\xD4\x00\xF4\x03\t\x00\x00\x1E\xD5\x00\xD4\x03\x03\x00\x00\x1E\xD6\x00\xF4\x03\x03\x00\x00\x1E\xD7\x1E\xCC\x03\x02\x00\x00\x1E\xD8\x1E\xCD\x03\x02\x00\x00\x1E\xD9\x01\xA0\x03\x01\x00\x00\x1E\xDA\x01\xA1\x03\x01\x00\x00\x1E\xDB\x01\xA0\x03\x00\x00\x00\x1E\xDC\x01\xA1\x03\x00\x00\x00\x1E\xDD\x01\xA0\x03\t\x00\x00\x1E\xDE\x01\xA1\x03\t\x00\x00\x1E\xDF\x01\xA0\x03\x03\x00\x00\x1E\xE0\x01\xA1\x03\x03\x00\x00\x1E\xE1\x01\xA0\x03#\x00\x00\x1E\xE2\x01\xA1\x03#\x00\x00\x1E\xE3\x00U\x03#\x00\x00\x1E\xE4\x00u\x03#\x00\x00\x1E\xE5\x00U\x03\t\x00\x00\x1E\xE6\x00u\x03\t\x00\x00\x1E\xE7\x01\xAF\x03\x01\x00\x00\x1E\xE8\x01\xB0\x03\x01\x00\x00\x1E\xE9\x01\xAF\x03\x00\x00\x00\x1E\xEA\x01\xB0\x03\x00\x00\x00\x1E\xEB\x01\xAF\x03\t\x00\x00\x1E\xEC\x01\xB0\x03\t\x00\x00\x1E\xED\x01\xAF\x03\x03\x00\x00\x1E\xEE\x01\xB0\x03\x03\x00\x00\x1E\xEF\x01\xAF\x03#\x00\x00\x1E\xF0\x01\xB0\x03#\x00\x00\x1E\xF1\x00Y\x03\x00\x00\x00\x1E\xF2\x00y\x03\x00\x00\x00\x1E\xF3\x00Y\x03#\x00\x00\x1E\xF4\x00y\x03#\x00\x00\x1E\xF5\x00Y\x03\t\x00\x00\x1E\xF6\x00y\x03\t\x00\x00\x1E\xF7\x00Y\x03\x03\x00\x00\x1E\xF8\x00y\x03\x03\x00\x00\x1E\xF9\x03\xB1\x03\x13\x00\x00\x1F\x00\x03\xB1\x03\x14\x00\x00\x1F\x01\x1F\x00\x03\x00\x00\x00\x1F\x02\x1F\x01\x03\x00\x00\x00\x1F\x03\x1F\x00\x03\x01\x00\x00\x1F\x04\x1F\x01\x03\x01\x00\x00\x1F\x05\x1F\x00\x03B\x00\x00\x1F\x06\x1F\x01\x03B\x00\x00\x1F\x07\x03\x91\x03\x13\x00\x00\x1F\b\x03\x91\x03\x14\x00\x00\x1F\t\x1F\b\x03\x00\x00\x00\x1F\n\x1F\t\x03\x00\x00\x00\x1F\v\x1F\b\x03\x01\x00\x00\x1F\f\x1F\t\x03\x01\x00\x00\x1F\r\x1F\b\x03B\x00\x00\x1F\x0E\x1F\t\x03B\x00\x00\x1F\x0F\x03\xB5\x03\x13\x00\x00\x1F\x10\x03\xB5\x03\x14\x00\x00\x1F\x11\x1F\x10\x03\x00\x00\x00\x1F\x12\x1F\x11\x03\x00\x00\x00\x1F\x13\x1F\x10\x03\x01\x00\x00\x1F\x14\x1F\x11\x03\x01\x00\x00\x1F\x15\x03\x95\x03\x13\x00\x00\x1F\x18\x03\x95\x03\x14\x00\x00\x1F\x19\x1F\x18\x03\x00\x00\x00\x1F\x1A\x1F\x19\x03\x00\x00\x00\x1F\x1B\x1F\x18\x03\x01\x00\x00\x1F\x1C\x1F\x19\x03\x01\x00\x00\x1F\x1D\x03\xB7\x03\x13\x00\x00\x1F \x03\xB7\x03\x14\x00\x00\x1F!\x1F \x03\x00\x00\x00\x1F\"\x1F!\x03\x00\x00\x00\x1F#\x1F \x03\x01\x00\x00\x1F$\x1F!\x03\x01\x00\x00\x1F%\x1F \x03B\x00\x00\x1F&\x1F!\x03B\x00\x00\x1F'\x03\x97\x03\x13\x00\x00\x1F(\x03\x97\x03\x14\x00\x00\x1F)\x1F(\x03\x00\x00\x00\x1F*\x1F)\x03\x00\x00\x00\x1F+\x1F(\x03\x01\x00\x00\x1F,\x1F)\x03\x01\x00\x00\x1F-\x1F(\x03B\x00\x00\x1F.\x1F)\x03B\x00\x00\x1F/\x03\xB9\x03\x13\x00\x00\x1F0\x03\xB9\x03\x14\x00\x00\x1F1\x1F0\x03\x00\x00\x00\x1F2\x1F1\x03\x00\x00\x00\x1F3\x1F0\x03\x01\x00\x00\x1F4\x1F1\x03\x01\x00\x00\x1F5\x1F0\x03B\x00\x00\x1F6\x1F1\x03B\x00\x00\x1F7\x03\x99\x03\x13\x00\x00\x1F8\x03\x99\x03\x14\x00\x00\x1F9\x1F8\x03\x00\x00\x00\x1F:\x1F9\x03\x00\x00\x00\x1F;\x1F8\x03\x01\x00\x00\x1F<\x1F9\x03\x01\x00\x00\x1F=\x1F8\x03B\x00\x00\x1F>\x1F9\x03B\x00\x00\x1F?\x03\xBF\x03\x13\x00\x00\x1F@\x03\xBF\x03\x14\x00\x00\x1FA\x1F@\x03\x00\x00\x00\x1FB\x1FA\x03\x00\x00\x00\x1FC\x1F@\x03\x01\x00\x00\x1FD\x1FA\x03\x01\x00\x00\x1FE\x03\x9F\x03\x13\x00\x00\x1FH\x03\x9F\x03\x14\x00\x00\x1FI\x1FH\x03\x00\x00\x00\x1FJ\x1FI\x03\x00\x00\x00\x1FK\x1FH\x03\x01\x00\x00\x1FL\x1FI\x03\x01\x00\x00\x1FM\x03\xC5\x03\x13\x00\x00\x1FP\x03\xC5\x03\x14\x00\x00\x1FQ\x1FP\x03\x00\x00\x00\x1FR\x1FQ\x03\x00\x00\x00\x1FS\x1FP\x03\x01\x00\x00\x1FT\x1FQ\x03\x01\x00\x00\x1FU\x1FP\x03B\x00\x00\x1FV\x1FQ\x03B\x00\x00\x1FW\x03\xA5\x03\x14\x00\x00\x1FY\x1FY\x03\x00\x00\x00\x1F[\x1FY\x03\x01\x00\x00\x1F]\x1FY\x03B\x00\x00\x1F_\x03\xC9\x03\x13\x00\x00\x1F`\x03\xC9\x03\x14\x00\x00\x1Fa\x1F`\x03\x00\x00\x00\x1Fb\x1Fa\x03\x00\x00\x00\x1Fc\x1F`\x03\x01\x00\x00\x1Fd\x1Fa\x03\x01\x00\x00\x1Fe\x1F`\x03B\x00\x00\x1Ff\x1Fa\x03B\x00\x00\x1Fg\x03\xA9\x03\x13\x00\x00\x1Fh\x03\xA9\x03\x14\x00\x00\x1Fi\x1Fh\x03\x00\x00\x00\x1Fj\x1Fi\x03\x00\x00\x00\x1Fk\x1Fh\x03\x01\x00\x00\x1Fl\x1Fi\x03\x01\x00\x00\x1Fm\x1Fh\x03B\x00\x00\x1Fn\x1Fi\x03B\x00\x00\x1Fo\x03\xB1\x03\x00\x00\x00\x1Fp\x03\xB5\x03\x00\x00\x00\x1Fr\x03\xB7\x03\x00\x00\x00\x1Ft\x03\xB9\x03\x00\x00\x00\x1Fv\x03\xBF\x03\x00\x00\x00\x1Fx\x03\xC5\x03\x00\x00\x00\x1Fz\x03\xC9\x03\x00\x00\x00\x1F|\x1F\x00\x03E\x00\x00\x1F\x80\x1F\x01\x03E\x00\x00\x1F\x81\x1F\x02\x03E\x00\x00\x1F\x82\x1F\x03\x03E\x00\x00\x1F\x83\x1F\x04\x03E\x00\x00\x1F\x84\x1F\x05\x03E\x00\x00\x1F\x85\x1F\x06\x03E\x00\x00\x1F\x86\x1F\x07\x03E\x00\x00\x1F\x87\x1F\b\x03E\x00\x00\x1F\x88\x1F\t\x03E\x00\x00\x1F\x89\x1F\n\x03E\x00\x00\x1F\x8A\x1F\v\x03E\x00\x00\x1F\x8B\x1F\f\x03E\x00\x00\x1F\x8C\x1F\r\x03E\x00\x00\x1F\x8D\x1F\x0E\x03E\x00\x00\x1F\x8E\x1F\x0F\x03E\x00\x00\x1F\x8F\x1F \x03E\x00\x00\x1F\x90\x1F!\x03E\x00\x00\x1F\x91\x1F\"\x03E\x00\x00\x1F\x92\x1F#\x03E\x00\x00\x1F\x93\x1F$\x03E\x00\x00\x1F\x94\x1F%\x03E\x00\x00\x1F\x95\x1F&\x03E\x00\x00\x1F\x96\x1F'\x03E\x00\x00\x1F\x97\x1F(\x03E\x00\x00\x1F\x98\x1F)\x03E\x00\x00\x1F\x99\x1F*\x03E\x00\x00\x1F\x9A\x1F+\x03E\x00\x00\x1F\x9B\x1F,\x03E\x00\x00\x1F\x9C\x1F-\x03E\x00\x00\x1F\x9D\x1F.\x03E\x00\x00\x1F\x9E\x1F/\x03E\x00\x00\x1F\x9F\x1F`\x03E\x00\x00\x1F\xA0\x1Fa\x03E\x00\x00\x1F\xA1\x1Fb\x03E\x00\x00\x1F\xA2\x1Fc\x03E\x00\x00\x1F\xA3\x1Fd\x03E\x00\x00\x1F\xA4\x1Fe\x03E\x00\x00\x1F\xA5\x1Ff\x03E\x00\x00\x1F\xA6\x1Fg\x03E\x00\x00\x1F\xA7\x1Fh\x03E\x00\x00\x1F\xA8\x1Fi\x03E\x00\x00\x1F\xA9\x1Fj\x03E\x00\x00\x1F\xAA\x1Fk\x03E\x00\x00\x1F\xAB\x1Fl\x03E\x00\x00\x1F\xAC\x1Fm\x03E\x00\x00\x1F\xAD\x1Fn\x03E\x00\x00\x1F\xAE\x1Fo\x03E\x00\x00\x1F\xAF\x03\xB1\x03\x06\x00\x00\x1F\xB0\x03\xB1\x03\x04\x00\x00\x1F\xB1\x1Fp\x03E\x00\x00\x1F\xB2\x03\xB1\x03E\x00\x00\x1F\xB3\x03\xAC\x03E\x00\x00\x1F\xB4\x03\xB1\x03B\x00\x00\x1F\xB6\x1F\xB6\x03E\x00\x00\x1F\xB7\x03\x91\x03\x06\x00\x00\x1F\xB8\x03\x91\x03\x04\x00\x00\x1F\xB9\x03\x91\x03\x00\x00\x00\x1F\xBA\x03\x91\x03E\x00\x00\x1F\xBC\x00\xA8\x03B\x00\x00\x1F\xC1\x1Ft\x03E\x00\x00\x1F\xC2\x03\xB7\x03E\x00\x00\x1F\xC3\x03\xAE\x03E\x00\x00\x1F\xC4\x03\xB7\x03B\x00\x00\x1F\xC6\x1F\xC6\x03E\x00\x00\x1F\xC7\x03\x95\x03\x00\x00\x00\x1F\xC8\x03\x97\x03\x00\x00\x00\x1F\xCA\x03\x97\x03E\x00\x00\x1F\xCC\x1F\xBF\x03\x00\x00\x00\x1F\xCD\x1F\xBF\x03\x01\x00\x00\x1F\xCE\x1F\xBF\x03B\x00\x00\x1F\xCF\x03\xB9\x03\x06\x00\x00\x1F\xD0\x03\xB9\x03\x04\x00\x00\x1F\xD1\x03\xCA\x03\x00\x00\x00\x1F\xD2\x03\xB9\x03B\x00\x00\x1F\xD6\x03\xCA\x03B\x00\x00\x1F\xD7\x03\x99\x03\x06\x00\x00\x1F\xD8\x03\x99\x03\x04\x00\x00\x1F\xD9\x03\x99\x03\x00\x00\x00\x1F\xDA\x1F\xFE\x03\x00\x00\x00\x1F\xDD\x1F\xFE\x03\x01\x00\x00\x1F\xDE\x1F\xFE\x03B\x00\x00\x1F\xDF\x03\xC5\x03\x06\x00\x00\x1F\xE0\x03\xC5\x03\x04\x00\x00\x1F\xE1\x03\xCB\x03\x00\x00\x00\x1F\xE2\x03\xC1\x03\x13\x00\x00\x1F\xE4\x03\xC1\x03\x14\x00\x00\x1F\xE5\x03\xC5\x03B\x00\x00\x1F\xE6\x03\xCB\x03B\x00\x00\x1F\xE7\x03\xA5\x03\x06\x00\x00\x1F\xE8\x03\xA5\x03\x04\x00\x00\x1F\xE9\x03\xA5\x03\x00\x00\x00\x1F\xEA\x03\xA1\x03\x14\x00\x00\x1F\xEC\x00\xA8\x03\x00\x00\x00\x1F\xED\x1F|\x03E\x00\x00\x1F\xF2\x03\xC9\x03E\x00\x00\x1F\xF3\x03\xCE\x03E\x00\x00\x1F\xF4\x03\xC9\x03B\x00\x00\x1F\xF6\x1F\xF6\x03E\x00\x00\x1F\xF7\x03\x9F\x03\x00\x00\x00\x1F\xF8\x03\xA9\x03\x00\x00\x00\x1F\xFA\x03\xA9\x03E\x00\x00\x1F\xFC!\x90\x038\x00\x00!\x9A!\x92\x038\x00\x00!\x9B!\x94\x038\x00\x00!\xAE!\xD0\x038\x00\x00!\xCD!\xD4\x038\x00\x00!\xCE!\xD2\x038\x00\x00!\xCF\"\x03\x038\x00\x00\"\x04\"\b\x038\x00\x00\"\t\"\v\x038\x00\x00\"\f\"#\x038\x00\x00\"$\"%\x038\x00\x00\"&\"<\x038\x00\x00\"A\"C\x038\x00\x00\"D\"E\x038\x00\x00\"G\"H\x038\x00\x00\"I\x00=\x038\x00\x00\"`\"a\x038\x00\x00\"b\"M\x038\x00\x00\"m\x00<\x038\x00\x00\"n\x00>\x038\x00\x00\"o\"d\x038\x00\x00\"p\"e\x038\x00\x00\"q\"r\x038\x00\x00\"t\"s\x038\x00\x00\"u\"v\x038\x00\x00\"x\"w\x038\x00\x00\"y\"z\x038\x00\x00\"\x80\"{\x038\x00\x00\"\x81\"\x82\x038\x00\x00\"\x84\"\x83\x038\x00\x00\"\x85\"\x86\x038\x00\x00\"\x88\"\x87\x038\x00\x00\"\x89\"\xA2\x038\x00\x00\"\xAC\"\xA8\x038\x00\x00\"\xAD\"\xA9\x038\x00\x00\"\xAE\"\xAB\x038\x00\x00\"\xAF\"|\x038\x00\x00\"\xE0\"}\x038\x00\x00\"\xE1\"\x91\x038\x00\x00\"\xE2\"\x92\x038\x00\x00\"\xE3\"\xB2\x038\x00\x00\"\xEA\"\xB3\x038\x00\x00\"\xEB\"\xB4\x038\x00\x00\"\xEC\"\xB5\x038\x00\x00\"\xED0K0\x99\x00\x000L0M0\x99\x00\x000N0O0\x99\x00\x000P0Q0\x99\x00\x000R0S0\x99\x00\x000T0U0\x99\x00\x000V0W0\x99\x00\x000X0Y0\x99\x00\x000Z0[0\x99\x00\x000\\0]0\x99\x00\x000^0_0\x99\x00\x000`0a0\x99\x00\x000b0d0\x99\x00\x000e0f0\x99\x00\x000g0h0\x99\x00\x000i0o0\x99\x00\x000p0o0\x9A\x00\x000q0r0\x99\x00\x000s0r0\x9A\x00\x000t0u0\x99\x00\x000v0u0\x9A\x00\x000w0x0\x99\x00\x000y0x0\x9A\x00\x000z0{0\x99\x00\x000|0{0\x9A\x00\x000}0F0\x99\x00\x000\x940\x9D0\x99\x00\x000\x9E0\xAB0\x99\x00\x000\xAC0\xAD0\x99\x00\x000\xAE0\xAF0\x99\x00\x000\xB00\xB10\x99\x00\x000\xB20\xB30\x99\x00\x000\xB40\xB50\x99\x00\x000\xB60\xB70\x99\x00\x000\xB80\xB90\x99\x00\x000\xBA0\xBB0\x99\x00\x000\xBC0\xBD0\x99\x00\x000\xBE0\xBF0\x99\x00\x000\xC00\xC10\x99\x00\x000\xC20\xC40\x99\x00\x000\xC50\xC60\x99\x00\x000\xC70\xC80\x99\x00\x000\xC90\xCF0\x99\x00\x000\xD00\xCF0\x9A\x00\x000\xD10\xD20\x99\x00\x000\xD30\xD20\x9A\x00\x000\xD40\xD50\x99\x00\x000\xD60\xD50\x9A\x00\x000\xD70\xD80\x99\x00\x000\xD90\xD80\x9A\x00\x000\xDA0\xDB0\x99\x00\x000\xDC0\xDB0\x9A\x00\x000\xDD0\xA60\x99\x00\x000\xF40\xEF0\x99\x00\x000\xF70\xF00\x99\x00\x000\xF80\xF10\x99\x00\x000\xF90\xF20\x99\x00\x000\xFA0\xFD0\x99\x00\x000\xFE\x10\x99\x10\xBA\x00\x01\x10\x9A\x10\x9B\x10\xBA\x00\x01\x10\x9C\x10\xA5\x10\xBA\x00\x01\x10\xAB\x111\x11'\x00\x01\x11.\x112\x11'\x00\x01\x11/\x13G\x13>\x00\x01\x13K\x13G\x13W\x00\x01\x13L\x14\xB9\x14\xBA\x00\x01\x14\xBB\x14\xB9\x14\xB0\x00\x01\x14\xBC\x14\xB9\x14\xBD\x00\x01\x14\xBE\x15\xB8\x15\xAF\x00\x01\x15\xBA\x15\xB9\x15\xAF\x00\x01\x15\xBB\x195\x190\x00\x01\x198", i, (i + 8 >> 0))); - key = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(new sliceType$4(buf), 0, 4)); - val = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(new sliceType$4(buf), 4)); - _key = key; (recompMap || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: ((val >> 0)) }; - i = i + (8) >> 0; - } - }; - combine = function(a, b) { - var _entry, a, b, key; - key = (((((a << 16 >>> 16)) >>> 0)) << 16 >>> 0) + ((((b << 16 >>> 16)) >>> 0)) >>> 0; - if (recompMap === false) { - $panic(new $String("caller error")); - } - return (_entry = recompMap[$Uint32.keyFor(key)], _entry !== undefined ? _entry.v : 0); - }; - lookupInfoNFC = function(b, i) { - var _tuple, b, i, sz, v; - _tuple = b.charinfoNFC(i); - v = _tuple[0]; - sz = _tuple[1]; - return compInfo(v, sz); - }; - lookupInfoNFKC = function(b, i) { - var _tuple, b, i, sz, v; - _tuple = b.charinfoNFKC(i); - v = _tuple[0]; - sz = _tuple[1]; - return compInfo(v, sz); - }; - Form.prototype.Properties = function(s) { - var _tuple, _tuple$1, f, s; - f = this.$val; - if ((f === 0) || (f === 1)) { - _tuple = nfcData.lookup(s); - return compInfo(_tuple[0], _tuple[1]); - } - _tuple$1 = nfkcData.lookup(s); - return compInfo(_tuple$1[0], _tuple$1[1]); - }; - $ptrType(Form).prototype.Properties = function(s) { return new Form(this.$get()).Properties(s); }; - Form.prototype.PropertiesString = function(s) { - var _tuple, _tuple$1, f, s; - f = this.$val; - if ((f === 0) || (f === 1)) { - _tuple = nfcData.lookupString(s); - return compInfo(_tuple[0], _tuple[1]); - } - _tuple$1 = nfkcData.lookupString(s); - return compInfo(_tuple$1[0], _tuple$1[1]); - }; - $ptrType(Form).prototype.PropertiesString = function(s) { return new Form(this.$get()).PropertiesString(s); }; - compInfo = function(v, sz) { - var c, f, h, p, p$1, sz, v, x; - if (v === 0) { - return new Properties.ptr(0, ((sz << 24 >>> 24)), 0, 0, 0, 0, 0); - } else if (v >= 32768) { - p = new Properties.ptr(0, ((sz << 24 >>> 24)), ((v << 24 >>> 24)), ((v << 24 >>> 24)), 0, (((v >>> 8 << 16 >>> 16) << 24 >>> 24)), 0); - if (p.ccc > 0 || $clone(p, Properties).combinesBackward()) { - p.nLead = ((((p.flags & 3) >>> 0) << 24 >>> 24)); - } - return p; - } - h = ((v < 0 || v >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[v]); - f = (((((((h & 192) >>> 0) << 24 >>> 24)) >>> 2 << 24 >>> 24)) | 4) >>> 0; - p$1 = new Properties.ptr(0, ((sz << 24 >>> 24)), 0, 0, 0, f, v); - if (v >= 11435) { - v = v + ((((((h & 63) >>> 0) << 16 >>> 16)) + 1 << 16 >>> 16)) << 16 >>> 16; - c = ((v < 0 || v >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[v]); - p$1.tccc = c >>> 2 << 24 >>> 24; - p$1.flags = (p$1.flags | (((((c & 3) >>> 0) << 24 >>> 24)))) >>> 0; - if (v >= 18885) { - p$1.nLead = (c & 3) >>> 0; - if (v >= 19126) { - p$1.flags = (p$1.flags & (3)) >>> 0; - p$1.index = 0; - return p$1; - } - p$1.ccc = (x = v + 1 << 16 >>> 16, ((x < 0 || x >= decomps.length) ? ($throwRuntimeError("index out of range"), undefined) : decomps[x])); - } - } - return p$1; - }; - $ptrType(streamSafe).prototype.first = function(p) { - var p, ss; - ss = this; - ss.$set((($clone(p, Properties).nTrailingNonStarters() << 24 >>> 24))); - }; - $ptrType(streamSafe).prototype.next = function(p) { - var n, p, ss; - ss = this; - if (ss.$get() > 30) { - $panic(new $String("streamSafe was not reset")); - } - n = $clone(p, Properties).nLeadingNonStarters(); - ss.$set(ss.$get() + (((n << 24 >>> 24))) << 24 >>> 24); - if (ss.$get() > 30) { - ss.$set(0); - return 2; - } - if (n === 0) { - ss.$set((($clone(p, Properties).nTrailingNonStarters() << 24 >>> 24))); - return 1; - } - return 0; - }; - $ptrType(streamSafe).prototype.backwards = function(p) { - var c, p, ss; - ss = this; - if (ss.$get() > 30) { - $panic(new $String("streamSafe was not reset")); - } - c = ss.$get() + (($clone(p, Properties).nTrailingNonStarters() << 24 >>> 24)) << 24 >>> 24; - if (c > 30) { - return 2; - } - ss.$set(c); - if ($clone(p, Properties).nLeadingNonStarters() === 0) { - return 1; - } - return 0; - }; - streamSafe.prototype.isMax = function() { - var ss; - ss = this.$val; - return ss === 30; - }; - $ptrType(streamSafe).prototype.isMax = function() { return new streamSafe(this.$get()).isMax(); }; - reorderBuffer.ptr.prototype.init = function(f, src) { - var f, rb, src; - rb = this; - formInfo.copy(rb.f, ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f])); - rb.src.setBytes(src); - rb.nsrc = src.$length; - rb.ss = 0; - }; - reorderBuffer.prototype.init = function(f, src) { return this.$val.init(f, src); }; - reorderBuffer.ptr.prototype.initString = function(f, src) { - var f, rb, src; - rb = this; - formInfo.copy(rb.f, ((f < 0 || f >= formTable.$length) ? ($throwRuntimeError("index out of range"), undefined) : formTable.$array[formTable.$offset + f])); - rb.src.setString(src); - rb.nsrc = src.length; - rb.ss = 0; - }; - reorderBuffer.prototype.initString = function(f, src) { return this.$val.initString(f, src); }; - reorderBuffer.ptr.prototype.setFlusher = function(out, f) { - var f, out, rb; - rb = this; - rb.out = out; - rb.flushF = f; - }; - reorderBuffer.prototype.setFlusher = function(out, f) { return this.$val.setFlusher(out, f); }; - reorderBuffer.ptr.prototype.reset = function() { - var rb; - rb = this; - rb.nrune = 0; - rb.nbyte = 0; - }; - reorderBuffer.prototype.reset = function() { return this.$val.reset(); }; - reorderBuffer.ptr.prototype.doFlush = function() { - var {_r, rb, res, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = this; - /* */ if (rb.f.composing) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (rb.f.composing) { */ case 1: - $r = rb.compose(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r = rb.flushF(rb); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - res = _r; - rb.reset(); - $s = -1; return res; - /* */ } return; } var $f = {$blk: reorderBuffer.ptr.prototype.doFlush, $c: true, $r, _r, rb, res, $s};return $f; - }; - reorderBuffer.prototype.doFlush = function() { return this.$val.doFlush(); }; - appendFlush = function(rb) { - var end, i, rb, start, x, x$1; - i = 0; - while (true) { - if (!(i < rb.nrune)) { break; } - start = (x = rb.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])).pos; - end = start + (x$1 = rb.rune, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i])).size << 24 >>> 24; - rb.out = $appendSlice(rb.out, $subslice(new sliceType$4(rb.byte$1), start, end)); - i = i + (1) >> 0; - } - return true; - }; - reorderBuffer.ptr.prototype.flushCopy = function(buf) { - var buf, i, p, rb, runep, x; - rb = this; - p = 0; - i = 0; - while (true) { - if (!(i < rb.nrune)) { break; } - runep = $clone((x = rb.rune, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])), Properties); - p = p + ($copySlice($subslice(buf, p), $subslice(new sliceType$4(rb.byte$1), runep.pos, (runep.pos + runep.size << 24 >>> 24)))) >> 0; - i = i + (1) >> 0; - } - rb.reset(); - return p; - }; - reorderBuffer.prototype.flushCopy = function(buf) { return this.$val.flushCopy(buf); }; - reorderBuffer.ptr.prototype.insertOrdered = function(info) { - var b, cc, info, n, pos, rb, x, x$1; - rb = this; - n = rb.nrune; - b = new sliceType$6(rb.rune); - cc = info.ccc; - if (cc > 0) { - while (true) { - if (!(n > 0)) { break; } - if ((x = n - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])).ccc <= cc) { - break; - } - Properties.copy(((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n]), (x$1 = n - 1 >> 0, ((x$1 < 0 || x$1 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$1]))); - n = n - (1) >> 0; - } - } - rb.nrune = rb.nrune + (1) >> 0; - pos = (rb.nbyte); - rb.nbyte = rb.nbyte + (4) << 24 >>> 24; - info.pos = pos; - Properties.copy(((n < 0 || n >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + n]), info); - }; - reorderBuffer.prototype.insertOrdered = function(info) { return this.$val.insertOrdered(info); }; - reorderBuffer.ptr.prototype.insertFlush = function(src, i, info) { - var {$24r, _r, i, info, rb, rune, src, $s, $r, $c} = $restore(this, {src, i, info}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = this; - rune = src.hangul(i); - if (!((rune === 0))) { - rb.decomposeHangul(rune); - $s = -1; return 0; - } - /* */ if ($clone(info, Properties).hasDecomposition()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(info, Properties).hasDecomposition()) { */ case 1: - _r = rb.insertDecomposed($clone(info, Properties).Decomposition()); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 4; case 4: return $24r; - /* } */ case 2: - rb.insertSingle($clone(src, input), i, $clone(info, Properties)); - $s = -1; return 0; - /* */ } return; } var $f = {$blk: reorderBuffer.ptr.prototype.insertFlush, $c: true, $r, $24r, _r, i, info, rb, rune, src, $s};return $f; - }; - reorderBuffer.prototype.insertFlush = function(src, i, info) { return this.$val.insertFlush(src, i, info); }; - reorderBuffer.ptr.prototype.insertUnsafe = function(src, i, info) { - var {_r, i, info, rb, rune, src, $s, $r, $c} = $restore(this, {src, i, info}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = this; - rune = src.hangul(i); - if (!((rune === 0))) { - rb.decomposeHangul(rune); - } - /* */ if ($clone(info, Properties).hasDecomposition()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone(info, Properties).hasDecomposition()) { */ case 1: - _r = rb.insertDecomposed($clone(info, Properties).Decomposition()); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = 3; continue; - /* } else { */ case 2: - rb.insertSingle($clone(src, input), i, $clone(info, Properties)); - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: reorderBuffer.ptr.prototype.insertUnsafe, $c: true, $r, _r, i, info, rb, rune, src, $s};return $f; - }; - reorderBuffer.prototype.insertUnsafe = function(src, i, info) { return this.$val.insertUnsafe(src, i, info); }; - reorderBuffer.ptr.prototype.insertDecomposed = function(dcomp) { - var {_r, _r$1, _v, dcomp, i, info, rb, $s, $r, $c} = $restore(this, {dcomp}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = this; - rb.tmpBytes.setBytes(dcomp); - i = 0; - /* while (true) { */ case 1: - /* if (!(i < dcomp.$length)) { break; } */ if(!(i < dcomp.$length)) { $s = 2; continue; } - _r = rb.f.info($clone(rb.tmpBytes, input), i); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - info = $clone(_r, Properties); - if (!($clone(info, Properties).BoundaryBefore() && rb.nrune > 0)) { _v = false; $s = 6; continue s; } - _r$1 = rb.doFlush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - $s = -1; return -1; - /* } */ case 5: - i = i + ($copySlice($subslice(new sliceType$4(rb.byte$1), rb.nbyte), $subslice(dcomp, i, (i + ((info.size >> 0)) >> 0)))) >> 0; - rb.insertOrdered($clone(info, Properties)); - $s = 1; continue; - case 2: - $s = -1; return 0; - /* */ } return; } var $f = {$blk: reorderBuffer.ptr.prototype.insertDecomposed, $c: true, $r, _r, _r$1, _v, dcomp, i, info, rb, $s};return $f; - }; - reorderBuffer.prototype.insertDecomposed = function(dcomp) { return this.$val.insertDecomposed(dcomp); }; - reorderBuffer.ptr.prototype.insertSingle = function(src, i, info) { - var i, info, rb, src; - rb = this; - src.copySlice($subslice(new sliceType$4(rb.byte$1), rb.nbyte), i, i + ((info.size >> 0)) >> 0); - rb.insertOrdered($clone(info, Properties)); - }; - reorderBuffer.prototype.insertSingle = function(src, i, info) { return this.$val.insertSingle(src, i, info); }; - reorderBuffer.ptr.prototype.insertCGJ = function() { - var rb; - rb = this; - rb.insertSingle(new input.ptr("\xCD\x8F", sliceType$4.nil), 0, new Properties.ptr(0, 2, 0, 0, 0, 0, 0)); - }; - reorderBuffer.prototype.insertCGJ = function() { return this.$val.insertCGJ(); }; - reorderBuffer.ptr.prototype.appendRune = function(r) { - var bn, r, rb, sz, x, x$1; - rb = this; - bn = rb.nbyte; - sz = utf8.EncodeRune($subslice(new sliceType$4(rb.byte$1), bn), (r)); - rb.nbyte = rb.nbyte + (4) << 24 >>> 24; - Properties.copy((x = rb.rune, x$1 = rb.nrune, ((x$1 < 0 || x$1 >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[x$1])), new Properties.ptr(bn, ((sz << 24 >>> 24)), 0, 0, 0, 0, 0)); - rb.nrune = rb.nrune + (1) >> 0; - }; - reorderBuffer.prototype.appendRune = function(r) { return this.$val.appendRune(r); }; - reorderBuffer.ptr.prototype.assignRune = function(pos, r) { - var bn, pos, r, rb, sz, x, x$1; - rb = this; - bn = (x = rb.rune, ((pos < 0 || pos >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[pos])).pos; - sz = utf8.EncodeRune($subslice(new sliceType$4(rb.byte$1), bn), (r)); - Properties.copy((x$1 = rb.rune, ((pos < 0 || pos >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[pos])), new Properties.ptr(bn, ((sz << 24 >>> 24)), 0, 0, 0, 0, 0)); - }; - reorderBuffer.prototype.assignRune = function(pos, r) { return this.$val.assignRune(pos, r); }; - reorderBuffer.ptr.prototype.runeAt = function(n) { - var _tuple, inf, n, r, rb, x; - rb = this; - inf = $clone((x = rb.rune, ((n < 0 || n >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[n])), Properties); - _tuple = utf8.DecodeRune($subslice(new sliceType$4(rb.byte$1), inf.pos, (inf.pos + inf.size << 24 >>> 24))); - r = _tuple[0]; - return r; - }; - reorderBuffer.prototype.runeAt = function(n) { return this.$val.runeAt(n); }; - reorderBuffer.ptr.prototype.bytesAt = function(n) { - var inf, n, rb, x; - rb = this; - inf = $clone((x = rb.rune, ((n < 0 || n >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[n])), Properties); - return $subslice(new sliceType$4(rb.byte$1), inf.pos, (((inf.pos >> 0)) + ((inf.size >> 0)) >> 0)); - }; - reorderBuffer.prototype.bytesAt = function(n) { return this.$val.bytesAt(n); }; - isHangul = function(b) { - var b, b0, b1; - if (b.$length < 3) { - return false; - } - b0 = (0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]); - if (b0 < 234) { - return false; - } - b1 = (1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]); - if ((b0 === 234)) { - return b1 >= 176; - } else if (b0 < 237) { - return true; - } else if (b0 > 237) { - return false; - } else if (b1 < 158) { - return true; - } - return (b1 === 158) && (2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) < 164; - }; - isHangulString = function(b) { - var b, b0, b1; - if (b.length < 3) { - return false; - } - b0 = b.charCodeAt(0); - if (b0 < 234) { - return false; - } - b1 = b.charCodeAt(1); - if ((b0 === 234)) { - return b1 >= 176; - } else if (b0 < 237) { - return true; - } else if (b0 > 237) { - return false; - } else if (b1 < 158) { - return true; - } - return (b1 === 158) && b.charCodeAt(2) < 164; - }; - isJamoVT = function(b) { - var b; - return ((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 225) && (((((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) & 252) >>> 0)) === 132); - }; - decomposeHangul = function(buf, r) { - var _q, _q$1, _r, _r$1, buf, r, x; - r = r - (44032) >> 0; - x = (_r = r % 28, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - r = (_q = r / (28), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - utf8.EncodeRune(buf, 4352 + (_q$1 = r / 21, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); - utf8.EncodeRune($subslice(buf, 3), 4449 + (_r$1 = r % 21, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0); - if (!((x === 0))) { - utf8.EncodeRune($subslice(buf, 6), 4519 + x >> 0); - return 9; - } - return 6; - }; - reorderBuffer.ptr.prototype.decomposeHangul = function(r) { - var _q, _q$1, _r, _r$1, r, rb, x; - rb = this; - r = r - (44032) >> 0; - x = (_r = r % 28, _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - r = (_q = r / (28), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - rb.appendRune(4352 + (_q$1 = r / 21, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0); - rb.appendRune(4449 + (_r$1 = r % 21, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) >> 0); - if (!((x === 0))) { - rb.appendRune(4519 + x >> 0); - } - }; - reorderBuffer.prototype.decomposeHangul = function(r) { return this.$val.decomposeHangul(r); }; - reorderBuffer.ptr.prototype.combineHangul = function(s, i, k) { - var _r, b, bn, cccB, cccC, i, k, l, rb, s, v, x; - rb = this; - b = new sliceType$6(rb.rune); - bn = rb.nrune; - while (true) { - if (!(i < bn)) { break; } - cccB = (x = k - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])).ccc; - cccC = ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]).ccc; - if (cccB === 0) { - s = k - 1 >> 0; - } - if (!((s === (k - 1 >> 0))) && cccB >= cccC) { - Properties.copy(((k < 0 || k >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + k]), ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])); - k = k + (1) >> 0; - } else { - l = rb.runeAt(s); - v = rb.runeAt(i); - if (4352 <= l && l < 4371 && 4449 <= v && v < 4470) { - rb.assignRune(s, (44032 + ($imul(((l - 4352 >> 0)), 588)) >> 0) + ($imul(((v - 4449 >> 0)), 28)) >> 0); - } else if (44032 <= l && l < 55204 && 4519 < v && v < 4547 && (((_r = ((l - 44032 >> 0)) % 28, _r === _r ? _r : $throwRuntimeError("integer divide by zero"))) === 0)) { - rb.assignRune(s, (l + v >> 0) - 4519 >> 0); - } else { - Properties.copy(((k < 0 || k >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + k]), ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])); - k = k + (1) >> 0; - } - } - i = i + (1) >> 0; - } - rb.nrune = k; - }; - reorderBuffer.prototype.combineHangul = function(s, i, k) { return this.$val.combineHangul(s, i, k); }; - reorderBuffer.ptr.prototype.compose = function() { - var {_tmp, _tmp$1, b, blocked, bn, cccB, cccC, combined, i, ii, k, rb, s, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rb = this; - $r = recompMapOnce.Do(buildRecompMap); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bn = rb.nrune; - if (bn === 0) { - $s = -1; return; - } - k = 1; - b = new sliceType$6(rb.rune); - _tmp = 0; - _tmp$1 = 1; - s = _tmp; - i = _tmp$1; - while (true) { - if (!(i < bn)) { break; } - if (isJamoVT(rb.bytesAt(i))) { - rb.combineHangul(s, i, k); - $s = -1; return; - } - ii = $clone(((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i]), Properties); - if ($clone(ii, Properties).combinesBackward()) { - cccB = (x = k - 1 >> 0, ((x < 0 || x >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x])).ccc; - cccC = ii.ccc; - blocked = false; - if (cccB === 0) { - s = k - 1 >> 0; - } else { - blocked = !((s === (k - 1 >> 0))) && cccB >= cccC; - } - if (!blocked) { - combined = combine(rb.runeAt(s), rb.runeAt(i)); - if (!((combined === 0))) { - rb.assignRune(s, combined); - i = i + (1) >> 0; - continue; - } - } - } - Properties.copy(((k < 0 || k >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + k]), ((i < 0 || i >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + i])); - k = k + (1) >> 0; - i = i + (1) >> 0; - } - rb.nrune = k; - $s = -1; return; - /* */ } return; } var $f = {$blk: reorderBuffer.ptr.prototype.compose, $c: true, $r, _tmp, _tmp$1, b, blocked, bn, cccB, cccC, combined, i, ii, k, rb, s, x, $s};return $f; - }; - reorderBuffer.prototype.compose = function() { return this.$val.compose(); }; - ptrType$2.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; - ptrType$3.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; - ptrType$4.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Uint16], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$String], [$Uint16], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; - ptrType$5.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$6.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$4], [$Int, $error], false)}]; - Form.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "Transform", name: "Transform", pkg: "", typ: $funcType([sliceType$4, sliceType$4, $Bool], [$Int, $Int, $error], false)}, {prop: "transform", name: "transform", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4, sliceType$4, $Bool], [$Int, $Int, $error], false)}, {prop: "Writer", name: "Writer", pkg: "", typ: $funcType([io.Writer], [io.WriteCloser], false)}, {prop: "Reader", name: "Reader", pkg: "", typ: $funcType([io.Reader], [io.Reader], false)}, {prop: "Bytes", name: "Bytes", pkg: "", typ: $funcType([sliceType$4], [sliceType$4], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "IsNormal", name: "IsNormal", pkg: "", typ: $funcType([sliceType$4], [$Bool], false)}, {prop: "IsNormalString", name: "IsNormalString", pkg: "", typ: $funcType([$String], [$Bool], false)}, {prop: "Append", name: "Append", pkg: "", typ: $funcType([sliceType$4, sliceType$4], [sliceType$4], true)}, {prop: "doAppend", name: "doAppend", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4, input, $Int], [sliceType$4], false)}, {prop: "AppendString", name: "AppendString", pkg: "", typ: $funcType([sliceType$4, $String], [sliceType$4], false)}, {prop: "QuickSpan", name: "QuickSpan", pkg: "", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "Span", name: "Span", pkg: "", typ: $funcType([sliceType$4, $Bool], [$Int, $error], false)}, {prop: "SpanString", name: "SpanString", pkg: "", typ: $funcType([$String, $Bool], [$Int, $error], false)}, {prop: "QuickSpanString", name: "QuickSpanString", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "FirstBoundary", name: "FirstBoundary", pkg: "", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "firstBoundary", name: "firstBoundary", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([input, $Int], [$Int], false)}, {prop: "FirstBoundaryInString", name: "FirstBoundaryInString", pkg: "", typ: $funcType([$String], [$Int], false)}, {prop: "NextBoundary", name: "NextBoundary", pkg: "", typ: $funcType([sliceType$4, $Bool], [$Int], false)}, {prop: "NextBoundaryInString", name: "NextBoundaryInString", pkg: "", typ: $funcType([$String, $Bool], [$Int], false)}, {prop: "nextBoundary", name: "nextBoundary", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([input, $Int, $Bool], [$Int], false)}, {prop: "LastBoundary", name: "LastBoundary", pkg: "", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "Properties", name: "Properties", pkg: "", typ: $funcType([sliceType$4], [Properties], false)}, {prop: "PropertiesString", name: "PropertiesString", pkg: "", typ: $funcType([$String], [Properties], false)}]; - ptrType$7.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([Form, sliceType$4], [], false)}, {prop: "InitString", name: "InitString", pkg: "", typ: $funcType([Form, $String], [], false)}, {prop: "Seek", name: "Seek", pkg: "", typ: $funcType([$Int64, $Int], [$Int64, $error], false)}, {prop: "returnSlice", name: "returnSlice", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int, $Int], [sliceType$4], false)}, {prop: "Pos", name: "Pos", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "setDone", name: "setDone", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Next", name: "Next", pkg: "", typ: $funcType([], [sliceType$4], false)}]; - ptrType$8.methods = [{prop: "setBytes", name: "setBytes", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [], false)}, {prop: "setString", name: "setString", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$String], [], false)}, {prop: "_byte", name: "_byte", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [$Uint8], false)}, {prop: "skipASCII", name: "skipASCII", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int, $Int], [$Int], false)}, {prop: "skipContinuationBytes", name: "skipContinuationBytes", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [$Int], false)}, {prop: "appendSlice", name: "appendSlice", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4, $Int, $Int], [sliceType$4], false)}, {prop: "copySlice", name: "copySlice", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4, $Int, $Int], [$Int], false)}, {prop: "charinfoNFC", name: "charinfoNFC", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [$Uint16, $Int], false)}, {prop: "charinfoNFKC", name: "charinfoNFKC", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [$Uint16, $Int], false)}, {prop: "hangul", name: "hangul", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [$Int32], false)}]; - Properties.methods = [{prop: "BoundaryBefore", name: "BoundaryBefore", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "BoundaryAfter", name: "BoundaryAfter", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "isYesC", name: "isYesC", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "isYesD", name: "isYesD", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "combinesForward", name: "combinesForward", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "combinesBackward", name: "combinesBackward", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "hasDecomposition", name: "hasDecomposition", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "isInert", name: "isInert", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "multiSegment", name: "multiSegment", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "nLeadingNonStarters", name: "nLeadingNonStarters", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Uint8], false)}, {prop: "nTrailingNonStarters", name: "nTrailingNonStarters", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Uint8], false)}, {prop: "Decomposition", name: "Decomposition", pkg: "", typ: $funcType([], [sliceType$4], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "CCC", name: "CCC", pkg: "", typ: $funcType([], [$Uint8], false)}, {prop: "LeadCCC", name: "LeadCCC", pkg: "", typ: $funcType([], [$Uint8], false)}, {prop: "TrailCCC", name: "TrailCCC", pkg: "", typ: $funcType([], [$Uint8], false)}]; - ptrType.methods = [{prop: "quickSpan", name: "quickSpan", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([input, $Int, $Int, $Bool], [$Int, $Bool], false)}]; - streamSafe.methods = [{prop: "isMax", name: "isMax", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}]; - ptrType$1.methods = [{prop: "first", name: "first", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([Properties], [], false)}, {prop: "next", name: "next", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([Properties], [ssState], false)}, {prop: "backwards", name: "backwards", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([Properties], [ssState], false)}]; - ptrType$9.methods = [{prop: "init", name: "init", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([Form, sliceType$4], [], false)}, {prop: "initString", name: "initString", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([Form, $String], [], false)}, {prop: "setFlusher", name: "setFlusher", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4, funcType], [], false)}, {prop: "reset", name: "reset", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [], false)}, {prop: "doFlush", name: "doFlush", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [$Bool], false)}, {prop: "flush", name: "flush", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [sliceType$4], false)}, {prop: "flushCopy", name: "flushCopy", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [$Int], false)}, {prop: "insertOrdered", name: "insertOrdered", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([Properties], [], false)}, {prop: "insertFlush", name: "insertFlush", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([input, $Int, Properties], [insertErr], false)}, {prop: "insertUnsafe", name: "insertUnsafe", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([input, $Int, Properties], [], false)}, {prop: "insertDecomposed", name: "insertDecomposed", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([sliceType$4], [insertErr], false)}, {prop: "insertSingle", name: "insertSingle", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([input, $Int, Properties], [], false)}, {prop: "insertCGJ", name: "insertCGJ", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [], false)}, {prop: "appendRune", name: "appendRune", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int32], [], false)}, {prop: "assignRune", name: "assignRune", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int, $Int32], [], false)}, {prop: "runeAt", name: "runeAt", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [$Int32], false)}, {prop: "bytesAt", name: "bytesAt", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int], [sliceType$4], false)}, {prop: "decomposeHangul", name: "decomposeHangul", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int32], [], false)}, {prop: "combineHangul", name: "combineHangul", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([$Int, $Int, $Int], [], false)}, {prop: "compose", name: "compose", pkg: "vendor/golang.org/x/text/unicode/norm", typ: $funcType([], [], false)}]; - valueRange.init("vendor/golang.org/x/text/unicode/norm", [{prop: "value", name: "value", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - sparseBlocks.init("vendor/golang.org/x/text/unicode/norm", [{prop: "values", name: "values", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - nfcTrie.init("", []); - nfkcTrie.init("", []); - normWriter.init("vendor/golang.org/x/text/unicode/norm", [{prop: "rb", name: "rb", embedded: false, exported: false, typ: reorderBuffer, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); - normReader.init("vendor/golang.org/x/text/unicode/norm", [{prop: "rb", name: "rb", embedded: false, exported: false, typ: reorderBuffer, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "inbuf", name: "inbuf", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "outbuf", name: "outbuf", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "bufStart", name: "bufStart", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "lastBoundary", name: "lastBoundary", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - Iter.init("vendor/golang.org/x/text/unicode/norm", [{prop: "rb", name: "rb", embedded: false, exported: false, typ: reorderBuffer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: Properties, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: iterFunc, tag: ""}, {prop: "asciiF", name: "asciiF", embedded: false, exported: false, typ: iterFunc, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "multiSeg", name: "multiSeg", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); - iterFunc.init([ptrType$7], [sliceType$4], false); - input.init("vendor/golang.org/x/text/unicode/norm", [{prop: "str", name: "str", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: sliceType$4, tag: ""}]); - Properties.init("vendor/golang.org/x/text/unicode/norm", [{prop: "pos", name: "pos", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "ccc", name: "ccc", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "tccc", name: "tccc", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "nLead", name: "nLead", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "flags", name: "flags", embedded: false, exported: false, typ: qcInfo, tag: ""}, {prop: "index", name: "index", embedded: false, exported: false, typ: $Uint16, tag: ""}]); - lookupFunc.init([input, $Int], [Properties], false); - formInfo.init("vendor/golang.org/x/text/unicode/norm", [{prop: "form", name: "form", embedded: false, exported: false, typ: Form, tag: ""}, {prop: "composing", name: "composing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "compatibility", name: "compatibility", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "info", name: "info", embedded: false, exported: false, typ: lookupFunc, tag: ""}, {prop: "nextMain", name: "nextMain", embedded: false, exported: false, typ: iterFunc, tag: ""}]); - reorderBuffer.init("vendor/golang.org/x/text/unicode/norm", [{prop: "rune", name: "rune", embedded: false, exported: false, typ: arrayType, tag: ""}, {prop: "byte$1", name: "byte", embedded: false, exported: false, typ: arrayType$1, tag: ""}, {prop: "nbyte", name: "nbyte", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "ss", name: "ss", embedded: false, exported: false, typ: streamSafe, tag: ""}, {prop: "nrune", name: "nrune", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "f", name: "f", embedded: false, exported: false, typ: formInfo, tag: ""}, {prop: "src", name: "src", embedded: false, exported: false, typ: input, tag: ""}, {prop: "nsrc", name: "nsrc", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tmpBytes", name: "tmpBytes", embedded: false, exported: false, typ: input, tag: ""}, {prop: "out", name: "out", embedded: false, exported: false, typ: sliceType$4, tag: ""}, {prop: "flushF", name: "flushF", embedded: false, exported: false, typ: funcType, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = binary.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = transform.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - recompMap = false; - recompMapOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - nfcData = newNfcTrie(0); - nfkcData = newNfkcTrie(0); - errs = new sliceType([$ifaceNil, transform.ErrShortDst, transform.ErrShortSrc]); - ccc = $toNativeArray($kindUint8, [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 84, 91, 103, 107, 118, 122, 129, 130, 132, 202, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 233, 234, 240]); - decomps = $toNativeArray($kindUint8, [0, 65, 32, 65, 33, 65, 34, 65, 35, 65, 36, 65, 37, 65, 38, 65, 39, 65, 40, 65, 41, 65, 42, 65, 43, 65, 44, 65, 45, 65, 46, 65, 47, 65, 48, 65, 49, 65, 50, 65, 51, 65, 52, 65, 53, 65, 54, 65, 55, 65, 56, 65, 57, 65, 58, 65, 59, 65, 60, 65, 61, 65, 62, 65, 63, 65, 64, 65, 65, 65, 66, 65, 67, 65, 68, 65, 69, 65, 70, 65, 71, 65, 72, 65, 73, 65, 74, 65, 75, 65, 76, 65, 77, 65, 78, 65, 79, 65, 80, 65, 81, 65, 82, 65, 83, 65, 84, 65, 85, 65, 86, 65, 87, 65, 88, 65, 89, 65, 90, 65, 91, 65, 92, 65, 93, 65, 94, 65, 95, 65, 96, 65, 97, 65, 98, 65, 99, 65, 100, 65, 101, 65, 102, 65, 103, 65, 104, 65, 105, 65, 106, 65, 107, 65, 108, 65, 109, 65, 110, 65, 111, 65, 112, 65, 113, 65, 114, 65, 115, 65, 116, 65, 117, 65, 118, 65, 119, 65, 120, 65, 121, 65, 122, 65, 123, 65, 124, 65, 125, 65, 126, 66, 194, 162, 66, 194, 163, 66, 194, 165, 66, 194, 166, 66, 194, 172, 66, 194, 183, 66, 195, 134, 66, 195, 176, 66, 196, 166, 66, 196, 167, 66, 196, 177, 66, 197, 139, 66, 197, 147, 66, 198, 142, 66, 198, 144, 66, 198, 171, 66, 200, 162, 66, 200, 183, 66, 201, 144, 66, 201, 145, 66, 201, 146, 66, 201, 148, 66, 201, 149, 66, 201, 153, 66, 201, 155, 66, 201, 156, 66, 201, 159, 66, 201, 161, 66, 201, 163, 66, 201, 165, 66, 201, 166, 66, 201, 168, 66, 201, 169, 66, 201, 170, 66, 201, 171, 66, 201, 173, 66, 201, 175, 66, 201, 176, 66, 201, 177, 66, 201, 178, 66, 201, 179, 66, 201, 180, 66, 201, 181, 66, 201, 184, 66, 201, 185, 66, 201, 187, 66, 202, 129, 66, 202, 130, 66, 202, 131, 66, 202, 137, 66, 202, 138, 66, 202, 139, 66, 202, 140, 66, 202, 141, 66, 202, 144, 66, 202, 145, 66, 202, 146, 66, 202, 149, 66, 202, 157, 66, 202, 159, 66, 202, 185, 66, 206, 145, 66, 206, 146, 66, 206, 147, 66, 206, 148, 66, 206, 149, 66, 206, 150, 66, 206, 151, 66, 206, 152, 66, 206, 153, 66, 206, 154, 66, 206, 155, 66, 206, 156, 66, 206, 157, 66, 206, 158, 66, 206, 159, 66, 206, 160, 66, 206, 161, 66, 206, 163, 66, 206, 164, 66, 206, 165, 66, 206, 166, 66, 206, 167, 66, 206, 168, 66, 206, 169, 66, 206, 177, 66, 206, 178, 66, 206, 179, 66, 206, 180, 66, 206, 181, 66, 206, 182, 66, 206, 183, 66, 206, 184, 66, 206, 185, 66, 206, 186, 66, 206, 187, 66, 206, 188, 66, 206, 189, 66, 206, 190, 66, 206, 191, 66, 207, 128, 66, 207, 129, 66, 207, 130, 66, 207, 131, 66, 207, 132, 66, 207, 133, 66, 207, 134, 66, 207, 135, 66, 207, 136, 66, 207, 137, 66, 207, 156, 66, 207, 157, 66, 208, 189, 66, 209, 138, 66, 209, 140, 66, 215, 144, 66, 215, 145, 66, 215, 146, 66, 215, 147, 66, 215, 148, 66, 215, 155, 66, 215, 156, 66, 215, 157, 66, 215, 162, 66, 215, 168, 66, 215, 170, 66, 216, 161, 66, 216, 167, 66, 216, 168, 66, 216, 169, 66, 216, 170, 66, 216, 171, 66, 216, 172, 66, 216, 173, 66, 216, 174, 66, 216, 175, 66, 216, 176, 66, 216, 177, 66, 216, 178, 66, 216, 179, 66, 216, 180, 66, 216, 181, 66, 216, 182, 66, 216, 183, 66, 216, 184, 66, 216, 185, 66, 216, 186, 66, 217, 129, 66, 217, 130, 66, 217, 131, 66, 217, 132, 66, 217, 133, 66, 217, 134, 66, 217, 135, 66, 217, 136, 66, 217, 137, 66, 217, 138, 66, 217, 174, 66, 217, 175, 66, 217, 177, 66, 217, 185, 66, 217, 186, 66, 217, 187, 66, 217, 190, 66, 217, 191, 66, 218, 128, 66, 218, 131, 66, 218, 132, 66, 218, 134, 66, 218, 135, 66, 218, 136, 66, 218, 140, 66, 218, 141, 66, 218, 142, 66, 218, 145, 66, 218, 152, 66, 218, 161, 66, 218, 164, 66, 218, 166, 66, 218, 169, 66, 218, 173, 66, 218, 175, 66, 218, 177, 66, 218, 179, 66, 218, 186, 66, 218, 187, 66, 218, 190, 66, 219, 129, 66, 219, 133, 66, 219, 134, 66, 219, 135, 66, 219, 136, 66, 219, 137, 66, 219, 139, 66, 219, 140, 66, 219, 144, 66, 219, 146, 67, 224, 188, 139, 67, 225, 131, 156, 67, 225, 132, 128, 67, 225, 132, 129, 67, 225, 132, 130, 67, 225, 132, 131, 67, 225, 132, 132, 67, 225, 132, 133, 67, 225, 132, 134, 67, 225, 132, 135, 67, 225, 132, 136, 67, 225, 132, 137, 67, 225, 132, 138, 67, 225, 132, 139, 67, 225, 132, 140, 67, 225, 132, 141, 67, 225, 132, 142, 67, 225, 132, 143, 67, 225, 132, 144, 67, 225, 132, 145, 67, 225, 132, 146, 67, 225, 132, 148, 67, 225, 132, 149, 67, 225, 132, 154, 67, 225, 132, 156, 67, 225, 132, 157, 67, 225, 132, 158, 67, 225, 132, 160, 67, 225, 132, 161, 67, 225, 132, 162, 67, 225, 132, 163, 67, 225, 132, 167, 67, 225, 132, 169, 67, 225, 132, 171, 67, 225, 132, 172, 67, 225, 132, 173, 67, 225, 132, 174, 67, 225, 132, 175, 67, 225, 132, 178, 67, 225, 132, 182, 67, 225, 133, 128, 67, 225, 133, 135, 67, 225, 133, 140, 67, 225, 133, 151, 67, 225, 133, 152, 67, 225, 133, 153, 67, 225, 133, 160, 67, 225, 134, 132, 67, 225, 134, 133, 67, 225, 134, 136, 67, 225, 134, 145, 67, 225, 134, 146, 67, 225, 134, 148, 67, 225, 134, 158, 67, 225, 134, 161, 67, 225, 135, 135, 67, 225, 135, 136, 67, 225, 135, 140, 67, 225, 135, 142, 67, 225, 135, 147, 67, 225, 135, 151, 67, 225, 135, 153, 67, 225, 135, 157, 67, 225, 135, 159, 67, 225, 135, 177, 67, 225, 135, 178, 67, 225, 180, 130, 67, 225, 180, 150, 67, 225, 180, 151, 67, 225, 180, 156, 67, 225, 180, 157, 67, 225, 180, 165, 67, 225, 181, 187, 67, 225, 182, 133, 67, 226, 128, 130, 67, 226, 128, 131, 67, 226, 128, 144, 67, 226, 128, 147, 67, 226, 128, 148, 67, 226, 130, 169, 67, 226, 134, 144, 67, 226, 134, 145, 67, 226, 134, 146, 67, 226, 134, 147, 67, 226, 136, 130, 67, 226, 136, 135, 67, 226, 136, 145, 67, 226, 136, 146, 67, 226, 148, 130, 67, 226, 150, 160, 67, 226, 151, 139, 67, 226, 166, 133, 67, 226, 166, 134, 67, 226, 181, 161, 67, 227, 128, 129, 67, 227, 128, 130, 67, 227, 128, 136, 67, 227, 128, 137, 67, 227, 128, 138, 67, 227, 128, 139, 67, 227, 128, 140, 67, 227, 128, 141, 67, 227, 128, 142, 67, 227, 128, 143, 67, 227, 128, 144, 67, 227, 128, 145, 67, 227, 128, 146, 67, 227, 128, 148, 67, 227, 128, 149, 67, 227, 128, 150, 67, 227, 128, 151, 67, 227, 130, 161, 67, 227, 130, 162, 67, 227, 130, 163, 67, 227, 130, 164, 67, 227, 130, 165, 67, 227, 130, 166, 67, 227, 130, 167, 67, 227, 130, 168, 67, 227, 130, 169, 67, 227, 130, 170, 67, 227, 130, 171, 67, 227, 130, 173, 67, 227, 130, 175, 67, 227, 130, 177, 67, 227, 130, 179, 67, 227, 130, 181, 67, 227, 130, 183, 67, 227, 130, 185, 67, 227, 130, 187, 67, 227, 130, 189, 67, 227, 130, 191, 67, 227, 131, 129, 67, 227, 131, 131, 67, 227, 131, 132, 67, 227, 131, 134, 67, 227, 131, 136, 67, 227, 131, 138, 67, 227, 131, 139, 67, 227, 131, 140, 67, 227, 131, 141, 67, 227, 131, 142, 67, 227, 131, 143, 67, 227, 131, 146, 67, 227, 131, 149, 67, 227, 131, 152, 67, 227, 131, 155, 67, 227, 131, 158, 67, 227, 131, 159, 67, 227, 131, 160, 67, 227, 131, 161, 67, 227, 131, 162, 67, 227, 131, 163, 67, 227, 131, 164, 67, 227, 131, 165, 67, 227, 131, 166, 67, 227, 131, 167, 67, 227, 131, 168, 67, 227, 131, 169, 67, 227, 131, 170, 67, 227, 131, 171, 67, 227, 131, 172, 67, 227, 131, 173, 67, 227, 131, 175, 67, 227, 131, 176, 67, 227, 131, 177, 67, 227, 131, 178, 67, 227, 131, 179, 67, 227, 131, 187, 67, 227, 131, 188, 67, 227, 146, 158, 67, 227, 146, 185, 67, 227, 146, 187, 67, 227, 147, 159, 67, 227, 148, 149, 67, 227, 155, 174, 67, 227, 155, 188, 67, 227, 158, 129, 67, 227, 160, 175, 67, 227, 161, 162, 67, 227, 161, 188, 67, 227, 163, 135, 67, 227, 163, 163, 67, 227, 164, 156, 67, 227, 164, 186, 67, 227, 168, 174, 67, 227, 169, 172, 67, 227, 171, 164, 67, 227, 172, 136, 67, 227, 172, 153, 67, 227, 173, 137, 67, 227, 174, 157, 67, 227, 176, 152, 67, 227, 177, 142, 67, 227, 180, 179, 67, 227, 182, 150, 67, 227, 186, 172, 67, 227, 186, 184, 67, 227, 188, 155, 67, 227, 191, 188, 67, 228, 128, 136, 67, 228, 128, 152, 67, 228, 128, 185, 67, 228, 129, 134, 67, 228, 130, 150, 67, 228, 131, 163, 67, 228, 132, 175, 67, 228, 136, 130, 67, 228, 136, 167, 67, 228, 138, 160, 67, 228, 140, 129, 67, 228, 140, 180, 67, 228, 141, 153, 67, 228, 143, 149, 67, 228, 143, 153, 67, 228, 144, 139, 67, 228, 145, 171, 67, 228, 148, 171, 67, 228, 149, 157, 67, 228, 149, 161, 67, 228, 149, 171, 67, 228, 151, 151, 67, 228, 151, 185, 67, 228, 152, 181, 67, 228, 154, 190, 67, 228, 155, 135, 67, 228, 166, 149, 67, 228, 167, 166, 67, 228, 169, 174, 67, 228, 169, 182, 67, 228, 170, 178, 67, 228, 172, 179, 67, 228, 175, 142, 67, 228, 179, 142, 67, 228, 179, 173, 67, 228, 179, 184, 67, 228, 181, 150, 67, 228, 184, 128, 67, 228, 184, 129, 67, 228, 184, 131, 67, 228, 184, 137, 67, 228, 184, 138, 67, 228, 184, 139, 67, 228, 184, 141, 67, 228, 184, 153, 67, 228, 184, 166, 67, 228, 184, 168, 67, 228, 184, 173, 67, 228, 184, 178, 67, 228, 184, 182, 67, 228, 184, 184, 67, 228, 184, 185, 67, 228, 184, 189, 67, 228, 184, 191, 67, 228, 185, 129, 67, 228, 185, 153, 67, 228, 185, 157, 67, 228, 186, 130, 67, 228, 186, 133, 67, 228, 186, 134, 67, 228, 186, 140, 67, 228, 186, 148, 67, 228, 186, 160, 67, 228, 186, 164, 67, 228, 186, 174, 67, 228, 186, 186, 67, 228, 187, 128, 67, 228, 187, 140, 67, 228, 187, 164, 67, 228, 188, 129, 67, 228, 188, 145, 67, 228, 189, 160, 67, 228, 190, 128, 67, 228, 190, 134, 67, 228, 190, 139, 67, 228, 190, 174, 67, 228, 190, 187, 67, 228, 190, 191, 67, 229, 128, 130, 67, 229, 128, 171, 67, 229, 129, 186, 67, 229, 130, 153, 67, 229, 131, 143, 67, 229, 131, 154, 67, 229, 131, 167, 67, 229, 132, 170, 67, 229, 132, 191, 67, 229, 133, 128, 67, 229, 133, 133, 67, 229, 133, 141, 67, 229, 133, 148, 67, 229, 133, 164, 67, 229, 133, 165, 67, 229, 133, 167, 67, 229, 133, 168, 67, 229, 133, 169, 67, 229, 133, 171, 67, 229, 133, 173, 67, 229, 133, 183, 67, 229, 134, 128, 67, 229, 134, 130, 67, 229, 134, 141, 67, 229, 134, 146, 67, 229, 134, 149, 67, 229, 134, 150, 67, 229, 134, 151, 67, 229, 134, 153, 67, 229, 134, 164, 67, 229, 134, 171, 67, 229, 134, 172, 67, 229, 134, 181, 67, 229, 134, 183, 67, 229, 135, 137, 67, 229, 135, 140, 67, 229, 135, 156, 67, 229, 135, 158, 67, 229, 135, 160, 67, 229, 135, 181, 67, 229, 136, 128, 67, 229, 136, 131, 67, 229, 136, 135, 67, 229, 136, 151, 67, 229, 136, 157, 67, 229, 136, 169, 67, 229, 136, 186, 67, 229, 136, 187, 67, 229, 137, 134, 67, 229, 137, 141, 67, 229, 137, 178, 67, 229, 137, 183, 67, 229, 138, 137, 67, 229, 138, 155, 67, 229, 138, 163, 67, 229, 138, 179, 67, 229, 138, 180, 67, 229, 139, 135, 67, 229, 139, 137, 67, 229, 139, 146, 67, 229, 139, 158, 67, 229, 139, 164, 67, 229, 139, 181, 67, 229, 139, 185, 67, 229, 139, 186, 67, 229, 140, 133, 67, 229, 140, 134, 67, 229, 140, 149, 67, 229, 140, 151, 67, 229, 140, 154, 67, 229, 140, 184, 67, 229, 140, 187, 67, 229, 140, 191, 67, 229, 141, 129, 67, 229, 141, 132, 67, 229, 141, 133, 67, 229, 141, 137, 67, 229, 141, 145, 67, 229, 141, 148, 67, 229, 141, 154, 67, 229, 141, 156, 67, 229, 141, 169, 67, 229, 141, 176, 67, 229, 141, 179, 67, 229, 141, 181, 67, 229, 141, 189, 67, 229, 141, 191, 67, 229, 142, 130, 67, 229, 142, 182, 67, 229, 143, 131, 67, 229, 143, 136, 67, 229, 143, 138, 67, 229, 143, 140, 67, 229, 143, 159, 67, 229, 143, 163, 67, 229, 143, 165, 67, 229, 143, 171, 67, 229, 143, 175, 67, 229, 143, 177, 67, 229, 143, 179, 67, 229, 144, 134, 67, 229, 144, 136, 67, 229, 144, 141, 67, 229, 144, 143, 67, 229, 144, 157, 67, 229, 144, 184, 67, 229, 144, 185, 67, 229, 145, 130, 67, 229, 145, 136, 67, 229, 145, 168, 67, 229, 146, 158, 67, 229, 146, 162, 67, 229, 146, 189, 67, 229, 147, 182, 67, 229, 148, 144, 67, 229, 149, 143, 67, 229, 149, 147, 67, 229, 149, 149, 67, 229, 149, 163, 67, 229, 150, 132, 67, 229, 150, 135, 67, 229, 150, 153, 67, 229, 150, 157, 67, 229, 150, 171, 67, 229, 150, 179, 67, 229, 150, 182, 67, 229, 151, 128, 67, 229, 151, 130, 67, 229, 151, 162, 67, 229, 152, 134, 67, 229, 153, 145, 67, 229, 153, 168, 67, 229, 153, 180, 67, 229, 155, 151, 67, 229, 155, 155, 67, 229, 155, 185, 67, 229, 156, 150, 67, 229, 156, 151, 67, 229, 156, 159, 67, 229, 156, 176, 67, 229, 158, 139, 67, 229, 159, 142, 67, 229, 159, 180, 67, 229, 160, 141, 67, 229, 160, 177, 67, 229, 160, 178, 67, 229, 161, 128, 67, 229, 161, 154, 67, 229, 161, 158, 67, 229, 162, 168, 67, 229, 162, 172, 67, 229, 162, 179, 67, 229, 163, 152, 67, 229, 163, 159, 67, 229, 163, 171, 67, 229, 163, 174, 67, 229, 163, 176, 67, 229, 163, 178, 67, 229, 163, 183, 67, 229, 164, 130, 67, 229, 164, 134, 67, 229, 164, 138, 67, 229, 164, 149, 67, 229, 164, 154, 67, 229, 164, 156, 67, 229, 164, 162, 67, 229, 164, 167, 67, 229, 164, 169, 67, 229, 165, 132, 67, 229, 165, 136, 67, 229, 165, 145, 67, 229, 165, 148, 67, 229, 165, 162, 67, 229, 165, 179, 67, 229, 167, 152, 67, 229, 167, 172, 67, 229, 168, 155, 67, 229, 168, 167, 67, 229, 169, 162, 67, 229, 169, 166, 67, 229, 170, 181, 67, 229, 172, 136, 67, 229, 172, 168, 67, 229, 172, 190, 67, 229, 173, 144, 67, 229, 173, 151, 67, 229, 173, 166, 67, 229, 174, 128, 67, 229, 174, 133, 67, 229, 174, 151, 67, 229, 175, 131, 67, 229, 175, 152, 67, 229, 175, 167, 67, 229, 175, 174, 67, 229, 175, 179, 67, 229, 175, 184, 67, 229, 175, 191, 67, 229, 176, 134, 67, 229, 176, 143, 67, 229, 176, 162, 67, 229, 176, 184, 67, 229, 176, 191, 67, 229, 177, 160, 67, 229, 177, 162, 67, 229, 177, 164, 67, 229, 177, 165, 67, 229, 177, 174, 67, 229, 177, 177, 67, 229, 178, 141, 67, 229, 179, 128, 67, 229, 180, 153, 67, 229, 181, 131, 67, 229, 181, 144, 67, 229, 181, 171, 67, 229, 181, 174, 67, 229, 181, 188, 67, 229, 182, 178, 67, 229, 182, 186, 67, 229, 183, 155, 67, 229, 183, 161, 67, 229, 183, 162, 67, 229, 183, 165, 67, 229, 183, 166, 67, 229, 183, 177, 67, 229, 183, 189, 67, 229, 183, 190, 67, 229, 184, 168, 67, 229, 184, 189, 67, 229, 185, 169, 67, 229, 185, 178, 67, 229, 185, 180, 67, 229, 185, 186, 67, 229, 185, 188, 67, 229, 185, 191, 67, 229, 186, 166, 67, 229, 186, 176, 67, 229, 186, 179, 67, 229, 186, 182, 67, 229, 187, 137, 67, 229, 187, 138, 67, 229, 187, 146, 67, 229, 187, 147, 67, 229, 187, 153, 67, 229, 187, 172, 67, 229, 187, 180, 67, 229, 187, 190, 67, 229, 188, 132, 67, 229, 188, 139, 67, 229, 188, 147, 67, 229, 188, 162, 67, 229, 189, 144, 67, 229, 189, 147, 67, 229, 189, 161, 67, 229, 189, 162, 67, 229, 189, 169, 67, 229, 189, 171, 67, 229, 189, 179, 67, 229, 190, 139, 67, 229, 190, 140, 67, 229, 190, 151, 67, 229, 190, 154, 67, 229, 190, 169, 67, 229, 190, 173, 67, 229, 191, 131, 67, 229, 191, 141, 67, 229, 191, 151, 67, 229, 191, 181, 67, 229, 191, 185, 67, 230, 128, 146, 67, 230, 128, 156, 67, 230, 129, 181, 67, 230, 130, 129, 67, 230, 130, 148, 67, 230, 131, 135, 67, 230, 131, 152, 67, 230, 131, 161, 67, 230, 132, 136, 67, 230, 133, 132, 67, 230, 133, 136, 67, 230, 133, 140, 67, 230, 133, 142, 67, 230, 133, 160, 67, 230, 133, 168, 67, 230, 133, 186, 67, 230, 134, 142, 67, 230, 134, 144, 67, 230, 134, 164, 67, 230, 134, 175, 67, 230, 134, 178, 67, 230, 135, 158, 67, 230, 135, 178, 67, 230, 135, 182, 67, 230, 136, 128, 67, 230, 136, 136, 67, 230, 136, 144, 67, 230, 136, 155, 67, 230, 136, 174, 67, 230, 136, 180, 67, 230, 136, 182, 67, 230, 137, 139, 67, 230, 137, 147, 67, 230, 137, 157, 67, 230, 138, 149, 67, 230, 138, 177, 67, 230, 139, 137, 67, 230, 139, 143, 67, 230, 139, 147, 67, 230, 139, 148, 67, 230, 139, 188, 67, 230, 139, 190, 67, 230, 140, 135, 67, 230, 140, 189, 67, 230, 141, 144, 67, 230, 141, 149, 67, 230, 141, 168, 67, 230, 141, 187, 67, 230, 142, 131, 67, 230, 142, 160, 67, 230, 142, 169, 67, 230, 143, 132, 67, 230, 143, 133, 67, 230, 143, 164, 67, 230, 144, 156, 67, 230, 144, 162, 67, 230, 145, 146, 67, 230, 145, 169, 67, 230, 145, 183, 67, 230, 145, 190, 67, 230, 146, 154, 67, 230, 146, 157, 67, 230, 147, 132, 67, 230, 148, 175, 67, 230, 148, 180, 67, 230, 149, 143, 67, 230, 149, 150, 67, 230, 149, 172, 67, 230, 149, 184, 67, 230, 150, 135, 67, 230, 150, 151, 67, 230, 150, 153, 67, 230, 150, 164, 67, 230, 150, 176, 67, 230, 150, 185, 67, 230, 151, 133, 67, 230, 151, 160, 67, 230, 151, 162, 67, 230, 151, 163, 67, 230, 151, 165, 67, 230, 152, 147, 67, 230, 152, 160, 67, 230, 153, 137, 67, 230, 153, 180, 67, 230, 154, 136, 67, 230, 154, 145, 67, 230, 154, 156, 67, 230, 154, 180, 67, 230, 155, 134, 67, 230, 155, 176, 67, 230, 155, 180, 67, 230, 155, 184, 67, 230, 156, 128, 67, 230, 156, 136, 67, 230, 156, 137, 67, 230, 156, 151, 67, 230, 156, 155, 67, 230, 156, 161, 67, 230, 156, 168, 67, 230, 157, 142, 67, 230, 157, 147, 67, 230, 157, 150, 67, 230, 157, 158, 67, 230, 157, 187, 67, 230, 158, 133, 67, 230, 158, 151, 67, 230, 159, 179, 67, 230, 159, 186, 67, 230, 160, 151, 67, 230, 160, 159, 67, 230, 160, 170, 67, 230, 161, 146, 67, 230, 162, 129, 67, 230, 162, 133, 67, 230, 162, 142, 67, 230, 162, 168, 67, 230, 164, 148, 67, 230, 165, 130, 67, 230, 166, 163, 67, 230, 167, 170, 67, 230, 168, 130, 67, 230, 168, 147, 67, 230, 170, 168, 67, 230, 171, 147, 67, 230, 171, 155, 67, 230, 172, 132, 67, 230, 172, 160, 67, 230, 172, 161, 67, 230, 173, 148, 67, 230, 173, 162, 67, 230, 173, 163, 67, 230, 173, 178, 67, 230, 173, 183, 67, 230, 173, 185, 67, 230, 174, 159, 67, 230, 174, 174, 67, 230, 174, 179, 67, 230, 174, 186, 67, 230, 174, 187, 67, 230, 175, 139, 67, 230, 175, 141, 67, 230, 175, 148, 67, 230, 175, 155, 67, 230, 176, 143, 67, 230, 176, 148, 67, 230, 176, 180, 67, 230, 177, 142, 67, 230, 177, 167, 67, 230, 178, 136, 67, 230, 178, 191, 67, 230, 179, 140, 67, 230, 179, 141, 67, 230, 179, 165, 67, 230, 179, 168, 67, 230, 180, 150, 67, 230, 180, 155, 67, 230, 180, 158, 67, 230, 180, 180, 67, 230, 180, 190, 67, 230, 181, 129, 67, 230, 181, 169, 67, 230, 181, 170, 67, 230, 181, 183, 67, 230, 181, 184, 67, 230, 182, 133, 67, 230, 183, 139, 67, 230, 183, 154, 67, 230, 183, 170, 67, 230, 183, 185, 67, 230, 184, 154, 67, 230, 184, 175, 67, 230, 185, 174, 67, 230, 186, 128, 67, 230, 186, 156, 67, 230, 186, 186, 67, 230, 187, 135, 67, 230, 187, 139, 67, 230, 187, 145, 67, 230, 187, 155, 67, 230, 188, 143, 67, 230, 188, 148, 67, 230, 188, 162, 67, 230, 188, 163, 67, 230, 189, 174, 67, 230, 191, 134, 67, 230, 191, 171, 67, 230, 191, 190, 67, 231, 128, 155, 67, 231, 128, 158, 67, 231, 128, 185, 67, 231, 129, 138, 67, 231, 129, 171, 67, 231, 129, 176, 67, 231, 129, 183, 67, 231, 129, 189, 67, 231, 130, 153, 67, 231, 130, 173, 67, 231, 131, 136, 67, 231, 131, 153, 67, 231, 132, 161, 67, 231, 133, 133, 67, 231, 133, 137, 67, 231, 133, 174, 67, 231, 134, 156, 67, 231, 135, 142, 67, 231, 135, 144, 67, 231, 136, 144, 67, 231, 136, 155, 67, 231, 136, 168, 67, 231, 136, 170, 67, 231, 136, 171, 67, 231, 136, 181, 67, 231, 136, 182, 67, 231, 136, 187, 67, 231, 136, 191, 67, 231, 137, 135, 67, 231, 137, 144, 67, 231, 137, 153, 67, 231, 137, 155, 67, 231, 137, 162, 67, 231, 137, 185, 67, 231, 138, 128, 67, 231, 138, 149, 67, 231, 138, 172, 67, 231, 138, 175, 67, 231, 139, 128, 67, 231, 139, 188, 67, 231, 140, 170, 67, 231, 141, 181, 67, 231, 141, 186, 67, 231, 142, 132, 67, 231, 142, 135, 67, 231, 142, 137, 67, 231, 142, 139, 67, 231, 142, 165, 67, 231, 142, 178, 67, 231, 143, 158, 67, 231, 144, 134, 67, 231, 144, 137, 67, 231, 144, 162, 67, 231, 145, 135, 67, 231, 145, 156, 67, 231, 145, 169, 67, 231, 145, 177, 67, 231, 146, 133, 67, 231, 146, 137, 67, 231, 146, 152, 67, 231, 147, 138, 67, 231, 147, 156, 67, 231, 147, 166, 67, 231, 148, 134, 67, 231, 148, 152, 67, 231, 148, 159, 67, 231, 148, 164, 67, 231, 148, 168, 67, 231, 148, 176, 67, 231, 148, 178, 67, 231, 148, 179, 67, 231, 148, 183, 67, 231, 148, 187, 67, 231, 148, 190, 67, 231, 149, 153, 67, 231, 149, 165, 67, 231, 149, 176, 67, 231, 150, 139, 67, 231, 150, 146, 67, 231, 151, 162, 67, 231, 152, 144, 67, 231, 152, 157, 67, 231, 152, 159, 67, 231, 153, 130, 67, 231, 153, 169, 67, 231, 153, 182, 67, 231, 153, 189, 67, 231, 154, 174, 67, 231, 154, 191, 67, 231, 155, 138, 67, 231, 155, 155, 67, 231, 155, 163, 67, 231, 155, 167, 67, 231, 155, 174, 67, 231, 155, 180, 67, 231, 156, 129, 67, 231, 156, 158, 67, 231, 156, 159, 67, 231, 157, 128, 67, 231, 157, 138, 67, 231, 158, 139, 67, 231, 158, 167, 67, 231, 159, 155, 67, 231, 159, 162, 67, 231, 159, 179, 67, 231, 161, 142, 67, 231, 161, 171, 67, 231, 162, 140, 67, 231, 162, 145, 67, 231, 163, 138, 67, 231, 163, 140, 67, 231, 163, 187, 67, 231, 164, 170, 67, 231, 164, 186, 67, 231, 164, 188, 67, 231, 164, 190, 67, 231, 165, 136, 67, 231, 165, 137, 67, 231, 165, 144, 67, 231, 165, 150, 67, 231, 165, 157, 67, 231, 165, 158, 67, 231, 165, 165, 67, 231, 165, 191, 67, 231, 166, 129, 67, 231, 166, 141, 67, 231, 166, 142, 67, 231, 166, 143, 67, 231, 166, 174, 67, 231, 166, 184, 67, 231, 166, 190, 67, 231, 167, 138, 67, 231, 167, 152, 67, 231, 167, 171, 67, 231, 168, 156, 67, 231, 169, 128, 67, 231, 169, 138, 67, 231, 169, 143, 67, 231, 169, 180, 67, 231, 169, 186, 67, 231, 170, 129, 67, 231, 170, 177, 67, 231, 171, 139, 67, 231, 171, 174, 67, 231, 171, 185, 67, 231, 172, 160, 67, 231, 174, 143, 67, 231, 175, 128, 67, 231, 175, 134, 67, 231, 175, 137, 67, 231, 176, 190, 67, 231, 177, 160, 67, 231, 177, 179, 67, 231, 177, 187, 67, 231, 178, 146, 67, 231, 178, 190, 67, 231, 179, 146, 67, 231, 179, 150, 67, 231, 179, 163, 67, 231, 179, 167, 67, 231, 179, 168, 67, 231, 179, 184, 67, 231, 180, 128, 67, 231, 180, 144, 67, 231, 180, 162, 67, 231, 180, 175, 67, 231, 181, 130, 67, 231, 181, 155, 67, 231, 181, 163, 67, 231, 182, 160, 67, 231, 182, 190, 67, 231, 183, 135, 67, 231, 183, 180, 67, 231, 184, 130, 67, 231, 184, 137, 67, 231, 184, 183, 67, 231, 185, 129, 67, 231, 185, 133, 67, 231, 188, 182, 67, 231, 188, 190, 67, 231, 189, 145, 67, 231, 189, 178, 67, 231, 189, 185, 67, 231, 189, 186, 67, 231, 190, 133, 67, 231, 190, 138, 67, 231, 190, 149, 67, 231, 190, 154, 67, 231, 190, 189, 67, 231, 191, 186, 67, 232, 128, 129, 67, 232, 128, 133, 67, 232, 128, 140, 67, 232, 128, 146, 67, 232, 128, 179, 67, 232, 129, 134, 67, 232, 129, 160, 67, 232, 129, 175, 67, 232, 129, 176, 67, 232, 129, 190, 67, 232, 129, 191, 67, 232, 130, 137, 67, 232, 130, 139, 67, 232, 130, 173, 67, 232, 130, 178, 67, 232, 132, 131, 67, 232, 132, 190, 67, 232, 135, 152, 67, 232, 135, 163, 67, 232, 135, 168, 67, 232, 135, 170, 67, 232, 135, 173, 67, 232, 135, 179, 67, 232, 135, 188, 67, 232, 136, 129, 67, 232, 136, 132, 67, 232, 136, 140, 67, 232, 136, 152, 67, 232, 136, 155, 67, 232, 136, 159, 67, 232, 137, 174, 67, 232, 137, 175, 67, 232, 137, 178, 67, 232, 137, 184, 67, 232, 137, 185, 67, 232, 138, 139, 67, 232, 138, 145, 67, 232, 138, 157, 67, 232, 138, 177, 67, 232, 138, 179, 67, 232, 138, 189, 67, 232, 139, 165, 67, 232, 139, 166, 67, 232, 140, 157, 67, 232, 140, 163, 67, 232, 140, 182, 67, 232, 141, 146, 67, 232, 141, 147, 67, 232, 141, 163, 67, 232, 142, 173, 67, 232, 142, 189, 67, 232, 143, 137, 67, 232, 143, 138, 67, 232, 143, 140, 67, 232, 143, 156, 67, 232, 143, 167, 67, 232, 143, 175, 67, 232, 143, 177, 67, 232, 144, 189, 67, 232, 145, 137, 67, 232, 145, 151, 67, 232, 147, 174, 67, 232, 147, 177, 67, 232, 147, 179, 67, 232, 147, 188, 67, 232, 148, 150, 67, 232, 149, 164, 67, 232, 151, 141, 67, 232, 151, 186, 67, 232, 152, 134, 67, 232, 152, 146, 67, 232, 152, 173, 67, 232, 152, 191, 67, 232, 153, 141, 67, 232, 153, 144, 67, 232, 153, 156, 67, 232, 153, 167, 67, 232, 153, 169, 67, 232, 153, 171, 67, 232, 154, 136, 67, 232, 154, 169, 67, 232, 155, 162, 67, 232, 156, 142, 67, 232, 156, 168, 67, 232, 157, 171, 67, 232, 157, 185, 67, 232, 158, 134, 67, 232, 158, 186, 67, 232, 159, 161, 67, 232, 160, 129, 67, 232, 160, 159, 67, 232, 161, 128, 67, 232, 161, 140, 67, 232, 161, 160, 67, 232, 161, 163, 67, 232, 163, 130, 67, 232, 163, 143, 67, 232, 163, 151, 67, 232, 163, 158, 67, 232, 163, 161, 67, 232, 163, 184, 67, 232, 163, 186, 67, 232, 164, 144, 67, 232, 165, 129, 67, 232, 165, 164, 67, 232, 165, 190, 67, 232, 166, 134, 67, 232, 166, 139, 67, 232, 166, 150, 67, 232, 167, 146, 67, 232, 167, 163, 67, 232, 168, 128, 67, 232, 170, 160, 67, 232, 170, 170, 67, 232, 170, 191, 67, 232, 171, 139, 67, 232, 171, 146, 67, 232, 171, 150, 67, 232, 171, 173, 67, 232, 171, 184, 67, 232, 171, 190, 67, 232, 172, 129, 67, 232, 172, 185, 67, 232, 173, 152, 67, 232, 174, 128, 67, 232, 174, 138, 67, 232, 176, 183, 67, 232, 177, 134, 67, 232, 177, 136, 67, 232, 177, 149, 67, 232, 177, 184, 67, 232, 178, 157, 67, 232, 178, 161, 67, 232, 178, 169, 67, 232, 178, 171, 67, 232, 179, 129, 67, 232, 179, 130, 67, 232, 179, 135, 67, 232, 179, 136, 67, 232, 179, 147, 67, 232, 180, 136, 67, 232, 180, 155, 67, 232, 181, 164, 67, 232, 181, 176, 67, 232, 181, 183, 67, 232, 182, 179, 67, 232, 182, 188, 67, 232, 183, 139, 67, 232, 183, 175, 67, 232, 183, 176, 67, 232, 186, 171, 67, 232, 187, 138, 67, 232, 187, 148, 67, 232, 188, 166, 67, 232, 188, 170, 67, 232, 188, 184, 67, 232, 188, 187, 67, 232, 189, 162, 67, 232, 190, 155, 67, 232, 190, 158, 67, 232, 190, 176, 67, 232, 190, 181, 67, 232, 190, 182, 67, 233, 128, 163, 67, 233, 128, 184, 67, 233, 129, 138, 67, 233, 129, 169, 67, 233, 129, 178, 67, 233, 129, 188, 67, 233, 130, 143, 67, 233, 130, 145, 67, 233, 130, 148, 67, 233, 131, 142, 67, 233, 131, 158, 67, 233, 131, 177, 67, 233, 131, 189, 67, 233, 132, 145, 67, 233, 132, 155, 67, 233, 133, 137, 67, 233, 133, 141, 67, 233, 133, 170, 67, 233, 134, 153, 67, 233, 134, 180, 67, 233, 135, 134, 67, 233, 135, 140, 67, 233, 135, 143, 67, 233, 135, 145, 67, 233, 136, 180, 67, 233, 136, 184, 67, 233, 137, 182, 67, 233, 137, 188, 67, 233, 139, 151, 67, 233, 139, 152, 67, 233, 140, 132, 67, 233, 141, 138, 67, 233, 143, 185, 67, 233, 144, 149, 67, 233, 149, 183, 67, 233, 150, 128, 67, 233, 150, 139, 67, 233, 150, 173, 67, 233, 150, 183, 67, 233, 152, 156, 67, 233, 152, 174, 67, 233, 153, 139, 67, 233, 153, 141, 67, 233, 153, 181, 67, 233, 153, 184, 67, 233, 153, 188, 67, 233, 154, 134, 67, 233, 154, 163, 67, 233, 154, 182, 67, 233, 154, 183, 67, 233, 154, 184, 67, 233, 154, 185, 67, 233, 155, 131, 67, 233, 155, 162, 67, 233, 155, 163, 67, 233, 155, 168, 67, 233, 155, 182, 67, 233, 155, 183, 67, 233, 156, 163, 67, 233, 156, 178, 67, 233, 157, 136, 67, 233, 157, 145, 67, 233, 157, 150, 67, 233, 157, 158, 67, 233, 157, 162, 67, 233, 157, 169, 67, 233, 159, 139, 67, 233, 159, 155, 67, 233, 159, 160, 67, 233, 159, 173, 67, 233, 159, 179, 67, 233, 159, 191, 67, 233, 160, 129, 67, 233, 160, 133, 67, 233, 160, 139, 67, 233, 160, 152, 67, 233, 160, 169, 67, 233, 160, 187, 67, 233, 161, 158, 67, 233, 162, 168, 67, 233, 163, 155, 67, 233, 163, 159, 67, 233, 163, 162, 67, 233, 163, 175, 67, 233, 163, 188, 67, 233, 164, 168, 67, 233, 164, 169, 67, 233, 166, 150, 67, 233, 166, 153, 67, 233, 166, 167, 67, 233, 166, 172, 67, 233, 167, 130, 67, 233, 167, 177, 67, 233, 167, 190, 67, 233, 169, 170, 67, 233, 170, 168, 67, 233, 171, 152, 67, 233, 171, 159, 67, 233, 172, 146, 67, 233, 172, 165, 67, 233, 172, 175, 67, 233, 172, 178, 67, 233, 172, 188, 67, 233, 173, 154, 67, 233, 173, 175, 67, 233, 177, 128, 67, 233, 177, 151, 67, 233, 179, 165, 67, 233, 179, 189, 67, 233, 181, 167, 67, 233, 182, 180, 67, 233, 183, 186, 67, 233, 184, 158, 67, 233, 185, 181, 67, 233, 185, 191, 67, 233, 186, 151, 67, 233, 186, 159, 67, 233, 186, 165, 67, 233, 186, 187, 67, 233, 187, 131, 67, 233, 187, 141, 67, 233, 187, 142, 67, 233, 187, 145, 67, 233, 187, 185, 67, 233, 187, 189, 67, 233, 187, 190, 67, 233, 188, 133, 67, 233, 188, 142, 67, 233, 188, 143, 67, 233, 188, 147, 67, 233, 188, 150, 67, 233, 188, 160, 67, 233, 188, 187, 67, 233, 189, 131, 67, 233, 189, 138, 67, 233, 189, 146, 67, 233, 190, 141, 67, 233, 190, 142, 67, 233, 190, 156, 67, 233, 190, 159, 67, 233, 190, 160, 67, 234, 156, 167, 67, 234, 157, 175, 67, 234, 172, 183, 67, 234, 173, 146, 68, 240, 160, 132, 162, 68, 240, 160, 148, 156, 68, 240, 160, 148, 165, 68, 240, 160, 149, 139, 68, 240, 160, 152, 186, 68, 240, 160, 160, 132, 68, 240, 160, 163, 158, 68, 240, 160, 168, 172, 68, 240, 160, 173, 163, 68, 240, 161, 147, 164, 68, 240, 161, 154, 168, 68, 240, 161, 155, 170, 68, 240, 161, 167, 136, 68, 240, 161, 172, 152, 68, 240, 161, 180, 139, 68, 240, 161, 183, 164, 68, 240, 161, 183, 166, 68, 240, 162, 134, 131, 68, 240, 162, 134, 159, 68, 240, 162, 140, 177, 68, 240, 162, 155, 148, 68, 240, 162, 161, 132, 68, 240, 162, 161, 138, 68, 240, 162, 172, 140, 68, 240, 162, 175, 177, 68, 240, 163, 128, 138, 68, 240, 163, 138, 184, 68, 240, 163, 141, 159, 68, 240, 163, 142, 147, 68, 240, 163, 142, 156, 68, 240, 163, 143, 131, 68, 240, 163, 143, 149, 68, 240, 163, 145, 173, 68, 240, 163, 154, 163, 68, 240, 163, 162, 167, 68, 240, 163, 170, 141, 68, 240, 163, 171, 186, 68, 240, 163, 178, 188, 68, 240, 163, 180, 158, 68, 240, 163, 187, 145, 68, 240, 163, 189, 158, 68, 240, 163, 190, 142, 68, 240, 164, 137, 163, 68, 240, 164, 139, 174, 68, 240, 164, 142, 171, 68, 240, 164, 152, 136, 68, 240, 164, 156, 181, 68, 240, 164, 160, 148, 68, 240, 164, 176, 182, 68, 240, 164, 178, 146, 68, 240, 164, 190, 161, 68, 240, 164, 190, 184, 68, 240, 165, 129, 132, 68, 240, 165, 131, 178, 68, 240, 165, 131, 179, 68, 240, 165, 132, 153, 68, 240, 165, 132, 179, 68, 240, 165, 137, 137, 68, 240, 165, 144, 157, 68, 240, 165, 152, 166, 68, 240, 165, 154, 154, 68, 240, 165, 155, 133, 68, 240, 165, 165, 188, 68, 240, 165, 170, 167, 68, 240, 165, 174, 171, 68, 240, 165, 178, 128, 68, 240, 165, 179, 144, 68, 240, 165, 190, 134, 68, 240, 166, 135, 154, 68, 240, 166, 136, 168, 68, 240, 166, 137, 135, 68, 240, 166, 139, 153, 68, 240, 166, 140, 190, 68, 240, 166, 147, 154, 68, 240, 166, 148, 163, 68, 240, 166, 150, 168, 68, 240, 166, 158, 167, 68, 240, 166, 158, 181, 68, 240, 166, 172, 188, 68, 240, 166, 176, 182, 68, 240, 166, 179, 149, 68, 240, 166, 181, 171, 68, 240, 166, 188, 172, 68, 240, 166, 190, 177, 68, 240, 167, 131, 146, 68, 240, 167, 143, 138, 68, 240, 167, 153, 167, 68, 240, 167, 162, 174, 68, 240, 167, 165, 166, 68, 240, 167, 178, 168, 68, 240, 167, 187, 147, 68, 240, 167, 188, 175, 68, 240, 168, 151, 146, 68, 240, 168, 151, 173, 68, 240, 168, 156, 174, 68, 240, 168, 175, 186, 68, 240, 168, 181, 183, 68, 240, 169, 133, 133, 68, 240, 169, 135, 159, 68, 240, 169, 136, 154, 68, 240, 169, 144, 138, 68, 240, 169, 146, 150, 68, 240, 169, 150, 182, 68, 240, 169, 172, 176, 68, 240, 170, 131, 142, 68, 240, 170, 132, 133, 68, 240, 170, 136, 142, 68, 240, 170, 138, 145, 68, 240, 170, 142, 146, 68, 240, 170, 152, 128, 66, 33, 33, 66, 33, 63, 66, 46, 46, 66, 48, 44, 66, 48, 46, 66, 49, 44, 66, 49, 46, 66, 49, 48, 66, 49, 49, 66, 49, 50, 66, 49, 51, 66, 49, 52, 66, 49, 53, 66, 49, 54, 66, 49, 55, 66, 49, 56, 66, 49, 57, 66, 50, 44, 66, 50, 46, 66, 50, 48, 66, 50, 49, 66, 50, 50, 66, 50, 51, 66, 50, 52, 66, 50, 53, 66, 50, 54, 66, 50, 55, 66, 50, 56, 66, 50, 57, 66, 51, 44, 66, 51, 46, 66, 51, 48, 66, 51, 49, 66, 51, 50, 66, 51, 51, 66, 51, 52, 66, 51, 53, 66, 51, 54, 66, 51, 55, 66, 51, 56, 66, 51, 57, 66, 52, 44, 66, 52, 46, 66, 52, 48, 66, 52, 49, 66, 52, 50, 66, 52, 51, 66, 52, 52, 66, 52, 53, 66, 52, 54, 66, 52, 55, 66, 52, 56, 66, 52, 57, 66, 53, 44, 66, 53, 46, 66, 53, 48, 66, 54, 44, 66, 54, 46, 66, 55, 44, 66, 55, 46, 66, 56, 44, 66, 56, 46, 66, 57, 44, 66, 57, 46, 66, 61, 61, 66, 63, 33, 66, 63, 63, 66, 65, 85, 66, 66, 113, 66, 67, 68, 66, 68, 74, 66, 68, 90, 66, 68, 122, 66, 71, 66, 66, 71, 121, 66, 72, 80, 66, 72, 86, 66, 72, 103, 66, 72, 122, 66, 73, 73, 66, 73, 74, 66, 73, 85, 66, 73, 86, 66, 73, 88, 66, 75, 66, 66, 75, 75, 66, 75, 77, 66, 76, 74, 66, 76, 106, 66, 77, 66, 66, 77, 67, 66, 77, 68, 66, 77, 82, 66, 77, 86, 66, 77, 87, 66, 78, 74, 66, 78, 106, 66, 78, 111, 66, 80, 72, 66, 80, 82, 66, 80, 97, 66, 82, 115, 66, 83, 68, 66, 83, 77, 66, 83, 83, 66, 83, 118, 66, 84, 77, 66, 86, 73, 66, 87, 67, 66, 87, 90, 66, 87, 98, 66, 88, 73, 66, 99, 99, 66, 99, 100, 66, 99, 109, 66, 100, 66, 66, 100, 97, 66, 100, 108, 66, 100, 109, 66, 100, 122, 66, 101, 86, 66, 102, 102, 66, 102, 105, 66, 102, 108, 66, 102, 109, 66, 104, 97, 66, 105, 105, 66, 105, 106, 66, 105, 110, 66, 105, 118, 66, 105, 120, 66, 107, 65, 66, 107, 86, 66, 107, 87, 66, 107, 103, 66, 107, 108, 66, 107, 109, 66, 107, 116, 66, 108, 106, 66, 108, 109, 66, 108, 110, 66, 108, 120, 66, 109, 50, 66, 109, 51, 66, 109, 65, 66, 109, 86, 66, 109, 87, 66, 109, 98, 66, 109, 103, 66, 109, 108, 66, 109, 109, 66, 109, 115, 66, 110, 65, 66, 110, 70, 66, 110, 86, 66, 110, 87, 66, 110, 106, 66, 110, 109, 66, 110, 115, 66, 111, 86, 66, 112, 65, 66, 112, 70, 66, 112, 86, 66, 112, 87, 66, 112, 99, 66, 112, 115, 66, 115, 114, 66, 115, 116, 66, 118, 105, 66, 120, 105, 67, 40, 49, 41, 67, 40, 50, 41, 67, 40, 51, 41, 67, 40, 52, 41, 67, 40, 53, 41, 67, 40, 54, 41, 67, 40, 55, 41, 67, 40, 56, 41, 67, 40, 57, 41, 67, 40, 65, 41, 67, 40, 66, 41, 67, 40, 67, 41, 67, 40, 68, 41, 67, 40, 69, 41, 67, 40, 70, 41, 67, 40, 71, 41, 67, 40, 72, 41, 67, 40, 73, 41, 67, 40, 74, 41, 67, 40, 75, 41, 67, 40, 76, 41, 67, 40, 77, 41, 67, 40, 78, 41, 67, 40, 79, 41, 67, 40, 80, 41, 67, 40, 81, 41, 67, 40, 82, 41, 67, 40, 83, 41, 67, 40, 84, 41, 67, 40, 85, 41, 67, 40, 86, 41, 67, 40, 87, 41, 67, 40, 88, 41, 67, 40, 89, 41, 67, 40, 90, 41, 67, 40, 97, 41, 67, 40, 98, 41, 67, 40, 99, 41, 67, 40, 100, 41, 67, 40, 101, 41, 67, 40, 102, 41, 67, 40, 103, 41, 67, 40, 104, 41, 67, 40, 105, 41, 67, 40, 106, 41, 67, 40, 107, 41, 67, 40, 108, 41, 67, 40, 109, 41, 67, 40, 110, 41, 67, 40, 111, 41, 67, 40, 112, 41, 67, 40, 113, 41, 67, 40, 114, 41, 67, 40, 115, 41, 67, 40, 116, 41, 67, 40, 117, 41, 67, 40, 118, 41, 67, 40, 119, 41, 67, 40, 120, 41, 67, 40, 121, 41, 67, 40, 122, 41, 67, 46, 46, 46, 67, 49, 48, 46, 67, 49, 49, 46, 67, 49, 50, 46, 67, 49, 51, 46, 67, 49, 52, 46, 67, 49, 53, 46, 67, 49, 54, 46, 67, 49, 55, 46, 67, 49, 56, 46, 67, 49, 57, 46, 67, 50, 48, 46, 67, 58, 58, 61, 67, 61, 61, 61, 67, 67, 111, 46, 67, 70, 65, 88, 67, 71, 72, 122, 67, 71, 80, 97, 67, 73, 73, 73, 67, 76, 84, 68, 67, 76, 194, 183, 67, 77, 72, 122, 67, 77, 80, 97, 67, 77, 206, 169, 67, 80, 80, 77, 67, 80, 80, 86, 67, 80, 84, 69, 67, 84, 69, 76, 67, 84, 72, 122, 67, 86, 73, 73, 67, 88, 73, 73, 67, 97, 47, 99, 67, 97, 47, 115, 67, 97, 202, 190, 67, 98, 97, 114, 67, 99, 47, 111, 67, 99, 47, 117, 67, 99, 97, 108, 67, 99, 109, 50, 67, 99, 109, 51, 67, 100, 109, 50, 67, 100, 109, 51, 67, 101, 114, 103, 67, 102, 102, 105, 67, 102, 102, 108, 67, 103, 97, 108, 67, 104, 80, 97, 67, 105, 105, 105, 67, 107, 72, 122, 67, 107, 80, 97, 67, 107, 109, 50, 67, 107, 109, 51, 67, 107, 206, 169, 67, 108, 111, 103, 67, 108, 194, 183, 67, 109, 105, 108, 67, 109, 109, 50, 67, 109, 109, 51, 67, 109, 111, 108, 67, 114, 97, 100, 67, 118, 105, 105, 67, 120, 105, 105, 67, 194, 176, 67, 67, 194, 176, 70, 67, 202, 188, 110, 67, 206, 188, 65, 67, 206, 188, 70, 67, 206, 188, 86, 67, 206, 188, 87, 67, 206, 188, 103, 67, 206, 188, 108, 67, 206, 188, 109, 67, 206, 188, 115, 68, 40, 49, 48, 41, 68, 40, 49, 49, 41, 68, 40, 49, 50, 41, 68, 40, 49, 51, 41, 68, 40, 49, 52, 41, 68, 40, 49, 53, 41, 68, 40, 49, 54, 41, 68, 40, 49, 55, 41, 68, 40, 49, 56, 41, 68, 40, 49, 57, 41, 68, 40, 50, 48, 41, 68, 48, 231, 130, 185, 68, 49, 226, 129, 132, 68, 49, 230, 151, 165, 68, 49, 230, 156, 136, 68, 49, 231, 130, 185, 68, 50, 230, 151, 165, 68, 50, 230, 156, 136, 68, 50, 231, 130, 185, 68, 51, 230, 151, 165, 68, 51, 230, 156, 136, 68, 51, 231, 130, 185, 68, 52, 230, 151, 165, 68, 52, 230, 156, 136, 68, 52, 231, 130, 185, 68, 53, 230, 151, 165, 68, 53, 230, 156, 136, 68, 53, 231, 130, 185, 68, 54, 230, 151, 165, 68, 54, 230, 156, 136, 68, 54, 231, 130, 185, 68, 55, 230, 151, 165, 68, 55, 230, 156, 136, 68, 55, 231, 130, 185, 68, 56, 230, 151, 165, 68, 56, 230, 156, 136, 68, 56, 231, 130, 185, 68, 57, 230, 151, 165, 68, 57, 230, 156, 136, 68, 57, 231, 130, 185, 68, 86, 73, 73, 73, 68, 97, 46, 109, 46, 68, 107, 99, 97, 108, 68, 112, 46, 109, 46, 68, 118, 105, 105, 105, 68, 213, 165, 214, 130, 68, 213, 180, 213, 165, 68, 213, 180, 213, 171, 68, 213, 180, 213, 173, 68, 213, 180, 213, 182, 68, 213, 190, 213, 182, 68, 215, 144, 215, 156, 68, 216, 167, 217, 180, 68, 216, 168, 216, 172, 68, 216, 168, 216, 173, 68, 216, 168, 216, 174, 68, 216, 168, 216, 177, 68, 216, 168, 216, 178, 68, 216, 168, 217, 133, 68, 216, 168, 217, 134, 68, 216, 168, 217, 135, 68, 216, 168, 217, 137, 68, 216, 168, 217, 138, 68, 216, 170, 216, 172, 68, 216, 170, 216, 173, 68, 216, 170, 216, 174, 68, 216, 170, 216, 177, 68, 216, 170, 216, 178, 68, 216, 170, 217, 133, 68, 216, 170, 217, 134, 68, 216, 170, 217, 135, 68, 216, 170, 217, 137, 68, 216, 170, 217, 138, 68, 216, 171, 216, 172, 68, 216, 171, 216, 177, 68, 216, 171, 216, 178, 68, 216, 171, 217, 133, 68, 216, 171, 217, 134, 68, 216, 171, 217, 135, 68, 216, 171, 217, 137, 68, 216, 171, 217, 138, 68, 216, 172, 216, 173, 68, 216, 172, 217, 133, 68, 216, 172, 217, 137, 68, 216, 172, 217, 138, 68, 216, 173, 216, 172, 68, 216, 173, 217, 133, 68, 216, 173, 217, 137, 68, 216, 173, 217, 138, 68, 216, 174, 216, 172, 68, 216, 174, 216, 173, 68, 216, 174, 217, 133, 68, 216, 174, 217, 137, 68, 216, 174, 217, 138, 68, 216, 179, 216, 172, 68, 216, 179, 216, 173, 68, 216, 179, 216, 174, 68, 216, 179, 216, 177, 68, 216, 179, 217, 133, 68, 216, 179, 217, 135, 68, 216, 179, 217, 137, 68, 216, 179, 217, 138, 68, 216, 180, 216, 172, 68, 216, 180, 216, 173, 68, 216, 180, 216, 174, 68, 216, 180, 216, 177, 68, 216, 180, 217, 133, 68, 216, 180, 217, 135, 68, 216, 180, 217, 137, 68, 216, 180, 217, 138, 68, 216, 181, 216, 173, 68, 216, 181, 216, 174, 68, 216, 181, 216, 177, 68, 216, 181, 217, 133, 68, 216, 181, 217, 137, 68, 216, 181, 217, 138, 68, 216, 182, 216, 172, 68, 216, 182, 216, 173, 68, 216, 182, 216, 174, 68, 216, 182, 216, 177, 68, 216, 182, 217, 133, 68, 216, 182, 217, 137, 68, 216, 182, 217, 138, 68, 216, 183, 216, 173, 68, 216, 183, 217, 133, 68, 216, 183, 217, 137, 68, 216, 183, 217, 138, 68, 216, 184, 217, 133, 68, 216, 185, 216, 172, 68, 216, 185, 217, 133, 68, 216, 185, 217, 137, 68, 216, 185, 217, 138, 68, 216, 186, 216, 172, 68, 216, 186, 217, 133, 68, 216, 186, 217, 137, 68, 216, 186, 217, 138, 68, 217, 129, 216, 172, 68, 217, 129, 216, 173, 68, 217, 129, 216, 174, 68, 217, 129, 217, 133, 68, 217, 129, 217, 137, 68, 217, 129, 217, 138, 68, 217, 130, 216, 173, 68, 217, 130, 217, 133, 68, 217, 130, 217, 137, 68, 217, 130, 217, 138, 68, 217, 131, 216, 167, 68, 217, 131, 216, 172, 68, 217, 131, 216, 173, 68, 217, 131, 216, 174, 68, 217, 131, 217, 132, 68, 217, 131, 217, 133, 68, 217, 131, 217, 137, 68, 217, 131, 217, 138, 68, 217, 132, 216, 167, 68, 217, 132, 216, 172, 68, 217, 132, 216, 173, 68, 217, 132, 216, 174, 68, 217, 132, 217, 133, 68, 217, 132, 217, 135, 68, 217, 132, 217, 137, 68, 217, 132, 217, 138, 68, 217, 133, 216, 167, 68, 217, 133, 216, 172, 68, 217, 133, 216, 173, 68, 217, 133, 216, 174, 68, 217, 133, 217, 133, 68, 217, 133, 217, 137, 68, 217, 133, 217, 138, 68, 217, 134, 216, 172, 68, 217, 134, 216, 173, 68, 217, 134, 216, 174, 68, 217, 134, 216, 177, 68, 217, 134, 216, 178, 68, 217, 134, 217, 133, 68, 217, 134, 217, 134, 68, 217, 134, 217, 135, 68, 217, 134, 217, 137, 68, 217, 134, 217, 138, 68, 217, 135, 216, 172, 68, 217, 135, 217, 133, 68, 217, 135, 217, 137, 68, 217, 135, 217, 138, 68, 217, 136, 217, 180, 68, 217, 138, 216, 172, 68, 217, 138, 216, 173, 68, 217, 138, 216, 174, 68, 217, 138, 216, 177, 68, 217, 138, 216, 178, 68, 217, 138, 217, 133, 68, 217, 138, 217, 134, 68, 217, 138, 217, 135, 68, 217, 138, 217, 137, 68, 217, 138, 217, 138, 68, 217, 138, 217, 180, 68, 219, 135, 217, 180, 69, 40, 225, 132, 128, 41, 69, 40, 225, 132, 130, 41, 69, 40, 225, 132, 131, 41, 69, 40, 225, 132, 133, 41, 69, 40, 225, 132, 134, 41, 69, 40, 225, 132, 135, 41, 69, 40, 225, 132, 137, 41, 69, 40, 225, 132, 139, 41, 69, 40, 225, 132, 140, 41, 69, 40, 225, 132, 142, 41, 69, 40, 225, 132, 143, 41, 69, 40, 225, 132, 144, 41, 69, 40, 225, 132, 145, 41, 69, 40, 225, 132, 146, 41, 69, 40, 228, 184, 128, 41, 69, 40, 228, 184, 131, 41, 69, 40, 228, 184, 137, 41, 69, 40, 228, 185, 157, 41, 69, 40, 228, 186, 140, 41, 69, 40, 228, 186, 148, 41, 69, 40, 228, 187, 163, 41, 69, 40, 228, 188, 129, 41, 69, 40, 228, 188, 145, 41, 69, 40, 229, 133, 171, 41, 69, 40, 229, 133, 173, 41, 69, 40, 229, 138, 180, 41, 69, 40, 229, 141, 129, 41, 69, 40, 229, 141, 148, 41, 69, 40, 229, 144, 141, 41, 69, 40, 229, 145, 188, 41, 69, 40, 229, 155, 155, 41, 69, 40, 229, 156, 159, 41, 69, 40, 229, 173, 166, 41, 69, 40, 230, 151, 165, 41, 69, 40, 230, 156, 136, 41, 69, 40, 230, 156, 137, 41, 69, 40, 230, 156, 168, 41, 69, 40, 230, 160, 170, 41, 69, 40, 230, 176, 180, 41, 69, 40, 231, 129, 171, 41, 69, 40, 231, 137, 185, 41, 69, 40, 231, 155, 163, 41, 69, 40, 231, 164, 190, 41, 69, 40, 231, 165, 157, 41, 69, 40, 231, 165, 173, 41, 69, 40, 232, 135, 170, 41, 69, 40, 232, 135, 179, 41, 69, 40, 232, 178, 161, 41, 69, 40, 232, 179, 135, 41, 69, 40, 233, 135, 145, 41, 69, 48, 226, 129, 132, 51, 69, 49, 48, 230, 151, 165, 69, 49, 48, 230, 156, 136, 69, 49, 48, 231, 130, 185, 69, 49, 49, 230, 151, 165, 69, 49, 49, 230, 156, 136, 69, 49, 49, 231, 130, 185, 69, 49, 50, 230, 151, 165, 69, 49, 50, 230, 156, 136, 69, 49, 50, 231, 130, 185, 69, 49, 51, 230, 151, 165, 69, 49, 51, 231, 130, 185, 69, 49, 52, 230, 151, 165, 69, 49, 52, 231, 130, 185, 69, 49, 53, 230, 151, 165, 69, 49, 53, 231, 130, 185, 69, 49, 54, 230, 151, 165, 69, 49, 54, 231, 130, 185, 69, 49, 55, 230, 151, 165, 69, 49, 55, 231, 130, 185, 69, 49, 56, 230, 151, 165, 69, 49, 56, 231, 130, 185, 69, 49, 57, 230, 151, 165, 69, 49, 57, 231, 130, 185, 69, 49, 226, 129, 132, 50, 69, 49, 226, 129, 132, 51, 69, 49, 226, 129, 132, 52, 69, 49, 226, 129, 132, 53, 69, 49, 226, 129, 132, 54, 69, 49, 226, 129, 132, 55, 69, 49, 226, 129, 132, 56, 69, 49, 226, 129, 132, 57, 69, 50, 48, 230, 151, 165, 69, 50, 48, 231, 130, 185, 69, 50, 49, 230, 151, 165, 69, 50, 49, 231, 130, 185, 69, 50, 50, 230, 151, 165, 69, 50, 50, 231, 130, 185, 69, 50, 51, 230, 151, 165, 69, 50, 51, 231, 130, 185, 69, 50, 52, 230, 151, 165, 69, 50, 52, 231, 130, 185, 69, 50, 53, 230, 151, 165, 69, 50, 54, 230, 151, 165, 69, 50, 55, 230, 151, 165, 69, 50, 56, 230, 151, 165, 69, 50, 57, 230, 151, 165, 69, 50, 226, 129, 132, 51, 69, 50, 226, 129, 132, 53, 69, 51, 48, 230, 151, 165, 69, 51, 49, 230, 151, 165, 69, 51, 226, 129, 132, 52, 69, 51, 226, 129, 132, 53, 69, 51, 226, 129, 132, 56, 69, 52, 226, 129, 132, 53, 69, 53, 226, 129, 132, 54, 69, 53, 226, 129, 132, 56, 69, 55, 226, 129, 132, 56, 69, 65, 226, 136, 149, 109, 69, 86, 226, 136, 149, 109, 69, 109, 226, 136, 149, 115, 70, 49, 226, 129, 132, 49, 48, 70, 67, 226, 136, 149, 107, 103, 70, 109, 226, 136, 149, 115, 50, 70, 216, 168, 216, 173, 217, 138, 70, 216, 168, 216, 174, 217, 138, 70, 216, 170, 216, 172, 217, 133, 70, 216, 170, 216, 172, 217, 137, 70, 216, 170, 216, 172, 217, 138, 70, 216, 170, 216, 173, 216, 172, 70, 216, 170, 216, 173, 217, 133, 70, 216, 170, 216, 174, 217, 133, 70, 216, 170, 216, 174, 217, 137, 70, 216, 170, 216, 174, 217, 138, 70, 216, 170, 217, 133, 216, 172, 70, 216, 170, 217, 133, 216, 173, 70, 216, 170, 217, 133, 216, 174, 70, 216, 170, 217, 133, 217, 137, 70, 216, 170, 217, 133, 217, 138, 70, 216, 172, 216, 173, 217, 137, 70, 216, 172, 216, 173, 217, 138, 70, 216, 172, 217, 133, 216, 173, 70, 216, 172, 217, 133, 217, 137, 70, 216, 172, 217, 133, 217, 138, 70, 216, 173, 216, 172, 217, 138, 70, 216, 173, 217, 133, 217, 137, 70, 216, 173, 217, 133, 217, 138, 70, 216, 179, 216, 172, 216, 173, 70, 216, 179, 216, 172, 217, 137, 70, 216, 179, 216, 173, 216, 172, 70, 216, 179, 216, 174, 217, 137, 70, 216, 179, 216, 174, 217, 138, 70, 216, 179, 217, 133, 216, 172, 70, 216, 179, 217, 133, 216, 173, 70, 216, 179, 217, 133, 217, 133, 70, 216, 180, 216, 172, 217, 138, 70, 216, 180, 216, 173, 217, 133, 70, 216, 180, 216, 173, 217, 138, 70, 216, 180, 217, 133, 216, 174, 70, 216, 180, 217, 133, 217, 133, 70, 216, 181, 216, 173, 216, 173, 70, 216, 181, 216, 173, 217, 138, 70, 216, 181, 217, 132, 217, 137, 70, 216, 181, 217, 132, 219, 146, 70, 216, 181, 217, 133, 217, 133, 70, 216, 182, 216, 173, 217, 137, 70, 216, 182, 216, 173, 217, 138, 70, 216, 182, 216, 174, 217, 133, 70, 216, 183, 217, 133, 216, 173, 70, 216, 183, 217, 133, 217, 133, 70, 216, 183, 217, 133, 217, 138, 70, 216, 185, 216, 172, 217, 133, 70, 216, 185, 217, 133, 217, 133, 70, 216, 185, 217, 133, 217, 137, 70, 216, 185, 217, 133, 217, 138, 70, 216, 186, 217, 133, 217, 133, 70, 216, 186, 217, 133, 217, 137, 70, 216, 186, 217, 133, 217, 138, 70, 217, 129, 216, 174, 217, 133, 70, 217, 129, 217, 133, 217, 138, 70, 217, 130, 217, 132, 219, 146, 70, 217, 130, 217, 133, 216, 173, 70, 217, 130, 217, 133, 217, 133, 70, 217, 130, 217, 133, 217, 138, 70, 217, 131, 217, 133, 217, 133, 70, 217, 131, 217, 133, 217, 138, 70, 217, 132, 216, 172, 216, 172, 70, 217, 132, 216, 172, 217, 133, 70, 217, 132, 216, 172, 217, 138, 70, 217, 132, 216, 173, 217, 133, 70, 217, 132, 216, 173, 217, 137, 70, 217, 132, 216, 173, 217, 138, 70, 217, 132, 216, 174, 217, 133, 70, 217, 132, 217, 133, 216, 173, 70, 217, 132, 217, 133, 217, 138, 70, 217, 133, 216, 172, 216, 173, 70, 217, 133, 216, 172, 216, 174, 70, 217, 133, 216, 172, 217, 133, 70, 217, 133, 216, 172, 217, 138, 70, 217, 133, 216, 173, 216, 172, 70, 217, 133, 216, 173, 217, 133, 70, 217, 133, 216, 173, 217, 138, 70, 217, 133, 216, 174, 216, 172, 70, 217, 133, 216, 174, 217, 133, 70, 217, 133, 216, 174, 217, 138, 70, 217, 133, 217, 133, 217, 138, 70, 217, 134, 216, 172, 216, 173, 70, 217, 134, 216, 172, 217, 133, 70, 217, 134, 216, 172, 217, 137, 70, 217, 134, 216, 172, 217, 138, 70, 217, 134, 216, 173, 217, 133, 70, 217, 134, 216, 173, 217, 137, 70, 217, 134, 216, 173, 217, 138, 70, 217, 134, 217, 133, 217, 137, 70, 217, 134, 217, 133, 217, 138, 70, 217, 135, 217, 133, 216, 172, 70, 217, 135, 217, 133, 217, 133, 70, 217, 138, 216, 172, 217, 138, 70, 217, 138, 216, 173, 217, 138, 70, 217, 138, 217, 133, 217, 133, 70, 217, 138, 217, 133, 217, 138, 70, 217, 138, 217, 148, 216, 167, 70, 217, 138, 217, 148, 216, 172, 70, 217, 138, 217, 148, 216, 173, 70, 217, 138, 217, 148, 216, 174, 70, 217, 138, 217, 148, 216, 177, 70, 217, 138, 217, 148, 216, 178, 70, 217, 138, 217, 148, 217, 133, 70, 217, 138, 217, 148, 217, 134, 70, 217, 138, 217, 148, 217, 135, 70, 217, 138, 217, 148, 217, 136, 70, 217, 138, 217, 148, 217, 137, 70, 217, 138, 217, 148, 217, 138, 70, 217, 138, 217, 148, 219, 134, 70, 217, 138, 217, 148, 219, 135, 70, 217, 138, 217, 148, 219, 136, 70, 217, 138, 217, 148, 219, 144, 70, 217, 138, 217, 148, 219, 149, 70, 224, 185, 141, 224, 184, 178, 70, 224, 186, 171, 224, 186, 153, 70, 224, 186, 171, 224, 186, 161, 70, 224, 187, 141, 224, 186, 178, 70, 224, 189, 128, 224, 190, 181, 70, 224, 189, 130, 224, 190, 183, 70, 224, 189, 140, 224, 190, 183, 70, 224, 189, 145, 224, 190, 183, 70, 224, 189, 150, 224, 190, 183, 70, 224, 189, 155, 224, 190, 183, 70, 224, 190, 144, 224, 190, 181, 70, 224, 190, 146, 224, 190, 183, 70, 224, 190, 156, 224, 190, 183, 70, 224, 190, 161, 224, 190, 183, 70, 224, 190, 166, 224, 190, 183, 70, 224, 190, 171, 224, 190, 183, 70, 226, 128, 178, 226, 128, 178, 70, 226, 128, 181, 226, 128, 181, 70, 226, 136, 171, 226, 136, 171, 70, 226, 136, 174, 226, 136, 174, 70, 227, 129, 187, 227, 129, 139, 70, 227, 130, 136, 227, 130, 138, 70, 227, 130, 173, 227, 131, 173, 70, 227, 130, 179, 227, 130, 179, 70, 227, 130, 179, 227, 131, 136, 70, 227, 131, 136, 227, 131, 179, 70, 227, 131, 138, 227, 131, 142, 70, 227, 131, 155, 227, 131, 179, 70, 227, 131, 159, 227, 131, 170, 70, 227, 131, 170, 227, 131, 169, 70, 227, 131, 172, 227, 131, 160, 70, 228, 187, 164, 229, 146, 140, 70, 229, 164, 167, 230, 173, 163, 70, 229, 185, 179, 230, 136, 144, 70, 230, 152, 142, 230, 178, 187, 70, 230, 152, 173, 229, 146, 140, 71, 114, 97, 100, 226, 136, 149, 115, 71, 227, 128, 148, 83, 227, 128, 149, 72, 40, 225, 132, 128, 225, 133, 161, 41, 72, 40, 225, 132, 130, 225, 133, 161, 41, 72, 40, 225, 132, 131, 225, 133, 161, 41, 72, 40, 225, 132, 133, 225, 133, 161, 41, 72, 40, 225, 132, 134, 225, 133, 161, 41, 72, 40, 225, 132, 135, 225, 133, 161, 41, 72, 40, 225, 132, 137, 225, 133, 161, 41, 72, 40, 225, 132, 139, 225, 133, 161, 41, 72, 40, 225, 132, 140, 225, 133, 161, 41, 72, 40, 225, 132, 140, 225, 133, 174, 41, 72, 40, 225, 132, 142, 225, 133, 161, 41, 72, 40, 225, 132, 143, 225, 133, 161, 41, 72, 40, 225, 132, 144, 225, 133, 161, 41, 72, 40, 225, 132, 145, 225, 133, 161, 41, 72, 40, 225, 132, 146, 225, 133, 161, 41, 72, 114, 97, 100, 226, 136, 149, 115, 50, 72, 216, 167, 217, 131, 216, 168, 216, 177, 72, 216, 167, 217, 132, 217, 132, 217, 135, 72, 216, 177, 216, 179, 217, 136, 217, 132, 72, 216, 177, 219, 140, 216, 167, 217, 132, 72, 216, 181, 217, 132, 216, 185, 217, 133, 72, 216, 185, 217, 132, 217, 138, 217, 135, 72, 217, 133, 216, 173, 217, 133, 216, 175, 72, 217, 136, 216, 179, 217, 132, 217, 133, 73, 226, 128, 178, 226, 128, 178, 226, 128, 178, 73, 226, 128, 181, 226, 128, 181, 226, 128, 181, 73, 226, 136, 171, 226, 136, 171, 226, 136, 171, 73, 226, 136, 174, 226, 136, 174, 226, 136, 174, 73, 227, 128, 148, 228, 184, 137, 227, 128, 149, 73, 227, 128, 148, 228, 186, 140, 227, 128, 149, 73, 227, 128, 148, 229, 139, 157, 227, 128, 149, 73, 227, 128, 148, 229, 174, 137, 227, 128, 149, 73, 227, 128, 148, 230, 137, 147, 227, 128, 149, 73, 227, 128, 148, 230, 149, 151, 227, 128, 149, 73, 227, 128, 148, 230, 156, 172, 227, 128, 149, 73, 227, 128, 148, 231, 130, 185, 227, 128, 149, 73, 227, 128, 148, 231, 155, 151, 227, 128, 149, 73, 227, 130, 162, 227, 131, 188, 227, 131, 171, 73, 227, 130, 164, 227, 131, 179, 227, 131, 129, 73, 227, 130, 166, 227, 130, 169, 227, 131, 179, 73, 227, 130, 170, 227, 131, 179, 227, 130, 185, 73, 227, 130, 170, 227, 131, 188, 227, 131, 160, 73, 227, 130, 171, 227, 130, 164, 227, 131, 170, 73, 227, 130, 177, 227, 131, 188, 227, 130, 185, 73, 227, 130, 179, 227, 131, 171, 227, 131, 138, 73, 227, 130, 187, 227, 131, 179, 227, 131, 129, 73, 227, 130, 187, 227, 131, 179, 227, 131, 136, 73, 227, 131, 134, 227, 130, 153, 227, 130, 183, 73, 227, 131, 136, 227, 130, 153, 227, 131, 171, 73, 227, 131, 142, 227, 131, 131, 227, 131, 136, 73, 227, 131, 143, 227, 130, 164, 227, 131, 132, 73, 227, 131, 146, 227, 130, 153, 227, 131, 171, 73, 227, 131, 146, 227, 130, 154, 227, 130, 179, 73, 227, 131, 149, 227, 131, 169, 227, 131, 179, 73, 227, 131, 152, 227, 130, 154, 227, 130, 189, 73, 227, 131, 152, 227, 131, 171, 227, 131, 132, 73, 227, 131, 155, 227, 131, 188, 227, 131, 171, 73, 227, 131, 155, 227, 131, 188, 227, 131, 179, 73, 227, 131, 158, 227, 130, 164, 227, 131, 171, 73, 227, 131, 158, 227, 131, 131, 227, 131, 143, 73, 227, 131, 158, 227, 131, 171, 227, 130, 175, 73, 227, 131, 164, 227, 131, 188, 227, 131, 171, 73, 227, 131, 166, 227, 130, 162, 227, 131, 179, 73, 227, 131, 175, 227, 131, 131, 227, 131, 136, 76, 226, 128, 178, 226, 128, 178, 226, 128, 178, 226, 128, 178, 76, 226, 136, 171, 226, 136, 171, 226, 136, 171, 226, 136, 171, 76, 227, 130, 162, 227, 131, 171, 227, 131, 149, 227, 130, 161, 76, 227, 130, 168, 227, 131, 188, 227, 130, 171, 227, 131, 188, 76, 227, 130, 171, 227, 130, 153, 227, 131, 173, 227, 131, 179, 76, 227, 130, 171, 227, 130, 153, 227, 131, 179, 227, 131, 158, 76, 227, 130, 171, 227, 131, 169, 227, 131, 131, 227, 131, 136, 76, 227, 130, 171, 227, 131, 173, 227, 131, 170, 227, 131, 188, 76, 227, 130, 173, 227, 130, 153, 227, 131, 139, 227, 131, 188, 76, 227, 130, 173, 227, 131, 165, 227, 131, 170, 227, 131, 188, 76, 227, 130, 175, 227, 130, 153, 227, 131, 169, 227, 131, 160, 76, 227, 130, 175, 227, 131, 173, 227, 131, 188, 227, 131, 141, 76, 227, 130, 181, 227, 130, 164, 227, 130, 175, 227, 131, 171, 76, 227, 130, 191, 227, 130, 153, 227, 131, 188, 227, 130, 185, 76, 227, 131, 143, 227, 130, 154, 227, 131, 188, 227, 131, 132, 76, 227, 131, 146, 227, 130, 154, 227, 130, 175, 227, 131, 171, 76, 227, 131, 149, 227, 130, 163, 227, 131, 188, 227, 131, 136, 76, 227, 131, 152, 227, 130, 153, 227, 131, 188, 227, 130, 191, 76, 227, 131, 152, 227, 130, 154, 227, 131, 139, 227, 131, 146, 76, 227, 131, 152, 227, 130, 154, 227, 131, 179, 227, 130, 185, 76, 227, 131, 155, 227, 130, 153, 227, 131, 171, 227, 131, 136, 76, 227, 131, 158, 227, 130, 164, 227, 130, 175, 227, 131, 173, 76, 227, 131, 159, 227, 130, 175, 227, 131, 173, 227, 131, 179, 76, 227, 131, 161, 227, 131, 188, 227, 131, 136, 227, 131, 171, 76, 227, 131, 170, 227, 131, 131, 227, 131, 136, 227, 131, 171, 76, 227, 131, 171, 227, 131, 146, 227, 130, 154, 227, 131, 188, 76, 230, 160, 170, 229, 188, 143, 228, 188, 154, 231, 164, 190, 78, 40, 225, 132, 139, 225, 133, 169, 225, 132, 146, 225, 133, 174, 41, 79, 216, 172, 217, 132, 32, 216, 172, 217, 132, 216, 167, 217, 132, 217, 135, 79, 227, 130, 162, 227, 131, 143, 227, 130, 154, 227, 131, 188, 227, 131, 136, 79, 227, 130, 162, 227, 131, 179, 227, 131, 152, 227, 130, 154, 227, 130, 162, 79, 227, 130, 173, 227, 131, 173, 227, 131, 175, 227, 131, 131, 227, 131, 136, 79, 227, 130, 181, 227, 131, 179, 227, 131, 129, 227, 131, 188, 227, 131, 160, 79, 227, 131, 143, 227, 130, 153, 227, 131, 188, 227, 131, 172, 227, 131, 171, 79, 227, 131, 152, 227, 130, 175, 227, 130, 191, 227, 131, 188, 227, 131, 171, 79, 227, 131, 155, 227, 130, 154, 227, 130, 164, 227, 131, 179, 227, 131, 136, 79, 227, 131, 158, 227, 131, 179, 227, 130, 183, 227, 131, 167, 227, 131, 179, 79, 227, 131, 161, 227, 130, 171, 227, 130, 153, 227, 131, 136, 227, 131, 179, 79, 227, 131, 171, 227, 131, 188, 227, 131, 149, 227, 130, 153, 227, 131, 171, 81, 40, 225, 132, 139, 225, 133, 169, 225, 132, 140, 225, 133, 165, 225, 134, 171, 41, 82, 227, 130, 173, 227, 130, 153, 227, 131, 171, 227, 130, 191, 227, 130, 153, 227, 131, 188, 82, 227, 130, 173, 227, 131, 173, 227, 130, 175, 227, 130, 153, 227, 131, 169, 227, 131, 160, 82, 227, 130, 173, 227, 131, 173, 227, 131, 161, 227, 131, 188, 227, 131, 136, 227, 131, 171, 82, 227, 130, 175, 227, 130, 153, 227, 131, 169, 227, 131, 160, 227, 131, 136, 227, 131, 179, 82, 227, 130, 175, 227, 131, 171, 227, 130, 187, 227, 130, 153, 227, 130, 164, 227, 131, 173, 82, 227, 131, 143, 227, 130, 154, 227, 131, 188, 227, 130, 187, 227, 131, 179, 227, 131, 136, 82, 227, 131, 146, 227, 130, 154, 227, 130, 162, 227, 130, 185, 227, 131, 136, 227, 131, 171, 82, 227, 131, 149, 227, 130, 153, 227, 131, 131, 227, 130, 183, 227, 130, 167, 227, 131, 171, 82, 227, 131, 159, 227, 131, 170, 227, 131, 143, 227, 130, 153, 227, 131, 188, 227, 131, 171, 82, 227, 131, 172, 227, 131, 179, 227, 131, 136, 227, 130, 177, 227, 130, 153, 227, 131, 179, 97, 216, 181, 217, 132, 217, 137, 32, 216, 167, 217, 132, 217, 132, 217, 135, 32, 216, 185, 217, 132, 217, 138, 217, 135, 32, 217, 136, 216, 179, 217, 132, 217, 133, 6, 224, 167, 135, 224, 166, 190, 1, 6, 224, 167, 135, 224, 167, 151, 1, 6, 224, 173, 135, 224, 172, 190, 1, 6, 224, 173, 135, 224, 173, 150, 1, 6, 224, 173, 135, 224, 173, 151, 1, 6, 224, 174, 146, 224, 175, 151, 1, 6, 224, 175, 134, 224, 174, 190, 1, 6, 224, 175, 134, 224, 175, 151, 1, 6, 224, 175, 135, 224, 174, 190, 1, 6, 224, 178, 191, 224, 179, 149, 1, 6, 224, 179, 134, 224, 179, 149, 1, 6, 224, 179, 134, 224, 179, 150, 1, 6, 224, 181, 134, 224, 180, 190, 1, 6, 224, 181, 134, 224, 181, 151, 1, 6, 224, 181, 135, 224, 180, 190, 1, 6, 224, 183, 153, 224, 183, 159, 1, 6, 225, 128, 165, 225, 128, 174, 1, 6, 225, 172, 133, 225, 172, 181, 1, 6, 225, 172, 135, 225, 172, 181, 1, 6, 225, 172, 137, 225, 172, 181, 1, 6, 225, 172, 139, 225, 172, 181, 1, 6, 225, 172, 141, 225, 172, 181, 1, 6, 225, 172, 145, 225, 172, 181, 1, 6, 225, 172, 186, 225, 172, 181, 1, 6, 225, 172, 188, 225, 172, 181, 1, 6, 225, 172, 190, 225, 172, 181, 1, 6, 225, 172, 191, 225, 172, 181, 1, 6, 225, 173, 130, 225, 172, 181, 1, 8, 240, 145, 132, 177, 240, 145, 132, 167, 1, 8, 240, 145, 132, 178, 240, 145, 132, 167, 1, 8, 240, 145, 141, 135, 240, 145, 140, 190, 1, 8, 240, 145, 141, 135, 240, 145, 141, 151, 1, 8, 240, 145, 146, 185, 240, 145, 146, 176, 1, 8, 240, 145, 146, 185, 240, 145, 146, 186, 1, 8, 240, 145, 146, 185, 240, 145, 146, 189, 1, 8, 240, 145, 150, 184, 240, 145, 150, 175, 1, 8, 240, 145, 150, 185, 240, 145, 150, 175, 1, 8, 240, 145, 164, 181, 240, 145, 164, 176, 1, 9, 224, 179, 134, 224, 179, 130, 224, 179, 149, 2, 9, 224, 183, 153, 224, 183, 143, 224, 183, 138, 22, 68, 68, 90, 204, 140, 205, 68, 68, 122, 204, 140, 205, 68, 100, 122, 204, 140, 205, 70, 217, 132, 216, 167, 217, 147, 205, 70, 217, 132, 216, 167, 217, 148, 205, 70, 217, 132, 216, 167, 217, 149, 185, 70, 225, 132, 128, 225, 133, 161, 1, 70, 225, 132, 130, 225, 133, 161, 1, 70, 225, 132, 131, 225, 133, 161, 1, 70, 225, 132, 133, 225, 133, 161, 1, 70, 225, 132, 134, 225, 133, 161, 1, 70, 225, 132, 135, 225, 133, 161, 1, 70, 225, 132, 137, 225, 133, 161, 1, 70, 225, 132, 139, 225, 133, 161, 1, 70, 225, 132, 139, 225, 133, 174, 1, 70, 225, 132, 140, 225, 133, 161, 1, 70, 225, 132, 142, 225, 133, 161, 1, 70, 225, 132, 143, 225, 133, 161, 1, 70, 225, 132, 144, 225, 133, 161, 1, 70, 225, 132, 145, 225, 133, 161, 1, 70, 225, 132, 146, 225, 133, 161, 1, 73, 227, 131, 161, 227, 130, 171, 227, 130, 153, 17, 76, 225, 132, 140, 225, 133, 174, 225, 132, 139, 225, 133, 180, 1, 76, 227, 130, 173, 227, 130, 153, 227, 130, 171, 227, 130, 153, 17, 76, 227, 130, 179, 227, 131, 188, 227, 131, 155, 227, 130, 154, 17, 76, 227, 131, 164, 227, 131, 188, 227, 131, 136, 227, 130, 153, 17, 79, 225, 132, 142, 225, 133, 161, 225, 134, 183, 225, 132, 128, 225, 133, 169, 1, 79, 227, 130, 164, 227, 131, 139, 227, 131, 179, 227, 130, 175, 227, 130, 153, 17, 79, 227, 130, 183, 227, 131, 170, 227, 131, 179, 227, 130, 175, 227, 130, 153, 17, 79, 227, 131, 152, 227, 130, 154, 227, 131, 188, 227, 130, 183, 227, 130, 153, 17, 79, 227, 131, 155, 227, 130, 154, 227, 131, 179, 227, 131, 136, 227, 130, 153, 17, 82, 227, 130, 168, 227, 130, 185, 227, 130, 175, 227, 131, 188, 227, 131, 136, 227, 130, 153, 17, 82, 227, 131, 149, 227, 130, 161, 227, 131, 169, 227, 131, 131, 227, 131, 136, 227, 130, 153, 17, 134, 224, 179, 134, 224, 179, 130, 1, 134, 224, 183, 153, 224, 183, 143, 1, 3, 60, 204, 184, 5, 3, 61, 204, 184, 5, 3, 62, 204, 184, 5, 3, 65, 204, 128, 205, 3, 65, 204, 129, 205, 3, 65, 204, 131, 205, 3, 65, 204, 132, 205, 3, 65, 204, 137, 205, 3, 65, 204, 140, 205, 3, 65, 204, 143, 205, 3, 65, 204, 145, 205, 3, 65, 204, 165, 185, 3, 65, 204, 168, 169, 3, 66, 204, 135, 205, 3, 66, 204, 163, 185, 3, 66, 204, 177, 185, 3, 67, 204, 129, 205, 3, 67, 204, 130, 205, 3, 67, 204, 135, 205, 3, 67, 204, 140, 205, 3, 68, 204, 135, 205, 3, 68, 204, 140, 205, 3, 68, 204, 163, 185, 3, 68, 204, 167, 169, 3, 68, 204, 173, 185, 3, 68, 204, 177, 185, 3, 69, 204, 128, 205, 3, 69, 204, 129, 205, 3, 69, 204, 131, 205, 3, 69, 204, 134, 205, 3, 69, 204, 135, 205, 3, 69, 204, 136, 205, 3, 69, 204, 137, 205, 3, 69, 204, 140, 205, 3, 69, 204, 143, 205, 3, 69, 204, 145, 205, 3, 69, 204, 168, 169, 3, 69, 204, 173, 185, 3, 69, 204, 176, 185, 3, 70, 204, 135, 205, 3, 71, 204, 129, 205, 3, 71, 204, 130, 205, 3, 71, 204, 132, 205, 3, 71, 204, 134, 205, 3, 71, 204, 135, 205, 3, 71, 204, 140, 205, 3, 71, 204, 167, 169, 3, 72, 204, 130, 205, 3, 72, 204, 135, 205, 3, 72, 204, 136, 205, 3, 72, 204, 140, 205, 3, 72, 204, 163, 185, 3, 72, 204, 167, 169, 3, 72, 204, 174, 185, 3, 73, 204, 128, 205, 3, 73, 204, 129, 205, 3, 73, 204, 130, 205, 3, 73, 204, 131, 205, 3, 73, 204, 132, 205, 3, 73, 204, 134, 205, 3, 73, 204, 135, 205, 3, 73, 204, 137, 205, 3, 73, 204, 140, 205, 3, 73, 204, 143, 205, 3, 73, 204, 145, 205, 3, 73, 204, 163, 185, 3, 73, 204, 168, 169, 3, 73, 204, 176, 185, 3, 74, 204, 130, 205, 3, 75, 204, 129, 205, 3, 75, 204, 140, 205, 3, 75, 204, 163, 185, 3, 75, 204, 167, 169, 3, 75, 204, 177, 185, 3, 76, 204, 129, 205, 3, 76, 204, 140, 205, 3, 76, 204, 167, 169, 3, 76, 204, 173, 185, 3, 76, 204, 177, 185, 3, 77, 204, 129, 205, 3, 77, 204, 135, 205, 3, 77, 204, 163, 185, 3, 78, 204, 128, 205, 3, 78, 204, 129, 205, 3, 78, 204, 131, 205, 3, 78, 204, 135, 205, 3, 78, 204, 140, 205, 3, 78, 204, 163, 185, 3, 78, 204, 167, 169, 3, 78, 204, 173, 185, 3, 78, 204, 177, 185, 3, 79, 204, 128, 205, 3, 79, 204, 129, 205, 3, 79, 204, 134, 205, 3, 79, 204, 137, 205, 3, 79, 204, 139, 205, 3, 79, 204, 140, 205, 3, 79, 204, 143, 205, 3, 79, 204, 145, 205, 3, 80, 204, 129, 205, 3, 80, 204, 135, 205, 3, 82, 204, 129, 205, 3, 82, 204, 135, 205, 3, 82, 204, 140, 205, 3, 82, 204, 143, 205, 3, 82, 204, 145, 205, 3, 82, 204, 167, 169, 3, 82, 204, 177, 185, 3, 83, 204, 130, 205, 3, 83, 204, 135, 205, 3, 83, 204, 166, 185, 3, 83, 204, 167, 169, 3, 84, 204, 135, 205, 3, 84, 204, 140, 205, 3, 84, 204, 163, 185, 3, 84, 204, 166, 185, 3, 84, 204, 167, 169, 3, 84, 204, 173, 185, 3, 84, 204, 177, 185, 3, 85, 204, 128, 205, 3, 85, 204, 129, 205, 3, 85, 204, 130, 205, 3, 85, 204, 134, 205, 3, 85, 204, 137, 205, 3, 85, 204, 138, 205, 3, 85, 204, 139, 205, 3, 85, 204, 140, 205, 3, 85, 204, 143, 205, 3, 85, 204, 145, 205, 3, 85, 204, 163, 185, 3, 85, 204, 164, 185, 3, 85, 204, 168, 169, 3, 85, 204, 173, 185, 3, 85, 204, 176, 185, 3, 86, 204, 131, 205, 3, 86, 204, 163, 185, 3, 87, 204, 128, 205, 3, 87, 204, 129, 205, 3, 87, 204, 130, 205, 3, 87, 204, 135, 205, 3, 87, 204, 136, 205, 3, 87, 204, 163, 185, 3, 88, 204, 135, 205, 3, 88, 204, 136, 205, 3, 89, 204, 128, 205, 3, 89, 204, 129, 205, 3, 89, 204, 130, 205, 3, 89, 204, 131, 205, 3, 89, 204, 132, 205, 3, 89, 204, 135, 205, 3, 89, 204, 136, 205, 3, 89, 204, 137, 205, 3, 89, 204, 163, 185, 3, 90, 204, 129, 205, 3, 90, 204, 130, 205, 3, 90, 204, 135, 205, 3, 90, 204, 140, 205, 3, 90, 204, 163, 185, 3, 90, 204, 177, 185, 3, 97, 204, 128, 205, 3, 97, 204, 129, 205, 3, 97, 204, 131, 205, 3, 97, 204, 132, 205, 3, 97, 204, 137, 205, 3, 97, 204, 140, 205, 3, 97, 204, 143, 205, 3, 97, 204, 145, 205, 3, 97, 204, 165, 185, 3, 97, 204, 168, 169, 3, 98, 204, 135, 205, 3, 98, 204, 163, 185, 3, 98, 204, 177, 185, 3, 99, 204, 129, 205, 3, 99, 204, 130, 205, 3, 99, 204, 135, 205, 3, 99, 204, 140, 205, 3, 100, 204, 135, 205, 3, 100, 204, 140, 205, 3, 100, 204, 163, 185, 3, 100, 204, 167, 169, 3, 100, 204, 173, 185, 3, 100, 204, 177, 185, 3, 101, 204, 128, 205, 3, 101, 204, 129, 205, 3, 101, 204, 131, 205, 3, 101, 204, 134, 205, 3, 101, 204, 135, 205, 3, 101, 204, 136, 205, 3, 101, 204, 137, 205, 3, 101, 204, 140, 205, 3, 101, 204, 143, 205, 3, 101, 204, 145, 205, 3, 101, 204, 168, 169, 3, 101, 204, 173, 185, 3, 101, 204, 176, 185, 3, 102, 204, 135, 205, 3, 103, 204, 129, 205, 3, 103, 204, 130, 205, 3, 103, 204, 132, 205, 3, 103, 204, 134, 205, 3, 103, 204, 135, 205, 3, 103, 204, 140, 205, 3, 103, 204, 167, 169, 3, 104, 204, 130, 205, 3, 104, 204, 135, 205, 3, 104, 204, 136, 205, 3, 104, 204, 140, 205, 3, 104, 204, 163, 185, 3, 104, 204, 167, 169, 3, 104, 204, 174, 185, 3, 104, 204, 177, 185, 3, 105, 204, 128, 205, 3, 105, 204, 129, 205, 3, 105, 204, 130, 205, 3, 105, 204, 131, 205, 3, 105, 204, 132, 205, 3, 105, 204, 134, 205, 3, 105, 204, 137, 205, 3, 105, 204, 140, 205, 3, 105, 204, 143, 205, 3, 105, 204, 145, 205, 3, 105, 204, 163, 185, 3, 105, 204, 168, 169, 3, 105, 204, 176, 185, 3, 106, 204, 130, 205, 3, 106, 204, 140, 205, 3, 107, 204, 129, 205, 3, 107, 204, 140, 205, 3, 107, 204, 163, 185, 3, 107, 204, 167, 169, 3, 107, 204, 177, 185, 3, 108, 204, 129, 205, 3, 108, 204, 140, 205, 3, 108, 204, 167, 169, 3, 108, 204, 173, 185, 3, 108, 204, 177, 185, 3, 109, 204, 129, 205, 3, 109, 204, 135, 205, 3, 109, 204, 163, 185, 3, 110, 204, 128, 205, 3, 110, 204, 129, 205, 3, 110, 204, 131, 205, 3, 110, 204, 135, 205, 3, 110, 204, 140, 205, 3, 110, 204, 163, 185, 3, 110, 204, 167, 169, 3, 110, 204, 173, 185, 3, 110, 204, 177, 185, 3, 111, 204, 128, 205, 3, 111, 204, 129, 205, 3, 111, 204, 134, 205, 3, 111, 204, 137, 205, 3, 111, 204, 139, 205, 3, 111, 204, 140, 205, 3, 111, 204, 143, 205, 3, 111, 204, 145, 205, 3, 112, 204, 129, 205, 3, 112, 204, 135, 205, 3, 114, 204, 129, 205, 3, 114, 204, 135, 205, 3, 114, 204, 140, 205, 3, 114, 204, 143, 205, 3, 114, 204, 145, 205, 3, 114, 204, 167, 169, 3, 114, 204, 177, 185, 3, 115, 204, 130, 205, 3, 115, 204, 135, 205, 3, 115, 204, 166, 185, 3, 115, 204, 167, 169, 3, 116, 204, 135, 205, 3, 116, 204, 136, 205, 3, 116, 204, 140, 205, 3, 116, 204, 163, 185, 3, 116, 204, 166, 185, 3, 116, 204, 167, 169, 3, 116, 204, 173, 185, 3, 116, 204, 177, 185, 3, 117, 204, 128, 205, 3, 117, 204, 129, 205, 3, 117, 204, 130, 205, 3, 117, 204, 134, 205, 3, 117, 204, 137, 205, 3, 117, 204, 138, 205, 3, 117, 204, 139, 205, 3, 117, 204, 140, 205, 3, 117, 204, 143, 205, 3, 117, 204, 145, 205, 3, 117, 204, 163, 185, 3, 117, 204, 164, 185, 3, 117, 204, 168, 169, 3, 117, 204, 173, 185, 3, 117, 204, 176, 185, 3, 118, 204, 131, 205, 3, 118, 204, 163, 185, 3, 119, 204, 128, 205, 3, 119, 204, 129, 205, 3, 119, 204, 130, 205, 3, 119, 204, 135, 205, 3, 119, 204, 136, 205, 3, 119, 204, 138, 205, 3, 119, 204, 163, 185, 3, 120, 204, 135, 205, 3, 120, 204, 136, 205, 3, 121, 204, 128, 205, 3, 121, 204, 129, 205, 3, 121, 204, 130, 205, 3, 121, 204, 131, 205, 3, 121, 204, 132, 205, 3, 121, 204, 135, 205, 3, 121, 204, 136, 205, 3, 121, 204, 137, 205, 3, 121, 204, 138, 205, 3, 121, 204, 163, 185, 3, 122, 204, 129, 205, 3, 122, 204, 130, 205, 3, 122, 204, 135, 205, 3, 122, 204, 140, 205, 3, 122, 204, 163, 185, 3, 122, 204, 177, 185, 4, 194, 168, 204, 128, 206, 4, 194, 168, 204, 129, 206, 4, 194, 168, 205, 130, 206, 4, 195, 134, 204, 129, 205, 4, 195, 134, 204, 132, 205, 4, 195, 152, 204, 129, 205, 4, 195, 166, 204, 129, 205, 4, 195, 166, 204, 132, 205, 4, 195, 184, 204, 129, 205, 4, 197, 191, 204, 135, 205, 4, 198, 183, 204, 140, 205, 4, 202, 146, 204, 140, 205, 4, 206, 145, 204, 128, 205, 4, 206, 145, 204, 129, 205, 4, 206, 145, 204, 132, 205, 4, 206, 145, 204, 134, 205, 4, 206, 145, 205, 133, 221, 4, 206, 149, 204, 128, 205, 4, 206, 149, 204, 129, 205, 4, 206, 151, 204, 128, 205, 4, 206, 151, 204, 129, 205, 4, 206, 151, 205, 133, 221, 4, 206, 153, 204, 128, 205, 4, 206, 153, 204, 129, 205, 4, 206, 153, 204, 132, 205, 4, 206, 153, 204, 134, 205, 4, 206, 153, 204, 136, 205, 4, 206, 159, 204, 128, 205, 4, 206, 159, 204, 129, 205, 4, 206, 161, 204, 148, 205, 4, 206, 165, 204, 128, 205, 4, 206, 165, 204, 129, 205, 4, 206, 165, 204, 132, 205, 4, 206, 165, 204, 134, 205, 4, 206, 165, 204, 136, 205, 4, 206, 169, 204, 128, 205, 4, 206, 169, 204, 129, 205, 4, 206, 169, 205, 133, 221, 4, 206, 177, 204, 132, 205, 4, 206, 177, 204, 134, 205, 4, 206, 177, 205, 133, 221, 4, 206, 181, 204, 128, 205, 4, 206, 181, 204, 129, 205, 4, 206, 183, 205, 133, 221, 4, 206, 185, 204, 128, 205, 4, 206, 185, 204, 129, 205, 4, 206, 185, 204, 132, 205, 4, 206, 185, 204, 134, 205, 4, 206, 185, 205, 130, 205, 4, 206, 191, 204, 128, 205, 4, 206, 191, 204, 129, 205, 4, 207, 129, 204, 147, 205, 4, 207, 129, 204, 148, 205, 4, 207, 133, 204, 128, 205, 4, 207, 133, 204, 129, 205, 4, 207, 133, 204, 132, 205, 4, 207, 133, 204, 134, 205, 4, 207, 133, 205, 130, 205, 4, 207, 137, 205, 133, 221, 4, 207, 146, 204, 129, 205, 4, 207, 146, 204, 136, 205, 4, 208, 134, 204, 136, 205, 4, 208, 144, 204, 134, 205, 4, 208, 144, 204, 136, 205, 4, 208, 147, 204, 129, 205, 4, 208, 149, 204, 128, 205, 4, 208, 149, 204, 134, 205, 4, 208, 149, 204, 136, 205, 4, 208, 150, 204, 134, 205, 4, 208, 150, 204, 136, 205, 4, 208, 151, 204, 136, 205, 4, 208, 152, 204, 128, 205, 4, 208, 152, 204, 132, 205, 4, 208, 152, 204, 134, 205, 4, 208, 152, 204, 136, 205, 4, 208, 154, 204, 129, 205, 4, 208, 158, 204, 136, 205, 4, 208, 163, 204, 132, 205, 4, 208, 163, 204, 134, 205, 4, 208, 163, 204, 136, 205, 4, 208, 163, 204, 139, 205, 4, 208, 167, 204, 136, 205, 4, 208, 171, 204, 136, 205, 4, 208, 173, 204, 136, 205, 4, 208, 176, 204, 134, 205, 4, 208, 176, 204, 136, 205, 4, 208, 179, 204, 129, 205, 4, 208, 181, 204, 128, 205, 4, 208, 181, 204, 134, 205, 4, 208, 181, 204, 136, 205, 4, 208, 182, 204, 134, 205, 4, 208, 182, 204, 136, 205, 4, 208, 183, 204, 136, 205, 4, 208, 184, 204, 128, 205, 4, 208, 184, 204, 132, 205, 4, 208, 184, 204, 134, 205, 4, 208, 184, 204, 136, 205, 4, 208, 186, 204, 129, 205, 4, 208, 190, 204, 136, 205, 4, 209, 131, 204, 132, 205, 4, 209, 131, 204, 134, 205, 4, 209, 131, 204, 136, 205, 4, 209, 131, 204, 139, 205, 4, 209, 135, 204, 136, 205, 4, 209, 139, 204, 136, 205, 4, 209, 141, 204, 136, 205, 4, 209, 150, 204, 136, 205, 4, 209, 180, 204, 143, 205, 4, 209, 181, 204, 143, 205, 4, 211, 152, 204, 136, 205, 4, 211, 153, 204, 136, 205, 4, 211, 168, 204, 136, 205, 4, 211, 169, 204, 136, 205, 4, 216, 167, 217, 147, 205, 4, 216, 167, 217, 148, 205, 4, 216, 167, 217, 149, 185, 4, 217, 136, 217, 148, 205, 4, 217, 138, 217, 148, 205, 4, 219, 129, 217, 148, 205, 4, 219, 146, 217, 148, 205, 4, 219, 149, 217, 148, 205, 5, 65, 204, 130, 204, 128, 206, 5, 65, 204, 130, 204, 129, 206, 5, 65, 204, 130, 204, 131, 206, 5, 65, 204, 130, 204, 137, 206, 5, 65, 204, 134, 204, 128, 206, 5, 65, 204, 134, 204, 129, 206, 5, 65, 204, 134, 204, 131, 206, 5, 65, 204, 134, 204, 137, 206, 5, 65, 204, 135, 204, 132, 206, 5, 65, 204, 136, 204, 132, 206, 5, 65, 204, 138, 204, 129, 206, 5, 65, 204, 163, 204, 130, 206, 5, 65, 204, 163, 204, 134, 206, 5, 67, 204, 167, 204, 129, 206, 5, 69, 204, 130, 204, 128, 206, 5, 69, 204, 130, 204, 129, 206, 5, 69, 204, 130, 204, 131, 206, 5, 69, 204, 130, 204, 137, 206, 5, 69, 204, 132, 204, 128, 206, 5, 69, 204, 132, 204, 129, 206, 5, 69, 204, 163, 204, 130, 206, 5, 69, 204, 167, 204, 134, 206, 5, 73, 204, 136, 204, 129, 206, 5, 76, 204, 163, 204, 132, 206, 5, 79, 204, 130, 204, 128, 206, 5, 79, 204, 130, 204, 129, 206, 5, 79, 204, 130, 204, 131, 206, 5, 79, 204, 130, 204, 137, 206, 5, 79, 204, 131, 204, 129, 206, 5, 79, 204, 131, 204, 132, 206, 5, 79, 204, 131, 204, 136, 206, 5, 79, 204, 132, 204, 128, 206, 5, 79, 204, 132, 204, 129, 206, 5, 79, 204, 135, 204, 132, 206, 5, 79, 204, 136, 204, 132, 206, 5, 79, 204, 155, 204, 128, 206, 5, 79, 204, 155, 204, 129, 206, 5, 79, 204, 155, 204, 131, 206, 5, 79, 204, 155, 204, 137, 206, 5, 79, 204, 155, 204, 163, 186, 5, 79, 204, 163, 204, 130, 206, 5, 79, 204, 168, 204, 132, 206, 5, 82, 204, 163, 204, 132, 206, 5, 83, 204, 129, 204, 135, 206, 5, 83, 204, 140, 204, 135, 206, 5, 83, 204, 163, 204, 135, 206, 5, 85, 204, 131, 204, 129, 206, 5, 85, 204, 132, 204, 136, 206, 5, 85, 204, 136, 204, 128, 206, 5, 85, 204, 136, 204, 129, 206, 5, 85, 204, 136, 204, 132, 206, 5, 85, 204, 136, 204, 140, 206, 5, 85, 204, 155, 204, 128, 206, 5, 85, 204, 155, 204, 129, 206, 5, 85, 204, 155, 204, 131, 206, 5, 85, 204, 155, 204, 137, 206, 5, 85, 204, 155, 204, 163, 186, 5, 97, 204, 130, 204, 128, 206, 5, 97, 204, 130, 204, 129, 206, 5, 97, 204, 130, 204, 131, 206, 5, 97, 204, 130, 204, 137, 206, 5, 97, 204, 134, 204, 128, 206, 5, 97, 204, 134, 204, 129, 206, 5, 97, 204, 134, 204, 131, 206, 5, 97, 204, 134, 204, 137, 206, 5, 97, 204, 135, 204, 132, 206, 5, 97, 204, 136, 204, 132, 206, 5, 97, 204, 138, 204, 129, 206, 5, 97, 204, 163, 204, 130, 206, 5, 97, 204, 163, 204, 134, 206, 5, 99, 204, 167, 204, 129, 206, 5, 101, 204, 130, 204, 128, 206, 5, 101, 204, 130, 204, 129, 206, 5, 101, 204, 130, 204, 131, 206, 5, 101, 204, 130, 204, 137, 206, 5, 101, 204, 132, 204, 128, 206, 5, 101, 204, 132, 204, 129, 206, 5, 101, 204, 163, 204, 130, 206, 5, 101, 204, 167, 204, 134, 206, 5, 105, 204, 136, 204, 129, 206, 5, 108, 204, 163, 204, 132, 206, 5, 111, 204, 130, 204, 128, 206, 5, 111, 204, 130, 204, 129, 206, 5, 111, 204, 130, 204, 131, 206, 5, 111, 204, 130, 204, 137, 206, 5, 111, 204, 131, 204, 129, 206, 5, 111, 204, 131, 204, 132, 206, 5, 111, 204, 131, 204, 136, 206, 5, 111, 204, 132, 204, 128, 206, 5, 111, 204, 132, 204, 129, 206, 5, 111, 204, 135, 204, 132, 206, 5, 111, 204, 136, 204, 132, 206, 5, 111, 204, 155, 204, 128, 206, 5, 111, 204, 155, 204, 129, 206, 5, 111, 204, 155, 204, 131, 206, 5, 111, 204, 155, 204, 137, 206, 5, 111, 204, 155, 204, 163, 186, 5, 111, 204, 163, 204, 130, 206, 5, 111, 204, 168, 204, 132, 206, 5, 114, 204, 163, 204, 132, 206, 5, 115, 204, 129, 204, 135, 206, 5, 115, 204, 140, 204, 135, 206, 5, 115, 204, 163, 204, 135, 206, 5, 117, 204, 131, 204, 129, 206, 5, 117, 204, 132, 204, 136, 206, 5, 117, 204, 136, 204, 128, 206, 5, 117, 204, 136, 204, 129, 206, 5, 117, 204, 136, 204, 132, 206, 5, 117, 204, 136, 204, 140, 206, 5, 117, 204, 155, 204, 128, 206, 5, 117, 204, 155, 204, 129, 206, 5, 117, 204, 155, 204, 131, 206, 5, 117, 204, 155, 204, 137, 206, 5, 117, 204, 155, 204, 163, 186, 5, 225, 190, 191, 204, 128, 206, 5, 225, 190, 191, 204, 129, 206, 5, 225, 190, 191, 205, 130, 206, 5, 225, 191, 190, 204, 128, 206, 5, 225, 191, 190, 204, 129, 206, 5, 225, 191, 190, 205, 130, 206, 5, 226, 134, 144, 204, 184, 5, 5, 226, 134, 146, 204, 184, 5, 5, 226, 134, 148, 204, 184, 5, 5, 226, 135, 144, 204, 184, 5, 5, 226, 135, 146, 204, 184, 5, 5, 226, 135, 148, 204, 184, 5, 5, 226, 136, 131, 204, 184, 5, 5, 226, 136, 136, 204, 184, 5, 5, 226, 136, 139, 204, 184, 5, 5, 226, 136, 163, 204, 184, 5, 5, 226, 136, 165, 204, 184, 5, 5, 226, 136, 188, 204, 184, 5, 5, 226, 137, 131, 204, 184, 5, 5, 226, 137, 133, 204, 184, 5, 5, 226, 137, 136, 204, 184, 5, 5, 226, 137, 141, 204, 184, 5, 5, 226, 137, 161, 204, 184, 5, 5, 226, 137, 164, 204, 184, 5, 5, 226, 137, 165, 204, 184, 5, 5, 226, 137, 178, 204, 184, 5, 5, 226, 137, 179, 204, 184, 5, 5, 226, 137, 182, 204, 184, 5, 5, 226, 137, 183, 204, 184, 5, 5, 226, 137, 186, 204, 184, 5, 5, 226, 137, 187, 204, 184, 5, 5, 226, 137, 188, 204, 184, 5, 5, 226, 137, 189, 204, 184, 5, 5, 226, 138, 130, 204, 184, 5, 5, 226, 138, 131, 204, 184, 5, 5, 226, 138, 134, 204, 184, 5, 5, 226, 138, 135, 204, 184, 5, 5, 226, 138, 145, 204, 184, 5, 5, 226, 138, 146, 204, 184, 5, 5, 226, 138, 162, 204, 184, 5, 5, 226, 138, 168, 204, 184, 5, 5, 226, 138, 169, 204, 184, 5, 5, 226, 138, 171, 204, 184, 5, 5, 226, 138, 178, 204, 184, 5, 5, 226, 138, 179, 204, 184, 5, 5, 226, 138, 180, 204, 184, 5, 5, 226, 138, 181, 204, 184, 5, 6, 206, 145, 204, 147, 205, 133, 222, 6, 206, 145, 204, 148, 205, 133, 222, 6, 206, 149, 204, 147, 204, 128, 206, 6, 206, 149, 204, 147, 204, 129, 206, 6, 206, 149, 204, 148, 204, 128, 206, 6, 206, 149, 204, 148, 204, 129, 206, 6, 206, 151, 204, 147, 205, 133, 222, 6, 206, 151, 204, 148, 205, 133, 222, 6, 206, 153, 204, 147, 204, 128, 206, 6, 206, 153, 204, 147, 204, 129, 206, 6, 206, 153, 204, 147, 205, 130, 206, 6, 206, 153, 204, 148, 204, 128, 206, 6, 206, 153, 204, 148, 204, 129, 206, 6, 206, 153, 204, 148, 205, 130, 206, 6, 206, 159, 204, 147, 204, 128, 206, 6, 206, 159, 204, 147, 204, 129, 206, 6, 206, 159, 204, 148, 204, 128, 206, 6, 206, 159, 204, 148, 204, 129, 206, 6, 206, 165, 204, 148, 204, 128, 206, 6, 206, 165, 204, 148, 204, 129, 206, 6, 206, 165, 204, 148, 205, 130, 206, 6, 206, 169, 204, 147, 205, 133, 222, 6, 206, 169, 204, 148, 205, 133, 222, 6, 206, 177, 204, 128, 205, 133, 222, 6, 206, 177, 204, 129, 205, 133, 222, 6, 206, 177, 204, 147, 205, 133, 222, 6, 206, 177, 204, 148, 205, 133, 222, 6, 206, 177, 205, 130, 205, 133, 222, 6, 206, 181, 204, 147, 204, 128, 206, 6, 206, 181, 204, 147, 204, 129, 206, 6, 206, 181, 204, 148, 204, 128, 206, 6, 206, 181, 204, 148, 204, 129, 206, 6, 206, 183, 204, 128, 205, 133, 222, 6, 206, 183, 204, 129, 205, 133, 222, 6, 206, 183, 204, 147, 205, 133, 222, 6, 206, 183, 204, 148, 205, 133, 222, 6, 206, 183, 205, 130, 205, 133, 222, 6, 206, 185, 204, 136, 204, 128, 206, 6, 206, 185, 204, 136, 204, 129, 206, 6, 206, 185, 204, 136, 205, 130, 206, 6, 206, 185, 204, 147, 204, 128, 206, 6, 206, 185, 204, 147, 204, 129, 206, 6, 206, 185, 204, 147, 205, 130, 206, 6, 206, 185, 204, 148, 204, 128, 206, 6, 206, 185, 204, 148, 204, 129, 206, 6, 206, 185, 204, 148, 205, 130, 206, 6, 206, 191, 204, 147, 204, 128, 206, 6, 206, 191, 204, 147, 204, 129, 206, 6, 206, 191, 204, 148, 204, 128, 206, 6, 206, 191, 204, 148, 204, 129, 206, 6, 207, 133, 204, 136, 204, 128, 206, 6, 207, 133, 204, 136, 204, 129, 206, 6, 207, 133, 204, 136, 205, 130, 206, 6, 207, 133, 204, 147, 204, 128, 206, 6, 207, 133, 204, 147, 204, 129, 206, 6, 207, 133, 204, 147, 205, 130, 206, 6, 207, 133, 204, 148, 204, 128, 206, 6, 207, 133, 204, 148, 204, 129, 206, 6, 207, 133, 204, 148, 205, 130, 206, 6, 207, 137, 204, 128, 205, 133, 222, 6, 207, 137, 204, 129, 205, 133, 222, 6, 207, 137, 204, 147, 205, 133, 222, 6, 207, 137, 204, 148, 205, 133, 222, 6, 207, 137, 205, 130, 205, 133, 222, 6, 224, 164, 168, 224, 164, 188, 13, 6, 224, 164, 176, 224, 164, 188, 13, 6, 224, 164, 179, 224, 164, 188, 13, 6, 224, 177, 134, 224, 177, 150, 137, 6, 224, 183, 153, 224, 183, 138, 21, 6, 227, 129, 134, 227, 130, 153, 17, 6, 227, 129, 139, 227, 130, 153, 17, 6, 227, 129, 141, 227, 130, 153, 17, 6, 227, 129, 143, 227, 130, 153, 17, 6, 227, 129, 145, 227, 130, 153, 17, 6, 227, 129, 147, 227, 130, 153, 17, 6, 227, 129, 149, 227, 130, 153, 17, 6, 227, 129, 151, 227, 130, 153, 17, 6, 227, 129, 153, 227, 130, 153, 17, 6, 227, 129, 155, 227, 130, 153, 17, 6, 227, 129, 157, 227, 130, 153, 17, 6, 227, 129, 159, 227, 130, 153, 17, 6, 227, 129, 161, 227, 130, 153, 17, 6, 227, 129, 164, 227, 130, 153, 17, 6, 227, 129, 166, 227, 130, 153, 17, 6, 227, 129, 168, 227, 130, 153, 17, 6, 227, 129, 175, 227, 130, 153, 17, 6, 227, 129, 175, 227, 130, 154, 17, 6, 227, 129, 178, 227, 130, 153, 17, 6, 227, 129, 178, 227, 130, 154, 17, 6, 227, 129, 181, 227, 130, 153, 17, 6, 227, 129, 181, 227, 130, 154, 17, 6, 227, 129, 184, 227, 130, 153, 17, 6, 227, 129, 184, 227, 130, 154, 17, 6, 227, 129, 187, 227, 130, 153, 17, 6, 227, 129, 187, 227, 130, 154, 17, 6, 227, 130, 157, 227, 130, 153, 17, 6, 227, 130, 166, 227, 130, 153, 17, 6, 227, 130, 171, 227, 130, 153, 17, 6, 227, 130, 173, 227, 130, 153, 17, 6, 227, 130, 175, 227, 130, 153, 17, 6, 227, 130, 177, 227, 130, 153, 17, 6, 227, 130, 179, 227, 130, 153, 17, 6, 227, 130, 181, 227, 130, 153, 17, 6, 227, 130, 183, 227, 130, 153, 17, 6, 227, 130, 185, 227, 130, 153, 17, 6, 227, 130, 187, 227, 130, 153, 17, 6, 227, 130, 189, 227, 130, 153, 17, 6, 227, 130, 191, 227, 130, 153, 17, 6, 227, 131, 129, 227, 130, 153, 17, 6, 227, 131, 132, 227, 130, 153, 17, 6, 227, 131, 134, 227, 130, 153, 17, 6, 227, 131, 136, 227, 130, 153, 17, 6, 227, 131, 143, 227, 130, 153, 17, 6, 227, 131, 143, 227, 130, 154, 17, 6, 227, 131, 146, 227, 130, 153, 17, 6, 227, 131, 146, 227, 130, 154, 17, 6, 227, 131, 149, 227, 130, 153, 17, 6, 227, 131, 149, 227, 130, 154, 17, 6, 227, 131, 152, 227, 130, 153, 17, 6, 227, 131, 152, 227, 130, 154, 17, 6, 227, 131, 155, 227, 130, 153, 17, 6, 227, 131, 155, 227, 130, 154, 17, 6, 227, 131, 175, 227, 130, 153, 17, 6, 227, 131, 176, 227, 130, 153, 17, 6, 227, 131, 177, 227, 130, 153, 17, 6, 227, 131, 178, 227, 130, 153, 17, 6, 227, 131, 189, 227, 130, 153, 17, 8, 206, 145, 204, 147, 204, 128, 205, 133, 223, 8, 206, 145, 204, 147, 204, 129, 205, 133, 223, 8, 206, 145, 204, 147, 205, 130, 205, 133, 223, 8, 206, 145, 204, 148, 204, 128, 205, 133, 223, 8, 206, 145, 204, 148, 204, 129, 205, 133, 223, 8, 206, 145, 204, 148, 205, 130, 205, 133, 223, 8, 206, 151, 204, 147, 204, 128, 205, 133, 223, 8, 206, 151, 204, 147, 204, 129, 205, 133, 223, 8, 206, 151, 204, 147, 205, 130, 205, 133, 223, 8, 206, 151, 204, 148, 204, 128, 205, 133, 223, 8, 206, 151, 204, 148, 204, 129, 205, 133, 223, 8, 206, 151, 204, 148, 205, 130, 205, 133, 223, 8, 206, 169, 204, 147, 204, 128, 205, 133, 223, 8, 206, 169, 204, 147, 204, 129, 205, 133, 223, 8, 206, 169, 204, 147, 205, 130, 205, 133, 223, 8, 206, 169, 204, 148, 204, 128, 205, 133, 223, 8, 206, 169, 204, 148, 204, 129, 205, 133, 223, 8, 206, 169, 204, 148, 205, 130, 205, 133, 223, 8, 206, 177, 204, 147, 204, 128, 205, 133, 223, 8, 206, 177, 204, 147, 204, 129, 205, 133, 223, 8, 206, 177, 204, 147, 205, 130, 205, 133, 223, 8, 206, 177, 204, 148, 204, 128, 205, 133, 223, 8, 206, 177, 204, 148, 204, 129, 205, 133, 223, 8, 206, 177, 204, 148, 205, 130, 205, 133, 223, 8, 206, 183, 204, 147, 204, 128, 205, 133, 223, 8, 206, 183, 204, 147, 204, 129, 205, 133, 223, 8, 206, 183, 204, 147, 205, 130, 205, 133, 223, 8, 206, 183, 204, 148, 204, 128, 205, 133, 223, 8, 206, 183, 204, 148, 204, 129, 205, 133, 223, 8, 206, 183, 204, 148, 205, 130, 205, 133, 223, 8, 207, 137, 204, 147, 204, 128, 205, 133, 223, 8, 207, 137, 204, 147, 204, 129, 205, 133, 223, 8, 207, 137, 204, 147, 205, 130, 205, 133, 223, 8, 207, 137, 204, 148, 204, 128, 205, 133, 223, 8, 207, 137, 204, 148, 204, 129, 205, 133, 223, 8, 207, 137, 204, 148, 205, 130, 205, 133, 223, 8, 240, 145, 130, 153, 240, 145, 130, 186, 13, 8, 240, 145, 130, 155, 240, 145, 130, 186, 13, 8, 240, 145, 130, 165, 240, 145, 130, 186, 13, 66, 194, 180, 1, 67, 32, 204, 129, 205, 67, 32, 204, 131, 205, 67, 32, 204, 132, 205, 67, 32, 204, 133, 205, 67, 32, 204, 134, 205, 67, 32, 204, 135, 205, 67, 32, 204, 136, 205, 67, 32, 204, 138, 205, 67, 32, 204, 139, 205, 67, 32, 204, 147, 205, 67, 32, 204, 148, 205, 67, 32, 204, 167, 169, 67, 32, 204, 168, 169, 67, 32, 204, 179, 185, 67, 32, 205, 130, 205, 67, 32, 205, 133, 221, 67, 32, 217, 139, 93, 67, 32, 217, 140, 97, 67, 32, 217, 141, 101, 67, 32, 217, 142, 105, 67, 32, 217, 143, 109, 67, 32, 217, 144, 113, 67, 32, 217, 145, 117, 67, 32, 217, 146, 121, 67, 65, 204, 138, 205, 67, 115, 204, 135, 205, 68, 32, 227, 130, 153, 17, 68, 32, 227, 130, 154, 17, 68, 194, 168, 204, 129, 206, 68, 206, 145, 204, 129, 205, 68, 206, 149, 204, 129, 205, 68, 206, 151, 204, 129, 205, 68, 206, 153, 204, 129, 205, 68, 206, 159, 204, 129, 205, 68, 206, 165, 204, 129, 205, 68, 206, 165, 204, 136, 205, 68, 206, 169, 204, 129, 205, 68, 206, 177, 204, 129, 205, 68, 206, 181, 204, 129, 205, 68, 206, 183, 204, 129, 205, 68, 206, 185, 204, 129, 205, 68, 206, 191, 204, 129, 205, 68, 207, 133, 204, 129, 205, 68, 207, 137, 204, 129, 205, 68, 215, 144, 214, 183, 53, 68, 215, 144, 214, 184, 57, 68, 215, 144, 214, 188, 69, 68, 215, 145, 214, 188, 69, 68, 215, 145, 214, 191, 77, 68, 215, 146, 214, 188, 69, 68, 215, 147, 214, 188, 69, 68, 215, 148, 214, 188, 69, 68, 215, 149, 214, 185, 61, 68, 215, 149, 214, 188, 69, 68, 215, 150, 214, 188, 69, 68, 215, 152, 214, 188, 69, 68, 215, 153, 214, 180, 41, 68, 215, 153, 214, 188, 69, 68, 215, 154, 214, 188, 69, 68, 215, 155, 214, 188, 69, 68, 215, 155, 214, 191, 77, 68, 215, 156, 214, 188, 69, 68, 215, 158, 214, 188, 69, 68, 215, 160, 214, 188, 69, 68, 215, 161, 214, 188, 69, 68, 215, 163, 214, 188, 69, 68, 215, 164, 214, 188, 69, 68, 215, 164, 214, 191, 77, 68, 215, 166, 214, 188, 69, 68, 215, 167, 214, 188, 69, 68, 215, 168, 214, 188, 69, 68, 215, 169, 214, 188, 69, 68, 215, 169, 215, 129, 81, 68, 215, 169, 215, 130, 85, 68, 215, 170, 214, 188, 69, 68, 215, 178, 214, 183, 53, 68, 216, 167, 217, 139, 93, 68, 216, 167, 217, 147, 205, 68, 216, 167, 217, 148, 205, 68, 216, 167, 217, 149, 185, 68, 216, 176, 217, 176, 125, 68, 216, 177, 217, 176, 125, 68, 217, 128, 217, 139, 93, 68, 217, 128, 217, 142, 105, 68, 217, 128, 217, 143, 109, 68, 217, 128, 217, 144, 113, 68, 217, 128, 217, 145, 117, 68, 217, 128, 217, 146, 121, 68, 217, 135, 217, 176, 125, 68, 217, 136, 217, 148, 205, 68, 217, 137, 217, 176, 125, 68, 217, 138, 217, 148, 205, 68, 219, 146, 217, 148, 205, 68, 219, 149, 217, 148, 205, 69, 32, 204, 136, 204, 128, 206, 69, 32, 204, 136, 204, 129, 206, 69, 32, 204, 136, 205, 130, 206, 69, 32, 204, 147, 204, 128, 206, 69, 32, 204, 147, 204, 129, 206, 69, 32, 204, 147, 205, 130, 206, 69, 32, 204, 148, 204, 128, 206, 69, 32, 204, 148, 204, 129, 206, 69, 32, 204, 148, 205, 130, 206, 69, 32, 217, 140, 217, 145, 118, 69, 32, 217, 141, 217, 145, 118, 69, 32, 217, 142, 217, 145, 118, 69, 32, 217, 143, 217, 145, 118, 69, 32, 217, 144, 217, 145, 118, 69, 32, 217, 145, 217, 176, 126, 69, 226, 171, 157, 204, 184, 5, 70, 206, 185, 204, 136, 204, 129, 206, 70, 207, 133, 204, 136, 204, 129, 206, 70, 215, 169, 214, 188, 215, 129, 82, 70, 215, 169, 214, 188, 215, 130, 86, 70, 217, 128, 217, 142, 217, 145, 118, 70, 217, 128, 217, 143, 217, 145, 118, 70, 217, 128, 217, 144, 217, 145, 118, 70, 224, 164, 149, 224, 164, 188, 13, 70, 224, 164, 150, 224, 164, 188, 13, 70, 224, 164, 151, 224, 164, 188, 13, 70, 224, 164, 156, 224, 164, 188, 13, 70, 224, 164, 161, 224, 164, 188, 13, 70, 224, 164, 162, 224, 164, 188, 13, 70, 224, 164, 171, 224, 164, 188, 13, 70, 224, 164, 175, 224, 164, 188, 13, 70, 224, 166, 161, 224, 166, 188, 13, 70, 224, 166, 162, 224, 166, 188, 13, 70, 224, 166, 175, 224, 166, 188, 13, 70, 224, 168, 150, 224, 168, 188, 13, 70, 224, 168, 151, 224, 168, 188, 13, 70, 224, 168, 156, 224, 168, 188, 13, 70, 224, 168, 171, 224, 168, 188, 13, 70, 224, 168, 178, 224, 168, 188, 13, 70, 224, 168, 184, 224, 168, 188, 13, 70, 224, 172, 161, 224, 172, 188, 13, 70, 224, 172, 162, 224, 172, 188, 13, 70, 224, 190, 178, 224, 190, 128, 161, 70, 224, 190, 179, 224, 190, 128, 161, 70, 227, 131, 134, 227, 130, 153, 17, 72, 240, 157, 133, 151, 240, 157, 133, 165, 177, 72, 240, 157, 133, 152, 240, 157, 133, 165, 177, 72, 240, 157, 134, 185, 240, 157, 133, 165, 177, 72, 240, 157, 134, 186, 240, 157, 133, 165, 177, 73, 224, 190, 178, 224, 189, 177, 224, 190, 128, 162, 73, 224, 190, 179, 224, 189, 177, 224, 190, 128, 162, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 174, 178, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 175, 178, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 176, 178, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 177, 178, 76, 240, 157, 133, 152, 240, 157, 133, 165, 240, 157, 133, 178, 178, 76, 240, 157, 134, 185, 240, 157, 133, 165, 240, 157, 133, 174, 178, 76, 240, 157, 134, 185, 240, 157, 133, 165, 240, 157, 133, 175, 178, 76, 240, 157, 134, 186, 240, 157, 133, 165, 240, 157, 133, 174, 178, 76, 240, 157, 134, 186, 240, 157, 133, 165, 240, 157, 133, 175, 178, 131, 65, 204, 130, 205, 131, 65, 204, 134, 205, 131, 65, 204, 135, 205, 131, 65, 204, 136, 205, 131, 65, 204, 138, 205, 131, 65, 204, 163, 185, 131, 67, 204, 167, 169, 131, 69, 204, 130, 205, 131, 69, 204, 132, 205, 131, 69, 204, 163, 185, 131, 69, 204, 167, 169, 131, 73, 204, 136, 205, 131, 76, 204, 163, 185, 131, 79, 204, 130, 205, 131, 79, 204, 131, 205, 131, 79, 204, 132, 205, 131, 79, 204, 135, 205, 131, 79, 204, 136, 205, 131, 79, 204, 155, 177, 131, 79, 204, 163, 185, 131, 79, 204, 168, 169, 131, 82, 204, 163, 185, 131, 83, 204, 129, 205, 131, 83, 204, 140, 205, 131, 83, 204, 163, 185, 131, 85, 204, 131, 205, 131, 85, 204, 132, 205, 131, 85, 204, 136, 205, 131, 85, 204, 155, 177, 131, 97, 204, 130, 205, 131, 97, 204, 134, 205, 131, 97, 204, 135, 205, 131, 97, 204, 136, 205, 131, 97, 204, 138, 205, 131, 97, 204, 163, 185, 131, 99, 204, 167, 169, 131, 101, 204, 130, 205, 131, 101, 204, 132, 205, 131, 101, 204, 163, 185, 131, 101, 204, 167, 169, 131, 105, 204, 136, 205, 131, 108, 204, 163, 185, 131, 111, 204, 130, 205, 131, 111, 204, 131, 205, 131, 111, 204, 132, 205, 131, 111, 204, 135, 205, 131, 111, 204, 136, 205, 131, 111, 204, 155, 177, 131, 111, 204, 163, 185, 131, 111, 204, 168, 169, 131, 114, 204, 163, 185, 131, 115, 204, 129, 205, 131, 115, 204, 140, 205, 131, 115, 204, 163, 185, 131, 117, 204, 131, 205, 131, 117, 204, 132, 205, 131, 117, 204, 136, 205, 131, 117, 204, 155, 177, 132, 206, 145, 204, 147, 205, 132, 206, 145, 204, 148, 205, 132, 206, 149, 204, 147, 205, 132, 206, 149, 204, 148, 205, 132, 206, 151, 204, 147, 205, 132, 206, 151, 204, 148, 205, 132, 206, 153, 204, 147, 205, 132, 206, 153, 204, 148, 205, 132, 206, 159, 204, 147, 205, 132, 206, 159, 204, 148, 205, 132, 206, 165, 204, 148, 205, 132, 206, 169, 204, 147, 205, 132, 206, 169, 204, 148, 205, 132, 206, 177, 204, 128, 205, 132, 206, 177, 204, 129, 205, 132, 206, 177, 204, 147, 205, 132, 206, 177, 204, 148, 205, 132, 206, 177, 205, 130, 205, 132, 206, 181, 204, 147, 205, 132, 206, 181, 204, 148, 205, 132, 206, 183, 204, 128, 205, 132, 206, 183, 204, 129, 205, 132, 206, 183, 204, 147, 205, 132, 206, 183, 204, 148, 205, 132, 206, 183, 205, 130, 205, 132, 206, 185, 204, 136, 205, 132, 206, 185, 204, 147, 205, 132, 206, 185, 204, 148, 205, 132, 206, 191, 204, 147, 205, 132, 206, 191, 204, 148, 205, 132, 207, 133, 204, 136, 205, 132, 207, 133, 204, 147, 205, 132, 207, 133, 204, 148, 205, 132, 207, 137, 204, 128, 205, 132, 207, 137, 204, 129, 205, 132, 207, 137, 204, 147, 205, 132, 207, 137, 204, 148, 205, 132, 207, 137, 205, 130, 205, 134, 206, 145, 204, 147, 204, 128, 206, 134, 206, 145, 204, 147, 204, 129, 206, 134, 206, 145, 204, 147, 205, 130, 206, 134, 206, 145, 204, 148, 204, 128, 206, 134, 206, 145, 204, 148, 204, 129, 206, 134, 206, 145, 204, 148, 205, 130, 206, 134, 206, 151, 204, 147, 204, 128, 206, 134, 206, 151, 204, 147, 204, 129, 206, 134, 206, 151, 204, 147, 205, 130, 206, 134, 206, 151, 204, 148, 204, 128, 206, 134, 206, 151, 204, 148, 204, 129, 206, 134, 206, 151, 204, 148, 205, 130, 206, 134, 206, 169, 204, 147, 204, 128, 206, 134, 206, 169, 204, 147, 204, 129, 206, 134, 206, 169, 204, 147, 205, 130, 206, 134, 206, 169, 204, 148, 204, 128, 206, 134, 206, 169, 204, 148, 204, 129, 206, 134, 206, 169, 204, 148, 205, 130, 206, 134, 206, 177, 204, 147, 204, 128, 206, 134, 206, 177, 204, 147, 204, 129, 206, 134, 206, 177, 204, 147, 205, 130, 206, 134, 206, 177, 204, 148, 204, 128, 206, 134, 206, 177, 204, 148, 204, 129, 206, 134, 206, 177, 204, 148, 205, 130, 206, 134, 206, 183, 204, 147, 204, 128, 206, 134, 206, 183, 204, 147, 204, 129, 206, 134, 206, 183, 204, 147, 205, 130, 206, 134, 206, 183, 204, 148, 204, 128, 206, 134, 206, 183, 204, 148, 204, 129, 206, 134, 206, 183, 204, 148, 205, 130, 206, 134, 207, 137, 204, 147, 204, 128, 206, 134, 207, 137, 204, 147, 204, 129, 206, 134, 207, 137, 204, 147, 205, 130, 206, 134, 207, 137, 204, 148, 204, 128, 206, 134, 207, 137, 204, 148, 204, 129, 206, 134, 207, 137, 204, 148, 205, 130, 206, 66, 204, 128, 205, 51, 66, 204, 129, 205, 51, 66, 204, 147, 205, 51, 67, 225, 133, 161, 1, 0, 67, 225, 133, 162, 1, 0, 67, 225, 133, 163, 1, 0, 67, 225, 133, 164, 1, 0, 67, 225, 133, 165, 1, 0, 67, 225, 133, 166, 1, 0, 67, 225, 133, 167, 1, 0, 67, 225, 133, 168, 1, 0, 67, 225, 133, 169, 1, 0, 67, 225, 133, 170, 1, 0, 67, 225, 133, 171, 1, 0, 67, 225, 133, 172, 1, 0, 67, 225, 133, 173, 1, 0, 67, 225, 133, 174, 1, 0, 67, 225, 133, 175, 1, 0, 67, 225, 133, 176, 1, 0, 67, 225, 133, 177, 1, 0, 67, 225, 133, 178, 1, 0, 67, 225, 133, 179, 1, 0, 67, 225, 133, 180, 1, 0, 67, 225, 133, 181, 1, 0, 67, 225, 134, 170, 1, 0, 67, 225, 134, 172, 1, 0, 67, 225, 134, 173, 1, 0, 67, 225, 134, 176, 1, 0, 67, 225, 134, 177, 1, 0, 67, 225, 134, 178, 1, 0, 67, 225, 134, 179, 1, 0, 67, 225, 134, 180, 1, 0, 67, 225, 134, 181, 1, 0, 68, 204, 136, 204, 129, 206, 51, 67, 227, 130, 153, 17, 4, 67, 227, 130, 154, 17, 4, 70, 224, 189, 177, 224, 189, 178, 162, 39, 70, 224, 189, 177, 224, 189, 180, 166, 39, 70, 224, 189, 177, 224, 190, 128, 162, 39, 0, 1]); - nfcValues = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12166, 12171, 18079, 12176, 18094, 18099, 40960, 18109, 12281, 12286, 18114, 12306, 12421, 12426, 12431, 18134, 0, 12571, 12606, 12611, 18144, 18149, 18164, 0, 40960, 12746, 12751, 12756, 18214, 12876, 0, 0, 12946, 12951, 18224, 12956, 18239, 18244, 40960, 18254, 13061, 13066, 18259, 13086, 13206, 13211, 13216, 18279, 0, 13356, 13391, 13396, 18289, 18294, 18309, 0, 40960, 13536, 13541, 13546, 18359, 13671, 0, 13696, 12181, 12961, 18084, 18229, 12211, 12991, 12231, 13011, 12236, 13016, 12241, 13021, 12246, 13026, 12256, 13036, 0, 0, 18119, 18264, 12296, 13076, 12301, 13081, 12331, 13111, 12316, 13096, 12356, 13136, 12366, 13146, 12371, 13151, 12381, 13161, 12386, 13166, 0, 0, 12436, 13221, 12441, 13226, 12446, 13231, 12481, 13261, 12451, 0, 0, 0, 12491, 13271, 12511, 13296, 0, 12521, 13306, 12531, 13316, 12526, 13311, 0, 0, 0, 0, 12566, 13351, 12591, 13376, 12581, 13366, 0, 0, 0, 18154, 18299, 12616, 13401, 12626, 13411, 0, 0, 12656, 13441, 12681, 13466, 12666, 13451, 18189, 18334, 12691, 13476, 12706, 13491, 18194, 18339, 12731, 13521, 12716, 13506, 0, 0, 18204, 18349, 18209, 18354, 12761, 13551, 12771, 13561, 12776, 13566, 12806, 13596, 12841, 13631, 12881, 13676, 12901, 12916, 13716, 12926, 13726, 12931, 13731, 40960, 0, 0, 0, 0, 33024, 33024, 33024, 0, 0, 0, 0, 0, 0, 12191, 12971, 12461, 13241, 12631, 13416, 12781, 13571, 14822, 15221, 14815, 15214, 14829, 15228, 14808, 15207, 0, 14535, 14934, 14528, 14927, 13770, 13788, 0, 0, 12376, 13156, 12501, 13286, 18179, 18324, 14759, 15158, 13806, 13812, 13276, 0, 0, 0, 12351, 13131, 0, 0, 12561, 13346, 14542, 14941, 13764, 13782, 13776, 13794, 12196, 12976, 12201, 12981, 12321, 13101, 12326, 13106, 12466, 13246, 12471, 13251, 12636, 13421, 12641, 13426, 12671, 13456, 12676, 13461, 12786, 13576, 12791, 13581, 12701, 13486, 12726, 13516, 0, 0, 12401, 13181, 0, 0, 0, 0, 0, 0, 18089, 18234, 18129, 18274, 14710, 15109, 14675, 15074, 18159, 18304, 14703, 15102, 12891, 13686, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39219, 39219, 39219, 39219, 39219, 33075, 39219, 39219, 39219, 39219, 39219, 39219, 39219, 33075, 33075, 39219, 33075, 39219, 33075, 39219, 39219, 33076, 33070, 33070, 33070, 33070, 33076, 39212, 33070, 33070, 33070, 33070, 33070, 33066, 33066, 39214, 39214, 39214, 39214, 39210, 39210, 33070, 33070, 33070, 33070, 39214, 39214, 33070, 39214, 39214, 33070, 33070, 33025, 33025, 33025, 33025, 39169, 33070, 33070, 33070, 33070, 33075, 33075, 33075, 18885, 18890, 39219, 18895, 19080, 39223, 33075, 33070, 33070, 33070, 33075, 33075, 33075, 33070, 33070, 0, 33075, 33075, 33075, 33070, 33070, 33070, 33070, 33075, 33076, 33070, 33070, 33075, 33077, 33078, 33078, 33077, 33078, 33078, 33077, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 0, 0, 0, 0, 371, 0, 0, 0, 0, 0, 33024, 0, 0, 0, 55, 0, 0, 0, 0, 0, 33024, 13752, 13824, 206, 13854, 13866, 13884, 0, 13914, 0, 13932, 13962, 15903, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 13902, 13950, 18453, 13998, 18495, 14016, 16007, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 14136, 14148, 0, 14130, 0, 0, 40960, 14112, 0, 0, 0, 0, 14196, 14172, 14214, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14184, 40960, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 40960, 0, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14316, 40960, 0, 0, 0, 40960, 0, 0, 14154, 14286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14118, 14250, 14124, 14256, 0, 0, 14142, 14274, 40960, 40960, 14400, 14406, 14160, 14292, 14166, 14298, 0, 0, 14178, 14310, 14190, 14322, 14202, 14334, 40960, 40960, 14412, 14418, 14244, 14376, 14208, 14340, 14220, 14352, 14226, 14358, 14232, 14364, 0, 0, 14238, 14370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33070, 33075, 33075, 33075, 33075, 33070, 33075, 33075, 33075, 33071, 33070, 33075, 33075, 33075, 33075, 33075, 33075, 33070, 33070, 33070, 33070, 33070, 33070, 33075, 33075, 33070, 33075, 33075, 33071, 33074, 33075, 33030, 33031, 33032, 33033, 33034, 33035, 33036, 33037, 33038, 33039, 33039, 33040, 33041, 33042, 0, 33043, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 40960, 33047, 33048, 33049, 33050, 33051, 33052, 33053, 33054, 39219, 39219, 39214, 33070, 33075, 33075, 33075, 33075, 33075, 33070, 33075, 33075, 33070, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33070, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 0, 33070, 33075, 33075, 33070, 33075, 33075, 33070, 33075, 33075, 33075, 33070, 33070, 33070, 33047, 33048, 33049, 33075, 33075, 33075, 33070, 33075, 33075, 33070, 33070, 33075, 33075, 33075, 33075, 33075, 0, 0, 0, 0, 0, 40960, 11571, 40960, 11579, 40960, 11587, 40960, 11595, 40960, 11603, 0, 0, 40960, 11611, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33027, 39168, 0, 0, 0, 0, 40960, 11619, 40960, 11627, 40960, 40960, 33075, 33075, 33070, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33070, 33075, 33075, 33078, 33067, 33070, 33066, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33076, 33074, 33074, 33070, 0, 33075, 33077, 33070, 33075, 33070, 12206, 12986, 12216, 12996, 12221, 13001, 12226, 13006, 14563, 14962, 12251, 13031, 12261, 13041, 12276, 13056, 12266, 13046, 12271, 13051, 14598, 14997, 14605, 15004, 12336, 13116, 12341, 13121, 14619, 15018, 12346, 13126, 12361, 13141, 12391, 13171, 12406, 13186, 12396, 13176, 12411, 13191, 12416, 13196, 12486, 13266, 14626, 15025, 12496, 13281, 12506, 13291, 12516, 13301, 18139, 18284, 14633, 15032, 12541, 13326, 12536, 13321, 12546, 13331, 12551, 13336, 12556, 13341, 12576, 13361, 12586, 13371, 12601, 13386, 12596, 13381, 14668, 15067, 14682, 15081, 14689, 15088, 14696, 15095, 12646, 13431, 12651, 13436, 12661, 13446, 18184, 18329, 14766, 15165, 12686, 13471, 12696, 13481, 18199, 18344, 14773, 15172, 14780, 15179, 14787, 15186, 12711, 13496, 12721, 13511, 12741, 13531, 12736, 13526, 12801, 13591, 12816, 13606, 12811, 13601, 14794, 15193, 14801, 15200, 12821, 13611, 12826, 13616, 12831, 13621, 12836, 13626, 12851, 13641, 12846, 13636, 12856, 13651, 12861, 13656, 12866, 13661, 12896, 13691, 12921, 13721, 12936, 13736, 12941, 13741, 13201, 13501, 13646, 13706, 0, 13800, 0, 0, 0, 0, 18104, 18249, 12186, 12966, 14479, 14878, 14472, 14871, 14493, 14892, 14486, 14885, 14549, 14948, 14507, 14906, 14500, 14899, 14521, 14920, 14514, 14913, 14556, 14955, 18124, 18269, 12311, 13091, 12291, 13071, 14577, 14976, 14570, 14969, 14591, 14990, 14584, 14983, 14612, 15011, 12456, 13236, 12476, 13256, 18174, 18319, 12621, 13406, 14647, 15046, 14640, 15039, 14661, 15060, 14654, 15053, 14752, 15151, 14724, 15123, 14717, 15116, 14738, 15137, 14731, 15130, 14745, 15144, 12796, 13586, 12766, 13556, 14843, 15242, 14836, 15235, 14857, 15256, 14850, 15249, 14864, 15263, 12871, 13666, 12911, 13711, 12906, 13701, 12886, 13681, 0, 0, 0, 0, 0, 0, 18459, 18465, 18741, 18765, 18749, 18773, 18757, 18781, 18369, 18375, 18597, 18621, 18605, 18629, 18613, 18637, 18477, 18483, 15823, 15839, 15831, 15847, 0, 0, 18381, 18387, 15615, 15631, 15623, 15639, 0, 0, 18501, 18507, 18789, 18813, 18797, 18821, 18805, 18829, 18393, 18399, 18645, 18669, 18653, 18677, 18661, 18685, 18525, 18531, 15919, 15943, 15927, 15951, 15935, 15959, 18405, 18411, 15663, 15687, 15671, 15695, 15679, 15703, 18537, 18543, 15967, 15983, 15975, 15991, 0, 0, 18417, 18423, 15711, 15727, 15719, 15735, 0, 0, 18555, 18561, 16023, 16047, 16031, 16055, 16039, 16063, 0, 18429, 0, 15743, 0, 15751, 0, 15759, 18579, 18585, 18837, 18861, 18845, 18869, 18853, 18877, 18435, 18441, 18693, 18717, 18701, 18725, 18709, 18733, 18447, 17205, 13992, 17211, 18489, 17217, 14010, 17223, 14040, 17229, 14064, 17235, 18567, 17241, 0, 0, 15799, 15807, 16795, 16825, 16805, 16835, 16815, 16845, 15599, 15607, 16615, 16645, 16625, 16655, 16635, 16665, 15871, 15879, 16855, 16885, 16865, 16895, 16875, 16905, 15647, 15655, 16675, 16705, 16685, 16715, 16695, 16725, 16087, 16095, 16915, 16945, 16925, 16955, 16935, 16965, 15767, 15775, 16735, 16765, 16745, 16775, 16755, 16785, 13980, 13974, 15783, 13986, 15791, 0, 18471, 15815, 13836, 13830, 13818, 17157, 13842, 33024, 470, 41216, 33024, 13758, 15855, 14004, 15863, 0, 18513, 15887, 13848, 17163, 13860, 17169, 13872, 15270, 15277, 15284, 14028, 14022, 15895, 17659, 0, 0, 14034, 15911, 13896, 13890, 13878, 17175, 0, 15291, 15298, 15305, 14082, 14076, 15999, 17667, 14052, 14058, 14088, 16015, 13944, 13938, 13926, 17187, 13920, 13746, 17151, 129, 0, 0, 16071, 14094, 16079, 0, 18591, 16103, 13908, 17181, 13956, 17199, 13968, 17005, 41216, 0, 0, 15389, 0, 40960, 15396, 40960, 0, 15403, 40960, 15410, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12156, 40960, 15424, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 15417, 12151, 12161, 15431, 15438, 40960, 40960, 15445, 15452, 40960, 40960, 15459, 15466, 40960, 40960, 40960, 40960, 0, 0, 15473, 15480, 40960, 40960, 15501, 15508, 40960, 40960, 15515, 15522, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 40960, 40960, 0, 40960, 15543, 15550, 15557, 15564, 0, 0, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16159, 40960, 16167, 40960, 16175, 40960, 16183, 40960, 16191, 40960, 16199, 40960, 16207, 40960, 16215, 40960, 16223, 40960, 16231, 40960, 16239, 40960, 16247, 0, 40960, 16255, 40960, 16263, 40960, 16271, 0, 0, 0, 0, 0, 40960, 16279, 16287, 40960, 16295, 16303, 40960, 16311, 16319, 40960, 16327, 16335, 40960, 16343, 16351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16151, 0, 0, 0, 0, 39172, 39172, 33024, 33024, 40960, 16359, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16375, 40960, 16383, 40960, 16391, 40960, 16399, 40960, 16407, 40960, 16415, 40960, 16423, 40960, 16431, 40960, 16439, 40960, 16447, 40960, 16455, 40960, 16463, 0, 40960, 16471, 40960, 16479, 40960, 16487, 0, 0, 0, 0, 0, 40960, 16495, 16503, 40960, 16511, 16519, 40960, 16527, 16535, 40960, 16543, 16551, 40960, 16559, 16567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 0, 16367, 0, 0, 16575, 16583, 16591, 16599, 0, 0, 40960, 16607, 0, 4986, 3326, 5078, 5026, 3674, 1774, 2274, 5678, 5678, 2574, 5218, 2374, 2570, 3058, 4050, 4450, 4762, 4822, 4874, 5150, 3446, 3586, 3758, 3910, 4706, 5194, 5494, 1810, 2230, 3466, 3794, 4758, 5574, 2742, 3706, 4742, 4890, 3110, 4542, 4834, 2850, 3346, 3610, 3870, 5162, 1874, 2026, 2134, 3214, 3458, 3790, 4082, 4474, 4750, 4774, 5066, 5362, 5542, 5570, 4142, 4206, 4390, 4678, 5246, 5582, 4942, 2506, 2878, 4318, 4510, 3842, 4150, 5018, 5354, 2502, 2706, 3450, 3630, 3682, 4374, 4414, 5290, 2130, 4522, 2038, 2034, 4250, 4394, 4702, 5298, 4970, 3114, 3446, 4954, 1786, 2662, 2966, 3890, 4018, 2166, 4158, 1890, 2938, 1754, 3566, 3238, 4370, 2250, 2486, 4094, 4710, 4926, 3514, 5114, 3558, 3130, 4638, 3162, 4014, 1838, 1962, 2030, 3414, 4350, 4598, 4938, 5214, 2142, 2322, 2586, 2866, 3266, 3710, 4162, 5274, 5502, 5586, 5610, 2106, 3318, 3494, 5102, 2814, 3034, 3062, 3206, 3694, 3770, 3946, 4238, 4402, 4502, 5086, 4718, 5126, 5250, 2066, 2110, 2342, 3754, 4854, 4926, 2846, 2958, 3154, 3506, 4314, 3878, 1854, 2434, 2662, 2762, 2970, 3906, 3934, 4462, 4494, 5222, 5350, 5366, 5426, 1878, 4226, 5202, 5326, 2994, 1818, 1914, 2666, 2698, 3250, 3446, 3782, 4046, 4730, 5146, 5670, 3302, 5286, 2102, 3378, 3390, 3602, 3658, 3918, 4010, 4138, 4366, 5438, 1970, 3078, 5302, 1898, 2734, 3634, 5090, 2922, 3002, 3398, 3890, 5310, 2074, 2306, 2714, 3286, 3362, 3426, 3574, 3914, 4030, 4442, 4858, 4870, 5210, 5338, 2182, 3662, 2310, 3786, 3950, 4746, 5314, 5550, 5590, 3386, 3626, 4550, 4282, 4294, 4330, 3866, 3746, 4966, 1846, 4654, 2078, 2062, 2830, 3118, 4342, 2646, 3590, 3314, 5098, 4842, 5294, 4902, 2858, 1930, 2398, 0, 0, 2482, 0, 3298, 0, 0, 2042, 3874, 4070, 4170, 4198, 4202, 4222, 5374, 4334, 4466, 0, 4754, 0, 4950, 0, 0, 5130, 5174, 0, 0, 0, 5458, 5462, 5466, 5566, 5166, 5322, 1882, 1918, 1938, 2126, 2138, 2202, 2382, 2410, 2418, 2478, 2490, 2710, 2718, 2982, 3022, 3030, 3054, 3226, 3274, 3306, 3418, 3614, 3642, 3690, 3774, 3806, 3922, 4146, 4174, 4182, 4178, 4186, 4190, 4194, 4214, 4218, 4254, 4274, 4302, 4402, 4410, 4418, 4438, 4478, 4558, 4610, 4610, 4714, 4882, 4906, 4958, 4962, 5030, 5034, 5122, 5130, 5342, 5410, 5434, 2974, 5921, 4582, 0, 0, 1762, 2022, 1958, 1870, 1934, 1978, 2122, 2150, 2382, 2362, 2378, 2406, 2482, 2498, 2566, 2578, 2606, 2622, 2854, 2862, 2910, 2942, 2990, 3014, 2998, 3030, 3018, 3054, 3082, 3170, 3182, 3190, 3230, 3298, 3346, 3350, 3370, 3498, 3514, 3602, 3678, 3670, 3690, 3718, 3774, 4118, 3810, 3862, 3874, 3938, 3966, 4002, 4038, 4042, 4070, 4074, 4090, 4110, 4106, 4154, 4278, 4302, 4326, 4382, 4402, 4430, 4478, 4658, 4698, 4814, 4886, 4898, 4906, 4930, 4950, 4934, 4958, 4954, 4946, 4962, 4974, 5034, 5094, 5142, 5198, 5230, 5306, 5342, 5374, 5394, 5410, 5422, 5434, 5518, 5678, 5816, 5811, 5861, 1546, 1586, 1590, 5991, 6036, 6156, 5658, 5674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1790, 1782, 1798, 5706, 1866, 1882, 1886, 1894, 1902, 1906, 1918, 1910, 1462, 5726, 1938, 1942, 1946, 1974, 5711, 1466, 1954, 1986, 5721, 2002, 2010, 1850, 2018, 2022, 6196, 2050, 2058, 1474, 2082, 2086, 2094, 2098, 1478, 2122, 2126, 2138, 2150, 2154, 2158, 2166, 2198, 2202, 2210, 2226, 2234, 2238, 2238, 2238, 5741, 3734, 2258, 2266, 5746, 2278, 2286, 2294, 2334, 2314, 2326, 2330, 2338, 2346, 2350, 2358, 2366, 2370, 2370, 2378, 2386, 2390, 2402, 2438, 2410, 2442, 2414, 2422, 2062, 2514, 2458, 2462, 2466, 2454, 2474, 2470, 2494, 5751, 2522, 2526, 2534, 2546, 2554, 2582, 5756, 5761, 2594, 2598, 2602, 2590, 2610, 1482, 1486, 2618, 2626, 2626, 5766, 2654, 2658, 2662, 2670, 5771, 2678, 2682, 2898, 2690, 1490, 2702, 2718, 2730, 2726, 5781, 2738, 5786, 2750, 2746, 2754, 2770, 2774, 1494, 2790, 2798, 2802, 2806, 1498, 5791, 1502, 2834, 2838, 2842, 2850, 6246, 2874, 5801, 5801, 4570, 2890, 2890, 1506, 5836, 6046, 2906, 2914, 1510, 2934, 2950, 2954, 2962, 2978, 1518, 1514, 2982, 5806, 2986, 3006, 3010, 3014, 3010, 3026, 3030, 3046, 3038, 3042, 3050, 3054, 3058, 3070, 3074, 3098, 3106, 3122, 3142, 5821, 3138, 3126, 3150, 3158, 3178, 5826, 3186, 3174, 3166, 1522, 3194, 3202, 3210, 3198, 1526, 3226, 3234, 5831, 3278, 3330, 3294, 1538, 3306, 1534, 1530, 1990, 1994, 3334, 3310, 4526, 1638, 3346, 3350, 3354, 3374, 3366, 5856, 1542, 3394, 3382, 3410, 3418, 5866, 3422, 3402, 3430, 1546, 3434, 3438, 3442, 3454, 5871, 3462, 1550, 3474, 5876, 3478, 1554, 3490, 3502, 3514, 3518, 5881, 5776, 5886, 3550, 5891, 3562, 3570, 3554, 3582, 3598, 3614, 3602, 3606, 3618, 3622, 5896, 3594, 3646, 3650, 1558, 3670, 3666, 5901, 3638, 3698, 5906, 5911, 3702, 3722, 3718, 3714, 1562, 3726, 3742, 3738, 3750, 5716, 3766, 5916, 3778, 5926, 3798, 3810, 3830, 5931, 3850, 3854, 5936, 5941, 3882, 3898, 1566, 3902, 1570, 1570, 3926, 3930, 3938, 3942, 3954, 1574, 3978, 5946, 4006, 5951, 4018, 5796, 4034, 5956, 5961, 5966, 1578, 1582, 4090, 5976, 5971, 5981, 5986, 4098, 4102, 4102, 4110, 1590, 4114, 1594, 1598, 5996, 4134, 4142, 4154, 1602, 6001, 4190, 6006, 6011, 4222, 4246, 1606, 4254, 4258, 4262, 6016, 6021, 6021, 4286, 1610, 6026, 4306, 4310, 1614, 6031, 4338, 1618, 4354, 4346, 4362, 6041, 4386, 1622, 4398, 4406, 4422, 1626, 6051, 6056, 1630, 6061, 4446, 6066, 4458, 4470, 4478, 6071, 6076, 4498, 6081, 4506, 5841, 1634, 4530, 4534, 1642, 4538, 2614, 6086, 6091, 5846, 5851, 4570, 4574, 5110, 1646, 4618, 4614, 4622, 2114, 4626, 4630, 4634, 4642, 6096, 4638, 4646, 4666, 4670, 4650, 4674, 4694, 4714, 4662, 4682, 4686, 4690, 6101, 6111, 6106, 1650, 4722, 4726, 4734, 6131, 4738, 6116, 1654, 1658, 6121, 6126, 1662, 4770, 4774, 4778, 4782, 4794, 4790, 4802, 4798, 4814, 4806, 4810, 4818, 1666, 4826, 4830, 1670, 4846, 4850, 6136, 4862, 4866, 1674, 4878, 1470, 6141, 6146, 1678, 1682, 4922, 4946, 4974, 4990, 6151, 5010, 5014, 5038, 5050, 6161, 5731, 5062, 5058, 5070, 5736, 5082, 5094, 6166, 6171, 5158, 5170, 5178, 6176, 5182, 5226, 5238, 5242, 5234, 5254, 5258, 6181, 5270, 1686, 5278, 6186, 1690, 5334, 2758, 5358, 6191, 6201, 1694, 1698, 5398, 6206, 1702, 6211, 5422, 5422, 5430, 6216, 5454, 1706, 5470, 5482, 5490, 5498, 1710, 6221, 5518, 5546, 5558, 1714, 1718, 5562, 6226, 1722, 6231, 6236, 6241, 5598, 1726, 5618, 5626, 5630, 5638, 5646, 5654, 6251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - nfcIndex = $toNativeArray($kindUint8, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 1, 2, 3, 47, 4, 5, 0, 48, 49, 6, 7, 8, 50, 9, 51, 52, 10, 0, 0, 11, 53, 54, 12, 0, 55, 56, 57, 0, 58, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 60, 0, 13, 61, 62, 63, 64, 65, 66, 67, 68, 63, 69, 70, 71, 0, 72, 73, 74, 75, 76, 0, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 87, 0, 88, 89, 90, 91, 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 0, 0, 94, 0, 0, 95, 0, 96, 0, 0, 0, 97, 98, 99, 100, 14, 101, 102, 103, 104, 0, 0, 105, 0, 0, 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, 106, 0, 0, 107, 108, 0, 109, 110, 111, 24, 25, 112, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 0, 0, 0, 0, 0, 0, 115, 0, 116, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 118, 26, 27, 28, 119, 120, 0, 0, 0, 121, 0, 0, 122, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 125, 126, 0, 0, 0, 0, 127, 0, 0, 128, 129, 130, 131, 132, 0, 0, 133, 134, 0, 0, 0, 135, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 142, 136, 137, 138, 139, 140, 141, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 31, 32, 33, 34, 35, 36, 144, 145, 146, 0, 0, 147, 148, 149, 150, 0, 0, 0, 151, 152, 153, 154, 0, 0, 155, 156, 0, 0, 0, 0, 0, 0, 0, 157, 0, 0, 0, 158, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160, 0, 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, 163, 0, 0, 164, 0, 0, 0, 165, 166, 0, 167, 131, 0, 168, 169, 0, 0, 170, 171, 172, 0, 0, 0, 173, 174, 175, 0, 0, 176, 177, 116, 0, 178, 0, 179, 0, 0, 0, 180, 0, 0, 0, 181, 182, 0, 183, 184, 185, 186, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 187, 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 190, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 193, 194, 195, 0, 196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 0, 0, 0, 190, 0, 0, 0, 0, 0, 0, 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 199, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40, 41, 42, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 13, 0, 0, 0, 0, 14, 0, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - nfcSparseOffset = new sliceType$1([0, 5, 9, 11, 13, 24, 40, 42, 47, 58, 73, 86, 94, 99, 104, 106, 114, 121, 124, 132, 136, 140, 142, 144, 153, 157, 164, 169, 172, 182, 185, 192, 200, 203, 205, 208, 210, 215, 232, 244, 246, 252, 254, 256, 258, 260, 262, 264, 267, 270, 272, 275, 278, 282, 288, 290, 299, 301, 304, 306, 317, 321, 335, 338, 344, 350, 361, 365, 367, 369, 371, 373, 375, 381, 385, 387, 389, 397, 401, 404, 406, 408, 411, 414, 416, 418, 420, 422, 428, 431, 433, 440, 446, 452, 460, 466, 472, 478, 482, 496, 505, 508, 511, 513, 516, 518, 522, 527, 529, 531, 536, 542, 544, 546, 548, 554, 557, 559, 561, 567, 570, 578, 585, 588, 591, 593, 596, 604, 608, 615, 618, 624, 626, 629, 631, 634, 639, 641, 643, 645, 647, 649, 652, 654, 656, 658, 660, 662, 675, 685, 687, 689, 695, 697, 699, 702]); - nfcSparseValues = $toNativeArray($kindStruct, [new valueRange.ptr(0, 4, 0), new valueRange.ptr(41216, 168, 168), new valueRange.ptr(33024, 175, 175), new valueRange.ptr(33024, 180, 180), new valueRange.ptr(33024, 184, 184), new valueRange.ptr(145, 3, 0), new valueRange.ptr(18169, 160, 161), new valueRange.ptr(18219, 175, 176), new valueRange.ptr(40960, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 152, 157), new valueRange.ptr(6, 10, 0), new valueRange.ptr(40960, 129, 129), new valueRange.ptr(40960, 133, 133), new valueRange.ptr(40960, 137, 137), new valueRange.ptr(18519, 138, 138), new valueRange.ptr(18549, 139, 139), new valueRange.ptr(14046, 140, 140), new valueRange.ptr(14070, 141, 141), new valueRange.ptr(18573, 142, 142), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(14100, 147, 148), new valueRange.ptr(0, 15, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(40960, 141, 141), new valueRange.ptr(14268, 144, 144), new valueRange.ptr(14280, 145, 145), new valueRange.ptr(14262, 147, 147), new valueRange.ptr(40960, 150, 150), new valueRange.ptr(14382, 151, 151), new valueRange.ptr(14328, 156, 156), new valueRange.ptr(14304, 157, 157), new valueRange.ptr(14346, 158, 158), new valueRange.ptr(40960, 180, 181), new valueRange.ptr(14388, 182, 182), new valueRange.ptr(14394, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 131, 135), new valueRange.ptr(1, 4, 0), new valueRange.ptr(33044, 129, 130), new valueRange.ptr(33075, 132, 132), new valueRange.ptr(33070, 133, 133), new valueRange.ptr(33038, 135, 135), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33075, 144, 151), new valueRange.ptr(33050, 152, 152), new valueRange.ptr(33051, 153, 153), new valueRange.ptr(33052, 154, 154), new valueRange.ptr(14424, 162, 162), new valueRange.ptr(14430, 163, 163), new valueRange.ptr(14442, 164, 164), new valueRange.ptr(14436, 165, 165), new valueRange.ptr(14448, 166, 166), new valueRange.ptr(40960, 167, 167), new valueRange.ptr(0, 14, 0), new valueRange.ptr(14466, 128, 128), new valueRange.ptr(40960, 129, 129), new valueRange.ptr(14454, 130, 130), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(14460, 147, 147), new valueRange.ptr(40960, 149, 149), new valueRange.ptr(33075, 150, 156), new valueRange.ptr(33075, 159, 162), new valueRange.ptr(33070, 163, 163), new valueRange.ptr(33075, 164, 164), new valueRange.ptr(33075, 167, 168), new valueRange.ptr(33070, 170, 170), new valueRange.ptr(33075, 171, 172), new valueRange.ptr(33070, 173, 173), new valueRange.ptr(0, 12, 0), new valueRange.ptr(33056, 145, 145), new valueRange.ptr(33075, 176, 176), new valueRange.ptr(33070, 177, 177), new valueRange.ptr(33075, 178, 179), new valueRange.ptr(33070, 180, 180), new valueRange.ptr(33075, 181, 182), new valueRange.ptr(33070, 183, 185), new valueRange.ptr(33075, 186, 186), new valueRange.ptr(33070, 187, 188), new valueRange.ptr(33075, 189, 189), new valueRange.ptr(33070, 190, 190), new valueRange.ptr(33075, 191, 191), new valueRange.ptr(5, 7, 0), new valueRange.ptr(33075, 128, 128), new valueRange.ptr(33075, 129, 129), new valueRange.ptr(33070, 130, 131), new valueRange.ptr(33070, 132, 133), new valueRange.ptr(33070, 134, 135), new valueRange.ptr(33070, 136, 137), new valueRange.ptr(33075, 138, 138), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33075, 171, 177), new valueRange.ptr(33070, 178, 178), new valueRange.ptr(33075, 179, 179), new valueRange.ptr(33070, 189, 189), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33075, 150, 153), new valueRange.ptr(33075, 155, 163), new valueRange.ptr(33075, 165, 167), new valueRange.ptr(33075, 169, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 153, 155), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 168, 168), new valueRange.ptr(16111, 169, 169), new valueRange.ptr(40960, 176, 176), new valueRange.ptr(16119, 177, 177), new valueRange.ptr(40960, 179, 179), new valueRange.ptr(16127, 180, 180), new valueRange.ptr(39171, 188, 188), new valueRange.ptr(8, 6, 0), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(33075, 145, 145), new valueRange.ptr(33070, 146, 146), new valueRange.ptr(33075, 147, 147), new valueRange.ptr(33075, 148, 148), new valueRange.ptr(17715, 152, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(8, 7, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11435, 139, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(17779, 156, 157), new valueRange.ptr(17795, 159, 159), new valueRange.ptr(33075, 190, 190), new valueRange.ptr(0, 3, 0), new valueRange.ptr(17835, 179, 179), new valueRange.ptr(17843, 182, 182), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(8, 3, 0), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(17803, 153, 155), new valueRange.ptr(17827, 158, 158), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(0, 8, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11459, 136, 136), new valueRange.ptr(11451, 139, 139), new valueRange.ptr(11467, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 150, 151), new valueRange.ptr(17851, 156, 156), new valueRange.ptr(17859, 157, 157), new valueRange.ptr(0, 3, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(11475, 148, 148), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11483, 138, 138), new valueRange.ptr(11499, 139, 139), new valueRange.ptr(11491, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(6145, 4, 0), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(16135, 136, 136), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(33057, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(40960, 191, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(11507, 128, 128), new valueRange.ptr(39168, 130, 130), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(11515, 135, 135), new valueRange.ptr(11523, 136, 136), new valueRange.ptr(12135, 138, 138), new valueRange.ptr(11759, 139, 139), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 187, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11531, 138, 138), new valueRange.ptr(11547, 139, 139), new valueRange.ptr(11539, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(27613, 7, 0), new valueRange.ptr(39173, 138, 138), new valueRange.ptr(39168, 143, 143), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16143, 154, 154), new valueRange.ptr(12143, 156, 156), new valueRange.ptr(11770, 157, 157), new valueRange.ptr(11555, 158, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33059, 184, 185), new valueRange.ptr(33029, 186, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33060, 136, 139), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33061, 184, 185), new valueRange.ptr(33029, 186, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33062, 136, 139), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33070, 152, 153), new valueRange.ptr(33070, 181, 181), new valueRange.ptr(33070, 183, 183), new valueRange.ptr(33068, 185, 185), new valueRange.ptr(0, 16, 0), new valueRange.ptr(9802, 131, 131), new valueRange.ptr(9809, 141, 141), new valueRange.ptr(9816, 146, 146), new valueRange.ptr(9823, 151, 151), new valueRange.ptr(9830, 156, 156), new valueRange.ptr(9795, 169, 169), new valueRange.ptr(33063, 177, 177), new valueRange.ptr(33064, 178, 178), new valueRange.ptr(19099, 179, 179), new valueRange.ptr(33065, 180, 180), new valueRange.ptr(19108, 181, 181), new valueRange.ptr(17867, 182, 182), new valueRange.ptr(33280, 183, 183), new valueRange.ptr(17875, 184, 184), new valueRange.ptr(33280, 185, 185), new valueRange.ptr(33064, 186, 189), new valueRange.ptr(0, 11, 0), new valueRange.ptr(33064, 128, 128), new valueRange.ptr(19117, 129, 129), new valueRange.ptr(33075, 130, 131), new valueRange.ptr(33029, 132, 132), new valueRange.ptr(33075, 134, 135), new valueRange.ptr(9844, 147, 147), new valueRange.ptr(9851, 157, 157), new valueRange.ptr(9858, 162, 162), new valueRange.ptr(9865, 167, 167), new valueRange.ptr(9872, 172, 172), new valueRange.ptr(9837, 185, 185), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 134, 134), new valueRange.ptr(0, 5, 0), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(11563, 166, 166), new valueRange.ptr(39168, 174, 174), new valueRange.ptr(33027, 183, 183), new valueRange.ptr(33029, 185, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 141, 141), new valueRange.ptr(0, 1, 0), new valueRange.ptr(40960, 128, 146), new valueRange.ptr(0, 1, 0), new valueRange.ptr(47360, 161, 181), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 168, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 128, 130), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 157, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 148, 148), new valueRange.ptr(33029, 180, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 146, 146), new valueRange.ptr(33075, 157, 157), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 169, 169), new valueRange.ptr(4, 2, 0), new valueRange.ptr(33071, 185, 186), new valueRange.ptr(33070, 187, 187), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 151, 151), new valueRange.ptr(33070, 152, 152), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33029, 160, 160), new valueRange.ptr(33075, 181, 188), new valueRange.ptr(33070, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33075, 176, 180), new valueRange.ptr(33070, 181, 186), new valueRange.ptr(33075, 187, 188), new valueRange.ptr(33070, 189, 189), new valueRange.ptr(33070, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 128, 128), new valueRange.ptr(0, 8, 0), new valueRange.ptr(11635, 128, 128), new valueRange.ptr(11643, 129, 129), new valueRange.ptr(40960, 130, 130), new valueRange.ptr(11651, 131, 131), new valueRange.ptr(33029, 132, 132), new valueRange.ptr(33075, 171, 171), new valueRange.ptr(33070, 172, 172), new valueRange.ptr(33075, 173, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 170, 171), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 166, 166), new valueRange.ptr(33029, 178, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 183, 183), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33075, 144, 146), new valueRange.ptr(33025, 148, 148), new valueRange.ptr(33070, 149, 153), new valueRange.ptr(33075, 154, 155), new valueRange.ptr(33070, 156, 159), new valueRange.ptr(33075, 160, 160), new valueRange.ptr(33025, 162, 168), new valueRange.ptr(33070, 173, 173), new valueRange.ptr(33075, 180, 180), new valueRange.ptr(33075, 184, 185), new valueRange.ptr(4, 3, 0), new valueRange.ptr(1078, 128, 129), new valueRange.ptr(33024, 151, 151), new valueRange.ptr(33024, 190, 190), new valueRange.ptr(0, 13, 0), new valueRange.ptr(33075, 144, 145), new valueRange.ptr(33025, 146, 147), new valueRange.ptr(33075, 148, 151), new valueRange.ptr(33025, 152, 154), new valueRange.ptr(33075, 155, 156), new valueRange.ptr(33075, 161, 161), new valueRange.ptr(33025, 165, 166), new valueRange.ptr(33075, 167, 167), new valueRange.ptr(33070, 168, 168), new valueRange.ptr(33075, 169, 169), new valueRange.ptr(33025, 170, 171), new valueRange.ptr(33070, 172, 175), new valueRange.ptr(33075, 176, 176), new valueRange.ptr(17042, 2, 0), new valueRange.ptr(443, 166, 166), new valueRange.ptr(87, 170, 171), new valueRange.ptr(7, 5, 0), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(15312, 154, 155), new valueRange.ptr(15326, 174, 174), new valueRange.ptr(14, 5, 0), new valueRange.ptr(15333, 141, 142), new valueRange.ptr(15340, 143, 143), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(25585, 10, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(15354, 132, 132), new valueRange.ptr(40960, 136, 136), new valueRange.ptr(15361, 137, 137), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(15368, 140, 140), new valueRange.ptr(40960, 163, 163), new valueRange.ptr(15375, 164, 165), new valueRange.ptr(15382, 166, 166), new valueRange.ptr(40960, 188, 188), new valueRange.ptr(7, 3, 0), new valueRange.ptr(15487, 160, 161), new valueRange.ptr(15529, 162, 163), new valueRange.ptr(15571, 170, 173), new valueRange.ptr(4, 1, 0), new valueRange.ptr(1166, 169, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(17652, 156, 156), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 175, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 160, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33069, 170, 170), new valueRange.ptr(33074, 171, 171), new valueRange.ptr(33076, 172, 172), new valueRange.ptr(33071, 173, 173), new valueRange.ptr(33072, 174, 175), new valueRange.ptr(0, 3, 0), new valueRange.ptr(19126, 179, 179), new valueRange.ptr(19126, 181, 182), new valueRange.ptr(19126, 186, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(19126, 143, 163), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 174, 190), new valueRange.ptr(0, 7, 0), new valueRange.ptr(33024, 132, 132), new valueRange.ptr(33024, 135, 135), new valueRange.ptr(33024, 144, 144), new valueRange.ptr(33024, 158, 158), new valueRange.ptr(33024, 161, 161), new valueRange.ptr(33024, 178, 178), new valueRange.ptr(33024, 187, 187), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33024, 128, 128), new valueRange.ptr(33024, 139, 139), new valueRange.ptr(33024, 142, 142), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 175, 175), new valueRange.ptr(33075, 180, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 158, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 176, 177), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 134, 134), new valueRange.ptr(33029, 172, 172), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 132, 132), new valueRange.ptr(33075, 160, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 171, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 147, 147), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 179, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 128, 128), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33075, 176, 176), new valueRange.ptr(33075, 178, 179), new valueRange.ptr(33070, 180, 180), new valueRange.ptr(33075, 183, 184), new valueRange.ptr(33075, 190, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 129, 129), new valueRange.ptr(33029, 182, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 173, 173), new valueRange.ptr(0, 6, 0), new valueRange.ptr(58624, 128, 128), new valueRange.ptr(50688, 129, 155), new valueRange.ptr(58624, 156, 156), new valueRange.ptr(50688, 157, 183), new valueRange.ptr(58624, 184, 184), new valueRange.ptr(50688, 185, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 147), new valueRange.ptr(58624, 148, 148), new valueRange.ptr(50688, 149, 175), new valueRange.ptr(58624, 176, 176), new valueRange.ptr(50688, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 139), new valueRange.ptr(58624, 140, 140), new valueRange.ptr(50688, 141, 167), new valueRange.ptr(58624, 168, 168), new valueRange.ptr(50688, 169, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(50688, 128, 131), new valueRange.ptr(58624, 132, 132), new valueRange.ptr(50688, 133, 159), new valueRange.ptr(58624, 160, 160), new valueRange.ptr(50688, 161, 187), new valueRange.ptr(58624, 188, 188), new valueRange.ptr(50688, 189, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 151), new valueRange.ptr(58624, 152, 152), new valueRange.ptr(50688, 153, 179), new valueRange.ptr(58624, 180, 180), new valueRange.ptr(50688, 181, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 143), new valueRange.ptr(58624, 144, 144), new valueRange.ptr(50688, 145, 171), new valueRange.ptr(58624, 172, 172), new valueRange.ptr(50688, 173, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(58624, 164, 164), new valueRange.ptr(50688, 165, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(6, 13, 0), new valueRange.ptr(17319, 157, 157), new valueRange.ptr(33046, 158, 158), new valueRange.ptr(17433, 159, 159), new valueRange.ptr(17415, 170, 171), new valueRange.ptr(17675, 172, 172), new valueRange.ptr(17683, 173, 173), new valueRange.ptr(17247, 174, 177), new valueRange.ptr(17277, 178, 180), new valueRange.ptr(17301, 181, 182), new valueRange.ptr(17313, 184, 184), new valueRange.ptr(17325, 185, 187), new valueRange.ptr(17349, 188, 188), new valueRange.ptr(17355, 190, 190), new valueRange.ptr(6, 8, 0), new valueRange.ptr(17361, 128, 129), new valueRange.ptr(17373, 131, 132), new valueRange.ptr(17391, 134, 137), new valueRange.ptr(17427, 138, 138), new valueRange.ptr(17295, 139, 139), new valueRange.ptr(17271, 140, 140), new valueRange.ptr(17343, 141, 141), new valueRange.ptr(17385, 142, 142), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33024, 164, 165), new valueRange.ptr(33024, 176, 177), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33024, 155, 157), new valueRange.ptr(33280, 158, 163), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 144, 144), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33024, 153, 153), new valueRange.ptr(33280, 178, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 188, 189), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33075, 160, 166), new valueRange.ptr(33070, 167, 173), new valueRange.ptr(33075, 174, 175), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33024, 137, 140), new valueRange.ptr(33024, 176, 178), new valueRange.ptr(33024, 180, 180), new valueRange.ptr(33024, 182, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 129, 140), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 181, 186), new valueRange.ptr(0, 4, 0), new valueRange.ptr(19126, 158, 159), new valueRange.ptr(19126, 163, 163), new valueRange.ptr(19126, 165, 166), new valueRange.ptr(19126, 170, 175), new valueRange.ptr(0, 5, 0), new valueRange.ptr(19126, 130, 135), new valueRange.ptr(19126, 138, 143), new valueRange.ptr(19126, 146, 151), new valueRange.ptr(19126, 154, 156), new valueRange.ptr(33024, 163, 163), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 189, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 160, 160), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 182, 186), new valueRange.ptr(45, 5, 0), new valueRange.ptr(33070, 141, 141), new valueRange.ptr(33075, 143, 143), new valueRange.ptr(33075, 184, 184), new valueRange.ptr(33025, 185, 186), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 165, 165), new valueRange.ptr(33070, 166, 166), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 164, 167), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 171, 172), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33070, 134, 135), new valueRange.ptr(33075, 136, 138), new valueRange.ptr(33070, 139, 139), new valueRange.ptr(33075, 140, 140), new valueRange.ptr(33070, 141, 144), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 134, 134), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(6142, 7, 0), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16975, 154, 154), new valueRange.ptr(40960, 155, 155), new valueRange.ptr(16985, 156, 156), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(16995, 171, 171), new valueRange.ptr(33029, 185, 186), new valueRange.ptr(0, 6, 0), new valueRange.ptr(33075, 128, 130), new valueRange.ptr(39168, 167, 167), new valueRange.ptr(11659, 174, 174), new valueRange.ptr(11669, 175, 175), new valueRange.ptr(40960, 177, 178), new valueRange.ptr(33029, 179, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 128, 128), new valueRange.ptr(33027, 138, 138), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 181, 181), new valueRange.ptr(33027, 182, 182), new valueRange.ptr(2, 1, 0), new valueRange.ptr(33027, 169, 170), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 187, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11679, 139, 139), new valueRange.ptr(11689, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(33075, 166, 172), new valueRange.ptr(33075, 176, 180), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33029, 130, 130), new valueRange.ptr(33027, 134, 134), new valueRange.ptr(33075, 158, 158), new valueRange.ptr(27469, 6, 0), new valueRange.ptr(39168, 176, 176), new valueRange.ptr(40960, 185, 185), new valueRange.ptr(39168, 186, 186), new valueRange.ptr(11709, 187, 187), new valueRange.ptr(11699, 188, 189), new valueRange.ptr(11719, 190, 190), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 130, 130), new valueRange.ptr(33027, 131, 131), new valueRange.ptr(0, 5, 0), new valueRange.ptr(39168, 175, 175), new valueRange.ptr(40960, 184, 185), new valueRange.ptr(11729, 186, 186), new valueRange.ptr(11739, 187, 187), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 128, 128), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 182, 182), new valueRange.ptr(33027, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 171, 171), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 185, 185), new valueRange.ptr(33027, 186, 186), new valueRange.ptr(0, 4, 0), new valueRange.ptr(39168, 176, 176), new valueRange.ptr(40960, 181, 181), new valueRange.ptr(11749, 184, 184), new valueRange.ptr(33029, 189, 190), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 131, 131), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 160, 160), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 180, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 135, 135), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 153, 153), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 130, 130), new valueRange.ptr(33029, 132, 133), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 151, 151), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 176, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 176, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 176, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 158, 158), new valueRange.ptr(0, 12, 0), new valueRange.ptr(17891, 158, 158), new valueRange.ptr(17901, 159, 159), new valueRange.ptr(17953, 160, 160), new valueRange.ptr(17967, 161, 161), new valueRange.ptr(17981, 162, 162), new valueRange.ptr(17995, 163, 163), new valueRange.ptr(18009, 164, 164), new valueRange.ptr(33068, 165, 166), new valueRange.ptr(33025, 167, 169), new valueRange.ptr(33073, 173, 173), new valueRange.ptr(33068, 174, 178), new valueRange.ptr(33070, 187, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(33070, 128, 130), new valueRange.ptr(33075, 133, 137), new valueRange.ptr(33070, 138, 139), new valueRange.ptr(33075, 170, 173), new valueRange.ptr(17911, 187, 187), new valueRange.ptr(17921, 188, 188), new valueRange.ptr(18023, 189, 189), new valueRange.ptr(18051, 190, 190), new valueRange.ptr(18037, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(18065, 128, 128), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 130, 132), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33075, 128, 134), new valueRange.ptr(33075, 136, 152), new valueRange.ptr(33075, 155, 161), new valueRange.ptr(33075, 163, 164), new valueRange.ptr(33075, 166, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 172, 175), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 144, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 132, 137), new valueRange.ptr(33027, 138, 138), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33024, 147, 147)]); - nfcSparse = new sparseBlocks.ptr(new sliceType$2(nfcSparseValues), nfcSparseOffset); - nfkcValues = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12166, 12171, 18079, 12176, 18094, 18099, 40960, 18109, 12281, 12286, 18114, 12306, 12421, 12426, 12431, 18134, 0, 12571, 12606, 12611, 18144, 18149, 18164, 0, 40960, 12746, 12751, 12756, 18214, 12876, 0, 0, 12946, 12951, 18224, 12956, 18239, 18244, 40960, 18254, 13061, 13066, 18259, 13086, 13206, 13211, 13216, 18279, 0, 13356, 13391, 13396, 18289, 18294, 18309, 0, 40960, 13536, 13541, 13546, 18359, 13671, 0, 13696, 12181, 12961, 18084, 18229, 12211, 12991, 12231, 13011, 12236, 13016, 12241, 13021, 12246, 13026, 12256, 13036, 0, 0, 18119, 18264, 12296, 13076, 12301, 13081, 12331, 13111, 12316, 13096, 12356, 13136, 12366, 13146, 12371, 13151, 12381, 13161, 12386, 13166, 0, 0, 12436, 13221, 12441, 13226, 12446, 13231, 12481, 13261, 12451, 0, 6496, 6637, 12491, 13271, 12511, 13296, 0, 12521, 13306, 12531, 13316, 12526, 13311, 7090, 7226, 0, 0, 12566, 13351, 12591, 13376, 12581, 13366, 7266, 0, 0, 18154, 18299, 12616, 13401, 12626, 13411, 0, 0, 12656, 13441, 12681, 13466, 12666, 13451, 18189, 18334, 12691, 13476, 12706, 13491, 18194, 18339, 12731, 13521, 12716, 13506, 0, 0, 18204, 18349, 18209, 18354, 12761, 13551, 12771, 13561, 12776, 13566, 12806, 13596, 12841, 13631, 12881, 13676, 12901, 12916, 13716, 12926, 13726, 12931, 13731, 167, 0, 0, 0, 0, 11781, 11787, 11793, 6517, 6520, 6670, 6541, 6544, 6724, 12191, 12971, 12461, 13241, 12631, 13416, 12781, 13571, 14822, 15221, 14815, 15214, 14829, 15228, 14808, 15207, 0, 14535, 14934, 14528, 14927, 13770, 13788, 0, 0, 12376, 13156, 12501, 13286, 18179, 18324, 14759, 15158, 13806, 13812, 13276, 6469, 6472, 6613, 12351, 13131, 0, 0, 12561, 13346, 14542, 14941, 13764, 13782, 13776, 13794, 12196, 12976, 12201, 12981, 12321, 13101, 12326, 13106, 12466, 13246, 12471, 13251, 12636, 13421, 12641, 13426, 12671, 13456, 12676, 13461, 12786, 13576, 12791, 13581, 12701, 13486, 12726, 13516, 0, 0, 12401, 13181, 0, 0, 0, 0, 0, 0, 18089, 18234, 18129, 18274, 14710, 15109, 14675, 15074, 18159, 18304, 14703, 15102, 12891, 13686, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39219, 39219, 39219, 39219, 39219, 33075, 39219, 39219, 39219, 39219, 39219, 39219, 39219, 33075, 33075, 39219, 33075, 39219, 33075, 39219, 39219, 33076, 33070, 33070, 33070, 33070, 33076, 39212, 33070, 33070, 33070, 33070, 33070, 33066, 33066, 39214, 39214, 39214, 39214, 39210, 39210, 33070, 33070, 33070, 33070, 39214, 39214, 33070, 39214, 39214, 33070, 33070, 33025, 33025, 33025, 33025, 39169, 33070, 33070, 33070, 33070, 33075, 33075, 33075, 18885, 18890, 39219, 18895, 19080, 39223, 33075, 33070, 33070, 33070, 33075, 33075, 33075, 33070, 33070, 0, 33075, 33075, 33075, 33070, 33070, 33070, 33070, 33075, 33076, 33070, 33070, 33075, 33077, 33078, 33078, 33077, 33078, 33078, 33077, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 0, 0, 0, 0, 371, 0, 0, 0, 0, 0, 17084, 0, 0, 0, 55, 0, 0, 0, 0, 0, 17009, 17554, 13824, 206, 13854, 13866, 13884, 0, 13914, 0, 13932, 13962, 15903, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 13902, 13950, 18453, 13998, 18495, 14016, 16007, 40960, 0, 0, 0, 40960, 0, 40960, 0, 40960, 0, 0, 0, 0, 0, 40960, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 18519, 18549, 14046, 14070, 18573, 0, 449, 467, 431, 17187, 17193, 509, 491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 473, 494, 497, 0, 395, 458, 0, 0, 0, 425, 0, 0, 0, 0, 0, 0, 14136, 14148, 0, 14130, 0, 0, 40960, 14112, 0, 0, 0, 0, 14196, 14172, 14214, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14184, 40960, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 0, 0, 40960, 0, 40960, 0, 0, 40960, 0, 0, 40960, 0, 40960, 40960, 40960, 40960, 14316, 40960, 0, 0, 0, 40960, 0, 0, 14154, 14286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14118, 14250, 14124, 14256, 0, 0, 14142, 14274, 40960, 40960, 14400, 14406, 14160, 14292, 14166, 14298, 0, 0, 14178, 14310, 14190, 14322, 14202, 14334, 40960, 40960, 14412, 14418, 14244, 14376, 14208, 14340, 14220, 14352, 14226, 14358, 14232, 14364, 0, 0, 14238, 14370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33070, 33075, 33075, 33075, 33075, 33070, 33075, 33075, 33075, 33071, 33070, 33075, 33075, 33075, 33075, 33075, 33075, 33070, 33070, 33070, 33070, 33070, 33070, 33075, 33075, 33070, 33075, 33075, 33071, 33074, 33075, 33030, 33031, 33032, 33033, 33034, 33035, 33036, 33037, 33038, 33039, 33039, 33040, 33041, 33042, 0, 33043, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 40960, 33047, 33048, 33049, 33050, 33051, 33052, 33053, 33054, 39219, 39219, 39214, 33070, 33075, 33075, 33075, 33075, 33075, 33070, 33075, 33075, 33070, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33055, 0, 0, 0, 0, 7562, 8217, 8277, 8272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33070, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 0, 33070, 33075, 33075, 33070, 33075, 33075, 33070, 33075, 33075, 33075, 33070, 33070, 33070, 33047, 33048, 33049, 33075, 33075, 33075, 33070, 33075, 33075, 33070, 33070, 33075, 33075, 33075, 33075, 33075, 0, 0, 0, 0, 0, 40960, 11571, 40960, 11579, 40960, 11587, 40960, 11595, 40960, 11603, 0, 0, 40960, 11611, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33027, 39168, 0, 0, 0, 0, 40960, 11619, 40960, 11627, 40960, 40960, 105, 107, 111, 131, 245, 248, 1046, 133, 137, 139, 260, 263, 266, 143, 0, 151, 155, 224, 159, 254, 1050, 1054, 161, 169, 171, 1062, 299, 173, 1066, 449, 452, 455, 509, 512, 147, 165, 171, 173, 449, 452, 494, 509, 512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 135, 257, 212, 266, 141, 269, 272, 278, 284, 287, 290, 1070, 365, 296, 1074, 368, 305, 302, 308, 311, 314, 317, 320, 332, 335, 236, 338, 341, 1058, 344, 347, 181, 353, 356, 359, 467, 33075, 33075, 33070, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33070, 33075, 33075, 33078, 33067, 33070, 33066, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33076, 33074, 33074, 33070, 0, 33075, 33077, 33070, 33075, 33070, 12206, 12986, 12216, 12996, 12221, 13001, 12226, 13006, 14563, 14962, 12251, 13031, 12261, 13041, 12276, 13056, 12266, 13046, 12271, 13051, 14598, 14997, 14605, 15004, 12336, 13116, 12341, 13121, 14619, 15018, 12346, 13126, 12361, 13141, 12391, 13171, 12406, 13186, 12396, 13176, 12411, 13191, 12416, 13196, 12486, 13266, 14626, 15025, 12496, 13281, 12506, 13291, 12516, 13301, 18139, 18284, 14633, 15032, 12541, 13326, 12536, 13321, 12546, 13331, 12551, 13336, 12556, 13341, 12576, 13361, 12586, 13371, 12601, 13386, 12596, 13381, 14668, 15067, 14682, 15081, 14689, 15088, 14696, 15095, 12646, 13431, 12651, 13436, 12661, 13446, 18184, 18329, 14766, 15165, 12686, 13471, 12696, 13481, 18199, 18344, 14773, 15172, 14780, 15179, 14787, 15186, 12711, 13496, 12721, 13511, 12741, 13531, 12736, 13526, 12801, 13591, 12816, 13606, 12811, 13601, 14794, 15193, 14801, 15200, 12821, 13611, 12826, 13616, 12831, 13621, 12836, 13626, 12851, 13641, 12846, 13636, 12856, 13651, 12861, 13656, 12866, 13661, 12896, 13691, 12921, 13721, 12936, 13736, 12941, 13741, 13201, 13501, 13646, 13706, 7142, 17134, 0, 0, 0, 0, 18104, 18249, 12186, 12966, 14479, 14878, 14472, 14871, 14493, 14892, 14486, 14885, 14549, 14948, 14507, 14906, 14500, 14899, 14521, 14920, 14514, 14913, 14556, 14955, 18124, 18269, 12311, 13091, 12291, 13071, 14577, 14976, 14570, 14969, 14591, 14990, 14584, 14983, 14612, 15011, 12456, 13236, 12476, 13256, 18174, 18319, 12621, 13406, 14647, 15046, 14640, 15039, 14661, 15060, 14654, 15053, 14752, 15151, 14724, 15123, 14717, 15116, 14738, 15137, 14731, 15130, 14745, 15144, 12796, 13586, 12766, 13556, 14843, 15242, 14836, 15235, 14857, 15256, 14850, 15249, 14864, 15263, 12871, 13666, 12911, 13711, 12906, 13701, 12886, 13681, 0, 0, 0, 0, 0, 0, 18459, 18465, 18741, 18765, 18749, 18773, 18757, 18781, 18369, 18375, 18597, 18621, 18605, 18629, 18613, 18637, 18477, 18483, 15823, 15839, 15831, 15847, 0, 0, 18381, 18387, 15615, 15631, 15623, 15639, 0, 0, 18501, 18507, 18789, 18813, 18797, 18821, 18805, 18829, 18393, 18399, 18645, 18669, 18653, 18677, 18661, 18685, 18525, 18531, 15919, 15943, 15927, 15951, 15935, 15959, 18405, 18411, 15663, 15687, 15671, 15695, 15679, 15703, 18537, 18543, 15967, 15983, 15975, 15991, 0, 0, 18417, 18423, 15711, 15727, 15719, 15735, 0, 0, 18555, 18561, 16023, 16047, 16031, 16055, 16039, 16063, 0, 18429, 0, 15743, 0, 15751, 0, 15759, 18579, 18585, 18837, 18861, 18845, 18869, 18853, 18877, 18435, 18441, 18693, 18717, 18701, 18725, 18709, 18733, 18447, 17205, 13992, 17211, 18489, 17217, 14010, 17223, 14040, 17229, 14064, 17235, 18567, 17241, 0, 0, 15799, 15807, 16795, 16825, 16805, 16835, 16815, 16845, 15599, 15607, 16615, 16645, 16625, 16655, 16635, 16665, 15871, 15879, 16855, 16885, 16865, 16895, 16875, 16905, 15647, 15655, 16675, 16705, 16685, 16715, 16695, 16725, 16087, 16095, 16915, 16945, 16925, 16955, 16935, 16965, 15767, 15775, 16735, 16765, 16745, 16775, 16755, 16785, 13980, 13974, 15783, 13986, 15791, 0, 18471, 15815, 13836, 13830, 13818, 17157, 13842, 17054, 470, 17054, 17079, 17561, 15855, 14004, 15863, 0, 18513, 15887, 13848, 17163, 13860, 17169, 13872, 17568, 17575, 17582, 14028, 14022, 15895, 17659, 0, 0, 14034, 15911, 13896, 13890, 13878, 17175, 0, 17589, 17596, 17603, 14082, 14076, 15999, 17667, 14052, 14058, 14088, 16015, 13944, 13938, 13926, 17187, 13920, 17547, 17554, 129, 0, 0, 16071, 14094, 16079, 0, 18591, 16103, 13908, 17181, 13956, 17199, 13968, 17009, 17059, 0, 7134, 7138, 71, 7258, 0, 7150, 7154, 233, 0, 7262, 143, 81, 81, 81, 145, 218, 83, 83, 89, 153, 0, 93, 6547, 0, 0, 97, 99, 101, 101, 101, 0, 0, 6565, 7118, 6574, 0, 117, 0, 443, 0, 117, 0, 87, 17129, 69, 71, 0, 139, 75, 77, 0, 91, 159, 536, 539, 542, 545, 147, 0, 7070, 491, 452, 380, 419, 1126, 0, 0, 0, 0, 73, 137, 139, 147, 149, 0, 0, 0, 0, 0, 0, 8756, 8768, 8948, 8732, 8864, 8744, 8870, 8894, 8906, 8750, 8912, 8762, 8900, 8918, 8924, 7362, 83, 6493, 7082, 6502, 109, 6577, 7126, 7502, 6505, 113, 6589, 7130, 89, 71, 73, 91, 147, 6634, 7198, 6643, 173, 6760, 7250, 7522, 6646, 177, 6763, 7254, 153, 135, 137, 155, 0, 15389, 0, 40960, 15396, 40960, 0, 15403, 40960, 15410, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12156, 40960, 15424, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 15417, 12151, 12161, 15431, 15438, 40960, 40960, 15445, 15452, 40960, 40960, 15459, 15466, 40960, 40960, 40960, 40960, 0, 0, 15473, 15480, 40960, 40960, 15501, 15508, 40960, 40960, 15515, 15522, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 0, 40960, 40960, 0, 40960, 15543, 15550, 15557, 15564, 0, 0, 40960, 40960, 40960, 40960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 37, 39, 41, 43, 45, 47, 49, 51, 6277, 6280, 6283, 6286, 6289, 6292, 6295, 6298, 6301, 6304, 6313, 6766, 6770, 6774, 6778, 6782, 6786, 6790, 6794, 6798, 7302, 7307, 7312, 7317, 7322, 7327, 7332, 7337, 7342, 7347, 7352, 6274, 6310, 6346, 6382, 6418, 6427, 6433, 6439, 6445, 7014, 7018, 7022, 7026, 7030, 7034, 7038, 7042, 7046, 7050, 7054, 6906, 6910, 6914, 6918, 6922, 6926, 6930, 6934, 6938, 6942, 6946, 6950, 6954, 6958, 6962, 6966, 6970, 6974, 6978, 6982, 6986, 6990, 6994, 6998, 7002, 7006, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 1730, 1766, 1778, 1794, 1802, 1814, 1822, 1830, 1842, 1926, 1950, 1966, 1982, 1998, 2014, 2046, 2050, 2054, 2106, 2146, 2162, 2170, 2174, 2186, 2214, 2218, 2242, 2246, 2254, 2270, 2426, 2446, 2510, 2530, 2538, 2542, 2558, 2586, 2630, 2642, 2674, 2686, 2690, 2694, 2718, 2722, 2766, 2778, 2786, 2794, 2810, 2818, 2826, 2870, 2874, 2882, 2886, 2894, 2902, 2918, 2946, 3066, 3086, 3090, 3218, 3222, 3242, 3246, 3254, 3262, 3270, 3282, 3322, 3338, 3358, 3470, 3482, 3498, 3510, 3522, 3530, 3534, 3538, 3542, 3546, 3730, 3802, 3814, 3818, 3822, 3826, 3834, 3838, 3858, 3886, 3894, 3958, 3962, 3970, 3974, 3982, 3986, 4022, 4026, 4054, 4058, 4062, 4066, 4086, 4122, 4126, 4130, 4166, 4230, 4234, 4266, 4282, 4290, 4322, 4358, 4426, 4434, 4454, 4466, 4474, 4482, 4486, 4490, 4514, 4518, 4546, 4554, 4562, 4566, 4578, 4586, 4590, 4594, 4602, 4606, 4766, 4786, 4838, 4842, 4850, 4894, 4902, 4910, 4918, 4978, 4982, 4990, 4994, 4998, 5042, 5046, 5054, 5074, 5078, 5106, 5114, 5118, 5154, 5186, 5206, 5210, 5218, 5262, 5266, 5282, 5318, 5330, 5346, 5370, 5378, 5382, 5386, 5390, 5402, 5406, 5414, 5442, 5446, 5450, 5474, 5478, 5486, 5506, 5510, 5514, 5522, 5526, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16159, 40960, 16167, 40960, 16175, 40960, 16183, 40960, 16191, 40960, 16199, 40960, 16207, 40960, 16215, 40960, 16223, 40960, 16231, 40960, 16239, 40960, 16247, 0, 40960, 16255, 40960, 16263, 40960, 16271, 0, 0, 0, 0, 0, 40960, 16279, 16287, 40960, 16295, 16303, 40960, 16311, 16319, 40960, 16327, 16335, 40960, 16343, 16351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16151, 0, 0, 0, 0, 39172, 39172, 17139, 17145, 40960, 16359, 9914, 0, 0, 0, 0, 0, 0, 40960, 0, 0, 0, 0, 40960, 16375, 40960, 16383, 40960, 16391, 40960, 16399, 40960, 16407, 40960, 16415, 40960, 16423, 40960, 16431, 40960, 16439, 40960, 16447, 40960, 16455, 40960, 16463, 0, 40960, 16471, 40960, 16479, 40960, 16487, 0, 0, 0, 0, 0, 40960, 16495, 16503, 40960, 16511, 16519, 40960, 16527, 16535, 40960, 16543, 16551, 40960, 16559, 16567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40960, 40960, 40960, 40960, 0, 16367, 0, 0, 16575, 16583, 16591, 16599, 0, 0, 40960, 16607, 9935, 874, 814, 818, 822, 894, 826, 830, 834, 838, 842, 846, 850, 854, 858, 862, 18900, 18906, 18912, 18918, 18924, 18930, 18936, 18942, 18948, 18954, 18960, 18966, 18972, 18978, 18984, 18990, 18996, 19002, 19008, 19014, 19020, 966, 866, 870, 1002, 1006, 1010, 1014, 1018, 1022, 1026, 878, 1030, 1034, 882, 886, 890, 898, 902, 906, 910, 914, 918, 922, 926, 930, 934, 938, 942, 946, 950, 1038, 1042, 954, 958, 962, 970, 974, 978, 982, 986, 990, 994, 998, 0, 0, 0, 1730, 1822, 1742, 2430, 1746, 1770, 1750, 3990, 1802, 1758, 1734, 2562, 2450, 1842, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8282, 8288, 8294, 8300, 8306, 8312, 8318, 8324, 8330, 8336, 8342, 8348, 8354, 8360, 10035, 10044, 10053, 10062, 10071, 10080, 10089, 10098, 10107, 10125, 10134, 10143, 10152, 10161, 10116, 11193, 11002, 0, 8366, 8390, 8378, 8462, 8396, 8426, 8372, 8420, 8384, 8438, 8486, 8516, 8510, 8498, 8576, 8468, 8480, 8504, 8492, 8534, 8450, 8522, 8564, 8540, 8432, 8402, 8456, 8474, 8528, 8408, 8570, 8444, 8546, 8414, 8552, 8558, 2354, 2822, 3242, 4298, 0, 0, 0, 0, 0, 0, 0, 0, 7114, 6316, 6319, 6322, 6325, 6328, 6331, 6334, 6337, 6340, 6349, 6352, 6355, 6358, 6361, 6364, 790, 798, 802, 810, 814, 818, 826, 834, 838, 846, 850, 854, 858, 862, 11823, 11831, 11839, 11847, 11855, 11863, 11871, 11879, 11895, 11903, 11911, 11919, 11927, 11935, 12010, 11954, 11887, 0, 1730, 1822, 1742, 2430, 1826, 1970, 1738, 1966, 1806, 2186, 3338, 3730, 3546, 3358, 5218, 2446, 3282, 3406, 3342, 4174, 2302, 3846, 5002, 4194, 2118, 4242, 3998, 2586, 5138, 1922, 2222, 3578, 5418, 1862, 2006, 3486, 1746, 1770, 1750, 2782, 2290, 2178, 2650, 2638, 4078, 1858, 5022, 2206, 2550, 6367, 6370, 6373, 6376, 6385, 6388, 6391, 6394, 6397, 6400, 6403, 6406, 6409, 6412, 6421, 7372, 7387, 7402, 7417, 7432, 7447, 7462, 7477, 7492, 8594, 8612, 8630, 6487, 7178, 6616, 7086, 1230, 1238, 1246, 1254, 1262, 1266, 1270, 1274, 1278, 1282, 1286, 1290, 1294, 1298, 1302, 1306, 1310, 1318, 1322, 1326, 1330, 1334, 1338, 1342, 1346, 1350, 1354, 1358, 1362, 1366, 1370, 1374, 1378, 1382, 1386, 1394, 1402, 1410, 1414, 1418, 1422, 1426, 1430, 1434, 1438, 1442, 1446, 9984, 11033, 10677, 11049, 10381, 12027, 10391, 10401, 12095, 10690, 10411, 10421, 10431, 10729, 10742, 10703, 10716, 11968, 10755, 10768, 11211, 9921, 11230, 11249, 11065, 10781, 11268, 11287, 10794, 10441, 10451, 11982, 10807, 11081, 12044, 10461, 10471, 10820, 10481, 10491, 9942, 9949, 10501, 10511, 11306, 10833, 11097, 11325, 10846, 10531, 10521, 12115, 10859, 11344, 10541, 11113, 10551, 10885, 10561, 10898, 12061, 10872, 11129, 10911, 9956, 12078, 10571, 10581, 10924, 10591, 10601, 10611, 11145, 10937, 9963, 11363, 11943, 11161, 10950, 11996, 10621, 10631, 10963, 9970, 10976, 11177, 9977, 11382, 10641, 7357, 7377, 7392, 7407, 7422, 7437, 7452, 7467, 7482, 7497, 8600, 8618, 8636, 8648, 8660, 8672, 8684, 8696, 8708, 8720, 8780, 8792, 8804, 8816, 8828, 7194, 6604, 6457, 7146, 6733, 6748, 6610, 7170, 7174, 6499, 9998, 10012, 9991, 10005, 10989, 6736, 6712, 7270, 6688, 6649, 6508, 6523, 6475, 7158, 7512, 6739, 6715, 7274, 7286, 6700, 6658, 6490, 7202, 7094, 7074, 7122, 7290, 6703, 6607, 6661, 6628, 6727, 7294, 6706, 6598, 6664, 7234, 7162, 6682, 7210, 7238, 7166, 6685, 7214, 8942, 8962, 6556, 7206, 7098, 7078, 7246, 10019, 10170, 6751, 6730, 7298, 6709, 6742, 6718, 7278, 6691, 6652, 6535, 6745, 6721, 7282, 6694, 6655, 6538, 7218, 7102, 7507, 6460, 6592, 6595, 8955, 7066, 6601, 6478, 6631, 6481, 6640, 6511, 6514, 6667, 6673, 6676, 7222, 6679, 6697, 7230, 7242, 6550, 7517, 7106, 6553, 6754, 6571, 6586, 8936, 8930, 7367, 7382, 7397, 7412, 7427, 7442, 7457, 7472, 7487, 8588, 8606, 8624, 8642, 8654, 8666, 8678, 8690, 8702, 8714, 8774, 8786, 8798, 8810, 8822, 8834, 8840, 8846, 8852, 8858, 8876, 8882, 7190, 4986, 3326, 5078, 5026, 3674, 1774, 2274, 5678, 5678, 2574, 5218, 2374, 2570, 3058, 4050, 4450, 4762, 4822, 4874, 5150, 3446, 3586, 3758, 3910, 4706, 5194, 5494, 1810, 2230, 3466, 3794, 4758, 5574, 2742, 3706, 4742, 4890, 3110, 4542, 4834, 2850, 3346, 3610, 3870, 5162, 1874, 2026, 2134, 3214, 3458, 3790, 4082, 4474, 4750, 4774, 5066, 5362, 5542, 5570, 4142, 4206, 4390, 4678, 5246, 5582, 4942, 2506, 2878, 4318, 4510, 3842, 4150, 5018, 5354, 2502, 2706, 3450, 3630, 3682, 4374, 4414, 5290, 2130, 4522, 2038, 2034, 4250, 4394, 4702, 5298, 4970, 3114, 3446, 4954, 1786, 2662, 2966, 3890, 4018, 2166, 4158, 1890, 2938, 1754, 3566, 3238, 4370, 2250, 2486, 4094, 4710, 4926, 3514, 5114, 3558, 3130, 4638, 3162, 4014, 1838, 1962, 2030, 3414, 4350, 4598, 4938, 5214, 2142, 2322, 2586, 2866, 3266, 3710, 4162, 5274, 5502, 5586, 5610, 2106, 3318, 3494, 5102, 2814, 3034, 3062, 3206, 3694, 3770, 3946, 4238, 4402, 4502, 5086, 4718, 5126, 5250, 2066, 2110, 2342, 3754, 4854, 4926, 2846, 2958, 3154, 3506, 4314, 3878, 1854, 2434, 2662, 2762, 2970, 3906, 3934, 4462, 4494, 5222, 5350, 5366, 5426, 1878, 4226, 5202, 5326, 2994, 1818, 1914, 2666, 2698, 3250, 3446, 3782, 4046, 4730, 5146, 5670, 3302, 5286, 2102, 3378, 3390, 3602, 3658, 3918, 4010, 4138, 4366, 5438, 1970, 3078, 5302, 1898, 2734, 3634, 5090, 2922, 3002, 3398, 3890, 5310, 2074, 2306, 2714, 3286, 3362, 3426, 3574, 3914, 4030, 4442, 4858, 4870, 5210, 5338, 2182, 3662, 2310, 3786, 3950, 4746, 5314, 5550, 5590, 3386, 3626, 4550, 4282, 4294, 4330, 3866, 3746, 4966, 1846, 4654, 2078, 2062, 2830, 3118, 4342, 2646, 3590, 3314, 5098, 4842, 5294, 4902, 2858, 1930, 2398, 0, 0, 2482, 0, 3298, 0, 0, 2042, 3874, 4070, 4170, 4198, 4202, 4222, 5374, 4334, 4466, 0, 4754, 0, 4950, 0, 0, 5130, 5174, 0, 0, 0, 5458, 5462, 5466, 5566, 5166, 5322, 1882, 1918, 1938, 2126, 2138, 2202, 2382, 2410, 2418, 2478, 2490, 2710, 2718, 2982, 3022, 3030, 3054, 3226, 3274, 3306, 3418, 3614, 3642, 3690, 3774, 3806, 3922, 4146, 4174, 4182, 4178, 4186, 4190, 4194, 4214, 4218, 4254, 4274, 4302, 4402, 4410, 4418, 4438, 4478, 4558, 4610, 4610, 4714, 4882, 4906, 4958, 4962, 5030, 5034, 5122, 5130, 5342, 5410, 5434, 2974, 5921, 4582, 0, 0, 1762, 2022, 1958, 1870, 1934, 1978, 2122, 2150, 2382, 2362, 2378, 2406, 2482, 2498, 2566, 2578, 2606, 2622, 2854, 2862, 2910, 2942, 2990, 3014, 2998, 3030, 3018, 3054, 3082, 3170, 3182, 3190, 3230, 3298, 3346, 3350, 3370, 3498, 3514, 3602, 3678, 3670, 3690, 3718, 3774, 4118, 3810, 3862, 3874, 3938, 3966, 4002, 4038, 4042, 4070, 4074, 4090, 4110, 4106, 4154, 4278, 4302, 4326, 4382, 4402, 4430, 4478, 4658, 4698, 4814, 4886, 4898, 4906, 4930, 4950, 4934, 4958, 4954, 4946, 4962, 4974, 5034, 5094, 5142, 5198, 5230, 5306, 5342, 5374, 5394, 5410, 5422, 5434, 5518, 5678, 5816, 5811, 5861, 1546, 1586, 1590, 5991, 6036, 6156, 5658, 5674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6619, 6622, 6625, 7182, 7186, 6757, 6757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7547, 7532, 7537, 7552, 7542, 0, 0, 0, 0, 0, 17319, 33046, 17433, 560, 536, 545, 548, 551, 554, 557, 563, 566, 23, 17415, 17421, 17675, 17683, 17247, 17253, 17259, 17265, 17277, 17283, 17289, 17301, 17307, 0, 17313, 17325, 17331, 17337, 17349, 0, 17355, 0, 17361, 17367, 0, 17373, 17379, 0, 17391, 17397, 17403, 17409, 17427, 17295, 17271, 17343, 17385, 7557, 668, 668, 677, 677, 677, 677, 680, 680, 680, 680, 686, 686, 686, 686, 674, 674, 674, 674, 683, 683, 683, 683, 671, 671, 671, 671, 722, 722, 722, 722, 725, 725, 725, 725, 692, 692, 692, 692, 689, 689, 689, 689, 695, 695, 695, 695, 698, 698, 698, 698, 707, 707, 704, 704, 710, 710, 701, 701, 716, 716, 713, 713, 728, 728, 728, 728, 734, 734, 734, 734, 740, 740, 740, 740, 737, 737, 737, 737, 743, 743, 746, 746, 746, 746, 17541, 17541, 752, 752, 752, 752, 749, 749, 749, 749, 779, 779, 17535, 17535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 731, 731, 731, 731, 761, 761, 758, 758, 764, 764, 8277, 770, 770, 755, 755, 767, 767, 776, 776, 776, 776, 656, 656, 9648, 9648, 9760, 9760, 9711, 9711, 9739, 9739, 9732, 9732, 9746, 9746, 9753, 9753, 9753, 9718, 9718, 9718, 773, 773, 773, 773, 9655, 9662, 9690, 9718, 9725, 7567, 7572, 7577, 7592, 7607, 7612, 7617, 7622, 7627, 7642, 7657, 7662, 7667, 7682, 7697, 7702, 7707, 7712, 7727, 7732, 7747, 7752, 7757, 7772, 7777, 7782, 7792, 7852, 7867, 7882, 7887, 7892, 7902, 7917, 7922, 7937, 7942, 7947, 7962, 7967, 7982, 7987, 7992, 7997, 8002, 8007, 8012, 8017, 8022, 8027, 8032, 8037, 8042, 8047, 8052, 8057, 8062, 8067, 8077, 8082, 8087, 8092, 8102, 8107, 8117, 8122, 8127, 8132, 8137, 8142, 8147, 8152, 8157, 8172, 8187, 8192, 8197, 8202, 8207, 8212, 8222, 8227, 8232, 8247, 8262, 8267, 17463, 17469, 17523, 17610, 17617, 17624, 17631, 17638, 17645, 9676, 9683, 9690, 9697, 9718, 9725, 7582, 7587, 7592, 7597, 7607, 7612, 7632, 7637, 7642, 7647, 7657, 7662, 7672, 7677, 7682, 7687, 7697, 7702, 8002, 8007, 8022, 8027, 8032, 8052, 8057, 8062, 8067, 8092, 8102, 8107, 8112, 8132, 8162, 8167, 8172, 8177, 8187, 8192, 17523, 8237, 8242, 8247, 8252, 8262, 8267, 9655, 9662, 9669, 9690, 9704, 7567, 7572, 7577, 7592, 7602, 7617, 7622, 7627, 7642, 7652, 7682, 7707, 7712, 7727, 7732, 7747, 7757, 7772, 7777, 7782, 7792, 7852, 7857, 7867, 7882, 7887, 7892, 7902, 7917, 7937, 7942, 7947, 7962, 7967, 7982, 7987, 7992, 7997, 8012, 8017, 8037, 8042, 8047, 8052, 8057, 8077, 8082, 8087, 8092, 8097, 8117, 8122, 8127, 8132, 8147, 8152, 8157, 8172, 8182, 8197, 8202, 17511, 8222, 8227, 8232, 8247, 8257, 9690, 9704, 7592, 7602, 7642, 7652, 7682, 7692, 7792, 7797, 7832, 7837, 8052, 8057, 8092, 8172, 8182, 8247, 8257, 17691, 17699, 17707, 7927, 7932, 7952, 7957, 7972, 7977, 7802, 7807, 7842, 7847, 7737, 7742, 7717, 7722, 7762, 7767, 7872, 7877, 7907, 7912, 7812, 7817, 7822, 7832, 7827, 7787, 7862, 7897, 7927, 7932, 7952, 7957, 7972, 7977, 7802, 7807, 7842, 7847, 7737, 7742, 7717, 7722, 7762, 7767, 7872, 7877, 7907, 7912, 7812, 7817, 7822, 7832, 7827, 7787, 7862, 7897, 7812, 7817, 7822, 7832, 7797, 7837, 7922, 7772, 7777, 7782, 7812, 7817, 7822, 7922, 7937, 17439, 17439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8983, 9004, 9004, 9011, 9018, 9039, 9046, 9053, 9088, 9088, 9123, 9116, 9144, 9130, 9137, 9172, 9172, 9165, 9179, 9179, 9221, 9221, 9249, 9193, 9193, 9186, 9207, 9207, 9214, 9214, 9256, 9270, 9270, 9277, 9277, 9284, 9291, 9298, 9305, 9305, 9312, 9326, 9340, 9333, 9347, 9347, 9368, 9375, 9424, 9438, 9431, 9403, 9403, 9445, 9445, 9452, 9452, 9494, 9501, 9508, 9466, 9480, 9515, 9522, 0, 0, 9473, 9606, 9613, 9571, 9578, 9550, 9550, 9557, 9599, 9592, 9634, 9634, 8976, 8997, 8990, 9032, 9025, 9067, 9060, 9102, 9074, 9095, 9151, 9228, 9200, 9263, 9417, 9459, 9627, 9620, 9641, 9536, 9382, 9585, 9368, 9424, 9319, 9396, 9543, 9529, 9410, 9389, 9410, 9543, 9081, 9109, 9487, 9354, 8969, 9389, 9298, 9249, 9158, 9564, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9242, 9361, 10188, 10179, 10233, 10215, 10197, 10224, 10242, 9235, 11401, 11017, 10206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 1158, 1162, 53, 55, 3, 63, 1218, 1222, 7010, 0, 0, 0, 0, 0, 0, 33075, 33075, 33075, 33075, 33075, 33075, 33075, 33070, 33070, 33070, 33070, 33070, 33070, 33070, 33075, 33075, 6262, 1094, 1090, 127, 127, 17, 19, 183, 187, 1210, 1214, 1198, 1202, 1174, 1178, 1166, 1170, 1182, 1186, 1190, 1194, 0, 0, 119, 123, 17024, 17024, 17024, 17024, 127, 127, 127, 25, 1158, 29, 0, 55, 53, 63, 3, 1094, 17, 19, 183, 187, 1210, 1214, 7, 13, 21, 23, 27, 57, 61, 59, 0, 121, 9, 11, 65, 0, 0, 0, 0, 17089, 17475, 17094, 0, 17099, 0, 17104, 17481, 17109, 17487, 17114, 17493, 17119, 17499, 17124, 17505, 569, 17445, 17445, 17451, 17451, 17517, 17517, 17457, 17457, 17529, 17529, 17529, 17529, 572, 572, 575, 575, 575, 575, 578, 578, 581, 581, 581, 581, 584, 584, 584, 584, 587, 587, 587, 587, 590, 590, 590, 590, 593, 593, 593, 593, 596, 596, 599, 599, 602, 602, 605, 605, 608, 608, 608, 608, 611, 611, 611, 611, 614, 614, 614, 614, 617, 617, 617, 617, 620, 620, 620, 620, 623, 623, 623, 623, 626, 626, 626, 626, 629, 629, 629, 629, 632, 632, 632, 632, 635, 635, 635, 635, 638, 638, 638, 638, 641, 641, 641, 641, 644, 644, 644, 644, 647, 647, 647, 647, 650, 650, 650, 650, 653, 653, 656, 656, 659, 659, 659, 659, 11799, 11799, 11807, 11807, 11815, 11815, 8072, 8072, 0, 0, 0, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 1146, 1150, 1162, 1182, 1186, 1158, 1454, 1446, 1226, 1234, 1242, 1250, 1258, 1390, 1398, 1406, 1314, 1458, 1230, 1238, 1246, 1254, 1262, 1266, 1270, 1274, 1278, 1282, 1286, 1290, 1294, 1298, 1302, 1306, 1310, 1318, 1322, 1326, 1330, 1334, 1338, 1342, 1346, 1350, 1354, 1358, 1362, 1366, 1370, 1374, 1378, 1382, 1386, 1394, 1402, 1410, 1414, 1418, 1422, 1426, 1430, 1434, 1450, 19087, 19093, 966, 790, 794, 19026, 798, 19032, 19038, 802, 806, 810, 19044, 19050, 19056, 19062, 19068, 19074, 874, 814, 818, 822, 894, 826, 830, 834, 838, 842, 846, 850, 854, 858, 862, 0, 0, 0, 18900, 18906, 18912, 18918, 18924, 18930, 0, 0, 18936, 18942, 18948, 18954, 18960, 18966, 0, 0, 18972, 18978, 18984, 18990, 18996, 19002, 0, 0, 19008, 19014, 19020, 0, 0, 0, 191, 194, 203, 17019, 200, 197, 1098, 0, 1134, 1102, 1106, 1110, 1114, 1138, 1142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 221, 242, 0, 0, 374, 377, 380, 383, 386, 389, 392, 395, 398, 401, 404, 407, 410, 413, 416, 419, 422, 395, 425, 428, 431, 434, 437, 440, 512, 515, 518, 1118, 458, 467, 473, 509, 494, 491, 521, 524, 0, 0, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 572, 575, 587, 596, 0, 653, 605, 590, 620, 659, 638, 641, 644, 647, 608, 626, 632, 614, 635, 602, 611, 581, 584, 593, 599, 617, 623, 629, 662, 743, 719, 665, 0, 575, 587, 0, 650, 0, 0, 590, 0, 659, 638, 641, 644, 647, 608, 626, 632, 614, 635, 0, 611, 581, 584, 593, 0, 617, 0, 629, 0, 0, 0, 0, 0, 0, 587, 0, 0, 0, 0, 590, 0, 659, 0, 641, 0, 647, 608, 626, 0, 614, 635, 0, 611, 0, 0, 593, 0, 617, 0, 629, 0, 743, 0, 665, 0, 575, 587, 0, 650, 0, 0, 590, 620, 659, 638, 0, 644, 647, 608, 626, 632, 614, 635, 0, 611, 581, 584, 593, 0, 617, 623, 629, 662, 0, 719, 0, 572, 575, 587, 596, 650, 653, 605, 590, 620, 659, 0, 641, 644, 647, 608, 626, 632, 614, 635, 602, 611, 581, 584, 593, 599, 617, 623, 629, 0, 0, 0, 0, 0, 575, 587, 596, 0, 653, 605, 590, 620, 659, 0, 641, 644, 647, 608, 626, 632, 614, 635, 602, 611, 581, 584, 593, 599, 617, 623, 629, 0, 0, 0, 0, 6268, 6265, 6271, 6307, 6343, 6379, 6415, 6424, 6430, 6436, 6442, 0, 0, 0, 0, 0, 6802, 6806, 6810, 6814, 6818, 6822, 6826, 6830, 6834, 6838, 6842, 6846, 6850, 6854, 6858, 6862, 6866, 6870, 6874, 6878, 6882, 6886, 6890, 6894, 6898, 6902, 10027, 71, 101, 6463, 6583, 0, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 9907, 9928, 1286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3090, 2634, 2262, 17883, 1822, 2546, 4914, 2562, 1834, 3290, 3762, 3250, 2090, 2926, 1986, 3258, 2070, 4378, 3974, 5006, 2518, 2318, 3686, 3102, 3146, 1730, 1742, 5134, 2782, 1770, 2290, 3134, 5046, 3094, 4210, 4270, 2298, 3654, 3342, 3338, 3994, 2094, 2394, 5190, 0, 0, 0, 0, 1790, 1782, 1798, 5706, 1866, 1882, 1886, 1894, 1902, 1906, 1918, 1910, 1462, 5726, 1938, 1942, 1946, 1974, 5711, 1466, 1954, 1986, 5721, 2002, 2010, 1850, 2018, 2022, 6196, 2050, 2058, 1474, 2082, 2086, 2094, 2098, 1478, 2122, 2126, 2138, 2150, 2154, 2158, 2166, 2198, 2202, 2210, 2226, 2234, 2238, 2238, 2238, 5741, 3734, 2258, 2266, 5746, 2278, 2286, 2294, 2334, 2314, 2326, 2330, 2338, 2346, 2350, 2358, 2366, 2370, 2370, 2378, 2386, 2390, 2402, 2438, 2410, 2442, 2414, 2422, 2062, 2514, 2458, 2462, 2466, 2454, 2474, 2470, 2494, 5751, 2522, 2526, 2534, 2546, 2554, 2582, 5756, 5761, 2594, 2598, 2602, 2590, 2610, 1482, 1486, 2618, 2626, 2626, 5766, 2654, 2658, 2662, 2670, 5771, 2678, 2682, 2898, 2690, 1490, 2702, 2718, 2730, 2726, 5781, 2738, 5786, 2750, 2746, 2754, 2770, 2774, 1494, 2790, 2798, 2802, 2806, 1498, 5791, 1502, 2834, 2838, 2842, 2850, 6246, 2874, 5801, 5801, 4570, 2890, 2890, 1506, 5836, 6046, 2906, 2914, 1510, 2934, 2950, 2954, 2962, 2978, 1518, 1514, 2982, 5806, 2986, 3006, 3010, 3014, 3010, 3026, 3030, 3046, 3038, 3042, 3050, 3054, 3058, 3070, 3074, 3098, 3106, 3122, 3142, 5821, 3138, 3126, 3150, 3158, 3178, 5826, 3186, 3174, 3166, 1522, 3194, 3202, 3210, 3198, 1526, 3226, 3234, 5831, 3278, 3330, 3294, 1538, 3306, 1534, 1530, 1990, 1994, 3334, 3310, 4526, 1638, 3346, 3350, 3354, 3374, 3366, 5856, 1542, 3394, 3382, 3410, 3418, 5866, 3422, 3402, 3430, 1546, 3434, 3438, 3442, 3454, 5871, 3462, 1550, 3474, 5876, 3478, 1554, 3490, 3502, 3514, 3518, 5881, 5776, 5886, 3550, 5891, 3562, 3570, 3554, 3582, 3598, 3614, 3602, 3606, 3618, 3622, 5896, 3594, 3646, 3650, 1558, 3670, 3666, 5901, 3638, 3698, 5906, 5911, 3702, 3722, 3718, 3714, 1562, 3726, 3742, 3738, 3750, 5716, 3766, 5916, 3778, 5926, 3798, 3810, 3830, 5931, 3850, 3854, 5936, 5941, 3882, 3898, 1566, 3902, 1570, 1570, 3926, 3930, 3938, 3942, 3954, 1574, 3978, 5946, 4006, 5951, 4018, 5796, 4034, 5956, 5961, 5966, 1578, 1582, 4090, 5976, 5971, 5981, 5986, 4098, 4102, 4102, 4110, 1590, 4114, 1594, 1598, 5996, 4134, 4142, 4154, 1602, 6001, 4190, 6006, 6011, 4222, 4246, 1606, 4254, 4258, 4262, 6016, 6021, 6021, 4286, 1610, 6026, 4306, 4310, 1614, 6031, 4338, 1618, 4354, 4346, 4362, 6041, 4386, 1622, 4398, 4406, 4422, 1626, 6051, 6056, 1630, 6061, 4446, 6066, 4458, 4470, 4478, 6071, 6076, 4498, 6081, 4506, 5841, 1634, 4530, 4534, 1642, 4538, 2614, 6086, 6091, 5846, 5851, 4570, 4574, 5110, 1646, 4618, 4614, 4622, 2114, 4626, 4630, 4634, 4642, 6096, 4638, 4646, 4666, 4670, 4650, 4674, 4694, 4714, 4662, 4682, 4686, 4690, 6101, 6111, 6106, 1650, 4722, 4726, 4734, 6131, 4738, 6116, 1654, 1658, 6121, 6126, 1662, 4770, 4774, 4778, 4782, 4794, 4790, 4802, 4798, 4814, 4806, 4810, 4818, 1666, 4826, 4830, 1670, 4846, 4850, 6136, 4862, 4866, 1674, 4878, 1470, 6141, 6146, 1678, 1682, 4922, 4946, 4974, 4990, 6151, 5010, 5014, 5038, 5050, 6161, 5731, 5062, 5058, 5070, 5736, 5082, 5094, 6166, 6171, 5158, 5170, 5178, 6176, 5182, 5226, 5238, 5242, 5234, 5254, 5258, 6181, 5270, 1686, 5278, 6186, 1690, 5334, 2758, 5358, 6191, 6201, 1694, 1698, 5398, 6206, 1702, 6211, 5422, 5422, 5430, 6216, 5454, 1706, 5470, 5482, 5490, 5498, 1710, 6221, 5518, 5546, 5558, 1714, 1718, 5562, 6226, 1722, 6231, 6236, 6241, 5598, 1726, 5618, 5626, 5630, 5638, 5646, 5654, 6251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - nfkcIndex = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 1, 2, 3, 93, 4, 5, 0, 94, 95, 6, 7, 8, 9, 10, 96, 97, 11, 0, 0, 12, 98, 99, 13, 0, 100, 101, 102, 0, 103, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 0, 10, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 105, 0, 14, 106, 107, 108, 109, 110, 111, 112, 113, 108, 114, 115, 116, 0, 117, 118, 119, 120, 121, 0, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 0, 132, 133, 134, 135, 136, 137, 0, 0, 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 0, 0, 140, 0, 0, 141, 0, 142, 0, 0, 0, 143, 144, 145, 146, 15, 147, 148, 149, 150, 0, 0, 151, 152, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 153, 154, 155, 156, 27, 28, 157, 158, 159, 29, 30, 160, 161, 0, 0, 0, 0, 31, 32, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163, 164, 0, 165, 0, 0, 0, 0, 0, 166, 0, 167, 0, 168, 0, 169, 0, 0, 170, 171, 33, 34, 35, 172, 173, 36, 37, 38, 174, 39, 40, 0, 41, 42, 43, 44, 45, 46, 47, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 175, 176, 177, 0, 178, 0, 179, 180, 0, 0, 181, 182, 183, 184, 185, 0, 0, 186, 187, 0, 188, 0, 189, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 196, 190, 191, 192, 193, 194, 195, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 198, 73, 74, 75, 0, 0, 0, 0, 0, 0, 0, 199, 0, 0, 0, 200, 0, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 203, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0, 0, 0, 0, 205, 0, 0, 206, 0, 0, 0, 207, 208, 0, 209, 184, 0, 210, 211, 0, 0, 212, 213, 214, 0, 0, 0, 215, 216, 217, 0, 0, 218, 219, 220, 0, 221, 0, 222, 0, 0, 0, 223, 0, 0, 0, 224, 225, 0, 226, 227, 228, 229, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0, 230, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 237, 238, 0, 239, 0, 0, 0, 0, 0, 0, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 76, 250, 251, 252, 253, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0, 0, 233, 0, 0, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 256, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 258, 259, 0, 82, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 84, 85, 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 13, 0, 0, 0, 0, 14, 0, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - nfkcSparseOffset = new sliceType$1([0, 14, 18, 27, 37, 53, 55, 60, 71, 86, 99, 107, 112, 117, 119, 127, 134, 137, 145, 149, 153, 155, 157, 166, 170, 177, 182, 185, 195, 198, 205, 213, 217, 219, 223, 227, 233, 250, 262, 264, 270, 272, 274, 276, 278, 280, 282, 284, 287, 290, 292, 295, 298, 302, 308, 310, 319, 321, 324, 326, 337, 348, 362, 376, 392, 406, 413, 419, 434, 438, 440, 444, 446, 449, 451, 454, 456, 459, 461, 463, 465, 477, 487, 497, 500, 504, 506, 508, 510, 513, 516, 518, 520, 522, 524, 530, 533, 538, 540, 547, 553, 559, 567, 573, 579, 585, 589, 591, 593, 595, 597, 603, 606, 608, 610, 616, 619, 627, 634, 637, 640, 642, 645, 653, 657, 664, 667, 673, 675, 677, 680, 682, 685, 690, 692, 694, 696, 698, 700, 703, 705, 707, 709, 711, 713, 726, 736, 738, 740, 744, 749, 761, 766, 775, 781, 786, 790, 795, 799, 815, 829, 843, 857, 863, 865, 867, 870, 881, 883, 893]); - nfkcSparseValues = $toNativeArray($kindStruct, [new valueRange.ptr(2, 13, 0), new valueRange.ptr(1, 160, 160), new valueRange.ptr(17039, 168, 168), new valueRange.ptr(131, 170, 170), new valueRange.ptr(17019, 175, 175), new valueRange.ptr(37, 178, 179), new valueRange.ptr(17009, 180, 180), new valueRange.ptr(479, 181, 181), new valueRange.ptr(17064, 184, 184), new valueRange.ptr(35, 185, 185), new valueRange.ptr(159, 186, 186), new valueRange.ptr(8738, 188, 188), new valueRange.ptr(8726, 189, 189), new valueRange.ptr(8888, 190, 190), new valueRange.ptr(145, 3, 0), new valueRange.ptr(18169, 160, 161), new valueRange.ptr(18219, 175, 176), new valueRange.ptr(40960, 183, 183), new valueRange.ptr(3, 8, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(145, 176, 176), new valueRange.ptr(281, 177, 177), new valueRange.ptr(149, 178, 178), new valueRange.ptr(165, 179, 179), new valueRange.ptr(323, 180, 182), new valueRange.ptr(175, 183, 183), new valueRange.ptr(179, 184, 184), new valueRange.ptr(10, 9, 0), new valueRange.ptr(17029, 152, 152), new valueRange.ptr(17034, 153, 154), new valueRange.ptr(17069, 155, 155), new valueRange.ptr(17014, 156, 156), new valueRange.ptr(17049, 157, 157), new valueRange.ptr(275, 160, 160), new valueRange.ptr(153, 161, 161), new valueRange.ptr(167, 162, 163), new valueRange.ptr(362, 164, 164), new valueRange.ptr(0, 15, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(40960, 141, 141), new valueRange.ptr(14268, 144, 144), new valueRange.ptr(14280, 145, 145), new valueRange.ptr(14262, 147, 147), new valueRange.ptr(40960, 150, 150), new valueRange.ptr(14382, 151, 151), new valueRange.ptr(14328, 156, 156), new valueRange.ptr(14304, 157, 157), new valueRange.ptr(14346, 158, 158), new valueRange.ptr(40960, 180, 181), new valueRange.ptr(14388, 182, 182), new valueRange.ptr(14394, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 131, 135), new valueRange.ptr(1, 4, 0), new valueRange.ptr(33044, 129, 130), new valueRange.ptr(33075, 132, 132), new valueRange.ptr(33070, 133, 133), new valueRange.ptr(33038, 135, 135), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33075, 144, 151), new valueRange.ptr(33050, 152, 152), new valueRange.ptr(33051, 153, 153), new valueRange.ptr(33052, 154, 154), new valueRange.ptr(14424, 162, 162), new valueRange.ptr(14430, 163, 163), new valueRange.ptr(14442, 164, 164), new valueRange.ptr(14436, 165, 165), new valueRange.ptr(14448, 166, 166), new valueRange.ptr(40960, 167, 167), new valueRange.ptr(0, 14, 0), new valueRange.ptr(14466, 128, 128), new valueRange.ptr(40960, 129, 129), new valueRange.ptr(14454, 130, 130), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(14460, 147, 147), new valueRange.ptr(40960, 149, 149), new valueRange.ptr(33075, 150, 156), new valueRange.ptr(33075, 159, 162), new valueRange.ptr(33070, 163, 163), new valueRange.ptr(33075, 164, 164), new valueRange.ptr(33075, 167, 168), new valueRange.ptr(33070, 170, 170), new valueRange.ptr(33075, 171, 172), new valueRange.ptr(33070, 173, 173), new valueRange.ptr(0, 12, 0), new valueRange.ptr(33056, 145, 145), new valueRange.ptr(33075, 176, 176), new valueRange.ptr(33070, 177, 177), new valueRange.ptr(33075, 178, 179), new valueRange.ptr(33070, 180, 180), new valueRange.ptr(33075, 181, 182), new valueRange.ptr(33070, 183, 185), new valueRange.ptr(33075, 186, 186), new valueRange.ptr(33070, 187, 188), new valueRange.ptr(33075, 189, 189), new valueRange.ptr(33070, 190, 190), new valueRange.ptr(33075, 191, 191), new valueRange.ptr(5, 7, 0), new valueRange.ptr(33075, 128, 128), new valueRange.ptr(33075, 129, 129), new valueRange.ptr(33070, 130, 131), new valueRange.ptr(33070, 132, 133), new valueRange.ptr(33070, 134, 135), new valueRange.ptr(33070, 136, 137), new valueRange.ptr(33075, 138, 138), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33075, 171, 177), new valueRange.ptr(33070, 178, 178), new valueRange.ptr(33075, 179, 179), new valueRange.ptr(33070, 189, 189), new valueRange.ptr(0, 4, 0), new valueRange.ptr(33075, 150, 153), new valueRange.ptr(33075, 155, 163), new valueRange.ptr(33075, 165, 167), new valueRange.ptr(33075, 169, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 153, 155), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 168, 168), new valueRange.ptr(16111, 169, 169), new valueRange.ptr(40960, 176, 176), new valueRange.ptr(16119, 177, 177), new valueRange.ptr(40960, 179, 179), new valueRange.ptr(16127, 180, 180), new valueRange.ptr(39171, 188, 188), new valueRange.ptr(8, 6, 0), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(33075, 145, 145), new valueRange.ptr(33070, 146, 146), new valueRange.ptr(33075, 147, 147), new valueRange.ptr(33075, 148, 148), new valueRange.ptr(17715, 152, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(8, 7, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11435, 139, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(17779, 156, 157), new valueRange.ptr(17795, 159, 159), new valueRange.ptr(33075, 190, 190), new valueRange.ptr(0, 3, 0), new valueRange.ptr(17835, 179, 179), new valueRange.ptr(17843, 182, 182), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(8, 3, 0), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(17803, 153, 155), new valueRange.ptr(17827, 158, 158), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(0, 8, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11459, 136, 136), new valueRange.ptr(11451, 139, 139), new valueRange.ptr(11467, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 150, 151), new valueRange.ptr(17851, 156, 156), new valueRange.ptr(17859, 157, 157), new valueRange.ptr(0, 3, 0), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(11475, 148, 148), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11483, 138, 138), new valueRange.ptr(11499, 139, 139), new valueRange.ptr(11491, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(6145, 4, 0), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(16135, 136, 136), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(33057, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 188, 188), new valueRange.ptr(40960, 191, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(11507, 128, 128), new valueRange.ptr(39168, 130, 130), new valueRange.ptr(40960, 134, 134), new valueRange.ptr(11515, 135, 135), new valueRange.ptr(11523, 136, 136), new valueRange.ptr(12135, 138, 138), new valueRange.ptr(11759, 139, 139), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 149, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 187, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 6, 0), new valueRange.ptr(40960, 134, 135), new valueRange.ptr(11531, 138, 138), new valueRange.ptr(11547, 139, 139), new valueRange.ptr(11539, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(27613, 7, 0), new valueRange.ptr(39173, 138, 138), new valueRange.ptr(39168, 143, 143), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16143, 154, 154), new valueRange.ptr(12143, 156, 156), new valueRange.ptr(11770, 157, 157), new valueRange.ptr(11555, 158, 159), new valueRange.ptr(0, 3, 0), new valueRange.ptr(9767, 179, 179), new valueRange.ptr(33059, 184, 185), new valueRange.ptr(33029, 186, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33060, 136, 139), new valueRange.ptr(0, 3, 0), new valueRange.ptr(9788, 179, 179), new valueRange.ptr(33061, 184, 185), new valueRange.ptr(33029, 186, 186), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33062, 136, 139), new valueRange.ptr(9774, 156, 156), new valueRange.ptr(9781, 157, 157), new valueRange.ptr(0, 5, 0), new valueRange.ptr(782, 140, 140), new valueRange.ptr(33070, 152, 153), new valueRange.ptr(33070, 181, 181), new valueRange.ptr(33070, 183, 183), new valueRange.ptr(33068, 185, 185), new valueRange.ptr(0, 16, 0), new valueRange.ptr(9802, 131, 131), new valueRange.ptr(9809, 141, 141), new valueRange.ptr(9816, 146, 146), new valueRange.ptr(9823, 151, 151), new valueRange.ptr(9830, 156, 156), new valueRange.ptr(9795, 169, 169), new valueRange.ptr(33063, 177, 177), new valueRange.ptr(33064, 178, 178), new valueRange.ptr(19099, 179, 179), new valueRange.ptr(33065, 180, 180), new valueRange.ptr(19108, 181, 181), new valueRange.ptr(17867, 182, 182), new valueRange.ptr(17931, 183, 183), new valueRange.ptr(17875, 184, 184), new valueRange.ptr(17942, 185, 185), new valueRange.ptr(33064, 186, 189), new valueRange.ptr(0, 11, 0), new valueRange.ptr(33064, 128, 128), new valueRange.ptr(19117, 129, 129), new valueRange.ptr(33075, 130, 131), new valueRange.ptr(33029, 132, 132), new valueRange.ptr(33075, 134, 135), new valueRange.ptr(9844, 147, 147), new valueRange.ptr(9851, 157, 157), new valueRange.ptr(9858, 162, 162), new valueRange.ptr(9865, 167, 167), new valueRange.ptr(9872, 172, 172), new valueRange.ptr(9837, 185, 185), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 134, 134), new valueRange.ptr(0, 5, 0), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(11563, 166, 166), new valueRange.ptr(39168, 174, 174), new valueRange.ptr(33027, 183, 183), new valueRange.ptr(33029, 185, 186), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 141, 141), new valueRange.ptr(0, 1, 0), new valueRange.ptr(786, 188, 188), new valueRange.ptr(0, 1, 0), new valueRange.ptr(40960, 128, 146), new valueRange.ptr(0, 1, 0), new valueRange.ptr(47360, 161, 181), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 168, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(39168, 128, 130), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 157, 159), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 148, 148), new valueRange.ptr(33029, 180, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 146, 146), new valueRange.ptr(33075, 157, 157), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33074, 169, 169), new valueRange.ptr(4, 2, 0), new valueRange.ptr(33071, 185, 186), new valueRange.ptr(33070, 187, 187), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 151, 151), new valueRange.ptr(33070, 152, 152), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33029, 160, 160), new valueRange.ptr(33075, 181, 188), new valueRange.ptr(33070, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33075, 176, 180), new valueRange.ptr(33070, 181, 186), new valueRange.ptr(33075, 187, 188), new valueRange.ptr(33070, 189, 189), new valueRange.ptr(33070, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 128, 128), new valueRange.ptr(0, 8, 0), new valueRange.ptr(11635, 128, 128), new valueRange.ptr(11643, 129, 129), new valueRange.ptr(40960, 130, 130), new valueRange.ptr(11651, 131, 131), new valueRange.ptr(33029, 132, 132), new valueRange.ptr(33075, 171, 171), new valueRange.ptr(33070, 172, 172), new valueRange.ptr(33075, 173, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 170, 171), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 166, 166), new valueRange.ptr(33029, 178, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 183, 183), new valueRange.ptr(0, 10, 0), new valueRange.ptr(33075, 144, 146), new valueRange.ptr(33025, 148, 148), new valueRange.ptr(33070, 149, 153), new valueRange.ptr(33075, 154, 155), new valueRange.ptr(33070, 156, 159), new valueRange.ptr(33075, 160, 160), new valueRange.ptr(33025, 162, 168), new valueRange.ptr(33070, 173, 173), new valueRange.ptr(33075, 180, 180), new valueRange.ptr(33075, 184, 185), new valueRange.ptr(2, 10, 0), new valueRange.ptr(67, 172, 172), new valueRange.ptr(209, 173, 173), new valueRange.ptr(69, 174, 174), new valueRange.ptr(73, 176, 177), new valueRange.ptr(230, 178, 178), new valueRange.ptr(79, 179, 186), new valueRange.ptr(95, 188, 188), new valueRange.ptr(239, 189, 189), new valueRange.ptr(97, 190, 190), new valueRange.ptr(101, 191, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(1, 128, 138), new valueRange.ptr(1086, 145, 145), new valueRange.ptr(17074, 151, 151), new valueRange.ptr(29, 164, 164), new valueRange.ptr(6262, 165, 165), new valueRange.ptr(7010, 166, 166), new valueRange.ptr(1, 175, 175), new valueRange.ptr(9879, 179, 179), new valueRange.ptr(10251, 180, 180), new valueRange.ptr(9886, 182, 182), new valueRange.ptr(10261, 183, 183), new valueRange.ptr(6256, 188, 188), new valueRange.ptr(17024, 190, 190), new valueRange.ptr(2, 13, 0), new valueRange.ptr(6454, 135, 135), new valueRange.ptr(6451, 136, 136), new valueRange.ptr(6259, 137, 137), new valueRange.ptr(10651, 151, 151), new valueRange.ptr(1, 159, 159), new valueRange.ptr(33, 176, 176), new valueRange.ptr(147, 177, 177), new valueRange.ptr(41, 180, 185), new valueRange.ptr(23, 186, 186), new valueRange.ptr(1130, 187, 187), new valueRange.ptr(59, 188, 188), new valueRange.ptr(17, 189, 190), new valueRange.ptr(157, 191, 191), new valueRange.ptr(2, 15, 0), new valueRange.ptr(33, 128, 137), new valueRange.ptr(23, 138, 138), new valueRange.ptr(1130, 139, 139), new valueRange.ptr(59, 140, 140), new valueRange.ptr(17, 141, 142), new valueRange.ptr(131, 144, 144), new valueRange.ptr(139, 145, 145), new valueRange.ptr(159, 146, 146), new valueRange.ptr(177, 147, 147), new valueRange.ptr(260, 148, 148), new valueRange.ptr(145, 149, 149), new valueRange.ptr(151, 150, 153), new valueRange.ptr(161, 154, 154), new valueRange.ptr(167, 155, 156), new valueRange.ptr(6559, 168, 168), new valueRange.ptr(0, 13, 0), new valueRange.ptr(33075, 144, 145), new valueRange.ptr(33025, 146, 147), new valueRange.ptr(33075, 148, 151), new valueRange.ptr(33025, 152, 154), new valueRange.ptr(33075, 155, 156), new valueRange.ptr(33075, 161, 161), new valueRange.ptr(33025, 165, 166), new valueRange.ptr(33075, 167, 167), new valueRange.ptr(33070, 168, 168), new valueRange.ptr(33075, 169, 169), new valueRange.ptr(33025, 170, 171), new valueRange.ptr(33070, 172, 175), new valueRange.ptr(33075, 176, 176), new valueRange.ptr(7, 6, 0), new valueRange.ptr(8582, 137, 137), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(15312, 154, 155), new valueRange.ptr(15326, 174, 174), new valueRange.ptr(14, 5, 0), new valueRange.ptr(15333, 141, 142), new valueRange.ptr(15340, 143, 143), new valueRange.ptr(40960, 144, 144), new valueRange.ptr(40960, 146, 146), new valueRange.ptr(40960, 148, 148), new valueRange.ptr(378, 14, 0), new valueRange.ptr(40960, 131, 131), new valueRange.ptr(15354, 132, 132), new valueRange.ptr(40960, 136, 136), new valueRange.ptr(15361, 137, 137), new valueRange.ptr(40960, 139, 139), new valueRange.ptr(15368, 140, 140), new valueRange.ptr(40960, 163, 163), new valueRange.ptr(15375, 164, 164), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(15382, 166, 166), new valueRange.ptr(9893, 172, 173), new valueRange.ptr(9900, 175, 175), new valueRange.ptr(10281, 176, 176), new valueRange.ptr(40960, 188, 188), new valueRange.ptr(7, 3, 0), new valueRange.ptr(15487, 160, 161), new valueRange.ptr(15529, 162, 163), new valueRange.ptr(15571, 170, 173), new valueRange.ptr(4, 1, 0), new valueRange.ptr(1166, 169, 170), new valueRange.ptr(2, 3, 0), new valueRange.ptr(87, 128, 143), new valueRange.ptr(131, 144, 169), new valueRange.ptr(33, 170, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(10664, 140, 140), new valueRange.ptr(614, 2, 0), new valueRange.ptr(7058, 180, 180), new valueRange.ptr(6448, 181, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(17652, 156, 156), new valueRange.ptr(0, 2, 0), new valueRange.ptr(149, 188, 188), new valueRange.ptr(109, 189, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 175, 177), new valueRange.ptr(0, 2, 0), new valueRange.ptr(1154, 175, 175), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 160, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(3526, 159, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(5682, 179, 179), new valueRange.ptr(4, 11, 0), new valueRange.ptr(5530, 128, 130), new valueRange.ptr(5554, 131, 131), new valueRange.ptr(5578, 132, 133), new valueRange.ptr(5594, 134, 137), new valueRange.ptr(5614, 138, 140), new valueRange.ptr(5634, 141, 141), new valueRange.ptr(5642, 142, 142), new valueRange.ptr(5650, 143, 144), new valueRange.ptr(5662, 145, 147), new valueRange.ptr(5678, 148, 148), new valueRange.ptr(5686, 149, 149), new valueRange.ptr(4, 9, 0), new valueRange.ptr(1, 128, 128), new valueRange.ptr(33069, 170, 170), new valueRange.ptr(33074, 171, 171), new valueRange.ptr(33076, 172, 172), new valueRange.ptr(33071, 173, 173), new valueRange.ptr(33072, 174, 174), new valueRange.ptr(33072, 175, 175), new valueRange.ptr(1206, 182, 182), new valueRange.ptr(2186, 184, 186), new valueRange.ptr(6, 9, 0), new valueRange.ptr(790, 177, 177), new valueRange.ptr(794, 178, 178), new valueRange.ptr(19026, 179, 179), new valueRange.ptr(798, 180, 180), new valueRange.ptr(19032, 181, 182), new valueRange.ptr(802, 183, 183), new valueRange.ptr(806, 184, 184), new valueRange.ptr(810, 185, 185), new valueRange.ptr(19044, 186, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 175, 175), new valueRange.ptr(33075, 180, 189), new valueRange.ptr(0, 3, 0), new valueRange.ptr(530, 156, 156), new valueRange.ptr(533, 157, 157), new valueRange.ptr(33075, 158, 159), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 176, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(5694, 176, 176), new valueRange.ptr(12, 1, 0), new valueRange.ptr(215, 184, 185), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 134, 134), new valueRange.ptr(33029, 172, 172), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 132, 132), new valueRange.ptr(33075, 160, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 171, 173), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 147, 147), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 179, 179), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 128, 128), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33075, 176, 176), new valueRange.ptr(33075, 178, 179), new valueRange.ptr(33070, 180, 180), new valueRange.ptr(33075, 183, 184), new valueRange.ptr(33075, 190, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 129, 129), new valueRange.ptr(33029, 182, 182), new valueRange.ptr(8, 4, 0), new valueRange.ptr(5690, 156, 157), new valueRange.ptr(293, 158, 158), new valueRange.ptr(5702, 159, 159), new valueRange.ptr(350, 169, 169), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 173, 173), new valueRange.ptr(0, 6, 0), new valueRange.ptr(58624, 128, 128), new valueRange.ptr(50688, 129, 155), new valueRange.ptr(58624, 156, 156), new valueRange.ptr(50688, 157, 183), new valueRange.ptr(58624, 184, 184), new valueRange.ptr(50688, 185, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 147), new valueRange.ptr(58624, 148, 148), new valueRange.ptr(50688, 149, 175), new valueRange.ptr(58624, 176, 176), new valueRange.ptr(50688, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 139), new valueRange.ptr(58624, 140, 140), new valueRange.ptr(50688, 141, 167), new valueRange.ptr(58624, 168, 168), new valueRange.ptr(50688, 169, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(50688, 128, 131), new valueRange.ptr(58624, 132, 132), new valueRange.ptr(50688, 133, 159), new valueRange.ptr(58624, 160, 160), new valueRange.ptr(50688, 161, 187), new valueRange.ptr(58624, 188, 188), new valueRange.ptr(50688, 189, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 151), new valueRange.ptr(58624, 152, 152), new valueRange.ptr(50688, 153, 179), new valueRange.ptr(58624, 180, 180), new valueRange.ptr(50688, 181, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 143), new valueRange.ptr(58624, 144, 144), new valueRange.ptr(50688, 145, 171), new valueRange.ptr(58624, 172, 172), new valueRange.ptr(50688, 173, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(58624, 164, 164), new valueRange.ptr(50688, 165, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(50688, 128, 135), new valueRange.ptr(58624, 136, 136), new valueRange.ptr(50688, 137, 163), new valueRange.ptr(2, 1, 0), new valueRange.ptr(3, 129, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 189, 189), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 160, 160), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 182, 186), new valueRange.ptr(45, 5, 0), new valueRange.ptr(33070, 141, 141), new valueRange.ptr(33075, 143, 143), new valueRange.ptr(33075, 184, 184), new valueRange.ptr(33025, 185, 186), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 165, 165), new valueRange.ptr(33070, 166, 166), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 164, 167), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 171, 172), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33070, 134, 135), new valueRange.ptr(33075, 136, 138), new valueRange.ptr(33070, 139, 139), new valueRange.ptr(33075, 140, 140), new valueRange.ptr(33070, 141, 144), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 134, 134), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(6142, 7, 0), new valueRange.ptr(40960, 153, 153), new valueRange.ptr(16975, 154, 154), new valueRange.ptr(40960, 155, 155), new valueRange.ptr(16985, 156, 156), new valueRange.ptr(40960, 165, 165), new valueRange.ptr(16995, 171, 171), new valueRange.ptr(33029, 185, 186), new valueRange.ptr(0, 6, 0), new valueRange.ptr(33075, 128, 130), new valueRange.ptr(39168, 167, 167), new valueRange.ptr(11659, 174, 174), new valueRange.ptr(11669, 175, 175), new valueRange.ptr(40960, 177, 178), new valueRange.ptr(33029, 179, 180), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 128, 128), new valueRange.ptr(33027, 138, 138), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 181, 181), new valueRange.ptr(33027, 182, 182), new valueRange.ptr(2, 1, 0), new valueRange.ptr(33027, 169, 170), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 187, 188), new valueRange.ptr(39168, 190, 190), new valueRange.ptr(0, 7, 0), new valueRange.ptr(40960, 135, 135), new valueRange.ptr(11679, 139, 139), new valueRange.ptr(11689, 140, 140), new valueRange.ptr(33029, 141, 141), new valueRange.ptr(39168, 151, 151), new valueRange.ptr(33075, 166, 172), new valueRange.ptr(33075, 176, 180), new valueRange.ptr(0, 3, 0), new valueRange.ptr(33029, 130, 130), new valueRange.ptr(33027, 134, 134), new valueRange.ptr(33075, 158, 158), new valueRange.ptr(27469, 6, 0), new valueRange.ptr(39168, 176, 176), new valueRange.ptr(40960, 185, 185), new valueRange.ptr(39168, 186, 186), new valueRange.ptr(11709, 187, 187), new valueRange.ptr(11699, 188, 189), new valueRange.ptr(11719, 190, 190), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 130, 130), new valueRange.ptr(33027, 131, 131), new valueRange.ptr(0, 5, 0), new valueRange.ptr(39168, 175, 175), new valueRange.ptr(40960, 184, 185), new valueRange.ptr(11729, 186, 186), new valueRange.ptr(11739, 187, 187), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 128, 128), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 182, 182), new valueRange.ptr(33027, 183, 183), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 171, 171), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33029, 185, 185), new valueRange.ptr(33027, 186, 186), new valueRange.ptr(0, 4, 0), new valueRange.ptr(39168, 176, 176), new valueRange.ptr(40960, 181, 181), new valueRange.ptr(11749, 184, 184), new valueRange.ptr(33029, 189, 190), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33027, 131, 131), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 160, 160), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 180, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 135, 135), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 153, 153), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33027, 130, 130), new valueRange.ptr(33029, 132, 133), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33029, 151, 151), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 176, 180), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 176, 182), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33026, 176, 177), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33025, 158, 158), new valueRange.ptr(0, 12, 0), new valueRange.ptr(17891, 158, 158), new valueRange.ptr(17901, 159, 159), new valueRange.ptr(17953, 160, 160), new valueRange.ptr(17967, 161, 161), new valueRange.ptr(17981, 162, 162), new valueRange.ptr(17995, 163, 163), new valueRange.ptr(18009, 164, 164), new valueRange.ptr(33068, 165, 166), new valueRange.ptr(33025, 167, 169), new valueRange.ptr(33073, 173, 173), new valueRange.ptr(33068, 174, 178), new valueRange.ptr(33070, 187, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(33070, 128, 130), new valueRange.ptr(33075, 133, 137), new valueRange.ptr(33070, 138, 139), new valueRange.ptr(33075, 170, 173), new valueRange.ptr(17911, 187, 187), new valueRange.ptr(17921, 188, 188), new valueRange.ptr(18023, 189, 189), new valueRange.ptr(18051, 190, 190), new valueRange.ptr(18037, 191, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(18065, 128, 128), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 130, 132), new valueRange.ptr(2, 3, 0), new valueRange.ptr(67, 128, 153), new valueRange.ptr(131, 154, 179), new valueRange.ptr(67, 180, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(91, 128, 141), new valueRange.ptr(131, 142, 148), new valueRange.ptr(147, 150, 167), new valueRange.ptr(67, 168, 191), new valueRange.ptr(2, 11, 0), new valueRange.ptr(115, 128, 129), new valueRange.ptr(131, 130, 155), new valueRange.ptr(67, 156, 156), new valueRange.ptr(71, 158, 159), new valueRange.ptr(79, 162, 162), new valueRange.ptr(85, 165, 166), new valueRange.ptr(93, 169, 172), new valueRange.ptr(103, 174, 181), new valueRange.ptr(131, 182, 185), new valueRange.ptr(141, 187, 187), new valueRange.ptr(145, 189, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(151, 128, 131), new valueRange.ptr(161, 133, 143), new valueRange.ptr(67, 144, 169), new valueRange.ptr(131, 170, 191), new valueRange.ptr(2, 8, 0), new valueRange.ptr(175, 128, 131), new valueRange.ptr(67, 132, 133), new valueRange.ptr(73, 135, 138), new valueRange.ptr(85, 141, 148), new valueRange.ptr(103, 150, 156), new valueRange.ptr(131, 158, 183), new valueRange.ptr(67, 184, 185), new valueRange.ptr(73, 187, 190), new valueRange.ptr(2, 5, 0), new valueRange.ptr(83, 128, 132), new valueRange.ptr(95, 134, 134), new valueRange.ptr(103, 138, 144), new valueRange.ptr(131, 146, 171), new valueRange.ptr(67, 172, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(107, 128, 133), new valueRange.ptr(131, 134, 159), new valueRange.ptr(67, 160, 185), new valueRange.ptr(131, 186, 191), new valueRange.ptr(2, 3, 0), new valueRange.ptr(143, 128, 147), new valueRange.ptr(67, 148, 173), new valueRange.ptr(131, 174, 191), new valueRange.ptr(2, 4, 0), new valueRange.ptr(167, 128, 135), new valueRange.ptr(67, 136, 161), new valueRange.ptr(131, 162, 187), new valueRange.ptr(67, 188, 191), new valueRange.ptr(2, 3, 0), new valueRange.ptr(75, 128, 149), new valueRange.ptr(131, 150, 175), new valueRange.ptr(67, 176, 191), new valueRange.ptr(3, 15, 0), new valueRange.ptr(443, 128, 128), new valueRange.ptr(1122, 129, 129), new valueRange.ptr(446, 130, 154), new valueRange.ptr(1118, 155, 155), new valueRange.ptr(458, 156, 156), new valueRange.ptr(467, 157, 157), new valueRange.ptr(473, 158, 158), new valueRange.ptr(509, 159, 159), new valueRange.ptr(494, 160, 160), new valueRange.ptr(491, 161, 161), new valueRange.ptr(374, 162, 178), new valueRange.ptr(395, 179, 179), new valueRange.ptr(425, 180, 186), new valueRange.ptr(1122, 187, 187), new valueRange.ptr(446, 188, 191), new valueRange.ptr(3, 13, 0), new valueRange.ptr(458, 128, 148), new valueRange.ptr(1118, 149, 149), new valueRange.ptr(458, 150, 150), new valueRange.ptr(467, 151, 151), new valueRange.ptr(473, 152, 152), new valueRange.ptr(509, 153, 153), new valueRange.ptr(494, 154, 154), new valueRange.ptr(491, 155, 155), new valueRange.ptr(374, 156, 172), new valueRange.ptr(395, 173, 173), new valueRange.ptr(425, 174, 180), new valueRange.ptr(1122, 181, 181), new valueRange.ptr(446, 182, 191), new valueRange.ptr(3, 13, 0), new valueRange.ptr(476, 128, 142), new valueRange.ptr(1118, 143, 143), new valueRange.ptr(458, 144, 144), new valueRange.ptr(467, 145, 145), new valueRange.ptr(473, 146, 146), new valueRange.ptr(509, 147, 147), new valueRange.ptr(494, 148, 148), new valueRange.ptr(491, 149, 149), new valueRange.ptr(374, 150, 166), new valueRange.ptr(395, 167, 167), new valueRange.ptr(425, 168, 174), new valueRange.ptr(1122, 175, 175), new valueRange.ptr(446, 176, 191), new valueRange.ptr(3, 13, 0), new valueRange.ptr(494, 128, 136), new valueRange.ptr(1118, 137, 137), new valueRange.ptr(458, 138, 138), new valueRange.ptr(467, 139, 139), new valueRange.ptr(473, 140, 140), new valueRange.ptr(509, 141, 141), new valueRange.ptr(494, 142, 142), new valueRange.ptr(491, 143, 143), new valueRange.ptr(374, 144, 160), new valueRange.ptr(395, 161, 161), new valueRange.ptr(425, 162, 168), new valueRange.ptr(1122, 169, 169), new valueRange.ptr(446, 170, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(33075, 128, 134), new valueRange.ptr(33075, 136, 152), new valueRange.ptr(33075, 155, 161), new valueRange.ptr(33075, 163, 164), new valueRange.ptr(33075, 166, 170), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33075, 172, 175), new valueRange.ptr(0, 1, 0), new valueRange.ptr(33070, 144, 150), new valueRange.ptr(0, 2, 0), new valueRange.ptr(33075, 132, 137), new valueRange.ptr(33027, 138, 138), new valueRange.ptr(2, 10, 0), new valueRange.ptr(99, 128, 137), new valueRange.ptr(6484, 138, 138), new valueRange.ptr(6535, 139, 139), new valueRange.ptr(6562, 140, 140), new valueRange.ptr(6568, 141, 141), new valueRange.ptr(7110, 142, 142), new valueRange.ptr(6580, 143, 143), new valueRange.ptr(6526, 170, 170), new valueRange.ptr(6529, 171, 171), new valueRange.ptr(6532, 172, 172), new valueRange.ptr(0, 1, 0), new valueRange.ptr(6466, 144, 144), new valueRange.ptr(40, 9, 0), new valueRange.ptr(10351, 128, 128), new valueRange.ptr(10291, 129, 129), new valueRange.ptr(10301, 130, 130), new valueRange.ptr(10321, 131, 132), new valueRange.ptr(10331, 133, 134), new valueRange.ptr(10311, 135, 135), new valueRange.ptr(10341, 136, 136), new valueRange.ptr(2930, 144, 144), new valueRange.ptr(2282, 145, 145), new valueRange.ptr(2, 1, 0), new valueRange.ptr(33, 176, 185)]); - nfkcSparse = new sparseBlocks.ptr(new sliceType$2(nfkcSparseValues), nfkcSparseOffset); - formTable = new sliceType$3([new formInfo.ptr(0, true, false, lookupInfoNFC, nextComposed), new formInfo.ptr(1, false, false, lookupInfoNFC, nextDecomposed), new formInfo.ptr(2, true, true, lookupInfoNFKC, nextComposed), new formInfo.ptr(3, false, true, lookupInfoNFKC, nextDecomposed)]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/net/idna"] = (function() { - var $pkg = {}, $init, fmt, math, strings, utf8, bidirule, bidi, norm, info, category, valueRange, sparseBlocks, idnaTrie, options, Profile, labelError, runeError, labelIter, joinState, sliceType, sliceType$1, ptrType, arrayType, sliceType$2, sliceType$3, sliceType$4, sliceType$5, sliceType$6, ptrType$1, ptrType$3, funcType, funcType$1, funcType$2, ptrType$4, idnaSparse, trie, mappings, xorData, idnaValues, idnaIndex, idnaSparseOffset, idnaSparseValues, punycode, lookup, joinStates, punyError, decode, encode, madd, decodeDigit, encodeDigit, adapt, ToASCII, validateAndMap, validateFromPunycode, ascii; - fmt = $packages["fmt"]; - math = $packages["math"]; - strings = $packages["strings"]; - utf8 = $packages["unicode/utf8"]; - bidirule = $packages["vendor/golang.org/x/text/secure/bidirule"]; - bidi = $packages["vendor/golang.org/x/text/unicode/bidi"]; - norm = $packages["vendor/golang.org/x/text/unicode/norm"]; - info = $pkg.info = $newType(2, $kindUint16, "idna.info", true, "vendor/golang.org/x/net/idna", false, null); - category = $pkg.category = $newType(2, $kindUint16, "idna.category", true, "vendor/golang.org/x/net/idna", false, null); - valueRange = $pkg.valueRange = $newType(0, $kindStruct, "idna.valueRange", true, "vendor/golang.org/x/net/idna", false, function(value_, lo_, hi_) { - this.$val = this; - if (arguments.length === 0) { - this.value = 0; - this.lo = 0; - this.hi = 0; - return; - } - this.value = value_; - this.lo = lo_; - this.hi = hi_; - }); - sparseBlocks = $pkg.sparseBlocks = $newType(0, $kindStruct, "idna.sparseBlocks", true, "vendor/golang.org/x/net/idna", false, function(values_, offset_) { - this.$val = this; - if (arguments.length === 0) { - this.values = sliceType$1.nil; - this.offset = sliceType.nil; - return; - } - this.values = values_; - this.offset = offset_; - }); - idnaTrie = $pkg.idnaTrie = $newType(0, $kindStruct, "idna.idnaTrie", true, "vendor/golang.org/x/net/idna", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - options = $pkg.options = $newType(0, $kindStruct, "idna.options", true, "vendor/golang.org/x/net/idna", false, function(transitional_, useSTD3Rules_, checkHyphens_, checkJoiners_, verifyDNSLength_, removeLeadingDots_, trie_, fromPuny_, mapping_, bidirule_) { - this.$val = this; - if (arguments.length === 0) { - this.transitional = false; - this.useSTD3Rules = false; - this.checkHyphens = false; - this.checkJoiners = false; - this.verifyDNSLength = false; - this.removeLeadingDots = false; - this.trie = ptrType.nil; - this.fromPuny = $throwNilPointerError; - this.mapping = $throwNilPointerError; - this.bidirule = $throwNilPointerError; - return; - } - this.transitional = transitional_; - this.useSTD3Rules = useSTD3Rules_; - this.checkHyphens = checkHyphens_; - this.checkJoiners = checkJoiners_; - this.verifyDNSLength = verifyDNSLength_; - this.removeLeadingDots = removeLeadingDots_; - this.trie = trie_; - this.fromPuny = fromPuny_; - this.mapping = mapping_; - this.bidirule = bidirule_; - }); - Profile = $pkg.Profile = $newType(0, $kindStruct, "idna.Profile", true, "vendor/golang.org/x/net/idna", true, function(options_) { - this.$val = this; - if (arguments.length === 0) { - this.options = new options.ptr(false, false, false, false, false, false, ptrType.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - return; - } - this.options = options_; - }); - labelError = $pkg.labelError = $newType(0, $kindStruct, "idna.labelError", true, "vendor/golang.org/x/net/idna", false, function(label_, code__) { - this.$val = this; - if (arguments.length === 0) { - this.label = ""; - this.code_ = ""; - return; - } - this.label = label_; - this.code_ = code__; - }); - runeError = $pkg.runeError = $newType(4, $kindInt32, "idna.runeError", true, "vendor/golang.org/x/net/idna", false, null); - labelIter = $pkg.labelIter = $newType(0, $kindStruct, "idna.labelIter", true, "vendor/golang.org/x/net/idna", false, function(orig_, slice_, curStart_, curEnd_, i_) { - this.$val = this; - if (arguments.length === 0) { - this.orig = ""; - this.slice = sliceType$6.nil; - this.curStart = 0; - this.curEnd = 0; - this.i = 0; - return; - } - this.orig = orig_; - this.slice = slice_; - this.curStart = curStart_; - this.curEnd = curEnd_; - this.i = i_; - }); - joinState = $pkg.joinState = $newType(1, $kindInt8, "idna.joinState", true, "vendor/golang.org/x/net/idna", false, null); - sliceType = $sliceType($Uint16); - sliceType$1 = $sliceType(valueRange); - ptrType = $ptrType(idnaTrie); - arrayType = $arrayType(joinState, 8); - sliceType$2 = $sliceType(arrayType); - sliceType$3 = $sliceType($Int32); - sliceType$4 = $sliceType($Uint8); - sliceType$5 = $sliceType($emptyInterface); - sliceType$6 = $sliceType($String); - ptrType$1 = $ptrType(sparseBlocks); - ptrType$3 = $ptrType(Profile); - funcType = $funcType([ptrType$3, $String], [$error], false); - funcType$1 = $funcType([ptrType$3, $String], [$String, $Bool, $error], false); - funcType$2 = $funcType([$String], [$Bool], false); - ptrType$4 = $ptrType(labelIter); - info.prototype.isMapped = function() { - var c; - c = this.$val; - return !((((c & 3) >>> 0) === 0)); - }; - $ptrType(info).prototype.isMapped = function() { return new info(this.$get()).isMapped(); }; - info.prototype.category = function() { - var c, small; - c = this.$val; - small = (c & 3) >>> 0; - if (!((small === 0))) { - return ((small << 16 >>> 16)); - } - return ((((c & 248) >>> 0) << 16 >>> 16)); - }; - $ptrType(info).prototype.category = function() { return new info(this.$get()).category(); }; - info.prototype.joinType = function() { - var c; - c = this.$val; - if (new info(c).isMapped()) { - return 0; - } - return (((c >>> 8 << 16 >>> 16)) & 7) >>> 0; - }; - $ptrType(info).prototype.joinType = function() { return new info(this.$get()).joinType(); }; - info.prototype.isModifier = function() { - var c; - c = this.$val; - return ((c & 4099) >>> 0) === 4096; - }; - $ptrType(info).prototype.isModifier = function() { return new info(this.$get()).isModifier(); }; - info.prototype.isViramaModifier = function() { - var c; - c = this.$val; - return ((c & 6147) >>> 0) === 6144; - }; - $ptrType(info).prototype.isViramaModifier = function() { return new info(this.$get()).isViramaModifier(); }; - info.prototype.appendMapping = function(b, s) { - var _index, b, c, index, p, s, s$1; - c = this.$val; - index = (((c >>> 3 << 16 >>> 16) >> 0)); - if (((c & 4) >>> 0) === 0) { - s$1 = $substring(mappings, index); - return $appendSlice(b, $substring(s$1, 1, (s$1.charCodeAt(0) + 1 << 24 >>> 24))); - } - b = $appendSlice(b, s); - if (((c & 57344) >>> 0) === 57344) { - _index = b.$length - 1 >> 0; - ((_index < 0 || _index >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + _index] = ((((_index < 0 || _index >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + _index]) ^ (((index << 24 >>> 24)))) << 24 >>> 24)); - } else { - p = b.$length - ((xorData.charCodeAt(index) >> 0)) >> 0; - while (true) { - if (!(p < b.$length)) { break; } - index = index + (1) >> 0; - ((p < 0 || p >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + p] = ((((p < 0 || p >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + p]) ^ (xorData.charCodeAt(index))) << 24 >>> 24)); - p = p + (1) >> 0; - } - } - return b; - }; - $ptrType(info).prototype.appendMapping = function(b, s) { return new info(this.$get()).appendMapping(b, s); }; - sparseBlocks.ptr.prototype.lookup = function(n, b) { - var _q, b, header, hi, lo, m, n, offset, r, t, x, x$1, x$2; - t = this; - offset = (x = t.offset, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])); - header = $clone((x$1 = t.values, ((offset < 0 || offset >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + offset])), valueRange); - lo = offset + 1 << 16 >>> 16; - hi = lo + ((header.lo << 16 >>> 16)) << 16 >>> 16; - while (true) { - if (!(lo < hi)) { break; } - m = lo + (_q = ((hi - lo << 16 >>> 16)) / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >>> 0 : $throwRuntimeError("integer divide by zero")) << 16 >>> 16; - r = $clone((x$2 = t.values, ((m < 0 || m >= x$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + m])), valueRange); - if (r.lo <= b && b <= r.hi) { - return r.value + ((((b - r.lo << 24 >>> 24) << 16 >>> 16)) * header.value << 16 >>> 16) << 16 >>> 16; - } - if (b < r.lo) { - hi = m; - } else { - lo = m + 1 << 16 >>> 16; - } - } - return 0; - }; - sparseBlocks.prototype.lookup = function(n, b) { return this.$val.lookup(n, b); }; - idnaTrie.ptr.prototype.lookup = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; - v = 0; - sz = 0; - t = this; - c0 = (0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]); - if (c0 < 128) { - _tmp = ((c0 < 0 || c0 >= idnaValues.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaValues[c0]); - _tmp$1 = 1; - v = _tmp; - sz = _tmp$1; - return [v, sz]; - } else if (c0 < 194) { - _tmp$2 = 0; - _tmp$3 = 1; - v = _tmp$2; - sz = _tmp$3; - return [v, sz]; - } else if (c0 < 224) { - if (s.$length < 2) { - _tmp$4 = 0; - _tmp$5 = 0; - v = _tmp$4; - sz = _tmp$5; - return [v, sz]; - } - i = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); - c1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = 0; - _tmp$7 = 1; - v = _tmp$6; - sz = _tmp$7; - return [v, sz]; - } - _tmp$8 = t.lookupValue(((i >>> 0)), c1); - _tmp$9 = 2; - v = _tmp$8; - sz = _tmp$9; - return [v, sz]; - } else if (c0 < 240) { - if (s.$length < 3) { - _tmp$10 = 0; - _tmp$11 = 0; - v = _tmp$10; - sz = _tmp$11; - return [v, sz]; - } - i$1 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); - c1$1 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = 0; - _tmp$13 = 1; - v = _tmp$12; - sz = _tmp$13; - return [v, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o]); - c2 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = 0; - _tmp$15 = 2; - v = _tmp$14; - sz = _tmp$15; - return [v, sz]; - } - _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); - _tmp$17 = 3; - v = _tmp$16; - sz = _tmp$17; - return [v, sz]; - } else if (c0 < 248) { - if (s.$length < 4) { - _tmp$18 = 0; - _tmp$19 = 0; - v = _tmp$18; - sz = _tmp$19; - return [v, sz]; - } - i$2 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); - c1$2 = (1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = 0; - _tmp$21 = 1; - v = _tmp$20; - sz = _tmp$21; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); - c2$1 = (2 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 2]); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = 0; - _tmp$23 = 2; - v = _tmp$22; - sz = _tmp$23; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); - c3 = (3 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 3]); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = 0; - _tmp$25 = 3; - v = _tmp$24; - sz = _tmp$25; - return [v, sz]; - } - _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); - _tmp$27 = 4; - v = _tmp$26; - sz = _tmp$27; - return [v, sz]; - } - _tmp$28 = 0; - _tmp$29 = 1; - v = _tmp$28; - sz = _tmp$29; - return [v, sz]; - }; - idnaTrie.prototype.lookup = function(s) { return this.$val.lookup(s); }; - idnaTrie.ptr.prototype.lookupString = function(s) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, c0, c1, c1$1, c1$2, c2, c2$1, c3, i, i$1, i$2, o, o$1, s, sz, t, v; - v = 0; - sz = 0; - t = this; - c0 = s.charCodeAt(0); - if (c0 < 128) { - _tmp = ((c0 < 0 || c0 >= idnaValues.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaValues[c0]); - _tmp$1 = 1; - v = _tmp; - sz = _tmp$1; - return [v, sz]; - } else if (c0 < 194) { - _tmp$2 = 0; - _tmp$3 = 1; - v = _tmp$2; - sz = _tmp$3; - return [v, sz]; - } else if (c0 < 224) { - if (s.length < 2) { - _tmp$4 = 0; - _tmp$5 = 0; - v = _tmp$4; - sz = _tmp$5; - return [v, sz]; - } - i = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); - c1 = s.charCodeAt(1); - if (c1 < 128 || 192 <= c1) { - _tmp$6 = 0; - _tmp$7 = 1; - v = _tmp$6; - sz = _tmp$7; - return [v, sz]; - } - _tmp$8 = t.lookupValue(((i >>> 0)), c1); - _tmp$9 = 2; - v = _tmp$8; - sz = _tmp$9; - return [v, sz]; - } else if (c0 < 240) { - if (s.length < 3) { - _tmp$10 = 0; - _tmp$11 = 0; - v = _tmp$10; - sz = _tmp$11; - return [v, sz]; - } - i$1 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); - c1$1 = s.charCodeAt(1); - if (c1$1 < 128 || 192 <= c1$1) { - _tmp$12 = 0; - _tmp$13 = 1; - v = _tmp$12; - sz = _tmp$13; - return [v, sz]; - } - o = (((i$1 >>> 0)) << 6 >>> 0) + ((c1$1 >>> 0)) >>> 0; - i$1 = ((o < 0 || o >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o]); - c2 = s.charCodeAt(2); - if (c2 < 128 || 192 <= c2) { - _tmp$14 = 0; - _tmp$15 = 2; - v = _tmp$14; - sz = _tmp$15; - return [v, sz]; - } - _tmp$16 = t.lookupValue(((i$1 >>> 0)), c2); - _tmp$17 = 3; - v = _tmp$16; - sz = _tmp$17; - return [v, sz]; - } else if (c0 < 248) { - if (s.length < 4) { - _tmp$18 = 0; - _tmp$19 = 0; - v = _tmp$18; - sz = _tmp$19; - return [v, sz]; - } - i$2 = ((c0 < 0 || c0 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[c0]); - c1$2 = s.charCodeAt(1); - if (c1$2 < 128 || 192 <= c1$2) { - _tmp$20 = 0; - _tmp$21 = 1; - v = _tmp$20; - sz = _tmp$21; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c1$2 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); - c2$1 = s.charCodeAt(2); - if (c2$1 < 128 || 192 <= c2$1) { - _tmp$22 = 0; - _tmp$23 = 2; - v = _tmp$22; - sz = _tmp$23; - return [v, sz]; - } - o$1 = (((i$2 >>> 0)) << 6 >>> 0) + ((c2$1 >>> 0)) >>> 0; - i$2 = ((o$1 < 0 || o$1 >= idnaIndex.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaIndex[o$1]); - c3 = s.charCodeAt(3); - if (c3 < 128 || 192 <= c3) { - _tmp$24 = 0; - _tmp$25 = 3; - v = _tmp$24; - sz = _tmp$25; - return [v, sz]; - } - _tmp$26 = t.lookupValue(((i$2 >>> 0)), c3); - _tmp$27 = 4; - v = _tmp$26; - sz = _tmp$27; - return [v, sz]; - } - _tmp$28 = 0; - _tmp$29 = 1; - v = _tmp$28; - sz = _tmp$29; - return [v, sz]; - }; - idnaTrie.prototype.lookupString = function(s) { return this.$val.lookupString(s); }; - idnaTrie.ptr.prototype.lookupValue = function(n, b) { - var b, n, t, x; - t = this; - if (n < 126) { - return ((x = (n << 6 >>> 0) + ((b >>> 0)) >>> 0, ((x < 0 || x >= idnaValues.length) ? ($throwRuntimeError("index out of range"), undefined) : idnaValues[x]))); - } else { - n = n - (126) >>> 0; - return (idnaSparse.lookup(n, b)); - } - }; - idnaTrie.prototype.lookupValue = function(n, b) { return this.$val.lookupValue(n, b); }; - punyError = function(s) { - var s; - return new labelError.ptr(s, "A3"); - }; - decode = function(encoded) { - var _i, _q, _r, _ref, _rune, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, _tuple$1, _tuple$2, bias, digit, encoded, i, k, n, ok, oldI, output, overflow, pos, r, t, w, x; - if (encoded === "") { - return ["", $ifaceNil]; - } - pos = 1 + strings.LastIndex(encoded, "-") >> 0; - if (pos === 1) { - return ["", punyError(encoded)]; - } - if (pos === encoded.length) { - return [$substring(encoded, 0, (encoded.length - 1 >> 0)), $ifaceNil]; - } - output = $makeSlice(sliceType$3, 0, encoded.length); - if (!((pos === 0))) { - _ref = $substring(encoded, 0, (pos - 1 >> 0)); - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - output = $append(output, r); - _i += _rune[1]; - } - } - _tmp = 0; - _tmp$1 = 128; - _tmp$2 = 72; - i = _tmp; - n = _tmp$1; - bias = _tmp$2; - overflow = false; - while (true) { - if (!(pos < encoded.length)) { break; } - _tmp$3 = i; - _tmp$4 = 1; - oldI = _tmp$3; - w = _tmp$4; - k = 36; - while (true) { - if (pos === encoded.length) { - return ["", punyError(encoded)]; - } - _tuple = decodeDigit(encoded.charCodeAt(pos)); - digit = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return ["", punyError(encoded)]; - } - pos = pos + (1) >> 0; - _tuple$1 = madd(i, digit, w); - i = _tuple$1[0]; - overflow = _tuple$1[1]; - if (overflow) { - return ["", punyError(encoded)]; - } - t = k - bias >> 0; - if (k <= bias) { - t = 1; - } else if (k >= (bias + 26 >> 0)) { - t = 26; - } - if (digit < t) { - break; - } - _tuple$2 = madd(0, w, 36 - t >> 0); - w = _tuple$2[0]; - overflow = _tuple$2[1]; - if (overflow) { - return ["", punyError(encoded)]; - } - k = k + (36) >> 0; - } - if (output.$length >= 1024) { - return ["", punyError(encoded)]; - } - x = (((output.$length + 1 >> 0) >> 0)); - bias = adapt(i - oldI >> 0, x, oldI === 0); - n = n + ((_q = i / x, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0; - i = (_r = i % (x), _r === _r ? _r : $throwRuntimeError("integer divide by zero")); - if (n < 0 || n > 1114111) { - return ["", punyError(encoded)]; - } - output = $append(output, 0); - $copySlice($subslice(output, (i + 1 >> 0)), $subslice(output, i)); - ((i < 0 || i >= output.$length) ? ($throwRuntimeError("index out of range"), undefined) : output.$array[output.$offset + i] = n); - i = i + (1) >> 0; - } - return [($runesToString(output)), $ifaceNil]; - }; - encode = function(prefix, s) { - var _i, _i$1, _i$2, _q, _r, _ref, _ref$1, _ref$2, _rune, _rune$1, _rune$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tuple, b, bias, delta, h, k, m, n, output, overflow, prefix, q, r, r$1, r$2, remaining, s, t; - output = $makeSlice(sliceType$4, prefix.length, ((prefix.length + 1 >> 0) + ($imul(2, s.length)) >> 0)); - $copyString(output, prefix); - _tmp = 0; - _tmp$1 = 128; - _tmp$2 = 72; - delta = _tmp; - n = _tmp$1; - bias = _tmp$2; - _tmp$3 = 0; - _tmp$4 = 0; - b = _tmp$3; - remaining = _tmp$4; - _ref = s; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - if (r < 128) { - b = b + (1) >> 0; - output = $append(output, ((r << 24 >>> 24))); - } else { - remaining = remaining + (1) >> 0; - } - _i += _rune[1]; - } - h = b; - if (b > 0) { - output = $append(output, 45); - } - overflow = false; - while (true) { - if (!(!((remaining === 0)))) { break; } - m = 2147483647; - _ref$1 = s; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.length)) { break; } - _rune$1 = $decodeRune(_ref$1, _i$1); - r$1 = _rune$1[0]; - if (m > r$1 && r$1 >= n) { - m = r$1; - } - _i$1 += _rune$1[1]; - } - _tuple = madd(delta, m - n >> 0, h + 1 >> 0); - delta = _tuple[0]; - overflow = _tuple[1]; - if (overflow) { - return ["", punyError(s)]; - } - n = m; - _ref$2 = s; - _i$2 = 0; - while (true) { - if (!(_i$2 < _ref$2.length)) { break; } - _rune$2 = $decodeRune(_ref$2, _i$2); - r$2 = _rune$2[0]; - if (r$2 < n) { - delta = delta + (1) >> 0; - if (delta < 0) { - return ["", punyError(s)]; - } - _i$2 += _rune$2[1]; - continue; - } - if (r$2 > n) { - _i$2 += _rune$2[1]; - continue; - } - q = delta; - k = 36; - while (true) { - t = k - bias >> 0; - if (k <= bias) { - t = 1; - } else if (k >= (bias + 26 >> 0)) { - t = 26; - } - if (q < t) { - break; - } - output = $append(output, encodeDigit(t + (_r = ((q - t >> 0)) % ((36 - t >> 0)), _r === _r ? _r : $throwRuntimeError("integer divide by zero")) >> 0)); - q = (_q = ((q - t >> 0)) / ((36 - t >> 0)), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - k = k + (36) >> 0; - } - output = $append(output, encodeDigit(q)); - bias = adapt(delta, h + 1 >> 0, h === b); - delta = 0; - h = h + (1) >> 0; - remaining = remaining - (1) >> 0; - _i$2 += _rune$2[1]; - } - delta = delta + (1) >> 0; - n = n + (1) >> 0; - } - return [($bytesToString(output)), $ifaceNil]; - }; - madd = function(a, b, c) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, a, b, c, next, overflow, p, x, x$1; - next = 0; - overflow = false; - p = $mul64((new $Int64(0, b)), (new $Int64(0, c))); - if ((x = (x$1 = (new $Int64(0, a)), new $Int64(0 - x$1.$high, 2147483647 - x$1.$low)), (p.$high > x.$high || (p.$high === x.$high && p.$low > x.$low)))) { - _tmp = 0; - _tmp$1 = true; - next = _tmp; - overflow = _tmp$1; - return [next, overflow]; - } - _tmp$2 = a + (((p.$low + ((p.$high >> 31) * 4294967296)) >> 0)) >> 0; - _tmp$3 = false; - next = _tmp$2; - overflow = _tmp$3; - return [next, overflow]; - }; - decodeDigit = function(x) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, digit, ok, x; - digit = 0; - ok = false; - if (48 <= x && x <= 57) { - _tmp = (((x - 22 << 24 >>> 24) >> 0)); - _tmp$1 = true; - digit = _tmp; - ok = _tmp$1; - return [digit, ok]; - } else if (65 <= x && x <= 90) { - _tmp$2 = (((x - 65 << 24 >>> 24) >> 0)); - _tmp$3 = true; - digit = _tmp$2; - ok = _tmp$3; - return [digit, ok]; - } else if (97 <= x && x <= 122) { - _tmp$4 = (((x - 97 << 24 >>> 24) >> 0)); - _tmp$5 = true; - digit = _tmp$4; - ok = _tmp$5; - return [digit, ok]; - } - _tmp$6 = 0; - _tmp$7 = false; - digit = _tmp$6; - ok = _tmp$7; - return [digit, ok]; - }; - encodeDigit = function(digit) { - var digit; - if (0 <= digit && digit < 26) { - return (((digit + 97 >> 0) << 24 >>> 24)); - } else if (26 <= digit && digit < 36) { - return (((digit + 22 >> 0) << 24 >>> 24)); - } - $panic(new $String("idna: internal error in punycode encoding")); - }; - adapt = function(delta, numPoints, firstTime) { - var _q, _q$1, _q$2, _q$3, _q$4, delta, firstTime, k, numPoints; - if (firstTime) { - delta = (_q = delta / (700), (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - } else { - delta = (_q$1 = delta / (2), (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")); - } - delta = delta + ((_q$2 = delta / numPoints, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) >> 0; - k = 0; - while (true) { - if (!(delta > 455)) { break; } - delta = (_q$3 = delta / (35), (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero")); - k = k + (36) >> 0; - } - return k + (_q$4 = ($imul(36, delta)) / ((delta + 38 >> 0)), (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0; - }; - ToASCII = function(s) { - var {$24r, _r, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $pkg.Punycode.process(s, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: ToASCII, $c: true, $r, $24r, _r, s, $s};return $f; - }; - $pkg.ToASCII = ToASCII; - Profile.ptr.prototype.ToASCII = function(s) { - var {$24r, _r, p, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r = p.process(s, true); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Profile.ptr.prototype.ToASCII, $c: true, $r, $24r, _r, p, s, $s};return $f; - }; - Profile.prototype.ToASCII = function(s) { return this.$val.ToASCII(s); }; - Profile.ptr.prototype.ToUnicode = function(s) { - var {$24r, _r, p, pp, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - pp = $clone(p, Profile); - pp.options.transitional = false; - _r = pp.process(s, false); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Profile.ptr.prototype.ToUnicode, $c: true, $r, $24r, _r, p, pp, s, $s};return $f; - }; - Profile.prototype.ToUnicode = function(s) { return this.$val.ToUnicode(s); }; - Profile.ptr.prototype.String = function() { - var p, s; - p = this; - s = ""; - if (p.options.transitional) { - s = "Transitional"; - } else { - s = "NonTransitional"; - } - if (p.options.useSTD3Rules) { - s = s + (":UseSTD3Rules"); - } - if (p.options.checkHyphens) { - s = s + (":CheckHyphens"); - } - if (p.options.checkJoiners) { - s = s + (":CheckJoiners"); - } - if (p.options.verifyDNSLength) { - s = s + (":VerifyDNSLength"); - } - return s; - }; - Profile.prototype.String = function() { return this.$val.String(); }; - labelError.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = fmt.Sprintf("idna: invalid label %q", new sliceType$5([new $String(e.label)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: labelError.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - labelError.prototype.Error = function() { return this.$val.Error(); }; - runeError.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r = fmt.Sprintf("idna: disallowed rune %U", new sliceType$5([new runeError(e)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: runeError.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - $ptrType(runeError).prototype.Error = function() { return new runeError(this.$get()).Error(); }; - Profile.ptr.prototype.process = function(s, toASCII) { - var {_r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, a, err, err2, err2$1, isBidi, label, label$1, labels, n, n$1, p, s, toASCII, u, $s, $r, $c} = $restore(this, {s, toASCII}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - err = $ifaceNil; - isBidi = false; - /* */ if (!(p.options.mapping === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(p.options.mapping === $throwNilPointerError)) { */ case 1: - _r = p.options.mapping(p, s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - s = _tuple[0]; - isBidi = _tuple[1]; - err = _tuple[2]; - /* } */ case 2: - if (p.options.removeLeadingDots) { - while (true) { - if (!(s.length > 0 && (s.charCodeAt(0) === 46))) { break; } - s = $substring(s, 1); - } - } - if ($interfaceIsEqual(err, $ifaceNil) && p.options.verifyDNSLength && s === "") { - err = new labelError.ptr(s, "A4"); - } - labels = new labelIter.ptr(s, sliceType$6.nil, 0, 0, 0); - /* while (true) { */ case 4: - /* if (!(!labels.done())) { break; } */ if(!(!labels.done())) { $s = 5; continue; } - label = labels.label(); - if (label === "") { - if ($interfaceIsEqual(err, $ifaceNil) && p.options.verifyDNSLength) { - err = new labelError.ptr(s, "A4"); - } - labels.next(); - /* continue; */ $s = 4; continue; - } - /* */ if (strings.HasPrefix(label, "xn--")) { $s = 6; continue; } - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (strings.HasPrefix(label, "xn--")) { */ case 6: - _tuple$1 = decode($substring(label, 4)); - u = _tuple$1[0]; - err2 = _tuple$1[1]; - if (!($interfaceIsEqual(err2, $ifaceNil))) { - if ($interfaceIsEqual(err, $ifaceNil)) { - err = err2; - } - labels.next(); - /* continue; */ $s = 4; continue; - } - isBidi = isBidi || !((bidirule.DirectionString(u) === 0)); - labels.set(u); - /* */ if ($interfaceIsEqual(err, $ifaceNil) && !(p.options.fromPuny === $throwNilPointerError)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(err, $ifaceNil) && !(p.options.fromPuny === $throwNilPointerError)) { */ case 9: - _r$1 = p.options.fromPuny(p, u); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* } */ case 10: - if ($interfaceIsEqual(err, $ifaceNil)) { - err = p.validateLabel(u); - } - $s = 8; continue; - /* } else if ($interfaceIsEqual(err, $ifaceNil)) { */ case 7: - err = p.validateLabel(label); - /* } */ case 8: - labels.next(); - $s = 4; continue; - case 5: - /* */ if (isBidi && !(p.options.bidirule === $throwNilPointerError) && $interfaceIsEqual(err, $ifaceNil)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (isBidi && !(p.options.bidirule === $throwNilPointerError) && $interfaceIsEqual(err, $ifaceNil)) { */ case 12: - labels.reset(); - /* while (true) { */ case 14: - /* if (!(!labels.done())) { break; } */ if(!(!labels.done())) { $s = 15; continue; } - _r$2 = p.options.bidirule(labels.label()); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!_r$2) { */ case 16: - err = new labelError.ptr(s, "B"); - /* break; */ $s = 15; continue; - /* } */ case 17: - labels.next(); - $s = 14; continue; - case 15: - /* } */ case 13: - if (toASCII) { - labels.reset(); - while (true) { - if (!(!labels.done())) { break; } - label$1 = labels.label(); - if (!ascii(label$1)) { - _tuple$2 = encode("xn--", label$1); - a = _tuple$2[0]; - err2$1 = _tuple$2[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - err = err2$1; - } - label$1 = a; - labels.set(a); - } - n = label$1.length; - if (p.options.verifyDNSLength && $interfaceIsEqual(err, $ifaceNil) && ((n === 0) || n > 63)) { - err = new labelError.ptr(label$1, "A4"); - } - labels.next(); - } - } - s = labels.result(); - if (toASCII && p.options.verifyDNSLength && $interfaceIsEqual(err, $ifaceNil)) { - n$1 = s.length; - if (n$1 > 0 && (s.charCodeAt((n$1 - 1 >> 0)) === 46)) { - n$1 = n$1 - (1) >> 0; - } - if (s.length < 1 || n$1 > 253) { - err = new labelError.ptr(s, "A4"); - } - } - $s = -1; return [s, err]; - /* */ } return; } var $f = {$blk: Profile.ptr.prototype.process, $c: true, $r, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, a, err, err2, err2$1, isBidi, label, label$1, labels, n, n$1, p, s, toASCII, u, $s};return $f; - }; - Profile.prototype.process = function(s, toASCII) { return this.$val.process(s, toASCII); }; - info.prototype.isBidi = function(s) { - var _1, _tuple, c, p, s; - c = this.$val; - if (!new info(c).isMapped()) { - return ((c & 6144) >>> 0) === 2048; - } - _tuple = bidi.LookupString(s); - p = $clone(_tuple[0], bidi.Properties); - _1 = $clone(p, bidi.Properties).Class(); - if ((_1 === (1)) || (_1 === (13)) || (_1 === (5))) { - return true; - } - return false; - }; - $ptrType(info).prototype.isBidi = function(s) { return new info(this.$get()).isBidi(s); }; - validateAndMap = function(p, s) { - var {_1, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, b, bidi$1, combinedInfoBits, err, i, k, p, r, s, start, sz, v, vm, $s, $r, $c} = $restore(this, {p, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vm = ""; - bidi$1 = false; - err = $ifaceNil; - b = sliceType$4.nil; - k = 0; - combinedInfoBits = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _tuple = trie.lookupString($substring(s, i)); - v = _tuple[0]; - sz = _tuple[1]; - if (sz === 0) { - b = $appendSlice(b, $substring(s, k, i)); - b = $appendSlice(b, "\xEF\xBF\xBD"); - k = s.length; - if ($interfaceIsEqual(err, $ifaceNil)) { - err = new runeError(65533); - } - break; - } - combinedInfoBits = (combinedInfoBits | (((v << 16 >>> 16)))) >>> 0; - bidi$1 = bidi$1 || new info(((v << 16 >>> 16))).isBidi($substring(s, i)); - start = i; - i = i + (sz) >> 0; - _1 = p.simplify(new info(((v << 16 >>> 16))).category()); - if (_1 === (8)) { - continue; - } else if (_1 === (64)) { - if ($interfaceIsEqual(err, $ifaceNil)) { - _tuple$1 = utf8.DecodeRuneInString($substring(s, start)); - r = _tuple$1[0]; - err = new runeError(((r >> 0))); - } - continue; - } else if ((_1 === (1)) || (_1 === (3))) { - b = $appendSlice(b, $substring(s, k, start)); - b = new info(((v << 16 >>> 16))).appendMapping(b, $substring(s, start, i)); - } else if (_1 === (192)) { - b = $appendSlice(b, $substring(s, k, start)); - } else if (_1 === (0)) { - b = $appendSlice(b, $substring(s, k, start)); - b = $appendSlice(b, "\xEF\xBF\xBD"); - } - k = i; - } - /* */ if (k === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (k === 0) { */ case 1: - /* */ if (!((((combinedInfoBits & 8192) >>> 0) === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((((combinedInfoBits & 8192) >>> 0) === 0))) { */ case 4: - _r = new norm.Form(0).String(s); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - s = _r; - /* } */ case 5: - $s = 3; continue; - /* } else { */ case 2: - b = $appendSlice(b, $substring(s, k)); - _r$1 = new norm.Form(0).QuickSpan(b); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!((_r$1 === b.$length))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((_r$1 === b.$length))) { */ case 7: - _r$2 = new norm.Form(0).Bytes(b); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - b = _r$2; - /* } */ case 8: - s = ($bytesToString(b)); - /* } */ case 3: - _tmp = s; - _tmp$1 = bidi$1; - _tmp$2 = err; - vm = _tmp; - bidi$1 = _tmp$1; - err = _tmp$2; - $s = -1; return [vm, bidi$1, err]; - /* */ } return; } var $f = {$blk: validateAndMap, $c: true, $r, _1, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tuple, _tuple$1, b, bidi$1, combinedInfoBits, err, i, k, p, r, s, start, sz, v, vm, $s};return $f; - }; - labelIter.ptr.prototype.reset = function() { - var l; - l = this; - l.curStart = 0; - l.curEnd = 0; - l.i = 0; - }; - labelIter.prototype.reset = function() { return this.$val.reset(); }; - labelIter.ptr.prototype.done = function() { - var l; - l = this; - return l.curStart >= l.orig.length; - }; - labelIter.prototype.done = function() { return this.$val.done(); }; - labelIter.ptr.prototype.result = function() { - var l; - l = this; - if (!(l.slice === sliceType$6.nil)) { - return strings.Join(l.slice, "."); - } - return l.orig; - }; - labelIter.prototype.result = function() { return this.$val.result(); }; - labelIter.ptr.prototype.label = function() { - var l, p, x, x$1; - l = this; - if (!(l.slice === sliceType$6.nil)) { - return (x = l.slice, x$1 = l.i, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])); - } - p = strings.IndexByte($substring(l.orig, l.curStart), 46); - l.curEnd = l.curStart + p >> 0; - if (p === -1) { - l.curEnd = l.orig.length; - } - return $substring(l.orig, l.curStart, l.curEnd); - }; - labelIter.prototype.label = function() { return this.$val.label(); }; - labelIter.ptr.prototype.next = function() { - var l, x, x$1; - l = this; - l.i = l.i + (1) >> 0; - if (!(l.slice === sliceType$6.nil)) { - if (l.i >= l.slice.$length || (l.i === (l.slice.$length - 1 >> 0)) && (x = l.slice, x$1 = l.i, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1])) === "") { - l.curStart = l.orig.length; - } - } else { - l.curStart = l.curEnd + 1 >> 0; - if ((l.curStart === (l.orig.length - 1 >> 0)) && (l.orig.charCodeAt(l.curStart) === 46)) { - l.curStart = l.orig.length; - } - } - }; - labelIter.prototype.next = function() { return this.$val.next(); }; - labelIter.ptr.prototype.set = function(s) { - var l, s, x, x$1; - l = this; - if (l.slice === sliceType$6.nil) { - l.slice = strings.Split(l.orig, "."); - } - (x = l.slice, x$1 = l.i, ((x$1 < 0 || x$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + x$1] = s)); - }; - labelIter.prototype.set = function(s) { return this.$val.set(s); }; - Profile.ptr.prototype.simplify = function(cat) { - var _1, cat, p; - p = this; - _1 = cat; - if (_1 === (2)) { - if (p.options.useSTD3Rules) { - cat = 64; - } else { - cat = 1; - } - } else if (_1 === (128)) { - if (p.options.useSTD3Rules) { - cat = 64; - } else { - cat = 8; - } - } else if (_1 === (3)) { - if (!p.options.transitional) { - cat = 8; - } - } else if ((_1 === (24)) || (_1 === (40))) { - cat = 8; - } - return cat; - }; - Profile.prototype.simplify = function(cat) { return this.$val.simplify(cat); }; - validateFromPunycode = function(p, s) { - var {_r, _tuple, c, i, p, s, sz, v, $s, $r, $c} = $restore(this, {p, s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = new norm.Form(0).IsNormalString(s); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - /* */ if (!_r) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r) { */ case 1: - $s = -1; return new labelError.ptr(s, "V1"); - /* } */ case 2: - i = 0; - while (true) { - if (!(i < s.length)) { break; } - _tuple = trie.lookupString($substring(s, i)); - v = _tuple[0]; - sz = _tuple[1]; - if (sz === 0) { - $s = -1; return new runeError(65533); - } - c = p.simplify(new info(((v << 16 >>> 16))).category()); - if (!((c === 8)) && !((c === 3))) { - $s = -1; return new labelError.ptr(s, "V6"); - } - i = i + (sz) >> 0; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: validateFromPunycode, $c: true, $r, _r, _tuple, c, i, p, s, sz, v, $s};return $f; - }; - Profile.ptr.prototype.validateLabel = function(s) { - var _tuple, _tuple$1, err, i, jt, p, s, st, sz, trie$1, v, x, x$1; - err = $ifaceNil; - p = this; - if (s === "") { - if (p.options.verifyDNSLength) { - err = new labelError.ptr(s, "A4"); - return err; - } - err = $ifaceNil; - return err; - } - if (p.options.checkHyphens) { - if (s.length > 4 && (s.charCodeAt(2) === 45) && (s.charCodeAt(3) === 45)) { - err = new labelError.ptr(s, "V2"); - return err; - } - if ((s.charCodeAt(0) === 45) || (s.charCodeAt((s.length - 1 >> 0)) === 45)) { - err = new labelError.ptr(s, "V3"); - return err; - } - } - if (!p.options.checkJoiners) { - err = $ifaceNil; - return err; - } - trie$1 = p.options.trie; - _tuple = trie$1.lookupString(s); - v = _tuple[0]; - sz = _tuple[1]; - x = ((v << 16 >>> 16)); - if (new info(x).isModifier()) { - err = new labelError.ptr(s, "V5"); - return err; - } - if ((strings.Index(s, "\xE2\x80\x8D") === -1) && (strings.Index(s, "\xE2\x80\x8C") === -1)) { - err = $ifaceNil; - return err; - } - st = 0; - i = 0; - while (true) { - jt = new info(x).joinType(); - if ($substring(s, i, (i + sz >> 0)) === "\xE2\x80\x8D") { - jt = 5; - } else if ($substring(s, i, (i + sz >> 0)) === "\xE2\x80\x8C") { - jt = 6; - } - st = (x$1 = ((st < 0 || st >= joinStates.$length) ? ($throwRuntimeError("index out of range"), undefined) : joinStates.$array[joinStates.$offset + st]), ((jt < 0 || jt >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[jt])); - if (new info(x).isViramaModifier()) { - st = ((st < 0 || st >= joinStates.$length) ? ($throwRuntimeError("index out of range"), undefined) : joinStates.$array[joinStates.$offset + st])[7]; - } - i = i + (sz) >> 0; - if (i === s.length) { - break; - } - _tuple$1 = trie$1.lookupString($substring(s, i)); - v = _tuple$1[0]; - sz = _tuple$1[1]; - x = ((v << 16 >>> 16)); - } - if ((st === 5) || (st === 4)) { - err = new labelError.ptr(s, "C"); - return err; - } - err = $ifaceNil; - return err; - }; - Profile.prototype.validateLabel = function(s) { return this.$val.validateLabel(s); }; - ascii = function(s) { - var i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) >= 128) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - info.methods = [{prop: "isMapped", name: "isMapped", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "category", name: "category", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [category], false)}, {prop: "joinType", name: "joinType", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [info], false)}, {prop: "isModifier", name: "isModifier", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "isViramaModifier", name: "isViramaModifier", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "appendMapping", name: "appendMapping", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([sliceType$4, $String], [sliceType$4], false)}, {prop: "isBidi", name: "isBidi", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$String], [$Bool], false)}]; - ptrType$1.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; - ptrType.methods = [{prop: "lookup", name: "lookup", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([sliceType$4], [$Uint16, $Int], false)}, {prop: "lookupUnsafe", name: "lookupUnsafe", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([sliceType$4], [$Uint16], false)}, {prop: "lookupString", name: "lookupString", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$String], [$Uint16, $Int], false)}, {prop: "lookupStringUnsafe", name: "lookupStringUnsafe", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$String], [$Uint16], false)}, {prop: "lookupValue", name: "lookupValue", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$Uint32, $Uint8], [$Uint16], false)}]; - ptrType$3.methods = [{prop: "ToASCII", name: "ToASCII", pkg: "", typ: $funcType([$String], [$String, $error], false)}, {prop: "ToUnicode", name: "ToUnicode", pkg: "", typ: $funcType([$String], [$String, $error], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "process", name: "process", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$String, $Bool], [$String, $error], false)}, {prop: "simplify", name: "simplify", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([category], [category], false)}, {prop: "validateLabel", name: "validateLabel", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$String], [$error], false)}]; - labelError.methods = [{prop: "code", name: "code", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - runeError.methods = [{prop: "code", name: "code", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$4.methods = [{prop: "reset", name: "reset", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [], false)}, {prop: "done", name: "done", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$Bool], false)}, {prop: "result", name: "result", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "label", name: "label", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [$String], false)}, {prop: "next", name: "next", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([], [], false)}, {prop: "set", name: "set", pkg: "vendor/golang.org/x/net/idna", typ: $funcType([$String], [], false)}]; - valueRange.init("vendor/golang.org/x/net/idna", [{prop: "value", name: "value", embedded: false, exported: false, typ: $Uint16, tag: ""}, {prop: "lo", name: "lo", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "hi", name: "hi", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - sparseBlocks.init("vendor/golang.org/x/net/idna", [{prop: "values", name: "values", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "offset", name: "offset", embedded: false, exported: false, typ: sliceType, tag: ""}]); - idnaTrie.init("", []); - options.init("vendor/golang.org/x/net/idna", [{prop: "transitional", name: "transitional", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "useSTD3Rules", name: "useSTD3Rules", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "checkHyphens", name: "checkHyphens", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "checkJoiners", name: "checkJoiners", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "verifyDNSLength", name: "verifyDNSLength", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "removeLeadingDots", name: "removeLeadingDots", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trie", name: "trie", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "fromPuny", name: "fromPuny", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "mapping", name: "mapping", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "bidirule", name: "bidirule", embedded: false, exported: false, typ: funcType$2, tag: ""}]); - Profile.init("vendor/golang.org/x/net/idna", [{prop: "options", name: "options", embedded: true, exported: false, typ: options, tag: ""}]); - labelError.init("vendor/golang.org/x/net/idna", [{prop: "label", name: "label", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "code_", name: "code_", embedded: false, exported: false, typ: $String, tag: ""}]); - labelIter.init("vendor/golang.org/x/net/idna", [{prop: "orig", name: "orig", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "slice", name: "slice", embedded: false, exported: false, typ: sliceType$6, tag: ""}, {prop: "curStart", name: "curStart", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "curEnd", name: "curEnd", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "i", name: "i", embedded: false, exported: false, typ: $Int, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = fmt.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bidirule.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bidi.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = norm.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - trie = new idnaTrie.ptr(); - mappings = "\x00\x01 \x03 \xCC\x88\x01a\x03 \xCC\x84\x012\x013\x03 \xCC\x81\x03 \xCC\xA7\x011\x01o\x051\xE2\x81\x844\x051\xE2\x81\x842\x053\xE2\x81\x844\x03i\xCC\x87\x03l\xC2\xB7\x03\xCA\xBCn\x01s\x03d\xC5\xBE\x03\xE2\xB1\xA5\x03\xE2\xB1\xA6\x01h\x01j\x01r\x01w\x01y\x03 \xCC\x86\x03 \xCC\x87\x03 \xCC\x8A\x03 \xCC\xA8\x03 \xCC\x83\x03 \xCC\x8B\x01l\x01x\x04\xCC\x88\xCC\x81\x03 \xCE\xB9\x01;\x05 \xCC\x88\xCC\x81\x04\xD5\xA5\xD6\x82\x04\xD8\xA7\xD9\xB4\x04\xD9\x88\xD9\xB4\x04\xDB\x87\xD9\xB4\x04\xD9\x8A\xD9\xB4\x06\xE0\xA4\x95\xE0\xA4\xBC\x06\xE0\xA4\x96\xE0\xA4\xBC\x06\xE0\xA4\x97\xE0\xA4\xBC\x06\xE0\xA4\x9C\xE0\xA4\xBC\x06\xE0\xA4\xA1\xE0\xA4\xBC\x06\xE0\xA4\xA2\xE0\xA4\xBC\x06\xE0\xA4\xAB\xE0\xA4\xBC\x06\xE0\xA4\xAF\xE0\xA4\xBC\x06\xE0\xA6\xA1\xE0\xA6\xBC\x06\xE0\xA6\xA2\xE0\xA6\xBC\x06\xE0\xA6\xAF\xE0\xA6\xBC\x06\xE0\xA8\xB2\xE0\xA8\xBC\x06\xE0\xA8\xB8\xE0\xA8\xBC\x06\xE0\xA8\x96\xE0\xA8\xBC\x06\xE0\xA8\x97\xE0\xA8\xBC\x06\xE0\xA8\x9C\xE0\xA8\xBC\x06\xE0\xA8\xAB\xE0\xA8\xBC\x06\xE0\xAC\xA1\xE0\xAC\xBC\x06\xE0\xAC\xA2\xE0\xAC\xBC\x06\xE0\xB9\x8D\xE0\xB8\xB2\x06\xE0\xBB\x8D\xE0\xBA\xB2\x06\xE0\xBA\xAB\xE0\xBA\x99\x06\xE0\xBA\xAB\xE0\xBA\xA1\x06\xE0\xBD\x82\xE0\xBE\xB7\x06\xE0\xBD\x8C\xE0\xBE\xB7\x06\xE0\xBD\x91\xE0\xBE\xB7\x06\xE0\xBD\x96\xE0\xBE\xB7\x06\xE0\xBD\x9B\xE0\xBE\xB7\x06\xE0\xBD\x80\xE0\xBE\xB5\x06\xE0\xBD\xB1\xE0\xBD\xB2\x06\xE0\xBD\xB1\xE0\xBD\xB4\x06\xE0\xBE\xB2\xE0\xBE\x80\t\xE0\xBE\xB2\xE0\xBD\xB1\xE0\xBE\x80\x06\xE0\xBE\xB3\xE0\xBE\x80\t\xE0\xBE\xB3\xE0\xBD\xB1\xE0\xBE\x80\x06\xE0\xBD\xB1\xE0\xBE\x80\x06\xE0\xBE\x92\xE0\xBE\xB7\x06\xE0\xBE\x9C\xE0\xBE\xB7\x06\xE0\xBE\xA1\xE0\xBE\xB7\x06\xE0\xBE\xA6\xE0\xBE\xB7\x06\xE0\xBE\xAB\xE0\xBE\xB7\x06\xE0\xBE\x90\xE0\xBE\xB5\x02\xD0\xB2\x02\xD0\xB4\x02\xD0\xBE\x02\xD1\x81\x02\xD1\x82\x02\xD1\x8A\x02\xD1\xA3\x02\xC3\xA6\x01b\x01d\x01e\x02\xC7\x9D\x01g\x01i\x01k\x01m\x01n\x02\xC8\xA3\x01p\x01t\x01u\x02\xC9\x90\x02\xC9\x91\x02\xC9\x99\x02\xC9\x9B\x02\xC9\x9C\x02\xC5\x8B\x02\xC9\x94\x02\xC9\xAF\x01v\x02\xCE\xB2\x02\xCE\xB3\x02\xCE\xB4\x02\xCF\x86\x02\xCF\x87\x02\xCF\x81\x02\xD0\xBD\x02\xC9\x92\x01c\x02\xC9\x95\x02\xC3\xB0\x01f\x02\xC9\x9F\x02\xC9\xA1\x02\xC9\xA5\x02\xC9\xA8\x02\xC9\xA9\x02\xC9\xAA\x02\xCA\x9D\x02\xC9\xAD\x02\xCA\x9F\x02\xC9\xB1\x02\xC9\xB0\x02\xC9\xB2\x02\xC9\xB3\x02\xC9\xB4\x02\xC9\xB5\x02\xC9\xB8\x02\xCA\x82\x02\xCA\x83\x02\xC6\xAB\x02\xCA\x89\x02\xCA\x8A\x02\xCA\x8B\x02\xCA\x8C\x01z\x02\xCA\x90\x02\xCA\x91\x02\xCA\x92\x02\xCE\xB8\x02ss\x02\xCE\xAC\x02\xCE\xAD\x02\xCE\xAE\x02\xCE\xAF\x02\xCF\x8C\x02\xCF\x8D\x02\xCF\x8E\x05\xE1\xBC\x80\xCE\xB9\x05\xE1\xBC\x81\xCE\xB9\x05\xE1\xBC\x82\xCE\xB9\x05\xE1\xBC\x83\xCE\xB9\x05\xE1\xBC\x84\xCE\xB9\x05\xE1\xBC\x85\xCE\xB9\x05\xE1\xBC\x86\xCE\xB9\x05\xE1\xBC\x87\xCE\xB9\x05\xE1\xBC\xA0\xCE\xB9\x05\xE1\xBC\xA1\xCE\xB9\x05\xE1\xBC\xA2\xCE\xB9\x05\xE1\xBC\xA3\xCE\xB9\x05\xE1\xBC\xA4\xCE\xB9\x05\xE1\xBC\xA5\xCE\xB9\x05\xE1\xBC\xA6\xCE\xB9\x05\xE1\xBC\xA7\xCE\xB9\x05\xE1\xBD\xA0\xCE\xB9\x05\xE1\xBD\xA1\xCE\xB9\x05\xE1\xBD\xA2\xCE\xB9\x05\xE1\xBD\xA3\xCE\xB9\x05\xE1\xBD\xA4\xCE\xB9\x05\xE1\xBD\xA5\xCE\xB9\x05\xE1\xBD\xA6\xCE\xB9\x05\xE1\xBD\xA7\xCE\xB9\x05\xE1\xBD\xB0\xCE\xB9\x04\xCE\xB1\xCE\xB9\x04\xCE\xAC\xCE\xB9\x05\xE1\xBE\xB6\xCE\xB9\x02\xCE\xB9\x05 \xCC\x88\xCD\x82\x05\xE1\xBD\xB4\xCE\xB9\x04\xCE\xB7\xCE\xB9\x04\xCE\xAE\xCE\xB9\x05\xE1\xBF\x86\xCE\xB9\x05 \xCC\x93\xCC\x80\x05 \xCC\x93\xCC\x81\x05 \xCC\x93\xCD\x82\x02\xCE\x90\x05 \xCC\x94\xCC\x80\x05 \xCC\x94\xCC\x81\x05 \xCC\x94\xCD\x82\x02\xCE\xB0\x05 \xCC\x88\xCC\x80\x01`\x05\xE1\xBD\xBC\xCE\xB9\x04\xCF\x89\xCE\xB9\x04\xCF\x8E\xCE\xB9\x05\xE1\xBF\xB6\xCE\xB9\x06\xE2\x80\xB2\xE2\x80\xB2\t\xE2\x80\xB2\xE2\x80\xB2\xE2\x80\xB2\x06\xE2\x80\xB5\xE2\x80\xB5\t\xE2\x80\xB5\xE2\x80\xB5\xE2\x80\xB5\x02!!\x02??\x02?!\x02!?\f\xE2\x80\xB2\xE2\x80\xB2\xE2\x80\xB2\xE2\x80\xB2\x010\x014\x015\x016\x017\x018\x019\x01+\x01=\x01(\x01)\x02rs\x02\xC4\xA7\x02no\x01q\x02sm\x02tm\x02\xCF\x89\x02\xC3\xA5\x02\xD7\x90\x02\xD7\x91\x02\xD7\x92\x02\xD7\x93\x02\xCF\x80\x051\xE2\x81\x847\x051\xE2\x81\x849\x061\xE2\x81\x8410\x051\xE2\x81\x843\x052\xE2\x81\x843\x051\xE2\x81\x845\x052\xE2\x81\x845\x053\xE2\x81\x845\x054\xE2\x81\x845\x051\xE2\x81\x846\x055\xE2\x81\x846\x051\xE2\x81\x848\x053\xE2\x81\x848\x055\xE2\x81\x848\x057\xE2\x81\x848\x041\xE2\x81\x84\x02ii\x02iv\x02vi\x04viii\x02ix\x02xi\x050\xE2\x81\x843\x06\xE2\x88\xAB\xE2\x88\xAB\t\xE2\x88\xAB\xE2\x88\xAB\xE2\x88\xAB\x06\xE2\x88\xAE\xE2\x88\xAE\t\xE2\x88\xAE\xE2\x88\xAE\xE2\x88\xAE\x0210\x0211\x0212\x0213\x0214\x0215\x0216\x0217\x0218\x0219\x0220\x04(10)\x04(11)\x04(12)\x04(13)\x04(14)\x04(15)\x04(16)\x04(17)\x04(18)\x04(19)\x04(20)\f\xE2\x88\xAB\xE2\x88\xAB\xE2\x88\xAB\xE2\x88\xAB\x02==\x05\xE2\xAB\x9D\xCC\xB8\x02\xC9\xAB\x02\xC9\xBD\x02\xC8\xBF\x02\xC9\x80\x01.\x04 \xE3\x82\x99\x04 \xE3\x82\x9A\x06\xE3\x82\x88\xE3\x82\x8A\x06\xE3\x82\xB3\xE3\x83\x88\x05(\xE1\x84\x80)\x05(\xE1\x84\x82)\x05(\xE1\x84\x83)\x05(\xE1\x84\x85)\x05(\xE1\x84\x86)\x05(\xE1\x84\x87)\x05(\xE1\x84\x89)\x05(\xE1\x84\x8B)\x05(\xE1\x84\x8C)\x05(\xE1\x84\x8E)\x05(\xE1\x84\x8F)\x05(\xE1\x84\x90)\x05(\xE1\x84\x91)\x05(\xE1\x84\x92)\x05(\xEA\xB0\x80)\x05(\xEB\x82\x98)\x05(\xEB\x8B\xA4)\x05(\xEB\x9D\xBC)\x05(\xEB\xA7\x88)\x05(\xEB\xB0\x94)\x05(\xEC\x82\xAC)\x05(\xEC\x95\x84)\x05(\xEC\x9E\x90)\x05(\xEC\xB0\xA8)\x05(\xEC\xB9\xB4)\x05(\xED\x83\x80)\x05(\xED\x8C\x8C)\x05(\xED\x95\x98)\x05(\xEC\xA3\xBC)\b(\xEC\x98\xA4\xEC\xA0\x84)\b(\xEC\x98\xA4\xED\x9B\x84)\x05(\xE4\xB8\x80)\x05(\xE4\xBA\x8C)\x05(\xE4\xB8\x89)\x05(\xE5\x9B\x9B)\x05(\xE4\xBA\x94)\x05(\xE5\x85\xAD)\x05(\xE4\xB8\x83)\x05(\xE5\x85\xAB)\x05(\xE4\xB9\x9D)\x05(\xE5\x8D\x81)\x05(\xE6\x9C\x88)\x05(\xE7\x81\xAB)\x05(\xE6\xB0\xB4)\x05(\xE6\x9C\xA8)\x05(\xE9\x87\x91)\x05(\xE5\x9C\x9F)\x05(\xE6\x97\xA5)\x05(\xE6\xA0\xAA)\x05(\xE6\x9C\x89)\x05(\xE7\xA4\xBE)\x05(\xE5\x90\x8D)\x05(\xE7\x89\xB9)\x05(\xE8\xB2\xA1)\x05(\xE7\xA5\x9D)\x05(\xE5\x8A\xB4)\x05(\xE4\xBB\xA3)\x05(\xE5\x91\xBC)\x05(\xE5\xAD\xA6)\x05(\xE7\x9B\xA3)\x05(\xE4\xBC\x81)\x05(\xE8\xB3\x87)\x05(\xE5\x8D\x94)\x05(\xE7\xA5\xAD)\x05(\xE4\xBC\x91)\x05(\xE8\x87\xAA)\x05(\xE8\x87\xB3)\x0221\x0222\x0223\x0224\x0225\x0226\x0227\x0228\x0229\x0230\x0231\x0232\x0233\x0234\x0235\x06\xEC\xB0\xB8\xEA\xB3\xA0\x06\xEC\xA3\xBC\xEC\x9D\x98\x0236\x0237\x0238\x0239\x0240\x0241\x0242\x0243\x0244\x0245\x0246\x0247\x0248\x0249\x0250\x041\xE6\x9C\x88\x042\xE6\x9C\x88\x043\xE6\x9C\x88\x044\xE6\x9C\x88\x045\xE6\x9C\x88\x046\xE6\x9C\x88\x047\xE6\x9C\x88\x048\xE6\x9C\x88\x049\xE6\x9C\x88\x0510\xE6\x9C\x88\x0511\xE6\x9C\x88\x0512\xE6\x9C\x88\x02hg\x02ev\x06\xE4\xBB\xA4\xE5\x92\x8C\f\xE3\x82\xA2\xE3\x83\x91\xE3\x83\xBC\xE3\x83\x88\f\xE3\x82\xA2\xE3\x83\xAB\xE3\x83\x95\xE3\x82\xA1\f\xE3\x82\xA2\xE3\x83\xB3\xE3\x83\x9A\xE3\x82\xA2\t\xE3\x82\xA2\xE3\x83\xBC\xE3\x83\xAB\f\xE3\x82\xA4\xE3\x83\x8B\xE3\x83\xB3\xE3\x82\xB0\t\xE3\x82\xA4\xE3\x83\xB3\xE3\x83\x81\t\xE3\x82\xA6\xE3\x82\xA9\xE3\x83\xB3\x0F\xE3\x82\xA8\xE3\x82\xB9\xE3\x82\xAF\xE3\x83\xBC\xE3\x83\x89\f\xE3\x82\xA8\xE3\x83\xBC\xE3\x82\xAB\xE3\x83\xBC\t\xE3\x82\xAA\xE3\x83\xB3\xE3\x82\xB9\t\xE3\x82\xAA\xE3\x83\xBC\xE3\x83\xA0\t\xE3\x82\xAB\xE3\x82\xA4\xE3\x83\xAA\f\xE3\x82\xAB\xE3\x83\xA9\xE3\x83\x83\xE3\x83\x88\f\xE3\x82\xAB\xE3\x83\xAD\xE3\x83\xAA\xE3\x83\xBC\t\xE3\x82\xAC\xE3\x83\xAD\xE3\x83\xB3\t\xE3\x82\xAC\xE3\x83\xB3\xE3\x83\x9E\x06\xE3\x82\xAE\xE3\x82\xAC\t\xE3\x82\xAE\xE3\x83\x8B\xE3\x83\xBC\f\xE3\x82\xAD\xE3\x83\xA5\xE3\x83\xAA\xE3\x83\xBC\f\xE3\x82\xAE\xE3\x83\xAB\xE3\x83\x80\xE3\x83\xBC\x06\xE3\x82\xAD\xE3\x83\xAD\x0F\xE3\x82\xAD\xE3\x83\xAD\xE3\x82\xB0\xE3\x83\xA9\xE3\x83\xA0\x12\xE3\x82\xAD\xE3\x83\xAD\xE3\x83\xA1\xE3\x83\xBC\xE3\x83\x88\xE3\x83\xAB\x0F\xE3\x82\xAD\xE3\x83\xAD\xE3\x83\xAF\xE3\x83\x83\xE3\x83\x88\t\xE3\x82\xB0\xE3\x83\xA9\xE3\x83\xA0\x0F\xE3\x82\xB0\xE3\x83\xA9\xE3\x83\xA0\xE3\x83\x88\xE3\x83\xB3\x0F\xE3\x82\xAF\xE3\x83\xAB\xE3\x82\xBC\xE3\x82\xA4\xE3\x83\xAD\f\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xBC\xE3\x83\x8D\t\xE3\x82\xB1\xE3\x83\xBC\xE3\x82\xB9\t\xE3\x82\xB3\xE3\x83\xAB\xE3\x83\x8A\t\xE3\x82\xB3\xE3\x83\xBC\xE3\x83\x9D\f\xE3\x82\xB5\xE3\x82\xA4\xE3\x82\xAF\xE3\x83\xAB\x0F\xE3\x82\xB5\xE3\x83\xB3\xE3\x83\x81\xE3\x83\xBC\xE3\x83\xA0\f\xE3\x82\xB7\xE3\x83\xAA\xE3\x83\xB3\xE3\x82\xB0\t\xE3\x82\xBB\xE3\x83\xB3\xE3\x83\x81\t\xE3\x82\xBB\xE3\x83\xB3\xE3\x83\x88\t\xE3\x83\x80\xE3\x83\xBC\xE3\x82\xB9\x06\xE3\x83\x87\xE3\x82\xB7\x06\xE3\x83\x89\xE3\x83\xAB\x06\xE3\x83\x88\xE3\x83\xB3\x06\xE3\x83\x8A\xE3\x83\x8E\t\xE3\x83\x8E\xE3\x83\x83\xE3\x83\x88\t\xE3\x83\x8F\xE3\x82\xA4\xE3\x83\x84\x0F\xE3\x83\x91\xE3\x83\xBC\xE3\x82\xBB\xE3\x83\xB3\xE3\x83\x88\t\xE3\x83\x91\xE3\x83\xBC\xE3\x83\x84\f\xE3\x83\x90\xE3\x83\xBC\xE3\x83\xAC\xE3\x83\xAB\x0F\xE3\x83\x94\xE3\x82\xA2\xE3\x82\xB9\xE3\x83\x88\xE3\x83\xAB\t\xE3\x83\x94\xE3\x82\xAF\xE3\x83\xAB\x06\xE3\x83\x94\xE3\x82\xB3\x06\xE3\x83\x93\xE3\x83\xAB\x0F\xE3\x83\x95\xE3\x82\xA1\xE3\x83\xA9\xE3\x83\x83\xE3\x83\x89\f\xE3\x83\x95\xE3\x82\xA3\xE3\x83\xBC\xE3\x83\x88\x0F\xE3\x83\x96\xE3\x83\x83\xE3\x82\xB7\xE3\x82\xA7\xE3\x83\xAB\t\xE3\x83\x95\xE3\x83\xA9\xE3\x83\xB3\x0F\xE3\x83\x98\xE3\x82\xAF\xE3\x82\xBF\xE3\x83\xBC\xE3\x83\xAB\x06\xE3\x83\x9A\xE3\x82\xBD\t\xE3\x83\x9A\xE3\x83\x8B\xE3\x83\x92\t\xE3\x83\x98\xE3\x83\xAB\xE3\x83\x84\t\xE3\x83\x9A\xE3\x83\xB3\xE3\x82\xB9\t\xE3\x83\x9A\xE3\x83\xBC\xE3\x82\xB8\t\xE3\x83\x99\xE3\x83\xBC\xE3\x82\xBF\f\xE3\x83\x9D\xE3\x82\xA4\xE3\x83\xB3\xE3\x83\x88\t\xE3\x83\x9C\xE3\x83\xAB\xE3\x83\x88\x06\xE3\x83\x9B\xE3\x83\xB3\t\xE3\x83\x9D\xE3\x83\xB3\xE3\x83\x89\t\xE3\x83\x9B\xE3\x83\xBC\xE3\x83\xAB\t\xE3\x83\x9B\xE3\x83\xBC\xE3\x83\xB3\f\xE3\x83\x9E\xE3\x82\xA4\xE3\x82\xAF\xE3\x83\xAD\t\xE3\x83\x9E\xE3\x82\xA4\xE3\x83\xAB\t\xE3\x83\x9E\xE3\x83\x83\xE3\x83\x8F\t\xE3\x83\x9E\xE3\x83\xAB\xE3\x82\xAF\x0F\xE3\x83\x9E\xE3\x83\xB3\xE3\x82\xB7\xE3\x83\xA7\xE3\x83\xB3\f\xE3\x83\x9F\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xB3\x06\xE3\x83\x9F\xE3\x83\xAA\x0F\xE3\x83\x9F\xE3\x83\xAA\xE3\x83\x90\xE3\x83\xBC\xE3\x83\xAB\x06\xE3\x83\xA1\xE3\x82\xAC\f\xE3\x83\xA1\xE3\x82\xAC\xE3\x83\x88\xE3\x83\xB3\f\xE3\x83\xA1\xE3\x83\xBC\xE3\x83\x88\xE3\x83\xAB\t\xE3\x83\xA4\xE3\x83\xBC\xE3\x83\x89\t\xE3\x83\xA4\xE3\x83\xBC\xE3\x83\xAB\t\xE3\x83\xA6\xE3\x82\xA2\xE3\x83\xB3\f\xE3\x83\xAA\xE3\x83\x83\xE3\x83\x88\xE3\x83\xAB\x06\xE3\x83\xAA\xE3\x83\xA9\t\xE3\x83\xAB\xE3\x83\x94\xE3\x83\xBC\f\xE3\x83\xAB\xE3\x83\xBC\xE3\x83\x96\xE3\x83\xAB\x06\xE3\x83\xAC\xE3\x83\xA0\x0F\xE3\x83\xAC\xE3\x83\xB3\xE3\x83\x88\xE3\x82\xB2\xE3\x83\xB3\t\xE3\x83\xAF\xE3\x83\x83\xE3\x83\x88\x040\xE7\x82\xB9\x041\xE7\x82\xB9\x042\xE7\x82\xB9\x043\xE7\x82\xB9\x044\xE7\x82\xB9\x045\xE7\x82\xB9\x046\xE7\x82\xB9\x047\xE7\x82\xB9\x048\xE7\x82\xB9\x049\xE7\x82\xB9\x0510\xE7\x82\xB9\x0511\xE7\x82\xB9\x0512\xE7\x82\xB9\x0513\xE7\x82\xB9\x0514\xE7\x82\xB9\x0515\xE7\x82\xB9\x0516\xE7\x82\xB9\x0517\xE7\x82\xB9\x0518\xE7\x82\xB9\x0519\xE7\x82\xB9\x0520\xE7\x82\xB9\x0521\xE7\x82\xB9\x0522\xE7\x82\xB9\x0523\xE7\x82\xB9\x0524\xE7\x82\xB9\x02da\x02au\x02ov\x02pc\x02dm\x02iu\x06\xE5\xB9\xB3\xE6\x88\x90\x06\xE6\x98\xAD\xE5\x92\x8C\x06\xE5\xA4\xA7\xE6\xAD\xA3\x06\xE6\x98\x8E\xE6\xB2\xBB\f\xE6\xA0\xAA\xE5\xBC\x8F\xE4\xBC\x9A\xE7\xA4\xBE\x02pa\x02na\x02ma\x02ka\x02kb\x02mb\x02gb\x04kcal\x02pf\x02nf\x02mg\x02kg\x02hz\x02ml\x02dl\x02kl\x02fm\x02nm\x02mm\x02cm\x02km\x02m2\x02m3\x05m\xE2\x88\x95s\x06m\xE2\x88\x95s2\x07rad\xE2\x88\x95s\brad\xE2\x88\x95s2\x02ps\x02ns\x02ms\x02pv\x02nv\x02mv\x02kv\x02pw\x02nw\x02mw\x02kw\x02bq\x02cc\x02cd\x06c\xE2\x88\x95kg\x02db\x02gy\x02ha\x02hp\x02in\x02kk\x02kt\x02lm\x02ln\x02lx\x02ph\x02pr\x02sr\x02sv\x02wb\x05v\xE2\x88\x95m\x05a\xE2\x88\x95m\x041\xE6\x97\xA5\x042\xE6\x97\xA5\x043\xE6\x97\xA5\x044\xE6\x97\xA5\x045\xE6\x97\xA5\x046\xE6\x97\xA5\x047\xE6\x97\xA5\x048\xE6\x97\xA5\x049\xE6\x97\xA5\x0510\xE6\x97\xA5\x0511\xE6\x97\xA5\x0512\xE6\x97\xA5\x0513\xE6\x97\xA5\x0514\xE6\x97\xA5\x0515\xE6\x97\xA5\x0516\xE6\x97\xA5\x0517\xE6\x97\xA5\x0518\xE6\x97\xA5\x0519\xE6\x97\xA5\x0520\xE6\x97\xA5\x0521\xE6\x97\xA5\x0522\xE6\x97\xA5\x0523\xE6\x97\xA5\x0524\xE6\x97\xA5\x0525\xE6\x97\xA5\x0526\xE6\x97\xA5\x0527\xE6\x97\xA5\x0528\xE6\x97\xA5\x0529\xE6\x97\xA5\x0530\xE6\x97\xA5\x0531\xE6\x97\xA5\x02\xD1\x8C\x02\xC9\xA6\x02\xC9\xAC\x02\xCA\x9E\x02\xCA\x87\x02\xC5\x93\x02\xCA\x8D\x04\xF0\xA4\x8B\xAE\x04\xF0\xA2\xA1\x8A\x04\xF0\xA2\xA1\x84\x04\xF0\xA3\x8F\x95\x04\xF0\xA5\x89\x89\x04\xF0\xA5\xB3\x90\x04\xF0\xA7\xBB\x93\x02ff\x02fi\x02fl\x02st\x04\xD5\xB4\xD5\xB6\x04\xD5\xB4\xD5\xA5\x04\xD5\xB4\xD5\xAB\x04\xD5\xBE\xD5\xB6\x04\xD5\xB4\xD5\xAD\x04\xD7\x99\xD6\xB4\x04\xD7\xB2\xD6\xB7\x02\xD7\xA2\x02\xD7\x94\x02\xD7\x9B\x02\xD7\x9C\x02\xD7\x9D\x02\xD7\xA8\x02\xD7\xAA\x04\xD7\xA9\xD7\x81\x04\xD7\xA9\xD7\x82\x06\xD7\xA9\xD6\xBC\xD7\x81\x06\xD7\xA9\xD6\xBC\xD7\x82\x04\xD7\x90\xD6\xB7\x04\xD7\x90\xD6\xB8\x04\xD7\x90\xD6\xBC\x04\xD7\x91\xD6\xBC\x04\xD7\x92\xD6\xBC\x04\xD7\x93\xD6\xBC\x04\xD7\x94\xD6\xBC\x04\xD7\x95\xD6\xBC\x04\xD7\x96\xD6\xBC\x04\xD7\x98\xD6\xBC\x04\xD7\x99\xD6\xBC\x04\xD7\x9A\xD6\xBC\x04\xD7\x9B\xD6\xBC\x04\xD7\x9C\xD6\xBC\x04\xD7\x9E\xD6\xBC\x04\xD7\xA0\xD6\xBC\x04\xD7\xA1\xD6\xBC\x04\xD7\xA3\xD6\xBC\x04\xD7\xA4\xD6\xBC\x04\xD7\xA6\xD6\xBC\x04\xD7\xA7\xD6\xBC\x04\xD7\xA8\xD6\xBC\x04\xD7\xA9\xD6\xBC\x04\xD7\xAA\xD6\xBC\x04\xD7\x95\xD6\xB9\x04\xD7\x91\xD6\xBF\x04\xD7\x9B\xD6\xBF\x04\xD7\xA4\xD6\xBF\x04\xD7\x90\xD7\x9C\x02\xD9\xB1\x02\xD9\xBB\x02\xD9\xBE\x02\xDA\x80\x02\xD9\xBA\x02\xD9\xBF\x02\xD9\xB9\x02\xDA\xA4\x02\xDA\xA6\x02\xDA\x84\x02\xDA\x83\x02\xDA\x86\x02\xDA\x87\x02\xDA\x8D\x02\xDA\x8C\x02\xDA\x8E\x02\xDA\x88\x02\xDA\x98\x02\xDA\x91\x02\xDA\xA9\x02\xDA\xAF\x02\xDA\xB3\x02\xDA\xB1\x02\xDA\xBA\x02\xDA\xBB\x02\xDB\x80\x02\xDB\x81\x02\xDA\xBE\x02\xDB\x92\x02\xDB\x93\x02\xDA\xAD\x02\xDB\x87\x02\xDB\x86\x02\xDB\x88\x02\xDB\x8B\x02\xDB\x85\x02\xDB\x89\x02\xDB\x90\x02\xD9\x89\x04\xD8\xA6\xD8\xA7\x04\xD8\xA6\xDB\x95\x04\xD8\xA6\xD9\x88\x04\xD8\xA6\xDB\x87\x04\xD8\xA6\xDB\x86\x04\xD8\xA6\xDB\x88\x04\xD8\xA6\xDB\x90\x04\xD8\xA6\xD9\x89\x02\xDB\x8C\x04\xD8\xA6\xD8\xAC\x04\xD8\xA6\xD8\xAD\x04\xD8\xA6\xD9\x85\x04\xD8\xA6\xD9\x8A\x04\xD8\xA8\xD8\xAC\x04\xD8\xA8\xD8\xAD\x04\xD8\xA8\xD8\xAE\x04\xD8\xA8\xD9\x85\x04\xD8\xA8\xD9\x89\x04\xD8\xA8\xD9\x8A\x04\xD8\xAA\xD8\xAC\x04\xD8\xAA\xD8\xAD\x04\xD8\xAA\xD8\xAE\x04\xD8\xAA\xD9\x85\x04\xD8\xAA\xD9\x89\x04\xD8\xAA\xD9\x8A\x04\xD8\xAB\xD8\xAC\x04\xD8\xAB\xD9\x85\x04\xD8\xAB\xD9\x89\x04\xD8\xAB\xD9\x8A\x04\xD8\xAC\xD8\xAD\x04\xD8\xAC\xD9\x85\x04\xD8\xAD\xD8\xAC\x04\xD8\xAD\xD9\x85\x04\xD8\xAE\xD8\xAC\x04\xD8\xAE\xD8\xAD\x04\xD8\xAE\xD9\x85\x04\xD8\xB3\xD8\xAC\x04\xD8\xB3\xD8\xAD\x04\xD8\xB3\xD8\xAE\x04\xD8\xB3\xD9\x85\x04\xD8\xB5\xD8\xAD\x04\xD8\xB5\xD9\x85\x04\xD8\xB6\xD8\xAC\x04\xD8\xB6\xD8\xAD\x04\xD8\xB6\xD8\xAE\x04\xD8\xB6\xD9\x85\x04\xD8\xB7\xD8\xAD\x04\xD8\xB7\xD9\x85\x04\xD8\xB8\xD9\x85\x04\xD8\xB9\xD8\xAC\x04\xD8\xB9\xD9\x85\x04\xD8\xBA\xD8\xAC\x04\xD8\xBA\xD9\x85\x04\xD9\x81\xD8\xAC\x04\xD9\x81\xD8\xAD\x04\xD9\x81\xD8\xAE\x04\xD9\x81\xD9\x85\x04\xD9\x81\xD9\x89\x04\xD9\x81\xD9\x8A\x04\xD9\x82\xD8\xAD\x04\xD9\x82\xD9\x85\x04\xD9\x82\xD9\x89\x04\xD9\x82\xD9\x8A\x04\xD9\x83\xD8\xA7\x04\xD9\x83\xD8\xAC\x04\xD9\x83\xD8\xAD\x04\xD9\x83\xD8\xAE\x04\xD9\x83\xD9\x84\x04\xD9\x83\xD9\x85\x04\xD9\x83\xD9\x89\x04\xD9\x83\xD9\x8A\x04\xD9\x84\xD8\xAC\x04\xD9\x84\xD8\xAD\x04\xD9\x84\xD8\xAE\x04\xD9\x84\xD9\x85\x04\xD9\x84\xD9\x89\x04\xD9\x84\xD9\x8A\x04\xD9\x85\xD8\xAC\x04\xD9\x85\xD8\xAD\x04\xD9\x85\xD8\xAE\x04\xD9\x85\xD9\x85\x04\xD9\x85\xD9\x89\x04\xD9\x85\xD9\x8A\x04\xD9\x86\xD8\xAC\x04\xD9\x86\xD8\xAD\x04\xD9\x86\xD8\xAE\x04\xD9\x86\xD9\x85\x04\xD9\x86\xD9\x89\x04\xD9\x86\xD9\x8A\x04\xD9\x87\xD8\xAC\x04\xD9\x87\xD9\x85\x04\xD9\x87\xD9\x89\x04\xD9\x87\xD9\x8A\x04\xD9\x8A\xD8\xAC\x04\xD9\x8A\xD8\xAD\x04\xD9\x8A\xD8\xAE\x04\xD9\x8A\xD9\x85\x04\xD9\x8A\xD9\x89\x04\xD9\x8A\xD9\x8A\x04\xD8\xB0\xD9\xB0\x04\xD8\xB1\xD9\xB0\x04\xD9\x89\xD9\xB0\x05 \xD9\x8C\xD9\x91\x05 \xD9\x8D\xD9\x91\x05 \xD9\x8E\xD9\x91\x05 \xD9\x8F\xD9\x91\x05 \xD9\x90\xD9\x91\x05 \xD9\x91\xD9\xB0\x04\xD8\xA6\xD8\xB1\x04\xD8\xA6\xD8\xB2\x04\xD8\xA6\xD9\x86\x04\xD8\xA8\xD8\xB1\x04\xD8\xA8\xD8\xB2\x04\xD8\xA8\xD9\x86\x04\xD8\xAA\xD8\xB1\x04\xD8\xAA\xD8\xB2\x04\xD8\xAA\xD9\x86\x04\xD8\xAB\xD8\xB1\x04\xD8\xAB\xD8\xB2\x04\xD8\xAB\xD9\x86\x04\xD9\x85\xD8\xA7\x04\xD9\x86\xD8\xB1\x04\xD9\x86\xD8\xB2\x04\xD9\x86\xD9\x86\x04\xD9\x8A\xD8\xB1\x04\xD9\x8A\xD8\xB2\x04\xD9\x8A\xD9\x86\x04\xD8\xA6\xD8\xAE\x04\xD8\xA6\xD9\x87\x04\xD8\xA8\xD9\x87\x04\xD8\xAA\xD9\x87\x04\xD8\xB5\xD8\xAE\x04\xD9\x84\xD9\x87\x04\xD9\x86\xD9\x87\x04\xD9\x87\xD9\xB0\x04\xD9\x8A\xD9\x87\x04\xD8\xAB\xD9\x87\x04\xD8\xB3\xD9\x87\x04\xD8\xB4\xD9\x85\x04\xD8\xB4\xD9\x87\x06\xD9\x80\xD9\x8E\xD9\x91\x06\xD9\x80\xD9\x8F\xD9\x91\x06\xD9\x80\xD9\x90\xD9\x91\x04\xD8\xB7\xD9\x89\x04\xD8\xB7\xD9\x8A\x04\xD8\xB9\xD9\x89\x04\xD8\xB9\xD9\x8A\x04\xD8\xBA\xD9\x89\x04\xD8\xBA\xD9\x8A\x04\xD8\xB3\xD9\x89\x04\xD8\xB3\xD9\x8A\x04\xD8\xB4\xD9\x89\x04\xD8\xB4\xD9\x8A\x04\xD8\xAD\xD9\x89\x04\xD8\xAD\xD9\x8A\x04\xD8\xAC\xD9\x89\x04\xD8\xAC\xD9\x8A\x04\xD8\xAE\xD9\x89\x04\xD8\xAE\xD9\x8A\x04\xD8\xB5\xD9\x89\x04\xD8\xB5\xD9\x8A\x04\xD8\xB6\xD9\x89\x04\xD8\xB6\xD9\x8A\x04\xD8\xB4\xD8\xAC\x04\xD8\xB4\xD8\xAD\x04\xD8\xB4\xD8\xAE\x04\xD8\xB4\xD8\xB1\x04\xD8\xB3\xD8\xB1\x04\xD8\xB5\xD8\xB1\x04\xD8\xB6\xD8\xB1\x04\xD8\xA7\xD9\x8B\x06\xD8\xAA\xD8\xAC\xD9\x85\x06\xD8\xAA\xD8\xAD\xD8\xAC\x06\xD8\xAA\xD8\xAD\xD9\x85\x06\xD8\xAA\xD8\xAE\xD9\x85\x06\xD8\xAA\xD9\x85\xD8\xAC\x06\xD8\xAA\xD9\x85\xD8\xAD\x06\xD8\xAA\xD9\x85\xD8\xAE\x06\xD8\xAC\xD9\x85\xD8\xAD\x06\xD8\xAD\xD9\x85\xD9\x8A\x06\xD8\xAD\xD9\x85\xD9\x89\x06\xD8\xB3\xD8\xAD\xD8\xAC\x06\xD8\xB3\xD8\xAC\xD8\xAD\x06\xD8\xB3\xD8\xAC\xD9\x89\x06\xD8\xB3\xD9\x85\xD8\xAD\x06\xD8\xB3\xD9\x85\xD8\xAC\x06\xD8\xB3\xD9\x85\xD9\x85\x06\xD8\xB5\xD8\xAD\xD8\xAD\x06\xD8\xB5\xD9\x85\xD9\x85\x06\xD8\xB4\xD8\xAD\xD9\x85\x06\xD8\xB4\xD8\xAC\xD9\x8A\x06\xD8\xB4\xD9\x85\xD8\xAE\x06\xD8\xB4\xD9\x85\xD9\x85\x06\xD8\xB6\xD8\xAD\xD9\x89\x06\xD8\xB6\xD8\xAE\xD9\x85\x06\xD8\xB7\xD9\x85\xD8\xAD\x06\xD8\xB7\xD9\x85\xD9\x85\x06\xD8\xB7\xD9\x85\xD9\x8A\x06\xD8\xB9\xD8\xAC\xD9\x85\x06\xD8\xB9\xD9\x85\xD9\x85\x06\xD8\xB9\xD9\x85\xD9\x89\x06\xD8\xBA\xD9\x85\xD9\x85\x06\xD8\xBA\xD9\x85\xD9\x8A\x06\xD8\xBA\xD9\x85\xD9\x89\x06\xD9\x81\xD8\xAE\xD9\x85\x06\xD9\x82\xD9\x85\xD8\xAD\x06\xD9\x82\xD9\x85\xD9\x85\x06\xD9\x84\xD8\xAD\xD9\x85\x06\xD9\x84\xD8\xAD\xD9\x8A\x06\xD9\x84\xD8\xAD\xD9\x89\x06\xD9\x84\xD8\xAC\xD8\xAC\x06\xD9\x84\xD8\xAE\xD9\x85\x06\xD9\x84\xD9\x85\xD8\xAD\x06\xD9\x85\xD8\xAD\xD8\xAC\x06\xD9\x85\xD8\xAD\xD9\x85\x06\xD9\x85\xD8\xAD\xD9\x8A\x06\xD9\x85\xD8\xAC\xD8\xAD\x06\xD9\x85\xD8\xAC\xD9\x85\x06\xD9\x85\xD8\xAE\xD8\xAC\x06\xD9\x85\xD8\xAE\xD9\x85\x06\xD9\x85\xD8\xAC\xD8\xAE\x06\xD9\x87\xD9\x85\xD8\xAC\x06\xD9\x87\xD9\x85\xD9\x85\x06\xD9\x86\xD8\xAD\xD9\x85\x06\xD9\x86\xD8\xAD\xD9\x89\x06\xD9\x86\xD8\xAC\xD9\x85\x06\xD9\x86\xD8\xAC\xD9\x89\x06\xD9\x86\xD9\x85\xD9\x8A\x06\xD9\x86\xD9\x85\xD9\x89\x06\xD9\x8A\xD9\x85\xD9\x85\x06\xD8\xA8\xD8\xAE\xD9\x8A\x06\xD8\xAA\xD8\xAC\xD9\x8A\x06\xD8\xAA\xD8\xAC\xD9\x89\x06\xD8\xAA\xD8\xAE\xD9\x8A\x06\xD8\xAA\xD8\xAE\xD9\x89\x06\xD8\xAA\xD9\x85\xD9\x8A\x06\xD8\xAA\xD9\x85\xD9\x89\x06\xD8\xAC\xD9\x85\xD9\x8A\x06\xD8\xAC\xD8\xAD\xD9\x89\x06\xD8\xAC\xD9\x85\xD9\x89\x06\xD8\xB3\xD8\xAE\xD9\x89\x06\xD8\xB5\xD8\xAD\xD9\x8A\x06\xD8\xB4\xD8\xAD\xD9\x8A\x06\xD8\xB6\xD8\xAD\xD9\x8A\x06\xD9\x84\xD8\xAC\xD9\x8A\x06\xD9\x84\xD9\x85\xD9\x8A\x06\xD9\x8A\xD8\xAD\xD9\x8A\x06\xD9\x8A\xD8\xAC\xD9\x8A\x06\xD9\x8A\xD9\x85\xD9\x8A\x06\xD9\x85\xD9\x85\xD9\x8A\x06\xD9\x82\xD9\x85\xD9\x8A\x06\xD9\x86\xD8\xAD\xD9\x8A\x06\xD8\xB9\xD9\x85\xD9\x8A\x06\xD9\x83\xD9\x85\xD9\x8A\x06\xD9\x86\xD8\xAC\xD8\xAD\x06\xD9\x85\xD8\xAE\xD9\x8A\x06\xD9\x84\xD8\xAC\xD9\x85\x06\xD9\x83\xD9\x85\xD9\x85\x06\xD8\xAC\xD8\xAD\xD9\x8A\x06\xD8\xAD\xD8\xAC\xD9\x8A\x06\xD9\x85\xD8\xAC\xD9\x8A\x06\xD9\x81\xD9\x85\xD9\x8A\x06\xD8\xA8\xD8\xAD\xD9\x8A\x06\xD8\xB3\xD8\xAE\xD9\x8A\x06\xD9\x86\xD8\xAC\xD9\x8A\x06\xD8\xB5\xD9\x84\xDB\x92\x06\xD9\x82\xD9\x84\xDB\x92\b\xD8\xA7\xD9\x84\xD9\x84\xD9\x87\b\xD8\xA7\xD9\x83\xD8\xA8\xD8\xB1\b\xD9\x85\xD8\xAD\xD9\x85\xD8\xAF\b\xD8\xB5\xD9\x84\xD8\xB9\xD9\x85\b\xD8\xB1\xD8\xB3\xD9\x88\xD9\x84\b\xD8\xB9\xD9\x84\xD9\x8A\xD9\x87\b\xD9\x88\xD8\xB3\xD9\x84\xD9\x85\x06\xD8\xB5\xD9\x84\xD9\x89!\xD8\xB5\xD9\x84\xD9\x89 \xD8\xA7\xD9\x84\xD9\x84\xD9\x87 \xD8\xB9\xD9\x84\xD9\x8A\xD9\x87 \xD9\x88\xD8\xB3\xD9\x84\xD9\x85\x0F\xD8\xAC\xD9\x84 \xD8\xAC\xD9\x84\xD8\xA7\xD9\x84\xD9\x87\b\xD8\xB1\xDB\x8C\xD8\xA7\xD9\x84\x01,\x01:\x01!\x01?\x01_\x01{\x01}\x01[\x01]\x01#\x01&\x01*\x01-\x01<\x01>\x01\\\x01$\x01%\x01@\x04\xD9\x80\xD9\x8B\x04\xD9\x80\xD9\x8E\x04\xD9\x80\xD9\x8F\x04\xD9\x80\xD9\x90\x04\xD9\x80\xD9\x91\x04\xD9\x80\xD9\x92\x02\xD8\xA1\x02\xD8\xA2\x02\xD8\xA3\x02\xD8\xA4\x02\xD8\xA5\x02\xD8\xA6\x02\xD8\xA7\x02\xD8\xA8\x02\xD8\xA9\x02\xD8\xAA\x02\xD8\xAB\x02\xD8\xAC\x02\xD8\xAD\x02\xD8\xAE\x02\xD8\xAF\x02\xD8\xB0\x02\xD8\xB1\x02\xD8\xB2\x02\xD8\xB3\x02\xD8\xB4\x02\xD8\xB5\x02\xD8\xB6\x02\xD8\xB7\x02\xD8\xB8\x02\xD8\xB9\x02\xD8\xBA\x02\xD9\x81\x02\xD9\x82\x02\xD9\x83\x02\xD9\x84\x02\xD9\x85\x02\xD9\x86\x02\xD9\x87\x02\xD9\x88\x02\xD9\x8A\x04\xD9\x84\xD8\xA2\x04\xD9\x84\xD8\xA3\x04\xD9\x84\xD8\xA5\x04\xD9\x84\xD8\xA7\x01\"\x01'\x01/\x01^\x01|\x01~\x02\xC2\xA2\x02\xC2\xA3\x02\xC2\xAC\x02\xC2\xA6\x02\xC2\xA5\b\xF0\x9D\x85\x97\xF0\x9D\x85\xA5\b\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xAE\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xAF\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xB0\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xB1\f\xF0\x9D\x85\x98\xF0\x9D\x85\xA5\xF0\x9D\x85\xB2\b\xF0\x9D\x86\xB9\xF0\x9D\x85\xA5\b\xF0\x9D\x86\xBA\xF0\x9D\x85\xA5\f\xF0\x9D\x86\xB9\xF0\x9D\x85\xA5\xF0\x9D\x85\xAE\f\xF0\x9D\x86\xBA\xF0\x9D\x85\xA5\xF0\x9D\x85\xAE\f\xF0\x9D\x86\xB9\xF0\x9D\x85\xA5\xF0\x9D\x85\xAF\f\xF0\x9D\x86\xBA\xF0\x9D\x85\xA5\xF0\x9D\x85\xAF\x02\xC4\xB1\x02\xC8\xB7\x02\xCE\xB1\x02\xCE\xB5\x02\xCE\xB6\x02\xCE\xB7\x02\xCE\xBA\x02\xCE\xBB\x02\xCE\xBC\x02\xCE\xBD\x02\xCE\xBE\x02\xCE\xBF\x02\xCF\x83\x02\xCF\x84\x02\xCF\x85\x02\xCF\x88\x03\xE2\x88\x87\x03\xE2\x88\x82\x02\xCF\x9D\x02\xD9\xAE\x02\xDA\xA1\x02\xD9\xAF\x020,\x021,\x022,\x023,\x024,\x025,\x026,\x027,\x028,\x029,\x03(a)\x03(b)\x03(c)\x03(d)\x03(e)\x03(f)\x03(g)\x03(h)\x03(i)\x03(j)\x03(k)\x03(l)\x03(m)\x03(n)\x03(o)\x03(p)\x03(q)\x03(r)\x03(s)\x03(t)\x03(u)\x03(v)\x03(w)\x03(x)\x03(y)\x03(z)\x07\xE3\x80\x94s\xE3\x80\x95\x02wz\x02hv\x02sd\x03ppv\x02wc\x02mc\x02md\x02mr\x02dj\x06\xE3\x81\xBB\xE3\x81\x8B\x06\xE3\x82\xB3\xE3\x82\xB3\x03\xE3\x82\xB5\x03\xE6\x89\x8B\x03\xE5\xAD\x97\x03\xE5\x8F\x8C\x03\xE3\x83\x87\x03\xE4\xBA\x8C\x03\xE5\xA4\x9A\x03\xE8\xA7\xA3\x03\xE5\xA4\xA9\x03\xE4\xBA\xA4\x03\xE6\x98\xA0\x03\xE7\x84\xA1\x03\xE6\x96\x99\x03\xE5\x89\x8D\x03\xE5\xBE\x8C\x03\xE5\x86\x8D\x03\xE6\x96\xB0\x03\xE5\x88\x9D\x03\xE7\xB5\x82\x03\xE7\x94\x9F\x03\xE8\xB2\xA9\x03\xE5\xA3\xB0\x03\xE5\x90\xB9\x03\xE6\xBC\x94\x03\xE6\x8A\x95\x03\xE6\x8D\x95\x03\xE4\xB8\x80\x03\xE4\xB8\x89\x03\xE9\x81\x8A\x03\xE5\xB7\xA6\x03\xE4\xB8\xAD\x03\xE5\x8F\xB3\x03\xE6\x8C\x87\x03\xE8\xB5\xB0\x03\xE6\x89\x93\x03\xE7\xA6\x81\x03\xE7\xA9\xBA\x03\xE5\x90\x88\x03\xE6\xBA\x80\x03\xE6\x9C\x89\x03\xE6\x9C\x88\x03\xE7\x94\xB3\x03\xE5\x89\xB2\x03\xE5\x96\xB6\x03\xE9\x85\x8D\t\xE3\x80\x94\xE6\x9C\xAC\xE3\x80\x95\t\xE3\x80\x94\xE4\xB8\x89\xE3\x80\x95\t\xE3\x80\x94\xE4\xBA\x8C\xE3\x80\x95\t\xE3\x80\x94\xE5\xAE\x89\xE3\x80\x95\t\xE3\x80\x94\xE7\x82\xB9\xE3\x80\x95\t\xE3\x80\x94\xE6\x89\x93\xE3\x80\x95\t\xE3\x80\x94\xE7\x9B\x97\xE3\x80\x95\t\xE3\x80\x94\xE5\x8B\x9D\xE3\x80\x95\t\xE3\x80\x94\xE6\x95\x97\xE3\x80\x95\x03\xE5\xBE\x97\x03\xE5\x8F\xAF\x03\xE4\xB8\xBD\x03\xE4\xB8\xB8\x03\xE4\xB9\x81\x03\xE4\xBD\xA0\x03\xE4\xBE\xAE\x03\xE4\xBE\xBB\x03\xE5\x80\x82\x03\xE5\x81\xBA\x03\xE5\x82\x99\x03\xE5\x83\xA7\x03\xE5\x83\x8F\x03\xE3\x92\x9E\x03\xE5\x85\x8D\x03\xE5\x85\x94\x03\xE5\x85\xA4\x03\xE5\x85\xB7\x03\xE3\x92\xB9\x03\xE5\x85\xA7\x03\xE5\x86\x97\x03\xE5\x86\xA4\x03\xE4\xBB\x8C\x03\xE5\x86\xAC\x03\xE5\x86\xB5\x03\xE5\x87\xB5\x03\xE5\x88\x83\x03\xE3\x93\x9F\x03\xE5\x88\xBB\x03\xE5\x89\x86\x03\xE5\x89\xB7\x03\xE3\x94\x95\x03\xE5\x8B\x87\x03\xE5\x8B\x89\x03\xE5\x8B\xA4\x03\xE5\x8B\xBA\x03\xE5\x8C\x85\x03\xE5\x8C\x86\x03\xE5\x8C\x97\x03\xE5\x8D\x89\x03\xE5\x8D\x91\x03\xE5\x8D\x9A\x03\xE5\x8D\xB3\x03\xE5\x8D\xBD\x03\xE5\x8D\xBF\x03\xE7\x81\xB0\x03\xE5\x8F\x8A\x03\xE5\x8F\x9F\x03\xE5\x8F\xAB\x03\xE5\x8F\xB1\x03\xE5\x90\x86\x03\xE5\x92\x9E\x03\xE5\x90\xB8\x03\xE5\x91\x88\x03\xE5\x91\xA8\x03\xE5\x92\xA2\x03\xE5\x93\xB6\x03\xE5\x94\x90\x03\xE5\x95\x93\x03\xE5\x95\xA3\x03\xE5\x96\x84\x03\xE5\x96\x99\x03\xE5\x96\xAB\x03\xE5\x96\xB3\x03\xE5\x97\x82\x03\xE5\x9C\x96\x03\xE5\x98\x86\x03\xE5\x9C\x97\x03\xE5\x99\x91\x03\xE5\x99\xB4\x03\xE5\x88\x87\x03\xE5\xA3\xAE\x03\xE5\x9F\x8E\x03\xE5\x9F\xB4\x03\xE5\xA0\x8D\x03\xE5\x9E\x8B\x03\xE5\xA0\xB2\x03\xE5\xA0\xB1\x03\xE5\xA2\xAC\x03\xE5\xA3\xB2\x03\xE5\xA3\xB7\x03\xE5\xA4\x86\x03\xE5\xA4\xA2\x03\xE5\xA5\xA2\x03\xE5\xA7\xAC\x03\xE5\xA8\x9B\x03\xE5\xA8\xA7\x03\xE5\xA7\x98\x03\xE5\xA9\xA6\x03\xE3\x9B\xAE\x03\xE5\xAC\x88\x03\xE5\xAC\xBE\x03\xE5\xAF\x83\x03\xE5\xAF\x98\x03\xE5\xAF\xA7\x03\xE5\xAF\xB3\x03\xE5\xAF\xBF\x03\xE5\xB0\x86\x03\xE5\xB0\xA2\x03\xE3\x9E\x81\x03\xE5\xB1\xA0\x03\xE5\xB1\xAE\x03\xE5\xB3\x80\x03\xE5\xB2\x8D\x03\xE5\xB5\x83\x03\xE5\xB5\xAE\x03\xE5\xB5\xAB\x03\xE5\xB5\xBC\x03\xE5\xB7\xA1\x03\xE5\xB7\xA2\x03\xE3\xA0\xAF\x03\xE5\xB7\xBD\x03\xE5\xB8\xA8\x03\xE5\xB8\xBD\x03\xE5\xB9\xA9\x03\xE3\xA1\xA2\x03\xE3\xA1\xBC\x03\xE5\xBA\xB0\x03\xE5\xBA\xB3\x03\xE5\xBA\xB6\x03\xE5\xBB\x8A\x03\xE5\xBB\xBE\x03\xE8\x88\x81\x03\xE5\xBC\xA2\x03\xE3\xA3\x87\x03\xE5\xBD\xA2\x03\xE5\xBD\xAB\x03\xE3\xA3\xA3\x03\xE5\xBE\x9A\x03\xE5\xBF\x8D\x03\xE5\xBF\x97\x03\xE5\xBF\xB9\x03\xE6\x82\x81\x03\xE3\xA4\xBA\x03\xE3\xA4\x9C\x03\xE6\x82\x94\x03\xE6\x83\x87\x03\xE6\x85\x88\x03\xE6\x85\x8C\x03\xE6\x85\x8E\x03\xE6\x85\xBA\x03\xE6\x86\x8E\x03\xE6\x86\xB2\x03\xE6\x86\xA4\x03\xE6\x86\xAF\x03\xE6\x87\x9E\x03\xE6\x87\xB2\x03\xE6\x87\xB6\x03\xE6\x88\x90\x03\xE6\x88\x9B\x03\xE6\x89\x9D\x03\xE6\x8A\xB1\x03\xE6\x8B\x94\x03\xE6\x8D\x90\x03\xE6\x8C\xBD\x03\xE6\x8B\xBC\x03\xE6\x8D\xA8\x03\xE6\x8E\x83\x03\xE6\x8F\xA4\x03\xE6\x90\xA2\x03\xE6\x8F\x85\x03\xE6\x8E\xA9\x03\xE3\xA8\xAE\x03\xE6\x91\xA9\x03\xE6\x91\xBE\x03\xE6\x92\x9D\x03\xE6\x91\xB7\x03\xE3\xA9\xAC\x03\xE6\x95\x8F\x03\xE6\x95\xAC\x03\xE6\x97\xA3\x03\xE6\x9B\xB8\x03\xE6\x99\x89\x03\xE3\xAC\x99\x03\xE6\x9A\x91\x03\xE3\xAC\x88\x03\xE3\xAB\xA4\x03\xE5\x86\x92\x03\xE5\x86\x95\x03\xE6\x9C\x80\x03\xE6\x9A\x9C\x03\xE8\x82\xAD\x03\xE4\x8F\x99\x03\xE6\x9C\x97\x03\xE6\x9C\x9B\x03\xE6\x9C\xA1\x03\xE6\x9D\x9E\x03\xE6\x9D\x93\x03\xE3\xAD\x89\x03\xE6\x9F\xBA\x03\xE6\x9E\x85\x03\xE6\xA1\x92\x03\xE6\xA2\x85\x03\xE6\xA2\x8E\x03\xE6\xA0\x9F\x03\xE6\xA4\x94\x03\xE3\xAE\x9D\x03\xE6\xA5\x82\x03\xE6\xA6\xA3\x03\xE6\xA7\xAA\x03\xE6\xAA\xA8\x03\xE6\xAB\x9B\x03\xE3\xB0\x98\x03\xE6\xAC\xA1\x03\xE6\xAD\x94\x03\xE3\xB1\x8E\x03\xE6\xAD\xB2\x03\xE6\xAE\x9F\x03\xE6\xAE\xBA\x03\xE6\xAE\xBB\x03\xE6\xB1\x8E\x03\xE6\xB2\xBF\x03\xE6\xB3\x8D\x03\xE6\xB1\xA7\x03\xE6\xB4\x96\x03\xE6\xB4\xBE\x03\xE6\xB5\xB7\x03\xE6\xB5\x81\x03\xE6\xB5\xA9\x03\xE6\xB5\xB8\x03\xE6\xB6\x85\x03\xE6\xB4\xB4\x03\xE6\xB8\xAF\x03\xE6\xB9\xAE\x03\xE3\xB4\xB3\x03\xE6\xBB\x8B\x03\xE6\xBB\x87\x03\xE6\xB7\xB9\x03\xE6\xBD\xAE\x03\xE6\xBF\x86\x03\xE7\x80\xB9\x03\xE7\x80\x9E\x03\xE7\x80\x9B\x03\xE3\xB6\x96\x03\xE7\x81\x8A\x03\xE7\x81\xBD\x03\xE7\x81\xB7\x03\xE7\x82\xAD\x03\xE7\x85\x85\x03\xE7\x86\x9C\x03\xE7\x88\xA8\x03\xE7\x88\xB5\x03\xE7\x89\x90\x03\xE7\x8A\x80\x03\xE7\x8A\x95\x03\xE7\x8D\xBA\x03\xE7\x8E\x8B\x03\xE3\xBA\xAC\x03\xE7\x8E\xA5\x03\xE3\xBA\xB8\x03\xE7\x91\x87\x03\xE7\x91\x9C\x03\xE7\x91\xB1\x03\xE7\x92\x85\x03\xE7\x93\x8A\x03\xE3\xBC\x9B\x03\xE7\x94\xA4\x03\xE7\x94\xBE\x03\xE7\x95\xB0\x03\xE7\x98\x90\x03\xE3\xBF\xBC\x03\xE4\x80\x88\x03\xE7\x9B\xB4\x03\xE7\x9C\x9E\x03\xE7\x9C\x9F\x03\xE7\x9D\x8A\x03\xE4\x80\xB9\x03\xE7\x9E\x8B\x03\xE4\x81\x86\x03\xE4\x82\x96\x03\xE7\xA1\x8E\x03\xE7\xA2\x8C\x03\xE7\xA3\x8C\x03\xE4\x83\xA3\x03\xE7\xA5\x96\x03\xE7\xA6\x8F\x03\xE7\xA7\xAB\x03\xE4\x84\xAF\x03\xE7\xA9\x80\x03\xE7\xA9\x8A\x03\xE7\xA9\x8F\x03\xE4\x88\x82\x03\xE7\xAF\x86\x03\xE7\xAF\x89\x03\xE4\x88\xA7\x03\xE7\xB3\x92\x03\xE4\x8A\xA0\x03\xE7\xB3\xA8\x03\xE7\xB3\xA3\x03\xE7\xB4\x80\x03\xE7\xB5\xA3\x03\xE4\x8C\x81\x03\xE7\xB7\x87\x03\xE7\xB8\x82\x03\xE7\xB9\x85\x03\xE4\x8C\xB4\x03\xE4\x8D\x99\x03\xE7\xBD\xBA\x03\xE7\xBE\x95\x03\xE7\xBF\xBA\x03\xE8\x80\x85\x03\xE8\x81\xA0\x03\xE8\x81\xB0\x03\xE4\x8F\x95\x03\xE8\x82\xB2\x03\xE8\x84\x83\x03\xE4\x90\x8B\x03\xE8\x84\xBE\x03\xE5\xAA\xB5\x03\xE8\x88\x84\x03\xE8\xBE\x9E\x03\xE4\x91\xAB\x03\xE8\x8A\x91\x03\xE8\x8A\x8B\x03\xE8\x8A\x9D\x03\xE5\x8A\xB3\x03\xE8\x8A\xB1\x03\xE8\x8A\xB3\x03\xE8\x8A\xBD\x03\xE8\x8B\xA6\x03\xE8\x8B\xA5\x03\xE8\x8C\x9D\x03\xE8\x8D\xA3\x03\xE8\x8E\xAD\x03\xE8\x8C\xA3\x03\xE8\x8E\xBD\x03\xE8\x8F\xA7\x03\xE8\x91\x97\x03\xE8\x8D\x93\x03\xE8\x8F\x8A\x03\xE8\x8F\x8C\x03\xE8\x8F\x9C\x03\xE4\x94\xAB\x03\xE8\x93\xB1\x03\xE8\x93\xB3\x03\xE8\x94\x96\x03\xE8\x95\xA4\x03\xE4\x95\x9D\x03\xE4\x95\xA1\x03\xE4\x95\xAB\x03\xE8\x99\x90\x03\xE8\x99\x9C\x03\xE8\x99\xA7\x03\xE8\x99\xA9\x03\xE8\x9A\xA9\x03\xE8\x9A\x88\x03\xE8\x9C\x8E\x03\xE8\x9B\xA2\x03\xE8\x9D\xB9\x03\xE8\x9C\xA8\x03\xE8\x9D\xAB\x03\xE8\x9E\x86\x03\xE8\x9F\xA1\x03\xE8\xA0\x81\x03\xE4\x97\xB9\x03\xE8\xA1\xA0\x03\xE8\xA1\xA3\x03\xE8\xA3\x97\x03\xE8\xA3\x9E\x03\xE4\x98\xB5\x03\xE8\xA3\xBA\x03\xE3\x92\xBB\x03\xE4\x9A\xBE\x03\xE4\x9B\x87\x03\xE8\xAA\xA0\x03\xE8\xAB\xAD\x03\xE8\xAE\x8A\x03\xE8\xB1\x95\x03\xE8\xB2\xAB\x03\xE8\xB3\x81\x03\xE8\xB4\x9B\x03\xE8\xB5\xB7\x03\xE8\xB7\x8B\x03\xE8\xB6\xBC\x03\xE8\xB7\xB0\x03\xE8\xBB\x94\x03\xE8\xBC\xB8\x03\xE9\x82\x94\x03\xE9\x83\xB1\x03\xE9\x84\x91\x03\xE9\x84\x9B\x03\xE9\x88\xB8\x03\xE9\x8B\x97\x03\xE9\x8B\x98\x03\xE9\x89\xBC\x03\xE9\x8F\xB9\x03\xE9\x90\x95\x03\xE9\x96\x8B\x03\xE4\xA6\x95\x03\xE9\x96\xB7\x03\xE4\xA7\xA6\x03\xE9\x9B\x83\x03\xE5\xB6\xB2\x03\xE9\x9C\xA3\x03\xE4\xA9\xAE\x03\xE4\xA9\xB6\x03\xE9\x9F\xA0\x03\xE4\xAA\xB2\x03\xE9\xA0\x8B\x03\xE9\xA0\xA9\x03\xE9\xA3\xA2\x03\xE4\xAC\xB3\x03\xE9\xA4\xA9\x03\xE9\xA6\xA7\x03\xE9\xA7\x82\x03\xE9\xA7\xBE\x03\xE4\xAF\x8E\x03\xE9\xAC\x92\x03\xE9\xB1\x80\x03\xE9\xB3\xBD\x03\xE4\xB3\x8E\x03\xE4\xB3\xAD\x03\xE9\xB5\xA7\x03\xE4\xB3\xB8\x03\xE9\xBA\xBB\x03\xE4\xB5\x96\x03\xE9\xBB\xB9\x03\xE9\xBB\xBE\x03\xE9\xBC\x85\x03\xE9\xBC\x8F\x03\xE9\xBC\x96\x03\xE9\xBC\xBB"; - xorData = "\x02\f\t\x02\xB0\xEC\x02\xAD\xD8\x02\xAD\xD9\x02\x06\x07\x02\x0F\x12\x02\x0F\x1F\x02\x0F\x1D\x02\x01\x13\x02\x0F\x16\x02\x0F\v\x02\x0F3\x02\x0F7\x02\x0F?\x02\x0F/\x02\x0F*\x02\f&\x02\f*\x02\f;\x02\f9\x02\f%\x02\xAB\xED\x02\xAB\xE2\x02\xAB\xE3\x02\xA9\xE0\x02\xA9\xE1\x02\xA9\xE6\x02\xA3\xCB\x02\xA3\xC8\x02\xA3\xC9\x02\x01#\x02\x01\b\x02\x0E>\x02\x0E'\x02\x0F\x03\x02\x03\r\x02\x03\t\x02\x03\x17\x02\x03\x0E\x02\x02\x03\x02\x011\x02\x01\x00\x02\x01\x10\x02\x03<\x02\x07\r\x02\x02\f\x02\f0\x02\x01\x03\x02\x01\x01\x02\x01 \x02\x01\"\x02\x01)\x02\x01\n\x02\x01\f\x02\x02\x06\x02\x02\x02\x02\x03\x10\x03\x037 \x03\v+\x03\x021\x00\x02\x01\x04\x02\x01\x02\x02\x019\x02\x03\x1C\x02\x02$\x03\x80p$\x02\x03:\x02\x03\n\x03\xC1r.\x03\xC1r,\x03\xC1r\x02\x02\x02:\x02\x02>\x02\x02,\x02\x02\x10\x02\x02\x00\x03\xC1s<\x03\xC1s*\x03\xC2L$\x03\xC2L;\x02\t)\x02\n\x19\x03\x83\xAB\xE3\x03\x83\xAB\xF2\x03 4\xE0\x03\x81\xAB\xEA\x03\x81\xAB\xF3\x03 4\xEF\x03\x96\xE1\xCD\x03\x84\xE5\xC3\x02\r\x11\x03\x8B\xEC\xCB\x03\x94\xEC\xCF\x03\x9A\xEC\xC2\x03\x8B\xEC\xDB\x03\x94\xEC\xDF\x03\x9A\xEC\xD2\x03\x01\f!\x03\x01\f#\x03\xCA\xA0\x9D\x03\xCA\xA3\x9C\x03\xCA\xA2\x9F\x03\xCA\xA5\x9E\x03\xCA\xA4\x91\x03\xCA\xA7\x90\x03\xCA\xA6\x93\x03\xCA\xA9\x92\x03\xCA\xA8\x95\x03\xCA\xF3\xB5\x03\xCA\xF0\xB4\x03\xCA\xF1\xB7\x03\xCA\xF6\xB6\x03\xCA\xF7\x89\x03\xCA\xF4\x88\x03\xCA\xF5\x8B\x03\xCA\xFA\x8A\x03\xCA\xFB\x8D\x03\xCA\xF8\x8C\x03\xCA\xF9\x8F\x03\xCA\xFE\x8E\x03\xCA\xFF\x81\x03\xCA\xFC\x80\x03\xCA\xFD\x83\x03\xCA\xE2\x82\x03\xCA\xE3\x85\x03\xCA\xE0\x84\x03\xCA\xE1\x87\x03\xCA\xE6\x86\x03\xCA\xE7\x99\x03\xCA\xE4\x98\x03\xCA\xE5\x9B\x03\xCA\xEA\x9A\x03\xCA\xEB\x9D\x03\xCA\xE8\x9C\x03\xD8\x93\x89\x03\xDF\x94\x8B\x02\x010\x03\x03\x04\x1E\x03\x04\x15\x12\x03\v\x05,\x03\x06\x04\x00\x03\x06\x04)\x03\x06\x044\x03\x06\x04<\x03\x06\x05\x1D\x03\x06\x06\x00\x03\x06\x06\n\x03\x06\x06'\x03\x06\x062\x03\x0786\x03\x079/\x03\x079 \x03\x07:\x0E\x03\x07:\x1B\x03\x07:%\x03\x07;/\x03\x07;%\x03\x074\x11\x03\x076\t\x03\x077*\x03\x070\x01\x03\x070\x0F\x03\x070.\x03\x071\x16\x03\x071\x04\x03\x0710\x03\x072\x18\x03\x072-\x03\x073\x14\x03\x073>\x03\x07'\t\x03\x07 \x00\x03\x07\x1F\v\x03\x07\x18#\x03\x07\x18(\x03\x07\x186\x03\x07\x18\x03\x03\x07\x19\x16\x03\x07\x116\x03\x07\x12'\x03\x07\x13\x10\x03\x07\f&\x03\x07\f\b\x03\x07\f\x13\x03\x07\r\x02\x03\x07\r\x1C\x03\x07\v5\x03\x07\v\n\x03\x07\v\x01\x03\x07\v\x0F\x03\x07\x05\x00\x03\x07\x05\t\x03\x07\x05\v\x03\x07\x07\x01\x03\x07\x07\b\x03\x07\x00<\x03\x07\x00+\x03\x07\x01)\x03\x07\x01\x1B\x03\x07\x01\b\x03\x07\x03?\x03\x0445\x03\x044\b\x03\x0454\x03\x04)/\x03\x04)5\x03\x04+\x05\x03\x04+\x14\x03\x04+ \x03\x04+<\x03\x04*&\x03\x04*\"\x03\x04&8\x03\x04!\x01\x03\x04!\"\x03\x04\x11+\x03\x04\x10.\x03\x04\x104\x03\x04\x13=\x03\x04\x12\x04\x03\x04\x12\n\x03\x04\r\x1D\x03\x04\r\x07\x03\x04\r \x03\x05<>\x03\x055<\x03\x055!\x03\x055#\x03\x055&\x03\x054\x1D\x03\x054\x02\x03\x054\x07\x03\x0571\x03\x053\x1A\x03\x053\x16\x03\x05.<\x03\x05.\x07\x03\x05):\x03\x05)<\x03\x05)\f\x03\x05)\x15\x03\x05+-\x03\x05+5\x03\x05$\x1E\x03\x05$\x14\x03\x05'\x04\x03\x05'\x14\x03\x05&\x02\x03\x05\"6\x03\x05\"\f\x03\x05\"\x1C\x03\x05\x19\n\x03\x05\x1B\t\x03\x05\x1B\f\x03\x05\x14\x07\x03\x05\x16?\x03\x05\x16\f\x03\x05\f\x05\x03\x05\x0E\x0F\x03\x05\x01\x0E\x03\x05\x00(\x03\x05\x030\x03\x05\x03\x06\x03\n==\x03\n=1\x03\n=,\x03\n=\f\x03\n??\x03\n<\b\x03\n9!\x03\n9)\x03\n97\x03\n99\x03\n6\n\x03\n6\x1C\x03\n6\x17\x03\n7'\x03\n78\x03\n73\x03\n'\x01\x03\n'&\x03\n\x1F\x0E\x03\n\x1F\x03\x03\n\x1F3\x03\n\x1B/\x03\n\x18\x19\x03\n\x19\x01\x03\n\x16\x14\x03\n\x0E\"\x03\n\x0F\x10\x03\n\x0F\x02\x03\n\x0F \x03\n\f\x04\x03\n\v>\x03\n\v+\x03\n\b/\x03\n\x046\x03\n\x05\x14\x03\n\x00\x04\x03\n\x00\x10\x03\n\x00\x14\x03\v<3\x03\v;*\x03\v9\"\x03\v9)\x03\v97\x03\v+\x10\x03\v((\x03\v&5\x03\v$\x1C\x03\v$\x12\x03\v%\x04\x03\v#<\x03\v#0\x03\v#\r\x03\v#\x19\x03\v!:\x03\v!\x1F\x03\v!\x00\x03\v\x1E5\x03\v\x1C\x1D\x03\v\x1D-\x03\v\x1D(\x03\v\x18.\x03\v\x18 \x03\v\x18\x16\x03\v\x14\x13\x03\v\x15$\x03\v\x15\"\x03\v\x12\x1B\x03\v\x12\x10\x03\v\x132\x03\v\x13=\x03\v\x12\x18\x03\v\f&\x03\v\x061\x03\v\x06:\x03\v\x05#\x03\v\x05<\x03\v\x04\v\x03\v\x04\x04\x03\v\x04\x1B\x03\v\x042\x03\v\x041\x03\v\x03\x03\x03\v\x03\x1D\x03\v\x03/\x03\v\x03+\x03\v\x02\x1B\x03\v\x02\x00\x03\v\x01\x1E\x03\v\x01\b\x03\v\x015\x03\x06\r9\x03\x06\r=\x03\x06\r?\x03\x02\x001\x03\x02\x003\x03\x02\x02\x19\x03\x02\x006\x03\x02\x02\x1B\x03\x02\x004\x03\x02\x00<\x03\x02\x02\n\x03\x02\x02\x0E\x03\x02\x01\x1A\x03\x02\x01\x07\x03\x02\x01\x05\x03\x02\x01\v\x03\x02\x01%\x03\x02\x01\f\x03\x02\x01\x04\x03\x02\x01\x1C\x03\x02\x00.\x03\x02\x002\x03\x02\x00>\x03\x02\x00\x12\x03\x02\x00\x16\x03\x02\x011\x03\x02\x013\x03\x02\x02 \x03\x02\x02%\x03\x02\x02$\x03\x02\x028\x03\x02\x02;\x03\x02\x024\x03\x02\x012\x03\x02\x022\x03\x02\x02/\x03\x02\x01,\x03\x02\x01\x13\x03\x02\x01\x16\x03\x02\x01\x11\x03\x02\x01\x1E\x03\x02\x01\x15\x03\x02\x01\x17\x03\x02\x01\x0F\x03\x02\x01\b\x03\x02\x00?\x03\x02\x03\x07\x03\x02\x03\r\x03\x02\x03\x13\x03\x02\x03\x1D\x03\x02\x03\x1F\x03\x02\x00\x03\x03\x02\x00\r\x03\x02\x00\x01\x03\x02\x00\x1B\x03\x02\x00\x19\x03\x02\x00\x18\x03\x02\x00\x13\x03\x02\x00/\x03\x07>\x12\x03\x07<\x1F\x03\x07>\x1D\x03\x06\x1D\x0E\x03\x07>\x1C\x03\x07>:\x03\x07>\x13\x03\x04\x12+\x03\x07?\x03\x03\x07>\x02\x03\x06\"4\x03\x06\x1A.\x03\x07<%\x03\x06\x1C\v\x03\x0609\x03\x05\x1F\x01\x03\x04'\b\x03\x93\xFD\xF5\x03\x02\r \x03\x02\r#\x03\x02\r!\x03\x02\r&\x03\x02\r\"\x03\x02\r/\x03\x02\r,\x03\x02\r$\x03\x02\r'\x03\x02\r%\x03\x02\r;\x03\x02\r=\x03\x02\r?\x03\t9.\x03\b\v7\x03\b\x02\x14\x03\b\x14\r\x03\b.:\x03\b9'\x03\x0F\v\x18\x03\x0F\x1C1\x03\x0F\x17&\x03\x0F9\x1F\x03\x0F0\f\x03\x0E\n9\x03\x0E\x056\x03\x0E\x1C#\x03\x0F\x13\x0E\x03\x072\x00\x03\x070\r\x03\x072\v\x03\x06\x11\x18\x03\x070\x10\x03\x06\x0F(\x03\x072\x05\x03\x06\x0F,\x03\x073\x15\x03\x06\x07\b\x03\x05\x16\x02\x03\x04\v \x03\x05:8\x03\x05\x16%\x03\n\r\x1F\x03\x06\x16\x10\x03\x05\x1D5\x03\x05*;\x03\x05\x16\x1B\x03\x04.-\x03\x06\x1A\x19\x03\x04\x03,\x03\v87\x03\x04/\n\x03\x06\x00,\x03\x04-\x01\x03\x04\x1E-\x03\x06/(\x03\n\v5\x03\x06\x0E7\x03\x06\x07.\x03\x0597\x03\n*%\x03\x0760\x03\x06\f;\x03\x05'\x00\x03\x072.\x03\x072\b\x03\x06=\x01\x03\x06\x05\x1B\x03\x06\x06\x12\x03\x06$=\x03\x06'\r\x03\x04\x11\x0F\x03\x076,\x03\x06\x07;\x03\x06.,\x03\x86\xF9\xEA\x03\x8F\xFF\xEB\x02\t2\x02\t5\x02\t4\x02\t;\x02\t>\x02\t8\x02\t*\x02\t/\x02\t,\x02\t%\x02\t&\x02\t#\x02\t \x02\b!\x02\b%\x02\b$\x02\b+\x02\b.\x02\b*\x02\b&\x02\b8\x02\b>\x02\b4\x02\b6\x02\b0\x02\b\x10\x02\b\x17\x02\b\x12\x02\b\x1D\x02\b\x1F\x02\b\x13\x02\b\x15\x02\b\x14\x02\b\f\x03\x8B\xFD\xD0\x03\x81\xEC\xC6\x03\x87\xE0\x8A\x03-2\xE3\x03\x80\xEF\xE4\x03-2\xEA\x03\x88\xE6\xEB\x03\x8E\xE6\xE8\x03\x84\xE6\xE9\x03\x97\xE6\xEE\x03-2\xF9\x03-2\xF6\x03\x8E\xE3\xAD\x03\x80\xE3\x92\x03\x88\xE3\x90\x03\x8E\xE3\x90\x03\x80\xE3\x97\x03\x88\xE3\x95\x03\x88\xFE\xCB\x03\x8E\xFE\xCA\x03\x84\xFE\xCD\x03\x91\xEF\xC9\x03-2\xC1\x03-2\xC0\x03-2\xCB\x03\x88@\t\x03\x8E@\b\x03\x8F\xE0\xF5\x03\x8E\xE6\xF9\x03\x8E\xE0\xFA\x03\x93\xFF\xF4\x03\x84\xEE\xD3\x03\v(\x04\x023 \x03\v)\b\x021;\x02\x01*\x03\v#\x10\x03\v 0\x03\v!\x10\x03\v!0\x03\x07\x15\b\x03\t?5\x03\x07\x1F\b\x03\x07\x17\v\x03\t\x1F\x15\x03\v\x1C7\x03\n+#\x03\x06\x1A\x1B\x03\x06\x1A\x14\x03\n\x01\x18\x03\x06#\x1B\x03\n2\f\x03\n\x01\x04\x03\t#;\x03\b='\x03\b\x1A\n\x03\x07\x03\n\x111\x03\t\x1B\t\x03\x073.\x03\x07\x01\x00\x03\t/,\x03\x07#>\x03\x07\x048\x03\n\x1F\"\x03\t8>\x03\t\x11\x00\x03\b/\x17\x03\x06'\"\x03\v\x1A+\x03\n\"\x19\x03\n/1\x03\t74\x03\t\x0F\"\x03\b,\"\x03\b?\x14\x03\x07$5\x03\x07<3\x03\x07=*\x03\x07\x13\x18\x03\x068\n\x03\x06\t\x16\x03\x06\x13\x00\x03\b\x067\x03\b\x01\x03\x03\b\x12\x1D\x03\x07+7\x03\x06(;\x03\x06\x1C?\x03\x07\x0E\x17\x03\n\x06\x1D\x03\n\x19\x07\x03\b\x14$\x03\x07$;\x03\b,$\x03\b\x06\r\x03\x07\x16\n\x03\x06>>\x03\n\x06\x12\x03\n\x14)\x03\t\r\x1F\x03\t\x12\x17\x03\t\x19\x01\x03\b\x11 \x03\b\x1D'\x03\x06<\x1A\x03\n.\x00\x03\x07'\x18\x03\n\"\b\x03\b\r\n\x03\b\x13)\x03\x07*)\x03\x06<,\x03\x07\v\x1A\x03\t.\x14\x03\t\r\x1E\x03\x07\x0E#\x03\v\x1D'\x03\n\n8\x03\t%2\x03\b+&\x03\b0\x12\x03\n)4\x03\b\x06\x1F\x03\v\x1B\x1A\x03\n\x1B\x0F\x03\v\x1D*\x03\t\x16$\x03\t0\x11\x03\b\x11\b\x03\n*(\x03\n\x042\x03\b9,\x03\x074'\x03\x07\x0F\x05\x03\t\v\n\x03\x07\x1B\x01\x03\t\x17:\x03\t.\r\x03\x07.\x11\x03\t+\x15\x03\b0\x13\x03\v\x1F\x19\x03\n \x11\x03\n\"0\x03\t\x07;\x03\b\x16\x1C\x03\x07,\x13\x03\x07\x0E/\x03\x06\"1\x03\n.\n\x03\n7\x02\x03\n\x032\x03\n\x1D.\x03\t1\x06\x03\t\x19:\x03\b\x02/\x03\x060+\x03\x06\x0F-\x03\x06\x1C\x1F\x03\x06\x1D\x07\x03\n,\x11\x03\t=\r\x03\t\v;\x03\x07\x1B/\x03\n\x1F:\x03\t \x1F\x03\t.\x10\x03\t4\v\x03\t\x1A1\x03\b#\x1A\x03\b4\x1D\x03\b\x01\x1F\x03\b\x11\"\x03\x07'8\x03\x07\x1A>\x03\x0757\x03\x06&9\x03\x06+\x11\x03\n.\v\x03\n,>\x03\n4#\x03\b%\x17\x03\x07\x05\"\x03\x07\f\v\x03\n\x1D+\x03\n\x19\x16\x03\t+\x1F\x03\t\b\v\x03\b\x16\x18\x03\b+\x12\x03\v\x1D\f\x03\n=\x10\x03\n\t\r\x03\n\x10\x11\x03\t&0\x03\b(\x1F\x03\b7\x07\x03\b\x185\x03\x07'6\x03\x06.\x05\x03\x06=\x04\x03\x06;;\x03\x06\x06,\x03\v\x18>\x03\b\x00\x18\x03\x06 \x03\x03\x06<\x00\x03\t%\x18\x03\v\x1C<\x03\n%!\x03\n\t\x12\x03\n\x16\x02\x03\t0'\x03\t\x0E=\x03\b \x0E\x03\b>\x03\x03\x074>\x03\x06&?\x03\x06\x19\t\x03\x06?(\x03\n-\x0E\x03\t:3\x03\t8:\x03\t\x12\v\x03\t\x1D\x17\x03\b7\x05\x03\b2\x14\x03\b\x06%\x03\b\x13\x1F\x03\x06\x06\x0E\x03\n\"<\x03\t/<\x03\x06>+\x03\n'?\x03\n\x13\f\x03\t\x10<\x03\x07\x1B=\x03\n\x19\x13\x03\t\"\x1D\x03\t\x07\r\x03\b)\x1C\x03\x06=\x1A\x03\n/4\x03\n7\x11\x03\n\x16:\x03\t?3\x03\t:/\x03\t\x05\n\x03\t\x14\x06\x03\b7\"\x03\b0\x07\x03\b\x1A\x1F\x03\x07\x04(\x03\x07\x04\t\x03\x06 %\x03\x06<\b\x03\n+\x14\x03\t\x1D\x16\x03\n70\x03\b >\x03\b57\x03\x070\n\x03\x06=\x12\x03\x06\x16%\x03\x06\x1D,\x03\t9#\x03\t\x10>\x03\x07 \x1E\x03\b\f<\x03\b\v\x18\x03\b\x15+\x03\b,:\x03\b%\"\x03\x07\n$\x03\v\x1C=\x03\x07+\b\x03\n/\x05\x03\n \x07\x03\n\x12'\x03\t#\x11\x03\b\x1B\x15\x03\n\x06\x01\x03\t\x1C\x1B\x03\t22\x03\x07\x14<\x03\x07\t\x04\x03\x061\x04\x03\x07\x0E\x01\x03\n\x13\x18\x03\n-\f\x03\n?\r\x03\n\t\n\x03\t1&\x03\n/\v\x03\b$<\x03\b3\x1D\x03\b\f$\x03\b\r\x07\x03\b\r?\x03\b\x0E\x14\x03\x065\n\x03\b\x1A#\x03\b\x16#\x03\x0702\x03\x07\x03\x1A\x03\x06(\x1D\x03\x06+\x1B\x03\x06\v\x05\x03\x06\v\x17\x03\x06\f\x04\x03\x06\x1E\x19\x03\x06+0\x03\x062\x18\x03\v\x16\x1E\x03\n+\x16\x03\n-?\x03\n#:\x03\n#\x10\x03\n%$\x03\n>+\x03\n01\x03\n1\x10\x03\n\t9\x03\n\n\x12\x03\n\x19\x1F\x03\n\x19\x12\x03\t*)\x03\t-\x16\x03\t.1\x03\t.2\x03\t<\x0E\x03\t> \x03\t3\x12\x03\t\v\x01\x03\t\x1C2\x03\t\x11\x1C\x03\t\x15%\x03\b,&\x03\b!\"\x03\b9(\x03\b\v\x1A\x03\b\r2\x03\b\f\x04\x03\b\f\x06\x03\b\f\x1F\x03\b\f\f\x03\b\x0F\x1F\x03\b\x0F\x1D\x03\b\x00\x14\x03\b\x03\x14\x03\b\x06\x16\x03\b\x1E#\x03\b\x11\x11\x03\b\x10\x18\x03\b\x14(\x03\x07)\x1E\x03\x07.1\x03\x07 $\x03\x07 '\x03\x078\b\x03\x07\r0\x03\x07\x0F7\x03\x07\x05#\x03\x07\x05\x1A\x03\x07\x1A7\x03\x07\x1D-\x03\x07\x17\x10\x03\x06)\x1F\x03\x062\v\x03\x066\x16\x03\x06\t\x11\x03\t(\x1E\x03\x07!5\x03\v\x11\x16\x03\n/\x04\x03\n,\x1A\x03\v\x173\x03\n,1\x03\n/5\x03\n\"1\x03\n\"\r\x03\n?%\x03\n<,\x03\n?#\x03\n>\x19\x03\n\b&\x03\n\v\x0E\x03\n\f:\x03\n\f+\x03\n\x03\"\x03\n\x06)\x03\n\x11\x10\x03\n\x11\x1A\x03\n\x17-\x03\n\x14(\x03\t)\x1E\x03\t/\t\x03\t.\x00\x03\t,\x07\x03\t/*\x03\t-9\x03\t\"8\x03\t%\t\x03\t:\x12\x03\t;\x1D\x03\t?\x06\x03\t3%\x03\t6\x05\x03\t6\b\x03\t7\x02\x03\t\x07,\x03\t\x04,\x03\t\x1F\x16\x03\t\x11\x03\x03\t\x11\x12\x03\t\x168\x03\b*\x05\x03\b/2\x03\b4:\x03\b\"+\x03\b 0\x03\b&\n\x03\b;\x10\x03\b>$\x03\b>\x18\x03\b29\x03\b2:\x03\b1,\x03\b1<\x03\b1\x1C\x03\b7#\x03\b7*\x03\b\t'\x03\b\x00\x1D\x03\b\x05-\x03\b\x1F4\x03\b\x1D\x04\x03\b\x16\x0F\x03\x07*7\x03\x07'!\x03\x07%\x1B\x03\x077\f\x03\x07\f1\x03\x07\f.\x03\x07\x00\x06\x03\x07\x01\x02\x03\x07\x010\x03\x07\x06=\x03\x07\x01\x03\x03\x07\x01\x13\x03\x07\x06\x06\x03\x07\x05\n\x03\x07\x1F\t\x03\x07\x17:\x03\x06*1\x03\x06-\x1D\x03\x06\"3\x03\x062:\x03\x060$\x03\x066\x1E\x03\x064\x12\x03\x0645\x03\x06\v\x00\x03\x06\v7\x03\x06\x07\x1F\x03\x06\x15\x12\x03\f\x05\x0F\x03\v+\v\x03\v+-\x03\x06\x16\x1B\x03\x06\x15\x17\x03\x89\xCA\xEA\x03\x89\xCA\xE8\x03\f8\x10\x03\f8\x01\x03\f8\x0F\x03\r8%\x03\r8!\x03\f8-\x03\f8/\x03\f8+\x03\f87\x03\f85\x03\f9\t\x03\f9\r\x03\f9\x0F\x03\f9\v\x03\xCFu\f\x03\xCFu\x0F\x03\xCFu\x0E\x03\xCFu\t\x03\f9\x10\x03\r9\f\x03\xCF`;\x03\xCF`>\x03\xCF`9\x03\xCF`8\x03\xCF`7\x03\xCF`*\x03\xCF`-\x03\xCF`,\x03\r\x1B\x1A\x03\r\x1B&\x03\f=.\x03\f=%\x03\f>\x1E\x03\f>\x14\x03\f?\x06\x03\f?\v\x03\f?\f\x03\f?\r\x03\f?\x02\x03\f>\x0F\x03\f>\b\x03\f>\t\x03\f>,\x03\f>\f\x03\f?\x13\x03\f?\x16\x03\f?\x15\x03\f?\x1C\x03\f?\x1F\x03\f?\x1D\x03\f?\x1A\x03\f?\x17\x03\f?\b\x03\f?\t\x03\f?\x0E\x03\f?\x04\x03\f?\x05\x03\f\x03\f=2\x03\f=6\x03\f<\x07\x03\f<\x05\x03\x0E:!\x03\x0E:#\x03\x0E8\t\x03\x0E:&\x03\x0E8\v\x03\x0E:$\x03\x0E:,\x03\x0E8\x1A\x03\x0E8\x1E\x03\x0E:*\x03\x0E:7\x03\x0E:5\x03\x0E:;\x03\x0E:\x15\x03\x0E:<\x03\x0E:4\x03\x0E:'\x03\x0E:-\x03\x0E:%\x03\x0E:?\x03\x0E:=\x03\x0E:)\x03\x0E:/\x03\xCFs'\x03\r=\x0F\x03\r+*\x03\r99\x03\r9;\x03\r9?\x03\r)\r\x03\r(%\x02\x01\x18\x02\x01(\x02\x01\x1E\x03\x0F$!\x03\x0F87\x03\x0F4\x0E\x03\x0F5\x1D\x03\x06'\x03\x03\x0F\b\x18\x03\x0F\r\x1B\x03\x0E2=\x03\x0E;\b\x03\x0E:\v\x03\x0E\x06$\x03\x0E\r)\x03\x0E\x16\x1F\x03\x0E\x16\x1B\x03\r$\n\x03\x05,\x1D\x03\r. \x03\r.#\x03\f(/\x03\t%\x02\x03\r90\x03\r\x0E4\x03\r\r\x0F\x03\f#\x00\x03\f,\x1E\x03\f2\x0E\x03\f\x01\x17\x03\f\t:\x03\x0E\x173\x03\f\b\x03\x03\f\x11\x07\x03\f\x10\x18\x03\f\x1F\x1C\x03\f\x19\x0E\x03\f\x1A\x1F\x03\x0F0>\x03\v->\x03\v<+\x03\v8\x13\x03\v\x043\x03\v\x14\x03\x03\v\x16%\x03\r\"&\x03\v\x1A\x1A\x03\v\x1A\x04\x03\n%9\x03\n&2\x03\n&0\x03\n!\x1A\x03\n!7\x03\n5\x10\x03\n=4\x03\n?\x0E\x03\n>\x10\x03\n\x00 \x03\n\x0F:\x03\n\x0F9\x03\n\v\n\x03\n\x17%\x03\n\x1B-\x03\t-\x1A\x03\t,4\x03\t.,\x03\t)\t\x03\t6!\x03\t1\x1F\x03\t3\x16\x03\f+\x1F\x03\t8 \x03\t8=\x03\f(\x1A\x03\f(\x16\x03\t\n+\x03\t\x16\x12\x03\t\x13\x0E\x03\t\x153\x03\b)!\x03\t\x1A\x01\x03\t\x18\x01\x03\b%#\x03\b>\"\x03\b\x05%\x03\b\x02*\x03\b\x15;\x03\b\x1B7\x03\x0F\x07\x1D\x03\x0F\x04\x03\x03\x070\f\x03\x07;\v\x03\x07\b\x17\x03\x07\x12\x06\x03\x06/-\x03\x0671\x03\x065+\x03\x06>7\x03\x06\x049\x03\x05+\x1E\x03\x05,\x17\x03\x05 \x1D\x03\x05\"\x05\x03\x050\x1D"; - idnaValues = $toNativeArray($kindUint16, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 8, 8, 128, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 128, 128, 128, 128, 128, 128, 128, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 128, 128, 128, 128, 128, 128, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 128, 128, 128, 128, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 10, 24, 24, 24, 24, 24, 24, 24, 26, 24, 57, 24, 24, 960, 24, 74, 24, 24, 105, 121, 138, 5, 24, 8, 170, 201, 217, 24, 233, 281, 329, 24, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 377, 8, 53, 77, 57357, 8, 57357, 8, 8, 57373, 8, 57405, 8, 57373, 8, 409, 409, 57373, 8, 57405, 8, 57373, 8, 57469, 8, 441, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 101, 57373, 8, 57405, 8, 57373, 8, 473, 8, 125, 57357, 8, 57357, 8, 125, 57469, 8, 149, 173, 57405, 8, 8, 197, 221, 245, 57373, 8, 269, 293, 8, 317, 317, 57357, 8, 8, 8, 269, 341, 8, 365, 57357, 8, 57357, 8, 57357, 8, 389, 57469, 8, 413, 8, 8, 57357, 8, 389, 57597, 8, 437, 461, 57405, 8, 57373, 8, 485, 57357, 8, 8, 8, 57357, 8, 8, 8, 8, 8, 8, 8, 489, 489, 489, 509, 533, 557, 581, 605, 629, 57373, 8, 57597, 8, 57373, 8, 57405, 8, 57373, 8, 57469, 8, 57373, 8, 57405, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 653, 677, 701, 57357, 8, 725, 749, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 773, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 8, 8, 8, 8, 521, 57405, 8, 797, 553, 8, 8, 8, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 666, 698, 730, 762, 794, 826, 24, 24, 941, 857, 473, 873, 965, 24, 24, 24, 24, 24, 24, 24, 8, 24, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 989, 989, 13064, 1013, 889, 1037, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13248, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 57357, 8, 57357, 8, 1061, 8, 57357, 8, 64, 64, 930, 8, 8, 8, 962, 1085, 64, 64, 64, 64, 138, 978, 57685, 1109, 57645, 57661, 57645, 64, 989, 64, 1133, 1157, 8, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 57605, 1181, 1181, 64, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 1181, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57359, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57541, 1205, 1229, 57533, 57589, 57597, 57501, 57525, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 1253, 57733, 57741, 8, 1277, 989, 24, 57469, 8, 57813, 57357, 8, 8, 1301, 1325, 1325, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 24, 13064, 13064, 13064, 13064, 13064, 13080, 13080, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 64, 57373, 8, 57405, 8, 57373, 8, 57469, 8, 57373, 8, 57405, 8, 57373, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 64, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 1013, 2112, 2112, 2112, 2112, 2112, 2112, 24, 24, 2072, 24, 24, 2072, 24, 2072, 24, 24, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 2072, 2880, 64, 2072, 2072, 2568, 2056, 3080, 3080, 3080, 3080, 2568, 3080, 2568, 3080, 2568, 2568, 2568, 2568, 2568, 3080, 3080, 3080, 3080, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2072, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 24, 2072, 2072, 2072, 2568, 2568, 13064, 3080, 3080, 3080, 2056, 1065, 1105, 1145, 1185, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 3080, 3080, 3080, 3080, 3080, 3080, 3080, 3080, 3080, 2568, 3080, 2568, 3080, 2568, 2568, 3080, 3080, 2072, 3080, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 2112, 24, 13064, 13064, 13064, 13064, 13064, 13064, 2056, 2056, 13064, 13064, 24, 13064, 13064, 13064, 13064, 3080, 3080, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2568, 2568, 2568, 2056, 2056, 2568, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 64, 2880, 3080, 13064, 2568, 2568, 2568, 3080, 3080, 3080, 3080, 3080, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 3080, 2568, 3080, 2568, 2568, 3080, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 3080, 2568, 2568, 2568, 2568, 2568, 3080, 3080, 2568, 3080, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 3080, 3080, 3080, 13064, 13064, 13064, 64, 64, 2072, 64, 2568, 2056, 2568, 2568, 2568, 2568, 2056, 3080, 2568, 3080, 3080, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 12296, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 12296, 12296, 12296, 12296, 15112, 12296, 12296, 8, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 1225, 1281, 1337, 1393, 1449, 1505, 1561, 1617, 8, 8, 13064, 13064, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 64, 64, 64, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 12296, 12296, 13064, 13064, 13064, 13064, 64, 64, 12296, 12296, 64, 64, 12296, 12296, 15112, 8, 64, 64, 64, 64, 64, 64, 64, 64, 12296, 64, 64, 64, 64, 1673, 1729, 64, 1785, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 24, 13064, 64, 64, 13064, 13064, 12296, 64, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 1841, 64, 8, 1897, 64, 8, 8, 64, 64, 13064, 64, 12296, 12296, 12296, 13064, 13064, 64, 64, 64, 64, 13064, 13064, 64, 64, 13064, 13064, 15112, 64, 64, 64, 13064, 64, 64, 64, 64, 64, 64, 64, 1953, 2009, 2065, 8, 64, 2121, 64, 64, 64, 64, 64, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13064, 13064, 8, 8, 8, 13064, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 12296, 12296, 13064, 13064, 13064, 13064, 13064, 64, 13064, 13064, 12296, 64, 12296, 12296, 15112, 64, 64, 8, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 64, 64, 64, 64, 64, 64, 64, 8, 13064, 13064, 13064, 13064, 13064, 13064, 64, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 13064, 12296, 13064, 13064, 13064, 13064, 64, 64, 12296, 12296, 64, 64, 12296, 12296, 15112, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 12296, 64, 64, 64, 64, 2177, 2233, 64, 8, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 8, 24, 24, 24, 24, 24, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 8, 64, 8, 8, 8, 8, 8, 8, 64, 64, 64, 8, 8, 8, 64, 8, 8, 8, 8, 64, 64, 64, 8, 8, 64, 8, 64, 8, 8, 64, 64, 64, 8, 8, 64, 64, 64, 8, 8, 8, 64, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 12296, 12296, 13064, 12296, 12296, 12296, 12296, 64, 13064, 13064, 13064, 64, 13064, 13064, 13064, 15112, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 64, 8, 8, 8, 64, 64, 64, 64, 64, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 64, 64, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 13064, 12296, 12296, 24, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 64, 64, 13064, 8, 12296, 13064, 12296, 12296, 12296, 12296, 12296, 64, 13064, 12296, 12296, 64, 12296, 12296, 13064, 15112, 64, 64, 64, 64, 64, 64, 64, 12296, 12296, 64, 64, 64, 64, 64, 64, 64, 8, 64, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 12296, 13064, 13064, 13064, 13064, 64, 12296, 12296, 12296, 64, 12296, 12296, 12296, 15112, 8, 24, 64, 64, 64, 64, 8, 8, 8, 12296, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 13064, 13064, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 64, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13064, 8, 2345, 13064, 13064, 13064, 13064, 13064, 13064, 15112, 13064, 13064, 8, 64, 64, 8, 8, 8, 2513, 8, 8, 8, 8, 64, 8, 8, 8, 8, 2569, 8, 8, 8, 8, 2625, 8, 8, 8, 8, 2681, 8, 8, 8, 8, 2737, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2793, 8, 8, 8, 64, 64, 64, 64, 13064, 13064, 2849, 13064, 2905, 2961, 3017, 3097, 3153, 13064, 13064, 13064, 13064, 13064, 12296, 13064, 3233, 13064, 13064, 15112, 24, 13064, 13064, 8, 8, 8, 8, 8, 13064, 13064, 13064, 13064, 13064, 13064, 3289, 13064, 13064, 13064, 13064, 64, 13064, 13064, 13064, 13064, 3345, 13064, 13064, 13064, 13064, 3401, 13064, 13064, 13064, 13064, 3457, 13064, 13064, 13064, 13064, 3513, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 3569, 13064, 13064, 13064, 64, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 57, 3793, 3817, 8, 3833, 3849, 3865, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 8, 217, 3969, 3993, 617, 4009, 4025, 633, 57, 4041, 4065, 1461, 3817, 3833, 3849, 4089, 4113, 4137, 3889, 8, 3921, 3937, 4161, 217, 4185, 1485, 1485, 3993, 4009, 4025, 1461, 4209, 4233, 1509, 4249, 4273, 4297, 4321, 4345, 3905, 617, 4025, 4233, 4249, 4273, 4369, 4321, 4345, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4393, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4417, 4441, 4457, 4481, 4137, 4505, 4521, 4545, 4569, 4593, 4617, 4641, 1533, 4665, 4689, 57725, 4713, 4737, 4761, 4785, 4809, 4833, 4857, 4881, 4905, 4929, 4953, 4977, 5001, 1557, 5025, 5049, 5073, 5089, 5113, 5137, 5161, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 8, 8, 1581, 1613, 8, 8, 5185, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 8, 8, 8, 8, 64, 64, 57413, 57413, 57413, 57413, 57413, 57413, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 57413, 64, 57413, 64, 57413, 64, 57413, 8, 8, 8, 8, 8, 8, 8, 8, 57413, 57413, 57413, 57413, 57413, 57413, 57413, 57413, 8, 5209, 8, 5233, 8, 5257, 8, 5281, 8, 5305, 8, 5329, 8, 5353, 64, 64, 5377, 5425, 5473, 5521, 5569, 5617, 5665, 5713, 5377, 5425, 5473, 5521, 5569, 5617, 5665, 5713, 5761, 5809, 5857, 5905, 5953, 6001, 6049, 6097, 5761, 5809, 5857, 5905, 5953, 6001, 6049, 6097, 6145, 6193, 6241, 6289, 6337, 6385, 6433, 6481, 6145, 6193, 6241, 6289, 6337, 6385, 6433, 6481, 8, 8, 6529, 6577, 6617, 64, 8, 6657, 57413, 57413, 1637, 5209, 6577, 1662, 6705, 1694, 1726, 6730, 6777, 6825, 6865, 64, 8, 6905, 1757, 5233, 1781, 5257, 6825, 6954, 7002, 7050, 8, 8, 8, 7097, 64, 64, 8, 8, 57413, 57413, 1805, 5281, 64, 7122, 7170, 7218, 8, 8, 8, 7265, 8, 8, 8, 8, 57413, 57413, 1829, 5329, 57421, 7290, 978, 7338, 64, 64, 7353, 7401, 7441, 64, 8, 7481, 1853, 5305, 1301, 5353, 7401, 1878, 1910, 64, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 960, 3, 3, 832, 2880, 24, 57357, 24, 24, 24, 24, 24, 1942, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 64, 64, 64, 24, 64, 64, 832, 832, 832, 832, 832, 10, 24, 24, 24, 7529, 7585, 24, 7665, 7721, 24, 24, 24, 24, 7802, 24, 1974, 24, 24, 24, 24, 24, 24, 24, 24, 7826, 7850, 7874, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 7897, 24, 24, 24, 24, 24, 24, 24, 10, 960, 832, 832, 832, 960, 64, 64, 64, 64, 64, 832, 832, 832, 832, 832, 832, 8001, 3905, 64, 64, 8017, 8033, 8049, 8065, 8081, 8097, 8114, 2005, 8130, 8146, 8162, 3953, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8114, 2029, 8130, 8146, 8162, 64, 57, 3849, 217, 873, 4089, 585, 3921, 857, 3937, 3953, 3993, 473, 4009, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 24, 8177, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 2054, 2086, 4441, 2117, 24, 2150, 2182, 4113, 24, 2213, 3889, 585, 585, 585, 585, 8201, 3905, 3905, 857, 857, 24, 3953, 8225, 24, 24, 3993, 8249, 617, 617, 617, 24, 24, 8265, 2245, 8289, 24, 5073, 24, 8313, 24, 5073, 24, 3921, 8337, 3817, 4441, 24, 3849, 3849, 4505, 64, 3937, 217, 8361, 8385, 8409, 8433, 3905, 24, 2277, 8457, 4273, 4273, 8457, 2309, 24, 24, 24, 24, 3833, 3833, 3849, 3905, 601, 24, 24, 24, 24, 8, 24, 8481, 8529, 8577, 8633, 8681, 8729, 8777, 8825, 8873, 8921, 8969, 9017, 9065, 9113, 9161, 9209, 3905, 9249, 2333, 9273, 4233, 9297, 2365, 9321, 9361, 873, 9385, 2397, 857, 4441, 3833, 3937, 3905, 9249, 2429, 9273, 4233, 9297, 2461, 9321, 9361, 873, 9385, 2493, 857, 4441, 3833, 3937, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 9729, 9753, 9777, 9801, 9825, 9849, 9873, 9897, 9921, 9945, 9969, 2590, 2622, 2654, 2686, 2718, 2750, 2782, 2814, 2846, 9994, 10034, 10074, 10114, 10154, 10194, 10234, 10274, 10314, 10354, 10394, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 2878, 2910, 2942, 2974, 3006, 3038, 3070, 3102, 3134, 3166, 3198, 3230, 3262, 3294, 3326, 3358, 3390, 3422, 3454, 3486, 3518, 3550, 3582, 3614, 3646, 3678, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 8001, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 57357, 8, 10609, 3797, 10633, 8, 8, 57469, 8, 57373, 8, 57405, 8, 4065, 4737, 4041, 4417, 8, 57357, 8, 8, 57373, 8, 8, 8, 8, 8, 8, 601, 4233, 10657, 10681, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 24, 24, 24, 24, 24, 24, 57405, 8, 57373, 8, 13064, 13064, 13064, 57357, 8, 64, 64, 64, 64, 64, 24, 24, 24, 24, 24, 24, 24, 10005, 10037, 10069, 10101, 10133, 10165, 10197, 10229, 10261, 10293, 10325, 10357, 10389, 10421, 10453, 10485, 10517, 10549, 10581, 10613, 10645, 10677, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 10, 24, 10705, 24, 24, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 13064, 13064, 13064, 13064, 12312, 12312, 24, 24, 24, 24, 24, 24, 57637, 24, 10709, 10741, 10773, 24, 8, 24, 24, 24, 11093, 11125, 11157, 11189, 11221, 11253, 11253, 11253, 11285, 11285, 11285, 11285, 11317, 11317, 11317, 11349, 11381, 11381, 10901, 10901, 11381, 11381, 11413, 11413, 11381, 11381, 10901, 10901, 11381, 11381, 11349, 11349, 11445, 11445, 11477, 11477, 64, 11509, 11541, 11573, 11573, 11605, 11637, 11669, 11701, 11733, 11765, 11797, 11829, 11861, 11861, 11893, 11925, 11925, 11957, 11989, 11893, 12021, 12053, 12021, 11893, 12085, 12117, 12149, 12181, 12213, 11541, 11509, 12245, 12277, 12309, 12341, 12373, 12405, 12437, 12469, 12501, 12533, 12565, 64, 24, 24, 12597, 12629, 12661, 12693, 12725, 12757, 12789, 12821, 12853, 12885, 12661, 12917, 12949, 12981, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 13986, 14034, 14082, 14130, 13013, 13045, 13077, 13109, 24, 24, 24, 24, 24, 24, 24, 24, 13141, 14177, 14201, 14225, 14249, 14273, 14297, 14321, 14345, 14369, 14393, 14417, 14441, 14465, 14489, 14513, 13173, 13205, 13237, 13269, 13301, 13301, 13333, 13365, 13397, 13429, 13461, 13493, 13525, 13557, 13589, 13621, 13653, 13685, 13717, 13749, 13781, 13813, 13845, 13877, 13909, 13941, 13973, 14005, 14537, 14593, 14037, 24, 14069, 14101, 14133, 14165, 14197, 14229, 14261, 14293, 14325, 14357, 14389, 14421, 14453, 14485, 14517, 14549, 14581, 14613, 14645, 14677, 14709, 14741, 14773, 14805, 14837, 14869, 14901, 14933, 14965, 14997, 15029, 15061, 15093, 15125, 15157, 15189, 15221, 15253, 4757, 15285, 15317, 15349, 15381, 15413, 15445, 15477, 9141, 15509, 15541, 14649, 14673, 14697, 14721, 14745, 14769, 14793, 14817, 14841, 14865, 14889, 14913, 14937, 14961, 14985, 15009, 15049, 15089, 15129, 15169, 15209, 15249, 15289, 15329, 15369, 15417, 15465, 15513, 15573, 15537, 15605, 15637, 15661, 15685, 15709, 15733, 15733, 15709, 15757, 2005, 15781, 15805, 15829, 15853, 15877, 15901, 15925, 15949, 15973, 15997, 16021, 16045, 16045, 16069, 16069, 16093, 16093, 16117, 16141, 16165, 16189, 16213, 16213, 16237, 16237, 16237, 16261, 16285, 16309, 16333, 16309, 16357, 16381, 16261, 16405, 16429, 16429, 16429, 15561, 15617, 15721, 15825, 15929, 16009, 16113, 16193, 16273, 16401, 16505, 16585, 16665, 16745, 16849, 16953, 17033, 17113, 17169, 17249, 17353, 17457, 17513, 17641, 17793, 17921, 18001, 18129, 18257, 18361, 18441, 18521, 18601, 18705, 18833, 18937, 19017, 19097, 19177, 19233, 19289, 19345, 19401, 19481, 19561, 19689, 19769, 19873, 20001, 20081, 20137, 20193, 20321, 20425, 20553, 20633, 20761, 20817, 20897, 20977, 21057, 21137, 21217, 21321, 21401, 21457, 21537, 21617, 21697, 21801, 21881, 21961, 22041, 22169, 22273, 22329, 22457, 22513, 22617, 22721, 22801, 22881, 22961, 23065, 23121, 23201, 23305, 23361, 23489, 23569, 23609, 23649, 23689, 23729, 23769, 23809, 23849, 23889, 23929, 23969, 24017, 24065, 24113, 24161, 24209, 24257, 24305, 24353, 24401, 24449, 24497, 24545, 24593, 24641, 16453, 24689, 24713, 16485, 24737, 24761, 24785, 16517, 16517, 24809, 24833, 24889, 24945, 25001, 25057, 25161, 25185, 16549, 25209, 25233, 25257, 25281, 25305, 16581, 25329, 25369, 25393, 16613, 16613, 25417, 25441, 25465, 16645, 16677, 16709, 16741, 16773, 25489, 25513, 25537, 25561, 25585, 16805, 25609, 25633, 25657, 16837, 16869, 25681, 16901, 16933, 16965, 25705, 16997, 25729, 25777, 25161, 17029, 17061, 17093, 17125, 25833, 25897, 25969, 25993, 17157, 26017, 26041, 26065, 17189, 26089, 26113, 26089, 26137, 26161, 17221, 26185, 26209, 26185, 17253, 17285, 64, 26233, 26257, 26281, 26305, 64, 26361, 26385, 26409, 26433, 26457, 26481, 25657, 26505, 26529, 26553, 17317, 26577, 25281, 17349, 17381, 26601, 64, 17413, 26625, 26649, 26673, 26697, 26721, 26769, 26817, 26857, 26897, 26937, 26977, 27017, 27057, 27097, 27137, 27177, 27225, 27273, 27321, 27369, 27417, 27465, 27513, 27561, 27609, 27657, 27705, 27753, 27801, 27849, 27897, 27945, 27993, 28041, 28089, 28137, 28185, 17445, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 13064, 13080, 13080, 13080, 24, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 24, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 3745, 28233, 13064, 13064, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 24, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57597, 8, 8, 8, 8, 8, 8, 8, 8, 57373, 8, 57405, 8, 17477, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 8, 24, 24, 57405, 8, 4569, 8, 8, 57357, 8, 57357, 8, 8, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 28257, 4137, 4545, 28281, 4641, 8, 28305, 28329, 4665, 17509, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 57357, 8, 25869, 25901, 25933, 25965, 25997, 26029, 26061, 26093, 26125, 26157, 26189, 26221, 26253, 26285, 8, 8, 26317, 8, 26349, 8, 8, 26381, 26413, 26445, 26477, 26509, 26541, 26573, 26605, 26637, 26669, 8, 26701, 8, 26733, 8, 8, 26765, 26797, 8, 8, 8, 26829, 26861, 26893, 26925, 26957, 26989, 27021, 27053, 27085, 27117, 27149, 27181, 27213, 27245, 27277, 27309, 27341, 27373, 27405, 27437, 27469, 27501, 31437, 31469, 31501, 31533, 31565, 31597, 31629, 31661, 31693, 31725, 31757, 31789, 31821, 31853, 31885, 28441, 28481, 28521, 31917, 31949, 31981, 28561, 28601, 28641, 32013, 32045, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 28681, 28705, 28729, 32077, 32109, 28753, 28753, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 28777, 28817, 28857, 28897, 28937, 64, 64, 64, 64, 64, 28977, 13064, 29017, 29057, 8361, 8433, 29081, 29105, 29129, 29153, 29177, 29201, 8114, 29225, 29265, 29305, 29361, 29417, 29457, 29497, 29537, 29577, 29617, 29657, 29697, 29737, 64, 29777, 29817, 29857, 29897, 29937, 64, 29977, 64, 30017, 30057, 64, 30097, 30137, 64, 30177, 30217, 30257, 30297, 30337, 30377, 30417, 30457, 30497, 30537, 30577, 30577, 30601, 30601, 30601, 30601, 30625, 30625, 30625, 30625, 30649, 30649, 30649, 30649, 30673, 30673, 30673, 30673, 30697, 30697, 30697, 30697, 30721, 30721, 30721, 30721, 30745, 30745, 30745, 30745, 30769, 30769, 30769, 30769, 30793, 30793, 30793, 30793, 30817, 30817, 30817, 30817, 30841, 30841, 30841, 30841, 30865, 30865, 30865, 30865, 30889, 30889, 30913, 30913, 30937, 30937, 30961, 30961, 30985, 30985, 31009, 31009, 31033, 31033, 31033, 31033, 31057, 31057, 31057, 31057, 31081, 31081, 31081, 31081, 31105, 31105, 31105, 31105, 31129, 31129, 31153, 31153, 31153, 31153, 31177, 31177, 31201, 31201, 31201, 31201, 31225, 31225, 31225, 31225, 31249, 31249, 31273, 31273, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 31297, 31297, 31297, 31297, 31321, 31321, 31345, 31345, 31369, 31369, 1145, 31393, 31393, 31417, 31417, 31441, 31441, 31465, 31465, 31465, 31465, 31489, 31489, 31513, 31513, 31553, 31553, 31593, 31593, 31633, 31633, 31673, 31673, 31713, 31713, 31753, 31753, 31753, 31793, 31793, 31793, 31833, 31833, 31833, 31833, 34377, 34417, 34457, 34497, 34537, 34577, 34617, 34657, 34697, 34737, 34777, 34817, 34857, 34897, 34937, 34977, 35017, 35057, 35097, 35137, 35177, 35217, 35257, 35297, 35337, 35377, 35417, 35457, 35497, 35537, 35578, 35626, 35674, 35722, 35770, 35818, 35865, 35905, 31937, 35945, 31793, 31977, 35985, 36025, 32137, 36065, 32177, 32217, 36105, 36145, 32377, 36185, 32417, 32457, 36225, 36265, 32537, 36305, 32577, 32617, 33777, 33817, 33937, 33977, 34017, 34177, 34217, 34257, 34297, 34457, 34497, 34537, 36345, 34697, 36385, 36425, 34937, 36465, 34977, 35017, 35537, 36505, 36545, 35337, 36585, 35377, 35417, 31857, 31897, 36625, 31937, 36665, 32017, 32057, 32097, 32137, 36705, 32257, 32297, 32337, 32377, 36745, 32537, 32657, 32697, 32737, 32777, 32817, 32897, 32937, 32977, 33017, 33057, 33097, 36785, 33137, 33177, 33217, 33257, 33297, 33337, 33417, 33457, 33497, 33537, 33577, 33617, 33657, 33697, 33737, 33857, 33897, 34057, 34097, 34137, 34177, 34217, 34337, 34377, 34417, 34457, 36825, 34577, 34617, 34657, 34697, 34817, 34857, 34897, 34937, 36865, 35057, 35097, 36905, 35217, 35257, 35297, 35337, 36945, 31937, 36665, 32137, 36705, 32377, 36745, 32537, 36985, 33057, 37025, 37065, 37105, 34177, 34217, 34457, 34937, 36865, 35337, 36945, 37145, 37201, 37257, 37313, 37353, 37393, 37433, 37473, 37513, 37553, 37593, 37633, 37673, 37713, 37753, 37793, 37833, 37873, 37913, 37953, 37993, 38033, 38073, 38113, 38153, 38193, 37065, 38233, 38273, 38313, 38353, 37313, 37353, 37393, 37433, 37473, 37513, 37553, 37593, 37633, 37673, 37713, 37753, 37793, 37833, 37873, 37913, 37953, 37993, 38033, 38073, 38113, 38153, 38193, 37065, 38233, 38273, 38313, 38353, 38113, 38153, 38193, 37065, 37025, 37105, 33377, 32937, 32977, 33017, 38113, 38153, 38193, 33377, 33417, 38393, 38393, 24, 24, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 38433, 38489, 38489, 38545, 38601, 38657, 38713, 38769, 38825, 38825, 38881, 38937, 38993, 39049, 39105, 39161, 39161, 39217, 39273, 39273, 39329, 39329, 39385, 39441, 39441, 39497, 39553, 39553, 39609, 39609, 39665, 39721, 39721, 39777, 39777, 39833, 39889, 39945, 40001, 40001, 40057, 40113, 40169, 40225, 40281, 40281, 40337, 40393, 43417, 43473, 43529, 43249, 39945, 39385, 43585, 43641, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 43697, 43753, 43809, 43881, 43953, 44025, 44097, 44169, 44241, 44313, 44370, 44642, 44769, 24, 64, 64, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 13248, 44842, 32141, 64, 44858, 962, 44874, 44890, 32173, 32205, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 64, 32237, 32269, 44906, 44906, 8146, 8162, 44922, 44938, 32301, 32333, 32365, 32301, 32397, 32429, 32397, 32461, 32493, 32525, 32493, 32557, 24, 24, 44954, 44970, 32590, 32622, 32654, 32686, 44906, 44906, 44906, 44842, 32717, 64, 64, 962, 44858, 44890, 44874, 32749, 8146, 8162, 44922, 44938, 32461, 32557, 44986, 45002, 45018, 8114, 45033, 45050, 45066, 8130, 64, 45082, 45098, 45114, 45130, 64, 64, 64, 64, 32782, 45145, 32814, 2056, 32846, 64, 32878, 45185, 32910, 45225, 32942, 45265, 32974, 45305, 33006, 45345, 45385, 45409, 45409, 45433, 45433, 45457, 45457, 45481, 45481, 45505, 45505, 45505, 45505, 45529, 45529, 45553, 45553, 45553, 45553, 45577, 45577, 45601, 45601, 45601, 45601, 45625, 45625, 45625, 45625, 45649, 45649, 45649, 45649, 45673, 45673, 45673, 45673, 45697, 45697, 45697, 45697, 45721, 45721, 45745, 45745, 45769, 45769, 45793, 45793, 45817, 45817, 45817, 45817, 45841, 45841, 45841, 45841, 45865, 45865, 45865, 45865, 45889, 45889, 45889, 45889, 45913, 45913, 45913, 45913, 45937, 45937, 45937, 45937, 45961, 45961, 45961, 45961, 45985, 45985, 45985, 45985, 46009, 46009, 46009, 46009, 46033, 46033, 46033, 46033, 46057, 46057, 46057, 46057, 46081, 46081, 46081, 46081, 46105, 46105, 46105, 46105, 46129, 46129, 46129, 46129, 46153, 46153, 46153, 46153, 46177, 46177, 31489, 31489, 46201, 46201, 46201, 46201, 46225, 46225, 46265, 46265, 46305, 46305, 46345, 46345, 64, 64, 960, 64, 44874, 46386, 44986, 45098, 45114, 45002, 46402, 8146, 8162, 45018, 8114, 44842, 45033, 10705, 46418, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 44858, 962, 45050, 8130, 45066, 44890, 45130, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 44954, 45082, 44970, 46434, 44906, 7338, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 44922, 46450, 44938, 46466, 33037, 33069, 10705, 33101, 33101, 33133, 33165, 33197, 33229, 33261, 33293, 33325, 33357, 33389, 33421, 33453, 33485, 33517, 33549, 33581, 33613, 33645, 33677, 33709, 33741, 33773, 33805, 33837, 33869, 33261, 33901, 33933, 33357, 33965, 33997, 34029, 34061, 34093, 34125, 34157, 34189, 34061, 34221, 34061, 34253, 34253, 34285, 34285, 34317, 34125, 34349, 34381, 34349, 34413, 34381, 34445, 34445, 34477, 34477, 34509, 34509, 34381, 33101, 34541, 34573, 64, 34605, 34637, 34669, 34701, 34669, 34733, 34765, 34797, 34797, 34829, 34829, 34861, 34861, 34829, 34829, 34893, 34925, 34957, 34989, 35021, 35053, 35053, 35053, 35085, 35085, 35085, 35085, 34797, 34797, 34797, 64, 64, 64, 34637, 34605, 35117, 34605, 34637, 34605, 64, 64, 35149, 34637, 35181, 35117, 35181, 34637, 64, 64, 35213, 35245, 34989, 35181, 35117, 35181, 64, 64, 35277, 35309, 35277, 64, 64, 64, 46481, 46505, 46529, 35342, 46553, 46577, 35373, 64, 35405, 35437, 35469, 35437, 35501, 35533, 35565, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 832, 832, 832, 64, 64, 64, 64, 2568, 2568, 2568, 2568, 2568, 3080, 2056, 3080, 2072, 3080, 3080, 2056, 2056, 2312, 3080, 3080, 3080, 3080, 3080, 2568, 2568, 2568, 2568, 2312, 2568, 2568, 2568, 2568, 2568, 3080, 2568, 2568, 2568, 3080, 2056, 2056, 3080, 13064, 13064, 64, 64, 64, 64, 2584, 2584, 2584, 2584, 3096, 2072, 2072, 2072, 2072, 2072, 2072, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 2568, 3080, 2568, 3080, 3080, 3080, 2568, 2568, 2568, 3080, 2568, 2568, 3080, 2568, 3080, 3080, 2568, 3080, 64, 64, 64, 64, 64, 64, 64, 2072, 2072, 2072, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 3096, 3096, 3096, 3096, 2584, 2584, 2072, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 13064, 13064, 12296, 12296, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 64, 13064, 13064, 8, 12296, 12296, 13064, 12296, 12296, 12296, 12296, 64, 64, 12296, 12296, 64, 64, 12296, 12296, 14344, 64, 64, 8, 64, 64, 64, 64, 64, 64, 12296, 64, 64, 64, 64, 64, 8, 8, 8, 8, 8, 12296, 12296, 64, 64, 13064, 13064, 13064, 13064, 13064, 13064, 13064, 64, 64, 64, 13064, 13064, 13064, 13064, 13064, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 8, 8, 8, 8, 8, 8, 8, 64, 64, 8, 64, 64, 8, 8, 8, 8, 8, 8, 8, 8, 64, 8, 8, 64, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12296, 12296, 12296, 12296, 12296, 12296, 64, 12296, 12296, 64, 64, 13064, 13064, 14344, 15112, 8, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 64, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 64, 4441, 3833, 64, 64, 3889, 64, 64, 601, 3921, 64, 64, 3953, 217, 3993, 8249, 64, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 64, 4505, 64, 585, 3905, 601, 3921, 857, 3937, 3953, 64, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 64, 3833, 3849, 4505, 3889, 64, 64, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 64, 473, 4009, 4025, 4233, 633, 873, 649, 64, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 64, 3833, 3849, 4505, 3889, 64, 3905, 601, 3921, 857, 3937, 64, 217, 64, 64, 64, 473, 4009, 4025, 4233, 633, 873, 649, 64, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 47825, 47849, 64, 64, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 5161, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48209, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 48113, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48241, 47897, 5161, 47969, 4321, 4369, 8457, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 5161, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48209, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 48113, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48241, 47897, 5161, 47969, 4321, 4369, 8457, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 5161, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48209, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 48113, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48241, 47897, 5161, 47969, 4321, 4369, 8457, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 5161, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48209, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 48113, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48241, 47897, 5161, 47969, 4321, 4369, 8457, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 5161, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48209, 47873, 4249, 4273, 4297, 47897, 47921, 47945, 5161, 6705, 47969, 47993, 48017, 48041, 48065, 48089, 8457, 4369, 48113, 48113, 48137, 48161, 4321, 4345, 48185, 8313, 48241, 47897, 5161, 47969, 4321, 4369, 8457, 48273, 48273, 64, 64, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 8001, 201, 105, 121, 8017, 8033, 8049, 8065, 8081, 8097, 57621, 57621, 57653, 57653, 57621, 57621, 57717, 57717, 57621, 57621, 57653, 57653, 57621, 57621, 57845, 57845, 57621, 57621, 57653, 57653, 57621, 57621, 57717, 57717, 57621, 57621, 57653, 57653, 57621, 57621, 35645, 35645, 1205, 1205, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 2568, 45529, 45553, 45649, 45721, 64, 46177, 45793, 45673, 45913, 46201, 46057, 46081, 46105, 46129, 45817, 45961, 46009, 45865, 46033, 45769, 45841, 45601, 45625, 45697, 45745, 45889, 45937, 45985, 48297, 31129, 48321, 48345, 64, 45553, 45649, 64, 46153, 64, 64, 45673, 64, 46201, 46057, 46081, 46105, 46129, 45817, 45961, 46009, 45865, 46033, 64, 45841, 45601, 45625, 45697, 64, 45889, 64, 45985, 64, 64, 64, 64, 64, 64, 45649, 64, 64, 64, 64, 45673, 64, 46201, 64, 46081, 64, 46129, 45817, 45961, 64, 45865, 46033, 64, 45841, 64, 64, 45697, 64, 45889, 64, 45985, 64, 31129, 64, 48345, 64, 45553, 45649, 64, 46153, 64, 64, 45673, 45913, 46201, 46057, 64, 46105, 46129, 45817, 45961, 46009, 45865, 46033, 64, 45841, 45601, 45625, 45697, 64, 45889, 45937, 45985, 48297, 64, 48321, 64, 45529, 45553, 45649, 45721, 46153, 46177, 45793, 45673, 45913, 46201, 64, 46081, 46105, 46129, 45817, 45961, 46009, 45865, 46033, 45769, 45841, 45601, 45625, 45697, 45745, 45889, 45937, 45985, 64, 64, 64, 64, 64, 45553, 45649, 45721, 64, 46177, 45793, 45673, 45913, 46201, 64, 46081, 46105, 46129, 45817, 45961, 46009, 45865, 46033, 45769, 45841, 45601, 45625, 45697, 45745, 45889, 45937, 45985, 64, 64, 64, 64, 64, 48370, 48394, 48418, 48442, 48466, 48490, 48514, 48538, 48562, 48586, 24, 24, 24, 24, 24, 48610, 48642, 48674, 48706, 48738, 48770, 48802, 48834, 48866, 48898, 48930, 48962, 48994, 49026, 49058, 49090, 49122, 49154, 49186, 49218, 49250, 49282, 49314, 49346, 49378, 49410, 49441, 4441, 617, 26281, 49505, 24, 57, 3817, 4441, 3833, 3849, 4505, 3889, 585, 3905, 601, 3921, 857, 3937, 3953, 217, 3993, 8249, 617, 473, 4009, 4025, 4233, 633, 873, 649, 5073, 49529, 26089, 49553, 5185, 49577, 49609, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 49633, 49657, 49681, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 49729, 49785, 49841, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 49873, 49905, 49937, 49969, 50001, 50033, 50065, 50097, 50129, 50161, 50193, 50225, 50257, 50289, 50321, 50353, 50385, 50417, 50449, 50481, 50513, 50545, 50577, 50609, 50641, 50673, 50705, 50737, 50769, 50801, 50833, 50865, 50897, 50929, 50961, 50993, 51025, 51057, 51089, 51121, 51153, 51185, 51217, 51249, 64, 64, 64, 64, 52065, 52097, 52129, 35669, 52161, 52193, 52225, 52257, 52289, 52321, 52353, 52385, 52417, 35701, 52449, 52481, 52513, 52545, 35733, 52577, 52609, 50321, 35765, 52641, 52673, 52705, 52737, 52769, 35797, 52801, 52833, 52865, 52897, 52929, 51185, 52961, 52993, 53025, 53057, 53089, 53121, 53153, 53185, 53217, 53249, 53281, 53313, 53345, 53377, 53409, 53409, 53409, 35829, 53441, 53473, 53505, 35861, 53537, 53569, 53601, 53633, 53665, 53697, 53729, 53761, 53793, 53825, 53857, 53889, 53921, 53921, 53953, 53985, 54017, 54049, 54081, 54113, 54145, 54177, 54209, 54241, 54273, 54305, 54337, 54369, 54401, 54433, 54465, 54497, 35893, 54529, 54561, 54593, 50033, 54625, 54657, 35925, 35957, 54689, 54721, 54753, 54785, 54817, 54849, 8256, 54881, 54913, 54913, 35989, 54945, 54977, 55009, 55041, 36021, 55073, 55105, 8256, 55137, 55169, 55201, 55233, 55265, 55297, 36053, 55329, 36085, 55361, 55393, 55425, 55457, 55489, 55521, 55553, 55585, 55617, 55649, 55681, 36117, 55713, 55745, 55777, 55809, 55841, 36149, 55873, 36181, 36213, 55905, 55937, 55937, 55969, 36245, 36277, 56001, 56033, 56065, 56097, 56129, 56161, 56193, 56225, 56257, 56289, 56321, 36309, 56353, 56385, 56417, 56449, 56417, 56481, 56513, 56545, 56577, 56609, 56641, 56673, 56705, 56737, 56769, 56801, 56833, 56865, 56897, 36341, 56929, 56961, 56993, 57025, 57057, 36373, 57089, 58881, 58913, 58945, 58977, 59009, 59041, 36661, 59073, 59105, 59137, 59169, 59201, 59233, 36693, 59265, 59297, 36725, 36757, 59329, 59361, 59393, 59425, 59457, 59489, 59521, 59553, 59585, 36789, 59617, 36821, 59649, 8256, 59681, 59713, 59745, 36853, 59777, 59809, 36885, 36917, 59841, 59873, 59905, 59937, 59969, 59969, 60001, 60033, 60065, 60097, 60129, 60161, 60193, 36949, 60225, 36981, 60257, 37013, 60289, 37045, 37077, 37109, 60321, 60353, 60385, 37141, 37173, 37205, 37237, 60417, 60449, 60449, 60481, 60513, 60545, 60577, 60609, 37269, 60641, 60673, 60705, 60737, 37301, 60769, 37333, 37365, 60801, 60833, 60865, 60897, 60929, 60961, 37397, 37429, 37461, 8256, 60993, 37493, 61025, 61057, 61089, 37525, 61121, 61153, 61185, 61217, 61249, 37557, 61281, 61313, 61345, 61377, 61409, 61441, 37589, 37621, 61473, 37653, 61505, 37685, 61537, 61569, 61601, 37717, 37749, 61633, 37781, 61665, 63265, 63297, 63329, 63361, 63393, 38229, 63425, 63457, 63489, 63521, 63553, 38261, 38293, 63585, 63617, 63649, 63681, 63713, 63745, 38325, 63777, 63809, 63841, 63873, 38357, 38389, 63905, 63937, 63969, 38421, 64001, 64033, 26701, 38453, 64065, 64097, 64129, 38485, 64161, 64193, 64225, 64257, 64289, 64321, 64353, 38517, 64385, 64417, 64449, 38549, 64481, 64513, 64545, 64577, 31597, 38581, 64609, 64641, 64673, 38613, 64705, 38645, 64737, 64737, 64769, 38677, 64801, 64833, 64865, 64897, 64929, 64961, 64993, 38709, 65025, 65057, 65089, 65121, 65153, 65185, 38741, 65217, 38773, 38805, 38837, 65249, 65281, 65313, 65345, 65377, 65409, 65441, 65473, 38869, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64]); - idnaIndex = $toNativeArray($kindUint16, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 126, 2, 3, 4, 5, 6, 127, 128, 7, 129, 8, 9, 10, 130, 11, 12, 13, 14, 131, 132, 133, 15, 16, 134, 17, 18, 135, 136, 137, 2, 3, 4, 5, 6, 7, 7, 7, 7, 8, 9, 7, 7, 10, 11, 12, 30, 31, 31, 33, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 19, 139, 140, 141, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 142, 143, 30, 31, 32, 144, 33, 145, 146, 147, 148, 34, 149, 150, 35, 36, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 160, 160, 160, 160, 160, 160, 160, 160, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 37, 38, 39, 196, 40, 40, 41, 40, 197, 42, 43, 44, 45, 46, 47, 198, 48, 49, 199, 156, 200, 201, 156, 156, 202, 156, 156, 156, 203, 50, 51, 52, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 204, 205, 156, 206, 156, 207, 208, 156, 209, 53, 40, 54, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 55, 56, 221, 222, 223, 224, 57, 58, 225, 226, 59, 60, 61, 62, 63, 64, 65, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 156, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 227, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 228, 229, 160, 160, 160, 160, 230, 66, 67, 231, 68, 69, 70, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 249, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 252, 253, 254, 255, 71, 256, 257, 72, 73, 74, 75, 76, 258, 77, 78, 79, 80, 81, 259, 82, 83, 84, 85, 86, 87, 88, 89, 90, 260, 261, 160, 262, 263, 156, 264, 265, 251, 251, 266, 267, 268, 269, 270, 271, 272, 160, 273, 274, 275, 276, 251, 251, 160, 160, 160, 160, 277, 278, 251, 251, 279, 280, 281, 282, 283, 251, 284, 285, 286, 287, 288, 91, 289, 290, 92, 251, 291, 292, 293, 294, 295, 251, 251, 251, 251, 296, 297, 251, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 251, 311, 312, 93, 94, 251, 251, 313, 314, 315, 316, 251, 251, 317, 318, 319, 320, 321, 322, 323, 251, 251, 251, 324, 251, 325, 326, 95, 327, 328, 329, 330, 331, 332, 333, 251, 251, 251, 251, 334, 335, 336, 251, 337, 338, 339, 251, 251, 251, 251, 340, 251, 251, 341, 342, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 343, 251, 156, 344, 160, 160, 160, 345, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 346, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 160, 160, 160, 160, 160, 160, 160, 160, 347, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 160, 160, 160, 160, 160, 160, 160, 333, 348, 251, 349, 350, 351, 352, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 353, 354, 251, 160, 355, 356, 357, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 358, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 359, 360, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 160, 160, 160, 361, 362, 160, 160, 160, 160, 160, 363, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 364, 365, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 156, 156, 156, 366, 367, 368, 369, 370, 156, 371, 251, 372, 156, 373, 251, 251, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 156, 156, 156, 156, 156, 156, 156, 156, 374, 375, 376, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 377, 251, 251, 251, 378, 379, 251, 251, 251, 251, 251, 380, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 291, 291, 291, 381, 112, 382, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 383, 384, 251, 385, 251, 251, 251, 113, 114, 115, 386, 251, 251, 251, 251, 387, 156, 388, 389, 116, 117, 390, 391, 118, 392, 251, 251, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 393, 156, 394, 156, 395, 396, 397, 398, 251, 156, 399, 156, 400, 156, 401, 402, 403, 156, 156, 404, 405, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 406, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 407, 160, 160, 160, 408, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 409, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 410, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 119, 120, 121, 411, 122, 123, 412, 124, 125, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, 413, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 15, 16, 17, 11, 18, 7, 19, 11, 11, 20, 11, 21, 22, 23, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 24, 25, 26, 7, 27, 28, 7, 29, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 414, 415, 251, 251, 416, 416, 416, 417, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 251, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 32, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - idnaSparseOffset = new sliceType([0, 8, 25, 37, 39, 44, 51, 62, 74, 78, 93, 98, 108, 120, 133, 139, 148, 164, 178, 189, 202, 219, 229, 236, 249, 266, 273, 284, 299, 313, 323, 325, 330, 333, 336, 338, 350, 361, 369, 375, 381, 386, 391, 394, 398, 404, 409, 421, 431, 437, 454, 464, 467, 475, 478, 491, 499, 503, 510, 518, 534, 546, 549, 559, 571, 583, 595, 603, 608, 621, 638, 642, 653, 657, 666, 674, 680, 685, 688, 692, 698, 702, 706, 710, 716, 724, 731, 742, 752, 756, 759, 765, 769, 771, 774, 776, 779, 789, 792, 807, 811, 816, 819, 823, 828, 833, 839, 856, 872, 878, 882, 897, 902, 910, 920, 931, 939, 956, 965, 981, 994, 1006, 1011, 1024, 1028, 1033, 1035, 1037, 1041, 1043, 1047, 1056, 1062, 1066, 1082, 1092, 1097, 1100, 1106, 1113, 1118, 1122, 1128, 1133, 1142, 1147, 1153, 1160, 1167, 1174, 1178, 1183, 1186, 1191, 1203, 1209, 1214, 1221, 1229, 1234, 1238, 1254, 1261, 1265, 1269, 1276, 1278, 1281, 1284, 1288, 1297, 1301, 1309, 1317, 1325, 1337, 1349, 1355, 1364, 1376, 1383, 1392, 1403, 1410, 1425, 1438, 1451, 1460, 1464, 1479, 1487, 1498, 1507, 1513, 1521, 1530, 1541, 1544, 1556, 1565, 1568, 1573, 1582, 1587, 1600, 1611, 1620, 1630, 1633, 1643, 1652, 1664, 1677, 1690, 1704, 1711, 1715, 1719, 1722, 1727, 1730, 1735, 1738, 1745, 1752, 1756, 1767, 1770, 1773, 1776, 1782, 1788, 1797, 1800, 1803, 1806, 1809, 1816, 1819, 1824, 1834, 1837, 1841, 1856, 1868, 1872, 1877, 1881, 1886, 1890, 1895, 1904, 1915, 1921, 1927, 1933, 1939, 1948, 1951, 1954, 1958, 1962, 1966, 1972, 1978, 1983, 1986, 2002, 2009, 2012, 2017, 2021, 2027, 2034, 2038, 2042, 2051, 2058, 2063, 2067, 2081, 2084, 2087, 2091, 2095, 2098, 2114, 2131, 2134, 2139, 2141, 2143]); - idnaSparseValues = $toNativeArray($kindStruct, [new valueRange.ptr(0, 7, 0), new valueRange.ptr(57605, 128, 150), new valueRange.ptr(24, 151, 151), new valueRange.ptr(57605, 152, 158), new valueRange.ptr(31, 159, 159), new valueRange.ptr(8, 160, 182), new valueRange.ptr(24, 183, 183), new valueRange.ptr(8, 184, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(57373, 129, 129), new valueRange.ptr(8, 130, 130), new valueRange.ptr(821, 131, 131), new valueRange.ptr(845, 132, 132), new valueRange.ptr(869, 133, 133), new valueRange.ptr(57357, 134, 134), new valueRange.ptr(8, 135, 135), new valueRange.ptr(57357, 136, 136), new valueRange.ptr(8, 137, 137), new valueRange.ptr(57357, 138, 138), new valueRange.ptr(8, 139, 139), new valueRange.ptr(57357, 140, 140), new valueRange.ptr(8, 141, 141), new valueRange.ptr(57357, 142, 142), new valueRange.ptr(8, 143, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(585, 176, 176), new valueRange.ptr(893, 177, 177), new valueRange.ptr(601, 178, 178), new valueRange.ptr(617, 179, 179), new valueRange.ptr(845, 180, 180), new valueRange.ptr(917, 181, 181), new valueRange.ptr(57789, 182, 182), new valueRange.ptr(633, 183, 183), new valueRange.ptr(649, 184, 184), new valueRange.ptr(8, 185, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(13064, 128, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(1013, 128, 143), new valueRange.ptr(57605, 144, 159), new valueRange.ptr(1181, 160, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(57733, 128, 143), new valueRange.ptr(1349, 144, 150), new valueRange.ptr(64, 151, 152), new valueRange.ptr(8, 153, 153), new valueRange.ptr(24, 154, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(1025, 135, 135), new valueRange.ptr(8, 136, 136), new valueRange.ptr(24, 137, 138), new valueRange.ptr(64, 139, 140), new valueRange.ptr(24, 141, 143), new valueRange.ptr(64, 144, 144), new valueRange.ptr(13064, 145, 189), new valueRange.ptr(2072, 190, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2072, 128, 128), new valueRange.ptr(13064, 129, 130), new valueRange.ptr(2072, 131, 131), new valueRange.ptr(13064, 132, 133), new valueRange.ptr(2072, 134, 134), new valueRange.ptr(13064, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(2056, 144, 170), new valueRange.ptr(64, 171, 174), new valueRange.ptr(2056, 175, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2568, 128, 135), new valueRange.ptr(3080, 136, 153), new valueRange.ptr(2568, 154, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(13064, 128, 138), new valueRange.ptr(64, 139, 140), new valueRange.ptr(3080, 141, 141), new valueRange.ptr(2568, 142, 152), new valueRange.ptr(3080, 153, 155), new valueRange.ptr(2568, 156, 170), new valueRange.ptr(3080, 171, 172), new valueRange.ptr(2568, 173, 176), new valueRange.ptr(3080, 177, 177), new valueRange.ptr(2568, 178, 178), new valueRange.ptr(3080, 179, 180), new valueRange.ptr(2568, 181, 183), new valueRange.ptr(3080, 184, 185), new valueRange.ptr(2568, 186, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(2056, 128, 165), new valueRange.ptr(13064, 166, 176), new valueRange.ptr(2056, 177, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(2056, 128, 137), new valueRange.ptr(2568, 138, 170), new valueRange.ptr(13064, 171, 179), new valueRange.ptr(2056, 180, 181), new valueRange.ptr(24, 182, 185), new valueRange.ptr(2072, 186, 186), new valueRange.ptr(64, 187, 188), new valueRange.ptr(13064, 189, 189), new valueRange.ptr(2072, 190, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(13064, 150, 153), new valueRange.ptr(2056, 154, 154), new valueRange.ptr(13064, 155, 163), new valueRange.ptr(2056, 164, 164), new valueRange.ptr(13064, 165, 167), new valueRange.ptr(2056, 168, 168), new valueRange.ptr(13064, 169, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(2072, 176, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(2568, 160, 169), new valueRange.ptr(3080, 170, 172), new valueRange.ptr(2056, 173, 173), new valueRange.ptr(3080, 174, 174), new valueRange.ptr(2568, 175, 176), new valueRange.ptr(3080, 177, 178), new valueRange.ptr(2568, 179, 180), new valueRange.ptr(64, 181, 181), new valueRange.ptr(2568, 182, 184), new valueRange.ptr(3080, 185, 185), new valueRange.ptr(2568, 186, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(2568, 128, 135), new valueRange.ptr(64, 136, 146), new valueRange.ptr(13064, 147, 161), new valueRange.ptr(2112, 162, 162), new valueRange.ptr(13064, 163, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 130), new valueRange.ptr(12296, 131, 131), new valueRange.ptr(8, 132, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(12296, 187, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(12296, 129, 130), new valueRange.ptr(64, 131, 133), new valueRange.ptr(12296, 134, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(12296, 138, 140), new valueRange.ptr(15112, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 144), new valueRange.ptr(64, 145, 150), new valueRange.ptr(12296, 151, 151), new valueRange.ptr(64, 152, 165), new valueRange.ptr(8, 166, 175), new valueRange.ptr(24, 176, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(12296, 129, 131), new valueRange.ptr(13064, 132, 132), new valueRange.ptr(8, 133, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(8, 142, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(8, 146, 168), new valueRange.ptr(64, 169, 169), new valueRange.ptr(8, 170, 185), new valueRange.ptr(64, 186, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(13064, 190, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 131), new valueRange.ptr(8, 132, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(8, 142, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(8, 146, 186), new valueRange.ptr(15112, 187, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(13064, 129, 129), new valueRange.ptr(12296, 130, 131), new valueRange.ptr(64, 132, 132), new valueRange.ptr(8, 133, 150), new valueRange.ptr(64, 151, 153), new valueRange.ptr(8, 154, 177), new valueRange.ptr(64, 178, 178), new valueRange.ptr(8, 179, 187), new valueRange.ptr(64, 188, 188), new valueRange.ptr(8, 189, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 137), new valueRange.ptr(15112, 138, 138), new valueRange.ptr(64, 139, 142), new valueRange.ptr(12296, 143, 145), new valueRange.ptr(13064, 146, 148), new valueRange.ptr(64, 149, 149), new valueRange.ptr(13064, 150, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(12296, 152, 159), new valueRange.ptr(64, 160, 165), new valueRange.ptr(8, 166, 175), new valueRange.ptr(64, 176, 177), new valueRange.ptr(12296, 178, 179), new valueRange.ptr(24, 180, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 176), new valueRange.ptr(13064, 177, 177), new valueRange.ptr(8, 178, 178), new valueRange.ptr(2289, 179, 179), new valueRange.ptr(13064, 180, 185), new valueRange.ptr(15112, 186, 186), new valueRange.ptr(64, 187, 190), new valueRange.ptr(24, 191, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(13064, 135, 142), new valueRange.ptr(24, 143, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 155), new valueRange.ptr(64, 156, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 132), new valueRange.ptr(64, 133, 133), new valueRange.ptr(8, 134, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(13064, 136, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 155), new valueRange.ptr(2401, 156, 156), new valueRange.ptr(2457, 157, 157), new valueRange.ptr(8, 158, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(24, 129, 138), new valueRange.ptr(8, 139, 139), new valueRange.ptr(57405, 140, 140), new valueRange.ptr(24, 141, 151), new valueRange.ptr(13064, 152, 153), new valueRange.ptr(24, 154, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(24, 170, 180), new valueRange.ptr(13064, 181, 181), new valueRange.ptr(24, 182, 182), new valueRange.ptr(13064, 183, 183), new valueRange.ptr(24, 184, 184), new valueRange.ptr(13064, 185, 185), new valueRange.ptr(24, 186, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 133), new valueRange.ptr(13064, 134, 134), new valueRange.ptr(24, 135, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(24, 142, 154), new valueRange.ptr(64, 155, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(12296, 171, 172), new valueRange.ptr(13064, 173, 176), new valueRange.ptr(12296, 177, 177), new valueRange.ptr(13064, 178, 183), new valueRange.ptr(12296, 184, 184), new valueRange.ptr(15112, 185, 186), new valueRange.ptr(12296, 187, 188), new valueRange.ptr(13064, 189, 190), new valueRange.ptr(8, 191, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(24, 138, 143), new valueRange.ptr(8, 144, 149), new valueRange.ptr(12296, 150, 151), new valueRange.ptr(13064, 152, 153), new valueRange.ptr(8, 154, 157), new valueRange.ptr(13064, 158, 160), new valueRange.ptr(8, 161, 161), new valueRange.ptr(12296, 162, 164), new valueRange.ptr(8, 165, 166), new valueRange.ptr(12296, 167, 173), new valueRange.ptr(8, 174, 176), new valueRange.ptr(13064, 177, 180), new valueRange.ptr(8, 181, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(8, 128, 129), new valueRange.ptr(13064, 130, 130), new valueRange.ptr(12296, 131, 132), new valueRange.ptr(13064, 133, 134), new valueRange.ptr(12296, 135, 140), new valueRange.ptr(13064, 141, 141), new valueRange.ptr(8, 142, 142), new valueRange.ptr(12296, 143, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(12296, 154, 156), new valueRange.ptr(13064, 157, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(64, 128, 134), new valueRange.ptr(1373, 135, 135), new valueRange.ptr(64, 136, 140), new valueRange.ptr(1373, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 186), new valueRange.ptr(24, 187, 187), new valueRange.ptr(57605, 188, 188), new valueRange.ptr(8, 189, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(24, 128, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 158), new valueRange.ptr(64, 159, 160), new valueRange.ptr(8216, 161, 181), new valueRange.ptr(24, 182, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 167), new valueRange.ptr(8216, 168, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8216, 128, 130), new valueRange.ptr(24, 131, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(8, 128, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(8, 152, 152), new valueRange.ptr(64, 153, 153), new valueRange.ptr(8, 154, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 176), new valueRange.ptr(64, 177, 177), new valueRange.ptr(8, 178, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(8, 184, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(64, 129, 129), new valueRange.ptr(8, 130, 133), new valueRange.ptr(64, 134, 135), new valueRange.ptr(8, 136, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(8, 152, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(8, 146, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(8, 152, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 154), new valueRange.ptr(64, 155, 156), new valueRange.ptr(13064, 157, 159), new valueRange.ptr(24, 160, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 143), new valueRange.ptr(24, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(57413, 184, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 128), new valueRange.ptr(8, 129, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 172), new valueRange.ptr(24, 173, 174), new valueRange.ptr(8, 175, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 154), new valueRange.ptr(24, 155, 156), new valueRange.ptr(64, 157, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(24, 171, 176), new valueRange.ptr(8, 177, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 140), new valueRange.ptr(64, 141, 141), new valueRange.ptr(8, 142, 145), new valueRange.ptr(13064, 146, 147), new valueRange.ptr(15112, 148, 148), new valueRange.ptr(64, 149, 159), new valueRange.ptr(8, 160, 177), new valueRange.ptr(13064, 178, 179), new valueRange.ptr(15112, 180, 180), new valueRange.ptr(24, 181, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 145), new valueRange.ptr(13064, 146, 147), new valueRange.ptr(64, 148, 159), new valueRange.ptr(8, 160, 172), new valueRange.ptr(64, 173, 173), new valueRange.ptr(8, 174, 176), new valueRange.ptr(64, 177, 177), new valueRange.ptr(13064, 178, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 179), new valueRange.ptr(13120, 180, 181), new valueRange.ptr(12296, 182, 182), new valueRange.ptr(13064, 183, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(12296, 128, 133), new valueRange.ptr(13064, 134, 134), new valueRange.ptr(12296, 135, 136), new valueRange.ptr(13064, 137, 145), new valueRange.ptr(15112, 146, 146), new valueRange.ptr(13064, 147, 147), new valueRange.ptr(24, 148, 150), new valueRange.ptr(8, 151, 151), new valueRange.ptr(24, 152, 155), new valueRange.ptr(8, 156, 156), new valueRange.ptr(13064, 157, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 175), new valueRange.ptr(24, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(24, 128, 133), new valueRange.ptr(64, 134, 134), new valueRange.ptr(536, 135, 135), new valueRange.ptr(24, 136, 138), new valueRange.ptr(13248, 139, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(520, 160, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(520, 128, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 132), new valueRange.ptr(13064, 133, 134), new valueRange.ptr(520, 135, 168), new valueRange.ptr(13064, 169, 169), new valueRange.ptr(520, 170, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(13064, 160, 162), new valueRange.ptr(12296, 163, 166), new valueRange.ptr(13064, 167, 168), new valueRange.ptr(12296, 169, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(12296, 176, 177), new valueRange.ptr(13064, 178, 178), new valueRange.ptr(12296, 179, 184), new valueRange.ptr(13064, 185, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(24, 128, 128), new valueRange.ptr(64, 129, 131), new valueRange.ptr(24, 132, 133), new valueRange.ptr(8, 134, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(8, 176, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(40, 154, 154), new valueRange.ptr(64, 155, 157), new valueRange.ptr(24, 158, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(13064, 151, 152), new valueRange.ptr(12296, 153, 154), new valueRange.ptr(13064, 155, 155), new valueRange.ptr(64, 156, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(8, 128, 148), new valueRange.ptr(12296, 149, 149), new valueRange.ptr(13064, 150, 150), new valueRange.ptr(12296, 151, 151), new valueRange.ptr(13064, 152, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(15112, 160, 160), new valueRange.ptr(12296, 161, 161), new valueRange.ptr(13064, 162, 162), new valueRange.ptr(12296, 163, 164), new valueRange.ptr(13064, 165, 172), new valueRange.ptr(12296, 173, 178), new valueRange.ptr(13064, 179, 188), new valueRange.ptr(64, 189, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(24, 160, 166), new valueRange.ptr(8, 167, 167), new valueRange.ptr(24, 168, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(13064, 176, 189), new valueRange.ptr(13080, 190, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(64, 129, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(13064, 128, 131), new valueRange.ptr(12296, 132, 132), new valueRange.ptr(8, 133, 179), new valueRange.ptr(13064, 180, 180), new valueRange.ptr(12296, 181, 181), new valueRange.ptr(13064, 182, 186), new valueRange.ptr(12296, 187, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(12296, 189, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(12296, 128, 129), new valueRange.ptr(13064, 130, 130), new valueRange.ptr(12296, 131, 131), new valueRange.ptr(14344, 132, 132), new valueRange.ptr(8, 133, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 170), new valueRange.ptr(13064, 171, 179), new valueRange.ptr(24, 180, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 160), new valueRange.ptr(12296, 161, 161), new valueRange.ptr(13064, 162, 165), new valueRange.ptr(12296, 166, 167), new valueRange.ptr(13064, 168, 169), new valueRange.ptr(14344, 170, 170), new valueRange.ptr(15112, 171, 171), new valueRange.ptr(13064, 172, 173), new valueRange.ptr(8, 174, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(13064, 166, 166), new valueRange.ptr(12296, 167, 167), new valueRange.ptr(13064, 168, 169), new valueRange.ptr(12296, 170, 172), new valueRange.ptr(13064, 173, 173), new valueRange.ptr(12296, 174, 174), new valueRange.ptr(13064, 175, 177), new valueRange.ptr(14344, 178, 179), new valueRange.ptr(64, 180, 187), new valueRange.ptr(24, 188, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 163), new valueRange.ptr(12296, 164, 171), new valueRange.ptr(13064, 172, 179), new valueRange.ptr(12296, 180, 181), new valueRange.ptr(13064, 182, 183), new valueRange.ptr(64, 184, 186), new valueRange.ptr(24, 187, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 140), new valueRange.ptr(8, 141, 189), new valueRange.ptr(24, 190, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(3625, 128, 128), new valueRange.ptr(3649, 129, 129), new valueRange.ptr(3673, 130, 130), new valueRange.ptr(3697, 131, 131), new valueRange.ptr(3721, 132, 133), new valueRange.ptr(3745, 134, 134), new valueRange.ptr(3769, 135, 135), new valueRange.ptr(1405, 136, 136), new valueRange.ptr(64, 137, 143), new valueRange.ptr(1437, 144, 186), new valueRange.ptr(64, 187, 188), new valueRange.ptr(1437, 189, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(24, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(13064, 144, 146), new valueRange.ptr(24, 147, 147), new valueRange.ptr(13064, 148, 160), new valueRange.ptr(12296, 161, 161), new valueRange.ptr(13064, 162, 168), new valueRange.ptr(8, 169, 172), new valueRange.ptr(13064, 173, 173), new valueRange.ptr(8, 174, 179), new valueRange.ptr(13064, 180, 180), new valueRange.ptr(8, 181, 182), new valueRange.ptr(12296, 183, 183), new valueRange.ptr(13064, 184, 185), new valueRange.ptr(8, 186, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(13064, 128, 185), new valueRange.ptr(64, 186, 186), new valueRange.ptr(13064, 187, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 135), new valueRange.ptr(57413, 136, 143), new valueRange.ptr(8, 144, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(57413, 152, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 167), new valueRange.ptr(57413, 168, 175), new valueRange.ptr(8, 176, 183), new valueRange.ptr(57413, 184, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(13080, 144, 176), new valueRange.ptr(64, 177, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 130), new valueRange.ptr(64, 131, 131), new valueRange.ptr(8, 132, 132), new valueRange.ptr(24, 133, 136), new valueRange.ptr(9409, 137, 137), new valueRange.ptr(24, 138, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(24, 144, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(24, 128, 171), new valueRange.ptr(9457, 172, 172), new valueRange.ptr(9513, 173, 173), new valueRange.ptr(24, 174, 174), new valueRange.ptr(9593, 175, 175), new valueRange.ptr(9649, 176, 176), new valueRange.ptr(24, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 159), new valueRange.ptr(128, 160, 160), new valueRange.ptr(24, 161, 173), new valueRange.ptr(128, 174, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 168), new valueRange.ptr(2525, 169, 169), new valueRange.ptr(2557, 170, 170), new valueRange.ptr(24, 171, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 166), new valueRange.ptr(64, 167, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 139), new valueRange.ptr(10433, 140, 140), new valueRange.ptr(24, 141, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 179), new valueRange.ptr(3710, 180, 180), new valueRange.ptr(10538, 181, 181), new valueRange.ptr(3742, 182, 182), new valueRange.ptr(24, 183, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 155), new valueRange.ptr(10561, 156, 156), new valueRange.ptr(24, 157, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 179), new valueRange.ptr(64, 180, 181), new valueRange.ptr(24, 182, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 149), new valueRange.ptr(64, 150, 150), new valueRange.ptr(24, 151, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(57733, 128, 143), new valueRange.ptr(1013, 144, 159), new valueRange.ptr(3773, 160, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(64, 166, 166), new valueRange.ptr(8, 167, 167), new valueRange.ptr(64, 168, 172), new valueRange.ptr(8, 173, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 167), new valueRange.ptr(64, 168, 174), new valueRange.ptr(57461, 175, 175), new valueRange.ptr(24, 176, 176), new valueRange.ptr(64, 177, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(64, 151, 159), new valueRange.ptr(8, 160, 166), new valueRange.ptr(64, 167, 167), new valueRange.ptr(8, 168, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(8, 176, 182), new valueRange.ptr(64, 183, 183), new valueRange.ptr(8, 184, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(8, 136, 142), new valueRange.ptr(64, 143, 143), new valueRange.ptr(8, 144, 150), new valueRange.ptr(64, 151, 151), new valueRange.ptr(8, 152, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(13064, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 174), new valueRange.ptr(8, 175, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 146), new valueRange.ptr(64, 147, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 153), new valueRange.ptr(64, 154, 154), new valueRange.ptr(24, 155, 158), new valueRange.ptr(3829, 159, 159), new valueRange.ptr(24, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 178), new valueRange.ptr(3861, 179, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(3893, 128, 191), new valueRange.ptr(32, 2, 0), new valueRange.ptr(5941, 128, 143), new valueRange.ptr(6421, 144, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(7957, 128, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 150), new valueRange.ptr(64, 151, 152), new valueRange.ptr(13064, 153, 154), new valueRange.ptr(10722, 155, 155), new valueRange.ptr(10762, 156, 156), new valueRange.ptr(8, 157, 158), new valueRange.ptr(10801, 159, 159), new valueRange.ptr(24, 160, 160), new valueRange.ptr(8, 161, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 190), new valueRange.ptr(10857, 191, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(64, 128, 132), new valueRange.ptr(8, 133, 175), new valueRange.ptr(64, 176, 176), new valueRange.ptr(10805, 177, 177), new valueRange.ptr(10837, 178, 178), new valueRange.ptr(10869, 179, 179), new valueRange.ptr(10901, 180, 180), new valueRange.ptr(10869, 181, 181), new valueRange.ptr(10933, 182, 182), new valueRange.ptr(10965, 183, 183), new valueRange.ptr(10997, 184, 185), new valueRange.ptr(11029, 186, 187), new valueRange.ptr(11061, 188, 189), new valueRange.ptr(11029, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 163), new valueRange.ptr(64, 164, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(48, 4, 0), new valueRange.ptr(10914, 128, 157), new valueRange.ptr(12378, 158, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(12450, 160, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 140), new valueRange.ptr(64, 141, 143), new valueRange.ptr(24, 144, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(64, 135, 143), new valueRange.ptr(8, 144, 189), new valueRange.ptr(24, 190, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 140), new valueRange.ptr(24, 141, 143), new valueRange.ptr(8, 144, 171), new valueRange.ptr(64, 172, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(24, 166, 175), new valueRange.ptr(13064, 176, 177), new valueRange.ptr(24, 178, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(64, 128, 129), new valueRange.ptr(57357, 130, 130), new valueRange.ptr(8, 131, 131), new valueRange.ptr(1013, 132, 132), new valueRange.ptr(4905, 133, 133), new valueRange.ptr(17533, 134, 134), new valueRange.ptr(57469, 135, 135), new valueRange.ptr(8, 136, 136), new valueRange.ptr(57373, 137, 137), new valueRange.ptr(8, 138, 138), new valueRange.ptr(64, 139, 180), new valueRange.ptr(57373, 181, 181), new valueRange.ptr(8, 182, 183), new valueRange.ptr(8201, 184, 184), new valueRange.ptr(28353, 185, 185), new valueRange.ptr(8, 186, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(8, 128, 129), new valueRange.ptr(13064, 130, 130), new valueRange.ptr(8, 131, 133), new valueRange.ptr(15112, 134, 134), new valueRange.ptr(8, 135, 138), new valueRange.ptr(13064, 139, 139), new valueRange.ptr(8, 140, 162), new valueRange.ptr(12296, 163, 164), new valueRange.ptr(13064, 165, 166), new valueRange.ptr(12296, 167, 167), new valueRange.ptr(24, 168, 171), new valueRange.ptr(15112, 172, 172), new valueRange.ptr(64, 173, 175), new valueRange.ptr(24, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(520, 128, 177), new valueRange.ptr(264, 178, 178), new valueRange.ptr(8, 179, 179), new valueRange.ptr(24, 180, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(12296, 128, 129), new valueRange.ptr(8, 130, 179), new valueRange.ptr(12296, 180, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(12296, 128, 131), new valueRange.ptr(15112, 132, 132), new valueRange.ptr(13064, 133, 133), new valueRange.ptr(64, 134, 141), new valueRange.ptr(24, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(13064, 160, 177), new valueRange.ptr(8, 178, 183), new valueRange.ptr(24, 184, 186), new valueRange.ptr(8, 187, 187), new valueRange.ptr(24, 188, 188), new valueRange.ptr(8, 189, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 165), new valueRange.ptr(13064, 166, 173), new valueRange.ptr(24, 174, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(13064, 135, 145), new valueRange.ptr(12296, 146, 146), new valueRange.ptr(14344, 147, 147), new valueRange.ptr(64, 148, 158), new valueRange.ptr(24, 159, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(13064, 128, 130), new valueRange.ptr(12296, 131, 131), new valueRange.ptr(8, 132, 178), new valueRange.ptr(13064, 179, 179), new valueRange.ptr(12296, 180, 181), new valueRange.ptr(13064, 182, 185), new valueRange.ptr(12296, 186, 187), new valueRange.ptr(13064, 188, 189), new valueRange.ptr(12296, 190, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(14344, 128, 128), new valueRange.ptr(24, 129, 141), new valueRange.ptr(64, 142, 142), new valueRange.ptr(8, 143, 153), new valueRange.ptr(64, 154, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(8, 160, 164), new valueRange.ptr(13064, 165, 165), new valueRange.ptr(8, 166, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 168), new valueRange.ptr(13064, 169, 174), new valueRange.ptr(12296, 175, 176), new valueRange.ptr(13064, 177, 178), new valueRange.ptr(12296, 179, 180), new valueRange.ptr(13064, 181, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 16, 0), new valueRange.ptr(8, 128, 130), new valueRange.ptr(13064, 131, 131), new valueRange.ptr(8, 132, 139), new valueRange.ptr(13064, 140, 140), new valueRange.ptr(12296, 141, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 155), new valueRange.ptr(24, 156, 159), new valueRange.ptr(8, 160, 182), new valueRange.ptr(24, 183, 185), new valueRange.ptr(8, 186, 186), new valueRange.ptr(12296, 187, 187), new valueRange.ptr(13064, 188, 188), new valueRange.ptr(12296, 189, 189), new valueRange.ptr(8, 190, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(13064, 176, 176), new valueRange.ptr(8, 177, 177), new valueRange.ptr(13064, 178, 180), new valueRange.ptr(8, 181, 182), new valueRange.ptr(13064, 183, 184), new valueRange.ptr(8, 185, 189), new valueRange.ptr(13064, 190, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(13064, 129, 129), new valueRange.ptr(8, 130, 130), new valueRange.ptr(64, 131, 154), new valueRange.ptr(8, 155, 157), new valueRange.ptr(24, 158, 159), new valueRange.ptr(8, 160, 170), new valueRange.ptr(12296, 171, 171), new valueRange.ptr(13064, 172, 173), new valueRange.ptr(12296, 174, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(8, 178, 180), new valueRange.ptr(12296, 181, 181), new valueRange.ptr(15112, 182, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(8, 129, 134), new valueRange.ptr(64, 135, 136), new valueRange.ptr(8, 137, 142), new valueRange.ptr(64, 143, 144), new valueRange.ptr(8, 145, 150), new valueRange.ptr(64, 151, 159), new valueRange.ptr(8, 160, 166), new valueRange.ptr(64, 167, 167), new valueRange.ptr(8, 168, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 154), new valueRange.ptr(24, 155, 155), new valueRange.ptr(17565, 156, 156), new valueRange.ptr(17589, 157, 157), new valueRange.ptr(10609, 158, 158), new valueRange.ptr(57453, 159, 159), new valueRange.ptr(8, 160, 168), new valueRange.ptr(28377, 169, 169), new valueRange.ptr(24, 170, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(17613, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(17645, 128, 143), new valueRange.ptr(17677, 144, 159), new valueRange.ptr(17709, 160, 175), new valueRange.ptr(17677, 176, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 162), new valueRange.ptr(12296, 163, 164), new valueRange.ptr(13064, 165, 165), new valueRange.ptr(12296, 166, 167), new valueRange.ptr(13064, 168, 168), new valueRange.ptr(12296, 169, 170), new valueRange.ptr(24, 171, 171), new valueRange.ptr(12296, 172, 172), new valueRange.ptr(15112, 173, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 163), new valueRange.ptr(64, 164, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(64, 135, 138), new valueRange.ptr(24, 139, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(64, 128, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(17741, 128, 191), new valueRange.ptr(32, 3, 0), new valueRange.ptr(19789, 128, 148), new valueRange.ptr(19213, 149, 149), new valueRange.ptr(20461, 150, 191), new valueRange.ptr(32, 1, 0), new valueRange.ptr(21805, 128, 191), new valueRange.ptr(32, 3, 0), new valueRange.ptr(23853, 128, 132), new valueRange.ptr(22157, 133, 133), new valueRange.ptr(24013, 134, 191), new valueRange.ptr(32, 8, 0), new valueRange.ptr(27533, 128, 143), new valueRange.ptr(27981, 144, 144), new valueRange.ptr(28045, 145, 171), new valueRange.ptr(28401, 172, 172), new valueRange.ptr(28909, 173, 173), new valueRange.ptr(64, 174, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(28941, 176, 191), new valueRange.ptr(32, 5, 0), new valueRange.ptr(29453, 128, 173), new valueRange.ptr(25965, 174, 174), new valueRange.ptr(30925, 175, 181), new valueRange.ptr(28557, 182, 182), new valueRange.ptr(31149, 183, 191), new valueRange.ptr(40, 3, 0), new valueRange.ptr(31857, 128, 130), new valueRange.ptr(31793, 131, 131), new valueRange.ptr(31977, 132, 191), new valueRange.ptr(56, 15, 0), new valueRange.ptr(40449, 128, 131), new valueRange.ptr(40617, 132, 133), new valueRange.ptr(40673, 134, 135), new valueRange.ptr(40729, 136, 143), new valueRange.ptr(64, 144, 144), new valueRange.ptr(64, 145, 145), new valueRange.ptr(41177, 146, 151), new valueRange.ptr(41457, 152, 156), new valueRange.ptr(41681, 157, 179), new valueRange.ptr(40337, 180, 180), new valueRange.ptr(40449, 181, 181), new valueRange.ptr(42969, 182, 187), new valueRange.ptr(43193, 188, 188), new valueRange.ptr(43081, 189, 189), new valueRange.ptr(43305, 190, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 139), new valueRange.ptr(64, 140, 140), new valueRange.ptr(8, 141, 166), new valueRange.ptr(64, 167, 167), new valueRange.ptr(8, 168, 186), new valueRange.ptr(64, 187, 187), new valueRange.ptr(8, 188, 189), new valueRange.ptr(64, 190, 190), new valueRange.ptr(8, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 141), new valueRange.ptr(64, 142, 143), new valueRange.ptr(8, 144, 157), new valueRange.ptr(64, 158, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 130), new valueRange.ptr(64, 131, 134), new valueRange.ptr(24, 135, 179), new valueRange.ptr(64, 180, 182), new valueRange.ptr(24, 183, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 142), new valueRange.ptr(64, 143, 143), new valueRange.ptr(24, 144, 156), new valueRange.ptr(64, 157, 159), new valueRange.ptr(24, 160, 160), new valueRange.ptr(64, 161, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(24, 144, 188), new valueRange.ptr(13064, 189, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 156), new valueRange.ptr(64, 157, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 144), new valueRange.ptr(64, 145, 159), new valueRange.ptr(13064, 160, 160), new valueRange.ptr(24, 161, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 159), new valueRange.ptr(24, 160, 163), new valueRange.ptr(64, 164, 172), new valueRange.ptr(8, 173, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(24, 129, 129), new valueRange.ptr(8, 130, 137), new valueRange.ptr(24, 138, 138), new valueRange.ptr(64, 139, 143), new valueRange.ptr(8, 144, 181), new valueRange.ptr(13064, 182, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 158), new valueRange.ptr(24, 159, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(64, 132, 135), new valueRange.ptr(8, 136, 143), new valueRange.ptr(24, 144, 149), new valueRange.ptr(64, 150, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(57669, 128, 135), new valueRange.ptr(57797, 136, 143), new valueRange.ptr(57669, 144, 151), new valueRange.ptr(35597, 152, 159), new valueRange.ptr(35621, 160, 167), new valueRange.ptr(8, 168, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 175), new valueRange.ptr(35621, 176, 183), new valueRange.ptr(35597, 184, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(57669, 128, 135), new valueRange.ptr(57797, 136, 143), new valueRange.ptr(57669, 144, 147), new valueRange.ptr(64, 148, 151), new valueRange.ptr(8, 152, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 167), new valueRange.ptr(64, 168, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 163), new valueRange.ptr(64, 164, 174), new valueRange.ptr(24, 175, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 149), new valueRange.ptr(64, 150, 159), new valueRange.ptr(8, 160, 167), new valueRange.ptr(64, 168, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2056, 128, 133), new valueRange.ptr(64, 134, 135), new valueRange.ptr(2056, 136, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(2056, 138, 181), new valueRange.ptr(64, 182, 182), new valueRange.ptr(2056, 183, 184), new valueRange.ptr(64, 185, 187), new valueRange.ptr(2056, 188, 188), new valueRange.ptr(64, 189, 190), new valueRange.ptr(2056, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(64, 150, 150), new valueRange.ptr(2072, 151, 159), new valueRange.ptr(2056, 160, 182), new valueRange.ptr(2072, 183, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(2056, 128, 158), new valueRange.ptr(64, 159, 166), new valueRange.ptr(2072, 167, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(2056, 160, 178), new valueRange.ptr(64, 179, 179), new valueRange.ptr(2056, 180, 181), new valueRange.ptr(64, 182, 186), new valueRange.ptr(2072, 187, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(2072, 150, 155), new valueRange.ptr(64, 156, 158), new valueRange.ptr(24, 159, 159), new valueRange.ptr(2056, 160, 185), new valueRange.ptr(64, 186, 190), new valueRange.ptr(2072, 191, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(2056, 128, 183), new valueRange.ptr(64, 184, 187), new valueRange.ptr(2072, 188, 189), new valueRange.ptr(2056, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2072, 128, 143), new valueRange.ptr(64, 144, 145), new valueRange.ptr(2072, 146, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(2056, 128, 128), new valueRange.ptr(13064, 129, 131), new valueRange.ptr(64, 132, 132), new valueRange.ptr(13064, 133, 134), new valueRange.ptr(64, 135, 139), new valueRange.ptr(13064, 140, 143), new valueRange.ptr(2056, 144, 147), new valueRange.ptr(64, 148, 148), new valueRange.ptr(2056, 149, 151), new valueRange.ptr(64, 152, 152), new valueRange.ptr(2056, 153, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(13064, 184, 186), new valueRange.ptr(64, 187, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(2072, 128, 136), new valueRange.ptr(64, 137, 143), new valueRange.ptr(2072, 144, 152), new valueRange.ptr(64, 153, 159), new valueRange.ptr(2056, 160, 188), new valueRange.ptr(2072, 189, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2056, 128, 156), new valueRange.ptr(2072, 157, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2056, 128, 181), new valueRange.ptr(64, 182, 184), new valueRange.ptr(24, 185, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(2056, 128, 149), new valueRange.ptr(64, 150, 151), new valueRange.ptr(2072, 152, 159), new valueRange.ptr(2056, 160, 178), new valueRange.ptr(64, 179, 183), new valueRange.ptr(2072, 184, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(2056, 128, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(2056, 128, 136), new valueRange.ptr(64, 137, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(989, 128, 178), new valueRange.ptr(64, 179, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(2056, 128, 178), new valueRange.ptr(64, 179, 185), new valueRange.ptr(2072, 186, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(2312, 128, 128), new valueRange.ptr(2568, 129, 161), new valueRange.ptr(3080, 162, 162), new valueRange.ptr(2568, 163, 163), new valueRange.ptr(13064, 164, 167), new valueRange.ptr(64, 168, 175), new valueRange.ptr(2056, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(2072, 160, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2056, 128, 169), new valueRange.ptr(64, 170, 170), new valueRange.ptr(13064, 171, 172), new valueRange.ptr(2072, 173, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(2056, 176, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2056, 128, 156), new valueRange.ptr(2072, 157, 166), new valueRange.ptr(2056, 167, 167), new valueRange.ptr(64, 168, 175), new valueRange.ptr(2568, 176, 178), new valueRange.ptr(3080, 179, 179), new valueRange.ptr(2568, 180, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(2568, 128, 132), new valueRange.ptr(2056, 133, 133), new valueRange.ptr(13064, 134, 144), new valueRange.ptr(2584, 145, 147), new valueRange.ptr(3096, 148, 148), new valueRange.ptr(2072, 149, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(64, 128, 175), new valueRange.ptr(2568, 176, 176), new valueRange.ptr(2056, 177, 177), new valueRange.ptr(2568, 178, 179), new valueRange.ptr(3080, 180, 182), new valueRange.ptr(2056, 183, 183), new valueRange.ptr(2568, 184, 184), new valueRange.ptr(3080, 185, 186), new valueRange.ptr(2568, 187, 188), new valueRange.ptr(3080, 189, 189), new valueRange.ptr(2568, 190, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(2056, 128, 128), new valueRange.ptr(2568, 129, 129), new valueRange.ptr(3080, 130, 131), new valueRange.ptr(2568, 132, 132), new valueRange.ptr(2072, 133, 136), new valueRange.ptr(3096, 137, 137), new valueRange.ptr(2584, 138, 138), new valueRange.ptr(2328, 139, 139), new valueRange.ptr(64, 140, 159), new valueRange.ptr(2056, 160, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(12296, 128, 128), new valueRange.ptr(13064, 129, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 183), new valueRange.ptr(13064, 184, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 133), new valueRange.ptr(15112, 134, 134), new valueRange.ptr(24, 135, 141), new valueRange.ptr(64, 142, 145), new valueRange.ptr(24, 146, 165), new valueRange.ptr(8, 166, 175), new valueRange.ptr(64, 176, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 175), new valueRange.ptr(12296, 176, 178), new valueRange.ptr(13064, 179, 182), new valueRange.ptr(12296, 183, 184), new valueRange.ptr(15112, 185, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(24, 187, 188), new valueRange.ptr(64, 189, 189), new valueRange.ptr(24, 190, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 129), new valueRange.ptr(64, 130, 143), new valueRange.ptr(8, 144, 168), new valueRange.ptr(64, 169, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 130), new valueRange.ptr(8, 131, 166), new valueRange.ptr(13064, 167, 171), new valueRange.ptr(12296, 172, 172), new valueRange.ptr(13064, 173, 178), new valueRange.ptr(15112, 179, 180), new valueRange.ptr(64, 181, 181), new valueRange.ptr(8, 182, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(24, 128, 131), new valueRange.ptr(8, 132, 132), new valueRange.ptr(12296, 133, 134), new valueRange.ptr(8, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 178), new valueRange.ptr(13064, 179, 179), new valueRange.ptr(24, 180, 181), new valueRange.ptr(8, 182, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(13064, 128, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(8, 131, 178), new valueRange.ptr(12296, 179, 181), new valueRange.ptr(13064, 182, 190), new valueRange.ptr(12296, 191, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(14344, 128, 128), new valueRange.ptr(8, 129, 132), new valueRange.ptr(24, 133, 136), new valueRange.ptr(13064, 137, 140), new valueRange.ptr(24, 141, 141), new valueRange.ptr(12296, 142, 142), new valueRange.ptr(13064, 143, 143), new valueRange.ptr(8, 144, 154), new valueRange.ptr(24, 155, 155), new valueRange.ptr(8, 156, 156), new valueRange.ptr(24, 157, 159), new valueRange.ptr(64, 160, 160), new valueRange.ptr(24, 161, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 145), new valueRange.ptr(64, 146, 146), new valueRange.ptr(8, 147, 171), new valueRange.ptr(12296, 172, 174), new valueRange.ptr(13064, 175, 177), new valueRange.ptr(12296, 178, 179), new valueRange.ptr(13064, 180, 180), new valueRange.ptr(14344, 181, 181), new valueRange.ptr(13064, 182, 183), new valueRange.ptr(24, 184, 189), new valueRange.ptr(13064, 190, 190), new valueRange.ptr(64, 191, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(8, 136, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 141), new valueRange.ptr(64, 142, 142), new valueRange.ptr(8, 143, 157), new valueRange.ptr(64, 158, 158), new valueRange.ptr(8, 159, 168), new valueRange.ptr(24, 169, 169), new valueRange.ptr(64, 170, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(13064, 159, 159), new valueRange.ptr(12296, 160, 162), new valueRange.ptr(13064, 163, 169), new valueRange.ptr(15112, 170, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 180), new valueRange.ptr(12296, 181, 183), new valueRange.ptr(13064, 184, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(12296, 128, 129), new valueRange.ptr(15112, 130, 130), new valueRange.ptr(13064, 131, 132), new valueRange.ptr(12296, 133, 133), new valueRange.ptr(13064, 134, 134), new valueRange.ptr(8, 135, 138), new valueRange.ptr(24, 139, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 155), new valueRange.ptr(64, 156, 156), new valueRange.ptr(24, 157, 157), new valueRange.ptr(13064, 158, 158), new valueRange.ptr(8, 159, 161), new valueRange.ptr(64, 162, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(12296, 176, 178), new valueRange.ptr(13064, 179, 184), new valueRange.ptr(12296, 185, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(12296, 187, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(12296, 129, 129), new valueRange.ptr(15112, 130, 130), new valueRange.ptr(13064, 131, 131), new valueRange.ptr(8, 132, 133), new valueRange.ptr(24, 134, 134), new valueRange.ptr(8, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 174), new valueRange.ptr(12296, 175, 177), new valueRange.ptr(13064, 178, 181), new valueRange.ptr(64, 182, 183), new valueRange.ptr(12296, 184, 187), new valueRange.ptr(13064, 188, 189), new valueRange.ptr(12296, 190, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(24, 129, 151), new valueRange.ptr(8, 152, 155), new valueRange.ptr(13064, 156, 157), new valueRange.ptr(64, 158, 191), new valueRange.ptr(0, 7, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(12296, 176, 178), new valueRange.ptr(13064, 179, 186), new valueRange.ptr(12296, 187, 188), new valueRange.ptr(13064, 189, 189), new valueRange.ptr(12296, 190, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(13064, 128, 128), new valueRange.ptr(24, 129, 131), new valueRange.ptr(8, 132, 132), new valueRange.ptr(64, 133, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(24, 160, 172), new valueRange.ptr(64, 173, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(13064, 171, 171), new valueRange.ptr(12296, 172, 172), new valueRange.ptr(13064, 173, 173), new valueRange.ptr(12296, 174, 175), new valueRange.ptr(13064, 176, 181), new valueRange.ptr(14344, 182, 182), new valueRange.ptr(13064, 183, 183), new valueRange.ptr(8, 184, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 154), new valueRange.ptr(64, 155, 156), new valueRange.ptr(13064, 157, 159), new valueRange.ptr(12296, 160, 161), new valueRange.ptr(13064, 162, 165), new valueRange.ptr(12296, 166, 166), new valueRange.ptr(13064, 167, 170), new valueRange.ptr(15112, 171, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(24, 186, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 171), new valueRange.ptr(12296, 172, 174), new valueRange.ptr(13064, 175, 183), new valueRange.ptr(12296, 184, 184), new valueRange.ptr(15112, 185, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(24, 187, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(1181, 160, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 169), new valueRange.ptr(24, 170, 178), new valueRange.ptr(64, 179, 190), new valueRange.ptr(8, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(12296, 128, 128), new valueRange.ptr(8, 129, 129), new valueRange.ptr(12296, 130, 130), new valueRange.ptr(13064, 131, 131), new valueRange.ptr(24, 132, 134), new valueRange.ptr(64, 135, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(8, 160, 167), new valueRange.ptr(64, 168, 169), new valueRange.ptr(8, 170, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 144), new valueRange.ptr(12296, 145, 147), new valueRange.ptr(13064, 148, 151), new valueRange.ptr(64, 152, 153), new valueRange.ptr(13064, 154, 155), new valueRange.ptr(12296, 156, 159), new valueRange.ptr(15112, 160, 160), new valueRange.ptr(8, 161, 161), new valueRange.ptr(24, 162, 162), new valueRange.ptr(8, 163, 163), new valueRange.ptr(12296, 164, 164), new valueRange.ptr(64, 165, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(13064, 129, 138), new valueRange.ptr(8, 139, 178), new valueRange.ptr(13064, 179, 179), new valueRange.ptr(15112, 180, 180), new valueRange.ptr(13064, 181, 184), new valueRange.ptr(12296, 185, 185), new valueRange.ptr(8, 186, 186), new valueRange.ptr(13064, 187, 190), new valueRange.ptr(24, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(15112, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 144), new valueRange.ptr(13064, 145, 150), new valueRange.ptr(12296, 151, 152), new valueRange.ptr(13064, 153, 155), new valueRange.ptr(8, 156, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(13064, 138, 150), new valueRange.ptr(12296, 151, 151), new valueRange.ptr(13064, 152, 152), new valueRange.ptr(15112, 153, 153), new valueRange.ptr(24, 154, 156), new valueRange.ptr(8, 157, 157), new valueRange.ptr(24, 158, 162), new valueRange.ptr(64, 163, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 137), new valueRange.ptr(8, 138, 174), new valueRange.ptr(12296, 175, 175), new valueRange.ptr(13064, 176, 182), new valueRange.ptr(64, 183, 183), new valueRange.ptr(13064, 184, 189), new valueRange.ptr(12296, 190, 190), new valueRange.ptr(15112, 191, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(8, 128, 128), new valueRange.ptr(24, 129, 133), new valueRange.ptr(64, 134, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(24, 154, 172), new valueRange.ptr(64, 173, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(8, 178, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(8, 128, 143), new valueRange.ptr(64, 144, 145), new valueRange.ptr(13064, 146, 167), new valueRange.ptr(64, 168, 168), new valueRange.ptr(12296, 169, 169), new valueRange.ptr(13064, 170, 176), new valueRange.ptr(12296, 177, 177), new valueRange.ptr(13064, 178, 179), new valueRange.ptr(12296, 180, 180), new valueRange.ptr(13064, 181, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(8, 136, 137), new valueRange.ptr(64, 138, 138), new valueRange.ptr(8, 139, 176), new valueRange.ptr(13064, 177, 182), new valueRange.ptr(64, 183, 185), new valueRange.ptr(13064, 186, 186), new valueRange.ptr(64, 187, 187), new valueRange.ptr(13064, 188, 189), new valueRange.ptr(64, 190, 190), new valueRange.ptr(13064, 191, 191), new valueRange.ptr(0, 12, 0), new valueRange.ptr(13064, 128, 131), new valueRange.ptr(15112, 132, 133), new valueRange.ptr(8, 134, 134), new valueRange.ptr(13064, 135, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(8, 160, 165), new valueRange.ptr(64, 166, 166), new valueRange.ptr(8, 167, 168), new valueRange.ptr(64, 169, 169), new valueRange.ptr(8, 170, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(12296, 138, 142), new valueRange.ptr(64, 143, 143), new valueRange.ptr(13064, 144, 145), new valueRange.ptr(64, 146, 146), new valueRange.ptr(12296, 147, 148), new valueRange.ptr(13064, 149, 149), new valueRange.ptr(12296, 150, 150), new valueRange.ptr(15112, 151, 151), new valueRange.ptr(8, 152, 152), new valueRange.ptr(64, 153, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(8, 160, 178), new valueRange.ptr(13064, 179, 180), new valueRange.ptr(12296, 181, 182), new valueRange.ptr(24, 183, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 175), new valueRange.ptr(8, 176, 176), new valueRange.ptr(64, 177, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 177), new valueRange.ptr(64, 178, 190), new valueRange.ptr(24, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 153), new valueRange.ptr(64, 154, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(24, 176, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(64, 132, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 174), new valueRange.ptr(64, 175, 175), new valueRange.ptr(832, 176, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 134), new valueRange.ptr(64, 135, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(64, 159, 159), new valueRange.ptr(8, 160, 169), new valueRange.ptr(64, 170, 173), new valueRange.ptr(24, 174, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(8, 144, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(13064, 176, 180), new valueRange.ptr(24, 181, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 175), new valueRange.ptr(13064, 176, 182), new valueRange.ptr(24, 183, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(8, 128, 131), new valueRange.ptr(24, 132, 133), new valueRange.ptr(64, 134, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 154), new valueRange.ptr(24, 155, 161), new valueRange.ptr(64, 162, 162), new valueRange.ptr(8, 163, 183), new valueRange.ptr(64, 184, 188), new valueRange.ptr(8, 189, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 143), new valueRange.ptr(64, 144, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(57605, 128, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 154), new valueRange.ptr(64, 155, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 138), new valueRange.ptr(64, 139, 142), new valueRange.ptr(13064, 143, 143), new valueRange.ptr(8, 144, 144), new valueRange.ptr(12296, 145, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(12296, 128, 135), new valueRange.ptr(64, 136, 142), new valueRange.ptr(13064, 143, 146), new valueRange.ptr(8, 147, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(8, 160, 161), new valueRange.ptr(24, 162, 162), new valueRange.ptr(8, 163, 163), new valueRange.ptr(13064, 164, 164), new valueRange.ptr(64, 165, 175), new valueRange.ptr(12296, 176, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 183), new valueRange.ptr(64, 184, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 149), new valueRange.ptr(64, 150, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 158), new valueRange.ptr(64, 159, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(64, 128, 143), new valueRange.ptr(8, 144, 146), new valueRange.ptr(64, 147, 163), new valueRange.ptr(8, 164, 167), new valueRange.ptr(64, 168, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 187), new valueRange.ptr(64, 188, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(8, 128, 170), new valueRange.ptr(64, 171, 175), new valueRange.ptr(8, 176, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 9, 0), new valueRange.ptr(8, 128, 136), new valueRange.ptr(64, 137, 143), new valueRange.ptr(8, 144, 153), new valueRange.ptr(64, 154, 155), new valueRange.ptr(24, 156, 156), new valueRange.ptr(13064, 157, 158), new valueRange.ptr(24, 159, 159), new valueRange.ptr(960, 160, 163), new valueRange.ptr(64, 164, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 166), new valueRange.ptr(64, 167, 168), new valueRange.ptr(24, 169, 191), new valueRange.ptr(0, 14, 0), new valueRange.ptr(24, 128, 157), new valueRange.ptr(46601, 158, 158), new valueRange.ptr(46673, 159, 159), new valueRange.ptr(46745, 160, 160), new valueRange.ptr(46849, 161, 161), new valueRange.ptr(46953, 162, 162), new valueRange.ptr(47057, 163, 163), new valueRange.ptr(47161, 164, 164), new valueRange.ptr(12312, 165, 166), new valueRange.ptr(13080, 167, 169), new valueRange.ptr(24, 170, 172), new valueRange.ptr(12312, 173, 178), new valueRange.ptr(832, 179, 186), new valueRange.ptr(13080, 187, 191), new valueRange.ptr(0, 11, 0), new valueRange.ptr(13080, 128, 130), new valueRange.ptr(24, 131, 132), new valueRange.ptr(13080, 133, 139), new valueRange.ptr(24, 140, 169), new valueRange.ptr(13080, 170, 173), new valueRange.ptr(24, 174, 186), new valueRange.ptr(47265, 187, 187), new valueRange.ptr(47337, 188, 188), new valueRange.ptr(47409, 189, 189), new valueRange.ptr(47513, 190, 190), new valueRange.ptr(47617, 191, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(47721, 128, 128), new valueRange.ptr(24, 129, 168), new valueRange.ptr(64, 169, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 129), new valueRange.ptr(13080, 130, 132), new valueRange.ptr(24, 133, 133), new valueRange.ptr(64, 134, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 159), new valueRange.ptr(24, 160, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 150), new valueRange.ptr(64, 151, 159), new valueRange.ptr(24, 160, 184), new valueRange.ptr(64, 185, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(13064, 128, 182), new valueRange.ptr(24, 183, 186), new valueRange.ptr(13064, 187, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(13064, 128, 172), new valueRange.ptr(24, 173, 180), new valueRange.ptr(13064, 181, 181), new valueRange.ptr(24, 182, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 131), new valueRange.ptr(13064, 132, 132), new valueRange.ptr(24, 133, 139), new valueRange.ptr(64, 140, 154), new valueRange.ptr(13064, 155, 159), new valueRange.ptr(64, 160, 160), new valueRange.ptr(13064, 161, 175), new valueRange.ptr(64, 176, 191), new valueRange.ptr(0, 10, 0), new valueRange.ptr(13064, 128, 134), new valueRange.ptr(64, 135, 135), new valueRange.ptr(13064, 136, 152), new valueRange.ptr(64, 153, 154), new valueRange.ptr(13064, 155, 161), new valueRange.ptr(64, 162, 162), new valueRange.ptr(13064, 163, 164), new valueRange.ptr(64, 165, 165), new valueRange.ptr(13064, 166, 170), new valueRange.ptr(64, 171, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 172), new valueRange.ptr(64, 173, 175), new valueRange.ptr(13064, 176, 182), new valueRange.ptr(8, 183, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 137), new valueRange.ptr(64, 138, 141), new valueRange.ptr(8, 142, 142), new valueRange.ptr(24, 143, 143), new valueRange.ptr(64, 144, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(8, 128, 171), new valueRange.ptr(13064, 172, 175), new valueRange.ptr(8, 176, 185), new valueRange.ptr(64, 186, 190), new valueRange.ptr(24, 191, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(2056, 128, 132), new valueRange.ptr(64, 133, 134), new valueRange.ptr(2072, 135, 143), new valueRange.ptr(13064, 144, 150), new valueRange.ptr(64, 151, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(2568, 128, 131), new valueRange.ptr(13064, 132, 138), new valueRange.ptr(2824, 139, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(2056, 144, 153), new valueRange.ptr(64, 154, 157), new valueRange.ptr(2072, 158, 159), new valueRange.ptr(64, 160, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 176), new valueRange.ptr(2072, 177, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(2072, 128, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(2072, 129, 189), new valueRange.ptr(64, 190, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(64, 128, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 171), new valueRange.ptr(64, 172, 175), new valueRange.ptr(24, 176, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 147), new valueRange.ptr(64, 148, 159), new valueRange.ptr(24, 160, 174), new valueRange.ptr(64, 175, 176), new valueRange.ptr(24, 177, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(24, 129, 143), new valueRange.ptr(64, 144, 144), new valueRange.ptr(24, 145, 181), new valueRange.ptr(64, 182, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 143), new valueRange.ptr(49705, 144, 144), new valueRange.ptr(24, 145, 173), new valueRange.ptr(64, 174, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(64, 128, 165), new valueRange.ptr(24, 166, 191), new valueRange.ptr(0, 15, 0), new valueRange.ptr(51281, 128, 128), new valueRange.ptr(51361, 129, 129), new valueRange.ptr(51441, 130, 130), new valueRange.ptr(51521, 131, 131), new valueRange.ptr(51601, 132, 132), new valueRange.ptr(51681, 133, 133), new valueRange.ptr(51761, 134, 134), new valueRange.ptr(51841, 135, 135), new valueRange.ptr(51921, 136, 136), new valueRange.ptr(64, 137, 143), new valueRange.ptr(52001, 144, 144), new valueRange.ptr(52033, 145, 145), new valueRange.ptr(64, 146, 159), new valueRange.ptr(24, 160, 165), new valueRange.ptr(64, 166, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 151), new valueRange.ptr(64, 152, 159), new valueRange.ptr(24, 160, 172), new valueRange.ptr(64, 173, 175), new valueRange.ptr(24, 176, 188), new valueRange.ptr(64, 189, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(24, 128, 179), new valueRange.ptr(64, 180, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 152), new valueRange.ptr(64, 153, 159), new valueRange.ptr(24, 160, 171), new valueRange.ptr(64, 172, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 139), new valueRange.ptr(64, 140, 143), new valueRange.ptr(24, 144, 191), new valueRange.ptr(0, 5, 0), new valueRange.ptr(24, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(24, 144, 153), new valueRange.ptr(64, 154, 159), new valueRange.ptr(24, 160, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 135), new valueRange.ptr(64, 136, 143), new valueRange.ptr(24, 144, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(24, 176, 177), new valueRange.ptr(64, 178, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 184), new valueRange.ptr(64, 185, 185), new valueRange.ptr(24, 186, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 139), new valueRange.ptr(64, 140, 140), new valueRange.ptr(24, 141, 191), new valueRange.ptr(0, 8, 0), new valueRange.ptr(24, 128, 147), new valueRange.ptr(64, 148, 159), new valueRange.ptr(24, 160, 173), new valueRange.ptr(64, 174, 175), new valueRange.ptr(24, 176, 180), new valueRange.ptr(64, 181, 183), new valueRange.ptr(24, 184, 186), new valueRange.ptr(64, 187, 191), new valueRange.ptr(0, 6, 0), new valueRange.ptr(24, 128, 134), new valueRange.ptr(64, 135, 143), new valueRange.ptr(24, 144, 168), new valueRange.ptr(64, 169, 175), new valueRange.ptr(24, 176, 182), new valueRange.ptr(64, 183, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(24, 128, 130), new valueRange.ptr(64, 131, 143), new valueRange.ptr(24, 144, 150), new valueRange.ptr(64, 151, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(24, 128, 146), new valueRange.ptr(64, 147, 147), new valueRange.ptr(24, 148, 191), new valueRange.ptr(0, 13, 0), new valueRange.ptr(24, 128, 138), new valueRange.ptr(64, 139, 175), new valueRange.ptr(8001, 176, 176), new valueRange.ptr(201, 177, 177), new valueRange.ptr(105, 178, 178), new valueRange.ptr(121, 179, 179), new valueRange.ptr(8017, 180, 180), new valueRange.ptr(8033, 181, 181), new valueRange.ptr(8049, 182, 182), new valueRange.ptr(8065, 183, 183), new valueRange.ptr(8081, 184, 184), new valueRange.ptr(8097, 185, 185), new valueRange.ptr(64, 186, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 180), new valueRange.ptr(64, 181, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 157), new valueRange.ptr(64, 158, 159), new valueRange.ptr(8, 160, 191), new valueRange.ptr(0, 3, 0), new valueRange.ptr(8, 128, 161), new valueRange.ptr(64, 162, 175), new valueRange.ptr(8, 176, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 160), new valueRange.ptr(64, 161, 191), new valueRange.ptr(32, 15, 0), new valueRange.ptr(57121, 128, 137), new valueRange.ptr(36405, 138, 138), new valueRange.ptr(57441, 139, 156), new valueRange.ptr(36437, 157, 157), new valueRange.ptr(58017, 158, 162), new valueRange.ptr(36469, 163, 163), new valueRange.ptr(58177, 164, 171), new valueRange.ptr(32525, 172, 172), new valueRange.ptr(58433, 173, 175), new valueRange.ptr(36501, 176, 176), new valueRange.ptr(58529, 177, 182), new valueRange.ptr(36533, 183, 185), new valueRange.ptr(58721, 186, 186), new valueRange.ptr(36629, 187, 187), new valueRange.ptr(58753, 188, 191), new valueRange.ptr(32, 16, 0), new valueRange.ptr(37813, 128, 128), new valueRange.ptr(61697, 129, 134), new valueRange.ptr(37845, 135, 138), new valueRange.ptr(55905, 139, 139), new valueRange.ptr(61889, 140, 150), new valueRange.ptr(37973, 151, 151), new valueRange.ptr(62241, 152, 163), new valueRange.ptr(38005, 164, 166), new valueRange.ptr(62625, 167, 170), new valueRange.ptr(38101, 171, 171), new valueRange.ptr(62753, 172, 172), new valueRange.ptr(38133, 173, 173), new valueRange.ptr(62785, 174, 175), new valueRange.ptr(38165, 176, 177), new valueRange.ptr(62849, 178, 190), new valueRange.ptr(8256, 191, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(8, 128, 138), new valueRange.ptr(64, 139, 191), new valueRange.ptr(0, 4, 0), new valueRange.ptr(64, 128, 128), new valueRange.ptr(832, 129, 129), new valueRange.ptr(64, 130, 159), new valueRange.ptr(832, 160, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(832, 128, 191), new valueRange.ptr(0, 1, 0), new valueRange.ptr(13248, 128, 191), new valueRange.ptr(0, 2, 0), new valueRange.ptr(13248, 128, 175), new valueRange.ptr(64, 176, 191)]); - idnaSparse = new sparseBlocks.ptr(new sliceType$1(idnaSparseValues), idnaSparseOffset); - punycode = new Profile.ptr(new options.ptr(false, false, false, false, false, false, ptrType.nil, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError)); - $pkg.Punycode = punycode; - joinStates = new sliceType$2([$toNativeArray($kindInt8, [0, 2, 2, 0, 0, 5, 5, 1]), $toNativeArray($kindInt8, [0, 2, 2, 0, 0, 0, 0, 0]), $toNativeArray($kindInt8, [0, 2, 2, 2, 0, 5, 4, 3]), $toNativeArray($kindInt8, [0, 2, 2, 2, 0, 0, 0, 0]), $toNativeArray($kindInt8, [0, 5, 2, 4, 0, 5, 5, 4]), $toNativeArray($kindInt8, [5, 5, 5, 5, 5, 5, 5, 5])]); - lookup = new Profile.ptr(new options.ptr(false, true, true, true, false, false, trie, validateFromPunycode, validateAndMap, bidirule.ValidString)); - $pkg.Lookup = lookup; - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/net/http/httpguts"] = (function() { - var $pkg = {}, $init, net, textproto, strings, utf8, idna, isTokenTable, validHostByte, badTrailer, IsTokenRune, HeaderValuesContainsToken, isOWS, trimOWS, headerValueContainsToken, lowerASCII, tokenEqual, isLWS, isCTL, ValidHeaderFieldName, ValidHostHeader, ValidHeaderFieldValue, isASCII, PunycodeHostPort, ValidTrailerHeader; - net = $packages["net"]; - textproto = $packages["net/textproto"]; - strings = $packages["strings"]; - utf8 = $packages["unicode/utf8"]; - idna = $packages["vendor/golang.org/x/net/idna"]; - IsTokenRune = function(r) { - var i, r; - i = ((r >> 0)); - return i < 127 && ((i < 0 || i >= isTokenTable.length) ? ($throwRuntimeError("index out of range"), undefined) : isTokenTable[i]); - }; - $pkg.IsTokenRune = IsTokenRune; - HeaderValuesContainsToken = function(values, token) { - var _i, _ref, token, v, values; - _ref = values; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (headerValueContainsToken(v, token)) { - return true; - } - _i++; - } - return false; - }; - $pkg.HeaderValuesContainsToken = HeaderValuesContainsToken; - isOWS = function(b) { - var b; - return (b === 32) || (b === 9); - }; - trimOWS = function(x) { - var x; - while (true) { - if (!(x.length > 0 && isOWS(x.charCodeAt(0)))) { break; } - x = $substring(x, 1); - } - while (true) { - if (!(x.length > 0 && isOWS(x.charCodeAt((x.length - 1 >> 0))))) { break; } - x = $substring(x, 0, (x.length - 1 >> 0)); - } - return x; - }; - headerValueContainsToken = function(v, token) { - var comma, token, v; - comma = strings.IndexByte(v, 44); - while (true) { - if (!(!((comma === -1)))) { break; } - if (tokenEqual(trimOWS($substring(v, 0, comma)), token)) { - return true; - } - v = $substring(v, (comma + 1 >> 0)); - comma = strings.IndexByte(v, 44); - } - return tokenEqual(trimOWS(v), token); - }; - lowerASCII = function(b) { - var b; - if (65 <= b && b <= 90) { - return b + 32 << 24 >>> 24; - } - return b; - }; - tokenEqual = function(t1, t2) { - var _i, _ref, _rune, b, i, t1, t2; - if (!((t1.length === t2.length))) { - return false; - } - _ref = t1; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - i = _i; - b = _rune[0]; - if (b >= 128) { - return false; - } - if (!((lowerASCII(((b << 24 >>> 24))) === lowerASCII(t2.charCodeAt(i))))) { - return false; - } - _i += _rune[1]; - } - return true; - }; - isLWS = function(b) { - var b; - return (b === 32) || (b === 9); - }; - isCTL = function(b) { - var b; - return b < 32 || (b === 127); - }; - ValidHeaderFieldName = function(v) { - var _i, _ref, _rune, r, v; - if (v.length === 0) { - return false; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - if (!IsTokenRune(r)) { - return false; - } - _i += _rune[1]; - } - return true; - }; - $pkg.ValidHeaderFieldName = ValidHeaderFieldName; - ValidHostHeader = function(h) { - var h, i, x; - i = 0; - while (true) { - if (!(i < h.length)) { break; } - if (!(x = h.charCodeAt(i), ((x < 0 || x >= validHostByte.length) ? ($throwRuntimeError("index out of range"), undefined) : validHostByte[x]))) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - $pkg.ValidHostHeader = ValidHostHeader; - ValidHeaderFieldValue = function(v) { - var b, i, v; - i = 0; - while (true) { - if (!(i < v.length)) { break; } - b = v.charCodeAt(i); - if (isCTL(b) && !isLWS(b)) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - $pkg.ValidHeaderFieldValue = ValidHeaderFieldValue; - isASCII = function(s) { - var i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) >= 128) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - PunycodeHostPort = function(v) { - var {_r, _r$1, _tuple, _tuple$1, err, host, port, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (isASCII(v)) { - $s = -1; return [v, $ifaceNil]; - } - _r = net.SplitHostPort(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - host = v; - port = ""; - } - _r$1 = idna.ToASCII(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - host = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", err]; - } - if (port === "") { - $s = -1; return [host, $ifaceNil]; - } - $s = -1; return [net.JoinHostPort(host, port), $ifaceNil]; - /* */ } return; } var $f = {$blk: PunycodeHostPort, $c: true, $r, _r, _r$1, _tuple, _tuple$1, err, host, port, v, $s};return $f; - }; - $pkg.PunycodeHostPort = PunycodeHostPort; - ValidTrailerHeader = function(name) { - var {_entry, _r, name, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = textproto.CanonicalMIMEHeaderKey(name); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - name = _r; - if (strings.HasPrefix(name, "If-") || (_entry = badTrailer[$String.keyFor(name)], _entry !== undefined ? _entry.v : false)) { - $s = -1; return false; - } - $s = -1; return true; - /* */ } return; } var $f = {$blk: ValidTrailerHeader, $c: true, $r, _entry, _r, name, $s};return $f; - }; - $pkg.ValidTrailerHeader = ValidTrailerHeader; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = net.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = textproto.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = idna.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - isTokenTable = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, true, true, true, true, true, false, false, true, true, false, true, true, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true]); - validHostByte = $toNativeArray($kindBool, [false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false]); - badTrailer = $makeMap($String.keyFor, [{ k: "Authorization", v: true }, { k: "Cache-Control", v: true }, { k: "Connection", v: true }, { k: "Content-Encoding", v: true }, { k: "Content-Length", v: true }, { k: "Content-Range", v: true }, { k: "Content-Type", v: true }, { k: "Expect", v: true }, { k: "Host", v: true }, { k: "Keep-Alive", v: true }, { k: "Max-Forwards", v: true }, { k: "Pragma", v: true }, { k: "Proxy-Authenticate", v: true }, { k: "Proxy-Authorization", v: true }, { k: "Proxy-Connection", v: true }, { k: "Range", v: true }, { k: "Realm", v: true }, { k: "Te", v: true }, { k: "Trailer", v: true }, { k: "Transfer-Encoding", v: true }, { k: "Www-Authenticate", v: true }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/net/http/httpproxy"] = (function() { - var $pkg = {}, $init, errors, fmt, net, url, os, strings, utf8, idna, Config, config, matcher, allMatch, cidrMatch, ipMatch, domainMatch, sliceType, ptrType, sliceType$1, sliceType$2, ptrType$1, funcType, ptrType$2, ptrType$3, portMap, FromEnvironment, getEnvAny, parseProxy, canonicalAddr, idnaASCII, isASCII; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - net = $packages["net"]; - url = $packages["net/url"]; - os = $packages["os"]; - strings = $packages["strings"]; - utf8 = $packages["unicode/utf8"]; - idna = $packages["vendor/golang.org/x/net/idna"]; - Config = $pkg.Config = $newType(0, $kindStruct, "httpproxy.Config", true, "vendor/golang.org/x/net/http/httpproxy", true, function(HTTPProxy_, HTTPSProxy_, NoProxy_, CGI_) { - this.$val = this; - if (arguments.length === 0) { - this.HTTPProxy = ""; - this.HTTPSProxy = ""; - this.NoProxy = ""; - this.CGI = false; - return; - } - this.HTTPProxy = HTTPProxy_; - this.HTTPSProxy = HTTPSProxy_; - this.NoProxy = NoProxy_; - this.CGI = CGI_; - }); - config = $pkg.config = $newType(0, $kindStruct, "httpproxy.config", true, "vendor/golang.org/x/net/http/httpproxy", false, function(Config_, httpsProxy_, httpProxy_, ipMatchers_, domainMatchers_) { - this.$val = this; - if (arguments.length === 0) { - this.Config = new Config.ptr("", "", "", false); - this.httpsProxy = ptrType.nil; - this.httpProxy = ptrType.nil; - this.ipMatchers = sliceType$1.nil; - this.domainMatchers = sliceType$1.nil; - return; - } - this.Config = Config_; - this.httpsProxy = httpsProxy_; - this.httpProxy = httpProxy_; - this.ipMatchers = ipMatchers_; - this.domainMatchers = domainMatchers_; - }); - matcher = $pkg.matcher = $newType(8, $kindInterface, "httpproxy.matcher", true, "vendor/golang.org/x/net/http/httpproxy", false, null); - allMatch = $pkg.allMatch = $newType(0, $kindStruct, "httpproxy.allMatch", true, "vendor/golang.org/x/net/http/httpproxy", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - cidrMatch = $pkg.cidrMatch = $newType(0, $kindStruct, "httpproxy.cidrMatch", true, "vendor/golang.org/x/net/http/httpproxy", false, function(cidr_) { - this.$val = this; - if (arguments.length === 0) { - this.cidr = ptrType$1.nil; - return; - } - this.cidr = cidr_; - }); - ipMatch = $pkg.ipMatch = $newType(0, $kindStruct, "httpproxy.ipMatch", true, "vendor/golang.org/x/net/http/httpproxy", false, function(ip_, port_) { - this.$val = this; - if (arguments.length === 0) { - this.ip = net.IP.nil; - this.port = ""; - return; - } - this.ip = ip_; - this.port = port_; - }); - domainMatch = $pkg.domainMatch = $newType(0, $kindStruct, "httpproxy.domainMatch", true, "vendor/golang.org/x/net/http/httpproxy", false, function(host_, port_, matchHost_) { - this.$val = this; - if (arguments.length === 0) { - this.host = ""; - this.port = ""; - this.matchHost = false; - return; - } - this.host = host_; - this.port = port_; - this.matchHost = matchHost_; - }); - sliceType = $sliceType($String); - ptrType = $ptrType(url.URL); - sliceType$1 = $sliceType(matcher); - sliceType$2 = $sliceType($emptyInterface); - ptrType$1 = $ptrType(net.IPNet); - funcType = $funcType([ptrType], [ptrType, $error], false); - ptrType$2 = $ptrType(Config); - ptrType$3 = $ptrType(config); - FromEnvironment = function() { - var {$24r, _r, _r$1, _r$2, _r$3, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = getEnvAny(new sliceType(["HTTP_PROXY", "http_proxy"])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = getEnvAny(new sliceType(["HTTPS_PROXY", "https_proxy"])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = getEnvAny(new sliceType(["NO_PROXY", "no_proxy"])); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = os.Getenv("REQUEST_METHOD"); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = new Config.ptr(_r, _r$1, _r$2, !(_r$3 === "")); - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: FromEnvironment, $c: true, $r, $24r, _r, _r$1, _r$2, _r$3, $s};return $f; - }; - $pkg.FromEnvironment = FromEnvironment; - getEnvAny = function(names) { - var {_i, _r, _ref, n, names, val, $s, $r, $c} = $restore(this, {names}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = names; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = os.Getenv(n); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - val = _r; - if (!(val === "")) { - $s = -1; return val; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return ""; - /* */ } return; } var $f = {$blk: getEnvAny, $c: true, $r, _i, _r, _ref, n, names, val, $s};return $f; - }; - Config.ptr.prototype.ProxyFunc = function() { - var {cfg, cfg1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = this; - cfg1 = new config.ptr($clone(cfg, Config), ptrType.nil, ptrType.nil, sliceType$1.nil, sliceType$1.nil); - $r = cfg1.init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $methodVal(cfg1, "proxyForURL"); - /* */ } return; } var $f = {$blk: Config.ptr.prototype.ProxyFunc, $c: true, $r, cfg, cfg1, $s};return $f; - }; - Config.prototype.ProxyFunc = function() { return this.$val.ProxyFunc(); }; - config.ptr.prototype.proxyForURL = function(reqURL) { - var {_r, _r$1, cfg, proxy, reqURL, $s, $r, $c} = $restore(this, {reqURL}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = this; - proxy = ptrType.nil; - if (reqURL.Scheme === "https") { - proxy = cfg.httpsProxy; - } else if (reqURL.Scheme === "http") { - proxy = cfg.httpProxy; - if (!(proxy === ptrType.nil) && cfg.Config.CGI) { - $s = -1; return [ptrType.nil, errors.New("refusing to use HTTP_PROXY value in CGI environment; see golang.org/s/cgihttpproxy")]; - } - } - if (proxy === ptrType.nil) { - $s = -1; return [ptrType.nil, $ifaceNil]; - } - _r = canonicalAddr(reqURL); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = cfg.useProxy(_r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$1) { */ case 1: - $s = -1; return [ptrType.nil, $ifaceNil]; - /* } */ case 2: - $s = -1; return [proxy, $ifaceNil]; - /* */ } return; } var $f = {$blk: config.ptr.prototype.proxyForURL, $c: true, $r, _r, _r$1, cfg, proxy, reqURL, $s};return $f; - }; - config.prototype.proxyForURL = function(reqURL) { return this.$val.proxyForURL(reqURL); }; - parseProxy = function(proxy) { - var {$24r, _r, _r$1, _r$2, _tuple, _tuple$1, err, err$1, proxy, proxyURL, proxyURL$1, $s, $r, $c} = $restore(this, {proxy}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (proxy === "") { - $s = -1; return [ptrType.nil, $ifaceNil]; - } - _r = url.Parse(proxy); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - proxyURL = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) || (!(proxyURL.Scheme === "http") && !(proxyURL.Scheme === "https") && !(proxyURL.Scheme === "socks5"))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) || (!(proxyURL.Scheme === "http") && !(proxyURL.Scheme === "https") && !(proxyURL.Scheme === "socks5"))) { */ case 2: - _r$1 = url.Parse("http://" + proxy); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - proxyURL$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - $s = -1; return [proxyURL$1, $ifaceNil]; - } - /* } */ case 3: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - _r$2 = fmt.Errorf("invalid proxy address %q: %v", new sliceType$2([new $String(proxy), err])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [ptrType.nil, _r$2]; - $s = 8; case 8: return $24r; - /* } */ case 6: - $s = -1; return [proxyURL, $ifaceNil]; - /* */ } return; } var $f = {$blk: parseProxy, $c: true, $r, $24r, _r, _r$1, _r$2, _tuple, _tuple$1, err, err$1, proxy, proxyURL, proxyURL$1, $s};return $f; - }; - config.ptr.prototype.useProxy = function(addr) { - var {_i, _i$1, _r, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _tuple, addr, cfg, err, host, ip, m, m$1, port, $s, $r, $c} = $restore(this, {addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = this; - if (addr.length === 0) { - $s = -1; return true; - } - _r = net.SplitHostPort(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return false; - } - if (host === "localhost") { - $s = -1; return false; - } - ip = net.ParseIP(host); - if (!(ip === net.IP.nil)) { - if (ip.IsLoopback()) { - $s = -1; return false; - } - } - _r$1 = strings.TrimSpace(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = strings.ToLower(_r$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - addr = _r$2; - /* */ if (!(ip === net.IP.nil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(ip === net.IP.nil)) { */ case 4: - _ref = cfg.ipMatchers; - _i = 0; - /* while (true) { */ case 6: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 7; continue; } - m = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$3 = m.match(addr, port, ip); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_r$3) { */ case 8: - $s = -1; return false; - /* } */ case 9: - _i++; - $s = 6; continue; - case 7: - /* } */ case 5: - _ref$1 = cfg.domainMatchers; - _i$1 = 0; - /* while (true) { */ case 11: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 12; continue; } - m$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$4 = m$1.match(addr, port, ip); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (_r$4) { */ case 13: - $s = -1; return false; - /* } */ case 14: - _i$1++; - $s = 11; continue; - case 12: - $s = -1; return true; - /* */ } return; } var $f = {$blk: config.ptr.prototype.useProxy, $c: true, $r, _i, _i$1, _r, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _tuple, addr, cfg, err, host, ip, m, m$1, port, $s};return $f; - }; - config.prototype.useProxy = function(addr) { return this.$val.useProxy(addr); }; - config.ptr.prototype.init = function() { - var {_i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, c, err, err$1, err$2, err$3, matchHost, p, parsed, parsed$1, phost, pip, pnet, pport, x, x$1, x$2, x$3, x$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r = parseProxy(c.Config.HTTPProxy); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - parsed = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - c.httpProxy = parsed; - } - _r$1 = parseProxy(c.Config.HTTPSProxy); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - parsed$1 = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - c.httpsProxy = parsed$1; - } - _ref = strings.Split(c.Config.NoProxy, ","); - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - p = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$2 = strings.TrimSpace(p); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = strings.ToLower(_r$2); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - p = _r$3; - if (p.length === 0) { - _i++; - /* continue; */ $s = 3; continue; - } - if (p === "*") { - c.ipMatchers = new sliceType$1([(x = new allMatch.ptr(), new x.constructor.elem(x))]); - c.domainMatchers = new sliceType$1([(x$1 = new allMatch.ptr(), new x$1.constructor.elem(x$1))]); - $s = -1; return; - } - _tuple$2 = net.ParseCIDR(p); - pnet = _tuple$2[1]; - err$2 = _tuple$2[2]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - c.ipMatchers = $append(c.ipMatchers, (x$2 = new cidrMatch.ptr(pnet), new x$2.constructor.elem(x$2))); - _i++; - /* continue; */ $s = 3; continue; - } - _r$4 = net.SplitHostPort(p); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - phost = _tuple$3[0]; - pport = _tuple$3[1]; - err$3 = _tuple$3[2]; - if ($interfaceIsEqual(err$3, $ifaceNil)) { - if (phost.length === 0) { - _i++; - /* continue; */ $s = 3; continue; - } - if ((phost.charCodeAt(0) === 91) && (phost.charCodeAt((phost.length - 1 >> 0)) === 93)) { - phost = $substring(phost, 1, (phost.length - 1 >> 0)); - } - } else { - phost = p; - } - pip = net.ParseIP(phost); - if (!(pip === net.IP.nil)) { - c.ipMatchers = $append(c.ipMatchers, (x$3 = new ipMatch.ptr(pip, pport), new x$3.constructor.elem(x$3))); - _i++; - /* continue; */ $s = 3; continue; - } - if (phost.length === 0) { - _i++; - /* continue; */ $s = 3; continue; - } - if (strings.HasPrefix(phost, "*.")) { - phost = $substring(phost, 1); - } - matchHost = false; - if (!((phost.charCodeAt(0) === 46))) { - matchHost = true; - phost = "." + phost; - } - c.domainMatchers = $append(c.domainMatchers, (x$4 = new domainMatch.ptr(phost, pport, matchHost), new x$4.constructor.elem(x$4))); - _i++; - $s = 3; continue; - case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: config.ptr.prototype.init, $c: true, $r, _i, _r, _r$1, _r$2, _r$3, _r$4, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, c, err, err$1, err$2, err$3, matchHost, p, parsed, parsed$1, phost, pip, pnet, pport, x, x$1, x$2, x$3, x$4, $s};return $f; - }; - config.prototype.init = function() { return this.$val.init(); }; - canonicalAddr = function(url$1) { - var {_entry, _r, _tuple, addr, err, port, url$1, v, $s, $r, $c} = $restore(this, {url$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addr = url$1.Hostname(); - _r = idnaASCII(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - v = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - addr = v; - } - port = url$1.Port(); - if (port === "") { - port = (_entry = portMap[$String.keyFor(url$1.Scheme)], _entry !== undefined ? _entry.v : ""); - } - $s = -1; return net.JoinHostPort(addr, port); - /* */ } return; } var $f = {$blk: canonicalAddr, $c: true, $r, _entry, _r, _tuple, addr, err, port, url$1, v, $s};return $f; - }; - idnaASCII = function(v) { - var {$24r, _r, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (isASCII(v)) { - $s = -1; return [v, $ifaceNil]; - } - _r = idna.Lookup.ToASCII(v); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: idnaASCII, $c: true, $r, $24r, _r, v, $s};return $f; - }; - isASCII = function(s) { - var i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) >= 128) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - allMatch.ptr.prototype.match = function(host, port, ip) { - var a, host, ip, port; - a = this; - return true; - }; - allMatch.prototype.match = function(host, port, ip) { return this.$val.match(host, port, ip); }; - cidrMatch.ptr.prototype.match = function(host, port, ip) { - var host, ip, m, port; - m = this; - return m.cidr.Contains(ip); - }; - cidrMatch.prototype.match = function(host, port, ip) { return this.$val.match(host, port, ip); }; - ipMatch.ptr.prototype.match = function(host, port, ip) { - var host, ip, m, port; - m = this; - if (m.ip.Equal(ip)) { - return m.port === "" || m.port === port; - } - return false; - }; - ipMatch.prototype.match = function(host, port, ip) { return this.$val.match(host, port, ip); }; - domainMatch.ptr.prototype.match = function(host, port, ip) { - var host, ip, m, port; - m = this; - if (strings.HasSuffix(host, m.host) || (m.matchHost && host === $substring(m.host, 1))) { - return m.port === "" || m.port === port; - } - return false; - }; - domainMatch.prototype.match = function(host, port, ip) { return this.$val.match(host, port, ip); }; - ptrType$2.methods = [{prop: "ProxyFunc", name: "ProxyFunc", pkg: "", typ: $funcType([], [funcType], false)}]; - ptrType$3.methods = [{prop: "proxyForURL", name: "proxyForURL", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([ptrType], [ptrType, $error], false)}, {prop: "useProxy", name: "useProxy", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([$String], [$Bool], false)}, {prop: "init", name: "init", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([], [], false)}]; - allMatch.methods = [{prop: "match", name: "match", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([$String, $String, net.IP], [$Bool], false)}]; - cidrMatch.methods = [{prop: "match", name: "match", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([$String, $String, net.IP], [$Bool], false)}]; - ipMatch.methods = [{prop: "match", name: "match", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([$String, $String, net.IP], [$Bool], false)}]; - domainMatch.methods = [{prop: "match", name: "match", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([$String, $String, net.IP], [$Bool], false)}]; - Config.init("", [{prop: "HTTPProxy", name: "HTTPProxy", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "HTTPSProxy", name: "HTTPSProxy", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "NoProxy", name: "NoProxy", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "CGI", name: "CGI", embedded: false, exported: true, typ: $Bool, tag: ""}]); - config.init("vendor/golang.org/x/net/http/httpproxy", [{prop: "Config", name: "Config", embedded: true, exported: true, typ: Config, tag: ""}, {prop: "httpsProxy", name: "httpsProxy", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "httpProxy", name: "httpProxy", embedded: false, exported: false, typ: ptrType, tag: ""}, {prop: "ipMatchers", name: "ipMatchers", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "domainMatchers", name: "domainMatchers", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - matcher.init([{prop: "match", name: "match", pkg: "vendor/golang.org/x/net/http/httpproxy", typ: $funcType([$String, $String, net.IP], [$Bool], false)}]); - allMatch.init("", []); - cidrMatch.init("vendor/golang.org/x/net/http/httpproxy", [{prop: "cidr", name: "cidr", embedded: false, exported: false, typ: ptrType$1, tag: ""}]); - ipMatch.init("vendor/golang.org/x/net/http/httpproxy", [{prop: "ip", name: "ip", embedded: false, exported: false, typ: net.IP, tag: ""}, {prop: "port", name: "port", embedded: false, exported: false, typ: $String, tag: ""}]); - domainMatch.init("vendor/golang.org/x/net/http/httpproxy", [{prop: "host", name: "host", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "port", name: "port", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "matchHost", name: "matchHost", embedded: false, exported: false, typ: $Bool, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = errors.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = net.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = url.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = idna.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - portMap = $makeMap($String.keyFor, [{ k: "http", v: "80" }, { k: "https", v: "443" }, { k: "socks5", v: "1080" }]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["vendor/golang.org/x/net/http2/hpack"] = (function() { - var $pkg = {}, $init, bytes, errors, fmt, io, sync, headerFieldTable, pairNameValue, incomparable, node, DecodingError, InvalidIndexError, HeaderField, Decoder, dynamicTable, indexType, Encoder, ptrType, sliceType, sliceType$1, sliceType$2, ptrType$1, arrayType, ptrType$2, funcType, arrayType$1, arrayType$2, ptrType$3, mapType, mapType$1, funcType$1, ptrType$4, ptrType$5, ptrType$6, staticTable, staticTableEntries, huffmanCodes, huffmanCodeLen, bufPool, buildRootOnce, lazyRootHuffmanNode, errNeedMore, errVarintOverflow, newStaticTable, huffmanDecode, newInternalNode, getRootHuffmanNode, buildRootHuffmanNode, AppendHuffmanString, HuffmanEncodeLength, appendByteToHuffmanCode, NewDecoder, readVarInt, NewEncoder, appendIndexed, appendNewName, appendIndexedName, appendTableSize, appendVarInt, appendHpackString, encodeTypeByte; - bytes = $packages["bytes"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - io = $packages["io"]; - sync = $packages["sync"]; - headerFieldTable = $pkg.headerFieldTable = $newType(0, $kindStruct, "hpack.headerFieldTable", true, "vendor/golang.org/x/net/http2/hpack", false, function(ents_, evictCount_, byName_, byNameValue_) { - this.$val = this; - if (arguments.length === 0) { - this.ents = sliceType$2.nil; - this.evictCount = new $Uint64(0, 0); - this.byName = false; - this.byNameValue = false; - return; - } - this.ents = ents_; - this.evictCount = evictCount_; - this.byName = byName_; - this.byNameValue = byNameValue_; - }); - pairNameValue = $pkg.pairNameValue = $newType(0, $kindStruct, "hpack.pairNameValue", true, "vendor/golang.org/x/net/http2/hpack", false, function(name_, value_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.value = ""; - return; - } - this.name = name_; - this.value = value_; - }); - incomparable = $pkg.incomparable = $newType(0, $kindArray, "hpack.incomparable", true, "vendor/golang.org/x/net/http2/hpack", false, null); - node = $pkg.node = $newType(0, $kindStruct, "hpack.node", true, "vendor/golang.org/x/net/http2/hpack", false, function(_$0_, children_, codeLen_, sym_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType$1.zero(); - this.children = ptrType$2.nil; - this.codeLen = 0; - this.sym = 0; - return; - } - this._$0 = _$0_; - this.children = children_; - this.codeLen = codeLen_; - this.sym = sym_; - }); - DecodingError = $pkg.DecodingError = $newType(0, $kindStruct, "hpack.DecodingError", true, "vendor/golang.org/x/net/http2/hpack", true, function(Err_) { - this.$val = this; - if (arguments.length === 0) { - this.Err = $ifaceNil; - return; - } - this.Err = Err_; - }); - InvalidIndexError = $pkg.InvalidIndexError = $newType(4, $kindInt, "hpack.InvalidIndexError", true, "vendor/golang.org/x/net/http2/hpack", true, null); - HeaderField = $pkg.HeaderField = $newType(0, $kindStruct, "hpack.HeaderField", true, "vendor/golang.org/x/net/http2/hpack", true, function(Name_, Value_, Sensitive_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.Value = ""; - this.Sensitive = false; - return; - } - this.Name = Name_; - this.Value = Value_; - this.Sensitive = Sensitive_; - }); - Decoder = $pkg.Decoder = $newType(0, $kindStruct, "hpack.Decoder", true, "vendor/golang.org/x/net/http2/hpack", true, function(dynTab_, emit_, emitEnabled_, maxStrLen_, buf_, saveBuf_, firstField_) { - this.$val = this; - if (arguments.length === 0) { - this.dynTab = new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0); - this.emit = $throwNilPointerError; - this.emitEnabled = false; - this.maxStrLen = 0; - this.buf = sliceType$1.nil; - this.saveBuf = new bytes.Buffer.ptr(sliceType$1.nil, 0, 0); - this.firstField = false; - return; - } - this.dynTab = dynTab_; - this.emit = emit_; - this.emitEnabled = emitEnabled_; - this.maxStrLen = maxStrLen_; - this.buf = buf_; - this.saveBuf = saveBuf_; - this.firstField = firstField_; - }); - dynamicTable = $pkg.dynamicTable = $newType(0, $kindStruct, "hpack.dynamicTable", true, "vendor/golang.org/x/net/http2/hpack", false, function(table_, size_, maxSize_, allowedMaxSize_) { - this.$val = this; - if (arguments.length === 0) { - this.table = new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false); - this.size = 0; - this.maxSize = 0; - this.allowedMaxSize = 0; - return; - } - this.table = table_; - this.size = size_; - this.maxSize = maxSize_; - this.allowedMaxSize = allowedMaxSize_; - }); - indexType = $pkg.indexType = $newType(4, $kindInt, "hpack.indexType", true, "vendor/golang.org/x/net/http2/hpack", false, null); - Encoder = $pkg.Encoder = $newType(0, $kindStruct, "hpack.Encoder", true, "vendor/golang.org/x/net/http2/hpack", true, function(dynTab_, minSize_, maxSizeLimit_, tableSizeUpdate_, w_, buf_) { - this.$val = this; - if (arguments.length === 0) { - this.dynTab = new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0); - this.minSize = 0; - this.maxSizeLimit = 0; - this.tableSizeUpdate = false; - this.w = $ifaceNil; - this.buf = sliceType$1.nil; - return; - } - this.dynTab = dynTab_; - this.minSize = minSize_; - this.maxSizeLimit = maxSizeLimit_; - this.tableSizeUpdate = tableSizeUpdate_; - this.w = w_; - this.buf = buf_; - }); - ptrType = $ptrType(node); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($Uint8); - sliceType$2 = $sliceType(HeaderField); - ptrType$1 = $ptrType(bytes.Buffer); - arrayType = $arrayType(ptrType, 256); - ptrType$2 = $ptrType(arrayType); - funcType = $funcType([], [], false); - arrayType$1 = $arrayType(funcType, 0); - arrayType$2 = $arrayType(node, 256); - ptrType$3 = $ptrType(headerFieldTable); - mapType = $mapType($String, $Uint64); - mapType$1 = $mapType(pairNameValue, $Uint64); - funcType$1 = $funcType([HeaderField], [], false); - ptrType$4 = $ptrType(Decoder); - ptrType$5 = $ptrType(dynamicTable); - ptrType$6 = $ptrType(Encoder); - headerFieldTable.ptr.prototype.init = function() { - var t; - t = this; - t.byName = {}; - t.byNameValue = {}; - }; - headerFieldTable.prototype.init = function() { return this.$val.init(); }; - headerFieldTable.ptr.prototype.len = function() { - var t; - t = this; - return t.ents.$length; - }; - headerFieldTable.prototype.len = function() { return this.$val.len(); }; - headerFieldTable.ptr.prototype.addEntry = function(f) { - var _key, _key$1, f, id, t, x, x$1, x$2; - t = this; - id = (x = (x$1 = (new $Uint64(0, t.len())), x$2 = t.evictCount, new $Uint64(x$1.$high + x$2.$high, x$1.$low + x$2.$low)), new $Uint64(x.$high + 0, x.$low + 1)); - _key = f.Name; (t.byName || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: id }; - _key$1 = new pairNameValue.ptr(f.Name, f.Value); (t.byNameValue || $throwRuntimeError("assignment to entry in nil map"))[pairNameValue.keyFor(_key$1)] = { k: _key$1, v: id }; - t.ents = $append(t.ents, f); - }; - headerFieldTable.prototype.addEntry = function(f) { return this.$val.addEntry(f); }; - headerFieldTable.ptr.prototype.evictOldest = function(n) { - var {_entry, _entry$1, _r, f, id, k, k$1, n, p, t, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if (n > t.len()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n > t.len()) { */ case 1: - _r = fmt.Sprintf("evictOldest(%v) on table with %v entries", new sliceType([new $Int(n), new $Int(t.len())])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 2: - k = 0; - while (true) { - if (!(k < n)) { break; } - f = $clone((x = t.ents, ((k < 0 || k >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + k])), HeaderField); - id = (x$1 = (x$2 = t.evictCount, x$3 = (new $Uint64(0, k)), new $Uint64(x$2.$high + x$3.$high, x$2.$low + x$3.$low)), new $Uint64(x$1.$high + 0, x$1.$low + 1)); - if ((x$4 = (_entry = t.byName[$String.keyFor(f.Name)], _entry !== undefined ? _entry.v : new $Uint64(0, 0)), (x$4.$high === id.$high && x$4.$low === id.$low))) { - delete t.byName[$String.keyFor(f.Name)]; - } - p = $clone(new pairNameValue.ptr(f.Name, f.Value), pairNameValue); - if ((x$5 = (_entry$1 = t.byNameValue[pairNameValue.keyFor(p)], _entry$1 !== undefined ? _entry$1.v : new $Uint64(0, 0)), (x$5.$high === id.$high && x$5.$low === id.$low))) { - delete t.byNameValue[pairNameValue.keyFor(p)]; - } - k = k + (1) >> 0; - } - $copySlice(t.ents, $subslice(t.ents, n)); - k$1 = t.len() - n >> 0; - while (true) { - if (!(k$1 < t.len())) { break; } - HeaderField.copy((x$6 = t.ents, ((k$1 < 0 || k$1 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + k$1])), new HeaderField.ptr("", "", false)); - k$1 = k$1 + (1) >> 0; - } - t.ents = $subslice(t.ents, 0, (t.len() - n >> 0)); - if ((x$7 = (x$8 = t.evictCount, x$9 = (new $Uint64(0, n)), new $Uint64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)), x$10 = t.evictCount, (x$7.$high < x$10.$high || (x$7.$high === x$10.$high && x$7.$low < x$10.$low)))) { - $panic(new $String("evictCount overflow")); - } - t.evictCount = (x$11 = t.evictCount, x$12 = (new $Uint64(0, n)), new $Uint64(x$11.$high + x$12.$high, x$11.$low + x$12.$low)); - $s = -1; return; - /* */ } return; } var $f = {$blk: headerFieldTable.ptr.prototype.evictOldest, $c: true, $r, _entry, _entry$1, _r, f, id, k, k$1, n, p, t, x, x$1, x$10, x$11, x$12, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - headerFieldTable.prototype.evictOldest = function(n) { return this.$val.evictOldest(n); }; - headerFieldTable.ptr.prototype.search = function(f) { - var {$24r, $24r$1, _entry, _entry$1, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, f, i, id, id$1, nameValueMatch, t, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = new $Uint64(0, 0); - nameValueMatch = false; - t = this; - /* */ if (!f.Sensitive) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!f.Sensitive) { */ case 1: - id = (_entry = t.byNameValue[pairNameValue.keyFor(new pairNameValue.ptr(f.Name, f.Value))], _entry !== undefined ? _entry.v : new $Uint64(0, 0)); - /* */ if (!((id.$high === 0 && id.$low === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((id.$high === 0 && id.$low === 0))) { */ case 3: - _r = t.idToIndex(id); /* */ $s = 5; case 5: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tmp = _r; - _tmp$1 = true; - i = _tmp; - nameValueMatch = _tmp$1; - $24r = [i, nameValueMatch]; - $s = 6; case 6: return $24r; - /* } */ case 4: - /* } */ case 2: - id$1 = (_entry$1 = t.byName[$String.keyFor(f.Name)], _entry$1 !== undefined ? _entry$1.v : new $Uint64(0, 0)); - /* */ if (!((id$1.$high === 0 && id$1.$low === 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((id$1.$high === 0 && id$1.$low === 0))) { */ case 7: - _r$1 = t.idToIndex(id$1); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$2 = _r$1; - _tmp$3 = false; - i = _tmp$2; - nameValueMatch = _tmp$3; - $24r$1 = [i, nameValueMatch]; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - _tmp$4 = new $Uint64(0, 0); - _tmp$5 = false; - i = _tmp$4; - nameValueMatch = _tmp$5; - $s = -1; return [i, nameValueMatch]; - /* */ } return; } var $f = {$blk: headerFieldTable.ptr.prototype.search, $c: true, $r, $24r, $24r$1, _entry, _entry$1, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, f, i, id, id$1, nameValueMatch, t, $s};return $f; - }; - headerFieldTable.prototype.search = function(f) { return this.$val.search(f); }; - headerFieldTable.ptr.prototype.idToIndex = function(id) { - var {_r, id, k, t, x, x$1, x$2, x$3, $s, $r, $c} = $restore(this, {id}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if ((x = t.evictCount, (id.$high < x.$high || (id.$high === x.$high && id.$low <= x.$low)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x = t.evictCount, (id.$high < x.$high || (id.$high === x.$high && id.$low <= x.$low)))) { */ case 1: - _r = fmt.Sprintf("id (%v) <= evictCount (%v)", new sliceType([id, t.evictCount])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $panic(new $String(_r)); - /* } */ case 2: - k = (x$1 = (x$2 = t.evictCount, new $Uint64(id.$high - x$2.$high, id.$low - x$2.$low)), new $Uint64(x$1.$high - 0, x$1.$low - 1)); - if (!(t === staticTable)) { - $s = -1; return (x$3 = (new $Uint64(0, t.len())), new $Uint64(x$3.$high - k.$high, x$3.$low - k.$low)); - } - $s = -1; return new $Uint64(k.$high + 0, k.$low + 1); - /* */ } return; } var $f = {$blk: headerFieldTable.ptr.prototype.idToIndex, $c: true, $r, _r, id, k, t, x, x$1, x$2, x$3, $s};return $f; - }; - headerFieldTable.prototype.idToIndex = function(id) { return this.$val.idToIndex(id); }; - newStaticTable = function() { - var _i, _ref, e, t; - t = new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false); - t.init(); - _ref = new sliceType$2(staticTableEntries); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), HeaderField); - t.addEntry($clone(e, HeaderField)); - _i++; - } - return t; - }; - huffmanDecode = function(buf, maxLen, v) { - var {_i, _r, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$2, b, buf, cbits, cur, idx, mask, maxLen, n, rootHuffmanNode, sbits, v, x, x$1, x$2, y, y$1, y$2, $s, $r, $c} = $restore(this, {buf, maxLen, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = getRootHuffmanNode(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - rootHuffmanNode = _r; - n = rootHuffmanNode; - _tmp = 0; - _tmp$1 = 0; - _tmp$2 = 0; - cur = _tmp; - cbits = _tmp$1; - sbits = _tmp$2; - _ref = v; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - cur = ((cur << 8 >>> 0) | ((b >>> 0))) >>> 0; - cbits = cbits + (8) << 24 >>> 24; - sbits = sbits + (8) << 24 >>> 24; - /* while (true) { */ case 4: - /* if (!(cbits >= 8)) { break; } */ if(!(cbits >= 8)) { $s = 5; continue; } - idx = ((((y = ((cbits - 8 << 24 >>> 24)), y < 32 ? (cur >>> y) : 0) >>> 0) << 24 >>> 24)); - n = (x = n.children, ((idx < 0 || idx >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[idx])); - if (n === ptrType.nil) { - $s = -1; return $pkg.ErrInvalidHuffman; - } - /* */ if (n.children === ptrType$2.nil) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (n.children === ptrType$2.nil) { */ case 6: - if (!((maxLen === 0)) && (buf.Len() === maxLen)) { - $s = -1; return $pkg.ErrStringLength; - } - _r$1 = buf.WriteByte(n.sym); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - cbits = cbits - (n.codeLen) << 24 >>> 24; - n = rootHuffmanNode; - sbits = cbits; - $s = 8; continue; - /* } else { */ case 7: - cbits = cbits - (8) << 24 >>> 24; - /* } */ case 8: - $s = 4; continue; - case 5: - _i++; - $s = 2; continue; - case 3: - /* while (true) { */ case 10: - /* if (!(cbits > 0)) { break; } */ if(!(cbits > 0)) { $s = 11; continue; } - n = (x$1 = n.children, x$2 = ((((y$1 = ((8 - cbits << 24 >>> 24)), y$1 < 32 ? (cur << y$1) : 0) >>> 0) << 24 >>> 24)), ((x$2 < 0 || x$2 >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[x$2])); - if (n === ptrType.nil) { - $s = -1; return $pkg.ErrInvalidHuffman; - } - if (!(n.children === ptrType$2.nil) || n.codeLen > cbits) { - /* break; */ $s = 11; continue; - } - if (!((maxLen === 0)) && (buf.Len() === maxLen)) { - $s = -1; return $pkg.ErrStringLength; - } - _r$2 = buf.WriteByte(n.sym); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - cbits = cbits - (n.codeLen) << 24 >>> 24; - n = rootHuffmanNode; - sbits = cbits; - $s = 10; continue; - case 11: - if (sbits > 7) { - $s = -1; return $pkg.ErrInvalidHuffman; - } - mask = ((((y$2 = cbits, y$2 < 32 ? (1 << y$2) : 0) >>> 0) - 1 >>> 0)); - if (!((((cur & mask) >>> 0) === mask))) { - $s = -1; return $pkg.ErrInvalidHuffman; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: huffmanDecode, $c: true, $r, _i, _r, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$2, b, buf, cbits, cur, idx, mask, maxLen, n, rootHuffmanNode, sbits, v, x, x$1, x$2, y, y$1, y$2, $s};return $f; - }; - newInternalNode = function() { - return new node.ptr(arrayType$1.zero(), arrayType.zero(), 0, 0); - }; - getRootHuffmanNode = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = buildRootOnce.Do(buildRootHuffmanNode); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return lazyRootHuffmanNode; - /* */ } return; } var $f = {$blk: getRootHuffmanNode, $c: true, $r, $s};return $f; - }; - buildRootHuffmanNode = function() { - var _i, _ref, _tmp, _tmp$1, code, codeLen, cur, end, i, i$1, leaves, shift, start, sym, x, x$1, x$2, x$3, x$4, x$5, x$6, y, y$1, y$2; - if (false) { - $panic(new $String("unexpected size")); - } - lazyRootHuffmanNode = newInternalNode(); - leaves = arrayType$2.zero(); - _ref = huffmanCodes; - _i = 0; - while (true) { - if (!(_i < 256)) { break; } - sym = _i; - code = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); - codeLen = ((sym < 0 || sym >= huffmanCodeLen.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodeLen[sym]); - cur = lazyRootHuffmanNode; - while (true) { - if (!(codeLen > 8)) { break; } - codeLen = codeLen - (8) << 24 >>> 24; - i = ((((y = codeLen, y < 32 ? (code >>> y) : 0) >>> 0) << 24 >>> 24)); - if ((x = cur.children, ((i < 0 || i >= x.length) ? ($throwRuntimeError("index out of range"), undefined) : x[i])) === ptrType.nil) { - (x$1 = cur.children, x$1.nilCheck, ((i < 0 || i >= x$1.length) ? ($throwRuntimeError("index out of range"), undefined) : x$1[i] = newInternalNode())); - } - cur = (x$2 = cur.children, ((i < 0 || i >= x$2.length) ? ($throwRuntimeError("index out of range"), undefined) : x$2[i])); - } - shift = 8 - codeLen << 24 >>> 24; - _tmp = ((((((y$1 = shift, y$1 < 32 ? (code << y$1) : 0) >>> 0) << 24 >>> 24)) >> 0)); - _tmp$1 = (((y$2 = shift, y$2 < 32 ? (1 << y$2) : 0) >> 0)); - start = _tmp; - end = _tmp$1; - (x$3 = leaves, ((sym < 0 || sym >= x$3.length) ? ($throwRuntimeError("index out of range"), undefined) : x$3[sym])).sym = ((sym << 24 >>> 24)); - (x$4 = leaves, ((sym < 0 || sym >= x$4.length) ? ($throwRuntimeError("index out of range"), undefined) : x$4[sym])).codeLen = codeLen; - i$1 = start; - while (true) { - if (!(i$1 < (start + end >> 0))) { break; } - (x$6 = cur.children, x$6.nilCheck, ((i$1 < 0 || i$1 >= x$6.length) ? ($throwRuntimeError("index out of range"), undefined) : x$6[i$1] = (x$5 = leaves, ((sym < 0 || sym >= x$5.length) ? ($throwRuntimeError("index out of range"), undefined) : x$5[sym])))); - i$1 = i$1 + (1) >> 0; - } - _i++; - } - }; - AppendHuffmanString = function(dst, s) { - var _index, _tuple, code, dst, i, nbits, rembits, s, t, y; - rembits = 8; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (rembits === 8) { - dst = $append(dst, 0); - } - _tuple = appendByteToHuffmanCode(dst, rembits, s.charCodeAt(i)); - dst = _tuple[0]; - rembits = _tuple[1]; - i = i + (1) >> 0; - } - if (rembits < 8) { - code = 1073741823; - nbits = 30; - t = ((((y = ((nbits - rembits << 24 >>> 24)), y < 32 ? (code >>> y) : 0) >>> 0) << 24 >>> 24)); - _index = dst.$length - 1 >> 0; - ((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index] = ((((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index]) | (t)) >>> 0)); - } - return dst; - }; - $pkg.AppendHuffmanString = AppendHuffmanString; - HuffmanEncodeLength = function(s) { - var i, n, s, x, x$1; - n = new $Uint64(0, 0); - i = 0; - while (true) { - if (!(i < s.length)) { break; } - n = (x = (new $Uint64(0, (x$1 = s.charCodeAt(i), ((x$1 < 0 || x$1 >= huffmanCodeLen.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodeLen[x$1])))), new $Uint64(n.$high + x.$high, n.$low + x.$low)); - i = i + (1) >> 0; - } - return $div64((new $Uint64(n.$high + 0, n.$low + 7)), new $Uint64(0, 8), false); - }; - $pkg.HuffmanEncodeLength = HuffmanEncodeLength; - appendByteToHuffmanCode = function(dst, rembits, c) { - var _index, _index$1, c, code, dst, nbits, rembits, t, t$1, y, y$1; - code = ((c < 0 || c >= huffmanCodes.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodes[c]); - nbits = ((c < 0 || c >= huffmanCodeLen.length) ? ($throwRuntimeError("index out of range"), undefined) : huffmanCodeLen[c]); - while (true) { - if (rembits > nbits) { - t = ((((y = ((rembits - nbits << 24 >>> 24)), y < 32 ? (code << y) : 0) >>> 0) << 24 >>> 24)); - _index = dst.$length - 1 >> 0; - ((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index] = ((((_index < 0 || _index >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index]) | (t)) >>> 0)); - rembits = rembits - (nbits) << 24 >>> 24; - break; - } - t$1 = ((((y$1 = ((nbits - rembits << 24 >>> 24)), y$1 < 32 ? (code >>> y$1) : 0) >>> 0) << 24 >>> 24)); - _index$1 = dst.$length - 1 >> 0; - ((_index$1 < 0 || _index$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index$1] = ((((_index$1 < 0 || _index$1 >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + _index$1]) | (t$1)) >>> 0)); - nbits = nbits - (rembits) << 24 >>> 24; - rembits = 8; - if (nbits === 0) { - break; - } - dst = $append(dst, 0); - } - return [dst, rembits]; - }; - DecodingError.ptr.prototype.Error = function() { - var {$24r, _r, de, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - de = this; - _r = fmt.Sprintf("decoding error: %v", new sliceType([de.Err])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: DecodingError.ptr.prototype.Error, $c: true, $r, $24r, _r, de, $s};return $f; - }; - DecodingError.prototype.Error = function() { return this.$val.Error(); }; - InvalidIndexError.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r = fmt.Sprintf("invalid indexed representation index %d", new sliceType([new $Int(((e >> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InvalidIndexError.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - $ptrType(InvalidIndexError).prototype.Error = function() { return new InvalidIndexError(this.$get()).Error(); }; - HeaderField.ptr.prototype.IsPseudo = function() { - var hf; - hf = this; - return !((hf.Name.length === 0)) && (hf.Name.charCodeAt(0) === 58); - }; - HeaderField.prototype.IsPseudo = function() { return this.$val.IsPseudo(); }; - HeaderField.ptr.prototype.String = function() { - var {$24r, _r, hf, suffix, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hf = this; - suffix = ""; - if (hf.Sensitive) { - suffix = " (sensitive)"; - } - _r = fmt.Sprintf("header field %q = %q%s", new sliceType([new $String(hf.Name), new $String(hf.Value), new $String(suffix)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: HeaderField.ptr.prototype.String, $c: true, $r, $24r, _r, hf, suffix, $s};return $f; - }; - HeaderField.prototype.String = function() { return this.$val.String(); }; - HeaderField.ptr.prototype.Size = function() { - var hf; - hf = this; - return ((((hf.Name.length + hf.Value.length >> 0) + 32 >> 0) >>> 0)); - }; - HeaderField.prototype.Size = function() { return this.$val.Size(); }; - NewDecoder = function(maxDynamicTableSize, emitFunc) { - var {d, emitFunc, maxDynamicTableSize, $s, $r, $c} = $restore(this, {maxDynamicTableSize, emitFunc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = new Decoder.ptr(new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0), emitFunc, true, 0, sliceType$1.nil, new bytes.Buffer.ptr(sliceType$1.nil, 0, 0), true); - d.dynTab.table.init(); - d.dynTab.allowedMaxSize = maxDynamicTableSize; - $r = d.dynTab.setMaxSize(maxDynamicTableSize); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return d; - /* */ } return; } var $f = {$blk: NewDecoder, $c: true, $r, d, emitFunc, maxDynamicTableSize, $s};return $f; - }; - $pkg.NewDecoder = NewDecoder; - Decoder.ptr.prototype.SetMaxStringLength = function(n) { - var d, n; - d = this; - d.maxStrLen = n; - }; - Decoder.prototype.SetMaxStringLength = function(n) { return this.$val.SetMaxStringLength(n); }; - Decoder.ptr.prototype.SetEmitFunc = function(emitFunc) { - var d, emitFunc; - d = this; - d.emit = emitFunc; - }; - Decoder.prototype.SetEmitFunc = function(emitFunc) { return this.$val.SetEmitFunc(emitFunc); }; - Decoder.ptr.prototype.SetEmitEnabled = function(v) { - var d, v; - d = this; - d.emitEnabled = v; - }; - Decoder.prototype.SetEmitEnabled = function(v) { return this.$val.SetEmitEnabled(v); }; - Decoder.ptr.prototype.EmitEnabled = function() { - var d; - d = this; - return d.emitEnabled; - }; - Decoder.prototype.EmitEnabled = function() { return this.$val.EmitEnabled(); }; - Decoder.ptr.prototype.SetMaxDynamicTableSize = function(v) { - var {d, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - $r = d.dynTab.setMaxSize(v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.SetMaxDynamicTableSize, $c: true, $r, d, v, $s};return $f; - }; - Decoder.prototype.SetMaxDynamicTableSize = function(v) { return this.$val.SetMaxDynamicTableSize(v); }; - Decoder.ptr.prototype.SetAllowedMaxDynamicTableSize = function(v) { - var d, v; - d = this; - d.dynTab.allowedMaxSize = v; - }; - Decoder.prototype.SetAllowedMaxDynamicTableSize = function(v) { return this.$val.SetAllowedMaxDynamicTableSize(v); }; - dynamicTable.ptr.prototype.setMaxSize = function(v) { - var {dt, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dt = this; - dt.maxSize = v; - $r = dt.evict(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: dynamicTable.ptr.prototype.setMaxSize, $c: true, $r, dt, v, $s};return $f; - }; - dynamicTable.prototype.setMaxSize = function(v) { return this.$val.setMaxSize(v); }; - dynamicTable.ptr.prototype.add = function(f) { - var {dt, f, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dt = this; - dt.table.addEntry($clone(f, HeaderField)); - dt.size = dt.size + ($clone(f, HeaderField).Size()) >>> 0; - $r = dt.evict(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: dynamicTable.ptr.prototype.add, $c: true, $r, dt, f, $s};return $f; - }; - dynamicTable.prototype.add = function(f) { return this.$val.add(f); }; - dynamicTable.ptr.prototype.evict = function() { - var {dt, n, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - dt = this; - n = 0; - while (true) { - if (!(dt.size > dt.maxSize && n < dt.table.len())) { break; } - dt.size = dt.size - ($clone((x = dt.table.ents, ((n < 0 || n >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + n])), HeaderField).Size()) >>> 0; - n = n + (1) >> 0; - } - $r = dt.table.evictOldest(n); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: dynamicTable.ptr.prototype.evict, $c: true, $r, dt, n, x, $s};return $f; - }; - dynamicTable.prototype.evict = function() { return this.$val.evict(); }; - Decoder.ptr.prototype.maxTableIndex = function() { - var d; - d = this; - return d.dynTab.table.len() + staticTable.len() >> 0; - }; - Decoder.prototype.maxTableIndex = function() { return this.$val.maxTableIndex(); }; - Decoder.ptr.prototype.at = function(i) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, d, dt, hf, i, ok, x, x$1, x$2, x$3, x$4, x$5; - hf = new HeaderField.ptr("", "", false); - ok = false; - d = this; - if ((i.$high === 0 && i.$low === 0)) { - return [hf, ok]; - } - if ((x = (new $Uint64(0, staticTable.len())), (i.$high < x.$high || (i.$high === x.$high && i.$low <= x.$low)))) { - _tmp = $clone((x$1 = staticTable.ents, x$2 = new $Uint64(i.$high - 0, i.$low - 1), (($flatten64(x$2) < 0 || $flatten64(x$2) >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + $flatten64(x$2)])), HeaderField); - _tmp$1 = true; - HeaderField.copy(hf, _tmp); - ok = _tmp$1; - return [hf, ok]; - } - if ((x$3 = (new $Uint64(0, d.maxTableIndex())), (i.$high > x$3.$high || (i.$high === x$3.$high && i.$low > x$3.$low)))) { - return [hf, ok]; - } - dt = $clone(d.dynTab.table, headerFieldTable); - _tmp$2 = $clone((x$4 = dt.ents, x$5 = dt.len() - ((((i.$low >> 0)) - staticTable.len() >> 0)) >> 0, ((x$5 < 0 || x$5 >= x$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + x$5])), HeaderField); - _tmp$3 = true; - HeaderField.copy(hf, _tmp$2); - ok = _tmp$3; - return [hf, ok]; - }; - Decoder.prototype.at = function(i) { return this.$val.at(i); }; - Decoder.ptr.prototype.DecodeFull = function(p) { - var {$24r, $24r$1, $24r$2, _r, _tuple, d, err, err$1, hf, p, saveFunc, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - d = [d]; - hf = [hf]; - saveFunc = [saveFunc]; - d[0] = this; - hf[0] = sliceType$2.nil; - saveFunc[0] = d[0].emit; - $deferred.push([(function(d, hf, saveFunc) { return function() { - d[0].emit = saveFunc[0]; - }; })(d, hf, saveFunc), []]); - d[0].emit = (function(d, hf, saveFunc) { return function(f) { - var f; - hf[0] = $append(hf[0], f); - }; })(d, hf, saveFunc); - _r = d[0].Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $24r = [sliceType$2.nil, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - err$1 = d[0].Close(); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 5: - $24r$1 = [sliceType$2.nil, err$1]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - $24r$2 = [hf[0], $ifaceNil]; - $s = 8; case 8: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [sliceType$2.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Decoder.ptr.prototype.DecodeFull, $c: true, $r, $24r, $24r$1, $24r$2, _r, _tuple, d, err, err$1, hf, p, saveFunc, $s, $deferred};return $f; } } - }; - Decoder.prototype.DecodeFull = function(p) { return this.$val.DecodeFull(p); }; - Decoder.ptr.prototype.Close = function() { - var d, x; - d = this; - if (d.saveBuf.Len() > 0) { - d.saveBuf.Reset(); - return (x = new DecodingError.ptr(errors.New("truncated headers")), new x.constructor.elem(x)); - } - d.firstField = true; - return $ifaceNil; - }; - Decoder.prototype.Close = function() { return this.$val.Close(); }; - Decoder.ptr.prototype.Write = function(p) { - var {_r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, err, n, p, x, x$1, x$2, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - d = this; - if (p.$length === 0) { - $s = -1; return [n, err]; - } - /* */ if (d.saveBuf.Len() === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d.saveBuf.Len() === 0) { */ case 1: - d.buf = p; - $s = 3; continue; - /* } else { */ case 2: - _r = d.saveBuf.Write(p); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - d.buf = d.saveBuf.Bytes(); - d.saveBuf.Reset(); - /* } */ case 3: - /* while (true) { */ case 5: - /* if (!(d.buf.$length > 0)) { break; } */ if(!(d.buf.$length > 0)) { $s = 6; continue; } - _r$1 = d.parseHeaderFieldRepr(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if ($interfaceIsEqual(err, errNeedMore)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($interfaceIsEqual(err, errNeedMore)) { */ case 8: - if (!((d.maxStrLen === 0)) && (x = (new $Int64(0, d.buf.$length)), x$1 = $mul64(new $Int64(0, 2), ((x$2 = (new $Int64(0, d.maxStrLen)), new $Int64(x$2.$high + 0, x$2.$low + 8)))), (x.$high > x$1.$high || (x.$high === x$1.$high && x.$low > x$1.$low)))) { - _tmp = 0; - _tmp$1 = $pkg.ErrStringLength; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$2 = d.saveBuf.Write(d.buf); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _tmp$2 = p.$length; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* } */ case 9: - d.firstField = false; - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 6; continue; - } - $s = 5; continue; - case 6: - _tmp$4 = p.$length; - _tmp$5 = err; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.Write, $c: true, $r, _r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, d, err, n, p, x, x$1, x$2, $s};return $f; - }; - Decoder.prototype.Write = function(p) { return this.$val.Write(p); }; - indexType.prototype.indexed = function() { - var v; - v = this.$val; - return v === 0; - }; - $ptrType(indexType).prototype.indexed = function() { return new indexType(this.$get()).indexed(); }; - indexType.prototype.sensitive = function() { - var v; - v = this.$val; - return v === 2; - }; - $ptrType(indexType).prototype.sensitive = function() { return new indexType(this.$get()).sensitive(); }; - Decoder.ptr.prototype.parseHeaderFieldRepr = function() { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _r, _r$1, _r$2, _r$3, _r$4, b, d, x, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - b = (x = d.buf, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])); - /* */ if (!((((b & 128) >>> 0) === 0))) { $s = 2; continue; } - /* */ if ((((b & 192) >>> 0) === 64)) { $s = 3; continue; } - /* */ if ((((b & 240) >>> 0) === 0)) { $s = 4; continue; } - /* */ if ((((b & 240) >>> 0) === 16)) { $s = 5; continue; } - /* */ if ((((b & 224) >>> 0) === 32)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!((((b & 128) >>> 0) === 0))) { */ case 2: - _r = d.parseFieldIndexed(); /* */ $s = 8; case 8: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 9; case 9: return $24r; - /* } else if ((((b & 192) >>> 0) === 64)) { */ case 3: - _r$1 = d.parseFieldLiteral(6, 0); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 11; case 11: return $24r$1; - /* } else if ((((b & 240) >>> 0) === 0)) { */ case 4: - _r$2 = d.parseFieldLiteral(4, 1); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = _r$2; - $s = 13; case 13: return $24r$2; - /* } else if ((((b & 240) >>> 0) === 16)) { */ case 5: - _r$3 = d.parseFieldLiteral(4, 2); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$3 = _r$3; - $s = 15; case 15: return $24r$3; - /* } else if ((((b & 224) >>> 0) === 32)) { */ case 6: - _r$4 = d.parseDynamicTableSizeUpdate(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$4 = _r$4; - $s = 17; case 17: return $24r$4; - /* } */ case 7: - case 1: - $s = -1; return (x$1 = new DecodingError.ptr(errors.New("invalid encoding")), new x$1.constructor.elem(x$1)); - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseHeaderFieldRepr, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _r, _r$1, _r$2, _r$3, _r$4, b, d, x, x$1, $s};return $f; - }; - Decoder.prototype.parseHeaderFieldRepr = function() { return this.$val.parseHeaderFieldRepr(); }; - Decoder.ptr.prototype.parseFieldIndexed = function() { - var {$24r, _r, _tuple, _tuple$1, buf, d, err, hf, idx, ok, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - buf = d.buf; - _tuple = readVarInt(7, buf); - idx = _tuple[0]; - buf = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _tuple$1 = d.at(idx); - hf = $clone(_tuple$1[0], HeaderField); - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return (x = new DecodingError.ptr(new InvalidIndexError(((idx.$low >> 0)))), new x.constructor.elem(x)); - } - d.buf = buf; - _r = d.callEmit(new HeaderField.ptr(hf.Name, hf.Value, false)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseFieldIndexed, $c: true, $r, $24r, _r, _tuple, _tuple$1, buf, d, err, hf, idx, ok, x, $s};return $f; - }; - Decoder.prototype.parseFieldIndexed = function() { return this.$val.parseFieldIndexed(); }; - Decoder.ptr.prototype.parseFieldLiteral = function(n, it) { - var {$24r, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, d, err, hf, ihf, it, n, nameIdx, ok, wantStr, x, $s, $r, $c} = $restore(this, {n, it}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - buf = d.buf; - _tuple = readVarInt(n, buf); - nameIdx = _tuple[0]; - buf = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - hf = new HeaderField.ptr("", "", false); - wantStr = d.emitEnabled || new indexType(it).indexed(); - /* */ if ((nameIdx.$high > 0 || (nameIdx.$high === 0 && nameIdx.$low > 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((nameIdx.$high > 0 || (nameIdx.$high === 0 && nameIdx.$low > 0))) { */ case 1: - _tuple$1 = d.at(nameIdx); - ihf = $clone(_tuple$1[0], HeaderField); - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return (x = new DecodingError.ptr(new InvalidIndexError(((nameIdx.$low >> 0)))), new x.constructor.elem(x)); - } - hf.Name = ihf.Name; - $s = 3; continue; - /* } else { */ case 2: - _r = d.readString(buf, wantStr); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple$2 = _r; - hf.Name = _tuple$2[0]; - buf = _tuple$2[1]; - err = _tuple$2[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* } */ case 3: - _r$1 = d.readString(buf, wantStr); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$3 = _r$1; - hf.Value = _tuple$3[0]; - buf = _tuple$3[1]; - err = _tuple$3[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - d.buf = buf; - /* */ if (new indexType(it).indexed()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (new indexType(it).indexed()) { */ case 6: - $r = d.dynTab.add($clone(hf, HeaderField)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - hf.Sensitive = new indexType(it).sensitive(); - _r$2 = d.callEmit($clone(hf, HeaderField)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 10; case 10: return $24r; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseFieldLiteral, $c: true, $r, $24r, _r, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, _tuple$3, buf, d, err, hf, ihf, it, n, nameIdx, ok, wantStr, x, $s};return $f; - }; - Decoder.prototype.parseFieldLiteral = function(n, it) { return this.$val.parseFieldLiteral(n, it); }; - Decoder.ptr.prototype.callEmit = function(hf) { - var {d, hf, $s, $r, $c} = $restore(this, {hf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (!((d.maxStrLen === 0))) { - if (hf.Name.length > d.maxStrLen || hf.Value.length > d.maxStrLen) { - $s = -1; return $pkg.ErrStringLength; - } - } - /* */ if (d.emitEnabled) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (d.emitEnabled) { */ case 1: - $r = d.emit($clone(hf, HeaderField)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.callEmit, $c: true, $r, d, hf, $s};return $f; - }; - Decoder.prototype.callEmit = function(hf) { return this.$val.callEmit(hf); }; - Decoder.ptr.prototype.parseDynamicTableSizeUpdate = function() { - var {_tuple, buf, d, err, size, x, x$1, x$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - if (!d.firstField && d.dynTab.size > 0) { - $s = -1; return (x = new DecodingError.ptr(errors.New("dynamic table size update MUST occur at the beginning of a header block")), new x.constructor.elem(x)); - } - buf = d.buf; - _tuple = readVarInt(5, buf); - size = _tuple[0]; - buf = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if ((x$1 = (new $Uint64(0, d.dynTab.allowedMaxSize)), (size.$high > x$1.$high || (size.$high === x$1.$high && size.$low > x$1.$low)))) { - $s = -1; return (x$2 = new DecodingError.ptr(errors.New("dynamic table size update too large")), new x$2.constructor.elem(x$2)); - } - $r = d.dynTab.setMaxSize(((size.$low >>> 0))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - d.buf = buf; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Decoder.ptr.prototype.parseDynamicTableSizeUpdate, $c: true, $r, _tuple, buf, d, err, size, x, x$1, x$2, $s};return $f; - }; - Decoder.prototype.parseDynamicTableSizeUpdate = function() { return this.$val.parseDynamicTableSizeUpdate(); }; - readVarInt = function(n, p) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, b, err, i, m, n, origP, p, remain, x, x$1, x$2, x$3, x$4, x$5; - i = new $Uint64(0, 0); - remain = sliceType$1.nil; - err = $ifaceNil; - if (n < 1 || n > 8) { - $panic(new $String("bad n")); - } - if (p.$length === 0) { - _tmp = new $Uint64(0, 0); - _tmp$1 = p; - _tmp$2 = errNeedMore; - i = _tmp; - remain = _tmp$1; - err = _tmp$2; - return [i, remain, err]; - } - i = (new $Uint64(0, (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]))); - if (n < 8) { - i = (x = (x$1 = $shiftLeft64(new $Uint64(0, 1), $flatten64((new $Uint64(0, n)))), new $Uint64(x$1.$high - 0, x$1.$low - 1)), new $Uint64(i.$high & x.$high, (i.$low & x.$low) >>> 0)); - } - if ((x$2 = (x$3 = $shiftLeft64(new $Uint64(0, 1), $flatten64((new $Uint64(0, n)))), new $Uint64(x$3.$high - 0, x$3.$low - 1)), (i.$high < x$2.$high || (i.$high === x$2.$high && i.$low < x$2.$low)))) { - _tmp$3 = i; - _tmp$4 = $subslice(p, 1); - _tmp$5 = $ifaceNil; - i = _tmp$3; - remain = _tmp$4; - err = _tmp$5; - return [i, remain, err]; - } - origP = p; - p = $subslice(p, 1); - m = new $Uint64(0, 0); - while (true) { - if (!(p.$length > 0)) { break; } - b = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]); - p = $subslice(p, 1); - i = (x$4 = $shiftLeft64((new $Uint64(0, ((b & 127) >>> 0))), $flatten64(m)), new $Uint64(i.$high + x$4.$high, i.$low + x$4.$low)); - if (((b & 128) >>> 0) === 0) { - _tmp$6 = i; - _tmp$7 = p; - _tmp$8 = $ifaceNil; - i = _tmp$6; - remain = _tmp$7; - err = _tmp$8; - return [i, remain, err]; - } - m = (x$5 = new $Uint64(0, 7), new $Uint64(m.$high + x$5.$high, m.$low + x$5.$low)); - if ((m.$high > 0 || (m.$high === 0 && m.$low >= 63))) { - _tmp$9 = new $Uint64(0, 0); - _tmp$10 = origP; - _tmp$11 = new errVarintOverflow.constructor.elem(errVarintOverflow); - i = _tmp$9; - remain = _tmp$10; - err = _tmp$11; - return [i, remain, err]; - } - } - _tmp$12 = new $Uint64(0, 0); - _tmp$13 = origP; - _tmp$14 = errNeedMore; - i = _tmp$12; - remain = _tmp$13; - err = _tmp$14; - return [i, remain, err]; - }; - Decoder.ptr.prototype.readString = function(p, wantStr) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, d, err, err$1, isHuff, p, remain, s, strLen, wantStr, x, x$1, $s, $deferred, $r, $c} = $restore(this, {p, wantStr}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = ""; - remain = sliceType$1.nil; - err = $ifaceNil; - d = this; - /* */ if (p.$length === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (p.$length === 0) { */ case 1: - _tmp = ""; - _tmp$1 = p; - _tmp$2 = errNeedMore; - s = _tmp; - remain = _tmp$1; - err = _tmp$2; - $24r = [s, remain, err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - isHuff = !(((((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) & 128) >>> 0) === 0)); - _tuple = readVarInt(7, p); - strLen = _tuple[0]; - p = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - _tmp$3 = ""; - _tmp$4 = p; - _tmp$5 = err; - s = _tmp$3; - remain = _tmp$4; - err = _tmp$5; - $24r$1 = [s, remain, err]; - $s = 6; case 6: return $24r$1; - /* } */ case 5: - /* */ if (!((d.maxStrLen === 0)) && (x = (new $Uint64(0, d.maxStrLen)), (strLen.$high > x.$high || (strLen.$high === x.$high && strLen.$low > x.$low)))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((d.maxStrLen === 0)) && (x = (new $Uint64(0, d.maxStrLen)), (strLen.$high > x.$high || (strLen.$high === x.$high && strLen.$low > x.$low)))) { */ case 7: - _tmp$6 = ""; - _tmp$7 = sliceType$1.nil; - _tmp$8 = $pkg.ErrStringLength; - s = _tmp$6; - remain = _tmp$7; - err = _tmp$8; - $24r$2 = [s, remain, err]; - $s = 9; case 9: return $24r$2; - /* } */ case 8: - /* */ if ((x$1 = (new $Uint64(0, p.$length)), (x$1.$high < strLen.$high || (x$1.$high === strLen.$high && x$1.$low < strLen.$low)))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if ((x$1 = (new $Uint64(0, p.$length)), (x$1.$high < strLen.$high || (x$1.$high === strLen.$high && x$1.$low < strLen.$low)))) { */ case 10: - _tmp$9 = ""; - _tmp$10 = p; - _tmp$11 = errNeedMore; - s = _tmp$9; - remain = _tmp$10; - err = _tmp$11; - $24r$3 = [s, remain, err]; - $s = 12; case 12: return $24r$3; - /* } */ case 11: - /* */ if (!isHuff) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!isHuff) { */ case 13: - if (wantStr) { - s = ($bytesToString($subslice(p, 0, $flatten64(strLen)))); - } - _tmp$12 = s; - _tmp$13 = $subslice(p, $flatten64(strLen)); - _tmp$14 = $ifaceNil; - s = _tmp$12; - remain = _tmp$13; - err = _tmp$14; - $24r$4 = [s, remain, err]; - $s = 15; case 15: return $24r$4; - /* } */ case 14: - /* */ if (wantStr) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (wantStr) { */ case 16: - _r = bufPool.Get(); /* */ $s = 18; case 18: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buf = $assertType(_r, ptrType$1); - buf.Reset(); - $deferred.push([$methodVal(bufPool, "Put"), [buf]]); - _r$1 = huffmanDecode(buf, d.maxStrLen, $subslice(p, 0, $flatten64(strLen))); /* */ $s = 19; case 19: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err$1 = _r$1; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 20: - buf.Reset(); - _tmp$15 = ""; - _tmp$16 = sliceType$1.nil; - _tmp$17 = err$1; - s = _tmp$15; - remain = _tmp$16; - err = _tmp$17; - $24r$5 = [s, remain, err]; - $s = 22; case 22: return $24r$5; - /* } */ case 21: - s = buf.String(); - buf.Reset(); - /* } */ case 17: - _tmp$18 = s; - _tmp$19 = $subslice(p, $flatten64(strLen)); - _tmp$20 = $ifaceNil; - s = _tmp$18; - remain = _tmp$19; - err = _tmp$20; - $24r$6 = [s, remain, err]; - $s = 23; case 23: return $24r$6; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [s, remain, err]; } if($curGoroutine.asleep) { var $f = {$blk: Decoder.ptr.prototype.readString, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _r, _r$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, buf, d, err, err$1, isHuff, p, remain, s, strLen, wantStr, x, x$1, $s, $deferred};return $f; } } - }; - Decoder.prototype.readString = function(p, wantStr) { return this.$val.readString(p, wantStr); }; - NewEncoder = function(w) { - var {e, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = new Encoder.ptr(new dynamicTable.ptr(new headerFieldTable.ptr(sliceType$2.nil, new $Uint64(0, 0), false, false), 0, 0, 0), 4294967295, 4096, false, w, sliceType$1.nil); - e.dynTab.table.init(); - $r = e.dynTab.setMaxSize(4096); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return e; - /* */ } return; } var $f = {$blk: NewEncoder, $c: true, $r, e, w, $s};return $f; - }; - $pkg.NewEncoder = NewEncoder; - Encoder.ptr.prototype.WriteField = function(f) { - var {_r, _r$1, _tuple, _tuple$1, e, err, f, idx, indexing, n, nameValueMatch, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - e.buf = $subslice(e.buf, 0, 0); - if (e.tableSizeUpdate) { - e.tableSizeUpdate = false; - if (e.minSize < e.dynTab.maxSize) { - e.buf = appendTableSize(e.buf, e.minSize); - } - e.minSize = 4294967295; - e.buf = appendTableSize(e.buf, e.dynTab.maxSize); - } - _r = e.searchTable($clone(f, HeaderField)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - idx = _tuple[0]; - nameValueMatch = _tuple[1]; - /* */ if (nameValueMatch) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (nameValueMatch) { */ case 2: - e.buf = appendIndexed(e.buf, idx); - $s = 4; continue; - /* } else { */ case 3: - indexing = e.shouldIndex($clone(f, HeaderField)); - /* */ if (indexing) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (indexing) { */ case 5: - $r = e.dynTab.add($clone(f, HeaderField)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - if ((idx.$high === 0 && idx.$low === 0)) { - e.buf = appendNewName(e.buf, $clone(f, HeaderField), indexing); - } else { - e.buf = appendIndexedName(e.buf, $clone(f, HeaderField), idx, indexing); - } - /* } */ case 4: - _r$1 = e.w.Write(e.buf); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - n = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil) && !((n === e.buf.$length))) { - err = io.ErrShortWrite; - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.WriteField, $c: true, $r, _r, _r$1, _tuple, _tuple$1, e, err, f, idx, indexing, n, nameValueMatch, $s};return $f; - }; - Encoder.prototype.WriteField = function(f) { return this.$val.WriteField(f); }; - Encoder.ptr.prototype.searchTable = function(f) { - var {_r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, e, f, i, j, nameValueMatch, x, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = new $Uint64(0, 0); - nameValueMatch = false; - e = this; - _r = staticTable.search($clone(f, HeaderField)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - i = _tuple[0]; - nameValueMatch = _tuple[1]; - if (nameValueMatch) { - _tmp = i; - _tmp$1 = true; - i = _tmp; - nameValueMatch = _tmp$1; - $s = -1; return [i, nameValueMatch]; - } - _r$1 = e.dynTab.table.search($clone(f, HeaderField)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - j = _tuple$1[0]; - nameValueMatch = _tuple$1[1]; - if (nameValueMatch || ((i.$high === 0 && i.$low === 0) && !((j.$high === 0 && j.$low === 0)))) { - _tmp$2 = (x = (new $Uint64(0, staticTable.len())), new $Uint64(j.$high + x.$high, j.$low + x.$low)); - _tmp$3 = nameValueMatch; - i = _tmp$2; - nameValueMatch = _tmp$3; - $s = -1; return [i, nameValueMatch]; - } - _tmp$4 = i; - _tmp$5 = false; - i = _tmp$4; - nameValueMatch = _tmp$5; - $s = -1; return [i, nameValueMatch]; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.searchTable, $c: true, $r, _r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, e, f, i, j, nameValueMatch, x, $s};return $f; - }; - Encoder.prototype.searchTable = function(f) { return this.$val.searchTable(f); }; - Encoder.ptr.prototype.SetMaxDynamicTableSize = function(v) { - var {e, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - if (v > e.maxSizeLimit) { - v = e.maxSizeLimit; - } - if (v < e.minSize) { - e.minSize = v; - } - e.tableSizeUpdate = true; - $r = e.dynTab.setMaxSize(v); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.SetMaxDynamicTableSize, $c: true, $r, e, v, $s};return $f; - }; - Encoder.prototype.SetMaxDynamicTableSize = function(v) { return this.$val.SetMaxDynamicTableSize(v); }; - Encoder.ptr.prototype.SetMaxDynamicTableSizeLimit = function(v) { - var {e, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - e.maxSizeLimit = v; - /* */ if (e.dynTab.maxSize > v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (e.dynTab.maxSize > v) { */ case 1: - e.tableSizeUpdate = true; - $r = e.dynTab.setMaxSize(v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Encoder.ptr.prototype.SetMaxDynamicTableSizeLimit, $c: true, $r, e, v, $s};return $f; - }; - Encoder.prototype.SetMaxDynamicTableSizeLimit = function(v) { return this.$val.SetMaxDynamicTableSizeLimit(v); }; - Encoder.ptr.prototype.shouldIndex = function(f) { - var e, f; - e = this; - return !f.Sensitive && $clone(f, HeaderField).Size() <= e.dynTab.maxSize; - }; - Encoder.prototype.shouldIndex = function(f) { return this.$val.shouldIndex(f); }; - appendIndexed = function(dst, i) { - var dst, first, i; - first = dst.$length; - dst = appendVarInt(dst, 7, i); - ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (128)) >>> 0)); - return dst; - }; - appendNewName = function(dst, f, indexing) { - var dst, f, indexing; - dst = $append(dst, encodeTypeByte(indexing, f.Sensitive)); - dst = appendHpackString(dst, f.Name); - return appendHpackString(dst, f.Value); - }; - appendIndexedName = function(dst, f, i, indexing) { - var dst, f, first, i, indexing, n; - first = dst.$length; - n = 0; - if (indexing) { - n = 6; - } else { - n = 4; - } - dst = appendVarInt(dst, n, i); - ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (encodeTypeByte(indexing, f.Sensitive))) >>> 0)); - return appendHpackString(dst, f.Value); - }; - appendTableSize = function(dst, v) { - var dst, first, v; - first = dst.$length; - dst = appendVarInt(dst, 5, (new $Uint64(0, v))); - ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (32)) >>> 0)); - return dst; - }; - appendVarInt = function(dst, n, i) { - var dst, i, k, n, x, x$1, x$2; - k = ((x = $shiftLeft64(new $Uint64(0, 1), n), new $Uint64(x.$high - 0, x.$low - 1))); - if ((i.$high < k.$high || (i.$high === k.$high && i.$low < k.$low))) { - return $append(dst, ((i.$low << 24 >>> 24))); - } - dst = $append(dst, ((k.$low << 24 >>> 24))); - i = (x$1 = k, new $Uint64(i.$high - x$1.$high, i.$low - x$1.$low)); - while (true) { - if (!((i.$high > 0 || (i.$high === 0 && i.$low >= 128)))) { break; } - dst = $append(dst, (((x$2 = new $Uint64(i.$high & 0, (i.$low & 127) >>> 0), new $Uint64(0 | x$2.$high, (128 | x$2.$low) >>> 0)).$low << 24 >>> 24))); - i = $shiftRightUint64(i, (7)); - } - return $append(dst, ((i.$low << 24 >>> 24))); - }; - appendHpackString = function(dst, s) { - var dst, first, huffmanLength, s, x; - huffmanLength = HuffmanEncodeLength(s); - if ((x = (new $Uint64(0, s.length)), (huffmanLength.$high < x.$high || (huffmanLength.$high === x.$high && huffmanLength.$low < x.$low)))) { - first = dst.$length; - dst = appendVarInt(dst, 7, huffmanLength); - dst = AppendHuffmanString(dst, s); - ((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first] = ((((first < 0 || first >= dst.$length) ? ($throwRuntimeError("index out of range"), undefined) : dst.$array[dst.$offset + first]) | (128)) >>> 0)); - } else { - dst = appendVarInt(dst, 7, (new $Uint64(0, s.length))); - dst = $appendSlice(dst, s); - } - return dst; - }; - encodeTypeByte = function(indexing, sensitive) { - var indexing, sensitive; - if (sensitive) { - return 16; - } - if (indexing) { - return 64; - } - return 0; - }; - ptrType$3.methods = [{prop: "init", name: "init", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [], false)}, {prop: "len", name: "len", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$Int], false)}, {prop: "addEntry", name: "addEntry", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([HeaderField], [], false)}, {prop: "evictOldest", name: "evictOldest", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([$Int], [], false)}, {prop: "search", name: "search", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([HeaderField], [$Uint64, $Bool], false)}, {prop: "idToIndex", name: "idToIndex", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([$Uint64], [$Uint64], false)}]; - DecodingError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - InvalidIndexError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - HeaderField.methods = [{prop: "IsPseudo", name: "IsPseudo", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Size", name: "Size", pkg: "", typ: $funcType([], [$Uint32], false)}]; - ptrType$4.methods = [{prop: "SetMaxStringLength", name: "SetMaxStringLength", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "SetEmitFunc", name: "SetEmitFunc", pkg: "", typ: $funcType([funcType$1], [], false)}, {prop: "SetEmitEnabled", name: "SetEmitEnabled", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "EmitEnabled", name: "EmitEnabled", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "SetMaxDynamicTableSize", name: "SetMaxDynamicTableSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "SetAllowedMaxDynamicTableSize", name: "SetAllowedMaxDynamicTableSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "maxTableIndex", name: "maxTableIndex", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$Int], false)}, {prop: "at", name: "at", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([$Uint64], [HeaderField, $Bool], false)}, {prop: "DecodeFull", name: "DecodeFull", pkg: "", typ: $funcType([sliceType$1], [sliceType$2, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$1], [$Int, $error], false)}, {prop: "parseHeaderFieldRepr", name: "parseHeaderFieldRepr", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$error], false)}, {prop: "parseFieldIndexed", name: "parseFieldIndexed", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$error], false)}, {prop: "parseFieldLiteral", name: "parseFieldLiteral", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([$Uint8, indexType], [$error], false)}, {prop: "callEmit", name: "callEmit", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([HeaderField], [$error], false)}, {prop: "parseDynamicTableSizeUpdate", name: "parseDynamicTableSizeUpdate", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$error], false)}, {prop: "readString", name: "readString", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([sliceType$1, $Bool], [$String, sliceType$1, $error], false)}]; - ptrType$5.methods = [{prop: "setMaxSize", name: "setMaxSize", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([$Uint32], [], false)}, {prop: "add", name: "add", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([HeaderField], [], false)}, {prop: "evict", name: "evict", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [], false)}]; - indexType.methods = [{prop: "indexed", name: "indexed", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$Bool], false)}, {prop: "sensitive", name: "sensitive", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([], [$Bool], false)}]; - ptrType$6.methods = [{prop: "WriteField", name: "WriteField", pkg: "", typ: $funcType([HeaderField], [$error], false)}, {prop: "searchTable", name: "searchTable", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([HeaderField], [$Uint64, $Bool], false)}, {prop: "SetMaxDynamicTableSize", name: "SetMaxDynamicTableSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "SetMaxDynamicTableSizeLimit", name: "SetMaxDynamicTableSizeLimit", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "shouldIndex", name: "shouldIndex", pkg: "vendor/golang.org/x/net/http2/hpack", typ: $funcType([HeaderField], [$Bool], false)}]; - headerFieldTable.init("vendor/golang.org/x/net/http2/hpack", [{prop: "ents", name: "ents", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "evictCount", name: "evictCount", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "byName", name: "byName", embedded: false, exported: false, typ: mapType, tag: ""}, {prop: "byNameValue", name: "byNameValue", embedded: false, exported: false, typ: mapType$1, tag: ""}]); - pairNameValue.init("vendor/golang.org/x/net/http2/hpack", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $String, tag: ""}]); - incomparable.init(funcType, 0); - node.init("vendor/golang.org/x/net/http2/hpack", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "children", name: "children", embedded: false, exported: false, typ: ptrType$2, tag: ""}, {prop: "codeLen", name: "codeLen", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "sym", name: "sym", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - DecodingError.init("", [{prop: "Err", name: "Err", embedded: false, exported: true, typ: $error, tag: ""}]); - HeaderField.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Sensitive", name: "Sensitive", embedded: false, exported: true, typ: $Bool, tag: ""}]); - Decoder.init("vendor/golang.org/x/net/http2/hpack", [{prop: "dynTab", name: "dynTab", embedded: false, exported: false, typ: dynamicTable, tag: ""}, {prop: "emit", name: "emit", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "emitEnabled", name: "emitEnabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "maxStrLen", name: "maxStrLen", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "saveBuf", name: "saveBuf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "firstField", name: "firstField", embedded: false, exported: false, typ: $Bool, tag: ""}]); - dynamicTable.init("vendor/golang.org/x/net/http2/hpack", [{prop: "table", name: "table", embedded: false, exported: false, typ: headerFieldTable, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxSize", name: "maxSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "allowedMaxSize", name: "allowedMaxSize", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - Encoder.init("vendor/golang.org/x/net/http2/hpack", [{prop: "dynTab", name: "dynTab", embedded: false, exported: false, typ: dynamicTable, tag: ""}, {prop: "minSize", name: "minSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxSizeLimit", name: "maxSizeLimit", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "tableSizeUpdate", name: "tableSizeUpdate", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "buf", name: "buf", embedded: false, exported: false, typ: sliceType$1, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - buildRootOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - lazyRootHuffmanNode = ptrType.nil; - staticTableEntries = $toNativeArray($kindStruct, [new HeaderField.ptr(":authority", "", false), new HeaderField.ptr(":method", "GET", false), new HeaderField.ptr(":method", "POST", false), new HeaderField.ptr(":path", "/", false), new HeaderField.ptr(":path", "/index.html", false), new HeaderField.ptr(":scheme", "http", false), new HeaderField.ptr(":scheme", "https", false), new HeaderField.ptr(":status", "200", false), new HeaderField.ptr(":status", "204", false), new HeaderField.ptr(":status", "206", false), new HeaderField.ptr(":status", "304", false), new HeaderField.ptr(":status", "400", false), new HeaderField.ptr(":status", "404", false), new HeaderField.ptr(":status", "500", false), new HeaderField.ptr("accept-charset", "", false), new HeaderField.ptr("accept-encoding", "gzip, deflate", false), new HeaderField.ptr("accept-language", "", false), new HeaderField.ptr("accept-ranges", "", false), new HeaderField.ptr("accept", "", false), new HeaderField.ptr("access-control-allow-origin", "", false), new HeaderField.ptr("age", "", false), new HeaderField.ptr("allow", "", false), new HeaderField.ptr("authorization", "", false), new HeaderField.ptr("cache-control", "", false), new HeaderField.ptr("content-disposition", "", false), new HeaderField.ptr("content-encoding", "", false), new HeaderField.ptr("content-language", "", false), new HeaderField.ptr("content-length", "", false), new HeaderField.ptr("content-location", "", false), new HeaderField.ptr("content-range", "", false), new HeaderField.ptr("content-type", "", false), new HeaderField.ptr("cookie", "", false), new HeaderField.ptr("date", "", false), new HeaderField.ptr("etag", "", false), new HeaderField.ptr("expect", "", false), new HeaderField.ptr("expires", "", false), new HeaderField.ptr("from", "", false), new HeaderField.ptr("host", "", false), new HeaderField.ptr("if-match", "", false), new HeaderField.ptr("if-modified-since", "", false), new HeaderField.ptr("if-none-match", "", false), new HeaderField.ptr("if-range", "", false), new HeaderField.ptr("if-unmodified-since", "", false), new HeaderField.ptr("last-modified", "", false), new HeaderField.ptr("link", "", false), new HeaderField.ptr("location", "", false), new HeaderField.ptr("max-forwards", "", false), new HeaderField.ptr("proxy-authenticate", "", false), new HeaderField.ptr("proxy-authorization", "", false), new HeaderField.ptr("range", "", false), new HeaderField.ptr("referer", "", false), new HeaderField.ptr("refresh", "", false), new HeaderField.ptr("retry-after", "", false), new HeaderField.ptr("server", "", false), new HeaderField.ptr("set-cookie", "", false), new HeaderField.ptr("strict-transport-security", "", false), new HeaderField.ptr("transfer-encoding", "", false), new HeaderField.ptr("user-agent", "", false), new HeaderField.ptr("vary", "", false), new HeaderField.ptr("via", "", false), new HeaderField.ptr("www-authenticate", "", false)]); - staticTable = newStaticTable(); - huffmanCodes = $toNativeArray($kindUint32, [8184, 8388568, 268435426, 268435427, 268435428, 268435429, 268435430, 268435431, 268435432, 16777194, 1073741820, 268435433, 268435434, 1073741821, 268435435, 268435436, 268435437, 268435438, 268435439, 268435440, 268435441, 268435442, 1073741822, 268435443, 268435444, 268435445, 268435446, 268435447, 268435448, 268435449, 268435450, 268435451, 20, 1016, 1017, 4090, 8185, 21, 248, 2042, 1018, 1019, 249, 2043, 250, 22, 23, 24, 0, 1, 2, 25, 26, 27, 28, 29, 30, 31, 92, 251, 32764, 32, 4091, 1020, 8186, 33, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 252, 115, 253, 8187, 524272, 8188, 16380, 34, 32765, 3, 35, 4, 36, 5, 37, 38, 39, 6, 116, 117, 40, 41, 42, 7, 43, 118, 44, 8, 9, 45, 119, 120, 121, 122, 123, 32766, 2044, 16381, 8189, 268435452, 1048550, 4194258, 1048551, 1048552, 4194259, 4194260, 4194261, 8388569, 4194262, 8388570, 8388571, 8388572, 8388573, 8388574, 16777195, 8388575, 16777196, 16777197, 4194263, 8388576, 16777198, 8388577, 8388578, 8388579, 8388580, 2097116, 4194264, 8388581, 4194265, 8388582, 8388583, 16777199, 4194266, 2097117, 1048553, 4194267, 4194268, 8388584, 8388585, 2097118, 8388586, 4194269, 4194270, 16777200, 2097119, 4194271, 8388587, 8388588, 2097120, 2097121, 4194272, 2097122, 8388589, 4194273, 8388590, 8388591, 1048554, 4194274, 4194275, 4194276, 8388592, 4194277, 4194278, 8388593, 67108832, 67108833, 1048555, 524273, 4194279, 8388594, 4194280, 33554412, 67108834, 67108835, 67108836, 134217694, 134217695, 67108837, 16777201, 33554413, 524274, 2097123, 67108838, 134217696, 134217697, 67108839, 134217698, 16777202, 2097124, 2097125, 67108840, 67108841, 268435453, 134217699, 134217700, 134217701, 1048556, 16777203, 1048557, 2097126, 4194281, 2097127, 2097128, 8388595, 4194282, 4194283, 33554414, 33554415, 16777204, 16777205, 67108842, 8388596, 67108843, 134217702, 67108844, 67108845, 134217703, 134217704, 134217705, 134217706, 134217707, 268435454, 134217708, 134217709, 134217710, 134217711, 134217712, 67108846]); - huffmanCodeLen = $toNativeArray($kindUint8, [13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28, 6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10, 13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6, 15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5, 6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28, 20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23, 24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24, 22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23, 21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23, 26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25, 19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27, 20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23, 26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26]); - bufPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new bytes.Buffer.ptr(sliceType$1.nil, 0, 0); - })); - $pkg.ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data"); - $pkg.ErrStringLength = errors.New("hpack: string too long"); - errNeedMore = errors.New("need more data"); - errVarintOverflow = new DecodingError.ptr(errors.New("varint integer overflow")); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["net/http"] = (function() { - var $pkg = {}, $init, bufio, bytes, gzip, list, context, rand$1, tls, base64, binary, errors, fmt, js$1, godebug, io, fs, ioutil, log, math, rand, mime, multipart, net, httptrace, internal, ascii, textproto, url, os, path, filepath, reflect, runtime, sort, strconv, strings, sync, atomic, js, time, utf8, httpguts, httpproxy, hpack, idna, Transport, cancelKey, h2Transport, transportRequest, readTrackingBody, transportReadFromServerError, wantConn, wantConnQueue, erringRoundTripper, persistConnWriter, connectMethod, connectMethodKey, persistConn, readWriteCloserBody, nothingWrittenError, responseAndError, requestAndChan, writeRequest, httpError, tLogKey, bodyEOFSignal, gzipReader, tlsHandshakeTimeoutError, fakeLocker, connLRU, errorReader, byteReader, transferWriter, transferReader, unsupportedTEError, body, bodyLocked, finishAsyncByteRead, bufioFlushWriter, socksCommand, socksAuthMethod, socksReply, socksAddr, socksConn, socksDialer, socksUsernamePassword, sniffSig, exactSig, maskedSig, htmlSig, mp4Sig, textSig, Handler, ResponseWriter, conn, chunkWriter, response, atomicBool, writerOnly, readResult, connReader, expectContinueReader, extraHeader, closeWriter, statusError, HandlerFunc, redirectHandler, ServeMux, muxEntry, Server, ConnState, serverHandler, onceCloseListener, globalOptionsHandler, initALPNRequest, loggingConn, checkConnErrorWriter, streamReader, arrayReader, Response, ProtocolError, Request, requestBodyReadError, maxBytesReader, incomparable, contextKey, noBody, PushOptions, Header, stringWriter, keyValues, headerSorter, http2ClientConnPool, http2clientConnPoolIdleCloser, http2clientConnPool, http2dialCall, http2addConnCall, http2noDialClientConnPool, http2dataBuffer, http2ErrCode, http2ConnectionError, http2StreamError, http2goAwayFlowError, http2connError, http2pseudoHeaderError, http2duplicatePseudoHeaderError, http2headerFieldNameError, http2headerFieldValueError, http2flow, http2FrameType, http2Flags, http2FrameHeader, http2Frame, http2Framer, http2frameCache, http2DataFrame, http2SettingsFrame, http2PingFrame, http2GoAwayFrame, http2UnknownFrame, http2WindowUpdateFrame, http2HeadersFrame, http2HeadersFrameParam, http2PriorityFrame, http2PriorityParam, http2RSTStreamFrame, http2ContinuationFrame, http2PushPromiseFrame, http2PushPromiseParam, http2MetaHeadersFrame, http2goroutineLock, http2streamState, http2Setting, http2SettingID, http2gate, http2closeWaiter, http2bufferedWriter, http2httpError, http2connectionStater, http2sorter, http2incomparable, http2pipe, http2pipeBuffer, http2Server, http2serverInternalState, http2ServeConnOpts, http2serverConn, http2stream, http2readFrameResult, http2frameWriteResult, http2serverMessage, http2requestParam, http2bodyReadMsg, http2requestBody, http2responseWriter, http2responseWriterState, http2chunkWriter, http2startPushRequest, http2Transport, http2ClientConn, http2clientStream, http2stickyErrWriter, http2noCachedConnError, http2RoundTripOpt, http2ClientConnState, http2clientConnIdleState, http2clientConnReadLoop, http2GoAwayError, http2transportResponseBody, http2missingBody, http2erringRoundTripper, http2gzipReader, http2noDialH2RoundTripper, http2writeFramer, http2writeContext, http2flushFrameWriter, http2writeSettings, http2writeGoAway, http2writeData, http2handlerPanicRST, http2writePingAck, http2writeSettingsAck, http2writeResHeaders, http2writePushPromise, http2write100ContinueHeadersFrame, http2writeWindowUpdate, http2WriteScheduler, http2OpenStreamOptions, http2FrameWriteRequest, http2writeQueue, http2writeQueuePool, http2PriorityWriteSchedulerConfig, http2priorityNodeState, http2priorityNode, http2sortPriorityNodeSiblings, http2priorityWriteScheduler, http2randomWriteScheduler, Cookie, SameSite, RoundTripper, noTransport, XHRTransport, requestTooLarger, baseContexter, I, ptrType, ptrType$1, sliceType, sliceType$1, ptrType$2, ptrType$3, ptrType$4, sliceType$2, sliceType$3, sliceType$4, ptrType$6, sliceType$5, sliceType$6, ptrType$9, sliceType$7, funcType, arrayType, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, chanType, ptrType$16, mapType, ptrType$17, ptrType$18, ptrType$19, ptrType$20, ptrType$21, ptrType$22, ptrType$23, ptrType$24, sliceType$8, sliceType$9, ptrType$25, structType, ptrType$26, sliceType$10, sliceType$11, ptrType$27, ptrType$28, ptrType$29, ptrType$30, sliceType$12, ptrType$31, ptrType$32, ptrType$33, funcType$1, sliceType$13, ptrType$34, sliceType$14, arrayType$1, sliceType$15, sliceType$16, ptrType$35, arrayType$2, sliceType$17, ptrType$36, ptrType$37, ptrType$38, ptrType$39, ptrType$40, ptrType$41, ptrType$42, ptrType$43, ptrType$44, ptrType$45, ptrType$46, ptrType$47, structType$1, ptrType$48, ptrType$49, ptrType$50, ptrType$51, ptrType$52, ptrType$53, arrayType$3, arrayType$4, arrayType$5, sliceType$18, ptrType$54, ptrType$55, ptrType$56, ptrType$57, arrayType$6, ptrType$58, sliceType$19, ptrType$59, ptrType$60, ptrType$61, structType$2, ptrType$62, ptrType$63, ptrType$64, ptrType$65, ptrType$66, sliceType$20, ptrType$67, ptrType$68, sliceType$21, ptrType$69, ptrType$70, ptrType$71, ptrType$72, ptrType$73, arrayType$7, ptrType$74, ptrType$75, arrayType$8, sliceType$22, ptrType$76, ptrType$77, ptrType$78, ptrType$79, ptrType$80, ptrType$81, ptrType$82, ptrType$83, ptrType$84, ptrType$85, ptrType$86, ptrType$87, ptrType$88, ptrType$89, ptrType$90, funcType$2, ptrType$91, ptrType$92, ptrType$93, ptrType$94, ptrType$95, ptrType$96, ptrType$97, ptrType$98, ptrType$99, ptrType$100, ptrType$101, ptrType$102, interfaceType, ptrType$103, sliceType$23, ptrType$104, sliceType$24, ptrType$105, ptrType$106, sliceType$25, ptrType$107, ptrType$108, sliceType$29, ptrType$111, ptrType$113, funcType$3, ptrType$114, funcType$4, mapType$1, mapType$2, mapType$3, mapType$4, funcType$5, funcType$6, funcType$7, funcType$8, mapType$5, funcType$9, chanType$1, ptrType$115, ptrType$116, chanType$2, funcType$10, chanType$3, chanType$4, funcType$11, ptrType$117, chanType$5, chanType$6, chanType$7, ptrType$118, funcType$12, funcType$13, ptrType$119, ptrType$120, mapType$6, ptrType$121, chanType$8, ptrType$122, ptrType$123, funcType$14, ptrType$124, ptrType$125, ptrType$126, chanType$9, ptrType$127, chanType$10, ptrType$128, funcType$15, ptrType$129, mapType$7, funcType$16, mapType$8, funcType$17, funcType$18, funcType$19, mapType$9, mapType$10, ptrType$131, ptrType$132, ptrType$133, ptrType$134, ptrType$135, funcType$20, ptrType$136, mapType$11, mapType$12, mapType$13, mapType$14, mapType$15, ptrType$137, funcType$21, ptrType$138, funcType$22, funcType$23, ptrType$139, ptrType$140, funcType$24, mapType$16, chanType$11, chanType$12, chanType$13, chanType$14, chanType$15, mapType$17, mapType$18, funcType$25, mapType$19, mapType$20, funcType$26, ptrType$141, ptrType$142, ptrType$143, funcType$27, ptrType$144, funcType$28, ptrType$145, mapType$21, ptrType$146, mapType$22, ptrType$151, mapType$23, errCannotRewind, envProxyOnce, envProxyFuncValue, errKeepAlivesDisabled, errConnBroken, errCloseIdle, errTooManyIdle, errTooManyIdleHost, errCloseIdleConns, errReadLoopExiting, errIdleConnTimeout, errServerClosedIdle, zeroDialer, errCallerOwnsConn, errTimeout, errRequestCanceled, errRequestCanceledConn, testHookEnterRoundTrip, testHookWaitResLoop, testHookRoundTripRetried, testHookPrePendingDial, testHookPostPendingDial, testHookMu, testHookReadLoopBeforeNextRead, portMap, errReadOnClosedResBody, suppressedHeaders304, suppressedHeadersNoBody, singleCRLF, doubleCRLF, errTrailerEOF, nopCloserType, statusText, socksnoDeadline, socksaLongTimeAgo, sniffSignatures, mp4ftype, mp4, crlf, colonSpace, bufioReaderPool, bufioWriter2kPool, bufioWriter2kPool$24ptr, bufioWriter4kPool, bufioWriter4kPool$24ptr, copyBufPool, errTooLarge, extraHeaderKeys, headerContentLength, headerDate, htmlReplacer, defaultServeMux, defaultServeMux$24ptr, stateName, silenceSemWarnContextKey, testHookServerServe, uniqNameMu, uniqNameNext, uint8Array, jsFetchMissing, errClosed, respExcludeHeader, reqWriteExcludeHeader, multipartByReader, errMissingHost, textprotoReaderPool, aLongTimeAgo, omitBundledHTTP2, headerNewlineToSpace, headerSorterPool, http2dataChunkSizeClasses, http2dataChunkPools, http2errReadEmpty, http2errCodeName, http2errFromPeer, http2errMixPseudoHeaderTypes, http2errPseudoAfterRegular, http2padZeros, http2frameName, http2flagName, http2frameParsers, http2fhBytes, http2ErrFrameTooLarge, http2errStreamID, http2errDepStreamID, http2errPadLength, http2errPadBytes, http2DebugGoroutines, http2goroutineSpace, http2littleBuf, http2commonBuildOnce, http2commonLowerHeader, http2commonCanonHeader, http2VerboseLogs, http2logFrameWrites, http2logFrameReads, http2inTests, http2clientPreface, http2stateName, http2settingName, http2bufWriterPool, http2errTimeout, http2sorterPool, http2errClosedPipeWrite, http2errClientDisconnected, http2errClosedBody, http2errHandlerComplete, http2errStreamClosed, http2responseWriterStatePool, http2testHookOnConn, http2testHookGetServerConn, http2testHookOnPanicMu, http2testHookOnPanic, http2settingsTimerMsg, http2idleTimerMsg, http2shutdownTimerMsg, http2gracefulShutdownMsg, http2errPrefaceTimeout, http2errChanPool, http2writeDataPool, http2errHandlerPanicked, http2goAwayTimeout, http2ErrRecursivePush, http2ErrPushLimitReached, http2connHeaders, http2got1xxFuncForTests, http2ErrNoCachedConn, http2errClientConnClosed, http2errClientConnUnusable, http2errClientConnGotGoAway, http2shutdownEnterWaitStateHook, http2errRequestCanceled, http2errStopReqBodyWrite, http2errStopReqBodyWriteAndCancel, http2errReqBodyTooLong, http2bufPool, http2errNilRequestURL, http2errClosedResponseBody, http2errResponseHeaderListSize, http2errRequestHeaderListSize, http2noBody, errSeeker, errNoOverlap, unixEpochTime, errMissingSeek, errMissingReadDir, cookieNameSanitizer, x, x$1, x$2, _r, x$4, defaultTransportDialContext, ProxyFromEnvironment, setupRewindBody, rewindBody, envProxyFunc, is408Message, newReadWriteCloserBody, nop, canonicalAddr, cloneTLSConfig, newTransferWriter, noResponseBodyExpected, bodyAllowedForStatus, suppressedHeaders, readTransfer, chunked, isIdentity, isUnsupportedTEError, fixLength, shouldClose, fixTrailer, seeUpcomingDoubleCRLF, mergeSetHeader, parseContentLength, isKnownInMemoryReader, StatusText, sockssplitHostPort, socksNewDialer, DetectContentType, isWS, isTT, bufioWriterPool, newBufioReader, putBufioReader, newBufioWriterSize, putBufioWriter, appendTime, http1ServerSupportsRequest, checkWriteHeaderCode, relevantCaller, foreachHeaderElement, writeStatusLine, validNextProto, badRequestError, isCommonNetReadError, registerOnHitEOF, requestBodyRemains, Error, NotFound, NotFoundHandler, Redirect, htmlEscape, RedirectHandler, cleanPath, stripHostPort, appendSorted, newLoggingConn, numLeadingCRorLF, strSliceContains, tlsRecordHeaderLooksLikeHTTP, ReadResponse, fixPragmaCacheControl, isProtocolSwitchResponse, isProtocolSwitchHeader, badStringError, valueOrDefault, idnaASCII, cleanHost, removeZone, ParseHTTPVersion, validMethod, parseBasicAuth, parseRequestLine, newTextprotoReader, putTextprotoReader, readRequest, MaxBytesReader, copyValues, parsePostForm, requestMethodUsuallyLacksBody, hasPort, isNotToken, stringContainsCTLByte, hexEscapeNonASCII, CanonicalHeaderKey, hasToken, isTokenBoundary, http2asciiEqualFold, http2lower, http2isASCIIPrint, http2asciiToLower, http2isBadCipher, http2filterOutClientConn, http2shouldRetryDial, http2getDataBufferChunk, http2putDataBufferChunk, http2streamError, http2typeFrameParser, http2readFrameHeader, http2NewFramer, http2terminalReadFrameError, http2parseDataFrame, http2validStreamIDOrZero, http2validStreamID, http2parseSettingsFrame, http2parsePingFrame, http2parseGoAwayFrame, http2parseUnknownFrame, http2parseWindowUpdateFrame, http2parseHeadersFrame, http2parsePriorityFrame, http2parseRSTStreamFrame, http2parseContinuationFrame, http2parsePushPromise, http2readByte, http2readUint32, http2summarizeFrame, http2traceHasWroteHeaderField, http2traceWroteHeaderField, http2traceGot1xxResponseFunc, http2newGoroutineLock, http2curGoroutineID, http2parseUintBytes, http2cutoff64, http2buildCommonHeaderMapsOnce, http2buildCommonHeaderMaps, http2lowerHeader, init, http2validWireHeaderFieldName, http2httpCodeString, http2newBufferedWriter, http2mustUint31, http2bodyAllowedForStatus, http2validPseudoPath, http2ConfigureServer, http2serverConnBaseContext, http2errno, http2isClosedConnError, http2handleHeaderListTooLong, http2checkWriteHeaderCode, http2cloneHeader, http2foreachHeaderElement, http2checkValidHTTP2RequestHeaders, http2new400Handler, http2h1ServerKeepAlivesDisabled, http2configureTransports, http2isNoCachedConnError, http2authorityAddr, http2shouldRetryRequest, http2canRetryError, http2commaSeparatedTrailers, http2checkConnHeaders, http2actualContentLength, http2shouldSendReqContentLength, http2isEOFOrNetReadError, http2strSliceContains, http2isConnectionCloseRequest, http2registerHTTPSProtocol, http2traceGetConn, http2traceGotConn, http2traceWroteHeaders, http2traceGot100Continue, http2traceWait100Continue, http2traceWroteRequest, http2traceFirstResponseByte, http2writeEndsStream, http2splitHeaderBlock, http2encKV, http2encodeHeaders, http2NewPriorityWriteScheduler, http2NewRandomWriteScheduler, readSetCookies, readCookies, validCookieDomain, validCookieExpires, isCookieDomainName, sanitizeCookieName, sanitizeCookieValue, validCookieValueByte, sanitizeCookiePath, validCookiePathByte, sanitizeOrWarn, parseCookieValue, isCookieNameValid, cloneURLValues, cloneURL, cloneMultipartForm, cloneMultipartFileHeader, basicAuth; - bufio = $packages["bufio"]; - bytes = $packages["bytes"]; - gzip = $packages["compress/gzip"]; - list = $packages["container/list"]; - context = $packages["context"]; - rand$1 = $packages["crypto/rand"]; - tls = $packages["crypto/tls"]; - base64 = $packages["encoding/base64"]; - binary = $packages["encoding/binary"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - js$1 = $packages["github.com/gopherjs/gopherjs/js"]; - godebug = $packages["internal/godebug"]; - io = $packages["io"]; - fs = $packages["io/fs"]; - ioutil = $packages["io/ioutil"]; - log = $packages["log"]; - math = $packages["math"]; - rand = $packages["math/rand"]; - mime = $packages["mime"]; - multipart = $packages["mime/multipart"]; - net = $packages["net"]; - httptrace = $packages["net/http/httptrace"]; - internal = $packages["net/http/internal"]; - ascii = $packages["net/http/internal/ascii"]; - textproto = $packages["net/textproto"]; - url = $packages["net/url"]; - os = $packages["os"]; - path = $packages["path"]; - filepath = $packages["path/filepath"]; - reflect = $packages["reflect"]; - runtime = $packages["runtime"]; - sort = $packages["sort"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - atomic = $packages["sync/atomic"]; - js = $packages["syscall/js"]; - time = $packages["time"]; - utf8 = $packages["unicode/utf8"]; - httpguts = $packages["vendor/golang.org/x/net/http/httpguts"]; - httpproxy = $packages["vendor/golang.org/x/net/http/httpproxy"]; - hpack = $packages["vendor/golang.org/x/net/http2/hpack"]; - idna = $packages["vendor/golang.org/x/net/idna"]; - Transport = $pkg.Transport = $newType(0, $kindStruct, "http.Transport", true, "net/http", true, function(idleMu_, closeIdle_, idleConn_, idleConnWait_, idleLRU_, reqMu_, reqCanceler_, altMu_, altProto_, connsPerHostMu_, connsPerHost_, connsPerHostWait_, Proxy_, DialContext_, Dial_, DialTLSContext_, DialTLS_, TLSClientConfig_, TLSHandshakeTimeout_, DisableKeepAlives_, DisableCompression_, MaxIdleConns_, MaxIdleConnsPerHost_, MaxConnsPerHost_, IdleConnTimeout_, ResponseHeaderTimeout_, ExpectContinueTimeout_, TLSNextProto_, ProxyConnectHeader_, GetProxyConnectHeader_, MaxResponseHeaderBytes_, WriteBufferSize_, ReadBufferSize_, nextProtoOnce_, h2transport_, tlsNextProtoWasNil_, ForceAttemptHTTP2_) { - this.$val = this; - if (arguments.length === 0) { - this.idleMu = new sync.Mutex.ptr(0, 0); - this.closeIdle = false; - this.idleConn = false; - this.idleConnWait = false; - this.idleLRU = new connLRU.ptr(ptrType$3.nil, false); - this.reqMu = new sync.Mutex.ptr(0, 0); - this.reqCanceler = false; - this.altMu = new sync.Mutex.ptr(0, 0); - this.altProto = new atomic.Value.ptr($ifaceNil); - this.connsPerHostMu = new sync.Mutex.ptr(0, 0); - this.connsPerHost = false; - this.connsPerHostWait = false; - this.Proxy = $throwNilPointerError; - this.DialContext = $throwNilPointerError; - this.Dial = $throwNilPointerError; - this.DialTLSContext = $throwNilPointerError; - this.DialTLS = $throwNilPointerError; - this.TLSClientConfig = ptrType$4.nil; - this.TLSHandshakeTimeout = new time.Duration(0, 0); - this.DisableKeepAlives = false; - this.DisableCompression = false; - this.MaxIdleConns = 0; - this.MaxIdleConnsPerHost = 0; - this.MaxConnsPerHost = 0; - this.IdleConnTimeout = new time.Duration(0, 0); - this.ResponseHeaderTimeout = new time.Duration(0, 0); - this.ExpectContinueTimeout = new time.Duration(0, 0); - this.TLSNextProto = false; - this.ProxyConnectHeader = false; - this.GetProxyConnectHeader = $throwNilPointerError; - this.MaxResponseHeaderBytes = new $Int64(0, 0); - this.WriteBufferSize = 0; - this.ReadBufferSize = 0; - this.nextProtoOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.h2transport = $ifaceNil; - this.tlsNextProtoWasNil = false; - this.ForceAttemptHTTP2 = false; - return; - } - this.idleMu = idleMu_; - this.closeIdle = closeIdle_; - this.idleConn = idleConn_; - this.idleConnWait = idleConnWait_; - this.idleLRU = idleLRU_; - this.reqMu = reqMu_; - this.reqCanceler = reqCanceler_; - this.altMu = altMu_; - this.altProto = altProto_; - this.connsPerHostMu = connsPerHostMu_; - this.connsPerHost = connsPerHost_; - this.connsPerHostWait = connsPerHostWait_; - this.Proxy = Proxy_; - this.DialContext = DialContext_; - this.Dial = Dial_; - this.DialTLSContext = DialTLSContext_; - this.DialTLS = DialTLS_; - this.TLSClientConfig = TLSClientConfig_; - this.TLSHandshakeTimeout = TLSHandshakeTimeout_; - this.DisableKeepAlives = DisableKeepAlives_; - this.DisableCompression = DisableCompression_; - this.MaxIdleConns = MaxIdleConns_; - this.MaxIdleConnsPerHost = MaxIdleConnsPerHost_; - this.MaxConnsPerHost = MaxConnsPerHost_; - this.IdleConnTimeout = IdleConnTimeout_; - this.ResponseHeaderTimeout = ResponseHeaderTimeout_; - this.ExpectContinueTimeout = ExpectContinueTimeout_; - this.TLSNextProto = TLSNextProto_; - this.ProxyConnectHeader = ProxyConnectHeader_; - this.GetProxyConnectHeader = GetProxyConnectHeader_; - this.MaxResponseHeaderBytes = MaxResponseHeaderBytes_; - this.WriteBufferSize = WriteBufferSize_; - this.ReadBufferSize = ReadBufferSize_; - this.nextProtoOnce = nextProtoOnce_; - this.h2transport = h2transport_; - this.tlsNextProtoWasNil = tlsNextProtoWasNil_; - this.ForceAttemptHTTP2 = ForceAttemptHTTP2_; - }); - cancelKey = $pkg.cancelKey = $newType(0, $kindStruct, "http.cancelKey", true, "net/http", false, function(req_) { - this.$val = this; - if (arguments.length === 0) { - this.req = ptrType$11.nil; - return; - } - this.req = req_; - }); - h2Transport = $pkg.h2Transport = $newType(8, $kindInterface, "http.h2Transport", true, "net/http", false, null); - transportRequest = $pkg.transportRequest = $newType(0, $kindStruct, "http.transportRequest", true, "net/http", false, function(Request_, extra_, trace_, cancelKey_, mu_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.Request = ptrType$11.nil; - this.extra = false; - this.trace = ptrType$19.nil; - this.cancelKey = new cancelKey.ptr(ptrType$11.nil); - this.mu = new sync.Mutex.ptr(0, 0); - this.err = $ifaceNil; - return; - } - this.Request = Request_; - this.extra = extra_; - this.trace = trace_; - this.cancelKey = cancelKey_; - this.mu = mu_; - this.err = err_; - }); - readTrackingBody = $pkg.readTrackingBody = $newType(0, $kindStruct, "http.readTrackingBody", true, "net/http", false, function(ReadCloser_, didRead_, didClose_) { - this.$val = this; - if (arguments.length === 0) { - this.ReadCloser = $ifaceNil; - this.didRead = false; - this.didClose = false; - return; - } - this.ReadCloser = ReadCloser_; - this.didRead = didRead_; - this.didClose = didClose_; - }); - transportReadFromServerError = $pkg.transportReadFromServerError = $newType(0, $kindStruct, "http.transportReadFromServerError", true, "net/http", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - return; - } - this.err = err_; - }); - wantConn = $pkg.wantConn = $newType(0, $kindStruct, "http.wantConn", true, "net/http", false, function(cm_, key_, ctx_, ready_, beforeDial_, afterDial_, mu_, pc_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.cm = new connectMethod.ptr(arrayType.zero(), ptrType$17.nil, "", "", false); - this.key = new connectMethodKey.ptr("", "", "", false); - this.ctx = $ifaceNil; - this.ready = $chanNil; - this.beforeDial = $throwNilPointerError; - this.afterDial = $throwNilPointerError; - this.mu = new sync.Mutex.ptr(0, 0); - this.pc = ptrType$22.nil; - this.err = $ifaceNil; - return; - } - this.cm = cm_; - this.key = key_; - this.ctx = ctx_; - this.ready = ready_; - this.beforeDial = beforeDial_; - this.afterDial = afterDial_; - this.mu = mu_; - this.pc = pc_; - this.err = err_; - }); - wantConnQueue = $pkg.wantConnQueue = $newType(0, $kindStruct, "http.wantConnQueue", true, "net/http", false, function(head_, headPos_, tail_) { - this.$val = this; - if (arguments.length === 0) { - this.head = sliceType$8.nil; - this.headPos = 0; - this.tail = sliceType$8.nil; - return; - } - this.head = head_; - this.headPos = headPos_; - this.tail = tail_; - }); - erringRoundTripper = $pkg.erringRoundTripper = $newType(8, $kindInterface, "http.erringRoundTripper", true, "net/http", false, null); - persistConnWriter = $pkg.persistConnWriter = $newType(0, $kindStruct, "http.persistConnWriter", true, "net/http", false, function(pc_) { - this.$val = this; - if (arguments.length === 0) { - this.pc = ptrType$22.nil; - return; - } - this.pc = pc_; - }); - connectMethod = $pkg.connectMethod = $newType(0, $kindStruct, "http.connectMethod", true, "net/http", false, function(_$0_, proxyURL_, targetScheme_, targetAddr_, onlyH1_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.proxyURL = ptrType$17.nil; - this.targetScheme = ""; - this.targetAddr = ""; - this.onlyH1 = false; - return; - } - this._$0 = _$0_; - this.proxyURL = proxyURL_; - this.targetScheme = targetScheme_; - this.targetAddr = targetAddr_; - this.onlyH1 = onlyH1_; - }); - connectMethodKey = $pkg.connectMethodKey = $newType(0, $kindStruct, "http.connectMethodKey", true, "net/http", false, function(proxy_, scheme_, addr_, onlyH1_) { - this.$val = this; - if (arguments.length === 0) { - this.proxy = ""; - this.scheme = ""; - this.addr = ""; - this.onlyH1 = false; - return; - } - this.proxy = proxy_; - this.scheme = scheme_; - this.addr = addr_; - this.onlyH1 = onlyH1_; - }); - persistConn = $pkg.persistConn = $newType(0, $kindStruct, "http.persistConn", true, "net/http", false, function(alt_, t_, cacheKey_, conn_, tlsState_, br_, bw_, nwrite_, reqch_, writech_, closech_, isProxy_, sawEOF_, readLimit_, writeErrCh_, writeLoopDone_, idleAt_, idleTimer_, mu_, numExpectedResponses_, closed_, canceledErr_, broken_, reused_, mutateHeaderFunc_) { - this.$val = this; - if (arguments.length === 0) { - this.alt = $ifaceNil; - this.t = ptrType$27.nil; - this.cacheKey = new connectMethodKey.ptr("", "", "", false); - this.conn = $ifaceNil; - this.tlsState = ptrType$28.nil; - this.br = ptrType$29.nil; - this.bw = ptrType$14.nil; - this.nwrite = new $Int64(0, 0); - this.reqch = $chanNil; - this.writech = $chanNil; - this.closech = $chanNil; - this.isProxy = false; - this.sawEOF = false; - this.readLimit = new $Int64(0, 0); - this.writeErrCh = $chanNil; - this.writeLoopDone = $chanNil; - this.idleAt = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.idleTimer = ptrType$25.nil; - this.mu = new sync.Mutex.ptr(0, 0); - this.numExpectedResponses = 0; - this.closed = $ifaceNil; - this.canceledErr = $ifaceNil; - this.broken = false; - this.reused = false; - this.mutateHeaderFunc = $throwNilPointerError; - return; - } - this.alt = alt_; - this.t = t_; - this.cacheKey = cacheKey_; - this.conn = conn_; - this.tlsState = tlsState_; - this.br = br_; - this.bw = bw_; - this.nwrite = nwrite_; - this.reqch = reqch_; - this.writech = writech_; - this.closech = closech_; - this.isProxy = isProxy_; - this.sawEOF = sawEOF_; - this.readLimit = readLimit_; - this.writeErrCh = writeErrCh_; - this.writeLoopDone = writeLoopDone_; - this.idleAt = idleAt_; - this.idleTimer = idleTimer_; - this.mu = mu_; - this.numExpectedResponses = numExpectedResponses_; - this.closed = closed_; - this.canceledErr = canceledErr_; - this.broken = broken_; - this.reused = reused_; - this.mutateHeaderFunc = mutateHeaderFunc_; - }); - readWriteCloserBody = $pkg.readWriteCloserBody = $newType(0, $kindStruct, "http.readWriteCloserBody", true, "net/http", false, function(_$0_, br_, ReadWriteCloser_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.br = ptrType$29.nil; - this.ReadWriteCloser = $ifaceNil; - return; - } - this._$0 = _$0_; - this.br = br_; - this.ReadWriteCloser = ReadWriteCloser_; - }); - nothingWrittenError = $pkg.nothingWrittenError = $newType(0, $kindStruct, "http.nothingWrittenError", true, "net/http", false, function(error_) { - this.$val = this; - if (arguments.length === 0) { - this.error = $ifaceNil; - return; - } - this.error = error_; - }); - responseAndError = $pkg.responseAndError = $newType(0, $kindStruct, "http.responseAndError", true, "net/http", false, function(_$0_, res_, err_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.res = ptrType$18.nil; - this.err = $ifaceNil; - return; - } - this._$0 = _$0_; - this.res = res_; - this.err = err_; - }); - requestAndChan = $pkg.requestAndChan = $newType(0, $kindStruct, "http.requestAndChan", true, "net/http", false, function(_$0_, req_, cancelKey_, ch_, addedGzip_, continueCh_, callerGone_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.req = ptrType$11.nil; - this.cancelKey = new cancelKey.ptr(ptrType$11.nil); - this.ch = $chanNil; - this.addedGzip = false; - this.continueCh = $chanNil; - this.callerGone = $chanNil; - return; - } - this._$0 = _$0_; - this.req = req_; - this.cancelKey = cancelKey_; - this.ch = ch_; - this.addedGzip = addedGzip_; - this.continueCh = continueCh_; - this.callerGone = callerGone_; - }); - writeRequest = $pkg.writeRequest = $newType(0, $kindStruct, "http.writeRequest", true, "net/http", false, function(req_, ch_, continueCh_) { - this.$val = this; - if (arguments.length === 0) { - this.req = ptrType$114.nil; - this.ch = $chanNil; - this.continueCh = $chanNil; - return; - } - this.req = req_; - this.ch = ch_; - this.continueCh = continueCh_; - }); - httpError = $pkg.httpError = $newType(0, $kindStruct, "http.httpError", true, "net/http", false, function(err_, timeout_) { - this.$val = this; - if (arguments.length === 0) { - this.err = ""; - this.timeout = false; - return; - } - this.err = err_; - this.timeout = timeout_; - }); - tLogKey = $pkg.tLogKey = $newType(0, $kindStruct, "http.tLogKey", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - bodyEOFSignal = $pkg.bodyEOFSignal = $newType(0, $kindStruct, "http.bodyEOFSignal", true, "net/http", false, function(body_, mu_, closed_, rerr_, fn_, earlyCloseFn_) { - this.$val = this; - if (arguments.length === 0) { - this.body = $ifaceNil; - this.mu = new sync.Mutex.ptr(0, 0); - this.closed = false; - this.rerr = $ifaceNil; - this.fn = $throwNilPointerError; - this.earlyCloseFn = $throwNilPointerError; - return; - } - this.body = body_; - this.mu = mu_; - this.closed = closed_; - this.rerr = rerr_; - this.fn = fn_; - this.earlyCloseFn = earlyCloseFn_; - }); - gzipReader = $pkg.gzipReader = $newType(0, $kindStruct, "http.gzipReader", true, "net/http", false, function(_$0_, body_, zr_, zerr_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.body = ptrType$32.nil; - this.zr = ptrType$33.nil; - this.zerr = $ifaceNil; - return; - } - this._$0 = _$0_; - this.body = body_; - this.zr = zr_; - this.zerr = zerr_; - }); - tlsHandshakeTimeoutError = $pkg.tlsHandshakeTimeoutError = $newType(0, $kindStruct, "http.tlsHandshakeTimeoutError", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - fakeLocker = $pkg.fakeLocker = $newType(0, $kindStruct, "http.fakeLocker", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - connLRU = $pkg.connLRU = $newType(0, $kindStruct, "http.connLRU", true, "net/http", false, function(ll_, m_) { - this.$val = this; - if (arguments.length === 0) { - this.ll = ptrType$3.nil; - this.m = false; - return; - } - this.ll = ll_; - this.m = m_; - }); - errorReader = $pkg.errorReader = $newType(0, $kindStruct, "http.errorReader", true, "net/http", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - return; - } - this.err = err_; - }); - byteReader = $pkg.byteReader = $newType(0, $kindStruct, "http.byteReader", true, "net/http", false, function(b_, done_) { - this.$val = this; - if (arguments.length === 0) { - this.b = 0; - this.done = false; - return; - } - this.b = b_; - this.done = done_; - }); - transferWriter = $pkg.transferWriter = $newType(0, $kindStruct, "http.transferWriter", true, "net/http", false, function(Method_, Body_, BodyCloser_, ResponseToHEAD_, ContentLength_, Close_, TransferEncoding_, Header_, Trailer_, IsResponse_, bodyReadError_, FlushHeaders_, ByteReadCh_) { - this.$val = this; - if (arguments.length === 0) { - this.Method = ""; - this.Body = $ifaceNil; - this.BodyCloser = $ifaceNil; - this.ResponseToHEAD = false; - this.ContentLength = new $Int64(0, 0); - this.Close = false; - this.TransferEncoding = sliceType$2.nil; - this.Header = false; - this.Trailer = false; - this.IsResponse = false; - this.bodyReadError = $ifaceNil; - this.FlushHeaders = false; - this.ByteReadCh = $chanNil; - return; - } - this.Method = Method_; - this.Body = Body_; - this.BodyCloser = BodyCloser_; - this.ResponseToHEAD = ResponseToHEAD_; - this.ContentLength = ContentLength_; - this.Close = Close_; - this.TransferEncoding = TransferEncoding_; - this.Header = Header_; - this.Trailer = Trailer_; - this.IsResponse = IsResponse_; - this.bodyReadError = bodyReadError_; - this.FlushHeaders = FlushHeaders_; - this.ByteReadCh = ByteReadCh_; - }); - transferReader = $pkg.transferReader = $newType(0, $kindStruct, "http.transferReader", true, "net/http", false, function(Header_, StatusCode_, RequestMethod_, ProtoMajor_, ProtoMinor_, Body_, ContentLength_, Chunked_, Close_, Trailer_) { - this.$val = this; - if (arguments.length === 0) { - this.Header = false; - this.StatusCode = 0; - this.RequestMethod = ""; - this.ProtoMajor = 0; - this.ProtoMinor = 0; - this.Body = $ifaceNil; - this.ContentLength = new $Int64(0, 0); - this.Chunked = false; - this.Close = false; - this.Trailer = false; - return; - } - this.Header = Header_; - this.StatusCode = StatusCode_; - this.RequestMethod = RequestMethod_; - this.ProtoMajor = ProtoMajor_; - this.ProtoMinor = ProtoMinor_; - this.Body = Body_; - this.ContentLength = ContentLength_; - this.Chunked = Chunked_; - this.Close = Close_; - this.Trailer = Trailer_; - }); - unsupportedTEError = $pkg.unsupportedTEError = $newType(0, $kindStruct, "http.unsupportedTEError", true, "net/http", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = ""; - return; - } - this.err = err_; - }); - body = $pkg.body = $newType(0, $kindStruct, "http.body", true, "net/http", false, function(src_, hdr_, r_, closing_, doEarlyClose_, mu_, sawEOF_, closed_, earlyClose_, onHitEOF_) { - this.$val = this; - if (arguments.length === 0) { - this.src = $ifaceNil; - this.hdr = $ifaceNil; - this.r = ptrType$29.nil; - this.closing = false; - this.doEarlyClose = false; - this.mu = new sync.Mutex.ptr(0, 0); - this.sawEOF = false; - this.closed = false; - this.earlyClose = false; - this.onHitEOF = $throwNilPointerError; - return; - } - this.src = src_; - this.hdr = hdr_; - this.r = r_; - this.closing = closing_; - this.doEarlyClose = doEarlyClose_; - this.mu = mu_; - this.sawEOF = sawEOF_; - this.closed = closed_; - this.earlyClose = earlyClose_; - this.onHitEOF = onHitEOF_; - }); - bodyLocked = $pkg.bodyLocked = $newType(0, $kindStruct, "http.bodyLocked", true, "net/http", false, function(b_) { - this.$val = this; - if (arguments.length === 0) { - this.b = ptrType$52.nil; - return; - } - this.b = b_; - }); - finishAsyncByteRead = $pkg.finishAsyncByteRead = $newType(0, $kindStruct, "http.finishAsyncByteRead", true, "net/http", false, function(tw_) { - this.$val = this; - if (arguments.length === 0) { - this.tw = ptrType$35.nil; - return; - } - this.tw = tw_; - }); - bufioFlushWriter = $pkg.bufioFlushWriter = $newType(0, $kindStruct, "http.bufioFlushWriter", true, "net/http", false, function(w_) { - this.$val = this; - if (arguments.length === 0) { - this.w = $ifaceNil; - return; - } - this.w = w_; - }); - socksCommand = $pkg.socksCommand = $newType(4, $kindInt, "http.socksCommand", true, "net/http", false, null); - socksAuthMethod = $pkg.socksAuthMethod = $newType(4, $kindInt, "http.socksAuthMethod", true, "net/http", false, null); - socksReply = $pkg.socksReply = $newType(4, $kindInt, "http.socksReply", true, "net/http", false, null); - socksAddr = $pkg.socksAddr = $newType(0, $kindStruct, "http.socksAddr", true, "net/http", false, function(Name_, IP_, Port_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.IP = net.IP.nil; - this.Port = 0; - return; - } - this.Name = Name_; - this.IP = IP_; - this.Port = Port_; - }); - socksConn = $pkg.socksConn = $newType(0, $kindStruct, "http.socksConn", true, "net/http", false, function(Conn_, boundAddr_) { - this.$val = this; - if (arguments.length === 0) { - this.Conn = $ifaceNil; - this.boundAddr = $ifaceNil; - return; - } - this.Conn = Conn_; - this.boundAddr = boundAddr_; - }); - socksDialer = $pkg.socksDialer = $newType(0, $kindStruct, "http.socksDialer", true, "net/http", false, function(cmd_, proxyNetwork_, proxyAddress_, ProxyDial_, AuthMethods_, Authenticate_) { - this.$val = this; - if (arguments.length === 0) { - this.cmd = 0; - this.proxyNetwork = ""; - this.proxyAddress = ""; - this.ProxyDial = $throwNilPointerError; - this.AuthMethods = sliceType$12.nil; - this.Authenticate = $throwNilPointerError; - return; - } - this.cmd = cmd_; - this.proxyNetwork = proxyNetwork_; - this.proxyAddress = proxyAddress_; - this.ProxyDial = ProxyDial_; - this.AuthMethods = AuthMethods_; - this.Authenticate = Authenticate_; - }); - socksUsernamePassword = $pkg.socksUsernamePassword = $newType(0, $kindStruct, "http.socksUsernamePassword", true, "net/http", false, function(Username_, Password_) { - this.$val = this; - if (arguments.length === 0) { - this.Username = ""; - this.Password = ""; - return; - } - this.Username = Username_; - this.Password = Password_; - }); - sniffSig = $pkg.sniffSig = $newType(8, $kindInterface, "http.sniffSig", true, "net/http", false, null); - exactSig = $pkg.exactSig = $newType(0, $kindStruct, "http.exactSig", true, "net/http", false, function(sig_, ct_) { - this.$val = this; - if (arguments.length === 0) { - this.sig = sliceType$3.nil; - this.ct = ""; - return; - } - this.sig = sig_; - this.ct = ct_; - }); - maskedSig = $pkg.maskedSig = $newType(0, $kindStruct, "http.maskedSig", true, "net/http", false, function(mask_, pat_, skipWS_, ct_) { - this.$val = this; - if (arguments.length === 0) { - this.mask = sliceType$3.nil; - this.pat = sliceType$3.nil; - this.skipWS = false; - this.ct = ""; - return; - } - this.mask = mask_; - this.pat = pat_; - this.skipWS = skipWS_; - this.ct = ct_; - }); - htmlSig = $pkg.htmlSig = $newType(12, $kindSlice, "http.htmlSig", true, "net/http", false, null); - mp4Sig = $pkg.mp4Sig = $newType(0, $kindStruct, "http.mp4Sig", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - textSig = $pkg.textSig = $newType(0, $kindStruct, "http.textSig", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - Handler = $pkg.Handler = $newType(8, $kindInterface, "http.Handler", true, "net/http", true, null); - ResponseWriter = $pkg.ResponseWriter = $newType(8, $kindInterface, "http.ResponseWriter", true, "net/http", true, null); - conn = $pkg.conn = $newType(0, $kindStruct, "http.conn", true, "net/http", false, function(server_, cancelCtx_, rwc_, remoteAddr_, tlsState_, werr_, r_, bufr_, bufw_, lastMethod_, curReq_, curState_, mu_, hijackedv_) { - this.$val = this; - if (arguments.length === 0) { - this.server = ptrType$46.nil; - this.cancelCtx = $throwNilPointerError; - this.rwc = $ifaceNil; - this.remoteAddr = ""; - this.tlsState = ptrType$28.nil; - this.werr = $ifaceNil; - this.r = ptrType$47.nil; - this.bufr = ptrType$29.nil; - this.bufw = ptrType$14.nil; - this.lastMethod = ""; - this.curReq = new atomic.Value.ptr($ifaceNil); - this.curState = new structType$1.ptr(new $Uint64(0, 0)); - this.mu = new sync.Mutex.ptr(0, 0); - this.hijackedv = false; - return; - } - this.server = server_; - this.cancelCtx = cancelCtx_; - this.rwc = rwc_; - this.remoteAddr = remoteAddr_; - this.tlsState = tlsState_; - this.werr = werr_; - this.r = r_; - this.bufr = bufr_; - this.bufw = bufw_; - this.lastMethod = lastMethod_; - this.curReq = curReq_; - this.curState = curState_; - this.mu = mu_; - this.hijackedv = hijackedv_; - }); - chunkWriter = $pkg.chunkWriter = $newType(0, $kindStruct, "http.chunkWriter", true, "net/http", false, function(res_, header_, wroteHeader_, chunking_) { - this.$val = this; - if (arguments.length === 0) { - this.res = ptrType$49.nil; - this.header = false; - this.wroteHeader = false; - this.chunking = false; - return; - } - this.res = res_; - this.header = header_; - this.wroteHeader = wroteHeader_; - this.chunking = chunking_; - }); - response = $pkg.response = $newType(0, $kindStruct, "http.response", true, "net/http", false, function(conn_, req_, reqBody_, cancelCtx_, wroteHeader_, wroteContinue_, wants10KeepAlive_, wantsClose_, canWriteContinue_, writeContinueMu_, w_, cw_, handlerHeader_, calledHeader_, written_, contentLength_, status_, closeAfterReply_, requestBodyLimitHit_, trailers_, handlerDone_, dateBuf_, clenBuf_, statusBuf_, closeNotifyCh_, didCloseNotify_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = ptrType$53.nil; - this.req = ptrType$11.nil; - this.reqBody = $ifaceNil; - this.cancelCtx = $throwNilPointerError; - this.wroteHeader = false; - this.wroteContinue = false; - this.wants10KeepAlive = false; - this.wantsClose = false; - this.canWriteContinue = 0; - this.writeContinueMu = new sync.Mutex.ptr(0, 0); - this.w = ptrType$14.nil; - this.cw = new chunkWriter.ptr(ptrType$49.nil, false, false, false); - this.handlerHeader = false; - this.calledHeader = false; - this.written = new $Int64(0, 0); - this.contentLength = new $Int64(0, 0); - this.status = 0; - this.closeAfterReply = false; - this.requestBodyLimitHit = false; - this.trailers = sliceType$2.nil; - this.handlerDone = 0; - this.dateBuf = arrayType$3.zero(); - this.clenBuf = arrayType$4.zero(); - this.statusBuf = arrayType$5.zero(); - this.closeNotifyCh = $chanNil; - this.didCloseNotify = 0; - return; - } - this.conn = conn_; - this.req = req_; - this.reqBody = reqBody_; - this.cancelCtx = cancelCtx_; - this.wroteHeader = wroteHeader_; - this.wroteContinue = wroteContinue_; - this.wants10KeepAlive = wants10KeepAlive_; - this.wantsClose = wantsClose_; - this.canWriteContinue = canWriteContinue_; - this.writeContinueMu = writeContinueMu_; - this.w = w_; - this.cw = cw_; - this.handlerHeader = handlerHeader_; - this.calledHeader = calledHeader_; - this.written = written_; - this.contentLength = contentLength_; - this.status = status_; - this.closeAfterReply = closeAfterReply_; - this.requestBodyLimitHit = requestBodyLimitHit_; - this.trailers = trailers_; - this.handlerDone = handlerDone_; - this.dateBuf = dateBuf_; - this.clenBuf = clenBuf_; - this.statusBuf = statusBuf_; - this.closeNotifyCh = closeNotifyCh_; - this.didCloseNotify = didCloseNotify_; - }); - atomicBool = $pkg.atomicBool = $newType(4, $kindInt32, "http.atomicBool", true, "net/http", false, null); - writerOnly = $pkg.writerOnly = $newType(0, $kindStruct, "http.writerOnly", true, "net/http", false, function(Writer_) { - this.$val = this; - if (arguments.length === 0) { - this.Writer = $ifaceNil; - return; - } - this.Writer = Writer_; - }); - readResult = $pkg.readResult = $newType(0, $kindStruct, "http.readResult", true, "net/http", false, function(_$0_, n_, err_, b_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.n = 0; - this.err = $ifaceNil; - this.b = 0; - return; - } - this._$0 = _$0_; - this.n = n_; - this.err = err_; - this.b = b_; - }); - connReader = $pkg.connReader = $newType(0, $kindStruct, "http.connReader", true, "net/http", false, function(conn_, mu_, hasByte_, byteBuf_, cond_, inRead_, aborted_, remain_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = ptrType$53.nil; - this.mu = new sync.Mutex.ptr(0, 0); - this.hasByte = false; - this.byteBuf = arrayType$2.zero(); - this.cond = ptrType$48.nil; - this.inRead = false; - this.aborted = false; - this.remain = new $Int64(0, 0); - return; - } - this.conn = conn_; - this.mu = mu_; - this.hasByte = hasByte_; - this.byteBuf = byteBuf_; - this.cond = cond_; - this.inRead = inRead_; - this.aborted = aborted_; - this.remain = remain_; - }); - expectContinueReader = $pkg.expectContinueReader = $newType(0, $kindStruct, "http.expectContinueReader", true, "net/http", false, function(resp_, readCloser_, closed_, sawEOF_) { - this.$val = this; - if (arguments.length === 0) { - this.resp = ptrType$49.nil; - this.readCloser = $ifaceNil; - this.closed = 0; - this.sawEOF = 0; - return; - } - this.resp = resp_; - this.readCloser = readCloser_; - this.closed = closed_; - this.sawEOF = sawEOF_; - }); - extraHeader = $pkg.extraHeader = $newType(0, $kindStruct, "http.extraHeader", true, "net/http", false, function(contentType_, connection_, transferEncoding_, date_, contentLength_) { - this.$val = this; - if (arguments.length === 0) { - this.contentType = ""; - this.connection = ""; - this.transferEncoding = ""; - this.date = sliceType$3.nil; - this.contentLength = sliceType$3.nil; - return; - } - this.contentType = contentType_; - this.connection = connection_; - this.transferEncoding = transferEncoding_; - this.date = date_; - this.contentLength = contentLength_; - }); - closeWriter = $pkg.closeWriter = $newType(8, $kindInterface, "http.closeWriter", true, "net/http", false, null); - statusError = $pkg.statusError = $newType(0, $kindStruct, "http.statusError", true, "net/http", false, function(code_, text_) { - this.$val = this; - if (arguments.length === 0) { - this.code = 0; - this.text = ""; - return; - } - this.code = code_; - this.text = text_; - }); - HandlerFunc = $pkg.HandlerFunc = $newType(4, $kindFunc, "http.HandlerFunc", true, "net/http", true, null); - redirectHandler = $pkg.redirectHandler = $newType(0, $kindStruct, "http.redirectHandler", true, "net/http", false, function(url_, code_) { - this.$val = this; - if (arguments.length === 0) { - this.url = ""; - this.code = 0; - return; - } - this.url = url_; - this.code = code_; - }); - ServeMux = $pkg.ServeMux = $newType(0, $kindStruct, "http.ServeMux", true, "net/http", true, function(mu_, m_, es_, hosts_) { - this.$val = this; - if (arguments.length === 0) { - this.mu = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - this.m = false; - this.es = sliceType$1.nil; - this.hosts = false; - return; - } - this.mu = mu_; - this.m = m_; - this.es = es_; - this.hosts = hosts_; - }); - muxEntry = $pkg.muxEntry = $newType(0, $kindStruct, "http.muxEntry", true, "net/http", false, function(h_, pattern_) { - this.$val = this; - if (arguments.length === 0) { - this.h = $ifaceNil; - this.pattern = ""; - return; - } - this.h = h_; - this.pattern = pattern_; - }); - Server = $pkg.Server = $newType(0, $kindStruct, "http.Server", true, "net/http", true, function(Addr_, Handler_, TLSConfig_, ReadTimeout_, ReadHeaderTimeout_, WriteTimeout_, IdleTimeout_, MaxHeaderBytes_, TLSNextProto_, ConnState_, ErrorLog_, BaseContext_, ConnContext_, inShutdown_, disableKeepAlives_, nextProtoOnce_, nextProtoErr_, mu_, listeners_, activeConn_, doneChan_, onShutdown_) { - this.$val = this; - if (arguments.length === 0) { - this.Addr = ""; - this.Handler = $ifaceNil; - this.TLSConfig = ptrType$4.nil; - this.ReadTimeout = new time.Duration(0, 0); - this.ReadHeaderTimeout = new time.Duration(0, 0); - this.WriteTimeout = new time.Duration(0, 0); - this.IdleTimeout = new time.Duration(0, 0); - this.MaxHeaderBytes = 0; - this.TLSNextProto = false; - this.ConnState = $throwNilPointerError; - this.ErrorLog = ptrType$58.nil; - this.BaseContext = $throwNilPointerError; - this.ConnContext = $throwNilPointerError; - this.inShutdown = 0; - this.disableKeepAlives = 0; - this.nextProtoOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.nextProtoErr = $ifaceNil; - this.mu = new sync.Mutex.ptr(0, 0); - this.listeners = false; - this.activeConn = false; - this.doneChan = $chanNil; - this.onShutdown = sliceType$19.nil; - return; - } - this.Addr = Addr_; - this.Handler = Handler_; - this.TLSConfig = TLSConfig_; - this.ReadTimeout = ReadTimeout_; - this.ReadHeaderTimeout = ReadHeaderTimeout_; - this.WriteTimeout = WriteTimeout_; - this.IdleTimeout = IdleTimeout_; - this.MaxHeaderBytes = MaxHeaderBytes_; - this.TLSNextProto = TLSNextProto_; - this.ConnState = ConnState_; - this.ErrorLog = ErrorLog_; - this.BaseContext = BaseContext_; - this.ConnContext = ConnContext_; - this.inShutdown = inShutdown_; - this.disableKeepAlives = disableKeepAlives_; - this.nextProtoOnce = nextProtoOnce_; - this.nextProtoErr = nextProtoErr_; - this.mu = mu_; - this.listeners = listeners_; - this.activeConn = activeConn_; - this.doneChan = doneChan_; - this.onShutdown = onShutdown_; - }); - ConnState = $pkg.ConnState = $newType(4, $kindInt, "http.ConnState", true, "net/http", true, null); - serverHandler = $pkg.serverHandler = $newType(0, $kindStruct, "http.serverHandler", true, "net/http", false, function(srv_) { - this.$val = this; - if (arguments.length === 0) { - this.srv = ptrType$46.nil; - return; - } - this.srv = srv_; - }); - onceCloseListener = $pkg.onceCloseListener = $newType(0, $kindStruct, "http.onceCloseListener", true, "net/http", false, function(Listener_, once_, closeErr_) { - this.$val = this; - if (arguments.length === 0) { - this.Listener = $ifaceNil; - this.once = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.closeErr = $ifaceNil; - return; - } - this.Listener = Listener_; - this.once = once_; - this.closeErr = closeErr_; - }); - globalOptionsHandler = $pkg.globalOptionsHandler = $newType(0, $kindStruct, "http.globalOptionsHandler", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - initALPNRequest = $pkg.initALPNRequest = $newType(0, $kindStruct, "http.initALPNRequest", true, "net/http", false, function(ctx_, c_, h_) { - this.$val = this; - if (arguments.length === 0) { - this.ctx = $ifaceNil; - this.c = ptrType$30.nil; - this.h = new serverHandler.ptr(ptrType$46.nil); - return; - } - this.ctx = ctx_; - this.c = c_; - this.h = h_; - }); - loggingConn = $pkg.loggingConn = $newType(0, $kindStruct, "http.loggingConn", true, "net/http", false, function(name_, Conn_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - this.Conn = $ifaceNil; - return; - } - this.name = name_; - this.Conn = Conn_; - }); - checkConnErrorWriter = $pkg.checkConnErrorWriter = $newType(0, $kindStruct, "http.checkConnErrorWriter", true, "net/http", false, function(c_) { - this.$val = this; - if (arguments.length === 0) { - this.c = ptrType$53.nil; - return; - } - this.c = c_; - }); - streamReader = $pkg.streamReader = $newType(0, $kindStruct, "http.streamReader", true, "net/http", false, function(pending_, stream_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.pending = sliceType$3.nil; - this.stream = new js.Value.ptr(null, false, arrayType.zero()); - this.err = $ifaceNil; - return; - } - this.pending = pending_; - this.stream = stream_; - this.err = err_; - }); - arrayReader = $pkg.arrayReader = $newType(0, $kindStruct, "http.arrayReader", true, "net/http", false, function(arrayPromise_, pending_, read_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.arrayPromise = new js.Value.ptr(null, false, arrayType.zero()); - this.pending = sliceType$3.nil; - this.read = false; - this.err = $ifaceNil; - return; - } - this.arrayPromise = arrayPromise_; - this.pending = pending_; - this.read = read_; - this.err = err_; - }); - Response = $pkg.Response = $newType(0, $kindStruct, "http.Response", true, "net/http", true, function(Status_, StatusCode_, Proto_, ProtoMajor_, ProtoMinor_, Header_, Body_, ContentLength_, TransferEncoding_, Close_, Uncompressed_, Trailer_, Request_, TLS_) { - this.$val = this; - if (arguments.length === 0) { - this.Status = ""; - this.StatusCode = 0; - this.Proto = ""; - this.ProtoMajor = 0; - this.ProtoMinor = 0; - this.Header = false; - this.Body = $ifaceNil; - this.ContentLength = new $Int64(0, 0); - this.TransferEncoding = sliceType$2.nil; - this.Close = false; - this.Uncompressed = false; - this.Trailer = false; - this.Request = ptrType$11.nil; - this.TLS = ptrType$28.nil; - return; - } - this.Status = Status_; - this.StatusCode = StatusCode_; - this.Proto = Proto_; - this.ProtoMajor = ProtoMajor_; - this.ProtoMinor = ProtoMinor_; - this.Header = Header_; - this.Body = Body_; - this.ContentLength = ContentLength_; - this.TransferEncoding = TransferEncoding_; - this.Close = Close_; - this.Uncompressed = Uncompressed_; - this.Trailer = Trailer_; - this.Request = Request_; - this.TLS = TLS_; - }); - ProtocolError = $pkg.ProtocolError = $newType(0, $kindStruct, "http.ProtocolError", true, "net/http", true, function(ErrorString_) { - this.$val = this; - if (arguments.length === 0) { - this.ErrorString = ""; - return; - } - this.ErrorString = ErrorString_; - }); - Request = $pkg.Request = $newType(0, $kindStruct, "http.Request", true, "net/http", true, function(Method_, URL_, Proto_, ProtoMajor_, ProtoMinor_, Header_, Body_, GetBody_, ContentLength_, TransferEncoding_, Close_, Host_, Form_, PostForm_, MultipartForm_, Trailer_, RemoteAddr_, RequestURI_, TLS_, Cancel_, Response_, ctx_) { - this.$val = this; - if (arguments.length === 0) { - this.Method = ""; - this.URL = ptrType$17.nil; - this.Proto = ""; - this.ProtoMajor = 0; - this.ProtoMinor = 0; - this.Header = false; - this.Body = $ifaceNil; - this.GetBody = $throwNilPointerError; - this.ContentLength = new $Int64(0, 0); - this.TransferEncoding = sliceType$2.nil; - this.Close = false; - this.Host = ""; - this.Form = false; - this.PostForm = false; - this.MultipartForm = ptrType$31.nil; - this.Trailer = false; - this.RemoteAddr = ""; - this.RequestURI = ""; - this.TLS = ptrType$28.nil; - this.Cancel = $chanNil; - this.Response = ptrType$18.nil; - this.ctx = $ifaceNil; - return; - } - this.Method = Method_; - this.URL = URL_; - this.Proto = Proto_; - this.ProtoMajor = ProtoMajor_; - this.ProtoMinor = ProtoMinor_; - this.Header = Header_; - this.Body = Body_; - this.GetBody = GetBody_; - this.ContentLength = ContentLength_; - this.TransferEncoding = TransferEncoding_; - this.Close = Close_; - this.Host = Host_; - this.Form = Form_; - this.PostForm = PostForm_; - this.MultipartForm = MultipartForm_; - this.Trailer = Trailer_; - this.RemoteAddr = RemoteAddr_; - this.RequestURI = RequestURI_; - this.TLS = TLS_; - this.Cancel = Cancel_; - this.Response = Response_; - this.ctx = ctx_; - }); - requestBodyReadError = $pkg.requestBodyReadError = $newType(0, $kindStruct, "http.requestBodyReadError", true, "net/http", false, function(error_) { - this.$val = this; - if (arguments.length === 0) { - this.error = $ifaceNil; - return; - } - this.error = error_; - }); - maxBytesReader = $pkg.maxBytesReader = $newType(0, $kindStruct, "http.maxBytesReader", true, "net/http", false, function(w_, r_, n_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.w = $ifaceNil; - this.r = $ifaceNil; - this.n = new $Int64(0, 0); - this.err = $ifaceNil; - return; - } - this.w = w_; - this.r = r_; - this.n = n_; - this.err = err_; - }); - incomparable = $pkg.incomparable = $newType(0, $kindArray, "http.incomparable", true, "net/http", false, null); - contextKey = $pkg.contextKey = $newType(0, $kindStruct, "http.contextKey", true, "net/http", false, function(name_) { - this.$val = this; - if (arguments.length === 0) { - this.name = ""; - return; - } - this.name = name_; - }); - noBody = $pkg.noBody = $newType(0, $kindStruct, "http.noBody", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - PushOptions = $pkg.PushOptions = $newType(0, $kindStruct, "http.PushOptions", true, "net/http", true, function(Method_, Header_) { - this.$val = this; - if (arguments.length === 0) { - this.Method = ""; - this.Header = false; - return; - } - this.Method = Method_; - this.Header = Header_; - }); - Header = $pkg.Header = $newType(4, $kindMap, "http.Header", true, "net/http", true, null); - stringWriter = $pkg.stringWriter = $newType(0, $kindStruct, "http.stringWriter", true, "net/http", false, function(w_) { - this.$val = this; - if (arguments.length === 0) { - this.w = $ifaceNil; - return; - } - this.w = w_; - }); - keyValues = $pkg.keyValues = $newType(0, $kindStruct, "http.keyValues", true, "net/http", false, function(key_, values_) { - this.$val = this; - if (arguments.length === 0) { - this.key = ""; - this.values = sliceType$2.nil; - return; - } - this.key = key_; - this.values = values_; - }); - headerSorter = $pkg.headerSorter = $newType(0, $kindStruct, "http.headerSorter", true, "net/http", false, function(kvs_) { - this.$val = this; - if (arguments.length === 0) { - this.kvs = sliceType$6.nil; - return; - } - this.kvs = kvs_; - }); - http2ClientConnPool = $pkg.http2ClientConnPool = $newType(8, $kindInterface, "http.http2ClientConnPool", true, "net/http", false, null); - http2clientConnPoolIdleCloser = $pkg.http2clientConnPoolIdleCloser = $newType(8, $kindInterface, "http.http2clientConnPoolIdleCloser", true, "net/http", false, null); - http2clientConnPool = $pkg.http2clientConnPool = $newType(0, $kindStruct, "http.http2clientConnPool", true, "net/http", false, function(t_, mu_, conns_, dialing_, keys_, addConnCalls_) { - this.$val = this; - if (arguments.length === 0) { - this.t = ptrType$102.nil; - this.mu = new sync.Mutex.ptr(0, 0); - this.conns = false; - this.dialing = false; - this.keys = false; - this.addConnCalls = false; - return; - } - this.t = t_; - this.mu = mu_; - this.conns = conns_; - this.dialing = dialing_; - this.keys = keys_; - this.addConnCalls = addConnCalls_; - }); - http2dialCall = $pkg.http2dialCall = $newType(0, $kindStruct, "http.http2dialCall", true, "net/http", false, function(_$0_, p_, ctx_, done_, res_, err_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.p = ptrType$9.nil; - this.ctx = $ifaceNil; - this.done = $chanNil; - this.res = ptrType$68.nil; - this.err = $ifaceNil; - return; - } - this._$0 = _$0_; - this.p = p_; - this.ctx = ctx_; - this.done = done_; - this.res = res_; - this.err = err_; - }); - http2addConnCall = $pkg.http2addConnCall = $newType(0, $kindStruct, "http.http2addConnCall", true, "net/http", false, function(_$0_, p_, done_, err_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.p = ptrType$9.nil; - this.done = $chanNil; - this.err = $ifaceNil; - return; - } - this._$0 = _$0_; - this.p = p_; - this.done = done_; - this.err = err_; - }); - http2noDialClientConnPool = $pkg.http2noDialClientConnPool = $newType(0, $kindStruct, "http.http2noDialClientConnPool", true, "net/http", false, function(http2clientConnPool_) { - this.$val = this; - if (arguments.length === 0) { - this.http2clientConnPool = ptrType$9.nil; - return; - } - this.http2clientConnPool = http2clientConnPool_; - }); - http2dataBuffer = $pkg.http2dataBuffer = $newType(0, $kindStruct, "http.http2dataBuffer", true, "net/http", false, function(chunks_, r_, w_, size_, expected_) { - this.$val = this; - if (arguments.length === 0) { - this.chunks = sliceType$5.nil; - this.r = 0; - this.w = 0; - this.size = 0; - this.expected = new $Int64(0, 0); - return; - } - this.chunks = chunks_; - this.r = r_; - this.w = w_; - this.size = size_; - this.expected = expected_; - }); - http2ErrCode = $pkg.http2ErrCode = $newType(4, $kindUint32, "http.http2ErrCode", true, "net/http", false, null); - http2ConnectionError = $pkg.http2ConnectionError = $newType(4, $kindUint32, "http.http2ConnectionError", true, "net/http", false, null); - http2StreamError = $pkg.http2StreamError = $newType(0, $kindStruct, "http.http2StreamError", true, "net/http", false, function(StreamID_, Code_, Cause_) { - this.$val = this; - if (arguments.length === 0) { - this.StreamID = 0; - this.Code = 0; - this.Cause = $ifaceNil; - return; - } - this.StreamID = StreamID_; - this.Code = Code_; - this.Cause = Cause_; - }); - http2goAwayFlowError = $pkg.http2goAwayFlowError = $newType(0, $kindStruct, "http.http2goAwayFlowError", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - http2connError = $pkg.http2connError = $newType(0, $kindStruct, "http.http2connError", true, "net/http", false, function(Code_, Reason_) { - this.$val = this; - if (arguments.length === 0) { - this.Code = 0; - this.Reason = ""; - return; - } - this.Code = Code_; - this.Reason = Reason_; - }); - http2pseudoHeaderError = $pkg.http2pseudoHeaderError = $newType(8, $kindString, "http.http2pseudoHeaderError", true, "net/http", false, null); - http2duplicatePseudoHeaderError = $pkg.http2duplicatePseudoHeaderError = $newType(8, $kindString, "http.http2duplicatePseudoHeaderError", true, "net/http", false, null); - http2headerFieldNameError = $pkg.http2headerFieldNameError = $newType(8, $kindString, "http.http2headerFieldNameError", true, "net/http", false, null); - http2headerFieldValueError = $pkg.http2headerFieldValueError = $newType(8, $kindString, "http.http2headerFieldValueError", true, "net/http", false, null); - http2flow = $pkg.http2flow = $newType(0, $kindStruct, "http.http2flow", true, "net/http", false, function(_$0_, n_, conn_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.n = 0; - this.conn = ptrType$71.nil; - return; - } - this._$0 = _$0_; - this.n = n_; - this.conn = conn_; - }); - http2FrameType = $pkg.http2FrameType = $newType(1, $kindUint8, "http.http2FrameType", true, "net/http", false, null); - http2Flags = $pkg.http2Flags = $newType(1, $kindUint8, "http.http2Flags", true, "net/http", false, null); - http2FrameHeader = $pkg.http2FrameHeader = $newType(0, $kindStruct, "http.http2FrameHeader", true, "net/http", false, function(valid_, Type_, Flags_, Length_, StreamID_) { - this.$val = this; - if (arguments.length === 0) { - this.valid = false; - this.Type = 0; - this.Flags = 0; - this.Length = 0; - this.StreamID = 0; - return; - } - this.valid = valid_; - this.Type = Type_; - this.Flags = Flags_; - this.Length = Length_; - this.StreamID = StreamID_; - }); - http2Frame = $pkg.http2Frame = $newType(8, $kindInterface, "http.http2Frame", true, "net/http", false, null); - http2Framer = $pkg.http2Framer = $newType(0, $kindStruct, "http.http2Framer", true, "net/http", false, function(r_, lastFrame_, errDetail_, countError_, lastHeaderStream_, maxReadSize_, headerBuf_, getReadBuf_, readBuf_, maxWriteSize_, w_, wbuf_, AllowIllegalWrites_, AllowIllegalReads_, ReadMetaHeaders_, MaxHeaderListSize_, logReads_, logWrites_, debugFramer_, debugFramerBuf_, debugReadLoggerf_, debugWriteLoggerf_, frameCache_) { - this.$val = this; - if (arguments.length === 0) { - this.r = $ifaceNil; - this.lastFrame = $ifaceNil; - this.errDetail = $ifaceNil; - this.countError = $throwNilPointerError; - this.lastHeaderStream = 0; - this.maxReadSize = 0; - this.headerBuf = arrayType$7.zero(); - this.getReadBuf = $throwNilPointerError; - this.readBuf = sliceType$3.nil; - this.maxWriteSize = 0; - this.w = $ifaceNil; - this.wbuf = sliceType$3.nil; - this.AllowIllegalWrites = false; - this.AllowIllegalReads = false; - this.ReadMetaHeaders = ptrType$74.nil; - this.MaxHeaderListSize = 0; - this.logReads = false; - this.logWrites = false; - this.debugFramer = ptrType$72.nil; - this.debugFramerBuf = ptrType$40.nil; - this.debugReadLoggerf = $throwNilPointerError; - this.debugWriteLoggerf = $throwNilPointerError; - this.frameCache = ptrType$73.nil; - return; - } - this.r = r_; - this.lastFrame = lastFrame_; - this.errDetail = errDetail_; - this.countError = countError_; - this.lastHeaderStream = lastHeaderStream_; - this.maxReadSize = maxReadSize_; - this.headerBuf = headerBuf_; - this.getReadBuf = getReadBuf_; - this.readBuf = readBuf_; - this.maxWriteSize = maxWriteSize_; - this.w = w_; - this.wbuf = wbuf_; - this.AllowIllegalWrites = AllowIllegalWrites_; - this.AllowIllegalReads = AllowIllegalReads_; - this.ReadMetaHeaders = ReadMetaHeaders_; - this.MaxHeaderListSize = MaxHeaderListSize_; - this.logReads = logReads_; - this.logWrites = logWrites_; - this.debugFramer = debugFramer_; - this.debugFramerBuf = debugFramerBuf_; - this.debugReadLoggerf = debugReadLoggerf_; - this.debugWriteLoggerf = debugWriteLoggerf_; - this.frameCache = frameCache_; - }); - http2frameCache = $pkg.http2frameCache = $newType(0, $kindStruct, "http.http2frameCache", true, "net/http", false, function(dataFrame_) { - this.$val = this; - if (arguments.length === 0) { - this.dataFrame = new http2DataFrame.ptr(new http2FrameHeader.ptr(false, 0, 0, 0, 0), sliceType$3.nil); - return; - } - this.dataFrame = dataFrame_; - }); - http2DataFrame = $pkg.http2DataFrame = $newType(0, $kindStruct, "http.http2DataFrame", true, "net/http", false, function(http2FrameHeader_, data_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.data = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.data = data_; - }); - http2SettingsFrame = $pkg.http2SettingsFrame = $newType(0, $kindStruct, "http.http2SettingsFrame", true, "net/http", false, function(http2FrameHeader_, p_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.p = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.p = p_; - }); - http2PingFrame = $pkg.http2PingFrame = $newType(0, $kindStruct, "http.http2PingFrame", true, "net/http", false, function(http2FrameHeader_, Data_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.Data = arrayType$8.zero(); - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.Data = Data_; - }); - http2GoAwayFrame = $pkg.http2GoAwayFrame = $newType(0, $kindStruct, "http.http2GoAwayFrame", true, "net/http", false, function(http2FrameHeader_, LastStreamID_, ErrCode_, debugData_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.LastStreamID = 0; - this.ErrCode = 0; - this.debugData = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.LastStreamID = LastStreamID_; - this.ErrCode = ErrCode_; - this.debugData = debugData_; - }); - http2UnknownFrame = $pkg.http2UnknownFrame = $newType(0, $kindStruct, "http.http2UnknownFrame", true, "net/http", false, function(http2FrameHeader_, p_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.p = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.p = p_; - }); - http2WindowUpdateFrame = $pkg.http2WindowUpdateFrame = $newType(0, $kindStruct, "http.http2WindowUpdateFrame", true, "net/http", false, function(http2FrameHeader_, Increment_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.Increment = 0; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.Increment = Increment_; - }); - http2HeadersFrame = $pkg.http2HeadersFrame = $newType(0, $kindStruct, "http.http2HeadersFrame", true, "net/http", false, function(http2FrameHeader_, Priority_, headerFragBuf_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.Priority = new http2PriorityParam.ptr(0, false, 0); - this.headerFragBuf = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.Priority = Priority_; - this.headerFragBuf = headerFragBuf_; - }); - http2HeadersFrameParam = $pkg.http2HeadersFrameParam = $newType(0, $kindStruct, "http.http2HeadersFrameParam", true, "net/http", false, function(StreamID_, BlockFragment_, EndStream_, EndHeaders_, PadLength_, Priority_) { - this.$val = this; - if (arguments.length === 0) { - this.StreamID = 0; - this.BlockFragment = sliceType$3.nil; - this.EndStream = false; - this.EndHeaders = false; - this.PadLength = 0; - this.Priority = new http2PriorityParam.ptr(0, false, 0); - return; - } - this.StreamID = StreamID_; - this.BlockFragment = BlockFragment_; - this.EndStream = EndStream_; - this.EndHeaders = EndHeaders_; - this.PadLength = PadLength_; - this.Priority = Priority_; - }); - http2PriorityFrame = $pkg.http2PriorityFrame = $newType(0, $kindStruct, "http.http2PriorityFrame", true, "net/http", false, function(http2FrameHeader_, http2PriorityParam_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.http2PriorityParam = new http2PriorityParam.ptr(0, false, 0); - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.http2PriorityParam = http2PriorityParam_; - }); - http2PriorityParam = $pkg.http2PriorityParam = $newType(0, $kindStruct, "http.http2PriorityParam", true, "net/http", false, function(StreamDep_, Exclusive_, Weight_) { - this.$val = this; - if (arguments.length === 0) { - this.StreamDep = 0; - this.Exclusive = false; - this.Weight = 0; - return; - } - this.StreamDep = StreamDep_; - this.Exclusive = Exclusive_; - this.Weight = Weight_; - }); - http2RSTStreamFrame = $pkg.http2RSTStreamFrame = $newType(0, $kindStruct, "http.http2RSTStreamFrame", true, "net/http", false, function(http2FrameHeader_, ErrCode_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.ErrCode = 0; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.ErrCode = ErrCode_; - }); - http2ContinuationFrame = $pkg.http2ContinuationFrame = $newType(0, $kindStruct, "http.http2ContinuationFrame", true, "net/http", false, function(http2FrameHeader_, headerFragBuf_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.headerFragBuf = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.headerFragBuf = headerFragBuf_; - }); - http2PushPromiseFrame = $pkg.http2PushPromiseFrame = $newType(0, $kindStruct, "http.http2PushPromiseFrame", true, "net/http", false, function(http2FrameHeader_, PromiseID_, headerFragBuf_) { - this.$val = this; - if (arguments.length === 0) { - this.http2FrameHeader = new http2FrameHeader.ptr(false, 0, 0, 0, 0); - this.PromiseID = 0; - this.headerFragBuf = sliceType$3.nil; - return; - } - this.http2FrameHeader = http2FrameHeader_; - this.PromiseID = PromiseID_; - this.headerFragBuf = headerFragBuf_; - }); - http2PushPromiseParam = $pkg.http2PushPromiseParam = $newType(0, $kindStruct, "http.http2PushPromiseParam", true, "net/http", false, function(StreamID_, PromiseID_, BlockFragment_, EndHeaders_, PadLength_) { - this.$val = this; - if (arguments.length === 0) { - this.StreamID = 0; - this.PromiseID = 0; - this.BlockFragment = sliceType$3.nil; - this.EndHeaders = false; - this.PadLength = 0; - return; - } - this.StreamID = StreamID_; - this.PromiseID = PromiseID_; - this.BlockFragment = BlockFragment_; - this.EndHeaders = EndHeaders_; - this.PadLength = PadLength_; - }); - http2MetaHeadersFrame = $pkg.http2MetaHeadersFrame = $newType(0, $kindStruct, "http.http2MetaHeadersFrame", true, "net/http", false, function(http2HeadersFrame_, Fields_, Truncated_) { - this.$val = this; - if (arguments.length === 0) { - this.http2HeadersFrame = ptrType$75.nil; - this.Fields = sliceType$22.nil; - this.Truncated = false; - return; - } - this.http2HeadersFrame = http2HeadersFrame_; - this.Fields = Fields_; - this.Truncated = Truncated_; - }); - http2goroutineLock = $pkg.http2goroutineLock = $newType(8, $kindUint64, "http.http2goroutineLock", true, "net/http", false, null); - http2streamState = $pkg.http2streamState = $newType(4, $kindInt, "http.http2streamState", true, "net/http", false, null); - http2Setting = $pkg.http2Setting = $newType(0, $kindStruct, "http.http2Setting", true, "net/http", false, function(ID_, Val_) { - this.$val = this; - if (arguments.length === 0) { - this.ID = 0; - this.Val = 0; - return; - } - this.ID = ID_; - this.Val = Val_; - }); - http2SettingID = $pkg.http2SettingID = $newType(2, $kindUint16, "http.http2SettingID", true, "net/http", false, null); - http2gate = $pkg.http2gate = $newType(4, $kindChan, "http.http2gate", true, "net/http", false, null); - http2closeWaiter = $pkg.http2closeWaiter = $newType(4, $kindChan, "http.http2closeWaiter", true, "net/http", false, null); - http2bufferedWriter = $pkg.http2bufferedWriter = $newType(0, $kindStruct, "http.http2bufferedWriter", true, "net/http", false, function(_$0_, w_, bw_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.w = $ifaceNil; - this.bw = ptrType$14.nil; - return; - } - this._$0 = _$0_; - this.w = w_; - this.bw = bw_; - }); - http2httpError = $pkg.http2httpError = $newType(0, $kindStruct, "http.http2httpError", true, "net/http", false, function(_$0_, msg_, timeout_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.msg = ""; - this.timeout = false; - return; - } - this._$0 = _$0_; - this.msg = msg_; - this.timeout = timeout_; - }); - http2connectionStater = $pkg.http2connectionStater = $newType(8, $kindInterface, "http.http2connectionStater", true, "net/http", false, null); - http2sorter = $pkg.http2sorter = $newType(0, $kindStruct, "http.http2sorter", true, "net/http", false, function(v_) { - this.$val = this; - if (arguments.length === 0) { - this.v = sliceType$2.nil; - return; - } - this.v = v_; - }); - http2incomparable = $pkg.http2incomparable = $newType(0, $kindArray, "http.http2incomparable", true, "net/http", false, null); - http2pipe = $pkg.http2pipe = $newType(0, $kindStruct, "http.http2pipe", true, "net/http", false, function(mu_, c_, b_, unread_, err_, breakErr_, donec_, readFn_) { - this.$val = this; - if (arguments.length === 0) { - this.mu = new sync.Mutex.ptr(0, 0); - this.c = new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil); - this.b = $ifaceNil; - this.unread = 0; - this.err = $ifaceNil; - this.breakErr = $ifaceNil; - this.donec = $chanNil; - this.readFn = $throwNilPointerError; - return; - } - this.mu = mu_; - this.c = c_; - this.b = b_; - this.unread = unread_; - this.err = err_; - this.breakErr = breakErr_; - this.donec = donec_; - this.readFn = readFn_; - }); - http2pipeBuffer = $pkg.http2pipeBuffer = $newType(8, $kindInterface, "http.http2pipeBuffer", true, "net/http", false, null); - http2Server = $pkg.http2Server = $newType(0, $kindStruct, "http.http2Server", true, "net/http", false, function(MaxHandlers_, MaxConcurrentStreams_, MaxReadFrameSize_, PermitProhibitedCipherSuites_, IdleTimeout_, MaxUploadBufferPerConnection_, MaxUploadBufferPerStream_, NewWriteScheduler_, CountError_, state_) { - this.$val = this; - if (arguments.length === 0) { - this.MaxHandlers = 0; - this.MaxConcurrentStreams = 0; - this.MaxReadFrameSize = 0; - this.PermitProhibitedCipherSuites = false; - this.IdleTimeout = new time.Duration(0, 0); - this.MaxUploadBufferPerConnection = 0; - this.MaxUploadBufferPerStream = 0; - this.NewWriteScheduler = $throwNilPointerError; - this.CountError = $throwNilPointerError; - this.state = ptrType$60.nil; - return; - } - this.MaxHandlers = MaxHandlers_; - this.MaxConcurrentStreams = MaxConcurrentStreams_; - this.MaxReadFrameSize = MaxReadFrameSize_; - this.PermitProhibitedCipherSuites = PermitProhibitedCipherSuites_; - this.IdleTimeout = IdleTimeout_; - this.MaxUploadBufferPerConnection = MaxUploadBufferPerConnection_; - this.MaxUploadBufferPerStream = MaxUploadBufferPerStream_; - this.NewWriteScheduler = NewWriteScheduler_; - this.CountError = CountError_; - this.state = state_; - }); - http2serverInternalState = $pkg.http2serverInternalState = $newType(0, $kindStruct, "http.http2serverInternalState", true, "net/http", false, function(mu_, activeConns_) { - this.$val = this; - if (arguments.length === 0) { - this.mu = new sync.Mutex.ptr(0, 0); - this.activeConns = false; - return; - } - this.mu = mu_; - this.activeConns = activeConns_; - }); - http2ServeConnOpts = $pkg.http2ServeConnOpts = $newType(0, $kindStruct, "http.http2ServeConnOpts", true, "net/http", false, function(Context_, BaseConfig_, Handler_) { - this.$val = this; - if (arguments.length === 0) { - this.Context = $ifaceNil; - this.BaseConfig = ptrType$46.nil; - this.Handler = $ifaceNil; - return; - } - this.Context = Context_; - this.BaseConfig = BaseConfig_; - this.Handler = Handler_; - }); - http2serverConn = $pkg.http2serverConn = $newType(0, $kindStruct, "http.http2serverConn", true, "net/http", false, function(srv_, hs_, conn_, bw_, handler_, baseCtx_, framer_, doneServing_, readFrameCh_, wantWriteFrameCh_, wroteFrameCh_, bodyReadCh_, serveMsgCh_, flow_, inflow_, tlsState_, remoteAddrStr_, writeSched_, serveG_, pushEnabled_, sawFirstSettings_, needToSendSettingsAck_, unackedSettings_, queuedControlFrames_, clientMaxStreams_, advMaxStreams_, curClientStreams_, curPushedStreams_, maxClientStreamID_, maxPushPromiseID_, streams_, initialStreamSendWindowSize_, maxFrameSize_, headerTableSize_, peerMaxHeaderListSize_, canonHeader_, writingFrame_, writingFrameAsync_, needsFrameFlush_, inGoAway_, inFrameScheduleLoop_, needToSendGoAway_, goAwayCode_, shutdownTimer_, idleTimer_, headerWriteBuf_, hpackEncoder_, shutdownOnce_) { - this.$val = this; - if (arguments.length === 0) { - this.srv = ptrType$86.nil; - this.hs = ptrType$46.nil; - this.conn = $ifaceNil; - this.bw = ptrType$88.nil; - this.handler = $ifaceNil; - this.baseCtx = $ifaceNil; - this.framer = ptrType$72.nil; - this.doneServing = $chanNil; - this.readFrameCh = $chanNil; - this.wantWriteFrameCh = $chanNil; - this.wroteFrameCh = $chanNil; - this.bodyReadCh = $chanNil; - this.serveMsgCh = $chanNil; - this.flow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.inflow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.tlsState = ptrType$28.nil; - this.remoteAddrStr = ""; - this.writeSched = $ifaceNil; - this.serveG = new http2goroutineLock(0, 0); - this.pushEnabled = false; - this.sawFirstSettings = false; - this.needToSendSettingsAck = false; - this.unackedSettings = 0; - this.queuedControlFrames = 0; - this.clientMaxStreams = 0; - this.advMaxStreams = 0; - this.curClientStreams = 0; - this.curPushedStreams = 0; - this.maxClientStreamID = 0; - this.maxPushPromiseID = 0; - this.streams = false; - this.initialStreamSendWindowSize = 0; - this.maxFrameSize = 0; - this.headerTableSize = 0; - this.peerMaxHeaderListSize = 0; - this.canonHeader = false; - this.writingFrame = false; - this.writingFrameAsync = false; - this.needsFrameFlush = false; - this.inGoAway = false; - this.inFrameScheduleLoop = false; - this.needToSendGoAway = false; - this.goAwayCode = 0; - this.shutdownTimer = ptrType$25.nil; - this.idleTimer = ptrType$25.nil; - this.headerWriteBuf = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - this.hpackEncoder = ptrType$89.nil; - this.shutdownOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - return; - } - this.srv = srv_; - this.hs = hs_; - this.conn = conn_; - this.bw = bw_; - this.handler = handler_; - this.baseCtx = baseCtx_; - this.framer = framer_; - this.doneServing = doneServing_; - this.readFrameCh = readFrameCh_; - this.wantWriteFrameCh = wantWriteFrameCh_; - this.wroteFrameCh = wroteFrameCh_; - this.bodyReadCh = bodyReadCh_; - this.serveMsgCh = serveMsgCh_; - this.flow = flow_; - this.inflow = inflow_; - this.tlsState = tlsState_; - this.remoteAddrStr = remoteAddrStr_; - this.writeSched = writeSched_; - this.serveG = serveG_; - this.pushEnabled = pushEnabled_; - this.sawFirstSettings = sawFirstSettings_; - this.needToSendSettingsAck = needToSendSettingsAck_; - this.unackedSettings = unackedSettings_; - this.queuedControlFrames = queuedControlFrames_; - this.clientMaxStreams = clientMaxStreams_; - this.advMaxStreams = advMaxStreams_; - this.curClientStreams = curClientStreams_; - this.curPushedStreams = curPushedStreams_; - this.maxClientStreamID = maxClientStreamID_; - this.maxPushPromiseID = maxPushPromiseID_; - this.streams = streams_; - this.initialStreamSendWindowSize = initialStreamSendWindowSize_; - this.maxFrameSize = maxFrameSize_; - this.headerTableSize = headerTableSize_; - this.peerMaxHeaderListSize = peerMaxHeaderListSize_; - this.canonHeader = canonHeader_; - this.writingFrame = writingFrame_; - this.writingFrameAsync = writingFrameAsync_; - this.needsFrameFlush = needsFrameFlush_; - this.inGoAway = inGoAway_; - this.inFrameScheduleLoop = inFrameScheduleLoop_; - this.needToSendGoAway = needToSendGoAway_; - this.goAwayCode = goAwayCode_; - this.shutdownTimer = shutdownTimer_; - this.idleTimer = idleTimer_; - this.headerWriteBuf = headerWriteBuf_; - this.hpackEncoder = hpackEncoder_; - this.shutdownOnce = shutdownOnce_; - }); - http2stream = $pkg.http2stream = $newType(0, $kindStruct, "http.http2stream", true, "net/http", false, function(sc_, id_, body_, cw_, ctx_, cancelCtx_, bodyBytes_, declBodyBytes_, flow_, inflow_, state_, resetQueued_, gotTrailerHeader_, wroteHeaders_, writeDeadline_, trailer_, reqTrailer_) { - this.$val = this; - if (arguments.length === 0) { - this.sc = ptrType$13.nil; - this.id = 0; - this.body = ptrType$97.nil; - this.cw = $chanNil; - this.ctx = $ifaceNil; - this.cancelCtx = $throwNilPointerError; - this.bodyBytes = new $Int64(0, 0); - this.declBodyBytes = new $Int64(0, 0); - this.flow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.inflow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.state = 0; - this.resetQueued = false; - this.gotTrailerHeader = false; - this.wroteHeaders = false; - this.writeDeadline = ptrType$25.nil; - this.trailer = false; - this.reqTrailer = false; - return; - } - this.sc = sc_; - this.id = id_; - this.body = body_; - this.cw = cw_; - this.ctx = ctx_; - this.cancelCtx = cancelCtx_; - this.bodyBytes = bodyBytes_; - this.declBodyBytes = declBodyBytes_; - this.flow = flow_; - this.inflow = inflow_; - this.state = state_; - this.resetQueued = resetQueued_; - this.gotTrailerHeader = gotTrailerHeader_; - this.wroteHeaders = wroteHeaders_; - this.writeDeadline = writeDeadline_; - this.trailer = trailer_; - this.reqTrailer = reqTrailer_; - }); - http2readFrameResult = $pkg.http2readFrameResult = $newType(0, $kindStruct, "http.http2readFrameResult", true, "net/http", false, function(f_, err_, readMore_) { - this.$val = this; - if (arguments.length === 0) { - this.f = $ifaceNil; - this.err = $ifaceNil; - this.readMore = $throwNilPointerError; - return; - } - this.f = f_; - this.err = err_; - this.readMore = readMore_; - }); - http2frameWriteResult = $pkg.http2frameWriteResult = $newType(0, $kindStruct, "http.http2frameWriteResult", true, "net/http", false, function(_$0_, wr_, err_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.wr = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil); - this.err = $ifaceNil; - return; - } - this._$0 = _$0_; - this.wr = wr_; - this.err = err_; - }); - http2serverMessage = $pkg.http2serverMessage = $newType(4, $kindInt, "http.http2serverMessage", true, "net/http", false, null); - http2requestParam = $pkg.http2requestParam = $newType(0, $kindStruct, "http.http2requestParam", true, "net/http", false, function(method_, scheme_, authority_, path_, header_) { - this.$val = this; - if (arguments.length === 0) { - this.method = ""; - this.scheme = ""; - this.authority = ""; - this.path = ""; - this.header = false; - return; - } - this.method = method_; - this.scheme = scheme_; - this.authority = authority_; - this.path = path_; - this.header = header_; - }); - http2bodyReadMsg = $pkg.http2bodyReadMsg = $newType(0, $kindStruct, "http.http2bodyReadMsg", true, "net/http", false, function(st_, n_) { - this.$val = this; - if (arguments.length === 0) { - this.st = ptrType$10.nil; - this.n = 0; - return; - } - this.st = st_; - this.n = n_; - }); - http2requestBody = $pkg.http2requestBody = $newType(0, $kindStruct, "http.http2requestBody", true, "net/http", false, function(_$0_, stream_, conn_, closed_, sawEOF_, pipe_, needsContinue_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.stream = ptrType$10.nil; - this.conn = ptrType$13.nil; - this.closed = false; - this.sawEOF = false; - this.pipe = ptrType$97.nil; - this.needsContinue = false; - return; - } - this._$0 = _$0_; - this.stream = stream_; - this.conn = conn_; - this.closed = closed_; - this.sawEOF = sawEOF_; - this.pipe = pipe_; - this.needsContinue = needsContinue_; - }); - http2responseWriter = $pkg.http2responseWriter = $newType(0, $kindStruct, "http.http2responseWriter", true, "net/http", false, function(rws_) { - this.$val = this; - if (arguments.length === 0) { - this.rws = ptrType$99.nil; - return; - } - this.rws = rws_; - }); - http2responseWriterState = $pkg.http2responseWriterState = $newType(0, $kindStruct, "http.http2responseWriterState", true, "net/http", false, function(stream_, req_, body_, conn_, bw_, handlerHeader_, snapHeader_, trailers_, status_, wroteHeader_, sentHeader_, handlerDone_, dirty_, sentContentLen_, wroteBytes_, closeNotifierMu_, closeNotifierCh_) { - this.$val = this; - if (arguments.length === 0) { - this.stream = ptrType$10.nil; - this.req = ptrType$11.nil; - this.body = ptrType$12.nil; - this.conn = ptrType$13.nil; - this.bw = ptrType$14.nil; - this.handlerHeader = false; - this.snapHeader = false; - this.trailers = sliceType$2.nil; - this.status = 0; - this.wroteHeader = false; - this.sentHeader = false; - this.handlerDone = false; - this.dirty = false; - this.sentContentLen = new $Int64(0, 0); - this.wroteBytes = new $Int64(0, 0); - this.closeNotifierMu = new sync.Mutex.ptr(0, 0); - this.closeNotifierCh = $chanNil; - return; - } - this.stream = stream_; - this.req = req_; - this.body = body_; - this.conn = conn_; - this.bw = bw_; - this.handlerHeader = handlerHeader_; - this.snapHeader = snapHeader_; - this.trailers = trailers_; - this.status = status_; - this.wroteHeader = wroteHeader_; - this.sentHeader = sentHeader_; - this.handlerDone = handlerDone_; - this.dirty = dirty_; - this.sentContentLen = sentContentLen_; - this.wroteBytes = wroteBytes_; - this.closeNotifierMu = closeNotifierMu_; - this.closeNotifierCh = closeNotifierCh_; - }); - http2chunkWriter = $pkg.http2chunkWriter = $newType(0, $kindStruct, "http.http2chunkWriter", true, "net/http", false, function(rws_) { - this.$val = this; - if (arguments.length === 0) { - this.rws = ptrType$99.nil; - return; - } - this.rws = rws_; - }); - http2startPushRequest = $pkg.http2startPushRequest = $newType(0, $kindStruct, "http.http2startPushRequest", true, "net/http", false, function(parent_, method_, url_, header_, done_) { - this.$val = this; - if (arguments.length === 0) { - this.parent = ptrType$10.nil; - this.method = ""; - this.url = ptrType$17.nil; - this.header = false; - this.done = $chanNil; - return; - } - this.parent = parent_; - this.method = method_; - this.url = url_; - this.header = header_; - this.done = done_; - }); - http2Transport = $pkg.http2Transport = $newType(0, $kindStruct, "http.http2Transport", true, "net/http", false, function(DialTLS_, TLSClientConfig_, ConnPool_, DisableCompression_, AllowHTTP_, MaxHeaderListSize_, StrictMaxConcurrentStreams_, ReadIdleTimeout_, PingTimeout_, WriteByteTimeout_, CountError_, t1_, connPoolOnce_, connPoolOrDef_) { - this.$val = this; - if (arguments.length === 0) { - this.DialTLS = $throwNilPointerError; - this.TLSClientConfig = ptrType$4.nil; - this.ConnPool = $ifaceNil; - this.DisableCompression = false; - this.AllowHTTP = false; - this.MaxHeaderListSize = 0; - this.StrictMaxConcurrentStreams = false; - this.ReadIdleTimeout = new time.Duration(0, 0); - this.PingTimeout = new time.Duration(0, 0); - this.WriteByteTimeout = new time.Duration(0, 0); - this.CountError = $throwNilPointerError; - this.t1 = ptrType$27.nil; - this.connPoolOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.connPoolOrDef = $ifaceNil; - return; - } - this.DialTLS = DialTLS_; - this.TLSClientConfig = TLSClientConfig_; - this.ConnPool = ConnPool_; - this.DisableCompression = DisableCompression_; - this.AllowHTTP = AllowHTTP_; - this.MaxHeaderListSize = MaxHeaderListSize_; - this.StrictMaxConcurrentStreams = StrictMaxConcurrentStreams_; - this.ReadIdleTimeout = ReadIdleTimeout_; - this.PingTimeout = PingTimeout_; - this.WriteByteTimeout = WriteByteTimeout_; - this.CountError = CountError_; - this.t1 = t1_; - this.connPoolOnce = connPoolOnce_; - this.connPoolOrDef = connPoolOrDef_; - }); - http2ClientConn = $pkg.http2ClientConn = $newType(0, $kindStruct, "http.http2ClientConn", true, "net/http", false, function(t_, tconn_, tlsState_, reused_, singleUse_, getConnCalled_, readerDone_, readerErr_, idleTimeout_, idleTimer_, mu_, cond_, flow_, inflow_, doNotReuse_, closing_, closed_, seenSettings_, wantSettingsAck_, goAway_, goAwayDebug_, streams_, streamsReserved_, nextStreamID_, pendingRequests_, pings_, br_, lastActive_, lastIdle_, maxFrameSize_, maxConcurrentStreams_, peerMaxHeaderListSize_, initialWindowSize_, reqHeaderMu_, wmu_, bw_, fr_, werr_, hbuf_, henc_) { - this.$val = this; - if (arguments.length === 0) { - this.t = ptrType$102.nil; - this.tconn = $ifaceNil; - this.tlsState = ptrType$28.nil; - this.reused = 0; - this.singleUse = false; - this.getConnCalled = false; - this.readerDone = $chanNil; - this.readerErr = $ifaceNil; - this.idleTimeout = new time.Duration(0, 0); - this.idleTimer = ptrType$25.nil; - this.mu = new sync.Mutex.ptr(0, 0); - this.cond = ptrType$48.nil; - this.flow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.inflow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.doNotReuse = false; - this.closing = false; - this.closed = false; - this.seenSettings = false; - this.wantSettingsAck = false; - this.goAway = ptrType$82.nil; - this.goAwayDebug = ""; - this.streams = false; - this.streamsReserved = 0; - this.nextStreamID = 0; - this.pendingRequests = 0; - this.pings = false; - this.br = ptrType$29.nil; - this.lastActive = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.lastIdle = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.maxFrameSize = 0; - this.maxConcurrentStreams = 0; - this.peerMaxHeaderListSize = new $Uint64(0, 0); - this.initialWindowSize = 0; - this.reqHeaderMu = $chanNil; - this.wmu = new sync.Mutex.ptr(0, 0); - this.bw = ptrType$14.nil; - this.fr = ptrType$72.nil; - this.werr = $ifaceNil; - this.hbuf = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - this.henc = ptrType$89.nil; - return; - } - this.t = t_; - this.tconn = tconn_; - this.tlsState = tlsState_; - this.reused = reused_; - this.singleUse = singleUse_; - this.getConnCalled = getConnCalled_; - this.readerDone = readerDone_; - this.readerErr = readerErr_; - this.idleTimeout = idleTimeout_; - this.idleTimer = idleTimer_; - this.mu = mu_; - this.cond = cond_; - this.flow = flow_; - this.inflow = inflow_; - this.doNotReuse = doNotReuse_; - this.closing = closing_; - this.closed = closed_; - this.seenSettings = seenSettings_; - this.wantSettingsAck = wantSettingsAck_; - this.goAway = goAway_; - this.goAwayDebug = goAwayDebug_; - this.streams = streams_; - this.streamsReserved = streamsReserved_; - this.nextStreamID = nextStreamID_; - this.pendingRequests = pendingRequests_; - this.pings = pings_; - this.br = br_; - this.lastActive = lastActive_; - this.lastIdle = lastIdle_; - this.maxFrameSize = maxFrameSize_; - this.maxConcurrentStreams = maxConcurrentStreams_; - this.peerMaxHeaderListSize = peerMaxHeaderListSize_; - this.initialWindowSize = initialWindowSize_; - this.reqHeaderMu = reqHeaderMu_; - this.wmu = wmu_; - this.bw = bw_; - this.fr = fr_; - this.werr = werr_; - this.hbuf = hbuf_; - this.henc = henc_; - }); - http2clientStream = $pkg.http2clientStream = $newType(0, $kindStruct, "http.http2clientStream", true, "net/http", false, function(cc_, ctx_, reqCancel_, trace_, ID_, bufPipe_, requestedGzip_, isHead_, abortOnce_, abort_, abortErr_, peerClosed_, donec_, on100_, respHeaderRecv_, res_, flow_, inflow_, bytesRemain_, readErr_, reqBody_, reqBodyContentLength_, reqBodyClosed_, sentEndStream_, sentHeaders_, firstByte_, pastHeaders_, pastTrailers_, num1xx_, readClosed_, readAborted_, trailer_, resTrailer_) { - this.$val = this; - if (arguments.length === 0) { - this.cc = ptrType$68.nil; - this.ctx = $ifaceNil; - this.reqCancel = $chanNil; - this.trace = ptrType$19.nil; - this.ID = 0; - this.bufPipe = new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), $ifaceNil, 0, $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError); - this.requestedGzip = false; - this.isHead = false; - this.abortOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - this.abort = $chanNil; - this.abortErr = $ifaceNil; - this.peerClosed = $chanNil; - this.donec = $chanNil; - this.on100 = $chanNil; - this.respHeaderRecv = $chanNil; - this.res = ptrType$18.nil; - this.flow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.inflow = new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil); - this.bytesRemain = new $Int64(0, 0); - this.readErr = $ifaceNil; - this.reqBody = $ifaceNil; - this.reqBodyContentLength = new $Int64(0, 0); - this.reqBodyClosed = false; - this.sentEndStream = false; - this.sentHeaders = false; - this.firstByte = false; - this.pastHeaders = false; - this.pastTrailers = false; - this.num1xx = 0; - this.readClosed = false; - this.readAborted = false; - this.trailer = false; - this.resTrailer = ptrType$38.nil; - return; - } - this.cc = cc_; - this.ctx = ctx_; - this.reqCancel = reqCancel_; - this.trace = trace_; - this.ID = ID_; - this.bufPipe = bufPipe_; - this.requestedGzip = requestedGzip_; - this.isHead = isHead_; - this.abortOnce = abortOnce_; - this.abort = abort_; - this.abortErr = abortErr_; - this.peerClosed = peerClosed_; - this.donec = donec_; - this.on100 = on100_; - this.respHeaderRecv = respHeaderRecv_; - this.res = res_; - this.flow = flow_; - this.inflow = inflow_; - this.bytesRemain = bytesRemain_; - this.readErr = readErr_; - this.reqBody = reqBody_; - this.reqBodyContentLength = reqBodyContentLength_; - this.reqBodyClosed = reqBodyClosed_; - this.sentEndStream = sentEndStream_; - this.sentHeaders = sentHeaders_; - this.firstByte = firstByte_; - this.pastHeaders = pastHeaders_; - this.pastTrailers = pastTrailers_; - this.num1xx = num1xx_; - this.readClosed = readClosed_; - this.readAborted = readAborted_; - this.trailer = trailer_; - this.resTrailer = resTrailer_; - }); - http2stickyErrWriter = $pkg.http2stickyErrWriter = $newType(0, $kindStruct, "http.http2stickyErrWriter", true, "net/http", false, function(conn_, timeout_, err_) { - this.$val = this; - if (arguments.length === 0) { - this.conn = $ifaceNil; - this.timeout = new time.Duration(0, 0); - this.err = ptrType$85.nil; - return; - } - this.conn = conn_; - this.timeout = timeout_; - this.err = err_; - }); - http2noCachedConnError = $pkg.http2noCachedConnError = $newType(0, $kindStruct, "http.http2noCachedConnError", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - http2RoundTripOpt = $pkg.http2RoundTripOpt = $newType(0, $kindStruct, "http.http2RoundTripOpt", true, "net/http", false, function(OnlyCachedConn_) { - this.$val = this; - if (arguments.length === 0) { - this.OnlyCachedConn = false; - return; - } - this.OnlyCachedConn = OnlyCachedConn_; - }); - http2ClientConnState = $pkg.http2ClientConnState = $newType(0, $kindStruct, "http.http2ClientConnState", true, "net/http", false, function(Closed_, Closing_, StreamsActive_, StreamsReserved_, StreamsPending_, MaxConcurrentStreams_, LastIdle_) { - this.$val = this; - if (arguments.length === 0) { - this.Closed = false; - this.Closing = false; - this.StreamsActive = 0; - this.StreamsReserved = 0; - this.StreamsPending = 0; - this.MaxConcurrentStreams = 0; - this.LastIdle = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - return; - } - this.Closed = Closed_; - this.Closing = Closing_; - this.StreamsActive = StreamsActive_; - this.StreamsReserved = StreamsReserved_; - this.StreamsPending = StreamsPending_; - this.MaxConcurrentStreams = MaxConcurrentStreams_; - this.LastIdle = LastIdle_; - }); - http2clientConnIdleState = $pkg.http2clientConnIdleState = $newType(0, $kindStruct, "http.http2clientConnIdleState", true, "net/http", false, function(canTakeNewRequest_) { - this.$val = this; - if (arguments.length === 0) { - this.canTakeNewRequest = false; - return; - } - this.canTakeNewRequest = canTakeNewRequest_; - }); - http2clientConnReadLoop = $pkg.http2clientConnReadLoop = $newType(0, $kindStruct, "http.http2clientConnReadLoop", true, "net/http", false, function(_$0_, cc_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.cc = ptrType$68.nil; - return; - } - this._$0 = _$0_; - this.cc = cc_; - }); - http2GoAwayError = $pkg.http2GoAwayError = $newType(0, $kindStruct, "http.http2GoAwayError", true, "net/http", false, function(LastStreamID_, ErrCode_, DebugData_) { - this.$val = this; - if (arguments.length === 0) { - this.LastStreamID = 0; - this.ErrCode = 0; - this.DebugData = ""; - return; - } - this.LastStreamID = LastStreamID_; - this.ErrCode = ErrCode_; - this.DebugData = DebugData_; - }); - http2transportResponseBody = $pkg.http2transportResponseBody = $newType(0, $kindStruct, "http.http2transportResponseBody", true, "net/http", false, function(cs_) { - this.$val = this; - if (arguments.length === 0) { - this.cs = ptrType$104.nil; - return; - } - this.cs = cs_; - }); - http2missingBody = $pkg.http2missingBody = $newType(0, $kindStruct, "http.http2missingBody", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - http2erringRoundTripper = $pkg.http2erringRoundTripper = $newType(0, $kindStruct, "http.http2erringRoundTripper", true, "net/http", false, function(err_) { - this.$val = this; - if (arguments.length === 0) { - this.err = $ifaceNil; - return; - } - this.err = err_; - }); - http2gzipReader = $pkg.http2gzipReader = $newType(0, $kindStruct, "http.http2gzipReader", true, "net/http", false, function(_$0_, body_, zr_, zerr_) { - this.$val = this; - if (arguments.length === 0) { - this._$0 = arrayType.zero(); - this.body = $ifaceNil; - this.zr = ptrType$33.nil; - this.zerr = $ifaceNil; - return; - } - this._$0 = _$0_; - this.body = body_; - this.zr = zr_; - this.zerr = zerr_; - }); - http2noDialH2RoundTripper = $pkg.http2noDialH2RoundTripper = $newType(0, $kindStruct, "http.http2noDialH2RoundTripper", true, "net/http", false, function(http2Transport_) { - this.$val = this; - if (arguments.length === 0) { - this.http2Transport = ptrType$102.nil; - return; - } - this.http2Transport = http2Transport_; - }); - http2writeFramer = $pkg.http2writeFramer = $newType(8, $kindInterface, "http.http2writeFramer", true, "net/http", false, null); - http2writeContext = $pkg.http2writeContext = $newType(8, $kindInterface, "http.http2writeContext", true, "net/http", false, null); - http2flushFrameWriter = $pkg.http2flushFrameWriter = $newType(0, $kindStruct, "http.http2flushFrameWriter", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - http2writeSettings = $pkg.http2writeSettings = $newType(12, $kindSlice, "http.http2writeSettings", true, "net/http", false, null); - http2writeGoAway = $pkg.http2writeGoAway = $newType(0, $kindStruct, "http.http2writeGoAway", true, "net/http", false, function(maxStreamID_, code_) { - this.$val = this; - if (arguments.length === 0) { - this.maxStreamID = 0; - this.code = 0; - return; - } - this.maxStreamID = maxStreamID_; - this.code = code_; - }); - http2writeData = $pkg.http2writeData = $newType(0, $kindStruct, "http.http2writeData", true, "net/http", false, function(streamID_, p_, endStream_) { - this.$val = this; - if (arguments.length === 0) { - this.streamID = 0; - this.p = sliceType$3.nil; - this.endStream = false; - return; - } - this.streamID = streamID_; - this.p = p_; - this.endStream = endStream_; - }); - http2handlerPanicRST = $pkg.http2handlerPanicRST = $newType(0, $kindStruct, "http.http2handlerPanicRST", true, "net/http", false, function(StreamID_) { - this.$val = this; - if (arguments.length === 0) { - this.StreamID = 0; - return; - } - this.StreamID = StreamID_; - }); - http2writePingAck = $pkg.http2writePingAck = $newType(0, $kindStruct, "http.http2writePingAck", true, "net/http", false, function(pf_) { - this.$val = this; - if (arguments.length === 0) { - this.pf = ptrType$81.nil; - return; - } - this.pf = pf_; - }); - http2writeSettingsAck = $pkg.http2writeSettingsAck = $newType(0, $kindStruct, "http.http2writeSettingsAck", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - http2writeResHeaders = $pkg.http2writeResHeaders = $newType(0, $kindStruct, "http.http2writeResHeaders", true, "net/http", false, function(streamID_, httpResCode_, h_, trailers_, endStream_, date_, contentType_, contentLength_) { - this.$val = this; - if (arguments.length === 0) { - this.streamID = 0; - this.httpResCode = 0; - this.h = false; - this.trailers = sliceType$2.nil; - this.endStream = false; - this.date = ""; - this.contentType = ""; - this.contentLength = ""; - return; - } - this.streamID = streamID_; - this.httpResCode = httpResCode_; - this.h = h_; - this.trailers = trailers_; - this.endStream = endStream_; - this.date = date_; - this.contentType = contentType_; - this.contentLength = contentLength_; - }); - http2writePushPromise = $pkg.http2writePushPromise = $newType(0, $kindStruct, "http.http2writePushPromise", true, "net/http", false, function(streamID_, method_, url_, h_, allocatePromisedID_, promisedID_) { - this.$val = this; - if (arguments.length === 0) { - this.streamID = 0; - this.method = ""; - this.url = ptrType$17.nil; - this.h = false; - this.allocatePromisedID = $throwNilPointerError; - this.promisedID = 0; - return; - } - this.streamID = streamID_; - this.method = method_; - this.url = url_; - this.h = h_; - this.allocatePromisedID = allocatePromisedID_; - this.promisedID = promisedID_; - }); - http2write100ContinueHeadersFrame = $pkg.http2write100ContinueHeadersFrame = $newType(0, $kindStruct, "http.http2write100ContinueHeadersFrame", true, "net/http", false, function(streamID_) { - this.$val = this; - if (arguments.length === 0) { - this.streamID = 0; - return; - } - this.streamID = streamID_; - }); - http2writeWindowUpdate = $pkg.http2writeWindowUpdate = $newType(0, $kindStruct, "http.http2writeWindowUpdate", true, "net/http", false, function(streamID_, n_) { - this.$val = this; - if (arguments.length === 0) { - this.streamID = 0; - this.n = 0; - return; - } - this.streamID = streamID_; - this.n = n_; - }); - http2WriteScheduler = $pkg.http2WriteScheduler = $newType(8, $kindInterface, "http.http2WriteScheduler", true, "net/http", false, null); - http2OpenStreamOptions = $pkg.http2OpenStreamOptions = $newType(0, $kindStruct, "http.http2OpenStreamOptions", true, "net/http", false, function(PusherID_) { - this.$val = this; - if (arguments.length === 0) { - this.PusherID = 0; - return; - } - this.PusherID = PusherID_; - }); - http2FrameWriteRequest = $pkg.http2FrameWriteRequest = $newType(0, $kindStruct, "http.http2FrameWriteRequest", true, "net/http", false, function(write_, stream_, done_) { - this.$val = this; - if (arguments.length === 0) { - this.write = $ifaceNil; - this.stream = ptrType$10.nil; - this.done = $chanNil; - return; - } - this.write = write_; - this.stream = stream_; - this.done = done_; - }); - http2writeQueue = $pkg.http2writeQueue = $newType(0, $kindStruct, "http.http2writeQueue", true, "net/http", false, function(s_) { - this.$val = this; - if (arguments.length === 0) { - this.s = sliceType$24.nil; - return; - } - this.s = s_; - }); - http2writeQueuePool = $pkg.http2writeQueuePool = $newType(12, $kindSlice, "http.http2writeQueuePool", true, "net/http", false, null); - http2PriorityWriteSchedulerConfig = $pkg.http2PriorityWriteSchedulerConfig = $newType(0, $kindStruct, "http.http2PriorityWriteSchedulerConfig", true, "net/http", false, function(MaxClosedNodesInTree_, MaxIdleNodesInTree_, ThrottleOutOfOrderWrites_) { - this.$val = this; - if (arguments.length === 0) { - this.MaxClosedNodesInTree = 0; - this.MaxIdleNodesInTree = 0; - this.ThrottleOutOfOrderWrites = false; - return; - } - this.MaxClosedNodesInTree = MaxClosedNodesInTree_; - this.MaxIdleNodesInTree = MaxIdleNodesInTree_; - this.ThrottleOutOfOrderWrites = ThrottleOutOfOrderWrites_; - }); - http2priorityNodeState = $pkg.http2priorityNodeState = $newType(4, $kindInt, "http.http2priorityNodeState", true, "net/http", false, null); - http2priorityNode = $pkg.http2priorityNode = $newType(0, $kindStruct, "http.http2priorityNode", true, "net/http", false, function(q_, id_, weight_, state_, bytes_, subtreeBytes_, parent_, kids_, prev_, next_) { - this.$val = this; - if (arguments.length === 0) { - this.q = new http2writeQueue.ptr(sliceType$24.nil); - this.id = 0; - this.weight = 0; - this.state = 0; - this.bytes = new $Int64(0, 0); - this.subtreeBytes = new $Int64(0, 0); - this.parent = ptrType$106.nil; - this.kids = ptrType$106.nil; - this.prev = ptrType$106.nil; - this.next = ptrType$106.nil; - return; - } - this.q = q_; - this.id = id_; - this.weight = weight_; - this.state = state_; - this.bytes = bytes_; - this.subtreeBytes = subtreeBytes_; - this.parent = parent_; - this.kids = kids_; - this.prev = prev_; - this.next = next_; - }); - http2sortPriorityNodeSiblings = $pkg.http2sortPriorityNodeSiblings = $newType(12, $kindSlice, "http.http2sortPriorityNodeSiblings", true, "net/http", false, null); - http2priorityWriteScheduler = $pkg.http2priorityWriteScheduler = $newType(0, $kindStruct, "http.http2priorityWriteScheduler", true, "net/http", false, function(root_, nodes_, maxID_, closedNodes_, idleNodes_, maxClosedNodesInTree_, maxIdleNodesInTree_, writeThrottleLimit_, enableWriteThrottle_, tmp_, queuePool_) { - this.$val = this; - if (arguments.length === 0) { - this.root = new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$24.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$106.nil, ptrType$106.nil, ptrType$106.nil, ptrType$106.nil); - this.nodes = false; - this.maxID = 0; - this.closedNodes = sliceType$25.nil; - this.idleNodes = sliceType$25.nil; - this.maxClosedNodesInTree = 0; - this.maxIdleNodesInTree = 0; - this.writeThrottleLimit = 0; - this.enableWriteThrottle = false; - this.tmp = sliceType$25.nil; - this.queuePool = http2writeQueuePool.nil; - return; - } - this.root = root_; - this.nodes = nodes_; - this.maxID = maxID_; - this.closedNodes = closedNodes_; - this.idleNodes = idleNodes_; - this.maxClosedNodesInTree = maxClosedNodesInTree_; - this.maxIdleNodesInTree = maxIdleNodesInTree_; - this.writeThrottleLimit = writeThrottleLimit_; - this.enableWriteThrottle = enableWriteThrottle_; - this.tmp = tmp_; - this.queuePool = queuePool_; - }); - http2randomWriteScheduler = $pkg.http2randomWriteScheduler = $newType(0, $kindStruct, "http.http2randomWriteScheduler", true, "net/http", false, function(zero_, sq_, queuePool_) { - this.$val = this; - if (arguments.length === 0) { - this.zero = new http2writeQueue.ptr(sliceType$24.nil); - this.sq = false; - this.queuePool = http2writeQueuePool.nil; - return; - } - this.zero = zero_; - this.sq = sq_; - this.queuePool = queuePool_; - }); - Cookie = $pkg.Cookie = $newType(0, $kindStruct, "http.Cookie", true, "net/http", true, function(Name_, Value_, Path_, Domain_, Expires_, RawExpires_, MaxAge_, Secure_, HttpOnly_, SameSite_, Raw_, Unparsed_) { - this.$val = this; - if (arguments.length === 0) { - this.Name = ""; - this.Value = ""; - this.Path = ""; - this.Domain = ""; - this.Expires = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - this.RawExpires = ""; - this.MaxAge = 0; - this.Secure = false; - this.HttpOnly = false; - this.SameSite = 0; - this.Raw = ""; - this.Unparsed = sliceType$2.nil; - return; - } - this.Name = Name_; - this.Value = Value_; - this.Path = Path_; - this.Domain = Domain_; - this.Expires = Expires_; - this.RawExpires = RawExpires_; - this.MaxAge = MaxAge_; - this.Secure = Secure_; - this.HttpOnly = HttpOnly_; - this.SameSite = SameSite_; - this.Raw = Raw_; - this.Unparsed = Unparsed_; - }); - SameSite = $pkg.SameSite = $newType(4, $kindInt, "http.SameSite", true, "net/http", true, null); - RoundTripper = $pkg.RoundTripper = $newType(8, $kindInterface, "http.RoundTripper", true, "net/http", true, null); - noTransport = $pkg.noTransport = $newType(0, $kindStruct, "http.noTransport", true, "net/http", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - XHRTransport = $pkg.XHRTransport = $newType(0, $kindStruct, "http.XHRTransport", true, "net/http", true, function(inflight_) { - this.$val = this; - if (arguments.length === 0) { - this.inflight = false; - return; - } - this.inflight = inflight_; - }); - requestTooLarger = $newType(8, $kindInterface, "http.requestTooLarger", true, "net/http", false, null); - baseContexter = $newType(8, $kindInterface, "http.baseContexter", true, "net/http", false, null); - I = $newType(8, $kindInterface, "http.I", true, "net/http", true, null); - ptrType = $ptrType(time.Location); - ptrType$1 = $ptrType(net.Resolver); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType(muxEntry); - ptrType$2 = $ptrType(sync.Mutex); - ptrType$3 = $ptrType(list.List); - ptrType$4 = $ptrType(tls.Config); - sliceType$2 = $sliceType($String); - sliceType$3 = $sliceType($Uint8); - sliceType$4 = $sliceType(sniffSig); - ptrType$6 = $ptrType(sliceType$3); - sliceType$5 = $sliceType(sliceType$3); - sliceType$6 = $sliceType(keyValues); - ptrType$9 = $ptrType(http2clientConnPool); - sliceType$7 = $sliceType($Int); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - ptrType$10 = $ptrType(http2stream); - ptrType$11 = $ptrType(Request); - ptrType$12 = $ptrType(http2requestBody); - ptrType$13 = $ptrType(http2serverConn); - ptrType$14 = $ptrType(bufio.Writer); - ptrType$15 = $ptrType(http2serverMessage); - chanType = $chanType($error, false, false); - ptrType$16 = $ptrType(http2responseWriter); - mapType = $mapType($String, RoundTripper); - ptrType$17 = $ptrType(url.URL); - ptrType$18 = $ptrType(Response); - ptrType$19 = $ptrType(httptrace.ClientTrace); - ptrType$20 = $ptrType(readTrackingBody); - ptrType$21 = $ptrType(url.Userinfo); - ptrType$22 = $ptrType(persistConn); - ptrType$23 = $ptrType(list.Element); - ptrType$24 = $ptrType(wantConn); - sliceType$8 = $sliceType(ptrType$24); - sliceType$9 = $sliceType(ptrType$22); - ptrType$25 = $ptrType(time.Timer); - structType = $structType("", []); - ptrType$26 = $ptrType($packages["crypto/x509"].Certificate); - sliceType$10 = $sliceType(ptrType$26); - sliceType$11 = $sliceType(sliceType$10); - ptrType$27 = $ptrType(Transport); - ptrType$28 = $ptrType(tls.ConnectionState); - ptrType$29 = $ptrType(bufio.Reader); - ptrType$30 = $ptrType(tls.Conn); - sliceType$12 = $sliceType(socksAuthMethod); - ptrType$31 = $ptrType(multipart.Form); - ptrType$32 = $ptrType(bodyEOFSignal); - ptrType$33 = $ptrType(gzip.Reader); - funcType$1 = $funcType([$String, sliceType], [], true); - sliceType$13 = $sliceType(tls.Certificate); - ptrType$34 = $ptrType($packages["crypto/x509"].CertPool); - sliceType$14 = $sliceType($Uint16); - arrayType$1 = $arrayType($Uint8, 32); - sliceType$15 = $sliceType(tls.CurveID); - sliceType$16 = $sliceType(tls.ticketKey); - ptrType$35 = $ptrType(transferWriter); - arrayType$2 = $arrayType($Uint8, 1); - sliceType$17 = $sliceType(io.Reader); - ptrType$36 = $ptrType(unsupportedTEError); - ptrType$37 = $ptrType(io.LimitedReader); - ptrType$38 = $ptrType(Header); - ptrType$39 = $ptrType(bytes.Reader); - ptrType$40 = $ptrType(bytes.Buffer); - ptrType$41 = $ptrType(strings.Reader); - ptrType$42 = $ptrType(socksAddr); - ptrType$43 = $ptrType(socksConn); - ptrType$44 = $ptrType(bufio.ReadWriter); - ptrType$45 = $ptrType($Int32); - ptrType$46 = $ptrType(Server); - ptrType$47 = $ptrType(connReader); - structType$1 = $structType("net/http", [{prop: "atomic", name: "atomic", embedded: false, exported: false, typ: $Uint64, tag: ""}]); - ptrType$48 = $ptrType(sync.Cond); - ptrType$49 = $ptrType(response); - ptrType$50 = $ptrType(sync.Pool); - ptrType$51 = $ptrType(atomicBool); - ptrType$52 = $ptrType(body); - ptrType$53 = $ptrType(conn); - arrayType$3 = $arrayType($Uint8, 29); - arrayType$4 = $arrayType($Uint8, 10); - arrayType$5 = $arrayType($Uint8, 3); - sliceType$18 = $sliceType($Uintptr); - ptrType$54 = $ptrType(runtime.Func); - ptrType$55 = $ptrType(expectContinueReader); - ptrType$56 = $ptrType($Uint64); - ptrType$57 = $ptrType(net.OpError); - arrayType$6 = $arrayType($Uint8, 5); - ptrType$58 = $ptrType(log.Logger); - sliceType$19 = $sliceType(funcType); - ptrType$59 = $ptrType(net.Listener); - ptrType$60 = $ptrType(http2serverInternalState); - ptrType$61 = $ptrType(http2PriorityWriteSchedulerConfig); - structType$2 = $structType("", [{prop: "Reader", name: "Reader", embedded: true, exported: true, typ: io.Reader, tag: ""}, {prop: "Closer", name: "Closer", embedded: true, exported: true, typ: io.Closer, tag: ""}]); - ptrType$62 = $ptrType(Cookie); - ptrType$63 = $ptrType(multipart.Reader); - ptrType$64 = $ptrType(textproto.Reader); - ptrType$65 = $ptrType(maxBytesReader); - ptrType$66 = $ptrType(multipart.FileHeader); - sliceType$20 = $sliceType(ptrType$66); - ptrType$67 = $ptrType(headerSorter); - ptrType$68 = $ptrType(http2ClientConn); - sliceType$21 = $sliceType(ptrType$68); - ptrType$69 = $ptrType(http2dialCall); - ptrType$70 = $ptrType(http2addConnCall); - ptrType$71 = $ptrType(http2flow); - ptrType$72 = $ptrType(http2Framer); - ptrType$73 = $ptrType(http2frameCache); - arrayType$7 = $arrayType($Uint8, 9); - ptrType$74 = $ptrType(hpack.Decoder); - ptrType$75 = $ptrType(http2HeadersFrame); - arrayType$8 = $arrayType($Uint8, 8); - sliceType$22 = $sliceType(hpack.HeaderField); - ptrType$76 = $ptrType(http2MetaHeadersFrame); - ptrType$77 = $ptrType(http2ContinuationFrame); - ptrType$78 = $ptrType(http2SettingsFrame); - ptrType$79 = $ptrType(http2DataFrame); - ptrType$80 = $ptrType(http2WindowUpdateFrame); - ptrType$81 = $ptrType(http2PingFrame); - ptrType$82 = $ptrType(http2GoAwayFrame); - ptrType$83 = $ptrType(http2RSTStreamFrame); - ptrType$84 = $ptrType(net.Dialer); - ptrType$85 = $ptrType($error); - ptrType$86 = $ptrType(http2Server); - ptrType$87 = $ptrType(http2ServeConnOpts); - ptrType$88 = $ptrType(http2bufferedWriter); - ptrType$89 = $ptrType(hpack.Encoder); - ptrType$90 = $ptrType(os.SyscallError); - funcType$2 = $funcType([$Int], [], false); - ptrType$91 = $ptrType(http2startPushRequest); - ptrType$92 = $ptrType(http2writeData); - ptrType$93 = $ptrType(http2writeResHeaders); - ptrType$94 = $ptrType(http2writePushPromise); - ptrType$95 = $ptrType(http2PriorityFrame); - ptrType$96 = $ptrType(http2PushPromiseFrame); - ptrType$97 = $ptrType(http2pipe); - ptrType$98 = $ptrType(http2closeWaiter); - ptrType$99 = $ptrType(http2responseWriterState); - ptrType$100 = $ptrType(http2sorter); - ptrType$101 = $ptrType(PushOptions); - ptrType$102 = $ptrType(http2Transport); - interfaceType = $interfaceType([{prop: "IsHTTP2NoCachedConnError", name: "IsHTTP2NoCachedConnError", pkg: "", typ: $funcType([], [], false)}]); - ptrType$103 = $ptrType($Uint32); - sliceType$23 = $sliceType(http2Setting); - ptrType$104 = $ptrType(http2clientStream); - sliceType$24 = $sliceType(http2FrameWriteRequest); - ptrType$105 = $ptrType(http2writeQueue); - ptrType$106 = $ptrType(http2priorityNode); - sliceType$25 = $sliceType(ptrType$106); - ptrType$107 = $ptrType(http2writeQueuePool); - ptrType$108 = $ptrType(sliceType$25); - sliceType$29 = $sliceType(ptrType$62); - ptrType$111 = $ptrType(strings.Builder); - ptrType$113 = $ptrType(js$1.Object); - funcType$3 = $funcType([ptrType$113], [], false); - ptrType$114 = $ptrType(transportRequest); - funcType$4 = $funcType([$error], [], false); - mapType$1 = $mapType(connectMethodKey, sliceType$9); - mapType$2 = $mapType(connectMethodKey, wantConnQueue); - mapType$3 = $mapType(cancelKey, funcType$4); - mapType$4 = $mapType(connectMethodKey, $Int); - funcType$5 = $funcType([ptrType$11], [ptrType$17, $error], false); - funcType$6 = $funcType([context.Context, $String, $String], [net.Conn, $error], false); - funcType$7 = $funcType([$String, $String], [net.Conn, $error], false); - funcType$8 = $funcType([$String, ptrType$30], [RoundTripper], false); - mapType$5 = $mapType($String, funcType$8); - funcType$9 = $funcType([context.Context, ptrType$17, $String], [Header, $error], false); - chanType$1 = $chanType(structType, false, false); - ptrType$115 = $ptrType(wantConnQueue); - ptrType$116 = $ptrType(connectMethod); - chanType$2 = $chanType(structType, false, true); - funcType$10 = $funcType([], [$Bool], false); - chanType$3 = $chanType(requestAndChan, false, false); - chanType$4 = $chanType(writeRequest, false, false); - funcType$11 = $funcType([Header], [], false); - ptrType$117 = $ptrType(readWriteCloserBody); - chanType$5 = $chanType(responseAndError, false, false); - chanType$6 = $chanType(structType, true, false); - chanType$7 = $chanType($error, true, false); - ptrType$118 = $ptrType(httpError); - funcType$12 = $funcType([$error], [$error], false); - funcType$13 = $funcType([], [$error], false); - ptrType$119 = $ptrType(gzipReader); - ptrType$120 = $ptrType(connLRU); - mapType$6 = $mapType(ptrType$22, ptrType$23); - ptrType$121 = $ptrType(byteReader); - chanType$8 = $chanType(readResult, false, false); - ptrType$122 = $ptrType(transferReader); - ptrType$123 = $ptrType(socksDialer); - funcType$14 = $funcType([context.Context, io.ReadWriter, socksAuthMethod], [$error], false); - ptrType$124 = $ptrType(socksUsernamePassword); - ptrType$125 = $ptrType(exactSig); - ptrType$126 = $ptrType(maskedSig); - chanType$9 = $chanType($Bool, false, true); - ptrType$127 = $ptrType(chunkWriter); - chanType$10 = $chanType($Bool, false, false); - ptrType$128 = $ptrType(redirectHandler); - funcType$15 = $funcType([ResponseWriter, ptrType$11], [], false); - ptrType$129 = $ptrType(ServeMux); - mapType$7 = $mapType($String, muxEntry); - funcType$16 = $funcType([ptrType$46, ptrType$30, Handler], [], false); - mapType$8 = $mapType($String, funcType$16); - funcType$17 = $funcType([net.Conn, ConnState], [], false); - funcType$18 = $funcType([net.Listener], [context.Context], false); - funcType$19 = $funcType([context.Context, net.Conn], [context.Context], false); - mapType$9 = $mapType(ptrType$59, structType); - mapType$10 = $mapType(ptrType$53, structType); - ptrType$131 = $ptrType(onceCloseListener); - ptrType$132 = $ptrType(loggingConn); - ptrType$133 = $ptrType(streamReader); - ptrType$134 = $ptrType(arrayReader); - ptrType$135 = $ptrType(ProtocolError); - funcType$20 = $funcType([], [io.ReadCloser, $error], false); - ptrType$136 = $ptrType(contextKey); - mapType$11 = $mapType($String, $Bool); - mapType$12 = $mapType($String, sliceType$21); - mapType$13 = $mapType($String, ptrType$69); - mapType$14 = $mapType(ptrType$68, sliceType$2); - mapType$15 = $mapType($String, ptrType$70); - ptrType$137 = $ptrType(http2dataBuffer); - funcType$21 = $funcType([$String], [], false); - ptrType$138 = $ptrType(http2FrameHeader); - funcType$22 = $funcType([$Uint32], [sliceType$3], false); - funcType$23 = $funcType([http2Setting], [$error], false); - ptrType$139 = $ptrType(http2UnknownFrame); - ptrType$140 = $ptrType(http2httpError); - funcType$24 = $funcType([], [http2WriteScheduler], false); - mapType$16 = $mapType(ptrType$13, structType); - chanType$11 = $chanType(http2readFrameResult, false, false); - chanType$12 = $chanType(http2FrameWriteRequest, false, false); - chanType$13 = $chanType(http2frameWriteResult, false, false); - chanType$14 = $chanType(http2bodyReadMsg, false, false); - chanType$15 = $chanType($emptyInterface, false, false); - mapType$17 = $mapType($Uint32, ptrType$10); - mapType$18 = $mapType($String, $String); - funcType$25 = $funcType([$String, $String, ptrType$4], [net.Conn, $error], false); - mapType$19 = $mapType($Uint32, ptrType$104); - mapType$20 = $mapType(arrayType$8, chanType$1); - funcType$26 = $funcType([$Int, textproto.MIMEHeader], [$error], false); - ptrType$141 = $ptrType(http2clientConnReadLoop); - ptrType$142 = $ptrType(http2gzipReader); - ptrType$143 = $ptrType(http2writeGoAway); - funcType$27 = $funcType([], [$Uint32, $error], false); - ptrType$144 = $ptrType(http2FrameWriteRequest); - funcType$28 = $funcType([ptrType$106, $Bool], [$Bool], false); - ptrType$145 = $ptrType(http2priorityWriteScheduler); - mapType$21 = $mapType($Uint32, ptrType$106); - ptrType$146 = $ptrType(http2randomWriteScheduler); - mapType$22 = $mapType($Uint32, ptrType$105); - ptrType$151 = $ptrType(XHRTransport); - mapType$23 = $mapType(ptrType$11, ptrType$113); - defaultTransportDialContext = function(dialer) { - var dialer; - return $throwNilPointerError; - }; - Transport.ptr.prototype.writeBufferSize = function() { - var t; - t = this; - if (t.WriteBufferSize > 0) { - return t.WriteBufferSize; - } - return 4096; - }; - Transport.prototype.writeBufferSize = function() { return this.$val.writeBufferSize(); }; - Transport.ptr.prototype.readBufferSize = function() { - var t; - t = this; - if (t.ReadBufferSize > 0) { - return t.ReadBufferSize; - } - return 4096; - }; - Transport.prototype.readBufferSize = function() { return this.$val.readBufferSize(); }; - Transport.ptr.prototype.Clone = function() { - var {_entry, _i, _key, _keys, _r$1, _ref, k, npm, t, t2, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - $r = t.nextProtoOnce.Do($methodVal(t, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - t2 = new Transport.ptr(new sync.Mutex.ptr(0, 0), false, false, false, new connLRU.ptr(ptrType$3.nil, false), new sync.Mutex.ptr(0, 0), false, new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), new sync.Mutex.ptr(0, 0), false, false, t.Proxy, t.DialContext, t.Dial, t.DialTLSContext, t.DialTLS, ptrType$4.nil, t.TLSHandshakeTimeout, t.DisableKeepAlives, t.DisableCompression, t.MaxIdleConns, t.MaxIdleConnsPerHost, t.MaxConnsPerHost, t.IdleConnTimeout, t.ResponseHeaderTimeout, t.ExpectContinueTimeout, false, new Header(t.ProxyConnectHeader).Clone(), t.GetProxyConnectHeader, t.MaxResponseHeaderBytes, t.WriteBufferSize, t.ReadBufferSize, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil, false, t.ForceAttemptHTTP2); - /* */ if (!(t.TLSClientConfig === ptrType$4.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(t.TLSClientConfig === ptrType$4.nil)) { */ case 2: - _r$1 = t.TLSClientConfig.Clone(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t2.TLSClientConfig = _r$1; - /* } */ case 3: - if (!t.tlsNextProtoWasNil) { - npm = $makeMap($String.keyFor, []); - _ref = t.TLSNextProto; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - v = _entry.v; - _key = k; (npm || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - _i++; - } - t2.TLSNextProto = npm; - } - $s = -1; return t2; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.Clone, $c: true, $r, _entry, _i, _key, _keys, _r$1, _ref, k, npm, t, t2, v, $s};return $f; - }; - Transport.prototype.Clone = function() { return this.$val.Clone(); }; - Transport.ptr.prototype.hasCustomTLSDialer = function() { - var t; - t = this; - return !(t.DialTLS === $throwNilPointerError) || !(t.DialTLSContext === $throwNilPointerError); - }; - Transport.prototype.hasCustomTLSDialer = function() { return this.$val.hasCustomTLSDialer(); }; - Transport.ptr.prototype.onceSetNextProtoDefaults = function() { - var {_entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, _v, _v$1, altProto, err, h2i, limit1, ok, rv, t, t2, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - t.tlsNextProtoWasNil = t.TLSNextProto === false; - _r$1 = godebug.Get("http2client"); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1 === "0") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$1 === "0") { */ case 1: - $s = -1; return; - /* } */ case 2: - _tuple = $assertType(t.altProto.Load(), mapType, true); - altProto = _tuple[0]; - _r$2 = reflect.ValueOf((_entry = altProto[$String.keyFor("https")], _entry !== undefined ? _entry.v : $ifaceNil)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - rv = _r$2; - if (!($clone(rv, reflect.Value).IsValid())) { _v$1 = false; $s = 8; continue s; } - _r$3 = $clone(rv, reflect.Value).Type().Kind(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v$1 = _r$3 === 25; case 8: - if (!(_v$1)) { _v = false; $s = 7; continue s; } - _r$4 = $clone(rv, reflect.Value).Type().NumField(); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4 === 1; case 7: - /* */ if (_v) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_v) { */ case 5: - _r$5 = $clone(rv, reflect.Value).Field(0); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - v = _r$5; - /* */ if ($clone(v, reflect.Value).CanInterface()) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($clone(v, reflect.Value).CanInterface()) { */ case 12: - _r$6 = $clone(v, reflect.Value).Interface(); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = $assertType(_r$6, h2Transport, true); - h2i = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - t.h2transport = h2i; - $s = -1; return; - } - /* } */ case 13: - /* } */ case 6: - if (!(t.TLSNextProto === false)) { - $s = -1; return; - } - if (!t.ForceAttemptHTTP2 && (!(t.TLSClientConfig === ptrType$4.nil) || !(t.Dial === $throwNilPointerError) || !(t.DialContext === $throwNilPointerError) || t.hasCustomTLSDialer())) { - $s = -1; return; - } - if (omitBundledHTTP2) { - $s = -1; return; - } - _r$7 = http2configureTransports(t); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$2 = _r$7; - t2 = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 16: - $r = log.Printf("Error enabling Transport HTTP/2 support: %v", new sliceType([err])); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 17: - t.h2transport = t2; - limit1 = t.MaxResponseHeaderBytes; - if (!((limit1.$high === 0 && limit1.$low === 0)) && (t2.MaxHeaderListSize === 0)) { - if ((limit1.$high > 0 || (limit1.$high === 0 && limit1.$low >= 4294967295))) { - t2.MaxHeaderListSize = 4294967295; - } else { - t2.MaxHeaderListSize = ((limit1.$low >>> 0)); - } - } - $s = -1; return; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.onceSetNextProtoDefaults, $c: true, $r, _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, _tuple$1, _tuple$2, _v, _v$1, altProto, err, h2i, limit1, ok, rv, t, t2, v, $s};return $f; - }; - Transport.prototype.onceSetNextProtoDefaults = function() { return this.$val.onceSetNextProtoDefaults(); }; - ProxyFromEnvironment = function(req) { - var {$24r, _r$1, _r$2, req, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = envProxyFunc(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1(req.URL); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: ProxyFromEnvironment, $c: true, $r, $24r, _r$1, _r$2, req, $s};return $f; - }; - $pkg.ProxyFromEnvironment = ProxyFromEnvironment; - transportRequest.ptr.prototype.extraHeaders = function() { - var tr; - tr = this; - if (tr.extra === false) { - tr.extra = {}; - } - return tr.extra; - }; - transportRequest.prototype.extraHeaders = function() { return this.$val.extraHeaders(); }; - transportRequest.ptr.prototype.setError = function(err) { - var {err, tr, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - tr = this; - $r = tr.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ($interfaceIsEqual(tr.err, $ifaceNil)) { - tr.err = err; - } - $r = tr.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: transportRequest.ptr.prototype.setError, $c: true, $r, err, tr, $s};return $f; - }; - transportRequest.prototype.setError = function(err) { return this.$val.setError(err); }; - Transport.ptr.prototype.useRegisteredProtocol = function(req) { - var {_r$1, _v, req, t, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!(req.URL.Scheme === "https")) { _v = false; $s = 3; continue s; } - _r$1 = req.requiresHTTP1(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return false; - /* } */ case 2: - $s = -1; return true; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.useRegisteredProtocol, $c: true, $r, _r$1, _v, req, t, $s};return $f; - }; - Transport.prototype.useRegisteredProtocol = function(req) { return this.$val.useRegisteredProtocol(req); }; - Transport.ptr.prototype.alternateRoundTripper = function(req) { - var {_entry, _r$1, _tuple, altProto, req, t, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.useRegisteredProtocol(req); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$1) { */ case 1: - $s = -1; return $ifaceNil; - /* } */ case 2: - _tuple = $assertType(t.altProto.Load(), mapType, true); - altProto = _tuple[0]; - $s = -1; return (_entry = altProto[$String.keyFor(req.URL.Scheme)], _entry !== undefined ? _entry.v : $ifaceNil); - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.alternateRoundTripper, $c: true, $r, _entry, _r$1, _tuple, altProto, req, t, $s};return $f; - }; - Transport.prototype.alternateRoundTripper = function(req) { return this.$val.alternateRoundTripper(req); }; - Transport.ptr.prototype.roundTrip = function(req) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _entry, _i, _i$1, _keys, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _v, altRT, cancelKey$1, cm, ctx, e, e$1, err, err$1, err$2, isHTTP, k, ok, ok$1, origReq, pconn, req, resp, resp$1, scheme, t, trace, treq, v, vv, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - $r = t.nextProtoOnce.Do($methodVal(t, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ctx = req.Context(); - _r$1 = httptrace.ContextClientTrace(ctx); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - trace = _r$1; - /* */ if (req.URL === ptrType$17.nil) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (req.URL === ptrType$17.nil) { */ case 3: - _r$2 = req.closeBody(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return [ptrType$18.nil, errors.New("http: nil Request.URL")]; - /* } */ case 4: - /* */ if (req.Header === false) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (req.Header === false) { */ case 6: - _r$3 = req.closeBody(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return [ptrType$18.nil, errors.New("http: nil Request.Header")]; - /* } */ case 7: - scheme = req.URL.Scheme; - isHTTP = scheme === "http" || scheme === "https"; - /* */ if (isHTTP) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (isHTTP) { */ case 9: - _ref = req.Header; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 11: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 12; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 11; continue; - } - k = _entry.k; - vv = _entry.v; - /* */ if (!httpguts.ValidHeaderFieldName(k)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!httpguts.ValidHeaderFieldName(k)) { */ case 13: - _r$4 = req.closeBody(); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = fmt.Errorf("net/http: invalid header field name %q", new sliceType([new $String(k)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r = [ptrType$18.nil, _r$5]; - $s = 17; case 17: return $24r; - /* } */ case 14: - _ref$1 = vv; - _i$1 = 0; - /* while (true) { */ case 18: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 19; continue; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - /* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 20: - _r$6 = req.closeBody(); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = fmt.Errorf("net/http: invalid header field value %q for key %v", new sliceType([new $String(v), new $String(k)])); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$1 = [ptrType$18.nil, _r$7]; - $s = 24; case 24: return $24r$1; - /* } */ case 21: - _i$1++; - $s = 18; continue; - case 19: - _i++; - $s = 11; continue; - case 12: - /* } */ case 10: - origReq = req; - cancelKey$1 = new cancelKey.ptr(origReq); - req = setupRewindBody(req); - _r$8 = t.alternateRoundTripper(req); /* */ $s = 25; case 25: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - altRT = _r$8; - /* */ if (!($interfaceIsEqual(altRT, $ifaceNil))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!($interfaceIsEqual(altRT, $ifaceNil))) { */ case 26: - _r$9 = altRT.RoundTrip(req); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - resp = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $pkg.ErrSkipAltProtocol))) { - $s = -1; return [resp, err]; - } - err$1 = $ifaceNil; - _r$10 = rewindBody(req); /* */ $s = 29; case 29: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$1 = _r$10; - req = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$18.nil, err$1]; - } - /* } */ case 27: - /* */ if (!isHTTP) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!isHTTP) { */ case 30: - _r$11 = req.closeBody(); /* */ $s = 32; case 32: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - _r$12 = badStringError("unsupported protocol scheme", scheme); /* */ $s = 33; case 33: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $24r$2 = [ptrType$18.nil, _r$12]; - $s = 34; case 34: return $24r$2; - /* } */ case 31: - if (!(!(req.Method === ""))) { _v = false; $s = 37; continue s; } - _r$13 = validMethod(req.Method); /* */ $s = 38; case 38: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _v = !_r$13; case 37: - /* */ if (_v) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (_v) { */ case 35: - _r$14 = req.closeBody(); /* */ $s = 39; case 39: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = fmt.Errorf("net/http: invalid method %q", new sliceType([new $String(req.Method)])); /* */ $s = 40; case 40: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - $24r$3 = [ptrType$18.nil, _r$15]; - $s = 41; case 41: return $24r$3; - /* } */ case 36: - /* */ if (req.URL.Host === "") { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (req.URL.Host === "") { */ case 42: - _r$16 = req.closeBody(); /* */ $s = 44; case 44: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _r$16; - $s = -1; return [ptrType$18.nil, errors.New("http: no Host in request URL")]; - /* } */ case 43: - /* while (true) { */ case 45: - _r$17 = ctx.Done(); /* */ $s = 47; case 47: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _selection = $select([[_r$17], []]); - /* */ if (_selection[0] === 0) { $s = 48; continue; } - /* */ if (_selection[0] === 1) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (_selection[0] === 0) { */ case 48: - _r$18 = req.closeBody(); /* */ $s = 51; case 51: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _r$18; - _r$19 = ctx.Err(); /* */ $s = 52; case 52: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $24r$4 = [ptrType$18.nil, _r$19]; - $s = 53; case 53: return $24r$4; - /* } else if (_selection[0] === 1) { */ case 49: - /* } */ case 50: - treq = new transportRequest.ptr(req, false, trace, $clone(cancelKey$1, cancelKey), new sync.Mutex.ptr(0, 0), $ifaceNil); - _r$20 = t.connectMethodForRequest(treq); /* */ $s = 54; case 54: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _tuple$2 = _r$20; - cm = $clone(_tuple$2[0], connectMethod); - err$2 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 55: - _r$21 = req.closeBody(); /* */ $s = 57; case 57: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - $s = -1; return [ptrType$18.nil, err$2]; - /* } */ case 56: - _r$22 = t.getConn(treq, $clone(cm, connectMethod)); /* */ $s = 58; case 58: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _tuple$3 = _r$22; - pconn = _tuple$3[0]; - err$2 = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 59: - $r = t.setReqCanceler($clone(cancelKey$1, cancelKey), $throwNilPointerError); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$23 = req.closeBody(); /* */ $s = 62; case 62: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$23; - $s = -1; return [ptrType$18.nil, err$2]; - /* } */ case 60: - resp$1 = ptrType$18.nil; - /* */ if (!($interfaceIsEqual(pconn.alt, $ifaceNil))) { $s = 63; continue; } - /* */ $s = 64; continue; - /* if (!($interfaceIsEqual(pconn.alt, $ifaceNil))) { */ case 63: - $r = t.setReqCanceler($clone(cancelKey$1, cancelKey), $throwNilPointerError); /* */ $s = 66; case 66: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$24 = pconn.alt.RoundTrip(req); /* */ $s = 67; case 67: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _tuple$4 = _r$24; - resp$1 = _tuple$4[0]; - err$2 = _tuple$4[1]; - $s = 65; continue; - /* } else { */ case 64: - _r$25 = pconn.roundTrip(treq); /* */ $s = 68; case 68: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _tuple$5 = _r$25; - resp$1 = _tuple$5[0]; - err$2 = _tuple$5[1]; - /* } */ case 65: - if ($interfaceIsEqual(err$2, $ifaceNil)) { - resp$1.Request = origReq; - $s = -1; return [resp$1, $ifaceNil]; - } - /* */ if (http2isNoCachedConnError(err$2)) { $s = 69; continue; } - _r$26 = pconn.shouldRetryRequest(req, err$2); /* */ $s = 72; case 72: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - /* */ if (!_r$26) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if (http2isNoCachedConnError(err$2)) { */ case 69: - _r$27 = t.removeIdleConn(pconn); /* */ $s = 75; case 75: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* */ if (_r$27) { $s = 73; continue; } - /* */ $s = 74; continue; - /* if (_r$27) { */ case 73: - $r = t.decConnsPerHost($clone(pconn.cacheKey, connectMethodKey)); /* */ $s = 76; case 76: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 74: - $s = 71; continue; - /* } else if (!_r$26) { */ case 70: - _tuple$6 = $assertType(err$2, nothingWrittenError, true); - e = $clone(_tuple$6[0], nothingWrittenError); - ok = _tuple$6[1]; - if (ok) { - err$2 = e.error; - } - _tuple$7 = $assertType(err$2, transportReadFromServerError, true); - e$1 = $clone(_tuple$7[0], transportReadFromServerError); - ok$1 = _tuple$7[1]; - if (ok$1) { - err$2 = e$1.err; - } - $s = -1; return [ptrType$18.nil, err$2]; - /* } */ case 71: - $r = testHookRoundTripRetried(); /* */ $s = 77; case 77: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$28 = rewindBody(req); /* */ $s = 78; case 78: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _tuple$8 = _r$28; - req = _tuple$8[0]; - err$2 = _tuple$8[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [ptrType$18.nil, err$2]; - } - $s = 45; continue; - case 46: - $s = -1; return [ptrType$18.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.roundTrip, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _entry, _i, _i$1, _keys, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _selection, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _v, altRT, cancelKey$1, cm, ctx, e, e$1, err, err$1, err$2, isHTTP, k, ok, ok$1, origReq, pconn, req, resp, resp$1, scheme, t, trace, treq, v, vv, $s};return $f; - }; - Transport.prototype.roundTrip = function(req) { return this.$val.roundTrip(req); }; - readTrackingBody.ptr.prototype.Read = function(data) { - var {$24r, _r$1, data, r, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - r.didRead = true; - _r$1 = r.ReadCloser.Read(data); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: readTrackingBody.ptr.prototype.Read, $c: true, $r, $24r, _r$1, data, r, $s};return $f; - }; - readTrackingBody.prototype.Read = function(data) { return this.$val.Read(data); }; - readTrackingBody.ptr.prototype.Close = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - r.didClose = true; - _r$1 = r.ReadCloser.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: readTrackingBody.ptr.prototype.Close, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - readTrackingBody.prototype.Close = function() { return this.$val.Close(); }; - setupRewindBody = function(req) { - var newReq, req; - if ($interfaceIsEqual(req.Body, $ifaceNil) || $interfaceIsEqual(req.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { - return req; - } - newReq = $clone(req, Request); - newReq.Body = new readTrackingBody.ptr(req.Body, false, false); - return newReq; - }; - rewindBody = function(req) { - var {_r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, body$1, err, newReq, req, rewound, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - newReq = [newReq]; - rewound = ptrType$11.nil; - err = $ifaceNil; - if ($interfaceIsEqual(req.Body, $ifaceNil) || $interfaceIsEqual(req.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody)) || (!$assertType(req.Body, ptrType$20).didRead && !$assertType(req.Body, ptrType$20).didClose)) { - _tmp = req; - _tmp$1 = $ifaceNil; - rewound = _tmp; - err = _tmp$1; - $s = -1; return [rewound, err]; - } - /* */ if (!$assertType(req.Body, ptrType$20).didClose) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!$assertType(req.Body, ptrType$20).didClose) { */ case 1: - _r$1 = req.closeBody(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 2: - if (req.GetBody === $throwNilPointerError) { - _tmp$2 = ptrType$11.nil; - _tmp$3 = errCannotRewind; - rewound = _tmp$2; - err = _tmp$3; - $s = -1; return [rewound, err]; - } - _r$2 = req.GetBody(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - body$1 = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$4 = ptrType$11.nil; - _tmp$5 = err; - rewound = _tmp$4; - err = _tmp$5; - $s = -1; return [rewound, err]; - } - newReq[0] = $clone(req, Request); - newReq[0].Body = new readTrackingBody.ptr(body$1, false, false); - _tmp$6 = newReq[0]; - _tmp$7 = $ifaceNil; - rewound = _tmp$6; - err = _tmp$7; - $s = -1; return [rewound, err]; - /* */ } return; } var $f = {$blk: rewindBody, $c: true, $r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, body$1, err, newReq, req, rewound, $s};return $f; - }; - persistConn.ptr.prototype.shouldRetryRequest = function(req, err) { - var {_r$1, _tuple, _tuple$1, err, ok, ok$1, pc, req, x$5, $s, $r, $c} = $restore(this, {req, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - if (http2isNoCachedConnError(err)) { - $s = -1; return true; - } - if ($interfaceIsEqual(err, errMissingHost)) { - $s = -1; return false; - } - _r$1 = pc.isReused(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$1) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _tuple = $assertType(err, nothingWrittenError, true); - ok = _tuple[1]; - if (ok) { - $s = -1; return (x$5 = req.outgoingLength(), (x$5.$high === 0 && x$5.$low === 0)) || !(req.GetBody === $throwNilPointerError); - } - if (!req.isReplayable()) { - $s = -1; return false; - } - _tuple$1 = $assertType(err, transportReadFromServerError, true); - ok$1 = _tuple$1[1]; - if (ok$1) { - $s = -1; return true; - } - if ($interfaceIsEqual(err, errServerClosedIdle)) { - $s = -1; return true; - } - $s = -1; return false; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.shouldRetryRequest, $c: true, $r, _r$1, _tuple, _tuple$1, err, ok, ok$1, pc, req, x$5, $s};return $f; - }; - persistConn.prototype.shouldRetryRequest = function(req, err) { return this.$val.shouldRetryRequest(req, err); }; - Transport.ptr.prototype.RegisterProtocol = function(scheme, rt) { - var {_entry, _entry$1, _i, _key, _key$1, _keys, _ref, _tuple, _tuple$1, exists, k, newMap, oldMap, rt, scheme, t, v, $s, $deferred, $r, $c} = $restore(this, {scheme, rt}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $r = t.altMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.altMu, "Unlock"), []]); - _tuple = $assertType(t.altProto.Load(), mapType, true); - oldMap = _tuple[0]; - _tuple$1 = (_entry = oldMap[$String.keyFor(scheme)], _entry !== undefined ? [_entry.v, true] : [$ifaceNil, false]); - exists = _tuple$1[1]; - if (exists) { - $panic(new $String("protocol " + scheme + " already registered")); - } - newMap = {}; - _ref = oldMap; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry$1 = _ref[_keys[_i]]; - if (_entry$1 === undefined) { - _i++; - continue; - } - k = _entry$1.k; - v = _entry$1.v; - _key = k; (newMap || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - _i++; - } - _key$1 = scheme; (newMap || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: rt }; - t.altProto.Store(new mapType(newMap)); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.RegisterProtocol, $c: true, $r, _entry, _entry$1, _i, _key, _key$1, _keys, _ref, _tuple, _tuple$1, exists, k, newMap, oldMap, rt, scheme, t, v, $s, $deferred};return $f; } } - }; - Transport.prototype.RegisterProtocol = function(scheme, rt) { return this.$val.RegisterProtocol(scheme, rt); }; - Transport.ptr.prototype.CloseIdleConnections = function() { - var {_entry, _i, _i$1, _keys, _ref, _ref$1, conns, m, pconn, t, t2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - $r = t.nextProtoOnce.Do($methodVal(t, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = t.idleMu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m = t.idleConn; - t.idleConn = false; - t.closeIdle = true; - connLRU.copy(t.idleLRU, new connLRU.ptr(ptrType$3.nil, false)); - $r = t.idleMu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = m; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 4: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 5; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 4; continue; - } - conns = _entry.v; - _ref$1 = conns; - _i$1 = 0; - /* while (true) { */ case 6: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 7; continue; } - pconn = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $r = pconn.close(errCloseIdleConns); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 6; continue; - case 7: - _i++; - $s = 4; continue; - case 5: - t2 = t.h2transport; - /* */ if (!($interfaceIsEqual(t2, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(t2, $ifaceNil))) { */ case 9: - $r = t2.CloseIdleConnections(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.CloseIdleConnections, $c: true, $r, _entry, _i, _i$1, _keys, _ref, _ref$1, conns, m, pconn, t, t2, $s};return $f; - }; - Transport.prototype.CloseIdleConnections = function() { return this.$val.CloseIdleConnections(); }; - Transport.ptr.prototype.CancelRequest = function(req) { - var {_r$1, req, t, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.cancelRequest(new cancelKey.ptr(req), errRequestCanceled); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.CancelRequest, $c: true, $r, _r$1, req, t, $s};return $f; - }; - Transport.prototype.CancelRequest = function(req) { return this.$val.CancelRequest(req); }; - Transport.ptr.prototype.cancelRequest = function(key, err) { - var {$24r, _entry, cancel, err, key, t, $s, $deferred, $r, $c} = $restore(this, {key, err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $r = t.reqMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.reqMu, "Unlock"), []]); - cancel = (_entry = t.reqCanceler[cancelKey.keyFor(key)], _entry !== undefined ? _entry.v : $throwNilPointerError); - delete t.reqCanceler[cancelKey.keyFor(key)]; - /* */ if (!(cancel === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(cancel === $throwNilPointerError)) { */ case 2: - $r = cancel(err); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $24r = !(cancel === $throwNilPointerError); - $s = 5; case 5: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.cancelRequest, $c: true, $r, $24r, _entry, cancel, err, key, t, $s, $deferred};return $f; } } - }; - Transport.prototype.cancelRequest = function(key, err) { return this.$val.cancelRequest(key, err); }; - envProxyFunc = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = envProxyOnce.Do((function $b() { - var {_r$1, _r$2, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = httpproxy.FromEnvironment(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.ProxyFunc(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - envProxyFuncValue = _r$2; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _r$2, $s};return $f; - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return envProxyFuncValue; - /* */ } return; } var $f = {$blk: envProxyFunc, $c: true, $r, $s};return $f; - }; - Transport.ptr.prototype.connectMethodForRequest = function(treq) { - var {_r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, cm, err, t, treq, $s, $r, $c} = $restore(this, {treq}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cm = new connectMethod.ptr(arrayType.zero(), ptrType$17.nil, "", "", false); - err = $ifaceNil; - t = this; - cm.targetScheme = treq.Request.URL.Scheme; - _r$1 = canonicalAddr(treq.Request.URL); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cm.targetAddr = _r$1; - /* */ if (!(t.Proxy === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(t.Proxy === $throwNilPointerError)) { */ case 2: - _r$2 = t.Proxy(treq.Request); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - cm.proxyURL = _tuple[0]; - err = _tuple[1]; - /* } */ case 3: - _r$3 = treq.Request.requiresHTTP1(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - cm.onlyH1 = _r$3; - _tmp = $clone(cm, connectMethod); - _tmp$1 = err; - connectMethod.copy(cm, _tmp); - err = _tmp$1; - $s = -1; return [cm, err]; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.connectMethodForRequest, $c: true, $r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tuple, cm, err, t, treq, $s};return $f; - }; - Transport.prototype.connectMethodForRequest = function(treq) { return this.$val.connectMethodForRequest(treq); }; - connectMethod.ptr.prototype.proxyAuth = function() { - var _tuple, cm, password, u, username; - cm = this; - if (cm.proxyURL === ptrType$17.nil) { - return ""; - } - u = cm.proxyURL.User; - if (!(u === ptrType$21.nil)) { - username = u.Username(); - _tuple = u.Password(); - password = _tuple[0]; - return "Basic " + basicAuth(username, password); - } - return ""; - }; - connectMethod.prototype.proxyAuth = function() { return this.$val.proxyAuth(); }; - transportReadFromServerError.ptr.prototype.Unwrap = function() { - var e; - e = this; - return e.err; - }; - transportReadFromServerError.prototype.Unwrap = function() { return this.$val.Unwrap(); }; - transportReadFromServerError.ptr.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$1 = fmt.Sprintf("net/http: Transport failed to read from server: %v", new sliceType([e.err])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: transportReadFromServerError.ptr.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - transportReadFromServerError.prototype.Error = function() { return this.$val.Error(); }; - Transport.ptr.prototype.putOrCloseIdleConn = function(pconn) { - var {_r$1, err, pconn, t, $s, $r, $c} = $restore(this, {pconn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.tryPutIdleConn(pconn); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $r = pconn.close(err); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.putOrCloseIdleConn, $c: true, $r, _r$1, err, pconn, t, $s};return $f; - }; - Transport.prototype.putOrCloseIdleConn = function(pconn) { return this.$val.putOrCloseIdleConn(pconn); }; - Transport.ptr.prototype.maxIdleConnsPerHost = function() { - var t, v; - t = this; - v = t.MaxIdleConnsPerHost; - if (!((v === 0))) { - return v; - } - return 2; - }; - Transport.prototype.maxIdleConnsPerHost = function() { return this.$val.maxIdleConnsPerHost(); }; - Transport.ptr.prototype.tryPutIdleConn = function(pconn) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _entry, _entry$1, _entry$2, _i, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, done, exist, idles, key, ok, oldest, pconn, q, t, w, w$1, x$5, $s, $deferred, $r, $c} = $restore(this, {pconn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - /* */ if (t.DisableKeepAlives || t.MaxIdleConnsPerHost < 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (t.DisableKeepAlives || t.MaxIdleConnsPerHost < 0) { */ case 1: - $24r = errKeepAlivesDisabled; - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = pconn.isBroken(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$1) { */ case 4: - $24r$1 = errConnBroken; - $s = 7; case 7: return $24r$1; - /* } */ case 5: - $r = pconn.markReused(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = t.idleMu.Lock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); - /* */ if (!($interfaceIsEqual(pconn.alt, $ifaceNil)) && !((_entry = t.idleLRU.m[ptrType$22.keyFor(pconn)], _entry !== undefined ? _entry.v : ptrType$23.nil) === ptrType$23.nil)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(pconn.alt, $ifaceNil)) && !((_entry = t.idleLRU.m[ptrType$22.keyFor(pconn)], _entry !== undefined ? _entry.v : ptrType$23.nil) === ptrType$23.nil)) { */ case 10: - $24r$2 = $ifaceNil; - $s = 12; case 12: return $24r$2; - /* } */ case 11: - key = $clone(pconn.cacheKey, connectMethodKey); - _tuple = (_entry$1 = t.idleConnWait[connectMethodKey.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [new wantConnQueue.ptr(sliceType$8.nil, 0, sliceType$8.nil), false]); - q = $clone(_tuple[0], wantConnQueue); - ok = _tuple[1]; - /* */ if (ok) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (ok) { */ case 13: - done = false; - /* */ if ($interfaceIsEqual(pconn.alt, $ifaceNil)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($interfaceIsEqual(pconn.alt, $ifaceNil)) { */ case 15: - /* while (true) { */ case 18: - /* if (!(q.len() > 0)) { break; } */ if(!(q.len() > 0)) { $s = 19; continue; } - w = q.popFront(); - _r$2 = w.tryDeliver(pconn, $ifaceNil); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (_r$2) { */ case 20: - done = true; - /* break; */ $s = 19; continue; - /* } */ case 21: - $s = 18; continue; - case 19: - $s = 17; continue; - /* } else { */ case 16: - /* while (true) { */ case 23: - /* if (!(q.len() > 0)) { break; } */ if(!(q.len() > 0)) { $s = 24; continue; } - w$1 = q.popFront(); - _r$3 = w$1.tryDeliver(pconn, $ifaceNil); /* */ $s = 25; case 25: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 23; continue; - case 24: - /* } */ case 17: - if (q.len() === 0) { - delete t.idleConnWait[connectMethodKey.keyFor(key)]; - } else { - _key = $clone(key, connectMethodKey); (t.idleConnWait || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: $clone(q, wantConnQueue) }; - } - /* */ if (done) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (done) { */ case 26: - $24r$3 = $ifaceNil; - $s = 28; case 28: return $24r$3; - /* } */ case 27: - /* } */ case 14: - /* */ if (t.closeIdle) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (t.closeIdle) { */ case 29: - $24r$4 = errCloseIdle; - $s = 31; case 31: return $24r$4; - /* } */ case 30: - if (t.idleConn === false) { - t.idleConn = {}; - } - idles = (_entry$2 = t.idleConn[connectMethodKey.keyFor(key)], _entry$2 !== undefined ? _entry$2.v : sliceType$9.nil); - /* */ if (idles.$length >= t.maxIdleConnsPerHost()) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (idles.$length >= t.maxIdleConnsPerHost()) { */ case 32: - $24r$5 = errTooManyIdleHost; - $s = 34; case 34: return $24r$5; - /* } */ case 33: - _ref = idles; - _i = 0; - /* while (true) { */ case 35: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 36; continue; } - exist = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (exist === pconn) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (exist === pconn) { */ case 37: - $r = log.Fatalf("dup idle pconn %p in freelist", new sliceType([pconn])); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 38: - _i++; - $s = 35; continue; - case 36: - _key$1 = $clone(key, connectMethodKey); (t.idleConn || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key$1)] = { k: _key$1, v: $append(idles, pconn) }; - t.idleLRU.add(pconn); - /* */ if (!((t.MaxIdleConns === 0)) && t.idleLRU.len() > t.MaxIdleConns) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (!((t.MaxIdleConns === 0)) && t.idleLRU.len() > t.MaxIdleConns) { */ case 40: - oldest = t.idleLRU.removeOldest(); - $r = oldest.close(errTooManyIdle); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - t.removeIdleConnLocked(oldest); - /* } */ case 41: - /* */ if ((x$5 = t.IdleConnTimeout, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 0))) && $interfaceIsEqual(pconn.alt, $ifaceNil)) { $s = 43; continue; } - /* */ $s = 44; continue; - /* if ((x$5 = t.IdleConnTimeout, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 0))) && $interfaceIsEqual(pconn.alt, $ifaceNil)) { */ case 43: - /* */ if (!(pconn.idleTimer === ptrType$25.nil)) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!(pconn.idleTimer === ptrType$25.nil)) { */ case 45: - _r$4 = pconn.idleTimer.Reset(t.IdleConnTimeout); /* */ $s = 48; case 48: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $s = 47; continue; - /* } else { */ case 46: - _r$5 = time.AfterFunc(t.IdleConnTimeout, $methodVal(pconn, "closeConnIfStillIdle")); /* */ $s = 49; case 49: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - pconn.idleTimer = _r$5; - /* } */ case 47: - /* } */ case 44: - _r$6 = time.Now(); /* */ $s = 50; case 50: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - time.Time.copy(pconn.idleAt, _r$6); - $24r$6 = $ifaceNil; - $s = 51; case 51: return $24r$6; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.tryPutIdleConn, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _entry, _entry$1, _entry$2, _i, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, done, exist, idles, key, ok, oldest, pconn, q, t, w, w$1, x$5, $s, $deferred};return $f; } } - }; - Transport.prototype.tryPutIdleConn = function(pconn) { return this.$val.tryPutIdleConn(pconn); }; - Transport.ptr.prototype.queueForIdleConn = function(w) { - var {$24r, $24r$1, $24r$2, $24r$3, _entry, _entry$1, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _tuple, delivered, delivered$1, list$1, ok, oldTime, pconn, q, stop, t, tooOld, w, x$5, x$6, x$7, $s, $deferred, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - delivered = false; - t = this; - /* */ if (t.DisableKeepAlives) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (t.DisableKeepAlives) { */ case 1: - delivered = false; - $24r = delivered; - $s = 3; case 3: return $24r; - /* } */ case 2: - $r = t.idleMu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); - t.closeIdle = false; - /* */ if (w === ptrType$24.nil) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (w === ptrType$24.nil) { */ case 5: - delivered = false; - $24r$1 = delivered; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - oldTime = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - /* */ if ((x$5 = t.IdleConnTimeout, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 0)))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((x$5 = t.IdleConnTimeout, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 0)))) { */ case 8: - _r$1 = time.Now(); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Add((x$6 = t.IdleConnTimeout, new time.Duration(-x$6.$high, -x$6.$low))); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - time.Time.copy(oldTime, _r$2); - /* } */ case 9: - _tuple = (_entry = t.idleConn[connectMethodKey.keyFor(w.key)], _entry !== undefined ? [_entry.v, true] : [sliceType$9.nil, false]); - list$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (ok) { */ case 12: - stop = false; - delivered$1 = false; - /* while (true) { */ case 14: - /* if (!(list$1.$length > 0 && !stop)) { break; } */ if(!(list$1.$length > 0 && !stop)) { $s = 15; continue; } - pconn = (x$7 = list$1.$length - 1 >> 0, ((x$7 < 0 || x$7 >= list$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : list$1.$array[list$1.$offset + x$7])); - tooOld = !$clone(oldTime, time.Time).IsZero() && $clone($clone(pconn.idleAt, time.Time).Round(new time.Duration(0, 0)), time.Time).Before($clone(oldTime, time.Time)); - /* */ if (tooOld) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (tooOld) { */ case 16: - $go($methodVal(pconn, "closeConnIfStillIdle"), []); - /* } */ case 17: - _r$3 = pconn.isBroken(); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 || tooOld) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (_r$3 || tooOld) { */ case 18: - list$1 = $subslice(list$1, 0, (list$1.$length - 1 >> 0)); - /* continue; */ $s = 14; continue; - /* } */ case 19: - _r$4 = w.tryDeliver(pconn, $ifaceNil); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - delivered$1 = _r$4; - if (delivered$1) { - if (!($interfaceIsEqual(pconn.alt, $ifaceNil))) { - } else { - t.idleLRU.remove(pconn); - list$1 = $subslice(list$1, 0, (list$1.$length - 1 >> 0)); - } - } - stop = true; - $s = 14; continue; - case 15: - if (list$1.$length > 0) { - _key = $clone(w.key, connectMethodKey); (t.idleConn || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: list$1 }; - } else { - delete t.idleConn[connectMethodKey.keyFor(w.key)]; - } - /* */ if (stop) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (stop) { */ case 22: - delivered = delivered$1; - $24r$2 = delivered; - $s = 24; case 24: return $24r$2; - /* } */ case 23: - /* } */ case 13: - if (t.idleConnWait === false) { - t.idleConnWait = {}; - } - q = $clone((_entry$1 = t.idleConnWait[connectMethodKey.keyFor(w.key)], _entry$1 !== undefined ? _entry$1.v : new wantConnQueue.ptr(sliceType$8.nil, 0, sliceType$8.nil)), wantConnQueue); - q.cleanFront(); - q.pushBack(w); - _key$1 = $clone(w.key, connectMethodKey); (t.idleConnWait || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key$1)] = { k: _key$1, v: $clone(q, wantConnQueue) }; - delivered = false; - $24r$3 = delivered; - $s = 25; case 25: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return delivered; } if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.queueForIdleConn, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _entry, _entry$1, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _tuple, delivered, delivered$1, list$1, ok, oldTime, pconn, q, stop, t, tooOld, w, x$5, x$6, x$7, $s, $deferred};return $f; } } - }; - Transport.prototype.queueForIdleConn = function(w) { return this.$val.queueForIdleConn(w); }; - Transport.ptr.prototype.removeIdleConn = function(pconn) { - var {$24r, pconn, t, $s, $deferred, $r, $c} = $restore(this, {pconn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $r = t.idleMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); - $24r = t.removeIdleConnLocked(pconn); - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.removeIdleConn, $c: true, $r, $24r, pconn, t, $s, $deferred};return $f; } } - }; - Transport.prototype.removeIdleConn = function(pconn) { return this.$val.removeIdleConn(pconn); }; - Transport.ptr.prototype.removeIdleConnLocked = function(pconn) { - var _1, _entry, _i, _key, _ref, i, key, pconn, pconns, removed, t, v; - t = this; - if (!(pconn.idleTimer === ptrType$25.nil)) { - pconn.idleTimer.Stop(); - } - t.idleLRU.remove(pconn); - key = $clone(pconn.cacheKey, connectMethodKey); - pconns = (_entry = t.idleConn[connectMethodKey.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$9.nil); - removed = false; - _1 = pconns.$length; - if (_1 === (0)) { - } else if (_1 === (1)) { - if ((0 >= pconns.$length ? ($throwRuntimeError("index out of range"), undefined) : pconns.$array[pconns.$offset + 0]) === pconn) { - delete t.idleConn[connectMethodKey.keyFor(key)]; - removed = true; - } - } else { - _ref = pconns; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!(v === pconn)) { - _i++; - continue; - } - $copySlice($subslice(pconns, i), $subslice(pconns, (i + 1 >> 0))); - _key = $clone(key, connectMethodKey); (t.idleConn || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: $subslice(pconns, 0, (pconns.$length - 1 >> 0)) }; - removed = true; - break; - } - } - return removed; - }; - Transport.prototype.removeIdleConnLocked = function(pconn) { return this.$val.removeIdleConnLocked(pconn); }; - Transport.ptr.prototype.setReqCanceler = function(key, fn) { - var {_key, fn, key, t, $s, $deferred, $r, $c} = $restore(this, {key, fn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $r = t.reqMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.reqMu, "Unlock"), []]); - if (t.reqCanceler === false) { - t.reqCanceler = {}; - } - if (!(fn === $throwNilPointerError)) { - _key = $clone(key, cancelKey); (t.reqCanceler || $throwRuntimeError("assignment to entry in nil map"))[cancelKey.keyFor(_key)] = { k: _key, v: fn }; - } else { - delete t.reqCanceler[cancelKey.keyFor(key)]; - } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.setReqCanceler, $c: true, $r, _key, fn, key, t, $s, $deferred};return $f; } } - }; - Transport.prototype.setReqCanceler = function(key, fn) { return this.$val.setReqCanceler(key, fn); }; - Transport.ptr.prototype.replaceReqCanceler = function(key, fn) { - var {$24r, $24r$1, _entry, _key, _tuple, fn, key, ok, t, $s, $deferred, $r, $c} = $restore(this, {key, fn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $r = t.reqMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.reqMu, "Unlock"), []]); - _tuple = (_entry = t.reqCanceler[cancelKey.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [$throwNilPointerError, false]); - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - $24r = false; - $s = 4; case 4: return $24r; - /* } */ case 3: - if (!(fn === $throwNilPointerError)) { - _key = $clone(key, cancelKey); (t.reqCanceler || $throwRuntimeError("assignment to entry in nil map"))[cancelKey.keyFor(_key)] = { k: _key, v: fn }; - } else { - delete t.reqCanceler[cancelKey.keyFor(key)]; - } - $24r$1 = true; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.replaceReqCanceler, $c: true, $r, $24r, $24r$1, _entry, _key, _tuple, fn, key, ok, t, $s, $deferred};return $f; } } - }; - Transport.prototype.replaceReqCanceler = function(key, fn) { return this.$val.replaceReqCanceler(key, fn); }; - Transport.ptr.prototype.dial = function(ctx, network, addr) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _tuple, addr, c, ctx, err, network, t, $s, $r, $c} = $restore(this, {ctx, network, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if (!(t.DialContext === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(t.DialContext === $throwNilPointerError)) { */ case 1: - _r$1 = t.DialContext(ctx, network, addr); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if (!(t.Dial === $throwNilPointerError)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(t.Dial === $throwNilPointerError)) { */ case 5: - _r$2 = t.Dial(network, addr); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - c = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(c, $ifaceNil) && $interfaceIsEqual(err, $ifaceNil)) { - err = errors.New("net/http: Transport.Dial hook returned (nil, nil)"); - } - $s = -1; return [c, err]; - /* } */ case 6: - _r$3 = zeroDialer.DialContext(ctx, network, addr); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.dial, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _tuple, addr, c, ctx, err, network, t, $s};return $f; - }; - Transport.prototype.dial = function(ctx, network, addr) { return this.$val.dial(ctx, network, addr); }; - wantConn.ptr.prototype.waiting = function() { - var _selection, w; - w = this; - _selection = $select([[w.ready], []]); - if (_selection[0] === 0) { - return false; - } else if (_selection[0] === 1) { - return true; - } - }; - wantConn.prototype.waiting = function() { return this.$val.waiting(); }; - wantConn.ptr.prototype.tryDeliver = function(pc, err) { - var {$24r, $24r$1, err, pc, w, $s, $deferred, $r, $c} = $restore(this, {pc, err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - w = this; - $r = w.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(w.mu, "Unlock"), []]); - /* */ if (!(w.pc === ptrType$22.nil) || !($interfaceIsEqual(w.err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(w.pc === ptrType$22.nil) || !($interfaceIsEqual(w.err, $ifaceNil))) { */ case 2: - $24r = false; - $s = 4; case 4: return $24r; - /* } */ case 3: - w.pc = pc; - w.err = err; - if (w.pc === ptrType$22.nil && $interfaceIsEqual(w.err, $ifaceNil)) { - $panic(new $String("net/http: internal error: misuse of tryDeliver")); - } - $close(w.ready); - $24r$1 = true; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: wantConn.ptr.prototype.tryDeliver, $c: true, $r, $24r, $24r$1, err, pc, w, $s, $deferred};return $f; } } - }; - wantConn.prototype.tryDeliver = function(pc, err) { return this.$val.tryDeliver(pc, err); }; - wantConn.ptr.prototype.cancel = function(t, err) { - var {err, pc, t, w, $s, $r, $c} = $restore(this, {t, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - $r = w.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (w.pc === ptrType$22.nil && $interfaceIsEqual(w.err, $ifaceNil)) { - $close(w.ready); - } - pc = w.pc; - w.pc = ptrType$22.nil; - w.err = err; - $r = w.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!(pc === ptrType$22.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(pc === ptrType$22.nil)) { */ case 3: - $r = t.putOrCloseIdleConn(pc); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: wantConn.ptr.prototype.cancel, $c: true, $r, err, pc, t, w, $s};return $f; - }; - wantConn.prototype.cancel = function(t, err) { return this.$val.cancel(t, err); }; - wantConnQueue.ptr.prototype.len = function() { - var q; - q = this; - return (q.head.$length - q.headPos >> 0) + q.tail.$length >> 0; - }; - wantConnQueue.prototype.len = function() { return this.$val.len(); }; - wantConnQueue.ptr.prototype.pushBack = function(w) { - var q, w; - q = this; - q.tail = $append(q.tail, w); - }; - wantConnQueue.prototype.pushBack = function(w) { return this.$val.pushBack(w); }; - wantConnQueue.ptr.prototype.popFront = function() { - var _tmp, _tmp$1, _tmp$2, q, w, x$5, x$6, x$7, x$8; - q = this; - if (q.headPos >= q.head.$length) { - if (q.tail.$length === 0) { - return ptrType$24.nil; - } - _tmp = q.tail; - _tmp$1 = 0; - _tmp$2 = $subslice(q.head, 0, 0); - q.head = _tmp; - q.headPos = _tmp$1; - q.tail = _tmp$2; - } - w = (x$5 = q.head, x$6 = q.headPos, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); - (x$7 = q.head, x$8 = q.headPos, ((x$8 < 0 || x$8 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$8] = ptrType$24.nil)); - q.headPos = q.headPos + (1) >> 0; - return w; - }; - wantConnQueue.prototype.popFront = function() { return this.$val.popFront(); }; - wantConnQueue.ptr.prototype.peekFront = function() { - var q, x$5, x$6, x$7; - q = this; - if (q.headPos < q.head.$length) { - return (x$5 = q.head, x$6 = q.headPos, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); - } - if (q.tail.$length > 0) { - return (x$7 = q.tail, (0 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 0])); - } - return ptrType$24.nil; - }; - wantConnQueue.prototype.peekFront = function() { return this.$val.peekFront(); }; - wantConnQueue.ptr.prototype.cleanFront = function() { - var cleaned, q, w; - cleaned = false; - q = this; - while (true) { - w = q.peekFront(); - if (w === ptrType$24.nil || w.waiting()) { - cleaned = cleaned; - return cleaned; - } - q.popFront(); - cleaned = true; - } - }; - wantConnQueue.prototype.cleanFront = function() { return this.$val.cleanFront(); }; - Transport.ptr.prototype.customDialTLS = function(ctx, network, addr) { - var {_r$1, _r$2, _tuple, _tuple$1, addr, conn$1, ctx, err, network, t, $s, $r, $c} = $restore(this, {ctx, network, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conn$1 = $ifaceNil; - err = $ifaceNil; - t = this; - /* */ if (!(t.DialTLSContext === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(t.DialTLSContext === $throwNilPointerError)) { */ case 1: - _r$1 = t.DialTLSContext(ctx, network, addr); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - conn$1 = _tuple[0]; - err = _tuple[1]; - $s = 3; continue; - /* } else { */ case 2: - _r$2 = t.DialTLS(network, addr); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - conn$1 = _tuple$1[0]; - err = _tuple$1[1]; - /* } */ case 3: - if ($interfaceIsEqual(conn$1, $ifaceNil) && $interfaceIsEqual(err, $ifaceNil)) { - err = errors.New("net/http: Transport.DialTLS or DialTLSContext returned (nil, nil)"); - } - $s = -1; return [conn$1, err]; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.customDialTLS, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, addr, conn$1, ctx, err, network, t, $s};return $f; - }; - Transport.prototype.customDialTLS = function(ctx, network, addr) { return this.$val.customDialTLS(ctx, network, addr); }; - Transport.ptr.prototype.getConn = function(treq, cm) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, cancelc, cm, ctx, delivered, err, err$1, err$2, pc, pc$1, req, t, trace, treq, w, $s, $deferred, $r, $c} = $restore(this, {treq, cm}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cancelc = [cancelc]; - err = [err]; - t = [t]; - w = [w]; - pc = ptrType$22.nil; - err[0] = $ifaceNil; - t[0] = this; - req = treq.Request; - trace = treq.trace; - ctx = req.Context(); - /* */ if (!(trace === ptrType$19.nil) && !(trace.GetConn === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.GetConn === $throwNilPointerError)) { */ case 1: - _r$1 = cm.addr(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = trace.GetConn(_r$1); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - w[0] = new wantConn.ptr($clone(cm, connectMethod), $clone(cm.key(), connectMethodKey), ctx, new $Chan(structType, 1), testHookPrePendingDial, testHookPostPendingDial, new sync.Mutex.ptr(0, 0), ptrType$22.nil, $ifaceNil); - $deferred.push([(function(cancelc, err, t, w) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 1: - $r = w[0].cancel(t[0], err[0]); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(cancelc, err, t, w), []]); - _r$2 = t[0].queueForIdleConn(w[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - delivered = _r$2; - /* */ if (delivered) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (delivered) { */ case 6: - pc$1 = w[0].pc; - /* */ if ($interfaceIsEqual(pc$1.alt, $ifaceNil) && !(trace === ptrType$19.nil) && !(trace.GotConn === $throwNilPointerError)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($interfaceIsEqual(pc$1.alt, $ifaceNil) && !(trace === ptrType$19.nil) && !(trace.GotConn === $throwNilPointerError)) { */ case 8: - _r$3 = pc$1.gotIdleConnTrace($clone(pc$1.idleAt, time.Time)); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = trace.GotConn($clone(_r$3, httptrace.GotConnInfo)); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - $r = t[0].setReqCanceler($clone(treq.cancelKey, cancelKey), (function(cancelc, err, t, w) { return function(param) { - var param; - }; })(cancelc, err, t, w)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = pc$1; - _tmp$1 = $ifaceNil; - pc = _tmp; - err[0] = _tmp$1; - $24r = [pc, err[0]]; - $s = 13; case 13: return $24r; - /* } */ case 7: - cancelc[0] = new $Chan($error, 1); - $r = t[0].setReqCanceler($clone(treq.cancelKey, cancelKey), (function(cancelc, err, t, w) { return function $b(err$1) { - var {err$1, $s, $r, $c} = $restore(this, {err$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(cancelc[0], err$1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, err$1, $s};return $f; - }; })(cancelc, err, t, w)); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = t[0].queueForDial(w[0]); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = req.Context().Done(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $select([[w[0].ready], [req.Cancel], [_r$4], [cancelc[0]]]); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _selection = _r$5; - /* */ if (_selection[0] === 0) { $s = 18; continue; } - /* */ if (_selection[0] === 1) { $s = 19; continue; } - /* */ if (_selection[0] === 2) { $s = 20; continue; } - /* */ if (_selection[0] === 3) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_selection[0] === 0) { */ case 18: - /* */ if (!(w[0].pc === ptrType$22.nil) && $interfaceIsEqual(w[0].pc.alt, $ifaceNil) && !(trace === ptrType$19.nil) && !(trace.GotConn === $throwNilPointerError)) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!(w[0].pc === ptrType$22.nil) && $interfaceIsEqual(w[0].pc.alt, $ifaceNil) && !(trace === ptrType$19.nil) && !(trace.GotConn === $throwNilPointerError)) { */ case 23: - _r$6 = w[0].pc.isReused(); /* */ $s = 25; case 25: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $r = trace.GotConn(new httptrace.GotConnInfo.ptr(w[0].pc.conn, _r$6, false, new time.Duration(0, 0))); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 24: - /* */ if (!($interfaceIsEqual(w[0].err, $ifaceNil))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!($interfaceIsEqual(w[0].err, $ifaceNil))) { */ case 27: - _r$7 = req.Context().Done(); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _selection$1 = $select([[req.Cancel], [_r$7], [cancelc[0]], []]); - /* */ if (_selection$1[0] === 0) { $s = 30; continue; } - /* */ if (_selection$1[0] === 1) { $s = 31; continue; } - /* */ if (_selection$1[0] === 2) { $s = 32; continue; } - /* */ if (_selection$1[0] === 3) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (_selection$1[0] === 0) { */ case 30: - _tmp$2 = ptrType$22.nil; - _tmp$3 = errRequestCanceledConn; - pc = _tmp$2; - err[0] = _tmp$3; - $24r$1 = [pc, err[0]]; - $s = 35; case 35: return $24r$1; - /* } else if (_selection$1[0] === 1) { */ case 31: - _tmp$4 = ptrType$22.nil; - _r$8 = req.Context().Err(); /* */ $s = 36; case 36: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tmp$5 = _r$8; - pc = _tmp$4; - err[0] = _tmp$5; - $24r$2 = [pc, err[0]]; - $s = 37; case 37: return $24r$2; - /* } else if (_selection$1[0] === 2) { */ case 32: - err$1 = _selection$1[1][0]; - if ($interfaceIsEqual(err$1, errRequestCanceled)) { - err$1 = errRequestCanceledConn; - } - _tmp$6 = ptrType$22.nil; - _tmp$7 = err$1; - pc = _tmp$6; - err[0] = _tmp$7; - $24r$3 = [pc, err[0]]; - $s = 38; case 38: return $24r$3; - /* } else if (_selection$1[0] === 3) { */ case 33: - /* } */ case 34: - /* } */ case 28: - _tmp$8 = w[0].pc; - _tmp$9 = w[0].err; - pc = _tmp$8; - err[0] = _tmp$9; - $24r$4 = [pc, err[0]]; - $s = 39; case 39: return $24r$4; - /* } else if (_selection[0] === 1) { */ case 19: - _tmp$10 = ptrType$22.nil; - _tmp$11 = errRequestCanceledConn; - pc = _tmp$10; - err[0] = _tmp$11; - $24r$5 = [pc, err[0]]; - $s = 40; case 40: return $24r$5; - /* } else if (_selection[0] === 2) { */ case 20: - _tmp$12 = ptrType$22.nil; - _r$9 = req.Context().Err(); /* */ $s = 41; case 41: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tmp$13 = _r$9; - pc = _tmp$12; - err[0] = _tmp$13; - $24r$6 = [pc, err[0]]; - $s = 42; case 42: return $24r$6; - /* } else if (_selection[0] === 3) { */ case 21: - err$2 = _selection[1][0]; - if ($interfaceIsEqual(err$2, errRequestCanceled)) { - err$2 = errRequestCanceledConn; - } - _tmp$14 = ptrType$22.nil; - _tmp$15 = err$2; - pc = _tmp$14; - err[0] = _tmp$15; - $24r$7 = [pc, err[0]]; - $s = 43; case 43: return $24r$7; - /* } */ case 22: - $s = -1; return [pc, err[0]]; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [pc, err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.getConn, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, cancelc, cm, ctx, delivered, err, err$1, err$2, pc, pc$1, req, t, trace, treq, w, $s, $deferred};return $f; } } - }; - Transport.prototype.getConn = function(treq, cm) { return this.$val.getConn(treq, cm); }; - Transport.ptr.prototype.queueForDial = function(w) { - var {_entry, _entry$1, _key, _key$1, n, q, t, w, $s, $deferred, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $r = w.beforeDial(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (t.MaxConnsPerHost <= 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (t.MaxConnsPerHost <= 0) { */ case 2: - $go($methodVal(t, "dialConnFor"), [w]); - $s = 4; case 4: return; - /* } */ case 3: - $r = t.connsPerHostMu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.connsPerHostMu, "Unlock"), []]); - n = (_entry = t.connsPerHost[connectMethodKey.keyFor(w.key)], _entry !== undefined ? _entry.v : 0); - /* */ if (n < t.MaxConnsPerHost) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (n < t.MaxConnsPerHost) { */ case 6: - if (t.connsPerHost === false) { - t.connsPerHost = {}; - } - _key = $clone(w.key, connectMethodKey); (t.connsPerHost || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: n + 1 >> 0 }; - $go($methodVal(t, "dialConnFor"), [w]); - $s = 8; case 8: return; - /* } */ case 7: - if (t.connsPerHostWait === false) { - t.connsPerHostWait = {}; - } - q = $clone((_entry$1 = t.connsPerHostWait[connectMethodKey.keyFor(w.key)], _entry$1 !== undefined ? _entry$1.v : new wantConnQueue.ptr(sliceType$8.nil, 0, sliceType$8.nil)), wantConnQueue); - q.cleanFront(); - q.pushBack(w); - _key$1 = $clone(w.key, connectMethodKey); (t.connsPerHostWait || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key$1)] = { k: _key$1, v: $clone(q, wantConnQueue) }; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.queueForDial, $c: true, $r, _entry, _entry$1, _key, _key$1, n, q, t, w, $s, $deferred};return $f; } } - }; - Transport.prototype.queueForDial = function(w) { return this.$val.queueForDial(w); }; - Transport.ptr.prototype.dialConnFor = function(w) { - var {_r$1, _r$2, _tuple, delivered, err, pc, t, w, $s, $deferred, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - $deferred.push([w.afterDial, []]); - _r$1 = t.dialConn(w.ctx, $clone(w.cm, connectMethod)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - pc = _tuple[0]; - err = _tuple[1]; - _r$2 = w.tryDeliver(pc, err); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - delivered = _r$2; - /* */ if ($interfaceIsEqual(err, $ifaceNil) && (!delivered || !($interfaceIsEqual(pc.alt, $ifaceNil)))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($interfaceIsEqual(err, $ifaceNil) && (!delivered || !($interfaceIsEqual(pc.alt, $ifaceNil)))) { */ case 3: - $r = t.putOrCloseIdleConn(pc); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $r = t.decConnsPerHost($clone(w.key, connectMethodKey)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.dialConnFor, $c: true, $r, _r$1, _r$2, _tuple, delivered, err, pc, t, w, $s, $deferred};return $f; } } - }; - Transport.prototype.dialConnFor = function(w) { return this.$val.dialConnFor(w); }; - Transport.ptr.prototype.decConnsPerHost = function(key) { - var {_entry, _entry$1, _key, _key$1, done, key, n, q, t, w, $s, $deferred, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = this; - /* */ if (t.MaxConnsPerHost <= 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (t.MaxConnsPerHost <= 0) { */ case 1: - $s = 3; case 3: return; - /* } */ case 2: - $r = t.connsPerHostMu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.connsPerHostMu, "Unlock"), []]); - n = (_entry = t.connsPerHost[connectMethodKey.keyFor(key)], _entry !== undefined ? _entry.v : 0); - if (n === 0) { - $panic(new $String("net/http: internal error: connCount underflow")); - } - q = $clone((_entry$1 = t.connsPerHostWait[connectMethodKey.keyFor(key)], _entry$1 !== undefined ? _entry$1.v : new wantConnQueue.ptr(sliceType$8.nil, 0, sliceType$8.nil)), wantConnQueue); - /* */ if (q.len() > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (q.len() > 0) { */ case 5: - done = false; - /* while (true) { */ case 7: - /* if (!(q.len() > 0)) { break; } */ if(!(q.len() > 0)) { $s = 8; continue; } - w = q.popFront(); - if (w.waiting()) { - $go($methodVal(t, "dialConnFor"), [w]); - done = true; - /* break; */ $s = 8; continue; - } - $s = 7; continue; - case 8: - if (q.len() === 0) { - delete t.connsPerHostWait[connectMethodKey.keyFor(key)]; - } else { - _key = $clone(key, connectMethodKey); (t.connsPerHostWait || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key)] = { k: _key, v: $clone(q, wantConnQueue) }; - } - /* */ if (done) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (done) { */ case 9: - $s = 11; case 11: return; - /* } */ case 10: - /* } */ case 6: - n = n - (1) >> 0; - if (n === 0) { - delete t.connsPerHost[connectMethodKey.keyFor(key)]; - } else { - _key$1 = $clone(key, connectMethodKey); (t.connsPerHost || $throwRuntimeError("assignment to entry in nil map"))[connectMethodKey.keyFor(_key$1)] = { k: _key$1, v: n }; - } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.decConnsPerHost, $c: true, $r, _entry, _entry$1, _key, _key$1, done, key, n, q, t, w, $s, $deferred};return $f; } } - }; - Transport.prototype.decConnsPerHost = function(key) { return this.$val.decConnsPerHost(key); }; - persistConn.ptr.prototype.addTLS = function(ctx, name, trace) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, cfg, cs, ctx, d, err, errc, name, pconn, plainConn, timer, tlsConn, trace, $s, $r, $c} = $restore(this, {ctx, name, trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cs = [cs]; - ctx = [ctx]; - errc = [errc]; - timer = [timer]; - tlsConn = [tlsConn]; - trace = [trace]; - pconn = this; - _r$1 = cloneTLSConfig(pconn.t.TLSClientConfig); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cfg = _r$1; - if (cfg.ServerName === "") { - cfg.ServerName = name; - } - if (pconn.cacheKey.onlyH1) { - cfg.NextProtos = sliceType$2.nil; - } - plainConn = pconn.conn; - tlsConn[0] = tls.Client(plainConn, cfg); - errc[0] = new $Chan($error, 2); - timer[0] = ptrType$25.nil; - d = pconn.t.TLSHandshakeTimeout; - /* */ if (!((d.$high === 0 && d.$low === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((d.$high === 0 && d.$low === 0))) { */ case 2: - _r$2 = time.AfterFunc(d, (function(cs, ctx, errc, timer, tlsConn, trace) { return function $b() { - var {x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(errc[0], (x$5 = new tlsHandshakeTimeoutError.ptr(), new x$5.constructor.elem(x$5))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, x$5, $s};return $f; - }; })(cs, ctx, errc, timer, tlsConn, trace)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - timer[0] = _r$2; - /* } */ case 3: - $go((function(cs, ctx, errc, timer, tlsConn, trace) { return function $b() { - var {_r$3, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].TLSHandshakeStart === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].TLSHandshakeStart === $throwNilPointerError)) { */ case 1: - $r = trace[0].TLSHandshakeStart(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$3 = tlsConn[0].HandshakeContext(ctx[0]); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!(timer[0] === ptrType$25.nil)) { - timer[0].Stop(); - } - $r = $send(errc[0], err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$3, err, $s};return $f; - }; })(cs, ctx, errc, timer, tlsConn, trace), []); - _r$3 = $recv(errc[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3[0]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - _r$4 = plainConn.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { */ case 9: - $r = trace[0].TLSHandshakeDone(new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$5.nil, sliceType$3.nil, sliceType$3.nil, $throwNilPointerError), err); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - $s = -1; return err; - /* } */ case 7: - _r$5 = tlsConn[0].ConnectionState(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - cs[0] = $clone(_r$5, tls.ConnectionState); - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].TLSHandshakeDone === $throwNilPointerError)) { */ case 13: - $r = trace[0].TLSHandshakeDone($clone(cs[0], tls.ConnectionState), $ifaceNil); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - pconn.tlsState = cs[0]; - pconn.conn = tlsConn[0]; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.addTLS, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, cfg, cs, ctx, d, err, errc, name, pconn, plainConn, timer, tlsConn, trace, $s};return $f; - }; - persistConn.prototype.addTLS = function(ctx, name, trace) { return this.$val.addTLS(ctx, name, trace); }; - Transport.ptr.prototype.dialConn = function(ctx, cm) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alt, auth, cancel, cm, conn$1, conn$2, conn$3, connectCtx, connectReq, cs, ctx, d, didReadResponse, e, err, err$1, err$2, err$3, err$4, err$5, err$6, err$7, firstTLSHost, hdr, newCtx, next, ok, ok$1, ok$2, ok$3, pa, pa$1, pconn, resp, s, t, tc, text, trace, u, wrapErr, x$5, $s, $deferred, $r, $c} = $restore(this, {ctx, cm}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cm = [cm]; - conn$1 = [conn$1]; - connectReq = [connectReq]; - cs = [cs]; - didReadResponse = [didReadResponse]; - err = [err]; - pa = [pa]; - resp = [resp]; - pconn = ptrType$22.nil; - err$1 = $ifaceNil; - t = this; - pconn = new persistConn.ptr($ifaceNil, t, $clone(cm[0].key(), connectMethodKey), $ifaceNil, ptrType$28.nil, ptrType$29.nil, ptrType$14.nil, new $Int64(0, 0), new $Chan(requestAndChan, 1), new $Chan(writeRequest, 1), new $Chan(structType, 0), false, false, new $Int64(0, 0), new $Chan($error, 1), new $Chan(structType, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), ptrType$25.nil, new sync.Mutex.ptr(0, 0), 0, $ifaceNil, $ifaceNil, false, false, $throwNilPointerError); - _r$1 = httptrace.ContextClientTrace(ctx); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - trace = _r$1; - wrapErr = (function(cm, conn$1, connectReq, cs, didReadResponse, err, pa, resp) { return function(err$2) { - var err$2; - if (!(cm[0].proxyURL === ptrType$17.nil)) { - return new net.OpError.ptr("proxyconnect", "tcp", $ifaceNil, $ifaceNil, err$2); - } - return err$2; - }; })(cm, conn$1, connectReq, cs, didReadResponse, err, pa, resp); - /* */ if (cm[0].scheme() === "https" && t.hasCustomTLSDialer()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (cm[0].scheme() === "https" && t.hasCustomTLSDialer()) { */ case 2: - err$2 = $ifaceNil; - _arg = ctx; - _r$2 = cm[0].addr(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = t.customDialTLS(_arg, "tcp", _arg$1); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - pconn.conn = _tuple[0]; - err$2 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 7: - _tmp = ptrType$22.nil; - _r$4 = wrapErr(err$2); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tmp$1 = _r$4; - pconn = _tmp; - err$1 = _tmp$1; - $24r = [pconn, err$1]; - $s = 10; case 10: return $24r; - /* } */ case 8: - _tuple$1 = $assertType(pconn.conn, ptrType$30, true); - tc = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (ok) { */ case 11: - /* */ if (!(trace === ptrType$19.nil) && !(trace.TLSHandshakeStart === $throwNilPointerError)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.TLSHandshakeStart === $throwNilPointerError)) { */ case 13: - $r = trace.TLSHandshakeStart(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - _r$5 = tc.HandshakeContext(ctx); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$3 = _r$5; - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 17: - $go($methodVal(pconn.conn, "Close"), []); - /* */ if (!(trace === ptrType$19.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { */ case 19: - $r = trace.TLSHandshakeDone(new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$5.nil, sliceType$3.nil, sliceType$3.nil, $throwNilPointerError), err$3); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 20: - _tmp$2 = ptrType$22.nil; - _tmp$3 = err$3; - pconn = _tmp$2; - err$1 = _tmp$3; - $24r$1 = [pconn, err$1]; - $s = 22; case 22: return $24r$1; - /* } */ case 18: - _r$6 = tc.ConnectionState(); /* */ $s = 23; case 23: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - cs[0] = $clone(_r$6, tls.ConnectionState); - /* */ if (!(trace === ptrType$19.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.TLSHandshakeDone === $throwNilPointerError)) { */ case 24: - $r = trace.TLSHandshakeDone($clone(cs[0], tls.ConnectionState), $ifaceNil); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - pconn.tlsState = cs[0]; - /* } */ case 12: - $s = 4; continue; - /* } else { */ case 3: - _arg$2 = ctx; - _r$7 = cm[0].addr(); /* */ $s = 27; case 27: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$3 = _r$7; - _r$8 = t.dial(_arg$2, "tcp", _arg$3); /* */ $s = 28; case 28: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$2 = _r$8; - conn$2 = _tuple$2[0]; - err$4 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 29: - _tmp$4 = ptrType$22.nil; - _r$9 = wrapErr(err$4); /* */ $s = 31; case 31: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tmp$5 = _r$9; - pconn = _tmp$4; - err$1 = _tmp$5; - $24r$2 = [pconn, err$1]; - $s = 32; case 32: return $24r$2; - /* } */ case 30: - pconn.conn = conn$2; - /* */ if (cm[0].scheme() === "https") { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (cm[0].scheme() === "https") { */ case 33: - firstTLSHost = ""; - _r$10 = cm[0].addr(); /* */ $s = 35; case 35: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$11 = net.SplitHostPort(_r$10); /* */ $s = 36; case 36: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tuple$3 = _r$11; - firstTLSHost = _tuple$3[0]; - err$4 = _tuple$3[2]; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 37: - _tmp$6 = ptrType$22.nil; - _r$12 = wrapErr(err$4); /* */ $s = 39; case 39: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tmp$7 = _r$12; - pconn = _tmp$6; - err$1 = _tmp$7; - $24r$3 = [pconn, err$1]; - $s = 40; case 40: return $24r$3; - /* } */ case 38: - _r$13 = pconn.addTLS(ctx, firstTLSHost, trace); /* */ $s = 41; case 41: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err$4 = _r$13; - /* */ if (!($interfaceIsEqual(err$4, $ifaceNil))) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (!($interfaceIsEqual(err$4, $ifaceNil))) { */ case 42: - _tmp$8 = ptrType$22.nil; - _r$14 = wrapErr(err$4); /* */ $s = 44; case 44: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _tmp$9 = _r$14; - pconn = _tmp$8; - err$1 = _tmp$9; - $24r$4 = [pconn, err$1]; - $s = 45; case 45: return $24r$4; - /* } */ case 43: - /* } */ case 34: - /* } */ case 4: - /* */ if (cm[0].proxyURL === ptrType$17.nil) { $s = 47; continue; } - /* */ if (cm[0].proxyURL.Scheme === "socks5") { $s = 48; continue; } - /* */ if (cm[0].targetScheme === "http") { $s = 49; continue; } - /* */ if (cm[0].targetScheme === "https") { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (cm[0].proxyURL === ptrType$17.nil) { */ case 47: - $s = 51; continue; - /* } else if (cm[0].proxyURL.Scheme === "socks5") { */ case 48: - conn$3 = pconn.conn; - _r$15 = conn$3.RemoteAddr(); /* */ $s = 52; case 52: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = _r$15.String(); /* */ $s = 53; case 53: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _arg$4 = _r$16; - _r$17 = socksNewDialer("tcp", _arg$4); /* */ $s = 54; case 54: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - d = _r$17; - u = cm[0].proxyURL.User; - if (!(u === ptrType$21.nil)) { - auth = new socksUsernamePassword.ptr(u.Username(), ""); - _tuple$4 = u.Password(); - auth.Password = _tuple$4[0]; - d.AuthMethods = new sliceType$12([0, 2]); - d.Authenticate = $methodVal(auth, "Authenticate"); - } - _r$18 = d.DialWithConn(ctx, conn$3, "tcp", cm[0].targetAddr); /* */ $s = 55; case 55: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _tuple$5 = _r$18; - err$5 = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(err$5, $ifaceNil))) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (!($interfaceIsEqual(err$5, $ifaceNil))) { */ case 56: - _r$19 = conn$3.Close(); /* */ $s = 58; case 58: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _r$19; - _tmp$10 = ptrType$22.nil; - _tmp$11 = err$5; - pconn = _tmp$10; - err$1 = _tmp$11; - $24r$5 = [pconn, err$1]; - $s = 59; case 59: return $24r$5; - /* } */ case 57: - $s = 51; continue; - /* } else if (cm[0].targetScheme === "http") { */ case 49: - pconn.isProxy = true; - pa[0] = cm[0].proxyAuth(); - if (!(pa[0] === "")) { - pconn.mutateHeaderFunc = (function(cm, conn$1, connectReq, cs, didReadResponse, err, pa, resp) { return function $b(h) { - var {h, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = new Header(h).Set("Proxy-Authorization", pa[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, h, $s};return $f; - }; })(cm, conn$1, connectReq, cs, didReadResponse, err, pa, resp); - } - $s = 51; continue; - /* } else if (cm[0].targetScheme === "https") { */ case 50: - conn$1[0] = pconn.conn; - hdr = false; - /* */ if (!(t.GetProxyConnectHeader === $throwNilPointerError)) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (!(t.GetProxyConnectHeader === $throwNilPointerError)) { */ case 60: - err$6 = $ifaceNil; - _r$20 = t.GetProxyConnectHeader(ctx, cm[0].proxyURL, cm[0].targetAddr); /* */ $s = 63; case 63: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _tuple$6 = _r$20; - hdr = _tuple$6[0]; - err$6 = _tuple$6[1]; - /* */ if (!($interfaceIsEqual(err$6, $ifaceNil))) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (!($interfaceIsEqual(err$6, $ifaceNil))) { */ case 64: - _r$21 = conn$1[0].Close(); /* */ $s = 66; case 66: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - _tmp$12 = ptrType$22.nil; - _tmp$13 = err$6; - pconn = _tmp$12; - err$1 = _tmp$13; - $24r$6 = [pconn, err$1]; - $s = 67; case 67: return $24r$6; - /* } */ case 65: - $s = 62; continue; - /* } else { */ case 61: - hdr = t.ProxyConnectHeader; - /* } */ case 62: - if (hdr === false) { - hdr = {}; - } - pa$1 = cm[0].proxyAuth(); - /* */ if (!(pa$1 === "")) { $s = 68; continue; } - /* */ $s = 69; continue; - /* if (!(pa$1 === "")) { */ case 68: - hdr = new Header(hdr).Clone(); - $r = new Header(hdr).Set("Proxy-Authorization", pa$1); /* */ $s = 70; case 70: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 69: - connectReq[0] = new Request.ptr("CONNECT", new url.URL.ptr("", cm[0].targetAddr, ptrType$21.nil, "", "", "", false, "", "", ""), "", 0, 0, hdr, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$2.nil, false, cm[0].targetAddr, false, false, ptrType$31.nil, false, "", "", ptrType$28.nil, $chanNil, ptrType$18.nil, $ifaceNil); - connectCtx = ctx; - _r$22 = ctx.Done(); /* */ $s = 73; case 73: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - /* */ if (_r$22 === $chanNil) { $s = 71; continue; } - /* */ $s = 72; continue; - /* if (_r$22 === $chanNil) { */ case 71: - _r$23 = context.WithTimeout(ctx, new time.Duration(13, 4165425152)); /* */ $s = 74; case 74: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _tuple$7 = _r$23; - newCtx = _tuple$7[0]; - cancel = _tuple$7[1]; - $deferred.push([cancel, []]); - connectCtx = newCtx; - /* } */ case 72: - didReadResponse[0] = new $Chan(structType, 0); - resp[0] = ptrType$18.nil; - err[0] = $ifaceNil; - $go((function(cm, conn$1, connectReq, cs, didReadResponse, err, pa, resp) { return function $b() { - var {_arg$5, _r$24, _r$25, _tuple$8, br, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $deferred.push([function(_arg$5) { $close(_arg$5); }, [didReadResponse[0]]]); - _r$24 = connectReq[0].Write(conn$1[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - err[0] = _r$24; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - br = bufio.NewReader(conn$1[0]); - _r$25 = ReadResponse(br, connectReq[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _tuple$8 = _r$25; - resp[0] = _tuple$8[0]; - err[0] = _tuple$8[1]; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, _arg$5, _r$24, _r$25, _tuple$8, br, $s, $deferred};return $f; } } - }; })(cm, conn$1, connectReq, cs, didReadResponse, err, pa, resp), []); - _r$24 = connectCtx.Done(); /* */ $s = 75; case 75: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$25 = $select([[_r$24], [didReadResponse[0]]]); /* */ $s = 76; case 76: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - _selection = _r$25; - /* */ if (_selection[0] === 0) { $s = 77; continue; } - /* */ if (_selection[0] === 1) { $s = 78; continue; } - /* */ $s = 79; continue; - /* if (_selection[0] === 0) { */ case 77: - _r$26 = conn$1[0].Close(); /* */ $s = 80; case 80: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - _r$26; - _r$27 = $recv(didReadResponse[0]); /* */ $s = 81; case 81: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - _r$27[0]; - _tmp$14 = ptrType$22.nil; - _r$28 = connectCtx.Err(); /* */ $s = 82; case 82: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _tmp$15 = _r$28; - pconn = _tmp$14; - err$1 = _tmp$15; - $24r$7 = [pconn, err$1]; - $s = 83; case 83: return $24r$7; - /* } else if (_selection[0] === 1) { */ case 78: - /* } */ case 79: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 84; continue; } - /* */ $s = 85; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 84: - _r$29 = conn$1[0].Close(); /* */ $s = 86; case 86: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$29; - _tmp$16 = ptrType$22.nil; - _tmp$17 = err[0]; - pconn = _tmp$16; - err$1 = _tmp$17; - $24r$8 = [pconn, err$1]; - $s = 87; case 87: return $24r$8; - /* } */ case 85: - /* */ if (!((resp[0].StatusCode === 200))) { $s = 88; continue; } - /* */ $s = 89; continue; - /* if (!((resp[0].StatusCode === 200))) { */ case 88: - _tuple$8 = strings.Cut(resp[0].Status, " "); - text = _tuple$8[1]; - ok$1 = _tuple$8[2]; - _r$30 = conn$1[0].Close(); /* */ $s = 90; case 90: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _r$30; - /* */ if (!ok$1) { $s = 91; continue; } - /* */ $s = 92; continue; - /* if (!ok$1) { */ case 91: - _tmp$18 = ptrType$22.nil; - _tmp$19 = errors.New("unknown status code"); - pconn = _tmp$18; - err$1 = _tmp$19; - $24r$9 = [pconn, err$1]; - $s = 93; case 93: return $24r$9; - /* } */ case 92: - _tmp$20 = ptrType$22.nil; - _tmp$21 = errors.New(text); - pconn = _tmp$20; - err$1 = _tmp$21; - $24r$10 = [pconn, err$1]; - $s = 94; case 94: return $24r$10; - /* } */ case 89: - /* } */ case 51: - case 46: - /* */ if (!(cm[0].proxyURL === ptrType$17.nil) && cm[0].targetScheme === "https") { $s = 95; continue; } - /* */ $s = 96; continue; - /* if (!(cm[0].proxyURL === ptrType$17.nil) && cm[0].targetScheme === "https") { */ case 95: - _r$31 = pconn.addTLS(ctx, cm[0].tlsHost(), trace); /* */ $s = 97; case 97: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - err$7 = _r$31; - /* */ if (!($interfaceIsEqual(err$7, $ifaceNil))) { $s = 98; continue; } - /* */ $s = 99; continue; - /* if (!($interfaceIsEqual(err$7, $ifaceNil))) { */ case 98: - _tmp$22 = ptrType$22.nil; - _tmp$23 = err$7; - pconn = _tmp$22; - err$1 = _tmp$23; - $24r$11 = [pconn, err$1]; - $s = 100; case 100: return $24r$11; - /* } */ case 99: - /* } */ case 96: - s = pconn.tlsState; - /* */ if (!(s === ptrType$28.nil) && s.NegotiatedProtocolIsMutual && !(s.NegotiatedProtocol === "")) { $s = 101; continue; } - /* */ $s = 102; continue; - /* if (!(s === ptrType$28.nil) && s.NegotiatedProtocolIsMutual && !(s.NegotiatedProtocol === "")) { */ case 101: - _tuple$9 = (_entry = t.TLSNextProto[$String.keyFor(s.NegotiatedProtocol)], _entry !== undefined ? [_entry.v, true] : [$throwNilPointerError, false]); - next = _tuple$9[0]; - ok$2 = _tuple$9[1]; - /* */ if (ok$2) { $s = 103; continue; } - /* */ $s = 104; continue; - /* if (ok$2) { */ case 103: - _r$32 = next(cm[0].targetAddr, $assertType(pconn.conn, ptrType$30)); /* */ $s = 105; case 105: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - alt = _r$32; - _tuple$10 = $assertType(alt, erringRoundTripper, true); - e = _tuple$10[0]; - ok$3 = _tuple$10[1]; - /* */ if (ok$3) { $s = 106; continue; } - /* */ $s = 107; continue; - /* if (ok$3) { */ case 106: - _tmp$24 = ptrType$22.nil; - _r$33 = e.RoundTripErr(); /* */ $s = 108; case 108: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _tmp$25 = _r$33; - pconn = _tmp$24; - err$1 = _tmp$25; - $24r$12 = [pconn, err$1]; - $s = 109; case 109: return $24r$12; - /* } */ case 107: - _tmp$26 = new persistConn.ptr(alt, t, $clone(pconn.cacheKey, connectMethodKey), $ifaceNil, ptrType$28.nil, ptrType$29.nil, ptrType$14.nil, new $Int64(0, 0), $chanNil, $chanNil, $chanNil, false, false, new $Int64(0, 0), $chanNil, $chanNil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), ptrType$25.nil, new sync.Mutex.ptr(0, 0), 0, $ifaceNil, $ifaceNil, false, false, $throwNilPointerError); - _tmp$27 = $ifaceNil; - pconn = _tmp$26; - err$1 = _tmp$27; - $24r$13 = [pconn, err$1]; - $s = 110; case 110: return $24r$13; - /* } */ case 104: - /* } */ case 102: - pconn.br = bufio.NewReaderSize(pconn, t.readBufferSize()); - pconn.bw = bufio.NewWriterSize((x$5 = new persistConnWriter.ptr(pconn), new x$5.constructor.elem(x$5)), t.writeBufferSize()); - $go($methodVal(pconn, "readLoop"), []); - $go($methodVal(pconn, "writeLoop"), []); - _tmp$28 = pconn; - _tmp$29 = $ifaceNil; - pconn = _tmp$28; - err$1 = _tmp$29; - $24r$14 = [pconn, err$1]; - $s = 111; case 111: return $24r$14; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [pconn, err$1]; } if($curGoroutine.asleep) { var $f = {$blk: Transport.ptr.prototype.dialConn, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$24, _tmp$25, _tmp$26, _tmp$27, _tmp$28, _tmp$29, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$10, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, _tuple$9, alt, auth, cancel, cm, conn$1, conn$2, conn$3, connectCtx, connectReq, cs, ctx, d, didReadResponse, e, err, err$1, err$2, err$3, err$4, err$5, err$6, err$7, firstTLSHost, hdr, newCtx, next, ok, ok$1, ok$2, ok$3, pa, pa$1, pconn, resp, s, t, tc, text, trace, u, wrapErr, x$5, $s, $deferred};return $f; } } - }; - Transport.prototype.dialConn = function(ctx, cm) { return this.$val.dialConn(ctx, cm); }; - persistConnWriter.ptr.prototype.Write = function(p) { - var {_r$1, _tuple, err, n, p, w, x$5, x$6, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.pc.conn.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - w.pc.nwrite = (x$5 = w.pc.nwrite, x$6 = (new $Int64(0, n)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: persistConnWriter.ptr.prototype.Write, $c: true, $r, _r$1, _tuple, err, n, p, w, x$5, x$6, $s};return $f; - }; - persistConnWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - persistConnWriter.ptr.prototype.ReadFrom = function(r) { - var {_r$1, _tuple, err, n, r, w, x$5, x$6, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - w = this; - _r$1 = io.Copy(w.pc.conn, r); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - w.pc.nwrite = (x$5 = w.pc.nwrite, x$6 = n, new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: persistConnWriter.ptr.prototype.ReadFrom, $c: true, $r, _r$1, _tuple, err, n, r, w, x$5, x$6, $s};return $f; - }; - persistConnWriter.prototype.ReadFrom = function(r) { return this.$val.ReadFrom(r); }; - connectMethod.ptr.prototype.key = function() { - var cm, proxyStr, targetAddr; - cm = this; - proxyStr = ""; - targetAddr = cm.targetAddr; - if (!(cm.proxyURL === ptrType$17.nil)) { - proxyStr = cm.proxyURL.String(); - if ((cm.proxyURL.Scheme === "http" || cm.proxyURL.Scheme === "https") && cm.targetScheme === "http") { - targetAddr = ""; - } - } - return new connectMethodKey.ptr(proxyStr, cm.targetScheme, targetAddr, cm.onlyH1); - }; - connectMethod.prototype.key = function() { return this.$val.key(); }; - connectMethod.ptr.prototype.scheme = function() { - var cm; - cm = this; - if (!(cm.proxyURL === ptrType$17.nil)) { - return cm.proxyURL.Scheme; - } - return cm.targetScheme; - }; - connectMethod.prototype.scheme = function() { return this.$val.scheme(); }; - connectMethod.ptr.prototype.addr = function() { - var {$24r, _r$1, cm, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cm = this; - /* */ if (!(cm.proxyURL === ptrType$17.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(cm.proxyURL === ptrType$17.nil)) { */ case 1: - _r$1 = canonicalAddr(cm.proxyURL); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return cm.targetAddr; - /* */ } return; } var $f = {$blk: connectMethod.ptr.prototype.addr, $c: true, $r, $24r, _r$1, cm, $s};return $f; - }; - connectMethod.prototype.addr = function() { return this.$val.addr(); }; - connectMethod.ptr.prototype.tlsHost = function() { - var cm, h; - cm = this; - h = cm.targetAddr; - if (hasPort(h)) { - h = $substring(h, 0, strings.LastIndex(h, ":")); - } - return h; - }; - connectMethod.prototype.tlsHost = function() { return this.$val.tlsHost(); }; - connectMethodKey.ptr.prototype.String = function() { - var {$24r, _r$1, h1, k, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - k = this; - h1 = ""; - if (k.onlyH1) { - h1 = ",h1"; - } - _r$1 = fmt.Sprintf("%s|%s%s|%s", new sliceType([new $String(k.proxy), new $String(k.scheme), new $String(h1), new $String(k.addr)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: connectMethodKey.ptr.prototype.String, $c: true, $r, $24r, _r$1, h1, k, $s};return $f; - }; - connectMethodKey.prototype.String = function() { return this.$val.String(); }; - persistConn.ptr.prototype.maxHeaderResponseSize = function() { - var pc, v; - pc = this; - v = pc.t.MaxResponseHeaderBytes; - if (!((v.$high === 0 && v.$low === 0))) { - return v; - } - return new $Int64(0, 10485760); - }; - persistConn.prototype.maxHeaderResponseSize = function() { return this.$val.maxHeaderResponseSize(); }; - persistConn.ptr.prototype.Read = function(p) { - var {$24r, _r$1, _r$2, _tmp, _tmp$1, _tuple, err, n, p, pc, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - pc = this; - /* */ if ((x$5 = pc.readLimit, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low <= 0)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x$5 = pc.readLimit, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low <= 0)))) { */ case 1: - _tmp = 0; - _r$1 = fmt.Errorf("read limit of %d bytes exhausted", new sliceType([pc.maxHeaderResponseSize()])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$1 = _r$1; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - if ((x$6 = (new $Int64(0, p.$length)), x$7 = pc.readLimit, (x$6.$high > x$7.$high || (x$6.$high === x$7.$high && x$6.$low > x$7.$low)))) { - p = $subslice(p, 0, $flatten64(pc.readLimit)); - } - _r$2 = pc.conn.Read(p); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, io.EOF)) { - pc.sawEOF = true; - } - pc.readLimit = (x$8 = pc.readLimit, x$9 = (new $Int64(0, n)), new $Int64(x$8.$high - x$9.$high, x$8.$low - x$9.$low)); - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.Read, $c: true, $r, $24r, _r$1, _r$2, _tmp, _tmp$1, _tuple, err, n, p, pc, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - persistConn.prototype.Read = function(p) { return this.$val.Read(p); }; - persistConn.ptr.prototype.isBroken = function() { - var {b, pc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - b = !($interfaceIsEqual(pc.closed, $ifaceNil)); - $r = pc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return b; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.isBroken, $c: true, $r, b, pc, $s};return $f; - }; - persistConn.prototype.isBroken = function() { return this.$val.isBroken(); }; - persistConn.ptr.prototype.canceled = function() { - var {$24r, pc, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(pc.mu, "Unlock"), []]); - $24r = pc.canceledErr; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.canceled, $c: true, $r, $24r, pc, $s, $deferred};return $f; } } - }; - persistConn.prototype.canceled = function() { return this.$val.canceled(); }; - persistConn.ptr.prototype.isReused = function() { - var {pc, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - r = pc.reused; - $r = pc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return r; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.isReused, $c: true, $r, pc, r, $s};return $f; - }; - persistConn.prototype.isReused = function() { return this.$val.isReused(); }; - persistConn.ptr.prototype.gotIdleConnTrace = function(idleAt) { - var {$24r, _r$1, idleAt, pc, t, $s, $deferred, $r, $c} = $restore(this, {idleAt}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - t = new httptrace.GotConnInfo.ptr($ifaceNil, false, false, new time.Duration(0, 0)); - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(pc.mu, "Unlock"), []]); - t.Reused = pc.reused; - t.Conn = pc.conn; - t.WasIdle = true; - /* */ if (!$clone(idleAt, time.Time).IsZero()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!$clone(idleAt, time.Time).IsZero()) { */ case 2: - _r$1 = time.Since($clone(idleAt, time.Time)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t.IdleTime = _r$1; - /* } */ case 3: - $24r = t; - $s = 5; case 5: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return t; } if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.gotIdleConnTrace, $c: true, $r, $24r, _r$1, idleAt, pc, t, $s, $deferred};return $f; } } - }; - persistConn.prototype.gotIdleConnTrace = function(idleAt) { return this.$val.gotIdleConnTrace(idleAt); }; - persistConn.ptr.prototype.cancelRequest = function(err) { - var {err, pc, $s, $deferred, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(pc.mu, "Unlock"), []]); - pc.canceledErr = err; - $r = pc.closeLocked(errRequestCanceled); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.cancelRequest, $c: true, $r, err, pc, $s, $deferred};return $f; } } - }; - persistConn.prototype.cancelRequest = function(err) { return this.$val.cancelRequest(err); }; - persistConn.ptr.prototype.closeConnIfStillIdle = function() { - var {_entry, _tuple, ok, pc, t, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pc = this; - t = pc.t; - $r = t.idleMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(t.idleMu, "Unlock"), []]); - _tuple = (_entry = t.idleLRU.m[ptrType$22.keyFor(pc)], _entry !== undefined ? [_entry.v, true] : [ptrType$23.nil, false]); - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - t.removeIdleConnLocked(pc); - $r = pc.close(errIdleConnTimeout); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.closeConnIfStillIdle, $c: true, $r, _entry, _tuple, ok, pc, t, $s, $deferred};return $f; } } - }; - persistConn.prototype.closeConnIfStillIdle = function() { return this.$val.closeConnIfStillIdle(); }; - persistConn.ptr.prototype.mapRoundTripError = function(req, startBytesWritten, err) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _tuple, cerr, err, ok, pc, req, reqErr, startBytesWritten, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {req, startBytesWritten, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$1 = $recv(pc.writeLoopDone); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1[0]; - _r$2 = pc.canceled(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - cerr = _r$2; - if (!($interfaceIsEqual(cerr, $ifaceNil))) { - $s = -1; return cerr; - } - $r = req.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - reqErr = req.err; - $r = req.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(reqErr, $ifaceNil))) { - $s = -1; return reqErr; - } - if ($interfaceIsEqual(err, errServerClosedIdle)) { - $s = -1; return err; - } - _tuple = $assertType(err, transportReadFromServerError, true); - ok = _tuple[1]; - if (ok) { - if ((x$5 = pc.nwrite, (x$5.$high === startBytesWritten.$high && x$5.$low === startBytesWritten.$low))) { - $s = -1; return (x$6 = new nothingWrittenError.ptr(err), new x$6.constructor.elem(x$6)); - } - $s = -1; return err; - } - _r$3 = pc.isBroken(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$3) { */ case 5: - if ((x$7 = pc.nwrite, (x$7.$high === startBytesWritten.$high && x$7.$low === startBytesWritten.$low))) { - $s = -1; return (x$8 = new nothingWrittenError.ptr(err), new x$8.constructor.elem(x$8)); - } - _r$4 = fmt.Errorf("net/http: HTTP/1.x transport connection broken: %v", new sliceType([err])); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 9; case 9: return $24r; - /* } */ case 6: - $s = -1; return err; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.mapRoundTripError, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _tuple, cerr, err, ok, pc, req, reqErr, startBytesWritten, x$5, x$6, x$7, x$8, $s};return $f; - }; - persistConn.prototype.mapRoundTripError = function(req, startBytesWritten, err) { return this.$val.mapRoundTripError(req, startBytesWritten, err); }; - persistConn.ptr.prototype.readLoop = function() { - var {_arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _selection$2, _selection$3, _tuple, _tuple$1, _v, _v$1, _v$2, _v$3, _v$4, alive, body$1, bodyEOF, bodyWritable, closeErr, eofc, err, hasBody, pc, rc, replaced, replaced$1, resp, testHookReadLoopBeforeNextRead$1, trace, tryPutIdleConn, waitForBodyRead, x$5, x$6, x$7, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - closeErr = [closeErr]; - eofc = [eofc]; - pc = [pc]; - pc[0] = this; - closeErr[0] = errReadLoopExiting; - $deferred.push([(function(closeErr, eofc, pc) { return function $b() { - var {_r$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = pc[0].close(closeErr[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = pc[0].t.removeIdleConn(pc[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, $s};return $f; - }; })(closeErr, eofc, pc), []]); - tryPutIdleConn = (function(closeErr, eofc, pc) { return function $b(trace) { - var {_r$1, err, trace, $s, $r, $c} = $restore(this, {trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = pc[0].t.tryPutIdleConn(pc[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - closeErr[0] = err; - /* */ if (!(trace === ptrType$19.nil) && !(trace.PutIdleConn === $throwNilPointerError) && !($interfaceIsEqual(err, errKeepAlivesDisabled))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.PutIdleConn === $throwNilPointerError) && !($interfaceIsEqual(err, errKeepAlivesDisabled))) { */ case 4: - $r = trace.PutIdleConn(err); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return false; - /* } */ case 3: - /* */ if (!(trace === ptrType$19.nil) && !(trace.PutIdleConn === $throwNilPointerError)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.PutIdleConn === $throwNilPointerError)) { */ case 7: - $r = trace.PutIdleConn($ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return true; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, err, trace, $s};return $f; - }; })(closeErr, eofc, pc); - eofc[0] = new $Chan(structType, 0); - $deferred.push([function(_arg) { $close(_arg); }, [eofc[0]]]); - $r = testHookMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - testHookReadLoopBeforeNextRead$1 = testHookReadLoopBeforeNextRead; - $r = testHookMu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - alive = true; - /* while (true) { */ case 3: - /* if (!(alive)) { break; } */ if(!(alive)) { $s = 4; continue; } - waitForBodyRead = [waitForBodyRead]; - pc[0].readLimit = pc[0].maxHeaderResponseSize(); - _r$1 = pc[0].br.Peek(1); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - $r = pc[0].mu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (pc[0].numExpectedResponses === 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (pc[0].numExpectedResponses === 0) { */ case 7: - $r = pc[0].readLoopPeekFailLocked(err); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = pc[0].mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; case 11: return; - /* } */ case 8: - $r = pc[0].mu.Unlock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = $recv(pc[0].reqch); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - rc = $clone(_r$2[0], requestAndChan); - _r$3 = httptrace.ContextClientTrace(rc.req.Context()); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - trace = _r$3; - resp = ptrType$18.nil; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 15: - _r$4 = pc[0].readResponse($clone(rc, requestAndChan), trace); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - resp = _tuple$1[0]; - err = _tuple$1[1]; - $s = 17; continue; - /* } else { */ case 16: - err = (x$5 = new transportReadFromServerError.ptr(err), new x$5.constructor.elem(x$5)); - closeErr[0] = err; - /* } */ case 17: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 19: - /* */ if ((x$6 = pc[0].readLimit, (x$6.$high < 0 || (x$6.$high === 0 && x$6.$low <= 0)))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if ((x$6 = pc[0].readLimit, (x$6.$high < 0 || (x$6.$high === 0 && x$6.$low <= 0)))) { */ case 21: - _r$5 = fmt.Errorf("net/http: server response headers exceeded %d bytes; aborted", new sliceType([pc[0].maxHeaderResponseSize()])); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err = _r$5; - /* } */ case 22: - _r$6 = $select([[rc.ch, new responseAndError.ptr(arrayType.zero(), ptrType$18.nil, err)], [rc.callerGone]]); /* */ $s = 24; case 24: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _selection = _r$6; - /* */ if (_selection[0] === 0) { $s = 25; continue; } - /* */ if (_selection[0] === 1) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_selection[0] === 0) { */ case 25: - $s = 27; continue; - /* } else if (_selection[0] === 1) { */ case 26: - $s = 28; case 28: return; - /* } */ case 27: - $s = 29; case 29: return; - /* } */ case 20: - pc[0].readLimit = new $Int64(2147483647, 4294967295); - $r = pc[0].mu.Lock(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pc[0].numExpectedResponses = pc[0].numExpectedResponses - (1) >> 0; - $r = pc[0].mu.Unlock(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bodyWritable = resp.bodyIsWritable(); - hasBody = !(rc.req.Method === "HEAD") && !((x$7 = resp.ContentLength, (x$7.$high === 0 && x$7.$low === 0))); - if (resp.Close || rc.req.Close || resp.StatusCode <= 199 || bodyWritable) { - alive = false; - } - /* */ if (!hasBody || bodyWritable) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (!hasBody || bodyWritable) { */ case 32: - _r$7 = pc[0].t.replaceReqCanceler($clone(rc.cancelKey, cancelKey), $throwNilPointerError); /* */ $s = 34; case 34: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - replaced = _r$7; - if (!(alive && !pc[0].sawEOF)) { _v$1 = false; $s = 36; continue s; } - _r$8 = pc[0].wroteRequest(); /* */ $s = 37; case 37: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v$1 = _r$8; case 36: - if (!(_v$1 && replaced)) { _v = false; $s = 35; continue s; } - _r$9 = tryPutIdleConn(trace); /* */ $s = 38; case 38: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _v = _r$9; case 35: - alive = _v; - if (bodyWritable) { - closeErr[0] = errCallerOwnsConn; - } - _r$10 = $select([[rc.ch, new responseAndError.ptr(arrayType.zero(), resp, $ifaceNil)], [rc.callerGone]]); /* */ $s = 39; case 39: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _selection$1 = _r$10; - /* */ if (_selection$1[0] === 0) { $s = 40; continue; } - /* */ if (_selection$1[0] === 1) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (_selection$1[0] === 0) { */ case 40: - $s = 42; continue; - /* } else if (_selection$1[0] === 1) { */ case 41: - $s = 43; case 43: return; - /* } */ case 42: - $r = testHookReadLoopBeforeNextRead$1(); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* continue; */ $s = 3; continue; - /* } */ case 33: - waitForBodyRead[0] = new $Chan($Bool, 2); - body$1 = new bodyEOFSignal.ptr(resp.Body, new sync.Mutex.ptr(0, 0), false, $ifaceNil, (function(closeErr, eofc, pc, waitForBodyRead) { return function $b(err$1) { - var {_r$11, _r$12, cerr, err$1, isEOF, $s, $r, $c} = $restore(this, {err$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - isEOF = $interfaceIsEqual(err$1, io.EOF); - $r = $send(waitForBodyRead[0], isEOF); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (isEOF) { $s = 2; continue; } - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (isEOF) { */ case 2: - _r$11 = $recv(eofc[0]); /* */ $s = 5; case 5: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11[0]; - $s = 4; continue; - /* } else if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 3: - _r$12 = pc[0].canceled(); /* */ $s = 6; case 6: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - cerr = _r$12; - if (!($interfaceIsEqual(cerr, $ifaceNil))) { - $s = -1; return cerr; - } - /* } */ case 4: - $s = -1; return err$1; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$11, _r$12, cerr, err$1, isEOF, $s};return $f; - }; })(closeErr, eofc, pc, waitForBodyRead), (function(closeErr, eofc, pc, waitForBodyRead) { return function $b() { - var {_r$11, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(waitForBodyRead[0], false); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$11 = $recv(eofc[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11[0]; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$11, $s};return $f; - }; })(closeErr, eofc, pc, waitForBodyRead)); - resp.Body = body$1; - if (!(rc.addedGzip)) { _v$2 = false; $s = 47; continue s; } - _r$11 = new Header(resp.Header).Get("Content-Encoding"); /* */ $s = 48; case 48: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$12 = ascii.EqualFold(_r$11, "gzip"); /* */ $s = 49; case 49: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _v$2 = _r$12; case 47: - /* */ if (_v$2) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (_v$2) { */ case 45: - resp.Body = new gzipReader.ptr(arrayType.zero(), body$1, ptrType$33.nil, $ifaceNil); - $r = new Header(resp.Header).Del("Content-Encoding"); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = new Header(resp.Header).Del("Content-Length"); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - resp.ContentLength = new $Int64(-1, 4294967295); - resp.Uncompressed = true; - /* } */ case 46: - _r$13 = $select([[rc.ch, new responseAndError.ptr(arrayType.zero(), resp, $ifaceNil)], [rc.callerGone]]); /* */ $s = 52; case 52: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _selection$2 = _r$13; - /* */ if (_selection$2[0] === 0) { $s = 53; continue; } - /* */ if (_selection$2[0] === 1) { $s = 54; continue; } - /* */ $s = 55; continue; - /* if (_selection$2[0] === 0) { */ case 53: - $s = 55; continue; - /* } else if (_selection$2[0] === 1) { */ case 54: - $s = 56; case 56: return; - /* } */ case 55: - _r$14 = rc.req.Context().Done(); /* */ $s = 57; case 57: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$15 = $select([[waitForBodyRead[0]], [rc.req.Cancel], [_r$14], [pc[0].closech]]); /* */ $s = 58; case 58: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _selection$3 = _r$15; - /* */ if (_selection$3[0] === 0) { $s = 59; continue; } - /* */ if (_selection$3[0] === 1) { $s = 60; continue; } - /* */ if (_selection$3[0] === 2) { $s = 61; continue; } - /* */ if (_selection$3[0] === 3) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (_selection$3[0] === 0) { */ case 59: - bodyEOF = _selection$3[1][0]; - _r$16 = pc[0].t.replaceReqCanceler($clone(rc.cancelKey, cancelKey), $throwNilPointerError); /* */ $s = 64; case 64: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - replaced$1 = _r$16; - if (!(alive && bodyEOF && !pc[0].sawEOF)) { _v$4 = false; $s = 66; continue s; } - _r$17 = pc[0].wroteRequest(); /* */ $s = 67; case 67: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _v$4 = _r$17; case 66: - if (!(_v$4 && replaced$1)) { _v$3 = false; $s = 65; continue s; } - _r$18 = tryPutIdleConn(trace); /* */ $s = 68; case 68: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _v$3 = _r$18; case 65: - alive = _v$3; - /* */ if (bodyEOF) { $s = 69; continue; } - /* */ $s = 70; continue; - /* if (bodyEOF) { */ case 69: - $r = $send(eofc[0], $clone(new structType.ptr(), structType)); /* */ $s = 71; case 71: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 70: - $s = 63; continue; - /* } else if (_selection$3[0] === 1) { */ case 60: - alive = false; - $r = pc[0].t.CancelRequest(rc.req); /* */ $s = 72; case 72: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 63; continue; - /* } else if (_selection$3[0] === 2) { */ case 61: - alive = false; - _arg$1 = $clone(rc.cancelKey, cancelKey); - _r$19 = rc.req.Context().Err(); /* */ $s = 73; case 73: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _arg$2 = _r$19; - _r$20 = pc[0].t.cancelRequest(_arg$1, _arg$2); /* */ $s = 74; case 74: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - _r$20; - $s = 63; continue; - /* } else if (_selection$3[0] === 3) { */ case 62: - alive = false; - /* } */ case 63: - $r = testHookReadLoopBeforeNextRead$1(); /* */ $s = 75; case 75: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - case 4: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.readLoop, $c: true, $r, _arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _selection$2, _selection$3, _tuple, _tuple$1, _v, _v$1, _v$2, _v$3, _v$4, alive, body$1, bodyEOF, bodyWritable, closeErr, eofc, err, hasBody, pc, rc, replaced, replaced$1, resp, testHookReadLoopBeforeNextRead$1, trace, tryPutIdleConn, waitForBodyRead, x$5, x$6, x$7, $s, $deferred};return $f; } } - }; - persistConn.prototype.readLoop = function() { return this.$val.readLoop(); }; - persistConn.ptr.prototype.readLoopPeekFailLocked = function(peekErr) { - var {_r$1, _r$2, _tuple, buf, n, pc, peekErr, $s, $r, $c} = $restore(this, {peekErr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - if (!($interfaceIsEqual(pc.closed, $ifaceNil))) { - $s = -1; return; - } - n = pc.br.Buffered(); - /* */ if (n > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n > 0) { */ case 1: - _r$1 = pc.br.Peek(n); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - buf = _tuple[0]; - /* */ if (is408Message(buf)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (is408Message(buf)) { */ case 4: - $r = pc.closeLocked(errServerClosedIdle); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } else { */ case 5: - $r = log.Printf("Unsolicited response received on idle HTTP channel starting with %q; err=%v", new sliceType([buf, peekErr])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - /* } */ case 2: - /* */ if ($interfaceIsEqual(peekErr, io.EOF)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(peekErr, io.EOF)) { */ case 9: - $r = pc.closeLocked(errServerClosedIdle); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; continue; - /* } else { */ case 10: - _r$2 = fmt.Errorf("readLoopPeekFailLocked: %v", new sliceType([peekErr])); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = pc.closeLocked(_r$2); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - $s = -1; return; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.readLoopPeekFailLocked, $c: true, $r, _r$1, _r$2, _tuple, buf, n, pc, peekErr, $s};return $f; - }; - persistConn.prototype.readLoopPeekFailLocked = function(peekErr) { return this.$val.readLoopPeekFailLocked(peekErr); }; - is408Message = function(buf) { - var buf; - if (buf.$length < 12) { - return false; - } - if (!(($bytesToString($subslice(buf, 0, 7))) === "HTTP/1.")) { - return false; - } - return ($bytesToString($subslice(buf, 8, 12))) === " 408"; - }; - persistConn.ptr.prototype.readResponse = function(rc, trace) { - var {_r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, continueCh, err, err$1, err$2, is1xx, is1xxNonTerminal, num1xx, pc, peek, rc, resCode, resp, trace, $s, $r, $c} = $restore(this, {rc, trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - resp = ptrType$18.nil; - err = $ifaceNil; - pc = this; - /* */ if (!(trace === ptrType$19.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { */ case 1: - _r$1 = pc.br.Peek(1); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - peek = _tuple[0]; - err$1 = _tuple[1]; - /* */ if ($interfaceIsEqual(err$1, $ifaceNil) && (peek.$length === 1)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(err$1, $ifaceNil) && (peek.$length === 1)) { */ case 4: - $r = trace.GotFirstResponseByte(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - /* } */ case 2: - num1xx = 0; - continueCh = rc.continueCh; - /* while (true) { */ case 7: - _r$2 = ReadResponse(pc.br, rc.req); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - resp = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [resp, err]; - } - resCode = resp.StatusCode; - /* */ if (!(continueCh === $chanNil)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(continueCh === $chanNil)) { */ case 10: - /* */ if (resCode === 100) { $s = 12; continue; } - /* */ if (resCode >= 200) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (resCode === 100) { */ case 12: - /* */ if (!(trace === ptrType$19.nil) && !(trace.Got100Continue === $throwNilPointerError)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.Got100Continue === $throwNilPointerError)) { */ case 15: - $r = trace.Got100Continue(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 16: - $r = $send(continueCh, $clone(new structType.ptr(), structType)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - continueCh = $chanNil; - $s = 14; continue; - /* } else if (resCode >= 200) { */ case 13: - $close(continueCh); - continueCh = $chanNil; - /* } */ case 14: - /* } */ case 11: - is1xx = 100 <= resCode && resCode <= 199; - is1xxNonTerminal = is1xx && !((resCode === 101)); - /* */ if (is1xxNonTerminal) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (is1xxNonTerminal) { */ case 19: - num1xx = num1xx + (1) >> 0; - if (num1xx > 5) { - _tmp = ptrType$18.nil; - _tmp$1 = errors.New("net/http: too many 1xx informational responses"); - resp = _tmp; - err = _tmp$1; - $s = -1; return [resp, err]; - } - pc.readLimit = pc.maxHeaderResponseSize(); - /* */ if (!(trace === ptrType$19.nil) && !(trace.Got1xxResponse === $throwNilPointerError)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.Got1xxResponse === $throwNilPointerError)) { */ case 21: - _r$3 = trace.Got1xxResponse(resCode, (resp.Header)); /* */ $s = 23; case 23: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$2 = _r$3; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - _tmp$2 = ptrType$18.nil; - _tmp$3 = err$2; - resp = _tmp$2; - err = _tmp$3; - $s = -1; return [resp, err]; - } - /* } */ case 22: - /* continue; */ $s = 7; continue; - /* } */ case 20: - /* break; */ $s = 8; continue; - case 8: - _r$4 = resp.isProtocolSwitch(); /* */ $s = 26; case 26: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (_r$4) { */ case 24: - resp.Body = newReadWriteCloserBody(pc.br, pc.conn); - /* } */ case 25: - resp.TLS = pc.tlsState; - $s = -1; return [resp, err]; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.readResponse, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, continueCh, err, err$1, err$2, is1xx, is1xxNonTerminal, num1xx, pc, peek, rc, resCode, resp, trace, $s};return $f; - }; - persistConn.prototype.readResponse = function(rc, trace) { return this.$val.readResponse(rc, trace); }; - persistConn.ptr.prototype.waitForContinue = function(continueCh) { - var continueCh, pc; - pc = this; - if (continueCh === $chanNil) { - return $throwNilPointerError; - } - return (function $b() { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _selection, _tuple, ok, timer, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r$1 = time.NewTimer(pc.t.ExpectContinueTimeout); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - timer = _r$1; - $deferred.push([$methodVal(timer, "Stop"), []]); - _r$2 = $select([[continueCh], [timer.C], [pc.closech]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection = _r$2; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ if (_selection[0] === 2) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_selection[0] === 0) { */ case 3: - _tuple = _selection[1]; - ok = _tuple[1]; - $24r = ok; - $s = 7; case 7: return $24r; - /* } else if (_selection[0] === 1) { */ case 4: - $24r$1 = true; - $s = 8; case 8: return $24r$1; - /* } else if (_selection[0] === 2) { */ case 5: - $24r$2 = false; - $s = 9; case 9: return $24r$2; - /* } */ case 6: - $s = -1; return false; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _selection, _tuple, ok, timer, $s, $deferred};return $f; } } - }); - }; - persistConn.prototype.waitForContinue = function(continueCh) { return this.$val.waitForContinue(continueCh); }; - newReadWriteCloserBody = function(br, rwc) { - var body$1, br, rwc; - body$1 = new readWriteCloserBody.ptr(arrayType.zero(), ptrType$29.nil, rwc); - if (!((br.Buffered() === 0))) { - body$1.br = br; - } - return body$1; - }; - readWriteCloserBody.ptr.prototype.Read = function(p) { - var {$24r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, b, err, n, n$1, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - /* */ if (!(b.br === ptrType$29.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(b.br === ptrType$29.nil)) { */ case 1: - n$1 = b.br.Buffered(); - if (p.$length > n$1) { - p = $subslice(p, 0, n$1); - } - _r$1 = b.br.Read(p); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - if (b.br.Buffered() === 0) { - b.br = ptrType$29.nil; - } - _tmp = n; - _tmp$1 = err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* } */ case 2: - _r$2 = b.ReadWriteCloser.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: readWriteCloserBody.ptr.prototype.Read, $c: true, $r, $24r, _r$1, _r$2, _tmp, _tmp$1, _tuple, _tuple$1, b, err, n, n$1, p, $s};return $f; - }; - readWriteCloserBody.prototype.Read = function(p) { return this.$val.Read(p); }; - persistConn.ptr.prototype.writeLoop = function() { - var {_arg, _r$1, _r$2, _r$3, _selection, _tuple, bre, err, ok, pc, startBytesWritten, wr, x$5, x$6, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pc = this; - $deferred.push([function(_arg) { $close(_arg); }, [pc.writeLoopDone]]); - /* while (true) { */ case 1: - _r$1 = $select([[pc.writech], [pc.closech]]); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = _r$1; - /* */ if (_selection[0] === 0) { $s = 4; continue; } - /* */ if (_selection[0] === 1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_selection[0] === 0) { */ case 4: - wr = $clone(_selection[1][0], writeRequest); - startBytesWritten = pc.nwrite; - _r$2 = wr.req.Request.write(pc.bw, pc.isProxy, wr.req.extra, pc.waitForContinue(wr.continueCh)); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - _tuple = $assertType(err, requestBodyReadError, true); - bre = $clone(_tuple[0], requestBodyReadError); - ok = _tuple[1]; - /* */ if (ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ok) { */ case 8: - err = bre.error; - $r = wr.req.setError(err); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 11: - _r$3 = pc.bw.Flush(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - /* } */ case 12: - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ((x$5 = pc.nwrite, (x$5.$high === startBytesWritten.$high && x$5.$low === startBytesWritten.$low))) { - err = (x$6 = new nothingWrittenError.ptr(err), new x$6.constructor.elem(x$6)); - } - } - $r = $send(pc.writeErrCh, err); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = $send(wr.ch, err); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 16: - $r = pc.close(err); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 19; case 19: return; - /* } */ case 17: - $s = 6; continue; - /* } else if (_selection[0] === 1) { */ case 5: - $s = 20; case 20: return; - /* } */ case 6: - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.writeLoop, $c: true, $r, _arg, _r$1, _r$2, _r$3, _selection, _tuple, bre, err, ok, pc, startBytesWritten, wr, x$5, x$6, $s, $deferred};return $f; } } - }; - persistConn.prototype.writeLoop = function() { return this.$val.writeLoop(); }; - persistConn.ptr.prototype.wroteRequest = function() { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _selection, _selection$1, err, err$1, pc, t, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pc = this; - _selection = $select([[pc.writeErrCh], []]); - /* */ if (_selection[0] === 0) { $s = 1; continue; } - /* */ if (_selection[0] === 1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_selection[0] === 0) { */ case 1: - err = _selection[1][0]; - $24r = $interfaceIsEqual(err, $ifaceNil); - $s = 4; case 4: return $24r; - /* } else if (_selection[0] === 1) { */ case 2: - _r$1 = time.NewTimer(new time.Duration(0, 50000000)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t = _r$1; - $deferred.push([$methodVal(t, "Stop"), []]); - _r$2 = $select([[pc.writeErrCh], [t.C]]); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection$1 = _r$2; - /* */ if (_selection$1[0] === 0) { $s = 7; continue; } - /* */ if (_selection$1[0] === 1) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_selection$1[0] === 0) { */ case 7: - err$1 = _selection$1[1][0]; - $24r$1 = $interfaceIsEqual(err$1, $ifaceNil); - $s = 10; case 10: return $24r$1; - /* } else if (_selection$1[0] === 1) { */ case 8: - $24r$2 = false; - $s = 11; case 11: return $24r$2; - /* } */ case 9: - /* } */ case 3: - $s = -1; return false; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.wroteRequest, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _selection, _selection$1, err, err$1, pc, t, $s, $deferred};return $f; } } - }; - persistConn.prototype.wroteRequest = function() { return this.$val.wroteRequest(); }; - httpError.ptr.prototype.Error = function() { - var e; - e = this; - return e.err; - }; - httpError.prototype.Error = function() { return this.$val.Error(); }; - httpError.ptr.prototype.Timeout = function() { - var e; - e = this; - return e.timeout; - }; - httpError.prototype.Timeout = function() { return this.$val.Timeout(); }; - httpError.ptr.prototype.Temporary = function() { - var e; - e = this; - return true; - }; - httpError.prototype.Temporary = function() { return this.$val.Temporary(); }; - nop = function() { - }; - persistConn.ptr.prototype.roundTrip = function(req) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _v, _v$1, _v$2, _v$3, cancelChan, canceled, continueCh, ctxDoneChan, d, err, err$1, gone, headerFn, pc, pcClosed, re, req, requestedGzip, resc, resp, respHeaderTimer, startBytesWritten, timer, writeErrCh, $s, $deferred, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - pc = [pc]; - req = [req]; - resp = ptrType$18.nil; - err[0] = $ifaceNil; - pc[0] = this; - $r = testHookEnterRoundTrip(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = pc[0].t.replaceReqCanceler($clone(req[0].cancelKey, cancelKey), $methodVal(pc[0], "cancelRequest")); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!_r$1) { */ case 2: - $r = pc[0].t.putOrCloseIdleConn(pc[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = ptrType$18.nil; - _tmp$1 = errRequestCanceled; - resp = _tmp; - err[0] = _tmp$1; - $24r = [resp, err[0]]; - $s = 6; case 6: return $24r; - /* } */ case 3: - $r = pc[0].mu.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pc[0].numExpectedResponses = pc[0].numExpectedResponses + (1) >> 0; - headerFn = pc[0].mutateHeaderFunc; - $r = pc[0].mu.Unlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!(headerFn === $throwNilPointerError)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(headerFn === $throwNilPointerError)) { */ case 9: - $r = headerFn(req[0].extraHeaders()); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - requestedGzip = false; - if (!(!pc[0].t.DisableCompression)) { _v$1 = false; $s = 15; continue s; } - _r$2 = new Header(req[0].Request.Header).Get("Accept-Encoding"); /* */ $s = 16; case 16: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v$1 = _r$2 === ""; case 15: - if (!(_v$1)) { _v = false; $s = 14; continue s; } - _r$3 = new Header(req[0].Request.Header).Get("Range"); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v = _r$3 === ""; case 14: - /* */ if (_v && !(req[0].Request.Method === "HEAD")) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_v && !(req[0].Request.Method === "HEAD")) { */ case 12: - requestedGzip = true; - $r = new Header(req[0].extraHeaders()).Set("Accept-Encoding", "gzip"); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - continueCh = $chanNil; - if (req[0].Request.ProtoAtLeast(1, 1) && !($interfaceIsEqual(req[0].Request.Body, $ifaceNil)) && req[0].Request.expectsContinue()) { - continueCh = new $Chan(structType, 1); - } - if (!(pc[0].t.DisableKeepAlives && !req[0].Request.wantsClose())) { _v$2 = false; $s = 21; continue s; } - _r$4 = isProtocolSwitchHeader(req[0].Request.Header); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v$2 = !_r$4; case 21: - /* */ if (_v$2) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_v$2) { */ case 19: - $r = new Header(req[0].extraHeaders()).Set("Connection", "close"); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 20: - gone = new $Chan(structType, 0); - $deferred.push([function(_arg) { $close(_arg); }, [gone]]); - $deferred.push([(function(err, pc, req) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 1: - $r = pc[0].t.setReqCanceler($clone(req[0].cancelKey, cancelKey), $throwNilPointerError); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(err, pc, req), []]); - startBytesWritten = pc[0].nwrite; - writeErrCh = new $Chan($error, 1); - $r = $send(pc[0].writech, $clone(new writeRequest.ptr(req[0], writeErrCh, continueCh), writeRequest)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - resc = new $Chan(responseAndError, 0); - $r = $send(pc[0].reqch, $clone(new requestAndChan.ptr(arrayType.zero(), req[0].Request, $clone(req[0].cancelKey, cancelKey), resc, requestedGzip, continueCh, gone), requestAndChan)); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - respHeaderTimer = $chanNil; - cancelChan = req[0].Request.Cancel; - _r$5 = req[0].Request.Context().Done(); /* */ $s = 26; case 26: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - ctxDoneChan = _r$5; - pcClosed = pc[0].closech; - canceled = false; - /* while (true) { */ case 27: - $r = testHookWaitResLoop(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = $select([[writeErrCh], [pcClosed], [respHeaderTimer], [resc], [cancelChan], [ctxDoneChan]]); /* */ $s = 30; case 30: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _selection = _r$6; - /* */ if (_selection[0] === 0) { $s = 31; continue; } - /* */ if (_selection[0] === 1) { $s = 32; continue; } - /* */ if (_selection[0] === 2) { $s = 33; continue; } - /* */ if (_selection[0] === 3) { $s = 34; continue; } - /* */ if (_selection[0] === 4) { $s = 35; continue; } - /* */ if (_selection[0] === 5) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (_selection[0] === 0) { */ case 31: - err$1 = _selection[1][0]; - /* */ if (false) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (false) { */ case 38: - $r = req[0].logf("writeErrCh resv: %T/%#v", new sliceType([err$1, err$1])); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 39: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 41: - _r$7 = fmt.Errorf("write error: %v", new sliceType([err$1])); /* */ $s = 43; case 43: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = pc[0].close(_r$7); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = ptrType$18.nil; - _r$8 = pc[0].mapRoundTripError(req[0], startBytesWritten, err$1); /* */ $s = 45; case 45: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tmp$3 = _r$8; - resp = _tmp$2; - err[0] = _tmp$3; - $24r$1 = [resp, err[0]]; - $s = 46; case 46: return $24r$1; - /* } */ case 42: - d = pc[0].t.ResponseHeaderTimeout; - /* */ if ((d.$high > 0 || (d.$high === 0 && d.$low > 0))) { $s = 47; continue; } - /* */ $s = 48; continue; - /* if ((d.$high > 0 || (d.$high === 0 && d.$low > 0))) { */ case 47: - /* */ if (false) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (false) { */ case 49: - $r = req[0].logf("starting timer for %v", new sliceType([d])); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 50: - _r$9 = time.NewTimer(d); /* */ $s = 52; case 52: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - timer = _r$9; - $deferred.push([$methodVal(timer, "Stop"), []]); - respHeaderTimer = timer.C; - /* } */ case 48: - $s = 37; continue; - /* } else if (_selection[0] === 1) { */ case 32: - pcClosed = $chanNil; - if (canceled) { _v$3 = true; $s = 55; continue s; } - _r$10 = pc[0].t.replaceReqCanceler($clone(req[0].cancelKey, cancelKey), $throwNilPointerError); /* */ $s = 56; case 56: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _v$3 = _r$10; case 55: - /* */ if (_v$3) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if (_v$3) { */ case 53: - /* */ if (false) { $s = 57; continue; } - /* */ $s = 58; continue; - /* if (false) { */ case 57: - $r = req[0].logf("closech recv: %T %#v", new sliceType([pc[0].closed, pc[0].closed])); /* */ $s = 59; case 59: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 58: - _tmp$4 = ptrType$18.nil; - _r$11 = pc[0].mapRoundTripError(req[0], startBytesWritten, pc[0].closed); /* */ $s = 60; case 60: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _tmp$5 = _r$11; - resp = _tmp$4; - err[0] = _tmp$5; - $24r$2 = [resp, err[0]]; - $s = 61; case 61: return $24r$2; - /* } */ case 54: - $s = 37; continue; - /* } else if (_selection[0] === 2) { */ case 33: - /* */ if (false) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (false) { */ case 62: - $r = req[0].logf("timeout waiting for response headers.", new sliceType([])); /* */ $s = 64; case 64: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 63: - $r = pc[0].close(errTimeout); /* */ $s = 65; case 65: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$6 = ptrType$18.nil; - _tmp$7 = errTimeout; - resp = _tmp$6; - err[0] = _tmp$7; - $24r$3 = [resp, err[0]]; - $s = 66; case 66: return $24r$3; - /* } else if (_selection[0] === 3) { */ case 34: - re = $clone(_selection[1][0], responseAndError); - /* */ if ((re.res === ptrType$18.nil) === ($interfaceIsEqual(re.err, $ifaceNil))) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if ((re.res === ptrType$18.nil) === ($interfaceIsEqual(re.err, $ifaceNil))) { */ case 67: - _r$12 = fmt.Sprintf("internal error: exactly one of res or err should be set; nil=%v", new sliceType([new $Bool(re.res === ptrType$18.nil)])); /* */ $s = 69; case 69: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - $panic(new $String(_r$12)); - /* } */ case 68: - /* */ if (false) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if (false) { */ case 70: - $r = req[0].logf("resc recv: %p, %T/%#v", new sliceType([re.res, re.err, re.err])); /* */ $s = 72; case 72: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 71: - /* */ if (!($interfaceIsEqual(re.err, $ifaceNil))) { $s = 73; continue; } - /* */ $s = 74; continue; - /* if (!($interfaceIsEqual(re.err, $ifaceNil))) { */ case 73: - _tmp$8 = ptrType$18.nil; - _r$13 = pc[0].mapRoundTripError(req[0], startBytesWritten, re.err); /* */ $s = 75; case 75: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _tmp$9 = _r$13; - resp = _tmp$8; - err[0] = _tmp$9; - $24r$4 = [resp, err[0]]; - $s = 76; case 76: return $24r$4; - /* } */ case 74: - _tmp$10 = re.res; - _tmp$11 = $ifaceNil; - resp = _tmp$10; - err[0] = _tmp$11; - $24r$5 = [resp, err[0]]; - $s = 77; case 77: return $24r$5; - /* } else if (_selection[0] === 4) { */ case 35: - _r$14 = pc[0].t.cancelRequest($clone(req[0].cancelKey, cancelKey), errRequestCanceled); /* */ $s = 78; case 78: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - canceled = _r$14; - cancelChan = $chanNil; - $s = 37; continue; - /* } else if (_selection[0] === 5) { */ case 36: - _arg$1 = $clone(req[0].cancelKey, cancelKey); - _r$15 = req[0].Request.Context().Err(); /* */ $s = 79; case 79: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _arg$2 = _r$15; - _r$16 = pc[0].t.cancelRequest(_arg$1, _arg$2); /* */ $s = 80; case 80: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - canceled = _r$16; - cancelChan = $chanNil; - ctxDoneChan = $chanNil; - /* } */ case 37: - $s = 27; continue; - case 28: - $s = -1; return [resp, err[0]]; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [resp, err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.roundTrip, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _arg, _arg$1, _arg$2, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _v, _v$1, _v$2, _v$3, cancelChan, canceled, continueCh, ctxDoneChan, d, err, err$1, gone, headerFn, pc, pcClosed, re, req, requestedGzip, resc, resp, respHeaderTimer, startBytesWritten, timer, writeErrCh, $s, $deferred};return $f; } } - }; - persistConn.prototype.roundTrip = function(req) { return this.$val.roundTrip(req); }; - transportRequest.ptr.prototype.logf = function(format, args) { - var {_r$1, _r$2, _r$3, _tuple, args, format, logf$1, ok, tr, x$5, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - tr = this; - _r$1 = tr.Request.Context().Value((x$5 = new tLogKey.ptr(), new x$5.constructor.elem(x$5))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = $assertType(_r$1, funcType$1, true); - logf$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$2 = time.Now(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, time.Time).Format("2006-01-02T15:04:05.999999999Z07:00"); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $r = logf$1(_r$3 + ": " + format, args); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: transportRequest.ptr.prototype.logf, $c: true, $r, _r$1, _r$2, _r$3, _tuple, args, format, logf$1, ok, tr, x$5, $s};return $f; - }; - transportRequest.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; - persistConn.ptr.prototype.markReused = function() { - var {pc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pc.reused = true; - $r = pc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.markReused, $c: true, $r, pc, $s};return $f; - }; - persistConn.prototype.markReused = function() { return this.$val.markReused(); }; - persistConn.ptr.prototype.close = function(err) { - var {err, pc, $s, $deferred, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pc = this; - $r = pc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(pc.mu, "Unlock"), []]); - $r = pc.closeLocked(err); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: persistConn.ptr.prototype.close, $c: true, $r, err, pc, $s, $deferred};return $f; } } - }; - persistConn.prototype.close = function(err) { return this.$val.close(err); }; - persistConn.ptr.prototype.closeLocked = function(err) { - var {_r$1, err, pc, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pc = this; - if ($interfaceIsEqual(err, $ifaceNil)) { - $panic(new $String("nil error")); - } - pc.broken = true; - /* */ if ($interfaceIsEqual(pc.closed, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(pc.closed, $ifaceNil)) { */ case 1: - pc.closed = err; - $r = pc.t.decConnsPerHost($clone(pc.cacheKey, connectMethodKey)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($interfaceIsEqual(pc.alt, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(pc.alt, $ifaceNil)) { */ case 4: - /* */ if (!($interfaceIsEqual(err, errCallerOwnsConn))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, errCallerOwnsConn))) { */ case 6: - _r$1 = pc.conn.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 7: - $close(pc.closech); - /* } */ case 5: - /* } */ case 2: - pc.mutateHeaderFunc = $throwNilPointerError; - $s = -1; return; - /* */ } return; } var $f = {$blk: persistConn.ptr.prototype.closeLocked, $c: true, $r, _r$1, err, pc, $s};return $f; - }; - persistConn.prototype.closeLocked = function(err) { return this.$val.closeLocked(err); }; - canonicalAddr = function(url$1) { - var {_entry, _r$1, _tuple, addr, err, port, url$1, v, $s, $r, $c} = $restore(this, {url$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addr = url$1.Hostname(); - _r$1 = idnaASCII(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - v = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - addr = v; - } - port = url$1.Port(); - if (port === "") { - port = (_entry = portMap[$String.keyFor(url$1.Scheme)], _entry !== undefined ? _entry.v : ""); - } - $s = -1; return net.JoinHostPort(addr, port); - /* */ } return; } var $f = {$blk: canonicalAddr, $c: true, $r, _entry, _r$1, _tuple, addr, err, port, url$1, v, $s};return $f; - }; - bodyEOFSignal.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, closed, err, es, n, p, rerr, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - n = 0; - err = $ifaceNil; - es = this; - $r = es.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = es.closed; - _tmp$1 = es.rerr; - closed = _tmp; - rerr = _tmp$1; - $r = es.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (closed) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (closed) { */ case 3: - _tmp$2 = 0; - _tmp$3 = errReadOnClosedResBody; - n = _tmp$2; - err = _tmp$3; - $24r = [n, err]; - $s = 5; case 5: return $24r; - /* } */ case 4: - /* */ if (!($interfaceIsEqual(rerr, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(rerr, $ifaceNil))) { */ case 6: - _tmp$4 = 0; - _tmp$5 = rerr; - n = _tmp$4; - err = _tmp$5; - $24r$1 = [n, err]; - $s = 8; case 8: return $24r$1; - /* } */ case 7: - _r$1 = es.body.Read(p); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 10: - $r = es.mu.Lock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(es.mu, "Unlock"), []]); - if ($interfaceIsEqual(es.rerr, $ifaceNil)) { - es.rerr = err; - } - _r$2 = es.condfn(err); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* } */ case 11: - $24r$2 = [n, err]; - $s = 14; case 14: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: bodyEOFSignal.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, closed, err, es, n, p, rerr, $s, $deferred};return $f; } } - }; - bodyEOFSignal.prototype.Read = function(p) { return this.$val.Read(p); }; - bodyEOFSignal.ptr.prototype.Close = function() { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, err, es, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - es = this; - $r = es.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(es.mu, "Unlock"), []]); - /* */ if (es.closed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (es.closed) { */ case 2: - $24r = $ifaceNil; - $s = 4; case 4: return $24r; - /* } */ case 3: - es.closed = true; - /* */ if (!(es.earlyCloseFn === $throwNilPointerError) && !($interfaceIsEqual(es.rerr, io.EOF))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(es.earlyCloseFn === $throwNilPointerError) && !($interfaceIsEqual(es.rerr, io.EOF))) { */ case 5: - _r$1 = es.earlyCloseFn(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - _r$2 = es.body.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - _r$3 = es.condfn(err); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 11; case 11: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: bodyEOFSignal.ptr.prototype.Close, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, err, es, $s, $deferred};return $f; } } - }; - bodyEOFSignal.prototype.Close = function() { return this.$val.Close(); }; - bodyEOFSignal.ptr.prototype.condfn = function(err) { - var {_r$1, err, es, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - es = this; - if (es.fn === $throwNilPointerError) { - $s = -1; return err; - } - _r$1 = es.fn(err); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - es.fn = $throwNilPointerError; - $s = -1; return err; - /* */ } return; } var $f = {$blk: bodyEOFSignal.ptr.prototype.condfn, $c: true, $r, _r$1, err, es, $s};return $f; - }; - bodyEOFSignal.prototype.condfn = function(err) { return this.$val.condfn(err); }; - gzipReader.ptr.prototype.Read = function(p) { - var {$24r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, gz, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - gz = this; - /* */ if (gz.zr === ptrType$33.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (gz.zr === ptrType$33.nil) { */ case 1: - /* */ if ($interfaceIsEqual(gz.zerr, $ifaceNil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($interfaceIsEqual(gz.zerr, $ifaceNil)) { */ case 3: - _r$1 = gzip.NewReader(gz.body); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - gz.zr = _tuple[0]; - gz.zerr = _tuple[1]; - /* } */ case 4: - if (!($interfaceIsEqual(gz.zerr, $ifaceNil))) { - _tmp = 0; - _tmp$1 = gz.zerr; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* } */ case 2: - $r = gz.body.mu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (gz.body.closed) { - err = errReadOnClosedResBody; - } - $r = gz.body.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$2 = 0; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - _r$2 = gz.zr.Read(p); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 9; case 9: return $24r; - /* */ } return; } var $f = {$blk: gzipReader.ptr.prototype.Read, $c: true, $r, $24r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, gz, n, p, $s};return $f; - }; - gzipReader.prototype.Read = function(p) { return this.$val.Read(p); }; - gzipReader.ptr.prototype.Close = function() { - var {$24r, _r$1, gz, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - gz = this; - _r$1 = gz.body.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: gzipReader.ptr.prototype.Close, $c: true, $r, $24r, _r$1, gz, $s};return $f; - }; - gzipReader.prototype.Close = function() { return this.$val.Close(); }; - tlsHandshakeTimeoutError.ptr.prototype.Timeout = function() { - return true; - }; - tlsHandshakeTimeoutError.prototype.Timeout = function() { return this.$val.Timeout(); }; - tlsHandshakeTimeoutError.ptr.prototype.Temporary = function() { - return true; - }; - tlsHandshakeTimeoutError.prototype.Temporary = function() { return this.$val.Temporary(); }; - tlsHandshakeTimeoutError.ptr.prototype.Error = function() { - return "net/http: TLS handshake timeout"; - }; - tlsHandshakeTimeoutError.prototype.Error = function() { return this.$val.Error(); }; - fakeLocker.ptr.prototype.Lock = function() { - }; - fakeLocker.prototype.Lock = function() { return this.$val.Lock(); }; - fakeLocker.ptr.prototype.Unlock = function() { - }; - fakeLocker.prototype.Unlock = function() { return this.$val.Unlock(); }; - cloneTLSConfig = function(cfg) { - var {$24r, _r$1, cfg, $s, $r, $c} = $restore(this, {cfg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (cfg === ptrType$4.nil) { - $s = -1; return new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$13.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$34.nil, sliceType$2.nil, "", 0, ptrType$34.nil, false, sliceType$14.nil, false, false, arrayType$1.zero(), $ifaceNil, 0, 0, sliceType$15.nil, false, 0, $ifaceNil, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$16.nil, sliceType$16.nil); - } - _r$1 = cfg.Clone(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: cloneTLSConfig, $c: true, $r, $24r, _r$1, cfg, $s};return $f; - }; - connLRU.ptr.prototype.add = function(pc) { - var _entry, _key, _tuple, cl, ele, ok, pc; - cl = this; - if (cl.ll === ptrType$3.nil) { - cl.ll = list.New(); - cl.m = {}; - } - ele = cl.ll.PushFront(pc); - _tuple = (_entry = cl.m[ptrType$22.keyFor(pc)], _entry !== undefined ? [_entry.v, true] : [ptrType$23.nil, false]); - ok = _tuple[1]; - if (ok) { - $panic(new $String("persistConn was already in LRU")); - } - _key = pc; (cl.m || $throwRuntimeError("assignment to entry in nil map"))[ptrType$22.keyFor(_key)] = { k: _key, v: ele }; - }; - connLRU.prototype.add = function(pc) { return this.$val.add(pc); }; - connLRU.ptr.prototype.removeOldest = function() { - var cl, ele, pc; - cl = this; - ele = cl.ll.Back(); - pc = $assertType(ele.Value, ptrType$22); - cl.ll.Remove(ele); - delete cl.m[ptrType$22.keyFor(pc)]; - return pc; - }; - connLRU.prototype.removeOldest = function() { return this.$val.removeOldest(); }; - connLRU.ptr.prototype.remove = function(pc) { - var _entry, _tuple, cl, ele, ok, pc; - cl = this; - _tuple = (_entry = cl.m[ptrType$22.keyFor(pc)], _entry !== undefined ? [_entry.v, true] : [ptrType$23.nil, false]); - ele = _tuple[0]; - ok = _tuple[1]; - if (ok) { - cl.ll.Remove(ele); - delete cl.m[ptrType$22.keyFor(pc)]; - } - }; - connLRU.prototype.remove = function(pc) { return this.$val.remove(pc); }; - connLRU.ptr.prototype.len = function() { - var cl; - cl = this; - return $keys(cl.m).length; - }; - connLRU.prototype.len = function() { return this.$val.len(); }; - errorReader.ptr.prototype.Read = function(p) { - var _tmp, _tmp$1, err, n, p, r; - n = 0; - err = $ifaceNil; - r = this; - _tmp = 0; - _tmp$1 = r.err; - n = _tmp; - err = _tmp$1; - return [n, err]; - }; - errorReader.prototype.Read = function(p) { return this.$val.Read(p); }; - byteReader.ptr.prototype.Read = function(p) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, br, err, n, p; - n = 0; - err = $ifaceNil; - br = this; - if (br.done) { - _tmp = 0; - _tmp$1 = io.EOF; - n = _tmp; - err = _tmp$1; - return [n, err]; - } - if (p.$length === 0) { - _tmp$2 = 0; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - return [n, err]; - } - br.done = true; - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = br.b); - _tmp$4 = 1; - _tmp$5 = io.EOF; - n = _tmp$4; - err = _tmp$5; - return [n, err]; - }; - byteReader.prototype.Read = function(p) { return this.$val.Read(p); }; - newTransferWriter = function(r) { - var {$24r, _r$1, _r$2, _r$3, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, atLeastHTTP11, err, r, rr, rr$1, t, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = ptrType$35.nil; - err = $ifaceNil; - t = new transferWriter.ptr("", $ifaceNil, $ifaceNil, false, new $Int64(0, 0), false, sliceType$2.nil, false, false, false, $ifaceNil, false, $chanNil); - atLeastHTTP11 = false; - _ref = r; - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$11, true)[1]) { */ case 1: - rr = _ref.$val; - /* */ if (!((x$5 = rr.ContentLength, (x$5.$high === 0 && x$5.$low === 0))) && $interfaceIsEqual(rr.Body, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((x$5 = rr.ContentLength, (x$5.$high === 0 && x$5.$low === 0))) && $interfaceIsEqual(rr.Body, $ifaceNil)) { */ case 4: - _tmp = ptrType$35.nil; - _r$1 = fmt.Errorf("http: Request.ContentLength=%d with nil Body", new sliceType([rr.ContentLength])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$1 = _r$1; - t = _tmp; - err = _tmp$1; - $24r = [t, err]; - $s = 7; case 7: return $24r; - /* } */ case 5: - t.Method = valueOrDefault(rr.Method, "GET"); - t.Close = rr.Close; - t.TransferEncoding = rr.TransferEncoding; - t.Header = rr.Header; - t.Trailer = rr.Trailer; - t.Body = rr.Body; - t.BodyCloser = rr.Body; - t.ContentLength = rr.outgoingLength(); - if (!((x$6 = t.ContentLength, (x$6.$high < 0 || (x$6.$high === 0 && x$6.$low < 0))) && (t.TransferEncoding.$length === 0))) { _v = false; $s = 10; continue s; } - _r$2 = t.shouldSendChunkedRequestBody(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2; case 10: - /* */ if (_v) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_v) { */ case 8: - t.TransferEncoding = new sliceType$2(["chunked"]); - /* } */ case 9: - if (!(!((x$7 = t.ContentLength, (x$7.$high === 0 && x$7.$low === 0))))) { _v$1 = false; $s = 14; continue s; } - _r$3 = isKnownInMemoryReader(t.Body); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _v$1 = !_r$3; case 14: - /* */ if (_v$1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_v$1) { */ case 12: - t.FlushHeaders = true; - /* } */ case 13: - atLeastHTTP11 = true; - $s = 3; continue; - /* } else if ($assertType(_ref, ptrType$18, true)[1]) { */ case 2: - rr$1 = _ref.$val; - t.IsResponse = true; - if (!(rr$1.Request === ptrType$11.nil)) { - t.Method = rr$1.Request.Method; - } - t.Body = rr$1.Body; - t.BodyCloser = rr$1.Body; - t.ContentLength = rr$1.ContentLength; - t.Close = rr$1.Close; - t.TransferEncoding = rr$1.TransferEncoding; - t.Header = rr$1.Header; - t.Trailer = rr$1.Trailer; - atLeastHTTP11 = rr$1.ProtoAtLeast(1, 1); - t.ResponseToHEAD = noResponseBodyExpected(t.Method); - /* } */ case 3: - if (t.ResponseToHEAD) { - t.Body = $ifaceNil; - if (chunked(t.TransferEncoding)) { - t.ContentLength = new $Int64(-1, 4294967295); - } - } else { - if (!atLeastHTTP11 || $interfaceIsEqual(t.Body, $ifaceNil)) { - t.TransferEncoding = sliceType$2.nil; - } - if (chunked(t.TransferEncoding)) { - t.ContentLength = new $Int64(-1, 4294967295); - } else if ($interfaceIsEqual(t.Body, $ifaceNil)) { - t.ContentLength = new $Int64(0, 0); - } - } - if (!chunked(t.TransferEncoding)) { - t.Trailer = false; - } - _tmp$2 = t; - _tmp$3 = $ifaceNil; - t = _tmp$2; - err = _tmp$3; - $s = -1; return [t, err]; - /* */ } return; } var $f = {$blk: newTransferWriter, $c: true, $r, $24r, _r$1, _r$2, _r$3, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _v, _v$1, atLeastHTTP11, err, r, rr, rr$1, t, x$5, x$6, x$7, $s};return $f; - }; - transferWriter.ptr.prototype.shouldSendChunkedRequestBody = function() { - var {t, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if ((x$5 = t.ContentLength, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low >= 0))) || $interfaceIsEqual(t.Body, $ifaceNil)) { - $s = -1; return false; - } - if (t.Method === "CONNECT") { - $s = -1; return false; - } - /* */ if (requestMethodUsuallyLacksBody(t.Method)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (requestMethodUsuallyLacksBody(t.Method)) { */ case 1: - $r = t.probeRequestBody(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return !($interfaceIsEqual(t.Body, $ifaceNil)); - /* } */ case 2: - $s = -1; return true; - /* */ } return; } var $f = {$blk: transferWriter.ptr.prototype.shouldSendChunkedRequestBody, $c: true, $r, t, x$5, $s};return $f; - }; - transferWriter.prototype.shouldSendChunkedRequestBody = function() { return this.$val.shouldSendChunkedRequestBody(); }; - transferWriter.ptr.prototype.probeRequestBody = function() { - var {_r$1, _r$2, _selection, rres, t, timer, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = [t]; - t[0] = this; - t[0].ByteReadCh = new $Chan(readResult, 1); - $go((function(t) { return function $b(body$1) { - var {_r$1, _tuple, body$1, buf, rres, $s, $r, $c} = $restore(this, {body$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - buf = arrayType$2.zero(); - rres = new readResult.ptr(arrayType.zero(), 0, $ifaceNil, 0); - _r$1 = body$1.Read(new sliceType$3(buf)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - rres.n = _tuple[0]; - rres.err = _tuple[1]; - if (rres.n === 1) { - rres.b = buf[0]; - } - $r = $send(t[0].ByteReadCh, $clone($clone(rres, readResult), readResult)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $close(t[0].ByteReadCh); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _tuple, body$1, buf, rres, $s};return $f; - }; })(t), [t[0].Body]); - _r$1 = time.NewTimer(new time.Duration(0, 200000000)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - timer = _r$1; - _r$2 = $select([[t[0].ByteReadCh], [timer.C]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection = _r$2; - if (_selection[0] === 0) { - rres = $clone(_selection[1][0], readResult); - timer.Stop(); - if ((rres.n === 0) && $interfaceIsEqual(rres.err, io.EOF)) { - t[0].Body = $ifaceNil; - t[0].ContentLength = new $Int64(0, 0); - } else if (rres.n === 1) { - if (!($interfaceIsEqual(rres.err, $ifaceNil))) { - t[0].Body = io.MultiReader(new sliceType$17([new byteReader.ptr(rres.b, false), (x$5 = new errorReader.ptr(rres.err), new x$5.constructor.elem(x$5))])); - } else { - t[0].Body = io.MultiReader(new sliceType$17([new byteReader.ptr(rres.b, false), t[0].Body])); - } - } else if (!($interfaceIsEqual(rres.err, $ifaceNil))) { - t[0].Body = (x$6 = new errorReader.ptr(rres.err), new x$6.constructor.elem(x$6)); - } - } else if (_selection[0] === 1) { - t[0].Body = io.MultiReader(new sliceType$17([(x$7 = new finishAsyncByteRead.ptr(t[0]), new x$7.constructor.elem(x$7)), t[0].Body])); - t[0].FlushHeaders = true; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: transferWriter.ptr.prototype.probeRequestBody, $c: true, $r, _r$1, _r$2, _selection, rres, t, timer, x$5, x$6, x$7, $s};return $f; - }; - transferWriter.prototype.probeRequestBody = function() { return this.$val.probeRequestBody(); }; - noResponseBodyExpected = function(requestMethod) { - var requestMethod; - return requestMethod === "HEAD"; - }; - transferWriter.ptr.prototype.shouldSendContentLength = function() { - var t, x$5, x$6, x$7; - t = this; - if (chunked(t.TransferEncoding)) { - return false; - } - if ((x$5 = t.ContentLength, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 0)))) { - return true; - } - if ((x$6 = t.ContentLength, (x$6.$high < 0 || (x$6.$high === 0 && x$6.$low < 0)))) { - return false; - } - if (t.Method === "POST" || t.Method === "PUT" || t.Method === "PATCH") { - return true; - } - if ((x$7 = t.ContentLength, (x$7.$high === 0 && x$7.$low === 0)) && isIdentity(t.TransferEncoding)) { - if (t.Method === "GET" || t.Method === "HEAD") { - return false; - } - return true; - } - return false; - }; - transferWriter.prototype.shouldSendContentLength = function() { return this.$val.shouldSendContentLength(); }; - transferWriter.ptr.prototype.writeHeader = function(w, trace) { - var {$24r, _1, _entry, _i, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, err, err$1, err$2, err$3, err$4, k, keys, t, trace, w, $s, $r, $c} = $restore(this, {w, trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if (t.Close && !hasToken(new Header(t.Header).get("Connection"), "close")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (t.Close && !hasToken(new Header(t.Header).get("Connection"), "close")) { */ case 1: - _r$1 = io.WriteString(w, "Connection: close\r\n"); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 4: - $r = trace.WroteHeaderField("Connection", new sliceType$2(["close"])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - /* } */ case 2: - /* */ if (t.shouldSendContentLength()) { $s = 7; continue; } - /* */ if (chunked(t.TransferEncoding)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (t.shouldSendContentLength()) { */ case 7: - _r$2 = io.WriteString(w, "Content-Length: "); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - _r$3 = io.WriteString(w, strconv.FormatInt(t.ContentLength, 10) + "\r\n"); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - err$2 = _tuple$2[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 12: - $r = trace.WroteHeaderField("Content-Length", new sliceType$2([strconv.FormatInt(t.ContentLength, 10)])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - $s = 9; continue; - /* } else if (chunked(t.TransferEncoding)) { */ case 8: - _r$4 = io.WriteString(w, "Transfer-Encoding: chunked\r\n"); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - err$3 = _tuple$3[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 16: - $r = trace.WroteHeaderField("Transfer-Encoding", new sliceType$2(["chunked"])); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 17: - /* } */ case 9: - /* */ if (!(t.Trailer === false)) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!(t.Trailer === false)) { */ case 19: - keys = $makeSlice(sliceType$2, 0, $keys(t.Trailer).length); - _ref = t.Trailer; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 21: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 22; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 21; continue; - } - k = _entry.k; - _r$5 = CanonicalHeaderKey(k); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - k = _r$5; - _1 = k; - /* */ if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { */ case 25: - _r$6 = badStringError("invalid Trailer key", k); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r = _r$6; - $s = 28; case 28: return $24r; - /* } */ case 26: - case 24: - keys = $append(keys, k); - _i++; - $s = 21; continue; - case 22: - /* */ if (keys.$length > 0) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (keys.$length > 0) { */ case 29: - $r = sort.Strings(keys); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$7 = io.WriteString(w, "Trailer: " + strings.Join(keys, ",") + "\r\n"); /* */ $s = 32; case 32: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$4 = _r$7; - err$4 = _tuple$4[1]; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 33: - $r = trace.WroteHeaderField("Trailer", keys); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 34: - /* } */ case 30: - /* } */ case 20: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: transferWriter.ptr.prototype.writeHeader, $c: true, $r, $24r, _1, _entry, _i, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, err, err$1, err$2, err$3, err$4, k, keys, t, trace, w, $s};return $f; - }; - transferWriter.prototype.writeHeader = function(w, trace) { return this.$val.writeHeader(w, trace); }; - transferWriter.ptr.prototype.writeBody = function(w) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, body$1, bw, closed, cw, dst, err, err$1, err$2, ncopy, nextra, ok, t, w, x$5, x$6, x$7, x$8, x$9, $s, $deferred, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - closed = [closed]; - err = [err]; - t = [t]; - err[0] = $ifaceNil; - t[0] = this; - ncopy = new $Int64(0, 0); - closed[0] = false; - $deferred.push([(function(closed, err, t) { return function $b() { - var {_r$1, closeErr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (closed[0] || $interfaceIsEqual(t[0].BodyCloser, $ifaceNil)) { - $s = -1; return; - } - _r$1 = t[0].BodyCloser.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - closeErr = _r$1; - if (!($interfaceIsEqual(closeErr, $ifaceNil)) && $interfaceIsEqual(err[0], $ifaceNil)) { - err[0] = closeErr; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, closeErr, $s};return $f; - }; })(closed, err, t), []]); - /* */ if (!($interfaceIsEqual(t[0].Body, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(t[0].Body, $ifaceNil))) { */ case 1: - _r$1 = t[0].unwrapBody(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - body$1 = _r$1; - /* */ if (chunked(t[0].TransferEncoding)) { $s = 4; continue; } - /* */ if ((x$5 = t[0].ContentLength, (x$5.$high === -1 && x$5.$low === 4294967295))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (chunked(t[0].TransferEncoding)) { */ case 4: - _tuple = $assertType(w, ptrType$14, true); - bw = _tuple[0]; - ok = _tuple[1]; - if (ok && !t[0].IsResponse) { - w = new internal.FlushAfterChunkWriter.ptr(bw); - } - cw = internal.NewChunkedWriter(w); - _r$2 = t[0].doBodyCopy(cw, body$1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err[0] = _tuple$1[1]; - /* */ if ($interfaceIsEqual(err[0], $ifaceNil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(err[0], $ifaceNil)) { */ case 9: - _r$3 = cw.Close(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err[0] = _r$3; - /* } */ case 10: - $s = 7; continue; - /* } else if ((x$5 = t[0].ContentLength, (x$5.$high === -1 && x$5.$low === 4294967295))) { */ case 5: - dst = w; - if (t[0].Method === "CONNECT") { - dst = (x$6 = new bufioFlushWriter.ptr(dst), new x$6.constructor.elem(x$6)); - } - _r$4 = t[0].doBodyCopy(dst, body$1); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - ncopy = _tuple$2[0]; - err[0] = _tuple$2[1]; - $s = 7; continue; - /* } else { */ case 6: - _r$5 = t[0].doBodyCopy(w, io.LimitReader(body$1, t[0].ContentLength)); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - ncopy = _tuple$3[0]; - err[0] = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 14: - err[0] = err[0]; - $24r = err[0]; - $s = 16; case 16: return $24r; - /* } */ case 15: - nextra = new $Int64(0, 0); - _r$6 = t[0].doBodyCopy(io.Discard, body$1); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$4 = _r$6; - nextra = _tuple$4[0]; - err[0] = _tuple$4[1]; - ncopy = (x$7 = nextra, new $Int64(ncopy.$high + x$7.$high, ncopy.$low + x$7.$low)); - /* } */ case 7: - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 18: - err[0] = err[0]; - $24r$1 = err[0]; - $s = 20; case 20: return $24r$1; - /* } */ case 19: - /* } */ case 2: - /* */ if (!($interfaceIsEqual(t[0].BodyCloser, $ifaceNil))) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!($interfaceIsEqual(t[0].BodyCloser, $ifaceNil))) { */ case 21: - closed[0] = true; - _r$7 = t[0].BodyCloser.Close(); /* */ $s = 23; case 23: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err$1 = _r$7; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 24: - err[0] = err$1; - $24r$2 = err[0]; - $s = 26; case 26: return $24r$2; - /* } */ case 25: - /* } */ case 22: - /* */ if (!t[0].ResponseToHEAD && !((x$8 = t[0].ContentLength, (x$8.$high === -1 && x$8.$low === 4294967295))) && !((x$9 = t[0].ContentLength, (x$9.$high === ncopy.$high && x$9.$low === ncopy.$low)))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!t[0].ResponseToHEAD && !((x$8 = t[0].ContentLength, (x$8.$high === -1 && x$8.$low === 4294967295))) && !((x$9 = t[0].ContentLength, (x$9.$high === ncopy.$high && x$9.$low === ncopy.$low)))) { */ case 27: - _r$8 = fmt.Errorf("http: ContentLength=%d with Body length %d", new sliceType([t[0].ContentLength, ncopy])); /* */ $s = 29; case 29: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err[0] = _r$8; - $24r$3 = err[0]; - $s = 30; case 30: return $24r$3; - /* } */ case 28: - /* */ if (chunked(t[0].TransferEncoding)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (chunked(t[0].TransferEncoding)) { */ case 31: - /* */ if (!(t[0].Trailer === false)) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (!(t[0].Trailer === false)) { */ case 33: - _r$9 = new Header(t[0].Trailer).Write(w); /* */ $s = 35; case 35: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$2 = _r$9; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 36: - err[0] = err$2; - $24r$4 = err[0]; - $s = 38; case 38: return $24r$4; - /* } */ case 37: - /* } */ case 34: - _r$10 = io.WriteString(w, "\r\n"); /* */ $s = 39; case 39: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$5 = _r$10; - err[0] = _tuple$5[1]; - /* } */ case 32: - err[0] = err[0]; - $24r$5 = err[0]; - $s = 40; case 40: return $24r$5; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { var $f = {$blk: transferWriter.ptr.prototype.writeBody, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, body$1, bw, closed, cw, dst, err, err$1, err$2, ncopy, nextra, ok, t, w, x$5, x$6, x$7, x$8, x$9, $s, $deferred};return $f; } } - }; - transferWriter.prototype.writeBody = function(w) { return this.$val.writeBody(w); }; - transferWriter.ptr.prototype.doBodyCopy = function(dst, src) { - var {_r$1, _tuple, dst, err, n, src, t, $s, $r, $c} = $restore(this, {dst, src}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Int64(0, 0); - err = $ifaceNil; - t = this; - _r$1 = io.Copy(dst, src); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, io.EOF))) { - t.bodyReadError = err; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: transferWriter.ptr.prototype.doBodyCopy, $c: true, $r, _r$1, _tuple, dst, err, n, src, t, $s};return $f; - }; - transferWriter.prototype.doBodyCopy = function(dst, src) { return this.$val.doBodyCopy(dst, src); }; - transferWriter.ptr.prototype.unwrapBody = function() { - var {$24r, _r$1, _r$2, _r$3, _tuple, ok, r, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if ($interfaceIsEqual(reflect.TypeOf(t.Body), nopCloserType)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(reflect.TypeOf(t.Body), nopCloserType)) { */ case 1: - _r$1 = reflect.ValueOf(t.Body); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, reflect.Value).Field(0); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, reflect.Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = $assertType(_r$3, io.Reader); - $s = 6; case 6: return $24r; - /* } */ case 2: - _tuple = $assertType(t.Body, ptrType$20, true); - r = _tuple[0]; - ok = _tuple[1]; - if (ok) { - r.didRead = true; - $s = -1; return r.ReadCloser; - } - $s = -1; return t.Body; - /* */ } return; } var $f = {$blk: transferWriter.ptr.prototype.unwrapBody, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, ok, r, t, $s};return $f; - }; - transferWriter.prototype.unwrapBody = function() { return this.$val.unwrapBody(); }; - transferReader.ptr.prototype.protoAtLeast = function(m, n) { - var m, n, t; - t = this; - return t.ProtoMajor > m || ((t.ProtoMajor === m) && t.ProtoMinor >= n); - }; - transferReader.prototype.protoAtLeast = function(m, n) { return this.$val.protoAtLeast(m, n); }; - bodyAllowedForStatus = function(status) { - var status; - if (status >= 100 && status <= 199) { - return false; - } else if ((status === 204)) { - return false; - } else if ((status === 304)) { - return false; - } - return true; - }; - suppressedHeaders = function(status) { - var status; - if ((status === 304)) { - return suppressedHeaders304; - } else if (!bodyAllowedForStatus(status)) { - return suppressedHeadersNoBody; - } - return sliceType$2.nil; - }; - readTransfer = function(msg, r) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, isResponse, msg, n, r, realLength, rr, rr$1, rr$2, rr$3, rr$4, t, $s, $r, $c} = $restore(this, {msg, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - t = new transferReader.ptr(false, 0, "GET", 0, 0, $ifaceNil, new $Int64(0, 0), false, false, false); - isResponse = false; - _ref = msg; - /* */ if ($assertType(_ref, ptrType$18, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$11, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$18, true)[1]) { */ case 1: - rr = _ref.$val; - t.Header = rr.Header; - t.StatusCode = rr.StatusCode; - t.ProtoMajor = rr.ProtoMajor; - t.ProtoMinor = rr.ProtoMinor; - _r$1 = shouldClose(t.ProtoMajor, t.ProtoMinor, t.Header, true); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t.Close = _r$1; - isResponse = true; - if (!(rr.Request === ptrType$11.nil)) { - t.RequestMethod = rr.Request.Method; - } - $s = 4; continue; - /* } else if ($assertType(_ref, ptrType$11, true)[1]) { */ case 2: - rr$1 = _ref.$val; - t.Header = rr$1.Header; - t.RequestMethod = rr$1.Method; - t.ProtoMajor = rr$1.ProtoMajor; - t.ProtoMinor = rr$1.ProtoMinor; - t.StatusCode = 200; - t.Close = rr$1.Close; - $s = 4; continue; - /* } else { */ case 3: - rr$2 = _ref; - $panic(new $String("unexpected type")); - /* } */ case 4: - if ((t.ProtoMajor === 0) && (t.ProtoMinor === 0)) { - _tmp = 1; - _tmp$1 = 1; - t.ProtoMajor = _tmp; - t.ProtoMinor = _tmp$1; - } - _r$2 = t.parseTransferEncoding(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - err = err$1; - $s = -1; return err; - } - _r$3 = fixLength(isResponse, t.StatusCode, t.RequestMethod, t.Header, t.Chunked); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - realLength = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = err; - $s = -1; return err; - } - /* */ if (isResponse && t.RequestMethod === "HEAD") { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (isResponse && t.RequestMethod === "HEAD") { */ case 8: - _r$4 = parseContentLength(new Header(t.Header).get("Content-Length")); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - n = _tuple$1[0]; - err$2 = _tuple$1[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - err = err$2; - $s = -1; return err; - } else { - t.ContentLength = n; - } - $s = 10; continue; - /* } else { */ case 9: - t.ContentLength = realLength; - /* } */ case 10: - _r$5 = fixTrailer(t.Header, t.Chunked); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - t.Trailer = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - err = err; - $s = -1; return err; - } - _ref$1 = msg; - if ($assertType(_ref$1, ptrType$18, true)[1]) { - if ((realLength.$high === -1 && realLength.$low === 4294967295) && !t.Chunked && bodyAllowedForStatus(t.StatusCode)) { - t.Close = true; - } - } - if (t.Chunked) { - if (noResponseBodyExpected(t.RequestMethod) || !bodyAllowedForStatus(t.StatusCode)) { - t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); - } else { - t.Body = new body.ptr(internal.NewChunkedReader(r), msg, r, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError); - } - } else if ((realLength.$high === 0 && realLength.$low === 0)) { - t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); - } else if ((realLength.$high > 0 || (realLength.$high === 0 && realLength.$low > 0))) { - t.Body = new body.ptr(io.LimitReader(r, realLength), $ifaceNil, ptrType$29.nil, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError); - } else if (t.Close) { - t.Body = new body.ptr(r, $ifaceNil, ptrType$29.nil, t.Close, false, new sync.Mutex.ptr(0, 0), false, false, false, $throwNilPointerError); - } else { - t.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); - } - _ref$2 = msg; - if ($assertType(_ref$2, ptrType$11, true)[1]) { - rr$3 = _ref$2.$val; - rr$3.Body = t.Body; - rr$3.ContentLength = t.ContentLength; - if (t.Chunked) { - rr$3.TransferEncoding = new sliceType$2(["chunked"]); - } - rr$3.Close = t.Close; - rr$3.Trailer = t.Trailer; - } else if ($assertType(_ref$2, ptrType$18, true)[1]) { - rr$4 = _ref$2.$val; - rr$4.Body = t.Body; - rr$4.ContentLength = t.ContentLength; - if (t.Chunked) { - rr$4.TransferEncoding = new sliceType$2(["chunked"]); - } - rr$4.Close = t.Close; - rr$4.Trailer = t.Trailer; - } - err = $ifaceNil; - $s = -1; return err; - /* */ } return; } var $f = {$blk: readTransfer, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _ref$2, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, err, err$1, err$2, isResponse, msg, n, r, realLength, rr, rr$1, rr$2, rr$3, rr$4, t, $s};return $f; - }; - chunked = function(te) { - var te; - return te.$length > 0 && (0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "chunked"; - }; - isIdentity = function(te) { - var te; - return (te.$length === 1) && (0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "identity"; - }; - unsupportedTEError.ptr.prototype.Error = function() { - var uste; - uste = this; - return uste.err; - }; - unsupportedTEError.prototype.Error = function() { return this.$val.Error(); }; - isUnsupportedTEError = function(err) { - var _tuple, err, ok; - _tuple = $assertType(err, ptrType$36, true); - ok = _tuple[1]; - return ok; - }; - transferReader.ptr.prototype.parseTransferEncoding = function() { - var {$24r, $24r$1, _entry, _r$1, _r$2, _tuple, present, raw, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _tuple = (_entry = t.Header[$String.keyFor("Transfer-Encoding")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - raw = _tuple[0]; - present = _tuple[1]; - if (!present) { - $s = -1; return $ifaceNil; - } - delete t.Header[$String.keyFor("Transfer-Encoding")]; - if (!t.protoAtLeast(1, 1)) { - $s = -1; return $ifaceNil; - } - /* */ if (!((raw.$length === 1))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((raw.$length === 1))) { */ case 1: - _r$1 = fmt.Sprintf("too many transfer encodings: %q", new sliceType([raw])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = new unsupportedTEError.ptr(_r$1); - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if (!ascii.EqualFold((0 >= raw.$length ? ($throwRuntimeError("index out of range"), undefined) : raw.$array[raw.$offset + 0]), "chunked")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ascii.EqualFold((0 >= raw.$length ? ($throwRuntimeError("index out of range"), undefined) : raw.$array[raw.$offset + 0]), "chunked")) { */ case 5: - _r$2 = fmt.Sprintf("unsupported transfer encoding: %q", new sliceType([new $String((0 >= raw.$length ? ($throwRuntimeError("index out of range"), undefined) : raw.$array[raw.$offset + 0]))])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = new unsupportedTEError.ptr(_r$2); - $s = 8; case 8: return $24r$1; - /* } */ case 6: - delete t.Header[$String.keyFor("Content-Length")]; - t.Chunked = true; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: transferReader.ptr.prototype.parseTransferEncoding, $c: true, $r, $24r, $24r$1, _entry, _r$1, _r$2, _tuple, present, raw, t, $s};return $f; - }; - transferReader.prototype.parseTransferEncoding = function() { return this.$val.parseTransferEncoding(); }; - fixLength = function(isResponse, status, requestMethod, header, chunked$1) { - var {$24r, $24r$1, _1, _entry, _entry$1, _i, _q, _r$1, _r$2, _r$3, _ref, _tuple, chunked$1, cl, contentLens, ct, err, first, header, isRequest, isResponse, n, requestMethod, status, $s, $r, $c} = $restore(this, {isResponse, status, requestMethod, header, chunked$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - isRequest = !isResponse; - contentLens = (_entry = header[$String.keyFor("Content-Length")], _entry !== undefined ? _entry.v : sliceType$2.nil); - /* */ if (contentLens.$length > 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (contentLens.$length > 1) { */ case 1: - first = textproto.TrimString((0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0])); - _ref = $subslice(contentLens, 1); - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - ct = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (!(first === textproto.TrimString(ct))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(first === textproto.TrimString(ct))) { */ case 5: - _r$1 = fmt.Errorf("http: message cannot contain multiple Content-Length headers; got %q", new sliceType([contentLens])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [new $Int64(0, 0), _r$1]; - $s = 8; case 8: return $24r; - /* } */ case 6: - _i++; - $s = 3; continue; - case 4: - $r = new Header(header).Del("Content-Length"); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = new Header(header).Add("Content-Length", first); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - contentLens = (_entry$1 = header[$String.keyFor("Content-Length")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - /* } */ case 2: - /* */ if (noResponseBodyExpected(requestMethod)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (noResponseBodyExpected(requestMethod)) { */ case 11: - /* */ if (isRequest && contentLens.$length > 0 && !((contentLens.$length === 1) && (0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0]) === "0")) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (isRequest && contentLens.$length > 0 && !((contentLens.$length === 1) && (0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0]) === "0")) { */ case 13: - _r$2 = fmt.Errorf("http: method cannot contain a Content-Length; got %q", new sliceType([contentLens])); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [new $Int64(0, 0), _r$2]; - $s = 16; case 16: return $24r$1; - /* } */ case 14: - $s = -1; return [new $Int64(0, 0), $ifaceNil]; - /* } */ case 12: - if ((_q = status / 100, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) === 1) { - $s = -1; return [new $Int64(0, 0), $ifaceNil]; - } - _1 = status; - if ((_1 === (204)) || (_1 === (304))) { - $s = -1; return [new $Int64(0, 0), $ifaceNil]; - } - if (chunked$1) { - $s = -1; return [new $Int64(-1, 4294967295), $ifaceNil]; - } - cl = ""; - if (contentLens.$length === 1) { - cl = textproto.TrimString((0 >= contentLens.$length ? ($throwRuntimeError("index out of range"), undefined) : contentLens.$array[contentLens.$offset + 0])); - } - /* */ if (!(cl === "")) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!(cl === "")) { */ case 17: - _r$3 = parseContentLength(cl); /* */ $s = 19; case 19: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - n = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new $Int64(-1, 4294967295), err]; - } - $s = -1; return [n, $ifaceNil]; - /* } */ case 18: - $r = new Header(header).Del("Content-Length"); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (isRequest) { - $s = -1; return [new $Int64(0, 0), $ifaceNil]; - } - $s = -1; return [new $Int64(-1, 4294967295), $ifaceNil]; - /* */ } return; } var $f = {$blk: fixLength, $c: true, $r, $24r, $24r$1, _1, _entry, _entry$1, _i, _q, _r$1, _r$2, _r$3, _ref, _tuple, chunked$1, cl, contentLens, ct, err, first, header, isRequest, isResponse, n, requestMethod, status, $s};return $f; - }; - shouldClose = function(major, minor, header, removeCloseHeader) { - var {_entry, conv, hasClose, header, major, minor, removeCloseHeader, $s, $r, $c} = $restore(this, {major, minor, header, removeCloseHeader}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (major < 1) { - $s = -1; return true; - } - conv = (_entry = header[$String.keyFor("Connection")], _entry !== undefined ? _entry.v : sliceType$2.nil); - hasClose = httpguts.HeaderValuesContainsToken(conv, "close"); - if ((major === 1) && (minor === 0)) { - $s = -1; return hasClose || !httpguts.HeaderValuesContainsToken(conv, "keep-alive"); - } - /* */ if (hasClose && removeCloseHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (hasClose && removeCloseHeader) { */ case 1: - $r = new Header(header).Del("Connection"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return hasClose; - /* */ } return; } var $f = {$blk: shouldClose, $c: true, $r, _entry, conv, hasClose, header, major, minor, removeCloseHeader, $s};return $f; - }; - fixTrailer = function(header, chunked$1) { - var {_entry, _i, _ref, _tuple, chunked$1, err, header, ok, trailer, v, vv, $s, $r, $c} = $restore(this, {header, chunked$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = [err]; - trailer = [trailer]; - _tuple = (_entry = header[$String.keyFor("Trailer")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - vv = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - $s = -1; return [false, $ifaceNil]; - } - if (!chunked$1) { - $s = -1; return [false, $ifaceNil]; - } - $r = new Header(header).Del("Trailer"); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - trailer[0] = {}; - err[0] = $ifaceNil; - _ref = vv; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = foreachHeaderElement(v, (function(err, trailer) { return function $b(key) { - var {_1, _key, _r$1, _r$2, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = CanonicalHeaderKey(key); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - key = _r$1; - _1 = key; - /* */ if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { */ case 3: - /* */ if ($interfaceIsEqual(err[0], $ifaceNil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($interfaceIsEqual(err[0], $ifaceNil)) { */ case 5: - _r$2 = badStringError("bad trailer key", key); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err[0] = _r$2; - $s = -1; return; - /* } */ case 6: - /* } */ case 4: - case 2: - _key = key; (trailer[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$2.nil }; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _1, _key, _r$1, _r$2, key, $s};return $f; - }; })(err, trailer)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - if (!($interfaceIsEqual(err[0], $ifaceNil))) { - $s = -1; return [false, err[0]]; - } - if ($keys(trailer[0]).length === 0) { - $s = -1; return [false, $ifaceNil]; - } - $s = -1; return [trailer[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: fixTrailer, $c: true, $r, _entry, _i, _ref, _tuple, chunked$1, err, header, ok, trailer, v, vv, $s};return $f; - }; - body.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, _r$1, _tmp, _tmp$1, _tuple, b, err, n, p, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - n = 0; - err = $ifaceNil; - b = this; - $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(b.mu, "Unlock"), []]); - /* */ if (b.closed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (b.closed) { */ case 2: - _tmp = 0; - _tmp$1 = $pkg.ErrBodyReadAfterClose; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - _r$1 = b.readLocked(p); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r$1 = [n, err]; - $s = 6; case 6: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: body.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, _r$1, _tmp, _tmp$1, _tuple, b, err, n, p, $s, $deferred};return $f; } } - }; - body.prototype.Read = function(p) { return this.$val.Read(p); }; - body.ptr.prototype.readLocked = function(p) { - var {_r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, e, err, lr, lr$1, n, ok, ok$1, p, x$5, x$6, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - if (b.sawEOF) { - _tmp = 0; - _tmp$1 = io.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$1 = b.src.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - /* */ if ($interfaceIsEqual(err, io.EOF)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($interfaceIsEqual(err, io.EOF)) { */ case 2: - b.sawEOF = true; - /* */ if (!($interfaceIsEqual(b.hdr, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(b.hdr, $ifaceNil))) { */ case 4: - _r$2 = b.readTrailer(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - e = _r$2; - if (!($interfaceIsEqual(e, $ifaceNil))) { - err = e; - b.sawEOF = false; - b.closed = true; - } - b.hdr = $ifaceNil; - $s = 6; continue; - /* } else { */ case 5: - _tuple$1 = $assertType(b.src, ptrType$37, true); - lr = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok && (x$5 = lr.N, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 0)))) { - err = io.ErrUnexpectedEOF; - } - /* } */ case 6: - /* } */ case 3: - if ($interfaceIsEqual(err, $ifaceNil) && n > 0) { - _tuple$2 = $assertType(b.src, ptrType$37, true); - lr$1 = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (ok$1 && (x$6 = lr$1.N, (x$6.$high === 0 && x$6.$low === 0))) { - err = io.EOF; - b.sawEOF = true; - } - } - /* */ if (b.sawEOF && !(b.onHitEOF === $throwNilPointerError)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (b.sawEOF && !(b.onHitEOF === $throwNilPointerError)) { */ case 8: - $r = b.onHitEOF(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 9: - _tmp$2 = n; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: body.ptr.prototype.readLocked, $c: true, $r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, _tuple$2, b, e, err, lr, lr$1, n, ok, ok$1, p, x$5, x$6, $s};return $f; - }; - body.prototype.readLocked = function(p) { return this.$val.readLocked(p); }; - seeUpcomingDoubleCRLF = function(r) { - var {_r$1, _tuple, buf, err, peekSize, r, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - peekSize = 4; - /* while (true) { */ case 1: - _r$1 = r.Peek(peekSize); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - buf = _tuple[0]; - err = _tuple[1]; - if (bytes.HasSuffix(buf, doubleCRLF)) { - $s = -1; return true; - } - if (!($interfaceIsEqual(err, $ifaceNil))) { - /* break; */ $s = 2; continue; - } - peekSize = peekSize + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: seeUpcomingDoubleCRLF, $c: true, $r, _r$1, _tuple, buf, err, peekSize, r, $s};return $f; - }; - body.ptr.prototype.readTrailer = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, b, buf, err, hdr, rr, rr$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - _r$1 = b.r.Peek(2); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - buf = _tuple[0]; - err = _tuple[1]; - /* */ if (bytes.Equal(buf, singleCRLF)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (bytes.Equal(buf, singleCRLF)) { */ case 2: - _r$2 = b.r.Discard(2); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return $ifaceNil; - /* } */ case 3: - if (buf.$length < 2) { - $s = -1; return errTrailerEOF; - } - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = seeUpcomingDoubleCRLF(b.r); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (!_r$3) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!_r$3) { */ case 5: - $s = -1; return errors.New("http: suspiciously long trailer after chunked body"); - /* } */ case 6: - _r$4 = textproto.NewReader(b.r); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = _r$4.ReadMIMEHeader(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$1 = _r$5; - hdr = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - $s = -1; return errTrailerEOF; - } - $s = -1; return err; - } - _ref = b.hdr; - if ($assertType(_ref, ptrType$11, true)[1]) { - rr = _ref.$val; - mergeSetHeader((rr.$ptr_Trailer || (rr.$ptr_Trailer = new ptrType$38(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, rr))), (hdr)); - } else if ($assertType(_ref, ptrType$18, true)[1]) { - rr$1 = _ref.$val; - mergeSetHeader((rr$1.$ptr_Trailer || (rr$1.$ptr_Trailer = new ptrType$38(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, rr$1))), (hdr)); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: body.ptr.prototype.readTrailer, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, b, buf, err, hdr, rr, rr$1, $s};return $f; - }; - body.prototype.readTrailer = function() { return this.$val.readTrailer(); }; - mergeSetHeader = function(dst, src) { - var _entry, _i, _key, _keys, _ref, dst, k, src, vv; - if (dst.$get() === false) { - dst.$set(src); - return; - } - _ref = src; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - _key = k; (dst.$get() || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - _i++; - } - }; - body.ptr.prototype.unreadDataSizeLocked = function() { - var _tuple, b, lr, ok; - b = this; - _tuple = $assertType(b.src, ptrType$37, true); - lr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return lr.N; - } - return new $Int64(-1, 4294967295); - }; - body.prototype.unreadDataSizeLocked = function() { return this.$val.unreadDataSizeLocked(); }; - body.ptr.prototype.Close = function() { - var {$24r, $24r$1, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, err, lr, n, ok, x$5, x$6, x$7, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - b = this; - $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(b.mu, "Unlock"), []]); - /* */ if (b.closed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (b.closed) { */ case 2: - $24r = $ifaceNil; - $s = 4; case 4: return $24r; - /* } */ case 3: - err = $ifaceNil; - /* */ if (b.sawEOF) { $s = 6; continue; } - /* */ if ($interfaceIsEqual(b.hdr, $ifaceNil) && b.closing) { $s = 7; continue; } - /* */ if (b.doEarlyClose) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (b.sawEOF) { */ case 6: - $s = 10; continue; - /* } else if ($interfaceIsEqual(b.hdr, $ifaceNil) && b.closing) { */ case 7: - $s = 10; continue; - /* } else if (b.doEarlyClose) { */ case 8: - _tuple = $assertType(b.src, ptrType$37, true); - lr = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok && (x$5 = lr.N, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 262144)))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (ok && (x$5 = lr.N, (x$5.$high > 0 || (x$5.$high === 0 && x$5.$low > 262144)))) { */ case 11: - b.earlyClose = true; - $s = 13; continue; - /* } else { */ case 12: - n = new $Int64(0, 0); - _r$1 = io.CopyN(io.Discard, (x$6 = new bodyLocked.ptr(b), new x$6.constructor.elem(x$6)), new $Int64(0, 262144)); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - n = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, io.EOF)) { - err = $ifaceNil; - } - if ((n.$high === 0 && n.$low === 262144)) { - b.earlyClose = true; - } - /* } */ case 13: - $s = 10; continue; - /* } else { */ case 9: - _r$2 = io.Copy(io.Discard, (x$7 = new bodyLocked.ptr(b), new x$7.constructor.elem(x$7))); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - err = _tuple$2[1]; - /* } */ case 10: - case 5: - b.closed = true; - $24r$1 = err; - $s = 16; case 16: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: body.ptr.prototype.Close, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _tuple, _tuple$1, _tuple$2, b, err, lr, n, ok, x$5, x$6, x$7, $s, $deferred};return $f; } } - }; - body.prototype.Close = function() { return this.$val.Close(); }; - body.ptr.prototype.didEarlyClose = function() { - var {$24r, b, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - b = this; - $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(b.mu, "Unlock"), []]); - $24r = b.earlyClose; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: body.ptr.prototype.didEarlyClose, $c: true, $r, $24r, b, $s, $deferred};return $f; } } - }; - body.prototype.didEarlyClose = function() { return this.$val.didEarlyClose(); }; - body.ptr.prototype.bodyRemains = function() { - var {$24r, b, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - b = this; - $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(b.mu, "Unlock"), []]); - $24r = !b.sawEOF; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: body.ptr.prototype.bodyRemains, $c: true, $r, $24r, b, $s, $deferred};return $f; } } - }; - body.prototype.bodyRemains = function() { return this.$val.bodyRemains(); }; - body.ptr.prototype.registerOnHitEOF = function(fn) { - var {b, fn, $s, $deferred, $r, $c} = $restore(this, {fn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - b = this; - $r = b.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(b.mu, "Unlock"), []]); - b.onHitEOF = fn; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: body.ptr.prototype.registerOnHitEOF, $c: true, $r, b, fn, $s, $deferred};return $f; } } - }; - body.prototype.registerOnHitEOF = function(fn) { return this.$val.registerOnHitEOF(fn); }; - bodyLocked.ptr.prototype.Read = function(p) { - var {$24r, _r$1, _tmp, _tmp$1, _tuple, bl, err, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - bl = this; - if (bl.b.closed) { - _tmp = 0; - _tmp$1 = $pkg.ErrBodyReadAfterClose; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$1 = bl.b.readLocked(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: bodyLocked.ptr.prototype.Read, $c: true, $r, $24r, _r$1, _tmp, _tmp$1, _tuple, bl, err, n, p, $s};return $f; - }; - bodyLocked.prototype.Read = function(p) { return this.$val.Read(p); }; - parseContentLength = function(cl) { - var {$24r, _r$1, _tuple, cl, err, n, $s, $r, $c} = $restore(this, {cl}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cl = textproto.TrimString(cl); - if (cl === "") { - $s = -1; return [new $Int64(-1, 4294967295), $ifaceNil]; - } - _tuple = strconv.ParseUint(cl, 10, 63); - n = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - _r$1 = badStringError("bad Content-Length", cl); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [new $Int64(0, 0), _r$1]; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return [(new $Int64(n.$high, n.$low)), $ifaceNil]; - /* */ } return; } var $f = {$blk: parseContentLength, $c: true, $r, $24r, _r$1, _tuple, cl, err, n, $s};return $f; - }; - finishAsyncByteRead.ptr.prototype.Read = function(p) { - var {_r$1, _tmp, _tmp$1, err, fr, n, p, rres, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - fr = this; - if (p.$length === 0) { - $s = -1; return [n, err]; - } - _r$1 = $recv(fr.tw.ByteReadCh); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - rres = $clone(_r$1[0], readResult); - _tmp = rres.n; - _tmp$1 = rres.err; - n = _tmp; - err = _tmp$1; - if (n === 1) { - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = rres.b); - } - if ($interfaceIsEqual(err, $ifaceNil)) { - err = io.EOF; - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: finishAsyncByteRead.ptr.prototype.Read, $c: true, $r, _r$1, _tmp, _tmp$1, err, fr, n, p, rres, $s};return $f; - }; - finishAsyncByteRead.prototype.Read = function(p) { return this.$val.Read(p); }; - isKnownInMemoryReader = function(r) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, ok, r, r$1, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = r; - if ($assertType(_ref, ptrType$39, true)[1] || $assertType(_ref, ptrType$40, true)[1] || $assertType(_ref, ptrType$41, true)[1]) { - $s = -1; return true; - } - /* */ if ($interfaceIsEqual(reflect.TypeOf(r), nopCloserType)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(reflect.TypeOf(r), nopCloserType)) { */ case 1: - _r$1 = reflect.ValueOf(r); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, reflect.Value).Field(0); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, reflect.Value).Interface(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = isKnownInMemoryReader($assertType(_r$3, io.Reader)); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 7; case 7: return $24r; - /* } */ case 2: - _tuple = $assertType(r, ptrType$20, true); - r$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (ok) { */ case 8: - _r$5 = isKnownInMemoryReader(r$1.ReadCloser); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = _r$5; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - $s = -1; return false; - /* */ } return; } var $f = {$blk: isKnownInMemoryReader, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, ok, r, r$1, $s};return $f; - }; - bufioFlushWriter.ptr.prototype.Write = function(p) { - var {_r$1, _r$2, _tuple, _tuple$1, bw, err, ferr, fw, n, ok, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - fw = this; - _r$1 = fw.w.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - _tuple$1 = $assertType(fw.w, ptrType$14, true); - bw = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (n > 0 && ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (n > 0 && ok) { */ case 2: - _r$2 = bw.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - ferr = _r$2; - if (!($interfaceIsEqual(ferr, $ifaceNil)) && $interfaceIsEqual(err, $ifaceNil)) { - err = ferr; - } - /* } */ case 3: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: bufioFlushWriter.ptr.prototype.Write, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, bw, err, ferr, fw, n, ok, p, $s};return $f; - }; - bufioFlushWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - StatusText = function(code) { - var _entry, code; - return (_entry = statusText[$Int.keyFor(code)], _entry !== undefined ? _entry.v : ""); - }; - $pkg.StatusText = StatusText; - socksDialer.ptr.prototype.connect = function(ctx, c, address) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$16, $24r$17, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _, _1, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, a, address, am, am$1, ams, b, c, cmdErr, ctx, ctxErr, d, deadline, done, err, err$1, errCh, host, ip, ip4, ip6, l, ok, port, x$5, x$6, $s, $deferred, $r, $c} = $restore(this, {ctx, c, address}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - a = [a]; - c = [c]; - ctx = [ctx]; - ctxErr = [ctxErr]; - done = [done]; - errCh = [errCh]; - _ = $ifaceNil; - ctxErr[0] = $ifaceNil; - d = this; - _r$1 = sockssplitHostPort(address); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _tmp = $ifaceNil; - _tmp$1 = err; - _ = _tmp; - ctxErr[0] = _tmp$1; - $24r = [_, ctxErr[0]]; - $s = 4; case 4: return $24r; - /* } */ case 3: - _r$2 = ctx[0].Deadline(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - deadline = $clone(_tuple$1[0], time.Time); - ok = _tuple$1[1]; - /* */ if (ok && !$clone(deadline, time.Time).IsZero()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (ok && !$clone(deadline, time.Time).IsZero()) { */ case 6: - _r$3 = c[0].SetDeadline($clone(deadline, time.Time)); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $deferred.push([$methodVal(c[0], "SetDeadline"), [$clone(socksnoDeadline, time.Time)]]); - /* } */ case 7: - /* */ if (!($interfaceIsEqual(ctx[0], context.Background()))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(ctx[0], context.Background()))) { */ case 9: - errCh[0] = new $Chan($error, 1); - done[0] = new $Chan(structType, 0); - $deferred.push([(function(a, c, ctx, ctxErr, done, errCh) { return function $b() { - var {_r$4, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $close(done[0]); - /* */ if ($interfaceIsEqual(ctxErr[0], $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(ctxErr[0], $ifaceNil)) { */ case 1: - _r$4 = $recv(errCh[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ctxErr[0] = _r$4[0]; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, $s};return $f; - }; })(a, c, ctx, ctxErr, done, errCh), []]); - $go((function(a, c, ctx, ctxErr, done, errCh) { return function $b() { - var {_r$4, _r$5, _r$6, _r$7, _selection, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$4 = ctx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $select([[_r$4], [done[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _selection = _r$5; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_selection[0] === 0) { */ case 3: - _r$6 = c[0].SetDeadline($clone(socksaLongTimeAgo, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = ctx[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $r = $send(errCh[0], _r$7); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if (_selection[0] === 1) { */ case 4: - $r = $send(errCh[0], $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, _r$5, _r$6, _r$7, _selection, $s};return $f; - }; })(a, c, ctx, ctxErr, done, errCh), []); - /* } */ case 10: - b = $makeSlice(sliceType$3, 0, (6 + host.length >> 0)); - b = $append(b, 5); - /* */ if ((d.AuthMethods.$length === 0) || d.Authenticate === $throwNilPointerError) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ((d.AuthMethods.$length === 0) || d.Authenticate === $throwNilPointerError) { */ case 11: - b = $append(b, 1, 0); - $s = 13; continue; - /* } else { */ case 12: - ams = d.AuthMethods; - /* */ if (ams.$length > 255) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (ams.$length > 255) { */ case 14: - _tmp$2 = $ifaceNil; - _tmp$3 = errors.New("too many authentication methods"); - _ = _tmp$2; - ctxErr[0] = _tmp$3; - $24r$1 = [_, ctxErr[0]]; - $s = 16; case 16: return $24r$1; - /* } */ case 15: - b = $append(b, ((ams.$length << 24 >>> 24))); - _ref = ams; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - am = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - b = $append(b, ((am << 24 >>> 24))); - _i++; - } - /* } */ case 13: - _r$4 = c[0].Write(b); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - ctxErr[0] = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { */ case 18: - $24r$2 = [_, ctxErr[0]]; - $s = 20; case 20: return $24r$2; - /* } */ case 19: - _r$5 = io.ReadFull(c[0], $subslice(b, 0, 2)); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - ctxErr[0] = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { */ case 22: - $24r$3 = [_, ctxErr[0]]; - $s = 24; case 24: return $24r$3; - /* } */ case 23: - /* */ if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 5))) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 5))) { */ case 25: - _tmp$4 = $ifaceNil; - _tmp$5 = errors.New("unexpected protocol version " + strconv.Itoa((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)))); - _ = _tmp$4; - ctxErr[0] = _tmp$5; - $24r$4 = [_, ctxErr[0]]; - $s = 27; case 27: return $24r$4; - /* } */ case 26: - am$1 = (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); - /* */ if (am$1 === 255) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (am$1 === 255) { */ case 28: - _tmp$6 = $ifaceNil; - _tmp$7 = errors.New("no acceptable authentication methods"); - _ = _tmp$6; - ctxErr[0] = _tmp$7; - $24r$5 = [_, ctxErr[0]]; - $s = 30; case 30: return $24r$5; - /* } */ case 29: - /* */ if (!(d.Authenticate === $throwNilPointerError)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!(d.Authenticate === $throwNilPointerError)) { */ case 31: - _r$6 = d.Authenticate(ctx[0], c[0], am$1); /* */ $s = 33; case 33: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - ctxErr[0] = _r$6; - /* */ if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { */ case 34: - $24r$6 = [_, ctxErr[0]]; - $s = 36; case 36: return $24r$6; - /* } */ case 35: - /* } */ case 32: - b = $subslice(b, 0, 0); - b = $append(b, 5, ((d.cmd << 24 >>> 24)), 0); - ip = net.ParseIP(host); - /* */ if (!(ip === net.IP.nil)) { $s = 37; continue; } - /* */ $s = 38; continue; - /* if (!(ip === net.IP.nil)) { */ case 37: - ip4 = ip.To4(); - /* */ if (!(ip4 === net.IP.nil)) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (!(ip4 === net.IP.nil)) { */ case 40: - b = $append(b, 1); - b = $appendSlice(b, $convertSliceType(ip4, sliceType$3)); - $s = 42; continue; - /* } else { */ case 41: - ip6 = ip.To16(); - /* */ if (!(ip6 === net.IP.nil)) { $s = 43; continue; } - /* */ $s = 44; continue; - /* if (!(ip6 === net.IP.nil)) { */ case 43: - b = $append(b, 4); - b = $appendSlice(b, $convertSliceType(ip6, sliceType$3)); - $s = 45; continue; - /* } else { */ case 44: - _tmp$8 = $ifaceNil; - _tmp$9 = errors.New("unknown address type"); - _ = _tmp$8; - ctxErr[0] = _tmp$9; - $24r$7 = [_, ctxErr[0]]; - $s = 46; case 46: return $24r$7; - /* } */ case 45: - /* } */ case 42: - $s = 39; continue; - /* } else { */ case 38: - /* */ if (host.length > 255) { $s = 47; continue; } - /* */ $s = 48; continue; - /* if (host.length > 255) { */ case 47: - _tmp$10 = $ifaceNil; - _tmp$11 = errors.New("FQDN too long"); - _ = _tmp$10; - ctxErr[0] = _tmp$11; - $24r$8 = [_, ctxErr[0]]; - $s = 49; case 49: return $24r$8; - /* } */ case 48: - b = $append(b, 3); - b = $append(b, ((host.length << 24 >>> 24))); - b = $appendSlice(b, host); - /* } */ case 39: - b = $append(b, (((port >> 8 >> 0) << 24 >>> 24)), ((port << 24 >>> 24))); - _r$7 = c[0].Write(b); /* */ $s = 50; case 50: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$4 = _r$7; - ctxErr[0] = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { */ case 51: - $24r$9 = [_, ctxErr[0]]; - $s = 53; case 53: return $24r$9; - /* } */ case 52: - _r$8 = io.ReadFull(c[0], $subslice(b, 0, 4)); /* */ $s = 54; case 54: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$5 = _r$8; - ctxErr[0] = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { $s = 55; continue; } - /* */ $s = 56; continue; - /* if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { */ case 55: - $24r$10 = [_, ctxErr[0]]; - $s = 57; case 57: return $24r$10; - /* } */ case 56: - /* */ if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 5))) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 5))) { */ case 58: - _tmp$12 = $ifaceNil; - _tmp$13 = errors.New("unexpected protocol version " + strconv.Itoa((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0)))); - _ = _tmp$12; - ctxErr[0] = _tmp$13; - $24r$11 = [_, ctxErr[0]]; - $s = 60; case 60: return $24r$11; - /* } */ case 59: - cmdErr = (((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) >> 0)); - /* */ if (!((cmdErr === 0))) { $s = 61; continue; } - /* */ $s = 62; continue; - /* if (!((cmdErr === 0))) { */ case 61: - _tmp$14 = $ifaceNil; - _tmp$15 = errors.New("unknown error " + new socksReply(cmdErr).String()); - _ = _tmp$14; - ctxErr[0] = _tmp$15; - $24r$12 = [_, ctxErr[0]]; - $s = 63; case 63: return $24r$12; - /* } */ case 62: - /* */ if (!(((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) === 0))) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (!(((2 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 2]) === 0))) { */ case 64: - _tmp$16 = $ifaceNil; - _tmp$17 = errors.New("non-zero reserved field"); - _ = _tmp$16; - ctxErr[0] = _tmp$17; - $24r$13 = [_, ctxErr[0]]; - $s = 66; case 66: return $24r$13; - /* } */ case 65: - l = 2; - a[0] = new socksAddr.ptr("", net.IP.nil, 0); - _1 = (3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]); - /* */ if (_1 === (1)) { $s = 68; continue; } - /* */ if (_1 === (4)) { $s = 69; continue; } - /* */ if (_1 === (3)) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if (_1 === (1)) { */ case 68: - l = l + (4) >> 0; - a[0].IP = $makeSlice(net.IP, 4); - $s = 72; continue; - /* } else if (_1 === (4)) { */ case 69: - l = l + (16) >> 0; - a[0].IP = $makeSlice(net.IP, 16); - $s = 72; continue; - /* } else if (_1 === (3)) { */ case 70: - _r$9 = io.ReadFull(c[0], $subslice(b, 0, 1)); /* */ $s = 73; case 73: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple$6 = _r$9; - err$1 = _tuple$6[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 74; continue; } - /* */ $s = 75; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 74: - _tmp$18 = $ifaceNil; - _tmp$19 = err$1; - _ = _tmp$18; - ctxErr[0] = _tmp$19; - $24r$14 = [_, ctxErr[0]]; - $s = 76; case 76: return $24r$14; - /* } */ case 75: - l = l + ((((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) >> 0))) >> 0; - $s = 72; continue; - /* } else { */ case 71: - _tmp$20 = $ifaceNil; - _tmp$21 = errors.New("unknown address type " + strconv.Itoa((((3 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 3]) >> 0)))); - _ = _tmp$20; - ctxErr[0] = _tmp$21; - $24r$15 = [_, ctxErr[0]]; - $s = 77; case 77: return $24r$15; - /* } */ case 72: - case 67: - if (b.$capacity < l) { - b = $makeSlice(sliceType$3, l); - } else { - b = $subslice(b, 0, l); - } - _r$10 = io.ReadFull(c[0], b); /* */ $s = 78; case 78: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple$7 = _r$10; - ctxErr[0] = _tuple$7[1]; - /* */ if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { $s = 79; continue; } - /* */ $s = 80; continue; - /* if (!($interfaceIsEqual(ctxErr[0], $ifaceNil))) { */ case 79: - $24r$16 = [_, ctxErr[0]]; - $s = 81; case 81: return $24r$16; - /* } */ case 80: - if (!(a[0].IP === net.IP.nil)) { - $copySlice(a[0].IP, b); - } else { - a[0].Name = ($bytesToString($subslice(b, 0, (b.$length - 2 >> 0)))); - } - a[0].Port = ((((x$5 = b.$length - 2 >> 0, ((x$5 < 0 || x$5 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$5])) >> 0)) << 8 >> 0) | (((x$6 = b.$length - 1 >> 0, ((x$6 < 0 || x$6 >= b.$length) ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + x$6])) >> 0)); - _tmp$22 = a[0]; - _tmp$23 = $ifaceNil; - _ = _tmp$22; - ctxErr[0] = _tmp$23; - $24r$17 = [_, ctxErr[0]]; - $s = 82; case 82: return $24r$17; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [_, ctxErr[0]]; } if($curGoroutine.asleep) { var $f = {$blk: socksDialer.ptr.prototype.connect, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$16, $24r$17, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _, _1, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, a, address, am, am$1, ams, b, c, cmdErr, ctx, ctxErr, d, deadline, done, err, err$1, errCh, host, ip, ip4, ip6, l, ok, port, x$5, x$6, $s, $deferred};return $f; } } - }; - socksDialer.prototype.connect = function(ctx, c, address) { return this.$val.connect(ctx, c, address); }; - sockssplitHostPort = function(address) { - var {_r$1, _tuple, _tuple$1, address, err, host, port, portnum, $s, $r, $c} = $restore(this, {address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = net.SplitHostPort(address); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", 0, err]; - } - _tuple$1 = strconv.Atoi(port); - portnum = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return ["", 0, err]; - } - if (1 > portnum || portnum > 65535) { - $s = -1; return ["", 0, errors.New("port number out of range " + port)]; - } - $s = -1; return [host, portnum, $ifaceNil]; - /* */ } return; } var $f = {$blk: sockssplitHostPort, $c: true, $r, _r$1, _tuple, _tuple$1, address, err, host, port, portnum, $s};return $f; - }; - socksCommand.prototype.String = function() { - var _1, cmd; - cmd = this.$val; - _1 = cmd; - if (_1 === (1)) { - return "socks connect"; - } else if (_1 === (2)) { - return "socks bind"; - } else { - return "socks " + strconv.Itoa(((cmd >> 0))); - } - }; - $ptrType(socksCommand).prototype.String = function() { return new socksCommand(this.$get()).String(); }; - socksReply.prototype.String = function() { - var _1, code; - code = this.$val; - _1 = code; - if (_1 === (0)) { - return "succeeded"; - } else if (_1 === (1)) { - return "general SOCKS server failure"; - } else if (_1 === (2)) { - return "connection not allowed by ruleset"; - } else if (_1 === (3)) { - return "network unreachable"; - } else if (_1 === (4)) { - return "host unreachable"; - } else if (_1 === (5)) { - return "connection refused"; - } else if (_1 === (6)) { - return "TTL expired"; - } else if (_1 === (7)) { - return "command not supported"; - } else if (_1 === (8)) { - return "address type not supported"; - } else { - return "unknown code: " + strconv.Itoa(((code >> 0))); - } - }; - $ptrType(socksReply).prototype.String = function() { return new socksReply(this.$get()).String(); }; - socksAddr.ptr.prototype.Network = function() { - var a; - a = this; - return "socks"; - }; - socksAddr.prototype.Network = function() { return this.$val.Network(); }; - socksAddr.ptr.prototype.String = function() { - var a, port; - a = this; - if (a === ptrType$42.nil) { - return ""; - } - port = strconv.Itoa(a.Port); - if (a.IP === net.IP.nil) { - return net.JoinHostPort(a.Name, port); - } - return net.JoinHostPort(a.IP.String(), port); - }; - socksAddr.prototype.String = function() { return this.$val.String(); }; - socksConn.ptr.prototype.BoundAddr = function() { - var c; - c = this; - if (c === ptrType$43.nil) { - return $ifaceNil; - } - return c.boundAddr; - }; - socksConn.prototype.BoundAddr = function() { return this.$val.BoundAddr(); }; - socksDialer.ptr.prototype.DialContext = function(ctx, network, address) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, a, address, c, ctx, d, dd, dst, dst$1, dst$2, dst$3, err, err$1, network, proxy, proxy$1, proxy$2, proxy$3, $s, $r, $c} = $restore(this, {ctx, network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - err = d.validateTarget(network, address); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - _r$1 = d.pathAddrs(address); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - proxy = _tuple[0]; - dst = _tuple[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy, dst, err)]; - /* } */ case 2: - /* */ if ($interfaceIsEqual(ctx, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(ctx, $ifaceNil)) { */ case 4: - _r$2 = d.pathAddrs(address); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - proxy$1 = _tuple$1[0]; - dst$1 = _tuple$1[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$1, dst$1, errors.New("nil context"))]; - /* } */ case 5: - err$1 = $ifaceNil; - c = $ifaceNil; - /* */ if (!(d.ProxyDial === $throwNilPointerError)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(d.ProxyDial === $throwNilPointerError)) { */ case 7: - _r$3 = d.ProxyDial(ctx, d.proxyNetwork, d.proxyAddress); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - c = _tuple$2[0]; - err$1 = _tuple$2[1]; - $s = 9; continue; - /* } else { */ case 8: - dd = new net.Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$1.nil, $chanNil, $throwNilPointerError); - _r$4 = dd.DialContext(ctx, d.proxyNetwork, d.proxyAddress); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - c = _tuple$3[0]; - err$1 = _tuple$3[1]; - /* } */ case 9: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 12: - _r$5 = d.pathAddrs(address); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$4 = _r$5; - proxy$2 = _tuple$4[0]; - dst$2 = _tuple$4[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$2, dst$2, err$1)]; - /* } */ case 13: - _r$6 = d.connect(ctx, c, address); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$5 = _r$6; - a = _tuple$5[0]; - err$1 = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 16: - _r$7 = c.Close(); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = d.pathAddrs(address); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$6 = _r$8; - proxy$3 = _tuple$6[0]; - dst$3 = _tuple$6[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$3, dst$3, err$1)]; - /* } */ case 17: - $s = -1; return [new socksConn.ptr(c, a), $ifaceNil]; - /* */ } return; } var $f = {$blk: socksDialer.ptr.prototype.DialContext, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, a, address, c, ctx, d, dd, dst, dst$1, dst$2, dst$3, err, err$1, network, proxy, proxy$1, proxy$2, proxy$3, $s};return $f; - }; - socksDialer.prototype.DialContext = function(ctx, network, address) { return this.$val.DialContext(ctx, network, address); }; - socksDialer.ptr.prototype.DialWithConn = function(ctx, c, network, address) { - var {_r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, a, address, c, ctx, d, dst, dst$1, dst$2, err, err$1, network, proxy, proxy$1, proxy$2, $s, $r, $c} = $restore(this, {ctx, c, network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - err = d.validateTarget(network, address); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - _r$1 = d.pathAddrs(address); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - proxy = _tuple[0]; - dst = _tuple[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy, dst, err)]; - /* } */ case 2: - /* */ if ($interfaceIsEqual(ctx, $ifaceNil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(ctx, $ifaceNil)) { */ case 4: - _r$2 = d.pathAddrs(address); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - proxy$1 = _tuple$1[0]; - dst$1 = _tuple$1[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$1, dst$1, errors.New("nil context"))]; - /* } */ case 5: - _r$3 = d.connect(ctx, c, address); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - a = _tuple$2[0]; - err$1 = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 8: - _r$4 = d.pathAddrs(address); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - proxy$2 = _tuple$3[0]; - dst$2 = _tuple$3[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$2, dst$2, err$1)]; - /* } */ case 9: - $s = -1; return [a, $ifaceNil]; - /* */ } return; } var $f = {$blk: socksDialer.ptr.prototype.DialWithConn, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, a, address, c, ctx, d, dst, dst$1, dst$2, err, err$1, network, proxy, proxy$1, proxy$2, $s};return $f; - }; - socksDialer.prototype.DialWithConn = function(ctx, c, network, address) { return this.$val.DialWithConn(ctx, c, network, address); }; - socksDialer.ptr.prototype.Dial = function(network, address) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, address, c, d, dst, dst$1, err, err$1, err$2, network, proxy, proxy$1, $s, $r, $c} = $restore(this, {network, address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - d = this; - err = d.validateTarget(network, address); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 1: - _r$1 = d.pathAddrs(address); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - proxy = _tuple[0]; - dst = _tuple[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy, dst, err)]; - /* } */ case 2: - err$1 = $ifaceNil; - c = $ifaceNil; - /* */ if (!(d.ProxyDial === $throwNilPointerError)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(d.ProxyDial === $throwNilPointerError)) { */ case 4: - _r$2 = d.ProxyDial(context.Background(), d.proxyNetwork, d.proxyAddress); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - c = _tuple$1[0]; - err$1 = _tuple$1[1]; - $s = 6; continue; - /* } else { */ case 5: - _r$3 = net.Dial(d.proxyNetwork, d.proxyAddress); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - c = _tuple$2[0]; - err$1 = _tuple$2[1]; - /* } */ case 6: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 9: - _r$4 = d.pathAddrs(address); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - proxy$1 = _tuple$3[0]; - dst$1 = _tuple$3[1]; - $s = -1; return [$ifaceNil, new net.OpError.ptr(new socksCommand(d.cmd).String(), network, proxy$1, dst$1, err$1)]; - /* } */ case 10: - _r$5 = d.DialWithConn(context.Background(), c, network, address); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$4 = _r$5; - err$2 = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 13: - _r$6 = c.Close(); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return [$ifaceNil, err$2]; - /* } */ case 14: - $s = -1; return [c, $ifaceNil]; - /* */ } return; } var $f = {$blk: socksDialer.ptr.prototype.Dial, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, address, c, d, dst, dst$1, err, err$1, err$2, network, proxy, proxy$1, $s};return $f; - }; - socksDialer.prototype.Dial = function(network, address) { return this.$val.Dial(network, address); }; - socksDialer.ptr.prototype.validateTarget = function(network, address) { - var _1, _2, address, d, network; - d = this; - _1 = network; - if (_1 === ("tcp") || _1 === ("tcp6") || _1 === ("tcp4")) { - } else { - return errors.New("network not implemented"); - } - _2 = d.cmd; - if ((_2 === (1)) || (_2 === (2))) { - } else { - return errors.New("command not implemented"); - } - return $ifaceNil; - }; - socksDialer.prototype.validateTarget = function(network, address) { return this.$val.validateTarget(network, address); }; - socksDialer.ptr.prototype.pathAddrs = function(address) { - var {_i, _r$1, _ref, _tmp, _tmp$1, _tmp$2, _tuple, a, address, d, dst, err, err$1, host, i, port, proxy, s, $s, $r, $c} = $restore(this, {address}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - proxy = $ifaceNil; - dst = $ifaceNil; - err = $ifaceNil; - d = this; - _ref = new sliceType$2([d.proxyAddress, address]); - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = sockssplitHostPort(s); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - port = _tuple[1]; - err$1 = _tuple[2]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - _tmp = $ifaceNil; - _tmp$1 = $ifaceNil; - _tmp$2 = err$1; - proxy = _tmp; - dst = _tmp$1; - err = _tmp$2; - $s = -1; return [proxy, dst, err]; - } - a = new socksAddr.ptr("", net.IP.nil, port); - a.IP = net.ParseIP(host); - if (a.IP === net.IP.nil) { - a.Name = host; - } - if (i === 0) { - proxy = a; - } else { - dst = a; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return [proxy, dst, err]; - /* */ } return; } var $f = {$blk: socksDialer.ptr.prototype.pathAddrs, $c: true, $r, _i, _r$1, _ref, _tmp, _tmp$1, _tmp$2, _tuple, a, address, d, dst, err, err$1, host, i, port, proxy, s, $s};return $f; - }; - socksDialer.prototype.pathAddrs = function(address) { return this.$val.pathAddrs(address); }; - socksNewDialer = function(network, address) { - var address, network; - return new socksDialer.ptr(1, network, address, $throwNilPointerError, sliceType$12.nil, $throwNilPointerError); - }; - socksUsernamePassword.ptr.prototype.Authenticate = function(ctx, rw, auth) { - var {_1, _r$1, _r$2, _tuple, _tuple$1, auth, b, ctx, err, err$1, rw, up, $s, $r, $c} = $restore(this, {ctx, rw, auth}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - up = this; - _1 = auth; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if (_1 === (2)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (0)) { */ case 2: - $s = -1; return $ifaceNil; - /* } else if (_1 === (2)) { */ case 3: - if ((up.Username.length === 0) || up.Username.length > 255 || (up.Password.length === 0) || up.Password.length > 255) { - $s = -1; return errors.New("invalid username/password"); - } - b = new sliceType$3([1]); - b = $append(b, ((up.Username.length << 24 >>> 24))); - b = $appendSlice(b, up.Username); - b = $append(b, ((up.Password.length << 24 >>> 24))); - b = $appendSlice(b, up.Password); - _r$1 = rw.Write(b); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = io.ReadFull(rw, $subslice(b, 0, 2)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - if (!(((0 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 0]) === 1))) { - $s = -1; return errors.New("invalid username/password version"); - } - if (!(((1 >= b.$length ? ($throwRuntimeError("index out of range"), undefined) : b.$array[b.$offset + 1]) === 0))) { - $s = -1; return errors.New("username/password authentication failed"); - } - $s = -1; return $ifaceNil; - /* } */ case 4: - case 1: - $s = -1; return errors.New("unsupported authentication method " + strconv.Itoa(((auth >> 0)))); - /* */ } return; } var $f = {$blk: socksUsernamePassword.ptr.prototype.Authenticate, $c: true, $r, _1, _r$1, _r$2, _tuple, _tuple$1, auth, b, ctx, err, err$1, rw, up, $s};return $f; - }; - socksUsernamePassword.prototype.Authenticate = function(ctx, rw, auth) { return this.$val.Authenticate(ctx, rw, auth); }; - DetectContentType = function(data) { - var {_i, _r$1, _ref, ct, data, firstNonWS, sig, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (data.$length > 512) { - data = $subslice(data, 0, 512); - } - firstNonWS = 0; - while (true) { - if (!(firstNonWS < data.$length && isWS(((firstNonWS < 0 || firstNonWS >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + firstNonWS])))) { break; } - firstNonWS = firstNonWS + (1) >> 0; - } - _ref = sniffSignatures; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - sig = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = sig.match(data, firstNonWS); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ct = _r$1; - if (!(ct === "")) { - $s = -1; return ct; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return "application/octet-stream"; - /* */ } return; } var $f = {$blk: DetectContentType, $c: true, $r, _i, _r$1, _ref, ct, data, firstNonWS, sig, $s};return $f; - }; - $pkg.DetectContentType = DetectContentType; - isWS = function(b) { - var _1, b; - _1 = b; - if ((_1 === (9)) || (_1 === (10)) || (_1 === (12)) || (_1 === (13)) || (_1 === (32))) { - return true; - } - return false; - }; - isTT = function(b) { - var _1, b; - _1 = b; - if ((_1 === (32)) || (_1 === (62))) { - return true; - } - return false; - }; - exactSig.ptr.prototype.match = function(data, firstNonWS) { - var data, e, firstNonWS; - e = this; - if (bytes.HasPrefix(data, e.sig)) { - return e.ct; - } - return ""; - }; - exactSig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; - maskedSig.ptr.prototype.match = function(data, firstNonWS) { - var _i, _ref, data, firstNonWS, i, m, maskedData, pb, x$5; - m = this; - if (m.skipWS) { - data = $subslice(data, firstNonWS); - } - if (!((m.pat.$length === m.mask.$length))) { - return ""; - } - if (data.$length < m.pat.$length) { - return ""; - } - _ref = m.pat; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - pb = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - maskedData = (((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]) & (x$5 = m.mask, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i]))) >>> 0; - if (!((maskedData === pb))) { - return ""; - } - _i++; - } - return m.ct; - }; - maskedSig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; - htmlSig.prototype.match = function(data, firstNonWS) { - var _i, _ref, b, data, db, firstNonWS, h, i, x$5; - h = this; - data = $subslice(data, firstNonWS); - if (data.$length < (h.$length + 1 >> 0)) { - return ""; - } - _ref = h; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - db = ((i < 0 || i >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + i]); - if (65 <= b && b <= 90) { - db = (db & (223)) >>> 0; - } - if (!((b === db))) { - return ""; - } - _i++; - } - if (!isTT((x$5 = h.$length, ((x$5 < 0 || x$5 >= data.$length) ? ($throwRuntimeError("index out of range"), undefined) : data.$array[data.$offset + x$5])))) { - return ""; - } - return "text/html; charset=utf-8"; - }; - $ptrType(htmlSig).prototype.match = function(data, firstNonWS) { return this.$get().match(data, firstNonWS); }; - mp4Sig.ptr.prototype.match = function(data, firstNonWS) { - var _r$1, boxSize, data, firstNonWS, st; - if (data.$length < 12) { - return ""; - } - boxSize = (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(data, 0, 4)) >> 0)); - if (data.$length < boxSize || !(((_r$1 = boxSize % 4, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { - return ""; - } - if (!bytes.Equal($subslice(data, 4, 8), mp4ftype)) { - return ""; - } - st = 8; - while (true) { - if (!(st < boxSize)) { break; } - if (st === 12) { - st = st + (4) >> 0; - continue; - } - if (bytes.Equal($subslice(data, st, (st + 3 >> 0)), mp4)) { - return "video/mp4"; - } - st = st + (4) >> 0; - } - return ""; - }; - mp4Sig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; - textSig.ptr.prototype.match = function(data, firstNonWS) { - var _i, _ref, b, data, firstNonWS; - _ref = $subslice(data, firstNonWS); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ((b <= 8) || ((b === 11)) || (14 <= b && b <= 26) || (28 <= b && b <= 31)) { - return ""; - } - _i++; - } - return "text/plain; charset=utf-8"; - }; - textSig.prototype.match = function(data, firstNonWS) { return this.$val.match(data, firstNonWS); }; - conn.ptr.prototype.hijacked = function() { - var {$24r, c, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = this; - $r = c.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mu, "Unlock"), []]); - $24r = c.hijackedv; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: conn.ptr.prototype.hijacked, $c: true, $r, $24r, c, $s, $deferred};return $f; } } - }; - conn.prototype.hijacked = function() { return this.$val.hijacked(); }; - conn.ptr.prototype.hijackLocked = function() { - var {$24r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, c, err, err$1, rwc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rwc = $ifaceNil; - buf = ptrType$44.nil; - err = $ifaceNil; - c = this; - if (c.hijackedv) { - _tmp = $ifaceNil; - _tmp$1 = ptrType$44.nil; - _tmp$2 = $pkg.ErrHijacked; - rwc = _tmp; - buf = _tmp$1; - err = _tmp$2; - $s = -1; return [rwc, buf, err]; - } - $r = c.r.abortPendingRead(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - c.hijackedv = true; - rwc = c.rwc; - _r$1 = rwc.SetDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - buf = bufio.NewReadWriter(c.bufr, bufio.NewWriter(rwc)); - /* */ if (c.r.hasByte) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (c.r.hasByte) { */ case 3: - _r$2 = c.bufr.Peek(c.bufr.Buffered() + 1 >> 0); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err$1 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 6: - _tmp$3 = $ifaceNil; - _tmp$4 = ptrType$44.nil; - _r$3 = fmt.Errorf("unexpected Peek failure reading buffered byte: %v", new sliceType([err$1])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tmp$5 = _r$3; - rwc = _tmp$3; - buf = _tmp$4; - err = _tmp$5; - $24r = [rwc, buf, err]; - $s = 9; case 9: return $24r; - /* } */ case 7: - /* } */ case 4: - $r = c.setState(rwc, 3, true); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [rwc, buf, err]; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.hijackLocked, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, buf, c, err, err$1, rwc, $s};return $f; - }; - conn.prototype.hijackLocked = function() { return this.$val.hijackLocked(); }; - chunkWriter.ptr.prototype.Write = function(p) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, cw, err, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - cw = this; - /* */ if (!cw.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!cw.wroteHeader) { */ case 1: - $r = cw.writeHeader(p); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (cw.res.req.Method === "HEAD") { - _tmp = p.$length; - _tmp$1 = $ifaceNil; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* */ if (cw.chunking) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (cw.chunking) { */ case 4: - _r$1 = fmt.Fprintf(cw.res.conn.bufw, "%x\r\n", new sliceType([new $Int(p.$length)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - _r$2 = cw.res.conn.rwc.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return [n, err]; - /* } */ case 8: - /* } */ case 5: - _r$3 = cw.res.conn.bufw.Write(p); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - n = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (cw.chunking && $interfaceIsEqual(err, $ifaceNil)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (cw.chunking && $interfaceIsEqual(err, $ifaceNil)) { */ case 11: - _r$4 = cw.res.conn.bufw.Write(crlf); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - err = _tuple$2[1]; - /* } */ case 12: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - _r$5 = cw.res.conn.rwc.Close(); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 15: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: chunkWriter.ptr.prototype.Write, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, cw, err, n, p, $s};return $f; - }; - chunkWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - chunkWriter.ptr.prototype.flush = function() { - var {_r$1, cw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cw = this; - /* */ if (!cw.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!cw.wroteHeader) { */ case 1: - $r = cw.writeHeader(sliceType$3.nil); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = cw.res.conn.bufw.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: chunkWriter.ptr.prototype.flush, $c: true, $r, _r$1, cw, $s};return $f; - }; - chunkWriter.prototype.flush = function() { return this.$val.flush(); }; - chunkWriter.ptr.prototype.close = function() { - var {_r$1, _r$2, _r$3, _r$4, bw, cw, trailers, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cw = this; - /* */ if (!cw.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!cw.wroteHeader) { */ case 1: - $r = cw.writeHeader(sliceType$3.nil); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* */ if (cw.chunking) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (cw.chunking) { */ case 4: - bw = cw.res.conn.bufw; - _r$1 = bw.WriteString("0\r\n"); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = cw.res.finalTrailers(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - trailers = _r$2; - /* */ if (!(trailers === false)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(trailers === false)) { */ case 8: - _r$3 = new Header(trailers).Write(bw); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 9: - _r$4 = bw.WriteString("\r\n"); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: chunkWriter.ptr.prototype.close, $c: true, $r, _r$1, _r$2, _r$3, _r$4, bw, cw, trailers, $s};return $f; - }; - chunkWriter.prototype.close = function() { return this.$val.close(); }; - response.ptr.prototype.finalTrailers = function() { - var {_entry, _entry$1, _i, _i$1, _i$2, _key, _keys, _ref, _ref$1, _ref$2, k, k$1, t, v, vv, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - t = false; - _ref = w.handlerHeader; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - if (strings.HasPrefix(k, "Trailer:")) { - if (t === false) { - t = {}; - } - _key = strings.TrimPrefix(k, "Trailer:"); (t || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - } - _i++; - } - _ref$1 = w.trailers; - _i$1 = 0; - /* while (true) { */ case 1: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } - k$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (t === false) { - t = {}; - } - _ref$2 = (_entry$1 = w.handlerHeader[$String.keyFor(k$1)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - _i$2 = 0; - /* while (true) { */ case 3: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 4; continue; } - v = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - $r = new Header(t).Add(k$1, v); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$2++; - $s = 3; continue; - case 4: - _i$1++; - $s = 1; continue; - case 2: - $s = -1; return t; - /* */ } return; } var $f = {$blk: response.ptr.prototype.finalTrailers, $c: true, $r, _entry, _entry$1, _i, _i$1, _i$2, _key, _keys, _ref, _ref$1, _ref$2, k, k$1, t, v, vv, w, $s};return $f; - }; - response.prototype.finalTrailers = function() { return this.$val.finalTrailers(); }; - $ptrType(atomicBool).prototype.isSet = function() { - var _ptr, b; - b = this; - return !((atomic.LoadInt32(((_ptr = b, new ptrType$45(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target)))) === 0)); - }; - $ptrType(atomicBool).prototype.setTrue = function() { - var _ptr, b; - b = this; - atomic.StoreInt32(((_ptr = b, new ptrType$45(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target))), 1); - }; - $ptrType(atomicBool).prototype.setFalse = function() { - var _ptr, b; - b = this; - atomic.StoreInt32(((_ptr = b, new ptrType$45(function() { return (_ptr.$get() >> 0); }, function($v) { _ptr.$set(($v >> 0)); }, _ptr.$target))), 0); - }; - response.ptr.prototype.declareTrailer = function(k) { - var {_r$1, _r$2, k, w, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = CanonicalHeaderKey(k); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - k = _r$1; - _r$2 = httpguts.ValidTrailerHeader(k); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!_r$2) { */ case 2: - $s = -1; return; - /* } */ case 3: - w.trailers = $append(w.trailers, k); - $s = -1; return; - /* */ } return; } var $f = {$blk: response.ptr.prototype.declareTrailer, $c: true, $r, _r$1, _r$2, k, w, $s};return $f; - }; - response.prototype.declareTrailer = function(k) { return this.$val.declareTrailer(k); }; - response.ptr.prototype.requestTooLarge = function() { - var {w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - w.closeAfterReply = true; - w.requestBodyLimitHit = true; - /* */ if (!w.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!w.wroteHeader) { */ case 1: - $r = new Header(w.Header()).Set("Connection", "close"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: response.ptr.prototype.requestTooLarge, $c: true, $r, w, $s};return $f; - }; - response.prototype.requestTooLarge = function() { return this.$val.requestTooLarge(); }; - response.ptr.prototype.ReadFrom = function(src) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, buf, bufp, err, err$1, err$2, n, n0, n0$1, n0$2, ok, rf, src, w, x$10, x$11, x$12, x$5, x$6, x$7, x$8, x$9, $s, $deferred, $r, $c} = $restore(this, {src}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - n = new $Int64(0, 0); - err = $ifaceNil; - w = this; - _r$1 = copyBufPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - bufp = $assertType(_r$1, ptrType$6); - buf = bufp.$get(); - $deferred.push([$methodVal(copyBufPool, "Put"), [bufp]]); - _tuple = $assertType(w.conn.rwc, io.ReaderFrom, true); - rf = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!ok) { */ case 2: - _r$2 = io.CopyBuffer((x$5 = new writerOnly.ptr(w), new x$5.constructor.elem(x$5)), src, buf); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 5; case 5: return $24r; - /* } */ case 3: - /* */ if (!w.cw.wroteHeader) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!w.cw.wroteHeader) { */ case 6: - _r$3 = io.CopyBuffer((x$6 = new writerOnly.ptr(w), new x$6.constructor.elem(x$6)), io.LimitReader(src, new $Int64(0, 512)), buf); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - n0 = _tuple$2[0]; - err$1 = _tuple$2[1]; - n = (x$7 = n0, new $Int64(n.$high + x$7.$high, n.$low + x$7.$low)); - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil)) || (n0.$high < 0 || (n0.$high === 0 && n0.$low < 512))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil)) || (n0.$high < 0 || (n0.$high === 0 && n0.$low < 512))) { */ case 9: - _tmp = n; - _tmp$1 = err$1; - n = _tmp; - err = _tmp$1; - $24r$1 = [n, err]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - /* } */ case 7: - _r$4 = w.w.Flush(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - $r = w.cw.flush(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!w.cw.chunking && w.bodyAllowed()) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!w.cw.chunking && w.bodyAllowed()) { */ case 14: - _r$5 = rf.ReadFrom(src); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - n0$1 = _tuple$3[0]; - err$2 = _tuple$3[1]; - n = (x$8 = n0$1, new $Int64(n.$high + x$8.$high, n.$low + x$8.$low)); - w.written = (x$9 = w.written, x$10 = n0$1, new $Int64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)); - _tmp$2 = n; - _tmp$3 = err$2; - n = _tmp$2; - err = _tmp$3; - $24r$2 = [n, err]; - $s = 17; case 17: return $24r$2; - /* } */ case 15: - _r$6 = io.CopyBuffer((x$11 = new writerOnly.ptr(w), new x$11.constructor.elem(x$11)), src, buf); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$4 = _r$6; - n0$2 = _tuple$4[0]; - err = _tuple$4[1]; - n = (x$12 = n0$2, new $Int64(n.$high + x$12.$high, n.$low + x$12.$low)); - _tmp$4 = n; - _tmp$5 = err; - n = _tmp$4; - err = _tmp$5; - $24r$3 = [n, err]; - $s = 19; case 19: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: response.ptr.prototype.ReadFrom, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, buf, bufp, err, err$1, err$2, n, n0, n0$1, n0$2, ok, rf, src, w, x$10, x$11, x$12, x$5, x$6, x$7, x$8, x$9, $s, $deferred};return $f; } } - }; - response.prototype.ReadFrom = function(src) { return this.$val.ReadFrom(src); }; - Server.ptr.prototype.newConn = function(rwc) { - var {_r$1, c, rwc, srv, $s, $r, $c} = $restore(this, {rwc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - c = new conn.ptr(srv, $throwNilPointerError, rwc, "", ptrType$28.nil, $ifaceNil, ptrType$47.nil, ptrType$29.nil, ptrType$14.nil, "", new atomic.Value.ptr($ifaceNil), new structType$1.ptr(new $Uint64(0, 0)), new sync.Mutex.ptr(0, 0), false); - /* */ if (false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (false) { */ case 1: - _r$1 = newLoggingConn("server", c.rwc); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - c.rwc = _r$1; - /* } */ case 2: - $s = -1; return c; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.newConn, $c: true, $r, _r$1, c, rwc, srv, $s};return $f; - }; - Server.prototype.newConn = function(rwc) { return this.$val.newConn(rwc); }; - connReader.ptr.prototype.lock = function() { - var {cr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - $r = cr.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (cr.cond === ptrType$48.nil) { - cr.cond = sync.NewCond(cr.mu); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: connReader.ptr.prototype.lock, $c: true, $r, cr, $s};return $f; - }; - connReader.prototype.lock = function() { return this.$val.lock(); }; - connReader.ptr.prototype.unlock = function() { - var {cr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - $r = cr.mu.Unlock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: connReader.ptr.prototype.unlock, $c: true, $r, cr, $s};return $f; - }; - connReader.prototype.unlock = function() { return this.$val.unlock(); }; - connReader.ptr.prototype.startBackgroundRead = function() { - var {_r$1, cr, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cr = this; - $r = cr.lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cr, "unlock"), []]); - if (cr.inRead) { - $panic(new $String("invalid concurrent Body.Read call")); - } - /* */ if (cr.hasByte) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (cr.hasByte) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - cr.inRead = true; - _r$1 = cr.conn.rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $go($methodVal(cr, "backgroundRead"), []); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: connReader.ptr.prototype.startBackgroundRead, $c: true, $r, _r$1, cr, $s, $deferred};return $f; } } - }; - connReader.prototype.startBackgroundRead = function() { return this.$val.startBackgroundRead(); }; - connReader.ptr.prototype.backgroundRead = function() { - var {_r$1, _r$2, _tuple, _tuple$1, _v, cr, err, n, ne, ok, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - _r$1 = cr.conn.rwc.Read(new sliceType$3(cr.byteBuf)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $r = cr.lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (n === 1) { - cr.hasByte = true; - } - _tuple$1 = $assertType(err, net.Error, true); - ne = _tuple$1[0]; - ok = _tuple$1[1]; - if (!(ok && cr.aborted)) { _v = false; $s = 6; continue s; } - _r$2 = ne.Timeout(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = _r$2; case 6: - /* */ if (_v) { $s = 3; continue; } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 3: - $s = 5; continue; - /* } else if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - $r = cr.handleReadError(err); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - cr.aborted = false; - cr.inRead = false; - $r = cr.unlock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cr.cond.Broadcast(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: connReader.ptr.prototype.backgroundRead, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, _v, cr, err, n, ne, ok, $s};return $f; - }; - connReader.prototype.backgroundRead = function() { return this.$val.backgroundRead(); }; - connReader.ptr.prototype.abortPendingRead = function() { - var {_r$1, _r$2, cr, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cr = this; - $r = cr.lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cr, "unlock"), []]); - /* */ if (!cr.inRead) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!cr.inRead) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - cr.aborted = true; - _r$1 = cr.conn.rwc.SetReadDeadline($clone(aLongTimeAgo, time.Time)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* while (true) { */ case 6: - /* if (!(cr.inRead)) { break; } */ if(!(cr.inRead)) { $s = 7; continue; } - $r = cr.cond.Wait(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - case 7: - _r$2 = cr.conn.rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: connReader.ptr.prototype.abortPendingRead, $c: true, $r, _r$1, _r$2, cr, $s, $deferred};return $f; } } - }; - connReader.prototype.abortPendingRead = function() { return this.$val.abortPendingRead(); }; - connReader.ptr.prototype.setReadLimit = function(remain) { - var cr, remain; - cr = this; - cr.remain = remain; - }; - connReader.prototype.setReadLimit = function(remain) { return this.$val.setReadLimit(remain); }; - connReader.ptr.prototype.setInfiniteReadLimit = function() { - var cr; - cr = this; - cr.remain = new $Int64(2147483647, 4294967295); - }; - connReader.prototype.setInfiniteReadLimit = function() { return this.$val.setInfiniteReadLimit(); }; - connReader.ptr.prototype.hitReadLimit = function() { - var cr, x$5; - cr = this; - return (x$5 = cr.remain, (x$5.$high < 0 || (x$5.$high === 0 && x$5.$low <= 0))); - }; - connReader.prototype.hitReadLimit = function() { return this.$val.hitReadLimit(); }; - connReader.ptr.prototype.handleReadError = function(param) { - var {cr, param, $s, $r, $c} = $restore(this, {param}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - $r = cr.conn.cancelCtx(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cr.closeNotify(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: connReader.ptr.prototype.handleReadError, $c: true, $r, cr, param, $s};return $f; - }; - connReader.prototype.handleReadError = function(param) { return this.$val.handleReadError(param); }; - connReader.ptr.prototype.closeNotify = function() { - var {_tuple, cr, res, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cr = this; - _tuple = $assertType(cr.conn.curReq.Load(), ptrType$49, true); - res = _tuple[0]; - /* */ if (!(res === ptrType$49.nil) && atomic.CompareAndSwapInt32((res.$ptr_didCloseNotify || (res.$ptr_didCloseNotify = new ptrType$45(function() { return this.$target.didCloseNotify; }, function($v) { this.$target.didCloseNotify = $v; }, res))), 0, 1)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(res === ptrType$49.nil) && atomic.CompareAndSwapInt32((res.$ptr_didCloseNotify || (res.$ptr_didCloseNotify = new ptrType$45(function() { return this.$target.didCloseNotify; }, function($v) { this.$target.didCloseNotify = $v; }, res))), 0, 1)) { */ case 1: - $r = $send(res.closeNotifyCh, true); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: connReader.ptr.prototype.closeNotify, $c: true, $r, _tuple, cr, res, $s};return $f; - }; - connReader.prototype.closeNotify = function() { return this.$val.closeNotify(); }; - connReader.ptr.prototype.Read = function(p) { - var {_r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, cr, err, n, p, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - cr = this; - $r = cr.lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (cr.inRead) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (cr.inRead) { */ case 2: - $r = cr.unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = cr.conn.hijacked(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_r$1) { */ case 5: - $panic(new $String("invalid Body.Read call. After hijacked, the original Request must not be used")); - /* } */ case 6: - $panic(new $String("invalid concurrent Body.Read call")); - /* } */ case 3: - /* */ if (cr.hitReadLimit()) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (cr.hitReadLimit()) { */ case 8: - $r = cr.unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = 0; - _tmp$1 = io.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* } */ case 9: - /* */ if (p.$length === 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (p.$length === 0) { */ case 11: - $r = cr.unlock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = 0; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* } */ case 12: - if ((x$5 = (new $Int64(0, p.$length)), x$6 = cr.remain, (x$5.$high > x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { - p = $subslice(p, 0, $flatten64(cr.remain)); - } - /* */ if (cr.hasByte) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (cr.hasByte) { */ case 14: - (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0] = cr.byteBuf[0]); - cr.hasByte = false; - $r = cr.unlock(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$4 = 1; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* } */ case 15: - cr.inRead = true; - $r = cr.unlock(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = cr.conn.rwc.Read(p); /* */ $s = 18; case 18: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = _tuple[0]; - err = _tuple[1]; - $r = cr.lock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cr.inRead = false; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 20: - $r = cr.handleReadError(err); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 21: - cr.remain = (x$7 = cr.remain, x$8 = (new $Int64(0, n)), new $Int64(x$7.$high - x$8.$high, x$7.$low - x$8.$low)); - $r = cr.unlock(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cr.cond.Broadcast(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$6 = n; - _tmp$7 = err; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: connReader.ptr.prototype.Read, $c: true, $r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, cr, err, n, p, x$5, x$6, x$7, x$8, $s};return $f; - }; - connReader.prototype.Read = function(p) { return this.$val.Read(p); }; - bufioWriterPool = function(size) { - var _1, size; - _1 = size; - if (_1 === (2048)) { - return bufioWriter2kPool; - } else if (_1 === (4096)) { - return bufioWriter4kPool; - } - return ptrType$50.nil; - }; - newBufioReader = function(r) { - var {_r$1, br, r, v, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = bufioReaderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - if (!($interfaceIsEqual(v, $ifaceNil))) { - br = $assertType(v, ptrType$29); - br.Reset(r); - $s = -1; return br; - } - $s = -1; return bufio.NewReader(r); - /* */ } return; } var $f = {$blk: newBufioReader, $c: true, $r, _r$1, br, r, v, $s};return $f; - }; - putBufioReader = function(br) { - var br; - br.Reset($ifaceNil); - bufioReaderPool.Put(br); - }; - newBufioWriterSize = function(w, size) { - var {_r$1, bw, pool, size, v, w, $s, $r, $c} = $restore(this, {w, size}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - pool = bufioWriterPool(size); - /* */ if (!(pool === ptrType$50.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(pool === ptrType$50.nil)) { */ case 1: - _r$1 = pool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - if (!($interfaceIsEqual(v, $ifaceNil))) { - bw = $assertType(v, ptrType$14); - bw.Reset(w); - $s = -1; return bw; - } - /* } */ case 2: - $s = -1; return bufio.NewWriterSize(w, size); - /* */ } return; } var $f = {$blk: newBufioWriterSize, $c: true, $r, _r$1, bw, pool, size, v, w, $s};return $f; - }; - putBufioWriter = function(bw) { - var bw, pool; - bw.Reset($ifaceNil); - pool = bufioWriterPool(bw.Available()); - if (!(pool === ptrType$50.nil)) { - pool.Put(bw); - } - }; - Server.ptr.prototype.maxHeaderBytes = function() { - var srv; - srv = this; - if (srv.MaxHeaderBytes > 0) { - return srv.MaxHeaderBytes; - } - return 1048576; - }; - Server.prototype.maxHeaderBytes = function() { return this.$val.maxHeaderBytes(); }; - Server.ptr.prototype.initialReadLimitSize = function() { - var srv, x$5; - srv = this; - return (x$5 = (new $Int64(0, srv.maxHeaderBytes())), new $Int64(x$5.$high + 0, x$5.$low + 4096)); - }; - Server.prototype.initialReadLimitSize = function() { return this.$val.initialReadLimitSize(); }; - Server.ptr.prototype.tlsHandshakeTimeout = function() { - var _i, _ref, ret, srv, v; - srv = this; - ret = new time.Duration(0, 0); - _ref = $toNativeArray($kindInt64, [srv.ReadHeaderTimeout, srv.ReadTimeout, srv.WriteTimeout]); - _i = 0; - while (true) { - if (!(_i < 3)) { break; } - v = ((_i < 0 || _i >= _ref.length) ? ($throwRuntimeError("index out of range"), undefined) : _ref[_i]); - if ((v.$high < 0 || (v.$high === 0 && v.$low <= 0))) { - _i++; - continue; - } - if ((ret.$high === 0 && ret.$low === 0) || (v.$high < ret.$high || (v.$high === ret.$high && v.$low < ret.$low))) { - ret = v; - } - _i++; - } - return ret; - }; - Server.prototype.tlsHandshakeTimeout = function() { return this.$val.tlsHandshakeTimeout(); }; - expectContinueReader.ptr.prototype.Read = function(p) { - var {_r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _v, ecr, err, n, p, w, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - ecr = this; - if ((ecr.$ptr_closed || (ecr.$ptr_closed = new ptrType$51(function() { return this.$target.closed; }, function($v) { this.$target.closed = $v; }, ecr))).isSet()) { - _tmp = 0; - _tmp$1 = $pkg.ErrBodyReadAfterClose; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - w = ecr.resp; - if (!(!w.wroteContinue && (w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).isSet())) { _v = false; $s = 3; continue s; } - _r$1 = w.conn.hijacked(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - w.wroteContinue = true; - $r = w.writeContinueMu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ((w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).isSet()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if ((w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).isSet()) { */ case 6: - _r$2 = w.conn.bufw.WriteString("HTTP/1.1 100 Continue\r\n\r\n"); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = w.conn.bufw.Flush(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - (w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).setFalse(); - /* } */ case 7: - $r = w.writeContinueMu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$4 = ecr.readCloser.Read(p); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, io.EOF)) { - (ecr.$ptr_sawEOF || (ecr.$ptr_sawEOF = new ptrType$51(function() { return this.$target.sawEOF; }, function($v) { this.$target.sawEOF = $v; }, ecr))).setTrue(); - } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: expectContinueReader.ptr.prototype.Read, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _v, ecr, err, n, p, w, $s};return $f; - }; - expectContinueReader.prototype.Read = function(p) { return this.$val.Read(p); }; - expectContinueReader.ptr.prototype.Close = function() { - var {$24r, _r$1, ecr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ecr = this; - (ecr.$ptr_closed || (ecr.$ptr_closed = new ptrType$51(function() { return this.$target.closed; }, function($v) { this.$target.closed = $v; }, ecr))).setTrue(); - _r$1 = ecr.readCloser.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: expectContinueReader.ptr.prototype.Close, $c: true, $r, $24r, _r$1, ecr, $s};return $f; - }; - expectContinueReader.prototype.Close = function() { return this.$val.Close(); }; - appendTime = function(b, t) { - var {_q, _q$1, _q$2, _q$3, _q$4, _q$5, _q$6, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, day, dd, hh, mm, mn, mon, ss, t, yy, $s, $r, $c} = $restore(this, {b, t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - time.Time.copy(t, $clone(t, time.Time).UTC()); - _r$1 = $clone(t, time.Time).Date(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - yy = _tuple[0]; - mm = _tuple[1]; - dd = _tuple[2]; - _r$2 = $clone(t, time.Time).Clock(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - hh = _tuple$1[0]; - mn = _tuple$1[1]; - ss = _tuple$1[2]; - _r$3 = $clone(t, time.Time).Weekday(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - day = $substring("SunMonTueWedThuFriSat", ($imul(3, _r$3))); - mon = $substring("JanFebMarAprMayJunJulAugSepOctNovDec", ($imul(3, ((mm - 1 >> 0))))); - $s = -1; return $append(b, day.charCodeAt(0), day.charCodeAt(1), day.charCodeAt(2), 44, 32, (((48 + (_q = dd / 10, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$4 = dd % 10, _r$4 === _r$4 ? _r$4 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 32, mon.charCodeAt(0), mon.charCodeAt(1), mon.charCodeAt(2), 32, (((48 + (_q$1 = yy / 1000, (_q$1 === _q$1 && _q$1 !== 1/0 && _q$1 !== -1/0) ? _q$1 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$5 = ((_q$2 = yy / 100, (_q$2 === _q$2 && _q$2 !== 1/0 && _q$2 !== -1/0) ? _q$2 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$5 === _r$5 ? _r$5 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$6 = ((_q$3 = yy / 10, (_q$3 === _q$3 && _q$3 !== 1/0 && _q$3 !== -1/0) ? _q$3 >> 0 : $throwRuntimeError("integer divide by zero"))) % 10, _r$6 === _r$6 ? _r$6 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$7 = yy % 10, _r$7 === _r$7 ? _r$7 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 32, (((48 + (_q$4 = hh / 10, (_q$4 === _q$4 && _q$4 !== 1/0 && _q$4 !== -1/0) ? _q$4 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$8 = hh % 10, _r$8 === _r$8 ? _r$8 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 58, (((48 + (_q$5 = mn / 10, (_q$5 === _q$5 && _q$5 !== 1/0 && _q$5 !== -1/0) ? _q$5 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$9 = mn % 10, _r$9 === _r$9 ? _r$9 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 58, (((48 + (_q$6 = ss / 10, (_q$6 === _q$6 && _q$6 !== 1/0 && _q$6 !== -1/0) ? _q$6 >> 0 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), (((48 + (_r$10 = ss % 10, _r$10 === _r$10 ? _r$10 : $throwRuntimeError("integer divide by zero")) >> 0) << 24 >>> 24)), 32, 71, 77, 84); - /* */ } return; } var $f = {$blk: appendTime, $c: true, $r, _q, _q$1, _q$2, _q$3, _q$4, _q$5, _q$6, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, b, day, dd, hh, mm, mn, mon, ss, t, yy, $s};return $f; - }; - conn.ptr.prototype.readRequest = function(ctx) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _entry, _entry$1, _i, _i$1, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, body$1, c, cancelCtx, ctx, d, d$1, d$2, err, haveHost, hdrDeadline, hosts, isH2Upgrade, k, ok, peek, req, t0, v, vv, w, wholeReqDeadline, x$5, $s, $deferred, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = [c]; - d = [d]; - w = ptrType$49.nil; - err = $ifaceNil; - c[0] = this; - _r$1 = c[0].hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$1) { */ case 1: - _tmp = ptrType$49.nil; - _tmp$1 = $pkg.ErrHijacked; - w = _tmp; - err = _tmp$1; - $24r = [w, err]; - $s = 4; case 4: return $24r; - /* } */ case 2: - wholeReqDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - hdrDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - _r$2 = time.Now(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - t0 = $clone(_r$2, time.Time); - d$1 = c[0].server.readHeaderTimeout(); - if ((d$1.$high > 0 || (d$1.$high === 0 && d$1.$low > 0))) { - time.Time.copy(hdrDeadline, $clone(t0, time.Time).Add(d$1)); - } - d$2 = c[0].server.ReadTimeout; - if ((d$2.$high > 0 || (d$2.$high === 0 && d$2.$low > 0))) { - time.Time.copy(wholeReqDeadline, $clone(t0, time.Time).Add(d$2)); - } - _r$3 = c[0].rwc.SetReadDeadline($clone(hdrDeadline, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - d[0] = c[0].server.WriteTimeout; - /* */ if ((d[0].$high > 0 || (d[0].$high === 0 && d[0].$low > 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((d[0].$high > 0 || (d[0].$high === 0 && d[0].$low > 0))) { */ case 7: - $deferred.push([(function(c, d) { return function $b() { - var {_r$4, _r$5, _r$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$4 = time.Now(); /* */ $s = 1; case 1: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $clone(_r$4, time.Time).Add(d[0]); /* */ $s = 2; case 2: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = c[0].rwc.SetWriteDeadline($clone(_r$5, time.Time)); /* */ $s = 3; case 3: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$4, _r$5, _r$6, $s};return $f; - }; })(c, d), []]); - /* } */ case 8: - c[0].r.setReadLimit(c[0].server.initialReadLimitSize()); - /* */ if (c[0].lastMethod === "POST") { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (c[0].lastMethod === "POST") { */ case 9: - _r$4 = c[0].bufr.Peek(4); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - peek = _tuple[0]; - _r$5 = c[0].bufr.Discard(numLeadingCRorLF(peek)); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 10: - _r$6 = readRequest(c[0].bufr); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$1 = _r$6; - req = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - /* */ if (c[0].r.hitReadLimit()) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (c[0].r.hitReadLimit()) { */ case 16: - _tmp$2 = ptrType$49.nil; - _tmp$3 = errTooLarge; - w = _tmp$2; - err = _tmp$3; - $24r$1 = [w, err]; - $s = 18; case 18: return $24r$1; - /* } */ case 17: - _tmp$4 = ptrType$49.nil; - _tmp$5 = err; - w = _tmp$4; - err = _tmp$5; - $24r$2 = [w, err]; - $s = 19; case 19: return $24r$2; - /* } */ case 15: - /* */ if (!http1ServerSupportsRequest(req)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!http1ServerSupportsRequest(req)) { */ case 20: - _tmp$6 = ptrType$49.nil; - _tmp$7 = (x$5 = new statusError.ptr(505, "unsupported protocol version"), new x$5.constructor.elem(x$5)); - w = _tmp$6; - err = _tmp$7; - $24r$3 = [w, err]; - $s = 22; case 22: return $24r$3; - /* } */ case 21: - c[0].lastMethod = req.Method; - c[0].r.setInfiniteReadLimit(); - _tuple$2 = (_entry = req.Header[$String.keyFor("Host")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - hosts = _tuple$2[0]; - haveHost = _tuple$2[1]; - isH2Upgrade = req.isH2Upgrade(); - /* */ if (req.ProtoAtLeast(1, 1) && (!haveHost || (hosts.$length === 0)) && !isH2Upgrade && !(req.Method === "CONNECT")) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (req.ProtoAtLeast(1, 1) && (!haveHost || (hosts.$length === 0)) && !isH2Upgrade && !(req.Method === "CONNECT")) { */ case 23: - _tmp$8 = ptrType$49.nil; - _tmp$9 = badRequestError("missing required Host header"); - w = _tmp$8; - err = _tmp$9; - $24r$4 = [w, err]; - $s = 25; case 25: return $24r$4; - /* } */ case 24: - /* */ if ((hosts.$length === 1) && !httpguts.ValidHostHeader((0 >= hosts.$length ? ($throwRuntimeError("index out of range"), undefined) : hosts.$array[hosts.$offset + 0]))) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if ((hosts.$length === 1) && !httpguts.ValidHostHeader((0 >= hosts.$length ? ($throwRuntimeError("index out of range"), undefined) : hosts.$array[hosts.$offset + 0]))) { */ case 26: - _tmp$10 = ptrType$49.nil; - _tmp$11 = badRequestError("malformed Host header"); - w = _tmp$10; - err = _tmp$11; - $24r$5 = [w, err]; - $s = 28; case 28: return $24r$5; - /* } */ case 27: - _ref = req.Header; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 29: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 30; continue; } - _entry$1 = _ref[_keys[_i]]; - if (_entry$1 === undefined) { - _i++; - /* continue; */ $s = 29; continue; - } - k = _entry$1.k; - vv = _entry$1.v; - /* */ if (!httpguts.ValidHeaderFieldName(k)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!httpguts.ValidHeaderFieldName(k)) { */ case 31: - _tmp$12 = ptrType$49.nil; - _tmp$13 = badRequestError("invalid header name"); - w = _tmp$12; - err = _tmp$13; - $24r$6 = [w, err]; - $s = 33; case 33: return $24r$6; - /* } */ case 32: - _ref$1 = vv; - _i$1 = 0; - /* while (true) { */ case 34: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 35; continue; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - /* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 36: - _tmp$14 = ptrType$49.nil; - _tmp$15 = badRequestError("invalid header value"); - w = _tmp$14; - err = _tmp$15; - $24r$7 = [w, err]; - $s = 38; case 38: return $24r$7; - /* } */ case 37: - _i$1++; - $s = 34; continue; - case 35: - _i++; - $s = 29; continue; - case 30: - delete req.Header[$String.keyFor("Host")]; - _r$7 = context.WithCancel(ctx); /* */ $s = 39; case 39: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - ctx = _tuple$3[0]; - cancelCtx = _tuple$3[1]; - req.ctx = ctx; - req.RemoteAddr = c[0].remoteAddr; - req.TLS = c[0].tlsState; - _tuple$4 = $assertType(req.Body, ptrType$52, true); - body$1 = _tuple$4[0]; - ok = _tuple$4[1]; - if (ok) { - body$1.doEarlyClose = true; - } - /* */ if (!$clone(hdrDeadline, time.Time).Equal($clone(wholeReqDeadline, time.Time))) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (!$clone(hdrDeadline, time.Time).Equal($clone(wholeReqDeadline, time.Time))) { */ case 40: - _r$8 = c[0].rwc.SetReadDeadline($clone(wholeReqDeadline, time.Time)); /* */ $s = 42; case 42: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 41: - w = new response.ptr(c[0], req, req.Body, cancelCtx, false, false, req.wantsHttp10KeepAlive(), req.wantsClose(), 0, new sync.Mutex.ptr(0, 0), ptrType$14.nil, new chunkWriter.ptr(ptrType$49.nil, false, false, false), {}, false, new $Int64(0, 0), new $Int64(-1, 4294967295), 0, false, false, sliceType$2.nil, 0, arrayType$3.zero(), arrayType$4.zero(), arrayType$5.zero(), new $Chan($Bool, 1), 0); - if (isH2Upgrade) { - w.closeAfterReply = true; - } - w.cw.res = w; - _r$9 = newBufioWriterSize(w.cw, 2048); /* */ $s = 43; case 43: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - w.w = _r$9; - _tmp$16 = w; - _tmp$17 = $ifaceNil; - w = _tmp$16; - err = _tmp$17; - $24r$8 = [w, err]; - $s = 44; case 44: return $24r$8; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [w, err]; } if($curGoroutine.asleep) { var $f = {$blk: conn.ptr.prototype.readRequest, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _entry, _entry$1, _i, _i$1, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, body$1, c, cancelCtx, ctx, d, d$1, d$2, err, haveHost, hdrDeadline, hosts, isH2Upgrade, k, ok, peek, req, t0, v, vv, w, wholeReqDeadline, x$5, $s, $deferred};return $f; } } - }; - conn.prototype.readRequest = function(ctx) { return this.$val.readRequest(ctx); }; - http1ServerSupportsRequest = function(req) { - var req; - if (req.ProtoMajor === 1) { - return true; - } - if ((req.ProtoMajor === 2) && (req.ProtoMinor === 0) && req.Method === "PRI" && req.RequestURI === "*") { - return true; - } - return false; - }; - response.ptr.prototype.Header = function() { - var w; - w = this; - if (w.cw.header === false && w.wroteHeader && !w.cw.wroteHeader) { - w.cw.header = new Header(w.handlerHeader).Clone(); - } - w.calledHeader = true; - return w.handlerHeader; - }; - response.prototype.Header = function() { return this.$val.Header(); }; - checkWriteHeaderCode = function(code) { - var {_r$1, code, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (code < 100 || code > 999) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (code < 100 || code > 999) { */ case 1: - _r$1 = fmt.Sprintf("invalid WriteHeader code %v", new sliceType([new $Int(code)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: checkWriteHeaderCode, $c: true, $r, _r$1, code, $s};return $f; - }; - relevantCaller = function() { - var _tuple, frame, frame$1, frames, more, n, pc; - pc = $makeSlice(sliceType$18, 16); - n = runtime.Callers(1, pc); - frames = runtime.CallersFrames($subslice(pc, 0, n)); - frame = new runtime.Frame.ptr(0, ptrType$54.nil, "", "", 0, 0); - while (true) { - _tuple = frames.Next(); - frame$1 = $clone(_tuple[0], runtime.Frame); - more = _tuple[1]; - if (!strings.HasPrefix(frame$1.Function, "net/http.")) { - return frame$1; - } - if (!more) { - break; - } - } - return frame; - }; - response.ptr.prototype.WriteHeader = function(code) { - var {_r$1, _tuple, caller, caller$1, cl, code, err, v, w, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = w.conn.hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$1) { */ case 1: - caller = $clone(relevantCaller(), runtime.Frame); - $r = w.conn.server.logf("http: response.WriteHeader on hijacked connection from %s (%s:%d)", new sliceType([new $String(caller.Function), new $String(path.Base(caller.File)), new $Int(caller.Line)])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - /* */ if (w.wroteHeader) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (w.wroteHeader) { */ case 5: - caller$1 = $clone(relevantCaller(), runtime.Frame); - $r = w.conn.server.logf("http: superfluous response.WriteHeader call from %s (%s:%d)", new sliceType([new $String(caller$1.Function), new $String(path.Base(caller$1.File)), new $Int(caller$1.Line)])); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 6: - $r = checkWriteHeaderCode(code); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - w.wroteHeader = true; - w.status = code; - if (w.calledHeader && w.cw.header === false) { - w.cw.header = new Header(w.handlerHeader).Clone(); - } - cl = new Header(w.handlerHeader).get("Content-Length"); - /* */ if (!(cl === "")) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(cl === "")) { */ case 9: - _tuple = strconv.ParseInt(cl, 10, 64); - v = _tuple[0]; - err = _tuple[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil) && (v.$high > 0 || (v.$high === 0 && v.$low >= 0))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if ($interfaceIsEqual(err, $ifaceNil) && (v.$high > 0 || (v.$high === 0 && v.$low >= 0))) { */ case 11: - w.contentLength = v; - $s = 13; continue; - /* } else { */ case 12: - $r = w.conn.server.logf("http: invalid Content-Length of %q", new sliceType([new $String(cl)])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = new Header(w.handlerHeader).Del("Content-Length"); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: response.ptr.prototype.WriteHeader, $c: true, $r, _r$1, _tuple, caller, caller$1, cl, code, err, v, w, $s};return $f; - }; - response.prototype.WriteHeader = function(code) { return this.$val.WriteHeader(code); }; - extraHeader.ptr.prototype.Write = function(w) { - var {_i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, h, i, v, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - /* */ if (!(h.date === sliceType$3.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(h.date === sliceType$3.nil)) { */ case 1: - _r$1 = w.Write(headerDate); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = w.Write(h.date); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = w.Write(crlf); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 2: - /* */ if (!(h.contentLength === sliceType$3.nil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(h.contentLength === sliceType$3.nil)) { */ case 6: - _r$4 = w.Write(headerContentLength); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = w.Write(h.contentLength); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = w.Write(crlf); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 7: - _ref = new sliceType$2([h.contentType, h.connection, h.transferEncoding]); - _i = 0; - /* while (true) { */ case 11: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 12; continue; } - i = _i; - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - /* */ if (!(v === "")) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(v === "")) { */ case 13: - _r$7 = w.Write(((i < 0 || i >= extraHeaderKeys.$length) ? ($throwRuntimeError("index out of range"), undefined) : extraHeaderKeys.$array[extraHeaderKeys.$offset + i])); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = w.Write(colonSpace); /* */ $s = 16; case 16: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _r$9 = w.WriteString(v); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - _r$10 = w.Write(crlf); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - /* } */ case 14: - _i++; - $s = 11; continue; - case 12: - $s = -1; return; - /* */ } return; } var $f = {$blk: extraHeader.ptr.prototype.Write, $c: true, $r, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, h, i, v, w, $s};return $f; - }; - extraHeader.prototype.Write = function(w) { return this.$val.Write(w); }; - chunkWriter.ptr.prototype.writeHeader = function(p) { - var {_1, _arg, _arg$1, _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _i$2, _key, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _v, bdy, bdy$1, bdy$2, ce, code, connectionHeaderSet, cw, delConnectionHeader, delHeader, discard, ecr, err, excludeHeader, hasCE, hasCL, hasTE, haveType, header, isHEAD, k, k$1, keepAlivesEnabled, ok, owned, p, sentLength, setHeader, te, tooBig, trailers, v, w, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - excludeHeader = [excludeHeader]; - header = [header]; - owned = [owned]; - cw = this; - if (cw.wroteHeader) { - $s = -1; return; - } - cw.wroteHeader = true; - w = cw.res; - keepAlivesEnabled = w.conn.server.doKeepAlives(); - isHEAD = w.req.Method === "HEAD"; - header[0] = cw.header; - owned[0] = !(header[0] === false); - if (!owned[0]) { - header[0] = w.handlerHeader; - } - excludeHeader[0] = false; - delHeader = (function(excludeHeader, header, owned) { return function $b(key) { - var {_entry, _key, _tuple, key, ok, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (owned[0]) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (owned[0]) { */ case 1: - $r = new Header(header[0]).Del(key); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _tuple = (_entry = header[0][$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - ok = _tuple[1]; - if (!ok) { - $s = -1; return; - } - if (excludeHeader[0] === false) { - excludeHeader[0] = {}; - } - _key = key; (excludeHeader[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: true }; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _entry, _key, _tuple, key, ok, $s};return $f; - }; })(excludeHeader, header, owned); - setHeader = new extraHeader.ptr("", "", "", sliceType$3.nil, sliceType$3.nil); - trailers = false; - _ref = cw.header; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - if (strings.HasPrefix(k, "Trailer:")) { - if (excludeHeader[0] === false) { - excludeHeader[0] = {}; - } - _key = k; (excludeHeader[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: true }; - trailers = true; - } - _i++; - } - _ref$1 = (_entry$1 = cw.header[$String.keyFor("Trailer")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - _i$1 = 0; - /* while (true) { */ case 1: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 2; continue; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - trailers = true; - $r = foreachHeaderElement(v, $methodVal(cw.res, "declareTrailer")); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 1; continue; - case 2: - te = new Header(header[0]).get("Transfer-Encoding"); - hasTE = !(te === ""); - if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$51(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet() && !trailers && !hasTE && bodyAllowedForStatus(w.status) && new Header(header[0]).get("Content-Length") === "" && (!isHEAD || p.$length > 0)) { - w.contentLength = (new $Int64(0, p.$length)); - setHeader.contentLength = strconv.AppendInt($subslice(new sliceType$3(cw.res.clenBuf), 0, 0), (new $Int64(0, p.$length)), 10); - } - if (w.wants10KeepAlive && keepAlivesEnabled) { - sentLength = !(new Header(header[0]).get("Content-Length") === ""); - if (sentLength && new Header(header[0]).get("Connection") === "keep-alive") { - w.closeAfterReply = false; - } - } - hasCL = !((x$5 = w.contentLength, (x$5.$high === -1 && x$5.$low === 4294967295))); - if (w.wants10KeepAlive && (isHEAD || hasCL || !bodyAllowedForStatus(w.status))) { - _tuple = (_entry$2 = header[0][$String.keyFor("Connection")], _entry$2 !== undefined ? [_entry$2.v, true] : [sliceType$2.nil, false]); - connectionHeaderSet = _tuple[1]; - if (!connectionHeaderSet) { - setHeader.connection = "keep-alive"; - } - } else if (!w.req.ProtoAtLeast(1, 1) || w.wantsClose) { - w.closeAfterReply = true; - } - if (new Header(header[0]).get("Connection") === "close" || !keepAlivesEnabled) { - w.closeAfterReply = true; - } - _tuple$1 = $assertType(w.req.Body, ptrType$55, true); - ecr = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok && !(ecr.$ptr_sawEOF || (ecr.$ptr_sawEOF = new ptrType$51(function() { return this.$target.sawEOF; }, function($v) { this.$target.sawEOF = $v; }, ecr))).isSet()) { - w.closeAfterReply = true; - } - /* */ if (!((x$6 = w.req.ContentLength, (x$6.$high === 0 && x$6.$low === 0))) && !w.closeAfterReply) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((x$6 = w.req.ContentLength, (x$6.$high === 0 && x$6.$low === 0))) && !w.closeAfterReply) { */ case 4: - _tmp = false; - _tmp$1 = false; - discard = _tmp; - tooBig = _tmp$1; - _ref$2 = w.req.Body; - /* */ if ($assertType(_ref$2, ptrType$55, true)[1]) { $s = 6; continue; } - /* */ if ($assertType(_ref$2, ptrType$52, true)[1]) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($assertType(_ref$2, ptrType$55, true)[1]) { */ case 6: - bdy = _ref$2.$val; - if (bdy.resp.wroteContinue) { - discard = true; - } - $s = 9; continue; - /* } else if ($assertType(_ref$2, ptrType$52, true)[1]) { */ case 7: - bdy$1 = _ref$2.$val; - $r = bdy$1.mu.Lock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (bdy$1.closed) { - if (!bdy$1.sawEOF) { - w.closeAfterReply = true; - } - } else if ((x$7 = bdy$1.unreadDataSizeLocked(), (x$7.$high > 0 || (x$7.$high === 0 && x$7.$low >= 262144)))) { - tooBig = true; - } else { - discard = true; - } - $r = bdy$1.mu.Unlock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 9; continue; - /* } else { */ case 8: - bdy$2 = _ref$2; - discard = true; - /* } */ case 9: - /* */ if (discard) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (discard) { */ case 12: - _r$1 = io.CopyN(io.Discard, w.reqBody, new $Int64(0, 262145)); /* */ $s = 14; case 14: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$2 = _r$1; - err = _tuple$2[1]; - _1 = err; - /* */ if ($interfaceIsEqual(_1, $ifaceNil)) { $s = 16; continue; } - /* */ if ($interfaceIsEqual(_1, ($pkg.ErrBodyReadAfterClose))) { $s = 17; continue; } - /* */ if ($interfaceIsEqual(_1, (io.EOF))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ($interfaceIsEqual(_1, $ifaceNil)) { */ case 16: - tooBig = true; - $s = 20; continue; - /* } else if ($interfaceIsEqual(_1, ($pkg.ErrBodyReadAfterClose))) { */ case 17: - $s = 20; continue; - /* } else if ($interfaceIsEqual(_1, (io.EOF))) { */ case 18: - _r$2 = w.reqBody.Close(); /* */ $s = 21; case 21: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - w.closeAfterReply = true; - } - $s = 20; continue; - /* } else { */ case 19: - w.closeAfterReply = true; - /* } */ case 20: - case 15: - /* } */ case 13: - /* */ if (tooBig) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (tooBig) { */ case 22: - $r = w.requestTooLarge(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = delHeader("Connection"); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - setHeader.connection = "close"; - /* } */ case 23: - /* } */ case 5: - code = w.status; - /* */ if (bodyAllowedForStatus(code)) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (bodyAllowedForStatus(code)) { */ case 26: - _tuple$3 = (_entry$3 = header[0][$String.keyFor("Content-Type")], _entry$3 !== undefined ? [_entry$3.v, true] : [sliceType$2.nil, false]); - haveType = _tuple$3[1]; - _r$3 = new Header(header[0]).Get("Content-Encoding"); /* */ $s = 29; case 29: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ce = _r$3; - hasCE = ce.length > 0; - /* */ if (!hasCE && !haveType && !hasTE && p.$length > 0) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!hasCE && !haveType && !hasTE && p.$length > 0) { */ case 30: - _r$4 = DetectContentType(p); /* */ $s = 32; case 32: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - setHeader.contentType = _r$4; - /* } */ case 31: - $s = 28; continue; - /* } else { */ case 27: - _ref$3 = suppressedHeaders(code); - _i$2 = 0; - /* while (true) { */ case 33: - /* if (!(_i$2 < _ref$3.$length)) { break; } */ if(!(_i$2 < _ref$3.$length)) { $s = 34; continue; } - k$1 = ((_i$2 < 0 || _i$2 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$2]); - $r = delHeader(k$1); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$2++; - $s = 33; continue; - case 34: - /* } */ case 28: - /* */ if (!new Header(header[0]).has("Date")) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!new Header(header[0]).has("Date")) { */ case 36: - _arg = $subslice(new sliceType$3(cw.res.dateBuf), 0, 0); - _r$5 = time.Now(); /* */ $s = 38; case 38: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$1 = $clone(_r$5, time.Time); - _r$6 = appendTime(_arg, _arg$1); /* */ $s = 39; case 39: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - setHeader.date = _r$6; - /* } */ case 37: - /* */ if (hasCL && hasTE && !(te === "identity")) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (hasCL && hasTE && !(te === "identity")) { */ case 40: - $r = w.conn.server.logf("http: WriteHeader called with both Transfer-Encoding of %q and a Content-Length of %d", new sliceType([new $String(te), w.contentLength])); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = delHeader("Content-Length"); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - hasCL = false; - /* } */ case 41: - /* */ if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code) || (code === 204)) { $s = 44; continue; } - /* */ if (hasCL) { $s = 45; continue; } - /* */ if (w.req.ProtoAtLeast(1, 1)) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (w.req.Method === "HEAD" || !bodyAllowedForStatus(code) || (code === 204)) { */ case 44: - $r = delHeader("Transfer-Encoding"); /* */ $s = 49; case 49: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 48; continue; - /* } else if (hasCL) { */ case 45: - $r = delHeader("Transfer-Encoding"); /* */ $s = 50; case 50: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 48; continue; - /* } else if (w.req.ProtoAtLeast(1, 1)) { */ case 46: - /* */ if (hasTE && te === "identity") { $s = 51; continue; } - /* */ $s = 52; continue; - /* if (hasTE && te === "identity") { */ case 51: - cw.chunking = false; - w.closeAfterReply = true; - $r = delHeader("Transfer-Encoding"); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 53; continue; - /* } else { */ case 52: - cw.chunking = true; - setHeader.transferEncoding = "chunked"; - /* */ if (hasTE && te === "chunked") { $s = 55; continue; } - /* */ $s = 56; continue; - /* if (hasTE && te === "chunked") { */ case 55: - $r = delHeader("Transfer-Encoding"); /* */ $s = 57; case 57: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 56: - /* } */ case 53: - $s = 48; continue; - /* } else { */ case 47: - w.closeAfterReply = true; - $r = delHeader("Transfer-Encoding"); /* */ $s = 58; case 58: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 48: - /* */ if (cw.chunking) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (cw.chunking) { */ case 59: - $r = delHeader("Content-Length"); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 60: - if (!w.req.ProtoAtLeast(1, 0)) { - $s = -1; return; - } - if (!(w.closeAfterReply && (!keepAlivesEnabled || !hasToken(new Header(cw.header).get("Connection"), "close")))) { _v = false; $s = 62; continue s; } - _r$7 = isProtocolSwitchResponse(w.status, header[0]); /* */ $s = 63; case 63: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = !_r$7; case 62: - delConnectionHeader = _v; - /* */ if (delConnectionHeader) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (delConnectionHeader) { */ case 64: - $r = delHeader("Connection"); /* */ $s = 66; case 66: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (w.req.ProtoAtLeast(1, 1)) { - setHeader.connection = "close"; - } - /* } */ case 65: - $r = writeStatusLine(w.conn.bufw, w.req.ProtoAtLeast(1, 1), code, new sliceType$3(w.statusBuf)); /* */ $s = 67; case 67: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$8 = new Header(cw.header).WriteSubset(w.conn.bufw, excludeHeader[0]); /* */ $s = 68; case 68: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $r = $clone(setHeader, extraHeader).Write(w.conn.bufw); /* */ $s = 69; case 69: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$9 = w.conn.bufw.Write(crlf); /* */ $s = 70; case 70: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - $s = -1; return; - /* */ } return; } var $f = {$blk: chunkWriter.ptr.prototype.writeHeader, $c: true, $r, _1, _arg, _arg$1, _entry, _entry$1, _entry$2, _entry$3, _i, _i$1, _i$2, _key, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _ref$2, _ref$3, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, _tuple$3, _v, bdy, bdy$1, bdy$2, ce, code, connectionHeaderSet, cw, delConnectionHeader, delHeader, discard, ecr, err, excludeHeader, hasCE, hasCL, hasTE, haveType, header, isHEAD, k, k$1, keepAlivesEnabled, ok, owned, p, sentLength, setHeader, te, tooBig, trailers, v, w, x$5, x$6, x$7, $s};return $f; - }; - chunkWriter.prototype.writeHeader = function(p) { return this.$val.writeHeader(p); }; - foreachHeaderElement = function(v, fn) { - var {_i, _ref, f, fn, v, $s, $r, $c} = $restore(this, {v, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = textproto.TrimString(v); - if (v === "") { - $s = -1; return; - } - /* */ if (!strings.Contains(v, ",")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!strings.Contains(v, ",")) { */ case 1: - $r = fn(v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _ref = strings.Split(v, ","); - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - f = textproto.TrimString(f); - /* */ if (!(f === "")) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(f === "")) { */ case 6: - $r = fn(f); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - _i++; - $s = 4; continue; - case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: foreachHeaderElement, $c: true, $r, _i, _ref, f, fn, v, $s};return $f; - }; - writeStatusLine = function(bw, is11, code, scratch) { - var {_entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, bw, code, is11, ok, scratch, text, $s, $r, $c} = $restore(this, {bw, is11, code, scratch}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (is11) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (is11) { */ case 1: - _r$1 = bw.WriteString("HTTP/1.1 "); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = 3; continue; - /* } else { */ case 2: - _r$2 = bw.WriteString("HTTP/1.0 "); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 3: - _tuple = (_entry = statusText[$Int.keyFor(code)], _entry !== undefined ? [_entry.v, true] : ["", false]); - text = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (ok) { */ case 6: - _r$3 = bw.Write(strconv.AppendInt($subslice(scratch, 0, 0), (new $Int64(0, code)), 10)); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = bw.WriteByte(32); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - _r$5 = bw.WriteString(text); /* */ $s = 11; case 11: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - _r$6 = bw.WriteString("\r\n"); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 8; continue; - /* } else { */ case 7: - _r$7 = fmt.Fprintf(bw, "%03d status code %d\r\n", new sliceType([new $Int(code), new $Int(code)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 8: - $s = -1; return; - /* */ } return; } var $f = {$blk: writeStatusLine, $c: true, $r, _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, bw, code, is11, ok, scratch, text, $s};return $f; - }; - response.ptr.prototype.bodyAllowed = function() { - var w; - w = this; - if (!w.wroteHeader) { - $panic(new $String("")); - } - return bodyAllowedForStatus(w.status); - }; - response.prototype.bodyAllowed = function() { return this.$val.bodyAllowed(); }; - response.ptr.prototype.Write = function(data) { - var {$24r, _r$1, _tuple, data, err, n, w, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.write(data.$length, data, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: response.ptr.prototype.Write, $c: true, $r, $24r, _r$1, _tuple, data, err, n, w, $s};return $f; - }; - response.prototype.Write = function(data) { return this.$val.Write(data); }; - response.ptr.prototype.WriteString = function(data) { - var {$24r, _r$1, _tuple, data, err, n, w, $s, $r, $c} = $restore(this, {data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.write(data.length, sliceType$3.nil, data); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: response.ptr.prototype.WriteString, $c: true, $r, $24r, _r$1, _tuple, data, err, n, w, $s};return $f; - }; - response.prototype.WriteString = function(data) { return this.$val.WriteString(data); }; - response.ptr.prototype.write = function(lenData, dataB, dataS) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, caller, dataB, dataS, err, lenData, n, w, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {lenData, dataB, dataS}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.conn.hijacked(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$1) { */ case 1: - /* */ if (lenData > 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (lenData > 0) { */ case 4: - caller = $clone(relevantCaller(), runtime.Frame); - $r = w.conn.server.logf("http: response.Write on hijacked connection from %s (%s:%d)", new sliceType([new $String(caller.Function), new $String(path.Base(caller.File)), new $Int(caller.Line)])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _tmp = 0; - _tmp$1 = $pkg.ErrHijacked; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - /* } */ case 2: - /* */ if ((w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).isSet()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).isSet()) { */ case 7: - $r = w.writeContinueMu.Lock(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - (w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).setFalse(); - $r = w.writeContinueMu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - /* */ if (!w.wroteHeader) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!w.wroteHeader) { */ case 11: - $r = w.WriteHeader(200); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - if (lenData === 0) { - _tmp$2 = 0; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - if (!w.bodyAllowed()) { - _tmp$4 = 0; - _tmp$5 = $pkg.ErrBodyNotAllowed; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - w.written = (x$5 = w.written, x$6 = (new $Int64(0, lenData)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - if (!((x$7 = w.contentLength, (x$7.$high === -1 && x$7.$low === 4294967295))) && (x$8 = w.written, x$9 = w.contentLength, (x$8.$high > x$9.$high || (x$8.$high === x$9.$high && x$8.$low > x$9.$low)))) { - _tmp$6 = 0; - _tmp$7 = $pkg.ErrContentLength; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - } - /* */ if (!(dataB === sliceType$3.nil)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!(dataB === sliceType$3.nil)) { */ case 14: - _r$2 = w.w.Write(dataB); /* */ $s = 17; case 17: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 18; case 18: return $24r; - /* } else { */ case 15: - _r$3 = w.w.WriteString(dataS); /* */ $s = 19; case 19: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r$1 = [n, err]; - $s = 20; case 20: return $24r$1; - /* } */ case 16: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: response.ptr.prototype.write, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, caller, dataB, dataS, err, lenData, n, w, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - response.prototype.write = function(lenData, dataB, dataS) { return this.$val.write(lenData, dataB, dataS); }; - response.ptr.prototype.finishRequest = function() { - var {_r$1, _r$2, _r$3, _r$4, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - (w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$51(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).setTrue(); - /* */ if (!w.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!w.wroteHeader) { */ case 1: - $r = w.WriteHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = w.w.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - putBufioWriter(w.w); - $r = w.cw.close(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = w.conn.bufw.Flush(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $r = w.conn.r.abortPendingRead(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = w.reqBody.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* */ if (!(w.req.MultipartForm === ptrType$31.nil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(w.req.MultipartForm === ptrType$31.nil)) { */ case 9: - _r$4 = w.req.MultipartForm.RemoveAll(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: response.ptr.prototype.finishRequest, $c: true, $r, _r$1, _r$2, _r$3, _r$4, w, $s};return $f; - }; - response.prototype.finishRequest = function() { return this.$val.finishRequest(); }; - response.ptr.prototype.shouldReuseConnection = function() { - var {_r$1, w, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - if (w.closeAfterReply) { - $s = -1; return false; - } - if (!(w.req.Method === "HEAD") && !((x$5 = w.contentLength, (x$5.$high === -1 && x$5.$low === 4294967295))) && w.bodyAllowed() && !((x$6 = w.contentLength, x$7 = w.written, (x$6.$high === x$7.$high && x$6.$low === x$7.$low)))) { - $s = -1; return false; - } - if (!($interfaceIsEqual(w.conn.werr, $ifaceNil))) { - $s = -1; return false; - } - _r$1 = w.closedRequestBodyEarly(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_r$1) { */ case 1: - $s = -1; return false; - /* } */ case 2: - $s = -1; return true; - /* */ } return; } var $f = {$blk: response.ptr.prototype.shouldReuseConnection, $c: true, $r, _r$1, w, x$5, x$6, x$7, $s};return $f; - }; - response.prototype.shouldReuseConnection = function() { return this.$val.shouldReuseConnection(); }; - response.ptr.prototype.closedRequestBodyEarly = function() { - var {$24r, _r$1, _tuple, _v, body$1, ok, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _tuple = $assertType(w.req.Body, ptrType$52, true); - body$1 = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 1; continue s; } - _r$1 = body$1.didEarlyClose(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: response.ptr.prototype.closedRequestBodyEarly, $c: true, $r, $24r, _r$1, _tuple, _v, body$1, ok, w, $s};return $f; - }; - response.prototype.closedRequestBodyEarly = function() { return this.$val.closedRequestBodyEarly(); }; - response.ptr.prototype.Flush = function() { - var {_r$1, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - /* */ if (!w.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!w.wroteHeader) { */ case 1: - $r = w.WriteHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = w.w.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = w.cw.flush(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: response.ptr.prototype.Flush, $c: true, $r, _r$1, w, $s};return $f; - }; - response.prototype.Flush = function() { return this.$val.Flush(); }; - conn.ptr.prototype.finalFlush = function() { - var {_r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (!(c.bufr === ptrType$29.nil)) { - putBufioReader(c.bufr); - c.bufr = ptrType$29.nil; - } - /* */ if (!(c.bufw === ptrType$14.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(c.bufw === ptrType$14.nil)) { */ case 1: - _r$1 = c.bufw.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - putBufioWriter(c.bufw); - c.bufw = ptrType$14.nil; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.finalFlush, $c: true, $r, _r$1, c, $s};return $f; - }; - conn.prototype.finalFlush = function() { return this.$val.finalFlush(); }; - conn.ptr.prototype.close = function() { - var {_r$1, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - $r = c.finalFlush(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = c.rwc.Close(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.close, $c: true, $r, _r$1, c, $s};return $f; - }; - conn.prototype.close = function() { return this.$val.close(); }; - conn.ptr.prototype.closeWriteAndWait = function() { - var {_r$1, _tuple, c, ok, tcp, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - $r = c.finalFlush(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = $assertType(c.rwc, closeWriter, true); - tcp = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - _r$1 = tcp.CloseWrite(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 3: - $r = time.Sleep(new time.Duration(0, 500000000)); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.closeWriteAndWait, $c: true, $r, _r$1, _tuple, c, ok, tcp, $s};return $f; - }; - conn.prototype.closeWriteAndWait = function() { return this.$val.closeWriteAndWait(); }; - validNextProto = function(proto) { - var _1, proto; - _1 = proto; - if (_1 === ("") || _1 === ("http/1.1") || _1 === ("http/1.0")) { - return false; - } - return true; - }; - conn.ptr.prototype.setState = function(nc, state, runHook) { - var {_1, _r$1, _r$2, c, hook, nc, packedState, runHook, srv, state, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {nc, state, runHook}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - srv = c.server; - _1 = state; - /* */ if (_1 === (0)) { $s = 2; continue; } - /* */ if ((_1 === (3)) || (_1 === (4))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === (0)) { */ case 2: - $r = srv.trackConn(c, true); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; continue; - /* } else if ((_1 === (3)) || (_1 === (4))) { */ case 3: - $r = srv.trackConn(c, false); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - case 1: - if (state > 255 || state < 0) { - $panic(new $String("internal error")); - } - _r$1 = time.Now(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Unix(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - packedState = (x$5 = ((x$6 = $shiftLeft64(_r$2, 8), new $Uint64(x$6.$high, x$6.$low))), x$7 = (new $Uint64(0, state)), new $Uint64(x$5.$high | x$7.$high, (x$5.$low | x$7.$low) >>> 0)); - atomic.StoreUint64((x$8 = c.curState, (x$8.$ptr_atomic || (x$8.$ptr_atomic = new ptrType$56(function() { return this.$target.atomic; }, function($v) { this.$target.atomic = $v; }, x$8)))), packedState); - if (!runHook) { - $s = -1; return; - } - hook = srv.ConnState; - /* */ if (!(hook === $throwNilPointerError)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(hook === $throwNilPointerError)) { */ case 9: - $r = hook(nc, state); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - $s = -1; return; - /* */ } return; } var $f = {$blk: conn.ptr.prototype.setState, $c: true, $r, _1, _r$1, _r$2, c, hook, nc, packedState, runHook, srv, state, x$5, x$6, x$7, x$8, $s};return $f; - }; - conn.prototype.setState = function(nc, state, runHook) { return this.$val.setState(nc, state, runHook); }; - conn.ptr.prototype.getState = function() { - var _tmp, _tmp$1, c, packedState, state, unixSec, x$5, x$6; - state = 0; - unixSec = new $Int64(0, 0); - c = this; - packedState = atomic.LoadUint64((x$5 = c.curState, (x$5.$ptr_atomic || (x$5.$ptr_atomic = new ptrType$56(function() { return this.$target.atomic; }, function($v) { this.$target.atomic = $v; }, x$5))))); - _tmp = ((new $Uint64(packedState.$high & 0, (packedState.$low & 255) >>> 0).$low >> 0)); - _tmp$1 = ((x$6 = $shiftRightUint64(packedState, 8), new $Int64(x$6.$high, x$6.$low))); - state = _tmp; - unixSec = _tmp$1; - return [state, unixSec]; - }; - conn.prototype.getState = function() { return this.$val.getState(); }; - badRequestError = function(e) { - var e, x$5; - return (x$5 = new statusError.ptr(400, e), new x$5.constructor.elem(x$5)); - }; - statusError.ptr.prototype.Error = function() { - var e; - e = this; - return StatusText(e.code) + ": " + e.text; - }; - statusError.prototype.Error = function() { return this.$val.Error(); }; - isCommonNetReadError = function(err) { - var {_r$1, _tuple, _tuple$1, _v, err, neterr, oe, ok, ok$1, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(err, io.EOF)) { - $s = -1; return true; - } - _tuple = $assertType(err, net.Error, true); - neterr = _tuple[0]; - ok = _tuple[1]; - if (!(ok)) { _v = false; $s = 3; continue s; } - _r$1 = neterr.Timeout(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return true; - /* } */ case 2: - _tuple$1 = $assertType(err, ptrType$57, true); - oe = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (ok$1 && oe.Op === "read") { - $s = -1; return true; - } - $s = -1; return false; - /* */ } return; } var $f = {$blk: isCommonNetReadError, $c: true, $r, _r$1, _tuple, _tuple$1, _v, err, neterr, oe, ok, ok$1, $s};return $f; - }; - conn.ptr.prototype.serve = function(ctx) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _v, c, cancelCtx, code, ctx, d, dl, err, err$1, err$2, fn, h, inFlightResponse, ok, ok$1, ok$2, proto, publicErr, re, req, tlsConn, tlsTO, v, w, x$5, x$6, x$7, x$8, $s, $deferred, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - c = [c]; - inFlightResponse = [inFlightResponse]; - c[0] = this; - _r$1 = c[0].rwc.RemoteAddr(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.String(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - c[0].remoteAddr = _r$2; - _arg = ctx; - _arg$1 = $pkg.LocalAddrContextKey; - _r$3 = c[0].rwc.LocalAddr(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$2 = _r$3; - _r$4 = context.WithValue(_arg, _arg$1, _arg$2); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ctx = _r$4; - inFlightResponse[0] = ptrType$49.nil; - $deferred.push([(function(c, inFlightResponse) { return function $b() { - var {_r$5, _r$6, buf, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $recover(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, $pkg.ErrAbortHandler))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) && !($interfaceIsEqual(err, $pkg.ErrAbortHandler))) { */ case 1: - buf = $makeSlice(sliceType$3, 65536); - buf = $subslice(buf, 0, runtime.Stack(buf, false)); - $r = c[0].server.logf("http: panic serving %v: %v\n%s", new sliceType([new $String(c[0].remoteAddr), err, buf])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - /* */ if (!(inFlightResponse[0] === ptrType$49.nil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(inFlightResponse[0] === ptrType$49.nil)) { */ case 4: - $r = inFlightResponse[0].cancelCtx(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _r$5 = c[0].hijacked(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!_r$5) { */ case 7: - /* */ if (!(inFlightResponse[0] === ptrType$49.nil)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(inFlightResponse[0] === ptrType$49.nil)) { */ case 10: - $r = inFlightResponse[0].conn.r.abortPendingRead(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = inFlightResponse[0].reqBody.Close(); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 11: - $r = c[0].close(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = c[0].setState(c[0].rwc, 4, true); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$5, _r$6, buf, err, $s};return $f; - }; })(c, inFlightResponse), []]); - _tuple = $assertType(c[0].rwc, ptrType$30, true); - tlsConn = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ok) { */ case 5: - tlsTO = c[0].server.tlsHandshakeTimeout(); - /* */ if ((tlsTO.$high > 0 || (tlsTO.$high === 0 && tlsTO.$low > 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((tlsTO.$high > 0 || (tlsTO.$high === 0 && tlsTO.$low > 0))) { */ case 7: - _r$5 = time.Now(); /* */ $s = 9; case 9: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, time.Time).Add(tlsTO); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - dl = $clone(_r$6, time.Time); - _r$7 = c[0].rwc.SetReadDeadline($clone(dl, time.Time)); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = c[0].rwc.SetWriteDeadline($clone(dl, time.Time)); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 8: - _r$9 = tlsConn.HandshakeContext(ctx); /* */ $s = 13; case 13: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - _tuple$1 = $assertType(err, tls.RecordHeaderError, true); - re = $clone(_tuple$1[0], tls.RecordHeaderError); - ok$1 = _tuple$1[1]; - /* */ if (ok$1 && !($interfaceIsEqual(re.Conn, $ifaceNil)) && tlsRecordHeaderLooksLikeHTTP($clone(re.RecordHeader, arrayType$6))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (ok$1 && !($interfaceIsEqual(re.Conn, $ifaceNil)) && tlsRecordHeaderLooksLikeHTTP($clone(re.RecordHeader, arrayType$6))) { */ case 16: - _r$10 = io.WriteString(re.Conn, "HTTP/1.0 400 Bad Request\r\n\r\nClient sent an HTTP request to an HTTPS server.\n"); /* */ $s = 18; case 18: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - _r$11 = re.Conn.Close(); /* */ $s = 19; case 19: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - $s = 20; case 20: return; - /* } */ case 17: - _r$12 = c[0].rwc.RemoteAddr(); /* */ $s = 21; case 21: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _arg$3 = _r$12; - _arg$4 = err; - $r = c[0].server.logf("http: TLS handshake error from %s: %v", new sliceType([_arg$3, _arg$4])); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 23; case 23: return; - /* } */ case 15: - /* */ if ((tlsTO.$high > 0 || (tlsTO.$high === 0 && tlsTO.$low > 0))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if ((tlsTO.$high > 0 || (tlsTO.$high === 0 && tlsTO.$low > 0))) { */ case 24: - _r$13 = c[0].rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 26; case 26: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _r$13; - _r$14 = c[0].rwc.SetWriteDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 27; case 27: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - /* } */ case 25: - c[0].tlsState = new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$5.nil, sliceType$3.nil, sliceType$3.nil, $throwNilPointerError); - _r$15 = tlsConn.ConnectionState(); /* */ $s = 28; case 28: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - tls.ConnectionState.copy(c[0].tlsState, _r$15); - proto = c[0].tlsState.NegotiatedProtocol; - /* */ if (validNextProto(proto)) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (validNextProto(proto)) { */ case 29: - fn = (_entry = c[0].server.TLSNextProto[$String.keyFor(proto)], _entry !== undefined ? _entry.v : $throwNilPointerError); - /* */ if (!(fn === $throwNilPointerError)) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!(fn === $throwNilPointerError)) { */ case 31: - h = new initALPNRequest.ptr(ctx, tlsConn, new serverHandler.ptr(c[0].server)); - $r = c[0].setState(c[0].rwc, 1, false); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fn(c[0].server, tlsConn, new h.constructor.elem(h)); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 32: - $s = 35; case 35: return; - /* } */ case 30: - /* } */ case 6: - _r$16 = context.WithCancel(ctx); /* */ $s = 36; case 36: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _tuple$2 = _r$16; - ctx = _tuple$2[0]; - cancelCtx = _tuple$2[1]; - c[0].cancelCtx = cancelCtx; - $deferred.push([cancelCtx, []]); - c[0].r = new connReader.ptr(c[0], new sync.Mutex.ptr(0, 0), false, arrayType$2.zero(), ptrType$48.nil, false, false, new $Int64(0, 0)); - _r$17 = newBufioReader(c[0].r); /* */ $s = 37; case 37: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - c[0].bufr = _r$17; - _r$18 = newBufioWriterSize((x$5 = new checkConnErrorWriter.ptr(c[0]), new x$5.constructor.elem(x$5)), 4096); /* */ $s = 38; case 38: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - c[0].bufw = _r$18; - /* while (true) { */ case 39: - _r$19 = c[0].readRequest(ctx); /* */ $s = 41; case 41: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - _tuple$3 = _r$19; - w = _tuple$3[0]; - err$1 = _tuple$3[1]; - /* */ if (!((x$6 = c[0].r.remain, x$7 = c[0].server.initialReadLimitSize(), (x$6.$high === x$7.$high && x$6.$low === x$7.$low)))) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (!((x$6 = c[0].r.remain, x$7 = c[0].server.initialReadLimitSize(), (x$6.$high === x$7.$high && x$6.$low === x$7.$low)))) { */ case 42: - $r = c[0].setState(c[0].rwc, 1, true); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 43: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 45: - /* */ if ($interfaceIsEqual(err$1, errTooLarge)) { $s = 48; continue; } - /* */ if (isUnsupportedTEError(err$1)) { $s = 49; continue; } - _r$20 = isCommonNetReadError(err$1); /* */ $s = 53; case 53: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - /* */ if (_r$20) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if ($interfaceIsEqual(err$1, errTooLarge)) { */ case 48: - _r$21 = fmt.Fprintf(c[0].rwc, "HTTP/1.1 431 Request Header Fields Too Large\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n431 Request Header Fields Too Large", new sliceType([])); /* */ $s = 54; case 54: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - _r$21; - $r = c[0].closeWriteAndWait(); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 56; case 56: return; - /* } else if (isUnsupportedTEError(err$1)) { */ case 49: - code = 501; - _r$22 = fmt.Fprintf(c[0].rwc, "HTTP/1.1 %d %s%sUnsupported transfer encoding", new sliceType([new $Int(code), new $String(StatusText(code)), new $String("\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n")])); /* */ $s = 57; case 57: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - _r$22; - $s = 58; case 58: return; - /* } else if (_r$20) { */ case 50: - $s = 59; case 59: return; - /* } else { */ case 51: - _tuple$4 = $assertType(err$1, statusError, true); - v = $clone(_tuple$4[0], statusError); - ok$2 = _tuple$4[1]; - /* */ if (ok$2) { $s = 60; continue; } - /* */ $s = 61; continue; - /* if (ok$2) { */ case 60: - _r$23 = fmt.Fprintf(c[0].rwc, "HTTP/1.1 %d %s: %s%s%d %s: %s", new sliceType([new $Int(v.code), new $String(StatusText(v.code)), new $String(v.text), new $String("\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n"), new $Int(v.code), new $String(StatusText(v.code)), new $String(v.text)])); /* */ $s = 62; case 62: if($c) { $c = false; _r$23 = _r$23.$blk(); } if (_r$23 && _r$23.$blk !== undefined) { break s; } - _r$23; - $s = 63; case 63: return; - /* } */ case 61: - publicErr = "400 Bad Request"; - _r$24 = fmt.Fprintf(c[0].rwc, "HTTP/1.1 " + publicErr + "\r\nContent-Type: text/plain; charset=utf-8\r\nConnection: close\r\n\r\n" + publicErr, new sliceType([])); /* */ $s = 64; case 64: if($c) { $c = false; _r$24 = _r$24.$blk(); } if (_r$24 && _r$24.$blk !== undefined) { break s; } - _r$24; - $s = 65; case 65: return; - /* } */ case 52: - case 47: - /* } */ case 46: - req = w.req; - /* */ if (req.expectsContinue()) { $s = 66; continue; } - /* */ if (!(new Header(req.Header).get("Expect") === "")) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if (req.expectsContinue()) { */ case 66: - if (req.ProtoAtLeast(1, 1) && !((x$8 = req.ContentLength, (x$8.$high === 0 && x$8.$low === 0)))) { - req.Body = new expectContinueReader.ptr(w, req.Body, 0, 0); - (w.$ptr_canWriteContinue || (w.$ptr_canWriteContinue = new ptrType$51(function() { return this.$target.canWriteContinue; }, function($v) { this.$target.canWriteContinue = $v; }, w))).setTrue(); - } - $s = 68; continue; - /* } else if (!(new Header(req.Header).get("Expect") === "")) { */ case 67: - $r = w.sendExpectationFailed(); /* */ $s = 69; case 69: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 70; case 70: return; - /* } */ case 68: - c[0].curReq.Store(w); - _r$25 = requestBodyRemains(req.Body); /* */ $s = 74; case 74: if($c) { $c = false; _r$25 = _r$25.$blk(); } if (_r$25 && _r$25.$blk !== undefined) { break s; } - /* */ if (_r$25) { $s = 71; continue; } - /* */ $s = 72; continue; - /* if (_r$25) { */ case 71: - $r = registerOnHitEOF(req.Body, $methodVal(w.conn.r, "startBackgroundRead")); /* */ $s = 75; case 75: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 73; continue; - /* } else { */ case 72: - $r = w.conn.r.startBackgroundRead(); /* */ $s = 76; case 76: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 73: - inFlightResponse[0] = w; - $r = new serverHandler.ptr(c[0].server).ServeHTTP(w, w.req); /* */ $s = 77; case 77: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - inFlightResponse[0] = ptrType$49.nil; - $r = w.cancelCtx(); /* */ $s = 78; case 78: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$26 = c[0].hijacked(); /* */ $s = 81; case 81: if($c) { $c = false; _r$26 = _r$26.$blk(); } if (_r$26 && _r$26.$blk !== undefined) { break s; } - /* */ if (_r$26) { $s = 79; continue; } - /* */ $s = 80; continue; - /* if (_r$26) { */ case 79: - $s = 82; case 82: return; - /* } */ case 80: - $r = w.finishRequest(); /* */ $s = 83; case 83: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$27 = w.shouldReuseConnection(); /* */ $s = 86; case 86: if($c) { $c = false; _r$27 = _r$27.$blk(); } if (_r$27 && _r$27.$blk !== undefined) { break s; } - /* */ if (!_r$27) { $s = 84; continue; } - /* */ $s = 85; continue; - /* if (!_r$27) { */ case 84: - if (w.requestBodyLimitHit) { _v = true; $s = 89; continue s; } - _r$28 = w.closedRequestBodyEarly(); /* */ $s = 90; case 90: if($c) { $c = false; _r$28 = _r$28.$blk(); } if (_r$28 && _r$28.$blk !== undefined) { break s; } - _v = _r$28; case 89: - /* */ if (_v) { $s = 87; continue; } - /* */ $s = 88; continue; - /* if (_v) { */ case 87: - $r = c[0].closeWriteAndWait(); /* */ $s = 91; case 91: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 88: - $s = 92; case 92: return; - /* } */ case 85: - $r = c[0].setState(c[0].rwc, 2, true); /* */ $s = 93; case 93: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - c[0].curReq.Store((ptrType$49.nil)); - /* */ if (!w.conn.server.doKeepAlives()) { $s = 94; continue; } - /* */ $s = 95; continue; - /* if (!w.conn.server.doKeepAlives()) { */ case 94: - $s = 96; case 96: return; - /* } */ case 95: - d = c[0].server.idleTimeout(); - /* */ if (!((d.$high === 0 && d.$low === 0))) { $s = 97; continue; } - /* */ $s = 98; continue; - /* if (!((d.$high === 0 && d.$low === 0))) { */ case 97: - _r$29 = time.Now(); /* */ $s = 99; case 99: if($c) { $c = false; _r$29 = _r$29.$blk(); } if (_r$29 && _r$29.$blk !== undefined) { break s; } - _r$30 = $clone(_r$29, time.Time).Add(d); /* */ $s = 100; case 100: if($c) { $c = false; _r$30 = _r$30.$blk(); } if (_r$30 && _r$30.$blk !== undefined) { break s; } - _r$31 = c[0].rwc.SetReadDeadline($clone(_r$30, time.Time)); /* */ $s = 101; case 101: if($c) { $c = false; _r$31 = _r$31.$blk(); } if (_r$31 && _r$31.$blk !== undefined) { break s; } - _r$31; - _r$32 = c[0].bufr.Peek(4); /* */ $s = 102; case 102: if($c) { $c = false; _r$32 = _r$32.$blk(); } if (_r$32 && _r$32.$blk !== undefined) { break s; } - _tuple$5 = _r$32; - err$2 = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 103; continue; } - /* */ $s = 104; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 103: - $s = 105; case 105: return; - /* } */ case 104: - /* } */ case 98: - _r$33 = c[0].rwc.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 106; case 106: if($c) { $c = false; _r$33 = _r$33.$blk(); } if (_r$33 && _r$33.$blk !== undefined) { break s; } - _r$33; - $s = 39; continue; - case 40: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: conn.ptr.prototype.serve, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$20, _r$21, _r$22, _r$23, _r$24, _r$25, _r$26, _r$27, _r$28, _r$29, _r$3, _r$30, _r$31, _r$32, _r$33, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _v, c, cancelCtx, code, ctx, d, dl, err, err$1, err$2, fn, h, inFlightResponse, ok, ok$1, ok$2, proto, publicErr, re, req, tlsConn, tlsTO, v, w, x$5, x$6, x$7, x$8, $s, $deferred};return $f; } } - }; - conn.prototype.serve = function(ctx) { return this.$val.serve(ctx); }; - response.ptr.prototype.sendExpectationFailed = function() { - var {w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - $r = new Header(w.Header()).Set("Connection", "close"); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = w.WriteHeader(417); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = w.finishRequest(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: response.ptr.prototype.sendExpectationFailed, $c: true, $r, w, $s};return $f; - }; - response.prototype.sendExpectationFailed = function() { return this.$val.sendExpectationFailed(); }; - response.ptr.prototype.Hijack = function() { - var {$24r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, buf, c, err, rwc, w, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rwc = $ifaceNil; - buf = ptrType$44.nil; - err = $ifaceNil; - w = this; - if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$51(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet()) { - $panic(new $String("net/http: Hijack called after ServeHTTP finished")); - } - /* */ if (w.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (w.wroteHeader) { */ case 1: - $r = w.cw.flush(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - c = w.conn; - $r = c.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(c.mu, "Unlock"), []]); - _r$1 = c.hijackLocked(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - rwc = _tuple[0]; - buf = _tuple[1]; - err = _tuple[2]; - if ($interfaceIsEqual(err, $ifaceNil)) { - putBufioWriter(w.w); - w.w = ptrType$14.nil; - } - _tmp = rwc; - _tmp$1 = buf; - _tmp$2 = err; - rwc = _tmp; - buf = _tmp$1; - err = _tmp$2; - $24r = [rwc, buf, err]; - $s = 6; case 6: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [rwc, buf, err]; } if($curGoroutine.asleep) { var $f = {$blk: response.ptr.prototype.Hijack, $c: true, $r, $24r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, buf, c, err, rwc, w, $s, $deferred};return $f; } } - }; - response.prototype.Hijack = function() { return this.$val.Hijack(); }; - response.ptr.prototype.CloseNotify = function() { - var w; - w = this; - if ((w.$ptr_handlerDone || (w.$ptr_handlerDone = new ptrType$51(function() { return this.$target.handlerDone; }, function($v) { this.$target.handlerDone = $v; }, w))).isSet()) { - $panic(new $String("net/http: CloseNotify called after ServeHTTP finished")); - } - return w.closeNotifyCh; - }; - response.prototype.CloseNotify = function() { return this.$val.CloseNotify(); }; - registerOnHitEOF = function(rc, fn) { - var {_r$1, _ref, fn, rc, v, v$1, v$2, $s, $r, $c} = $restore(this, {rc, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = rc; - /* */ if ($assertType(_ref, ptrType$55, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$52, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$55, true)[1]) { */ case 1: - v = _ref.$val; - $r = registerOnHitEOF(v.readCloser, fn); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; continue; - /* } else if ($assertType(_ref, ptrType$52, true)[1]) { */ case 2: - v$1 = _ref.$val; - $r = v$1.registerOnHitEOF(fn); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; continue; - /* } else { */ case 3: - v$2 = _ref; - _r$1 = fmt.Sprintf("%T", new sliceType([rc])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String("unexpected type " + _r$1)); - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: registerOnHitEOF, $c: true, $r, _r$1, _ref, fn, rc, v, v$1, v$2, $s};return $f; - }; - requestBodyRemains = function(rc) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _ref, rc, v, v$1, v$2, $s, $r, $c} = $restore(this, {rc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(rc, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { - $s = -1; return false; - } - _ref = rc; - /* */ if ($assertType(_ref, ptrType$55, true)[1]) { $s = 1; continue; } - /* */ if ($assertType(_ref, ptrType$52, true)[1]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($assertType(_ref, ptrType$55, true)[1]) { */ case 1: - v = _ref.$val; - _r$1 = requestBodyRemains(v.readCloser); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* } else if ($assertType(_ref, ptrType$52, true)[1]) { */ case 2: - v$1 = _ref.$val; - _r$2 = v$1.bodyRemains(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 8; case 8: return $24r$1; - /* } else { */ case 3: - v$2 = _ref; - _r$3 = fmt.Sprintf("%T", new sliceType([rc])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $panic(new $String("unexpected type " + _r$3)); - /* } */ case 4: - $s = -1; return false; - /* */ } return; } var $f = {$blk: requestBodyRemains, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _ref, rc, v, v$1, v$2, $s};return $f; - }; - HandlerFunc.prototype.ServeHTTP = function(w, r) { - var {f, r, w, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - $r = f(w, r); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: HandlerFunc.prototype.ServeHTTP, $c: true, $r, f, r, w, $s};return $f; - }; - $ptrType(HandlerFunc).prototype.ServeHTTP = function(w, r) { return new HandlerFunc(this.$get()).ServeHTTP(w, r); }; - Error = function(w, error, code) { - var {_r$1, _r$2, _r$3, code, error, w, $s, $r, $c} = $restore(this, {w, error, code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = w.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = new Header(_r$1).Set("Content-Type", "text/plain; charset=utf-8"); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = w.Header(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = new Header(_r$2).Set("X-Content-Type-Options", "nosniff"); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = w.WriteHeader(code); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = fmt.Fprintln(w, new sliceType([new $String(error)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* */ } return; } var $f = {$blk: Error, $c: true, $r, _r$1, _r$2, _r$3, code, error, w, $s};return $f; - }; - $pkg.Error = Error; - NotFound = function(w, r) { - var {r, w, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = Error(w, "404 page not found", 404); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: NotFound, $c: true, $r, r, w, $s};return $f; - }; - $pkg.NotFound = NotFound; - NotFoundHandler = function() { - return new HandlerFunc((NotFound)); - }; - $pkg.NotFoundHandler = NotFoundHandler; - Redirect = function(w, r, url$1, code) { - var {_entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, body$1, code, err, h, hadCT, i, olddir, oldpath, query, r, trailing, u, url$1, w, $s, $r, $c} = $restore(this, {w, r, url$1, code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = url.Parse(url$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - u = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - if (u.Scheme === "" && u.Host === "") { - oldpath = r.URL.Path; - if (oldpath === "") { - oldpath = "/"; - } - if (url$1 === "" || !((url$1.charCodeAt(0) === 47))) { - _tuple$1 = path.Split(oldpath); - olddir = _tuple$1[0]; - url$1 = olddir + url$1; - } - query = ""; - i = strings.Index(url$1, "?"); - if (!((i === -1))) { - _tmp = $substring(url$1, 0, i); - _tmp$1 = $substring(url$1, i); - url$1 = _tmp; - query = _tmp$1; - } - trailing = strings.HasSuffix(url$1, "/"); - url$1 = path.Clean(url$1); - if (trailing && !strings.HasSuffix(url$1, "/")) { - url$1 = url$1 + ("/"); - } - url$1 = url$1 + (query); - } - } - _r$2 = w.Header(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - h = _r$2; - _tuple$2 = (_entry = h[$String.keyFor("Content-Type")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - hadCT = _tuple$2[1]; - $r = new Header(h).Set("Location", hexEscapeNonASCII(url$1)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!hadCT && (r.Method === "GET" || r.Method === "HEAD")) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!hadCT && (r.Method === "GET" || r.Method === "HEAD")) { */ case 4: - $r = new Header(h).Set("Content-Type", "text/html; charset=utf-8"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $r = w.WriteHeader(code); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!hadCT && r.Method === "GET") { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!hadCT && r.Method === "GET") { */ case 8: - _r$3 = htmlEscape(url$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - body$1 = "" + (_entry$1 = statusText[$Int.keyFor(code)], _entry$1 !== undefined ? _entry$1.v : "") + ".\n"; - _r$4 = fmt.Fprintln(w, new sliceType([new $String(body$1)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 9: - $s = -1; return; - /* */ } return; } var $f = {$blk: Redirect, $c: true, $r, _entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _tmp, _tmp$1, _tuple, _tuple$1, _tuple$2, body$1, code, err, h, hadCT, i, olddir, oldpath, query, r, trailing, u, url$1, w, $s};return $f; - }; - $pkg.Redirect = Redirect; - htmlEscape = function(s) { - var {$24r, _r$1, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = htmlReplacer.Replace(s); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: htmlEscape, $c: true, $r, $24r, _r$1, s, $s};return $f; - }; - redirectHandler.ptr.prototype.ServeHTTP = function(w, r) { - var {r, rh, w, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rh = this; - $r = Redirect(w, r, rh.url, rh.code); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: redirectHandler.ptr.prototype.ServeHTTP, $c: true, $r, r, rh, w, $s};return $f; - }; - redirectHandler.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; - RedirectHandler = function(url$1, code) { - var code, url$1; - return new redirectHandler.ptr(url$1, code); - }; - $pkg.RedirectHandler = RedirectHandler; - cleanPath = function(p) { - var np, p; - if (p === "") { - return "/"; - } - if (!((p.charCodeAt(0) === 47))) { - p = "/" + p; - } - np = path.Clean(p); - if ((p.charCodeAt((p.length - 1 >> 0)) === 47) && !(np === "/")) { - if ((p.length === (np.length + 1 >> 0)) && strings.HasPrefix(p, np)) { - np = p; - } else { - np = np + ("/"); - } - } - return np; - }; - stripHostPort = function(h) { - var {_r$1, _tuple, err, h, host, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!strings.Contains(h, ":")) { - $s = -1; return h; - } - _r$1 = net.SplitHostPort(h); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return h; - } - $s = -1; return host; - /* */ } return; } var $f = {$blk: stripHostPort, $c: true, $r, _r$1, _tuple, err, h, host, $s};return $f; - }; - ServeMux.ptr.prototype.match = function(path$1) { - var _entry, _i, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, e, h, mux, ok, path$1, pattern, v; - h = $ifaceNil; - pattern = ""; - mux = this; - _tuple = (_entry = mux.m[$String.keyFor(path$1)], _entry !== undefined ? [_entry.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); - v = $clone(_tuple[0], muxEntry); - ok = _tuple[1]; - if (ok) { - _tmp = v.h; - _tmp$1 = v.pattern; - h = _tmp; - pattern = _tmp$1; - return [h, pattern]; - } - _ref = mux.es; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - e = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), muxEntry); - if (strings.HasPrefix(path$1, e.pattern)) { - _tmp$2 = e.h; - _tmp$3 = e.pattern; - h = _tmp$2; - pattern = _tmp$3; - return [h, pattern]; - } - _i++; - } - _tmp$4 = $ifaceNil; - _tmp$5 = ""; - h = _tmp$4; - pattern = _tmp$5; - return [h, pattern]; - }; - ServeMux.prototype.match = function(path$1) { return this.$val.match(path$1); }; - ServeMux.ptr.prototype.redirectToPathSlash = function(host, path$1, u) { - var {host, mux, path$1, shouldRedirect, u, $s, $r, $c} = $restore(this, {host, path$1, u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mux = this; - $r = mux.mu.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - shouldRedirect = mux.shouldRedirectRLocked(host, path$1); - $r = mux.mu.RUnlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!shouldRedirect) { - $s = -1; return [u, false]; - } - path$1 = path$1 + "/"; - u = new url.URL.ptr("", "", ptrType$21.nil, "", path$1, "", false, u.RawQuery, "", ""); - $s = -1; return [u, true]; - /* */ } return; } var $f = {$blk: ServeMux.ptr.prototype.redirectToPathSlash, $c: true, $r, host, mux, path$1, shouldRedirect, u, $s};return $f; - }; - ServeMux.prototype.redirectToPathSlash = function(host, path$1, u) { return this.$val.redirectToPathSlash(host, path$1, u); }; - ServeMux.ptr.prototype.shouldRedirectRLocked = function(host, path$1) { - var _entry, _entry$1, _i, _i$1, _ref, _ref$1, _tuple, _tuple$1, c, c$1, exist, exist$1, host, mux, n, p, path$1; - mux = this; - p = new sliceType$2([path$1, host + path$1]); - _ref = p; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _tuple = (_entry = mux.m[$String.keyFor(c)], _entry !== undefined ? [_entry.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); - exist = _tuple[1]; - if (exist) { - return false; - } - _i++; - } - n = path$1.length; - if (n === 0) { - return false; - } - _ref$1 = p; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - c$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _tuple$1 = (_entry$1 = mux.m[$String.keyFor(c$1 + "/")], _entry$1 !== undefined ? [_entry$1.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); - exist$1 = _tuple$1[1]; - if (exist$1) { - return !((path$1.charCodeAt((n - 1 >> 0)) === 47)); - } - _i$1++; - } - return false; - }; - ServeMux.prototype.shouldRedirectRLocked = function(host, path$1) { return this.$val.shouldRedirectRLocked(host, path$1); }; - ServeMux.ptr.prototype.Handler = function(r) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, h, host, mux, ok, ok$1, path$1, pattern, r, u, u$1, u$2, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = $ifaceNil; - pattern = ""; - mux = this; - /* */ if (r.Method === "CONNECT") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.Method === "CONNECT") { */ case 1: - _r$1 = mux.redirectToPathSlash(r.URL.Host, r.URL.Path, r.URL); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - u = _tuple[0]; - ok = _tuple[1]; - if (ok) { - _tmp = RedirectHandler(u.String(), 301); - _tmp$1 = u.Path; - h = _tmp; - pattern = _tmp$1; - $s = -1; return [h, pattern]; - } - _r$2 = mux.handler(r.Host, r.URL.Path); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - h = _tuple$1[0]; - pattern = _tuple$1[1]; - $24r = [h, pattern]; - $s = 5; case 5: return $24r; - /* } */ case 2: - _r$3 = stripHostPort(r.Host); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - host = _r$3; - path$1 = cleanPath(r.URL.Path); - _r$4 = mux.redirectToPathSlash(host, path$1, r.URL); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - u$1 = _tuple$2[0]; - ok$1 = _tuple$2[1]; - if (ok$1) { - _tmp$2 = RedirectHandler(u$1.String(), 301); - _tmp$3 = u$1.Path; - h = _tmp$2; - pattern = _tmp$3; - $s = -1; return [h, pattern]; - } - /* */ if (!(path$1 === r.URL.Path)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(path$1 === r.URL.Path)) { */ case 8: - _r$5 = mux.handler(host, path$1); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$3 = _r$5; - pattern = _tuple$3[1]; - u$2 = new url.URL.ptr("", "", ptrType$21.nil, "", path$1, "", false, r.URL.RawQuery, "", ""); - _tmp$4 = RedirectHandler(u$2.String(), 301); - _tmp$5 = pattern; - h = _tmp$4; - pattern = _tmp$5; - $s = -1; return [h, pattern]; - /* } */ case 9: - _r$6 = mux.handler(host, r.URL.Path); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$4 = _r$6; - h = _tuple$4[0]; - pattern = _tuple$4[1]; - $24r$1 = [h, pattern]; - $s = 12; case 12: return $24r$1; - /* */ } return; } var $f = {$blk: ServeMux.ptr.prototype.Handler, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, h, host, mux, ok, ok$1, path$1, pattern, r, u, u$1, u$2, $s};return $f; - }; - ServeMux.prototype.Handler = function(r) { return this.$val.Handler(r); }; - ServeMux.ptr.prototype.handler = function(host, path$1) { - var {$24r, _tmp, _tmp$1, _tuple, _tuple$1, h, host, mux, path$1, pattern, $s, $deferred, $r, $c} = $restore(this, {host, path$1}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - h = $ifaceNil; - pattern = ""; - mux = this; - $r = mux.mu.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(mux.mu, "RUnlock"), []]); - if (mux.hosts) { - _tuple = mux.match(host + path$1); - h = _tuple[0]; - pattern = _tuple[1]; - } - if ($interfaceIsEqual(h, $ifaceNil)) { - _tuple$1 = mux.match(path$1); - h = _tuple$1[0]; - pattern = _tuple$1[1]; - } - if ($interfaceIsEqual(h, $ifaceNil)) { - _tmp = NotFoundHandler(); - _tmp$1 = ""; - h = _tmp; - pattern = _tmp$1; - } - $24r = [h, pattern]; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [h, pattern]; } if($curGoroutine.asleep) { var $f = {$blk: ServeMux.ptr.prototype.handler, $c: true, $r, $24r, _tmp, _tmp$1, _tuple, _tuple$1, h, host, mux, path$1, pattern, $s, $deferred};return $f; } } - }; - ServeMux.prototype.handler = function(host, path$1) { return this.$val.handler(host, path$1); }; - ServeMux.ptr.prototype.ServeHTTP = function(w, r) { - var {_r$1, _r$2, _tuple, h, mux, r, w, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mux = this; - /* */ if (r.RequestURI === "*") { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.RequestURI === "*") { */ case 1: - /* */ if (r.ProtoAtLeast(1, 1)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (r.ProtoAtLeast(1, 1)) { */ case 3: - _r$1 = w.Header(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = new Header(_r$1).Set("Connection", "close"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $r = w.WriteHeader(400); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _r$2 = mux.Handler(r); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - h = _tuple[0]; - $r = h.ServeHTTP(w, r); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: ServeMux.ptr.prototype.ServeHTTP, $c: true, $r, _r$1, _r$2, _tuple, h, mux, r, w, $s};return $f; - }; - ServeMux.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; - ServeMux.ptr.prototype.Handle = function(pattern, handler) { - var {_entry, _key, _r$1, _tuple, e, exist, handler, mux, pattern, $s, $deferred, $r, $c} = $restore(this, {pattern, handler}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - mux = this; - $r = mux.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(mux.mu, "Unlock"), []]); - if (pattern === "") { - $panic(new $String("http: invalid pattern")); - } - if ($interfaceIsEqual(handler, $ifaceNil)) { - $panic(new $String("http: nil handler")); - } - _tuple = (_entry = mux.m[$String.keyFor(pattern)], _entry !== undefined ? [_entry.v, true] : [new muxEntry.ptr($ifaceNil, ""), false]); - exist = _tuple[1]; - if (exist) { - $panic(new $String("http: multiple registrations for " + pattern)); - } - if (mux.m === false) { - mux.m = {}; - } - e = new muxEntry.ptr(handler, pattern); - _key = pattern; (mux.m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $clone(e, muxEntry) }; - /* */ if (pattern.charCodeAt((pattern.length - 1 >> 0)) === 47) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (pattern.charCodeAt((pattern.length - 1 >> 0)) === 47) { */ case 2: - _r$1 = appendSorted(mux.es, $clone(e, muxEntry)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - mux.es = _r$1; - /* } */ case 3: - if (!((pattern.charCodeAt(0) === 47))) { - mux.hosts = true; - } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: ServeMux.ptr.prototype.Handle, $c: true, $r, _entry, _key, _r$1, _tuple, e, exist, handler, mux, pattern, $s, $deferred};return $f; } } - }; - ServeMux.prototype.Handle = function(pattern, handler) { return this.$val.Handle(pattern, handler); }; - appendSorted = function(es, e) { - var {_r$1, e, es, i, n, $s, $r, $c} = $restore(this, {es, e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = [e]; - es = [es]; - n = es[0].$length; - _r$1 = sort.Search(n, (function(e, es) { return function(i) { - var i; - return ((i < 0 || i >= es[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : es[0].$array[es[0].$offset + i]).pattern.length < e[0].pattern.length; - }; })(e, es)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - i = _r$1; - if (i === n) { - $s = -1; return $append(es[0], e[0]); - } - es[0] = $append(es[0], new muxEntry.ptr($ifaceNil, "")); - $copySlice($subslice(es[0], (i + 1 >> 0)), $subslice(es[0], i)); - muxEntry.copy(((i < 0 || i >= es[0].$length) ? ($throwRuntimeError("index out of range"), undefined) : es[0].$array[es[0].$offset + i]), e[0]); - $s = -1; return es[0]; - /* */ } return; } var $f = {$blk: appendSorted, $c: true, $r, _r$1, e, es, i, n, $s};return $f; - }; - ServeMux.ptr.prototype.HandleFunc = function(pattern, handler) { - var {handler, mux, pattern, $s, $r, $c} = $restore(this, {pattern, handler}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - mux = this; - if (handler === $throwNilPointerError) { - $panic(new $String("http: nil handler")); - } - $r = mux.Handle(pattern, new HandlerFunc((handler))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: ServeMux.ptr.prototype.HandleFunc, $c: true, $r, handler, mux, pattern, $s};return $f; - }; - ServeMux.prototype.HandleFunc = function(pattern, handler) { return this.$val.HandleFunc(pattern, handler); }; - Server.ptr.prototype.getDoneChan = function() { - var {$24r, s, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = this; - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(s.mu, "Unlock"), []]); - $24r = s.getDoneChanLocked(); - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.getDoneChan, $c: true, $r, $24r, s, $s, $deferred};return $f; } } - }; - Server.prototype.getDoneChan = function() { return this.$val.getDoneChan(); }; - Server.ptr.prototype.getDoneChanLocked = function() { - var s; - s = this; - if (s.doneChan === $chanNil) { - s.doneChan = new $Chan(structType, 0); - } - return s.doneChan; - }; - Server.prototype.getDoneChanLocked = function() { return this.$val.getDoneChanLocked(); }; - Server.ptr.prototype.closeDoneChanLocked = function() { - var _selection, ch, s; - s = this; - ch = s.getDoneChanLocked(); - _selection = $select([[ch], []]); - if (_selection[0] === 0) { - } else if (_selection[0] === 1) { - $close(ch); - } - }; - Server.prototype.closeDoneChanLocked = function() { return this.$val.closeDoneChanLocked(); }; - Server.ptr.prototype.Close = function() { - var {$24r, _entry, _i, _keys, _r$1, _r$2, _ref, c, err, srv, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - srv = this; - (srv.$ptr_inShutdown || (srv.$ptr_inShutdown = new ptrType$51(function() { return this.$target.inShutdown; }, function($v) { this.$target.inShutdown = $v; }, srv))).setTrue(); - $r = srv.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(srv.mu, "Unlock"), []]); - srv.closeDoneChanLocked(); - _r$1 = srv.closeListenersLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - _ref = srv.activeConn; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 3: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 4; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 3; continue; - } - c = _entry.k; - _r$2 = c.rwc.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - delete srv.activeConn[ptrType$53.keyFor(c)]; - _i++; - $s = 3; continue; - case 4: - $24r = err; - $s = 6; case 6: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.Close, $c: true, $r, $24r, _entry, _i, _keys, _r$1, _r$2, _ref, c, err, srv, $s, $deferred};return $f; } } - }; - Server.prototype.Close = function() { return this.$val.Close(); }; - Server.ptr.prototype.Shutdown = function(ctx) { - var {$24r, $24r$1, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _v, ctx, f, lnerr, nextPollInterval, pollIntervalBase, srv, timer, $s, $deferred, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - pollIntervalBase = [pollIntervalBase]; - srv = this; - (srv.$ptr_inShutdown || (srv.$ptr_inShutdown = new ptrType$51(function() { return this.$target.inShutdown; }, function($v) { this.$target.inShutdown = $v; }, srv))).setTrue(); - $r = srv.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = srv.closeListenersLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - lnerr = _r$1; - srv.closeDoneChanLocked(); - _ref = srv.onShutdown; - _i = 0; - /* while (true) { */ case 3: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 4; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $go(f, []); - _i++; - $s = 3; continue; - case 4: - $r = srv.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - pollIntervalBase[0] = new time.Duration(0, 1000000); - nextPollInterval = (function(pollIntervalBase) { return function $b() { - var {_r$2, interval, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = rand.Intn((((x$6 = $div64(pollIntervalBase[0], new time.Duration(0, 10), false), x$6.$low + ((x$6.$high >> 31) * 4294967296)) >> 0))); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - interval = (x$5 = (new time.Duration(0, _r$2)), new time.Duration(pollIntervalBase[0].$high + x$5.$high, pollIntervalBase[0].$low + x$5.$low)); - pollIntervalBase[0] = $mul64(pollIntervalBase[0], (new time.Duration(0, 2))); - if ((pollIntervalBase[0].$high > 0 || (pollIntervalBase[0].$high === 0 && pollIntervalBase[0].$low > 500000000))) { - pollIntervalBase[0] = new time.Duration(0, 500000000); - } - $s = -1; return interval; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, interval, x$5, x$6, $s};return $f; - }; })(pollIntervalBase); - _r$2 = nextPollInterval(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = time.NewTimer(_r$2); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - timer = _r$3; - $deferred.push([$methodVal(timer, "Stop"), []]); - /* while (true) { */ case 8: - _r$4 = srv.closeIdleConns(); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - if (!(_r$4)) { _v = false; $s = 12; continue s; } - _r$5 = srv.numListeners(); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v = _r$5 === 0; case 12: - /* */ if (_v) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_v) { */ case 10: - $24r = lnerr; - $s = 15; case 15: return $24r; - /* } */ case 11: - _r$6 = ctx.Done(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$7 = $select([[_r$6], [timer.C]]); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _selection = _r$7; - /* */ if (_selection[0] === 0) { $s = 18; continue; } - /* */ if (_selection[0] === 1) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_selection[0] === 0) { */ case 18: - _r$8 = ctx.Err(); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$1 = _r$8; - $s = 22; case 22: return $24r$1; - /* } else if (_selection[0] === 1) { */ case 19: - _r$9 = nextPollInterval(); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$10 = timer.Reset(_r$9); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - /* } */ case 20: - $s = 8; continue; - case 9: - $s = -1; return $ifaceNil; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.Shutdown, $c: true, $r, $24r, $24r$1, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _v, ctx, f, lnerr, nextPollInterval, pollIntervalBase, srv, timer, $s, $deferred};return $f; } } - }; - Server.prototype.Shutdown = function(ctx) { return this.$val.Shutdown(ctx); }; - Server.ptr.prototype.RegisterOnShutdown = function(f) { - var {f, srv, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - $r = srv.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - srv.onShutdown = $append(srv.onShutdown, f); - $r = srv.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.RegisterOnShutdown, $c: true, $r, f, srv, $s};return $f; - }; - Server.prototype.RegisterOnShutdown = function(f) { return this.$val.RegisterOnShutdown(f); }; - Server.ptr.prototype.numListeners = function() { - var {$24r, s, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = this; - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(s.mu, "Unlock"), []]); - $24r = $keys(s.listeners).length; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.numListeners, $c: true, $r, $24r, s, $s, $deferred};return $f; } } - }; - Server.prototype.numListeners = function() { return this.$val.numListeners(); }; - Server.ptr.prototype.closeIdleConns = function() { - var {$24r, _entry, _i, _keys, _r$1, _r$2, _r$3, _ref, _tuple, _v, c, quiescent, s, st, unixSec, x$5, x$6, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = this; - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(s.mu, "Unlock"), []]); - quiescent = true; - _ref = s.activeConn; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - c = _entry.k; - _tuple = c.getState(); - st = _tuple[0]; - unixSec = _tuple[1]; - if (!(st === 0)) { _v = false; $s = 6; continue s; } - _r$1 = time.Now(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Unix(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = (x$5 = (x$6 = _r$2, new $Int64(x$6.$high - 0, x$6.$low - 5)), (unixSec.$high < x$5.$high || (unixSec.$high === x$5.$high && unixSec.$low < x$5.$low))); case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - st = 2; - /* } */ case 5: - if (!((st === 2)) || (unixSec.$high === 0 && unixSec.$low === 0)) { - quiescent = false; - _i++; - /* continue; */ $s = 2; continue; - } - _r$3 = c.rwc.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - delete s.activeConn[ptrType$53.keyFor(c)]; - _i++; - $s = 2; continue; - case 3: - $24r = quiescent; - $s = 10; case 10: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.closeIdleConns, $c: true, $r, $24r, _entry, _i, _keys, _r$1, _r$2, _r$3, _ref, _tuple, _v, c, quiescent, s, st, unixSec, x$5, x$6, $s, $deferred};return $f; } } - }; - Server.prototype.closeIdleConns = function() { return this.$val.closeIdleConns(); }; - Server.ptr.prototype.closeListenersLocked = function() { - var {_entry, _i, _keys, _r$1, _ref, cerr, err, ln, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - err = $ifaceNil; - _ref = s.listeners; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - ln = _entry.k; - _r$1 = (ln.$get()).Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cerr = _r$1; - if (!($interfaceIsEqual(cerr, $ifaceNil)) && $interfaceIsEqual(err, $ifaceNil)) { - err = cerr; - } - _i++; - $s = 1; continue; - case 2: - $s = -1; return err; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.closeListenersLocked, $c: true, $r, _entry, _i, _keys, _r$1, _ref, cerr, err, ln, s, $s};return $f; - }; - Server.prototype.closeListenersLocked = function() { return this.$val.closeListenersLocked(); }; - ConnState.prototype.String = function() { - var _entry, c; - c = this.$val; - return (_entry = stateName[ConnState.keyFor(c)], _entry !== undefined ? _entry.v : ""); - }; - $ptrType(ConnState).prototype.String = function() { return new ConnState(this.$get()).String(); }; - serverHandler.ptr.prototype.ServeHTTP = function(rw, req) { - var {_r$1, _r$2, allowQuerySemicolonsInUse, handler, req, rw, sh, x$5, $s, $deferred, $r, $c} = $restore(this, {rw, req}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - allowQuerySemicolonsInUse = [allowQuerySemicolonsInUse]; - sh = [sh]; - sh[0] = this; - handler = sh[0].srv.Handler; - if ($interfaceIsEqual(handler, $ifaceNil)) { - handler = $pkg.DefaultServeMux; - } - if (req.RequestURI === "*" && req.Method === "OPTIONS") { - handler = (x$5 = new globalOptionsHandler.ptr(), new x$5.constructor.elem(x$5)); - } - /* */ if (!(req.URL === ptrType$17.nil) && strings.Contains(req.URL.RawQuery, ";")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(req.URL === ptrType$17.nil) && strings.Contains(req.URL.RawQuery, ";")) { */ case 1: - allowQuerySemicolonsInUse[0] = 0; - _r$1 = context.WithValue(req.Context(), silenceSemWarnContextKey, new funcType((function(allowQuerySemicolonsInUse, sh) { return function() { - atomic.StoreInt32((allowQuerySemicolonsInUse.$ptr || (allowQuerySemicolonsInUse.$ptr = new ptrType$45(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, allowQuerySemicolonsInUse))), 1); - }; })(allowQuerySemicolonsInUse, sh))); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = req.WithContext(_r$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - req = _r$2; - $deferred.push([(function(allowQuerySemicolonsInUse, sh) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (atomic.LoadInt32((allowQuerySemicolonsInUse.$ptr || (allowQuerySemicolonsInUse.$ptr = new ptrType$45(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, allowQuerySemicolonsInUse)))) === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (atomic.LoadInt32((allowQuerySemicolonsInUse.$ptr || (allowQuerySemicolonsInUse.$ptr = new ptrType$45(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, allowQuerySemicolonsInUse)))) === 0) { */ case 1: - $r = sh[0].srv.logf("http: URL query contains semicolon, which is no longer a supported separator; parts of the query may be stripped when parsed; see golang.org/issue/25192", new sliceType([])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(allowQuerySemicolonsInUse, sh), []]); - /* } */ case 2: - $r = handler.ServeHTTP(rw, req); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: serverHandler.ptr.prototype.ServeHTTP, $c: true, $r, _r$1, _r$2, allowQuerySemicolonsInUse, handler, req, rw, sh, x$5, $s, $deferred};return $f; } } - }; - serverHandler.prototype.ServeHTTP = function(rw, req) { return this.$val.ServeHTTP(rw, req); }; - Server.ptr.prototype.ListenAndServe = function() { - var {$24r, _r$1, _r$2, _tuple, addr, err, ln, srv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - if (srv.shuttingDown()) { - $s = -1; return $pkg.ErrServerClosed; - } - addr = srv.Addr; - if (addr === "") { - addr = ":http"; - } - _r$1 = net.Listen("tcp", addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ln = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = srv.Serve(ln); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.ListenAndServe, $c: true, $r, $24r, _r$1, _r$2, _tuple, addr, err, ln, srv, $s};return $f; - }; - Server.prototype.ListenAndServe = function() { return this.$val.ListenAndServe(); }; - Server.ptr.prototype.shouldConfigureHTTP2ForServe = function() { - var srv; - srv = this; - if (srv.TLSConfig === ptrType$4.nil) { - return true; - } - return strSliceContains(srv.TLSConfig.NextProtos, "h2"); - }; - Server.prototype.shouldConfigureHTTP2ForServe = function() { return this.$val.shouldConfigureHTTP2ForServe(); }; - Server.ptr.prototype.Serve = function(l) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _v, baseCtx, c, cc, connCtx, ctx, err, err$1, fn, l, max, ne, ok, origListener, rw, srv, tempDelay, $s, $deferred, $r, $c} = $restore(this, {l}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - l = [l]; - srv = this; - fn = testHookServerServe; - /* */ if (!(fn === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(fn === $throwNilPointerError)) { */ case 1: - $r = fn(srv, l[0]); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - origListener = l[0]; - l[0] = new onceCloseListener.ptr(l[0], new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil); - $deferred.push([$methodVal(l[0], "Close"), []]); - _r$1 = srv.setupHTTP2_Serve(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - $24r = err; - $s = 7; case 7: return $24r; - /* } */ case 6: - _r$2 = srv.trackListener((l.$ptr || (l.$ptr = new ptrType$59(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, l))), true); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!_r$2) { */ case 8: - $24r$1 = $pkg.ErrServerClosed; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - $deferred.push([$methodVal(srv, "trackListener"), [(l.$ptr || (l.$ptr = new ptrType$59(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, l))), false]]); - baseCtx = context.Background(); - /* */ if (!(srv.BaseContext === $throwNilPointerError)) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!(srv.BaseContext === $throwNilPointerError)) { */ case 12: - _r$3 = srv.BaseContext(origListener); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - baseCtx = _r$3; - if ($interfaceIsEqual(baseCtx, $ifaceNil)) { - $panic(new $String("BaseContext returned a nil context")); - } - /* } */ case 13: - tempDelay = new time.Duration(0, 0); - _r$4 = context.WithValue(baseCtx, $pkg.ServerContextKey, srv); /* */ $s = 15; case 15: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ctx = _r$4; - /* while (true) { */ case 16: - _r$5 = l[0].Accept(); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple = _r$5; - rw = _tuple[0]; - err$1 = _tuple[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 19: - _r$6 = srv.getDoneChan(); /* */ $s = 21; case 21: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _selection = $select([[_r$6], []]); - /* */ if (_selection[0] === 0) { $s = 22; continue; } - /* */ if (_selection[0] === 1) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (_selection[0] === 0) { */ case 22: - $24r$2 = $pkg.ErrServerClosed; - $s = 25; case 25: return $24r$2; - /* } else if (_selection[0] === 1) { */ case 23: - /* } */ case 24: - _tuple$1 = $assertType(err$1, net.Error, true); - ne = _tuple$1[0]; - ok = _tuple$1[1]; - if (!(ok)) { _v = false; $s = 28; continue s; } - _r$7 = ne.Temporary(); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v = _r$7; case 28: - /* */ if (_v) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_v) { */ case 26: - if ((tempDelay.$high === 0 && tempDelay.$low === 0)) { - tempDelay = new time.Duration(0, 5000000); - } else { - tempDelay = $mul64(tempDelay, (new time.Duration(0, 2))); - } - max = new time.Duration(0, 1000000000); - if ((tempDelay.$high > max.$high || (tempDelay.$high === max.$high && tempDelay.$low > max.$low))) { - tempDelay = max; - } - $r = srv.logf("http: Accept error: %v; retrying in %v", new sliceType([err$1, tempDelay])); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.Sleep(tempDelay); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* continue; */ $s = 16; continue; - /* } */ case 27: - $24r$3 = err$1; - $s = 32; case 32: return $24r$3; - /* } */ case 20: - connCtx = ctx; - cc = srv.ConnContext; - /* */ if (!(cc === $throwNilPointerError)) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (!(cc === $throwNilPointerError)) { */ case 33: - _r$8 = cc(connCtx, rw); /* */ $s = 35; case 35: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - connCtx = _r$8; - if ($interfaceIsEqual(connCtx, $ifaceNil)) { - $panic(new $String("ConnContext returned nil")); - } - /* } */ case 34: - tempDelay = new time.Duration(0, 0); - _r$9 = srv.newConn(rw); /* */ $s = 36; case 36: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - c = _r$9; - $r = c.setState(c.rwc, 0, true); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $go($methodVal(c, "serve"), [connCtx]); - $s = 16; continue; - case 17: - $s = -1; return $ifaceNil; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.Serve, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _v, baseCtx, c, cc, connCtx, ctx, err, err$1, fn, l, max, ne, ok, origListener, rw, srv, tempDelay, $s, $deferred};return $f; } } - }; - Server.prototype.Serve = function(l) { return this.$val.Serve(l); }; - Server.ptr.prototype.ServeTLS = function(l, certFile, keyFile) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _tuple, certFile, config, configHasCert, err, err$1, keyFile, l, srv, tlsListener, x$5, $s, $r, $c} = $restore(this, {l, certFile, keyFile}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - _r$1 = srv.setupHTTP2_ServeTLS(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$2 = cloneTLSConfig(srv.TLSConfig); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - config = _r$2; - if (!strSliceContains(config.NextProtos, "http/1.1")) { - config.NextProtos = $append(config.NextProtos, "http/1.1"); - } - configHasCert = config.Certificates.$length > 0 || !(config.GetCertificate === $throwNilPointerError); - /* */ if (!configHasCert || !(certFile === "") || !(keyFile === "")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!configHasCert || !(certFile === "") || !(keyFile === "")) { */ case 3: - err$1 = $ifaceNil; - config.Certificates = $makeSlice(sliceType$13, 1); - _r$3 = tls.LoadX509KeyPair(certFile, keyFile); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - tls.Certificate.copy((x$5 = config.Certificates, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), _tuple[0]); - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* } */ case 4: - tlsListener = tls.NewListener(l, config); - _r$4 = srv.Serve(tlsListener); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.ServeTLS, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _tuple, certFile, config, configHasCert, err, err$1, keyFile, l, srv, tlsListener, x$5, $s};return $f; - }; - Server.prototype.ServeTLS = function(l, certFile, keyFile) { return this.$val.ServeTLS(l, certFile, keyFile); }; - Server.ptr.prototype.trackListener = function(ln, add) { - var {$24r, $24r$1, _key, add, ln, s, $s, $deferred, $r, $c} = $restore(this, {ln, add}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = this; - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(s.mu, "Unlock"), []]); - if (s.listeners === false) { - s.listeners = {}; - } - /* */ if (add) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (add) { */ case 2: - /* */ if (s.shuttingDown()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (s.shuttingDown()) { */ case 5: - $24r = false; - $s = 7; case 7: return $24r; - /* } */ case 6: - _key = ln; (s.listeners || $throwRuntimeError("assignment to entry in nil map"))[ptrType$59.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - $s = 4; continue; - /* } else { */ case 3: - delete s.listeners[ptrType$59.keyFor(ln)]; - /* } */ case 4: - $24r$1 = true; - $s = 8; case 8: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.trackListener, $c: true, $r, $24r, $24r$1, _key, add, ln, s, $s, $deferred};return $f; } } - }; - Server.prototype.trackListener = function(ln, add) { return this.$val.trackListener(ln, add); }; - Server.ptr.prototype.trackConn = function(c, add) { - var {_key, add, c, s, $s, $deferred, $r, $c} = $restore(this, {c, add}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = this; - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(s.mu, "Unlock"), []]); - if (s.activeConn === false) { - s.activeConn = {}; - } - if (add) { - _key = c; (s.activeConn || $throwRuntimeError("assignment to entry in nil map"))[ptrType$53.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - } else { - delete s.activeConn[ptrType$53.keyFor(c)]; - } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.trackConn, $c: true, $r, _key, add, c, s, $s, $deferred};return $f; } } - }; - Server.prototype.trackConn = function(c, add) { return this.$val.trackConn(c, add); }; - Server.ptr.prototype.idleTimeout = function() { - var s, x$5; - s = this; - if (!((x$5 = s.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { - return s.IdleTimeout; - } - return s.ReadTimeout; - }; - Server.prototype.idleTimeout = function() { return this.$val.idleTimeout(); }; - Server.ptr.prototype.readHeaderTimeout = function() { - var s, x$5; - s = this; - if (!((x$5 = s.ReadHeaderTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { - return s.ReadHeaderTimeout; - } - return s.ReadTimeout; - }; - Server.prototype.readHeaderTimeout = function() { return this.$val.readHeaderTimeout(); }; - Server.ptr.prototype.doKeepAlives = function() { - var s; - s = this; - return (atomic.LoadInt32((s.$ptr_disableKeepAlives || (s.$ptr_disableKeepAlives = new ptrType$45(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, s)))) === 0) && !s.shuttingDown(); - }; - Server.prototype.doKeepAlives = function() { return this.$val.doKeepAlives(); }; - Server.ptr.prototype.shuttingDown = function() { - var s; - s = this; - return (s.$ptr_inShutdown || (s.$ptr_inShutdown = new ptrType$51(function() { return this.$target.inShutdown; }, function($v) { this.$target.inShutdown = $v; }, s))).isSet(); - }; - Server.prototype.shuttingDown = function() { return this.$val.shuttingDown(); }; - Server.ptr.prototype.SetKeepAlivesEnabled = function(v) { - var {_r$1, srv, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - if (v) { - atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$45(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, srv))), 0); - $s = -1; return; - } - atomic.StoreInt32((srv.$ptr_disableKeepAlives || (srv.$ptr_disableKeepAlives = new ptrType$45(function() { return this.$target.disableKeepAlives; }, function($v) { this.$target.disableKeepAlives = $v; }, srv))), 1); - _r$1 = srv.closeIdleConns(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.SetKeepAlivesEnabled, $c: true, $r, _r$1, srv, v, $s};return $f; - }; - Server.prototype.SetKeepAlivesEnabled = function(v) { return this.$val.SetKeepAlivesEnabled(v); }; - Server.ptr.prototype.logf = function(format, args) { - var {args, format, s, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - /* */ if (!(s.ErrorLog === ptrType$58.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(s.ErrorLog === ptrType$58.nil)) { */ case 1: - $r = s.ErrorLog.Printf(format, args); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = log.Printf(format, args); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.logf, $c: true, $r, args, format, s, $s};return $f; - }; - Server.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; - Server.ptr.prototype.ListenAndServeTLS = function(certFile, keyFile) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _tuple, addr, certFile, err, keyFile, ln, srv, $s, $deferred, $r, $c} = $restore(this, {certFile, keyFile}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - srv = this; - /* */ if (srv.shuttingDown()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (srv.shuttingDown()) { */ case 1: - $24r = $pkg.ErrServerClosed; - $s = 3; case 3: return $24r; - /* } */ case 2: - addr = srv.Addr; - if (addr === "") { - addr = ":https"; - } - _r$1 = net.Listen("tcp", addr); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ln = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - $24r$1 = err; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - $deferred.push([$methodVal(ln, "Close"), []]); - _r$2 = srv.ServeTLS(ln, certFile, keyFile); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = _r$2; - $s = 9; case 9: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: Server.ptr.prototype.ListenAndServeTLS, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _tuple, addr, certFile, err, keyFile, ln, srv, $s, $deferred};return $f; } } - }; - Server.prototype.ListenAndServeTLS = function(certFile, keyFile) { return this.$val.ListenAndServeTLS(certFile, keyFile); }; - Server.ptr.prototype.setupHTTP2_ServeTLS = function() { - var {srv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - $r = srv.nextProtoOnce.Do($methodVal(srv, "onceSetNextProtoDefaults")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return srv.nextProtoErr; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.setupHTTP2_ServeTLS, $c: true, $r, srv, $s};return $f; - }; - Server.prototype.setupHTTP2_ServeTLS = function() { return this.$val.setupHTTP2_ServeTLS(); }; - Server.ptr.prototype.setupHTTP2_Serve = function() { - var {srv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - $r = srv.nextProtoOnce.Do($methodVal(srv, "onceSetNextProtoDefaults_Serve")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return srv.nextProtoErr; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.setupHTTP2_Serve, $c: true, $r, srv, $s};return $f; - }; - Server.prototype.setupHTTP2_Serve = function() { return this.$val.setupHTTP2_Serve(); }; - Server.ptr.prototype.onceSetNextProtoDefaults_Serve = function() { - var {srv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - /* */ if (srv.shouldConfigureHTTP2ForServe()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (srv.shouldConfigureHTTP2ForServe()) { */ case 1: - $r = srv.onceSetNextProtoDefaults(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.onceSetNextProtoDefaults_Serve, $c: true, $r, srv, $s};return $f; - }; - Server.prototype.onceSetNextProtoDefaults_Serve = function() { return this.$val.onceSetNextProtoDefaults_Serve(); }; - Server.ptr.prototype.onceSetNextProtoDefaults = function() { - var {_r$1, _r$2, _v, conf, srv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - srv = this; - if (omitBundledHTTP2) { _v = true; $s = 3; continue s; } - _r$1 = godebug.Get("http2server"); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === "0"; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return; - /* } */ case 2: - /* */ if (srv.TLSNextProto === false) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (srv.TLSNextProto === false) { */ case 5: - conf = new http2Server.ptr(0, 0, 0, false, new time.Duration(0, 0), 0, 0, (function() { - return http2NewPriorityWriteScheduler(ptrType$61.nil); - }), $throwNilPointerError, ptrType$60.nil); - _r$2 = http2ConfigureServer(srv, conf); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - srv.nextProtoErr = _r$2; - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: Server.ptr.prototype.onceSetNextProtoDefaults, $c: true, $r, _r$1, _r$2, _v, conf, srv, $s};return $f; - }; - Server.prototype.onceSetNextProtoDefaults = function() { return this.$val.onceSetNextProtoDefaults(); }; - onceCloseListener.ptr.prototype.Close = function() { - var {oc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - oc = this; - $r = oc.once.Do($methodVal(oc, "close")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return oc.closeErr; - /* */ } return; } var $f = {$blk: onceCloseListener.ptr.prototype.Close, $c: true, $r, oc, $s};return $f; - }; - onceCloseListener.prototype.Close = function() { return this.$val.Close(); }; - onceCloseListener.ptr.prototype.close = function() { - var {_r$1, oc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - oc = this; - _r$1 = oc.Listener.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - oc.closeErr = _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: onceCloseListener.ptr.prototype.close, $c: true, $r, _r$1, oc, $s};return $f; - }; - onceCloseListener.prototype.close = function() { return this.$val.close(); }; - globalOptionsHandler.ptr.prototype.ServeHTTP = function(w, r) { - var {_r$1, _r$2, mb, r, w, x$5, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = w.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = new Header(_r$1).Set("Content-Length", "0"); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((x$5 = r.ContentLength, (x$5.$high === 0 && x$5.$low === 0)))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((x$5 = r.ContentLength, (x$5.$high === 0 && x$5.$low === 0)))) { */ case 3: - mb = MaxBytesReader(w, r.Body, new $Int64(0, 4096)); - _r$2 = io.Copy(io.Discard, mb); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: globalOptionsHandler.ptr.prototype.ServeHTTP, $c: true, $r, _r$1, _r$2, mb, r, w, x$5, $s};return $f; - }; - globalOptionsHandler.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; - initALPNRequest.ptr.prototype.BaseContext = function() { - var h; - h = this; - return h.ctx; - }; - initALPNRequest.prototype.BaseContext = function() { return this.$val.BaseContext(); }; - initALPNRequest.ptr.prototype.ServeHTTP = function(rw, req) { - var {_r$1, _r$2, _r$3, h, req, rw, $s, $r, $c} = $restore(this, {rw, req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - /* */ if (req.TLS === ptrType$28.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (req.TLS === ptrType$28.nil) { */ case 1: - req.TLS = new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$5.nil, sliceType$3.nil, sliceType$3.nil, $throwNilPointerError); - _r$1 = h.c.ConnectionState(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - tls.ConnectionState.copy(req.TLS, _r$1); - /* } */ case 2: - if ($interfaceIsEqual(req.Body, $ifaceNil)) { - req.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); - } - /* */ if (req.RemoteAddr === "") { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (req.RemoteAddr === "") { */ case 4: - _r$2 = h.c.RemoteAddr(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.String(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - req.RemoteAddr = _r$3; - /* } */ case 5: - $r = $clone(h.h, serverHandler).ServeHTTP(rw, req); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: initALPNRequest.ptr.prototype.ServeHTTP, $c: true, $r, _r$1, _r$2, _r$3, h, req, rw, $s};return $f; - }; - initALPNRequest.prototype.ServeHTTP = function(rw, req) { return this.$val.ServeHTTP(rw, req); }; - newLoggingConn = function(baseName, c) { - var {$24r, _entry, _entry$1, _key, _r$1, baseName, c, $s, $deferred, $r, $c} = $restore(this, {baseName, c}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = uniqNameMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(uniqNameMu, "Unlock"), []]); - _key = baseName; (uniqNameNext || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: (_entry = uniqNameNext[$String.keyFor(baseName)], _entry !== undefined ? _entry.v : 0) + (1) >> 0 }; - _r$1 = fmt.Sprintf("%s-%d", new sliceType([new $String(baseName), new $Int((_entry$1 = uniqNameNext[$String.keyFor(baseName)], _entry$1 !== undefined ? _entry$1.v : 0))])); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = new loggingConn.ptr(_r$1, c); - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: newLoggingConn, $c: true, $r, $24r, _entry, _entry$1, _key, _r$1, baseName, c, $s, $deferred};return $f; } } - }; - loggingConn.ptr.prototype.Write = function(p) { - var {_r$1, _tuple, c, err, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - c = this; - $r = log.Printf("%s.Write(%d) = ....", new sliceType([new $String(c.name), new $Int(p.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = c.Conn.Write(p); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $r = log.Printf("%s.Write(%d) = %d, %v", new sliceType([new $String(c.name), new $Int(p.$length), new $Int(n), err])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: loggingConn.ptr.prototype.Write, $c: true, $r, _r$1, _tuple, c, err, n, p, $s};return $f; - }; - loggingConn.prototype.Write = function(p) { return this.$val.Write(p); }; - loggingConn.ptr.prototype.Read = function(p) { - var {_r$1, _tuple, c, err, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - c = this; - $r = log.Printf("%s.Read(%d) = ....", new sliceType([new $String(c.name), new $Int(p.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = c.Conn.Read(p); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $r = log.Printf("%s.Read(%d) = %d, %v", new sliceType([new $String(c.name), new $Int(p.$length), new $Int(n), err])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: loggingConn.ptr.prototype.Read, $c: true, $r, _r$1, _tuple, c, err, n, p, $s};return $f; - }; - loggingConn.prototype.Read = function(p) { return this.$val.Read(p); }; - loggingConn.ptr.prototype.Close = function() { - var {_r$1, c, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - err = $ifaceNil; - c = this; - $r = log.Printf("%s.Close() = ...", new sliceType([new $String(c.name)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = c.Conn.Close(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - $r = log.Printf("%s.Close() = %v", new sliceType([new $String(c.name), err])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err; - /* */ } return; } var $f = {$blk: loggingConn.ptr.prototype.Close, $c: true, $r, _r$1, c, err, $s};return $f; - }; - loggingConn.prototype.Close = function() { return this.$val.Close(); }; - checkConnErrorWriter.ptr.prototype.Write = function(p) { - var {_r$1, _tuple, err, n, p, w, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.c.rwc.Write(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && $interfaceIsEqual(w.c.werr, $ifaceNil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) && $interfaceIsEqual(w.c.werr, $ifaceNil)) { */ case 2: - w.c.werr = err; - $r = w.c.cancelCtx(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: checkConnErrorWriter.ptr.prototype.Write, $c: true, $r, _r$1, _tuple, err, n, p, w, $s};return $f; - }; - checkConnErrorWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - numLeadingCRorLF = function(v) { - var _i, _ref, b, n, v; - n = 0; - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if ((b === 13) || (b === 10)) { - n = n + (1) >> 0; - _i++; - continue; - } - break; - } - return n; - }; - strSliceContains = function(ss, s) { - var _i, _ref, s, ss, v; - _ref = ss; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v === s) { - return true; - } - _i++; - } - return false; - }; - tlsRecordHeaderLooksLikeHTTP = function(hdr) { - var _1, hdr; - _1 = ($bytesToString(new sliceType$3(hdr))); - if (_1 === ("GET /") || _1 === ("HEAD ") || _1 === ("POST ") || _1 === ("PUT /") || _1 === ("OPTIO")) { - return true; - } - return false; - }; - Transport.ptr.prototype.RoundTrip = function(req) { - var {$24r, $24r$1, _entry, _i, _i$1, _keys, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _selection, _tmp, _tmp$1, _tuple, ac, body$1, buf, err, err$1, errCh, failure, fetchPromise, h, h$1, h$2, headers, key, opt, req, resp, respCh, success, t, value, values, x$5, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - errCh = [errCh]; - failure = [failure]; - req = [req]; - respCh = [respCh]; - success = [success]; - t = this; - /* */ if (!(t.Dial === $throwNilPointerError) || !(t.DialContext === $throwNilPointerError) || !(t.DialTLS === $throwNilPointerError) || !(t.DialTLSContext === $throwNilPointerError) || jsFetchMissing) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(t.Dial === $throwNilPointerError) || !(t.DialContext === $throwNilPointerError) || !(t.DialTLS === $throwNilPointerError) || !(t.DialTLSContext === $throwNilPointerError) || jsFetchMissing) { */ case 1: - _r$1 = t.roundTrip(req[0]); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - ac = $clone($clone(js.Global(), js.Value).Get("AbortController"), js.Value); - /* */ if (!$clone(ac, js.Value).IsUndefined()) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!$clone(ac, js.Value).IsUndefined()) { */ case 5: - _r$2 = $clone(ac, js.Value).New(sliceType.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - js.Value.copy(ac, _r$2); - /* } */ case 6: - _r$3 = $clone($clone(js.Global(), js.Value).Get("Object"), js.Value).New(sliceType.nil); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - opt = $clone(_r$3, js.Value); - $clone(opt, js.Value).Set("method", new $String(req[0].Method)); - $clone(opt, js.Value).Set("credentials", new $String("same-origin")); - _r$4 = new Header(req[0].Header).Get("js.fetch:credentials"); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - h = _r$4; - /* */ if (!(h === "")) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(h === "")) { */ case 10: - $clone(opt, js.Value).Set("credentials", new $String(h)); - $r = new Header(req[0].Header).Del("js.fetch:credentials"); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - _r$5 = new Header(req[0].Header).Get("js.fetch:mode"); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - h$1 = _r$5; - /* */ if (!(h$1 === "")) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!(h$1 === "")) { */ case 14: - $clone(opt, js.Value).Set("mode", new $String(h$1)); - $r = new Header(req[0].Header).Del("js.fetch:mode"); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 15: - _r$6 = new Header(req[0].Header).Get("js.fetch:redirect"); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - h$2 = _r$6; - /* */ if (!(h$2 === "")) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!(h$2 === "")) { */ case 18: - $clone(opt, js.Value).Set("redirect", new $String(h$2)); - $r = new Header(req[0].Header).Del("js.fetch:redirect"); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 19: - if (!$clone(ac, js.Value).IsUndefined()) { - $clone(opt, js.Value).Set("signal", (x$5 = $clone(ac, js.Value).Get("signal"), new x$5.constructor.elem(x$5))); - } - _r$7 = $clone($clone(js.Global(), js.Value).Get("Headers"), js.Value).New(sliceType.nil); /* */ $s = 21; case 21: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - headers = $clone(_r$7, js.Value); - _ref = req[0].Header; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 22: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 23; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 22; continue; - } - key = _entry.k; - values = _entry.v; - _ref$1 = values; - _i$1 = 0; - /* while (true) { */ case 24: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 25; continue; } - value = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$8 = $clone(headers, js.Value).Call("append", new sliceType([new $String(key), new $String(value)])); /* */ $s = 26; case 26: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - _i$1++; - $s = 24; continue; - case 25: - _i++; - $s = 22; continue; - case 23: - $clone(opt, js.Value).Set("headers", new headers.constructor.elem(headers)); - /* */ if (!($interfaceIsEqual(req[0].Body, $ifaceNil))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!($interfaceIsEqual(req[0].Body, $ifaceNil))) { */ case 27: - _r$9 = io.ReadAll(req[0].Body); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tuple = _r$9; - body$1 = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 30: - _r$10 = req[0].Body.Close(); /* */ $s = 32; case 32: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return [ptrType$18.nil, err]; - /* } */ case 31: - _r$11 = req[0].Body.Close(); /* */ $s = 33; case 33: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _r$11; - /* */ if (!((body$1.$length === 0))) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!((body$1.$length === 0))) { */ case 34: - _r$12 = $clone(uint8Array, js.Value).New(new sliceType([new $Int(body$1.$length)])); /* */ $s = 36; case 36: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - buf = $clone(_r$12, js.Value); - js.CopyBytesToJS($clone(buf, js.Value), body$1); - $clone(opt, js.Value).Set("body", new buf.constructor.elem(buf)); - /* } */ case 35: - /* } */ case 28: - _r$13 = $clone(js.Global(), js.Value).Call("fetch", new sliceType([new $String(req[0].URL.String()), new opt.constructor.elem(opt)])); /* */ $s = 37; case 37: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - fetchPromise = $clone(_r$13, js.Value); - respCh[0] = new $Chan(ptrType$18, 1); - errCh[0] = new $Chan($error, 1); - _tmp = new js.Func.ptr(new js.Value.ptr(null, false, arrayType.zero())); - _tmp$1 = new js.Func.ptr(new js.Value.ptr(null, false, arrayType.zero())); - success[0] = $clone(_tmp, js.Func); - failure[0] = $clone(_tmp$1, js.Func); - js.Func.copy(success[0], js.FuncOf((function(errCh, failure, req, respCh, success) { return function $b(this$1, args) { - var {_entry$1, _key, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _tmp$2, _tmp$3, _tuple$1, args, b, body$2, ck, cl, clHeader, code, contentLength, err$1, header, headersIt, key$1, n, pair, result, this$1, value$1, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $clone(success[0], js.Func).Release(); - $clone(failure[0], js.Func).Release(); - result = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value); - header = $makeMap($String.keyFor, []); - _r$14 = $clone($clone(result, js.Value).Get("headers"), js.Value).Call("entries", new sliceType([])); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - headersIt = $clone(_r$14, js.Value); - /* while (true) { */ case 2: - _r$15 = $clone(headersIt, js.Value).Call("next", new sliceType([])); /* */ $s = 4; case 4: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - n = $clone(_r$15, js.Value); - if ($clone($clone(n, js.Value).Get("done"), js.Value).Bool()) { - /* break; */ $s = 3; continue; - } - pair = $clone($clone(n, js.Value).Get("value"), js.Value); - _tmp$2 = $clone($clone(pair, js.Value).Index(0), js.Value).String(); - _tmp$3 = $clone($clone(pair, js.Value).Index(1), js.Value).String(); - key$1 = _tmp$2; - value$1 = _tmp$3; - _r$16 = CanonicalHeaderKey(key$1); /* */ $s = 5; case 5: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - ck = _r$16; - _key = ck; (header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry$1 = header[$String.keyFor(ck)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil), value$1) }; - $s = 2; continue; - case 3: - contentLength = new $Int64(0, 0); - _r$17 = new Header(header).Get("Content-Length"); /* */ $s = 6; case 6: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - clHeader = _r$17; - /* */ if (!(clHeader === "")) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(clHeader === "")) { */ case 8: - _tuple$1 = strconv.ParseInt(clHeader, 10, 64); - cl = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 11: - _r$18 = fmt.Errorf("net/http: ill-formed Content-Length header: %v", new sliceType([err$1])); /* */ $s = 13; case 13: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $r = $send(errCh[0], _r$18); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 12: - /* */ if ((cl.$high < 0 || (cl.$high === 0 && cl.$low < 0))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if ((cl.$high < 0 || (cl.$high === 0 && cl.$low < 0))) { */ case 15: - _r$19 = fmt.Errorf("net/http: invalid Content-Length header: %q", new sliceType([new $String(clHeader)])); /* */ $s = 17; case 17: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - $r = $send(errCh[0], _r$19); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 16: - contentLength = cl; - $s = 10; continue; - /* } else { */ case 9: - contentLength = new $Int64(-1, 4294967295); - /* } */ case 10: - case 7: - b = $clone($clone(result, js.Value).Get("body"), js.Value); - body$2 = $ifaceNil; - /* */ if (!$clone(b, js.Value).IsUndefined() && !$clone(b, js.Value).IsNull()) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!$clone(b, js.Value).IsUndefined() && !$clone(b, js.Value).IsNull()) { */ case 19: - _r$20 = $clone(b, js.Value).Call("getReader", new sliceType([])); /* */ $s = 22; case 22: if($c) { $c = false; _r$20 = _r$20.$blk(); } if (_r$20 && _r$20.$blk !== undefined) { break s; } - body$2 = new streamReader.ptr(sliceType$3.nil, $clone(_r$20, js.Value), $ifaceNil); - $s = 21; continue; - /* } else { */ case 20: - _r$21 = $clone(result, js.Value).Call("arrayBuffer", new sliceType([])); /* */ $s = 23; case 23: if($c) { $c = false; _r$21 = _r$21.$blk(); } if (_r$21 && _r$21.$blk !== undefined) { break s; } - body$2 = new arrayReader.ptr($clone(_r$21, js.Value), sliceType$3.nil, false, $ifaceNil); - /* } */ case 21: - code = $clone($clone(result, js.Value).Get("status"), js.Value).Int(); - _r$22 = fmt.Sprintf("%d %s", new sliceType([new $Int(code), new $String(StatusText(code))])); /* */ $s = 24; case 24: if($c) { $c = false; _r$22 = _r$22.$blk(); } if (_r$22 && _r$22.$blk !== undefined) { break s; } - $r = $send(respCh[0], new Response.ptr(_r$22, code, "", 0, 0, header, body$2, contentLength, sliceType$2.nil, false, false, false, req[0], ptrType$28.nil)); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _entry$1, _key, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$20, _r$21, _r$22, _tmp$2, _tmp$3, _tuple$1, args, b, body$2, ck, cl, clHeader, code, contentLength, err$1, header, headersIt, key$1, n, pair, result, this$1, value$1, $s};return $f; - }; })(errCh, failure, req, respCh, success))); - js.Func.copy(failure[0], js.FuncOf((function(errCh, failure, req, respCh, success) { return function $b(this$1, args) { - var {_r$14, args, this$1, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $clone(success[0], js.Func).Release(); - $clone(failure[0], js.Func).Release(); - _r$14 = fmt.Errorf("net/http: fetch() failed: %s", new sliceType([new $String($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("message"), js.Value).String())])); /* */ $s = 1; case 1: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - $r = $send(errCh[0], _r$14); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$14, args, this$1, $s};return $f; - }; })(errCh, failure, req, respCh, success))); - _r$14 = $clone(fetchPromise, js.Value).Call("then", new sliceType([new success[0].constructor.elem(success[0]), new failure[0].constructor.elem(failure[0])])); /* */ $s = 38; case 38: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - _r$14; - _r$15 = req[0].Context().Done(); /* */ $s = 39; case 39: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$16 = $select([[_r$15], [respCh[0]], [errCh[0]]]); /* */ $s = 40; case 40: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - _selection = _r$16; - /* */ if (_selection[0] === 0) { $s = 41; continue; } - /* */ if (_selection[0] === 1) { $s = 42; continue; } - /* */ if (_selection[0] === 2) { $s = 43; continue; } - /* */ $s = 44; continue; - /* if (_selection[0] === 0) { */ case 41: - /* */ if (!$clone(ac, js.Value).IsUndefined()) { $s = 45; continue; } - /* */ $s = 46; continue; - /* if (!$clone(ac, js.Value).IsUndefined()) { */ case 45: - _r$17 = $clone(ac, js.Value).Call("abort", new sliceType([])); /* */ $s = 47; case 47: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$17; - /* } */ case 46: - _r$18 = req[0].Context().Err(); /* */ $s = 48; case 48: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - $24r$1 = [ptrType$18.nil, _r$18]; - $s = 49; case 49: return $24r$1; - /* } else if (_selection[0] === 1) { */ case 42: - resp = _selection[1][0]; - $s = -1; return [resp, $ifaceNil]; - /* } else if (_selection[0] === 2) { */ case 43: - err$1 = _selection[1][0]; - $s = -1; return [ptrType$18.nil, err$1]; - /* } */ case 44: - $s = -1; return [ptrType$18.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: Transport.ptr.prototype.RoundTrip, $c: true, $r, $24r, $24r$1, _entry, _i, _i$1, _keys, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _ref$1, _selection, _tmp, _tmp$1, _tuple, ac, body$1, buf, err, err$1, errCh, failure, fetchPromise, h, h$1, h$2, headers, key, opt, req, resp, respCh, success, t, value, values, x$5, $s};return $f; - }; - Transport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; - streamReader.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _selection, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, bCh, err, err$1, errCh, failure, n, p, r, success, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - bCh = [bCh]; - errCh = [errCh]; - n = 0; - err = $ifaceNil; - r = this; - /* */ if (!($interfaceIsEqual(r.err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(r.err, $ifaceNil))) { */ case 1: - _tmp = 0; - _tmp$1 = r.err; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (r.pending.$length === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (r.pending.$length === 0) { */ case 4: - bCh[0] = new $Chan(sliceType$3, 1); - errCh[0] = new $Chan($error, 1); - success = $clone(js.FuncOf((function(bCh, errCh) { return function $b(this$1, args) { - var {args, result, this$1, value, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - result = $clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value); - /* */ if ($clone($clone(result, js.Value).Get("done"), js.Value).Bool()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($clone($clone(result, js.Value).Get("done"), js.Value).Bool()) { */ case 1: - $r = $send(errCh[0], io.EOF); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 2: - value = $makeSlice(sliceType$3, $clone($clone($clone(result, js.Value).Get("value"), js.Value).Get("byteLength"), js.Value).Int()); - js.CopyBytesToGo(value, $clone($clone(result, js.Value).Get("value"), js.Value)); - $r = $send(bCh[0], value); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, args, result, this$1, value, $s};return $f; - }; })(bCh, errCh)), js.Func); - $deferred.push([$methodVal($clone(success, js.Func), "Release"), []]); - failure = $clone(js.FuncOf((function(bCh, errCh) { return function $b(this$1, args) { - var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(errCh[0], errors.New($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("message"), js.Value).String())); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f; - }; })(bCh, errCh)), js.Func); - $deferred.push([$methodVal($clone(failure, js.Func), "Release"), []]); - _r$1 = $clone(r.stream, js.Value).Call("read", new sliceType([])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, js.Value).Call("then", new sliceType([new success.constructor.elem(success), new failure.constructor.elem(failure)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = $select([[bCh[0]], [errCh[0]]]); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 9; continue; } - /* */ if (_selection[0] === 1) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_selection[0] === 0) { */ case 9: - b = _selection[1][0]; - r.pending = b; - $s = 11; continue; - /* } else if (_selection[0] === 1) { */ case 10: - err$1 = _selection[1][0]; - r.err = err$1; - _tmp$2 = 0; - _tmp$3 = err$1; - n = _tmp$2; - err = _tmp$3; - $24r$1 = [n, err]; - $s = 12; case 12: return $24r$1; - /* } */ case 11: - /* } */ case 5: - n = $copySlice(p, r.pending); - r.pending = $subslice(r.pending, n); - _tmp$4 = n; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $24r$2 = [n, err]; - $s = 13; case 13: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: streamReader.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _r$3, _selection, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, bCh, err, err$1, errCh, failure, n, p, r, success, $s, $deferred};return $f; } } - }; - streamReader.prototype.Read = function(p) { return this.$val.Read(p); }; - streamReader.ptr.prototype.Close = function() { - var {_r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = $clone(r.stream, js.Value).Call("cancel", new sliceType([])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - if ($interfaceIsEqual(r.err, $ifaceNil)) { - r.err = errClosed; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: streamReader.ptr.prototype.Close, $c: true, $r, _r$1, r, $s};return $f; - }; - streamReader.prototype.Close = function() { return this.$val.Close(); }; - arrayReader.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _selection, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, b, bCh, err, err$1, errCh, failure, n, p, r, success, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - bCh = [bCh]; - errCh = [errCh]; - n = 0; - err = $ifaceNil; - r = this; - /* */ if (!($interfaceIsEqual(r.err, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(r.err, $ifaceNil))) { */ case 1: - _tmp = 0; - _tmp$1 = r.err; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - /* */ if (!r.read) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!r.read) { */ case 4: - r.read = true; - bCh[0] = new $Chan(sliceType$3, 1); - errCh[0] = new $Chan($error, 1); - success = $clone(js.FuncOf((function(bCh, errCh) { return function $b(this$1, args) { - var {_r$1, args, this$1, uint8arrayWrapper, value, x$5, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = $clone(uint8Array, js.Value).New(new sliceType([(x$5 = (0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), new x$5.constructor.elem(x$5))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - uint8arrayWrapper = $clone(_r$1, js.Value); - value = $makeSlice(sliceType$3, $clone($clone(uint8arrayWrapper, js.Value).Get("byteLength"), js.Value).Int()); - js.CopyBytesToGo(value, $clone(uint8arrayWrapper, js.Value)); - $r = $send(bCh[0], value); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, args, this$1, uint8arrayWrapper, value, x$5, $s};return $f; - }; })(bCh, errCh)), js.Func); - $deferred.push([$methodVal($clone(success, js.Func), "Release"), []]); - failure = $clone(js.FuncOf((function(bCh, errCh) { return function $b(this$1, args) { - var {args, this$1, $s, $r, $c} = $restore(this, {this$1, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(errCh[0], errors.New($clone($clone((0 >= args.$length ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + 0]), js.Value).Get("message"), js.Value).String())); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, args, this$1, $s};return $f; - }; })(bCh, errCh)), js.Func); - $deferred.push([$methodVal($clone(failure, js.Func), "Release"), []]); - _r$1 = $clone(r.arrayPromise, js.Value).Call("then", new sliceType([new success.constructor.elem(success), new failure.constructor.elem(failure)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = $select([[bCh[0]], [errCh[0]]]); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection = _r$2; - /* */ if (_selection[0] === 0) { $s = 8; continue; } - /* */ if (_selection[0] === 1) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_selection[0] === 0) { */ case 8: - b = _selection[1][0]; - r.pending = b; - $s = 10; continue; - /* } else if (_selection[0] === 1) { */ case 9: - err$1 = _selection[1][0]; - _tmp$2 = 0; - _tmp$3 = err$1; - n = _tmp$2; - err = _tmp$3; - $24r$1 = [n, err]; - $s = 11; case 11: return $24r$1; - /* } */ case 10: - /* } */ case 5: - /* */ if (r.pending.$length === 0) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (r.pending.$length === 0) { */ case 12: - _tmp$4 = 0; - _tmp$5 = io.EOF; - n = _tmp$4; - err = _tmp$5; - $24r$2 = [n, err]; - $s = 14; case 14: return $24r$2; - /* } */ case 13: - n = $copySlice(p, r.pending); - r.pending = $subslice(r.pending, n); - _tmp$6 = n; - _tmp$7 = $ifaceNil; - n = _tmp$6; - err = _tmp$7; - $24r$3 = [n, err]; - $s = 15; case 15: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: arrayReader.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _selection, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, b, bCh, err, err$1, errCh, failure, n, p, r, success, $s, $deferred};return $f; } } - }; - arrayReader.prototype.Read = function(p) { return this.$val.Read(p); }; - arrayReader.ptr.prototype.Close = function() { - var r; - r = this; - if ($interfaceIsEqual(r.err, $ifaceNil)) { - r.err = errClosed; - } - return $ifaceNil; - }; - arrayReader.prototype.Close = function() { return this.$val.Close(); }; - Response.ptr.prototype.Cookies = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = readSetCookies(r.Header); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Response.ptr.prototype.Cookies, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Response.prototype.Cookies = function() { return this.$val.Cookies(); }; - Response.ptr.prototype.Location = function() { - var {$24r, $24r$1, _r$1, _r$2, _r$3, lv, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = new Header(r.Header).Get("Location"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - lv = _r$1; - if (lv === "") { - $s = -1; return [ptrType$17.nil, $pkg.ErrNoLocation]; - } - /* */ if (!(r.Request === ptrType$11.nil) && !(r.Request.URL === ptrType$17.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(r.Request === ptrType$11.nil) && !(r.Request.URL === ptrType$17.nil)) { */ case 2: - _r$2 = r.Request.URL.Parse(lv); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 3: - _r$3 = url.Parse(lv); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 7; case 7: return $24r$1; - /* */ } return; } var $f = {$blk: Response.ptr.prototype.Location, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, lv, r, $s};return $f; - }; - Response.prototype.Location = function() { return this.$val.Location(); }; - ReadResponse = function(r, req) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, err, line, mimeHeader, ok, proto, r, req, resp, status, statusCode, tp, $s, $r, $c} = $restore(this, {r, req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = textproto.NewReader(r); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - tp = _r$1; - resp = new Response.ptr("", 0, "", 0, 0, false, $ifaceNil, new $Int64(0, 0), sliceType$2.nil, false, false, false, req, ptrType$28.nil); - _r$2 = tp.ReadLine(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - line = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - err = io.ErrUnexpectedEOF; - } - $s = -1; return [ptrType$18.nil, err]; - } - _tuple$1 = strings.Cut(line, " "); - proto = _tuple$1[0]; - status = _tuple$1[1]; - ok = _tuple$1[2]; - /* */ if (!ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!ok) { */ case 3: - _r$3 = badStringError("malformed HTTP response", line); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [ptrType$18.nil, _r$3]; - $s = 6; case 6: return $24r; - /* } */ case 4: - resp.Proto = proto; - resp.Status = strings.TrimLeft(status, " "); - _tuple$2 = strings.Cut(resp.Status, " "); - statusCode = _tuple$2[0]; - /* */ if (!((statusCode.length === 3))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!((statusCode.length === 3))) { */ case 7: - _r$4 = badStringError("malformed HTTP status code", statusCode); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = [ptrType$18.nil, _r$4]; - $s = 10; case 10: return $24r$1; - /* } */ case 8: - _tuple$3 = strconv.Atoi(statusCode); - resp.StatusCode = _tuple$3[0]; - err = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) || resp.StatusCode < 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) || resp.StatusCode < 0) { */ case 11: - _r$5 = badStringError("malformed HTTP status code", statusCode); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$2 = [ptrType$18.nil, _r$5]; - $s = 14; case 14: return $24r$2; - /* } */ case 12: - _tuple$4 = ParseHTTPVersion(resp.Proto); - resp.ProtoMajor = _tuple$4[0]; - resp.ProtoMinor = _tuple$4[1]; - ok = _tuple$4[2]; - /* */ if (!ok) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!ok) { */ case 15: - _r$6 = badStringError("malformed HTTP version", resp.Proto); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = [ptrType$18.nil, _r$6]; - $s = 18; case 18: return $24r$3; - /* } */ case 16: - _r$7 = tp.ReadMIMEHeader(); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$5 = _r$7; - mimeHeader = _tuple$5[0]; - err = _tuple$5[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - if ($interfaceIsEqual(err, io.EOF)) { - err = io.ErrUnexpectedEOF; - } - $s = -1; return [ptrType$18.nil, err]; - } - resp.Header = (mimeHeader); - fixPragmaCacheControl(resp.Header); - _r$8 = readTransfer(resp, r); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$18.nil, err]; - } - $s = -1; return [resp, $ifaceNil]; - /* */ } return; } var $f = {$blk: ReadResponse, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, err, line, mimeHeader, ok, proto, r, req, resp, status, statusCode, tp, $s};return $f; - }; - $pkg.ReadResponse = ReadResponse; - fixPragmaCacheControl = function(header) { - var _entry, _entry$1, _key, _tuple, _tuple$1, header, hp, ok, presentcc; - _tuple = (_entry = header[$String.keyFor("Pragma")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - hp = _tuple[0]; - ok = _tuple[1]; - if (ok && hp.$length > 0 && (0 >= hp.$length ? ($throwRuntimeError("index out of range"), undefined) : hp.$array[hp.$offset + 0]) === "no-cache") { - _tuple$1 = (_entry$1 = header[$String.keyFor("Cache-Control")], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$2.nil, false]); - presentcc = _tuple$1[1]; - if (!presentcc) { - _key = "Cache-Control"; (header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: new sliceType$2(["no-cache"]) }; - } - } - }; - Response.ptr.prototype.ProtoAtLeast = function(major, minor) { - var major, minor, r; - r = this; - return r.ProtoMajor > major || (r.ProtoMajor === major) && r.ProtoMinor >= minor; - }; - Response.prototype.ProtoAtLeast = function(major, minor) { return this.$val.ProtoAtLeast(major, minor); }; - Response.ptr.prototype.Write = function(w) { - var {_entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, buf, contentLengthAlreadySent, err, err$1, err$2, err$3, err$4, n, ok, r, r1, text, tw, w, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - text = r.Status; - if (text === "") { - ok = false; - _tuple = (_entry = statusText[$Int.keyFor(r.StatusCode)], _entry !== undefined ? [_entry.v, true] : ["", false]); - text = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - text = "status code " + strconv.Itoa(r.StatusCode); - } - } else { - text = strings.TrimPrefix(text, strconv.Itoa(r.StatusCode) + " "); - } - _r$1 = fmt.Fprintf(w, "HTTP/%d.%d %03d %s\r\n", new sliceType([new $Int(r.ProtoMajor), new $Int(r.ProtoMinor), new $Int(r.StatusCode), new $String(text)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - r1 = new Response.ptr("", 0, "", 0, 0, false, $ifaceNil, new $Int64(0, 0), sliceType$2.nil, false, false, false, ptrType$11.nil, ptrType$28.nil); - Response.copy(r1, r); - /* */ if ((x$5 = r1.ContentLength, (x$5.$high === 0 && x$5.$low === 0)) && !($interfaceIsEqual(r1.Body, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((x$5 = r1.ContentLength, (x$5.$high === 0 && x$5.$low === 0)) && !($interfaceIsEqual(r1.Body, $ifaceNil))) { */ case 2: - buf = arrayType$2.zero(); - _r$2 = r1.Body.Read(new sliceType$3(buf)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$2 = _r$2; - n = _tuple$2[0]; - err$1 = _tuple$2[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil)) && !($interfaceIsEqual(err$1, io.EOF))) { - $s = -1; return err$1; - } - if (n === 0) { - r1.Body = new $pkg.NoBody.constructor.elem($pkg.NoBody); - } else { - r1.ContentLength = new $Int64(-1, 4294967295); - r1.Body = (x$6 = new structType$2.ptr(io.MultiReader(new sliceType$17([bytes.NewReader($subslice(new sliceType$3(buf), 0, 1)), r.Body])), r.Body), new x$6.constructor.elem(x$6)); - } - /* } */ case 3: - if ((x$7 = r1.ContentLength, (x$7.$high === -1 && x$7.$low === 4294967295)) && !r1.Close && r1.ProtoAtLeast(1, 1) && !chunked(r1.TransferEncoding) && !r1.Uncompressed) { - r1.Close = true; - } - _r$3 = newTransferWriter(r1); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$3 = _r$3; - tw = _tuple$3[0]; - err$2 = _tuple$3[1]; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _r$4 = tw.writeHeader(w, ptrType$19.nil); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err$2 = _r$4; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - _r$5 = new Header(r.Header).WriteSubset(w, respExcludeHeader); /* */ $s = 7; case 7: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$2 = _r$5; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - contentLengthAlreadySent = tw.shouldSendContentLength(); - /* */ if ((x$8 = r1.ContentLength, (x$8.$high === 0 && x$8.$low === 0)) && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ((x$8 = r1.ContentLength, (x$8.$high === 0 && x$8.$low === 0)) && !chunked(r1.TransferEncoding) && !contentLengthAlreadySent && bodyAllowedForStatus(r.StatusCode)) { */ case 8: - _r$6 = io.WriteString(w, "Content-Length: 0\r\n"); /* */ $s = 10; case 10: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple$4 = _r$6; - err$3 = _tuple$4[1]; - if (!($interfaceIsEqual(err$3, $ifaceNil))) { - $s = -1; return err$3; - } - /* } */ case 9: - _r$7 = io.WriteString(w, "\r\n"); /* */ $s = 11; case 11: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$5 = _r$7; - err$4 = _tuple$5[1]; - if (!($interfaceIsEqual(err$4, $ifaceNil))) { - $s = -1; return err$4; - } - _r$8 = tw.writeBody(w); /* */ $s = 12; case 12: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err$2 = _r$8; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return err$2; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Response.ptr.prototype.Write, $c: true, $r, _entry, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, buf, contentLengthAlreadySent, err, err$1, err$2, err$3, err$4, n, ok, r, r1, text, tw, w, x$5, x$6, x$7, x$8, $s};return $f; - }; - Response.prototype.Write = function(w) { return this.$val.Write(w); }; - Response.ptr.prototype.closeBody = function() { - var {_r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* */ if (!($interfaceIsEqual(r.Body, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(r.Body, $ifaceNil))) { */ case 1: - _r$1 = r.Body.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: Response.ptr.prototype.closeBody, $c: true, $r, _r$1, r, $s};return $f; - }; - Response.prototype.closeBody = function() { return this.$val.closeBody(); }; - Response.ptr.prototype.bodyIsWritable = function() { - var _tuple, ok, r; - r = this; - _tuple = $assertType(r.Body, io.Writer, true); - ok = _tuple[1]; - return ok; - }; - Response.prototype.bodyIsWritable = function() { return this.$val.bodyIsWritable(); }; - Response.ptr.prototype.isProtocolSwitch = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = isProtocolSwitchResponse(r.StatusCode, r.Header); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Response.ptr.prototype.isProtocolSwitch, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Response.prototype.isProtocolSwitch = function() { return this.$val.isProtocolSwitch(); }; - isProtocolSwitchResponse = function(code, h) { - var {$24r, _r$1, _v, code, h, $s, $r, $c} = $restore(this, {code, h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!(code === 101)) { _v = false; $s = 1; continue s; } - _r$1 = isProtocolSwitchHeader(h); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: isProtocolSwitchResponse, $c: true, $r, $24r, _r$1, _v, code, h, $s};return $f; - }; - isProtocolSwitchHeader = function(h) { - var {$24r, _entry, _r$1, h, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = new Header(h).Get("Upgrade"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = !(_r$1 === "") && httpguts.HeaderValuesContainsToken((_entry = h[$String.keyFor("Connection")], _entry !== undefined ? _entry.v : sliceType$2.nil), "Upgrade"); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: isProtocolSwitchHeader, $c: true, $r, $24r, _entry, _r$1, h, $s};return $f; - }; - ProtocolError.ptr.prototype.Error = function() { - var pe; - pe = this; - return pe.ErrorString; - }; - ProtocolError.prototype.Error = function() { return this.$val.Error(); }; - badStringError = function(what, val) { - var {$24r, _r$1, val, what, $s, $r, $c} = $restore(this, {what, val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = fmt.Errorf("%s %q", new sliceType([new $String(what), new $String(val)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: badStringError, $c: true, $r, $24r, _r$1, val, what, $s};return $f; - }; - Request.ptr.prototype.Context = function() { - var r; - r = this; - if (!($interfaceIsEqual(r.ctx, $ifaceNil))) { - return r.ctx; - } - return context.Background(); - }; - Request.prototype.Context = function() { return this.$val.Context(); }; - Request.ptr.prototype.WithContext = function(ctx) { - var ctx, r, r2; - r = this; - if ($interfaceIsEqual(ctx, $ifaceNil)) { - $panic(new $String("nil context")); - } - r2 = new Request.ptr("", ptrType$17.nil, "", 0, 0, false, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$2.nil, false, "", false, false, ptrType$31.nil, false, "", "", ptrType$28.nil, $chanNil, ptrType$18.nil, $ifaceNil); - Request.copy(r2, r); - r2.ctx = ctx; - r2.URL = cloneURL(r.URL); - return r2; - }; - Request.prototype.WithContext = function(ctx) { return this.$val.WithContext(ctx); }; - Request.ptr.prototype.Clone = function(ctx) { - var ctx, r, r2, s, s2; - r = this; - if ($interfaceIsEqual(ctx, $ifaceNil)) { - $panic(new $String("nil context")); - } - r2 = new Request.ptr("", ptrType$17.nil, "", 0, 0, false, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$2.nil, false, "", false, false, ptrType$31.nil, false, "", "", ptrType$28.nil, $chanNil, ptrType$18.nil, $ifaceNil); - Request.copy(r2, r); - r2.ctx = ctx; - r2.URL = cloneURL(r.URL); - if (!(r.Header === false)) { - r2.Header = new Header(r.Header).Clone(); - } - if (!(r.Trailer === false)) { - r2.Trailer = new Header(r.Trailer).Clone(); - } - s = r.TransferEncoding; - if (!(s === sliceType$2.nil)) { - s2 = $makeSlice(sliceType$2, s.$length); - $copySlice(s2, s); - r2.TransferEncoding = s2; - } - r2.Form = cloneURLValues(r.Form); - r2.PostForm = cloneURLValues(r.PostForm); - r2.MultipartForm = cloneMultipartForm(r.MultipartForm); - return r2; - }; - Request.prototype.Clone = function(ctx) { return this.$val.Clone(ctx); }; - Request.ptr.prototype.ProtoAtLeast = function(major, minor) { - var major, minor, r; - r = this; - return r.ProtoMajor > major || (r.ProtoMajor === major) && r.ProtoMinor >= minor; - }; - Request.prototype.ProtoAtLeast = function(major, minor) { return this.$val.ProtoAtLeast(major, minor); }; - Request.ptr.prototype.UserAgent = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = new Header(r.Header).Get("User-Agent"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.UserAgent, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Request.prototype.UserAgent = function() { return this.$val.UserAgent(); }; - Request.ptr.prototype.Cookies = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = readCookies(r.Header, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.Cookies, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Request.prototype.Cookies = function() { return this.$val.Cookies(); }; - Request.ptr.prototype.Cookie = function(name) { - var {_i, _r$1, _ref, c, name, r, $s, $r, $c} = $restore(this, {name}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = readCookies(r.Header, name); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _ref = _r$1; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $s = -1; return [c, $ifaceNil]; - case 3: - $s = -1; return [ptrType$62.nil, $pkg.ErrNoCookie]; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.Cookie, $c: true, $r, _i, _r$1, _ref, c, name, r, $s};return $f; - }; - Request.prototype.Cookie = function(name) { return this.$val.Cookie(name); }; - Request.ptr.prototype.AddCookie = function(c) { - var {_arg, _arg$1, _r$1, _r$2, _r$3, _r$4, c, c$1, r, s, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = sanitizeCookieName(c.Name); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = new $String(_r$1); - _r$2 = sanitizeCookieValue(c.Value); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = new $String(_r$2); - _r$3 = fmt.Sprintf("%s=%s", new sliceType([_arg, _arg$1])); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - s = _r$3; - _r$4 = new Header(r.Header).Get("Cookie"); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - c$1 = _r$4; - /* */ if (!(c$1 === "")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(c$1 === "")) { */ case 5: - $r = new Header(r.Header).Set("Cookie", c$1 + "; " + s); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 7; continue; - /* } else { */ case 6: - $r = new Header(r.Header).Set("Cookie", s); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - $s = -1; return; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.AddCookie, $c: true, $r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, c, c$1, r, s, $s};return $f; - }; - Request.prototype.AddCookie = function(c) { return this.$val.AddCookie(c); }; - Request.ptr.prototype.Referer = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = new Header(r.Header).Get("Referer"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.Referer, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Request.prototype.Referer = function() { return this.$val.Referer(); }; - Request.ptr.prototype.MultipartReader = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (r.MultipartForm === multipartByReader) { - $s = -1; return [ptrType$63.nil, errors.New("http: MultipartReader called twice")]; - } - if (!(r.MultipartForm === ptrType$31.nil)) { - $s = -1; return [ptrType$63.nil, errors.New("http: multipart handled by ParseMultipartForm")]; - } - r.MultipartForm = multipartByReader; - _r$1 = r.multipartReader(true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.MultipartReader, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Request.prototype.MultipartReader = function() { return this.$val.MultipartReader(); }; - Request.ptr.prototype.multipartReader = function(allowMixed) { - var {_entry, _r$1, _r$2, _tuple, _tuple$1, allowMixed, boundary, d, err, ok, params, r, v, $s, $r, $c} = $restore(this, {allowMixed}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = new Header(r.Header).Get("Content-Type"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - if (v === "") { - $s = -1; return [ptrType$63.nil, $pkg.ErrNotMultipart]; - } - _r$2 = mime.ParseMediaType(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - d = _tuple[0]; - params = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil)) || !(d === "multipart/form-data" || allowMixed && d === "multipart/mixed")) { - $s = -1; return [ptrType$63.nil, $pkg.ErrNotMultipart]; - } - _tuple$1 = (_entry = params[$String.keyFor("boundary")], _entry !== undefined ? [_entry.v, true] : ["", false]); - boundary = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - $s = -1; return [ptrType$63.nil, $pkg.ErrMissingBoundary]; - } - $s = -1; return [multipart.NewReader(r.Body, boundary), $ifaceNil]; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.multipartReader, $c: true, $r, _entry, _r$1, _r$2, _tuple, _tuple$1, allowMixed, boundary, d, err, ok, params, r, v, $s};return $f; - }; - Request.prototype.multipartReader = function(allowMixed) { return this.$val.multipartReader(allowMixed); }; - Request.ptr.prototype.isH2Upgrade = function() { - var r; - r = this; - return r.Method === "PRI" && ($keys(r.Header).length === 0) && r.URL.Path === "*" && r.Proto === "HTTP/2.0"; - }; - Request.prototype.isH2Upgrade = function() { return this.$val.isH2Upgrade(); }; - valueOrDefault = function(value, def) { - var def, value; - if (!(value === "")) { - return value; - } - return def; - }; - Request.ptr.prototype.Write = function(w) { - var {$24r, _r$1, r, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = r.write(w, false, false, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.Write, $c: true, $r, $24r, _r$1, r, w, $s};return $f; - }; - Request.prototype.Write = function(w) { return this.$val.Write(w); }; - Request.ptr.prototype.WriteProxy = function(w) { - var {$24r, _r$1, r, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = r.write(w, true, false, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.WriteProxy, $c: true, $r, $24r, _r$1, r, w, $s};return $f; - }; - Request.prototype.WriteProxy = function(w) { return this.$val.WriteProxy(w); }; - Request.ptr.prototype.write = function(w, usingProxy, extraHeaders, waitForContinue) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, bw, bw$1, bw$2, closed, err, err$1, extraHeaders, host, ok, ok$1, ok$2, r, ruri, trace, tw, userAgent, usingProxy, w, waitForContinue, x$5, $s, $deferred, $r, $c} = $restore(this, {w, usingProxy, extraHeaders, waitForContinue}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - closed = [closed]; - err = [err]; - r = [r]; - trace = [trace]; - err[0] = $ifaceNil; - r[0] = this; - _r$1 = httptrace.ContextClientTrace(r[0].Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - trace[0] = _r$1; - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteRequest === $throwNilPointerError)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteRequest === $throwNilPointerError)) { */ case 2: - $deferred.push([(function(closed, err, r, trace) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = trace[0].WroteRequest(new httptrace.WroteRequestInfo.ptr(err[0])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(closed, err, r, trace), []]); - /* } */ case 3: - closed[0] = false; - $deferred.push([(function(closed, err, r, trace) { return function $b() { - var {_r$2, closeErr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (closed[0]) { - $s = -1; return; - } - _r$2 = r[0].closeBody(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - closeErr = _r$2; - if (!($interfaceIsEqual(closeErr, $ifaceNil)) && $interfaceIsEqual(err[0], $ifaceNil)) { - err[0] = closeErr; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, closeErr, $s};return $f; - }; })(closed, err, r, trace), []]); - _r$2 = cleanHost(r[0].Host); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - host = _r$2; - /* */ if (host === "") { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (host === "") { */ case 5: - /* */ if (r[0].URL === ptrType$17.nil) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (r[0].URL === ptrType$17.nil) { */ case 7: - err[0] = errMissingHost; - $24r = err[0]; - $s = 9; case 9: return $24r; - /* } */ case 8: - _r$3 = cleanHost(r[0].URL.Host); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - host = _r$3; - /* } */ case 6: - host = removeZone(host); - ruri = r[0].URL.RequestURI(); - if (usingProxy && !(r[0].URL.Scheme === "") && r[0].URL.Opaque === "") { - ruri = r[0].URL.Scheme + "://" + host + ruri; - } else if (r[0].Method === "CONNECT" && r[0].URL.Path === "") { - ruri = host; - if (!(r[0].URL.Opaque === "")) { - ruri = r[0].URL.Opaque; - } - } - /* */ if (stringContainsCTLByte(ruri)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (stringContainsCTLByte(ruri)) { */ case 11: - err[0] = errors.New("net/http: can't write control character in Request.URL"); - $24r$1 = err[0]; - $s = 13; case 13: return $24r$1; - /* } */ case 12: - bw = ptrType$14.nil; - _tuple = $assertType(w, io.ByteWriter, true); - ok = _tuple[1]; - if (!ok) { - bw = bufio.NewWriter(w); - w = bw; - } - _r$4 = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", new sliceType([new $String(valueOrDefault(r[0].Method, "GET")), new $String(ruri)])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - err[0] = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 15: - err[0] = err[0]; - $24r$2 = err[0]; - $s = 17; case 17: return $24r$2; - /* } */ case 16: - _r$5 = fmt.Fprintf(w, "Host: %s\r\n", new sliceType([new $String(host)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - err[0] = _tuple$2[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 19: - err[0] = err[0]; - $24r$3 = err[0]; - $s = 21; case 21: return $24r$3; - /* } */ case 20: - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { */ case 22: - $r = trace[0].WroteHeaderField("Host", new sliceType$2([host])); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 23: - userAgent = "Go-http-client/1.1"; - /* */ if (new Header(r[0].Header).has("User-Agent")) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (new Header(r[0].Header).has("User-Agent")) { */ case 25: - _r$6 = new Header(r[0].Header).Get("User-Agent"); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - userAgent = _r$6; - /* } */ case 26: - /* */ if (!(userAgent === "")) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!(userAgent === "")) { */ case 28: - _r$7 = fmt.Fprintf(w, "User-Agent: %s\r\n", new sliceType([new $String(userAgent)])); /* */ $s = 30; case 30: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - err[0] = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 31: - err[0] = err[0]; - $24r$4 = err[0]; - $s = 33; case 33: return $24r$4; - /* } */ case 32: - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteHeaderField === $throwNilPointerError)) { */ case 34: - $r = trace[0].WroteHeaderField("User-Agent", new sliceType$2([userAgent])); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 35: - /* } */ case 29: - _r$8 = newTransferWriter(r[0]); /* */ $s = 37; case 37: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$4 = _r$8; - tw = _tuple$4[0]; - err[0] = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 38: - err[0] = err[0]; - $24r$5 = err[0]; - $s = 40; case 40: return $24r$5; - /* } */ case 39: - _r$9 = tw.writeHeader(w, trace[0]); /* */ $s = 41; case 41: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err[0] = _r$9; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 42: - err[0] = err[0]; - $24r$6 = err[0]; - $s = 44; case 44: return $24r$6; - /* } */ case 43: - _r$10 = new Header(r[0].Header).writeSubset(w, reqWriteExcludeHeader, trace[0]); /* */ $s = 45; case 45: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err[0] = _r$10; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 46: - err[0] = err[0]; - $24r$7 = err[0]; - $s = 48; case 48: return $24r$7; - /* } */ case 47: - /* */ if (!(extraHeaders === false)) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (!(extraHeaders === false)) { */ case 49: - _r$11 = new Header(extraHeaders).write(w, trace[0]); /* */ $s = 51; case 51: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err[0] = _r$11; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 52: - err[0] = err[0]; - $24r$8 = err[0]; - $s = 54; case 54: return $24r$8; - /* } */ case 53: - /* } */ case 50: - _r$12 = io.WriteString(w, "\r\n"); /* */ $s = 55; case 55: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _tuple$5 = _r$12; - err[0] = _tuple$5[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 56: - err[0] = err[0]; - $24r$9 = err[0]; - $s = 58; case 58: return $24r$9; - /* } */ case 57: - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteHeaders === $throwNilPointerError)) { $s = 59; continue; } - /* */ $s = 60; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].WroteHeaders === $throwNilPointerError)) { */ case 59: - $r = trace[0].WroteHeaders(); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 60: - /* */ if (!(waitForContinue === $throwNilPointerError)) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (!(waitForContinue === $throwNilPointerError)) { */ case 62: - _tuple$6 = $assertType(w, ptrType$14, true); - bw$1 = _tuple$6[0]; - ok$1 = _tuple$6[1]; - /* */ if (ok$1) { $s = 64; continue; } - /* */ $s = 65; continue; - /* if (ok$1) { */ case 64: - _r$13 = bw$1.Flush(); /* */ $s = 66; case 66: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - err[0] = _r$13; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 67; continue; } - /* */ $s = 68; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 67: - err[0] = err[0]; - $24r$10 = err[0]; - $s = 69; case 69: return $24r$10; - /* } */ case 68: - /* } */ case 65: - /* */ if (!(trace[0] === ptrType$19.nil) && !(trace[0].Wait100Continue === $throwNilPointerError)) { $s = 70; continue; } - /* */ $s = 71; continue; - /* if (!(trace[0] === ptrType$19.nil) && !(trace[0].Wait100Continue === $throwNilPointerError)) { */ case 70: - $r = trace[0].Wait100Continue(); /* */ $s = 72; case 72: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 71: - _r$14 = waitForContinue(); /* */ $s = 75; case 75: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - /* */ if (!_r$14) { $s = 73; continue; } - /* */ $s = 74; continue; - /* if (!_r$14) { */ case 73: - closed[0] = true; - _r$15 = r[0].closeBody(); /* */ $s = 76; case 76: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - _r$15; - err[0] = $ifaceNil; - $24r$11 = err[0]; - $s = 77; case 77: return $24r$11; - /* } */ case 74: - /* } */ case 63: - _tuple$7 = $assertType(w, ptrType$14, true); - bw$2 = _tuple$7[0]; - ok$2 = _tuple$7[1]; - /* */ if (ok$2 && tw.FlushHeaders) { $s = 78; continue; } - /* */ $s = 79; continue; - /* if (ok$2 && tw.FlushHeaders) { */ case 78: - _r$16 = bw$2.Flush(); /* */ $s = 80; case 80: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - err$1 = _r$16; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 81; continue; } - /* */ $s = 82; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 81: - err[0] = err$1; - $24r$12 = err[0]; - $s = 83; case 83: return $24r$12; - /* } */ case 82: - /* } */ case 79: - closed[0] = true; - _r$17 = tw.writeBody(w); /* */ $s = 84; case 84: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - err[0] = _r$17; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 85; continue; } - /* */ $s = 86; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 85: - if ($interfaceIsEqual(tw.bodyReadError, err[0])) { - err[0] = (x$5 = new requestBodyReadError.ptr(err[0]), new x$5.constructor.elem(x$5)); - } - err[0] = err[0]; - $24r$13 = err[0]; - $s = 87; case 87: return $24r$13; - /* } */ case 86: - /* */ if (!(bw === ptrType$14.nil)) { $s = 88; continue; } - /* */ $s = 89; continue; - /* if (!(bw === ptrType$14.nil)) { */ case 88: - _r$18 = bw.Flush(); /* */ $s = 90; case 90: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - err[0] = _r$18; - $24r$14 = err[0]; - $s = 91; case 91: return $24r$14; - /* } */ case 89: - err[0] = $ifaceNil; - $24r$15 = err[0]; - $s = 92; case 92: return $24r$15; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { var $f = {$blk: Request.ptr.prototype.write, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$12, $24r$13, $24r$14, $24r$15, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, bw, bw$1, bw$2, closed, err, err$1, extraHeaders, host, ok, ok$1, ok$2, r, ruri, trace, tw, userAgent, usingProxy, w, waitForContinue, x$5, $s, $deferred};return $f; } } - }; - Request.prototype.write = function(w, usingProxy, extraHeaders, waitForContinue) { return this.$val.write(w, usingProxy, extraHeaders, waitForContinue); }; - idnaASCII = function(v) { - var {$24r, _r$1, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (ascii.Is(v)) { - $s = -1; return [v, $ifaceNil]; - } - _r$1 = idna.Lookup.ToASCII(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: idnaASCII, $c: true, $r, $24r, _r$1, v, $s};return $f; - }; - cleanHost = function(in$1) { - var {_r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, a, a$1, err, err$1, host, i, in$1, port, $s, $r, $c} = $restore(this, {in$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = strings.IndexAny(in$1, " /"); - if (!((i === -1))) { - in$1 = $substring(in$1, 0, i); - } - _r$1 = net.SplitHostPort(in$1); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$2 = idnaASCII(in$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - a = _tuple$1[0]; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return in$1; - } - $s = -1; return a; - /* } */ case 3: - _r$3 = idnaASCII(host); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - a$1 = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return in$1; - } - $s = -1; return net.JoinHostPort(a$1, port); - /* */ } return; } var $f = {$blk: cleanHost, $c: true, $r, _r$1, _r$2, _r$3, _tuple, _tuple$1, _tuple$2, a, a$1, err, err$1, host, i, in$1, port, $s};return $f; - }; - removeZone = function(host) { - var host, i, j; - if (!strings.HasPrefix(host, "[")) { - return host; - } - i = strings.LastIndex(host, "]"); - if (i < 0) { - return host; - } - j = strings.LastIndex($substring(host, 0, i), "%"); - if (j < 0) { - return host; - } - return $substring(host, 0, j) + $substring(host, i); - }; - ParseHTTPVersion = function(vers) { - var _1, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$19, _tmp$2, _tmp$20, _tmp$21, _tmp$22, _tmp$23, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, err, maj, major, min, minor, ok, vers; - major = 0; - minor = 0; - ok = false; - _1 = vers; - if (_1 === ("HTTP/1.1")) { - _tmp = 1; - _tmp$1 = 1; - _tmp$2 = true; - major = _tmp; - minor = _tmp$1; - ok = _tmp$2; - return [major, minor, ok]; - } else if (_1 === ("HTTP/1.0")) { - _tmp$3 = 1; - _tmp$4 = 0; - _tmp$5 = true; - major = _tmp$3; - minor = _tmp$4; - ok = _tmp$5; - return [major, minor, ok]; - } - if (!strings.HasPrefix(vers, "HTTP/")) { - _tmp$6 = 0; - _tmp$7 = 0; - _tmp$8 = false; - major = _tmp$6; - minor = _tmp$7; - ok = _tmp$8; - return [major, minor, ok]; - } - if (!((vers.length === 8))) { - _tmp$9 = 0; - _tmp$10 = 0; - _tmp$11 = false; - major = _tmp$9; - minor = _tmp$10; - ok = _tmp$11; - return [major, minor, ok]; - } - if (!((vers.charCodeAt(6) === 46))) { - _tmp$12 = 0; - _tmp$13 = 0; - _tmp$14 = false; - major = _tmp$12; - minor = _tmp$13; - ok = _tmp$14; - return [major, minor, ok]; - } - _tuple = strconv.ParseUint($substring(vers, 5, 6), 10, 0); - maj = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$15 = 0; - _tmp$16 = 0; - _tmp$17 = false; - major = _tmp$15; - minor = _tmp$16; - ok = _tmp$17; - return [major, minor, ok]; - } - _tuple$1 = strconv.ParseUint($substring(vers, 7, 8), 10, 0); - min = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$18 = 0; - _tmp$19 = 0; - _tmp$20 = false; - major = _tmp$18; - minor = _tmp$19; - ok = _tmp$20; - return [major, minor, ok]; - } - _tmp$21 = ((maj.$low >> 0)); - _tmp$22 = ((min.$low >> 0)); - _tmp$23 = true; - major = _tmp$21; - minor = _tmp$22; - ok = _tmp$23; - return [major, minor, ok]; - }; - $pkg.ParseHTTPVersion = ParseHTTPVersion; - validMethod = function(method) { - var {$24r, _r$1, _v, method, $s, $r, $c} = $restore(this, {method}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!(method.length > 0)) { _v = false; $s = 1; continue s; } - _r$1 = strings.IndexFunc(method, isNotToken); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 === -1; case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: validMethod, $c: true, $r, $24r, _r$1, _v, method, $s};return $f; - }; - Request.ptr.prototype.BasicAuth = function() { - var {_r$1, _tmp, _tmp$1, _tmp$2, _tuple, auth, ok, password, r, username, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - username = ""; - password = ""; - ok = false; - r = this; - _r$1 = new Header(r.Header).Get("Authorization"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - auth = _r$1; - if (auth === "") { - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = false; - username = _tmp; - password = _tmp$1; - ok = _tmp$2; - $s = -1; return [username, password, ok]; - } - _tuple = parseBasicAuth(auth); - username = _tuple[0]; - password = _tuple[1]; - ok = _tuple[2]; - $s = -1; return [username, password, ok]; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.BasicAuth, $c: true, $r, _r$1, _tmp, _tmp$1, _tmp$2, _tuple, auth, ok, password, r, username, $s};return $f; - }; - Request.prototype.BasicAuth = function() { return this.$val.BasicAuth(); }; - parseBasicAuth = function(auth) { - var _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, auth, c, cs, err, ok, password, username; - username = ""; - password = ""; - ok = false; - if (auth.length < 6 || !ascii.EqualFold($substring(auth, 0, 6), "Basic ")) { - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = false; - username = _tmp; - password = _tmp$1; - ok = _tmp$2; - return [username, password, ok]; - } - _tuple = base64.StdEncoding.DecodeString($substring(auth, 6)); - c = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tmp$3 = ""; - _tmp$4 = ""; - _tmp$5 = false; - username = _tmp$3; - password = _tmp$4; - ok = _tmp$5; - return [username, password, ok]; - } - cs = ($bytesToString(c)); - _tuple$1 = strings.Cut(cs, ":"); - username = _tuple$1[0]; - password = _tuple$1[1]; - ok = _tuple$1[2]; - if (!ok) { - _tmp$6 = ""; - _tmp$7 = ""; - _tmp$8 = false; - username = _tmp$6; - password = _tmp$7; - ok = _tmp$8; - return [username, password, ok]; - } - _tmp$9 = username; - _tmp$10 = password; - _tmp$11 = true; - username = _tmp$9; - password = _tmp$10; - ok = _tmp$11; - return [username, password, ok]; - }; - Request.ptr.prototype.SetBasicAuth = function(username, password) { - var {password, r, username, $s, $r, $c} = $restore(this, {username, password}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - $r = new Header(r.Header).Set("Authorization", "Basic " + basicAuth(username, password)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.SetBasicAuth, $c: true, $r, password, r, username, $s};return $f; - }; - Request.prototype.SetBasicAuth = function(username, password) { return this.$val.SetBasicAuth(username, password); }; - parseRequestLine = function(line) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, line, method, ok, ok1, ok2, proto, requestURI, rest; - method = ""; - requestURI = ""; - proto = ""; - ok = false; - _tuple = strings.Cut(line, " "); - method = _tuple[0]; - rest = _tuple[1]; - ok1 = _tuple[2]; - _tuple$1 = strings.Cut(rest, " "); - requestURI = _tuple$1[0]; - proto = _tuple$1[1]; - ok2 = _tuple$1[2]; - if (!ok1 || !ok2) { - _tmp = ""; - _tmp$1 = ""; - _tmp$2 = ""; - _tmp$3 = false; - method = _tmp; - requestURI = _tmp$1; - proto = _tmp$2; - ok = _tmp$3; - return [method, requestURI, proto, ok]; - } - _tmp$4 = method; - _tmp$5 = requestURI; - _tmp$6 = proto; - _tmp$7 = true; - method = _tmp$4; - requestURI = _tmp$5; - proto = _tmp$6; - ok = _tmp$7; - return [method, requestURI, proto, ok]; - }; - newTextprotoReader = function(br) { - var {$24r, _r$1, _r$2, br, tr, v, $s, $r, $c} = $restore(this, {br}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = textprotoReaderPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - if (!($interfaceIsEqual(v, $ifaceNil))) { - tr = $assertType(v, ptrType$64); - tr.R = br; - $s = -1; return tr; - } - _r$2 = textproto.NewReader(br); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: newTextprotoReader, $c: true, $r, $24r, _r$1, _r$2, br, tr, v, $s};return $f; - }; - putTextprotoReader = function(r) { - var r; - r.R = ptrType$29.nil; - textprotoReaderPool.Put(r); - }; - readRequest = function(b) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _entry, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, err, justAuthority, mimeHeader, ok, rawurl, req, s, tp, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - tp = [tp]; - req = ptrType$11.nil; - err[0] = $ifaceNil; - _r$1 = newTextprotoReader(b); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - tp[0] = _r$1; - req = new Request.ptr("", ptrType$17.nil, "", 0, 0, false, $ifaceNil, $throwNilPointerError, new $Int64(0, 0), sliceType$2.nil, false, "", false, false, ptrType$31.nil, false, "", "", ptrType$28.nil, $chanNil, ptrType$18.nil, $ifaceNil); - s = ""; - _r$2 = tp[0].ReadLine(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - s = _tuple[0]; - err[0] = _tuple[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 3: - _tmp = ptrType$11.nil; - _tmp$1 = err[0]; - req = _tmp; - err[0] = _tmp$1; - $24r = [req, err[0]]; - $s = 5; case 5: return $24r; - /* } */ case 4: - $deferred.push([(function(err, tp) { return function() { - putTextprotoReader(tp[0]); - if ($interfaceIsEqual(err[0], io.EOF)) { - err[0] = io.ErrUnexpectedEOF; - } - }; })(err, tp), []]); - ok = false; - _tuple$1 = parseRequestLine(s); - req.Method = _tuple$1[0]; - req.RequestURI = _tuple$1[1]; - req.Proto = _tuple$1[2]; - ok = _tuple$1[3]; - /* */ if (!ok) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!ok) { */ case 6: - _tmp$2 = ptrType$11.nil; - _r$3 = badStringError("malformed HTTP request", s); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tmp$3 = _r$3; - req = _tmp$2; - err[0] = _tmp$3; - $24r$1 = [req, err[0]]; - $s = 9; case 9: return $24r$1; - /* } */ case 7: - _r$4 = validMethod(req.Method); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (!_r$4) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!_r$4) { */ case 10: - _tmp$4 = ptrType$11.nil; - _r$5 = badStringError("invalid method", req.Method); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tmp$5 = _r$5; - req = _tmp$4; - err[0] = _tmp$5; - $24r$2 = [req, err[0]]; - $s = 14; case 14: return $24r$2; - /* } */ case 11: - rawurl = req.RequestURI; - _tuple$2 = ParseHTTPVersion(req.Proto); - req.ProtoMajor = _tuple$2[0]; - req.ProtoMinor = _tuple$2[1]; - ok = _tuple$2[2]; - /* */ if (!ok) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!ok) { */ case 15: - _tmp$6 = ptrType$11.nil; - _r$6 = badStringError("malformed HTTP version", req.Proto); /* */ $s = 17; case 17: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tmp$7 = _r$6; - req = _tmp$6; - err[0] = _tmp$7; - $24r$3 = [req, err[0]]; - $s = 18; case 18: return $24r$3; - /* } */ case 16: - justAuthority = req.Method === "CONNECT" && !strings.HasPrefix(rawurl, "/"); - if (justAuthority) { - rawurl = "http://" + rawurl; - } - _r$7 = url.ParseRequestURI(rawurl); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$3 = _r$7; - req.URL = _tuple$3[0]; - err[0] = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 20: - _tmp$8 = ptrType$11.nil; - _tmp$9 = err[0]; - req = _tmp$8; - err[0] = _tmp$9; - $24r$4 = [req, err[0]]; - $s = 22; case 22: return $24r$4; - /* } */ case 21: - if (justAuthority) { - req.URL.Scheme = ""; - } - _r$8 = tp[0].ReadMIMEHeader(); /* */ $s = 23; case 23: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$4 = _r$8; - mimeHeader = _tuple$4[0]; - err[0] = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 24: - _tmp$10 = ptrType$11.nil; - _tmp$11 = err[0]; - req = _tmp$10; - err[0] = _tmp$11; - $24r$5 = [req, err[0]]; - $s = 26; case 26: return $24r$5; - /* } */ case 25: - req.Header = (mimeHeader); - /* */ if ((_entry = req.Header[$String.keyFor("Host")], _entry !== undefined ? _entry.v : sliceType$2.nil).$length > 1) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if ((_entry = req.Header[$String.keyFor("Host")], _entry !== undefined ? _entry.v : sliceType$2.nil).$length > 1) { */ case 27: - _tmp$12 = ptrType$11.nil; - _r$9 = fmt.Errorf("too many Host headers", new sliceType([])); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _tmp$13 = _r$9; - req = _tmp$12; - err[0] = _tmp$13; - $24r$6 = [req, err[0]]; - $s = 30; case 30: return $24r$6; - /* } */ case 28: - req.Host = req.URL.Host; - if (req.Host === "") { - req.Host = new Header(req.Header).get("Host"); - } - fixPragmaCacheControl(req.Header); - _r$10 = shouldClose(req.ProtoMajor, req.ProtoMinor, req.Header, false); /* */ $s = 31; case 31: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - req.Close = _r$10; - _r$11 = readTransfer(req, b); /* */ $s = 32; case 32: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err[0] = _r$11; - /* */ if (!($interfaceIsEqual(err[0], $ifaceNil))) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (!($interfaceIsEqual(err[0], $ifaceNil))) { */ case 33: - _tmp$14 = ptrType$11.nil; - _tmp$15 = err[0]; - req = _tmp$14; - err[0] = _tmp$15; - $24r$7 = [req, err[0]]; - $s = 35; case 35: return $24r$7; - /* } */ case 34: - if (req.isH2Upgrade()) { - req.ContentLength = new $Int64(-1, 4294967295); - req.Close = true; - } - _tmp$16 = req; - _tmp$17 = $ifaceNil; - req = _tmp$16; - err[0] = _tmp$17; - $24r$8 = [req, err[0]]; - $s = 36; case 36: return $24r$8; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [req, err[0]]; } if($curGoroutine.asleep) { var $f = {$blk: readRequest, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _entry, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, b, err, justAuthority, mimeHeader, ok, rawurl, req, s, tp, $s, $deferred};return $f; } } - }; - MaxBytesReader = function(w, r, n) { - var n, r, w; - if ((n.$high < 0 || (n.$high === 0 && n.$low < 0))) { - n = new $Int64(0, 0); - } - return new maxBytesReader.ptr(w, r, n, $ifaceNil); - }; - $pkg.MaxBytesReader = MaxBytesReader; - maxBytesReader.ptr.prototype.Read = function(p) { - var {_r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, err, l, n, ok, p, res, x$10, x$11, x$12, x$13, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - l = this; - if (!($interfaceIsEqual(l.err, $ifaceNil))) { - _tmp = 0; - _tmp$1 = l.err; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - if (p.$length === 0) { - _tmp$2 = 0; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - if ((x$5 = (new $Int64(0, p.$length)), x$6 = (x$7 = l.n, new $Int64(x$7.$high + 0, x$7.$low + 1)), (x$5.$high > x$6.$high || (x$5.$high === x$6.$high && x$5.$low > x$6.$low)))) { - p = $subslice(p, 0, $flatten64((x$8 = l.n, new $Int64(x$8.$high + 0, x$8.$low + 1)))); - } - _r$1 = l.r.Read(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - if ((x$9 = (new $Int64(0, n)), x$10 = l.n, (x$9.$high < x$10.$high || (x$9.$high === x$10.$high && x$9.$low <= x$10.$low)))) { - l.n = (x$11 = l.n, x$12 = (new $Int64(0, n)), new $Int64(x$11.$high - x$12.$high, x$11.$low - x$12.$low)); - l.err = err; - _tmp$4 = n; - _tmp$5 = err; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - n = (((x$13 = l.n, x$13.$low + ((x$13.$high >> 31) * 4294967296)) >> 0)); - l.n = new $Int64(0, 0); - _tuple$1 = $assertType(l.w, requestTooLarger, true); - res = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - $r = res.requestTooLarge(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - l.err = errors.New("http: request body too large"); - _tmp$6 = n; - _tmp$7 = l.err; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: maxBytesReader.ptr.prototype.Read, $c: true, $r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, _tuple$1, err, l, n, ok, p, res, x$10, x$11, x$12, x$13, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - maxBytesReader.prototype.Read = function(p) { return this.$val.Read(p); }; - maxBytesReader.ptr.prototype.Close = function() { - var {$24r, _r$1, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - l = this; - _r$1 = l.r.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: maxBytesReader.ptr.prototype.Close, $c: true, $r, $24r, _r$1, l, $s};return $f; - }; - maxBytesReader.prototype.Close = function() { return this.$val.Close(); }; - copyValues = function(dst, src) { - var _entry, _entry$1, _i, _key, _keys, _ref, dst, k, src, vs; - _ref = src; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vs = _entry.v; - _key = k; (dst || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $appendSlice((_entry$1 = dst[$String.keyFor(k)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil), vs) }; - _i++; - } - }; - parsePostForm = function(r) { - var {_r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, b, ct, e, err, maxFormSize, ok, r, reader, vs, x$5, $s, $r, $c} = $restore(this, {r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - vs = false; - err = $ifaceNil; - if ($interfaceIsEqual(r.Body, $ifaceNil)) { - err = errors.New("missing form body"); - $s = -1; return [vs, err]; - } - _r$1 = new Header(r.Header).Get("Content-Type"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ct = _r$1; - if (ct === "") { - ct = "application/octet-stream"; - } - _r$2 = mime.ParseMediaType(ct); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - ct = _tuple[0]; - err = _tuple[2]; - /* */ if (ct === "application/x-www-form-urlencoded") { $s = 4; continue; } - /* */ if (ct === "multipart/form-data") { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (ct === "application/x-www-form-urlencoded") { */ case 4: - reader = r.Body; - maxFormSize = new $Int64(2147483647, 4294967295); - _tuple$1 = $assertType(r.Body, ptrType$65, true); - ok = _tuple$1[1]; - if (!ok) { - maxFormSize = new $Int64(0, 10485760); - reader = io.LimitReader(r.Body, new $Int64(maxFormSize.$high + 0, maxFormSize.$low + 1)); - } - _r$3 = io.ReadAll(reader); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - b = _tuple$2[0]; - e = _tuple$2[1]; - if (!($interfaceIsEqual(e, $ifaceNil))) { - if ($interfaceIsEqual(err, $ifaceNil)) { - err = e; - } - /* break; */ $s = 3; continue; - } - if ((x$5 = (new $Int64(0, b.$length)), (x$5.$high > maxFormSize.$high || (x$5.$high === maxFormSize.$high && x$5.$low > maxFormSize.$low)))) { - err = errors.New("http: POST too large"); - $s = -1; return [vs, err]; - } - _r$4 = url.ParseQuery(($bytesToString(b))); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - vs = _tuple$3[0]; - e = _tuple$3[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - err = e; - } - $s = 6; continue; - /* } else if (ct === "multipart/form-data") { */ case 5: - /* } */ case 6: - case 3: - $s = -1; return [vs, err]; - /* */ } return; } var $f = {$blk: parsePostForm, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, _tuple$2, _tuple$3, b, ct, e, err, maxFormSize, ok, r, reader, vs, x$5, $s};return $f; - }; - Request.ptr.prototype.ParseForm = function() { - var {_r$1, _r$2, _tuple, _tuple$1, e, err, newValues, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - err = $ifaceNil; - /* */ if (r.PostForm === false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.PostForm === false) { */ case 1: - /* */ if (r.Method === "POST" || r.Method === "PUT" || r.Method === "PATCH") { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (r.Method === "POST" || r.Method === "PUT" || r.Method === "PATCH") { */ case 3: - _r$1 = parsePostForm(r); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - r.PostForm = _tuple[0]; - err = _tuple[1]; - /* } */ case 4: - if (r.PostForm === false) { - r.PostForm = {}; - } - /* } */ case 2: - /* */ if (r.Form === false) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (r.Form === false) { */ case 6: - if ($keys(r.PostForm).length > 0) { - r.Form = {}; - copyValues(r.Form, r.PostForm); - } - newValues = false; - /* */ if (!(r.URL === ptrType$17.nil)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(r.URL === ptrType$17.nil)) { */ case 8: - e = $ifaceNil; - _r$2 = url.ParseQuery(r.URL.RawQuery); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - newValues = _tuple$1[0]; - e = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - err = e; - } - /* } */ case 9: - if (newValues === false) { - newValues = {}; - } - if (r.Form === false) { - r.Form = newValues; - } else { - copyValues(r.Form, newValues); - } - /* } */ case 7: - $s = -1; return err; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.ParseForm, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, e, err, newValues, r, $s};return $f; - }; - Request.prototype.ParseForm = function() { return this.$val.ParseForm(); }; - Request.ptr.prototype.ParseMultipartForm = function(maxMemory) { - var {_entry, _entry$1, _entry$2, _i, _key, _key$1, _keys, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, err, f, k, maxMemory, mr, parseFormErr, r, v, $s, $r, $c} = $restore(this, {maxMemory}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (r.MultipartForm === multipartByReader) { - $s = -1; return errors.New("http: multipart handled by MultipartReader"); - } - parseFormErr = $ifaceNil; - /* */ if (r.Form === false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.Form === false) { */ case 1: - _r$1 = r.ParseForm(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - parseFormErr = _r$1; - /* } */ case 2: - if (!(r.MultipartForm === ptrType$31.nil)) { - $s = -1; return $ifaceNil; - } - _r$2 = r.multipartReader(false); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - mr = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - _r$3 = mr.ReadForm(maxMemory); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - f = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - if (r.PostForm === false) { - r.PostForm = {}; - } - _ref = f.Value; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - v = _entry.v; - _key = k; (r.Form || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $appendSlice((_entry$1 = r.Form[$String.keyFor(k)], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil), v) }; - _key$1 = k; (r.PostForm || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $appendSlice((_entry$2 = r.PostForm[$String.keyFor(k)], _entry$2 !== undefined ? _entry$2.v : sliceType$2.nil), v) }; - _i++; - } - r.MultipartForm = f; - $s = -1; return parseFormErr; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.ParseMultipartForm, $c: true, $r, _entry, _entry$1, _entry$2, _i, _key, _key$1, _keys, _r$1, _r$2, _r$3, _ref, _tuple, _tuple$1, err, f, k, maxMemory, mr, parseFormErr, r, v, $s};return $f; - }; - Request.prototype.ParseMultipartForm = function(maxMemory) { return this.$val.ParseMultipartForm(maxMemory); }; - Request.ptr.prototype.FormValue = function(key) { - var {_entry, _r$1, key, r, vs, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* */ if (r.Form === false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.Form === false) { */ case 1: - _r$1 = r.ParseMultipartForm(new $Int64(0, 33554432)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 2: - vs = (_entry = r.Form[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (vs.$length > 0) { - $s = -1; return (0 >= vs.$length ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + 0]); - } - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.FormValue, $c: true, $r, _entry, _r$1, key, r, vs, $s};return $f; - }; - Request.prototype.FormValue = function(key) { return this.$val.FormValue(key); }; - Request.ptr.prototype.PostFormValue = function(key) { - var {_entry, _r$1, key, r, vs, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - /* */ if (r.PostForm === false) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.PostForm === false) { */ case 1: - _r$1 = r.ParseMultipartForm(new $Int64(0, 33554432)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 2: - vs = (_entry = r.PostForm[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (vs.$length > 0) { - $s = -1; return (0 >= vs.$length ? ($throwRuntimeError("index out of range"), undefined) : vs.$array[vs.$offset + 0]); - } - $s = -1; return ""; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.PostFormValue, $c: true, $r, _entry, _r$1, key, r, vs, $s};return $f; - }; - Request.prototype.PostFormValue = function(key) { return this.$val.PostFormValue(key); }; - Request.ptr.prototype.FormFile = function(key) { - var {_entry, _r$1, _r$2, _tuple, err, err$1, f, fhs, key, r, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if (r.MultipartForm === multipartByReader) { - $s = -1; return [$ifaceNil, ptrType$66.nil, errors.New("http: multipart handled by MultipartReader")]; - } - /* */ if (r.MultipartForm === ptrType$31.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (r.MultipartForm === ptrType$31.nil) { */ case 1: - _r$1 = r.ParseMultipartForm(new $Int64(0, 33554432)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, ptrType$66.nil, err]; - } - /* } */ case 2: - /* */ if (!(r.MultipartForm === ptrType$31.nil) && !(r.MultipartForm.File === false)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(r.MultipartForm === ptrType$31.nil) && !(r.MultipartForm.File === false)) { */ case 4: - fhs = (_entry = r.MultipartForm.File[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$20.nil); - /* */ if (fhs.$length > 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (fhs.$length > 0) { */ case 6: - _r$2 = (0 >= fhs.$length ? ($throwRuntimeError("index out of range"), undefined) : fhs.$array[fhs.$offset + 0]).Open(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - f = _tuple[0]; - err$1 = _tuple[1]; - $s = -1; return [f, (0 >= fhs.$length ? ($throwRuntimeError("index out of range"), undefined) : fhs.$array[fhs.$offset + 0]), err$1]; - /* } */ case 7: - /* } */ case 5: - $s = -1; return [$ifaceNil, ptrType$66.nil, $pkg.ErrMissingFile]; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.FormFile, $c: true, $r, _entry, _r$1, _r$2, _tuple, err, err$1, f, fhs, key, r, $s};return $f; - }; - Request.prototype.FormFile = function(key) { return this.$val.FormFile(key); }; - Request.ptr.prototype.expectsContinue = function() { - var r; - r = this; - return hasToken(new Header(r.Header).get("Expect"), "100-continue"); - }; - Request.prototype.expectsContinue = function() { return this.$val.expectsContinue(); }; - Request.ptr.prototype.wantsHttp10KeepAlive = function() { - var r; - r = this; - if (!((r.ProtoMajor === 1)) || !((r.ProtoMinor === 0))) { - return false; - } - return hasToken(new Header(r.Header).get("Connection"), "keep-alive"); - }; - Request.prototype.wantsHttp10KeepAlive = function() { return this.$val.wantsHttp10KeepAlive(); }; - Request.ptr.prototype.wantsClose = function() { - var r; - r = this; - if (r.Close) { - return true; - } - return hasToken(new Header(r.Header).get("Connection"), "close"); - }; - Request.prototype.wantsClose = function() { return this.$val.wantsClose(); }; - Request.ptr.prototype.closeBody = function() { - var {$24r, _r$1, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - if ($interfaceIsEqual(r.Body, $ifaceNil)) { - $s = -1; return $ifaceNil; - } - _r$1 = r.Body.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.closeBody, $c: true, $r, $24r, _r$1, r, $s};return $f; - }; - Request.prototype.closeBody = function() { return this.$val.closeBody(); }; - Request.ptr.prototype.isReplayable = function() { - var _1, r; - r = this; - if ($interfaceIsEqual(r.Body, $ifaceNil) || $interfaceIsEqual(r.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody)) || !(r.GetBody === $throwNilPointerError)) { - _1 = valueOrDefault(r.Method, "GET"); - if (_1 === ("GET") || _1 === ("HEAD") || _1 === ("OPTIONS") || _1 === ("TRACE")) { - return true; - } - if (new Header(r.Header).has("Idempotency-Key") || new Header(r.Header).has("X-Idempotency-Key")) { - return true; - } - } - return false; - }; - Request.prototype.isReplayable = function() { return this.$val.isReplayable(); }; - Request.ptr.prototype.outgoingLength = function() { - var r, x$5; - r = this; - if ($interfaceIsEqual(r.Body, $ifaceNil) || $interfaceIsEqual(r.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { - return new $Int64(0, 0); - } - if (!((x$5 = r.ContentLength, (x$5.$high === 0 && x$5.$low === 0)))) { - return r.ContentLength; - } - return new $Int64(-1, 4294967295); - }; - Request.prototype.outgoingLength = function() { return this.$val.outgoingLength(); }; - requestMethodUsuallyLacksBody = function(method) { - var _1, method; - _1 = method; - if (_1 === ("GET") || _1 === ("HEAD") || _1 === ("DELETE") || _1 === ("OPTIONS") || _1 === ("PROPFIND") || _1 === ("SEARCH")) { - return true; - } - return false; - }; - Request.ptr.prototype.requiresHTTP1 = function() { - var {$24r, _r$1, _r$2, _r$3, _r$4, _v, r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - r = this; - _r$1 = new Header(r.Header).Get("Connection"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = hasToken(_r$1, "upgrade"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - if (!(_r$2)) { _v = false; $s = 1; continue s; } - _r$3 = new Header(r.Header).Get("Upgrade"); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = ascii.EqualFold(_r$3, "websocket"); /* */ $s = 5; case 5: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4; case 1: - $24r = _v; - $s = 6; case 6: return $24r; - /* */ } return; } var $f = {$blk: Request.ptr.prototype.requiresHTTP1, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _v, r, $s};return $f; - }; - Request.prototype.requiresHTTP1 = function() { return this.$val.requiresHTTP1(); }; - contextKey.ptr.prototype.String = function() { - var k; - k = this; - return "net/http context value " + k.name; - }; - contextKey.prototype.String = function() { return this.$val.String(); }; - hasPort = function(s) { - var s; - return strings.LastIndex(s, ":") > strings.LastIndex(s, "]"); - }; - isNotToken = function(r) { - var r; - return !httpguts.IsTokenRune(r); - }; - stringContainsCTLByte = function(s) { - var b, i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - b = s.charCodeAt(i); - if (b < 32 || (b === 127)) { - return true; - } - i = i + (1) >> 0; - } - return false; - }; - hexEscapeNonASCII = function(s) { - var b, i, i$1, newLen, s; - newLen = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) >= 128) { - newLen = newLen + (3) >> 0; - } else { - newLen = newLen + (1) >> 0; - } - i = i + (1) >> 0; - } - if (newLen === s.length) { - return s; - } - b = $makeSlice(sliceType$3, 0, newLen); - i$1 = 0; - while (true) { - if (!(i$1 < s.length)) { break; } - if (s.charCodeAt(i$1) >= 128) { - b = $append(b, 37); - b = strconv.AppendInt(b, (new $Int64(0, s.charCodeAt(i$1))), 16); - } else { - b = $append(b, s.charCodeAt(i$1)); - } - i$1 = i$1 + (1) >> 0; - } - return ($bytesToString(b)); - }; - noBody.ptr.prototype.Read = function(param) { - var param; - return [0, io.EOF]; - }; - noBody.prototype.Read = function(param) { return this.$val.Read(param); }; - noBody.ptr.prototype.Close = function() { - return $ifaceNil; - }; - noBody.prototype.Close = function() { return this.$val.Close(); }; - noBody.ptr.prototype.WriteTo = function(param) { - var param; - return [new $Int64(0, 0), $ifaceNil]; - }; - noBody.prototype.WriteTo = function(param) { return this.$val.WriteTo(param); }; - Header.prototype.Add = function(key, value) { - var {h, key, value, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - $r = new textproto.MIMEHeader((h)).Add(key, value); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Header.prototype.Add, $c: true, $r, h, key, value, $s};return $f; - }; - $ptrType(Header).prototype.Add = function(key, value) { return new Header(this.$get()).Add(key, value); }; - Header.prototype.Set = function(key, value) { - var {h, key, value, $s, $r, $c} = $restore(this, {key, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - $r = new textproto.MIMEHeader((h)).Set(key, value); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Header.prototype.Set, $c: true, $r, h, key, value, $s};return $f; - }; - $ptrType(Header).prototype.Set = function(key, value) { return new Header(this.$get()).Set(key, value); }; - Header.prototype.Get = function(key) { - var {$24r, _r$1, h, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r$1 = new textproto.MIMEHeader((h)).Get(key); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Header.prototype.Get, $c: true, $r, $24r, _r$1, h, key, $s};return $f; - }; - $ptrType(Header).prototype.Get = function(key) { return new Header(this.$get()).Get(key); }; - Header.prototype.Values = function(key) { - var {$24r, _r$1, h, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r$1 = new textproto.MIMEHeader((h)).Values(key); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Header.prototype.Values, $c: true, $r, $24r, _r$1, h, key, $s};return $f; - }; - $ptrType(Header).prototype.Values = function(key) { return new Header(this.$get()).Values(key); }; - Header.prototype.get = function(key) { - var _entry, h, key, v; - h = this.$val; - v = (_entry = h[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (v.$length > 0) { - return (0 >= v.$length ? ($throwRuntimeError("index out of range"), undefined) : v.$array[v.$offset + 0]); - } - return ""; - }; - $ptrType(Header).prototype.get = function(key) { return new Header(this.$get()).get(key); }; - Header.prototype.has = function(key) { - var _entry, _tuple, h, key, ok; - h = this.$val; - _tuple = (_entry = h[$String.keyFor(key)], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - ok = _tuple[1]; - return ok; - }; - $ptrType(Header).prototype.has = function(key) { return new Header(this.$get()).has(key); }; - Header.prototype.Del = function(key) { - var {h, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - $r = new textproto.MIMEHeader((h)).Del(key); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: Header.prototype.Del, $c: true, $r, h, key, $s};return $f; - }; - $ptrType(Header).prototype.Del = function(key) { return new Header(this.$get()).Del(key); }; - Header.prototype.Write = function(w) { - var {$24r, _r$1, h, w, $s, $r, $c} = $restore(this, {w}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r$1 = new Header(h).write(w, ptrType$19.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Header.prototype.Write, $c: true, $r, $24r, _r$1, h, w, $s};return $f; - }; - $ptrType(Header).prototype.Write = function(w) { return new Header(this.$get()).Write(w); }; - Header.prototype.write = function(w, trace) { - var {$24r, _r$1, h, trace, w, $s, $r, $c} = $restore(this, {w, trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r$1 = new Header(h).writeSubset(w, false, trace); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Header.prototype.write, $c: true, $r, $24r, _r$1, h, trace, w, $s};return $f; - }; - $ptrType(Header).prototype.write = function(w, trace) { return new Header(this.$get()).write(w, trace); }; - Header.prototype.Clone = function() { - var _entry, _entry$1, _i, _i$1, _key, _key$1, _keys, _keys$1, _ref, _ref$1, h, h2, k, n, nv, sv, vv, vv$1, x$5; - h = this.$val; - if (h === false) { - return false; - } - nv = 0; - _ref = h; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - vv = _entry.v; - nv = nv + (vv.$length) >> 0; - _i++; - } - sv = $makeSlice(sliceType$2, nv); - h2 = (x$5 = $keys(h).length, ((x$5 < 0 || x$5 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref$1 = h; - _i$1 = 0; - _keys$1 = $keys(_ref$1); - while (true) { - if (!(_i$1 < _keys$1.length)) { break; } - _entry$1 = _ref$1[_keys$1[_i$1]]; - if (_entry$1 === undefined) { - _i$1++; - continue; - } - k = _entry$1.k; - vv$1 = _entry$1.v; - if (vv$1 === sliceType$2.nil) { - _key = k; (h2 || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$2.nil }; - _i$1++; - continue; - } - n = $copySlice(sv, vv$1); - _key$1 = k; (h2 || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $subslice(sv, 0, n, n) }; - sv = $subslice(sv, n); - _i$1++; - } - return h2; - }; - $ptrType(Header).prototype.Clone = function() { return new Header(this.$get()).Clone(); }; - stringWriter.ptr.prototype.WriteString = function(s) { - var {$24r, _r$1, _tuple, err, n, s, w, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.w.Write((new sliceType$3($stringToBytes(s)))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: stringWriter.ptr.prototype.WriteString, $c: true, $r, $24r, _r$1, _tuple, err, n, s, w, $s};return $f; - }; - stringWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - headerSorter.ptr.prototype.Len = function() { - var s; - s = this; - return s.kvs.$length; - }; - headerSorter.prototype.Len = function() { return this.$val.Len(); }; - headerSorter.ptr.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, s, x$5, x$6, x$7, x$8; - s = this; - _tmp = $clone((x$5 = s.kvs, ((j < 0 || j >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + j])), keyValues); - _tmp$1 = $clone((x$6 = s.kvs, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])), keyValues); - keyValues.copy((x$7 = s.kvs, ((i < 0 || i >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + i])), _tmp); - keyValues.copy((x$8 = s.kvs, ((j < 0 || j >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + j])), _tmp$1); - }; - headerSorter.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; - headerSorter.ptr.prototype.Less = function(i, j) { - var i, j, s, x$5, x$6; - s = this; - return (x$5 = s.kvs, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])).key < (x$6 = s.kvs, ((j < 0 || j >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + j])).key; - }; - headerSorter.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; - Header.prototype.sortedKeyValues = function(exclude) { - var {_entry, _entry$1, _i, _keys, _r$1, _ref, _tmp, _tmp$1, exclude, h, hs, k, kvs, vv, $s, $r, $c} = $restore(this, {exclude}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - kvs = sliceType$6.nil; - hs = ptrType$67.nil; - h = this.$val; - _r$1 = headerSorterPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - hs = $assertType(_r$1, ptrType$67); - if (hs.kvs.$capacity < $keys(h).length) { - hs.kvs = $makeSlice(sliceType$6, 0, $keys(h).length); - } - kvs = $subslice(hs.kvs, 0, 0); - _ref = h; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - if (!(_entry$1 = exclude[$String.keyFor(k)], _entry$1 !== undefined ? _entry$1.v : false)) { - kvs = $append(kvs, new keyValues.ptr(k, vv)); - } - _i++; - } - hs.kvs = kvs; - $r = sort.Sort(hs); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = kvs; - _tmp$1 = hs; - kvs = _tmp; - hs = _tmp$1; - $s = -1; return [kvs, hs]; - /* */ } return; } var $f = {$blk: Header.prototype.sortedKeyValues, $c: true, $r, _entry, _entry$1, _i, _keys, _r$1, _ref, _tmp, _tmp$1, exclude, h, hs, k, kvs, vv, $s};return $f; - }; - $ptrType(Header).prototype.sortedKeyValues = function(exclude) { return new Header(this.$get()).sortedKeyValues(exclude); }; - Header.prototype.WriteSubset = function(w, exclude) { - var {$24r, _r$1, exclude, h, w, $s, $r, $c} = $restore(this, {w, exclude}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _r$1 = new Header(h).writeSubset(w, exclude, ptrType$19.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Header.prototype.WriteSubset, $c: true, $r, $24r, _r$1, exclude, h, w, $s};return $f; - }; - $ptrType(Header).prototype.WriteSubset = function(w, exclude) { return new Header(this.$get()).WriteSubset(w, exclude); }; - Header.prototype.writeSubset = function(w, exclude, trace) { - var {_i, _i$1, _i$2, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, err, exclude, formattedVals, h, kv, kvs, ok, s, sorter, trace, v, w, ws, x$5, $s, $r, $c} = $restore(this, {w, exclude, trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this.$val; - _tuple = $assertType(w, io.StringWriter, true); - ws = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - ws = (x$5 = new stringWriter.ptr(w), new x$5.constructor.elem(x$5)); - } - _r$1 = new Header(h).sortedKeyValues(exclude); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - kvs = _tuple$1[0]; - sorter = _tuple$1[1]; - formattedVals = sliceType$2.nil; - _ref = kvs; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - kv = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), keyValues); - if (!httpguts.ValidHeaderFieldName(kv.key)) { - _i++; - /* continue; */ $s = 2; continue; - } - _ref$1 = kv.values; - _i$1 = 0; - /* while (true) { */ case 4: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$2 = headerNewlineToSpace.Replace(v); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v = _r$2; - v = textproto.TrimString(v); - _ref$2 = new sliceType$2([kv.key, ": ", v, "\r\n"]); - _i$2 = 0; - /* while (true) { */ case 7: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 8; continue; } - s = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - _r$3 = ws.WriteString(s); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - headerSorterPool.Put(sorter); - $s = -1; return err; - } - _i$2++; - $s = 7; continue; - case 8: - if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { - formattedVals = $append(formattedVals, v); - } - _i$1++; - $s = 4; continue; - case 5: - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 10: - $r = trace.WroteHeaderField(kv.key, formattedVals); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - formattedVals = sliceType$2.nil; - /* } */ case 11: - _i++; - $s = 2; continue; - case 3: - headerSorterPool.Put(sorter); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Header.prototype.writeSubset, $c: true, $r, _i, _i$1, _i$2, _r$1, _r$2, _r$3, _ref, _ref$1, _ref$2, _tuple, _tuple$1, _tuple$2, err, exclude, formattedVals, h, kv, kvs, ok, s, sorter, trace, v, w, ws, x$5, $s};return $f; - }; - $ptrType(Header).prototype.writeSubset = function(w, exclude, trace) { return new Header(this.$get()).writeSubset(w, exclude, trace); }; - CanonicalHeaderKey = function(s) { - var {$24r, _r$1, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = textproto.CanonicalMIMEHeaderKey(s); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: CanonicalHeaderKey, $c: true, $r, $24r, _r$1, s, $s};return $f; - }; - $pkg.CanonicalHeaderKey = CanonicalHeaderKey; - hasToken = function(v, token) { - var b, endPos, sp, token, v; - if (token.length > v.length || token === "") { - return false; - } - if (v === token) { - return true; - } - sp = 0; - while (true) { - if (!(sp <= (v.length - token.length >> 0))) { break; } - b = v.charCodeAt(sp); - if (!((b === token.charCodeAt(0))) && !((((b | 32) >>> 0) === token.charCodeAt(0)))) { - sp = sp + (1) >> 0; - continue; - } - if (sp > 0 && !isTokenBoundary(v.charCodeAt((sp - 1 >> 0)))) { - sp = sp + (1) >> 0; - continue; - } - endPos = sp + token.length >> 0; - if (!((endPos === v.length)) && !isTokenBoundary(v.charCodeAt(endPos))) { - sp = sp + (1) >> 0; - continue; - } - if (ascii.EqualFold($substring(v, sp, (sp + token.length >> 0)), token)) { - return true; - } - sp = sp + (1) >> 0; - } - return false; - }; - isTokenBoundary = function(b) { - var b; - return (b === 32) || (b === 44) || (b === 9); - }; - http2asciiEqualFold = function(s, t) { - var i, s, t; - if (!((s.length === t.length))) { - return false; - } - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (!((http2lower(s.charCodeAt(i)) === http2lower(t.charCodeAt(i))))) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - http2lower = function(b) { - var b; - if (65 <= b && b <= 90) { - return b + 32 << 24 >>> 24; - } - return b; - }; - http2isASCIIPrint = function(s) { - var i, s; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - if (s.charCodeAt(i) < 32 || s.charCodeAt(i) > 126) { - return false; - } - i = i + (1) >> 0; - } - return true; - }; - http2asciiToLower = function(s) { - var {$24r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, lower, ok, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lower = ""; - ok = false; - if (!http2isASCIIPrint(s)) { - _tmp = ""; - _tmp$1 = false; - lower = _tmp; - ok = _tmp$1; - $s = -1; return [lower, ok]; - } - _r$1 = strings.ToLower(s); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tmp$2 = _r$1; - _tmp$3 = true; - lower = _tmp$2; - ok = _tmp$3; - $24r = [lower, ok]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2asciiToLower, $c: true, $r, $24r, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, lower, ok, s, $s};return $f; - }; - http2isBadCipher = function(cipher) { - var _1, cipher; - _1 = cipher; - if ((_1 === (0)) || (_1 === (1)) || (_1 === (2)) || (_1 === (3)) || (_1 === (4)) || (_1 === (5)) || (_1 === (6)) || (_1 === (7)) || (_1 === (8)) || (_1 === (9)) || (_1 === (10)) || (_1 === (11)) || (_1 === (12)) || (_1 === (13)) || (_1 === (14)) || (_1 === (15)) || (_1 === (16)) || (_1 === (17)) || (_1 === (18)) || (_1 === (19)) || (_1 === (20)) || (_1 === (21)) || (_1 === (22)) || (_1 === (23)) || (_1 === (24)) || (_1 === (25)) || (_1 === (26)) || (_1 === (27)) || (_1 === (30)) || (_1 === (31)) || (_1 === (32)) || (_1 === (33)) || (_1 === (34)) || (_1 === (35)) || (_1 === (36)) || (_1 === (37)) || (_1 === (38)) || (_1 === (39)) || (_1 === (40)) || (_1 === (41)) || (_1 === (42)) || (_1 === (43)) || (_1 === (44)) || (_1 === (45)) || (_1 === (46)) || (_1 === (47)) || (_1 === (48)) || (_1 === (49)) || (_1 === (50)) || (_1 === (51)) || (_1 === (52)) || (_1 === (53)) || (_1 === (54)) || (_1 === (55)) || (_1 === (56)) || (_1 === (57)) || (_1 === (58)) || (_1 === (59)) || (_1 === (60)) || (_1 === (61)) || (_1 === (62)) || (_1 === (63)) || (_1 === (64)) || (_1 === (65)) || (_1 === (66)) || (_1 === (67)) || (_1 === (68)) || (_1 === (69)) || (_1 === (70)) || (_1 === (103)) || (_1 === (104)) || (_1 === (105)) || (_1 === (106)) || (_1 === (107)) || (_1 === (108)) || (_1 === (109)) || (_1 === (132)) || (_1 === (133)) || (_1 === (134)) || (_1 === (135)) || (_1 === (136)) || (_1 === (137)) || (_1 === (138)) || (_1 === (139)) || (_1 === (140)) || (_1 === (141)) || (_1 === (142)) || (_1 === (143)) || (_1 === (144)) || (_1 === (145)) || (_1 === (146)) || (_1 === (147)) || (_1 === (148)) || (_1 === (149)) || (_1 === (150)) || (_1 === (151)) || (_1 === (152)) || (_1 === (153)) || (_1 === (154)) || (_1 === (155)) || (_1 === (156)) || (_1 === (157)) || (_1 === (160)) || (_1 === (161)) || (_1 === (164)) || (_1 === (165)) || (_1 === (166)) || (_1 === (167)) || (_1 === (168)) || (_1 === (169)) || (_1 === (172)) || (_1 === (173)) || (_1 === (174)) || (_1 === (175)) || (_1 === (176)) || (_1 === (177)) || (_1 === (178)) || (_1 === (179)) || (_1 === (180)) || (_1 === (181)) || (_1 === (182)) || (_1 === (183)) || (_1 === (184)) || (_1 === (185)) || (_1 === (186)) || (_1 === (187)) || (_1 === (188)) || (_1 === (189)) || (_1 === (190)) || (_1 === (191)) || (_1 === (192)) || (_1 === (193)) || (_1 === (194)) || (_1 === (195)) || (_1 === (196)) || (_1 === (197)) || (_1 === (255)) || (_1 === (49153)) || (_1 === (49154)) || (_1 === (49155)) || (_1 === (49156)) || (_1 === (49157)) || (_1 === (49158)) || (_1 === (49159)) || (_1 === (49160)) || (_1 === (49161)) || (_1 === (49162)) || (_1 === (49163)) || (_1 === (49164)) || (_1 === (49165)) || (_1 === (49166)) || (_1 === (49167)) || (_1 === (49168)) || (_1 === (49169)) || (_1 === (49170)) || (_1 === (49171)) || (_1 === (49172)) || (_1 === (49173)) || (_1 === (49174)) || (_1 === (49175)) || (_1 === (49176)) || (_1 === (49177)) || (_1 === (49178)) || (_1 === (49179)) || (_1 === (49180)) || (_1 === (49181)) || (_1 === (49182)) || (_1 === (49183)) || (_1 === (49184)) || (_1 === (49185)) || (_1 === (49186)) || (_1 === (49187)) || (_1 === (49188)) || (_1 === (49189)) || (_1 === (49190)) || (_1 === (49191)) || (_1 === (49192)) || (_1 === (49193)) || (_1 === (49194)) || (_1 === (49197)) || (_1 === (49198)) || (_1 === (49201)) || (_1 === (49202)) || (_1 === (49203)) || (_1 === (49204)) || (_1 === (49205)) || (_1 === (49206)) || (_1 === (49207)) || (_1 === (49208)) || (_1 === (49209)) || (_1 === (49210)) || (_1 === (49211)) || (_1 === (49212)) || (_1 === (49213)) || (_1 === (49214)) || (_1 === (49215)) || (_1 === (49216)) || (_1 === (49217)) || (_1 === (49218)) || (_1 === (49219)) || (_1 === (49220)) || (_1 === (49221)) || (_1 === (49222)) || (_1 === (49223)) || (_1 === (49224)) || (_1 === (49225)) || (_1 === (49226)) || (_1 === (49227)) || (_1 === (49228)) || (_1 === (49229)) || (_1 === (49230)) || (_1 === (49231)) || (_1 === (49232)) || (_1 === (49233)) || (_1 === (49236)) || (_1 === (49237)) || (_1 === (49240)) || (_1 === (49241)) || (_1 === (49242)) || (_1 === (49243)) || (_1 === (49246)) || (_1 === (49247)) || (_1 === (49250)) || (_1 === (49251)) || (_1 === (49252)) || (_1 === (49253)) || (_1 === (49254)) || (_1 === (49255)) || (_1 === (49256)) || (_1 === (49257)) || (_1 === (49258)) || (_1 === (49259)) || (_1 === (49262)) || (_1 === (49263)) || (_1 === (49264)) || (_1 === (49265)) || (_1 === (49266)) || (_1 === (49267)) || (_1 === (49268)) || (_1 === (49269)) || (_1 === (49270)) || (_1 === (49271)) || (_1 === (49272)) || (_1 === (49273)) || (_1 === (49274)) || (_1 === (49275)) || (_1 === (49278)) || (_1 === (49279)) || (_1 === (49282)) || (_1 === (49283)) || (_1 === (49284)) || (_1 === (49285)) || (_1 === (49288)) || (_1 === (49289)) || (_1 === (49292)) || (_1 === (49293)) || (_1 === (49294)) || (_1 === (49295)) || (_1 === (49298)) || (_1 === (49299)) || (_1 === (49300)) || (_1 === (49301)) || (_1 === (49302)) || (_1 === (49303)) || (_1 === (49304)) || (_1 === (49305)) || (_1 === (49306)) || (_1 === (49307)) || (_1 === (49308)) || (_1 === (49309)) || (_1 === (49312)) || (_1 === (49313)) || (_1 === (49316)) || (_1 === (49317)) || (_1 === (49320)) || (_1 === (49321))) { - return true; - } else { - return false; - } - }; - http2clientConnPool.ptr.prototype.GetClientConn = function(req, addr) { - var {$24r, _r$1, addr, p, req, $s, $r, $c} = $restore(this, {req, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$1 = p.getClientConn(req, addr, true); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2clientConnPool.ptr.prototype.GetClientConn, $c: true, $r, $24r, _r$1, addr, p, req, $s};return $f; - }; - http2clientConnPool.prototype.GetClientConn = function(req, addr) { return this.$val.GetClientConn(req, addr); }; - http2clientConnPool.ptr.prototype.getClientConn = function(req, addr, dialOnMiss) { - var {_entry, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tuple, addr, call, cc, cc$1, cc$2, dialOnMiss, err, err$1, p, req, $s, $r, $c} = $restore(this, {req, addr, dialOnMiss}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - /* */ if (http2isConnectionCloseRequest(req) && dialOnMiss) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (http2isConnectionCloseRequest(req) && dialOnMiss) { */ case 1: - $r = http2traceGetConn(req, addr); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = p.t.dialClientConn(req.Context(), addr, true); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cc = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$68.nil, err]; - } - $s = -1; return [cc, $ifaceNil]; - /* } */ case 2: - /* while (true) { */ case 5: - $r = p.mu.Lock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = (_entry = p.conns[$String.keyFor(addr)], _entry !== undefined ? _entry.v : sliceType$21.nil); - _i = 0; - /* while (true) { */ case 8: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 9; continue; } - cc$1 = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$2 = cc$1.ReserveNewRequest(); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_r$2) { */ case 10: - /* */ if (!cc$1.getConnCalled) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!cc$1.getConnCalled) { */ case 13: - $r = http2traceGetConn(req, addr); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 14: - cc$1.getConnCalled = false; - $r = p.mu.Unlock(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [cc$1, $ifaceNil]; - /* } */ case 11: - _i++; - $s = 8; continue; - case 9: - /* */ if (!dialOnMiss) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!dialOnMiss) { */ case 17: - $r = p.mu.Unlock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ptrType$68.nil, http2ErrNoCachedConn]; - /* } */ case 18: - $r = http2traceGetConn(req, addr); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - call = p.getStartDialLocked(req.Context(), addr); - $r = p.mu.Unlock(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$3 = $recv(call.done); /* */ $s = 22; case 22: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3[0]; - _r$4 = http2shouldRetryDial(call, req); /* */ $s = 25; case 25: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (_r$4) { */ case 23: - /* continue; */ $s = 5; continue; - /* } */ case 24: - _tmp = call.res; - _tmp$1 = call.err; - cc$2 = _tmp; - err$1 = _tmp$1; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$68.nil, err$1]; - } - _r$5 = cc$2.ReserveNewRequest(); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (_r$5) { */ case 26: - $s = -1; return [cc$2, $ifaceNil]; - /* } */ case 27: - $s = 5; continue; - case 6: - $s = -1; return [ptrType$68.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2clientConnPool.ptr.prototype.getClientConn, $c: true, $r, _entry, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tmp, _tmp$1, _tuple, addr, call, cc, cc$1, cc$2, dialOnMiss, err, err$1, p, req, $s};return $f; - }; - http2clientConnPool.prototype.getClientConn = function(req, addr, dialOnMiss) { return this.$val.getClientConn(req, addr, dialOnMiss); }; - http2clientConnPool.ptr.prototype.getStartDialLocked = function(ctx, addr) { - var _entry, _key, _tuple, addr, call, call$1, ctx, ok, p; - p = this; - _tuple = (_entry = p.dialing[$String.keyFor(addr)], _entry !== undefined ? [_entry.v, true] : [ptrType$69.nil, false]); - call = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return call; - } - call$1 = new http2dialCall.ptr(arrayType.zero(), p, ctx, new $Chan(structType, 0), ptrType$68.nil, $ifaceNil); - if (p.dialing === false) { - p.dialing = {}; - } - _key = addr; (p.dialing || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: call$1 }; - $go($methodVal(call$1, "dial"), [call$1.ctx, addr]); - return call$1; - }; - http2clientConnPool.prototype.getStartDialLocked = function(ctx, addr) { return this.$val.getStartDialLocked(ctx, addr); }; - http2dialCall.ptr.prototype.dial = function(ctx, addr) { - var {_r$1, _tuple, addr, c, ctx, $s, $r, $c} = $restore(this, {ctx, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = c.p.t.dialClientConn(ctx, addr, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - c.res = _tuple[0]; - c.err = _tuple[1]; - $close(c.done); - $r = c.p.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - delete c.p.dialing[$String.keyFor(addr)]; - if ($interfaceIsEqual(c.err, $ifaceNil)) { - c.p.addConnLocked(addr, c.res); - } - $r = c.p.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2dialCall.ptr.prototype.dial, $c: true, $r, _r$1, _tuple, addr, c, ctx, $s};return $f; - }; - http2dialCall.prototype.dial = function(ctx, addr) { return this.$val.dial(ctx, addr); }; - http2clientConnPool.ptr.prototype.addConnIfNeeded = function(key, t, c) { - var {_entry, _entry$1, _i, _key, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, call, cc, dup, err, key, p, t, used, $s, $r, $c} = $restore(this, {key, t, c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - used = false; - err = $ifaceNil; - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = (_entry = p.conns[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$21.nil); - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - cc = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = cc.CanTakeNewRequest(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_r$1) { */ case 4: - $r = p.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = false; - _tmp$1 = $ifaceNil; - used = _tmp; - err = _tmp$1; - $s = -1; return [used, err]; - /* } */ case 5: - _i++; - $s = 2; continue; - case 3: - _tuple = (_entry$1 = p.addConnCalls[$String.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [ptrType$70.nil, false]); - call = _tuple[0]; - dup = _tuple[1]; - /* */ if (!dup) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!dup) { */ case 8: - if (p.addConnCalls === false) { - p.addConnCalls = {}; - } - call = new http2addConnCall.ptr(arrayType.zero(), p, new $Chan(structType, 0), $ifaceNil); - _key = key; (p.addConnCalls || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: call }; - $go($methodVal(call, "run"), [t, key, c]); - /* } */ case 9: - $r = p.mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = $recv(call.done); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2[0]; - if (!($interfaceIsEqual(call.err, $ifaceNil))) { - _tmp$2 = false; - _tmp$3 = call.err; - used = _tmp$2; - err = _tmp$3; - $s = -1; return [used, err]; - } - _tmp$4 = !dup; - _tmp$5 = $ifaceNil; - used = _tmp$4; - err = _tmp$5; - $s = -1; return [used, err]; - /* */ } return; } var $f = {$blk: http2clientConnPool.ptr.prototype.addConnIfNeeded, $c: true, $r, _entry, _entry$1, _i, _key, _r$1, _r$2, _ref, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, c, call, cc, dup, err, key, p, t, used, $s};return $f; - }; - http2clientConnPool.prototype.addConnIfNeeded = function(key, t, c) { return this.$val.addConnIfNeeded(key, t, c); }; - http2addConnCall.ptr.prototype.run = function(t, key, tc) { - var {_r$1, _tuple, c, cc, err, key, p, t, tc, $s, $r, $c} = $restore(this, {t, key, tc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - _r$1 = t.NewClientConn(tc); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cc = _tuple[0]; - err = _tuple[1]; - p = c.p; - $r = p.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!($interfaceIsEqual(err, $ifaceNil))) { - c.err = err; - } else { - cc.getConnCalled = true; - p.addConnLocked(key, cc); - } - delete p.addConnCalls[$String.keyFor(key)]; - $r = p.mu.Unlock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $close(c.done); - $s = -1; return; - /* */ } return; } var $f = {$blk: http2addConnCall.ptr.prototype.run, $c: true, $r, _r$1, _tuple, c, cc, err, key, p, t, tc, $s};return $f; - }; - http2addConnCall.prototype.run = function(t, key, tc) { return this.$val.run(t, key, tc); }; - http2clientConnPool.ptr.prototype.addConnLocked = function(key, cc) { - var _entry, _entry$1, _entry$2, _i, _key, _key$1, _ref, cc, key, p, v; - p = this; - _ref = (_entry = p.conns[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$21.nil); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v === cc) { - return; - } - _i++; - } - if (p.conns === false) { - p.conns = {}; - } - if (p.keys === false) { - p.keys = {}; - } - _key = key; (p.conns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry$1 = p.conns[$String.keyFor(key)], _entry$1 !== undefined ? _entry$1.v : sliceType$21.nil), cc) }; - _key$1 = cc; (p.keys || $throwRuntimeError("assignment to entry in nil map"))[ptrType$68.keyFor(_key$1)] = { k: _key$1, v: $append((_entry$2 = p.keys[ptrType$68.keyFor(cc)], _entry$2 !== undefined ? _entry$2.v : sliceType$2.nil), key) }; - }; - http2clientConnPool.prototype.addConnLocked = function(key, cc) { return this.$val.addConnLocked(key, cc); }; - http2clientConnPool.ptr.prototype.MarkDead = function(cc) { - var {_entry, _entry$1, _i, _key, _ref, _tuple, cc, key, newList, ok, p, vv, $s, $deferred, $r, $c} = $restore(this, {cc}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - _ref = (_entry = p.keys[ptrType$68.keyFor(cc)], _entry !== undefined ? _entry.v : sliceType$2.nil); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - key = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _tuple = (_entry$1 = p.conns[$String.keyFor(key)], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$21.nil, false]); - vv = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - _i++; - continue; - } - newList = http2filterOutClientConn(vv, cc); - if (newList.$length > 0) { - _key = key; (p.conns || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: newList }; - } else { - delete p.conns[$String.keyFor(key)]; - } - _i++; - } - delete p.keys[ptrType$68.keyFor(cc)]; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnPool.ptr.prototype.MarkDead, $c: true, $r, _entry, _entry$1, _i, _key, _ref, _tuple, cc, key, newList, ok, p, vv, $s, $deferred};return $f; } } - }; - http2clientConnPool.prototype.MarkDead = function(cc) { return this.$val.MarkDead(cc); }; - http2clientConnPool.ptr.prototype.closeIdleConnections = function() { - var {_entry, _i, _i$1, _keys, _ref, _ref$1, cc, p, vv, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - _ref = p.conns; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - vv = _entry.v; - _ref$1 = vv; - _i$1 = 0; - /* while (true) { */ case 4: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 5; continue; } - cc = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - $r = cc.closeIfIdle(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 4; continue; - case 5: - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnPool.ptr.prototype.closeIdleConnections, $c: true, $r, _entry, _i, _i$1, _keys, _ref, _ref$1, cc, p, vv, $s, $deferred};return $f; } } - }; - http2clientConnPool.prototype.closeIdleConnections = function() { return this.$val.closeIdleConnections(); }; - http2filterOutClientConn = function(in$1, exclude) { - var _i, _ref, exclude, in$1, out, v, x$5; - out = $subslice(in$1, 0, 0); - _ref = in$1; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!(v === exclude)) { - out = $append(out, v); - } - _i++; - } - if (!((in$1.$length === out.$length))) { - (x$5 = in$1.$length - 1 >> 0, ((x$5 < 0 || x$5 >= in$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : in$1.$array[in$1.$offset + x$5] = ptrType$68.nil)); - } - return out; - }; - http2noDialClientConnPool.ptr.prototype.GetClientConn = function(req, addr) { - var {$24r, _r$1, addr, p, req, $s, $r, $c} = $restore(this, {req, addr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$1 = p.http2clientConnPool.getClientConn(req, addr, false); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2noDialClientConnPool.ptr.prototype.GetClientConn, $c: true, $r, $24r, _r$1, addr, p, req, $s};return $f; - }; - http2noDialClientConnPool.prototype.GetClientConn = function(req, addr) { return this.$val.GetClientConn(req, addr); }; - http2shouldRetryDial = function(call, req) { - var {$24r, _r$1, _r$2, _r$3, _v, call, req, $s, $r, $c} = $restore(this, {call, req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(call.err, $ifaceNil)) { - $s = -1; return false; - } - if ($interfaceIsEqual(call.ctx, req.Context())) { - $s = -1; return false; - } - _r$1 = errors.Is(call.err, context.Canceled); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - if (!(!_r$1)) { _v = false; $s = 3; continue s; } - _r$2 = errors.Is(call.err, context.DeadlineExceeded); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = !_r$2; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return false; - /* } */ case 2: - _r$3 = call.ctx.Err(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = !($interfaceIsEqual(_r$3, $ifaceNil)); - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: http2shouldRetryDial, $c: true, $r, $24r, _r$1, _r$2, _r$3, _v, call, req, $s};return $f; - }; - http2getDataBufferChunk = function(size) { - var {$24r, _r$1, i, size, x$5, $s, $r, $c} = $restore(this, {size}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - i = 0; - while (true) { - if (!(i < (http2dataChunkSizeClasses.$length - 1 >> 0))) { break; } - if ((x$5 = (new $Int64(0, ((i < 0 || i >= http2dataChunkSizeClasses.$length) ? ($throwRuntimeError("index out of range"), undefined) : http2dataChunkSizeClasses.$array[http2dataChunkSizeClasses.$offset + i]))), (size.$high < x$5.$high || (size.$high === x$5.$high && size.$low <= x$5.$low)))) { - break; - } - i = i + (1) >> 0; - } - _r$1 = ((i < 0 || i >= http2dataChunkPools.length) ? ($throwRuntimeError("index out of range"), undefined) : http2dataChunkPools[i]).Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = $assertType(_r$1, sliceType$3); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2getDataBufferChunk, $c: true, $r, $24r, _r$1, i, size, x$5, $s};return $f; - }; - http2putDataBufferChunk = function(p) { - var {_i, _r$1, _ref, i, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = http2dataChunkSizeClasses; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - n = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (p.$length === n) { - ((i < 0 || i >= http2dataChunkPools.length) ? ($throwRuntimeError("index out of range"), undefined) : http2dataChunkPools[i]).Put(p); - $s = -1; return; - } - _i++; - } - _r$1 = fmt.Sprintf("unexpected buffer len=%v", new sliceType([new $Int(p.$length)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - $s = -1; return; - /* */ } return; } var $f = {$blk: http2putDataBufferChunk, $c: true, $r, _i, _r$1, _ref, i, n, p, $s};return $f; - }; - http2dataBuffer.ptr.prototype.Read = function(p) { - var {b, end, n, ntotal, p, readFrom, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (b.size === 0) { - $s = -1; return [0, http2errReadEmpty]; - } - ntotal = 0; - /* while (true) { */ case 1: - /* if (!(p.$length > 0 && b.size > 0)) { break; } */ if(!(p.$length > 0 && b.size > 0)) { $s = 2; continue; } - readFrom = b.bytesFromFirstChunk(); - n = $copySlice(p, readFrom); - p = $subslice(p, n); - ntotal = ntotal + (n) >> 0; - b.r = b.r + (n) >> 0; - b.size = b.size - (n) >> 0; - /* */ if (b.r === (x$5 = b.chunks, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])).$length) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (b.r === (x$5 = b.chunks, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])).$length) { */ case 3: - $r = http2putDataBufferChunk((x$6 = b.chunks, (0 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 0]))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - end = b.chunks.$length - 1 >> 0; - $copySlice($subslice(b.chunks, 0, end), $subslice(b.chunks, 1)); - (x$7 = b.chunks, ((end < 0 || end >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + end] = sliceType$3.nil)); - b.chunks = $subslice(b.chunks, 0, end); - b.r = 0; - /* } */ case 4: - $s = 1; continue; - case 2: - $s = -1; return [ntotal, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2dataBuffer.ptr.prototype.Read, $c: true, $r, b, end, n, ntotal, p, readFrom, x$5, x$6, x$7, $s};return $f; - }; - http2dataBuffer.prototype.Read = function(p) { return this.$val.Read(p); }; - http2dataBuffer.ptr.prototype.bytesFromFirstChunk = function() { - var b, x$5, x$6; - b = this; - if (b.chunks.$length === 1) { - return $subslice((x$5 = b.chunks, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), b.r, b.w); - } - return $subslice((x$6 = b.chunks, (0 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 0])), b.r); - }; - http2dataBuffer.prototype.bytesFromFirstChunk = function() { return this.$val.bytesFromFirstChunk(); }; - http2dataBuffer.ptr.prototype.Len = function() { - var b; - b = this; - return b.size; - }; - http2dataBuffer.prototype.Len = function() { return this.$val.Len(); }; - http2dataBuffer.ptr.prototype.Write = function(p) { - var {_r$1, b, chunk, n, ntotal, p, want, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - ntotal = p.$length; - /* while (true) { */ case 1: - /* if (!(p.$length > 0)) { break; } */ if(!(p.$length > 0)) { $s = 2; continue; } - want = (new $Int64(0, p.$length)); - if ((x$5 = b.expected, (x$5.$high > want.$high || (x$5.$high === want.$high && x$5.$low > want.$low)))) { - want = b.expected; - } - _r$1 = b.lastChunkOrAlloc(want); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - chunk = _r$1; - n = $copySlice($subslice(chunk, b.w), p); - p = $subslice(p, n); - b.w = b.w + (n) >> 0; - b.size = b.size + (n) >> 0; - b.expected = (x$6 = b.expected, x$7 = (new $Int64(0, n)), new $Int64(x$6.$high - x$7.$high, x$6.$low - x$7.$low)); - $s = 1; continue; - case 2: - $s = -1; return [ntotal, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2dataBuffer.ptr.prototype.Write, $c: true, $r, _r$1, b, chunk, n, ntotal, p, want, x$5, x$6, x$7, $s};return $f; - }; - http2dataBuffer.prototype.Write = function(p) { return this.$val.Write(p); }; - http2dataBuffer.ptr.prototype.lastChunkOrAlloc = function(want) { - var {_r$1, b, chunk, last, want, x$5, x$6, $s, $r, $c} = $restore(this, {want}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - if (!((b.chunks.$length === 0))) { - last = (x$5 = b.chunks, x$6 = b.chunks.$length - 1 >> 0, ((x$6 < 0 || x$6 >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + x$6])); - if (b.w < last.$length) { - $s = -1; return last; - } - } - _r$1 = http2getDataBufferChunk(want); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - chunk = _r$1; - b.chunks = $append(b.chunks, chunk); - b.w = 0; - $s = -1; return chunk; - /* */ } return; } var $f = {$blk: http2dataBuffer.ptr.prototype.lastChunkOrAlloc, $c: true, $r, _r$1, b, chunk, last, want, x$5, x$6, $s};return $f; - }; - http2dataBuffer.prototype.lastChunkOrAlloc = function(want) { return this.$val.lastChunkOrAlloc(want); }; - http2ErrCode.prototype.String = function() { - var {$24r, _entry, _r$1, _tuple, e, ok, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _tuple = (_entry = http2errCodeName[http2ErrCode.keyFor(e)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return s; - } - _r$1 = fmt.Sprintf("unknown error code 0x%x", new sliceType([new $Uint32(((e >>> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2ErrCode.prototype.String, $c: true, $r, $24r, _entry, _r$1, _tuple, e, ok, s, $s};return $f; - }; - $ptrType(http2ErrCode).prototype.String = function() { return new http2ErrCode(this.$get()).String(); }; - http2ErrCode.prototype.stringToken = function() { - var {$24r, _entry, _r$1, _tuple, e, ok, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _tuple = (_entry = http2errCodeName[http2ErrCode.keyFor(e)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return s; - } - _r$1 = fmt.Sprintf("ERR_UNKNOWN_%d", new sliceType([new $Uint32(((e >>> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2ErrCode.prototype.stringToken, $c: true, $r, $24r, _entry, _r$1, _tuple, e, ok, s, $s};return $f; - }; - $ptrType(http2ErrCode).prototype.stringToken = function() { return new http2ErrCode(this.$get()).stringToken(); }; - http2ConnectionError.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r$1 = fmt.Sprintf("connection error: %s", new sliceType([new http2ErrCode(((e >>> 0)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2ConnectionError.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - $ptrType(http2ConnectionError).prototype.Error = function() { return new http2ConnectionError(this.$get()).Error(); }; - http2streamError = function(id, code) { - var code, id; - return new http2StreamError.ptr(id, code, $ifaceNil); - }; - http2StreamError.ptr.prototype.Error = function() { - var {$24r, $24r$1, _r$1, _r$2, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - /* */ if (!($interfaceIsEqual(e.Cause, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(e.Cause, $ifaceNil))) { */ case 1: - _r$1 = fmt.Sprintf("stream error: stream ID %d; %v; %v", new sliceType([new $Uint32(e.StreamID), new http2ErrCode(e.Code), e.Cause])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - _r$2 = fmt.Sprintf("stream error: stream ID %d; %v", new sliceType([new $Uint32(e.StreamID), new http2ErrCode(e.Code)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 6; case 6: return $24r$1; - /* */ } return; } var $f = {$blk: http2StreamError.ptr.prototype.Error, $c: true, $r, $24r, $24r$1, _r$1, _r$2, e, $s};return $f; - }; - http2StreamError.prototype.Error = function() { return this.$val.Error(); }; - http2goAwayFlowError.ptr.prototype.Error = function() { - return "connection exceeded flow control window size"; - }; - http2goAwayFlowError.prototype.Error = function() { return this.$val.Error(); }; - http2connError.ptr.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$1 = fmt.Sprintf("http2: connection error: %v: %v", new sliceType([new http2ErrCode(e.Code), new $String(e.Reason)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2connError.ptr.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - http2connError.prototype.Error = function() { return this.$val.Error(); }; - http2pseudoHeaderError.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r$1 = fmt.Sprintf("invalid pseudo-header %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2pseudoHeaderError.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - $ptrType(http2pseudoHeaderError).prototype.Error = function() { return new http2pseudoHeaderError(this.$get()).Error(); }; - http2duplicatePseudoHeaderError.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r$1 = fmt.Sprintf("duplicate pseudo-header %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2duplicatePseudoHeaderError.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - $ptrType(http2duplicatePseudoHeaderError).prototype.Error = function() { return new http2duplicatePseudoHeaderError(this.$get()).Error(); }; - http2headerFieldNameError.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r$1 = fmt.Sprintf("invalid header field name %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2headerFieldNameError.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - $ptrType(http2headerFieldNameError).prototype.Error = function() { return new http2headerFieldNameError(this.$get()).Error(); }; - http2headerFieldValueError.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this.$val; - _r$1 = fmt.Sprintf("invalid header field value %q", new sliceType([new $String((e))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2headerFieldValueError.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - $ptrType(http2headerFieldValueError).prototype.Error = function() { return new http2headerFieldValueError(this.$get()).Error(); }; - http2flow.ptr.prototype.setConnFlow = function(cf) { - var cf, f; - f = this; - f.conn = cf; - }; - http2flow.prototype.setConnFlow = function(cf) { return this.$val.setConnFlow(cf); }; - http2flow.ptr.prototype.available = function() { - var f, n; - f = this; - n = f.n; - if (!(f.conn === ptrType$71.nil) && f.conn.n < n) { - n = f.conn.n; - } - return n; - }; - http2flow.prototype.available = function() { return this.$val.available(); }; - http2flow.ptr.prototype.take = function(n) { - var f, n; - f = this; - if (n > f.available()) { - $panic(new $String("internal error: took too much")); - } - f.n = f.n - (n) >> 0; - if (!(f.conn === ptrType$71.nil)) { - f.conn.n = f.conn.n - (n) >> 0; - } - }; - http2flow.prototype.take = function(n) { return this.$val.take(n); }; - http2flow.ptr.prototype.add = function(n) { - var f, n, sum; - f = this; - sum = f.n + n >> 0; - if ((sum > n) === (f.n > 0)) { - f.n = sum; - return true; - } - return false; - }; - http2flow.prototype.add = function(n) { return this.$val.add(n); }; - http2FrameType.prototype.String = function() { - var {$24r, _entry, _r$1, _tuple, ok, s, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this.$val; - _tuple = (_entry = http2frameName[http2FrameType.keyFor(t)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return s; - } - _r$1 = fmt.Sprintf("UNKNOWN_FRAME_TYPE_%d", new sliceType([new $Uint8(((t << 24 >>> 24)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2FrameType.prototype.String, $c: true, $r, $24r, _entry, _r$1, _tuple, ok, s, t, $s};return $f; - }; - $ptrType(http2FrameType).prototype.String = function() { return new http2FrameType(this.$get()).String(); }; - http2Flags.prototype.Has = function(v) { - var f, v; - f = this.$val; - return (((f & v) >>> 0)) === v; - }; - $ptrType(http2Flags).prototype.Has = function(v) { return new http2Flags(this.$get()).Has(v); }; - http2typeFrameParser = function(t) { - var _entry, f, t; - f = (_entry = http2frameParsers[http2FrameType.keyFor(t)], _entry !== undefined ? _entry.v : $throwNilPointerError); - if (!(f === $throwNilPointerError)) { - return f; - } - return http2parseUnknownFrame; - }; - http2FrameHeader.ptr.prototype.Header = function() { - var h; - h = this; - return h; - }; - http2FrameHeader.prototype.Header = function() { return this.$val.Header(); }; - http2FrameHeader.ptr.prototype.String = function() { - var {_r$1, _r$2, buf, h, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - buf = [buf]; - h = this; - buf[0] = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - _r$1 = buf[0].WriteString("[FrameHeader "); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $r = $clone(h, http2FrameHeader).writeDebug(buf[0]); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = buf[0].WriteByte(93); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return buf[0].String(); - /* */ } return; } var $f = {$blk: http2FrameHeader.ptr.prototype.String, $c: true, $r, _r$1, _r$2, buf, h, $s};return $f; - }; - http2FrameHeader.prototype.String = function() { return this.$val.String(); }; - http2FrameHeader.ptr.prototype.writeDebug = function(buf) { - var {_entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, buf, h, i, name, set, y, y$1, y$2, $s, $r, $c} = $restore(this, {buf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - h = this; - _r$1 = new http2FrameType(h.Type).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = buf.WriteString(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* */ if (!((h.Flags === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((h.Flags === 0))) { */ case 3: - _r$3 = buf.WriteString(" flags="); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - set = 0; - i = 0; - /* while (true) { */ case 6: - /* if (!(i < 8)) { break; } */ if(!(i < 8)) { $s = 7; continue; } - if (((h.Flags & (((y = i, y < 32 ? (1 << y) : 0) << 24 >>> 24))) >>> 0) === 0) { - i = i + (1) << 24 >>> 24; - /* continue; */ $s = 6; continue; - } - set = set + (1) >> 0; - /* */ if (set > 1) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (set > 1) { */ case 8: - _r$4 = buf.WriteByte(124); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 9: - name = (_entry = (_entry$1 = http2flagName[http2FrameType.keyFor(h.Type)], _entry$1 !== undefined ? _entry$1.v : false)[http2Flags.keyFor((((y$1 = i, y$1 < 32 ? (1 << y$1) : 0) << 24 >>> 24)))], _entry !== undefined ? _entry.v : ""); - /* */ if (!(name === "")) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(name === "")) { */ case 11: - _r$5 = buf.WriteString(name); /* */ $s = 14; case 14: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - $s = 13; continue; - /* } else { */ case 12: - _r$6 = fmt.Fprintf(buf, "0x%x", new sliceType([new $Int(((y$2 = i, y$2 < 32 ? (1 << y$2) : 0) >> 0))])); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 13: - i = i + (1) << 24 >>> 24; - $s = 6; continue; - case 7: - /* } */ case 4: - /* */ if (!((h.StreamID === 0))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!((h.StreamID === 0))) { */ case 16: - _r$7 = fmt.Fprintf(buf, " stream=%d", new sliceType([new $Uint32(h.StreamID)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - /* } */ case 17: - _r$8 = fmt.Fprintf(buf, " len=%d", new sliceType([new $Uint32(h.Length)])); /* */ $s = 19; case 19: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2FrameHeader.ptr.prototype.writeDebug, $c: true, $r, _entry, _entry$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, buf, h, i, name, set, y, y$1, y$2, $s};return $f; - }; - http2FrameHeader.prototype.writeDebug = function(buf) { return this.$val.writeDebug(buf); }; - http2FrameHeader.ptr.prototype.checkValid = function() { - var h; - h = this; - if (!h.valid) { - $panic(new $String("Frame accessor called on non-owned Frame")); - } - }; - http2FrameHeader.prototype.checkValid = function() { return this.$val.checkValid(); }; - http2FrameHeader.ptr.prototype.invalidate = function() { - var h; - h = this; - h.valid = false; - }; - http2FrameHeader.prototype.invalidate = function() { return this.$val.invalidate(); }; - http2readFrameHeader = function(buf, r) { - var {_r$1, _tuple, buf, err, r, $s, $r, $c} = $restore(this, {buf, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = io.ReadFull(r, $subslice(buf, 0, 9)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [new http2FrameHeader.ptr(false, 0, 0, 0, 0), err]; - } - $s = -1; return [new http2FrameHeader.ptr(true, (((3 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 3]) << 24 >>> 24)), (((4 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 4]) << 24 >>> 24)), ((((((((0 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 0]) >>> 0)) << 16 >>> 0) | ((((1 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 1]) >>> 0)) << 8 >>> 0)) >>> 0) | (((2 >= buf.$length ? ($throwRuntimeError("index out of range"), undefined) : buf.$array[buf.$offset + 2]) >>> 0))) >>> 0), ($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, 5)) & 2147483647) >>> 0), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2readFrameHeader, $c: true, $r, _r$1, _tuple, buf, err, r, $s};return $f; - }; - http2Framer.ptr.prototype.maxHeaderListSize = function() { - var fr; - fr = this; - if (fr.MaxHeaderListSize === 0) { - return 16777216; - } - return fr.MaxHeaderListSize; - }; - http2Framer.prototype.maxHeaderListSize = function() { return this.$val.maxHeaderListSize(); }; - http2Framer.ptr.prototype.startWrite = function(ftype, flags, streamID) { - var f, flags, ftype, streamID; - f = this; - f.wbuf = $append($subslice(f.wbuf, 0, 0), 0, 0, 0, ((ftype << 24 >>> 24)), ((flags << 24 >>> 24)), (((streamID >>> 24 >>> 0) << 24 >>> 24)), (((streamID >>> 16 >>> 0) << 24 >>> 24)), (((streamID >>> 8 >>> 0) << 24 >>> 24)), ((streamID << 24 >>> 24))); - }; - http2Framer.prototype.startWrite = function(ftype, flags, streamID) { return this.$val.startWrite(ftype, flags, streamID); }; - http2Framer.ptr.prototype.endWrite = function() { - var {_r$1, _tuple, err, f, length, n, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - length = f.wbuf.$length - 9 >> 0; - if (length >= 16777216) { - $s = -1; return http2ErrFrameTooLarge; - } - $unused($append($subslice(f.wbuf, 0, 0), (((length >> 16 >> 0) << 24 >>> 24)), (((length >> 8 >> 0) << 24 >>> 24)), ((length << 24 >>> 24)))); - /* */ if (f.logWrites) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.logWrites) { */ case 1: - $r = f.logWrite(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = f.w.Write(f.wbuf); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, $ifaceNil) && !((n === f.wbuf.$length))) { - err = io.ErrShortWrite; - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.endWrite, $c: true, $r, _r$1, _tuple, err, f, length, n, $s};return $f; - }; - http2Framer.prototype.endWrite = function() { return this.$val.endWrite(); }; - http2Framer.ptr.prototype.logWrite = function() { - var {_arg, _arg$1, _r$1, _r$2, _r$3, _tuple, err, f, fr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (f.debugFramer === ptrType$72.nil) { - f.debugFramerBuf = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - f.debugFramer = http2NewFramer($ifaceNil, f.debugFramerBuf); - f.debugFramer.logReads = false; - f.debugFramer.AllowIllegalReads = true; - } - _r$1 = f.debugFramerBuf.Write(f.wbuf); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = f.debugFramer.ReadFrame(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - fr = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 3: - $r = f.debugWriteLoggerf("http2: Framer %p: failed to decode just-written frame", new sliceType([f])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 4: - _arg = f; - _r$3 = http2summarizeFrame(fr); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$1 = new $String(_r$3); - $r = f.debugWriteLoggerf("http2: Framer %p: wrote %v", new sliceType([_arg, _arg$1])); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.logWrite, $c: true, $r, _arg, _arg$1, _r$1, _r$2, _r$3, _tuple, err, f, fr, $s};return $f; - }; - http2Framer.prototype.logWrite = function() { return this.$val.logWrite(); }; - http2Framer.ptr.prototype.writeByte = function(v) { - var f, v; - f = this; - f.wbuf = $append(f.wbuf, v); - }; - http2Framer.prototype.writeByte = function(v) { return this.$val.writeByte(v); }; - http2Framer.ptr.prototype.writeBytes = function(v) { - var f, v; - f = this; - f.wbuf = $appendSlice(f.wbuf, v); - }; - http2Framer.prototype.writeBytes = function(v) { return this.$val.writeBytes(v); }; - http2Framer.ptr.prototype.writeUint16 = function(v) { - var f, v; - f = this; - f.wbuf = $append(f.wbuf, (((v >>> 8 << 16 >>> 16) << 24 >>> 24)), ((v << 24 >>> 24))); - }; - http2Framer.prototype.writeUint16 = function(v) { return this.$val.writeUint16(v); }; - http2Framer.ptr.prototype.writeUint32 = function(v) { - var f, v; - f = this; - f.wbuf = $append(f.wbuf, (((v >>> 24 >>> 0) << 24 >>> 24)), (((v >>> 16 >>> 0) << 24 >>> 24)), (((v >>> 8 >>> 0) << 24 >>> 24)), ((v << 24 >>> 24))); - }; - http2Framer.prototype.writeUint32 = function(v) { return this.$val.writeUint32(v); }; - http2Framer.ptr.prototype.SetReuseFrames = function() { - var fr; - fr = this; - if (!(fr.frameCache === ptrType$73.nil)) { - return; - } - fr.frameCache = new http2frameCache.ptr(new http2DataFrame.ptr(new http2FrameHeader.ptr(false, 0, 0, 0, 0), sliceType$3.nil)); - }; - http2Framer.prototype.SetReuseFrames = function() { return this.$val.SetReuseFrames(); }; - http2frameCache.ptr.prototype.getDataFrame = function() { - var fc; - fc = this; - if (fc === ptrType$73.nil) { - return new http2DataFrame.ptr(new http2FrameHeader.ptr(false, 0, 0, 0, 0), sliceType$3.nil); - } - return fc.dataFrame; - }; - http2frameCache.prototype.getDataFrame = function() { return this.$val.getDataFrame(); }; - http2NewFramer = function(w, r) { - var fr, r, w; - fr = new http2Framer.ptr(r, $ifaceNil, $ifaceNil, (function(param) { - var param; - }), 0, 0, arrayType$7.zero(), $throwNilPointerError, sliceType$3.nil, 0, w, sliceType$3.nil, false, false, ptrType$74.nil, 0, http2logFrameReads, http2logFrameWrites, ptrType$72.nil, ptrType$40.nil, log.Printf, log.Printf, ptrType$73.nil); - fr.getReadBuf = (function(size) { - var size; - if (fr.readBuf.$capacity >= ((size >> 0))) { - return $subslice(fr.readBuf, 0, size); - } - fr.readBuf = $makeSlice(sliceType$3, size); - return fr.readBuf; - }); - fr.SetMaxReadFrameSize(16777215); - return fr; - }; - http2Framer.ptr.prototype.SetMaxReadFrameSize = function(v) { - var fr, v; - fr = this; - if (v > 16777215) { - v = 16777215; - } - fr.maxReadSize = v; - }; - http2Framer.prototype.SetMaxReadFrameSize = function(v) { return this.$val.SetMaxReadFrameSize(v); }; - http2Framer.ptr.prototype.ErrorDetail = function() { - var fr; - fr = this; - return fr.errDetail; - }; - http2Framer.prototype.ErrorDetail = function() { return this.$val.ErrorDetail(); }; - http2terminalReadFrameError = function(err) { - var _tuple, err, ok; - _tuple = $assertType(err, http2StreamError, true); - ok = _tuple[1]; - if (ok) { - return false; - } - return !($interfaceIsEqual(err, $ifaceNil)); - }; - http2Framer.ptr.prototype.ReadFrame = function() { - var {$24r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _returncast, _tuple, _tuple$1, _tuple$2, _tuple$3, ce, err, err$1, err$2, f, fh, fr, ok, payload, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fr = this; - fr.errDetail = $ifaceNil; - /* */ if (!($interfaceIsEqual(fr.lastFrame, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(fr.lastFrame, $ifaceNil))) { */ case 1: - $r = fr.lastFrame.invalidate(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = http2readFrameHeader(new sliceType$3(fr.headerBuf), fr.r); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - fh = $clone(_tuple[0], http2FrameHeader); - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - if (fh.Length > fr.maxReadSize) { - $s = -1; return [$ifaceNil, http2ErrFrameTooLarge]; - } - _r$2 = fr.getReadBuf(fh.Length); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - payload = _r$2; - _r$3 = io.ReadFull(fr.r, payload); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - err$1 = _tuple$1[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$1]; - } - _r$4 = http2typeFrameParser(fh.Type)(fr.frameCache, $clone(fh, http2FrameHeader), fr.countError, payload); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$2 = _r$4; - f = _tuple$2[0]; - err = _tuple$2[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - _tuple$3 = $assertType(err, http2connError, true); - ce = $clone(_tuple$3[0], http2connError); - ok = _tuple$3[1]; - if (ok) { - $s = -1; return [$ifaceNil, fr.connError(ce.Code, ce.Reason)]; - } - $s = -1; return [$ifaceNil, err]; - } - _r$5 = fr.checkFrameOrder(f); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$2 = _r$5; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - $s = -1; return [$ifaceNil, err$2]; - } - /* */ if (fr.logReads) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (fr.logReads) { */ case 9: - _arg = fr; - _r$6 = http2summarizeFrame(f); /* */ $s = 11; case 11: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = new $String(_r$6); - $r = fr.debugReadLoggerf("http2: Framer %p: read %v", new sliceType([_arg, _arg$1])); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* */ if ((fh.Type === 1) && !(fr.ReadMetaHeaders === ptrType$74.nil)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ((fh.Type === 1) && !(fr.ReadMetaHeaders === ptrType$74.nil)) { */ case 13: - _r$7 = fr.readMetaFrame($assertType(f, ptrType$75)); /* */ $s = 15; case 15: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _returncast = _r$7; - $24r = [_returncast[0], _returncast[1]]; - $s = 16; case 16: return $24r; - /* } */ case 14: - $s = -1; return [f, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.ReadFrame, $c: true, $r, $24r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _returncast, _tuple, _tuple$1, _tuple$2, _tuple$3, ce, err, err$1, err$2, f, fh, fr, ok, payload, $s};return $f; - }; - http2Framer.prototype.ReadFrame = function() { return this.$val.ReadFrame(); }; - http2Framer.ptr.prototype.connError = function(code, reason) { - var code, fr, reason; - fr = this; - fr.errDetail = errors.New(reason); - return new http2ConnectionError(((code >>> 0))); - }; - http2Framer.prototype.connError = function(code, reason) { return this.$val.connError(code, reason); }; - http2Framer.ptr.prototype.checkFrameOrder = function(f) { - var {$24r, $24r$1, $24r$2, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, f, fh, fr, last, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - fr = this; - last = fr.lastFrame; - fr.lastFrame = f; - if (fr.AllowIllegalReads) { - $s = -1; return $ifaceNil; - } - _r$1 = f.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - fh = $clone(_r$1, http2FrameHeader); - /* */ if (!((fr.lastHeaderStream === 0))) { $s = 2; continue; } - /* */ if (fh.Type === 9) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((fr.lastHeaderStream === 0))) { */ case 2: - /* */ if (!((fh.Type === 9))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((fh.Type === 9))) { */ case 5: - _arg = new http2FrameType(fh.Type); - _arg$1 = new $Uint32(fh.StreamID); - _r$2 = last.Header(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$2 = new http2FrameType(_r$2.Type); - _arg$3 = new $Uint32(fr.lastHeaderStream); - _r$3 = fmt.Sprintf("got %s for stream %d; expected CONTINUATION following %s for stream %d", new sliceType([_arg, _arg$1, _arg$2, _arg$3])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$4 = _r$3; - _r$4 = fr.connError(1, _arg$4); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 10; case 10: return $24r; - /* } */ case 6: - /* */ if (!((fh.StreamID === fr.lastHeaderStream))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!((fh.StreamID === fr.lastHeaderStream))) { */ case 11: - _r$5 = fmt.Sprintf("got CONTINUATION for stream %d; expected stream %d", new sliceType([new $Uint32(fh.StreamID), new $Uint32(fr.lastHeaderStream)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$5 = _r$5; - _r$6 = fr.connError(1, _arg$5); /* */ $s = 14; case 14: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$1 = _r$6; - $s = 15; case 15: return $24r$1; - /* } */ case 12: - $s = 4; continue; - /* } else if (fh.Type === 9) { */ case 3: - _r$7 = fmt.Sprintf("unexpected CONTINUATION for stream %d", new sliceType([new $Uint32(fh.StreamID)])); /* */ $s = 16; case 16: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _arg$6 = _r$7; - _r$8 = fr.connError(1, _arg$6); /* */ $s = 17; case 17: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$2 = _r$8; - $s = 18; case 18: return $24r$2; - /* } */ case 4: - _1 = fh.Type; - if ((_1 === (1)) || (_1 === (9))) { - if (new http2Flags(fh.Flags).Has(4)) { - fr.lastHeaderStream = 0; - } else { - fr.lastHeaderStream = fh.StreamID; - } - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.checkFrameOrder, $c: true, $r, $24r, $24r$1, $24r$2, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, f, fh, fr, last, $s};return $f; - }; - http2Framer.prototype.checkFrameOrder = function(f) { return this.$val.checkFrameOrder(f); }; - http2DataFrame.ptr.prototype.StreamEnded = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(1); - }; - http2DataFrame.prototype.StreamEnded = function() { return this.$val.StreamEnded(); }; - http2DataFrame.ptr.prototype.Data = function() { - var f; - f = this; - f.http2FrameHeader.checkValid(); - return f.data; - }; - http2DataFrame.prototype.Data = function() { return this.$val.Data(); }; - http2parseDataFrame = function(fc, fh, countError, payload) { - var {_tuple, countError, err, f, fc, fh, padSize, payload, x$5, x$6, $s, $r, $c} = $restore(this, {fc, fh, countError, payload}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (fh.StreamID === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fh.StreamID === 0) { */ case 1: - $r = countError("frame_data_stream_0"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, (x$5 = new http2connError.ptr(1, "DATA frame with stream ID 0"), new x$5.constructor.elem(x$5))]; - /* } */ case 2: - f = fc.getDataFrame(); - http2FrameHeader.copy(f.http2FrameHeader, fh); - padSize = 0; - /* */ if (new http2Flags(fh.Flags).Has(8)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (new http2Flags(fh.Flags).Has(8)) { */ case 4: - err = $ifaceNil; - _tuple = http2readByte(payload); - payload = _tuple[0]; - padSize = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $r = countError("frame_data_pad_byte_short"); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, err]; - /* } */ case 7: - /* } */ case 5: - /* */ if (((padSize >> 0)) > payload.$length) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (((padSize >> 0)) > payload.$length) { */ case 9: - $r = countError("frame_data_pad_too_big"); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, (x$6 = new http2connError.ptr(1, "pad size larger than data payload"), new x$6.constructor.elem(x$6))]; - /* } */ case 10: - f.data = $subslice(payload, 0, (payload.$length - ((padSize >> 0)) >> 0)); - $s = -1; return [f, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parseDataFrame, $c: true, $r, _tuple, countError, err, f, fc, fh, padSize, payload, x$5, x$6, $s};return $f; - }; - http2validStreamIDOrZero = function(streamID) { - var streamID; - return ((streamID & 2147483648) >>> 0) === 0; - }; - http2validStreamID = function(streamID) { - var streamID; - return !((streamID === 0)) && (((streamID & 2147483648) >>> 0) === 0); - }; - http2Framer.ptr.prototype.WriteData = function(streamID, endStream, data) { - var {$24r, _r$1, data, endStream, f, streamID, $s, $r, $c} = $restore(this, {streamID, endStream, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - _r$1 = f.WriteDataPadded(streamID, endStream, data, sliceType$3.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteData, $c: true, $r, $24r, _r$1, data, endStream, f, streamID, $s};return $f; - }; - http2Framer.prototype.WriteData = function(streamID, endStream, data) { return this.$val.WriteData(streamID, endStream, data); }; - http2Framer.ptr.prototype.WriteDataPadded = function(streamID, endStream, data, pad) { - var {$24r, _i, _r$1, _ref, b, data, endStream, f, flags, pad, streamID, $s, $r, $c} = $restore(this, {streamID, endStream, data, pad}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - if (pad.$length > 0) { - if (pad.$length > 255) { - $s = -1; return http2errPadLength; - } - if (!f.AllowIllegalWrites) { - _ref = pad; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - b = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (!((b === 0))) { - $s = -1; return http2errPadBytes; - } - _i++; - } - } - } - flags = 0; - if (endStream) { - flags = (flags | (1)) >>> 0; - } - if (!(pad === sliceType$3.nil)) { - flags = (flags | (8)) >>> 0; - } - f.startWrite(0, flags, streamID); - if (!(pad === sliceType$3.nil)) { - f.wbuf = $append(f.wbuf, ((pad.$length << 24 >>> 24))); - } - f.wbuf = $appendSlice(f.wbuf, data); - f.wbuf = $appendSlice(f.wbuf, pad); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteDataPadded, $c: true, $r, $24r, _i, _r$1, _ref, b, data, endStream, f, flags, pad, streamID, $s};return $f; - }; - http2Framer.prototype.WriteDataPadded = function(streamID, endStream, data, pad) { return this.$val.WriteDataPadded(streamID, endStream, data, pad); }; - http2parseSettingsFrame = function(param, fh, countError, p) { - var {_r$1, _tuple, countError, f, fh, ok, p, param, v, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (new http2Flags(fh.Flags).Has(1) && fh.Length > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (new http2Flags(fh.Flags).Has(1) && fh.Length > 0) { */ case 1: - $r = countError("frame_settings_ack_with_length"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(6)]; - /* } */ case 2: - /* */ if (!((fh.StreamID === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((fh.StreamID === 0))) { */ case 4: - $r = countError("frame_settings_has_stream"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(1)]; - /* } */ case 5: - /* */ if (!(((_r$1 = p.$length % 6, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(((_r$1 = p.$length % 6, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0))) { */ case 7: - $r = countError("frame_settings_mod_6"); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(6)]; - /* } */ case 8: - f = new http2SettingsFrame.ptr($clone(fh, http2FrameHeader), p); - _tuple = f.Value(4); - v = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok && v > 2147483647) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (ok && v > 2147483647) { */ case 10: - $r = countError("frame_settings_window_size_too_big"); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(3)]; - /* } */ case 11: - $s = -1; return [f, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parseSettingsFrame, $c: true, $r, _r$1, _tuple, countError, f, fh, ok, p, param, v, $s};return $f; - }; - http2SettingsFrame.ptr.prototype.IsAck = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(1); - }; - http2SettingsFrame.prototype.IsAck = function() { return this.$val.IsAck(); }; - http2SettingsFrame.ptr.prototype.Value = function(id) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, f, i, id, ok, s, v; - v = 0; - ok = false; - f = this; - f.http2FrameHeader.checkValid(); - i = 0; - while (true) { - if (!(i < f.NumSettings())) { break; } - s = $clone(f.Setting(i), http2Setting); - if (s.ID === id) { - _tmp = s.Val; - _tmp$1 = true; - v = _tmp; - ok = _tmp$1; - return [v, ok]; - } - i = i + (1) >> 0; - } - _tmp$2 = 0; - _tmp$3 = false; - v = _tmp$2; - ok = _tmp$3; - return [v, ok]; - }; - http2SettingsFrame.prototype.Value = function(id) { return this.$val.Value(id); }; - http2SettingsFrame.ptr.prototype.Setting = function(i) { - var buf, f, i; - f = this; - buf = f.p; - return new http2Setting.ptr((($clone(binary.BigEndian, binary.bigEndian).Uint16($subslice(buf, ($imul(i, 6)), (($imul(i, 6)) + 2 >> 0))) << 16 >>> 16)), $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(buf, (($imul(i, 6)) + 2 >> 0), (($imul(i, 6)) + 6 >> 0)))); - }; - http2SettingsFrame.prototype.Setting = function(i) { return this.$val.Setting(i); }; - http2SettingsFrame.ptr.prototype.NumSettings = function() { - var _q, f; - f = this; - return (_q = f.p.$length / 6, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero")); - }; - http2SettingsFrame.prototype.NumSettings = function() { return this.$val.NumSettings(); }; - http2SettingsFrame.ptr.prototype.HasDuplicates = function() { - var _entry, _key, f, i, i$1, id, idi, idj, j, num, seen; - f = this; - num = f.NumSettings(); - if (num === 0) { - return false; - } - if (num < 10) { - i = 0; - while (true) { - if (!(i < num)) { break; } - idi = f.Setting(i).ID; - j = i + 1 >> 0; - while (true) { - if (!(j < num)) { break; } - idj = f.Setting(j).ID; - if (idi === idj) { - return true; - } - j = j + (1) >> 0; - } - i = i + (1) >> 0; - } - return false; - } - seen = $makeMap(http2SettingID.keyFor, []); - i$1 = 0; - while (true) { - if (!(i$1 < num)) { break; } - id = f.Setting(i$1).ID; - if ((_entry = seen[http2SettingID.keyFor(id)], _entry !== undefined ? _entry.v : false)) { - return true; - } - _key = id; (seen || $throwRuntimeError("assignment to entry in nil map"))[http2SettingID.keyFor(_key)] = { k: _key, v: true }; - i$1 = i$1 + (1) >> 0; - } - return false; - }; - http2SettingsFrame.prototype.HasDuplicates = function() { return this.$val.HasDuplicates(); }; - http2SettingsFrame.ptr.prototype.ForeachSetting = function(fn) { - var {_r$1, err, f, fn, i, $s, $r, $c} = $restore(this, {fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.http2FrameHeader.checkValid(); - i = 0; - /* while (true) { */ case 1: - /* if (!(i < f.NumSettings())) { break; } */ if(!(i < f.NumSettings())) { $s = 2; continue; } - _r$1 = fn($clone(f.Setting(i), http2Setting)); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - i = i + (1) >> 0; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2SettingsFrame.ptr.prototype.ForeachSetting, $c: true, $r, _r$1, err, f, fn, i, $s};return $f; - }; - http2SettingsFrame.prototype.ForeachSetting = function(fn) { return this.$val.ForeachSetting(fn); }; - http2Framer.ptr.prototype.WriteSettings = function(settings) { - var {$24r, _i, _r$1, _ref, f, s, settings, $s, $r, $c} = $restore(this, {settings}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.startWrite(4, 0, 0); - _ref = settings; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - s = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), http2Setting); - f.writeUint16(((s.ID << 16 >>> 16))); - f.writeUint32(s.Val); - _i++; - } - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteSettings, $c: true, $r, $24r, _i, _r$1, _ref, f, s, settings, $s};return $f; - }; - http2Framer.prototype.WriteSettings = function(settings) { return this.$val.WriteSettings(settings); }; - http2Framer.ptr.prototype.WriteSettingsAck = function() { - var {$24r, _r$1, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.startWrite(4, 1, 0); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteSettingsAck, $c: true, $r, $24r, _r$1, f, $s};return $f; - }; - http2Framer.prototype.WriteSettingsAck = function() { return this.$val.WriteSettingsAck(); }; - http2PingFrame.ptr.prototype.IsAck = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(1); - }; - http2PingFrame.prototype.IsAck = function() { return this.$val.IsAck(); }; - http2parsePingFrame = function(param, fh, countError, payload) { - var {countError, f, fh, param, payload, $s, $r, $c} = $restore(this, {param, fh, countError, payload}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((payload.$length === 8))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((payload.$length === 8))) { */ case 1: - $r = countError("frame_ping_length"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(6)]; - /* } */ case 2: - /* */ if (!((fh.StreamID === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((fh.StreamID === 0))) { */ case 4: - $r = countError("frame_ping_has_stream"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(1)]; - /* } */ case 5: - f = new http2PingFrame.ptr($clone(fh, http2FrameHeader), arrayType$8.zero()); - $copySlice(new sliceType$3(f.Data), payload); - $s = -1; return [f, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parsePingFrame, $c: true, $r, countError, f, fh, param, payload, $s};return $f; - }; - http2Framer.ptr.prototype.WritePing = function(ack, data) { - var {$24r, _r$1, ack, data, f, flags, $s, $r, $c} = $restore(this, {ack, data}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - flags = 0; - if (ack) { - flags = 1; - } - f.startWrite(6, flags, 0); - f.writeBytes(new sliceType$3(data)); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WritePing, $c: true, $r, $24r, _r$1, ack, data, f, flags, $s};return $f; - }; - http2Framer.prototype.WritePing = function(ack, data) { return this.$val.WritePing(ack, data); }; - http2GoAwayFrame.ptr.prototype.DebugData = function() { - var f; - f = this; - f.http2FrameHeader.checkValid(); - return f.debugData; - }; - http2GoAwayFrame.prototype.DebugData = function() { return this.$val.DebugData(); }; - http2parseGoAwayFrame = function(param, fh, countError, p) { - var {countError, fh, p, param, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((fh.StreamID === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((fh.StreamID === 0))) { */ case 1: - $r = countError("frame_goaway_has_stream"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(1)]; - /* } */ case 2: - /* */ if (p.$length < 8) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (p.$length < 8) { */ case 4: - $r = countError("frame_goaway_short"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(6)]; - /* } */ case 5: - $s = -1; return [new http2GoAwayFrame.ptr($clone(fh, http2FrameHeader), ($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)) & 2147483647) >>> 0, (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 4, 8)) >>> 0)), $subslice(p, 8)), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parseGoAwayFrame, $c: true, $r, countError, fh, p, param, $s};return $f; - }; - http2Framer.ptr.prototype.WriteGoAway = function(maxStreamID, code, debugData) { - var {$24r, _r$1, code, debugData, f, maxStreamID, $s, $r, $c} = $restore(this, {maxStreamID, code, debugData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.startWrite(7, 0, 0); - f.writeUint32((maxStreamID & 2147483647) >>> 0); - f.writeUint32(((code >>> 0))); - f.writeBytes(debugData); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteGoAway, $c: true, $r, $24r, _r$1, code, debugData, f, maxStreamID, $s};return $f; - }; - http2Framer.prototype.WriteGoAway = function(maxStreamID, code, debugData) { return this.$val.WriteGoAway(maxStreamID, code, debugData); }; - http2UnknownFrame.ptr.prototype.Payload = function() { - var f; - f = this; - f.http2FrameHeader.checkValid(); - return f.p; - }; - http2UnknownFrame.prototype.Payload = function() { return this.$val.Payload(); }; - http2parseUnknownFrame = function(param, fh, countError, p) { - var countError, fh, p, param; - return [new http2UnknownFrame.ptr($clone(fh, http2FrameHeader), p), $ifaceNil]; - }; - http2parseWindowUpdateFrame = function(param, fh, countError, p) { - var {countError, fh, inc, p, param, x$5, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((p.$length === 4))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((p.$length === 4))) { */ case 1: - $r = countError("frame_windowupdate_bad_len"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(6)]; - /* } */ case 2: - inc = ($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)) & 2147483647) >>> 0; - /* */ if (inc === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (inc === 0) { */ case 4: - /* */ if (fh.StreamID === 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (fh.StreamID === 0) { */ case 6: - $r = countError("frame_windowupdate_zero_inc_conn"); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(1)]; - /* } */ case 7: - $r = countError("frame_windowupdate_zero_inc_stream"); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, (x$5 = http2streamError(fh.StreamID, 1), new x$5.constructor.elem(x$5))]; - /* } */ case 5: - $s = -1; return [new http2WindowUpdateFrame.ptr($clone(fh, http2FrameHeader), inc), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parseWindowUpdateFrame, $c: true, $r, countError, fh, inc, p, param, x$5, $s};return $f; - }; - http2Framer.ptr.prototype.WriteWindowUpdate = function(streamID, incr) { - var {$24r, _r$1, f, incr, streamID, $s, $r, $c} = $restore(this, {streamID, incr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if ((incr < 1 || incr > 2147483647) && !f.AllowIllegalWrites) { - $s = -1; return errors.New("illegal window increment value"); - } - f.startWrite(8, 0, streamID); - f.writeUint32(incr); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteWindowUpdate, $c: true, $r, $24r, _r$1, f, incr, streamID, $s};return $f; - }; - http2Framer.prototype.WriteWindowUpdate = function(streamID, incr) { return this.$val.WriteWindowUpdate(streamID, incr); }; - http2HeadersFrame.ptr.prototype.HeaderBlockFragment = function() { - var f; - f = this; - f.http2FrameHeader.checkValid(); - return f.headerFragBuf; - }; - http2HeadersFrame.prototype.HeaderBlockFragment = function() { return this.$val.HeaderBlockFragment(); }; - http2HeadersFrame.ptr.prototype.HeadersEnded = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(4); - }; - http2HeadersFrame.prototype.HeadersEnded = function() { return this.$val.HeadersEnded(); }; - http2HeadersFrame.ptr.prototype.StreamEnded = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(1); - }; - http2HeadersFrame.prototype.StreamEnded = function() { return this.$val.StreamEnded(); }; - http2HeadersFrame.ptr.prototype.HasPriority = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(32); - }; - http2HeadersFrame.prototype.HasPriority = function() { return this.$val.HasPriority(); }; - http2parseHeadersFrame = function(param, fh, countError, p) { - var {_, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, countError, err, fh, hf, p, padLength, param, v, x$5, x$6, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = $ifaceNil; - err = $ifaceNil; - hf = new http2HeadersFrame.ptr($clone(fh, http2FrameHeader), new http2PriorityParam.ptr(0, false, 0), sliceType$3.nil); - /* */ if (fh.StreamID === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fh.StreamID === 0) { */ case 1: - $r = countError("frame_headers_zero_stream"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = $ifaceNil; - _tmp$1 = (x$5 = new http2connError.ptr(1, "HEADERS frame with stream ID 0"), new x$5.constructor.elem(x$5)); - _ = _tmp; - err = _tmp$1; - $s = -1; return [_, err]; - /* } */ case 2: - padLength = 0; - /* */ if (new http2Flags(fh.Flags).Has(8)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (new http2Flags(fh.Flags).Has(8)) { */ case 4: - _tuple = http2readByte(p); - p = _tuple[0]; - padLength = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $r = countError("frame_headers_pad_short"); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [_, err]; - /* } */ case 7: - /* } */ case 5: - /* */ if (new http2Flags(fh.Flags).Has(32)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (new http2Flags(fh.Flags).Has(32)) { */ case 9: - v = 0; - _tuple$1 = http2readUint32(p); - p = _tuple$1[0]; - v = _tuple$1[1]; - err = _tuple$1[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: - $r = countError("frame_headers_prio_short"); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = $ifaceNil; - _tmp$3 = err; - _ = _tmp$2; - err = _tmp$3; - $s = -1; return [_, err]; - /* } */ case 12: - hf.Priority.StreamDep = (v & 2147483647) >>> 0; - hf.Priority.Exclusive = !((v === hf.Priority.StreamDep)); - _tuple$2 = http2readByte(p); - p = _tuple$2[0]; - hf.Priority.Weight = _tuple$2[1]; - err = _tuple$2[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - $r = countError("frame_headers_prio_weight_short"); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$4 = $ifaceNil; - _tmp$5 = err; - _ = _tmp$4; - err = _tmp$5; - $s = -1; return [_, err]; - /* } */ case 15: - /* } */ case 10: - /* */ if ((p.$length - ((padLength >> 0)) >> 0) < 0) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if ((p.$length - ((padLength >> 0)) >> 0) < 0) { */ case 17: - $r = countError("frame_headers_pad_too_big"); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$6 = $ifaceNil; - _tmp$7 = (x$6 = http2streamError(fh.StreamID, 1), new x$6.constructor.elem(x$6)); - _ = _tmp$6; - err = _tmp$7; - $s = -1; return [_, err]; - /* } */ case 18: - hf.headerFragBuf = $subslice(p, 0, (p.$length - ((padLength >> 0)) >> 0)); - _tmp$8 = hf; - _tmp$9 = $ifaceNil; - _ = _tmp$8; - err = _tmp$9; - $s = -1; return [_, err]; - /* */ } return; } var $f = {$blk: http2parseHeadersFrame, $c: true, $r, _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, countError, err, fh, hf, p, padLength, param, v, x$5, x$6, $s};return $f; - }; - http2Framer.ptr.prototype.WriteHeaders = function(p) { - var {$24r, _r$1, f, flags, p, v, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!http2validStreamID(p.StreamID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - flags = 0; - if (!((p.PadLength === 0))) { - flags = (flags | (8)) >>> 0; - } - if (p.EndStream) { - flags = (flags | (1)) >>> 0; - } - if (p.EndHeaders) { - flags = (flags | (4)) >>> 0; - } - if (!$clone(p.Priority, http2PriorityParam).IsZero()) { - flags = (flags | (32)) >>> 0; - } - f.startWrite(1, flags, p.StreamID); - if (!((p.PadLength === 0))) { - f.writeByte(p.PadLength); - } - if (!$clone(p.Priority, http2PriorityParam).IsZero()) { - v = p.Priority.StreamDep; - if (!http2validStreamIDOrZero(v) && !f.AllowIllegalWrites) { - $s = -1; return http2errDepStreamID; - } - if (p.Priority.Exclusive) { - v = (v | (2147483648)) >>> 0; - } - f.writeUint32(v); - f.writeByte(p.Priority.Weight); - } - f.wbuf = $appendSlice(f.wbuf, p.BlockFragment); - f.wbuf = $appendSlice(f.wbuf, $subslice(http2padZeros, 0, p.PadLength)); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteHeaders, $c: true, $r, $24r, _r$1, f, flags, p, v, $s};return $f; - }; - http2Framer.prototype.WriteHeaders = function(p) { return this.$val.WriteHeaders(p); }; - http2PriorityParam.ptr.prototype.IsZero = function() { - var p; - p = this; - return $equal(p, new http2PriorityParam.ptr(0, false, 0), http2PriorityParam); - }; - http2PriorityParam.prototype.IsZero = function() { return this.$val.IsZero(); }; - http2parsePriorityFrame = function(param, fh, countError, payload) { - var {$24r, _r$1, countError, fh, param, payload, streamID, v, x$5, x$6, $s, $r, $c} = $restore(this, {param, fh, countError, payload}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (fh.StreamID === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fh.StreamID === 0) { */ case 1: - $r = countError("frame_priority_zero_stream"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, (x$5 = new http2connError.ptr(1, "PRIORITY frame with stream ID 0"), new x$5.constructor.elem(x$5))]; - /* } */ case 2: - /* */ if (!((payload.$length === 5))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((payload.$length === 5))) { */ case 4: - $r = countError("frame_priority_bad_length"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = fmt.Sprintf("PRIORITY frame payload size was %d; want 5", new sliceType([new $Int(payload.$length)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [$ifaceNil, (x$6 = new http2connError.ptr(6, _r$1), new x$6.constructor.elem(x$6))]; - $s = 8; case 8: return $24r; - /* } */ case 5: - v = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(payload, 0, 4)); - streamID = (v & 2147483647) >>> 0; - $s = -1; return [new http2PriorityFrame.ptr($clone(fh, http2FrameHeader), new http2PriorityParam.ptr(streamID, !((streamID === v)), (4 >= payload.$length ? ($throwRuntimeError("index out of range"), undefined) : payload.$array[payload.$offset + 4]))), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parsePriorityFrame, $c: true, $r, $24r, _r$1, countError, fh, param, payload, streamID, v, x$5, x$6, $s};return $f; - }; - http2Framer.ptr.prototype.WritePriority = function(streamID, p) { - var {$24r, _r$1, f, p, streamID, v, $s, $r, $c} = $restore(this, {streamID, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - if (!http2validStreamIDOrZero(p.StreamDep)) { - $s = -1; return http2errDepStreamID; - } - f.startWrite(2, 0, streamID); - v = p.StreamDep; - if (p.Exclusive) { - v = (v | (2147483648)) >>> 0; - } - f.writeUint32(v); - f.writeByte(p.Weight); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WritePriority, $c: true, $r, $24r, _r$1, f, p, streamID, v, $s};return $f; - }; - http2Framer.prototype.WritePriority = function(streamID, p) { return this.$val.WritePriority(streamID, p); }; - http2parseRSTStreamFrame = function(param, fh, countError, p) { - var {countError, fh, p, param, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!((p.$length === 4))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((p.$length === 4))) { */ case 1: - $r = countError("frame_rststream_bad_len"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(6)]; - /* } */ case 2: - /* */ if (fh.StreamID === 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (fh.StreamID === 0) { */ case 4: - $r = countError("frame_rststream_zero_stream"); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, new http2ConnectionError(1)]; - /* } */ case 5: - $s = -1; return [new http2RSTStreamFrame.ptr($clone(fh, http2FrameHeader), (($clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)) >>> 0))), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parseRSTStreamFrame, $c: true, $r, countError, fh, p, param, $s};return $f; - }; - http2Framer.ptr.prototype.WriteRSTStream = function(streamID, code) { - var {$24r, _r$1, code, f, streamID, $s, $r, $c} = $restore(this, {streamID, code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - f.startWrite(3, 0, streamID); - f.writeUint32(((code >>> 0))); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteRSTStream, $c: true, $r, $24r, _r$1, code, f, streamID, $s};return $f; - }; - http2Framer.prototype.WriteRSTStream = function(streamID, code) { return this.$val.WriteRSTStream(streamID, code); }; - http2parseContinuationFrame = function(param, fh, countError, p) { - var {countError, fh, p, param, x$5, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (fh.StreamID === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fh.StreamID === 0) { */ case 1: - $r = countError("frame_continuation_zero_stream"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, (x$5 = new http2connError.ptr(1, "CONTINUATION frame with stream ID 0"), new x$5.constructor.elem(x$5))]; - /* } */ case 2: - $s = -1; return [new http2ContinuationFrame.ptr($clone(fh, http2FrameHeader), p), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2parseContinuationFrame, $c: true, $r, countError, fh, p, param, x$5, $s};return $f; - }; - http2ContinuationFrame.ptr.prototype.HeaderBlockFragment = function() { - var f; - f = this; - f.http2FrameHeader.checkValid(); - return f.headerFragBuf; - }; - http2ContinuationFrame.prototype.HeaderBlockFragment = function() { return this.$val.HeaderBlockFragment(); }; - http2ContinuationFrame.ptr.prototype.HeadersEnded = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(4); - }; - http2ContinuationFrame.prototype.HeadersEnded = function() { return this.$val.HeadersEnded(); }; - http2Framer.ptr.prototype.WriteContinuation = function(streamID, endHeaders, headerBlockFragment) { - var {$24r, _r$1, endHeaders, f, flags, headerBlockFragment, streamID, $s, $r, $c} = $restore(this, {streamID, endHeaders, headerBlockFragment}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!http2validStreamID(streamID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - flags = 0; - if (endHeaders) { - flags = (flags | (4)) >>> 0; - } - f.startWrite(9, flags, streamID); - f.wbuf = $appendSlice(f.wbuf, headerBlockFragment); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteContinuation, $c: true, $r, $24r, _r$1, endHeaders, f, flags, headerBlockFragment, streamID, $s};return $f; - }; - http2Framer.prototype.WriteContinuation = function(streamID, endHeaders, headerBlockFragment) { return this.$val.WriteContinuation(streamID, endHeaders, headerBlockFragment); }; - http2PushPromiseFrame.ptr.prototype.HeaderBlockFragment = function() { - var f; - f = this; - f.http2FrameHeader.checkValid(); - return f.headerFragBuf; - }; - http2PushPromiseFrame.prototype.HeaderBlockFragment = function() { return this.$val.HeaderBlockFragment(); }; - http2PushPromiseFrame.ptr.prototype.HeadersEnded = function() { - var f; - f = this; - return new http2Flags(f.http2FrameHeader.Flags).Has(4); - }; - http2PushPromiseFrame.prototype.HeadersEnded = function() { return this.$val.HeadersEnded(); }; - http2parsePushPromise = function(param, fh, countError, p) { - var {_, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, countError, err, fh, p, padLength, param, pp, $s, $r, $c} = $restore(this, {param, fh, countError, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ = $ifaceNil; - err = $ifaceNil; - pp = new http2PushPromiseFrame.ptr($clone(fh, http2FrameHeader), 0, sliceType$3.nil); - /* */ if (pp.http2FrameHeader.StreamID === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (pp.http2FrameHeader.StreamID === 0) { */ case 1: - $r = countError("frame_pushpromise_zero_stream"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp = $ifaceNil; - _tmp$1 = new http2ConnectionError(1); - _ = _tmp; - err = _tmp$1; - $s = -1; return [_, err]; - /* } */ case 2: - padLength = 0; - /* */ if (new http2Flags(fh.Flags).Has(8)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (new http2Flags(fh.Flags).Has(8)) { */ case 4: - _tuple = http2readByte(p); - p = _tuple[0]; - padLength = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $r = countError("frame_pushpromise_pad_short"); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [_, err]; - /* } */ case 7: - /* } */ case 5: - _tuple$1 = http2readUint32(p); - p = _tuple$1[0]; - pp.PromiseID = _tuple$1[1]; - err = _tuple$1[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 9: - $r = countError("frame_pushpromise_promiseid_short"); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [_, err]; - /* } */ case 10: - pp.PromiseID = (pp.PromiseID & 2147483647) >>> 0; - /* */ if (((padLength >> 0)) > p.$length) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (((padLength >> 0)) > p.$length) { */ case 12: - $r = countError("frame_pushpromise_pad_too_big"); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$2 = $ifaceNil; - _tmp$3 = new http2ConnectionError(1); - _ = _tmp$2; - err = _tmp$3; - $s = -1; return [_, err]; - /* } */ case 13: - pp.headerFragBuf = $subslice(p, 0, (p.$length - ((padLength >> 0)) >> 0)); - _tmp$4 = pp; - _tmp$5 = $ifaceNil; - _ = _tmp$4; - err = _tmp$5; - $s = -1; return [_, err]; - /* */ } return; } var $f = {$blk: http2parsePushPromise, $c: true, $r, _, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tuple, _tuple$1, countError, err, fh, p, padLength, param, pp, $s};return $f; - }; - http2Framer.ptr.prototype.WritePushPromise = function(p) { - var {$24r, _r$1, f, flags, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - if (!http2validStreamID(p.StreamID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - flags = 0; - if (!((p.PadLength === 0))) { - flags = (flags | (8)) >>> 0; - } - if (p.EndHeaders) { - flags = (flags | (4)) >>> 0; - } - f.startWrite(5, flags, p.StreamID); - if (!((p.PadLength === 0))) { - f.writeByte(p.PadLength); - } - if (!http2validStreamID(p.PromiseID) && !f.AllowIllegalWrites) { - $s = -1; return http2errStreamID; - } - f.writeUint32(p.PromiseID); - f.wbuf = $appendSlice(f.wbuf, p.BlockFragment); - f.wbuf = $appendSlice(f.wbuf, $subslice(http2padZeros, 0, p.PadLength)); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WritePushPromise, $c: true, $r, $24r, _r$1, f, flags, p, $s};return $f; - }; - http2Framer.prototype.WritePushPromise = function(p) { return this.$val.WritePushPromise(p); }; - http2Framer.ptr.prototype.WriteRawFrame = function(t, flags, streamID, payload) { - var {$24r, _r$1, f, flags, payload, streamID, t, $s, $r, $c} = $restore(this, {t, flags, streamID, payload}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this; - f.startWrite(t, flags, streamID); - f.writeBytes(payload); - _r$1 = f.endWrite(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Framer.ptr.prototype.WriteRawFrame, $c: true, $r, $24r, _r$1, f, flags, payload, streamID, t, $s};return $f; - }; - http2Framer.prototype.WriteRawFrame = function(t, flags, streamID, payload) { return this.$val.WriteRawFrame(t, flags, streamID, payload); }; - http2readByte = function(p) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, b, err, p, remain; - remain = sliceType$3.nil; - b = 0; - err = $ifaceNil; - if (p.$length === 0) { - _tmp = sliceType$3.nil; - _tmp$1 = 0; - _tmp$2 = io.ErrUnexpectedEOF; - remain = _tmp; - b = _tmp$1; - err = _tmp$2; - return [remain, b, err]; - } - _tmp$3 = $subslice(p, 1); - _tmp$4 = (0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]); - _tmp$5 = $ifaceNil; - remain = _tmp$3; - b = _tmp$4; - err = _tmp$5; - return [remain, b, err]; - }; - http2readUint32 = function(p) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, err, p, remain, v; - remain = sliceType$3.nil; - v = 0; - err = $ifaceNil; - if (p.$length < 4) { - _tmp = sliceType$3.nil; - _tmp$1 = 0; - _tmp$2 = io.ErrUnexpectedEOF; - remain = _tmp; - v = _tmp$1; - err = _tmp$2; - return [remain, v, err]; - } - _tmp$3 = $subslice(p, 4); - _tmp$4 = $clone(binary.BigEndian, binary.bigEndian).Uint32($subslice(p, 0, 4)); - _tmp$5 = $ifaceNil; - remain = _tmp$3; - v = _tmp$4; - err = _tmp$5; - return [remain, v, err]; - }; - http2MetaHeadersFrame.ptr.prototype.PseudoValue = function(pseudo) { - var _i, _ref, hf, mh, pseudo; - mh = this; - _ref = mh.Fields; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - if (!$clone(hf, hpack.HeaderField).IsPseudo()) { - return ""; - } - if ($substring(hf.Name, 1) === pseudo) { - return hf.Value; - } - _i++; - } - return ""; - }; - http2MetaHeadersFrame.prototype.PseudoValue = function(pseudo) { return this.$val.PseudoValue(pseudo); }; - http2MetaHeadersFrame.ptr.prototype.RegularFields = function() { - var _i, _ref, hf, i, mh; - mh = this; - _ref = mh.Fields; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - if (!$clone(hf, hpack.HeaderField).IsPseudo()) { - return $subslice(mh.Fields, i); - } - _i++; - } - return sliceType$22.nil; - }; - http2MetaHeadersFrame.prototype.RegularFields = function() { return this.$val.RegularFields(); }; - http2MetaHeadersFrame.ptr.prototype.PseudoFields = function() { - var _i, _ref, hf, i, mh; - mh = this; - _ref = mh.Fields; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - if (!$clone(hf, hpack.HeaderField).IsPseudo()) { - return $subslice(mh.Fields, 0, i); - } - _i++; - } - return mh.Fields; - }; - http2MetaHeadersFrame.prototype.PseudoFields = function() { return this.$val.PseudoFields(); }; - http2MetaHeadersFrame.ptr.prototype.checkPseudos = function() { - var _1, _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, hf, hf2, i, isRequest, isResponse, mh, pf; - mh = this; - _tmp = false; - _tmp$1 = false; - isRequest = _tmp; - isResponse = _tmp$1; - pf = mh.PseudoFields(); - _ref = pf; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - _1 = hf.Name; - if (_1 === (":method") || _1 === (":path") || _1 === (":scheme") || _1 === (":authority")) { - isRequest = true; - } else if (_1 === (":status")) { - isResponse = true; - } else { - return new http2pseudoHeaderError((hf.Name)); - } - _ref$1 = $subslice(pf, 0, i); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - hf2 = $clone(((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]), hpack.HeaderField); - if (hf.Name === hf2.Name) { - return new http2duplicatePseudoHeaderError((hf.Name)); - } - _i$1++; - } - _i++; - } - if (isRequest && isResponse) { - return http2errMixPseudoHeaderTypes; - } - return $ifaceNil; - }; - http2MetaHeadersFrame.prototype.checkPseudos = function() { return this.$val.checkPseudos(); }; - http2Framer.ptr.prototype.maxHeaderStringLen = function() { - var fr, v; - fr = this; - v = fr.maxHeaderListSize(); - if (((((v >> 0)) >>> 0)) === v) { - return ((v >> 0)); - } - return 0; - }; - http2Framer.prototype.maxHeaderStringLen = function() { return this.$val.maxHeaderStringLen(); }; - http2Framer.ptr.prototype.readMetaFrame = function(hf) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, err, err$1, err$2, err$3, f, fr, frag, hc, hdec, hf, invalid, mh, remainSize, sawRegular, x$5, x$6, $s, $deferred, $r, $c} = $restore(this, {hf}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - fr = [fr]; - hdec = [hdec]; - invalid = [invalid]; - mh = [mh]; - remainSize = [remainSize]; - sawRegular = [sawRegular]; - fr[0] = this; - /* */ if (fr[0].AllowIllegalReads) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (fr[0].AllowIllegalReads) { */ case 1: - $24r = [ptrType$76.nil, errors.New("illegal use of AllowIllegalReads with ReadMetaHeaders")]; - $s = 3; case 3: return $24r; - /* } */ case 2: - mh[0] = new http2MetaHeadersFrame.ptr(hf, sliceType$22.nil, false); - remainSize[0] = fr[0].maxHeaderListSize(); - sawRegular[0] = false; - invalid[0] = $ifaceNil; - hdec[0] = fr[0].ReadMetaHeaders; - hdec[0].SetEmitEnabled(true); - hdec[0].SetMaxStringLength(fr[0].maxHeaderStringLen()); - hdec[0].SetEmitFunc((function(fr, hdec, invalid, mh, remainSize, sawRegular) { return function $b(hf$1) { - var {hf$1, isPseudo, size, $s, $r, $c} = $restore(this, {hf$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (http2VerboseLogs && fr[0].logReads) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (http2VerboseLogs && fr[0].logReads) { */ case 1: - $r = fr[0].debugReadLoggerf("http2: decoded hpack field %+v", new sliceType([new hf$1.constructor.elem(hf$1)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (!httpguts.ValidHeaderFieldValue(hf$1.Value)) { - invalid[0] = new http2headerFieldValueError((hf$1.Value)); - } - isPseudo = strings.HasPrefix(hf$1.Name, ":"); - if (isPseudo) { - if (sawRegular[0]) { - invalid[0] = http2errPseudoAfterRegular; - } - } else { - sawRegular[0] = true; - if (!http2validWireHeaderFieldName(hf$1.Name)) { - invalid[0] = new http2headerFieldNameError((hf$1.Name)); - } - } - if (!($interfaceIsEqual(invalid[0], $ifaceNil))) { - hdec[0].SetEmitEnabled(false); - $s = -1; return; - } - size = $clone(hf$1, hpack.HeaderField).Size(); - if (size > remainSize[0]) { - hdec[0].SetEmitEnabled(false); - mh[0].Truncated = true; - $s = -1; return; - } - remainSize[0] = remainSize[0] - (size) >>> 0; - mh[0].Fields = $append(mh[0].Fields, hf$1); - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, hf$1, isPseudo, size, $s};return $f; - }; })(fr, hdec, invalid, mh, remainSize, sawRegular)); - $deferred.push([$methodVal(hdec[0], "SetEmitFunc"), [(function(fr, hdec, invalid, mh, remainSize, sawRegular) { return function(hf$1) { - var hf$1; - }; })(fr, hdec, invalid, mh, remainSize, sawRegular)]]); - hc = hf; - /* while (true) { */ case 4: - _r$1 = hc.HeaderBlockFragment(); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - frag = _r$1; - _r$2 = hdec[0].Write(frag); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: - $24r$1 = [ptrType$76.nil, new http2ConnectionError(9)]; - $s = 10; case 10: return $24r$1; - /* } */ case 9: - _r$3 = hc.HeadersEnded(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$3) { */ case 11: - /* break; */ $s = 5; continue; - /* } */ case 12: - _r$4 = fr[0].ReadFrame(); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - f = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 15: - $24r$2 = [ptrType$76.nil, err$1]; - $s = 18; case 18: return $24r$2; - /* } else { */ case 16: - hc = $assertType(f, ptrType$77); - /* } */ case 17: - $s = 4; continue; - case 5: - mh[0].http2HeadersFrame.headerFragBuf = sliceType$3.nil; - mh[0].http2HeadersFrame.http2FrameHeader.invalidate(); - err$2 = hdec[0].Close(); - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 19: - $24r$3 = [ptrType$76.nil, new http2ConnectionError(9)]; - $s = 21; case 21: return $24r$3; - /* } */ case 20: - /* */ if (!($interfaceIsEqual(invalid[0], $ifaceNil))) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!($interfaceIsEqual(invalid[0], $ifaceNil))) { */ case 22: - fr[0].errDetail = invalid[0]; - /* */ if (http2VerboseLogs) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (http2VerboseLogs) { */ case 24: - $r = log.Printf("http2: invalid header: %v", new sliceType([invalid[0]])); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 25: - $24r$4 = [ptrType$76.nil, (x$5 = new http2StreamError.ptr(mh[0].http2HeadersFrame.http2FrameHeader.StreamID, 1, invalid[0]), new x$5.constructor.elem(x$5))]; - $s = 27; case 27: return $24r$4; - /* } */ case 23: - err$3 = mh[0].checkPseudos(); - /* */ if (!($interfaceIsEqual(err$3, $ifaceNil))) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!($interfaceIsEqual(err$3, $ifaceNil))) { */ case 28: - fr[0].errDetail = err$3; - /* */ if (http2VerboseLogs) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (http2VerboseLogs) { */ case 30: - $r = log.Printf("http2: invalid pseudo headers: %v", new sliceType([err$3])); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 31: - $24r$5 = [ptrType$76.nil, (x$6 = new http2StreamError.ptr(mh[0].http2HeadersFrame.http2FrameHeader.StreamID, 1, err$3), new x$6.constructor.elem(x$6))]; - $s = 33; case 33: return $24r$5; - /* } */ case 29: - $24r$6 = [mh[0], $ifaceNil]; - $s = 34; case 34: return $24r$6; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType$76.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2Framer.ptr.prototype.readMetaFrame, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, err, err$1, err$2, err$3, f, fr, frag, hc, hdec, hf, invalid, mh, remainSize, sawRegular, x$5, x$6, $s, $deferred};return $f; } } - }; - http2Framer.prototype.readMetaFrame = function(hf) { return this.$val.readMetaFrame(hf); }; - http2summarizeFrame = function(f) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, buf, data, f, f$1, f$2, f$3, f$4, f$5, f$6, n, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - buf = [buf]; - n = [n]; - buf[0] = new bytes.Buffer.ptr(sliceType$3.nil, 0, 0); - _r$1 = f.Header(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = $clone(_r$1, http2FrameHeader).writeDebug(buf[0]); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = f; - /* */ if ($assertType(_ref, ptrType$78, true)[1]) { $s = 3; continue; } - /* */ if ($assertType(_ref, ptrType$79, true)[1]) { $s = 4; continue; } - /* */ if ($assertType(_ref, ptrType$80, true)[1]) { $s = 5; continue; } - /* */ if ($assertType(_ref, ptrType$81, true)[1]) { $s = 6; continue; } - /* */ if ($assertType(_ref, ptrType$82, true)[1]) { $s = 7; continue; } - /* */ if ($assertType(_ref, ptrType$83, true)[1]) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($assertType(_ref, ptrType$78, true)[1]) { */ case 3: - f$1 = _ref.$val; - n[0] = 0; - _r$2 = f$1.ForeachSetting((function(buf, n) { return function $b(s) { - var {_r$2, _r$3, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n[0] = n[0] + (1) >> 0; - /* */ if (n[0] === 1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (n[0] === 1) { */ case 1: - _r$2 = buf[0].WriteString(", settings:"); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 2: - _r$3 = fmt.Fprintf(buf[0], " %v=%v,", new sliceType([new http2SettingID(s.ID), new $Uint32(s.Val)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, s, $s};return $f; - }; })(buf, n)); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - if (n[0] > 0) { - buf[0].Truncate(buf[0].Len() - 1 >> 0); - } - $s = 9; continue; - /* } else if ($assertType(_ref, ptrType$79, true)[1]) { */ case 4: - f$2 = _ref.$val; - data = f$2.Data(); - if (data.$length > 256) { - data = $subslice(data, 0, 256); - } - _r$3 = fmt.Fprintf(buf[0], " data=%q", new sliceType([data])); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* */ if (f$2.Data().$length > 256) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (f$2.Data().$length > 256) { */ case 12: - _r$4 = fmt.Fprintf(buf[0], " (%d bytes omitted)", new sliceType([new $Int((f$2.Data().$length - 256 >> 0))])); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 13: - $s = 9; continue; - /* } else if ($assertType(_ref, ptrType$80, true)[1]) { */ case 5: - f$3 = _ref.$val; - /* */ if (f$3.http2FrameHeader.StreamID === 0) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (f$3.http2FrameHeader.StreamID === 0) { */ case 15: - _r$5 = buf[0].WriteString(" (conn)"); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 16: - _r$6 = fmt.Fprintf(buf[0], " incr=%v", new sliceType([new $Uint32(f$3.Increment)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = 9; continue; - /* } else if ($assertType(_ref, ptrType$81, true)[1]) { */ case 6: - f$4 = _ref.$val; - _r$7 = fmt.Fprintf(buf[0], " ping=%q", new sliceType([new sliceType$3(f$4.Data)])); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $s = 9; continue; - /* } else if ($assertType(_ref, ptrType$82, true)[1]) { */ case 7: - f$5 = _ref.$val; - _r$8 = fmt.Fprintf(buf[0], " LastStreamID=%v ErrCode=%v Debug=%q", new sliceType([new $Uint32(f$5.LastStreamID), new http2ErrCode(f$5.ErrCode), f$5.debugData])); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - $s = 9; continue; - /* } else if ($assertType(_ref, ptrType$83, true)[1]) { */ case 8: - f$6 = _ref.$val; - _r$9 = fmt.Fprintf(buf[0], " ErrCode=%v", new sliceType([new http2ErrCode(f$6.ErrCode)])); /* */ $s = 21; case 21: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* } */ case 9: - $s = -1; return buf[0].String(); - /* */ } return; } var $f = {$blk: http2summarizeFrame, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, buf, data, f, f$1, f$2, f$3, f$4, f$5, f$6, n, $s};return $f; - }; - http2traceHasWroteHeaderField = function(trace) { - var trace; - return !(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError); - }; - http2traceWroteHeaderField = function(trace, k, v) { - var {k, trace, v, $s, $r, $c} = $restore(this, {trace, k, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaderField === $throwNilPointerError)) { */ case 1: - $r = trace.WroteHeaderField(k, new sliceType$2([v])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceWroteHeaderField, $c: true, $r, k, trace, v, $s};return $f; - }; - http2traceGot1xxResponseFunc = function(trace) { - var trace; - if (!(trace === ptrType$19.nil)) { - return trace.Got1xxResponse; - } - return $throwNilPointerError; - }; - http2Transport.ptr.prototype.dialTLSWithContext = function(ctx, network, addr, cfg) { - var {_r$1, _tuple, addr, cfg, cn, ctx, dialer, err, network, t, tlsCn, $s, $r, $c} = $restore(this, {ctx, network, addr, cfg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - dialer = new tls.Dialer.ptr(ptrType$84.nil, cfg); - _r$1 = dialer.DialContext(ctx, network, addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - cn = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$30.nil, err]; - } - tlsCn = $assertType(cn, ptrType$30); - $s = -1; return [tlsCn, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.dialTLSWithContext, $c: true, $r, _r$1, _tuple, addr, cfg, cn, ctx, dialer, err, network, t, tlsCn, $s};return $f; - }; - http2Transport.prototype.dialTLSWithContext = function(ctx, network, addr, cfg) { return this.$val.dialTLSWithContext(ctx, network, addr, cfg); }; - http2newGoroutineLock = function() { - var {$24r, _r$1, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!http2DebugGoroutines) { - $s = -1; return new http2goroutineLock(0, 0); - } - _r$1 = http2curGoroutineID(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = ((x$5 = _r$1, new http2goroutineLock(x$5.$high, x$5.$low))); - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2newGoroutineLock, $c: true, $r, $24r, _r$1, x$5, $s};return $f; - }; - http2goroutineLock.prototype.check = function() { - var {_r$1, g, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this; - if (!http2DebugGoroutines) { - $s = -1; return; - } - _r$1 = http2curGoroutineID(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!((x$5 = _r$1, x$6 = (new $Uint64(g.$high, g.$low)), (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((x$5 = _r$1, x$6 = (new $Uint64(g.$high, g.$low)), (x$5.$high === x$6.$high && x$5.$low === x$6.$low)))) { */ case 1: - $panic(new $String("running on the wrong goroutine")); - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2goroutineLock.prototype.check, $c: true, $r, _r$1, g, x$5, x$6, $s};return $f; - }; - $ptrType(http2goroutineLock).prototype.check = function() { return this.$get().check(); }; - http2goroutineLock.prototype.checkNotOn = function() { - var {_r$1, g, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this; - if (!http2DebugGoroutines) { - $s = -1; return; - } - _r$1 = http2curGoroutineID(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if ((x$5 = _r$1, x$6 = (new $Uint64(g.$high, g.$low)), (x$5.$high === x$6.$high && x$5.$low === x$6.$low))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((x$5 = _r$1, x$6 = (new $Uint64(g.$high, g.$low)), (x$5.$high === x$6.$high && x$5.$low === x$6.$low))) { */ case 1: - $panic(new $String("running on the wrong goroutine")); - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2goroutineLock.prototype.checkNotOn, $c: true, $r, _r$1, g, x$5, x$6, $s};return $f; - }; - $ptrType(http2goroutineLock).prototype.checkNotOn = function() { return this.$get().checkNotOn(); }; - http2curGoroutineID = function() { - var {$24r, _r$1, _r$2, _r$3, _tuple, b, bp, err, i, n, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r$1 = http2littleBuf.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - bp = $assertType(_r$1, ptrType$6); - $deferred.push([$methodVal(http2littleBuf, "Put"), [bp]]); - b = bp.$get(); - b = $subslice(b, 0, runtime.Stack(b, false)); - b = bytes.TrimPrefix(b, http2goroutineSpace); - i = bytes.IndexByte(b, 32); - /* */ if (i < 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (i < 0) { */ case 2: - _r$2 = fmt.Sprintf("No space found in %q", new sliceType([b])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $panic(new $String(_r$2)); - /* } */ case 3: - b = $subslice(b, 0, i); - _tuple = http2parseUintBytes(b, 10, 64); - n = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - _r$3 = fmt.Sprintf("Failed to parse goroutine ID out of %q: %v", new sliceType([b, err])); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $panic(new $String(_r$3)); - /* } */ case 6: - $24r = n; - $s = 8; case 8: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return new $Uint64(0, 0); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2curGoroutineID, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, b, bp, err, i, n, $s, $deferred};return $f; } } - }; - http2parseUintBytes = function(s, base, bitSize) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, base, bitSize, cutoff, d, err, i, maxVal, n, n1, s, s0, v, x$5, x$6, $s; - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = new $Uint64(0, 0); - err = $ifaceNil; - _tmp = new $Uint64(0, 0); - _tmp$1 = new $Uint64(0, 0); - cutoff = _tmp; - maxVal = _tmp$1; - if (bitSize === 0) { - bitSize = 32; - } - s0 = s; - /* */ if (s.$length < 1) { $s = 2; continue; } - /* */ if (2 <= base && base <= 36) { $s = 3; continue; } - /* */ if ((base === 0)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (s.$length < 1) { */ case 2: - err = strconv.ErrSyntax; - /* goto Error */ $s = 7; continue; - $s = 6; continue; - /* } else if (2 <= base && base <= 36) { */ case 3: - $s = 6; continue; - /* } else if ((base === 0)) { */ case 4: - /* */ if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48) && s.$length > 1 && (((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 120) || ((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 88))) { $s = 9; continue; } - /* */ if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48) && s.$length > 1 && (((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 120) || ((1 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 1]) === 88))) { */ case 9: - base = 16; - s = $subslice(s, 2); - /* */ if (s.$length < 1) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (s.$length < 1) { */ case 13: - err = strconv.ErrSyntax; - /* goto Error */ $s = 7; continue; - /* } */ case 14: - $s = 12; continue; - /* } else if (((0 >= s.$length ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + 0]) === 48)) { */ case 10: - base = 8; - $s = 12; continue; - /* } else { */ case 11: - base = 10; - /* } */ case 12: - case 8: - $s = 6; continue; - /* } else { */ case 5: - err = errors.New("invalid base " + strconv.Itoa(base)); - /* goto Error */ $s = 7; continue; - /* } */ case 6: - case 1: - n = new $Uint64(0, 0); - cutoff = http2cutoff64(base); - maxVal = (x$5 = $shiftLeft64(new $Uint64(0, 1), ((bitSize >>> 0))), new $Uint64(x$5.$high - 0, x$5.$low - 1)); - i = 0; - /* while (true) { */ case 15: - /* if (!(i < s.$length)) { break; } */ if(!(i < s.$length)) { $s = 16; continue; } - v = 0; - d = ((i < 0 || i >= s.$length) ? ($throwRuntimeError("index out of range"), undefined) : s.$array[s.$offset + i]); - /* */ if (48 <= d && d <= 57) { $s = 18; continue; } - /* */ if (97 <= d && d <= 122) { $s = 19; continue; } - /* */ if (65 <= d && d <= 90) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (48 <= d && d <= 57) { */ case 18: - v = d - 48 << 24 >>> 24; - $s = 22; continue; - /* } else if (97 <= d && d <= 122) { */ case 19: - v = (d - 97 << 24 >>> 24) + 10 << 24 >>> 24; - $s = 22; continue; - /* } else if (65 <= d && d <= 90) { */ case 20: - v = (d - 65 << 24 >>> 24) + 10 << 24 >>> 24; - $s = 22; continue; - /* } else { */ case 21: - n = new $Uint64(0, 0); - err = strconv.ErrSyntax; - /* goto Error */ $s = 7; continue; - /* } */ case 22: - case 17: - /* */ if (((v >> 0)) >= base) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (((v >> 0)) >= base) { */ case 23: - n = new $Uint64(0, 0); - err = strconv.ErrSyntax; - /* goto Error */ $s = 7; continue; - /* } */ case 24: - /* */ if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if ((n.$high > cutoff.$high || (n.$high === cutoff.$high && n.$low >= cutoff.$low))) { */ case 25: - n = new $Uint64(4294967295, 4294967295); - err = strconv.ErrRange; - /* goto Error */ $s = 7; continue; - /* } */ case 26: - n = $mul64(n, ((new $Uint64(0, base)))); - n1 = (x$6 = (new $Uint64(0, v)), new $Uint64(n.$high + x$6.$high, n.$low + x$6.$low)); - /* */ if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if ((n1.$high < n.$high || (n1.$high === n.$high && n1.$low < n.$low)) || (n1.$high > maxVal.$high || (n1.$high === maxVal.$high && n1.$low > maxVal.$low))) { */ case 27: - n = new $Uint64(4294967295, 4294967295); - err = strconv.ErrRange; - /* goto Error */ $s = 7; continue; - /* } */ case 28: - n = n1; - i = i + (1) >> 0; - $s = 15; continue; - case 16: - _tmp$2 = n; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - /* Error: */ case 7: - _tmp$4 = n; - _tmp$5 = new strconv.NumError.ptr("ParseUint", ($bytesToString(s0)), err); - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - /* */ } return; } - }; - http2cutoff64 = function(base) { - var base, x$5; - if (base < 2) { - return new $Uint64(0, 0); - } - return (x$5 = $div64(new $Uint64(4294967295, 4294967295), (new $Uint64(0, base)), false), new $Uint64(x$5.$high + 0, x$5.$low + 1)); - }; - http2buildCommonHeaderMapsOnce = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = http2commonBuildOnce.Do(http2buildCommonHeaderMaps); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2buildCommonHeaderMapsOnce, $c: true, $r, $s};return $f; - }; - http2buildCommonHeaderMaps = function() { - var {_i, _key, _key$1, _r$1, _ref, chk, common, v, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - common = new sliceType$2(["accept", "accept-charset", "accept-encoding", "accept-language", "accept-ranges", "age", "access-control-allow-origin", "allow", "authorization", "cache-control", "content-disposition", "content-encoding", "content-language", "content-length", "content-location", "content-range", "content-type", "cookie", "date", "etag", "expect", "expires", "from", "host", "if-match", "if-modified-since", "if-none-match", "if-unmodified-since", "last-modified", "link", "location", "max-forwards", "proxy-authenticate", "proxy-authorization", "range", "referer", "refresh", "retry-after", "server", "set-cookie", "strict-transport-security", "trailer", "transfer-encoding", "user-agent", "vary", "via", "www-authenticate"]); - http2commonLowerHeader = (x$5 = common.$length, ((x$5 < 0 || x$5 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - http2commonCanonHeader = (x$6 = common.$length, ((x$6 < 0 || x$6 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = common; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r$1 = CanonicalHeaderKey(v); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - chk = _r$1; - _key = chk; (http2commonLowerHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: v }; - _key$1 = v; (http2commonCanonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: chk }; - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2buildCommonHeaderMaps, $c: true, $r, _i, _key, _key$1, _r$1, _ref, chk, common, v, x$5, x$6, $s};return $f; - }; - http2lowerHeader = function(v) { - var {$24r, _entry, _r$1, _tmp, _tmp$1, _tuple, _tuple$1, ascii$1, lower, ok, s, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lower = ""; - ascii$1 = false; - $r = http2buildCommonHeaderMapsOnce(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = http2commonLowerHeader[$String.keyFor(v)], _entry !== undefined ? [_entry.v, true] : ["", false]); - s = _tuple[0]; - ok = _tuple[1]; - if (ok) { - _tmp = s; - _tmp$1 = true; - lower = _tmp; - ascii$1 = _tmp$1; - $s = -1; return [lower, ascii$1]; - } - _r$1 = http2asciiToLower(v); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - lower = _tuple$1[0]; - ascii$1 = _tuple$1[1]; - $24r = [lower, ascii$1]; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2lowerHeader, $c: true, $r, $24r, _entry, _r$1, _tmp, _tmp$1, _tuple, _tuple$1, ascii$1, lower, ok, s, v, $s};return $f; - }; - init = function() { - var {_r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = os.Getenv("GODEBUG"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - e = _r$1; - if (strings.Contains(e, "http2debug=1")) { - http2VerboseLogs = true; - } - if (strings.Contains(e, "http2debug=2")) { - http2VerboseLogs = true; - http2logFrameWrites = true; - http2logFrameReads = true; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, _r$1, e, $s};return $f; - }; - http2streamState.prototype.String = function() { - var st; - st = this.$val; - return ((st < 0 || st >= http2stateName.length) ? ($throwRuntimeError("index out of range"), undefined) : http2stateName[st]); - }; - $ptrType(http2streamState).prototype.String = function() { return new http2streamState(this.$get()).String(); }; - http2Setting.ptr.prototype.String = function() { - var {$24r, _r$1, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r$1 = fmt.Sprintf("[%v = %d]", new sliceType([new http2SettingID(s.ID), new $Uint32(s.Val)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Setting.ptr.prototype.String, $c: true, $r, $24r, _r$1, s, $s};return $f; - }; - http2Setting.prototype.String = function() { return this.$val.String(); }; - http2Setting.ptr.prototype.Valid = function() { - var _1, s; - s = this; - _1 = s.ID; - if (_1 === (2)) { - if (!((s.Val === 1)) && !((s.Val === 0))) { - return new http2ConnectionError(1); - } - } else if (_1 === (4)) { - if (s.Val > 2147483647) { - return new http2ConnectionError(3); - } - } else if (_1 === (5)) { - if (s.Val < 16384 || s.Val > 16777215) { - return new http2ConnectionError(1); - } - } - return $ifaceNil; - }; - http2Setting.prototype.Valid = function() { return this.$val.Valid(); }; - http2SettingID.prototype.String = function() { - var {$24r, _entry, _r$1, _tuple, ok, s, v, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this.$val; - _tuple = (_entry = http2settingName[http2SettingID.keyFor(s)], _entry !== undefined ? [_entry.v, true] : ["", false]); - v = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return v; - } - _r$1 = fmt.Sprintf("UNKNOWN_SETTING_%d", new sliceType([new $Uint16(((s << 16 >>> 16)))])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2SettingID.prototype.String, $c: true, $r, $24r, _entry, _r$1, _tuple, ok, s, v, $s};return $f; - }; - $ptrType(http2SettingID).prototype.String = function() { return new http2SettingID(this.$get()).String(); }; - http2validWireHeaderFieldName = function(v) { - var _i, _ref, _rune, r, v; - if (v.length === 0) { - return false; - } - _ref = v; - _i = 0; - while (true) { - if (!(_i < _ref.length)) { break; } - _rune = $decodeRune(_ref, _i); - r = _rune[0]; - if (!httpguts.IsTokenRune(r)) { - return false; - } - if (65 <= r && r <= 90) { - return false; - } - _i += _rune[1]; - } - return true; - }; - http2httpCodeString = function(code) { - var _1, code; - _1 = code; - if (_1 === (200)) { - return "200"; - } else if (_1 === (404)) { - return "404"; - } - return strconv.Itoa(code); - }; - http2gate.prototype.Done = function() { - var {g, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this.$val; - $r = $send(g, $clone(new structType.ptr(), structType)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2gate.prototype.Done, $c: true, $r, g, $s};return $f; - }; - $ptrType(http2gate).prototype.Done = function() { return new http2gate(this.$get()).Done(); }; - http2gate.prototype.Wait = function() { - var {_r$1, g, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - g = this.$val; - _r$1 = $recv(g); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1[0]; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2gate.prototype.Wait, $c: true, $r, _r$1, g, $s};return $f; - }; - $ptrType(http2gate).prototype.Wait = function() { return new http2gate(this.$get()).Wait(); }; - $ptrType(http2closeWaiter).prototype.Init = function() { - var cw; - cw = this; - cw.$set(new $Chan(structType, 0)); - }; - http2closeWaiter.prototype.Close = function() { - var cw; - cw = this.$val; - $close(cw); - }; - $ptrType(http2closeWaiter).prototype.Close = function() { return new http2closeWaiter(this.$get()).Close(); }; - http2closeWaiter.prototype.Wait = function() { - var {_r$1, cw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cw = this.$val; - _r$1 = $recv(cw); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1[0]; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2closeWaiter.prototype.Wait, $c: true, $r, _r$1, cw, $s};return $f; - }; - $ptrType(http2closeWaiter).prototype.Wait = function() { return new http2closeWaiter(this.$get()).Wait(); }; - http2newBufferedWriter = function(w) { - var w; - return new http2bufferedWriter.ptr(arrayType.zero(), w, ptrType$14.nil); - }; - http2bufferedWriter.ptr.prototype.Available = function() { - var w; - w = this; - if (w.bw === ptrType$14.nil) { - return 4096; - } - return w.bw.Available(); - }; - http2bufferedWriter.prototype.Available = function() { return this.$val.Available(); }; - http2bufferedWriter.ptr.prototype.Write = function(p) { - var {$24r, _r$1, _r$2, _tuple, bw, err, n, p, w, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - /* */ if (w.bw === ptrType$14.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (w.bw === ptrType$14.nil) { */ case 1: - _r$1 = http2bufWriterPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - bw = $assertType(_r$1, ptrType$14); - bw.Reset(w.w); - w.bw = bw; - /* } */ case 2: - _r$2 = w.bw.Write(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: http2bufferedWriter.ptr.prototype.Write, $c: true, $r, $24r, _r$1, _r$2, _tuple, bw, err, n, p, w, $s};return $f; - }; - http2bufferedWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - http2bufferedWriter.ptr.prototype.Flush = function() { - var {_r$1, bw, err, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - bw = w.bw; - if (bw === ptrType$14.nil) { - $s = -1; return $ifaceNil; - } - _r$1 = bw.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - bw.Reset($ifaceNil); - http2bufWriterPool.Put(bw); - w.bw = ptrType$14.nil; - $s = -1; return err; - /* */ } return; } var $f = {$blk: http2bufferedWriter.ptr.prototype.Flush, $c: true, $r, _r$1, bw, err, w, $s};return $f; - }; - http2bufferedWriter.prototype.Flush = function() { return this.$val.Flush(); }; - http2mustUint31 = function(v) { - var v; - if (v < 0 || v > 2147483647) { - $panic(new $String("out of range")); - } - return ((v >>> 0)); - }; - http2bodyAllowedForStatus = function(status) { - var status; - if (status >= 100 && status <= 199) { - return false; - } else if ((status === 204)) { - return false; - } else if ((status === 304)) { - return false; - } - return true; - }; - http2httpError.ptr.prototype.Error = function() { - var e; - e = this; - return e.msg; - }; - http2httpError.prototype.Error = function() { return this.$val.Error(); }; - http2httpError.ptr.prototype.Timeout = function() { - var e; - e = this; - return e.timeout; - }; - http2httpError.prototype.Timeout = function() { return this.$val.Timeout(); }; - http2httpError.ptr.prototype.Temporary = function() { - var e; - e = this; - return true; - }; - http2httpError.prototype.Temporary = function() { return this.$val.Temporary(); }; - http2sorter.ptr.prototype.Len = function() { - var s; - s = this; - return s.v.$length; - }; - http2sorter.prototype.Len = function() { return this.$val.Len(); }; - http2sorter.ptr.prototype.Swap = function(i, j) { - var _tmp, _tmp$1, i, j, s, x$5, x$6, x$7, x$8; - s = this; - _tmp = (x$5 = s.v, ((j < 0 || j >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + j])); - _tmp$1 = (x$6 = s.v, ((i < 0 || i >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + i])); - (x$7 = s.v, ((i < 0 || i >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + i] = _tmp)); - (x$8 = s.v, ((j < 0 || j >= x$8.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$8.$array[x$8.$offset + j] = _tmp$1)); - }; - http2sorter.prototype.Swap = function(i, j) { return this.$val.Swap(i, j); }; - http2sorter.ptr.prototype.Less = function(i, j) { - var i, j, s, x$5, x$6; - s = this; - return (x$5 = s.v, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])) < (x$6 = s.v, ((j < 0 || j >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + j])); - }; - http2sorter.prototype.Less = function(i, j) { return this.$val.Less(i, j); }; - http2sorter.ptr.prototype.Keys = function(h) { - var {_entry, _i, _keys, _ref, h, k, keys, s, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - keys = $subslice(s.v, 0, 0); - _ref = h; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - keys = $append(keys, k); - _i++; - } - s.v = keys; - $r = sort.Sort(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return keys; - /* */ } return; } var $f = {$blk: http2sorter.ptr.prototype.Keys, $c: true, $r, _entry, _i, _keys, _ref, h, k, keys, s, $s};return $f; - }; - http2sorter.prototype.Keys = function(h) { return this.$val.Keys(h); }; - http2sorter.ptr.prototype.SortStrings = function(ss) { - var {s, save, ss, $s, $r, $c} = $restore(this, {ss}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - save = s.v; - s.v = ss; - $r = sort.Sort(s); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - s.v = save; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2sorter.ptr.prototype.SortStrings, $c: true, $r, s, save, ss, $s};return $f; - }; - http2sorter.prototype.SortStrings = function(ss) { return this.$val.SortStrings(ss); }; - http2validPseudoPath = function(v) { - var v; - return (v.length > 0 && (v.charCodeAt(0) === 47)) || v === "*"; - }; - http2pipe.ptr.prototype.setBuffer = function(b) { - var {b, p, $s, $deferred, $r, $c} = $restore(this, {b}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - /* */ if (!($interfaceIsEqual(p.err, $ifaceNil)) || !($interfaceIsEqual(p.breakErr, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(p.err, $ifaceNil)) || !($interfaceIsEqual(p.breakErr, $ifaceNil))) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - p.b = b; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.setBuffer, $c: true, $r, b, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.setBuffer = function(b) { return this.$val.setBuffer(b); }; - http2pipe.ptr.prototype.Len = function() { - var {$24r, $24r$1, _r$1, p, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - /* */ if ($interfaceIsEqual(p.b, $ifaceNil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($interfaceIsEqual(p.b, $ifaceNil)) { */ case 2: - $24r = p.unread; - $s = 4; case 4: return $24r; - /* } */ case 3: - _r$1 = p.b.Len(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = _r$1; - $s = 6; case 6: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return 0; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.Len, $c: true, $r, $24r, $24r$1, _r$1, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.Len = function() { return this.$val.Len(); }; - http2pipe.ptr.prototype.Read = function(d) { - var {$24r, $24r$1, $24r$2, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _v, d, err, n, p, $s, $deferred, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - n = 0; - err = $ifaceNil; - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - if ($interfaceIsEqual(p.c.L, $ifaceNil)) { - p.c.L = p.mu; - } - /* while (true) { */ case 2: - /* */ if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { */ case 4: - _tmp = 0; - _tmp$1 = p.breakErr; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 6; case 6: return $24r; - /* } */ case 5: - if (!(!($interfaceIsEqual(p.b, $ifaceNil)))) { _v = false; $s = 9; continue s; } - _r$1 = p.b.Len(); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1 > 0; case 9: - /* */ if (_v) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_v) { */ case 7: - _r$2 = p.b.Read(d); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - n = _tuple[0]; - err = _tuple[1]; - $24r$1 = [n, err]; - $s = 12; case 12: return $24r$1; - /* } */ case 8: - /* */ if (!($interfaceIsEqual(p.err, $ifaceNil))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!($interfaceIsEqual(p.err, $ifaceNil))) { */ case 13: - /* */ if (!(p.readFn === $throwNilPointerError)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!(p.readFn === $throwNilPointerError)) { */ case 15: - $r = p.readFn(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p.readFn = $throwNilPointerError; - /* } */ case 16: - p.b = $ifaceNil; - _tmp$2 = 0; - _tmp$3 = p.err; - n = _tmp$2; - err = _tmp$3; - $24r$2 = [n, err]; - $s = 18; case 18: return $24r$2; - /* } */ case 14: - $r = p.c.Wait(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 2; continue; - case 3: - $s = -1; return [n, err]; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _v, d, err, n, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.Read = function(d) { return this.$val.Read(d); }; - http2pipe.ptr.prototype.Write = function(d) { - var {$24r, $24r$1, $24r$2, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, d, err, n, p, $s, $deferred, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - n = 0; - err = $ifaceNil; - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - if ($interfaceIsEqual(p.c.L, $ifaceNil)) { - p.c.L = p.mu; - } - $deferred.push([$methodVal(p.c, "Signal"), []]); - /* */ if (!($interfaceIsEqual(p.err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(p.err, $ifaceNil))) { */ case 2: - _tmp = 0; - _tmp$1 = http2errClosedPipeWrite; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 4; case 4: return $24r; - /* } */ case 3: - /* */ if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { */ case 5: - p.unread = p.unread + (d.$length) >> 0; - _tmp$2 = d.$length; - _tmp$3 = $ifaceNil; - n = _tmp$2; - err = _tmp$3; - $24r$1 = [n, err]; - $s = 7; case 7: return $24r$1; - /* } */ case 6: - _r$1 = p.b.Write(d); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r$2 = [n, err]; - $s = 9; case 9: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.Write, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, d, err, n, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.Write = function(d) { return this.$val.Write(d); }; - http2pipe.ptr.prototype.CloseWithError = function(err) { - var {err, p, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = p.closeWithError((p.$ptr_err || (p.$ptr_err = new ptrType$85(function() { return this.$target.err; }, function($v) { this.$target.err = $v; }, p))), err, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2pipe.ptr.prototype.CloseWithError, $c: true, $r, err, p, $s};return $f; - }; - http2pipe.prototype.CloseWithError = function(err) { return this.$val.CloseWithError(err); }; - http2pipe.ptr.prototype.BreakWithError = function(err) { - var {err, p, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = p.closeWithError((p.$ptr_breakErr || (p.$ptr_breakErr = new ptrType$85(function() { return this.$target.breakErr; }, function($v) { this.$target.breakErr = $v; }, p))), err, $throwNilPointerError); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2pipe.ptr.prototype.BreakWithError, $c: true, $r, err, p, $s};return $f; - }; - http2pipe.prototype.BreakWithError = function(err) { return this.$val.BreakWithError(err); }; - http2pipe.ptr.prototype.closeWithErrorAndCode = function(err, fn) { - var {err, fn, p, $s, $r, $c} = $restore(this, {err, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = p.closeWithError((p.$ptr_err || (p.$ptr_err = new ptrType$85(function() { return this.$target.err; }, function($v) { this.$target.err = $v; }, p))), err, fn); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2pipe.ptr.prototype.closeWithErrorAndCode, $c: true, $r, err, fn, p, $s};return $f; - }; - http2pipe.prototype.closeWithErrorAndCode = function(err, fn) { return this.$val.closeWithErrorAndCode(err, fn); }; - http2pipe.ptr.prototype.closeWithError = function(dst, err, fn) { - var {_r$1, dst, err, fn, p, $s, $deferred, $r, $c} = $restore(this, {dst, err, fn}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - if ($interfaceIsEqual(err, $ifaceNil)) { - $panic(new $String("err must be non-nil")); - } - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - if ($interfaceIsEqual(p.c.L, $ifaceNil)) { - p.c.L = p.mu; - } - $deferred.push([$methodVal(p.c, "Signal"), []]); - /* */ if (!($interfaceIsEqual(dst.$get(), $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(dst.$get(), $ifaceNil))) { */ case 2: - $s = 4; case 4: return; - /* } */ case 3: - p.readFn = fn; - /* */ if (dst === (p.$ptr_breakErr || (p.$ptr_breakErr = new ptrType$85(function() { return this.$target.breakErr; }, function($v) { this.$target.breakErr = $v; }, p)))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (dst === (p.$ptr_breakErr || (p.$ptr_breakErr = new ptrType$85(function() { return this.$target.breakErr; }, function($v) { this.$target.breakErr = $v; }, p)))) { */ case 5: - /* */ if (!($interfaceIsEqual(p.b, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(p.b, $ifaceNil))) { */ case 7: - _r$1 = p.b.Len(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - p.unread = p.unread + (_r$1) >> 0; - /* } */ case 8: - p.b = $ifaceNil; - /* } */ case 6: - dst.$set(err); - p.closeDoneLocked(); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.closeWithError, $c: true, $r, _r$1, dst, err, fn, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.closeWithError = function(dst, err, fn) { return this.$val.closeWithError(dst, err, fn); }; - http2pipe.ptr.prototype.closeDoneLocked = function() { - var _selection, p; - p = this; - if (p.donec === $chanNil) { - return; - } - _selection = $select([[p.donec], []]); - if (_selection[0] === 0) { - } else if (_selection[0] === 1) { - $close(p.donec); - } - }; - http2pipe.prototype.closeDoneLocked = function() { return this.$val.closeDoneLocked(); }; - http2pipe.ptr.prototype.Err = function() { - var {$24r, $24r$1, p, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - /* */ if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(p.breakErr, $ifaceNil))) { */ case 2: - $24r = p.breakErr; - $s = 4; case 4: return $24r; - /* } */ case 3: - $24r$1 = p.err; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.Err, $c: true, $r, $24r, $24r$1, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.Err = function() { return this.$val.Err(); }; - http2pipe.ptr.prototype.Done = function() { - var {$24r, p, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - p = this; - $r = p.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(p.mu, "Unlock"), []]); - if (p.donec === $chanNil) { - p.donec = new $Chan(structType, 0); - if (!($interfaceIsEqual(p.err, $ifaceNil)) || !($interfaceIsEqual(p.breakErr, $ifaceNil))) { - p.closeDoneLocked(); - } - } - $24r = p.donec; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $chanNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2pipe.ptr.prototype.Done, $c: true, $r, $24r, p, $s, $deferred};return $f; } } - }; - http2pipe.prototype.Done = function() { return this.$val.Done(); }; - http2Server.ptr.prototype.initialConnRecvWindowSize = function() { - var s; - s = this; - if (s.MaxUploadBufferPerConnection > 65535) { - return s.MaxUploadBufferPerConnection; - } - return 1048576; - }; - http2Server.prototype.initialConnRecvWindowSize = function() { return this.$val.initialConnRecvWindowSize(); }; - http2Server.ptr.prototype.initialStreamRecvWindowSize = function() { - var s; - s = this; - if (s.MaxUploadBufferPerStream > 0) { - return s.MaxUploadBufferPerStream; - } - return 1048576; - }; - http2Server.prototype.initialStreamRecvWindowSize = function() { return this.$val.initialStreamRecvWindowSize(); }; - http2Server.ptr.prototype.maxReadFrameSize = function() { - var s, v; - s = this; - v = s.MaxReadFrameSize; - if (v >= 16384 && v <= 16777215) { - return v; - } - return 1048576; - }; - http2Server.prototype.maxReadFrameSize = function() { return this.$val.maxReadFrameSize(); }; - http2Server.ptr.prototype.maxConcurrentStreams = function() { - var s, v; - s = this; - v = s.MaxConcurrentStreams; - if (v > 0) { - return v; - } - return 250; - }; - http2Server.prototype.maxConcurrentStreams = function() { return this.$val.maxConcurrentStreams(); }; - http2Server.ptr.prototype.maxQueuedControlFrames = function() { - var s; - s = this; - return 10000; - }; - http2Server.prototype.maxQueuedControlFrames = function() { return this.$val.maxQueuedControlFrames(); }; - http2serverInternalState.ptr.prototype.registerConn = function(sc) { - var {_key, s, sc, $s, $r, $c} = $restore(this, {sc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (s === ptrType$60.nil) { - $s = -1; return; - } - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _key = sc; (s.activeConns || $throwRuntimeError("assignment to entry in nil map"))[ptrType$13.keyFor(_key)] = { k: _key, v: new structType.ptr() }; - $r = s.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverInternalState.ptr.prototype.registerConn, $c: true, $r, _key, s, sc, $s};return $f; - }; - http2serverInternalState.prototype.registerConn = function(sc) { return this.$val.registerConn(sc); }; - http2serverInternalState.ptr.prototype.unregisterConn = function(sc) { - var {s, sc, $s, $r, $c} = $restore(this, {sc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (s === ptrType$60.nil) { - $s = -1; return; - } - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - delete s.activeConns[ptrType$13.keyFor(sc)]; - $r = s.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverInternalState.ptr.prototype.unregisterConn, $c: true, $r, s, sc, $s};return $f; - }; - http2serverInternalState.prototype.unregisterConn = function(sc) { return this.$val.unregisterConn(sc); }; - http2serverInternalState.ptr.prototype.startGracefulShutdown = function() { - var {_entry, _i, _keys, _ref, s, sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (s === ptrType$60.nil) { - $s = -1; return; - } - $r = s.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = s.activeConns; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - sc = _entry.k; - $r = sc.startGracefulShutdown(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $r = s.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverInternalState.ptr.prototype.startGracefulShutdown, $c: true, $r, _entry, _i, _keys, _ref, s, sc, $s};return $f; - }; - http2serverInternalState.prototype.startGracefulShutdown = function() { return this.$val.startGracefulShutdown(); }; - http2ConfigureServer = function(s, conf) { - var {$24r, _1, _i, _key, _r$1, _ref, _tmp, _tmp$1, conf, cs, h1, h2, haveRequired, protoHandler, s, x$5, x$6, $s, $r, $c} = $restore(this, {s, conf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - conf = [conf]; - if (s === ptrType$46.nil) { - $panic(new $String("nil *http.Server")); - } - if (conf[0] === ptrType$86.nil) { - conf[0] = new http2Server.ptr(0, 0, 0, false, new time.Duration(0, 0), 0, 0, $throwNilPointerError, $throwNilPointerError, ptrType$60.nil); - } - conf[0].state = new http2serverInternalState.ptr(new sync.Mutex.ptr(0, 0), {}); - _tmp = s; - _tmp$1 = conf[0]; - h1 = _tmp; - h2 = _tmp$1; - if ((x$5 = h2.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0))) { - if (!((x$6 = h1.IdleTimeout, (x$6.$high === 0 && x$6.$low === 0)))) { - h2.IdleTimeout = h1.IdleTimeout; - } else { - h2.IdleTimeout = h1.ReadTimeout; - } - } - $r = s.RegisterOnShutdown($methodVal(conf[0].state, "startGracefulShutdown")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (s.TLSConfig === ptrType$4.nil) { $s = 2; continue; } - /* */ if (!(s.TLSConfig.CipherSuites === sliceType$14.nil) && s.TLSConfig.MinVersion < 772) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (s.TLSConfig === ptrType$4.nil) { */ case 2: - s.TLSConfig = new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$13.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$34.nil, sliceType$2.nil, "", 0, ptrType$34.nil, false, sliceType$14.nil, false, false, arrayType$1.zero(), $ifaceNil, 0, 0, sliceType$15.nil, false, 0, $ifaceNil, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$16.nil, sliceType$16.nil); - $s = 4; continue; - /* } else if (!(s.TLSConfig.CipherSuites === sliceType$14.nil) && s.TLSConfig.MinVersion < 772) { */ case 3: - haveRequired = false; - _ref = s.TLSConfig.CipherSuites; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - cs = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _1 = cs; - if ((_1 === (49199)) || (_1 === (49195))) { - haveRequired = true; - } - _i++; - } - /* */ if (!haveRequired) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!haveRequired) { */ case 5: - _r$1 = fmt.Errorf("http2: TLSConfig.CipherSuites is missing an HTTP/2-required AES_128_GCM_SHA256 cipher (need at least one of TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 or TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256)", new sliceType([])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 8; case 8: return $24r; - /* } */ case 6: - /* } */ case 4: - s.TLSConfig.PreferServerCipherSuites = true; - if (!http2strSliceContains(s.TLSConfig.NextProtos, "h2")) { - s.TLSConfig.NextProtos = $append(s.TLSConfig.NextProtos, "h2"); - } - if (!http2strSliceContains(s.TLSConfig.NextProtos, "http/1.1")) { - s.TLSConfig.NextProtos = $append(s.TLSConfig.NextProtos, "http/1.1"); - } - if (s.TLSNextProto === false) { - s.TLSNextProto = $makeMap($String.keyFor, []); - } - protoHandler = (function(conf) { return function $b(hs, c, h) { - var {_r$2, _tuple, bc, c, ctx, h, hs, ok, $s, $r, $c} = $restore(this, {hs, c, h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(http2testHookOnConn === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(http2testHookOnConn === $throwNilPointerError)) { */ case 1: - $r = http2testHookOnConn(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - ctx = $ifaceNil; - _tuple = $assertType(h, baseContexter, true); - bc = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok) { */ case 4: - _r$2 = bc.BaseContext(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - ctx = _r$2; - /* } */ case 5: - $r = conf[0].ServeConn(c, new http2ServeConnOpts.ptr(ctx, hs, h)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _tuple, bc, c, ctx, h, hs, ok, $s};return $f; - }; })(conf); - _key = "h2"; (s.TLSNextProto || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: protoHandler }; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2ConfigureServer, $c: true, $r, $24r, _1, _i, _key, _r$1, _ref, _tmp, _tmp$1, conf, cs, h1, h2, haveRequired, protoHandler, s, x$5, x$6, $s};return $f; - }; - http2ServeConnOpts.ptr.prototype.context = function() { - var o; - o = this; - if (!(o === ptrType$87.nil) && !($interfaceIsEqual(o.Context, $ifaceNil))) { - return o.Context; - } - return context.Background(); - }; - http2ServeConnOpts.prototype.context = function() { return this.$val.context(); }; - http2ServeConnOpts.ptr.prototype.baseConfig = function() { - var o; - o = this; - if (!(o === ptrType$87.nil) && !(o.BaseConfig === ptrType$46.nil)) { - return o.BaseConfig; - } - return new Server.ptr("", $ifaceNil, ptrType$4.nil, new time.Duration(0, 0), new time.Duration(0, 0), new time.Duration(0, 0), new time.Duration(0, 0), 0, false, $throwNilPointerError, ptrType$58.nil, $throwNilPointerError, $throwNilPointerError, 0, 0, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil, new sync.Mutex.ptr(0, 0), false, false, $chanNil, sliceType$19.nil); - }; - http2ServeConnOpts.prototype.baseConfig = function() { return this.$val.baseConfig(); }; - http2ServeConnOpts.ptr.prototype.handler = function() { - var o; - o = this; - if (!(o === ptrType$87.nil)) { - if (!($interfaceIsEqual(o.Handler, $ifaceNil))) { - return o.Handler; - } - if (!(o.BaseConfig === ptrType$46.nil) && !($interfaceIsEqual(o.BaseConfig.Handler, $ifaceNil))) { - return o.BaseConfig.Handler; - } - } - return $pkg.DefaultServeMux; - }; - http2ServeConnOpts.prototype.handler = function() { return this.$val.handler(); }; - http2Server.ptr.prototype.ServeConn = function(c, opts) { - var {_arg, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, baseCtx, c, cancel, fr, hook, ok, opts, s, sc, tc, x$5, $s, $deferred, $r, $c} = $restore(this, {c, opts}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - s = this; - _r$1 = http2serverConnBaseContext(c, opts); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - baseCtx = _tuple[0]; - cancel = _tuple[1]; - $deferred.push([cancel, []]); - _r$2 = c.RemoteAddr(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.String(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = http2newGoroutineLock(); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - sc = new http2serverConn.ptr(s, opts.baseConfig(), c, http2newBufferedWriter(c), opts.handler(), baseCtx, ptrType$72.nil, new $Chan(structType, 0), new $Chan(http2readFrameResult, 0), new $Chan(http2FrameWriteRequest, 8), new $Chan(http2frameWriteResult, 1), new $Chan(http2bodyReadMsg, 0), new $Chan($emptyInterface, 8), new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), ptrType$28.nil, _r$3, $ifaceNil, _r$4, true, false, false, 0, 0, 4294967295, s.maxConcurrentStreams(), 0, 0, 0, 0, {}, 65535, 16384, 4096, 0, false, false, false, false, false, false, false, 0, ptrType$25.nil, ptrType$25.nil, new bytes.Buffer.ptr(sliceType$3.nil, 0, 0), ptrType$89.nil, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0))); - $r = s.state.registerConn(sc); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(s.state, "unregisterConn"), [sc]]); - /* */ if (!((x$5 = sc.hs.WriteTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!((x$5 = sc.hs.WriteTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { */ case 6: - _r$5 = sc.conn.SetWriteDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 8; case 8: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 7: - /* */ if (!(s.NewWriteScheduler === $throwNilPointerError)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(s.NewWriteScheduler === $throwNilPointerError)) { */ case 9: - _r$6 = s.NewWriteScheduler(); /* */ $s = 12; case 12: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - sc.writeSched = _r$6; - $s = 11; continue; - /* } else { */ case 10: - sc.writeSched = http2NewRandomWriteScheduler(); - /* } */ case 11: - sc.flow.add(65535); - sc.inflow.add(65535); - _r$7 = hpack.NewEncoder(sc.headerWriteBuf); /* */ $s = 13; case 13: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - sc.hpackEncoder = _r$7; - fr = http2NewFramer(sc.bw, c); - if (!(s.CountError === $throwNilPointerError)) { - fr.countError = s.CountError; - } - _r$8 = hpack.NewDecoder(4096, $throwNilPointerError); /* */ $s = 14; case 14: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - fr.ReadMetaHeaders = _r$8; - fr.MaxHeaderListSize = sc.maxHeaderListSize(); - fr.SetMaxReadFrameSize(s.maxReadFrameSize()); - sc.framer = fr; - _tuple$1 = $assertType(c, http2connectionStater, true); - tc = _tuple$1[0]; - ok = _tuple$1[1]; - /* */ if (ok) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (ok) { */ case 15: - sc.tlsState = new tls.ConnectionState.ptr(0, false, false, 0, "", false, "", sliceType$10.nil, sliceType$11.nil, sliceType$5.nil, sliceType$3.nil, sliceType$3.nil, $throwNilPointerError); - _r$9 = tc.ConnectionState(); /* */ $s = 17; case 17: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - tls.ConnectionState.copy(sc.tlsState, _r$9); - /* */ if (sc.tlsState.Version < 771) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (sc.tlsState.Version < 771) { */ case 18: - $r = sc.rejectConn(12, "TLS version too low"); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 21; case 21: return; - /* } */ case 19: - if (sc.tlsState.ServerName === "") { - } - /* */ if (!s.PermitProhibitedCipherSuites && http2isBadCipher(sc.tlsState.CipherSuite)) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (!s.PermitProhibitedCipherSuites && http2isBadCipher(sc.tlsState.CipherSuite)) { */ case 22: - _r$10 = fmt.Sprintf("Prohibited TLS 1.2 Cipher Suite: %x", new sliceType([new $Uint16(sc.tlsState.CipherSuite)])); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _arg = _r$10; - $r = sc.rejectConn(12, _arg); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 26; case 26: return; - /* } */ case 23: - /* } */ case 16: - hook = http2testHookGetServerConn; - /* */ if (!(hook === $throwNilPointerError)) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!(hook === $throwNilPointerError)) { */ case 27: - $r = hook(sc); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 28: - $r = sc.serve(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2Server.ptr.prototype.ServeConn, $c: true, $r, _arg, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, baseCtx, c, cancel, fr, hook, ok, opts, s, sc, tc, x$5, $s, $deferred};return $f; } } - }; - http2Server.prototype.ServeConn = function(c, opts) { return this.$val.ServeConn(c, opts); }; - http2serverConnBaseContext = function(c, opts) { - var {_arg, _arg$1, _arg$2, _r$1, _r$2, _r$3, _r$4, _tuple, c, cancel, ctx, hs, opts, $s, $r, $c} = $restore(this, {c, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ctx = $ifaceNil; - cancel = $throwNilPointerError; - _r$1 = context.WithCancel(opts.context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ctx = _tuple[0]; - cancel = _tuple[1]; - _arg = ctx; - _arg$1 = $pkg.LocalAddrContextKey; - _r$2 = c.LocalAddr(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$2 = _r$2; - _r$3 = context.WithValue(_arg, _arg$1, _arg$2); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ctx = _r$3; - hs = opts.baseConfig(); - /* */ if (!(hs === ptrType$46.nil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(hs === ptrType$46.nil)) { */ case 4: - _r$4 = context.WithValue(ctx, $pkg.ServerContextKey, hs); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ctx = _r$4; - /* } */ case 5: - $s = -1; return [ctx, cancel]; - /* */ } return; } var $f = {$blk: http2serverConnBaseContext, $c: true, $r, _arg, _arg$1, _arg$2, _r$1, _r$2, _r$3, _r$4, _tuple, c, cancel, ctx, hs, opts, $s};return $f; - }; - http2serverConn.ptr.prototype.rejectConn = function(err, debug) { - var {_r$1, _r$2, _r$3, debug, err, sc, $s, $r, $c} = $restore(this, {err, debug}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.vlogf("http2: server rejecting conn: %v, %s", new sliceType([new http2ErrCode(err), new $String(debug)])); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = sc.framer.WriteGoAway(0, err, (new sliceType$3($stringToBytes(debug)))); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = sc.bw.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = sc.conn.Close(); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.rejectConn, $c: true, $r, _r$1, _r$2, _r$3, debug, err, sc, $s};return $f; - }; - http2serverConn.prototype.rejectConn = function(err, debug) { return this.$val.rejectConn(err, debug); }; - http2serverConn.ptr.prototype.maxHeaderListSize = function() { - var n, sc; - sc = this; - n = sc.hs.MaxHeaderBytes; - if (n <= 0) { - n = 1048576; - } - return (((n + 320 >> 0) >>> 0)); - }; - http2serverConn.prototype.maxHeaderListSize = function() { return this.$val.maxHeaderListSize(); }; - http2serverConn.ptr.prototype.curOpenStreams = function() { - var {sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return sc.curClientStreams + sc.curPushedStreams >>> 0; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.curOpenStreams, $c: true, $r, sc, $s};return $f; - }; - http2serverConn.prototype.curOpenStreams = function() { return this.$val.curOpenStreams(); }; - http2serverConn.ptr.prototype.Framer = function() { - var sc; - sc = this; - return sc.framer; - }; - http2serverConn.prototype.Framer = function() { return this.$val.Framer(); }; - http2serverConn.ptr.prototype.CloseConn = function() { - var {$24r, _r$1, sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - _r$1 = sc.conn.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.CloseConn, $c: true, $r, $24r, _r$1, sc, $s};return $f; - }; - http2serverConn.prototype.CloseConn = function() { return this.$val.CloseConn(); }; - http2serverConn.ptr.prototype.Flush = function() { - var {$24r, _r$1, sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - _r$1 = sc.bw.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.Flush, $c: true, $r, $24r, _r$1, sc, $s};return $f; - }; - http2serverConn.prototype.Flush = function() { return this.$val.Flush(); }; - http2serverConn.ptr.prototype.HeaderEncoder = function() { - var sc; - sc = this; - return [sc.hpackEncoder, sc.headerWriteBuf]; - }; - http2serverConn.prototype.HeaderEncoder = function() { return this.$val.HeaderEncoder(); }; - http2serverConn.ptr.prototype.state = function(streamID) { - var {_entry, _r$1, _tuple, ok, sc, st, streamID, $s, $r, $c} = $restore(this, {streamID}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = sc.streams[$Uint32.keyFor(streamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - st = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return [st.state, st]; - } - if ((_r$1 = streamID % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 1) { - if (streamID <= sc.maxClientStreamID) { - $s = -1; return [4, ptrType$10.nil]; - } - } else { - if (streamID <= sc.maxPushPromiseID) { - $s = -1; return [4, ptrType$10.nil]; - } - } - $s = -1; return [0, ptrType$10.nil]; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.state, $c: true, $r, _entry, _r$1, _tuple, ok, sc, st, streamID, $s};return $f; - }; - http2serverConn.prototype.state = function(streamID) { return this.$val.state(streamID); }; - http2serverConn.ptr.prototype.setConnState = function(state) { - var {sc, state, $s, $r, $c} = $restore(this, {state}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - /* */ if (!(sc.hs.ConnState === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(sc.hs.ConnState === $throwNilPointerError)) { */ case 1: - $r = sc.hs.ConnState(sc.conn, state); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.setConnState, $c: true, $r, sc, state, $s};return $f; - }; - http2serverConn.prototype.setConnState = function(state) { return this.$val.setConnState(state); }; - http2serverConn.ptr.prototype.vlogf = function(format, args) { - var {args, format, sc, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - /* */ if (http2VerboseLogs) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (http2VerboseLogs) { */ case 1: - $r = sc.logf(format, args); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.vlogf, $c: true, $r, args, format, sc, $s};return $f; - }; - http2serverConn.prototype.vlogf = function(format, args) { return this.$val.vlogf(format, args); }; - http2serverConn.ptr.prototype.logf = function(format, args) { - var {args, format, lg, sc, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - lg = sc.hs.ErrorLog; - /* */ if (!(lg === ptrType$58.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(lg === ptrType$58.nil)) { */ case 1: - $r = lg.Printf(format, args); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = log.Printf(format, args); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.logf, $c: true, $r, args, format, lg, sc, $s};return $f; - }; - http2serverConn.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; - http2errno = function(v) { - var {_r$1, rv, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = reflect.ValueOf(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - rv = _r$1; - if ($clone(rv, reflect.Value).Kind() === 12) { - $s = -1; return (($clone(rv, reflect.Value).Uint().$low >>> 0)); - } - $s = -1; return 0; - /* */ } return; } var $f = {$blk: http2errno, $c: true, $r, _r$1, rv, v, $s};return $f; - }; - http2isClosedConnError = function(err) { - var {_r$1, _r$2, _tuple, _tuple$1, err, n, oe, ok, ok$1, se, str, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return false; - } - _r$1 = err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - str = _r$1; - if (strings.Contains(str, "use of closed network connection")) { - $s = -1; return true; - } - /* */ if (false) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (false) { */ case 2: - _tuple = $assertType(err, ptrType$57, true); - oe = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok && oe.Op === "read") { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (ok && oe.Op === "read") { */ case 4: - _tuple$1 = $assertType(oe.Err, ptrType$90, true); - se = _tuple$1[0]; - ok$1 = _tuple$1[1]; - /* */ if (ok$1 && se.Syscall === "wsarecv") { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (ok$1 && se.Syscall === "wsarecv") { */ case 6: - _r$2 = http2errno(se.Err); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - n = _r$2; - if ((n === 10054) || (n === 10053)) { - $s = -1; return true; - } - /* } */ case 7: - /* } */ case 5: - /* } */ case 3: - $s = -1; return false; - /* */ } return; } var $f = {$blk: http2isClosedConnError, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, err, n, oe, ok, ok$1, se, str, $s};return $f; - }; - http2serverConn.ptr.prototype.condlogf = function(err, format, args) { - var {_r$1, _v, args, err, format, sc, $s, $r, $c} = $restore(this, {err, format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return; - } - if ($interfaceIsEqual(err, io.EOF) || $interfaceIsEqual(err, io.ErrUnexpectedEOF)) { _v = true; $s = 4; continue s; } - _r$1 = http2isClosedConnError(err); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 4: - /* */ if (_v || $interfaceIsEqual(err, http2errPrefaceTimeout)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v || $interfaceIsEqual(err, http2errPrefaceTimeout)) { */ case 1: - $r = sc.vlogf(format, args); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 3; continue; - /* } else { */ case 2: - $r = sc.logf(format, args); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.condlogf, $c: true, $r, _r$1, _v, args, err, format, sc, $s};return $f; - }; - http2serverConn.prototype.condlogf = function(err, format, args) { return this.$val.condlogf(err, format, args); }; - http2serverConn.ptr.prototype.canonicalHeader = function(v) { - var {_entry, _entry$1, _key, _r$1, _tuple, _tuple$1, cv, ok, sc, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = http2buildCommonHeaderMapsOnce(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = http2commonCanonHeader[$String.keyFor(v)], _entry !== undefined ? [_entry.v, true] : ["", false]); - cv = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $s = -1; return cv; - } - _tuple$1 = (_entry$1 = sc.canonHeader[$String.keyFor(v)], _entry$1 !== undefined ? [_entry$1.v, true] : ["", false]); - cv = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - $s = -1; return cv; - } - if (sc.canonHeader === false) { - sc.canonHeader = {}; - } - _r$1 = CanonicalHeaderKey(v); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cv = _r$1; - if ($keys(sc.canonHeader).length < 32) { - _key = v; (sc.canonHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: cv }; - } - $s = -1; return cv; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.canonicalHeader, $c: true, $r, _entry, _entry$1, _key, _r$1, _tuple, _tuple$1, cv, ok, sc, v, $s};return $f; - }; - http2serverConn.prototype.canonicalHeader = function(v) { return this.$val.canonicalHeader(v); }; - http2serverConn.ptr.prototype.readFrames = function() { - var {_r$1, _r$2, _r$3, _selection, _selection$1, _tuple, err, f, gate, gateDone, sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - gate = new $Chan(structType, 0); - gateDone = $methodVal(new http2gate(gate), "Done"); - /* while (true) { */ case 1: - _r$1 = sc.framer.ReadFrame(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - f = _tuple[0]; - err = _tuple[1]; - _r$2 = $select([[sc.readFrameCh, new http2readFrameResult.ptr(f, err, gateDone)], [sc.doneServing]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection = _r$2; - if (_selection[0] === 0) { - } else if (_selection[0] === 1) { - $s = -1; return; - } - _r$3 = $select([[gate], [sc.doneServing]]); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection$1 = _r$3; - if (_selection$1[0] === 0) { - } else if (_selection$1[0] === 1) { - $s = -1; return; - } - if (http2terminalReadFrameError(err)) { - $s = -1; return; - } - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.readFrames, $c: true, $r, _r$1, _r$2, _r$3, _selection, _selection$1, _tuple, err, f, gate, gateDone, sc, $s};return $f; - }; - http2serverConn.prototype.readFrames = function() { return this.$val.readFrames(); }; - http2serverConn.ptr.prototype.writeFrameAsync = function(wr) { - var {_r$1, err, sc, wr, $s, $r, $c} = $restore(this, {wr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - _r$1 = wr.write.writeFrame(sc); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - $r = $send(sc.wroteFrameCh, $clone(new http2frameWriteResult.ptr(arrayType.zero(), $clone(wr, http2FrameWriteRequest), err), http2frameWriteResult)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.writeFrameAsync, $c: true, $r, _r$1, err, sc, wr, $s};return $f; - }; - http2serverConn.prototype.writeFrameAsync = function(wr) { return this.$val.writeFrameAsync(wr); }; - http2serverConn.ptr.prototype.closeAllStreamsOnConnClose = function() { - var {_entry, _i, _keys, _ref, sc, st, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref = sc.streams; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - st = _entry.v; - $r = sc.closeStream(st, http2errClientDisconnected); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.closeAllStreamsOnConnClose, $c: true, $r, _entry, _i, _keys, _ref, sc, st, $s};return $f; - }; - http2serverConn.prototype.closeAllStreamsOnConnClose = function() { return this.$val.closeAllStreamsOnConnClose(); }; - http2serverConn.ptr.prototype.stopShutdownTimer = function() { - var {sc, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - t = sc.shutdownTimer; - if (!(t === ptrType$25.nil)) { - t.Stop(); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.stopShutdownTimer, $c: true, $r, sc, t, $s};return $f; - }; - http2serverConn.prototype.stopShutdownTimer = function() { return this.$val.stopShutdownTimer(); }; - http2serverConn.ptr.prototype.notePanic = function() { - var {_r$1, e, sc, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - sc = this; - /* */ if (!(http2testHookOnPanicMu === ptrType$2.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(http2testHookOnPanicMu === ptrType$2.nil)) { */ case 1: - $r = http2testHookOnPanicMu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(http2testHookOnPanicMu, "Unlock"), []]); - /* } */ case 2: - /* */ if (!(http2testHookOnPanic === $throwNilPointerError)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(http2testHookOnPanic === $throwNilPointerError)) { */ case 4: - e = $recover(); - /* */ if (!($interfaceIsEqual(e, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(e, $ifaceNil))) { */ case 6: - _r$1 = http2testHookOnPanic(sc, e); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (_r$1) { */ case 8: - $panic(e); - /* } */ case 9: - /* } */ case 7: - /* } */ case 5: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2serverConn.ptr.prototype.notePanic, $c: true, $r, _r$1, e, sc, $s, $deferred};return $f; } } - }; - http2serverConn.prototype.notePanic = function() { return this.$val.notePanic(); }; - http2serverConn.ptr.prototype.serve = function() { - var {_1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _selection$1, _tuple, _v, diff, err, gracefulShutdownComplete, loopNum, m, msg, ok, res, res$1, sc, se, sentGoAway, settingsTimer, v, v$1, v$2, v$3, wr, wroteRes, x$5, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(sc, "notePanic"), []]); - $deferred.push([$methodVal(sc.conn, "Close"), []]); - $deferred.push([$methodVal(sc, "closeAllStreamsOnConnClose"), []]); - $deferred.push([$methodVal(sc, "stopShutdownTimer"), []]); - $deferred.push([function(_arg) { $close(_arg); }, [sc.doneServing]]); - /* */ if (http2VerboseLogs) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (http2VerboseLogs) { */ case 2: - _r$1 = sc.conn.RemoteAddr(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - _arg$2 = sc.hs; - $r = sc.vlogf("http2: server connection from %v on %p", new sliceType([_arg$1, _arg$2])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $r = sc.writeFrame(new http2FrameWriteRequest.ptr(new http2writeSettings([new http2Setting.ptr(5, sc.srv.maxReadFrameSize()), new http2Setting.ptr(3, sc.advMaxStreams), new http2Setting.ptr(6, sc.maxHeaderListSize()), new http2Setting.ptr(4, ((sc.srv.initialStreamRecvWindowSize() >>> 0)))]), ptrType$10.nil, $chanNil)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - sc.unackedSettings = sc.unackedSettings + (1) >> 0; - diff = sc.srv.initialConnRecvWindowSize() - 65535 >> 0; - /* */ if (diff > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (diff > 0) { */ case 7: - $r = sc.sendWindowUpdate(ptrType$10.nil, ((diff >> 0))); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - _r$2 = sc.readPreface(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: - _arg$3 = err; - _r$3 = sc.conn.RemoteAddr(); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg$4 = _r$3; - _arg$5 = err; - $r = sc.condlogf(_arg$3, "http2: server: error reading preface from client %v: %v", new sliceType([_arg$4, _arg$5])); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 15; case 15: return; - /* } */ case 12: - $r = sc.setConnState(1); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.setConnState(2); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((x$5 = sc.srv.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!((x$5 = sc.srv.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { */ case 18: - _r$4 = time.AfterFunc(sc.srv.IdleTimeout, $methodVal(sc, "onIdleTimer")); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - sc.idleTimer = _r$4; - $deferred.push([$methodVal(sc.idleTimer, "Stop"), []]); - /* } */ case 19: - $go($methodVal(sc, "readFrames"), []); - _r$5 = time.AfterFunc(new time.Duration(0, 2000000000), $methodVal(sc, "onSettingsTimer")); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - settingsTimer = _r$5; - $deferred.push([$methodVal(settingsTimer, "Stop"), []]); - loopNum = 0; - /* while (true) { */ case 22: - loopNum = loopNum + (1) >> 0; - _r$6 = $select([[sc.wantWriteFrameCh], [sc.wroteFrameCh], [sc.readFrameCh], [sc.bodyReadCh], [sc.serveMsgCh]]); /* */ $s = 24; case 24: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _selection = _r$6; - /* */ if (_selection[0] === 0) { $s = 25; continue; } - /* */ if (_selection[0] === 1) { $s = 26; continue; } - /* */ if (_selection[0] === 2) { $s = 27; continue; } - /* */ if (_selection[0] === 3) { $s = 28; continue; } - /* */ if (_selection[0] === 4) { $s = 29; continue; } - /* */ $s = 30; continue; - /* switch (0) { default: if (_selection[0] === 0) { */ case 25: - wr = $clone(_selection[1][0], http2FrameWriteRequest); - _tuple = $assertType(wr.write, http2StreamError, true); - se = $clone(_tuple[0], http2StreamError); - ok = _tuple[1]; - /* */ if (ok) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (ok) { */ case 31: - $r = sc.resetStream($clone(se, http2StreamError)); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 30; continue; - /* } */ case 32: - $r = sc.writeFrame($clone(wr, http2FrameWriteRequest)); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 30; continue; - /* } else if (_selection[0] === 1) { */ case 26: - res = $clone(_selection[1][0], http2frameWriteResult); - $r = sc.wroteFrame($clone(res, http2frameWriteResult)); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 30; continue; - /* } else if (_selection[0] === 2) { */ case 27: - res$1 = $clone(_selection[1][0], http2readFrameResult); - /* */ if (sc.writingFrameAsync) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (sc.writingFrameAsync) { */ case 36: - _selection$1 = $select([[sc.wroteFrameCh], []]); - /* */ if (_selection$1[0] === 0) { $s = 38; continue; } - /* */ if (_selection$1[0] === 1) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if (_selection$1[0] === 0) { */ case 38: - wroteRes = $clone(_selection$1[1][0], http2frameWriteResult); - $r = sc.wroteFrame($clone(wroteRes, http2frameWriteResult)); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 40; continue; - /* } else if (_selection$1[0] === 1) { */ case 39: - /* } */ case 40: - /* } */ case 37: - _r$7 = sc.processFrameFromReader($clone(res$1, http2readFrameResult)); /* */ $s = 44; case 44: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - /* */ if (!_r$7) { $s = 42; continue; } - /* */ $s = 43; continue; - /* if (!_r$7) { */ case 42: - $s = 45; case 45: return; - /* } */ case 43: - $r = res$1.readMore(); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(settingsTimer === ptrType$25.nil)) { - settingsTimer.Stop(); - settingsTimer = ptrType$25.nil; - } - $s = 30; continue; - /* } else if (_selection[0] === 3) { */ case 28: - m = $clone(_selection[1][0], http2bodyReadMsg); - $r = sc.noteBodyRead(m.st, m.n); /* */ $s = 47; case 47: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 30; continue; - /* } else if (_selection[0] === 4) { */ case 29: - msg = _selection[1][0]; - _ref = msg; - /* */ if ($assertType(_ref, funcType$2, true)[1]) { $s = 48; continue; } - /* */ if ($assertType(_ref, ptrType$15, true)[1]) { $s = 49; continue; } - /* */ if ($assertType(_ref, ptrType$91, true)[1]) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if ($assertType(_ref, funcType$2, true)[1]) { */ case 48: - v = _ref.$val; - $r = v(loopNum); /* */ $s = 53; case 53: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 52; continue; - /* } else if ($assertType(_ref, ptrType$15, true)[1]) { */ case 49: - v$1 = _ref.$val; - _1 = v$1; - /* */ if (_1 === (http2settingsTimerMsg)) { $s = 55; continue; } - /* */ if (_1 === (http2idleTimerMsg)) { $s = 56; continue; } - /* */ if (_1 === (http2shutdownTimerMsg)) { $s = 57; continue; } - /* */ if (_1 === (http2gracefulShutdownMsg)) { $s = 58; continue; } - /* */ $s = 59; continue; - /* if (_1 === (http2settingsTimerMsg)) { */ case 55: - _r$8 = sc.conn.RemoteAddr(); /* */ $s = 61; case 61: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _arg$6 = _r$8; - $r = sc.logf("timeout waiting for SETTINGS frames from %v", new sliceType([_arg$6])); /* */ $s = 62; case 62: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 63; case 63: return; - /* } else if (_1 === (http2idleTimerMsg)) { */ case 56: - $r = sc.vlogf("connection is idle", new sliceType([])); /* */ $s = 64; case 64: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.goAway(0); /* */ $s = 65; case 65: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 60; continue; - /* } else if (_1 === (http2shutdownTimerMsg)) { */ case 57: - _r$9 = sc.conn.RemoteAddr(); /* */ $s = 66; case 66: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _arg$7 = _r$9; - $r = sc.vlogf("GOAWAY close timer fired; closing conn from %v", new sliceType([_arg$7])); /* */ $s = 67; case 67: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 68; case 68: return; - /* } else if (_1 === (http2gracefulShutdownMsg)) { */ case 58: - $r = sc.startGracefulShutdownInternal(); /* */ $s = 69; case 69: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 60; continue; - /* } else { */ case 59: - $panic(new $String("unknown timer")); - /* } */ case 60: - case 54: - $s = 52; continue; - /* } else if ($assertType(_ref, ptrType$91, true)[1]) { */ case 50: - v$2 = _ref.$val; - $r = sc.startPush(v$2); /* */ $s = 70; case 70: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 52; continue; - /* } else { */ case 51: - v$3 = _ref; - _r$10 = fmt.Sprintf("unexpected type %T", new sliceType([v$3])); /* */ $s = 71; case 71: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $panic(new $String(_r$10)); - /* } */ case 52: - /* } } */ case 30: - /* */ if (sc.queuedControlFrames > sc.srv.maxQueuedControlFrames()) { $s = 72; continue; } - /* */ $s = 73; continue; - /* if (sc.queuedControlFrames > sc.srv.maxQueuedControlFrames()) { */ case 72: - $r = sc.vlogf("http2: too many control frames in send queue, closing connection", new sliceType([])); /* */ $s = 74; case 74: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 75; case 75: return; - /* } */ case 73: - sentGoAway = sc.inGoAway && !sc.needToSendGoAway && !sc.writingFrame; - if (!(sc.goAwayCode === 0)) { _v = false; $s = 76; continue s; } - _r$11 = sc.curOpenStreams(); /* */ $s = 77; case 77: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _v = _r$11 === 0; case 76: - gracefulShutdownComplete = _v; - /* */ if (sentGoAway && sc.shutdownTimer === ptrType$25.nil && (!((sc.goAwayCode === 0)) || gracefulShutdownComplete)) { $s = 78; continue; } - /* */ $s = 79; continue; - /* if (sentGoAway && sc.shutdownTimer === ptrType$25.nil && (!((sc.goAwayCode === 0)) || gracefulShutdownComplete)) { */ case 78: - $r = sc.shutDownIn(http2goAwayTimeout); /* */ $s = 80; case 80: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 79: - $s = 22; continue; - case 23: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2serverConn.ptr.prototype.serve, $c: true, $r, _1, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _arg$5, _arg$6, _arg$7, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _selection$1, _tuple, _v, diff, err, gracefulShutdownComplete, loopNum, m, msg, ok, res, res$1, sc, se, sentGoAway, settingsTimer, v, v$1, v$2, v$3, wr, wroteRes, x$5, $s, $deferred};return $f; } } - }; - http2serverConn.prototype.serve = function() { return this.$val.serve(); }; - http2serverConn.ptr.prototype.onSettingsTimer = function() { - var {sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.sendServeMsg(http2settingsTimerMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.onSettingsTimer, $c: true, $r, sc, $s};return $f; - }; - http2serverConn.prototype.onSettingsTimer = function() { return this.$val.onSettingsTimer(); }; - http2serverConn.ptr.prototype.onIdleTimer = function() { - var {sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.sendServeMsg(http2idleTimerMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.onIdleTimer, $c: true, $r, sc, $s};return $f; - }; - http2serverConn.prototype.onIdleTimer = function() { return this.$val.onIdleTimer(); }; - http2serverConn.ptr.prototype.onShutdownTimer = function() { - var {sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.sendServeMsg(http2shutdownTimerMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.onShutdownTimer, $c: true, $r, sc, $s};return $f; - }; - http2serverConn.prototype.onShutdownTimer = function() { return this.$val.onShutdownTimer(); }; - http2serverConn.ptr.prototype.sendServeMsg = function(msg) { - var {_r$1, _selection, msg, sc, $s, $r, $c} = $restore(this, {msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = $select([[sc.serveMsgCh, msg], [sc.doneServing]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = _r$1; - if (_selection[0] === 0) { - } else if (_selection[0] === 1) { - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.sendServeMsg, $c: true, $r, _r$1, _selection, msg, sc, $s};return $f; - }; - http2serverConn.prototype.sendServeMsg = function(msg) { return this.$val.sendServeMsg(msg); }; - http2serverConn.ptr.prototype.readPreface = function() { - var {$24r, $24r$1, _arg, _r$1, _r$2, _r$3, _selection, err, errc, sc, timer, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - errc = [errc]; - sc = [sc]; - sc[0] = this; - errc[0] = new $Chan($error, 1); - $go((function(errc, sc) { return function $b() { - var {_r$1, _r$2, _tuple, buf, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - buf = $makeSlice(sliceType$3, 24); - _r$1 = io.ReadFull(sc[0].conn, buf); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ if (!bytes.Equal(buf, http2clientPreface)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - $r = $send(errc[0], err); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else if (!bytes.Equal(buf, http2clientPreface)) { */ case 3: - _r$2 = fmt.Errorf("bogus greeting %q", new sliceType([buf])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = $send(errc[0], _r$2); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 5; continue; - /* } else { */ case 4: - $r = $send(errc[0], $ifaceNil); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _r$2, _tuple, buf, err, $s};return $f; - }; })(errc, sc), []); - _r$1 = time.NewTimer(new time.Duration(2, 1410065408)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - timer = _r$1; - $deferred.push([$methodVal(timer, "Stop"), []]); - _r$2 = $select([[timer.C], [errc[0]]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _selection = _r$2; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_selection[0] === 0) { */ case 3: - $24r = http2errPrefaceTimeout; - $s = 6; case 6: return $24r; - /* } else if (_selection[0] === 1) { */ case 4: - err = _selection[1][0]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 7: - /* */ if (http2VerboseLogs) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (http2VerboseLogs) { */ case 9: - _r$3 = sc[0].conn.RemoteAddr(); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _arg = _r$3; - $r = sc[0].vlogf("http2: server: client %v said hello", new sliceType([_arg])); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* } */ case 8: - $24r$1 = err; - $s = 13; case 13: return $24r$1; - /* } */ case 5: - $s = -1; return $ifaceNil; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2serverConn.ptr.prototype.readPreface, $c: true, $r, $24r, $24r$1, _arg, _r$1, _r$2, _r$3, _selection, err, errc, sc, timer, $s, $deferred};return $f; } } - }; - http2serverConn.prototype.readPreface = function() { return this.$val.readPreface(); }; - http2serverConn.ptr.prototype.writeDataFromHandler = function(stream, data, endStream) { - var {_r$1, _r$2, _r$3, _r$4, _selection, _selection$1, ch, data, endStream, err, frameWriteDone, sc, stream, writeArg, $s, $r, $c} = $restore(this, {stream, data, endStream}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - _r$1 = http2errChanPool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ch = $assertType(_r$1, chanType); - _r$2 = http2writeDataPool.Get(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - writeArg = $assertType(_r$2, ptrType$92); - http2writeData.copy(writeArg, new http2writeData.ptr(stream.id, data, endStream)); - _r$3 = sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr(writeArg, stream, ch)); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - frameWriteDone = false; - _r$4 = $select([[ch], [sc.doneServing], [stream.cw]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _selection = _r$4; - if (_selection[0] === 0) { - err = _selection[1][0]; - frameWriteDone = true; - } else if (_selection[0] === 1) { - $s = -1; return http2errClientDisconnected; - } else if (_selection[0] === 2) { - _selection$1 = $select([[ch], []]); - if (_selection$1[0] === 0) { - err = _selection$1[1][0]; - frameWriteDone = true; - } else if (_selection$1[0] === 1) { - $s = -1; return http2errStreamClosed; - } - } - http2errChanPool.Put(new chanType(ch)); - if (frameWriteDone) { - http2writeDataPool.Put(writeArg); - } - $s = -1; return err; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.writeDataFromHandler, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _selection, _selection$1, ch, data, endStream, err, frameWriteDone, sc, stream, writeArg, $s};return $f; - }; - http2serverConn.prototype.writeDataFromHandler = function(stream, data, endStream) { return this.$val.writeDataFromHandler(stream, data, endStream); }; - http2serverConn.ptr.prototype.writeFrameFromHandler = function(wr) { - var {_r$1, _selection, sc, wr, $s, $r, $c} = $restore(this, {wr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = $select([[sc.wantWriteFrameCh, $clone(wr, http2FrameWriteRequest)], [sc.doneServing]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = _r$1; - if (_selection[0] === 0) { - $s = -1; return $ifaceNil; - } else if (_selection[0] === 1) { - $s = -1; return http2errClientDisconnected; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.writeFrameFromHandler, $c: true, $r, _r$1, _selection, sc, wr, $s};return $f; - }; - http2serverConn.prototype.writeFrameFromHandler = function(wr) { return this.$val.writeFrameFromHandler(wr); }; - http2serverConn.ptr.prototype.writeFrame = function(wr) { - var {_r$1, _r$2, _ref, _tuple, _tuple$1, ignoreWrite, isReset, sc, state, wr, $s, $r, $c} = $restore(this, {wr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ignoreWrite = false; - /* */ if (!(($clone(wr, http2FrameWriteRequest).StreamID() === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(($clone(wr, http2FrameWriteRequest).StreamID() === 0))) { */ case 2: - _tuple = $assertType(wr.write, http2StreamError, true); - isReset = _tuple[1]; - _r$1 = sc.state($clone(wr, http2FrameWriteRequest).StreamID()); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - state = _tuple$1[0]; - if ((state === 4) && !isReset) { - ignoreWrite = true; - } - /* } */ case 3: - _ref = wr.write; - if ($assertType(_ref, ptrType$93, true)[1]) { - wr.stream.wroteHeaders = true; - } else if ($assertType(_ref, http2write100ContinueHeadersFrame, true)[1]) { - if (wr.stream.wroteHeaders) { - if (!(wr.done === $chanNil)) { - $panic(new $String("wr.done != nil for write100ContinueHeadersFrame")); - } - ignoreWrite = true; - } - } - /* */ if (!ignoreWrite) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ignoreWrite) { */ case 5: - /* */ if ($clone(wr, http2FrameWriteRequest).isControl()) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ($clone(wr, http2FrameWriteRequest).isControl()) { */ case 7: - sc.queuedControlFrames = sc.queuedControlFrames + (1) >> 0; - /* */ if (sc.queuedControlFrames < 0) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (sc.queuedControlFrames < 0) { */ case 9: - _r$2 = sc.conn.Close(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 10: - /* } */ case 8: - $r = sc.writeSched.Push($clone(wr, http2FrameWriteRequest)); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $r = sc.scheduleFrameWrite(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.writeFrame, $c: true, $r, _r$1, _r$2, _ref, _tuple, _tuple$1, ignoreWrite, isReset, sc, state, wr, $s};return $f; - }; - http2serverConn.prototype.writeFrame = function(wr) { return this.$val.writeFrame(wr); }; - http2serverConn.ptr.prototype.startFrameWrite = function(wr) { - var {_1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, err, err$1, ok, sc, st, wpp, wr, $s, $r, $c} = $restore(this, {wr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (sc.writingFrame) { - $panic(new $String("internal error: can only be writing one frame at a time")); - } - st = wr.stream; - /* */ if (!(st === ptrType$10.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(st === ptrType$10.nil)) { */ case 2: - _1 = st.state; - /* */ if (_1 === (2)) { $s = 5; continue; } - /* */ if (_1 === (4)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (2)) { */ case 5: - _ref = wr.write; - /* */ if ($assertType(_ref, http2StreamError, true)[1] || $assertType(_ref, http2handlerPanicRST, true)[1] || $assertType(_ref, http2writeWindowUpdate, true)[1]) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if ($assertType(_ref, http2StreamError, true)[1] || $assertType(_ref, http2handlerPanicRST, true)[1] || $assertType(_ref, http2writeWindowUpdate, true)[1]) { */ case 8: - $s = 10; continue; - /* } else { */ case 9: - _r$1 = fmt.Sprintf("internal error: attempt to send frame on a half-closed-local stream: %v", new sliceType([new wr.constructor.elem(wr)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 10: - $s = 7; continue; - /* } else if (_1 === (4)) { */ case 6: - _r$2 = fmt.Sprintf("internal error: attempt to send frame on a closed stream: %v", new sliceType([new wr.constructor.elem(wr)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $panic(new $String(_r$2)); - /* } */ case 7: - case 4: - /* } */ case 3: - _tuple = $assertType(wr.write, ptrType$94, true); - wpp = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (ok) { */ case 13: - err = $ifaceNil; - _r$3 = wpp.allocatePromisedID(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - wpp.promisedID = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 16: - sc.writingFrameAsync = false; - $r = wr.replyToWriter(err); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 17: - /* } */ case 14: - sc.writingFrame = true; - sc.needsFrameFlush = true; - _r$4 = wr.write.staysWithinBuffer(sc.bw.Available()); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (_r$4) { */ case 19: - sc.writingFrameAsync = false; - _r$5 = wr.write.writeFrame(sc); /* */ $s = 23; case 23: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$1 = _r$5; - $r = sc.wroteFrame(new http2frameWriteResult.ptr(arrayType.zero(), $clone(wr, http2FrameWriteRequest), err$1)); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 21; continue; - /* } else { */ case 20: - sc.writingFrameAsync = true; - $go($methodVal(sc, "writeFrameAsync"), [$clone(wr, http2FrameWriteRequest)]); - /* } */ case 21: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.startFrameWrite, $c: true, $r, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, err, err$1, ok, sc, st, wpp, wr, $s};return $f; - }; - http2serverConn.prototype.startFrameWrite = function(wr) { return this.$val.startFrameWrite(wr); }; - http2serverConn.ptr.prototype.wroteFrame = function(res) { - var {_1, _entry, _ref, _tuple, ok, res, sc, st, st$1, v, v$1, wr, $s, $r, $c} = $restore(this, {res}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!sc.writingFrame) { - $panic(new $String("internal error: expected to be already writing a frame")); - } - sc.writingFrame = false; - sc.writingFrameAsync = false; - wr = $clone(res.wr, http2FrameWriteRequest); - /* */ if (http2writeEndsStream(wr.write)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (http2writeEndsStream(wr.write)) { */ case 2: - st = wr.stream; - if (st === ptrType$10.nil) { - $panic(new $String("internal error: expecting non-nil stream")); - } - _1 = st.state; - /* */ if (_1 === (1)) { $s = 6; continue; } - /* */ if (_1 === (3)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_1 === (1)) { */ case 6: - st.state = 2; - $r = sc.resetStream($clone(http2streamError(st.id, 0), http2StreamError)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 8; continue; - /* } else if (_1 === (3)) { */ case 7: - $r = sc.closeStream(st, http2errHandlerComplete); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - case 5: - $s = 4; continue; - /* } else { */ case 3: - _ref = wr.write; - /* */ if ($assertType(_ref, http2StreamError, true)[1]) { $s = 11; continue; } - /* */ if ($assertType(_ref, http2handlerPanicRST, true)[1]) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ($assertType(_ref, http2StreamError, true)[1]) { */ case 11: - v = $clone(_ref.$val, http2StreamError); - _tuple = (_entry = sc.streams[$Uint32.keyFor(v.StreamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - st$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (ok) { */ case 14: - $r = sc.closeStream(st$1, new v.constructor.elem(v)); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 15: - $s = 13; continue; - /* } else if ($assertType(_ref, http2handlerPanicRST, true)[1]) { */ case 12: - v$1 = $clone(_ref.$val, http2handlerPanicRST); - $r = sc.closeStream(wr.stream, http2errHandlerPanicked); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - /* } */ case 4: - $r = wr.replyToWriter(res.err); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.scheduleFrameWrite(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.wroteFrame, $c: true, $r, _1, _entry, _ref, _tuple, ok, res, sc, st, st$1, v, v$1, wr, $s};return $f; - }; - http2serverConn.prototype.wroteFrame = function(res) { return this.$val.wroteFrame(res); }; - http2serverConn.ptr.prototype.scheduleFrameWrite = function() { - var {_r$1, _tuple, ok, sc, wr, x$5, x$6, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (sc.writingFrame || sc.inFrameScheduleLoop) { - $s = -1; return; - } - sc.inFrameScheduleLoop = true; - /* while (true) { */ case 2: - /* if (!(!sc.writingFrameAsync)) { break; } */ if(!(!sc.writingFrameAsync)) { $s = 3; continue; } - /* */ if (sc.needToSendGoAway) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (sc.needToSendGoAway) { */ case 4: - sc.needToSendGoAway = false; - $r = sc.startFrameWrite(new http2FrameWriteRequest.ptr(new http2writeGoAway.ptr(sc.maxClientStreamID, sc.goAwayCode), ptrType$10.nil, $chanNil)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* continue; */ $s = 2; continue; - /* } */ case 5: - /* */ if (sc.needToSendSettingsAck) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (sc.needToSendSettingsAck) { */ case 7: - sc.needToSendSettingsAck = false; - $r = sc.startFrameWrite(new http2FrameWriteRequest.ptr((x$5 = new http2writeSettingsAck.ptr(), new x$5.constructor.elem(x$5)), ptrType$10.nil, $chanNil)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* continue; */ $s = 2; continue; - /* } */ case 8: - /* */ if (!sc.inGoAway || (sc.goAwayCode === 0)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!sc.inGoAway || (sc.goAwayCode === 0)) { */ case 10: - _r$1 = sc.writeSched.Pop(); /* */ $s = 12; case 12: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - wr = $clone(_tuple[0], http2FrameWriteRequest); - ok = _tuple[1]; - /* */ if (ok) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (ok) { */ case 13: - if ($clone(wr, http2FrameWriteRequest).isControl()) { - sc.queuedControlFrames = sc.queuedControlFrames - (1) >> 0; - } - $r = sc.startFrameWrite($clone(wr, http2FrameWriteRequest)); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* continue; */ $s = 2; continue; - /* } */ case 14: - /* } */ case 11: - /* */ if (sc.needsFrameFlush) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (sc.needsFrameFlush) { */ case 16: - $r = sc.startFrameWrite(new http2FrameWriteRequest.ptr((x$6 = new http2flushFrameWriter.ptr(), new x$6.constructor.elem(x$6)), ptrType$10.nil, $chanNil)); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - sc.needsFrameFlush = false; - /* continue; */ $s = 2; continue; - /* } */ case 17: - /* break; */ $s = 3; continue; - case 3: - sc.inFrameScheduleLoop = false; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.scheduleFrameWrite, $c: true, $r, _r$1, _tuple, ok, sc, wr, x$5, x$6, $s};return $f; - }; - http2serverConn.prototype.scheduleFrameWrite = function() { return this.$val.scheduleFrameWrite(); }; - http2serverConn.ptr.prototype.startGracefulShutdown = function() { - var {sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = [sc]; - sc[0] = this; - $r = sc[0].serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc[0].shutdownOnce.Do((function(sc) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = sc[0].sendServeMsg(http2gracefulShutdownMsg); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(sc)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.startGracefulShutdown, $c: true, $r, sc, $s};return $f; - }; - http2serverConn.prototype.startGracefulShutdown = function() { return this.$val.startGracefulShutdown(); }; - http2serverConn.ptr.prototype.startGracefulShutdownInternal = function() { - var {sc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.goAway(0); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.startGracefulShutdownInternal, $c: true, $r, sc, $s};return $f; - }; - http2serverConn.prototype.startGracefulShutdownInternal = function() { return this.$val.startGracefulShutdownInternal(); }; - http2serverConn.ptr.prototype.goAway = function(code) { - var {code, sc, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (sc.inGoAway) { - if (sc.goAwayCode === 0) { - sc.goAwayCode = code; - } - $s = -1; return; - } - sc.inGoAway = true; - sc.needToSendGoAway = true; - sc.goAwayCode = code; - $r = sc.scheduleFrameWrite(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.goAway, $c: true, $r, code, sc, $s};return $f; - }; - http2serverConn.prototype.goAway = function(code) { return this.$val.goAway(code); }; - http2serverConn.ptr.prototype.shutDownIn = function(d) { - var {_r$1, d, sc, $s, $r, $c} = $restore(this, {d}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = time.AfterFunc(d, $methodVal(sc, "onShutdownTimer")); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - sc.shutdownTimer = _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.shutDownIn, $c: true, $r, _r$1, d, sc, $s};return $f; - }; - http2serverConn.prototype.shutDownIn = function(d) { return this.$val.shutDownIn(d); }; - http2serverConn.ptr.prototype.resetStream = function(se) { - var {_entry, _tuple, ok, sc, se, st, $s, $r, $c} = $restore(this, {se}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.writeFrame(new http2FrameWriteRequest.ptr(new se.constructor.elem(se), ptrType$10.nil, $chanNil)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = (_entry = sc.streams[$Uint32.keyFor(se.StreamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$10.nil, false]); - st = _tuple[0]; - ok = _tuple[1]; - if (ok) { - st.resetQueued = true; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.resetStream, $c: true, $r, _entry, _tuple, ok, sc, se, st, $s};return $f; - }; - http2serverConn.prototype.resetStream = function(se) { return this.$val.resetStream(se); }; - http2serverConn.ptr.prototype.processFrameFromReader = function(res) { - var {_arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, clientGone, err, ev, ev$1, ev$2, ev$3, f, res, sc, $s, $r, $c} = $restore(this, {res}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err = res.err; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - /* */ if ($interfaceIsEqual(err, http2ErrFrameTooLarge)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($interfaceIsEqual(err, http2ErrFrameTooLarge)) { */ case 5: - $r = sc.goAway(6); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* } */ case 6: - if ($interfaceIsEqual(err, io.EOF) || $interfaceIsEqual(err, io.ErrUnexpectedEOF)) { _v = true; $s = 8; continue s; } - _r$1 = http2isClosedConnError(err); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 8: - clientGone = _v; - if (clientGone) { - $s = -1; return false; - } - $s = 4; continue; - /* } else { */ case 3: - f = res.f; - /* */ if (http2VerboseLogs) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (http2VerboseLogs) { */ case 10: - _r$2 = http2summarizeFrame(f); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg = new $String(_r$2); - $r = sc.vlogf("http2: server read frame %v", new sliceType([_arg])); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - _r$3 = sc.processFrame(f); /* */ $s = 14; case 14: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if ($interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return true; - } - /* } */ case 4: - _ref = err; - /* */ if ($assertType(_ref, http2StreamError, true)[1]) { $s = 15; continue; } - /* */ if ($assertType(_ref, http2goAwayFlowError, true)[1]) { $s = 16; continue; } - /* */ if ($assertType(_ref, http2ConnectionError, true)[1]) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if ($assertType(_ref, http2StreamError, true)[1]) { */ case 15: - ev = $clone(_ref.$val, http2StreamError); - $r = sc.resetStream($clone(ev, http2StreamError)); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* } else if ($assertType(_ref, http2goAwayFlowError, true)[1]) { */ case 16: - ev$1 = $clone(_ref.$val, http2goAwayFlowError); - $r = sc.goAway(3); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* } else if ($assertType(_ref, http2ConnectionError, true)[1]) { */ case 17: - ev$2 = _ref.$val; - _r$4 = sc.conn.RemoteAddr(); /* */ $s = 22; case 22: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = _r$4; - _arg$2 = new http2ConnectionError(ev$2); - $r = sc.logf("http2: server connection error from %v: %v", new sliceType([_arg$1, _arg$2])); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.goAway(((ev$2 >>> 0))); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return true; - /* } else { */ case 18: - ev$3 = _ref; - /* */ if (!($interfaceIsEqual(res.err, $ifaceNil))) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!($interfaceIsEqual(res.err, $ifaceNil))) { */ case 25: - _r$5 = sc.conn.RemoteAddr(); /* */ $s = 28; case 28: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg$3 = _r$5; - _arg$4 = err; - $r = sc.vlogf("http2: server closing client connection; error reading frame from client %s: %v", new sliceType([_arg$3, _arg$4])); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 27; continue; - /* } else { */ case 26: - $r = sc.logf("http2: server closing client connection: %v", new sliceType([err])); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 27: - $s = -1; return false; - /* } */ case 19: - $s = -1; return false; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processFrameFromReader, $c: true, $r, _arg, _arg$1, _arg$2, _arg$3, _arg$4, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _v, clientGone, err, ev, ev$1, ev$2, ev$3, f, res, sc, $s};return $f; - }; - http2serverConn.prototype.processFrameFromReader = function(res) { return this.$val.processFrameFromReader(res); }; - http2serverConn.ptr.prototype.processFrame = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _arg, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, f, f$1, f$10, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, ok, sc, x$5, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!sc.sawFirstSettings) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!sc.sawFirstSettings) { */ case 2: - _tuple = $assertType(f, ptrType$78, true); - ok = _tuple[1]; - /* */ if (!ok) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!ok) { */ case 4: - _r$1 = sc.countError("first_settings", new http2ConnectionError(1)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 5: - sc.sawFirstSettings = true; - /* } */ case 3: - _ref = f; - /* */ if ($assertType(_ref, ptrType$78, true)[1]) { $s = 8; continue; } - /* */ if ($assertType(_ref, ptrType$76, true)[1]) { $s = 9; continue; } - /* */ if ($assertType(_ref, ptrType$80, true)[1]) { $s = 10; continue; } - /* */ if ($assertType(_ref, ptrType$81, true)[1]) { $s = 11; continue; } - /* */ if ($assertType(_ref, ptrType$79, true)[1]) { $s = 12; continue; } - /* */ if ($assertType(_ref, ptrType$83, true)[1]) { $s = 13; continue; } - /* */ if ($assertType(_ref, ptrType$95, true)[1]) { $s = 14; continue; } - /* */ if ($assertType(_ref, ptrType$82, true)[1]) { $s = 15; continue; } - /* */ if ($assertType(_ref, ptrType$96, true)[1]) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if ($assertType(_ref, ptrType$78, true)[1]) { */ case 8: - f$1 = _ref.$val; - _r$2 = sc.processSettings(f$1); /* */ $s = 19; case 19: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 20; case 20: return $24r$1; - /* } else if ($assertType(_ref, ptrType$76, true)[1]) { */ case 9: - f$2 = _ref.$val; - _r$3 = sc.processHeaders(f$2); /* */ $s = 21; case 21: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 22; case 22: return $24r$2; - /* } else if ($assertType(_ref, ptrType$80, true)[1]) { */ case 10: - f$3 = _ref.$val; - _r$4 = sc.processWindowUpdate(f$3); /* */ $s = 23; case 23: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$3 = _r$4; - $s = 24; case 24: return $24r$3; - /* } else if ($assertType(_ref, ptrType$81, true)[1]) { */ case 11: - f$4 = _ref.$val; - _r$5 = sc.processPing(f$4); /* */ $s = 25; case 25: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$4 = _r$5; - $s = 26; case 26: return $24r$4; - /* } else if ($assertType(_ref, ptrType$79, true)[1]) { */ case 12: - f$5 = _ref.$val; - _r$6 = sc.processData(f$5); /* */ $s = 27; case 27: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$5 = _r$6; - $s = 28; case 28: return $24r$5; - /* } else if ($assertType(_ref, ptrType$83, true)[1]) { */ case 13: - f$6 = _ref.$val; - _r$7 = sc.processResetStream(f$6); /* */ $s = 29; case 29: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$6 = _r$7; - $s = 30; case 30: return $24r$6; - /* } else if ($assertType(_ref, ptrType$95, true)[1]) { */ case 14: - f$7 = _ref.$val; - _r$8 = sc.processPriority(f$7); /* */ $s = 31; case 31: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - $24r$7 = _r$8; - $s = 32; case 32: return $24r$7; - /* } else if ($assertType(_ref, ptrType$82, true)[1]) { */ case 15: - f$8 = _ref.$val; - _r$9 = sc.processGoAway(f$8); /* */ $s = 33; case 33: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$8 = _r$9; - $s = 34; case 34: return $24r$8; - /* } else if ($assertType(_ref, ptrType$96, true)[1]) { */ case 16: - f$9 = _ref.$val; - _r$10 = sc.countError("push_promise", new http2ConnectionError(1)); /* */ $s = 35; case 35: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - $24r$9 = _r$10; - $s = 36; case 36: return $24r$9; - /* } else { */ case 17: - f$10 = _ref; - _r$11 = f$10.Header(); /* */ $s = 37; case 37: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - _arg = (x$5 = _r$11, new x$5.constructor.elem(x$5)); - $r = sc.vlogf("http2: server ignoring frame: %v", new sliceType([_arg])); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 18: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processFrame, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _arg, _r$1, _r$10, _r$11, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, f, f$1, f$10, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, ok, sc, x$5, $s};return $f; - }; - http2serverConn.prototype.processFrame = function(f) { return this.$val.processFrame(f); }; - http2serverConn.ptr.prototype.processPing = function(f) { - var {$24r, _r$1, f, sc, x$5, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (f.IsAck()) { - $s = -1; return $ifaceNil; - } - /* */ if (!((f.http2FrameHeader.StreamID === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((f.http2FrameHeader.StreamID === 0))) { */ case 2: - _r$1 = sc.countError("ping_on_stream", new http2ConnectionError(1)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - if (sc.inGoAway && !((sc.goAwayCode === 0))) { - $s = -1; return $ifaceNil; - } - $r = sc.writeFrame(new http2FrameWriteRequest.ptr((x$5 = new http2writePingAck.ptr(f), new x$5.constructor.elem(x$5)), ptrType$10.nil, $chanNil)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processPing, $c: true, $r, $24r, _r$1, f, sc, x$5, $s};return $f; - }; - http2serverConn.prototype.processPing = function(f) { return this.$val.processPing(f); }; - http2serverConn.ptr.prototype.processWindowUpdate = function(f) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _tuple, f, sc, st, state, x$5, x$6, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((f.http2FrameHeader.StreamID === 0))) { $s = 3; continue; } - /* */ if (!sc.flow.add(((f.Increment >> 0)))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!((f.http2FrameHeader.StreamID === 0))) { */ case 3: - _r$1 = sc.state(f.http2FrameHeader.StreamID); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - state = _tuple[0]; - st = _tuple[1]; - /* */ if (state === 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (state === 0) { */ case 7: - _r$2 = sc.countError("stream_idle", new http2ConnectionError(1)); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 10; case 10: return $24r; - /* } */ case 8: - if (st === ptrType$10.nil) { - $s = -1; return $ifaceNil; - } - /* */ if (!st.flow.add(((f.Increment >> 0)))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!st.flow.add(((f.Increment >> 0)))) { */ case 11: - _r$3 = sc.countError("bad_flow", (x$5 = http2streamError(f.http2FrameHeader.StreamID, 3), new x$5.constructor.elem(x$5))); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 14; case 14: return $24r$1; - /* } */ case 12: - $s = 5; continue; - /* } else if (!sc.flow.add(((f.Increment >> 0)))) { */ case 4: - $s = -1; return (x$6 = new http2goAwayFlowError.ptr(), new x$6.constructor.elem(x$6)); - /* } */ case 5: - case 2: - $r = sc.scheduleFrameWrite(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processWindowUpdate, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _tuple, f, sc, st, state, x$5, x$6, $s};return $f; - }; - http2serverConn.prototype.processWindowUpdate = function(f) { return this.$val.processWindowUpdate(f); }; - http2serverConn.ptr.prototype.processResetStream = function(f) { - var {$24r, _r$1, _r$2, _tuple, f, sc, st, state, x$5, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = sc.state(f.http2FrameHeader.StreamID); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - state = _tuple[0]; - st = _tuple[1]; - /* */ if (state === 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (state === 0) { */ case 3: - _r$2 = sc.countError("reset_idle_stream", new http2ConnectionError(1)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 6; case 6: return $24r; - /* } */ case 4: - /* */ if (!(st === ptrType$10.nil)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(st === ptrType$10.nil)) { */ case 7: - $r = st.cancelCtx(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.closeStream(st, (x$5 = http2streamError(f.http2FrameHeader.StreamID, f.ErrCode), new x$5.constructor.elem(x$5))); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processResetStream, $c: true, $r, $24r, _r$1, _r$2, _tuple, f, sc, st, state, x$5, $s};return $f; - }; - http2serverConn.prototype.processResetStream = function(f) { return this.$val.processResetStream(f); }; - http2serverConn.ptr.prototype.closeStream = function(st, err) { - var {_arg, _arg$1, _r$1, _r$2, _r$3, _r$4, err, p, sc, st, x$5, $s, $r, $c} = $restore(this, {st, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ((st.state === 0) || (st.state === 4)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((st.state === 0) || (st.state === 4)) { */ case 2: - _r$1 = fmt.Sprintf("invariant; can't close stream in state %v", new sliceType([new http2streamState(st.state)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 3: - st.state = 4; - if (!(st.writeDeadline === ptrType$25.nil)) { - st.writeDeadline.Stop(); - } - if (st.isPushed()) { - sc.curPushedStreams = sc.curPushedStreams - (1) >>> 0; - } else { - sc.curClientStreams = sc.curClientStreams - (1) >>> 0; - } - delete sc.streams[$Uint32.keyFor(st.id)]; - /* */ if ($keys(sc.streams).length === 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if ($keys(sc.streams).length === 0) { */ case 5: - $r = sc.setConnState(2); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((x$5 = sc.srv.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!((x$5 = sc.srv.IdleTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { */ case 8: - _r$2 = sc.idleTimer.Reset(sc.srv.IdleTimeout); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 9: - _r$3 = http2h1ServerKeepAlivesDisabled(sc.hs); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (_r$3) { */ case 11: - $r = sc.startGracefulShutdownInternal(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - /* } */ case 6: - p = st.body; - /* */ if (!(p === ptrType$97.nil)) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!(p === ptrType$97.nil)) { */ case 15: - _arg = ptrType$10.nil; - _r$4 = p.Len(); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _arg$1 = _r$4; - $r = sc.sendWindowUpdate(_arg, _arg$1); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = p.CloseWithError(err); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 16: - new http2closeWaiter(st.cw).Close(); - $r = sc.writeSched.CloseStream(st.id); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.closeStream, $c: true, $r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, err, p, sc, st, x$5, $s};return $f; - }; - http2serverConn.prototype.closeStream = function(st, err) { return this.$val.closeStream(st, err); }; - http2serverConn.ptr.prototype.processSettings = function(f) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, err, f, sc, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (f.IsAck()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (f.IsAck()) { */ case 2: - sc.unackedSettings = sc.unackedSettings - (1) >> 0; - /* */ if (sc.unackedSettings < 0) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (sc.unackedSettings < 0) { */ case 4: - _r$1 = sc.countError("ack_mystery", new http2ConnectionError(1)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 5: - $s = -1; return $ifaceNil; - /* } */ case 3: - /* */ if (f.NumSettings() > 100 || f.HasDuplicates()) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (f.NumSettings() > 100 || f.HasDuplicates()) { */ case 8: - _r$2 = sc.countError("settings_big_or_dups", new http2ConnectionError(1)); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - _r$3 = f.ForeachSetting($methodVal(sc, "processSetting")); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err = _r$3; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - sc.needToSendSettingsAck = true; - $r = sc.scheduleFrameWrite(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processSettings, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, err, f, sc, $s};return $f; - }; - http2serverConn.prototype.processSettings = function(f) { return this.$val.processSettings(f); }; - http2serverConn.ptr.prototype.processSetting = function(s) { - var {$24r, _1, _r$1, err, s, sc, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err = $clone(s, http2Setting).Valid(); - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (http2VerboseLogs) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (http2VerboseLogs) { */ case 2: - $r = sc.vlogf("http2: server processing setting %v", new sliceType([new s.constructor.elem(s)])); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - _1 = s.ID; - /* */ if (_1 === (1)) { $s = 6; continue; } - /* */ if (_1 === (2)) { $s = 7; continue; } - /* */ if (_1 === (3)) { $s = 8; continue; } - /* */ if (_1 === (4)) { $s = 9; continue; } - /* */ if (_1 === (5)) { $s = 10; continue; } - /* */ if (_1 === (6)) { $s = 11; continue; } - /* */ if (http2VerboseLogs) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_1 === (1)) { */ case 6: - sc.headerTableSize = s.Val; - $r = sc.hpackEncoder.SetMaxDynamicTableSize(s.Val); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else if (_1 === (2)) { */ case 7: - sc.pushEnabled = !((s.Val === 0)); - $s = 13; continue; - /* } else if (_1 === (3)) { */ case 8: - sc.clientMaxStreams = s.Val; - $s = 13; continue; - /* } else if (_1 === (4)) { */ case 9: - _r$1 = sc.processSettingInitialWindowSize(s.Val); /* */ $s = 15; case 15: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 16; case 16: return $24r; - /* } else if (_1 === (5)) { */ case 10: - sc.maxFrameSize = ((s.Val >> 0)); - $s = 13; continue; - /* } else if (_1 === (6)) { */ case 11: - sc.peerMaxHeaderListSize = s.Val; - $s = 13; continue; - /* } else if (http2VerboseLogs) { */ case 12: - $r = sc.vlogf("http2: server ignoring unknown setting %v", new sliceType([new s.constructor.elem(s)])); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - case 5: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processSetting, $c: true, $r, $24r, _1, _r$1, err, s, sc, $s};return $f; - }; - http2serverConn.prototype.processSetting = function(s) { return this.$val.processSetting(s); }; - http2serverConn.ptr.prototype.processSettingInitialWindowSize = function(val) { - var {$24r, _entry, _i, _keys, _r$1, _ref, growth, old, sc, st, val, $s, $r, $c} = $restore(this, {val}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - old = sc.initialStreamSendWindowSize; - sc.initialStreamSendWindowSize = ((val >> 0)); - growth = ((val >> 0)) - old >> 0; - _ref = sc.streams; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - st = _entry.v; - /* */ if (!st.flow.add(growth)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!st.flow.add(growth)) { */ case 4: - _r$1 = sc.countError("setting_win_size", new http2ConnectionError(3)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 7; case 7: return $24r; - /* } */ case 5: - _i++; - $s = 2; continue; - case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processSettingInitialWindowSize, $c: true, $r, $24r, _entry, _i, _keys, _r$1, _ref, growth, old, sc, st, val, $s};return $f; - }; - http2serverConn.prototype.processSettingInitialWindowSize = function(val) { return this.$val.processSettingInitialWindowSize(val); }; - http2serverConn.ptr.prototype.processData = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, data, err, f, id, pad, sc, st, state, wrote, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - id = $clone(f.http2FrameHeader, http2FrameHeader).Header().StreamID; - if (sc.inGoAway && (!((sc.goAwayCode === 0)) || id > sc.maxClientStreamID)) { - $s = -1; return $ifaceNil; - } - data = f.Data(); - _r$1 = sc.state(id); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - state = _tuple[0]; - st = _tuple[1]; - /* */ if ((id === 0) || (state === 0)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ((id === 0) || (state === 0)) { */ case 3: - _r$2 = sc.countError("data_on_idle", new http2ConnectionError(1)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 6; case 6: return $24r; - /* } */ case 4: - /* */ if (st === ptrType$10.nil || !((state === 1)) || st.gotTrailerHeader || st.resetQueued) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (st === ptrType$10.nil || !((state === 1)) || st.gotTrailerHeader || st.resetQueued) { */ case 7: - /* */ if (sc.inflow.available() < ((f.http2FrameHeader.Length >> 0))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (sc.inflow.available() < ((f.http2FrameHeader.Length >> 0))) { */ case 9: - _r$3 = sc.countError("data_flow", (x$5 = http2streamError(id, 3), new x$5.constructor.elem(x$5))); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 12; case 12: return $24r$1; - /* } */ case 10: - sc.inflow.take(((f.http2FrameHeader.Length >> 0))); - $r = sc.sendWindowUpdate(ptrType$10.nil, ((f.http2FrameHeader.Length >> 0))); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(st === ptrType$10.nil) && st.resetQueued) { - $s = -1; return $ifaceNil; - } - _r$4 = sc.countError("closed", (x$6 = http2streamError(id, 5), new x$6.constructor.elem(x$6))); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 15; case 15: return $24r$2; - /* } */ case 8: - if (st.body === ptrType$97.nil) { - $panic(new $String("internal error: should have a body in this state")); - } - /* */ if (!((x$7 = st.declBodyBytes, (x$7.$high === -1 && x$7.$low === 4294967295))) && (x$8 = (x$9 = st.bodyBytes, x$10 = (new $Int64(0, data.$length)), new $Int64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)), x$11 = st.declBodyBytes, (x$8.$high > x$11.$high || (x$8.$high === x$11.$high && x$8.$low > x$11.$low)))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!((x$7 = st.declBodyBytes, (x$7.$high === -1 && x$7.$low === 4294967295))) && (x$8 = (x$9 = st.bodyBytes, x$10 = (new $Int64(0, data.$length)), new $Int64(x$9.$high + x$10.$high, x$9.$low + x$10.$low)), x$11 = st.declBodyBytes, (x$8.$high > x$11.$high || (x$8.$high === x$11.$high && x$8.$low > x$11.$low)))) { */ case 16: - _r$5 = fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", new sliceType([st.declBodyBytes])); /* */ $s = 18; case 18: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $r = st.body.CloseWithError(_r$5); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = sc.countError("send_too_much", (x$12 = http2streamError(id, 1), new x$12.constructor.elem(x$12))); /* */ $s = 20; case 20: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = _r$6; - $s = 21; case 21: return $24r$3; - /* } */ case 17: - /* */ if (f.http2FrameHeader.Length > 0) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (f.http2FrameHeader.Length > 0) { */ case 22: - /* */ if (st.inflow.available() < ((f.http2FrameHeader.Length >> 0))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (st.inflow.available() < ((f.http2FrameHeader.Length >> 0))) { */ case 24: - _r$7 = sc.countError("flow_on_data_length", (x$13 = http2streamError(id, 3), new x$13.constructor.elem(x$13))); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$4 = _r$7; - $s = 27; case 27: return $24r$4; - /* } */ case 25: - st.inflow.take(((f.http2FrameHeader.Length >> 0))); - /* */ if (data.$length > 0) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (data.$length > 0) { */ case 28: - _r$8 = st.body.Write(data); /* */ $s = 30; case 30: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _tuple$1 = _r$8; - wrote = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 31: - $r = sc.sendWindowUpdate(ptrType$10.nil, ((f.http2FrameHeader.Length >> 0)) - wrote >> 0); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$9 = sc.countError("body_write_err", (x$14 = http2streamError(id, 5), new x$14.constructor.elem(x$14))); /* */ $s = 34; case 34: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - $24r$5 = _r$9; - $s = 35; case 35: return $24r$5; - /* } */ case 32: - if (!((wrote === data.$length))) { - $panic(new $String("internal error: bad Writer")); - } - st.bodyBytes = (x$15 = st.bodyBytes, x$16 = (new $Int64(0, data.$length)), new $Int64(x$15.$high + x$16.$high, x$15.$low + x$16.$low)); - /* } */ case 29: - pad = ((f.http2FrameHeader.Length >> 0)) - ((data.$length >> 0)) >> 0; - /* */ if (pad > 0) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (pad > 0) { */ case 36: - $r = sc.sendWindowUpdate32(ptrType$10.nil, pad); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.sendWindowUpdate32(st, pad); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 37: - /* } */ case 23: - /* */ if (f.StreamEnded()) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (f.StreamEnded()) { */ case 40: - $r = st.endStream(); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 41: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processData, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, data, err, f, id, pad, sc, st, state, wrote, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - http2serverConn.prototype.processData = function(f) { return this.$val.processData(f); }; - http2serverConn.ptr.prototype.processGoAway = function(f) { - var {f, sc, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((f.ErrCode === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((f.ErrCode === 0))) { */ case 2: - $r = sc.logf("http2: received GOAWAY %+v, starting graceful shutdown", new sliceType([f])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; continue; - /* } else { */ case 3: - $r = sc.vlogf("http2: received GOAWAY %+v, starting graceful shutdown", new sliceType([f])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $r = sc.startGracefulShutdownInternal(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - sc.pushEnabled = false; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processGoAway, $c: true, $r, f, sc, $s};return $f; - }; - http2serverConn.prototype.processGoAway = function(f) { return this.$val.processGoAway(f); }; - http2stream.ptr.prototype.isPushed = function() { - var _r$1, st; - st = this; - return (_r$1 = st.id % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 0; - }; - http2stream.prototype.isPushed = function() { return this.$val.isPushed(); }; - http2stream.ptr.prototype.endStream = function() { - var {_r$1, sc, st, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - st = this; - sc = st.sc; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((x$5 = st.declBodyBytes, (x$5.$high === -1 && x$5.$low === 4294967295))) && !((x$6 = st.declBodyBytes, x$7 = st.bodyBytes, (x$6.$high === x$7.$high && x$6.$low === x$7.$low)))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((x$5 = st.declBodyBytes, (x$5.$high === -1 && x$5.$low === 4294967295))) && !((x$6 = st.declBodyBytes, x$7 = st.bodyBytes, (x$6.$high === x$7.$high && x$6.$low === x$7.$low)))) { */ case 2: - _r$1 = fmt.Errorf("request declared a Content-Length of %d but only wrote %d bytes", new sliceType([st.declBodyBytes, st.bodyBytes])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = st.body.CloseWithError(_r$1); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 4; continue; - /* } else { */ case 3: - $r = st.body.closeWithErrorAndCode(io.EOF, $methodVal(st, "copyTrailersToHandlerRequest")); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = st.body.CloseWithError(io.EOF); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - st.state = 3; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2stream.ptr.prototype.endStream, $c: true, $r, _r$1, sc, st, x$5, x$6, x$7, $s};return $f; - }; - http2stream.prototype.endStream = function() { return this.$val.endStream(); }; - http2stream.ptr.prototype.copyTrailersToHandlerRequest = function() { - var _entry, _entry$1, _i, _key, _keys, _ref, _tuple, k, ok, st, vv; - st = this; - _ref = st.trailer; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - _tuple = (_entry$1 = st.reqTrailer[$String.keyFor(k)], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$2.nil, false]); - ok = _tuple[1]; - if (ok) { - _key = k; (st.reqTrailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - } - _i++; - } - }; - http2stream.prototype.copyTrailersToHandlerRequest = function() { return this.$val.copyTrailersToHandlerRequest(); }; - http2stream.ptr.prototype.onWriteTimeout = function() { - var {_r$1, st, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - st = this; - _r$1 = st.sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr((x$5 = http2streamError(st.id, 2), new x$5.constructor.elem(x$5)), ptrType$10.nil, $chanNil)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2stream.ptr.prototype.onWriteTimeout, $c: true, $r, _r$1, st, x$5, $s};return $f; - }; - http2stream.prototype.onWriteTimeout = function() { return this.$val.onWriteTimeout(); }; - http2serverConn.ptr.prototype.processHeaders = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _entry, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, err, err$1, err$2, f, handler, id, initialState, req, rw, sc, st, st$1, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - id = f.http2HeadersFrame.http2FrameHeader.StreamID; - if (sc.inGoAway) { - $s = -1; return $ifaceNil; - } - /* */ if (!(((_r$1 = id % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 1))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(((_r$1 = id % 2, _r$1 === _r$1 ? _r$1 : $throwRuntimeError("integer divide by zero")) === 1))) { */ case 2: - _r$2 = sc.countError("headers_even", new http2ConnectionError(1)); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 3: - st = (_entry = sc.streams[$Uint32.keyFor(f.http2HeadersFrame.http2FrameHeader.StreamID)], _entry !== undefined ? _entry.v : ptrType$10.nil); - /* */ if (!(st === ptrType$10.nil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(st === ptrType$10.nil)) { */ case 6: - if (st.resetQueued) { - $s = -1; return $ifaceNil; - } - /* */ if (st.state === 3) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (st.state === 3) { */ case 8: - _r$3 = sc.countError("headers_half_closed", (x$5 = http2streamError(id, 5), new x$5.constructor.elem(x$5))); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 11; case 11: return $24r$1; - /* } */ case 9: - _r$4 = st.processTrailerHeaders(f); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 13; case 13: return $24r$2; - /* } */ case 7: - /* */ if (id <= sc.maxClientStreamID) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (id <= sc.maxClientStreamID) { */ case 14: - _r$5 = sc.countError("stream_went_down", new http2ConnectionError(1)); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$3 = _r$5; - $s = 17; case 17: return $24r$3; - /* } */ case 15: - sc.maxClientStreamID = id; - if (!(sc.idleTimer === ptrType$25.nil)) { - sc.idleTimer.Stop(); - } - /* */ if ((sc.curClientStreams + 1 >>> 0) > sc.advMaxStreams) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if ((sc.curClientStreams + 1 >>> 0) > sc.advMaxStreams) { */ case 18: - /* */ if (sc.unackedSettings === 0) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (sc.unackedSettings === 0) { */ case 20: - _r$6 = sc.countError("over_max_streams", (x$6 = http2streamError(id, 1), new x$6.constructor.elem(x$6))); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$4 = _r$6; - $s = 23; case 23: return $24r$4; - /* } */ case 21: - _r$7 = sc.countError("over_max_streams_race", (x$7 = http2streamError(id, 7), new x$7.constructor.elem(x$7))); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$5 = _r$7; - $s = 25; case 25: return $24r$5; - /* } */ case 19: - initialState = 1; - if (f.http2HeadersFrame.StreamEnded()) { - initialState = 3; - } - _r$8 = sc.newStream(id, 0, initialState); /* */ $s = 26; case 26: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - st$1 = _r$8; - /* */ if (f.http2HeadersFrame.HasPriority()) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (f.http2HeadersFrame.HasPriority()) { */ case 27: - _r$9 = sc.checkPriority(f.http2HeadersFrame.http2FrameHeader.StreamID, $clone(f.http2HeadersFrame.Priority, http2PriorityParam)); /* */ $s = 29; case 29: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $r = sc.writeSched.AdjustStream(st$1.id, $clone(f.http2HeadersFrame.Priority, http2PriorityParam)); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 28: - _r$10 = sc.newWriterAndRequest(st$1, f); /* */ $s = 31; case 31: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _tuple = _r$10; - rw = _tuple[0]; - req = _tuple[1]; - err$1 = _tuple[2]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - st$1.reqTrailer = req.Trailer; - if (!(st$1.reqTrailer === false)) { - st$1.trailer = {}; - } - st$1.body = $assertType(req.Body, ptrType$12).pipe; - st$1.declBodyBytes = req.ContentLength; - handler = $methodVal(sc.handler, "ServeHTTP"); - /* */ if (f.Truncated) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (f.Truncated) { */ case 32: - handler = http2handleHeaderListTooLong; - $s = 34; continue; - /* } else { */ case 33: - _r$11 = http2checkValidHTTP2RequestHeaders(req.Header); /* */ $s = 35; case 35: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err$2 = _r$11; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - handler = http2new400Handler(err$2); - } - /* } */ case 34: - /* */ if (!((x$8 = sc.hs.ReadTimeout, (x$8.$high === 0 && x$8.$low === 0)))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!((x$8 = sc.hs.ReadTimeout, (x$8.$high === 0 && x$8.$low === 0)))) { */ case 36: - _r$12 = sc.conn.SetReadDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 38; case 38: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$12; - /* } */ case 37: - $go($methodVal(sc, "runHandler"), [rw, req, handler]); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processHeaders, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _entry, _r$1, _r$10, _r$11, _r$12, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, err, err$1, err$2, f, handler, id, initialState, req, rw, sc, st, st$1, x$5, x$6, x$7, x$8, $s};return $f; - }; - http2serverConn.prototype.processHeaders = function(f) { return this.$val.processHeaders(f); }; - http2stream.ptr.prototype.processTrailerHeaders = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, _entry, _i, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, f, hf, key, sc, st, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - st = this; - sc = st.sc; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (st.gotTrailerHeader) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (st.gotTrailerHeader) { */ case 2: - _r$1 = sc.countError("dup_trailers", new http2ConnectionError(1)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* } */ case 3: - st.gotTrailerHeader = true; - /* */ if (!f.http2HeadersFrame.StreamEnded()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!f.http2HeadersFrame.StreamEnded()) { */ case 6: - _r$2 = sc.countError("trailers_not_ended", (x$5 = http2streamError(st.id, 1), new x$5.constructor.elem(x$5))); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 9; case 9: return $24r$1; - /* } */ case 7: - /* */ if (f.PseudoFields().$length > 0) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (f.PseudoFields().$length > 0) { */ case 10: - _r$3 = sc.countError("trailers_pseudo", (x$6 = http2streamError(st.id, 1), new x$6.constructor.elem(x$6))); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = _r$3; - $s = 13; case 13: return $24r$2; - /* } */ case 11: - /* */ if (!(st.trailer === false)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!(st.trailer === false)) { */ case 14: - _ref = f.RegularFields(); - _i = 0; - /* while (true) { */ case 16: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 17; continue; } - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - _r$4 = sc.canonicalHeader(hf.Name); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - key = _r$4; - _r$5 = httpguts.ValidTrailerHeader(key); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (!_r$5) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (!_r$5) { */ case 19: - _r$6 = sc.countError("trailers_bogus", (x$7 = http2streamError(st.id, 1), new x$7.constructor.elem(x$7))); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - $24r$3 = _r$6; - $s = 23; case 23: return $24r$3; - /* } */ case 20: - _key = key; (st.trailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = st.trailer[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), hf.Value) }; - _i++; - $s = 16; continue; - case 17: - /* } */ case 15: - $r = st.endStream(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2stream.ptr.prototype.processTrailerHeaders, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _entry, _i, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, f, hf, key, sc, st, x$5, x$6, x$7, $s};return $f; - }; - http2stream.prototype.processTrailerHeaders = function(f) { return this.$val.processTrailerHeaders(f); }; - http2serverConn.ptr.prototype.checkPriority = function(streamID, p) { - var {$24r, _r$1, p, sc, streamID, x$5, $s, $r, $c} = $restore(this, {streamID, p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - /* */ if (streamID === p.StreamDep) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (streamID === p.StreamDep) { */ case 1: - _r$1 = sc.countError("priority", (x$5 = http2streamError(streamID, 1), new x$5.constructor.elem(x$5))); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.checkPriority, $c: true, $r, $24r, _r$1, p, sc, streamID, x$5, $s};return $f; - }; - http2serverConn.prototype.checkPriority = function(streamID, p) { return this.$val.checkPriority(streamID, p); }; - http2serverConn.ptr.prototype.processPriority = function(f) { - var {_r$1, err, f, sc, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - if (sc.inGoAway) { - $s = -1; return $ifaceNil; - } - _r$1 = sc.checkPriority(f.http2FrameHeader.StreamID, $clone(f.http2PriorityParam, http2PriorityParam)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $r = sc.writeSched.AdjustStream(f.http2FrameHeader.StreamID, $clone(f.http2PriorityParam, http2PriorityParam)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.processPriority, $c: true, $r, _r$1, err, f, sc, $s};return $f; - }; - http2serverConn.prototype.processPriority = function(f) { return this.$val.processPriority(f); }; - http2serverConn.ptr.prototype.newStream = function(id, pusherID, state) { - var {_key, _r$1, _r$2, _r$3, _tuple, cancelCtx, ctx, id, pusherID, sc, st, state, x$5, $s, $r, $c} = $restore(this, {id, pusherID, state}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (id === 0) { - $panic(new $String("internal error: cannot create stream with id 0")); - } - _r$1 = context.WithCancel(sc.baseCtx); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ctx = _tuple[0]; - cancelCtx = _tuple[1]; - st = new http2stream.ptr(sc, id, ptrType$97.nil, $chanNil, ctx, cancelCtx, new $Int64(0, 0), new $Int64(0, 0), new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), state, false, false, false, ptrType$25.nil, false, false); - (st.$ptr_cw || (st.$ptr_cw = new ptrType$98(function() { return this.$target.cw; }, function($v) { this.$target.cw = $v; }, st))).Init(); - st.flow.conn = sc.flow; - st.flow.add(sc.initialStreamSendWindowSize); - st.inflow.conn = sc.inflow; - st.inflow.add(sc.srv.initialStreamRecvWindowSize()); - /* */ if (!((x$5 = sc.hs.WriteTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((x$5 = sc.hs.WriteTimeout, (x$5.$high === 0 && x$5.$low === 0)))) { */ case 3: - _r$2 = time.AfterFunc(sc.hs.WriteTimeout, $methodVal(st, "onWriteTimeout")); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - st.writeDeadline = _r$2; - /* } */ case 4: - _key = id; (sc.streams || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: st }; - $r = sc.writeSched.OpenStream(st.id, new http2OpenStreamOptions.ptr(pusherID)); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (st.isPushed()) { - sc.curPushedStreams = sc.curPushedStreams + (1) >>> 0; - } else { - sc.curClientStreams = sc.curClientStreams + (1) >>> 0; - } - _r$3 = sc.curOpenStreams(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3 === 1) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (_r$3 === 1) { */ case 7: - $r = sc.setConnState(1); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - $s = -1; return st; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.newStream, $c: true, $r, _key, _r$1, _r$2, _r$3, _tuple, cancelCtx, ctx, id, pusherID, sc, st, state, x$5, $s};return $f; - }; - http2serverConn.prototype.newStream = function(id, pusherID, state) { return this.$val.newStream(id, pusherID, state); }; - http2serverConn.ptr.prototype.newWriterAndRequest = function(st, f) { - var {$24r, $24r$1, $24r$2, _entry, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, _tuple$1, _tuple$2, bodyOpen, cl, err, err$1, f, hf, isConnect, ok, req, rp, rw, sc, st, vv, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {st, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - rp = new http2requestParam.ptr(f.PseudoValue("method"), f.PseudoValue("scheme"), f.PseudoValue("authority"), f.PseudoValue("path"), false); - isConnect = rp.method === "CONNECT"; - /* */ if (isConnect) { $s = 2; continue; } - /* */ if (rp.method === "" || rp.path === "" || (!(rp.scheme === "https") && !(rp.scheme === "http"))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (isConnect) { */ case 2: - /* */ if (!(rp.path === "") || !(rp.scheme === "") || rp.authority === "") { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(rp.path === "") || !(rp.scheme === "") || rp.authority === "") { */ case 5: - _r$1 = sc.countError("bad_connect", (x$5 = http2streamError(f.http2HeadersFrame.http2FrameHeader.StreamID, 1), new x$5.constructor.elem(x$5))); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [ptrType$16.nil, ptrType$11.nil, _r$1]; - $s = 8; case 8: return $24r; - /* } */ case 6: - $s = 4; continue; - /* } else if (rp.method === "" || rp.path === "" || (!(rp.scheme === "https") && !(rp.scheme === "http"))) { */ case 3: - _r$2 = sc.countError("bad_path_method", (x$6 = http2streamError(f.http2HeadersFrame.http2FrameHeader.StreamID, 1), new x$6.constructor.elem(x$6))); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = [ptrType$16.nil, ptrType$11.nil, _r$2]; - $s = 10; case 10: return $24r$1; - /* } */ case 4: - bodyOpen = !f.http2HeadersFrame.StreamEnded(); - /* */ if (rp.method === "HEAD" && bodyOpen) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (rp.method === "HEAD" && bodyOpen) { */ case 11: - _r$3 = sc.countError("head_body", (x$7 = http2streamError(f.http2HeadersFrame.http2FrameHeader.StreamID, 1), new x$7.constructor.elem(x$7))); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$2 = [ptrType$16.nil, ptrType$11.nil, _r$3]; - $s = 14; case 14: return $24r$2; - /* } */ case 12: - rp.header = {}; - _ref = f.RegularFields(); - _i = 0; - /* while (true) { */ case 15: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 16; continue; } - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - _r$4 = sc.canonicalHeader(hf.Name); /* */ $s = 17; case 17: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = new Header(rp.header).Add(_r$4, hf.Value); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 15; continue; - case 16: - /* */ if (rp.authority === "") { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (rp.authority === "") { */ case 19: - _r$5 = new Header(rp.header).Get("Host"); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rp.authority = _r$5; - /* } */ case 20: - _r$6 = sc.newWriterAndRequestNoBody(st, $clone(rp, http2requestParam)); /* */ $s = 22; case 22: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _tuple = _r$6; - rw = _tuple[0]; - req = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$16.nil, ptrType$11.nil, err]; - } - if (bodyOpen) { - _tuple$1 = (_entry = rp.header[$String.keyFor("Content-Length")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - vv = _tuple$1[0]; - ok = _tuple$1[1]; - if (ok) { - _tuple$2 = strconv.ParseUint((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]), 10, 63); - cl = _tuple$2[0]; - err$1 = _tuple$2[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - req.ContentLength = (new $Int64(cl.$high, cl.$low)); - } else { - req.ContentLength = new $Int64(0, 0); - } - } else { - req.ContentLength = new $Int64(-1, 4294967295); - } - $assertType(req.Body, ptrType$12).pipe = new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), new http2dataBuffer.ptr(sliceType$5.nil, 0, 0, 0, req.ContentLength), 0, $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError); - } - $s = -1; return [rw, req, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.newWriterAndRequest, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _tuple, _tuple$1, _tuple$2, bodyOpen, cl, err, err$1, f, hf, isConnect, ok, req, rp, rw, sc, st, vv, x$5, x$6, x$7, $s};return $f; - }; - http2serverConn.prototype.newWriterAndRequest = function(st, f) { return this.$val.newWriterAndRequest(st, f); }; - http2serverConn.ptr.prototype.newWriterAndRequestNoBody = function(st, rp) { - var {$24r, _1, _entry, _entry$1, _i, _i$1, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _tuple, body$1, bwSave, cookies, err, key, needsContinue, req, requestURI, rp, rw, rws, sc, st, tlsState, trailer, url_, v, x$5, x$6, $s, $r, $c} = $restore(this, {st, rp}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - tlsState = ptrType$28.nil; - if (rp.scheme === "https") { - tlsState = sc.tlsState; - } - _r$1 = new Header(rp.header).Get("Expect"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - needsContinue = _r$1 === "100-continue"; - /* */ if (needsContinue) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (needsContinue) { */ case 3: - $r = new Header(rp.header).Del("Expect"); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - cookies = (_entry = rp.header[$String.keyFor("Cookie")], _entry !== undefined ? _entry.v : sliceType$2.nil); - /* */ if (cookies.$length > 1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (cookies.$length > 1) { */ case 6: - $r = new Header(rp.header).Set("Cookie", strings.Join(cookies, "; ")); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - trailer = false; - _ref = (_entry$1 = rp.header[$String.keyFor("Trailer")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - _i = 0; - /* while (true) { */ case 9: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 10; continue; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = strings.Split(v, ","); - _i$1 = 0; - /* while (true) { */ case 11: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 12; continue; } - key = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - _r$2 = CanonicalHeaderKey(textproto.TrimString(key)); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - key = _r$2; - _1 = key; - if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { - } else { - if (trailer === false) { - trailer = {}; - } - _key = key; (trailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$2.nil }; - } - _i$1++; - $s = 11; continue; - case 12: - _i++; - $s = 9; continue; - case 10: - delete rp.header[$String.keyFor("Trailer")]; - url_ = ptrType$17.nil; - requestURI = ""; - /* */ if (rp.method === "CONNECT") { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (rp.method === "CONNECT") { */ case 14: - url_ = new url.URL.ptr("", "", ptrType$21.nil, rp.authority, "", "", false, "", "", ""); - requestURI = rp.authority; - $s = 16; continue; - /* } else { */ case 15: - err = $ifaceNil; - _r$3 = url.ParseRequestURI(rp.path); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - url_ = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 18: - _r$4 = sc.countError("bad_path", (x$5 = http2streamError(st.id, 1), new x$5.constructor.elem(x$5))); /* */ $s = 20; case 20: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = [ptrType$16.nil, ptrType$11.nil, _r$4]; - $s = 21; case 21: return $24r; - /* } */ case 19: - requestURI = rp.path; - /* } */ case 16: - body$1 = new http2requestBody.ptr(arrayType.zero(), st, sc, false, false, ptrType$97.nil, needsContinue); - req = new Request.ptr(rp.method, url_, "HTTP/2.0", 2, 0, rp.header, body$1, $throwNilPointerError, new $Int64(0, 0), sliceType$2.nil, false, rp.authority, false, false, ptrType$31.nil, trailer, sc.remoteAddrStr, requestURI, tlsState, $chanNil, ptrType$18.nil, $ifaceNil); - req = req.WithContext(st.ctx); - _r$5 = http2responseWriterStatePool.Get(); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - rws = $assertType(_r$5, ptrType$99); - bwSave = rws.bw; - http2responseWriterState.copy(rws, new http2responseWriterState.ptr(ptrType$10.nil, ptrType$11.nil, ptrType$12.nil, ptrType$13.nil, ptrType$14.nil, false, false, sliceType$2.nil, 0, false, false, false, false, new $Int64(0, 0), new $Int64(0, 0), new sync.Mutex.ptr(0, 0), $chanNil)); - rws.conn = sc; - rws.bw = bwSave; - rws.bw.Reset((x$6 = new http2chunkWriter.ptr(rws), new x$6.constructor.elem(x$6))); - rws.stream = st; - rws.req = req; - rws.body = body$1; - rw = new http2responseWriter.ptr(rws); - $s = -1; return [rw, req, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.newWriterAndRequestNoBody, $c: true, $r, $24r, _1, _entry, _entry$1, _i, _i$1, _key, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _ref$1, _tuple, body$1, bwSave, cookies, err, key, needsContinue, req, requestURI, rp, rw, rws, sc, st, tlsState, trailer, url_, v, x$5, x$6, $s};return $f; - }; - http2serverConn.prototype.newWriterAndRequestNoBody = function(st, rp) { return this.$val.newWriterAndRequestNoBody(st, rp); }; - http2serverConn.ptr.prototype.runHandler = function(rw, req, handler) { - var {didPanic, handler, req, rw, sc, $s, $deferred, $r, $c} = $restore(this, {rw, req, handler}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - didPanic = [didPanic]; - rw = [rw]; - sc = [sc]; - sc[0] = this; - didPanic[0] = true; - $deferred.push([(function(didPanic, rw, sc) { return function $b() { - var {_arg, _arg$1, _arg$2, _r$1, _r$2, buf, e, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = rw[0].rws.stream.cancelCtx(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (didPanic[0]) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (didPanic[0]) { */ case 2: - e = $recover(); - _r$1 = sc[0].writeFrameFromHandler(new http2FrameWriteRequest.ptr((x$5 = new http2handlerPanicRST.ptr(rw[0].rws.stream.id), new x$5.constructor.elem(x$5)), rw[0].rws.stream, $chanNil)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* */ if (!($interfaceIsEqual(e, $ifaceNil)) && !($interfaceIsEqual(e, $pkg.ErrAbortHandler))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(e, $ifaceNil)) && !($interfaceIsEqual(e, $pkg.ErrAbortHandler))) { */ case 5: - buf = $makeSlice(sliceType$3, 65536); - buf = $subslice(buf, 0, runtime.Stack(buf, false)); - _r$2 = sc[0].conn.RemoteAddr(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg = _r$2; - _arg$1 = e; - _arg$2 = buf; - $r = sc[0].logf("http2: panic serving %v: %v\n%s", new sliceType([_arg, _arg$1, _arg$2])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $s = -1; return; - /* } */ case 3: - $r = rw[0].handlerDone(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _arg$2, _r$1, _r$2, buf, e, x$5, $s};return $f; - }; })(didPanic, rw, sc), []]); - $r = handler(rw[0], req); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - didPanic[0] = false; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2serverConn.ptr.prototype.runHandler, $c: true, $r, didPanic, handler, req, rw, sc, $s, $deferred};return $f; } } - }; - http2serverConn.prototype.runHandler = function(rw, req, handler) { return this.$val.runHandler(rw, req, handler); }; - http2handleHeaderListTooLong = function(w, r) { - var {_r$1, r, w, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = w.WriteHeader(431); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = io.WriteString(w, "

HTTP Error 431

Request Header Field(s) Too Large

"); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2handleHeaderListTooLong, $c: true, $r, _r$1, r, w, $s};return $f; - }; - http2serverConn.ptr.prototype.writeHeaders = function(st, headerData) { - var {_r$1, _r$2, _r$3, _selection, err, err$1, errc, headerData, sc, st, $s, $r, $c} = $restore(this, {st, headerData}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - errc = $chanNil; - /* */ if (!(headerData.h === false)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(headerData.h === false)) { */ case 2: - _r$1 = http2errChanPool.Get(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - errc = $assertType(_r$1, chanType); - /* } */ case 3: - _r$2 = sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr(headerData, st, errc)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (!(errc === $chanNil)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(errc === $chanNil)) { */ case 6: - _r$3 = $select([[errc], [sc.doneServing], [st.cw]]); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - if (_selection[0] === 0) { - err$1 = _selection[1][0]; - http2errChanPool.Put(new chanType(errc)); - $s = -1; return err$1; - } else if (_selection[0] === 1) { - $s = -1; return http2errClientDisconnected; - } else if (_selection[0] === 2) { - $s = -1; return http2errStreamClosed; - } - /* } */ case 7: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.writeHeaders, $c: true, $r, _r$1, _r$2, _r$3, _selection, err, err$1, errc, headerData, sc, st, $s};return $f; - }; - http2serverConn.prototype.writeHeaders = function(st, headerData) { return this.$val.writeHeaders(st, headerData); }; - http2serverConn.ptr.prototype.write100ContinueHeaders = function(st) { - var {_r$1, sc, st, x$5, $s, $r, $c} = $restore(this, {st}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - _r$1 = sc.writeFrameFromHandler(new http2FrameWriteRequest.ptr((x$5 = new http2write100ContinueHeadersFrame.ptr(st.id), new x$5.constructor.elem(x$5)), st, $chanNil)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.write100ContinueHeaders, $c: true, $r, _r$1, sc, st, x$5, $s};return $f; - }; - http2serverConn.prototype.write100ContinueHeaders = function(st) { return this.$val.write100ContinueHeaders(st); }; - http2serverConn.ptr.prototype.noteBodyReadFromHandler = function(st, n, err) { - var {_r$1, _selection, err, n, sc, st, $s, $r, $c} = $restore(this, {st, n, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (n > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (n > 0) { */ case 2: - _r$1 = $select([[sc.bodyReadCh, new http2bodyReadMsg.ptr(st, n)], [sc.doneServing]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = _r$1; - if (_selection[0] === 0) { - } else if (_selection[0] === 1) { - } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.noteBodyReadFromHandler, $c: true, $r, _r$1, _selection, err, n, sc, st, $s};return $f; - }; - http2serverConn.prototype.noteBodyReadFromHandler = function(st, n, err) { return this.$val.noteBodyReadFromHandler(st, n, err); }; - http2serverConn.ptr.prototype.noteBodyRead = function(st, n) { - var {n, sc, st, $s, $r, $c} = $restore(this, {st, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sc.sendWindowUpdate(ptrType$10.nil, n); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((st.state === 3)) && !((st.state === 4))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((st.state === 3)) && !((st.state === 4))) { */ case 3: - $r = sc.sendWindowUpdate(st, n); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.noteBodyRead, $c: true, $r, n, sc, st, $s};return $f; - }; - http2serverConn.prototype.noteBodyRead = function(st, n) { return this.$val.noteBodyRead(st, n); }; - http2serverConn.ptr.prototype.sendWindowUpdate = function(st, n) { - var {n, sc, st, $s, $r, $c} = $restore(this, {st, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* while (true) { */ case 2: - /* if (!(n >= 2147483647)) { break; } */ if(!(n >= 2147483647)) { $s = 3; continue; } - $r = sc.sendWindowUpdate32(st, 2147483647); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - n = n - (2147483647) >> 0; - $s = 2; continue; - case 3: - $r = sc.sendWindowUpdate32(st, ((n >> 0))); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.sendWindowUpdate, $c: true, $r, n, sc, st, $s};return $f; - }; - http2serverConn.prototype.sendWindowUpdate = function(st, n) { return this.$val.sendWindowUpdate(st, n); }; - http2serverConn.ptr.prototype.sendWindowUpdate32 = function(st, n) { - var {n, ok, sc, st, streamID, x$5, $s, $r, $c} = $restore(this, {st, n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - $r = sc.serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (n === 0) { - $s = -1; return; - } - if (n < 0) { - $panic(new $String("negative update")); - } - streamID = 0; - if (!(st === ptrType$10.nil)) { - streamID = st.id; - } - $r = sc.writeFrame(new http2FrameWriteRequest.ptr((x$5 = new http2writeWindowUpdate.ptr(streamID, ((n >>> 0))), new x$5.constructor.elem(x$5)), st, $chanNil)); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ok = false; - if (st === ptrType$10.nil) { - ok = sc.inflow.add(n); - } else { - ok = st.inflow.add(n); - } - if (!ok) { - $panic(new $String("internal error; sent too many window updates without decrements?")); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.sendWindowUpdate32, $c: true, $r, n, ok, sc, st, streamID, x$5, $s};return $f; - }; - http2serverConn.prototype.sendWindowUpdate32 = function(st, n) { return this.$val.sendWindowUpdate32(st, n); }; - http2requestBody.ptr.prototype.Close = function() { - var {b, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - /* */ if (!(b.pipe === ptrType$97.nil) && !b.closed) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(b.pipe === ptrType$97.nil) && !b.closed) { */ case 1: - $r = b.pipe.BreakWithError(http2errClosedBody); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - b.closed = true; - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2requestBody.ptr.prototype.Close, $c: true, $r, b, $s};return $f; - }; - http2requestBody.prototype.Close = function() { return this.$val.Close(); }; - http2requestBody.ptr.prototype.Read = function(p) { - var {_r$1, _tmp, _tmp$1, _tuple, b, err, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - b = this; - /* */ if (b.needsContinue) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (b.needsContinue) { */ case 1: - b.needsContinue = false; - $r = b.conn.write100ContinueHeaders(b.stream); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (b.pipe === ptrType$97.nil || b.sawEOF) { - _tmp = 0; - _tmp$1 = io.EOF; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - _r$1 = b.pipe.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - if ($interfaceIsEqual(err, io.EOF)) { - b.sawEOF = true; - } - if (b.conn === ptrType$13.nil && http2inTests) { - $s = -1; return [n, err]; - } - $r = b.conn.noteBodyReadFromHandler(b.stream, n, err); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: http2requestBody.ptr.prototype.Read, $c: true, $r, _r$1, _tmp, _tmp$1, _tuple, b, err, n, p, $s};return $f; - }; - http2requestBody.prototype.Read = function(p) { return this.$val.Read(p); }; - http2chunkWriter.ptr.prototype.Write = function(p) { - var {$24r, _r$1, _tuple, cw, err, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - cw = this; - _r$1 = cw.rws.writeChunk(p); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2chunkWriter.ptr.prototype.Write, $c: true, $r, $24r, _r$1, _tuple, cw, err, n, p, $s};return $f; - }; - http2chunkWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - http2responseWriterState.ptr.prototype.hasTrailers = function() { - var rws; - rws = this; - return rws.trailers.$length > 0; - }; - http2responseWriterState.prototype.hasTrailers = function() { return this.$val.hasTrailers(); }; - http2responseWriterState.ptr.prototype.hasNonemptyTrailers = function() { - var _entry, _i, _ref, _tuple, ok, rws, trailer; - rws = this; - _ref = rws.trailers; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - trailer = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _tuple = (_entry = rws.handlerHeader[$String.keyFor(trailer)], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - ok = _tuple[1]; - if (ok) { - return true; - } - _i++; - } - return false; - }; - http2responseWriterState.prototype.hasNonemptyTrailers = function() { return this.$val.hasNonemptyTrailers(); }; - http2responseWriterState.ptr.prototype.declareTrailer = function(k) { - var {_r$1, _r$2, k, rws, $s, $r, $c} = $restore(this, {k}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rws = this; - _r$1 = CanonicalHeaderKey(k); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - k = _r$1; - _r$2 = httpguts.ValidTrailerHeader(k); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!_r$2) { */ case 2: - $r = rws.conn.logf("ignoring invalid trailer %q", new sliceType([new $String(k)])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 3: - if (!http2strSliceContains(rws.trailers, k)) { - rws.trailers = $append(rws.trailers, k); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2responseWriterState.ptr.prototype.declareTrailer, $c: true, $r, _r$1, _r$2, k, rws, $s};return $f; - }; - http2responseWriterState.prototype.declareTrailer = function(k) { return this.$val.declareTrailer(k); }; - http2responseWriterState.ptr.prototype.writeChunk = function(p) { - var {_entry, _entry$1, _entry$2, _entry$3, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, ce, cl, clen, ctype, date, endStream, endStream$1, err, err$1, err$2, hasCE, hasContentType, hasNonemptyTrailers, isHeadResp, n, ok, ok$1, p, rws, v, v$1, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - rws = this; - /* */ if (!rws.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!rws.wroteHeader) { */ case 1: - $r = rws.writeHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - isHeadResp = rws.req.Method === "HEAD"; - /* */ if (!rws.sentHeader) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!rws.sentHeader) { */ case 4: - rws.sentHeader = true; - _tmp = ""; - _tmp$1 = ""; - ctype = _tmp; - clen = _tmp$1; - _r$1 = new Header(rws.snapHeader).Get("Content-Length"); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - clen = _r$1; - /* */ if (!(clen === "")) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(clen === "")) { */ case 7: - $r = new Header(rws.snapHeader).Del("Content-Length"); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple = strconv.ParseUint(clen, 10, 63); - cl = _tuple[0]; - err$1 = _tuple[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - rws.sentContentLen = (new $Int64(cl.$high, cl.$low)); - } else { - clen = ""; - } - /* } */ case 8: - if (clen === "" && rws.handlerDone && http2bodyAllowedForStatus(rws.status) && (p.$length > 0 || !isHeadResp)) { - clen = strconv.Itoa(p.$length); - } - _tuple$1 = (_entry = rws.snapHeader[$String.keyFor("Content-Type")], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - hasContentType = _tuple$1[1]; - _r$2 = new Header(rws.snapHeader).Get("Content-Encoding"); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - ce = _r$2; - hasCE = ce.length > 0; - /* */ if (!hasCE && !hasContentType && http2bodyAllowedForStatus(rws.status) && p.$length > 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!hasCE && !hasContentType && http2bodyAllowedForStatus(rws.status) && p.$length > 0) { */ case 11: - _r$3 = DetectContentType(p); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ctype = _r$3; - /* } */ case 12: - date = ""; - _tuple$2 = (_entry$1 = rws.snapHeader[$String.keyFor("Date")], _entry$1 !== undefined ? [_entry$1.v, true] : [sliceType$2.nil, false]); - ok = _tuple$2[1]; - /* */ if (!ok) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (!ok) { */ case 14: - _r$4 = time.Now(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $clone(_r$4, time.Time).UTC(); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, time.Time).Format("Mon, 02 Jan 2006 15:04:05 GMT"); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - date = _r$6; - /* } */ case 15: - _ref = (_entry$2 = rws.snapHeader[$String.keyFor("Trailer")], _entry$2 !== undefined ? _entry$2.v : sliceType$2.nil); - _i = 0; - /* while (true) { */ case 19: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 20; continue; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = http2foreachHeaderElement(v, $methodVal(rws, "declareTrailer")); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 19; continue; - case 20: - _tuple$3 = (_entry$3 = rws.snapHeader[$String.keyFor("Connection")], _entry$3 !== undefined ? [_entry$3.v, true] : [sliceType$2.nil, false]); - ok$1 = _tuple$3[1]; - /* */ if (ok$1) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (ok$1) { */ case 22: - _r$7 = new Header(rws.snapHeader).Get("Connection"); /* */ $s = 24; case 24: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - v$1 = _r$7; - delete rws.snapHeader[$String.keyFor("Connection")]; - /* */ if (v$1 === "close") { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (v$1 === "close") { */ case 25: - $r = rws.conn.startGracefulShutdown(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 26: - /* } */ case 23: - endStream = (rws.handlerDone && !rws.hasTrailers() && (p.$length === 0)) || isHeadResp; - _r$8 = rws.conn.writeHeaders(rws.stream, new http2writeResHeaders.ptr(rws.stream.id, rws.status, rws.snapHeader, sliceType$2.nil, endStream, date, ctype, clen)); /* */ $s = 28; case 28: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - if (!($interfaceIsEqual(err, $ifaceNil))) { - rws.dirty = true; - _tmp$2 = 0; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - if (endStream) { - _tmp$4 = 0; - _tmp$5 = $ifaceNil; - n = _tmp$4; - err = _tmp$5; - $s = -1; return [n, err]; - } - /* } */ case 5: - if (isHeadResp) { - _tmp$6 = p.$length; - _tmp$7 = $ifaceNil; - n = _tmp$6; - err = _tmp$7; - $s = -1; return [n, err]; - } - if ((p.$length === 0) && !rws.handlerDone) { - _tmp$8 = 0; - _tmp$9 = $ifaceNil; - n = _tmp$8; - err = _tmp$9; - $s = -1; return [n, err]; - } - /* */ if (rws.handlerDone) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (rws.handlerDone) { */ case 29: - $r = rws.promoteUndeclaredTrailers(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 30: - hasNonemptyTrailers = rws.hasNonemptyTrailers(); - endStream$1 = rws.handlerDone && !hasNonemptyTrailers; - /* */ if (p.$length > 0 || endStream$1) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (p.$length > 0 || endStream$1) { */ case 32: - _r$9 = rws.conn.writeDataFromHandler(rws.stream, p, endStream$1); /* */ $s = 34; case 34: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err$2 = _r$9; - if (!($interfaceIsEqual(err$2, $ifaceNil))) { - rws.dirty = true; - _tmp$10 = 0; - _tmp$11 = err$2; - n = _tmp$10; - err = _tmp$11; - $s = -1; return [n, err]; - } - /* } */ case 33: - /* */ if (rws.handlerDone && hasNonemptyTrailers) { $s = 35; continue; } - /* */ $s = 36; continue; - /* if (rws.handlerDone && hasNonemptyTrailers) { */ case 35: - _r$10 = rws.conn.writeHeaders(rws.stream, new http2writeResHeaders.ptr(rws.stream.id, 0, rws.handlerHeader, rws.trailers, true, "", "", "")); /* */ $s = 37; case 37: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - if (!($interfaceIsEqual(err, $ifaceNil))) { - rws.dirty = true; - } - _tmp$12 = p.$length; - _tmp$13 = err; - n = _tmp$12; - err = _tmp$13; - $s = -1; return [n, err]; - /* } */ case 36: - _tmp$14 = p.$length; - _tmp$15 = $ifaceNil; - n = _tmp$14; - err = _tmp$15; - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: http2responseWriterState.ptr.prototype.writeChunk, $c: true, $r, _entry, _entry$1, _entry$2, _entry$3, _i, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, _tuple$3, ce, cl, clen, ctype, date, endStream, endStream$1, err, err$1, err$2, hasCE, hasContentType, hasNonemptyTrailers, isHeadResp, n, ok, ok$1, p, rws, v, v$1, $s};return $f; - }; - http2responseWriterState.prototype.writeChunk = function(p) { return this.$val.writeChunk(p); }; - http2responseWriterState.ptr.prototype.promoteUndeclaredTrailers = function() { - var {_entry, _i, _key, _keys, _r$1, _r$2, _ref, k, rws, sorter, trailerKey, vv, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rws = this; - _ref = rws.handlerHeader; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - k = _entry.k; - vv = _entry.v; - if (!strings.HasPrefix(k, "Trailer:")) { - _i++; - /* continue; */ $s = 1; continue; - } - trailerKey = strings.TrimPrefix(k, "Trailer:"); - $r = rws.declareTrailer(trailerKey); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = CanonicalHeaderKey(trailerKey); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _key = _r$1; (rws.handlerHeader || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - _i++; - $s = 1; continue; - case 2: - /* */ if (rws.trailers.$length > 1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (rws.trailers.$length > 1) { */ case 5: - _r$2 = http2sorterPool.Get(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - sorter = $assertType(_r$2, ptrType$100); - $r = sorter.SortStrings(rws.trailers); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - http2sorterPool.Put(sorter); - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2responseWriterState.ptr.prototype.promoteUndeclaredTrailers, $c: true, $r, _entry, _i, _key, _keys, _r$1, _r$2, _ref, k, rws, sorter, trailerKey, vv, $s};return $f; - }; - http2responseWriterState.prototype.promoteUndeclaredTrailers = function() { return this.$val.promoteUndeclaredTrailers(); }; - http2responseWriter.ptr.prototype.Flush = function() { - var {_r$1, _r$2, err, rws, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - rws = w.rws; - if (rws === ptrType$99.nil) { - $panic(new $String("Header called after Handler finished")); - } - /* */ if (rws.bw.Buffered() > 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (rws.bw.Buffered() > 0) { */ case 1: - _r$1 = rws.bw.Flush(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return; - } - $s = 3; continue; - /* } else { */ case 2: - _r$2 = rws.writeChunk(sliceType$3.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.Flush, $c: true, $r, _r$1, _r$2, err, rws, w, $s};return $f; - }; - http2responseWriter.prototype.Flush = function() { return this.$val.Flush(); }; - http2responseWriter.ptr.prototype.CloseNotify = function() { - var {ch, cw, rws, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ch = [ch]; - cw = [cw]; - w = this; - rws = w.rws; - if (rws === ptrType$99.nil) { - $panic(new $String("CloseNotify called after Handler finished")); - } - $r = rws.closeNotifierMu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ch[0] = rws.closeNotifierCh; - /* */ if (ch[0] === $chanNil) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ch[0] === $chanNil) { */ case 2: - ch[0] = new $Chan($Bool, 1); - rws.closeNotifierCh = ch[0]; - cw[0] = rws.stream.cw; - $go((function(ch, cw) { return function $b() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = new http2closeWaiter(cw[0]).Wait(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = $send(ch[0], true); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $s};return $f; - }; })(ch, cw), []); - /* } */ case 3: - $r = rws.closeNotifierMu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return ch[0]; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.CloseNotify, $c: true, $r, ch, cw, rws, w, $s};return $f; - }; - http2responseWriter.prototype.CloseNotify = function() { return this.$val.CloseNotify(); }; - http2responseWriter.ptr.prototype.Header = function() { - var rws, w; - w = this; - rws = w.rws; - if (rws === ptrType$99.nil) { - $panic(new $String("Header called after Handler finished")); - } - if (rws.handlerHeader === false) { - rws.handlerHeader = {}; - } - return rws.handlerHeader; - }; - http2responseWriter.prototype.Header = function() { return this.$val.Header(); }; - http2checkWriteHeaderCode = function(code) { - var {_r$1, code, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (code < 100 || code > 999) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (code < 100 || code > 999) { */ case 1: - _r$1 = fmt.Sprintf("invalid WriteHeader code %v", new sliceType([new $Int(code)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2checkWriteHeaderCode, $c: true, $r, _r$1, code, $s};return $f; - }; - http2responseWriter.ptr.prototype.WriteHeader = function(code) { - var {code, rws, w, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - rws = w.rws; - if (rws === ptrType$99.nil) { - $panic(new $String("WriteHeader called after Handler finished")); - } - $r = rws.writeHeader(code); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.WriteHeader, $c: true, $r, code, rws, w, $s};return $f; - }; - http2responseWriter.prototype.WriteHeader = function(code) { return this.$val.WriteHeader(code); }; - http2responseWriterState.ptr.prototype.writeHeader = function(code) { - var {code, rws, $s, $r, $c} = $restore(this, {code}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rws = this; - /* */ if (!rws.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!rws.wroteHeader) { */ case 1: - $r = http2checkWriteHeaderCode(code); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - rws.wroteHeader = true; - rws.status = code; - if ($keys(rws.handlerHeader).length > 0) { - rws.snapHeader = http2cloneHeader(rws.handlerHeader); - } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2responseWriterState.ptr.prototype.writeHeader, $c: true, $r, code, rws, $s};return $f; - }; - http2responseWriterState.prototype.writeHeader = function(code) { return this.$val.writeHeader(code); }; - http2cloneHeader = function(h) { - var _entry, _i, _key, _keys, _ref, h, h2, k, vv, vv2, x$5; - h2 = (x$5 = $keys(h).length, ((x$5 < 0 || x$5 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - _ref = h; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - vv2 = $makeSlice(sliceType$2, vv.$length); - $copySlice(vv2, vv); - _key = k; (h2 || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv2 }; - _i++; - } - return h2; - }; - http2responseWriter.ptr.prototype.Write = function(p) { - var {$24r, _r$1, _tuple, err, n, p, w, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.write(p.$length, p, ""); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.Write, $c: true, $r, $24r, _r$1, _tuple, err, n, p, w, $s};return $f; - }; - http2responseWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - http2responseWriter.ptr.prototype.WriteString = function(s) { - var {$24r, _r$1, _tuple, err, n, s, w, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - _r$1 = w.write(s.length, sliceType$3.nil, s); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.WriteString, $c: true, $r, $24r, _r$1, _tuple, err, n, s, w, $s};return $f; - }; - http2responseWriter.prototype.WriteString = function(s) { return this.$val.WriteString(s); }; - http2responseWriter.ptr.prototype.write = function(lenData, dataB, dataS) { - var {$24r, $24r$1, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, dataB, dataS, err, lenData, n, rws, w, x$10, x$11, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {lenData, dataB, dataS}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - w = this; - rws = w.rws; - if (rws === ptrType$99.nil) { - $panic(new $String("Write called after Handler finished")); - } - /* */ if (!rws.wroteHeader) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!rws.wroteHeader) { */ case 1: - $r = w.WriteHeader(200); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - if (!http2bodyAllowedForStatus(rws.status)) { - _tmp = 0; - _tmp$1 = $pkg.ErrBodyNotAllowed; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - rws.wroteBytes = (x$5 = rws.wroteBytes, x$6 = (x$7 = (new $Int64(0, dataB.$length)), x$8 = (new $Int64(0, dataS.length)), new $Int64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)), new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - if (!((x$9 = rws.sentContentLen, (x$9.$high === 0 && x$9.$low === 0))) && (x$10 = rws.wroteBytes, x$11 = rws.sentContentLen, (x$10.$high > x$11.$high || (x$10.$high === x$11.$high && x$10.$low > x$11.$low)))) { - _tmp$2 = 0; - _tmp$3 = errors.New("http2: handler wrote more than declared Content-Length"); - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - /* */ if (!(dataB === sliceType$3.nil)) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(dataB === sliceType$3.nil)) { */ case 4: - _r$1 = rws.bw.Write(dataB); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - $24r = [n, err]; - $s = 8; case 8: return $24r; - /* } else { */ case 5: - _r$2 = rws.bw.WriteString(dataS); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r$1 = [n, err]; - $s = 10; case 10: return $24r$1; - /* } */ case 6: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.write, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, dataB, dataS, err, lenData, n, rws, w, x$10, x$11, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - http2responseWriter.prototype.write = function(lenData, dataB, dataS) { return this.$val.write(lenData, dataB, dataS); }; - http2responseWriter.ptr.prototype.handlerDone = function() { - var {dirty, rws, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - rws = w.rws; - dirty = rws.dirty; - rws.handlerDone = true; - $r = w.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - w.rws = ptrType$99.nil; - if (!dirty) { - http2responseWriterStatePool.Put(rws); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.handlerDone, $c: true, $r, dirty, rws, w, $s};return $f; - }; - http2responseWriter.prototype.handlerDone = function() { return this.$val.handlerDone(); }; - http2responseWriter.ptr.prototype.Push = function(target, opts) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _entry, _i, _keys, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _selection$1, _tuple, err, err$1, err$2, k, msg, opts, sc, st, target, u, w, wantScheme, $s, $r, $c} = $restore(this, {target, opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - st = w.rws.stream; - sc = st.sc; - $r = sc.serveG.checkNotOn(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (st.isPushed()) { - $s = -1; return http2ErrRecursivePush; - } - if (opts === ptrType$101.nil) { - opts = new PushOptions.ptr("", false); - } - if (opts.Method === "") { - opts.Method = "GET"; - } - if (opts.Header === false) { - opts.Header = $makeMap($String.keyFor, []); - } - wantScheme = "http"; - if (!(w.rws.req.TLS === ptrType$28.nil)) { - wantScheme = "https"; - } - _r$1 = url.Parse(target); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - u = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - /* */ if (u.Scheme === "") { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (u.Scheme === "") { */ case 3: - /* */ if (!strings.HasPrefix(target, "/")) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!strings.HasPrefix(target, "/")) { */ case 6: - _r$2 = fmt.Errorf("target must be an absolute URL or an absolute path: %q", new sliceType([new $String(target)])); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 9; case 9: return $24r; - /* } */ case 7: - u.Scheme = wantScheme; - u.Host = w.rws.req.Host; - $s = 5; continue; - /* } else { */ case 4: - /* */ if (!(u.Scheme === wantScheme)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(u.Scheme === wantScheme)) { */ case 10: - _r$3 = fmt.Errorf("cannot push URL with scheme %q from request with scheme %q", new sliceType([new $String(u.Scheme), new $String(wantScheme)])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 13; case 13: return $24r$1; - /* } */ case 11: - if (u.Host === "") { - $s = -1; return errors.New("URL must have a host"); - } - /* } */ case 5: - _ref = opts.Header; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 14: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 15; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 14; continue; - } - k = _entry.k; - /* */ if (strings.HasPrefix(k, ":")) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (strings.HasPrefix(k, ":")) { */ case 16: - _r$4 = fmt.Errorf("promised request headers cannot include pseudo header %q", new sliceType([new $String(k)])); /* */ $s = 18; case 18: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 19; case 19: return $24r$2; - /* } */ case 17: - /* */ if (http2asciiEqualFold(k, "content-length") || http2asciiEqualFold(k, "content-encoding") || http2asciiEqualFold(k, "trailer") || http2asciiEqualFold(k, "te") || http2asciiEqualFold(k, "expect") || http2asciiEqualFold(k, "host")) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (http2asciiEqualFold(k, "content-length") || http2asciiEqualFold(k, "content-encoding") || http2asciiEqualFold(k, "trailer") || http2asciiEqualFold(k, "te") || http2asciiEqualFold(k, "expect") || http2asciiEqualFold(k, "host")) { */ case 20: - _r$5 = fmt.Errorf("promised request headers cannot include %q", new sliceType([new $String(k)])); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$3 = _r$5; - $s = 23; case 23: return $24r$3; - /* } */ case 21: - _i++; - $s = 14; continue; - case 15: - _r$6 = http2checkValidHTTP2RequestHeaders(opts.Header); /* */ $s = 24; case 24: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err$1 = _r$6; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return err$1; - } - /* */ if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (!(opts.Method === "GET") && !(opts.Method === "HEAD")) { */ case 25: - _r$7 = fmt.Errorf("method %q must be GET or HEAD", new sliceType([new $String(opts.Method)])); /* */ $s = 27; case 27: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - $24r$4 = _r$7; - $s = 28; case 28: return $24r$4; - /* } */ case 26: - _r$8 = http2errChanPool.Get(); /* */ $s = 29; case 29: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - msg = new http2startPushRequest.ptr(st, opts.Method, u, http2cloneHeader(opts.Header), $assertType(_r$8, chanType)); - _r$9 = $select([[sc.doneServing], [st.cw], [sc.serveMsgCh, msg]]); /* */ $s = 30; case 30: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _selection = _r$9; - /* */ if (_selection[0] === 0) { $s = 31; continue; } - /* */ if (_selection[0] === 1) { $s = 32; continue; } - /* */ if (_selection[0] === 2) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (_selection[0] === 0) { */ case 31: - $s = -1; return http2errClientDisconnected; - /* } else if (_selection[0] === 1) { */ case 32: - $s = -1; return http2errStreamClosed; - /* } else if (_selection[0] === 2) { */ case 33: - /* } */ case 34: - _r$10 = $select([[sc.doneServing], [st.cw], [msg.done]]); /* */ $s = 35; case 35: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _selection$1 = _r$10; - if (_selection$1[0] === 0) { - $s = -1; return http2errClientDisconnected; - } else if (_selection$1[0] === 1) { - $s = -1; return http2errStreamClosed; - } else if (_selection$1[0] === 2) { - err$2 = _selection$1[1][0]; - http2errChanPool.Put(new chanType(msg.done)); - $s = -1; return err$2; - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2responseWriter.ptr.prototype.Push, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _entry, _i, _keys, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _selection, _selection$1, _tuple, err, err$1, err$2, k, msg, opts, sc, st, target, u, w, wantScheme, $s};return $f; - }; - http2responseWriter.prototype.Push = function(target, opts) { return this.$val.Push(target, opts); }; - http2serverConn.ptr.prototype.startPush = function(msg) { - var {allocatePromisedID, msg, sc, $s, $r, $c} = $restore(this, {msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - msg = [msg]; - sc = [sc]; - sc[0] = this; - $r = sc[0].serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((msg[0].parent.state === 1)) && !((msg[0].parent.state === 3))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((msg[0].parent.state === 1)) && !((msg[0].parent.state === 3))) { */ case 2: - $r = $send(msg[0].done, http2errStreamClosed); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 3: - /* */ if (!sc[0].pushEnabled) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!sc[0].pushEnabled) { */ case 5: - $r = $send(msg[0].done, $pkg.ErrNotSupported); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 6: - allocatePromisedID = (function(msg, sc) { return function $b() { - var {_r$1, _r$2, _r$3, _tuple, err, promised, promisedID, req, rw, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = sc[0].serveG.check(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!sc[0].pushEnabled) { - $s = -1; return [0, $pkg.ErrNotSupported]; - } - if ((sc[0].curPushedStreams + 1 >>> 0) > sc[0].clientMaxStreams) { - $s = -1; return [0, http2ErrPushLimitReached]; - } - /* */ if ((sc[0].maxPushPromiseID + 2 >>> 0) >= 2147483648) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ((sc[0].maxPushPromiseID + 2 >>> 0) >= 2147483648) { */ case 2: - $r = sc[0].startGracefulShutdownInternal(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [0, http2ErrPushLimitReached]; - /* } */ case 3: - sc[0].maxPushPromiseID = sc[0].maxPushPromiseID + (2) >>> 0; - promisedID = sc[0].maxPushPromiseID; - _r$1 = sc[0].newStream(promisedID, msg[0].parent.id, 3); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - promised = _r$1; - _r$2 = sc[0].newWriterAndRequestNoBody(promised, new http2requestParam.ptr(msg[0].method, msg[0].url.Scheme, msg[0].url.Host, msg[0].url.RequestURI(), http2cloneHeader(msg[0].header))); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - rw = _tuple[0]; - req = _tuple[1]; - err = _tuple[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - _r$3 = fmt.Sprintf("newWriterAndRequestNoBody(%+v): %v", new sliceType([msg[0].url, err])); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $panic(new $String(_r$3)); - /* } */ case 8: - $go($methodVal(sc[0], "runHandler"), [rw, req, $methodVal(sc[0].handler, "ServeHTTP")]); - $s = -1; return [promisedID, $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, _r$2, _r$3, _tuple, err, promised, promisedID, req, rw, $s};return $f; - }; })(msg, sc); - $r = sc[0].writeFrame(new http2FrameWriteRequest.ptr(new http2writePushPromise.ptr(msg[0].parent.id, msg[0].method, msg[0].url, msg[0].header, allocatePromisedID, 0), msg[0].parent, msg[0].done)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.startPush, $c: true, $r, allocatePromisedID, msg, sc, $s};return $f; - }; - http2serverConn.prototype.startPush = function(msg) { return this.$val.startPush(msg); }; - http2foreachHeaderElement = function(v, fn) { - var {_i, _ref, f, fn, v, $s, $r, $c} = $restore(this, {v, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - v = textproto.TrimString(v); - if (v === "") { - $s = -1; return; - } - /* */ if (!strings.Contains(v, ",")) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!strings.Contains(v, ",")) { */ case 1: - $r = fn(v); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _ref = strings.Split(v, ","); - _i = 0; - /* while (true) { */ case 4: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 5; continue; } - f = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - f = textproto.TrimString(f); - /* */ if (!(f === "")) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(f === "")) { */ case 6: - $r = fn(f); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - _i++; - $s = 4; continue; - case 5: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2foreachHeaderElement, $c: true, $r, _i, _ref, f, fn, v, $s};return $f; - }; - http2checkValidHTTP2RequestHeaders = function(h) { - var {$24r, _entry, _entry$1, _i, _r$1, _ref, _tuple, h, k, ok, te, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = http2connHeaders; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - k = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _tuple = (_entry = h[$String.keyFor(k)], _entry !== undefined ? [_entry.v, true] : [sliceType$2.nil, false]); - ok = _tuple[1]; - /* */ if (ok) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ok) { */ case 3: - _r$1 = fmt.Errorf("request header %q is not valid in HTTP/2", new sliceType([new $String(k)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* } */ case 4: - _i++; - $s = 1; continue; - case 2: - te = (_entry$1 = h[$String.keyFor("Te")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - if (te.$length > 0 && (te.$length > 1 || (!((0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "trailers") && !((0 >= te.$length ? ($throwRuntimeError("index out of range"), undefined) : te.$array[te.$offset + 0]) === "")))) { - $s = -1; return errors.New("request header \"TE\" may only be \"trailers\" in HTTP/2"); - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2checkValidHTTP2RequestHeaders, $c: true, $r, $24r, _entry, _entry$1, _i, _r$1, _ref, _tuple, h, k, ok, te, $s};return $f; - }; - http2new400Handler = function(err) { - var err; - return (function $b(w, r) { - var {_arg, _arg$1, _r$1, r, w, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = w; - _r$1 = err.Error(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - $r = Error(_arg, _arg$1, 400); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _arg, _arg$1, _r$1, r, w, $s};return $f; - }); - }; - http2h1ServerKeepAlivesDisabled = function(hs) { - var {$24r, _r$1, _tuple, hs, hs$1, ok, x$5, $s, $r, $c} = $restore(this, {hs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x$5 = hs; - _tuple = $assertType(x$5, I, true); - hs$1 = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r$1 = hs$1.doKeepAlives(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = !_r$1; - $s = 4; case 4: return $24r; - /* } */ case 2: - $s = -1; return false; - /* */ } return; } var $f = {$blk: http2h1ServerKeepAlivesDisabled, $c: true, $r, $24r, _r$1, _tuple, hs, hs$1, ok, x$5, $s};return $f; - }; - http2serverConn.ptr.prototype.countError = function(name, err) { - var {_entry, _r$1, _ref, code, codeStr, e, e$1, e$2, err, f, name, sc, typ, $s, $r, $c} = $restore(this, {name, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - sc = this; - if (sc === ptrType$13.nil || sc.srv === ptrType$86.nil) { - $s = -1; return err; - } - f = sc.srv.CountError; - if (f === $throwNilPointerError) { - $s = -1; return err; - } - typ = ""; - code = 0; - _ref = err; - if ($assertType(_ref, http2ConnectionError, true)[1]) { - e = _ref.$val; - typ = "conn"; - code = ((e >>> 0)); - } else if ($assertType(_ref, http2StreamError, true)[1]) { - e$1 = $clone(_ref.$val, http2StreamError); - typ = "stream"; - code = (e$1.Code); - } else { - e$2 = _ref; - $s = -1; return err; - } - codeStr = (_entry = http2errCodeName[http2ErrCode.keyFor(code)], _entry !== undefined ? _entry.v : ""); - if (codeStr === "") { - codeStr = strconv.Itoa(((code >> 0))); - } - _r$1 = fmt.Sprintf("%s_%s_%s", new sliceType([new $String(typ), new $String(codeStr), new $String(name)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = f(_r$1); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return err; - /* */ } return; } var $f = {$blk: http2serverConn.ptr.prototype.countError, $c: true, $r, _entry, _r$1, _ref, code, codeStr, e, e$1, e$2, err, f, name, sc, typ, $s};return $f; - }; - http2serverConn.prototype.countError = function(name, err) { return this.$val.countError(name, err); }; - http2Transport.ptr.prototype.maxHeaderListSize = function() { - var t; - t = this; - if (t.MaxHeaderListSize === 0) { - return 10485760; - } - if (t.MaxHeaderListSize === 4294967295) { - return 0; - } - return t.MaxHeaderListSize; - }; - http2Transport.prototype.maxHeaderListSize = function() { return this.$val.maxHeaderListSize(); }; - http2Transport.ptr.prototype.disableCompression = function() { - var t; - t = this; - return t.DisableCompression || (!(t.t1 === ptrType$27.nil) && t.t1.DisableCompression); - }; - http2Transport.prototype.disableCompression = function() { return this.$val.disableCompression(); }; - http2Transport.ptr.prototype.pingTimeout = function() { - var t, x$5; - t = this; - if ((x$5 = t.PingTimeout, (x$5.$high === 0 && x$5.$low === 0))) { - return new time.Duration(3, 2115098112); - } - return t.PingTimeout; - }; - http2Transport.prototype.pingTimeout = function() { return this.$val.pingTimeout(); }; - http2configureTransports = function(t1) { - var {_key, _r$1, connPool, err, m, t1, t2, upgradeFn, x$5, $s, $r, $c} = $restore(this, {t1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - connPool = [connPool]; - t2 = [t2]; - connPool[0] = new http2clientConnPool.ptr(ptrType$102.nil, new sync.Mutex.ptr(0, 0), false, false, false, false); - t2[0] = new http2Transport.ptr($throwNilPointerError, ptrType$4.nil, (x$5 = new http2noDialClientConnPool.ptr(connPool[0]), new x$5.constructor.elem(x$5)), false, false, 0, false, new time.Duration(0, 0), new time.Duration(0, 0), new time.Duration(0, 0), $throwNilPointerError, t1, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil); - connPool[0].t = t2[0]; - _r$1 = http2registerHTTPSProtocol(t1, new http2noDialH2RoundTripper.ptr(t2[0])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$102.nil, err]; - } - if (t1.TLSClientConfig === ptrType$4.nil) { - t1.TLSClientConfig = new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$13.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$34.nil, sliceType$2.nil, "", 0, ptrType$34.nil, false, sliceType$14.nil, false, false, arrayType$1.zero(), $ifaceNil, 0, 0, sliceType$15.nil, false, 0, $ifaceNil, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$16.nil, sliceType$16.nil); - } - if (!http2strSliceContains(t1.TLSClientConfig.NextProtos, "h2")) { - t1.TLSClientConfig.NextProtos = $appendSlice(new sliceType$2(["h2"]), t1.TLSClientConfig.NextProtos); - } - if (!http2strSliceContains(t1.TLSClientConfig.NextProtos, "http/1.1")) { - t1.TLSClientConfig.NextProtos = $append(t1.TLSClientConfig.NextProtos, "http/1.1"); - } - upgradeFn = (function(connPool, t2) { return function $b(authority, c) { - var {_r$2, _r$3, _tuple, addr, authority, c, err$1, used, x$6, $s, $r, $c} = $restore(this, {authority, c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = http2authorityAddr("https", authority); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - addr = _r$2; - _r$3 = connPool[0].addConnIfNeeded(addr, t2[0], c); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - used = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $go($methodVal(c, "Close"), []); - $s = -1; return (x$6 = new http2erringRoundTripper.ptr(err$1), new x$6.constructor.elem(x$6)); - } else if (!used) { - $go($methodVal(c, "Close"), []); - } - $s = -1; return t2[0]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, _tuple, addr, authority, c, err$1, used, x$6, $s};return $f; - }; })(connPool, t2); - m = t1.TLSNextProto; - if ($keys(m).length === 0) { - t1.TLSNextProto = $makeMap($String.keyFor, [{ k: "h2", v: upgradeFn }]); - } else { - _key = "h2"; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: upgradeFn }; - } - $s = -1; return [t2[0], $ifaceNil]; - /* */ } return; } var $f = {$blk: http2configureTransports, $c: true, $r, _key, _r$1, connPool, err, m, t1, t2, upgradeFn, x$5, $s};return $f; - }; - http2Transport.ptr.prototype.connPool = function() { - var {t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - $r = t.connPoolOnce.Do($methodVal(t, "initConnPool")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return t.connPoolOrDef; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.connPool, $c: true, $r, t, $s};return $f; - }; - http2Transport.prototype.connPool = function() { return this.$val.connPool(); }; - http2Transport.ptr.prototype.initConnPool = function() { - var t; - t = this; - if (!($interfaceIsEqual(t.ConnPool, $ifaceNil))) { - t.connPoolOrDef = t.ConnPool; - } else { - t.connPoolOrDef = new http2clientConnPool.ptr(t, new sync.Mutex.ptr(0, 0), false, false, false, false); - } - }; - http2Transport.prototype.initConnPool = function() { return this.$val.initConnPool(); }; - http2clientStream.ptr.prototype.get1xxTraceFunc = function() { - var cs, fn; - cs = this; - fn = http2got1xxFuncForTests; - if (!(fn === $throwNilPointerError)) { - return fn; - } - return http2traceGot1xxResponseFunc(cs.trace); - }; - http2clientStream.prototype.get1xxTraceFunc = function() { return this.$val.get1xxTraceFunc(); }; - http2clientStream.ptr.prototype.abortStream = function(err) { - var {cs, err, $s, $deferred, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cs = this; - $r = cs.cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cs.cc.mu, "Unlock"), []]); - $r = cs.abortStreamLocked(err); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientStream.ptr.prototype.abortStream, $c: true, $r, cs, err, $s, $deferred};return $f; } } - }; - http2clientStream.prototype.abortStream = function(err) { return this.$val.abortStream(err); }; - http2clientStream.ptr.prototype.abortStreamLocked = function(err) { - var {_r$1, cs, err, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cs = [cs]; - err = [err]; - cs[0] = this; - $r = cs[0].abortOnce.Do((function(cs, err) { return function() { - cs[0].abortErr = err[0]; - $close(cs[0].abort); - }; })(cs, err)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(cs[0].reqBody, $ifaceNil)) && !cs[0].reqBodyClosed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(cs[0].reqBody, $ifaceNil)) && !cs[0].reqBodyClosed) { */ case 2: - _r$1 = cs[0].reqBody.Close(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - cs[0].reqBodyClosed = true; - /* } */ case 3: - /* */ if (!(cs[0].cc.cond === ptrType$48.nil)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(cs[0].cc.cond === ptrType$48.nil)) { */ case 5: - $r = cs[0].cc.cond.Broadcast(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2clientStream.ptr.prototype.abortStreamLocked, $c: true, $r, _r$1, cs, err, $s};return $f; - }; - http2clientStream.prototype.abortStreamLocked = function(err) { return this.$val.abortStreamLocked(err); }; - http2clientStream.ptr.prototype.abortRequestBodyWrite = function() { - var {_r$1, cc, cs, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cs = this; - cc = cs.cc; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - /* */ if (!($interfaceIsEqual(cs.reqBody, $ifaceNil)) && !cs.reqBodyClosed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(cs.reqBody, $ifaceNil)) && !cs.reqBodyClosed) { */ case 2: - _r$1 = cs.reqBody.Close(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - cs.reqBodyClosed = true; - $r = cc.cond.Broadcast(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientStream.ptr.prototype.abortRequestBodyWrite, $c: true, $r, _r$1, cc, cs, $s, $deferred};return $f; } } - }; - http2clientStream.prototype.abortRequestBodyWrite = function() { return this.$val.abortRequestBodyWrite(); }; - http2stickyErrWriter.ptr.prototype.Write = function(p) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _v, err, err$1, n, nn, p, sew, x$5, x$6, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - sew = this; - if (!($interfaceIsEqual(sew.err.$get(), $ifaceNil))) { - _tmp = 0; - _tmp$1 = sew.err.$get(); - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* while (true) { */ case 1: - /* */ if (!((x$5 = sew.timeout, (x$5.$high === 0 && x$5.$low === 0)))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((x$5 = sew.timeout, (x$5.$high === 0 && x$5.$low === 0)))) { */ case 3: - _r$1 = time.Now(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = $clone(_r$1, time.Time).Add(sew.timeout); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = sew.conn.SetWriteDeadline($clone(_r$2, time.Time)); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 4: - _r$4 = sew.conn.Write($subslice(p, n)); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - nn = _tuple[0]; - err$1 = _tuple[1]; - n = n + (nn) >> 0; - if (!(n < p.$length && nn > 0)) { _v = false; $s = 11; continue s; } - _r$5 = errors.Is(err$1, os.ErrDeadlineExceeded); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _v = _r$5; case 11: - /* */ if (_v) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_v) { */ case 9: - /* continue; */ $s = 1; continue; - /* } */ case 10: - /* */ if (!((x$6 = sew.timeout, (x$6.$high === 0 && x$6.$low === 0)))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!((x$6 = sew.timeout, (x$6.$high === 0 && x$6.$low === 0)))) { */ case 13: - _r$6 = sew.conn.SetWriteDeadline(new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); /* */ $s = 15; case 15: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 14: - sew.err.$set(err$1); - _tmp$2 = n; - _tmp$3 = err$1; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - case 2: - $s = -1; return [n, err]; - /* */ } return; } var $f = {$blk: http2stickyErrWriter.ptr.prototype.Write, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _v, err, err$1, n, nn, p, sew, x$5, x$6, $s};return $f; - }; - http2stickyErrWriter.prototype.Write = function(p) { return this.$val.Write(p); }; - http2noCachedConnError.ptr.prototype.IsHTTP2NoCachedConnError = function() { - }; - http2noCachedConnError.prototype.IsHTTP2NoCachedConnError = function() { return this.$val.IsHTTP2NoCachedConnError(); }; - http2noCachedConnError.ptr.prototype.Error = function() { - return "http2: no cached connection was available"; - }; - http2noCachedConnError.prototype.Error = function() { return this.$val.Error(); }; - http2isNoCachedConnError = function(err) { - var _tuple, err, ok; - _tuple = $assertType(err, interfaceType, true); - ok = _tuple[1]; - return ok; - }; - http2Transport.ptr.prototype.RoundTrip = function(req) { - var {$24r, _r$1, req, t, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.RoundTripOpt(req, new http2RoundTripOpt.ptr(false)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.RoundTrip, $c: true, $r, $24r, _r$1, req, t, $s};return $f; - }; - http2Transport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; - http2authorityAddr = function(scheme, authority) { - var {_r$1, _r$2, _tuple, _tuple$1, a, addr, authority, err, err$1, host, port, scheme, $s, $r, $c} = $restore(this, {scheme, authority}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addr = ""; - _r$1 = net.SplitHostPort(authority); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - port = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - port = "443"; - if (scheme === "http") { - port = "80"; - } - host = authority; - } - _r$2 = idna.ToASCII(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - a = _tuple$1[0]; - err$1 = _tuple$1[1]; - if ($interfaceIsEqual(err$1, $ifaceNil)) { - host = a; - } - if (strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]")) { - addr = host + ":" + port; - $s = -1; return addr; - } - addr = net.JoinHostPort(host, port); - $s = -1; return addr; - /* */ } return; } var $f = {$blk: http2authorityAddr, $c: true, $r, _r$1, _r$2, _tuple, _tuple$1, a, addr, authority, err, err$1, host, port, scheme, $s};return $f; - }; - http2Transport.ptr.prototype.RoundTripOpt = function(req, opt) { - var {_r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _tuple$2, addr, backoff, cc, err, opt, req, res, retry, reused, t, y, $s, $r, $c} = $restore(this, {req, opt}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - if (!(req.URL.Scheme === "https" || (req.URL.Scheme === "http" && t.AllowHTTP))) { - $s = -1; return [ptrType$18.nil, errors.New("http2: unsupported scheme")]; - } - _r$1 = http2authorityAddr(req.URL.Scheme, req.URL.Host); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - addr = _r$1; - retry = 0; - /* while (true) { */ case 2: - _r$2 = t.connPool(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.GetClientConn(req, addr); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - cc = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 6: - $r = t.vlogf("http2: Transport failed to get client conn for %s: %v", new sliceType([new $String(addr), err])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ptrType$18.nil, err]; - /* } */ case 7: - reused = !atomic.CompareAndSwapUint32((cc.$ptr_reused || (cc.$ptr_reused = new ptrType$103(function() { return this.$target.reused; }, function($v) { this.$target.reused = $v; }, cc))), 0, 1); - $r = http2traceGotConn(req, cc, reused); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = cc.RoundTrip(req); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - res = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && retry <= 6) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) && retry <= 6) { */ case 11: - _r$5 = http2shouldRetryRequest(req, err); /* */ $s = 13; case 13: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$2 = _r$5; - req = _tuple$2[0]; - err = _tuple$2[1]; - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 14: - if (retry === 0) { - retry = retry + (1) >> 0; - /* continue; */ $s = 2; continue; - } - backoff = (((y = ((((retry >>> 0)) - 1 >>> 0)), y < 32 ? (1 << y) : 0) >>> 0)); - _r$6 = rand.Float64(); /* */ $s = 16; case 16: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - backoff = backoff + (backoff * (0.1 * _r$6)); - _r$7 = time.After($mul64(new time.Duration(0, 1000000000), (new time.Duration(0, backoff)))); /* */ $s = 17; case 17: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = req.Context().Done(); /* */ $s = 18; case 18: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$9 = $select([[_r$7], [_r$8]]); /* */ $s = 19; case 19: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _selection = _r$9; - /* */ if (_selection[0] === 0) { $s = 20; continue; } - /* */ if (_selection[0] === 1) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_selection[0] === 0) { */ case 20: - retry = retry + (1) >> 0; - /* continue; */ $s = 2; continue; - $s = 22; continue; - /* } else if (_selection[0] === 1) { */ case 21: - _r$10 = req.Context().Err(); /* */ $s = 23; case 23: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - /* } */ case 22: - /* } */ case 15: - /* } */ case 12: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 24: - $r = t.vlogf("RoundTrip failure: %v", new sliceType([err])); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ptrType$18.nil, err]; - /* } */ case 25: - $s = -1; return [res, $ifaceNil]; - case 3: - $s = -1; return [ptrType$18.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.RoundTripOpt, $c: true, $r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _tuple, _tuple$1, _tuple$2, addr, backoff, cc, err, opt, req, res, retry, reused, t, y, $s};return $f; - }; - http2Transport.prototype.RoundTripOpt = function(req, opt) { return this.$val.RoundTripOpt(req, opt); }; - http2Transport.ptr.prototype.CloseIdleConnections = function() { - var {_r$1, _tuple, cp, ok, t, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.connPool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = $assertType(_r$1, http2clientConnPoolIdleCloser, true); - cp = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - $r = cp.closeIdleConnections(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.CloseIdleConnections, $c: true, $r, _r$1, _tuple, cp, ok, t, $s};return $f; - }; - http2Transport.prototype.CloseIdleConnections = function() { return this.$val.CloseIdleConnections(); }; - http2shouldRetryRequest = function(req, err) { - var {$24r, _r$1, _r$2, _tuple, body$1, err, err$1, newReq, req, $s, $r, $c} = $restore(this, {req, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - newReq = [newReq]; - if (!http2canRetryError(err)) { - $s = -1; return [ptrType$11.nil, err]; - } - if ($interfaceIsEqual(req.Body, $ifaceNil) || $interfaceIsEqual(req.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { - $s = -1; return [req, $ifaceNil]; - } - /* */ if (!(req.GetBody === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(req.GetBody === $throwNilPointerError)) { */ case 1: - _r$1 = req.GetBody(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - body$1 = _tuple[0]; - err$1 = _tuple[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$11.nil, err$1]; - } - newReq[0] = $clone(req, Request); - newReq[0].Body = body$1; - $s = -1; return [newReq[0], $ifaceNil]; - /* } */ case 2: - if ($interfaceIsEqual(err, http2errClientConnUnusable)) { - $s = -1; return [req, $ifaceNil]; - } - _r$2 = fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", new sliceType([err])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [ptrType$11.nil, _r$2]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: http2shouldRetryRequest, $c: true, $r, $24r, _r$1, _r$2, _tuple, body$1, err, err$1, newReq, req, $s};return $f; - }; - http2canRetryError = function(err) { - var _tuple, err, ok, se; - if ($interfaceIsEqual(err, http2errClientConnUnusable) || $interfaceIsEqual(err, http2errClientConnGotGoAway)) { - return true; - } - _tuple = $assertType(err, http2StreamError, true); - se = $clone(_tuple[0], http2StreamError); - ok = _tuple[1]; - if (ok) { - if ((se.Code === 1) && $interfaceIsEqual(se.Cause, http2errFromPeer)) { - return true; - } - return se.Code === 7; - } - return false; - }; - http2Transport.ptr.prototype.dialClientConn = function(ctx, addr, singleUse) { - var {$24r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, addr, ctx, err, host, singleUse, t, tconn, $s, $r, $c} = $restore(this, {ctx, addr, singleUse}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = net.SplitHostPort(addr); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host = _tuple[0]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$68.nil, err]; - } - _arg = addr; - _r$2 = t.newTLSConfig(host); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = t.dialTLS(ctx)("tcp", _arg, _arg$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$1 = _r$3; - tconn = _tuple$1[0]; - err = _tuple$1[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$68.nil, err]; - } - _r$4 = t.newClientConn(tconn, singleUse); /* */ $s = 4; case 4: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.dialClientConn, $c: true, $r, $24r, _arg, _arg$1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, addr, ctx, err, host, singleUse, t, tconn, $s};return $f; - }; - http2Transport.prototype.dialClientConn = function(ctx, addr, singleUse) { return this.$val.dialClientConn(ctx, addr, singleUse); }; - http2Transport.ptr.prototype.newTLSConfig = function(host) { - var {_r$1, cfg, host, t, $s, $r, $c} = $restore(this, {host}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - cfg = new tls.Config.ptr($ifaceNil, $throwNilPointerError, sliceType$13.nil, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$34.nil, sliceType$2.nil, "", 0, ptrType$34.nil, false, sliceType$14.nil, false, false, arrayType$1.zero(), $ifaceNil, 0, 0, sliceType$15.nil, false, 0, $ifaceNil, new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), sliceType$16.nil, sliceType$16.nil); - /* */ if (!(t.TLSClientConfig === ptrType$4.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(t.TLSClientConfig === ptrType$4.nil)) { */ case 1: - _r$1 = t.TLSClientConfig.Clone(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - tls.Config.copy(cfg, _r$1); - /* } */ case 2: - if (!http2strSliceContains(cfg.NextProtos, "h2")) { - cfg.NextProtos = $appendSlice(new sliceType$2(["h2"]), cfg.NextProtos); - } - if (cfg.ServerName === "") { - cfg.ServerName = host; - } - $s = -1; return cfg; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.newTLSConfig, $c: true, $r, _r$1, cfg, host, t, $s};return $f; - }; - http2Transport.prototype.newTLSConfig = function(host) { return this.$val.newTLSConfig(host); }; - http2Transport.ptr.prototype.dialTLS = function(ctx) { - var ctx, t; - t = this; - if (!(t.DialTLS === $throwNilPointerError)) { - return t.DialTLS; - } - return (function $b(network, addr, cfg) { - var {$24r, _r$1, _r$2, _r$3, _tuple, addr, cfg, err, network, p, state, tlsCn, $s, $r, $c} = $restore(this, {network, addr, cfg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = t.dialTLSWithContext(ctx, network, addr, cfg); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - tlsCn = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, err]; - } - _r$2 = tlsCn.ConnectionState(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - state = $clone(_r$2, tls.ConnectionState); - p = state.NegotiatedProtocol; - /* */ if (!(p === "h2")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(p === "h2")) { */ case 3: - _r$3 = fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", new sliceType([new $String(p), new $String("h2")])); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = [$ifaceNil, _r$3]; - $s = 6; case 6: return $24r; - /* } */ case 4: - if (!state.NegotiatedProtocolIsMutual) { - $s = -1; return [$ifaceNil, errors.New("http2: could not negotiate protocol mutually")]; - } - $s = -1; return [tlsCn, $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, addr, cfg, err, network, p, state, tlsCn, $s};return $f; - }); - }; - http2Transport.prototype.dialTLS = function(ctx) { return this.$val.dialTLS(ctx); }; - http2Transport.ptr.prototype.disableKeepAlives = function() { - var t; - t = this; - return !(t.t1 === ptrType$27.nil) && t.t1.DisableKeepAlives; - }; - http2Transport.prototype.disableKeepAlives = function() { return this.$val.disableKeepAlives(); }; - http2Transport.ptr.prototype.expectContinueTimeout = function() { - var t; - t = this; - if (t.t1 === ptrType$27.nil) { - return new time.Duration(0, 0); - } - return t.t1.ExpectContinueTimeout; - }; - http2Transport.prototype.expectContinueTimeout = function() { return this.$val.expectContinueTimeout(); }; - http2Transport.ptr.prototype.NewClientConn = function(c) { - var {$24r, _r$1, c, t, $s, $r, $c} = $restore(this, {c}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - _r$1 = t.newClientConn(c, t.disableKeepAlives()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.NewClientConn, $c: true, $r, $24r, _r$1, c, t, $s};return $f; - }; - http2Transport.prototype.NewClientConn = function(c) { return this.$val.NewClientConn(c); }; - http2Transport.ptr.prototype.newClientConn = function(c, singleUse) { - var {_arg, _arg$1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, cc, cs, d, initialSettings, max, ok, singleUse, state, t, x$5, $s, $r, $c} = $restore(this, {c, singleUse}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - state = [state]; - t = this; - cc = new http2ClientConn.ptr(t, c, ptrType$28.nil, 0, singleUse, false, new $Chan(structType, 0), $ifaceNil, new time.Duration(0, 0), ptrType$25.nil, new sync.Mutex.ptr(0, 0), ptrType$48.nil, new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), false, false, false, false, true, ptrType$82.nil, "", {}, 0, 1, 0, {}, ptrType$29.nil, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), 16384, 100, new $Uint64(4294967295, 4294967295), 65535, new $Chan(structType, 1), new sync.Mutex.ptr(0, 0), ptrType$14.nil, ptrType$72.nil, $ifaceNil, new bytes.Buffer.ptr(sliceType$3.nil, 0, 0), ptrType$89.nil); - d = t.idleConnTimeout(); - /* */ if (!((d.$high === 0 && d.$low === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((d.$high === 0 && d.$low === 0))) { */ case 1: - cc.idleTimeout = d; - _r$1 = time.AfterFunc(d, $methodVal(cc, "onIdleTimeout")); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cc.idleTimer = _r$1; - /* } */ case 2: - /* */ if (http2VerboseLogs) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (http2VerboseLogs) { */ case 4: - _arg = cc; - _r$2 = c.RemoteAddr(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - $r = t.vlogf("http2: Transport creating client conn %p to %v", new sliceType([_arg, _arg$1])); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - cc.cond = sync.NewCond(cc.mu); - cc.flow.add(65535); - cc.bw = bufio.NewWriter((x$5 = new http2stickyErrWriter.ptr(c, t.WriteByteTimeout, (cc.$ptr_werr || (cc.$ptr_werr = new ptrType$85(function() { return this.$target.werr; }, function($v) { this.$target.werr = $v; }, cc)))), new x$5.constructor.elem(x$5))); - cc.br = bufio.NewReader(c); - cc.fr = http2NewFramer(cc.bw, cc.br); - if (!(t.CountError === $throwNilPointerError)) { - cc.fr.countError = t.CountError; - } - _r$3 = hpack.NewDecoder(4096, $throwNilPointerError); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - cc.fr.ReadMetaHeaders = _r$3; - cc.fr.MaxHeaderListSize = t.maxHeaderListSize(); - _r$4 = hpack.NewEncoder(cc.hbuf); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - cc.henc = _r$4; - if (t.AllowHTTP) { - cc.nextStreamID = 3; - } - _tuple = $assertType(c, http2connectionStater, true); - cs = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (ok) { */ case 10: - _r$5 = cs.ConnectionState(); /* */ $s = 12; case 12: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - state[0] = $clone(_r$5, tls.ConnectionState); - cc.tlsState = state[0]; - /* } */ case 11: - initialSettings = new sliceType$23([new http2Setting.ptr(2, 0), new http2Setting.ptr(4, 4194304)]); - max = t.maxHeaderListSize(); - if (!((max === 0))) { - initialSettings = $append(initialSettings, new http2Setting.ptr(6, max)); - } - _r$6 = cc.bw.Write(http2clientPreface); /* */ $s = 13; case 13: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - _r$7 = cc.fr.WriteSettings(initialSettings); /* */ $s = 14; case 14: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = cc.fr.WriteWindowUpdate(0, 1073741824); /* */ $s = 15; case 15: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - cc.inflow.add(1073807359); - _r$9 = cc.bw.Flush(); /* */ $s = 16; case 16: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - _r$9; - /* */ if (!($interfaceIsEqual(cc.werr, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(cc.werr, $ifaceNil))) { */ case 17: - _r$10 = cc.Close(); /* */ $s = 19; case 19: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10; - $s = -1; return [ptrType$68.nil, cc.werr]; - /* } */ case 18: - $go($methodVal(cc, "readLoop"), []); - $s = -1; return [cc, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.newClientConn, $c: true, $r, _arg, _arg$1, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, c, cc, cs, d, initialSettings, max, ok, singleUse, state, t, x$5, $s};return $f; - }; - http2Transport.prototype.newClientConn = function(c, singleUse) { return this.$val.newClientConn(c, singleUse); }; - http2ClientConn.ptr.prototype.healthCheck = function() { - var {_r$1, _r$2, _r$3, _r$4, _tuple, cancel, cc, ctx, err, pingTimeout, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - pingTimeout = cc.t.pingTimeout(); - _r$1 = context.WithTimeout(context.Background(), pingTimeout); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - ctx = _tuple[0]; - cancel = _tuple[1]; - $deferred.push([cancel, []]); - _r$2 = cc.Ping(ctx); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 3: - _r$3 = cc.closeForLostPing(); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - _r$4 = cc.t.connPool(); /* */ $s = 6; case 6: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = _r$4.MarkDead(cc); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 8; case 8: return; - /* } */ case 4: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.healthCheck, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _tuple, cancel, cc, ctx, err, pingTimeout, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.healthCheck = function() { return this.$val.healthCheck(); }; - http2ClientConn.ptr.prototype.SetDoNotReuse = function() { - var {cc, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - cc.doNotReuse = true; - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.SetDoNotReuse, $c: true, $r, cc, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.SetDoNotReuse = function() { return this.$val.SetDoNotReuse(); }; - http2ClientConn.ptr.prototype.setGoAway = function(f) { - var {_entry, _i, _keys, _ref, cc, cs, f, last, old, streamID, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - old = cc.goAway; - cc.goAway = f; - if (cc.goAwayDebug === "") { - cc.goAwayDebug = ($bytesToString(f.DebugData())); - } - if (!(old === ptrType$82.nil) && !((old.ErrCode === 0))) { - cc.goAway.ErrCode = old.ErrCode; - } - last = f.LastStreamID; - _ref = cc.streams; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - streamID = _entry.k; - cs = _entry.v; - /* */ if (streamID > last) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (streamID > last) { */ case 4: - $r = cs.abortStreamLocked(http2errClientConnGotGoAway); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 5: - _i++; - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.setGoAway, $c: true, $r, _entry, _i, _keys, _ref, cc, cs, f, last, old, streamID, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.setGoAway = function(f) { return this.$val.setGoAway(f); }; - http2ClientConn.ptr.prototype.CanTakeNewRequest = function() { - var {$24r, _r$1, cc, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - _r$1 = cc.canTakeNewRequestLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.CanTakeNewRequest, $c: true, $r, $24r, _r$1, cc, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.CanTakeNewRequest = function() { return this.$val.CanTakeNewRequest(); }; - http2ClientConn.ptr.prototype.ReserveNewRequest = function() { - var {$24r, $24r$1, _r$1, cc, st, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - _r$1 = cc.idleStateLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - st = $clone(_r$1, http2clientConnIdleState); - /* */ if (!st.canTakeNewRequest) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!st.canTakeNewRequest) { */ case 3: - $24r = false; - $s = 5; case 5: return $24r; - /* } */ case 4: - cc.streamsReserved = cc.streamsReserved + (1) >> 0; - $24r$1 = true; - $s = 6; case 6: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return false; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.ReserveNewRequest, $c: true, $r, $24r, $24r$1, _r$1, cc, st, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.ReserveNewRequest = function() { return this.$val.ReserveNewRequest(); }; - http2ClientConn.ptr.prototype.State = function() { - var {$24r, cc, maxConcurrent, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.wmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - maxConcurrent = cc.maxConcurrentStreams; - if (!cc.seenSettings) { - maxConcurrent = 0; - } - $r = cc.wmu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cc.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - $24r = new http2ClientConnState.ptr(cc.closed, cc.closing || cc.singleUse || cc.doNotReuse || !(cc.goAway === ptrType$82.nil), $keys(cc.streams).length, cc.streamsReserved, cc.pendingRequests, maxConcurrent, $clone(cc.lastIdle, time.Time)); - $s = 4; case 4: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return new http2ClientConnState.ptr(false, false, 0, 0, 0, 0, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.State, $c: true, $r, $24r, cc, maxConcurrent, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.State = function() { return this.$val.State(); }; - http2ClientConn.ptr.prototype.idleStateLocked = function() { - var {_r$1, _v, cc, maxConcurrentOkay, st, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - st = new http2clientConnIdleState.ptr(false); - cc = this; - if (cc.singleUse && cc.nextStreamID > 1) { - $s = -1; return st; - } - maxConcurrentOkay = false; - if (cc.t.StrictMaxConcurrentStreams) { - maxConcurrentOkay = true; - } else { - maxConcurrentOkay = (x$5 = (new $Int64(0, (($keys(cc.streams).length + cc.streamsReserved >> 0) + 1 >> 0))), x$6 = (new $Int64(0, cc.maxConcurrentStreams)), (x$5.$high < x$6.$high || (x$5.$high === x$6.$high && x$5.$low <= x$6.$low))); - } - if (!(cc.goAway === ptrType$82.nil && !cc.closed && !cc.closing && maxConcurrentOkay && !cc.doNotReuse && (x$7 = (x$8 = (new $Int64(0, cc.nextStreamID)), x$9 = $mul64(new $Int64(0, 2), (new $Int64(0, cc.pendingRequests))), new $Int64(x$8.$high + x$9.$high, x$8.$low + x$9.$low)), (x$7.$high < 0 || (x$7.$high === 0 && x$7.$low < 2147483647))))) { _v = false; $s = 1; continue s; } - _r$1 = cc.tooIdleLocked(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 1: - st.canTakeNewRequest = _v; - $s = -1; return st; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.idleStateLocked, $c: true, $r, _r$1, _v, cc, maxConcurrentOkay, st, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - http2ClientConn.prototype.idleStateLocked = function() { return this.$val.idleStateLocked(); }; - http2ClientConn.ptr.prototype.canTakeNewRequestLocked = function() { - var {_r$1, cc, st, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - _r$1 = cc.idleStateLocked(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - st = $clone(_r$1, http2clientConnIdleState); - $s = -1; return st.canTakeNewRequest; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.canTakeNewRequestLocked, $c: true, $r, _r$1, cc, st, $s};return $f; - }; - http2ClientConn.prototype.canTakeNewRequestLocked = function() { return this.$val.canTakeNewRequestLocked(); }; - http2ClientConn.ptr.prototype.tooIdleLocked = function() { - var {$24r, _r$1, _v, cc, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - if (!(!((x$5 = cc.idleTimeout, (x$5.$high === 0 && x$5.$low === 0))) && !$clone(cc.lastIdle, time.Time).IsZero())) { _v = false; $s = 1; continue s; } - _r$1 = time.Since($clone($clone(cc.lastIdle, time.Time).Round(new time.Duration(0, 0)), time.Time)); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = (x$6 = _r$1, x$7 = cc.idleTimeout, (x$6.$high > x$7.$high || (x$6.$high === x$7.$high && x$6.$low > x$7.$low))); case 1: - $24r = _v; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.tooIdleLocked, $c: true, $r, $24r, _r$1, _v, cc, x$5, x$6, x$7, $s};return $f; - }; - http2ClientConn.prototype.tooIdleLocked = function() { return this.$val.tooIdleLocked(); }; - http2ClientConn.ptr.prototype.onIdleTimeout = function() { - var {cc, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - $r = cc.closeIfIdle(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.onIdleTimeout, $c: true, $r, cc, $s};return $f; - }; - http2ClientConn.prototype.onIdleTimeout = function() { return this.$val.onIdleTimeout(); }; - http2ClientConn.ptr.prototype.closeIfIdle = function() { - var {_r$1, cc, nextID, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if ($keys(cc.streams).length > 0 || cc.streamsReserved > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if ($keys(cc.streams).length > 0 || cc.streamsReserved > 0) { */ case 2: - $r = cc.mu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 3: - cc.closed = true; - nextID = cc.nextStreamID; - $r = cc.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (http2VerboseLogs) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (http2VerboseLogs) { */ case 6: - $r = cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", new sliceType([cc, new $Bool(cc.singleUse), new $Uint32((nextID - 2 >>> 0))])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - _r$1 = cc.tconn.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.closeIfIdle, $c: true, $r, _r$1, cc, nextID, $s};return $f; - }; - http2ClientConn.prototype.closeIfIdle = function() { return this.$val.closeIfIdle(); }; - http2ClientConn.ptr.prototype.Shutdown = function(ctx) { - var {$24r, _r$1, _r$2, _r$3, _r$4, _selection, cancelled, cc, ctx, done, err, err$1, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cancelled = [cancelled]; - cc = [cc]; - done = [done]; - cc[0] = this; - _r$1 = cc[0].sendGoAway(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - done[0] = new $Chan($error, 1); - cancelled[0] = false; - $go((function(cancelled, cc, done) { return function $b() { - var {_r$2, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = cc[0].mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc[0].mu, "Unlock"), []]); - /* while (true) { */ case 2: - /* */ if (($keys(cc[0].streams).length === 0) || cc[0].closed) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (($keys(cc[0].streams).length === 0) || cc[0].closed) { */ case 4: - cc[0].closed = true; - _r$2 = cc[0].tconn.Close(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = $send(done[0], _r$2); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 3; continue; - /* } */ case 5: - if (cancelled[0]) { - /* break; */ $s = 3; continue; - } - $r = cc[0].cond.Wait(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 2; continue; - case 3: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, _r$2, $s, $deferred};return $f; } } - }; })(cancelled, cc, done), []); - $r = http2shutdownEnterWaitStateHook(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = ctx.Done(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $select([[done[0]], [_r$2]]); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 5; continue; } - /* */ if (_selection[0] === 1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_selection[0] === 0) { */ case 5: - err$1 = _selection[1][0]; - $s = -1; return err$1; - /* } else if (_selection[0] === 1) { */ case 6: - $r = cc[0].mu.Lock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cancelled[0] = true; - $r = cc[0].cond.Broadcast(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cc[0].mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = ctx.Err(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 12; case 12: return $24r; - /* } */ case 7: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.Shutdown, $c: true, $r, $24r, _r$1, _r$2, _r$3, _r$4, _selection, cancelled, cc, ctx, done, err, err$1, $s};return $f; - }; - http2ClientConn.prototype.Shutdown = function(ctx) { return this.$val.Shutdown(ctx); }; - http2ClientConn.ptr.prototype.sendGoAway = function() { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, cc, closing, err, err$1, maxStreamID, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - closing = cc.closing; - cc.closing = true; - maxStreamID = cc.nextStreamID; - $r = cc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (closing) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (closing) { */ case 3: - $24r = $ifaceNil; - $s = 5; case 5: return $24r; - /* } */ case 4: - $r = cc.wmu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); - _r$1 = cc.fr.WriteGoAway(maxStreamID, 0, sliceType$3.nil); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 8: - $24r$1 = err; - $s = 10; case 10: return $24r$1; - /* } */ case 9: - _r$2 = cc.bw.Flush(); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 12: - $24r$2 = err$1; - $s = 14; case 14: return $24r$2; - /* } */ case 13: - $24r$3 = $ifaceNil; - $s = 15; case 15: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.sendGoAway, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, _r$2, cc, closing, err, err$1, maxStreamID, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.sendGoAway = function() { return this.$val.sendGoAway(); }; - http2ClientConn.ptr.prototype.closeForError = function(err) { - var {$24r, _entry, _i, _keys, _r$1, _ref, cc, cs, err, $s, $deferred, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cc.closed = true; - _ref = cc.streams; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 2: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 3; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 2; continue; - } - cs = _entry.v; - $r = cs.abortStreamLocked(err); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 2; continue; - case 3: - $deferred.push([$methodVal(cc.cond, "Broadcast"), []]); - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - _r$1 = cc.tconn.Close(); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 6; case 6: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.closeForError, $c: true, $r, $24r, _entry, _i, _keys, _r$1, _ref, cc, cs, err, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.closeForError = function(err) { return this.$val.closeForError(err); }; - http2ClientConn.ptr.prototype.Close = function() { - var {$24r, _r$1, cc, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - err = errors.New("http2: client connection force closed via ClientConn.Close"); - _r$1 = cc.closeForError(err); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.Close, $c: true, $r, $24r, _r$1, cc, err, $s};return $f; - }; - http2ClientConn.prototype.Close = function() { return this.$val.Close(); }; - http2ClientConn.ptr.prototype.closeForLostPing = function() { - var {$24r, _r$1, cc, err, f, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - err = errors.New("http2: client connection lost"); - f = cc.t.CountError; - /* */ if (!(f === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(f === $throwNilPointerError)) { */ case 1: - $r = f("conn_close_lost_ping"); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = cc.closeForError(err); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.closeForLostPing, $c: true, $r, $24r, _r$1, cc, err, f, $s};return $f; - }; - http2ClientConn.prototype.closeForLostPing = function() { return this.$val.closeForLostPing(); }; - http2commaSeparatedTrailers = function(req) { - var {$24r, _1, _entry, _i, _keys, _r$1, _r$2, _ref, k, keys, req, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - keys = $makeSlice(sliceType$2, 0, $keys(req.Trailer).length); - _ref = req.Trailer; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 1: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 2; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 1; continue; - } - k = _entry.k; - _r$1 = CanonicalHeaderKey(k); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - k = _r$1; - _1 = k; - /* */ if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === ("Transfer-Encoding") || _1 === ("Trailer") || _1 === ("Content-Length")) { */ case 5: - _r$2 = fmt.Errorf("invalid Trailer key %q", new sliceType([new $String(k)])); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = ["", _r$2]; - $s = 8; case 8: return $24r; - /* } */ case 6: - case 4: - keys = $append(keys, k); - _i++; - $s = 1; continue; - case 2: - /* */ if (keys.$length > 0) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (keys.$length > 0) { */ case 9: - $r = sort.Strings(keys); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [strings.Join(keys, ","), $ifaceNil]; - /* } */ case 10: - $s = -1; return ["", $ifaceNil]; - /* */ } return; } var $f = {$blk: http2commaSeparatedTrailers, $c: true, $r, $24r, _1, _entry, _i, _keys, _r$1, _r$2, _ref, k, keys, req, $s};return $f; - }; - http2ClientConn.ptr.prototype.responseHeaderTimeout = function() { - var cc; - cc = this; - if (!(cc.t.t1 === ptrType$27.nil)) { - return cc.t.t1.ResponseHeaderTimeout; - } - return new time.Duration(0, 0); - }; - http2ClientConn.prototype.responseHeaderTimeout = function() { return this.$val.responseHeaderTimeout(); }; - http2checkConnHeaders = function(req) { - var {$24r, $24r$1, $24r$2, _entry, _entry$1, _entry$2, _r$1, _r$2, _r$3, _r$4, req, v, vv, vv$1, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = new Header(req.Header).Get("Upgrade"); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - /* */ if (!(v === "")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(v === "")) { */ case 2: - _r$2 = fmt.Errorf("http2: invalid Upgrade request header: %q", new sliceType([(_entry = req.Header[$String.keyFor("Upgrade")], _entry !== undefined ? _entry.v : sliceType$2.nil)])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 3: - vv = (_entry$1 = req.Header[$String.keyFor("Transfer-Encoding")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - /* */ if (vv.$length > 0 && (vv.$length > 1 || !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "") && !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "chunked"))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (vv.$length > 0 && (vv.$length > 1 || !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "") && !((0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0]) === "chunked"))) { */ case 6: - _r$3 = fmt.Errorf("http2: invalid Transfer-Encoding request header: %q", new sliceType([vv])); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = _r$3; - $s = 9; case 9: return $24r$1; - /* } */ case 7: - vv$1 = (_entry$2 = req.Header[$String.keyFor("Connection")], _entry$2 !== undefined ? _entry$2.v : sliceType$2.nil); - /* */ if (vv$1.$length > 0 && (vv$1.$length > 1 || !((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]) === "") && !http2asciiEqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "close") && !http2asciiEqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "keep-alive"))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (vv$1.$length > 0 && (vv$1.$length > 1 || !((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]) === "") && !http2asciiEqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "close") && !http2asciiEqualFold((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]), "keep-alive"))) { */ case 10: - _r$4 = fmt.Errorf("http2: invalid Connection request header: %q", new sliceType([vv$1])); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = _r$4; - $s = 13; case 13: return $24r$2; - /* } */ case 11: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2checkConnHeaders, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _entry$1, _entry$2, _r$1, _r$2, _r$3, _r$4, req, v, vv, vv$1, $s};return $f; - }; - http2actualContentLength = function(req) { - var req, x$5; - if ($interfaceIsEqual(req.Body, $ifaceNil) || $interfaceIsEqual(req.Body, new $pkg.NoBody.constructor.elem($pkg.NoBody))) { - return new $Int64(0, 0); - } - if (!((x$5 = req.ContentLength, (x$5.$high === 0 && x$5.$low === 0)))) { - return req.ContentLength; - } - return new $Int64(-1, 4294967295); - }; - http2ClientConn.ptr.prototype.decrStreamReservations = function() { - var {cc, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - cc.decrStreamReservationsLocked(); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.decrStreamReservations, $c: true, $r, cc, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.decrStreamReservations = function() { return this.$val.decrStreamReservations(); }; - http2ClientConn.ptr.prototype.decrStreamReservationsLocked = function() { - var cc; - cc = this; - if (cc.streamsReserved > 0) { - cc.streamsReserved = cc.streamsReserved - (1) >> 0; - } - }; - http2ClientConn.prototype.decrStreamReservationsLocked = function() { return this.$val.decrStreamReservationsLocked(); }; - http2ClientConn.ptr.prototype.RoundTrip = function(req) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _selection, _selection$1, cc, cs, ctx, err, handleResponseHeaders, req, waitDone, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = [cc]; - cs = [cs]; - ctx = [ctx]; - req = [req]; - waitDone = [waitDone]; - cc[0] = this; - ctx[0] = req[0].Context(); - _r$1 = httptrace.ContextClientTrace(ctx[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cs[0] = new http2clientStream.ptr(cc[0], ctx[0], req[0].Cancel, _r$1, 0, new http2pipe.ptr(new sync.Mutex.ptr(0, 0), new sync.Cond.ptr(new sync.noCopy.ptr(), $ifaceNil, new sync.notifyList.ptr(0, 0, 0, 0, 0), 0, 0, $chanNil), $ifaceNil, 0, $ifaceNil, $ifaceNil, $chanNil, $throwNilPointerError), false, req[0].Method === "HEAD", new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), new $Chan(structType, 0), $ifaceNil, new $Chan(structType, 0), new $Chan(structType, 0), $chanNil, new $Chan(structType, 0), ptrType$18.nil, new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), new http2flow.ptr(arrayType.zero(), 0, ptrType$71.nil), new $Int64(0, 0), $ifaceNil, req[0].Body, http2actualContentLength(req[0]), false, false, false, false, false, false, 0, false, false, false, ptrType$38.nil); - $go($methodVal(cs[0], "doRequest"), [req[0]]); - waitDone[0] = (function(cc, cs, ctx, req, waitDone) { return function $b() { - var {$24r, _r$2, _r$3, _r$4, _selection, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = ctx[0].Done(); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $select([[cs[0].donec], [_r$2], [cs[0].reqCancel]]); /* */ $s = 2; case 2: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ if (_selection[0] === 2) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_selection[0] === 0) { */ case 3: - $s = -1; return $ifaceNil; - /* } else if (_selection[0] === 1) { */ case 4: - _r$4 = ctx[0].Err(); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 8; case 8: return $24r; - /* } else if (_selection[0] === 2) { */ case 5: - $s = -1; return http2errRequestCanceled; - /* } */ case 6: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$2, _r$3, _r$4, _selection, $s};return $f; - }; })(cc, cs, ctx, req, waitDone); - handleResponseHeaders = (function(cc, cs, ctx, req, waitDone) { return function $b() { - var {_r$2, err, res, x$5, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - res = cs[0].res; - /* */ if (res.StatusCode > 299) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (res.StatusCode > 299) { */ case 1: - $r = cs[0].abortRequestBodyWrite(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - res.Request = req[0]; - res.TLS = cc[0].tlsState; - /* */ if ($interfaceIsEqual(res.Body, http2noBody) && (x$5 = http2actualContentLength(req[0]), (x$5.$high === 0 && x$5.$low === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($interfaceIsEqual(res.Body, http2noBody) && (x$5 = http2actualContentLength(req[0]), (x$5.$high === 0 && x$5.$low === 0))) { */ case 4: - _r$2 = waitDone[0](); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$18.nil, err]; - } - /* } */ case 5: - $s = -1; return [res, $ifaceNil]; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$2, err, res, x$5, $s};return $f; - }; })(cc, cs, ctx, req, waitDone); - /* while (true) { */ case 2: - _r$2 = ctx[0].Done(); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $select([[cs[0].respHeaderRecv], [cs[0].abort], [_r$2], [cs[0].reqCancel]]); /* */ $s = 5; case 5: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 6; continue; } - /* */ if (_selection[0] === 1) { $s = 7; continue; } - /* */ if (_selection[0] === 2) { $s = 8; continue; } - /* */ if (_selection[0] === 3) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_selection[0] === 0) { */ case 6: - _r$4 = handleResponseHeaders(); /* */ $s = 11; case 11: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 12; case 12: return $24r; - /* } else if (_selection[0] === 1) { */ case 7: - _selection$1 = $select([[cs[0].respHeaderRecv], []]); - /* */ if (_selection$1[0] === 0) { $s = 13; continue; } - /* */ if (_selection$1[0] === 1) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_selection$1[0] === 0) { */ case 13: - _r$5 = handleResponseHeaders(); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$1 = _r$5; - $s = 17; case 17: return $24r$1; - /* } else if (_selection$1[0] === 1) { */ case 14: - _r$6 = waitDone[0](); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - $s = -1; return [ptrType$18.nil, cs[0].abortErr]; - /* } */ case 15: - $s = 10; continue; - /* } else if (_selection[0] === 2) { */ case 8: - _r$7 = ctx[0].Err(); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - $r = cs[0].abortStream(err); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ptrType$18.nil, err]; - /* } else if (_selection[0] === 3) { */ case 9: - $r = cs[0].abortStream(http2errRequestCanceled); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [ptrType$18.nil, http2errRequestCanceled]; - /* } */ case 10: - $s = 2; continue; - case 3: - $s = -1; return [ptrType$18.nil, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.RoundTrip, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _selection, _selection$1, cc, cs, ctx, err, handleResponseHeaders, req, waitDone, $s};return $f; - }; - http2ClientConn.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; - http2clientStream.ptr.prototype.doRequest = function(req) { - var {_r$1, cs, err, req, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cs = this; - _r$1 = cs.writeRequest(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - $r = cs.cleanupWriteRequest(err); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2clientStream.ptr.prototype.doRequest, $c: true, $r, _r$1, cs, err, req, $s};return $f; - }; - http2clientStream.prototype.doRequest = function(req) { return this.$val.doRequest(req); }; - http2clientStream.ptr.prototype.writeRequest = function(req) { - var {$24r, $24r$1, $24r$10, $24r$11, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _selection$2, _v, _v$1, cc, continueTimeout, cs, ctx, d, err, err$1, err$2, hasBody, req, respHeaderRecv, respHeaderTimer, timer, timer$1, x$5, $s, $deferred, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = $ifaceNil; - cs = this; - cc = cs.cc; - ctx = cs.ctx; - _r$1 = http2checkConnHeaders(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err$1 = _r$1; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 2: - err = err$1; - $24r = err; - $s = 4; case 4: return $24r; - /* } */ case 3: - if (cc.reqHeaderMu === $chanNil) { - $panic(new $String("RoundTrip on uninitialized ClientConn")); - } - _r$2 = ctx.Done(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $select([[cc.reqHeaderMu, new structType.ptr()], [cs.reqCancel], [_r$2]]); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 7; continue; } - /* */ if (_selection[0] === 1) { $s = 8; continue; } - /* */ if (_selection[0] === 2) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_selection[0] === 0) { */ case 7: - $s = 10; continue; - /* } else if (_selection[0] === 1) { */ case 8: - err = http2errRequestCanceled; - $24r$1 = err; - $s = 11; case 11: return $24r$1; - /* } else if (_selection[0] === 2) { */ case 9: - _r$4 = ctx.Err(); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - err = _r$4; - $24r$2 = err; - $s = 13; case 13: return $24r$2; - /* } */ case 10: - $r = cc.mu.Lock(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(cc.idleTimer === ptrType$25.nil)) { - cc.idleTimer.Stop(); - } - cc.decrStreamReservationsLocked(); - _r$5 = cc.awaitOpenSlotForStreamLocked(cs); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$2 = _r$5; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 16: - $r = cc.mu.Unlock(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$6 = $recv(cc.reqHeaderMu); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6[0]; - err = err$2; - $24r$3 = err; - $s = 20; case 20: return $24r$3; - /* } */ case 17: - cc.addStreamLocked(cs); - if (http2isConnectionCloseRequest(req)) { - cc.doNotReuse = true; - } - $r = cc.mu.Unlock(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(!cc.t.disableCompression())) { _v$1 = false; $s = 25; continue s; } - _r$7 = new Header(req.Header).Get("Accept-Encoding"); /* */ $s = 26; case 26: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _v$1 = _r$7 === ""; case 25: - if (!(_v$1)) { _v = false; $s = 24; continue s; } - _r$8 = new Header(req.Header).Get("Range"); /* */ $s = 27; case 27: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _v = _r$8 === ""; case 24: - /* */ if (_v && !cs.isHead) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (_v && !cs.isHead) { */ case 22: - cs.requestedGzip = true; - /* } */ case 23: - continueTimeout = cc.t.expectContinueTimeout(); - if (!((continueTimeout.$high === 0 && continueTimeout.$low === 0))) { - if (!httpguts.HeaderValuesContainsToken((_entry = req.Header[$String.keyFor("Expect")], _entry !== undefined ? _entry.v : sliceType$2.nil), "100-continue")) { - continueTimeout = new time.Duration(0, 0); - } else { - cs.on100 = new $Chan(structType, 1); - } - } - _r$9 = cs.encodeAndWriteHeaders(req); /* */ $s = 28; case 28: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - _r$10 = $recv(cc.reqHeaderMu); /* */ $s = 29; case 29: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - _r$10[0]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 30: - err = err; - $24r$4 = err; - $s = 32; case 32: return $24r$4; - /* } */ case 31: - hasBody = !((x$5 = cs.reqBodyContentLength, (x$5.$high === 0 && x$5.$low === 0))); - /* */ if (!hasBody) { $s = 33; continue; } - /* */ $s = 34; continue; - /* if (!hasBody) { */ case 33: - cs.sentEndStream = true; - $s = 35; continue; - /* } else { */ case 34: - /* */ if (!((continueTimeout.$high === 0 && continueTimeout.$low === 0))) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (!((continueTimeout.$high === 0 && continueTimeout.$low === 0))) { */ case 36: - $r = http2traceWait100Continue(cs.trace); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$11 = time.NewTimer(continueTimeout); /* */ $s = 39; case 39: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - timer = _r$11; - _r$12 = ctx.Done(); /* */ $s = 40; case 40: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - _r$13 = $select([[timer.C], [cs.on100], [cs.abort], [_r$12], [cs.reqCancel]]); /* */ $s = 41; case 41: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _selection$1 = _r$13; - /* */ if (_selection$1[0] === 0) { $s = 42; continue; } - /* */ if (_selection$1[0] === 1) { $s = 43; continue; } - /* */ if (_selection$1[0] === 2) { $s = 44; continue; } - /* */ if (_selection$1[0] === 3) { $s = 45; continue; } - /* */ if (_selection$1[0] === 4) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (_selection$1[0] === 0) { */ case 42: - err = $ifaceNil; - $s = 47; continue; - /* } else if (_selection$1[0] === 1) { */ case 43: - err = $ifaceNil; - $s = 47; continue; - /* } else if (_selection$1[0] === 2) { */ case 44: - err = cs.abortErr; - $s = 47; continue; - /* } else if (_selection$1[0] === 3) { */ case 45: - _r$14 = ctx.Err(); /* */ $s = 48; case 48: if($c) { $c = false; _r$14 = _r$14.$blk(); } if (_r$14 && _r$14.$blk !== undefined) { break s; } - err = _r$14; - $s = 47; continue; - /* } else if (_selection$1[0] === 4) { */ case 46: - err = http2errRequestCanceled; - /* } */ case 47: - timer.Stop(); - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 49: - $r = http2traceWroteRequest(cs.trace, err); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err = err; - $24r$5 = err; - $s = 52; case 52: return $24r$5; - /* } */ case 50: - /* } */ case 37: - _r$15 = cs.writeRequestBody(req); /* */ $s = 53; case 53: if($c) { $c = false; _r$15 = _r$15.$blk(); } if (_r$15 && _r$15.$blk !== undefined) { break s; } - err = _r$15; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 54; continue; } - /* */ $s = 55; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 54: - /* */ if (!($interfaceIsEqual(err, http2errStopReqBodyWrite))) { $s = 57; continue; } - /* */ $s = 58; continue; - /* if (!($interfaceIsEqual(err, http2errStopReqBodyWrite))) { */ case 57: - $r = http2traceWroteRequest(cs.trace, err); /* */ $s = 59; case 59: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err = err; - $24r$6 = err; - $s = 60; case 60: return $24r$6; - /* } */ case 58: - $s = 56; continue; - /* } else { */ case 55: - cs.sentEndStream = true; - /* } */ case 56: - /* } */ case 35: - $r = http2traceWroteRequest(cs.trace, err); /* */ $s = 61; case 61: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - respHeaderTimer = $chanNil; - respHeaderRecv = $chanNil; - d = cc.responseHeaderTimeout(); - /* */ if (!((d.$high === 0 && d.$low === 0))) { $s = 62; continue; } - /* */ $s = 63; continue; - /* if (!((d.$high === 0 && d.$low === 0))) { */ case 62: - _r$16 = time.NewTimer(d); /* */ $s = 64; case 64: if($c) { $c = false; _r$16 = _r$16.$blk(); } if (_r$16 && _r$16.$blk !== undefined) { break s; } - timer$1 = _r$16; - $deferred.push([$methodVal(timer$1, "Stop"), []]); - respHeaderTimer = timer$1.C; - respHeaderRecv = cs.respHeaderRecv; - /* } */ case 63: - /* while (true) { */ case 65: - _r$17 = ctx.Done(); /* */ $s = 67; case 67: if($c) { $c = false; _r$17 = _r$17.$blk(); } if (_r$17 && _r$17.$blk !== undefined) { break s; } - _r$18 = $select([[cs.peerClosed], [respHeaderTimer], [respHeaderRecv], [cs.abort], [_r$17], [cs.reqCancel]]); /* */ $s = 68; case 68: if($c) { $c = false; _r$18 = _r$18.$blk(); } if (_r$18 && _r$18.$blk !== undefined) { break s; } - _selection$2 = _r$18; - /* */ if (_selection$2[0] === 0) { $s = 69; continue; } - /* */ if (_selection$2[0] === 1) { $s = 70; continue; } - /* */ if (_selection$2[0] === 2) { $s = 71; continue; } - /* */ if (_selection$2[0] === 3) { $s = 72; continue; } - /* */ if (_selection$2[0] === 4) { $s = 73; continue; } - /* */ if (_selection$2[0] === 5) { $s = 74; continue; } - /* */ $s = 75; continue; - /* if (_selection$2[0] === 0) { */ case 69: - err = $ifaceNil; - $24r$7 = err; - $s = 76; case 76: return $24r$7; - /* } else if (_selection$2[0] === 1) { */ case 70: - err = http2errTimeout; - $24r$8 = err; - $s = 77; case 77: return $24r$8; - /* } else if (_selection$2[0] === 2) { */ case 71: - respHeaderRecv = $chanNil; - respHeaderTimer = $chanNil; - $s = 75; continue; - /* } else if (_selection$2[0] === 3) { */ case 72: - err = cs.abortErr; - $24r$9 = err; - $s = 78; case 78: return $24r$9; - /* } else if (_selection$2[0] === 4) { */ case 73: - _r$19 = ctx.Err(); /* */ $s = 79; case 79: if($c) { $c = false; _r$19 = _r$19.$blk(); } if (_r$19 && _r$19.$blk !== undefined) { break s; } - err = _r$19; - $24r$10 = err; - $s = 80; case 80: return $24r$10; - /* } else if (_selection$2[0] === 5) { */ case 74: - err = http2errRequestCanceled; - $24r$11 = err; - $s = 81; case 81: return $24r$11; - /* } */ case 75: - $s = 65; continue; - case 66: - $s = -1; return err; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err; } if($curGoroutine.asleep) { var $f = {$blk: http2clientStream.ptr.prototype.writeRequest, $c: true, $r, $24r, $24r$1, $24r$10, $24r$11, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, $24r$9, _entry, _r$1, _r$10, _r$11, _r$12, _r$13, _r$14, _r$15, _r$16, _r$17, _r$18, _r$19, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _selection, _selection$1, _selection$2, _v, _v$1, cc, continueTimeout, cs, ctx, d, err, err$1, err$2, hasBody, req, respHeaderRecv, respHeaderTimer, timer, timer$1, x$5, $s, $deferred};return $f; } } - }; - http2clientStream.prototype.writeRequest = function(req) { return this.$val.writeRequest(req); }; - http2clientStream.ptr.prototype.encodeAndWriteHeaders = function(req) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _r$3, _r$4, _r$5, _selection, _tuple, _tuple$1, cc, contentLen, cs, ctx, endStream, err, hasBody, hasTrailers, hdrs, req, trailers, $s, $deferred, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cs = this; - cc = cs.cc; - ctx = cs.ctx; - $r = cc.wmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); - _r$1 = ctx.Done(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = $select([[cs.abort], [_r$1], [cs.reqCancel], []]); - /* */ if (_selection[0] === 0) { $s = 3; continue; } - /* */ if (_selection[0] === 1) { $s = 4; continue; } - /* */ if (_selection[0] === 2) { $s = 5; continue; } - /* */ if (_selection[0] === 3) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_selection[0] === 0) { */ case 3: - $24r = cs.abortErr; - $s = 8; case 8: return $24r; - /* } else if (_selection[0] === 1) { */ case 4: - _r$2 = ctx.Err(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 10; case 10: return $24r$1; - /* } else if (_selection[0] === 2) { */ case 5: - $24r$2 = http2errRequestCanceled; - $s = 11; case 11: return $24r$2; - /* } else if (_selection[0] === 3) { */ case 6: - /* } */ case 7: - _r$3 = http2commaSeparatedTrailers(req); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - trailers = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 13: - $24r$3 = err; - $s = 15; case 15: return $24r$3; - /* } */ case 14: - hasTrailers = !(trailers === ""); - contentLen = http2actualContentLength(req); - hasBody = !((contentLen.$high === 0 && contentLen.$low === 0)); - _r$4 = cc.encodeHeaders(req, cs.requestedGzip, trailers, contentLen); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - hdrs = _tuple$1[0]; - err = _tuple$1[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 17: - $24r$4 = err; - $s = 19; case 19: return $24r$4; - /* } */ case 18: - endStream = !hasBody && !hasTrailers; - cs.sentHeaders = true; - _r$5 = cc.writeHeaders(cs.ID, endStream, ((cc.maxFrameSize >> 0)), hdrs); /* */ $s = 20; case 20: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err = _r$5; - $r = http2traceWroteHeaders(cs.trace); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$5 = err; - $s = 22; case 22: return $24r$5; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientStream.ptr.prototype.encodeAndWriteHeaders, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _r$3, _r$4, _r$5, _selection, _tuple, _tuple$1, cc, contentLen, cs, ctx, endStream, err, hasBody, hasTrailers, hdrs, req, trailers, $s, $deferred};return $f; } } - }; - http2clientStream.prototype.encodeAndWriteHeaders = function(req) { return this.$val.encodeAndWriteHeaders(req); }; - http2clientStream.ptr.prototype.cleanupWriteRequest = function(err) { - var {_r$1, _r$2, _selection, _tuple, bodyClosed, cc, cs, err, ok, se, werr, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cs = this; - cc = cs.cc; - /* */ if (cs.ID === 0) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (cs.ID === 0) { */ case 1: - $r = cc.decrStreamReservations(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $r = cc.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bodyClosed = cs.reqBodyClosed; - cs.reqBodyClosed = true; - $r = cc.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!bodyClosed && !($interfaceIsEqual(cs.reqBody, $ifaceNil))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!bodyClosed && !($interfaceIsEqual(cs.reqBody, $ifaceNil))) { */ case 6: - _r$1 = cs.reqBody.Close(); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - /* } */ case 7: - /* */ if (!($interfaceIsEqual(err, $ifaceNil)) && cs.sentEndStream) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil)) && cs.sentEndStream) { */ case 9: - _selection = $select([[cs.peerClosed], []]); - if (_selection[0] === 0) { - err = $ifaceNil; - } else if (_selection[0] === 1) { - } - /* } */ case 10: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 11: - $r = cs.abortStream(err); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (cs.sentHeaders) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (cs.sentHeaders) { */ case 15: - _tuple = $assertType(err, http2StreamError, true); - se = $clone(_tuple[0], http2StreamError); - ok = _tuple[1]; - /* */ if (ok) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (ok) { */ case 17: - /* */ if (!($interfaceIsEqual(se.Cause, http2errFromPeer))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(se.Cause, http2errFromPeer))) { */ case 20: - $r = cc.writeStreamReset(cs.ID, se.Code, err); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 21: - $s = 19; continue; - /* } else { */ case 18: - $r = cc.writeStreamReset(cs.ID, 8, err); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 19: - /* } */ case 16: - $r = cs.bufPipe.CloseWithError(err); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 13; continue; - /* } else { */ case 12: - /* */ if (cs.sentHeaders && !cs.sentEndStream) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (cs.sentHeaders && !cs.sentEndStream) { */ case 25: - $r = cc.writeStreamReset(cs.ID, 0, $ifaceNil); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 26: - $r = cs.bufPipe.CloseWithError(http2errRequestCanceled); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - /* */ if (!((cs.ID === 0))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!((cs.ID === 0))) { */ case 29: - $r = cc.forgetStreamID(cs.ID); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 30: - $r = cc.wmu.Lock(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - werr = cc.werr; - $r = cc.wmu.Unlock(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(werr, $ifaceNil))) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!($interfaceIsEqual(werr, $ifaceNil))) { */ case 34: - _r$2 = cc.Close(); /* */ $s = 36; case 36: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 35: - $close(cs.donec); - $s = -1; return; - /* */ } return; } var $f = {$blk: http2clientStream.ptr.prototype.cleanupWriteRequest, $c: true, $r, _r$1, _r$2, _selection, _tuple, bodyClosed, cc, cs, err, ok, se, werr, $s};return $f; - }; - http2clientStream.prototype.cleanupWriteRequest = function(err) { return this.$val.cleanupWriteRequest(err); }; - http2ClientConn.ptr.prototype.awaitOpenSlotForStreamLocked = function(cs) { - var {_r$1, _r$2, _selection, _v, cc, cs, x$5, x$6, $s, $r, $c} = $restore(this, {cs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - /* while (true) { */ case 1: - _r$1 = time.Now(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - time.Time.copy(cc.lastActive, _r$1); - if (cc.closed) { _v = true; $s = 6; continue s; } - _r$2 = cc.canTakeNewRequestLocked(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _v = !_r$2; case 6: - /* */ if (_v) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_v) { */ case 4: - $s = -1; return http2errClientConnUnusable; - /* } */ case 5: - time.Time.copy(cc.lastIdle, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); - if ((x$5 = (new $Int64(0, $keys(cc.streams).length)), x$6 = (new $Int64(0, cc.maxConcurrentStreams)), (x$5.$high < x$6.$high || (x$5.$high === x$6.$high && x$5.$low < x$6.$low)))) { - $s = -1; return $ifaceNil; - } - cc.pendingRequests = cc.pendingRequests + (1) >> 0; - $r = cc.cond.Wait(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cc.pendingRequests = cc.pendingRequests - (1) >> 0; - _selection = $select([[cs.abort], []]); - if (_selection[0] === 0) { - $s = -1; return cs.abortErr; - } else if (_selection[0] === 1) { - } - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.awaitOpenSlotForStreamLocked, $c: true, $r, _r$1, _r$2, _selection, _v, cc, cs, x$5, x$6, $s};return $f; - }; - http2ClientConn.prototype.awaitOpenSlotForStreamLocked = function(cs) { return this.$val.awaitOpenSlotForStreamLocked(cs); }; - http2ClientConn.ptr.prototype.writeHeaders = function(streamID, endStream, maxFrameSize, hdrs) { - var {_r$1, _r$2, _r$3, cc, chunk, endHeaders, endStream, first, hdrs, maxFrameSize, streamID, $s, $r, $c} = $restore(this, {streamID, endStream, maxFrameSize, hdrs}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - first = true; - /* while (true) { */ case 1: - /* if (!(hdrs.$length > 0 && $interfaceIsEqual(cc.werr, $ifaceNil))) { break; } */ if(!(hdrs.$length > 0 && $interfaceIsEqual(cc.werr, $ifaceNil))) { $s = 2; continue; } - chunk = hdrs; - if (chunk.$length > maxFrameSize) { - chunk = $subslice(chunk, 0, maxFrameSize); - } - hdrs = $subslice(hdrs, chunk.$length); - endHeaders = hdrs.$length === 0; - /* */ if (first) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (first) { */ case 3: - _r$1 = cc.fr.WriteHeaders(new http2HeadersFrameParam.ptr(streamID, chunk, endStream, endHeaders, 0, new http2PriorityParam.ptr(0, false, 0))); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - first = false; - $s = 5; continue; - /* } else { */ case 4: - _r$2 = cc.fr.WriteContinuation(streamID, endHeaders, chunk); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 5: - $s = 1; continue; - case 2: - _r$3 = cc.bw.Flush(); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return cc.werr; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.writeHeaders, $c: true, $r, _r$1, _r$2, _r$3, cc, chunk, endHeaders, endStream, first, hdrs, maxFrameSize, streamID, $s};return $f; - }; - http2ClientConn.prototype.writeHeaders = function(streamID, endStream, maxFrameSize, hdrs) { return this.$val.writeHeaders(streamID, endStream, maxFrameSize, hdrs); }; - http2clientStream.ptr.prototype.frameScratchBufferLen = function(maxFrameSize) { - var cl, cs, maxFrameSize, n, x$5; - cs = this; - n = (new $Int64(0, maxFrameSize)); - if ((n.$high > 0 || (n.$high === 0 && n.$low > 524288))) { - n = new $Int64(0, 524288); - } - cl = cs.reqBodyContentLength; - if (!((cl.$high === -1 && cl.$low === 4294967295)) && (x$5 = new $Int64(cl.$high + 0, cl.$low + 1), (x$5.$high < n.$high || (x$5.$high === n.$high && x$5.$low < n.$low)))) { - n = new $Int64(cl.$high + 0, cl.$low + 1); - } - if ((n.$high < 0 || (n.$high === 0 && n.$low < 1))) { - return 1; - } - return (((n.$low + ((n.$high >> 31) * 4294967296)) >> 0)); - }; - http2clientStream.prototype.frameScratchBufferLen = function(maxFrameSize) { return this.$val.frameScratchBufferLen(maxFrameSize); }; - http2clientStream.ptr.prototype.writeRequestBody = function(req) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, allowed, body$1, bodyClosed, bp, buf, cc, cs, data, err, err$1, ferr, hasContentLen, hasTrailers, maxFrameSize, n, n1, ok, remain, remainLen, req, sawEOF, scratch, scratchLen, sentEnd, trailer, trls, x$5, x$6, $s, $deferred, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - buf = [buf]; - err = $ifaceNil; - cs = this; - cc = cs.cc; - body$1 = cs.reqBody; - sentEnd = false; - hasTrailers = !(req.Trailer === false); - remainLen = cs.reqBodyContentLength; - hasContentLen = !((remainLen.$high === -1 && remainLen.$low === 4294967295)); - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - maxFrameSize = ((cc.maxFrameSize >> 0)); - $r = cc.mu.Unlock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - scratchLen = cs.frameScratchBufferLen(maxFrameSize); - buf[0] = sliceType$3.nil; - _r$1 = http2bufPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = $assertType(_r$1, ptrType$6, true); - bp = _tuple[0]; - ok = _tuple[1]; - if (ok && bp.$get().$length >= scratchLen) { - $deferred.push([$methodVal(http2bufPool, "Put"), [bp]]); - buf[0] = bp.$get(); - } else { - buf[0] = $makeSlice(sliceType$3, scratchLen); - $deferred.push([$methodVal(http2bufPool, "Put"), [(buf.$ptr || (buf.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, buf)))]]); - } - sawEOF = false; - /* while (true) { */ case 4: - /* if (!(!sawEOF)) { break; } */ if(!(!sawEOF)) { $s = 5; continue; } - _r$2 = body$1.Read($subslice(buf[0], 0, buf[0].$length)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err$1 = _tuple$1[1]; - /* */ if (hasContentLen) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (hasContentLen) { */ case 7: - remainLen = (x$5 = (new $Int64(0, n)), new $Int64(remainLen.$high - x$5.$high, remainLen.$low - x$5.$low)); - /* */ if ((remainLen.$high === 0 && remainLen.$low === 0) && $interfaceIsEqual(err$1, $ifaceNil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ((remainLen.$high === 0 && remainLen.$low === 0) && $interfaceIsEqual(err$1, $ifaceNil)) { */ case 9: - scratch = arrayType$2.zero(); - n1 = 0; - _r$3 = body$1.Read(new sliceType$3(scratch)); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$2 = _r$3; - n1 = _tuple$2[0]; - err$1 = _tuple$2[1]; - remainLen = (x$6 = (new $Int64(0, n1)), new $Int64(remainLen.$high - x$6.$high, remainLen.$low - x$6.$low)); - /* } */ case 10: - /* */ if ((remainLen.$high < 0 || (remainLen.$high === 0 && remainLen.$low < 0))) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if ((remainLen.$high < 0 || (remainLen.$high === 0 && remainLen.$low < 0))) { */ case 12: - err$1 = http2errReqBodyTooLong; - err = err$1; - $24r = err; - $s = 14; case 14: return $24r; - /* } */ case 13: - /* } */ case 8: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 15: - $r = cc.mu.Lock(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - bodyClosed = cs.reqBodyClosed; - $r = cc.mu.Unlock(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (bodyClosed) { $s = 20; continue; } - /* */ if ($interfaceIsEqual(err$1, io.EOF)) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (bodyClosed) { */ case 20: - err = http2errStopReqBodyWrite; - $24r$1 = err; - $s = 24; case 24: return $24r$1; - /* } else if ($interfaceIsEqual(err$1, io.EOF)) { */ case 21: - sawEOF = true; - err$1 = $ifaceNil; - $s = 23; continue; - /* } else { */ case 22: - err = err$1; - $24r$2 = err; - $s = 25; case 25: return $24r$2; - /* } */ case 23: - case 19: - /* } */ case 16: - remain = $subslice(buf[0], 0, n); - /* while (true) { */ case 26: - /* if (!(remain.$length > 0 && $interfaceIsEqual(err$1, $ifaceNil))) { break; } */ if(!(remain.$length > 0 && $interfaceIsEqual(err$1, $ifaceNil))) { $s = 27; continue; } - allowed = 0; - _r$4 = cs.awaitFlowControl(remain.$length); /* */ $s = 28; case 28: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$3 = _r$4; - allowed = _tuple$3[0]; - err$1 = _tuple$3[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 29; continue; } - /* */ $s = 30; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 29: - err = err$1; - $24r$3 = err; - $s = 31; case 31: return $24r$3; - /* } */ case 30: - $r = cc.wmu.Lock(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - data = $subslice(remain, 0, allowed); - remain = $subslice(remain, allowed); - sentEnd = sawEOF && (remain.$length === 0) && !hasTrailers; - _r$5 = cc.fr.WriteData(cs.ID, sentEnd, data); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - err$1 = _r$5; - /* */ if ($interfaceIsEqual(err$1, $ifaceNil)) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if ($interfaceIsEqual(err$1, $ifaceNil)) { */ case 34: - _r$6 = cc.bw.Flush(); /* */ $s = 36; case 36: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err$1 = _r$6; - /* } */ case 35: - $r = cc.wmu.Unlock(); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 26; continue; - case 27: - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 38; continue; } - /* */ $s = 39; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 38: - err = err$1; - $24r$4 = err; - $s = 40; case 40: return $24r$4; - /* } */ case 39: - $s = 4; continue; - case 5: - /* */ if (sentEnd) { $s = 41; continue; } - /* */ $s = 42; continue; - /* if (sentEnd) { */ case 41: - err = $ifaceNil; - $24r$5 = err; - $s = 43; case 43: return $24r$5; - /* } */ case 42: - $r = cc.mu.Lock(); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - trailer = req.Trailer; - err = cs.abortErr; - $r = cc.mu.Unlock(); /* */ $s = 45; case 45: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 46; continue; } - /* */ $s = 47; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 46: - err = err; - $24r$6 = err; - $s = 48; case 48: return $24r$6; - /* } */ case 47: - $r = cc.wmu.Lock(); /* */ $s = 49; case 49: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); - trls = sliceType$3.nil; - /* */ if ($keys(trailer).length > 0) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if ($keys(trailer).length > 0) { */ case 50: - _r$7 = cc.encodeTrailers(trailer); /* */ $s = 52; case 52: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$4 = _r$7; - trls = _tuple$4[0]; - err = _tuple$4[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 53; continue; } - /* */ $s = 54; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 53: - err = err; - $24r$7 = err; - $s = 55; case 55: return $24r$7; - /* } */ case 54: - /* } */ case 51: - /* */ if (trls.$length > 0) { $s = 56; continue; } - /* */ $s = 57; continue; - /* if (trls.$length > 0) { */ case 56: - _r$8 = cc.writeHeaders(cs.ID, true, maxFrameSize, trls); /* */ $s = 59; case 59: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - $s = 58; continue; - /* } else { */ case 57: - _r$9 = cc.fr.WriteData(cs.ID, true, sliceType$3.nil); /* */ $s = 60; case 60: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - /* } */ case 58: - _r$10 = cc.bw.Flush(); /* */ $s = 61; case 61: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - ferr = _r$10; - if (!($interfaceIsEqual(ferr, $ifaceNil)) && $interfaceIsEqual(err, $ifaceNil)) { - err = ferr; - } - err = err; - $24r$8 = err; - $s = 62; case 62: return $24r$8; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err; } if($curGoroutine.asleep) { var $f = {$blk: http2clientStream.ptr.prototype.writeRequestBody, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, $24r$6, $24r$7, $24r$8, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, allowed, body$1, bodyClosed, bp, buf, cc, cs, data, err, err$1, ferr, hasContentLen, hasTrailers, maxFrameSize, n, n1, ok, remain, remainLen, req, sawEOF, scratch, scratchLen, sentEnd, trailer, trls, x$5, x$6, $s, $deferred};return $f; } } - }; - http2clientStream.prototype.writeRequestBody = function(req) { return this.$val.writeRequestBody(req); }; - http2clientStream.ptr.prototype.awaitFlowControl = function(maxBytes) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, cc, cs, ctx, err, maxBytes, take, taken, $s, $deferred, $r, $c} = $restore(this, {maxBytes}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - taken = 0; - err = $ifaceNil; - cs = this; - cc = cs.cc; - ctx = cs.ctx; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - /* while (true) { */ case 2: - /* */ if (cc.closed) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (cc.closed) { */ case 4: - _tmp = 0; - _tmp$1 = http2errClientConnClosed; - taken = _tmp; - err = _tmp$1; - $24r = [taken, err]; - $s = 6; case 6: return $24r; - /* } */ case 5: - /* */ if (cs.reqBodyClosed) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (cs.reqBodyClosed) { */ case 7: - _tmp$2 = 0; - _tmp$3 = http2errStopReqBodyWrite; - taken = _tmp$2; - err = _tmp$3; - $24r$1 = [taken, err]; - $s = 9; case 9: return $24r$1; - /* } */ case 8: - _r$1 = ctx.Done(); /* */ $s = 10; case 10: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _selection = $select([[cs.abort], [_r$1], [cs.reqCancel], []]); - /* */ if (_selection[0] === 0) { $s = 11; continue; } - /* */ if (_selection[0] === 1) { $s = 12; continue; } - /* */ if (_selection[0] === 2) { $s = 13; continue; } - /* */ if (_selection[0] === 3) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_selection[0] === 0) { */ case 11: - _tmp$4 = 0; - _tmp$5 = cs.abortErr; - taken = _tmp$4; - err = _tmp$5; - $24r$2 = [taken, err]; - $s = 16; case 16: return $24r$2; - /* } else if (_selection[0] === 1) { */ case 12: - _tmp$6 = 0; - _r$2 = ctx.Err(); /* */ $s = 17; case 17: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tmp$7 = _r$2; - taken = _tmp$6; - err = _tmp$7; - $24r$3 = [taken, err]; - $s = 18; case 18: return $24r$3; - /* } else if (_selection[0] === 2) { */ case 13: - _tmp$8 = 0; - _tmp$9 = http2errRequestCanceled; - taken = _tmp$8; - err = _tmp$9; - $24r$4 = [taken, err]; - $s = 19; case 19: return $24r$4; - /* } else if (_selection[0] === 3) { */ case 14: - /* } */ case 15: - a = cs.flow.available(); - /* */ if (a > 0) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (a > 0) { */ case 20: - take = a; - if (((take >> 0)) > maxBytes) { - take = ((maxBytes >> 0)); - } - if (take > ((cc.maxFrameSize >> 0))) { - take = ((cc.maxFrameSize >> 0)); - } - cs.flow.take(take); - _tmp$10 = take; - _tmp$11 = $ifaceNil; - taken = _tmp$10; - err = _tmp$11; - $24r$5 = [taken, err]; - $s = 22; case 22: return $24r$5; - /* } */ case 21: - $r = cc.cond.Wait(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 2; continue; - case 3: - $s = -1; return [taken, err]; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [taken, err]; } if($curGoroutine.asleep) { var $f = {$blk: http2clientStream.ptr.prototype.awaitFlowControl, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _r$1, _r$2, _selection, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, a, cc, cs, ctx, err, maxBytes, take, taken, $s, $deferred};return $f; } } - }; - http2clientStream.prototype.awaitFlowControl = function(maxBytes) { return this.$val.awaitFlowControl(maxBytes); }; - http2ClientConn.ptr.prototype.encodeHeaders = function(req, addGzipHeader, trailers, contentLength) { - var {$24r, $24r$1, $24r$2, $24r$3, _entry, _i, _i$1, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _ref$1, _tuple, addGzipHeader, cc, contentLength, enumerateHeaders, err, hlSize, host, k, orig, path$1, req, trace, traceHeaders, trailers, v, vv, x$5, $s, $r, $c} = $restore(this, {req, addGzipHeader, trailers, contentLength}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - addGzipHeader = [addGzipHeader]; - cc = [cc]; - contentLength = [contentLength]; - hlSize = [hlSize]; - host = [host]; - path$1 = [path$1]; - req = [req]; - trace = [trace]; - traceHeaders = [traceHeaders]; - trailers = [trailers]; - cc[0] = this; - cc[0].hbuf.Reset(); - if (req[0].URL === ptrType$17.nil) { - $s = -1; return [sliceType$3.nil, http2errNilRequestURL]; - } - host[0] = req[0].Host; - if (host[0] === "") { - host[0] = req[0].URL.Host; - } - _r$1 = httpguts.PunycodeHostPort(host[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - host[0] = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [sliceType$3.nil, err]; - } - path$1[0] = ""; - /* */ if (!(req[0].Method === "CONNECT")) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(req[0].Method === "CONNECT")) { */ case 2: - path$1[0] = req[0].URL.RequestURI(); - /* */ if (!http2validPseudoPath(path$1[0])) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!http2validPseudoPath(path$1[0])) { */ case 4: - orig = path$1[0]; - path$1[0] = strings.TrimPrefix(path$1[0], req[0].URL.Scheme + "://" + host[0]); - /* */ if (!http2validPseudoPath(path$1[0])) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!http2validPseudoPath(path$1[0])) { */ case 6: - /* */ if (!(req[0].URL.Opaque === "")) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(req[0].URL.Opaque === "")) { */ case 8: - _r$2 = fmt.Errorf("invalid request :path %q from URL.Opaque = %q", new sliceType([new $String(orig), new $String(req[0].URL.Opaque)])); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = [sliceType$3.nil, _r$2]; - $s = 12; case 12: return $24r; - /* } else { */ case 9: - _r$3 = fmt.Errorf("invalid request :path %q", new sliceType([new $String(orig)])); /* */ $s = 13; case 13: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$1 = [sliceType$3.nil, _r$3]; - $s = 14; case 14: return $24r$1; - /* } */ case 10: - /* } */ case 7: - /* } */ case 5: - /* } */ case 3: - _ref = req[0].Header; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 15: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 16; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 15; continue; - } - k = _entry.k; - vv = _entry.v; - /* */ if (!httpguts.ValidHeaderFieldName(k)) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!httpguts.ValidHeaderFieldName(k)) { */ case 17: - _r$4 = fmt.Errorf("invalid HTTP header name %q", new sliceType([new $String(k)])); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$2 = [sliceType$3.nil, _r$4]; - $s = 20; case 20: return $24r$2; - /* } */ case 18: - _ref$1 = vv; - _i$1 = 0; - /* while (true) { */ case 21: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 22; continue; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - /* */ if (!httpguts.ValidHeaderFieldValue(v)) { $s = 23; continue; } - /* */ $s = 24; continue; - /* if (!httpguts.ValidHeaderFieldValue(v)) { */ case 23: - _r$5 = fmt.Errorf("invalid HTTP header value %q for header %q", new sliceType([new $String(v), new $String(k)])); /* */ $s = 25; case 25: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - $24r$3 = [sliceType$3.nil, _r$5]; - $s = 26; case 26: return $24r$3; - /* } */ case 24: - _i$1++; - $s = 21; continue; - case 22: - _i++; - $s = 15; continue; - case 16: - enumerateHeaders = (function(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers) { return function $b(f) { - var {_entry$1, _i$2, _i$3, _i$4, _keys$1, _ref$2, _ref$3, _ref$4, didUA, f, k$1, m, p, v$1, v$2, vv$1, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = f(":authority", host[0]); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - m = req[0].Method; - if (m === "") { - m = "GET"; - } - $r = f(":method", m); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!(req[0].Method === "CONNECT")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!(req[0].Method === "CONNECT")) { */ case 3: - $r = f(":path", path$1[0]); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = f(":scheme", req[0].URL.Scheme); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - /* */ if (!(trailers[0] === "")) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(trailers[0] === "")) { */ case 7: - $r = f("trailer", trailers[0]); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - didUA = false; - _ref$2 = req[0].Header; - _i$2 = 0; - _keys$1 = $keys(_ref$2); - /* while (true) { */ case 10: - /* if (!(_i$2 < _keys$1.length)) { break; } */ if(!(_i$2 < _keys$1.length)) { $s = 11; continue; } - _entry$1 = _ref$2[_keys$1[_i$2]]; - if (_entry$1 === undefined) { - _i$2++; - /* continue; */ $s = 10; continue; - } - k$1 = _entry$1.k; - vv$1 = _entry$1.v; - /* */ if (http2asciiEqualFold(k$1, "host") || http2asciiEqualFold(k$1, "content-length")) { $s = 12; continue; } - /* */ if (http2asciiEqualFold(k$1, "connection") || http2asciiEqualFold(k$1, "proxy-connection") || http2asciiEqualFold(k$1, "transfer-encoding") || http2asciiEqualFold(k$1, "upgrade") || http2asciiEqualFold(k$1, "keep-alive")) { $s = 13; continue; } - /* */ if (http2asciiEqualFold(k$1, "user-agent")) { $s = 14; continue; } - /* */ if (http2asciiEqualFold(k$1, "cookie")) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (http2asciiEqualFold(k$1, "host") || http2asciiEqualFold(k$1, "content-length")) { */ case 12: - _i$2++; - /* continue; */ $s = 10; continue; - $s = 16; continue; - /* } else if (http2asciiEqualFold(k$1, "connection") || http2asciiEqualFold(k$1, "proxy-connection") || http2asciiEqualFold(k$1, "transfer-encoding") || http2asciiEqualFold(k$1, "upgrade") || http2asciiEqualFold(k$1, "keep-alive")) { */ case 13: - _i$2++; - /* continue; */ $s = 10; continue; - $s = 16; continue; - /* } else if (http2asciiEqualFold(k$1, "user-agent")) { */ case 14: - didUA = true; - if (vv$1.$length < 1) { - _i$2++; - /* continue; */ $s = 10; continue; - } - vv$1 = $subslice(vv$1, 0, 1); - if ((0 >= vv$1.$length ? ($throwRuntimeError("index out of range"), undefined) : vv$1.$array[vv$1.$offset + 0]) === "") { - _i$2++; - /* continue; */ $s = 10; continue; - } - $s = 16; continue; - /* } else if (http2asciiEqualFold(k$1, "cookie")) { */ case 15: - _ref$3 = vv$1; - _i$3 = 0; - /* while (true) { */ case 17: - /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 18; continue; } - v$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - /* while (true) { */ case 19: - p = strings.IndexByte(v$1, 59); - if (p < 0) { - /* break; */ $s = 20; continue; - } - $r = f("cookie", $substring(v$1, 0, p)); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - p = p + (1) >> 0; - while (true) { - if (!((p + 1 >> 0) <= v$1.length && (v$1.charCodeAt(p) === 32))) { break; } - p = p + (1) >> 0; - } - v$1 = $substring(v$1, p); - $s = 19; continue; - case 20: - /* */ if (v$1.length > 0) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (v$1.length > 0) { */ case 22: - $r = f("cookie", v$1); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 23: - _i$3++; - $s = 17; continue; - case 18: - _i$2++; - /* continue; */ $s = 10; continue; - /* } */ case 16: - _ref$4 = vv$1; - _i$4 = 0; - /* while (true) { */ case 25: - /* if (!(_i$4 < _ref$4.$length)) { break; } */ if(!(_i$4 < _ref$4.$length)) { $s = 26; continue; } - v$2 = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); - $r = f(k$1, v$2); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$4++; - $s = 25; continue; - case 26: - _i$2++; - $s = 10; continue; - case 11: - /* */ if (http2shouldSendReqContentLength(req[0].Method, contentLength[0])) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (http2shouldSendReqContentLength(req[0].Method, contentLength[0])) { */ case 28: - $r = f("content-length", strconv.FormatInt(contentLength[0], 10)); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 29: - /* */ if (addGzipHeader[0]) { $s = 31; continue; } - /* */ $s = 32; continue; - /* if (addGzipHeader[0]) { */ case 31: - $r = f("accept-encoding", "gzip"); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 32: - /* */ if (!didUA) { $s = 34; continue; } - /* */ $s = 35; continue; - /* if (!didUA) { */ case 34: - $r = f("user-agent", "Go-http-client/2.0"); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 35: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _entry$1, _i$2, _i$3, _i$4, _keys$1, _ref$2, _ref$3, _ref$4, didUA, f, k$1, m, p, v$1, v$2, vv$1, $s};return $f; - }; })(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers); - hlSize[0] = new $Uint64(0, 0); - $r = enumerateHeaders((function(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers) { return function(name, value) { - var hf, name, value, x$5; - hf = new hpack.HeaderField.ptr(name, value, false); - hlSize[0] = (x$5 = (new $Uint64(0, $clone(hf, hpack.HeaderField).Size())), new $Uint64(hlSize[0].$high + x$5.$high, hlSize[0].$low + x$5.$low)); - }; })(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers)); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ((x$5 = cc[0].peerMaxHeaderListSize, (hlSize[0].$high > x$5.$high || (hlSize[0].$high === x$5.$high && hlSize[0].$low > x$5.$low)))) { - $s = -1; return [sliceType$3.nil, http2errRequestHeaderListSize]; - } - _r$6 = httptrace.ContextClientTrace(req[0].Context()); /* */ $s = 28; case 28: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - trace[0] = _r$6; - traceHeaders[0] = http2traceHasWroteHeaderField(trace[0]); - $r = enumerateHeaders((function(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers) { return function $b(name, value) { - var {_r$7, _tuple$1, ascii$1, name, value, $s, $r, $c} = $restore(this, {name, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$7 = http2asciiToLower(name); /* */ $s = 1; case 1: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _tuple$1 = _r$7; - name = _tuple$1[0]; - ascii$1 = _tuple$1[1]; - if (!ascii$1) { - $s = -1; return; - } - $r = cc[0].writeHeader(name, value); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (traceHeaders[0]) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (traceHeaders[0]) { */ case 3: - $r = http2traceWroteHeaderField(trace[0], name, value); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 4: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$7, _tuple$1, ascii$1, name, value, $s};return $f; - }; })(addGzipHeader, cc, contentLength, hlSize, host, path$1, req, trace, traceHeaders, trailers)); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [cc[0].hbuf.Bytes(), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.encodeHeaders, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _entry, _i, _i$1, _keys, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _ref, _ref$1, _tuple, addGzipHeader, cc, contentLength, enumerateHeaders, err, hlSize, host, k, orig, path$1, req, trace, traceHeaders, trailers, v, vv, x$5, $s};return $f; - }; - http2ClientConn.prototype.encodeHeaders = function(req, addGzipHeader, trailers, contentLength) { return this.$val.encodeHeaders(req, addGzipHeader, trailers, contentLength); }; - http2shouldSendReqContentLength = function(method, contentLength) { - var _1, contentLength, method; - if ((contentLength.$high > 0 || (contentLength.$high === 0 && contentLength.$low > 0))) { - return true; - } - if ((contentLength.$high < 0 || (contentLength.$high === 0 && contentLength.$low < 0))) { - return false; - } - _1 = method; - if (_1 === ("POST") || _1 === ("PUT") || _1 === ("PATCH")) { - return true; - } else { - return false; - } - }; - http2ClientConn.ptr.prototype.encodeTrailers = function(trailer) { - var {_entry, _entry$1, _i, _i$1, _i$2, _i$3, _keys, _keys$1, _r$1, _ref, _ref$1, _ref$2, _ref$3, _tuple, ascii$1, cc, hf, hlSize, k, k$1, lowKey, trailer, v, v$1, vv, vv$1, x$5, x$6, $s, $r, $c} = $restore(this, {trailer}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - cc.hbuf.Reset(); - hlSize = new $Uint64(0, 0); - _ref = trailer; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - _ref$1 = vv; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - hf = new hpack.HeaderField.ptr(k, v, false); - hlSize = (x$5 = (new $Uint64(0, $clone(hf, hpack.HeaderField).Size())), new $Uint64(hlSize.$high + x$5.$high, hlSize.$low + x$5.$low)); - _i$1++; - } - _i++; - } - if ((x$6 = cc.peerMaxHeaderListSize, (hlSize.$high > x$6.$high || (hlSize.$high === x$6.$high && hlSize.$low > x$6.$low)))) { - $s = -1; return [sliceType$3.nil, http2errRequestHeaderListSize]; - } - _ref$2 = trailer; - _i$2 = 0; - _keys$1 = $keys(_ref$2); - /* while (true) { */ case 1: - /* if (!(_i$2 < _keys$1.length)) { break; } */ if(!(_i$2 < _keys$1.length)) { $s = 2; continue; } - _entry$1 = _ref$2[_keys$1[_i$2]]; - if (_entry$1 === undefined) { - _i$2++; - /* continue; */ $s = 1; continue; - } - k$1 = _entry$1.k; - vv$1 = _entry$1.v; - _r$1 = http2asciiToLower(k$1); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - lowKey = _tuple[0]; - ascii$1 = _tuple[1]; - if (!ascii$1) { - _i$2++; - /* continue; */ $s = 1; continue; - } - _ref$3 = vv$1; - _i$3 = 0; - /* while (true) { */ case 4: - /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 5; continue; } - v$1 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - $r = cc.writeHeader(lowKey, v$1); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$3++; - $s = 4; continue; - case 5: - _i$2++; - $s = 1; continue; - case 2: - $s = -1; return [cc.hbuf.Bytes(), $ifaceNil]; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.encodeTrailers, $c: true, $r, _entry, _entry$1, _i, _i$1, _i$2, _i$3, _keys, _keys$1, _r$1, _ref, _ref$1, _ref$2, _ref$3, _tuple, ascii$1, cc, hf, hlSize, k, k$1, lowKey, trailer, v, v$1, vv, vv$1, x$5, x$6, $s};return $f; - }; - http2ClientConn.prototype.encodeTrailers = function(trailer) { return this.$val.encodeTrailers(trailer); }; - http2ClientConn.ptr.prototype.writeHeader = function(name, value) { - var {_r$1, cc, name, value, $s, $r, $c} = $restore(this, {name, value}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - /* */ if (http2VerboseLogs) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (http2VerboseLogs) { */ case 1: - $r = log.Printf("http2: Transport encoding header %q = %q", new sliceType([new $String(name), new $String(value)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = cc.henc.WriteField(new hpack.HeaderField.ptr(name, value, false)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.writeHeader, $c: true, $r, _r$1, cc, name, value, $s};return $f; - }; - http2ClientConn.prototype.writeHeader = function(name, value) { return this.$val.writeHeader(name, value); }; - http2ClientConn.ptr.prototype.addStreamLocked = function(cs) { - var _key, cc, cs; - cc = this; - cs.flow.add(((cc.initialWindowSize >> 0))); - cs.flow.setConnFlow(cc.flow); - cs.inflow.add(4194304); - cs.inflow.setConnFlow(cc.inflow); - cs.ID = cc.nextStreamID; - cc.nextStreamID = cc.nextStreamID + (2) >>> 0; - _key = cs.ID; (cc.streams || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: cs }; - if (cs.ID === 0) { - $panic(new $String("assigned stream ID 0")); - } - }; - http2ClientConn.prototype.addStreamLocked = function(cs) { return this.$val.addStreamLocked(cs); }; - http2ClientConn.ptr.prototype.forgetStreamID = function(id) { - var {_r$1, _r$2, _r$3, cc, closeOnIdle, id, slen, $s, $deferred, $r, $c} = $restore(this, {id}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - $r = cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - slen = $keys(cc.streams).length; - delete cc.streams[$Uint32.keyFor(id)]; - if (!(($keys(cc.streams).length === (slen - 1 >> 0)))) { - $panic(new $String("forgetting unknown stream id")); - } - _r$1 = time.Now(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - time.Time.copy(cc.lastActive, _r$1); - /* */ if (($keys(cc.streams).length === 0) && !(cc.idleTimer === ptrType$25.nil)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (($keys(cc.streams).length === 0) && !(cc.idleTimer === ptrType$25.nil)) { */ case 3: - _r$2 = cc.idleTimer.Reset(cc.idleTimeout); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = time.Now(); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - time.Time.copy(cc.lastIdle, _r$3); - /* } */ case 4: - $r = cc.cond.Broadcast(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - closeOnIdle = cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives(); - /* */ if (closeOnIdle && (cc.streamsReserved === 0) && ($keys(cc.streams).length === 0)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (closeOnIdle && (cc.streamsReserved === 0) && ($keys(cc.streams).length === 0)) { */ case 8: - /* */ if (http2VerboseLogs) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (http2VerboseLogs) { */ case 10: - $r = cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", new sliceType([cc, new $Bool(cc.singleUse), new $Uint32((cc.nextStreamID - 2 >>> 0))])); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - cc.closed = true; - $deferred.push([$methodVal(cc.tconn, "Close"), []]); - /* } */ case 9: - $r = cc.mu.Unlock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.forgetStreamID, $c: true, $r, _r$1, _r$2, _r$3, cc, closeOnIdle, id, slen, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.forgetStreamID = function(id) { return this.$val.forgetStreamID(id); }; - http2ClientConn.ptr.prototype.readLoop = function() { - var {_r$1, _r$2, _tuple, cc, ce, ok, rl, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = this; - rl = new http2clientConnReadLoop.ptr(arrayType.zero(), cc); - $deferred.push([$methodVal(rl, "cleanup"), []]); - _r$1 = rl.run(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cc.readerErr = _r$1; - _tuple = $assertType(cc.readerErr, http2ConnectionError, true); - ce = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (ok) { */ case 2: - $r = cc.wmu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = cc.fr.WriteGoAway(0, ((ce >>> 0)), sliceType$3.nil); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $r = cc.wmu.Unlock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2ClientConn.ptr.prototype.readLoop, $c: true, $r, _r$1, _r$2, _tuple, cc, ce, ok, rl, $s, $deferred};return $f; } } - }; - http2ClientConn.prototype.readLoop = function() { return this.$val.readLoop(); }; - http2GoAwayError.ptr.prototype.Error = function() { - var {$24r, _r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r$1 = fmt.Sprintf("http2: server sent GOAWAY and closed the connection; LastStreamID=%v, ErrCode=%v, debug=%q", new sliceType([new $Uint32(e.LastStreamID), new http2ErrCode(e.ErrCode), new $String(e.DebugData)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2GoAwayError.ptr.prototype.Error, $c: true, $r, $24r, _r$1, e, $s};return $f; - }; - http2GoAwayError.prototype.Error = function() { return this.$val.Error(); }; - http2isEOFOrNetReadError = function(err) { - var _tuple, err, ne, ok; - if ($interfaceIsEqual(err, io.EOF)) { - return true; - } - _tuple = $assertType(err, ptrType$57, true); - ne = _tuple[0]; - ok = _tuple[1]; - return ok && ne.Op === "read"; - }; - http2clientConnReadLoop.ptr.prototype.cleanup = function() { - var {_arg, _entry, _i, _keys, _r$1, _ref, _selection, cc, cs, err, rl, x$5, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - cc = rl.cc; - $deferred.push([$methodVal(cc.tconn, "Close"), []]); - _r$1 = cc.t.connPool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $deferred.push([$methodVal(_r$1, "MarkDead"), [cc]]); - $deferred.push([function(_arg) { $close(_arg); }, [cc.readerDone]]); - if (!(cc.idleTimer === ptrType$25.nil)) { - cc.idleTimer.Stop(); - } - err = cc.readerErr; - $r = cc.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!(cc.goAway === ptrType$82.nil) && http2isEOFOrNetReadError(err)) { - err = (x$5 = new http2GoAwayError.ptr(cc.goAway.LastStreamID, cc.goAway.ErrCode, cc.goAwayDebug), new x$5.constructor.elem(x$5)); - } else if ($interfaceIsEqual(err, io.EOF)) { - err = io.ErrUnexpectedEOF; - } - cc.closed = true; - _ref = cc.streams; - _i = 0; - _keys = $keys(_ref); - /* while (true) { */ case 3: - /* if (!(_i < _keys.length)) { break; } */ if(!(_i < _keys.length)) { $s = 4; continue; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - /* continue; */ $s = 3; continue; - } - cs = _entry.v; - _selection = $select([[cs.peerClosed], []]); - /* */ if (_selection[0] === 0) { $s = 5; continue; } - /* */ if (_selection[0] === 1) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_selection[0] === 0) { */ case 5: - $s = 7; continue; - /* } else if (_selection[0] === 1) { */ case 6: - $r = cs.abortStreamLocked(err); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - _i++; - $s = 3; continue; - case 4: - $r = cc.cond.Broadcast(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cc.mu.Unlock(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.cleanup, $c: true, $r, _arg, _entry, _i, _keys, _r$1, _ref, _selection, cc, cs, err, rl, x$5, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.cleanup = function() { return this.$val.cleanup(); }; - http2ClientConn.ptr.prototype.countReadFrameError = function(err) { - var {_arg, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, cc, ce, err, errCode, f, ok, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - f = cc.t.CountError; - if (f === $throwNilPointerError || $interfaceIsEqual(err, $ifaceNil)) { - $s = -1; return; - } - _tuple = $assertType(err, http2ConnectionError, true); - ce = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - errCode = ((ce >>> 0)); - _r$1 = new http2ErrCode(errCode).stringToken(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg = new $String(_r$1); - _r$2 = fmt.Sprintf("read_frame_conn_error_%s", new sliceType([_arg])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = f(_r$2); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 2: - _r$3 = errors.Is(err, io.EOF); /* */ $s = 8; case 8: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_r$3) { */ case 6: - $r = f("read_frame_eof"); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 7: - _r$4 = errors.Is(err, io.ErrUnexpectedEOF); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - /* */ if (_r$4) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (_r$4) { */ case 10: - $r = f("read_frame_unexpected_eof"); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 11: - _r$5 = errors.Is(err, http2ErrFrameTooLarge); /* */ $s = 16; case 16: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - /* */ if (_r$5) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_r$5) { */ case 14: - $r = f("read_frame_too_large"); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* } */ case 15: - $r = f("read_frame_other"); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.countReadFrameError, $c: true, $r, _arg, _r$1, _r$2, _r$3, _r$4, _r$5, _tuple, cc, ce, err, errCode, f, ok, $s};return $f; - }; - http2ClientConn.prototype.countReadFrameError = function(err) { return this.$val.countReadFrameError(err); }; - http2clientConnReadLoop.ptr.prototype.run = function() { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, cc, cs, err, f, f$1, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, gotSettings, ok, ok$1, readIdleTimeout, rl, se, t, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - cc = rl.cc; - gotSettings = false; - readIdleTimeout = cc.t.ReadIdleTimeout; - t = ptrType$25.nil; - /* */ if (!((readIdleTimeout.$high === 0 && readIdleTimeout.$low === 0))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!((readIdleTimeout.$high === 0 && readIdleTimeout.$low === 0))) { */ case 1: - _r$1 = time.AfterFunc(readIdleTimeout, $methodVal(cc, "healthCheck")); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - t = _r$1; - $deferred.push([$methodVal(t, "Stop"), []]); - /* } */ case 2: - /* while (true) { */ case 4: - _r$2 = cc.fr.ReadFrame(); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - f = _tuple[0]; - err = _tuple[1]; - /* */ if (!(t === ptrType$25.nil)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(t === ptrType$25.nil)) { */ case 7: - _r$3 = t.Reset(readIdleTimeout); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 8: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 10: - $r = cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", new sliceType([cc, err, err])); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 11: - _tuple$1 = $assertType(err, http2StreamError, true); - se = $clone(_tuple$1[0], http2StreamError); - ok = _tuple$1[1]; - /* */ if (ok) { $s = 13; continue; } - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (ok) { */ case 13: - _r$4 = rl.streamByID(se.StreamID); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - cs = _r$4; - /* */ if (!(cs === ptrType$104.nil)) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!(cs === ptrType$104.nil)) { */ case 17: - if ($interfaceIsEqual(se.Cause, $ifaceNil)) { - se.Cause = cc.fr.errDetail; - } - $r = rl.endStreamError(cs, new se.constructor.elem(se)); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 18: - /* continue; */ $s = 4; continue; - $s = 15; continue; - /* } else if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 14: - $r = cc.countReadFrameError(err); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r = err; - $s = 21; case 21: return $24r; - /* } */ case 15: - /* */ if (http2VerboseLogs) { $s = 22; continue; } - /* */ $s = 23; continue; - /* if (http2VerboseLogs) { */ case 22: - _r$5 = http2summarizeFrame(f); /* */ $s = 24; case 24: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _arg = new $String(_r$5); - $r = cc.vlogf("http2: Transport received %s", new sliceType([_arg])); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 23: - /* */ if (!gotSettings) { $s = 26; continue; } - /* */ $s = 27; continue; - /* if (!gotSettings) { */ case 26: - _tuple$2 = $assertType(f, ptrType$78, true); - ok$1 = _tuple$2[1]; - /* */ if (!ok$1) { $s = 28; continue; } - /* */ $s = 29; continue; - /* if (!ok$1) { */ case 28: - $r = cc.logf("protocol error: received %T before a SETTINGS frame", new sliceType([f])); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$1 = new http2ConnectionError(1); - $s = 31; case 31: return $24r$1; - /* } */ case 29: - gotSettings = true; - /* } */ case 27: - _ref = f; - /* */ if ($assertType(_ref, ptrType$76, true)[1]) { $s = 32; continue; } - /* */ if ($assertType(_ref, ptrType$79, true)[1]) { $s = 33; continue; } - /* */ if ($assertType(_ref, ptrType$82, true)[1]) { $s = 34; continue; } - /* */ if ($assertType(_ref, ptrType$83, true)[1]) { $s = 35; continue; } - /* */ if ($assertType(_ref, ptrType$78, true)[1]) { $s = 36; continue; } - /* */ if ($assertType(_ref, ptrType$96, true)[1]) { $s = 37; continue; } - /* */ if ($assertType(_ref, ptrType$80, true)[1]) { $s = 38; continue; } - /* */ if ($assertType(_ref, ptrType$81, true)[1]) { $s = 39; continue; } - /* */ $s = 40; continue; - /* if ($assertType(_ref, ptrType$76, true)[1]) { */ case 32: - f$1 = _ref.$val; - _r$6 = rl.processHeaders(f$1); /* */ $s = 42; case 42: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - err = _r$6; - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$79, true)[1]) { */ case 33: - f$2 = _ref.$val; - _r$7 = rl.processData(f$2); /* */ $s = 43; case 43: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - err = _r$7; - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$82, true)[1]) { */ case 34: - f$3 = _ref.$val; - _r$8 = rl.processGoAway(f$3); /* */ $s = 44; case 44: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - err = _r$8; - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$83, true)[1]) { */ case 35: - f$4 = _ref.$val; - _r$9 = rl.processResetStream(f$4); /* */ $s = 45; case 45: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - err = _r$9; - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$78, true)[1]) { */ case 36: - f$5 = _ref.$val; - _r$10 = rl.processSettings(f$5); /* */ $s = 46; case 46: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - err = _r$10; - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$96, true)[1]) { */ case 37: - f$6 = _ref.$val; - err = rl.processPushPromise(f$6); - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$80, true)[1]) { */ case 38: - f$7 = _ref.$val; - _r$11 = rl.processWindowUpdate(f$7); /* */ $s = 47; case 47: if($c) { $c = false; _r$11 = _r$11.$blk(); } if (_r$11 && _r$11.$blk !== undefined) { break s; } - err = _r$11; - $s = 41; continue; - /* } else if ($assertType(_ref, ptrType$81, true)[1]) { */ case 39: - f$8 = _ref.$val; - _r$12 = rl.processPing(f$8); /* */ $s = 48; case 48: if($c) { $c = false; _r$12 = _r$12.$blk(); } if (_r$12 && _r$12.$blk !== undefined) { break s; } - err = _r$12; - $s = 41; continue; - /* } else { */ case 40: - f$9 = _ref; - $r = cc.logf("Transport: unhandled response frame type %T", new sliceType([f$9])); /* */ $s = 49; case 49: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 41: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 50; continue; } - /* */ $s = 51; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 50: - /* */ if (http2VerboseLogs) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (http2VerboseLogs) { */ case 52: - _arg$1 = cc; - _r$13 = http2summarizeFrame(f); /* */ $s = 54; case 54: if($c) { $c = false; _r$13 = _r$13.$blk(); } if (_r$13 && _r$13.$blk !== undefined) { break s; } - _arg$2 = new $String(_r$13); - _arg$3 = err; - $r = cc.vlogf("http2: Transport conn %p received error from processing frame %v: %v", new sliceType([_arg$1, _arg$2, _arg$3])); /* */ $s = 55; case 55: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 53: - $24r$2 = err; - $s = 56; case 56: return $24r$2; - /* } */ case 51: - $s = 4; continue; - case 5: - $s = -1; return $ifaceNil; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.run, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _arg$2, _arg$3, _r$1, _r$10, _r$11, _r$12, _r$13, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _ref, _tuple, _tuple$1, _tuple$2, cc, cs, err, f, f$1, f$2, f$3, f$4, f$5, f$6, f$7, f$8, f$9, gotSettings, ok, ok$1, readIdleTimeout, rl, se, t, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.run = function() { return this.$val.run(); }; - http2clientConnReadLoop.ptr.prototype.processHeaders = function(f) { - var {$24r, _r$1, _r$2, _r$3, _tuple, _tuple$1, cs, err, f, ok, res, rl, x$5, x$6, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - _r$1 = rl.streamByID(f.http2HeadersFrame.http2FrameHeader.StreamID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cs = _r$1; - if (cs === ptrType$104.nil) { - $s = -1; return $ifaceNil; - } - /* */ if (cs.readClosed) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (cs.readClosed) { */ case 2: - $r = rl.endStreamError(cs, (x$5 = new http2StreamError.ptr(f.http2HeadersFrame.http2FrameHeader.StreamID, 1, errors.New("protocol error: headers after END_STREAM")), new x$5.constructor.elem(x$5))); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 3: - /* */ if (!cs.firstByte) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!cs.firstByte) { */ case 5: - /* */ if (!(cs.trace === ptrType$19.nil)) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!(cs.trace === ptrType$19.nil)) { */ case 7: - $r = http2traceFirstResponseByte(cs.trace); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 8: - cs.firstByte = true; - /* } */ case 6: - /* */ if (!cs.pastHeaders) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!cs.pastHeaders) { */ case 10: - cs.pastHeaders = true; - $s = 12; continue; - /* } else { */ case 11: - _r$2 = rl.processTrailers(cs, f); /* */ $s = 13; case 13: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 14; case 14: return $24r; - /* } */ case 12: - _r$3 = rl.handleResponse(cs, f); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - res = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 16: - _tuple$1 = $assertType(err, http2ConnectionError, true); - ok = _tuple$1[1]; - if (ok) { - $s = -1; return err; - } - $r = rl.endStreamError(cs, (x$6 = new http2StreamError.ptr(f.http2HeadersFrame.http2FrameHeader.StreamID, 1, err), new x$6.constructor.elem(x$6))); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 17: - if (res === ptrType$18.nil) { - $s = -1; return $ifaceNil; - } - cs.resTrailer = (res.$ptr_Trailer || (res.$ptr_Trailer = new ptrType$38(function() { return this.$target.Trailer; }, function($v) { this.$target.Trailer = $v; }, res))); - cs.res = res; - $close(cs.respHeaderRecv); - /* */ if (f.http2HeadersFrame.StreamEnded()) { $s = 19; continue; } - /* */ $s = 20; continue; - /* if (f.http2HeadersFrame.StreamEnded()) { */ case 19: - $r = rl.endStream(cs); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 20: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processHeaders, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, _tuple$1, cs, err, f, ok, res, rl, x$5, x$6, $s};return $f; - }; - http2clientConnReadLoop.prototype.processHeaders = function(f) { return this.$val.processHeaders(f); }; - http2clientConnReadLoop.ptr.prototype.handleResponse = function(cs, f) { - var {_entry, _entry$1, _i, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _ref, _selection, _tmp, _tmp$1, _tuple, _tuple$1, _v, cl, clens, cs, err, err$1, err$2, f, fn, header, hf, key, regularFields, res, rl, status, statusCode, strs, t, vv, x$5, x$6, x$7, x$8, $s, $r, $c} = $restore(this, {cs, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - if (f.Truncated) { - $s = -1; return [ptrType$18.nil, http2errResponseHeaderListSize]; - } - status = f.PseudoValue("status"); - if (status === "") { - $s = -1; return [ptrType$18.nil, errors.New("malformed response from server: missing status pseudo header")]; - } - _tuple = strconv.Atoi(status); - statusCode = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType$18.nil, errors.New("malformed response from server: malformed non-numeric status pseudo header")]; - } - regularFields = f.RegularFields(); - strs = $makeSlice(sliceType$2, regularFields.$length); - header = (x$5 = regularFields.$length, ((x$5 < 0 || x$5 > 2147483647) ? $throwRuntimeError("makemap: size out of range") : {})); - res = new Response.ptr(status + " " + StatusText(statusCode), statusCode, "HTTP/2.0", 2, 0, header, $ifaceNil, new $Int64(0, 0), sliceType$2.nil, false, false, false, ptrType$11.nil, ptrType$28.nil); - _ref = regularFields; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - t = [t]; - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - _r$1 = CanonicalHeaderKey(hf.Name); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - key = _r$1; - /* */ if (key === "Trailer") { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (key === "Trailer") { */ case 4: - t[0] = res.Trailer; - if (t[0] === false) { - t[0] = {}; - res.Trailer = t[0]; - } - $r = http2foreachHeaderElement(hf.Value, (function(t) { return function $b(v) { - var {_key, _r$2, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$2 = CanonicalHeaderKey(v); /* */ $s = 1; case 1: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _key = _r$2; (t[0] || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: sliceType$2.nil }; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _key, _r$2, v, $s};return $f; - }; })(t)); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; continue; - /* } else { */ case 5: - vv = (_entry = header[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (vv === sliceType$2.nil && strs.$length > 0) { - _tmp = $subslice(strs, 0, 1, 1); - _tmp$1 = $subslice(strs, 1); - vv = _tmp; - strs = _tmp$1; - (0 >= vv.$length ? ($throwRuntimeError("index out of range"), undefined) : vv.$array[vv.$offset + 0] = hf.Value); - _key = key; (header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - } else { - _key$1 = key; (header || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key$1)] = { k: _key$1, v: $append(vv, hf.Value) }; - } - /* } */ case 6: - _i++; - $s = 1; continue; - case 2: - /* */ if (statusCode >= 100 && statusCode <= 199) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (statusCode >= 100 && statusCode <= 199) { */ case 8: - if (f.http2HeadersFrame.StreamEnded()) { - $s = -1; return [ptrType$18.nil, errors.New("1xx informational response with END_STREAM flag")]; - } - cs.num1xx = cs.num1xx + (1) << 24 >>> 24; - if (cs.num1xx > 5) { - $s = -1; return [ptrType$18.nil, errors.New("http2: too many 1xx informational responses")]; - } - fn = cs.get1xxTraceFunc(); - /* */ if (!(fn === $throwNilPointerError)) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (!(fn === $throwNilPointerError)) { */ case 10: - _r$2 = fn(statusCode, (header)); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - $s = -1; return [ptrType$18.nil, err$1]; - } - /* } */ case 11: - /* */ if (statusCode === 100) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (statusCode === 100) { */ case 13: - $r = http2traceGot100Continue(cs.trace); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _selection = $select([[cs.on100, new structType.ptr()], []]); - if (_selection[0] === 0) { - } else if (_selection[0] === 1) { - } - /* } */ case 14: - cs.pastHeaders = false; - $s = -1; return [ptrType$18.nil, $ifaceNil]; - /* } */ case 9: - res.ContentLength = new $Int64(-1, 4294967295); - clens = (_entry$1 = res.Header[$String.keyFor("Content-Length")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - if (clens.$length === 1) { - _tuple$1 = strconv.ParseUint((0 >= clens.$length ? ($throwRuntimeError("index out of range"), undefined) : clens.$array[clens.$offset + 0]), 10, 63); - cl = _tuple$1[0]; - err$2 = _tuple$1[1]; - if ($interfaceIsEqual(err$2, $ifaceNil)) { - res.ContentLength = (new $Int64(cl.$high, cl.$low)); - } else { - } - } else if (clens.$length > 1) { - } else if (f.http2HeadersFrame.StreamEnded() && !cs.isHead) { - res.ContentLength = new $Int64(0, 0); - } - if (cs.isHead) { - res.Body = http2noBody; - $s = -1; return [res, $ifaceNil]; - } - if (f.http2HeadersFrame.StreamEnded()) { - if ((x$6 = res.ContentLength, (x$6.$high > 0 || (x$6.$high === 0 && x$6.$low > 0)))) { - res.Body = (x$7 = new http2missingBody.ptr(), new x$7.constructor.elem(x$7)); - } else { - res.Body = http2noBody; - } - $s = -1; return [res, $ifaceNil]; - } - $r = cs.bufPipe.setBuffer(new http2dataBuffer.ptr(sliceType$5.nil, 0, 0, 0, res.ContentLength)); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cs.bytesRemain = res.ContentLength; - res.Body = (x$8 = new http2transportResponseBody.ptr(cs), new x$8.constructor.elem(x$8)); - if (!(cs.requestedGzip)) { _v = false; $s = 19; continue s; } - _r$3 = new Header(res.Header).Get("Content-Encoding"); /* */ $s = 20; case 20: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = http2asciiEqualFold(_r$3, "gzip"); /* */ $s = 21; case 21: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _v = _r$4; case 19: - /* */ if (_v) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_v) { */ case 17: - $r = new Header(res.Header).Del("Content-Encoding"); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = new Header(res.Header).Del("Content-Length"); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - res.ContentLength = new $Int64(-1, 4294967295); - res.Body = new http2gzipReader.ptr(arrayType.zero(), res.Body, ptrType$33.nil, $ifaceNil); - res.Uncompressed = true; - /* } */ case 18: - $s = -1; return [res, $ifaceNil]; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.handleResponse, $c: true, $r, _entry, _entry$1, _i, _key, _key$1, _r$1, _r$2, _r$3, _r$4, _ref, _selection, _tmp, _tmp$1, _tuple, _tuple$1, _v, cl, clens, cs, err, err$1, err$2, f, fn, header, hf, key, regularFields, res, rl, status, statusCode, strs, t, vv, x$5, x$6, x$7, x$8, $s};return $f; - }; - http2clientConnReadLoop.prototype.handleResponse = function(cs, f) { return this.$val.handleResponse(cs, f); }; - http2clientConnReadLoop.ptr.prototype.processTrailers = function(cs, f) { - var {_entry, _i, _key, _r$1, _ref, cs, f, hf, key, rl, trailer, $s, $r, $c} = $restore(this, {cs, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - if (cs.pastTrailers) { - $s = -1; return new http2ConnectionError(1); - } - cs.pastTrailers = true; - if (!f.http2HeadersFrame.StreamEnded()) { - $s = -1; return new http2ConnectionError(1); - } - if (f.PseudoFields().$length > 0) { - $s = -1; return new http2ConnectionError(1); - } - trailer = {}; - _ref = f.RegularFields(); - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - hf = $clone(((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]), hpack.HeaderField); - _r$1 = CanonicalHeaderKey(hf.Name); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - key = _r$1; - _key = key; (trailer || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: $append((_entry = trailer[$String.keyFor(key)], _entry !== undefined ? _entry.v : sliceType$2.nil), hf.Value) }; - _i++; - $s = 1; continue; - case 2: - cs.trailer = trailer; - $r = rl.endStream(cs); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processTrailers, $c: true, $r, _entry, _i, _key, _r$1, _ref, cs, f, hf, key, rl, trailer, $s};return $f; - }; - http2clientConnReadLoop.prototype.processTrailers = function(cs, f) { return this.$val.processTrailers(cs, f); }; - http2transportResponseBody.ptr.prototype.Read = function(p) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, cc, connAdd, cs, err, n, p, streamAdd, v, v$1, x$10, x$11, x$12, x$5, x$6, x$7, x$8, x$9, $s, $deferred, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - n = 0; - err = $ifaceNil; - b = this; - cs = b.cs; - cc = cs.cc; - /* */ if (!($interfaceIsEqual(cs.readErr, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(cs.readErr, $ifaceNil))) { */ case 1: - _tmp = 0; - _tmp$1 = cs.readErr; - n = _tmp; - err = _tmp$1; - $24r = [n, err]; - $s = 3; case 3: return $24r; - /* } */ case 2: - _r$1 = b.cs.bufPipe.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - n = _tuple[0]; - err = _tuple[1]; - /* */ if (!((x$5 = cs.bytesRemain, (x$5.$high === -1 && x$5.$low === 4294967295)))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!((x$5 = cs.bytesRemain, (x$5.$high === -1 && x$5.$low === 4294967295)))) { */ case 5: - /* */ if ((x$6 = (new $Int64(0, n)), x$7 = cs.bytesRemain, (x$6.$high > x$7.$high || (x$6.$high === x$7.$high && x$6.$low > x$7.$low)))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if ((x$6 = (new $Int64(0, n)), x$7 = cs.bytesRemain, (x$6.$high > x$7.$high || (x$6.$high === x$7.$high && x$6.$low > x$7.$low)))) { */ case 7: - n = (((x$8 = cs.bytesRemain, x$8.$low + ((x$8.$high >> 31) * 4294967296)) >> 0)); - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 9: - err = errors.New("net/http: server replied with more than declared Content-Length; truncated"); - $r = cs.abortStream(err); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - cs.readErr = err; - _tmp$2 = (((x$9 = cs.bytesRemain, x$9.$low + ((x$9.$high >> 31) * 4294967296)) >> 0)); - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $24r$1 = [n, err]; - $s = 12; case 12: return $24r$1; - /* } */ case 8: - cs.bytesRemain = (x$10 = cs.bytesRemain, x$11 = (new $Int64(0, n)), new $Int64(x$10.$high - x$11.$high, x$10.$low - x$11.$low)); - /* */ if ($interfaceIsEqual(err, io.EOF) && (x$12 = cs.bytesRemain, (x$12.$high > 0 || (x$12.$high === 0 && x$12.$low > 0)))) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if ($interfaceIsEqual(err, io.EOF) && (x$12 = cs.bytesRemain, (x$12.$high > 0 || (x$12.$high === 0 && x$12.$low > 0)))) { */ case 13: - err = io.ErrUnexpectedEOF; - cs.readErr = err; - _tmp$4 = n; - _tmp$5 = err; - n = _tmp$4; - err = _tmp$5; - $24r$2 = [n, err]; - $s = 15; case 15: return $24r$2; - /* } */ case 14: - /* } */ case 6: - /* */ if (n === 0) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (n === 0) { */ case 16: - $24r$3 = [n, err]; - $s = 18; case 18: return $24r$3; - /* } */ case 17: - $r = cc.mu.Lock(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tmp$6 = 0; - _tmp$7 = 0; - connAdd = _tmp$6; - streamAdd = _tmp$7; - v = cc.inflow.available(); - if (v < 536870912) { - connAdd = 1073741824 - v >> 0; - cc.inflow.add(connAdd); - } - /* */ if ($interfaceIsEqual(err, $ifaceNil)) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if ($interfaceIsEqual(err, $ifaceNil)) { */ case 20: - _r$2 = cs.bufPipe.Len(); /* */ $s = 22; case 22: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - v$1 = ((cs.inflow.available() >> 0)) + _r$2 >> 0; - if (v$1 < 4190208) { - streamAdd = (((4194304 - v$1 >> 0) >> 0)); - cs.inflow.add(streamAdd); - } - /* } */ case 21: - $r = cc.mu.Unlock(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((connAdd === 0)) || !((streamAdd === 0))) { $s = 24; continue; } - /* */ $s = 25; continue; - /* if (!((connAdd === 0)) || !((streamAdd === 0))) { */ case 24: - $r = cc.wmu.Lock(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); - /* */ if (!((connAdd === 0))) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (!((connAdd === 0))) { */ case 27: - _r$3 = cc.fr.WriteWindowUpdate(0, http2mustUint31(connAdd)); /* */ $s = 29; case 29: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 28: - /* */ if (!((streamAdd === 0))) { $s = 30; continue; } - /* */ $s = 31; continue; - /* if (!((streamAdd === 0))) { */ case 30: - _r$4 = cc.fr.WriteWindowUpdate(cs.ID, http2mustUint31(streamAdd)); /* */ $s = 32; case 32: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 31: - _r$5 = cc.bw.Flush(); /* */ $s = 33; case 33: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 25: - $24r$4 = [n, err]; - $s = 34; case 34: return $24r$4; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return [n, err]; } if($curGoroutine.asleep) { var $f = {$blk: http2transportResponseBody.ptr.prototype.Read, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, _r$1, _r$2, _r$3, _r$4, _r$5, _tmp, _tmp$1, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tuple, b, cc, connAdd, cs, err, n, p, streamAdd, v, v$1, x$10, x$11, x$12, x$5, x$6, x$7, x$8, x$9, $s, $deferred};return $f; } } - }; - http2transportResponseBody.prototype.Read = function(p) { return this.$val.Read(p); }; - http2transportResponseBody.ptr.prototype.Close = function() { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _selection, b, cc, cs, unread, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - b = this; - cs = b.cs; - cc = cs.cc; - _r$1 = cs.bufPipe.Len(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - unread = _r$1; - /* */ if (unread > 0) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (unread > 0) { */ case 2: - $r = cc.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (unread > 0) { - cc.inflow.add(((unread >> 0))); - } - $r = cc.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cc.wmu.Lock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (unread > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (unread > 0) { */ case 7: - _r$2 = cc.fr.WriteWindowUpdate(0, ((unread >>> 0))); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - /* } */ case 8: - _r$3 = cc.bw.Flush(); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $r = cc.wmu.Unlock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $r = cs.bufPipe.BreakWithError(http2errClosedResponseBody); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cs.abortStream(http2errClosedResponseBody); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = cs.ctx.Done(); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = $select([[cs.donec], [_r$4], [cs.reqCancel]]); /* */ $s = 15; case 15: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _selection = _r$5; - /* */ if (_selection[0] === 0) { $s = 16; continue; } - /* */ if (_selection[0] === 1) { $s = 17; continue; } - /* */ if (_selection[0] === 2) { $s = 18; continue; } - /* */ $s = 19; continue; - /* if (_selection[0] === 0) { */ case 16: - $s = 19; continue; - /* } else if (_selection[0] === 1) { */ case 17: - $s = -1; return $ifaceNil; - /* } else if (_selection[0] === 2) { */ case 18: - $s = -1; return http2errRequestCanceled; - /* } */ case 19: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2transportResponseBody.ptr.prototype.Close, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _selection, b, cc, cs, unread, $s};return $f; - }; - http2transportResponseBody.prototype.Close = function() { return this.$val.Close(); }; - http2clientConnReadLoop.ptr.prototype.processData = function(f) { - var {_r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, cc, cs, data, didReset, err, f, neverSent, pad, refund, rl, x$5, x$6, x$7, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - cc = rl.cc; - _r$1 = rl.streamByID(f.http2FrameHeader.StreamID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cs = _r$1; - data = f.Data(); - /* */ if (cs === ptrType$104.nil) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (cs === ptrType$104.nil) { */ case 2: - $r = cc.mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - neverSent = cc.nextStreamID; - $r = cc.mu.Unlock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (f.http2FrameHeader.StreamID >= neverSent) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (f.http2FrameHeader.StreamID >= neverSent) { */ case 6: - $r = cc.logf("http2: Transport received unsolicited DATA frame; closing connection", new sliceType([])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new http2ConnectionError(1); - /* } */ case 7: - /* */ if (f.http2FrameHeader.Length > 0) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (f.http2FrameHeader.Length > 0) { */ case 9: - $r = cc.mu.Lock(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cc.inflow.add(((f.http2FrameHeader.Length >> 0))); - $r = cc.mu.Unlock(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cc.wmu.Lock(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = cc.fr.WriteWindowUpdate(0, (f.http2FrameHeader.Length)); /* */ $s = 14; case 14: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = cc.bw.Flush(); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $r = cc.wmu.Unlock(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - $s = -1; return $ifaceNil; - /* } */ case 3: - /* */ if (cs.readClosed) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (cs.readClosed) { */ case 17: - $r = cc.logf("protocol error: received DATA after END_STREAM", new sliceType([])); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rl.endStreamError(cs, (x$5 = new http2StreamError.ptr(f.http2FrameHeader.StreamID, 1, $ifaceNil), new x$5.constructor.elem(x$5))); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 18: - /* */ if (!cs.firstByte) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (!cs.firstByte) { */ case 21: - $r = cc.logf("protocol error: received DATA before a HEADERS frame", new sliceType([])); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rl.endStreamError(cs, (x$6 = new http2StreamError.ptr(f.http2FrameHeader.StreamID, 1, $ifaceNil), new x$6.constructor.elem(x$6))); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 22: - /* */ if (f.http2FrameHeader.Length > 0) { $s = 25; continue; } - /* */ $s = 26; continue; - /* if (f.http2FrameHeader.Length > 0) { */ case 25: - /* */ if (cs.isHead && data.$length > 0) { $s = 27; continue; } - /* */ $s = 28; continue; - /* if (cs.isHead && data.$length > 0) { */ case 27: - $r = cc.logf("protocol error: received DATA on a HEAD request", new sliceType([])); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rl.endStreamError(cs, (x$7 = new http2StreamError.ptr(f.http2FrameHeader.StreamID, 1, $ifaceNil), new x$7.constructor.elem(x$7))); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 28: - $r = cc.mu.Lock(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (cs.inflow.available() >= ((f.http2FrameHeader.Length >> 0))) { $s = 32; continue; } - /* */ $s = 33; continue; - /* if (cs.inflow.available() >= ((f.http2FrameHeader.Length >> 0))) { */ case 32: - cs.inflow.take(((f.http2FrameHeader.Length >> 0))); - $s = 34; continue; - /* } else { */ case 33: - $r = cc.mu.Unlock(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return new http2ConnectionError(3); - /* } */ case 34: - refund = 0; - pad = ((f.http2FrameHeader.Length >> 0)) - data.$length >> 0; - if (pad > 0) { - refund = refund + (pad) >> 0; - } - didReset = false; - err = $ifaceNil; - /* */ if (data.$length > 0) { $s = 36; continue; } - /* */ $s = 37; continue; - /* if (data.$length > 0) { */ case 36: - _r$4 = cs.bufPipe.Write(data); /* */ $s = 38; case 38: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple = _r$4; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - didReset = true; - refund = refund + (data.$length) >> 0; - } - /* } */ case 37: - if (refund > 0) { - cc.inflow.add(((refund >> 0))); - if (!didReset) { - cs.inflow.add(((refund >> 0))); - } - } - $r = cc.mu.Unlock(); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (refund > 0) { $s = 40; continue; } - /* */ $s = 41; continue; - /* if (refund > 0) { */ case 40: - $r = cc.wmu.Lock(); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$5 = cc.fr.WriteWindowUpdate(0, ((refund >>> 0))); /* */ $s = 43; case 43: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* */ if (!didReset) { $s = 44; continue; } - /* */ $s = 45; continue; - /* if (!didReset) { */ case 44: - _r$6 = cc.fr.WriteWindowUpdate(cs.ID, ((refund >>> 0))); /* */ $s = 46; case 46: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _r$6; - /* } */ case 45: - _r$7 = cc.bw.Flush(); /* */ $s = 47; case 47: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - $r = cc.wmu.Unlock(); /* */ $s = 48; case 48: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 41: - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 49; continue; } - /* */ $s = 50; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 49: - $r = rl.endStreamError(cs, err); /* */ $s = 51; case 51: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* } */ case 50: - /* } */ case 26: - /* */ if (f.StreamEnded()) { $s = 52; continue; } - /* */ $s = 53; continue; - /* if (f.StreamEnded()) { */ case 52: - $r = rl.endStream(cs); /* */ $s = 54; case 54: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 53: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processData, $c: true, $r, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _tuple, cc, cs, data, didReset, err, f, neverSent, pad, refund, rl, x$5, x$6, x$7, $s};return $f; - }; - http2clientConnReadLoop.prototype.processData = function(f) { return this.$val.processData(f); }; - http2clientConnReadLoop.ptr.prototype.endStream = function(cs) { - var {cs, rl, $s, $deferred, $r, $c} = $restore(this, {cs}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - /* */ if (!cs.readClosed) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!cs.readClosed) { */ case 1: - cs.readClosed = true; - $r = rl.cc.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(rl.cc.mu, "Unlock"), []]); - $r = cs.bufPipe.closeWithErrorAndCode(io.EOF, $methodVal(cs, "copyTrailers")); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $close(cs.peerClosed); - /* } */ case 2: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.endStream, $c: true, $r, cs, rl, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.endStream = function(cs) { return this.$val.endStream(cs); }; - http2clientConnReadLoop.ptr.prototype.endStreamError = function(cs, err) { - var {cs, err, rl, $s, $r, $c} = $restore(this, {cs, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - cs.readAborted = true; - $r = cs.abortStream(err); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.endStreamError, $c: true, $r, cs, err, rl, $s};return $f; - }; - http2clientConnReadLoop.prototype.endStreamError = function(cs, err) { return this.$val.endStreamError(cs, err); }; - http2clientConnReadLoop.ptr.prototype.streamByID = function(id) { - var {$24r, $24r$1, _entry, cs, id, rl, $s, $deferred, $r, $c} = $restore(this, {id}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - $r = rl.cc.mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(rl.cc.mu, "Unlock"), []]); - cs = (_entry = rl.cc.streams[$Uint32.keyFor(id)], _entry !== undefined ? _entry.v : ptrType$104.nil); - /* */ if (!(cs === ptrType$104.nil) && !cs.readAborted) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(cs === ptrType$104.nil) && !cs.readAborted) { */ case 2: - $24r = cs; - $s = 4; case 4: return $24r; - /* } */ case 3: - $24r$1 = ptrType$104.nil; - $s = 5; case 5: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return ptrType$104.nil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.streamByID, $c: true, $r, $24r, $24r$1, _entry, cs, id, rl, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.streamByID = function(id) { return this.$val.streamByID(id); }; - http2clientStream.ptr.prototype.copyTrailers = function() { - var _entry, _i, _key, _keys, _ref, cs, k, t, vv; - cs = this; - _ref = cs.trailer; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - t = cs.resTrailer; - if (t.$get() === false) { - t.$set({}); - } - _key = k; (t.$get() || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv }; - _i++; - } - }; - http2clientStream.prototype.copyTrailers = function() { return this.$val.copyTrailers(); }; - http2clientConnReadLoop.ptr.prototype.processGoAway = function(f) { - var {_r$1, _r$2, cc, f, fn, rl, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - cc = rl.cc; - _r$1 = cc.t.connPool(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $r = _r$1.MarkDead(cc); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!((f.ErrCode === 0))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((f.ErrCode === 0))) { */ case 3: - $r = cc.vlogf("transport got GOAWAY with error code = %v", new sliceType([new http2ErrCode(f.ErrCode)])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - fn = cc.t.CountError; - /* */ if (!(fn === $throwNilPointerError)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(fn === $throwNilPointerError)) { */ case 6: - _r$2 = new http2ErrCode(f.ErrCode).stringToken(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = fn("recv_goaway_" + _r$2); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - /* } */ case 4: - $r = cc.setGoAway(f); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processGoAway, $c: true, $r, _r$1, _r$2, cc, f, fn, rl, $s};return $f; - }; - http2clientConnReadLoop.prototype.processGoAway = function(f) { return this.$val.processGoAway(f); }; - http2clientConnReadLoop.ptr.prototype.processSettings = function(f) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, cc, err, f, rl, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - cc = rl.cc; - $r = cc.wmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.wmu, "Unlock"), []]); - _r$1 = rl.processSettingsNoWrite(f); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 3: - $24r = err; - $s = 5; case 5: return $24r; - /* } */ case 4: - /* */ if (!f.IsAck()) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!f.IsAck()) { */ case 6: - _r$2 = cc.fr.WriteSettingsAck(); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - _r$3 = cc.bw.Flush(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* } */ case 7: - $24r$1 = $ifaceNil; - $s = 10; case 10: return $24r$1; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processSettings, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, cc, err, f, rl, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.processSettings = function(f) { return this.$val.processSettings(f); }; - http2clientConnReadLoop.ptr.prototype.processSettingsNoWrite = function(f) { - var {$24r, $24r$1, $24r$2, $24r$3, _r$1, cc, err, f, rl, seenMaxConcurrentStreams, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - cc = [cc]; - seenMaxConcurrentStreams = [seenMaxConcurrentStreams]; - rl = this; - cc[0] = rl.cc; - $r = cc[0].mu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc[0].mu, "Unlock"), []]); - /* */ if (f.IsAck()) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (f.IsAck()) { */ case 2: - /* */ if (cc[0].wantSettingsAck) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (cc[0].wantSettingsAck) { */ case 4: - cc[0].wantSettingsAck = false; - $24r = $ifaceNil; - $s = 6; case 6: return $24r; - /* } */ case 5: - $24r$1 = new http2ConnectionError(1); - $s = 7; case 7: return $24r$1; - /* } */ case 3: - seenMaxConcurrentStreams[0] = false; - _r$1 = f.ForeachSetting((function(cc, seenMaxConcurrentStreams) { return function $b(s) { - var {_1, _entry, _i, _keys, _ref, cs, delta, s, $s, $r, $c} = $restore(this, {s}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _1 = s.ID; - /* */ if (_1 === (5)) { $s = 2; continue; } - /* */ if (_1 === (3)) { $s = 3; continue; } - /* */ if (_1 === (6)) { $s = 4; continue; } - /* */ if (_1 === (4)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (_1 === (5)) { */ case 2: - cc[0].maxFrameSize = s.Val; - $s = 7; continue; - /* } else if (_1 === (3)) { */ case 3: - cc[0].maxConcurrentStreams = s.Val; - seenMaxConcurrentStreams[0] = true; - $s = 7; continue; - /* } else if (_1 === (6)) { */ case 4: - cc[0].peerMaxHeaderListSize = (new $Uint64(0, s.Val)); - $s = 7; continue; - /* } else if (_1 === (4)) { */ case 5: - if (s.Val > 2147483647) { - $s = -1; return new http2ConnectionError(3); - } - delta = ((s.Val >> 0)) - ((cc[0].initialWindowSize >> 0)) >> 0; - _ref = cc[0].streams; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - cs = _entry.v; - cs.flow.add(delta); - _i++; - } - $r = cc[0].cond.Broadcast(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - cc[0].initialWindowSize = s.Val; - $s = 7; continue; - /* } else { */ case 6: - $r = cc[0].vlogf("Unhandled Setting: %v", new sliceType([new s.constructor.elem(s)])); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - case 1: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _1, _entry, _i, _keys, _ref, cs, delta, s, $s};return $f; - }; })(cc, seenMaxConcurrentStreams)); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 9: - $24r$2 = err; - $s = 11; case 11: return $24r$2; - /* } */ case 10: - if (!cc[0].seenSettings) { - if (!seenMaxConcurrentStreams[0]) { - cc[0].maxConcurrentStreams = 1000; - } - cc[0].seenSettings = true; - } - $24r$3 = $ifaceNil; - $s = 12; case 12: return $24r$3; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processSettingsNoWrite, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, _r$1, cc, err, f, rl, seenMaxConcurrentStreams, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.processSettingsNoWrite = function(f) { return this.$val.processSettingsNoWrite(f); }; - http2clientConnReadLoop.ptr.prototype.processWindowUpdate = function(f) { - var {$24r, $24r$1, $24r$2, _r$1, cc, cs, f, fl, rl, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - cc = rl.cc; - _r$1 = rl.streamByID(f.http2FrameHeader.StreamID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cs = _r$1; - /* */ if (!((f.http2FrameHeader.StreamID === 0)) && cs === ptrType$104.nil) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((f.http2FrameHeader.StreamID === 0)) && cs === ptrType$104.nil) { */ case 2: - $24r = $ifaceNil; - $s = 4; case 4: return $24r; - /* } */ case 3: - $r = cc.mu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - fl = cc.flow; - if (!(cs === ptrType$104.nil)) { - fl = cs.flow; - } - /* */ if (!fl.add(((f.Increment >> 0)))) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!fl.add(((f.Increment >> 0)))) { */ case 6: - $24r$1 = new http2ConnectionError(3); - $s = 8; case 8: return $24r$1; - /* } */ case 7: - $r = cc.cond.Broadcast(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $24r$2 = $ifaceNil; - $s = 10; case 10: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processWindowUpdate, $c: true, $r, $24r, $24r$1, $24r$2, _r$1, cc, cs, f, fl, rl, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.processWindowUpdate = function(f) { return this.$val.processWindowUpdate(f); }; - http2clientConnReadLoop.ptr.prototype.processResetStream = function(f) { - var {_r$1, _r$2, cs, f, fn, rl, serr, $s, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rl = this; - _r$1 = rl.streamByID(f.http2FrameHeader.StreamID); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - cs = _r$1; - if (cs === ptrType$104.nil) { - $s = -1; return $ifaceNil; - } - serr = $clone(http2streamError(cs.ID, f.ErrCode), http2StreamError); - serr.Cause = http2errFromPeer; - /* */ if (f.ErrCode === 1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (f.ErrCode === 1) { */ case 2: - $r = rl.cc.SetDoNotReuse(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - fn = cs.cc.t.CountError; - /* */ if (!(fn === $throwNilPointerError)) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(fn === $throwNilPointerError)) { */ case 5: - _r$2 = new http2ErrCode(f.ErrCode).stringToken(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $r = fn("recv_rststream_" + _r$2); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 6: - $r = cs.abortStream(new serr.constructor.elem(serr)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = cs.bufPipe.CloseWithError(new serr.constructor.elem(serr)); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processResetStream, $c: true, $r, _r$1, _r$2, cs, f, fn, rl, serr, $s};return $f; - }; - http2clientConnReadLoop.prototype.processResetStream = function(f) { return this.$val.processResetStream(f); }; - http2ClientConn.ptr.prototype.Ping = function(ctx) { - var {$24r, _entry, _key, _r$1, _r$2, _r$3, _r$4, _selection, _tuple, _tuple$1, c, cc, ctx, err, err$1, errc, found, p, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = [cc]; - errc = [errc]; - p = [p]; - cc[0] = this; - c = new $Chan(structType, 0); - p[0] = arrayType$8.zero(); - /* while (true) { */ case 1: - _r$1 = rand$1.Read(new sliceType$3(p[0])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $r = cc[0].mu.Lock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$1 = (_entry = cc[0].pings[arrayType$8.keyFor(p[0])], _entry !== undefined ? [_entry.v, true] : [$chanNil, false]); - found = _tuple$1[1]; - /* */ if (!found) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!found) { */ case 5: - _key = $clone(p[0], arrayType$8); (cc[0].pings || $throwRuntimeError("assignment to entry in nil map"))[arrayType$8.keyFor(_key)] = { k: _key, v: c }; - $r = cc[0].mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 2; continue; - /* } */ case 6: - $r = cc[0].mu.Unlock(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 1; continue; - case 2: - errc[0] = new $Chan($error, 1); - $go((function(cc, errc, p) { return function $b() { - var {_r$2, _r$3, err$1, err$2, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = cc[0].wmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc[0].wmu, "Unlock"), []]); - _r$2 = cc[0].fr.WritePing(false, $clone(p[0], arrayType$8)); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err$1 = _r$2; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 3: - $r = $send(errc[0], err$1); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 6; case 6: return; - /* } */ case 4: - _r$3 = cc[0].bw.Flush(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - err$2 = _r$3; - /* */ if (!($interfaceIsEqual(err$2, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(err$2, $ifaceNil))) { */ case 8: - $r = $send(errc[0], err$2); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = 11; case 11: return; - /* } */ case 9: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: $b, $c: true, $r, _r$2, _r$3, err$1, err$2, $s, $deferred};return $f; } } - }; })(cc, errc, p), []); - _r$2 = ctx.Done(); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $select([[c], [errc[0]], [_r$2], [cc[0].readerDone]]); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _selection = _r$3; - /* */ if (_selection[0] === 0) { $s = 11; continue; } - /* */ if (_selection[0] === 1) { $s = 12; continue; } - /* */ if (_selection[0] === 2) { $s = 13; continue; } - /* */ if (_selection[0] === 3) { $s = 14; continue; } - /* */ $s = 15; continue; - /* if (_selection[0] === 0) { */ case 11: - $s = -1; return $ifaceNil; - /* } else if (_selection[0] === 1) { */ case 12: - err$1 = _selection[1][0]; - $s = -1; return err$1; - /* } else if (_selection[0] === 2) { */ case 13: - _r$4 = ctx.Err(); /* */ $s = 16; case 16: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r = _r$4; - $s = 17; case 17: return $24r; - /* } else if (_selection[0] === 3) { */ case 14: - $s = -1; return cc[0].readerErr; - /* } */ case 15: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.Ping, $c: true, $r, $24r, _entry, _key, _r$1, _r$2, _r$3, _r$4, _selection, _tuple, _tuple$1, c, cc, ctx, err, err$1, errc, found, p, $s};return $f; - }; - http2ClientConn.prototype.Ping = function(ctx) { return this.$val.Ping(ctx); }; - http2clientConnReadLoop.ptr.prototype.processPing = function(f) { - var {$24r, $24r$1, $24r$2, _entry, _r$1, _r$2, _tuple, c, cc, cc$1, err, f, ok, rl, $s, $deferred, $r, $c} = $restore(this, {f}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - rl = this; - /* */ if (f.IsAck()) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (f.IsAck()) { */ case 1: - cc = rl.cc; - $r = cc.mu.Lock(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc.mu, "Unlock"), []]); - _tuple = (_entry = cc.pings[arrayType$8.keyFor(f.Data)], _entry !== undefined ? [_entry.v, true] : [$chanNil, false]); - c = _tuple[0]; - ok = _tuple[1]; - if (ok) { - $close(c); - delete cc.pings[arrayType$8.keyFor(f.Data)]; - } - $24r = $ifaceNil; - $s = 4; case 4: return $24r; - /* } */ case 2: - cc$1 = rl.cc; - $r = cc$1.wmu.Lock(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(cc$1.wmu, "Unlock"), []]); - _r$1 = cc$1.fr.WritePing(true, $clone(f.Data, arrayType$8)); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 7: - $24r$1 = err; - $s = 9; case 9: return $24r$1; - /* } */ case 8: - _r$2 = cc$1.bw.Flush(); /* */ $s = 10; case 10: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = _r$2; - $s = 11; case 11: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return $ifaceNil; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2clientConnReadLoop.ptr.prototype.processPing, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _r$1, _r$2, _tuple, c, cc, cc$1, err, f, ok, rl, $s, $deferred};return $f; } } - }; - http2clientConnReadLoop.prototype.processPing = function(f) { return this.$val.processPing(f); }; - http2clientConnReadLoop.ptr.prototype.processPushPromise = function(f) { - var f, rl; - rl = this; - return new http2ConnectionError(1); - }; - http2clientConnReadLoop.prototype.processPushPromise = function(f) { return this.$val.processPushPromise(f); }; - http2ClientConn.ptr.prototype.writeStreamReset = function(streamID, code, err) { - var {_r$1, _r$2, cc, code, err, streamID, $s, $r, $c} = $restore(this, {streamID, code, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - $r = cc.wmu.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$1 = cc.fr.WriteRSTStream(streamID, code); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _r$2 = cc.bw.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $r = cc.wmu.Unlock(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.writeStreamReset, $c: true, $r, _r$1, _r$2, cc, code, err, streamID, $s};return $f; - }; - http2ClientConn.prototype.writeStreamReset = function(streamID, code, err) { return this.$val.writeStreamReset(streamID, code, err); }; - http2ClientConn.ptr.prototype.logf = function(format, args) { - var {args, cc, format, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - $r = cc.t.logf(format, args); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.logf, $c: true, $r, args, cc, format, $s};return $f; - }; - http2ClientConn.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; - http2ClientConn.ptr.prototype.vlogf = function(format, args) { - var {args, cc, format, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cc = this; - $r = cc.t.vlogf(format, args); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2ClientConn.ptr.prototype.vlogf, $c: true, $r, args, cc, format, $s};return $f; - }; - http2ClientConn.prototype.vlogf = function(format, args) { return this.$val.vlogf(format, args); }; - http2Transport.ptr.prototype.vlogf = function(format, args) { - var {args, format, t, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - /* */ if (http2VerboseLogs) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (http2VerboseLogs) { */ case 1: - $r = t.logf(format, args); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.vlogf, $c: true, $r, args, format, t, $s};return $f; - }; - http2Transport.prototype.vlogf = function(format, args) { return this.$val.vlogf(format, args); }; - http2Transport.ptr.prototype.logf = function(format, args) { - var {args, format, t, $s, $r, $c} = $restore(this, {format, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - t = this; - $r = log.Printf(format, args); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2Transport.ptr.prototype.logf, $c: true, $r, args, format, t, $s};return $f; - }; - http2Transport.prototype.logf = function(format, args) { return this.$val.logf(format, args); }; - http2missingBody.ptr.prototype.Close = function() { - return $ifaceNil; - }; - http2missingBody.prototype.Close = function() { return this.$val.Close(); }; - http2missingBody.ptr.prototype.Read = function(param) { - var param; - return [0, io.ErrUnexpectedEOF]; - }; - http2missingBody.prototype.Read = function(param) { return this.$val.Read(param); }; - http2strSliceContains = function(ss, s) { - var _i, _ref, s, ss, v; - _ref = ss; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - v = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (v === s) { - return true; - } - _i++; - } - return false; - }; - http2erringRoundTripper.ptr.prototype.RoundTripErr = function() { - var rt; - rt = this; - return rt.err; - }; - http2erringRoundTripper.prototype.RoundTripErr = function() { return this.$val.RoundTripErr(); }; - http2erringRoundTripper.ptr.prototype.RoundTrip = function(param) { - var param, rt; - rt = this; - return [ptrType$18.nil, rt.err]; - }; - http2erringRoundTripper.prototype.RoundTrip = function(param) { return this.$val.RoundTrip(param); }; - http2gzipReader.ptr.prototype.Read = function(p) { - var {$24r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, gz, n, p, $s, $r, $c} = $restore(this, {p}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = 0; - err = $ifaceNil; - gz = this; - if (!($interfaceIsEqual(gz.zerr, $ifaceNil))) { - _tmp = 0; - _tmp$1 = gz.zerr; - n = _tmp; - err = _tmp$1; - $s = -1; return [n, err]; - } - /* */ if (gz.zr === ptrType$33.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (gz.zr === ptrType$33.nil) { */ case 1: - _r$1 = gzip.NewReader(gz.body); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - gz.zr = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - gz.zerr = err; - _tmp$2 = 0; - _tmp$3 = err; - n = _tmp$2; - err = _tmp$3; - $s = -1; return [n, err]; - } - /* } */ case 2: - _r$2 = gz.zr.Read(p); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - n = _tuple$1[0]; - err = _tuple$1[1]; - $24r = [n, err]; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: http2gzipReader.ptr.prototype.Read, $c: true, $r, $24r, _r$1, _r$2, _tmp, _tmp$1, _tmp$2, _tmp$3, _tuple, _tuple$1, err, gz, n, p, $s};return $f; - }; - http2gzipReader.prototype.Read = function(p) { return this.$val.Read(p); }; - http2gzipReader.ptr.prototype.Close = function() { - var {$24r, _r$1, gz, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - gz = this; - _r$1 = gz.body.Close(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2gzipReader.ptr.prototype.Close, $c: true, $r, $24r, _r$1, gz, $s};return $f; - }; - http2gzipReader.prototype.Close = function() { return this.$val.Close(); }; - http2isConnectionCloseRequest = function(req) { - var _entry, req; - return req.Close || httpguts.HeaderValuesContainsToken((_entry = req.Header[$String.keyFor("Connection")], _entry !== undefined ? _entry.v : sliceType$2.nil), "close"); - }; - http2registerHTTPSProtocol = function(t, rt) { - var {$24r, err, rt, t, $s, $deferred, $r, $c} = $restore(this, {t, rt}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - err = [err]; - err[0] = $ifaceNil; - $deferred.push([(function(err) { return function $b() { - var {_r$1, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = $recover(); - /* */ if (!($interfaceIsEqual(e, $ifaceNil))) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!($interfaceIsEqual(e, $ifaceNil))) { */ case 1: - _r$1 = fmt.Errorf("%v", new sliceType([e])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err[0] = _r$1; - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r$1, e, $s};return $f; - }; })(err), []]); - $r = t.RegisterProtocol("https", new rt.constructor.elem(rt)); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - err[0] = $ifaceNil; - $24r = err[0]; - $s = 2; case 2: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if (!$curGoroutine.asleep) { return err[0]; } if($curGoroutine.asleep) { var $f = {$blk: http2registerHTTPSProtocol, $c: true, $r, $24r, err, rt, t, $s, $deferred};return $f; } } - }; - http2noDialH2RoundTripper.ptr.prototype.RoundTrip = function(req) { - var {_r$1, _tuple, err, req, res, rt, $s, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - rt = this; - _r$1 = rt.http2Transport.RoundTrip(req); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - res = _tuple[0]; - err = _tuple[1]; - if (http2isNoCachedConnError(err)) { - $s = -1; return [ptrType$18.nil, $pkg.ErrSkipAltProtocol]; - } - $s = -1; return [res, err]; - /* */ } return; } var $f = {$blk: http2noDialH2RoundTripper.ptr.prototype.RoundTrip, $c: true, $r, _r$1, _tuple, err, req, res, rt, $s};return $f; - }; - http2noDialH2RoundTripper.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; - http2Transport.ptr.prototype.idleConnTimeout = function() { - var t; - t = this; - if (!(t.t1 === ptrType$27.nil)) { - return t.t1.IdleConnTimeout; - } - return new time.Duration(0, 0); - }; - http2Transport.prototype.idleConnTimeout = function() { return this.$val.idleConnTimeout(); }; - http2traceGetConn = function(req, hostPort) { - var {_r$1, hostPort, req, trace, $s, $r, $c} = $restore(this, {req, hostPort}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = httptrace.ContextClientTrace(req.Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - trace = _r$1; - if (trace === ptrType$19.nil || trace.GetConn === $throwNilPointerError) { - $s = -1; return; - } - $r = trace.GetConn(hostPort); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceGetConn, $c: true, $r, _r$1, hostPort, req, trace, $s};return $f; - }; - http2traceGotConn = function(req, cc, reused) { - var {_r$1, _r$2, _r$3, cc, ci, req, reused, trace, $s, $r, $c} = $restore(this, {req, cc, reused}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = httptrace.ContextClientTrace(req.Context()); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - trace = _r$1; - if (trace === ptrType$19.nil || trace.GotConn === $throwNilPointerError) { - $s = -1; return; - } - ci = new httptrace.GotConnInfo.ptr(cc.tconn, false, false, new time.Duration(0, 0)); - ci.Reused = reused; - $r = cc.mu.Lock(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ci.WasIdle = ($keys(cc.streams).length === 0) && reused; - /* */ if (ci.WasIdle && !$clone(cc.lastActive, time.Time).IsZero()) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (ci.WasIdle && !$clone(cc.lastActive, time.Time).IsZero()) { */ case 3: - _r$2 = time.Now(); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = $clone(_r$2, time.Time).Sub($clone(cc.lastActive, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ci.IdleTime = _r$3; - /* } */ case 4: - $r = cc.mu.Unlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = trace.GotConn($clone(ci, httptrace.GotConnInfo)); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceGotConn, $c: true, $r, _r$1, _r$2, _r$3, cc, ci, req, reused, trace, $s};return $f; - }; - http2traceWroteHeaders = function(trace) { - var {trace, $s, $r, $c} = $restore(this, {trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteHeaders === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteHeaders === $throwNilPointerError)) { */ case 1: - $r = trace.WroteHeaders(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceWroteHeaders, $c: true, $r, trace, $s};return $f; - }; - http2traceGot100Continue = function(trace) { - var {trace, $s, $r, $c} = $restore(this, {trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace === ptrType$19.nil) && !(trace.Got100Continue === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.Got100Continue === $throwNilPointerError)) { */ case 1: - $r = trace.Got100Continue(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceGot100Continue, $c: true, $r, trace, $s};return $f; - }; - http2traceWait100Continue = function(trace) { - var {trace, $s, $r, $c} = $restore(this, {trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace === ptrType$19.nil) && !(trace.Wait100Continue === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.Wait100Continue === $throwNilPointerError)) { */ case 1: - $r = trace.Wait100Continue(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceWait100Continue, $c: true, $r, trace, $s};return $f; - }; - http2traceWroteRequest = function(trace, err) { - var {err, trace, $s, $r, $c} = $restore(this, {trace, err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace === ptrType$19.nil) && !(trace.WroteRequest === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.WroteRequest === $throwNilPointerError)) { */ case 1: - $r = trace.WroteRequest(new httptrace.WroteRequestInfo.ptr(err)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceWroteRequest, $c: true, $r, err, trace, $s};return $f; - }; - http2traceFirstResponseByte = function(trace) { - var {trace, $s, $r, $c} = $restore(this, {trace}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(trace === ptrType$19.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(trace === ptrType$19.nil) && !(trace.GotFirstResponseByte === $throwNilPointerError)) { */ case 1: - $r = trace.GotFirstResponseByte(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: http2traceFirstResponseByte, $c: true, $r, trace, $s};return $f; - }; - http2writeEndsStream = function(w) { - var _ref, v, v$1, v$2, w; - _ref = w; - if ($assertType(_ref, ptrType$92, true)[1]) { - v = _ref.$val; - return v.endStream; - } else if ($assertType(_ref, ptrType$93, true)[1]) { - v$1 = _ref.$val; - return v$1.endStream; - } else if (_ref === $ifaceNil) { - v$2 = _ref; - $panic(new $String("writeEndsStream called on nil writeFramer")); - } - return false; - }; - http2flushFrameWriter.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, ctx, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = ctx.Flush(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2flushFrameWriter.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, ctx, $s};return $f; - }; - http2flushFrameWriter.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2flushFrameWriter.ptr.prototype.staysWithinBuffer = function(max) { - var max; - return false; - }; - http2flushFrameWriter.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writeSettings.prototype.staysWithinBuffer = function(max) { - var max, s; - s = this; - return (9 + ($imul(6, s.$length)) >> 0) <= max; - }; - $ptrType(http2writeSettings).prototype.staysWithinBuffer = function(max) { return this.$get().staysWithinBuffer(max); }; - http2writeSettings.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, s, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteSettings(($convertSliceType(s, sliceType$23))); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2writeSettings.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, s, $s};return $f; - }; - $ptrType(http2writeSettings).prototype.writeFrame = function(ctx) { return this.$get().writeFrame(ctx); }; - http2writeGoAway.ptr.prototype.writeFrame = function(ctx) { - var {_r$1, _r$2, _r$3, ctx, err, p, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteGoAway(p.maxStreamID, p.code, sliceType$3.nil); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - err = _r$2; - _r$3 = ctx.Flush(); /* */ $s = 3; case 3: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = -1; return err; - /* */ } return; } var $f = {$blk: http2writeGoAway.ptr.prototype.writeFrame, $c: true, $r, _r$1, _r$2, _r$3, ctx, err, p, $s};return $f; - }; - http2writeGoAway.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2writeGoAway.ptr.prototype.staysWithinBuffer = function(max) { - var max; - return false; - }; - http2writeGoAway.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writeData.ptr.prototype.String = function() { - var {$24r, _r$1, w, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = fmt.Sprintf("writeData(stream=%d, p=%d, endStream=%v)", new sliceType([new $Uint32(w.streamID), new $Int(w.p.$length), new $Bool(w.endStream)])); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: http2writeData.ptr.prototype.String, $c: true, $r, $24r, _r$1, w, $s};return $f; - }; - http2writeData.prototype.String = function() { return this.$val.String(); }; - http2writeData.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, w, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteData(w.streamID, w.endStream, w.p); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2writeData.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, w, $s};return $f; - }; - http2writeData.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2writeData.ptr.prototype.staysWithinBuffer = function(max) { - var max, w; - w = this; - return (9 + w.p.$length >> 0) <= max; - }; - http2writeData.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2handlerPanicRST.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, hp, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - hp = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteRSTStream(hp.StreamID, 2); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2handlerPanicRST.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, hp, $s};return $f; - }; - http2handlerPanicRST.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2handlerPanicRST.ptr.prototype.staysWithinBuffer = function(max) { - var hp, max; - hp = this; - return 13 <= max; - }; - http2handlerPanicRST.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2StreamError.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, se, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - se = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteRSTStream(se.StreamID, se.Code); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2StreamError.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, se, $s};return $f; - }; - http2StreamError.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2StreamError.ptr.prototype.staysWithinBuffer = function(max) { - var max, se; - se = this; - return 13 <= max; - }; - http2StreamError.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writePingAck.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, w, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WritePing(true, $clone(w.pf.Data, arrayType$8)); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2writePingAck.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, w, $s};return $f; - }; - http2writePingAck.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2writePingAck.ptr.prototype.staysWithinBuffer = function(max) { - var max, w; - w = this; - return 17 <= max; - }; - http2writePingAck.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writeSettingsAck.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteSettingsAck(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2writeSettingsAck.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, $s};return $f; - }; - http2writeSettingsAck.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2writeSettingsAck.ptr.prototype.staysWithinBuffer = function(max) { - var max; - return 9 <= max; - }; - http2writeSettingsAck.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2splitHeaderBlock = function(ctx, headerBlock, fn) { - var {_r$1, ctx, err, first, fn, frag, headerBlock, $s, $r, $c} = $restore(this, {ctx, headerBlock, fn}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - first = true; - /* while (true) { */ case 1: - /* if (!(headerBlock.$length > 0)) { break; } */ if(!(headerBlock.$length > 0)) { $s = 2; continue; } - frag = headerBlock; - if (frag.$length > 16384) { - frag = $subslice(frag, 0, 16384); - } - headerBlock = $subslice(headerBlock, frag.$length); - _r$1 = fn(ctx, frag, first, headerBlock.$length === 0); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - first = false; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2splitHeaderBlock, $c: true, $r, _r$1, ctx, err, first, fn, frag, headerBlock, $s};return $f; - }; - http2encKV = function(enc, k, v) { - var {_r$1, enc, k, v, $s, $r, $c} = $restore(this, {enc, k, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (http2VerboseLogs) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (http2VerboseLogs) { */ case 1: - $r = log.Printf("http2: server encoding header %q = %q", new sliceType([new $String(k), new $String(v)])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 2: - _r$1 = enc.WriteField(new hpack.HeaderField.ptr(k, v, false)); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2encKV, $c: true, $r, _r$1, enc, k, v, $s};return $f; - }; - http2writeResHeaders.ptr.prototype.staysWithinBuffer = function(max) { - var max, w; - w = this; - return false; - }; - http2writeResHeaders.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writeResHeaders.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, _tuple, buf, ctx, enc, headerBlock, w, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = ctx.HeaderEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - enc = _tuple[0]; - buf = _tuple[1]; - buf.Reset(); - /* */ if (!((w.httpResCode === 0))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!((w.httpResCode === 0))) { */ case 2: - $r = http2encKV(enc, ":status", http2httpCodeString(w.httpResCode)); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $r = http2encodeHeaders(enc, w.h, w.trailers); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ if (!(w.contentType === "")) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (!(w.contentType === "")) { */ case 6: - $r = http2encKV(enc, "content-type", w.contentType); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - /* */ if (!(w.contentLength === "")) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(w.contentLength === "")) { */ case 9: - $r = http2encKV(enc, "content-length", w.contentLength); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 10: - /* */ if (!(w.date === "")) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (!(w.date === "")) { */ case 12: - $r = http2encKV(enc, "date", w.date); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 13: - headerBlock = buf.Bytes(); - if ((headerBlock.$length === 0) && w.trailers === sliceType$2.nil) { - $panic(new $String("unexpected empty hpack")); - } - _r$2 = http2splitHeaderBlock(ctx, headerBlock, $methodVal(w, "writeHeaderBlock")); /* */ $s = 15; case 15: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 16; case 16: return $24r; - /* */ } return; } var $f = {$blk: http2writeResHeaders.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, _tuple, buf, ctx, enc, headerBlock, w, $s};return $f; - }; - http2writeResHeaders.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2writeResHeaders.ptr.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, ctx, firstFrag, frag, lastFrag, w, $s, $r, $c} = $restore(this, {ctx, frag, firstFrag, lastFrag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - /* */ if (firstFrag) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (firstFrag) { */ case 1: - _r$1 = ctx.Framer(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteHeaders(new http2HeadersFrameParam.ptr(w.streamID, frag, w.endStream, lastFrag, 0, new http2PriorityParam.ptr(0, false, 0))); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 6; case 6: return $24r; - /* } else { */ case 2: - _r$3 = ctx.Framer(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.WriteContinuation(w.streamID, lastFrag, frag); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 9; case 9: return $24r$1; - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2writeResHeaders.ptr.prototype.writeHeaderBlock, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, ctx, firstFrag, frag, lastFrag, w, $s};return $f; - }; - http2writeResHeaders.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { return this.$val.writeHeaderBlock(ctx, frag, firstFrag, lastFrag); }; - http2writePushPromise.ptr.prototype.staysWithinBuffer = function(max) { - var max, w; - w = this; - return false; - }; - http2writePushPromise.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writePushPromise.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, _tuple, buf, ctx, enc, headerBlock, w, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = ctx.HeaderEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - enc = _tuple[0]; - buf = _tuple[1]; - buf.Reset(); - $r = http2encKV(enc, ":method", w.method); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = http2encKV(enc, ":scheme", w.url.Scheme); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = http2encKV(enc, ":authority", w.url.Host); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = http2encKV(enc, ":path", w.url.RequestURI()); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = http2encodeHeaders(enc, w.h, sliceType$2.nil); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - headerBlock = buf.Bytes(); - if (headerBlock.$length === 0) { - $panic(new $String("unexpected empty hpack")); - } - _r$2 = http2splitHeaderBlock(ctx, headerBlock, $methodVal(w, "writeHeaderBlock")); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 8; case 8: return $24r; - /* */ } return; } var $f = {$blk: http2writePushPromise.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, _tuple, buf, ctx, enc, headerBlock, w, $s};return $f; - }; - http2writePushPromise.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2writePushPromise.ptr.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, ctx, firstFrag, frag, lastFrag, w, $s, $r, $c} = $restore(this, {ctx, frag, firstFrag, lastFrag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - /* */ if (firstFrag) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (firstFrag) { */ case 1: - _r$1 = ctx.Framer(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WritePushPromise(new http2PushPromiseParam.ptr(w.streamID, w.promisedID, frag, lastFrag, 0)); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 6; case 6: return $24r; - /* } else { */ case 2: - _r$3 = ctx.Framer(); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = _r$3.WriteContinuation(w.streamID, lastFrag, frag); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 9; case 9: return $24r$1; - /* } */ case 3: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: http2writePushPromise.ptr.prototype.writeHeaderBlock, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, ctx, firstFrag, frag, lastFrag, w, $s};return $f; - }; - http2writePushPromise.prototype.writeHeaderBlock = function(ctx, frag, firstFrag, lastFrag) { return this.$val.writeHeaderBlock(ctx, frag, firstFrag, lastFrag); }; - http2write100ContinueHeadersFrame.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, _r$3, _tuple, buf, ctx, enc, w, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - w = this; - _r$1 = ctx.HeaderEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - enc = _tuple[0]; - buf = _tuple[1]; - buf.Reset(); - $r = http2encKV(enc, ":status", "100"); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = ctx.Framer(); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = _r$2.WriteHeaders(new http2HeadersFrameParam.ptr(w.streamID, buf.Bytes(), false, true, 0, new http2PriorityParam.ptr(0, false, 0))); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 5; case 5: return $24r; - /* */ } return; } var $f = {$blk: http2write100ContinueHeadersFrame.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, buf, ctx, enc, w, $s};return $f; - }; - http2write100ContinueHeadersFrame.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2write100ContinueHeadersFrame.ptr.prototype.staysWithinBuffer = function(max) { - var max, w; - w = this; - return 29 <= max; - }; - http2write100ContinueHeadersFrame.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writeWindowUpdate.ptr.prototype.staysWithinBuffer = function(max) { - var max, wu; - wu = this; - return 13 <= max; - }; - http2writeWindowUpdate.prototype.staysWithinBuffer = function(max) { return this.$val.staysWithinBuffer(max); }; - http2writeWindowUpdate.ptr.prototype.writeFrame = function(ctx) { - var {$24r, _r$1, _r$2, ctx, wu, $s, $r, $c} = $restore(this, {ctx}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wu = this; - _r$1 = ctx.Framer(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.WriteWindowUpdate(wu.streamID, wu.n); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: http2writeWindowUpdate.ptr.prototype.writeFrame, $c: true, $r, $24r, _r$1, _r$2, ctx, wu, $s};return $f; - }; - http2writeWindowUpdate.prototype.writeFrame = function(ctx) { return this.$val.writeFrame(ctx); }; - http2encodeHeaders = function(enc, h, keys) { - var {_entry, _i, _i$1, _r$1, _r$2, _r$3, _ref, _ref$1, _tuple, ascii$1, enc, h, isTE, k, k$1, keys, sorter, v, vv, $s, $deferred, $r, $c} = $restore(this, {enc, h, keys}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - /* */ if (keys === sliceType$2.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (keys === sliceType$2.nil) { */ case 1: - _r$1 = http2sorterPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - sorter = $assertType(_r$1, ptrType$100); - $deferred.push([$methodVal(http2sorterPool, "Put"), [sorter]]); - _r$2 = sorter.Keys(h); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - keys = _r$2; - /* } */ case 2: - _ref = keys; - _i = 0; - /* while (true) { */ case 5: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 6; continue; } - k = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - vv = (_entry = h[$String.keyFor(k)], _entry !== undefined ? _entry.v : sliceType$2.nil); - _r$3 = http2lowerHeader(k); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple = _r$3; - k$1 = _tuple[0]; - ascii$1 = _tuple[1]; - if (!ascii$1) { - _i++; - /* continue; */ $s = 5; continue; - } - if (!http2validWireHeaderFieldName(k$1)) { - _i++; - /* continue; */ $s = 5; continue; - } - isTE = k$1 === "transfer-encoding"; - _ref$1 = vv; - _i$1 = 0; - /* while (true) { */ case 8: - /* if (!(_i$1 < _ref$1.$length)) { break; } */ if(!(_i$1 < _ref$1.$length)) { $s = 9; continue; } - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (!httpguts.ValidHeaderFieldValue(v)) { - _i$1++; - /* continue; */ $s = 8; continue; - } - if (isTE && !(v === "trailers")) { - _i$1++; - /* continue; */ $s = 8; continue; - } - $r = http2encKV(enc, k$1, v); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i$1++; - $s = 8; continue; - case 9: - _i++; - $s = 5; continue; - case 6: - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: http2encodeHeaders, $c: true, $r, _entry, _i, _i$1, _r$1, _r$2, _r$3, _ref, _ref$1, _tuple, ascii$1, enc, h, isTE, k, k$1, keys, sorter, v, vv, $s, $deferred};return $f; } } - }; - http2FrameWriteRequest.ptr.prototype.StreamID = function() { - var _tuple, ok, se, wr; - wr = this; - if (wr.stream === ptrType$10.nil) { - _tuple = $assertType(wr.write, http2StreamError, true); - se = $clone(_tuple[0], http2StreamError); - ok = _tuple[1]; - if (ok) { - return se.StreamID; - } - return 0; - } - return wr.stream.id; - }; - http2FrameWriteRequest.prototype.StreamID = function() { return this.$val.StreamID(); }; - http2FrameWriteRequest.ptr.prototype.isControl = function() { - var wr; - wr = this; - return wr.stream === ptrType$10.nil; - }; - http2FrameWriteRequest.prototype.isControl = function() { return this.$val.isControl(); }; - http2FrameWriteRequest.ptr.prototype.DataSize = function() { - var _tuple, ok, wd, wr; - wr = this; - _tuple = $assertType(wr.write, ptrType$92, true); - wd = _tuple[0]; - ok = _tuple[1]; - if (ok) { - return wd.p.$length; - } - return 0; - }; - http2FrameWriteRequest.prototype.DataSize = function() { return this.$val.DataSize(); }; - http2FrameWriteRequest.ptr.prototype.Consume = function(n) { - var _tuple, allowed, consumed, empty, n, ok, rest, wd, wr; - wr = this; - empty = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil); - _tuple = $assertType(wr.write, ptrType$92, true); - wd = _tuple[0]; - ok = _tuple[1]; - if (!ok || (wd.p.$length === 0)) { - return [wr, empty, 1]; - } - allowed = wr.stream.flow.available(); - if (n < allowed) { - allowed = n; - } - if (wr.stream.sc.maxFrameSize < allowed) { - allowed = wr.stream.sc.maxFrameSize; - } - if (allowed <= 0) { - return [empty, empty, 0]; - } - if (wd.p.$length > ((allowed >> 0))) { - wr.stream.flow.take(allowed); - consumed = new http2FrameWriteRequest.ptr(new http2writeData.ptr(wd.streamID, $subslice(wd.p, 0, allowed), false), wr.stream, $chanNil); - rest = new http2FrameWriteRequest.ptr(new http2writeData.ptr(wd.streamID, $subslice(wd.p, allowed), wd.endStream), wr.stream, wr.done); - return [consumed, rest, 2]; - } - wr.stream.flow.take(((wd.p.$length >> 0))); - return [wr, empty, 1]; - }; - http2FrameWriteRequest.prototype.Consume = function(n) { return this.$val.Consume(n); }; - http2FrameWriteRequest.ptr.prototype.String = function() { - var {$24r, _r$1, _r$2, _r$3, _tuple, des, ok, s, wr, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wr = this; - des = ""; - _tuple = $assertType(wr.write, fmt.Stringer, true); - s = _tuple[0]; - ok = _tuple[1]; - /* */ if (ok) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (ok) { */ case 1: - _r$1 = s.String(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - des = _r$1; - $s = 3; continue; - /* } else { */ case 2: - _r$2 = fmt.Sprintf("%T", new sliceType([wr.write])); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - des = _r$2; - /* } */ case 3: - _r$3 = fmt.Sprintf("[FrameWriteRequest stream=%d, ch=%v, writer=%v]", new sliceType([new $Uint32($clone(wr, http2FrameWriteRequest).StreamID()), new $Bool(!(wr.done === $chanNil)), new $String(des)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 7; case 7: return $24r; - /* */ } return; } var $f = {$blk: http2FrameWriteRequest.ptr.prototype.String, $c: true, $r, $24r, _r$1, _r$2, _r$3, _tuple, des, ok, s, wr, $s};return $f; - }; - http2FrameWriteRequest.prototype.String = function() { return this.$val.String(); }; - http2FrameWriteRequest.ptr.prototype.replyToWriter = function(err) { - var {_r$1, _selection, err, wr, $s, $r, $c} = $restore(this, {err}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - wr = this; - if (wr.done === $chanNil) { - $s = -1; return; - } - _selection = $select([[wr.done, err], []]); - /* */ if (_selection[0] === 0) { $s = 1; continue; } - /* */ if (_selection[0] === 1) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (_selection[0] === 0) { */ case 1: - $s = 3; continue; - /* } else if (_selection[0] === 1) { */ case 2: - _r$1 = fmt.Sprintf("unbuffered done channel passed in for type %T", new sliceType([wr.write])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 3: - wr.write = $ifaceNil; - $s = -1; return; - /* */ } return; } var $f = {$blk: http2FrameWriteRequest.ptr.prototype.replyToWriter, $c: true, $r, _r$1, _selection, err, wr, $s};return $f; - }; - http2FrameWriteRequest.prototype.replyToWriter = function(err) { return this.$val.replyToWriter(err); }; - http2writeQueue.ptr.prototype.empty = function() { - var q; - q = this; - return q.s.$length === 0; - }; - http2writeQueue.prototype.empty = function() { return this.$val.empty(); }; - http2writeQueue.ptr.prototype.push = function(wr) { - var q, wr; - q = this; - q.s = $append(q.s, wr); - }; - http2writeQueue.prototype.push = function(wr) { return this.$val.push(wr); }; - http2writeQueue.ptr.prototype.shift = function() { - var q, wr, x$5, x$6, x$7; - q = this; - if (q.s.$length === 0) { - $panic(new $String("invalid use of queue")); - } - wr = $clone((x$5 = q.s, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), http2FrameWriteRequest); - $copySlice(q.s, $subslice(q.s, 1)); - http2FrameWriteRequest.copy((x$6 = q.s, x$7 = q.s.$length - 1 >> 0, ((x$7 < 0 || x$7 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$7])), new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil)); - q.s = $subslice(q.s, 0, (q.s.$length - 1 >> 0)); - return wr; - }; - http2writeQueue.prototype.shift = function() { return this.$val.shift(); }; - http2writeQueue.ptr.prototype.consume = function(n) { - var _1, _tuple, consumed, n, numresult, q, rest, x$5, x$6; - q = this; - if (q.s.$length === 0) { - return [new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil), false]; - } - _tuple = $clone((x$5 = q.s, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), http2FrameWriteRequest).Consume(n); - consumed = $clone(_tuple[0], http2FrameWriteRequest); - rest = $clone(_tuple[1], http2FrameWriteRequest); - numresult = _tuple[2]; - _1 = numresult; - if (_1 === (0)) { - return [new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil), false]; - } else if (_1 === (1)) { - q.shift(); - } else if (_1 === (2)) { - http2FrameWriteRequest.copy((x$6 = q.s, (0 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 0])), rest); - } - return [consumed, true]; - }; - http2writeQueue.prototype.consume = function(n) { return this.$val.consume(n); }; - $ptrType(http2writeQueuePool).prototype.put = function(q) { - var _i, _ref, i, p, q, x$5; - p = this; - _ref = q.s; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - http2FrameWriteRequest.copy((x$5 = q.s, ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])), new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil)); - _i++; - } - q.s = $subslice(q.s, 0, 0); - p.$set($append(p.$get(), q)); - }; - $ptrType(http2writeQueuePool).prototype.get = function() { - var ln, p, q, x$5, x$6, x$7; - p = this; - ln = p.$get().$length; - if (ln === 0) { - return new http2writeQueue.ptr(sliceType$24.nil); - } - x$5 = ln - 1 >> 0; - q = (x$6 = p.$get(), ((x$5 < 0 || x$5 >= x$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + x$5])); - (x$7 = p.$get(), ((x$5 < 0 || x$5 >= x$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + x$5] = ptrType$105.nil)); - p.$set($subslice((p.$get()), 0, x$5)); - return q; - }; - http2NewPriorityWriteScheduler = function(cfg) { - var _key, cfg, ws; - if (cfg === ptrType$61.nil) { - cfg = new http2PriorityWriteSchedulerConfig.ptr(10, 10, false); - } - ws = new http2priorityWriteScheduler.ptr(new http2priorityNode.ptr(new http2writeQueue.ptr(sliceType$24.nil), 0, 0, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$106.nil, ptrType$106.nil, ptrType$106.nil, ptrType$106.nil), {}, 0, sliceType$25.nil, sliceType$25.nil, cfg.MaxClosedNodesInTree, cfg.MaxIdleNodesInTree, 0, cfg.ThrottleOutOfOrderWrites, sliceType$25.nil, http2writeQueuePool.nil); - _key = 0; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: ws.root }; - if (cfg.ThrottleOutOfOrderWrites) { - ws.writeThrottleLimit = 1024; - } else { - ws.writeThrottleLimit = 2147483647; - } - return ws; - }; - http2priorityNode.ptr.prototype.setParent = function(parent) { - var n, parent, parent$1; - n = this; - if (n === parent) { - $panic(new $String("setParent to self")); - } - if (n.parent === parent) { - return; - } - parent$1 = n.parent; - if (!(parent$1 === ptrType$106.nil)) { - if (n.prev === ptrType$106.nil) { - parent$1.kids = n.next; - } else { - n.prev.next = n.next; - } - if (!(n.next === ptrType$106.nil)) { - n.next.prev = n.prev; - } - } - n.parent = parent; - if (parent === ptrType$106.nil) { - n.next = ptrType$106.nil; - n.prev = ptrType$106.nil; - } else { - n.next = parent.kids; - n.prev = ptrType$106.nil; - if (!(n.next === ptrType$106.nil)) { - n.next.prev = n; - } - parent.kids = n; - } - }; - http2priorityNode.prototype.setParent = function(parent) { return this.$val.setParent(parent); }; - http2priorityNode.ptr.prototype.addBytes = function(b) { - var b, n, x$5, x$6, x$7, x$8; - n = this; - n.bytes = (x$5 = n.bytes, x$6 = b, new $Int64(x$5.$high + x$6.$high, x$5.$low + x$6.$low)); - while (true) { - if (!(!(n === ptrType$106.nil))) { break; } - n.subtreeBytes = (x$7 = n.subtreeBytes, x$8 = b, new $Int64(x$7.$high + x$8.$high, x$7.$low + x$8.$low)); - n = n.parent; - } - }; - http2priorityNode.prototype.addBytes = function(b) { return this.$val.addBytes(b); }; - http2priorityNode.ptr.prototype.walkReadyInOrder = function(openParent, tmp, f) { - var {_r$1, _r$2, _r$3, _v, f, i, k, k$1, k$2, n, needSort, openParent, tmp, w, x$5, $s, $r, $c} = $restore(this, {openParent, tmp, f}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - n = this; - if (!(!n.q.empty())) { _v = false; $s = 3; continue s; } - _r$1 = f(n, openParent); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = _r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return true; - /* } */ case 2: - if (n.kids === ptrType$106.nil) { - $s = -1; return false; - } - if (!((n.id === 0))) { - openParent = openParent || ((n.state === 0)); - } - w = n.kids.weight; - needSort = false; - k = n.kids.next; - while (true) { - if (!(!(k === ptrType$106.nil))) { break; } - if (!((k.weight === w))) { - needSort = true; - break; - } - k = k.next; - } - /* */ if (!needSort) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!needSort) { */ case 5: - k$1 = n.kids; - /* while (true) { */ case 7: - /* if (!(!(k$1 === ptrType$106.nil))) { break; } */ if(!(!(k$1 === ptrType$106.nil))) { $s = 8; continue; } - _r$2 = k$1.walkReadyInOrder(openParent, tmp, f); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$2) { */ case 9: - $s = -1; return true; - /* } */ case 10: - k$1 = k$1.next; - $s = 7; continue; - case 8: - $s = -1; return false; - /* } */ case 6: - tmp.$set($subslice((tmp.$get()), 0, 0)); - while (true) { - if (!(!(n.kids === ptrType$106.nil))) { break; } - tmp.$set($append(tmp.$get(), n.kids)); - n.kids.setParent(ptrType$106.nil); - } - $r = sort.Sort(($convertSliceType(tmp.$get(), http2sortPriorityNodeSiblings))); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - i = tmp.$get().$length - 1 >> 0; - while (true) { - if (!(i >= 0)) { break; } - (x$5 = tmp.$get(), ((i < 0 || i >= x$5.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + i])).setParent(n); - i = i - (1) >> 0; - } - k$2 = n.kids; - /* while (true) { */ case 13: - /* if (!(!(k$2 === ptrType$106.nil))) { break; } */ if(!(!(k$2 === ptrType$106.nil))) { $s = 14; continue; } - _r$3 = k$2.walkReadyInOrder(openParent, tmp, f); /* */ $s = 17; case 17: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - /* */ if (_r$3) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (_r$3) { */ case 15: - $s = -1; return true; - /* } */ case 16: - k$2 = k$2.next; - $s = 13; continue; - case 14: - $s = -1; return false; - /* */ } return; } var $f = {$blk: http2priorityNode.ptr.prototype.walkReadyInOrder, $c: true, $r, _r$1, _r$2, _r$3, _v, f, i, k, k$1, k$2, n, needSort, openParent, tmp, w, x$5, $s};return $f; - }; - http2priorityNode.prototype.walkReadyInOrder = function(openParent, tmp, f) { return this.$val.walkReadyInOrder(openParent, tmp, f); }; - http2sortPriorityNodeSiblings.prototype.Len = function() { - var z; - z = this; - return z.$length; - }; - $ptrType(http2sortPriorityNodeSiblings).prototype.Len = function() { return this.$get().Len(); }; - http2sortPriorityNodeSiblings.prototype.Swap = function(i, k) { - var _tmp, _tmp$1, i, k, z; - z = this; - _tmp = ((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k]); - _tmp$1 = ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]); - ((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i] = _tmp); - ((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k] = _tmp$1); - }; - $ptrType(http2sortPriorityNodeSiblings).prototype.Swap = function(i, k) { return this.$get().Swap(i, k); }; - http2sortPriorityNodeSiblings.prototype.Less = function(i, k) { - var _tmp, _tmp$1, _tmp$2, _tmp$3, bi, bk, i, k, wi, wk, z; - z = this; - _tmp = ((((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]).weight + 1 << 24 >>> 24)); - _tmp$1 = ($flatten64(((i < 0 || i >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + i]).subtreeBytes)); - wi = _tmp; - bi = _tmp$1; - _tmp$2 = ((((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k]).weight + 1 << 24 >>> 24)); - _tmp$3 = ($flatten64(((k < 0 || k >= z.$length) ? ($throwRuntimeError("index out of range"), undefined) : z.$array[z.$offset + k]).subtreeBytes)); - wk = _tmp$2; - bk = _tmp$3; - if ((bi === 0) && (bk === 0)) { - return wi >= wk; - } - if (bk === 0) { - return false; - } - return bi / bk <= wi / wk; - }; - $ptrType(http2sortPriorityNodeSiblings).prototype.Less = function(i, k) { return this.$get().Less(i, k); }; - http2priorityWriteScheduler.ptr.prototype.OpenStream = function(streamID, options) { - var {_entry, _entry$1, _key, _r$1, curr, n, options, parent, streamID, ws, $s, $r, $c} = $restore(this, {streamID, options}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ws = this; - curr = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$106.nil); - /* */ if (!(curr === ptrType$106.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(curr === ptrType$106.nil)) { */ case 1: - /* */ if (!((curr.state === 2))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!((curr.state === 2))) { */ case 3: - _r$1 = fmt.Sprintf("stream %d already opened", new sliceType([new $Uint32(streamID)])); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 4: - curr.state = 0; - $s = -1; return; - /* } */ case 2: - parent = (_entry$1 = ws.nodes[$Uint32.keyFor(options.PusherID)], _entry$1 !== undefined ? _entry$1.v : ptrType$106.nil); - if (parent === ptrType$106.nil) { - parent = ws.root; - } - n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$107(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(), http2writeQueue), streamID, 15, 0, new $Int64(0, 0), new $Int64(0, 0), ptrType$106.nil, ptrType$106.nil, ptrType$106.nil, ptrType$106.nil); - n.setParent(parent); - _key = streamID; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: n }; - if (streamID > ws.maxID) { - ws.maxID = streamID; - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2priorityWriteScheduler.ptr.prototype.OpenStream, $c: true, $r, _entry, _entry$1, _key, _r$1, curr, n, options, parent, streamID, ws, $s};return $f; - }; - http2priorityWriteScheduler.prototype.OpenStream = function(streamID, options) { return this.$val.OpenStream(streamID, options); }; - http2priorityWriteScheduler.ptr.prototype.CloseStream = function(streamID) { - var {_entry, _entry$1, _entry$2, _r$1, _r$2, n, q, streamID, ws, x$5, $s, $r, $c} = $restore(this, {streamID}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - q = [q]; - ws = this; - if (streamID === 0) { - $panic(new $String("violation of WriteScheduler interface: cannot close stream 0")); - } - /* */ if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$106.nil) === ptrType$106.nil) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ((_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$106.nil) === ptrType$106.nil) { */ case 1: - _r$1 = fmt.Sprintf("violation of WriteScheduler interface: unknown stream %d", new sliceType([new $Uint32(streamID)])); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $panic(new $String(_r$1)); - /* } */ case 2: - /* */ if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$106.nil).state === 0))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!(((_entry$1 = ws.nodes[$Uint32.keyFor(streamID)], _entry$1 !== undefined ? _entry$1.v : ptrType$106.nil).state === 0))) { */ case 4: - _r$2 = fmt.Sprintf("violation of WriteScheduler interface: stream %d already closed", new sliceType([new $Uint32(streamID)])); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $panic(new $String(_r$2)); - /* } */ case 5: - n = (_entry$2 = ws.nodes[$Uint32.keyFor(streamID)], _entry$2 !== undefined ? _entry$2.v : ptrType$106.nil); - n.state = 1; - n.addBytes((x$5 = n.bytes, new $Int64(-x$5.$high, -x$5.$low))); - q[0] = $clone(n.q, http2writeQueue); - (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$107(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q[0]); - n.q.s = sliceType$24.nil; - if (ws.maxClosedNodesInTree > 0) { - ws.addClosedOrIdleNode((ws.$ptr_closedNodes || (ws.$ptr_closedNodes = new ptrType$108(function() { return this.$target.closedNodes; }, function($v) { this.$target.closedNodes = $v; }, ws))), ws.maxClosedNodesInTree, n); - } else { - ws.removeNode(n); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: http2priorityWriteScheduler.ptr.prototype.CloseStream, $c: true, $r, _entry, _entry$1, _entry$2, _r$1, _r$2, n, q, streamID, ws, x$5, $s};return $f; - }; - http2priorityWriteScheduler.prototype.CloseStream = function(streamID) { return this.$val.CloseStream(streamID); }; - http2priorityWriteScheduler.ptr.prototype.AdjustStream = function(streamID, priority) { - var _entry, _entry$1, _key, k, n, next, parent, priority, streamID, ws, x$5; - ws = this; - if (streamID === 0) { - $panic(new $String("adjustPriority on root")); - } - n = (_entry = ws.nodes[$Uint32.keyFor(streamID)], _entry !== undefined ? _entry.v : ptrType$106.nil); - if (n === ptrType$106.nil) { - if (streamID <= ws.maxID || (ws.maxIdleNodesInTree === 0)) { - return; - } - ws.maxID = streamID; - n = new http2priorityNode.ptr($clone((ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$107(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(), http2writeQueue), streamID, 15, 2, new $Int64(0, 0), new $Int64(0, 0), ptrType$106.nil, ptrType$106.nil, ptrType$106.nil, ptrType$106.nil); - n.setParent(ws.root); - _key = streamID; (ws.nodes || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: n }; - ws.addClosedOrIdleNode((ws.$ptr_idleNodes || (ws.$ptr_idleNodes = new ptrType$108(function() { return this.$target.idleNodes; }, function($v) { this.$target.idleNodes = $v; }, ws))), ws.maxIdleNodesInTree, n); - } - parent = (_entry$1 = ws.nodes[$Uint32.keyFor(priority.StreamDep)], _entry$1 !== undefined ? _entry$1.v : ptrType$106.nil); - if (parent === ptrType$106.nil) { - n.setParent(ws.root); - n.weight = 15; - return; - } - if (n === parent) { - return; - } - x$5 = parent.parent; - while (true) { - if (!(!(x$5 === ptrType$106.nil))) { break; } - if (x$5 === n) { - parent.setParent(n.parent); - break; - } - x$5 = x$5.parent; - } - if (priority.Exclusive) { - k = parent.kids; - while (true) { - if (!(!(k === ptrType$106.nil))) { break; } - next = k.next; - if (!(k === n)) { - k.setParent(n); - } - k = next; - } - } - n.setParent(parent); - n.weight = priority.Weight; - }; - http2priorityWriteScheduler.prototype.AdjustStream = function(streamID, priority) { return this.$val.AdjustStream(streamID, priority); }; - http2priorityWriteScheduler.ptr.prototype.Push = function(wr) { - var _entry, id, n, wr, ws; - ws = this; - n = ptrType$106.nil; - id = $clone(wr, http2FrameWriteRequest).StreamID(); - if (id === 0) { - n = ws.root; - } else { - n = (_entry = ws.nodes[$Uint32.keyFor(id)], _entry !== undefined ? _entry.v : ptrType$106.nil); - if (n === ptrType$106.nil) { - if ($clone(wr, http2FrameWriteRequest).DataSize() > 0) { - $panic(new $String("add DATA on non-open stream")); - } - n = ws.root; - } - } - n.q.push($clone(wr, http2FrameWriteRequest)); - }; - http2priorityWriteScheduler.prototype.Push = function(wr) { return this.$val.Push(wr); }; - http2priorityWriteScheduler.ptr.prototype.Pop = function() { - var {_r$1, _tmp, _tmp$1, ok, wr, ws, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ok = [ok]; - wr = [wr]; - ws = [ws]; - wr[0] = new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil); - ok[0] = false; - ws[0] = this; - _r$1 = ws[0].root.walkReadyInOrder(false, (ws[0].$ptr_tmp || (ws[0].$ptr_tmp = new ptrType$108(function() { return this.$target.tmp; }, function($v) { this.$target.tmp = $v; }, ws[0]))), (function(ok, wr, ws) { return function(n, openParent) { - var _tuple, limit, n, openParent; - limit = 2147483647; - if (openParent) { - limit = ws[0].writeThrottleLimit; - } - _tuple = n.q.consume(limit); - http2FrameWriteRequest.copy(wr[0], _tuple[0]); - ok[0] = _tuple[1]; - if (!ok[0]) { - return false; - } - n.addBytes((new $Int64(0, $clone(wr[0], http2FrameWriteRequest).DataSize()))); - if (openParent) { - ws[0].writeThrottleLimit = ws[0].writeThrottleLimit + (1024) >> 0; - if (ws[0].writeThrottleLimit < 0) { - ws[0].writeThrottleLimit = 2147483647; - } - } else if (ws[0].enableWriteThrottle) { - ws[0].writeThrottleLimit = 1024; - } - return true; - }; })(ok, wr, ws)); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - _tmp = $clone(wr[0], http2FrameWriteRequest); - _tmp$1 = ok[0]; - http2FrameWriteRequest.copy(wr[0], _tmp); - ok[0] = _tmp$1; - $s = -1; return [wr[0], ok[0]]; - /* */ } return; } var $f = {$blk: http2priorityWriteScheduler.ptr.prototype.Pop, $c: true, $r, _r$1, _tmp, _tmp$1, ok, wr, ws, $s};return $f; - }; - http2priorityWriteScheduler.prototype.Pop = function() { return this.$val.Pop(); }; - http2priorityWriteScheduler.ptr.prototype.addClosedOrIdleNode = function(list$1, maxSize, n) { - var list$1, maxSize, n, ws, x$5, x$6; - ws = this; - if (maxSize === 0) { - return; - } - if (list$1.$get().$length === maxSize) { - ws.removeNode((x$5 = list$1.$get(), (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0]))); - x$6 = $subslice((list$1.$get()), 1); - $copySlice(list$1.$get(), x$6); - list$1.$set($subslice((list$1.$get()), 0, x$6.$length)); - } - list$1.$set($append(list$1.$get(), n)); - }; - http2priorityWriteScheduler.prototype.addClosedOrIdleNode = function(list$1, maxSize, n) { return this.$val.addClosedOrIdleNode(list$1, maxSize, n); }; - http2priorityWriteScheduler.ptr.prototype.removeNode = function(n) { - var k, n, ws; - ws = this; - k = n.kids; - while (true) { - if (!(!(k === ptrType$106.nil))) { break; } - k.setParent(n.parent); - k = k.next; - } - n.setParent(ptrType$106.nil); - delete ws.nodes[$Uint32.keyFor(n.id)]; - }; - http2priorityWriteScheduler.prototype.removeNode = function(n) { return this.$val.removeNode(n); }; - http2NewRandomWriteScheduler = function() { - return new http2randomWriteScheduler.ptr(new http2writeQueue.ptr(sliceType$24.nil), {}, http2writeQueuePool.nil); - }; - http2randomWriteScheduler.ptr.prototype.OpenStream = function(streamID, options) { - var options, streamID, ws; - ws = this; - }; - http2randomWriteScheduler.prototype.OpenStream = function(streamID, options) { return this.$val.OpenStream(streamID, options); }; - http2randomWriteScheduler.ptr.prototype.CloseStream = function(streamID) { - var _entry, _tuple, ok, q, streamID, ws; - ws = this; - _tuple = (_entry = ws.sq[$Uint32.keyFor(streamID)], _entry !== undefined ? [_entry.v, true] : [ptrType$105.nil, false]); - q = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - return; - } - delete ws.sq[$Uint32.keyFor(streamID)]; - (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$107(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q); - }; - http2randomWriteScheduler.prototype.CloseStream = function(streamID) { return this.$val.CloseStream(streamID); }; - http2randomWriteScheduler.ptr.prototype.AdjustStream = function(streamID, priority) { - var priority, streamID, ws; - ws = this; - }; - http2randomWriteScheduler.prototype.AdjustStream = function(streamID, priority) { return this.$val.AdjustStream(streamID, priority); }; - http2randomWriteScheduler.ptr.prototype.Push = function(wr) { - var _entry, _key, _tuple, id, ok, q, wr, ws; - ws = this; - if ($clone(wr, http2FrameWriteRequest).isControl()) { - ws.zero.push($clone(wr, http2FrameWriteRequest)); - return; - } - id = $clone(wr, http2FrameWriteRequest).StreamID(); - _tuple = (_entry = ws.sq[$Uint32.keyFor(id)], _entry !== undefined ? [_entry.v, true] : [ptrType$105.nil, false]); - q = _tuple[0]; - ok = _tuple[1]; - if (!ok) { - q = (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$107(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).get(); - _key = id; (ws.sq || $throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(_key)] = { k: _key, v: q }; - } - q.push($clone(wr, http2FrameWriteRequest)); - }; - http2randomWriteScheduler.prototype.Push = function(wr) { return this.$val.Push(wr); }; - http2randomWriteScheduler.ptr.prototype.Pop = function() { - var _entry, _i, _keys, _ref, _tuple, ok, q, streamID, wr, ws; - ws = this; - if (!ws.zero.empty()) { - return [ws.zero.shift(), true]; - } - _ref = ws.sq; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - streamID = _entry.k; - q = _entry.v; - _tuple = q.consume(2147483647); - wr = $clone(_tuple[0], http2FrameWriteRequest); - ok = _tuple[1]; - if (ok) { - if (q.empty()) { - delete ws.sq[$Uint32.keyFor(streamID)]; - (ws.$ptr_queuePool || (ws.$ptr_queuePool = new ptrType$107(function() { return this.$target.queuePool; }, function($v) { this.$target.queuePool = $v; }, ws))).put(q); - } - return [wr, true]; - } - _i++; - } - return [new http2FrameWriteRequest.ptr($ifaceNil, ptrType$10.nil, $chanNil), false]; - }; - http2randomWriteScheduler.prototype.Pop = function() { return this.$val.Pop(); }; - readSetCookies = function(h) { - var {_1, _2, _entry, _entry$1, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, ascii$1, attr, c, cookieCount, cookies, err, err$1, exptime, h, i, isASCII, line, lowerAttr, lowerVal, name, ok, parts, secs, val, value, $s, $r, $c} = $restore(this, {h}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cookieCount = (_entry = h[$String.keyFor("Set-Cookie")], _entry !== undefined ? _entry.v : sliceType$2.nil).$length; - if (cookieCount === 0) { - $s = -1; return new sliceType$29([]); - } - cookies = $makeSlice(sliceType$29, 0, cookieCount); - _ref = (_entry$1 = h[$String.keyFor("Set-Cookie")], _entry$1 !== undefined ? _entry$1.v : sliceType$2.nil); - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - parts = strings.Split(textproto.TrimString(line), ";"); - if ((parts.$length === 1) && (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]) === "") { - _i++; - /* continue; */ $s = 1; continue; - } - (0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0] = textproto.TrimString((0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]))); - _tuple = strings.Cut((0 >= parts.$length ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + 0]), "="); - name = _tuple[0]; - value = _tuple[1]; - ok = _tuple[2]; - if (!ok) { - _i++; - /* continue; */ $s = 1; continue; - } - _r$1 = isCookieNameValid(name); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!_r$1) { */ case 3: - _i++; - /* continue; */ $s = 1; continue; - /* } */ case 4: - _tuple$1 = parseCookieValue(value, true); - value = _tuple$1[0]; - ok = _tuple$1[1]; - if (!ok) { - _i++; - /* continue; */ $s = 1; continue; - } - c = new Cookie.ptr(name, value, "", "", new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), "", 0, false, false, 0, line, sliceType$2.nil); - i = 1; - /* while (true) { */ case 6: - /* if (!(i < parts.$length)) { break; } */ if(!(i < parts.$length)) { $s = 7; continue; } - ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i] = textproto.TrimString(((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]))); - if (((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]).length === 0) { - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - } - _tuple$2 = strings.Cut(((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i]), "="); - attr = _tuple$2[0]; - val = _tuple$2[1]; - _r$2 = ascii.ToLower(attr); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$3 = _r$2; - lowerAttr = _tuple$3[0]; - isASCII = _tuple$3[1]; - if (!isASCII) { - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - } - _tuple$4 = parseCookieValue(val, false); - val = _tuple$4[0]; - ok = _tuple$4[1]; - if (!ok) { - c.Unparsed = $append(c.Unparsed, ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i])); - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - } - _1 = lowerAttr; - /* */ if (_1 === ("samesite")) { $s = 10; continue; } - /* */ if (_1 === ("secure")) { $s = 11; continue; } - /* */ if (_1 === ("httponly")) { $s = 12; continue; } - /* */ if (_1 === ("domain")) { $s = 13; continue; } - /* */ if (_1 === ("max-age")) { $s = 14; continue; } - /* */ if (_1 === ("expires")) { $s = 15; continue; } - /* */ if (_1 === ("path")) { $s = 16; continue; } - /* */ $s = 17; continue; - /* if (_1 === ("samesite")) { */ case 10: - _r$3 = ascii.ToLower(val); /* */ $s = 18; case 18: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _tuple$5 = _r$3; - lowerVal = _tuple$5[0]; - ascii$1 = _tuple$5[1]; - if (!ascii$1) { - c.SameSite = 1; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - } - _2 = lowerVal; - if (_2 === ("lax")) { - c.SameSite = 2; - } else if (_2 === ("strict")) { - c.SameSite = 3; - } else if (_2 === ("none")) { - c.SameSite = 4; - } else { - c.SameSite = 1; - } - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - $s = 17; continue; - /* } else if (_1 === ("secure")) { */ case 11: - c.Secure = true; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - $s = 17; continue; - /* } else if (_1 === ("httponly")) { */ case 12: - c.HttpOnly = true; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - $s = 17; continue; - /* } else if (_1 === ("domain")) { */ case 13: - c.Domain = val; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - $s = 17; continue; - /* } else if (_1 === ("max-age")) { */ case 14: - _tuple$6 = strconv.Atoi(val); - secs = _tuple$6[0]; - err = _tuple$6[1]; - if (!($interfaceIsEqual(err, $ifaceNil)) || !((secs === 0)) && (val.charCodeAt(0) === 48)) { - /* break; */ $s = 9; continue; - } - if (secs <= 0) { - secs = -1; - } - c.MaxAge = secs; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - $s = 17; continue; - /* } else if (_1 === ("expires")) { */ case 15: - c.RawExpires = val; - _r$4 = time.Parse("Mon, 02 Jan 2006 15:04:05 MST", val); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$7 = _r$4; - exptime = $clone(_tuple$7[0], time.Time); - err$1 = _tuple$7[1]; - /* */ if (!($interfaceIsEqual(err$1, $ifaceNil))) { $s = 20; continue; } - /* */ $s = 21; continue; - /* if (!($interfaceIsEqual(err$1, $ifaceNil))) { */ case 20: - _r$5 = time.Parse("Mon, 02-Jan-2006 15:04:05 MST", val); /* */ $s = 22; case 22: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _tuple$8 = _r$5; - time.Time.copy(exptime, _tuple$8[0]); - err$1 = _tuple$8[1]; - if (!($interfaceIsEqual(err$1, $ifaceNil))) { - time.Time.copy(c.Expires, new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil)); - /* break; */ $s = 9; continue; - } - /* } */ case 21: - time.Time.copy(c.Expires, $clone(exptime, time.Time).UTC()); - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - $s = 17; continue; - /* } else if (_1 === ("path")) { */ case 16: - c.Path = val; - i = i + (1) >> 0; - /* continue; */ $s = 6; continue; - /* } */ case 17: - case 9: - c.Unparsed = $append(c.Unparsed, ((i < 0 || i >= parts.$length) ? ($throwRuntimeError("index out of range"), undefined) : parts.$array[parts.$offset + i])); - i = i + (1) >> 0; - $s = 6; continue; - case 7: - cookies = $append(cookies, c); - _i++; - $s = 1; continue; - case 2: - $s = -1; return cookies; - /* */ } return; } var $f = {$blk: readSetCookies, $c: true, $r, _1, _2, _entry, _entry$1, _i, _r$1, _r$2, _r$3, _r$4, _r$5, _ref, _tuple, _tuple$1, _tuple$2, _tuple$3, _tuple$4, _tuple$5, _tuple$6, _tuple$7, _tuple$8, ascii$1, attr, c, cookieCount, cookies, err, err$1, exptime, h, i, isASCII, line, lowerAttr, lowerVal, name, ok, parts, secs, val, value, $s};return $f; - }; - Cookie.ptr.prototype.String = function() { - var {_1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, b, buf, c, d, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c === ptrType$62.nil) { _v = true; $s = 3; continue s; } - _r$1 = isCookieNameValid(c.Name); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _v = !_r$1; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return ""; - /* } */ case 2: - b = new strings.Builder.ptr(ptrType$111.nil, sliceType$3.nil); - b.Grow((((c.Name.length + c.Value.length >> 0) + c.Domain.length >> 0) + c.Path.length >> 0) + 110 >> 0); - b.WriteString(c.Name); - b.WriteRune(61); - _r$2 = sanitizeCookieValue(c.Value); /* */ $s = 5; case 5: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$3 = b.WriteString(_r$2); /* */ $s = 6; case 6: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - /* */ if (c.Path.length > 0) { $s = 7; continue; } - /* */ $s = 8; continue; - /* if (c.Path.length > 0) { */ case 7: - b.WriteString("; Path="); - _r$4 = sanitizeCookiePath(c.Path); /* */ $s = 9; case 9: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$5 = b.WriteString(_r$4); /* */ $s = 10; case 10: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$5; - /* } */ case 8: - /* */ if (c.Domain.length > 0) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (c.Domain.length > 0) { */ case 11: - /* */ if (validCookieDomain(c.Domain)) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (validCookieDomain(c.Domain)) { */ case 13: - d = c.Domain; - if (d.charCodeAt(0) === 46) { - d = $substring(d, 1); - } - b.WriteString("; Domain="); - b.WriteString(d); - $s = 15; continue; - /* } else { */ case 14: - $r = log.Printf("net/http: invalid Cookie.Domain %q; dropping domain attribute", new sliceType([new $String(c.Domain)])); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 15: - /* } */ case 12: - buf = arrayType$3.zero(); - _r$6 = validCookieExpires($clone(c.Expires, time.Time)); /* */ $s = 19; case 19: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - /* */ if (_r$6) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (_r$6) { */ case 17: - b.WriteString("; Expires="); - _r$7 = $clone($clone(c.Expires, time.Time).UTC(), time.Time).AppendFormat($subslice(new sliceType$3(buf), 0, 0), "Mon, 02 Jan 2006 15:04:05 GMT"); /* */ $s = 20; case 20: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$8 = b.Write(_r$7); /* */ $s = 21; case 21: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 18: - if (c.MaxAge > 0) { - b.WriteString("; Max-Age="); - b.Write(strconv.AppendInt($subslice(new sliceType$3(buf), 0, 0), (new $Int64(0, c.MaxAge)), 10)); - } else if (c.MaxAge < 0) { - b.WriteString("; Max-Age=0"); - } - if (c.HttpOnly) { - b.WriteString("; HttpOnly"); - } - if (c.Secure) { - b.WriteString("; Secure"); - } - _1 = c.SameSite; - if (_1 === (1)) { - } else if (_1 === (4)) { - b.WriteString("; SameSite=None"); - } else if (_1 === (2)) { - b.WriteString("; SameSite=Lax"); - } else if (_1 === (3)) { - b.WriteString("; SameSite=Strict"); - } - $s = -1; return b.String(); - /* */ } return; } var $f = {$blk: Cookie.ptr.prototype.String, $c: true, $r, _1, _r$1, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _v, b, buf, c, d, $s};return $f; - }; - Cookie.prototype.String = function() { return this.$val.String(); }; - Cookie.ptr.prototype.Valid = function() { - var {$24r, $24r$1, _r$1, _r$2, _r$3, _r$4, c, i, i$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - c = this; - if (c === ptrType$62.nil) { - $s = -1; return errors.New("http: nil Cookie"); - } - _r$1 = isCookieNameValid(c.Name); /* */ $s = 3; case 3: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!_r$1) { */ case 1: - $s = -1; return errors.New("http: invalid Cookie.Name"); - /* } */ case 2: - _r$2 = validCookieExpires($clone(c.Expires, time.Time)); /* */ $s = 6; case 6: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (!_r$2) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!_r$2) { */ case 4: - $s = -1; return errors.New("http: invalid Cookie.Expires"); - /* } */ case 5: - i = 0; - /* while (true) { */ case 7: - /* if (!(i < c.Value.length)) { break; } */ if(!(i < c.Value.length)) { $s = 8; continue; } - /* */ if (!validCookieValueByte(c.Value.charCodeAt(i))) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!validCookieValueByte(c.Value.charCodeAt(i))) { */ case 9: - _r$3 = fmt.Errorf("http: invalid byte %q in Cookie.Value", new sliceType([new $Uint8(c.Value.charCodeAt(i))])); /* */ $s = 11; case 11: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r = _r$3; - $s = 12; case 12: return $24r; - /* } */ case 10: - i = i + (1) >> 0; - $s = 7; continue; - case 8: - /* */ if (c.Path.length > 0) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (c.Path.length > 0) { */ case 13: - i$1 = 0; - /* while (true) { */ case 15: - /* if (!(i$1 < c.Path.length)) { break; } */ if(!(i$1 < c.Path.length)) { $s = 16; continue; } - /* */ if (!validCookiePathByte(c.Path.charCodeAt(i$1))) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!validCookiePathByte(c.Path.charCodeAt(i$1))) { */ case 17: - _r$4 = fmt.Errorf("http: invalid byte %q in Cookie.Path", new sliceType([new $Uint8(c.Path.charCodeAt(i$1))])); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$1 = _r$4; - $s = 20; case 20: return $24r$1; - /* } */ case 18: - i$1 = i$1 + (1) >> 0; - $s = 15; continue; - case 16: - /* } */ case 14: - if (c.Domain.length > 0) { - if (!validCookieDomain(c.Domain)) { - $s = -1; return errors.New("http: invalid Cookie.Domain"); - } - } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: Cookie.ptr.prototype.Valid, $c: true, $r, $24r, $24r$1, _r$1, _r$2, _r$3, _r$4, c, i, i$1, $s};return $f; - }; - Cookie.prototype.Valid = function() { return this.$val.Valid(); }; - readCookies = function(h, filter) { - var {_entry, _i, _r$1, _ref, _tuple, _tuple$1, _tuple$2, cookies, filter, h, line, lines, name, ok, part, val, $s, $r, $c} = $restore(this, {h, filter}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lines = (_entry = h[$String.keyFor("Cookie")], _entry !== undefined ? _entry.v : sliceType$2.nil); - if (lines.$length === 0) { - $s = -1; return new sliceType$29([]); - } - cookies = $makeSlice(sliceType$29, 0, (lines.$length + strings.Count((0 >= lines.$length ? ($throwRuntimeError("index out of range"), undefined) : lines.$array[lines.$offset + 0]), ";") >> 0)); - _ref = lines; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - line = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - line = textproto.TrimString(line); - part = ""; - /* while (true) { */ case 3: - /* if (!(line.length > 0)) { break; } */ if(!(line.length > 0)) { $s = 4; continue; } - _tuple = strings.Cut(line, ";"); - part = _tuple[0]; - line = _tuple[1]; - part = textproto.TrimString(part); - if (part === "") { - /* continue; */ $s = 3; continue; - } - _tuple$1 = strings.Cut(part, "="); - name = _tuple$1[0]; - val = _tuple$1[1]; - _r$1 = isCookieNameValid(name); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (!_r$1) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!_r$1) { */ case 5: - /* continue; */ $s = 3; continue; - /* } */ case 6: - if (!(filter === "") && !(filter === name)) { - /* continue; */ $s = 3; continue; - } - _tuple$2 = parseCookieValue(val, true); - val = _tuple$2[0]; - ok = _tuple$2[1]; - if (!ok) { - /* continue; */ $s = 3; continue; - } - cookies = $append(cookies, new Cookie.ptr(name, val, "", "", new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), "", 0, false, false, 0, "", sliceType$2.nil)); - $s = 3; continue; - case 4: - _i++; - $s = 1; continue; - case 2: - $s = -1; return cookies; - /* */ } return; } var $f = {$blk: readCookies, $c: true, $r, _entry, _i, _r$1, _ref, _tuple, _tuple$1, _tuple$2, cookies, filter, h, line, lines, name, ok, part, val, $s};return $f; - }; - validCookieDomain = function(v) { - var v; - if (isCookieDomainName(v)) { - return true; - } - if (!(net.ParseIP(v) === net.IP.nil) && !strings.Contains(v, ":")) { - return true; - } - return false; - }; - validCookieExpires = function(t) { - var {$24r, _r$1, t, $s, $r, $c} = $restore(this, {t}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = $clone(t, time.Time).Year(); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1 >= 1601; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: validCookieExpires, $c: true, $r, $24r, _r$1, t, $s};return $f; - }; - isCookieDomainName = function(s) { - var c, i, last, ok, partlen, s; - if (s.length === 0) { - return false; - } - if (s.length > 255) { - return false; - } - if (s.charCodeAt(0) === 46) { - s = $substring(s, 1); - } - last = 46; - ok = false; - partlen = 0; - i = 0; - while (true) { - if (!(i < s.length)) { break; } - c = s.charCodeAt(i); - if (97 <= c && c <= 122 || 65 <= c && c <= 90) { - ok = true; - partlen = partlen + (1) >> 0; - } else if (48 <= c && c <= 57) { - partlen = partlen + (1) >> 0; - } else if ((c === 45)) { - if (last === 46) { - return false; - } - partlen = partlen + (1) >> 0; - } else if ((c === 46)) { - if ((last === 46) || (last === 45)) { - return false; - } - if (partlen > 63 || (partlen === 0)) { - return false; - } - partlen = 0; - } else { - return false; - } - last = c; - i = i + (1) >> 0; - } - if ((last === 45) || partlen > 63) { - return false; - } - return ok; - }; - sanitizeCookieName = function(n) { - var {$24r, _r$1, n, $s, $r, $c} = $restore(this, {n}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = cookieNameSanitizer.Replace(n); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: sanitizeCookieName, $c: true, $r, $24r, _r$1, n, $s};return $f; - }; - sanitizeCookieValue = function(v) { - var {_r$1, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = sanitizeOrWarn("Cookie.Value", validCookieValueByte, v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - v = _r$1; - if (v.length === 0) { - $s = -1; return v; - } - if (strings.ContainsAny(v, " ,")) { - $s = -1; return "\"" + v + "\""; - } - $s = -1; return v; - /* */ } return; } var $f = {$blk: sanitizeCookieValue, $c: true, $r, _r$1, v, $s};return $f; - }; - validCookieValueByte = function(b) { - var b; - return 32 <= b && b < 127 && !((b === 34)) && !((b === 59)) && !((b === 92)); - }; - sanitizeCookiePath = function(v) { - var {$24r, _r$1, v, $s, $r, $c} = $restore(this, {v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = sanitizeOrWarn("Cookie.Path", validCookiePathByte, v); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: sanitizeCookiePath, $c: true, $r, $24r, _r$1, v, $s};return $f; - }; - validCookiePathByte = function(b) { - var b; - return 32 <= b && b < 127 && !((b === 59)); - }; - sanitizeOrWarn = function(fieldName, valid, v) { - var {_r$1, _r$2, b, buf, fieldName, i, i$1, ok, v, valid, $s, $r, $c} = $restore(this, {fieldName, valid, v}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ok = true; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < v.length)) { break; } */ if(!(i < v.length)) { $s = 2; continue; } - _r$1 = valid(v.charCodeAt(i)); /* */ $s = 5; case 5: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - /* */ if (_r$1) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_r$1) { */ case 3: - i = i + (1) >> 0; - /* continue; */ $s = 1; continue; - /* } */ case 4: - $r = log.Printf("net/http: invalid byte %q in %s; dropping invalid bytes", new sliceType([new $Uint8(v.charCodeAt(i)), new $String(fieldName)])); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - ok = false; - /* break; */ $s = 2; continue; - case 2: - if (ok) { - $s = -1; return v; - } - buf = $makeSlice(sliceType$3, 0, v.length); - i$1 = 0; - /* while (true) { */ case 7: - /* if (!(i$1 < v.length)) { break; } */ if(!(i$1 < v.length)) { $s = 8; continue; } - b = v.charCodeAt(i$1); - _r$2 = valid(b); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - /* */ if (_r$2) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (_r$2) { */ case 9: - buf = $append(buf, b); - /* } */ case 10: - i$1 = i$1 + (1) >> 0; - $s = 7; continue; - case 8: - $s = -1; return ($bytesToString(buf)); - /* */ } return; } var $f = {$blk: sanitizeOrWarn, $c: true, $r, _r$1, _r$2, b, buf, fieldName, i, i$1, ok, v, valid, $s};return $f; - }; - parseCookieValue = function(raw, allowDoubleQuote) { - var allowDoubleQuote, i, raw; - if (allowDoubleQuote && raw.length > 1 && (raw.charCodeAt(0) === 34) && (raw.charCodeAt((raw.length - 1 >> 0)) === 34)) { - raw = $substring(raw, 1, (raw.length - 1 >> 0)); - } - i = 0; - while (true) { - if (!(i < raw.length)) { break; } - if (!validCookieValueByte(raw.charCodeAt(i))) { - return ["", false]; - } - i = i + (1) >> 0; - } - return [raw, true]; - }; - isCookieNameValid = function(raw) { - var {$24r, _r$1, raw, $s, $r, $c} = $restore(this, {raw}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (raw === "") { - $s = -1; return false; - } - _r$1 = strings.IndexFunc(raw, isNotToken); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1 < 0; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: isCookieNameValid, $c: true, $r, $24r, _r$1, raw, $s};return $f; - }; - cloneURLValues = function(v) { - var v; - if (v === false) { - return false; - } - return (new Header((v)).Clone()); - }; - cloneURL = function(u) { - var u, u2; - if (u === ptrType$17.nil) { - return ptrType$17.nil; - } - u2 = new url.URL.ptr("", "", ptrType$21.nil, "", "", "", false, "", "", ""); - url.URL.copy(u2, u); - if (!(u.User === ptrType$21.nil)) { - u2.User = new url.Userinfo.ptr("", "", false); - url.Userinfo.copy(u2.User, u.User); - } - return u2; - }; - cloneMultipartForm = function(f) { - var _entry, _i, _i$1, _key, _keys, _ref, _ref$1, f, f2, i, k, m, v, vv, vv2; - if (f === ptrType$31.nil) { - return ptrType$31.nil; - } - f2 = new multipart.Form.ptr((new Header((f.Value)).Clone()), false); - if (!(f.File === false)) { - m = {}; - _ref = f.File; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - vv = _entry.v; - vv2 = $makeSlice(sliceType$20, vv.$length); - _ref$1 = vv; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - v = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - ((i < 0 || i >= vv2.$length) ? ($throwRuntimeError("index out of range"), undefined) : vv2.$array[vv2.$offset + i] = cloneMultipartFileHeader(v)); - _i$1++; - } - _key = k; (m || $throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(_key)] = { k: _key, v: vv2 }; - _i++; - } - f2.File = m; - } - return f2; - }; - cloneMultipartFileHeader = function(fh) { - var fh, fh2; - if (fh === ptrType$66.nil) { - return ptrType$66.nil; - } - fh2 = new multipart.FileHeader.ptr("", false, new $Int64(0, 0), sliceType$3.nil, ""); - multipart.FileHeader.copy(fh2, fh); - fh2.Header = (new Header((fh.Header)).Clone()); - return fh2; - }; - basicAuth = function(username, password) { - var auth, password, username; - auth = username + ":" + password; - return base64.StdEncoding.EncodeToString((new sliceType$3($stringToBytes(auth)))); - }; - noTransport.ptr.prototype.RoundTrip = function(req) { - var req; - return [ptrType$18.nil, errors.New("net/http: neither of Fetch nor XMLHttpRequest APIs is available")]; - }; - noTransport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; - XHRTransport.ptr.prototype.RoundTrip = function(req) { - var {$24r, $24r$1, $24r$2, _arg, _arg$1, _entry, _i, _i$1, _key, _keys, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _selection, _tuple, body$1, err, err$1, errCh, key, req, resp, respCh, t, value, values, xhr, $s, $deferred, $r, $c} = $restore(this, {req}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - errCh = [errCh]; - req = [req]; - respCh = [respCh]; - xhr = [xhr]; - t = this; - xhr[0] = new ($global.XMLHttpRequest)(); - if (t.inflight === false) { - t.inflight = $makeMap(ptrType$11.keyFor, []); - } - _key = req[0]; (t.inflight || $throwRuntimeError("assignment to entry in nil map"))[ptrType$11.keyFor(_key)] = { k: _key, v: xhr[0] }; - $deferred.push([function(_arg, _arg$1) { delete _arg[ptrType$11.keyFor(_arg$1)]; }, [t.inflight, req[0]]]); - respCh[0] = new $Chan(ptrType$18, 0); - errCh[0] = new $Chan($error, 0); - xhr[0].onload = $externalize((function(errCh, req, respCh, xhr) { return function $b() { - var {_1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, body$1, contentLength, err, header, l, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = textproto.NewReader(bufio.NewReader(bytes.NewReader((new sliceType$3($stringToBytes($internalize(xhr[0].getAllResponseHeaders(), $String) + "\n")))))); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$2 = _r$1.ReadMIMEHeader(); /* */ $s = 2; case 2: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple = _r$2; - header = _tuple[0]; - body$1 = $assertType($internalize(new ($global.Uint8Array)(xhr[0].response), $emptyInterface), sliceType$3); - contentLength = new $Int64(-1, 4294967295); - _1 = req[0].Method; - /* */ if (_1 === ("HEAD")) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (_1 === ("HEAD")) { */ case 4: - _r$3 = new textproto.MIMEHeader(header).Get("Content-Length"); /* */ $s = 7; case 7: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$4 = strconv.ParseInt(_r$3, 10, 64); /* */ $s = 8; case 8: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _tuple$1 = _r$4; - l = _tuple$1[0]; - err = _tuple$1[1]; - if ($interfaceIsEqual(err, $ifaceNil)) { - contentLength = l; - } - $s = 6; continue; - /* } else { */ case 5: - contentLength = (new $Int64(0, body$1.$length)); - /* } */ case 6: - case 3: - $r = $send(respCh[0], new Response.ptr($internalize(xhr[0].status, $String) + " " + $internalize(xhr[0].statusText, $String), $parseInt(xhr[0].status) >> 0, "", 0, 0, (header), ioutil.NopCloser(bytes.NewReader(body$1)), contentLength, sliceType$2.nil, false, false, false, req[0], ptrType$28.nil)); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _1, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, body$1, contentLength, err, header, l, $s};return $f; - }; })(errCh, req, respCh, xhr), funcType); - xhr[0].onerror = $externalize((function(errCh, req, respCh, xhr) { return function $b(e) { - var {e, $s, $r, $c} = $restore(this, {e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(errCh[0], errors.New("net/http: XMLHttpRequest failed")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, e, $s};return $f; - }; })(errCh, req, respCh, xhr), funcType$3); - xhr[0].onabort = $externalize((function(errCh, req, respCh, xhr) { return function $b(e) { - var {e, $s, $r, $c} = $restore(this, {e}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = $send(errCh[0], errors.New("net/http: request canceled")); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, e, $s};return $f; - }; })(errCh, req, respCh, xhr), funcType$3); - xhr[0].open($externalize(req[0].Method, $String), $externalize(req[0].URL.String(), $String)); - xhr[0].responseType = $externalize("arraybuffer", $String); - _ref = req[0].Header; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - key = _entry.k; - values = _entry.v; - _ref$1 = values; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - value = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - xhr[0].setRequestHeader($externalize(key, $String), $externalize(value, $String)); - _i$1++; - } - _i++; - } - /* */ if ($interfaceIsEqual(req[0].Body, $ifaceNil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if ($interfaceIsEqual(req[0].Body, $ifaceNil)) { */ case 1: - xhr[0].send(); - $s = 3; continue; - /* } else { */ case 2: - _r$1 = ioutil.ReadAll(req[0].Body); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - body$1 = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 5: - _r$2 = req[0].Body.Close(); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $24r = [ptrType$18.nil, err]; - $s = 8; case 8: return $24r; - /* } */ case 6: - _r$3 = req[0].Body.Close(); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - xhr[0].send($externalize(body$1, sliceType$3)); - /* } */ case 3: - _r$4 = $select([[respCh[0]], [errCh[0]]]); /* */ $s = 10; case 10: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _selection = _r$4; - /* */ if (_selection[0] === 0) { $s = 11; continue; } - /* */ if (_selection[0] === 1) { $s = 12; continue; } - /* */ $s = 13; continue; - /* if (_selection[0] === 0) { */ case 11: - resp = _selection[1][0]; - $24r$1 = [resp, $ifaceNil]; - $s = 14; case 14: return $24r$1; - /* } else if (_selection[0] === 1) { */ case 12: - err$1 = _selection[1][0]; - $24r$2 = [ptrType$18.nil, err$1]; - $s = 15; case 15: return $24r$2; - /* } */ case 13: - $s = -1; return [ptrType$18.nil, $ifaceNil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [ptrType$18.nil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: XHRTransport.ptr.prototype.RoundTrip, $c: true, $r, $24r, $24r$1, $24r$2, _arg, _arg$1, _entry, _i, _i$1, _key, _keys, _r$1, _r$2, _r$3, _r$4, _ref, _ref$1, _selection, _tuple, body$1, err, err$1, errCh, key, req, resp, respCh, t, value, values, xhr, $s, $deferred};return $f; } } - }; - XHRTransport.prototype.RoundTrip = function(req) { return this.$val.RoundTrip(req); }; - XHRTransport.ptr.prototype.CancelRequest = function(req) { - var _entry, _tuple, ok, req, t, xhr; - t = this; - _tuple = (_entry = t.inflight[ptrType$11.keyFor(req)], _entry !== undefined ? [_entry.v, true] : [null, false]); - xhr = _tuple[0]; - ok = _tuple[1]; - if (ok) { - xhr.abort(); - } - }; - XHRTransport.prototype.CancelRequest = function(req) { return this.$val.CancelRequest(req); }; - ptrType$27.methods = [{prop: "writeBufferSize", name: "writeBufferSize", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "readBufferSize", name: "readBufferSize", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [ptrType$27], false)}, {prop: "hasCustomTLSDialer", name: "hasCustomTLSDialer", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "onceSetNextProtoDefaults", name: "onceSetNextProtoDefaults", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "useRegisteredProtocol", name: "useRegisteredProtocol", pkg: "net/http", typ: $funcType([ptrType$11], [$Bool], false)}, {prop: "alternateRoundTripper", name: "alternateRoundTripper", pkg: "net/http", typ: $funcType([ptrType$11], [RoundTripper], false)}, {prop: "roundTrip", name: "roundTrip", pkg: "net/http", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}, {prop: "RegisterProtocol", name: "RegisterProtocol", pkg: "", typ: $funcType([$String, RoundTripper], [], false)}, {prop: "CloseIdleConnections", name: "CloseIdleConnections", pkg: "", typ: $funcType([], [], false)}, {prop: "CancelRequest", name: "CancelRequest", pkg: "", typ: $funcType([ptrType$11], [], false)}, {prop: "cancelRequest", name: "cancelRequest", pkg: "net/http", typ: $funcType([cancelKey, $error], [$Bool], false)}, {prop: "connectMethodForRequest", name: "connectMethodForRequest", pkg: "net/http", typ: $funcType([ptrType$114], [connectMethod, $error], false)}, {prop: "putOrCloseIdleConn", name: "putOrCloseIdleConn", pkg: "net/http", typ: $funcType([ptrType$22], [], false)}, {prop: "maxIdleConnsPerHost", name: "maxIdleConnsPerHost", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "tryPutIdleConn", name: "tryPutIdleConn", pkg: "net/http", typ: $funcType([ptrType$22], [$error], false)}, {prop: "queueForIdleConn", name: "queueForIdleConn", pkg: "net/http", typ: $funcType([ptrType$24], [$Bool], false)}, {prop: "removeIdleConn", name: "removeIdleConn", pkg: "net/http", typ: $funcType([ptrType$22], [$Bool], false)}, {prop: "removeIdleConnLocked", name: "removeIdleConnLocked", pkg: "net/http", typ: $funcType([ptrType$22], [$Bool], false)}, {prop: "setReqCanceler", name: "setReqCanceler", pkg: "net/http", typ: $funcType([cancelKey, funcType$4], [], false)}, {prop: "replaceReqCanceler", name: "replaceReqCanceler", pkg: "net/http", typ: $funcType([cancelKey, funcType$4], [$Bool], false)}, {prop: "dial", name: "dial", pkg: "net/http", typ: $funcType([context.Context, $String, $String], [net.Conn, $error], false)}, {prop: "customDialTLS", name: "customDialTLS", pkg: "net/http", typ: $funcType([context.Context, $String, $String], [net.Conn, $error], false)}, {prop: "getConn", name: "getConn", pkg: "net/http", typ: $funcType([ptrType$114, connectMethod], [ptrType$22, $error], false)}, {prop: "queueForDial", name: "queueForDial", pkg: "net/http", typ: $funcType([ptrType$24], [], false)}, {prop: "dialConnFor", name: "dialConnFor", pkg: "net/http", typ: $funcType([ptrType$24], [], false)}, {prop: "decConnsPerHost", name: "decConnsPerHost", pkg: "net/http", typ: $funcType([connectMethodKey], [], false)}, {prop: "dialConn", name: "dialConn", pkg: "net/http", typ: $funcType([context.Context, connectMethod], [ptrType$22, $error], false)}, {prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}]; - ptrType$114.methods = [{prop: "extraHeaders", name: "extraHeaders", pkg: "net/http", typ: $funcType([], [Header], false)}, {prop: "setError", name: "setError", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}]; - ptrType$20.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - transportReadFromServerError.methods = [{prop: "Unwrap", name: "Unwrap", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$24.methods = [{prop: "waiting", name: "waiting", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "tryDeliver", name: "tryDeliver", pkg: "net/http", typ: $funcType([ptrType$22, $error], [$Bool], false)}, {prop: "cancel", name: "cancel", pkg: "net/http", typ: $funcType([ptrType$27, $error], [], false)}]; - ptrType$115.methods = [{prop: "len", name: "len", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "pushBack", name: "pushBack", pkg: "net/http", typ: $funcType([ptrType$24], [], false)}, {prop: "popFront", name: "popFront", pkg: "net/http", typ: $funcType([], [ptrType$24], false)}, {prop: "peekFront", name: "peekFront", pkg: "net/http", typ: $funcType([], [ptrType$24], false)}, {prop: "cleanFront", name: "cleanFront", pkg: "net/http", typ: $funcType([], [$Bool], false)}]; - persistConnWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}]; - ptrType$116.methods = [{prop: "proxyAuth", name: "proxyAuth", pkg: "net/http", typ: $funcType([], [$String], false)}, {prop: "key", name: "key", pkg: "net/http", typ: $funcType([], [connectMethodKey], false)}, {prop: "scheme", name: "scheme", pkg: "net/http", typ: $funcType([], [$String], false)}, {prop: "addr", name: "addr", pkg: "net/http", typ: $funcType([], [$String], false)}, {prop: "tlsHost", name: "tlsHost", pkg: "net/http", typ: $funcType([], [$String], false)}]; - connectMethodKey.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$22.methods = [{prop: "shouldRetryRequest", name: "shouldRetryRequest", pkg: "net/http", typ: $funcType([ptrType$11, $error], [$Bool], false)}, {prop: "addTLS", name: "addTLS", pkg: "net/http", typ: $funcType([context.Context, $String, ptrType$19], [$error], false)}, {prop: "maxHeaderResponseSize", name: "maxHeaderResponseSize", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "isBroken", name: "isBroken", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "canceled", name: "canceled", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "isReused", name: "isReused", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "gotIdleConnTrace", name: "gotIdleConnTrace", pkg: "net/http", typ: $funcType([time.Time], [httptrace.GotConnInfo], false)}, {prop: "cancelRequest", name: "cancelRequest", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeConnIfStillIdle", name: "closeConnIfStillIdle", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "mapRoundTripError", name: "mapRoundTripError", pkg: "net/http", typ: $funcType([ptrType$114, $Int64, $error], [$error], false)}, {prop: "readLoop", name: "readLoop", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "readLoopPeekFailLocked", name: "readLoopPeekFailLocked", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "readResponse", name: "readResponse", pkg: "net/http", typ: $funcType([requestAndChan, ptrType$19], [ptrType$18, $error], false)}, {prop: "waitForContinue", name: "waitForContinue", pkg: "net/http", typ: $funcType([chanType$2], [funcType$10], false)}, {prop: "writeLoop", name: "writeLoop", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "wroteRequest", name: "wroteRequest", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "roundTrip", name: "roundTrip", pkg: "net/http", typ: $funcType([ptrType$114], [ptrType$18, $error], false)}, {prop: "markReused", name: "markReused", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeLocked", name: "closeLocked", pkg: "net/http", typ: $funcType([$error], [], false)}]; - ptrType$117.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$118.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$32.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "condfn", name: "condfn", pkg: "net/http", typ: $funcType([$error], [$error], false)}]; - ptrType$119.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - tlsHandshakeTimeoutError.methods = [{prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - fakeLocker.methods = [{prop: "Lock", name: "Lock", pkg: "", typ: $funcType([], [], false)}, {prop: "Unlock", name: "Unlock", pkg: "", typ: $funcType([], [], false)}]; - ptrType$120.methods = [{prop: "add", name: "add", pkg: "net/http", typ: $funcType([ptrType$22], [], false)}, {prop: "removeOldest", name: "removeOldest", pkg: "net/http", typ: $funcType([], [ptrType$22], false)}, {prop: "remove", name: "remove", pkg: "net/http", typ: $funcType([ptrType$22], [], false)}, {prop: "len", name: "len", pkg: "net/http", typ: $funcType([], [$Int], false)}]; - errorReader.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$121.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$35.methods = [{prop: "shouldSendChunkedRequestBody", name: "shouldSendChunkedRequestBody", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "probeRequestBody", name: "probeRequestBody", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shouldSendContentLength", name: "shouldSendContentLength", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([io.Writer, ptrType$19], [$error], false)}, {prop: "writeBody", name: "writeBody", pkg: "net/http", typ: $funcType([io.Writer], [$error], false)}, {prop: "doBodyCopy", name: "doBodyCopy", pkg: "net/http", typ: $funcType([io.Writer, io.Reader], [$Int64, $error], false)}, {prop: "unwrapBody", name: "unwrapBody", pkg: "net/http", typ: $funcType([], [io.Reader], false)}]; - ptrType$122.methods = [{prop: "protoAtLeast", name: "protoAtLeast", pkg: "net/http", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "parseTransferEncoding", name: "parseTransferEncoding", pkg: "net/http", typ: $funcType([], [$error], false)}]; - ptrType$36.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$52.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "readLocked", name: "readLocked", pkg: "net/http", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "readTrailer", name: "readTrailer", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "unreadDataSizeLocked", name: "unreadDataSizeLocked", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "didEarlyClose", name: "didEarlyClose", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "bodyRemains", name: "bodyRemains", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "registerOnHitEOF", name: "registerOnHitEOF", pkg: "net/http", typ: $funcType([funcType], [], false)}]; - bodyLocked.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - finishAsyncByteRead.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - bufioFlushWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - socksCommand.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - socksReply.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$42.methods = [{prop: "Network", name: "Network", pkg: "", typ: $funcType([], [$String], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$43.methods = [{prop: "BoundAddr", name: "BoundAddr", pkg: "", typ: $funcType([], [net.Addr], false)}]; - ptrType$123.methods = [{prop: "connect", name: "connect", pkg: "net/http", typ: $funcType([context.Context, net.Conn, $String], [net.Addr, $error], false)}, {prop: "DialContext", name: "DialContext", pkg: "", typ: $funcType([context.Context, $String, $String], [net.Conn, $error], false)}, {prop: "DialWithConn", name: "DialWithConn", pkg: "", typ: $funcType([context.Context, net.Conn, $String, $String], [net.Addr, $error], false)}, {prop: "Dial", name: "Dial", pkg: "", typ: $funcType([$String, $String], [net.Conn, $error], false)}, {prop: "validateTarget", name: "validateTarget", pkg: "net/http", typ: $funcType([$String, $String], [$error], false)}, {prop: "pathAddrs", name: "pathAddrs", pkg: "net/http", typ: $funcType([$String], [net.Addr, net.Addr, $error], false)}]; - ptrType$124.methods = [{prop: "Authenticate", name: "Authenticate", pkg: "", typ: $funcType([context.Context, io.ReadWriter, socksAuthMethod], [$error], false)}]; - ptrType$125.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; - ptrType$126.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; - htmlSig.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; - mp4Sig.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; - textSig.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]; - ptrType$53.methods = [{prop: "hijacked", name: "hijacked", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "hijackLocked", name: "hijackLocked", pkg: "net/http", typ: $funcType([], [net.Conn, ptrType$44, $error], false)}, {prop: "readRequest", name: "readRequest", pkg: "net/http", typ: $funcType([context.Context], [ptrType$49, $error], false)}, {prop: "finalFlush", name: "finalFlush", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "closeWriteAndWait", name: "closeWriteAndWait", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setState", name: "setState", pkg: "net/http", typ: $funcType([net.Conn, ConnState, $Bool], [], false)}, {prop: "getState", name: "getState", pkg: "net/http", typ: $funcType([], [ConnState, $Int64], false)}, {prop: "serve", name: "serve", pkg: "net/http", typ: $funcType([context.Context], [], false)}]; - ptrType$127.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "flush", name: "flush", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([sliceType$3], [], false)}]; - ptrType$49.methods = [{prop: "finalTrailers", name: "finalTrailers", pkg: "net/http", typ: $funcType([], [Header], false)}, {prop: "declareTrailer", name: "declareTrailer", pkg: "net/http", typ: $funcType([$String], [], false)}, {prop: "requestTooLarge", name: "requestTooLarge", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "needsSniff", name: "needsSniff", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "ReadFrom", name: "ReadFrom", pkg: "", typ: $funcType([io.Reader], [$Int64, $error], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "bodyAllowed", name: "bodyAllowed", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([$Int, sliceType$3, $String], [$Int, $error], false)}, {prop: "finishRequest", name: "finishRequest", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "shouldReuseConnection", name: "shouldReuseConnection", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closedRequestBodyEarly", name: "closedRequestBodyEarly", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "sendExpectationFailed", name: "sendExpectationFailed", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Hijack", name: "Hijack", pkg: "", typ: $funcType([], [net.Conn, ptrType$44, $error], false)}, {prop: "CloseNotify", name: "CloseNotify", pkg: "", typ: $funcType([], [chanType$9], false)}]; - ptrType$51.methods = [{prop: "isSet", name: "isSet", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "setTrue", name: "setTrue", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setFalse", name: "setFalse", pkg: "net/http", typ: $funcType([], [], false)}]; - ptrType$47.methods = [{prop: "lock", name: "lock", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "unlock", name: "unlock", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startBackgroundRead", name: "startBackgroundRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "backgroundRead", name: "backgroundRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "abortPendingRead", name: "abortPendingRead", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "setReadLimit", name: "setReadLimit", pkg: "net/http", typ: $funcType([$Int64], [], false)}, {prop: "setInfiniteReadLimit", name: "setInfiniteReadLimit", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "hitReadLimit", name: "hitReadLimit", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "handleReadError", name: "handleReadError", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "closeNotify", name: "closeNotify", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$55.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - extraHeader.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([ptrType$14], [], false)}]; - statusError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - HandlerFunc.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}]; - ptrType$128.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}]; - ptrType$129.methods = [{prop: "match", name: "match", pkg: "net/http", typ: $funcType([$String], [Handler, $String], false)}, {prop: "redirectToPathSlash", name: "redirectToPathSlash", pkg: "net/http", typ: $funcType([$String, $String, ptrType$17], [ptrType$17, $Bool], false)}, {prop: "shouldRedirectRLocked", name: "shouldRedirectRLocked", pkg: "net/http", typ: $funcType([$String, $String], [$Bool], false)}, {prop: "Handler", name: "Handler", pkg: "", typ: $funcType([ptrType$11], [Handler, $String], false)}, {prop: "handler", name: "handler", pkg: "net/http", typ: $funcType([$String, $String], [Handler, $String], false)}, {prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}, {prop: "Handle", name: "Handle", pkg: "", typ: $funcType([$String, Handler], [], false)}, {prop: "HandleFunc", name: "HandleFunc", pkg: "", typ: $funcType([$String, funcType$15], [], false)}]; - ptrType$46.methods = [{prop: "newConn", name: "newConn", pkg: "net/http", typ: $funcType([net.Conn], [ptrType$53], false)}, {prop: "maxHeaderBytes", name: "maxHeaderBytes", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "initialReadLimitSize", name: "initialReadLimitSize", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "tlsHandshakeTimeout", name: "tlsHandshakeTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "getDoneChan", name: "getDoneChan", pkg: "net/http", typ: $funcType([], [chanType$2], false)}, {prop: "getDoneChanLocked", name: "getDoneChanLocked", pkg: "net/http", typ: $funcType([], [chanType$1], false)}, {prop: "closeDoneChanLocked", name: "closeDoneChanLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Shutdown", name: "Shutdown", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "RegisterOnShutdown", name: "RegisterOnShutdown", pkg: "", typ: $funcType([funcType], [], false)}, {prop: "numListeners", name: "numListeners", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "closeIdleConns", name: "closeIdleConns", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closeListenersLocked", name: "closeListenersLocked", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "ListenAndServe", name: "ListenAndServe", pkg: "", typ: $funcType([], [$error], false)}, {prop: "shouldConfigureHTTP2ForServe", name: "shouldConfigureHTTP2ForServe", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Serve", name: "Serve", pkg: "", typ: $funcType([net.Listener], [$error], false)}, {prop: "ServeTLS", name: "ServeTLS", pkg: "", typ: $funcType([net.Listener, $String, $String], [$error], false)}, {prop: "trackListener", name: "trackListener", pkg: "net/http", typ: $funcType([ptrType$59, $Bool], [$Bool], false)}, {prop: "trackConn", name: "trackConn", pkg: "net/http", typ: $funcType([ptrType$53, $Bool], [], false)}, {prop: "idleTimeout", name: "idleTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "readHeaderTimeout", name: "readHeaderTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "doKeepAlives", name: "doKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "shuttingDown", name: "shuttingDown", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "SetKeepAlivesEnabled", name: "SetKeepAlivesEnabled", pkg: "", typ: $funcType([$Bool], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "ListenAndServeTLS", name: "ListenAndServeTLS", pkg: "", typ: $funcType([$String, $String], [$error], false)}, {prop: "setupHTTP2_ServeTLS", name: "setupHTTP2_ServeTLS", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "setupHTTP2_Serve", name: "setupHTTP2_Serve", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "onceSetNextProtoDefaults_Serve", name: "onceSetNextProtoDefaults_Serve", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onceSetNextProtoDefaults", name: "onceSetNextProtoDefaults", pkg: "net/http", typ: $funcType([], [], false)}]; - ConnState.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - serverHandler.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}]; - ptrType$131.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "close", name: "close", pkg: "net/http", typ: $funcType([], [], false)}]; - globalOptionsHandler.methods = [{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}]; - initALPNRequest.methods = [{prop: "BaseContext", name: "BaseContext", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}]; - ptrType$132.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - checkConnErrorWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$133.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$134.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$18.methods = [{prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$29], false)}, {prop: "Location", name: "Location", pkg: "", typ: $funcType([], [ptrType$17, $error], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "closeBody", name: "closeBody", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "bodyIsWritable", name: "bodyIsWritable", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "isProtocolSwitch", name: "isProtocolSwitch", pkg: "net/http", typ: $funcType([], [$Bool], false)}]; - ptrType$135.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$11.methods = [{prop: "Context", name: "Context", pkg: "", typ: $funcType([], [context.Context], false)}, {prop: "WithContext", name: "WithContext", pkg: "", typ: $funcType([context.Context], [ptrType$11], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([context.Context], [ptrType$11], false)}, {prop: "ProtoAtLeast", name: "ProtoAtLeast", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "UserAgent", name: "UserAgent", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Cookies", name: "Cookies", pkg: "", typ: $funcType([], [sliceType$29], false)}, {prop: "Cookie", name: "Cookie", pkg: "", typ: $funcType([$String], [ptrType$62, $error], false)}, {prop: "AddCookie", name: "AddCookie", pkg: "", typ: $funcType([ptrType$62], [], false)}, {prop: "Referer", name: "Referer", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MultipartReader", name: "MultipartReader", pkg: "", typ: $funcType([], [ptrType$63, $error], false)}, {prop: "multipartReader", name: "multipartReader", pkg: "net/http", typ: $funcType([$Bool], [ptrType$63, $error], false)}, {prop: "isH2Upgrade", name: "isH2Upgrade", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "WriteProxy", name: "WriteProxy", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, $Bool, Header, funcType$10], [$error], false)}, {prop: "BasicAuth", name: "BasicAuth", pkg: "", typ: $funcType([], [$String, $String, $Bool], false)}, {prop: "SetBasicAuth", name: "SetBasicAuth", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "ParseForm", name: "ParseForm", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ParseMultipartForm", name: "ParseMultipartForm", pkg: "", typ: $funcType([$Int64], [$error], false)}, {prop: "FormValue", name: "FormValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "PostFormValue", name: "PostFormValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "FormFile", name: "FormFile", pkg: "", typ: $funcType([$String], [multipart.File, ptrType$66, $error], false)}, {prop: "expectsContinue", name: "expectsContinue", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "wantsHttp10KeepAlive", name: "wantsHttp10KeepAlive", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "wantsClose", name: "wantsClose", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "closeBody", name: "closeBody", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "isReplayable", name: "isReplayable", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "outgoingLength", name: "outgoingLength", pkg: "net/http", typ: $funcType([], [$Int64], false)}, {prop: "requiresHTTP1", name: "requiresHTTP1", pkg: "net/http", typ: $funcType([], [$Bool], false)}]; - ptrType$65.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$136.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - noBody.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "WriteTo", name: "WriteTo", pkg: "", typ: $funcType([io.Writer], [$Int64, $error], false)}]; - Header.methods = [{prop: "Add", name: "Add", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Set", name: "Set", pkg: "", typ: $funcType([$String, $String], [], false)}, {prop: "Get", name: "Get", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "Values", name: "Values", pkg: "", typ: $funcType([$String], [sliceType$2], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([$String], [$String], false)}, {prop: "has", name: "has", pkg: "net/http", typ: $funcType([$String], [$Bool], false)}, {prop: "Del", name: "Del", pkg: "", typ: $funcType([$String], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([io.Writer], [$error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([io.Writer, ptrType$19], [$error], false)}, {prop: "Clone", name: "Clone", pkg: "", typ: $funcType([], [Header], false)}, {prop: "sortedKeyValues", name: "sortedKeyValues", pkg: "net/http", typ: $funcType([mapType$11], [sliceType$6, ptrType$67], false)}, {prop: "WriteSubset", name: "WriteSubset", pkg: "", typ: $funcType([io.Writer, mapType$11], [$error], false)}, {prop: "writeSubset", name: "writeSubset", pkg: "net/http", typ: $funcType([io.Writer, mapType$11, ptrType$19], [$error], false)}]; - stringWriter.methods = [{prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}]; - ptrType$67.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; - ptrType$9.methods = [{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$11, $String], [ptrType$68, $error], false)}, {prop: "getClientConn", name: "getClientConn", pkg: "net/http", typ: $funcType([ptrType$11, $String, $Bool], [ptrType$68, $error], false)}, {prop: "getStartDialLocked", name: "getStartDialLocked", pkg: "net/http", typ: $funcType([context.Context, $String], [ptrType$69], false)}, {prop: "addConnIfNeeded", name: "addConnIfNeeded", pkg: "net/http", typ: $funcType([$String, ptrType$102, ptrType$30], [$Bool, $error], false)}, {prop: "addConnLocked", name: "addConnLocked", pkg: "net/http", typ: $funcType([$String, ptrType$68], [], false)}, {prop: "MarkDead", name: "MarkDead", pkg: "", typ: $funcType([ptrType$68], [], false)}, {prop: "closeIdleConnections", name: "closeIdleConnections", pkg: "net/http", typ: $funcType([], [], false)}]; - ptrType$69.methods = [{prop: "dial", name: "dial", pkg: "net/http", typ: $funcType([context.Context, $String], [], false)}]; - ptrType$70.methods = [{prop: "run", name: "run", pkg: "net/http", typ: $funcType([ptrType$102, $String, ptrType$30], [], false)}]; - http2noDialClientConnPool.methods = [{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$11, $String], [ptrType$68, $error], false)}]; - ptrType$137.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "bytesFromFirstChunk", name: "bytesFromFirstChunk", pkg: "net/http", typ: $funcType([], [sliceType$3], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "lastChunkOrAlloc", name: "lastChunkOrAlloc", pkg: "net/http", typ: $funcType([$Int64], [sliceType$3], false)}]; - http2ErrCode.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "stringToken", name: "stringToken", pkg: "net/http", typ: $funcType([], [$String], false)}]; - http2ConnectionError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2StreamError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - http2goAwayFlowError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2connError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2pseudoHeaderError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2duplicatePseudoHeaderError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2headerFieldNameError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2headerFieldValueError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$71.methods = [{prop: "setConnFlow", name: "setConnFlow", pkg: "net/http", typ: $funcType([ptrType$71], [], false)}, {prop: "available", name: "available", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "take", name: "take", pkg: "net/http", typ: $funcType([$Int32], [], false)}, {prop: "add", name: "add", pkg: "net/http", typ: $funcType([$Int32], [$Bool], false)}]; - http2FrameType.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - http2Flags.methods = [{prop: "Has", name: "Has", pkg: "", typ: $funcType([http2Flags], [$Bool], false)}]; - http2FrameHeader.methods = [{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [http2FrameHeader], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "writeDebug", name: "writeDebug", pkg: "net/http", typ: $funcType([ptrType$40], [], false)}]; - ptrType$138.methods = [{prop: "checkValid", name: "checkValid", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "invalidate", name: "invalidate", pkg: "net/http", typ: $funcType([], [], false)}]; - ptrType$72.methods = [{prop: "maxHeaderListSize", name: "maxHeaderListSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "startWrite", name: "startWrite", pkg: "net/http", typ: $funcType([http2FrameType, http2Flags, $Uint32], [], false)}, {prop: "endWrite", name: "endWrite", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "logWrite", name: "logWrite", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeByte", name: "writeByte", pkg: "net/http", typ: $funcType([$Uint8], [], false)}, {prop: "writeBytes", name: "writeBytes", pkg: "net/http", typ: $funcType([sliceType$3], [], false)}, {prop: "writeUint16", name: "writeUint16", pkg: "net/http", typ: $funcType([$Uint16], [], false)}, {prop: "writeUint32", name: "writeUint32", pkg: "net/http", typ: $funcType([$Uint32], [], false)}, {prop: "SetReuseFrames", name: "SetReuseFrames", pkg: "", typ: $funcType([], [], false)}, {prop: "SetMaxReadFrameSize", name: "SetMaxReadFrameSize", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "ErrorDetail", name: "ErrorDetail", pkg: "", typ: $funcType([], [$error], false)}, {prop: "ReadFrame", name: "ReadFrame", pkg: "", typ: $funcType([], [http2Frame, $error], false)}, {prop: "connError", name: "connError", pkg: "net/http", typ: $funcType([http2ErrCode, $String], [$error], false)}, {prop: "checkFrameOrder", name: "checkFrameOrder", pkg: "net/http", typ: $funcType([http2Frame], [$error], false)}, {prop: "WriteData", name: "WriteData", pkg: "", typ: $funcType([$Uint32, $Bool, sliceType$3], [$error], false)}, {prop: "WriteDataPadded", name: "WriteDataPadded", pkg: "", typ: $funcType([$Uint32, $Bool, sliceType$3, sliceType$3], [$error], false)}, {prop: "WriteSettings", name: "WriteSettings", pkg: "", typ: $funcType([sliceType$23], [$error], true)}, {prop: "WriteSettingsAck", name: "WriteSettingsAck", pkg: "", typ: $funcType([], [$error], false)}, {prop: "WritePing", name: "WritePing", pkg: "", typ: $funcType([$Bool, arrayType$8], [$error], false)}, {prop: "WriteGoAway", name: "WriteGoAway", pkg: "", typ: $funcType([$Uint32, http2ErrCode, sliceType$3], [$error], false)}, {prop: "WriteWindowUpdate", name: "WriteWindowUpdate", pkg: "", typ: $funcType([$Uint32, $Uint32], [$error], false)}, {prop: "WriteHeaders", name: "WriteHeaders", pkg: "", typ: $funcType([http2HeadersFrameParam], [$error], false)}, {prop: "WritePriority", name: "WritePriority", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [$error], false)}, {prop: "WriteRSTStream", name: "WriteRSTStream", pkg: "", typ: $funcType([$Uint32, http2ErrCode], [$error], false)}, {prop: "WriteContinuation", name: "WriteContinuation", pkg: "", typ: $funcType([$Uint32, $Bool, sliceType$3], [$error], false)}, {prop: "WritePushPromise", name: "WritePushPromise", pkg: "", typ: $funcType([http2PushPromiseParam], [$error], false)}, {prop: "WriteRawFrame", name: "WriteRawFrame", pkg: "", typ: $funcType([http2FrameType, http2Flags, $Uint32, sliceType$3], [$error], false)}, {prop: "maxHeaderStringLen", name: "maxHeaderStringLen", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "readMetaFrame", name: "readMetaFrame", pkg: "net/http", typ: $funcType([ptrType$75], [ptrType$76, $error], false)}]; - ptrType$73.methods = [{prop: "getDataFrame", name: "getDataFrame", pkg: "net/http", typ: $funcType([], [ptrType$79], false)}]; - ptrType$79.methods = [{prop: "StreamEnded", name: "StreamEnded", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Data", name: "Data", pkg: "", typ: $funcType([], [sliceType$3], false)}]; - ptrType$78.methods = [{prop: "IsAck", name: "IsAck", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Value", name: "Value", pkg: "", typ: $funcType([http2SettingID], [$Uint32, $Bool], false)}, {prop: "Setting", name: "Setting", pkg: "", typ: $funcType([$Int], [http2Setting], false)}, {prop: "NumSettings", name: "NumSettings", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "HasDuplicates", name: "HasDuplicates", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ForeachSetting", name: "ForeachSetting", pkg: "", typ: $funcType([funcType$23], [$error], false)}]; - ptrType$81.methods = [{prop: "IsAck", name: "IsAck", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$82.methods = [{prop: "DebugData", name: "DebugData", pkg: "", typ: $funcType([], [sliceType$3], false)}]; - ptrType$139.methods = [{prop: "Payload", name: "Payload", pkg: "", typ: $funcType([], [sliceType$3], false)}]; - ptrType$75.methods = [{prop: "HeaderBlockFragment", name: "HeaderBlockFragment", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "HeadersEnded", name: "HeadersEnded", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "StreamEnded", name: "StreamEnded", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "HasPriority", name: "HasPriority", pkg: "", typ: $funcType([], [$Bool], false)}]; - http2PriorityParam.methods = [{prop: "IsZero", name: "IsZero", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$77.methods = [{prop: "HeaderBlockFragment", name: "HeaderBlockFragment", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "HeadersEnded", name: "HeadersEnded", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$96.methods = [{prop: "HeaderBlockFragment", name: "HeaderBlockFragment", pkg: "", typ: $funcType([], [sliceType$3], false)}, {prop: "HeadersEnded", name: "HeadersEnded", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$76.methods = [{prop: "PseudoValue", name: "PseudoValue", pkg: "", typ: $funcType([$String], [$String], false)}, {prop: "RegularFields", name: "RegularFields", pkg: "", typ: $funcType([], [sliceType$22], false)}, {prop: "PseudoFields", name: "PseudoFields", pkg: "", typ: $funcType([], [sliceType$22], false)}, {prop: "checkPseudos", name: "checkPseudos", pkg: "net/http", typ: $funcType([], [$error], false)}]; - http2goroutineLock.methods = [{prop: "check", name: "check", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "checkNotOn", name: "checkNotOn", pkg: "net/http", typ: $funcType([], [], false)}]; - http2streamState.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - http2Setting.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Valid", name: "Valid", pkg: "", typ: $funcType([], [$error], false)}]; - http2SettingID.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - http2gate.methods = [{prop: "Done", name: "Done", pkg: "", typ: $funcType([], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; - http2closeWaiter.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [], false)}, {prop: "Wait", name: "Wait", pkg: "", typ: $funcType([], [], false)}]; - ptrType$98.methods = [{prop: "Init", name: "Init", pkg: "", typ: $funcType([], [], false)}]; - ptrType$88.methods = [{prop: "Available", name: "Available", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$140.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Timeout", name: "Timeout", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "Temporary", name: "Temporary", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$100.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}, {prop: "Keys", name: "Keys", pkg: "", typ: $funcType([Header], [sliceType$2], false)}, {prop: "SortStrings", name: "SortStrings", pkg: "", typ: $funcType([sliceType$2], [], false)}]; - ptrType$97.methods = [{prop: "setBuffer", name: "setBuffer", pkg: "net/http", typ: $funcType([http2pipeBuffer], [], false)}, {prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "CloseWithError", name: "CloseWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "BreakWithError", name: "BreakWithError", pkg: "", typ: $funcType([$error], [], false)}, {prop: "closeWithErrorAndCode", name: "closeWithErrorAndCode", pkg: "net/http", typ: $funcType([$error, funcType], [], false)}, {prop: "closeWithError", name: "closeWithError", pkg: "net/http", typ: $funcType([ptrType$85, $error, funcType], [], false)}, {prop: "closeDoneLocked", name: "closeDoneLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Err", name: "Err", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Done", name: "Done", pkg: "", typ: $funcType([], [chanType$2], false)}]; - ptrType$86.methods = [{prop: "initialConnRecvWindowSize", name: "initialConnRecvWindowSize", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "initialStreamRecvWindowSize", name: "initialStreamRecvWindowSize", pkg: "net/http", typ: $funcType([], [$Int32], false)}, {prop: "maxReadFrameSize", name: "maxReadFrameSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "maxConcurrentStreams", name: "maxConcurrentStreams", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "maxQueuedControlFrames", name: "maxQueuedControlFrames", pkg: "net/http", typ: $funcType([], [$Int], false)}, {prop: "ServeConn", name: "ServeConn", pkg: "", typ: $funcType([net.Conn, ptrType$87], [], false)}]; - ptrType$60.methods = [{prop: "registerConn", name: "registerConn", pkg: "net/http", typ: $funcType([ptrType$13], [], false)}, {prop: "unregisterConn", name: "unregisterConn", pkg: "net/http", typ: $funcType([ptrType$13], [], false)}, {prop: "startGracefulShutdown", name: "startGracefulShutdown", pkg: "net/http", typ: $funcType([], [], false)}]; - ptrType$87.methods = [{prop: "context", name: "context", pkg: "net/http", typ: $funcType([], [context.Context], false)}, {prop: "baseConfig", name: "baseConfig", pkg: "net/http", typ: $funcType([], [ptrType$46], false)}, {prop: "handler", name: "handler", pkg: "net/http", typ: $funcType([], [Handler], false)}]; - ptrType$13.methods = [{prop: "rejectConn", name: "rejectConn", pkg: "net/http", typ: $funcType([http2ErrCode, $String], [], false)}, {prop: "maxHeaderListSize", name: "maxHeaderListSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "curOpenStreams", name: "curOpenStreams", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "Framer", name: "Framer", pkg: "", typ: $funcType([], [ptrType$72], false)}, {prop: "CloseConn", name: "CloseConn", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "HeaderEncoder", name: "HeaderEncoder", pkg: "", typ: $funcType([], [ptrType$89, ptrType$40], false)}, {prop: "state", name: "state", pkg: "net/http", typ: $funcType([$Uint32], [http2streamState, ptrType$10], false)}, {prop: "setConnState", name: "setConnState", pkg: "net/http", typ: $funcType([ConnState], [], false)}, {prop: "vlogf", name: "vlogf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "condlogf", name: "condlogf", pkg: "net/http", typ: $funcType([$error, $String, sliceType], [], true)}, {prop: "canonicalHeader", name: "canonicalHeader", pkg: "net/http", typ: $funcType([$String], [$String], false)}, {prop: "readFrames", name: "readFrames", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeFrameAsync", name: "writeFrameAsync", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "closeAllStreamsOnConnClose", name: "closeAllStreamsOnConnClose", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "stopShutdownTimer", name: "stopShutdownTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "notePanic", name: "notePanic", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "serve", name: "serve", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "awaitGracefulShutdown", name: "awaitGracefulShutdown", pkg: "net/http", typ: $funcType([chanType$2, chanType$1], [], false)}, {prop: "onSettingsTimer", name: "onSettingsTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onIdleTimer", name: "onIdleTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onShutdownTimer", name: "onShutdownTimer", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "sendServeMsg", name: "sendServeMsg", pkg: "net/http", typ: $funcType([$emptyInterface], [], false)}, {prop: "readPreface", name: "readPreface", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "writeDataFromHandler", name: "writeDataFromHandler", pkg: "net/http", typ: $funcType([ptrType$10, sliceType$3, $Bool], [$error], false)}, {prop: "writeFrameFromHandler", name: "writeFrameFromHandler", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [$error], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "startFrameWrite", name: "startFrameWrite", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "wroteFrame", name: "wroteFrame", pkg: "net/http", typ: $funcType([http2frameWriteResult], [], false)}, {prop: "scheduleFrameWrite", name: "scheduleFrameWrite", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startGracefulShutdown", name: "startGracefulShutdown", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "startGracefulShutdownInternal", name: "startGracefulShutdownInternal", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "goAway", name: "goAway", pkg: "net/http", typ: $funcType([http2ErrCode], [], false)}, {prop: "shutDownIn", name: "shutDownIn", pkg: "net/http", typ: $funcType([time.Duration], [], false)}, {prop: "resetStream", name: "resetStream", pkg: "net/http", typ: $funcType([http2StreamError], [], false)}, {prop: "processFrameFromReader", name: "processFrameFromReader", pkg: "net/http", typ: $funcType([http2readFrameResult], [$Bool], false)}, {prop: "processFrame", name: "processFrame", pkg: "net/http", typ: $funcType([http2Frame], [$error], false)}, {prop: "processPing", name: "processPing", pkg: "net/http", typ: $funcType([ptrType$81], [$error], false)}, {prop: "processWindowUpdate", name: "processWindowUpdate", pkg: "net/http", typ: $funcType([ptrType$80], [$error], false)}, {prop: "processResetStream", name: "processResetStream", pkg: "net/http", typ: $funcType([ptrType$83], [$error], false)}, {prop: "closeStream", name: "closeStream", pkg: "net/http", typ: $funcType([ptrType$10, $error], [], false)}, {prop: "processSettings", name: "processSettings", pkg: "net/http", typ: $funcType([ptrType$78], [$error], false)}, {prop: "processSetting", name: "processSetting", pkg: "net/http", typ: $funcType([http2Setting], [$error], false)}, {prop: "processSettingInitialWindowSize", name: "processSettingInitialWindowSize", pkg: "net/http", typ: $funcType([$Uint32], [$error], false)}, {prop: "processData", name: "processData", pkg: "net/http", typ: $funcType([ptrType$79], [$error], false)}, {prop: "processGoAway", name: "processGoAway", pkg: "net/http", typ: $funcType([ptrType$82], [$error], false)}, {prop: "processHeaders", name: "processHeaders", pkg: "net/http", typ: $funcType([ptrType$76], [$error], false)}, {prop: "checkPriority", name: "checkPriority", pkg: "net/http", typ: $funcType([$Uint32, http2PriorityParam], [$error], false)}, {prop: "processPriority", name: "processPriority", pkg: "net/http", typ: $funcType([ptrType$95], [$error], false)}, {prop: "newStream", name: "newStream", pkg: "net/http", typ: $funcType([$Uint32, $Uint32, http2streamState], [ptrType$10], false)}, {prop: "newWriterAndRequest", name: "newWriterAndRequest", pkg: "net/http", typ: $funcType([ptrType$10, ptrType$76], [ptrType$16, ptrType$11, $error], false)}, {prop: "newWriterAndRequestNoBody", name: "newWriterAndRequestNoBody", pkg: "net/http", typ: $funcType([ptrType$10, http2requestParam], [ptrType$16, ptrType$11, $error], false)}, {prop: "runHandler", name: "runHandler", pkg: "net/http", typ: $funcType([ptrType$16, ptrType$11, funcType$15], [], false)}, {prop: "writeHeaders", name: "writeHeaders", pkg: "net/http", typ: $funcType([ptrType$10, ptrType$93], [$error], false)}, {prop: "write100ContinueHeaders", name: "write100ContinueHeaders", pkg: "net/http", typ: $funcType([ptrType$10], [], false)}, {prop: "noteBodyReadFromHandler", name: "noteBodyReadFromHandler", pkg: "net/http", typ: $funcType([ptrType$10, $Int, $error], [], false)}, {prop: "noteBodyRead", name: "noteBodyRead", pkg: "net/http", typ: $funcType([ptrType$10, $Int], [], false)}, {prop: "sendWindowUpdate", name: "sendWindowUpdate", pkg: "net/http", typ: $funcType([ptrType$10, $Int], [], false)}, {prop: "sendWindowUpdate32", name: "sendWindowUpdate32", pkg: "net/http", typ: $funcType([ptrType$10, $Int32], [], false)}, {prop: "startPush", name: "startPush", pkg: "net/http", typ: $funcType([ptrType$91], [], false)}, {prop: "countError", name: "countError", pkg: "net/http", typ: $funcType([$String, $error], [$error], false)}]; - ptrType$10.methods = [{prop: "isPushed", name: "isPushed", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "endStream", name: "endStream", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "copyTrailersToHandlerRequest", name: "copyTrailersToHandlerRequest", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "onWriteTimeout", name: "onWriteTimeout", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "processTrailerHeaders", name: "processTrailerHeaders", pkg: "net/http", typ: $funcType([ptrType$76], [$error], false)}]; - ptrType$12.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$16.methods = [{prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [], false)}, {prop: "CloseNotify", name: "CloseNotify", pkg: "", typ: $funcType([], [chanType$9], false)}, {prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "WriteString", name: "WriteString", pkg: "", typ: $funcType([$String], [$Int, $error], false)}, {prop: "write", name: "write", pkg: "net/http", typ: $funcType([$Int, sliceType$3, $String], [$Int, $error], false)}, {prop: "handlerDone", name: "handlerDone", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([$String, ptrType$101], [$error], false)}]; - ptrType$99.methods = [{prop: "hasTrailers", name: "hasTrailers", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "hasNonemptyTrailers", name: "hasNonemptyTrailers", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "declareTrailer", name: "declareTrailer", pkg: "net/http", typ: $funcType([$String], [], false)}, {prop: "writeChunk", name: "writeChunk", pkg: "net/http", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "promoteUndeclaredTrailers", name: "promoteUndeclaredTrailers", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([$Int], [], false)}]; - http2chunkWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - ptrType$102.methods = [{prop: "dialTLSWithContext", name: "dialTLSWithContext", pkg: "net/http", typ: $funcType([context.Context, $String, $String, ptrType$4], [ptrType$30, $error], false)}, {prop: "maxHeaderListSize", name: "maxHeaderListSize", pkg: "net/http", typ: $funcType([], [$Uint32], false)}, {prop: "disableCompression", name: "disableCompression", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "pingTimeout", name: "pingTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "connPool", name: "connPool", pkg: "net/http", typ: $funcType([], [http2ClientConnPool], false)}, {prop: "initConnPool", name: "initConnPool", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}, {prop: "RoundTripOpt", name: "RoundTripOpt", pkg: "", typ: $funcType([ptrType$11, http2RoundTripOpt], [ptrType$18, $error], false)}, {prop: "CloseIdleConnections", name: "CloseIdleConnections", pkg: "", typ: $funcType([], [], false)}, {prop: "dialClientConn", name: "dialClientConn", pkg: "net/http", typ: $funcType([context.Context, $String, $Bool], [ptrType$68, $error], false)}, {prop: "newTLSConfig", name: "newTLSConfig", pkg: "net/http", typ: $funcType([$String], [ptrType$4], false)}, {prop: "dialTLS", name: "dialTLS", pkg: "net/http", typ: $funcType([context.Context], [funcType$25], false)}, {prop: "disableKeepAlives", name: "disableKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "expectContinueTimeout", name: "expectContinueTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "NewClientConn", name: "NewClientConn", pkg: "", typ: $funcType([net.Conn], [ptrType$68, $error], false)}, {prop: "newClientConn", name: "newClientConn", pkg: "net/http", typ: $funcType([net.Conn, $Bool], [ptrType$68, $error], false)}, {prop: "vlogf", name: "vlogf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "idleConnTimeout", name: "idleConnTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}]; - ptrType$68.methods = [{prop: "healthCheck", name: "healthCheck", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "SetDoNotReuse", name: "SetDoNotReuse", pkg: "", typ: $funcType([], [], false)}, {prop: "setGoAway", name: "setGoAway", pkg: "net/http", typ: $funcType([ptrType$82], [], false)}, {prop: "CanTakeNewRequest", name: "CanTakeNewRequest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "ReserveNewRequest", name: "ReserveNewRequest", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "State", name: "State", pkg: "", typ: $funcType([], [http2ClientConnState], false)}, {prop: "idleState", name: "idleState", pkg: "net/http", typ: $funcType([], [http2clientConnIdleState], false)}, {prop: "idleStateLocked", name: "idleStateLocked", pkg: "net/http", typ: $funcType([], [http2clientConnIdleState], false)}, {prop: "canTakeNewRequestLocked", name: "canTakeNewRequestLocked", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "tooIdleLocked", name: "tooIdleLocked", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "onIdleTimeout", name: "onIdleTimeout", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "closeIfIdle", name: "closeIfIdle", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "isDoNotReuseAndIdle", name: "isDoNotReuseAndIdle", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "Shutdown", name: "Shutdown", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "sendGoAway", name: "sendGoAway", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "closeForError", name: "closeForError", pkg: "net/http", typ: $funcType([$error], [$error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "closeForLostPing", name: "closeForLostPing", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "responseHeaderTimeout", name: "responseHeaderTimeout", pkg: "net/http", typ: $funcType([], [time.Duration], false)}, {prop: "decrStreamReservations", name: "decrStreamReservations", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "decrStreamReservationsLocked", name: "decrStreamReservationsLocked", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}, {prop: "awaitOpenSlotForStreamLocked", name: "awaitOpenSlotForStreamLocked", pkg: "net/http", typ: $funcType([ptrType$104], [$error], false)}, {prop: "writeHeaders", name: "writeHeaders", pkg: "net/http", typ: $funcType([$Uint32, $Bool, $Int, sliceType$3], [$error], false)}, {prop: "encodeHeaders", name: "encodeHeaders", pkg: "net/http", typ: $funcType([ptrType$11, $Bool, $String, $Int64], [sliceType$3, $error], false)}, {prop: "encodeTrailers", name: "encodeTrailers", pkg: "net/http", typ: $funcType([Header], [sliceType$3, $error], false)}, {prop: "writeHeader", name: "writeHeader", pkg: "net/http", typ: $funcType([$String, $String], [], false)}, {prop: "addStreamLocked", name: "addStreamLocked", pkg: "net/http", typ: $funcType([ptrType$104], [], false)}, {prop: "forgetStreamID", name: "forgetStreamID", pkg: "net/http", typ: $funcType([$Uint32], [], false)}, {prop: "readLoop", name: "readLoop", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "countReadFrameError", name: "countReadFrameError", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "Ping", name: "Ping", pkg: "", typ: $funcType([context.Context], [$error], false)}, {prop: "writeStreamReset", name: "writeStreamReset", pkg: "net/http", typ: $funcType([$Uint32, http2ErrCode, $error], [], false)}, {prop: "logf", name: "logf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}, {prop: "vlogf", name: "vlogf", pkg: "net/http", typ: $funcType([$String, sliceType], [], true)}]; - ptrType$104.methods = [{prop: "get1xxTraceFunc", name: "get1xxTraceFunc", pkg: "net/http", typ: $funcType([], [funcType$26], false)}, {prop: "abortStream", name: "abortStream", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "abortStreamLocked", name: "abortStreamLocked", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "abortRequestBodyWrite", name: "abortRequestBodyWrite", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "doRequest", name: "doRequest", pkg: "net/http", typ: $funcType([ptrType$11], [], false)}, {prop: "writeRequest", name: "writeRequest", pkg: "net/http", typ: $funcType([ptrType$11], [$error], false)}, {prop: "encodeAndWriteHeaders", name: "encodeAndWriteHeaders", pkg: "net/http", typ: $funcType([ptrType$11], [$error], false)}, {prop: "cleanupWriteRequest", name: "cleanupWriteRequest", pkg: "net/http", typ: $funcType([$error], [], false)}, {prop: "frameScratchBufferLen", name: "frameScratchBufferLen", pkg: "net/http", typ: $funcType([$Int], [$Int], false)}, {prop: "writeRequestBody", name: "writeRequestBody", pkg: "net/http", typ: $funcType([ptrType$11], [$error], false)}, {prop: "awaitFlowControl", name: "awaitFlowControl", pkg: "net/http", typ: $funcType([$Int], [$Int32, $error], false)}, {prop: "copyTrailers", name: "copyTrailers", pkg: "net/http", typ: $funcType([], [], false)}]; - http2stickyErrWriter.methods = [{prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - http2noCachedConnError.methods = [{prop: "IsHTTP2NoCachedConnError", name: "IsHTTP2NoCachedConnError", pkg: "", typ: $funcType([], [], false)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$141.methods = [{prop: "cleanup", name: "cleanup", pkg: "net/http", typ: $funcType([], [], false)}, {prop: "run", name: "run", pkg: "net/http", typ: $funcType([], [$error], false)}, {prop: "processHeaders", name: "processHeaders", pkg: "net/http", typ: $funcType([ptrType$76], [$error], false)}, {prop: "handleResponse", name: "handleResponse", pkg: "net/http", typ: $funcType([ptrType$104, ptrType$76], [ptrType$18, $error], false)}, {prop: "processTrailers", name: "processTrailers", pkg: "net/http", typ: $funcType([ptrType$104, ptrType$76], [$error], false)}, {prop: "processData", name: "processData", pkg: "net/http", typ: $funcType([ptrType$79], [$error], false)}, {prop: "endStream", name: "endStream", pkg: "net/http", typ: $funcType([ptrType$104], [], false)}, {prop: "endStreamError", name: "endStreamError", pkg: "net/http", typ: $funcType([ptrType$104, $error], [], false)}, {prop: "streamByID", name: "streamByID", pkg: "net/http", typ: $funcType([$Uint32], [ptrType$104], false)}, {prop: "processGoAway", name: "processGoAway", pkg: "net/http", typ: $funcType([ptrType$82], [$error], false)}, {prop: "processSettings", name: "processSettings", pkg: "net/http", typ: $funcType([ptrType$78], [$error], false)}, {prop: "processSettingsNoWrite", name: "processSettingsNoWrite", pkg: "net/http", typ: $funcType([ptrType$78], [$error], false)}, {prop: "processWindowUpdate", name: "processWindowUpdate", pkg: "net/http", typ: $funcType([ptrType$80], [$error], false)}, {prop: "processResetStream", name: "processResetStream", pkg: "net/http", typ: $funcType([ptrType$83], [$error], false)}, {prop: "processPing", name: "processPing", pkg: "net/http", typ: $funcType([ptrType$81], [$error], false)}, {prop: "processPushPromise", name: "processPushPromise", pkg: "net/http", typ: $funcType([ptrType$96], [$error], false)}]; - http2GoAwayError.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - http2transportResponseBody.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - http2missingBody.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]; - http2erringRoundTripper.methods = [{prop: "RoundTripErr", name: "RoundTripErr", pkg: "", typ: $funcType([], [$error], false)}, {prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}]; - ptrType$142.methods = [{prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - http2noDialH2RoundTripper.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}]; - http2flushFrameWriter.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - http2writeSettings.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}]; - ptrType$143.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - ptrType$92.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - http2handlerPanicRST.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - http2writePingAck.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - http2writeSettingsAck.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - ptrType$93.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "writeHeaderBlock", name: "writeHeaderBlock", pkg: "net/http", typ: $funcType([http2writeContext, sliceType$3, $Bool, $Bool], [$error], false)}]; - ptrType$94.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "writeHeaderBlock", name: "writeHeaderBlock", pkg: "net/http", typ: $funcType([http2writeContext, sliceType$3, $Bool, $Bool], [$error], false)}]; - http2write100ContinueHeadersFrame.methods = [{prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}, {prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}]; - http2writeWindowUpdate.methods = [{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}]; - http2FrameWriteRequest.methods = [{prop: "StreamID", name: "StreamID", pkg: "", typ: $funcType([], [$Uint32], false)}, {prop: "isControl", name: "isControl", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "DataSize", name: "DataSize", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Consume", name: "Consume", pkg: "", typ: $funcType([$Int32], [http2FrameWriteRequest, http2FrameWriteRequest, $Int], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$144.methods = [{prop: "replyToWriter", name: "replyToWriter", pkg: "net/http", typ: $funcType([$error], [], false)}]; - ptrType$105.methods = [{prop: "empty", name: "empty", pkg: "net/http", typ: $funcType([], [$Bool], false)}, {prop: "push", name: "push", pkg: "net/http", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "shift", name: "shift", pkg: "net/http", typ: $funcType([], [http2FrameWriteRequest], false)}, {prop: "consume", name: "consume", pkg: "net/http", typ: $funcType([$Int32], [http2FrameWriteRequest, $Bool], false)}]; - ptrType$107.methods = [{prop: "put", name: "put", pkg: "net/http", typ: $funcType([ptrType$105], [], false)}, {prop: "get", name: "get", pkg: "net/http", typ: $funcType([], [ptrType$105], false)}]; - ptrType$106.methods = [{prop: "setParent", name: "setParent", pkg: "net/http", typ: $funcType([ptrType$106], [], false)}, {prop: "addBytes", name: "addBytes", pkg: "net/http", typ: $funcType([$Int64], [], false)}, {prop: "walkReadyInOrder", name: "walkReadyInOrder", pkg: "net/http", typ: $funcType([$Bool, ptrType$108, funcType$28], [$Bool], false)}]; - http2sortPriorityNodeSiblings.methods = [{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Swap", name: "Swap", pkg: "", typ: $funcType([$Int, $Int], [], false)}, {prop: "Less", name: "Less", pkg: "", typ: $funcType([$Int, $Int], [$Bool], false)}]; - ptrType$145.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}, {prop: "addClosedOrIdleNode", name: "addClosedOrIdleNode", pkg: "net/http", typ: $funcType([ptrType$108, $Int, ptrType$106], [], false)}, {prop: "removeNode", name: "removeNode", pkg: "net/http", typ: $funcType([ptrType$106], [], false)}]; - ptrType$146.methods = [{prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}]; - ptrType$62.methods = [{prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "Valid", name: "Valid", pkg: "", typ: $funcType([], [$error], false)}]; - noTransport.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}]; - ptrType$151.methods = [{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}, {prop: "CancelRequest", name: "CancelRequest", pkg: "", typ: $funcType([ptrType$11], [], false)}]; - Transport.init("net/http", [{prop: "idleMu", name: "idleMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "closeIdle", name: "closeIdle", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "idleConn", name: "idleConn", embedded: false, exported: false, typ: mapType$1, tag: ""}, {prop: "idleConnWait", name: "idleConnWait", embedded: false, exported: false, typ: mapType$2, tag: ""}, {prop: "idleLRU", name: "idleLRU", embedded: false, exported: false, typ: connLRU, tag: ""}, {prop: "reqMu", name: "reqMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "reqCanceler", name: "reqCanceler", embedded: false, exported: false, typ: mapType$3, tag: ""}, {prop: "altMu", name: "altMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "altProto", name: "altProto", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "connsPerHostMu", name: "connsPerHostMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "connsPerHost", name: "connsPerHost", embedded: false, exported: false, typ: mapType$4, tag: ""}, {prop: "connsPerHostWait", name: "connsPerHostWait", embedded: false, exported: false, typ: mapType$2, tag: ""}, {prop: "Proxy", name: "Proxy", embedded: false, exported: true, typ: funcType$5, tag: ""}, {prop: "DialContext", name: "DialContext", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "Dial", name: "Dial", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "DialTLSContext", name: "DialTLSContext", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "DialTLS", name: "DialTLS", embedded: false, exported: true, typ: funcType$7, tag: ""}, {prop: "TLSClientConfig", name: "TLSClientConfig", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "TLSHandshakeTimeout", name: "TLSHandshakeTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "DisableKeepAlives", name: "DisableKeepAlives", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "DisableCompression", name: "DisableCompression", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "MaxIdleConns", name: "MaxIdleConns", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxIdleConnsPerHost", name: "MaxIdleConnsPerHost", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxConnsPerHost", name: "MaxConnsPerHost", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "IdleConnTimeout", name: "IdleConnTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "ResponseHeaderTimeout", name: "ResponseHeaderTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "ExpectContinueTimeout", name: "ExpectContinueTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "TLSNextProto", name: "TLSNextProto", embedded: false, exported: true, typ: mapType$5, tag: ""}, {prop: "ProxyConnectHeader", name: "ProxyConnectHeader", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "GetProxyConnectHeader", name: "GetProxyConnectHeader", embedded: false, exported: true, typ: funcType$9, tag: ""}, {prop: "MaxResponseHeaderBytes", name: "MaxResponseHeaderBytes", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "WriteBufferSize", name: "WriteBufferSize", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ReadBufferSize", name: "ReadBufferSize", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "nextProtoOnce", name: "nextProtoOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "h2transport", name: "h2transport", embedded: false, exported: false, typ: h2Transport, tag: ""}, {prop: "tlsNextProtoWasNil", name: "tlsNextProtoWasNil", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ForceAttemptHTTP2", name: "ForceAttemptHTTP2", embedded: false, exported: true, typ: $Bool, tag: ""}]); - cancelKey.init("net/http", [{prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$11, tag: ""}]); - h2Transport.init([{prop: "CloseIdleConnections", name: "CloseIdleConnections", pkg: "", typ: $funcType([], [], false)}]); - transportRequest.init("net/http", [{prop: "Request", name: "Request", embedded: true, exported: true, typ: ptrType$11, tag: ""}, {prop: "extra", name: "extra", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "trace", name: "trace", embedded: false, exported: false, typ: ptrType$19, tag: ""}, {prop: "cancelKey", name: "cancelKey", embedded: false, exported: false, typ: cancelKey, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - readTrackingBody.init("net/http", [{prop: "ReadCloser", name: "ReadCloser", embedded: true, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "didRead", name: "didRead", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "didClose", name: "didClose", embedded: false, exported: false, typ: $Bool, tag: ""}]); - transportReadFromServerError.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - wantConn.init("net/http", [{prop: "cm", name: "cm", embedded: false, exported: false, typ: connectMethod, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: connectMethodKey, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "ready", name: "ready", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "beforeDial", name: "beforeDial", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "afterDial", name: "afterDial", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "pc", name: "pc", embedded: false, exported: false, typ: ptrType$22, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - wantConnQueue.init("net/http", [{prop: "head", name: "head", embedded: false, exported: false, typ: sliceType$8, tag: ""}, {prop: "headPos", name: "headPos", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "tail", name: "tail", embedded: false, exported: false, typ: sliceType$8, tag: ""}]); - erringRoundTripper.init([{prop: "RoundTripErr", name: "RoundTripErr", pkg: "", typ: $funcType([], [$error], false)}]); - persistConnWriter.init("net/http", [{prop: "pc", name: "pc", embedded: false, exported: false, typ: ptrType$22, tag: ""}]); - connectMethod.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "proxyURL", name: "proxyURL", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "targetScheme", name: "targetScheme", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "targetAddr", name: "targetAddr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "onlyH1", name: "onlyH1", embedded: false, exported: false, typ: $Bool, tag: ""}]); - connectMethodKey.init("net/http", [{prop: "proxy", name: "proxy", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "scheme", name: "scheme", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "addr", name: "addr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "onlyH1", name: "onlyH1", embedded: false, exported: false, typ: $Bool, tag: ""}]); - persistConn.init("net/http", [{prop: "alt", name: "alt", embedded: false, exported: false, typ: RoundTripper, tag: ""}, {prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$27, tag: ""}, {prop: "cacheKey", name: "cacheKey", embedded: false, exported: false, typ: connectMethodKey, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$28, tag: ""}, {prop: "br", name: "br", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "nwrite", name: "nwrite", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "reqch", name: "reqch", embedded: false, exported: false, typ: chanType$3, tag: ""}, {prop: "writech", name: "writech", embedded: false, exported: false, typ: chanType$4, tag: ""}, {prop: "closech", name: "closech", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "isProxy", name: "isProxy", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "readLimit", name: "readLimit", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "writeErrCh", name: "writeErrCh", embedded: false, exported: false, typ: chanType, tag: ""}, {prop: "writeLoopDone", name: "writeLoopDone", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "idleAt", name: "idleAt", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "idleTimer", name: "idleTimer", embedded: false, exported: false, typ: ptrType$25, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "numExpectedResponses", name: "numExpectedResponses", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "canceledErr", name: "canceledErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "broken", name: "broken", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "reused", name: "reused", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "mutateHeaderFunc", name: "mutateHeaderFunc", embedded: false, exported: false, typ: funcType$11, tag: ""}]); - readWriteCloserBody.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "br", name: "br", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "ReadWriteCloser", name: "ReadWriteCloser", embedded: true, exported: true, typ: io.ReadWriteCloser, tag: ""}]); - nothingWrittenError.init("net/http", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); - responseAndError.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$18, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - requestAndChan.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "cancelKey", name: "cancelKey", embedded: false, exported: false, typ: cancelKey, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$5, tag: ""}, {prop: "addedGzip", name: "addedGzip", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "continueCh", name: "continueCh", embedded: false, exported: false, typ: chanType$6, tag: ""}, {prop: "callerGone", name: "callerGone", embedded: false, exported: false, typ: chanType$2, tag: ""}]); - writeRequest.init("net/http", [{prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$114, tag: ""}, {prop: "ch", name: "ch", embedded: false, exported: false, typ: chanType$7, tag: ""}, {prop: "continueCh", name: "continueCh", embedded: false, exported: false, typ: chanType$2, tag: ""}]); - httpError.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: $Bool, tag: ""}]); - tLogKey.init("", []); - bodyEOFSignal.init("net/http", [{prop: "body", name: "body", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "rerr", name: "rerr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "fn", name: "fn", embedded: false, exported: false, typ: funcType$12, tag: ""}, {prop: "earlyCloseFn", name: "earlyCloseFn", embedded: false, exported: false, typ: funcType$13, tag: ""}]); - gzipReader.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: ptrType$32, tag: ""}, {prop: "zr", name: "zr", embedded: false, exported: false, typ: ptrType$33, tag: ""}, {prop: "zerr", name: "zerr", embedded: false, exported: false, typ: $error, tag: ""}]); - tlsHandshakeTimeoutError.init("", []); - fakeLocker.init("", []); - connLRU.init("net/http", [{prop: "ll", name: "ll", embedded: false, exported: false, typ: ptrType$3, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: mapType$6, tag: ""}]); - errorReader.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - byteReader.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: $Bool, tag: ""}]); - transferWriter.init("net/http", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.Reader, tag: ""}, {prop: "BodyCloser", name: "BodyCloser", embedded: false, exported: true, typ: io.Closer, tag: ""}, {prop: "ResponseToHEAD", name: "ResponseToHEAD", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "IsResponse", name: "IsResponse", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "bodyReadError", name: "bodyReadError", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "FlushHeaders", name: "FlushHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ByteReadCh", name: "ByteReadCh", embedded: false, exported: true, typ: chanType$8, tag: ""}]); - transferReader.init("", [{prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "StatusCode", name: "StatusCode", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "RequestMethod", name: "RequestMethod", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "Chunked", name: "Chunked", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}]); - unsupportedTEError.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $String, tag: ""}]); - body.init("net/http", [{prop: "src", name: "src", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "hdr", name: "hdr", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "closing", name: "closing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "doEarlyClose", name: "doEarlyClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "earlyClose", name: "earlyClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "onHitEOF", name: "onHitEOF", embedded: false, exported: false, typ: funcType, tag: ""}]); - bodyLocked.init("net/http", [{prop: "b", name: "b", embedded: false, exported: false, typ: ptrType$52, tag: ""}]); - finishAsyncByteRead.init("net/http", [{prop: "tw", name: "tw", embedded: false, exported: false, typ: ptrType$35, tag: ""}]); - bufioFlushWriter.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]); - socksAddr.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "IP", name: "IP", embedded: false, exported: true, typ: net.IP, tag: ""}, {prop: "Port", name: "Port", embedded: false, exported: true, typ: $Int, tag: ""}]); - socksConn.init("net/http", [{prop: "Conn", name: "Conn", embedded: true, exported: true, typ: net.Conn, tag: ""}, {prop: "boundAddr", name: "boundAddr", embedded: false, exported: false, typ: net.Addr, tag: ""}]); - socksDialer.init("net/http", [{prop: "cmd", name: "cmd", embedded: false, exported: false, typ: socksCommand, tag: ""}, {prop: "proxyNetwork", name: "proxyNetwork", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "proxyAddress", name: "proxyAddress", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "ProxyDial", name: "ProxyDial", embedded: false, exported: true, typ: funcType$6, tag: ""}, {prop: "AuthMethods", name: "AuthMethods", embedded: false, exported: true, typ: sliceType$12, tag: ""}, {prop: "Authenticate", name: "Authenticate", embedded: false, exported: true, typ: funcType$14, tag: ""}]); - socksUsernamePassword.init("", [{prop: "Username", name: "Username", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Password", name: "Password", embedded: false, exported: true, typ: $String, tag: ""}]); - sniffSig.init([{prop: "match", name: "match", pkg: "net/http", typ: $funcType([sliceType$3, $Int], [$String], false)}]); - exactSig.init("net/http", [{prop: "sig", name: "sig", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "ct", name: "ct", embedded: false, exported: false, typ: $String, tag: ""}]); - maskedSig.init("net/http", [{prop: "mask", name: "mask", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "pat", name: "pat", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "skipWS", name: "skipWS", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "ct", name: "ct", embedded: false, exported: false, typ: $String, tag: ""}]); - htmlSig.init($Uint8); - mp4Sig.init("", []); - textSig.init("", []); - Handler.init([{prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([ResponseWriter, ptrType$11], [], false)}]); - ResponseWriter.init([{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [Header], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "WriteHeader", name: "WriteHeader", pkg: "", typ: $funcType([$Int], [], false)}]); - conn.init("net/http", [{prop: "server", name: "server", embedded: false, exported: false, typ: ptrType$46, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "rwc", name: "rwc", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "remoteAddr", name: "remoteAddr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$28, tag: ""}, {prop: "werr", name: "werr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: ptrType$47, tag: ""}, {prop: "bufr", name: "bufr", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "bufw", name: "bufw", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "lastMethod", name: "lastMethod", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "curReq", name: "curReq", embedded: false, exported: false, typ: atomic.Value, tag: ""}, {prop: "curState", name: "curState", embedded: false, exported: false, typ: structType$1, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "hijackedv", name: "hijackedv", embedded: false, exported: false, typ: $Bool, tag: ""}]); - chunkWriter.init("net/http", [{prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$49, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "chunking", name: "chunking", embedded: false, exported: false, typ: $Bool, tag: ""}]); - response.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$53, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "reqBody", name: "reqBody", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: context.CancelFunc, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wroteContinue", name: "wroteContinue", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wants10KeepAlive", name: "wants10KeepAlive", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wantsClose", name: "wantsClose", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "canWriteContinue", name: "canWriteContinue", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "writeContinueMu", name: "writeContinueMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "cw", name: "cw", embedded: false, exported: false, typ: chunkWriter, tag: ""}, {prop: "handlerHeader", name: "handlerHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "calledHeader", name: "calledHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "written", name: "written", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "status", name: "status", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "closeAfterReply", name: "closeAfterReply", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "requestBodyLimitHit", name: "requestBodyLimitHit", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "handlerDone", name: "handlerDone", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "dateBuf", name: "dateBuf", embedded: false, exported: false, typ: arrayType$3, tag: ""}, {prop: "clenBuf", name: "clenBuf", embedded: false, exported: false, typ: arrayType$4, tag: ""}, {prop: "statusBuf", name: "statusBuf", embedded: false, exported: false, typ: arrayType$5, tag: ""}, {prop: "closeNotifyCh", name: "closeNotifyCh", embedded: false, exported: false, typ: chanType$10, tag: ""}, {prop: "didCloseNotify", name: "didCloseNotify", embedded: false, exported: false, typ: $Int32, tag: ""}]); - writerOnly.init("", [{prop: "Writer", name: "Writer", embedded: true, exported: true, typ: io.Writer, tag: ""}]); - readResult.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: incomparable, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: $Uint8, tag: ""}]); - connReader.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$53, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "hasByte", name: "hasByte", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "byteBuf", name: "byteBuf", embedded: false, exported: false, typ: arrayType$2, tag: ""}, {prop: "cond", name: "cond", embedded: false, exported: false, typ: ptrType$48, tag: ""}, {prop: "inRead", name: "inRead", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "aborted", name: "aborted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "remain", name: "remain", embedded: false, exported: false, typ: $Int64, tag: ""}]); - expectContinueReader.init("net/http", [{prop: "resp", name: "resp", embedded: false, exported: false, typ: ptrType$49, tag: ""}, {prop: "readCloser", name: "readCloser", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: atomicBool, tag: ""}]); - extraHeader.init("net/http", [{prop: "contentType", name: "contentType", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "connection", name: "connection", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "transferEncoding", name: "transferEncoding", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "date", name: "date", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - closeWriter.init([{prop: "CloseWrite", name: "CloseWrite", pkg: "", typ: $funcType([], [$error], false)}]); - statusError.init("net/http", [{prop: "code", name: "code", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "text", name: "text", embedded: false, exported: false, typ: $String, tag: ""}]); - HandlerFunc.init([ResponseWriter, ptrType$11], [], false); - redirectHandler.init("net/http", [{prop: "url", name: "url", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "code", name: "code", embedded: false, exported: false, typ: $Int, tag: ""}]); - ServeMux.init("net/http", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.RWMutex, tag: ""}, {prop: "m", name: "m", embedded: false, exported: false, typ: mapType$7, tag: ""}, {prop: "es", name: "es", embedded: false, exported: false, typ: sliceType$1, tag: ""}, {prop: "hosts", name: "hosts", embedded: false, exported: false, typ: $Bool, tag: ""}]); - muxEntry.init("net/http", [{prop: "h", name: "h", embedded: false, exported: false, typ: Handler, tag: ""}, {prop: "pattern", name: "pattern", embedded: false, exported: false, typ: $String, tag: ""}]); - Server.init("net/http", [{prop: "Addr", name: "Addr", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Handler", name: "Handler", embedded: false, exported: true, typ: Handler, tag: ""}, {prop: "TLSConfig", name: "TLSConfig", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "ReadTimeout", name: "ReadTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "ReadHeaderTimeout", name: "ReadHeaderTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "WriteTimeout", name: "WriteTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "IdleTimeout", name: "IdleTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "MaxHeaderBytes", name: "MaxHeaderBytes", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "TLSNextProto", name: "TLSNextProto", embedded: false, exported: true, typ: mapType$8, tag: ""}, {prop: "ConnState", name: "ConnState", embedded: false, exported: true, typ: funcType$17, tag: ""}, {prop: "ErrorLog", name: "ErrorLog", embedded: false, exported: true, typ: ptrType$58, tag: ""}, {prop: "BaseContext", name: "BaseContext", embedded: false, exported: true, typ: funcType$18, tag: ""}, {prop: "ConnContext", name: "ConnContext", embedded: false, exported: true, typ: funcType$19, tag: ""}, {prop: "inShutdown", name: "inShutdown", embedded: false, exported: false, typ: atomicBool, tag: ""}, {prop: "disableKeepAlives", name: "disableKeepAlives", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "nextProtoOnce", name: "nextProtoOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "nextProtoErr", name: "nextProtoErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "listeners", name: "listeners", embedded: false, exported: false, typ: mapType$9, tag: ""}, {prop: "activeConn", name: "activeConn", embedded: false, exported: false, typ: mapType$10, tag: ""}, {prop: "doneChan", name: "doneChan", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "onShutdown", name: "onShutdown", embedded: false, exported: false, typ: sliceType$19, tag: ""}]); - serverHandler.init("net/http", [{prop: "srv", name: "srv", embedded: false, exported: false, typ: ptrType$46, tag: ""}]); - onceCloseListener.init("net/http", [{prop: "Listener", name: "Listener", embedded: true, exported: true, typ: net.Listener, tag: ""}, {prop: "once", name: "once", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "closeErr", name: "closeErr", embedded: false, exported: false, typ: $error, tag: ""}]); - globalOptionsHandler.init("", []); - initALPNRequest.init("net/http", [{prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$30, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: serverHandler, tag: ""}]); - loggingConn.init("net/http", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "Conn", name: "Conn", embedded: true, exported: true, typ: net.Conn, tag: ""}]); - checkConnErrorWriter.init("net/http", [{prop: "c", name: "c", embedded: false, exported: false, typ: ptrType$53, tag: ""}]); - streamReader.init("net/http", [{prop: "pending", name: "pending", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "stream", name: "stream", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - arrayReader.init("net/http", [{prop: "arrayPromise", name: "arrayPromise", embedded: false, exported: false, typ: js.Value, tag: ""}, {prop: "pending", name: "pending", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "read", name: "read", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - Response.init("", [{prop: "Status", name: "Status", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "StatusCode", name: "StatusCode", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Proto", name: "Proto", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Uncompressed", name: "Uncompressed", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Request", name: "Request", embedded: false, exported: true, typ: ptrType$11, tag: ""}, {prop: "TLS", name: "TLS", embedded: false, exported: true, typ: ptrType$28, tag: ""}]); - ProtocolError.init("", [{prop: "ErrorString", name: "ErrorString", embedded: false, exported: true, typ: $String, tag: ""}]); - Request.init("net/http", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "URL", name: "URL", embedded: false, exported: true, typ: ptrType$17, tag: ""}, {prop: "Proto", name: "Proto", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "ProtoMajor", name: "ProtoMajor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ProtoMinor", name: "ProtoMinor", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "Body", name: "Body", embedded: false, exported: true, typ: io.ReadCloser, tag: ""}, {prop: "GetBody", name: "GetBody", embedded: false, exported: true, typ: funcType$20, tag: ""}, {prop: "ContentLength", name: "ContentLength", embedded: false, exported: true, typ: $Int64, tag: ""}, {prop: "TransferEncoding", name: "TransferEncoding", embedded: false, exported: true, typ: sliceType$2, tag: ""}, {prop: "Close", name: "Close", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Host", name: "Host", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Form", name: "Form", embedded: false, exported: true, typ: url.Values, tag: ""}, {prop: "PostForm", name: "PostForm", embedded: false, exported: true, typ: url.Values, tag: ""}, {prop: "MultipartForm", name: "MultipartForm", embedded: false, exported: true, typ: ptrType$31, tag: ""}, {prop: "Trailer", name: "Trailer", embedded: false, exported: true, typ: Header, tag: ""}, {prop: "RemoteAddr", name: "RemoteAddr", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "RequestURI", name: "RequestURI", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "TLS", name: "TLS", embedded: false, exported: true, typ: ptrType$28, tag: ""}, {prop: "Cancel", name: "Cancel", embedded: false, exported: true, typ: chanType$2, tag: ""}, {prop: "Response", name: "Response", embedded: false, exported: true, typ: ptrType$18, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}]); - requestBodyReadError.init("net/http", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); - maxBytesReader.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: ResponseWriter, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - incomparable.init(funcType, 0); - contextKey.init("net/http", [{prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}]); - noBody.init("", []); - PushOptions.init("", [{prop: "Method", name: "Method", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Header", name: "Header", embedded: false, exported: true, typ: Header, tag: ""}]); - Header.init($String, sliceType$2); - stringWriter.init("net/http", [{prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}]); - keyValues.init("net/http", [{prop: "key", name: "key", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "values", name: "values", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - headerSorter.init("net/http", [{prop: "kvs", name: "kvs", embedded: false, exported: false, typ: sliceType$6, tag: ""}]); - http2ClientConnPool.init([{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$11, $String], [ptrType$68, $error], false)}, {prop: "MarkDead", name: "MarkDead", pkg: "", typ: $funcType([ptrType$68], [], false)}]); - http2clientConnPoolIdleCloser.init([{prop: "GetClientConn", name: "GetClientConn", pkg: "", typ: $funcType([ptrType$11, $String], [ptrType$68, $error], false)}, {prop: "MarkDead", name: "MarkDead", pkg: "", typ: $funcType([ptrType$68], [], false)}, {prop: "closeIdleConnections", name: "closeIdleConnections", pkg: "net/http", typ: $funcType([], [], false)}]); - http2clientConnPool.init("net/http", [{prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$102, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "conns", name: "conns", embedded: false, exported: false, typ: mapType$12, tag: ""}, {prop: "dialing", name: "dialing", embedded: false, exported: false, typ: mapType$13, tag: ""}, {prop: "keys", name: "keys", embedded: false, exported: false, typ: mapType$14, tag: ""}, {prop: "addConnCalls", name: "addConnCalls", embedded: false, exported: false, typ: mapType$15, tag: ""}]); - http2dialCall.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$68, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - http2addConnCall.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: ptrType$9, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - http2noDialClientConnPool.init("net/http", [{prop: "http2clientConnPool", name: "http2clientConnPool", embedded: true, exported: false, typ: ptrType$9, tag: ""}]); - http2dataBuffer.init("net/http", [{prop: "chunks", name: "chunks", embedded: false, exported: false, typ: sliceType$5, tag: ""}, {prop: "r", name: "r", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "size", name: "size", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "expected", name: "expected", embedded: false, exported: false, typ: $Int64, tag: ""}]); - http2StreamError.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Code", name: "Code", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "Cause", name: "Cause", embedded: false, exported: true, typ: $error, tag: ""}]); - http2goAwayFlowError.init("", []); - http2connError.init("", [{prop: "Code", name: "Code", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "Reason", name: "Reason", embedded: false, exported: true, typ: $String, tag: ""}]); - http2flow.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$71, tag: ""}]); - http2FrameHeader.init("net/http", [{prop: "valid", name: "valid", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "Type", name: "Type", embedded: false, exported: true, typ: http2FrameType, tag: ""}, {prop: "Flags", name: "Flags", embedded: false, exported: true, typ: http2Flags, tag: ""}, {prop: "Length", name: "Length", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}]); - http2Frame.init([{prop: "Header", name: "Header", pkg: "", typ: $funcType([], [http2FrameHeader], false)}, {prop: "invalidate", name: "invalidate", pkg: "net/http", typ: $funcType([], [], false)}]); - http2Framer.init("net/http", [{prop: "r", name: "r", embedded: false, exported: false, typ: io.Reader, tag: ""}, {prop: "lastFrame", name: "lastFrame", embedded: false, exported: false, typ: http2Frame, tag: ""}, {prop: "errDetail", name: "errDetail", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "countError", name: "countError", embedded: false, exported: false, typ: funcType$21, tag: ""}, {prop: "lastHeaderStream", name: "lastHeaderStream", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxReadSize", name: "maxReadSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "headerBuf", name: "headerBuf", embedded: false, exported: false, typ: arrayType$7, tag: ""}, {prop: "getReadBuf", name: "getReadBuf", embedded: false, exported: false, typ: funcType$22, tag: ""}, {prop: "readBuf", name: "readBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "maxWriteSize", name: "maxWriteSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "wbuf", name: "wbuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "AllowIllegalWrites", name: "AllowIllegalWrites", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "AllowIllegalReads", name: "AllowIllegalReads", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ReadMetaHeaders", name: "ReadMetaHeaders", embedded: false, exported: true, typ: ptrType$74, tag: ""}, {prop: "MaxHeaderListSize", name: "MaxHeaderListSize", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "logReads", name: "logReads", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "logWrites", name: "logWrites", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "debugFramer", name: "debugFramer", embedded: false, exported: false, typ: ptrType$72, tag: ""}, {prop: "debugFramerBuf", name: "debugFramerBuf", embedded: false, exported: false, typ: ptrType$40, tag: ""}, {prop: "debugReadLoggerf", name: "debugReadLoggerf", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "debugWriteLoggerf", name: "debugWriteLoggerf", embedded: false, exported: false, typ: funcType$1, tag: ""}, {prop: "frameCache", name: "frameCache", embedded: false, exported: false, typ: ptrType$73, tag: ""}]); - http2frameCache.init("net/http", [{prop: "dataFrame", name: "dataFrame", embedded: false, exported: false, typ: http2DataFrame, tag: ""}]); - http2DataFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "data", name: "data", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2SettingsFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2PingFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "Data", name: "Data", embedded: false, exported: true, typ: arrayType$8, tag: ""}]); - http2GoAwayFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "LastStreamID", name: "LastStreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "ErrCode", name: "ErrCode", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "debugData", name: "debugData", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2UnknownFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2WindowUpdateFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "Increment", name: "Increment", embedded: false, exported: true, typ: $Uint32, tag: ""}]); - http2HeadersFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "Priority", name: "Priority", embedded: false, exported: true, typ: http2PriorityParam, tag: ""}, {prop: "headerFragBuf", name: "headerFragBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2HeadersFrameParam.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "BlockFragment", name: "BlockFragment", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "EndStream", name: "EndStream", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "EndHeaders", name: "EndHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PadLength", name: "PadLength", embedded: false, exported: true, typ: $Uint8, tag: ""}, {prop: "Priority", name: "Priority", embedded: false, exported: true, typ: http2PriorityParam, tag: ""}]); - http2PriorityFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "http2PriorityParam", name: "http2PriorityParam", embedded: true, exported: false, typ: http2PriorityParam, tag: ""}]); - http2PriorityParam.init("", [{prop: "StreamDep", name: "StreamDep", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "Exclusive", name: "Exclusive", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Weight", name: "Weight", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - http2RSTStreamFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "ErrCode", name: "ErrCode", embedded: false, exported: true, typ: http2ErrCode, tag: ""}]); - http2ContinuationFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "headerFragBuf", name: "headerFragBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2PushPromiseFrame.init("net/http", [{prop: "http2FrameHeader", name: "http2FrameHeader", embedded: true, exported: false, typ: http2FrameHeader, tag: ""}, {prop: "PromiseID", name: "PromiseID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "headerFragBuf", name: "headerFragBuf", embedded: false, exported: false, typ: sliceType$3, tag: ""}]); - http2PushPromiseParam.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "PromiseID", name: "PromiseID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "BlockFragment", name: "BlockFragment", embedded: false, exported: true, typ: sliceType$3, tag: ""}, {prop: "EndHeaders", name: "EndHeaders", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "PadLength", name: "PadLength", embedded: false, exported: true, typ: $Uint8, tag: ""}]); - http2MetaHeadersFrame.init("net/http", [{prop: "http2HeadersFrame", name: "http2HeadersFrame", embedded: true, exported: false, typ: ptrType$75, tag: ""}, {prop: "Fields", name: "Fields", embedded: false, exported: true, typ: sliceType$22, tag: ""}, {prop: "Truncated", name: "Truncated", embedded: false, exported: true, typ: $Bool, tag: ""}]); - http2Setting.init("", [{prop: "ID", name: "ID", embedded: false, exported: true, typ: http2SettingID, tag: ""}, {prop: "Val", name: "Val", embedded: false, exported: true, typ: $Uint32, tag: ""}]); - http2gate.init(structType, false, false); - http2closeWaiter.init(structType, false, false); - http2bufferedWriter.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "w", name: "w", embedded: false, exported: false, typ: io.Writer, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$14, tag: ""}]); - http2httpError.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "msg", name: "msg", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: $Bool, tag: ""}]); - http2connectionStater.init([{prop: "ConnectionState", name: "ConnectionState", pkg: "", typ: $funcType([], [tls.ConnectionState], false)}]); - http2sorter.init("net/http", [{prop: "v", name: "v", embedded: false, exported: false, typ: sliceType$2, tag: ""}]); - http2incomparable.init(funcType, 0); - http2pipe.init("net/http", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "c", name: "c", embedded: false, exported: false, typ: sync.Cond, tag: ""}, {prop: "b", name: "b", embedded: false, exported: false, typ: http2pipeBuffer, tag: ""}, {prop: "unread", name: "unread", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "breakErr", name: "breakErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "donec", name: "donec", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "readFn", name: "readFn", embedded: false, exported: false, typ: funcType, tag: ""}]); - http2pipeBuffer.init([{prop: "Len", name: "Len", pkg: "", typ: $funcType([], [$Int], false)}, {prop: "Read", name: "Read", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}, {prop: "Write", name: "Write", pkg: "", typ: $funcType([sliceType$3], [$Int, $error], false)}]); - http2Server.init("net/http", [{prop: "MaxHandlers", name: "MaxHandlers", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxConcurrentStreams", name: "MaxConcurrentStreams", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "MaxReadFrameSize", name: "MaxReadFrameSize", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "PermitProhibitedCipherSuites", name: "PermitProhibitedCipherSuites", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "IdleTimeout", name: "IdleTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "MaxUploadBufferPerConnection", name: "MaxUploadBufferPerConnection", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "MaxUploadBufferPerStream", name: "MaxUploadBufferPerStream", embedded: false, exported: true, typ: $Int32, tag: ""}, {prop: "NewWriteScheduler", name: "NewWriteScheduler", embedded: false, exported: true, typ: funcType$24, tag: ""}, {prop: "CountError", name: "CountError", embedded: false, exported: true, typ: funcType$21, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: ptrType$60, tag: ""}]); - http2serverInternalState.init("net/http", [{prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "activeConns", name: "activeConns", embedded: false, exported: false, typ: mapType$16, tag: ""}]); - http2ServeConnOpts.init("", [{prop: "Context", name: "Context", embedded: false, exported: true, typ: context.Context, tag: ""}, {prop: "BaseConfig", name: "BaseConfig", embedded: false, exported: true, typ: ptrType$46, tag: ""}, {prop: "Handler", name: "Handler", embedded: false, exported: true, typ: Handler, tag: ""}]); - http2serverConn.init("net/http", [{prop: "srv", name: "srv", embedded: false, exported: false, typ: ptrType$86, tag: ""}, {prop: "hs", name: "hs", embedded: false, exported: false, typ: ptrType$46, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$88, tag: ""}, {prop: "handler", name: "handler", embedded: false, exported: false, typ: Handler, tag: ""}, {prop: "baseCtx", name: "baseCtx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "framer", name: "framer", embedded: false, exported: false, typ: ptrType$72, tag: ""}, {prop: "doneServing", name: "doneServing", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "readFrameCh", name: "readFrameCh", embedded: false, exported: false, typ: chanType$11, tag: ""}, {prop: "wantWriteFrameCh", name: "wantWriteFrameCh", embedded: false, exported: false, typ: chanType$12, tag: ""}, {prop: "wroteFrameCh", name: "wroteFrameCh", embedded: false, exported: false, typ: chanType$13, tag: ""}, {prop: "bodyReadCh", name: "bodyReadCh", embedded: false, exported: false, typ: chanType$14, tag: ""}, {prop: "serveMsgCh", name: "serveMsgCh", embedded: false, exported: false, typ: chanType$15, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$28, tag: ""}, {prop: "remoteAddrStr", name: "remoteAddrStr", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "writeSched", name: "writeSched", embedded: false, exported: false, typ: http2WriteScheduler, tag: ""}, {prop: "serveG", name: "serveG", embedded: false, exported: false, typ: http2goroutineLock, tag: ""}, {prop: "pushEnabled", name: "pushEnabled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawFirstSettings", name: "sawFirstSettings", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "needToSendSettingsAck", name: "needToSendSettingsAck", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "unackedSettings", name: "unackedSettings", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "queuedControlFrames", name: "queuedControlFrames", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "clientMaxStreams", name: "clientMaxStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "advMaxStreams", name: "advMaxStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "curClientStreams", name: "curClientStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "curPushedStreams", name: "curPushedStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxClientStreamID", name: "maxClientStreamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxPushPromiseID", name: "maxPushPromiseID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "streams", name: "streams", embedded: false, exported: false, typ: mapType$17, tag: ""}, {prop: "initialStreamSendWindowSize", name: "initialStreamSendWindowSize", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "maxFrameSize", name: "maxFrameSize", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "headerTableSize", name: "headerTableSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "peerMaxHeaderListSize", name: "peerMaxHeaderListSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "canonHeader", name: "canonHeader", embedded: false, exported: false, typ: mapType$18, tag: ""}, {prop: "writingFrame", name: "writingFrame", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "writingFrameAsync", name: "writingFrameAsync", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "needsFrameFlush", name: "needsFrameFlush", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "inGoAway", name: "inGoAway", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "inFrameScheduleLoop", name: "inFrameScheduleLoop", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "needToSendGoAway", name: "needToSendGoAway", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goAwayCode", name: "goAwayCode", embedded: false, exported: false, typ: http2ErrCode, tag: ""}, {prop: "shutdownTimer", name: "shutdownTimer", embedded: false, exported: false, typ: ptrType$25, tag: ""}, {prop: "idleTimer", name: "idleTimer", embedded: false, exported: false, typ: ptrType$25, tag: ""}, {prop: "headerWriteBuf", name: "headerWriteBuf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "hpackEncoder", name: "hpackEncoder", embedded: false, exported: false, typ: ptrType$89, tag: ""}, {prop: "shutdownOnce", name: "shutdownOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}]); - http2stream.init("net/http", [{prop: "sc", name: "sc", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "id", name: "id", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: ptrType$97, tag: ""}, {prop: "cw", name: "cw", embedded: false, exported: false, typ: http2closeWaiter, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "cancelCtx", name: "cancelCtx", embedded: false, exported: false, typ: funcType, tag: ""}, {prop: "bodyBytes", name: "bodyBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "declBodyBytes", name: "declBodyBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: http2streamState, tag: ""}, {prop: "resetQueued", name: "resetQueued", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "gotTrailerHeader", name: "gotTrailerHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wroteHeaders", name: "wroteHeaders", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "writeDeadline", name: "writeDeadline", embedded: false, exported: false, typ: ptrType$25, tag: ""}, {prop: "trailer", name: "trailer", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "reqTrailer", name: "reqTrailer", embedded: false, exported: false, typ: Header, tag: ""}]); - http2readFrameResult.init("net/http", [{prop: "f", name: "f", embedded: false, exported: false, typ: http2Frame, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "readMore", name: "readMore", embedded: false, exported: false, typ: funcType, tag: ""}]); - http2frameWriteResult.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "wr", name: "wr", embedded: false, exported: false, typ: http2FrameWriteRequest, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - http2requestParam.init("net/http", [{prop: "method", name: "method", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "scheme", name: "scheme", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "authority", name: "authority", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "path", name: "path", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}]); - http2bodyReadMsg.init("net/http", [{prop: "st", name: "st", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Int, tag: ""}]); - http2requestBody.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sawEOF", name: "sawEOF", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pipe", name: "pipe", embedded: false, exported: false, typ: ptrType$97, tag: ""}, {prop: "needsContinue", name: "needsContinue", embedded: false, exported: false, typ: $Bool, tag: ""}]); - http2responseWriter.init("net/http", [{prop: "rws", name: "rws", embedded: false, exported: false, typ: ptrType$99, tag: ""}]); - http2responseWriterState.init("net/http", [{prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "req", name: "req", embedded: false, exported: false, typ: ptrType$11, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: ptrType$12, tag: ""}, {prop: "conn", name: "conn", embedded: false, exported: false, typ: ptrType$13, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "handlerHeader", name: "handlerHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "snapHeader", name: "snapHeader", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "status", name: "status", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "wroteHeader", name: "wroteHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentHeader", name: "sentHeader", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "handlerDone", name: "handlerDone", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "dirty", name: "dirty", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentContentLen", name: "sentContentLen", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "wroteBytes", name: "wroteBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "closeNotifierMu", name: "closeNotifierMu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "closeNotifierCh", name: "closeNotifierCh", embedded: false, exported: false, typ: chanType$10, tag: ""}]); - http2chunkWriter.init("net/http", [{prop: "rws", name: "rws", embedded: false, exported: false, typ: ptrType$99, tag: ""}]); - http2startPushRequest.init("net/http", [{prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "method", name: "method", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "url", name: "url", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "header", name: "header", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType, tag: ""}]); - http2Transport.init("net/http", [{prop: "DialTLS", name: "DialTLS", embedded: false, exported: true, typ: funcType$25, tag: ""}, {prop: "TLSClientConfig", name: "TLSClientConfig", embedded: false, exported: true, typ: ptrType$4, tag: ""}, {prop: "ConnPool", name: "ConnPool", embedded: false, exported: true, typ: http2ClientConnPool, tag: ""}, {prop: "DisableCompression", name: "DisableCompression", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "AllowHTTP", name: "AllowHTTP", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "MaxHeaderListSize", name: "MaxHeaderListSize", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "StrictMaxConcurrentStreams", name: "StrictMaxConcurrentStreams", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "ReadIdleTimeout", name: "ReadIdleTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "PingTimeout", name: "PingTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "WriteByteTimeout", name: "WriteByteTimeout", embedded: false, exported: true, typ: time.Duration, tag: ""}, {prop: "CountError", name: "CountError", embedded: false, exported: true, typ: funcType$21, tag: ""}, {prop: "t1", name: "t1", embedded: false, exported: false, typ: ptrType$27, tag: ""}, {prop: "connPoolOnce", name: "connPoolOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "connPoolOrDef", name: "connPoolOrDef", embedded: false, exported: false, typ: http2ClientConnPool, tag: ""}]); - http2ClientConn.init("net/http", [{prop: "t", name: "t", embedded: false, exported: false, typ: ptrType$102, tag: ""}, {prop: "tconn", name: "tconn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "tlsState", name: "tlsState", embedded: false, exported: false, typ: ptrType$28, tag: ""}, {prop: "reused", name: "reused", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "singleUse", name: "singleUse", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "getConnCalled", name: "getConnCalled", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "readerDone", name: "readerDone", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "readerErr", name: "readerErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "idleTimeout", name: "idleTimeout", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "idleTimer", name: "idleTimer", embedded: false, exported: false, typ: ptrType$25, tag: ""}, {prop: "mu", name: "mu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "cond", name: "cond", embedded: false, exported: false, typ: ptrType$48, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "doNotReuse", name: "doNotReuse", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closing", name: "closing", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "closed", name: "closed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "seenSettings", name: "seenSettings", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "wantSettingsAck", name: "wantSettingsAck", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "goAway", name: "goAway", embedded: false, exported: false, typ: ptrType$82, tag: ""}, {prop: "goAwayDebug", name: "goAwayDebug", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "streams", name: "streams", embedded: false, exported: false, typ: mapType$19, tag: ""}, {prop: "streamsReserved", name: "streamsReserved", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "nextStreamID", name: "nextStreamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "pendingRequests", name: "pendingRequests", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "pings", name: "pings", embedded: false, exported: false, typ: mapType$20, tag: ""}, {prop: "br", name: "br", embedded: false, exported: false, typ: ptrType$29, tag: ""}, {prop: "lastActive", name: "lastActive", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "lastIdle", name: "lastIdle", embedded: false, exported: false, typ: time.Time, tag: ""}, {prop: "maxFrameSize", name: "maxFrameSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "maxConcurrentStreams", name: "maxConcurrentStreams", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "peerMaxHeaderListSize", name: "peerMaxHeaderListSize", embedded: false, exported: false, typ: $Uint64, tag: ""}, {prop: "initialWindowSize", name: "initialWindowSize", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "reqHeaderMu", name: "reqHeaderMu", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "wmu", name: "wmu", embedded: false, exported: false, typ: sync.Mutex, tag: ""}, {prop: "bw", name: "bw", embedded: false, exported: false, typ: ptrType$14, tag: ""}, {prop: "fr", name: "fr", embedded: false, exported: false, typ: ptrType$72, tag: ""}, {prop: "werr", name: "werr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "hbuf", name: "hbuf", embedded: false, exported: false, typ: bytes.Buffer, tag: ""}, {prop: "henc", name: "henc", embedded: false, exported: false, typ: ptrType$89, tag: ""}]); - http2clientStream.init("net/http", [{prop: "cc", name: "cc", embedded: false, exported: false, typ: ptrType$68, tag: ""}, {prop: "ctx", name: "ctx", embedded: false, exported: false, typ: context.Context, tag: ""}, {prop: "reqCancel", name: "reqCancel", embedded: false, exported: false, typ: chanType$2, tag: ""}, {prop: "trace", name: "trace", embedded: false, exported: false, typ: ptrType$19, tag: ""}, {prop: "ID", name: "ID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "bufPipe", name: "bufPipe", embedded: false, exported: false, typ: http2pipe, tag: ""}, {prop: "requestedGzip", name: "requestedGzip", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "isHead", name: "isHead", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "abortOnce", name: "abortOnce", embedded: false, exported: false, typ: sync.Once, tag: ""}, {prop: "abort", name: "abort", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "abortErr", name: "abortErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "peerClosed", name: "peerClosed", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "donec", name: "donec", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "on100", name: "on100", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "respHeaderRecv", name: "respHeaderRecv", embedded: false, exported: false, typ: chanType$1, tag: ""}, {prop: "res", name: "res", embedded: false, exported: false, typ: ptrType$18, tag: ""}, {prop: "flow", name: "flow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "inflow", name: "inflow", embedded: false, exported: false, typ: http2flow, tag: ""}, {prop: "bytesRemain", name: "bytesRemain", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "readErr", name: "readErr", embedded: false, exported: false, typ: $error, tag: ""}, {prop: "reqBody", name: "reqBody", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "reqBodyContentLength", name: "reqBodyContentLength", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "reqBodyClosed", name: "reqBodyClosed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentEndStream", name: "sentEndStream", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "sentHeaders", name: "sentHeaders", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "firstByte", name: "firstByte", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pastHeaders", name: "pastHeaders", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "pastTrailers", name: "pastTrailers", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "num1xx", name: "num1xx", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "readClosed", name: "readClosed", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "readAborted", name: "readAborted", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "trailer", name: "trailer", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "resTrailer", name: "resTrailer", embedded: false, exported: false, typ: ptrType$38, tag: ""}]); - http2stickyErrWriter.init("net/http", [{prop: "conn", name: "conn", embedded: false, exported: false, typ: net.Conn, tag: ""}, {prop: "timeout", name: "timeout", embedded: false, exported: false, typ: time.Duration, tag: ""}, {prop: "err", name: "err", embedded: false, exported: false, typ: ptrType$85, tag: ""}]); - http2noCachedConnError.init("", []); - http2RoundTripOpt.init("", [{prop: "OnlyCachedConn", name: "OnlyCachedConn", embedded: false, exported: true, typ: $Bool, tag: ""}]); - http2ClientConnState.init("", [{prop: "Closed", name: "Closed", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Closing", name: "Closing", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "StreamsActive", name: "StreamsActive", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "StreamsReserved", name: "StreamsReserved", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "StreamsPending", name: "StreamsPending", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxConcurrentStreams", name: "MaxConcurrentStreams", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "LastIdle", name: "LastIdle", embedded: false, exported: true, typ: time.Time, tag: ""}]); - http2clientConnIdleState.init("net/http", [{prop: "canTakeNewRequest", name: "canTakeNewRequest", embedded: false, exported: false, typ: $Bool, tag: ""}]); - http2clientConnReadLoop.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "cc", name: "cc", embedded: false, exported: false, typ: ptrType$68, tag: ""}]); - http2GoAwayError.init("", [{prop: "LastStreamID", name: "LastStreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}, {prop: "ErrCode", name: "ErrCode", embedded: false, exported: true, typ: http2ErrCode, tag: ""}, {prop: "DebugData", name: "DebugData", embedded: false, exported: true, typ: $String, tag: ""}]); - http2transportResponseBody.init("net/http", [{prop: "cs", name: "cs", embedded: false, exported: false, typ: ptrType$104, tag: ""}]); - http2missingBody.init("", []); - http2erringRoundTripper.init("net/http", [{prop: "err", name: "err", embedded: false, exported: false, typ: $error, tag: ""}]); - http2gzipReader.init("net/http", [{prop: "_$0", name: "_", embedded: false, exported: false, typ: http2incomparable, tag: ""}, {prop: "body", name: "body", embedded: false, exported: false, typ: io.ReadCloser, tag: ""}, {prop: "zr", name: "zr", embedded: false, exported: false, typ: ptrType$33, tag: ""}, {prop: "zerr", name: "zerr", embedded: false, exported: false, typ: $error, tag: ""}]); - http2noDialH2RoundTripper.init("net/http", [{prop: "http2Transport", name: "http2Transport", embedded: true, exported: false, typ: ptrType$102, tag: ""}]); - http2writeFramer.init([{prop: "staysWithinBuffer", name: "staysWithinBuffer", pkg: "net/http", typ: $funcType([$Int], [$Bool], false)}, {prop: "writeFrame", name: "writeFrame", pkg: "net/http", typ: $funcType([http2writeContext], [$error], false)}]); - http2writeContext.init([{prop: "CloseConn", name: "CloseConn", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Flush", name: "Flush", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Framer", name: "Framer", pkg: "", typ: $funcType([], [ptrType$72], false)}, {prop: "HeaderEncoder", name: "HeaderEncoder", pkg: "", typ: $funcType([], [ptrType$89, ptrType$40], false)}]); - http2flushFrameWriter.init("", []); - http2writeSettings.init(http2Setting); - http2writeGoAway.init("net/http", [{prop: "maxStreamID", name: "maxStreamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "code", name: "code", embedded: false, exported: false, typ: http2ErrCode, tag: ""}]); - http2writeData.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "p", name: "p", embedded: false, exported: false, typ: sliceType$3, tag: ""}, {prop: "endStream", name: "endStream", embedded: false, exported: false, typ: $Bool, tag: ""}]); - http2handlerPanicRST.init("", [{prop: "StreamID", name: "StreamID", embedded: false, exported: true, typ: $Uint32, tag: ""}]); - http2writePingAck.init("net/http", [{prop: "pf", name: "pf", embedded: false, exported: false, typ: ptrType$81, tag: ""}]); - http2writeSettingsAck.init("", []); - http2writeResHeaders.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "httpResCode", name: "httpResCode", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "trailers", name: "trailers", embedded: false, exported: false, typ: sliceType$2, tag: ""}, {prop: "endStream", name: "endStream", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "date", name: "date", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "contentType", name: "contentType", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "contentLength", name: "contentLength", embedded: false, exported: false, typ: $String, tag: ""}]); - http2writePushPromise.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "method", name: "method", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "url", name: "url", embedded: false, exported: false, typ: ptrType$17, tag: ""}, {prop: "h", name: "h", embedded: false, exported: false, typ: Header, tag: ""}, {prop: "allocatePromisedID", name: "allocatePromisedID", embedded: false, exported: false, typ: funcType$27, tag: ""}, {prop: "promisedID", name: "promisedID", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - http2write100ContinueHeadersFrame.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - http2writeWindowUpdate.init("net/http", [{prop: "streamID", name: "streamID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "n", name: "n", embedded: false, exported: false, typ: $Uint32, tag: ""}]); - http2WriteScheduler.init([{prop: "AdjustStream", name: "AdjustStream", pkg: "", typ: $funcType([$Uint32, http2PriorityParam], [], false)}, {prop: "CloseStream", name: "CloseStream", pkg: "", typ: $funcType([$Uint32], [], false)}, {prop: "OpenStream", name: "OpenStream", pkg: "", typ: $funcType([$Uint32, http2OpenStreamOptions], [], false)}, {prop: "Pop", name: "Pop", pkg: "", typ: $funcType([], [http2FrameWriteRequest, $Bool], false)}, {prop: "Push", name: "Push", pkg: "", typ: $funcType([http2FrameWriteRequest], [], false)}]); - http2OpenStreamOptions.init("", [{prop: "PusherID", name: "PusherID", embedded: false, exported: true, typ: $Uint32, tag: ""}]); - http2FrameWriteRequest.init("net/http", [{prop: "write", name: "write", embedded: false, exported: false, typ: http2writeFramer, tag: ""}, {prop: "stream", name: "stream", embedded: false, exported: false, typ: ptrType$10, tag: ""}, {prop: "done", name: "done", embedded: false, exported: false, typ: chanType, tag: ""}]); - http2writeQueue.init("net/http", [{prop: "s", name: "s", embedded: false, exported: false, typ: sliceType$24, tag: ""}]); - http2writeQueuePool.init(ptrType$105); - http2PriorityWriteSchedulerConfig.init("", [{prop: "MaxClosedNodesInTree", name: "MaxClosedNodesInTree", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "MaxIdleNodesInTree", name: "MaxIdleNodesInTree", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "ThrottleOutOfOrderWrites", name: "ThrottleOutOfOrderWrites", embedded: false, exported: true, typ: $Bool, tag: ""}]); - http2priorityNode.init("net/http", [{prop: "q", name: "q", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "id", name: "id", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "weight", name: "weight", embedded: false, exported: false, typ: $Uint8, tag: ""}, {prop: "state", name: "state", embedded: false, exported: false, typ: http2priorityNodeState, tag: ""}, {prop: "bytes", name: "bytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "subtreeBytes", name: "subtreeBytes", embedded: false, exported: false, typ: $Int64, tag: ""}, {prop: "parent", name: "parent", embedded: false, exported: false, typ: ptrType$106, tag: ""}, {prop: "kids", name: "kids", embedded: false, exported: false, typ: ptrType$106, tag: ""}, {prop: "prev", name: "prev", embedded: false, exported: false, typ: ptrType$106, tag: ""}, {prop: "next", name: "next", embedded: false, exported: false, typ: ptrType$106, tag: ""}]); - http2sortPriorityNodeSiblings.init(ptrType$106); - http2priorityWriteScheduler.init("net/http", [{prop: "root", name: "root", embedded: false, exported: false, typ: http2priorityNode, tag: ""}, {prop: "nodes", name: "nodes", embedded: false, exported: false, typ: mapType$21, tag: ""}, {prop: "maxID", name: "maxID", embedded: false, exported: false, typ: $Uint32, tag: ""}, {prop: "closedNodes", name: "closedNodes", embedded: false, exported: false, typ: sliceType$25, tag: ""}, {prop: "idleNodes", name: "idleNodes", embedded: false, exported: false, typ: sliceType$25, tag: ""}, {prop: "maxClosedNodesInTree", name: "maxClosedNodesInTree", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "maxIdleNodesInTree", name: "maxIdleNodesInTree", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "writeThrottleLimit", name: "writeThrottleLimit", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "enableWriteThrottle", name: "enableWriteThrottle", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "tmp", name: "tmp", embedded: false, exported: false, typ: sliceType$25, tag: ""}, {prop: "queuePool", name: "queuePool", embedded: false, exported: false, typ: http2writeQueuePool, tag: ""}]); - http2randomWriteScheduler.init("net/http", [{prop: "zero", name: "zero", embedded: false, exported: false, typ: http2writeQueue, tag: ""}, {prop: "sq", name: "sq", embedded: false, exported: false, typ: mapType$22, tag: ""}, {prop: "queuePool", name: "queuePool", embedded: false, exported: false, typ: http2writeQueuePool, tag: ""}]); - Cookie.init("", [{prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Value", name: "Value", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Path", name: "Path", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Domain", name: "Domain", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Expires", name: "Expires", embedded: false, exported: true, typ: time.Time, tag: ""}, {prop: "RawExpires", name: "RawExpires", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "MaxAge", name: "MaxAge", embedded: false, exported: true, typ: $Int, tag: ""}, {prop: "Secure", name: "Secure", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "HttpOnly", name: "HttpOnly", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "SameSite", name: "SameSite", embedded: false, exported: true, typ: SameSite, tag: ""}, {prop: "Raw", name: "Raw", embedded: false, exported: true, typ: $String, tag: ""}, {prop: "Unparsed", name: "Unparsed", embedded: false, exported: true, typ: sliceType$2, tag: ""}]); - RoundTripper.init([{prop: "RoundTrip", name: "RoundTrip", pkg: "", typ: $funcType([ptrType$11], [ptrType$18, $error], false)}]); - noTransport.init("", []); - XHRTransport.init("net/http", [{prop: "inflight", name: "inflight", embedded: false, exported: false, typ: mapType$23, tag: ""}]); - requestTooLarger.init([{prop: "requestTooLarge", name: "requestTooLarge", pkg: "net/http", typ: $funcType([], [], false)}]); - baseContexter.init([{prop: "BaseContext", name: "BaseContext", pkg: "", typ: $funcType([], [context.Context], false)}]); - I.init([{prop: "doKeepAlives", name: "doKeepAlives", pkg: "net/http", typ: $funcType([], [$Bool], false)}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bufio.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bytes.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = gzip.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = list.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = context.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand$1.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = tls.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = base64.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = binary.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js$1.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = godebug.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fs.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ioutil.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = log.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = rand.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = mime.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = multipart.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = net.$init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = httptrace.$init(); /* */ $s = 23; case 23: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = internal.$init(); /* */ $s = 24; case 24: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ascii.$init(); /* */ $s = 25; case 25: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = textproto.$init(); /* */ $s = 26; case 26: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = url.$init(); /* */ $s = 27; case 27: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 28; case 28: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = path.$init(); /* */ $s = 29; case 29: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = filepath.$init(); /* */ $s = 30; case 30: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 31; case 31: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 32; case 32: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 33; case 33: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 34; case 34: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 35; case 35: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 36; case 36: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 37; case 37: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 38; case 38: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 39; case 39: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = utf8.$init(); /* */ $s = 40; case 40: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = httpguts.$init(); /* */ $s = 41; case 41: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = httpproxy.$init(); /* */ $s = 42; case 42: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = hpack.$init(); /* */ $s = 43; case 43: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = idna.$init(); /* */ $s = 44; case 44: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - envProxyOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - envProxyFuncValue = $throwNilPointerError; - zeroDialer = new net.Dialer.ptr(new time.Duration(0, 0), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(0, 0), ptrType$1.nil, $chanNil, $throwNilPointerError); - bufioReaderPool = new sync.Pool.ptr(sliceType.nil, $throwNilPointerError); - bufioWriter2kPool = new sync.Pool.ptr(sliceType.nil, $throwNilPointerError); - bufioWriter4kPool = new sync.Pool.ptr(sliceType.nil, $throwNilPointerError); - defaultServeMux = new ServeMux.ptr(new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0), false, sliceType$1.nil, false); - testHookServerServe = $throwNilPointerError; - uniqNameMu = new sync.Mutex.ptr(0, 0); - textprotoReaderPool = new sync.Pool.ptr(sliceType.nil, $throwNilPointerError); - omitBundledHTTP2 = false; - http2commonBuildOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - http2commonLowerHeader = false; - http2commonCanonHeader = false; - http2VerboseLogs = false; - http2logFrameWrites = false; - http2logFrameReads = false; - http2inTests = false; - http2testHookOnConn = $throwNilPointerError; - http2testHookGetServerConn = $throwNilPointerError; - http2testHookOnPanicMu = ptrType$2.nil; - http2testHookOnPanic = $throwNilPointerError; - http2got1xxFuncForTests = $throwNilPointerError; - http2bufPool = new sync.Pool.ptr(sliceType.nil, $throwNilPointerError); - errCannotRewind = errors.New("net/http: cannot rewind body after connection loss"); - $pkg.ErrSkipAltProtocol = errors.New("net/http: skip alternate protocol"); - $unused(new Transport.ptr(new sync.Mutex.ptr(0, 0), false, false, false, new connLRU.ptr(ptrType$3.nil, false), new sync.Mutex.ptr(0, 0), false, new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), new sync.Mutex.ptr(0, 0), false, false, ProxyFromEnvironment, defaultTransportDialContext(new net.Dialer.ptr(new time.Duration(6, 4230196224), new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil), $ifaceNil, false, new time.Duration(0, 0), new time.Duration(6, 4230196224), ptrType$1.nil, $chanNil, $throwNilPointerError)), $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$4.nil, new time.Duration(2, 1410065408), false, false, 100, 0, 0, new time.Duration(20, 4100654080), new time.Duration(0, 0), new time.Duration(0, 1000000000), false, false, $throwNilPointerError, new $Int64(0, 0), 0, 0, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil, false, true)); - errKeepAlivesDisabled = errors.New("http: putIdleConn: keep alives disabled"); - errConnBroken = errors.New("http: putIdleConn: connection is in bad state"); - errCloseIdle = errors.New("http: putIdleConn: CloseIdleConnections was called"); - errTooManyIdle = errors.New("http: putIdleConn: too many idle connections"); - errTooManyIdleHost = errors.New("http: putIdleConn: too many idle connections for host"); - errCloseIdleConns = errors.New("http: CloseIdleConnections called"); - errReadLoopExiting = errors.New("http: persistConn.readLoop exiting"); - errIdleConnTimeout = errors.New("http: idle connection timeout"); - errServerClosedIdle = errors.New("http: server closed idle connection"); - errCallerOwnsConn = errors.New("read loop ending; caller owns writable underlying conn"); - errTimeout = new httpError.ptr("net/http: timeout awaiting response headers", true); - errRequestCanceledConn = errors.New("net/http: request canceled while waiting for connection"); - testHookEnterRoundTrip = nop; - testHookWaitResLoop = nop; - testHookRoundTripRetried = nop; - testHookPrePendingDial = nop; - testHookPostPendingDial = nop; - testHookMu = (x = new fakeLocker.ptr(), new x.constructor.elem(x)); - testHookReadLoopBeforeNextRead = nop; - portMap = $makeMap($String.keyFor, [{ k: "http", v: "80" }, { k: "https", v: "443" }, { k: "socks5", v: "1080" }]); - errReadOnClosedResBody = errors.New("http: read on closed response body"); - suppressedHeaders304 = new sliceType$2(["Content-Type", "Content-Length", "Transfer-Encoding"]); - suppressedHeadersNoBody = new sliceType$2(["Content-Length", "Transfer-Encoding"]); - $pkg.ErrBodyReadAfterClose = errors.New("http: invalid Read on closed Body"); - singleCRLF = (new sliceType$3($stringToBytes("\r\n"))); - doubleCRLF = (new sliceType$3($stringToBytes("\r\n\r\n"))); - errTrailerEOF = errors.New("http: unexpected EOF reading trailer"); - nopCloserType = reflect.TypeOf(io.NopCloser($ifaceNil)); - statusText = $makeMap($Int.keyFor, [{ k: 100, v: "Continue" }, { k: 101, v: "Switching Protocols" }, { k: 102, v: "Processing" }, { k: 103, v: "Early Hints" }, { k: 200, v: "OK" }, { k: 201, v: "Created" }, { k: 202, v: "Accepted" }, { k: 203, v: "Non-Authoritative Information" }, { k: 204, v: "No Content" }, { k: 205, v: "Reset Content" }, { k: 206, v: "Partial Content" }, { k: 207, v: "Multi-Status" }, { k: 208, v: "Already Reported" }, { k: 226, v: "IM Used" }, { k: 300, v: "Multiple Choices" }, { k: 301, v: "Moved Permanently" }, { k: 302, v: "Found" }, { k: 303, v: "See Other" }, { k: 304, v: "Not Modified" }, { k: 305, v: "Use Proxy" }, { k: 307, v: "Temporary Redirect" }, { k: 308, v: "Permanent Redirect" }, { k: 400, v: "Bad Request" }, { k: 401, v: "Unauthorized" }, { k: 402, v: "Payment Required" }, { k: 403, v: "Forbidden" }, { k: 404, v: "Not Found" }, { k: 405, v: "Method Not Allowed" }, { k: 406, v: "Not Acceptable" }, { k: 407, v: "Proxy Authentication Required" }, { k: 408, v: "Request Timeout" }, { k: 409, v: "Conflict" }, { k: 410, v: "Gone" }, { k: 411, v: "Length Required" }, { k: 412, v: "Precondition Failed" }, { k: 413, v: "Request Entity Too Large" }, { k: 414, v: "Request URI Too Long" }, { k: 415, v: "Unsupported Media Type" }, { k: 416, v: "Requested Range Not Satisfiable" }, { k: 417, v: "Expectation Failed" }, { k: 418, v: "I'm a teapot" }, { k: 421, v: "Misdirected Request" }, { k: 422, v: "Unprocessable Entity" }, { k: 423, v: "Locked" }, { k: 424, v: "Failed Dependency" }, { k: 425, v: "Too Early" }, { k: 426, v: "Upgrade Required" }, { k: 428, v: "Precondition Required" }, { k: 429, v: "Too Many Requests" }, { k: 431, v: "Request Header Fields Too Large" }, { k: 451, v: "Unavailable For Legal Reasons" }, { k: 500, v: "Internal Server Error" }, { k: 501, v: "Not Implemented" }, { k: 502, v: "Bad Gateway" }, { k: 503, v: "Service Unavailable" }, { k: 504, v: "Gateway Timeout" }, { k: 505, v: "HTTP Version Not Supported" }, { k: 506, v: "Variant Also Negotiates" }, { k: 507, v: "Insufficient Storage" }, { k: 508, v: "Loop Detected" }, { k: 510, v: "Not Extended" }, { k: 511, v: "Network Authentication Required" }]); - socksnoDeadline = new time.Time.ptr(new $Uint64(0, 0), new $Int64(0, 0), ptrType.nil); - socksaLongTimeAgo = $clone(time.Unix(new $Int64(0, 1), new $Int64(0, 0)), time.Time); - sniffSignatures = new sliceType$4([(new htmlSig($stringToBytes("", ">", "\"", """, "'", "'"])); - $pkg.DefaultServeMux = defaultServeMux; - stateName = $makeMap(ConnState.keyFor, [{ k: 0, v: "new" }, { k: 1, v: "active" }, { k: 2, v: "idle" }, { k: 3, v: "hijacked" }, { k: 4, v: "closed" }]); - silenceSemWarnContextKey = new contextKey.ptr("silence-semicolons"); - $pkg.ErrServerClosed = errors.New("http: Server closed"); - $pkg.ErrHandlerTimeout = errors.New("http: Handler timeout"); - uniqNameNext = {}; - uint8Array = $clone($clone(js.Global(), js.Value).Get("Uint8Array"), js.Value); - jsFetchMissing = $clone($clone(js.Global(), js.Value).Get("fetch"), js.Value).IsUndefined(); - errClosed = errors.New("net/http: reader is closed"); - respExcludeHeader = $makeMap($String.keyFor, [{ k: "Content-Length", v: true }, { k: "Transfer-Encoding", v: true }, { k: "Trailer", v: true }]); - $pkg.ErrNoLocation = errors.New("http: no Location header in response"); - $pkg.ErrMissingFile = errors.New("http: no such file"); - $pkg.ErrNotSupported = new ProtocolError.ptr("feature not supported"); - $pkg.ErrMissingBoundary = new ProtocolError.ptr("no multipart boundary param in Content-Type"); - $pkg.ErrNotMultipart = new ProtocolError.ptr("request Content-Type isn't multipart/form-data"); - reqWriteExcludeHeader = $makeMap($String.keyFor, [{ k: "Host", v: true }, { k: "User-Agent", v: true }, { k: "Content-Length", v: true }, { k: "Transfer-Encoding", v: true }, { k: "Trailer", v: true }]); - $pkg.ErrNoCookie = errors.New("http: named cookie not present"); - multipartByReader = new multipart.Form.ptr({}, {}); - errMissingHost = errors.New("http: Request.Write on Request with no Host or URL set"); - aLongTimeAgo = $clone(time.Unix(new $Int64(0, 1), new $Int64(0, 0)), time.Time); - $pkg.NoBody = new noBody.ptr(); - headerNewlineToSpace = strings.NewReplacer(new sliceType$2(["\n", " ", "\r", " "])); - headerSorterPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new headerSorter.ptr(sliceType$6.nil); - })); - http2dataChunkSizeClasses = new sliceType$7([1024, 2048, 4096, 8192, 16384]); - http2dataChunkPools = $toNativeArray($kindStruct, [new sync.Pool.ptr(sliceType.nil, (function() { - return $makeSlice(sliceType$3, 1024); - })), new sync.Pool.ptr(sliceType.nil, (function() { - return $makeSlice(sliceType$3, 2048); - })), new sync.Pool.ptr(sliceType.nil, (function() { - return $makeSlice(sliceType$3, 4096); - })), new sync.Pool.ptr(sliceType.nil, (function() { - return $makeSlice(sliceType$3, 8192); - })), new sync.Pool.ptr(sliceType.nil, (function() { - return $makeSlice(sliceType$3, 16384); - }))]); - http2errReadEmpty = errors.New("read from empty dataBuffer"); - http2errCodeName = $makeMap(http2ErrCode.keyFor, [{ k: 0, v: "NO_ERROR" }, { k: 1, v: "PROTOCOL_ERROR" }, { k: 2, v: "INTERNAL_ERROR" }, { k: 3, v: "FLOW_CONTROL_ERROR" }, { k: 4, v: "SETTINGS_TIMEOUT" }, { k: 5, v: "STREAM_CLOSED" }, { k: 6, v: "FRAME_SIZE_ERROR" }, { k: 7, v: "REFUSED_STREAM" }, { k: 8, v: "CANCEL" }, { k: 9, v: "COMPRESSION_ERROR" }, { k: 10, v: "CONNECT_ERROR" }, { k: 11, v: "ENHANCE_YOUR_CALM" }, { k: 12, v: "INADEQUATE_SECURITY" }, { k: 13, v: "HTTP_1_1_REQUIRED" }]); - http2errFromPeer = errors.New("received from peer"); - http2errMixPseudoHeaderTypes = errors.New("mix of request and response pseudo headers"); - http2errPseudoAfterRegular = errors.New("pseudo header field after regular"); - http2padZeros = $makeSlice(sliceType$3, 255); - http2frameName = $makeMap(http2FrameType.keyFor, [{ k: 0, v: "DATA" }, { k: 1, v: "HEADERS" }, { k: 2, v: "PRIORITY" }, { k: 3, v: "RST_STREAM" }, { k: 4, v: "SETTINGS" }, { k: 5, v: "PUSH_PROMISE" }, { k: 6, v: "PING" }, { k: 7, v: "GOAWAY" }, { k: 8, v: "WINDOW_UPDATE" }, { k: 9, v: "CONTINUATION" }]); - http2flagName = $makeMap(http2FrameType.keyFor, [{ k: 0, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "END_STREAM" }, { k: 8, v: "PADDED" }]) }, { k: 1, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "END_STREAM" }, { k: 4, v: "END_HEADERS" }, { k: 8, v: "PADDED" }, { k: 32, v: "PRIORITY" }]) }, { k: 4, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "ACK" }]) }, { k: 6, v: $makeMap(http2Flags.keyFor, [{ k: 1, v: "ACK" }]) }, { k: 9, v: $makeMap(http2Flags.keyFor, [{ k: 4, v: "END_HEADERS" }]) }, { k: 5, v: $makeMap(http2Flags.keyFor, [{ k: 4, v: "END_HEADERS" }, { k: 8, v: "PADDED" }]) }]); - http2fhBytes = new sync.Pool.ptr(sliceType.nil, (function() { - var buf, buf$24ptr; - buf = $makeSlice(sliceType$3, 9); - return (buf$24ptr || (buf$24ptr = new ptrType$6(function() { return buf; }, function($v) { buf = $convertSliceType($v, sliceType$3); }))); - })); - http2ErrFrameTooLarge = errors.New("http2: frame too large"); - http2errStreamID = errors.New("invalid stream ID"); - http2errDepStreamID = errors.New("invalid dependent stream ID"); - http2errPadLength = errors.New("pad length too large"); - http2errPadBytes = errors.New("padding bytes must all be zeros unless AllowIllegalWrites is enabled"); - _r = os.Getenv("DEBUG_HTTP2_GOROUTINES"); /* */ $s = 45; case 45: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - http2DebugGoroutines = _r === "1"; - http2goroutineSpace = (new sliceType$3($stringToBytes("goroutine "))); - http2littleBuf = new sync.Pool.ptr(sliceType.nil, (function() { - var buf, buf$24ptr; - buf = $makeSlice(sliceType$3, 64); - return (buf$24ptr || (buf$24ptr = new ptrType$6(function() { return buf; }, function($v) { buf = $convertSliceType($v, sliceType$3); }))); - })); - http2clientPreface = (new sliceType$3($stringToBytes("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"))); - http2stateName = $toNativeArray($kindString, ["Idle", "Open", "HalfClosedLocal", "HalfClosedRemote", "Closed"]); - http2frameParsers = $makeMap(http2FrameType.keyFor, [{ k: 0, v: http2parseDataFrame }, { k: 1, v: http2parseHeadersFrame }, { k: 2, v: http2parsePriorityFrame }, { k: 3, v: http2parseRSTStreamFrame }, { k: 4, v: http2parseSettingsFrame }, { k: 5, v: http2parsePushPromise }, { k: 6, v: http2parsePingFrame }, { k: 7, v: http2parseGoAwayFrame }, { k: 8, v: http2parseWindowUpdateFrame }, { k: 9, v: http2parseContinuationFrame }]); - http2settingName = $makeMap(http2SettingID.keyFor, [{ k: 1, v: "HEADER_TABLE_SIZE" }, { k: 2, v: "ENABLE_PUSH" }, { k: 3, v: "MAX_CONCURRENT_STREAMS" }, { k: 4, v: "INITIAL_WINDOW_SIZE" }, { k: 5, v: "MAX_FRAME_SIZE" }, { k: 6, v: "MAX_HEADER_LIST_SIZE" }]); - http2bufWriterPool = new sync.Pool.ptr(sliceType.nil, (function() { - return bufio.NewWriterSize($ifaceNil, 4096); - })); - http2errTimeout = new http2httpError.ptr(arrayType.zero(), "http2: timeout awaiting response headers", true); - http2sorterPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new http2sorter.ptr(sliceType$2.nil); - })); - http2errClosedPipeWrite = errors.New("write on closed buffer"); - http2errClientDisconnected = errors.New("client disconnected"); - http2errClosedBody = errors.New("body closed by handler"); - http2errHandlerComplete = errors.New("http2: request body closed due to handler exiting"); - http2errStreamClosed = errors.New("http2: stream closed"); - http2responseWriterStatePool = new sync.Pool.ptr(sliceType.nil, (function() { - var rws, x$4; - rws = new http2responseWriterState.ptr(ptrType$10.nil, ptrType$11.nil, ptrType$12.nil, ptrType$13.nil, ptrType$14.nil, false, false, sliceType$2.nil, 0, false, false, false, false, new $Int64(0, 0), new $Int64(0, 0), new sync.Mutex.ptr(0, 0), $chanNil); - rws.bw = bufio.NewWriterSize((x$4 = new http2chunkWriter.ptr(rws), new x$4.constructor.elem(x$4)), 4096); - return rws; - })); - http2settingsTimerMsg = $newDataPointer(0, ptrType$15); - http2idleTimerMsg = $newDataPointer(0, ptrType$15); - http2shutdownTimerMsg = $newDataPointer(0, ptrType$15); - http2gracefulShutdownMsg = $newDataPointer(0, ptrType$15); - http2errPrefaceTimeout = errors.New("timeout waiting for client preface"); - http2errChanPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new chanType(new $Chan($error, 1)); - })); - http2writeDataPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new http2writeData.ptr(0, sliceType$3.nil, false); - })); - http2errHandlerPanicked = errors.New("http2: handler panicked"); - http2goAwayTimeout = new time.Duration(0, 1000000000); - http2ErrRecursivePush = errors.New("http2: recursive push not allowed"); - http2ErrPushLimitReached = errors.New("http2: push would exceed peer's SETTINGS_MAX_CONCURRENT_STREAMS"); - http2connHeaders = new sliceType$2(["Connection", "Keep-Alive", "Proxy-Connection", "Transfer-Encoding", "Upgrade"]); - http2ErrNoCachedConn = (x$4 = new http2noCachedConnError.ptr(), new x$4.constructor.elem(x$4)); - http2errClientConnClosed = errors.New("http2: client conn is closed"); - http2errClientConnUnusable = errors.New("http2: client conn not usable"); - http2errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY"); - http2shutdownEnterWaitStateHook = (function() { - }); - http2errRequestCanceled = errors.New("net/http: request canceled"); - errRequestCanceled = http2errRequestCanceled; - http2errStopReqBodyWrite = errors.New("http2: aborting request body write"); - http2errStopReqBodyWriteAndCancel = errors.New("http2: canceling request"); - http2errReqBodyTooLong = errors.New("http2: request body larger than specified content length"); - http2errNilRequestURL = errors.New("http2: Request.URI is nil"); - http2errClosedResponseBody = errors.New("http2: response body closed"); - http2errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit"); - http2errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit"); - http2noBody = ioutil.NopCloser(bytes.NewReader(sliceType$3.nil)); - errSeeker = errors.New("seeker can't seek"); - errNoOverlap = errors.New("invalid range: failed to overlap"); - unixEpochTime = $clone(time.Unix(new $Int64(0, 0), new $Int64(0, 0)), time.Time); - errMissingSeek = errors.New("io.File missing Seek method"); - errMissingReadDir = errors.New("io.File directory missing ReadDir method"); - cookieNameSanitizer = strings.NewReplacer(new sliceType$2(["\n", "-", "\r", "-"])); - $pkg.ErrUseLastResponse = errors.New("net/http: use last response"); - $pkg.DefaultTransport = (function() { - var x$5; - if (!($global.fetch === undefined)) { - return new Transport.ptr(new sync.Mutex.ptr(0, 0), false, false, false, new connLRU.ptr(ptrType$3.nil, false), new sync.Mutex.ptr(0, 0), false, new sync.Mutex.ptr(0, 0), new atomic.Value.ptr($ifaceNil), new sync.Mutex.ptr(0, 0), false, false, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, ptrType$4.nil, new time.Duration(0, 0), false, false, 0, 0, 0, new time.Duration(0, 0), new time.Duration(0, 0), new time.Duration(0, 0), false, false, $throwNilPointerError, new $Int64(0, 0), 0, 0, new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)), $ifaceNil, false, false); - } else if (!($global.XMLHttpRequest === undefined)) { - return new XHRTransport.ptr(false); - } else { - return (x$5 = new noTransport.ptr(), new x$5.constructor.elem(x$5)); - } - })(); - $r = init(); /* */ $s = 46; case 46: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["go.uber.org/zap"] = (function() { - var $pkg = {}, $init, bytes, json, errors, flag, fmt, atomic, multierr, bufferpool, zapcore, io, ioutil, log, math, http, url, os, runtime, sort, strings, sync, time, SugaredLogger, invalidPair, invalidPairs, programCounters, nopCloserSink, errSinkNotFound, Option, optionFunc, Logger, AtomicLevel, errArray, errArrayElem, SamplingConfig, Config, bools, complex128s, complex64s, durations, float64s, float32s, ints, int64s, int32s, int16s, int8s, stringArray, times, uints, uint64s, uint32s, uint16s, uintptrs, errorResponse, payload, sliceType, sliceType$1, sliceType$2, sliceType$3, ptrType, ptrType$1, sliceType$4, ptrType$2, sliceType$5, ptrType$3, sliceType$6, ptrType$4, ptrType$5, ptrType$6, sliceType$7, sliceType$8, sliceType$9, sliceType$10, sliceType$11, sliceType$12, sliceType$13, sliceType$14, sliceType$15, sliceType$16, sliceType$17, sliceType$18, sliceType$19, sliceType$20, sliceType$21, sliceType$22, sliceType$23, sliceType$24, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, mapType, _stacktracePool, _zapStacktracePrefixes, _zapStacktraceVendorContains, _sinkMutex, _sinkFactories, _globalL, _globalS, _errArrayElemPool, errNoEncoderNameSpecified, _encoderNameToConstructor, _encoderMutex, Open, open, CombineWriteSyncers, takeStacktrace, isZapFrame, newProgramCounters, addPrefix, init, resetSinkRegistry, newSink, newFileSink, WrapCore, Fields, ErrorOutput, Development, AddCaller, AddStacktrace, New, NewNop, NewAtomicLevel, NewAtomicLevelAt, Skip, Binary, Bool, Complex128, Complex64, Float64, Float32, Int, Int64, Int32, Int16, Int8, String, Uint, Uint64, Uint32, Uint16, Uint8, Uintptr, Reflect, Stringer, Time, Stack, Duration, Object, Any, Error, NamedError, newEncoder, NewDevelopmentEncoderConfig, NewDevelopmentConfig, Array, Bools, Complex128s, Complex64s, Durations, Float64s, Float32s, Ints, Int64s, Int32s, Int16s, Int8s, Strings, Times, Uints, Uint64s, Uint32s, Uint16s, Uintptrs, Errors; - bytes = $packages["bytes"]; - json = $packages["encoding/json"]; - errors = $packages["errors"]; - flag = $packages["flag"]; - fmt = $packages["fmt"]; - atomic = $packages["go.uber.org/atomic"]; - multierr = $packages["go.uber.org/multierr"]; - bufferpool = $packages["go.uber.org/zap/internal/bufferpool"]; - zapcore = $packages["go.uber.org/zap/zapcore"]; - io = $packages["io"]; - ioutil = $packages["io/ioutil"]; - log = $packages["log"]; - math = $packages["math"]; - http = $packages["net/http"]; - url = $packages["net/url"]; - os = $packages["os"]; - runtime = $packages["runtime"]; - sort = $packages["sort"]; - strings = $packages["strings"]; - sync = $packages["sync"]; - time = $packages["time"]; - SugaredLogger = $pkg.SugaredLogger = $newType(0, $kindStruct, "zap.SugaredLogger", true, "go.uber.org/zap", true, function(base_) { - this.$val = this; - if (arguments.length === 0) { - this.base = ptrType.nil; - return; - } - this.base = base_; - }); - invalidPair = $pkg.invalidPair = $newType(0, $kindStruct, "zap.invalidPair", true, "go.uber.org/zap", false, function(position_, key_, value_) { - this.$val = this; - if (arguments.length === 0) { - this.position = 0; - this.key = $ifaceNil; - this.value = $ifaceNil; - return; - } - this.position = position_; - this.key = key_; - this.value = value_; - }); - invalidPairs = $pkg.invalidPairs = $newType(12, $kindSlice, "zap.invalidPairs", true, "go.uber.org/zap", false, null); - programCounters = $pkg.programCounters = $newType(0, $kindStruct, "zap.programCounters", true, "go.uber.org/zap", false, function(pcs_) { - this.$val = this; - if (arguments.length === 0) { - this.pcs = sliceType$5.nil; - return; - } - this.pcs = pcs_; - }); - nopCloserSink = $pkg.nopCloserSink = $newType(0, $kindStruct, "zap.nopCloserSink", true, "go.uber.org/zap", false, function(WriteSyncer_) { - this.$val = this; - if (arguments.length === 0) { - this.WriteSyncer = $ifaceNil; - return; - } - this.WriteSyncer = WriteSyncer_; - }); - errSinkNotFound = $pkg.errSinkNotFound = $newType(0, $kindStruct, "zap.errSinkNotFound", true, "go.uber.org/zap", false, function(scheme_) { - this.$val = this; - if (arguments.length === 0) { - this.scheme = ""; - return; - } - this.scheme = scheme_; - }); - Option = $pkg.Option = $newType(8, $kindInterface, "zap.Option", true, "go.uber.org/zap", true, null); - optionFunc = $pkg.optionFunc = $newType(4, $kindFunc, "zap.optionFunc", true, "go.uber.org/zap", false, null); - Logger = $pkg.Logger = $newType(0, $kindStruct, "zap.Logger", true, "go.uber.org/zap", true, function(core_, development_, name_, errorOutput_, addCaller_, addStack_, callerSkip_) { - this.$val = this; - if (arguments.length === 0) { - this.core = $ifaceNil; - this.development = false; - this.name = ""; - this.errorOutput = $ifaceNil; - this.addCaller = false; - this.addStack = $ifaceNil; - this.callerSkip = 0; - return; - } - this.core = core_; - this.development = development_; - this.name = name_; - this.errorOutput = errorOutput_; - this.addCaller = addCaller_; - this.addStack = addStack_; - this.callerSkip = callerSkip_; - }); - AtomicLevel = $pkg.AtomicLevel = $newType(0, $kindStruct, "zap.AtomicLevel", true, "go.uber.org/zap", true, function(l_) { - this.$val = this; - if (arguments.length === 0) { - this.l = ptrType$5.nil; - return; - } - this.l = l_; - }); - errArray = $pkg.errArray = $newType(12, $kindSlice, "zap.errArray", true, "go.uber.org/zap", false, null); - errArrayElem = $pkg.errArrayElem = $newType(0, $kindStruct, "zap.errArrayElem", true, "go.uber.org/zap", false, function(error_) { - this.$val = this; - if (arguments.length === 0) { - this.error = $ifaceNil; - return; - } - this.error = error_; - }); - SamplingConfig = $pkg.SamplingConfig = $newType(0, $kindStruct, "zap.SamplingConfig", true, "go.uber.org/zap", true, function(Initial_, Thereafter_) { - this.$val = this; - if (arguments.length === 0) { - this.Initial = 0; - this.Thereafter = 0; - return; - } - this.Initial = Initial_; - this.Thereafter = Thereafter_; - }); - Config = $pkg.Config = $newType(0, $kindStruct, "zap.Config", true, "go.uber.org/zap", true, function(Level_, Development_, DisableCaller_, DisableStacktrace_, Sampling_, Encoding_, EncoderConfig_, OutputPaths_, ErrorOutputPaths_, InitialFields_) { - this.$val = this; - if (arguments.length === 0) { - this.Level = new AtomicLevel.ptr(ptrType$5.nil); - this.Development = false; - this.DisableCaller = false; - this.DisableStacktrace = false; - this.Sampling = ptrType$9.nil; - this.Encoding = ""; - this.EncoderConfig = new zapcore.EncoderConfig.ptr("", "", "", "", "", "", "", $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError); - this.OutputPaths = sliceType$1.nil; - this.ErrorOutputPaths = sliceType$1.nil; - this.InitialFields = false; - return; - } - this.Level = Level_; - this.Development = Development_; - this.DisableCaller = DisableCaller_; - this.DisableStacktrace = DisableStacktrace_; - this.Sampling = Sampling_; - this.Encoding = Encoding_; - this.EncoderConfig = EncoderConfig_; - this.OutputPaths = OutputPaths_; - this.ErrorOutputPaths = ErrorOutputPaths_; - this.InitialFields = InitialFields_; - }); - bools = $pkg.bools = $newType(12, $kindSlice, "zap.bools", true, "go.uber.org/zap", false, null); - complex128s = $pkg.complex128s = $newType(12, $kindSlice, "zap.complex128s", true, "go.uber.org/zap", false, null); - complex64s = $pkg.complex64s = $newType(12, $kindSlice, "zap.complex64s", true, "go.uber.org/zap", false, null); - durations = $pkg.durations = $newType(12, $kindSlice, "zap.durations", true, "go.uber.org/zap", false, null); - float64s = $pkg.float64s = $newType(12, $kindSlice, "zap.float64s", true, "go.uber.org/zap", false, null); - float32s = $pkg.float32s = $newType(12, $kindSlice, "zap.float32s", true, "go.uber.org/zap", false, null); - ints = $pkg.ints = $newType(12, $kindSlice, "zap.ints", true, "go.uber.org/zap", false, null); - int64s = $pkg.int64s = $newType(12, $kindSlice, "zap.int64s", true, "go.uber.org/zap", false, null); - int32s = $pkg.int32s = $newType(12, $kindSlice, "zap.int32s", true, "go.uber.org/zap", false, null); - int16s = $pkg.int16s = $newType(12, $kindSlice, "zap.int16s", true, "go.uber.org/zap", false, null); - int8s = $pkg.int8s = $newType(12, $kindSlice, "zap.int8s", true, "go.uber.org/zap", false, null); - stringArray = $pkg.stringArray = $newType(12, $kindSlice, "zap.stringArray", true, "go.uber.org/zap", false, null); - times = $pkg.times = $newType(12, $kindSlice, "zap.times", true, "go.uber.org/zap", false, null); - uints = $pkg.uints = $newType(12, $kindSlice, "zap.uints", true, "go.uber.org/zap", false, null); - uint64s = $pkg.uint64s = $newType(12, $kindSlice, "zap.uint64s", true, "go.uber.org/zap", false, null); - uint32s = $pkg.uint32s = $newType(12, $kindSlice, "zap.uint32s", true, "go.uber.org/zap", false, null); - uint16s = $pkg.uint16s = $newType(12, $kindSlice, "zap.uint16s", true, "go.uber.org/zap", false, null); - uintptrs = $pkg.uintptrs = $newType(12, $kindSlice, "zap.uintptrs", true, "go.uber.org/zap", false, null); - errorResponse = $newType(0, $kindStruct, "zap.errorResponse", true, "go.uber.org/zap", false, function(Error_) { - this.$val = this; - if (arguments.length === 0) { - this.Error = ""; - return; - } - this.Error = Error_; - }); - payload = $newType(0, $kindStruct, "zap.payload", true, "go.uber.org/zap", false, function(Level_) { - this.$val = this; - if (arguments.length === 0) { - this.Level = ptrType$6.nil; - return; - } - this.Level = Level_; - }); - sliceType = $sliceType($emptyInterface); - sliceType$1 = $sliceType($String); - sliceType$2 = $sliceType(zapcore.WriteSyncer); - sliceType$3 = $sliceType(io.Closer); - ptrType = $ptrType(Logger); - ptrType$1 = $ptrType(zapcore.CheckedEntry); - sliceType$4 = $sliceType(zapcore.Field); - ptrType$2 = $ptrType(programCounters); - sliceType$5 = $sliceType($Uintptr); - ptrType$3 = $ptrType(url.Userinfo); - sliceType$6 = $sliceType(Option); - ptrType$4 = $ptrType(time.Location); - ptrType$5 = $ptrType(atomic.Int32); - ptrType$6 = $ptrType(zapcore.Level); - sliceType$7 = $sliceType($Uint8); - sliceType$8 = $sliceType($Bool); - sliceType$9 = $sliceType($Complex128); - sliceType$10 = $sliceType($Complex64); - sliceType$11 = $sliceType($Float64); - sliceType$12 = $sliceType($Float32); - sliceType$13 = $sliceType($Int); - sliceType$14 = $sliceType($Int64); - sliceType$15 = $sliceType($Int32); - sliceType$16 = $sliceType($Int16); - sliceType$17 = $sliceType($Int8); - sliceType$18 = $sliceType($Uint); - sliceType$19 = $sliceType($Uint64); - sliceType$20 = $sliceType($Uint32); - sliceType$21 = $sliceType($Uint16); - sliceType$22 = $sliceType(time.Time); - sliceType$23 = $sliceType(time.Duration); - sliceType$24 = $sliceType($error); - ptrType$8 = $ptrType(errArrayElem); - ptrType$9 = $ptrType(SamplingConfig); - ptrType$10 = $ptrType(SugaredLogger); - ptrType$11 = $ptrType(errSinkNotFound); - ptrType$12 = $ptrType(http.Request); - ptrType$13 = $ptrType(AtomicLevel); - mapType = $mapType($String, $emptyInterface); - Open = function(paths) { - var {_r, _tuple, close, err, paths, writer, writers, $s, $r, $c} = $restore(this, {paths}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = open(paths); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - writers = _tuple[0]; - close = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, $throwNilPointerError, err]; - } - writer = CombineWriteSyncers(writers); - $s = -1; return [writer, close, $ifaceNil]; - /* */ } return; } var $f = {$blk: Open, $c: true, $r, _r, _tuple, close, err, paths, writer, writers, $s};return $f; - }; - $pkg.Open = Open; - open = function(paths) { - var {_arg, _arg$1, _i, _r, _r$1, _r$2, _ref, _tuple, close, closers, err, openErr, path, paths, sink, writers, $s, $r, $c} = $restore(this, {paths}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - closers = [closers]; - writers = $makeSlice(sliceType$2, 0, paths.$length); - closers[0] = $makeSlice(sliceType$3, 0, paths.$length); - close = (function(closers) { return function $b() { - var {_i, _r, _ref, c, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _ref = closers[0]; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - c = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = c.Close(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - _i++; - $s = 1; continue; - case 2: - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _i, _r, _ref, c, $s};return $f; - }; })(closers); - openErr = $ifaceNil; - _ref = paths; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - path = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = newSink(path); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - sink = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 4: - _arg = openErr; - _r$1 = fmt.Errorf("couldn't open sink %q: %v", new sliceType([new $String(path), err])); /* */ $s = 6; case 6: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _arg$1 = _r$1; - _r$2 = multierr.Append(_arg, _arg$1); /* */ $s = 7; case 7: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - openErr = _r$2; - _i++; - /* continue; */ $s = 1; continue; - /* } */ case 5: - writers = $append(writers, sink); - closers[0] = $append(closers[0], sink); - _i++; - $s = 1; continue; - case 2: - /* */ if (!($interfaceIsEqual(openErr, $ifaceNil))) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!($interfaceIsEqual(openErr, $ifaceNil))) { */ case 8: - $r = close(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [writers, $throwNilPointerError, openErr]; - /* } */ case 9: - $s = -1; return [writers, close, $ifaceNil]; - /* */ } return; } var $f = {$blk: open, $c: true, $r, _arg, _arg$1, _i, _r, _r$1, _r$2, _ref, _tuple, close, closers, err, openErr, path, paths, sink, writers, $s};return $f; - }; - CombineWriteSyncers = function(writers) { - var writers; - if (writers.$length === 0) { - return zapcore.AddSync(ioutil.Discard); - } - return zapcore.Lock(zapcore.NewMultiWriteSyncer(writers)); - }; - $pkg.CombineWriteSyncers = CombineWriteSyncers; - SugaredLogger.ptr.prototype.Desugar = function() { - var base, s; - s = this; - base = s.base.clone(); - base.callerSkip = base.callerSkip - (2) >> 0; - return base; - }; - SugaredLogger.prototype.Desugar = function() { return this.$val.Desugar(); }; - SugaredLogger.ptr.prototype.Named = function(name) { - var name, s; - s = this; - return new SugaredLogger.ptr(s.base.Named(name)); - }; - SugaredLogger.prototype.Named = function(name) { return this.$val.Named(name); }; - SugaredLogger.ptr.prototype.With = function(args) { - var {$24r, _r, _r$1, args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.sweetenFields(args); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = s.base.With(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = new SugaredLogger.ptr(_r$1); - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.With, $c: true, $r, $24r, _r, _r$1, args, s, $s};return $f; - }; - SugaredLogger.prototype.With = function(args) { return this.$val.With(args); }; - SugaredLogger.ptr.prototype.Debug = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(-1, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Debug, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.Debug = function(args) { return this.$val.Debug(args); }; - SugaredLogger.ptr.prototype.Info = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(0, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Info, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.Info = function(args) { return this.$val.Info(args); }; - SugaredLogger.ptr.prototype.Warn = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(1, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Warn, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.Warn = function(args) { return this.$val.Warn(args); }; - SugaredLogger.ptr.prototype.Error = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(2, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Error, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.Error = function(args) { return this.$val.Error(args); }; - SugaredLogger.ptr.prototype.DPanic = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(3, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.DPanic, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.DPanic = function(args) { return this.$val.DPanic(args); }; - SugaredLogger.ptr.prototype.Panic = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(4, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Panic, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.Panic = function(args) { return this.$val.Panic(args); }; - SugaredLogger.ptr.prototype.Fatal = function(args) { - var {args, s, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(5, "", args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Fatal, $c: true, $r, args, s, $s};return $f; - }; - SugaredLogger.prototype.Fatal = function(args) { return this.$val.Fatal(args); }; - SugaredLogger.ptr.prototype.Debugf = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(-1, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Debugf, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.Debugf = function(template, args) { return this.$val.Debugf(template, args); }; - SugaredLogger.ptr.prototype.Infof = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(0, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Infof, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.Infof = function(template, args) { return this.$val.Infof(template, args); }; - SugaredLogger.ptr.prototype.Warnf = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(1, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Warnf, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.Warnf = function(template, args) { return this.$val.Warnf(template, args); }; - SugaredLogger.ptr.prototype.Errorf = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(2, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Errorf, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.Errorf = function(template, args) { return this.$val.Errorf(template, args); }; - SugaredLogger.ptr.prototype.DPanicf = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(3, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.DPanicf, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.DPanicf = function(template, args) { return this.$val.DPanicf(template, args); }; - SugaredLogger.ptr.prototype.Panicf = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(4, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Panicf, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.Panicf = function(template, args) { return this.$val.Panicf(template, args); }; - SugaredLogger.ptr.prototype.Fatalf = function(template, args) { - var {args, s, template, $s, $r, $c} = $restore(this, {template, args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(5, template, args, sliceType.nil); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Fatalf, $c: true, $r, args, s, template, $s};return $f; - }; - SugaredLogger.prototype.Fatalf = function(template, args) { return this.$val.Fatalf(template, args); }; - SugaredLogger.ptr.prototype.Debugw = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(-1, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Debugw, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.Debugw = function(msg, keysAndValues) { return this.$val.Debugw(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.Infow = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(0, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Infow, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.Infow = function(msg, keysAndValues) { return this.$val.Infow(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.Warnw = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(1, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Warnw, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.Warnw = function(msg, keysAndValues) { return this.$val.Warnw(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.Errorw = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(2, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Errorw, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.Errorw = function(msg, keysAndValues) { return this.$val.Errorw(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.DPanicw = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(3, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.DPanicw, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.DPanicw = function(msg, keysAndValues) { return this.$val.DPanicw(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.Panicw = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(4, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Panicw, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.Panicw = function(msg, keysAndValues) { return this.$val.Panicw(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.Fatalw = function(msg, keysAndValues) { - var {keysAndValues, msg, s, $s, $r, $c} = $restore(this, {msg, keysAndValues}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - $r = s.log(5, msg, sliceType.nil, keysAndValues); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Fatalw, $c: true, $r, keysAndValues, msg, s, $s};return $f; - }; - SugaredLogger.prototype.Fatalw = function(msg, keysAndValues) { return this.$val.Fatalw(msg, keysAndValues); }; - SugaredLogger.ptr.prototype.Sync = function() { - var {$24r, _r, s, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - _r = s.base.Sync(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.Sync, $c: true, $r, $24r, _r, s, $s};return $f; - }; - SugaredLogger.prototype.Sync = function() { return this.$val.Sync(); }; - SugaredLogger.ptr.prototype.log = function(lvl, template, fmtArgs, context) { - var {_r, _r$1, _r$2, _r$3, _r$4, _v, ce, context, fmtArgs, lvl, msg, s, template, $s, $r, $c} = $restore(this, {lvl, template, fmtArgs, context}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (!(lvl < 3)) { _v = false; $s = 3; continue s; } - _r = s.base.Core().Enabled(lvl); /* */ $s = 4; case 4: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _v = !_r; case 3: - /* */ if (_v) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (_v) { */ case 1: - $s = -1; return; - /* } */ case 2: - msg = template; - /* */ if (msg === "" && fmtArgs.$length > 0) { $s = 5; continue; } - /* */ if (!(msg === "") && fmtArgs.$length > 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (msg === "" && fmtArgs.$length > 0) { */ case 5: - _r$1 = fmt.Sprint(fmtArgs); /* */ $s = 8; case 8: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - msg = _r$1; - $s = 7; continue; - /* } else if (!(msg === "") && fmtArgs.$length > 0) { */ case 6: - _r$2 = fmt.Sprintf(template, fmtArgs); /* */ $s = 9; case 9: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - msg = _r$2; - /* } */ case 7: - _r$3 = s.base.Check(lvl, msg); /* */ $s = 10; case 10: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ce = _r$3; - /* */ if (!(ce === ptrType$1.nil)) { $s = 11; continue; } - /* */ $s = 12; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 11: - _r$4 = s.sweetenFields(context); /* */ $s = 13; case 13: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $r = ce.Write(_r$4); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 12: - $s = -1; return; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.log, $c: true, $r, _r, _r$1, _r$2, _r$3, _r$4, _v, ce, context, fmtArgs, lvl, msg, s, template, $s};return $f; - }; - SugaredLogger.prototype.log = function(lvl, template, fmtArgs, context) { return this.$val.log(lvl, template, fmtArgs, context); }; - SugaredLogger.ptr.prototype.sweetenFields = function(args) { - var {_q, _tmp, _tmp$1, _tuple, _tuple$1, args, f, fields, i, invalid, key, keyStr, ok, ok$1, s, val, x, $s, $r, $c} = $restore(this, {args}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - s = this; - if (args.$length === 0) { - $s = -1; return sliceType$4.nil; - } - fields = $makeSlice(sliceType$4, 0, args.$length); - invalid = invalidPairs.nil; - i = 0; - /* while (true) { */ case 1: - /* if (!(i < args.$length)) { break; } */ if(!(i < args.$length)) { $s = 2; continue; } - _tuple = $assertType(((i < 0 || i >= args.$length) ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + i]), zapcore.Field, true); - f = $clone(_tuple[0], zapcore.Field); - ok = _tuple[1]; - if (ok) { - fields = $append(fields, f); - i = i + (1) >> 0; - /* continue; */ $s = 1; continue; - } - /* */ if (i === (args.$length - 1 >> 0)) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (i === (args.$length - 1 >> 0)) { */ case 3: - $r = s.base.DPanic("Ignored key without a value.", new sliceType$4([$clone(Any("ignored", ((i < 0 || i >= args.$length) ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + i])), zapcore.Field)])); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* break; */ $s = 2; continue; - /* } */ case 4: - _tmp = ((i < 0 || i >= args.$length) ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + i]); - _tmp$1 = (x = i + 1 >> 0, ((x < 0 || x >= args.$length) ? ($throwRuntimeError("index out of range"), undefined) : args.$array[args.$offset + x])); - key = _tmp; - val = _tmp$1; - _tuple$1 = $assertType(key, $String, true); - keyStr = _tuple$1[0]; - ok$1 = _tuple$1[1]; - if (!ok$1) { - if (invalid.$capacity === 0) { - invalid = $makeSlice(invalidPairs, 0, (_q = args.$length / 2, (_q === _q && _q !== 1/0 && _q !== -1/0) ? _q >> 0 : $throwRuntimeError("integer divide by zero"))); - } - invalid = $append(invalid, new invalidPair.ptr(i, key, val)); - } else { - fields = $append(fields, Any(keyStr, val)); - } - i = i + (2) >> 0; - $s = 1; continue; - case 2: - /* */ if (invalid.$length > 0) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (invalid.$length > 0) { */ case 6: - $r = s.base.DPanic("Ignored key-value pairs with non-string keys.", new sliceType$4([$clone(Array("invalid", invalid), zapcore.Field)])); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 7: - $s = -1; return fields; - /* */ } return; } var $f = {$blk: SugaredLogger.ptr.prototype.sweetenFields, $c: true, $r, _q, _tmp, _tmp$1, _tuple, _tuple$1, args, f, fields, i, invalid, key, keyStr, ok, ok$1, s, val, x, $s};return $f; - }; - SugaredLogger.prototype.sweetenFields = function(args) { return this.$val.sweetenFields(args); }; - invalidPair.ptr.prototype.MarshalLogObject = function(enc) { - var {enc, p, $s, $r, $c} = $restore(this, {enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - p = this; - $r = enc.AddInt64("position", (new $Int64(0, p.position))); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = $clone(Any("key", p.key), zapcore.Field).AddTo(enc); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = $clone(Any("value", p.value), zapcore.Field).AddTo(enc); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: invalidPair.ptr.prototype.MarshalLogObject, $c: true, $r, enc, p, $s};return $f; - }; - invalidPair.prototype.MarshalLogObject = function(enc) { return this.$val.MarshalLogObject(enc); }; - invalidPairs.prototype.MarshalLogArray = function(enc) { - var {_arg, _arg$1, _i, _r, _r$1, _ref, enc, err, i, ps, x, $s, $r, $c} = $restore(this, {enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ps = this; - err = $ifaceNil; - _ref = ps; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - _arg = err; - _r = enc.AppendObject((x = ((i < 0 || i >= ps.$length) ? ($throwRuntimeError("index out of range"), undefined) : ps.$array[ps.$offset + i]), new x.constructor.elem(x))); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _r$1 = multierr.Append(_arg, _arg$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - _i++; - $s = 1; continue; - case 2: - $s = -1; return err; - /* */ } return; } var $f = {$blk: invalidPairs.prototype.MarshalLogArray, $c: true, $r, _arg, _arg$1, _i, _r, _r$1, _ref, enc, err, i, ps, x, $s};return $f; - }; - $ptrType(invalidPairs).prototype.MarshalLogArray = function(enc) { return this.$get().MarshalLogArray(enc); }; - takeStacktrace = function() { - var {$24r, _r, _r$1, _tuple, _tuple$1, _tuple$2, buffer, frame, frames, i, more, numFrames, programCounters$1, skipZapFrames, $s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - _r = bufferpool.Get(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - buffer = _r; - $deferred.push([$methodVal(buffer, "Free"), []]); - _r$1 = _stacktracePool.Get(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - programCounters$1 = $assertType(_r$1, ptrType$2); - $deferred.push([$methodVal(_stacktracePool, "Put"), [programCounters$1]]); - numFrames = 0; - while (true) { - numFrames = runtime.Callers(2, programCounters$1.pcs); - if (numFrames < programCounters$1.pcs.$length) { - break; - } - programCounters$1 = newProgramCounters($imul(programCounters$1.pcs.$length, 2)); - } - i = 0; - skipZapFrames = true; - frames = runtime.CallersFrames($subslice(programCounters$1.pcs, 0, numFrames)); - _tuple = frames.Next(); - frame = $clone(_tuple[0], runtime.Frame); - more = _tuple[1]; - while (true) { - if (!(more)) { break; } - if (skipZapFrames && isZapFrame(frame.Function)) { - _tuple$1 = frames.Next(); - runtime.Frame.copy(frame, _tuple$1[0]); - more = _tuple$1[1]; - continue; - } else { - skipZapFrames = false; - } - if (!((i === 0))) { - buffer.AppendByte(10); - } - i = i + (1) >> 0; - buffer.AppendString(frame.Function); - buffer.AppendByte(10); - buffer.AppendByte(9); - buffer.AppendString(frame.File); - buffer.AppendByte(58); - buffer.AppendInt((new $Int64(0, frame.Line))); - _tuple$2 = frames.Next(); - runtime.Frame.copy(frame, _tuple$2[0]); - more = _tuple$2[1]; - } - $24r = buffer.String(); - $s = 3; case 3: return $24r; - /* */ } return; } } catch(err) { $err = err; $s = -1; return ""; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: takeStacktrace, $c: true, $r, $24r, _r, _r$1, _tuple, _tuple$1, _tuple$2, buffer, frame, frames, i, more, numFrames, programCounters$1, skipZapFrames, $s, $deferred};return $f; } } - }; - isZapFrame = function(function$1) { - var _i, _i$1, _ref, _ref$1, contains, function$1, prefix; - _ref = _zapStacktracePrefixes; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - prefix = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (strings.HasPrefix(function$1, prefix)) { - return true; - } - _i++; - } - _ref$1 = _zapStacktraceVendorContains; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - contains = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (strings.Contains(function$1, contains)) { - return true; - } - _i$1++; - } - return false; - }; - newProgramCounters = function(size) { - var size; - return new programCounters.ptr($makeSlice(sliceType$5, size)); - }; - addPrefix = function(prefix, ss) { - var _i, _ref, i, prefix, s, ss, withPrefix; - withPrefix = $makeSlice(sliceType$1, ss.$length); - _ref = ss; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - s = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= withPrefix.$length) ? ($throwRuntimeError("index out of range"), undefined) : withPrefix.$array[withPrefix.$offset + i] = prefix + s); - _i++; - } - return withPrefix; - }; - init = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = resetSinkRegistry(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, $s};return $f; - }; - resetSinkRegistry = function() { - var {$s, $deferred, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = _sinkMutex.Lock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(_sinkMutex, "Unlock"), []]); - _sinkFactories = $makeMap($String.keyFor, [{ k: "file", v: newFileSink }]); - $s = -1; return; - /* */ } return; } } catch(err) { $err = err; $s = -1; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: resetSinkRegistry, $c: true, $r, $s, $deferred};return $f; } } - }; - nopCloserSink.ptr.prototype.Close = function() { - return $ifaceNil; - }; - nopCloserSink.prototype.Close = function() { return this.$val.Close(); }; - errSinkNotFound.ptr.prototype.Error = function() { - var {$24r, _r, e, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - _r = fmt.Sprintf("no sink found for scheme %q", new sliceType([new $String(e.scheme)])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: errSinkNotFound.ptr.prototype.Error, $c: true, $r, $24r, _r, e, $s};return $f; - }; - errSinkNotFound.prototype.Error = function() { return this.$val.Error(); }; - newSink = function(rawURL) { - var {$24r, $24r$1, _entry, _r, _r$1, _r$2, _tuple, _tuple$1, err, factory, ok, rawURL, u, $s, $r, $c} = $restore(this, {rawURL}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = url.Parse(rawURL); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - u = _tuple[0]; - err = _tuple[1]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$1 = fmt.Errorf("can't parse %q as a URL: %v", new sliceType([new $String(rawURL), err])); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = [$ifaceNil, _r$1]; - $s = 5; case 5: return $24r; - /* } */ case 3: - if (u.Scheme === "") { - u.Scheme = "file"; - } - $r = _sinkMutex.RLock(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _tuple$1 = (_entry = _sinkFactories[$String.keyFor(u.Scheme)], _entry !== undefined ? [_entry.v, true] : [$throwNilPointerError, false]); - factory = _tuple$1[0]; - ok = _tuple$1[1]; - $r = _sinkMutex.RUnlock(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (!ok) { - $s = -1; return [$ifaceNil, new errSinkNotFound.ptr(u.Scheme)]; - } - _r$2 = factory(u); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$1 = _r$2; - $s = 9; case 9: return $24r$1; - /* */ } return; } var $f = {$blk: newSink, $c: true, $r, $24r, $24r$1, _entry, _r, _r$1, _r$2, _tuple, _tuple$1, err, factory, ok, rawURL, u, $s};return $f; - }; - newFileSink = function(u) { - var {$24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _returncast, hn, u, x, x$1, $s, $r, $c} = $restore(this, {u}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - /* */ if (!(u.User === ptrType$3.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(u.User === ptrType$3.nil)) { */ case 1: - _r = fmt.Errorf("user and password not allowed with file URLs: got %v", new sliceType([u])); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [$ifaceNil, _r]; - $s = 4; case 4: return $24r; - /* } */ case 2: - /* */ if (!(u.Fragment === "")) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!(u.Fragment === "")) { */ case 5: - _r$1 = fmt.Errorf("fragments not allowed with file URLs: got %v", new sliceType([u])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$1 = [$ifaceNil, _r$1]; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - /* */ if (!(u.RawQuery === "")) { $s = 9; continue; } - /* */ $s = 10; continue; - /* if (!(u.RawQuery === "")) { */ case 9: - _r$2 = fmt.Errorf("query parameters not allowed with file URLs: got %v", new sliceType([u])); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r$2 = [$ifaceNil, _r$2]; - $s = 12; case 12: return $24r$2; - /* } */ case 10: - /* */ if (!(u.Port() === "")) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (!(u.Port() === "")) { */ case 13: - _r$3 = fmt.Errorf("ports not allowed with file URLs: got %v", new sliceType([u])); /* */ $s = 15; case 15: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - $24r$3 = [$ifaceNil, _r$3]; - $s = 16; case 16: return $24r$3; - /* } */ case 14: - hn = u.Hostname(); - /* */ if (!(hn === "") && !(hn === "localhost")) { $s = 17; continue; } - /* */ $s = 18; continue; - /* if (!(hn === "") && !(hn === "localhost")) { */ case 17: - _r$4 = fmt.Errorf("file URLs must leave host empty or use localhost: got %v", new sliceType([u])); /* */ $s = 19; case 19: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - $24r$4 = [$ifaceNil, _r$4]; - $s = 20; case 20: return $24r$4; - /* } */ case 18: - _1 = u.Path; - if (_1 === ("stdout")) { - $s = -1; return [(x = new nopCloserSink.ptr(os.Stdout), new x.constructor.elem(x)), $ifaceNil]; - } else if (_1 === ("stderr")) { - $s = -1; return [(x$1 = new nopCloserSink.ptr(os.Stderr), new x$1.constructor.elem(x$1)), $ifaceNil]; - } - _r$5 = os.OpenFile(u.Path, 1089, 420); /* */ $s = 21; case 21: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _returncast = _r$5; - $24r$5 = [_returncast[0], _returncast[1]]; - $s = 22; case 22: return $24r$5; - /* */ } return; } var $f = {$blk: newFileSink, $c: true, $r, $24r, $24r$1, $24r$2, $24r$3, $24r$4, $24r$5, _1, _r, _r$1, _r$2, _r$3, _r$4, _r$5, _returncast, hn, u, x, x$1, $s};return $f; - }; - optionFunc.prototype.apply = function(log$1) { - var {f, log$1, $s, $r, $c} = $restore(this, {log$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - f = this.$val; - $r = f(log$1); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: optionFunc.prototype.apply, $c: true, $r, f, log$1, $s};return $f; - }; - $ptrType(optionFunc).prototype.apply = function(log$1) { return new optionFunc(this.$get()).apply(log$1); }; - WrapCore = function(f) { - var f; - return new optionFunc(((function $b(log$1) { - var {_r, log$1, $s, $r, $c} = $restore(this, {log$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = f(log$1.core); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - log$1.core = _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, log$1, $s};return $f; - }))); - }; - $pkg.WrapCore = WrapCore; - Fields = function(fs) { - var fs; - return new optionFunc(((function $b(log$1) { - var {_r, log$1, $s, $r, $c} = $restore(this, {log$1}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = log$1.core.With(fs); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - log$1.core = _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, log$1, $s};return $f; - }))); - }; - $pkg.Fields = Fields; - ErrorOutput = function(w) { - var w; - return new optionFunc(((function(log$1) { - var log$1; - log$1.errorOutput = w; - }))); - }; - $pkg.ErrorOutput = ErrorOutput; - Development = function() { - return new optionFunc(((function(log$1) { - var log$1; - log$1.development = true; - }))); - }; - $pkg.Development = Development; - AddCaller = function() { - return new optionFunc(((function(log$1) { - var log$1; - log$1.addCaller = true; - }))); - }; - $pkg.AddCaller = AddCaller; - AddStacktrace = function(lvl) { - var lvl; - return new optionFunc(((function(log$1) { - var log$1; - log$1.addStack = lvl; - }))); - }; - $pkg.AddStacktrace = AddStacktrace; - New = function(core, options) { - var {$24r, _r, core, log$1, options, $s, $r, $c} = $restore(this, {core, options}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if ($interfaceIsEqual(core, $ifaceNil)) { - $s = -1; return NewNop(); - } - log$1 = new Logger.ptr(core, false, "", zapcore.Lock(os.Stderr), false, new zapcore.Level(6), 0); - _r = log$1.WithOptions(options); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: New, $c: true, $r, $24r, _r, core, log$1, options, $s};return $f; - }; - $pkg.New = New; - NewNop = function() { - return new Logger.ptr(zapcore.NewNopCore(), false, "", zapcore.AddSync(ioutil.Discard), false, new zapcore.Level(6), 0); - }; - $pkg.NewNop = NewNop; - Logger.ptr.prototype.Sugar = function() { - var core, log$1; - log$1 = this; - core = log$1.clone(); - core.callerSkip = core.callerSkip + (2) >> 0; - return new SugaredLogger.ptr(core); - }; - Logger.prototype.Sugar = function() { return this.$val.Sugar(); }; - Logger.ptr.prototype.Named = function(s) { - var l, log$1, s; - log$1 = this; - if (s === "") { - return log$1; - } - l = log$1.clone(); - if (log$1.name === "") { - l.name = s; - } else { - l.name = strings.Join(new sliceType$1([l.name, s]), "."); - } - return l; - }; - Logger.prototype.Named = function(s) { return this.$val.Named(s); }; - Logger.ptr.prototype.WithOptions = function(opts) { - var {_i, _ref, c, log$1, opt, opts, $s, $r, $c} = $restore(this, {opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - c = log$1.clone(); - _ref = opts; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - opt = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - $r = opt.apply(c); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return c; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.WithOptions, $c: true, $r, _i, _ref, c, log$1, opt, opts, $s};return $f; - }; - Logger.prototype.WithOptions = function(opts) { return this.$val.WithOptions(opts); }; - Logger.ptr.prototype.With = function(fields) { - var {_r, fields, l, log$1, $s, $r, $c} = $restore(this, {fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - if (fields.$length === 0) { - $s = -1; return log$1; - } - l = log$1.clone(); - _r = l.core.With(fields); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - l.core = _r; - $s = -1; return l; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.With, $c: true, $r, _r, fields, l, log$1, $s};return $f; - }; - Logger.prototype.With = function(fields) { return this.$val.With(fields); }; - Logger.ptr.prototype.Check = function(lvl, msg) { - var {$24r, _r, log$1, lvl, msg, $s, $r, $c} = $restore(this, {lvl, msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(lvl, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Check, $c: true, $r, $24r, _r, log$1, lvl, msg, $s};return $f; - }; - Logger.prototype.Check = function(lvl, msg) { return this.$val.Check(lvl, msg); }; - Logger.ptr.prototype.Debug = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(-1, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Debug, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.Debug = function(msg, fields) { return this.$val.Debug(msg, fields); }; - Logger.ptr.prototype.Info = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(0, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Info, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.Info = function(msg, fields) { return this.$val.Info(msg, fields); }; - Logger.ptr.prototype.Warn = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(1, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Warn, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.Warn = function(msg, fields) { return this.$val.Warn(msg, fields); }; - Logger.ptr.prototype.Error = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(2, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Error, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.Error = function(msg, fields) { return this.$val.Error(msg, fields); }; - Logger.ptr.prototype.DPanic = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(3, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.DPanic, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.DPanic = function(msg, fields) { return this.$val.DPanic(msg, fields); }; - Logger.ptr.prototype.Panic = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(4, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Panic, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.Panic = function(msg, fields) { return this.$val.Panic(msg, fields); }; - Logger.ptr.prototype.Fatal = function(msg, fields) { - var {_r, ce, fields, log$1, msg, $s, $r, $c} = $restore(this, {msg, fields}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.check(5, msg); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ce = _r; - /* */ if (!(ce === ptrType$1.nil)) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!(ce === ptrType$1.nil)) { */ case 2: - $r = ce.Write(fields); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* } */ case 3: - $s = -1; return; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Fatal, $c: true, $r, _r, ce, fields, log$1, msg, $s};return $f; - }; - Logger.prototype.Fatal = function(msg, fields) { return this.$val.Fatal(msg, fields); }; - Logger.ptr.prototype.Sync = function() { - var {$24r, _r, log$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = log$1.core.Sync(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.Sync, $c: true, $r, $24r, _r, log$1, $s};return $f; - }; - Logger.prototype.Sync = function() { return this.$val.Sync(); }; - Logger.ptr.prototype.Core = function() { - var log$1; - log$1 = this; - return log$1.core; - }; - Logger.prototype.Core = function() { return this.$val.Core(); }; - Logger.ptr.prototype.clone = function() { - var copy, log$1; - log$1 = this; - copy = $clone(log$1, Logger); - return copy; - }; - Logger.prototype.clone = function() { return this.$val.clone(); }; - Logger.ptr.prototype.check = function(lvl, msg) { - var {_1, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, ce, ent, log$1, lvl, msg, willWrite, x, $s, $r, $c} = $restore(this, {lvl, msg}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - log$1 = this; - _r = time.Now(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ent = new zapcore.Entry.ptr(lvl, $clone(_r, time.Time), log$1.name, msg, new zapcore.EntryCaller.ptr(false, 0, "", 0), ""); - _r$1 = log$1.core.Check($clone(ent, zapcore.Entry), ptrType$1.nil); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - ce = _r$1; - willWrite = !(ce === ptrType$1.nil); - _1 = ent.Level; - /* */ if (_1 === (4)) { $s = 4; continue; } - /* */ if (_1 === (5)) { $s = 5; continue; } - /* */ if (_1 === (3)) { $s = 6; continue; } - /* */ $s = 7; continue; - /* if (_1 === (4)) { */ case 4: - _r$2 = ce.Should($clone(ent, zapcore.Entry), 1); /* */ $s = 8; case 8: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - ce = _r$2; - $s = 7; continue; - /* } else if (_1 === (5)) { */ case 5: - _r$3 = ce.Should($clone(ent, zapcore.Entry), 2); /* */ $s = 9; case 9: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - ce = _r$3; - $s = 7; continue; - /* } else if (_1 === (3)) { */ case 6: - /* */ if (log$1.development) { $s = 10; continue; } - /* */ $s = 11; continue; - /* if (log$1.development) { */ case 10: - _r$4 = ce.Should($clone(ent, zapcore.Entry), 1); /* */ $s = 12; case 12: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - ce = _r$4; - /* } */ case 11: - /* } */ case 7: - case 3: - if (!willWrite) { - $s = -1; return ce; - } - ce.ErrorOutput = log$1.errorOutput; - /* */ if (log$1.addCaller) { $s = 13; continue; } - /* */ $s = 14; continue; - /* if (log$1.addCaller) { */ case 13: - _tuple = runtime.Caller(log$1.callerSkip + 2 >> 0); - zapcore.EntryCaller.copy(ce.Entry.Caller, zapcore.NewEntryCaller(_tuple[0], _tuple[1], _tuple[2], _tuple[3])); - /* */ if (!ce.Entry.Caller.Defined) { $s = 15; continue; } - /* */ $s = 16; continue; - /* if (!ce.Entry.Caller.Defined) { */ case 15: - _arg = log$1.errorOutput; - _r$5 = time.Now(); /* */ $s = 17; case 17: if($c) { $c = false; _r$5 = _r$5.$blk(); } if (_r$5 && _r$5.$blk !== undefined) { break s; } - _r$6 = $clone(_r$5, time.Time).UTC(); /* */ $s = 18; case 18: if($c) { $c = false; _r$6 = _r$6.$blk(); } if (_r$6 && _r$6.$blk !== undefined) { break s; } - _arg$1 = (x = _r$6, new x.constructor.elem(x)); - _r$7 = fmt.Fprintf(_arg, "%v Logger.check error: failed to get caller\n", new sliceType([_arg$1])); /* */ $s = 19; case 19: if($c) { $c = false; _r$7 = _r$7.$blk(); } if (_r$7 && _r$7.$blk !== undefined) { break s; } - _r$7; - _r$8 = log$1.errorOutput.Sync(); /* */ $s = 20; case 20: if($c) { $c = false; _r$8 = _r$8.$blk(); } if (_r$8 && _r$8.$blk !== undefined) { break s; } - _r$8; - /* } */ case 16: - /* } */ case 14: - _r$9 = log$1.addStack.Enabled(ce.Entry.Level); /* */ $s = 23; case 23: if($c) { $c = false; _r$9 = _r$9.$blk(); } if (_r$9 && _r$9.$blk !== undefined) { break s; } - /* */ if (_r$9) { $s = 21; continue; } - /* */ $s = 22; continue; - /* if (_r$9) { */ case 21: - _r$10 = Stack(""); /* */ $s = 24; case 24: if($c) { $c = false; _r$10 = _r$10.$blk(); } if (_r$10 && _r$10.$blk !== undefined) { break s; } - ce.Entry.Stack = _r$10.String; - /* } */ case 22: - $s = -1; return ce; - /* */ } return; } var $f = {$blk: Logger.ptr.prototype.check, $c: true, $r, _1, _arg, _arg$1, _r, _r$1, _r$10, _r$2, _r$3, _r$4, _r$5, _r$6, _r$7, _r$8, _r$9, _tuple, ce, ent, log$1, lvl, msg, willWrite, x, $s};return $f; - }; - Logger.prototype.check = function(lvl, msg) { return this.$val.check(lvl, msg); }; - NewAtomicLevel = function() { - return new AtomicLevel.ptr(atomic.NewInt32(0)); - }; - $pkg.NewAtomicLevel = NewAtomicLevel; - NewAtomicLevelAt = function(l) { - var a, l; - a = $clone(NewAtomicLevel(), AtomicLevel); - $clone(a, AtomicLevel).SetLevel(l); - return a; - }; - $pkg.NewAtomicLevelAt = NewAtomicLevelAt; - AtomicLevel.ptr.prototype.Enabled = function(l) { - var l, lvl; - lvl = this; - return new zapcore.Level($clone(lvl, AtomicLevel).Level()).Enabled(l); - }; - AtomicLevel.prototype.Enabled = function(l) { return this.$val.Enabled(l); }; - AtomicLevel.ptr.prototype.Level = function() { - var lvl; - lvl = this; - return ((((lvl.l.Load() << 24 >> 24)) << 24 >> 24)); - }; - AtomicLevel.prototype.Level = function() { return this.$val.Level(); }; - AtomicLevel.ptr.prototype.SetLevel = function(l) { - var l, lvl; - lvl = this; - lvl.l.Store(((l >> 0))); - }; - AtomicLevel.prototype.SetLevel = function(l) { return this.$val.SetLevel(l); }; - AtomicLevel.ptr.prototype.String = function() { - var {$24r, _r, lvl, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lvl = this; - _r = new zapcore.Level($clone(lvl, AtomicLevel).Level()).String(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: AtomicLevel.ptr.prototype.String, $c: true, $r, $24r, _r, lvl, $s};return $f; - }; - AtomicLevel.prototype.String = function() { return this.$val.String(); }; - AtomicLevel.ptr.prototype.UnmarshalText = function(text) { - var {_r, err, l, l$24ptr, lvl, text, $s, $r, $c} = $restore(this, {text}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - lvl = this; - if (lvl.l === ptrType$5.nil) { - lvl.l = new atomic.Int32.ptr(0); - } - l = 0; - _r = (l$24ptr || (l$24ptr = new ptrType$6(function() { return l; }, function($v) { l = $v; }))).UnmarshalText(text); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - err = _r; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return err; - } - $clone(lvl, AtomicLevel).SetLevel(l); - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: AtomicLevel.ptr.prototype.UnmarshalText, $c: true, $r, _r, err, l, l$24ptr, lvl, text, $s};return $f; - }; - AtomicLevel.prototype.UnmarshalText = function(text) { return this.$val.UnmarshalText(text); }; - AtomicLevel.ptr.prototype.MarshalText = function() { - var {$24r, _r, _tuple, err, lvl, text, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - text = sliceType$7.nil; - err = $ifaceNil; - lvl = this; - _r = new zapcore.Level($clone(lvl, AtomicLevel).Level()).MarshalText(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - text = _tuple[0]; - err = _tuple[1]; - $24r = [text, err]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: AtomicLevel.ptr.prototype.MarshalText, $c: true, $r, $24r, _r, _tuple, err, lvl, text, $s};return $f; - }; - AtomicLevel.prototype.MarshalText = function() { return this.$val.MarshalText(); }; - AtomicLevel.ptr.prototype.ServeHTTP = function(w, r) { - var {_1, _r, _r$1, _r$2, _r$3, _r$4, current, enc, errmess, lvl, r, req, w, x, x$1, x$2, $s, $r, $c} = $restore(this, {w, r}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - current = [current]; - r = [r]; - req = [req]; - lvl = this; - enc = json.NewEncoder(w); - _1 = r[0].Method; - /* */ if (_1 === ("GET")) { $s = 2; continue; } - /* */ if (_1 === ("PUT")) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (_1 === ("GET")) { */ case 2: - current[0] = $clone(lvl, AtomicLevel).Level(); - _r = enc.Encode((x = new payload.ptr((current.$ptr || (current.$ptr = new ptrType$6(function() { return this.$target[0]; }, function($v) { this.$target[0] = $v; }, current)))), new x.constructor.elem(x))); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r; - $s = 5; continue; - /* } else if (_1 === ("PUT")) { */ case 3: - req[0] = new payload.ptr(ptrType$6.nil); - _r$1 = (function(current, r, req) { return function $b() { - var {$24r, _r$1, _r$2, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r$1 = json.NewDecoder(r[0].Body).Decode(req[0]); /* */ $s = 1; case 1: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - err = _r$1; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 2: - _r$2 = fmt.Sprintf("Request body must be well-formed JSON: %v", new sliceType([err])); /* */ $s = 4; case 4: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - $24r = _r$2; - $s = 5; case 5: return $24r; - /* } */ case 3: - if (req[0].Level === ptrType$6.nil) { - $s = -1; return "Must specify a logging level."; - } - $s = -1; return ""; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r$1, _r$2, err, $s};return $f; - }; })(current, r, req)(); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - errmess = _r$1; - /* */ if (!(errmess === "")) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(errmess === "")) { */ case 8: - $r = w.WriteHeader(400); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$2 = enc.Encode((x$1 = new errorResponse.ptr(errmess), new x$1.constructor.elem(x$1))); /* */ $s = 11; case 11: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _r$2; - $s = -1; return; - /* } */ case 9: - $clone(lvl, AtomicLevel).SetLevel(req[0].Level.$get()); - _r$3 = enc.Encode(new req[0].constructor.elem(req[0])); /* */ $s = 12; case 12: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - _r$3; - $s = 5; continue; - /* } else { */ case 4: - $r = w.WriteHeader(405); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _r$4 = enc.Encode((x$2 = new errorResponse.ptr("Only GET and PUT are supported."), new x$2.constructor.elem(x$2))); /* */ $s = 14; case 14: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - _r$4; - /* } */ case 5: - case 1: - $s = -1; return; - /* */ } return; } var $f = {$blk: AtomicLevel.ptr.prototype.ServeHTTP, $c: true, $r, _1, _r, _r$1, _r$2, _r$3, _r$4, current, enc, errmess, lvl, r, req, w, x, x$1, x$2, $s};return $f; - }; - AtomicLevel.prototype.ServeHTTP = function(w, r) { return this.$val.ServeHTTP(w, r); }; - Skip = function() { - return new zapcore.Field.ptr("", 26, new $Int64(0, 0), "", $ifaceNil); - }; - $pkg.Skip = Skip; - Binary = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 3, new $Int64(0, 0), "", val); - }; - $pkg.Binary = Binary; - Bool = function(key, val) { - var ival, key, val; - ival = new $Int64(0, 0); - if (val) { - ival = new $Int64(0, 1); - } - return new zapcore.Field.ptr(key, 4, ival, "", $ifaceNil); - }; - $pkg.Bool = Bool; - Complex128 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 6, new $Int64(0, 0), "", val); - }; - $pkg.Complex128 = Complex128; - Complex64 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 7, new $Int64(0, 0), "", val); - }; - $pkg.Complex64 = Complex64; - Float64 = function(key, val) { - var key, val, x; - return new zapcore.Field.ptr(key, 9, ((x = math.Float64bits(val), new $Int64(x.$high, x.$low))), "", $ifaceNil); - }; - $pkg.Float64 = Float64; - Float32 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 10, (new $Int64(0, math.Float32bits(val))), "", $ifaceNil); - }; - $pkg.Float32 = Float32; - Int = function(key, val) { - var key, val; - return Int64(key, (new $Int64(0, val))); - }; - $pkg.Int = Int; - Int64 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 11, val, "", $ifaceNil); - }; - $pkg.Int64 = Int64; - Int32 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 12, (new $Int64(0, val)), "", $ifaceNil); - }; - $pkg.Int32 = Int32; - Int16 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 13, (new $Int64(0, val)), "", $ifaceNil); - }; - $pkg.Int16 = Int16; - Int8 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 14, (new $Int64(0, val)), "", $ifaceNil); - }; - $pkg.Int8 = Int8; - String = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 15, new $Int64(0, 0), val, $ifaceNil); - }; - $pkg.String = String; - Uint = function(key, val) { - var key, val; - return Uint64(key, (new $Uint64(0, val))); - }; - $pkg.Uint = Uint; - Uint64 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 17, (new $Int64(val.$high, val.$low)), "", $ifaceNil); - }; - $pkg.Uint64 = Uint64; - Uint32 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 18, (new $Int64(0, val)), "", $ifaceNil); - }; - $pkg.Uint32 = Uint32; - Uint16 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 19, (new $Int64(0, val)), "", $ifaceNil); - }; - $pkg.Uint16 = Uint16; - Uint8 = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 20, (new $Int64(0, val)), "", $ifaceNil); - }; - $pkg.Uint8 = Uint8; - Uintptr = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 21, (new $Int64(0, val.constructor === Number ? val : 1)), "", $ifaceNil); - }; - $pkg.Uintptr = Uintptr; - Reflect = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 22, new $Int64(0, 0), "", val); - }; - $pkg.Reflect = Reflect; - Stringer = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 24, new $Int64(0, 0), "", val); - }; - $pkg.Stringer = Stringer; - Time = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 16, $clone(val, time.Time).UnixNano(), "", $clone(val, time.Time).Location()); - }; - $pkg.Time = Time; - Stack = function(key) { - var {$24r, _arg, _arg$1, _r, _r$1, key, $s, $r, $c} = $restore(this, {key}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _arg = key; - _r = takeStacktrace(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _arg$1 = _r; - _r$1 = String(_arg, _arg$1); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: Stack, $c: true, $r, $24r, _arg, _arg$1, _r, _r$1, key, $s};return $f; - }; - $pkg.Stack = Stack; - Duration = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 8, (new $Int64(val.$high, val.$low)), "", $ifaceNil); - }; - $pkg.Duration = Duration; - Object = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 2, new $Int64(0, 0), "", val); - }; - $pkg.Object = Object; - Any = function(key, value) { - var _ref, key, val, val$1, val$10, val$11, val$12, val$13, val$14, val$15, val$16, val$17, val$18, val$19, val$2, val$20, val$21, val$22, val$23, val$24, val$25, val$26, val$27, val$28, val$29, val$3, val$30, val$31, val$32, val$33, val$34, val$35, val$36, val$37, val$38, val$39, val$4, val$40, val$41, val$42, val$43, val$5, val$6, val$7, val$8, val$9, value; - _ref = value; - if ($assertType(_ref, zapcore.ObjectMarshaler, true)[1]) { - val = _ref; - return Object(key, val); - } else if ($assertType(_ref, zapcore.ArrayMarshaler, true)[1]) { - val$1 = _ref; - return Array(key, val$1); - } else if ($assertType(_ref, $Bool, true)[1]) { - val$2 = _ref.$val; - return Bool(key, val$2); - } else if ($assertType(_ref, sliceType$8, true)[1]) { - val$3 = _ref.$val; - return Bools(key, val$3); - } else if ($assertType(_ref, $Complex128, true)[1]) { - val$4 = _ref.$val; - return Complex128(key, val$4); - } else if ($assertType(_ref, sliceType$9, true)[1]) { - val$5 = _ref.$val; - return Complex128s(key, val$5); - } else if ($assertType(_ref, $Complex64, true)[1]) { - val$6 = _ref.$val; - return Complex64(key, val$6); - } else if ($assertType(_ref, sliceType$10, true)[1]) { - val$7 = _ref.$val; - return Complex64s(key, val$7); - } else if ($assertType(_ref, $Float64, true)[1]) { - val$8 = _ref.$val; - return Float64(key, val$8); - } else if ($assertType(_ref, sliceType$11, true)[1]) { - val$9 = _ref.$val; - return Float64s(key, val$9); - } else if ($assertType(_ref, $Float32, true)[1]) { - val$10 = _ref.$val; - return Float32(key, val$10); - } else if ($assertType(_ref, sliceType$12, true)[1]) { - val$11 = _ref.$val; - return Float32s(key, val$11); - } else if ($assertType(_ref, $Int, true)[1]) { - val$12 = _ref.$val; - return Int(key, val$12); - } else if ($assertType(_ref, sliceType$13, true)[1]) { - val$13 = _ref.$val; - return Ints(key, val$13); - } else if ($assertType(_ref, $Int64, true)[1]) { - val$14 = _ref.$val; - return Int64(key, val$14); - } else if ($assertType(_ref, sliceType$14, true)[1]) { - val$15 = _ref.$val; - return Int64s(key, val$15); - } else if ($assertType(_ref, $Int32, true)[1]) { - val$16 = _ref.$val; - return Int32(key, val$16); - } else if ($assertType(_ref, sliceType$15, true)[1]) { - val$17 = _ref.$val; - return Int32s(key, val$17); - } else if ($assertType(_ref, $Int16, true)[1]) { - val$18 = _ref.$val; - return Int16(key, val$18); - } else if ($assertType(_ref, sliceType$16, true)[1]) { - val$19 = _ref.$val; - return Int16s(key, val$19); - } else if ($assertType(_ref, $Int8, true)[1]) { - val$20 = _ref.$val; - return Int8(key, val$20); - } else if ($assertType(_ref, sliceType$17, true)[1]) { - val$21 = _ref.$val; - return Int8s(key, val$21); - } else if ($assertType(_ref, $String, true)[1]) { - val$22 = _ref.$val; - return String(key, val$22); - } else if ($assertType(_ref, sliceType$1, true)[1]) { - val$23 = _ref.$val; - return Strings(key, val$23); - } else if ($assertType(_ref, $Uint, true)[1]) { - val$24 = _ref.$val; - return Uint(key, val$24); - } else if ($assertType(_ref, sliceType$18, true)[1]) { - val$25 = _ref.$val; - return Uints(key, val$25); - } else if ($assertType(_ref, $Uint64, true)[1]) { - val$26 = _ref.$val; - return Uint64(key, val$26); - } else if ($assertType(_ref, sliceType$19, true)[1]) { - val$27 = _ref.$val; - return Uint64s(key, val$27); - } else if ($assertType(_ref, $Uint32, true)[1]) { - val$28 = _ref.$val; - return Uint32(key, val$28); - } else if ($assertType(_ref, sliceType$20, true)[1]) { - val$29 = _ref.$val; - return Uint32s(key, val$29); - } else if ($assertType(_ref, $Uint16, true)[1]) { - val$30 = _ref.$val; - return Uint16(key, val$30); - } else if ($assertType(_ref, sliceType$21, true)[1]) { - val$31 = _ref.$val; - return Uint16s(key, val$31); - } else if ($assertType(_ref, $Uint8, true)[1]) { - val$32 = _ref.$val; - return Uint8(key, val$32); - } else if ($assertType(_ref, sliceType$7, true)[1]) { - val$33 = _ref.$val; - return Binary(key, val$33); - } else if ($assertType(_ref, $Uintptr, true)[1]) { - val$34 = _ref.$val; - return Uintptr(key, val$34); - } else if ($assertType(_ref, sliceType$5, true)[1]) { - val$35 = _ref.$val; - return Uintptrs(key, val$35); - } else if ($assertType(_ref, time.Time, true)[1]) { - val$36 = $clone(_ref.$val, time.Time); - return Time(key, $clone(val$36, time.Time)); - } else if ($assertType(_ref, sliceType$22, true)[1]) { - val$37 = _ref.$val; - return Times(key, val$37); - } else if ($assertType(_ref, time.Duration, true)[1]) { - val$38 = _ref.$val; - return Duration(key, val$38); - } else if ($assertType(_ref, sliceType$23, true)[1]) { - val$39 = _ref.$val; - return Durations(key, val$39); - } else if ($assertType(_ref, $error, true)[1]) { - val$40 = _ref; - return NamedError(key, val$40); - } else if ($assertType(_ref, sliceType$24, true)[1]) { - val$41 = _ref.$val; - return Errors(key, val$41); - } else if ($assertType(_ref, fmt.Stringer, true)[1]) { - val$42 = _ref; - return Stringer(key, val$42); - } else { - val$43 = _ref; - return Reflect(key, val$43); - } - }; - $pkg.Any = Any; - Error = function(err) { - var err; - return NamedError("error", err); - }; - $pkg.Error = Error; - NamedError = function(key, err) { - var err, key; - if ($interfaceIsEqual(err, $ifaceNil)) { - return Skip(); - } - return new zapcore.Field.ptr(key, 25, new $Int64(0, 0), "", err); - }; - $pkg.NamedError = NamedError; - errArray.prototype.MarshalLogArray = function(arr) { - var {_i, _r, _r$1, _ref, arr, elem, errs, i, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - errs = this; - _ref = errs; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - if ($interfaceIsEqual(((i < 0 || i >= errs.$length) ? ($throwRuntimeError("index out of range"), undefined) : errs.$array[errs.$offset + i]), $ifaceNil)) { - _i++; - /* continue; */ $s = 1; continue; - } - _r = _errArrayElemPool.Get(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - elem = $assertType(_r, ptrType$8); - elem.error = ((i < 0 || i >= errs.$length) ? ($throwRuntimeError("index out of range"), undefined) : errs.$array[errs.$offset + i]); - _r$1 = arr.AppendObject(elem); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _r$1; - elem.error = $ifaceNil; - _errArrayElemPool.Put(elem); - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: errArray.prototype.MarshalLogArray, $c: true, $r, _i, _r, _r$1, _ref, arr, elem, errs, i, $s};return $f; - }; - $ptrType(errArray).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - errArrayElem.ptr.prototype.MarshalLogObject = function(enc) { - var {e, enc, $s, $r, $c} = $restore(this, {enc}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - e = this; - $r = $clone(Error(e.error), zapcore.Field).AddTo(enc); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: errArrayElem.ptr.prototype.MarshalLogObject, $c: true, $r, e, enc, $s};return $f; - }; - errArrayElem.prototype.MarshalLogObject = function(enc) { return this.$val.MarshalLogObject(enc); }; - newEncoder = function(name, encoderConfig) { - var {$24r, $24r$1, $24r$2, _entry, _r, _r$1, _tuple, constructor, encoderConfig, name, ok, $s, $deferred, $r, $c} = $restore(this, {name, encoderConfig}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - $r = _encoderMutex.RLock(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $deferred.push([$methodVal(_encoderMutex, "RUnlock"), []]); - /* */ if (name === "") { $s = 2; continue; } - /* */ $s = 3; continue; - /* if (name === "") { */ case 2: - $24r = [$ifaceNil, errNoEncoderNameSpecified]; - $s = 4; case 4: return $24r; - /* } */ case 3: - _tuple = (_entry = _encoderNameToConstructor[$String.keyFor(name)], _entry !== undefined ? [_entry.v, true] : [$throwNilPointerError, false]); - constructor = _tuple[0]; - ok = _tuple[1]; - /* */ if (!ok) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (!ok) { */ case 5: - _r = fmt.Errorf("no encoder registered for name %q", new sliceType([new $String(name)])); /* */ $s = 7; case 7: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r$1 = [$ifaceNil, _r]; - $s = 8; case 8: return $24r$1; - /* } */ case 6: - _r$1 = constructor($clone(encoderConfig, zapcore.EncoderConfig)); /* */ $s = 9; case 9: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r$2 = _r$1; - $s = 10; case 10: return $24r$2; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [$ifaceNil, $ifaceNil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: newEncoder, $c: true, $r, $24r, $24r$1, $24r$2, _entry, _r, _r$1, _tuple, constructor, encoderConfig, name, ok, $s, $deferred};return $f; } } - }; - NewDevelopmentEncoderConfig = function() { - return new zapcore.EncoderConfig.ptr("M", "L", "T", "N", "C", "S", "\n", zapcore.CapitalLevelEncoder, zapcore.ISO8601TimeEncoder, zapcore.StringDurationEncoder, zapcore.ShortCallerEncoder, $throwNilPointerError); - }; - $pkg.NewDevelopmentEncoderConfig = NewDevelopmentEncoderConfig; - NewDevelopmentConfig = function() { - return new Config.ptr($clone(NewAtomicLevelAt(-1), AtomicLevel), true, false, false, ptrType$9.nil, "console", $clone(NewDevelopmentEncoderConfig(), zapcore.EncoderConfig), new sliceType$1(["stderr"]), new sliceType$1(["stderr"]), false); - }; - $pkg.NewDevelopmentConfig = NewDevelopmentConfig; - Config.ptr.prototype.Build = function(opts) { - var {_arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, cfg, enc, err, errSink, log$1, opts, sink, x, $s, $r, $c} = $restore(this, {opts}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = this; - _r = $clone(cfg, Config).buildEncoder(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - enc = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType.nil, err]; - } - _r$1 = $clone(cfg, Config).openSinks(); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - sink = _tuple$1[0]; - errSink = _tuple$1[1]; - err = _tuple$1[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [ptrType.nil, err]; - } - _arg = zapcore.NewCore(enc, sink, (x = cfg.Level, new x.constructor.elem(x))); - _r$2 = $clone(cfg, Config).buildOptions(errSink); /* */ $s = 3; case 3: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _arg$1 = _r$2; - _r$3 = New(_arg, _arg$1); /* */ $s = 4; case 4: if($c) { $c = false; _r$3 = _r$3.$blk(); } if (_r$3 && _r$3.$blk !== undefined) { break s; } - log$1 = _r$3; - /* */ if (opts.$length > 0) { $s = 5; continue; } - /* */ $s = 6; continue; - /* if (opts.$length > 0) { */ case 5: - _r$4 = log$1.WithOptions(opts); /* */ $s = 7; case 7: if($c) { $c = false; _r$4 = _r$4.$blk(); } if (_r$4 && _r$4.$blk !== undefined) { break s; } - log$1 = _r$4; - /* } */ case 6: - $s = -1; return [log$1, $ifaceNil]; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.Build, $c: true, $r, _arg, _arg$1, _r, _r$1, _r$2, _r$3, _r$4, _tuple, _tuple$1, cfg, enc, err, errSink, log$1, opts, sink, x, $s};return $f; - }; - Config.prototype.Build = function(opts) { return this.$val.Build(opts); }; - Config.ptr.prototype.buildOptions = function(errSink) { - var {_entry, _entry$1, _i, _i$1, _keys, _ref, _ref$1, cfg, errSink, fs, k, k$1, keys, opts, stackLevel, $s, $r, $c} = $restore(this, {errSink}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = [cfg]; - cfg[0] = this; - opts = new sliceType$6([ErrorOutput(errSink)]); - if (cfg[0].Development) { - opts = $append(opts, Development()); - } - if (!cfg[0].DisableCaller) { - opts = $append(opts, AddCaller()); - } - stackLevel = 2; - if (cfg[0].Development) { - stackLevel = 1; - } - if (!cfg[0].DisableStacktrace) { - opts = $append(opts, AddStacktrace(new zapcore.Level(stackLevel))); - } - /* */ if (!(cfg[0].Sampling === ptrType$9.nil)) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (!(cfg[0].Sampling === ptrType$9.nil)) { */ case 1: - opts = $append(opts, WrapCore((function(cfg) { return function(core) { - var core; - return zapcore.NewSampler(core, new time.Duration(0, 1000000000), (cfg[0].Sampling.Initial), (cfg[0].Sampling.Thereafter)); - }; })(cfg))); - /* } */ case 2: - /* */ if ($keys(cfg[0].InitialFields).length > 0) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if ($keys(cfg[0].InitialFields).length > 0) { */ case 3: - fs = $makeSlice(sliceType$4, 0, $keys(cfg[0].InitialFields).length); - keys = $makeSlice(sliceType$1, 0, $keys(cfg[0].InitialFields).length); - _ref = cfg[0].InitialFields; - _i = 0; - _keys = $keys(_ref); - while (true) { - if (!(_i < _keys.length)) { break; } - _entry = _ref[_keys[_i]]; - if (_entry === undefined) { - _i++; - continue; - } - k = _entry.k; - keys = $append(keys, k); - _i++; - } - $r = sort.Strings(keys); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _ref$1 = keys; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - k$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - fs = $append(fs, Any(k$1, (_entry$1 = cfg[0].InitialFields[$String.keyFor(k$1)], _entry$1 !== undefined ? _entry$1.v : $ifaceNil))); - _i$1++; - } - opts = $append(opts, Fields(fs)); - /* } */ case 4: - $s = -1; return opts; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.buildOptions, $c: true, $r, _entry, _entry$1, _i, _i$1, _keys, _ref, _ref$1, cfg, errSink, fs, k, k$1, keys, opts, stackLevel, $s};return $f; - }; - Config.prototype.buildOptions = function(errSink) { return this.$val.buildOptions(errSink); }; - Config.ptr.prototype.openSinks = function() { - var {_r, _r$1, _tuple, _tuple$1, cfg, closeOut, err, errSink, sink, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = this; - _r = Open(cfg.OutputPaths); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - sink = _tuple[0]; - closeOut = _tuple[1]; - err = _tuple[2]; - if (!($interfaceIsEqual(err, $ifaceNil))) { - $s = -1; return [$ifaceNil, $ifaceNil, err]; - } - _r$1 = Open(cfg.ErrorOutputPaths); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple$1 = _r$1; - errSink = _tuple$1[0]; - err = _tuple$1[2]; - /* */ if (!($interfaceIsEqual(err, $ifaceNil))) { $s = 3; continue; } - /* */ $s = 4; continue; - /* if (!($interfaceIsEqual(err, $ifaceNil))) { */ case 3: - $r = closeOut(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return [$ifaceNil, $ifaceNil, err]; - /* } */ case 4: - $s = -1; return [sink, errSink, $ifaceNil]; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.openSinks, $c: true, $r, _r, _r$1, _tuple, _tuple$1, cfg, closeOut, err, errSink, sink, $s};return $f; - }; - Config.prototype.openSinks = function() { return this.$val.openSinks(); }; - Config.ptr.prototype.buildEncoder = function() { - var {$24r, _r, cfg, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - cfg = this; - _r = newEncoder(cfg.Encoding, $clone(cfg.EncoderConfig, zapcore.EncoderConfig)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Config.ptr.prototype.buildEncoder, $c: true, $r, $24r, _r, cfg, $s};return $f; - }; - Config.prototype.buildEncoder = function() { return this.$val.buildEncoder(); }; - Array = function(key, val) { - var key, val; - return new zapcore.Field.ptr(key, 1, new $Int64(0, 0), "", val); - }; - $pkg.Array = Array; - Bools = function(key, bs) { - var bs, key; - return Array(key, ($convertSliceType(bs, bools))); - }; - $pkg.Bools = Bools; - Complex128s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, complex128s))); - }; - $pkg.Complex128s = Complex128s; - Complex64s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, complex64s))); - }; - $pkg.Complex64s = Complex64s; - Durations = function(key, ds) { - var ds, key; - return Array(key, ($convertSliceType(ds, durations))); - }; - $pkg.Durations = Durations; - Float64s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, float64s))); - }; - $pkg.Float64s = Float64s; - Float32s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, float32s))); - }; - $pkg.Float32s = Float32s; - Ints = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, ints))); - }; - $pkg.Ints = Ints; - Int64s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, int64s))); - }; - $pkg.Int64s = Int64s; - Int32s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, int32s))); - }; - $pkg.Int32s = Int32s; - Int16s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, int16s))); - }; - $pkg.Int16s = Int16s; - Int8s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, int8s))); - }; - $pkg.Int8s = Int8s; - Strings = function(key, ss) { - var key, ss; - return Array(key, ($convertSliceType(ss, stringArray))); - }; - $pkg.Strings = Strings; - Times = function(key, ts) { - var key, ts; - return Array(key, ($convertSliceType(ts, times))); - }; - $pkg.Times = Times; - Uints = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, uints))); - }; - $pkg.Uints = Uints; - Uint64s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, uint64s))); - }; - $pkg.Uint64s = Uint64s; - Uint32s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, uint32s))); - }; - $pkg.Uint32s = Uint32s; - Uint16s = function(key, nums) { - var key, nums; - return Array(key, ($convertSliceType(nums, uint16s))); - }; - $pkg.Uint16s = Uint16s; - Uintptrs = function(key, us) { - var key, us; - return Array(key, ($convertSliceType(us, uintptrs))); - }; - $pkg.Uintptrs = Uintptrs; - Errors = function(key, errs) { - var errs, key; - return Array(key, ($convertSliceType(errs, errArray))); - }; - $pkg.Errors = Errors; - bools.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, bs, i, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - bs = this; - _ref = bs; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendBool(((i < 0 || i >= bs.$length) ? ($throwRuntimeError("index out of range"), undefined) : bs.$array[bs.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: bools.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, bs, i, $s};return $f; - }; - $ptrType(bools).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - complex128s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendComplex128(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: complex128s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(complex128s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - complex64s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendComplex64(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: complex64s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(complex64s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - durations.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, ds, i, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ds = this; - _ref = ds; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendDuration(((i < 0 || i >= ds.$length) ? ($throwRuntimeError("index out of range"), undefined) : ds.$array[ds.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: durations.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, ds, i, $s};return $f; - }; - $ptrType(durations).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - float64s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendFloat64(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: float64s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(float64s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - float32s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendFloat32(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: float32s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(float32s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - ints.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendInt(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: ints.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(ints).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - int64s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendInt64(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: int64s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(int64s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - int32s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendInt32(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: int32s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(int32s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - int16s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendInt16(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: int16s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(int16s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - int8s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendInt8(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: int8s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(int8s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - stringArray.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, ss, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ss = this; - _ref = ss; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendString(((i < 0 || i >= ss.$length) ? ($throwRuntimeError("index out of range"), undefined) : ss.$array[ss.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: stringArray.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, ss, $s};return $f; - }; - $ptrType(stringArray).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - times.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, ts, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ts = this; - _ref = ts; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendTime($clone(((i < 0 || i >= ts.$length) ? ($throwRuntimeError("index out of range"), undefined) : ts.$array[ts.$offset + i]), time.Time)); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: times.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, ts, $s};return $f; - }; - $ptrType(times).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - uints.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendUint(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: uints.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(uints).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - uint64s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendUint64(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: uint64s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(uint64s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - uint32s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendUint32(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: uint32s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(uint32s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - uint16s.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendUint16(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: uint16s.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(uint16s).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - uintptrs.prototype.MarshalLogArray = function(arr) { - var {_i, _ref, arr, i, nums, $s, $r, $c} = $restore(this, {arr}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - nums = this; - _ref = nums; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - i = _i; - $r = arr.AppendUintptr(((i < 0 || i >= nums.$length) ? ($throwRuntimeError("index out of range"), undefined) : nums.$array[nums.$offset + i])); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _i++; - $s = 1; continue; - case 2: - $s = -1; return $ifaceNil; - /* */ } return; } var $f = {$blk: uintptrs.prototype.MarshalLogArray, $c: true, $r, _i, _ref, arr, i, nums, $s};return $f; - }; - $ptrType(uintptrs).prototype.MarshalLogArray = function(arr) { return this.$get().MarshalLogArray(arr); }; - ptrType$10.methods = [{prop: "Desugar", name: "Desugar", pkg: "", typ: $funcType([], [ptrType], false)}, {prop: "Named", name: "Named", pkg: "", typ: $funcType([$String], [ptrType$10], false)}, {prop: "With", name: "With", pkg: "", typ: $funcType([sliceType], [ptrType$10], true)}, {prop: "Debug", name: "Debug", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Info", name: "Info", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Warn", name: "Warn", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "DPanic", name: "DPanic", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Panic", name: "Panic", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Fatal", name: "Fatal", pkg: "", typ: $funcType([sliceType], [], true)}, {prop: "Debugf", name: "Debugf", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Infof", name: "Infof", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Warnf", name: "Warnf", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Errorf", name: "Errorf", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "DPanicf", name: "DPanicf", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Panicf", name: "Panicf", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Fatalf", name: "Fatalf", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Debugw", name: "Debugw", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Infow", name: "Infow", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Warnw", name: "Warnw", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Errorw", name: "Errorw", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "DPanicw", name: "DPanicw", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Panicw", name: "Panicw", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Fatalw", name: "Fatalw", pkg: "", typ: $funcType([$String, sliceType], [], true)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "log", name: "log", pkg: "go.uber.org/zap", typ: $funcType([zapcore.Level, $String, sliceType, sliceType], [], false)}, {prop: "sweetenFields", name: "sweetenFields", pkg: "go.uber.org/zap", typ: $funcType([sliceType], [sliceType$4], false)}]; - invalidPair.methods = [{prop: "MarshalLogObject", name: "MarshalLogObject", pkg: "", typ: $funcType([zapcore.ObjectEncoder], [$error], false)}]; - invalidPairs.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - nopCloserSink.methods = [{prop: "Close", name: "Close", pkg: "", typ: $funcType([], [$error], false)}]; - ptrType$11.methods = [{prop: "Error", name: "Error", pkg: "", typ: $funcType([], [$String], false)}]; - optionFunc.methods = [{prop: "apply", name: "apply", pkg: "go.uber.org/zap", typ: $funcType([ptrType], [], false)}]; - ptrType.methods = [{prop: "Sugar", name: "Sugar", pkg: "", typ: $funcType([], [ptrType$10], false)}, {prop: "Named", name: "Named", pkg: "", typ: $funcType([$String], [ptrType], false)}, {prop: "WithOptions", name: "WithOptions", pkg: "", typ: $funcType([sliceType$6], [ptrType], true)}, {prop: "With", name: "With", pkg: "", typ: $funcType([sliceType$4], [ptrType], true)}, {prop: "Check", name: "Check", pkg: "", typ: $funcType([zapcore.Level, $String], [ptrType$1], false)}, {prop: "Debug", name: "Debug", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "Info", name: "Info", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "Warn", name: "Warn", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "Error", name: "Error", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "DPanic", name: "DPanic", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "Panic", name: "Panic", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "Fatal", name: "Fatal", pkg: "", typ: $funcType([$String, sliceType$4], [], true)}, {prop: "Sync", name: "Sync", pkg: "", typ: $funcType([], [$error], false)}, {prop: "Core", name: "Core", pkg: "", typ: $funcType([], [zapcore.Core], false)}, {prop: "clone", name: "clone", pkg: "go.uber.org/zap", typ: $funcType([], [ptrType], false)}, {prop: "check", name: "check", pkg: "go.uber.org/zap", typ: $funcType([zapcore.Level, $String], [ptrType$1], false)}]; - AtomicLevel.methods = [{prop: "Enabled", name: "Enabled", pkg: "", typ: $funcType([zapcore.Level], [$Bool], false)}, {prop: "Level", name: "Level", pkg: "", typ: $funcType([], [zapcore.Level], false)}, {prop: "SetLevel", name: "SetLevel", pkg: "", typ: $funcType([zapcore.Level], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "MarshalText", name: "MarshalText", pkg: "", typ: $funcType([], [sliceType$7, $error], false)}, {prop: "ServeHTTP", name: "ServeHTTP", pkg: "", typ: $funcType([http.ResponseWriter, ptrType$12], [], false)}]; - ptrType$13.methods = [{prop: "UnmarshalText", name: "UnmarshalText", pkg: "", typ: $funcType([sliceType$7], [$error], false)}]; - errArray.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - ptrType$8.methods = [{prop: "MarshalLogObject", name: "MarshalLogObject", pkg: "", typ: $funcType([zapcore.ObjectEncoder], [$error], false)}]; - Config.methods = [{prop: "Build", name: "Build", pkg: "", typ: $funcType([sliceType$6], [ptrType, $error], true)}, {prop: "buildOptions", name: "buildOptions", pkg: "go.uber.org/zap", typ: $funcType([zapcore.WriteSyncer], [sliceType$6], false)}, {prop: "openSinks", name: "openSinks", pkg: "go.uber.org/zap", typ: $funcType([], [zapcore.WriteSyncer, zapcore.WriteSyncer, $error], false)}, {prop: "buildEncoder", name: "buildEncoder", pkg: "go.uber.org/zap", typ: $funcType([], [zapcore.Encoder, $error], false)}]; - bools.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - complex128s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - complex64s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - durations.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - float64s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - float32s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - ints.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - int64s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - int32s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - int16s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - int8s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - stringArray.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - times.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - uints.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - uint64s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - uint32s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - uint16s.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - uintptrs.methods = [{prop: "MarshalLogArray", name: "MarshalLogArray", pkg: "", typ: $funcType([zapcore.ArrayEncoder], [$error], false)}]; - SugaredLogger.init("go.uber.org/zap", [{prop: "base", name: "base", embedded: false, exported: false, typ: ptrType, tag: ""}]); - invalidPair.init("go.uber.org/zap", [{prop: "position", name: "position", embedded: false, exported: false, typ: $Int, tag: ""}, {prop: "key", name: "key", embedded: false, exported: false, typ: $emptyInterface, tag: ""}, {prop: "value", name: "value", embedded: false, exported: false, typ: $emptyInterface, tag: ""}]); - invalidPairs.init(invalidPair); - programCounters.init("go.uber.org/zap", [{prop: "pcs", name: "pcs", embedded: false, exported: false, typ: sliceType$5, tag: ""}]); - nopCloserSink.init("", [{prop: "WriteSyncer", name: "WriteSyncer", embedded: true, exported: true, typ: zapcore.WriteSyncer, tag: ""}]); - errSinkNotFound.init("go.uber.org/zap", [{prop: "scheme", name: "scheme", embedded: false, exported: false, typ: $String, tag: ""}]); - Option.init([{prop: "apply", name: "apply", pkg: "go.uber.org/zap", typ: $funcType([ptrType], [], false)}]); - optionFunc.init([ptrType], [], false); - Logger.init("go.uber.org/zap", [{prop: "core", name: "core", embedded: false, exported: false, typ: zapcore.Core, tag: ""}, {prop: "development", name: "development", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "name", name: "name", embedded: false, exported: false, typ: $String, tag: ""}, {prop: "errorOutput", name: "errorOutput", embedded: false, exported: false, typ: zapcore.WriteSyncer, tag: ""}, {prop: "addCaller", name: "addCaller", embedded: false, exported: false, typ: $Bool, tag: ""}, {prop: "addStack", name: "addStack", embedded: false, exported: false, typ: zapcore.LevelEnabler, tag: ""}, {prop: "callerSkip", name: "callerSkip", embedded: false, exported: false, typ: $Int, tag: ""}]); - AtomicLevel.init("go.uber.org/zap", [{prop: "l", name: "l", embedded: false, exported: false, typ: ptrType$5, tag: ""}]); - errArray.init($error); - errArrayElem.init("go.uber.org/zap", [{prop: "error", name: "error", embedded: true, exported: false, typ: $error, tag: ""}]); - SamplingConfig.init("", [{prop: "Initial", name: "Initial", embedded: false, exported: true, typ: $Int, tag: "json:\"initial\" yaml:\"initial\""}, {prop: "Thereafter", name: "Thereafter", embedded: false, exported: true, typ: $Int, tag: "json:\"thereafter\" yaml:\"thereafter\""}]); - Config.init("", [{prop: "Level", name: "Level", embedded: false, exported: true, typ: AtomicLevel, tag: "json:\"level\" yaml:\"level\""}, {prop: "Development", name: "Development", embedded: false, exported: true, typ: $Bool, tag: "json:\"development\" yaml:\"development\""}, {prop: "DisableCaller", name: "DisableCaller", embedded: false, exported: true, typ: $Bool, tag: "json:\"disableCaller\" yaml:\"disableCaller\""}, {prop: "DisableStacktrace", name: "DisableStacktrace", embedded: false, exported: true, typ: $Bool, tag: "json:\"disableStacktrace\" yaml:\"disableStacktrace\""}, {prop: "Sampling", name: "Sampling", embedded: false, exported: true, typ: ptrType$9, tag: "json:\"sampling\" yaml:\"sampling\""}, {prop: "Encoding", name: "Encoding", embedded: false, exported: true, typ: $String, tag: "json:\"encoding\" yaml:\"encoding\""}, {prop: "EncoderConfig", name: "EncoderConfig", embedded: false, exported: true, typ: zapcore.EncoderConfig, tag: "json:\"encoderConfig\" yaml:\"encoderConfig\""}, {prop: "OutputPaths", name: "OutputPaths", embedded: false, exported: true, typ: sliceType$1, tag: "json:\"outputPaths\" yaml:\"outputPaths\""}, {prop: "ErrorOutputPaths", name: "ErrorOutputPaths", embedded: false, exported: true, typ: sliceType$1, tag: "json:\"errorOutputPaths\" yaml:\"errorOutputPaths\""}, {prop: "InitialFields", name: "InitialFields", embedded: false, exported: true, typ: mapType, tag: "json:\"initialFields\" yaml:\"initialFields\""}]); - bools.init($Bool); - complex128s.init($Complex128); - complex64s.init($Complex64); - durations.init(time.Duration); - float64s.init($Float64); - float32s.init($Float32); - ints.init($Int); - int64s.init($Int64); - int32s.init($Int32); - int16s.init($Int16); - int8s.init($Int8); - stringArray.init($String); - times.init(time.Time); - uints.init($Uint); - uint64s.init($Uint64); - uint32s.init($Uint32); - uint16s.init($Uint16); - uintptrs.init($Uintptr); - errorResponse.init("", [{prop: "Error", name: "Error", embedded: false, exported: true, typ: $String, tag: "json:\"error\""}]); - payload.init("", [{prop: "Level", name: "Level", embedded: false, exported: true, typ: ptrType$6, tag: "json:\"level\""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = json.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = flag.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = atomic.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = multierr.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = bufferpool.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = zapcore.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = io.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ioutil.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = log.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = http.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = url.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = os.$init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = runtime.$init(); /* */ $s = 17; case 17: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sort.$init(); /* */ $s = 18; case 18: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 19; case 19: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 20; case 20: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = time.$init(); /* */ $s = 21; case 21: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - _sinkMutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - _sinkFactories = false; - _encoderMutex = new sync.RWMutex.ptr(new sync.Mutex.ptr(0, 0), 0, 0, 0, 0); - _stacktracePool = new sync.Pool.ptr(sliceType.nil, (function() { - return newProgramCounters(64); - })); - _zapStacktracePrefixes = addPrefix("go.uber.org/zap", new sliceType$1([".", "/"])); - _zapStacktraceVendorContains = addPrefix("/vendor/", _zapStacktracePrefixes); - _globalL = NewNop(); - _globalS = _globalL.Sugar(); - _errArrayElemPool = new sync.Pool.ptr(sliceType.nil, (function() { - return new errArrayElem.ptr($ifaceNil); - })); - errNoEncoderNameSpecified = errors.New("no encoder name specified"); - _encoderNameToConstructor = $makeMap($String.keyFor, [{ k: "console", v: (function $b(encoderConfig) { - var {$24r, _r, encoderConfig, $s, $r, $c} = $restore(this, {encoderConfig}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = zapcore.NewConsoleEncoder($clone(encoderConfig, zapcore.EncoderConfig)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, $ifaceNil]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r, encoderConfig, $s};return $f; - }) }, { k: "json", v: (function $b(encoderConfig) { - var {$24r, _r, encoderConfig, $s, $r, $c} = $restore(this, {encoderConfig}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = zapcore.NewJSONEncoder($clone(encoderConfig, zapcore.EncoderConfig)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, $ifaceNil]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, $24r, _r, encoderConfig, $s};return $f; - }) }]); - $r = init(); /* */ $s = 22; case 22: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["dnmshared"] = (function() { - var $pkg = {}, $init, bytes, zlib, sharedprotos, base64, xml, errors, fmt, vector, resolv, zap, zapcore, ioutil, math, strconv, strings, SatResult, ptrType, ptrType$1, ptrType$2, sliceType, sliceType$1, funcType, arrayType, arrayType$1, ptrType$5, ptrType$6, sliceType$4, sliceType$10, ptrType$13, sliceType$11, GenerateRectCollider, generateRectColliderInCollisionSpace, GenerateConvexPolygonCollider, CalcPushbacks, isPolygonPairOverlapped, isPolygonPairSeparatedByDir, WorldToVirtualGridPos, VirtualGridToWorldPos, WorldToPolygonColliderBLPos, PolygonColliderBLToWorldPos, PolygonColliderBLToVirtualGridPos, VirtualGridToPolygonColliderBLPos, init, AlignPolygon2DToBoundingBox; - bytes = $packages["bytes"]; - zlib = $packages["compress/zlib"]; - sharedprotos = $packages["dnmshared/sharedprotos"]; - base64 = $packages["encoding/base64"]; - xml = $packages["encoding/xml"]; - errors = $packages["errors"]; - fmt = $packages["fmt"]; - vector = $packages["github.com/kvartborg/vector"]; - resolv = $packages["github.com/solarlune/resolv"]; - zap = $packages["go.uber.org/zap"]; - zapcore = $packages["go.uber.org/zap/zapcore"]; - ioutil = $packages["io/ioutil"]; - math = $packages["math"]; - strconv = $packages["strconv"]; - strings = $packages["strings"]; - SatResult = $pkg.SatResult = $newType(0, $kindStruct, "dnmshared.SatResult", true, "dnmshared", true, function(Overlap_, OverlapX_, OverlapY_, AContainedInB_, BContainedInA_, Axis_) { - this.$val = this; - if (arguments.length === 0) { - this.Overlap = 0; - this.OverlapX = 0; - this.OverlapY = 0; - this.AContainedInB = false; - this.BContainedInA = false; - this.Axis = vector.Vector.nil; - return; - } - this.Overlap = Overlap_; - this.OverlapX = OverlapX_; - this.OverlapY = OverlapY_; - this.AContainedInB = AContainedInB_; - this.BContainedInA = BContainedInA_; - this.Axis = Axis_; - }); - ptrType = $ptrType(zap.Logger); - ptrType$1 = $ptrType($packages["go.uber.org/atomic"].Int32); - ptrType$2 = $ptrType(zap.SamplingConfig); - sliceType = $sliceType($String); - sliceType$1 = $sliceType($Uint8); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - arrayType$1 = $arrayType($packages["sync"].Mutex, 0); - ptrType$5 = $ptrType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - ptrType$6 = $ptrType(sharedprotos.Vec2D); - sliceType$4 = $sliceType(ptrType$6); - sliceType$10 = $sliceType($Float64); - ptrType$13 = $ptrType(SatResult); - sliceType$11 = $sliceType(zap.Option); - GenerateRectCollider = function(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag) { - var {$24r, _r, _tuple, blX, blY, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s, $r, $c} = $restore(this, {wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tuple = WorldToPolygonColliderBLPos(wx, wy, w * 0.5, h * 0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY); - blX = _tuple[0]; - blY = _tuple[1]; - _r = generateRectColliderInCollisionSpace(blX, blY, leftPadding + w + rightPadding, bottomPadding + h + topPadding, data, tag); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: GenerateRectCollider, $c: true, $r, $24r, _r, _tuple, blX, blY, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s};return $f; - }; - $pkg.GenerateRectCollider = GenerateRectCollider; - generateRectColliderInCollisionSpace = function(blX, blY, w, h, data, tag) { - var {blX, blY, collider, data, h, shape, tag, w, $s, $r, $c} = $restore(this, {blX, blY, w, h, data, tag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - collider = resolv.NewObject(blX, blY, w, h, new sliceType([tag])); - shape = resolv.NewRectangle(0, 0, w, h); - $r = collider.SetShape(shape); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - collider.Data = data; - $s = -1; return collider; - /* */ } return; } var $f = {$blk: generateRectColliderInCollisionSpace, $c: true, $r, blX, blY, collider, data, h, shape, tag, w, $s};return $f; - }; - GenerateConvexPolygonCollider = function(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag) { - var {_i, _i$1, _ref, _ref$1, _tmp, _tmp$1, aligned, collider, data, h, i, i$1, j, p, pi, pj, shape, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, w, x, $s, $r, $c} = $restore(this, {unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - aligned = AlignPolygon2DToBoundingBox(unalignedSrc); - _tmp = 0; - _tmp$1 = 0; - w = _tmp; - h = _tmp$1; - shape = resolv.NewConvexPolygon(sliceType$10.nil); - _ref = aligned.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - pi = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = aligned.Points; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - j = _i$1; - pj = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (i === j) { - _i$1++; - continue; - } - if (math.Abs(pj.X - pi.X) > w) { - w = math.Abs(pj.X - pi.X); - } - if (math.Abs(pj.Y - pi.Y) > h) { - h = math.Abs(pj.Y - pi.Y); - } - _i$1++; - } - _i++; - } - i$1 = 0; - while (true) { - if (!(i$1 < aligned.Points.$length)) { break; } - p = (x = aligned.Points, ((i$1 < 0 || i$1 >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i$1])); - shape.AddPoints(new sliceType$10([p.X, p.Y])); - i$1 = i$1 + (1) >> 0; - } - collider = resolv.NewObject(aligned.Anchor.X + spaceOffsetX, aligned.Anchor.Y + spaceOffsetY, w, h, new sliceType([tag])); - $r = collider.SetShape(shape); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - collider.Data = data; - $s = -1; return collider; - /* */ } return; } var $f = {$blk: GenerateConvexPolygonCollider, $c: true, $r, _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, aligned, collider, data, h, i, i$1, j, p, pi, pj, shape, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, w, x, $s};return $f; - }; - $pkg.GenerateConvexPolygonCollider = GenerateConvexPolygonCollider; - CalcPushbacks = function(oldDx, oldDy, playerShape, barrierShape) { - var {$24r, $24r$1, _tmp, _tmp$1, _tuple, barrierShape, oldDx, oldDy, origX, origY, overlapResult, overlapped, playerShape, pushbackX, pushbackY, $s, $deferred, $r, $c} = $restore(this, {oldDx, oldDy, playerShape, barrierShape}); - /* */ $s = $s || 0; var $err = null; try { s: while (true) { switch ($s) { case 0: $deferred = []; $curGoroutine.deferStack.push($deferred); - origX = [origX]; - origY = [origY]; - playerShape = [playerShape]; - _tuple = playerShape[0].Position(); - origX[0] = _tuple[0]; - origY[0] = _tuple[1]; - $deferred.push([(function(origX, origY, playerShape) { return function() { - playerShape[0].SetPosition(origX[0], origY[0]); - }; })(origX, origY, playerShape), []]); - playerShape[0].SetPosition(origX[0] + oldDx, origY[0] + oldDy); - overlapResult = new SatResult.ptr(0, 0, 0, true, true, new vector.Vector([0, 0])); - overlapped = isPolygonPairOverlapped(playerShape[0], barrierShape, overlapResult); - /* */ if (overlapped) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (overlapped) { */ case 1: - _tmp = overlapResult.Overlap * overlapResult.OverlapX; - _tmp$1 = overlapResult.Overlap * overlapResult.OverlapY; - pushbackX = _tmp; - pushbackY = _tmp$1; - $24r = [true, pushbackX, pushbackY, overlapResult]; - $s = 4; case 4: return $24r; - /* } else { */ case 2: - $24r$1 = [false, 0, 0, overlapResult]; - $s = 5; case 5: return $24r$1; - /* } */ case 3: - $s = -1; return [false, 0, 0, ptrType$13.nil]; - /* */ } return; } } catch(err) { $err = err; $s = -1; return [false, 0, 0, ptrType$13.nil]; } finally { $callDeferred($deferred, $err); if($curGoroutine.asleep) { var $f = {$blk: CalcPushbacks, $c: true, $r, $24r, $24r$1, _tmp, _tmp$1, _tuple, barrierShape, oldDx, oldDy, origX, origY, overlapResult, overlapped, playerShape, pushbackX, pushbackY, $s, $deferred};return $f; } } - }; - $pkg.CalcPushbacks = CalcPushbacks; - isPolygonPairOverlapped = function(a, b, result) { - var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, a, aCnt, axis, axis$1, b, bCnt, result, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7; - _tmp = a.Points.$length; - _tmp$1 = b.Points.$length; - aCnt = _tmp; - bCnt = _tmp$1; - if ((1 === aCnt) && (1 === bCnt)) { - if (!(ptrType$13.nil === result)) { - result.Overlap = 0; - } - return ((x = (x$1 = a.Points, (0 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 0])), (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0])) === (x$2 = (x$3 = b.Points, (0 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 0])), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0]))) && ((x$4 = (x$5 = a.Points, (0 >= x$5.$length ? ($throwRuntimeError("index out of range"), undefined) : x$5.$array[x$5.$offset + 0])), (1 >= x$4.$length ? ($throwRuntimeError("index out of range"), undefined) : x$4.$array[x$4.$offset + 1])) === (x$6 = (x$7 = b.Points, (0 >= x$7.$length ? ($throwRuntimeError("index out of range"), undefined) : x$7.$array[x$7.$offset + 0])), (1 >= x$6.$length ? ($throwRuntimeError("index out of range"), undefined) : x$6.$array[x$6.$offset + 1]))); - } - if (1 < aCnt) { - _ref = a.SATAxes(); - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - axis = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (isPolygonPairSeparatedByDir(a, b, axis.Unit(), result)) { - return false; - } - _i++; - } - } - if (1 < bCnt) { - _ref$1 = b.SATAxes(); - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - axis$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - if (isPolygonPairSeparatedByDir(a, b, axis$1.Unit(), result)) { - return false; - } - _i$1++; - } - } - return true; - }; - isPolygonPairSeparatedByDir = function(a, b, e, result) { - var _i, _i$1, _ref, _ref$1, _tmp, _tmp$1, _tmp$2, _tmp$3, a, aEnd, aStart, absoluteOverlap, b, bEnd, bStart, currentOverlap, dot, dot$1, e, option1, option1$1, option2, option2$1, overlap, p, p$1, result, sign, x, x$1; - _tmp = 1.7976931348623157e+308; - _tmp$1 = -1.7976931348623157e+308; - _tmp$2 = 1.7976931348623157e+308; - _tmp$3 = -1.7976931348623157e+308; - aStart = _tmp; - aEnd = _tmp$1; - bStart = _tmp$2; - bEnd = _tmp$3; - _ref = a.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - p = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - dot = ((0 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 0]) + a.X) * (0 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 0]) + ((1 >= p.$length ? ($throwRuntimeError("index out of range"), undefined) : p.$array[p.$offset + 1]) + a.Y) * (1 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 1]); - if (aStart > dot) { - aStart = dot; - } - if (aEnd < dot) { - aEnd = dot; - } - _i++; - } - _ref$1 = b.Points; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - p$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - dot$1 = ((0 >= p$1.$length ? ($throwRuntimeError("index out of range"), undefined) : p$1.$array[p$1.$offset + 0]) + b.X) * (0 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 0]) + ((1 >= p$1.$length ? ($throwRuntimeError("index out of range"), undefined) : p$1.$array[p$1.$offset + 1]) + b.Y) * (1 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 1]); - if (bStart > dot$1) { - bStart = dot$1; - } - if (bEnd < dot$1) { - bEnd = dot$1; - } - _i$1++; - } - if (aStart > bEnd || aEnd < bStart) { - return true; - } - if (!(ptrType$13.nil === result)) { - overlap = 0; - if (aStart < bStart) { - result.AContainedInB = false; - if (aEnd < bEnd) { - overlap = aEnd - bStart; - result.BContainedInA = false; - } else { - option1 = aEnd - bStart; - option2 = bEnd - aStart; - if (option1 < option2) { - overlap = option1; - } else { - overlap = -option2; - } - } - } else { - result.BContainedInA = false; - if (aEnd > bEnd) { - overlap = aStart - bEnd; - result.AContainedInB = false; - } else { - option1$1 = aEnd - bStart; - option2$1 = bEnd - aStart; - if (option1$1 < option2$1) { - overlap = option1$1; - } else { - overlap = -option2$1; - } - } - } - currentOverlap = result.Overlap; - absoluteOverlap = overlap; - if (overlap < 0) { - absoluteOverlap = -overlap; - } - if (((0 === (x = result.Axis, (0 >= x.$length ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + 0]))) && (0 === (x$1 = result.Axis, (1 >= x$1.$length ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + 1])))) || currentOverlap > absoluteOverlap) { - sign = 1; - if (overlap < 0) { - sign = -1; - } - result.Overlap = absoluteOverlap; - result.OverlapX = (0 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 0]) * sign; - result.OverlapY = (1 >= e.$length ? ($throwRuntimeError("index out of range"), undefined) : e.$array[e.$offset + 1]) * sign; - } - result.Axis = e; - } - return false; - }; - WorldToVirtualGridPos = function(wx, wy, worldToVirtualGridRatio) { - var virtualGridX, virtualGridY, worldToVirtualGridRatio, wx, wy; - virtualGridX = ((math.Round(wx * worldToVirtualGridRatio) >> 0)); - virtualGridY = ((math.Round(wy * worldToVirtualGridRatio) >> 0)); - return [virtualGridX, virtualGridY]; - }; - $pkg.WorldToVirtualGridPos = WorldToVirtualGridPos; - VirtualGridToWorldPos = function(vx, vy, virtualGridToWorldRatio) { - var virtualGridToWorldRatio, vx, vy, wx, wy; - wx = (vx) * virtualGridToWorldRatio; - wy = (vy) * virtualGridToWorldRatio; - return [wx, wy]; - }; - $pkg.VirtualGridToWorldPos = VirtualGridToWorldPos; - WorldToPolygonColliderBLPos = function(wx, wy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY) { - var bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding, wx, wy; - return [wx - halfBoundingW - leftPadding + collisionSpaceOffsetX, wy - halfBoundingH - bottomPadding + collisionSpaceOffsetY]; - }; - $pkg.WorldToPolygonColliderBLPos = WorldToPolygonColliderBLPos; - PolygonColliderBLToWorldPos = function(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY) { - var bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, cx, cy, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding; - return [cx + halfBoundingW + leftPadding - collisionSpaceOffsetX, cy + halfBoundingH + bottomPadding - collisionSpaceOffsetY]; - }; - $pkg.PolygonColliderBLToWorldPos = PolygonColliderBLToWorldPos; - PolygonColliderBLToVirtualGridPos = function(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, worldToVirtualGridRatio) { - var _tuple, bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, cx, cy, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding, worldToVirtualGridRatio, wx, wy; - _tuple = PolygonColliderBLToWorldPos(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY); - wx = _tuple[0]; - wy = _tuple[1]; - return WorldToVirtualGridPos(wx, wy, worldToVirtualGridRatio); - }; - $pkg.PolygonColliderBLToVirtualGridPos = PolygonColliderBLToVirtualGridPos; - VirtualGridToPolygonColliderBLPos = function(vx, vy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, virtualGridToWorldRatio) { - var _tuple, bottomPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, halfBoundingH, halfBoundingW, leftPadding, rightPadding, topPadding, virtualGridToWorldRatio, vx, vy, wx, wy; - _tuple = VirtualGridToWorldPos(vx, vy, virtualGridToWorldRatio); - wx = _tuple[0]; - wy = _tuple[1]; - return WorldToPolygonColliderBLPos(wx, wy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY); - }; - $pkg.VirtualGridToPolygonColliderBLPos = VirtualGridToPolygonColliderBLPos; - init = function() { - var {_r, _tuple, err, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - zap.Config.copy($pkg.LoggerConfig, zap.NewDevelopmentConfig()); - $clone($pkg.LoggerConfig.Level, zap.AtomicLevel).SetLevel(0); - $pkg.LoggerConfig.Development = false; - $pkg.LoggerConfig.Sampling = new zap.SamplingConfig.ptr(100, 100); - $pkg.LoggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder; - err = $ifaceNil; - _r = $clone($pkg.LoggerConfig, zap.Config).Build(sliceType$11.nil); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _tuple = _r; - $pkg.Logger = _tuple[0]; - err = _tuple[1]; - if (!($interfaceIsEqual($ifaceNil, err))) { - $panic(err); - } - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, _r, _tuple, err, $s};return $f; - }; - AlignPolygon2DToBoundingBox = function(input) { - var _i, _i$1, _ref, _ref$1, boundingBoxBL, i, input, output, p, p$1, x; - boundingBoxBL = new sharedprotos.Vec2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType$1.nil, 1.7976931348623157e+308, 1.7976931348623157e+308); - _ref = input.Points; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - p = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - if (p.X < boundingBoxBL.X) { - boundingBoxBL.X = p.X; - } - if (p.Y < boundingBoxBL.Y) { - boundingBoxBL.Y = p.Y; - } - _i++; - } - output = new sharedprotos.Polygon2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType$1.nil, new sharedprotos.Vec2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType$1.nil, input.Anchor.X + boundingBoxBL.X, input.Anchor.Y + boundingBoxBL.Y), $makeSlice(sliceType$4, input.Points.$length)); - _ref$1 = input.Points; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i = _i$1; - p$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - (x = output.Points, ((i < 0 || i >= x.$length) ? ($throwRuntimeError("index out of range"), undefined) : x.$array[x.$offset + i] = new sharedprotos.Vec2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$5.nil), 0, sliceType$1.nil, p$1.X - boundingBoxBL.X, p$1.Y - boundingBoxBL.Y))); - _i$1++; - } - return output; - }; - $pkg.AlignPolygon2DToBoundingBox = AlignPolygon2DToBoundingBox; - SatResult.init("", [{prop: "Overlap", name: "Overlap", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapX", name: "OverlapX", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "OverlapY", name: "OverlapY", embedded: false, exported: true, typ: $Float64, tag: ""}, {prop: "AContainedInB", name: "AContainedInB", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "BContainedInA", name: "BContainedInA", embedded: false, exported: true, typ: $Bool, tag: ""}, {prop: "Axis", name: "Axis", embedded: false, exported: true, typ: vector.Vector, tag: ""}]); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = bytes.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = zlib.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sharedprotos.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = base64.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = xml.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = errors.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = fmt.$init(); /* */ $s = 7; case 7: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = vector.$init(); /* */ $s = 8; case 8: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = resolv.$init(); /* */ $s = 9; case 9: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = zap.$init(); /* */ $s = 10; case 10: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = zapcore.$init(); /* */ $s = 11; case 11: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = ioutil.$init(); /* */ $s = 12; case 12: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = math.$init(); /* */ $s = 13; case 13: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strconv.$init(); /* */ $s = 14; case 14: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = strings.$init(); /* */ $s = 15; case 15: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.Logger = ptrType.nil; - $pkg.LoggerConfig = new zap.Config.ptr(new zap.AtomicLevel.ptr(ptrType$1.nil), false, false, false, ptrType$2.nil, "", new zapcore.EncoderConfig.ptr("", "", "", "", "", "", "", $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError, $throwNilPointerError), sliceType.nil, sliceType.nil, false); - $r = init(); /* */ $s = 16; case 16: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["jsexport/protos"] = (function() { - var $pkg = {}, $init, sharedprotos, protoreflect, protoimpl, reflect, sync, PlayerDownsync, InputFrameDecoded, InputFrameUpsync, InputFrameDownsync, HeartbeatUpsync, WsReq, WsResp, InputsBufferSnapshot, Barrier, MeleeBullet, BattleColliderInfo, RoomDownsyncFrame, x, sliceType, sliceType$1, sliceType$2, ptrType, ptrType$1, ptrType$2, ptrType$3, ptrType$4, ptrType$5, ptrType$6, ptrType$7, ptrType$8, ptrType$9, ptrType$10, ptrType$11, ptrType$12, ptrType$13, ptrType$14, ptrType$15, sliceType$3, funcType, arrayType, arrayType$1, ptrType$16, sliceType$4, sliceType$5, sliceType$6, sliceType$7, sliceType$8, sliceType$9, ptrType$17, ptrType$18, sliceType$10, sliceType$11, mapType, mapType$1, mapType$2, mapType$3, file_room_downsync_frame_proto_rawDesc, file_room_downsync_frame_proto_rawDescOnce, file_room_downsync_frame_proto_rawDescData, file_room_downsync_frame_proto_msgTypes, file_room_downsync_frame_proto_goTypes, file_room_downsync_frame_proto_depIdxs, file_room_downsync_frame_proto_rawDescGZIP, init, file_room_downsync_frame_proto_init; - sharedprotos = $packages["dnmshared/sharedprotos"]; - protoreflect = $packages["google.golang.org/protobuf/reflect/protoreflect"]; - protoimpl = $packages["google.golang.org/protobuf/runtime/protoimpl"]; - reflect = $packages["reflect"]; - sync = $packages["sync"]; - PlayerDownsync = $pkg.PlayerDownsync = $newType(0, $kindStruct, "protos.PlayerDownsync", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, Id_, VirtualGridX_, VirtualGridY_, DirX_, DirY_, VelX_, VelY_, Speed_, BattleState_, JoinIndex_, ColliderRadius_, Removed_, Score_, LastMoveGmtMillis_, FramesToRecover_, Hp_, MaxHp_, CharacterState_, InAir_, Name_, DisplayName_, Avatar_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Id = 0; - this.VirtualGridX = 0; - this.VirtualGridY = 0; - this.DirX = 0; - this.DirY = 0; - this.VelX = 0; - this.VelY = 0; - this.Speed = 0; - this.BattleState = 0; - this.JoinIndex = 0; - this.ColliderRadius = 0; - this.Removed = false; - this.Score = 0; - this.LastMoveGmtMillis = 0; - this.FramesToRecover = 0; - this.Hp = 0; - this.MaxHp = 0; - this.CharacterState = 0; - this.InAir = false; - this.Name = ""; - this.DisplayName = ""; - this.Avatar = ""; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Id = Id_; - this.VirtualGridX = VirtualGridX_; - this.VirtualGridY = VirtualGridY_; - this.DirX = DirX_; - this.DirY = DirY_; - this.VelX = VelX_; - this.VelY = VelY_; - this.Speed = Speed_; - this.BattleState = BattleState_; - this.JoinIndex = JoinIndex_; - this.ColliderRadius = ColliderRadius_; - this.Removed = Removed_; - this.Score = Score_; - this.LastMoveGmtMillis = LastMoveGmtMillis_; - this.FramesToRecover = FramesToRecover_; - this.Hp = Hp_; - this.MaxHp = MaxHp_; - this.CharacterState = CharacterState_; - this.InAir = InAir_; - this.Name = Name_; - this.DisplayName = DisplayName_; - this.Avatar = Avatar_; - }); - InputFrameDecoded = $pkg.InputFrameDecoded = $newType(0, $kindStruct, "protos.InputFrameDecoded", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, Dx_, Dy_, BtnALevel_, BtnBLevel_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Dx = 0; - this.Dy = 0; - this.BtnALevel = 0; - this.BtnBLevel = 0; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Dx = Dx_; - this.Dy = Dy_; - this.BtnALevel = BtnALevel_; - this.BtnBLevel = BtnBLevel_; - }); - InputFrameUpsync = $pkg.InputFrameUpsync = $newType(0, $kindStruct, "protos.InputFrameUpsync", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, InputFrameId_, Encoded_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.InputFrameId = 0; - this.Encoded = new $Uint64(0, 0); - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.InputFrameId = InputFrameId_; - this.Encoded = Encoded_; - }); - InputFrameDownsync = $pkg.InputFrameDownsync = $newType(0, $kindStruct, "protos.InputFrameDownsync", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, InputFrameId_, InputList_, ConfirmedList_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.InputFrameId = 0; - this.InputList = sliceType$5.nil; - this.ConfirmedList = new $Uint64(0, 0); - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.InputFrameId = InputFrameId_; - this.InputList = InputList_; - this.ConfirmedList = ConfirmedList_; - }); - HeartbeatUpsync = $pkg.HeartbeatUpsync = $newType(0, $kindStruct, "protos.HeartbeatUpsync", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, ClientTimestamp_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.ClientTimestamp = new $Int64(0, 0); - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.ClientTimestamp = ClientTimestamp_; - }); - WsReq = $pkg.WsReq = $newType(0, $kindStruct, "protos.WsReq", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, MsgId_, PlayerId_, Act_, JoinIndex_, AckingFrameId_, AckingInputFrameId_, InputFrameUpsyncBatch_, Hb_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.MsgId = 0; - this.PlayerId = 0; - this.Act = 0; - this.JoinIndex = 0; - this.AckingFrameId = 0; - this.AckingInputFrameId = 0; - this.InputFrameUpsyncBatch = sliceType$6.nil; - this.Hb = ptrType$4.nil; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.MsgId = MsgId_; - this.PlayerId = PlayerId_; - this.Act = Act_; - this.JoinIndex = JoinIndex_; - this.AckingFrameId = AckingFrameId_; - this.AckingInputFrameId = AckingInputFrameId_; - this.InputFrameUpsyncBatch = InputFrameUpsyncBatch_; - this.Hb = Hb_; - }); - WsResp = $pkg.WsResp = $newType(0, $kindStruct, "protos.WsResp", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, Ret_, EchoedMsgId_, Act_, Rdf_, InputFrameDownsyncBatch_, BciFrame_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Ret = 0; - this.EchoedMsgId = 0; - this.Act = 0; - this.Rdf = ptrType$11.nil; - this.InputFrameDownsyncBatch = sliceType$7.nil; - this.BciFrame = ptrType$10.nil; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Ret = Ret_; - this.EchoedMsgId = EchoedMsgId_; - this.Act = Act_; - this.Rdf = Rdf_; - this.InputFrameDownsyncBatch = InputFrameDownsyncBatch_; - this.BciFrame = BciFrame_; - }); - InputsBufferSnapshot = $pkg.InputsBufferSnapshot = $newType(0, $kindStruct, "protos.InputsBufferSnapshot", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, RefRenderFrameId_, UnconfirmedMask_, ToSendInputFrameDownsyncs_, ShouldForceResync_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.RefRenderFrameId = 0; - this.UnconfirmedMask = new $Uint64(0, 0); - this.ToSendInputFrameDownsyncs = sliceType$7.nil; - this.ShouldForceResync = false; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.RefRenderFrameId = RefRenderFrameId_; - this.UnconfirmedMask = UnconfirmedMask_; - this.ToSendInputFrameDownsyncs = ToSendInputFrameDownsyncs_; - this.ShouldForceResync = ShouldForceResync_; - }); - Barrier = $pkg.Barrier = $newType(0, $kindStruct, "protos.Barrier", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, Boundary_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Boundary = ptrType$12.nil; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Boundary = Boundary_; - }); - MeleeBullet = $pkg.MeleeBullet = $newType(0, $kindStruct, "protos.MeleeBullet", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, BattleLocalId_, StartupFrames_, ActiveFrames_, RecoveryFrames_, RecoveryFramesOnBlock_, RecoveryFramesOnHit_, Moveforward_, HitboxOffset_, HitboxSize_, OriginatedRenderFrameId_, HitStunFrames_, BlockStunFrames_, Pushback_, ReleaseTriggerType_, Damage_, OffenderJoinIndex_, OffenderPlayerId_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.BattleLocalId = 0; - this.StartupFrames = 0; - this.ActiveFrames = 0; - this.RecoveryFrames = 0; - this.RecoveryFramesOnBlock = 0; - this.RecoveryFramesOnHit = 0; - this.Moveforward = ptrType$13.nil; - this.HitboxOffset = 0; - this.HitboxSize = ptrType$13.nil; - this.OriginatedRenderFrameId = 0; - this.HitStunFrames = 0; - this.BlockStunFrames = 0; - this.Pushback = 0; - this.ReleaseTriggerType = 0; - this.Damage = 0; - this.OffenderJoinIndex = 0; - this.OffenderPlayerId = 0; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.BattleLocalId = BattleLocalId_; - this.StartupFrames = StartupFrames_; - this.ActiveFrames = ActiveFrames_; - this.RecoveryFrames = RecoveryFrames_; - this.RecoveryFramesOnBlock = RecoveryFramesOnBlock_; - this.RecoveryFramesOnHit = RecoveryFramesOnHit_; - this.Moveforward = Moveforward_; - this.HitboxOffset = HitboxOffset_; - this.HitboxSize = HitboxSize_; - this.OriginatedRenderFrameId = OriginatedRenderFrameId_; - this.HitStunFrames = HitStunFrames_; - this.BlockStunFrames = BlockStunFrames_; - this.Pushback = Pushback_; - this.ReleaseTriggerType = ReleaseTriggerType_; - this.Damage = Damage_; - this.OffenderJoinIndex = OffenderJoinIndex_; - this.OffenderPlayerId = OffenderPlayerId_; - }); - BattleColliderInfo = $pkg.BattleColliderInfo = $newType(0, $kindStruct, "protos.BattleColliderInfo", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, StageName_, StrToVec2DListMap_, StrToPolygon2DListMap_, StageDiscreteW_, StageDiscreteH_, StageTileW_, StageTileH_, IntervalToPing_, WillKickIfInactiveFor_, BoundRoomId_, BattleDurationFrames_, BattleDurationNanos_, ServerFps_, InputDelayFrames_, InputScaleFrames_, NstDelayFrames_, InputFrameUpsyncDelayTolerance_, MaxChasingRenderFramesPerUpdate_, PlayerBattleState_, RollbackEstimatedDtMillis_, RollbackEstimatedDtNanos_, WorldToVirtualGridRatio_, VirtualGridToWorldRatio_, SpAtkLookupFrames_, RenderCacheSize_, MeleeSkillConfig_, SnapIntoPlatformOverlap_, SnapIntoPlatformThreshold_, JumpingInitVelY_, GravityX_, GravityY_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.StageName = ""; - this.StrToVec2DListMap = false; - this.StrToPolygon2DListMap = false; - this.StageDiscreteW = 0; - this.StageDiscreteH = 0; - this.StageTileW = 0; - this.StageTileH = 0; - this.IntervalToPing = 0; - this.WillKickIfInactiveFor = 0; - this.BoundRoomId = 0; - this.BattleDurationFrames = 0; - this.BattleDurationNanos = new $Int64(0, 0); - this.ServerFps = 0; - this.InputDelayFrames = 0; - this.InputScaleFrames = 0; - this.NstDelayFrames = 0; - this.InputFrameUpsyncDelayTolerance = 0; - this.MaxChasingRenderFramesPerUpdate = 0; - this.PlayerBattleState = 0; - this.RollbackEstimatedDtMillis = 0; - this.RollbackEstimatedDtNanos = new $Int64(0, 0); - this.WorldToVirtualGridRatio = 0; - this.VirtualGridToWorldRatio = 0; - this.SpAtkLookupFrames = 0; - this.RenderCacheSize = 0; - this.MeleeSkillConfig = false; - this.SnapIntoPlatformOverlap = 0; - this.SnapIntoPlatformThreshold = 0; - this.JumpingInitVelY = 0; - this.GravityX = 0; - this.GravityY = 0; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.StageName = StageName_; - this.StrToVec2DListMap = StrToVec2DListMap_; - this.StrToPolygon2DListMap = StrToPolygon2DListMap_; - this.StageDiscreteW = StageDiscreteW_; - this.StageDiscreteH = StageDiscreteH_; - this.StageTileW = StageTileW_; - this.StageTileH = StageTileH_; - this.IntervalToPing = IntervalToPing_; - this.WillKickIfInactiveFor = WillKickIfInactiveFor_; - this.BoundRoomId = BoundRoomId_; - this.BattleDurationFrames = BattleDurationFrames_; - this.BattleDurationNanos = BattleDurationNanos_; - this.ServerFps = ServerFps_; - this.InputDelayFrames = InputDelayFrames_; - this.InputScaleFrames = InputScaleFrames_; - this.NstDelayFrames = NstDelayFrames_; - this.InputFrameUpsyncDelayTolerance = InputFrameUpsyncDelayTolerance_; - this.MaxChasingRenderFramesPerUpdate = MaxChasingRenderFramesPerUpdate_; - this.PlayerBattleState = PlayerBattleState_; - this.RollbackEstimatedDtMillis = RollbackEstimatedDtMillis_; - this.RollbackEstimatedDtNanos = RollbackEstimatedDtNanos_; - this.WorldToVirtualGridRatio = WorldToVirtualGridRatio_; - this.VirtualGridToWorldRatio = VirtualGridToWorldRatio_; - this.SpAtkLookupFrames = SpAtkLookupFrames_; - this.RenderCacheSize = RenderCacheSize_; - this.MeleeSkillConfig = MeleeSkillConfig_; - this.SnapIntoPlatformOverlap = SnapIntoPlatformOverlap_; - this.SnapIntoPlatformThreshold = SnapIntoPlatformThreshold_; - this.JumpingInitVelY = JumpingInitVelY_; - this.GravityX = GravityX_; - this.GravityY = GravityY_; - }); - RoomDownsyncFrame = $pkg.RoomDownsyncFrame = $newType(0, $kindStruct, "protos.RoomDownsyncFrame", true, "jsexport/protos", true, function(state_, sizeCache_, unknownFields_, Id_, PlayersArr_, CountdownNanos_, MeleeBullets_, BackendUnconfirmedMask_, ShouldForceResync_, Players_) { - this.$val = this; - if (arguments.length === 0) { - this.state = new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil); - this.sizeCache = 0; - this.unknownFields = sliceType.nil; - this.Id = 0; - this.PlayersArr = sliceType$8.nil; - this.CountdownNanos = new $Int64(0, 0); - this.MeleeBullets = sliceType$9.nil; - this.BackendUnconfirmedMask = new $Uint64(0, 0); - this.ShouldForceResync = false; - this.Players = false; - return; - } - this.state = state_; - this.sizeCache = sizeCache_; - this.unknownFields = unknownFields_; - this.Id = Id_; - this.PlayersArr = PlayersArr_; - this.CountdownNanos = CountdownNanos_; - this.MeleeBullets = MeleeBullets_; - this.BackendUnconfirmedMask = BackendUnconfirmedMask_; - this.ShouldForceResync = ShouldForceResync_; - this.Players = Players_; - }); - x = $newType(0, $kindStruct, "protos.x", true, "jsexport/protos", false, function() { - this.$val = this; - if (arguments.length === 0) { - return; - } - }); - sliceType = $sliceType($Uint8); - sliceType$1 = $sliceType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - sliceType$2 = $sliceType($emptyInterface); - ptrType = $ptrType(PlayerDownsync); - ptrType$1 = $ptrType(InputFrameDecoded); - ptrType$2 = $ptrType(InputFrameUpsync); - ptrType$3 = $ptrType(InputFrameDownsync); - ptrType$4 = $ptrType(HeartbeatUpsync); - ptrType$5 = $ptrType(WsReq); - ptrType$6 = $ptrType(WsResp); - ptrType$7 = $ptrType(InputsBufferSnapshot); - ptrType$8 = $ptrType(Barrier); - ptrType$9 = $ptrType(MeleeBullet); - ptrType$10 = $ptrType(BattleColliderInfo); - ptrType$11 = $ptrType(RoomDownsyncFrame); - ptrType$12 = $ptrType(sharedprotos.Polygon2D); - ptrType$13 = $ptrType(sharedprotos.Vec2D); - ptrType$14 = $ptrType(sharedprotos.Vec2DList); - ptrType$15 = $ptrType(sharedprotos.Polygon2DList); - sliceType$3 = $sliceType($Int32); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - arrayType$1 = $arrayType(sync.Mutex, 0); - ptrType$16 = $ptrType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - sliceType$4 = $sliceType($Int); - sliceType$5 = $sliceType($Uint64); - sliceType$6 = $sliceType(ptrType$2); - sliceType$7 = $sliceType(ptrType$3); - sliceType$8 = $sliceType(ptrType); - sliceType$9 = $sliceType(ptrType$9); - ptrType$17 = $ptrType($Int32); - ptrType$18 = $ptrType(sliceType); - sliceType$10 = $sliceType($packages["google.golang.org/protobuf/internal/impl"].EnumInfo); - sliceType$11 = $sliceType($packages["google.golang.org/protobuf/internal/impl"].ExtensionInfo); - mapType = $mapType($String, ptrType$14); - mapType$1 = $mapType($String, ptrType$15); - mapType$2 = $mapType($Int32, ptrType$9); - mapType$3 = $mapType($Int32, ptrType); - PlayerDownsync.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - PlayerDownsync.copy(x, new PlayerDownsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 0, 0, 0, false, "", "", "")); - if (false) { - mi = (0 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 0]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - PlayerDownsync.prototype.Reset = function() { return this.$val.Reset(); }; - PlayerDownsync.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: PlayerDownsync.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - PlayerDownsync.prototype.String = function() { return this.$val.String(); }; - PlayerDownsync.ptr.prototype.ProtoMessage = function() { - }; - PlayerDownsync.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - PlayerDownsync.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (0 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 0]); - if (false && !(x === ptrType.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: PlayerDownsync.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - PlayerDownsync.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - PlayerDownsync.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([0])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: PlayerDownsync.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - PlayerDownsync.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - PlayerDownsync.ptr.prototype.GetId = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Id; - } - return 0; - }; - PlayerDownsync.prototype.GetId = function() { return this.$val.GetId(); }; - PlayerDownsync.ptr.prototype.GetVirtualGridX = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.VirtualGridX; - } - return 0; - }; - PlayerDownsync.prototype.GetVirtualGridX = function() { return this.$val.GetVirtualGridX(); }; - PlayerDownsync.ptr.prototype.GetVirtualGridY = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.VirtualGridY; - } - return 0; - }; - PlayerDownsync.prototype.GetVirtualGridY = function() { return this.$val.GetVirtualGridY(); }; - PlayerDownsync.ptr.prototype.GetDirX = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.DirX; - } - return 0; - }; - PlayerDownsync.prototype.GetDirX = function() { return this.$val.GetDirX(); }; - PlayerDownsync.ptr.prototype.GetDirY = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.DirY; - } - return 0; - }; - PlayerDownsync.prototype.GetDirY = function() { return this.$val.GetDirY(); }; - PlayerDownsync.ptr.prototype.GetVelX = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.VelX; - } - return 0; - }; - PlayerDownsync.prototype.GetVelX = function() { return this.$val.GetVelX(); }; - PlayerDownsync.ptr.prototype.GetVelY = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.VelY; - } - return 0; - }; - PlayerDownsync.prototype.GetVelY = function() { return this.$val.GetVelY(); }; - PlayerDownsync.ptr.prototype.GetSpeed = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Speed; - } - return 0; - }; - PlayerDownsync.prototype.GetSpeed = function() { return this.$val.GetSpeed(); }; - PlayerDownsync.ptr.prototype.GetBattleState = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.BattleState; - } - return 0; - }; - PlayerDownsync.prototype.GetBattleState = function() { return this.$val.GetBattleState(); }; - PlayerDownsync.ptr.prototype.GetJoinIndex = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.JoinIndex; - } - return 0; - }; - PlayerDownsync.prototype.GetJoinIndex = function() { return this.$val.GetJoinIndex(); }; - PlayerDownsync.ptr.prototype.GetColliderRadius = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.ColliderRadius; - } - return 0; - }; - PlayerDownsync.prototype.GetColliderRadius = function() { return this.$val.GetColliderRadius(); }; - PlayerDownsync.ptr.prototype.GetRemoved = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Removed; - } - return false; - }; - PlayerDownsync.prototype.GetRemoved = function() { return this.$val.GetRemoved(); }; - PlayerDownsync.ptr.prototype.GetScore = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Score; - } - return 0; - }; - PlayerDownsync.prototype.GetScore = function() { return this.$val.GetScore(); }; - PlayerDownsync.ptr.prototype.GetLastMoveGmtMillis = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.LastMoveGmtMillis; - } - return 0; - }; - PlayerDownsync.prototype.GetLastMoveGmtMillis = function() { return this.$val.GetLastMoveGmtMillis(); }; - PlayerDownsync.ptr.prototype.GetFramesToRecover = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.FramesToRecover; - } - return 0; - }; - PlayerDownsync.prototype.GetFramesToRecover = function() { return this.$val.GetFramesToRecover(); }; - PlayerDownsync.ptr.prototype.GetHp = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Hp; - } - return 0; - }; - PlayerDownsync.prototype.GetHp = function() { return this.$val.GetHp(); }; - PlayerDownsync.ptr.prototype.GetMaxHp = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.MaxHp; - } - return 0; - }; - PlayerDownsync.prototype.GetMaxHp = function() { return this.$val.GetMaxHp(); }; - PlayerDownsync.ptr.prototype.GetCharacterState = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.CharacterState; - } - return 0; - }; - PlayerDownsync.prototype.GetCharacterState = function() { return this.$val.GetCharacterState(); }; - PlayerDownsync.ptr.prototype.GetInAir = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.InAir; - } - return false; - }; - PlayerDownsync.prototype.GetInAir = function() { return this.$val.GetInAir(); }; - PlayerDownsync.ptr.prototype.GetName = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Name; - } - return ""; - }; - PlayerDownsync.prototype.GetName = function() { return this.$val.GetName(); }; - PlayerDownsync.ptr.prototype.GetDisplayName = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.DisplayName; - } - return ""; - }; - PlayerDownsync.prototype.GetDisplayName = function() { return this.$val.GetDisplayName(); }; - PlayerDownsync.ptr.prototype.GetAvatar = function() { - var x; - x = this; - if (!(x === ptrType.nil)) { - return x.Avatar; - } - return ""; - }; - PlayerDownsync.prototype.GetAvatar = function() { return this.$val.GetAvatar(); }; - InputFrameDecoded.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - InputFrameDecoded.copy(x, new InputFrameDecoded.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, 0, 0, 0)); - if (false) { - mi = (1 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 1]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - InputFrameDecoded.prototype.Reset = function() { return this.$val.Reset(); }; - InputFrameDecoded.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameDecoded.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - InputFrameDecoded.prototype.String = function() { return this.$val.String(); }; - InputFrameDecoded.ptr.prototype.ProtoMessage = function() { - }; - InputFrameDecoded.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - InputFrameDecoded.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (1 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 1]); - if (false && !(x === ptrType$1.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameDecoded.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - InputFrameDecoded.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - InputFrameDecoded.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([1])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameDecoded.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - InputFrameDecoded.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - InputFrameDecoded.ptr.prototype.GetDx = function() { - var x; - x = this; - if (!(x === ptrType$1.nil)) { - return x.Dx; - } - return 0; - }; - InputFrameDecoded.prototype.GetDx = function() { return this.$val.GetDx(); }; - InputFrameDecoded.ptr.prototype.GetDy = function() { - var x; - x = this; - if (!(x === ptrType$1.nil)) { - return x.Dy; - } - return 0; - }; - InputFrameDecoded.prototype.GetDy = function() { return this.$val.GetDy(); }; - InputFrameDecoded.ptr.prototype.GetBtnALevel = function() { - var x; - x = this; - if (!(x === ptrType$1.nil)) { - return x.BtnALevel; - } - return 0; - }; - InputFrameDecoded.prototype.GetBtnALevel = function() { return this.$val.GetBtnALevel(); }; - InputFrameDecoded.ptr.prototype.GetBtnBLevel = function() { - var x; - x = this; - if (!(x === ptrType$1.nil)) { - return x.BtnBLevel; - } - return 0; - }; - InputFrameDecoded.prototype.GetBtnBLevel = function() { return this.$val.GetBtnBLevel(); }; - InputFrameUpsync.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - InputFrameUpsync.copy(x, new InputFrameUpsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, new $Uint64(0, 0))); - if (false) { - mi = (2 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 2]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - InputFrameUpsync.prototype.Reset = function() { return this.$val.Reset(); }; - InputFrameUpsync.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameUpsync.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - InputFrameUpsync.prototype.String = function() { return this.$val.String(); }; - InputFrameUpsync.ptr.prototype.ProtoMessage = function() { - }; - InputFrameUpsync.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - InputFrameUpsync.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (2 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 2]); - if (false && !(x === ptrType$2.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameUpsync.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - InputFrameUpsync.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - InputFrameUpsync.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([2])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameUpsync.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - InputFrameUpsync.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - InputFrameUpsync.ptr.prototype.GetInputFrameId = function() { - var x; - x = this; - if (!(x === ptrType$2.nil)) { - return x.InputFrameId; - } - return 0; - }; - InputFrameUpsync.prototype.GetInputFrameId = function() { return this.$val.GetInputFrameId(); }; - InputFrameUpsync.ptr.prototype.GetEncoded = function() { - var x; - x = this; - if (!(x === ptrType$2.nil)) { - return x.Encoded; - } - return new $Uint64(0, 0); - }; - InputFrameUpsync.prototype.GetEncoded = function() { return this.$val.GetEncoded(); }; - InputFrameDownsync.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - InputFrameDownsync.copy(x, new InputFrameDownsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, sliceType$5.nil, new $Uint64(0, 0))); - if (false) { - mi = (3 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 3]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - InputFrameDownsync.prototype.Reset = function() { return this.$val.Reset(); }; - InputFrameDownsync.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameDownsync.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - InputFrameDownsync.prototype.String = function() { return this.$val.String(); }; - InputFrameDownsync.ptr.prototype.ProtoMessage = function() { - }; - InputFrameDownsync.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - InputFrameDownsync.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (3 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 3]); - if (false && !(x === ptrType$3.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameDownsync.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - InputFrameDownsync.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - InputFrameDownsync.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([3])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputFrameDownsync.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - InputFrameDownsync.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - InputFrameDownsync.ptr.prototype.GetInputFrameId = function() { - var x; - x = this; - if (!(x === ptrType$3.nil)) { - return x.InputFrameId; - } - return 0; - }; - InputFrameDownsync.prototype.GetInputFrameId = function() { return this.$val.GetInputFrameId(); }; - InputFrameDownsync.ptr.prototype.GetInputList = function() { - var x; - x = this; - if (!(x === ptrType$3.nil)) { - return x.InputList; - } - return sliceType$5.nil; - }; - InputFrameDownsync.prototype.GetInputList = function() { return this.$val.GetInputList(); }; - InputFrameDownsync.ptr.prototype.GetConfirmedList = function() { - var x; - x = this; - if (!(x === ptrType$3.nil)) { - return x.ConfirmedList; - } - return new $Uint64(0, 0); - }; - InputFrameDownsync.prototype.GetConfirmedList = function() { return this.$val.GetConfirmedList(); }; - HeartbeatUpsync.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - HeartbeatUpsync.copy(x, new HeartbeatUpsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, new $Int64(0, 0))); - if (false) { - mi = (4 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 4]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - HeartbeatUpsync.prototype.Reset = function() { return this.$val.Reset(); }; - HeartbeatUpsync.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: HeartbeatUpsync.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - HeartbeatUpsync.prototype.String = function() { return this.$val.String(); }; - HeartbeatUpsync.ptr.prototype.ProtoMessage = function() { - }; - HeartbeatUpsync.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - HeartbeatUpsync.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (4 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 4]); - if (false && !(x === ptrType$4.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: HeartbeatUpsync.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - HeartbeatUpsync.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - HeartbeatUpsync.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([4])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: HeartbeatUpsync.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - HeartbeatUpsync.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - HeartbeatUpsync.ptr.prototype.GetClientTimestamp = function() { - var x; - x = this; - if (!(x === ptrType$4.nil)) { - return x.ClientTimestamp; - } - return new $Int64(0, 0); - }; - HeartbeatUpsync.prototype.GetClientTimestamp = function() { return this.$val.GetClientTimestamp(); }; - WsReq.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - WsReq.copy(x, new WsReq.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, 0, 0, 0, 0, 0, sliceType$6.nil, ptrType$4.nil)); - if (false) { - mi = (5 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 5]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - WsReq.prototype.Reset = function() { return this.$val.Reset(); }; - WsReq.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: WsReq.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - WsReq.prototype.String = function() { return this.$val.String(); }; - WsReq.ptr.prototype.ProtoMessage = function() { - }; - WsReq.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - WsReq.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (5 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 5]); - if (false && !(x === ptrType$5.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: WsReq.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - WsReq.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - WsReq.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([5])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: WsReq.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - WsReq.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - WsReq.ptr.prototype.GetMsgId = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.MsgId; - } - return 0; - }; - WsReq.prototype.GetMsgId = function() { return this.$val.GetMsgId(); }; - WsReq.ptr.prototype.GetPlayerId = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.PlayerId; - } - return 0; - }; - WsReq.prototype.GetPlayerId = function() { return this.$val.GetPlayerId(); }; - WsReq.ptr.prototype.GetAct = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.Act; - } - return 0; - }; - WsReq.prototype.GetAct = function() { return this.$val.GetAct(); }; - WsReq.ptr.prototype.GetJoinIndex = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.JoinIndex; - } - return 0; - }; - WsReq.prototype.GetJoinIndex = function() { return this.$val.GetJoinIndex(); }; - WsReq.ptr.prototype.GetAckingFrameId = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.AckingFrameId; - } - return 0; - }; - WsReq.prototype.GetAckingFrameId = function() { return this.$val.GetAckingFrameId(); }; - WsReq.ptr.prototype.GetAckingInputFrameId = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.AckingInputFrameId; - } - return 0; - }; - WsReq.prototype.GetAckingInputFrameId = function() { return this.$val.GetAckingInputFrameId(); }; - WsReq.ptr.prototype.GetInputFrameUpsyncBatch = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.InputFrameUpsyncBatch; - } - return sliceType$6.nil; - }; - WsReq.prototype.GetInputFrameUpsyncBatch = function() { return this.$val.GetInputFrameUpsyncBatch(); }; - WsReq.ptr.prototype.GetHb = function() { - var x; - x = this; - if (!(x === ptrType$5.nil)) { - return x.Hb; - } - return ptrType$4.nil; - }; - WsReq.prototype.GetHb = function() { return this.$val.GetHb(); }; - WsResp.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - WsResp.copy(x, new WsResp.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, 0, 0, ptrType$11.nil, sliceType$7.nil, ptrType$10.nil)); - if (false) { - mi = (6 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 6]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - WsResp.prototype.Reset = function() { return this.$val.Reset(); }; - WsResp.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: WsResp.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - WsResp.prototype.String = function() { return this.$val.String(); }; - WsResp.ptr.prototype.ProtoMessage = function() { - }; - WsResp.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - WsResp.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (6 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 6]); - if (false && !(x === ptrType$6.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: WsResp.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - WsResp.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - WsResp.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([6])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: WsResp.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - WsResp.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - WsResp.ptr.prototype.GetRet = function() { - var x; - x = this; - if (!(x === ptrType$6.nil)) { - return x.Ret; - } - return 0; - }; - WsResp.prototype.GetRet = function() { return this.$val.GetRet(); }; - WsResp.ptr.prototype.GetEchoedMsgId = function() { - var x; - x = this; - if (!(x === ptrType$6.nil)) { - return x.EchoedMsgId; - } - return 0; - }; - WsResp.prototype.GetEchoedMsgId = function() { return this.$val.GetEchoedMsgId(); }; - WsResp.ptr.prototype.GetAct = function() { - var x; - x = this; - if (!(x === ptrType$6.nil)) { - return x.Act; - } - return 0; - }; - WsResp.prototype.GetAct = function() { return this.$val.GetAct(); }; - WsResp.ptr.prototype.GetRdf = function() { - var x; - x = this; - if (!(x === ptrType$6.nil)) { - return x.Rdf; - } - return ptrType$11.nil; - }; - WsResp.prototype.GetRdf = function() { return this.$val.GetRdf(); }; - WsResp.ptr.prototype.GetInputFrameDownsyncBatch = function() { - var x; - x = this; - if (!(x === ptrType$6.nil)) { - return x.InputFrameDownsyncBatch; - } - return sliceType$7.nil; - }; - WsResp.prototype.GetInputFrameDownsyncBatch = function() { return this.$val.GetInputFrameDownsyncBatch(); }; - WsResp.ptr.prototype.GetBciFrame = function() { - var x; - x = this; - if (!(x === ptrType$6.nil)) { - return x.BciFrame; - } - return ptrType$10.nil; - }; - WsResp.prototype.GetBciFrame = function() { return this.$val.GetBciFrame(); }; - InputsBufferSnapshot.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - InputsBufferSnapshot.copy(x, new InputsBufferSnapshot.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, new $Uint64(0, 0), sliceType$7.nil, false)); - if (false) { - mi = (7 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 7]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - InputsBufferSnapshot.prototype.Reset = function() { return this.$val.Reset(); }; - InputsBufferSnapshot.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputsBufferSnapshot.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - InputsBufferSnapshot.prototype.String = function() { return this.$val.String(); }; - InputsBufferSnapshot.ptr.prototype.ProtoMessage = function() { - }; - InputsBufferSnapshot.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - InputsBufferSnapshot.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (7 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 7]); - if (false && !(x === ptrType$7.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputsBufferSnapshot.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - InputsBufferSnapshot.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - InputsBufferSnapshot.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([7])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: InputsBufferSnapshot.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - InputsBufferSnapshot.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - InputsBufferSnapshot.ptr.prototype.GetRefRenderFrameId = function() { - var x; - x = this; - if (!(x === ptrType$7.nil)) { - return x.RefRenderFrameId; - } - return 0; - }; - InputsBufferSnapshot.prototype.GetRefRenderFrameId = function() { return this.$val.GetRefRenderFrameId(); }; - InputsBufferSnapshot.ptr.prototype.GetUnconfirmedMask = function() { - var x; - x = this; - if (!(x === ptrType$7.nil)) { - return x.UnconfirmedMask; - } - return new $Uint64(0, 0); - }; - InputsBufferSnapshot.prototype.GetUnconfirmedMask = function() { return this.$val.GetUnconfirmedMask(); }; - InputsBufferSnapshot.ptr.prototype.GetToSendInputFrameDownsyncs = function() { - var x; - x = this; - if (!(x === ptrType$7.nil)) { - return x.ToSendInputFrameDownsyncs; - } - return sliceType$7.nil; - }; - InputsBufferSnapshot.prototype.GetToSendInputFrameDownsyncs = function() { return this.$val.GetToSendInputFrameDownsyncs(); }; - InputsBufferSnapshot.ptr.prototype.GetShouldForceResync = function() { - var x; - x = this; - if (!(x === ptrType$7.nil)) { - return x.ShouldForceResync; - } - return false; - }; - InputsBufferSnapshot.prototype.GetShouldForceResync = function() { return this.$val.GetShouldForceResync(); }; - Barrier.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - Barrier.copy(x, new Barrier.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, ptrType$12.nil)); - if (false) { - mi = (8 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 8]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - Barrier.prototype.Reset = function() { return this.$val.Reset(); }; - Barrier.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Barrier.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - Barrier.prototype.String = function() { return this.$val.String(); }; - Barrier.ptr.prototype.ProtoMessage = function() { - }; - Barrier.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - Barrier.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (8 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 8]); - if (false && !(x === ptrType$8.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Barrier.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - Barrier.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - Barrier.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([8])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: Barrier.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - Barrier.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - Barrier.ptr.prototype.GetBoundary = function() { - var x; - x = this; - if (!(x === ptrType$8.nil)) { - return x.Boundary; - } - return ptrType$12.nil; - }; - Barrier.prototype.GetBoundary = function() { return this.$val.GetBoundary(); }; - MeleeBullet.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - MeleeBullet.copy(x, new MeleeBullet.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, 0, 0, 0, 0, 0, ptrType$13.nil, 0, ptrType$13.nil, 0, 0, 0, 0, 0, 0, 0, 0)); - if (false) { - mi = (9 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 9]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - MeleeBullet.prototype.Reset = function() { return this.$val.Reset(); }; - MeleeBullet.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MeleeBullet.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - MeleeBullet.prototype.String = function() { return this.$val.String(); }; - MeleeBullet.ptr.prototype.ProtoMessage = function() { - }; - MeleeBullet.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - MeleeBullet.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (9 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 9]); - if (false && !(x === ptrType$9.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MeleeBullet.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - MeleeBullet.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - MeleeBullet.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([9])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: MeleeBullet.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - MeleeBullet.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - MeleeBullet.ptr.prototype.GetBattleLocalId = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.BattleLocalId; - } - return 0; - }; - MeleeBullet.prototype.GetBattleLocalId = function() { return this.$val.GetBattleLocalId(); }; - MeleeBullet.ptr.prototype.GetStartupFrames = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.StartupFrames; - } - return 0; - }; - MeleeBullet.prototype.GetStartupFrames = function() { return this.$val.GetStartupFrames(); }; - MeleeBullet.ptr.prototype.GetActiveFrames = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.ActiveFrames; - } - return 0; - }; - MeleeBullet.prototype.GetActiveFrames = function() { return this.$val.GetActiveFrames(); }; - MeleeBullet.ptr.prototype.GetRecoveryFrames = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.RecoveryFrames; - } - return 0; - }; - MeleeBullet.prototype.GetRecoveryFrames = function() { return this.$val.GetRecoveryFrames(); }; - MeleeBullet.ptr.prototype.GetRecoveryFramesOnBlock = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.RecoveryFramesOnBlock; - } - return 0; - }; - MeleeBullet.prototype.GetRecoveryFramesOnBlock = function() { return this.$val.GetRecoveryFramesOnBlock(); }; - MeleeBullet.ptr.prototype.GetRecoveryFramesOnHit = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.RecoveryFramesOnHit; - } - return 0; - }; - MeleeBullet.prototype.GetRecoveryFramesOnHit = function() { return this.$val.GetRecoveryFramesOnHit(); }; - MeleeBullet.ptr.prototype.GetMoveforward = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.Moveforward; - } - return ptrType$13.nil; - }; - MeleeBullet.prototype.GetMoveforward = function() { return this.$val.GetMoveforward(); }; - MeleeBullet.ptr.prototype.GetHitboxOffset = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.HitboxOffset; - } - return 0; - }; - MeleeBullet.prototype.GetHitboxOffset = function() { return this.$val.GetHitboxOffset(); }; - MeleeBullet.ptr.prototype.GetHitboxSize = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.HitboxSize; - } - return ptrType$13.nil; - }; - MeleeBullet.prototype.GetHitboxSize = function() { return this.$val.GetHitboxSize(); }; - MeleeBullet.ptr.prototype.GetOriginatedRenderFrameId = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.OriginatedRenderFrameId; - } - return 0; - }; - MeleeBullet.prototype.GetOriginatedRenderFrameId = function() { return this.$val.GetOriginatedRenderFrameId(); }; - MeleeBullet.ptr.prototype.GetHitStunFrames = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.HitStunFrames; - } - return 0; - }; - MeleeBullet.prototype.GetHitStunFrames = function() { return this.$val.GetHitStunFrames(); }; - MeleeBullet.ptr.prototype.GetBlockStunFrames = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.BlockStunFrames; - } - return 0; - }; - MeleeBullet.prototype.GetBlockStunFrames = function() { return this.$val.GetBlockStunFrames(); }; - MeleeBullet.ptr.prototype.GetPushback = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.Pushback; - } - return 0; - }; - MeleeBullet.prototype.GetPushback = function() { return this.$val.GetPushback(); }; - MeleeBullet.ptr.prototype.GetReleaseTriggerType = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.ReleaseTriggerType; - } - return 0; - }; - MeleeBullet.prototype.GetReleaseTriggerType = function() { return this.$val.GetReleaseTriggerType(); }; - MeleeBullet.ptr.prototype.GetDamage = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.Damage; - } - return 0; - }; - MeleeBullet.prototype.GetDamage = function() { return this.$val.GetDamage(); }; - MeleeBullet.ptr.prototype.GetOffenderJoinIndex = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.OffenderJoinIndex; - } - return 0; - }; - MeleeBullet.prototype.GetOffenderJoinIndex = function() { return this.$val.GetOffenderJoinIndex(); }; - MeleeBullet.ptr.prototype.GetOffenderPlayerId = function() { - var x; - x = this; - if (!(x === ptrType$9.nil)) { - return x.OffenderPlayerId; - } - return 0; - }; - MeleeBullet.prototype.GetOffenderPlayerId = function() { return this.$val.GetOffenderPlayerId(); }; - BattleColliderInfo.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - BattleColliderInfo.copy(x, new BattleColliderInfo.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, "", false, false, 0, 0, 0, 0, 0, 0, 0, 0, new $Int64(0, 0), 0, 0, 0, 0, 0, 0, 0, 0, new $Int64(0, 0), 0, 0, 0, 0, false, 0, 0, 0, 0, 0)); - if (false) { - mi = (10 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 10]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - BattleColliderInfo.prototype.Reset = function() { return this.$val.Reset(); }; - BattleColliderInfo.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: BattleColliderInfo.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - BattleColliderInfo.prototype.String = function() { return this.$val.String(); }; - BattleColliderInfo.ptr.prototype.ProtoMessage = function() { - }; - BattleColliderInfo.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - BattleColliderInfo.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (10 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 10]); - if (false && !(x === ptrType$10.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: BattleColliderInfo.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - BattleColliderInfo.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - BattleColliderInfo.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([10])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: BattleColliderInfo.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - BattleColliderInfo.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - BattleColliderInfo.ptr.prototype.GetStageName = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StageName; - } - return ""; - }; - BattleColliderInfo.prototype.GetStageName = function() { return this.$val.GetStageName(); }; - BattleColliderInfo.ptr.prototype.GetStrToVec2DListMap = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StrToVec2DListMap; - } - return false; - }; - BattleColliderInfo.prototype.GetStrToVec2DListMap = function() { return this.$val.GetStrToVec2DListMap(); }; - BattleColliderInfo.ptr.prototype.GetStrToPolygon2DListMap = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StrToPolygon2DListMap; - } - return false; - }; - BattleColliderInfo.prototype.GetStrToPolygon2DListMap = function() { return this.$val.GetStrToPolygon2DListMap(); }; - BattleColliderInfo.ptr.prototype.GetStageDiscreteW = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StageDiscreteW; - } - return 0; - }; - BattleColliderInfo.prototype.GetStageDiscreteW = function() { return this.$val.GetStageDiscreteW(); }; - BattleColliderInfo.ptr.prototype.GetStageDiscreteH = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StageDiscreteH; - } - return 0; - }; - BattleColliderInfo.prototype.GetStageDiscreteH = function() { return this.$val.GetStageDiscreteH(); }; - BattleColliderInfo.ptr.prototype.GetStageTileW = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StageTileW; - } - return 0; - }; - BattleColliderInfo.prototype.GetStageTileW = function() { return this.$val.GetStageTileW(); }; - BattleColliderInfo.ptr.prototype.GetStageTileH = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.StageTileH; - } - return 0; - }; - BattleColliderInfo.prototype.GetStageTileH = function() { return this.$val.GetStageTileH(); }; - BattleColliderInfo.ptr.prototype.GetIntervalToPing = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.IntervalToPing; - } - return 0; - }; - BattleColliderInfo.prototype.GetIntervalToPing = function() { return this.$val.GetIntervalToPing(); }; - BattleColliderInfo.ptr.prototype.GetWillKickIfInactiveFor = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.WillKickIfInactiveFor; - } - return 0; - }; - BattleColliderInfo.prototype.GetWillKickIfInactiveFor = function() { return this.$val.GetWillKickIfInactiveFor(); }; - BattleColliderInfo.ptr.prototype.GetBoundRoomId = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.BoundRoomId; - } - return 0; - }; - BattleColliderInfo.prototype.GetBoundRoomId = function() { return this.$val.GetBoundRoomId(); }; - BattleColliderInfo.ptr.prototype.GetBattleDurationFrames = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.BattleDurationFrames; - } - return 0; - }; - BattleColliderInfo.prototype.GetBattleDurationFrames = function() { return this.$val.GetBattleDurationFrames(); }; - BattleColliderInfo.ptr.prototype.GetBattleDurationNanos = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.BattleDurationNanos; - } - return new $Int64(0, 0); - }; - BattleColliderInfo.prototype.GetBattleDurationNanos = function() { return this.$val.GetBattleDurationNanos(); }; - BattleColliderInfo.ptr.prototype.GetServerFps = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.ServerFps; - } - return 0; - }; - BattleColliderInfo.prototype.GetServerFps = function() { return this.$val.GetServerFps(); }; - BattleColliderInfo.ptr.prototype.GetInputDelayFrames = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.InputDelayFrames; - } - return 0; - }; - BattleColliderInfo.prototype.GetInputDelayFrames = function() { return this.$val.GetInputDelayFrames(); }; - BattleColliderInfo.ptr.prototype.GetInputScaleFrames = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.InputScaleFrames; - } - return 0; - }; - BattleColliderInfo.prototype.GetInputScaleFrames = function() { return this.$val.GetInputScaleFrames(); }; - BattleColliderInfo.ptr.prototype.GetNstDelayFrames = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.NstDelayFrames; - } - return 0; - }; - BattleColliderInfo.prototype.GetNstDelayFrames = function() { return this.$val.GetNstDelayFrames(); }; - BattleColliderInfo.ptr.prototype.GetInputFrameUpsyncDelayTolerance = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.InputFrameUpsyncDelayTolerance; - } - return 0; - }; - BattleColliderInfo.prototype.GetInputFrameUpsyncDelayTolerance = function() { return this.$val.GetInputFrameUpsyncDelayTolerance(); }; - BattleColliderInfo.ptr.prototype.GetMaxChasingRenderFramesPerUpdate = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.MaxChasingRenderFramesPerUpdate; - } - return 0; - }; - BattleColliderInfo.prototype.GetMaxChasingRenderFramesPerUpdate = function() { return this.$val.GetMaxChasingRenderFramesPerUpdate(); }; - BattleColliderInfo.ptr.prototype.GetPlayerBattleState = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.PlayerBattleState; - } - return 0; - }; - BattleColliderInfo.prototype.GetPlayerBattleState = function() { return this.$val.GetPlayerBattleState(); }; - BattleColliderInfo.ptr.prototype.GetRollbackEstimatedDtMillis = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.RollbackEstimatedDtMillis; - } - return 0; - }; - BattleColliderInfo.prototype.GetRollbackEstimatedDtMillis = function() { return this.$val.GetRollbackEstimatedDtMillis(); }; - BattleColliderInfo.ptr.prototype.GetRollbackEstimatedDtNanos = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.RollbackEstimatedDtNanos; - } - return new $Int64(0, 0); - }; - BattleColliderInfo.prototype.GetRollbackEstimatedDtNanos = function() { return this.$val.GetRollbackEstimatedDtNanos(); }; - BattleColliderInfo.ptr.prototype.GetWorldToVirtualGridRatio = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.WorldToVirtualGridRatio; - } - return 0; - }; - BattleColliderInfo.prototype.GetWorldToVirtualGridRatio = function() { return this.$val.GetWorldToVirtualGridRatio(); }; - BattleColliderInfo.ptr.prototype.GetVirtualGridToWorldRatio = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.VirtualGridToWorldRatio; - } - return 0; - }; - BattleColliderInfo.prototype.GetVirtualGridToWorldRatio = function() { return this.$val.GetVirtualGridToWorldRatio(); }; - BattleColliderInfo.ptr.prototype.GetSpAtkLookupFrames = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.SpAtkLookupFrames; - } - return 0; - }; - BattleColliderInfo.prototype.GetSpAtkLookupFrames = function() { return this.$val.GetSpAtkLookupFrames(); }; - BattleColliderInfo.ptr.prototype.GetRenderCacheSize = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.RenderCacheSize; - } - return 0; - }; - BattleColliderInfo.prototype.GetRenderCacheSize = function() { return this.$val.GetRenderCacheSize(); }; - BattleColliderInfo.ptr.prototype.GetMeleeSkillConfig = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.MeleeSkillConfig; - } - return false; - }; - BattleColliderInfo.prototype.GetMeleeSkillConfig = function() { return this.$val.GetMeleeSkillConfig(); }; - BattleColliderInfo.ptr.prototype.GetSnapIntoPlatformOverlap = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.SnapIntoPlatformOverlap; - } - return 0; - }; - BattleColliderInfo.prototype.GetSnapIntoPlatformOverlap = function() { return this.$val.GetSnapIntoPlatformOverlap(); }; - BattleColliderInfo.ptr.prototype.GetSnapIntoPlatformThreshold = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.SnapIntoPlatformThreshold; - } - return 0; - }; - BattleColliderInfo.prototype.GetSnapIntoPlatformThreshold = function() { return this.$val.GetSnapIntoPlatformThreshold(); }; - BattleColliderInfo.ptr.prototype.GetJumpingInitVelY = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.JumpingInitVelY; - } - return 0; - }; - BattleColliderInfo.prototype.GetJumpingInitVelY = function() { return this.$val.GetJumpingInitVelY(); }; - BattleColliderInfo.ptr.prototype.GetGravityX = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.GravityX; - } - return 0; - }; - BattleColliderInfo.prototype.GetGravityX = function() { return this.$val.GetGravityX(); }; - BattleColliderInfo.ptr.prototype.GetGravityY = function() { - var x; - x = this; - if (!(x === ptrType$10.nil)) { - return x.GravityY; - } - return 0; - }; - BattleColliderInfo.prototype.GetGravityY = function() { return this.$val.GetGravityY(); }; - RoomDownsyncFrame.ptr.prototype.Reset = function() { - var mi, ms, x; - x = this; - RoomDownsyncFrame.copy(x, new RoomDownsyncFrame.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType$16.nil), 0, sliceType.nil, 0, sliceType$8.nil, new $Int64(0, 0), sliceType$9.nil, new $Uint64(0, 0), false, false)); - if (false) { - mi = (11 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 11]); - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - ms.StoreMessageInfo(mi); - } - }; - RoomDownsyncFrame.prototype.Reset = function() { return this.$val.Reset(); }; - RoomDownsyncFrame.ptr.prototype.String = function() { - var {$24r, _r, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStringOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: RoomDownsyncFrame.ptr.prototype.String, $c: true, $r, $24r, _r, x, $s};return $f; - }; - RoomDownsyncFrame.prototype.String = function() { return this.$val.String(); }; - RoomDownsyncFrame.ptr.prototype.ProtoMessage = function() { - }; - RoomDownsyncFrame.prototype.ProtoMessage = function() { return this.$val.ProtoMessage(); }; - RoomDownsyncFrame.ptr.prototype.ProtoReflect = function() { - var {$24r, _r, mi, ms, x, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - x = this; - mi = (11 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 11]); - if (false && !(x === ptrType$11.nil)) { - ms = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).MessageStateOf((x)); - if (ms.LoadMessageInfo() === ptrType$16.nil) { - ms.StoreMessageInfo(mi); - } - $s = -1; return ms; - } - _r = mi.MessageOf(x); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: RoomDownsyncFrame.ptr.prototype.ProtoReflect, $c: true, $r, $24r, _r, mi, ms, x, $s};return $f; - }; - RoomDownsyncFrame.prototype.ProtoReflect = function() { return this.$val.ProtoReflect(); }; - RoomDownsyncFrame.ptr.prototype.Descriptor = function() { - var {$24r, _r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = file_room_downsync_frame_proto_rawDescGZIP(); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = [_r, new sliceType$4([11])]; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: RoomDownsyncFrame.ptr.prototype.Descriptor, $c: true, $r, $24r, _r, $s};return $f; - }; - RoomDownsyncFrame.prototype.Descriptor = function() { return this.$val.Descriptor(); }; - RoomDownsyncFrame.ptr.prototype.GetId = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.Id; - } - return 0; - }; - RoomDownsyncFrame.prototype.GetId = function() { return this.$val.GetId(); }; - RoomDownsyncFrame.ptr.prototype.GetPlayersArr = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.PlayersArr; - } - return sliceType$8.nil; - }; - RoomDownsyncFrame.prototype.GetPlayersArr = function() { return this.$val.GetPlayersArr(); }; - RoomDownsyncFrame.ptr.prototype.GetCountdownNanos = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.CountdownNanos; - } - return new $Int64(0, 0); - }; - RoomDownsyncFrame.prototype.GetCountdownNanos = function() { return this.$val.GetCountdownNanos(); }; - RoomDownsyncFrame.ptr.prototype.GetMeleeBullets = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.MeleeBullets; - } - return sliceType$9.nil; - }; - RoomDownsyncFrame.prototype.GetMeleeBullets = function() { return this.$val.GetMeleeBullets(); }; - RoomDownsyncFrame.ptr.prototype.GetBackendUnconfirmedMask = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.BackendUnconfirmedMask; - } - return new $Uint64(0, 0); - }; - RoomDownsyncFrame.prototype.GetBackendUnconfirmedMask = function() { return this.$val.GetBackendUnconfirmedMask(); }; - RoomDownsyncFrame.ptr.prototype.GetShouldForceResync = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.ShouldForceResync; - } - return false; - }; - RoomDownsyncFrame.prototype.GetShouldForceResync = function() { return this.$val.GetShouldForceResync(); }; - RoomDownsyncFrame.ptr.prototype.GetPlayers = function() { - var x; - x = this; - if (!(x === ptrType$11.nil)) { - return x.Players; - } - return false; - }; - RoomDownsyncFrame.prototype.GetPlayers = function() { return this.$val.GetPlayers(); }; - file_room_downsync_frame_proto_rawDescGZIP = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = file_room_downsync_frame_proto_rawDescOnce.Do((function $b() { - var {_r, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = $clone(protoimpl.X, $packages["google.golang.org/protobuf/internal/impl"].Export).CompressGZIP(file_room_downsync_frame_proto_rawDescData); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - file_room_downsync_frame_proto_rawDescData = _r; - $s = -1; return; - /* */ } return; } var $f = {$blk: $b, $c: true, $r, _r, $s};return $f; - })); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return file_room_downsync_frame_proto_rawDescData; - /* */ } return; } var $f = {$blk: file_room_downsync_frame_proto_rawDescGZIP, $c: true, $r, $s};return $f; - }; - init = function() { - var {$s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - $r = file_room_downsync_frame_proto_init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $s = -1; return; - /* */ } return; } var $f = {$blk: init, $c: true, $r, $s};return $f; - }; - file_room_downsync_frame_proto_init = function() { - var {_r, _r$1, out, x$1, $s, $r, $c} = $restore(this, {}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - if (!($interfaceIsEqual($pkg.File_room_downsync_frame_proto, $ifaceNil))) { - $s = -1; return; - } - /* */ if (true) { $s = 1; continue; } - /* */ $s = 2; continue; - /* if (true) { */ case 1: - (0 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 0]).Exporter = (function(v, i) { - var _1, i, v, v$1; - v$1 = $assertType(v, ptrType); - _1 = i; - if (_1 === (0)) { - return v$1.state; - } else if (_1 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_1 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (1 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 1]).Exporter = (function(v, i) { - var _2, i, v, v$1; - v$1 = $assertType(v, ptrType$1); - _2 = i; - if (_2 === (0)) { - return v$1.state; - } else if (_2 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_2 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (2 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 2]).Exporter = (function(v, i) { - var _3, i, v, v$1; - v$1 = $assertType(v, ptrType$2); - _3 = i; - if (_3 === (0)) { - return v$1.state; - } else if (_3 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_3 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (3 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 3]).Exporter = (function(v, i) { - var _4, i, v, v$1; - v$1 = $assertType(v, ptrType$3); - _4 = i; - if (_4 === (0)) { - return v$1.state; - } else if (_4 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_4 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (4 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 4]).Exporter = (function(v, i) { - var _5, i, v, v$1; - v$1 = $assertType(v, ptrType$4); - _5 = i; - if (_5 === (0)) { - return v$1.state; - } else if (_5 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_5 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (5 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 5]).Exporter = (function(v, i) { - var _6, i, v, v$1; - v$1 = $assertType(v, ptrType$5); - _6 = i; - if (_6 === (0)) { - return v$1.state; - } else if (_6 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_6 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (6 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 6]).Exporter = (function(v, i) { - var _7, i, v, v$1; - v$1 = $assertType(v, ptrType$6); - _7 = i; - if (_7 === (0)) { - return v$1.state; - } else if (_7 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_7 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (7 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 7]).Exporter = (function(v, i) { - var _8, i, v, v$1; - v$1 = $assertType(v, ptrType$7); - _8 = i; - if (_8 === (0)) { - return v$1.state; - } else if (_8 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_8 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (8 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 8]).Exporter = (function(v, i) { - var _9, i, v, v$1; - v$1 = $assertType(v, ptrType$8); - _9 = i; - if (_9 === (0)) { - return v$1.state; - } else if (_9 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_9 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (9 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 9]).Exporter = (function(v, i) { - var _10, i, v, v$1; - v$1 = $assertType(v, ptrType$9); - _10 = i; - if (_10 === (0)) { - return v$1.state; - } else if (_10 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_10 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (10 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 10]).Exporter = (function(v, i) { - var _11, i, v, v$1; - v$1 = $assertType(v, ptrType$10); - _11 = i; - if (_11 === (0)) { - return v$1.state; - } else if (_11 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_11 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - (11 >= file_room_downsync_frame_proto_msgTypes.$length ? ($throwRuntimeError("index out of range"), undefined) : file_room_downsync_frame_proto_msgTypes.$array[file_room_downsync_frame_proto_msgTypes.$offset + 11]).Exporter = (function(v, i) { - var _12, i, v, v$1; - v$1 = $assertType(v, ptrType$11); - _12 = i; - if (_12 === (0)) { - return v$1.state; - } else if (_12 === (1)) { - return (v$1.$ptr_sizeCache || (v$1.$ptr_sizeCache = new ptrType$17(function() { return this.$target.sizeCache; }, function($v) { this.$target.sizeCache = $v; }, v$1))); - } else if (_12 === (2)) { - return (v$1.$ptr_unknownFields || (v$1.$ptr_unknownFields = new ptrType$18(function() { return this.$target.unknownFields; }, function($v) { this.$target.unknownFields = $v; }, v$1))); - } else { - return $ifaceNil; - } - }); - /* } */ case 2: - _r = reflect.TypeOf((x$1 = new x.ptr(), new x$1.constructor.elem(x$1))).PkgPath(); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = new $packages["google.golang.org/protobuf/internal/filetype"].Builder.ptr(new $packages["google.golang.org/protobuf/internal/filedesc"].Builder.ptr(_r, file_room_downsync_frame_proto_rawDesc, 0, 16, 0, 0, $ifaceNil, $ifaceNil), file_room_downsync_frame_proto_goTypes, file_room_downsync_frame_proto_depIdxs, sliceType$10.nil, file_room_downsync_frame_proto_msgTypes, sliceType$11.nil, $ifaceNil).Build(); /* */ $s = 4; case 4: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - out = $clone(_r$1, $packages["google.golang.org/protobuf/internal/filetype"].Out); - $pkg.File_room_downsync_frame_proto = out.File; - file_room_downsync_frame_proto_rawDesc = sliceType.nil; - file_room_downsync_frame_proto_goTypes = sliceType$2.nil; - file_room_downsync_frame_proto_depIdxs = sliceType$3.nil; - $s = -1; return; - /* */ } return; } var $f = {$blk: file_room_downsync_frame_proto_init, $c: true, $r, _r, _r$1, out, x$1, $s};return $f; - }; - ptrType.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetId", name: "GetId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetVirtualGridX", name: "GetVirtualGridX", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetVirtualGridY", name: "GetVirtualGridY", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetDirX", name: "GetDirX", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetDirY", name: "GetDirY", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetVelX", name: "GetVelX", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetVelY", name: "GetVelY", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetSpeed", name: "GetSpeed", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBattleState", name: "GetBattleState", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetJoinIndex", name: "GetJoinIndex", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetColliderRadius", name: "GetColliderRadius", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetRemoved", name: "GetRemoved", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetScore", name: "GetScore", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetLastMoveGmtMillis", name: "GetLastMoveGmtMillis", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetFramesToRecover", name: "GetFramesToRecover", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetHp", name: "GetHp", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetMaxHp", name: "GetMaxHp", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetCharacterState", name: "GetCharacterState", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetInAir", name: "GetInAir", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetName", name: "GetName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetDisplayName", name: "GetDisplayName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetAvatar", name: "GetAvatar", pkg: "", typ: $funcType([], [$String], false)}]; - ptrType$1.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetDx", name: "GetDx", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetDy", name: "GetDy", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBtnALevel", name: "GetBtnALevel", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBtnBLevel", name: "GetBtnBLevel", pkg: "", typ: $funcType([], [$Int32], false)}]; - ptrType$2.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetInputFrameId", name: "GetInputFrameId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetEncoded", name: "GetEncoded", pkg: "", typ: $funcType([], [$Uint64], false)}]; - ptrType$3.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetInputFrameId", name: "GetInputFrameId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetInputList", name: "GetInputList", pkg: "", typ: $funcType([], [sliceType$5], false)}, {prop: "GetConfirmedList", name: "GetConfirmedList", pkg: "", typ: $funcType([], [$Uint64], false)}]; - ptrType$4.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetClientTimestamp", name: "GetClientTimestamp", pkg: "", typ: $funcType([], [$Int64], false)}]; - ptrType$5.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetMsgId", name: "GetMsgId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetPlayerId", name: "GetPlayerId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetAct", name: "GetAct", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetJoinIndex", name: "GetJoinIndex", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetAckingFrameId", name: "GetAckingFrameId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetAckingInputFrameId", name: "GetAckingInputFrameId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetInputFrameUpsyncBatch", name: "GetInputFrameUpsyncBatch", pkg: "", typ: $funcType([], [sliceType$6], false)}, {prop: "GetHb", name: "GetHb", pkg: "", typ: $funcType([], [ptrType$4], false)}]; - ptrType$6.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetRet", name: "GetRet", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetEchoedMsgId", name: "GetEchoedMsgId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetAct", name: "GetAct", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetRdf", name: "GetRdf", pkg: "", typ: $funcType([], [ptrType$11], false)}, {prop: "GetInputFrameDownsyncBatch", name: "GetInputFrameDownsyncBatch", pkg: "", typ: $funcType([], [sliceType$7], false)}, {prop: "GetBciFrame", name: "GetBciFrame", pkg: "", typ: $funcType([], [ptrType$10], false)}]; - ptrType$7.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetRefRenderFrameId", name: "GetRefRenderFrameId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetUnconfirmedMask", name: "GetUnconfirmedMask", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "GetToSendInputFrameDownsyncs", name: "GetToSendInputFrameDownsyncs", pkg: "", typ: $funcType([], [sliceType$7], false)}, {prop: "GetShouldForceResync", name: "GetShouldForceResync", pkg: "", typ: $funcType([], [$Bool], false)}]; - ptrType$8.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetBoundary", name: "GetBoundary", pkg: "", typ: $funcType([], [ptrType$12], false)}]; - ptrType$9.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetBattleLocalId", name: "GetBattleLocalId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetStartupFrames", name: "GetStartupFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetActiveFrames", name: "GetActiveFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetRecoveryFrames", name: "GetRecoveryFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetRecoveryFramesOnBlock", name: "GetRecoveryFramesOnBlock", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetRecoveryFramesOnHit", name: "GetRecoveryFramesOnHit", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetMoveforward", name: "GetMoveforward", pkg: "", typ: $funcType([], [ptrType$13], false)}, {prop: "GetHitboxOffset", name: "GetHitboxOffset", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetHitboxSize", name: "GetHitboxSize", pkg: "", typ: $funcType([], [ptrType$13], false)}, {prop: "GetOriginatedRenderFrameId", name: "GetOriginatedRenderFrameId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetHitStunFrames", name: "GetHitStunFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBlockStunFrames", name: "GetBlockStunFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetPushback", name: "GetPushback", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetReleaseTriggerType", name: "GetReleaseTriggerType", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetDamage", name: "GetDamage", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetOffenderJoinIndex", name: "GetOffenderJoinIndex", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetOffenderPlayerId", name: "GetOffenderPlayerId", pkg: "", typ: $funcType([], [$Int32], false)}]; - ptrType$10.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetStageName", name: "GetStageName", pkg: "", typ: $funcType([], [$String], false)}, {prop: "GetStrToVec2DListMap", name: "GetStrToVec2DListMap", pkg: "", typ: $funcType([], [mapType], false)}, {prop: "GetStrToPolygon2DListMap", name: "GetStrToPolygon2DListMap", pkg: "", typ: $funcType([], [mapType$1], false)}, {prop: "GetStageDiscreteW", name: "GetStageDiscreteW", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetStageDiscreteH", name: "GetStageDiscreteH", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetStageTileW", name: "GetStageTileW", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetStageTileH", name: "GetStageTileH", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetIntervalToPing", name: "GetIntervalToPing", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetWillKickIfInactiveFor", name: "GetWillKickIfInactiveFor", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBoundRoomId", name: "GetBoundRoomId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBattleDurationFrames", name: "GetBattleDurationFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetBattleDurationNanos", name: "GetBattleDurationNanos", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "GetServerFps", name: "GetServerFps", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetInputDelayFrames", name: "GetInputDelayFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetInputScaleFrames", name: "GetInputScaleFrames", pkg: "", typ: $funcType([], [$Uint32], false)}, {prop: "GetNstDelayFrames", name: "GetNstDelayFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetInputFrameUpsyncDelayTolerance", name: "GetInputFrameUpsyncDelayTolerance", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetMaxChasingRenderFramesPerUpdate", name: "GetMaxChasingRenderFramesPerUpdate", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetPlayerBattleState", name: "GetPlayerBattleState", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetRollbackEstimatedDtMillis", name: "GetRollbackEstimatedDtMillis", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetRollbackEstimatedDtNanos", name: "GetRollbackEstimatedDtNanos", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "GetWorldToVirtualGridRatio", name: "GetWorldToVirtualGridRatio", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetVirtualGridToWorldRatio", name: "GetVirtualGridToWorldRatio", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetSpAtkLookupFrames", name: "GetSpAtkLookupFrames", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetRenderCacheSize", name: "GetRenderCacheSize", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetMeleeSkillConfig", name: "GetMeleeSkillConfig", pkg: "", typ: $funcType([], [mapType$2], false)}, {prop: "GetSnapIntoPlatformOverlap", name: "GetSnapIntoPlatformOverlap", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetSnapIntoPlatformThreshold", name: "GetSnapIntoPlatformThreshold", pkg: "", typ: $funcType([], [$Float64], false)}, {prop: "GetJumpingInitVelY", name: "GetJumpingInitVelY", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetGravityX", name: "GetGravityX", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetGravityY", name: "GetGravityY", pkg: "", typ: $funcType([], [$Int32], false)}]; - ptrType$11.methods = [{prop: "Reset", name: "Reset", pkg: "", typ: $funcType([], [], false)}, {prop: "String", name: "String", pkg: "", typ: $funcType([], [$String], false)}, {prop: "ProtoMessage", name: "ProtoMessage", pkg: "", typ: $funcType([], [], false)}, {prop: "ProtoReflect", name: "ProtoReflect", pkg: "", typ: $funcType([], [protoreflect.Message], false)}, {prop: "Descriptor", name: "Descriptor", pkg: "", typ: $funcType([], [sliceType, sliceType$4], false)}, {prop: "GetId", name: "GetId", pkg: "", typ: $funcType([], [$Int32], false)}, {prop: "GetPlayersArr", name: "GetPlayersArr", pkg: "", typ: $funcType([], [sliceType$8], false)}, {prop: "GetCountdownNanos", name: "GetCountdownNanos", pkg: "", typ: $funcType([], [$Int64], false)}, {prop: "GetMeleeBullets", name: "GetMeleeBullets", pkg: "", typ: $funcType([], [sliceType$9], false)}, {prop: "GetBackendUnconfirmedMask", name: "GetBackendUnconfirmedMask", pkg: "", typ: $funcType([], [$Uint64], false)}, {prop: "GetShouldForceResync", name: "GetShouldForceResync", pkg: "", typ: $funcType([], [$Bool], false)}, {prop: "GetPlayers", name: "GetPlayers", pkg: "", typ: $funcType([], [mapType$3], false)}]; - PlayerDownsync.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Id", name: "Id", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=id,proto3\" json:\"id,omitempty\""}, {prop: "VirtualGridX", name: "VirtualGridX", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,2,opt,name=virtualGridX,proto3\" json:\"virtualGridX,omitempty\""}, {prop: "VirtualGridY", name: "VirtualGridY", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,3,opt,name=virtualGridY,proto3\" json:\"virtualGridY,omitempty\""}, {prop: "DirX", name: "DirX", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,4,opt,name=dirX,proto3\" json:\"dirX,omitempty\""}, {prop: "DirY", name: "DirY", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,5,opt,name=dirY,proto3\" json:\"dirY,omitempty\""}, {prop: "VelX", name: "VelX", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,6,opt,name=velX,proto3\" json:\"velX,omitempty\""}, {prop: "VelY", name: "VelY", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,7,opt,name=velY,proto3\" json:\"velY,omitempty\""}, {prop: "Speed", name: "Speed", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,8,opt,name=speed,proto3\" json:\"speed,omitempty\""}, {prop: "BattleState", name: "BattleState", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,9,opt,name=battleState,proto3\" json:\"battleState,omitempty\""}, {prop: "JoinIndex", name: "JoinIndex", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,10,opt,name=joinIndex,proto3\" json:\"joinIndex,omitempty\""}, {prop: "ColliderRadius", name: "ColliderRadius", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,11,opt,name=colliderRadius,proto3\" json:\"colliderRadius,omitempty\""}, {prop: "Removed", name: "Removed", embedded: false, exported: true, typ: $Bool, tag: "protobuf:\"varint,12,opt,name=removed,proto3\" json:\"removed,omitempty\""}, {prop: "Score", name: "Score", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,13,opt,name=score,proto3\" json:\"score,omitempty\""}, {prop: "LastMoveGmtMillis", name: "LastMoveGmtMillis", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,14,opt,name=lastMoveGmtMillis,proto3\" json:\"lastMoveGmtMillis,omitempty\""}, {prop: "FramesToRecover", name: "FramesToRecover", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,15,opt,name=framesToRecover,proto3\" json:\"framesToRecover,omitempty\""}, {prop: "Hp", name: "Hp", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,16,opt,name=hp,proto3\" json:\"hp,omitempty\""}, {prop: "MaxHp", name: "MaxHp", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,17,opt,name=maxHp,proto3\" json:\"maxHp,omitempty\""}, {prop: "CharacterState", name: "CharacterState", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,18,opt,name=characterState,proto3\" json:\"characterState,omitempty\""}, {prop: "InAir", name: "InAir", embedded: false, exported: true, typ: $Bool, tag: "protobuf:\"varint,19,opt,name=inAir,proto3\" json:\"inAir,omitempty\""}, {prop: "Name", name: "Name", embedded: false, exported: true, typ: $String, tag: "protobuf:\"bytes,20,opt,name=name,proto3\" json:\"name,omitempty\""}, {prop: "DisplayName", name: "DisplayName", embedded: false, exported: true, typ: $String, tag: "protobuf:\"bytes,21,opt,name=displayName,proto3\" json:\"displayName,omitempty\""}, {prop: "Avatar", name: "Avatar", embedded: false, exported: true, typ: $String, tag: "protobuf:\"bytes,22,opt,name=avatar,proto3\" json:\"avatar,omitempty\""}]); - InputFrameDecoded.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Dx", name: "Dx", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=dx,proto3\" json:\"dx,omitempty\""}, {prop: "Dy", name: "Dy", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,2,opt,name=dy,proto3\" json:\"dy,omitempty\""}, {prop: "BtnALevel", name: "BtnALevel", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,3,opt,name=btnALevel,proto3\" json:\"btnALevel,omitempty\""}, {prop: "BtnBLevel", name: "BtnBLevel", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,4,opt,name=btnBLevel,proto3\" json:\"btnBLevel,omitempty\""}]); - InputFrameUpsync.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "InputFrameId", name: "InputFrameId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=inputFrameId,proto3\" json:\"inputFrameId,omitempty\""}, {prop: "Encoded", name: "Encoded", embedded: false, exported: true, typ: $Uint64, tag: "protobuf:\"varint,2,opt,name=encoded,proto3\" json:\"encoded,omitempty\""}]); - InputFrameDownsync.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "InputFrameId", name: "InputFrameId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=inputFrameId,proto3\" json:\"inputFrameId,omitempty\""}, {prop: "InputList", name: "InputList", embedded: false, exported: true, typ: sliceType$5, tag: "protobuf:\"varint,2,rep,packed,name=inputList,proto3\" json:\"inputList,omitempty\""}, {prop: "ConfirmedList", name: "ConfirmedList", embedded: false, exported: true, typ: $Uint64, tag: "protobuf:\"varint,3,opt,name=confirmedList,proto3\" json:\"confirmedList,omitempty\""}]); - HeartbeatUpsync.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "ClientTimestamp", name: "ClientTimestamp", embedded: false, exported: true, typ: $Int64, tag: "protobuf:\"varint,1,opt,name=clientTimestamp,proto3\" json:\"clientTimestamp,omitempty\""}]); - WsReq.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "MsgId", name: "MsgId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=msgId,proto3\" json:\"msgId,omitempty\""}, {prop: "PlayerId", name: "PlayerId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,2,opt,name=playerId,proto3\" json:\"playerId,omitempty\""}, {prop: "Act", name: "Act", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,3,opt,name=act,proto3\" json:\"act,omitempty\""}, {prop: "JoinIndex", name: "JoinIndex", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,4,opt,name=joinIndex,proto3\" json:\"joinIndex,omitempty\""}, {prop: "AckingFrameId", name: "AckingFrameId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,5,opt,name=ackingFrameId,proto3\" json:\"ackingFrameId,omitempty\""}, {prop: "AckingInputFrameId", name: "AckingInputFrameId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,6,opt,name=ackingInputFrameId,proto3\" json:\"ackingInputFrameId,omitempty\""}, {prop: "InputFrameUpsyncBatch", name: "InputFrameUpsyncBatch", embedded: false, exported: true, typ: sliceType$6, tag: "protobuf:\"bytes,7,rep,name=inputFrameUpsyncBatch,proto3\" json:\"inputFrameUpsyncBatch,omitempty\""}, {prop: "Hb", name: "Hb", embedded: false, exported: true, typ: ptrType$4, tag: "protobuf:\"bytes,8,opt,name=hb,proto3\" json:\"hb,omitempty\""}]); - WsResp.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Ret", name: "Ret", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=ret,proto3\" json:\"ret,omitempty\""}, {prop: "EchoedMsgId", name: "EchoedMsgId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,2,opt,name=echoedMsgId,proto3\" json:\"echoedMsgId,omitempty\""}, {prop: "Act", name: "Act", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,3,opt,name=act,proto3\" json:\"act,omitempty\""}, {prop: "Rdf", name: "Rdf", embedded: false, exported: true, typ: ptrType$11, tag: "protobuf:\"bytes,4,opt,name=rdf,proto3\" json:\"rdf,omitempty\""}, {prop: "InputFrameDownsyncBatch", name: "InputFrameDownsyncBatch", embedded: false, exported: true, typ: sliceType$7, tag: "protobuf:\"bytes,5,rep,name=inputFrameDownsyncBatch,proto3\" json:\"inputFrameDownsyncBatch,omitempty\""}, {prop: "BciFrame", name: "BciFrame", embedded: false, exported: true, typ: ptrType$10, tag: "protobuf:\"bytes,6,opt,name=bciFrame,proto3\" json:\"bciFrame,omitempty\""}]); - InputsBufferSnapshot.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "RefRenderFrameId", name: "RefRenderFrameId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=refRenderFrameId,proto3\" json:\"refRenderFrameId,omitempty\""}, {prop: "UnconfirmedMask", name: "UnconfirmedMask", embedded: false, exported: true, typ: $Uint64, tag: "protobuf:\"varint,2,opt,name=unconfirmedMask,proto3\" json:\"unconfirmedMask,omitempty\""}, {prop: "ToSendInputFrameDownsyncs", name: "ToSendInputFrameDownsyncs", embedded: false, exported: true, typ: sliceType$7, tag: "protobuf:\"bytes,3,rep,name=toSendInputFrameDownsyncs,proto3\" json:\"toSendInputFrameDownsyncs,omitempty\""}, {prop: "ShouldForceResync", name: "ShouldForceResync", embedded: false, exported: true, typ: $Bool, tag: "protobuf:\"varint,4,opt,name=shouldForceResync,proto3\" json:\"shouldForceResync,omitempty\""}]); - Barrier.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Boundary", name: "Boundary", embedded: false, exported: true, typ: ptrType$12, tag: "protobuf:\"bytes,1,opt,name=boundary,proto3\" json:\"boundary,omitempty\""}]); - MeleeBullet.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "BattleLocalId", name: "BattleLocalId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=battleLocalId,proto3\" json:\"battleLocalId,omitempty\""}, {prop: "StartupFrames", name: "StartupFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,2,opt,name=startupFrames,proto3\" json:\"startupFrames,omitempty\""}, {prop: "ActiveFrames", name: "ActiveFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,3,opt,name=activeFrames,proto3\" json:\"activeFrames,omitempty\""}, {prop: "RecoveryFrames", name: "RecoveryFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,4,opt,name=recoveryFrames,proto3\" json:\"recoveryFrames,omitempty\""}, {prop: "RecoveryFramesOnBlock", name: "RecoveryFramesOnBlock", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,5,opt,name=recoveryFramesOnBlock,proto3\" json:\"recoveryFramesOnBlock,omitempty\""}, {prop: "RecoveryFramesOnHit", name: "RecoveryFramesOnHit", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,6,opt,name=recoveryFramesOnHit,proto3\" json:\"recoveryFramesOnHit,omitempty\""}, {prop: "Moveforward", name: "Moveforward", embedded: false, exported: true, typ: ptrType$13, tag: "protobuf:\"bytes,7,opt,name=moveforward,proto3\" json:\"moveforward,omitempty\""}, {prop: "HitboxOffset", name: "HitboxOffset", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,8,opt,name=hitboxOffset,proto3\" json:\"hitboxOffset,omitempty\""}, {prop: "HitboxSize", name: "HitboxSize", embedded: false, exported: true, typ: ptrType$13, tag: "protobuf:\"bytes,9,opt,name=hitboxSize,proto3\" json:\"hitboxSize,omitempty\""}, {prop: "OriginatedRenderFrameId", name: "OriginatedRenderFrameId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,10,opt,name=originatedRenderFrameId,proto3\" json:\"originatedRenderFrameId,omitempty\""}, {prop: "HitStunFrames", name: "HitStunFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,11,opt,name=hitStunFrames,proto3\" json:\"hitStunFrames,omitempty\""}, {prop: "BlockStunFrames", name: "BlockStunFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,12,opt,name=blockStunFrames,proto3\" json:\"blockStunFrames,omitempty\""}, {prop: "Pushback", name: "Pushback", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,13,opt,name=pushback,proto3\" json:\"pushback,omitempty\""}, {prop: "ReleaseTriggerType", name: "ReleaseTriggerType", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,14,opt,name=releaseTriggerType,proto3\" json:\"releaseTriggerType,omitempty\""}, {prop: "Damage", name: "Damage", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,15,opt,name=damage,proto3\" json:\"damage,omitempty\""}, {prop: "OffenderJoinIndex", name: "OffenderJoinIndex", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,16,opt,name=offenderJoinIndex,proto3\" json:\"offenderJoinIndex,omitempty\""}, {prop: "OffenderPlayerId", name: "OffenderPlayerId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,17,opt,name=offenderPlayerId,proto3\" json:\"offenderPlayerId,omitempty\""}]); - BattleColliderInfo.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "StageName", name: "StageName", embedded: false, exported: true, typ: $String, tag: "protobuf:\"bytes,1,opt,name=stageName,proto3\" json:\"stageName,omitempty\""}, {prop: "StrToVec2DListMap", name: "StrToVec2DListMap", embedded: false, exported: true, typ: mapType, tag: "protobuf:\"bytes,2,rep,name=strToVec2DListMap,proto3\" json:\"strToVec2DListMap,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\""}, {prop: "StrToPolygon2DListMap", name: "StrToPolygon2DListMap", embedded: false, exported: true, typ: mapType$1, tag: "protobuf:\"bytes,3,rep,name=strToPolygon2DListMap,proto3\" json:\"strToPolygon2DListMap,omitempty\" protobuf_key:\"bytes,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\""}, {prop: "StageDiscreteW", name: "StageDiscreteW", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,4,opt,name=stageDiscreteW,proto3\" json:\"stageDiscreteW,omitempty\""}, {prop: "StageDiscreteH", name: "StageDiscreteH", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,5,opt,name=stageDiscreteH,proto3\" json:\"stageDiscreteH,omitempty\""}, {prop: "StageTileW", name: "StageTileW", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,6,opt,name=stageTileW,proto3\" json:\"stageTileW,omitempty\""}, {prop: "StageTileH", name: "StageTileH", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,7,opt,name=stageTileH,proto3\" json:\"stageTileH,omitempty\""}, {prop: "IntervalToPing", name: "IntervalToPing", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,8,opt,name=intervalToPing,proto3\" json:\"intervalToPing,omitempty\""}, {prop: "WillKickIfInactiveFor", name: "WillKickIfInactiveFor", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,9,opt,name=willKickIfInactiveFor,proto3\" json:\"willKickIfInactiveFor,omitempty\""}, {prop: "BoundRoomId", name: "BoundRoomId", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,10,opt,name=boundRoomId,proto3\" json:\"boundRoomId,omitempty\""}, {prop: "BattleDurationFrames", name: "BattleDurationFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,12,opt,name=battleDurationFrames,proto3\" json:\"battleDurationFrames,omitempty\""}, {prop: "BattleDurationNanos", name: "BattleDurationNanos", embedded: false, exported: true, typ: $Int64, tag: "protobuf:\"varint,13,opt,name=battleDurationNanos,proto3\" json:\"battleDurationNanos,omitempty\""}, {prop: "ServerFps", name: "ServerFps", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,14,opt,name=serverFps,proto3\" json:\"serverFps,omitempty\""}, {prop: "InputDelayFrames", name: "InputDelayFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,15,opt,name=inputDelayFrames,proto3\" json:\"inputDelayFrames,omitempty\""}, {prop: "InputScaleFrames", name: "InputScaleFrames", embedded: false, exported: true, typ: $Uint32, tag: "protobuf:\"varint,16,opt,name=inputScaleFrames,proto3\" json:\"inputScaleFrames,omitempty\""}, {prop: "NstDelayFrames", name: "NstDelayFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,17,opt,name=nstDelayFrames,proto3\" json:\"nstDelayFrames,omitempty\""}, {prop: "InputFrameUpsyncDelayTolerance", name: "InputFrameUpsyncDelayTolerance", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,18,opt,name=inputFrameUpsyncDelayTolerance,proto3\" json:\"inputFrameUpsyncDelayTolerance,omitempty\""}, {prop: "MaxChasingRenderFramesPerUpdate", name: "MaxChasingRenderFramesPerUpdate", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,19,opt,name=maxChasingRenderFramesPerUpdate,proto3\" json:\"maxChasingRenderFramesPerUpdate,omitempty\""}, {prop: "PlayerBattleState", name: "PlayerBattleState", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,20,opt,name=playerBattleState,proto3\" json:\"playerBattleState,omitempty\""}, {prop: "RollbackEstimatedDtMillis", name: "RollbackEstimatedDtMillis", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,21,opt,name=rollbackEstimatedDtMillis,proto3\" json:\"rollbackEstimatedDtMillis,omitempty\""}, {prop: "RollbackEstimatedDtNanos", name: "RollbackEstimatedDtNanos", embedded: false, exported: true, typ: $Int64, tag: "protobuf:\"varint,22,opt,name=rollbackEstimatedDtNanos,proto3\" json:\"rollbackEstimatedDtNanos,omitempty\""}, {prop: "WorldToVirtualGridRatio", name: "WorldToVirtualGridRatio", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,23,opt,name=worldToVirtualGridRatio,proto3\" json:\"worldToVirtualGridRatio,omitempty\""}, {prop: "VirtualGridToWorldRatio", name: "VirtualGridToWorldRatio", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,24,opt,name=virtualGridToWorldRatio,proto3\" json:\"virtualGridToWorldRatio,omitempty\""}, {prop: "SpAtkLookupFrames", name: "SpAtkLookupFrames", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,25,opt,name=spAtkLookupFrames,proto3\" json:\"spAtkLookupFrames,omitempty\""}, {prop: "RenderCacheSize", name: "RenderCacheSize", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,26,opt,name=renderCacheSize,proto3\" json:\"renderCacheSize,omitempty\""}, {prop: "MeleeSkillConfig", name: "MeleeSkillConfig", embedded: false, exported: true, typ: mapType$2, tag: "protobuf:\"bytes,27,rep,name=meleeSkillConfig,proto3\" json:\"meleeSkillConfig,omitempty\" protobuf_key:\"varint,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\""}, {prop: "SnapIntoPlatformOverlap", name: "SnapIntoPlatformOverlap", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,28,opt,name=snapIntoPlatformOverlap,proto3\" json:\"snapIntoPlatformOverlap,omitempty\""}, {prop: "SnapIntoPlatformThreshold", name: "SnapIntoPlatformThreshold", embedded: false, exported: true, typ: $Float64, tag: "protobuf:\"fixed64,29,opt,name=snapIntoPlatformThreshold,proto3\" json:\"snapIntoPlatformThreshold,omitempty\""}, {prop: "JumpingInitVelY", name: "JumpingInitVelY", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,30,opt,name=jumpingInitVelY,proto3\" json:\"jumpingInitVelY,omitempty\""}, {prop: "GravityX", name: "GravityX", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,31,opt,name=gravityX,proto3\" json:\"gravityX,omitempty\""}, {prop: "GravityY", name: "GravityY", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,32,opt,name=gravityY,proto3\" json:\"gravityY,omitempty\""}]); - RoomDownsyncFrame.init("jsexport/protos", [{prop: "state", name: "state", embedded: false, exported: false, typ: $packages["google.golang.org/protobuf/internal/impl"].MessageState, tag: ""}, {prop: "sizeCache", name: "sizeCache", embedded: false, exported: false, typ: $Int32, tag: ""}, {prop: "unknownFields", name: "unknownFields", embedded: false, exported: false, typ: sliceType, tag: ""}, {prop: "Id", name: "Id", embedded: false, exported: true, typ: $Int32, tag: "protobuf:\"varint,1,opt,name=id,proto3\" json:\"id,omitempty\""}, {prop: "PlayersArr", name: "PlayersArr", embedded: false, exported: true, typ: sliceType$8, tag: "protobuf:\"bytes,2,rep,name=playersArr,proto3\" json:\"playersArr,omitempty\""}, {prop: "CountdownNanos", name: "CountdownNanos", embedded: false, exported: true, typ: $Int64, tag: "protobuf:\"varint,3,opt,name=countdownNanos,proto3\" json:\"countdownNanos,omitempty\""}, {prop: "MeleeBullets", name: "MeleeBullets", embedded: false, exported: true, typ: sliceType$9, tag: "protobuf:\"bytes,4,rep,name=meleeBullets,proto3\" json:\"meleeBullets,omitempty\""}, {prop: "BackendUnconfirmedMask", name: "BackendUnconfirmedMask", embedded: false, exported: true, typ: $Uint64, tag: "protobuf:\"varint,5,opt,name=backendUnconfirmedMask,proto3\" json:\"backendUnconfirmedMask,omitempty\""}, {prop: "ShouldForceResync", name: "ShouldForceResync", embedded: false, exported: true, typ: $Bool, tag: "protobuf:\"varint,6,opt,name=shouldForceResync,proto3\" json:\"shouldForceResync,omitempty\""}, {prop: "Players", name: "Players", embedded: false, exported: true, typ: mapType$3, tag: "protobuf:\"bytes,99,rep,name=players,proto3\" json:\"players,omitempty\" protobuf_key:\"varint,1,opt,name=key,proto3\" protobuf_val:\"bytes,2,opt,name=value,proto3\""}]); - x.init("", []); - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = sharedprotos.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoreflect.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protoimpl.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = reflect.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sync.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.File_room_downsync_frame_proto = $ifaceNil; - file_room_downsync_frame_proto_rawDescOnce = new sync.Once.ptr(0, new sync.Mutex.ptr(0, 0)); - file_room_downsync_frame_proto_rawDesc = new sliceType([10, 25, 114, 111, 111, 109, 95, 100, 111, 119, 110, 115, 121, 110, 99, 95, 102, 114, 97, 109, 101, 46, 112, 114, 111, 116, 111, 18, 6, 112, 114, 111, 116, 111, 115, 26, 14, 103, 101, 111, 109, 101, 116, 114, 121, 46, 112, 114, 111, 116, 111, 34, 240, 4, 10, 14, 80, 108, 97, 121, 101, 114, 68, 111, 119, 110, 115, 121, 110, 99, 18, 14, 10, 2, 105, 100, 24, 1, 32, 1, 40, 5, 82, 2, 105, 100, 18, 34, 10, 12, 118, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 88, 24, 2, 32, 1, 40, 5, 82, 12, 118, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 88, 18, 34, 10, 12, 118, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 89, 24, 3, 32, 1, 40, 5, 82, 12, 118, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 89, 18, 18, 10, 4, 100, 105, 114, 88, 24, 4, 32, 1, 40, 5, 82, 4, 100, 105, 114, 88, 18, 18, 10, 4, 100, 105, 114, 89, 24, 5, 32, 1, 40, 5, 82, 4, 100, 105, 114, 89, 18, 18, 10, 4, 118, 101, 108, 88, 24, 6, 32, 1, 40, 5, 82, 4, 118, 101, 108, 88, 18, 18, 10, 4, 118, 101, 108, 89, 24, 7, 32, 1, 40, 5, 82, 4, 118, 101, 108, 89, 18, 20, 10, 5, 115, 112, 101, 101, 100, 24, 8, 32, 1, 40, 5, 82, 5, 115, 112, 101, 101, 100, 18, 32, 10, 11, 98, 97, 116, 116, 108, 101, 83, 116, 97, 116, 101, 24, 9, 32, 1, 40, 5, 82, 11, 98, 97, 116, 116, 108, 101, 83, 116, 97, 116, 101, 18, 28, 10, 9, 106, 111, 105, 110, 73, 110, 100, 101, 120, 24, 10, 32, 1, 40, 5, 82, 9, 106, 111, 105, 110, 73, 110, 100, 101, 120, 18, 38, 10, 14, 99, 111, 108, 108, 105, 100, 101, 114, 82, 97, 100, 105, 117, 115, 24, 11, 32, 1, 40, 1, 82, 14, 99, 111, 108, 108, 105, 100, 101, 114, 82, 97, 100, 105, 117, 115, 18, 24, 10, 7, 114, 101, 109, 111, 118, 101, 100, 24, 12, 32, 1, 40, 8, 82, 7, 114, 101, 109, 111, 118, 101, 100, 18, 20, 10, 5, 115, 99, 111, 114, 101, 24, 13, 32, 1, 40, 5, 82, 5, 115, 99, 111, 114, 101, 18, 44, 10, 17, 108, 97, 115, 116, 77, 111, 118, 101, 71, 109, 116, 77, 105, 108, 108, 105, 115, 24, 14, 32, 1, 40, 5, 82, 17, 108, 97, 115, 116, 77, 111, 118, 101, 71, 109, 116, 77, 105, 108, 108, 105, 115, 18, 40, 10, 15, 102, 114, 97, 109, 101, 115, 84, 111, 82, 101, 99, 111, 118, 101, 114, 24, 15, 32, 1, 40, 5, 82, 15, 102, 114, 97, 109, 101, 115, 84, 111, 82, 101, 99, 111, 118, 101, 114, 18, 14, 10, 2, 104, 112, 24, 16, 32, 1, 40, 5, 82, 2, 104, 112, 18, 20, 10, 5, 109, 97, 120, 72, 112, 24, 17, 32, 1, 40, 5, 82, 5, 109, 97, 120, 72, 112, 18, 38, 10, 14, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, 116, 97, 116, 101, 24, 18, 32, 1, 40, 5, 82, 14, 99, 104, 97, 114, 97, 99, 116, 101, 114, 83, 116, 97, 116, 101, 18, 20, 10, 5, 105, 110, 65, 105, 114, 24, 19, 32, 1, 40, 8, 82, 5, 105, 110, 65, 105, 114, 18, 18, 10, 4, 110, 97, 109, 101, 24, 20, 32, 1, 40, 9, 82, 4, 110, 97, 109, 101, 18, 32, 10, 11, 100, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 24, 21, 32, 1, 40, 9, 82, 11, 100, 105, 115, 112, 108, 97, 121, 78, 97, 109, 101, 18, 22, 10, 6, 97, 118, 97, 116, 97, 114, 24, 22, 32, 1, 40, 9, 82, 6, 97, 118, 97, 116, 97, 114, 34, 111, 10, 17, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 101, 99, 111, 100, 101, 100, 18, 14, 10, 2, 100, 120, 24, 1, 32, 1, 40, 5, 82, 2, 100, 120, 18, 14, 10, 2, 100, 121, 24, 2, 32, 1, 40, 5, 82, 2, 100, 121, 18, 28, 10, 9, 98, 116, 110, 65, 76, 101, 118, 101, 108, 24, 3, 32, 1, 40, 5, 82, 9, 98, 116, 110, 65, 76, 101, 118, 101, 108, 18, 28, 10, 9, 98, 116, 110, 66, 76, 101, 118, 101, 108, 24, 4, 32, 1, 40, 5, 82, 9, 98, 116, 110, 66, 76, 101, 118, 101, 108, 34, 80, 10, 16, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 85, 112, 115, 121, 110, 99, 18, 34, 10, 12, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 73, 100, 24, 1, 32, 1, 40, 5, 82, 12, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 73, 100, 18, 24, 10, 7, 101, 110, 99, 111, 100, 101, 100, 24, 2, 32, 1, 40, 4, 82, 7, 101, 110, 99, 111, 100, 101, 100, 34, 124, 10, 18, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 18, 34, 10, 12, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 73, 100, 24, 1, 32, 1, 40, 5, 82, 12, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 73, 100, 18, 28, 10, 9, 105, 110, 112, 117, 116, 76, 105, 115, 116, 24, 2, 32, 3, 40, 4, 82, 9, 105, 110, 112, 117, 116, 76, 105, 115, 116, 18, 36, 10, 13, 99, 111, 110, 102, 105, 114, 109, 101, 100, 76, 105, 115, 116, 24, 3, 32, 1, 40, 4, 82, 13, 99, 111, 110, 102, 105, 114, 109, 101, 100, 76, 105, 115, 116, 34, 59, 10, 15, 72, 101, 97, 114, 116, 98, 101, 97, 116, 85, 112, 115, 121, 110, 99, 18, 40, 10, 15, 99, 108, 105, 101, 110, 116, 84, 105, 109, 101, 115, 116, 97, 109, 112, 24, 1, 32, 1, 40, 3, 82, 15, 99, 108, 105, 101, 110, 116, 84, 105, 109, 101, 115, 116, 97, 109, 112, 34, 184, 2, 10, 5, 87, 115, 82, 101, 113, 18, 20, 10, 5, 109, 115, 103, 73, 100, 24, 1, 32, 1, 40, 5, 82, 5, 109, 115, 103, 73, 100, 18, 26, 10, 8, 112, 108, 97, 121, 101, 114, 73, 100, 24, 2, 32, 1, 40, 5, 82, 8, 112, 108, 97, 121, 101, 114, 73, 100, 18, 16, 10, 3, 97, 99, 116, 24, 3, 32, 1, 40, 5, 82, 3, 97, 99, 116, 18, 28, 10, 9, 106, 111, 105, 110, 73, 110, 100, 101, 120, 24, 4, 32, 1, 40, 5, 82, 9, 106, 111, 105, 110, 73, 110, 100, 101, 120, 18, 36, 10, 13, 97, 99, 107, 105, 110, 103, 70, 114, 97, 109, 101, 73, 100, 24, 5, 32, 1, 40, 5, 82, 13, 97, 99, 107, 105, 110, 103, 70, 114, 97, 109, 101, 73, 100, 18, 46, 10, 18, 97, 99, 107, 105, 110, 103, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 73, 100, 24, 6, 32, 1, 40, 5, 82, 18, 97, 99, 107, 105, 110, 103, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 73, 100, 18, 78, 10, 21, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 85, 112, 115, 121, 110, 99, 66, 97, 116, 99, 104, 24, 7, 32, 3, 40, 11, 50, 24, 46, 112, 114, 111, 116, 111, 115, 46, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 85, 112, 115, 121, 110, 99, 82, 21, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 85, 112, 115, 121, 110, 99, 66, 97, 116, 99, 104, 18, 39, 10, 2, 104, 98, 24, 8, 32, 1, 40, 11, 50, 23, 46, 112, 114, 111, 116, 111, 115, 46, 72, 101, 97, 114, 116, 98, 101, 97, 116, 85, 112, 115, 121, 110, 99, 82, 2, 104, 98, 34, 137, 2, 10, 6, 87, 115, 82, 101, 115, 112, 18, 16, 10, 3, 114, 101, 116, 24, 1, 32, 1, 40, 5, 82, 3, 114, 101, 116, 18, 32, 10, 11, 101, 99, 104, 111, 101, 100, 77, 115, 103, 73, 100, 24, 2, 32, 1, 40, 5, 82, 11, 101, 99, 104, 111, 101, 100, 77, 115, 103, 73, 100, 18, 16, 10, 3, 97, 99, 116, 24, 3, 32, 1, 40, 5, 82, 3, 97, 99, 116, 18, 43, 10, 3, 114, 100, 102, 24, 4, 32, 1, 40, 11, 50, 25, 46, 112, 114, 111, 116, 111, 115, 46, 82, 111, 111, 109, 68, 111, 119, 110, 115, 121, 110, 99, 70, 114, 97, 109, 101, 82, 3, 114, 100, 102, 18, 84, 10, 23, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 66, 97, 116, 99, 104, 24, 5, 32, 3, 40, 11, 50, 26, 46, 112, 114, 111, 116, 111, 115, 46, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 82, 23, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 66, 97, 116, 99, 104, 18, 54, 10, 8, 98, 99, 105, 70, 114, 97, 109, 101, 24, 6, 32, 1, 40, 11, 50, 26, 46, 112, 114, 111, 116, 111, 115, 46, 66, 97, 116, 116, 108, 101, 67, 111, 108, 108, 105, 100, 101, 114, 73, 110, 102, 111, 82, 8, 98, 99, 105, 70, 114, 97, 109, 101, 34, 244, 1, 10, 20, 73, 110, 112, 117, 116, 115, 66, 117, 102, 102, 101, 114, 83, 110, 97, 112, 115, 104, 111, 116, 18, 42, 10, 16, 114, 101, 102, 82, 101, 110, 100, 101, 114, 70, 114, 97, 109, 101, 73, 100, 24, 1, 32, 1, 40, 5, 82, 16, 114, 101, 102, 82, 101, 110, 100, 101, 114, 70, 114, 97, 109, 101, 73, 100, 18, 40, 10, 15, 117, 110, 99, 111, 110, 102, 105, 114, 109, 101, 100, 77, 97, 115, 107, 24, 2, 32, 1, 40, 4, 82, 15, 117, 110, 99, 111, 110, 102, 105, 114, 109, 101, 100, 77, 97, 115, 107, 18, 88, 10, 25, 116, 111, 83, 101, 110, 100, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 115, 24, 3, 32, 3, 40, 11, 50, 26, 46, 112, 114, 111, 116, 111, 115, 46, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 82, 25, 116, 111, 83, 101, 110, 100, 73, 110, 112, 117, 116, 70, 114, 97, 109, 101, 68, 111, 119, 110, 115, 121, 110, 99, 115, 18, 44, 10, 17, 115, 104, 111, 117, 108, 100, 70, 111, 114, 99, 101, 82, 101, 115, 121, 110, 99, 24, 4, 32, 1, 40, 8, 82, 17, 115, 104, 111, 117, 108, 100, 70, 111, 114, 99, 101, 82, 101, 115, 121, 110, 99, 34, 62, 10, 7, 66, 97, 114, 114, 105, 101, 114, 18, 51, 10, 8, 98, 111, 117, 110, 100, 97, 114, 121, 24, 1, 32, 1, 40, 11, 50, 23, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 80, 111, 108, 121, 103, 111, 110, 50, 68, 82, 8, 98, 111, 117, 110, 100, 97, 114, 121, 34, 229, 5, 10, 11, 77, 101, 108, 101, 101, 66, 117, 108, 108, 101, 116, 18, 36, 10, 13, 98, 97, 116, 116, 108, 101, 76, 111, 99, 97, 108, 73, 100, 24, 1, 32, 1, 40, 5, 82, 13, 98, 97, 116, 116, 108, 101, 76, 111, 99, 97, 108, 73, 100, 18, 36, 10, 13, 115, 116, 97, 114, 116, 117, 112, 70, 114, 97, 109, 101, 115, 24, 2, 32, 1, 40, 5, 82, 13, 115, 116, 97, 114, 116, 117, 112, 70, 114, 97, 109, 101, 115, 18, 34, 10, 12, 97, 99, 116, 105, 118, 101, 70, 114, 97, 109, 101, 115, 24, 3, 32, 1, 40, 5, 82, 12, 97, 99, 116, 105, 118, 101, 70, 114, 97, 109, 101, 115, 18, 38, 10, 14, 114, 101, 99, 111, 118, 101, 114, 121, 70, 114, 97, 109, 101, 115, 24, 4, 32, 1, 40, 5, 82, 14, 114, 101, 99, 111, 118, 101, 114, 121, 70, 114, 97, 109, 101, 115, 18, 52, 10, 21, 114, 101, 99, 111, 118, 101, 114, 121, 70, 114, 97, 109, 101, 115, 79, 110, 66, 108, 111, 99, 107, 24, 5, 32, 1, 40, 5, 82, 21, 114, 101, 99, 111, 118, 101, 114, 121, 70, 114, 97, 109, 101, 115, 79, 110, 66, 108, 111, 99, 107, 18, 48, 10, 19, 114, 101, 99, 111, 118, 101, 114, 121, 70, 114, 97, 109, 101, 115, 79, 110, 72, 105, 116, 24, 6, 32, 1, 40, 5, 82, 19, 114, 101, 99, 111, 118, 101, 114, 121, 70, 114, 97, 109, 101, 115, 79, 110, 72, 105, 116, 18, 53, 10, 11, 109, 111, 118, 101, 102, 111, 114, 119, 97, 114, 100, 24, 7, 32, 1, 40, 11, 50, 19, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 86, 101, 99, 50, 68, 82, 11, 109, 111, 118, 101, 102, 111, 114, 119, 97, 114, 100, 18, 34, 10, 12, 104, 105, 116, 98, 111, 120, 79, 102, 102, 115, 101, 116, 24, 8, 32, 1, 40, 1, 82, 12, 104, 105, 116, 98, 111, 120, 79, 102, 102, 115, 101, 116, 18, 51, 10, 10, 104, 105, 116, 98, 111, 120, 83, 105, 122, 101, 24, 9, 32, 1, 40, 11, 50, 19, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 86, 101, 99, 50, 68, 82, 10, 104, 105, 116, 98, 111, 120, 83, 105, 122, 101, 18, 56, 10, 23, 111, 114, 105, 103, 105, 110, 97, 116, 101, 100, 82, 101, 110, 100, 101, 114, 70, 114, 97, 109, 101, 73, 100, 24, 10, 32, 1, 40, 5, 82, 23, 111, 114, 105, 103, 105, 110, 97, 116, 101, 100, 82, 101, 110, 100, 101, 114, 70, 114, 97, 109, 101, 73, 100, 18, 36, 10, 13, 104, 105, 116, 83, 116, 117, 110, 70, 114, 97, 109, 101, 115, 24, 11, 32, 1, 40, 5, 82, 13, 104, 105, 116, 83, 116, 117, 110, 70, 114, 97, 109, 101, 115, 18, 40, 10, 15, 98, 108, 111, 99, 107, 83, 116, 117, 110, 70, 114, 97, 109, 101, 115, 24, 12, 32, 1, 40, 5, 82, 15, 98, 108, 111, 99, 107, 83, 116, 117, 110, 70, 114, 97, 109, 101, 115, 18, 26, 10, 8, 112, 117, 115, 104, 98, 97, 99, 107, 24, 13, 32, 1, 40, 1, 82, 8, 112, 117, 115, 104, 98, 97, 99, 107, 18, 46, 10, 18, 114, 101, 108, 101, 97, 115, 101, 84, 114, 105, 103, 103, 101, 114, 84, 121, 112, 101, 24, 14, 32, 1, 40, 5, 82, 18, 114, 101, 108, 101, 97, 115, 101, 84, 114, 105, 103, 103, 101, 114, 84, 121, 112, 101, 18, 22, 10, 6, 100, 97, 109, 97, 103, 101, 24, 15, 32, 1, 40, 5, 82, 6, 100, 97, 109, 97, 103, 101, 18, 44, 10, 17, 111, 102, 102, 101, 110, 100, 101, 114, 74, 111, 105, 110, 73, 110, 100, 101, 120, 24, 16, 32, 1, 40, 5, 82, 17, 111, 102, 102, 101, 110, 100, 101, 114, 74, 111, 105, 110, 73, 110, 100, 101, 120, 18, 42, 10, 16, 111, 102, 102, 101, 110, 100, 101, 114, 80, 108, 97, 121, 101, 114, 73, 100, 24, 17, 32, 1, 40, 5, 82, 16, 111, 102, 102, 101, 110, 100, 101, 114, 80, 108, 97, 121, 101, 114, 73, 100, 34, 242, 14, 10, 18, 66, 97, 116, 116, 108, 101, 67, 111, 108, 108, 105, 100, 101, 114, 73, 110, 102, 111, 18, 28, 10, 9, 115, 116, 97, 103, 101, 78, 97, 109, 101, 24, 1, 32, 1, 40, 9, 82, 9, 115, 116, 97, 103, 101, 78, 97, 109, 101, 18, 95, 10, 17, 115, 116, 114, 84, 111, 86, 101, 99, 50, 68, 76, 105, 115, 116, 77, 97, 112, 24, 2, 32, 3, 40, 11, 50, 49, 46, 112, 114, 111, 116, 111, 115, 46, 66, 97, 116, 116, 108, 101, 67, 111, 108, 108, 105, 100, 101, 114, 73, 110, 102, 111, 46, 83, 116, 114, 84, 111, 86, 101, 99, 50, 68, 76, 105, 115, 116, 77, 97, 112, 69, 110, 116, 114, 121, 82, 17, 115, 116, 114, 84, 111, 86, 101, 99, 50, 68, 76, 105, 115, 116, 77, 97, 112, 18, 107, 10, 21, 115, 116, 114, 84, 111, 80, 111, 108, 121, 103, 111, 110, 50, 68, 76, 105, 115, 116, 77, 97, 112, 24, 3, 32, 3, 40, 11, 50, 53, 46, 112, 114, 111, 116, 111, 115, 46, 66, 97, 116, 116, 108, 101, 67, 111, 108, 108, 105, 100, 101, 114, 73, 110, 102, 111, 46, 83, 116, 114, 84, 111, 80, 111, 108, 121, 103, 111, 110, 50, 68, 76, 105, 115, 116, 77, 97, 112, 69, 110, 116, 114, 121, 82, 21, 115, 116, 114, 84, 111, 80, 111, 108, 121, 103, 111, 110, 50, 68, 76, 105, 115, 116, 77, 97, 112, 18, 38, 10, 14, 115, 116, 97, 103, 101, 68, 105, 115, 99, 114, 101, 116, 101, 87, 24, 4, 32, 1, 40, 5, 82, 14, 115, 116, 97, 103, 101, 68, 105, 115, 99, 114, 101, 116, 101, 87, 18, 38, 10, 14, 115, 116, 97, 103, 101, 68, 105, 115, 99, 114, 101, 116, 101, 72, 24, 5, 32, 1, 40, 5, 82, 14, 115, 116, 97, 103, 101, 68, 105, 115, 99, 114, 101, 116, 101, 72, 18, 30, 10, 10, 115, 116, 97, 103, 101, 84, 105, 108, 101, 87, 24, 6, 32, 1, 40, 5, 82, 10, 115, 116, 97, 103, 101, 84, 105, 108, 101, 87, 18, 30, 10, 10, 115, 116, 97, 103, 101, 84, 105, 108, 101, 72, 24, 7, 32, 1, 40, 5, 82, 10, 115, 116, 97, 103, 101, 84, 105, 108, 101, 72, 18, 38, 10, 14, 105, 110, 116, 101, 114, 118, 97, 108, 84, 111, 80, 105, 110, 103, 24, 8, 32, 1, 40, 5, 82, 14, 105, 110, 116, 101, 114, 118, 97, 108, 84, 111, 80, 105, 110, 103, 18, 52, 10, 21, 119, 105, 108, 108, 75, 105, 99, 107, 73, 102, 73, 110, 97, 99, 116, 105, 118, 101, 70, 111, 114, 24, 9, 32, 1, 40, 5, 82, 21, 119, 105, 108, 108, 75, 105, 99, 107, 73, 102, 73, 110, 97, 99, 116, 105, 118, 101, 70, 111, 114, 18, 32, 10, 11, 98, 111, 117, 110, 100, 82, 111, 111, 109, 73, 100, 24, 10, 32, 1, 40, 5, 82, 11, 98, 111, 117, 110, 100, 82, 111, 111, 109, 73, 100, 18, 50, 10, 20, 98, 97, 116, 116, 108, 101, 68, 117, 114, 97, 116, 105, 111, 110, 70, 114, 97, 109, 101, 115, 24, 12, 32, 1, 40, 5, 82, 20, 98, 97, 116, 116, 108, 101, 68, 117, 114, 97, 116, 105, 111, 110, 70, 114, 97, 109, 101, 115, 18, 48, 10, 19, 98, 97, 116, 116, 108, 101, 68, 117, 114, 97, 116, 105, 111, 110, 78, 97, 110, 111, 115, 24, 13, 32, 1, 40, 3, 82, 19, 98, 97, 116, 116, 108, 101, 68, 117, 114, 97, 116, 105, 111, 110, 78, 97, 110, 111, 115, 18, 28, 10, 9, 115, 101, 114, 118, 101, 114, 70, 112, 115, 24, 14, 32, 1, 40, 5, 82, 9, 115, 101, 114, 118, 101, 114, 70, 112, 115, 18, 42, 10, 16, 105, 110, 112, 117, 116, 68, 101, 108, 97, 121, 70, 114, 97, 109, 101, 115, 24, 15, 32, 1, 40, 5, 82, 16, 105, 110, 112, 117, 116, 68, 101, 108, 97, 121, 70, 114, 97, 109, 101, 115, 18, 42, 10, 16, 105, 110, 112, 117, 116, 83, 99, 97, 108, 101, 70, 114, 97, 109, 101, 115, 24, 16, 32, 1, 40, 13, 82, 16, 105, 110, 112, 117, 116, 83, 99, 97, 108, 101, 70, 114, 97, 109, 101, 115, 18, 38, 10, 14, 110, 115, 116, 68, 101, 108, 97, 121, 70, 114, 97, 109, 101, 115, 24, 17, 32, 1, 40, 5, 82, 14, 110, 115, 116, 68, 101, 108, 97, 121, 70, 114, 97, 109, 101, 115, 18, 70, 10, 30, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 85, 112, 115, 121, 110, 99, 68, 101, 108, 97, 121, 84, 111, 108, 101, 114, 97, 110, 99, 101, 24, 18, 32, 1, 40, 5, 82, 30, 105, 110, 112, 117, 116, 70, 114, 97, 109, 101, 85, 112, 115, 121, 110, 99, 68, 101, 108, 97, 121, 84, 111, 108, 101, 114, 97, 110, 99, 101, 18, 72, 10, 31, 109, 97, 120, 67, 104, 97, 115, 105, 110, 103, 82, 101, 110, 100, 101, 114, 70, 114, 97, 109, 101, 115, 80, 101, 114, 85, 112, 100, 97, 116, 101, 24, 19, 32, 1, 40, 5, 82, 31, 109, 97, 120, 67, 104, 97, 115, 105, 110, 103, 82, 101, 110, 100, 101, 114, 70, 114, 97, 109, 101, 115, 80, 101, 114, 85, 112, 100, 97, 116, 101, 18, 44, 10, 17, 112, 108, 97, 121, 101, 114, 66, 97, 116, 116, 108, 101, 83, 116, 97, 116, 101, 24, 20, 32, 1, 40, 5, 82, 17, 112, 108, 97, 121, 101, 114, 66, 97, 116, 116, 108, 101, 83, 116, 97, 116, 101, 18, 60, 10, 25, 114, 111, 108, 108, 98, 97, 99, 107, 69, 115, 116, 105, 109, 97, 116, 101, 100, 68, 116, 77, 105, 108, 108, 105, 115, 24, 21, 32, 1, 40, 1, 82, 25, 114, 111, 108, 108, 98, 97, 99, 107, 69, 115, 116, 105, 109, 97, 116, 101, 100, 68, 116, 77, 105, 108, 108, 105, 115, 18, 58, 10, 24, 114, 111, 108, 108, 98, 97, 99, 107, 69, 115, 116, 105, 109, 97, 116, 101, 100, 68, 116, 78, 97, 110, 111, 115, 24, 22, 32, 1, 40, 3, 82, 24, 114, 111, 108, 108, 98, 97, 99, 107, 69, 115, 116, 105, 109, 97, 116, 101, 100, 68, 116, 78, 97, 110, 111, 115, 18, 56, 10, 23, 119, 111, 114, 108, 100, 84, 111, 86, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 82, 97, 116, 105, 111, 24, 23, 32, 1, 40, 1, 82, 23, 119, 111, 114, 108, 100, 84, 111, 86, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 82, 97, 116, 105, 111, 18, 56, 10, 23, 118, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 84, 111, 87, 111, 114, 108, 100, 82, 97, 116, 105, 111, 24, 24, 32, 1, 40, 1, 82, 23, 118, 105, 114, 116, 117, 97, 108, 71, 114, 105, 100, 84, 111, 87, 111, 114, 108, 100, 82, 97, 116, 105, 111, 18, 44, 10, 17, 115, 112, 65, 116, 107, 76, 111, 111, 107, 117, 112, 70, 114, 97, 109, 101, 115, 24, 25, 32, 1, 40, 5, 82, 17, 115, 112, 65, 116, 107, 76, 111, 111, 107, 117, 112, 70, 114, 97, 109, 101, 115, 18, 40, 10, 15, 114, 101, 110, 100, 101, 114, 67, 97, 99, 104, 101, 83, 105, 122, 101, 24, 26, 32, 1, 40, 5, 82, 15, 114, 101, 110, 100, 101, 114, 67, 97, 99, 104, 101, 83, 105, 122, 101, 18, 92, 10, 16, 109, 101, 108, 101, 101, 83, 107, 105, 108, 108, 67, 111, 110, 102, 105, 103, 24, 27, 32, 3, 40, 11, 50, 48, 46, 112, 114, 111, 116, 111, 115, 46, 66, 97, 116, 116, 108, 101, 67, 111, 108, 108, 105, 100, 101, 114, 73, 110, 102, 111, 46, 77, 101, 108, 101, 101, 83, 107, 105, 108, 108, 67, 111, 110, 102, 105, 103, 69, 110, 116, 114, 121, 82, 16, 109, 101, 108, 101, 101, 83, 107, 105, 108, 108, 67, 111, 110, 102, 105, 103, 18, 56, 10, 23, 115, 110, 97, 112, 73, 110, 116, 111, 80, 108, 97, 116, 102, 111, 114, 109, 79, 118, 101, 114, 108, 97, 112, 24, 28, 32, 1, 40, 1, 82, 23, 115, 110, 97, 112, 73, 110, 116, 111, 80, 108, 97, 116, 102, 111, 114, 109, 79, 118, 101, 114, 108, 97, 112, 18, 60, 10, 25, 115, 110, 97, 112, 73, 110, 116, 111, 80, 108, 97, 116, 102, 111, 114, 109, 84, 104, 114, 101, 115, 104, 111, 108, 100, 24, 29, 32, 1, 40, 1, 82, 25, 115, 110, 97, 112, 73, 110, 116, 111, 80, 108, 97, 116, 102, 111, 114, 109, 84, 104, 114, 101, 115, 104, 111, 108, 100, 18, 40, 10, 15, 106, 117, 109, 112, 105, 110, 103, 73, 110, 105, 116, 86, 101, 108, 89, 24, 30, 32, 1, 40, 5, 82, 15, 106, 117, 109, 112, 105, 110, 103, 73, 110, 105, 116, 86, 101, 108, 89, 18, 26, 10, 8, 103, 114, 97, 118, 105, 116, 121, 88, 24, 31, 32, 1, 40, 5, 82, 8, 103, 114, 97, 118, 105, 116, 121, 88, 18, 26, 10, 8, 103, 114, 97, 118, 105, 116, 121, 89, 24, 32, 32, 1, 40, 5, 82, 8, 103, 114, 97, 118, 105, 116, 121, 89, 26, 93, 10, 22, 83, 116, 114, 84, 111, 86, 101, 99, 50, 68, 76, 105, 115, 116, 77, 97, 112, 69, 110, 116, 114, 121, 18, 16, 10, 3, 107, 101, 121, 24, 1, 32, 1, 40, 9, 82, 3, 107, 101, 121, 18, 45, 10, 5, 118, 97, 108, 117, 101, 24, 2, 32, 1, 40, 11, 50, 23, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 86, 101, 99, 50, 68, 76, 105, 115, 116, 82, 5, 118, 97, 108, 117, 101, 58, 2, 56, 1, 26, 101, 10, 26, 83, 116, 114, 84, 111, 80, 111, 108, 121, 103, 111, 110, 50, 68, 76, 105, 115, 116, 77, 97, 112, 69, 110, 116, 114, 121, 18, 16, 10, 3, 107, 101, 121, 24, 1, 32, 1, 40, 9, 82, 3, 107, 101, 121, 18, 49, 10, 5, 118, 97, 108, 117, 101, 24, 2, 32, 1, 40, 11, 50, 27, 46, 115, 104, 97, 114, 101, 100, 112, 114, 111, 116, 111, 115, 46, 80, 111, 108, 121, 103, 111, 110, 50, 68, 76, 105, 115, 116, 82, 5, 118, 97, 108, 117, 101, 58, 2, 56, 1, 26, 88, 10, 21, 77, 101, 108, 101, 101, 83, 107, 105, 108, 108, 67, 111, 110, 102, 105, 103, 69, 110, 116, 114, 121, 18, 16, 10, 3, 107, 101, 121, 24, 1, 32, 1, 40, 5, 82, 3, 107, 101, 121, 18, 41, 10, 5, 118, 97, 108, 117, 101, 24, 2, 32, 1, 40, 11, 50, 19, 46, 112, 114, 111, 116, 111, 115, 46, 77, 101, 108, 101, 101, 66, 117, 108, 108, 101, 116, 82, 5, 118, 97, 108, 117, 101, 58, 2, 56, 1, 34, 184, 3, 10, 17, 82, 111, 111, 109, 68, 111, 119, 110, 115, 121, 110, 99, 70, 114, 97, 109, 101, 18, 14, 10, 2, 105, 100, 24, 1, 32, 1, 40, 5, 82, 2, 105, 100, 18, 54, 10, 10, 112, 108, 97, 121, 101, 114, 115, 65, 114, 114, 24, 2, 32, 3, 40, 11, 50, 22, 46, 112, 114, 111, 116, 111, 115, 46, 80, 108, 97, 121, 101, 114, 68, 111, 119, 110, 115, 121, 110, 99, 82, 10, 112, 108, 97, 121, 101, 114, 115, 65, 114, 114, 18, 38, 10, 14, 99, 111, 117, 110, 116, 100, 111, 119, 110, 78, 97, 110, 111, 115, 24, 3, 32, 1, 40, 3, 82, 14, 99, 111, 117, 110, 116, 100, 111, 119, 110, 78, 97, 110, 111, 115, 18, 55, 10, 12, 109, 101, 108, 101, 101, 66, 117, 108, 108, 101, 116, 115, 24, 4, 32, 3, 40, 11, 50, 19, 46, 112, 114, 111, 116, 111, 115, 46, 77, 101, 108, 101, 101, 66, 117, 108, 108, 101, 116, 82, 12, 109, 101, 108, 101, 101, 66, 117, 108, 108, 101, 116, 115, 18, 54, 10, 22, 98, 97, 99, 107, 101, 110, 100, 85, 110, 99, 111, 110, 102, 105, 114, 109, 101, 100, 77, 97, 115, 107, 24, 5, 32, 1, 40, 4, 82, 22, 98, 97, 99, 107, 101, 110, 100, 85, 110, 99, 111, 110, 102, 105, 114, 109, 101, 100, 77, 97, 115, 107, 18, 44, 10, 17, 115, 104, 111, 117, 108, 100, 70, 111, 114, 99, 101, 82, 101, 115, 121, 110, 99, 24, 6, 32, 1, 40, 8, 82, 17, 115, 104, 111, 117, 108, 100, 70, 111, 114, 99, 101, 82, 101, 115, 121, 110, 99, 18, 64, 10, 7, 112, 108, 97, 121, 101, 114, 115, 24, 99, 32, 3, 40, 11, 50, 38, 46, 112, 114, 111, 116, 111, 115, 46, 82, 111, 111, 109, 68, 111, 119, 110, 115, 121, 110, 99, 70, 114, 97, 109, 101, 46, 80, 108, 97, 121, 101, 114, 115, 69, 110, 116, 114, 121, 82, 7, 112, 108, 97, 121, 101, 114, 115, 26, 82, 10, 12, 80, 108, 97, 121, 101, 114, 115, 69, 110, 116, 114, 121, 18, 16, 10, 3, 107, 101, 121, 24, 1, 32, 1, 40, 5, 82, 3, 107, 101, 121, 18, 44, 10, 5, 118, 97, 108, 117, 101, 24, 2, 32, 1, 40, 11, 50, 22, 46, 112, 114, 111, 116, 111, 115, 46, 80, 108, 97, 121, 101, 114, 68, 111, 119, 110, 115, 121, 110, 99, 82, 5, 118, 97, 108, 117, 101, 58, 2, 56, 1, 66, 17, 90, 15, 106, 115, 101, 120, 112, 111, 114, 116, 47, 112, 114, 111, 116, 111, 115, 98, 6, 112, 114, 111, 116, 111, 51]); - file_room_downsync_frame_proto_rawDescData = file_room_downsync_frame_proto_rawDesc; - file_room_downsync_frame_proto_msgTypes = $makeSlice(sliceType$1, 16); - file_room_downsync_frame_proto_goTypes = new sliceType$2([(ptrType.nil), (ptrType$1.nil), (ptrType$2.nil), (ptrType$3.nil), (ptrType$4.nil), (ptrType$5.nil), (ptrType$6.nil), (ptrType$7.nil), (ptrType$8.nil), (ptrType$9.nil), (ptrType$10.nil), (ptrType$11.nil), $ifaceNil, $ifaceNil, $ifaceNil, $ifaceNil, (ptrType$12.nil), (ptrType$13.nil), (ptrType$14.nil), (ptrType$15.nil)]); - file_room_downsync_frame_proto_depIdxs = new sliceType$3([2, 4, 11, 3, 10, 3, 16, 17, 17, 12, 13, 14, 0, 9, 15, 18, 19, 9, 0, 19, 19, 19, 19, 0]); - $r = init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["jsexport/models"] = (function() { - var $pkg = {}, $init, dnmshared, sharedprotos, resolv, protos, sliceType, sliceType$1, funcType, arrayType, arrayType$1, ptrType, sliceType$2, sliceType$3, sliceType$4, ptrType$1, ptrType$2, ptrType$3, ptrType$4, sliceType$5, sliceType$6, ptrType$5, ptrType$6, ptrType$7, sliceType$7, DecodeInput, CalcHardPushbacksNorms, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame; - dnmshared = $packages["dnmshared"]; - sharedprotos = $packages["dnmshared/sharedprotos"]; - resolv = $packages["github.com/solarlune/resolv"]; - protos = $packages["jsexport/protos"]; - sliceType = $sliceType($Int32); - sliceType$1 = $sliceType(sliceType); - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - arrayType$1 = $arrayType($packages["sync"].Mutex, 0); - ptrType = $ptrType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - sliceType$2 = $sliceType($Uint8); - sliceType$3 = $sliceType(sharedprotos.Vec2D); - sliceType$4 = $sliceType($String); - ptrType$1 = $ptrType(resolv.Collision); - ptrType$2 = $ptrType(protos.Barrier); - ptrType$3 = $ptrType(resolv.ConvexPolygon); - ptrType$4 = $ptrType(protos.PlayerDownsync); - sliceType$5 = $sliceType(ptrType$4); - sliceType$6 = $sliceType(sliceType$3); - ptrType$5 = $ptrType(protos.InputFrameDownsync); - ptrType$6 = $ptrType(resolv.Object); - ptrType$7 = $ptrType(protos.MeleeBullet); - sliceType$7 = $sliceType(ptrType$7); - DecodeInput = function(encodedInput) { - var btnALevel, btnBLevel, encodedDirection, encodedInput, x, x$1, x$2, x$3; - encodedDirection = new $Uint64(encodedInput.$high & 0, (encodedInput.$low & 15) >>> 0); - btnALevel = (((x = $shiftRightUint64(encodedInput, 4), new $Uint64(x.$high & 0, (x.$low & 1) >>> 0)).$low >> 0)); - btnBLevel = (((x$1 = $shiftRightUint64(encodedInput, 5), new $Uint64(x$1.$high & 0, (x$1.$low & 1) >>> 0)).$low >> 0)); - return new protos.InputFrameDecoded.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType$2.nil, (x$2 = (($flatten64(encodedDirection) < 0 || $flatten64(encodedDirection) >= $pkg.DIRECTION_DECODER.$length) ? ($throwRuntimeError("index out of range"), undefined) : $pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset + $flatten64(encodedDirection)]), (0 >= x$2.$length ? ($throwRuntimeError("index out of range"), undefined) : x$2.$array[x$2.$offset + 0])), (x$3 = (($flatten64(encodedDirection) < 0 || $flatten64(encodedDirection) >= $pkg.DIRECTION_DECODER.$length) ? ($throwRuntimeError("index out of range"), undefined) : $pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset + $flatten64(encodedDirection)]), (1 >= x$3.$length ? ($throwRuntimeError("index out of range"), undefined) : x$3.$array[x$3.$offset + 1])), btnALevel, btnBLevel); - }; - $pkg.DecodeInput = DecodeInput; - CalcHardPushbacksNorms = function(playerCollider, playerShape, snapIntoPlatformOverlap, pEffPushback) { - var {_i, _r, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tuple, barrierShape, collision, obj, overlapResult, overlapped, pEffPushback, playerCollider, playerShape, pushbackX, pushbackY, ret, snapIntoPlatformOverlap, $s, $r, $c} = $restore(this, {playerCollider, playerShape, snapIntoPlatformOverlap, pEffPushback}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = $makeSlice(sliceType$3, 0, 10); - _r = playerCollider.Check(0, 0, new sliceType$4([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - collision = _r; - if (ptrType$1.nil === collision) { - $s = -1; return ret; - } - _ref = collision.Objects; - _i = 0; - /* while (true) { */ case 2: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 3; continue; } - obj = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _ref$1 = obj.Data; - /* */ if ($assertType(_ref$1, ptrType$2, true)[1]) { $s = 4; continue; } - /* */ $s = 5; continue; - /* if ($assertType(_ref$1, ptrType$2, true)[1]) { */ case 4: - barrierShape = $assertType(obj.Shape, ptrType$3); - _r$1 = dnmshared.CalcPushbacks(0, 0, playerShape, barrierShape); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - _tuple = _r$1; - overlapped = _tuple[0]; - pushbackX = _tuple[1]; - pushbackY = _tuple[2]; - overlapResult = _tuple[3]; - if (!overlapped) { - _i++; - /* continue; */ $s = 2; continue; - } - _tmp = (overlapResult.Overlap - snapIntoPlatformOverlap) * overlapResult.OverlapX; - _tmp$1 = (overlapResult.Overlap - snapIntoPlatformOverlap) * overlapResult.OverlapY; - pushbackX = _tmp; - pushbackY = _tmp$1; - ret = $append(ret, new sharedprotos.Vec2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType$2.nil, overlapResult.OverlapX, overlapResult.OverlapY)); - pEffPushback.X = pEffPushback.X + (pushbackX); - pEffPushback.Y = pEffPushback.Y + (pushbackY); - $s = 6; continue; - /* } else { */ case 5: - /* } */ case 6: - _i++; - $s = 2; continue; - case 3: - $s = -1; return ret; - /* */ } return; } var $f = {$blk: CalcHardPushbacksNorms, $c: true, $r, _i, _r, _r$1, _ref, _ref$1, _tmp, _tmp$1, _tuple, barrierShape, collision, obj, overlapResult, overlapped, pEffPushback, playerCollider, playerShape, pushbackX, pushbackY, ret, snapIntoPlatformOverlap, $s};return $f; - }; - $pkg.CalcHardPushbacksNorms = CalcHardPushbacksNorms; - ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame = function(delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio) { - var {_1, _entry, _entry$1, _entry$2, _i, _i$1, _i$2, _i$3, _i$4, _i$5, _i$6, _index, _index$1, _r, _r$1, _r$2, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, bShape, bottomPadding, characStateAlreadyInAir, characStateIsInterruptWaivable, collision, collisionPlayerIndex, collisionPlayerIndex$1, collisionPlayerIndex$2, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currPlayerDownsync, currPlayerDownsync$1, currPlayerDownsync$2, currPlayerDownsync$3, currPlayerDownsync$4, currRenderFrame, decodedInput, delayedInputFrame, delayedInputFrameForPrevRenderFrame, effPushbacks, fallStopping, gravityX, gravityY, halfColliderHeight, halfColliderHeight$1, halfColliderWidth, halfColliderWidth$1, hardPushbackNorm, hardPushbackNorms, i, i$1, i$2, i$3, i$4, inputDelayFrames, inputList, inputScaleFrames, isAnotherPlayer, isBarrier, isBullet, joinIndex, joinIndex$1, joinIndex$2, joinIndex$3, jumpingInitVelY, landedOnGravityPushback, leftPadding, newVx, newVy, nextRenderFramePlayers, normAlignmentWithGravity, obj, oldNextCharacterState, overlapResult, overlapped, playerCollider, playerCollider$1, playerCollider$2, playerShape, prevBtnBLevel, prevDecodedInput, projectedMagnitude, pushbackX, pushbackY, rightPadding, roomCapacity, snapIntoPlatformOverlap, snapIntoPlatformThreshold, thatPlayerInNextFrame, thatPlayerInNextFrame$1, thatPlayerInNextFrame$2, thatPlayerInNextFrame$3, topPadding, virtualGridToWorldRatio, worldToVirtualGridRatio, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s, $r, $c} = $restore(this, {delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _tmp = snapIntoPlatformOverlap; - _tmp$1 = snapIntoPlatformOverlap; - _tmp$2 = snapIntoPlatformOverlap; - _tmp$3 = snapIntoPlatformOverlap; - topPadding = _tmp; - bottomPadding = _tmp$1; - leftPadding = _tmp$2; - rightPadding = _tmp$3; - roomCapacity = currRenderFrame.PlayersArr.$length; - nextRenderFramePlayers = $makeSlice(sliceType$5, roomCapacity); - _ref = currRenderFrame.PlayersArr; - _i = 0; - while (true) { - if (!(_i < _ref.$length)) { break; } - i = _i; - currPlayerDownsync = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - ((i < 0 || i >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i] = new protos.PlayerDownsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType$2.nil, currPlayerDownsync.Id, currPlayerDownsync.VirtualGridX, currPlayerDownsync.VirtualGridY, currPlayerDownsync.DirX, currPlayerDownsync.DirY, currPlayerDownsync.VelX, currPlayerDownsync.VelY, currPlayerDownsync.Speed, currPlayerDownsync.BattleState, currPlayerDownsync.JoinIndex, 0, currPlayerDownsync.Removed, currPlayerDownsync.Score, 0, currPlayerDownsync.FramesToRecover - 1 >> 0, currPlayerDownsync.Hp, currPlayerDownsync.MaxHp, currPlayerDownsync.CharacterState, true, "", "", "")); - if (((i < 0 || i >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i]).FramesToRecover < 0) { - ((i < 0 || i >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i]).FramesToRecover = 0; - } - _i++; - } - effPushbacks = $makeSlice(sliceType$3, roomCapacity); - hardPushbackNorms = $makeSlice(sliceType$6, roomCapacity); - if (!(ptrType$5.nil === delayedInputFrame)) { - inputList = delayedInputFrame.InputList; - _ref$1 = currRenderFrame.PlayersArr; - _i$1 = 0; - while (true) { - if (!(_i$1 < _ref$1.$length)) { break; } - i$1 = _i$1; - currPlayerDownsync$1 = ((_i$1 < 0 || _i$1 >= _ref$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$1.$array[_ref$1.$offset + _i$1]); - joinIndex = currPlayerDownsync$1.JoinIndex; - thatPlayerInNextFrame = ((i$1 < 0 || i$1 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$1]); - if (0 < thatPlayerInNextFrame.FramesToRecover) { - _i$1++; - continue; - } - decodedInput = DecodeInput((x = joinIndex - 1 >> 0, ((x < 0 || x >= inputList.$length) ? ($throwRuntimeError("index out of range"), undefined) : inputList.$array[inputList.$offset + x]))); - prevBtnBLevel = 0; - if (!(ptrType$5.nil === delayedInputFrameForPrevRenderFrame)) { - prevDecodedInput = DecodeInput((x$1 = delayedInputFrameForPrevRenderFrame.InputList, x$2 = joinIndex - 1 >> 0, ((x$2 < 0 || x$2 >= x$1.$length) ? ($throwRuntimeError("index out of range"), undefined) : x$1.$array[x$1.$offset + x$2]))); - prevBtnBLevel = prevDecodedInput.BtnBLevel; - } - if (decodedInput.BtnBLevel > prevBtnBLevel) { - characStateAlreadyInAir = false; - if ((4 === thatPlayerInNextFrame.CharacterState) || (5 === thatPlayerInNextFrame.CharacterState) || (6 === thatPlayerInNextFrame.CharacterState)) { - characStateAlreadyInAir = true; - } - characStateIsInterruptWaivable = false; - if ((0 === thatPlayerInNextFrame.CharacterState) || (1 === thatPlayerInNextFrame.CharacterState) || (4 === thatPlayerInNextFrame.CharacterState)) { - characStateIsInterruptWaivable = true; - } - if (!characStateAlreadyInAir && characStateIsInterruptWaivable) { - thatPlayerInNextFrame.VelY = jumpingInitVelY; - } - } - if (!((0 === decodedInput.Dx)) || !((0 === decodedInput.Dy))) { - thatPlayerInNextFrame.DirX = decodedInput.Dx; - thatPlayerInNextFrame.DirY = decodedInput.Dy; - thatPlayerInNextFrame.VelX = $imul(decodedInput.Dx, currPlayerDownsync$1.Speed); - thatPlayerInNextFrame.CharacterState = 1; - } else { - thatPlayerInNextFrame.CharacterState = 0; - thatPlayerInNextFrame.VelX = 0; - } - _i$1++; - } - } - _ref$2 = currRenderFrame.PlayersArr; - _i$2 = 0; - /* while (true) { */ case 1: - /* if (!(_i$2 < _ref$2.$length)) { break; } */ if(!(_i$2 < _ref$2.$length)) { $s = 2; continue; } - i$2 = _i$2; - currPlayerDownsync$2 = ((_i$2 < 0 || _i$2 >= _ref$2.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$2.$array[_ref$2.$offset + _i$2]); - joinIndex$1 = currPlayerDownsync$2.JoinIndex; - _tmp$4 = 0; - _tmp$5 = 0; - (x$3 = joinIndex$1 - 1 >> 0, ((x$3 < 0 || x$3 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$3])).X = _tmp$4; - (x$4 = joinIndex$1 - 1 >> 0, ((x$4 < 0 || x$4 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$4])).Y = _tmp$5; - collisionPlayerIndex = 131072 + joinIndex$1 >> 0; - playerCollider = (_entry = collisionSysMap[$Int32.keyFor(collisionPlayerIndex)], _entry !== undefined ? _entry.v : ptrType$6.nil); - thatPlayerInNextFrame$1 = ((i$2 < 0 || i$2 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$2]); - _tmp$6 = currPlayerDownsync$2.VirtualGridX + currPlayerDownsync$2.VelX >> 0; - _tmp$7 = currPlayerDownsync$2.VirtualGridY + currPlayerDownsync$2.VelY >> 0; - newVx = _tmp$6; - newVy = _tmp$7; - if (thatPlayerInNextFrame$1.VelY === jumpingInitVelY) { - newVy = newVy + (thatPlayerInNextFrame$1.VelY) >> 0; - } - _tmp$8 = currPlayerDownsync$2.ColliderRadius; - _tmp$9 = currPlayerDownsync$2.ColliderRadius + currPlayerDownsync$2.ColliderRadius; - halfColliderWidth = _tmp$8; - halfColliderHeight = _tmp$9; - _tuple = dnmshared.VirtualGridToPolygonColliderBLPos(newVx, newVy, halfColliderWidth, halfColliderHeight, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, virtualGridToWorldRatio); - playerCollider.X = _tuple[0]; - playerCollider.Y = _tuple[1]; - $r = playerCollider.Update(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if (currPlayerDownsync$2.InAir) { - thatPlayerInNextFrame$1.VelX = thatPlayerInNextFrame$1.VelX + (gravityX) >> 0; - thatPlayerInNextFrame$1.VelY = thatPlayerInNextFrame$1.VelY + (gravityY) >> 0; - } - _i$2++; - $s = 1; continue; - case 2: - _ref$3 = currRenderFrame.PlayersArr; - _i$3 = 0; - /* while (true) { */ case 4: - /* if (!(_i$3 < _ref$3.$length)) { break; } */ if(!(_i$3 < _ref$3.$length)) { $s = 5; continue; } - i$3 = _i$3; - currPlayerDownsync$3 = ((_i$3 < 0 || _i$3 >= _ref$3.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$3.$array[_ref$3.$offset + _i$3]); - joinIndex$2 = currPlayerDownsync$3.JoinIndex; - collisionPlayerIndex$1 = 131072 + joinIndex$2 >> 0; - playerCollider$1 = (_entry$1 = collisionSysMap[$Int32.keyFor(collisionPlayerIndex$1)], _entry$1 !== undefined ? _entry$1.v : ptrType$6.nil); - playerShape = $assertType(playerCollider$1.Shape, ptrType$3); - _r = CalcHardPushbacksNorms(playerCollider$1, playerShape, snapIntoPlatformOverlap, (x$5 = joinIndex$2 - 1 >> 0, ((x$5 < 0 || x$5 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$5]))); /* */ $s = 6; case 6: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - (x$6 = joinIndex$2 - 1 >> 0, ((x$6 < 0 || x$6 >= hardPushbackNorms.$length) ? ($throwRuntimeError("index out of range"), undefined) : hardPushbackNorms.$array[hardPushbackNorms.$offset + x$6] = _r)); - thatPlayerInNextFrame$2 = ((i$3 < 0 || i$3 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$3]); - fallStopping = false; - _r$1 = playerCollider$1.Check(0, 0, new sliceType$4([])); /* */ $s = 7; case 7: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - collision = _r$1; - /* */ if (!(ptrType$1.nil === collision)) { $s = 8; continue; } - /* */ $s = 9; continue; - /* if (!(ptrType$1.nil === collision)) { */ case 8: - _ref$4 = collision.Objects; - _i$4 = 0; - /* while (true) { */ case 10: - /* if (!(_i$4 < _ref$4.$length)) { break; } */ if(!(_i$4 < _ref$4.$length)) { $s = 11; continue; } - obj = ((_i$4 < 0 || _i$4 >= _ref$4.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$4.$array[_ref$4.$offset + _i$4]); - _tmp$10 = false; - _tmp$11 = false; - _tmp$12 = false; - isBarrier = _tmp$10; - isAnotherPlayer = _tmp$11; - isBullet = _tmp$12; - _ref$5 = obj.Data; - if ($assertType(_ref$5, ptrType$2, true)[1]) { - isBarrier = true; - } else if ($assertType(_ref$5, ptrType$4, true)[1]) { - isAnotherPlayer = true; - } else if ($assertType(_ref$5, ptrType$7, true)[1]) { - isBullet = true; - } - if (isBullet) { - _i$4++; - /* continue; */ $s = 10; continue; - } - bShape = $assertType(obj.Shape, ptrType$3); - _r$2 = dnmshared.CalcPushbacks(0, 0, playerShape, bShape); /* */ $s = 12; case 12: if($c) { $c = false; _r$2 = _r$2.$blk(); } if (_r$2 && _r$2.$blk !== undefined) { break s; } - _tuple$1 = _r$2; - overlapped = _tuple$1[0]; - pushbackX = _tuple$1[1]; - pushbackY = _tuple$1[2]; - overlapResult = _tuple$1[3]; - if (!overlapped) { - _i$4++; - /* continue; */ $s = 10; continue; - } - normAlignmentWithGravity = overlapResult.OverlapX * 0 + overlapResult.OverlapY * -1; - landedOnGravityPushback = snapIntoPlatformThreshold < normAlignmentWithGravity; - if (landedOnGravityPushback) { - _tmp$13 = (overlapResult.Overlap - snapIntoPlatformOverlap) * overlapResult.OverlapX; - _tmp$14 = (overlapResult.Overlap - snapIntoPlatformOverlap) * overlapResult.OverlapY; - pushbackX = _tmp$13; - pushbackY = _tmp$14; - thatPlayerInNextFrame$2.InAir = false; - } - if (isAnotherPlayer) { - _tmp$15 = (overlapResult.Overlap - snapIntoPlatformOverlap * 2) * overlapResult.OverlapX; - _tmp$16 = (overlapResult.Overlap - snapIntoPlatformOverlap * 2) * overlapResult.OverlapY; - pushbackX = _tmp$15; - pushbackY = _tmp$16; - } - _ref$6 = (x$7 = joinIndex$2 - 1 >> 0, ((x$7 < 0 || x$7 >= hardPushbackNorms.$length) ? ($throwRuntimeError("index out of range"), undefined) : hardPushbackNorms.$array[hardPushbackNorms.$offset + x$7])); - _i$5 = 0; - while (true) { - if (!(_i$5 < _ref$6.$length)) { break; } - hardPushbackNorm = $clone(((_i$5 < 0 || _i$5 >= _ref$6.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$6.$array[_ref$6.$offset + _i$5]), sharedprotos.Vec2D); - projectedMagnitude = pushbackX * hardPushbackNorm.X + pushbackY * hardPushbackNorm.Y; - if (isBarrier || (isAnotherPlayer && 0 > projectedMagnitude)) { - pushbackX = pushbackX - (projectedMagnitude * hardPushbackNorm.X); - pushbackY = pushbackY - (projectedMagnitude * hardPushbackNorm.Y); - } - _i$5++; - } - _index = joinIndex$2 - 1 >> 0; - ((_index < 0 || _index >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index]).X = ((_index < 0 || _index >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index]).X + (pushbackX); - _index$1 = joinIndex$2 - 1 >> 0; - ((_index$1 < 0 || _index$1 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$1]).Y = ((_index$1 < 0 || _index$1 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + _index$1]).Y + (pushbackY); - if (currPlayerDownsync$3.InAir && landedOnGravityPushback) { - fallStopping = true; - } - _i$4++; - $s = 10; continue; - case 11: - /* } */ case 9: - if (fallStopping) { - thatPlayerInNextFrame$2.VelX = 0; - thatPlayerInNextFrame$2.VelY = 0; - thatPlayerInNextFrame$2.CharacterState = 0; - thatPlayerInNextFrame$2.FramesToRecover = 0; - } - if (currPlayerDownsync$3.InAir) { - oldNextCharacterState = thatPlayerInNextFrame$2.CharacterState; - _1 = oldNextCharacterState; - if ((_1 === (0)) || (_1 === (1))) { - thatPlayerInNextFrame$2.CharacterState = 4; - } else if (_1 === (2)) { - thatPlayerInNextFrame$2.CharacterState = 5; - } else if (_1 === (3)) { - thatPlayerInNextFrame$2.CharacterState = 6; - } - } - _i$3++; - $s = 4; continue; - case 5: - _ref$7 = currRenderFrame.PlayersArr; - _i$6 = 0; - while (true) { - if (!(_i$6 < _ref$7.$length)) { break; } - i$4 = _i$6; - currPlayerDownsync$4 = ((_i$6 < 0 || _i$6 >= _ref$7.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref$7.$array[_ref$7.$offset + _i$6]); - joinIndex$3 = currPlayerDownsync$4.JoinIndex; - collisionPlayerIndex$2 = 131072 + joinIndex$3 >> 0; - playerCollider$2 = (_entry$2 = collisionSysMap[$Int32.keyFor(collisionPlayerIndex$2)], _entry$2 !== undefined ? _entry$2.v : ptrType$6.nil); - thatPlayerInNextFrame$3 = ((i$4 < 0 || i$4 >= nextRenderFramePlayers.$length) ? ($throwRuntimeError("index out of range"), undefined) : nextRenderFramePlayers.$array[nextRenderFramePlayers.$offset + i$4]); - _tmp$17 = currPlayerDownsync$4.ColliderRadius; - _tmp$18 = currPlayerDownsync$4.ColliderRadius + currPlayerDownsync$4.ColliderRadius; - halfColliderWidth$1 = _tmp$17; - halfColliderHeight$1 = _tmp$18; - _tuple$2 = dnmshared.PolygonColliderBLToVirtualGridPos(playerCollider$2.X - (x$8 = joinIndex$3 - 1 >> 0, ((x$8 < 0 || x$8 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$8])).X, playerCollider$2.Y - (x$9 = joinIndex$3 - 1 >> 0, ((x$9 < 0 || x$9 >= effPushbacks.$length) ? ($throwRuntimeError("index out of range"), undefined) : effPushbacks.$array[effPushbacks.$offset + x$9])).Y, halfColliderWidth$1, halfColliderHeight$1, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, worldToVirtualGridRatio); - thatPlayerInNextFrame$3.VirtualGridX = _tuple$2[0]; - thatPlayerInNextFrame$3.VirtualGridY = _tuple$2[1]; - _i$6++; - } - $s = -1; return new protos.RoomDownsyncFrame.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType$2.nil, currRenderFrame.Id + 1 >> 0, nextRenderFramePlayers, new $Int64(0, 0), sliceType$7.nil, new $Uint64(0, 0), false, false); - /* */ } return; } var $f = {$blk: ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame, $c: true, $r, _1, _entry, _entry$1, _entry$2, _i, _i$1, _i$2, _i$3, _i$4, _i$5, _i$6, _index, _index$1, _r, _r$1, _r$2, _ref, _ref$1, _ref$2, _ref$3, _ref$4, _ref$5, _ref$6, _ref$7, _tmp, _tmp$1, _tmp$10, _tmp$11, _tmp$12, _tmp$13, _tmp$14, _tmp$15, _tmp$16, _tmp$17, _tmp$18, _tmp$2, _tmp$3, _tmp$4, _tmp$5, _tmp$6, _tmp$7, _tmp$8, _tmp$9, _tuple, _tuple$1, _tuple$2, bShape, bottomPadding, characStateAlreadyInAir, characStateIsInterruptWaivable, collision, collisionPlayerIndex, collisionPlayerIndex$1, collisionPlayerIndex$2, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currPlayerDownsync, currPlayerDownsync$1, currPlayerDownsync$2, currPlayerDownsync$3, currPlayerDownsync$4, currRenderFrame, decodedInput, delayedInputFrame, delayedInputFrameForPrevRenderFrame, effPushbacks, fallStopping, gravityX, gravityY, halfColliderHeight, halfColliderHeight$1, halfColliderWidth, halfColliderWidth$1, hardPushbackNorm, hardPushbackNorms, i, i$1, i$2, i$3, i$4, inputDelayFrames, inputList, inputScaleFrames, isAnotherPlayer, isBarrier, isBullet, joinIndex, joinIndex$1, joinIndex$2, joinIndex$3, jumpingInitVelY, landedOnGravityPushback, leftPadding, newVx, newVy, nextRenderFramePlayers, normAlignmentWithGravity, obj, oldNextCharacterState, overlapResult, overlapped, playerCollider, playerCollider$1, playerCollider$2, playerShape, prevBtnBLevel, prevDecodedInput, projectedMagnitude, pushbackX, pushbackY, rightPadding, roomCapacity, snapIntoPlatformOverlap, snapIntoPlatformThreshold, thatPlayerInNextFrame, thatPlayerInNextFrame$1, thatPlayerInNextFrame$2, thatPlayerInNextFrame$3, topPadding, virtualGridToWorldRatio, worldToVirtualGridRatio, x, x$1, x$2, x$3, x$4, x$5, x$6, x$7, x$8, x$9, $s};return $f; - }; - $pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = dnmshared.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sharedprotos.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = resolv.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protos.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $pkg.DIRECTION_DECODER = new sliceType$1([new sliceType([0, 0]), new sliceType([0, 2]), new sliceType([0, -2]), new sliceType([2, 0]), new sliceType([-2, 0]), new sliceType([1, 1]), new sliceType([-1, -1]), new sliceType([1, -1]), new sliceType([-1, 1])]); - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); -$packages["jsexport"] = (function() { - var $pkg = {}, $init, dnmshared, sharedprotos, js, resolv, models, protos, funcType, arrayType, arrayType$1, ptrType, sliceType, ptrType$1, sliceType$1, ptrType$2, ptrType$3, sliceType$2, ptrType$4, sliceType$3, sliceType$4, ptrType$5, sliceType$5, sliceType$6, funcType$1, funcType$2, funcType$3, funcType$4, funcType$5, funcType$6, funcType$7, funcType$8, funcType$9, ptrType$6, funcType$10, ptrType$7, ptrType$8, ptrType$9, mapType, funcType$11, funcType$12, mapType$1, NewCollisionSpaceJs, NewVec2DJs, NewPolygon2DJs, NewBarrierJs, NewPlayerDownsyncJs, NewRoomDownsyncFrameJs, NewInputFrameDownsyncJs, GetPlayersArrJs, GenerateRectColliderJs, GenerateConvexPolygonColliderJs, CheckCollisionJs, ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, main; - dnmshared = $packages["dnmshared"]; - sharedprotos = $packages["dnmshared/sharedprotos"]; - js = $packages["github.com/gopherjs/gopherjs/js"]; - resolv = $packages["github.com/solarlune/resolv"]; - models = $packages["jsexport/models"]; - protos = $packages["jsexport/protos"]; - funcType = $funcType([], [], false); - arrayType = $arrayType(funcType, 0); - arrayType$1 = $arrayType($packages["sync"].Mutex, 0); - ptrType = $ptrType($packages["google.golang.org/protobuf/internal/impl"].MessageInfo); - sliceType = $sliceType($Uint8); - ptrType$1 = $ptrType(sharedprotos.Vec2D); - sliceType$1 = $sliceType(ptrType$1); - ptrType$2 = $ptrType(sharedprotos.Polygon2D); - ptrType$3 = $ptrType(protos.PlayerDownsync); - sliceType$2 = $sliceType(ptrType$3); - ptrType$4 = $ptrType(protos.MeleeBullet); - sliceType$3 = $sliceType(ptrType$4); - sliceType$4 = $sliceType($Uint64); - ptrType$5 = $ptrType(js.Object); - sliceType$5 = $sliceType(ptrType$5); - sliceType$6 = $sliceType($String); - funcType$1 = $funcType([$Float64, $Float64], [ptrType$5], false); - funcType$2 = $funcType([ptrType$1, sliceType$1], [ptrType$5], false); - funcType$3 = $funcType([ptrType$2], [ptrType$5], false); - funcType$4 = $funcType([$Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Int32, $Bool, $Float64], [ptrType$5], false); - funcType$5 = $funcType([$Int32, sliceType$2, sliceType$3], [ptrType$5], false); - funcType$6 = $funcType([$Int, $Int, $Int, $Int], [ptrType$5], false); - funcType$7 = $funcType([$Int32, sliceType$4, $Uint64], [ptrType$5], false); - funcType$8 = $funcType([$Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false); - funcType$9 = $funcType([ptrType$2, $Float64, $Float64, $emptyInterface, $String], [ptrType$5], false); - ptrType$6 = $ptrType(protos.RoomDownsyncFrame); - funcType$10 = $funcType([ptrType$6], [sliceType$5], false); - ptrType$7 = $ptrType(protos.InputFrameDownsync); - ptrType$8 = $ptrType(resolv.Space); - ptrType$9 = $ptrType(resolv.Object); - mapType = $mapType($Int32, ptrType$9); - funcType$11 = $funcType([ptrType$7, ptrType$7, ptrType$6, ptrType$8, mapType, $Int32, $Int32, $Int32, $Int32, $Int32, $Float64, $Float64, $Float64, $Float64, $Float64, $Float64], [ptrType$5], false); - funcType$12 = $funcType([ptrType$9, $Float64, $Float64], [ptrType$5], false); - mapType$1 = $mapType($String, $emptyInterface); - NewCollisionSpaceJs = function(spaceW, spaceH, minStepW, minStepH) { - var minStepH, minStepW, spaceH, spaceW; - return js.MakeWrapper(resolv.NewSpace(spaceW, spaceH, minStepW, minStepH)); - }; - $pkg.NewCollisionSpaceJs = NewCollisionSpaceJs; - NewVec2DJs = function(x, y) { - var {$24r, _r, x, y, $s, $r, $c} = $restore(this, {x, y}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = js.MakeFullWrapper(new sharedprotos.Vec2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType.nil, x, y)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewVec2DJs, $c: true, $r, $24r, _r, x, y, $s};return $f; - }; - $pkg.NewVec2DJs = NewVec2DJs; - NewPolygon2DJs = function(anchor, points) { - var {$24r, _r, anchor, points, $s, $r, $c} = $restore(this, {anchor, points}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = js.MakeFullWrapper(new sharedprotos.Polygon2D.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType.nil, anchor, points)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewPolygon2DJs, $c: true, $r, $24r, _r, anchor, points, $s};return $f; - }; - $pkg.NewPolygon2DJs = NewPolygon2DJs; - NewBarrierJs = function(boundary) { - var boundary; - return js.MakeWrapper(new protos.Barrier.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType.nil, boundary)); - }; - $pkg.NewBarrierJs = NewBarrierJs; - NewPlayerDownsyncJs = function(id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, battleState, characterState, joinIndex, hp, maxHp, inAir, colliderRadius) { - var battleState, characterState, colliderRadius, dirX, dirY, hp, id, inAir, joinIndex, maxHp, speed, velX, velY, virtualGridX, virtualGridY; - return js.MakeWrapper(new protos.PlayerDownsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType.nil, id, virtualGridX, virtualGridY, dirX, dirY, velX, velY, speed, battleState, joinIndex, colliderRadius, false, 0, 0, 0, hp, maxHp, characterState, inAir, "", "", "")); - }; - $pkg.NewPlayerDownsyncJs = NewPlayerDownsyncJs; - NewRoomDownsyncFrameJs = function(id, playersArr, meleeBullets) { - var {$24r, _r, id, meleeBullets, playersArr, $s, $r, $c} = $restore(this, {id, playersArr, meleeBullets}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = js.MakeFullWrapper(new protos.RoomDownsyncFrame.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType.nil, id, playersArr, new $Int64(0, 0), meleeBullets, new $Uint64(0, 0), false, false)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewRoomDownsyncFrameJs, $c: true, $r, $24r, _r, id, meleeBullets, playersArr, $s};return $f; - }; - $pkg.NewRoomDownsyncFrameJs = NewRoomDownsyncFrameJs; - NewInputFrameDownsyncJs = function(inputFrameId, inputList, confirmedList) { - var {$24r, _r, confirmedList, inputFrameId, inputList, $s, $r, $c} = $restore(this, {inputFrameId, inputList, confirmedList}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = js.MakeFullWrapper(new protos.InputFrameDownsync.ptr(new $packages["google.golang.org/protobuf/internal/impl"].MessageState.ptr(new $packages["google.golang.org/protobuf/internal/pragma"].NoUnkeyedLiterals.ptr(), arrayType.zero(), arrayType$1.zero(), ptrType.nil), 0, sliceType.nil, inputFrameId, inputList, confirmedList)); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - $24r = _r; - $s = 2; case 2: return $24r; - /* */ } return; } var $f = {$blk: NewInputFrameDownsyncJs, $c: true, $r, $24r, _r, confirmedList, inputFrameId, inputList, $s};return $f; - }; - $pkg.NewInputFrameDownsyncJs = NewInputFrameDownsyncJs; - GetPlayersArrJs = function(rdf) { - var {_i, _r, _ref, player, rdf, ret, $s, $r, $c} = $restore(this, {rdf}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - ret = $makeSlice(sliceType$5, 0, rdf.PlayersArr.$length); - _ref = rdf.PlayersArr; - _i = 0; - /* while (true) { */ case 1: - /* if (!(_i < _ref.$length)) { break; } */ if(!(_i < _ref.$length)) { $s = 2; continue; } - player = ((_i < 0 || _i >= _ref.$length) ? ($throwRuntimeError("index out of range"), undefined) : _ref.$array[_ref.$offset + _i]); - _r = js.MakeFullWrapper(player); /* */ $s = 3; case 3: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - ret = $append(ret, _r); - _i++; - $s = 1; continue; - case 2: - $s = -1; return ret; - /* */ } return; } var $f = {$blk: GetPlayersArrJs, $c: true, $r, _i, _r, _ref, player, rdf, ret, $s};return $f; - }; - $pkg.GetPlayersArrJs = GetPlayersArrJs; - GenerateRectColliderJs = function(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag) { - var {$24r, _r, _r$1, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s, $r, $c} = $restore(this, {wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = dnmshared.GenerateRectCollider(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: GenerateRectColliderJs, $c: true, $r, $24r, _r, _r$1, bottomPadding, data, h, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, tag, topPadding, w, wx, wy, $s};return $f; - }; - $pkg.GenerateRectColliderJs = GenerateRectColliderJs; - GenerateConvexPolygonColliderJs = function(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag) { - var {$24r, _r, _r$1, data, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, $s, $r, $c} = $restore(this, {unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = dnmshared.GenerateConvexPolygonCollider(unalignedSrc, spaceOffsetX, spaceOffsetY, data, tag); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: GenerateConvexPolygonColliderJs, $c: true, $r, $24r, _r, _r$1, data, spaceOffsetX, spaceOffsetY, tag, unalignedSrc, $s};return $f; - }; - $pkg.GenerateConvexPolygonColliderJs = GenerateConvexPolygonColliderJs; - CheckCollisionJs = function(obj, dx, dy) { - var {$24r, _r, _r$1, dx, dy, obj, $s, $r, $c} = $restore(this, {obj, dx, dy}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = obj.Check(dx, dy, new sliceType$6([])); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: CheckCollisionJs, $c: true, $r, $24r, _r, _r$1, dx, dy, obj, $s};return $f; - }; - $pkg.CheckCollisionJs = CheckCollisionJs; - ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs = function(delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio) { - var {$24r, _r, _r$1, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currRenderFrame, delayedInputFrame, delayedInputFrameForPrevRenderFrame, gravityX, gravityY, inputDelayFrames, inputScaleFrames, jumpingInitVelY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, virtualGridToWorldRatio, worldToVirtualGridRatio, $s, $r, $c} = $restore(this, {delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio}); - /* */ $s = $s || 0; s: while (true) { switch ($s) { case 0: - _r = models.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio); /* */ $s = 1; case 1: if($c) { $c = false; _r = _r.$blk(); } if (_r && _r.$blk !== undefined) { break s; } - _r$1 = js.MakeFullWrapper(_r); /* */ $s = 2; case 2: if($c) { $c = false; _r$1 = _r$1.$blk(); } if (_r$1 && _r$1.$blk !== undefined) { break s; } - $24r = _r$1; - $s = 3; case 3: return $24r; - /* */ } return; } var $f = {$blk: ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, $c: true, $r, $24r, _r, _r$1, collisionSpaceOffsetX, collisionSpaceOffsetY, collisionSys, collisionSysMap, currRenderFrame, delayedInputFrame, delayedInputFrameForPrevRenderFrame, gravityX, gravityY, inputDelayFrames, inputScaleFrames, jumpingInitVelY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, virtualGridToWorldRatio, worldToVirtualGridRatio, $s};return $f; - }; - $pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs = ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs; - main = function() { - $global.gopkgs = $externalize($makeMap($String.keyFor, [{ k: "NewVec2DJs", v: new funcType$1(NewVec2DJs) }, { k: "NewPolygon2DJs", v: new funcType$2(NewPolygon2DJs) }, { k: "NewBarrierJs", v: new funcType$3(NewBarrierJs) }, { k: "NewPlayerDownsyncJs", v: new funcType$4(NewPlayerDownsyncJs) }, { k: "NewRoomDownsyncFrameJs", v: new funcType$5(NewRoomDownsyncFrameJs) }, { k: "NewCollisionSpaceJs", v: new funcType$6(NewCollisionSpaceJs) }, { k: "NewInputFrameDownsyncJs", v: new funcType$7(NewInputFrameDownsyncJs) }, { k: "GenerateRectColliderJs", v: new funcType$8(GenerateRectColliderJs) }, { k: "GenerateConvexPolygonColliderJs", v: new funcType$9(GenerateConvexPolygonColliderJs) }, { k: "GetPlayersArrJs", v: new funcType$10(GetPlayersArrJs) }, { k: "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs", v: new funcType$11(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs) }, { k: "CheckCollisionJs", v: new funcType$12(CheckCollisionJs) }]), mapType$1); - }; - $init = function() { - $pkg.$init = function() {}; - /* */ var $f, $c = false, $s = 0, $r; if (this !== undefined && this.$blk !== undefined) { $f = this; $c = true; $s = $f.$s; $r = $f.$r; } s: while (true) { switch ($s) { case 0: - $r = dnmshared.$init(); /* */ $s = 1; case 1: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = sharedprotos.$init(); /* */ $s = 2; case 2: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = js.$init(); /* */ $s = 3; case 3: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = resolv.$init(); /* */ $s = 4; case 4: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = models.$init(); /* */ $s = 5; case 5: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - $r = protos.$init(); /* */ $s = 6; case 6: if($c) { $c = false; $r = $r.$blk(); } if ($r && $r.$blk !== undefined) { break s; } - if ($pkg === $mainPkg) { - main(); - $mainFinished = true; - } - /* */ } return; } if ($f === undefined) { $f = { $blk: $init }; } $f.$s = $s; $f.$r = $r; return $f; - }; - $pkg.$init = $init; - return $pkg; -})(); +Error.stackTraceLimit=1/0;var $global,$module,$NaN=NaN;if("undefined"!=typeof window?$global=window:"undefined"!=typeof self?$global=self:"undefined"!=typeof global?($global=global).require=require:$global=this,void 0===$global||void 0===$global.Array)throw new Error("no global object found");if("undefined"!=typeof module&&($module=module),!$global.fs&&$global.require)try{var fs=$global.require("fs");"object"==typeof fs&&null!==fs&&0!==Object.keys(fs).length&&($global.fs=fs)}catch(e){}if(!$global.fs){var outputBuf="",decoder=new TextDecoder("utf-8");$global.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1},writeSync:function(e,n){var r=(outputBuf+=decoder.decode(n)).lastIndexOf("\n");return-1!=r&&(console.log(outputBuf.substr(0,r)),outputBuf=outputBuf.substr(r+1)),n.length},write:function(e,n,r,t,i,a){0===r&&t===n.length&&null===i?a(null,this.writeSync(e,n)):a(enosys())}}}var $throwRuntimeError,$linknames={},$packages={},$idCounter=0,$keys=function(e){return e?Object.keys(e):[]},$flushConsole=function(){},$throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference")},$call=function(e,n,r){return e.apply(n,r)},$makeFunc=function(e){return function(){return $externalize(e(this,new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[]))),$emptyInterface)}},$unused=function(e){},$print=console.log;if(void 0!==$global.process&&$global.require)try{var util=$global.require("util");$print=function(){$global.process.stderr.write(util.format.apply(this,arguments))}}catch(e){}var $println=console.log,$initAllLinknames=function(){for(var e=$keys($packages),n=0;ne.$capacity||t>e.$capacity)&&$throwRuntimeError("slice bounds out of range"),e===e.constructor.nil)return e;var i=new e.constructor(e.$array);return i.$offset=e.$offset+n,i.$length=r-n,i.$capacity=t-n,i},$substring=function(e,n,r){return(n<0||re.length)&&$throwRuntimeError("slice bounds out of range"),e.substring(n,r)},$sliceToNativeArray=function(e){return e.$array.constructor!==Array?e.$array.subarray(e.$offset,e.$offset+e.$length):e.$array.slice(e.$offset,e.$offset+e.$length)},$sliceToGoArray=function(e,n){var r=n.elem;return void 0!==r&&e.$length1114111||55296<=e&&e<=57343)&&(e=65533),e<=127?String.fromCharCode(e):e<=2047?String.fromCharCode(192|e>>6,128|63&e):e<=65535?String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e):String.fromCharCode(240|e>>18,128|e>>12&63,128|e>>6&63,128|63&e)},$stringToBytes=function(e){for(var n=new Uint8Array(e.length),r=0;rt){for(var o=i-1;o>=0;o--)a.copy(e[r+o],n[t+o]);return}for(o=0;ot)for(o=i-1;o>=0;o--)e[r+o]=n[t+o];else for(o=0;oc)if(a=0,c=Math.max(o,e.$capacity<1024?2*e.$capacity:Math.floor(5*e.$capacity/4)),e.$array.constructor===Array){(i=e.$array.slice(e.$offset,e.$offset+e.$length)).length=c;for(var $=e.constructor.elem.zero,u=e.$length;u>>16&65535)*t+r*(n>>>16&65535)<<16>>>0)>>0},$floatKey=function(e){return e!=e?"NaN$"+ ++$idCounter:String(e)},$flatten64=function(e){return 4294967296*e.$high+e.$low},$shiftLeft64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high<>>32-n,e.$low<>>0):n<64?new e.constructor(e.$low<>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(e.$high>>31,e.$high>>n-32>>>0):e.$high<0?new e.constructor(-1,4294967295):new e.constructor(0,0)},$shiftRightUint64=function(e,n){return 0===n?e:n<32?new e.constructor(e.$high>>>n,(e.$low>>>n|e.$high<<32-n)>>>0):n<64?new e.constructor(0,e.$high>>>n-32):new e.constructor(0,0)},$mul64=function(e,n){var r=e.$high>>>16,t=65535&e.$high,i=e.$low>>>16,a=65535&e.$low,o=n.$high>>>16,c=65535&n.$high,$=n.$low>>>16,u=65535&n.$low,l=0,s=0,f=0,d=0;f+=(d+=a*u)>>>16,s+=(f+=i*u)>>>16,f&=65535,s+=(f+=a*$)>>>16,l+=(s+=t*u)>>>16,s&=65535,l+=(s+=i*$)>>>16,s&=65535,l+=(s+=a*c)>>>16,l+=r*u+t*$+i*c+a*o;var p=((l&=65535)<<16|(s&=65535))>>>0,h=((f&=65535)<<16|(d&=65535))>>>0;return new e.constructor(p,h)},$div64=function(e,n,r){0===n.$high&&0===n.$low&&$throwRuntimeError("integer divide by zero");var t=1,i=1,a=e.$high,o=e.$low;a<0&&(t=-1,i=-1,a=-a,0!==o&&(a--,o=4294967296-o));var c=n.$high,$=n.$low;n.$high<0&&(t*=-1,c=-c,0!==$&&(c--,$=4294967296-$));for(var u=0,l=0,s=0;c<2147483648&&(a>c||a===c&&o>$);)c=(c<<1|$>>>31)>>>0,$=$<<1>>>0,s++;for(var f=0;f<=s;f++)u=u<<1|l>>>31,l=l<<1>>>0,(a>c||a===c&&o>=$)&&(a-=c,(o-=$)<0&&(a--,o+=4294967296),4294967296===++l&&(u++,l=0)),$=($>>>1|c<<31)>>>0,c>>>=1;return r?new e.constructor(a*i,o*i):new e.constructor(u*t,l*t)},$divComplex=function(e,n){var r=e.$real===1/0||e.$real===-1/0||e.$imag===1/0||e.$imag===-1/0,t=n.$real===1/0||n.$real===-1/0||n.$imag===1/0||n.$imag===-1/0,i=!r&&(e.$real!=e.$real||e.$imag!=e.$imag),a=!t&&(n.$real!=n.$real||n.$imag!=n.$imag);if(i||a)return new e.constructor(NaN,NaN);if(r&&!t)return new e.constructor(1/0,1/0);if(!r&&t)return new e.constructor(0,0);if(0===n.$real&&0===n.$imag)return 0===e.$real&&0===e.$imag?new e.constructor(NaN,NaN):new e.constructor(1/0,1/0);if(Math.abs(n.$real)<=Math.abs(n.$imag)){var o=n.$real/n.$imag,c=n.$real*o+n.$imag;return new e.constructor((e.$real*o+e.$imag)/c,(e.$imag*o-e.$real)/c)}o=n.$imag/n.$real,c=n.$imag*o+n.$real;return new e.constructor((e.$imag*o+e.$real)/c,(e.$imag-e.$real*o)/c)},$kindBool=1,$kindInt=2,$kindInt8=3,$kindInt16=4,$kindInt32=5,$kindInt64=6,$kindUint=7,$kindUint8=8,$kindUint16=9,$kindUint32=10,$kindUint64=11,$kindUintptr=12,$kindFloat32=13,$kindFloat64=14,$kindComplex64=15,$kindComplex128=16,$kindArray=17,$kindChan=18,$kindFunc=19,$kindInterface=20,$kindMap=21,$kindPtr=22,$kindSlice=23,$kindString=24,$kindStruct=25,$kindUnsafePointer=26,$methodSynthesizers=[],$addMethodSynthesizer=function(e){null!==$methodSynthesizers?$methodSynthesizers.push(e):e()},$synthesizeMethods=function(){$methodSynthesizers.forEach(function(e){e()}),$methodSynthesizers=null},$ifaceKeyFor=function(e){if(e===$ifaceNil)return"nil";var n=e.constructor;return n.string+"$"+n.keyFor(e.$val)},$identity=function(e){return e},$typeIDCounter=0,$idKey=function(e){return void 0===e.$id&&($idCounter++,e.$id=$idCounter),String(e.$id)},$arrayPtrCtor=function(){return function(e){this.$get=function(){return e},this.$set=function(e){typ.copy(this,e)},this.$val=e}},$newType=function(e,n,r,t,i,a,o){var c;switch(n){case $kindBool:case $kindInt:case $kindInt8:case $kindInt16:case $kindInt32:case $kindUint:case $kindUint8:case $kindUint16:case $kindUint32:case $kindUintptr:case $kindUnsafePointer:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$identity;break;case $kindString:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return"$"+e};break;case $kindFloat32:case $kindFloat64:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=function(e){return $floatKey(e)};break;case $kindInt64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindUint64:(c=function(e,n){this.$high=e+Math.floor(Math.ceil(n)/4294967296)>>>0,this.$low=n>>>0,this.$val=this}).keyFor=function(e){return e.$high+"$"+e.$low};break;case $kindComplex64:(c=function(e,n){this.$real=$fround(e),this.$imag=$fround(n),this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindComplex128:(c=function(e,n){this.$real=e,this.$imag=n,this.$val=this}).keyFor=function(e){return e.$real+"$"+e.$imag};break;case $kindArray:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,"",!1,$arrayPtrCtor()),c.init=function(e,n){c.elem=e,c.len=n,c.comparable=e.comparable,c.keyFor=function(n){return Array.prototype.join.call($mapArray(n,function(n){return String(e.keyFor(n)).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}),"$")},c.copy=function(n,r){$copyArray(n,r,0,0,r.length,e)},c.ptr.init(c),Object.defineProperty(c.ptr.nil,"nilCheck",{get:$throwNilPointerError})};break;case $kindChan:(c=function(e){this.$val=e}).wrapped=!0,c.keyFor=$idKey,c.init=function(e,n,r){c.elem=e,c.sendOnly=n,c.recvOnly=r};break;case $kindFunc:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n,r){c.params=e,c.results=n,c.variadic=r,c.comparable=!1};break;case $kindInterface:(c={implementedBy:{},missingMethodFor:{}}).keyFor=$ifaceKeyFor,c.init=function(e){c.methods=e,e.forEach(function(e){$ifaceNil[e.prop]=$throwNilPointerError})};break;case $kindMap:(c=function(e){this.$val=e}).wrapped=!0,c.init=function(e,n){c.key=e,c.elem=n,c.comparable=!1};break;case $kindPtr:(c=o||function(e,n,r){this.$get=e,this.$set=n,this.$target=r,this.$val=this}).keyFor=$idKey,c.init=function(e){c.elem=e,c.wrapped=e.kind===$kindArray,c.nil=new c($throwNilPointerError,$throwNilPointerError)};break;case $kindSlice:(c=function(e){e.constructor!==c.nativeArray&&(e=new c.nativeArray(e)),this.$array=e,this.$offset=0,this.$length=e.length,this.$capacity=e.length,this.$val=this}).init=function(e){c.elem=e,c.comparable=!1,c.nativeArray=$nativeArray(e.kind),c.nil=new c([])};break;case $kindStruct:(c=function(e){this.$val=e}).wrapped=!0,c.ptr=$newType(4,$kindPtr,"*"+r,!1,i,a,o),c.ptr.elem=c,c.ptr.prototype.$get=function(){return this},c.ptr.prototype.$set=function(e){c.copy(this,e)},c.init=function(e,n){c.pkgPath=e,c.fields=n,n.forEach(function(e){e.typ.comparable||(c.comparable=!1)}),c.keyFor=function(e){var r=e.$val;return $mapArray(n,function(e){return String(e.typ.keyFor(r[e.prop])).replace(/\\/g,"\\\\").replace(/\$/g,"\\$")}).join("$")},c.copy=function(e,r){for(var t=0;t0;){var a=[],o=[];t.forEach(function(e){if(!i[e.typ.string])switch(i[e.typ.string]=!0,e.typ.named&&(o=o.concat(e.typ.methods),e.indirect&&(o=o.concat($ptrType(e.typ).methods))),e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(n){if(n.embedded){var r=n.typ,t=r.kind===$kindPtr;a.push({typ:t?r.elem:r,indirect:e.indirect||t})}});break;case $kindInterface:o=o.concat(e.typ.methods)}}),o.forEach(function(e){void 0===n[e.name]&&(n[e.name]=e)}),t=a}return e.methodSetCache=[],Object.keys(n).sort().forEach(function(r){e.methodSetCache.push(n[r])}),e.methodSetCache},$Bool=$newType(1,$kindBool,"bool",!0,"",!1,null),$Int=$newType(4,$kindInt,"int",!0,"",!1,null),$Int8=$newType(1,$kindInt8,"int8",!0,"",!1,null),$Int16=$newType(2,$kindInt16,"int16",!0,"",!1,null),$Int32=$newType(4,$kindInt32,"int32",!0,"",!1,null),$Int64=$newType(8,$kindInt64,"int64",!0,"",!1,null),$Uint=$newType(4,$kindUint,"uint",!0,"",!1,null),$Uint8=$newType(1,$kindUint8,"uint8",!0,"",!1,null),$Uint16=$newType(2,$kindUint16,"uint16",!0,"",!1,null),$Uint32=$newType(4,$kindUint32,"uint32",!0,"",!1,null),$Uint64=$newType(8,$kindUint64,"uint64",!0,"",!1,null),$Uintptr=$newType(4,$kindUintptr,"uintptr",!0,"",!1,null),$Float32=$newType(4,$kindFloat32,"float32",!0,"",!1,null),$Float64=$newType(8,$kindFloat64,"float64",!0,"",!1,null),$Complex64=$newType(8,$kindComplex64,"complex64",!0,"",!1,null),$Complex128=$newType(16,$kindComplex128,"complex128",!0,"",!1,null),$String=$newType(8,$kindString,"string",!0,"",!1,null),$UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer",!0,"unsafe",!1,null),$nativeArray=function(e){switch(e){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array}},$toNativeArray=function(e,n){var r=$nativeArray(e);return r===Array?n:new r(n)},$arrayTypes={},$arrayType=function(e,n){var r=e.id+"$"+n,t=$arrayTypes[r];return void 0===t&&(t=$newType(12,$kindArray,"["+n+"]"+e.string,!1,"",!1,null),$arrayTypes[r]=t,t.init(e,n)),t},$chanType=function(e,n,r){var t=(r?"<-":"")+"chan"+(n?"<- ":" ");n||r||"<"!=e.string[0]?t+=e.string:t+="("+e.string+")";var i=n?"SendChan":r?"RecvChan":"Chan",a=e[i];return void 0===a&&(a=$newType(4,$kindChan,t,!1,"",!1,null),e[i]=a,a.init(e,n,r)),a},$Chan=function(e,n){(n<0||n>2147483647)&&$throwRuntimeError("makechan: size out of range"),this.$elem=e,this.$capacity=n,this.$buffer=[],this.$sendQueue=[],this.$recvQueue=[],this.$closed=!1},$chanNil=new $Chan(null,0);$chanNil.$sendQueue=$chanNil.$recvQueue={length:0,push:function(){},shift:function(){},indexOf:function(){return-1}};var $funcTypes={},$funcType=function(e,n,r){var t=$mapArray(e,function(e){return e.id}).join(",")+"$"+$mapArray(n,function(e){return e.id}).join(",")+"$"+r,i=$funcTypes[t];if(void 0===i){var a=$mapArray(e,function(e){return e.string});r&&(a[a.length-1]="..."+a[a.length-1].substr(2));var o="func("+a.join(", ")+")";1===n.length?o+=" "+n[0].string:n.length>1&&(o+=" ("+$mapArray(n,function(e){return e.string}).join(", ")+")"),i=$newType(4,$kindFunc,o,!1,"",!1,null),$funcTypes[t]=i,i.init(e,n,r)}return i},$interfaceTypes={},$interfaceType=function(e){var n=$mapArray(e,function(e){return e.pkg+","+e.name+","+e.typ.id}).join("$"),r=$interfaceTypes[n];if(void 0===r){var t="interface {}";0!==e.length&&(t="interface { "+$mapArray(e,function(e){return(""!==e.pkg?e.pkg+".":"")+e.name+e.typ.string.substr(4)}).join("; ")+" }"),r=$newType(8,$kindInterface,t,!1,"",!1,null),$interfaceTypes[n]=r,r.init(e)}return r},$emptyInterface=$interfaceType([]),$ifaceNil={},$error=$newType(8,$kindInterface,"error",!0,"",!1,null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],!1)}]);var $panicValue,$jsObjectPtr,$jsErrorPtr,$mapTypes={},$mapType=function(e,n){var r=e.id+"$"+n.id,t=$mapTypes[r];return void 0===t&&(t=$newType(4,$kindMap,"map["+e.string+"]"+n.string,!1,"",!1,null),$mapTypes[r]=t,t.init(e,n)),t},$makeMap=function(e,n){for(var r={},t=0;t2147483647)&&$throwRuntimeError("makeslice: len out of range"),(r<0||r2147483647)&&$throwRuntimeError("makeslice: cap out of range");var t=new e.nativeArray(r);if(e.nativeArray===Array)for(var i=0;i4||t<0)break}}finally{0==$scheduled.length&&clearTimeout(e)}},$schedule=function(e){e.asleep&&(e.asleep=!1,$awakeGoroutines++),$scheduled.push(e),$curGoroutine===$noGoroutine&&$runScheduled()},$setTimeout=function(e,n){return $awakeGoroutines++,setTimeout(function(){$awakeGoroutines--,e()},n)},$block=function(){$curGoroutine===$noGoroutine&&$throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine"),$curGoroutine.asleep=!0},$restore=function(e,n){return void 0!==e&&void 0!==e.$blk?e:n},$send=function(e,n){e.$closed&&$throwRuntimeError("send on closed channel");var r=e.$recvQueue.shift();if(void 0===r){if(!(e.$buffer.length65535){var l=Math.floor((u-65536)/1024)+55296,s=(u-65536)%1024+56320;$+=String.fromCharCode(l,s)}else $+=String.fromCharCode(u)}return $;case $kindStruct:var f=$packages.time;if(void 0!==f&&e.constructor===f.Time.ptr){var d=$div64(e.UnixNano(),new $Int64(0,1e6));return new Date($flatten64(d))}var p={},h=function(e,n){if(n===$jsObjectPtr)return e;switch(n.kind){case $kindPtr:return e===n.nil?p:h(e.$get(),n.elem);case $kindStruct:var r=n.fields[0];return h(e[r.prop],r.typ);case $kindInterface:return h(e.$val,e.constructor);default:return p}},k=h(e,n);if(k!==p)return k;if(void 0!==r)return r(e);k={};for(a=0;a>24;case $kindInt16:return parseInt(e)<<16>>16;case $kindInt32:return parseInt(e)>>0;case $kindUint:return parseInt(e);case $kindUint8:return parseInt(e)<<24>>>24;case $kindUint16:return parseInt(e)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(e)>>>0;case $kindInt64:case $kindUint64:return new n(0,e);case $kindFloat32:case $kindFloat64:return parseFloat(e);case $kindArray:return e.length!==n.len&&$throwRuntimeError("got array with wrong size from JavaScript native"),$mapArray(e,function(e){return $internalize(e,n.elem,i)});case $kindFunc:return function(){for(var t=[],a=0;a=128)return!1;return!0}; + +$packages["github.com/gopherjs/gopherjs/js"]=(function(){var $pkg={},$init,A,B,J,K,M,O,P,Q,R,S,T,E,G,H,L;A=$pkg.Object=$newType(0,$kindStruct,"js.Object",true,"github.com/gopherjs/gopherjs/js",true,function(object_){this.$val=this;if(arguments.length===0){this.object=null;return;}this.object=object_;});B=$pkg.Error=$newType(0,$kindStruct,"js.Error",true,"github.com/gopherjs/gopherjs/js",true,function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});J=$pkg.M=$newType(4,$kindMap,"js.M",true,"github.com/gopherjs/gopherjs/js",true,null);K=$pkg.S=$newType(12,$kindSlice,"js.S",true,"github.com/gopherjs/gopherjs/js",true,null);M=$sliceType($emptyInterface);O=$ptrType(A);P=$sliceType(O);Q=$funcType([P],[O],true);R=$funcType([],[O],false);S=$funcType([O],[],false);T=$ptrType(B);A.ptr.prototype.Get=function(a){var a,b;b=this;return b.object[$externalize(a,$String)];};A.prototype.Get=function(a){return this.$val.Get(a);};A.ptr.prototype.Set=function(a,b){var a,b,c;c=this;c.object[$externalize(a,$String)]=$externalize(b,$emptyInterface);};A.prototype.Set=function(a,b){return this.$val.Set(a,b);};A.ptr.prototype.Delete=function(a){var a,b;b=this;delete b.object[$externalize(a,$String)];};A.prototype.Delete=function(a){return this.$val.Delete(a);};A.ptr.prototype.Length=function(){var a;a=this;return $parseInt(a.object.length);};A.prototype.Length=function(){return this.$val.Length();};A.ptr.prototype.Index=function(a){var a,b;b=this;return b.object[a];};A.prototype.Index=function(a){return this.$val.Index(a);};A.ptr.prototype.SetIndex=function(a,b){var a,b,c;c=this;c.object[a]=$externalize(b,$emptyInterface);};A.prototype.SetIndex=function(a,b){return this.$val.SetIndex(a,b);};A.ptr.prototype.Call=function(a,b){var a,b,c,d;c=this;return(d=c.object,d[$externalize(a,$String)].apply(d,$externalize(b,M)));};A.prototype.Call=function(a,b){return this.$val.Call(a,b);};A.ptr.prototype.Invoke=function(a){var a,b;b=this;return b.object.apply(undefined,$externalize(a,M));};A.prototype.Invoke=function(a){return this.$val.Invoke(a);};A.ptr.prototype.New=function(a){var a,b;b=this;return new($global.Function.prototype.bind.apply(b.object,[undefined].concat($externalize(a,M))));};A.prototype.New=function(a){return this.$val.New(a);};A.ptr.prototype.Bool=function(){var a;a=this;return!!(a.object);};A.prototype.Bool=function(){return this.$val.Bool();};A.ptr.prototype.String=function(){var a;a=this;return $internalize(a.object,$String);};A.prototype.String=function(){return this.$val.String();};A.ptr.prototype.Int=function(){var a;a=this;return $parseInt(a.object)>>0;};A.prototype.Int=function(){return this.$val.Int();};A.ptr.prototype.Int64=function(){var a;a=this;return $internalize(a.object,$Int64);};A.prototype.Int64=function(){return this.$val.Int64();};A.ptr.prototype.Uint64=function(){var a;a=this;return $internalize(a.object,$Uint64);};A.prototype.Uint64=function(){return this.$val.Uint64();};A.ptr.prototype.Float=function(){var a;a=this;return $parseFloat(a.object);};A.prototype.Float=function(){return this.$val.Float();};A.ptr.prototype.Interface=function(){var a;a=this;return $internalize(a.object,$emptyInterface);};A.prototype.Interface=function(){return this.$val.Interface();};A.ptr.prototype.Unsafe=function(){var a;a=this;return a.object;};A.prototype.Unsafe=function(){return this.$val.Unsafe();};B.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};B.prototype.Error=function(){return this.$val.Error();};B.ptr.prototype.Stack=function(){var a;a=this;return $internalize(a.Object.stack,$String);};B.prototype.Stack=function(){return this.$val.Stack();};E=function(a){var a;return $makeFunc(a);};$pkg.MakeFunc=E;G=function(a){var a,b,c,d,e,f;b=a;c=new($global.Object)();c.__internal_object__=b;d=b.constructor.methods;e=0;while(true){if(!(e<$parseInt(d.length))){break;}f=[f];f[0]=d[e];if(!($internalize(f[0].pkg,$String)==="")){e=e+(1)>>0;continue;}c[$externalize($internalize(f[0].name,$String),$String)]=$externalize((function(f){return function(g){var g;return $externalizeFunction(b[$externalize($internalize(f[0].prop,$String),$String)],f[0].typ,$externalize(true,$Bool)).apply(b,$externalize(g,P));};})(f),Q);e=e+(1)>>0;}return c;};$pkg.MakeWrapper=G;H=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=[b];c=[c];b[0]=a;d=b[0].constructor;c[0]=new($global.Object)();e=(function(b,c){return function(e,f){var e,f;$global.Object.defineProperty(c[0],$externalize(e,$String),$externalize(f,J));};})(b,c);$r=e("__internal_object__",$makeMap($String.keyFor,[{k:"value",v:new $jsObjectPtr(b[0])}]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=$internalize(d.string,$String);g=$internalize(d.pkg,$String);h="";if(f.charCodeAt(0)===42){h="*";}i=0;while(true){if(!(i>0));break;}i=i+(1)>>0;}j=g+"."+h+f;$r=e("$type",$makeMap($String.keyFor,[{k:"value",v:new $String(j)}]));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=null;l=new($global.Array)();m=d.methods;if(!(m===undefined)){l=l.concat(m);}n=d.elem;if(!(n===undefined)){k=n.fields;l=l.concat(n.methods);}else{k=d.fields;}o=0;case 3:if(!(o<$parseInt(l.length))){$s=4;continue;}p=[p];p[0]=l[o];if(!($internalize(p[0].pkg,$String)==="")){o=o+(1)>>0;$s=3;continue;}$r=e($internalize(p[0].prop,$String),$makeMap($String.keyFor,[{k:"value",v:new Q((function(b,c,p){return function(q){var q;return $externalizeFunction(b[0][$externalize($internalize(p[0].prop,$String),$String)],p[0].typ,$externalize(true,$Bool),H).apply(b[0],$externalize(q,P));};})(b,c,p))}]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}o=o+(1)>>0;$s=3;continue;case 4:if(!(k===undefined)){$s=6;continue;}$s=7;continue;case 6:q=0;case 8:if(!(q<$parseInt(k.length))){$s=9;continue;}r=[r];r[0]=k[q];if(!!!(r[0].exported)){q=q+(1)>>0;$s=8;continue;}$r=e($internalize(r[0].prop,$String),$makeMap($String.keyFor,[{k:"get",v:new R((function(b,c,r){return function(){var s;s=$copyIfRequired(b[0].$val[$externalize($internalize(r[0].prop,$String),$String)],r[0].typ);return $externalize(s,r[0].typ,H);};})(b,c,r))},{k:"set",v:new S((function(b,c,r){return function(s){var s,t;t=$internalize(s,r[0].typ,H);b[0].$val[$externalize($internalize(r[0].prop,$String),$String)]=t;};})(b,c,r))}]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=q+(1)>>0;$s=8;continue;case 9:case 7:$s=-1;return c[0];}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s};return $f;};$pkg.MakeFullWrapper=H;L=function(){var a;a=new B.ptr(null);$unused(a);};O.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[O],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,M],[O],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([M],[O],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([M],[O],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];T.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init("github.com/gopherjs/gopherjs/js",[{prop:"object",name:"object",embedded:false,exported:false,typ:O,tag:""}]);B.init("",[{prop:"Object",name:"Object",embedded:true,exported:true,typ:O,tag:""}]);J.init($String,$emptyInterface);K.init($emptyInterface);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:L();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["runtime"]=(function(){var $pkg={},$init,A,C,D,L,AF,AT,AX,AY,AZ,BA,BB,BD,H,I,N,O,AM,E,F,J,K,M,P,Q,R,AE,AG,AS,AU,AV,AW;A=$packages["github.com/gopherjs/gopherjs/js"];C=$pkg._type=$newType(0,$kindStruct,"runtime._type",true,"runtime",false,function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});D=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError",true,"runtime",true,function(_interface_,concrete_,asserted_,missingMethod_){this.$val=this;if(arguments.length===0){this._interface=AZ.nil;this.concrete=AZ.nil;this.asserted=AZ.nil;this.missingMethod="";return;}this._interface=_interface_;this.concrete=concrete_;this.asserted=asserted_;this.missingMethod=missingMethod_;});L=$pkg.basicFrame=$newType(0,$kindStruct,"runtime.basicFrame",true,"runtime",false,function(FuncName_,File_,Line_,Col_){this.$val=this;if(arguments.length===0){this.FuncName="";this.File="";this.Line=0;this.Col=0;return;}this.FuncName=FuncName_;this.File=File_;this.Line=Line_;this.Col=Col_;});AF=$pkg.Func=$newType(0,$kindStruct,"runtime.Func",true,"runtime",true,function(name_,file_,line_,opaque_){this.$val=this;if(arguments.length===0){this.name="";this.file="";this.line=0;this.opaque=new BA.ptr();return;}this.name=name_;this.file=file_;this.line=line_;this.opaque=opaque_;});AT=$pkg.errorString=$newType(8,$kindString,"runtime.errorString",true,"runtime",false,null);AX=$ptrType(AF);AY=$sliceType(AX);AZ=$ptrType(C);BA=$structType("",[]);BB=$sliceType(L);BD=$ptrType(D);C.ptr.prototype.string=function(){var a;a=this;return a.str;};C.prototype.string=function(){return this.$val.string();};C.ptr.prototype.pkgpath=function(){var a;a=this;return"";};C.prototype.pkgpath=function(){return this.$val.pkgpath();};D.ptr.prototype.RuntimeError=function(){};D.prototype.RuntimeError=function(){return this.$val.RuntimeError();};D.ptr.prototype.Error=function(){var a,b,c,d,e;a=this;b="interface";if(!(a._interface===AZ.nil)){b=a._interface.string();}c=a.asserted.string();if(a.concrete===AZ.nil){return"interface conversion: "+b+" is nil, not "+c;}d=a.concrete.string();if(a.missingMethod===""){e="interface conversion: "+b+" is "+d+", not "+c;if(d===c){if(!(a.concrete.pkgpath()===a.asserted.pkgpath())){e=e+(" (types from different packages)");}else{e=e+(" (types from different scopes)");}}return e;}return"interface conversion: "+d+" is not "+c+": missing method "+a.missingMethod;};D.prototype.Error=function(){return this.$val.Error();};E=function(){var a,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=AU;AM=$internalize($goVersion,$String);b=$ifaceNil;b=new D.ptr(AZ.nil,AZ.nil,AZ.nil,"");$unused(b);};F=function(){var a,b,c;a=$global.process;if(a===undefined){return"/";}b=a.env.GOPHERJS_GOROOT;if(!(b===undefined)&&!($internalize(b,$String)==="")){return $internalize(b,$String);}else{c=a.env.GOROOT;if(!(c===undefined)&&!($internalize(c,$String)==="")){return $internalize(c,$String);}}return"/usr/local/go";};$pkg.GOROOT=F;J=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l;e=b+":"+K(c)+":"+K(d);f=(g=H[$String.keyFor(e)],g!==undefined?[g.v,true]:[0,false]);h=f[0];i=f[1];if(i){return h;}j=new AF.ptr(a,b,c,new BA.ptr());k=((I.$length>>>0));I=$append(I,j);l=e;(H||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(l)]={k:l,v:k};return k;};K=function(a){var a;return $internalize(new($global.String)(a),$String);};M=function(a,b){var a,b,c;a=(a+1>>0)+1>>0;c=new($global.Error)().stack.split($externalize("\n",$String)).slice(a,a+b>>0);return P(c);};P=function(a){var a,b,c,d,e,f,g,h,i,j;b=new BB([]);c=$parseInt(a.length);d=0;while(true){if(!(d>0;continue;}g=(h=O[$String.keyFor(e.FuncName)],h!==undefined?[h.v,true]:["",false]);i=g[0];j=g[1];if(j){e.FuncName=i;}b=$append(b,e);if(e.FuncName==="runtime.goexit"){break;}d=d+(1)>>0;}return b;};Q=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(($parseInt(a.indexOf($externalize("@",$String)))>>0)>=0){b=new($global.RegExp)($externalize("[@:]",$String));c=a.split(b);return new L.ptr($internalize(c[0],$String),$internalize(c.slice(1,$parseInt(c.length)-2>>0).join($externalize(":",$String)),$String),$parseInt(c[($parseInt(c.length)-2>>0)])>>0,$parseInt(c[($parseInt(c.length)-1>>0)])>>0);}d=$parseInt(a.lastIndexOf($externalize("(",$String)))>>0;if(d===-1){e=a.split($externalize(":",$String));return new L.ptr("",$internalize(e.slice(0,$parseInt(e.length)-2>>0).join($externalize(":",$String)).replace(new($global.RegExp)($externalize("^\\s*at ",$String)),$externalize("",$String)),$String),$parseInt(e[($parseInt(e.length)-2>>0)])>>0,$parseInt(e[($parseInt(e.length)-1>>0)])>>0);}f="";g="";h=f;i=g;j=0;k=0;l=j;m=k;n=a.substring(d+1>>0,$parseInt(a.indexOf($externalize(")",$String)))>>0);o=n.split($externalize(":",$String));if($internalize(n,$String)===""){h="";}else{h=$internalize(o.slice(0,$parseInt(o.length)-2>>0).join($externalize(":",$String)),$String);l=$parseInt(o[($parseInt(o.length)-2>>0)])>>0;m=$parseInt(o[($parseInt(o.length)-1>>0)])>>0;}p=a.substring(($parseInt(a.indexOf($externalize("at ",$String)))>>0)+3>>0,$parseInt(a.indexOf($externalize(" (",$String)))>>0);q=$parseInt(p.indexOf($externalize("[as ",$String)))>>0;if(q>0){p=p.substring(q+4>>0,p.indexOf($externalize("]",$String)));}i=$internalize(p,$String);return new L.ptr(i,h,l,m);};$pkg.ParseCallFrame=Q;R=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;b=0;c="";d=0;e=false;a=a+1>>0;f=M(a,1);if(!((f.$length===1))){g=0;h="";i=0;j=false;b=g;c=h;d=i;e=j;return[b,c,d,e];}b=J((0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]).FuncName,(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]).File,(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]).Line,(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]).Col);k=b;l=(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]).File;m=(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]).Line;n=true;b=k;c=l;d=m;e=n;return[b,c,d,e];};$pkg.Caller=R;AE=function(a,b){var a,b;};$pkg.SetFinalizer=AE;AF.ptr.prototype.Entry=function(){return 0;};AF.prototype.Entry=function(){return this.$val.Entry();};AF.ptr.prototype.FileLine=function(a){var a,b,c,d,e,f,g,h;b="";c=0;d=this;if(d===AX.nil){e="";f=0;b=e;c=f;return[b,c];}g=d.file;h=d.line;b=g;c=h;return[b,c];};AF.prototype.FileLine=function(a){return this.$val.FileLine(a);};AF.ptr.prototype.Name=function(){var a;a=this;if(a===AX.nil||a.name===""){return"";}return a.name;};AF.prototype.Name=function(){return this.$val.Name();};AG=function(a){var a,b;b=((a>>0));if(b>=I.$length){$panic(new $String("GopherJS: pc="+K(b)+" is out of range of known position counters"));}return((b<0||b>=I.$length)?($throwRuntimeError("index out of range"),undefined):I.$array[I.$offset+b]);};$pkg.FuncForPC=AG;AS=function(a){var a;};$pkg.KeepAlive=AS;AT.prototype.RuntimeError=function(){var a;a=this.$val;};$ptrType(AT).prototype.RuntimeError=function(){return new AT(this.$get()).RuntimeError();};AT.prototype.Error=function(){var a;a=this.$val;return"runtime error: "+(a);};$ptrType(AT).prototype.Error=function(){return new AT(this.$get()).Error();};AU=function(a){var a;$panic(new AT((a)));};AV=function(){return $mul64($internalize(new($global.Date)().getTime(),$Int64),new $Int64(0,1000000));};$linknames["runtime.nanotime"]=AV;AW=function(){return(($parseFloat($global.Math.random())*4.294967295e+09>>0));};$linknames["runtime.fastrand"]=AW;AZ.methods=[{prop:"string",name:"string",pkg:"runtime",typ:$funcType([],[$String],false)},{prop:"pkgpath",name:"pkgpath",pkg:"runtime",typ:$funcType([],[$String],false)}];BD.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AX.methods=[{prop:"Entry",name:"Entry",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"FileLine",name:"FileLine",pkg:"",typ:$funcType([$Uintptr],[$String,$Int],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)}];AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init("runtime",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);D.init("runtime",[{prop:"_interface",name:"_interface",embedded:false,exported:false,typ:AZ,tag:""},{prop:"concrete",name:"concrete",embedded:false,exported:false,typ:AZ,tag:""},{prop:"asserted",name:"asserted",embedded:false,exported:false,typ:AZ,tag:""},{prop:"missingMethod",name:"missingMethod",embedded:false,exported:false,typ:$String,tag:""}]);L.init("",[{prop:"FuncName",name:"FuncName",embedded:false,exported:true,typ:$String,tag:""},{prop:"File",name:"File",embedded:false,exported:true,typ:$String,tag:""},{prop:"Line",name:"Line",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Col",name:"Col",embedded:false,exported:true,typ:$Int,tag:""}]);AF.init("runtime",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"file",name:"file",embedded:false,exported:false,typ:$String,tag:""},{prop:"line",name:"line",embedded:false,exported:false,typ:$Int,tag:""},{prop:"opaque",name:"opaque",embedded:false,exported:false,typ:BA,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AM="";H=$makeMap($String.keyFor,[]);I=new AY([]);N=$makeMap($String.keyFor,[{k:"$callDeferred",v:true}]);O=$makeMap($String.keyFor,[{k:"$panic",v:"runtime.gopanic"},{k:"$goroutine",v:"runtime.goexit"}]);E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/goarch"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/unsafeheader"]=(function(){var $pkg={},$init,A;A=$pkg.Slice=$newType(0,$kindStruct,"unsafeheader.Slice",true,"internal/unsafeheader",true,function(Data_,Len_,Cap_){this.$val=this;if(arguments.length===0){this.Data=0;this.Len=0;this.Cap=0;return;}this.Data=Data_;this.Len=Len_;this.Cap=Cap_;});A.init("",[{prop:"Data",name:"Data",embedded:false,exported:true,typ:$UnsafePointer,tag:""},{prop:"Len",name:"Len",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Cap",name:"Cap",embedded:false,exported:true,typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/reflectlite"]=(function(){var $pkg={},$init,D,A,B,C,E,F,I,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AG,AH,AI,AT,AV,BL,BN,BO,BP,CU,CW,DU,DV,DW,DX,DY,DZ,EA,EC,ED,EE,EF,EG,EH,EI,EJ,EK,EL,EM,EN,EO,ES,ET,EU,EV,EW,EX,EY,EZ,AD,AR,BB,BD,BE,BF,BG,BH,BM,BQ,BS,BU,DH,DN,AK,AL,AM,AN,AP,AQ,AU,BA,BC,BI,BJ,BK,BR,BT,BV,BW,BX,BY,BZ,CB,CC,CF,CH,CJ,CM,CQ,CR,CV,CX,CY,CZ,DC,DD,DE,DF,DG,DI,DJ,DK,DL,DM;D=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["internal/goarch"];B=$packages["internal/unsafeheader"];C=$packages["runtime"];E=$pkg.Value=$newType(0,$kindStruct,"reflectlite.Value",true,"internal/reflectlite",true,function(typ_,ptr_,flag_){this.$val=this;if(arguments.length===0){this.typ=DU.nil;this.ptr=0;this.flag=0;return;}this.typ=typ_;this.ptr=ptr_;this.flag=flag_;});F=$pkg.flag=$newType(4,$kindUintptr,"reflectlite.flag",true,"internal/reflectlite",false,null);I=$pkg.ValueError=$newType(0,$kindStruct,"reflectlite.ValueError",true,"internal/reflectlite",true,function(Method_,Kind_){this.$val=this;if(arguments.length===0){this.Method="";this.Kind=0;return;}this.Method=Method_;this.Kind=Kind_;});O=$pkg.Type=$newType(8,$kindInterface,"reflectlite.Type",true,"internal/reflectlite",true,null);P=$pkg.Kind=$newType(4,$kindUint,"reflectlite.Kind",true,"internal/reflectlite",true,null);Q=$pkg.tflag=$newType(1,$kindUint8,"reflectlite.tflag",true,"internal/reflectlite",false,null);R=$pkg.rtype=$newType(0,$kindStruct,"reflectlite.rtype",true,"internal/reflectlite",false,function(size_,ptrdata_,hash_,tflag_,align_,fieldAlign_,kind_,equal_,gcdata_,str_,ptrToThis_){this.$val=this;if(arguments.length===0){this.size=0;this.ptrdata=0;this.hash=0;this.tflag=0;this.align=0;this.fieldAlign=0;this.kind=0;this.equal=$throwNilPointerError;this.gcdata=EG.nil;this.str=0;this.ptrToThis=0;return;}this.size=size_;this.ptrdata=ptrdata_;this.hash=hash_;this.tflag=tflag_;this.align=align_;this.fieldAlign=fieldAlign_;this.kind=kind_;this.equal=equal_;this.gcdata=gcdata_;this.str=str_;this.ptrToThis=ptrToThis_;});S=$pkg.method=$newType(0,$kindStruct,"reflectlite.method",true,"internal/reflectlite",false,function(name_,mtyp_,ifn_,tfn_){this.$val=this;if(arguments.length===0){this.name=0;this.mtyp=0;this.ifn=0;this.tfn=0;return;}this.name=name_;this.mtyp=mtyp_;this.ifn=ifn_;this.tfn=tfn_;});T=$pkg.chanDir=$newType(4,$kindInt,"reflectlite.chanDir",true,"internal/reflectlite",false,null);U=$pkg.arrayType=$newType(0,$kindStruct,"reflectlite.arrayType",true,"internal/reflectlite",false,function(rtype_,elem_,slice_,len_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;this.slice=DU.nil;this.len=0;return;}this.rtype=rtype_;this.elem=elem_;this.slice=slice_;this.len=len_;});V=$pkg.chanType=$newType(0,$kindStruct,"reflectlite.chanType",true,"internal/reflectlite",false,function(rtype_,elem_,dir_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;this.dir=0;return;}this.rtype=rtype_;this.elem=elem_;this.dir=dir_;});W=$pkg.imethod=$newType(0,$kindStruct,"reflectlite.imethod",true,"internal/reflectlite",false,function(name_,typ_){this.$val=this;if(arguments.length===0){this.name=0;this.typ=0;return;}this.name=name_;this.typ=typ_;});X=$pkg.interfaceType=$newType(0,$kindStruct,"reflectlite.interfaceType",true,"internal/reflectlite",false,function(rtype_,pkgPath_,methods_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.pkgPath=new BO.ptr(EG.nil);this.methods=EK.nil;return;}this.rtype=rtype_;this.pkgPath=pkgPath_;this.methods=methods_;});Y=$pkg.mapType=$newType(0,$kindStruct,"reflectlite.mapType",true,"internal/reflectlite",false,function(rtype_,key_,elem_,bucket_,hasher_,keysize_,valuesize_,bucketsize_,flags_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.key=DU.nil;this.elem=DU.nil;this.bucket=DU.nil;this.hasher=$throwNilPointerError;this.keysize=0;this.valuesize=0;this.bucketsize=0;this.flags=0;return;}this.rtype=rtype_;this.key=key_;this.elem=elem_;this.bucket=bucket_;this.hasher=hasher_;this.keysize=keysize_;this.valuesize=valuesize_;this.bucketsize=bucketsize_;this.flags=flags_;});Z=$pkg.ptrType=$newType(0,$kindStruct,"reflectlite.ptrType",true,"internal/reflectlite",false,function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;return;}this.rtype=rtype_;this.elem=elem_;});AA=$pkg.sliceType=$newType(0,$kindStruct,"reflectlite.sliceType",true,"internal/reflectlite",false,function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.elem=DU.nil;return;}this.rtype=rtype_;this.elem=elem_;});AB=$pkg.structField=$newType(0,$kindStruct,"reflectlite.structField",true,"internal/reflectlite",false,function(name_,typ_,offsetEmbed_){this.$val=this;if(arguments.length===0){this.name=new BO.ptr(EG.nil);this.typ=DU.nil;this.offsetEmbed=0;return;}this.name=name_;this.typ=typ_;this.offsetEmbed=offsetEmbed_;});AC=$pkg.structType=$newType(0,$kindStruct,"reflectlite.structType",true,"internal/reflectlite",false,function(rtype_,pkgPath_,fields_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.pkgPath=new BO.ptr(EG.nil);this.fields=EL.nil;return;}this.rtype=rtype_;this.pkgPath=pkgPath_;this.fields=fields_;});AG=$pkg.nameOff=$newType(4,$kindInt32,"reflectlite.nameOff",true,"internal/reflectlite",false,null);AH=$pkg.typeOff=$newType(4,$kindInt32,"reflectlite.typeOff",true,"internal/reflectlite",false,null);AI=$pkg.textOff=$newType(4,$kindInt32,"reflectlite.textOff",true,"internal/reflectlite",false,null);AT=$pkg.errorString=$newType(0,$kindStruct,"reflectlite.errorString",true,"internal/reflectlite",false,function(s_){this.$val=this;if(arguments.length===0){this.s="";return;}this.s=s_;});AV=$pkg.Method=$newType(0,$kindStruct,"reflectlite.Method",true,"internal/reflectlite",true,function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;if(arguments.length===0){this.Name="";this.PkgPath="";this.Type=$ifaceNil;this.Func=new E.ptr(DU.nil,0,0);this.Index=0;return;}this.Name=Name_;this.PkgPath=PkgPath_;this.Type=Type_;this.Func=Func_;this.Index=Index_;});BL=$pkg.uncommonType=$newType(0,$kindStruct,"reflectlite.uncommonType",true,"internal/reflectlite",false,function(pkgPath_,mcount_,xcount_,moff_,_methods_){this.$val=this;if(arguments.length===0){this.pkgPath=0;this.mcount=0;this.xcount=0;this.moff=0;this._methods=ED.nil;return;}this.pkgPath=pkgPath_;this.mcount=mcount_;this.xcount=xcount_;this.moff=moff_;this._methods=_methods_;});BN=$pkg.funcType=$newType(0,$kindStruct,"reflectlite.funcType",true,"internal/reflectlite",false,function(rtype_,inCount_,outCount_,_in_,_out_){this.$val=this;if(arguments.length===0){this.rtype=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);this.inCount=0;this.outCount=0;this._in=DW.nil;this._out=DW.nil;return;}this.rtype=rtype_;this.inCount=inCount_;this.outCount=outCount_;this._in=_in_;this._out=_out_;});BO=$pkg.name=$newType(0,$kindStruct,"reflectlite.name",true,"internal/reflectlite",false,function(bytes_){this.$val=this;if(arguments.length===0){this.bytes=EG.nil;return;}this.bytes=bytes_;});BP=$pkg.nameData=$newType(0,$kindStruct,"reflectlite.nameData",true,"internal/reflectlite",false,function(name_,tag_,exported_){this.$val=this;if(arguments.length===0){this.name="";this.tag="";this.exported=false;return;}this.name=name_;this.tag=tag_;this.exported=exported_;});CU=$pkg.mapIter=$newType(0,$kindStruct,"reflectlite.mapIter",true,"internal/reflectlite",false,function(t_,m_,keys_,i_,last_){this.$val=this;if(arguments.length===0){this.t=$ifaceNil;this.m=null;this.keys=null;this.i=0;this.last=null;return;}this.t=t_;this.m=m_;this.keys=keys_;this.i=i_;this.last=last_;});CW=$pkg.TypeEx=$newType(8,$kindInterface,"reflectlite.TypeEx",true,"internal/reflectlite",true,null);DU=$ptrType(R);DV=$sliceType(BO);DW=$sliceType(DU);DX=$sliceType($String);DY=$sliceType($emptyInterface);DZ=$ptrType(D.Object);EA=$funcType([DY],[DZ],true);EC=$ptrType(BL);ED=$sliceType(S);EE=$ptrType(BN);EF=$sliceType(E);EG=$ptrType($Uint8);EH=$ptrType($UnsafePointer);EI=$sliceType(O);EJ=$sliceType(DZ);EK=$sliceType(W);EL=$sliceType(AB);EM=$ptrType(BP);EN=$structType("internal/reflectlite",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);EO=$ptrType(CU);ES=$arrayType($Uintptr,2);ET=$sliceType($Uint8);EU=$ptrType(I);EV=$funcType([$UnsafePointer,$UnsafePointer],[$Bool],false);EW=$ptrType(X);EX=$funcType([$UnsafePointer,$Uintptr],[$Uintptr],false);EY=$ptrType(AB);EZ=$ptrType(AT);F.prototype.kind=function(){var m;m=this.$val;return((((m&31)>>>0)>>>0));};$ptrType(F).prototype.kind=function(){return new F(this.$get()).kind();};F.prototype.ro=function(){var m;m=this.$val;if(!((((m&96)>>>0)===0))){return 32;}return 0;};$ptrType(F).prototype.ro=function(){return new F(this.$get()).ro();};E.ptr.prototype.pointer=function(){var m;m=this;if(!((m.typ.size===4))||!m.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((m.flag&128)>>>0)===0))){return(m.ptr).$get();}return m.ptr;};E.prototype.pointer=function(){return this.$val.pointer();};I.ptr.prototype.Error=function(){var m;m=this;if(m.Kind===0){return"reflect: call of "+m.Method+" on zero Value";}return"reflect: call of "+m.Method+" on "+new P(m.Kind).String()+" Value";};I.prototype.Error=function(){return this.$val.Error();};F.prototype.mustBeExported=function(){var m;m=this.$val;if(m===0){$panic(new I.ptr(DF(),0));}if(!((((m&96)>>>0)===0))){$panic(new $String("reflect: "+DF()+" using value obtained using unexported field"));}};$ptrType(F).prototype.mustBeExported=function(){return new F(this.$get()).mustBeExported();};F.prototype.mustBeAssignable=function(){var m;m=this.$val;if(m===0){$panic(new I.ptr(DF(),0));}if(!((((m&96)>>>0)===0))){$panic(new $String("reflect: "+DF()+" using value obtained using unexported field"));}if(((m&256)>>>0)===0){$panic(new $String("reflect: "+DF()+" using unaddressable value"));}};$ptrType(F).prototype.mustBeAssignable=function(){return new F(this.$get()).mustBeAssignable();};E.ptr.prototype.CanSet=function(){var m;m=this;return((m.flag&352)>>>0)===256;};E.prototype.CanSet=function(){return this.$val.CanSet();};E.ptr.prototype.IsValid=function(){var m;m=this;return!((m.flag===0));};E.prototype.IsValid=function(){return this.$val.IsValid();};E.ptr.prototype.Kind=function(){var m;m=this;return new F(m.flag).kind();};E.prototype.Kind=function(){return this.$val.Kind();};E.ptr.prototype.Type=function(){var m,n;m=this;n=m.flag;if(n===0){$panic(new I.ptr("reflectlite.Value.Type",0));}return m.typ;};E.prototype.Type=function(){return this.$val.Type();};AB.ptr.prototype.embedded=function(){var m;m=this;return!((((m.offsetEmbed&1)>>>0)===0));};AB.prototype.embedded=function(){return this.$val.embedded();};P.prototype.String=function(){var m;m=this.$val;if(((m>>0))=AD.$length)?($throwRuntimeError("index out of range"),undefined):AD.$array[AD.$offset+m]);}return(0>=AD.$length?($throwRuntimeError("index out of range"),undefined):AD.$array[AD.$offset+0]);};$ptrType(P).prototype.String=function(){return new P(this.$get()).String();};R.ptr.prototype.String=function(){var m,n;m=this;n=$clone(m.nameOff(m.str),BO).name();if(!((((m.tflag&2)>>>0)===0))){return $substring(n,1);}return n;};R.prototype.String=function(){return this.$val.String();};R.ptr.prototype.Size=function(){var m;m=this;return m.size;};R.prototype.Size=function(){return this.$val.Size();};R.ptr.prototype.Kind=function(){var m;m=this;return((((m.kind&31)>>>0)>>>0));};R.prototype.Kind=function(){return this.$val.Kind();};R.ptr.prototype.pointers=function(){var m;m=this;return!((m.ptrdata===0));};R.prototype.pointers=function(){return this.$val.pointers();};R.ptr.prototype.common=function(){var m;m=this;return m;};R.prototype.common=function(){return this.$val.common();};R.ptr.prototype.exportedMethods=function(){var m,n;m=this;n=m.uncommon();if(n===EC.nil){return ED.nil;}return n.exportedMethods();};R.prototype.exportedMethods=function(){return this.$val.exportedMethods();};R.ptr.prototype.NumMethod=function(){var m,n;m=this;if(m.Kind()===20){n=(m.kindType);return n.NumMethod();}return m.exportedMethods().$length;};R.prototype.NumMethod=function(){return this.$val.NumMethod();};R.ptr.prototype.PkgPath=function(){var m,n;m=this;if(((m.tflag&4)>>>0)===0){return"";}n=m.uncommon();if(n===EC.nil){return"";}return $clone(m.nameOff(n.pkgPath),BO).name();};R.prototype.PkgPath=function(){return this.$val.PkgPath();};R.ptr.prototype.hasName=function(){var m;m=this;return!((((m.tflag&4)>>>0)===0));};R.prototype.hasName=function(){return this.$val.hasName();};R.ptr.prototype.Name=function(){var m,n,o;m=this;if(!m.hasName()){return"";}n=m.String();o=n.length-1>>0;while(true){if(!(o>=0&&!((n.charCodeAt(o)===46)))){break;}o=o-(1)>>0;}return $substring(n,(o+1>>0));};R.prototype.Name=function(){return this.$val.Name();};R.ptr.prototype.chanDir=function(){var m,n;m=this;if(!((m.Kind()===18))){$panic(new $String("reflect: chanDir of non-chan type"));}n=(m.kindType);return((n.dir>>0));};R.prototype.chanDir=function(){return this.$val.chanDir();};R.ptr.prototype.Elem=function(){var m,n,o,p,q,r,s;m=this;n=m.Kind();if(n===(17)){o=(m.kindType);return AP(o.elem);}else if(n===(18)){p=(m.kindType);return AP(p.elem);}else if(n===(21)){q=(m.kindType);return AP(q.elem);}else if(n===(22)){r=(m.kindType);return AP(r.elem);}else if(n===(23)){s=(m.kindType);return AP(s.elem);}$panic(new $String("reflect: Elem of invalid type"));};R.prototype.Elem=function(){return this.$val.Elem();};R.ptr.prototype.In=function(m){var m,n,o,p;n=this;if(!((n.Kind()===19))){$panic(new $String("reflect: In of non-func type"));}o=(n.kindType);return AP((p=o.in$(),((m<0||m>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+m])));};R.prototype.In=function(m){return this.$val.In(m);};R.ptr.prototype.Len=function(){var m,n;m=this;if(!((m.Kind()===17))){$panic(new $String("reflect: Len of non-array type"));}n=(m.kindType);return((n.len>>0));};R.prototype.Len=function(){return this.$val.Len();};R.ptr.prototype.NumIn=function(){var m,n;m=this;if(!((m.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type"));}n=(m.kindType);return((n.inCount>>0));};R.prototype.NumIn=function(){return this.$val.NumIn();};R.ptr.prototype.NumOut=function(){var m,n;m=this;if(!((m.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type"));}n=(m.kindType);return n.out().$length;};R.prototype.NumOut=function(){return this.$val.NumOut();};R.ptr.prototype.Out=function(m){var m,n,o,p;n=this;if(!((n.Kind()===19))){$panic(new $String("reflect: Out of non-func type"));}o=(n.kindType);return AP((p=o.out(),((m<0||m>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+m])));};R.prototype.Out=function(m){return this.$val.Out(m);};X.ptr.prototype.NumMethod=function(){var m;m=this;return m.methods.$length;};X.prototype.NumMethod=function(){return this.$val.NumMethod();};R.ptr.prototype.Implements=function(m){var{m,n,o,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;if($interfaceIsEqual(m,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}o=m.Kind();$s=3;case 3:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(!((o===20))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect: non-interface type passed to Type.Implements"));case 2:$s=-1;return AK($assertType(m,DU),n);}return;}var $f={$blk:R.ptr.prototype.Implements,$c:true,$r,m,n,o,$s};return $f;};R.prototype.Implements=function(m){return this.$val.Implements(m);};R.ptr.prototype.AssignableTo=function(m){var{m,n,o,p,q,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;if($interfaceIsEqual(m,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}o=$assertType(m,DU);p=AL(o,n);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p||AK(o,n);$s=2;case 2:return q;}return;}var $f={$blk:R.ptr.prototype.AssignableTo,$c:true,$r,m,n,o,p,q,$s};return $f;};R.prototype.AssignableTo=function(m){return this.$val.AssignableTo(m);};AK=function(m,n){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(!((m.Kind()===20))){return false;}o=(m.kindType);if(o.methods.$length===0){return true;}if(n.Kind()===20){p=(n.kindType);q=0;r=0;while(true){if(!(r=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+q]));u=$clone(o.rtype.nameOff(t.name),BO);w=(v=p.methods,((r<0||r>=v.$length)?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+r]));x=$clone(n.nameOff(w.name),BO);if($clone(x,BO).name()===$clone(u,BO).name()&&n.typeOff(w.typ)===o.rtype.typeOff(t.typ)){if(!$clone(u,BO).isExported()){y=$clone(u,BO).pkgPath();if(y===""){y=$clone(o.pkgPath,BO).name();}z=$clone(x,BO).pkgPath();if(z===""){z=$clone(p.pkgPath,BO).name();}if(!(y===z)){r=r+(1)>>0;continue;}}q=q+(1)>>0;if(q>=o.methods.$length){return true;}}r=r+(1)>>0;}return false;}aa=n.uncommon();if(aa===EC.nil){return false;}ab=0;ac=aa.methods();ad=0;while(true){if(!(ad<((aa.mcount>>0)))){break;}af=(ae=o.methods,((ab<0||ab>=ae.$length)?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+ab]));ag=$clone(o.rtype.nameOff(af.name),BO);ah=$clone(((ad<0||ad>=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ad]),S);ai=$clone(n.nameOff(ah.name),BO);if($clone(ai,BO).name()===$clone(ag,BO).name()&&n.typeOff(ah.mtyp)===o.rtype.typeOff(af.typ)){if(!$clone(ag,BO).isExported()){aj=$clone(ag,BO).pkgPath();if(aj===""){aj=$clone(o.pkgPath,BO).name();}ak=$clone(ai,BO).pkgPath();if(ak===""){ak=$clone(n.nameOff(aa.pkgPath),BO).name();}if(!(aj===ak)){ad=ad+(1)>>0;continue;}}ab=ab+(1)>>0;if(ab>=o.methods.$length){return true;}}ad=ad+(1)>>0;}return false;};AL=function(m,n){var{m,n,o,p,$s,$r,$c}=$restore(this,{m,n});$s=$s||0;s:while(true){switch($s){case 0:if(m===n){$s=-1;return true;}if(m.hasName()&&n.hasName()||!((m.Kind()===n.Kind()))){$s=-1;return false;}o=AN(m,n,true);$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;$s=2;case 2:return p;}return;}var $f={$blk:AL,$c:true,$r,m,n,o,p,$s};return $f;};AM=function(m,n,o){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:if(o){$s=-1;return $interfaceIsEqual(m,n);}q=m.Name();$s=4;case 4:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=n.Name();$s=5;case 5:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(!(q===r)){p=true;$s=3;continue s;}s=m.Kind();$s=6;case 6:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=n.Kind();$s=7;case 7:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}p=!((s===t));case 3:if(p){$s=1;continue;}$s=2;continue;case 1:$s=-1;return false;case 2:u=m.common();$s=8;case 8:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=u;w=n.common();$s=9;case 9:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;y=AN(v,x,false);$s=10;case 10:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;$s=11;case 11:return z;}return;}var $f={$blk:AM,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AN=function(m,n,o){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:if(m===n){$s=-1;return true;}p=m.Kind();if(!((p===n.Kind()))){$s=-1;return false;}if(1<=p&&p<=16||(p===24)||(p===26)){$s=-1;return true;}q=p;if(q===(17)){$s=2;continue;}if(q===(18)){$s=3;continue;}if(q===(19)){$s=4;continue;}if(q===(20)){$s=5;continue;}if(q===(21)){$s=6;continue;}if((q===(22))||(q===(23))){$s=7;continue;}if(q===(25)){$s=8;continue;}$s=9;continue;case 2:if(!(m.Len()===n.Len())){r=false;$s=10;continue s;}s=AM(m.Elem(),n.Elem(),o);$s=11;case 11:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;case 10:t=r;$s=12;case 12:return t;case 3:if(!(n.chanDir()===3)){u=false;$s=15;continue s;}v=AM(m.Elem(),n.Elem(),o);$s=16;case 16:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;case 15:if(u){$s=13;continue;}$s=14;continue;case 13:$s=-1;return true;case 14:if(!(n.chanDir()===m.chanDir())){w=false;$s=17;continue s;}x=AM(m.Elem(),n.Elem(),o);$s=18;case 18:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=x;case 17:y=w;$s=19;case 19:return y;case 4:z=(m.kindType);aa=(n.kindType);if(!((z.outCount===aa.outCount))||!((z.inCount===aa.inCount))){$s=-1;return false;}ab=0;case 20:if(!(ab>0;$s=20;continue;case 21:ad=0;case 25:if(!(ad>0;$s=25;continue;case 26:$s=-1;return true;case 5:af=(m.kindType);ag=(n.kindType);if((af.methods.$length===0)&&(ag.methods.$length===0)){$s=-1;return true;}$s=-1;return false;case 6:ai=AM(m.Key(),n.Key(),o);$s=31;case 31:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}if(!(ai)){ah=false;$s=30;continue s;}aj=AM(m.Elem(),n.Elem(),o);$s=32;case 32:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ah=aj;case 30:ak=ah;$s=33;case 33:return ak;case 7:al=AM(m.Elem(),n.Elem(),o);$s=34;case 34:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al;$s=35;case 35:return am;case 8:an=(m.kindType);ao=(n.kindType);if(!((an.fields.$length===ao.fields.$length))){$s=-1;return false;}if(!($clone(an.pkgPath,BO).name()===$clone(ao.pkgPath,BO).name())){$s=-1;return false;}ap=an.fields;aq=0;case 36:if(!(aq=as.$length)?($throwRuntimeError("index out of range"),undefined):as.$array[as.$offset+ar]));av=(au=ao.fields,((ar<0||ar>=au.$length)?($throwRuntimeError("index out of range"),undefined):au.$array[au.$offset+ar]));if(!($clone(at.name,BO).name()===$clone(av.name,BO).name())){$s=-1;return false;}aw=AM(at.typ,av.typ,o);$s=40;case 40:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}if(!aw){$s=38;continue;}$s=39;continue;case 38:$s=-1;return false;case 39:if(o&&!($clone(at.name,BO).tag()===$clone(av.name,BO).tag())){$s=-1;return false;}if(!((at.offsetEmbed===av.offsetEmbed))){$s=-1;return false;}aq++;$s=36;continue;case 37:$s=-1;return true;case 9:case 1:$s=-1;return false;}return;}var $f={$blk:AN,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AP=function(m){var m;if(m===DU.nil){return $ifaceNil;}return m;};AQ=function(m){var m;return((m.kind&32)>>>0)===0;};E.ptr.prototype.object=function(){var m,n,o,p;m=this;if((m.typ.Kind()===17)||(m.typ.Kind()===25)){return m.ptr;}if(!((((m.flag&128)>>>0)===0))){n=m.ptr.$get();if(!(n===$ifaceNil)&&!(n.constructor===BI(m.typ))){switch(0){default:o=m.typ.Kind();if((o===(11))||(o===(6))){n=new(BI(m.typ))(n.$high,n.$low);}else if((o===(15))||(o===(16))){n=new(BI(m.typ))(n.$real,n.$imag);}else if(o===(23)){if(n===n.constructor.nil){n=BI(m.typ).nil;break;}p=new(BI(m.typ))(n.$array);p.$offset=n.$offset;p.$length=n.$length;p.$capacity=n.$capacity;n=p;}}}return n;}return m.ptr;};E.prototype.object=function(){return this.$val.object();};E.ptr.prototype.assignTo=function(m,n,o){var{m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=this;if(!((((p.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:q=DG(m,$clone(p,E));$s=3;case 3:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}E.copy(p,q);case 2:r=AL(n,p.typ);$s=8;case 8:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r){$s=5;continue;}if(AK(n,p.typ)){$s=6;continue;}$s=7;continue;case 5:s=(((p.flag&384)>>>0)|new F(p.flag).ro())>>>0;s=(s|(((n.Kind()>>>0))))>>>0;$s=-1;return new E.ptr(n,p.ptr,s);case 6:if(o===0){o=CJ(n);}t=DD($clone(p,E));$s=9;case 9:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=t;if(n.NumMethod()===0){(o).$set(u);}else{DE(n,u,o);}$s=-1;return new E.ptr(n,o,148);case 7:case 4:$panic(new $String(m+": value of type "+p.typ.String()+" is not assignable to type "+n.String()));$s=-1;return new E.ptr(DU.nil,0,0);}return;}var $f={$blk:E.ptr.prototype.assignTo,$c:true,$r,m,n,o,p,q,r,s,t,u,$s};return $f;};E.prototype.assignTo=function(m,n,o){return this.$val.assignTo(m,n,o);};E.ptr.prototype.Cap=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if(o===(17)){return m.typ.Len();}else if((o===(18))||(o===(23))){return $parseInt($clone(m,E).object().$capacity)>>0;}$panic(new I.ptr("reflect.Value.Cap",n));};E.prototype.Cap=function(){return this.$val.Cap();};E.ptr.prototype.Index=function(m){var{aa,ab,ac,ad,ae,af,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:m=[m];n=[n];o=[o];p=[p];q=[q];r=[r];s=this;t=new F(s.flag).kind();u=t;if(u===(17)){$s=2;continue;}if(u===(23)){$s=3;continue;}if(u===(24)){$s=4;continue;}$s=5;continue;case 2:v=(s.typ.kindType);if(m[0]<0||m[0]>((v.len>>0))){$panic(new $String("reflect: array index out of range"));}q[0]=v.elem;w=(((((s.flag&384)>>>0)|new F(s.flag).ro())>>>0)|((q[0].Kind()>>>0)))>>>0;n[0]=s.ptr;if(!((((w&128)>>>0)===0))&&!((q[0].Kind()===17))&&!((q[0].Kind()===25))){$s=7;continue;}$s=8;continue;case 7:$s=-1;return new E.ptr(q[0],(new(BI(DL(q[0])))((function(m,n,o,p,q,r){return function(){return DI(q[0],n[0][m[0]]);};})(m,n,o,p,q,r),(function(m,n,o,p,q,r){return function(x){var x;n[0][m[0]]=DJ(q[0],x);};})(m,n,o,p,q,r))),w);case 8:x=BZ(q[0],DI(q[0],n[0][m[0]]),w);$s=9;case 9:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=x;$s=10;case 10:return y;case 3:z=$clone(s,E).object();if(m[0]<0||m[0]>=($parseInt(z.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}aa=(s.typ.kindType);r[0]=aa.elem;ab=(((384|new F(s.flag).ro())>>>0)|((r[0].Kind()>>>0)))>>>0;m[0]=m[0]+(($parseInt(z.$offset)>>0))>>0;o[0]=z.$array;if(!((((ab&128)>>>0)===0))&&!((r[0].Kind()===17))&&!((r[0].Kind()===25))){$s=11;continue;}$s=12;continue;case 11:$s=-1;return new E.ptr(r[0],(new(BI(DL(r[0])))((function(m,n,o,p,q,r){return function(){return DI(r[0],o[0][m[0]]);};})(m,n,o,p,q,r),(function(m,n,o,p,q,r){return function(ac){var ac;o[0][m[0]]=DJ(r[0],ac);};})(m,n,o,p,q,r))),ab);case 12:ac=BZ(r[0],DI(r[0],o[0][m[0]]),ab);$s=13;case 13:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=ac;$s=14;case 14:return ad;case 4:ae=(s.ptr).$get();if(m[0]<0||m[0]>=ae.length){$panic(new $String("reflect: string index out of range"));}af=(((new F(s.flag).ro()|8)>>>0)|128)>>>0;p[0]=ae.charCodeAt(m[0]);$s=-1;return new E.ptr(BD,((p.$ptr||(p.$ptr=new EG(function(){return this.$target[0];},function($v){this.$target[0]=$v;},p)))),af);case 5:$panic(new I.ptr("reflect.Value.Index",t));case 6:case 1:$s=-1;return new E.ptr(DU.nil,0,0);}return;}var $f={$blk:E.ptr.prototype.Index,$c:true,$r,aa,ab,ac,ad,ae,af,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};E.prototype.Index=function(m){return this.$val.Index(m);};E.ptr.prototype.InterfaceData=function(){var m;m=this;$panic(new $String("InterfaceData is not supported by GopherJS"));};E.prototype.InterfaceData=function(){return this.$val.InterfaceData();};E.ptr.prototype.IsNil=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if((o===(22))||(o===(23))){return $clone(m,E).object()===BI(m.typ).nil;}else if(o===(18)){return $clone(m,E).object()===$chanNil;}else if(o===(19)){return $clone(m,E).object()===$throwNilPointerError;}else if(o===(21)){return $clone(m,E).object()===false;}else if(o===(20)){return $clone(m,E).object()===$ifaceNil;}else if(o===(26)){return $clone(m,E).object()===0;}else{$panic(new I.ptr("reflect.Value.IsNil",n));}};E.prototype.IsNil=function(){return this.$val.IsNil();};E.ptr.prototype.Len=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if((o===(17))||(o===(24))){return $parseInt($clone(m,E).object().length);}else if(o===(23)){return $parseInt($clone(m,E).object().$length)>>0;}else if(o===(18)){return $parseInt($clone(m,E).object().$buffer.length)>>0;}else if(o===(21)){return $parseInt($keys($clone(m,E).object()).length);}else{$panic(new I.ptr("reflect.Value.Len",n));}};E.prototype.Len=function(){return this.$val.Len();};E.ptr.prototype.Pointer=function(){var m,n,o;m=this;n=new F(m.flag).kind();o=n;if((o===(18))||(o===(21))||(o===(22))||(o===(26))){if($clone(m,E).IsNil()){return 0;}return $clone(m,E).object();}else if(o===(19)){if($clone(m,E).IsNil()){return 0;}return 1;}else if(o===(23)){if($clone(m,E).IsNil()){return 0;}return $clone(m,E).object().$array;}else{$panic(new I.ptr("reflect.Value.Pointer",n));}};E.prototype.Pointer=function(){return this.$val.Pointer();};E.ptr.prototype.Set=function(m){var{m,n,o,p,q,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;new F(n.flag).mustBeAssignable();new F(m.flag).mustBeExported();o=$clone(m,E).assignTo("reflect.Set",n.typ,0);$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}E.copy(m,o);if(!((((n.flag&128)>>>0)===0))){$s=2;continue;}$s=3;continue;case 2:p=n.typ.Kind();if(p===(17)){$s=5;continue;}if(p===(20)){$s=6;continue;}if(p===(25)){$s=7;continue;}$s=8;continue;case 5:BI(n.typ).copy(n.ptr,m.ptr);$s=9;continue;case 6:q=DD($clone(m,E));$s=10;case 10:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}n.ptr.$set(q);$s=9;continue;case 7:BY(n.ptr,m.ptr,n.typ);$s=9;continue;case 8:n.ptr.$set($clone(m,E).object());case 9:case 4:$s=-1;return;case 3:n.ptr=m.ptr;$s=-1;return;}return;}var $f={$blk:E.ptr.prototype.Set,$c:true,$r,m,n,o,p,q,$s};return $f;};E.prototype.Set=function(m){return this.$val.Set(m);};E.ptr.prototype.SetBytes=function(m){var{m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;new F(n.flag).mustBeAssignable();new F(n.flag).mustBe(23);o=n.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(!((o===8))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.SetBytes of non-byte slice"));case 2:p=m;if(!(n.typ.Name()==="")){q=true;$s=6;continue s;}r=n.typ.Elem().Name();$s=7;case 7:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=!(r==="");case 6:if(q){$s=4;continue;}$s=5;continue;case 4:s=new(BI(n.typ))(p.$array);s.$offset=p.$offset;s.$length=p.$length;s.$capacity=p.$capacity;p=s;case 5:n.ptr.$set(p);$s=-1;return;}return;}var $f={$blk:E.ptr.prototype.SetBytes,$c:true,$r,m,n,o,p,q,r,s,$s};return $f;};E.prototype.SetBytes=function(m){return this.$val.SetBytes(m);};E.ptr.prototype.SetCap=function(m){var m,n,o,p;n=this;new F(n.flag).mustBeAssignable();new F(n.flag).mustBe(23);o=n.ptr.$get();if(m<($parseInt(o.$length)>>0)||m>($parseInt(o.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}p=new(BI(n.typ))(o.$array);p.$offset=o.$offset;p.$length=o.$length;p.$capacity=m;n.ptr.$set(p);};E.prototype.SetCap=function(m){return this.$val.SetCap(m);};E.ptr.prototype.SetLen=function(m){var m,n,o,p;n=this;new F(n.flag).mustBeAssignable();new F(n.flag).mustBe(23);o=n.ptr.$get();if(m<0||m>($parseInt(o.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}p=new(BI(n.typ))(o.$array);p.$offset=o.$offset;p.$length=m;p.$capacity=o.$capacity;n.ptr.$set(p);};E.prototype.SetLen=function(m){return this.$val.SetLen(m);};E.ptr.prototype.Slice=function(m,n){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n});$s=$s||0;s:while(true){switch($s){case 0:o=this;p=0;q=$ifaceNil;r=null;s=new F(o.flag).kind();t=s;if(t===(17)){$s=2;continue;}if(t===(23)){$s=3;continue;}if(t===(24)){$s=4;continue;}$s=5;continue;case 2:if(((o.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}u=(o.typ.kindType);p=((u.len>>0));q=CH(u.elem);r=new(BI(q))($clone(o,E).object());$s=6;continue;case 3:q=o.typ;r=$clone(o,E).object();p=$parseInt(r.$capacity)>>0;$s=6;continue;case 4:v=(o.ptr).$get();if(m<0||nv.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}w=CC(new $String($substring(v,m,n)));$s=7;case 7:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;$s=8;case 8:return x;case 5:$panic(new I.ptr("reflect.Value.Slice",s));case 6:case 1:if(m<0||np){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}y=BZ(q,$subslice(r,m,n),new F(o.flag).ro());$s=9;case 9:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;$s=10;case 10:return z;}return;}var $f={$blk:E.ptr.prototype.Slice,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};E.prototype.Slice=function(m,n){return this.$val.Slice(m,n);};E.ptr.prototype.Slice3=function(m,n,o){var{m,n,o,p,q,r,s,t,u,v,w,x,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=this;q=0;r=$ifaceNil;s=null;t=new F(p.flag).kind();u=t;if(u===(17)){if(((p.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}v=(p.typ.kindType);q=((v.len>>0));r=CH(v.elem);s=new(BI(r))($clone(p,E).object());}else if(u===(23)){r=p.typ;s=$clone(p,E).object();q=$parseInt(s.$capacity)>>0;}else{$panic(new I.ptr("reflect.Value.Slice3",t));}if(m<0||nq){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}w=BZ(r,$subslice(s,m,n,o),new F(p.flag).ro());$s=1;case 1:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=w;$s=2;case 2:return x;}return;}var $f={$blk:E.ptr.prototype.Slice3,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,$s};return $f;};E.prototype.Slice3=function(m,n,o){return this.$val.Slice3(m,n,o);};E.ptr.prototype.Close=function(){var m;m=this;new F(m.flag).mustBe(18);new F(m.flag).mustBeExported();$close($clone(m,E).object());};E.prototype.Close=function(){return this.$val.Close();};E.ptr.prototype.Elem=function(){var{m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=new F(m.flag).kind();o=n;if(o===(20)){$s=2;continue;}if(o===(22)){$s=3;continue;}$s=4;continue;case 2:p=$clone(m,E).object();if(p===$ifaceNil){$s=-1;return new E.ptr(DU.nil,0,0);}q=BJ(p.constructor);r=BZ(q,p.$val,new F(m.flag).ro());$s=6;case 6:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=7;case 7:return s;case 3:if($clone(m,E).IsNil()){$s=-1;return new E.ptr(DU.nil,0,0);}t=$clone(m,E).object();u=(m.typ.kindType);v=(((((m.flag&96)>>>0)|128)>>>0)|256)>>>0;v=(v|(((u.elem.Kind()>>>0))))>>>0;$s=-1;return new E.ptr(u.elem,(DI(u.elem,t)),v);case 4:$panic(new I.ptr("reflect.Value.Elem",n));case 5:case 1:$s=-1;return new E.ptr(DU.nil,0,0);}return;}var $f={$blk:E.ptr.prototype.Elem,$c:true,$r,m,n,o,p,q,r,s,t,u,v,$s};return $f;};E.prototype.Elem=function(){return this.$val.Elem();};E.ptr.prototype.NumField=function(){var m,n;m=this;new F(m.flag).mustBe(25);n=(m.typ.kindType);return n.fields.$length;};E.prototype.NumField=function(){return this.$val.NumField();};E.ptr.prototype.MapKeys=function(){var{m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=this;new F(m.flag).mustBe(21);n=(m.typ.kindType);o=n.key;p=(new F(m.flag).ro()|((o.Kind()>>>0)))>>>0;q=$clone(m,E).pointer();r=0;if(!(q===0)){r=CZ(q);}s=CV(m.typ,q);t=$makeSlice(EF,r);u=0;u=0;case 1:if(!(u=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]),DM(o,p,w));CY(s);u=u+(1)>>0;$s=1;continue;case 2:$s=-1;return $subslice(t,0,u);}return;}var $f={$blk:E.ptr.prototype.MapKeys,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};E.prototype.MapKeys=function(){return this.$val.MapKeys();};E.ptr.prototype.MapIndex=function(m){var{m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=this;new F(n.flag).mustBe(21);o=(n.typ.kindType);p=$clone(m,E).assignTo("reflect.Value.MapIndex",o.key,0);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}E.copy(m,p);q=0;if(!((((m.flag&128)>>>0)===0))){q=m.ptr;}else{q=((m.$ptr_ptr||(m.$ptr_ptr=new EH(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},m))));}r=CR(n.typ,$clone(n,E).pointer(),q);if(r===0){$s=-1;return new E.ptr(DU.nil,0,0);}s=o.elem;t=new F((((n.flag|m.flag)>>>0))).ro();t=(t|(((s.Kind()>>>0))))>>>0;$s=-1;return DM(s,t,r);}return;}var $f={$blk:E.ptr.prototype.MapIndex,$c:true,$r,m,n,o,p,q,r,s,t,$s};return $f;};E.prototype.MapIndex=function(m){return this.$val.MapIndex(m);};E.ptr.prototype.Field=function(m){var{aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=[n];o=[o];p=[p];q=[q];r=this;if(!((new F(r.flag).kind()===25))){$panic(new I.ptr("reflect.Value.Field",new F(r.flag).kind()));}s=(r.typ.kindType);if(((m>>>0))>=((s.fields.$length>>>0))){$panic(new $String("reflect: Field index out of range"));}o[0]=$internalize(BI(r.typ).fields[m].prop,$String);u=(t=s.fields,((m<0||m>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+m]));q[0]=u.typ;v=(((r.flag&416)>>>0)|((q[0].Kind()>>>0)))>>>0;if(!$clone(u.name,BO).isExported()){if(u.embedded()){v=(v|(64))>>>0;}else{v=(v|(32))>>>0;}}x=$clone((w=s.fields,((m<0||m>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+m])).name,BO).tag();if(!(x==="")&&!((m===0))){$s=1;continue;}$s=2;continue;case 1:n[0]=DK(x);if(!(n[0]==="")){$s=3;continue;}$s=4;continue;case 3:case 5:y=[y];z=$clone(r,E).Field(0);$s=7;case 7:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}E.copy(r,z);if(r.typ===DH){$s=8;continue;}$s=9;continue;case 8:y[0]=$clone(r,E).object().object;$s=-1;return new E.ptr(q[0],(new(BI(DL(q[0])))((function(n,o,p,q,y){return function(){return $internalize(y[0][$externalize(n[0],$String)],BI(q[0]));};})(n,o,p,q,y),(function(n,o,p,q,y){return function(aa){var aa;y[0][$externalize(n[0],$String)]=$externalize(aa,BI(q[0]));};})(n,o,p,q,y))),v);case 9:if(r.typ.Kind()===22){$s=10;continue;}$s=11;continue;case 10:aa=$clone(r,E).Elem();$s=12;case 12:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}E.copy(r,aa);case 11:$s=5;continue;case 6:case 4:case 2:p[0]=r.ptr;if(!((((v&128)>>>0)===0))&&!((q[0].Kind()===17))&&!((q[0].Kind()===25))){$s=13;continue;}$s=14;continue;case 13:$s=-1;return new E.ptr(q[0],(new(BI(DL(q[0])))((function(n,o,p,q){return function(){return DI(q[0],p[0][$externalize(o[0],$String)]);};})(n,o,p,q),(function(n,o,p,q){return function(ab){var ab;p[0][$externalize(o[0],$String)]=DJ(q[0],ab);};})(n,o,p,q))),v);case 14:ab=BZ(q[0],DI(q[0],p[0][$externalize(o[0],$String)]),v);$s=15;case 15:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;$s=16;case 16:return ac;}return;}var $f={$blk:E.ptr.prototype.Field,$c:true,$r,aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};E.prototype.Field=function(m){return this.$val.Field(m);};AT.ptr.prototype.Error=function(){var m;m=this;return m.s;};AT.prototype.Error=function(){return this.$val.Error();};AU=function(m){var m;if(m.length<2){return[m,$ifaceNil];}if((m.charCodeAt(0)===39)||(m.charCodeAt(0)===34)){if(m.charCodeAt((m.length-1>>0))===m.charCodeAt(0)){return[$substring(m,1,(m.length-1>>0)),$ifaceNil];}return["",$pkg.ErrSyntax];}return[m,$ifaceNil];};F.prototype.mustBe=function(m){var m,n;n=this.$val;if(!((((((n&31)>>>0)>>>0))===m))){$panic(new I.ptr(DF(),new F(n).kind()));}};$ptrType(F).prototype.mustBe=function(m){return new F(this.$get()).mustBe(m);};R.ptr.prototype.Comparable=function(){var{m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=m.Kind();if((n===(19))||(n===(23))||(n===(21))){$s=2;continue;}if(n===(17)){$s=3;continue;}if(n===(25)){$s=4;continue;}$s=5;continue;case 2:$s=-1;return false;case 3:o=m.Elem().Comparable();$s=6;case 6:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;$s=7;case 7:return p;case 4:q=0;case 8:if(!(q>0;$s=8;continue;case 9:case 5:case 1:$s=-1;return true;}return;}var $f={$blk:R.ptr.prototype.Comparable,$c:true,$r,m,n,o,p,q,r,s,$s};return $f;};R.prototype.Comparable=function(){return this.$val.Comparable();};R.ptr.prototype.IsVariadic=function(){var m,n;m=this;if(!((m.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type"));}n=(m.kindType);return!((((n.outCount&32768)>>>0)===0));};R.prototype.IsVariadic=function(){return this.$val.IsVariadic();};R.ptr.prototype.Field=function(m){var m,n,o,p;n=this;if(!((n.Kind()===25))){$panic(new $String("reflect: Field of non-struct type"));}o=(n.kindType);if(m<0||m>=o.fields.$length){$panic(new $String("reflect: Field index out of bounds"));}return(p=o.fields,((m<0||m>=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+m]));};R.prototype.Field=function(m){return this.$val.Field(m);};R.ptr.prototype.Key=function(){var m,n;m=this;if(!((m.Kind()===21))){$panic(new $String("reflect: Key of non-map type"));}n=(m.kindType);return AP(n.key);};R.prototype.Key=function(){return this.$val.Key();};R.ptr.prototype.NumField=function(){var m,n;m=this;if(!((m.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type"));}n=(m.kindType);return n.fields.$length;};R.prototype.NumField=function(){return this.$val.NumField();};R.ptr.prototype.Method=function(m){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=[n];o=new AV.ptr("","",$ifaceNil,new E.ptr(DU.nil,0,0),0);p=this;if(p.Kind()===20){$s=1;continue;}$s=2;continue;case 1:q=(p.kindType);r=q.rtype.Method(m);$s=3;case 3:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}AV.copy(o,r);s=o;$s=4;case 4:return s;case 2:t=p.exportedMethods();if(m<0||m>=t.$length){$panic(new $String("reflect: Method index out of range"));}u=$clone(((m<0||m>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+m]),S);v=$clone(p.nameOff(u.name),BO);o.Name=$clone(v,BO).name();w=19;x=p.typeOff(u.mtyp);y=(x.kindType);z=$makeSlice(EI,0,(1+y.in$().$length>>0));z=$append(z,p);aa=y.in$();ab=0;while(true){if(!(ab=aa.$length)?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+ab]);z=$append(z,ac);ab++;}ad=$makeSlice(EI,0,y.out().$length);ae=y.out();af=0;while(true){if(!(af=ae.$length)?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+af]);ad=$append(ad,ag);af++;}ah=CF(z,ad,y.rtype.IsVariadic());$s=5;case 5:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;o.Type=ai;n[0]=$internalize($methodSet(p[$externalize(BE,$String)])[m].prop,$String);aj=D.MakeFunc((function(n){return function(aj,ak){var aj,ak,al;al=(0>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+0]);return new $jsObjectPtr(al[$externalize(n[0],$String)].apply(al,$externalize($subslice(ak,1),EJ)));};})(n));E.copy(o.Func,new E.ptr($assertType(ai,DU),(aj),w));o.Index=m;AV.copy(o,o);$s=-1;return o;}return;}var $f={$blk:R.ptr.prototype.Method,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};R.prototype.Method=function(m){return this.$val.Method(m);};BA=function(m){var{m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=[n];o=[o];p=[p];q=CC(m);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=$clone(q,E);if(!(($clone(r,E).Kind()===23))){$panic(new I.ptr("Swapper",$clone(r,E).Kind()));}p[0]=(($clone(r,E).Len()>>>0));s=p[0];if(s===(0)){$s=-1;return(function(n,o,p){return function(t,u){var t,u;$panic(new $String("reflect: slice index out of range"));};})(n,o,p);}else if(s===(1)){$s=-1;return(function(n,o,p){return function(t,u){var t,u;if(!((t===0))||!((u===0))){$panic(new $String("reflect: slice index out of range"));}};})(n,o,p);}n[0]=m.$array;o[0]=$parseInt(m.$offset)>>0;$s=-1;return(function(n,o,p){return function(t,u){var t,u,v;if(((t>>>0))>=p[0]||((u>>>0))>=p[0]){$panic(new $String("reflect: slice index out of range"));}t=t+(o[0])>>0;u=u+(o[0])>>0;v=n[0][t];n[0][t]=n[0][u];n[0][u]=v;};})(n,o,p);}return;}var $f={$blk:BA,$c:true,$r,m,n,o,p,q,r,s,$s};return $f;};$pkg.Swapper=BA;BC=function(){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:m=(function(m){var m;});$r=m((n=new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),new n.constructor.elem(n)));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((o=new BL.ptr(0,0,0,0,ED.nil),new o.constructor.elem(o)));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((p=new S.ptr(0,0,0,0),new p.constructor.elem(p)));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((q=new U.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil,DU.nil,0),new q.constructor.elem(q)));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((r=new V.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil,0),new r.constructor.elem(r)));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((s=new BN.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),0,0,DW.nil,DW.nil),new s.constructor.elem(s)));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((t=new X.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),new BO.ptr(EG.nil),EK.nil),new t.constructor.elem(t)));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((u=new Y.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil,DU.nil,DU.nil,$throwNilPointerError,0,0,0,0),new u.constructor.elem(u)));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((v=new Z.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil),new v.constructor.elem(v)));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((w=new AA.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),DU.nil),new w.constructor.elem(w)));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((x=new AC.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),new BO.ptr(EG.nil),EL.nil),new x.constructor.elem(x)));$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((y=new W.ptr(0,0),new y.constructor.elem(y)));$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=m((z=new AB.ptr(new BO.ptr(EG.nil),DU.nil,0),new z.constructor.elem(z)));$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}BB=true;BD=$assertType(CB(new $Uint8(0)),DU);$s=-1;return;}return;}var $f={$blk:BC,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};BI=function(m){var m;return m[$externalize(BE,$String)];};BJ=function(m){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(m[$externalize(BF,$String)]===undefined){n=new R.ptr(((($parseInt(m.size)>>0)>>>0)),0,0,0,0,0,((($parseInt(m.kind)>>0)<<24>>>24)),$throwNilPointerError,EG.nil,BT($clone(BR(BW(m.string),"",!!(m.exported)),BO)),0);n[$externalize(BE,$String)]=m;m[$externalize(BF,$String)]=n;o=$methodSet(m);if(!(($parseInt(o.length)===0))||!!(m.named)){n.tflag=(n.tflag|(1))>>>0;if(!!(m.named)){n.tflag=(n.tflag|(4))>>>0;}p=ED.nil;q=0;while(true){if(!(q<$parseInt(o.length))){break;}r=o[q];s=BW(r.pkg)==="";if(!s){q=q+(1)>>0;continue;}p=$append(p,new S.ptr(BT($clone(BR(BW(r.name),"",s),BO)),BV(BJ(r.typ)),0,0));q=q+(1)>>0;}t=((p.$length<<16>>>16));u=0;while(true){if(!(u<$parseInt(o.length))){break;}v=o[u];w=BW(v.pkg)==="";if(w){u=u+(1)>>0;continue;}p=$append(p,new S.ptr(BT($clone(BR(BW(v.name),"",w),BO)),BV(BJ(v.typ)),0,0));u=u+(1)>>0;}x=new BL.ptr(BT($clone(BR(BW(m.pkg),"",false),BO)),(($parseInt(o.length)<<16>>>16)),t,0,p);y=n;(BM||$throwRuntimeError("assignment to entry in nil map"))[DU.keyFor(y)]={k:y,v:x};x[$externalize(BE,$String)]=m;}z=n.Kind();if(z===(17)){BK(n,new U.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem),DU.nil,((($parseInt(m.len)>>0)>>>0))));}else if(z===(18)){aa=3;if(!!(m.sendOnly)){aa=2;}if(!!(m.recvOnly)){aa=1;}BK(n,new V.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem),((aa>>>0))));}else if(z===(19)){ab=m.params;ac=$makeSlice(DW,$parseInt(ab.length));ad=ac;ae=0;while(true){if(!(ae=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+af]=BJ(ab[af]));ae++;}ag=m.results;ah=$makeSlice(DW,$parseInt(ag.length));ai=ah;aj=0;while(true){if(!(aj=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ak]=BJ(ag[ak]));aj++;}al=(($parseInt(ag.length)<<16>>>16));if(!!(m.variadic)){al=(al|(32768))>>>0;}BK(n,new BN.ptr($clone(n,R),(($parseInt(ab.length)<<16>>>16)),al,ac,ah));}else if(z===(20)){am=m.methods;an=$makeSlice(EK,$parseInt(am.length));ao=an;ap=0;while(true){if(!(ap=an.$length)?($throwRuntimeError("index out of range"),undefined):an.$array[an.$offset+aq]),new W.ptr(BT($clone(BR(BW(ar.name),"",BW(ar.pkg)===""),BO)),BV(BJ(ar.typ))));ap++;}BK(n,new X.ptr($clone(n,R),$clone(BR(BW(m.pkg),"",false),BO),an));}else if(z===(21)){BK(n,new Y.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.key),BJ(m.elem),DU.nil,$throwNilPointerError,0,0,0,0));}else if(z===(22)){BK(n,new Z.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem)));}else if(z===(23)){BK(n,new AA.ptr(new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0),BJ(m.elem)));}else if(z===(25)){as=m.fields;at=$makeSlice(EL,$parseInt(as.length));au=at;av=0;while(true){if(!(av>>0))<<1>>>0;if(!!(ax.embedded)){ay=(ay|(1))>>>0;}AB.copy(((aw<0||aw>=at.$length)?($throwRuntimeError("index out of range"),undefined):at.$array[at.$offset+aw]),new AB.ptr($clone(BR(BW(ax.name),BW(ax.tag),!!(ax.exported)),BO),BJ(ax.typ),ay));av++;}BK(n,new AC.ptr($clone(n,R),$clone(BR(BW(m.pkgPath),"",false),BO),at));}}return((m[$externalize(BF,$String)]));};BK=function(m,n){var m,n;m[$externalize(BG,$String)]=n;n[$externalize(BH,$String)]=m;};BL.ptr.prototype.methods=function(){var m;m=this;return m._methods;};BL.prototype.methods=function(){return this.$val.methods();};BL.ptr.prototype.exportedMethods=function(){var m;m=this;return $subslice(m._methods,0,m.xcount,m.xcount);};BL.prototype.exportedMethods=function(){return this.$val.exportedMethods();};R.ptr.prototype.uncommon=function(){var m,n;m=this;return(n=BM[DU.keyFor(m)],n!==undefined?n.v:EC.nil);};R.prototype.uncommon=function(){return this.$val.uncommon();};BN.ptr.prototype.in$=function(){var m;m=this;return m._in;};BN.prototype.in$=function(){return this.$val.in$();};BN.ptr.prototype.out=function(){var m;m=this;return m._out;};BN.prototype.out=function(){return this.$val.out();};BO.ptr.prototype.name=function(){var m,n,o;m="";n=this;m=(o=BQ[EG.keyFor(n.bytes)],o!==undefined?o.v:EM.nil).name;return m;};BO.prototype.name=function(){return this.$val.name();};BO.ptr.prototype.tag=function(){var m,n,o;m="";n=this;m=(o=BQ[EG.keyFor(n.bytes)],o!==undefined?o.v:EM.nil).tag;return m;};BO.prototype.tag=function(){return this.$val.tag();};BO.ptr.prototype.pkgPath=function(){var m;m=this;return"";};BO.prototype.pkgPath=function(){return this.$val.pkgPath();};BO.ptr.prototype.isExported=function(){var m,n;m=this;return(n=BQ[EG.keyFor(m.bytes)],n!==undefined?n.v:EM.nil).exported;};BO.prototype.isExported=function(){return this.$val.isExported();};BR=function(m,n,o){var m,n,o,p,q;p=$newDataPointer(0,EG);q=p;(BQ||$throwRuntimeError("assignment to entry in nil map"))[EG.keyFor(q)]={k:q,v:new BP.ptr(m,n,o)};return new BO.ptr(p);};R.ptr.prototype.nameOff=function(m){var m,n,o;n=this;return(o=((m>>0)),((o<0||o>=BS.$length)?($throwRuntimeError("index out of range"),undefined):BS.$array[BS.$offset+o]));};R.prototype.nameOff=function(m){return this.$val.nameOff(m);};BT=function(m){var m,n;n=BS.$length;BS=$append(BS,m);return((n>>0));};R.ptr.prototype.typeOff=function(m){var m,n,o;n=this;return(o=((m>>0)),((o<0||o>=BU.$length)?($throwRuntimeError("index out of range"),undefined):BU.$array[BU.$offset+o]));};R.prototype.typeOff=function(m){return this.$val.typeOff(m);};BV=function(m){var m,n;n=BU.$length;BU=$append(BU,m);return((n>>0));};BW=function(m){var m,n;n=new EN.ptr("");n.str=m;return n.str;};BX=function(m){var m;return!!(BI(m).wrapped);};BY=function(m,n,o){var m,n,o,p,q,r;p=BI(o).fields;q=0;while(true){if(!(q<$parseInt(p.length))){break;}r=$internalize(p[q].prop,$String);m[$externalize(r,$String)]=n[$externalize(r,$String)];q=q+(1)>>0;}};BZ=function(m,n,o){var{m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=m.common();$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;t=m.Kind();$s=6;case 6:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}if(t===17){s=true;$s=5;continue s;}u=m.Kind();$s=7;case 7:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}s=u===25;case 5:if(s){r=true;$s=4;continue s;}v=m.Kind();$s=8;case 8:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}r=v===22;case 4:if(r){$s=2;continue;}$s=3;continue;case 2:w=m.Kind();$s=9;case 9:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}x=new E.ptr(q,(n),(o|((w>>>0)))>>>0);$s=10;case 10:return x;case 3:y=m.Kind();$s=11;case 11:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=new E.ptr(q,($newDataPointer(n,BI(q.ptrTo()))),(((o|((y>>>0)))>>>0)|128)>>>0);$s=12;case 12:return z;}return;}var $f={$blk:BZ,$c:true,$r,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};CB=function(m){var m;if(!BB){return new R.ptr(0,0,0,0,0,0,0,$throwNilPointerError,EG.nil,0,0);}if($interfaceIsEqual(m,$ifaceNil)){return $ifaceNil;}return BJ(m.constructor);};$pkg.TypeOf=CB;CC=function(m){var{m,n,o,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:if($interfaceIsEqual(m,$ifaceNil)){$s=-1;return new E.ptr(DU.nil,0,0);}n=BZ(BJ(m.constructor),m.$val,0);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=2;case 2:return o;}return;}var $f={$blk:CC,$c:true,$r,m,n,o,$s};return $f;};$pkg.ValueOf=CC;CF=function(m,n,o){var{aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{m,n,o});$s=$s||0;s:while(true){switch($s){case 0:if(!(o)){p=false;$s=3;continue s;}if(m.$length===0){q=true;$s=4;continue s;}s=(r=m.$length-1>>0,((r<0||r>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+r])).Kind();$s=5;case 5:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}q=!((s===23));case 4:p=q;case 3:if(p){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.FuncOf: last arg of variadic func must be slice"));case 2:t=$makeSlice(EJ,m.$length);u=m;v=0;while(true){if(!(v=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+v]);((w<0||w>=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+w]=BI(x));v++;}y=$makeSlice(EJ,n.$length);z=n;aa=0;while(true){if(!(aa=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+aa]);((ab<0||ab>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+ab]=BI(ac));aa++;}$s=-1;return BJ($funcType($externalize(t,EJ),$externalize(y,EJ),$externalize(o,$Bool)));}return;}var $f={$blk:CF,$c:true,$r,aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.FuncOf=CF;R.ptr.prototype.ptrTo=function(){var m;m=this;return BJ($ptrType(BI(m)));};R.prototype.ptrTo=function(){return this.$val.ptrTo();};CH=function(m){var m;return BJ($sliceType(BI(m)));};$pkg.SliceOf=CH;CJ=function(m){var m,n;n=m.Kind();if(n===(25)){return(new(BI(m).ptr)());}else if(n===(17)){return(BI(m).zero());}else{return($newDataPointer(BI(m).zero(),BI(m.ptrTo())));}};CM=function(m,n,o){var m,n,o;n.$set(o.$get());};CQ=function(m,n){var m,n,o,p;o=n;if(!(o.$get===undefined)){o=o.$get();}p=$internalize(BI(m.Key()).keyFor(o),$String);return[o,p];};CR=function(m,n,o){var m,n,o,p,q,r;p=CQ(m,o);q=p[1];r=n[$externalize(q,$String)];if(r===undefined){return 0;}return($newDataPointer(r.v,BI(DL(m.Elem()))));};CU.ptr.prototype.skipUntilValidKey=function(){var m,n;m=this;while(true){if(!(m.i<$parseInt(m.keys.length))){break;}n=m.keys[m.i];if(!(m.m[$externalize($internalize(n,$String),$String)]===undefined)){break;}m.i=m.i+(1)>>0;}};CU.prototype.skipUntilValidKey=function(){return this.$val.skipUntilValidKey();};CV=function(m,n){var m,n;return(new CU.ptr(m,n,$keys(n),0,null));};CX=function(m){var{m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:n=($pointerOfStructConversion(m,EO));o=null;if(!(n.last===null)){o=n.last;}else{n.skipUntilValidKey();if(n.i===$parseInt(n.keys.length)){$s=-1;return 0;}p=n.keys[n.i];o=n.m[$externalize($internalize(p,$String),$String)];n.last=o;}q=$assertType(n.t,CW).Key();$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=DL(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=BI(r);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=($newDataPointer(o.k,s));$s=4;case 4:return t;}return;}var $f={$blk:CX,$c:true,$r,m,n,o,p,q,r,s,t,$s};return $f;};CY=function(m){var m,n;n=($pointerOfStructConversion(m,EO));n.last=null;n.i=n.i+(1)>>0;};CZ=function(m){var m;return $parseInt($keys(m).length);};DC=function(m,n,o){var m,n,o,p,q,r,s,t,u,v,w,x,y;p=DU.nil;q=EE.nil;r=0;s="";if(n.typ.Kind()===20){t=(n.typ.kindType);if(o<0||o>=t.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}v=(u=t.methods,((o<0||o>=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+o]));if(!$clone(t.rtype.nameOff(v.name),BO).isExported()){$panic(new $String("reflect: "+m+" of unexported method"));}q=(t.rtype.typeOff(v.typ).kindType);s=$clone(t.rtype.nameOff(v.name),BO).name();}else{w=n.typ.exportedMethods();if(((o>>>0))>=((w.$length>>>0))){$panic(new $String("reflect: internal error: invalid method index"));}x=$clone(((o<0||o>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+o]),S);if(!$clone(n.typ.nameOff(x.name),BO).isExported()){$panic(new $String("reflect: "+m+" of unexported method"));}q=(n.typ.typeOff(x.mtyp).kindType);s=$internalize($methodSet(BI(n.typ))[o].prop,$String);}y=$clone(n,E).object();if(BX(n.typ)){y=new(BI(n.typ))(y);}r=(y[$externalize(s,$String)]);return[p,q,r];};DD=function(m){var{m,n,$s,$r,$c}=$restore(this,{m});$s=$s||0;s:while(true){switch($s){case 0:if(m.flag===0){$panic(new I.ptr("reflect.Value.Interface",0));}if(!((((m.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:n=DG("Interface",$clone(m,E));$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}E.copy(m,n);case 2:if(BX(m.typ)){$s=-1;return((new(BI(m.typ))($clone(m,E).object())));}$s=-1;return(($clone(m,E).object()));}return;}var $f={$blk:DD,$c:true,$r,m,n,$s};return $f;};DE=function(m,n,o){var m,n,o;o.$set(n);};DF=function(){return"?FIXME?";};DG=function(m,n){var{m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{m,n});$s=$s||0;s:while(true){switch($s){case 0:o=[o];p=[p];if(((n.flag&512)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}q=DC(m,$clone(n,E),((n.flag>>0))>>10>>0);o[0]=q[2];p[0]=$clone(n,E).object();if(BX(n.typ)){p[0]=new(BI(n.typ))(p[0]);}r=D.MakeFunc((function(o,p){return function(r,s){var r,s;return new $jsObjectPtr(o[0].apply(p[0],$externalize(s,EJ)));};})(o,p));s=$clone(n,E).Type().common();$s=1;case 1:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=new E.ptr(s,(r),(new F(n.flag).ro()|19)>>>0);$s=2;case 2:return t;}return;}var $f={$blk:DG,$c:true,$r,m,n,o,p,q,r,s,t,$s};return $f;};DI=function(m,n){var m,n;if($interfaceIsEqual(m,DH)){return new(BI(DH))(n);}return n;};DJ=function(m,n){var m,n;if($interfaceIsEqual(m,DH)){return n.object;}return n;};DK=function(m){var m,n,o,p,q,r;while(true){if(!(!(m===""))){break;}n=0;while(true){if(!(n>0;}m=$substring(m,n);if(m===""){break;}n=0;while(true){if(!(n>0;}if((n+1>>0)>=m.length||!((m.charCodeAt(n)===58))||!((m.charCodeAt((n+1>>0))===34))){break;}o=($substring(m,0,n));m=$substring(m,(n+1>>0));n=1;while(true){if(!(n>0;}n=n+(1)>>0;}if(n>=m.length){break;}p=($substring(m,0,(n+1>>0)));m=$substring(m,(n+1>>0));if(o==="js"){q=AU(p);r=q[0];return r;}}return"";};DL=function(m){var m;return $assertType(m,DU).ptrTo();};$pkg.PtrTo=DL;DM=function(m,n,o){var m,n,o,p;if(AQ(m)){p=CJ(m);CM(m,p,o);return new E.ptr(m,p,(n|128)>>>0);}return new E.ptr(m,(o).$get(),n);};E.methods=[{prop:"pointer",name:"pointer",pkg:"internal/reflectlite",typ:$funcType([],[$UnsafePointer],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"numMethod",name:"numMethod",pkg:"internal/reflectlite",typ:$funcType([],[$Int],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[O],false)},{prop:"object",name:"object",pkg:"internal/reflectlite",typ:$funcType([],[DZ],false)},{prop:"assignTo",name:"assignTo",pkg:"internal/reflectlite",typ:$funcType([$String,DU,$UnsafePointer],[E],false)},{prop:"call",name:"call",pkg:"internal/reflectlite",typ:$funcType([$String,EF],[EF],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[E],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[ES],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([E],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([ET],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[E],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[E],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[E],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[EF],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([E],[E],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[E],false)}];F.methods=[{prop:"kind",name:"kind",pkg:"internal/reflectlite",typ:$funcType([],[P],false)},{prop:"ro",name:"ro",pkg:"internal/reflectlite",typ:$funcType([],[F],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"internal/reflectlite",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"internal/reflectlite",typ:$funcType([],[],false)},{prop:"mustBe",name:"mustBe",pkg:"internal/reflectlite",typ:$funcType([P],[],false)}];EU.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];P.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];DU.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"pointers",name:"pointers",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)},{prop:"common",name:"common",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"exportedMethods",name:"exportedMethods",pkg:"internal/reflectlite",typ:$funcType([],[ED],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"hasName",name:"hasName",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"chanDir",name:"chanDir",pkg:"internal/reflectlite",typ:$funcType([],[T],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[O],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[O],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"kindType",name:"kindType",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[AB],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[O],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[AV],false)},{prop:"uncommon",name:"uncommon",pkg:"internal/reflectlite",typ:$funcType([],[EC],false)},{prop:"nameOff",name:"nameOff",pkg:"internal/reflectlite",typ:$funcType([AG],[BO],false)},{prop:"typeOff",name:"typeOff",pkg:"internal/reflectlite",typ:$funcType([AH],[DU],false)},{prop:"ptrTo",name:"ptrTo",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)}];EW.methods=[{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)}];EY.methods=[{prop:"offset",name:"offset",pkg:"internal/reflectlite",typ:$funcType([],[$Uintptr],false)},{prop:"embedded",name:"embedded",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)}];EZ.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];EC.methods=[{prop:"methods",name:"methods",pkg:"internal/reflectlite",typ:$funcType([],[ED],false)},{prop:"exportedMethods",name:"exportedMethods",pkg:"internal/reflectlite",typ:$funcType([],[ED],false)}];EE.methods=[{prop:"in$",name:"in",pkg:"internal/reflectlite",typ:$funcType([],[DW],false)},{prop:"out",name:"out",pkg:"internal/reflectlite",typ:$funcType([],[DW],false)}];BO.methods=[{prop:"data",name:"data",pkg:"internal/reflectlite",typ:$funcType([$Int,$String],[EG],false)},{prop:"hasTag",name:"hasTag",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)},{prop:"readVarint",name:"readVarint",pkg:"internal/reflectlite",typ:$funcType([$Int],[$Int,$Int],false)},{prop:"name",name:"name",pkg:"internal/reflectlite",typ:$funcType([],[$String],false)},{prop:"tag",name:"tag",pkg:"internal/reflectlite",typ:$funcType([],[$String],false)},{prop:"pkgPath",name:"pkgPath",pkg:"internal/reflectlite",typ:$funcType([],[$String],false)},{prop:"isExported",name:"isExported",pkg:"internal/reflectlite",typ:$funcType([],[$Bool],false)}];EO.methods=[{prop:"skipUntilValidKey",name:"skipUntilValidKey",pkg:"internal/reflectlite",typ:$funcType([],[],false)}];E.init("internal/reflectlite",[{prop:"typ",name:"typ",embedded:false,exported:false,typ:DU,tag:""},{prop:"ptr",name:"ptr",embedded:false,exported:false,typ:$UnsafePointer,tag:""},{prop:"flag",name:"flag",embedded:true,exported:false,typ:F,tag:""}]);I.init("",[{prop:"Method",name:"Method",embedded:false,exported:true,typ:$String,tag:""},{prop:"Kind",name:"Kind",embedded:false,exported:true,typ:P,tag:""}]);O.init([{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[O],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"uncommon",name:"uncommon",pkg:"internal/reflectlite",typ:$funcType([],[EC],false)}]);R.init("internal/reflectlite",[{prop:"size",name:"size",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"ptrdata",name:"ptrdata",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"hash",name:"hash",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"tflag",name:"tflag",embedded:false,exported:false,typ:Q,tag:""},{prop:"align",name:"align",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"kind",name:"kind",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"equal",name:"equal",embedded:false,exported:false,typ:EV,tag:""},{prop:"gcdata",name:"gcdata",embedded:false,exported:false,typ:EG,tag:""},{prop:"str",name:"str",embedded:false,exported:false,typ:AG,tag:""},{prop:"ptrToThis",name:"ptrToThis",embedded:false,exported:false,typ:AH,tag:""}]);S.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:AG,tag:""},{prop:"mtyp",name:"mtyp",embedded:false,exported:false,typ:AH,tag:""},{prop:"ifn",name:"ifn",embedded:false,exported:false,typ:AI,tag:""},{prop:"tfn",name:"tfn",embedded:false,exported:false,typ:AI,tag:""}]);U.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""},{prop:"slice",name:"slice",embedded:false,exported:false,typ:DU,tag:""},{prop:"len",name:"len",embedded:false,exported:false,typ:$Uintptr,tag:""}]);V.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""},{prop:"dir",name:"dir",embedded:false,exported:false,typ:$Uintptr,tag:""}]);W.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:AG,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:AH,tag:""}]);X.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:BO,tag:""},{prop:"methods",name:"methods",embedded:false,exported:false,typ:EK,tag:""}]);Y.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"key",name:"key",embedded:false,exported:false,typ:DU,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""},{prop:"bucket",name:"bucket",embedded:false,exported:false,typ:DU,tag:""},{prop:"hasher",name:"hasher",embedded:false,exported:false,typ:EX,tag:""},{prop:"keysize",name:"keysize",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"flags",name:"flags",embedded:false,exported:false,typ:$Uint32,tag:""}]);Z.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""}]);AA.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:DU,tag:""}]);AB.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:BO,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:DU,tag:""},{prop:"offsetEmbed",name:"offsetEmbed",embedded:false,exported:false,typ:$Uintptr,tag:""}]);AC.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:BO,tag:""},{prop:"fields",name:"fields",embedded:false,exported:false,typ:EL,tag:""}]);AT.init("internal/reflectlite",[{prop:"s",name:"s",embedded:false,exported:false,typ:$String,tag:""}]);AV.init("",[{prop:"Name",name:"Name",embedded:false,exported:true,typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",embedded:false,exported:true,typ:$String,tag:""},{prop:"Type",name:"Type",embedded:false,exported:true,typ:O,tag:""},{prop:"Func",name:"Func",embedded:false,exported:true,typ:E,tag:""},{prop:"Index",name:"Index",embedded:false,exported:true,typ:$Int,tag:""}]);BL.init("internal/reflectlite",[{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:AG,tag:""},{prop:"mcount",name:"mcount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"xcount",name:"xcount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"moff",name:"moff",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"_methods",name:"_methods",embedded:false,exported:false,typ:ED,tag:""}]);BN.init("internal/reflectlite",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:R,tag:"reflect:\"func\""},{prop:"inCount",name:"inCount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"outCount",name:"outCount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"_in",name:"_in",embedded:false,exported:false,typ:DW,tag:""},{prop:"_out",name:"_out",embedded:false,exported:false,typ:DW,tag:""}]);BO.init("internal/reflectlite",[{prop:"bytes",name:"bytes",embedded:false,exported:false,typ:EG,tag:""}]);BP.init("internal/reflectlite",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"tag",name:"tag",embedded:false,exported:false,typ:$String,tag:""},{prop:"exported",name:"exported",embedded:false,exported:false,typ:$Bool,tag:""}]);CU.init("internal/reflectlite",[{prop:"t",name:"t",embedded:false,exported:false,typ:O,tag:""},{prop:"m",name:"m",embedded:false,exported:false,typ:DZ,tag:""},{prop:"keys",name:"keys",embedded:false,exported:false,typ:DZ,tag:""},{prop:"i",name:"i",embedded:false,exported:false,typ:$Int,tag:""},{prop:"last",name:"last",embedded:false,exported:false,typ:DZ,tag:""}]);CW.init([{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[O],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([O],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[O],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[P],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"internal/reflectlite",typ:$funcType([],[DU],false)},{prop:"uncommon",name:"uncommon",pkg:"internal/reflectlite",typ:$funcType([],[EC],false)}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}BD=DU.nil;BS=DV.nil;BU=DW.nil;AD=new DX(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);AR=$assertType($internalize($call,$emptyInterface),EA);$pkg.ErrSyntax=new AT.ptr("invalid syntax");BB=false;BE="_jsType";BF="_reflectType";BG="kindType";BH="_rtype";BM={};BQ={};DH=BJ($jsObjectPtr);DN=$assertType($internalize($select,$emptyInterface),EA);$r=BC();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["errors"]=(function(){var $pkg={},$init,A,G,H,L,E,a,F;A=$packages["internal/reflectlite"];G=$pkg.errorString=$newType(0,$kindStruct,"errors.errorString",true,"errors",false,function(s_){this.$val=this;if(arguments.length===0){this.s="";return;}this.s=s_;});H=$ptrType($error);L=$ptrType(G);F=function(b){var b;return new G.ptr(b);};$pkg.New=F;G.ptr.prototype.Error=function(){var b;b=this;return b.s;};G.prototype.Error=function(){return this.$val.Error();};L.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];G.init("errors",[{prop:"s",name:"s",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a=A.TypeOf((H.nil)).Elem();$s=2;case 2:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}E=a;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/abi"]=(function(){var $pkg={},$init,A,D;A=$packages["internal/goarch"];D=function(){$throwRuntimeError("native function not implemented: internal/abi.FuncPCABI0");};$pkg.FuncPCABI0=D;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/cpu"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/bytealg"]=(function(){var $pkg={},$init,A,S;A=$packages["internal/cpu"];S=function(d,e){var d,e,f;f=0;while(true){if(!(f>0;}return-1;};$pkg.IndexByteString=S;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/goexperiment"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/itoa"]=(function(){var $pkg={},$init,C,D,A,B;C=$arrayType($Uint8,20);D=$sliceType($Uint8);A=function(a){var a;if(a<0){return"-"+B(((-a>>>0)));}return B(((a>>>0)));};$pkg.Itoa=A;B=function(a){var a,b,c,d,e;if(a===0){return"0";}b=C.zero();c=19;while(true){if(!(a>=10)){break;}e=(d=a/10,(d===d&&d!==1/0&&d!==-1/0)?d>>>0:$throwRuntimeError("integer divide by zero"));((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=((((48+a>>>0)-(e*10>>>0)>>>0)<<24>>>24)));c=c-(1)>>0;a=e;}((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=(((48+a>>>0)<<24>>>24)));return($bytesToString($subslice(new D(b),c)));};$pkg.Uitoa=B;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["math/bits"]=(function(){var $pkg={},$init,F,G,H,K,L,AI,AJ,AL,AQ;H=function(e){var e;if(true){return K(((e>>>0)));}return L((new $Uint64(0,e)));};$pkg.TrailingZeros=H;K=function(e){var e,f;if(e===0){return 32;}return(((f=($imul((((e&(-e>>>0))>>>0)),125613361)>>>0)>>>27>>>0,((f<0||f>=F.length)?($throwRuntimeError("index out of range"),undefined):F[f]))>>0));};$pkg.TrailingZeros32=K;L=function(e){var e,f,g;if((e.$high===0&&e.$low===0)){return 64;}return(((f=$shiftRightUint64($mul64(((g=new $Uint64(-e.$high,-e.$low),new $Uint64(e.$high&g.$high,(e.$low&g.$low)>>>0))),new $Uint64(66559345,3033172745)),58),(($flatten64(f)<0||$flatten64(f)>=G.length)?($throwRuntimeError("index out of range"),undefined):G[$flatten64(f)]))>>0));};$pkg.TrailingZeros64=L;AI=function(e){var e,f,g,h;f=0;if(e>=65536){e=(g=(16),g<32?(e>>>g):0)>>>0;f=16;}if(e>=256){e=(h=(8),h<32?(e>>>h):0)>>>0;f=f+(8)>>0;}f=f+(("\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b".charCodeAt(e)>>0))>>0;return f;};$pkg.Len32=AI;AJ=function(e){var e,f;f=0;if((e.$high>1||(e.$high===1&&e.$low>=0))){e=$shiftRightUint64(e,(32));f=32;}if((e.$high>0||(e.$high===0&&e.$low>=65536))){e=$shiftRightUint64(e,(16));f=f+(16)>>0;}if((e.$high>0||(e.$high===0&&e.$low>=256))){e=$shiftRightUint64(e,(8));f=f+(8)>>0;}f=f+(("\x00\x01\x02\x02\x03\x03\x03\x03\x04\x04\x04\x04\x04\x04\x04\x04\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x06\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b".charCodeAt($flatten64(e))>>0))>>0;return f;};$pkg.Len64=AJ;AL=function(e,f,g){var e,f,g,h,i,j,k,l,m;h=new $Uint64(0,0);i=new $Uint64(0,0);h=(j=new $Uint64(e.$high+f.$high,e.$low+f.$low),new $Uint64(j.$high+g.$high,j.$low+g.$low));i=$shiftRightUint64(((k=new $Uint64(e.$high&f.$high,(e.$low&f.$low)>>>0),l=(m=new $Uint64(e.$high|f.$high,(e.$low|f.$low)>>>0),new $Uint64(m.$high&~h.$high,(m.$low&~h.$low)>>>0)),new $Uint64(k.$high|l.$high,(k.$low|l.$low)>>>0))),63);return[h,i];};$pkg.Add64=AL;AQ=function(e,f){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;g=new $Uint64(0,0);h=new $Uint64(0,0);i=new $Uint64(e.$high&0,(e.$low&4294967295)>>>0);j=$shiftRightUint64(e,32);k=new $Uint64(f.$high&0,(f.$low&4294967295)>>>0);l=$shiftRightUint64(f,32);m=$mul64(i,k);p=(n=$mul64(j,k),o=$shiftRightUint64(m,32),new $Uint64(n.$high+o.$high,n.$low+o.$low));q=new $Uint64(p.$high&0,(p.$low&4294967295)>>>0);r=$shiftRightUint64(p,32);q=(s=$mul64(i,l),new $Uint64(q.$high+s.$high,q.$low+s.$low));g=(t=(u=$mul64(j,l),new $Uint64(u.$high+r.$high,u.$low+r.$low)),v=$shiftRightUint64(q,32),new $Uint64(t.$high+v.$high,t.$low+v.$low));h=$mul64(e,f);return[g,h];};$pkg.Mul64=AQ;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:F=$toNativeArray($kindUint8,[0,1,28,2,29,14,24,3,30,22,20,15,25,17,4,8,31,27,13,23,21,19,16,7,26,12,18,6,11,5,10,9]);G=$toNativeArray($kindUint8,[0,1,56,2,57,49,28,3,61,58,42,50,38,29,17,4,62,47,59,36,45,43,51,22,53,39,33,30,24,18,12,5,63,55,48,27,60,41,37,16,46,35,44,21,52,32,23,11,54,26,40,15,34,20,31,10,25,14,19,9,13,8,7,6]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["math"]=(function(){var $pkg={},$init,B,A,IT,IU,IV,IW,FL,FM,FN,FO,FP,HH,EI,EX,EY,FK,GA,GH,GK,GL,GM,GS,GT,GW,GX,GZ,HA,HD,HI,HJ,HL,HM;B=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["math/bits"];IT=$arrayType($Uint32,2);IU=$arrayType($Float32,2);IV=$arrayType($Float64,1);IW=$structType("math",[{prop:"uint32array",name:"uint32array",embedded:false,exported:false,typ:IT,tag:""},{prop:"float32array",name:"float32array",embedded:false,exported:false,typ:IU,tag:""},{prop:"float64array",name:"float64array",embedded:false,exported:false,typ:IV,tag:""}]);EI=function(av){var av,aw,ax,ay,az,ba,bb;aw=HL(av);ax=((($shiftRightUint64(aw,52).$low>>>0))&2047)>>>0;if(ax<1023){aw=(ay=new $Uint64(2147483648,0),new $Uint64(aw.$high&ay.$high,(aw.$low&ay.$low)>>>0));if(ax===1022){aw=(az=new $Uint64(1072693248,0),new $Uint64(aw.$high|az.$high,(aw.$low|az.$low)>>>0));}}else if(ax<1075){ax=ax-(1023)>>>0;aw=(ba=$shiftRightUint64(new $Uint64(524288,0),ax),new $Uint64(aw.$high+ba.$high,aw.$low+ba.$low));aw=(bb=$shiftRightUint64(new $Uint64(1048575,4294967295),ax),new $Uint64(aw.$high&~bb.$high,(aw.$low&~bb.$low)>>>0));}return HM(aw);};$pkg.Round=EI;EX=function(av,aw){var av,aw;if(GL(av,1)||GL(aw,1)){return GK(1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return aw;}return av;}if(av>aw){return av;}return aw;};EY=function(av,aw){var av,aw;if(GL(av,-1)||GL(aw,-1)){return GK(-1);}else if(GM(av)||GM(aw)){return GW();}else if((av===0)&&(av===aw)){if(GZ(av)){return av;}return aw;}if(av>>0)));};$pkg.Abs=FK;GA=function(av){var av;return $parseFloat(FL.cos(av));};$pkg.Cos=GA;GH=function(av){var av;return $parseFloat(FL.floor(av));};$pkg.Floor=GH;GK=function(av){var av;if(av>=0){return FN;}else{return FO;}};$pkg.Inf=GK;GL=function(av,aw){var av,aw;if(av===FN){return aw>=0;}if(av===FO){return aw<=0;}return false;};$pkg.IsInf=GL;GM=function(av){var av,aw;aw=false;aw=!((av===av));return aw;};$pkg.IsNaN=GM;GS=function(av,aw){var av,aw;return EX(av,aw);};$pkg.Max=GS;GT=function(av,aw){var av,aw;return EY(av,aw);};$pkg.Min=GT;GW=function(){return FP;};$pkg.NaN=GW;GX=function(av,aw){var av,aw;if((av===1)||((av===-1)&&((aw===FN)||(aw===FO)))){return 1;}return $parseFloat(FL.pow(av,aw));};$pkg.Pow=GX;GZ=function(av){var av;return av<0||(1/av===FO);};$pkg.Signbit=GZ;HA=function(av){var av;return $parseFloat(FL.sin(av));};$pkg.Sin=HA;HD=function(av){var av;return $parseFloat(FL.sqrt(av));};$pkg.Sqrt=HD;HI=function(){var av;av=new($global.ArrayBuffer)(8);HH.uint32array=new($global.Uint32Array)(av);HH.float32array=new($global.Float32Array)(av);HH.float64array=new($global.Float64Array)(av);};HJ=function(av){var av;HH.float32array[0]=av;return HH.uint32array[0];};$pkg.Float32bits=HJ;HL=function(av){var av,aw,ax;HH.float64array[0]=av;return(aw=$shiftLeft64((new $Uint64(0,HH.uint32array[1])),32),ax=(new $Uint64(0,HH.uint32array[0])),new $Uint64(aw.$high+ax.$high,aw.$low+ax.$low));};$pkg.Float64bits=HL;HM=function(av){var av;HH.uint32array[0]=((av.$low>>>0));HH.uint32array[1]=(($shiftRightUint64(av,32).$low>>>0));return HH.float64array[0];};$pkg.Float64frombits=HM;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}HH=new IW.ptr(IT.zero(),IU.zero(),IV.zero());FL=$global.Math;FM=0;FN=1/FM;FO=-1/FM;FP=$parseFloat($NaN);HI();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["unicode/utf8"]=(function(){var $pkg={},$init,B,A,C,F,G,J,K,N,O,R,S;B=$pkg.acceptRange=$newType(0,$kindStruct,"utf8.acceptRange",true,"unicode/utf8",false,function(lo_,hi_){this.$val=this;if(arguments.length===0){this.lo=0;this.hi=0;return;}this.lo=lo_;this.hi=hi_;});F=function(a){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=0;c=0;d=a.$length;if(d<1){e=65533;f=0;b=e;c=f;return[b,c];}g=(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);h=((g<0||g>=A.length)?($throwRuntimeError("index out of range"),undefined):A[g]);if(h>=240){i=(((h>>0))<<31>>0)>>31>>0;j=(((((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])>>0))&~i)>>0)|(65533&i);k=1;b=j;c=k;return[b,c];}l=((((h&7)>>>0)>>0));n=$clone((m=h>>>4<<24>>>24,((m<0||m>=C.length)?($throwRuntimeError("index out of range"),undefined):C[m])),B);if(d=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);if(q>>0)>>0))<<6>>0)|((((q&63)>>>0)>>0));u=2;b=t;c=u;return[b,c];}v=(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]);if(v<128||191>>0)>>0))<<12>>0)|(((((q&63)>>>0)>>0))<<6>>0))|((((v&63)>>>0)>>0));z=3;b=y;c=z;return[b,c];}aa=(3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]);if(aa<128||191>>0)>>0))<<18>>0)|(((((q&63)>>>0)>>0))<<12>>0))|(((((v&63)>>>0)>>0))<<6>>0))|((((aa&63)>>>0)>>0));ae=4;b=ad;c=ae;return[b,c];};$pkg.DecodeRune=F;G=function(a){var a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=0;c=0;d=a.length;if(d<1){e=65533;f=0;b=e;c=f;return[b,c];}g=a.charCodeAt(0);h=((g<0||g>=A.length)?($throwRuntimeError("index out of range"),undefined):A[g]);if(h>=240){i=(((h>>0))<<31>>0)>>31>>0;j=((((a.charCodeAt(0)>>0))&~i)>>0)|(65533&i);k=1;b=j;c=k;return[b,c];}l=((((h&7)>>>0)>>0));n=$clone((m=h>>>4<<24>>>24,((m<0||m>=C.length)?($throwRuntimeError("index out of range"),undefined):C[m])),B);if(d>>0)>>0))<<6>>0)|((((q&63)>>>0)>>0));u=2;b=t;c=u;return[b,c];}v=a.charCodeAt(2);if(v<128||191>>0)>>0))<<12>>0)|(((((q&63)>>>0)>>0))<<6>>0))|((((v&63)>>>0)>>0));z=3;b=y;c=z;return[b,c];}aa=a.charCodeAt(3);if(aa<128||191>>0)>>0))<<18>>0)|(((((q&63)>>>0)>>0))<<12>>0))|(((((v&63)>>>0)>>0))<<6>>0))|((((aa&63)>>>0)>>0));ae=4;b=ad;c=ae;return[b,c];};$pkg.DecodeRuneInString=G;J=function(a){var a;if(a<0){return-1;}else if(a<=127){return 1;}else if(a<=2047){return 2;}else if(55296<=a&&a<=57343){return-1;}else if(a<=65535){return 3;}else if(a<=1114111){return 4;}return-1;};$pkg.RuneLen=J;K=function(a,b){var a,b,c;c=((b>>>0));if(c<=127){(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=((b<<24>>>24)));return 1;}else if(c<=2047){$unused((1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=((192|(((b>>6>>0)<<24>>>24)))>>>0));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=((128|((((b<<24>>>24))&63)>>>0))>>>0));return 2;}else if((c>1114111)||(55296<=c&&c<=57343)){b=65533;$unused((2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=((224|(((b>>12>>0)<<24>>>24)))>>>0));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=((128|(((((b>>6>>0)<<24>>>24))&63)>>>0))>>>0));(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]=((128|((((b<<24>>>24))&63)>>>0))>>>0));return 3;}else if(c<=65535){$unused((2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=((224|(((b>>12>>0)<<24>>>24)))>>>0));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=((128|(((((b>>6>>0)<<24>>>24))&63)>>>0))>>>0));(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]=((128|((((b<<24>>>24))&63)>>>0))>>>0));return 3;}else{$unused((3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]));(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]=((240|(((b>>18>>0)<<24>>>24)))>>>0));(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]=((128|(((((b>>12>>0)<<24>>>24))&63)>>>0))>>>0));(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]=((128|(((((b>>6>>0)<<24>>>24))&63)>>>0))>>>0));(3>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+3]=((128|((((b<<24>>>24))&63)>>>0))>>>0));return 4;}};$pkg.EncodeRune=K;N=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;b=a.$length;c=0;d=0;while(true){if(!(d>0;e=((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]);if(e<128){d=d+(1)>>0;continue;}f=((e<0||e>=A.length)?($throwRuntimeError("index out of range"),undefined):A[e]);if(f===241){d=d+(1)>>0;continue;}g=((((f&7)>>>0)>>0));if((d+g>>0)>b){d=d+(1)>>0;continue;}i=$clone((h=f>>>4<<24>>>24,((h<0||h>=C.length)?($throwRuntimeError("index out of range"),undefined):C[h])),B);k=(j=d+1>>0,((j<0||j>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+j]));if(k>0,((l<0||l>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+l]));if(m<128||191>0,((n<0||n>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+n]));if(o<128||191>0;}return c;};$pkg.RuneCount=N;O=function(a){var a,b,c,d,e,f,g,h,i,j,k,l;b=0;c=a.length;d=0;while(true){if(!(d>0;b=b+(1)>>0;continue;}f=((e<0||e>=A.length)?($throwRuntimeError("index out of range"),undefined):A[e]);if(f===241){d=d+(1)>>0;b=b+(1)>>0;continue;}g=((((f&7)>>>0)>>0));if((d+g>>0)>c){d=d+(1)>>0;b=b+(1)>>0;continue;}i=$clone((h=f>>>4<<24>>>24,((h<0||h>=C.length)?($throwRuntimeError("index out of range"),undefined):C[h])),B);j=a.charCodeAt((d+1>>0));if(j>0));if(k<128||191>0));if(l<128||191>0;b=b+(1)>>0;}b=b;return b;};$pkg.RuneCountInString=O;R=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m;while(true){if(!(a.length>=8)){break;}b=(((((((a.charCodeAt(0)>>>0))|(((a.charCodeAt(1)>>>0))<<8>>>0))>>>0)|(((a.charCodeAt(2)>>>0))<<16>>>0))>>>0)|(((a.charCodeAt(3)>>>0))<<24>>>0))>>>0;c=(((((((a.charCodeAt(4)>>>0))|(((a.charCodeAt(5)>>>0))<<8>>>0))>>>0)|(((a.charCodeAt(6)>>>0))<<16>>>0))>>>0)|(((a.charCodeAt(7)>>>0))<<24>>>0))>>>0;if(!(((((((b|c)>>>0))&2155905152)>>>0)===0))){break;}a=$substring(a,8);}d=a.length;e=0;while(true){if(!(e>0;continue;}g=((f<0||f>=A.length)?($throwRuntimeError("index out of range"),undefined):A[f]);if(g===241){return false;}h=((((g&7)>>>0)>>0));if((e+h>>0)>d){return false;}j=$clone((i=g>>>4<<24>>>24,((i<0||i>=C.length)?($throwRuntimeError("index out of range"),undefined):C[i])),B);k=a.charCodeAt((e+1>>0));if(k>0));if(l<128||191>0));if(m<128||191>0;}return true;};$pkg.ValidString=R;S=function(a){var a;if(0<=a&&a<55296){return true;}else if(57343>0)>0)+d.length>>0)+1>>0));$copySlice(h,c);c=h;}c=$append(c,e);i=0;while(true){if(!(d.length>0)){break;}j=((d.charCodeAt(0)>>0));i=1;if(j>=128){k=A.DecodeRuneInString(d);j=k[0];i=k[1];}if((i===1)&&(j===65533)){c=$appendSlice(c,"\\x");c=$append(c,"0123456789abcdef".charCodeAt((d.charCodeAt(0)>>>4<<24>>>24)));c=$append(c,"0123456789abcdef".charCodeAt(((d.charCodeAt(0)&15)>>>0)));d=$substring(d,i);continue;}c=L(c,j,e,f,g);d=$substring(d,i);}c=$append(c,e);return c;};K=function(c,d,e,f,g){var c,d,e,f,g;c=$append(c,e);if(!A.ValidRune(d)){d=65533;}c=L(c,d,e,f,g);c=$append(c,e);return c;};L=function(c,d,e,f,g){var c,d,e,f,g,h,i,j,k,l;h=EB.zero();if((d===((e>>0)))||(d===92)){c=$append(c,92);c=$append(c,((d<<24>>>24)));return c;}if(f){if(d<128&&AG(d)){c=$append(c,((d<<24>>>24)));return c;}}else if(AG(d)||g&&AI(d)){i=A.EncodeRune(new EA(h),d);c=$appendSlice(c,$subslice(new EA(h),0,i));return c;}j=d;if(j===(7)){c=$appendSlice(c,"\\a");}else if(j===(8)){c=$appendSlice(c,"\\b");}else if(j===(12)){c=$appendSlice(c,"\\f");}else if(j===(10)){c=$appendSlice(c,"\\n");}else if(j===(13)){c=$appendSlice(c,"\\r");}else if(j===(9)){c=$appendSlice(c,"\\t");}else if(j===(11)){c=$appendSlice(c,"\\v");}else{if(d<32){c=$appendSlice(c,"\\x");c=$append(c,"0123456789abcdef".charCodeAt((((d<<24>>>24))>>>4<<24>>>24)));c=$append(c,"0123456789abcdef".charCodeAt(((((d<<24>>>24))&15)>>>0)));}else if(!A.ValidRune(d)){d=65533;c=$appendSlice(c,"\\u");k=12;while(true){if(!(k>=0)){break;}c=$append(c,"0123456789abcdef".charCodeAt((((d>>$min(((k>>>0)),31))>>0)&15)));k=k-(4)>>0;}}else if(d<65536){c=$appendSlice(c,"\\u");k=12;while(true){if(!(k>=0)){break;}c=$append(c,"0123456789abcdef".charCodeAt((((d>>$min(((k>>>0)),31))>>0)&15)));k=k-(4)>>0;}}else{c=$appendSlice(c,"\\U");l=28;while(true){if(!(l>=0)){break;}c=$append(c,"0123456789abcdef".charCodeAt((((d>>$min(((l>>>0)),31))>>0)&15)));l=l-(4)>>0;}}}return c;};N=function(c,d){var c,d;return J(c,d,34,false,false);};$pkg.AppendQuote=N;P=function(c,d){var c,d;return J(c,d,34,true,false);};$pkg.AppendQuoteToASCII=P;T=function(c,d){var c,d;return K(c,d,39,false,false);};$pkg.AppendQuoteRune=T;V=function(c,d){var c,d;return K(c,d,39,true,false);};$pkg.AppendQuoteRuneToASCII=V;Y=function(c){var c,d,e,f;while(true){if(!(c.length>0)){break;}d=A.DecodeRuneInString(c);e=d[0];f=d[1];c=$substring(c,f);if(f>1){if(e===65279){return false;}continue;}if(e===65533){return false;}if((e<32&&!((e===9)))||(e===96)||(e===127)){return false;}}return true;};$pkg.CanBackquote=Y;Z=function(c){var c,d,e,f,g,h,i,j,k,l;d=0;e=false;f=((c>>0));if(48<=f&&f<=57){g=f-48>>0;h=true;d=g;e=h;return[d,e];}else if(97<=f&&f<=102){i=(f-97>>0)+10>>0;j=true;d=i;e=j;return[d,e];}else if(65<=f&&f<=70){k=(f-65>>0)+10>>0;l=true;d=k;e=l;return[d,e];}return[d,e];};AA=function(c,d){var aa,ab,ac,ad,ae,af,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=0;f=false;g="";h=$ifaceNil;if(c.length===0){h=$pkg.ErrSyntax;return[e,f,g,h];}i=c.charCodeAt(0);if((i===d)&&((d===39)||(d===34))){h=$pkg.ErrSyntax;return[e,f,g,h];}else if(i>=128){j=A.DecodeRuneInString(c);k=j[0];l=j[1];m=k;n=true;o=$substring(c,l);p=$ifaceNil;e=m;f=n;g=o;h=p;return[e,f,g,h];}else if(!((i===92))){q=((c.charCodeAt(0)>>0));r=false;s=$substring(c,1);t=$ifaceNil;e=q;f=r;g=s;h=t;return[e,f,g,h];}if(c.length<=1){h=$pkg.ErrSyntax;return[e,f,g,h];}u=c.charCodeAt(1);c=$substring(c,2);switch(0){default:v=u;if(v===(97)){e=7;}else if(v===(98)){e=8;}else if(v===(102)){e=12;}else if(v===(110)){e=10;}else if(v===(114)){e=13;}else if(v===(116)){e=9;}else if(v===(118)){e=11;}else if((v===(120))||(v===(117))||(v===(85))){w=0;x=u;if(x===(120)){w=2;}else if(x===(117)){w=4;}else if(x===(85)){w=8;}y=0;if(c.length>0)|ab;z=z+(1)>>0;}c=$substring(c,w);if(u===120){e=y;break;}if(!A.ValidRune(y)){h=$pkg.ErrSyntax;return[e,f,g,h];}e=y;f=true;}else if((v===(48))||(v===(49))||(v===(50))||(v===(51))||(v===(52))||(v===(53))||(v===(54))||(v===(55))){ad=((u>>0))-48>>0;if(c.length<2){h=$pkg.ErrSyntax;return[e,f,g,h];}ae=0;while(true){if(!(ae<2)){break;}af=((c.charCodeAt(ae)>>0))-48>>0;if(af<0||af>7){h=$pkg.ErrSyntax;return[e,f,g,h];}ad=((ad<<3>>0))|af;ae=ae+(1)>>0;}c=$substring(c,2);if(ad>255){h=$pkg.ErrSyntax;return[e,f,g,h];}e=ad;}else if(v===(92)){e=92;}else if((v===(39))||(v===(34))){if(!((u===d))){h=$pkg.ErrSyntax;return[e,f,g,h];}e=((u>>0));}else{h=$pkg.ErrSyntax;return[e,f,g,h];}}g=c;return[e,f,g,h];};$pkg.UnquoteChar=AA;AC=function(c){var c,d,e,f,g;d=AD(c,true);e=d[0];f=d[1];g=d[2];if(f.length>0){return["",$pkg.ErrSyntax];}return[e,g];};$pkg.Unquote=AC;AD=function(c,d){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e="";f="";g=$ifaceNil;if(c.length<2){h="";i=c;j=$pkg.ErrSyntax;e=h;f=i;g=j;return[e,f,g];}k=c.charCodeAt(0);l=CM($substring(c,1),k);if(l<0){m="";n=c;o=$pkg.ErrSyntax;e=m;f=n;g=o;return[e,f,g];}l=l+(2)>>0;p=k;if(p===(96)){if(!d){e=$substring(c,0,l);}else if(!G($substring(c,0,l),13)){e=$substring(c,1,(l-1>>0));}else{q=$makeSlice(EA,0,(((l-1>>0)-1>>0)-1>>0));r=1;while(true){if(!(r<(l-1>>0))){break;}if(!((c.charCodeAt(r)===13))){q=$append(q,c.charCodeAt(r));}r=r+(1)>>0;}e=($bytesToString(q));}s=e;t=$substring(c,l);u=$ifaceNil;e=s;f=t;g=u;return[e,f,g];}else if((p===(34))||(p===(39))){if(!G($substring(c,0,l),92)&&!G($substring(c,0,l),10)){v=false;w=k;if(w===(34)){v=A.ValidString($substring(c,1,(l-1>>0)));}else if(w===(39)){x=A.DecodeRuneInString($substring(c,1,(l-1>>0)));y=x[0];z=x[1];v=(((1+z>>0)+1>>0)===l)&&(!((y===65533))||!((z===1)));}if(v){e=$substring(c,0,l);if(d){e=$substring(e,1,(l-1>>0));}aa=e;ab=$substring(c,l);ac=$ifaceNil;e=aa;f=ab;g=ac;return[e,f,g];}}ad=EA.nil;ae=c;c=$substring(c,1);if(d){ad=$makeSlice(EA,0,(af=($imul(3,l))/2,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero")));}while(true){if(!(c.length>0&&!((c.charCodeAt(0)===k)))){break;}ag=AA(c,k);ah=ag[0];ai=ag[1];aj=ag[2];ak=ag[3];if((c.charCodeAt(0)===10)||!($interfaceIsEqual(ak,$ifaceNil))){al="";am=ae;an=$pkg.ErrSyntax;e=al;f=am;g=an;return[e,f,g];}c=aj;if(d){if(ah<128||!ai){ad=$append(ad,((ah<<24>>>24)));}else{ao=EB.zero();ap=A.EncodeRune(new EA(ao),ah);ad=$appendSlice(ad,$subslice(new EA(ao),0,ap));}}if(k===39){break;}}if(!(c.length>0&&(c.charCodeAt(0)===k))){aq="";ar=ae;as=$pkg.ErrSyntax;e=aq;f=ar;g=as;return[e,f,g];}c=$substring(c,1);if(d){at=($bytesToString(ad));au=c;av=$ifaceNil;e=at;f=au;g=av;return[e,f,g];}aw=$substring(ae,0,(ae.length-c.length>>0));ax=c;ay=$ifaceNil;e=aw;f=ax;g=ay;return[e,f,g];}else{az="";ba=c;bb=$pkg.ErrSyntax;e=az;f=ba;g=bb;return[e,f,g];}};AE=function(c,d){var c,d,e,f,g,h,i;e=0;f=c.$length;g=e;h=f;while(true){if(!(g>0))>>1>>0)>>0;if(((i<0||i>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+i])>0;}else{h=i;}}return g;};AF=function(c,d){var c,d,e,f,g,h,i;e=0;f=c.$length;g=e;h=f;while(true){if(!(g>0))>>1>>0)>>0;if(((i<0||i>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+i])>0;}else{h=i;}}return g;};AG=function(c){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(c<=255){if(32<=c&&c<=126){return true;}if(161<=c&&c<=255){return!((c===173));}return false;}if(0<=c&&c<65536){d=((c<<16>>>16));e=AQ;f=AR;g=d;h=e;i=f;j=AE(h,g);if(j>=h.$length||g<(k=(j&~1)>>0,((k<0||k>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+k]))||(l=j|1,((l<0||l>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+l]))=i.$length||!((((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m])===g));}n=((c>>>0));o=AS;p=AT;q=n;r=o;s=p;t=AF(r,q);if(t>=r.$length||q<(u=(t&~1)>>0,((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]))||(v=t|1,((v<0||v>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+v]))=131072){return true;}c=c-(65536)>>0;w=AE(s,((c<<16>>>16)));return w>=s.$length||!((((w<0||w>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+w])===((c<<16>>>16))));};$pkg.IsPrint=AG;AI=function(c){var c,d,e;if(c>65535){return false;}d=((c<<16>>>16));e=AE(AU,d);return e=AU.$length)?($throwRuntimeError("index out of range"),undefined):AU.$array[AU.$offset+e]));};AO=function(c,d,e,f,g){var aa,ab,ac,ad,ae,af,ag,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;h=EA.nil;i="";if(e<2||e>36){$panic(new $String("strconv: illegal AppendInt/FormatInt base"));}j=EC.zero();k=65;if(f){d=new $Uint64(-d.$high,-d.$low);}if(e===10){if(true){while(true){if(!((d.$high>0||(d.$high===0&&d.$low>=1000000000)))){break;}l=$div64(d,new $Uint64(0,1000000000),false);n=(((m=$mul64(l,new $Uint64(0,1000000000)),new $Uint64(d.$high-m.$high,d.$low-m.$low)).$low>>>0));o=4;while(true){if(!(o>0)){break;}q=(p=n%100,p===p?p:$throwRuntimeError("integer divide by zero"))*2>>>0;n=(r=n/(100),(r===r&&r!==1/0&&r!==-1/0)?r>>>0:$throwRuntimeError("integer divide by zero"));k=k-(2)>>0;(s=k+1>>0,((s<0||s>=j.length)?($throwRuntimeError("index out of range"),undefined):j[s]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((q+1>>>0))));(t=k+0>>0,((t<0||t>=j.length)?($throwRuntimeError("index out of range"),undefined):j[t]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((q+0>>>0))));o=o-(1)>>0;}k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt(((n*2>>>0)+1>>>0)));d=l;}}u=((d.$low>>>0));while(true){if(!(u>=100)){break;}w=(v=u%100,v===v?v:$throwRuntimeError("integer divide by zero"))*2>>>0;u=(x=u/(100),(x===x&&x!==1/0&&x!==-1/0)?x>>>0:$throwRuntimeError("integer divide by zero"));k=k-(2)>>0;(y=k+1>>0,((y<0||y>=j.length)?($throwRuntimeError("index out of range"),undefined):j[y]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((w+1>>>0))));(z=k+0>>0,((z<0||z>=j.length)?($throwRuntimeError("index out of range"),undefined):j[z]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((w+0>>>0))));}aa=u*2>>>0;k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((aa+1>>>0)));if(u>=10){k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt(aa));}}else if(AP(e)){ab=(((B.TrailingZeros(((e>>>0)))>>>0))&7)>>>0;ac=(new $Uint64(0,e));ad=((e>>>0))-1>>>0;while(true){if(!((d.$high>ac.$high||(d.$high===ac.$high&&d.$low>=ac.$low)))){break;}k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((((d.$low>>>0))&ad)>>>0)));d=$shiftRightUint64(d,(ab));}k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((d.$low>>>0))));}else{ae=(new $Uint64(0,e));while(true){if(!((d.$high>ae.$high||(d.$high===ae.$high&&d.$low>=ae.$low)))){break;}k=k-(1)>>0;af=$div64(d,ae,false);((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((ag=$mul64(af,ae),new $Uint64(d.$high-ag.$high,d.$low-ag.$low)).$low>>>0))));d=af;}k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((d.$low>>>0))));}if(f){k=k-(1)>>0;((k<0||k>=j.length)?($throwRuntimeError("index out of range"),undefined):j[k]=45);}if(g){h=$appendSlice(c,$subslice(new EA(j),k));return[h,i];}i=($bytesToString($subslice(new EA(j),k)));return[h,i];};AP=function(c){var c;return(c&((c-1>>0)))===0;};AV=function(c,d,e,f){var aa,ab,ac,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(f<0){$panic(new $String("ryuFtoaFixed32 called with negative prec"));}if(f>9){$panic(new $String("ryuFtoaFixed32 called with prec > 9"));}if(d===0){g=0;h=0;c.nd=g;c.dp=h;return;}i=e;j=B.Len32(d);if(j<25){d=(k=((((25-j>>0)>>>0))),k<32?(d<>>0;i=i+(((j)-25>>0))>>0;}l=(-BA(i+24>>0)+f>>0)-1>>0;m=l<=27&&l>=0;n=BF(d,i,l);o=n[0];p=n[1];q=n[2];if(p>=0){$panic(new $String("not enough significant bits after mult64bitPow10"));}if(l<0&&l>=-10&&BH((new $Uint64(0,d)),-l)){m=true;q=true;}r=((-p>>>0));t=((((s=r,s<32?(1<>>0)-1>>>0));u=(v=r,v<32?(o>>>v):0)>>>0;w=(o&t)>>>0;o=u;x=w;y=false;if(m){y=x>((z=((r-1>>>0)),z<32?(1<>>0)||((x===((aa=((r-1>>>0)),aa<32?(1<>>0))&&!q)||((x===((ab=((r-1>>>0)),ab<32?(1<>>0))&&q&&(((o&1)>>>0)===1));}else{y=((ac=((r-1>>>0)),ac<32?(x>>>ac):0)>>>0)===1;}if(!((x===0))){q=false;}AY(c,(new $Uint64(0,o)),!q,y,f);c.dp=c.dp-(l)>>0;};AW=function(c,d,e,f){var aa,ab,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(f>18){$panic(new $String("ryuFtoaFixed64 called with prec > 18"));}if((d.$high===0&&d.$low===0)){g=0;h=0;c.nd=g;c.dp=h;return;}i=e;j=B.Len64(d);if(j<55){d=$shiftLeft64(d,(((55-j>>0)>>>0)));i=i+(((j)-55>>0))>>0;}k=(-BA(i+54>>0)+f>>0)-1>>0;l=k<=55&&k>=0;m=BG(d,i,k);n=m[0];o=m[1];p=m[2];if(o>=0){$panic(new $String("not enough significant bits after mult128bitPow10"));}if(k<0&&k>=-22&&BH(d,-k)){l=true;p=true;}q=((-o>>>0));s=((r=$shiftLeft64(new $Uint64(0,1),q),new $Uint64(r.$high-0,r.$low-1)));t=$shiftRightUint64(n,q);u=new $Uint64(n.$high&s.$high,(n.$low&s.$low)>>>0);n=t;v=u;w=false;if(l){w=(x=$shiftLeft64(new $Uint64(0,1),((q-1>>>0))),(v.$high>x.$high||(v.$high===x.$high&&v.$low>x.$low)))||((y=$shiftLeft64(new $Uint64(0,1),((q-1>>>0))),(v.$high===y.$high&&v.$low===y.$low))&&!p)||((z=$shiftLeft64(new $Uint64(0,1),((q-1>>>0))),(v.$high===z.$high&&v.$low===z.$low))&&p&&(aa=new $Uint64(n.$high&0,(n.$low&1)>>>0),(aa.$high===0&&aa.$low===1)));}else{w=(ab=$shiftRightUint64(v,((q-1>>>0))),(ab.$high===0&&ab.$low===1));}if(!((v.$high===0&&v.$low===0))){p=false;}AY(c,n,!p,w,f);c.dp=c.dp-(k)>>0;};AY=function(c,d,e,f,g){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;h=((g<0||g>=AX.length)?($throwRuntimeError("index out of range"),undefined):AX[g]);i=0;while(true){if(!((d.$high>h.$high||(d.$high===h.$high&&d.$low>=h.$low)))){break;}j=$div64(d,new $Uint64(0,10),false);k=$div64(d,new $Uint64(0,10),true);l=j;m=k;d=l;i=i+(1)>>0;if((m.$high>0||(m.$high===0&&m.$low>5))){f=true;}else if((m.$high<0||(m.$high===0&&m.$low<5))){f=false;}else{f=e||(n=new $Uint64(d.$high&0,(d.$low&1)>>>0),(n.$high===0&&n.$low===1));}if(!((m.$high===0&&m.$low===0))){e=true;}}if(f){d=(o=new $Uint64(0,1),new $Uint64(d.$high+o.$high,d.$low+o.$low));}if((d.$high>h.$high||(d.$high===h.$high&&d.$low>=h.$low))){d=$div64(d,(new $Uint64(0,10)),false);i=i+(1)>>0;}p=((g>>>0));c.nd=(g);q=d;while(true){if(!((q.$high>0||(q.$high===0&&q.$low>=100)))){break;}r=new $Uint64(0,0);s=new $Uint64(0,0);t=r;u=s;if((v=$shiftRightUint64(q,32),(v.$high===0&&v.$low===0))){w=(new $Uint64(0,(x=((q.$low>>>0))/100,(x===x&&x!==1/0&&x!==-1/0)?x>>>0:$throwRuntimeError("integer divide by zero"))));y=(new $Uint64(0,(z=((q.$low>>>0))%100,z===z?z:$throwRuntimeError("integer divide by zero"))));t=w;u=y;}else{aa=$div64(q,new $Uint64(0,100),false);ab=$div64(q,new $Uint64(0,100),true);t=aa;u=ab;}p=p-(2)>>>0;(ad=c.d,ae=p+1>>>0,((ae<0||ae>=ad.$length)?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+ae]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((ac=$mul64(new $Uint64(0,2),u),new $Uint64(ac.$high+0,ac.$low+1))))));(ag=c.d,ah=p+0>>>0,((ah<0||ah>=ag.$length)?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+ah]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((af=$mul64(new $Uint64(0,2),u),new $Uint64(af.$high+0,af.$low+0))))));q=t;}if((q.$high>0||(q.$high===0&&q.$low>0))){p=p-(1)>>>0;(aj=c.d,((p<0||p>=aj.$length)?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+p]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64((ai=$mul64(new $Uint64(0,2),q),new $Uint64(ai.$high+0,ai.$low+1))))));}if((q.$high>0||(q.$high===0&&q.$low>=10))){p=p-(1)>>>0;(ak=c.d,((p<0||p>=ak.$length)?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+p]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt($flatten64($mul64(new $Uint64(0,2),q)))));}while(true){if(!((al=c.d,am=c.nd-1>>0,((am<0||am>=al.$length)?($throwRuntimeError("index out of range"),undefined):al.$array[al.$offset+am]))===48)){break;}c.nd=c.nd-(1)>>0;i=i+(1)>>0;}c.dp=c.nd+i>>0;};AZ=function(c,d,e,f){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((d.$high===0&&d.$low===0)){g=0;h=0;c.nd=g;c.dp=h;return;}if(e<=0&&B.TrailingZeros64(d)>=-e){d=$shiftRightUint64(d,(((-e>>>0))));BD(c,d,d,d,true,false);return;}i=BC(d,e,f);j=i[0];k=i[1];l=i[2];m=i[3];if(m===0){BD(c,j,k,l,true,false);return;}n=BA(-m)+1>>0;o=new $Uint64(0,0);p=new $Uint64(0,0);q=new $Uint64(0,0);r=o;s=p;t=q;u=false;v=false;w=false;x=u;y=v;z=w;if(f===BK){aa=0;ab=0;ac=0;ad=aa;ae=ab;af=ac;ag=BF(((j.$low>>>0)),m,n);ad=ag[0];x=ag[2];ah=BF(((k.$low>>>0)),m,n);ae=ah[0];y=ah[2];ai=BF(((l.$low>>>0)),m,n);af=ai[0];m=ai[1];z=ai[2];aj=(new $Uint64(0,ad));ak=(new $Uint64(0,ae));al=(new $Uint64(0,af));r=aj;s=ak;t=al;}else{am=BG(j,m,n);r=am[0];x=am[2];an=BG(k,m,n);s=an[0];y=an[2];ao=BG(l,m,n);t=ao[0];m=ao[1];z=ao[2];}if(m>=0){$panic(new $String("not enough significant bits after mult128bitPow10"));}if(n>55){ap=false;aq=false;ar=false;x=ap;y=aq;z=ar;}if(n<0&&n>=-24){if(BH(j,-n)){x=true;}if(BH(k,-n)){y=true;}if(BH(l,-n)){z=true;}}as=((-m>>>0));au=((at=$shiftLeft64(new $Uint64(0,1),as),new $Uint64(at.$high-0,at.$low-1)));av=$shiftRightUint64(r,as);aw=new $Uint64(r.$high&au.$high,(r.$low&au.$low)>>>0);r=av;ax=aw;ay=$shiftRightUint64(s,as);az=new $Uint64(s.$high&au.$high,(s.$low&au.$low)>>>0);s=ay;ba=az;bb=$shiftRightUint64(t,as);bc=new $Uint64(t.$high&au.$high,(t.$low&au.$low)>>>0);t=bb;bd=bc;be=!z||(bd.$high>0||(bd.$high===0&&bd.$low>0));if(z&&(bd.$high===0&&bd.$low===0)){be=(bf=new $Uint64(d.$high&0,(d.$low&1)>>>0),(bf.$high===0&&bf.$low===0));}if(!be){t=(bg=new $Uint64(0,1),new $Uint64(t.$high-bg.$high,t.$low-bg.$low));}bh=false;if(y){bh=(bi=$shiftLeft64(new $Uint64(0,1),((as-1>>>0))),(ba.$high>bi.$high||(ba.$high===bi.$high&&ba.$low>bi.$low)))||((bj=$shiftLeft64(new $Uint64(0,1),((as-1>>>0))),(ba.$high===bj.$high&&ba.$low===bj.$low))&&(bk=new $Uint64(s.$high&0,(s.$low&1)>>>0),(bk.$high===0&&bk.$low===1)));}else{bh=(bl=$shiftRightUint64(ba,((as-1>>>0))),(bl.$high===0&&bl.$low===1));}bn=x&&(ax.$high===0&&ax.$low===0)&&((bm=new $Uint64(d.$high&0,(d.$low&1)>>>0),(bm.$high===0&&bm.$low===0)));if(!bn){r=(bo=new $Uint64(0,1),new $Uint64(r.$high+bo.$high,r.$low+bo.$low));}bp=y&&(ba.$high===0&&ba.$low===0);BD(c,r,s,t,bp,bh);c.dp=c.dp-(n)>>0;};BA=function(c){var c;return(($imul(c,78913)))>>18>>0;};BB=function(c){var c;return(($imul(c,108853)))>>15>>0;};BC=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;f=new $Uint64(0,0);g=new $Uint64(0,0);h=new $Uint64(0,0);i=0;if(!((j=$shiftLeft64(new $Uint64(0,1),e.mantbits),(c.$high===j.$high&&c.$low===j.$low)))||(d===((e.bias+1>>0)-((e.mantbits>>0))>>0))){k=(l=$mul64(new $Uint64(0,2),c),new $Uint64(l.$high-0,l.$low-1));m=$mul64(new $Uint64(0,2),c);n=(o=$mul64(new $Uint64(0,2),c),new $Uint64(o.$high+0,o.$low+1));f=k;g=m;h=n;i=d-1>>0;return[f,g,h,i];}else{p=(q=$mul64(new $Uint64(0,4),c),new $Uint64(q.$high-0,q.$low-1));r=$mul64(new $Uint64(0,4),c);s=(t=$mul64(new $Uint64(0,4),c),new $Uint64(t.$high+0,t.$low+2));f=p;g=r;h=s;i=d-2>>0;return[f,g,h,i];}};BD=function(c,d,e,f,g,h){var aa,ab,ac,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;i=BI(d);j=i[0];k=i[1];l=BI(e);m=l[0];n=l[1];o=BI(f);p=o[0];q=o[1];if(p===0){BE(c,k,n,q,g,h,8);}else if(j>>0;}g=g&&(n===0);h=(n>500000000)||((n===500000000)&&h);BE(c,j,m,p,g,h,8);c.dp=c.dp+(9)>>0;}else{c.nd=0;r=9;s=m;while(true){if(!(s>0)){break;}t=(u=s/10,(u===u&&u!==1/0&&u!==-1/0)?u>>>0:$throwRuntimeError("integer divide by zero"));v=(w=s%10,w===w?w:$throwRuntimeError("integer divide by zero"));x=t;y=v;s=x;r=r-(1)>>>0;(z=c.d,((r<0||r>=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+r]=(((y+48>>>0)<<24>>>24))));}c.d=$subslice(c.d,r);c.nd=(((9-r>>>0)>>0));BE(c,k,n,q,g,h,c.nd+8>>0);}while(true){if(!(c.nd>0&&((aa=c.d,ab=c.nd-1>>0,((ab<0||ab>=aa.$length)?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+ab]))===48))){break;}c.nd=c.nd-(1)>>0;}while(true){if(!(c.nd>0&&((ac=c.d,(0>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+0]))===48))){break;}c.nd=c.nd-(1)>>0;c.dp=c.dp-(1)>>0;c.d=$subslice(c.d,1);}};BE=function(c,d,e,f,g,h,i){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if(f===0){c.dp=i+1>>0;return;}j=0;k=0;while(true){if(!(f>0)){break;}m=(l=((d+9>>>0))/10,(l===l&&l!==1/0&&l!==-1/0)?l>>>0:$throwRuntimeError("integer divide by zero"));n=(o=e/10,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"));p=(q=e%10,q===q?q:$throwRuntimeError("integer divide by zero"));r=n;s=p;u=(t=f/10,(t===t&&t!==1/0&&t!==-1/0)?t>>>0:$throwRuntimeError("integer divide by zero"));if(m>u){break;}if((m===(r+1>>>0))&&r>>0;s=0;h=false;}j=j+(1)>>0;g=g&&(k===0);k=((s>>0));v=m;w=r;x=u;d=v;e=w;f=x;}if(j>0){h=k>5||((k===5)&&!g)||((k===5)&&g&&(((e&1)>>>0)===1));}if(e>>0;}i=i-(j)>>0;y=e;z=i;while(true){if(!(z>c.nd)){break;}aa=(ab=y/100,(ab===ab&&ab!==1/0&&ab!==-1/0)?ab>>>0:$throwRuntimeError("integer divide by zero"));ac=(ad=y%100,ad===ad?ad:$throwRuntimeError("integer divide by zero"));ae=aa;af=ac;(ag=c.d,((z<0||z>=ag.$length)?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+z]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((($imul(2,af)>>>0)+1>>>0))));(ah=c.d,ai=z-1>>0,((ai<0||ai>=ah.$length)?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+ai]="00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899".charCodeAt((($imul(2,af)>>>0)+0>>>0))));z=z-(2)>>0;y=ae;}if(z===c.nd){(aj=c.d,((z<0||z>=aj.$length)?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+z]=(((y+48>>>0)<<24>>>24))));}c.nd=i+1>>0;c.dp=c.nd+j>>0;};BF=function(c,d,e){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;f=0;g=0;h=false;if(e===0){i=c<<6>>>0;j=d-6>>0;k=true;f=i;g=j;h=k;return[f,g,h];}if(e<-348||347>0,((l<0||l>=CB.length)?($throwRuntimeError("index out of range"),undefined):CB[l]))[1];if(e<0){m=(n=new $Uint64(0,1),new $Uint64(m.$high+n.$high,m.$low+n.$low));}o=B.Mul64((new $Uint64(0,c)),m);p=o[0];q=o[1];d=d+(((BB(e)-63>>0)+57>>0))>>0;r=(((s=$shiftLeft64(p,7),t=$shiftRightUint64(q,57),new $Uint64(s.$high|t.$high,(s.$low|t.$low)>>>0)).$low>>>0));u=d;v=(w=$shiftLeft64(q,7),(w.$high===0&&w.$low===0));f=r;g=u;h=v;return[f,g,h];};BG=function(c,d,e){var aa,ab,ac,ad,ae,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=new $Uint64(0,0);g=0;h=false;if(e===0){i=$shiftLeft64(c,8);j=d-8>>0;k=true;f=i;g=j;h=k;return[f,g,h];}if(e<-348||347>0,((l<0||l>=CB.length)?($throwRuntimeError("index out of range"),undefined):CB[l])),DV);if(e<0){m[0]=(n=m[0],o=new $Uint64(0,1),new $Uint64(n.$high+o.$high,n.$low+o.$low));}d=d+(((BB(e)-127>>0)+119>>0))>>0;p=B.Mul64(c,m[0]);q=p[0];r=p[1];s=B.Mul64(c,m[1]);t=s[0];u=s[1];v=B.Add64(q,u,new $Uint64(0,0));w=v[0];x=v[1];t=(y=x,new $Uint64(t.$high+y.$high,t.$low+y.$low));z=(aa=$shiftLeft64(t,9),ab=$shiftRightUint64(w,55),new $Uint64(aa.$high|ab.$high,(aa.$low|ab.$low)>>>0));ac=d;ad=(ae=$shiftLeft64(w,9),(ae.$high===0&&ae.$low===0))&&(r.$high===0&&r.$low===0);f=z;g=ac;h=ad;return[f,g,h];};BH=function(c,d){var c,d,e,f;if((c.$high===0&&c.$low===0)){return true;}e=0;while(true){if(!(e>0;}return true;};BI=function(c){var c,d,e,f,g;if(false){return[(($div64(c,new $Uint64(0,1000000000),false).$low>>>0)),(($div64(c,new $Uint64(0,1000000000),true).$low>>>0))];}d=B.Mul64($shiftRightUint64(c,1),new $Uint64(2305843009,917808536));e=d[0];f=$shiftRightUint64(e,28);return[((f.$low>>>0)),(((g=$mul64(f,new $Uint64(0,1000000000)),new $Uint64(c.$high-g.$high,c.$low-g.$low)).$low>>>0))];};BN=function(c,d,e,f,g){var c,d,e,f,g;return BO(c,d,e,f,g);};$pkg.AppendFloat=BN;BO=function(c,d,e,f,g){var aa,ab,ac,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;h=new $Uint64(0,0);i=ED.nil;j=g;if(j===(32)){h=(new $Uint64(0,C.Float32bits(($fround(d)))));i=BK;}else if(j===(64)){h=C.Float64bits(d);i=BL;}else{$panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize"));}l=!((k=$shiftRightUint64(h,((i.expbits+i.mantbits>>>0))),(k.$high===0&&k.$low===0)));n=(($shiftRightUint64(h,i.mantbits).$low>>0))&((((m=i.expbits,m<32?(1<>0)-1>>0));q=(o=(p=$shiftLeft64(new $Uint64(0,1),i.mantbits),new $Uint64(p.$high-0,p.$low-1)),new $Uint64(h.$high&o.$high,(h.$low&o.$low)>>>0));r=n;if(r===((((s=i.expbits,s<32?(1<>0)-1>>0))){t="";if(!((q.$high===0&&q.$low===0))){t="NaN";}else if(l){t="-Inf";}else{t="+Inf";}return $appendSlice(c,t);}else if(r===(0)){n=n+(1)>>0;}else{q=(u=$shiftLeft64(new $Uint64(0,1),i.mantbits),new $Uint64(q.$high|u.$high,(q.$low|u.$low)>>>0));}n=n+(i.bias)>>0;if(e===98){return BV(c,l,q,n,i);}if((e===120)||(e===88)){return BW(c,f,e,l,q,n,i);}if(!CW){return BP(c,f,e,l,q,n,i);}v=new BS.ptr(EA.nil,0,0,false);w=false;x=f<0;if(x){y=EE.zero();v.d=new EA(y);AZ(v,q,n-((i.mantbits>>0))>>0,i);w=true;z=e;if((z===(101))||(z===(69))){f=BY(v.nd-1>>0,0);}else if(z===(102)){f=BY(v.nd-v.dp>>0,0);}else if((z===(103))||(z===(71))){f=v.nd;}}else if(!((e===102))){aa=f;ab=e;if((ab===(101))||(ab===(69))){aa=aa+(1)>>0;}else if((ab===(103))||(ab===(71))){if(f===0){f=1;}aa=f;}ac=EF.zero();if((g===32)&&aa<=9){v.d=new EA(ac);AV(v,((q.$low>>>0)),n-((i.mantbits>>0))>>0,aa);w=true;}else if(aa<=18){v.d=new EA(ac);AW(v,q,n-((i.mantbits>>0))>>0,aa);w=true;}}if(!w){return BP(c,f,e,l,q,n,i);}return BQ(c,x,l,$clone(v,BS),f,e);};BP=function(c,d,e,f,g,h,i){var c,d,e,f,g,h,i,j,k,l,m,n;j=new CC.ptr(EG.zero(),0,0,false,false);j.Assign(g);j.Shift(h-((i.mantbits>>0))>>0);k=new BS.ptr(EA.nil,0,0,false);l=d<0;if(l){BR(j,g,h,i);BS.copy(k,new BS.ptr(new EA(j.d),j.nd,j.dp,false));m=e;if((m===(101))||(m===(69))){d=k.nd-1>>0;}else if(m===(102)){d=BY(k.nd-k.dp>>0,0);}else if((m===(103))||(m===(71))){d=k.nd;}}else{n=e;if((n===(101))||(n===(69))){j.Round(d+1>>0);}else if(n===(102)){j.Round(j.dp+d>>0);}else if((n===(103))||(n===(71))){if(d===0){d=1;}j.Round(d);}BS.copy(k,new BS.ptr(new EA(j.d),j.nd,j.dp,false));}return BQ(c,l,f,$clone(k,BS),d,e);};BQ=function(c,d,e,f,g,h){var c,d,e,f,g,h,i,j,k;i=h;if((i===(101))||(i===(69))){return BT(c,e,$clone(f,BS),g,h);}else if(i===(102)){return BU(c,e,$clone(f,BS),g);}else if((i===(103))||(i===(71))){j=g;if(j>f.nd&&f.nd>=f.dp){j=f.nd;}if(d){j=6;}k=f.dp-1>>0;if(k<-4||k>=j){if(g>f.nd){g=f.nd;}return BT(c,e,$clone(f,BS),g-1>>0,(h+101<<24>>>24)-103<<24>>>24);}if(g>f.dp){g=f.nd;}return BU(c,e,$clone(f,BS),BY(g-f.dp>>0,0));}return $append(c,37,h);};BR=function(c,d,e,f){var aa,ab,ac,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((d.$high===0&&d.$low===0)){c.nd=0;return;}g=f.bias+1>>0;if(e>g&&($imul(332,((c.dp-c.nd>>0))))>=($imul(100,((e-((f.mantbits>>0))>>0))))){return;}h=new CC.ptr(EG.zero(),0,0,false,false);h.Assign((i=$mul64(d,new $Uint64(0,2)),new $Uint64(i.$high+0,i.$low+1)));h.Shift((e-((f.mantbits>>0))>>0)-1>>0);j=new $Uint64(0,0);k=0;if((l=$shiftLeft64(new $Uint64(0,1),f.mantbits),(d.$high>l.$high||(d.$high===l.$high&&d.$low>l.$low)))||(e===g)){j=new $Uint64(d.$high-0,d.$low-1);k=e;}else{j=(m=$mul64(d,new $Uint64(0,2)),new $Uint64(m.$high-0,m.$low-1));k=e-1>>0;}n=new CC.ptr(EG.zero(),0,0,false,false);n.Assign((o=$mul64(j,new $Uint64(0,2)),new $Uint64(o.$high+0,o.$low+1)));n.Shift((k-((f.mantbits>>0))>>0)-1>>0);q=(p=$div64(d,new $Uint64(0,2),true),(p.$high===0&&p.$low===0));r=0;s=0;while(true){t=(s-h.dp>>0)+c.dp>>0;if(t>=c.nd){break;}u=(s-h.dp>>0)+n.dp>>0;v=48;if(u>=0&&u=w.length)?($throwRuntimeError("index out of range"),undefined):w[u]));}x=48;if(t>=0){x=(y=c.d,((t<0||t>=y.length)?($throwRuntimeError("index out of range"),undefined):y[t]));}z=48;if(s=aa.length)?($throwRuntimeError("index out of range"),undefined):aa[s]));}ab=!((v===x))||q&&((u+1>>0)===n.nd);if((r===0)&&(x+1<<24>>>24)0&&(q||r>1||(s+1>>0)>0);return;}else if(ab){c.RoundDown(t+1>>0);return;}else if(ac){c.RoundUp(t+1>>0);return;}s=s+(1)>>0;}};BT=function(c,d,e,f,g){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;if(d){c=$append(c,45);}h=48;if(!((e.nd===0))){h=(i=e.d,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]));}c=$append(c,h);if(f>0){c=$append(c,46);j=1;k=BX(e.nd,f+1>>0);if(j>0;}}c=$append(c,g);l=e.dp-1>>0;if(e.nd===0){l=0;}if(l<0){h=45;l=-l;}else{h=43;}c=$append(c,h);if(l<10){c=$append(c,48,((l<<24>>>24))+48<<24>>>24);}else if(l<100){c=$append(c,(((m=l/10,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(((n=l%10,n===n?n:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24);}else{c=$append(c,(((o=l/100,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(p=(((q=l/10,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))%10,p===p?p:$throwRuntimeError("integer divide by zero"))+48<<24>>>24,(((r=l%10,r===r?r:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24);}return c;};BU=function(c,d,e,f){var c,d,e,f,g,h,i,j,k;if(d){c=$append(c,45);}if(e.dp>0){g=BX(e.nd,e.dp);c=$appendSlice(c,$subslice(e.d,0,g));while(true){if(!(g>0;}}else{c=$append(c,48);}if(f>0){c=$append(c,46);h=0;while(true){if(!(h>0;if(0<=j&&j=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+j]));}c=$append(c,i);h=h+(1)>>0;}}return c;};BV=function(c,d,e,f,g){var c,d,e,f,g,h,i;if(d){c=$append(c,45);}h=AO(c,e,10,false,true);c=h[0];c=$append(c,112);f=f-(((g.mantbits>>0)))>>0;if(f>=0){c=$append(c,43);}i=AO(c,(new $Uint64(0,f)),10,f<0,true);c=i[0];return c;};BW=function(c,d,e,f,g,h,i){var aa,ab,ac,ad,ae,af,ag,ah,ai,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((g.$high===0&&g.$low===0)){h=0;}g=$shiftLeft64(g,((60-i.mantbits>>>0)));while(true){if(!(!((g.$high===0&&g.$low===0))&&(j=new $Uint64(g.$high&268435456,(g.$low&0)>>>0),(j.$high===0&&j.$low===0)))){break;}g=$shiftLeft64(g,(1));h=h-(1)>>0;}if(d>=0&&d<15){k=((($imul(d,4))>>>0));m=(l=$shiftLeft64(g,k),new $Uint64(l.$high&268435455,(l.$low&4294967295)>>>0));g=$shiftRightUint64(g,((60-k>>>0)));if((n=(o=new $Uint64(g.$high&0,(g.$low&1)>>>0),new $Uint64(m.$high|o.$high,(m.$low|o.$low)>>>0)),(n.$high>134217728||(n.$high===134217728&&n.$low>0)))){g=(p=new $Uint64(0,1),new $Uint64(g.$high+p.$high,g.$low+p.$low));}g=$shiftLeft64(g,((60-k>>>0)));if(!((q=new $Uint64(g.$high&536870912,(g.$low&0)>>>0),(q.$high===0&&q.$low===0)))){g=$shiftRightUint64(g,(1));h=h+(1)>>0;}}r="0123456789abcdef";if(e===88){r="0123456789ABCDEF";}if(f){c=$append(c,45);}c=$append(c,48,e,48+(((s=$shiftRightUint64(g,60),new $Uint64(s.$high&0,(s.$low&1)>>>0)).$low<<24>>>24))<<24>>>24);g=$shiftLeft64(g,(4));if(d<0&&!((g.$high===0&&g.$low===0))){c=$append(c,46);while(true){if(!(!((g.$high===0&&g.$low===0)))){break;}c=$append(c,r.charCodeAt($flatten64((t=$shiftRightUint64(g,60),new $Uint64(t.$high&0,(t.$low&15)>>>0)))));g=$shiftLeft64(g,(4));}}else if(d>0){c=$append(c,46);u=0;while(true){if(!(u>>0)))));g=$shiftLeft64(g,(4));u=u+(1)>>0;}}w=80;if(e===CN(e)){w=112;}c=$append(c,w);if(h<0){w=45;h=-h;}else{w=43;}c=$append(c,w);if(h<100){c=$append(c,(((x=h/10,(x===x&&x!==1/0&&x!==-1/0)?x>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(((y=h%10,y===y?y:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24);}else if(h<1000){c=$append(c,(((z=h/100,(z===z&&z!==1/0&&z!==-1/0)?z>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(((aa=((ab=h/10,(ab===ab&&ab!==1/0&&ab!==-1/0)?ab>>0:$throwRuntimeError("integer divide by zero")))%10,aa===aa?aa:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(((ac=h%10,ac===ac?ac:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24);}else{c=$append(c,(((ad=h/1000,(ad===ad&&ad!==1/0&&ad!==-1/0)?ad>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(ae=(((af=h/100,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24))%10,ae===ae?ae:$throwRuntimeError("integer divide by zero"))+48<<24>>>24,(((ag=((ah=h/10,(ah===ah&&ah!==1/0&&ah!==-1/0)?ah>>0:$throwRuntimeError("integer divide by zero")))%10,ag===ag?ag:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24,(((ai=h%10,ai===ai?ai:$throwRuntimeError("integer divide by zero"))<<24>>>24))+48<<24>>>24);}return c;};BX=function(c,d){var c,d;if(cd){return c;}return d;};CC.ptr.prototype.String=function(){var c,d,e,f;c=this;d=10+c.nd>>0;if(c.dp>0){d=d+(c.dp)>>0;}if(c.dp<0){d=d+(-c.dp)>>0;}e=$makeSlice(EA,d);f=0;if((c.nd===0)){return"0";}else if(c.dp<=0){((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]=48);f=f+(1)>>0;((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]=46);f=f+(1)>>0;f=f+(CD($subslice(e,f,(f+-c.dp>>0))))>>0;f=f+($copySlice($subslice(e,f),$subslice(new EA(c.d),0,c.nd)))>>0;}else if(c.dp>0;((f<0||f>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]=46);f=f+(1)>>0;f=f+($copySlice($subslice(e,f),$subslice(new EA(c.d),c.dp,c.nd)))>>0;}else{f=f+($copySlice($subslice(e,f),$subslice(new EA(c.d),0,c.nd)))>>0;f=f+(CD($subslice(e,f,((f+c.dp>>0)-c.nd>>0))))>>0;}return($bytesToString($subslice(e,0,f)));};CC.prototype.String=function(){return this.$val.String();};CD=function(c){var c,d,e,f;d=c;e=0;while(true){if(!(e=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=48);e++;}return c.$length;};CE=function(c){var c,d,e;while(true){if(!(c.nd>0&&((d=c.d,e=c.nd-1>>0,((e<0||e>=d.length)?($throwRuntimeError("index out of range"),undefined):d[e]))===48))){break;}c.nd=c.nd-(1)>>0;}if(c.nd===0){c.dp=0;}};CC.ptr.prototype.Assign=function(c){var c,d,e,f,g,h,i,j;d=this;e=EF.zero();f=0;while(true){if(!((c.$high>0||(c.$high===0&&c.$low>0)))){break;}g=$div64(c,new $Uint64(0,10),false);c=(h=$mul64(new $Uint64(0,10),g),new $Uint64(c.$high-h.$high,c.$low-h.$low));((f<0||f>=e.length)?($throwRuntimeError("index out of range"),undefined):e[f]=((new $Uint64(c.$high+0,c.$low+48).$low<<24>>>24)));f=f+(1)>>0;c=g;}d.nd=0;f=f-(1)>>0;while(true){if(!(f>=0)){break;}(i=d.d,j=d.nd,((j<0||j>=i.length)?($throwRuntimeError("index out of range"),undefined):i[j]=((f<0||f>=e.length)?($throwRuntimeError("index out of range"),undefined):e[f])));d.nd=d.nd+(1)>>0;f=f-(1)>>0;}d.dp=d.nd;CE(d);};CC.prototype.Assign=function(c){return this.$val.Assign(c);};CF=function(c,d){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=0;f=0;g=0;while(true){if(!(((h=d,h<32?(g>>>h):0)>>>0)===0)){break;}if(e>=c.nd){if(g===0){c.nd=0;return;}while(true){if(!(((i=d,i<32?(g>>>i):0)>>>0)===0)){break;}g=g*10>>>0;e=e+(1)>>0;}break;}k=(((j=c.d,((e<0||e>=j.length)?($throwRuntimeError("index out of range"),undefined):j[e]))>>>0));g=((g*10>>>0)+k>>>0)-48>>>0;e=e+(1)>>0;}c.dp=c.dp-((e-1>>0))>>0;m=(((l=d,l<32?(1<>>0))-1>>>0;while(true){if(!(e=n.length)?($throwRuntimeError("index out of range"),undefined):n[e]))>>>0));q=(p=d,p<32?(g>>>p):0)>>>0;g=(g&(m))>>>0;(r=c.d,((f<0||f>=r.length)?($throwRuntimeError("index out of range"),undefined):r[f]=(((q+48>>>0)<<24>>>24))));f=f+(1)>>0;g=((g*10>>>0)+o>>>0)-48>>>0;e=e+(1)>>0;}while(true){if(!(g>0)){break;}t=(s=d,s<32?(g>>>s):0)>>>0;g=(g&(m))>>>0;if(f<800){(u=c.d,((f<0||f>=u.length)?($throwRuntimeError("index out of range"),undefined):u[f]=(((t+48>>>0)<<24>>>24))));f=f+(1)>>0;}else if(t>0){c.trunc=true;}g=g*10>>>0;}c.nd=f;CE(c);};CI=function(c,d){var c,d,e;e=0;while(true){if(!(e=c.$length){return true;}if(!((((e<0||e>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+e])===d.charCodeAt(e)))){return((e<0||e>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+e])>0;}return false;};CJ=function(c,d){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;e=((d<0||d>=CH.$length)?($throwRuntimeError("index out of range"),undefined):CH.$array[CH.$offset+d]).delta;if(CI($subslice(new EA(c.d),0,c.nd),((d<0||d>=CH.$length)?($throwRuntimeError("index out of range"),undefined):CH.$array[CH.$offset+d]).cutoff)){e=e-(1)>>0;}f=c.nd;g=c.nd+e>>0;h=0;f=f-(1)>>0;while(true){if(!(f>=0)){break;}h=h+(((i=d,i<32?((((((j=c.d,((f<0||f>=j.length)?($throwRuntimeError("index out of range"),undefined):j[f]))>>>0))-48>>>0))<>>0))>>>0;l=(k=h/10,(k===k&&k!==1/0&&k!==-1/0)?k>>>0:$throwRuntimeError("integer divide by zero"));m=h-(10*l>>>0)>>>0;g=g-(1)>>0;if(g<800){(n=c.d,((g<0||g>=n.length)?($throwRuntimeError("index out of range"),undefined):n[g]=(((m+48>>>0)<<24>>>24))));}else if(!((m===0))){c.trunc=true;}h=l;f=f-(1)>>0;}while(true){if(!(h>0)){break;}p=(o=h/10,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"));q=h-(10*p>>>0)>>>0;g=g-(1)>>0;if(g<800){(r=c.d,((g<0||g>=r.length)?($throwRuntimeError("index out of range"),undefined):r[g]=(((q+48>>>0)<<24>>>24))));}else if(!((q===0))){c.trunc=true;}h=p;}c.nd=c.nd+(e)>>0;if(c.nd>=800){c.nd=800;}c.dp=c.dp+(e)>>0;CE(c);};CC.ptr.prototype.Shift=function(c){var c,d;d=this;if((d.nd===0)){}else if(c>0){while(true){if(!(c>28)){break;}CJ(d,28);c=c-(28)>>0;}CJ(d,((c>>>0)));}else if(c<0){while(true){if(!(c<-28)){break;}CF(d,28);c=c+(28)>>0;}CF(d,((-c>>>0)));}};CC.prototype.Shift=function(c){return this.$val.Shift(c);};CK=function(c,d){var c,d,e,f,g,h,i;if(d<0||d>=c.nd){return false;}if(((e=c.d,((d<0||d>=e.length)?($throwRuntimeError("index out of range"),undefined):e[d]))===53)&&((d+1>>0)===c.nd)){if(c.trunc){return true;}return d>0&&!(((f=(((g=c.d,h=d-1>>0,((h<0||h>=g.length)?($throwRuntimeError("index out of range"),undefined):g[h]))-48<<24>>>24))%2,f===f?f:$throwRuntimeError("integer divide by zero"))===0));}return(i=c.d,((d<0||d>=i.length)?($throwRuntimeError("index out of range"),undefined):i[d]))>=53;};CC.ptr.prototype.Round=function(c){var c,d;d=this;if(c<0||c>=d.nd){return;}if(CK(d,c)){d.RoundUp(c);}else{d.RoundDown(c);}};CC.prototype.Round=function(c){return this.$val.Round(c);};CC.ptr.prototype.RoundDown=function(c){var c,d;d=this;if(c<0||c>=d.nd){return;}d.nd=c;CE(d);};CC.prototype.RoundDown=function(c){return this.$val.RoundDown(c);};CC.ptr.prototype.RoundUp=function(c){var c,d,e,f,g,h,i;d=this;if(c<0||c>=d.nd){return;}e=c-1>>0;while(true){if(!(e>=0)){break;}g=(f=d.d,((e<0||e>=f.length)?($throwRuntimeError("index out of range"),undefined):f[e]));if(g<57){(i=d.d,((e<0||e>=i.length)?($throwRuntimeError("index out of range"),undefined):i[e]=((h=d.d,((e<0||e>=h.length)?($throwRuntimeError("index out of range"),undefined):h[e]))+(1)<<24>>>24)));d.nd=e+1>>0;return;}e=e-(1)>>0;}d.d[0]=49;d.nd=1;d.dp=d.dp+(1)>>0;};CC.prototype.RoundUp=function(c){return this.$val.RoundUp(c);};CC.ptr.prototype.RoundedInteger=function(){var c,d,e,f,g,h,i;c=this;if(c.dp>20){return new $Uint64(4294967295,4294967295);}d=0;e=new $Uint64(0,0);d=0;while(true){if(!(d=h.length)?($throwRuntimeError("index out of range"),undefined):h[d]))-48<<24>>>24))),new $Uint64(f.$high+g.$high,f.$low+g.$low));d=d+(1)>>0;}while(true){if(!(d>0;}if(CK(c,c.dp)){e=(i=new $Uint64(0,1),new $Uint64(e.$high+i.$high,e.$low+i.$low));}return e;};CC.prototype.RoundedInteger=function(){return this.$val.RoundedInteger();};CM=function(c,d){var c,d;return D.IndexByteString(c,d);};CN=function(c){var c;return(c|32)>>>0;};DP=function(c){var c;return $internalize(c.toString(),$String);};$pkg.Itoa=DP;EI.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Assign",name:"Assign",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"Shift",name:"Shift",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundDown",name:"RoundDown",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundUp",name:"RoundUp",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundedInteger",name:"RoundedInteger",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"set",name:"set",pkg:"strconv",typ:$funcType([$String],[$Bool],false)},{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([ED],[$Uint64,$Bool],false)}];BJ.init("strconv",[{prop:"mantbits",name:"mantbits",embedded:false,exported:false,typ:$Uint,tag:""},{prop:"expbits",name:"expbits",embedded:false,exported:false,typ:$Uint,tag:""},{prop:"bias",name:"bias",embedded:false,exported:false,typ:$Int,tag:""}]);BS.init("strconv",[{prop:"d",name:"d",embedded:false,exported:false,typ:EA,tag:""},{prop:"nd",name:"nd",embedded:false,exported:false,typ:$Int,tag:""},{prop:"dp",name:"dp",embedded:false,exported:false,typ:$Int,tag:""},{prop:"neg",name:"neg",embedded:false,exported:false,typ:$Bool,tag:""}]);CC.init("strconv",[{prop:"d",name:"d",embedded:false,exported:false,typ:EG,tag:""},{prop:"nd",name:"nd",embedded:false,exported:false,typ:$Int,tag:""},{prop:"dp",name:"dp",embedded:false,exported:false,typ:$Int,tag:""},{prop:"neg",name:"neg",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"trunc",name:"trunc",embedded:false,exported:false,typ:$Bool,tag:""}]);CG.init("strconv",[{prop:"delta",name:"delta",embedded:false,exported:false,typ:$Int,tag:""},{prop:"cutoff",name:"cutoff",embedded:false,exported:false,typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AQ=new DT([32,126,161,887,890,895,900,1366,1369,1418,1421,1479,1488,1514,1519,1524,1542,1563,1566,1805,1808,1866,1869,1969,1984,2042,2045,2093,2096,2139,2142,2154,2208,2247,2259,2444,2447,2448,2451,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2531,2534,2558,2561,2570,2575,2576,2579,2617,2620,2626,2631,2632,2635,2637,2641,2641,2649,2654,2662,2678,2689,2745,2748,2765,2768,2768,2784,2787,2790,2801,2809,2828,2831,2832,2835,2873,2876,2884,2887,2888,2891,2893,2901,2903,2908,2915,2918,2935,2946,2954,2958,2965,2969,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3021,3024,3024,3031,3031,3046,3066,3072,3129,3133,3149,3157,3162,3168,3171,3174,3183,3191,3257,3260,3277,3285,3286,3294,3299,3302,3314,3328,3407,3412,3427,3430,3478,3482,3517,3520,3526,3530,3530,3535,3551,3558,3567,3570,3572,3585,3642,3647,3675,3713,3773,3776,3789,3792,3801,3804,3807,3840,3948,3953,4058,4096,4295,4301,4301,4304,4685,4688,4701,4704,4749,4752,4789,4792,4805,4808,4885,4888,4954,4957,4988,4992,5017,5024,5109,5112,5117,5120,5788,5792,5880,5888,5908,5920,5942,5952,5971,5984,6003,6016,6109,6112,6121,6128,6137,6144,6157,6160,6169,6176,6264,6272,6314,6320,6389,6400,6443,6448,6459,6464,6464,6468,6509,6512,6516,6528,6571,6576,6601,6608,6618,6622,6683,6686,6780,6783,6793,6800,6809,6816,6829,6832,6848,6912,6987,6992,7036,7040,7155,7164,7223,7227,7241,7245,7304,7312,7354,7357,7367,7376,7418,7424,7957,7960,7965,7968,8005,8008,8013,8016,8061,8064,8147,8150,8175,8178,8190,8208,8231,8240,8286,8304,8305,8308,8348,8352,8383,8400,8432,8448,8587,8592,9254,9280,9290,9312,11123,11126,11507,11513,11559,11565,11565,11568,11623,11631,11632,11647,11670,11680,11858,11904,12019,12032,12245,12272,12283,12289,12438,12441,12543,12549,12771,12784,40956,40960,42124,42128,42182,42192,42539,42560,42743,42752,42943,42946,42954,42997,43052,43056,43065,43072,43127,43136,43205,43214,43225,43232,43347,43359,43388,43392,43481,43486,43574,43584,43597,43600,43609,43612,43714,43739,43766,43777,43782,43785,43790,43793,43798,43808,43883,43888,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64449,64467,64831,64848,64911,64914,64967,65008,65021,65024,65049,65056,65131,65136,65276,65281,65470,65474,65479,65482,65487,65490,65495,65498,65500,65504,65518,65532,65533]);AR=new DT([173,907,909,930,1328,1424,1757,2111,2143,2229,2274,2436,2473,2481,2526,2564,2601,2609,2612,2615,2621,2653,2692,2702,2706,2729,2737,2740,2758,2762,2816,2820,2857,2865,2868,2910,2948,2961,2971,2973,3017,3085,3089,3113,3141,3145,3159,3213,3217,3241,3252,3269,3273,3295,3312,3341,3345,3397,3401,3456,3460,3506,3516,3541,3543,3715,3717,3723,3748,3750,3781,3783,3912,3992,4029,4045,4294,4681,4695,4697,4745,4785,4799,4801,4823,4881,5760,5901,5997,6001,6431,6751,7674,8024,8026,8028,8030,8117,8133,8156,8181,8335,11158,11311,11359,11558,11687,11695,11703,11711,11719,11727,11735,11743,11930,12352,12592,12687,12831,43470,43519,43815,43823,64311,64317,64319,64322,64325,65107,65127,65141,65511]);AS=new DU([65536,65613,65616,65629,65664,65786,65792,65794,65799,65843,65847,65948,65952,65952,66000,66045,66176,66204,66208,66256,66272,66299,66304,66339,66349,66378,66384,66426,66432,66499,66504,66517,66560,66717,66720,66729,66736,66771,66776,66811,66816,66855,66864,66915,66927,66927,67072,67382,67392,67413,67424,67431,67584,67589,67592,67640,67644,67644,67647,67742,67751,67759,67808,67829,67835,67867,67871,67897,67903,67903,67968,68023,68028,68047,68050,68102,68108,68149,68152,68154,68159,68168,68176,68184,68192,68255,68288,68326,68331,68342,68352,68405,68409,68437,68440,68466,68472,68497,68505,68508,68521,68527,68608,68680,68736,68786,68800,68850,68858,68903,68912,68921,69216,69293,69296,69297,69376,69415,69424,69465,69552,69579,69600,69622,69632,69709,69714,69743,69759,69825,69840,69864,69872,69881,69888,69959,69968,70006,70016,70132,70144,70206,70272,70313,70320,70378,70384,70393,70400,70412,70415,70416,70419,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70656,70753,70784,70855,70864,70873,71040,71093,71096,71133,71168,71236,71248,71257,71264,71276,71296,71352,71360,71369,71424,71450,71453,71467,71472,71487,71680,71739,71840,71922,71935,71942,71945,71945,71948,71992,71995,72006,72016,72025,72096,72103,72106,72151,72154,72164,72192,72263,72272,72354,72384,72440,72704,72773,72784,72812,72816,72847,72850,72886,72960,73014,73018,73031,73040,73049,73056,73112,73120,73129,73440,73464,73648,73648,73664,73713,73727,74649,74752,74868,74880,75075,77824,78894,82944,83526,92160,92728,92736,92777,92782,92783,92880,92909,92912,92917,92928,92997,93008,93047,93053,93071,93760,93850,93952,94026,94031,94087,94095,94111,94176,94180,94192,94193,94208,100343,100352,101589,101632,101640,110592,110878,110928,110930,110948,110951,110960,111355,113664,113770,113776,113788,113792,113800,113808,113817,113820,113823,118784,119029,119040,119078,119081,119154,119163,119272,119296,119365,119520,119539,119552,119638,119648,119672,119808,119967,119970,119970,119973,119974,119977,120074,120077,120134,120138,120485,120488,120779,120782,121483,121499,121519,122880,122904,122907,122922,123136,123180,123184,123197,123200,123209,123214,123215,123584,123641,123647,123647,124928,125124,125127,125142,125184,125259,125264,125273,125278,125279,126065,126132,126209,126269,126464,126500,126503,126523,126530,126530,126535,126548,126551,126564,126567,126619,126625,126651,126704,126705,126976,127019,127024,127123,127136,127150,127153,127221,127232,127405,127462,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,128727,128736,128748,128752,128764,128768,128883,128896,128984,128992,129003,129024,129035,129040,129095,129104,129113,129120,129159,129168,129197,129200,129201,129280,129619,129632,129645,129648,129652,129656,129658,129664,129670,129680,129704,129712,129718,129728,129730,129744,129750,129792,129994,130032,130041,131072,173789,173824,177972,177984,178205,178208,183969,183984,191456,194560,195101,196608,201546,917760,917999]);AT=new DT([12,39,59,62,399,926,2057,2102,2134,2291,2564,2580,2584,3711,3754,4285,4405,4576,4626,4743,4745,4750,4766,4868,4905,4913,4916,4922,5212,6420,6423,6454,7177,7223,7336,7431,7434,7483,7486,7526,7529,7567,7570,9327,27231,27482,27490,54357,54429,54445,54458,54460,54468,54534,54549,54557,54586,54591,54597,54609,55968,57351,57378,57381,60932,60960,60963,60968,60979,60984,60986,61000,61002,61004,61008,61011,61016,61018,61020,61022,61024,61027,61035,61043,61048,61053,61055,61066,61092,61098,61632,61648,63865,63948,64403]);AU=new DT([160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288]);AX=$toNativeArray($kindUint64,[new $Uint64(0,1),new $Uint64(0,10),new $Uint64(0,100),new $Uint64(0,1000),new $Uint64(0,10000),new $Uint64(0,100000),new $Uint64(0,1000000),new $Uint64(0,10000000),new $Uint64(0,100000000),new $Uint64(0,1000000000),new $Uint64(2,1410065408),new $Uint64(23,1215752192),new $Uint64(232,3567587328),new $Uint64(2328,1316134912),new $Uint64(23283,276447232),new $Uint64(232830,2764472320),new $Uint64(2328306,1874919424),new $Uint64(23283064,1569325056),new $Uint64(232830643,2808348672),new $Uint64(2328306436,2313682944)]);BK=new BJ.ptr(23,8,-127);BL=new BJ.ptr(52,11,-1023);CB=$toNativeArray($kindArray,[$toNativeArray($kindUint64,[new $Uint64(389204073,3445679187),new $Uint64(4203730336,136053384)]),$toNativeArray($kindUint64,[new $Uint64(243252546,542936756),new $Uint64(2627331460,85033365)]),$toNativeArray($kindUint64,[new $Uint64(1377807506,2826154593),new $Uint64(3284164325,106291706)]),$toNativeArray($kindUint64,[new $Uint64(3869743031,1385209593),new $Uint64(4105205406,1206606456)]),$toNativeArray($kindUint64,[new $Uint64(2418589394,2476368732),new $Uint64(2565753378,3975354507)]),$toNativeArray($kindUint64,[new $Uint64(1949494919,947977267),new $Uint64(3207191723,2821709486)]),$toNativeArray($kindUint64,[new $Uint64(289385001,111229759),new $Uint64(4008989654,2453395034)]),$toNativeArray($kindUint64,[new $Uint64(1254607449,2753873159),new $Uint64(2505618534,459630072)]),$toNativeArray($kindUint64,[new $Uint64(1568259312,221115977),new $Uint64(3132023167,2722021238)]),$toNativeArray($kindUint64,[new $Uint64(4107807788,276394972),new $Uint64(3915028959,2328784723)]),$toNativeArray($kindUint64,[new $Uint64(2030508955,2320230505),new $Uint64(2446893099,3066103188)]),$toNativeArray($kindUint64,[new $Uint64(2538136194,1826546308),new $Uint64(3058616374,2758887161)]),$toNativeArray($kindUint64,[new $Uint64(4246412067,135699237),new $Uint64(3823270468,1301125303)]),$toNativeArray($kindUint64,[new $Uint64(4264620277,3842908407),new $Uint64(2389544042,2960686962)]),$toNativeArray($kindUint64,[new $Uint64(3183291699,1582410037),new $Uint64(2986930053,1553375055)]),$toNativeArray($kindUint64,[new $Uint64(2905372800,904270722),new $Uint64(3733662566,3015460643)]),$toNativeArray($kindUint64,[new $Uint64(1278987088,565169201),new $Uint64(2333539104,810921078)]),$toNativeArray($kindUint64,[new $Uint64(3746217508,706461501),new $Uint64(2916923880,1013651347)]),$toNativeArray($kindUint64,[new $Uint64(3609030061,883076877),new $Uint64(3646154850,1267064184)]),$toNativeArray($kindUint64,[new $Uint64(2255643788,1088793960),new $Uint64(2278846781,1865656939)]),$toNativeArray($kindUint64,[new $Uint64(1745812911,1360992450),new $Uint64(2848558476,3405812998)]),$toNativeArray($kindUint64,[new $Uint64(34782491,627498738),new $Uint64(3560698095,4257266248)]),$toNativeArray($kindUint64,[new $Uint64(21739056,4150283095),new $Uint64(2225436309,4271404141)]),$toNativeArray($kindUint64,[new $Uint64(1100915645,892886573),new $Uint64(2781795387,2118029704)]),$toNativeArray($kindUint64,[new $Uint64(1376144556,2189850041),new $Uint64(3477244234,1573795306)]),$toNativeArray($kindUint64,[new $Uint64(1933832171,3516139923),new $Uint64(2173277646,2057363890)]),$toNativeArray($kindUint64,[new $Uint64(269806566,3321433080),new $Uint64(2716597058,424221215)]),$toNativeArray($kindUint64,[new $Uint64(3558483680,2004307702),new $Uint64(3395746322,2677760166)]),$toNativeArray($kindUint64,[new $Uint64(2300620952,2505384628),new $Uint64(4244682903,1199716560)]),$toNativeArray($kindUint64,[new $Uint64(1437888095,1565865392),new $Uint64(2652926814,2360435586)]),$toNativeArray($kindUint64,[new $Uint64(3944843767,883589917),new $Uint64(3316158518,803060834)]),$toNativeArray($kindUint64,[new $Uint64(2783571061,30745572),new $Uint64(4145198147,3151309691)]),$toNativeArray($kindUint64,[new $Uint64(1202861001,556086894),new $Uint64(2590748842,1432697645)]),$toNativeArray($kindUint64,[new $Uint64(2577318075,1768850442),new $Uint64(3238436052,3938355704)]),$toNativeArray($kindUint64,[new $Uint64(3221647594,1137321229),new $Uint64(4048045066,627977334)]),$toNativeArray($kindUint64,[new $Uint64(939787922,1784567592),new $Uint64(2530028166,1466227658)]),$toNativeArray($kindUint64,[new $Uint64(3322218551,83225842),new $Uint64(3162535207,3980268220)]),$toNativeArray($kindUint64,[new $Uint64(4152773188,3325257774),new $Uint64(3953169009,3901593451)]),$toNativeArray($kindUint64,[new $Uint64(2058612330,4225769757),new $Uint64(2470730631,827883171)]),$toNativeArray($kindUint64,[new $Uint64(1499523589,3134728548),new $Uint64(3088413288,4256079436)]),$toNativeArray($kindUint64,[new $Uint64(1874404487,697185213),new $Uint64(3860516611,1025131999)]),$toNativeArray($kindUint64,[new $Uint64(2782115540,2046353494),new $Uint64(2412822882,103836587)]),$toNativeArray($kindUint64,[new $Uint64(2403902601,2557941868),new $Uint64(3016028602,2277279382)]),$toNativeArray($kindUint64,[new $Uint64(857394603,4271169159),new $Uint64(3770035753,699115580)]),$toNativeArray($kindUint64,[new $Uint64(2683355275,2132609812),new $Uint64(2356272345,3121301797)]),$toNativeArray($kindUint64,[new $Uint64(132968622,1592020441),new $Uint64(2945340432,680401775)]),$toNativeArray($kindUint64,[new $Uint64(3387436249,4137509200),new $Uint64(3681675540,850502218)]),$toNativeArray($kindUint64,[new $Uint64(3190889480,975330514),new $Uint64(2301047212,2679047534)]),$toNativeArray($kindUint64,[new $Uint64(1841128202,1219163142),new $Uint64(2876309015,3348809418)]),$toNativeArray($kindUint64,[new $Uint64(153926604,3671437576),new $Uint64(3595386269,3112269949)]),$toNativeArray($kindUint64,[new $Uint64(633075040,147164837),new $Uint64(2247116418,2482039630)]),$toNativeArray($kindUint64,[new $Uint64(2938827448,183956046),new $Uint64(2808895523,955065889)]),$toNativeArray($kindUint64,[new $Uint64(452308838,229945057),new $Uint64(3511119404,120090538)]),$toNativeArray($kindUint64,[new $Uint64(1356434847,3364941133),new $Uint64(2194449627,2222540234)]),$toNativeArray($kindUint64,[new $Uint64(3843027207,3132434592),new $Uint64(2743062034,1704433468)]),$toNativeArray($kindUint64,[new $Uint64(508816713,2841801416),new $Uint64(3428827542,4278025484)]),$toNativeArray($kindUint64,[new $Uint64(636020892,331026298),new $Uint64(4286034428,3200048207)]),$toNativeArray($kindUint64,[new $Uint64(2008125793,2354375084),new $Uint64(2678771517,4147513777)]),$toNativeArray($kindUint64,[new $Uint64(3583899065,4016710679),new $Uint64(3348464397,1963166749)]),$toNativeArray($kindUint64,[new $Uint64(1258648360,1799662877),new $Uint64(4185580496,3527700261)]),$toNativeArray($kindUint64,[new $Uint64(1323526137,1124789298),new $Uint64(2615987810,2204812663)]),$toNativeArray($kindUint64,[new $Uint64(580665847,2479728447),new $Uint64(3269984763,608532181)]),$toNativeArray($kindUint64,[new $Uint64(1799574133,2025918735),new $Uint64(4087480953,3981890698)]),$toNativeArray($kindUint64,[new $Uint64(2198475657,1803070121),new $Uint64(2554675596,878068950)]),$toNativeArray($kindUint64,[new $Uint64(600610923,3327579475),new $Uint64(3193344495,1097586188)]),$toNativeArray($kindUint64,[new $Uint64(750763654,3085732520),new $Uint64(3991680619,298240911)]),$toNativeArray($kindUint64,[new $Uint64(2079840020,854841001),new $Uint64(2494800386,3944496953)]),$toNativeArray($kindUint64,[new $Uint64(3673541849,1068551251),new $Uint64(3118500483,2783137543)]),$toNativeArray($kindUint64,[new $Uint64(3518185487,2409430888),new $Uint64(3898125604,2405180105)]),$toNativeArray($kindUint64,[new $Uint64(588253193,3116507041),new $Uint64(2436328502,3650721214)]),$toNativeArray($kindUint64,[new $Uint64(2882800140,674408330),new $Uint64(3045410628,2415917869)]),$toNativeArray($kindUint64,[new $Uint64(382274703,843010412),new $Uint64(3806763285,3019897337)]),$toNativeArray($kindUint64,[new $Uint64(2923276249,2137494243),new $Uint64(2379227053,2424306747)]),$toNativeArray($kindUint64,[new $Uint64(2580353487,3745609628),new $Uint64(2974033816,4104125258)]),$toNativeArray($kindUint64,[new $Uint64(1077958211,3608270211),new $Uint64(3717542271,835189277)]),$toNativeArray($kindUint64,[new $Uint64(1210594794,1718297970),new $Uint64(2323463919,2132606034)]),$toNativeArray($kindUint64,[new $Uint64(3660727141,388815),new $Uint64(2904329899,1592015718)]),$toNativeArray($kindUint64,[new $Uint64(2428425278,1074227842),new $Uint64(3630412374,916277824)]),$toNativeArray($kindUint64,[new $Uint64(1517765798,3892617873),new $Uint64(2269007733,3793899112)]),$toNativeArray($kindUint64,[new $Uint64(1897207248,2718288694),new $Uint64(2836259667,1521148418)]),$toNativeArray($kindUint64,[new $Uint64(224025412,3397860867),new $Uint64(3545324584,827693699)]),$toNativeArray($kindUint64,[new $Uint64(3898112266,4271146690),new $Uint64(2215827865,517308561)]),$toNativeArray($kindUint64,[new $Uint64(1651414861,3191449714),new $Uint64(2769784831,1720377526)]),$toNativeArray($kindUint64,[new $Uint64(4211752225,768086671),new $Uint64(3462231039,1076730083)]),$toNativeArray($kindUint64,[new $Uint64(2095474228,3164408729),new $Uint64(2163894399,2283569038)]),$toNativeArray($kindUint64,[new $Uint64(471859137,3955510912),new $Uint64(2704867999,1780719474)]),$toNativeArray($kindUint64,[new $Uint64(2737307570,1723163168),new $Uint64(3381084999,1152157518)]),$toNativeArray($kindUint64,[new $Uint64(1274150815,6470312),new $Uint64(4226356249,366455074)]),$toNativeArray($kindUint64,[new $Uint64(1870086083,1614656681),new $Uint64(2641472655,2913388981)]),$toNativeArray($kindUint64,[new $Uint64(3411349428,944579027),new $Uint64(3301840819,2567994402)]),$toNativeArray($kindUint64,[new $Uint64(2116703137,1180723784),new $Uint64(4127301024,2136251179)]),$toNativeArray($kindUint64,[new $Uint64(786068548,3422306925),new $Uint64(2579563140,1335156987)]),$toNativeArray($kindUint64,[new $Uint64(4203811157,4277883656),new $Uint64(3224453925,1668946233)]),$toNativeArray($kindUint64,[new $Uint64(2033538475,2126129098),new $Uint64(4030567406,3159924616)]),$toNativeArray($kindUint64,[new $Uint64(1270961547,791959774),new $Uint64(2519104629,901211061)]),$toNativeArray($kindUint64,[new $Uint64(2662443757,4211175190),new $Uint64(3148880786,2200255650)]),$toNativeArray($kindUint64,[new $Uint64(1180571049,2042743516),new $Uint64(3936100983,602835915)]),$toNativeArray($kindUint64,[new $Uint64(200985993,3961069257),new $Uint64(2460063114,1987385183)]),$toNativeArray($kindUint64,[new $Uint64(3472457964,1730111099),new $Uint64(3075078893,336747830)]),$toNativeArray($kindUint64,[new $Uint64(2193088807,2162638874),new $Uint64(3843848616,1494676612)]),$toNativeArray($kindUint64,[new $Uint64(3518164152,2962262032),new $Uint64(2402405385,934172882)]),$toNativeArray($kindUint64,[new $Uint64(2250221542,3702827541),new $Uint64(3003006731,2241457927)]),$toNativeArray($kindUint64,[new $Uint64(1739035104,2481050778),new $Uint64(3753758414,1728080585)]),$toNativeArray($kindUint64,[new $Uint64(3771251500,1550656736),new $Uint64(2346099009,6308541)]),$toNativeArray($kindUint64,[new $Uint64(1492838903,1938320920),new $Uint64(2932623761,1081627501)]),$toNativeArray($kindUint64,[new $Uint64(2939790453,1349159326),new $Uint64(3665779701,2425776200)]),$toNativeArray($kindUint64,[new $Uint64(1837369033,1380095491),new $Uint64(2291112313,2052981037)]),$toNativeArray($kindUint64,[new $Uint64(3370453115,2798861187),new $Uint64(2863890391,3639968120)]),$toNativeArray($kindUint64,[new $Uint64(4213066394,2424834660),new $Uint64(3579862989,3476218326)]),$toNativeArray($kindUint64,[new $Uint64(1559424672,2589263487),new $Uint64(2237414368,2709507366)]),$toNativeArray($kindUint64,[new $Uint64(4096764488,3236579358),new $Uint64(2796767960,3386884207)]),$toNativeArray($kindUint64,[new $Uint64(4047213786,4045724198),new $Uint64(3495959950,4233605259)]),$toNativeArray($kindUint64,[new $Uint64(1992637704,3602319448),new $Uint64(2184974969,1572261463)]),$toNativeArray($kindUint64,[new $Uint64(1417055307,207932014),new $Uint64(2731218711,3039068653)]),$toNativeArray($kindUint64,[new $Uint64(2845060957,3481140489),new $Uint64(3414023389,2725093992)]),$toNativeArray($kindUint64,[new $Uint64(3556326197,1130200140),new $Uint64(4267529237,185142018)]),$toNativeArray($kindUint64,[new $Uint64(3296445697,1243245999),new $Uint64(2667205773,652584673)]),$toNativeArray($kindUint64,[new $Uint64(899331649,2627799323),new $Uint64(3334007216,1889472666)]),$toNativeArray($kindUint64,[new $Uint64(3271648210,63523682),new $Uint64(4167509020,2361840832)]),$toNativeArray($kindUint64,[new $Uint64(2044780131,1113444125),new $Uint64(2604693137,3623634168)]),$toNativeArray($kindUint64,[new $Uint64(2555975164,318063332),new $Uint64(3255866422,1308317238)]),$toNativeArray($kindUint64,[new $Uint64(1047485307,397579165),new $Uint64(4069833027,3782880196)]),$toNativeArray($kindUint64,[new $Uint64(2802161964,4006583362),new $Uint64(2543645642,1827429210)]),$toNativeArray($kindUint64,[new $Uint64(1355218808,713261907),new $Uint64(3179557053,136802865)]),$toNativeArray($kindUint64,[new $Uint64(2767765334,891577384),new $Uint64(3974446316,1244745405)]),$toNativeArray($kindUint64,[new $Uint64(2266724245,3778461337),new $Uint64(2484028947,2925449526)]),$toNativeArray($kindUint64,[new $Uint64(685921659,1501851199),new $Uint64(3105036184,2583070084)]),$toNativeArray($kindUint64,[new $Uint64(857402074,803572175),new $Uint64(3881295230,3228837605)]),$toNativeArray($kindUint64,[new $Uint64(1072747208,1575974433),new $Uint64(2425809519,944281679)]),$toNativeArray($kindUint64,[new $Uint64(267192186,1969968041),new $Uint64(3032261899,106610275)]),$toNativeArray($kindUint64,[new $Uint64(3555215705,314976404),new $Uint64(3790327373,3354488315)]),$toNativeArray($kindUint64,[new $Uint64(1685138903,2881214812),new $Uint64(2368954608,2633426109)]),$toNativeArray($kindUint64,[new $Uint64(3180165453,2527776691),new $Uint64(2961193260,3291782636)]),$toNativeArray($kindUint64,[new $Uint64(3975206816,4233462688),new $Uint64(3701491575,4114728295)]),$toNativeArray($kindUint64,[new $Uint64(4095116996,2645914180),new $Uint64(2313432234,4182317920)]),$toNativeArray($kindUint64,[new $Uint64(823928949,3307392725),new $Uint64(2891790293,3080413753)]),$toNativeArray($kindUint64,[new $Uint64(2103653011,913015435),new $Uint64(3614737867,629291719)]),$toNativeArray($kindUint64,[new $Uint64(2925395868,33763735),new $Uint64(2259211166,4151403708)]),$toNativeArray($kindUint64,[new $Uint64(3656744835,42204668),new $Uint64(2824013958,3041770987)]),$toNativeArray($kindUint64,[new $Uint64(3497189219,3273981307),new $Uint64(3530017448,1654730086)]),$toNativeArray($kindUint64,[new $Uint64(1112001438,1509367405),new $Uint64(2206260905,1034206304)]),$toNativeArray($kindUint64,[new $Uint64(1390001797,4034192904),new $Uint64(2757826131,2366499704)]),$toNativeArray($kindUint64,[new $Uint64(1737502247,1821515659),new $Uint64(3447282664,1884382806)]),$toNativeArray($kindUint64,[new $Uint64(12197080,2749060022),new $Uint64(2154551665,1177739254)]),$toNativeArray($kindUint64,[new $Uint64(2162729998,3436325028),new $Uint64(2693189581,2545915891)]),$toNativeArray($kindUint64,[new $Uint64(1629670674,2147922637),new $Uint64(3366486976,4256136688)]),$toNativeArray($kindUint64,[new $Uint64(2037088343,537419649),new $Uint64(4208108721,1025203564)]),$toNativeArray($kindUint64,[new $Uint64(3420663862,1946500016),new $Uint64(2630067950,3325106787)]),$toNativeArray($kindUint64,[new $Uint64(3202088004,285641372),new $Uint64(3287584938,2008899836)]),$toNativeArray($kindUint64,[new $Uint64(4002610005,357051716),new $Uint64(4109481173,363641147)]),$toNativeArray($kindUint64,[new $Uint64(1964760341,760028234),new $Uint64(2568425733,764146629)]),$toNativeArray($kindUint64,[new $Uint64(3529692250,2023777117),new $Uint64(3210532166,2028925110)]),$toNativeArray($kindUint64,[new $Uint64(2264631665,382237748),new $Uint64(4013165208,388672740)]),$toNativeArray($kindUint64,[new $Uint64(3562878438,2923253152),new $Uint64(2508228255,242920462)]),$toNativeArray($kindUint64,[new $Uint64(2306114400,1506582793),new $Uint64(3135285318,3524876050)]),$toNativeArray($kindUint64,[new $Uint64(735159352,1883228491),new $Uint64(3919106648,2258611415)]),$toNativeArray($kindUint64,[new $Uint64(2070087331,1177017807),new $Uint64(2449441655,1411632134)]),$toNativeArray($kindUint64,[new $Uint64(440125516,397530434),new $Uint64(3061802069,690798344)]),$toNativeArray($kindUint64,[new $Uint64(550156895,496913043),new $Uint64(3827252586,1937239754)]),$toNativeArray($kindUint64,[new $Uint64(1417589883,1921183388),new $Uint64(2392032866,2284516670)]),$toNativeArray($kindUint64,[new $Uint64(3919471002,1327737411),new $Uint64(2990041083,708162189)]),$toNativeArray($kindUint64,[new $Uint64(1678113280,3807155412),new $Uint64(3737551353,4106428209)]),$toNativeArray($kindUint64,[new $Uint64(3733175360,2379472132),new $Uint64(2335969596,955904894)]),$toNativeArray($kindUint64,[new $Uint64(2518985552,2974340165),new $Uint64(2919961995,1194881118)]),$toNativeArray($kindUint64,[new $Uint64(1001248292,3717925207),new $Uint64(3649952494,419859574)]),$toNativeArray($kindUint64,[new $Uint64(3847005655,176219606),new $Uint64(2281220308,3483637705)]),$toNativeArray($kindUint64,[new $Uint64(1587531596,3441499980),new $Uint64(2851525386,59579836)]),$toNativeArray($kindUint64,[new $Uint64(1984414496,6907679),new $Uint64(3564406732,2221958443)]),$toNativeArray($kindUint64,[new $Uint64(703388148,4317299),new $Uint64(2227754207,3536207675)]),$toNativeArray($kindUint64,[new $Uint64(4100460657,5396624),new $Uint64(2784692759,3346517769)]),$toNativeArray($kindUint64,[new $Uint64(1904350349,1080487604),new $Uint64(3480865949,3109405388)]),$toNativeArray($kindUint64,[new $Uint64(3337702616,1212175664),new $Uint64(2175541218,2480249279)]),$toNativeArray($kindUint64,[new $Uint64(3098386446,1515219580),new $Uint64(2719426523,952827951)]),$toNativeArray($kindUint64,[new $Uint64(2799241233,4041508124),new $Uint64(3399283154,117293115)]),$toNativeArray($kindUint64,[new $Uint64(2425309718,1830659683),new $Uint64(4249103942,2294100042)]),$toNativeArray($kindUint64,[new $Uint64(2589560398,70420478),new $Uint64(2655689964,360070702)]),$toNativeArray($kindUint64,[new $Uint64(1089466849,2235509245),new $Uint64(3319612455,450088378)]),$toNativeArray($kindUint64,[new $Uint64(3509317209,3868128380),new $Uint64(4149515568,3783835944)]),$toNativeArray($kindUint64,[new $Uint64(2193323256,806967502),new $Uint64(2593447230,2364897465)]),$toNativeArray($kindUint64,[new $Uint64(3815395894,1008709377),new $Uint64(3241809038,808638183)]),$toNativeArray($kindUint64,[new $Uint64(3695503043,3408370369),new $Uint64(4052261297,3158281377)]),$toNativeArray($kindUint64,[new $Uint64(699076666,1593360569),new $Uint64(2532663311,363313125)]),$toNativeArray($kindUint64,[new $Uint64(1947587656,4139184359),new $Uint64(3165829138,3675366878)]),$toNativeArray($kindUint64,[new $Uint64(287000923,879013153),new $Uint64(3957286423,2446724950)]),$toNativeArray($kindUint64,[new $Uint64(3400601049,12512308),new $Uint64(2473304014,3139815829)]),$toNativeArray($kindUint64,[new $Uint64(1029525839,1089382210),new $Uint64(3091630018,1777286139)]),$toNativeArray($kindUint64,[new $Uint64(213165475,287985938),new $Uint64(3864537523,74124026)]),$toNativeArray($kindUint64,[new $Uint64(1206970245,3938087595),new $Uint64(2415335951,3804423900)]),$toNativeArray($kindUint64,[new $Uint64(1508712807,1701384022),new $Uint64(3019169939,3681788051)]),$toNativeArray($kindUint64,[new $Uint64(812149185,1052988204),new $Uint64(3773962424,3528493240)]),$toNativeArray($kindUint64,[new $Uint64(507593240,3342472187),new $Uint64(2358726515,2205308275)]),$toNativeArray($kindUint64,[new $Uint64(3855717022,4178090234),new $Uint64(2948408144,1682893519)]),$toNativeArray($kindUint64,[new $Uint64(3745904454,3075129145),new $Uint64(3685510180,2103616899)]),$toNativeArray($kindUint64,[new $Uint64(1804319372,848213891),new $Uint64(2303443862,3462244210)]),$toNativeArray($kindUint64,[new $Uint64(107915567,1060267364),new $Uint64(2879304828,2180321615)]),$toNativeArray($kindUint64,[new $Uint64(3356119931,251592381),new $Uint64(3599131035,2725402018)]),$toNativeArray($kindUint64,[new $Uint64(3171316780,3915341622),new $Uint64(2249456897,1166505349)]),$toNativeArray($kindUint64,[new $Uint64(742920504,599209732),new $Uint64(2811821121,2531873511)]),$toNativeArray($kindUint64,[new $Uint64(4149876102,749012165),new $Uint64(3514776401,4238583712)]),$toNativeArray($kindUint64,[new $Uint64(2593672563,3689358075),new $Uint64(2196735251,1038502084)]),$toNativeArray($kindUint64,[new $Uint64(3242090704,3537955770),new $Uint64(2745919064,224385781)]),$toNativeArray($kindUint64,[new $Uint64(831387909,127477416),new $Uint64(3432398830,280482227)]),$toNativeArray($kindUint64,[new $Uint64(4260460358,1233088594),new $Uint64(4290498537,2498086431)]),$toNativeArray($kindUint64,[new $Uint64(4273400459,3991905843),new $Uint64(2681561585,4245658579)]),$toNativeArray($kindUint64,[new $Uint64(4268008750,3916140480),new $Uint64(3351951982,2085847752)]),$toNativeArray($kindUint64,[new $Uint64(1040043642,2747691952),new $Uint64(4189939978,459826043)]),$toNativeArray($kindUint64,[new $Uint64(113156364,2791049294),new $Uint64(2618712486,1361133101)]),$toNativeArray($kindUint64,[new $Uint64(1215187279,3488811618),new $Uint64(3273390607,3848900024)]),$toNativeArray($kindUint64,[new $Uint64(1518984099,3287272698),new $Uint64(4091738259,3737383206)]),$toNativeArray($kindUint64,[new $Uint64(4170590534,1517674524),new $Uint64(2557336412,1798993591)]),$toNativeArray($kindUint64,[new $Uint64(4139496343,4044576803),new $Uint64(3196670515,2248741989)]),$toNativeArray($kindUint64,[new $Uint64(1953144957,3981979180),new $Uint64(3995838144,1737185663)]),$toNativeArray($kindUint64,[new $Uint64(2831328334,3025607900),new $Uint64(2497398840,1085741039)]),$toNativeArray($kindUint64,[new $Uint64(2465418594,1634526227),new $Uint64(3121748550,1357176299)]),$toNativeArray($kindUint64,[new $Uint64(2008031418,4190641431),new $Uint64(3902185687,3843954022)]),$toNativeArray($kindUint64,[new $Uint64(181277812,3692892718),new $Uint64(2438866054,4013084000)]),$toNativeArray($kindUint64,[new $Uint64(226597266,321148602),new $Uint64(3048582568,2868871352)]),$toNativeArray($kindUint64,[new $Uint64(283246582,2548919401),new $Uint64(3810728210,3586089190)]),$toNativeArray($kindUint64,[new $Uint64(3398254586,519332801),new $Uint64(2381705131,3315047567)]),$toNativeArray($kindUint64,[new $Uint64(3174076408,2796649650),new $Uint64(2977131414,3070067635)]),$toNativeArray($kindUint64,[new $Uint64(2893853686,3495812062),new $Uint64(3721414268,1690100896)]),$toNativeArray($kindUint64,[new $Uint64(1808658554,1111140715),new $Uint64(2325883917,3203796708)]),$toNativeArray($kindUint64,[new $Uint64(2260823192,3536409542),new $Uint64(2907354897,783520413)]),$toNativeArray($kindUint64,[new $Uint64(3899770815,125544631),new $Uint64(3634193621,2053142340)]),$toNativeArray($kindUint64,[new $Uint64(289873111,1689078130),new $Uint64(2271371013,1820084875)]),$toNativeArray($kindUint64,[new $Uint64(3583566861,1037605839),new $Uint64(2839213766,3348847917)]),$toNativeArray($kindUint64,[new $Uint64(1258233104,2370749123),new $Uint64(3549017208,2038576249)]),$toNativeArray($kindUint64,[new $Uint64(3470750250,1481718202),new $Uint64(2218135755,1274110155)]),$toNativeArray($kindUint64,[new $Uint64(3264695988,3999631400),new $Uint64(2772669694,518895870)]),$toNativeArray($kindUint64,[new $Uint64(1933386338,704571954),new $Uint64(3465837117,2796103486)]),$toNativeArray($kindUint64,[new $Uint64(134624637,1514099295),new $Uint64(2166148198,2284435591)]),$toNativeArray($kindUint64,[new $Uint64(3389506268,2966365943),new $Uint64(2707685248,708060840)]),$toNativeArray($kindUint64,[new $Uint64(4236882835,3707957429),new $Uint64(3384606560,885076050)]),$toNativeArray($kindUint64,[new $Uint64(3148619896,3561204962),new $Uint64(4230758200,1106345063)]),$toNativeArray($kindUint64,[new $Uint64(3578500171,2225753101),new $Uint64(2644223875,691465664)]),$toNativeArray($kindUint64,[new $Uint64(178157918,1708449553),new $Uint64(3305279843,4085557553)]),$toNativeArray($kindUint64,[new $Uint64(1296439221,4283045589),new $Uint64(4131599804,4033205117)]),$toNativeArray($kindUint64,[new $Uint64(1347145425,3213774405),new $Uint64(2582249878,373269550)]),$toNativeArray($kindUint64,[new $Uint64(3831415430,795992534),new $Uint64(3227812347,2614070585)]),$toNativeArray($kindUint64,[new $Uint64(1568043815,3142474316),new $Uint64(4034765434,2193846408)]),$toNativeArray($kindUint64,[new $Uint64(980027384,3574659183),new $Uint64(2521728396,2444895829)]),$toNativeArray($kindUint64,[new $Uint64(2298776055,173356683),new $Uint64(3152160495,3056119786)]),$toNativeArray($kindUint64,[new $Uint64(725986420,3437921326),new $Uint64(3940200619,2746407909)]),$toNativeArray($kindUint64,[new $Uint64(990612425,1217181),new $Uint64(2462625387,1179634031)]),$toNativeArray($kindUint64,[new $Uint64(164523707,1075263300),new $Uint64(3078281734,400800715)]),$toNativeArray($kindUint64,[new $Uint64(3426880106,270337301),new $Uint64(3847852167,2648484541)]),$toNativeArray($kindUint64,[new $Uint64(2678670978,1242702637),new $Uint64(2404907604,3265915574)]),$toNativeArray($kindUint64,[new $Uint64(1200855074,3700861945),new $Uint64(3006134505,4082394468)]),$toNativeArray($kindUint64,[new $Uint64(1501068843,2478593783),new $Uint64(3757668132,1881767613)]),$toNativeArray($kindUint64,[new $Uint64(1475038939,1012250202),new $Uint64(2348542582,3323588406)]),$toNativeArray($kindUint64,[new $Uint64(3991282322,191570929),new $Uint64(2935678228,2007001859)]),$toNativeArray($kindUint64,[new $Uint64(3915361078,2386947309),new $Uint64(3669597785,2508752324)]),$toNativeArray($kindUint64,[new $Uint64(299617026,418100244),new $Uint64(2293498615,4252324763)]),$toNativeArray($kindUint64,[new $Uint64(3595746754,2670108953),new $Uint64(2866873269,4241664129)]),$toNativeArray($kindUint64,[new $Uint64(1273457971,1190152543),new $Uint64(3583591587,2080854690)]),$toNativeArray($kindUint64,[new $Uint64(1869653056,206974427),new $Uint64(2239744742,763663269)]),$toNativeArray($kindUint64,[new $Uint64(3410808144,258718034),new $Uint64(2799680927,3102062734)]),$toNativeArray($kindUint64,[new $Uint64(2116026532,323397543),new $Uint64(3499601159,2803836594)]),$toNativeArray($kindUint64,[new $Uint64(2396258406,2349607112),new $Uint64(2187250724,3363010607)]),$toNativeArray($kindUint64,[new $Uint64(1921581184,789525242),new $Uint64(2734063405,4203763259)]),$toNativeArray($kindUint64,[new $Uint64(1328234656,986906553),new $Uint64(3417579257,2033478602)]),$toNativeArray($kindUint64,[new $Uint64(3807776968,1233633192),new $Uint64(4271974071,3615590076)]),$toNativeArray($kindUint64,[new $Uint64(232376957,771020745),new $Uint64(2669983794,3870356534)]),$toNativeArray($kindUint64,[new $Uint64(2437954844,2037517755),new $Uint64(3337479743,2690462019)]),$toNativeArray($kindUint64,[new $Uint64(1973701731,2546897194),new $Uint64(4171849679,2289335700)]),$toNativeArray($kindUint64,[new $Uint64(3381047230,1054939834),new $Uint64(2607406049,3041447548)]),$toNativeArray($kindUint64,[new $Uint64(4226309037,3466158440),new $Uint64(3259257562,580583963)]),$toNativeArray($kindUint64,[new $Uint64(4209144473,1111472579),new $Uint64(4074071952,2873213602)]),$toNativeArray($kindUint64,[new $Uint64(3704457119,3379024922),new $Uint64(2546294970,1795758501)]),$toNativeArray($kindUint64,[new $Uint64(1409345927,3150039328),new $Uint64(3182868713,97214479)]),$toNativeArray($kindUint64,[new $Uint64(687940585,2863807336),new $Uint64(3978585891,1195259923)]),$toNativeArray($kindUint64,[new $Uint64(4188059250,179266849),new $Uint64(2486616182,210166539)]),$toNativeArray($kindUint64,[new $Uint64(4161332238,2371567209),new $Uint64(3108270227,2410191822)]),$toNativeArray($kindUint64,[new $Uint64(3054181650,816975364),new $Uint64(3885337784,1938997954)]),$toNativeArray($kindUint64,[new $Uint64(2982605355,1584351426),new $Uint64(2428336115,1211873721)]),$toNativeArray($kindUint64,[new $Uint64(507031222,906697459),new $Uint64(3035420144,441100328)]),$toNativeArray($kindUint64,[new $Uint64(633789027,3280855472),new $Uint64(3794275180,551375410)]),$toNativeArray($kindUint64,[new $Uint64(1469859966,1513663758),new $Uint64(2371421987,2492093279)]),$toNativeArray($kindUint64,[new $Uint64(763583133,4039563345),new $Uint64(2964277484,2041374775)]),$toNativeArray($kindUint64,[new $Uint64(4175704389,1828228709),new $Uint64(3705346855,2551718468)]),$toNativeArray($kindUint64,[new $Uint64(462331595,1679513855),new $Uint64(2315841784,3205436779)]),$toNativeArray($kindUint64,[new $Uint64(3799139966,1025650495),new $Uint64(2894802230,4006795973)]),$toNativeArray($kindUint64,[new $Uint64(1527699485,3429546767),new $Uint64(3618502788,2861011319)]),$toNativeArray($kindUint64,[new $Uint64(2565424914,2680337641),new $Uint64(2261564242,3935615722)]),$toNativeArray($kindUint64,[new $Uint64(1059297495,1202938404),new $Uint64(2826955303,2772036005)]),$toNativeArray($kindUint64,[new $Uint64(2397863693,429931181),new $Uint64(3533694129,2391303182)]),$toNativeArray($kindUint64,[new $Uint64(424922984,805577900),new $Uint64(2208558830,4178919049)]),$toNativeArray($kindUint64,[new $Uint64(1604895554,1006972375),new $Uint64(2760698538,3076165163)]),$toNativeArray($kindUint64,[new $Uint64(932377618,3406199117),new $Uint64(3450873173,1697722806)]),$toNativeArray($kindUint64,[new $Uint64(3803961483,3202616272),new $Uint64(2156795733,1597947665)]),$toNativeArray($kindUint64,[new $Uint64(1533726382,2929528516),new $Uint64(2695994666,3071176406)]),$toNativeArray($kindUint64,[new $Uint64(4064641626,1514426997),new $Uint64(3369993333,1691486859)]),$toNativeArray($kindUint64,[new $Uint64(4007060208,4040517394),new $Uint64(4212491666,3188100398)]),$toNativeArray($kindUint64,[new $Uint64(1430670806,2525323371),new $Uint64(2632807291,3066304573)]),$toNativeArray($kindUint64,[new $Uint64(2862080332,1009170566),new $Uint64(3291009114,2759138892)]),$toNativeArray($kindUint64,[new $Uint64(3577600415,1261463208),new $Uint64(4113761393,1301439967)]),$toNativeArray($kindUint64,[new $Uint64(3846612995,2399027241),new $Uint64(2571100870,3497754539)]),$toNativeArray($kindUint64,[new $Uint64(3734524420,1925042227),new $Uint64(3213876088,2224709526)]),$toNativeArray($kindUint64,[new $Uint64(2520671877,2406302784),new $Uint64(4017345110,2780886908)]),$toNativeArray($kindUint64,[new $Uint64(3722903571,2040810152),new $Uint64(2510840694,664312493)]),$toNativeArray($kindUint64,[new $Uint64(1432403992,1477270866),new $Uint64(3138550867,2977874265)]),$toNativeArray($kindUint64,[new $Uint64(2864246814,1846588582),new $Uint64(3923188584,2648601007)]),$toNativeArray($kindUint64,[new $Uint64(3400766995,80376040),new $Uint64(2451992865,1655375629)]),$toNativeArray($kindUint64,[new $Uint64(1029733271,3321695522),new $Uint64(3064991081,3142961361)]),$toNativeArray($kindUint64,[new $Uint64(2360908413,3078377578),new $Uint64(3831238852,707476229)]),$toNativeArray($kindUint64,[new $Uint64(2012438670,2460856898),new $Uint64(2394524282,2589656291)]),$toNativeArray($kindUint64,[new $Uint64(1441806514,928587475),new $Uint64(2993155353,1089586716)]),$toNativeArray($kindUint64,[new $Uint64(1802258142,3308217992),new $Uint64(3741444191,2435725219)]),$toNativeArray($kindUint64,[new $Uint64(589540427,993894421),new $Uint64(2338402619,3132940998)]),$toNativeArray($kindUint64,[new $Uint64(2884409182,168626202),new $Uint64(2923003274,2842434423)]),$toNativeArray($kindUint64,[new $Uint64(2531769653,2358266401),new $Uint64(3653754093,1405559381)]),$toNativeArray($kindUint64,[new $Uint64(2119226945,2010787412),new $Uint64(2283596308,1415345525)]),$toNativeArray($kindUint64,[new $Uint64(3722775505,3587226089),new $Uint64(2854495385,1769181906)]),$toNativeArray($kindUint64,[new $Uint64(2505985734,1262807140),new $Uint64(3568119231,3285219207)]),$toNativeArray($kindUint64,[new $Uint64(3176853819,4010479934),new $Uint64(2230074519,3663874740)]),$toNativeArray($kindUint64,[new $Uint64(3971067274,3939358094),new $Uint64(2787593149,3506101601)]),$toNativeArray($kindUint64,[new $Uint64(1742608621,2776713970),new $Uint64(3484491437,1161401530)]),$toNativeArray($kindUint64,[new $Uint64(2162872212,2272317143),new $Uint64(2177807148,1262746868)]),$toNativeArray($kindUint64,[new $Uint64(2703590265,2840396429),new $Uint64(2722258935,1578433585)]),$toNativeArray($kindUint64,[new $Uint64(158262360,329270064),new $Uint64(3402823669,899300158)]),$toNativeArray($kindUint64,[new $Uint64(2345311598,411587580),new $Uint64(4253529586,2197867021)]),$toNativeArray($kindUint64,[new $Uint64(2002690660,3478467709),new $Uint64(2658455991,2447408712)]),$toNativeArray($kindUint64,[new $Uint64(2503363326,53117341),new $Uint64(3323069989,1985519066)]),$toNativeArray($kindUint64,[new $Uint64(981720509,2213880324),new $Uint64(4153837486,3555640657)]),$toNativeArray($kindUint64,[new $Uint64(3297929878,1920546114),new $Uint64(2596148429,1148533586)]),$toNativeArray($kindUint64,[new $Uint64(1974928700,253198995),new $Uint64(3245185536,2509408807)]),$toNativeArray($kindUint64,[new $Uint64(1394919051,316498744),new $Uint64(4056481920,3136761009)]),$toNativeArray($kindUint64,[new $Uint64(3556178966,3955908099),new $Uint64(2535301200,1960475630)]),$toNativeArray($kindUint64,[new $Uint64(2297740060,2797401476),new $Uint64(3169126500,2450594538)]),$toNativeArray($kindUint64,[new $Uint64(724691427,3496751845),new $Uint64(3961408125,3063243173)]),$toNativeArray($kindUint64,[new $Uint64(989803054,1648598991),new $Uint64(2475880078,2451397895)]),$toNativeArray($kindUint64,[new $Uint64(163511993,4208232386),new $Uint64(3094850098,916763721)]),$toNativeArray($kindUint64,[new $Uint64(1278131816,2039065011),new $Uint64(3868562622,3293438299)]),$toNativeArray($kindUint64,[new $Uint64(261961473,1274415632),new $Uint64(2417851639,984657113)]),$toNativeArray($kindUint64,[new $Uint64(1401193665,2666761364),new $Uint64(3022314549,157079567)]),$toNativeArray($kindUint64,[new $Uint64(677750258,112226233),new $Uint64(3777893186,1270091283)]),$toNativeArray($kindUint64,[new $Uint64(4181690295,1143883219),new $Uint64(2361183241,1867548875)]),$toNativeArray($kindUint64,[new $Uint64(4153371045,356112200),new $Uint64(2951479051,3408177918)]),$toNativeArray($kindUint64,[new $Uint64(3044230158,1518882075),new $Uint64(3689348814,3186480574)]),$toNativeArray($kindUint64,[new $Uint64(828902024,4170526768),new $Uint64(2305843009,917808535)]),$toNativeArray($kindUint64,[new $Uint64(4257353003,918191165),new $Uint64(2882303761,2221002492)]),$toNativeArray($kindUint64,[new $Uint64(1026723958,73997132),new $Uint64(3602879701,3849994940)]),$toNativeArray($kindUint64,[new $Uint64(2789186121,3267473679),new $Uint64(2251799813,2943117749)]),$toNativeArray($kindUint64,[new $Uint64(265257180,863116627),new $Uint64(2814749767,457671715)]),$toNativeArray($kindUint64,[new $Uint64(3552796947,1078895784),new $Uint64(3518437208,3793315115)]),$toNativeArray($kindUint64,[new $Uint64(1683627180,137438953),new $Uint64(2199023255,2370821947)]),$toNativeArray($kindUint64,[new $Uint64(1030792151,171798691),new $Uint64(2748779069,1889785610)]),$toNativeArray($kindUint64,[new $Uint64(3435973836,3435973836),new $Uint64(3435973836,3435973836)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2147483648,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2684354560,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3355443200,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(4194304000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2621440000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3276800000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(4096000000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2560000000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3200000000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(4000000000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2500000000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3125000000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3906250000,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2441406250,0)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3051757812,2147483648)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3814697265,2684354560)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2384185791,67108864)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2980232238,3305111552)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3725290298,1983905792)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2328306436,2313682944)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2910383045,2892103680)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3637978807,393904128)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2273736754,1856802816)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2842170943,173519872)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3552713678,3438125312)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2220446049,1075086496)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(2775557561,2417599944)]),$toNativeArray($kindUint64,[new $Uint64(0,0),new $Uint64(3469446951,4095741754)]),$toNativeArray($kindUint64,[new $Uint64(1073741824,0),new $Uint64(2168404344,4170451332)]),$toNativeArray($kindUint64,[new $Uint64(1342177280,0),new $Uint64(2710505431,918096869)]),$toNativeArray($kindUint64,[new $Uint64(2751463424,0),new $Uint64(3388131789,73879262)]),$toNativeArray($kindUint64,[new $Uint64(1291845632,0),new $Uint64(4235164736,1166090902)]),$toNativeArray($kindUint64,[new $Uint64(4028628992,0),new $Uint64(2646977960,728806813)]),$toNativeArray($kindUint64,[new $Uint64(1814560768,0),new $Uint64(3308722450,911008517)]),$toNativeArray($kindUint64,[new $Uint64(3341942784,0),new $Uint64(4135903062,3286244294)]),$toNativeArray($kindUint64,[new $Uint64(1014972416,0),new $Uint64(2584939414,980160860)]),$toNativeArray($kindUint64,[new $Uint64(1268715520,0),new $Uint64(3231174267,3372684723)]),$toNativeArray($kindUint64,[new $Uint64(512152576,0),new $Uint64(4038967834,3142114080)]),$toNativeArray($kindUint64,[new $Uint64(320095360,0),new $Uint64(2524354896,3037563124)]),$toNativeArray($kindUint64,[new $Uint64(400119200,0),new $Uint64(3155443620,3796953905)]),$toNativeArray($kindUint64,[new $Uint64(1573890824,0),new $Uint64(3944304526,451225085)]),$toNativeArray($kindUint64,[new $Uint64(1520552677,0),new $Uint64(2465190328,3503241150)]),$toNativeArray($kindUint64,[new $Uint64(4048174494,1073741824),new $Uint64(3081487911,84084141)]),$toNativeArray($kindUint64,[new $Uint64(1838992645,3489660928),new $Uint64(3851859888,3326330649)]),$toNativeArray($kindUint64,[new $Uint64(3833724963,2717908992),new $Uint64(2407412430,2078956655)]),$toNativeArray($kindUint64,[new $Uint64(3718414380,2323644416),new $Uint64(3009265538,451212171)]),$toNativeArray($kindUint64,[new $Uint64(3574276151,2904555520),new $Uint64(3761581922,2711498862)]),$toNativeArray($kindUint64,[new $Uint64(1160180770,3425959936),new $Uint64(2350988701,2768428613)]),$toNativeArray($kindUint64,[new $Uint64(2523967787,2134966272),new $Uint64(2938735877,239310294)]),$toNativeArray($kindUint64,[new $Uint64(1007476086,1594966016),new $Uint64(3673419846,1372879692)]),$toNativeArray($kindUint64,[new $Uint64(2777156201,4218079232),new $Uint64(2295887403,4079275279)]),$toNativeArray($kindUint64,[new $Uint64(2397703428,2051373568),new $Uint64(2869859254,4025352275)]),$toNativeArray($kindUint64,[new $Uint64(1923387461,2564216960),new $Uint64(3587324068,2884206696)]),$toNativeArray($kindUint64,[new $Uint64(1202117163,2139506512),new $Uint64(2242077542,3950112833)]),$toNativeArray($kindUint64,[new $Uint64(2576388278,1600641316),new $Uint64(2802596928,2790157393)]),$toNativeArray($kindUint64,[new $Uint64(4294227171,4148285293),new $Uint64(3503246160,3487696741)]),$toNativeArray($kindUint64,[new $Uint64(3220762894,2055807396),new $Uint64(2189528850,2179810463)]),$toNativeArray($kindUint64,[new $Uint64(2952211794,422275597),new $Uint64(2736911063,577279431)]),$toNativeArray($kindUint64,[new $Uint64(2616522918,2675328144),new $Uint64(3421138828,3942824761)]),$toNativeArray($kindUint64,[new $Uint64(49428176,1196676532),new $Uint64(4276423536,633563656)]),$toNativeArray($kindUint64,[new $Uint64(30892610,747922832),new $Uint64(2672764710,395977285)]),$toNativeArray($kindUint64,[new $Uint64(1112357586,3082387189),new $Uint64(3340955887,2642455254)]),$toNativeArray($kindUint64,[new $Uint64(3537930631,1705500338),new $Uint64(4176194859,2229327243)]),$toNativeArray($kindUint64,[new $Uint64(1674335732,2676550447),new $Uint64(2610121787,856458615)]),$toNativeArray($kindUint64,[new $Uint64(1019177841,3345688059),new $Uint64(3262652233,4291798741)]),$toNativeArray($kindUint64,[new $Uint64(2347714126,960884602),new $Uint64(4078315292,2143522954)]),$toNativeArray($kindUint64,[new $Uint64(2541063152,3821778348),new $Uint64(2548947057,3487185494)]),$toNativeArray($kindUint64,[new $Uint64(1028845293,482255639),new $Uint64(3186183822,1137756396)]),$toNativeArray($kindUint64,[new $Uint64(1286056616,1676561373),new $Uint64(3982729777,3569679143)]),$toNativeArray($kindUint64,[new $Uint64(2414398121,1047850858),new $Uint64(2489206111,620436728)]),$toNativeArray($kindUint64,[new $Uint64(3017997651,2383555396),new $Uint64(3111507638,3996771382)]),$toNativeArray($kindUint64,[new $Uint64(1625013416,1905702422),new $Uint64(3889384548,2848480580)]),$toNativeArray($kindUint64,[new $Uint64(3163117033,1191064013),new $Uint64(2430865342,3927784010)]),$toNativeArray($kindUint64,[new $Uint64(1806412643,2562571841),new $Uint64(3038581678,2762246365)]),$toNativeArray($kindUint64,[new $Uint64(3331757628,2129472977),new $Uint64(3798227098,1305324308)]),$toNativeArray($kindUint64,[new $Uint64(4229832165,3478404258),new $Uint64(2373891936,1889569516)]),$toNativeArray($kindUint64,[new $Uint64(992322911,1126779851),new $Uint64(2967364920,2361961896)]),$toNativeArray($kindUint64,[new $Uint64(1240403639,334732990),new $Uint64(3709206150,2952452370)]),$toNativeArray($kindUint64,[new $Uint64(1848994098,1819820855),new $Uint64(2318253844,771540907)]),$toNativeArray($kindUint64,[new $Uint64(1237500799,127292420),new $Uint64(2897817305,964426134)]),$toNativeArray($kindUint64,[new $Uint64(3694359646,3380340998),new $Uint64(3622271631,2279274491)]),$toNativeArray($kindUint64,[new $Uint64(1772103867,1038971299),new $Uint64(2263919769,3035159293)]),$toNativeArray($kindUint64,[new $Uint64(3288871658,224972300),new $Uint64(2829899712,572723644)]),$toNativeArray($kindUint64,[new $Uint64(4111089572,2428699024),new $Uint64(3537374640,715904555)]),$toNativeArray($kindUint64,[new $Uint64(2032560070,3665420538),new $Uint64(2210859150,447440347)]),$toNativeArray($kindUint64,[new $Uint64(1466958264,2434292024),new $Uint64(2763573937,2706784082)]),$toNativeArray($kindUint64,[new $Uint64(3981181478,3042865030),new $Uint64(3454467422,162254630)]),$toNativeArray($kindUint64,[new $Uint64(1414496600,828048820),new $Uint64(2159042138,3322634616)]),$toNativeArray($kindUint64,[new $Uint64(1768120750,1035061025),new $Uint64(2698802673,2005809622)]),$toNativeArray($kindUint64,[new $Uint64(62667289,3441309929),new $Uint64(3373503341,3581003852)]),$toNativeArray($kindUint64,[new $Uint64(78334112,1080411939),new $Uint64(4216879177,1255029343)]),$toNativeArray($kindUint64,[new $Uint64(1659571556,675257462),new $Uint64(2635549485,3468747899)]),$toNativeArray($kindUint64,[new $Uint64(1000722621,844071828),new $Uint64(3294436857,1114709402)]),$toNativeArray($kindUint64,[new $Uint64(3398386924,2128831609),new $Uint64(4118046071,2467128576)]),$toNativeArray($kindUint64,[new $Uint64(2123991827,3478003403),new $Uint64(2573778794,3152568096)]),$toNativeArray($kindUint64,[new $Uint64(2654989784,3273762430),new $Uint64(3217223493,1793226472)]),$toNativeArray($kindUint64,[new $Uint64(3318737230,4092203038),new $Uint64(4021529366,3315274914)]),$toNativeArray($kindUint64,[new $Uint64(3147952593,1483885074),new $Uint64(2513455854,998304997)]),$toNativeArray($kindUint64,[new $Uint64(713715269,2928598167),new $Uint64(3141819817,3395364895)]),$toNativeArray($kindUint64,[new $Uint64(4113369559,439522237),new $Uint64(3927274772,1022980646)]),$toNativeArray($kindUint64,[new $Uint64(1497114150,1885314134),new $Uint64(2454546732,2786846552)]),$toNativeArray($kindUint64,[new $Uint64(1871392688,209159020),new $Uint64(3068183415,3483558190)]),$toNativeArray($kindUint64,[new $Uint64(191757212,261448775),new $Uint64(3835229269,3280705914)]),$toNativeArray($kindUint64,[new $Uint64(1193590081,2310889132),new $Uint64(2397018293,2587312108)]),$toNativeArray($kindUint64,[new $Uint64(1491987601,3962353239),new $Uint64(2996272867,12914663)]),$toNativeArray($kindUint64,[new $Uint64(791242678,1731716077),new $Uint64(3745341083,3237368801)]),$toNativeArray($kindUint64,[new $Uint64(3178881234,8580724),new $Uint64(2340838177,1486484588)]),$toNativeArray($kindUint64,[new $Uint64(3973601542,2158209553),new $Uint64(2926047721,2931847559)]),$toNativeArray($kindUint64,[new $Uint64(3893260104,550278293),new $Uint64(3657559652,443583977)]),$toNativeArray($kindUint64,[new $Uint64(822674829,343923933),new $Uint64(2285974782,2424723634)]),$toNativeArray($kindUint64,[new $Uint64(3175827184,1503646741),new $Uint64(2857468478,883420894)]),$toNativeArray($kindUint64,[new $Uint64(1822300332,1879558426),new $Uint64(3571835597,3251759766)]),$toNativeArray($kindUint64,[new $Uint64(65195883,3322207664),new $Uint64(2232397248,2569220766)]),$toNativeArray($kindUint64,[new $Uint64(2228978502,3079017756),new $Uint64(2790496560,3211525957)]),$toNativeArray($kindUint64,[new $Uint64(3859964952,1701288547),new $Uint64(3488120700,4014407446)]),$toNativeArray($kindUint64,[new $Uint64(1338736271,1063305342),new $Uint64(2180075438,361521006)]),$toNativeArray($kindUint64,[new $Uint64(3820903987,255389853),new $Uint64(2725094297,2599384905)]),$toNativeArray($kindUint64,[new $Uint64(1554904511,3540462789),new $Uint64(3406367872,28005660)]),$toNativeArray($kindUint64,[new $Uint64(1943630639,3351836662),new $Uint64(4257959840,35007075)]),$toNativeArray($kindUint64,[new $Uint64(677898237,3705510650),new $Uint64(2661224900,21879422)]),$toNativeArray($kindUint64,[new $Uint64(2994856445,1410662840),new $Uint64(3326531125,27349277)]),$toNativeArray($kindUint64,[new $Uint64(522345084,2837070374),new $Uint64(4158163906,1107928421)]),$toNativeArray($kindUint64,[new $Uint64(863336589,3920652632),new $Uint64(2598852441,1766197087)]),$toNativeArray($kindUint64,[new $Uint64(5428913,1679590318),new $Uint64(3248565551,3281488183)]),$toNativeArray($kindUint64,[new $Uint64(3228011613,3173229722),new $Uint64(4060706939,3028118404)]),$toNativeArray($kindUint64,[new $Uint64(4164990906,2520139488),new $Uint64(2537941837,1355703090)]),$toNativeArray($kindUint64,[new $Uint64(3058754985,1002690712),new $Uint64(3172427296,2768370687)]),$toNativeArray($kindUint64,[new $Uint64(2749701907,2327105214),new $Uint64(3965534120,3460463359)]),$toNativeArray($kindUint64,[new $Uint64(3329176428,917569847),new $Uint64(2478458825,2162789599)]),$toNativeArray($kindUint64,[new $Uint64(3087728711,1146962308),new $Uint64(3098073531,3777228823)]),$toNativeArray($kindUint64,[new $Uint64(2785919065,359961061),new $Uint64(3872591914,3647794205)]),$toNativeArray($kindUint64,[new $Uint64(2278070327,2909330223),new $Uint64(2420369946,3353613202)]),$toNativeArray($kindUint64,[new $Uint64(700104261,2562920955),new $Uint64(3025462433,2044532855)]),$toNativeArray($kindUint64,[new $Uint64(4096355798,4277393018),new $Uint64(3781828041,3629407892)]),$toNativeArray($kindUint64,[new $Uint64(412738726,1599628812),new $Uint64(2363642526,657767197)]),$toNativeArray($kindUint64,[new $Uint64(1589665231,4147019663),new $Uint64(2954553157,2969692644)]),$toNativeArray($kindUint64,[new $Uint64(1987081539,4110032755),new $Uint64(3693191447,490890333)]),$toNativeArray($kindUint64,[new $Uint64(1778796874,2031899560),new $Uint64(2308244654,1917419194)]),$toNativeArray($kindUint64,[new $Uint64(76012445,392390802),new $Uint64(2885305818,249290345)]),$toNativeArray($kindUint64,[new $Uint64(1168757380,1564230326),new $Uint64(3606632272,2459096579)]),$toNativeArray($kindUint64,[new $Uint64(193602450,3125127602),new $Uint64(2254145170,1536935362)]),$toNativeArray($kindUint64,[new $Uint64(2389486711,1758925854),new $Uint64(2817681462,4068652850)]),$toNativeArray($kindUint64,[new $Uint64(839374741,1124915494),new $Uint64(3522101828,2938332415)]),$toNativeArray($kindUint64,[new $Uint64(2135221949,1239943096),new $Uint64(2201313642,3983941407)]),$toNativeArray($kindUint64,[new $Uint64(1595285612,2623670694),new $Uint64(2751642053,2832443111)]),$toNativeArray($kindUint64,[new $Uint64(920365191,3279588367),new $Uint64(3439552567,319328417)]),$toNativeArray($kindUint64,[new $Uint64(3259582804,3660355465),new $Uint64(2149720354,1810192996)]),$toNativeArray($kindUint64,[new $Uint64(4074478506,280477036),new $Uint64(2687150443,115257597)]),$toNativeArray($kindUint64,[new $Uint64(1871872660,2498079943),new $Uint64(3358938053,3365297469)]),$toNativeArray($kindUint64,[new $Uint64(3413582649,3122599929),new $Uint64(4198672567,985396364)]),$toNativeArray($kindUint64,[new $Uint64(4280972804,341012219),new $Uint64(2624170354,2226485463)]),$toNativeArray($kindUint64,[new $Uint64(4277474181,426265274),new $Uint64(3280212943,635623181)]),$toNativeArray($kindUint64,[new $Uint64(2125617254,1606573417),new $Uint64(4100266178,4015754449)]),$toNativeArray($kindUint64,[new $Uint64(4012865343,4225333857),new $Uint64(2562666361,3583588354)]),$toNativeArray($kindUint64,[new $Uint64(2868598031,4207925498),new $Uint64(3203332952,1258259971)]),$toNativeArray($kindUint64,[new $Uint64(2512005715,4186165048),new $Uint64(4004166190,1572824964)]),$toNativeArray($kindUint64,[new $Uint64(3717487220,2079482243),new $Uint64(2502603868,4204241074)]),$toNativeArray($kindUint64,[new $Uint64(2499375377,2599352804),new $Uint64(3128254836,960334047)]),$toNativeArray($kindUint64,[new $Uint64(2050477398,27965533),new $Uint64(3910318545,1200417559)]),$toNativeArray($kindUint64,[new $Uint64(2892161109,3238703930),new $Uint64(2443949090,3434615534)]),$toNativeArray($kindUint64,[new $Uint64(1467717739,827154441),new $Uint64(3054936363,2145785770)]),$toNativeArray($kindUint64,[new $Uint64(3982130821,4255168523),new $Uint64(3818670454,1608490388)]),$toNativeArray($kindUint64,[new $Uint64(341348115,3196351239),new $Uint64(2386669033,4226531965)]),$toNativeArray($kindUint64,[new $Uint64(1500426968,2921697224),new $Uint64(2983336292,2061939484)]),$toNativeArray($kindUint64,[new $Uint64(1875533710,3652121531),new $Uint64(3729170365,2577424355)]),$toNativeArray($kindUint64,[new $Uint64(635337657,1208834132),new $Uint64(2330731478,2147761134)]),$toNativeArray($kindUint64,[new $Uint64(2941655719,2584784490),new $Uint64(2913414348,537217769)]),$toNativeArray($kindUint64,[new $Uint64(455844177,2157238788),new $Uint64(3641767935,671522212)]),$toNativeArray($kindUint64,[new $Uint64(2432386258,4032628802),new $Uint64(2276104959,2030314118)]),$toNativeArray($kindUint64,[new $Uint64(892999175,2893302355),new $Uint64(2845131199,1464150824)]),$toNativeArray($kindUint64,[new $Uint64(1116248969,2542886120),new $Uint64(3556413999,756446706)]),$toNativeArray($kindUint64,[new $Uint64(1771397429,4273658385),new $Uint64(2222758749,2083391927)]),$toNativeArray($kindUint64,[new $Uint64(1140504963,2120847509),new $Uint64(2778448436,3677981733)]),$toNativeArray($kindUint64,[new $Uint64(2499373028,1577317563),new $Uint64(3473060546,302509870)]),$toNativeArray($kindUint64,[new $Uint64(488366318,3133307125),new $Uint64(2170662841,1262810493)]),$toNativeArray($kindUint64,[new $Uint64(1684199722,1769150258),new $Uint64(2713328551,2652254940)]),$toNativeArray($kindUint64,[new $Uint64(2105249653,63954174),new $Uint64(3391660689,2241576851)]),$toNativeArray($kindUint64,[new $Uint64(1557820242,1153684542),new $Uint64(4239575861,3875712888)]),$toNativeArray($kindUint64,[new $Uint64(973637651,1794794663),new $Uint64(2649734913,2959191467)]),$toNativeArray($kindUint64,[new $Uint64(143305240,1169751504),new $Uint64(3312168642,477763862)]),$toNativeArray($kindUint64,[new $Uint64(2326615198,1462189381),new $Uint64(4140210802,2744688475)]),$toNativeArray($kindUint64,[new $Uint64(917263586,4135093835),new $Uint64(2587631751,2789172121)]),$toNativeArray($kindUint64,[new $Uint64(2220321307,3021383645),new $Uint64(3234539689,2412723327)]),$toNativeArray($kindUint64,[new $Uint64(1701659810,2702987733),new $Uint64(4043174611,4089645983)]),$toNativeArray($kindUint64,[new $Uint64(2674150117,2763109157),new $Uint64(2526984132,2019157827)]),$toNativeArray($kindUint64,[new $Uint64(2268945823,232660974),new $Uint64(3158730165,2523947284)]),$toNativeArray($kindUint64,[new $Uint64(2836182278,3512051690),new $Uint64(3948412706,4228675929)]),$toNativeArray($kindUint64,[new $Uint64(162001188,1121290482),new $Uint64(2467757941,3716664280)]),$toNativeArray($kindUint64,[new $Uint64(202501485,1401613103),new $Uint64(3084697427,1424604878)]),$toNativeArray($kindUint64,[new $Uint64(2400610504,2825758202),new $Uint64(3855871784,707014273)]),$toNativeArray($kindUint64,[new $Uint64(4184736125,1766098876),new $Uint64(2409919865,441883920)]),$toNativeArray($kindUint64,[new $Uint64(935952860,3281365420),new $Uint64(3012399831,1626096725)]),$toNativeArray($kindUint64,[new $Uint64(2243682899,4101706775),new $Uint64(3765499789,958879082)]),$toNativeArray($kindUint64,[new $Uint64(2476043636,2026695822),new $Uint64(2353437368,1136170338)]),$toNativeArray($kindUint64,[new $Uint64(947570897,2533369778),new $Uint64(2941796710,1420212923)]),$toNativeArray($kindUint64,[new $Uint64(110721797,4240454046),new $Uint64(3677245887,3922749802)]),$toNativeArray($kindUint64,[new $Uint64(1142942947,3187154691),new $Uint64(2298278679,4062331362)]),$toNativeArray($kindUint64,[new $Uint64(3576162332,2910201539),new $Uint64(2872848349,4004172378)]),$toNativeArray($kindUint64,[new $Uint64(2322719267,3637751924),new $Uint64(3591060437,1783990001)]),$toNativeArray($kindUint64,[new $Uint64(4136054102,1736724041),new $Uint64(2244412773,1651864662)]),$toNativeArray($kindUint64,[new $Uint64(3022583980,23421403),new $Uint64(2805515966,3138572652)]),$toNativeArray($kindUint64,[new $Uint64(3778229975,29276754),new $Uint64(3506894958,1775732167)]),$toNativeArray($kindUint64,[new $Uint64(3972006470,1628910707),new $Uint64(2191809349,36090780)]),$toNativeArray($kindUint64,[new $Uint64(670040791,4183622032),new $Uint64(2739761686,1118855300)]),$toNativeArray($kindUint64,[new $Uint64(837550989,4155785716),new $Uint64(3424702107,3546052773)]),$toNativeArray($kindUint64,[new $Uint64(2120680561,1973506673),new $Uint64(4280877634,3358824142)]),$toNativeArray($kindUint64,[new $Uint64(251683526,3917796230),new $Uint64(2675548521,3173006913)]),$toNativeArray($kindUint64,[new $Uint64(1388346232,2749761640),new $Uint64(3344435652,745033169)]),$toNativeArray($kindUint64,[new $Uint64(2809174614,3437202050),new $Uint64(4180544565,931291461)]),$toNativeArray($kindUint64,[new $Uint64(2292605046,1074509457),new $Uint64(2612840353,1118928075)]),$toNativeArray($kindUint64,[new $Uint64(1792014483,3490620469),new $Uint64(3266050441,2472401918)]),$toNativeArray($kindUint64,[new $Uint64(92534456,3289533763),new $Uint64(4082563051,4164244222)]),$toNativeArray($kindUint64,[new $Uint64(3279059507,2055958602),new $Uint64(2551601907,2065781726)]),$toNativeArray($kindUint64,[new $Uint64(1951340736,1496206428),new $Uint64(3189502384,1508485334)]),$toNativeArray($kindUint64,[new $Uint64(291692272,1870258035),new $Uint64(3986877980,1885606668)]),$toNativeArray($kindUint64,[new $Uint64(2329791318,1168911272),new $Uint64(2491798737,3325987815)]),$toNativeArray($kindUint64,[new $Uint64(1838497323,3608622738),new $Uint64(3114748422,936259297)]),$toNativeArray($kindUint64,[new $Uint64(3371863478,3437036599),new $Uint64(3893435527,3317807769)]),$toNativeArray($kindUint64,[new $Uint64(496801938,1074406050),new $Uint64(2433397204,3684242592)]),$toNativeArray($kindUint64,[new $Uint64(621002422,3490491211),new $Uint64(3041746506,310335944)]),$toNativeArray($kindUint64,[new $Uint64(776253028,2215630365),new $Uint64(3802183132,2535403578)]),$toNativeArray($kindUint64,[new $Uint64(1558899966,3532252626),new $Uint64(2376364457,3732110884)]),$toNativeArray($kindUint64,[new $Uint64(1948624958,2267832135),new $Uint64(2970455572,1443913133)]),$toNativeArray($kindUint64,[new $Uint64(3509523022,687306521),new $Uint64(3713069465,1804891416)]),$toNativeArray($kindUint64,[new $Uint64(2193451888,3650792047),new $Uint64(2320668415,3812411695)]),$toNativeArray($kindUint64,[new $Uint64(1668073037,268522763),new $Uint64(2900835519,3691772795)]),$toNativeArray($kindUint64,[new $Uint64(1011349472,1409395278),new $Uint64(3626044399,3540974170)]),$toNativeArray($kindUint64,[new $Uint64(1705835244,880872049),new $Uint64(2266277749,3823721592)]),$toNativeArray($kindUint64,[new $Uint64(2132294055,1101090061),new $Uint64(2832847187,1558426518)]),$toNativeArray($kindUint64,[new $Uint64(517883921,302620752),new $Uint64(3541058984,874291324)]),$toNativeArray($kindUint64,[new $Uint64(2471161098,2873492530),new $Uint64(2213161865,546432077)]),$toNativeArray($kindUint64,[new $Uint64(4162693197,1444382015),new $Uint64(2766452331,1756781920)]),$toNativeArray($kindUint64,[new $Uint64(908399200,2879219342),new $Uint64(3458065414,1122235577)]),$toNativeArray($kindUint64,[new $Uint64(3252104060,1799512089),new $Uint64(2161290883,3922622707)]),$toNativeArray($kindUint64,[new $Uint64(2991388251,2249390111),new $Uint64(2701613604,3829536560)]),$toNativeArray($kindUint64,[new $Uint64(3739235314,1737995815),new $Uint64(3377017006,491953404)]),$toNativeArray($kindUint64,[new $Uint64(379076847,25011121),new $Uint64(4221271257,2762425404)]),$toNativeArray($kindUint64,[new $Uint64(2384406677,1626244686),new $Uint64(2638294536,115903141)]),$toNativeArray($kindUint64,[new $Uint64(4054250170,3106547682),new $Uint64(3297868170,144878926)]),$toNativeArray($kindUint64,[new $Uint64(2920329065,1735700955),new $Uint64(4122335212,2328582306)]),$toNativeArray($kindUint64,[new $Uint64(2898947489,3769167657),new $Uint64(2576459507,3602847589)]),$toNativeArray($kindUint64,[new $Uint64(402458890,1490234099),new $Uint64(3220574384,3429817663)]),$toNativeArray($kindUint64,[new $Uint64(3724299084,4010276272),new $Uint64(4025717980,4287272078)]),$toNativeArray($kindUint64,[new $Uint64(1253945104,358939022),new $Uint64(2516073738,532061401)]),$toNativeArray($kindUint64,[new $Uint64(2641173204,448673777),new $Uint64(3145092172,2812560399)]),$toNativeArray($kindUint64,[new $Uint64(2227724681,560842221),new $Uint64(3931365215,3515700499)]),$toNativeArray($kindUint64,[new $Uint64(855457013,3034880948),new $Uint64(2457103259,3807925548)]),$toNativeArray($kindUint64,[new $Uint64(1069321267,572375713),new $Uint64(3071379074,3686165111)]),$toNativeArray($kindUint64,[new $Uint64(262909759,3936695114),new $Uint64(3839223843,2460222741)]),$toNativeArray($kindUint64,[new $Uint64(701189511,4071047182),new $Uint64(2399514902,1000768301)]),$toNativeArray($kindUint64,[new $Uint64(1950228713,4015067154),new $Uint64(2999393627,3398444024)]),$toNativeArray($kindUint64,[new $Uint64(2437785892,1797608470),new $Uint64(3749242034,3174313206)]),$toNativeArray($kindUint64,[new $Uint64(449874358,3270988942),new $Uint64(2343276271,3057687578)]),$toNativeArray($kindUint64,[new $Uint64(2709826596,1941252529),new $Uint64(2929095339,2748367648)]),$toNativeArray($kindUint64,[new $Uint64(3387283245,2426565662),new $Uint64(3661369174,2361717736)]),$toNativeArray($kindUint64,[new $Uint64(2117052028,2053474450),new $Uint64(2288355734,402331761)]),$toNativeArray($kindUint64,[new $Uint64(3720056859,2566843063),new $Uint64(2860444667,2650398349)]),$toNativeArray($kindUint64,[new $Uint64(1428845602,2134812005),new $Uint64(3575555834,2239256113)]),$toNativeArray($kindUint64,[new $Uint64(3577383061,2407999327),new $Uint64(2234722396,2473276894)]),$toNativeArray($kindUint64,[new $Uint64(2324245178,4083740983),new $Uint64(2793402995,3091596118)]),$toNativeArray($kindUint64,[new $Uint64(757822825,2957192581),new $Uint64(3491753744,2790753324)]),$toNativeArray($kindUint64,[new $Uint64(2621122914,237632627),new $Uint64(2182346090,1744220827)]),$toNativeArray($kindUint64,[new $Uint64(2202661818,2444524431),new $Uint64(2727932613,32792386)]),$toNativeArray($kindUint64,[new $Uint64(605843625,908171891),new $Uint64(3409915766,1114732307)]),$toNativeArray($kindUint64,[new $Uint64(3978530003,2208956688),new $Uint64(4262394707,3540899031)]),$toNativeArray($kindUint64,[new $Uint64(4097193988,843727018),new $Uint64(2663996692,1676190982)]),$toNativeArray($kindUint64,[new $Uint64(2974008837,1054658773),new $Uint64(3329995865,2095238728)]),$toNativeArray($kindUint64,[new $Uint64(3717511046,2392065290),new $Uint64(4162494831,3692790234)]),$toNativeArray($kindUint64,[new $Uint64(3397186228,421298982),new $Uint64(2601559269,3918606632)]),$toNativeArray($kindUint64,[new $Uint64(4246482785,526623728),new $Uint64(3251949087,1677032818)]),$toNativeArray($kindUint64,[new $Uint64(3160619833,1732021484),new $Uint64(4064936359,1022549199)]),$toNativeArray($kindUint64,[new $Uint64(3586000131,3766867987),new $Uint64(2540585224,2249705985)]),$toNativeArray($kindUint64,[new $Uint64(1261274692,3634843160),new $Uint64(3175731530,2812132482)]),$toNativeArray($kindUint64,[new $Uint64(3724077014,248586654),new $Uint64(3969664413,1367681954)]),$toNativeArray($kindUint64,[new $Uint64(3401289957,3376592131),new $Uint64(2481040258,1391672133)]),$toNativeArray($kindUint64,[new $Uint64(1030386975,999514691),new $Uint64(3101300322,3887073815)]),$toNativeArray($kindUint64,[new $Uint64(214241895,175651540),new $Uint64(3876625403,2711358621)]),$toNativeArray($kindUint64,[new $Uint64(670772096,1720394949),new $Uint64(2422890877,1157728226)]),$toNativeArray($kindUint64,[new $Uint64(2985948768,2150493686),new $Uint64(3028613596,2520902106)]),$toNativeArray($kindUint64,[new $Uint64(1584952312,2688117107),new $Uint64(3785766995,3151127633)]),$toNativeArray($kindUint64,[new $Uint64(3674949755,1680073192),new $Uint64(2366104372,1432583858)]),$toNativeArray($kindUint64,[new $Uint64(2446203546,1026349666),new $Uint64(2957630465,1790729823)]),$toNativeArray($kindUint64,[new $Uint64(1984012608,3430420731),new $Uint64(3697038081,3312154103)]),$toNativeArray($kindUint64,[new $Uint64(2850620616,2144012957),new $Uint64(2310648801,459483578)]),$toNativeArray($kindUint64,[new $Uint64(1415792122,2680016196),new $Uint64(2888311001,1648096297)]),$toNativeArray($kindUint64,[new $Uint64(2843481977,1202536597),new $Uint64(3610388751,3133862195)]),$toNativeArray($kindUint64,[new $Uint64(1240305323,3435939933),new $Uint64(2256492969,3569276608)]),$toNativeArray($kindUint64,[new $Uint64(1550381654,3221183092),new $Uint64(2820616212,1240370288)]),$toNativeArray($kindUint64,[new $Uint64(1937977068,1878995217),new $Uint64(3525770265,1550462860)]),$toNativeArray($kindUint64,[new $Uint64(3358719315,3321855659),new $Uint64(2203606415,3653393847)]),$toNativeArray($kindUint64,[new $Uint64(3124657320,3078577749),new $Uint64(2754508019,3493000485)]),$toNativeArray($kindUint64,[new $Uint64(684596178,3848222187),new $Uint64(3443135024,3292508783)]),$toNativeArray($kindUint64,[new $Uint64(2038485347,3478880691),new $Uint64(2151959390,2057817989)]),$toNativeArray($kindUint64,[new $Uint64(3621848508,3274859039),new $Uint64(2689949238,424788838)]),$toNativeArray($kindUint64,[new $Uint64(2379826987,4093573799),new $Uint64(3362436547,2678469696)]),$toNativeArray($kindUint64,[new $Uint64(2974783734,4043225425),new $Uint64(4203045684,2274345296)]),$toNativeArray($kindUint64,[new $Uint64(1859239834,1453274067),new $Uint64(2626903552,3568949458)]),$toNativeArray($kindUint64,[new $Uint64(176566144,3964076232),new $Uint64(3283629441,166219527)]),$toNativeArray($kindUint64,[new $Uint64(3441933153,660127994),new $Uint64(4104536801,1281516232)]),$toNativeArray($kindUint64,[new $Uint64(2151208220,3096934556),new $Uint64(2565335500,3485302205)]),$toNativeArray($kindUint64,[new $Uint64(3762752099,3871168195),new $Uint64(3206669376,61660460)]),$toNativeArray($kindUint64,[new $Uint64(408472828,3765218420),new $Uint64(4008336720,77075576)]),$toNativeArray($kindUint64,[new $Uint64(255295518,205777864),new $Uint64(2505210450,48172235)]),$toNativeArray($kindUint64,[new $Uint64(3540344869,2404705978),new $Uint64(3131513062,2207698941)]),$toNativeArray($kindUint64,[new $Uint64(1204205614,4079624297),new $Uint64(3914391328,612140029)]),$toNativeArray($kindUint64,[new $Uint64(1289499421,1476023361),new $Uint64(2446494580,382587518)]),$toNativeArray($kindUint64,[new $Uint64(3759357924,2918771026),new $Uint64(3058118225,478234397)]),$toNativeArray($kindUint64,[new $Uint64(1477971933,3648463782),new $Uint64(3822647781,1671534821)]),$toNativeArray($kindUint64,[new $Uint64(1460603370,2817160776),new $Uint64(2389154863,1581580175)]),$toNativeArray($kindUint64,[new $Uint64(752012389,1373967322),new $Uint64(2986443579,903233395)]),$toNativeArray($kindUint64,[new $Uint64(4161240958,2791200977),new $Uint64(3733054474,55299919)]),$toNativeArray($kindUint64,[new $Uint64(4211388335,670758786),new $Uint64(2333159046,1108304273)]),$toNativeArray($kindUint64,[new $Uint64(2043009946,4059673955),new $Uint64(2916448807,3532863990)]),$toNativeArray($kindUint64,[new $Uint64(406278785,2927108796),new $Uint64(3645561009,3342338164)]),$toNativeArray($kindUint64,[new $Uint64(2401407889,218830261),new $Uint64(2278475631,478348616)]),$toNativeArray($kindUint64,[new $Uint64(3001759861,1347279650),new $Uint64(2848094538,3819161242)]),$toNativeArray($kindUint64,[new $Uint64(1604716178,2757841387),new $Uint64(3560118173,2626467905)]),$toNativeArray($kindUint64,[new $Uint64(3687302171,2797392691),new $Uint64(2225073858,2178413352)]),$toNativeArray($kindUint64,[new $Uint64(314160418,2422999040),new $Uint64(2781342323,575533043)]),$toNativeArray($kindUint64,[new $Uint64(3613925995,881265152),new $Uint64(3476677903,3940641775)]),$toNativeArray($kindUint64,[new $Uint64(3869316483,13919808),new $Uint64(2172923689,4073513845)]),$toNativeArray($kindUint64,[new $Uint64(1615420131,3238625232),new $Uint64(2716154612,1870666835)]),$toNativeArray($kindUint64,[new $Uint64(945533340,2974539716),new $Uint64(3395193265,2338333544)]),$toNativeArray($kindUint64,[new $Uint64(1181916675,3718174645),new $Uint64(4243991581,3996658754)]),$toNativeArray($kindUint64,[new $Uint64(1812439746,1786988241),new $Uint64(2652494738,3034782633)]),$toNativeArray($kindUint64,[new $Uint64(3339291507,86251653),new $Uint64(3315618423,1645994643)]),$toNativeArray($kindUint64,[new $Uint64(3100372559,3329040039),new $Uint64(4144523029,983751480)]),$toNativeArray($kindUint64,[new $Uint64(1937732849,3691262760),new $Uint64(2590326893,1151715587)]),$toNativeArray($kindUint64,[new $Uint64(1348424238,1392852978),new $Uint64(3237908616,2513386308)]),$toNativeArray($kindUint64,[new $Uint64(1685530297,3888549871),new $Uint64(4047385770,3141732885)]),$toNativeArray($kindUint64,[new $Uint64(1590327348,819730933),new $Uint64(2529616106,3037324877)]),$toNativeArray($kindUint64,[new $Uint64(3061651009,1024663666),new $Uint64(3162020133,1649172448)]),$toNativeArray($kindUint64,[new $Uint64(3827063761,2354571407),new $Uint64(3952525166,3135207384)]),$toNativeArray($kindUint64,[new $Uint64(2391914850,4155961689),new $Uint64(2470328229,885762791)]),$toNativeArray($kindUint64,[new $Uint64(1916151739,3047468464),new $Uint64(3087910286,2180945313)]),$toNativeArray($kindUint64,[new $Uint64(3468931498,2735593756),new $Uint64(3859887858,578697993)]),$toNativeArray($kindUint64,[new $Uint64(557469450,2783487921),new $Uint64(2412429911,1435428070)]),$toNativeArray($kindUint64,[new $Uint64(2844320461,1331876253),new $Uint64(3015537389,720543263)]),$toNativeArray($kindUint64,[new $Uint64(2481658752,2738587141),new $Uint64(3769421736,1974420903)]),$toNativeArray($kindUint64,[new $Uint64(3161649456,1711616963),new $Uint64(2355888585,1234013064)]),$toNativeArray($kindUint64,[new $Uint64(3952061820,2139521204),new $Uint64(2944860731,2616258154)]),$toNativeArray($kindUint64,[new $Uint64(2792593627,2674401505),new $Uint64(3681075914,2196580869)]),$toNativeArray($kindUint64,[new $Uint64(2282241929,1134630028),new $Uint64(2300672446,2446604867)]),$toNativeArray($kindUint64,[new $Uint64(1779060587,2492029360),new $Uint64(2875840558,910772436)]),$toNativeArray($kindUint64,[new $Uint64(2223825734,2041294876),new $Uint64(3594800697,3285949193)]),$toNativeArray($kindUint64,[new $Uint64(4074245644,202067473),new $Uint64(2246750436,443105509)]),$toNativeArray($kindUint64,[new $Uint64(1871581583,252584341),new $Uint64(2808438045,553881887)]),$toNativeArray($kindUint64,[new $Uint64(1265735154,3536955899),new $Uint64(3510547556,1766094183)])]);CH=new DW([new CG.ptr(0,""),new CG.ptr(1,"5"),new CG.ptr(1,"25"),new CG.ptr(1,"125"),new CG.ptr(2,"625"),new CG.ptr(2,"3125"),new CG.ptr(2,"15625"),new CG.ptr(3,"78125"),new CG.ptr(3,"390625"),new CG.ptr(3,"1953125"),new CG.ptr(4,"9765625"),new CG.ptr(4,"48828125"),new CG.ptr(4,"244140625"),new CG.ptr(4,"1220703125"),new CG.ptr(5,"6103515625"),new CG.ptr(5,"30517578125"),new CG.ptr(5,"152587890625"),new CG.ptr(6,"762939453125"),new CG.ptr(6,"3814697265625"),new CG.ptr(6,"19073486328125"),new CG.ptr(7,"95367431640625"),new CG.ptr(7,"476837158203125"),new CG.ptr(7,"2384185791015625"),new CG.ptr(7,"11920928955078125"),new CG.ptr(8,"59604644775390625"),new CG.ptr(8,"298023223876953125"),new CG.ptr(8,"1490116119384765625"),new CG.ptr(9,"7450580596923828125"),new CG.ptr(9,"37252902984619140625"),new CG.ptr(9,"186264514923095703125"),new CG.ptr(10,"931322574615478515625"),new CG.ptr(10,"4656612873077392578125"),new CG.ptr(10,"23283064365386962890625"),new CG.ptr(10,"116415321826934814453125"),new CG.ptr(11,"582076609134674072265625"),new CG.ptr(11,"2910383045673370361328125"),new CG.ptr(11,"14551915228366851806640625"),new CG.ptr(12,"72759576141834259033203125"),new CG.ptr(12,"363797880709171295166015625"),new CG.ptr(12,"1818989403545856475830078125"),new CG.ptr(13,"9094947017729282379150390625"),new CG.ptr(13,"45474735088646411895751953125"),new CG.ptr(13,"227373675443232059478759765625"),new CG.ptr(13,"1136868377216160297393798828125"),new CG.ptr(14,"5684341886080801486968994140625"),new CG.ptr(14,"28421709430404007434844970703125"),new CG.ptr(14,"142108547152020037174224853515625"),new CG.ptr(15,"710542735760100185871124267578125"),new CG.ptr(15,"3552713678800500929355621337890625"),new CG.ptr(15,"17763568394002504646778106689453125"),new CG.ptr(16,"88817841970012523233890533447265625"),new CG.ptr(16,"444089209850062616169452667236328125"),new CG.ptr(16,"2220446049250313080847263336181640625"),new CG.ptr(16,"11102230246251565404236316680908203125"),new CG.ptr(17,"55511151231257827021181583404541015625"),new CG.ptr(17,"277555756156289135105907917022705078125"),new CG.ptr(17,"1387778780781445675529539585113525390625"),new CG.ptr(18,"6938893903907228377647697925567626953125"),new CG.ptr(18,"34694469519536141888238489627838134765625"),new CG.ptr(18,"173472347597680709441192448139190673828125"),new CG.ptr(19,"867361737988403547205962240695953369140625")]);$pkg.ErrRange=E.New("value out of range");$pkg.ErrSyntax=E.New("invalid syntax");CW=true;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/race"]=(function(){var $pkg={},$init,A,B,C,D,E;A=function(a){var a;};$pkg.Acquire=A;B=function(a){var a;};$pkg.Release=B;C=function(a){var a;};$pkg.ReleaseMerge=C;D=function(){};$pkg.Disable=D;E=function(){};$pkg.Enable=E;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["sync/atomic"]=(function(){var $pkg={},$init,A,B,AL,M,P,S,X,AA,AD,AF,AJ;A=$packages["github.com/gopherjs/gopherjs/js"];B=$pkg.Value=$newType(0,$kindStruct,"atomic.Value",true,"sync/atomic",true,function(v_){this.$val=this;if(arguments.length===0){this.v=$ifaceNil;return;}this.v=v_;});AL=$ptrType(B);M=function(ad,ae,af){var ad,ae,af;if(ad.$get()===ae){ad.$set(af);return true;}return false;};$pkg.CompareAndSwapInt32=M;P=function(ad,ae,af){var ad,ae,af,ag;if((ag=ad.$get(),(ag.$high===ae.$high&&ag.$low===ae.$low))){ad.$set(af);return true;}return false;};$pkg.CompareAndSwapUint64=P;S=function(ad,ae){var ad,ae,af;af=ad.$get()+ae>>0;ad.$set(af);return af;};$pkg.AddInt32=S;X=function(ad){var ad;return ad.$get();};$pkg.LoadInt32=X;AA=function(ad){var ad;return ad.$get();};$pkg.LoadUint64=AA;AD=function(ad,ae){var ad,ae;ad.$set(ae);};$pkg.StoreInt32=AD;AF=function(ad,ae){var ad,ae;ad.$set(ae);};$pkg.StoreUint32=AF;B.ptr.prototype.Load=function(){var ad,ae;ad=$ifaceNil;ae=this;ad=ae.v;return ad;};B.prototype.Load=function(){return this.$val.Load();};B.ptr.prototype.Store=function(ad){var ad,ae;ae=this;ae.checkNew("store",ad);ae.v=ad;};B.prototype.Store=function(ad){return this.$val.Store(ad);};B.ptr.prototype.Swap=function(ad){var ad,ae,af,ag,ah;ae=$ifaceNil;af=this;af.checkNew("swap",ad);ag=af.v;ah=ad;ae=ag;af.v=ah;ae=ae;return ae;};B.prototype.Swap=function(ad){return this.$val.Swap(ad);};B.ptr.prototype.CompareAndSwap=function(ad,ae){var ad,ae,af,ag;af=false;ag=this;ag.checkNew("compare and swap",ae);if(!($interfaceIsEqual(ag.v,$ifaceNil)&&$interfaceIsEqual(ad,$ifaceNil))&&!AJ(ad,ae)){$panic(new $String("sync/atomic: compare and swap of inconsistently typed values into Value"));}if(!($interfaceIsEqual(ag.v,ad))){af=false;return af;}ag.v=ae;af=true;return af;};B.prototype.CompareAndSwap=function(ad,ae){return this.$val.CompareAndSwap(ad,ae);};B.ptr.prototype.checkNew=function(ad,ae){var ad,ae,af;af=this;if($interfaceIsEqual(ae,$ifaceNil)){$panic(new $String("sync/atomic: "+ad+" of nil value into Value"));}if(!($interfaceIsEqual(af.v,$ifaceNil))&&!AJ(ae,af.v)){$panic(new $String("sync/atomic: "+ad+" of inconsistently typed value into Value"));}};B.prototype.checkNew=function(ad,ae){return this.$val.checkNew(ad,ae);};AJ=function(ad,ae){var ad,ae;return ad.constructor===ae.constructor;};AL.methods=[{prop:"Load",name:"Load",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Store",name:"Store",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$emptyInterface],[$emptyInterface],false)},{prop:"CompareAndSwap",name:"CompareAndSwap",pkg:"",typ:$funcType([$emptyInterface,$emptyInterface],[$Bool],false)},{prop:"checkNew",name:"checkNew",pkg:"sync/atomic",typ:$funcType([$String,$emptyInterface],[],false)}];B.init("sync/atomic",[{prop:"v",name:"v",embedded:false,exported:false,typ:$emptyInterface,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["sync"]=(function(){var $pkg={},$init,C,A,B,D,E,F,U,V,AO,AT,AV,AW,AX,BH,BI,BN,BV,BW,BX,Y,AF,AG,K,L,AH,AI,AJ,AK,AL,AM,AN;C=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["internal/race"];B=$packages["sync/atomic"];D=$pkg.RWMutex=$newType(0,$kindStruct,"sync.RWMutex",true,"sync",true,function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;if(arguments.length===0){this.w=new U.ptr(0,0);this.writerSem=0;this.readerSem=0;this.readerCount=0;this.readerWait=0;return;}this.w=w_;this.writerSem=writerSem_;this.readerSem=readerSem_;this.readerCount=readerCount_;this.readerWait=readerWait_;});E=$pkg.rlocker=$newType(0,$kindStruct,"sync.rlocker",true,"sync",false,function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;if(arguments.length===0){this.w=new U.ptr(0,0);this.writerSem=0;this.readerSem=0;this.readerCount=0;this.readerWait=0;return;}this.w=w_;this.writerSem=writerSem_;this.readerSem=readerSem_;this.readerCount=readerCount_;this.readerWait=readerWait_;});F=$pkg.notifyList=$newType(0,$kindStruct,"sync.notifyList",true,"sync",false,function(wait_,notify_,lock_,head_,tail_){this.$val=this;if(arguments.length===0){this.wait=0;this.notify=0;this.lock=0;this.head=0;this.tail=0;return;}this.wait=wait_;this.notify=notify_;this.lock=lock_;this.head=head_;this.tail=tail_;});U=$pkg.Mutex=$newType(0,$kindStruct,"sync.Mutex",true,"sync",true,function(state_,sema_){this.$val=this;if(arguments.length===0){this.state=0;this.sema=0;return;}this.state=state_;this.sema=sema_;});V=$pkg.Locker=$newType(8,$kindInterface,"sync.Locker",true,"sync",true,null);AO=$pkg.Pool=$newType(0,$kindStruct,"sync.Pool",true,"sync",true,function(store_,New_){this.$val=this;if(arguments.length===0){this.store=BV.nil;this.New=$throwNilPointerError;return;}this.store=store_;this.New=New_;});AT=$ptrType($Uint32);AV=$ptrType($Int32);AW=$ptrType(E);AX=$ptrType(D);BH=$chanType($Bool,false,false);BI=$sliceType(BH);BN=$ptrType(U);BV=$sliceType($emptyInterface);BW=$ptrType(AO);BX=$funcType([],[$emptyInterface],false);D.ptr.prototype.RLock=function(){var{j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(false){$unused(j.w.state);A.Disable();}if(B.AddInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))),1)<0){$s=1;continue;}$s=2;continue;case 1:$r=AI((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j))),false,0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:if(false){A.Enable();A.Acquire(((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j)))));}$s=-1;return;}return;}var $f={$blk:D.ptr.prototype.RLock,$c:true,$r,j,$s};return $f;};D.prototype.RLock=function(){return this.$val.RLock();};D.ptr.prototype.TryRLock=function(){var j,k;j=this;if(false){$unused(j.w.state);A.Disable();}while(true){k=B.LoadInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))));if(k<0){if(false){A.Enable();}return false;}if(B.CompareAndSwapInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))),k,k+1>>0)){if(false){A.Enable();A.Acquire(((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j)))));}return true;}}};D.prototype.TryRLock=function(){return this.$val.TryRLock();};D.ptr.prototype.RUnlock=function(){var{j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(false){$unused(j.w.state);A.ReleaseMerge(((j.$ptr_writerSem||(j.$ptr_writerSem=new AT(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},j)))));A.Disable();}k=B.AddInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))),-1);if(k<0){$s=1;continue;}$s=2;continue;case 1:$r=j.rUnlockSlow(k);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:if(false){A.Enable();}$s=-1;return;}return;}var $f={$blk:D.ptr.prototype.RUnlock,$c:true,$r,j,k,$s};return $f;};D.prototype.RUnlock=function(){return this.$val.RUnlock();};D.ptr.prototype.rUnlockSlow=function(j){var{j,k,$s,$r,$c}=$restore(this,{j});$s=$s||0;s:while(true){switch($s){case 0:k=this;if(((j+1>>0)===0)||((j+1>>0)===-1073741824)){A.Enable();AN("sync: RUnlock of unlocked RWMutex");}if(B.AddInt32((k.$ptr_readerWait||(k.$ptr_readerWait=new AV(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},k))),-1)===0){$s=1;continue;}$s=2;continue;case 1:$r=AJ((k.$ptr_writerSem||(k.$ptr_writerSem=new AT(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},k))),false,1);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:D.ptr.prototype.rUnlockSlow,$c:true,$r,j,k,$s};return $f;};D.prototype.rUnlockSlow=function(j){return this.$val.rUnlockSlow(j);};D.ptr.prototype.Lock=function(){var{j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(false){$unused(j.w.state);A.Disable();}$r=j.w.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=B.AddInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))),-1073741824)+1073741824>>0;if(!((k===0))&&!((B.AddInt32((j.$ptr_readerWait||(j.$ptr_readerWait=new AV(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},j))),k)===0))){$s=2;continue;}$s=3;continue;case 2:$r=AI((j.$ptr_writerSem||(j.$ptr_writerSem=new AT(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},j))),false,0);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:if(false){A.Enable();A.Acquire(((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j)))));A.Acquire(((j.$ptr_writerSem||(j.$ptr_writerSem=new AT(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},j)))));}$s=-1;return;}return;}var $f={$blk:D.ptr.prototype.Lock,$c:true,$r,j,k,$s};return $f;};D.prototype.Lock=function(){return this.$val.Lock();};D.ptr.prototype.TryLock=function(){var{j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(false){$unused(j.w.state);A.Disable();}if(!j.w.TryLock()){if(false){A.Enable();}$s=-1;return false;}if(!B.CompareAndSwapInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))),0,-1073741824)){$s=1;continue;}$s=2;continue;case 1:$r=j.w.Unlock();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(false){A.Enable();}$s=-1;return false;case 2:if(false){A.Enable();A.Acquire(((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j)))));A.Acquire(((j.$ptr_writerSem||(j.$ptr_writerSem=new AT(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},j)))));}$s=-1;return true;}return;}var $f={$blk:D.ptr.prototype.TryLock,$c:true,$r,j,$s};return $f;};D.prototype.TryLock=function(){return this.$val.TryLock();};D.ptr.prototype.Unlock=function(){var{j,k,l,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(false){$unused(j.w.state);A.Release(((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j)))));A.Disable();}k=B.AddInt32((j.$ptr_readerCount||(j.$ptr_readerCount=new AV(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},j))),1073741824);if(k>=1073741824){A.Enable();AN("sync: Unlock of unlocked RWMutex");}l=0;case 1:if(!(l<((k>>0)))){$s=2;continue;}$r=AJ((j.$ptr_readerSem||(j.$ptr_readerSem=new AT(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},j))),false,0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=l+(1)>>0;$s=1;continue;case 2:$r=j.w.Unlock();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(false){A.Enable();}$s=-1;return;}return;}var $f={$blk:D.ptr.prototype.Unlock,$c:true,$r,j,k,l,$s};return $f;};D.prototype.Unlock=function(){return this.$val.Unlock();};D.ptr.prototype.RLocker=function(){var j;j=this;return($pointerOfStructConversion(j,AW));};D.prototype.RLocker=function(){return this.$val.RLocker();};E.ptr.prototype.Lock=function(){var{j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;$r=($pointerOfStructConversion(j,AX)).RLock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:E.ptr.prototype.Lock,$c:true,$r,j,$s};return $f;};E.prototype.Lock=function(){return this.$val.Lock();};E.ptr.prototype.Unlock=function(){var{j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;$r=($pointerOfStructConversion(j,AX)).RUnlock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:E.ptr.prototype.Unlock,$c:true,$r,j,$s};return $f;};E.prototype.Unlock=function(){return this.$val.Unlock();};K=function(){var j;j=new F.ptr(0,0,0,0,0);AK(20);};L=function(){$throwRuntimeError("native function not implemented: sync.runtime_doSpin");};U.ptr.prototype.Lock=function(){var{j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(B.CompareAndSwapInt32((j.$ptr_state||(j.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},j))),0,1)){if(false){A.Acquire((j));}$s=-1;return;}$r=j.lockSlow();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:U.ptr.prototype.Lock,$c:true,$r,j,$s};return $f;};U.prototype.Lock=function(){return this.$val.Lock();};U.ptr.prototype.TryLock=function(){var j,k;j=this;k=j.state;if(!(((k&5)===0))){return false;}if(!B.CompareAndSwapInt32((j.$ptr_state||(j.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},j))),k,k|1)){return false;}if(false){A.Acquire((j));}return true;};U.prototype.TryLock=function(){return this.$val.TryLock();};U.ptr.prototype.lockSlow=function(){var{j,k,l,m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;k=new $Int64(0,0);l=false;m=false;n=0;o=j.state;case 1:if(((o&5)===1)&&AL(n)){$s=3;continue;}$s=4;continue;case 3:if(!m&&((o&2)===0)&&!(((o>>3>>0)===0))&&B.CompareAndSwapInt32((j.$ptr_state||(j.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},j))),o,o|2)){m=true;}$r=L();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}n=n+(1)>>0;o=j.state;$s=1;continue;case 4:p=o;if((o&4)===0){p=p|(1);}if(!(((o&5)===0))){p=p+(8)>>0;}if(l&&!(((o&1)===0))){p=p|(4);}if(m){if((p&2)===0){AN("sync: inconsistent mutex state");}p=(p&~(2))>>0;}if(B.CompareAndSwapInt32((j.$ptr_state||(j.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},j))),o,p)){$s=6;continue;}$s=7;continue;case 6:if((o&5)===0){$s=2;continue;}q=!((k.$high===0&&k.$low===0));if((k.$high===0&&k.$low===0)){k=AM();}$r=AI((j.$ptr_sema||(j.$ptr_sema=new AT(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},j))),q,1);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=l||(r=(s=AM(),new $Int64(s.$high-k.$high,s.$low-k.$low)),(r.$high>0||(r.$high===0&&r.$low>1000000)));o=j.state;if(!(((o&4)===0))){if(!(((o&3)===0))||((o>>3>>0)===0)){AN("sync: inconsistent mutex state");}t=-7;if(!l||((o>>3>>0)===1)){t=t-(4)>>0;}B.AddInt32((j.$ptr_state||(j.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},j))),t);$s=2;continue;}m=true;n=0;$s=8;continue;case 7:o=j.state;case 8:$s=1;continue;case 2:if(false){A.Acquire((j));}$s=-1;return;}return;}var $f={$blk:U.ptr.prototype.lockSlow,$c:true,$r,j,k,l,m,n,o,p,q,r,s,t,$s};return $f;};U.prototype.lockSlow=function(){return this.$val.lockSlow();};U.ptr.prototype.Unlock=function(){var{j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(false){$unused(j.state);A.Release((j));}k=B.AddInt32((j.$ptr_state||(j.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},j))),-1);if(!((k===0))){$s=1;continue;}$s=2;continue;case 1:$r=j.unlockSlow(k);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:U.ptr.prototype.Unlock,$c:true,$r,j,k,$s};return $f;};U.prototype.Unlock=function(){return this.$val.Unlock();};U.ptr.prototype.unlockSlow=function(j){var{j,k,l,$s,$r,$c}=$restore(this,{j});$s=$s||0;s:while(true){switch($s){case 0:k=this;if((((j+1>>0))&1)===0){AN("sync: unlock of unlocked mutex");}if((j&4)===0){$s=1;continue;}$s=2;continue;case 1:l=j;case 4:if(((l>>3>>0)===0)||!(((l&7)===0))){$s=-1;return;}j=((l-8>>0))|2;if(B.CompareAndSwapInt32((k.$ptr_state||(k.$ptr_state=new AV(function(){return this.$target.state;},function($v){this.$target.state=$v;},k))),l,j)){$s=6;continue;}$s=7;continue;case 6:$r=AJ((k.$ptr_sema||(k.$ptr_sema=new AT(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},k))),false,1);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 7:l=k.state;$s=4;continue;case 5:$s=3;continue;case 2:$r=AJ((k.$ptr_sema||(k.$ptr_sema=new AT(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},k))),true,1);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;return;}return;}var $f={$blk:U.ptr.prototype.unlockSlow,$c:true,$r,j,k,l,$s};return $f;};U.prototype.unlockSlow=function(j){return this.$val.unlockSlow(j);};AH=function(j){var{j,$s,$r,$c}=$restore(this,{j});$s=$s||0;s:while(true){switch($s){case 0:$r=AI(j,false,1);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AH,$c:true,$r,j,$s};return $f;};$linknames["sync.runtime_Semacquire"]=AH;AI=function(j,k,l){var{j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{j,k,l});$s=$s||0;s:while(true){switch($s){case 0:if(((j.$get()-(m=AG[AT.keyFor(j)],m!==undefined?m.v:0)>>>0))===0){$s=1;continue;}$s=2;continue;case 1:n=new $Chan($Bool,0);if(k){o=j;(AF||$throwRuntimeError("assignment to entry in nil map"))[AT.keyFor(o)]={k:o,v:$appendSlice(new BI([n]),(p=AF[AT.keyFor(j)],p!==undefined?p.v:BI.nil))};}else{q=j;(AF||$throwRuntimeError("assignment to entry in nil map"))[AT.keyFor(q)]={k:q,v:$append((r=AF[AT.keyFor(j)],r!==undefined?r.v:BI.nil),n)};}s=$recv(n);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}s[0];t=j;(AG||$throwRuntimeError("assignment to entry in nil map"))[AT.keyFor(t)]={k:t,v:(u=AG[AT.keyFor(j)],u!==undefined?u.v:0)-(1)>>>0};if((v=AG[AT.keyFor(j)],v!==undefined?v.v:0)===0){delete AG[AT.keyFor(j)];}case 2:j.$set(j.$get()-(1)>>>0);$s=-1;return;}return;}var $f={$blk:AI,$c:true,$r,j,k,l,m,n,o,p,q,r,s,t,u,v,$s};return $f;};AJ=function(j,k,l){var{j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{j,k,l});$s=$s||0;s:while(true){switch($s){case 0:j.$set(j.$get()+(1)>>>0);n=(m=AF[AT.keyFor(j)],m!==undefined?m.v:BI.nil);if(n.$length===0){$s=-1;return;}o=(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]);n=$subslice(n,1);p=j;(AF||$throwRuntimeError("assignment to entry in nil map"))[AT.keyFor(p)]={k:p,v:n};if(n.$length===0){delete AF[AT.keyFor(j)];}q=j;(AG||$throwRuntimeError("assignment to entry in nil map"))[AT.keyFor(q)]={k:q,v:(r=AG[AT.keyFor(j)],r!==undefined?r.v:0)+(1)>>>0};$r=$send(o,true);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AJ,$c:true,$r,j,k,l,m,n,o,p,q,r,$s};return $f;};$linknames["sync.runtime_Semrelease"]=AJ;AK=function(j){var j;};AL=function(j){var j;return false;};AM=function(){return $mul64($internalize(new($global.Date)().getTime(),$Int64),new $Int64(0,1000000));};AN=function(j){var j;$throwRuntimeError($externalize(j,$String));};AO.ptr.prototype.Get=function(){var{j,k,l,m,n,o,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=this;if(j.store.$length===0){$s=1;continue;}$s=2;continue;case 1:if(!(j.New===$throwNilPointerError)){$s=3;continue;}$s=4;continue;case 3:k=j.New();$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;$s=6;case 6:return l;case 4:$s=-1;return $ifaceNil;case 2:o=(m=j.store,n=j.store.$length-1>>0,((n<0||n>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]));j.store=$subslice(j.store,0,(j.store.$length-1>>0));$s=-1;return o;}return;}var $f={$blk:AO.ptr.prototype.Get,$c:true,$r,j,k,l,m,n,o,$s};return $f;};AO.prototype.Get=function(){return this.$val.Get();};AO.ptr.prototype.Put=function(j){var j,k;k=this;if($interfaceIsEqual(j,$ifaceNil)){return;}k.store=$append(k.store,j);};AO.prototype.Put=function(j){return this.$val.Put(j);};AX.methods=[{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"TryRLock",name:"TryRLock",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)},{prop:"rUnlockSlow",name:"rUnlockSlow",pkg:"sync",typ:$funcType([$Int32],[],false)},{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"TryLock",name:"TryLock",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLocker",name:"RLocker",pkg:"",typ:$funcType([],[V],false)}];AW.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];BN.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"TryLock",name:"TryLock",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"lockSlow",name:"lockSlow",pkg:"sync",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"unlockSlow",name:"unlockSlow",pkg:"sync",typ:$funcType([$Int32],[],false)}];BW.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)}];D.init("sync",[{prop:"w",name:"w",embedded:false,exported:false,typ:U,tag:""},{prop:"writerSem",name:"writerSem",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",embedded:false,exported:false,typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",embedded:false,exported:false,typ:$Int32,tag:""}]);E.init("sync",[{prop:"w",name:"w",embedded:false,exported:false,typ:U,tag:""},{prop:"writerSem",name:"writerSem",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",embedded:false,exported:false,typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",embedded:false,exported:false,typ:$Int32,tag:""}]);F.init("sync",[{prop:"wait",name:"wait",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"notify",name:"notify",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"lock",name:"lock",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"head",name:"head",embedded:false,exported:false,typ:$UnsafePointer,tag:""},{prop:"tail",name:"tail",embedded:false,exported:false,typ:$UnsafePointer,tag:""}]);U.init("sync",[{prop:"state",name:"state",embedded:false,exported:false,typ:$Int32,tag:""},{prop:"sema",name:"sema",embedded:false,exported:false,typ:$Uint32,tag:""}]);V.init([{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}]);AO.init("sync",[{prop:"store",name:"store",embedded:false,exported:false,typ:BV,tag:""},{prop:"New",name:"New",embedded:false,exported:true,typ:BX,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=C.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}Y=(new Uint8Array(8));AF={};AG={};K();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["unicode"]=(function(){var $pkg={},$init;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["reflect"]=(function(){var $pkg={},$init,A,N,B,L,C,M,D,E,F,G,H,I,J,K,Q,R,U,AG,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,DA,DI,DJ,DK,DM,DN,DO,GL,GN,GO,GP,IA,JD,JE,JF,JG,JH,JI,JJ,JL,JN,JO,JV,JW,JY,JZ,KA,KB,KC,KD,KE,KF,KG,KK,KN,KO,KP,KQ,KR,KU,KV,KW,KX,LD,LE,LF,LG,LL,LM,LN,LX,AE,AF,DB,GF,GM,GQ,GT,GV,IN,IO,IS,V,AH,AI,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,DQ,DR,DT,DU,DV,DW,DX,EY,FD,FJ,FK,GG,GH,GI,GJ,GK,GR,GS,GU,GW,GY,GZ,HA,HB,HC,HD,HE,HH,HJ,HL,HM,HN,HP,HT,HU,HV,HW,HX,HY,HZ,IB,IC,ID,IE,IF,IG,IH,IJ,IK,IL,IM,IP,IQ,IR,IT,IU,IY,IZ;A=$packages["errors"];N=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["internal/abi"];L=$packages["internal/bytealg"];C=$packages["internal/goarch"];M=$packages["internal/goexperiment"];D=$packages["internal/itoa"];E=$packages["internal/unsafeheader"];F=$packages["math"];G=$packages["runtime"];H=$packages["strconv"];I=$packages["sync"];J=$packages["unicode"];K=$packages["unicode/utf8"];Q=$pkg.Value=$newType(0,$kindStruct,"reflect.Value",true,"reflect",true,function(typ_,ptr_,flag_){this.$val=this;if(arguments.length===0){this.typ=JE.nil;this.ptr=0;this.flag=0;return;}this.typ=typ_;this.ptr=ptr_;this.flag=flag_;});R=$pkg.flag=$newType(4,$kindUintptr,"reflect.flag",true,"reflect",false,null);U=$pkg.ValueError=$newType(0,$kindStruct,"reflect.ValueError",true,"reflect",true,function(Method_,Kind_){this.$val=this;if(arguments.length===0){this.Method="";this.Kind=0;return;}this.Method=Method_;this.Kind=Kind_;});AG=$pkg.MapIter=$newType(0,$kindStruct,"reflect.MapIter",true,"reflect",true,function(m_,hiter_){this.$val=this;if(arguments.length===0){this.m=new Q.ptr(JE.nil,0,0);this.hiter=new IA.ptr($ifaceNil,null,null,0,null);return;}this.m=m_;this.hiter=hiter_;});CK=$pkg.Type=$newType(8,$kindInterface,"reflect.Type",true,"reflect",true,null);CL=$pkg.Kind=$newType(4,$kindUint,"reflect.Kind",true,"reflect",true,null);CM=$pkg.tflag=$newType(1,$kindUint8,"reflect.tflag",true,"reflect",false,null);CN=$pkg.rtype=$newType(0,$kindStruct,"reflect.rtype",true,"reflect",false,function(size_,ptrdata_,hash_,tflag_,align_,fieldAlign_,kind_,equal_,gcdata_,str_,ptrToThis_){this.$val=this;if(arguments.length===0){this.size=0;this.ptrdata=0;this.hash=0;this.tflag=0;this.align=0;this.fieldAlign=0;this.kind=0;this.equal=$throwNilPointerError;this.gcdata=KG.nil;this.str=0;this.ptrToThis=0;return;}this.size=size_;this.ptrdata=ptrdata_;this.hash=hash_;this.tflag=tflag_;this.align=align_;this.fieldAlign=fieldAlign_;this.kind=kind_;this.equal=equal_;this.gcdata=gcdata_;this.str=str_;this.ptrToThis=ptrToThis_;});CO=$pkg.method=$newType(0,$kindStruct,"reflect.method",true,"reflect",false,function(name_,mtyp_,ifn_,tfn_){this.$val=this;if(arguments.length===0){this.name=0;this.mtyp=0;this.ifn=0;this.tfn=0;return;}this.name=name_;this.mtyp=mtyp_;this.ifn=ifn_;this.tfn=tfn_;});CP=$pkg.ChanDir=$newType(4,$kindInt,"reflect.ChanDir",true,"reflect",true,null);CQ=$pkg.arrayType=$newType(0,$kindStruct,"reflect.arrayType",true,"reflect",false,function(rtype_,elem_,slice_,len_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.elem=JE.nil;this.slice=JE.nil;this.len=0;return;}this.rtype=rtype_;this.elem=elem_;this.slice=slice_;this.len=len_;});CR=$pkg.chanType=$newType(0,$kindStruct,"reflect.chanType",true,"reflect",false,function(rtype_,elem_,dir_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.elem=JE.nil;this.dir=0;return;}this.rtype=rtype_;this.elem=elem_;this.dir=dir_;});CS=$pkg.imethod=$newType(0,$kindStruct,"reflect.imethod",true,"reflect",false,function(name_,typ_){this.$val=this;if(arguments.length===0){this.name=0;this.typ=0;return;}this.name=name_;this.typ=typ_;});CT=$pkg.interfaceType=$newType(0,$kindStruct,"reflect.interfaceType",true,"reflect",false,function(rtype_,pkgPath_,methods_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.pkgPath=new GO.ptr(KG.nil);this.methods=KN.nil;return;}this.rtype=rtype_;this.pkgPath=pkgPath_;this.methods=methods_;});CU=$pkg.mapType=$newType(0,$kindStruct,"reflect.mapType",true,"reflect",false,function(rtype_,key_,elem_,bucket_,hasher_,keysize_,valuesize_,bucketsize_,flags_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.key=JE.nil;this.elem=JE.nil;this.bucket=JE.nil;this.hasher=$throwNilPointerError;this.keysize=0;this.valuesize=0;this.bucketsize=0;this.flags=0;return;}this.rtype=rtype_;this.key=key_;this.elem=elem_;this.bucket=bucket_;this.hasher=hasher_;this.keysize=keysize_;this.valuesize=valuesize_;this.bucketsize=bucketsize_;this.flags=flags_;});CV=$pkg.ptrType=$newType(0,$kindStruct,"reflect.ptrType",true,"reflect",false,function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.elem=JE.nil;return;}this.rtype=rtype_;this.elem=elem_;});CW=$pkg.sliceType=$newType(0,$kindStruct,"reflect.sliceType",true,"reflect",false,function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.elem=JE.nil;return;}this.rtype=rtype_;this.elem=elem_;});CX=$pkg.structField=$newType(0,$kindStruct,"reflect.structField",true,"reflect",false,function(name_,typ_,offsetEmbed_){this.$val=this;if(arguments.length===0){this.name=new GO.ptr(KG.nil);this.typ=JE.nil;this.offsetEmbed=0;return;}this.name=name_;this.typ=typ_;this.offsetEmbed=offsetEmbed_;});CY=$pkg.structType=$newType(0,$kindStruct,"reflect.structType",true,"reflect",false,function(rtype_,pkgPath_,fields_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.pkgPath=new GO.ptr(KG.nil);this.fields=KO.nil;return;}this.rtype=rtype_;this.pkgPath=pkgPath_;this.fields=fields_;});DA=$pkg.Method=$newType(0,$kindStruct,"reflect.Method",true,"reflect",true,function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;if(arguments.length===0){this.Name="";this.PkgPath="";this.Type=$ifaceNil;this.Func=new Q.ptr(JE.nil,0,0);this.Index=0;return;}this.Name=Name_;this.PkgPath=PkgPath_;this.Type=Type_;this.Func=Func_;this.Index=Index_;});DI=$pkg.nameOff=$newType(4,$kindInt32,"reflect.nameOff",true,"reflect",false,null);DJ=$pkg.typeOff=$newType(4,$kindInt32,"reflect.typeOff",true,"reflect",false,null);DK=$pkg.textOff=$newType(4,$kindInt32,"reflect.textOff",true,"reflect",false,null);DM=$pkg.StructField=$newType(0,$kindStruct,"reflect.StructField",true,"reflect",true,function(Name_,PkgPath_,Type_,Tag_,Offset_,Index_,Anonymous_){this.$val=this;if(arguments.length===0){this.Name="";this.PkgPath="";this.Type=$ifaceNil;this.Tag="";this.Offset=0;this.Index=JL.nil;this.Anonymous=false;return;}this.Name=Name_;this.PkgPath=PkgPath_;this.Type=Type_;this.Tag=Tag_;this.Offset=Offset_;this.Index=Index_;this.Anonymous=Anonymous_;});DN=$pkg.StructTag=$newType(8,$kindString,"reflect.StructTag",true,"reflect",true,null);DO=$pkg.fieldScan=$newType(0,$kindStruct,"reflect.fieldScan",true,"reflect",false,function(typ_,index_){this.$val=this;if(arguments.length===0){this.typ=KF.nil;this.index=JL.nil;return;}this.typ=typ_;this.index=index_;});GL=$pkg.uncommonType=$newType(0,$kindStruct,"reflect.uncommonType",true,"reflect",false,function(pkgPath_,mcount_,xcount_,moff_,_methods_){this.$val=this;if(arguments.length===0){this.pkgPath=0;this.mcount=0;this.xcount=0;this.moff=0;this._methods=KB.nil;return;}this.pkgPath=pkgPath_;this.mcount=mcount_;this.xcount=xcount_;this.moff=moff_;this._methods=_methods_;});GN=$pkg.funcType=$newType(0,$kindStruct,"reflect.funcType",true,"reflect",false,function(rtype_,inCount_,outCount_,_in_,_out_){this.$val=this;if(arguments.length===0){this.rtype=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);this.inCount=0;this.outCount=0;this._in=JF.nil;this._out=JF.nil;return;}this.rtype=rtype_;this.inCount=inCount_;this.outCount=outCount_;this._in=_in_;this._out=_out_;});GO=$pkg.name=$newType(0,$kindStruct,"reflect.name",true,"reflect",false,function(bytes_){this.$val=this;if(arguments.length===0){this.bytes=KG.nil;return;}this.bytes=bytes_;});GP=$pkg.nameData=$newType(0,$kindStruct,"reflect.nameData",true,"reflect",false,function(name_,tag_,exported_,pkgPath_){this.$val=this;if(arguments.length===0){this.name="";this.tag="";this.exported=false;this.pkgPath="";return;}this.name=name_;this.tag=tag_;this.exported=exported_;this.pkgPath=pkgPath_;});IA=$pkg.hiter=$newType(0,$kindStruct,"reflect.hiter",true,"reflect",false,function(t_,m_,keys_,i_,last_){this.$val=this;if(arguments.length===0){this.t=$ifaceNil;this.m=null;this.keys=null;this.i=0;this.last=null;return;}this.t=t_;this.m=m_;this.keys=keys_;this.i=i_;this.last=last_;});JD=$sliceType(GO);JE=$ptrType(CN);JF=$sliceType(JE);JG=$sliceType($String);JH=$sliceType($emptyInterface);JI=$ptrType(N.Object);JJ=$funcType([JH],[JI],true);JL=$sliceType($Int);JN=$ptrType(G.Func);JO=$sliceType(Q);JV=$ptrType($UnsafePointer);JW=$ptrType(E.Slice);JY=$sliceType($Uint8);JZ=$sliceType($Int32);KA=$ptrType(GL);KB=$sliceType(CO);KC=$ptrType(CT);KD=$ptrType(CS);KE=$sliceType(DO);KF=$ptrType(CY);KG=$ptrType($Uint8);KK=$funcType([],[],false);KN=$sliceType(CS);KO=$sliceType(CX);KP=$ptrType(GP);KQ=$structType("reflect",[{prop:"str",name:"str",embedded:false,exported:false,typ:$String,tag:""}]);KR=$sliceType(JI);KU=$ptrType($String);KV=$ptrType(GN);KW=$sliceType(CK);KX=$sliceType(KR);LD=$funcType([$String],[$Bool],false);LE=$ptrType(AG);LF=$arrayType($Uintptr,2);LG=$ptrType(U);LL=$funcType([$UnsafePointer,$UnsafePointer],[$Bool],false);LM=$funcType([$UnsafePointer,$Uintptr],[$Uintptr],false);LN=$ptrType(CX);LX=$ptrType(IA);R.prototype.kind=function(){var aw;aw=this.$val;return((((aw&31)>>>0)>>>0));};$ptrType(R).prototype.kind=function(){return new R(this.$get()).kind();};R.prototype.ro=function(){var aw;aw=this.$val;if(!((((aw&96)>>>0)===0))){return 32;}return 0;};$ptrType(R).prototype.ro=function(){return new R(this.$get()).ro();};Q.ptr.prototype.pointer=function(){var aw;aw=this;if(!((aw.typ.size===4))||!aw.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((aw.flag&128)>>>0)===0))){return(aw.ptr).$get();}return aw.ptr;};Q.prototype.pointer=function(){return this.$val.pointer();};U.ptr.prototype.Error=function(){var aw;aw=this;if(aw.Kind===0){return"reflect: call of "+aw.Method+" on zero Value";}return"reflect: call of "+aw.Method+" on "+new CL(aw.Kind).String()+" Value";};U.prototype.Error=function(){return this.$val.Error();};V=function(){var aw,ax,ay;aw=G.Caller(2);ax=aw[0];ay=G.FuncForPC(ax);if(ay===JN.nil){return"unknown method";}return ay.Name();};R.prototype.mustBe=function(aw){var aw,ax;ax=this.$val;if(!((((((ax&31)>>>0)>>>0))===aw))){$panic(new U.ptr(V(),new R(ax).kind()));}};$ptrType(R).prototype.mustBe=function(aw){return new R(this.$get()).mustBe(aw);};R.prototype.mustBeExported=function(){var aw;aw=this.$val;if((aw===0)||!((((aw&96)>>>0)===0))){new R(aw).mustBeExportedSlow();}};$ptrType(R).prototype.mustBeExported=function(){return new R(this.$get()).mustBeExported();};R.prototype.mustBeExportedSlow=function(){var aw;aw=this.$val;if(aw===0){$panic(new U.ptr(IY(),0));}if(!((((aw&96)>>>0)===0))){$panic(new $String("reflect: "+IY()+" using value obtained using unexported field"));}};$ptrType(R).prototype.mustBeExportedSlow=function(){return new R(this.$get()).mustBeExportedSlow();};R.prototype.mustBeAssignable=function(){var aw;aw=this.$val;if(!((((aw&96)>>>0)===0))||(((aw&256)>>>0)===0)){new R(aw).mustBeAssignableSlow();}};$ptrType(R).prototype.mustBeAssignable=function(){return new R(this.$get()).mustBeAssignable();};R.prototype.mustBeAssignableSlow=function(){var aw;aw=this.$val;if(aw===0){$panic(new U.ptr(IY(),0));}if(!((((aw&96)>>>0)===0))){$panic(new $String("reflect: "+IY()+" using value obtained using unexported field"));}if(((aw&256)>>>0)===0){$panic(new $String("reflect: "+IY()+" using unaddressable value"));}};$ptrType(R).prototype.mustBeAssignableSlow=function(){return new R(this.$get()).mustBeAssignableSlow();};Q.ptr.prototype.Addr=function(){var aw,ax;aw=this;if(((aw.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Addr of unaddressable value"));}ax=(aw.flag&96)>>>0;return new Q.ptr(aw.typ.ptrTo(),aw.ptr,(ax|22)>>>0);};Q.prototype.Addr=function(){return this.$val.Addr();};Q.ptr.prototype.Bool=function(){var aw;aw=this;new R(aw.flag).mustBe(1);return(aw.ptr).$get();};Q.prototype.Bool=function(){return this.$val.Bool();};Q.ptr.prototype.Bytes=function(){var{aw,ax,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;new R(aw.flag).mustBe(23);ax=aw.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}if(!((ax===8))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.Bytes of non-byte slice"));case 2:$s=-1;return(aw.ptr).$get();}return;}var $f={$blk:Q.ptr.prototype.Bytes,$c:true,$r,aw,ax,$s};return $f;};Q.prototype.Bytes=function(){return this.$val.Bytes();};Q.ptr.prototype.runes=function(){var{aw,ax,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;new R(aw.flag).mustBe(23);ax=aw.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}if(!((ax===5))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.Bytes of non-rune slice"));case 2:$s=-1;return(aw.ptr).$get();}return;}var $f={$blk:Q.ptr.prototype.runes,$c:true,$r,aw,ax,$s};return $f;};Q.prototype.runes=function(){return this.$val.runes();};Q.ptr.prototype.CanAddr=function(){var aw;aw=this;return!((((aw.flag&256)>>>0)===0));};Q.prototype.CanAddr=function(){return this.$val.CanAddr();};Q.ptr.prototype.CanSet=function(){var aw;aw=this;return((aw.flag&352)>>>0)===256;};Q.prototype.CanSet=function(){return this.$val.CanSet();};Q.ptr.prototype.Call=function(aw){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBe(19);new R(ax.flag).mustBeExported();ay=$clone(ax,Q).call("Call",aw);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:Q.ptr.prototype.Call,$c:true,$r,aw,ax,ay,az,$s};return $f;};Q.prototype.Call=function(aw){return this.$val.Call(aw);};Q.ptr.prototype.CallSlice=function(aw){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBe(19);new R(ax.flag).mustBeExported();ay=$clone(ax,Q).call("CallSlice",aw);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:Q.ptr.prototype.CallSlice,$c:true,$r,aw,ax,ay,az,$s};return $f;};Q.prototype.CallSlice=function(aw){return this.$val.CallSlice(aw);};Q.ptr.prototype.CanComplex=function(){var aw,ax;aw=this;ax=new R(aw.flag).kind();if((ax===(15))||(ax===(16))){return true;}else{return false;}};Q.prototype.CanComplex=function(){return this.$val.CanComplex();};Q.ptr.prototype.Complex=function(){var aw,ax,ay,az;aw=this;ax=new R(aw.flag).kind();ay=ax;if(ay===(15)){return((az=(aw.ptr).$get(),new $Complex128(az.$real,az.$imag)));}else if(ay===(16)){return(aw.ptr).$get();}$panic(new U.ptr("reflect.Value.Complex",new R(aw.flag).kind()));};Q.prototype.Complex=function(){return this.$val.Complex();};Q.ptr.prototype.FieldByIndex=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(aw.$length===1){$s=1;continue;}$s=2;continue;case 1:ay=$clone(ax,Q).Field((0>=aw.$length?($throwRuntimeError("index out of range"),undefined):aw.$array[aw.$offset+0]));$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=4;case 4:return az;case 2:new R(ax.flag).mustBe(25);ba=aw;bb=0;case 5:if(!(bb=ba.$length)?($throwRuntimeError("index out of range"),undefined):ba.$array[ba.$offset+bb]);if(bc>0){$s=7;continue;}$s=8;continue;case 7:if(!($clone(ax,Q).Kind()===22)){be=false;$s=11;continue s;}bf=ax.typ.Elem().Kind();$s=12;case 12:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}be=bf===25;case 11:if(be){$s=9;continue;}$s=10;continue;case 9:if($clone(ax,Q).IsNil()){$panic(new $String("reflect: indirection through nil pointer to embedded struct"));}bg=$clone(ax,Q).Elem();$s=13;case 13:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}ax=bg;case 10:case 8:bh=$clone(ax,Q).Field(bd);$s=14;case 14:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}ax=bh;bb++;$s=5;continue;case 6:$s=-1;return ax;}return;}var $f={$blk:Q.ptr.prototype.FieldByIndex,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,$s};return $f;};Q.prototype.FieldByIndex=function(aw){return this.$val.FieldByIndex(aw);};Q.ptr.prototype.FieldByIndexErr=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(aw.$length===1){$s=1;continue;}$s=2;continue;case 1:ay=$clone(ax,Q).Field((0>=aw.$length?($throwRuntimeError("index out of range"),undefined):aw.$array[aw.$offset+0]));$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=[ay,$ifaceNil];$s=4;case 4:return az;case 2:new R(ax.flag).mustBe(25);ba=aw;bb=0;case 5:if(!(bb=ba.$length)?($throwRuntimeError("index out of range"),undefined):ba.$array[ba.$offset+bb]);if(bc>0){$s=7;continue;}$s=8;continue;case 7:if(!($clone(ax,Q).Kind()===22)){be=false;$s=11;continue s;}bf=ax.typ.Elem().Kind();$s=12;case 12:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}be=bf===25;case 11:if(be){$s=9;continue;}$s=10;continue;case 9:if($clone(ax,Q).IsNil()){$s=13;continue;}$s=14;continue;case 13:bg=ax.typ.Elem().Name();$s=15;case 15:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=A.New("reflect: indirection through nil pointer to embedded struct field "+bg);$s=16;case 16:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=[new Q.ptr(JE.nil,0,0),bh];$s=17;case 17:return bi;case 14:bj=$clone(ax,Q).Elem();$s=18;case 18:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}ax=bj;case 10:case 8:bk=$clone(ax,Q).Field(bd);$s=19;case 19:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}ax=bk;bb++;$s=5;continue;case 6:$s=-1;return[ax,$ifaceNil];}return;}var $f={$blk:Q.ptr.prototype.FieldByIndexErr,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,$s};return $f;};Q.prototype.FieldByIndexErr=function(aw){return this.$val.FieldByIndexErr(aw);};Q.ptr.prototype.FieldByName=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBe(25);az=ax.typ.FieldByName(aw);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay=az;ba=$clone(ay[0],DM);bb=ay[1];if(bb){$s=2;continue;}$s=3;continue;case 2:bc=$clone(ax,Q).FieldByIndex(ba.Index);$s=4;case 4:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;$s=5;case 5:return bd;case 3:$s=-1;return new Q.ptr(JE.nil,0,0);}return;}var $f={$blk:Q.ptr.prototype.FieldByName,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};Q.prototype.FieldByName=function(aw){return this.$val.FieldByName(aw);};Q.ptr.prototype.FieldByNameFunc=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;az=ax.typ.FieldByNameFunc(aw);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay=az;ba=$clone(ay[0],DM);bb=ay[1];if(bb){$s=2;continue;}$s=3;continue;case 2:bc=$clone(ax,Q).FieldByIndex(ba.Index);$s=4;case 4:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;$s=5;case 5:return bd;case 3:$s=-1;return new Q.ptr(JE.nil,0,0);}return;}var $f={$blk:Q.ptr.prototype.FieldByNameFunc,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};Q.prototype.FieldByNameFunc=function(aw){return this.$val.FieldByNameFunc(aw);};Q.ptr.prototype.CanFloat=function(){var aw,ax;aw=this;ax=new R(aw.flag).kind();if((ax===(13))||(ax===(14))){return true;}else{return false;}};Q.prototype.CanFloat=function(){return this.$val.CanFloat();};Q.ptr.prototype.Float=function(){var aw,ax,ay;aw=this;ax=new R(aw.flag).kind();ay=ax;if(ay===(13)){return((aw.ptr).$get());}else if(ay===(14)){return(aw.ptr).$get();}$panic(new U.ptr("reflect.Value.Float",new R(aw.flag).kind()));};Q.prototype.Float=function(){return this.$val.Float();};Q.ptr.prototype.CanInt=function(){var aw,ax;aw=this;ax=new R(aw.flag).kind();if((ax===(2))||(ax===(3))||(ax===(4))||(ax===(5))||(ax===(6))){return true;}else{return false;}};Q.prototype.CanInt=function(){return this.$val.CanInt();};Q.ptr.prototype.Int=function(){var aw,ax,ay,az;aw=this;ax=new R(aw.flag).kind();ay=aw.ptr;az=ax;if(az===(2)){return(new $Int64(0,(ay).$get()));}else if(az===(3)){return(new $Int64(0,(ay).$get()));}else if(az===(4)){return(new $Int64(0,(ay).$get()));}else if(az===(5)){return(new $Int64(0,(ay).$get()));}else if(az===(6)){return(ay).$get();}$panic(new U.ptr("reflect.Value.Int",new R(aw.flag).kind()));};Q.prototype.Int=function(){return this.$val.Int();};Q.ptr.prototype.CanInterface=function(){var aw;aw=this;if(aw.flag===0){$panic(new U.ptr("reflect.Value.CanInterface",0));}return((aw.flag&96)>>>0)===0;};Q.prototype.CanInterface=function(){return this.$val.CanInterface();};Q.ptr.prototype.Interface=function(){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=$ifaceNil;ax=this;ay=IK($clone(ax,Q),true);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}aw=ay;az=aw;$s=2;case 2:return az;}return;}var $f={$blk:Q.ptr.prototype.Interface,$c:true,$r,aw,ax,ay,az,$s};return $f;};Q.prototype.Interface=function(){return this.$val.Interface();};Q.ptr.prototype.IsValid=function(){var aw;aw=this;return!((aw.flag===0));};Q.prototype.IsValid=function(){return this.$val.IsValid();};Q.ptr.prototype.IsZero=function(){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;ax=new R(aw.flag).kind();if(ax===(1)){$s=2;continue;}if((ax===(2))||(ax===(3))||(ax===(4))||(ax===(5))||(ax===(6))){$s=3;continue;}if((ax===(7))||(ax===(8))||(ax===(9))||(ax===(10))||(ax===(11))||(ax===(12))){$s=4;continue;}if((ax===(13))||(ax===(14))){$s=5;continue;}if((ax===(15))||(ax===(16))){$s=6;continue;}if(ax===(17)){$s=7;continue;}if((ax===(18))||(ax===(19))||(ax===(20))||(ax===(21))||(ax===(22))||(ax===(23))||(ax===(26))){$s=8;continue;}if(ax===(24)){$s=9;continue;}if(ax===(25)){$s=10;continue;}$s=11;continue;case 2:$s=-1;return!$clone(aw,Q).Bool();case 3:$s=-1;return(ay=$clone(aw,Q).Int(),(ay.$high===0&&ay.$low===0));case 4:$s=-1;return(az=$clone(aw,Q).Uint(),(az.$high===0&&az.$low===0));case 5:$s=-1;return(ba=F.Float64bits($clone(aw,Q).Float()),(ba.$high===0&&ba.$low===0));case 6:bb=$clone(aw,Q).Complex();$s=-1;return(bc=F.Float64bits(bb.$real),(bc.$high===0&&bc.$low===0))&&(bd=F.Float64bits(bb.$imag),(bd.$high===0&&bd.$low===0));case 7:be=0;case 13:if(!(be<$clone(aw,Q).Len())){$s=14;continue;}bf=$clone(aw,Q).Index(be);$s=17;case 17:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}bg=$clone(bf,Q).IsZero();$s=18;case 18:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}if(!bg){$s=15;continue;}$s=16;continue;case 15:$s=-1;return false;case 16:be=be+(1)>>0;$s=13;continue;case 14:$s=-1;return true;case 8:$s=-1;return $clone(aw,Q).IsNil();case 9:$s=-1;return $clone(aw,Q).Len()===0;case 10:bh=0;case 19:if(!(bh<$clone(aw,Q).NumField())){$s=20;continue;}bi=$clone(aw,Q).Field(bh);$s=23;case 23:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bj=$clone(bi,Q).IsZero();$s=24;case 24:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}if(!bj){$s=21;continue;}$s=22;continue;case 21:$s=-1;return false;case 22:bh=bh+(1)>>0;$s=19;continue;case 20:$s=-1;return true;case 11:$panic(new U.ptr("reflect.Value.IsZero",$clone(aw,Q).Kind()));case 12:case 1:$s=-1;return false;}return;}var $f={$blk:Q.ptr.prototype.IsZero,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s};return $f;};Q.prototype.IsZero=function(){return this.$val.IsZero();};Q.ptr.prototype.Kind=function(){var aw;aw=this;return new R(aw.flag).kind();};Q.prototype.Kind=function(){return this.$val.Kind();};Q.ptr.prototype.MapIndex=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBe(21);ay=(ax.typ.kindType);az=0;if((ay.key===AF||(new R(aw.flag).kind()===24))&&ay.key===aw.typ&&ay.elem.size<=128){$s=1;continue;}$s=2;continue;case 1:ba=(aw.ptr).$get();az=HX(ax.typ,$clone(ax,Q).pointer(),ba);$s=3;continue;case 2:bb=$clone(aw,Q).assignTo("reflect.Value.MapIndex",ay.key,0);$s=4;case 4:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}aw=bb;bc=0;if(!((((aw.flag&128)>>>0)===0))){bc=aw.ptr;}else{bc=((aw.$ptr_ptr||(aw.$ptr_ptr=new JV(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},aw))));}az=HU(ax.typ,$clone(ax,Q).pointer(),bc);case 3:if(az===0){$s=-1;return new Q.ptr(JE.nil,0,0);}bd=ay.elem;be=new R((((ax.flag|aw.flag)>>>0))).ro();be=(be|(((bd.Kind()>>>0))))>>>0;$s=-1;return AH(bd,be,az);}return;}var $f={$blk:Q.ptr.prototype.MapIndex,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};Q.prototype.MapIndex=function(aw){return this.$val.MapIndex(aw);};Q.ptr.prototype.MapKeys=function(){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=[aw];ax=this;new R(ax.flag).mustBe(21);ay=(ax.typ.kindType);az=ay.key;ba=(new R(ax.flag).ro()|((az.Kind()>>>0)))>>>0;bb=$clone(ax,Q).pointer();bc=0;if(!(bb===0)){bc=IF(bb);}aw[0]=new IA.ptr($ifaceNil,null,null,0,null);IB(ax.typ,bb,aw[0]);bd=$makeSlice(JO,bc);be=0;be=0;case 1:if(!(be=bd.$length)?($throwRuntimeError("index out of range"),undefined):bd.$array[bd.$offset+be]=AH(az,ba,bg));IE(aw[0]);be=be+(1)>>0;$s=1;continue;case 2:$s=-1;return $subslice(bd,0,be);}return;}var $f={$blk:Q.ptr.prototype.MapKeys,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,$s};return $f;};Q.prototype.MapKeys=function(){return this.$val.MapKeys();};IA.ptr.prototype.initialized=function(){var aw;aw=this;return!($interfaceIsEqual(aw.t,$ifaceNil));};IA.prototype.initialized=function(){return this.$val.initialized();};AG.ptr.prototype.Key=function(){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;if(!aw.hiter.initialized()){$panic(new $String("MapIter.Key called before Next"));}ax=IC(aw.hiter);$s=1;case 1:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}ay=ax;if(ay===0){$panic(new $String("MapIter.Key called on exhausted iterator"));}az=(aw.m.typ.kindType);ba=az.key;$s=-1;return AH(ba,(new R(aw.m.flag).ro()|((ba.Kind()>>>0)))>>>0,ay);}return;}var $f={$blk:AG.ptr.prototype.Key,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};AG.prototype.Key=function(){return this.$val.Key();};Q.ptr.prototype.SetIterKey=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(!aw.hiter.initialized()){$panic(new $String("reflect: Value.SetIterKey called before Next"));}ay=IC(aw.hiter);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;if(az===0){$panic(new $String("reflect: Value.SetIterKey called on exhausted iterator"));}new R(ax.flag).mustBeAssignable();ba=0;if(new R(ax.flag).kind()===20){ba=ax.ptr;}bb=(aw.m.typ.kindType);bc=bb.key;bd=new Q.ptr(bc,az,(((aw.m.flag|((bc.Kind()>>>0)))>>>0)|128)>>>0);be=$clone(bd,Q).assignTo("reflect.MapIter.SetKey",ax.typ,ba);$s=2;case 2:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bd=be;HP(ax.typ,ax.ptr,bd.ptr);$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.SetIterKey,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};Q.prototype.SetIterKey=function(aw){return this.$val.SetIterKey(aw);};AG.ptr.prototype.Value=function(){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;if(!aw.hiter.initialized()){$panic(new $String("MapIter.Value called before Next"));}ax=ID(aw.hiter);$s=1;case 1:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}ay=ax;if(ay===0){$panic(new $String("MapIter.Value called on exhausted iterator"));}az=(aw.m.typ.kindType);ba=az.elem;$s=-1;return AH(ba,(new R(aw.m.flag).ro()|((ba.Kind()>>>0)))>>>0,ay);}return;}var $f={$blk:AG.ptr.prototype.Value,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};AG.prototype.Value=function(){return this.$val.Value();};Q.ptr.prototype.SetIterValue=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(!aw.hiter.initialized()){$panic(new $String("reflect: Value.SetIterValue called before Next"));}ay=ID(aw.hiter);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;if(az===0){$panic(new $String("reflect: Value.SetIterValue called on exhausted iterator"));}new R(ax.flag).mustBeAssignable();ba=0;if(new R(ax.flag).kind()===20){ba=ax.ptr;}bb=(aw.m.typ.kindType);bc=bb.elem;bd=new Q.ptr(bc,az,(((aw.m.flag|((bc.Kind()>>>0)))>>>0)|128)>>>0);be=$clone(bd,Q).assignTo("reflect.MapIter.SetValue",ax.typ,ba);$s=2;case 2:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bd=be;HP(ax.typ,ax.ptr,bd.ptr);$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.SetIterValue,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};Q.prototype.SetIterValue=function(aw){return this.$val.SetIterValue(aw);};AG.ptr.prototype.Next=function(){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;if(!$clone(aw.m,Q).IsValid()){$panic(new $String("MapIter.Next called on an iterator that does not have an associated map Value"));}if(!aw.hiter.initialized()){$s=1;continue;}$s=2;continue;case 1:IB(aw.m.typ,$clone(aw.m,Q).pointer(),aw.hiter);$s=3;continue;case 2:ax=IC(aw.hiter);$s=6;case 6:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}if(ax===0){$s=4;continue;}$s=5;continue;case 4:$panic(new $String("MapIter.Next called on exhausted iterator"));case 5:IE(aw.hiter);case 3:ay=IC(aw.hiter);$s=7;case 7:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=!(ay===0);$s=8;case 8:return az;}return;}var $f={$blk:AG.ptr.prototype.Next,$c:true,$r,aw,ax,ay,az,$s};return $f;};AG.prototype.Next=function(){return this.$val.Next();};AG.ptr.prototype.Reset=function(aw){var aw,ax;ax=this;if($clone(aw,Q).IsValid()){new R(aw.flag).mustBe(21);}ax.m=aw;IA.copy(ax.hiter,new IA.ptr($ifaceNil,null,null,0,null));};AG.prototype.Reset=function(aw){return this.$val.Reset(aw);};Q.ptr.prototype.MapRange=function(){var aw;aw=this;new R(aw.flag).mustBe(21);return new AG.ptr($clone(aw,Q),new IA.ptr($ifaceNil,null,null,0,null));};Q.prototype.MapRange=function(){return this.$val.MapRange();};AH=function(aw,ax,ay){var aw,ax,ay,az;if(FD(aw)){az=HM(aw);HP(aw,az,ay);return new Q.ptr(aw,az,(ax|128)>>>0);}return new Q.ptr(aw,(ay).$get(),ax);};Q.ptr.prototype.Method=function(aw){var aw,ax,ay;ax=this;if(ax.typ===JE.nil){$panic(new U.ptr("reflect.Value.Method",0));}if(!((((ax.flag&512)>>>0)===0))||((aw>>>0))>=((ax.typ.NumMethod()>>>0))){$panic(new $String("reflect: Method index out of range"));}if((ax.typ.Kind()===20)&&$clone(ax,Q).IsNil()){$panic(new $String("reflect: Method on nil interface value"));}ay=(new R(ax.flag).ro()|(((ax.flag&128)>>>0)))>>>0;ay=(ay|(19))>>>0;ay=(ay|((((((aw>>>0))<<10>>>0)|512)>>>0)))>>>0;return new Q.ptr(ax.typ,ax.ptr,ay);};Q.prototype.Method=function(aw){return this.$val.Method(aw);};Q.ptr.prototype.NumMethod=function(){var aw;aw=this;if(aw.typ===JE.nil){$panic(new U.ptr("reflect.Value.NumMethod",0));}if(!((((aw.flag&512)>>>0)===0))){return 0;}return aw.typ.NumMethod();};Q.prototype.NumMethod=function(){return this.$val.NumMethod();};Q.ptr.prototype.MethodByName=function(aw){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(ax.typ===JE.nil){$panic(new U.ptr("reflect.Value.MethodByName",0));}if(!((((ax.flag&512)>>>0)===0))){$s=-1;return new Q.ptr(JE.nil,0,0);}az=ax.typ.MethodByName(aw);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay=az;ba=$clone(ay[0],DA);bb=ay[1];if(!bb){$s=-1;return new Q.ptr(JE.nil,0,0);}$s=-1;return $clone(ax,Q).Method(ba.Index);}return;}var $f={$blk:Q.ptr.prototype.MethodByName,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};Q.prototype.MethodByName=function(aw){return this.$val.MethodByName(aw);};Q.ptr.prototype.NumField=function(){var aw,ax;aw=this;new R(aw.flag).mustBe(25);ax=(aw.typ.kindType);return ax.fields.$length;};Q.prototype.NumField=function(){return this.$val.NumField();};Q.ptr.prototype.OverflowComplex=function(aw){var aw,ax,ay,az;ax=this;ay=new R(ax.flag).kind();az=ay;if(az===(15)){return AI(aw.$real)||AI(aw.$imag);}else if(az===(16)){return false;}$panic(new U.ptr("reflect.Value.OverflowComplex",new R(ax.flag).kind()));};Q.prototype.OverflowComplex=function(aw){return this.$val.OverflowComplex(aw);};Q.ptr.prototype.OverflowFloat=function(aw){var aw,ax,ay,az;ax=this;ay=new R(ax.flag).kind();az=ay;if(az===(13)){return AI(aw);}else if(az===(14)){return false;}$panic(new U.ptr("reflect.Value.OverflowFloat",new R(ax.flag).kind()));};Q.prototype.OverflowFloat=function(aw){return this.$val.OverflowFloat(aw);};AI=function(aw){var aw;if(aw<0){aw=-aw;}return 3.4028234663852886e+38>>0;bb=$shiftRightInt64(($shiftLeft64(aw,((64-ba>>>0)))),((64-ba>>>0)));return!((aw.$high===bb.$high&&aw.$low===bb.$low));}$panic(new U.ptr("reflect.Value.OverflowInt",new R(ax.flag).kind()));};Q.prototype.OverflowInt=function(aw){return this.$val.OverflowInt(aw);};Q.ptr.prototype.OverflowUint=function(aw){var aw,ax,ay,az,ba,bb;ax=this;ay=new R(ax.flag).kind();az=ay;if((az===(7))||(az===(12))||(az===(8))||(az===(9))||(az===(10))||(az===(11))){ba=$imul(ax.typ.size,8)>>>0;bb=$shiftRightUint64(($shiftLeft64(aw,((64-ba>>>0)))),((64-ba>>>0)));return!((aw.$high===bb.$high&&aw.$low===bb.$low));}$panic(new U.ptr("reflect.Value.OverflowUint",new R(ax.flag).kind()));};Q.prototype.OverflowUint=function(aw){return this.$val.OverflowUint(aw);};Q.ptr.prototype.Recv=function(){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=new Q.ptr(JE.nil,0,0);ax=false;ay=this;new R(ay.flag).mustBe(18);new R(ay.flag).mustBeExported();ba=$clone(ay,Q).recv(false);$s=1;case 1:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}az=ba;aw=az[0];ax=az[1];bb=[aw,ax];$s=2;case 2:return bb;}return;}var $f={$blk:Q.ptr.prototype.Recv,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};Q.prototype.Recv=function(){return this.$val.Recv();};Q.ptr.prototype.recv=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=new Q.ptr(JE.nil,0,0);ay=false;az=this;ba=(az.typ.kindType);if((((ba.dir>>0))&1)===0){$panic(new $String("reflect: recv on send-only channel"));}bb=ba.elem;ax=new Q.ptr(bb,0,((bb.Kind()>>>0)));bc=0;if(FD(bb)){bc=HM(bb);ax.ptr=bc;ax.flag=(ax.flag|(128))>>>0;}else{bc=((ax.$ptr_ptr||(ax.$ptr_ptr=new JV(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ax))));}be=IT($clone(az,Q).pointer(),aw,bc);$s=1;case 1:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bd=be;bf=bd[0];ay=bd[1];if(!bf){ax=new Q.ptr(JE.nil,0,0);}$s=-1;return[ax,ay];}return;}var $f={$blk:Q.ptr.prototype.recv,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s};return $f;};Q.prototype.recv=function(aw){return this.$val.recv(aw);};Q.ptr.prototype.Send=function(aw){var{aw,ax,ay,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBe(18);new R(ax.flag).mustBeExported();ay=$clone(ax,Q).send($clone(aw,Q),false);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}ay;$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.Send,$c:true,$r,aw,ax,ay,$s};return $f;};Q.prototype.Send=function(aw){return this.$val.Send(aw);};Q.ptr.prototype.send=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=false;az=this;ba=(az.typ.kindType);if((((ba.dir>>0))&2)===0){$panic(new $String("reflect: send on recv-only channel"));}new R(aw.flag).mustBeExported();bb=$clone(aw,Q).assignTo("reflect.Value.Send",ba.elem,0);$s=1;case 1:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}aw=bb;bc=0;if(!((((aw.flag&128)>>>0)===0))){bc=aw.ptr;}else{bc=((aw.$ptr_ptr||(aw.$ptr_ptr=new JV(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},aw))));}bd=IU($clone(az,Q).pointer(),bc,ax);$s=2;case 2:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}ay=bd;be=ay;$s=3;case 3:return be;}return;}var $f={$blk:Q.ptr.prototype.send,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};Q.prototype.send=function(aw,ax){return this.$val.send(aw,ax);};Q.ptr.prototype.SetBool=function(aw){var aw,ax;ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(1);(ax.ptr).$set(aw);};Q.prototype.SetBool=function(aw){return this.$val.SetBool(aw);};Q.ptr.prototype.setRunes=function(aw){var{aw,ax,ay,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(23);ay=ax.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}if(!((ay===5))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.setRunes of non-rune slice"));case 2:(ax.ptr).$set(aw);$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.setRunes,$c:true,$r,aw,ax,ay,$s};return $f;};Q.prototype.setRunes=function(aw){return this.$val.setRunes(aw);};Q.ptr.prototype.SetComplex=function(aw){var aw,ax,ay,az;ax=this;new R(ax.flag).mustBeAssignable();ay=new R(ax.flag).kind();az=ay;if(az===(15)){(ax.ptr).$set((new $Complex64(aw.$real,aw.$imag)));}else if(az===(16)){(ax.ptr).$set(aw);}else{$panic(new U.ptr("reflect.Value.SetComplex",new R(ax.flag).kind()));}};Q.prototype.SetComplex=function(aw){return this.$val.SetComplex(aw);};Q.ptr.prototype.SetFloat=function(aw){var aw,ax,ay,az;ax=this;new R(ax.flag).mustBeAssignable();ay=new R(ax.flag).kind();az=ay;if(az===(13)){(ax.ptr).$set(($fround(aw)));}else if(az===(14)){(ax.ptr).$set(aw);}else{$panic(new U.ptr("reflect.Value.SetFloat",new R(ax.flag).kind()));}};Q.prototype.SetFloat=function(aw){return this.$val.SetFloat(aw);};Q.ptr.prototype.SetInt=function(aw){var aw,ax,ay,az;ax=this;new R(ax.flag).mustBeAssignable();ay=new R(ax.flag).kind();az=ay;if(az===(2)){(ax.ptr).$set((((aw.$low+((aw.$high>>31)*4294967296))>>0)));}else if(az===(3)){(ax.ptr).$set((((aw.$low+((aw.$high>>31)*4294967296))<<24>>24)));}else if(az===(4)){(ax.ptr).$set((((aw.$low+((aw.$high>>31)*4294967296))<<16>>16)));}else if(az===(5)){(ax.ptr).$set((((aw.$low+((aw.$high>>31)*4294967296))>>0)));}else if(az===(6)){(ax.ptr).$set(aw);}else{$panic(new U.ptr("reflect.Value.SetInt",new R(ax.flag).kind()));}};Q.prototype.SetInt=function(aw){return this.$val.SetInt(aw);};Q.ptr.prototype.SetMapIndex=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=this;new R(ay.flag).mustBe(21);new R(ay.flag).mustBeExported();new R(aw.flag).mustBeExported();az=(ay.typ.kindType);if((az.key===AF||(new R(aw.flag).kind()===24))&&az.key===aw.typ&&az.elem.size<=128){$s=1;continue;}$s=2;continue;case 1:ba=(aw.ptr).$get();if(ax.typ===JE.nil){HZ(ay.typ,$clone(ay,Q).pointer(),ba);$s=-1;return;}new R(ax.flag).mustBeExported();bb=$clone(ax,Q).assignTo("reflect.Value.SetMapIndex",az.elem,0);$s=3;case 3:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}ax=bb;bc=0;if(!((((ax.flag&128)>>>0)===0))){bc=ax.ptr;}else{bc=((ax.$ptr_ptr||(ax.$ptr_ptr=new JV(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ax))));}$r=HY(ay.typ,$clone(ay,Q).pointer(),ba,bc);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 2:bd=$clone(aw,Q).assignTo("reflect.Value.SetMapIndex",az.key,0);$s=5;case 5:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}aw=bd;be=0;if(!((((aw.flag&128)>>>0)===0))){be=aw.ptr;}else{be=((aw.$ptr_ptr||(aw.$ptr_ptr=new JV(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},aw))));}if(ax.typ===JE.nil){HW(ay.typ,$clone(ay,Q).pointer(),be);$s=-1;return;}new R(ax.flag).mustBeExported();bf=$clone(ax,Q).assignTo("reflect.Value.SetMapIndex",az.elem,0);$s=6;case 6:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}ax=bf;bg=0;if(!((((ax.flag&128)>>>0)===0))){bg=ax.ptr;}else{bg=((ax.$ptr_ptr||(ax.$ptr_ptr=new JV(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ax))));}$r=HV(ay.typ,$clone(ay,Q).pointer(),be,bg);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.SetMapIndex,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,$s};return $f;};Q.prototype.SetMapIndex=function(aw,ax){return this.$val.SetMapIndex(aw,ax);};Q.ptr.prototype.SetUint=function(aw){var aw,ax,ay,az;ax=this;new R(ax.flag).mustBeAssignable();ay=new R(ax.flag).kind();az=ay;if(az===(7)){(ax.ptr).$set(((aw.$low>>>0)));}else if(az===(8)){(ax.ptr).$set(((aw.$low<<24>>>24)));}else if(az===(9)){(ax.ptr).$set(((aw.$low<<16>>>16)));}else if(az===(10)){(ax.ptr).$set(((aw.$low>>>0)));}else if(az===(11)){(ax.ptr).$set(aw);}else if(az===(12)){(ax.ptr).$set(((aw.$low>>>0)));}else{$panic(new U.ptr("reflect.Value.SetUint",new R(ax.flag).kind()));}};Q.prototype.SetUint=function(aw){return this.$val.SetUint(aw);};Q.ptr.prototype.SetPointer=function(aw){var aw,ax;ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(26);(ax.ptr).$set(aw);};Q.prototype.SetPointer=function(aw){return this.$val.SetPointer(aw);};Q.ptr.prototype.SetString=function(aw){var aw,ax;ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(24);(ax.ptr).$set(aw);};Q.prototype.SetString=function(aw){return this.$val.SetString(aw);};Q.ptr.prototype.String=function(){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;ax=new R(aw.flag).kind();ay=ax;if(ay===(0)){$s=-1;return"";}else if(ay===(24)){$s=-1;return(aw.ptr).$get();}az=$clone(aw,Q).Type().String();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba="<"+az+" Value>";$s=2;case 2:return ba;}return;}var $f={$blk:Q.ptr.prototype.String,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};Q.prototype.String=function(){return this.$val.String();};Q.ptr.prototype.TryRecv=function(){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=new Q.ptr(JE.nil,0,0);ax=false;ay=this;new R(ay.flag).mustBe(18);new R(ay.flag).mustBeExported();ba=$clone(ay,Q).recv(true);$s=1;case 1:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}az=ba;aw=az[0];ax=az[1];bb=[aw,ax];$s=2;case 2:return bb;}return;}var $f={$blk:Q.ptr.prototype.TryRecv,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};Q.prototype.TryRecv=function(){return this.$val.TryRecv();};Q.ptr.prototype.TrySend=function(aw){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBe(18);new R(ax.flag).mustBeExported();ay=$clone(ax,Q).send($clone(aw,Q),true);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:Q.ptr.prototype.TrySend,$c:true,$r,aw,ax,ay,az,$s};return $f;};Q.prototype.TrySend=function(aw){return this.$val.TrySend(aw);};Q.ptr.prototype.Type=function(){var aw,ax,ay,az,ba,bb,bc,bd;aw=this;ax=aw.flag;if(ax===0){$panic(new U.ptr("reflect.Value.Type",0));}if(((ax&512)>>>0)===0){return aw.typ;}ay=((aw.flag>>0))>>10>>0;if(aw.typ.Kind()===20){az=(aw.typ.kindType);if(((ay>>>0))>=((az.methods.$length>>>0))){$panic(new $String("reflect: internal error: invalid method index"));}bb=(ba=az.methods,((ay<0||ay>=ba.$length)?($throwRuntimeError("index out of range"),undefined):ba.$array[ba.$offset+ay]));return aw.typ.typeOff(bb.typ);}bc=aw.typ.exportedMethods();if(((ay>>>0))>=((bc.$length>>>0))){$panic(new $String("reflect: internal error: invalid method index"));}bd=$clone(((ay<0||ay>=bc.$length)?($throwRuntimeError("index out of range"),undefined):bc.$array[bc.$offset+ay]),CO);return aw.typ.typeOff(bd.mtyp);};Q.prototype.Type=function(){return this.$val.Type();};Q.ptr.prototype.CanUint=function(){var aw,ax;aw=this;ax=new R(aw.flag).kind();if((ax===(7))||(ax===(8))||(ax===(9))||(ax===(10))||(ax===(11))||(ax===(12))){return true;}else{return false;}};Q.prototype.CanUint=function(){return this.$val.CanUint();};Q.ptr.prototype.Uint=function(){var aw,ax,ay,az,ba;aw=this;ax=new R(aw.flag).kind();ay=aw.ptr;az=ax;if(az===(7)){return(new $Uint64(0,(ay).$get()));}else if(az===(8)){return(new $Uint64(0,(ay).$get()));}else if(az===(9)){return(new $Uint64(0,(ay).$get()));}else if(az===(10)){return(new $Uint64(0,(ay).$get()));}else if(az===(11)){return(ay).$get();}else if(az===(12)){return((ba=(ay).$get(),new $Uint64(0,ba.constructor===Number?ba:1)));}$panic(new U.ptr("reflect.Value.Uint",new R(aw.flag).kind()));};Q.prototype.Uint=function(){return this.$val.Uint();};Q.ptr.prototype.UnsafeAddr=function(){var aw;aw=this;if(aw.typ===JE.nil){$panic(new U.ptr("reflect.Value.UnsafeAddr",0));}if(((aw.flag&256)>>>0)===0){$panic(new $String("reflect.Value.UnsafeAddr of unaddressable value"));}return(aw.ptr);};Q.prototype.UnsafeAddr=function(){return this.$val.UnsafeAddr();};Q.ptr.prototype.UnsafePointer=function(){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=[aw];ax=this;ay=new R(ax.flag).kind();az=ay;if(az===(22)){$s=2;continue;}if((az===(18))||(az===(21))||(az===(26))){$s=3;continue;}if(az===(19)){$s=4;continue;}if(az===(23)){$s=5;continue;}$s=6;continue;case 2:if(ax.typ.ptrdata===0){if(!IZ((ax.ptr).$get())){$panic(new $String("reflect: reflect.Value.UnsafePointer on an invalid notinheap pointer"));}$s=-1;return(ax.ptr).$get();}$s=-1;return $clone(ax,Q).pointer();case 3:$s=-1;return $clone(ax,Q).pointer();case 4:if(!((((ax.flag&512)>>>0)===0))){$s=7;continue;}$s=8;continue;case 7:ba=FJ();$s=9;case 9:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}aw[0]=ba;$s=-1;return aw[0];case 8:bb=$clone(ax,Q).pointer();if(!(bb===0)){bb=(bb).$get();}$s=-1;return bb;case 5:$s=-1;return($pointerOfStructConversion(ax.ptr,JW)).Data;case 6:case 1:$panic(new U.ptr("reflect.Value.UnsafePointer",new R(ax.flag).kind()));$s=-1;return 0;}return;}var $f={$blk:Q.ptr.prototype.UnsafePointer,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};Q.prototype.UnsafePointer=function(){return this.$val.UnsafePointer();};Q.ptr.prototype.Convert=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(!((((ax.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:ay=IM("Convert",$clone(ax,Q));$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}ax=ay;case 2:az=aw.common();$s=4;case 4:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=BB(az,ax.typ);$s=5;case 5:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;if(bb===$throwNilPointerError){$s=6;continue;}$s=7;continue;case 6:bc=aw.String();$s=8;case 8:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}$panic(new $String("reflect.Value.Convert: value of type "+ax.typ.String()+" cannot be converted to type "+bc));case 7:bd=bb($clone(ax,Q),aw);$s=9;case 9:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd;$s=10;case 10:return be;}return;}var $f={$blk:Q.ptr.prototype.Convert,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};Q.prototype.Convert=function(aw){return this.$val.Convert(aw);};Q.ptr.prototype.CanConvert=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;ay=$clone(ax,Q).Type();az=ay.ConvertibleTo(aw);$s=3;case 3:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}if(!az){$s=1;continue;}$s=2;continue;case 1:$s=-1;return false;case 2:bc=ay.Kind();$s=8;case 8:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}if(!(bc===23)){bb=false;$s=7;continue s;}bd=aw.Kind();$s=9;case 9:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}bb=bd===22;case 7:if(!(bb)){ba=false;$s=6;continue s;}be=aw.Elem();$s=10;case 10:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bf=be.Kind();$s=11;case 11:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}ba=bf===17;case 6:if(ba){$s=4;continue;}$s=5;continue;case 4:bg=aw.Elem();$s=12;case 12:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=bg.Len();$s=13;case 13:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=bh;if(bi>$clone(ax,Q).Len()){$s=-1;return false;}case 5:$s=-1;return true;}return;}var $f={$blk:Q.ptr.prototype.CanConvert,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,$s};return $f;};Q.prototype.CanConvert=function(aw){return this.$val.CanConvert(aw);};BB=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=ax.Kind();if((ay===(2))||(ay===(3))||(ay===(4))||(ay===(5))||(ay===(6))){$s=2;continue;}if((ay===(7))||(ay===(8))||(ay===(9))||(ay===(10))||(ay===(11))||(ay===(12))){$s=3;continue;}if((ay===(13))||(ay===(14))){$s=4;continue;}if((ay===(15))||(ay===(16))){$s=5;continue;}if(ay===(24)){$s=6;continue;}if(ay===(23)){$s=7;continue;}if(ay===(18)){$s=8;continue;}$s=9;continue;case 2:az=aw.Kind();if((az===(2))||(az===(3))||(az===(4))||(az===(5))||(az===(6))||(az===(7))||(az===(8))||(az===(9))||(az===(10))||(az===(11))||(az===(12))){$s=-1;return BI;}else if((az===(13))||(az===(14))){$s=-1;return BM;}else if(az===(24)){$s=-1;return BQ;}$s=9;continue;case 3:ba=aw.Kind();if((ba===(2))||(ba===(3))||(ba===(4))||(ba===(5))||(ba===(6))||(ba===(7))||(ba===(8))||(ba===(9))||(ba===(10))||(ba===(11))||(ba===(12))){$s=-1;return BJ;}else if((ba===(13))||(ba===(14))){$s=-1;return BN;}else if(ba===(24)){$s=-1;return BR;}$s=9;continue;case 4:bb=aw.Kind();if((bb===(2))||(bb===(3))||(bb===(4))||(bb===(5))||(bb===(6))){$s=-1;return BK;}else if((bb===(7))||(bb===(8))||(bb===(9))||(bb===(10))||(bb===(11))||(bb===(12))){$s=-1;return BL;}else if((bb===(13))||(bb===(14))){$s=-1;return BO;}$s=9;continue;case 5:bc=aw.Kind();if((bc===(15))||(bc===(16))){$s=-1;return BP;}$s=9;continue;case 6:if(!(aw.Kind()===23)){bd=false;$s=12;continue s;}be=aw.Elem().PkgPath();$s=13;case 13:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bd=be==="";case 12:if(bd){$s=10;continue;}$s=11;continue;case 10:bf=aw.Elem().Kind();$s=15;case 15:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}bg=bf;if(bg===(8)){$s=-1;return BT;}else if(bg===(5)){$s=-1;return BV;}case 14:case 11:$s=9;continue;case 7:if(!(aw.Kind()===24)){bh=false;$s=18;continue s;}bi=ax.Elem().PkgPath();$s=19;case 19:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bh=bi==="";case 18:if(bh){$s=16;continue;}$s=17;continue;case 16:bj=ax.Elem().Kind();$s=21;case 21:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}bk=bj;if(bk===(8)){$s=-1;return BS;}else if(bk===(5)){$s=-1;return BU;}case 20:case 17:if(!(aw.Kind()===22)){bm=false;$s=25;continue s;}bn=aw.Elem().Kind();$s=26;case 26:if($c){$c=false;bn=bn.$blk();}if(bn&&bn.$blk!==undefined){break s;}bm=bn===17;case 25:if(!(bm)){bl=false;$s=24;continue s;}bo=aw.Elem().Elem();$s=27;case 27:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}bl=$interfaceIsEqual(ax.Elem(),bo);case 24:if(bl){$s=22;continue;}$s=23;continue;case 22:$s=-1;return IH;case 23:$s=9;continue;case 8:if(!(aw.Kind()===18)){bp=false;$s=30;continue s;}bq=DU(aw,ax);$s=31;case 31:if($c){$c=false;bq=bq.$blk();}if(bq&&bq.$blk!==undefined){break s;}bp=bq;case 30:if(bp){$s=28;continue;}$s=29;continue;case 28:$s=-1;return IG;case 29:case 9:case 1:br=DX(aw,ax,false);$s=34;case 34:if($c){$c=false;br=br.$blk();}if(br&&br.$blk!==undefined){break s;}if(br){$s=32;continue;}$s=33;continue;case 32:$s=-1;return IG;case 33:if(!((aw.Kind()===22)&&aw.Name()===""&&(ax.Kind()===22)&&ax.Name()==="")){bs=false;$s=37;continue s;}bt=aw.Elem().common();$s=38;case 38:if($c){$c=false;bt=bt.$blk();}if(bt&&bt.$blk!==undefined){break s;}bu=bt;bv=ax.Elem().common();$s=39;case 39:if($c){$c=false;bv=bv.$blk();}if(bv&&bv.$blk!==undefined){break s;}bw=bv;bx=DX(bu,bw,false);$s=40;case 40:if($c){$c=false;bx=bx.$blk();}if(bx&&bx.$blk!==undefined){break s;}bs=bx;case 37:if(bs){$s=35;continue;}$s=36;continue;case 35:$s=-1;return IG;case 36:if(DT(aw,ax)){if(ax.Kind()===20){$s=-1;return BX;}$s=-1;return BW;}$s=-1;return $throwNilPointerError;}return;}var $f={$blk:BB,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,$s};return $f;};BC=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=ay.common();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bb=HM(ba);bc=ba.size;if(bc===(4)){(bb).$set(($fround(ax)));}else if(bc===(8)){(bb).$set(ax);}$s=-1;return new Q.ptr(ba,bb,(((aw|128)>>>0)|((ba.Kind()>>>0)))>>>0);}return;}var $f={$blk:BC,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};BD=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=ay.common();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bb=HM(ba);(bb).$set(ax);$s=-1;return new Q.ptr(ba,bb,(((aw|128)>>>0)|((ba.Kind()>>>0)))>>>0);}return;}var $f={$blk:BD,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};BE=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=ay.common();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bb=HM(ba);bc=ba.size;if(bc===(8)){(bb).$set((new $Complex64(ax.$real,ax.$imag)));}else if(bc===(16)){(bb).$set(ax);}$s=-1;return new Q.ptr(ba,bb,(((aw|128)>>>0)|((ba.Kind()>>>0)))>>>0);}return;}var $f={$blk:BE,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};BF=function(aw,ax,ay){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=$clone(GH(ay),Q).Elem();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$clone(ba,Q).SetString(ax);ba.flag=(((ba.flag&~256)>>>0)|aw)>>>0;$s=-1;return ba;}return;}var $f={$blk:BF,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};BG=function(aw,ax,ay){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=$clone(GH(ay),Q).Elem();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$r=$clone(ba,Q).SetBytes(ax);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ba.flag=(((ba.flag&~256)>>>0)|aw)>>>0;$s=-1;return ba;}return;}var $f={$blk:BG,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};BH=function(aw,ax,ay){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=$clone(GH(ay),Q).Elem();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$r=$clone(ba,Q).setRunes(ax);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ba.flag=(((ba.flag&~256)>>>0)|aw)>>>0;$s=-1;return ba;}return;}var $f={$blk:BH,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};BI=function(aw,ax){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:az=HN(new R(aw.flag).ro(),((ay=$clone(aw,Q).Int(),new $Uint64(ay.$high,ay.$low))),ax);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$s=2;case 2:return ba;}return;}var $f={$blk:BI,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};BJ=function(aw,ax){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=HN(new R(aw.flag).ro(),$clone(aw,Q).Uint(),ax);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:BJ,$c:true,$r,aw,ax,ay,az,$s};return $f;};BK=function(aw,ax){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:az=HN(new R(aw.flag).ro(),((ay=(new $Int64(0,$clone(aw,Q).Float())),new $Uint64(ay.$high,ay.$low))),ax);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$s=2;case 2:return ba;}return;}var $f={$blk:BK,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};BL=function(aw,ax){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=HN(new R(aw.flag).ro(),(new $Uint64(0,$clone(aw,Q).Float())),ax);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:BL,$c:true,$r,aw,ax,ay,az,$s};return $f;};BM=function(aw,ax){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=BC(new R(aw.flag).ro(),($flatten64($clone(aw,Q).Int())),ax);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:BM,$c:true,$r,aw,ax,ay,az,$s};return $f;};BN=function(aw,ax){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=BC(new R(aw.flag).ro(),($flatten64($clone(aw,Q).Uint())),ax);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:BN,$c:true,$r,aw,ax,ay,az,$s};return $f;};BO=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:az=$clone(aw,Q).Type().Kind();$s=4;case 4:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}if(!(az===13)){ay=false;$s=3;continue s;}ba=ax.Kind();$s=5;case 5:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}ay=ba===13;case 3:if(ay){$s=1;continue;}$s=2;continue;case 1:bb=BD(new R(aw.flag).ro(),(aw.ptr).$get(),ax);$s=6;case 6:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;$s=7;case 7:return bc;case 2:bd=BC(new R(aw.flag).ro(),$clone(aw,Q).Float(),ax);$s=8;case 8:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd;$s=9;case 9:return be;}return;}var $f={$blk:BO,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};BP=function(aw,ax){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=BE(new R(aw.flag).ro(),$clone(aw,Q).Complex(),ax);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=2;case 2:return az;}return;}var $f={$blk:BP,$c:true,$r,aw,ax,ay,az,$s};return $f;};BQ=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay="\xEF\xBF\xBD";az=$clone(aw,Q).Int();if((ba=(new $Int64(0,(((az.$low+((az.$high>>31)*4294967296))>>0)))),(ba.$high===az.$high&&ba.$low===az.$low))){ay=($encodeRune((((az.$low+((az.$high>>31)*4294967296))>>0))));}bb=BF(new R(aw.flag).ro(),ay,ax);$s=1;case 1:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;$s=2;case 2:return bc;}return;}var $f={$blk:BQ,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};BR=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay="\xEF\xBF\xBD";az=$clone(aw,Q).Uint();if((ba=(new $Uint64(0,((az.$low>>0)))),(ba.$high===az.$high&&ba.$low===az.$low))){ay=($encodeRune(((az.$low>>0))));}bb=BF(new R(aw.flag).ro(),ay,ax);$s=1;case 1:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;$s=2;case 2:return bc;}return;}var $f={$blk:BR,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};BS=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=new R(aw.flag).ro();az=$clone(aw,Q).Bytes();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=($bytesToString(az));bb=ax;bc=BF(ay,ba,bb);$s=2;case 2:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;$s=3;case 3:return bd;}return;}var $f={$blk:BS,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};BT=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=new R(aw.flag).ro();az=$clone(aw,Q).String();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=(new JY($stringToBytes(az)));bb=ax;bc=BG(ay,ba,bb);$s=2;case 2:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;$s=3;case 3:return bd;}return;}var $f={$blk:BT,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};BU=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=new R(aw.flag).ro();az=$clone(aw,Q).runes();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=($runesToString(az));bb=ax;bc=BF(ay,ba,bb);$s=2;case 2:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;$s=3;case 3:return bd;}return;}var $f={$blk:BU,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};BV=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=new R(aw.flag).ro();az=$clone(aw,Q).String();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=(new JZ($stringToRunes(az)));bb=ax;bc=BH(ay,ba,bb);$s=2;case 2:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;$s=3;case 3:return bd;}return;}var $f={$blk:BV,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};BW=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=ax.common();$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=HM(ay);$s=2;case 2:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bb=IK($clone(aw,Q),false);$s=3;case 3:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;bd=ax.NumMethod();$s=7;case 7:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}if(bd===0){$s=4;continue;}$s=5;continue;case 4:(ba).$set(bc);$s=6;continue;case 5:IL($assertType(ax,JE),bc,ba);case 6:be=ax.common();$s=8;case 8:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bf=new Q.ptr(be,ba,(((new R(aw.flag).ro()|128)>>>0)|20)>>>0);$s=9;case 9:return bf;}return;}var $f={$blk:BW,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s};return $f;};BX=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:if($clone(aw,Q).IsNil()){$s=1;continue;}$s=2;continue;case 1:ay=HL(ax);$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;az.flag=(az.flag|(new R(aw.flag).ro()))>>>0;$s=-1;return az;case 2:ba=$clone(aw,Q).Elem();$s=4;case 4:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=BW($clone(ba,Q),ax);$s=5;case 5:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;$s=6;case 6:return bc;}return;}var $f={$blk:BX,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};CX.ptr.prototype.offset=function(){var aw;aw=this;return aw.offsetEmbed>>>1>>>0;};CX.prototype.offset=function(){return this.$val.offset();};CX.ptr.prototype.embedded=function(){var aw;aw=this;return!((((aw.offsetEmbed&1)>>>0)===0));};CX.prototype.embedded=function(){return this.$val.embedded();};DA.ptr.prototype.IsExported=function(){var aw;aw=this;return aw.PkgPath==="";};DA.prototype.IsExported=function(){return this.$val.IsExported();};CL.prototype.String=function(){var aw;aw=this.$val;if(((aw>>0))=DB.$length)?($throwRuntimeError("index out of range"),undefined):DB.$array[DB.$offset+aw]);}return"kind"+H.Itoa(((aw>>0)));};$ptrType(CL).prototype.String=function(){return new CL(this.$get()).String();};CN.ptr.prototype.String=function(){var aw,ax;aw=this;ax=$clone(aw.nameOff(aw.str),GO).name();if(!((((aw.tflag&2)>>>0)===0))){return $substring(ax,1);}return ax;};CN.prototype.String=function(){return this.$val.String();};CN.ptr.prototype.Size=function(){var aw;aw=this;return aw.size;};CN.prototype.Size=function(){return this.$val.Size();};CN.ptr.prototype.Bits=function(){var aw,ax;aw=this;if(aw===JE.nil){$panic(new $String("reflect: Bits of nil Type"));}ax=aw.Kind();if(ax<2||ax>16){$panic(new $String("reflect: Bits of non-arithmetic Type "+aw.String()));}return $imul(((aw.size>>0)),8);};CN.prototype.Bits=function(){return this.$val.Bits();};CN.ptr.prototype.Align=function(){var aw;aw=this;return((aw.align>>0));};CN.prototype.Align=function(){return this.$val.Align();};CN.ptr.prototype.FieldAlign=function(){var aw;aw=this;return((aw.fieldAlign>>0));};CN.prototype.FieldAlign=function(){return this.$val.FieldAlign();};CN.ptr.prototype.Kind=function(){var aw;aw=this;return((((aw.kind&31)>>>0)>>>0));};CN.prototype.Kind=function(){return this.$val.Kind();};CN.ptr.prototype.common=function(){var aw;aw=this;return aw;};CN.prototype.common=function(){return this.$val.common();};CN.ptr.prototype.exportedMethods=function(){var aw,ax;aw=this;ax=aw.uncommon();if(ax===KA.nil){return KB.nil;}return ax.exportedMethods();};CN.prototype.exportedMethods=function(){return this.$val.exportedMethods();};CN.ptr.prototype.NumMethod=function(){var aw,ax;aw=this;if(aw.Kind()===20){ax=(aw.kindType);return ax.NumMethod();}return aw.exportedMethods().$length;};CN.prototype.NumMethod=function(){return this.$val.NumMethod();};CN.ptr.prototype.MethodByName=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=new DA.ptr("","",$ifaceNil,new Q.ptr(JE.nil,0,0),0);ay=false;az=this;if(az.Kind()===20){ba=(az.kindType);bb=ba.MethodByName(aw);DA.copy(ax,bb[0]);ay=bb[1];$s=-1;return[ax,ay];}bc=az.uncommon();if(bc===KA.nil){bd=new DA.ptr("","",$ifaceNil,new Q.ptr(JE.nil,0,0),0);be=false;DA.copy(ax,bd);ay=be;$s=-1;return[ax,ay];}bf=bc.exportedMethods();bg=0;case 1:if(!(bg=bf.$length)?($throwRuntimeError("index out of range"),undefined):bf.$array[bf.$offset+bg]),CO);if($clone(az.nameOff(bi.name),GO).name()===aw){$s=3;continue;}$s=4;continue;case 3:bk=az.Method(bh);$s=5;case 5:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}bj=$clone(bk,DA);bl=true;DA.copy(ax,bj);ay=bl;bm=[ax,ay];$s=6;case 6:return bm;case 4:bg++;$s=1;continue;case 2:bn=new DA.ptr("","",$ifaceNil,new Q.ptr(JE.nil,0,0),0);bo=false;DA.copy(ax,bn);ay=bo;$s=-1;return[ax,ay];}return;}var $f={$blk:CN.ptr.prototype.MethodByName,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,$s};return $f;};CN.prototype.MethodByName=function(aw){return this.$val.MethodByName(aw);};CN.ptr.prototype.PkgPath=function(){var aw,ax;aw=this;if(((aw.tflag&4)>>>0)===0){return"";}ax=aw.uncommon();if(ax===KA.nil){return"";}return $clone(aw.nameOff(ax.pkgPath),GO).name();};CN.prototype.PkgPath=function(){return this.$val.PkgPath();};CN.ptr.prototype.hasName=function(){var aw;aw=this;return!((((aw.tflag&4)>>>0)===0));};CN.prototype.hasName=function(){return this.$val.hasName();};CN.ptr.prototype.Name=function(){var aw,ax,ay,az,ba;aw=this;if(!aw.hasName()){return"";}ax=aw.String();ay=ax.length-1>>0;az=0;while(true){if(!(ay>=0&&(!((ax.charCodeAt(ay)===46))||!((az===0))))){break;}ba=ax.charCodeAt(ay);if(ba===(93)){az=az+(1)>>0;}else if(ba===(91)){az=az-(1)>>0;}ay=ay-(1)>>0;}return $substring(ax,(ay+1>>0));};CN.prototype.Name=function(){return this.$val.Name();};CN.ptr.prototype.ChanDir=function(){var aw,ax;aw=this;if(!((aw.Kind()===18))){$panic(new $String("reflect: ChanDir of non-chan type "+aw.String()));}ax=(aw.kindType);return((ax.dir>>0));};CN.prototype.ChanDir=function(){return this.$val.ChanDir();};CN.ptr.prototype.IsVariadic=function(){var aw,ax;aw=this;if(!((aw.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type "+aw.String()));}ax=(aw.kindType);return!((((ax.outCount&32768)>>>0)===0));};CN.prototype.IsVariadic=function(){return this.$val.IsVariadic();};CN.ptr.prototype.Elem=function(){var aw,ax,ay,az,ba,bb,bc;aw=this;ax=aw.Kind();if(ax===(17)){ay=(aw.kindType);return EY(ay.elem);}else if(ax===(18)){az=(aw.kindType);return EY(az.elem);}else if(ax===(21)){ba=(aw.kindType);return EY(ba.elem);}else if(ax===(22)){bb=(aw.kindType);return EY(bb.elem);}else if(ax===(23)){bc=(aw.kindType);return EY(bc.elem);}$panic(new $String("reflect: Elem of invalid type "+aw.String()));};CN.prototype.Elem=function(){return this.$val.Elem();};CN.ptr.prototype.Field=function(aw){var aw,ax,ay;ax=this;if(!((ax.Kind()===25))){$panic(new $String("reflect: Field of non-struct type "+ax.String()));}ay=(ax.kindType);return ay.Field(aw);};CN.prototype.Field=function(aw){return this.$val.Field(aw);};CN.ptr.prototype.FieldByIndex=function(aw){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(!((ax.Kind()===25))){$panic(new $String("reflect: FieldByIndex of non-struct type "+ax.String()));}ay=(ax.kindType);az=ay.FieldByIndex(aw);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$s=2;case 2:return ba;}return;}var $f={$blk:CN.ptr.prototype.FieldByIndex,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};CN.prototype.FieldByIndex=function(aw){return this.$val.FieldByIndex(aw);};CN.ptr.prototype.FieldByName=function(aw){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(!((ax.Kind()===25))){$panic(new $String("reflect: FieldByName of non-struct type "+ax.String()));}ay=(ax.kindType);az=ay.FieldByName(aw);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$s=2;case 2:return ba;}return;}var $f={$blk:CN.ptr.prototype.FieldByName,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};CN.prototype.FieldByName=function(aw){return this.$val.FieldByName(aw);};CN.ptr.prototype.FieldByNameFunc=function(aw){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if(!((ax.Kind()===25))){$panic(new $String("reflect: FieldByNameFunc of non-struct type "+ax.String()));}ay=(ax.kindType);az=ay.FieldByNameFunc(aw);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$s=2;case 2:return ba;}return;}var $f={$blk:CN.ptr.prototype.FieldByNameFunc,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};CN.prototype.FieldByNameFunc=function(aw){return this.$val.FieldByNameFunc(aw);};CN.ptr.prototype.In=function(aw){var aw,ax,ay,az;ax=this;if(!((ax.Kind()===19))){$panic(new $String("reflect: In of non-func type "+ax.String()));}ay=(ax.kindType);return EY((az=ay.in$(),((aw<0||aw>=az.$length)?($throwRuntimeError("index out of range"),undefined):az.$array[az.$offset+aw])));};CN.prototype.In=function(aw){return this.$val.In(aw);};CN.ptr.prototype.Key=function(){var aw,ax;aw=this;if(!((aw.Kind()===21))){$panic(new $String("reflect: Key of non-map type "+aw.String()));}ax=(aw.kindType);return EY(ax.key);};CN.prototype.Key=function(){return this.$val.Key();};CN.ptr.prototype.Len=function(){var aw,ax;aw=this;if(!((aw.Kind()===17))){$panic(new $String("reflect: Len of non-array type "+aw.String()));}ax=(aw.kindType);return((ax.len>>0));};CN.prototype.Len=function(){return this.$val.Len();};CN.ptr.prototype.NumField=function(){var aw,ax;aw=this;if(!((aw.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type "+aw.String()));}ax=(aw.kindType);return ax.fields.$length;};CN.prototype.NumField=function(){return this.$val.NumField();};CN.ptr.prototype.NumIn=function(){var aw,ax;aw=this;if(!((aw.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type "+aw.String()));}ax=(aw.kindType);return((ax.inCount>>0));};CN.prototype.NumIn=function(){return this.$val.NumIn();};CN.ptr.prototype.NumOut=function(){var aw,ax;aw=this;if(!((aw.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type "+aw.String()));}ax=(aw.kindType);return ax.out().$length;};CN.prototype.NumOut=function(){return this.$val.NumOut();};CN.ptr.prototype.Out=function(aw){var aw,ax,ay,az;ax=this;if(!((ax.Kind()===19))){$panic(new $String("reflect: Out of non-func type "+ax.String()));}ay=(ax.kindType);return EY((az=ay.out(),((aw<0||aw>=az.$length)?($throwRuntimeError("index out of range"),undefined):az.$array[az.$offset+aw])));};CN.prototype.Out=function(aw){return this.$val.Out(aw);};CP.prototype.String=function(){var aw,ax;aw=this.$val;ax=aw;if(ax===(2)){return"chan<-";}else if(ax===(1)){return"<-chan";}else if(ax===(3)){return"chan";}return"ChanDir"+H.Itoa(((aw>>0)));};$ptrType(CP).prototype.String=function(){return new CP(this.$get()).String();};CT.ptr.prototype.Method=function(aw){var aw,ax,ay,az,ba,bb;ax=new DA.ptr("","",$ifaceNil,new Q.ptr(JE.nil,0,0),0);ay=this;if(aw<0||aw>=ay.methods.$length){return ax;}ba=(az=ay.methods,((aw<0||aw>=az.$length)?($throwRuntimeError("index out of range"),undefined):az.$array[az.$offset+aw]));bb=$clone(ay.rtype.nameOff(ba.name),GO);ax.Name=$clone(bb,GO).name();if(!$clone(bb,GO).isExported()){ax.PkgPath=$clone(bb,GO).pkgPath();if(ax.PkgPath===""){ax.PkgPath=$clone(ay.pkgPath,GO).name();}}ax.Type=EY(ay.rtype.typeOff(ba.typ));ax.Index=aw;return ax;};CT.prototype.Method=function(aw){return this.$val.Method(aw);};CT.ptr.prototype.NumMethod=function(){var aw;aw=this;return aw.methods.$length;};CT.prototype.NumMethod=function(){return this.$val.NumMethod();};CT.ptr.prototype.MethodByName=function(aw){var aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg;ax=new DA.ptr("","",$ifaceNil,new Q.ptr(JE.nil,0,0),0);ay=false;az=this;if(az===KC.nil){return[ax,ay];}ba=KD.nil;bb=az.methods;bc=0;while(true){if(!(bc=be.$length)?($throwRuntimeError("index out of range"),undefined):be.$array[be.$offset+bd]));if($clone(az.rtype.nameOff(ba.name),GO).name()===aw){bf=$clone(az.Method(bd),DA);bg=true;DA.copy(ax,bf);ay=bg;return[ax,ay];}bc++;}return[ax,ay];};CT.prototype.MethodByName=function(aw){return this.$val.MethodByName(aw);};DM.ptr.prototype.IsExported=function(){var aw;aw=this;return aw.PkgPath==="";};DM.prototype.IsExported=function(){return this.$val.IsExported();};DN.prototype.Get=function(aw){var aw,ax,ay,az;ax=this.$val;ay=new DN(ax).Lookup(aw);az=ay[0];return az;};$ptrType(DN).prototype.Get=function(aw){return new DN(this.$get()).Get(aw);};DN.prototype.Lookup=function(aw){var aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj;ax="";ay=false;az=this.$val;while(true){if(!(!(az===""))){break;}ba=0;while(true){if(!(ba>0;}az=$substring(az,ba);if(az===""){break;}ba=0;while(true){if(!(ba32&&!((az.charCodeAt(ba)===58))&&!((az.charCodeAt(ba)===34))&&!((az.charCodeAt(ba)===127)))){break;}ba=ba+(1)>>0;}if((ba===0)||(ba+1>>0)>=az.length||!((az.charCodeAt(ba)===58))||!((az.charCodeAt((ba+1>>0))===34))){break;}bb=($substring(az,0,ba));az=$substring(az,(ba+1>>0));ba=1;while(true){if(!(ba>0;}ba=ba+(1)>>0;}if(ba>=az.length){break;}bc=($substring(az,0,(ba+1>>0)));az=$substring(az,(ba+1>>0));if(aw===bb){bd=H.Unquote(bc);be=bd[0];bf=bd[1];if(!($interfaceIsEqual(bf,$ifaceNil))){break;}bg=be;bh=true;ax=bg;ay=bh;return[ax,ay];}}bi="";bj=false;ax=bi;ay=bj;return[ax,ay];};$ptrType(DN).prototype.Lookup=function(aw){return new DN(this.$get()).Lookup(aw);};CY.ptr.prototype.Field=function(aw){var aw,ax,ay,az,ba,bb;ax=new DM.ptr("","",$ifaceNil,"",0,JL.nil,false);ay=this;if(aw<0||aw>=ay.fields.$length){$panic(new $String("reflect: Field index out of bounds"));}ba=(az=ay.fields,((aw<0||aw>=az.$length)?($throwRuntimeError("index out of range"),undefined):az.$array[az.$offset+aw]));ax.Type=EY(ba.typ);ax.Name=$clone(ba.name,GO).name();ax.Anonymous=ba.embedded();if(!$clone(ba.name,GO).isExported()){ax.PkgPath=$clone(ay.pkgPath,GO).name();}bb=$clone(ba.name,GO).tag();if(!(bb==="")){ax.Tag=(bb);}ax.Offset=ba.offset();ax.Index=new JL([aw]);return ax;};CY.prototype.Field=function(aw){return this.$val.Field(aw);};CY.ptr.prototype.FieldByIndex=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=new DM.ptr("","",$ifaceNil,"",0,JL.nil,false);ay=this;ax.Type=EY(ay.rtype);az=aw;ba=0;case 1:if(!(ba=az.$length)?($throwRuntimeError("index out of range"),undefined):az.$array[az.$offset+ba]);if(bb>0){$s=3;continue;}$s=4;continue;case 3:bd=ax.Type;bf=bd.Kind();$s=8;case 8:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}if(!(bf===22)){be=false;$s=7;continue s;}bg=bd.Elem();$s=9;case 9:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=bg.Kind();$s=10;case 10:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}be=bh===25;case 7:if(be){$s=5;continue;}$s=6;continue;case 5:bi=bd.Elem();$s=11;case 11:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bd=bi;case 6:ax.Type=bd;case 4:bj=ax.Type.Field(bc);$s=12;case 12:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}DM.copy(ax,bj);ba++;$s=1;continue;case 2:$s=-1;return ax;}return;}var $f={$blk:CY.ptr.prototype.FieldByIndex,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s};return $f;};CY.prototype.FieldByIndex=function(aw){return this.$val.FieldByIndex(aw);};CY.ptr.prototype.FieldByNameFunc=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=new DM.ptr("","",$ifaceNil,"",0,JL.nil,false);ay=false;az=this;ba=new KE([]);bb=new KE([new DO.ptr(az,JL.nil)]);bc=false;bd=$makeMap(KF.keyFor,[]);case 1:if(!(bb.$length>0)){$s=2;continue;}be=bb;bf=$subslice(ba,0,0);ba=be;bb=bf;bg=bc;bc=false;bh=ba;bi=0;case 3:if(!(bi=bh.$length)?($throwRuntimeError("index out of range"),undefined):bh.$array[bh.$offset+bi]),DO);bk=bj.typ;if((bl=bd[KF.keyFor(bk)],bl!==undefined?bl.v:false)){bi++;$s=3;continue;}bm=bk;(bd||$throwRuntimeError("assignment to entry in nil map"))[KF.keyFor(bm)]={k:bm,v:true};bn=bk.fields;bo=0;case 5:if(!(bo=bq.$length)?($throwRuntimeError("index out of range"),undefined):bq.$array[bq.$offset+bp]));bs=$clone(br.name,GO).name();bt=JE.nil;if(br.embedded()){$s=7;continue;}$s=8;continue;case 7:bt=br.typ;if(bt.Kind()===22){$s=9;continue;}$s=10;continue;case 9:bu=bt.Elem().common();$s=11;case 11:if($c){$c=false;bu=bu.$blk();}if(bu&&bu.$blk!==undefined){break s;}bt=bu;case 10:case 8:bv=aw(bs);$s=14;case 14:if($c){$c=false;bv=bv.$blk();}if(bv&&bv.$blk!==undefined){break s;}if(bv){$s=12;continue;}$s=13;continue;case 12:if((bw=bg[KF.keyFor(bk)],bw!==undefined?bw.v:0)>1||ay){bx=new DM.ptr("","",$ifaceNil,"",0,JL.nil,false);by=false;DM.copy(ax,bx);ay=by;$s=-1;return[ax,ay];}DM.copy(ax,bk.Field(bp));ax.Index=JL.nil;ax.Index=$appendSlice(ax.Index,bj.index);ax.Index=$append(ax.Index,bp);ay=true;bo++;$s=5;continue;case 13:if(ay||bt===JE.nil||!((bt.Kind()===25))){bo++;$s=5;continue;}bz=(bt.kindType);if((ca=bc[KF.keyFor(bz)],ca!==undefined?ca.v:0)>0){cb=bz;(bc||$throwRuntimeError("assignment to entry in nil map"))[KF.keyFor(cb)]={k:cb,v:2};bo++;$s=5;continue;}if(bc===false){bc=$makeMap(KF.keyFor,[]);}cc=bz;(bc||$throwRuntimeError("assignment to entry in nil map"))[KF.keyFor(cc)]={k:cc,v:1};if((cd=bg[KF.keyFor(bk)],cd!==undefined?cd.v:0)>1){ce=bz;(bc||$throwRuntimeError("assignment to entry in nil map"))[KF.keyFor(ce)]={k:ce,v:2};}cf=JL.nil;cf=$appendSlice(cf,bj.index);cf=$append(cf,bp);bb=$append(bb,new DO.ptr(bz,cf));bo++;$s=5;continue;case 6:bi++;$s=3;continue;case 4:if(ay){$s=2;continue;}$s=1;continue;case 2:$s=-1;return[ax,ay];}return;}var $f={$blk:CY.ptr.prototype.FieldByNameFunc,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,$s};return $f;};CY.prototype.FieldByNameFunc=function(aw){return this.$val.FieldByNameFunc(aw);};CY.ptr.prototype.FieldByName=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:aw=[aw];ax=new DM.ptr("","",$ifaceNil,"",0,JL.nil,false);ay=false;az=this;ba=false;if(!(aw[0]==="")){bb=az.fields;bc=0;while(true){if(!(bc=be.$length)?($throwRuntimeError("index out of range"),undefined):be.$array[be.$offset+bd]));if($clone(bf.name,GO).name()===aw[0]){bg=$clone(az.Field(bd),DM);bh=true;DM.copy(ax,bg);ay=bh;$s=-1;return[ax,ay];}if(bf.embedded()){ba=true;}bc++;}}if(!ba){$s=-1;return[ax,ay];}bj=az.FieldByNameFunc((function(aw){return function(bj){var bj;return bj===aw[0];};})(aw));$s=1;case 1:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}bi=bj;DM.copy(ax,bi[0]);ay=bi[1];bk=[ax,ay];$s=2;case 2:return bk;}return;}var $f={$blk:CY.ptr.prototype.FieldByName,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,$s};return $f;};CY.prototype.FieldByName=function(aw){return this.$val.FieldByName(aw);};DQ=function(aw){var aw;return DR(aw);};$pkg.PtrTo=DQ;DR=function(aw){var aw;return $assertType(aw,JE).ptrTo();};$pkg.PointerTo=DR;CN.ptr.prototype.Implements=function(aw){var{aw,ax,ay,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if($interfaceIsEqual(aw,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}ay=aw.Kind();$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}if(!((ay===20))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect: non-interface type passed to Type.Implements"));case 2:$s=-1;return DT($assertType(aw,JE),ax);}return;}var $f={$blk:CN.ptr.prototype.Implements,$c:true,$r,aw,ax,ay,$s};return $f;};CN.prototype.Implements=function(aw){return this.$val.Implements(aw);};CN.ptr.prototype.AssignableTo=function(aw){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if($interfaceIsEqual(aw,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}ay=$assertType(aw,JE);az=DV(ay,ax);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az||DT(ay,ax);$s=2;case 2:return ba;}return;}var $f={$blk:CN.ptr.prototype.AssignableTo,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};CN.prototype.AssignableTo=function(aw){return this.$val.AssignableTo(aw);};CN.ptr.prototype.ConvertibleTo=function(aw){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;if($interfaceIsEqual(aw,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.ConvertibleTo"));}ay=$assertType(aw,JE);az=BB(ay,ax);$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=!(az===$throwNilPointerError);$s=2;case 2:return ba;}return;}var $f={$blk:CN.ptr.prototype.ConvertibleTo,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};CN.prototype.ConvertibleTo=function(aw){return this.$val.ConvertibleTo(aw);};DT=function(aw,ax){var aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu;if(!((aw.Kind()===20))){return false;}ay=(aw.kindType);if(ay.methods.$length===0){return true;}if(ax.Kind()===20){az=(ax.kindType);ba=0;bb=0;while(true){if(!(bb=bc.$length)?($throwRuntimeError("index out of range"),undefined):bc.$array[bc.$offset+ba]));be=$clone(ay.rtype.nameOff(bd.name),GO);bg=(bf=az.methods,((bb<0||bb>=bf.$length)?($throwRuntimeError("index out of range"),undefined):bf.$array[bf.$offset+bb]));bh=$clone(ax.nameOff(bg.name),GO);if($clone(bh,GO).name()===$clone(be,GO).name()&&ax.typeOff(bg.typ)===ay.rtype.typeOff(bd.typ)){if(!$clone(be,GO).isExported()){bi=$clone(be,GO).pkgPath();if(bi===""){bi=$clone(ay.pkgPath,GO).name();}bj=$clone(bh,GO).pkgPath();if(bj===""){bj=$clone(az.pkgPath,GO).name();}if(!(bi===bj)){bb=bb+(1)>>0;continue;}}ba=ba+(1)>>0;if(ba>=ay.methods.$length){return true;}}bb=bb+(1)>>0;}return false;}bk=ax.uncommon();if(bk===KA.nil){return false;}bl=0;bm=bk.methods();bn=0;while(true){if(!(bn<((bk.mcount>>0)))){break;}bp=(bo=ay.methods,((bl<0||bl>=bo.$length)?($throwRuntimeError("index out of range"),undefined):bo.$array[bo.$offset+bl]));bq=$clone(ay.rtype.nameOff(bp.name),GO);br=$clone(((bn<0||bn>=bm.$length)?($throwRuntimeError("index out of range"),undefined):bm.$array[bm.$offset+bn]),CO);bs=$clone(ax.nameOff(br.name),GO);if($clone(bs,GO).name()===$clone(bq,GO).name()&&ax.typeOff(br.mtyp)===ay.rtype.typeOff(bp.typ)){if(!$clone(bq,GO).isExported()){bt=$clone(bq,GO).pkgPath();if(bt===""){bt=$clone(ay.pkgPath,GO).name();}bu=$clone(bs,GO).pkgPath();if(bu===""){bu=$clone(ax.nameOff(bk.pkgPath),GO).name();}if(!(bt===bu)){bn=bn+(1)>>0;continue;}}bl=bl+(1)>>0;if(bl>=ay.methods.$length){return true;}}bn=bn+(1)>>0;}return false;};DU=function(aw,ax){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:if(!((ax.ChanDir()===3)&&(aw.Name()===""||ax.Name()===""))){ay=false;$s=1;continue s;}az=DW(aw.Elem(),ax.Elem(),true);$s=2;case 2:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay=az;case 1:ba=ay;$s=3;case 3:return ba;}return;}var $f={$blk:DU,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};DV=function(aw,ax){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:if(aw===ax){$s=-1;return true;}if(aw.hasName()&&ax.hasName()||!((aw.Kind()===ax.Kind()))){$s=-1;return false;}if(!(aw.Kind()===18)){ay=false;$s=3;continue s;}az=DU(aw,ax);$s=4;case 4:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay=az;case 3:if(ay){$s=1;continue;}$s=2;continue;case 1:$s=-1;return true;case 2:ba=DX(aw,ax,true);$s=5;case 5:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;$s=6;case 6:return bb;}return;}var $f={$blk:DV,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};DW=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:if(ay){$s=-1;return $interfaceIsEqual(aw,ax);}bb=aw.Name();$s=5;case 5:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=ax.Name();$s=6;case 6:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}if(!(bb===bc)){ba=true;$s=4;continue s;}bd=aw.Kind();$s=7;case 7:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=ax.Kind();$s=8;case 8:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}ba=!((bd===be));case 4:if(ba){az=true;$s=3;continue s;}bf=aw.PkgPath();$s=9;case 9:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}bg=ax.PkgPath();$s=10;case 10:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}az=!(bf===bg);case 3:if(az){$s=1;continue;}$s=2;continue;case 1:$s=-1;return false;case 2:bh=aw.common();$s=11;case 11:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=bh;bj=ax.common();$s=12;case 12:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}bk=bj;bl=DX(bi,bk,false);$s=13;case 13:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bm=bl;$s=14;case 14:return bm;}return;}var $f={$blk:DW,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,$s};return $f;};DX=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:if(aw===ax){$s=-1;return true;}az=aw.Kind();if(!((az===ax.Kind()))){$s=-1;return false;}if(1<=az&&az<=16||(az===24)||(az===26)){$s=-1;return true;}ba=az;if(ba===(17)){$s=2;continue;}if(ba===(18)){$s=3;continue;}if(ba===(19)){$s=4;continue;}if(ba===(20)){$s=5;continue;}if(ba===(21)){$s=6;continue;}if((ba===(22))||(ba===(23))){$s=7;continue;}if(ba===(25)){$s=8;continue;}$s=9;continue;case 2:if(!(aw.Len()===ax.Len())){bb=false;$s=10;continue s;}bc=DW(aw.Elem(),ax.Elem(),ay);$s=11;case 11:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bb=bc;case 10:bd=bb;$s=12;case 12:return bd;case 3:if(!(ax.ChanDir()===aw.ChanDir())){be=false;$s=13;continue s;}bf=DW(aw.Elem(),ax.Elem(),ay);$s=14;case 14:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}be=bf;case 13:bg=be;$s=15;case 15:return bg;case 4:bh=(aw.kindType);bi=(ax.kindType);if(!((bh.outCount===bi.outCount))||!((bh.inCount===bi.inCount))){$s=-1;return false;}bj=0;case 16:if(!(bj>0;$s=16;continue;case 17:bl=0;case 21:if(!(bl>0;$s=21;continue;case 22:$s=-1;return true;case 5:bn=(aw.kindType);bo=(ax.kindType);if((bn.methods.$length===0)&&(bo.methods.$length===0)){$s=-1;return true;}$s=-1;return false;case 6:bq=DW(aw.Key(),ax.Key(),ay);$s=27;case 27:if($c){$c=false;bq=bq.$blk();}if(bq&&bq.$blk!==undefined){break s;}if(!(bq)){bp=false;$s=26;continue s;}br=DW(aw.Elem(),ax.Elem(),ay);$s=28;case 28:if($c){$c=false;br=br.$blk();}if(br&&br.$blk!==undefined){break s;}bp=br;case 26:bs=bp;$s=29;case 29:return bs;case 7:bt=DW(aw.Elem(),ax.Elem(),ay);$s=30;case 30:if($c){$c=false;bt=bt.$blk();}if(bt&&bt.$blk!==undefined){break s;}bu=bt;$s=31;case 31:return bu;case 8:bv=(aw.kindType);bw=(ax.kindType);if(!((bv.fields.$length===bw.fields.$length))){$s=-1;return false;}if(!($clone(bv.pkgPath,GO).name()===$clone(bw.pkgPath,GO).name())){$s=-1;return false;}bx=bv.fields;by=0;case 32:if(!(by=ca.$length)?($throwRuntimeError("index out of range"),undefined):ca.$array[ca.$offset+bz]));cd=(cc=bw.fields,((bz<0||bz>=cc.$length)?($throwRuntimeError("index out of range"),undefined):cc.$array[cc.$offset+bz]));if(!($clone(cb.name,GO).name()===$clone(cd.name,GO).name())){$s=-1;return false;}ce=DW(cb.typ,cd.typ,ay);$s=36;case 36:if($c){$c=false;ce=ce.$blk();}if(ce&&ce.$blk!==undefined){break s;}if(!ce){$s=34;continue;}$s=35;continue;case 34:$s=-1;return false;case 35:if(ay&&!($clone(cb.name,GO).tag()===$clone(cd.name,GO).tag())){$s=-1;return false;}if(!((cb.offsetEmbed===cd.offsetEmbed))){$s=-1;return false;}by++;$s=32;continue;case 33:$s=-1;return true;case 9:case 1:$s=-1;return false;}return;}var $f={$blk:DX,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,$s};return $f;};EY=function(aw){var aw;if(aw===JE.nil){return $ifaceNil;}return aw;};FD=function(aw){var aw;return((aw.kind&32)>>>0)===0;};FJ=function(){var{aw,ax,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=B.FuncPCABI0(new KK(FK));$s=1;case 1:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}ax=aw;$s=2;case 2:return ax;}return;}var $f={$blk:FJ,$c:true,$r,aw,ax,$s};return $f;};FK=function(){$throwRuntimeError("native function not implemented: reflect.methodValueCall");};GG=function(){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=(function(aw){var aw;});$r=aw((ax=new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),new ax.constructor.elem(ax)));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((ay=new GL.ptr(0,0,0,0,KB.nil),new ay.constructor.elem(ay)));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((az=new CO.ptr(0,0,0,0),new az.constructor.elem(az)));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((ba=new CQ.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),JE.nil,JE.nil,0),new ba.constructor.elem(ba)));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bb=new CR.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),JE.nil,0),new bb.constructor.elem(bb)));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bc=new GN.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),0,0,JF.nil,JF.nil),new bc.constructor.elem(bc)));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bd=new CT.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),new GO.ptr(KG.nil),KN.nil),new bd.constructor.elem(bd)));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((be=new CU.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),JE.nil,JE.nil,JE.nil,$throwNilPointerError,0,0,0,0),new be.constructor.elem(be)));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bf=new CV.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),JE.nil),new bf.constructor.elem(bf)));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bg=new CW.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),JE.nil),new bg.constructor.elem(bg)));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bh=new CY.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),new GO.ptr(KG.nil),KO.nil),new bh.constructor.elem(bh)));$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bi=new CS.ptr(0,0),new bi.constructor.elem(bi)));$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=aw((bj=new CX.ptr(new GO.ptr(KG.nil),JE.nil,0),new bj.constructor.elem(bj)));$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}GF=true;AE=$assertType(HD(new $Uint8(0)),JE);$s=-1;return;}return;}var $f={$blk:GG,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s};return $f;};GH=function(aw){var aw,ax,ay,az,ba;if($interfaceIsEqual(aw,$ifaceNil)){$panic(new $String("reflect: New(nil)"));}ax=$assertType(aw,JE);ay=ax.ptrTo();az=HM(ax);ba=22;return new Q.ptr(ay,az,ba);};$pkg.New=GH;GI=function(aw){var aw;return aw.jsType;};GJ=function(aw){var aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci;if(aw.reflectType===undefined){ax=new CN.ptr(((($parseInt(aw.size)>>0)>>>0)),0,0,0,0,0,((($parseInt(aw.kind)>>0)<<24>>>24)),$throwNilPointerError,KG.nil,GU($clone(GR(GY(aw.string),"",!!(aw.exported)),GO)),0);ax.jsType=aw;aw.reflectType=ax;ay=$methodSet(aw);if(!(($parseInt(ay.length)===0))||!!(aw.named)){ax.tflag=(ax.tflag|(1))>>>0;if(!!(aw.named)){ax.tflag=(ax.tflag|(4))>>>0;}az=KB.nil;ba=0;while(true){if(!(ba<$parseInt(ay.length))){break;}bb=ay[ba];bc=GY(bb.pkg)==="";if(!bc){ba=ba+(1)>>0;continue;}az=$append(az,new CO.ptr(GU($clone(GS(bb),GO)),GW(GJ(bb.typ)),0,0));ba=ba+(1)>>0;}bd=((az.$length<<16>>>16));be=0;while(true){if(!(be<$parseInt(ay.length))){break;}bf=ay[be];bg=GY(bf.pkg)==="";if(bg){be=be+(1)>>0;continue;}az=$append(az,new CO.ptr(GU($clone(GS(bf),GO)),GW(GJ(bf.typ)),0,0));be=be+(1)>>0;}bh=new GL.ptr(GU($clone(GR(GY(aw.pkg),"",false),GO)),(($parseInt(ay.length)<<16>>>16)),bd,0,az);bi=ax;(GM||$throwRuntimeError("assignment to entry in nil map"))[JE.keyFor(bi)]={k:bi,v:bh};bh.jsType=aw;}bj=ax.Kind();if(bj===(17)){GK(ax,new CQ.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),GJ(aw.elem),JE.nil,((($parseInt(aw.len)>>0)>>>0))));}else if(bj===(18)){bk=3;if(!!(aw.sendOnly)){bk=2;}if(!!(aw.recvOnly)){bk=1;}GK(ax,new CR.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),GJ(aw.elem),((bk>>>0))));}else if(bj===(19)){bl=aw.params;bm=$makeSlice(JF,$parseInt(bl.length));bn=bm;bo=0;while(true){if(!(bo=bm.$length)?($throwRuntimeError("index out of range"),undefined):bm.$array[bm.$offset+bp]=GJ(bl[bp]));bo++;}bq=aw.results;br=$makeSlice(JF,$parseInt(bq.length));bs=br;bt=0;while(true){if(!(bt=br.$length)?($throwRuntimeError("index out of range"),undefined):br.$array[br.$offset+bu]=GJ(bq[bu]));bt++;}bv=(($parseInt(bq.length)<<16>>>16));if(!!(aw.variadic)){bv=(bv|(32768))>>>0;}GK(ax,new GN.ptr($clone(ax,CN),(($parseInt(bl.length)<<16>>>16)),bv,bm,br));}else if(bj===(20)){bw=aw.methods;bx=$makeSlice(KN,$parseInt(bw.length));by=bx;bz=0;while(true){if(!(bz=bx.$length)?($throwRuntimeError("index out of range"),undefined):bx.$array[bx.$offset+ca]),new CS.ptr(GU($clone(GS(cb),GO)),GW(GJ(cb.typ))));bz++;}GK(ax,new CT.ptr($clone(ax,CN),$clone(GR(GY(aw.pkg),"",false),GO),bx));}else if(bj===(21)){GK(ax,new CU.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),GJ(aw.key),GJ(aw.elem),JE.nil,$throwNilPointerError,0,0,0,0));}else if(bj===(22)){GK(ax,new CV.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),GJ(aw.elem)));}else if(bj===(23)){GK(ax,new CW.ptr(new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0),GJ(aw.elem)));}else if(bj===(25)){cc=aw.fields;cd=$makeSlice(KO,$parseInt(cc.length));ce=cd;cf=0;while(true){if(!(cf>>0))<<1>>>0;if(!!(ch.embedded)){ci=(ci|(1))>>>0;}CX.copy(((cg<0||cg>=cd.$length)?($throwRuntimeError("index out of range"),undefined):cd.$array[cd.$offset+cg]),new CX.ptr($clone(GR(GY(ch.name),GY(ch.tag),!!(ch.exported)),GO),GJ(ch.typ),ci));cf++;}GK(ax,new CY.ptr($clone(ax,CN),$clone(GR(GY(aw.pkgPath),"",false),GO),cd));}}return((aw.reflectType));};GK=function(aw,ax){var aw,ax;aw.kindType=ax;ax.rtype=aw;};GL.ptr.prototype.methods=function(){var aw;aw=this;return aw._methods;};GL.prototype.methods=function(){return this.$val.methods();};GL.ptr.prototype.exportedMethods=function(){var aw;aw=this;return $subslice(aw._methods,0,aw.xcount,aw.xcount);};GL.prototype.exportedMethods=function(){return this.$val.exportedMethods();};CN.ptr.prototype.uncommon=function(){var aw,ax;aw=this;return(ax=GM[JE.keyFor(aw)],ax!==undefined?ax.v:KA.nil);};CN.prototype.uncommon=function(){return this.$val.uncommon();};GN.ptr.prototype.in$=function(){var aw;aw=this;return aw._in;};GN.prototype.in$=function(){return this.$val.in$();};GN.ptr.prototype.out=function(){var aw;aw=this;return aw._out;};GN.prototype.out=function(){return this.$val.out();};GO.ptr.prototype.name=function(){var aw,ax,ay;aw="";ax=this;aw=(ay=GQ[KG.keyFor(ax.bytes)],ay!==undefined?ay.v:KP.nil).name;return aw;};GO.prototype.name=function(){return this.$val.name();};GO.ptr.prototype.tag=function(){var aw,ax,ay;aw="";ax=this;aw=(ay=GQ[KG.keyFor(ax.bytes)],ay!==undefined?ay.v:KP.nil).tag;return aw;};GO.prototype.tag=function(){return this.$val.tag();};GO.ptr.prototype.pkgPath=function(){var aw,ax;aw=this;return(ax=GQ[KG.keyFor(aw.bytes)],ax!==undefined?ax.v:KP.nil).pkgPath;};GO.prototype.pkgPath=function(){return this.$val.pkgPath();};GO.ptr.prototype.isExported=function(){var aw,ax;aw=this;return(ax=GQ[KG.keyFor(aw.bytes)],ax!==undefined?ax.v:KP.nil).exported;};GO.prototype.isExported=function(){return this.$val.isExported();};GR=function(aw,ax,ay){var aw,ax,ay,az,ba;az=$newDataPointer(0,KG);ba=az;(GQ||$throwRuntimeError("assignment to entry in nil map"))[KG.keyFor(ba)]={k:ba,v:new GP.ptr(aw,ax,ay,"")};return new GO.ptr(az);};GS=function(aw){var aw,ax,ay;ax=$newDataPointer(0,KG);ay=ax;(GQ||$throwRuntimeError("assignment to entry in nil map"))[KG.keyFor(ay)]={k:ay,v:new GP.ptr(GY(aw.name),"",GY(aw.pkg)==="",GY(aw.pkg))};return new GO.ptr(ax);};CN.ptr.prototype.nameOff=function(aw){var aw,ax,ay;ax=this;return(ay=((aw>>0)),((ay<0||ay>=GT.$length)?($throwRuntimeError("index out of range"),undefined):GT.$array[GT.$offset+ay]));};CN.prototype.nameOff=function(aw){return this.$val.nameOff(aw);};GU=function(aw){var aw,ax;ax=GT.$length;GT=$append(GT,aw);return((ax>>0));};CN.ptr.prototype.typeOff=function(aw){var aw,ax,ay;ax=this;return(ay=((aw>>0)),((ay<0||ay>=GV.$length)?($throwRuntimeError("index out of range"),undefined):GV.$array[GV.$offset+ay]));};CN.prototype.typeOff=function(aw){return this.$val.typeOff(aw);};GW=function(aw){var aw,ax;ax=GV.$length;GV=$append(GV,aw);return((ax>>0));};GY=function(aw){var aw,ax;ax=new KQ.ptr("");ax.str=aw;return ax.str;};GZ=function(aw){var aw;return!!(GI(aw).wrapped);};HA=function(aw,ax,ay){var aw,ax,ay,az,ba,bb;az=GI(ay).fields;ba=0;while(true){if(!(ba<$parseInt(az.length))){break;}bb=$internalize(az[ba].prop,$String);aw[$externalize(bb,$String)]=ax[$externalize(bb,$String)];ba=ba+(1)>>0;}};HB=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=aw.common();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bd=aw.Kind();$s=6;case 6:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}if(bd===17){bc=true;$s=5;continue s;}be=aw.Kind();$s=7;case 7:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bc=be===25;case 5:if(bc){bb=true;$s=4;continue s;}bf=aw.Kind();$s=8;case 8:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}bb=bf===22;case 4:if(bb){$s=2;continue;}$s=3;continue;case 2:bg=aw.Kind();$s=9;case 9:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=new Q.ptr(ba,(ax),(ay|((bg>>>0)))>>>0);$s=10;case 10:return bh;case 3:bi=aw.Kind();$s=11;case 11:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bj=new Q.ptr(ba,($newDataPointer(ax,GI(ba.ptrTo()))),(((ay|((bi>>>0)))>>>0)|128)>>>0);$s=12;case 12:return bj;}return;}var $f={$blk:HB,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s};return $f;};HC=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:aw=[aw];az=aw[0].Kind();$s=3;case 3:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}if(!((az===23))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.MakeSlice of non-slice type"));case 2:if(ax<0){$panic(new $String("reflect.MakeSlice: negative len"));}if(ay<0){$panic(new $String("reflect.MakeSlice: negative cap"));}if(ax>ay){$panic(new $String("reflect.MakeSlice: len > cap"));}ba=HB(aw[0],$makeSlice(GI(aw[0]),ax,ay,(function(aw){return function $b(){var{ba,bb,bc,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:ba=aw[0].Elem();$s=1;case 1:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=GI(ba);$s=2;case 2:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb.zero();$s=3;case 3:return bc;}return;}var $f={$blk:$b,$c:true,$r,ba,bb,bc,$s};return $f;};})(aw)),0);$s=4;case 4:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;$s=5;case 5:return bb;}return;}var $f={$blk:HC,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};$pkg.MakeSlice=HC;HD=function(aw){var aw;if(!GF){return new CN.ptr(0,0,0,0,0,0,0,$throwNilPointerError,KG.nil,0,0);}if($interfaceIsEqual(aw,$ifaceNil)){return $ifaceNil;}return GJ(aw.constructor);};$pkg.TypeOf=HD;HE=function(aw){var{aw,ax,ay,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:if($interfaceIsEqual(aw,$ifaceNil)){$s=-1;return new Q.ptr(JE.nil,0,0);}ax=HB(GJ(aw.constructor),aw.$val,0);$s=1;case 1:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}ay=ax;$s=2;case 2:return ay;}return;}var $f={$blk:HE,$c:true,$r,aw,ax,ay,$s};return $f;};$pkg.ValueOf=HE;HH=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:if(!(ay)){az=false;$s=3;continue s;}if(aw.$length===0){ba=true;$s=4;continue s;}bc=(bb=aw.$length-1>>0,((bb<0||bb>=aw.$length)?($throwRuntimeError("index out of range"),undefined):aw.$array[aw.$offset+bb])).Kind();$s=5;case 5:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}ba=!((bc===23));case 4:az=ba;case 3:if(az){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.FuncOf: last arg of variadic func must be slice"));case 2:bd=$makeSlice(KR,aw.$length);be=aw;bf=0;while(true){if(!(bf=be.$length)?($throwRuntimeError("index out of range"),undefined):be.$array[be.$offset+bf]);((bg<0||bg>=bd.$length)?($throwRuntimeError("index out of range"),undefined):bd.$array[bd.$offset+bg]=GI(bh));bf++;}bi=$makeSlice(KR,ax.$length);bj=ax;bk=0;while(true){if(!(bk=bj.$length)?($throwRuntimeError("index out of range"),undefined):bj.$array[bj.$offset+bk]);((bl<0||bl>=bi.$length)?($throwRuntimeError("index out of range"),undefined):bi.$array[bi.$offset+bl]=GI(bm));bk++;}$s=-1;return GJ($funcType($externalize(bd,KR),$externalize(bi,KR),$externalize(ay,$Bool)));}return;}var $f={$blk:HH,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,$s};return $f;};$pkg.FuncOf=HH;CN.ptr.prototype.ptrTo=function(){var aw;aw=this;return GJ($ptrType(GI(aw)));};CN.prototype.ptrTo=function(){return this.$val.ptrTo();};HJ=function(aw){var aw;return GJ($sliceType(GI(aw)));};$pkg.SliceOf=HJ;HL=function(aw){var{aw,ax,ay,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=HB(aw,GI(aw).zero(),0);$s=1;case 1:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}ay=ax;$s=2;case 2:return ay;}return;}var $f={$blk:HL,$c:true,$r,aw,ax,ay,$s};return $f;};$pkg.Zero=HL;HM=function(aw){var aw,ax;ax=aw.Kind();if(ax===(25)){return(new(GI(aw).ptr)());}else if(ax===(17)){return(GI(aw).zero());}else{return($newDataPointer(GI(aw).zero(),GI(aw.ptrTo())));}};HN=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=ay.common();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;bb=HM(ba);bc=ba.Kind();if(bc===(3)){(bb).$set(((ax.$low<<24>>24)));}else if(bc===(4)){(bb).$set(((ax.$low<<16>>16)));}else if((bc===(2))||(bc===(5))){(bb).$set(((ax.$low>>0)));}else if(bc===(6)){(bb).$set((new $Int64(ax.$high,ax.$low)));}else if(bc===(8)){(bb).$set(((ax.$low<<24>>>24)));}else if(bc===(9)){(bb).$set(((ax.$low<<16>>>16)));}else if((bc===(7))||(bc===(10))||(bc===(12))){(bb).$set(((ax.$low>>>0)));}else if(bc===(11)){(bb).$set((ax));}$s=-1;return new Q.ptr(ba,bb,(((aw|128)>>>0)|((ba.Kind()>>>0)))>>>0);}return;}var $f={$blk:HN,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};HP=function(aw,ax,ay){var aw,ax,ay;ax.$set(ay.$get());};HT=function(aw,ax){var aw,ax,ay,az;ay=ax;if(!(ay.$get===undefined)){ay=ay.$get();}az=$internalize(GI(aw.Key()).keyFor(ay),$String);return[ay,az];};HU=function(aw,ax,ay){var aw,ax,ay,az,ba,bb;az=HT(aw,ay);ba=az[1];bb=ax[$externalize(ba,$String)];if(bb===undefined){return 0;}return($newDataPointer(bb.v,GI(DQ(aw.Elem()))));};HV=function(aw,ax,ay,az){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,$s,$r,$c}=$restore(this,{aw,ax,ay,az});$s=$s||0;s:while(true){switch($s){case 0:ba=HT(aw,ay);bb=ba[0];bc=ba[1];bd=az.$get();be=aw.Elem();bf=be.Kind();$s=3;case 3:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}if(bf===25){$s=1;continue;}$s=2;continue;case 1:bg=GI(be).zero();HA(bg,bd,be);bd=bg;case 2:bh=new($global.Object)();bh.k=bb;bh.v=bd;ax[$externalize(bc,$String)]=bh;$s=-1;return;}return;}var $f={$blk:HV,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,$s};return $f;};HW=function(aw,ax,ay){var aw,ax,ay,az,ba;az=HT(aw,ay);ba=az[1];delete ax[$externalize(ba,$String)];};HX=function(aw,ax,ay){var aw,ax,ay,az,ba;az=0;az=HU(aw,ax,((ba||(ba=new KU(function(){return ay;},function($v){ay=$v;})))));return az;};HY=function(aw,ax,ay,az){var{aw,ax,ay,az,$s,$r,$c}=$restore(this,{aw,ax,ay,az});$s=$s||0;s:while(true){switch($s){case 0:ay=[ay];$r=HV(aw,ax,((ay.$ptr||(ay.$ptr=new KU(function(){return this.$target[0];},function($v){this.$target[0]=$v;},ay)))),az);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:HY,$c:true,$r,aw,ax,ay,az,$s};return $f;};HZ=function(aw,ax,ay){var aw,ax,ay,az;HW(aw,ax,((az||(az=new KU(function(){return ay;},function($v){ay=$v;})))));};IA.ptr.prototype.skipUntilValidKey=function(){var aw,ax;aw=this;while(true){if(!(aw.i<$parseInt(aw.keys.length))){break;}ax=aw.keys[aw.i];if(!(aw.m[$externalize($internalize(ax,$String),$String)]===undefined)){break;}aw.i=aw.i+(1)>>0;}};IA.prototype.skipUntilValidKey=function(){return this.$val.skipUntilValidKey();};IB=function(aw,ax,ay){var aw,ax,ay;IA.copy(ay,new IA.ptr(aw,ax,$keys(ax),0,null));};IC=function(aw){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=null;if(!(aw.last===null)){ax=aw.last;}else{aw.skipUntilValidKey();if(aw.i===$parseInt(aw.keys.length)){$s=-1;return 0;}ay=aw.keys[aw.i];ax=aw.m[$externalize($internalize(ay,$String),$String)];aw.last=ax;}az=aw.t.Key();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=DQ(az);$s=2;case 2:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=GI(ba);$s=3;case 3:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=($newDataPointer(ax.k,bb));$s=4;case 4:return bc;}return;}var $f={$blk:IC,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};ID=function(aw){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=null;if(!(aw.last===null)){ax=aw.last;}else{aw.skipUntilValidKey();if(aw.i===$parseInt(aw.keys.length)){$s=-1;return 0;}ay=aw.keys[aw.i];ax=aw.m[$externalize($internalize(ay,$String),$String)];aw.last=ax;}az=aw.t.Elem();$s=1;case 1:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=DQ(az);$s=2;case 2:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=GI(ba);$s=3;case 3:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=($newDataPointer(ax.v,bb));$s=4;case 4:return bc;}return;}var $f={$blk:ID,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};IE=function(aw){var aw;aw.last=null;aw.i=aw.i+(1)>>0;};IF=function(aw){var aw;return $parseInt($keys(aw).length);};IG=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=$clone(aw,Q).object();if(ay===GI(aw.typ).nil){$s=1;continue;}$s=2;continue;case 1:az=HB(ax,GI(ax).nil,aw.flag);$s=3;case 3:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=az;$s=4;case 4:return ba;case 2:bb=null;bc=ax.Kind();$s=6;case 6:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;be=bd;if(be===(23)){$s=7;continue;}if(be===(22)){$s=8;continue;}if(be===(25)){$s=9;continue;}if((be===(17))||(be===(1))||(be===(18))||(be===(19))||(be===(20))||(be===(21))||(be===(24))||(be===(26))){$s=10;continue;}$s=11;continue;case 7:bf=new(GI(ax))(ay.$array);bf.$offset=ay.$offset;bf.$length=ay.$length;bf.$capacity=ay.$capacity;bb=$newDataPointer(bf,GI(DQ(ax)));$s=12;continue;case 8:bg=ax.Elem();$s=14;case 14:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=bg.Kind();$s=15;case 15:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=bh;if(bi===(25)){$s=16;continue;}if(bi===(17)){$s=17;continue;}$s=18;continue;case 16:bj=ax.Elem();$s=22;case 22:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}if($interfaceIsEqual(bj,aw.typ.Elem())){$s=20;continue;}$s=21;continue;case 20:bb=ay;$s=13;continue;case 21:bb=new(GI(ax))();bk=bb;bl=ay;bm=ax.Elem();$s=23;case 23:if($c){$c=false;bm=bm.$blk();}if(bm&&bm.$blk!==undefined){break s;}bn=bm;$r=HA(bk,bl,bn);$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=19;continue;case 17:bb=ay;$s=19;continue;case 18:bb=new(GI(ax))(ay.$get,ay.$set);case 19:case 13:$s=12;continue;case 9:bb=new(GI(ax).ptr)();HA(bb,ay,ax);$s=12;continue;case 10:bb=aw.ptr;$s=12;continue;case 11:$panic(new U.ptr("reflect.Convert",bd));case 12:case 5:bo=ax.common();$s=25;case 25:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}bp=ax.Kind();$s=26;case 26:if($c){$c=false;bp=bp.$blk();}if(bp&&bp.$blk!==undefined){break s;}bq=new Q.ptr(bo,(bb),(((new R(aw.flag).ro()|((aw.flag&128)>>>0))>>>0)|((bp>>>0)))>>>0);$s=27;case 27:return bq;}return;}var $f={$blk:IG,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,$s};return $f;};IH=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=$clone(aw,Q).object();az=$parseInt(ay.$length)>>0;ba=ax.Elem();$s=1;case 1:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba.Len();$s=2;case 2:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;if(bc>az){$panic(new $String("reflect: cannot convert slice with length "+D.Itoa(az)+" to pointer to array with length "+D.Itoa(bc)));}bd=$sliceToGoArray(ay,GI(ax));be=ax.common();$s=3;case 3:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bf=new Q.ptr(be,(bd),(((aw.flag&~415)>>>0)|22)>>>0);$s=4;case 4:return bf;}return;}var $f={$blk:IH,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s};return $f;};IJ=function(aw,ax,ay){var aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi;az=JE.nil;ba=KV.nil;bb=0;bc="";if(ax.typ.Kind()===20){bd=(ax.typ.kindType);if(ay<0||ay>=bd.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}bf=(be=bd.methods,((ay<0||ay>=be.$length)?($throwRuntimeError("index out of range"),undefined):be.$array[be.$offset+ay]));if(!$clone(bd.rtype.nameOff(bf.name),GO).isExported()){$panic(new $String("reflect: "+aw+" of unexported method"));}ba=(bd.rtype.typeOff(bf.typ).kindType);bc=$clone(bd.rtype.nameOff(bf.name),GO).name();}else{bg=ax.typ.exportedMethods();if(((ay>>>0))>=((bg.$length>>>0))){$panic(new $String("reflect: internal error: invalid method index"));}bh=$clone(((ay<0||ay>=bg.$length)?($throwRuntimeError("index out of range"),undefined):bg.$array[bg.$offset+ay]),CO);if(!$clone(ax.typ.nameOff(bh.name),GO).isExported()){$panic(new $String("reflect: "+aw+" of unexported method"));}ba=(ax.typ.typeOff(bh.mtyp).kindType);bc=$internalize($methodSet(GI(ax.typ))[ay].prop,$String);}bi=$clone(ax,Q).object();if(GZ(ax.typ)){bi=new(GI(ax.typ))(bi);}bb=(bi[$externalize(bc,$String)]);return[az,ba,bb];};IK=function(aw,ax){var{aw,ax,ay,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:if(aw.flag===0){$panic(new U.ptr("reflect.Value.Interface",0));}if(ax&&!((((aw.flag&96)>>>0)===0))){$panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method"));}if(!((((aw.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:ay=IM("Interface",$clone(aw,Q));$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}aw=ay;case 2:if(GZ(aw.typ)){$s=-1;return((new(GI(aw.typ))($clone(aw,Q).object())));}$s=-1;return(($clone(aw,Q).object()));}return;}var $f={$blk:IK,$c:true,$r,aw,ax,ay,$s};return $f;};IL=function(aw,ax,ay){var aw,ax,ay;ay.$set(ax);};IM=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=[ay];az=[az];if(((ax.flag&512)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}ba=IJ(aw,$clone(ax,Q),((ax.flag>>0))>>10>>0);ay[0]=ba[2];az[0]=$clone(ax,Q).object();if(GZ(ax.typ)){az[0]=new(GI(ax.typ))(az[0]);}bb=N.MakeFunc((function(ay,az){return function(bb,bc){var bb,bc;return new $jsObjectPtr(ay[0].apply(az[0],$externalize(bc,KR)));};})(ay,az));bc=$clone(ax,Q).Type().common();$s=1;case 1:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=new Q.ptr(bc,(bb),(new R(ax.flag).ro()|19)>>>0);$s=2;case 2:return bd;}return;}var $f={$blk:IM,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,$s};return $f;};CN.ptr.prototype.pointers=function(){var aw,ax;aw=this;ax=aw.Kind();if((ax===(22))||(ax===(21))||(ax===(18))||(ax===(19))||(ax===(25))||(ax===(17))){return true;}else{return false;}};CN.prototype.pointers=function(){return this.$val.pointers();};CN.ptr.prototype.Comparable=function(){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;ax=aw.Kind();if((ax===(19))||(ax===(23))||(ax===(21))){$s=2;continue;}if(ax===(17)){$s=3;continue;}if(ax===(25)){$s=4;continue;}$s=5;continue;case 2:$s=-1;return false;case 3:ay=aw.Elem().Comparable();$s=6;case 6:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;$s=7;case 7:return az;case 4:ba=0;case 8:if(!(ba>0;$s=8;continue;case 9:case 5:case 1:$s=-1;return true;}return;}var $f={$blk:CN.ptr.prototype.Comparable,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};CN.prototype.Comparable=function(){return this.$val.Comparable();};CN.ptr.prototype.Method=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=[ax];ay=new DA.ptr("","",$ifaceNil,new Q.ptr(JE.nil,0,0),0);az=this;if(az.Kind()===20){ba=(az.kindType);DA.copy(ay,ba.Method(aw));$s=-1;return ay;}bb=az.exportedMethods();if(aw<0||aw>=bb.$length){$panic(new $String("reflect: Method index out of range"));}bc=$clone(((aw<0||aw>=bb.$length)?($throwRuntimeError("index out of range"),undefined):bb.$array[bb.$offset+aw]),CO);bd=$clone(az.nameOff(bc.name),GO);ay.Name=$clone(bd,GO).name();be=19;bf=az.typeOff(bc.mtyp);bg=(bf.kindType);bh=$makeSlice(KW,0,(1+bg.in$().$length>>0));bh=$append(bh,az);bi=bg.in$();bj=0;while(true){if(!(bj=bi.$length)?($throwRuntimeError("index out of range"),undefined):bi.$array[bi.$offset+bj]);bh=$append(bh,bk);bj++;}bl=$makeSlice(KW,0,bg.out().$length);bm=bg.out();bn=0;while(true){if(!(bn=bm.$length)?($throwRuntimeError("index out of range"),undefined):bm.$array[bm.$offset+bn]);bl=$append(bl,bo);bn++;}bp=HH(bh,bl,bg.rtype.IsVariadic());$s=1;case 1:if($c){$c=false;bp=bp.$blk();}if(bp&&bp.$blk!==undefined){break s;}bq=bp;ay.Type=bq;ax[0]=$internalize($methodSet(az.jsType)[aw].prop,$String);br=N.MakeFunc((function(ax){return function(br,bs){var br,bs,bt;bt=(0>=bs.$length?($throwRuntimeError("index out of range"),undefined):bs.$array[bs.$offset+0]);return new $jsObjectPtr(bt[$externalize(ax[0],$String)].apply(bt,$externalize($subslice(bs,1),KR)));};})(ax));ay.Func=new Q.ptr($assertType(bq,JE),(br),be);ay.Index=aw;DA.copy(ay,ay);$s=-1;return ay;}return;}var $f={$blk:CN.ptr.prototype.Method,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,$s};return $f;};CN.prototype.Method=function(aw){return this.$val.Method(aw);};Q.ptr.prototype.object=function(){var aw,ax,ay,az;aw=this;if((aw.typ.Kind()===17)||(aw.typ.Kind()===25)){return aw.ptr;}if(!((((aw.flag&128)>>>0)===0))){ax=aw.ptr.$get();if(!(ax===$ifaceNil)&&!(ax.constructor===GI(aw.typ))){switch(0){default:ay=aw.typ.Kind();if((ay===(11))||(ay===(6))){ax=new(GI(aw.typ))(ax.$high,ax.$low);}else if((ay===(15))||(ay===(16))){ax=new(GI(aw.typ))(ax.$real,ax.$imag);}else if(ay===(23)){if(ax===ax.constructor.nil){ax=GI(aw.typ).nil;break;}az=new(GI(aw.typ))(ax.$array);az.$offset=ax.$offset;az.$length=ax.$length;az.$capacity=ax.$capacity;ax=az;}}}return ax;}return aw.ptr;};Q.prototype.object=function(){return this.$val.object();};Q.ptr.prototype.assignTo=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=this;if(!((((az.flag&512)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:ba=IM(aw,$clone(az,Q));$s=3;case 3:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}az=ba;case 2:bb=DV(ax,az.typ);$s=8;case 8:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}if(bb){$s=5;continue;}if(DT(ax,az.typ)){$s=6;continue;}$s=7;continue;case 5:bc=(((az.flag&384)>>>0)|new R(az.flag).ro())>>>0;bc=(bc|(((ax.Kind()>>>0))))>>>0;$s=-1;return new Q.ptr(ax,az.ptr,bc);case 6:if(ay===0){ay=HM(ax);}bd=IK($clone(az,Q),false);$s=9;case 9:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd;if(ax.NumMethod()===0){(ay).$set(be);}else{IL(ax,be,ay);}$s=-1;return new Q.ptr(ax,ay,148);case 7:case 4:$panic(new $String(aw+": value of type "+az.typ.String()+" is not assignable to type "+ax.String()));$s=-1;return new Q.ptr(JE.nil,0,0);}return;}var $f={$blk:Q.ptr.prototype.assignTo,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,$s};return $f;};Q.prototype.assignTo=function(aw,ax,ay){return this.$val.assignTo(aw,ax,ay);};Q.ptr.prototype.call=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=this;az=KV.nil;ba=0;bb=null;if(!((((ay.flag&512)>>>0)===0))){bc=IJ(aw,$clone(ay,Q),((ay.flag>>0))>>10>>0);az=bc[1];ba=bc[2];bb=$clone(ay,Q).object();if(GZ(ay.typ)){bb=new(GI(ay.typ))(bb);}}else{az=(ay.typ.kindType);ba=($clone(ay,Q).object());bb=undefined;}if(ba===0){$panic(new $String("reflect.Value.Call: call of nil function"));}bd=aw==="CallSlice";be=az.rtype.NumIn();if(bd){if(!az.rtype.IsVariadic()){$panic(new $String("reflect: CallSlice of non-variadic function"));}if(ax.$lengthbe){$panic(new $String("reflect: CallSlice with too many input arguments"));}}else{if(az.rtype.IsVariadic()){be=be-(1)>>0;}if(ax.$lengthbe){$panic(new $String("reflect: Call with too many input arguments"));}}bf=ax;bg=0;while(true){if(!(bg=bf.$length)?($throwRuntimeError("index out of range"),undefined):bf.$array[bf.$offset+bg]);if($clone(bh,Q).Kind()===0){$panic(new $String("reflect: "+aw+" using zero Value argument"));}bg++;}bi=0;case 1:if(!(bi=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+bi]),Q).Type();bk=az.rtype.In(bi);bl=bj;bm=bk;bn=bl.AssignableTo(bm);$s=5;case 5:if($c){$c=false;bn=bn.$blk();}if(bn&&bn.$blk!==undefined){break s;}if(!bn){$s=3;continue;}$s=4;continue;case 3:bo=bl.String();$s=6;case 6:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}bp=bm.String();$s=7;case 7:if($c){$c=false;bp=bp.$blk();}if(bp&&bp.$blk!==undefined){break s;}$panic(new $String("reflect: "+aw+" using "+bo+" as type "+bp));case 4:bi=bi+(1)>>0;$s=1;continue;case 2:if(!bd&&az.rtype.IsVariadic()){$s=8;continue;}$s=9;continue;case 8:bq=ax.$length-be>>0;br=HC(az.rtype.In(be),bq,bq);$s=10;case 10:if($c){$c=false;br=br.$blk();}if(br&&br.$blk!==undefined){break s;}bs=br;bt=az.rtype.In(be).Elem();$s=11;case 11:if($c){$c=false;bt=bt.$blk();}if(bt&&bt.$blk!==undefined){break s;}bu=bt;bv=0;case 12:if(!(bv>0,((bw<0||bw>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+bw]));by=$clone(bx,Q).Type();bz=by.AssignableTo(bu);$s=16;case 16:if($c){$c=false;bz=bz.$blk();}if(bz&&bz.$blk!==undefined){break s;}if(!bz){$s=14;continue;}$s=15;continue;case 14:ca=by.String();$s=17;case 17:if($c){$c=false;ca=ca.$blk();}if(ca&&ca.$blk!==undefined){break s;}cb=bu.String();$s=18;case 18:if($c){$c=false;cb=cb.$blk();}if(cb&&cb.$blk!==undefined){break s;}$panic(new $String("reflect: cannot use "+ca+" as type "+cb+" in "+aw));case 15:cc=$clone(bs,Q).Index(bv);$s=19;case 19:if($c){$c=false;cc=cc.$blk();}if(cc&&cc.$blk!==undefined){break s;}$r=$clone(cc,Q).Set($clone(bx,Q));$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}bv=bv+(1)>>0;$s=12;continue;case 13:cd=ax;ax=$makeSlice(JO,(be+1>>0));$copySlice($subslice(ax,0,be),cd);((be<0||be>=ax.$length)?($throwRuntimeError("index out of range"),undefined):ax.$array[ax.$offset+be]=bs);case 9:ce=ax.$length;if(!((ce===az.rtype.NumIn()))){$panic(new $String("reflect.Value.Call: wrong argument count"));}cf=az.rtype.NumOut();cg=new($global.Array)(az.rtype.NumIn());ch=ax;ci=0;case 21:if(!(ci=ch.$length)?($throwRuntimeError("index out of range"),undefined):ch.$array[ch.$offset+ci]);cl=az.rtype.In(cj);cm=az.rtype.In(cj).common();$s=23;case 23:if($c){$c=false;cm=cm.$blk();}if(cm&&cm.$blk!==undefined){break s;}cn=cm;co=0;cp=$clone(ck,Q).assignTo("reflect.Value.Call",cn,co);$s=24;case 24:if($c){$c=false;cp=cp.$blk();}if(cp&&cp.$blk!==undefined){break s;}cq=$clone(cp,Q).object();$s=25;case 25:if($c){$c=false;cq=cq.$blk();}if(cq&&cq.$blk!==undefined){break s;}cr=cq;cs=IQ(cl,cr);$s=26;case 26:if($c){$c=false;cs=cs.$blk();}if(cs&&cs.$blk!==undefined){break s;}cg[cj]=cs;ci++;$s=21;continue;case 22:ct=IN(new JH([new $jsObjectPtr(ba),new $jsObjectPtr(bb),new $jsObjectPtr(cg)]));$s=27;case 27:if($c){$c=false;ct=ct.$blk();}if(ct&&ct.$blk!==undefined){break s;}cu=ct;cv=cf;if(cv===(0)){$s=29;continue;}if(cv===(1)){$s=30;continue;}$s=31;continue;case 29:$s=-1;return JO.nil;case 30:cw=HB(az.rtype.Out(0),IP(az.rtype.Out(0),cu),0);$s=33;case 33:if($c){$c=false;cw=cw.$blk();}if(cw&&cw.$blk!==undefined){break s;}cx=new JO([$clone(cw,Q)]);$s=34;case 34:return cx;case 31:cy=$makeSlice(JO,cf);cz=cy;da=0;case 35:if(!(da=cy.$length)?($throwRuntimeError("index out of range"),undefined):cy.$array[cy.$offset+db]=dc);da++;$s=35;continue;case 36:$s=-1;return cy;case 32:case 28:$s=-1;return JO.nil;}return;}var $f={$blk:Q.ptr.prototype.call,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,$s};return $f;};Q.prototype.call=function(aw,ax){return this.$val.call(aw,ax);};Q.ptr.prototype.Cap=function(){var aw,ax,ay;aw=this;ax=new R(aw.flag).kind();ay=ax;if(ay===(17)){return aw.typ.Len();}else if((ay===(18))||(ay===(23))){return $parseInt($clone(aw,Q).object().$capacity)>>0;}$panic(new U.ptr("reflect.Value.Cap",ax));};Q.prototype.Cap=function(){return this.$val.Cap();};IP=function(aw,ax){var aw,ax;if($interfaceIsEqual(aw,IO)){return new(GI(IO))(ax);}return ax;};IQ=function(aw,ax){var aw,ax;if($interfaceIsEqual(aw,IO)){return ax.object;}return ax;};Q.ptr.prototype.Elem=function(){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:aw=this;ax=new R(aw.flag).kind();ay=ax;if(ay===(20)){$s=2;continue;}if(ay===(22)){$s=3;continue;}$s=4;continue;case 2:az=$clone(aw,Q).object();if(az===$ifaceNil){$s=-1;return new Q.ptr(JE.nil,0,0);}ba=GJ(az.constructor);bb=HB(ba,az.$val,new R(aw.flag).ro());$s=6;case 6:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;$s=7;case 7:return bc;case 3:if($clone(aw,Q).IsNil()){$s=-1;return new Q.ptr(JE.nil,0,0);}bd=$clone(aw,Q).object();be=(aw.typ.kindType);bf=(((((aw.flag&96)>>>0)|128)>>>0)|256)>>>0;bf=(bf|(((be.elem.Kind()>>>0))))>>>0;$s=-1;return new Q.ptr(be.elem,(IP(be.elem,bd)),bf);case 4:$panic(new U.ptr("reflect.Value.Elem",ax));case 5:case 1:$s=-1;return new Q.ptr(JE.nil,0,0);}return;}var $f={$blk:Q.ptr.prototype.Elem,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,$s};return $f;};Q.prototype.Elem=function(){return this.$val.Elem();};Q.ptr.prototype.Field=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=[ax];ay=[ay];az=[az];ba=[ba];bb=this;if(!((new R(bb.flag).kind()===25))){$panic(new U.ptr("reflect.Value.Field",new R(bb.flag).kind()));}bc=(bb.typ.kindType);if(((aw>>>0))>=((bc.fields.$length>>>0))){$panic(new $String("reflect: Field index out of range"));}ay[0]=$internalize(GI(bb.typ).fields[aw].prop,$String);be=(bd=bc.fields,((aw<0||aw>=bd.$length)?($throwRuntimeError("index out of range"),undefined):bd.$array[bd.$offset+aw]));ba[0]=be.typ;bf=(((bb.flag&416)>>>0)|((ba[0].Kind()>>>0)))>>>0;if(!$clone(be.name,GO).isExported()){if(be.embedded()){bf=(bf|(64))>>>0;}else{bf=(bf|(32))>>>0;}}bh=$clone((bg=bc.fields,((aw<0||aw>=bg.$length)?($throwRuntimeError("index out of range"),undefined):bg.$array[bg.$offset+aw])).name,GO).tag();if(!(bh==="")&&!((aw===0))){$s=1;continue;}$s=2;continue;case 1:ax[0]=IR(bh);if(!(ax[0]==="")){$s=3;continue;}$s=4;continue;case 3:case 5:bi=[bi];bj=$clone(bb,Q).Field(0);$s=7;case 7:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}bb=bj;if(bb.typ===IO){$s=8;continue;}$s=9;continue;case 8:bi[0]=$clone(bb,Q).object().object;$s=-1;return new Q.ptr(ba[0],(new(GI(DQ(ba[0])))((function(ax,ay,az,ba,bi){return function(){return $internalize(bi[0][$externalize(ax[0],$String)],GI(ba[0]));};})(ax,ay,az,ba,bi),(function(ax,ay,az,ba,bi){return function(bk){var bk;bi[0][$externalize(ax[0],$String)]=$externalize(bk,GI(ba[0]));};})(ax,ay,az,ba,bi))),bf);case 9:if(bb.typ.Kind()===22){$s=10;continue;}$s=11;continue;case 10:bk=$clone(bb,Q).Elem();$s=12;case 12:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}bb=bk;case 11:$s=5;continue;case 6:case 4:case 2:az[0]=bb.ptr;if(!((((bf&128)>>>0)===0))&&!((ba[0].Kind()===17))&&!((ba[0].Kind()===25))){$s=13;continue;}$s=14;continue;case 13:$s=-1;return new Q.ptr(ba[0],(new(GI(DQ(ba[0])))((function(ax,ay,az,ba){return function(){return IP(ba[0],az[0][$externalize(ay[0],$String)]);};})(ax,ay,az,ba),(function(ax,ay,az,ba){return function(bl){var bl;az[0][$externalize(ay[0],$String)]=IQ(ba[0],bl);};})(ax,ay,az,ba))),bf);case 14:bl=HB(ba[0],IP(ba[0],az[0][$externalize(ay[0],$String)]),bf);$s=15;case 15:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bm=bl;$s=16;case 16:return bm;}return;}var $f={$blk:Q.ptr.prototype.Field,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,$s};return $f;};Q.prototype.Field=function(aw){return this.$val.Field(aw);};IR=function(aw){var aw,ax,ay,az,ba,bb;while(true){if(!(!(aw===""))){break;}ax=0;while(true){if(!(ax>0;}aw=$substring(aw,ax);if(aw===""){break;}ax=0;while(true){if(!(ax>0;}if((ax+1>>0)>=aw.length||!((aw.charCodeAt(ax)===58))||!((aw.charCodeAt((ax+1>>0))===34))){break;}ay=($substring(aw,0,ax));aw=$substring(aw,(ax+1>>0));ax=1;while(true){if(!(ax>0;}ax=ax+(1)>>0;}if(ax>=aw.length){break;}az=($substring(aw,0,(ax+1>>0)));aw=$substring(aw,(ax+1>>0));if(ay==="js"){ba=H.Unquote(az);bb=ba[0];return bb;}}return"";};Q.ptr.prototype.Index=function(aw){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:aw=[aw];ax=[ax];ay=[ay];az=[az];ba=[ba];bb=[bb];bc=this;bd=new R(bc.flag).kind();be=bd;if(be===(17)){$s=2;continue;}if(be===(23)){$s=3;continue;}if(be===(24)){$s=4;continue;}$s=5;continue;case 2:bf=(bc.typ.kindType);if(aw[0]<0||aw[0]>((bf.len>>0))){$panic(new $String("reflect: array index out of range"));}ba[0]=bf.elem;bg=(((((bc.flag&384)>>>0)|new R(bc.flag).ro())>>>0)|((ba[0].Kind()>>>0)))>>>0;ax[0]=bc.ptr;if(!((((bg&128)>>>0)===0))&&!((ba[0].Kind()===17))&&!((ba[0].Kind()===25))){$s=7;continue;}$s=8;continue;case 7:$s=-1;return new Q.ptr(ba[0],(new(GI(DQ(ba[0])))((function(aw,ax,ay,az,ba,bb){return function(){return IP(ba[0],ax[0][aw[0]]);};})(aw,ax,ay,az,ba,bb),(function(aw,ax,ay,az,ba,bb){return function(bh){var bh;ax[0][aw[0]]=IQ(ba[0],bh);};})(aw,ax,ay,az,ba,bb))),bg);case 8:bh=HB(ba[0],IP(ba[0],ax[0][aw[0]]),bg);$s=9;case 9:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=bh;$s=10;case 10:return bi;case 3:bj=$clone(bc,Q).object();if(aw[0]<0||aw[0]>=($parseInt(bj.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}bk=(bc.typ.kindType);bb[0]=bk.elem;bl=(((384|new R(bc.flag).ro())>>>0)|((bb[0].Kind()>>>0)))>>>0;aw[0]=aw[0]+(($parseInt(bj.$offset)>>0))>>0;ay[0]=bj.$array;if(!((((bl&128)>>>0)===0))&&!((bb[0].Kind()===17))&&!((bb[0].Kind()===25))){$s=11;continue;}$s=12;continue;case 11:$s=-1;return new Q.ptr(bb[0],(new(GI(DQ(bb[0])))((function(aw,ax,ay,az,ba,bb){return function(){return IP(bb[0],ay[0][aw[0]]);};})(aw,ax,ay,az,ba,bb),(function(aw,ax,ay,az,ba,bb){return function(bm){var bm;ay[0][aw[0]]=IQ(bb[0],bm);};})(aw,ax,ay,az,ba,bb))),bl);case 12:bm=HB(bb[0],IP(bb[0],ay[0][aw[0]]),bl);$s=13;case 13:if($c){$c=false;bm=bm.$blk();}if(bm&&bm.$blk!==undefined){break s;}bn=bm;$s=14;case 14:return bn;case 4:bo=(bc.ptr).$get();if(aw[0]<0||aw[0]>=bo.length){$panic(new $String("reflect: string index out of range"));}bp=(((new R(bc.flag).ro()|8)>>>0)|128)>>>0;az[0]=bo.charCodeAt(aw[0]);$s=-1;return new Q.ptr(AE,((az.$ptr||(az.$ptr=new KG(function(){return this.$target[0];},function($v){this.$target[0]=$v;},az)))),bp);case 5:$panic(new U.ptr("reflect.Value.Index",bd));case 6:case 1:$s=-1;return new Q.ptr(JE.nil,0,0);}return;}var $f={$blk:Q.ptr.prototype.Index,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,$s};return $f;};Q.prototype.Index=function(aw){return this.$val.Index(aw);};Q.ptr.prototype.InterfaceData=function(){var aw;aw=this;$panic(A.New("InterfaceData is not supported by GopherJS"));};Q.prototype.InterfaceData=function(){return this.$val.InterfaceData();};Q.ptr.prototype.IsNil=function(){var aw,ax,ay;aw=this;ax=new R(aw.flag).kind();ay=ax;if((ay===(22))||(ay===(23))){return $clone(aw,Q).object()===GI(aw.typ).nil;}else if(ay===(18)){return $clone(aw,Q).object()===$chanNil;}else if(ay===(19)){return $clone(aw,Q).object()===$throwNilPointerError;}else if(ay===(21)){return $clone(aw,Q).object()===false;}else if(ay===(20)){return $clone(aw,Q).object()===$ifaceNil;}else if(ay===(26)){return $clone(aw,Q).object()===0;}else{$panic(new U.ptr("reflect.Value.IsNil",ax));}};Q.prototype.IsNil=function(){return this.$val.IsNil();};Q.ptr.prototype.Len=function(){var aw,ax,ay;aw=this;ax=new R(aw.flag).kind();ay=ax;if((ay===(17))||(ay===(24))){return $parseInt($clone(aw,Q).object().length);}else if(ay===(23)){return $parseInt($clone(aw,Q).object().$length)>>0;}else if(ay===(18)){return $parseInt($clone(aw,Q).object().$buffer.length)>>0;}else if(ay===(21)){return $parseInt($keys($clone(aw,Q).object()).length);}else{$panic(new U.ptr("reflect.Value.Len",ax));}};Q.prototype.Len=function(){return this.$val.Len();};Q.ptr.prototype.Pointer=function(){var aw,ax,ay;aw=this;ax=new R(aw.flag).kind();ay=ax;if((ay===(18))||(ay===(21))||(ay===(22))||(ay===(26))){if($clone(aw,Q).IsNil()){return 0;}return $clone(aw,Q).object();}else if(ay===(19)){if($clone(aw,Q).IsNil()){return 0;}return 1;}else if(ay===(23)){if($clone(aw,Q).IsNil()){return 0;}return $clone(aw,Q).object().$array;}else{$panic(new U.ptr("reflect.Value.Pointer",ax));}};Q.prototype.Pointer=function(){return this.$val.Pointer();};Q.ptr.prototype.Set=function(aw){var{aw,ax,ay,az,ba,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBeAssignable();new R(aw.flag).mustBeExported();ay=$clone(aw,Q).assignTo("reflect.Set",ax.typ,0);$s=1;case 1:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}aw=ay;if(!((((ax.flag&128)>>>0)===0))){$s=2;continue;}$s=3;continue;case 2:az=ax.typ.Kind();if(az===(17)){$s=5;continue;}if(az===(20)){$s=6;continue;}if(az===(25)){$s=7;continue;}$s=8;continue;case 5:GI(ax.typ).copy(ax.ptr,aw.ptr);$s=9;continue;case 6:ba=IK($clone(aw,Q),false);$s=10;case 10:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}ax.ptr.$set(ba);$s=9;continue;case 7:HA(ax.ptr,aw.ptr,ax.typ);$s=9;continue;case 8:ax.ptr.$set($clone(aw,Q).object());case 9:case 4:$s=-1;return;case 3:ax.ptr=aw.ptr;$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.Set,$c:true,$r,aw,ax,ay,az,ba,$s};return $f;};Q.prototype.Set=function(aw){return this.$val.Set(aw);};Q.ptr.prototype.SetBytes=function(aw){var{aw,ax,ay,az,ba,bb,bc,$s,$r,$c}=$restore(this,{aw});$s=$s||0;s:while(true){switch($s){case 0:ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(23);ay=ax.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}if(!((ay===8))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.SetBytes of non-byte slice"));case 2:az=aw;if(!(ax.typ.Name()==="")){ba=true;$s=6;continue s;}bb=ax.typ.Elem().Name();$s=7;case 7:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}ba=!(bb==="");case 6:if(ba){$s=4;continue;}$s=5;continue;case 4:bc=new(GI(ax.typ))(az.$array);bc.$offset=az.$offset;bc.$length=az.$length;bc.$capacity=az.$capacity;az=bc;case 5:ax.ptr.$set(az);$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.SetBytes,$c:true,$r,aw,ax,ay,az,ba,bb,bc,$s};return $f;};Q.prototype.SetBytes=function(aw){return this.$val.SetBytes(aw);};Q.ptr.prototype.SetCap=function(aw){var aw,ax,ay,az;ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(23);ay=ax.ptr.$get();if(aw<($parseInt(ay.$length)>>0)||aw>($parseInt(ay.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}az=new(GI(ax.typ))(ay.$array);az.$offset=ay.$offset;az.$length=ay.$length;az.$capacity=aw;ax.ptr.$set(az);};Q.prototype.SetCap=function(aw){return this.$val.SetCap(aw);};Q.ptr.prototype.SetLen=function(aw){var aw,ax,ay,az;ax=this;new R(ax.flag).mustBeAssignable();new R(ax.flag).mustBe(23);ay=ax.ptr.$get();if(aw<0||aw>($parseInt(ay.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}az=new(GI(ax.typ))(ay.$array);az.$offset=ay.$offset;az.$length=aw;az.$capacity=ay.$capacity;ax.ptr.$set(az);};Q.prototype.SetLen=function(aw){return this.$val.SetLen(aw);};Q.ptr.prototype.Slice=function(aw,ax){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s,$r,$c}=$restore(this,{aw,ax});$s=$s||0;s:while(true){switch($s){case 0:ay=this;az=0;ba=$ifaceNil;bb=null;bc=new R(ay.flag).kind();bd=bc;if(bd===(17)){$s=2;continue;}if(bd===(23)){$s=3;continue;}if(bd===(24)){$s=4;continue;}$s=5;continue;case 2:if(((ay.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}be=(ay.typ.kindType);az=((be.len>>0));ba=HJ(be.elem);bb=new(GI(ba))($clone(ay,Q).object());$s=6;continue;case 3:ba=ay.typ;bb=$clone(ay,Q).object();az=$parseInt(bb.$capacity)>>0;$s=6;continue;case 4:bf=(ay.ptr).$get();if(aw<0||axbf.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}bg=HE(new $String($substring(bf,aw,ax)));$s=7;case 7:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=bg;$s=8;case 8:return bh;case 5:$panic(new U.ptr("reflect.Value.Slice",bc));case 6:case 1:if(aw<0||axaz){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}bi=HB(ba,$subslice(bb,aw,ax),new R(ay.flag).ro());$s=9;case 9:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bj=bi;$s=10;case 10:return bj;}return;}var $f={$blk:Q.ptr.prototype.Slice,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,$s};return $f;};Q.prototype.Slice=function(aw,ax){return this.$val.Slice(aw,ax);};Q.ptr.prototype.Slice3=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=this;ba=0;bb=$ifaceNil;bc=null;bd=new R(az.flag).kind();be=bd;if(be===(17)){if(((az.flag&256)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}bf=(az.typ.kindType);ba=((bf.len>>0));bb=HJ(bf.elem);bc=new(GI(bb))($clone(az,Q).object());}else if(be===(23)){bb=az.typ;bc=$clone(az,Q).object();ba=$parseInt(bc.$capacity)>>0;}else{$panic(new U.ptr("reflect.Value.Slice3",bd));}if(aw<0||axba){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}bg=HB(bb,$subslice(bc,aw,ax,ay),new R(az.flag).ro());$s=1;case 1:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=bg;$s=2;case 2:return bh;}return;}var $f={$blk:Q.ptr.prototype.Slice3,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,$s};return $f;};Q.prototype.Slice3=function(aw,ax,ay){return this.$val.Slice3(aw,ax,ay);};Q.ptr.prototype.Close=function(){var aw;aw=this;new R(aw.flag).mustBe(18);new R(aw.flag).mustBeExported();$close($clone(aw,Q).object());};Q.prototype.Close=function(){return this.$val.Close();};IT=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=false;ba=false;bb=new KX([new KR([aw])]);if(ax){bb=$append(bb,new KR([]));}bc=IS(new JH([bb]));$s=1;case 1:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bd=bc;if(ax&&(($parseInt(bd[0])>>0)===1)){be=false;bf=false;az=be;ba=bf;$s=-1;return[az,ba];}bg=bd[1];ay.$set(bg[0]);bh=true;bi=!!(bg[1]);az=bh;ba=bi;$s=-1;return[az,ba];}return;}var $f={$blk:IT,$c:true,$r,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,$s};return $f;};IU=function(aw,ax,ay){var{aw,ax,ay,az,ba,bb,$s,$r,$c}=$restore(this,{aw,ax,ay});$s=$s||0;s:while(true){switch($s){case 0:az=new KX([new KR([aw,ax.$get()])]);if(ay){az=$append(az,new KR([]));}ba=IS(new JH([az]));$s=1;case 1:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;if(ay&&(($parseInt(bb[0])>>0)===1)){$s=-1;return false;}$s=-1;return true;}return;}var $f={$blk:IU,$c:true,$r,aw,ax,ay,az,ba,bb,$s};return $f;};IY=function(){var aw,ax,ay,az,ba;aw=G.Caller(3);ax=aw[0];ay=G.FuncForPC(ax);if(ay===JN.nil){return"unknown method";}az=ay.Name();ba=az.length-1>>0;while(true){if(!(ba>0)){break;}if(az.charCodeAt(ba)===46){break;}ba=ba-(1)>>0;}if(ba<0){return az;}return"Value"+$substring(az,ba);};IZ=function(aw){var aw;return true;};Q.methods=[{prop:"pointer",name:"pointer",pkg:"reflect",typ:$funcType([],[$UnsafePointer],false)},{prop:"Addr",name:"Addr",pkg:"",typ:$funcType([],[Q],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[JY],false)},{prop:"runes",name:"runes",pkg:"reflect",typ:$funcType([],[JZ],false)},{prop:"CanAddr",name:"CanAddr",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([JO],[JO],false)},{prop:"CallSlice",name:"CallSlice",pkg:"",typ:$funcType([JO],[JO],false)},{prop:"CanComplex",name:"CanComplex",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Complex",name:"Complex",pkg:"",typ:$funcType([],[$Complex128],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([JL],[Q],false)},{prop:"FieldByIndexErr",name:"FieldByIndexErr",pkg:"",typ:$funcType([JL],[Q,$error],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[Q],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([LD],[Q],false)},{prop:"CanFloat",name:"CanFloat",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"CanInt",name:"CanInt",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"CanInterface",name:"CanInterface",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsZero",name:"IsZero",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[CL],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([Q],[Q],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[JO],false)},{prop:"SetIterKey",name:"SetIterKey",pkg:"",typ:$funcType([LE],[],false)},{prop:"SetIterValue",name:"SetIterValue",pkg:"",typ:$funcType([LE],[],false)},{prop:"MapRange",name:"MapRange",pkg:"",typ:$funcType([],[LE],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[Q],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[Q],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OverflowComplex",name:"OverflowComplex",pkg:"",typ:$funcType([$Complex128],[$Bool],false)},{prop:"OverflowFloat",name:"OverflowFloat",pkg:"",typ:$funcType([$Float64],[$Bool],false)},{prop:"OverflowInt",name:"OverflowInt",pkg:"",typ:$funcType([$Int64],[$Bool],false)},{prop:"OverflowUint",name:"OverflowUint",pkg:"",typ:$funcType([$Uint64],[$Bool],false)},{prop:"Recv",name:"Recv",pkg:"",typ:$funcType([],[Q,$Bool],false)},{prop:"recv",name:"recv",pkg:"reflect",typ:$funcType([$Bool],[Q,$Bool],false)},{prop:"Send",name:"Send",pkg:"",typ:$funcType([Q],[],false)},{prop:"send",name:"send",pkg:"reflect",typ:$funcType([Q,$Bool],[$Bool],false)},{prop:"SetBool",name:"SetBool",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"setRunes",name:"setRunes",pkg:"reflect",typ:$funcType([JZ],[],false)},{prop:"SetComplex",name:"SetComplex",pkg:"",typ:$funcType([$Complex128],[],false)},{prop:"SetFloat",name:"SetFloat",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetInt",name:"SetInt",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"SetMapIndex",name:"SetMapIndex",pkg:"",typ:$funcType([Q,Q],[],false)},{prop:"SetUint",name:"SetUint",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"SetPointer",name:"SetPointer",pkg:"",typ:$funcType([$UnsafePointer],[],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"TryRecv",name:"TryRecv",pkg:"",typ:$funcType([],[Q,$Bool],false)},{prop:"TrySend",name:"TrySend",pkg:"",typ:$funcType([Q],[$Bool],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[CK],false)},{prop:"CanUint",name:"CanUint",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"UnsafeAddr",name:"UnsafeAddr",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"UnsafePointer",name:"UnsafePointer",pkg:"",typ:$funcType([],[$UnsafePointer],false)},{prop:"Convert",name:"Convert",pkg:"",typ:$funcType([CK],[Q],false)},{prop:"CanConvert",name:"CanConvert",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"object",name:"object",pkg:"reflect",typ:$funcType([],[JI],false)},{prop:"assignTo",name:"assignTo",pkg:"reflect",typ:$funcType([$String,JE,$UnsafePointer],[Q],false)},{prop:"call",name:"call",pkg:"reflect",typ:$funcType([$String,JO],[JO],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[Q],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[Q],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[Q],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[LF],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([Q],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([JY],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[Q],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[Q],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)}];R.methods=[{prop:"kind",name:"kind",pkg:"reflect",typ:$funcType([],[CL],false)},{prop:"ro",name:"ro",pkg:"reflect",typ:$funcType([],[R],false)},{prop:"mustBe",name:"mustBe",pkg:"reflect",typ:$funcType([CL],[],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeExportedSlow",name:"mustBeExportedSlow",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeAssignableSlow",name:"mustBeAssignableSlow",pkg:"reflect",typ:$funcType([],[],false)}];LG.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];LE.methods=[{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[Q],false)},{prop:"Value",name:"Value",pkg:"",typ:$funcType([],[Q],false)},{prop:"Next",name:"Next",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Reset",name:"Reset",pkg:"",typ:$funcType([Q],[],false)}];CL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];JE.methods=[{prop:"textOff",name:"textOff",pkg:"reflect",typ:$funcType([DK],[$UnsafePointer],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[CL],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[JE],false)},{prop:"exportedMethods",name:"exportedMethods",pkg:"reflect",typ:$funcType([],[KB],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[DA,$Bool],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"hasName",name:"hasName",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[CP],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[CK],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[DM],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([JL],[DM],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[DM,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([LD],[DM,$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[CK],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[CK],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[CK],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"gcSlice",name:"gcSlice",pkg:"reflect",typ:$funcType([$Uintptr,$Uintptr],[JY],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[KA],false)},{prop:"nameOff",name:"nameOff",pkg:"reflect",typ:$funcType([DI],[GO],false)},{prop:"typeOff",name:"typeOff",pkg:"reflect",typ:$funcType([DJ],[JE],false)},{prop:"ptrTo",name:"ptrTo",pkg:"reflect",typ:$funcType([],[JE],false)},{prop:"pointers",name:"pointers",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[DA],false)}];CP.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];KC.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[DA],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[DA,$Bool],false)}];LN.methods=[{prop:"offset",name:"offset",pkg:"reflect",typ:$funcType([],[$Uintptr],false)},{prop:"embedded",name:"embedded",pkg:"reflect",typ:$funcType([],[$Bool],false)}];KF.methods=[{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[DM],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([JL],[DM],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([LD],[DM,$Bool],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[DM,$Bool],false)}];DA.methods=[{prop:"IsExported",name:"IsExported",pkg:"",typ:$funcType([],[$Bool],false)}];DM.methods=[{prop:"IsExported",name:"IsExported",pkg:"",typ:$funcType([],[$Bool],false)}];DN.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"Lookup",name:"Lookup",pkg:"",typ:$funcType([$String],[$String,$Bool],false)}];KA.methods=[{prop:"methods",name:"methods",pkg:"reflect",typ:$funcType([],[KB],false)},{prop:"exportedMethods",name:"exportedMethods",pkg:"reflect",typ:$funcType([],[KB],false)}];KV.methods=[{prop:"in$",name:"in",pkg:"reflect",typ:$funcType([],[JF],false)},{prop:"out",name:"out",pkg:"reflect",typ:$funcType([],[JF],false)}];GO.methods=[{prop:"data",name:"data",pkg:"reflect",typ:$funcType([$Int,$String],[KG],false)},{prop:"hasTag",name:"hasTag",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"readVarint",name:"readVarint",pkg:"reflect",typ:$funcType([$Int],[$Int,$Int],false)},{prop:"name",name:"name",pkg:"reflect",typ:$funcType([],[$String],false)},{prop:"tag",name:"tag",pkg:"reflect",typ:$funcType([],[$String],false)},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:$funcType([],[$String],false)},{prop:"isExported",name:"isExported",pkg:"reflect",typ:$funcType([],[$Bool],false)}];LX.methods=[{prop:"initialized",name:"initialized",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"skipUntilValidKey",name:"skipUntilValidKey",pkg:"reflect",typ:$funcType([],[],false)}];Q.init("reflect",[{prop:"typ",name:"typ",embedded:false,exported:false,typ:JE,tag:""},{prop:"ptr",name:"ptr",embedded:false,exported:false,typ:$UnsafePointer,tag:""},{prop:"flag",name:"flag",embedded:true,exported:false,typ:R,tag:""}]);U.init("",[{prop:"Method",name:"Method",embedded:false,exported:true,typ:$String,tag:""},{prop:"Kind",name:"Kind",embedded:false,exported:true,typ:CL,tag:""}]);AG.init("reflect",[{prop:"m",name:"m",embedded:false,exported:false,typ:Q,tag:""},{prop:"hiter",name:"hiter",embedded:false,exported:false,typ:IA,tag:""}]);CK.init([{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[CP],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[CK],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[DM],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([JL],[DM],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[DM,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([LD],[DM,$Bool],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([CK],[$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[CK],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[CK],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[CL],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[DA],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[DA,$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[CK],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[JE],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[KA],false)}]);CN.init("reflect",[{prop:"size",name:"size",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"ptrdata",name:"ptrdata",embedded:false,exported:false,typ:$Uintptr,tag:""},{prop:"hash",name:"hash",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"tflag",name:"tflag",embedded:false,exported:false,typ:CM,tag:""},{prop:"align",name:"align",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"kind",name:"kind",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"equal",name:"equal",embedded:false,exported:false,typ:LL,tag:""},{prop:"gcdata",name:"gcdata",embedded:false,exported:false,typ:KG,tag:""},{prop:"str",name:"str",embedded:false,exported:false,typ:DI,tag:""},{prop:"ptrToThis",name:"ptrToThis",embedded:false,exported:false,typ:DJ,tag:""}]);CO.init("reflect",[{prop:"name",name:"name",embedded:false,exported:false,typ:DI,tag:""},{prop:"mtyp",name:"mtyp",embedded:false,exported:false,typ:DJ,tag:""},{prop:"ifn",name:"ifn",embedded:false,exported:false,typ:DK,tag:""},{prop:"tfn",name:"tfn",embedded:false,exported:false,typ:DK,tag:""}]);CQ.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:JE,tag:""},{prop:"slice",name:"slice",embedded:false,exported:false,typ:JE,tag:""},{prop:"len",name:"len",embedded:false,exported:false,typ:$Uintptr,tag:""}]);CR.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:JE,tag:""},{prop:"dir",name:"dir",embedded:false,exported:false,typ:$Uintptr,tag:""}]);CS.init("reflect",[{prop:"name",name:"name",embedded:false,exported:false,typ:DI,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:DJ,tag:""}]);CT.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:GO,tag:""},{prop:"methods",name:"methods",embedded:false,exported:false,typ:KN,tag:""}]);CU.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"key",name:"key",embedded:false,exported:false,typ:JE,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:JE,tag:""},{prop:"bucket",name:"bucket",embedded:false,exported:false,typ:JE,tag:""},{prop:"hasher",name:"hasher",embedded:false,exported:false,typ:LM,tag:""},{prop:"keysize",name:"keysize",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"flags",name:"flags",embedded:false,exported:false,typ:$Uint32,tag:""}]);CV.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:JE,tag:""}]);CW.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"elem",name:"elem",embedded:false,exported:false,typ:JE,tag:""}]);CX.init("reflect",[{prop:"name",name:"name",embedded:false,exported:false,typ:GO,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:JE,tag:""},{prop:"offsetEmbed",name:"offsetEmbed",embedded:false,exported:false,typ:$Uintptr,tag:""}]);CY.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:GO,tag:""},{prop:"fields",name:"fields",embedded:false,exported:false,typ:KO,tag:""}]);DA.init("",[{prop:"Name",name:"Name",embedded:false,exported:true,typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",embedded:false,exported:true,typ:$String,tag:""},{prop:"Type",name:"Type",embedded:false,exported:true,typ:CK,tag:""},{prop:"Func",name:"Func",embedded:false,exported:true,typ:Q,tag:""},{prop:"Index",name:"Index",embedded:false,exported:true,typ:$Int,tag:""}]);DM.init("",[{prop:"Name",name:"Name",embedded:false,exported:true,typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",embedded:false,exported:true,typ:$String,tag:""},{prop:"Type",name:"Type",embedded:false,exported:true,typ:CK,tag:""},{prop:"Tag",name:"Tag",embedded:false,exported:true,typ:DN,tag:""},{prop:"Offset",name:"Offset",embedded:false,exported:true,typ:$Uintptr,tag:""},{prop:"Index",name:"Index",embedded:false,exported:true,typ:JL,tag:""},{prop:"Anonymous",name:"Anonymous",embedded:false,exported:true,typ:$Bool,tag:""}]);DO.init("reflect",[{prop:"typ",name:"typ",embedded:false,exported:false,typ:KF,tag:""},{prop:"index",name:"index",embedded:false,exported:false,typ:JL,tag:""}]);GL.init("reflect",[{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:DI,tag:""},{prop:"mcount",name:"mcount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"xcount",name:"xcount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"moff",name:"moff",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"_methods",name:"_methods",embedded:false,exported:false,typ:KB,tag:""}]);GN.init("reflect",[{prop:"rtype",name:"rtype",embedded:true,exported:false,typ:CN,tag:"reflect:\"func\""},{prop:"inCount",name:"inCount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"outCount",name:"outCount",embedded:false,exported:false,typ:$Uint16,tag:""},{prop:"_in",name:"_in",embedded:false,exported:false,typ:JF,tag:""},{prop:"_out",name:"_out",embedded:false,exported:false,typ:JF,tag:""}]);GO.init("reflect",[{prop:"bytes",name:"bytes",embedded:false,exported:false,typ:KG,tag:""}]);GP.init("reflect",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"tag",name:"tag",embedded:false,exported:false,typ:$String,tag:""},{prop:"exported",name:"exported",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"pkgPath",name:"pkgPath",embedded:false,exported:false,typ:$String,tag:""}]);IA.init("reflect",[{prop:"t",name:"t",embedded:false,exported:false,typ:CK,tag:""},{prop:"m",name:"m",embedded:false,exported:false,typ:JI,tag:""},{prop:"keys",name:"keys",embedded:false,exported:false,typ:JI,tag:""},{prop:"i",name:"i",embedded:false,exported:false,typ:$Int,tag:""},{prop:"last",name:"last",embedded:false,exported:false,typ:JI,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=N.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}GT=JD.nil;GV=JF.nil;DB=new JG(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);GF=false;GM={};GQ={};AE=$assertType(HD(new $Uint8(0)),JE);AF=$assertType(HD(new $String("")),JE);IN=$assertType($internalize($call,$emptyInterface),JJ);IO=GJ($jsObjectPtr);IS=$assertType($internalize($select,$emptyInterface),JJ);$r=GG();$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["sort"]=(function(){var $pkg={},$init,A,V,AZ,BA,AN,AO,B,C,D,E,G,H,M,Q,U,AJ,AK,AL,AM,AP;A=$packages["internal/reflectlite"];V=$pkg.lessSwap=$newType(0,$kindStruct,"sort.lessSwap",true,"sort",false,function(Less_,Swap_){this.$val=this;if(arguments.length===0){this.Less=$throwNilPointerError;this.Swap=$throwNilPointerError;return;}this.Less=Less_;this.Swap=Swap_;});AZ=$funcType([$Int,$Int],[$Bool],false);BA=$funcType([$Int,$Int],[],false);B=function(a,b,c){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=b+1>>0;case 1:if(!(db)){f=false;$s=5;continue s;}g=a.Less(e,e-1>>0);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 5:if(!(f)){$s=4;continue;}$r=a.Swap(e,e-1>>0);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e-(1)>>0;$s=3;continue;case 4:d=d+(1)>>0;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:B,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};C=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=b;case 1:f=($imul(2,e))+1>>0;if(f>=c){$s=2;continue;}if(!((f+1>>0)>0,(d+f>>0)+1>>0);$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;case 5:if(g){$s=3;continue;}$s=4;continue;case 3:f=f+(1)>>0;case 4:i=a.Less(d+e>>0,d+f>>0);$s=9;case 9:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!i){$s=7;continue;}$s=8;continue;case 7:$s=-1;return;case 8:$r=a.Swap(d+e>>0,d+f>>0);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=f;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:C,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};D=function(a,b,c){var{a,b,c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=b;e=0;f=c-b>>0;h=(g=((f-1>>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"));case 1:if(!(h>=0)){$s=2;continue;}$r=C($clone(a,V),h,f,d);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=h-(1)>>0;$s=1;continue;case 2:i=f-1>>0;case 4:if(!(i>=0)){$s=5;continue;}$r=a.Swap(d,d+i>>0);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C($clone(a,V),e,i,d);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=i-(1)>>0;$s=4;continue;case 5:$s=-1;return;}return;}var $f={$blk:D,$c:true,$r,a,b,c,d,e,f,g,h,i,$s};return $f;};E=function(a,b,c,d){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=a.Less(b,c);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e){$s=1;continue;}$s=2;continue;case 1:$r=a.Swap(b,c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:f=a.Less(d,b);$s=7;case 7:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f){$s=5;continue;}$s=6;continue;case 5:$r=a.Swap(d,b);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=a.Less(b,c);$s=11;case 11:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(g){$s=9;continue;}$s=10;continue;case 9:$r=a.Swap(b,c);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 10:case 6:$s=-1;return;}return;}var $f={$blk:E,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};G=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=0;e=0;f=((((((b+c>>0)>>>0))>>>1>>>0)>>0));if((c-b>>0)>40){$s=1;continue;}$s=2;continue;case 1:h=(g=((c-b>>0))/8,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"));$r=E($clone(a,V),b,b+h>>0,b+($imul(2,h))>>0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E($clone(a,V),f,f-h>>0,f+h>>0);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E($clone(a,V),c-1>>0,(c-1>>0)-h>>0,(c-1>>0)-($imul(2,h))>>0);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$r=E($clone(a,V),b,f,c-1>>0);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=b;j=b+1>>0;k=c-1>>0;l=j;m=k;case 7:if(!(l>0;$s=7;continue;case 8:p=l;case 11:case 13:if(!(p>0;$s=13;continue;case 14:case 17:if(!(p>0);$s=20;case 20:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}s=t;case 19:if(!(s)){$s=18;continue;}m=m-(1)>>0;$s=17;continue;case 18:if(p>=m){$s=12;continue;}$r=a.Swap(p,m-1>>0);$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p=p+(1)>>0;m=m-(1)>>0;$s=11;continue;case 12:u=(c-m>>0)<5;if(!u&&(c-m>>0)<(v=((c-b>>0))/4,(v===v&&v!==1/0&&v!==-1/0)?v>>0:$throwRuntimeError("integer divide by zero"))){$s=22;continue;}$s=23;continue;case 22:w=0;x=a.Less(i,c-1>>0);$s=26;case 26:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}if(!x){$s=24;continue;}$s=25;continue;case 24:$r=a.Swap(m,c-1>>0);$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}m=m+(1)>>0;w=w+(1)>>0;case 25:y=a.Less(p-1>>0,i);$s=30;case 30:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}if(!y){$s=28;continue;}$s=29;continue;case 28:p=p-(1)>>0;w=w+(1)>>0;case 29:z=a.Less(f,i);$s=33;case 33:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}if(!z){$s=31;continue;}$s=32;continue;case 31:$r=a.Swap(f,p-1>>0);$s=34;case 34:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p=p-(1)>>0;w=w+(1)>>0;case 32:u=w>1;case 23:if(u){$s=35;continue;}$s=36;continue;case 35:case 37:case 39:if(!(l>0,i);$s=42;case 42:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa=!ab;case 41:if(!(aa)){$s=40;continue;}p=p-(1)>>0;$s=39;continue;case 40:case 43:if(!(l>0;$s=43;continue;case 44:if(l>=p){$s=38;continue;}$r=a.Swap(l,p-1>>0);$s=47;case 47:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=l+(1)>>0;p=p-(1)>>0;$s=37;continue;case 38:case 36:$r=a.Swap(i,p-1>>0);$s=48;case 48:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ae=p-1>>0;af=m;d=ae;e=af;$s=-1;return[d,e];}return;}var $f={$blk:G,$c:true,$r,a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};H=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:case 1:if(!((c-b>>0)>12)){$s=2;continue;}if(d===0){$s=3;continue;}$s=4;continue;case 3:$r=D($clone(a,V),b,c);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 4:d=d-(1)>>0;f=G($clone(a,V),b,c);$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;g=e[0];h=e[1];if((g-b>>0)<(c-h>>0)){$s=7;continue;}$s=8;continue;case 7:$r=H($clone(a,V),b,g,d);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b=h;$s=9;continue;case 8:$r=H($clone(a,V),h,c,d);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=g;case 9:$s=1;continue;case 2:if((c-b>>0)>1){$s=12;continue;}$s=13;continue;case 12:i=b+6>>0;case 14:if(!(i>0);$s=18;case 18:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(j){$s=16;continue;}$s=17;continue;case 16:$r=a.Swap(i,i-6>>0);$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 17:i=i+(1)>>0;$s=14;continue;case 15:$r=B($clone(a,V),b,c);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 13:$s=-1;return;}return;}var $f={$blk:H,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};M=function(a,b,c){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=b+1>>0;case 1:if(!(db)){f=false;$s=5;continue s;}g=a.Less(e,e-1>>0);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 5:if(!(f)){$s=4;continue;}$r=a.Swap(e,e-1>>0);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e-(1)>>0;$s=3;continue;case 4:d=d+(1)>>0;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:M,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};Q=function(a,b,c,d){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=0;case 1:if(!(e>0,c+e>>0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e+(1)>>0;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:Q,$c:true,$r,a,b,c,d,e,$s};return $f;};U=function(a){var a,b,c;b=0;c=a;while(true){if(!(c>0)){break;}b=b+(1)>>0;c=(c>>$min((1),31))>>0;}return $imul(b,2);};AJ=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a;c=a.Len();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$r=AK(b,d);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AJ,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.Stable=AJ;AK=function(a,b){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=20;d=0;e=c;f=d;g=e;case 1:if(!(g<=b)){$s=2;continue;}$r=M(a,f,g);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=g;g=g+(c)>>0;$s=1;continue;case 2:$r=M(a,f,b);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:if(!(c>0,g);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=g;g=g+(($imul(2,c)))>>0;$s=7;continue;case 8:j=f+c>>0;if(j>0)===1){$s=1;continue;}$s=2;continue;case 1:e=c;f=d;case 3:if(!(e>0)>>>0))>>>1>>>0)>>0));h=a.Less(g,b);$s=8;case 8:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(h){$s=5;continue;}$s=6;continue;case 5:e=g+1>>0;$s=7;continue;case 6:f=g;case 7:$s=3;continue;case 4:i=b;case 9:if(!(i<(e-1>>0))){$s=10;continue;}$r=a.Swap(i,i+1>>0);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=i+(1)>>0;$s=9;continue;case 10:$s=-1;return;case 2:if((d-c>>0)===1){$s=12;continue;}$s=13;continue;case 12:j=b;k=c;case 14:if(!(j>0)>>>0))>>>1>>>0)>>0));m=a.Less(c,l);$s=19;case 19:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}if(!m){$s=16;continue;}$s=17;continue;case 16:j=l+1>>0;$s=18;continue;case 17:k=l;case 18:$s=14;continue;case 15:n=c;case 20:if(!(n>j)){$s=21;continue;}$r=a.Swap(n,n-1>>0);$s=22;case 22:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}n=n-(1)>>0;$s=20;continue;case 21:$s=-1;return;case 13:o=((((((b+d>>0)>>>0))>>>1>>>0)>>0));p=o+c>>0;q=0;r=0;s=q;t=r;if(c>o){s=p-d>>0;t=o;}else{s=b;t=c;}u=p-1>>0;case 23:if(!(s>0)>>>0))>>>1>>>0)>>0));w=a.Less(u-v>>0,v);$s=28;case 28:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}if(!w){$s=25;continue;}$s=26;continue;case 25:s=v+1>>0;$s=27;continue;case 26:t=v;case 27:$s=23;continue;case 24:x=p-s>>0;if(s>0;f=d-c>>0;case 1:if(!(!((e===f)))){$s=2;continue;}if(e>f){$s=3;continue;}$s=4;continue;case 3:$r=Q(a,c-e>>0,c,f);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e-(f)>>0;$s=5;continue;case 4:$r=Q(a,c-e>>0,(c+f>>0)-e>>0,e);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=f-(e)>>0;case 5:$s=1;continue;case 2:$r=Q(a,c-e>>0,c,e);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AM,$c:true,$r,a,b,c,d,e,f,$s};return $f;};AP=function(a,b){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=AN(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=$clone(c,A.Value);e=AO(a);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;g=$clone(d,A.Value).Len();$r=H(new V.ptr(b,f),0,g,U(g));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}var $f={$blk:AP,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.Slice=AP;V.init("",[{prop:"Less",name:"Less",embedded:false,exported:true,typ:AZ,tag:""},{prop:"Swap",name:"Swap",embedded:false,exported:true,typ:BA,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AN=A.ValueOf;AO=A.Swapper;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/fmtsort"]=(function(){var $pkg={},$init,A,B,C,I,J,D,E,F,G,H;A=$packages["reflect"];B=$packages["sort"];C=$pkg.SortedMap=$newType(0,$kindStruct,"fmtsort.SortedMap",true,"internal/fmtsort",true,function(Key_,Value_){this.$val=this;if(arguments.length===0){this.Key=J.nil;this.Value=J.nil;return;}this.Key=Key_;this.Value=Value_;});I=$ptrType(C);J=$sliceType(A.Value);C.ptr.prototype.Len=function(){var a;a=this;return a.Key.$length;};C.prototype.Len=function(){return this.$val.Len();};C.ptr.prototype.Less=function(a,b){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;f=E($clone((d=c.Key,((a<0||a>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+a])),A.Value),$clone((e=c.Key,((b<0||b>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+b])),A.Value));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f<0;$s=2;case 2:return g;}return;}var $f={$blk:C.ptr.prototype.Less,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};C.prototype.Less=function(a,b){return this.$val.Less(a,b);};C.ptr.prototype.Swap=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;c=this;d=(e=c.Key,((b<0||b>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+b]));f=(g=c.Key,((a<0||a>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+a]));(h=c.Key,((a<0||a>=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+a]=d));(i=c.Key,((b<0||b>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+b]=f));j=(k=c.Value,((b<0||b>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+b]));l=(m=c.Value,((a<0||a>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+a]));(n=c.Value,((a<0||a>=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+a]=j));(o=c.Value,((b<0||b>=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+b]=l));};C.prototype.Swap=function(a,b){return this.$val.Swap(a,b);};D=function(a){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=$clone(a,A.Value).Type().Kind();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}if(!((b===21))){$s=1;continue;}$s=2;continue;case 1:$s=-1;return I.nil;case 2:c=$clone(a,A.Value).Len();d=$makeSlice(J,0,c);e=$makeSlice(J,0,c);f=$clone(a,A.Value).MapRange();case 4:g=f.Next();$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(!(g)){$s=5;continue;}h=f.Key();$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d=$append(d,h);i=f.Value();$s=8;case 8:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}e=$append(e,i);$s=4;continue;case 5:j=new C.ptr(d,e);$r=B.Stable(j);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return j;}return;}var $f={$blk:D,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};$pkg.Sort=D;E=function(a,b){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=$clone(a,A.Value).Type();d=$clone(b,A.Value).Type();e=c;f=d;if(!($interfaceIsEqual(e,f))){$s=-1;return-1;}g=$clone(a,A.Value).Kind();if((g===(2))||(g===(3))||(g===(4))||(g===(5))||(g===(6))){$s=2;continue;}if((g===(7))||(g===(8))||(g===(9))||(g===(10))||(g===(11))||(g===(12))){$s=3;continue;}if(g===(24)){$s=4;continue;}if((g===(13))||(g===(14))){$s=5;continue;}if((g===(15))||(g===(16))){$s=6;continue;}if(g===(1)){$s=7;continue;}if((g===(22))||(g===(26))){$s=8;continue;}if(g===(18)){$s=9;continue;}if(g===(25)){$s=10;continue;}if(g===(17)){$s=11;continue;}if(g===(20)){$s=12;continue;}$s=13;continue;case 2:h=$clone(a,A.Value).Int();i=$clone(b,A.Value).Int();j=h;k=i;if((j.$highk.$high||(j.$high===k.$high&&j.$low>k.$low))){$s=-1;return 1;}else{$s=-1;return 0;}$s=14;continue;case 3:l=$clone(a,A.Value).Uint();m=$clone(b,A.Value).Uint();n=l;o=m;if((n.$higho.$high||(n.$high===o.$high&&n.$low>o.$low))){$s=-1;return 1;}else{$s=-1;return 0;}$s=14;continue;case 4:q=$clone(a,A.Value).String();$s=15;case 15:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;s=$clone(b,A.Value).String();$s=16;case 16:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;t=p;u=r;if(tu){$s=-1;return 1;}else{$s=-1;return 0;}$s=14;continue;case 5:$s=-1;return G($clone(a,A.Value).Float(),$clone(b,A.Value).Float());case 6:v=$clone(a,A.Value).Complex();w=$clone(b,A.Value).Complex();x=v;y=w;z=G(x.$real,y.$real);if(!((z===0))){$s=-1;return z;}$s=-1;return G(x.$imag,y.$imag);case 7:aa=$clone(a,A.Value).Bool();ab=$clone(b,A.Value).Bool();ac=aa;ad=ab;if(ac===ad){$s=-1;return 0;}else if(ac){$s=-1;return 1;}else{$s=-1;return-1;}$s=14;continue;case 8:ae=$clone(a,A.Value).Pointer();af=$clone(b,A.Value).Pointer();ag=ae;ah=af;if(agah){$s=-1;return 1;}else{$s=-1;return 0;}$s=14;continue;case 9:ai=F($clone(a,A.Value),$clone(b,A.Value));aj=ai[0];ak=ai[1];if(ak){$s=-1;return aj;}al=$clone(a,A.Value).Pointer();am=$clone(b,A.Value).Pointer();an=al;ao=am;if(anao){$s=-1;return 1;}else{$s=-1;return 0;}$s=14;continue;case 10:ap=0;case 17:if(!(ap<$clone(a,A.Value).NumField())){$s=18;continue;}aq=$clone(a,A.Value).Field(ap);$s=19;case 19:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ar=$clone(aq,A.Value);as=$clone(b,A.Value).Field(ap);$s=20;case 20:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}at=$clone(as,A.Value);au=E(ar,at);$s=21;case 21:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}av=au;if(!((av===0))){$s=-1;return av;}ap=ap+(1)>>0;$s=17;continue;case 18:$s=-1;return 0;case 11:aw=0;case 22:if(!(aw<$clone(a,A.Value).Len())){$s=23;continue;}ax=$clone(a,A.Value).Index(aw);$s=24;case 24:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}ay=$clone(ax,A.Value);az=$clone(b,A.Value).Index(aw);$s=25;case 25:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ba=$clone(az,A.Value);bb=E(ay,ba);$s=26;case 26:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;if(!((bc===0))){$s=-1;return bc;}aw=aw+(1)>>0;$s=22;continue;case 23:$s=-1;return 0;case 12:bd=F($clone(a,A.Value),$clone(b,A.Value));be=bd[0];bf=bd[1];if(bf){$s=-1;return be;}bg=$clone(a,A.Value).Elem();$s=27;case 27:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=$clone(bg,A.Value).Type();$s=28;case 28:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=A.ValueOf(bh);$s=29;case 29:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bj=$clone(bi,A.Value);bk=$clone(b,A.Value).Elem();$s=30;case 30:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}bl=$clone(bk,A.Value).Type();$s=31;case 31:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bm=A.ValueOf(bl);$s=32;case 32:if($c){$c=false;bm=bm.$blk();}if(bm&&bm.$blk!==undefined){break s;}bn=$clone(bm,A.Value);bo=E(bj,bn);$s=33;case 33:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}bp=bo;if(!((bp===0))){$s=-1;return bp;}bq=$clone(a,A.Value).Elem();$s=34;case 34:if($c){$c=false;bq=bq.$blk();}if(bq&&bq.$blk!==undefined){break s;}br=$clone(bq,A.Value);bs=$clone(b,A.Value).Elem();$s=35;case 35:if($c){$c=false;bs=bs.$blk();}if(bs&&bs.$blk!==undefined){break s;}bt=$clone(bs,A.Value);bu=E(br,bt);$s=36;case 36:if($c){$c=false;bu=bu.$blk();}if(bu&&bu.$blk!==undefined){break s;}bv=bu;$s=37;case 37:return bv;case 13:bw=e.String();$s=38;case 38:if($c){$c=false;bw=bw.$blk();}if(bw&&bw.$blk!==undefined){break s;}$panic(new $String("bad type in compare: "+bw));case 14:case 1:$s=-1;return 0;}return;}var $f={$blk:E,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};F=function(a,b){var a,b;if($clone(a,A.Value).IsNil()){if($clone(b,A.Value).IsNil()){return[0,true];}return[-1,true];}if($clone(b,A.Value).IsNil()){return[1,true];}return[0,false];};G=function(a,b){var a,b;if(H(a)){return-1;}else if(H(b)){return 1;}else if(ab){return 1;}return 0;};H=function(a){var a;return!((a===a));};I.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)}];C.init("",[{prop:"Key",name:"Key",embedded:false,exported:true,typ:J,tag:""},{prop:"Value",name:"Value",embedded:false,exported:true,typ:J,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["io"]=(function(){var $pkg={},$init,A,B,N,O,Z,AA,AH,AR,BE,BF,BG,BL,M,AU,AV,AZ,AN,AP;A=$packages["errors"];B=$packages["sync"];N=$pkg.Reader=$newType(8,$kindInterface,"io.Reader",true,"io",true,null);O=$pkg.Writer=$newType(8,$kindInterface,"io.Writer",true,"io",true,null);Z=$pkg.ReaderFrom=$newType(8,$kindInterface,"io.ReaderFrom",true,"io",true,null);AA=$pkg.WriterTo=$newType(8,$kindInterface,"io.WriterTo",true,"io",true,null);AH=$pkg.RuneScanner=$newType(8,$kindInterface,"io.RuneScanner",true,"io",true,null);AR=$pkg.LimitedReader=$newType(0,$kindStruct,"io.LimitedReader",true,"io",true,function(R_,N_){this.$val=this;if(arguments.length===0){this.R=$ifaceNil;this.N=new $Int64(0,0);return;}this.R=R_;this.N=N_;});BE=$sliceType($emptyInterface);BF=$sliceType($Uint8);BG=$ptrType(BF);BL=$ptrType(AR);AN=function(c,d){var{c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{c,d});$s=$s||0;s:while(true){switch($s){case 0:e=new $Int64(0,0);f=$ifaceNil;h=AP(c,d,BF.nil);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;e=g[0];f=g[1];i=[e,f];$s=2;case 2:return i;}return;}var $f={$blk:AN,$c:true,$r,c,d,e,f,g,h,i,$s};return $f;};$pkg.Copy=AN;AP=function(c,d,e){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=new $Int64(0,0);g=$ifaceNil;h=$assertType(d,AA,true);i=h[0];j=h[1];if(j){$s=1;continue;}$s=2;continue;case 1:l=i.WriteTo(c);$s=3;case 3:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;f=k[0];g=k[1];m=[f,g];$s=4;case 4:return m;case 2:n=$assertType(c,Z,true);o=n[0];p=n[1];if(p){$s=5;continue;}$s=6;continue;case 5:r=o.ReadFrom(d);$s=7;case 7:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;f=q[0];g=q[1];s=[f,g];$s=8;case 8:return s;case 6:if(e===BF.nil){t=32768;u=$assertType(d,BL,true);v=u[0];w=u[1];if(w&&(x=(new $Int64(0,t)),y=v.N,(x.$high>y.$high||(x.$high===y.$high&&x.$low>y.$low)))){if((z=v.N,(z.$high<0||(z.$high===0&&z.$low<1)))){t=1;}else{t=(((aa=v.N,aa.$low+((aa.$high>>31)*4294967296))>>0));}}e=$makeSlice(BF,t);}case 9:ac=d.Read(e);$s=11;case 11:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ab=ac;ad=ab[0];ae=ab[1];if(ad>0){$s=12;continue;}$s=13;continue;case 12:ag=c.Write($subslice(e,0,ad));$s=14;case 14:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}af=ag;ah=af[0];ai=af[1];if(ah<0||adk.$high||(j.$high===k.$high&&j.$low>k.$low)))){c=$subslice(c,0,$flatten64(f.N));}m=f.R.Read(c);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;d=l[0];e=l[1];f.N=(n=f.N,o=(new $Int64(0,d)),new $Int64(n.$high-o.$high,n.$low-o.$low));$s=-1;return[d,e];}return;}var $f={$blk:AR.ptr.prototype.Read,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,$s};return $f;};AR.prototype.Read=function(c){return this.$val.Read(c);};BL.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([BF],[$Int,$error],false)}];N.init([{prop:"Read",name:"Read",pkg:"",typ:$funcType([BF],[$Int,$error],false)}]);O.init([{prop:"Write",name:"Write",pkg:"",typ:$funcType([BF],[$Int,$error],false)}]);Z.init([{prop:"ReadFrom",name:"ReadFrom",pkg:"",typ:$funcType([N],[$Int64,$error],false)}]);AA.init([{prop:"WriteTo",name:"WriteTo",pkg:"",typ:$funcType([O],[$Int64,$error],false)}]);AH.init([{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)}]);AR.init("",[{prop:"R",name:"R",embedded:false,exported:true,typ:N,tag:""},{prop:"N",name:"N",embedded:false,exported:true,typ:$Int64,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrClosedPipe=A.New("io: read/write on closed pipe");$pkg.ErrShortWrite=A.New("short write");M=A.New("invalid write result");$pkg.ErrShortBuffer=A.New("short buffer");$pkg.EOF=A.New("EOF");$pkg.ErrUnexpectedEOF=A.New("unexpected EOF");$pkg.ErrNoProgress=A.New("multiple Read calls return no data or error");AU=A.New("Seek: invalid whence");AV=A.New("Seek: invalid offset");AZ=new B.Pool.ptr(BE.nil,(function(){var c,d;c=$makeSlice(BF,8192);return(d||(d=new BG(function(){return c;},function($v){c=$convertSliceType($v,BF);})));}));}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/oserror"]=(function(){var $pkg={},$init,A;A=$packages["errors"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrInvalid=A.New("invalid argument");$pkg.ErrPermission=A.New("permission denied");$pkg.ErrExist=A.New("file already exists");$pkg.ErrNotExist=A.New("file does not exist");$pkg.ErrClosed=A.New("file already closed");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["syscall/js"]=(function(){var $pkg={},$init,A,B,F,H,I,R,U,V,W,X,Y,Z,AA,AB,AC,K,L,M,C,D,E,G,J,N,O,P,Q,S,T;A=$packages["github.com/gopherjs/gopherjs/js"];B=$pkg.Type=$newType(4,$kindInt,"js.Type",true,"syscall/js",true,null);F=$pkg.Func=$newType(0,$kindStruct,"js.Func",true,"syscall/js",true,function(Value_){this.$val=this;if(arguments.length===0){this.Value=new I.ptr(null,false,V.zero());return;}this.Value=Value_;});H=$pkg.Error=$newType(0,$kindStruct,"js.Error",true,"syscall/js",true,function(Value_){this.$val=this;if(arguments.length===0){this.Value=new I.ptr(null,false,V.zero());return;}this.Value=Value_;});I=$pkg.Value=$newType(0,$kindStruct,"js.Value",true,"syscall/js",true,function(v_,inited_,_$2_){this.$val=this;if(arguments.length===0){this.v=null;this.inited=false;this._$2=V.zero();return;}this.v=v_;this.inited=inited_;this._$2=_$2_;});R=$pkg.ValueError=$newType(0,$kindStruct,"js.ValueError",true,"syscall/js",true,function(Method_,Type_){this.$val=this;if(arguments.length===0){this.Method="";this.Type=0;return;}this.Method=Method_;this.Type=Type_;});U=$funcType([],[],false);V=$arrayType(U,0);W=$sliceType(I);X=$mapType($String,$emptyInterface);Y=$sliceType($emptyInterface);Z=$ptrType(A.Error);AA=$sliceType($Uint8);AB=$ptrType(A.Object);AC=$ptrType(R);B.prototype.String=function(){var a,b;a=this.$val;b=a;if(b===(0)){return"undefined";}else if(b===(1)){return"null";}else if(b===(2)){return"boolean";}else if(b===(3)){return"number";}else if(b===(4)){return"string";}else if(b===(5)){return"symbol";}else if(b===(6)){return"object";}else if(b===(7)){return"function";}else{$panic(new $String("bad type"));}};$ptrType(B).prototype.String=function(){return new B(this.$get()).String();};B.prototype.isObject=function(){var a;a=this.$val;return(a===6)||(a===7);};$ptrType(B).prototype.isObject=function(){return new B(this.$get()).isObject();};C=function(){return J($global);};$pkg.Global=C;D=function(){return J(null);};$pkg.Null=D;E=function(){return J(undefined);};$pkg.Undefined=E;F.ptr.prototype.Release=function(){var a;a=this;$exportedFunctions=($parseInt($exportedFunctions)>>0)-1>>0;I.copy(a.Value,D());};F.prototype.Release=function(){return this.$val.Release();};G=function(a){var a;$exportedFunctions=($parseInt($exportedFunctions)>>0)+1>>0;return new F.ptr($clone(J(A.MakeFunc((function $b(b,c){var{b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{b,c});$s=$s||0;s:while(true){switch($s){case 0:d=$makeSlice(W,c.$length);e=c;f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);I.copy(((g<0||g>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+g]),J(h));f++;}i=a($clone(J(b),I),d);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=2;case 2:return j;}return;}var $f={$blk:$b,$c:true,$r,b,c,d,e,f,g,h,i,j,$s};return $f;}))),I));};$pkg.FuncOf=G;H.ptr.prototype.Error=function(){var a;a=this;return"JavaScript error: "+$clone($clone(a.Value,I).Get("message"),I).String();};H.prototype.Error=function(){return this.$val.Error();};J=function(a){var a;if(a===undefined){return new I.ptr(null,false,V.zero());}return new I.ptr(a,true,V.zero());};N=function(){if(!($global===null)){K=$global.eval($externalize("(function(x) { return x; })",$String));L=$global.eval($externalize("(function(x, y) { return x instanceof y; })",$String));M=$global.eval($externalize("(function(x) {\n if (typeof(x) === \"undefined\") {\n return 0; // TypeUndefined\n }\n if (x === null) {\n return 1; // TypeNull\n }\n if (typeof(x) === \"boolean\") {\n return 2; // TypeBoolean\n }\n if (typeof(x) === \"number\") {\n return 3; // TypeNumber\n }\n if (typeof(x) === \"string\") {\n return 4; // TypeString\n }\n if (typeof(x) === \"symbol\") {\n return 5; // TypeSymbol\n }\n if (typeof(x) === \"function\") {\n return 7; // TypeFunction\n }\n return 6; // TypeObject\n})",$String));}};O=function(a){var a,b,c,d,e,f,g;b=a;if($assertType(b,I,true)[1]){c=$clone(b.$val,I);return c;}else if($assertType(b,F,true)[1]){d=$clone(b.$val,F);return d.Value;}else if(b===$ifaceNil){e=b;return D();}else if($assertType(b,$Bool,true)[1]||$assertType(b,$Int,true)[1]||$assertType(b,$Int8,true)[1]||$assertType(b,$Int16,true)[1]||$assertType(b,$Int32,true)[1]||$assertType(b,$Int64,true)[1]||$assertType(b,$Uint,true)[1]||$assertType(b,$Uint8,true)[1]||$assertType(b,$Uint16,true)[1]||$assertType(b,$Uint32,true)[1]||$assertType(b,$Uint64,true)[1]||$assertType(b,$Float32,true)[1]||$assertType(b,$Float64,true)[1]||$assertType(b,$UnsafePointer,true)[1]||$assertType(b,$String,true)[1]||$assertType(b,X,true)[1]||$assertType(b,Y,true)[1]){f=b;return J(K($externalize(f,$emptyInterface)));}else{g=b;$panic(new $String("ValueOf: invalid value"));}};$pkg.ValueOf=O;I.ptr.prototype.internal=function(){var a;a=this;if(!a.inited){return undefined;}return a.v;};I.prototype.internal=function(){return this.$val.internal();};I.ptr.prototype.Bool=function(){var a,b;a=this;b=$clone(a,I).Type();if(!((b===2))){$panic(new R.ptr("Value.Bool",b));}return!!($clone(a,I).internal());};I.prototype.Bool=function(){return this.$val.Bool();};P=function(a){var a,b,c,d,e,f;b=new Y([]);c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=$clone(O(e),I);b=$append(b,new $jsObjectPtr($clone(f,I).internal()));d++;}return b;};Q=function(){var a,b,c,d,e;a=$recover();if($interfaceIsEqual(a,$ifaceNil)){return;}b=$assertType(a,Z,true);c=b[0];d=b[1];if(d){$panic((e=new H.ptr($clone(J(c.Object),I)),new e.constructor.elem(e)));}$panic(a);};I.ptr.prototype.Call=function(a,b){var{a,b,c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{a,b});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=this;d=$clone(c,I).Type();if(!((d===6))&&!((d===7))){$panic(new R.ptr("Value.Call",d));}e=$clone($clone(c,I).Get(a),I).Type();if(!((e===7))){$panic(new $String("js: Value.Call: property "+a+" is not a function, got "+new B(e).String()));}$deferred.push([Q,[]]);g=J((f=$clone(c,I).internal(),f[$externalize(a,$String)].apply(f,$externalize(P(b),Y))));$s=1;case 1:return g;}return;}}catch(err){$err=err;$s=-1;return new I.ptr(null,false,V.zero());}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:I.ptr.prototype.Call,$c:true,$r,a,b,c,d,e,f,g,$s,$deferred};return $f;}}};I.prototype.Call=function(a,b){return this.$val.Call(a,b);};I.ptr.prototype.Float=function(){var a,b;a=this;b=$clone(a,I).Type();if(!((b===3))){$panic(new R.ptr("Value.Float",b));}return $parseFloat($clone(a,I).internal());};I.prototype.Float=function(){return this.$val.Float();};I.ptr.prototype.Get=function(a){var a,b,c;b=this;c=$clone(b,I).Type();if(!new B(c).isObject()){$panic(new R.ptr("Value.Get",c));}return J($clone(b,I).internal()[$externalize(a,$String)]);};I.prototype.Get=function(a){return this.$val.Get(a);};I.ptr.prototype.Index=function(a){var a,b,c;b=this;c=$clone(b,I).Type();if(!new B(c).isObject()){$panic(new R.ptr("Value.Index",c));}return J($clone(b,I).internal()[a]);};I.prototype.Index=function(a){return this.$val.Index(a);};I.ptr.prototype.Int=function(){var a,b;a=this;b=$clone(a,I).Type();if(!((b===3))){$panic(new R.ptr("Value.Int",b));}return $parseInt($clone(a,I).internal())>>0;};I.prototype.Int=function(){return this.$val.Int();};I.ptr.prototype.InstanceOf=function(a){var a,b;b=this;return!!(L($clone(b,I).internal(),$clone(a,I).internal()));};I.prototype.InstanceOf=function(a){return this.$val.InstanceOf(a);};I.ptr.prototype.Invoke=function(a){var a,b,c;b=this;c=$clone(b,I).Type();if(!((c===7))){$panic(new R.ptr("Value.Invoke",c));}return J($clone(b,I).internal().apply(undefined,$externalize(P(a),Y)));};I.prototype.Invoke=function(a){return this.$val.Invoke(a);};I.ptr.prototype.JSValue=function(){var a;a=this;return a;};I.prototype.JSValue=function(){return this.$val.JSValue();};I.ptr.prototype.Length=function(){var a;a=this;return $parseInt($clone(a,I).internal().length);};I.prototype.Length=function(){return this.$val.Length();};I.ptr.prototype.New=function(a){var{a,b,c,$s,$deferred,$r,$c}=$restore(this,{a});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);b=[b];b[0]=this;$deferred.push([(function(b){return function(){var c,d,e,f,g,h;c=$recover();if($interfaceIsEqual(c,$ifaceNil)){return;}d=$clone(b[0],I).Type();if(!((d===7))){$panic(new R.ptr("Value.New",d));}e=$assertType(c,Z,true);f=e[0];g=e[1];if(g){$panic((h=new H.ptr($clone(J(f.Object),I)),new h.constructor.elem(h)));}$panic(c);};})(b),[]]);c=J(new($global.Function.prototype.bind.apply($clone(b[0],I).internal(),[undefined].concat($externalize(P(a),Y)))));$s=1;case 1:return c;}return;}}catch(err){$err=err;$s=-1;return new I.ptr(null,false,V.zero());}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:I.ptr.prototype.New,$c:true,$r,a,b,c,$s,$deferred};return $f;}}};I.prototype.New=function(a){return this.$val.New(a);};I.ptr.prototype.Set=function(a,b){var a,b,c,d,e;c=this;d=$clone(c,I).Type();if(!new B(d).isObject()){$panic(new R.ptr("Value.Set",d));}$clone(c,I).internal()[$externalize(a,$String)]=$externalize((e=P(new Y([b])),(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])),$emptyInterface);};I.prototype.Set=function(a,b){return this.$val.Set(a,b);};I.ptr.prototype.SetIndex=function(a,b){var a,b,c,d,e;c=this;d=$clone(c,I).Type();if(!new B(d).isObject()){$panic(new R.ptr("Value.SetIndex",d));}$clone(c,I).internal()[a]=$externalize((e=P(new Y([b])),(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])),$emptyInterface);};I.prototype.SetIndex=function(a,b){return this.$val.SetIndex(a,b);};I.ptr.prototype.String=function(){var a,b;a=this;b=$clone(a,I).Type();if(b===(4)){return $internalize($clone(a,I).internal(),$String);}else if(b===(0)){return"";}else if(b===(1)){return"";}else if(b===(2)){return"";}else if(b===(3)){return"";}else if(b===(5)){return"";}else if(b===(6)){return"";}else if(b===(7)){return"";}else{$panic(new $String("bad type"));}};I.prototype.String=function(){return this.$val.String();};I.ptr.prototype.Truthy=function(){var a;a=this;return!!($clone(a,I).internal());};I.prototype.Truthy=function(){return this.$val.Truthy();};I.ptr.prototype.Type=function(){var a;a=this;return((($parseInt(M($clone(a,I).internal()))>>0)>>0));};I.prototype.Type=function(){return this.$val.Type();};I.ptr.prototype.IsNull=function(){var a;a=this;return $clone(a,I).Type()===1;};I.prototype.IsNull=function(){return this.$val.IsNull();};I.ptr.prototype.IsUndefined=function(){var a;a=this;return!a.inited;};I.prototype.IsUndefined=function(){return this.$val.IsUndefined();};I.ptr.prototype.IsNaN=function(){var a;a=this;return!!($global.isNaN($clone(a,I).internal()));};I.prototype.IsNaN=function(){return this.$val.IsNaN();};I.ptr.prototype.Delete=function(a){var a,b,c;b=this;c=$clone(b,I).Type();if(!new B(c).isObject()){$panic(new R.ptr("Value.Delete",c));}delete $clone(b,I).internal()[$externalize(a,$String)];};I.prototype.Delete=function(a){return this.$val.Delete(a);};I.ptr.prototype.Equal=function(a){var a,b;b=this;return $clone(b,I).internal()===$clone(a,I).internal();};I.prototype.Equal=function(a){return this.$val.Equal(a);};R.ptr.prototype.Error=function(){var a;a=this;return"syscall/js: call of "+a.Method+" on "+new B(a.Type).String();};R.prototype.Error=function(){return this.$val.Error();};S=function(a,b){var a,b,c,d;c=$parseInt(b.v.length);d=a.$length;if(d>0))&&((h>>0))<2054){i=((h<0||h>=L.length)?($throwRuntimeError("index out of range"),undefined):L[h]);if(!(i==="")){return i;}}return"errno "+B.Itoa(((h>>0)));};$ptrType(V).prototype.Error=function(){return new V(this.$get()).Error();};V.prototype.Is=function(h){var h,i,j;i=this.$val;j=h;if($interfaceIsEqual(j,(C.ErrPermission))){return(i===13)||(i===1);}else if($interfaceIsEqual(j,(C.ErrExist))){return(i===17)||(i===39);}else if($interfaceIsEqual(j,(C.ErrNotExist))){return i===2;}return false;};$ptrType(V).prototype.Is=function(h){return new V(this.$get()).Is(h);};V.prototype.Temporary=function(){var h;h=this.$val;return(h===4)||(h===24)||new V(h).Timeout();};$ptrType(V).prototype.Temporary=function(){return new V(this.$get()).Temporary();};V.prototype.Timeout=function(){var h;h=this.$val;return(h===11)||(h===11)||(h===110);};$ptrType(V).prototype.Timeout=function(){return new V(this.$get()).Timeout();};BN=function(h){var h;return new V(38);};$pkg.StopIO=BN;BP=function(h){var h,i,j,k,l,m,n;i=0;j=$ifaceNil;k=$ifaceNil;l=0;m=$ifaceNil;n=new V(38);i=l;j=m;k=n;return[i,j,k];};$pkg.Accept=BP;BR=function(h,i,j){var h,i,j,k,l,m,n,o,p;k=0;l=$ifaceNil;m=$ifaceNil;n=0;o=$ifaceNil;p=new V(38);k=n;l=o;m=p;return[k,l,m];};$pkg.Recvfrom=BR;BS=function(h,i,j,k){var h,i,j,k;return new V(38);};$pkg.Sendto=BS;BT=function(h,i,j,k){var h,i,j,k,l,m,n,o,p,q,r,s,t,u;l=0;m=0;n=0;o=$ifaceNil;p=$ifaceNil;q=0;r=0;s=0;t=$ifaceNil;u=new V(38);l=q;m=r;n=s;o=t;p=u;return[l,m,n,o,p];};$pkg.Recvmsg=BT;BU=function(h,i,j,k,l){var h,i,j,k,l,m,n,o,p;m=0;n=$ifaceNil;o=0;p=new V(38);m=o;n=p;return[m,n];};$pkg.SendmsgN=BU;BX=function(h,i){var h,i;return new V(38);};$pkg.SetReadDeadline=BX;BY=function(h,i){var h,i;return new V(38);};$pkg.SetWriteDeadline=BY;BZ=function(h,i){var h,i;return new V(38);};$pkg.Shutdown=BZ;CA=function(h,i){var h,i;return $ifaceNil;};$pkg.SetNonblock=CA;CT=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:$r=CR.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=(j=CS[$Int.keyFor(h)],j!==undefined?[j.v,true]:[FJ.nil,false]);k=i[0];l=i[1];$r=CR.Unlock();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!l){$s=-1;return[FJ.nil,new V(9)];}$s=-1;return[k,$ifaceNil];}return;}var $f={$blk:CT,$c:true,$r,h,i,j,k,l,$s};return $f;};CV=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:$r=CR.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}delete CS[$Int.keyFor(h)];$r=CR.Unlock();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=FA("close",new FF([new $Int(h)]));$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[1];$s=-1;return k;}return;}var $f={$blk:CV,$c:true,$r,h,i,j,k,$s};return $f;};$pkg.Close=CV;CW=function(h){var h;};$pkg.CloseOnExec=CW;CY=function(h,i){var{h,i,j,k,l,m,n,o,p,q,r,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=CT(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[0];m=j[1];if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return[0,m];}if(l.entries===FC.nil){$s=-1;return[0,new V(22)];}n=0;while(true){if(!(l.dirIdx=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p]));r=2+q.length>>0;if(r>i.$length){break;}(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]=((r<<24>>>24)));(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]=(((r>>8>>0)<<24>>>24)));$copyString($subslice(i,2),q);i=$subslice(i,r);n=n+(r)>>0;l.dirIdx=l.dirIdx+(1)>>0;}$s=-1;return[n,$ifaceNil];}return;}var $f={$blk:CY,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,$s};return $f;};$pkg.ReadDirent=CY;DA=function(h,i){var{h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=EC(h);if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}l=FA("lstat",new FF([new $String(h)]));$s=1;case 1:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=$clone(k[0],F.Value);n=k[1];if(!($interfaceIsEqual(n,$ifaceNil))){$s=-1;return n;}EY(i,$clone(m,F.Value));$s=-1;return $ifaceNil;}return;}var $f={$blk:DA,$c:true,$r,h,i,j,k,l,m,n,$s};return $f;};$pkg.Lstat=DA;DB=function(h,i){var{h,i,j,k,l,m,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=FA("fstat",new FF([new $Int(h)]));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=$clone(j[0],F.Value);m=j[1];if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return m;}EY(i,$clone(l,F.Value));$s=-1;return $ifaceNil;}return;}var $f={$blk:DB,$c:true,$r,h,i,j,k,l,m,$s};return $f;};$pkg.Fstat=DB;DF=function(h,i){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=FA("fchmod",new FF([new $Int(h),new $Uint32(i)]));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[1];$s=-1;return l;}return;}var $f={$blk:DF,$c:true,$r,h,i,j,k,l,$s};return $f;};$pkg.Fchmod=DF;DH=function(h,i,j){var{h,i,j,k,l,m,$s,$r,$c}=$restore(this,{h,i,j});$s=$s||0;s:while(true){switch($s){case 0:l=FA("fchown",new FF([new $Int(h),new $Uint32(((i>>>0))),new $Uint32(((j>>>0)))]));$s=1;case 1:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=k[1];$s=-1;return m;}return;}var $f={$blk:DH,$c:true,$r,h,i,j,k,l,m,$s};return $f;};$pkg.Fchown=DH;DM=function(h,i){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=FA("ftruncate",new FF([new $Int(h),i]));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[1];$s=-1;return l;}return;}var $f={$blk:DM,$c:true,$r,h,i,j,k,l,$s};return $f;};$pkg.Ftruncate=DM;DO=function(h){var{h,i,j,k,l,m,$s,$deferred,$r,$c}=$restore(this,{h});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);i=[i];i[0]=$ifaceNil;j=EC(h);if(!($interfaceIsEqual(j,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:i[0]=j;k=i[0];$s=3;case 3:return k;case 2:$deferred.push([ED,[(i.$ptr||(i.$ptr=new FH(function(){return this.$target[0];},function($v){this.$target[0]=$v;},i)))]]);l=$clone(CG,F.Value).Call("chdir",new FF([new $String(h)]));$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;m=i[0];$s=5;case 5:return m;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return i[0];}if($curGoroutine.asleep){var $f={$blk:DO,$c:true,$r,h,i,j,k,l,m,$s,$deferred};return $f;}}};$pkg.Chdir=DO;DP=function(h){var{h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:j=CT(h);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if(!($interfaceIsEqual(l,$ifaceNil))){$s=-1;return l;}m=DO(k.path);$s=2;case 2:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;$s=3;case 3:return n;}return;}var $f={$blk:DP,$c:true,$r,h,i,j,k,l,m,n,$s};return $f;};$pkg.Fchdir=DP;DT=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:j=FA("fsync",new FF([new $Int(h)]));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[1];$s=-1;return k;}return;}var $f={$blk:DT,$c:true,$r,h,i,j,k,$s};return $f;};$pkg.Fsync=DT;DU=function(h,i){var{aa,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=CT(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[0];m=j[1];if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return[0,m];}if(l.seeked){$s=2;continue;}$s=3;continue;case 2:o=DW(h,i,l.pos);$s=4;case 4:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];q=n[1];l.pos=(r=l.pos,s=(new $Int64(0,p)),new $Int64(r.$high+s.$high,r.$low+s.$low));$s=-1;return[p,q];case 3:t=$clone(CJ,F.Value).New(new FF([new $Int(i.$length)]));$s=5;case 5:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=$clone(t,F.Value);w=FA("read",new FF([new $Int(h),new u.constructor.elem(u),new $Int(0),new $Int(i.$length),$ifaceNil]));$s=6;case 6:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}v=w;x=$clone(v[0],F.Value);m=v[1];if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return[0,m];}F.CopyBytesToGo(i,$clone(u,F.Value));y=$clone(x,F.Value).Int();l.pos=(z=l.pos,aa=(new $Int64(0,y)),new $Int64(z.$high+aa.$high,z.$low+aa.$low));$s=-1;return[y,m];}return;}var $f={$blk:DU,$c:true,$r,aa,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.Read=DU;DV=function(h,i){var{aa,ab,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=CT(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[0];m=j[1];if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return[0,m];}if(l.seeked){$s=2;continue;}$s=3;continue;case 2:o=DX(h,i,l.pos);$s=4;case 4:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];q=n[1];l.pos=(r=l.pos,s=(new $Int64(0,p)),new $Int64(r.$high+s.$high,r.$low+s.$low));$s=-1;return[p,q];case 3:if(false&&((h===1)||(h===2))){t=K(h,i);if(t<0){$s=-1;return[0,P(((-t>>>0)))];}$s=-1;return[t,$ifaceNil];}u=$clone(CJ,F.Value).New(new FF([new $Int(i.$length)]));$s=5;case 5:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=$clone(u,F.Value);F.CopyBytesToJS($clone(v,F.Value),i);x=FA("write",new FF([new $Int(h),new v.constructor.elem(v),new $Int(0),new $Int(i.$length),$ifaceNil]));$s=6;case 6:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=x;y=$clone(w[0],F.Value);m=w[1];if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return[0,m];}z=$clone(y,F.Value).Int();l.pos=(aa=l.pos,ab=(new $Int64(0,z)),new $Int64(aa.$high+ab.$high,aa.$low+ab.$low));$s=-1;return[z,m];}return;}var $f={$blk:DV,$c:true,$r,aa,ab,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.Write=DV;DW=function(h,i,j){var{h,i,j,k,l,m,n,o,p,$s,$r,$c}=$restore(this,{h,i,j});$s=$s||0;s:while(true){switch($s){case 0:k=$clone(CJ,F.Value).New(new FF([new $Int(i.$length)]));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=$clone(k,F.Value);n=FA("read",new FF([new $Int(h),new l.constructor.elem(l),new $Int(0),new $Int(i.$length),j]));$s=2;case 2:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=$clone(m[0],F.Value);p=m[1];if(!($interfaceIsEqual(p,$ifaceNil))){$s=-1;return[0,p];}F.CopyBytesToGo(i,$clone(l,F.Value));$s=-1;return[$clone(o,F.Value).Int(),$ifaceNil];}return;}var $f={$blk:DW,$c:true,$r,h,i,j,k,l,m,n,o,p,$s};return $f;};$pkg.Pread=DW;DX=function(h,i,j){var{h,i,j,k,l,m,n,o,p,$s,$r,$c}=$restore(this,{h,i,j});$s=$s||0;s:while(true){switch($s){case 0:k=$clone(CJ,F.Value).New(new FF([new $Int(i.$length)]));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=$clone(k,F.Value);F.CopyBytesToJS($clone(l,F.Value),i);n=FA("write",new FF([new $Int(h),new l.constructor.elem(l),new $Int(0),new $Int(i.$length),j]));$s=2;case 2:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=$clone(m[0],F.Value);p=m[1];if(!($interfaceIsEqual(p,$ifaceNil))){$s=-1;return[0,p];}$s=-1;return[$clone(o,F.Value).Int(),$ifaceNil];}return;}var $f={$blk:DX,$c:true,$r,h,i,j,k,l,m,n,o,p,$s};return $f;};$pkg.Pwrite=DX;DY=function(h,i,j){var{h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{h,i,j});$s=$s||0;s:while(true){switch($s){case 0:k=[k];m=CT(h);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;n=l[0];o=l[1];if(!($interfaceIsEqual(o,$ifaceNil))){$s=-1;return[new $Int64(0,0),o];}p=new $Int64(0,0);q=j;if(q===(0)){$s=3;continue;}if(q===(1)){$s=4;continue;}if(q===(2)){$s=5;continue;}$s=6;continue;case 3:p=i;$s=7;continue;case 4:p=(r=n.pos,new $Int64(r.$high+i.$high,r.$low+i.$low));$s=7;continue;case 5:k[0]=new Y.ptr(new $Int64(0,0),new $Uint64(0,0),0,0,0,0,new $Int64(0,0),new $Int64(0,0),0,0,new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0));s=DB(h,k[0]);$s=8;case 8:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=s;if(!($interfaceIsEqual(t,$ifaceNil))){$s=-1;return[new $Int64(0,0),t];}p=(u=k[0].Size,new $Int64(u.$high+i.$high,u.$low+i.$low));$s=7;continue;case 6:$s=-1;return[new $Int64(0,0),P(22)];case 7:case 2:if((p.$high<0||(p.$high===0&&p.$low<0))){$s=-1;return[new $Int64(0,0),P(22)];}n.seeked=true;n.dirIdx=0;n.pos=p;$s=-1;return[p,$ifaceNil];}return;}var $f={$blk:DY,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s};return $f;};$pkg.Seek=DY;DZ=function(h){var h;return[0,new V(38)];};$pkg.Dup=DZ;EC=function(h){var h,i;if(h===""){return new V(22);}i=0;while(true){if(!(i>0;}return $ifaceNil;};ED=function(h){var h,i,j,k,l;i=$recover();if(!($interfaceIsEqual(i,$ifaceNil))){j=$assertType(i,F.Error,true);k=$clone(j[0],F.Error);l=j[1];if(!l){$panic(i);}h.$set(EE($clone(k.Value,F.Value)));}};EE=function(h){var h,i,j,k,l;i=(j=Q[$String.keyFor($clone($clone(h,F.Value).Get("code"),F.Value).String())],j!==undefined?[j.v,true]:[0,false]);k=i[0];l=i[1];if(!l){$panic(new h.constructor.elem(h));}return P((k));};EV=function(){var{h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=$clone($clone(F.Global(),F.Value).Get("process"),F.Value);if($clone(h,F.Value).IsUndefined()){$s=-1;return FC.nil;}i=$clone($clone(h,F.Value).Get("env"),F.Value);j=$clone($clone(F.Global(),F.Value).Get("Object"),F.Value).Call("keys",new FF([new i.constructor.elem(i)]));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=$clone(j,F.Value);l=$makeSlice(FC,$clone(k,F.Value).Length());m=0;while(true){if(!(m<$clone(k,F.Value).Length())){break;}n=$clone($clone(k,F.Value).Index(m),F.Value).String();((m<0||m>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]=n+"="+$clone($clone(i,F.Value).Get(n),F.Value).String());m=m+(1)>>0;}$s=-1;return l;}return;}var $f={$blk:EV,$c:true,$r,h,i,j,k,l,m,n,$s};return $f;};EY=function(h,i){var h,i,j,k,l;h.Dev=(new $Int64(0,$clone($clone(i,F.Value).Get("dev"),F.Value).Int()));h.Ino=(new $Uint64(0,$clone($clone(i,F.Value).Get("ino"),F.Value).Int()));h.Mode=(($clone($clone(i,F.Value).Get("mode"),F.Value).Int()>>>0));h.Nlink=(($clone($clone(i,F.Value).Get("nlink"),F.Value).Int()>>>0));h.Uid=(($clone($clone(i,F.Value).Get("uid"),F.Value).Int()>>>0));h.Gid=(($clone($clone(i,F.Value).Get("gid"),F.Value).Int()>>>0));h.Rdev=(new $Int64(0,$clone($clone(i,F.Value).Get("rdev"),F.Value).Int()));h.Size=(new $Int64(0,$clone($clone(i,F.Value).Get("size"),F.Value).Int()));h.Blksize=(($clone($clone(i,F.Value).Get("blksize"),F.Value).Int()>>0));h.Blocks=(($clone($clone(i,F.Value).Get("blocks"),F.Value).Int()>>0));j=(new $Int64(0,$clone($clone(i,F.Value).Get("atimeMs"),F.Value).Float()));h.Atime=$div64(j,new $Int64(0,1000),false);h.AtimeNsec=$mul64(($div64(j,new $Int64(0,1000),true)),new $Int64(0,1000000));k=(new $Int64(0,$clone($clone(i,F.Value).Get("mtimeMs"),F.Value).Float()));h.Mtime=$div64(k,new $Int64(0,1000),false);h.MtimeNsec=$mul64(($div64(k,new $Int64(0,1000),true)),new $Int64(0,1000000));l=(new $Int64(0,$clone($clone(i,F.Value).Get("ctimeMs"),F.Value).Float()));h.Ctime=$div64(l,new $Int64(0,1000),false);h.CtimeNsec=$mul64(($div64(l,new $Int64(0,1000),true)),new $Int64(0,1000000));};FA=function(h,i){var{h,i,j,k,l,m,n,o,p,$s,$deferred,$r,$c}=$restore(this,{h,i});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);j=[j];j[0]=new $Chan(FK,1);k=$clone(F.FuncOf((function(j){return function $b(k,l){var{k,l,m,n,$s,$r,$c}=$restore(this,{k,l});$s=$s||0;s:while(true){switch($s){case 0:m=new FK.ptr(new F.Value.ptr(null,false,FM.zero()),$ifaceNil);if(l.$length>=1){n=$clone((0>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+0]),F.Value);if(!$clone(n,F.Value).IsUndefined()&&!$clone(n,F.Value).IsNull()){m.err=EE($clone(n,F.Value));}}F.Value.copy(m.val,F.Undefined());if(l.$length>=2){F.Value.copy(m.val,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]));}$r=$send(j[0],$clone($clone(m,FK),FK));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return $ifaceNil;}return;}var $f={$blk:$b,$c:true,$r,k,l,m,n,$s};return $f;};})(j)),F.Func);$deferred.push([$methodVal($clone(k,F.Func),"Release"),[]]);if($clone($clone(CH,F.Value).Get(h),F.Value).IsUndefined()){$s=1;continue;}$s=2;continue;case 1:l=[F.Undefined(),new V(38)];$s=3;case 3:return l;case 2:m=$clone(CH,F.Value).Call(h,$append(i,new k.constructor.elem(k)));$s=4;case 4:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;n=$recv(j[0]);$s=5;case 5:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=$clone(n[0],FK);p=[o.val,o.err];$s=6;case 6:return p;}return;}}catch(err){$err=err;$s=-1;return[new F.Value.ptr(null,false,FM.zero()),$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:FA,$c:true,$r,h,i,j,k,l,m,n,o,p,$s,$deferred};return $f;}}};V.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Is",name:"Is",pkg:"",typ:$funcType([$error],[$Bool],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];Y.init("",[{prop:"Dev",name:"Dev",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"Ino",name:"Ino",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"Mode",name:"Mode",embedded:false,exported:true,typ:$Uint32,tag:""},{prop:"Nlink",name:"Nlink",embedded:false,exported:true,typ:$Uint32,tag:""},{prop:"Uid",name:"Uid",embedded:false,exported:true,typ:$Uint32,tag:""},{prop:"Gid",name:"Gid",embedded:false,exported:true,typ:$Uint32,tag:""},{prop:"Rdev",name:"Rdev",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"Size",name:"Size",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"Blksize",name:"Blksize",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Blocks",name:"Blocks",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Atime",name:"Atime",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"AtimeNsec",name:"AtimeNsec",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"Mtime",name:"Mtime",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MtimeNsec",name:"MtimeNsec",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"Ctime",name:"Ctime",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"CtimeNsec",name:"CtimeNsec",embedded:false,exported:true,typ:$Int64,tag:""}]);AW.init("",[]);BH.init([]);BI.init("",[{prop:"Port",name:"Port",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Addr",name:"Addr",embedded:false,exported:true,typ:FR,tag:""}]);BJ.init("",[{prop:"Port",name:"Port",embedded:false,exported:true,typ:$Int,tag:""},{prop:"ZoneId",name:"ZoneId",embedded:false,exported:true,typ:$Uint32,tag:""},{prop:"Addr",name:"Addr",embedded:false,exported:true,typ:FS,tag:""}]);CB.init([{prop:"Control",name:"Control",pkg:"",typ:$funcType([FT],[$error],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([FU],[$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([FU],[$error],false)}]);CQ.init("syscall",[{prop:"path",name:"path",embedded:false,exported:false,typ:$String,tag:""},{prop:"entries",name:"entries",embedded:false,exported:false,typ:FC,tag:""},{prop:"dirIdx",name:"dirIdx",embedded:false,exported:false,typ:$Int,tag:""},{prop:"pos",name:"pos",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"seeked",name:"seeked",embedded:false,exported:false,typ:$Bool,tag:""}]);FK.init("syscall",[{prop:"val",name:"val",embedded:false,exported:false,typ:F.Value,tag:""},{prop:"err",name:"err",embedded:false,exported:false,typ:$error,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ForkLock=new D.RWMutex.ptr(new D.Mutex.ptr(0,0),0,0,0,0);CR=new D.Mutex.ptr(0,0);L=$toNativeArray($kindString,["","Operation not permitted","No such file or directory","No such process","Interrupted system call","I/O error","No such device or address","Argument list too long","Exec format error","Bad file number","No child processes","Try again","Out of memory","Permission denied","Bad address","","Device or resource busy","File exists","Cross-device link","No such device","Not a directory","Is a directory","Invalid argument","File table overflow","Too many open files","Not a typewriter","","File too large","No space left on device","Illegal seek","Read-only file system","Too many links","Broken pipe","Math arg out of domain of func","Math result not representable","Deadlock condition","File name too long","No record locks available","not implemented on js","Directory not empty","Too many symbolic links","","No message of desired type","Identifier removed","Channel number out of range","Level 2 not synchronized","Level 3 halted","Level 3 reset","Link number out of range","Protocol driver not attached","No CSI structure available","Level 2 halted","Invalid exchange","Invalid request descriptor","Exchange full","No anode","Invalid request code","Invalid slot","","Bad font file fmt","Device not a stream","No data (for no delay io)","Timer expired","Out of streams resources","Machine is not on the network","Package not installed","The object is remote","The link has been severed","Advertise error","Srmount error","Communication error on send","Protocol error","Multihop attempted","Cross mount point (not really error)","Trying to read unreadable message","Value too large for defined data type","Given log. name not unique","f.d. invalid for this operation","Remote address changed","Can't access a needed shared lib","Accessing a corrupted shared lib",".lib section in a.out corrupted","Attempting to link in too many libs","Attempting to exec a shared library","","","","","Socket operation on non-socket","Destination address required","Message too long","Protocol wrong type for socket","Protocol not available","Unknown protocol","Socket type not supported","Operation not supported on transport endpoint","Protocol family not supported","Address family not supported by protocol family","Address already in use","Address not available","Network interface is not configured","Network is unreachable","","Connection aborted","Connection reset by peer","No buffer space available","Socket is already connected","Socket is not connected","Can't send after socket shutdown","","Connection timed out","Connection refused","Host is down","Host is unreachable","Socket already connected","Connection already in progress","","","","","","","Quota exceeded","No medium (in tape drive)","","Operation canceled.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Inode is remote (not really error)","Inappropriate file type or format","No more files","","No such host or network path","Filename exists with different case"]);M=new V(11);N=new V(22);O=new V(2);Q=$makeMap($String.keyFor,[{k:"EPERM",v:1},{k:"ENOENT",v:2},{k:"ESRCH",v:3},{k:"EINTR",v:4},{k:"EIO",v:5},{k:"ENXIO",v:6},{k:"E2BIG",v:7},{k:"ENOEXEC",v:8},{k:"EBADF",v:9},{k:"ECHILD",v:10},{k:"EAGAIN",v:11},{k:"ENOMEM",v:12},{k:"EACCES",v:13},{k:"EFAULT",v:14},{k:"EBUSY",v:16},{k:"EEXIST",v:17},{k:"EXDEV",v:18},{k:"ENODEV",v:19},{k:"ENOTDIR",v:20},{k:"EISDIR",v:21},{k:"EINVAL",v:22},{k:"ENFILE",v:23},{k:"EMFILE",v:24},{k:"ENOTTY",v:25},{k:"EFBIG",v:27},{k:"ENOSPC",v:28},{k:"ESPIPE",v:29},{k:"EROFS",v:30},{k:"EMLINK",v:31},{k:"EPIPE",v:32},{k:"ENAMETOOLONG",v:36},{k:"ENOSYS",v:38},{k:"EDQUOT",v:122},{k:"EDOM",v:33},{k:"ERANGE",v:34},{k:"EDEADLK",v:35},{k:"ENOLCK",v:37},{k:"ENOTEMPTY",v:39},{k:"ELOOP",v:40},{k:"ENOMSG",v:42},{k:"EIDRM",v:43},{k:"ECHRNG",v:44},{k:"EL2NSYNC",v:45},{k:"EL3HLT",v:46},{k:"EL3RST",v:47},{k:"ELNRNG",v:48},{k:"EUNATCH",v:49},{k:"ENOCSI",v:50},{k:"EL2HLT",v:51},{k:"EBADE",v:52},{k:"EBADR",v:53},{k:"EXFULL",v:54},{k:"ENOANO",v:55},{k:"EBADRQC",v:56},{k:"EBADSLT",v:57},{k:"EDEADLOCK",v:35},{k:"EBFONT",v:59},{k:"ENOSTR",v:60},{k:"ENODATA",v:61},{k:"ETIME",v:62},{k:"ENOSR",v:63},{k:"ENONET",v:64},{k:"ENOPKG",v:65},{k:"EREMOTE",v:66},{k:"ENOLINK",v:67},{k:"EADV",v:68},{k:"ESRMNT",v:69},{k:"ECOMM",v:70},{k:"EPROTO",v:71},{k:"EMULTIHOP",v:72},{k:"EDOTDOT",v:73},{k:"EBADMSG",v:74},{k:"EOVERFLOW",v:75},{k:"ENOTUNIQ",v:76},{k:"EBADFD",v:77},{k:"EREMCHG",v:78},{k:"ELIBACC",v:79},{k:"ELIBBAD",v:80},{k:"ELIBSCN",v:81},{k:"ELIBMAX",v:82},{k:"ELIBEXEC",v:83},{k:"EILSEQ",v:84},{k:"EUSERS",v:87},{k:"ENOTSOCK",v:88},{k:"EDESTADDRREQ",v:89},{k:"EMSGSIZE",v:90},{k:"EPROTOTYPE",v:91},{k:"ENOPROTOOPT",v:92},{k:"EPROTONOSUPPORT",v:93},{k:"ESOCKTNOSUPPORT",v:94},{k:"EOPNOTSUPP",v:95},{k:"EPFNOSUPPORT",v:96},{k:"EAFNOSUPPORT",v:97},{k:"EADDRINUSE",v:98},{k:"EADDRNOTAVAIL",v:99},{k:"ENETDOWN",v:100},{k:"ENETUNREACH",v:101},{k:"ENETRESET",v:102},{k:"ECONNABORTED",v:103},{k:"ECONNRESET",v:104},{k:"ENOBUFS",v:105},{k:"EISCONN",v:106},{k:"ENOTCONN",v:107},{k:"ESHUTDOWN",v:108},{k:"ETOOMANYREFS",v:109},{k:"ETIMEDOUT",v:110},{k:"ECONNREFUSED",v:111},{k:"EHOSTDOWN",v:112},{k:"EHOSTUNREACH",v:113},{k:"EALREADY",v:114},{k:"EINPROGRESS",v:115},{k:"ESTALE",v:116},{k:"ENOTSUP",v:95},{k:"ENOMEDIUM",v:123},{k:"ECANCELED",v:125},{k:"ELBIN",v:2048},{k:"EFTYPE",v:2049},{k:"ENMFILE",v:2050},{k:"EPROCLIM",v:2051},{k:"ENOSHARE",v:2052},{k:"ECASECLASH",v:2053},{k:"EWOULDBLOCK",v:11}]);CG=$clone($clone(F.Global(),F.Value).Get("process"),F.Value);CH=$clone($clone(F.Global(),F.Value).Get("fs"),F.Value);CI=$clone($clone(CH,F.Value).Get("constants"),F.Value);CJ=$clone($clone(F.Global(),F.Value).Get("Uint8Array"),F.Value);CK=$clone($clone(CI,F.Value).Get("O_WRONLY"),F.Value).Int();CL=$clone($clone(CI,F.Value).Get("O_RDWR"),F.Value).Int();CM=$clone($clone(CI,F.Value).Get("O_CREAT"),F.Value).Int();CN=$clone($clone(CI,F.Value).Get("O_TRUNC"),F.Value).Int();CO=$clone($clone(CI,F.Value).Get("O_APPEND"),F.Value).Int();CP=$clone($clone(CI,F.Value).Get("O_EXCL"),F.Value).Int();CS=$makeMap($Int.keyFor,[{k:0,v:new CQ.ptr("",FC.nil,0,new $Int64(0,0),false)},{k:1,v:new CQ.ptr("",FC.nil,0,new $Int64(0,0),false)},{k:2,v:new CQ.ptr("",FC.nil,0,new $Int64(0,0),false)}]);g=EV();$s=7;case 7:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}EI=g;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/syscall/unix"]=(function(){var $pkg={},$init,A,B,C,D,E,F,G,H,I,J;A=$packages["syscall"];B=function(a){var a,b,c,d,e;b=false;c=$ifaceNil;d=false;e=$ifaceNil;b=d;c=e;return[b,c];};$pkg.IsNonblock=B;C=function(a,b,c,d){var a,b,c,d;return[0,new A.Errno(38)];};$pkg.RecvfromInet4=C;D=function(a,b,c,d){var a,b,c,d,e,f,g,h;e=0;f=$ifaceNil;g=0;h=new A.Errno(38);e=g;f=h;return[e,f];};$pkg.RecvfromInet6=D;E=function(a,b,c,d){var a,b,c,d,e;e=$ifaceNil;e=new A.Errno(38);return e;};$pkg.SendtoInet4=E;F=function(a,b,c,d){var a,b,c,d,e;e=$ifaceNil;e=new A.Errno(38);return e;};$pkg.SendtoInet6=F;G=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i;f=0;g=$ifaceNil;h=0;i=new A.Errno(38);f=h;g=i;return[f,g];};$pkg.SendmsgNInet4=G;H=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i;f=0;g=$ifaceNil;h=0;i=new A.Errno(38);f=h;g=i;return[f,g];};$pkg.SendmsgNInet6=H;I=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m;f=0;g=0;h=0;i=$ifaceNil;j=0;k=0;l=0;m=new A.Errno(38);f=j;g=k;h=l;i=m;return[f,g,h,i];};$pkg.RecvmsgInet4=I;J=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m;f=0;g=0;h=0;i=$ifaceNil;j=0;k=0;l=0;m=new A.Errno(38);f=j;g=k;h=l;i=m;return[f,g,h,i];};$pkg.RecvmsgInet6=J;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["github.com/gopherjs/gopherjs/nosync"]=(function(){var $pkg={},$init,B,J,K;B=$pkg.Once=$newType(0,$kindStruct,"nosync.Once",true,"github.com/gopherjs/gopherjs/nosync",true,function(doing_,done_){this.$val=this;if(arguments.length===0){this.doing=false;this.done=false;return;}this.doing=doing_;this.done=done_;});J=$funcType([],[],false);K=$ptrType(B);B.ptr.prototype.Do=function(a){var{a,b,$s,$deferred,$r,$c}=$restore(this,{a});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);b=[b];b[0]=this;if(b[0].done){$s=1;continue;}$s=2;continue;case 1:$s=3;case 3:return;case 2:if(b[0].doing){$panic(new $String("nosync: Do called within f"));}b[0].doing=true;$deferred.push([(function(b){return function(){b[0].doing=false;b[0].done=true;};})(b),[]]);$r=a();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:B.ptr.prototype.Do,$c:true,$r,a,b,$s,$deferred};return $f;}}};B.prototype.Do=function(a){return this.$val.Do(a);};K.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([J],[],false)}];B.init("github.com/gopherjs/gopherjs/nosync",[{prop:"doing",name:"doing",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"done",name:"done",embedded:false,exported:false,typ:$Bool,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["time"]=(function(){var $pkg={},$init,A,F,E,B,C,D,W,X,Y,AG,AH,AQ,AR,AS,AV,CW,EF,EG,EH,EJ,EK,EL,EO,ER,ES,ET,EW,FA,L,Z,ED,AA,EE,AB,AL,BC,BG,CF,CI,CJ,CK,CL,CP,CV,DL,EB,j,k,AC,AD,AE,AF,AI,AJ,AK,AT,AU,AW,AX,AY,BB,BD,BE,BF,BI,BJ,BM,BN,BO,BP,CG,CH,CM,CN,CO,CQ,CR,CS,CT,CU,CX,CY,CZ,DA,DB,DC,DD,DF,DG,DH,DI,DJ,DK,DM,DQ,DR,DS;A=$packages["errors"];F=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["github.com/gopherjs/gopherjs/nosync"];B=$packages["runtime"];C=$packages["syscall"];D=$packages["syscall/js"];W=$pkg.Location=$newType(0,$kindStruct,"time.Location",true,"time",true,function(name_,zone_,tx_,extend_,cacheStart_,cacheEnd_,cacheZone_){this.$val=this;if(arguments.length===0){this.name="";this.zone=EF.nil;this.tx=EG.nil;this.extend="";this.cacheStart=new $Int64(0,0);this.cacheEnd=new $Int64(0,0);this.cacheZone=EH.nil;return;}this.name=name_;this.zone=zone_;this.tx=tx_;this.extend=extend_;this.cacheStart=cacheStart_;this.cacheEnd=cacheEnd_;this.cacheZone=cacheZone_;});X=$pkg.zone=$newType(0,$kindStruct,"time.zone",true,"time",false,function(name_,offset_,isDST_){this.$val=this;if(arguments.length===0){this.name="";this.offset=0;this.isDST=false;return;}this.name=name_;this.offset=offset_;this.isDST=isDST_;});Y=$pkg.zoneTrans=$newType(0,$kindStruct,"time.zoneTrans",true,"time",false,function(when_,index_,isstd_,isutc_){this.$val=this;if(arguments.length===0){this.when=new $Int64(0,0);this.index=0;this.isstd=false;this.isutc=false;return;}this.when=when_;this.index=index_;this.isstd=isstd_;this.isutc=isutc_;});AG=$pkg.ruleKind=$newType(4,$kindInt,"time.ruleKind",true,"time",false,null);AH=$pkg.rule=$newType(0,$kindStruct,"time.rule",true,"time",false,function(kind_,day_,week_,mon_,time_){this.$val=this;if(arguments.length===0){this.kind=0;this.day=0;this.week=0;this.mon=0;this.time=0;return;}this.kind=kind_;this.day=day_;this.week=week_;this.mon=mon_;this.time=time_;});AQ=$pkg.Time=$newType(0,$kindStruct,"time.Time",true,"time",true,function(wall_,ext_,loc_){this.$val=this;if(arguments.length===0){this.wall=new $Uint64(0,0);this.ext=new $Int64(0,0);this.loc=EL.nil;return;}this.wall=wall_;this.ext=ext_;this.loc=loc_;});AR=$pkg.Month=$newType(4,$kindInt,"time.Month",true,"time",true,null);AS=$pkg.Weekday=$newType(4,$kindInt,"time.Weekday",true,"time",true,null);AV=$pkg.Duration=$newType(8,$kindInt64,"time.Duration",true,"time",true,null);CW=$pkg.ParseError=$newType(0,$kindStruct,"time.ParseError",true,"time",true,function(Layout_,Value_,LayoutElem_,ValueElem_,Message_){this.$val=this;if(arguments.length===0){this.Layout="";this.Value="";this.LayoutElem="";this.ValueElem="";this.Message="";return;}this.Layout=Layout_;this.Value=Value_;this.LayoutElem=LayoutElem_;this.ValueElem=ValueElem_;this.Message=Message_;});EF=$sliceType(X);EG=$sliceType(Y);EH=$ptrType(X);EJ=$sliceType($String);EK=$sliceType($Uint8);EL=$ptrType(W);EO=$arrayType($Uint8,32);ER=$arrayType($Uint8,20);ES=$arrayType($Uint8,9);ET=$arrayType($Uint8,64);EW=$ptrType(AQ);FA=$ptrType(CW);W.ptr.prototype.get=function(){var{l,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;if(l===EL.nil){$s=-1;return Z;}if(l===AA){$s=1;continue;}$s=2;continue;case 1:$r=AB.Do(DQ);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return l;}return;}var $f={$blk:W.ptr.prototype.get,$c:true,$r,l,$s};return $f;};W.prototype.get=function(){return this.$val.get();};W.ptr.prototype.String=function(){var{l,m,n,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=l.get();$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m.name;$s=2;case 2:return n;}return;}var $f={$blk:W.ptr.prototype.String,$c:true,$r,l,m,n,$s};return $f;};W.prototype.String=function(){return this.$val.String();};AC=function(l,m){var l,m,n,o;n=new W.ptr(l,new EF([new X.ptr(l,m,false)]),new EG([new Y.ptr(new $Int64(-2147483648,0),0,false,false)]),"",new $Int64(-2147483648,0),new $Int64(2147483647,4294967295),EH.nil);n.cacheZone=(o=n.zone,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]));return n;};$pkg.FixedZone=AC;W.ptr.prototype.lookup=function(l){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m="";n=0;o=new $Int64(0,0);p=new $Int64(0,0);q=false;r=this;s=r.get();$s=1;case 1:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;if(r.zone.$length===0){m="UTC";n=0;o=new $Int64(-2147483648,0);p=new $Int64(2147483647,4294967295);q=false;$s=-1;return[m,n,o,p,q];}t=r.cacheZone;if(!(t===EH.nil)&&(u=r.cacheStart,(u.$high=x.$length?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+0])).when,(l.$high=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+z]));m=aa.name;n=aa.offset;o=new $Int64(-2147483648,0);if(r.tx.$length>0){p=(ab=r.tx,(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0])).when;}else{p=new $Int64(2147483647,4294967295);}q=aa.isDST;$s=-1;return[m,n,o,p,q];}ac=r.tx;p=new $Int64(2147483647,4294967295);ad=0;ae=ac.$length;while(true){if(!((ae-ad>>0)>1)){break;}ag=ad+(af=((ae-ad>>0))/2,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"))>>0;ah=((ag<0||ag>=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ag]).when;if((l.$high=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ad]).index,((aj<0||aj>=ai.$length)?($throwRuntimeError("index out of range"),undefined):ai.$array[ai.$offset+aj]));m=ak.name;n=ak.offset;o=((ad<0||ad>=ac.$length)?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+ad]).when;q=ak.isDST;if((ad===(ac.$length-1>>0))&&!(r.extend==="")){al=AD(r.extend,p,l);am=al[0];an=al[1];ao=al[2];ap=al[3];aq=al[4];ar=al[5];if(ar){as=am;at=an;au=ao;av=ap;aw=aq;m=as;n=at;o=au;p=av;q=aw;$s=-1;return[m,n,o,p,q];}}$s=-1;return[m,n,o,p,q];}return;}var $f={$blk:W.ptr.prototype.lookup,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};W.prototype.lookup=function(l){return this.$val.lookup(l);};W.ptr.prototype.lookupFirstZone=function(){var l,m,n,o,p,q,r,s,t,u,v;l=this;if(!l.firstZoneUsed()){return 0;}if(l.tx.$length>0&&(m=l.zone,n=(o=l.tx,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])).index,((n<0||n>=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n])).isDST){q=(((p=l.tx,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0])).index>>0))-1>>0;while(true){if(!(q>=0)){break;}if(!(r=l.zone,((q<0||q>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+q])).isDST){return q;}q=q-(1)>>0;}}s=l.zone;t=0;while(true){if(!(t=v.$length)?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+u])).isDST){return u;}t++;}return 0;};W.prototype.lookupFirstZone=function(){return this.$val.lookupFirstZone();};W.ptr.prototype.firstZoneUsed=function(){var l,m,n,o;l=this;m=l.tx;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]),Y);if(o.index===0){return true;}n++;}return false;};W.prototype.firstZoneUsed=function(){return this.$val.firstZoneUsed();};AD=function(l,m,n){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;o="";p=0;q=new $Int64(0,0);r=new $Int64(0,0);s=false;t=false;u="";v="";w=u;x=v;y=0;z=0;aa=y;ab=z;ac=AE(l);w=ac[0];l=ac[1];t=ac[2];if(t){ad=AF(l);aa=ad[0];l=ad[1];t=ad[2];}if(!t){ae="";af=0;ag=new $Int64(0,0);ah=new $Int64(0,0);ai=false;aj=false;o=ae;p=af;q=ag;r=ah;s=ai;t=aj;return[o,p,q,r,s,t];}aa=-aa;if((l.length===0)||(l.charCodeAt(0)===44)){ak=w;al=aa;am=m;an=new $Int64(2147483647,4294967295);ao=false;ap=true;o=ak;p=al;q=am;r=an;s=ao;t=ap;return[o,p,q,r,s,t];}aq=AE(l);x=aq[0];l=aq[1];t=aq[2];if(t){if((l.length===0)||(l.charCodeAt(0)===44)){ab=aa+3600>>0;}else{ar=AF(l);ab=ar[0];l=ar[1];t=ar[2];ab=-ab;}}if(!t){as="";at=0;au=new $Int64(0,0);av=new $Int64(0,0);aw=false;ax=false;o=as;p=at;q=au;r=av;s=aw;t=ax;return[o,p,q,r,s,t];}if(l.length===0){l=",M3.2.0,M11.1.0";}if(!((l.charCodeAt(0)===44))&&!((l.charCodeAt(0)===59))){ay="";az=0;ba=new $Int64(0,0);bb=new $Int64(0,0);bc=false;bd=false;o=ay;p=az;q=ba;r=bb;s=bc;t=bd;return[o,p,q,r,s,t];}l=$substring(l,1);be=new AH.ptr(0,0,0,0,0);bf=new AH.ptr(0,0,0,0,0);bg=$clone(be,AH);bh=$clone(bf,AH);bi=AI(l);AH.copy(bg,bi[0]);l=bi[1];t=bi[2];if(!t||(l.length===0)||!((l.charCodeAt(0)===44))){bj="";bk=0;bl=new $Int64(0,0);bm=new $Int64(0,0);bn=false;bo=false;o=bj;p=bk;q=bl;r=bm;s=bn;t=bo;return[o,p,q,r,s,t];}l=$substring(l,1);bp=AI(l);AH.copy(bh,bp[0]);l=bp[1];t=bp[2];if(!t||l.length>0){bq="";br=0;bs=new $Int64(0,0);bt=new $Int64(0,0);bu=false;bv=false;o=bq;p=br;q=bs;r=bt;s=bu;t=bv;return[o,p,q,r,s,t];}bw=BB(((bx=(by=new $Int64(n.$high+14,n.$low+2006054656),new $Int64(by.$high+2147483631,by.$low+2739393024)),new $Uint64(bx.$high,bx.$low))),false);bz=bw[0];ca=bw[3];cd=(cb=(new $Int64(0,($imul(ca,86400)))),cc=$div64(n,new $Int64(0,86400),true),new $Int64(cb.$high+cc.$high,cb.$low+cc.$low));ce=BE(bz);cg=((cf=$mul64(ce,new $Uint64(0,86400)),new $Int64(cf.$high,cf.$low)));cg=(ch=new $Int64(-2147483647,3844486912),new $Int64(cg.$high+ch.$high,cg.$low+ch.$low));ci=(new $Int64(0,AK(bz,$clone(bg,AH),aa)));cj=(new $Int64(0,AK(bz,$clone(bh,AH),ab)));ck=true;cl=false;cm=ck;cn=cl;if((cj.$highcj.$high||(cd.$high===cj.$high&&cd.$low>=cj.$low))){dc=w;dd=aa;de=new $Int64(cj.$high+cg.$high,cj.$low+cg.$low);df=new $Int64(cg.$high+0,cg.$low+31536000);dg=cn;dh=true;o=dc;p=dd;q=de;r=df;s=dg;t=dh;return[o,p,q,r,s,t];}else{di=x;dj=ab;dk=new $Int64(ci.$high+cg.$high,ci.$low+cg.$low);dl=new $Int64(cj.$high+cg.$high,cj.$low+cg.$low);dm=cm;dn=true;o=di;p=dj;q=dk;r=dl;s=dm;t=dn;return[o,p,q,r,s,t];}};AE=function(l){var l,m,n,o,p,q,r,s,t,u,v,w;if(l.length===0){return["","",false];}if(!((l.charCodeAt(0)===60))){m=l;n=0;while(true){if(!(n>0)),true];}t+=u[1];}return["","",false];}};AF=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=0;n="";o=false;if(l.length===0){p=0;q="";r=false;m=p;n=q;o=r;return[m,n,o];}s=false;if(l.charCodeAt(0)===43){l=$substring(l,1);}else if(l.charCodeAt(0)===45){l=$substring(l,1);s=true;}t=0;u=AJ(l,0,168);t=u[0];l=u[1];o=u[2];if(!o){v=0;w="";x=false;m=v;n=w;o=x;return[m,n,o];}y=$imul(t,3600);if((l.length===0)||!((l.charCodeAt(0)===58))){if(s){y=-y;}z=y;aa=l;ab=true;m=z;n=aa;o=ab;return[m,n,o];}ac=0;ad=AJ($substring(l,1),0,59);ac=ad[0];l=ad[1];o=ad[2];if(!o){ae=0;af="";ag=false;m=ae;n=af;o=ag;return[m,n,o];}y=y+(($imul(ac,60)))>>0;if((l.length===0)||!((l.charCodeAt(0)===58))){if(s){y=-y;}ah=y;ai=l;aj=true;m=ah;n=ai;o=aj;return[m,n,o];}ak=0;al=AJ($substring(l,1),0,59);ak=al[0];l=al[1];o=al[2];if(!o){am=0;an="";ao=false;m=am;n=an;o=ao;return[m,n,o];}y=y+(ak)>>0;if(s){y=-y;}ap=y;aq=l;ar=true;m=ap;n=aq;o=ar;return[m,n,o];};AI=function(l){var l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=new AH.ptr(0,0,0,0,0);if(l.length===0){return[new AH.ptr(0,0,0,0,0),"",false];}n=false;if(l.charCodeAt(0)===74){o=0;p=AJ($substring(l,1),1,365);o=p[0];l=p[1];n=p[2];if(!n){return[new AH.ptr(0,0,0,0,0),"",false];}m.kind=0;m.day=o;}else if(l.charCodeAt(0)===77){q=0;r=AJ($substring(l,1),1,12);q=r[0];l=r[1];n=r[2];if(!n||(l.length===0)||!((l.charCodeAt(0)===46))){return[new AH.ptr(0,0,0,0,0),"",false];}s=0;t=AJ($substring(l,1),1,5);s=t[0];l=t[1];n=t[2];if(!n||(l.length===0)||!((l.charCodeAt(0)===46))){return[new AH.ptr(0,0,0,0,0),"",false];}u=0;v=AJ($substring(l,1),0,6);u=v[0];l=v[1];n=v[2];if(!n){return[new AH.ptr(0,0,0,0,0),"",false];}m.kind=2;m.day=u;m.week=s;m.mon=q;}else{w=0;x=AJ(l,0,365);w=x[0];l=x[1];n=x[2];if(!n){return[new AH.ptr(0,0,0,0,0),"",false];}m.kind=1;m.day=w;}if((l.length===0)||!((l.charCodeAt(0)===47))){m.time=7200;return[m,l,true];}y=AF($substring(l,1));z=y[0];l=y[1];n=y[2];if(!n){return[new AH.ptr(0,0,0,0,0),"",false];}m.time=z;return[m,l,true];};AJ=function(l,m,n){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;o=0;p="";q=false;if(l.length===0){r=0;s="";t=false;o=r;p=s;q=t;return[o,p,q];}o=0;u=l;v=0;while(true){if(!(v57){if((x===0)||o>0))-48>>0))>>0;if(o>n){af=0;ag="";ah=false;o=af;p=ag;q=ah;return[o,p,q];}v+=w[1];}if(o>0)),86400);if(BM(l)&&m.day>=60){o=o+(86400)>>0;}}else if(p===(1)){o=$imul(m.day,86400);}else if(p===(2)){r=(q=((m.mon+9>>0))%12,q===q?q:$throwRuntimeError("integer divide by zero"))+1>>0;s=l;if(m.mon<=2){s=s-(1)>>0;}u=(t=s/100,(t===t&&t!==1/0&&t!==-1/0)?t>>0:$throwRuntimeError("integer divide by zero"));w=(v=s%100,v===v?v:$throwRuntimeError("integer divide by zero"));ab=(x=(((((((y=((($imul(26,r))-2>>0))/10,(y===y&&y!==1/0&&y!==-1/0)?y>>0:$throwRuntimeError("integer divide by zero"))+1>>0)+w>>0)+(z=w/4,(z===z&&z!==1/0&&z!==-1/0)?z>>0:$throwRuntimeError("integer divide by zero"))>>0)+(aa=u/4,(aa===aa&&aa!==1/0&&aa!==-1/0)?aa>>0:$throwRuntimeError("integer divide by zero"))>>0)-($imul(2,u))>>0))%7,x===x?x:$throwRuntimeError("integer divide by zero"));if(ab<0){ab=ab+(7)>>0;}ac=m.day-ab>>0;if(ac<0){ac=ac+(7)>>0;}ad=1;while(true){if(!(ad>0)>=BD(((m.mon>>0)),l)){break;}ac=ac+(7)>>0;ad=ad+(1)>>0;}ac=ac+((((ae=m.mon-1>>0,((ae<0||ae>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[ae]))>>0)))>>0;if(BM(l)&&m.mon>2){ac=ac+(1)>>0;}o=$imul(ac,86400);}return(o+m.time>>0)-n>>0;};W.ptr.prototype.lookupName=function(l,m){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l,m});$s=$s||0;s:while(true){switch($s){case 0:n=0;o=false;p=this;q=p.get();$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=p.zone;s=0;case 2:if(!(s=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));if(v.name===l){$s=4;continue;}$s=5;continue;case 4:y=p.lookup((x=(new $Int64(0,v.offset)),new $Int64(m.$high-x.$high,m.$low-x.$low)));$s=6;case 6:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}w=y;z=w[0];aa=w[1];if(z===v.name){ab=aa;ac=true;n=ab;o=ac;$s=-1;return[n,o];}case 5:s++;$s=2;continue;case 3:ad=p.zone;ae=0;while(true){if(!(ae=ag.$length)?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+af]));if(ah.name===l){ai=ah.offset;aj=true;n=ai;o=aj;$s=-1;return[n,o];}ae++;}$s=-1;return[n,o];}return;}var $f={$blk:W.ptr.prototype.lookupName,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};W.prototype.lookupName=function(l,m){return this.$val.lookupName(l,m);};AQ.ptr.prototype.nsec=function(){var l,m;l=this;return(((m=l.wall,new $Uint64(m.$high&0,(m.$low&1073741823)>>>0)).$low>>0));};AQ.prototype.nsec=function(){return this.$val.nsec();};AQ.ptr.prototype.sec=function(){var l,m,n,o,p;l=this;if(!((m=(n=l.wall,new $Uint64(n.$high&2147483648,(n.$low&0)>>>0)),(m.$high===0&&m.$low===0)))){return(o=((p=$shiftRightUint64($shiftLeft64(l.wall,1),31),new $Int64(p.$high,p.$low))),new $Int64(13+o.$high,3618733952+o.$low));}return l.ext;};AQ.prototype.sec=function(){return this.$val.sec();};AQ.ptr.prototype.unixSec=function(){var l,m;l=this;return(m=l.sec(),new $Int64(m.$high+-15,m.$low+2288912640));};AQ.prototype.unixSec=function(){return this.$val.unixSec();};AQ.ptr.prototype.addSec=function(l){var l,m,n,o,p,q,r,s,t,u,v,w,x,y;m=this;if(!((n=(o=m.wall,new $Uint64(o.$high&2147483648,(o.$low&0)>>>0)),(n.$high===0&&n.$low===0)))){q=((p=$shiftRightUint64($shiftLeft64(m.wall,1),31),new $Int64(p.$high,p.$low)));r=new $Int64(q.$high+l.$high,q.$low+l.$low);if((0>>0)),v=$shiftLeft64((new $Uint64(r.$high,r.$low)),30),new $Uint64(t.$high|v.$high,(t.$low|v.$low)>>>0)),new $Uint64(s.$high|2147483648,(s.$low|0)>>>0));return;}m.stripMono();}x=(w=m.ext,new $Int64(w.$high+l.$high,w.$low+l.$low));if(((y=m.ext,(x.$high>y.$high||(x.$high===y.$high&&x.$low>y.$low))))===((l.$high>0||(l.$high===0&&l.$low>0)))){m.ext=x;}else if((l.$high>0||(l.$high===0&&l.$low>0))){m.ext=new $Int64(2147483647,4294967295);}else{m.ext=new $Int64(-2147483648,1);}};AQ.prototype.addSec=function(l){return this.$val.addSec(l);};AQ.ptr.prototype.setLoc=function(l){var l,m;m=this;if(l===Z){l=EL.nil;}m.stripMono();m.loc=l;};AQ.prototype.setLoc=function(l){return this.$val.setLoc(l);};AQ.ptr.prototype.stripMono=function(){var l,m,n,o,p;l=this;if(!((m=(n=l.wall,new $Uint64(n.$high&2147483648,(n.$low&0)>>>0)),(m.$high===0&&m.$low===0)))){l.ext=l.sec();l.wall=(o=l.wall,p=new $Uint64(0,1073741823),new $Uint64(o.$high&p.$high,(o.$low&p.$low)>>>0));}};AQ.prototype.stripMono=function(){return this.$val.stripMono();};AQ.ptr.prototype.After=function(l){var l,m,n,o,p,q,r,s,t,u;m=this;if(!((n=(o=(p=m.wall,q=l.wall,new $Uint64(p.$high&q.$high,(p.$low&q.$low)>>>0)),new $Uint64(o.$high&2147483648,(o.$low&0)>>>0)),(n.$high===0&&n.$low===0)))){return(r=m.ext,s=l.ext,(r.$high>s.$high||(r.$high===s.$high&&r.$low>s.$low)));}t=m.sec();u=l.sec();return(t.$high>u.$high||(t.$high===u.$high&&t.$low>u.$low))||(t.$high===u.$high&&t.$low===u.$low)&&m.nsec()>l.nsec();};AQ.prototype.After=function(l){return this.$val.After(l);};AQ.ptr.prototype.Before=function(l){var l,m,n,o,p,q,r,s,t,u;m=this;if(!((n=(o=(p=m.wall,q=l.wall,new $Uint64(p.$high&q.$high,(p.$low&q.$low)>>>0)),new $Uint64(o.$high&2147483648,(o.$low&0)>>>0)),(n.$high===0&&n.$low===0)))){return(r=m.ext,s=l.ext,(r.$high>>0)),new $Uint64(o.$high&2147483648,(o.$low&0)>>>0)),(n.$high===0&&n.$low===0)))){return(r=m.ext,s=l.ext,(r.$high===s.$high&&r.$low===s.$low));}return(t=m.sec(),u=l.sec(),(t.$high===u.$high&&t.$low===u.$low))&&(m.nsec()===l.nsec());};AQ.prototype.Equal=function(l){return this.$val.Equal(l);};AR.prototype.String=function(){var l,m,n,o;l=this.$val;if(1<=l&&l<=12){return(m=l-1>>0,((m<0||m>=CL.$length)?($throwRuntimeError("index out of range"),undefined):CL.$array[CL.$offset+m]));}n=$makeSlice(EK,20);o=AX(n,(new $Uint64(0,l)));return"%!Month("+($bytesToString($subslice(n,o)))+")";};$ptrType(AR).prototype.String=function(){return new AR(this.$get()).String();};AS.prototype.String=function(){var l,m,n;l=this.$val;if(0<=l&&l<=6){return((l<0||l>=CI.$length)?($throwRuntimeError("index out of range"),undefined):CI.$array[CI.$offset+l]);}m=$makeSlice(EK,20);n=AX(m,(new $Uint64(0,l)));return"%!Weekday("+($bytesToString($subslice(m,n)))+")";};$ptrType(AS).prototype.String=function(){return new AS(this.$get()).String();};AQ.ptr.prototype.IsZero=function(){var l,m;l=this;return(m=l.sec(),(m.$high===0&&m.$low===0))&&(l.nsec()===0);};AQ.prototype.IsZero=function(){return this.$val.IsZero();};AQ.ptr.prototype.abs=function(){var{l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=l.loc;if(m===EL.nil||m===AA){$s=1;continue;}$s=2;continue;case 1:n=m.get();$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;case 2:o=l.unixSec();if(!(m===Z)){$s=4;continue;}$s=5;continue;case 4:if(!(m.cacheZone===EH.nil)&&(p=m.cacheStart,(p.$high>0))/86400,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"))>>0));};AQ.ptr.prototype.ISOWeek=function(){var{l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=0;m=0;n=this;o=$clone(n,AQ).abs();$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;q=4-AT(p)>>0;if(q===4){q=-3;}p=(r=$mul64((new $Uint64(0,q)),new $Uint64(0,86400)),new $Uint64(p.$high+r.$high,p.$low+r.$low));s=BB(p,false);l=s[0];t=s[3];u=l;v=(w=t/7,(w===w&&w!==1/0&&w!==-1/0)?w>>0:$throwRuntimeError("integer divide by zero"))+1>>0;l=u;m=v;$s=-1;return[l,m];}return;}var $f={$blk:AQ.ptr.prototype.ISOWeek,$c:true,$r,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};AQ.prototype.ISOWeek=function(){return this.$val.ISOWeek();};AQ.ptr.prototype.Clock=function(){var{l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=0;m=0;n=0;o=this;q=$clone(o,AQ).abs();$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=AU(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}p=r;l=p[0];m=p[1];n=p[2];s=[l,m,n];$s=3;case 3:return s;}return;}var $f={$blk:AQ.ptr.prototype.Clock,$c:true,$r,l,m,n,o,p,q,r,s,$s};return $f;};AQ.prototype.Clock=function(){return this.$val.Clock();};AU=function(l){var l,m,n,o,p,q;m=0;n=0;o=0;o=(($div64(l,new $Uint64(0,86400),true).$low>>0));m=(p=o/3600,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero"));o=o-(($imul(m,3600)))>>0;n=(q=o/60,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"));o=o-(($imul(n,60)))>>0;return[m,n,o];};AQ.ptr.prototype.Hour=function(){var{l,m,n,o,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;n=$clone(l,AQ).abs();$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=(m=(($div64(n,new $Uint64(0,86400),true).$low>>0))/3600,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));$s=2;case 2:return o;}return;}var $f={$blk:AQ.ptr.prototype.Hour,$c:true,$r,l,m,n,o,$s};return $f;};AQ.prototype.Hour=function(){return this.$val.Hour();};AQ.ptr.prototype.Minute=function(){var{l,m,n,o,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;n=$clone(l,AQ).abs();$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=(m=(($div64(n,new $Uint64(0,3600),true).$low>>0))/60,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));$s=2;case 2:return o;}return;}var $f={$blk:AQ.ptr.prototype.Minute,$c:true,$r,l,m,n,o,$s};return $f;};AQ.prototype.Minute=function(){return this.$val.Minute();};AQ.ptr.prototype.Second=function(){var{l,m,n,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=$clone(l,AQ).abs();$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=(($div64(m,new $Uint64(0,60),true).$low>>0));$s=2;case 2:return n;}return;}var $f={$blk:AQ.ptr.prototype.Second,$c:true,$r,l,m,n,$s};return $f;};AQ.prototype.Second=function(){return this.$val.Second();};AQ.ptr.prototype.Nanosecond=function(){var l;l=this;return((l.nsec()>>0));};AQ.prototype.Nanosecond=function(){return this.$val.Nanosecond();};AQ.ptr.prototype.YearDay=function(){var{l,m,n,o,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;n=$clone(l,AQ).date(false);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[3];$s=-1;return o+1>>0;}return;}var $f={$blk:AQ.ptr.prototype.YearDay,$c:true,$r,l,m,n,o,$s};return $f;};AQ.prototype.YearDay=function(){return this.$val.YearDay();};AV.prototype.String=function(){var l,m,n,o,p,q,r,s;l=this;m=EO.zero();n=32;o=(new $Uint64(l.$high,l.$low));p=(l.$high<0||(l.$high===0&&l.$low<0));if(p){o=new $Uint64(-o.$high,-o.$low);}if((o.$high<0||(o.$high===0&&o.$low<1000000000))){q=0;n=n-(1)>>0;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=115);n=n-(1)>>0;if((o.$high===0&&o.$low===0)){return"0s";}else if((o.$high<0||(o.$high===0&&o.$low<1000))){q=0;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=110);}else if((o.$high<0||(o.$high===0&&o.$low<1000000))){q=3;n=n-(1)>>0;$copyString($subslice(new EK(m),n),"\xC2\xB5");}else{q=6;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=109);}r=AW($subslice(new EK(m),0,n),o,q);n=r[0];o=r[1];n=AX($subslice(new EK(m),0,n),o);}else{n=n-(1)>>0;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=115);s=AW($subslice(new EK(m),0,n),o,9);n=s[0];o=s[1];n=AX($subslice(new EK(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=109);n=AX($subslice(new EK(m),0,n),$div64(o,new $Uint64(0,60),true));o=$div64(o,(new $Uint64(0,60)),false);if((o.$high>0||(o.$high===0&&o.$low>0))){n=n-(1)>>0;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=104);n=AX($subslice(new EK(m),0,n),o);}}}if(p){n=n-(1)>>0;((n<0||n>=m.length)?($throwRuntimeError("index out of range"),undefined):m[n]=45);}return($bytesToString($subslice(new EK(m),n)));};$ptrType(AV).prototype.String=function(){return this.$get().String();};AW=function(l,m,n){var l,m,n,o,p,q,r,s,t,u,v;o=0;p=new $Uint64(0,0);q=l.$length;r=false;s=0;while(true){if(!(s>0;((q<0||q>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+q]=(((t.$low<<24>>>24))+48<<24>>>24));}m=$div64(m,(new $Uint64(0,10)),false);s=s+(1)>>0;}if(r){q=q-(1)>>0;((q<0||q>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+q]=46);}u=q;v=m;o=u;p=v;return[o,p];};AX=function(l,m){var l,m,n;n=l.$length;if((m.$high===0&&m.$low===0)){n=n-(1)>>0;((n<0||n>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+n]=48);}else{while(true){if(!((m.$high>0||(m.$high===0&&m.$low>0)))){break;}n=n-(1)>>0;((n<0||n>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+n]=((($div64(m,new $Uint64(0,10),true).$low<<24>>>24))+48<<24>>>24));m=$div64(m,(new $Uint64(0,10)),false);}}return n;};AV.prototype.Nanoseconds=function(){var l;l=this;return(new $Int64(l.$high,l.$low));};$ptrType(AV).prototype.Nanoseconds=function(){return this.$get().Nanoseconds();};AV.prototype.Microseconds=function(){var l;l=this;return $div64((new $Int64(l.$high,l.$low)),new $Int64(0,1000),false);};$ptrType(AV).prototype.Microseconds=function(){return this.$get().Microseconds();};AV.prototype.Milliseconds=function(){var l;l=this;return $div64((new $Int64(l.$high,l.$low)),new $Int64(0,1000000),false);};$ptrType(AV).prototype.Milliseconds=function(){return this.$get().Milliseconds();};AV.prototype.Seconds=function(){var l,m,n;l=this;m=$div64(l,new AV(0,1000000000),false);n=$div64(l,new AV(0,1000000000),true);return($flatten64(m))+($flatten64(n))/1e+09;};$ptrType(AV).prototype.Seconds=function(){return this.$get().Seconds();};AV.prototype.Minutes=function(){var l,m,n;l=this;m=$div64(l,new AV(13,4165425152),false);n=$div64(l,new AV(13,4165425152),true);return($flatten64(m))+($flatten64(n))/6e+10;};$ptrType(AV).prototype.Minutes=function(){return this.$get().Minutes();};AV.prototype.Hours=function(){var l,m,n;l=this;m=$div64(l,new AV(838,817405952),false);n=$div64(l,new AV(838,817405952),true);return($flatten64(m))+($flatten64(n))/3.6e+12;};$ptrType(AV).prototype.Hours=function(){return this.$get().Hours();};AV.prototype.Truncate=function(l){var l,m,n;m=this;if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}return(n=$div64(m,l,true),new AV(m.$high-n.$high,m.$low-n.$low));};$ptrType(AV).prototype.Truncate=function(l){return this.$get().Truncate(l);};AY=function(l,m){var l,m,n,o,p,q;return(n=(o=(new $Uint64(l.$high,l.$low)),p=(new $Uint64(l.$high,l.$low)),new $Uint64(o.$high+p.$high,o.$low+p.$low)),q=(new $Uint64(m.$high,m.$low)),(n.$highm.$high||(r.$high===m.$high&&r.$low>m.$low))){return r;}return new AV(2147483647,4294967295);};$ptrType(AV).prototype.Round=function(l){return this.$get().Round(l);};AQ.ptr.prototype.Add=function(l){var aa,ab,ac,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=this;o=((n=$div64(l,new AV(0,1000000000),false),new $Int64(n.$high,n.$low)));q=m.nsec()+(((p=$div64(l,new AV(0,1000000000),true),p.$low+((p.$high>>31)*4294967296))>>0))>>0;if(q>=1000000000){o=(r=new $Int64(0,1),new $Int64(o.$high+r.$high,o.$low+r.$low));q=q-(1000000000)>>0;}else if(q<0){o=(s=new $Int64(0,1),new $Int64(o.$high-s.$high,o.$low-s.$low));q=q+(1000000000)>>0;}m.wall=(t=(u=m.wall,new $Uint64(u.$high&~0,(u.$low&~1073741823)>>>0)),v=(new $Uint64(0,q)),new $Uint64(t.$high|v.$high,(t.$low|v.$low)>>>0));m.addSec(o);if(!((w=(x=m.wall,new $Uint64(x.$high&2147483648,(x.$low&0)>>>0)),(w.$high===0&&w.$low===0)))){aa=(y=m.ext,z=(new $Int64(l.$high,l.$low)),new $Int64(y.$high+z.$high,y.$low+z.$low));if((l.$high<0||(l.$high===0&&l.$low<0))&&(ab=m.ext,(aa.$high>ab.$high||(aa.$high===ab.$high&&aa.$low>ab.$low)))||(l.$high>0||(l.$high===0&&l.$low>0))&&(ac=m.ext,(aa.$high>>0)),new $Uint64(o.$high&2147483648,(o.$low&0)>>>0)),(n.$high===0&&n.$low===0)))){r=m.ext;s=l.ext;u=((t=new $Int64(r.$high-s.$high,r.$low-s.$low),new AV(t.$high,t.$low)));if((u.$high<0||(u.$high===0&&u.$low<0))&&(r.$high>s.$high||(r.$high===s.$high&&r.$low>s.$low))){return new AV(2147483647,4294967295);}if((u.$high>0||(u.$high===0&&u.$low>0))&&(r.$high>0))),new AV(v.$high+z.$high,v.$low+z.$low));if($clone($clone(l,AQ).Add(aa),AQ).Equal($clone(m,AQ))){return aa;}else if($clone(m,AQ).Before($clone(l,AQ))){return new AV(-2147483648,0);}else{return new AV(2147483647,4294967295);}};AQ.prototype.Sub=function(l){return this.$val.Sub(l);};AQ.ptr.prototype.AddDate=function(l,m,n){var{aa,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l,m,n});$s=$s||0;s:while(true){switch($s){case 0:o=this;q=$clone(o,AQ).Date();$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=p[0];s=p[1];t=p[2];v=$clone(o,AQ).Clock();$s=2;case 2:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;w=u[0];x=u[1];y=u[2];z=BO(r+l>>0,s+((m>>0))>>0,t+n>>0,w,x,y,((o.nsec()>>0)),$clone(o,AQ).Location());$s=3;case 3:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}aa=z;$s=4;case 4:return aa;}return;}var $f={$blk:AQ.ptr.prototype.AddDate,$c:true,$r,aa,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AQ.prototype.AddDate=function(l,m,n){return this.$val.AddDate(l,m,n);};AQ.ptr.prototype.date=function(l){var{l,m,n,o,p,q,r,s,t,u,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m=0;n=0;o=0;p=0;q=this;s=$clone(q,AQ).abs();$s=1;case 1:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=BB(s,l);$s=2;case 2:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}r=t;m=r[0];n=r[1];o=r[2];p=r[3];u=[m,n,o,p];$s=3;case 3:return u;}return;}var $f={$blk:AQ.ptr.prototype.date,$c:true,$r,l,m,n,o,p,q,r,s,t,u,$s};return $f;};AQ.prototype.date=function(l){return this.$val.date(l);};BB=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;n=0;o=0;p=0;q=0;r=$div64(l,new $Uint64(0,86400),false);s=$div64(r,new $Uint64(0,146097),false);t=$mul64(new $Uint64(0,400),s);r=(u=$mul64(new $Uint64(0,146097),s),new $Uint64(r.$high-u.$high,r.$low-u.$low));s=$div64(r,new $Uint64(0,36524),false);s=(v=$shiftRightUint64(s,2),new $Uint64(s.$high-v.$high,s.$low-v.$low));t=(w=$mul64(new $Uint64(0,100),s),new $Uint64(t.$high+w.$high,t.$low+w.$low));r=(x=$mul64(new $Uint64(0,36524),s),new $Uint64(r.$high-x.$high,r.$low-x.$low));s=$div64(r,new $Uint64(0,1461),false);t=(y=$mul64(new $Uint64(0,4),s),new $Uint64(t.$high+y.$high,t.$low+y.$low));r=(z=$mul64(new $Uint64(0,1461),s),new $Uint64(r.$high-z.$high,r.$low-z.$low));s=$div64(r,new $Uint64(0,365),false);s=(aa=$shiftRightUint64(s,2),new $Uint64(s.$high-aa.$high,s.$low-aa.$low));t=(ab=s,new $Uint64(t.$high+ab.$high,t.$low+ab.$low));r=(ac=$mul64(new $Uint64(0,365),s),new $Uint64(r.$high-ac.$high,r.$low-ac.$low));n=(((ad=(ae=(new $Int64(t.$high,t.$low)),new $Int64(ae.$high+-69,ae.$low+4075721025)),ad.$low+((ad.$high>>31)*4294967296))>>0));q=((r.$low>>0));if(!m){return[n,o,p,q];}p=q;if(BM(n)){if(p>59){p=p-(1)>>0;}else if((p===59)){o=2;p=29;return[n,o,p,q];}}o=(((af=p/31,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"))>>0));ah=(((ag=o+1>>0,((ag<0||ag>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[ag]))>>0));ai=0;if(p>=ah){o=o+(1)>>0;ai=ah;}else{ai=((((o<0||o>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[o])>>0));}o=o+(1)>>0;p=(p-ai>>0)+1>>0;return[n,o,p,q];};BD=function(l,m){var l,m,n;if((l===2)&&BM(m)){return 29;}return(((((l<0||l>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[l])-(n=l-1>>0,((n<0||n>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[n]))>>0)>>0));};BE=function(l){var l,m,n,o,p,q,r,s,t,u,v,w;o=((m=(n=(new $Int64(0,l)),new $Int64(n.$high- -69,n.$low-4075721025)),new $Uint64(m.$high,m.$low)));p=$div64(o,new $Uint64(0,400),false);o=(q=$mul64(new $Uint64(0,400),p),new $Uint64(o.$high-q.$high,o.$low-q.$low));r=$mul64(new $Uint64(0,146097),p);p=$div64(o,new $Uint64(0,100),false);o=(s=$mul64(new $Uint64(0,100),p),new $Uint64(o.$high-s.$high,o.$low-s.$low));r=(t=$mul64(new $Uint64(0,36524),p),new $Uint64(r.$high+t.$high,r.$low+t.$low));p=$div64(o,new $Uint64(0,4),false);o=(u=$mul64(new $Uint64(0,4),p),new $Uint64(o.$high-u.$high,o.$low-u.$low));r=(v=$mul64(new $Uint64(0,1461),p),new $Uint64(r.$high+v.$high,r.$low+v.$low));p=o;r=(w=$mul64(new $Uint64(0,365),p),new $Uint64(r.$high+w.$high,r.$low+w.$low));return r;};BF=function(){$throwRuntimeError("native function not implemented: time.runtimeNano");};BI=function(l,m){var l,m;return new AQ.ptr((new $Uint64(0,m)),new $Int64(l.$high+14,l.$low+2006054656),$pkg.Local);};AQ.ptr.prototype.UTC=function(){var l;l=this;l.setLoc(Z);return l;};AQ.prototype.UTC=function(){return this.$val.UTC();};AQ.ptr.prototype.Local=function(){var l;l=this;l.setLoc($pkg.Local);return l;};AQ.prototype.Local=function(){return this.$val.Local();};AQ.ptr.prototype.In=function(l){var l,m;m=this;if(l===EL.nil){$panic(new $String("time: missing Location in call to Time.In"));}m.setLoc(l);return m;};AQ.prototype.In=function(l){return this.$val.In(l);};AQ.ptr.prototype.Location=function(){var l,m;l=this;m=l.loc;if(m===EL.nil){m=$pkg.UTC;}return m;};AQ.prototype.Location=function(){return this.$val.Location();};AQ.ptr.prototype.Zone=function(){var{l,m,n,o,p,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l="";m=0;n=this;p=n.loc.lookup(n.unixSec());$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;l=o[0];m=o[1];$s=-1;return[l,m];}return;}var $f={$blk:AQ.ptr.prototype.Zone,$c:true,$r,l,m,n,o,p,$s};return $f;};AQ.prototype.Zone=function(){return this.$val.Zone();};AQ.ptr.prototype.Unix=function(){var l;l=this;return l.unixSec();};AQ.prototype.Unix=function(){return this.$val.Unix();};AQ.ptr.prototype.UnixMilli=function(){var l,m,n;l=this;return(m=$mul64(l.unixSec(),new $Int64(0,1000)),n=$div64((new $Int64(0,l.nsec())),new $Int64(0,1000000),false),new $Int64(m.$high+n.$high,m.$low+n.$low));};AQ.prototype.UnixMilli=function(){return this.$val.UnixMilli();};AQ.ptr.prototype.UnixMicro=function(){var l,m,n;l=this;return(m=$mul64(l.unixSec(),new $Int64(0,1000000)),n=$div64((new $Int64(0,l.nsec())),new $Int64(0,1000),false),new $Int64(m.$high+n.$high,m.$low+n.$low));};AQ.prototype.UnixMicro=function(){return this.$val.UnixMicro();};AQ.ptr.prototype.UnixNano=function(){var l,m,n;l=this;return(m=$mul64((l.unixSec()),new $Int64(0,1000000000)),n=(new $Int64(0,l.nsec())),new $Int64(m.$high+n.$high,m.$low+n.$low));};AQ.prototype.UnixNano=function(){return this.$val.UnixNano();};AQ.ptr.prototype.MarshalBinary=function(){var{l,m,n,o,p,q,r,s,t,u,v,w,x,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=0;n=0;o=1;if($clone(l,AQ).Location()===$pkg.UTC){$s=1;continue;}$s=2;continue;case 1:m=-1;$s=3;continue;case 2:q=$clone(l,AQ).Zone();$s=4;case 4:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=p[1];if(!(((s=r%60,s===s?s:$throwRuntimeError("integer divide by zero"))===0))){o=2;n=(((t=r%60,t===t?t:$throwRuntimeError("integer divide by zero"))<<24>>24));}r=(u=r/(60),(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"));if(r<-32768||(r===-1)||r>32767){$s=-1;return[EK.nil,A.New("Time.MarshalBinary: unexpected zone offset")];}m=((r<<16>>16));case 3:v=l.sec();w=l.nsec();x=new EK([o,(($shiftRightInt64(v,56).$low<<24>>>24)),(($shiftRightInt64(v,48).$low<<24>>>24)),(($shiftRightInt64(v,40).$low<<24>>>24)),(($shiftRightInt64(v,32).$low<<24>>>24)),(($shiftRightInt64(v,24).$low<<24>>>24)),(($shiftRightInt64(v,16).$low<<24>>>24)),(($shiftRightInt64(v,8).$low<<24>>>24)),((v.$low<<24>>>24)),(((w>>24>>0)<<24>>>24)),(((w>>16>>0)<<24>>>24)),(((w>>8>>0)<<24>>>24)),((w<<24>>>24)),(((m>>8<<16>>16)<<24>>>24)),((m<<24>>>24))]);if(o===2){x=$append(x,((n<<24>>>24)));}$s=-1;return[x,$ifaceNil];}return;}var $f={$blk:AQ.ptr.prototype.MarshalBinary,$c:true,$r,l,m,n,o,p,q,r,s,t,u,v,w,x,$s};return $f;};AQ.prototype.MarshalBinary=function(){return this.$val.MarshalBinary();};AQ.ptr.prototype.UnmarshalBinary=function(l){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=l;if(n.$length===0){$s=-1;return A.New("Time.UnmarshalBinary: no data");}o=(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]);if(!((o===1))&&!((o===2))){$s=-1;return A.New("Time.UnmarshalBinary: unsupported version");}p=15;if(o===2){p=p+(1)>>0;}if(!((n.$length===p))){$s=-1;return A.New("Time.UnmarshalBinary: invalid length");}n=$subslice(n,1);ae=(q=(r=(s=(t=(u=(v=(w=(new $Int64(0,(7>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+7]))),x=$shiftLeft64((new $Int64(0,(6>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+6]))),8),new $Int64(w.$high|x.$high,(w.$low|x.$low)>>>0)),y=$shiftLeft64((new $Int64(0,(5>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+5]))),16),new $Int64(v.$high|y.$high,(v.$low|y.$low)>>>0)),z=$shiftLeft64((new $Int64(0,(4>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+4]))),24),new $Int64(u.$high|z.$high,(u.$low|z.$low)>>>0)),aa=$shiftLeft64((new $Int64(0,(3>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+3]))),32),new $Int64(t.$high|aa.$high,(t.$low|aa.$low)>>>0)),ab=$shiftLeft64((new $Int64(0,(2>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+2]))),40),new $Int64(s.$high|ab.$high,(s.$low|ab.$low)>>>0)),ac=$shiftLeft64((new $Int64(0,(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1]))),48),new $Int64(r.$high|ac.$high,(r.$low|ac.$low)>>>0)),ad=$shiftLeft64((new $Int64(0,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]))),56),new $Int64(q.$high|ad.$high,(q.$low|ad.$low)>>>0));n=$subslice(n,8);af=(((((3>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+3])>>0))|((((2>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+2])>>0))<<8>>0))|((((1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])>>0))<<16>>0))|((((0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0])>>0))<<24>>0);n=$subslice(n,4);ag=$imul(((((((1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])<<16>>16))|((((0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0])<<16>>16))<<8<<16>>16))>>0)),60);if(o===2){ag=ag+((((2>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+2])>>0)))>>0;}AQ.copy(m,new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil));m.wall=(new $Uint64(0,af));m.ext=ae;if(ag===-60){$s=1;continue;}$s=2;continue;case 1:m.setLoc(Z);$s=3;continue;case 2:ai=$pkg.Local.lookup(m.unixSec());$s=4;case 4:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ah=ai;aj=ah[1];if(ag===aj){m.setLoc($pkg.Local);}else{m.setLoc(AC("",ag));}case 3:$s=-1;return $ifaceNil;}return;}var $f={$blk:AQ.ptr.prototype.UnmarshalBinary,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AQ.prototype.UnmarshalBinary=function(l){return this.$val.UnmarshalBinary(l);};AQ.ptr.prototype.GobEncode=function(){var{l,m,n,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=$clone(l,AQ).MarshalBinary();$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;$s=2;case 2:return n;}return;}var $f={$blk:AQ.ptr.prototype.GobEncode,$c:true,$r,l,m,n,$s};return $f;};AQ.prototype.GobEncode=function(){return this.$val.GobEncode();};AQ.ptr.prototype.GobDecode=function(l){var{l,m,n,o,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=m.UnmarshalBinary(l);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=2;case 2:return o;}return;}var $f={$blk:AQ.ptr.prototype.GobDecode,$c:true,$r,l,m,n,o,$s};return $f;};AQ.prototype.GobDecode=function(l){return this.$val.GobDecode(l);};AQ.ptr.prototype.MarshalJSON=function(){var{l,m,n,o,p,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=$clone(l,AQ).Year();$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;if(n<0||n>=10000){$s=-1;return[EK.nil,A.New("Time.MarshalJSON: year outside of range [0,9999]")];}o=$makeSlice(EK,0,37);o=$append(o,34);p=$clone(l,AQ).AppendFormat(o,"2006-01-02T15:04:05.999999999Z07:00");$s=2;case 2:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;o=$append(o,34);$s=-1;return[o,$ifaceNil];}return;}var $f={$blk:AQ.ptr.prototype.MarshalJSON,$c:true,$r,l,m,n,o,p,$s};return $f;};AQ.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};AQ.ptr.prototype.UnmarshalJSON=function(l){var{l,m,n,o,p,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m=this;if(($bytesToString(l))==="null"){$s=-1;return $ifaceNil;}n=$ifaceNil;p=DD("\"2006-01-02T15:04:05Z07:00\"",($bytesToString(l)));$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;AQ.copy(m,o[0]);n=o[1];$s=-1;return n;}return;}var $f={$blk:AQ.ptr.prototype.UnmarshalJSON,$c:true,$r,l,m,n,o,p,$s};return $f;};AQ.prototype.UnmarshalJSON=function(l){return this.$val.UnmarshalJSON(l);};AQ.ptr.prototype.MarshalText=function(){var{l,m,n,o,p,q,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=$clone(l,AQ).Year();$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;if(n<0||n>=10000){$s=-1;return[EK.nil,A.New("Time.MarshalText: year outside of range [0,9999]")];}o=$makeSlice(EK,0,35);p=$clone(l,AQ).AppendFormat(o,"2006-01-02T15:04:05.999999999Z07:00");$s=2;case 2:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=[p,$ifaceNil];$s=3;case 3:return q;}return;}var $f={$blk:AQ.ptr.prototype.MarshalText,$c:true,$r,l,m,n,o,p,q,$s};return $f;};AQ.prototype.MarshalText=function(){return this.$val.MarshalText();};AQ.ptr.prototype.UnmarshalText=function(l){var{l,m,n,o,p,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=$ifaceNil;p=DD("2006-01-02T15:04:05Z07:00",($bytesToString(l)));$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;AQ.copy(m,o[0]);n=o[1];$s=-1;return n;}return;}var $f={$blk:AQ.ptr.prototype.UnmarshalText,$c:true,$r,l,m,n,o,p,$s};return $f;};AQ.prototype.UnmarshalText=function(l){return this.$val.UnmarshalText(l);};BJ=function(l,m){var l,m,n,o,p,q,r;if((m.$high<0||(m.$high===0&&m.$low<0))||(m.$high>0||(m.$high===0&&m.$low>=1000000000))){n=$div64(m,new $Int64(0,1000000000),false);l=(o=n,new $Int64(l.$high+o.$high,l.$low+o.$low));m=(p=$mul64(n,new $Int64(0,1000000000)),new $Int64(m.$high-p.$high,m.$low-p.$low));if((m.$high<0||(m.$high===0&&m.$low<0))){m=(q=new $Int64(0,1000000000),new $Int64(m.$high+q.$high,m.$low+q.$low));l=(r=new $Int64(0,1),new $Int64(l.$high-r.$high,l.$low-r.$low));}}return BI(l,(((m.$low+((m.$high>>31)*4294967296))>>0)));};$pkg.Unix=BJ;AQ.ptr.prototype.IsDST=function(){var{l,m,n,o,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;n=l.loc.lookup($clone(l,AQ).Unix());$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[4];$s=-1;return o;}return;}var $f={$blk:AQ.ptr.prototype.IsDST,$c:true,$r,l,m,n,o,$s};return $f;};AQ.prototype.IsDST=function(){return this.$val.IsDST();};BM=function(l){var l,m,n,o;return((m=l%4,m===m?m:$throwRuntimeError("integer divide by zero"))===0)&&(!(((n=l%100,n===n?n:$throwRuntimeError("integer divide by zero"))===0))||((o=l%400,o===o?o:$throwRuntimeError("integer divide by zero"))===0));};BN=function(l,m,n){var l,m,n,o,p,q,r,s,t,u,v;o=0;p=0;if(m<0){r=(q=((-m-1>>0))/n,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))+1>>0;l=l-(r)>>0;m=m+(($imul(r,n)))>>0;}if(m>=n){t=(s=m/n,(s===s&&s!==1/0&&s!==-1/0)?s>>0:$throwRuntimeError("integer divide by zero"));l=l+(t)>>0;m=m-(($imul(t,n)))>>0;}u=l;v=m;o=u;p=v;return[o,p];};BO=function(l,m,n,o,p,q,r,s){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l,m,n,o,p,q,r,s});$s=$s||0;s:while(true){switch($s){case 0:if(s===EL.nil){$panic(new $String("time: missing Location in call to Date"));}t=((m>>0))-1>>0;u=BN(l,t,12);l=u[0];t=u[1];m=((t>>0))+1>>0;v=BN(q,r,1000000000);q=v[0];r=v[1];w=BN(p,q,60);p=w[0];q=w[1];x=BN(o,p,60);o=x[0];p=x[1];y=BN(n,o,24);n=y[0];o=y[1];z=BE(l);z=(aa=(new $Uint64(0,(ab=m-1>>0,((ab<0||ab>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[ab])))),new $Uint64(z.$high+aa.$high,z.$low+aa.$low));if(BM(l)&&m>=3){z=(ac=new $Uint64(0,1),new $Uint64(z.$high+ac.$high,z.$low+ac.$low));}z=(ad=(new $Uint64(0,(n-1>>0))),new $Uint64(z.$high+ad.$high,z.$low+ad.$low));ae=$mul64(z,new $Uint64(0,86400));ae=(af=(new $Uint64(0,((($imul(o,3600))+($imul(p,60))>>0)+q>>0))),new $Uint64(ae.$high+af.$high,ae.$low+af.$low));ah=(ag=(new $Int64(ae.$high,ae.$low)),new $Int64(ag.$high+-2147483647,ag.$low+3844486912));aj=s.lookup(ah);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ai=aj;ak=ai[1];al=ai[2];am=ai[3];if(!((ak===0))){$s=2;continue;}$s=3;continue;case 2:ao=(an=(new $Int64(0,ak)),new $Int64(ah.$high-an.$high,ah.$low-an.$low));if((ao.$higham.$high||(ao.$high===am.$high&&ao.$low>=am.$low))){$s=4;continue;}$s=5;continue;case 4:aq=s.lookup(ao);$s=6;case 6:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ap=aq;ak=ap[1];case 5:ah=(ar=(new $Int64(0,ak)),new $Int64(ah.$high-ar.$high,ah.$low-ar.$low));case 3:as=$clone(BI(ah,((r>>0))),AQ);as.setLoc(s);$s=-1;return as;}return;}var $f={$blk:BO,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.Date=BO;AQ.ptr.prototype.Truncate=function(l){var l,m,n,o;m=this;m.stripMono();if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BP($clone(m,AQ),l);o=n[1];return $clone(m,AQ).Add(new AV(-o.$high,-o.$low));};AQ.prototype.Truncate=function(l){return this.$val.Truncate(l);};AQ.ptr.prototype.Round=function(l){var l,m,n,o;m=this;m.stripMono();if((l.$high<0||(l.$high===0&&l.$low<=0))){return m;}n=BP($clone(m,AQ),l);o=n[1];if(AY(o,l)){return $clone(m,AQ).Add(new AV(-o.$high,-o.$low));}return $clone(m,AQ).Add(new AV(l.$high-o.$high,l.$low-o.$low));};AQ.prototype.Round=function(l){return this.$val.Round(l);};BP=function(l,m){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;n=0;o=new AV(0,0);p=false;q=l.nsec();r=l.sec();if((r.$high<0||(r.$high===0&&r.$low<0))){p=true;r=new $Int64(-r.$high,-r.$low);q=-q;if(q<0){q=q+(1000000000)>>0;r=(s=new $Int64(0,1),new $Int64(r.$high-s.$high,r.$low-s.$low));}}if((m.$high<0||(m.$high===0&&m.$low<1000000000))&&(t=$div64(new AV(0,1000000000),(new AV(m.$high+m.$high,m.$low+m.$low)),true),(t.$high===0&&t.$low===0))){n=(((v=q/(((m.$low+((m.$high>>31)*4294967296))>>0)),(v===v&&v!==1/0&&v!==-1/0)?v>>0:$throwRuntimeError("integer divide by zero"))>>0))&1;o=(new AV(0,(w=q%(((m.$low+((m.$high>>31)*4294967296))>>0)),w===w?w:$throwRuntimeError("integer divide by zero"))));}else if((u=$div64(m,new AV(0,1000000000),true),(u.$high===0&&u.$low===0))){y=((x=$div64(m,new AV(0,1000000000),false),new $Int64(x.$high,x.$low)));n=(((z=$div64(r,y,false),z.$low+((z.$high>>31)*4294967296))>>0))&1;o=(aa=$mul64(((ab=$div64(r,y,true),new AV(ab.$high,ab.$low))),new AV(0,1000000000)),ac=(new AV(0,q)),new AV(aa.$high+ac.$high,aa.$low+ac.$low));}else{ad=(new $Uint64(r.$high,r.$low));ae=$mul64(($shiftRightUint64(ad,32)),new $Uint64(0,1000000000));af=$shiftRightUint64(ae,32);ag=$shiftLeft64(ae,32);ae=$mul64((new $Uint64(ad.$high&0,(ad.$low&4294967295)>>>0)),new $Uint64(0,1000000000));ah=ag;ai=new $Uint64(ag.$high+ae.$high,ag.$low+ae.$low);aj=ah;ag=ai;if((ag.$highap.$high||(af.$high===ap.$high&&af.$low>ap.$low))||(af.$high===ap.$high&&af.$low===ap.$low)&&(ag.$high>ar.$high||(ag.$high===ar.$high&&ag.$low>=ar.$low))){n=1;as=ag;at=new $Uint64(ag.$high-ar.$high,ag.$low-ar.$low);aj=as;ag=at;if((ag.$high>aj.$high||(ag.$high===aj.$high&&ag.$low>aj.$low))){af=(au=new $Uint64(0,1),new $Uint64(af.$high-au.$high,af.$low-au.$low));}af=(av=ap,new $Uint64(af.$high-av.$high,af.$low-av.$low));}if((ap.$high===0&&ap.$low===0)&&(aw=(new $Uint64(m.$high,m.$low)),(ar.$high===aw.$high&&ar.$low===aw.$low))){break;}ar=$shiftRightUint64(ar,(1));ar=(ax=$shiftLeft64((new $Uint64(ap.$high&0,(ap.$low&1)>>>0)),63),new $Uint64(ar.$high|ax.$high,(ar.$low|ax.$low)>>>0));ap=$shiftRightUint64(ap,(1));}o=(new AV(ag.$high,ag.$low));}if(p&&!((o.$high===0&&o.$low===0))){n=(n^(1))>>0;o=new AV(m.$high-o.$high,m.$low-o.$low);}return[n,o];};CG=function(l){var l,m;if(l.length===0){return false;}m=l.charCodeAt(0);return 97<=m&&m<=122;};CH=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m="";n=0;o="";p=0;while(true){if(!(p>0));r=q;if(r===(74)){if(l.length>=(p+3>>0)&&$substring(l,p,(p+3>>0))==="Jan"){if(l.length>=(p+7>>0)&&$substring(l,p,(p+7>>0))==="January"){s=$substring(l,0,p);t=257;u=$substring(l,(p+7>>0));m=s;n=t;o=u;return[m,n,o];}if(!CG($substring(l,(p+3>>0)))){v=$substring(l,0,p);w=258;x=$substring(l,(p+3>>0));m=v;n=w;o=x;return[m,n,o];}}}else if(r===(77)){if(l.length>=(p+3>>0)){if($substring(l,p,(p+3>>0))==="Mon"){if(l.length>=(p+6>>0)&&$substring(l,p,(p+6>>0))==="Monday"){y=$substring(l,0,p);z=261;aa=$substring(l,(p+6>>0));m=y;n=z;o=aa;return[m,n,o];}if(!CG($substring(l,(p+3>>0)))){ab=$substring(l,0,p);ac=262;ad=$substring(l,(p+3>>0));m=ab;n=ac;o=ad;return[m,n,o];}}if($substring(l,p,(p+3>>0))==="MST"){ae=$substring(l,0,p);af=23;ag=$substring(l,(p+3>>0));m=ae;n=af;o=ag;return[m,n,o];}}}else if(r===(48)){if(l.length>=(p+2>>0)&&49<=l.charCodeAt((p+1>>0))&&l.charCodeAt((p+1>>0))<=54){ah=$substring(l,0,p);ai=(aj=l.charCodeAt((p+1>>0))-49<<24>>>24,((aj<0||aj>=CF.length)?($throwRuntimeError("index out of range"),undefined):CF[aj]));ak=$substring(l,(p+2>>0));m=ah;n=ai;o=ak;return[m,n,o];}if(l.length>=(p+3>>0)&&(l.charCodeAt((p+1>>0))===48)&&(l.charCodeAt((p+2>>0))===50)){al=$substring(l,0,p);am=267;an=$substring(l,(p+3>>0));m=al;n=am;o=an;return[m,n,o];}}else if(r===(49)){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===53)){ao=$substring(l,0,p);ap=524;aq=$substring(l,(p+2>>0));m=ao;n=ap;o=aq;return[m,n,o];}ar=$substring(l,0,p);as=259;at=$substring(l,(p+1>>0));m=ar;n=as;o=at;return[m,n,o];}else if(r===(50)){if(l.length>=(p+4>>0)&&$substring(l,p,(p+4>>0))==="2006"){au=$substring(l,0,p);av=275;aw=$substring(l,(p+4>>0));m=au;n=av;o=aw;return[m,n,o];}ax=$substring(l,0,p);ay=263;az=$substring(l,(p+1>>0));m=ax;n=ay;o=az;return[m,n,o];}else if(r===(95)){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===50)){if(l.length>=(p+5>>0)&&$substring(l,(p+1>>0),(p+5>>0))==="2006"){ba=$substring(l,0,(p+1>>0));bb=275;bc=$substring(l,(p+5>>0));m=ba;n=bb;o=bc;return[m,n,o];}bd=$substring(l,0,p);be=264;bf=$substring(l,(p+2>>0));m=bd;n=be;o=bf;return[m,n,o];}if(l.length>=(p+3>>0)&&(l.charCodeAt((p+1>>0))===95)&&(l.charCodeAt((p+2>>0))===50)){bg=$substring(l,0,p);bh=266;bi=$substring(l,(p+3>>0));m=bg;n=bh;o=bi;return[m,n,o];}}else if(r===(51)){bj=$substring(l,0,p);bk=525;bl=$substring(l,(p+1>>0));m=bj;n=bk;o=bl;return[m,n,o];}else if(r===(52)){bm=$substring(l,0,p);bn=527;bo=$substring(l,(p+1>>0));m=bm;n=bn;o=bo;return[m,n,o];}else if(r===(53)){bp=$substring(l,0,p);bq=529;br=$substring(l,(p+1>>0));m=bp;n=bq;o=br;return[m,n,o];}else if(r===(80)){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===77)){bs=$substring(l,0,p);bt=533;bu=$substring(l,(p+2>>0));m=bs;n=bt;o=bu;return[m,n,o];}}else if(r===(112)){if(l.length>=(p+2>>0)&&(l.charCodeAt((p+1>>0))===109)){bv=$substring(l,0,p);bw=534;bx=$substring(l,(p+2>>0));m=bv;n=bw;o=bx;return[m,n,o];}}else if(r===(45)){if(l.length>=(p+7>>0)&&$substring(l,p,(p+7>>0))==="-070000"){by=$substring(l,0,p);bz=30;ca=$substring(l,(p+7>>0));m=by;n=bz;o=ca;return[m,n,o];}if(l.length>=(p+9>>0)&&$substring(l,p,(p+9>>0))==="-07:00:00"){cb=$substring(l,0,p);cc=33;cd=$substring(l,(p+9>>0));m=cb;n=cc;o=cd;return[m,n,o];}if(l.length>=(p+5>>0)&&$substring(l,p,(p+5>>0))==="-0700"){ce=$substring(l,0,p);cf=29;cg=$substring(l,(p+5>>0));m=ce;n=cf;o=cg;return[m,n,o];}if(l.length>=(p+6>>0)&&$substring(l,p,(p+6>>0))==="-07:00"){ch=$substring(l,0,p);ci=32;cj=$substring(l,(p+6>>0));m=ch;n=ci;o=cj;return[m,n,o];}if(l.length>=(p+3>>0)&&$substring(l,p,(p+3>>0))==="-07"){ck=$substring(l,0,p);cl=31;cm=$substring(l,(p+3>>0));m=ck;n=cl;o=cm;return[m,n,o];}}else if(r===(90)){if(l.length>=(p+7>>0)&&$substring(l,p,(p+7>>0))==="Z070000"){cn=$substring(l,0,p);co=25;cp=$substring(l,(p+7>>0));m=cn;n=co;o=cp;return[m,n,o];}if(l.length>=(p+9>>0)&&$substring(l,p,(p+9>>0))==="Z07:00:00"){cq=$substring(l,0,p);cr=28;cs=$substring(l,(p+9>>0));m=cq;n=cr;o=cs;return[m,n,o];}if(l.length>=(p+5>>0)&&$substring(l,p,(p+5>>0))==="Z0700"){ct=$substring(l,0,p);cu=24;cv=$substring(l,(p+5>>0));m=ct;n=cu;o=cv;return[m,n,o];}if(l.length>=(p+6>>0)&&$substring(l,p,(p+6>>0))==="Z07:00"){cw=$substring(l,0,p);cx=27;cy=$substring(l,(p+6>>0));m=cw;n=cx;o=cy;return[m,n,o];}if(l.length>=(p+3>>0)&&$substring(l,p,(p+3>>0))==="Z07"){cz=$substring(l,0,p);da=26;db=$substring(l,(p+3>>0));m=cz;n=da;o=db;return[m,n,o];}}else if((r===(46))||(r===(44))){if((p+1>>0)>0))===48)||(l.charCodeAt((p+1>>0))===57))){dc=l.charCodeAt((p+1>>0));dd=p+1>>0;while(true){if(!(dd>0;}if(!CY(l,dd)){de=34;if(l.charCodeAt((p+1>>0))===57){de=35;}df=CR(de,dd-((p+1>>0))>>0,q);dg=$substring(l,0,p);dh=df;di=$substring(l,dd);m=dg;n=dh;o=di;return[m,n,o];}}}p=p+(1)>>0;}dj=l;dk=0;dl="";m=dj;n=dk;o=dl;return[m,n,o];};CM=function(l,m){var l,m,n,o,p;n=0;while(true){if(!(n>>0;p=(p|(32))>>>0;if(!((o===p))||o<97||o>122){return false;}}n=n+(1)>>0;}return true;};CN=function(l,m){var l,m,n,o,p,q;n=l;o=0;while(true){if(!(o=n.$length)?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+o]);if(m.length>=q.length&&CM($substring(m,0,q.length),q)){return[p,$substring(m,q.length),$ifaceNil];}o++;}return[-1,m,CV];};CO=function(l,m,n){var l,m,n,o,p,q,r,s,t;o=((m>>>0));if(m<0){l=$append(l,45);o=((-m>>>0));}p=ER.zero();q=20;while(true){if(!(o>=10)){break;}q=q-(1)>>0;s=(r=o/10,(r===r&&r!==1/0&&r!==-1/0)?r>>>0:$throwRuntimeError("integer divide by zero"));((q<0||q>=p.length)?($throwRuntimeError("index out of range"),undefined):p[q]=((((48+o>>>0)-(s*10>>>0)>>>0)<<24>>>24)));o=s;}q=q-(1)>>0;((q<0||q>=p.length)?($throwRuntimeError("index out of range"),undefined):p[q]=(((48+o>>>0)<<24>>>24)));t=20-q>>0;while(true){if(!(t>0;}return $appendSlice(l,$subslice(new EK(p),q));};CQ=function(l){var l,m,n,o,p,q,r,s,t,u,v;m=0;n=$ifaceNil;o=false;if(!(l==="")&&((l.charCodeAt(0)===45)||(l.charCodeAt(0)===43))){o=l.charCodeAt(0)===45;l=$substring(l,1);}p=DM(l);q=p[0];r=p[1];n=p[2];m=((q.$low>>0));if(!($interfaceIsEqual(n,$ifaceNil))||!(r==="")){s=0;t=CP;m=s;n=t;return[m,n];}if(o){m=-m;}u=m;v=$ifaceNil;m=u;n=v;return[m,n];};CR=function(l,m,n){var l,m,n;if(n===46){return l|((((m&4095))<<16>>0));}return(l|((((m&4095))<<16>>0)))|268435456;};CS=function(l){var l;return((l>>16>>0))&4095;};CT=function(l){var l;if(((l>>28>>0))===0){return 46;}return 44;};CU=function(l,m,n){var l,m,n,o,p,q,r,s,t,u,v,w;o=CS(n);p=CT(n);q=(n&65535)===35;r=m;s=ES.zero();t=9;while(true){if(!(t>0)){break;}t=t-(1)>>0;((t<0||t>=s.length)?($throwRuntimeError("index out of range"),undefined):s[t]=((((u=r%10,u===u?u:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24)));r=(v=r/(10),(v===v&&v!==1/0&&v!==-1/0)?v>>>0:$throwRuntimeError("integer divide by zero"));}if(o>9){o=9;}if(q){while(true){if(!(o>0&&((w=o-1>>0,((w<0||w>=s.length)?($throwRuntimeError("index out of range"),undefined):s[w]))===48))){break;}o=o-(1)>>0;}if(o===0){return l;}}l=$append(l,p);return $appendSlice(l,$subslice(new EK(s),0,o));};AQ.ptr.prototype.String=function(){var{aa,ab,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=$clone(l,AQ).Format("2006-01-02 15:04:05.999999999 -0700 MST");$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;if(!((o=(p=l.wall,new $Uint64(p.$high&2147483648,(p.$low&0)>>>0)),(o.$high===0&&o.$low===0)))){r=((q=l.ext,new $Uint64(q.$high,q.$low)));s=43;if((t=l.ext,(t.$high<0||(t.$high===0&&t.$low<0)))){s=45;r=new $Uint64(-r.$high,-r.$low);}u=$div64(r,new $Uint64(0,1000000000),false);v=$div64(r,new $Uint64(0,1000000000),true);w=u;r=v;x=$div64(w,new $Uint64(0,1000000000),false);y=$div64(w,new $Uint64(0,1000000000),true);z=x;w=y;aa=$makeSlice(EK,0,24);aa=$appendSlice(aa," m=");aa=$append(aa,s);ab=0;if(!((z.$high===0&&z.$low===0))){aa=CO(aa,((z.$low>>0)),0);ab=9;}aa=CO(aa,((w.$low>>0)),ab);aa=$append(aa,46);aa=CO(aa,((r.$low>>0)),9);n=n+(($bytesToString(aa)));}$s=-1;return n;}return;}var $f={$blk:AQ.ptr.prototype.String,$c:true,$r,aa,ab,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AQ.prototype.String=function(){return this.$val.String();};AQ.ptr.prototype.GoString=function(){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:l=this;m=$makeSlice(EK,0,70);m=$appendSlice(m,"time.Date(");n=m;o=$clone(l,AQ).Year();$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;q=CO(n,p,0);$s=2;case 2:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}m=q;r=$clone(l,AQ).Month();$s=3;case 3:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;if(1<=s&&s<=12){$s=4;continue;}$s=5;continue;case 4:m=$appendSlice(m,", time.");t=m;u=$clone(l,AQ).Month();$s=7;case 7:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=new AR(u).String();$s=8;case 8:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=v;m=$appendSlice(t,w);$s=6;continue;case 5:m=CO(m,((s>>0)),0);case 6:m=$appendSlice(m,", ");x=m;y=$clone(l,AQ).Day();$s=9;case 9:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;aa=CO(x,z,0);$s=10;case 10:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}m=aa;m=$appendSlice(m,", ");ab=m;ac=$clone(l,AQ).Hour();$s=11;case 11:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=ac;ae=CO(ab,ad,0);$s=12;case 12:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}m=ae;m=$appendSlice(m,", ");af=m;ag=$clone(l,AQ).Minute();$s=13;case 13:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ah=ag;ai=CO(af,ah,0);$s=14;case 14:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}m=ai;m=$appendSlice(m,", ");aj=m;ak=$clone(l,AQ).Second();$s=15;case 15:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=ak;am=CO(aj,al,0);$s=16;case 16:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}m=am;m=$appendSlice(m,", ");m=CO(m,$clone(l,AQ).Nanosecond(),0);m=$appendSlice(m,", ");an=$clone(l,AQ).Location();ao=an;if(ao===($pkg.UTC)||ao===EL.nil){m=$appendSlice(m,"time.UTC");}else if(ao===($pkg.Local)){m=$appendSlice(m,"time.Local");}else{m=$appendSlice(m,"time.Location(");m=$appendSlice(m,(new EK($stringToBytes(CX(an.name)))));m=$appendSlice(m,")");}m=$append(m,41);$s=-1;return($bytesToString(m));}return;}var $f={$blk:AQ.ptr.prototype.GoString,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AQ.prototype.GoString=function(){return this.$val.GoString();};AQ.ptr.prototype.Format=function(l){var{l,m,n,o,p,q,$s,$r,$c}=$restore(this,{l});$s=$s||0;s:while(true){switch($s){case 0:m=this;n=EK.nil;o=l.length+10>>0;if(o<64){p=ET.zero();n=$subslice(new EK(p),0,0);}else{n=$makeSlice(EK,0,o);}q=$clone(m,AQ).AppendFormat(n,l);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}n=q;$s=-1;return($bytesToString(n));}return;}var $f={$blk:AQ.ptr.prototype.Format,$c:true,$r,l,m,n,o,p,q,$s};return $f;};AQ.prototype.Format=function(l){return this.$val.Format(l);};AQ.ptr.prototype.AppendFormat=function(l,m){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l,m});$s=$s||0;s:while(true){switch($s){case 0:n=this;p=$clone(n,AQ).locabs();$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;q=o[0];r=o[1];s=o[2];t=-1;u=0;v=0;w=0;x=-1;y=0;z=0;while(true){if(!(!(m===""))){break;}aa=CH(m);ab=aa[0];ac=aa[1];ad=aa[2];if(!(ab==="")){l=$appendSlice(l,ab);}if(ac===0){break;}m=ad;if(t<0&&!(((ac&256)===0))){ae=BB(s,true);t=ae[0];u=ae[1];v=ae[2];w=ae[3];w=w+(1)>>0;}if(x<0&&!(((ac&512)===0))){af=AU(s);x=af[0];y=af[1];z=af[2];}switch(0){default:ag=ac&65535;if(ag===(276)){ah=t;if(ah<0){ah=-ah;}l=CO(l,(ai=ah%100,ai===ai?ai:$throwRuntimeError("integer divide by zero")),2);}else if(ag===(275)){l=CO(l,t,4);}else if(ag===(258)){l=$appendSlice(l,$substring(new AR(u).String(),0,3));}else if(ag===(257)){aj=new AR(u).String();l=$appendSlice(l,aj);}else if(ag===(259)){l=CO(l,((u>>0)),0);}else if(ag===(260)){l=CO(l,((u>>0)),2);}else if(ag===(262)){l=$appendSlice(l,$substring(new AS(AT(s)).String(),0,3));}else if(ag===(261)){ak=new AS(AT(s)).String();l=$appendSlice(l,ak);}else if(ag===(263)){l=CO(l,v,0);}else if(ag===(264)){if(v<10){l=$append(l,32);}l=CO(l,v,0);}else if(ag===(265)){l=CO(l,v,2);}else if(ag===(266)){if(w<100){l=$append(l,32);if(w<10){l=$append(l,32);}}l=CO(l,w,0);}else if(ag===(267)){l=CO(l,w,3);}else if(ag===(524)){l=CO(l,x,2);}else if(ag===(525)){am=(al=x%12,al===al?al:$throwRuntimeError("integer divide by zero"));if(am===0){am=12;}l=CO(l,am,0);}else if(ag===(526)){ao=(an=x%12,an===an?an:$throwRuntimeError("integer divide by zero"));if(ao===0){ao=12;}l=CO(l,ao,2);}else if(ag===(527)){l=CO(l,y,0);}else if(ag===(528)){l=CO(l,y,2);}else if(ag===(529)){l=CO(l,z,0);}else if(ag===(530)){l=CO(l,z,2);}else if(ag===(533)){if(x>=12){l=$appendSlice(l,"PM");}else{l=$appendSlice(l,"AM");}}else if(ag===(534)){if(x>=12){l=$appendSlice(l,"pm");}else{l=$appendSlice(l,"am");}}else if((ag===(24))||(ag===(27))||(ag===(25))||(ag===(26))||(ag===(28))||(ag===(29))||(ag===(32))||(ag===(30))||(ag===(31))||(ag===(33))){if((r===0)&&((ac===24)||(ac===27)||(ac===25)||(ac===26)||(ac===28))){l=$append(l,90);break;}aq=(ap=r/60,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero"));ar=r;if(aq<0){l=$append(l,45);aq=-aq;ar=-ar;}else{l=$append(l,43);}l=CO(l,(as=aq/60,(as===as&&as!==1/0&&as!==-1/0)?as>>0:$throwRuntimeError("integer divide by zero")),2);if((ac===27)||(ac===32)||(ac===28)||(ac===33)){l=$append(l,58);}if(!((ac===31))&&!((ac===26))){l=CO(l,(at=aq%60,at===at?at:$throwRuntimeError("integer divide by zero")),2);}if((ac===25)||(ac===30)||(ac===33)||(ac===28)){if((ac===33)||(ac===28)){l=$append(l,58);}l=CO(l,(au=ar%60,au===au?au:$throwRuntimeError("integer divide by zero")),2);}}else if(ag===(23)){if(!(q==="")){l=$appendSlice(l,q);break;}aw=(av=r/60,(av===av&&av!==1/0&&av!==-1/0)?av>>0:$throwRuntimeError("integer divide by zero"));if(aw<0){l=$append(l,45);aw=-aw;}else{l=$append(l,43);}l=CO(l,(ax=aw/60,(ax===ax&&ax!==1/0&&ax!==-1/0)?ax>>0:$throwRuntimeError("integer divide by zero")),2);l=CO(l,(ay=aw%60,ay===ay?ay:$throwRuntimeError("integer divide by zero")),2);}else if((ag===(34))||(ag===(35))){l=CU(l,(($clone(n,AQ).Nanosecond()>>>0)),ac);}}}$s=-1;return l;}return;}var $f={$blk:AQ.ptr.prototype.AppendFormat,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AQ.prototype.AppendFormat=function(l,m){return this.$val.AppendFormat(l,m);};CX=function(l){var l,m,n,o,p,q,r,s,t;m=$makeSlice(EK,1,(l.length+2>>0));(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]=34);n=l;o=0;while(true){if(!(o=128||r<32){s=0;if(r===65533){s=1;if((q+2>>0)>0))==="\xEF\xBF\xBD"){s=3;}}else{s=($encodeRune(r)).length;}t=0;while(true){if(!(t>0))>>>4<<24>>>24)));m=$append(m,"0123456789abcdef".charCodeAt(((l.charCodeAt((q+t>>0))&15)>>>0)));t=t+(1)>>0;}}else{if((r===34)||(r===92)){m=$append(m,92);}m=$appendSlice(m,($encodeRune(r)));}o+=p[1];}m=$append(m,34);return($bytesToString(m));};CW.ptr.prototype.Error=function(){var l;l=this;if(l.Message===""){return"parsing time "+CX(l.Value)+" as "+CX(l.Layout)+": cannot parse "+CX(l.ValueElem)+" as "+CX(l.LayoutElem);}return"parsing time "+CX(l.Value)+l.Message;};CW.prototype.Error=function(){return this.$val.Error();};CY=function(l,m){var l,m,n;if(l.length<=m){return false;}n=l.charCodeAt(m);return 48<=n&&n<=57;};CZ=function(l,m){var l,m;if(!CY(l,0)){return[0,l,CV];}if(!CY(l,1)){if(m){return[0,l,CV];}return[(((l.charCodeAt(0)-48<<24>>>24)>>0)),$substring(l,1),$ifaceNil];}return[($imul((((l.charCodeAt(0)-48<<24>>>24)>>0)),10))+(((l.charCodeAt(1)-48<<24>>>24)>>0))>>0,$substring(l,2),$ifaceNil];};DA=function(l,m){var l,m,n,o,p,q;n=0;o=0;p=n;q=o;q=0;while(true){if(!(q<3&&CY(l,q))){break;}p=($imul(p,10))+(((l.charCodeAt(q)-48<<24>>>24)>>0))>>0;q=q+(1)>>0;}if((q===0)||m&&!((q===3))){return[0,l,CV];}return[p,$substring(l,q),$ifaceNil];};DB=function(l){var l;while(true){if(!(l.length>0&&(l.charCodeAt(0)===32))){break;}l=$substring(l,1);}return l;};DC=function(l,m){var l,m;while(true){if(!(m.length>0)){break;}if(m.charCodeAt(0)===32){if(l.length>0&&!((l.charCodeAt(0)===32))){return[l,CV];}m=DB(m);l=DB(l);continue;}if((l.length===0)||!((l.charCodeAt(0)===m.charCodeAt(0)))){return[l,CV];}m=$substring(m,1);l=$substring(l,1);}return[l,$ifaceNil];};DD=function(l,m){var{l,m,n,o,$s,$r,$c}=$restore(this,{l,m});$s=$s||0;s:while(true){switch($s){case 0:n=DF(l,m,$pkg.UTC,$pkg.Local);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=2;case 2:return o;}return;}var $f={$blk:DD,$c:true,$r,l,m,n,o,$s};return $f;};$pkg.Parse=DD;DF=function(l,m,n,o){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{l,m,n,o});$s=$s||0;s:while(true){switch($s){case 0:p=l;q=m;r=p;s=q;t="";u=false;v=false;w=0;x=-1;y=-1;z=-1;aa=0;ab=0;ac=0;ad=0;ae=EL.nil;af=-1;ag="";while(true){ah=$ifaceNil;ai=CH(l);aj=ai[0];ak=ai[1];al=ai[2];am=$substring(l,aj.length,(l.length-al.length>>0));an=DC(m,aj);m=an[0];ah=an[1];if(!($interfaceIsEqual(ah,$ifaceNil))){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,aj,m,"")];}if(ak===0){if(!((m.length===0))){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,"",m,": extra text: "+CX(m))];}break;}l=al;ao="";switch(0){default:ap=ak&65535;if(ap===(276)){if(m.length<2){ah=CV;break;}aq=m;ar=$substring(m,0,2);as=$substring(m,2);ao=ar;m=as;at=CQ(ao);w=at[0];ah=at[1];if(!($interfaceIsEqual(ah,$ifaceNil))){m=aq;}else if(w>=69){w=w+(1900)>>0;}else{w=w+(2000)>>0;}}else if(ap===(275)){if(m.length<4||!CY(m,0)){ah=CV;break;}au=$substring(m,0,4);av=$substring(m,4);ao=au;m=av;aw=CQ(ao);w=aw[0];ah=aw[1];}else if(ap===(258)){ax=CN(CK,m);x=ax[0];m=ax[1];ah=ax[2];x=x+(1)>>0;}else if(ap===(257)){ay=CN(CL,m);x=ay[0];m=ay[1];ah=ay[2];x=x+(1)>>0;}else if((ap===(259))||(ap===(260))){az=CZ(m,ak===260);x=az[0];m=az[1];ah=az[2];if($interfaceIsEqual(ah,$ifaceNil)&&(x<=0||120&&(m.charCodeAt(0)===32)){m=$substring(m,1);}bc=CZ(m,ak===265);y=bc[0];m=bc[1];ah=bc[2];}else if((ap===(266))||(ap===(267))){bd=0;while(true){if(!(bd<2)){break;}if((ak===266)&&m.length>0&&(m.charCodeAt(0)===32)){m=$substring(m,1);}bd=bd+(1)>>0;}be=DA(m,ak===267);z=be[0];m=be[1];ah=be[2];}else if(ap===(524)){bf=CZ(m,false);aa=bf[0];m=bf[1];ah=bf[2];if(aa<0||24<=aa){t="hour";}}else if((ap===(525))||(ap===(526))){bg=CZ(m,ak===526);aa=bg[0];m=bg[1];ah=bg[2];if(aa<0||12=2&&DJ(m.charCodeAt(0))&&CY(m,1)){bj=CH(l);ak=bj[1];ak=ak&(65535);if((ak===34)||(ak===35)){break;}bk=2;while(true){if(!(bk>0;}bl=DK(m,bk);ad=bl[0];t=bl[1];ah=bl[2];m=$substring(m,bk);}}else if(ap===(533)){if(m.length<2){ah=CV;break;}bm=$substring(m,0,2);bn=$substring(m,2);ao=bm;m=bn;bo=ao;if(bo===("PM")){v=true;}else if(bo===("AM")){u=true;}else{ah=CV;}}else if(ap===(534)){if(m.length<2){ah=CV;break;}bp=$substring(m,0,2);bq=$substring(m,2);ao=bp;m=bq;br=ao;if(br===("pm")){v=true;}else if(br===("am")){u=true;}else{ah=CV;}}else if((ap===(24))||(ap===(27))||(ap===(25))||(ap===(26))||(ap===(28))||(ap===(29))||(ap===(31))||(ap===(32))||(ap===(30))||(ap===(33))){if(((ak===24)||(ak===26)||(ak===27))&&m.length>=1&&(m.charCodeAt(0)===90)){m=$substring(m,1);ae=$pkg.UTC;break;}bs="";bt="";bu="";bv="";bw=bs;bx=bt;by=bu;bz=bv;if((ak===27)||(ak===32)){if(m.length<6){ah=CV;break;}if(!((m.charCodeAt(3)===58))){ah=CV;break;}ca=$substring(m,0,1);cb=$substring(m,1,3);cc=$substring(m,4,6);cd="00";ce=$substring(m,6);bw=ca;bx=cb;by=cc;bz=cd;m=ce;}else if((ak===31)||(ak===26)){if(m.length<3){ah=CV;break;}cf=$substring(m,0,1);cg=$substring(m,1,3);ch="00";ci="00";cj=$substring(m,3);bw=cf;bx=cg;by=ch;bz=ci;m=cj;}else if((ak===28)||(ak===33)){if(m.length<9){ah=CV;break;}if(!((m.charCodeAt(3)===58))||!((m.charCodeAt(6)===58))){ah=CV;break;}ck=$substring(m,0,1);cl=$substring(m,1,3);cm=$substring(m,4,6);cn=$substring(m,7,9);co=$substring(m,9);bw=ck;bx=cl;by=cm;bz=cn;m=co;}else if((ak===25)||(ak===30)){if(m.length<7){ah=CV;break;}cp=$substring(m,0,1);cq=$substring(m,1,3);cr=$substring(m,3,5);cs=$substring(m,5,7);ct=$substring(m,7);bw=cp;bx=cq;by=cr;bz=cs;m=ct;}else{if(m.length<5){ah=CV;break;}cu=$substring(m,0,1);cv=$substring(m,1,3);cw=$substring(m,3,5);cx="00";cy=$substring(m,5);bw=cu;bx=cv;by=cw;bz=cx;m=cy;}cz=0;da=0;db=0;dc=cz;dd=da;de=db;df=CQ(bx);dc=df[0];ah=df[1];if($interfaceIsEqual(ah,$ifaceNil)){dg=CQ(by);dd=dg[0];ah=dg[1];}if($interfaceIsEqual(ah,$ifaceNil)){dh=CQ(bz);de=dh[0];ah=dh[1];}af=($imul(((($imul(dc,60))+dd>>0)),60))+de>>0;di=bw.charCodeAt(0);if(di===(43)){}else if(di===(45)){af=-af;}else{ah=CV;}}else if(ap===(23)){if(m.length>=3&&$substring(m,0,3)==="UTC"){ae=$pkg.UTC;m=$substring(m,3);break;}dj=DG(m);dk=dj[0];dl=dj[1];if(!dl){ah=CV;break;}dm=$substring(m,0,dk);dn=$substring(m,dk);ag=dm;m=dn;}else if(ap===(34)){dp=1+CS(ak)>>0;if(m.length>0)>0))&&m.charCodeAt((dr+1>>0))<=57)){break;}dr=dr+(1)>>0;}ds=DK(m,1+dr>>0);ad=ds[0];t=ds[1];ah=ds[2];m=$substring(m,(1+dr>>0));}}if(!(t==="")){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,am,m,": "+t+" out of range")];}if(!($interfaceIsEqual(ah,$ifaceNil))){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,am,m,"")];}}if(v&&aa<12){aa=aa+(12)>>0;}else if(u&&(aa===12)){aa=0;}if(z>=0){dt=0;du=0;if(BM(w)){if(z===60){du=2;dt=29;}else if(z>60){z=z-(1)>>0;}}if(z<1||z>365){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,"",m,": day-of-year out of range")];}if(du===0){du=(dv=((z-1>>0))/31,(dv===dv&&dv!==1/0&&dv!==-1/0)?dv>>0:$throwRuntimeError("integer divide by zero"))+1>>0;if(((((du<0||du>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[du])>>0))>0;}dt=z-(((dw=du-1>>0,((dw<0||dw>=BC.length)?($throwRuntimeError("index out of range"),undefined):BC[dw]))>>0))>>0;}if(x>=0&&!((x===du))){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,"",m,": day-of-year does not match month")];}x=du;if(y>=0&&!((y===dt))){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,"",m,": day-of-year does not match day")];}y=dt;}else{if(x<0){x=1;}if(y<0){y=1;}}if(y<1||y>BD(((x>>0)),w)){$s=-1;return[new AQ.ptr(new $Uint64(0,0),new $Int64(0,0),EL.nil),new CW.ptr(r,s,"",m,": day out of range")];}if(!(ae===EL.nil)){$s=1;continue;}$s=2;continue;case 1:dx=BO(w,((x>>0)),y,aa,ab,ac,ad,ae);$s=3;case 3:if($c){$c=false;dx=dx.$blk();}if(dx&&dx.$blk!==undefined){break s;}dy=[dx,$ifaceNil];$s=4;case 4:return dy;case 2:if(!((af===-1))){$s=5;continue;}$s=6;continue;case 5:dz=BO(w,((x>>0)),y,aa,ab,ac,ad,$pkg.UTC);$s=7;case 7:if($c){$c=false;dz=dz.$blk();}if(dz&&dz.$blk!==undefined){break s;}ea=$clone(dz,AQ);ea.addSec((eb=(new $Int64(0,af)),new $Int64(-eb.$high,-eb.$low)));ed=o.lookup(ea.unixSec());$s=8;case 8:if($c){$c=false;ed=ed.$blk();}if(ed&&ed.$blk!==undefined){break s;}ec=ed;ee=ec[0];ef=ec[1];if((ef===af)&&(ag===""||ee===ag)){ea.setLoc(o);$s=-1;return[ea,$ifaceNil];}ea.setLoc(AC(ag,af));$s=-1;return[ea,$ifaceNil];case 6:if(!(ag==="")){$s=9;continue;}$s=10;continue;case 9:eg=BO(w,((x>>0)),y,aa,ab,ac,ad,$pkg.UTC);$s=11;case 11:if($c){$c=false;eg=eg.$blk();}if(eg&&eg.$blk!==undefined){break s;}eh=$clone(eg,AQ);ej=o.lookupName(ag,eh.unixSec());$s=12;case 12:if($c){$c=false;ej=ej.$blk();}if(ej&&ej.$blk!==undefined){break s;}ei=ej;ek=ei[0];el=ei[1];if(el){eh.addSec((em=(new $Int64(0,ek)),new $Int64(-em.$high,-em.$low)));eh.setLoc(o);$s=-1;return[eh,$ifaceNil];}if(ag.length>3&&$substring(ag,0,3)==="GMT"){en=CQ($substring(ag,3));ek=en[0];ek=$imul(ek,(3600));}eh.setLoc(AC(ag,ek));$s=-1;return[eh,$ifaceNil];case 10:eo=BO(w,((x>>0)),y,aa,ab,ac,ad,n);$s=13;case 13:if($c){$c=false;eo=eo.$blk();}if(eo&&eo.$blk!==undefined){break s;}ep=[eo,$ifaceNil];$s=14;case 14:return ep;}return;}var $f={$blk:DF,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};DG=function(l){var aa,ab,ac,ad,ae,af,ag,ah,ai,aj,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=0;n=false;if(l.length<3){o=0;p=false;m=o;n=p;return[m,n];}if(l.length>=4&&($substring(l,0,4)==="ChST"||$substring(l,0,4)==="MeST")){q=4;r=true;m=q;n=r;return[m,n];}if($substring(l,0,3)==="GMT"){m=DH(l);s=m;t=true;m=s;n=t;return[m,n];}if((l.charCodeAt(0)===43)||(l.charCodeAt(0)===45)){m=DI(l);u=m>0;v=m;w=u;m=v;n=w;return[m,n];}x=0;x=0;while(true){if(!(x<6)){break;}if(x>=l.length){break;}y=l.charCodeAt(x);if(y<65||90>0;}z=x;if((z===(0))||(z===(1))||(z===(2))||(z===(6))){aa=0;ab=false;m=aa;n=ab;return[m,n];}else if(z===(5)){if(l.charCodeAt(4)===84){ac=5;ad=true;m=ac;n=ad;return[m,n];}}else if(z===(4)){if((l.charCodeAt(3)===84)||$substring(l,0,4)==="WITA"){ae=4;af=true;m=ae;n=af;return[m,n];}}else if(z===(3)){ag=3;ah=true;m=ag;n=ah;return[m,n];}ai=0;aj=false;m=ai;n=aj;return[m,n];};DH=function(l){var l;l=$substring(l,3);if(l.length===0){return 3;}return 3+DI(l)>>0;};DI=function(l){var l,m,n,o,p,q;m=l.charCodeAt(0);if(!((m===45))&&!((m===43))){return 0;}n=DM($substring(l,1));o=n[0];p=n[1];q=n[2];if(!($interfaceIsEqual(q,$ifaceNil))||$substring(l,1)===p){return 0;}if((o.$high>0||(o.$high===0&&o.$low>23))){return 0;}return l.length-p.length>>0;};DJ=function(l){var l;return(l===46)||(l===44);};DK=function(l,m){var l,m,n,o,p,q,r,s;n=0;o="";p=$ifaceNil;if(!DJ(l.charCodeAt(0))){p=CV;return[n,o,p];}if(m>10){l=$substring(l,0,10);m=10;}q=CQ($substring(l,1,m));n=q[0];p=q[1];if(!($interfaceIsEqual(p,$ifaceNil))){return[n,o,p];}if(n<0){o="fractional second";return[n,o,p];}r=10-m>>0;s=0;while(true){if(!(s>0;}return[n,o,p];};DM=function(l){var aa,ab,ac,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=new $Uint64(0,0);n="";o=$ifaceNil;p=0;while(true){if(!(p57){break;}if((m.$high>214748364||(m.$high===214748364&&m.$low>3435973836))){r=new $Uint64(0,0);s="";t=DL;m=r;n=s;o=t;return[m,n,o];}m=(u=(v=$mul64(m,new $Uint64(0,10)),w=(new $Uint64(0,q)),new $Uint64(v.$high+w.$high,v.$low+w.$low)),new $Uint64(u.$high-0,u.$low-48));if((m.$high>2147483648||(m.$high===2147483648&&m.$low>0))){x=new $Uint64(0,0);y="";z=DL;m=x;n=y;o=z;return[m,n,o];}p=p+(1)>>0;}aa=m;ab=$substring(l,p);ac=$ifaceNil;m=aa;n=ab;o=ac;return[m,n,o];};DQ=function(){var l,m,n,o,p,q;AA.name="Local";l=new X.ptr("",0,false);m=new($global.Date)();n=$imul(($parseInt(m.getTimezoneOffset())>>0),-1);l.offset=$imul(n,60);l.name="UTC";if(n<0){l.name=l.name+("-");n=$imul(n,(-1));}else{l.name=l.name+("+");}l.name=l.name+(DR((o=n/60,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))));q=(p=n%60,p===p?p:$throwRuntimeError("integer divide by zero"));if(!((q===0))){l.name=l.name+(":"+DR(q));}AA.zone=new EF([$clone(l,X)]);};DR=function(l){var l;if(l<10){return $substring("0123456789",l,(l+1>>0));}return $substring("00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899",($imul(l,2)),(($imul(l,2))+2>>0));};DS=function(){$unused(BJ(new $Int64(0,0),new $Int64(0,0)));};EL.methods=[{prop:"get",name:"get",pkg:"time",typ:$funcType([],[EL],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"lookup",name:"lookup",pkg:"time",typ:$funcType([$Int64],[$String,$Int,$Int64,$Int64,$Bool],false)},{prop:"lookupFirstZone",name:"lookupFirstZone",pkg:"time",typ:$funcType([],[$Int],false)},{prop:"firstZoneUsed",name:"firstZoneUsed",pkg:"time",typ:$funcType([],[$Bool],false)},{prop:"lookupName",name:"lookupName",pkg:"time",typ:$funcType([$String,$Int64],[$Int,$Bool],false)}];AQ.methods=[{prop:"After",name:"After",pkg:"",typ:$funcType([AQ],[$Bool],false)},{prop:"Before",name:"Before",pkg:"",typ:$funcType([AQ],[$Bool],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([AQ],[$Bool],false)},{prop:"IsZero",name:"IsZero",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"abs",name:"abs",pkg:"time",typ:$funcType([],[$Uint64],false)},{prop:"locabs",name:"locabs",pkg:"time",typ:$funcType([],[$String,$Int,$Uint64],false)},{prop:"Date",name:"Date",pkg:"",typ:$funcType([],[$Int,AR,$Int],false)},{prop:"Year",name:"Year",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Month",name:"Month",pkg:"",typ:$funcType([],[AR],false)},{prop:"Day",name:"Day",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Weekday",name:"Weekday",pkg:"",typ:$funcType([],[AS],false)},{prop:"ISOWeek",name:"ISOWeek",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"Clock",name:"Clock",pkg:"",typ:$funcType([],[$Int,$Int,$Int],false)},{prop:"Hour",name:"Hour",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Minute",name:"Minute",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Second",name:"Second",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Nanosecond",name:"Nanosecond",pkg:"",typ:$funcType([],[$Int],false)},{prop:"YearDay",name:"YearDay",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([AV],[AQ],false)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([AQ],[AV],false)},{prop:"AddDate",name:"AddDate",pkg:"",typ:$funcType([$Int,$Int,$Int],[AQ],false)},{prop:"date",name:"date",pkg:"time",typ:$funcType([$Bool],[$Int,AR,$Int,$Int],false)},{prop:"UTC",name:"UTC",pkg:"",typ:$funcType([],[AQ],false)},{prop:"Local",name:"Local",pkg:"",typ:$funcType([],[AQ],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([EL],[AQ],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[EL],false)},{prop:"Zone",name:"Zone",pkg:"",typ:$funcType([],[$String,$Int],false)},{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixMilli",name:"UnixMilli",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixMicro",name:"UnixMicro",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixNano",name:"UnixNano",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"MarshalBinary",name:"MarshalBinary",pkg:"",typ:$funcType([],[EK,$error],false)},{prop:"GobEncode",name:"GobEncode",pkg:"",typ:$funcType([],[EK,$error],false)},{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[EK,$error],false)},{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[EK,$error],false)},{prop:"IsDST",name:"IsDST",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([AV],[AQ],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([AV],[AQ],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"GoString",name:"GoString",pkg:"",typ:$funcType([],[$String],false)},{prop:"Format",name:"Format",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"AppendFormat",name:"AppendFormat",pkg:"",typ:$funcType([EK,$String],[EK],false)}];EW.methods=[{prop:"nsec",name:"nsec",pkg:"time",typ:$funcType([],[$Int32],false)},{prop:"sec",name:"sec",pkg:"time",typ:$funcType([],[$Int64],false)},{prop:"unixSec",name:"unixSec",pkg:"time",typ:$funcType([],[$Int64],false)},{prop:"addSec",name:"addSec",pkg:"time",typ:$funcType([$Int64],[],false)},{prop:"setLoc",name:"setLoc",pkg:"time",typ:$funcType([EL],[],false)},{prop:"stripMono",name:"stripMono",pkg:"time",typ:$funcType([],[],false)},{prop:"setMono",name:"setMono",pkg:"time",typ:$funcType([$Int64],[],false)},{prop:"mono",name:"mono",pkg:"time",typ:$funcType([],[$Int64],false)},{prop:"UnmarshalBinary",name:"UnmarshalBinary",pkg:"",typ:$funcType([EK],[$error],false)},{prop:"GobDecode",name:"GobDecode",pkg:"",typ:$funcType([EK],[$error],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([EK],[$error],false)},{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([EK],[$error],false)}];AR.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AS.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AV.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Nanoseconds",name:"Nanoseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Microseconds",name:"Microseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Milliseconds",name:"Milliseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seconds",name:"Seconds",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Minutes",name:"Minutes",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Hours",name:"Hours",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([AV],[AV],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([AV],[AV],false)}];FA.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];W.init("time",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"zone",name:"zone",embedded:false,exported:false,typ:EF,tag:""},{prop:"tx",name:"tx",embedded:false,exported:false,typ:EG,tag:""},{prop:"extend",name:"extend",embedded:false,exported:false,typ:$String,tag:""},{prop:"cacheStart",name:"cacheStart",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"cacheEnd",name:"cacheEnd",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"cacheZone",name:"cacheZone",embedded:false,exported:false,typ:EH,tag:""}]);X.init("time",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"offset",name:"offset",embedded:false,exported:false,typ:$Int,tag:""},{prop:"isDST",name:"isDST",embedded:false,exported:false,typ:$Bool,tag:""}]);Y.init("time",[{prop:"when",name:"when",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"index",name:"index",embedded:false,exported:false,typ:$Uint8,tag:""},{prop:"isstd",name:"isstd",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"isutc",name:"isutc",embedded:false,exported:false,typ:$Bool,tag:""}]);AH.init("time",[{prop:"kind",name:"kind",embedded:false,exported:false,typ:AG,tag:""},{prop:"day",name:"day",embedded:false,exported:false,typ:$Int,tag:""},{prop:"week",name:"week",embedded:false,exported:false,typ:$Int,tag:""},{prop:"mon",name:"mon",embedded:false,exported:false,typ:$Int,tag:""},{prop:"time",name:"time",embedded:false,exported:false,typ:$Int,tag:""}]);AQ.init("time",[{prop:"wall",name:"wall",embedded:false,exported:false,typ:$Uint64,tag:""},{prop:"ext",name:"ext",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"loc",name:"loc",embedded:false,exported:false,typ:EL,tag:""}]);CW.init("",[{prop:"Layout",name:"Layout",embedded:false,exported:true,typ:$String,tag:""},{prop:"Value",name:"Value",embedded:false,exported:true,typ:$String,tag:""},{prop:"LayoutElem",name:"LayoutElem",embedded:false,exported:true,typ:$String,tag:""},{prop:"ValueElem",name:"ValueElem",embedded:false,exported:true,typ:$String,tag:""},{prop:"Message",name:"Message",embedded:false,exported:true,typ:$String,tag:""}]);$pkg.$initLinknames=function(){BF=$linknames["runtime.nanotime"];};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AA=new W.ptr("",EF.nil,EG.nil,"",new $Int64(0,0),new $Int64(0,0),EH.nil);AB=new E.Once.ptr(false,false);L=A.New("malformed time zone information");$unused(new EJ(["/usr/share/zoneinfo/","/usr/share/lib/zoneinfo/","/usr/lib/locale/TZ/",B.GOROOT()+"/lib/time/zoneinfo.zip"]));Z=new W.ptr("UTC",EF.nil,EG.nil,"",new $Int64(0,0),new $Int64(0,0),EH.nil);$pkg.UTC=Z;$pkg.Local=AA;AL=A.New("time: invalid location name");BC=$toNativeArray($kindInt32,[0,31,59,90,120,151,181,212,243,273,304,334,365]);k=BF();$s=7;case 7:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}BG=(j=k,new $Int64(j.$high-0,j.$low-1));CF=$toNativeArray($kindInt,[260,265,526,528,530,276]);CI=new EJ(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);CJ=new EJ(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);CK=new EJ(["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]);CL=new EJ(["January","February","March","April","May","June","July","August","September","October","November","December"]);CP=A.New("time: invalid number");CV=A.New("bad value for field");DL=A.New("time: bad [0-9]*");EB=new EJ([B.GOROOT()+"/lib/time/zoneinfo.zip"]);DS();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/poll"]=(function(){var $pkg={},$init,F,B,C,D,A,E,H,N,Q,R,T,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,I,Y,G,J,K,L,M,O,S,V,W,X;F=$packages["errors"];B=$packages["internal/syscall/unix"];C=$packages["io"];D=$packages["sync/atomic"];A=$packages["syscall"];E=$packages["time"];H=$pkg.FD=$newType(0,$kindStruct,"poll.FD",true,"internal/poll",true,function(fdmu_,Sysfd_,pd_,iovecs_,csema_,isBlocking_,IsStream_,ZeroReadIsEOF_,isFile_){this.$val=this;if(arguments.length===0){this.fdmu=new Q.ptr(new $Uint64(0,0),0,0);this.Sysfd=0;this.pd=new N.ptr(AB.nil,false);this.iovecs=AE.nil;this.csema=0;this.isBlocking=0;this.IsStream=false;this.ZeroReadIsEOF=false;this.isFile=false;return;}this.fdmu=fdmu_;this.Sysfd=Sysfd_;this.pd=pd_;this.iovecs=iovecs_;this.csema=csema_;this.isBlocking=isBlocking_;this.IsStream=IsStream_;this.ZeroReadIsEOF=ZeroReadIsEOF_;this.isFile=isFile_;});N=$pkg.pollDesc=$newType(0,$kindStruct,"poll.pollDesc",true,"internal/poll",false,function(fd_,closing_){this.$val=this;if(arguments.length===0){this.fd=AB.nil;this.closing=false;return;}this.fd=fd_;this.closing=closing_;});Q=$pkg.fdMutex=$newType(0,$kindStruct,"poll.fdMutex",true,"internal/poll",false,function(state_,rsema_,wsema_){this.$val=this;if(arguments.length===0){this.state=new $Uint64(0,0);this.rsema=0;this.wsema=0;return;}this.state=state_;this.rsema=rsema_;this.wsema=wsema_;});R=$pkg.errNetClosing=$newType(0,$kindStruct,"poll.errNetClosing",true,"internal/poll",false,function(){this.$val=this;if(arguments.length===0){return;}});T=$pkg.DeadlineExceededError=$newType(0,$kindStruct,"poll.DeadlineExceededError",true,"internal/poll",true,function(){this.$val=this;if(arguments.length===0){return;}});Z=$ptrType($Uint32);AA=$ptrType($Int32);AB=$ptrType(H);AC=$ptrType($Uint64);AD=$sliceType(A.Iovec);AE=$ptrType(AD);AF=$sliceType($Uint8);AG=$ptrType(A.SockaddrInet4);AH=$ptrType(A.SockaddrInet6);AI=$ptrType(A.Stat_t);AJ=$funcType([$Uintptr],[$Bool],false);AK=$funcType([$Uintptr],[],false);AL=$ptrType(N);AM=$ptrType(Q);AN=$ptrType(T);G=function(c){var{c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:e=$pkg.AcceptFunc(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];h=d[2];if($interfaceIsEqual(h,$ifaceNil)){A.CloseOnExec(f);}if(!($interfaceIsEqual(h,$ifaceNil))){$s=-1;return[-1,$ifaceNil,"accept",h];}h=A.SetNonblock(f,true);if(!($interfaceIsEqual(h,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:i=$pkg.CloseFunc(f);$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=-1;return[-1,$ifaceNil,"setnonblock",h];case 3:$s=-1;return[f,g,"",$ifaceNil];}return;}var $f={$blk:G,$c:true,$r,c,d,e,f,g,h,i,$s};return $f;};H.ptr.prototype.Init=function(c,d){var c,d,e,f;e=this;if(c==="file"){e.isFile=true;}if(!d){e.isBlocking=1;return $ifaceNil;}f=e.pd.init(e);if(!($interfaceIsEqual(f,$ifaceNil))){e.isBlocking=1;}return f;};H.prototype.Init=function(c,d){return this.$val.Init(c,d);};H.ptr.prototype.destroy=function(){var{c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;c.pd.close();d=$pkg.CloseFunc(c.Sysfd);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;c.Sysfd=-1;$r=X((c.$ptr_csema||(c.$ptr_csema=new Z(function(){return this.$target.csema;},function($v){this.$target.csema=$v;},c))));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return e;}return;}var $f={$blk:H.ptr.prototype.destroy,$c:true,$r,c,d,e,$s};return $f;};H.prototype.destroy=function(){return this.$val.destroy();};H.ptr.prototype.Close=function(){var{c,d,e,f,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=c.fdmu.increfAndClose();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(!d){$s=1;continue;}$s=2;continue;case 1:$s=-1;return S(c.isFile);case 2:c.pd.evict();e=c.decref();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(c.isBlocking===0){$s=5;continue;}$s=6;continue;case 5:$r=W((c.$ptr_csema||(c.$ptr_csema=new Z(function(){return this.$target.csema;},function($v){this.$target.csema=$v;},c))));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=-1;return f;}return;}var $f={$blk:H.ptr.prototype.Close,$c:true,$r,c,d,e,f,$s};return $f;};H.prototype.Close=function(){return this.$val.Close();};H.ptr.prototype.SetBlocking=function(){var{c,d,e,f,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=this;d=c.incref();if(!($interfaceIsEqual(d,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:e=d;$s=3;case 3:return e;case 2:$deferred.push([$methodVal(c,"decref"),[]]);D.StoreUint32((c.$ptr_isBlocking||(c.$ptr_isBlocking=new Z(function(){return this.$target.isBlocking;},function($v){this.$target.isBlocking=$v;},c))),1);f=A.SetNonblock(c.Sysfd,false);$s=4;case 4:return f;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.SetBlocking,$c:true,$r,c,d,e,f,$s,$deferred};return $f;}}};H.prototype.SetBlocking=function(){return this.$val.SetBlocking();};H.ptr.prototype.Read=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.readLock();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=[0,f];$s=4;case 4:return g;case 3:$deferred.push([$methodVal(d,"readUnlock"),[]]);if(c.$length===0){$s=5;continue;}$s=6;continue;case 5:h=[0,$ifaceNil];$s=7;case 7:return h;case 6:i=d.pd.prepareRead(d.isFile);if(!($interfaceIsEqual(i,$ifaceNil))){$s=8;continue;}$s=9;continue;case 8:j=[0,i];$s=10;case 10:return j;case 9:if(d.IsStream&&c.$length>1073741824){c=$subslice(c,0,1073741824);}case 11:l=L(A.Read,d.Sysfd,c);$s=13;case 13:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=k[0];n=k[1];if(!($interfaceIsEqual(n,$ifaceNil))){m=0;if($interfaceIsEqual(n,new A.Errno(11))&&d.pd.pollable()){n=d.pd.waitRead(d.isFile);if($interfaceIsEqual(n,$ifaceNil)){$s=11;continue;}}}n=d.eofError(m,n);o=[m,n];$s=14;case 14:return o;case 12:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Read,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};H.prototype.Read=function(c){return this.$val.Read(c);};H.ptr.prototype.Pread=function(c,d){var{c,d,e,f,g,h,i,j,k,$s,$r,$c}=$restore(this,{c,d});$s=$s||0;s:while(true){switch($s){case 0:e=this;f=e.incref();if(!($interfaceIsEqual(f,$ifaceNil))){$s=-1;return[0,f];}if(e.IsStream&&c.$length>1073741824){c=$subslice(c,0,1073741824);}g=0;h=$ifaceNil;case 1:j=A.Pread(e.Sysfd,c,d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;g=i[0];h=i[1];if(!($interfaceIsEqual(h,new A.Errno(4)))){$s=2;continue;}$s=1;continue;case 2:if(!($interfaceIsEqual(h,$ifaceNil))){g=0;}k=e.decref();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;h=e.eofError(g,h);$s=-1;return[g,h];}return;}var $f={$blk:H.ptr.prototype.Pread,$c:true,$r,c,d,e,f,g,h,i,j,k,$s};return $f;};H.prototype.Pread=function(c,d){return this.$val.Pread(c,d);};H.ptr.prototype.ReadFrom=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.readLock();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=[0,$ifaceNil,f];$s=4;case 4:return g;case 3:$deferred.push([$methodVal(d,"readUnlock"),[]]);h=d.pd.prepareRead(d.isFile);if(!($interfaceIsEqual(h,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:i=[0,$ifaceNil,h];$s=7;case 7:return i;case 6:case 8:j=A.Recvfrom(d.Sysfd,c,0);k=j[0];l=j[1];m=j[2];if(!($interfaceIsEqual(m,$ifaceNil))){if($interfaceIsEqual(m,new A.Errno(4))){$s=8;continue;}k=0;if($interfaceIsEqual(m,new A.Errno(11))&&d.pd.pollable()){m=d.pd.waitRead(d.isFile);if($interfaceIsEqual(m,$ifaceNil)){$s=8;continue;}}}m=d.eofError(k,m);n=[k,l,m];$s=10;case 10:return n;case 9:$s=-1;return[0,$ifaceNil,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadFrom,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred};return $f;}}};H.prototype.ReadFrom=function(c){return this.$val.ReadFrom(c);};H.ptr.prototype.ReadFromInet4=function(c,d){var{c,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.readLock();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:h=[0,g];$s=4;case 4:return h;case 3:$deferred.push([$methodVal(e,"readUnlock"),[]]);i=e.pd.prepareRead(e.isFile);if(!($interfaceIsEqual(i,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:j=[0,i];$s=7;case 7:return j;case 6:case 8:k=B.RecvfromInet4(e.Sysfd,c,0,d);l=k[0];m=k[1];if(!($interfaceIsEqual(m,$ifaceNil))){if($interfaceIsEqual(m,new A.Errno(4))){$s=8;continue;}l=0;if($interfaceIsEqual(m,new A.Errno(11))&&e.pd.pollable()){m=e.pd.waitRead(e.isFile);if($interfaceIsEqual(m,$ifaceNil)){$s=8;continue;}}}m=e.eofError(l,m);n=[l,m];$s=10;case 10:return n;case 9:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadFromInet4,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred};return $f;}}};H.prototype.ReadFromInet4=function(c,d){return this.$val.ReadFromInet4(c,d);};H.ptr.prototype.ReadFromInet6=function(c,d){var{c,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.readLock();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:h=[0,g];$s=4;case 4:return h;case 3:$deferred.push([$methodVal(e,"readUnlock"),[]]);i=e.pd.prepareRead(e.isFile);if(!($interfaceIsEqual(i,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:j=[0,i];$s=7;case 7:return j;case 6:case 8:k=B.RecvfromInet6(e.Sysfd,c,0,d);l=k[0];m=k[1];if(!($interfaceIsEqual(m,$ifaceNil))){if($interfaceIsEqual(m,new A.Errno(4))){$s=8;continue;}l=0;if($interfaceIsEqual(m,new A.Errno(11))&&e.pd.pollable()){m=e.pd.waitRead(e.isFile);if($interfaceIsEqual(m,$ifaceNil)){$s=8;continue;}}}m=e.eofError(l,m);n=[l,m];$s=10;case 10:return n;case 9:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadFromInet6,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred};return $f;}}};H.prototype.ReadFromInet6=function(c,d){return this.$val.ReadFromInet6(c,d);};H.ptr.prototype.ReadMsg=function(c,d,e){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred,$r,$c}=$restore(this,{c,d,e});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);f=this;g=f.readLock();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!($interfaceIsEqual(h,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:i=[0,0,0,$ifaceNil,h];$s=4;case 4:return i;case 3:$deferred.push([$methodVal(f,"readUnlock"),[]]);j=f.pd.prepareRead(f.isFile);if(!($interfaceIsEqual(j,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:k=[0,0,0,$ifaceNil,j];$s=7;case 7:return k;case 6:case 8:l=A.Recvmsg(f.Sysfd,c,d,e);m=l[0];n=l[1];o=l[2];p=l[3];q=l[4];if(!($interfaceIsEqual(q,$ifaceNil))){if($interfaceIsEqual(q,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(q,new A.Errno(11))&&f.pd.pollable()){q=f.pd.waitRead(f.isFile);if($interfaceIsEqual(q,$ifaceNil)){$s=8;continue;}}}q=f.eofError(m,q);r=[m,n,o,p,q];$s=10;case 10:return r;case 9:$s=-1;return[0,0,0,$ifaceNil,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,0,0,$ifaceNil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadMsg,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred};return $f;}}};H.prototype.ReadMsg=function(c,d,e){return this.$val.ReadMsg(c,d,e);};H.ptr.prototype.ReadMsgInet4=function(c,d,e,f){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred,$r,$c}=$restore(this,{c,d,e,f});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);g=this;h=g.readLock();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:j=[0,0,0,i];$s=4;case 4:return j;case 3:$deferred.push([$methodVal(g,"readUnlock"),[]]);k=g.pd.prepareRead(g.isFile);if(!($interfaceIsEqual(k,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:l=[0,0,0,k];$s=7;case 7:return l;case 6:case 8:m=B.RecvmsgInet4(g.Sysfd,c,d,e,f);n=m[0];o=m[1];p=m[2];q=m[3];if(!($interfaceIsEqual(q,$ifaceNil))){if($interfaceIsEqual(q,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(q,new A.Errno(11))&&g.pd.pollable()){q=g.pd.waitRead(g.isFile);if($interfaceIsEqual(q,$ifaceNil)){$s=8;continue;}}}q=g.eofError(n,q);r=[n,o,p,q];$s=10;case 10:return r;case 9:$s=-1;return[0,0,0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,0,0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadMsgInet4,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred};return $f;}}};H.prototype.ReadMsgInet4=function(c,d,e,f){return this.$val.ReadMsgInet4(c,d,e,f);};H.ptr.prototype.ReadMsgInet6=function(c,d,e,f){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred,$r,$c}=$restore(this,{c,d,e,f});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);g=this;h=g.readLock();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:j=[0,0,0,i];$s=4;case 4:return j;case 3:$deferred.push([$methodVal(g,"readUnlock"),[]]);k=g.pd.prepareRead(g.isFile);if(!($interfaceIsEqual(k,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:l=[0,0,0,k];$s=7;case 7:return l;case 6:case 8:m=B.RecvmsgInet6(g.Sysfd,c,d,e,f);n=m[0];o=m[1];p=m[2];q=m[3];if(!($interfaceIsEqual(q,$ifaceNil))){if($interfaceIsEqual(q,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(q,new A.Errno(11))&&g.pd.pollable()){q=g.pd.waitRead(g.isFile);if($interfaceIsEqual(q,$ifaceNil)){$s=8;continue;}}}q=g.eofError(n,q);r=[n,o,p,q];$s=10;case 10:return r;case 9:$s=-1;return[0,0,0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,0,0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadMsgInet6,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred};return $f;}}};H.prototype.ReadMsgInet6=function(c,d,e,f){return this.$val.ReadMsgInet6(c,d,e,f);};H.ptr.prototype.Write=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.writeLock();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=[0,f];$s=4;case 4:return g;case 3:$deferred.push([$methodVal(d,"writeUnlock"),[]]);h=d.pd.prepareWrite(d.isFile);if(!($interfaceIsEqual(h,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:i=[0,h];$s=7;case 7:return i;case 6:j=0;case 8:k=c.$length;if(d.IsStream&&(k-j>>0)>1073741824){k=j+1073741824>>0;}m=L(A.Write,d.Sysfd,$subslice(c,j,k));$s=10;case 10:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;n=l[0];o=l[1];if(n>0){j=j+(n)>>0;}if(j===c.$length){$s=11;continue;}$s=12;continue;case 11:p=[j,o];$s=13;case 13:return p;case 12:if($interfaceIsEqual(o,new A.Errno(11))&&d.pd.pollable()){o=d.pd.waitWrite(d.isFile);if($interfaceIsEqual(o,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(o,$ifaceNil))){$s=14;continue;}$s=15;continue;case 14:q=[j,o];$s=16;case 16:return q;case 15:if(n===0){$s=17;continue;}$s=18;continue;case 17:r=[j,C.ErrUnexpectedEOF];$s=19;case 19:return r;case 18:$s=8;continue;case 9:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Write,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$deferred};return $f;}}};H.prototype.Write=function(c){return this.$val.Write(c);};H.ptr.prototype.Pwrite=function(c,d){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.incref();if(!($interfaceIsEqual(f,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:g=[0,f];$s=3;case 3:return g;case 2:$deferred.push([$methodVal(e,"decref"),[]]);h=0;case 4:i=c.$length;if(e.IsStream&&(i-h>>0)>1073741824){i=h+1073741824>>0;}l=A.Pwrite(e.Sysfd,$subslice(c,h,i),(k=(new $Int64(0,h)),new $Int64(d.$high+k.$high,d.$low+k.$low)));$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}j=l;m=j[0];n=j[1];if($interfaceIsEqual(n,new A.Errno(4))){$s=4;continue;}if(m>0){h=h+(m)>>0;}if(h===c.$length){$s=7;continue;}$s=8;continue;case 7:o=[h,n];$s=9;case 9:return o;case 8:if(!($interfaceIsEqual(n,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:p=[h,n];$s=12;case 12:return p;case 11:if(m===0){$s=13;continue;}$s=14;continue;case 13:q=[h,C.ErrUnexpectedEOF];$s=15;case 15:return q;case 14:$s=4;continue;case 5:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Pwrite,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$deferred};return $f;}}};H.prototype.Pwrite=function(c,d){return this.$val.Pwrite(c,d);};H.ptr.prototype.WriteToInet4=function(c,d){var{c,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.writeLock();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:h=[0,g];$s=4;case 4:return h;case 3:$deferred.push([$methodVal(e,"writeUnlock"),[]]);i=e.pd.prepareWrite(e.isFile);if(!($interfaceIsEqual(i,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:j=[0,i];$s=7;case 7:return j;case 6:case 8:k=B.SendtoInet4(e.Sysfd,c,0,d);if($interfaceIsEqual(k,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(k,new A.Errno(11))&&e.pd.pollable()){k=e.pd.waitWrite(e.isFile);if($interfaceIsEqual(k,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(k,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:l=[0,k];$s=12;case 12:return l;case 11:m=[c.$length,$ifaceNil];$s=13;case 13:return m;case 9:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteToInet4,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s,$deferred};return $f;}}};H.prototype.WriteToInet4=function(c,d){return this.$val.WriteToInet4(c,d);};H.ptr.prototype.WriteToInet6=function(c,d){var{c,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.writeLock();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:h=[0,g];$s=4;case 4:return h;case 3:$deferred.push([$methodVal(e,"writeUnlock"),[]]);i=e.pd.prepareWrite(e.isFile);if(!($interfaceIsEqual(i,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:j=[0,i];$s=7;case 7:return j;case 6:case 8:k=B.SendtoInet6(e.Sysfd,c,0,d);if($interfaceIsEqual(k,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(k,new A.Errno(11))&&e.pd.pollable()){k=e.pd.waitWrite(e.isFile);if($interfaceIsEqual(k,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(k,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:l=[0,k];$s=12;case 12:return l;case 11:m=[c.$length,$ifaceNil];$s=13;case 13:return m;case 9:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteToInet6,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s,$deferred};return $f;}}};H.prototype.WriteToInet6=function(c,d){return this.$val.WriteToInet6(c,d);};H.ptr.prototype.WriteTo=function(c,d){var{c,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.writeLock();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:h=[0,g];$s=4;case 4:return h;case 3:$deferred.push([$methodVal(e,"writeUnlock"),[]]);i=e.pd.prepareWrite(e.isFile);if(!($interfaceIsEqual(i,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:j=[0,i];$s=7;case 7:return j;case 6:case 8:k=A.Sendto(e.Sysfd,c,0,d);if($interfaceIsEqual(k,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(k,new A.Errno(11))&&e.pd.pollable()){k=e.pd.waitWrite(e.isFile);if($interfaceIsEqual(k,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(k,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:l=[0,k];$s=12;case 12:return l;case 11:m=[c.$length,$ifaceNil];$s=13;case 13:return m;case 9:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteTo,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s,$deferred};return $f;}}};H.prototype.WriteTo=function(c,d){return this.$val.WriteTo(c,d);};H.ptr.prototype.WriteMsg=function(c,d,e){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$deferred,$r,$c}=$restore(this,{c,d,e});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);f=this;g=f.writeLock();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!($interfaceIsEqual(h,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:i=[0,0,h];$s=4;case 4:return i;case 3:$deferred.push([$methodVal(f,"writeUnlock"),[]]);j=f.pd.prepareWrite(f.isFile);if(!($interfaceIsEqual(j,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:k=[0,0,j];$s=7;case 7:return k;case 6:case 8:l=A.SendmsgN(f.Sysfd,c,d,e,0);m=l[0];n=l[1];if($interfaceIsEqual(n,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(n,new A.Errno(11))&&f.pd.pollable()){n=f.pd.waitWrite(f.isFile);if($interfaceIsEqual(n,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(n,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:o=[m,0,n];$s=12;case 12:return o;case 11:p=[m,d.$length,n];$s=13;case 13:return p;case 9:$s=-1;return[0,0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteMsg,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$deferred};return $f;}}};H.prototype.WriteMsg=function(c,d,e){return this.$val.WriteMsg(c,d,e);};H.ptr.prototype.WriteMsgInet4=function(c,d,e){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$deferred,$r,$c}=$restore(this,{c,d,e});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);f=this;g=f.writeLock();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!($interfaceIsEqual(h,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:i=[0,0,h];$s=4;case 4:return i;case 3:$deferred.push([$methodVal(f,"writeUnlock"),[]]);j=f.pd.prepareWrite(f.isFile);if(!($interfaceIsEqual(j,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:k=[0,0,j];$s=7;case 7:return k;case 6:case 8:l=B.SendmsgNInet4(f.Sysfd,c,d,e,0);m=l[0];n=l[1];if($interfaceIsEqual(n,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(n,new A.Errno(11))&&f.pd.pollable()){n=f.pd.waitWrite(f.isFile);if($interfaceIsEqual(n,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(n,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:o=[m,0,n];$s=12;case 12:return o;case 11:p=[m,d.$length,n];$s=13;case 13:return p;case 9:$s=-1;return[0,0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteMsgInet4,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$deferred};return $f;}}};H.prototype.WriteMsgInet4=function(c,d,e){return this.$val.WriteMsgInet4(c,d,e);};H.ptr.prototype.WriteMsgInet6=function(c,d,e){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$deferred,$r,$c}=$restore(this,{c,d,e});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);f=this;g=f.writeLock();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!($interfaceIsEqual(h,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:i=[0,0,h];$s=4;case 4:return i;case 3:$deferred.push([$methodVal(f,"writeUnlock"),[]]);j=f.pd.prepareWrite(f.isFile);if(!($interfaceIsEqual(j,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:k=[0,0,j];$s=7;case 7:return k;case 6:case 8:l=B.SendmsgNInet6(f.Sysfd,c,d,e,0);m=l[0];n=l[1];if($interfaceIsEqual(n,new A.Errno(4))){$s=8;continue;}if($interfaceIsEqual(n,new A.Errno(11))&&f.pd.pollable()){n=f.pd.waitWrite(f.isFile);if($interfaceIsEqual(n,$ifaceNil)){$s=8;continue;}}if(!($interfaceIsEqual(n,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:o=[m,0,n];$s=12;case 12:return o;case 11:p=[m,d.$length,n];$s=13;case 13:return p;case 9:$s=-1;return[0,0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteMsgInet6,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$deferred};return $f;}}};H.prototype.WriteMsgInet6=function(c,d,e){return this.$val.WriteMsgInet6(c,d,e);};H.ptr.prototype.Accept=function(){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=this;d=c.readLock();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(!($interfaceIsEqual(e,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:f=[-1,$ifaceNil,"",e];$s=4;case 4:return f;case 3:$deferred.push([$methodVal(c,"readUnlock"),[]]);g=c.pd.prepareRead(c.isFile);if(!($interfaceIsEqual(g,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:h=[-1,$ifaceNil,"",g];$s=7;case 7:return h;case 6:case 8:j=G(c.Sysfd);$s=10;case 10:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];m=i[2];n=i[3];if($interfaceIsEqual(n,$ifaceNil)){$s=11;continue;}$s=12;continue;case 11:o=[k,l,"",n];$s=13;case 13:return o;case 12:p=n;if($interfaceIsEqual(p,new A.Errno((4)))){$s=8;continue;}else if($interfaceIsEqual(p,new A.Errno((11)))){if(c.pd.pollable()){n=c.pd.waitRead(c.isFile);if($interfaceIsEqual(n,$ifaceNil)){$s=8;continue;}}}else if($interfaceIsEqual(p,new A.Errno((103)))){$s=8;continue;}q=[-1,$ifaceNil,m,n];$s=14;case 14:return q;case 9:$s=-1;return[0,$ifaceNil,"",$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil,"",$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Accept,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$deferred};return $f;}}};H.prototype.Accept=function(){return this.$val.Accept();};H.ptr.prototype.Seek=function(c,d){var{c,d,e,f,g,h,i,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);e=this;f=e.incref();if(!($interfaceIsEqual(f,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:g=[new $Int64(0,0),f];$s=3;case 3:return g;case 2:$deferred.push([$methodVal(e,"decref"),[]]);h=A.Seek(e.Sysfd,c,d);$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=5;case 5:return i;}return;}}catch(err){$err=err;$s=-1;return[new $Int64(0,0),$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Seek,$c:true,$r,c,d,e,f,g,h,i,$s,$deferred};return $f;}}};H.prototype.Seek=function(c,d){return this.$val.Seek(c,d);};H.ptr.prototype.ReadDirent=function(c){var{c,d,e,f,g,h,i,j,k,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.incref();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=[0,e];$s=3;case 3:return f;case 2:$deferred.push([$methodVal(d,"decref"),[]]);case 4:h=L(A.ReadDirent,d.Sysfd,c);$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=g[1];if(!($interfaceIsEqual(j,$ifaceNil))){i=0;if($interfaceIsEqual(j,new A.Errno(11))&&d.pd.pollable()){j=d.pd.waitRead(d.isFile);if($interfaceIsEqual(j,$ifaceNil)){$s=4;continue;}}}k=[i,j];$s=7;case 7:return k;case 5:$s=-1;return[0,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.ReadDirent,$c:true,$r,c,d,e,f,g,h,i,j,k,$s,$deferred};return $f;}}};H.prototype.ReadDirent=function(c){return this.$val.ReadDirent(c);};H.ptr.prototype.Fchmod=function(c){var{c,d,e,f,g,h,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];d=[d];d[0]=this;e=d[0].incref();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=e;$s=3;case 3:return f;case 2:$deferred.push([$methodVal(d[0],"decref"),[]]);g=M((function(c,d){return function $b(){var{g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:g=A.Fchmod(d[0].Sysfd,c[0]);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=2;case 2:return h;}return;}var $f={$blk:$b,$c:true,$r,g,h,$s};return $f;};})(c,d));$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=5;case 5:return h;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Fchmod,$c:true,$r,c,d,e,f,g,h,$s,$deferred};return $f;}}};H.prototype.Fchmod=function(c){return this.$val.Fchmod(c);};H.ptr.prototype.Fchdir=function(){var{c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=this;d=c.incref();if(!($interfaceIsEqual(d,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:e=d;$s=3;case 3:return e;case 2:$deferred.push([$methodVal(c,"decref"),[]]);f=A.Fchdir(c.Sysfd);$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=5;case 5:return g;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Fchdir,$c:true,$r,c,d,e,f,g,$s,$deferred};return $f;}}};H.prototype.Fchdir=function(){return this.$val.Fchdir();};H.ptr.prototype.Fstat=function(c){var{c,d,e,f,g,h,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];d=[d];d[0]=this;e=d[0].incref();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=e;$s=3;case 3:return f;case 2:$deferred.push([$methodVal(d[0],"decref"),[]]);g=M((function(c,d){return function $b(){var{g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:g=A.Fstat(d[0].Sysfd,c[0]);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=2;case 2:return h;}return;}var $f={$blk:$b,$c:true,$r,g,h,$s};return $f;};})(c,d));$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=5;case 5:return h;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Fstat,$c:true,$r,c,d,e,f,g,h,$s,$deferred};return $f;}}};H.prototype.Fstat=function(c){return this.$val.Fstat(c);};J=function(c){var{c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:if(true&&(D.LoadInt32((Y||(Y=new AA(function(){return I;},function($v){I=$v;}))))===1)){d=V(c,1,0);e=d[0];f=d[1];if($interfaceIsEqual(f,$ifaceNil)){$s=-1;return[e,"",$ifaceNil];}g=$assertType(f,A.Errno);if((g===(22))||(g===(38))){D.StoreInt32((Y||(Y=new AA(function(){return I;},function($v){I=$v;}))),0);}else{$s=-1;return[-1,"fcntl",f];}}h=K(c);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=2;case 2:return i;}return;}var $f={$blk:J,$c:true,$r,c,d,e,f,g,h,i,$s};return $f;};$pkg.DupCloseOnExec=J;K=function(c){var{c,d,e,f,g,h,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);$r=A.ForkLock.RLock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(A.ForkLock,"RUnlock"),[]]);d=A.Dup(c);e=d[0];f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=[-1,"dup",f];$s=4;case 4:return g;case 3:A.CloseOnExec(e);h=[e,"",$ifaceNil];$s=5;case 5:return h;}return;}}catch(err){$err=err;$s=-1;return[0,"",$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:K,$c:true,$r,c,d,e,f,g,h,$s,$deferred};return $f;}}};H.ptr.prototype.Dup=function(){var{c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=this;d=c.incref();if(!($interfaceIsEqual(d,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:e=[-1,"",d];$s=3;case 3:return e;case 2:$deferred.push([$methodVal(c,"decref"),[]]);f=J(c.Sysfd);$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=5;case 5:return g;}return;}}catch(err){$err=err;$s=-1;return[0,"",$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Dup,$c:true,$r,c,d,e,f,g,$s,$deferred};return $f;}}};H.prototype.Dup=function(){return this.$val.Dup();};H.ptr.prototype.WaitWrite=function(){var c;c=this;return c.pd.waitWrite(c.isFile);};H.prototype.WaitWrite=function(){return this.$val.WaitWrite();};H.ptr.prototype.WriteOnce=function(c){var{c,d,e,f,g,h,i,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.writeLock();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=[0,f];$s=4;case 4:return g;case 3:$deferred.push([$methodVal(d,"writeUnlock"),[]]);h=L(A.Write,d.Sysfd,c);$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=6;case 6:return i;}return;}}catch(err){$err=err;$s=-1;return[0,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.WriteOnce,$c:true,$r,c,d,e,f,g,h,i,$s,$deferred};return $f;}}};H.prototype.WriteOnce=function(c){return this.$val.WriteOnce(c);};H.ptr.prototype.RawRead=function(c){var{c,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.readLock();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=f;$s=4;case 4:return g;case 3:$deferred.push([$methodVal(d,"readUnlock"),[]]);h=d.pd.prepareRead(d.isFile);if(!($interfaceIsEqual(h,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:i=h;$s=7;case 7:return i;case 6:case 8:j=c(((d.Sysfd>>>0)));$s=12;case 12:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(j){$s=10;continue;}$s=11;continue;case 10:k=$ifaceNil;$s=13;case 13:return k;case 11:l=d.pd.waitRead(d.isFile);if(!($interfaceIsEqual(l,$ifaceNil))){$s=14;continue;}$s=15;continue;case 14:m=l;$s=16;case 16:return m;case 15:$s=8;continue;case 9:$s=-1;return $ifaceNil;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.RawRead,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s,$deferred};return $f;}}};H.prototype.RawRead=function(c){return this.$val.RawRead(c);};H.ptr.prototype.RawWrite=function(c){var{c,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.writeLock();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:g=f;$s=4;case 4:return g;case 3:$deferred.push([$methodVal(d,"writeUnlock"),[]]);h=d.pd.prepareWrite(d.isFile);if(!($interfaceIsEqual(h,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:i=h;$s=7;case 7:return i;case 6:case 8:j=c(((d.Sysfd>>>0)));$s=12;case 12:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(j){$s=10;continue;}$s=11;continue;case 10:k=$ifaceNil;$s=13;case 13:return k;case 11:l=d.pd.waitWrite(d.isFile);if(!($interfaceIsEqual(l,$ifaceNil))){$s=14;continue;}$s=15;continue;case 14:m=l;$s=16;case 16:return m;case 15:$s=8;continue;case 9:$s=-1;return $ifaceNil;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.RawWrite,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s,$deferred};return $f;}}};H.prototype.RawWrite=function(c){return this.$val.RawWrite(c);};L=function(c,d,e){var{c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{c,d,e});$s=$s||0;s:while(true){switch($s){case 0:case 1:g=c(d,e);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(!($interfaceIsEqual(i,new A.Errno(4)))){$s=-1;return[h,i];}$s=1;continue;case 2:$s=-1;return[0,$ifaceNil];}return;}var $f={$blk:L,$c:true,$r,c,d,e,f,g,h,i,$s};return $f;};H.ptr.prototype.eofError=function(c,d){var c,d,e;e=this;if((c===0)&&$interfaceIsEqual(d,$ifaceNil)&&e.ZeroReadIsEOF){return C.EOF;}return d;};H.prototype.eofError=function(c,d){return this.$val.eofError(c,d);};H.ptr.prototype.Shutdown=function(c){var{c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.incref();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=e;$s=3;case 3:return f;case 2:$deferred.push([$methodVal(d,"decref"),[]]);g=A.Shutdown(d.Sysfd,c);$s=4;case 4:return g;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Shutdown,$c:true,$r,c,d,e,f,g,$s,$deferred};return $f;}}};H.prototype.Shutdown=function(c){return this.$val.Shutdown(c);};H.ptr.prototype.Fchown=function(c,d){var{c,d,e,f,g,h,i,$s,$deferred,$r,$c}=$restore(this,{c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];d=[d];e=[e];e[0]=this;f=e[0].incref();if(!($interfaceIsEqual(f,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:g=f;$s=3;case 3:return g;case 2:$deferred.push([$methodVal(e[0],"decref"),[]]);h=M((function(c,d,e){return function $b(){var{h,i,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=A.Fchown(e[0].Sysfd,c[0],d[0]);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=2;case 2:return i;}return;}var $f={$blk:$b,$c:true,$r,h,i,$s};return $f;};})(c,d,e));$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$s=5;case 5:return i;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Fchown,$c:true,$r,c,d,e,f,g,h,i,$s,$deferred};return $f;}}};H.prototype.Fchown=function(c,d){return this.$val.Fchown(c,d);};H.ptr.prototype.Ftruncate=function(c){var{c,d,e,f,g,h,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];d=[d];d[0]=this;e=d[0].incref();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=e;$s=3;case 3:return f;case 2:$deferred.push([$methodVal(d[0],"decref"),[]]);g=M((function(c,d){return function $b(){var{g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:g=A.Ftruncate(d[0].Sysfd,c[0]);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=2;case 2:return h;}return;}var $f={$blk:$b,$c:true,$r,g,h,$s};return $f;};})(c,d));$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=5;case 5:return h;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Ftruncate,$c:true,$r,c,d,e,f,g,h,$s,$deferred};return $f;}}};H.prototype.Ftruncate=function(c){return this.$val.Ftruncate(c);};H.ptr.prototype.RawControl=function(c){var{c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{c});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);d=this;e=d.incref();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=e;$s=3;case 3:return f;case 2:$deferred.push([$methodVal(d,"decref"),[]]);$r=c(((d.Sysfd>>>0)));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=$ifaceNil;$s=5;case 5:return g;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.RawControl,$c:true,$r,c,d,e,f,g,$s,$deferred};return $f;}}};H.prototype.RawControl=function(c){return this.$val.RawControl(c);};M=function(c){var{c,d,e,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:case 1:d=c();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(!($interfaceIsEqual(e,new A.Errno(4)))){$s=-1;return e;}$s=1;continue;case 2:$s=-1;return $ifaceNil;}return;}var $f={$blk:M,$c:true,$r,c,d,e,$s};return $f;};N.ptr.prototype.init=function(c){var c,d;d=this;d.fd=c;return $ifaceNil;};N.prototype.init=function(c){return this.$val.init(c);};N.ptr.prototype.close=function(){var c;c=this;};N.prototype.close=function(){return this.$val.close();};N.ptr.prototype.evict=function(){var c;c=this;c.closing=true;if(!(c.fd===AB.nil)){A.StopIO(c.fd.Sysfd);}};N.prototype.evict=function(){return this.$val.evict();};N.ptr.prototype.prepare=function(c,d){var c,d,e;e=this;if(e.closing){return S(d);}return $ifaceNil;};N.prototype.prepare=function(c,d){return this.$val.prepare(c,d);};N.ptr.prototype.prepareRead=function(c){var c,d;d=this;return d.prepare(114,c);};N.prototype.prepareRead=function(c){return this.$val.prepareRead(c);};N.ptr.prototype.prepareWrite=function(c){var c,d;d=this;return d.prepare(119,c);};N.prototype.prepareWrite=function(c){return this.$val.prepareWrite(c);};N.ptr.prototype.wait=function(c,d){var c,d,e;e=this;if(e.closing){return S(d);}if(d){return $ifaceNil;}return $pkg.ErrDeadlineExceeded;};N.prototype.wait=function(c,d){return this.$val.wait(c,d);};N.ptr.prototype.waitRead=function(c){var c,d;d=this;return d.wait(114,c);};N.prototype.waitRead=function(c){return this.$val.waitRead(c);};N.ptr.prototype.waitWrite=function(c){var c,d;d=this;return d.wait(119,c);};N.prototype.waitWrite=function(c){return this.$val.waitWrite(c);};N.ptr.prototype.pollable=function(){var c;c=this;return true;};N.prototype.pollable=function(){return this.$val.pollable();};H.ptr.prototype.SetDeadline=function(c){var{c,d,e,f,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=O(d,$clone(c,E.Time),233);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=2;case 2:return f;}return;}var $f={$blk:H.ptr.prototype.SetDeadline,$c:true,$r,c,d,e,f,$s};return $f;};H.prototype.SetDeadline=function(c){return this.$val.SetDeadline(c);};H.ptr.prototype.SetReadDeadline=function(c){var{c,d,e,f,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=O(d,$clone(c,E.Time),114);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=2;case 2:return f;}return;}var $f={$blk:H.ptr.prototype.SetReadDeadline,$c:true,$r,c,d,e,f,$s};return $f;};H.prototype.SetReadDeadline=function(c){return this.$val.SetReadDeadline(c);};H.ptr.prototype.SetWriteDeadline=function(c){var{c,d,e,f,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=O(d,$clone(c,E.Time),119);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=2;case 2:return f;}return;}var $f={$blk:H.ptr.prototype.SetWriteDeadline,$c:true,$r,c,d,e,f,$s};return $f;};H.prototype.SetWriteDeadline=function(c){return this.$val.SetWriteDeadline(c);};O=function(c,d,e){var{c,d,e,f,g,h,i,$s,$r,$c}=$restore(this,{c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=$clone(d,E.Time).UnixNano();if($clone(d,E.Time).IsZero()){f=new $Int64(0,0);}g=c.incref();if(!($interfaceIsEqual(g,$ifaceNil))){$s=-1;return g;}h=e;if(h===(114)){A.SetReadDeadline(c.Sysfd,f);}else if(h===(119)){A.SetWriteDeadline(c.Sysfd,f);}else if(h===(233)){A.SetReadDeadline(c.Sysfd,f);A.SetWriteDeadline(c.Sysfd,f);}i=c.decref();$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=-1;return $ifaceNil;}return;}var $f={$blk:O,$c:true,$r,c,d,e,f,g,h,i,$s};return $f;};Q.ptr.prototype.incref=function(){var c,d,e,f,g;c=this;while(true){d=D.LoadUint64((c.$ptr_state||(c.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},c))));if(!((e=new $Uint64(d.$high&0,(d.$low&1)>>>0),(e.$high===0&&e.$low===0)))){return false;}f=new $Uint64(d.$high+0,d.$low+8);if((g=new $Uint64(f.$high&0,(f.$low&8388600)>>>0),(g.$high===0&&g.$low===0))){$panic(new $String("too many concurrent operations on a single file or socket (max 1048575)"));}if(D.CompareAndSwapUint64((c.$ptr_state||(c.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},c))),d,f)){return true;}}};Q.prototype.incref=function(){return this.$val.incref();};Q.ptr.prototype.increfAndClose=function(){var{c,d,e,f,g,h,i,j,k,l,m,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;case 1:d=D.LoadUint64((c.$ptr_state||(c.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},c))));if(!((e=new $Uint64(d.$high&0,(d.$low&1)>>>0),(e.$high===0&&e.$low===0)))){$s=-1;return false;}g=(f=new $Uint64(d.$high|0,(d.$low|1)>>>0),new $Uint64(f.$high+0,f.$low+8));if((h=new $Uint64(g.$high&0,(g.$low&8388600)>>>0),(h.$high===0&&h.$low===0))){$panic(new $String("too many concurrent operations on a single file or socket (max 1048575)"));}g=(i=new $Uint64(2147483647,4286578688),new $Uint64(g.$high&~i.$high,(g.$low&~i.$low)>>>0));if(D.CompareAndSwapUint64((c.$ptr_state||(c.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},c))),d,g)){$s=3;continue;}$s=4;continue;case 3:case 5:if(!(!((j=new $Uint64(d.$high&2047,(d.$low&4286578688)>>>0),(j.$high===0&&j.$low===0))))){$s=6;continue;}d=(k=new $Uint64(0,8388608),new $Uint64(d.$high-k.$high,d.$low-k.$low));$r=X((c.$ptr_rsema||(c.$ptr_rsema=new Z(function(){return this.$target.rsema;},function($v){this.$target.rsema=$v;},c))));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 6:case 8:if(!(!((l=new $Uint64(d.$high&2147481600,(d.$low&0)>>>0),(l.$high===0&&l.$low===0))))){$s=9;continue;}d=(m=new $Uint64(2048,0),new $Uint64(d.$high-m.$high,d.$low-m.$low));$r=X((c.$ptr_wsema||(c.$ptr_wsema=new Z(function(){return this.$target.wsema;},function($v){this.$target.wsema=$v;},c))));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=8;continue;case 9:$s=-1;return true;case 4:$s=1;continue;case 2:$s=-1;return false;}return;}var $f={$blk:Q.ptr.prototype.increfAndClose,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,$s};return $f;};Q.prototype.increfAndClose=function(){return this.$val.increfAndClose();};Q.ptr.prototype.decref=function(){var c,d,e,f,g;c=this;while(true){d=D.LoadUint64((c.$ptr_state||(c.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},c))));if((e=new $Uint64(d.$high&0,(d.$low&8388600)>>>0),(e.$high===0&&e.$low===0))){$panic(new $String("inconsistent poll.fdMutex"));}f=new $Uint64(d.$high-0,d.$low-8);if(D.CompareAndSwapUint64((c.$ptr_state||(c.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},c))),d,f)){return(g=new $Uint64(f.$high&0,(f.$low&8388601)>>>0),(g.$high===0&&g.$low===1));}}};Q.prototype.decref=function(){return this.$val.decref();};Q.ptr.prototype.rwlock=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=new $Uint64(0,0);f=new $Uint64(0,0);g=new $Uint64(0,0);h=e;i=f;j=g;k=Z.nil;if(c){h=new $Uint64(0,2);i=new $Uint64(0,8388608);j=new $Uint64(2047,4286578688);k=(d.$ptr_rsema||(d.$ptr_rsema=new Z(function(){return this.$target.rsema;},function($v){this.$target.rsema=$v;},d)));}else{h=new $Uint64(0,4);i=new $Uint64(2048,0);j=new $Uint64(2147481600,0);k=(d.$ptr_wsema||(d.$ptr_wsema=new Z(function(){return this.$target.wsema;},function($v){this.$target.wsema=$v;},d)));}case 1:l=D.LoadUint64((d.$ptr_state||(d.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},d))));if(!((m=new $Uint64(l.$high&0,(l.$low&1)>>>0),(m.$high===0&&m.$low===0)))){$s=-1;return false;}n=new $Uint64(0,0);if((o=new $Uint64(l.$high&h.$high,(l.$low&h.$low)>>>0),(o.$high===0&&o.$low===0))){n=(p=new $Uint64(l.$high|h.$high,(l.$low|h.$low)>>>0),new $Uint64(p.$high+0,p.$low+8));if((q=new $Uint64(n.$high&0,(n.$low&8388600)>>>0),(q.$high===0&&q.$low===0))){$panic(new $String("too many concurrent operations on a single file or socket (max 1048575)"));}}else{n=new $Uint64(l.$high+i.$high,l.$low+i.$low);if((r=new $Uint64(n.$high&j.$high,(n.$low&j.$low)>>>0),(r.$high===0&&r.$low===0))){$panic(new $String("too many concurrent operations on a single file or socket (max 1048575)"));}}if(D.CompareAndSwapUint64((d.$ptr_state||(d.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},d))),l,n)){$s=3;continue;}$s=4;continue;case 3:if((s=new $Uint64(l.$high&h.$high,(l.$low&h.$low)>>>0),(s.$high===0&&s.$low===0))){$s=-1;return true;}$r=W(k);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:$s=1;continue;case 2:$s=-1;return false;}return;}var $f={$blk:Q.ptr.prototype.rwlock,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};Q.prototype.rwlock=function(c){return this.$val.rwlock(c);};Q.ptr.prototype.rwunlock=function(c){var{c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=new $Uint64(0,0);f=new $Uint64(0,0);g=new $Uint64(0,0);h=e;i=f;j=g;k=Z.nil;if(c){h=new $Uint64(0,2);i=new $Uint64(0,8388608);j=new $Uint64(2047,4286578688);k=(d.$ptr_rsema||(d.$ptr_rsema=new Z(function(){return this.$target.rsema;},function($v){this.$target.rsema=$v;},d)));}else{h=new $Uint64(0,4);i=new $Uint64(2048,0);j=new $Uint64(2147481600,0);k=(d.$ptr_wsema||(d.$ptr_wsema=new Z(function(){return this.$target.wsema;},function($v){this.$target.wsema=$v;},d)));}case 1:l=D.LoadUint64((d.$ptr_state||(d.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},d))));if((m=new $Uint64(l.$high&h.$high,(l.$low&h.$low)>>>0),(m.$high===0&&m.$low===0))||(n=new $Uint64(l.$high&0,(l.$low&8388600)>>>0),(n.$high===0&&n.$low===0))){$panic(new $String("inconsistent poll.fdMutex"));}p=(o=new $Uint64(l.$high&~h.$high,(l.$low&~h.$low)>>>0),new $Uint64(o.$high-0,o.$low-8));if(!((q=new $Uint64(l.$high&j.$high,(l.$low&j.$low)>>>0),(q.$high===0&&q.$low===0)))){p=(r=i,new $Uint64(p.$high-r.$high,p.$low-r.$low));}if(D.CompareAndSwapUint64((d.$ptr_state||(d.$ptr_state=new AC(function(){return this.$target.state;},function($v){this.$target.state=$v;},d))),l,p)){$s=3;continue;}$s=4;continue;case 3:if(!((s=new $Uint64(l.$high&j.$high,(l.$low&j.$low)>>>0),(s.$high===0&&s.$low===0)))){$s=5;continue;}$s=6;continue;case 5:$r=X(k);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=-1;return(t=new $Uint64(p.$high&0,(p.$low&8388601)>>>0),(t.$high===0&&t.$low===1));case 4:$s=1;continue;case 2:$s=-1;return false;}return;}var $f={$blk:Q.ptr.prototype.rwunlock,$c:true,$r,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s};return $f;};Q.prototype.rwunlock=function(c){return this.$val.rwunlock(c);};H.ptr.prototype.incref=function(){var c;c=this;if(!c.fdmu.incref()){return S(c.isFile);}return $ifaceNil;};H.prototype.incref=function(){return this.$val.incref();};H.ptr.prototype.decref=function(){var{c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;if(c.fdmu.decref()){$s=1;continue;}$s=2;continue;case 1:d=c.destroy();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=4;case 4:return e;case 2:$s=-1;return $ifaceNil;}return;}var $f={$blk:H.ptr.prototype.decref,$c:true,$r,c,d,e,$s};return $f;};H.prototype.decref=function(){return this.$val.decref();};H.ptr.prototype.readLock=function(){var{c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=c.fdmu.rwlock(true);$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(!d){$s=1;continue;}$s=2;continue;case 1:$s=-1;return S(c.isFile);case 2:$s=-1;return $ifaceNil;}return;}var $f={$blk:H.ptr.prototype.readLock,$c:true,$r,c,d,$s};return $f;};H.prototype.readLock=function(){return this.$val.readLock();};H.ptr.prototype.readUnlock=function(){var{c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=c.fdmu.rwunlock(true);$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(d){$s=1;continue;}$s=2;continue;case 1:e=c.destroy();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;case 2:$s=-1;return;}return;}var $f={$blk:H.ptr.prototype.readUnlock,$c:true,$r,c,d,e,$s};return $f;};H.prototype.readUnlock=function(){return this.$val.readUnlock();};H.ptr.prototype.writeLock=function(){var{c,d,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=c.fdmu.rwlock(false);$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(!d){$s=1;continue;}$s=2;continue;case 1:$s=-1;return S(c.isFile);case 2:$s=-1;return $ifaceNil;}return;}var $f={$blk:H.ptr.prototype.writeLock,$c:true,$r,c,d,$s};return $f;};H.prototype.writeLock=function(){return this.$val.writeLock();};H.ptr.prototype.writeUnlock=function(){var{c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=c.fdmu.rwunlock(false);$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(d){$s=1;continue;}$s=2;continue;case 1:e=c.destroy();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;case 2:$s=-1;return;}return;}var $f={$blk:H.ptr.prototype.writeUnlock,$c:true,$r,c,d,e,$s};return $f;};H.prototype.writeUnlock=function(){return this.$val.writeUnlock();};H.ptr.prototype.Fsync=function(){var{c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];c[0]=this;d=c[0].incref();if(!($interfaceIsEqual(d,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:e=d;$s=3;case 3:return e;case 2:$deferred.push([$methodVal(c[0],"decref"),[]]);f=M((function(c){return function $b(){var{f,g,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:f=A.Fsync(c[0].Sysfd);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=2;case 2:return g;}return;}var $f={$blk:$b,$c:true,$r,f,g,$s};return $f;};})(c));$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;$s=5;case 5:return g;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:H.ptr.prototype.Fsync,$c:true,$r,c,d,e,f,g,$s,$deferred};return $f;}}};H.prototype.Fsync=function(){return this.$val.Fsync();};R.ptr.prototype.Error=function(){var c;c=this;return"use of closed network connection";};R.prototype.Error=function(){return this.$val.Error();};R.ptr.prototype.Timeout=function(){var c;c=this;return false;};R.prototype.Timeout=function(){return this.$val.Timeout();};R.ptr.prototype.Temporary=function(){var c;c=this;return false;};R.prototype.Temporary=function(){return this.$val.Temporary();};S=function(c){var c;if(c){return $pkg.ErrFileClosing;}return new $pkg.ErrNetClosing.constructor.elem($pkg.ErrNetClosing);};T.ptr.prototype.Error=function(){var c;c=this;return"i/o timeout";};T.prototype.Error=function(){return this.$val.Error();};T.ptr.prototype.Timeout=function(){var c;c=this;return true;};T.prototype.Timeout=function(){return this.$val.Timeout();};T.ptr.prototype.Temporary=function(){var c;c=this;return true;};T.prototype.Temporary=function(){return this.$val.Temporary();};V=function(c,d,e){var c,d,e;return[0,new A.Errno(38)];};W=function(){$throwRuntimeError("native function not implemented: internal/poll.runtime_Semacquire");};X=function(){$throwRuntimeError("native function not implemented: internal/poll.runtime_Semrelease");};AB.methods=[{prop:"Init",name:"Init",pkg:"",typ:$funcType([$String,$Bool],[$error],false)},{prop:"destroy",name:"destroy",pkg:"internal/poll",typ:$funcType([],[$error],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)},{prop:"SetBlocking",name:"SetBlocking",pkg:"",typ:$funcType([],[$error],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([AF],[$Int,$error],false)},{prop:"Pread",name:"Pread",pkg:"",typ:$funcType([AF,$Int64],[$Int,$error],false)},{prop:"ReadFrom",name:"ReadFrom",pkg:"",typ:$funcType([AF],[$Int,A.Sockaddr,$error],false)},{prop:"ReadFromInet4",name:"ReadFromInet4",pkg:"",typ:$funcType([AF,AG],[$Int,$error],false)},{prop:"ReadFromInet6",name:"ReadFromInet6",pkg:"",typ:$funcType([AF,AH],[$Int,$error],false)},{prop:"ReadMsg",name:"ReadMsg",pkg:"",typ:$funcType([AF,AF,$Int],[$Int,$Int,$Int,A.Sockaddr,$error],false)},{prop:"ReadMsgInet4",name:"ReadMsgInet4",pkg:"",typ:$funcType([AF,AF,$Int,AG],[$Int,$Int,$Int,$error],false)},{prop:"ReadMsgInet6",name:"ReadMsgInet6",pkg:"",typ:$funcType([AF,AF,$Int,AH],[$Int,$Int,$Int,$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([AF],[$Int,$error],false)},{prop:"Pwrite",name:"Pwrite",pkg:"",typ:$funcType([AF,$Int64],[$Int,$error],false)},{prop:"WriteToInet4",name:"WriteToInet4",pkg:"",typ:$funcType([AF,AG],[$Int,$error],false)},{prop:"WriteToInet6",name:"WriteToInet6",pkg:"",typ:$funcType([AF,AH],[$Int,$error],false)},{prop:"WriteTo",name:"WriteTo",pkg:"",typ:$funcType([AF,A.Sockaddr],[$Int,$error],false)},{prop:"WriteMsg",name:"WriteMsg",pkg:"",typ:$funcType([AF,AF,A.Sockaddr],[$Int,$Int,$error],false)},{prop:"WriteMsgInet4",name:"WriteMsgInet4",pkg:"",typ:$funcType([AF,AF,AG],[$Int,$Int,$error],false)},{prop:"WriteMsgInet6",name:"WriteMsgInet6",pkg:"",typ:$funcType([AF,AF,AH],[$Int,$Int,$error],false)},{prop:"Accept",name:"Accept",pkg:"",typ:$funcType([],[$Int,A.Sockaddr,$String,$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"ReadDirent",name:"ReadDirent",pkg:"",typ:$funcType([AF],[$Int,$error],false)},{prop:"Fchmod",name:"Fchmod",pkg:"",typ:$funcType([$Uint32],[$error],false)},{prop:"Fchdir",name:"Fchdir",pkg:"",typ:$funcType([],[$error],false)},{prop:"Fstat",name:"Fstat",pkg:"",typ:$funcType([AI],[$error],false)},{prop:"Dup",name:"Dup",pkg:"",typ:$funcType([],[$Int,$String,$error],false)},{prop:"WaitWrite",name:"WaitWrite",pkg:"",typ:$funcType([],[$error],false)},{prop:"WriteOnce",name:"WriteOnce",pkg:"",typ:$funcType([AF],[$Int,$error],false)},{prop:"RawRead",name:"RawRead",pkg:"",typ:$funcType([AJ],[$error],false)},{prop:"RawWrite",name:"RawWrite",pkg:"",typ:$funcType([AJ],[$error],false)},{prop:"eofError",name:"eofError",pkg:"internal/poll",typ:$funcType([$Int,$error],[$error],false)},{prop:"Shutdown",name:"Shutdown",pkg:"",typ:$funcType([$Int],[$error],false)},{prop:"Fchown",name:"Fchown",pkg:"",typ:$funcType([$Int,$Int],[$error],false)},{prop:"Ftruncate",name:"Ftruncate",pkg:"",typ:$funcType([$Int64],[$error],false)},{prop:"RawControl",name:"RawControl",pkg:"",typ:$funcType([AK],[$error],false)},{prop:"SetDeadline",name:"SetDeadline",pkg:"",typ:$funcType([E.Time],[$error],false)},{prop:"SetReadDeadline",name:"SetReadDeadline",pkg:"",typ:$funcType([E.Time],[$error],false)},{prop:"SetWriteDeadline",name:"SetWriteDeadline",pkg:"",typ:$funcType([E.Time],[$error],false)},{prop:"incref",name:"incref",pkg:"internal/poll",typ:$funcType([],[$error],false)},{prop:"decref",name:"decref",pkg:"internal/poll",typ:$funcType([],[$error],false)},{prop:"readLock",name:"readLock",pkg:"internal/poll",typ:$funcType([],[$error],false)},{prop:"readUnlock",name:"readUnlock",pkg:"internal/poll",typ:$funcType([],[],false)},{prop:"writeLock",name:"writeLock",pkg:"internal/poll",typ:$funcType([],[$error],false)},{prop:"writeUnlock",name:"writeUnlock",pkg:"internal/poll",typ:$funcType([],[],false)},{prop:"Fsync",name:"Fsync",pkg:"",typ:$funcType([],[$error],false)}];AL.methods=[{prop:"init",name:"init",pkg:"internal/poll",typ:$funcType([AB],[$error],false)},{prop:"close",name:"close",pkg:"internal/poll",typ:$funcType([],[],false)},{prop:"evict",name:"evict",pkg:"internal/poll",typ:$funcType([],[],false)},{prop:"prepare",name:"prepare",pkg:"internal/poll",typ:$funcType([$Int,$Bool],[$error],false)},{prop:"prepareRead",name:"prepareRead",pkg:"internal/poll",typ:$funcType([$Bool],[$error],false)},{prop:"prepareWrite",name:"prepareWrite",pkg:"internal/poll",typ:$funcType([$Bool],[$error],false)},{prop:"wait",name:"wait",pkg:"internal/poll",typ:$funcType([$Int,$Bool],[$error],false)},{prop:"waitRead",name:"waitRead",pkg:"internal/poll",typ:$funcType([$Bool],[$error],false)},{prop:"waitWrite",name:"waitWrite",pkg:"internal/poll",typ:$funcType([$Bool],[$error],false)},{prop:"waitCanceled",name:"waitCanceled",pkg:"internal/poll",typ:$funcType([$Int],[],false)},{prop:"pollable",name:"pollable",pkg:"internal/poll",typ:$funcType([],[$Bool],false)}];AM.methods=[{prop:"incref",name:"incref",pkg:"internal/poll",typ:$funcType([],[$Bool],false)},{prop:"increfAndClose",name:"increfAndClose",pkg:"internal/poll",typ:$funcType([],[$Bool],false)},{prop:"decref",name:"decref",pkg:"internal/poll",typ:$funcType([],[$Bool],false)},{prop:"rwlock",name:"rwlock",pkg:"internal/poll",typ:$funcType([$Bool],[$Bool],false)},{prop:"rwunlock",name:"rwunlock",pkg:"internal/poll",typ:$funcType([$Bool],[$Bool],false)}];R.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)}];AN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)}];H.init("internal/poll",[{prop:"fdmu",name:"fdmu",embedded:false,exported:false,typ:Q,tag:""},{prop:"Sysfd",name:"Sysfd",embedded:false,exported:true,typ:$Int,tag:""},{prop:"pd",name:"pd",embedded:false,exported:false,typ:N,tag:""},{prop:"iovecs",name:"iovecs",embedded:false,exported:false,typ:AE,tag:""},{prop:"csema",name:"csema",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"isBlocking",name:"isBlocking",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"IsStream",name:"IsStream",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"ZeroReadIsEOF",name:"ZeroReadIsEOF",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"isFile",name:"isFile",embedded:false,exported:false,typ:$Bool,tag:""}]);N.init("internal/poll",[{prop:"fd",name:"fd",embedded:false,exported:false,typ:AB,tag:""},{prop:"closing",name:"closing",embedded:false,exported:false,typ:$Bool,tag:""}]);Q.init("internal/poll",[{prop:"state",name:"state",embedded:false,exported:false,typ:$Uint64,tag:""},{prop:"rsema",name:"rsema",embedded:false,exported:false,typ:$Uint32,tag:""},{prop:"wsema",name:"wsema",embedded:false,exported:false,typ:$Uint32,tag:""}]);R.init("",[]);T.init("",[]);$pkg.$initLinknames=function(){W=$linknames["sync.runtime_Semacquire"];X=$linknames["sync.runtime_Semrelease"];};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=F.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.CloseFunc=A.Close;$pkg.AcceptFunc=A.Accept;I=1;$pkg.ErrNetClosing=new R.ptr();$pkg.ErrFileClosing=F.New("use of closed file");$pkg.ErrNoDeadline=F.New("file type does not support deadline");$pkg.ErrDeadlineExceeded=new T.ptr();$pkg.ErrNotPollable=F.New("not pollable");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/syscall/execenv"]=(function(){var $pkg={},$init,A;A=$packages["syscall"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["internal/testlog"]=(function(){var $pkg={},$init,B,A,C,N,D,F,I;B=$packages["sync"];A=$packages["sync/atomic"];C=$pkg.Interface=$newType(8,$kindInterface,"testlog.Interface",true,"internal/testlog",true,null);N=$ptrType(C);F=function(){var a;a=D.Load();if($interfaceIsEqual(a,$ifaceNil)){return $ifaceNil;}return $assertType(a,N).$get();};$pkg.Logger=F;I=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=F();if(!($interfaceIsEqual(b,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=b.Stat(a);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:I,$c:true,$r,a,b,$s};return $f;};$pkg.Stat=I;C.init([{prop:"Chdir",name:"Chdir",pkg:"",typ:$funcType([$String],[],false)},{prop:"Getenv",name:"Getenv",pkg:"",typ:$funcType([$String],[],false)},{prop:"Open",name:"Open",pkg:"",typ:$funcType([$String],[],false)},{prop:"Stat",name:"Stat",pkg:"",typ:$funcType([$String],[],false)}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}D=new A.Value.ptr($ifaceNil);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["path"]=(function(){var $pkg={},$init,A,B,C;A=$packages["errors"];B=$packages["internal/bytealg"];C=$packages["unicode/utf8"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrBadPattern=A.New("syntax error in pattern");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["io/fs"]=(function(){var $pkg={},$init,A,E,C,B,D,F,G,AF,AM,AN,AO,AQ,AS,AT,AU,AH,AI,AJ,AK,AL;A=$packages["errors"];E=$packages["internal/oserror"];C=$packages["io"];B=$packages["path"];D=$packages["sort"];F=$packages["time"];G=$packages["unicode/utf8"];AF=$pkg.DirEntry=$newType(8,$kindInterface,"fs.DirEntry",true,"io/fs",true,null);AM=$pkg.FileInfo=$newType(8,$kindInterface,"fs.FileInfo",true,"io/fs",true,null);AN=$pkg.FileMode=$newType(4,$kindUint32,"fs.FileMode",true,"io/fs",true,null);AO=$pkg.PathError=$newType(0,$kindStruct,"fs.PathError",true,"io/fs",true,function(Op_,Path_,Err_){this.$val=this;if(arguments.length===0){this.Op="";this.Path="";this.Err=$ifaceNil;return;}this.Op=Op_;this.Path=Path_;this.Err=Err_;});AQ=$ptrType(AO);AS=$sliceType($Uint8);AT=$arrayType($Uint8,32);AU=$interfaceType([{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}]);AH=function(){return E.ErrInvalid;};AI=function(){return E.ErrPermission;};AJ=function(){return E.ErrExist;};AK=function(){return E.ErrNotExist;};AL=function(){return E.ErrClosed;};AN.prototype.String=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;a=this.$val;b=AT.zero();c=0;d="dalTLDpSugct?";e=0;while(true){if(!(e>0)>>>0)),i<32?(1<>>0)))>>>0)===0))){((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=((h<<24>>>24)));c=c+(1)>>0;}e+=f[1];}if(c===0){((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=45);c=c+(1)>>0;}j="rwxrwxrwx";k=0;while(true){if(!(k>0)>>>0)),o<32?(1<>>0)))>>>0)===0))){((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=((n<<24>>>24)));}else{((c<0||c>=b.length)?($throwRuntimeError("index out of range"),undefined):b[c]=45);}c=c+(1)>>0;k+=l[1];}return($bytesToString($subslice(new AS(b),0,c)));};$ptrType(AN).prototype.String=function(){return new AN(this.$get()).String();};AN.prototype.IsDir=function(){var a;a=this.$val;return!((((a&2147483648)>>>0)===0));};$ptrType(AN).prototype.IsDir=function(){return new AN(this.$get()).IsDir();};AN.prototype.IsRegular=function(){var a;a=this.$val;return((a&2401763328)>>>0)===0;};$ptrType(AN).prototype.IsRegular=function(){return new AN(this.$get()).IsRegular();};AN.prototype.Perm=function(){var a;a=this.$val;return(a&511)>>>0;};$ptrType(AN).prototype.Perm=function(){return new AN(this.$get()).Perm();};AN.prototype.Type=function(){var a;a=this.$val;return(a&2401763328)>>>0;};$ptrType(AN).prototype.Type=function(){return new AN(this.$get()).Type();};AO.ptr.prototype.Error=function(){var{a,b,c,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.Err.Error();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=a.Op+" "+a.Path+": "+b;$s=2;case 2:return c;}return;}var $f={$blk:AO.ptr.prototype.Error,$c:true,$r,a,b,c,$s};return $f;};AO.prototype.Error=function(){return this.$val.Error();};AO.ptr.prototype.Unwrap=function(){var a;a=this;return a.Err;};AO.prototype.Unwrap=function(){return this.$val.Unwrap();};AO.ptr.prototype.Timeout=function(){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=$assertType(a.Err,AU,true);c=b[0];d=b[1];if(!(d)){e=false;$s=1;continue s;}f=c.Timeout();$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;case 1:g=e;$s=3;case 3:return g;}return;}var $f={$blk:AO.ptr.prototype.Timeout,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};AO.prototype.Timeout=function(){return this.$val.Timeout();};AN.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsRegular",name:"IsRegular",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([],[AN],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AN],false)}];AQ.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Unwrap",name:"Unwrap",pkg:"",typ:$funcType([],[$error],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];AF.init([{prop:"Info",name:"Info",pkg:"",typ:$funcType([],[AM,$error],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AN],false)}]);AM.init([{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[F.Time],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[AN],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}]);AO.init("",[{prop:"Op",name:"Op",embedded:false,exported:true,typ:$String,tag:""},{prop:"Path",name:"Path",embedded:false,exported:true,typ:$String,tag:""},{prop:"Err",name:"Err",embedded:false,exported:true,typ:$error,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.SkipDir=A.New("skip this directory");$pkg.ErrInvalid=AH();$pkg.ErrPermission=AI();$pkg.ErrExist=AJ();$pkg.ErrNotExist=AK();$pkg.ErrClosed=AL();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["os"]=(function(){var $pkg={},$init,D,Q,E,O,J,M,K,F,L,G,C,H,P,I,N,A,B,R,U,AR,BM,BY,CH,CJ,DX,DZ,EW,FB,FK,FM,FN,FO,FP,FQ,FS,FU,FX,FY,FZ,GA,GB,GC,GO,GP,GQ,GR,GS,GT,GU,GV,AA,CK,CR,EX,FD,e,f,g,AK,AL,AM,AP,AS,AT,BC,BN,BP,BQ,BZ,CA,CB,CG,CI,DV,DW,EC,EF,EG,ES,ET,EU,EV,EY,EZ,FA,FF,FG;D=$packages["errors"];Q=$packages["github.com/gopherjs/gopherjs/js"];E=$packages["internal/itoa"];O=$packages["internal/oserror"];J=$packages["internal/poll"];M=$packages["internal/syscall/execenv"];K=$packages["internal/syscall/unix"];F=$packages["internal/testlog"];L=$packages["internal/unsafeheader"];G=$packages["io"];C=$packages["io/fs"];H=$packages["runtime"];P=$packages["sort"];I=$packages["sync"];N=$packages["sync/atomic"];A=$packages["syscall"];B=$packages["time"];R=$pkg.fileStat=$newType(0,$kindStruct,"os.fileStat",true,"os",false,function(name_,size_,mode_,modTime_,sys_){this.$val=this;if(arguments.length===0){this.name="";this.size=new $Int64(0,0);this.mode=0;this.modTime=new B.Time.ptr(new $Uint64(0,0),new $Int64(0,0),FS.nil);this.sys=new A.Stat_t.ptr(new $Int64(0,0),new $Uint64(0,0),0,0,0,0,new $Int64(0,0),new $Int64(0,0),0,0,new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0));return;}this.name=name_;this.size=size_;this.mode=mode_;this.modTime=modTime_;this.sys=sys_;});U=$pkg.File=$newType(0,$kindStruct,"os.File",true,"os",true,function(file_){this.$val=this;if(arguments.length===0){this.file=GB.nil;return;}this.file=file_;});AR=$pkg.rawConn=$newType(0,$kindStruct,"os.rawConn",true,"os",false,function(file_){this.$val=this;if(arguments.length===0){this.file=FQ.nil;return;}this.file=file_;});BM=$pkg.file=$newType(0,$kindStruct,"os.file",true,"os",false,function(pfd_,name_,dirinfo_,nonblock_,stdoutOrErr_,appendMode_){this.$val=this;if(arguments.length===0){this.pfd=new J.FD.ptr(new J.fdMutex.ptr(new $Uint64(0,0),0,0),0,new J.pollDesc.ptr(FX.nil,false),FZ.nil,0,0,false,false,false);this.name="";this.dirinfo=GA.nil;this.nonblock=false;this.stdoutOrErr=false;this.appendMode=false;return;}this.pfd=pfd_;this.name=name_;this.dirinfo=dirinfo_;this.nonblock=nonblock_;this.stdoutOrErr=stdoutOrErr_;this.appendMode=appendMode_;});BY=$pkg.unixDirent=$newType(0,$kindStruct,"os.unixDirent",true,"os",false,function(parent_,name_,typ_,info_){this.$val=this;if(arguments.length===0){this.parent="";this.name="";this.typ=0;this.info=$ifaceNil;return;}this.parent=parent_;this.name=name_;this.typ=typ_;this.info=info_;});CH=$pkg.LinkError=$newType(0,$kindStruct,"os.LinkError",true,"os",true,function(Op_,Old_,New_,Err_){this.$val=this;if(arguments.length===0){this.Op="";this.Old="";this.New="";this.Err=$ifaceNil;return;}this.Op=Op_;this.Old=Old_;this.New=New_;this.Err=Err_;});CJ=$pkg.onlyWriter=$newType(0,$kindStruct,"os.onlyWriter",true,"os",false,function(Writer_){this.$val=this;if(arguments.length===0){this.Writer=$ifaceNil;return;}this.Writer=Writer_;});DX=$pkg.timeout=$newType(8,$kindInterface,"os.timeout",true,"os",false,null);DZ=$pkg.SyscallError=$newType(0,$kindStruct,"os.SyscallError",true,"os",true,function(Syscall_,Err_){this.$val=this;if(arguments.length===0){this.Syscall="";this.Err=$ifaceNil;return;}this.Syscall=Syscall_;this.Err=Err_;});EW=$pkg.dirInfo=$newType(0,$kindStruct,"os.dirInfo",true,"os",false,function(buf_,nbuf_,bufp_){this.$val=this;if(arguments.length===0){this.buf=FO.nil;this.nbuf=0;this.bufp=0;return;}this.buf=buf_;this.nbuf=nbuf_;this.bufp=bufp_;});FB=$pkg.readdirMode=$newType(4,$kindInt,"os.readdirMode",true,"os",false,null);FK=$sliceType($String);FM=$sliceType($emptyInterface);FN=$sliceType($Uint8);FO=$ptrType(FN);FP=$ptrType(R);FQ=$ptrType(U);FS=$ptrType(B.Location);FU=$ptrType(C.PathError);FX=$ptrType(J.FD);FY=$sliceType(A.Iovec);FZ=$ptrType(FY);GA=$ptrType(EW);GB=$ptrType(BM);GC=$funcType([GB],[$error],false);GO=$ptrType(CH);GP=$ptrType(DZ);GQ=$sliceType(C.DirEntry);GR=$sliceType(C.FileInfo);GS=$funcType([$Uintptr],[],false);GT=$funcType([$Uintptr],[$Bool],false);GU=$ptrType(AR);GV=$ptrType(BY);R.ptr.prototype.Size=function(){var h;h=this;return h.size;};R.prototype.Size=function(){return this.$val.Size();};R.ptr.prototype.Mode=function(){var h;h=this;return h.mode;};R.prototype.Mode=function(){return this.$val.Mode();};R.ptr.prototype.ModTime=function(){var h;h=this;return h.modTime;};R.prototype.ModTime=function(){return this.$val.ModTime();};R.ptr.prototype.Sys=function(){var h;h=this;return h.sys;};R.prototype.Sys=function(){return this.$val.Sys();};R.ptr.prototype.Name=function(){var h;h=this;return h.name;};R.prototype.Name=function(){return this.$val.Name();};R.ptr.prototype.IsDir=function(){var h;h=this;return new C.FileMode(h.Mode()).IsDir();};R.prototype.IsDir=function(){return this.$val.IsDir();};U.ptr.prototype.Stat=function(){var{h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=[h];i=this;if(i===FQ.nil){$s=-1;return[$ifaceNil,$pkg.ErrInvalid];}h[0]=new R.ptr("",new $Int64(0,0),0,new B.Time.ptr(new $Uint64(0,0),new $Int64(0,0),FS.nil),new A.Stat_t.ptr(new $Int64(0,0),new $Uint64(0,0),0,0,0,0,new $Int64(0,0),new $Int64(0,0),0,0,new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0)));j=i.file.pfd.Fstat(h[0].sys);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!($interfaceIsEqual(k,$ifaceNil))){$s=-1;return[$ifaceNil,new C.PathError.ptr("stat",i.file.name,k)];}AL(h[0],i.file.name);$s=-1;return[h[0],$ifaceNil];}return;}var $f={$blk:U.ptr.prototype.Stat,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.Stat=function(){return this.$val.Stat();};AK=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:h=[h];i=[i];i[0]=new R.ptr("",new $Int64(0,0),0,new B.Time.ptr(new $Uint64(0,0),new $Int64(0,0),FS.nil),new A.Stat_t.ptr(new $Int64(0,0),new $Uint64(0,0),0,0,0,0,new $Int64(0,0),new $Int64(0,0),0,0,new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0)));j=CG((function(h,i){return function $b(){var{j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:j=A.Lstat(h[0],i[0].sys);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=2;case 2:return k;}return;}var $f={$blk:$b,$c:true,$r,j,k,$s};return $f;};})(h,i));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!($interfaceIsEqual(k,$ifaceNil))){$s=-1;return[$ifaceNil,new C.PathError.ptr("lstat",h[0],k)];}AL(i[0],h[0]);$s=-1;return[i[0],$ifaceNil];}return;}var $f={$blk:AK,$c:true,$r,h,i,j,k,$s};return $f;};AL=function(h,i){var h,i,j;h.name=BC(i);h.size=h.sys.Size;B.Time.copy(h.modTime,AM(h.sys.Mtime,h.sys.MtimeNsec));h.mode=((((h.sys.Mode&511)>>>0)>>>0));j=(h.sys.Mode&126976)>>>0;if(j===(24576)){h.mode=(h.mode|(67108864))>>>0;}else if(j===(8192)){h.mode=(h.mode|(69206016))>>>0;}else if(j===(16384)){h.mode=(h.mode|(2147483648))>>>0;}else if(j===(4096)){h.mode=(h.mode|(33554432))>>>0;}else if(j===(40960)){h.mode=(h.mode|(134217728))>>>0;}else if(j===(32768)){}else if(j===(49152)){h.mode=(h.mode|(16777216))>>>0;}if(!((((h.sys.Mode&1024)>>>0)===0))){h.mode=(h.mode|(4194304))>>>0;}if(!((((h.sys.Mode&2048)>>>0)===0))){h.mode=(h.mode|(8388608))>>>0;}if(!((((h.sys.Mode&512)>>>0)===0))){h.mode=(h.mode|(1048576))>>>0;}};AM=function(h,i){var h,i;return B.Unix(h,i);};AP=function(h){var{h,i,j,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:$r=F.Stat(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=AK(h);$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=3;case 3:return j;}return;}var $f={$blk:AP,$c:true,$r,h,i,j,$s};return $f;};$pkg.Lstat=AP;U.ptr.prototype.readFrom=function(h){var h,i,j,k,l,m,n,o;i=new $Int64(0,0);j=false;k=$ifaceNil;l=this;m=new $Int64(0,0);n=false;o=$ifaceNil;i=m;j=n;k=o;return[i,j,k];};U.prototype.readFrom=function(h){return this.$val.readFrom(h);};AR.ptr.prototype.Control=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.file.checkValid("SyscallConn.Control");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.file.pfd.RawControl(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;H.KeepAlive(i.file);$s=-1;return l;}return;}var $f={$blk:AR.ptr.prototype.Control,$c:true,$r,h,i,j,k,l,$s};return $f;};AR.prototype.Control=function(h){return this.$val.Control(h);};AR.ptr.prototype.Read=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.file.checkValid("SyscallConn.Read");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.file.pfd.RawRead(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;H.KeepAlive(i.file);$s=-1;return l;}return;}var $f={$blk:AR.ptr.prototype.Read,$c:true,$r,h,i,j,k,l,$s};return $f;};AR.prototype.Read=function(h){return this.$val.Read(h);};AR.ptr.prototype.Write=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.file.checkValid("SyscallConn.Write");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.file.pfd.RawWrite(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;H.KeepAlive(i.file);$s=-1;return l;}return;}var $f={$blk:AR.ptr.prototype.Write,$c:true,$r,h,i,j,k,l,$s};return $f;};AR.prototype.Write=function(h){return this.$val.Write(h);};AS=function(h){var h;return[new AR.ptr(h),$ifaceNil];};AT=function(){if(false){return;}$pkg.Args=FF();};BC=function(h){var h,i;i=h.length-1>>0;while(true){if(!(i>0&&(h.charCodeAt(i)===47))){break;}h=$substring(h,0,i);i=i-(1)>>0;}i=i-(1)>>0;while(true){if(!(i>=0)){break;}if(h.charCodeAt(i)===47){h=$substring(h,(i+1>>0));break;}i=i-(1)>>0;}return h;};U.ptr.prototype.Fd=function(){var{h,i,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;if(h===FQ.nil){$s=-1;return 4294967295;}if(h.file.nonblock){$s=1;continue;}$s=2;continue;case 1:i=h.file.pfd.SetBlocking();$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;case 2:$s=-1;return((h.file.pfd.Sysfd>>>0));}return;}var $f={$blk:U.ptr.prototype.Fd,$c:true,$r,h,i,$s};return $f;};U.prototype.Fd=function(){return this.$val.Fd();};BN=function(h,i){var{h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=0;k=K.IsNonblock(((h>>0)));l=k[0];m=k[1];if($interfaceIsEqual(m,$ifaceNil)&&l){j=3;}n=BP(h,i,j);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=2;case 2:return o;}return;}var $f={$blk:BN,$c:true,$r,h,i,j,k,l,m,n,o,$s};return $f;};$pkg.NewFile=BN;BP=function(h,i,j){var{h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{h,i,j});$s=$s||0;s:while(true){switch($s){case 0:k=[k];l=[l];k[0]=((h>>0));if(k[0]<0){$s=-1;return FQ.nil;}m=new U.ptr(new BM.ptr(new J.FD.ptr(new J.fdMutex.ptr(new $Uint64(0,0),0,0),k[0],new J.pollDesc.ptr(FX.nil,false),FZ.nil,0,0,true,true,false),i,GA.nil,false,(k[0]===1)||(k[0]===2),false));n=(j===1)||(j===2)||(j===3);if(j===1){$s=1;continue;}$s=2;continue;case 1:o="js";if(o===("darwin")||o===("ios")||o===("dragonfly")||o===("freebsd")||o===("netbsd")||o===("openbsd")){$s=4;continue;}$s=5;continue;case 4:l[0]=new A.Stat_t.ptr(new $Int64(0,0),new $Uint64(0,0),0,0,0,0,new $Int64(0,0),new $Int64(0,0),0,0,new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0),new $Int64(0,0));p=CG((function(k,l){return function $b(){var{p,q,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:p=A.Fstat(k[0],l[0]);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:$b,$c:true,$r,p,q,$s};return $f;};})(k,l));$s=6;case 6:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;r=(l[0].Mode&126976)>>>0;if($interfaceIsEqual(q,$ifaceNil)&&((r===32768)||(r===16384))){n=false;}if(false&&(r===4096)){n=false;}case 5:case 3:case 2:s=m.file.pfd.Init("file",n);if(!($interfaceIsEqual(s,$ifaceNil))){}else if(n){t=A.SetNonblock(k[0],true);if($interfaceIsEqual(t,$ifaceNil)){m.file.nonblock=true;}}H.SetFinalizer(m.file,new GC($methodExpr(GB,"close")));$s=-1;return m;}return;}var $f={$blk:BP,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,t,$s};return $f;};BQ=function(h,i){var{h,i,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:if($interfaceIsEqual(i,new A.Errno(32))&&h.file.stdoutOrErr){$s=1;continue;}$s=2;continue;case 1:$r=CA();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:BQ,$c:true,$r,h,i,$s};return $f;};BM.ptr.prototype.close=function(){var{h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;if(h===GB.nil){$s=-1;return new A.Errno(22);}if(!(h.dirinfo===GA.nil)){h.dirinfo.close();h.dirinfo=GA.nil;}i=$ifaceNil;j=h.pfd.Close();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!($interfaceIsEqual(k,$ifaceNil))){if($interfaceIsEqual(k,J.ErrFileClosing)){k=$pkg.ErrClosed;}i=new C.PathError.ptr("close",h.name,k);}H.SetFinalizer(h,$ifaceNil);$s=-1;return i;}return;}var $f={$blk:BM.ptr.prototype.close,$c:true,$r,h,i,j,k,$s};return $f;};BM.prototype.close=function(){return this.$val.close();};U.ptr.prototype.seek=function(h,i){var{h,i,j,k,l,m,n,o,p,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=new $Int64(0,0);k=$ifaceNil;l=this;if(!(l.file.dirinfo===GA.nil)){l.file.dirinfo.close();l.file.dirinfo=GA.nil;}n=l.file.pfd.Seek(h,i);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;j=m[0];k=m[1];H.KeepAlive(l);o=j;p=k;j=o;k=p;$s=-1;return[j,k];}return;}var $f={$blk:U.ptr.prototype.seek,$c:true,$r,h,i,j,k,l,m,n,o,p,$s};return $f;};U.prototype.seek=function(h,i){return this.$val.seek(h,i);};BY.ptr.prototype.Name=function(){var h;h=this;return h.name;};BY.prototype.Name=function(){return this.$val.Name();};BY.ptr.prototype.IsDir=function(){var h;h=this;return new C.FileMode(h.typ).IsDir();};BY.prototype.IsDir=function(){return this.$val.IsDir();};BY.ptr.prototype.Type=function(){var h;h=this;return h.typ;};BY.prototype.Type=function(){return this.$val.Type();};BY.ptr.prototype.Info=function(){var{h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;if(!($interfaceIsEqual(h.info,$ifaceNil))){$s=-1;return[h.info,$ifaceNil];}i=CR(h.parent+"/"+h.name);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=2;case 2:return j;}return;}var $f={$blk:BY.ptr.prototype.Info,$c:true,$r,h,i,j,$s};return $f;};BY.prototype.Info=function(){return this.$val.Info();};BZ=function(h,i,j){var{h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{h,i,j});$s=$s||0;s:while(true){switch($s){case 0:k=new BY.ptr(h,i,j,$ifaceNil);if(!((j===4294967295))&&!FD){$s=-1;return[k,$ifaceNil];}m=CR(h+"/"+i);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;n=l[0];o=l[1];if(!($interfaceIsEqual(o,$ifaceNil))){$s=-1;return[$ifaceNil,o];}p=n.Mode();$s=2;case 2:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=new C.FileMode(p).Type();$s=3;case 3:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}k.typ=q;k.info=n;$s=-1;return[k,$ifaceNil];}return;}var $f={$blk:BZ,$c:true,$r,h,i,j,k,l,m,n,o,p,q,$s};return $f;};CA=function(){$throwRuntimeError("native function not implemented: os.sigpipe");};U.ptr.prototype.Close=function(){var{h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;if(h===FQ.nil){$s=-1;return $pkg.ErrInvalid;}i=h.file.close();$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;$s=2;case 2:return j;}return;}var $f={$blk:U.ptr.prototype.Close,$c:true,$r,h,i,j,$s};return $f;};U.prototype.Close=function(){return this.$val.Close();};U.ptr.prototype.read=function(h){var{h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=0;j=$ifaceNil;k=this;m=k.file.pfd.Read(h);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;i=l[0];j=l[1];H.KeepAlive(k);n=i;o=j;i=n;j=o;$s=-1;return[i,j];}return;}var $f={$blk:U.ptr.prototype.read,$c:true,$r,h,i,j,k,l,m,n,o,$s};return $f;};U.prototype.read=function(h){return this.$val.read(h);};U.ptr.prototype.pread=function(h,i){var{h,i,j,k,l,m,n,o,p,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=0;k=$ifaceNil;l=this;n=l.file.pfd.Pread(h,i);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;j=m[0];k=m[1];H.KeepAlive(l);o=j;p=k;j=o;k=p;$s=-1;return[j,k];}return;}var $f={$blk:U.ptr.prototype.pread,$c:true,$r,h,i,j,k,l,m,n,o,p,$s};return $f;};U.prototype.pread=function(h,i){return this.$val.pread(h,i);};U.ptr.prototype.write=function(h){var{h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=0;j=$ifaceNil;k=this;m=k.file.pfd.Write(h);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;i=l[0];j=l[1];H.KeepAlive(k);n=i;o=j;i=n;j=o;$s=-1;return[i,j];}return;}var $f={$blk:U.ptr.prototype.write,$c:true,$r,h,i,j,k,l,m,n,o,$s};return $f;};U.prototype.write=function(h){return this.$val.write(h);};U.ptr.prototype.pwrite=function(h,i){var{h,i,j,k,l,m,n,o,p,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=0;k=$ifaceNil;l=this;n=l.file.pfd.Pwrite(h,i);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;j=m[0];k=m[1];H.KeepAlive(l);o=j;p=k;j=o;k=p;$s=-1;return[j,k];}return;}var $f={$blk:U.ptr.prototype.pwrite,$c:true,$r,h,i,j,k,l,m,n,o,p,$s};return $f;};U.prototype.pwrite=function(h,i){return this.$val.pwrite(h,i);};CB=function(h){var h,i;i=0;i=(i|(((new C.FileMode(h).Perm()>>>0))))>>>0;if(!((((h&8388608)>>>0)===0))){i=(i|(2048))>>>0;}if(!((((h&4194304)>>>0)===0))){i=(i|(1024))>>>0;}if(!((((h&1048576)>>>0)===0))){i=(i|(512))>>>0;}return i;};U.ptr.prototype.chmod=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.checkValid("chmod");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.pfd.Fchmod(CB(h));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!($interfaceIsEqual(l,$ifaceNil))){$s=-1;return i.wrapErr("chmod",l);}$s=-1;return $ifaceNil;}return;}var $f={$blk:U.ptr.prototype.chmod,$c:true,$r,h,i,j,k,l,$s};return $f;};U.prototype.chmod=function(h){return this.$val.chmod(h);};U.ptr.prototype.Chown=function(h,i){var{h,i,j,k,l,m,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=this;k=j.checkValid("chown");if(!($interfaceIsEqual(k,$ifaceNil))){$s=-1;return k;}l=j.file.pfd.Fchown(h,i);$s=1;case 1:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(!($interfaceIsEqual(m,$ifaceNil))){$s=-1;return j.wrapErr("chown",m);}$s=-1;return $ifaceNil;}return;}var $f={$blk:U.ptr.prototype.Chown,$c:true,$r,h,i,j,k,l,m,$s};return $f;};U.prototype.Chown=function(h,i){return this.$val.Chown(h,i);};U.ptr.prototype.Truncate=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.checkValid("truncate");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.pfd.Ftruncate(h);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!($interfaceIsEqual(l,$ifaceNil))){$s=-1;return i.wrapErr("truncate",l);}$s=-1;return $ifaceNil;}return;}var $f={$blk:U.ptr.prototype.Truncate,$c:true,$r,h,i,j,k,l,$s};return $f;};U.prototype.Truncate=function(h){return this.$val.Truncate(h);};U.ptr.prototype.Sync=function(){var{h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;i=h.checkValid("sync");if(!($interfaceIsEqual(i,$ifaceNil))){$s=-1;return i;}j=h.file.pfd.Fsync();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!($interfaceIsEqual(k,$ifaceNil))){$s=-1;return h.wrapErr("sync",k);}$s=-1;return $ifaceNil;}return;}var $f={$blk:U.ptr.prototype.Sync,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.Sync=function(){return this.$val.Sync();};U.ptr.prototype.Chdir=function(){var{h,i,j,k,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;i=h.checkValid("chdir");if(!($interfaceIsEqual(i,$ifaceNil))){$s=-1;return i;}j=h.file.pfd.Fchdir();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!($interfaceIsEqual(k,$ifaceNil))){$s=-1;return h.wrapErr("chdir",k);}$s=-1;return $ifaceNil;}return;}var $f={$blk:U.ptr.prototype.Chdir,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.Chdir=function(){return this.$val.Chdir();};U.ptr.prototype.setDeadline=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.checkValid("SetDeadline");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.pfd.SetDeadline($clone(h,B.Time));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;$s=2;case 2:return l;}return;}var $f={$blk:U.ptr.prototype.setDeadline,$c:true,$r,h,i,j,k,l,$s};return $f;};U.prototype.setDeadline=function(h){return this.$val.setDeadline(h);};U.ptr.prototype.setReadDeadline=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.checkValid("SetReadDeadline");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.pfd.SetReadDeadline($clone(h,B.Time));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;$s=2;case 2:return l;}return;}var $f={$blk:U.ptr.prototype.setReadDeadline,$c:true,$r,h,i,j,k,l,$s};return $f;};U.prototype.setReadDeadline=function(h){return this.$val.setReadDeadline(h);};U.ptr.prototype.setWriteDeadline=function(h){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.checkValid("SetWriteDeadline");if(!($interfaceIsEqual(j,$ifaceNil))){$s=-1;return j;}k=i.file.pfd.SetWriteDeadline($clone(h,B.Time));$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;$s=2;case 2:return l;}return;}var $f={$blk:U.ptr.prototype.setWriteDeadline,$c:true,$r,h,i,j,k,l,$s};return $f;};U.prototype.setWriteDeadline=function(h){return this.$val.setWriteDeadline(h);};U.ptr.prototype.checkValid=function(h){var h,i;i=this;if(i===FQ.nil){return $pkg.ErrInvalid;}return $ifaceNil;};U.prototype.checkValid=function(h){return this.$val.checkValid(h);};CG=function(h){var{h,i,j,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:case 1:i=h();$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(!($interfaceIsEqual(j,new A.Errno(4)))){$s=-1;return j;}$s=1;continue;case 2:$s=-1;return $ifaceNil;}return;}var $f={$blk:CG,$c:true,$r,h,i,j,$s};return $f;};U.ptr.prototype.Name=function(){var h;h=this;return h.file.name;};U.prototype.Name=function(){return this.$val.Name();};CH.ptr.prototype.Error=function(){var{h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;i=h.Err.Error();$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=h.Op+" "+h.Old+" "+h.New+": "+i;$s=2;case 2:return j;}return;}var $f={$blk:CH.ptr.prototype.Error,$c:true,$r,h,i,j,$s};return $f;};CH.prototype.Error=function(){return this.$val.Error();};CH.ptr.prototype.Unwrap=function(){var h;h=this;return h.Err;};CH.prototype.Unwrap=function(){return this.$val.Unwrap();};U.ptr.prototype.Read=function(h){var{h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=0;j=$ifaceNil;k=this;l=k.checkValid("read");if(!($interfaceIsEqual(l,$ifaceNil))){m=0;n=l;i=m;j=n;$s=-1;return[i,j];}p=k.read(h);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;i=o[0];q=o[1];r=i;s=k.wrapErr("read",q);i=r;j=s;$s=-1;return[i,j];}return;}var $f={$blk:U.ptr.prototype.Read,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};U.prototype.Read=function(h){return this.$val.Read(h);};U.ptr.prototype.ReadAt=function(h,i){var{h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=0;k=$ifaceNil;l=this;m=l.checkValid("read");if(!($interfaceIsEqual(m,$ifaceNil))){n=0;o=m;j=n;k=o;$s=-1;return[j,k];}if((i.$high<0||(i.$high===0&&i.$low<0))){p=0;q=new C.PathError.ptr("readat",l.file.name,D.New("negative offset"));j=p;k=q;$s=-1;return[j,k];}case 1:if(!(h.$length>0)){$s=2;continue;}s=l.pread(h,i);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;t=r[0];u=r[1];if(!($interfaceIsEqual(u,$ifaceNil))){k=l.wrapErr("read",u);$s=2;continue;}j=j+(t)>>0;h=$subslice(h,t);i=(v=(new $Int64(0,t)),new $Int64(i.$high+v.$high,i.$low+v.$low));$s=1;continue;case 2:$s=-1;return[j,k];}return;}var $f={$blk:U.ptr.prototype.ReadAt,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s};return $f;};U.prototype.ReadAt=function(h,i){return this.$val.ReadAt(h,i);};U.ptr.prototype.ReadFrom=function(h){var{h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=new $Int64(0,0);j=$ifaceNil;k=this;l=k.checkValid("write");if(!($interfaceIsEqual(l,$ifaceNil))){m=new $Int64(0,0);n=l;i=m;j=n;$s=-1;return[i,j];}o=k.readFrom(h);i=o[0];p=o[1];q=o[2];if(!p){$s=1;continue;}$s=2;continue;case 1:s=CI(k,h);$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;i=r[0];j=r[1];t=[i,j];$s=4;case 4:return t;case 2:u=i;v=k.wrapErr("write",q);i=u;j=v;$s=-1;return[i,j];}return;}var $f={$blk:U.ptr.prototype.ReadFrom,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s};return $f;};U.prototype.ReadFrom=function(h){return this.$val.ReadFrom(h);};CI=function(h,i){var{h,i,j,k,l,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:k=G.Copy((j=new CJ.ptr(h),new j.constructor.elem(j)),i);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;$s=2;case 2:return l;}return;}var $f={$blk:CI,$c:true,$r,h,i,j,k,l,$s};return $f;};U.ptr.prototype.Write=function(h){var{h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=0;j=$ifaceNil;k=this;l=k.checkValid("write");if(!($interfaceIsEqual(l,$ifaceNil))){m=0;n=l;i=m;j=n;$s=-1;return[i,j];}p=k.write(h);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;i=o[0];q=o[1];if(i<0){i=0;}if(!((i===h.$length))){j=G.ErrShortWrite;}$r=BQ(k,q);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(!($interfaceIsEqual(q,$ifaceNil))){j=k.wrapErr("write",q);}r=i;s=j;i=r;j=s;$s=-1;return[i,j];}return;}var $f={$blk:U.ptr.prototype.Write,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};U.prototype.Write=function(h){return this.$val.Write(h);};U.ptr.prototype.WriteAt=function(h,i){var{h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=0;k=$ifaceNil;l=this;m=l.checkValid("write");if(!($interfaceIsEqual(m,$ifaceNil))){n=0;o=m;j=n;k=o;$s=-1;return[j,k];}if(l.file.appendMode){p=0;q=CK;j=p;k=q;$s=-1;return[j,k];}if((i.$high<0||(i.$high===0&&i.$low<0))){r=0;s=new C.PathError.ptr("writeat",l.file.name,D.New("negative offset"));j=r;k=s;$s=-1;return[j,k];}case 1:if(!(h.$length>0)){$s=2;continue;}u=l.pwrite(h,i);$s=3;case 3:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;v=t[0];w=t[1];if(!($interfaceIsEqual(w,$ifaceNil))){k=l.wrapErr("write",w);$s=2;continue;}j=j+(v)>>0;h=$subslice(h,v);i=(x=(new $Int64(0,v)),new $Int64(i.$high+x.$high,i.$low+x.$low));$s=1;continue;case 2:$s=-1;return[j,k];}return;}var $f={$blk:U.ptr.prototype.WriteAt,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,$s};return $f;};U.prototype.WriteAt=function(h,i){return this.$val.WriteAt(h,i);};U.ptr.prototype.Seek=function(h,i){var{h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=new $Int64(0,0);k=$ifaceNil;l=this;m=l.checkValid("seek");if(!($interfaceIsEqual(m,$ifaceNil))){n=new $Int64(0,0);o=m;j=n;k=o;$s=-1;return[j,k];}q=l.seek(h,i);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=p[0];s=p[1];if($interfaceIsEqual(s,$ifaceNil)&&!(l.file.dirinfo===GA.nil)&&!((r.$high===0&&r.$low===0))){s=new A.Errno(21);}if(!($interfaceIsEqual(s,$ifaceNil))){t=new $Int64(0,0);u=l.wrapErr("seek",s);j=t;k=u;$s=-1;return[j,k];}v=r;w=$ifaceNil;j=v;k=w;$s=-1;return[j,k];}return;}var $f={$blk:U.ptr.prototype.Seek,$c:true,$r,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};U.prototype.Seek=function(h,i){return this.$val.Seek(h,i);};U.ptr.prototype.wrapErr=function(h,i){var h,i,j;j=this;if($interfaceIsEqual(i,$ifaceNil)||$interfaceIsEqual(i,G.EOF)){return i;}if($interfaceIsEqual(i,J.ErrFileClosing)){i=$pkg.ErrClosed;}return new C.PathError.ptr(h,j.file.name,i);};U.prototype.wrapErr=function(h,i){return this.$val.wrapErr(h,i);};U.ptr.prototype.Chmod=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.chmod(h);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=2;case 2:return k;}return;}var $f={$blk:U.ptr.prototype.Chmod,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.Chmod=function(h){return this.$val.Chmod(h);};U.ptr.prototype.SetDeadline=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.setDeadline($clone(h,B.Time));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=2;case 2:return k;}return;}var $f={$blk:U.ptr.prototype.SetDeadline,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.SetDeadline=function(h){return this.$val.SetDeadline(h);};U.ptr.prototype.SetReadDeadline=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.setReadDeadline($clone(h,B.Time));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=2;case 2:return k;}return;}var $f={$blk:U.ptr.prototype.SetReadDeadline,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.SetReadDeadline=function(h){return this.$val.SetReadDeadline(h);};U.ptr.prototype.SetWriteDeadline=function(h){var{h,i,j,k,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;j=i.setWriteDeadline($clone(h,B.Time));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$s=2;case 2:return k;}return;}var $f={$blk:U.ptr.prototype.SetWriteDeadline,$c:true,$r,h,i,j,k,$s};return $f;};U.prototype.SetWriteDeadline=function(h){return this.$val.SetWriteDeadline(h);};U.ptr.prototype.SyscallConn=function(){var h,i,j;h=this;i=h.checkValid("SyscallConn");if(!($interfaceIsEqual(i,$ifaceNil))){return[$ifaceNil,i];}j=AS(h);return[j[0],j[1]];};U.prototype.SyscallConn=function(){return this.$val.SyscallConn();};DV=function(){return J.ErrNoDeadline;};DW=function(){return J.ErrDeadlineExceeded;};DZ.ptr.prototype.Error=function(){var{h,i,j,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;i=h.Err.Error();$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=h.Syscall+": "+i;$s=2;case 2:return j;}return;}var $f={$blk:DZ.ptr.prototype.Error,$c:true,$r,h,i,j,$s};return $f;};DZ.prototype.Error=function(){return this.$val.Error();};DZ.ptr.prototype.Unwrap=function(){var h;h=this;return h.Err;};DZ.prototype.Unwrap=function(){return this.$val.Unwrap();};DZ.ptr.prototype.Timeout=function(){var{h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:h=this;i=$assertType(h.Err,DX,true);j=i[0];k=i[1];if(!(k)){l=false;$s=1;continue s;}m=j.Timeout();$s=2;case 2:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;case 1:n=l;$s=3;case 3:return n;}return;}var $f={$blk:DZ.ptr.prototype.Timeout,$c:true,$r,h,i,j,k,l,m,n,$s};return $f;};DZ.prototype.Timeout=function(){return this.$val.Timeout();};EC=function(h){var h;return EF(h,$pkg.ErrNotExist);};$pkg.IsNotExist=EC;EF=function(h,i){var h,i,j,k,l;h=EG(h);if($interfaceIsEqual(h,i)){return true;}j=$assertType(h,A.Errno,true);k=j[0];l=j[1];return l&&new A.Errno(k).Is(i);};EG=function(h){var h,i,j,k,l;i=h;if($assertType(i,FU,true)[1]){j=i.$val;return j.Err;}else if($assertType(i,GO,true)[1]){k=i.$val;return k.Err;}else if($assertType(i,GP,true)[1]){l=i.$val;return l.Err;}return h;};ES=function(h){var h;return[new $Uint64(0,1),true];};ET=function(h){var h;return EY(h,0,2);};EU=function(h){var h,i,j,k;i=ET(h);j=i[0];k=i[1];if(!k){return[new $Uint64(0,0),false];}return[new $Uint64(j.$high-0,j.$low-2),true];};EV=function(h){var h;return 4294967295;};EW.ptr.prototype.close=function(){var h;h=this;if(!(h.buf===FO.nil)){EX.Put(h.buf);h.buf=FO.nil;}};EW.prototype.close=function(){return this.$val.close();};U.ptr.prototype.readdir=function(h,i){var{aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{h,i});$s=$s||0;s:while(true){switch($s){case 0:j=FK.nil;k=GQ.nil;l=GR.nil;m=$ifaceNil;n=this;if(n.file.dirinfo===GA.nil){$s=1;continue;}$s=2;continue;case 1:n.file.dirinfo=new EW.ptr(FO.nil,0,0);o=EX.Get();$s=3;case 3:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n.file.dirinfo.buf=$assertType(o,FO);case 2:p=n.file.dirinfo;if(h===0){h=-1;}case 4:if(!(!((h===0)))){$s=5;continue;}if(p.bufp>=p.nbuf){$s=6;continue;}$s=7;continue;case 6:p.bufp=0;q=$ifaceNil;s=n.file.pfd.ReadDirent(p.buf.$get());$s=8;case 8:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;p.nbuf=r[0];q=r[1];H.KeepAlive(n);if(!($interfaceIsEqual(q,$ifaceNil))){t=j;u=k;v=l;w=new C.PathError.ptr("readdirent",n.file.name,q);j=t;k=u;l=v;m=w;$s=-1;return[j,k,l,m];}if(p.nbuf<=0){$s=5;continue;}case 7:x=$subslice((p.buf.$get()),p.bufp,p.nbuf);y=ET(x);z=y[0];aa=y[1];if(!aa||(ab=(new $Uint64(0,x.$length)),(z.$high>ab.$high||(z.$high===ab.$high&&z.$low>ab.$low)))){$s=5;continue;}ac=$subslice(x,0,$flatten64(z));p.bufp=p.bufp+(((z.$low>>0)))>>0;ad=ES(ac);ae=ad[0];aa=ad[1];if(!aa){$s=5;continue;}if((ae.$high===0&&ae.$low===0)){$s=4;continue;}af=EU(ac);ag=af[0];aa=af[1];if(!aa||(ah=new $Uint64(0+ag.$high,2+ag.$low),ai=(new $Uint64(0,ac.$length)),(ah.$high>ai.$high||(ah.$high===ai.$high&&ah.$low>ai.$low)))){$s=5;continue;}aj=$subslice(ac,2,$flatten64(new $Uint64(0+ag.$high,2+ag.$low)));ak=aj;al=0;while(true){if(!(al=ak.$length)?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+al]);if(an===0){aj=$subslice(aj,0,am);break;}al++;}if(($bytesToString(aj))==="."||($bytesToString(aj))===".."){$s=4;continue;}if(h>0){h=h-(1)>>0;}if(i===0){$s=9;continue;}if(i===1){$s=10;continue;}$s=11;continue;case 9:j=$append(j,($bytesToString(aj)));$s=12;continue;case 10:ap=BZ(n.file.name,($bytesToString(aj)),EV(ac));$s=13;case 13:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}ao=ap;aq=ao[0];ar=ao[1];if(EC(ar)){$s=4;continue;}if(!($interfaceIsEqual(ar,$ifaceNil))){as=FK.nil;at=k;au=GR.nil;av=ar;j=as;k=at;l=au;m=av;$s=-1;return[j,k,l,m];}k=$append(k,aq);$s=12;continue;case 11:ax=CR(n.file.name+"/"+($bytesToString(aj)));$s=14;case 14:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}aw=ax;ay=aw[0];az=aw[1];if(EC(az)){$s=4;continue;}if(!($interfaceIsEqual(az,$ifaceNil))){ba=FK.nil;bb=GQ.nil;bc=l;bd=az;j=ba;k=bb;l=bc;m=bd;$s=-1;return[j,k,l,m];}l=$append(l,ay);case 12:$s=4;continue;case 5:if(h>0&&(((j.$length+k.$length>>0)+l.$length>>0)===0)){be=FK.nil;bf=GQ.nil;bg=GR.nil;bh=G.EOF;j=be;k=bf;l=bg;m=bh;$s=-1;return[j,k,l,m];}bi=j;bj=k;bk=l;bl=$ifaceNil;j=bi;k=bj;l=bk;m=bl;$s=-1;return[j,k,l,m];}return;}var $f={$blk:U.ptr.prototype.readdir,$c:true,$r,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};U.prototype.readdir=function(h,i){return this.$val.readdir(h,i);};EY=function(h,i,j){var h,i,j,k,l,m,n,o,p,q,r;k=new $Uint64(0,0);l=false;if(h.$length<(((i+j>>>0)>>0))){m=new $Uint64(0,0);n=false;k=m;l=n;return[k,l];}if(false){o=EZ($subslice(h,i),j);p=true;k=o;l=p;return[k,l];}q=FA($subslice(h,i),j);r=true;k=q;l=r;return[k,l];};EZ=function(h,i){var aa,ab,ac,ad,ae,af,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j=i;if(j===(1)){return(new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])));}else if(j===(2)){$unused((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));return(k=(new $Uint64(0,(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]))),l=$shiftLeft64((new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))),8),new $Uint64(k.$high|l.$high,(k.$low|l.$low)>>>0));}else if(j===(4)){$unused((3>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+3]));return(m=(n=(o=(new $Uint64(0,(3>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+3]))),p=$shiftLeft64((new $Uint64(0,(2>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+2]))),8),new $Uint64(o.$high|p.$high,(o.$low|p.$low)>>>0)),q=$shiftLeft64((new $Uint64(0,(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]))),16),new $Uint64(n.$high|q.$high,(n.$low|q.$low)>>>0)),r=$shiftLeft64((new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))),24),new $Uint64(m.$high|r.$high,(m.$low|r.$low)>>>0));}else if(j===(8)){$unused((7>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+7]));return(s=(t=(u=(v=(w=(x=(y=(new $Uint64(0,(7>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+7]))),z=$shiftLeft64((new $Uint64(0,(6>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+6]))),8),new $Uint64(y.$high|z.$high,(y.$low|z.$low)>>>0)),aa=$shiftLeft64((new $Uint64(0,(5>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+5]))),16),new $Uint64(x.$high|aa.$high,(x.$low|aa.$low)>>>0)),ab=$shiftLeft64((new $Uint64(0,(4>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+4]))),24),new $Uint64(w.$high|ab.$high,(w.$low|ab.$low)>>>0)),ac=$shiftLeft64((new $Uint64(0,(3>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+3]))),32),new $Uint64(v.$high|ac.$high,(v.$low|ac.$low)>>>0)),ad=$shiftLeft64((new $Uint64(0,(2>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+2]))),40),new $Uint64(u.$high|ad.$high,(u.$low|ad.$low)>>>0)),ae=$shiftLeft64((new $Uint64(0,(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]))),48),new $Uint64(t.$high|ae.$high,(t.$low|ae.$low)>>>0)),af=$shiftLeft64((new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))),56),new $Uint64(s.$high|af.$high,(s.$low|af.$low)>>>0));}else{$panic(new $String("syscall: readInt with unsupported size"));}};FA=function(h,i){var aa,ab,ac,ad,ae,af,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j=i;if(j===(1)){return(new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])));}else if(j===(2)){$unused((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));return(k=(new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))),l=$shiftLeft64((new $Uint64(0,(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]))),8),new $Uint64(k.$high|l.$high,(k.$low|l.$low)>>>0));}else if(j===(4)){$unused((3>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+3]));return(m=(n=(o=(new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))),p=$shiftLeft64((new $Uint64(0,(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]))),8),new $Uint64(o.$high|p.$high,(o.$low|p.$low)>>>0)),q=$shiftLeft64((new $Uint64(0,(2>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+2]))),16),new $Uint64(n.$high|q.$high,(n.$low|q.$low)>>>0)),r=$shiftLeft64((new $Uint64(0,(3>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+3]))),24),new $Uint64(m.$high|r.$high,(m.$low|r.$low)>>>0));}else if(j===(8)){$unused((7>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+7]));return(s=(t=(u=(v=(w=(x=(y=(new $Uint64(0,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))),z=$shiftLeft64((new $Uint64(0,(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]))),8),new $Uint64(y.$high|z.$high,(y.$low|z.$low)>>>0)),aa=$shiftLeft64((new $Uint64(0,(2>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+2]))),16),new $Uint64(x.$high|aa.$high,(x.$low|aa.$low)>>>0)),ab=$shiftLeft64((new $Uint64(0,(3>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+3]))),24),new $Uint64(w.$high|ab.$high,(w.$low|ab.$low)>>>0)),ac=$shiftLeft64((new $Uint64(0,(4>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+4]))),32),new $Uint64(v.$high|ac.$high,(v.$low|ac.$low)>>>0)),ad=$shiftLeft64((new $Uint64(0,(5>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+5]))),40),new $Uint64(u.$high|ad.$high,(u.$low|ad.$low)>>>0)),ae=$shiftLeft64((new $Uint64(0,(6>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+6]))),48),new $Uint64(t.$high|ae.$high,(t.$low|ae.$low)>>>0)),af=$shiftLeft64((new $Uint64(0,(7>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+7]))),56),new $Uint64(s.$high|af.$high,(s.$low|af.$low)>>>0));}else{$panic(new $String("syscall: readInt with unsupported size"));}};U.ptr.prototype.Readdir=function(h){var{h,i,j,k,l,m,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;if(i===FQ.nil){$s=-1;return[GR.nil,$pkg.ErrInvalid];}k=i.readdir(h,2);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[2];m=j[3];if(l===GR.nil){l=new GR([]);}$s=-1;return[l,m];}return;}var $f={$blk:U.ptr.prototype.Readdir,$c:true,$r,h,i,j,k,l,m,$s};return $f;};U.prototype.Readdir=function(h){return this.$val.Readdir(h);};U.ptr.prototype.Readdirnames=function(h){var{h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=FK.nil;j=$ifaceNil;k=this;if(k===FQ.nil){l=FK.nil;m=$pkg.ErrInvalid;i=l;j=m;$s=-1;return[i,j];}o=k.readdir(h,0);$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;i=n[0];j=n[3];if(i===FK.nil){i=new FK([]);}p=i;q=j;i=p;j=q;$s=-1;return[i,j];}return;}var $f={$blk:U.ptr.prototype.Readdirnames,$c:true,$r,h,i,j,k,l,m,n,o,p,q,$s};return $f;};U.prototype.Readdirnames=function(h){return this.$val.Readdirnames(h);};U.ptr.prototype.ReadDir=function(h){var{h,i,j,k,l,m,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=this;if(i===FQ.nil){$s=-1;return[GQ.nil,$pkg.ErrInvalid];}k=i.readdir(h,1);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[1];m=j[3];if(l===GQ.nil){l=new GQ([]);}$s=-1;return[l,m];}return;}var $f={$blk:U.ptr.prototype.ReadDir,$c:true,$r,h,i,j,k,l,m,$s};return $f;};U.prototype.ReadDir=function(h){return this.$val.ReadDir(h);};FF=function(){return $pkg.Args;};FG=function(){var h,i,j;h=$global.process;if(!(h===undefined)){i=h.argv;if(!(i===undefined)&&$parseInt(i.length)>=1){$pkg.Args=$makeSlice(FK,($parseInt(i.length)-1>>0));j=0;while(true){if(!(j<($parseInt(i.length)-1>>0))){break;}((j<0||j>=$pkg.Args.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.Args.$array[$pkg.Args.$offset+j]=$internalize(i[(j+1>>0)],$String));j=j+(1)>>0;}}}if($pkg.Args.$length===0){$pkg.Args=new FK(["?"]);}};U.ptr.prototype.WriteString=function(h){var{h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{h});$s=$s||0;s:while(true){switch($s){case 0:i=0;j=$ifaceNil;k=this;m=k.Write((new FN($stringToBytes(h))));$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;i=l[0];j=l[1];n=[i,j];$s=2;case 2:return n;}return;}var $f={$blk:U.ptr.prototype.WriteString,$c:true,$r,h,i,j,k,l,m,n,$s};return $f;};U.prototype.WriteString=function(h){return this.$val.WriteString(h);};FP.methods=[{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[C.FileMode],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[B.Time],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)}];FQ.methods=[{prop:"Stat",name:"Stat",pkg:"",typ:$funcType([],[C.FileInfo,$error],false)},{prop:"readFrom",name:"readFrom",pkg:"os",typ:$funcType([G.Reader],[$Int64,$Bool,$error],false)},{prop:"Fd",name:"Fd",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"seek",name:"seek",pkg:"os",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)},{prop:"read",name:"read",pkg:"os",typ:$funcType([FN],[$Int,$error],false)},{prop:"pread",name:"pread",pkg:"os",typ:$funcType([FN,$Int64],[$Int,$error],false)},{prop:"write",name:"write",pkg:"os",typ:$funcType([FN],[$Int,$error],false)},{prop:"pwrite",name:"pwrite",pkg:"os",typ:$funcType([FN,$Int64],[$Int,$error],false)},{prop:"chmod",name:"chmod",pkg:"os",typ:$funcType([C.FileMode],[$error],false)},{prop:"Chown",name:"Chown",pkg:"",typ:$funcType([$Int,$Int],[$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$Int64],[$error],false)},{prop:"Sync",name:"Sync",pkg:"",typ:$funcType([],[$error],false)},{prop:"Chdir",name:"Chdir",pkg:"",typ:$funcType([],[$error],false)},{prop:"setDeadline",name:"setDeadline",pkg:"os",typ:$funcType([B.Time],[$error],false)},{prop:"setReadDeadline",name:"setReadDeadline",pkg:"os",typ:$funcType([B.Time],[$error],false)},{prop:"setWriteDeadline",name:"setWriteDeadline",pkg:"os",typ:$funcType([B.Time],[$error],false)},{prop:"checkValid",name:"checkValid",pkg:"os",typ:$funcType([$String],[$error],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([FN],[$Int,$error],false)},{prop:"ReadAt",name:"ReadAt",pkg:"",typ:$funcType([FN,$Int64],[$Int,$error],false)},{prop:"ReadFrom",name:"ReadFrom",pkg:"",typ:$funcType([G.Reader],[$Int64,$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([FN],[$Int,$error],false)},{prop:"WriteAt",name:"WriteAt",pkg:"",typ:$funcType([FN,$Int64],[$Int,$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"wrapErr",name:"wrapErr",pkg:"os",typ:$funcType([$String,$error],[$error],false)},{prop:"Chmod",name:"Chmod",pkg:"",typ:$funcType([C.FileMode],[$error],false)},{prop:"SetDeadline",name:"SetDeadline",pkg:"",typ:$funcType([B.Time],[$error],false)},{prop:"SetReadDeadline",name:"SetReadDeadline",pkg:"",typ:$funcType([B.Time],[$error],false)},{prop:"SetWriteDeadline",name:"SetWriteDeadline",pkg:"",typ:$funcType([B.Time],[$error],false)},{prop:"SyscallConn",name:"SyscallConn",pkg:"",typ:$funcType([],[A.RawConn,$error],false)},{prop:"readdir",name:"readdir",pkg:"os",typ:$funcType([$Int,FB],[FK,GQ,GR,$error],false)},{prop:"Readdir",name:"Readdir",pkg:"",typ:$funcType([$Int],[GR,$error],false)},{prop:"Readdirnames",name:"Readdirnames",pkg:"",typ:$funcType([$Int],[FK,$error],false)},{prop:"ReadDir",name:"ReadDir",pkg:"",typ:$funcType([$Int],[GQ,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)}];GU.methods=[{prop:"Control",name:"Control",pkg:"",typ:$funcType([GS],[$error],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([GT],[$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([GT],[$error],false)}];GB.methods=[{prop:"close",name:"close",pkg:"os",typ:$funcType([],[$error],false)}];GV.methods=[{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[C.FileMode],false)},{prop:"Info",name:"Info",pkg:"",typ:$funcType([],[C.FileInfo,$error],false)}];GO.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Unwrap",name:"Unwrap",pkg:"",typ:$funcType([],[$error],false)}];GP.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Unwrap",name:"Unwrap",pkg:"",typ:$funcType([],[$error],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];GA.methods=[{prop:"close",name:"close",pkg:"os",typ:$funcType([],[],false)}];R.init("os",[{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"size",name:"size",embedded:false,exported:false,typ:$Int64,tag:""},{prop:"mode",name:"mode",embedded:false,exported:false,typ:C.FileMode,tag:""},{prop:"modTime",name:"modTime",embedded:false,exported:false,typ:B.Time,tag:""},{prop:"sys",name:"sys",embedded:false,exported:false,typ:A.Stat_t,tag:""}]);U.init("os",[{prop:"file",name:"file",embedded:true,exported:false,typ:GB,tag:""}]);AR.init("os",[{prop:"file",name:"file",embedded:false,exported:false,typ:FQ,tag:""}]);BM.init("os",[{prop:"pfd",name:"pfd",embedded:false,exported:false,typ:J.FD,tag:""},{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"dirinfo",name:"dirinfo",embedded:false,exported:false,typ:GA,tag:""},{prop:"nonblock",name:"nonblock",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"stdoutOrErr",name:"stdoutOrErr",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"appendMode",name:"appendMode",embedded:false,exported:false,typ:$Bool,tag:""}]);BY.init("os",[{prop:"parent",name:"parent",embedded:false,exported:false,typ:$String,tag:""},{prop:"name",name:"name",embedded:false,exported:false,typ:$String,tag:""},{prop:"typ",name:"typ",embedded:false,exported:false,typ:C.FileMode,tag:""},{prop:"info",name:"info",embedded:false,exported:false,typ:C.FileInfo,tag:""}]);CH.init("",[{prop:"Op",name:"Op",embedded:false,exported:true,typ:$String,tag:""},{prop:"Old",name:"Old",embedded:false,exported:true,typ:$String,tag:""},{prop:"New",name:"New",embedded:false,exported:true,typ:$String,tag:""},{prop:"Err",name:"Err",embedded:false,exported:true,typ:$error,tag:""}]);CJ.init("",[{prop:"Writer",name:"Writer",embedded:true,exported:true,typ:G.Writer,tag:""}]);DX.init([{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}]);DZ.init("",[{prop:"Syscall",name:"Syscall",embedded:false,exported:true,typ:$String,tag:""},{prop:"Err",name:"Err",embedded:false,exported:true,typ:$error,tag:""}]);EW.init("os",[{prop:"buf",name:"buf",embedded:false,exported:false,typ:FO,tag:""},{prop:"nbuf",name:"nbuf",embedded:false,exported:false,typ:$Int,tag:""},{prop:"bufp",name:"bufp",embedded:false,exported:false,typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=Q.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=O.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=P.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=N.$init();$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.Args=FK.nil;FD=false;AA=D.New("pattern contains path separator");CK=D.New("os: invalid use of WriteAt on file opened with O_APPEND");CR=AP;$pkg.ErrProcessDone=D.New("os: process already finished");$pkg.ErrInvalid=C.ErrInvalid;$pkg.ErrNotExist=C.ErrNotExist;$pkg.ErrClosed=C.ErrClosed;$pkg.ErrNoDeadline=DV();$pkg.ErrDeadlineExceeded=DW();EX=new I.Pool.ptr(FM.nil,(function(){var e,f;e=$makeSlice(FN,8192);return(f||(f=new FO(function(){return e;},function($v){e=$convertSliceType($v,FN);})));}));e=BN(0,"/dev/stdin");$s=18;case 18:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$pkg.Stdin=e;f=BN(1,"/dev/stdout");$s=19;case 19:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$pkg.Stdout=f;g=BN(2,"/dev/stderr");$s=20;case 20:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}$pkg.Stderr=g;AT();FG();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["fmt"]=(function(){var $pkg={},$init,A,I,B,C,D,E,F,G,H,V,W,X,AK,AL,AM,AN,AO,AP,BG,BH,BK,BL,BM,BN,BO,BP,BS,BT,CO,CP,CQ,CS,Y,AC,AE,AF,AQ,Z,AA,AG,AR,AX,BB;A=$packages["errors"];I=$packages["internal/fmtsort"];B=$packages["io"];C=$packages["math"];D=$packages["os"];E=$packages["reflect"];F=$packages["strconv"];G=$packages["sync"];H=$packages["unicode/utf8"];V=$pkg.scanError=$newType(0,$kindStruct,"fmt.scanError",true,"fmt",false,function(err_){this.$val=this;if(arguments.length===0){this.err=$ifaceNil;return;}this.err=err_;});W=$pkg.ss=$newType(0,$kindStruct,"fmt.ss",true,"fmt",false,function(rs_,buf_,count_,atEOF_,ssave_){this.$val=this;if(arguments.length===0){this.rs=$ifaceNil;this.buf=AO.nil;this.count=0;this.atEOF=false;this.ssave=new X.ptr(false,false,false,0,0,0);return;}this.rs=rs_;this.buf=buf_;this.count=count_;this.atEOF=atEOF_;this.ssave=ssave_;});X=$pkg.ssave=$newType(0,$kindStruct,"fmt.ssave",true,"fmt",false,function(validSave_,nlIsEnd_,nlIsSpace_,argLimit_,limit_,maxWid_){this.$val=this;if(arguments.length===0){this.validSave=false;this.nlIsEnd=false;this.nlIsSpace=false;this.argLimit=0;this.limit=0;this.maxWid=0;return;}this.validSave=validSave_;this.nlIsEnd=nlIsEnd_;this.nlIsSpace=nlIsSpace_;this.argLimit=argLimit_;this.limit=limit_;this.maxWid=maxWid_;});AK=$pkg.State=$newType(8,$kindInterface,"fmt.State",true,"fmt",true,null);AL=$pkg.Formatter=$newType(8,$kindInterface,"fmt.Formatter",true,"fmt",true,null);AM=$pkg.Stringer=$newType(8,$kindInterface,"fmt.Stringer",true,"fmt",true,null);AN=$pkg.GoStringer=$newType(8,$kindInterface,"fmt.GoStringer",true,"fmt",true,null);AO=$pkg.buffer=$newType(12,$kindSlice,"fmt.buffer",true,"fmt",false,null);AP=$pkg.pp=$newType(0,$kindStruct,"fmt.pp",true,"fmt",false,function(buf_,arg_,value_,fmt_,reordered_,goodArgNum_,panicking_,erroring_,wrapErrs_,wrappedErr_){this.$val=this;if(arguments.length===0){this.buf=AO.nil;this.arg=$ifaceNil;this.value=new E.Value.ptr(BN.nil,0,0);this.fmt=new BH.ptr(BO.nil,new BG.ptr(false,false,false,false,false,false,false,false,false),0,0,BP.zero());this.reordered=false;this.goodArgNum=false;this.panicking=false;this.erroring=false;this.wrapErrs=false;this.wrappedErr=$ifaceNil;return;}this.buf=buf_;this.arg=arg_;this.value=value_;this.fmt=fmt_;this.reordered=reordered_;this.goodArgNum=goodArgNum_;this.panicking=panicking_;this.erroring=erroring_;this.wrapErrs=wrapErrs_;this.wrappedErr=wrappedErr_;});BG=$pkg.fmtFlags=$newType(0,$kindStruct,"fmt.fmtFlags",true,"fmt",false,function(widPresent_,precPresent_,minus_,plus_,sharp_,space_,zero_,plusV_,sharpV_){this.$val=this;if(arguments.length===0){this.widPresent=false;this.precPresent=false;this.minus=false;this.plus=false;this.sharp=false;this.space=false;this.zero=false;this.plusV=false;this.sharpV=false;return;}this.widPresent=widPresent_;this.precPresent=precPresent_;this.minus=minus_;this.plus=plus_;this.sharp=sharp_;this.space=space_;this.zero=zero_;this.plusV=plusV_;this.sharpV=sharpV_;});BH=$pkg.fmt=$newType(0,$kindStruct,"fmt.fmt",true,"fmt",false,function(buf_,fmtFlags_,wid_,prec_,intbuf_){this.$val=this;if(arguments.length===0){this.buf=BO.nil;this.fmtFlags=new BG.ptr(false,false,false,false,false,false,false,false,false);this.wid=0;this.prec=0;this.intbuf=BP.zero();return;}this.buf=buf_;this.fmtFlags=fmtFlags_;this.wid=wid_;this.prec=prec_;this.intbuf=intbuf_;});BK=$arrayType($Uint16,2);BL=$sliceType(BK);BM=$sliceType($emptyInterface);BN=$ptrType(E.rtype);BO=$ptrType(AO);BP=$arrayType($Uint8,68);BS=$sliceType($Uint8);BT=$ptrType(W);CO=$ptrType(AP);CP=$arrayType($Uint8,6);CQ=$funcType([$Int32],[$Bool],false);CS=$ptrType(BH);W.ptr.prototype.Read=function(a){var a,b,c,d,e,f;b=0;c=$ifaceNil;d=this;e=0;f=A.New("ScanState's Read should not be called. Use ReadRune");b=e;c=f;return[b,c];};W.prototype.Read=function(a){return this.$val.Read(a);};W.ptr.prototype.ReadRune=function(){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=0;b=0;c=$ifaceNil;d=this;if(d.atEOF||d.count>=d.ssave.argLimit){c=B.EOF;$s=-1;return[a,b,c];}f=d.rs.ReadRune();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;a=e[0];b=e[1];c=e[2];if($interfaceIsEqual(c,$ifaceNil)){d.count=d.count+(1)>>0;if(d.ssave.nlIsEnd&&(a===10)){d.atEOF=true;}}else if($interfaceIsEqual(c,B.EOF)){d.atEOF=true;}$s=-1;return[a,b,c];}return;}var $f={$blk:W.ptr.prototype.ReadRune,$c:true,$r,a,b,c,d,e,f,$s};return $f;};W.prototype.ReadRune=function(){return this.$val.ReadRune();};W.ptr.prototype.Width=function(){var a,b,c,d,e,f,g;a=0;b=false;c=this;if(c.ssave.maxWid===1073741824){d=0;e=false;a=d;b=e;return[a,b];}f=c.ssave.maxWid;g=true;a=f;b=g;return[a,b];};W.prototype.Width=function(){return this.$val.Width();};W.ptr.prototype.getRune=function(){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=0;b=this;d=b.ReadRune();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}c=d;a=c[0];e=c[2];if(!($interfaceIsEqual(e,$ifaceNil))){if($interfaceIsEqual(e,B.EOF)){a=-1;$s=-1;return a;}b.error(e);}$s=-1;return a;}return;}var $f={$blk:W.ptr.prototype.getRune,$c:true,$r,a,b,c,d,e,$s};return $f;};W.prototype.getRune=function(){return this.$val.getRune();};W.ptr.prototype.UnreadRune=function(){var{a,b,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=a.rs.UnreadRune();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}b;a.atEOF=false;a.count=a.count-(1)>>0;$s=-1;return $ifaceNil;}return;}var $f={$blk:W.ptr.prototype.UnreadRune,$c:true,$r,a,b,$s};return $f;};W.prototype.UnreadRune=function(){return this.$val.UnreadRune();};W.ptr.prototype.error=function(a){var a,b,c;b=this;$panic((c=new V.ptr(a),new c.constructor.elem(c)));};W.prototype.error=function(a){return this.$val.error(a);};W.ptr.prototype.errorString=function(a){var a,b,c;b=this;$panic((c=new V.ptr(A.New(a)),new c.constructor.elem(c)));};W.prototype.errorString=function(a){return this.$val.errorString(a);};W.ptr.prototype.Token=function(a,b){var{a,b,c,d,e,f,g,$s,$deferred,$r,$c}=$restore(this,{a,b});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];d=BS.nil;c[0]=$ifaceNil;e=this;$deferred.push([(function(c){return function(){var f,g,h,i;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,V,true);h=$clone(g[0],V);i=g[1];if(i){c[0]=h.err;}else{$panic(f);}}};})(c),[]]);if(b===$throwNilPointerError){b=AA;}e.buf=$subslice(e.buf,0,0);f=e.token(a,b);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}d=f;g=[d,c[0]];$s=2;case 2:return g;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[d,c[0]];}if($curGoroutine.asleep){var $f={$blk:W.ptr.prototype.Token,$c:true,$r,a,b,c,d,e,f,g,$s,$deferred};return $f;}}};W.prototype.Token=function(a,b){return this.$val.Token(a,b);};Z=function(a){var a,b,c,d,e;if(a>=65536){return false;}b=((a<<16>>>16));c=Y;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]),BK);if(b1024){return;}b.buf=$subslice(b.buf,0,0);b.rs=$ifaceNil;AC.Put(b);};W.prototype.free=function(a){return this.$val.free(a);};W.ptr.prototype.SkipSpace=function(){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;case 1:b=a.getRune();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(c===-1){$s=-1;return;}if(!(c===13)){d=false;$s=6;continue s;}e=a.peek("\n");$s=7;case 7:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;case 6:if(d){$s=4;continue;}$s=5;continue;case 4:$s=1;continue;case 5:if(c===10){if(a.ssave.nlIsSpace){$s=1;continue;}a.errorString("unexpected newline");$s=-1;return;}if(!Z(c)){$s=8;continue;}$s=9;continue;case 8:f=a.UnreadRune();$s=10;case 10:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;$s=2;continue;case 9:$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:W.ptr.prototype.SkipSpace,$c:true,$r,a,b,c,d,e,f,$s};return $f;};W.prototype.SkipSpace=function(){return this.$val.SkipSpace();};W.ptr.prototype.token=function(a,b){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;if(a){$s=1;continue;}$s=2;continue;case 1:$r=c.SkipSpace();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:case 4:d=c.getRune();$s=6;case 6:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(e===-1){$s=5;continue;}f=b(e);$s=9;case 9:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(!f){$s=7;continue;}$s=8;continue;case 7:g=c.UnreadRune();$s=10;case 10:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$s=5;continue;case 8:(c.$ptr_buf||(c.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).writeRune(e);$s=4;continue;case 5:$s=-1;return $convertSliceType(c.buf,BS);}return;}var $f={$blk:W.ptr.prototype.token,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};W.prototype.token=function(a,b){return this.$val.token(a,b);};AG=function(a,b){var a,b,c,d,e,f,g;c=a;d=0;while(true){if(!(d=0;}return;}var $f={$blk:W.ptr.prototype.peek,$c:true,$r,a,b,c,d,e,$s};return $f;};W.prototype.peek=function(a){return this.$val.peek(a);};$ptrType(AO).prototype.write=function(a){var a,b;b=this;b.$set($appendSlice(b.$get(),a));};$ptrType(AO).prototype.writeString=function(a){var a,b;b=this;b.$set($appendSlice(b.$get(),a));};$ptrType(AO).prototype.writeByte=function(a){var a,b;b=this;b.$set($append(b.$get(),a));};$ptrType(AO).prototype.writeRune=function(a){var a,b,c,d,e;b=this;if(a<128){b.$set($append(b.$get(),((a<<24>>>24))));return;}c=b.$get();d=c.$length;while(true){if(!((d+4>>0)>c.$capacity)){break;}c=$append(c,0);}e=H.EncodeRune($convertSliceType($subslice(c,d,(d+4>>0)),BS),a);b.$set($subslice(c,0,(d+e>>0)));};AR=function(){var{a,b,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=AQ.Get();$s=1;case 1:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}b=$assertType(a,CO);b.panicking=false;b.erroring=false;b.wrapErrs=false;b.fmt.init((b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))));$s=-1;return b;}return;}var $f={$blk:AR,$c:true,$r,a,b,$s};return $f;};AP.ptr.prototype.free=function(){var a;a=this;if(a.buf.$capacity>65536){return;}a.buf=$subslice(a.buf,0,0);a.arg=$ifaceNil;a.value=new E.Value.ptr(BN.nil,0,0);a.wrappedErr=$ifaceNil;AQ.Put(a);};AP.prototype.free=function(){return this.$val.free();};AP.ptr.prototype.Width=function(){var a,b,c,d,e;a=0;b=false;c=this;d=c.fmt.wid;e=c.fmt.fmtFlags.widPresent;a=d;b=e;return[a,b];};AP.prototype.Width=function(){return this.$val.Width();};AP.ptr.prototype.Precision=function(){var a,b,c,d,e;a=0;b=false;c=this;d=c.fmt.prec;e=c.fmt.fmtFlags.precPresent;a=d;b=e;return[a,b];};AP.prototype.Precision=function(){return this.$val.Precision();};AP.ptr.prototype.Flag=function(a){var a,b,c;b=this;c=a;if(c===(45)){return b.fmt.fmtFlags.minus;}else if(c===(43)){return b.fmt.fmtFlags.plus||b.fmt.fmtFlags.plusV;}else if(c===(35)){return b.fmt.fmtFlags.sharp||b.fmt.fmtFlags.sharpV;}else if(c===(32)){return b.fmt.fmtFlags.space;}else if(c===(48)){return b.fmt.fmtFlags.zero;}return false;};AP.prototype.Flag=function(a){return this.$val.Flag(a);};AP.ptr.prototype.Write=function(a){var a,b,c,d,e,f;b=0;c=$ifaceNil;d=this;(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).write(a);e=a.$length;f=$ifaceNil;b=e;c=f;return[b,c];};AP.prototype.Write=function(a){return this.$val.Write(a);};AP.ptr.prototype.WriteString=function(a){var a,b,c,d,e,f;b=0;c=$ifaceNil;d=this;(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(a);e=a.length;f=$ifaceNil;b=e;c=f;return[b,c];};AP.prototype.WriteString=function(a){return this.$val.WriteString(a);};AX=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=AR();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;$r=c.doPrint(a);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=($bytesToString(c.buf));c.free();$s=-1;return d;}return;}var $f={$blk:AX,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.Sprint=AX;BB=function(a,b){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=$clone(a,E.Value).Field(b);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(($clone(d,E.Value).Kind()===20)&&!$clone(d,E.Value).IsNil()){$s=2;continue;}$s=3;continue;case 2:e=$clone(d,E.Value).Elem();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;case 3:$s=-1;return d;}return;}var $f={$blk:BB,$c:true,$r,a,b,c,d,e,$s};return $f;};AP.ptr.prototype.unknownType=function(a){var{a,b,c,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!$clone(a,E.Value).IsValid()){(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeString("");$s=-1;return;}(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(63);c=$clone(a,E.Value).Type().String();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeString(c);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(63);$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.unknownType,$c:true,$r,a,b,c,$s};return $f;};AP.prototype.unknownType=function(a){return this.$val.unknownType(a);};AP.ptr.prototype.badVerb=function(a){var{a,b,c,d,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;b.erroring=true;(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeString("%!");(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeRune(a);(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(40);if(!($interfaceIsEqual(b.arg,$ifaceNil))){$s=2;continue;}if($clone(b.value,E.Value).IsValid()){$s=3;continue;}$s=4;continue;case 2:c=E.TypeOf(b.arg).String();$s=6;case 6:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeString(c);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(61);$r=b.printArg(b.arg,118);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 3:d=$clone(b.value,E.Value).Type().String();$s=9;case 9:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeString(d);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(61);$r=b.printValue($clone(b.value,E.Value),118,0);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 4:(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeString("");case 5:case 1:(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(41);b.erroring=false;$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.badVerb,$c:true,$r,a,b,c,d,$s};return $f;};AP.prototype.badVerb=function(a){return this.$val.badVerb(a);};AP.ptr.prototype.fmtBool=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=b;if((d===(116))||(d===(118))){$s=2;continue;}$s=3;continue;case 2:c.fmt.fmtBoolean(a);$s=4;continue;case 3:$r=c.badVerb(b);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:case 1:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtBool,$c:true,$r,a,b,c,d,$s};return $f;};AP.prototype.fmtBool=function(a,b){return this.$val.fmtBool(a,b);};AP.ptr.prototype.fmt0x64=function(a,b){var a,b,c,d;c=this;d=c.fmt.fmtFlags.sharp;c.fmt.fmtFlags.sharp=b;c.fmt.fmtInteger(a,16,false,118,"0123456789abcdefx");c.fmt.fmtFlags.sharp=d;};AP.prototype.fmt0x64=function(a,b){return this.$val.fmt0x64(a,b);};AP.ptr.prototype.fmtInteger=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=c;if(e===(118)){$s=2;continue;}if(e===(100)){$s=3;continue;}if(e===(98)){$s=4;continue;}if((e===(111))||(e===(79))){$s=5;continue;}if(e===(120)){$s=6;continue;}if(e===(88)){$s=7;continue;}if(e===(99)){$s=8;continue;}if(e===(113)){$s=9;continue;}if(e===(85)){$s=10;continue;}$s=11;continue;case 2:if(d.fmt.fmtFlags.sharpV&&!b){d.fmt0x64(a,true);}else{d.fmt.fmtInteger(a,10,b,c,"0123456789abcdefx");}$s=12;continue;case 3:d.fmt.fmtInteger(a,10,b,c,"0123456789abcdefx");$s=12;continue;case 4:d.fmt.fmtInteger(a,2,b,c,"0123456789abcdefx");$s=12;continue;case 5:d.fmt.fmtInteger(a,8,b,c,"0123456789abcdefx");$s=12;continue;case 6:d.fmt.fmtInteger(a,16,b,c,"0123456789abcdefx");$s=12;continue;case 7:d.fmt.fmtInteger(a,16,b,c,"0123456789ABCDEFX");$s=12;continue;case 8:d.fmt.fmtC(a);$s=12;continue;case 9:d.fmt.fmtQc(a);$s=12;continue;case 10:d.fmt.fmtUnicode(a);$s=12;continue;case 11:$r=d.badVerb(c);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 12:case 1:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtInteger,$c:true,$r,a,b,c,d,e,$s};return $f;};AP.prototype.fmtInteger=function(a,b,c){return this.$val.fmtInteger(a,b,c);};AP.ptr.prototype.fmtFloat=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=c;if(e===(118)){$s=2;continue;}if((e===(98))||(e===(103))||(e===(71))||(e===(120))||(e===(88))){$s=3;continue;}if((e===(102))||(e===(101))||(e===(69))){$s=4;continue;}if(e===(70)){$s=5;continue;}$s=6;continue;case 2:d.fmt.fmtFloat(a,b,103,-1);$s=7;continue;case 3:d.fmt.fmtFloat(a,b,c,-1);$s=7;continue;case 4:d.fmt.fmtFloat(a,b,c,6);$s=7;continue;case 5:d.fmt.fmtFloat(a,b,102,6);$s=7;continue;case 6:$r=d.badVerb(c);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 7:case 1:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtFloat,$c:true,$r,a,b,c,d,e,$s};return $f;};AP.prototype.fmtFloat=function(a,b,c){return this.$val.fmtFloat(a,b,c);};AP.ptr.prototype.fmtComplex=function(a,b,c){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=c;if((e===(118))||(e===(98))||(e===(103))||(e===(71))||(e===(120))||(e===(88))||(e===(102))||(e===(70))||(e===(101))||(e===(69))){$s=2;continue;}$s=3;continue;case 2:f=d.fmt.fmtFlags.plus;(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(40);$r=d.fmtFloat(a.$real,(g=b/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")),c);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d.fmt.fmtFlags.plus=true;$r=d.fmtFloat(a.$imag,(h=b/2,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero")),c);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("i)");d.fmt.fmtFlags.plus=f;$s=4;continue;case 3:$r=d.badVerb(c);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:case 1:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtComplex,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AP.prototype.fmtComplex=function(a,b,c){return this.$val.fmtComplex(a,b,c);};AP.ptr.prototype.fmtString=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=b;if(d===(118)){$s=2;continue;}if(d===(115)){$s=3;continue;}if(d===(120)){$s=4;continue;}if(d===(88)){$s=5;continue;}if(d===(113)){$s=6;continue;}$s=7;continue;case 2:if(c.fmt.fmtFlags.sharpV){c.fmt.fmtQ(a);}else{c.fmt.fmtS(a);}$s=8;continue;case 3:c.fmt.fmtS(a);$s=8;continue;case 4:c.fmt.fmtSx(a,"0123456789abcdefx");$s=8;continue;case 5:c.fmt.fmtSx(a,"0123456789ABCDEFX");$s=8;continue;case 6:c.fmt.fmtQ(a);$s=8;continue;case 7:$r=c.badVerb(b);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 8:case 1:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtString,$c:true,$r,a,b,c,d,$s};return $f;};AP.prototype.fmtString=function(a,b){return this.$val.fmtString(a,b);};AP.ptr.prototype.fmtBytes=function(a,b,c){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=b;if((e===(118))||(e===(100))){$s=2;continue;}if(e===(115)){$s=3;continue;}if(e===(120)){$s=4;continue;}if(e===(88)){$s=5;continue;}if(e===(113)){$s=6;continue;}$s=7;continue;case 2:if(d.fmt.fmtFlags.sharpV){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(c);if(a===BS.nil){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("(nil)");$s=-1;return;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(123);f=a;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h>0){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(", ");}d.fmt0x64((new $Uint64(0,i)),true);g++;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(125);}else{(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(91);j=a;k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);if(l>0){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(32);}d.fmt.fmtInteger((new $Uint64(0,m)),10,false,b,"0123456789abcdefx");k++;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(93);}$s=8;continue;case 3:d.fmt.fmtBs(a);$s=8;continue;case 4:d.fmt.fmtBx(a,"0123456789abcdefx");$s=8;continue;case 5:d.fmt.fmtBx(a,"0123456789ABCDEFX");$s=8;continue;case 6:d.fmt.fmtQ(($bytesToString(a)));$s=8;continue;case 7:n=E.ValueOf(a);$s=9;case 9:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}$r=d.printValue($clone(n,E.Value),b,0);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 8:case 1:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtBytes,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s};return $f;};AP.prototype.fmtBytes=function(a,b,c){return this.$val.fmtBytes(a,b,c);};AP.ptr.prototype.fmtPointer=function(a,b){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;d=0;e=$clone(a,E.Value).Kind();if((e===(18))||(e===(19))||(e===(21))||(e===(22))||(e===(23))||(e===(26))){$s=2;continue;}$s=3;continue;case 2:d=$clone(a,E.Value).Pointer();$s=4;continue;case 3:$r=c.badVerb(b);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 4:case 1:f=b;if(f===(118)){$s=7;continue;}if(f===(112)){$s=8;continue;}if((f===(98))||(f===(111))||(f===(100))||(f===(120))||(f===(88))){$s=9;continue;}$s=10;continue;case 7:if(c.fmt.fmtFlags.sharpV){$s=12;continue;}$s=13;continue;case 12:(c.$ptr_buf||(c.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).writeByte(40);g=$clone(a,E.Value).Type().String();$s=15;case 15:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}$r=(c.$ptr_buf||(c.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).writeString(g);$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(c.$ptr_buf||(c.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).writeString(")(");if(d===0){(c.$ptr_buf||(c.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).writeString("nil");}else{c.fmt0x64((new $Uint64(0,d.constructor===Number?d:1)),true);}(c.$ptr_buf||(c.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).writeByte(41);$s=14;continue;case 13:if(d===0){c.fmt.padString("");}else{c.fmt0x64((new $Uint64(0,d.constructor===Number?d:1)),!c.fmt.fmtFlags.sharp);}case 14:$s=11;continue;case 8:c.fmt0x64((new $Uint64(0,d.constructor===Number?d:1)),!c.fmt.fmtFlags.sharp);$s=11;continue;case 9:$r=c.fmtInteger((new $Uint64(0,d.constructor===Number?d:1)),false,b);$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 10:$r=c.badVerb(b);$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 11:case 6:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.fmtPointer,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};AP.prototype.fmtPointer=function(a,b){return this.$val.fmtPointer(a,b);};AP.ptr.prototype.catchPanic=function(a,b,c){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=$recover();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=E.ValueOf(a);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(($clone(g,E.Value).Kind()===22)&&$clone(g,E.Value).IsNil()){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("");$s=-1;return;}if(d.panicking){$panic(e);}h=$clone(d.fmt.fmtFlags,BG);d.fmt.clearflags();(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("%!");(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeRune(b);(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("(PANIC=");(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(c);(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(" method: ");d.panicking=true;$r=d.printArg(e,118);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d.panicking=false;(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(41);BG.copy(d.fmt.fmtFlags,h);case 2:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.catchPanic,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AP.prototype.catchPanic=function(a,b,c){return this.$val.catchPanic(a,b,c);};AP.ptr.prototype.handleMethods=function(a){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r,$c}=$restore(this,{a});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);b=false;c=this;if(c.erroring){$s=1;continue;}$s=2;continue;case 1:d=b;$s=3;case 3:return d;case 2:if(a===119){$s=4;continue;}$s=5;continue;case 4:e=$assertType(c.arg,$error,true);f=e[0];g=e[1];if(!g||!c.wrapErrs||!($interfaceIsEqual(c.wrappedErr,$ifaceNil))){$s=6;continue;}$s=7;continue;case 6:c.wrappedErr=$ifaceNil;c.wrapErrs=false;$r=c.badVerb(a);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b=true;h=b;$s=9;case 9:return h;case 7:c.wrappedErr=f;a=118;case 5:i=$assertType(c.arg,AL,true);j=i[0];k=i[1];if(k){$s=10;continue;}$s=11;continue;case 10:b=true;$deferred.push([$methodVal(c,"catchPanic"),[c.arg,a,"Format"]]);$r=j.Format(c,a);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=b;$s=13;case 13:return l;case 11:if(c.fmt.fmtFlags.sharpV){$s=14;continue;}$s=15;continue;case 14:m=$assertType(c.arg,AN,true);n=m[0];o=m[1];if(o){$s=17;continue;}$s=18;continue;case 17:b=true;$deferred.push([$methodVal(c,"catchPanic"),[c.arg,a,"GoString"]]);p=n.GoString();$s=19;case 19:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}$r=c.fmt.fmtS(p);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=b;$s=21;case 21:return q;case 18:$s=16;continue;case 15:r=a;if((r===(118))||(r===(115))||(r===(120))||(r===(88))||(r===(113))){$s=23;continue;}$s=24;continue;case 23:s=c.arg;if($assertType(s,$error,true)[1]){$s=25;continue;}if($assertType(s,AM,true)[1]){$s=26;continue;}$s=27;continue;case 25:t=s;b=true;$deferred.push([$methodVal(c,"catchPanic"),[c.arg,a,"Error"]]);v=t.Error();$s=28;case 28:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}$r=c.fmtString(v,a);$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w=b;$s=30;case 30:return w;case 26:u=s;b=true;$deferred.push([$methodVal(c,"catchPanic"),[c.arg,a,"String"]]);x=u.String();$s=31;case 31:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}$r=c.fmtString(x,a);$s=32;case 32:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}y=b;$s=33;case 33:return y;case 27:case 24:case 22:case 16:b=false;z=b;$s=34;case 34:return z;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return b;}if($curGoroutine.asleep){var $f={$blk:AP.ptr.prototype.handleMethods,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred};return $f;}}};AP.prototype.handleMethods=function(a){return this.$val.handleMethods(a);};AP.ptr.prototype.printArg=function(a,b){var{a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=this;c.arg=a;c.value=new E.Value.ptr(BN.nil,0,0);if($interfaceIsEqual(a,$ifaceNil)){$s=1;continue;}$s=2;continue;case 1:d=b;if((d===(84))||(d===(118))){$s=4;continue;}$s=5;continue;case 4:c.fmt.padString("");$s=6;continue;case 5:$r=c.badVerb(b);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:case 3:$s=-1;return;case 2:e=b;if(e===(84)){$s=9;continue;}if(e===(112)){$s=10;continue;}$s=11;continue;case 9:f=E.TypeOf(a).String();$s=12;case 12:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=c.fmt.fmtS(f);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 10:g=E.ValueOf(a);$s=14;case 14:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}$r=c.fmtPointer($clone(g,E.Value),112);$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 11:case 8:h=a;if($assertType(h,$Bool,true)[1]){$s=16;continue;}if($assertType(h,$Float32,true)[1]){$s=17;continue;}if($assertType(h,$Float64,true)[1]){$s=18;continue;}if($assertType(h,$Complex64,true)[1]){$s=19;continue;}if($assertType(h,$Complex128,true)[1]){$s=20;continue;}if($assertType(h,$Int,true)[1]){$s=21;continue;}if($assertType(h,$Int8,true)[1]){$s=22;continue;}if($assertType(h,$Int16,true)[1]){$s=23;continue;}if($assertType(h,$Int32,true)[1]){$s=24;continue;}if($assertType(h,$Int64,true)[1]){$s=25;continue;}if($assertType(h,$Uint,true)[1]){$s=26;continue;}if($assertType(h,$Uint8,true)[1]){$s=27;continue;}if($assertType(h,$Uint16,true)[1]){$s=28;continue;}if($assertType(h,$Uint32,true)[1]){$s=29;continue;}if($assertType(h,$Uint64,true)[1]){$s=30;continue;}if($assertType(h,$Uintptr,true)[1]){$s=31;continue;}if($assertType(h,$String,true)[1]){$s=32;continue;}if($assertType(h,BS,true)[1]){$s=33;continue;}if($assertType(h,E.Value,true)[1]){$s=34;continue;}$s=35;continue;case 16:i=h.$val;$r=c.fmtBool(i,b);$s=37;case 37:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 17:j=h.$val;$r=c.fmtFloat((j),32,b);$s=38;case 38:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 18:k=h.$val;$r=c.fmtFloat(k,64,b);$s=39;case 39:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 19:l=h.$val;$r=c.fmtComplex((new $Complex128(l.$real,l.$imag)),64,b);$s=40;case 40:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 20:m=h.$val;$r=c.fmtComplex(m,128,b);$s=41;case 41:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 21:n=h.$val;$r=c.fmtInteger((new $Uint64(0,n)),true,b);$s=42;case 42:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 22:o=h.$val;$r=c.fmtInteger((new $Uint64(0,o)),true,b);$s=43;case 43:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 23:p=h.$val;$r=c.fmtInteger((new $Uint64(0,p)),true,b);$s=44;case 44:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 24:q=h.$val;$r=c.fmtInteger((new $Uint64(0,q)),true,b);$s=45;case 45:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 25:r=h.$val;$r=c.fmtInteger((new $Uint64(r.$high,r.$low)),true,b);$s=46;case 46:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 26:s=h.$val;$r=c.fmtInteger((new $Uint64(0,s)),false,b);$s=47;case 47:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 27:t=h.$val;$r=c.fmtInteger((new $Uint64(0,t)),false,b);$s=48;case 48:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 28:u=h.$val;$r=c.fmtInteger((new $Uint64(0,u)),false,b);$s=49;case 49:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 29:v=h.$val;$r=c.fmtInteger((new $Uint64(0,v)),false,b);$s=50;case 50:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 30:w=h.$val;$r=c.fmtInteger(w,false,b);$s=51;case 51:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 31:x=h.$val;$r=c.fmtInteger((new $Uint64(0,x.constructor===Number?x:1)),false,b);$s=52;case 52:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 32:y=h.$val;$r=c.fmtString(y,b);$s=53;case 53:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 33:z=h.$val;$r=c.fmtBytes(z,b,"[]byte");$s=54;case 54:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 34:aa=h.$val;if($clone(aa,E.Value).IsValid()&&$clone(aa,E.Value).CanInterface()){$s=55;continue;}$s=56;continue;case 55:ac=$clone(aa,E.Value).Interface();$s=57;case 57:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}c.arg=ac;ad=c.handleMethods(b);$s=60;case 60:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}if(ad){$s=58;continue;}$s=59;continue;case 58:$s=-1;return;case 59:case 56:$r=c.printValue($clone(aa,E.Value),b,0);$s=61;case 61:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=36;continue;case 35:ab=h;ae=c.handleMethods(b);$s=64;case 64:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(!ae){$s=62;continue;}$s=63;continue;case 62:af=E.ValueOf(ab);$s=65;case 65:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}$r=c.printValue($clone(af,E.Value),b,0);$s=66;case 66:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 63:case 36:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.printArg,$c:true,$r,a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AP.prototype.printArg=function(a,b){return this.$val.printArg(a,b);};AP.ptr.prototype.printValue=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;if(c>0&&$clone(a,E.Value).IsValid()&&$clone(a,E.Value).CanInterface()){$s=1;continue;}$s=2;continue;case 1:e=$clone(a,E.Value).Interface();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d.arg=e;f=d.handleMethods(b);$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f){$s=4;continue;}$s=5;continue;case 4:$s=-1;return;case 5:case 2:d.arg=$ifaceNil;d.value=a;g=a;h=$clone(a,E.Value).Kind();if(h===(0)){$s=8;continue;}if(h===(1)){$s=9;continue;}if((h===(2))||(h===(3))||(h===(4))||(h===(5))||(h===(6))){$s=10;continue;}if((h===(7))||(h===(8))||(h===(9))||(h===(10))||(h===(11))||(h===(12))){$s=11;continue;}if(h===(13)){$s=12;continue;}if(h===(14)){$s=13;continue;}if(h===(15)){$s=14;continue;}if(h===(16)){$s=15;continue;}if(h===(24)){$s=16;continue;}if(h===(21)){$s=17;continue;}if(h===(25)){$s=18;continue;}if(h===(20)){$s=19;continue;}if((h===(17))||(h===(23))){$s=20;continue;}if(h===(22)){$s=21;continue;}if((h===(18))||(h===(19))||(h===(26))){$s=22;continue;}$s=23;continue;case 8:if(c===0){$s=25;continue;}$s=26;continue;case 25:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("");$s=27;continue;case 26:i=b;if(i===(118)){$s=29;continue;}$s=30;continue;case 29:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("");$s=31;continue;case 30:$r=d.badVerb(b);$s=32;case 32:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 31:case 28:case 27:$s=24;continue;case 9:$r=d.fmtBool($clone(g,E.Value).Bool(),b);$s=33;case 33:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 10:$r=d.fmtInteger(((j=$clone(g,E.Value).Int(),new $Uint64(j.$high,j.$low))),true,b);$s=34;case 34:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 11:$r=d.fmtInteger($clone(g,E.Value).Uint(),false,b);$s=35;case 35:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 12:$r=d.fmtFloat($clone(g,E.Value).Float(),32,b);$s=36;case 36:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 13:$r=d.fmtFloat($clone(g,E.Value).Float(),64,b);$s=37;case 37:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 14:$r=d.fmtComplex($clone(g,E.Value).Complex(),64,b);$s=38;case 38:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 15:$r=d.fmtComplex($clone(g,E.Value).Complex(),128,b);$s=39;case 39:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 16:k=$clone(g,E.Value).String();$s=40;case 40:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$r=d.fmtString(k,b);$s=41;case 41:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 17:if(d.fmt.fmtFlags.sharpV){$s=42;continue;}$s=43;continue;case 42:l=$clone(g,E.Value).Type().String();$s=45;case 45:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}$r=(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(l);$s=46;case 46:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($clone(g,E.Value).IsNil()){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("(nil)");$s=-1;return;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(123);$s=44;continue;case 43:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("map[");case 44:m=I.Sort($clone(g,E.Value));$s=47;case 47:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;o=n.Key;p=0;case 48:if(!(p=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p]);if(q>0){if(d.fmt.fmtFlags.sharpV){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(", ");}else{(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(32);}}$r=d.printValue($clone(r,E.Value),b,c+1>>0);$s=50;case 50:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(58);$r=d.printValue($clone((s=n.Value,((q<0||q>=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+q])),E.Value),b,c+1>>0);$s=51;case 51:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p++;$s=48;continue;case 49:if(d.fmt.fmtFlags.sharpV){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(125);}else{(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(93);}$s=24;continue;case 18:if(d.fmt.fmtFlags.sharpV){$s=52;continue;}$s=53;continue;case 52:t=$clone(g,E.Value).Type().String();$s=54;case 54:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}$r=(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(t);$s=55;case 55:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 53:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(123);u=0;case 56:if(!(u<$clone(g,E.Value).NumField())){$s=57;continue;}if(u>0){if(d.fmt.fmtFlags.sharpV){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(", ");}else{(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(32);}}if(d.fmt.fmtFlags.plusV||d.fmt.fmtFlags.sharpV){$s=58;continue;}$s=59;continue;case 58:v=$clone(g,E.Value).Type().Field(u);$s=60;case 60:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=v.Name;if(!(w==="")){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(w);(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(58);}case 59:x=BB($clone(g,E.Value),u);$s=61;case 61:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}$r=d.printValue($clone(x,E.Value),b,c+1>>0);$s=62;case 62:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}u=u+(1)>>0;$s=56;continue;case 57:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(125);$s=24;continue;case 19:y=$clone(g,E.Value).Elem();$s=63;case 63:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;if(!$clone(z,E.Value).IsValid()){$s=64;continue;}$s=65;continue;case 64:if(d.fmt.fmtFlags.sharpV){$s=67;continue;}$s=68;continue;case 67:aa=$clone(g,E.Value).Type().String();$s=70;case 70:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}$r=(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(aa);$s=71;case 71:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("(nil)");$s=69;continue;case 68:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("");case 69:$s=66;continue;case 65:$r=d.printValue($clone(z,E.Value),b,c+1>>0);$s=72;case 72:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 66:$s=24;continue;case 20:ab=b;if((ab===(115))||(ab===(113))||(ab===(120))||(ab===(88))){$s=74;continue;}$s=75;continue;case 74:ac=$clone(g,E.Value).Type();ad=ac.Elem();$s=78;case 78:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ae=ad.Kind();$s=79;case 79:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(ae===8){$s=76;continue;}$s=77;continue;case 76:af=BS.nil;if($clone(g,E.Value).Kind()===23){$s=80;continue;}if($clone(g,E.Value).CanAddr()){$s=81;continue;}$s=82;continue;case 80:ag=$clone(g,E.Value).Bytes();$s=84;case 84:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}af=ag;$s=83;continue;case 81:ah=$clone(g,E.Value).Slice(0,$clone(g,E.Value).Len());$s=85;case 85:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=$clone(ah,E.Value).Bytes();$s=86;case 86:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}af=ai;$s=83;continue;case 82:af=$makeSlice(BS,$clone(g,E.Value).Len());aj=af;ak=0;case 87:if(!(ak=af.$length)?($throwRuntimeError("index out of range"),undefined):af.$array[af.$offset+al]=((an.$low<<24>>>24)));ak++;$s=87;continue;case 88:case 83:ao=af;ap=b;aq=ac.String();$s=91;case 91:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ar=aq;$r=d.fmtBytes(ao,ap,ar);$s=92;case 92:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 77:case 75:case 73:if(d.fmt.fmtFlags.sharpV){$s=93;continue;}$s=94;continue;case 93:as=$clone(g,E.Value).Type().String();$s=96;case 96:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}$r=(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(as);$s=97;case 97:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(($clone(g,E.Value).Kind()===23)&&$clone(g,E.Value).IsNil()){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString("(nil)");$s=-1;return;}(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(123);at=0;case 98:if(!(at<$clone(g,E.Value).Len())){$s=99;continue;}if(at>0){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeString(", ");}au=$clone(g,E.Value).Index(at);$s=100;case 100:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}$r=d.printValue($clone(au,E.Value),b,c+1>>0);$s=101;case 101:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}at=at+(1)>>0;$s=98;continue;case 99:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(125);$s=95;continue;case 94:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(91);av=0;case 102:if(!(av<$clone(g,E.Value).Len())){$s=103;continue;}if(av>0){(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(32);}aw=$clone(g,E.Value).Index(av);$s=104;case 104:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}$r=d.printValue($clone(aw,E.Value),b,c+1>>0);$s=105;case 105:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}av=av+(1)>>0;$s=102;continue;case 103:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(93);case 95:$s=24;continue;case 21:if((c===0)&&!(($clone(g,E.Value).Pointer()===0))){$s=106;continue;}$s=107;continue;case 106:ax=$clone(g,E.Value).Elem();$s=109;case 109:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}ay=ax;az=$clone(ay,E.Value).Kind();if((az===(17))||(az===(23))||(az===(25))||(az===(21))){$s=110;continue;}$s=111;continue;case 110:(d.$ptr_buf||(d.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).writeByte(38);$r=d.printValue($clone(ay,E.Value),b,c+1>>0);$s=112;case 112:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return;case 111:case 108:case 107:$r=d.fmtPointer($clone(g,E.Value),b);$s=113;case 113:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 22:$r=d.fmtPointer($clone(g,E.Value),b);$s=114;case 114:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 23:$r=d.unknownType($clone(g,E.Value));$s=115;case 115:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 24:case 7:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.printValue,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};AP.prototype.printValue=function(a,b,c){return this.$val.printValue(a,b,c);};AP.ptr.prototype.doPrint=function(a){var{a,b,c,d,e,f,g,h,i,j,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=false;d=a;e=0;case 1:if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(!(!($interfaceIsEqual(g,$ifaceNil)))){h=false;$s=3;continue s;}i=E.TypeOf(g).Kind();$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i===24;case 3:j=h;if(f>0&&!j&&!c){(b.$ptr_buf||(b.$ptr_buf=new BO(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},b))).writeByte(32);}$r=b.printArg(g,118);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=j;e++;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:AP.ptr.prototype.doPrint,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};AP.prototype.doPrint=function(a){return this.$val.doPrint(a);};BH.ptr.prototype.clearflags=function(){var a;a=this;BG.copy(a.fmtFlags,new BG.ptr(false,false,false,false,false,false,false,false,false));};BH.prototype.clearflags=function(){return this.$val.clearflags();};BH.ptr.prototype.init=function(a){var a,b;b=this;b.buf=a;b.clearflags();};BH.prototype.init=function(a){return this.$val.init(a);};BH.ptr.prototype.writePadding=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;if(a<=0){return;}c=b.buf.$get();d=c.$length;e=d+a>>0;if(e>c.$capacity){c=$makeSlice(AO,(($imul(c.$capacity,2))+a>>0));$copySlice(c,b.buf.$get());}f=32;if(b.fmtFlags.zero){f=48;}g=$subslice(c,d,e);h=g;i=0;while(true){if(!(i=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+j]=f);i++;}b.buf.$set($subslice(c,0,e));};BH.prototype.writePadding=function(a){return this.$val.writePadding(a);};BH.ptr.prototype.pad=function(a){var a,b,c;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.write(a);return;}c=b.wid-H.RuneCount(a)>>0;if(!b.fmtFlags.minus){b.writePadding(c);b.buf.write(a);}else{b.buf.write(a);b.writePadding(c);}};BH.prototype.pad=function(a){return this.$val.pad(a);};BH.ptr.prototype.padString=function(a){var a,b,c;b=this;if(!b.fmtFlags.widPresent||(b.wid===0)){b.buf.writeString(a);return;}c=b.wid-H.RuneCountInString(a)>>0;if(!b.fmtFlags.minus){b.writePadding(c);b.buf.writeString(a);}else{b.buf.writeString(a);b.writePadding(c);}};BH.prototype.padString=function(a){return this.$val.padString(a);};BH.ptr.prototype.fmtBoolean=function(a){var a,b;b=this;if(a){b.padString("true");}else{b.padString("false");}};BH.prototype.fmtBoolean=function(a){return this.$val.fmtBoolean(a);};BH.ptr.prototype.fmtUnicode=function(a){var a,b,c,d,e,f,g;b=this;c=$subslice(new BS(b.intbuf),0);d=4;if(b.fmtFlags.precPresent&&b.prec>4){d=b.prec;e=(((2+d>>0)+2>>0)+4>>0)+1>>0;if(e>c.$length){c=$makeSlice(BS,e);}}f=c.$length;if(b.fmtFlags.sharp&&(a.$high<0||(a.$high===0&&a.$low<=1114111))&&F.IsPrint(((a.$low>>0)))){f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=39);f=f-(H.RuneLen(((a.$low>>0))))>>0;H.EncodeRune($subslice(c,f),((a.$low>>0)));f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=39);f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=32);}while(true){if(!((a.$high>0||(a.$high===0&&a.$low>=16)))){break;}f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]="0123456789ABCDEFX".charCodeAt($flatten64(new $Uint64(a.$high&0,(a.$low&15)>>>0))));d=d-(1)>>0;a=$shiftRightUint64(a,(4));}f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]="0123456789ABCDEFX".charCodeAt($flatten64(a)));d=d-(1)>>0;while(true){if(!(d>0)){break;}f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=48);d=d-(1)>>0;}f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=43);f=f-(1)>>0;((f<0||f>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+f]=85);g=b.fmtFlags.zero;b.fmtFlags.zero=false;b.pad($subslice(c,f));b.fmtFlags.zero=g;};BH.prototype.fmtUnicode=function(a){return this.$val.fmtUnicode(a);};BH.ptr.prototype.fmtInteger=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;f=this;h=c&&(g=(new $Int64(a.$high,a.$low)),(g.$high<0||(g.$high===0&&g.$low<0)));if(h){a=new $Uint64(-a.$high,-a.$low);}i=$subslice(new BS(f.intbuf),0);if(f.fmtFlags.widPresent||f.fmtFlags.precPresent){j=(3+f.wid>>0)+f.prec>>0;if(j>i.$length){i=$makeSlice(BS,j);}}k=0;if(f.fmtFlags.precPresent){k=f.prec;if((k===0)&&(a.$high===0&&a.$low===0)){l=f.fmtFlags.zero;f.fmtFlags.zero=false;f.writePadding(f.wid);f.fmtFlags.zero=l;return;}}else if(f.fmtFlags.zero&&f.fmtFlags.widPresent){k=f.wid;if(h||f.fmtFlags.plus||f.fmtFlags.space){k=k-(1)>>0;}}m=i.$length;n=b;if(n===(10)){while(true){if(!((a.$high>0||(a.$high===0&&a.$low>=10)))){break;}m=m-(1)>>0;o=$div64(a,new $Uint64(0,10),false);((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=(((p=new $Uint64(0+a.$high,48+a.$low),q=$mul64(o,new $Uint64(0,10)),new $Uint64(p.$high-q.$high,p.$low-q.$low)).$low<<24>>>24)));a=o;}}else if(n===(16)){while(true){if(!((a.$high>0||(a.$high===0&&a.$low>=16)))){break;}m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=e.charCodeAt($flatten64(new $Uint64(a.$high&0,(a.$low&15)>>>0))));a=$shiftRightUint64(a,(4));}}else if(n===(8)){while(true){if(!((a.$high>0||(a.$high===0&&a.$low>=8)))){break;}m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=(((r=new $Uint64(a.$high&0,(a.$low&7)>>>0),new $Uint64(0+r.$high,48+r.$low)).$low<<24>>>24)));a=$shiftRightUint64(a,(3));}}else if(n===(2)){while(true){if(!((a.$high>0||(a.$high===0&&a.$low>=2)))){break;}m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=(((s=new $Uint64(a.$high&0,(a.$low&1)>>>0),new $Uint64(0+s.$high,48+s.$low)).$low<<24>>>24)));a=$shiftRightUint64(a,(1));}}else{$panic(new $String("fmt: unknown base; can't happen"));}m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=e.charCodeAt($flatten64(a)));while(true){if(!(m>0&&k>(i.$length-m>>0))){break;}m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=48);}if(f.fmtFlags.sharp){t=b;if(t===(2)){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=98);m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=48);}else if(t===(8)){if(!((((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m])===48))){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=48);}}else if(t===(16)){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=e.charCodeAt(16));m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=48);}}if(d===79){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=111);m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=48);}if(h){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=45);}else if(f.fmtFlags.plus){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=43);}else if(f.fmtFlags.space){m=m-(1)>>0;((m<0||m>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+m]=32);}u=f.fmtFlags.zero;f.fmtFlags.zero=false;f.pad($subslice(i,m));f.fmtFlags.zero=u;};BH.prototype.fmtInteger=function(a,b,c,d,e){return this.$val.fmtInteger(a,b,c,d,e);};BH.ptr.prototype.truncateString=function(a){var a,b,c,d,e,f,g;b=this;if(b.fmtFlags.precPresent){c=b.prec;d=a;e=0;while(true){if(!(e>0;if(c<0){return $substring(a,0,g);}e+=f[1];}}return a;};BH.prototype.truncateString=function(a){return this.$val.truncateString(a);};BH.ptr.prototype.truncate=function(a){var a,b,c,d,e,f;b=this;if(b.fmtFlags.precPresent){c=b.prec;d=0;while(true){if(!(d>0;if(c<0){return $subslice(a,0,d);}e=1;if(((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d])>=128){f=H.DecodeRune($subslice(a,d));e=f[1];}d=d+(e)>>0;}}return a;};BH.prototype.truncate=function(a){return this.$val.truncate(a);};BH.ptr.prototype.fmtS=function(a){var a,b;b=this;a=b.truncateString(a);b.padString(a);};BH.prototype.fmtS=function(a){return this.$val.fmtS(a);};BH.ptr.prototype.fmtBs=function(a){var a,b;b=this;a=b.truncate(a);b.pad(a);};BH.prototype.fmtBs=function(a){return this.$val.fmtBs(a);};BH.ptr.prototype.fmtSbx=function(a,b,c){var a,b,c,d,e,f,g,h,i;d=this;e=b.$length;if(b===BS.nil){e=a.length;}if(d.fmtFlags.precPresent&&d.prec0){if(d.fmtFlags.space){if(d.fmtFlags.sharp){f=$imul(f,(2));}f=f+((e-1>>0))>>0;}else if(d.fmtFlags.sharp){f=f+(2)>>0;}}else{if(d.fmtFlags.widPresent){d.writePadding(d.wid);}return;}if(d.fmtFlags.widPresent&&d.wid>f&&!d.fmtFlags.minus){d.writePadding(d.wid-f>>0);}g=d.buf.$get();if(d.fmtFlags.sharp){g=$append(g,48,c.charCodeAt(16));}h=0;i=0;while(true){if(!(i0){g=$append(g,32);if(d.fmtFlags.sharp){g=$append(g,48,c.charCodeAt(16));}}if(!(b===BS.nil)){h=((i<0||i>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+i]);}else{h=a.charCodeAt(i);}g=$append(g,c.charCodeAt((h>>>4<<24>>>24)),c.charCodeAt(((h&15)>>>0)));i=i+(1)>>0;}d.buf.$set(g);if(d.fmtFlags.widPresent&&d.wid>f&&d.fmtFlags.minus){d.writePadding(d.wid-f>>0);}};BH.prototype.fmtSbx=function(a,b,c){return this.$val.fmtSbx(a,b,c);};BH.ptr.prototype.fmtSx=function(a,b){var a,b,c;c=this;c.fmtSbx(a,BS.nil,b);};BH.prototype.fmtSx=function(a,b){return this.$val.fmtSx(a,b);};BH.ptr.prototype.fmtBx=function(a,b){var a,b,c;c=this;c.fmtSbx("",a,b);};BH.prototype.fmtBx=function(a,b){return this.$val.fmtBx(a,b);};BH.ptr.prototype.fmtQ=function(a){var a,b,c;b=this;a=b.truncateString(a);if(b.fmtFlags.sharp&&F.CanBackquote(a)){b.padString("`"+a+"`");return;}c=$subslice(new BS(b.intbuf),0,0);if(b.fmtFlags.plus){b.pad(F.AppendQuoteToASCII(c,a));}else{b.pad(F.AppendQuote(c,a));}};BH.prototype.fmtQ=function(a){return this.$val.fmtQ(a);};BH.ptr.prototype.fmtC=function(a){var a,b,c,d,e;b=this;c=((a.$low>>0));if((a.$high>0||(a.$high===0&&a.$low>1114111))){c=65533;}d=$subslice(new BS(b.intbuf),0,0);e=H.EncodeRune($subslice(d,0,4),c);b.pad($subslice(d,0,e));};BH.prototype.fmtC=function(a){return this.$val.fmtC(a);};BH.ptr.prototype.fmtQc=function(a){var a,b,c,d;b=this;c=((a.$low>>0));if((a.$high>0||(a.$high===0&&a.$low>1114111))){c=65533;}d=$subslice(new BS(b.intbuf),0,0);if(b.fmtFlags.plus){b.pad(F.AppendQuoteRuneToASCII(d,c));}else{b.pad(F.AppendQuoteRune(d,c));}};BH.prototype.fmtQc=function(a){return this.$val.fmtQc(a);};BH.ptr.prototype.fmtFloat=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;e=this;if(e.fmtFlags.precPresent){d=e.prec;}f=F.AppendFloat($subslice(new BS(e.intbuf),0,1),a,((c<<24>>>24)),d,b);if(((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])===45)||((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])===43)){f=$subslice(f,1);}else{(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=43);}if(e.fmtFlags.space&&((0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])===43)&&!e.fmtFlags.plus){(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=32);}if(((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])===73)||((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])===78)){g=e.fmtFlags.zero;e.fmtFlags.zero=false;if(((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])===78)&&!e.fmtFlags.space&&!e.fmtFlags.plus){f=$subslice(f,1);}e.pad(f);e.fmtFlags.zero=g;return;}if(e.fmtFlags.sharp&&!((c===98))){h=0;i=c;if((i===(118))||(i===(103))||(i===(71))||(i===(120))){h=d;if(h===-1){h=6;}}j=CP.zero();k=$subslice(new BS(j),0,0);l=false;m=false;n=1;while(true){if(!(n=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+n]);if(o===(46)){l=true;}else if((o===(112))||(o===(80))){k=$appendSlice(k,$subslice(f,n));f=$subslice(f,0,n);}else if((o===(101))||(o===(69))){if(!((c===120))&&!((c===88))){k=$appendSlice(k,$subslice(f,n));f=$subslice(f,0,n);break;}if(!((((n<0||n>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+n])===48))){m=true;}if(m){h=h-(1)>>0;}}else{if(!((((n<0||n>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+n])===48))){m=true;}if(m){h=h-(1)>>0;}}}n=n+(1)>>0;}if(!l){if((f.$length===2)&&((1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])===48)){h=h-(1)>>0;}f=$append(f,46);}while(true){if(!(h>0)){break;}f=$append(f,48);h=h-(1)>>0;}f=$appendSlice(f,k);}if(e.fmtFlags.plus||!(((0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])===43))){if(e.fmtFlags.zero&&e.fmtFlags.widPresent&&e.wid>f.$length){e.buf.writeByte((0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]));e.writePadding(e.wid-f.$length>>0);e.buf.write($subslice(f,1));return;}e.pad(f);return;}e.pad($subslice(f,1));};BH.prototype.fmtFloat=function(a,b,c,d){return this.$val.fmtFloat(a,b,c,d);};BT.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([BS],[$Int,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"getRune",name:"getRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"mustReadRune",name:"mustReadRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"error",name:"error",pkg:"fmt",typ:$funcType([$error],[],false)},{prop:"errorString",name:"errorString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([$Bool,CQ],[BS,$error],false)},{prop:"free",name:"free",pkg:"fmt",typ:$funcType([X],[],false)},{prop:"SkipSpace",name:"SkipSpace",pkg:"",typ:$funcType([],[],false)},{prop:"token",name:"token",pkg:"fmt",typ:$funcType([$Bool,CQ],[BS],false)},{prop:"consume",name:"consume",pkg:"fmt",typ:$funcType([$String,$Bool],[$Bool],false)},{prop:"peek",name:"peek",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"notEOF",name:"notEOF",pkg:"fmt",typ:$funcType([],[],false)},{prop:"accept",name:"accept",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"okVerb",name:"okVerb",pkg:"fmt",typ:$funcType([$Int32,$String,$String],[$Bool],false)},{prop:"scanBool",name:"scanBool",pkg:"fmt",typ:$funcType([$Int32],[$Bool],false)},{prop:"getBase",name:"getBase",pkg:"fmt",typ:$funcType([$Int32],[$Int,$String],false)},{prop:"scanNumber",name:"scanNumber",pkg:"fmt",typ:$funcType([$String,$Bool],[$String],false)},{prop:"scanRune",name:"scanRune",pkg:"fmt",typ:$funcType([$Int],[$Int64],false)},{prop:"scanBasePrefix",name:"scanBasePrefix",pkg:"fmt",typ:$funcType([],[$Int,$String,$Bool],false)},{prop:"scanInt",name:"scanInt",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Int64],false)},{prop:"scanUint",name:"scanUint",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Uint64],false)},{prop:"floatToken",name:"floatToken",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"complexTokens",name:"complexTokens",pkg:"fmt",typ:$funcType([],[$String,$String],false)},{prop:"convertFloat",name:"convertFloat",pkg:"fmt",typ:$funcType([$String,$Int],[$Float64],false)},{prop:"scanComplex",name:"scanComplex",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Complex128],false)},{prop:"convertString",name:"convertString",pkg:"fmt",typ:$funcType([$Int32],[$String],false)},{prop:"quotedString",name:"quotedString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"hexByte",name:"hexByte",pkg:"fmt",typ:$funcType([],[$Uint8,$Bool],false)},{prop:"hexString",name:"hexString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"scanPercent",name:"scanPercent",pkg:"fmt",typ:$funcType([],[],false)},{prop:"scanOne",name:"scanOne",pkg:"fmt",typ:$funcType([$Int32,$emptyInterface],[],false)},{prop:"doScan",name:"doScan",pkg:"fmt",typ:$funcType([BM],[$Int,$error],false)},{prop:"advance",name:"advance",pkg:"fmt",typ:$funcType([$String],[$Int],false)},{prop:"doScanf",name:"doScanf",pkg:"fmt",typ:$funcType([$String,BM],[$Int,$error],false)}];BO.methods=[{prop:"write",name:"write",pkg:"fmt",typ:$funcType([BS],[],false)},{prop:"writeString",name:"writeString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"writeByte",name:"writeByte",pkg:"fmt",typ:$funcType([$Uint8],[],false)},{prop:"writeRune",name:"writeRune",pkg:"fmt",typ:$funcType([$Int32],[],false)}];CO.methods=[{prop:"free",name:"free",pkg:"fmt",typ:$funcType([],[],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([BS],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"unknownType",name:"unknownType",pkg:"fmt",typ:$funcType([E.Value],[],false)},{prop:"badVerb",name:"badVerb",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"fmtBool",name:"fmtBool",pkg:"fmt",typ:$funcType([$Bool,$Int32],[],false)},{prop:"fmt0x64",name:"fmt0x64",pkg:"fmt",typ:$funcType([$Uint64,$Bool],[],false)},{prop:"fmtInteger",name:"fmtInteger",pkg:"fmt",typ:$funcType([$Uint64,$Bool,$Int32],[],false)},{prop:"fmtFloat",name:"fmtFloat",pkg:"fmt",typ:$funcType([$Float64,$Int,$Int32],[],false)},{prop:"fmtComplex",name:"fmtComplex",pkg:"fmt",typ:$funcType([$Complex128,$Int,$Int32],[],false)},{prop:"fmtString",name:"fmtString",pkg:"fmt",typ:$funcType([$String,$Int32],[],false)},{prop:"fmtBytes",name:"fmtBytes",pkg:"fmt",typ:$funcType([BS,$Int32,$String],[],false)},{prop:"fmtPointer",name:"fmtPointer",pkg:"fmt",typ:$funcType([E.Value,$Int32],[],false)},{prop:"catchPanic",name:"catchPanic",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32,$String],[],false)},{prop:"handleMethods",name:"handleMethods",pkg:"fmt",typ:$funcType([$Int32],[$Bool],false)},{prop:"printArg",name:"printArg",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32],[],false)},{prop:"printValue",name:"printValue",pkg:"fmt",typ:$funcType([E.Value,$Int32,$Int],[],false)},{prop:"argNumber",name:"argNumber",pkg:"fmt",typ:$funcType([$Int,$String,$Int,$Int],[$Int,$Int,$Bool],false)},{prop:"badArgNum",name:"badArgNum",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"missingArg",name:"missingArg",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"doPrintf",name:"doPrintf",pkg:"fmt",typ:$funcType([$String,BM],[],false)},{prop:"doPrint",name:"doPrint",pkg:"fmt",typ:$funcType([BM],[],false)},{prop:"doPrintln",name:"doPrintln",pkg:"fmt",typ:$funcType([BM],[],false)}];CS.methods=[{prop:"clearflags",name:"clearflags",pkg:"fmt",typ:$funcType([],[],false)},{prop:"init",name:"init",pkg:"fmt",typ:$funcType([BO],[],false)},{prop:"writePadding",name:"writePadding",pkg:"fmt",typ:$funcType([$Int],[],false)},{prop:"pad",name:"pad",pkg:"fmt",typ:$funcType([BS],[],false)},{prop:"padString",name:"padString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmtBoolean",name:"fmtBoolean",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"fmtUnicode",name:"fmtUnicode",pkg:"fmt",typ:$funcType([$Uint64],[],false)},{prop:"fmtInteger",name:"fmtInteger",pkg:"fmt",typ:$funcType([$Uint64,$Int,$Bool,$Int32,$String],[],false)},{prop:"truncateString",name:"truncateString",pkg:"fmt",typ:$funcType([$String],[$String],false)},{prop:"truncate",name:"truncate",pkg:"fmt",typ:$funcType([BS],[BS],false)},{prop:"fmtS",name:"fmtS",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmtBs",name:"fmtBs",pkg:"fmt",typ:$funcType([BS],[],false)},{prop:"fmtSbx",name:"fmtSbx",pkg:"fmt",typ:$funcType([$String,BS,$String],[],false)},{prop:"fmtSx",name:"fmtSx",pkg:"fmt",typ:$funcType([$String,$String],[],false)},{prop:"fmtBx",name:"fmtBx",pkg:"fmt",typ:$funcType([BS,$String],[],false)},{prop:"fmtQ",name:"fmtQ",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmtC",name:"fmtC",pkg:"fmt",typ:$funcType([$Uint64],[],false)},{prop:"fmtQc",name:"fmtQc",pkg:"fmt",typ:$funcType([$Uint64],[],false)},{prop:"fmtFloat",name:"fmtFloat",pkg:"fmt",typ:$funcType([$Float64,$Int,$Int32,$Int],[],false)}];V.init("fmt",[{prop:"err",name:"err",embedded:false,exported:false,typ:$error,tag:""}]);W.init("fmt",[{prop:"rs",name:"rs",embedded:false,exported:false,typ:B.RuneScanner,tag:""},{prop:"buf",name:"buf",embedded:false,exported:false,typ:AO,tag:""},{prop:"count",name:"count",embedded:false,exported:false,typ:$Int,tag:""},{prop:"atEOF",name:"atEOF",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"ssave",name:"ssave",embedded:true,exported:false,typ:X,tag:""}]);X.init("fmt",[{prop:"validSave",name:"validSave",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"nlIsEnd",name:"nlIsEnd",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"nlIsSpace",name:"nlIsSpace",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"argLimit",name:"argLimit",embedded:false,exported:false,typ:$Int,tag:""},{prop:"limit",name:"limit",embedded:false,exported:false,typ:$Int,tag:""},{prop:"maxWid",name:"maxWid",embedded:false,exported:false,typ:$Int,tag:""}]);AK.init([{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([BS],[$Int,$error],false)}]);AL.init([{prop:"Format",name:"Format",pkg:"",typ:$funcType([AK,$Int32],[],false)}]);AM.init([{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AN.init([{prop:"GoString",name:"GoString",pkg:"",typ:$funcType([],[$String],false)}]);AO.init($Uint8);AP.init("fmt",[{prop:"buf",name:"buf",embedded:false,exported:false,typ:AO,tag:""},{prop:"arg",name:"arg",embedded:false,exported:false,typ:$emptyInterface,tag:""},{prop:"value",name:"value",embedded:false,exported:false,typ:E.Value,tag:""},{prop:"fmt",name:"fmt",embedded:false,exported:false,typ:BH,tag:""},{prop:"reordered",name:"reordered",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"goodArgNum",name:"goodArgNum",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"panicking",name:"panicking",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"erroring",name:"erroring",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"wrapErrs",name:"wrapErrs",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"wrappedErr",name:"wrappedErr",embedded:false,exported:false,typ:$error,tag:""}]);BG.init("fmt",[{prop:"widPresent",name:"widPresent",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"precPresent",name:"precPresent",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"minus",name:"minus",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"plus",name:"plus",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"sharp",name:"sharp",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"space",name:"space",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"zero",name:"zero",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"plusV",name:"plusV",embedded:false,exported:false,typ:$Bool,tag:""},{prop:"sharpV",name:"sharpV",embedded:false,exported:false,typ:$Bool,tag:""}]);BH.init("fmt",[{prop:"buf",name:"buf",embedded:false,exported:false,typ:BO,tag:""},{prop:"fmtFlags",name:"fmtFlags",embedded:true,exported:false,typ:BG,tag:""},{prop:"wid",name:"wid",embedded:false,exported:false,typ:$Int,tag:""},{prop:"prec",name:"prec",embedded:false,exported:false,typ:$Int,tag:""},{prop:"intbuf",name:"intbuf",embedded:false,exported:false,typ:BP,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}Y=new BL([$toNativeArray($kindUint16,[9,13]),$toNativeArray($kindUint16,[32,32]),$toNativeArray($kindUint16,[133,133]),$toNativeArray($kindUint16,[160,160]),$toNativeArray($kindUint16,[5760,5760]),$toNativeArray($kindUint16,[8192,8202]),$toNativeArray($kindUint16,[8232,8233]),$toNativeArray($kindUint16,[8239,8239]),$toNativeArray($kindUint16,[8287,8287]),$toNativeArray($kindUint16,[12288,12288])]);AC=new G.Pool.ptr(BM.nil,(function(){return new W.ptr($ifaceNil,AO.nil,0,false,new X.ptr(false,false,false,0,0,0));}));AE=A.New("syntax error scanning complex number");AF=A.New("syntax error scanning boolean");AQ=new G.Pool.ptr(BM.nil,(function(){return new AP.ptr(AO.nil,$ifaceNil,new E.Value.ptr(BN.nil,0,0),new BH.ptr(BO.nil,new BG.ptr(false,false,false,false,false,false,false,false,false),0,0,BP.zero()),false,false,false,false,false,$ifaceNil);}));}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["github.com/kvartborg/vector"]=(function(){var $pkg={},$init,A,B,C,D,E,R,S,T,U,M,P,Q;A=$packages["errors"];B=$packages["fmt"];C=$packages["math"];D=$pkg.Vector=$newType(12,$kindSlice,"vector.Vector",true,"github.com/kvartborg/vector",true,null);E=$pkg.Axis=$newType(4,$kindInt,"vector.Axis",true,"github.com/kvartborg/vector",true,null);R=$sliceType($Float64);S=$sliceType($emptyInterface);T=$sliceType(D);U=$sliceType(E);D.prototype.Clone=function(){var a,b;a=this;b=$makeSlice(D,a.$length);$copySlice(b,a);return b;};$ptrType(D).prototype.Clone=function(){return this.$get().Clone();};D.prototype.Add=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){P($convertSliceType(b,R),1,$convertSliceType(b,R),$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),R));}else{P($convertSliceType(b,R),1,$convertSliceType(b,R),$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),R));}e++;}return b;};$ptrType(D).prototype.Add=function(a){return this.$get().Add(a);};D.prototype.Sub=function(a){var a,b,c,d,e,f;b=this;c=b.$length;d=a;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]).$length>c){P($convertSliceType(b,R),-1,$convertSliceType($subslice(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),0,c),R),$convertSliceType(b,R));}else{P($convertSliceType(b,R),-1,$convertSliceType(((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]),R),$convertSliceType(b,R));}e++;}return b;};$ptrType(D).prototype.Sub=function(a){return this.$get().Sub(a);};D.prototype.Scale=function(a){var a,b;b=this;Q($convertSliceType(b,R),a,$convertSliceType(b,R));return b;};$ptrType(D).prototype.Scale=function(a){return this.$get().Scale(a);};D.prototype.Equal=function(a){var a,b,c,d,e;b=this;if(!((b.$length===a.$length))){return false;}c=b;d=0;while(true){if(!(d=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])-((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]))>1e-08){return false;}d++;}return true;};$ptrType(D).prototype.Equal=function(a){return this.$get().Equal(a);};D.prototype.Magnitude=function(){var a,b,c,d,e;a=this;b=0;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=b+(e*e);d++;}return C.Sqrt(b);};$ptrType(D).prototype.Magnitude=function(){return this.$get().Magnitude();};D.prototype.Unit=function(){var a,b,c,d,e;a=this;b=a.Magnitude();if(b<1e-08){return a;}c=a;d=0;while(true){if(!(d=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e]=((e<0||e>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+e])/b);d++;}return a;};$ptrType(D).prototype.Unit=function(){return this.$get().Unit();};M=function(a,b){var a,b,c,d,e,f,g,h,i,j,k;c=0;d=a.$length;e=b.$length;f=c;g=d;h=e;if(g>h){b=$appendSlice(b,$convertSliceType($makeSlice(D,(g-h>>0)),R));}if(g>0)),R));}i=a;j=0;while(true){if(!(j=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+k])*((k<0||k>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+k]));j++;}return f;};$pkg.Dot=M;D.prototype.Dot=function(a){var a,b;b=this;return M(b,a);};$ptrType(D).prototype.Dot=function(a){return this.$get().Dot(a);};D.prototype.Cross=function(a){var a,b;b=this;if(!((b.$length===3))||!((a.$length===3))){return[D.nil,$pkg.ErrNot3Dimensional];}return[new D([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]),(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])*(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2])-(2>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+2])*(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])]),$ifaceNil];};$ptrType(D).prototype.Cross=function(a){return this.$get().Cross(a);};D.prototype.Rotate=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;c=this;d=2;e=c.$length;f=d;g=e;if(g===0){return c;}if(b.$length>0){f=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]);}if((g===1)&&!((f===2))){c=$append(c,0,0);}if((g<2&&(f===2))||((g===2)&&!((f===2)))){c=$append(c,0);}h=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);i=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);j=h;k=i;l=C.Cos(a);m=C.Sin(a);n=l;o=m;p=f;if(p===(0)){q=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=k*n-q*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=k*o+q*n);}else if(p===(1)){r=(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]);(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n+r*o);(2>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+2]=-j*o+r*n);}else if(p===(2)){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=j*n-k*o);(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=j*o+k*n);}if(g>3){return $subslice(c,0,3);}return c;};$ptrType(D).prototype.Rotate=function(a,b){return this.$get().Rotate(a,b);};D.prototype.String=function(){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a="";b=this;if(b===D.nil){a="[]";$s=-1;return a;}c=b;d=0;case 1:if(!(d=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])<1e-08&&((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e])>0){$s=3;continue;}$s=4;continue;case 3:a=a+("0 ");$s=5;continue;case 4:f=B.Sprint(new S([new $Float64(((e<0||e>=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+e]))]));$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}a=a+(f+" ");case 5:d++;$s=1;continue;case 2:a="["+$substring(a,0,(a.length-1>>0))+"]";$s=-1;return a;}return;}var $f={$blk:D.prototype.String,$c:true,$r,a,b,c,d,e,f,$s};return $f;};$ptrType(D).prototype.String=function(){return this.$get().String();};D.prototype.X=function(){var a;a=this;if(a.$length<1){return 0;}return(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);};$ptrType(D).prototype.X=function(){return this.$get().X();};D.prototype.Y=function(){var a;a=this;if(a.$length<2){return 0;}return(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);};$ptrType(D).prototype.Y=function(){return this.$get().Y();};D.prototype.Z=function(){var a;a=this;if(a.$length<3){return 0;}return(2>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+2]);};$ptrType(D).prototype.Z=function(){return this.$get().Z();};P=function(a,b,c,d){var a,b,c,d,e,f,g,h,i;e=d.$length;f=c;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return;}((h<0||h>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+h]=b*i+((h<0||h>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+h]));g++;}};Q=function(a,b,c){var a,b,c,d,e,f;d=c;e=0;while(true){if(!(e=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f]=((f<0||f>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+f])*(b));e++;}};D.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[D],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([T],[D],true)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([T],[D],true)},{prop:"Scale",name:"Scale",pkg:"",typ:$funcType([$Float64],[D],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([D],[$Bool],false)},{prop:"Magnitude",name:"Magnitude",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Unit",name:"Unit",pkg:"",typ:$funcType([],[D],false)},{prop:"Dot",name:"Dot",pkg:"",typ:$funcType([D],[$Float64],false)},{prop:"Cross",name:"Cross",pkg:"",typ:$funcType([D],[D,$error],false)},{prop:"Rotate",name:"Rotate",pkg:"",typ:$funcType([$Float64,U],[D],true)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"X",name:"X",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Y",name:"Y",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Z",name:"Z",pkg:"",typ:$funcType([],[$Float64],false)}];D.init($Float64);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrNot3Dimensional=A.New("vector is not 3 dimensional");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["github.com/solarlune/resolv"]=(function(){var $pkg={},$init,B,A,C,D,F,G,I,K,N,P,Q,S,U,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,E,H,J,L,M,O,R,T,V;B=$packages["github.com/kvartborg/vector"];A=$packages["math"];C=$packages["sort"];D=$pkg.Space=$newType(0,$kindStruct,"resolv.Space",true,"github.com/solarlune/resolv",true,function(Cells_,CellWidth_,CellHeight_){this.$val=this;if(arguments.length===0){this.Cells=Y.nil;this.CellWidth=0;this.CellHeight=0;return;}this.Cells=Cells_;this.CellWidth=CellWidth_;this.CellHeight=CellHeight_;});F=$pkg.Shape=$newType(8,$kindInterface,"resolv.Shape",true,"github.com/solarlune/resolv",true,null);G=$pkg.Line=$newType(0,$kindStruct,"resolv.Line",true,"github.com/solarlune/resolv",true,function(Start_,End_){this.$val=this;if(arguments.length===0){this.Start=B.Vector.nil;this.End=B.Vector.nil;return;}this.Start=Start_;this.End=End_;});I=$pkg.ConvexPolygon=$newType(0,$kindStruct,"resolv.ConvexPolygon",true,"github.com/solarlune/resolv",true,function(Points_,X_,Y_,Closed_){this.$val=this;if(arguments.length===0){this.Points=AC.nil;this.X=0;this.Y=0;this.Closed=false;return;}this.Points=Points_;this.X=X_;this.Y=Y_;this.Closed=Closed_;});K=$pkg.ContactSet=$newType(0,$kindStruct,"resolv.ContactSet",true,"github.com/solarlune/resolv",true,function(Points_,MTV_,Center_){this.$val=this;if(arguments.length===0){this.Points=AC.nil;this.MTV=B.Vector.nil;this.Center=B.Vector.nil;return;}this.Points=Points_;this.MTV=MTV_;this.Center=Center_;});N=$pkg.Circle=$newType(0,$kindStruct,"resolv.Circle",true,"github.com/solarlune/resolv",true,function(X_,Y_,Radius_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Radius=0;return;}this.X=X_;this.Y=Y_;this.Radius=Radius_;});P=$pkg.Projection=$newType(0,$kindStruct,"resolv.Projection",true,"github.com/solarlune/resolv",true,function(Min_,Max_){this.$val=this;if(arguments.length===0){this.Min=0;this.Max=0;return;}this.Min=Min_;this.Max=Max_;});Q=$pkg.Object=$newType(0,$kindStruct,"resolv.Object",true,"github.com/solarlune/resolv",true,function(Shape_,Space_,X_,Y_,W_,H_,TouchingCells_,Data_,ignoreList_,tags_){this.$val=this;if(arguments.length===0){this.Shape=$ifaceNil;this.Space=Z.nil;this.X=0;this.Y=0;this.W=0;this.H=0;this.TouchingCells=X.nil;this.Data=$ifaceNil;this.ignoreList=false;this.tags=AJ.nil;return;}this.Shape=Shape_;this.Space=Space_;this.X=X_;this.Y=Y_;this.W=W_;this.H=H_;this.TouchingCells=TouchingCells_;this.Data=Data_;this.ignoreList=ignoreList_;this.tags=tags_;});S=$pkg.Collision=$newType(0,$kindStruct,"resolv.Collision",true,"github.com/solarlune/resolv",true,function(checkingObject_,dx_,dy_,Objects_,Cells_){this.$val=this;if(arguments.length===0){this.checkingObject=AA.nil;this.dx=0;this.dy=0;this.Objects=AB.nil;this.Cells=X.nil;return;}this.checkingObject=checkingObject_;this.dx=dx_;this.dy=dy_;this.Objects=Objects_;this.Cells=Cells_;});U=$pkg.Cell=$newType(0,$kindStruct,"resolv.Cell",true,"github.com/solarlune/resolv",true,function(X_,Y_,Objects_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;this.Objects=AB.nil;return;}this.X=X_;this.Y=Y_;this.Objects=Objects_;});W=$ptrType(U);X=$sliceType(W);Y=$sliceType(X);Z=$ptrType(D);AA=$ptrType(Q);AB=$sliceType(AA);AC=$sliceType(B.Vector);AD=$sliceType($Float64);AE=$ptrType(G);AF=$sliceType(AE);AG=$ptrType(N);AH=$ptrType(I);AI=$ptrType(K);AJ=$sliceType($String);AK=$ptrType(S);AL=$mapType(AA,$Bool);E=function(a,b,c,d){var a,b,c,d,e,f,g;e=new D.ptr(Y.nil,c,d);e.Resize((f=a/c,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")),(g=b/d,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero")));return e;};$pkg.NewSpace=E;D.ptr.prototype.Add=function(a){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;c=a;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);e.Space=b;$r=e.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d++;$s=1;continue;case 2:$s=-1;return;}return;}var $f={$blk:D.ptr.prototype.Add,$c:true,$r,a,b,c,d,e,$s};return $f;};D.prototype.Add=function(a){return this.$val.Add(a);};D.ptr.prototype.Remove=function(a){var a,b,c,d,e,f,g,h;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=e.TouchingCells;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);h.unregister(e);g++;}e.TouchingCells=new X([]);e.Space=Z.nil;d++;}};D.prototype.Remove=function(a){return this.$val.Remove(a);};D.ptr.prototype.Objects=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=this;b=$makeMap(AA.keyFor,[]);c=new AB([]);d=a.Cells;e=0;while(true){if(!(e=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+f]));i=0;while(true){if(!(i=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+f])),((j<0||j>=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+j])).Objects;n=0;while(true){if(!(n=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+n]);p=(q=b[AA.keyFor(o)],q!==undefined?[q.v,true]:[false,false]);r=p[1];if(!r){c=$append(c,o);s=o;(b||$throwRuntimeError("assignment to entry in nil map"))[AA.keyFor(s)]={k:s,v:true};}n++;}i++;}e++;}return c;};D.prototype.Objects=function(){return this.$val.Objects();};D.ptr.prototype.Resize=function(a,b){var a,b,c,d,e,f,g;c=this;c.Cells=new Y([]);d=0;while(true){if(!(d=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+d]=$append((f=c.Cells,((d<0||d>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+d])),V(e,d))));e=e+(1)>>0;}d=d+(1)>>0;}};D.prototype.Resize=function(a,b){return this.$val.Resize(a,b);};D.ptr.prototype.Cell=function(a,b){var a,b,c,d,e,f;c=this;if(b>=0&&b=0&&a<(d=c.Cells,((b<0||b>=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length){return(e=(f=c.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((a<0||a>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+a]));}return W.nil;};D.prototype.Cell=function(a,b){return this.$val.Cell(a,b);};D.ptr.prototype.CheckCells=function(a,b,c,d,e){var a,b,c,d,e,f,g,h,i,j,k,l,m;f=this;g=a;while(true){if(!(g<(a+c>>0))){break;}h=b;while(true){if(!(h<(b+d>>0))){break;}i=f.Cell(g,h);if(!(i===W.nil)){if(e.$length>0){if(i.ContainsTags(e)){j=i.Objects;k=0;while(true){if(!(k=j.$length)?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+k]);if(l.HasTags(e)){return l;}k++;}}}else if(i.Occupied()){return(m=i.Objects,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]));}}h=h+(1)>>0;}g=g+(1)>>0;}return AA.nil;};D.prototype.CheckCells=function(a,b,c,d,e){return this.$val.CheckCells(a,b,c,d,e);};D.ptr.prototype.UnregisterAllObjects=function(){var a,b,c,d,e,f,g;a=this;b=0;while(true){if(!(b=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+b])).$length)){break;}g=(e=(f=a.Cells,((b<0||b>=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+b])),((c<0||c>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+c]));a.Remove(g.Objects);c=c+(1)>>0;}b=b+(1)>>0;}};D.prototype.UnregisterAllObjects=function(){return this.$val.UnregisterAllObjects();};D.ptr.prototype.WorldToSpace=function(a,b){var a,b,c,d,e;c=this;d=((A.Floor(a/(c.CellWidth))>>0));e=((A.Floor(b/(c.CellHeight))>>0));return[d,e];};D.prototype.WorldToSpace=function(a,b){return this.$val.WorldToSpace(a,b);};D.ptr.prototype.SpaceToWorld=function(a,b){var a,b,c,d,e;c=this;d=(($imul(a,c.CellWidth)));e=(($imul(b,c.CellHeight)));return[d,e];};D.prototype.SpaceToWorld=function(a,b){return this.$val.SpaceToWorld(a,b);};D.ptr.prototype.Height=function(){var a;a=this;return a.Cells.$length;};D.prototype.Height=function(){return this.$val.Height();};D.ptr.prototype.Width=function(){var a,b;a=this;if(a.Cells.$length>0){return(b=a.Cells,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])).$length;}return 0;};D.prototype.Width=function(){return this.$val.Width();};D.ptr.prototype.CellsInLine=function(a,b,c,d){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;e=this;f=new X([]);g=e.Cell(a,b);h=e.Cell(c,d);if(!(g===W.nil)&&!(h===W.nil)){i=new B.Vector([((c-a>>0)),((d-b>>0))]).Unit();(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0]=(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])*(((j=e.CellWidth/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero")))));(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]=(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])*(((k=e.CellHeight/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero")))));l=e.SpaceToWorld(a,b);m=l[0];n=l[1];q=new B.Vector([m+((o=e.CellWidth/2,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))),n+((p=e.CellHeight/2,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero")))]);r=false;while(true){if(!(!(g===W.nil))){break;}if(g===h){f=$append(f,g);break;}f=$append(f,g);if(r){(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]=(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1])+((1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1])));}else{(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])+((0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])));}s=e.WorldToSpace((0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]),(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]));t=s[0];u=s[1];v=e.Cell(t,u);if(!(v===g)){g=v;}r=!r;}}return f;};D.prototype.CellsInLine=function(a,b,c,d){return this.$val.CellsInLine(a,b,c,d);};H=function(a,b,c,d){var a,b,c,d;return new G.ptr(new B.Vector([a,b]),new B.Vector([c,d]));};$pkg.NewLine=H;G.ptr.prototype.Project=function(a){var a,b;b=this;return b.Vector().Scale(a.Dot(b.Start.Sub(new AC([b.End]))));};G.prototype.Project=function(a){return this.$val.Project(a);};G.ptr.prototype.Normal=function(){var a,b;a=this;b=a.Vector();return new B.Vector([(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]),-(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])]).Unit();};G.prototype.Normal=function(){return this.$val.Normal();};G.ptr.prototype.Vector=function(){var a;a=this;return a.End.Clone().Sub(new AC([a.Start])).Unit();};G.prototype.Vector=function(){return this.$val.Vector();};G.ptr.prototype.IntersectionPointsLine=function(a){var a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=this;k=((c=b.End,(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]))-(d=b.Start,(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])))*((e=a.End,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(f=a.Start,(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])))-((g=a.End,(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]))-(h=a.Start,(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])))*((i=b.End,(1>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+1]))-(j=b.Start,(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1])));if(!((k===0))){t=((((l=b.Start,(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))-(m=a.Start,(1>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+1])))*((n=a.End,(0>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+0]))-(o=a.Start,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0]))))-(((p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))-(q=a.Start,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0])))*((r=a.End,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))-(s=a.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))))+1)/k;ac=((((u=b.Start,(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]))-(v=a.Start,(1>=v.$length?($throwRuntimeError("index out of range"),undefined):v.$array[v.$offset+1])))*((w=b.End,(0>=w.$length?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+0]))-(x=b.Start,(0>=x.$length?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+0]))))-(((y=b.Start,(0>=y.$length?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+0]))-(z=a.Start,(0>=z.$length?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+0])))*((aa=b.End,(1>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+1]))-(ab=b.Start,(1>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+1]))))+1)/k;if((0=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+0]))-(ae=b.Start,(0>=ae.$length?($throwRuntimeError("index out of range"),undefined):ae.$array[ae.$offset+0]));ai=(ag=b.End,(1>=ag.$length?($throwRuntimeError("index out of range"),undefined):ag.$array[ag.$offset+1]))-(ah=b.Start,(1>=ah.$length?($throwRuntimeError("index out of range"),undefined):ah.$array[ah.$offset+1]));return new B.Vector([(aj=b.Start,(0>=aj.$length?($throwRuntimeError("index out of range"),undefined):aj.$array[aj.$offset+0]))+(t*af),(ak=b.Start,(1>=ak.$length?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+1]))+(t*ai)]);}}return B.Vector.nil;};G.prototype.IntersectionPointsLine=function(a){return this.$val.IntersectionPointsLine(a);};G.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=this;c=new AC([]);d=new B.Vector([a.X,a.Y]);e=b.Start.Sub(new AC([d]));f=b.End.Sub(new AC([d]));g=f.Sub(new AC([e]));h=(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])+(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]);i=2*(((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])));j=((0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])*(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]))+((1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])*(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))-(a.Radius*a.Radius);k=i*i-(4*h*j);if(k<0){}else if(k===0){l=-i/(2*h);if(l>=0&&l<=1){c=$append(c,new B.Vector([(m=b.Start,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0]))+l*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(n=b.Start,(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1]))+l*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}else{o=(-i+A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new B.Vector([(p=b.Start,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(q=b.Start,(1>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}o=(-i-A.Sqrt(k))/(2*h);if(o>=0&&o<=1){c=$append(c,new B.Vector([(r=b.Start,(0>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+0]))+o*(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(s=b.Start,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]))+o*(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1])]));}}return c;};G.prototype.IntersectionPointsCircle=function(a){return this.$val.IntersectionPointsCircle(a);};J=function(a){var a,b;b=new I.ptr(new AC([]),0,0,true);b.AddPoints(a);return b;};$pkg.NewConvexPolygon=J;I.ptr.prototype.Clone=function(){var a,b,c,d,e,f;a=this;b=new AC([]);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Clone());d++;}f=J(AD.nil);f.X=a.X;f.Y=a.Y;f.AddPointsVec(b);f.Closed=a.Closed;return f;};I.prototype.Clone=function(){return this.$val.Clone();};I.ptr.prototype.AddPointsVec=function(a){var a,b;b=this;b.Points=$appendSlice(b.Points,a);};I.prototype.AddPointsVec=function(a){return this.$val.AddPointsVec(a);};I.ptr.prototype.AddPoints=function(a){var a,b,c,d;b=this;c=0;while(true){if(!(c=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+c]),(d=c+1>>0,((d<0||d>=a.$length)?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+d]))]));c=c+(2)>>0;}};I.prototype.AddPoints=function(a){return this.$val.AddPoints(a);};I.ptr.prototype.Lines=function(){var a,b,c,d,e,f,g,h,i,j;a=this;b=new AF([]);c=a.Transformed();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]);g=e;h=f;if(d<(c.$length-1>>0)){h=(i=d+1>>0,((i<0||i>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+i]));}else if(!a.Closed){break;}j=H((0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]),(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));b=$append(b,j);d=d+(1)>>0;}return b;};I.prototype.Lines=function(){return this.$val.Lines();};I.ptr.prototype.Transformed=function(){var a,b,c,d,e;a=this;b=new AC([]);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,new B.Vector([(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])+a.X,(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])+a.Y]));d++;}return b;};I.prototype.Transformed=function(){return this.$val.Transformed();};I.ptr.prototype.Bounds=function(){var a,b,c,d,e,f,g,h;a=this;b=a.Transformed();e=new B.Vector([(c=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])),(d=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]),(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]))]);f=e.Clone();g=0;while(true){if(!(g=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+g]);if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])<(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])){(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}else if((0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0])>(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0])){(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]));}if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])<(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])){(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}else if((1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])>(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1])){(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1]));}g=g+(1)>>0;}return[e,f];};I.prototype.Bounds=function(){return this.$val.Bounds();};I.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};I.prototype.Position=function(){return this.$val.Position();};I.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};I.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};I.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};I.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};I.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};I.prototype.Move=function(a,b){return this.$val.Move(a,b);};I.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};I.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};I.ptr.prototype.Center=function(){var a,b,c,d,e;a=this;b=new B.Vector([0,0]);c=a.Transformed();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b.Add(new AC([e]));d++;}(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])/((a.Transformed().$length)));(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1]=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])/((a.Transformed().$length)));return b;};I.prototype.Center=function(){return this.$val.Center();};I.ptr.prototype.Project=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=this;a=a.Unit();c=b.Transformed();f=a.Dot(new B.Vector([(d=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0])),(e=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]),(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1]))]));g=f;h=1;while(true){if(!(h=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(j=((h<0||h>=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+h]),(1>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+1]))]));if(kg){g=k;}h=h+(1)>>0;}return new P.ptr(f,g);};I.prototype.Project=function(a){return this.$val.Project(a);};I.ptr.prototype.SATAxes=function(){var a,b,c,d,e;a=this;b=new AC([]);c=a.Lines();d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);b=$append(b,e.Normal());d++;}return b;};I.prototype.SATAxes=function(){return this.$val.SATAxes();};I.ptr.prototype.PointInside=function(a){var a,b,c,d,e,f,g;b=this;c=H((0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]),(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]),(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0])+9.99999999999e+11,(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]));d=0;e=b.Lines();f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!(g.IntersectionPointsLine(c)===B.Vector.nil)){d=d+(1)>>0;}f++;}return d===1;};I.prototype.PointInside=function(a){return this.$val.PointInside(a);};L=function(){return new K.ptr(new AC([]),new B.Vector([0,0]),new B.Vector([0,0]));};$pkg.NewContactSet=L;K.ptr.prototype.LeftmostPoint=function(){var a,b,c,d,e;a=this;b=B.Vector.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.Vector.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])<(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};K.prototype.LeftmostPoint=function(){return this.$val.LeftmostPoint();};K.ptr.prototype.RightmostPoint=function(){var a,b,c,d,e;a=this;b=B.Vector.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.Vector.nil||(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0])>(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])){b=e;}d++;}return b;};K.prototype.RightmostPoint=function(){return this.$val.RightmostPoint();};K.ptr.prototype.TopmostPoint=function(){var a,b,c,d,e;a=this;b=B.Vector.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.Vector.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])<(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};K.prototype.TopmostPoint=function(){return this.$val.TopmostPoint();};K.ptr.prototype.BottommostPoint=function(){var a,b,c,d,e;a=this;b=B.Vector.nil;c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(b===B.Vector.nil||(1>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+1])>(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])){b=e;}d++;}return b;};K.prototype.BottommostPoint=function(){return this.$val.BottommostPoint();};I.ptr.prototype.Intersection=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=L();f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=$assertType(c,AG,true);i=h[0];j=h[1];if(j){k=d.Lines();l=0;while(true){if(!(l=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);e.Points=$appendSlice(e.Points,m.IntersectionPointsCircle(i));l++;}}else{n=$assertType(c,AH,true);o=n[0];p=n[1];if(p){q=d.Lines();r=0;while(true){if(!(r=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=o.Lines();u=0;while(true){if(!(u=t.$length)?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+u]);w=s.IntersectionPointsLine(v);if(!(w===B.Vector.nil)){e.Points=$append(e.Points,w);}u++;}r++;}}}if(e.Points.$length>0){$s=1;continue;}$s=2;continue;case 1:x=e.Points;y=0;while(true){if(!(y=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+y]);e.Center=e.Center.Add(new AC([z]));y++;}(ab=e.Center,(0>=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0]=(aa=e.Center,(0>=aa.$length?($throwRuntimeError("index out of range"),undefined):aa.$array[aa.$offset+0]))/((e.Points.$length))));(ad=e.Center,(1>=ad.$length?($throwRuntimeError("index out of range"),undefined):ad.$array[ad.$offset+1]=(ac=e.Center,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))/((e.Points.$length))));ae=d.calculateMTV(e,c);$s=4;case 4:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}af=ae;if(!(af===B.Vector.nil)){e.MTV=af;}$s=3;continue;case 2:e=AI.nil;case 3:if(!(e===AI.nil)&&(!((a===0))||!((b===0)))){ag=new B.Vector([a,b]).Magnitude();ah=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(ah-ag);}d.X=f;d.Y=g;$s=-1;return e;}return;}var $f={$blk:I.ptr.prototype.Intersection,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};I.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};I.ptr.prototype.calculateMTV=function(a,b){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=[c];d=[d];e=this;f=new B.Vector([0,0]);g=new B.Vector([1.7976931348623157e+308,0]);h=b;if($assertType(h,AH,true)[1]){$s=1;continue;}if($assertType(h,AG,true)[1]){$s=2;continue;}$s=3;continue;case 1:i=h.$val;k=e.SATAxes();l=0;while(true){if(!(l=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+l]);if(!$clone(e.Project(m),P).Overlapping($clone(i.Project(m),P))){$s=-1;return B.Vector.nil;}n=$clone(e.Project(m),P).Overlap($clone(i.Project(m),P));if(g.Magnitude()>n){g=m.Scale(n);}l++;}o=i.SATAxes();p=0;while(true){if(!(p=o.$length)?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+p]);if(!$clone(e.Project(q),P).Overlapping($clone(i.Project(q),P))){$s=-1;return B.Vector.nil;}r=$clone(e.Project(q),P).Overlap($clone(i.Project(q),P));if(g.Magnitude()>r){g=q.Scale(r);}p++;}$s=3;continue;case 2:j=h.$val;d[0]=$appendSlice(new AC([]),e.Transformed());d[0]=$append(d[0],a.Center);c[0]=new B.Vector([j.X,j.Y]);$r=C.Slice(d[0],(function(c,d){return function(s,t){var s,t;return((s<0||s>=d[0].$length)?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+s]).Sub(new AC([c[0]])).Magnitude()<((t<0||t>=d[0].$length)?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+t]).Sub(new AC([c[0]])).Magnitude();};})(c,d));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=new B.Vector([(0>=c[0].$length?($throwRuntimeError("index out of range"),undefined):c[0].$array[c[0].$offset+0])-(s=(0>=d[0].$length?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+0]),(0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])),(1>=c[0].$length?($throwRuntimeError("index out of range"),undefined):c[0].$array[c[0].$offset+1])-(t=(0>=d[0].$length?($throwRuntimeError("index out of range"),undefined):d[0].$array[d[0].$offset+0]),(1>=t.$length?($throwRuntimeError("index out of range"),undefined):t.$array[t.$offset+1]))]);g=g.Unit().Scale(g.Magnitude()-j.Radius);case 3:(0>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+0]=(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0]));(1>=f.$length?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+1]=(1>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+1]));$s=-1;return f;}return;}var $f={$blk:I.ptr.prototype.calculateMTV,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s};return $f;};I.prototype.calculateMTV=function(a,b){return this.$val.calculateMTV(a,b);};I.ptr.prototype.ContainedBy=function(a){var a,b,c,d,e,f,g,h,i,j;b=this;c=a;if($assertType(c,AH,true)[1]){d=c.$val;e=b.SATAxes();f=0;while(true){if(!(f=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+f]);if(!$clone(b.Project(g),P).IsInside($clone(d.Project(g),P))){return false;}f++;}h=d.SATAxes();i=0;while(true){if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);if(!$clone(b.Project(j),P).IsInside($clone(d.Project(j),P))){return false;}i++;}}return true;};I.prototype.ContainedBy=function(a){return this.$val.ContainedBy(a);};I.ptr.prototype.FlipH=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]=-(0>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+0]));c++;}a.ReverseVertexOrder();};I.prototype.FlipH=function(){return this.$val.FlipH();};I.ptr.prototype.FlipV=function(){var a,b,c,d;a=this;b=a.Points;c=0;while(true){if(!(c=b.$length)?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+c]);(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]=-(1>=d.$length?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+1]));c++;}a.ReverseVertexOrder();};I.prototype.FlipV=function(){return this.$val.FlipV();};I.ptr.prototype.ReverseVertexOrder=function(){var a,b,c,d,e;a=this;c=new AC([(b=a.Points,(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0]))]);d=a.Points.$length-1>>0;while(true){if(!(d>=1)){break;}c=$append(c,(e=a.Points,((d<0||d>=e.$length)?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+d])));d=d-(1)>>0;}a.Points=c;};I.prototype.ReverseVertexOrder=function(){return this.$val.ReverseVertexOrder();};M=function(a,b,c,d){var a,b,c,d;return J(new AD([a,b,a+c,b,a+c,b+d,a,b+d]));};$pkg.NewRectangle=M;O=function(a,b,c){var a,b,c,d;d=new N.ptr(a,b,c);return d;};$pkg.NewCircle=O;N.ptr.prototype.Clone=function(){var a;a=this;return O(a.X,a.Y,a.Radius);};N.prototype.Clone=function(){return this.$val.Clone();};N.ptr.prototype.Bounds=function(){var a;a=this;return[new B.Vector([a.X-a.Radius,a.Y-a.Radius]),new B.Vector([a.X+a.Radius,a.Y+a.Radius])];};N.prototype.Bounds=function(){return this.$val.Bounds();};N.ptr.prototype.Intersection=function(a,b,c){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=this;e=AI.nil;f=d.X;g=d.Y;d.X=d.X+(a);d.Y=d.Y+(b);h=c;if($assertType(h,AH,true)[1]){$s=1;continue;}if($assertType(h,AG,true)[1]){$s=2;continue;}$s=3;continue;case 1:i=h.$val;k=i.Intersection(-a,-b,d);$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}e=k;if(!(e===AI.nil)){e.MTV=e.MTV.Scale(-1);}$s=3;continue;case 2:j=h.$val;e=L();e.Points=d.IntersectionPointsCircle(j);if(e.Points.$length===0){$s=-1;return AI.nil;}e.MTV=new B.Vector([d.X-j.X,d.Y-j.Y]);l=e.MTV.Magnitude();e.MTV=e.MTV.Unit().Scale(d.Radius+j.Radius-l);m=e.Points;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);e.Center=e.Center.Add(new AC([o]));n++;}(q=e.Center,(0>=q.$length?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+0]=(p=e.Center,(0>=p.$length?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+0]))/((e.Points.$length))));(s=e.Center,(1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1]=(r=e.Center,(1>=r.$length?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+1]))/((e.Points.$length))));case 3:d.X=f;d.Y=g;$s=-1;return e;}return;}var $f={$blk:N.ptr.prototype.Intersection,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};N.prototype.Intersection=function(a,b,c){return this.$val.Intersection(a,b,c);};N.ptr.prototype.Move=function(a,b){var a,b,c;c=this;c.X=c.X+(a);c.Y=c.Y+(b);};N.prototype.Move=function(a,b){return this.$val.Move(a,b);};N.ptr.prototype.MoveVec=function(a){var a,b;b=this;b.X=b.X+(a.X());b.Y=b.Y+(a.Y());};N.prototype.MoveVec=function(a){return this.$val.MoveVec(a);};N.ptr.prototype.SetPosition=function(a,b){var a,b,c;c=this;c.X=a;c.Y=b;};N.prototype.SetPosition=function(a,b){return this.$val.SetPosition(a,b);};N.ptr.prototype.SetPositionVec=function(a){var a,b;b=this;b.X=a.X();b.Y=a.Y();};N.prototype.SetPositionVec=function(a){return this.$val.SetPositionVec(a);};N.ptr.prototype.Position=function(){var a;a=this;return[a.X,a.Y];};N.prototype.Position=function(){return this.$val.Position();};N.ptr.prototype.PointInside=function(a){var a,b;b=this;return a.Sub(new AC([new B.Vector([b.X,b.Y])])).Magnitude()<=b.Radius;};N.prototype.PointInside=function(a){return this.$val.PointInside(a);};N.ptr.prototype.IntersectionPointsCircle=function(a){var a,b,c,d,e,f,g;b=this;c=A.Sqrt(A.Pow(a.X-b.X,2)+A.Pow(a.Y-b.Y,2));if(c>b.Radius+a.Radius||c0;};P.prototype.Overlapping=function(a){return this.$val.Overlapping(a);};P.ptr.prototype.Overlap=function(a){var a,b;b=this;return A.Min(b.Max,a.Max)-A.Max(b.Min,a.Min);};P.prototype.Overlap=function(a){return this.$val.Overlap(a);};P.ptr.prototype.IsInside=function(a){var a,b;b=this;return b.Min>=a.Min&&b.Max<=a.Max;};P.prototype.IsInside=function(a){return this.$val.IsInside(a);};R=function(a,b,c,d,e){var a,b,c,d,e,f;f=new Q.ptr($ifaceNil,Z.nil,a,b,c,d,X.nil,$ifaceNil,$makeMap(AA.keyFor,[]),new AJ([]));if(e.$length>0){f.AddTags(e);}return f;};$pkg.NewObject=R;Q.ptr.prototype.Clone=function(){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{});$s=$s||0;s:while(true){switch($s){case 0:a=this;b=R(a.X,a.Y,a.W,a.H,a.Tags());b.Data=a.Data;if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:c=a.Shape.Clone();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}$r=b.SetShape(c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:d=a.ignoreList;e=0;f=$keys(d);while(true){if(!(e>0;}h=h+(1)>>0;}}if(!($interfaceIsEqual(a.Shape,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=a.Shape.SetPosition(a.X,a.Y);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.Update,$c:true,$r,a,b,c,d,e,f,g,h,i,j,$s};return $f;};Q.prototype.Update=function(){return this.$val.Update();};Q.ptr.prototype.AddTags=function(a){var a,b;b=this;b.tags=$appendSlice(b.tags,a);};Q.prototype.AddTags=function(a){return this.$val.AddTags(a);};Q.ptr.prototype.RemoveTags=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(i===e){b.tags=$appendSlice($subslice(b.tags,0,h),$subslice(b.tags,(h+1>>0)));break;}g++;}d++;}};Q.prototype.RemoveTags=function(a){return this.$val.RemoveTags(a);};Q.ptr.prototype.HasTags=function(a){var a,b,c,d,e,f,g,h;b=this;c=a;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=b.tags;g=0;while(true){if(!(g=f.$length)?($throwRuntimeError("index out of range"),undefined):f.$array[f.$offset+g]);if(h===e){return true;}g++;}d++;}return false;};Q.prototype.HasTags=function(a){return this.$val.HasTags(a);};Q.ptr.prototype.Tags=function(){var a;a=this;return $appendSlice(new AJ([]),a.tags);};Q.prototype.Tags=function(){return this.$val.Tags();};Q.ptr.prototype.SetShape=function(a){var{a,b,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=this;if(!($interfaceIsEqual(b.Shape,a))){$s=1;continue;}$s=2;continue;case 1:b.Shape=a;$r=b.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;return;}return;}var $f={$blk:Q.ptr.prototype.SetShape,$c:true,$r,a,b,$s};return $f;};Q.prototype.SetShape=function(a){return this.$val.SetShape(a);};Q.ptr.prototype.BoundsToSpace=function(a,b){var a,b,c,d,e,f,g,h,i;c=this;d=c.Space.WorldToSpace(c.X+a,c.Y+b);e=d[0];f=d[1];g=c.Space.WorldToSpace(c.X+c.W+a-1,c.Y+c.H+b-1);h=g[0];i=g[1];return[e,f,h,i];};Q.prototype.BoundsToSpace=function(a,b){return this.$val.BoundsToSpace(a,b);};Q.ptr.prototype.SharesCells=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.Contains(a)){return true;}d++;}return false;};Q.prototype.SharesCells=function(a){return this.$val.SharesCells(a);};Q.ptr.prototype.SharesCellsTags=function(a){var a,b,c,d,e;b=this;c=b.TouchingCells;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.ContainsTags(a)){return true;}d++;}return false;};Q.prototype.SharesCellsTags=function(a){return this.$val.SharesCellsTags(a);};Q.ptr.prototype.Center=function(){var a;a=this;return[a.X+(a.W/2),a.Y+(a.H/2)];};Q.prototype.Center=function(){return this.$val.Center();};Q.ptr.prototype.SetCenter=function(a,b){var a,b,c;c=this;c.X=a-(c.W/2);c.Y=b-(c.H/2);};Q.prototype.SetCenter=function(a,b){return this.$val.SetCenter(a,b);};Q.ptr.prototype.CellPosition=function(){var a,b;a=this;b=a.Center();return a.Space.WorldToSpace(b[0],b[1]);};Q.prototype.CellPosition=function(){return this.$val.CellPosition();};Q.ptr.prototype.SetRight=function(a){var a,b;b=this;b.X=a-b.W;};Q.prototype.SetRight=function(a){return this.$val.SetRight(a);};Q.ptr.prototype.SetBottom=function(a){var a,b;b=this;b.Y=a-b.H;};Q.prototype.SetBottom=function(a){return this.$val.SetBottom(a);};Q.ptr.prototype.Bottom=function(){var a;a=this;return a.Y+a.H;};Q.prototype.Bottom=function(){return this.$val.Bottom();};Q.ptr.prototype.Right=function(){var a;a=this;return a.X+a.W;};Q.prototype.Right=function(){return this.$val.Right();};Q.ptr.prototype.SetBounds=function(a,b){var a,b,c;c=this;c.X=(0>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+0]);c.Y=(1>=a.$length?($throwRuntimeError("index out of range"),undefined):a.$array[a.$offset+1]);c.W=(0>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+0])-c.X;c.H=(1>=b.$length?($throwRuntimeError("index out of range"),undefined):b.$array[b.$offset+1])-c.Y;};Q.prototype.SetBounds=function(a,b){return this.$val.SetBounds(a,b);};Q.ptr.prototype.Check=function(a,b,c){var{a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=[d];e=[e];f=[f];g=[g];h=this;if(h.Space===Z.nil){$s=-1;return AK.nil;}d[0]=T();d[0].checkingObject=h;if(a<0){a=A.Min(a,-1);}else if(a>0){a=A.Max(a,1);}if(b<0){b=A.Min(b,-1);}else if(b>0){b=A.Max(b,1);}d[0].dx=a;d[0].dy=b;i=h.BoundsToSpace(a,b);j=i[0];k=i[1];l=i[2];m=i[3];n=$makeMap(AA.keyFor,[]);o=$makeMap(W.keyFor,[]);p=k;while(true){if(!(p<=m)){break;}q=j;while(true){if(!(q<=l)){break;}r=h.Space.Cell(q,p);if(!(r===W.nil)){s=r.Objects;t=0;while(true){if(!(t=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);w=(v=h.ignoreList[AA.keyFor(u)],v!==undefined?v.v:false);if(u===h||w){t++;continue;}x=(y=n[AA.keyFor(u)],y!==undefined?[y.v,true]:[false,false]);z=x[1];if(((c.$length===0)||u.HasTags(c))&&!z){d[0].Objects=$append(d[0].Objects,u);aa=u;(n||$throwRuntimeError("assignment to entry in nil map"))[AA.keyFor(aa)]={k:aa,v:true};ab=(ac=o[W.keyFor(r)],ac!==undefined?[ac.v,true]:[false,false]);ad=ab[1];if(!ad){d[0].Cells=$append(d[0].Cells,r);ae=r;(o||$throwRuntimeError("assignment to entry in nil map"))[W.keyFor(ae)]={k:ae,v:true};}t++;continue;}t++;}}q=q+(1)>>0;}p=p+(1)>>0;}if(d[0].Objects.$length===0){$s=-1;return AK.nil;}af=d[0].checkingObject.Center();ag=af[0];ah=af[1];g[0]=new B.Vector([ag,ah]);$r=C.Slice(d[0].Objects,(function(d,e,f,g){return function(ai,aj){var ai,aj,ak,al,am,an,ao,ap,aq,ar;ak=(al=d[0].Objects,((ai<0||ai>=al.$length)?($throwRuntimeError("index out of range"),undefined):al.$array[al.$offset+ai])).Center();am=ak[0];an=ak[1];ao=(ap=d[0].Objects,((aj<0||aj>=ap.$length)?($throwRuntimeError("index out of range"),undefined):ap.$array[ap.$offset+aj])).Center();aq=ao[0];ar=ao[1];return new B.Vector([am,an]).Sub(new AC([g[0]])).Magnitude()=ak.$length)?($throwRuntimeError("index out of range"),undefined):ak.$array[ak.$offset+ai])).X,f[0]))+((al=f[0]/2,(al===al&&al!==1/0&&al!==-1/0)?al>>0:$throwRuntimeError("integer divide by zero")))>>0)),((($imul((am=d[0].Cells,((ai<0||ai>=am.$length)?($throwRuntimeError("index out of range"),undefined):am.$array[am.$offset+ai])).Y,e[0]))+((an=e[0]/2,(an===an&&an!==1/0&&an!==-1/0)?an>>0:$throwRuntimeError("integer divide by zero")))>>0))]).Sub(new AC([g[0]])).Magnitude()=ao.$length)?($throwRuntimeError("index out of range"),undefined):ao.$array[ao.$offset+aj])).X,f[0]))+((ap=f[0]/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero")))>>0)),((($imul((aq=d[0].Cells,((aj<0||aj>=aq.$length)?($throwRuntimeError("index out of range"),undefined):aq.$array[aq.$offset+aj])).Y,e[0]))+((ar=e[0]/2,(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>0:$throwRuntimeError("integer divide by zero")))>>0))]).Sub(new AC([g[0]])).Magnitude();};})(d,e,f,g));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;return d[0];}return;}var $f={$blk:Q.ptr.prototype.Check,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};Q.prototype.Check=function(a,b,c){return this.$val.Check(a,b,c);};Q.ptr.prototype.Overlaps=function(a){var a,b;b=this;return a.X<=b.X+b.W&&a.X+a.W>=b.X&&a.Y<=b.Y+b.H&&a.Y+a.H>=b.Y;};Q.prototype.Overlaps=function(a){return this.$val.Overlaps(a);};Q.ptr.prototype.AddToIgnoreList=function(a){var a,b,c;b=this;c=a;(b.ignoreList||$throwRuntimeError("assignment to entry in nil map"))[AA.keyFor(c)]={k:c,v:true};};Q.prototype.AddToIgnoreList=function(a){return this.$val.AddToIgnoreList(a);};Q.ptr.prototype.RemoveFromIgnoreList=function(a){var a,b;b=this;delete b.ignoreList[AA.keyFor(a)];};Q.prototype.RemoveFromIgnoreList=function(a){return this.$val.RemoveFromIgnoreList(a);};T=function(){return new S.ptr(AA.nil,0,0,new AB([]),X.nil);};$pkg.NewCollision=T;S.ptr.prototype.HasTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===b.checkingObject){d++;continue;}if(e.HasTags(a)){return true;}d++;}return false;};S.prototype.HasTags=function(a){return this.$val.HasTags(a);};S.ptr.prototype.ObjectsByTags=function(a){var a,b,c,d,e,f;b=this;c=new AB([]);d=b.Objects;e=0;while(true){if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);if(f===b.checkingObject){e++;continue;}if(f.HasTags(a)){c=$append(c,f);}e++;}return c;};S.prototype.ObjectsByTags=function(a){return this.$val.ObjectsByTags(a);};S.ptr.prototype.ContactWithObject=function(a){var a,b,c;b=this;c=new B.Vector([0,0]);if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X+a.W-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=a.X-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y+a.H-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=a.Y-b.checkingObject.H-b.checkingObject.Y);}return c;};S.prototype.ContactWithObject=function(a){return this.$val.ContactWithObject(a);};S.ptr.prototype.ContactWithCell=function(a){var a,b,c,d,e;b=this;c=new B.Vector([0,0]);d=(($imul(a.X,b.checkingObject.Space.CellWidth)));e=(($imul(a.Y,b.checkingObject.Space.CellHeight)));if(b.dx<0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d+(b.checkingObject.Space.CellWidth)-b.checkingObject.X);}else if(b.dx>0){(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0]=d-b.checkingObject.W-b.checkingObject.X);}if(b.dy<0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e+(b.checkingObject.Space.CellHeight)-b.checkingObject.Y);}else if(b.dy>0){(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]=e-b.checkingObject.H-b.checkingObject.Y);}return c;};S.prototype.ContactWithCell=function(a){return this.$val.ContactWithCell(a);};S.ptr.prototype.SlideAgainstCell=function(a,b){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;c=this;d=c.checkingObject.Space;f=(e=c.Cells,(0>=e.$length?($throwRuntimeError("index out of range"),undefined):e.$array[e.$offset+0]));g=d.SpaceToWorld(f.X,f.Y);h=g[0];i=g[1];j=(d.CellWidth)/2;k=(d.CellHeight)/2;h=h+(j);i=i+(k);l=c.checkingObject.Center();m=l[0];n=l[1];o=m-h;p=n-i;q=d.Cell(f.X-1>>0,f.Y);r=d.Cell(f.X+1>>0,f.Y);s=d.Cell(f.X,f.Y-1>>0);t=d.Cell(f.X,f.Y+1>>0);u=new B.Vector([0,0]);if(!((c.dy===0))){if(o>0&&(r===W.nil||!r.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h+j-c.checkingObject.X);}else if(o<0&&(q===W.nil||!q.ContainsTags(b))){(0>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+0]=h-j-(c.checkingObject.X+c.checkingObject.W));}else{return B.Vector.nil;}}if(!((c.dx===0))){if(p>0&&(t===W.nil||!t.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i+k-c.checkingObject.Y);}else if(p<0&&(s===W.nil||!s.ContainsTags(b))){(1>=u.$length?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+1]=i-k-(c.checkingObject.Y+c.checkingObject.H));}else{return B.Vector.nil;}}return u;};S.prototype.SlideAgainstCell=function(a,b){return this.$val.SlideAgainstCell(a,b);};V=function(a,b){var a,b;return new U.ptr(a,b,new AB([]));};U.ptr.prototype.register=function(a){var a,b;b=this;if(!b.Contains(a)){b.Objects=$append(b.Objects,a);}};U.prototype.register=function(a){return this.$val.register(a);};U.ptr.prototype.unregister=function(a){var a,b,c,d,e,f,g,h,i;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(f===a){(i=b.Objects,((e<0||e>=i.$length)?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+e]=(g=b.Objects,h=b.Objects.$length-1>>0,((h<0||h>=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]))));b.Objects=$subslice(b.Objects,0,(b.Objects.$length-1>>0));break;}d++;}};U.prototype.unregister=function(a){return this.$val.unregister(a);};U.ptr.prototype.Contains=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e===a){return true;}d++;}return false;};U.prototype.Contains=function(a){return this.$val.Contains(a);};U.ptr.prototype.ContainsTags=function(a){var a,b,c,d,e;b=this;c=b.Objects;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.HasTags(a)){return true;}d++;}return false;};U.prototype.ContainsTags=function(a){return this.$val.ContainsTags(a);};U.ptr.prototype.Occupied=function(){var a;a=this;return a.Objects.$length>0;};U.prototype.Occupied=function(){return this.$val.Occupied();};Z.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([AB],[],true)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([AB],[],true)},{prop:"Objects",name:"Objects",pkg:"",typ:$funcType([],[AB],false)},{prop:"Resize",name:"Resize",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Cell",name:"Cell",pkg:"",typ:$funcType([$Int,$Int],[W],false)},{prop:"CheckCells",name:"CheckCells",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,AJ],[AA],true)},{prop:"UnregisterAllObjects",name:"UnregisterAllObjects",pkg:"",typ:$funcType([],[],false)},{prop:"WorldToSpace",name:"WorldToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int],false)},{prop:"SpaceToWorld",name:"SpaceToWorld",pkg:"",typ:$funcType([$Int,$Int],[$Float64,$Float64],false)},{prop:"Height",name:"Height",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CellsInLine",name:"CellsInLine",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[X],false)}];AE.methods=[{prop:"Project",name:"Project",pkg:"",typ:$funcType([B.Vector],[B.Vector],false)},{prop:"Normal",name:"Normal",pkg:"",typ:$funcType([],[B.Vector],false)},{prop:"Vector",name:"Vector",pkg:"",typ:$funcType([],[B.Vector],false)},{prop:"IntersectionPointsLine",name:"IntersectionPointsLine",pkg:"",typ:$funcType([AE],[B.Vector],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AG],[AC],false)}];AH.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[F],false)},{prop:"AddPointsVec",name:"AddPointsVec",pkg:"",typ:$funcType([AC],[],true)},{prop:"AddPoints",name:"AddPoints",pkg:"",typ:$funcType([AD],[],true)},{prop:"Lines",name:"Lines",pkg:"",typ:$funcType([],[AF],false)},{prop:"Transformed",name:"Transformed",pkg:"",typ:$funcType([],[AC],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B.Vector,B.Vector],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B.Vector],[],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B.Vector],[],false)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[B.Vector],false)},{prop:"Project",name:"Project",pkg:"",typ:$funcType([B.Vector],[P],false)},{prop:"SATAxes",name:"SATAxes",pkg:"",typ:$funcType([],[AC],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B.Vector],[$Bool],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,F],[AI],false)},{prop:"calculateMTV",name:"calculateMTV",pkg:"github.com/solarlune/resolv",typ:$funcType([AI,F],[B.Vector],false)},{prop:"ContainedBy",name:"ContainedBy",pkg:"",typ:$funcType([F],[$Bool],false)},{prop:"FlipH",name:"FlipH",pkg:"",typ:$funcType([],[],false)},{prop:"FlipV",name:"FlipV",pkg:"",typ:$funcType([],[],false)},{prop:"ReverseVertexOrder",name:"ReverseVertexOrder",pkg:"",typ:$funcType([],[],false)}];AI.methods=[{prop:"LeftmostPoint",name:"LeftmostPoint",pkg:"",typ:$funcType([],[B.Vector],false)},{prop:"RightmostPoint",name:"RightmostPoint",pkg:"",typ:$funcType([],[B.Vector],false)},{prop:"TopmostPoint",name:"TopmostPoint",pkg:"",typ:$funcType([],[B.Vector],false)},{prop:"BottommostPoint",name:"BottommostPoint",pkg:"",typ:$funcType([],[B.Vector],false)}];AG.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[F],false)},{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B.Vector,B.Vector],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,F],[AI],false)},{prop:"Move",name:"Move",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"MoveVec",name:"MoveVec",pkg:"",typ:$funcType([B.Vector],[],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"SetPositionVec",name:"SetPositionVec",pkg:"",typ:$funcType([B.Vector],[],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"PointInside",name:"PointInside",pkg:"",typ:$funcType([B.Vector],[$Bool],false)},{prop:"IntersectionPointsCircle",name:"IntersectionPointsCircle",pkg:"",typ:$funcType([AG],[AC],false)}];P.methods=[{prop:"Overlapping",name:"Overlapping",pkg:"",typ:$funcType([P],[$Bool],false)},{prop:"Overlap",name:"Overlap",pkg:"",typ:$funcType([P],[$Float64],false)},{prop:"IsInside",name:"IsInside",pkg:"",typ:$funcType([P],[$Bool],false)}];AA.methods=[{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[AA],false)},{prop:"Update",name:"Update",pkg:"",typ:$funcType([],[],false)},{prop:"AddTags",name:"AddTags",pkg:"",typ:$funcType([AJ],[],true)},{prop:"RemoveTags",name:"RemoveTags",pkg:"",typ:$funcType([AJ],[],true)},{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AJ],[$Bool],true)},{prop:"Tags",name:"Tags",pkg:"",typ:$funcType([],[AJ],false)},{prop:"SetShape",name:"SetShape",pkg:"",typ:$funcType([F],[],false)},{prop:"BoundsToSpace",name:"BoundsToSpace",pkg:"",typ:$funcType([$Float64,$Float64],[$Int,$Int,$Int,$Int],false)},{prop:"SharesCells",name:"SharesCells",pkg:"",typ:$funcType([AA],[$Bool],false)},{prop:"SharesCellsTags",name:"SharesCellsTags",pkg:"",typ:$funcType([AJ],[$Bool],true)},{prop:"Center",name:"Center",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetCenter",name:"SetCenter",pkg:"",typ:$funcType([$Float64,$Float64],[],false)},{prop:"CellPosition",name:"CellPosition",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"SetRight",name:"SetRight",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetBottom",name:"SetBottom",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"Bottom",name:"Bottom",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Right",name:"Right",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"SetBounds",name:"SetBounds",pkg:"",typ:$funcType([B.Vector,B.Vector],[],false)},{prop:"Check",name:"Check",pkg:"",typ:$funcType([$Float64,$Float64,AJ],[AK],true)},{prop:"Overlaps",name:"Overlaps",pkg:"",typ:$funcType([AA],[$Bool],false)},{prop:"AddToIgnoreList",name:"AddToIgnoreList",pkg:"",typ:$funcType([AA],[],false)},{prop:"RemoveFromIgnoreList",name:"RemoveFromIgnoreList",pkg:"",typ:$funcType([AA],[],false)}];AK.methods=[{prop:"HasTags",name:"HasTags",pkg:"",typ:$funcType([AJ],[$Bool],true)},{prop:"ObjectsByTags",name:"ObjectsByTags",pkg:"",typ:$funcType([AJ],[AB],true)},{prop:"ContactWithObject",name:"ContactWithObject",pkg:"",typ:$funcType([AA],[B.Vector],false)},{prop:"ContactWithCell",name:"ContactWithCell",pkg:"",typ:$funcType([W],[B.Vector],false)},{prop:"SlideAgainstCell",name:"SlideAgainstCell",pkg:"",typ:$funcType([W,AJ],[B.Vector],true)}];W.methods=[{prop:"register",name:"register",pkg:"github.com/solarlune/resolv",typ:$funcType([AA],[],false)},{prop:"unregister",name:"unregister",pkg:"github.com/solarlune/resolv",typ:$funcType([AA],[],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([AA],[$Bool],false)},{prop:"ContainsTags",name:"ContainsTags",pkg:"",typ:$funcType([AJ],[$Bool],true)},{prop:"Occupied",name:"Occupied",pkg:"",typ:$funcType([],[$Bool],false)}];D.init("",[{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:Y,tag:""},{prop:"CellWidth",name:"CellWidth",embedded:false,exported:true,typ:$Int,tag:""},{prop:"CellHeight",name:"CellHeight",embedded:false,exported:true,typ:$Int,tag:""}]);F.init([{prop:"Bounds",name:"Bounds",pkg:"",typ:$funcType([],[B.Vector,B.Vector],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[F],false)},{prop:"Intersection",name:"Intersection",pkg:"",typ:$funcType([$Float64,$Float64,F],[AI],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[$Float64,$Float64],false)},{prop:"SetPosition",name:"SetPosition",pkg:"",typ:$funcType([$Float64,$Float64],[],false)}]);G.init("",[{prop:"Start",name:"Start",embedded:false,exported:true,typ:B.Vector,tag:""},{prop:"End",name:"End",embedded:false,exported:true,typ:B.Vector,tag:""}]);I.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AC,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Closed",name:"Closed",embedded:false,exported:true,typ:$Bool,tag:""}]);K.init("",[{prop:"Points",name:"Points",embedded:false,exported:true,typ:AC,tag:""},{prop:"MTV",name:"MTV",embedded:false,exported:true,typ:B.Vector,tag:""},{prop:"Center",name:"Center",embedded:false,exported:true,typ:B.Vector,tag:""}]);N.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Radius",name:"Radius",embedded:false,exported:true,typ:$Float64,tag:""}]);P.init("",[{prop:"Min",name:"Min",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Max",name:"Max",embedded:false,exported:true,typ:$Float64,tag:""}]);Q.init("github.com/solarlune/resolv",[{prop:"Shape",name:"Shape",embedded:false,exported:true,typ:F,tag:""},{prop:"Space",name:"Space",embedded:false,exported:true,typ:Z,tag:""},{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"W",name:"W",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"H",name:"H",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"TouchingCells",name:"TouchingCells",embedded:false,exported:true,typ:X,tag:""},{prop:"Data",name:"Data",embedded:false,exported:true,typ:$emptyInterface,tag:""},{prop:"ignoreList",name:"ignoreList",embedded:false,exported:false,typ:AL,tag:""},{prop:"tags",name:"tags",embedded:false,exported:false,typ:AJ,tag:""}]);S.init("github.com/solarlune/resolv",[{prop:"checkingObject",name:"checkingObject",embedded:false,exported:false,typ:AA,tag:""},{prop:"dx",name:"dx",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"dy",name:"dy",embedded:false,exported:false,typ:$Float64,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AB,tag:""},{prop:"Cells",name:"Cells",embedded:false,exported:true,typ:X,tag:""}]);U.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Int,tag:""},{prop:"Objects",name:"Objects",embedded:false,exported:true,typ:AB,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["jsexport/battle"]=(function(){var $pkg={},$init,A,B,C,D,E,F,G,I,J,K,L,O,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,N,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD;A=$packages["github.com/kvartborg/vector"];B=$packages["github.com/solarlune/resolv"];C=$packages["math"];D=$pkg.Vec2D=$newType(0,$kindStruct,"battle.Vec2D",true,"jsexport/battle",true,function(X_,Y_){this.$val=this;if(arguments.length===0){this.X=0;this.Y=0;return;}this.X=X_;this.Y=Y_;});E=$pkg.Polygon2D=$newType(0,$kindStruct,"battle.Polygon2D",true,"jsexport/battle",true,function(Anchor_,Points_){this.$val=this;if(arguments.length===0){this.Anchor=AU.nil;this.Points=AV.nil;return;}this.Anchor=Anchor_;this.Points=Points_;});F=$pkg.PlayerDownsync=$newType(0,$kindStruct,"battle.PlayerDownsync",true,"jsexport/battle",true,function(Id_,VirtualGridX_,VirtualGridY_,DirX_,DirY_,VelX_,VelY_,Speed_,BattleState_,JoinIndex_,ColliderRadius_,Removed_,Score_,LastMoveGmtMillis_,FramesToRecover_,Hp_,MaxHp_,CharacterState_,InAir_,Name_,DisplayName_,Avatar_){this.$val=this;if(arguments.length===0){this.Id=0;this.VirtualGridX=0;this.VirtualGridY=0;this.DirX=0;this.DirY=0;this.VelX=0;this.VelY=0;this.Speed=0;this.BattleState=0;this.JoinIndex=0;this.ColliderRadius=0;this.Removed=false;this.Score=0;this.LastMoveGmtMillis=0;this.FramesToRecover=0;this.Hp=0;this.MaxHp=0;this.CharacterState=0;this.InAir=false;this.Name="";this.DisplayName="";this.Avatar="";return;}this.Id=Id_;this.VirtualGridX=VirtualGridX_;this.VirtualGridY=VirtualGridY_;this.DirX=DirX_;this.DirY=DirY_;this.VelX=VelX_;this.VelY=VelY_;this.Speed=Speed_;this.BattleState=BattleState_;this.JoinIndex=JoinIndex_;this.ColliderRadius=ColliderRadius_;this.Removed=Removed_;this.Score=Score_;this.LastMoveGmtMillis=LastMoveGmtMillis_;this.FramesToRecover=FramesToRecover_;this.Hp=Hp_;this.MaxHp=MaxHp_;this.CharacterState=CharacterState_;this.InAir=InAir_;this.Name=Name_;this.DisplayName=DisplayName_;this.Avatar=Avatar_;});G=$pkg.InputFrameDecoded=$newType(0,$kindStruct,"battle.InputFrameDecoded",true,"jsexport/battle",true,function(Dx_,Dy_,BtnALevel_,BtnBLevel_){this.$val=this;if(arguments.length===0){this.Dx=0;this.Dy=0;this.BtnALevel=0;this.BtnBLevel=0;return;}this.Dx=Dx_;this.Dy=Dy_;this.BtnALevel=BtnALevel_;this.BtnBLevel=BtnBLevel_;});I=$pkg.InputFrameDownsync=$newType(0,$kindStruct,"battle.InputFrameDownsync",true,"jsexport/battle",true,function(InputFrameId_,InputList_,ConfirmedList_){this.$val=this;if(arguments.length===0){this.InputFrameId=0;this.InputList=AW.nil;this.ConfirmedList=new $Uint64(0,0);return;}this.InputFrameId=InputFrameId_;this.InputList=InputList_;this.ConfirmedList=ConfirmedList_;});J=$pkg.Barrier=$newType(0,$kindStruct,"battle.Barrier",true,"jsexport/battle",true,function(Boundary_){this.$val=this;if(arguments.length===0){this.Boundary=AX.nil;return;}this.Boundary=Boundary_;});K=$pkg.MeleeBullet=$newType(0,$kindStruct,"battle.MeleeBullet",true,"jsexport/battle",true,function(BattleLocalId_,StartupFrames_,ActiveFrames_,RecoveryFrames_,RecoveryFramesOnBlock_,RecoveryFramesOnHit_,Moveforward_,HitboxOffset_,HitboxSize_,OriginatedRenderFrameId_,HitStunFrames_,BlockStunFrames_,Pushback_,ReleaseTriggerType_,Damage_,OffenderJoinIndex_,OffenderPlayerId_){this.$val=this;if(arguments.length===0){this.BattleLocalId=0;this.StartupFrames=0;this.ActiveFrames=0;this.RecoveryFrames=0;this.RecoveryFramesOnBlock=0;this.RecoveryFramesOnHit=0;this.Moveforward=AU.nil;this.HitboxOffset=0;this.HitboxSize=AU.nil;this.OriginatedRenderFrameId=0;this.HitStunFrames=0;this.BlockStunFrames=0;this.Pushback=0;this.ReleaseTriggerType=0;this.Damage=0;this.OffenderJoinIndex=0;this.OffenderPlayerId=0;return;}this.BattleLocalId=BattleLocalId_;this.StartupFrames=StartupFrames_;this.ActiveFrames=ActiveFrames_;this.RecoveryFrames=RecoveryFrames_;this.RecoveryFramesOnBlock=RecoveryFramesOnBlock_;this.RecoveryFramesOnHit=RecoveryFramesOnHit_;this.Moveforward=Moveforward_;this.HitboxOffset=HitboxOffset_;this.HitboxSize=HitboxSize_;this.OriginatedRenderFrameId=OriginatedRenderFrameId_;this.HitStunFrames=HitStunFrames_;this.BlockStunFrames=BlockStunFrames_;this.Pushback=Pushback_;this.ReleaseTriggerType=ReleaseTriggerType_;this.Damage=Damage_;this.OffenderJoinIndex=OffenderJoinIndex_;this.OffenderPlayerId=OffenderPlayerId_;});L=$pkg.RoomDownsyncFrame=$newType(0,$kindStruct,"battle.RoomDownsyncFrame",true,"jsexport/battle",true,function(Id_,PlayersArr_,CountdownNanos_,MeleeBullets_,BackendUnconfirmedMask_,ShouldForceResync_,Players_){this.$val=this;if(arguments.length===0){this.Id=0;this.PlayersArr=AN.nil;this.CountdownNanos=new $Int64(0,0);this.MeleeBullets=AS.nil;this.BackendUnconfirmedMask=new $Uint64(0,0);this.ShouldForceResync=false;this.Players=false;return;}this.Id=Id_;this.PlayersArr=PlayersArr_;this.CountdownNanos=CountdownNanos_;this.MeleeBullets=MeleeBullets_;this.BackendUnconfirmedMask=BackendUnconfirmedMask_;this.ShouldForceResync=ShouldForceResync_;this.Players=Players_;});O=$pkg.SatResult=$newType(0,$kindStruct,"battle.SatResult",true,"jsexport/battle",true,function(Overlap_,OverlapX_,OverlapY_,AContainedInB_,BContainedInA_,Axis_){this.$val=this;if(arguments.length===0){this.Overlap=0;this.OverlapX=0;this.OverlapY=0;this.AContainedInB=false;this.BContainedInA=false;this.Axis=A.Vector.nil;return;}this.Overlap=Overlap_;this.OverlapX=OverlapX_;this.OverlapY=OverlapY_;this.AContainedInB=AContainedInB_;this.BContainedInA=BContainedInA_;this.Axis=Axis_;});AE=$sliceType($Int32);AF=$sliceType(AE);AG=$ptrType(O);AH=$sliceType(D);AI=$sliceType($String);AJ=$ptrType(B.Collision);AK=$ptrType(J);AL=$ptrType(B.ConvexPolygon);AM=$ptrType(F);AN=$sliceType(AM);AO=$sliceType(AH);AP=$ptrType(I);AQ=$ptrType(B.Object);AR=$ptrType(K);AS=$sliceType(AR);AT=$sliceType($Float64);AU=$ptrType(D);AV=$sliceType(AU);AW=$sliceType($Uint64);AX=$ptrType(E);AY=$mapType($Int32,AM);N=function(a){var a,b,c,d,e,f,g,h;b=new $Uint64(a.$high&0,(a.$low&15)>>>0);d=(((c=$shiftRightUint64(a,4),new $Uint64(c.$high&0,(c.$low&1)>>>0)).$low>>0));f=(((e=$shiftRightUint64(a,5),new $Uint64(e.$high&0,(e.$low&1)>>>0)).$low>>0));return new G.ptr((g=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(0>=g.$length?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+0])),(h=(($flatten64(b)<0||$flatten64(b)>=$pkg.DIRECTION_DECODER.$length)?($throwRuntimeError("index out of range"),undefined):$pkg.DIRECTION_DECODER.$array[$pkg.DIRECTION_DECODER.$offset+$flatten64(b)]),(1>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+1])),d,f);};$pkg.DecodeInput=N;P=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$curGoroutine.deferStack.push($deferred);c=[c];e=[e];f=[f];g=c[0].Position();e[0]=g[0];f[0]=g[1];$deferred.push([(function(c,e,f){return function(){c[0].SetPosition(e[0],f[0]);};})(c,e,f),[]]);c[0].SetPosition(e[0]+a,f[0]+b);h=new O.ptr(0,0,0,true,true,new A.Vector([0,0]));i=Q(c[0],d,h);if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Overlap*h.OverlapX;k=h.Overlap*h.OverlapY;l=j;m=k;n=[true,l,m,h];$s=4;case 4:return n;case 2:o=[false,0,0,h];$s=5;case 5:return o;case 3:$s=-1;return[false,0,0,AG.nil];}return;}}catch(err){$err=err;$s=-1;return[false,0,0,AG.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){var $f={$blk:P,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$deferred};return $f;}}};$pkg.CalcPushbacks=P;Q=function(a,b,c){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=a.Points.$length;e=b.Points.$length;f=d;g=e;if((1===f)&&(1===g)){if(!(AG.nil===c)){c.Overlap=0;}return((h=(i=a.Points,(0>=i.$length?($throwRuntimeError("index out of range"),undefined):i.$array[i.$offset+0])),(0>=h.$length?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+0]))===(j=(k=b.Points,(0>=k.$length?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+0])),(0>=j.$length?($throwRuntimeError("index out of range"),undefined):j.$array[j.$offset+0])))&&((l=(m=a.Points,(0>=m.$length?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+0])),(1>=l.$length?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+1]))===(n=(o=b.Points,(0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])),(1>=n.$length?($throwRuntimeError("index out of range"),undefined):n.$array[n.$offset+1])));}if(1=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(R(a,b,r.Unit(),c)){return false;}q++;}}if(1=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);if(R(a,b,u.Unit(),c)){return false;}t++;}}return true;};R=function(a,b,c,d){var a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=1.7e+308;f=-1.7e+308;g=1.7e+308;h=-1.7e+308;i=e;j=f;k=g;l=h;m=a.Points;n=0;while(true){if(!(n=m.$length)?($throwRuntimeError("index out of range"),undefined):m.$array[m.$offset+n]);p=((0>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+0])+a.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=o.$length?($throwRuntimeError("index out of range"),undefined):o.$array[o.$offset+1])+a.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(i>p){i=p;}if(j=q.$length)?($throwRuntimeError("index out of range"),undefined):q.$array[q.$offset+r]);t=((0>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+0])+b.X)*(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])+((1>=s.$length?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+1])+b.Y)*(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1]);if(k>t){k=t;}if(ll||jl){u=i-l;d.AContainedInB=false;}else{x=j-k;y=l-i;if(x=ab.$length?($throwRuntimeError("index out of range"),undefined):ab.$array[ab.$offset+0])))&&(0===(ac=d.Axis,(1>=ac.$length?($throwRuntimeError("index out of range"),undefined):ac.$array[ac.$offset+1]))))||z>aa){ad=1;if(u<0){ad=-1;}d.Overlap=aa;d.OverlapX=(0>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+0])*ad;d.OverlapY=(1>=c.$length?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+1])*ad;}d.Axis=c;}return false;};S=function(a,b,c){var a,b,c,d,e;d=((C.Round(a*c)>>0));e=((C.Round(b*c)>>0));return[d,e];};$pkg.WorldToVirtualGridPos=S;T=function(a,b,c){var a,b,c,d,e;d=(a)*c;e=(b)*c;return[d,e];};$pkg.VirtualGridToWorldPos=T;U=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a-c-g+i,b-d-f+j];};$pkg.WorldToPolygonColliderBLPos=U;V=function(a,b,c,d,e,f,g,h,i,j){var a,b,c,d,e,f,g,h,i,j;return[a+c+g-i,b+d+f-j];};$pkg.PolygonColliderBLToWorldPos=V;W=function(a,b,c,d,e,f,g,h,i,j,k){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;l=V(a,b,c,d,e,f,g,h,i,j);m=l[0];n=l[1];return S(m,n,k);};$pkg.PolygonColliderBLToVirtualGridPos=W;X=function(a,b,c,d,e,f,g,h,i,j,k){var a,b,c,d,e,f,g,h,i,j,k,l,m,n;l=T(a,b,k);m=l[0];n=l[1];return U(m,n,c,d,e,f,g,h,i,j);};$pkg.VirtualGridToPolygonColliderBLPos=X;Y=function(a,b,c,d){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r,$c}=$restore(this,{a,b,c,d});$s=$s||0;s:while(true){switch($s){case 0:e=$makeSlice(AH,0,10);f=a.Check(0,0,new AI([]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(AJ.nil===g){$s=-1;return e;}h=g.Objects;i=0;case 2:if(!(i=h.$length)?($throwRuntimeError("index out of range"),undefined):h.$array[h.$offset+i]);k=j.Data;if($assertType(k,AK,true)[1]){$s=4;continue;}$s=5;continue;case 4:l=$assertType(j.Shape,AL);n=P(0,0,b,l);$s=7;case 7:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[0];p=m[1];q=m[2];r=m[3];if(!o){i++;$s=2;continue;}s=(r.Overlap-c)*r.OverlapX;t=(r.Overlap-c)*r.OverlapY;p=s;q=t;e=$append(e,new D.ptr(r.OverlapX,r.OverlapY));d.X=d.X+(p);d.Y=d.Y+(q);$s=6;continue;case 5:case 6:i++;$s=2;continue;case 3:$s=-1;return e;}return;}var $f={$blk:Y,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s};return $f;};$pkg.CalcHardPushbacksNorms=Y;Z=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var{a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p});$s=$s||0;s:while(true){switch($s){case 0:q=c.PlayersArr.$length;r=$makeSlice(AN,q);s=c.PlayersArr;t=0;while(true){if(!(t=s.$length)?($throwRuntimeError("index out of range"),undefined):s.$array[s.$offset+t]);((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]=new F.ptr(v.Id,v.VirtualGridX,v.VirtualGridY,v.DirX,v.DirY,v.VelX,v.VelY,v.Speed,v.BattleState,v.JoinIndex,0,v.Removed,v.Score,0,v.FramesToRecover-1>>0,v.Hp,v.MaxHp,v.CharacterState,true,"","",""));if(((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]).FramesToRecover<0){((u<0||u>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+u]).FramesToRecover=0;}t++;}w=$makeSlice(AH,q);x=$makeSlice(AO,q);if(!(AP.nil===a)){y=a.InputList;z=c.PlayersArr;aa=0;while(true){if(!(aa=z.$length)?($throwRuntimeError("index out of range"),undefined):z.$array[z.$offset+aa]);ad=ac.JoinIndex;ae=((ab<0||ab>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ab]);if(0>0,((af<0||af>=y.$length)?($throwRuntimeError("index out of range"),undefined):y.$array[y.$offset+af])));ah=0;if(!(AP.nil===b)){ak=N((ai=b.InputList,aj=ad-1>>0,((aj<0||aj>=ai.$length)?($throwRuntimeError("index out of range"),undefined):ai.$array[ai.$offset+aj])));ah=ak.BtnBLevel;}if(ag.BtnBLevel>ah){al=false;if((4===ae.CharacterState)||(5===ae.CharacterState)||(6===ae.CharacterState)){al=true;}am=false;if((0===ae.CharacterState)||(1===ae.CharacterState)||(4===ae.CharacterState)){am=true;}if(!al&&am){ae.VelY=h;}}if(!((0===ag.Dx))||!((0===ag.Dy))){ae.DirX=ag.Dx;ae.DirY=ag.Dy;ae.VelX=$imul(ag.Dx,ac.Speed);ae.CharacterState=1;}else{ae.CharacterState=0;ae.VelX=0;}aa++;}}an=c.PlayersArr;ao=0;case 1:if(!(ao=an.$length)?($throwRuntimeError("index out of range"),undefined):an.$array[an.$offset+ao]);ar=aq.JoinIndex;as=0;at=0;(au=ar-1>>0,((au<0||au>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+au])).X=as;(av=ar-1>>0,((av<0||av>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+av])).Y=at;aw=131072+ar>>0;ay=(ax=e[$Int32.keyFor(aw)],ax!==undefined?ax.v:AQ.nil);az=((ap<0||ap>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+ap]);ba=aq.VirtualGridX+aq.VelX>>0;bb=aq.VirtualGridY+aq.VelY>>0;bc=ba;bd=bb;if(az.VelY===h){bd=bd+(az.VelY)>>0;}be=X(bc,bd,ay.W*0.5,ay.H*0.5,0,0,0,0,k,l,p);ay.X=be[0];ay.Y=be[1];$r=ay.Update();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(aq.InAir){az.VelX=az.VelX+(f)>>0;az.VelY=az.VelY+(g)>>0;}ao++;$s=1;continue;case 2:bf=c.PlayersArr;bg=0;case 4:if(!(bg=bf.$length)?($throwRuntimeError("index out of range"),undefined):bf.$array[bf.$offset+bg]);bj=bi.JoinIndex;bk=131072+bj>>0;bm=(bl=e[$Int32.keyFor(bk)],bl!==undefined?bl.v:AQ.nil);bn=$assertType(bm.Shape,AL);bp=Y(bm,bn,m,(bo=bj-1>>0,((bo<0||bo>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+bo])));$s=6;case 6:if($c){$c=false;bp=bp.$blk();}if(bp&&bp.$blk!==undefined){break s;}(bq=bj-1>>0,((bq<0||bq>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+bq]=bp));br=((bh<0||bh>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+bh]);bs=false;bt=bm.Check(0,0,new AI([]));$s=7;case 7:if($c){$c=false;bt=bt.$blk();}if(bt&&bt.$blk!==undefined){break s;}bu=bt;if(!(AJ.nil===bu)){$s=8;continue;}$s=9;continue;case 8:bv=bu.Objects;bw=0;case 10:if(!(bw=bv.$length)?($throwRuntimeError("index out of range"),undefined):bv.$array[bv.$offset+bw]);by=false;bz=false;ca=false;cb=by;cc=bz;cd=ca;ce=bx.Data;if($assertType(ce,AK,true)[1]){cb=true;}else if($assertType(ce,AM,true)[1]){cc=true;}else if($assertType(ce,AR,true)[1]){cd=true;}if(cd){bw++;$s=10;continue;}cf=$assertType(bx.Shape,AL);ch=P(0,0,bn,cf);$s=12;case 12:if($c){$c=false;ch=ch.$blk();}if(ch&&ch.$blk!==undefined){break s;}cg=ch;ci=cg[0];cj=cg[1];ck=cg[2];cl=cg[3];if(!ci){bw++;$s=10;continue;}cm=cl.OverlapX*0+cl.OverlapY*-1;cn=n>0,((ct<0||ct>=x.$length)?($throwRuntimeError("index out of range"),undefined):x.$array[x.$offset+ct]));cu=0;while(true){if(!(cu=cs.$length)?($throwRuntimeError("index out of range"),undefined):cs.$array[cs.$offset+cu]),D);cw=cj*cv.X+ck*cv.Y;if(cb||(cc&&0>cw)){cj=cj-(cw*cv.X);ck=ck-(cw*cv.Y);}cu++;}cx=bj-1>>0;((cx<0||cx>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+cx]).X=((cx<0||cx>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+cx]).X+(cj);cy=bj-1>>0;((cy<0||cy>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+cy]).Y=((cy<0||cy>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+cy]).Y+(ck);if(bi.InAir&&cn){bs=true;}bw++;$s=10;continue;case 11:case 9:if(bs){br.VelX=0;br.VelY=0;br.CharacterState=0;br.FramesToRecover=0;}if(bi.InAir){cz=br.CharacterState;da=cz;if((da===(0))||(da===(1))){br.CharacterState=4;}else if(da===(2)){br.CharacterState=5;}else if(da===(3)){br.CharacterState=6;}}bg++;$s=4;continue;case 5:db=c.PlayersArr;dc=0;while(true){if(!(dc=db.$length)?($throwRuntimeError("index out of range"),undefined):db.$array[db.$offset+dc]);df=de.JoinIndex;dg=131072+df>>0;di=(dh=e[$Int32.keyFor(dg)],dh!==undefined?dh.v:AQ.nil);dj=((dd<0||dd>=r.$length)?($throwRuntimeError("index out of range"),undefined):r.$array[r.$offset+dd]);dk=W(di.X-(dl=df-1>>0,((dl<0||dl>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+dl])).X,di.Y-(dm=df-1>>0,((dm<0||dm>=w.$length)?($throwRuntimeError("index out of range"),undefined):w.$array[w.$offset+dm])).Y,di.W*0.5,di.H*0.5,0,0,0,0,k,l,o);dj.VirtualGridX=dk[0];dj.VirtualGridY=dk[1];dc++;}$s=-1;return new L.ptr(c.Id+1>>0,r,new $Int64(0,0),AS.nil,new $Uint64(0,0),false,false);}return;}var $f={$blk:Z,$c:true,$r,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,d,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame=Z;AA=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=U(a,b,c*0.5,d*0.5,e,f,g,h,i,j);n=m[0];o=m[1];p=AB(n,o,g+c+h,f+d+e,k,l);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;$s=2;case 2:return q;}return;}var $f={$blk:AA,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s};return $f;};$pkg.GenerateRectCollider=AA;AB=function(a,b,c,d,e,f){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e,f});$s=$s||0;s:while(true){switch($s){case 0:g=B.NewObject(a,b,c,d,new AI([f]));h=B.NewRectangle(0,0,c,d);$r=g.SetShape(h);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g.Data=e;$s=-1;return g;}return;}var $f={$blk:AB,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};AC=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=AD(a);g=0;h=0;i=g;j=h;k=B.NewConvexPolygon(AT.nil);l=f.Points;m=0;while(true){if(!(m=l.$length)?($throwRuntimeError("index out of range"),undefined):l.$array[l.$offset+m]);p=f.Points;q=0;while(true){if(!(q=p.$length)?($throwRuntimeError("index out of range"),undefined):p.$array[p.$offset+q]);if(n===r){q++;continue;}if(C.Abs(s.X-o.X)>i){i=C.Abs(s.X-o.X);}if(C.Abs(s.Y-o.Y)>j){j=C.Abs(s.Y-o.Y);}q++;}m++;}t=0;while(true){if(!(t=u.$length)?($throwRuntimeError("index out of range"),undefined):u.$array[u.$offset+t]));k.AddPoints(new AT([v.X,v.Y]));t=t+(1)>>0;}w=B.NewObject(f.Anchor.X+b,f.Anchor.Y+c,i,j,new AI([e]));$r=w.SetShape(k);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w.Data=d;$s=-1;return w;}return;}var $f={$blk:AC,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s};return $f;};$pkg.GenerateConvexPolygonCollider=AC;AD=function(a){var a,b,c,d,e,f,g,h,i,j,k;b=new D.ptr(1.7e+308,1.7e+308);c=a.Points;d=0;while(true){if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);if(e.X=g.$length)?($throwRuntimeError("index out of range"),undefined):g.$array[g.$offset+h]);(k=f.Points,((i<0||i>=k.$length)?($throwRuntimeError("index out of range"),undefined):k.$array[k.$offset+i]=new D.ptr(j.X-b.X,j.Y-b.Y)));h++;}return f;};$pkg.AlignPolygon2DToBoundingBox=AD;D.init("",[{prop:"X",name:"X",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Y",name:"Y",embedded:false,exported:true,typ:$Float64,tag:""}]);E.init("",[{prop:"Anchor",name:"Anchor",embedded:false,exported:true,typ:AU,tag:""},{prop:"Points",name:"Points",embedded:false,exported:true,typ:AV,tag:""}]);F.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridX",name:"VirtualGridX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VirtualGridY",name:"VirtualGridY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirX",name:"DirX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"DirY",name:"DirY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelX",name:"VelX",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"VelY",name:"VelY",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Speed",name:"Speed",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BattleState",name:"BattleState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"JoinIndex",name:"JoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ColliderRadius",name:"ColliderRadius",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"Removed",name:"Removed",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Score",name:"Score",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"LastMoveGmtMillis",name:"LastMoveGmtMillis",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"FramesToRecover",name:"FramesToRecover",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Hp",name:"Hp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"MaxHp",name:"MaxHp",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"CharacterState",name:"CharacterState",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InAir",name:"InAir",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Name",name:"Name",embedded:false,exported:true,typ:$String,tag:""},{prop:"DisplayName",name:"DisplayName",embedded:false,exported:true,typ:$String,tag:""},{prop:"Avatar",name:"Avatar",embedded:false,exported:true,typ:$String,tag:""}]);G.init("",[{prop:"Dx",name:"Dx",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Dy",name:"Dy",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnALevel",name:"BtnALevel",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BtnBLevel",name:"BtnBLevel",embedded:false,exported:true,typ:$Int32,tag:""}]);I.init("",[{prop:"InputFrameId",name:"InputFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"InputList",name:"InputList",embedded:false,exported:true,typ:AW,tag:""},{prop:"ConfirmedList",name:"ConfirmedList",embedded:false,exported:true,typ:$Uint64,tag:""}]);J.init("",[{prop:"Boundary",name:"Boundary",embedded:false,exported:true,typ:AX,tag:""}]);K.init("",[{prop:"BattleLocalId",name:"BattleLocalId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"StartupFrames",name:"StartupFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"ActiveFrames",name:"ActiveFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFrames",name:"RecoveryFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnBlock",name:"RecoveryFramesOnBlock",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"RecoveryFramesOnHit",name:"RecoveryFramesOnHit",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Moveforward",name:"Moveforward",embedded:false,exported:true,typ:AU,tag:""},{prop:"HitboxOffset",name:"HitboxOffset",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"HitboxSize",name:"HitboxSize",embedded:false,exported:true,typ:AU,tag:""},{prop:"OriginatedRenderFrameId",name:"OriginatedRenderFrameId",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"HitStunFrames",name:"HitStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"BlockStunFrames",name:"BlockStunFrames",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Pushback",name:"Pushback",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"ReleaseTriggerType",name:"ReleaseTriggerType",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"Damage",name:"Damage",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderJoinIndex",name:"OffenderJoinIndex",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"OffenderPlayerId",name:"OffenderPlayerId",embedded:false,exported:true,typ:$Int32,tag:""}]);L.init("",[{prop:"Id",name:"Id",embedded:false,exported:true,typ:$Int32,tag:""},{prop:"PlayersArr",name:"PlayersArr",embedded:false,exported:true,typ:AN,tag:""},{prop:"CountdownNanos",name:"CountdownNanos",embedded:false,exported:true,typ:$Int64,tag:""},{prop:"MeleeBullets",name:"MeleeBullets",embedded:false,exported:true,typ:AS,tag:""},{prop:"BackendUnconfirmedMask",name:"BackendUnconfirmedMask",embedded:false,exported:true,typ:$Uint64,tag:""},{prop:"ShouldForceResync",name:"ShouldForceResync",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Players",name:"Players",embedded:false,exported:true,typ:AY,tag:""}]);O.init("",[{prop:"Overlap",name:"Overlap",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapX",name:"OverlapX",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"OverlapY",name:"OverlapY",embedded:false,exported:true,typ:$Float64,tag:""},{prop:"AContainedInB",name:"AContainedInB",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"BContainedInA",name:"BContainedInA",embedded:false,exported:true,typ:$Bool,tag:""},{prop:"Axis",name:"Axis",embedded:false,exported:true,typ:A.Vector,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DIRECTION_DECODER=new AF([new AE([0,0]),new AE([0,2]),new AE([0,-2]),new AE([2,0]),new AE([-2,0]),new AE([1,1]),new AE([-1,-1]),new AE([1,-1]),new AE([-1,1])]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); +$packages["jsexport"]=(function(){var $pkg={},$init,A,B,C,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,D,E,F,G,H,I,J,K,L,M,N,O,P,Q;A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["github.com/solarlune/resolv"];C=$packages["jsexport/battle"];R=$ptrType(C.Vec2D);S=$sliceType(R);T=$ptrType(C.Polygon2D);U=$ptrType(C.PlayerDownsync);V=$sliceType(U);W=$ptrType(C.MeleeBullet);X=$sliceType(W);Y=$sliceType($Uint64);Z=$ptrType(A.Object);AA=$sliceType(Z);AB=$sliceType($String);AC=$funcType([$Float64,$Float64],[Z],false);AD=$funcType([R,S],[Z],false);AE=$funcType([T],[Z],false);AF=$funcType([$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Int32,$Bool,$Float64],[Z],false);AG=$funcType([$Int32,V,X],[Z],false);AH=$funcType([$Int,$Int,$Int,$Int],[Z],false);AI=$funcType([$Int32,Y,$Uint64],[Z],false);AJ=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$emptyInterface,$String],[Z],false);AK=$funcType([T,$Float64,$Float64,$emptyInterface,$String],[Z],false);AL=$ptrType(C.RoomDownsyncFrame);AM=$funcType([AL],[AA],false);AN=$ptrType(B.Space);AO=$funcType([AN],[AA],false);AP=$ptrType(C.InputFrameDownsync);AQ=$ptrType(B.Object);AR=$mapType($Int32,AQ);AS=$funcType([AP,AP,AL,AN,AR,$Int32,$Int32,$Int32,$Int32,$Int32,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[Z],false);AT=$funcType([$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64,$Float64],[$Float64,$Float64],false);AU=$funcType([AQ,$Float64,$Float64],[Z],false);AV=$mapType($String,$emptyInterface);D=function(a,b,c,d){var a,b,c,d;return A.MakeWrapper(B.NewSpace(a,b,c,d));};$pkg.NewCollisionSpaceJs=D;E=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=A.MakeFullWrapper(new C.Vec2D.ptr(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:E,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.NewVec2DJs=E;F=function(a,b){var{a,b,c,d,$s,$r,$c}=$restore(this,{a,b});$s=$s||0;s:while(true){switch($s){case 0:c=A.MakeFullWrapper(new C.Polygon2D.ptr(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;$s=2;case 2:return d;}return;}var $f={$blk:F,$c:true,$r,a,b,c,d,$s};return $f;};$pkg.NewPolygon2DJs=F;G=function(a){var a;return A.MakeWrapper(new C.Barrier.ptr(a));};$pkg.NewBarrierJs=G;H=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;return A.MakeWrapper(new C.PlayerDownsync.ptr(a,b,c,d,e,f,g,h,i,k,o,false,0,0,0,l,m,j,n,"","",""));};$pkg.NewPlayerDownsyncJs=H;I=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=A.MakeFullWrapper(new C.RoomDownsyncFrame.ptr(a,b,new $Int64(0,0),c,new $Uint64(0,0),false,false));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=2;case 2:return e;}return;}var $f={$blk:I,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.NewRoomDownsyncFrameJs=I;J=function(a,b,c){var{a,b,c,d,e,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=A.MakeFullWrapper(new C.InputFrameDownsync.ptr(a,b,c));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$s=2;case 2:return e;}return;}var $f={$blk:J,$c:true,$r,a,b,c,d,e,$s};return $f;};$pkg.NewInputFrameDownsyncJs=J;K=function(a){var{a,b,c,d,e,f,g,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=a.Objects();c=$makeSlice(AA,0,b.$length);d=b;e=0;case 1:if(!(e=d.$length)?($throwRuntimeError("index out of range"),undefined):d.$array[d.$offset+e]);g=A.MakeFullWrapper(f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}c=$append(c,g);e++;$s=1;continue;case 2:$s=-1;return c;}return;}var $f={$blk:K,$c:true,$r,a,b,c,d,e,f,g,$s};return $f;};$pkg.GetCollisionSpaceObjsJs=K;L=function(a){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a});$s=$s||0;s:while(true){switch($s){case 0:b=$makeSlice(AA,0,a.PlayersArr.$length);c=a.PlayersArr;d=0;case 1:if(!(d=c.$length)?($throwRuntimeError("index out of range"),undefined):c.$array[c.$offset+d]);f=A.MakeFullWrapper(e);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}b=$append(b,f);d++;$s=1;continue;case 2:$s=-1;return b;}return;}var $f={$blk:L,$c:true,$r,a,b,c,d,e,f,$s};return $f;};$pkg.GetPlayersArrJs=L;M=function(a,b,c,d,e,f,g,h,i,j,k,l){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l});$s=$s||0;s:while(true){switch($s){case 0:m=C.GenerateRectCollider(a,b,c,d,e,f,g,h,i,j,k,l);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=A.MakeFullWrapper(m);$s=2;case 2:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;$s=3;case 3:return o;}return;}var $f={$blk:M,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s};return $f;};$pkg.GenerateRectColliderJs=M;N=function(a,b,c,d,e){var{a,b,c,d,e,f,g,h,$s,$r,$c}=$restore(this,{a,b,c,d,e});$s=$s||0;s:while(true){switch($s){case 0:f=C.GenerateConvexPolygonCollider(a,b,c,d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.MakeFullWrapper(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$s=3;case 3:return h;}return;}var $f={$blk:N,$c:true,$r,a,b,c,d,e,f,g,h,$s};return $f;};$pkg.GenerateConvexPolygonColliderJs=N;O=function(a,b,c){var{a,b,c,d,e,f,$s,$r,$c}=$restore(this,{a,b,c});$s=$s||0;s:while(true){switch($s){case 0:d=a.Check(b,c,new AB([]));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=A.MakeFullWrapper(d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$s=3;case 3:return f;}return;}var $f={$blk:O,$c:true,$r,a,b,c,d,e,f,$s};return $f;};$pkg.CheckCollisionJs=O;P=function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r,$c}=$restore(this,{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p});$s=$s||0;s:while(true){switch($s){case 0:q=C.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=A.MakeFullWrapper(q);$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;$s=3;case 3:return s;}return;}var $f={$blk:P,$c:true,$r,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s};return $f;};$pkg.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs=P;Q=function(){$global.gopkgs=$externalize($makeMap($String.keyFor,[{k:"NewVec2DJs",v:new AC(E)},{k:"NewPolygon2DJs",v:new AD(F)},{k:"NewBarrierJs",v:new AE(G)},{k:"NewPlayerDownsyncJs",v:new AF(H)},{k:"NewRoomDownsyncFrameJs",v:new AG(I)},{k:"NewCollisionSpaceJs",v:new AH(D)},{k:"NewInputFrameDownsyncJs",v:new AI(J)},{k:"GenerateRectColliderJs",v:new AJ(M)},{k:"GenerateConvexPolygonColliderJs",v:new AK(N)},{k:"GetPlayersArrJs",v:new AM(L)},{k:"GetCollisionSpaceObjsJs",v:new AO(K)},{k:"ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs",v:new AS(P)},{k:"WorldToPolygonColliderBLPos",v:new AT(C.WorldToPolygonColliderBLPos)},{k:"PolygonColliderBLToWorldPos",v:new AT(C.PolygonColliderBLToWorldPos)},{k:"CheckCollisionJs",v:new AU(O)}]),AV);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){Q();$mainFinished=true;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); $synthesizeMethods(); $initAllLinknames(); var $mainPkg = $packages["jsexport"]; diff --git a/frontend/assets/plugin_scripts/jsexport.js.meta b/frontend/assets/plugin_scripts/jsexport.js.meta index 508c038..6fae4d2 100644 --- a/frontend/assets/plugin_scripts/jsexport.js.meta +++ b/frontend/assets/plugin_scripts/jsexport.js.meta @@ -1,6 +1,6 @@ { "ver": "1.0.5", - "uuid": "c402c9d1-1d32-4dbb-993a-6bfa0099fa2b", + "uuid": "d41313ca-b2c3-4436-a05f-7e0eb290b1e6", "isPlugin": true, "loadPluginInWeb": true, "loadPluginInNative": true, diff --git a/frontend/assets/resources/pbfiles/room_downsync_frame.proto b/frontend/assets/resources/pbfiles/room_downsync_frame.proto index a6ffc75..dd1724f 100644 --- a/frontend/assets/resources/pbfiles/room_downsync_frame.proto +++ b/frontend/assets/resources/pbfiles/room_downsync_frame.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -option go_package = "jsexport/protos"; // here "./" corresponds to the "--go_out" value in "protoc" command +option go_package = "battle_srv/protos"; // here "./" corresponds to the "--go_out" value in "protoc" command package protos; import "geometry.proto"; // The import path here is only w.r.t. the proto file, not the Go package. diff --git a/frontend/assets/resources/prefabs/ControlledCharacter.prefab b/frontend/assets/resources/prefabs/ControlledCharacter.prefab index 8fdcd12..07979d3 100644 --- a/frontend/assets/resources/prefabs/ControlledCharacter.prefab +++ b/frontend/assets/resources/prefabs/ControlledCharacter.prefab @@ -97,7 +97,7 @@ "__id__": 1 }, "_children": [], - "_active": false, + "_active": true, "_components": [ { "__id__": 3 @@ -129,7 +129,7 @@ "ctor": "Float64Array", "array": [ 0, - 0, + 45, 0, 0, 0, diff --git a/frontend/assets/scenes/login.fire b/frontend/assets/scenes/login.fire index 31ccba3..c6d411c 100644 --- a/frontend/assets/scenes/login.fire +++ b/frontend/assets/scenes/login.fire @@ -440,7 +440,7 @@ "array": [ 0, 0, - 209.73151519075364, + 217.37237634989413, 0, 0, 0, diff --git a/frontend/assets/scenes/offline_map_1.fire b/frontend/assets/scenes/offline_map_1.fire index 3c3f89a..5937eab 100644 --- a/frontend/assets/scenes/offline_map_1.fire +++ b/frontend/assets/scenes/offline_map_1.fire @@ -461,7 +461,7 @@ "array": [ 0, 0, - 216.05530045313827, + 217.37237634989413, 0, 0, 0, diff --git a/frontend/assets/scenes/offline_map_2.fire b/frontend/assets/scenes/offline_map_2.fire index 7059ef0..8d08a41 100644 --- a/frontend/assets/scenes/offline_map_2.fire +++ b/frontend/assets/scenes/offline_map_2.fire @@ -461,7 +461,7 @@ "array": [ 0, 0, - 216.50635094610968, + 217.37237634989413, 0, 0, 0, diff --git a/frontend/assets/scripts/OfflineMapBackend.js b/frontend/assets/scripts/OfflineMapBackend.js index e24747d..ce3909d 100644 --- a/frontend/assets/scripts/OfflineMapBackend.js +++ b/frontend/assets/scripts/OfflineMapBackend.js @@ -13,7 +13,7 @@ cc.Class({ onLoad() { const self = this; window.mapIns = self; - self.showCriticalCoordinateLabels = true; + self.showCriticalCoordinateLabels = false; const mapNode = self.node; const canvasNode = mapNode.parent; @@ -375,7 +375,18 @@ cc.Class({ halfColliderHeight = playerDownsyncInfo.ColliderRadius + playerDownsyncInfo.ColliderRadius; // avoid multiplying const colliderWidth = halfColliderWidth + halfColliderWidth, colliderHeight = halfColliderHeight + halfColliderHeight; // avoid multiplying - const newPlayerCollider = gopkgs.GenerateRectColliderJs(wx, wy, colliderWidth, colliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player"); + + const [cx, cy] = gopkgs.WorldToPolygonColliderBLPos(wx, wy, halfColliderWidth, halfColliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY); + const gopkgsBoundaryAnchor = gopkgs.NewVec2DJs(cx, cy); + const gopkgsBoundaryPts = [ + gopkgs.NewVec2DJs(0, 0), + gopkgs.NewVec2DJs(self.snapIntoPlatformOverlap + colliderWidth + self.snapIntoPlatformOverlap, 0), + gopkgs.NewVec2DJs(self.snapIntoPlatformOverlap + colliderWidth + self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap + colliderHeight + self.snapIntoPlatformOverlap), + gopkgs.NewVec2DJs(0, self.snapIntoPlatformOverlap + colliderHeight + self.snapIntoPlatformOverlap) + ]; + const gopkgsBoundary = gopkgs.NewPolygon2DJs(gopkgsBoundaryAnchor, gopkgsBoundaryPts); + const newPlayerCollider = gopkgs.GenerateConvexPolygonColliderJs(gopkgsBoundary, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player"); + //const newPlayerCollider = gopkgs.GenerateRectColliderJs(wx, wy, colliderWidth, colliderHeight, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.snapIntoPlatformOverlap, self.spaceOffsetX, self.spaceOffsetY, playerDownsyncInfo, "Player"); self.gopkgsCollisionSys.Add(newPlayerCollider); const collisionPlayerIndex = self.collisionPlayerIndexPrefix + joinIndex; self.gopkgsCollisionSysMap[collisionPlayerIndex] = newPlayerCollider; @@ -394,4 +405,45 @@ cc.Class({ return [newPlayerNode, playerScriptIns]; }, + + showDebugBoundaries(rdf) { + const self = this; + const leftPadding = self.snapIntoPlatformOverlap, + rightPadding = self.snapIntoPlatformOverlap, + topPadding = self.snapIntoPlatformOverlap, + bottomPadding = self.snapIntoPlatformOverlap; + if (self.showCriticalCoordinateLabels) { + let g = self.g; + g.clear(); + + const collisionSpaceObjs = gopkgs.GetCollisionSpaceObjsJs(self.gopkgsCollisionSys); + for (let k in collisionSpaceObjs) { + const body = collisionSpaceObjs[k]; + let padding = 0; + if (null != body.Data && null != body.Data.JoinIndex) { + // character + if (1 == body.Data.JoinIndex) { + g.strokeColor = cc.Color.BLUE; + } else { + g.strokeColor = cc.Color.RED; + } + padding = self.snapIntoPlatformOverlap; + } else { + // barrier + g.strokeColor = cc.Color.WHITE; + } + const points = body.Shape.Points; + const wpos = [body.X-self.spaceOffsetX, body.Y-self.spaceOffsetY]; + g.moveTo(wpos[0], wpos[1]); + const cnt = points.length; + for (let j = 0; j < cnt; j += 1) { + const x = wpos[0]+points[j][0], + y = wpos[1]+points[j][1]; + g.lineTo(x, y); + } + g.lineTo(wpos[0], wpos[1]); + g.stroke(); + } + } + }, }); diff --git a/jsexport/models/battle.go b/jsexport/battle/battle.go similarity index 56% rename from jsexport/models/battle.go rename to jsexport/battle/battle.go index b2fba67..7305955 100644 --- a/jsexport/models/battle.go +++ b/jsexport/battle/battle.go @@ -1,13 +1,13 @@ -package models +package battle import ( - . "dnmshared" - . "dnmshared/sharedprotos" + "github.com/kvartborg/vector" "github.com/solarlune/resolv" - . "jsexport/protos" + "math" ) const ( + MAX_FLOAT64 = 1.7e+308 COLLISION_PLAYER_INDEX_PREFIX = (1 << 17) COLLISION_BARRIER_INDEX_PREFIX = (1 << 16) COLLISION_BULLET_INDEX_PREFIX = (1 << 15) @@ -55,6 +55,206 @@ func DecodeInput(encodedInput uint64) *InputFrameDecoded { } } +type SatResult struct { + Overlap float64 + OverlapX float64 + OverlapY float64 + AContainedInB bool + BContainedInA bool + Axis vector.Vector +} + +func CalcPushbacks(oldDx, oldDy float64, playerShape, barrierShape *resolv.ConvexPolygon) (bool, float64, float64, *SatResult) { + origX, origY := playerShape.Position() + defer func() { + playerShape.SetPosition(origX, origY) + }() + playerShape.SetPosition(origX+oldDx, origY+oldDy) + + overlapResult := &SatResult{ + Overlap: 0, + OverlapX: 0, + OverlapY: 0, + AContainedInB: true, + BContainedInA: true, + Axis: vector.Vector{0, 0}, + } + if overlapped := isPolygonPairOverlapped(playerShape, barrierShape, overlapResult); overlapped { + pushbackX, pushbackY := overlapResult.Overlap*overlapResult.OverlapX, overlapResult.Overlap*overlapResult.OverlapY + return true, pushbackX, pushbackY, overlapResult + } else { + return false, 0, 0, overlapResult + } +} + +func isPolygonPairOverlapped(a, b *resolv.ConvexPolygon, result *SatResult) bool { + aCnt, bCnt := len(a.Points), len(b.Points) + // Single point case + if 1 == aCnt && 1 == bCnt { + if nil != result { + result.Overlap = 0 + } + return a.Points[0][0] == b.Points[0][0] && a.Points[0][1] == b.Points[0][1] + } + + if 1 < aCnt { + for _, axis := range a.SATAxes() { + if isPolygonPairSeparatedByDir(a, b, axis.Unit(), result) { + return false + } + } + } + + if 1 < bCnt { + for _, axis := range b.SATAxes() { + if isPolygonPairSeparatedByDir(a, b, axis.Unit(), result) { + return false + } + } + } + + return true +} + +func isPolygonPairSeparatedByDir(a, b *resolv.ConvexPolygon, e vector.Vector, result *SatResult) bool { + /* + [WARNING] This function is deliberately made private, it shouldn't be used alone (i.e. not along the norms of a polygon), otherwise the pushbacks calculated would be meaningless. + + Consider the following example + a: { + anchor: [1337.19 1696.74] + points: [[0 0] [24 0] [24 24] [0 24]] + }, + b: { + anchor: [1277.72 1570.56] + points: [[642.57 319.16] [0 319.16] [5.73 0] [643.75 0.90]] + } + + e = (-2.98, 1.49).Unit() + */ + + var aStart, aEnd, bStart, bEnd float64 = MAX_FLOAT64, -MAX_FLOAT64, MAX_FLOAT64, -MAX_FLOAT64 + for _, p := range a.Points { + dot := (p[0]+a.X)*e[0] + (p[1]+a.Y)*e[1] + + if aStart > dot { + aStart = dot + } + + if aEnd < dot { + aEnd = dot + } + } + + for _, p := range b.Points { + dot := (p[0]+b.X)*e[0] + (p[1]+b.Y)*e[1] + + if bStart > dot { + bStart = dot + } + + if bEnd < dot { + bEnd = dot + } + } + + if aStart > bEnd || aEnd < bStart { + // Separated by unit vector "e" + return true + } + + if nil != result { + overlap := float64(0) + + if aStart < bStart { + result.AContainedInB = false + + if aEnd < bEnd { + overlap = aEnd - bStart + result.BContainedInA = false + } else { + option1 := aEnd - bStart + option2 := bEnd - aStart + if option1 < option2 { + overlap = option1 + } else { + overlap = -option2 + } + } + } else { + result.BContainedInA = false + + if aEnd > bEnd { + overlap = aStart - bEnd + result.AContainedInB = false + } else { + option1 := aEnd - bStart + option2 := bEnd - aStart + if option1 < option2 { + overlap = option1 + } else { + overlap = -option2 + } + } + } + + currentOverlap := result.Overlap + absoluteOverlap := overlap + if overlap < 0 { + absoluteOverlap = -overlap + } + + if (0 == result.Axis[0] && 0 == result.Axis[1]) || currentOverlap > absoluteOverlap { + var sign float64 = 1 + if overlap < 0 { + sign = -1 + } + + result.Overlap = absoluteOverlap + result.OverlapX = e[0] * sign + result.OverlapY = e[1] * sign + } + + result.Axis = e + } + + // the specified unit vector "e" doesn't separate "a" and "b", overlap result is generated + return false +} + +func WorldToVirtualGridPos(wx, wy, worldToVirtualGridRatio float64) (int32, int32) { + // [WARNING] Introduces loss of precision! + // In JavaScript floating numbers suffer from seemingly non-deterministic arithmetics, and even if certain libs solved this issue by approaches such as fixed-point-number, they might not be used in other libs -- e.g. the "collision libs" we're interested in -- thus couldn't kill all pains. + var virtualGridX int32 = int32(math.Round(wx * worldToVirtualGridRatio)) + var virtualGridY int32 = int32(math.Round(wy * worldToVirtualGridRatio)) + return virtualGridX, virtualGridY +} + +func VirtualGridToWorldPos(vx, vy int32, virtualGridToWorldRatio float64) (float64, float64) { + // No loss of precision + var wx float64 = float64(vx) * virtualGridToWorldRatio + var wy float64 = float64(vy) * virtualGridToWorldRatio + return wx, wy +} + +func WorldToPolygonColliderBLPos(wx, wy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY float64) (float64, float64) { + return wx - halfBoundingW - leftPadding + collisionSpaceOffsetX, wy - halfBoundingH - bottomPadding + collisionSpaceOffsetY +} + +func PolygonColliderBLToWorldPos(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY float64) (float64, float64) { + return cx + halfBoundingW + leftPadding - collisionSpaceOffsetX, cy + halfBoundingH + bottomPadding - collisionSpaceOffsetY +} + +func PolygonColliderBLToVirtualGridPos(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY float64, worldToVirtualGridRatio float64) (int32, int32) { + wx, wy := PolygonColliderBLToWorldPos(cx, cy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY) + return WorldToVirtualGridPos(wx, wy, worldToVirtualGridRatio) +} + +func VirtualGridToPolygonColliderBLPos(vx, vy int32, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY float64, virtualGridToWorldRatio float64) (float64, float64) { + wx, wy := VirtualGridToWorldPos(vx, vy, virtualGridToWorldRatio) + return WorldToPolygonColliderBLPos(wx, wy, halfBoundingW, halfBoundingH, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY) +} + func CalcHardPushbacksNorms(playerCollider *resolv.Object, playerShape *resolv.ConvexPolygon, snapIntoPlatformOverlap float64, pEffPushback *Vec2D) []Vec2D { ret := make([]Vec2D, 0, 10) // no one would simultaneously have more than 5 hardPushbacks collision := playerCollider.Check(0, 0) @@ -82,7 +282,6 @@ func CalcHardPushbacksNorms(playerCollider *resolv.Object, playerShape *resolv.C } func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delayedInputFrameForPrevRenderFrame *InputFrameDownsync, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames int32, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio float64) *RoomDownsyncFrame { - topPadding, bottomPadding, leftPadding, rightPadding := snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap // [WARNING] This function MUST BE called while "InputsBufferLock" is locked! roomCapacity := len(currRenderFrame.PlayersArr) nextRenderFramePlayers := make([]*PlayerDownsync, roomCapacity) @@ -171,8 +370,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delay newVy += thatPlayerInNextFrame.VelY } - halfColliderWidth, halfColliderHeight := currPlayerDownsync.ColliderRadius, currPlayerDownsync.ColliderRadius+currPlayerDownsync.ColliderRadius // avoid multiplying - playerCollider.X, playerCollider.Y = VirtualGridToPolygonColliderBLPos(newVx, newVy, halfColliderWidth, halfColliderHeight, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, virtualGridToWorldRatio) + playerCollider.X, playerCollider.Y = VirtualGridToPolygonColliderBLPos(newVx, newVy, playerCollider.W*0.5, playerCollider.H*0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, virtualGridToWorldRatio) // Update in the collision system playerCollider.Update() @@ -263,8 +461,7 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delay playerCollider := collisionSysMap[collisionPlayerIndex] // Update "virtual grid position" thatPlayerInNextFrame := nextRenderFramePlayers[i] - halfColliderWidth, halfColliderHeight := currPlayerDownsync.ColliderRadius, currPlayerDownsync.ColliderRadius+currPlayerDownsync.ColliderRadius // avoid multiplying - thatPlayerInNextFrame.VirtualGridX, thatPlayerInNextFrame.VirtualGridY = PolygonColliderBLToVirtualGridPos(playerCollider.X-effPushbacks[joinIndex-1].X, playerCollider.Y-effPushbacks[joinIndex-1].Y, halfColliderWidth, halfColliderHeight, topPadding, bottomPadding, leftPadding, rightPadding, collisionSpaceOffsetX, collisionSpaceOffsetY, worldToVirtualGridRatio) + thatPlayerInNextFrame.VirtualGridX, thatPlayerInNextFrame.VirtualGridY = PolygonColliderBLToVirtualGridPos(playerCollider.X-effPushbacks[joinIndex-1].X, playerCollider.Y-effPushbacks[joinIndex-1].Y, playerCollider.W*0.5, playerCollider.H*0.5, 0, 0, 0, 0, collisionSpaceOffsetX, collisionSpaceOffsetY, worldToVirtualGridRatio) } return &RoomDownsyncFrame{ @@ -272,3 +469,81 @@ func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delay PlayersArr: nextRenderFramePlayers, } } + +func GenerateRectCollider(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY float64, data interface{}, tag string) *resolv.Object { + blX, blY := WorldToPolygonColliderBLPos(wx, wy, w*0.5, h*0.5, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY) + return generateRectColliderInCollisionSpace(blX, blY, leftPadding+w+rightPadding, bottomPadding+h+topPadding, data, tag) +} + +func generateRectColliderInCollisionSpace(blX, blY, w, h float64, data interface{}, tag string) *resolv.Object { + collider := resolv.NewObject(blX, blY, w, h, tag) // Unlike its frontend counter part, the position of a "resolv.Object" must be specified by "bottom-left point" because "w" and "h" must be positive, see "resolv.Object.BoundsToSpace" for details + shape := resolv.NewRectangle(0, 0, w, h) + collider.SetShape(shape) + collider.Data = data + return collider +} + +func GenerateConvexPolygonCollider(unalignedSrc *Polygon2D, spaceOffsetX, spaceOffsetY float64, data interface{}, tag string) *resolv.Object { + aligned := AlignPolygon2DToBoundingBox(unalignedSrc) + var w, h float64 = 0, 0 + + shape := resolv.NewConvexPolygon() + for i, pi := range aligned.Points { + for j, pj := range aligned.Points { + if i == j { + continue + } + if math.Abs(pj.X-pi.X) > w { + w = math.Abs(pj.X - pi.X) + } + if math.Abs(pj.Y-pi.Y) > h { + h = math.Abs(pj.Y - pi.Y) + } + } + } + + for i := 0; i < len(aligned.Points); i++ { + p := aligned.Points[i] + shape.AddPoints(p.X, p.Y) + } + + collider := resolv.NewObject(aligned.Anchor.X+spaceOffsetX, aligned.Anchor.Y+spaceOffsetY, w, h, tag) + collider.SetShape(shape) + collider.Data = data + + return collider +} + +func AlignPolygon2DToBoundingBox(input *Polygon2D) *Polygon2D { + // Transform again to put "anchor" at the "bottom-left point (w.r.t. world space)" of the bounding box for "resolv" + boundingBoxBL := &Vec2D{ + X: MAX_FLOAT64, + Y: MAX_FLOAT64, + } + for _, p := range input.Points { + if p.X < boundingBoxBL.X { + boundingBoxBL.X = p.X + } + if p.Y < boundingBoxBL.Y { + boundingBoxBL.Y = p.Y + } + } + + // Now "input.Anchor" should move to "input.Anchor+boundingBoxBL", thus "boundingBoxBL" is also the value of the negative diff for all "input.Points" + output := &Polygon2D{ + Anchor: &Vec2D{ + X: input.Anchor.X + boundingBoxBL.X, + Y: input.Anchor.Y + boundingBoxBL.Y, + }, + Points: make([]*Vec2D, len(input.Points)), + } + + for i, p := range input.Points { + output.Points[i] = &Vec2D{ + X: p.X - boundingBoxBL.X, + Y: p.Y - boundingBoxBL.Y, + } + } + + return output +} diff --git a/jsexport/battle/room_downsync_frame.go b/jsexport/battle/room_downsync_frame.go new file mode 100644 index 0000000..d0ebcae --- /dev/null +++ b/jsexport/battle/room_downsync_frame.go @@ -0,0 +1,90 @@ +package battle + +type Vec2D struct { + X float64 + Y float64 +} + +type Polygon2D struct { + Anchor *Vec2D + Points []*Vec2D +} + +type PlayerDownsync struct { + Id int32 + VirtualGridX int32 + VirtualGridY int32 + DirX int32 + DirY int32 + VelX int32 + VelY int32 + Speed int32 + BattleState int32 + JoinIndex int32 + ColliderRadius float64 + Removed bool + Score int32 + LastMoveGmtMillis int32 + FramesToRecover int32 + Hp int32 + MaxHp int32 + CharacterState int32 + InAir bool + Name string + DisplayName string + Avatar string +} + +type InputFrameDecoded struct { + Dx int32 + Dy int32 + BtnALevel int32 + BtnBLevel int32 +} + +type InputFrameUpsync struct { + InputFrameId int32 + Encoded uint64 +} + +type InputFrameDownsync struct { + InputFrameId int32 + InputList []uint64 + ConfirmedList uint64 +} + +type Barrier struct { + Boundary *Polygon2D +} + +type MeleeBullet struct { + // for offender + BattleLocalId int32 + StartupFrames int32 + ActiveFrames int32 + RecoveryFrames int32 + RecoveryFramesOnBlock int32 + RecoveryFramesOnHit int32 + Moveforward *Vec2D + HitboxOffset float64 + HitboxSize *Vec2D + OriginatedRenderFrameId int32 + // for defender + HitStunFrames int32 + BlockStunFrames int32 + Pushback float64 + ReleaseTriggerType int32 + Damage int32 + OffenderJoinIndex int32 + OffenderPlayerId int32 +} + +type RoomDownsyncFrame struct { + Id int32 + PlayersArr []*PlayerDownsync + CountdownNanos int64 + MeleeBullets []*MeleeBullet + BackendUnconfirmedMask uint64 + ShouldForceResync bool + Players map[int32]*PlayerDownsync +} diff --git a/jsexport/go.mod b/jsexport/go.mod index 6a242cf..1de5534 100644 --- a/jsexport/go.mod +++ b/jsexport/go.mod @@ -3,17 +3,11 @@ module jsexport go 1.18 require ( - dnmshared v0.0.0 github.com/gopherjs/gopherjs v1.18.0-beta1 + github.com/solarlune/resolv v0.5.1 ) require ( github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0 // indirect - github.com/solarlune/resolv v0.5.1 // indirect - go.uber.org/atomic v1.3.2 // indirect - go.uber.org/multierr v1.1.0 // indirect - go.uber.org/zap v1.9.1 // indirect - google.golang.org/protobuf v1.28.1 // indirect ) -replace dnmshared => ../dnmshared diff --git a/jsexport/go.sum b/jsexport/go.sum index 868f9ca..0f6a827 100644 --- a/jsexport/go.sum +++ b/jsexport/go.sum @@ -1,19 +1,22 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= -github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= github.com/gopherjs/gopherjs v1.18.0-beta1 h1:IbykhVEq4SAjwyBRuNHl0aOO6w6IqgL3RUdMhoBo4mY= github.com/gopherjs/gopherjs v1.18.0-beta1/go.mod h1:6UY8PXRnu51MqjYCCY4toG0S5GeH5uVJ3qDxIsa+kqo= github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0 h1:v8lWpj5957KtDMKu+xQtlu6G3ZoZR6Tn9bsfZCRG5Xw= github.com/kvartborg/vector v0.0.0-20200419093813-2cba0cabb4f0/go.mod h1:GAX7tMJqXx9fB1BrsTWPOXy6IBRX+J461BffVPAdpwo= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/solarlune/resolv v0.5.1 h1:Ul6PAs/zaxiMUOEYz1Z6VeUj5k3CDcWMvSh+kivybDY= github.com/solarlune/resolv v0.5.1/go.mod h1:HjM2f/0NoVjVdZsi26GtugX5aFbA62COEFEXkOhveRw= -go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= diff --git a/jsexport/main.go b/jsexport/main.go index e991dbb..2a0b152 100644 --- a/jsexport/main.go +++ b/jsexport/main.go @@ -1,12 +1,9 @@ package main import ( - . "dnmshared" - . "dnmshared/sharedprotos" "github.com/gopherjs/gopherjs/js" "github.com/solarlune/resolv" - "jsexport/models" - . "jsexport/protos" + . "jsexport/battle" ) func NewCollisionSpaceJs(spaceW, spaceH, minStepW, minStepH int) *js.Object { @@ -69,6 +66,15 @@ func NewInputFrameDownsyncJs(inputFrameId int32, inputList []uint64, confirmedLi }) } +func GetCollisionSpaceObjsJs(space *resolv.Space) []*js.Object { + objs := space.Objects() + ret := make([]*js.Object, 0, len(objs)) + for _, obj := range objs { + ret = append(ret, js.MakeFullWrapper(obj)) + } + return ret +} + func GetPlayersArrJs(rdf *RoomDownsyncFrame) []*js.Object { // We couldn't just use the existing getters or field names to access non-primitive fields in Js ret := make([]*js.Object, 0, len(rdf.PlayersArr)) @@ -80,15 +86,15 @@ func GetPlayersArrJs(rdf *RoomDownsyncFrame) []*js.Object { func GenerateRectColliderJs(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY float64, data interface{}, tag string) *js.Object { /* - [WARNING] It's important to note that we don't need "js.MakeFullWrapper" for a call sequence as follows. - ``` - var space = gopkgs.NewCollisionSpaceJs(2048, 2048, 8, 8); - var a = gopkgs.GenerateRectColliderJs(189, 497, 48, 48, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, spaceOffsetX, spaceOffsetY, "Player"); - space.Add(a); - ``` - The "space" variable doesn't need access to the field of "a" in JavaScript level to run "space.Add(...)" method, which is good. - - However, the full wrapper access here is used for updating "collider.X/collider.Y" at JavaScript runtime. + [WARNING] It's important to note that we don't need "js.MakeFullWrapper" for a call sequence as follows. + ``` + var space = gopkgs.NewCollisionSpaceJs(2048, 2048, 8, 8); + var a = gopkgs.GenerateRectColliderJs(189, 497, 48, 48, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, snapIntoPlatformOverlap, spaceOffsetX, spaceOffsetY, "Player"); + space.Add(a); + ``` + The "space" variable doesn't need access to the field of "a" in JavaScript level to run "space.Add(...)" method, which is good. + + However, the full wrapper access here is used for updating "collider.X/collider.Y" at JavaScript runtime. */ return js.MakeFullWrapper(GenerateRectCollider(wx, wy, w, h, topPadding, bottomPadding, leftPadding, rightPadding, spaceOffsetX, spaceOffsetY, data, tag)) @@ -106,7 +112,7 @@ func CheckCollisionJs(obj *resolv.Object, dx, dy float64) *js.Object { func ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs(delayedInputFrame, delayedInputFrameForPrevRenderFrame *InputFrameDownsync, currRenderFrame *RoomDownsyncFrame, collisionSys *resolv.Space, collisionSysMap map[int32]*resolv.Object, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames int32, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio float64) *js.Object { // We need access to all fields of RoomDownsyncFrame for displaying in frontend - return js.MakeFullWrapper(models.ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio)) + return js.MakeFullWrapper(ApplyInputFrameDownsyncDynamicsOnSingleRenderFrame(delayedInputFrame, delayedInputFrameForPrevRenderFrame, currRenderFrame, collisionSys, collisionSysMap, gravityX, gravityY, jumpingInitVelY, inputDelayFrames, inputScaleFrames, collisionSpaceOffsetX, collisionSpaceOffsetY, snapIntoPlatformOverlap, snapIntoPlatformThreshold, worldToVirtualGridRatio, virtualGridToWorldRatio)) } func main() { @@ -121,7 +127,10 @@ func main() { "GenerateRectColliderJs": GenerateRectColliderJs, "GenerateConvexPolygonColliderJs": GenerateConvexPolygonColliderJs, "GetPlayersArrJs": GetPlayersArrJs, + "GetCollisionSpaceObjsJs": GetCollisionSpaceObjsJs, "ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs": ApplyInputFrameDownsyncDynamicsOnSingleRenderFrameJs, - "CheckCollisionJs": CheckCollisionJs, + "WorldToPolygonColliderBLPos": WorldToPolygonColliderBLPos, // No need to wrap primitive return types + "PolygonColliderBLToWorldPos": PolygonColliderBLToWorldPos, + "CheckCollisionJs": CheckCollisionJs, }) } diff --git a/jsexport/protos/room_downsync_frame.pb.go b/jsexport/protos/room_downsync_frame.pb.go deleted file mode 100644 index e027c2b..0000000 --- a/jsexport/protos/room_downsync_frame.pb.go +++ /dev/null @@ -1,1896 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.4 -// source: room_downsync_frame.proto - -package protos - -import ( - sharedprotos "dnmshared/sharedprotos" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PlayerDownsync struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - VirtualGridX int32 `protobuf:"varint,2,opt,name=virtualGridX,proto3" json:"virtualGridX,omitempty"` - VirtualGridY int32 `protobuf:"varint,3,opt,name=virtualGridY,proto3" json:"virtualGridY,omitempty"` - DirX int32 `protobuf:"varint,4,opt,name=dirX,proto3" json:"dirX,omitempty"` - DirY int32 `protobuf:"varint,5,opt,name=dirY,proto3" json:"dirY,omitempty"` // "dirX" and "dirY" determines character facing - VelX int32 `protobuf:"varint,6,opt,name=velX,proto3" json:"velX,omitempty"` - VelY int32 `protobuf:"varint,7,opt,name=velY,proto3" json:"velY,omitempty"` // "velX" and "velY" is used to record the accumulated effect by accelerations (including gravity) - Speed int32 `protobuf:"varint,8,opt,name=speed,proto3" json:"speed,omitempty"` // this is the instantaneous scalar attribute of a character, different from but will be accounted in "velX" and "velY" - BattleState int32 `protobuf:"varint,9,opt,name=battleState,proto3" json:"battleState,omitempty"` - JoinIndex int32 `protobuf:"varint,10,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"` - ColliderRadius float64 `protobuf:"fixed64,11,opt,name=colliderRadius,proto3" json:"colliderRadius,omitempty"` - Removed bool `protobuf:"varint,12,opt,name=removed,proto3" json:"removed,omitempty"` - Score int32 `protobuf:"varint,13,opt,name=score,proto3" json:"score,omitempty"` - LastMoveGmtMillis int32 `protobuf:"varint,14,opt,name=lastMoveGmtMillis,proto3" json:"lastMoveGmtMillis,omitempty"` - FramesToRecover int32 `protobuf:"varint,15,opt,name=framesToRecover,proto3" json:"framesToRecover,omitempty"` - Hp int32 `protobuf:"varint,16,opt,name=hp,proto3" json:"hp,omitempty"` - MaxHp int32 `protobuf:"varint,17,opt,name=maxHp,proto3" json:"maxHp,omitempty"` - CharacterState int32 `protobuf:"varint,18,opt,name=characterState,proto3" json:"characterState,omitempty"` - InAir bool `protobuf:"varint,19,opt,name=inAir,proto3" json:"inAir,omitempty"` // by design a standalone field only inferred by the collision result of "applyInputFrameDownsyncDynamicsOnSingleRenderFrame" instead of "characterState", because we need check the transition for "characterState" from this field, i.e. "inAir (prev -> curr)" - Name string `protobuf:"bytes,20,opt,name=name,proto3" json:"name,omitempty"` - DisplayName string `protobuf:"bytes,21,opt,name=displayName,proto3" json:"displayName,omitempty"` - Avatar string `protobuf:"bytes,22,opt,name=avatar,proto3" json:"avatar,omitempty"` -} - -func (x *PlayerDownsync) Reset() { - *x = PlayerDownsync{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PlayerDownsync) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PlayerDownsync) ProtoMessage() {} - -func (x *PlayerDownsync) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PlayerDownsync.ProtoReflect.Descriptor instead. -func (*PlayerDownsync) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{0} -} - -func (x *PlayerDownsync) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *PlayerDownsync) GetVirtualGridX() int32 { - if x != nil { - return x.VirtualGridX - } - return 0 -} - -func (x *PlayerDownsync) GetVirtualGridY() int32 { - if x != nil { - return x.VirtualGridY - } - return 0 -} - -func (x *PlayerDownsync) GetDirX() int32 { - if x != nil { - return x.DirX - } - return 0 -} - -func (x *PlayerDownsync) GetDirY() int32 { - if x != nil { - return x.DirY - } - return 0 -} - -func (x *PlayerDownsync) GetVelX() int32 { - if x != nil { - return x.VelX - } - return 0 -} - -func (x *PlayerDownsync) GetVelY() int32 { - if x != nil { - return x.VelY - } - return 0 -} - -func (x *PlayerDownsync) GetSpeed() int32 { - if x != nil { - return x.Speed - } - return 0 -} - -func (x *PlayerDownsync) GetBattleState() int32 { - if x != nil { - return x.BattleState - } - return 0 -} - -func (x *PlayerDownsync) GetJoinIndex() int32 { - if x != nil { - return x.JoinIndex - } - return 0 -} - -func (x *PlayerDownsync) GetColliderRadius() float64 { - if x != nil { - return x.ColliderRadius - } - return 0 -} - -func (x *PlayerDownsync) GetRemoved() bool { - if x != nil { - return x.Removed - } - return false -} - -func (x *PlayerDownsync) GetScore() int32 { - if x != nil { - return x.Score - } - return 0 -} - -func (x *PlayerDownsync) GetLastMoveGmtMillis() int32 { - if x != nil { - return x.LastMoveGmtMillis - } - return 0 -} - -func (x *PlayerDownsync) GetFramesToRecover() int32 { - if x != nil { - return x.FramesToRecover - } - return 0 -} - -func (x *PlayerDownsync) GetHp() int32 { - if x != nil { - return x.Hp - } - return 0 -} - -func (x *PlayerDownsync) GetMaxHp() int32 { - if x != nil { - return x.MaxHp - } - return 0 -} - -func (x *PlayerDownsync) GetCharacterState() int32 { - if x != nil { - return x.CharacterState - } - return 0 -} - -func (x *PlayerDownsync) GetInAir() bool { - if x != nil { - return x.InAir - } - return false -} - -func (x *PlayerDownsync) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PlayerDownsync) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *PlayerDownsync) GetAvatar() string { - if x != nil { - return x.Avatar - } - return "" -} - -type InputFrameDecoded struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dx int32 `protobuf:"varint,1,opt,name=dx,proto3" json:"dx,omitempty"` - Dy int32 `protobuf:"varint,2,opt,name=dy,proto3" json:"dy,omitempty"` - BtnALevel int32 `protobuf:"varint,3,opt,name=btnALevel,proto3" json:"btnALevel,omitempty"` - BtnBLevel int32 `protobuf:"varint,4,opt,name=btnBLevel,proto3" json:"btnBLevel,omitempty"` -} - -func (x *InputFrameDecoded) Reset() { - *x = InputFrameDecoded{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputFrameDecoded) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputFrameDecoded) ProtoMessage() {} - -func (x *InputFrameDecoded) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputFrameDecoded.ProtoReflect.Descriptor instead. -func (*InputFrameDecoded) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{1} -} - -func (x *InputFrameDecoded) GetDx() int32 { - if x != nil { - return x.Dx - } - return 0 -} - -func (x *InputFrameDecoded) GetDy() int32 { - if x != nil { - return x.Dy - } - return 0 -} - -func (x *InputFrameDecoded) GetBtnALevel() int32 { - if x != nil { - return x.BtnALevel - } - return 0 -} - -func (x *InputFrameDecoded) GetBtnBLevel() int32 { - if x != nil { - return x.BtnBLevel - } - return 0 -} - -type InputFrameUpsync struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InputFrameId int32 `protobuf:"varint,1,opt,name=inputFrameId,proto3" json:"inputFrameId,omitempty"` - Encoded uint64 `protobuf:"varint,2,opt,name=encoded,proto3" json:"encoded,omitempty"` -} - -func (x *InputFrameUpsync) Reset() { - *x = InputFrameUpsync{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputFrameUpsync) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputFrameUpsync) ProtoMessage() {} - -func (x *InputFrameUpsync) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputFrameUpsync.ProtoReflect.Descriptor instead. -func (*InputFrameUpsync) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{2} -} - -func (x *InputFrameUpsync) GetInputFrameId() int32 { - if x != nil { - return x.InputFrameId - } - return 0 -} - -func (x *InputFrameUpsync) GetEncoded() uint64 { - if x != nil { - return x.Encoded - } - return 0 -} - -type InputFrameDownsync struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InputFrameId int32 `protobuf:"varint,1,opt,name=inputFrameId,proto3" json:"inputFrameId,omitempty"` - InputList []uint64 `protobuf:"varint,2,rep,packed,name=inputList,proto3" json:"inputList,omitempty"` // Indexed by "joinIndex", we try to compress the "single player input" into 1 word (64-bit for 64-bit Golang runtime) because atomic compare-and-swap only works on 1 word. Although CAS on custom struct is possible in Golang 1.19 https://pkg.go.dev/sync/atomic@go1.19.1#Value.CompareAndSwap, using a single word is still faster whenever possible. - ConfirmedList uint64 `protobuf:"varint,3,opt,name=confirmedList,proto3" json:"confirmedList,omitempty"` // Indexed by "joinIndex", same compression concern as above -} - -func (x *InputFrameDownsync) Reset() { - *x = InputFrameDownsync{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputFrameDownsync) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputFrameDownsync) ProtoMessage() {} - -func (x *InputFrameDownsync) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputFrameDownsync.ProtoReflect.Descriptor instead. -func (*InputFrameDownsync) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{3} -} - -func (x *InputFrameDownsync) GetInputFrameId() int32 { - if x != nil { - return x.InputFrameId - } - return 0 -} - -func (x *InputFrameDownsync) GetInputList() []uint64 { - if x != nil { - return x.InputList - } - return nil -} - -func (x *InputFrameDownsync) GetConfirmedList() uint64 { - if x != nil { - return x.ConfirmedList - } - return 0 -} - -type HeartbeatUpsync struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ClientTimestamp int64 `protobuf:"varint,1,opt,name=clientTimestamp,proto3" json:"clientTimestamp,omitempty"` -} - -func (x *HeartbeatUpsync) Reset() { - *x = HeartbeatUpsync{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeartbeatUpsync) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeartbeatUpsync) ProtoMessage() {} - -func (x *HeartbeatUpsync) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeartbeatUpsync.ProtoReflect.Descriptor instead. -func (*HeartbeatUpsync) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{4} -} - -func (x *HeartbeatUpsync) GetClientTimestamp() int64 { - if x != nil { - return x.ClientTimestamp - } - return 0 -} - -type WsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgId int32 `protobuf:"varint,1,opt,name=msgId,proto3" json:"msgId,omitempty"` - PlayerId int32 `protobuf:"varint,2,opt,name=playerId,proto3" json:"playerId,omitempty"` - Act int32 `protobuf:"varint,3,opt,name=act,proto3" json:"act,omitempty"` - JoinIndex int32 `protobuf:"varint,4,opt,name=joinIndex,proto3" json:"joinIndex,omitempty"` - AckingFrameId int32 `protobuf:"varint,5,opt,name=ackingFrameId,proto3" json:"ackingFrameId,omitempty"` - AckingInputFrameId int32 `protobuf:"varint,6,opt,name=ackingInputFrameId,proto3" json:"ackingInputFrameId,omitempty"` - InputFrameUpsyncBatch []*InputFrameUpsync `protobuf:"bytes,7,rep,name=inputFrameUpsyncBatch,proto3" json:"inputFrameUpsyncBatch,omitempty"` - Hb *HeartbeatUpsync `protobuf:"bytes,8,opt,name=hb,proto3" json:"hb,omitempty"` -} - -func (x *WsReq) Reset() { - *x = WsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WsReq) ProtoMessage() {} - -func (x *WsReq) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WsReq.ProtoReflect.Descriptor instead. -func (*WsReq) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{5} -} - -func (x *WsReq) GetMsgId() int32 { - if x != nil { - return x.MsgId - } - return 0 -} - -func (x *WsReq) GetPlayerId() int32 { - if x != nil { - return x.PlayerId - } - return 0 -} - -func (x *WsReq) GetAct() int32 { - if x != nil { - return x.Act - } - return 0 -} - -func (x *WsReq) GetJoinIndex() int32 { - if x != nil { - return x.JoinIndex - } - return 0 -} - -func (x *WsReq) GetAckingFrameId() int32 { - if x != nil { - return x.AckingFrameId - } - return 0 -} - -func (x *WsReq) GetAckingInputFrameId() int32 { - if x != nil { - return x.AckingInputFrameId - } - return 0 -} - -func (x *WsReq) GetInputFrameUpsyncBatch() []*InputFrameUpsync { - if x != nil { - return x.InputFrameUpsyncBatch - } - return nil -} - -func (x *WsReq) GetHb() *HeartbeatUpsync { - if x != nil { - return x.Hb - } - return nil -} - -type WsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Ret int32 `protobuf:"varint,1,opt,name=ret,proto3" json:"ret,omitempty"` - EchoedMsgId int32 `protobuf:"varint,2,opt,name=echoedMsgId,proto3" json:"echoedMsgId,omitempty"` - Act int32 `protobuf:"varint,3,opt,name=act,proto3" json:"act,omitempty"` - Rdf *RoomDownsyncFrame `protobuf:"bytes,4,opt,name=rdf,proto3" json:"rdf,omitempty"` - InputFrameDownsyncBatch []*InputFrameDownsync `protobuf:"bytes,5,rep,name=inputFrameDownsyncBatch,proto3" json:"inputFrameDownsyncBatch,omitempty"` - BciFrame *BattleColliderInfo `protobuf:"bytes,6,opt,name=bciFrame,proto3" json:"bciFrame,omitempty"` -} - -func (x *WsResp) Reset() { - *x = WsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WsResp) ProtoMessage() {} - -func (x *WsResp) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WsResp.ProtoReflect.Descriptor instead. -func (*WsResp) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{6} -} - -func (x *WsResp) GetRet() int32 { - if x != nil { - return x.Ret - } - return 0 -} - -func (x *WsResp) GetEchoedMsgId() int32 { - if x != nil { - return x.EchoedMsgId - } - return 0 -} - -func (x *WsResp) GetAct() int32 { - if x != nil { - return x.Act - } - return 0 -} - -func (x *WsResp) GetRdf() *RoomDownsyncFrame { - if x != nil { - return x.Rdf - } - return nil -} - -func (x *WsResp) GetInputFrameDownsyncBatch() []*InputFrameDownsync { - if x != nil { - return x.InputFrameDownsyncBatch - } - return nil -} - -func (x *WsResp) GetBciFrame() *BattleColliderInfo { - if x != nil { - return x.BciFrame - } - return nil -} - -type InputsBufferSnapshot struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RefRenderFrameId int32 `protobuf:"varint,1,opt,name=refRenderFrameId,proto3" json:"refRenderFrameId,omitempty"` - UnconfirmedMask uint64 `protobuf:"varint,2,opt,name=unconfirmedMask,proto3" json:"unconfirmedMask,omitempty"` - ToSendInputFrameDownsyncs []*InputFrameDownsync `protobuf:"bytes,3,rep,name=toSendInputFrameDownsyncs,proto3" json:"toSendInputFrameDownsyncs,omitempty"` - ShouldForceResync bool `protobuf:"varint,4,opt,name=shouldForceResync,proto3" json:"shouldForceResync,omitempty"` -} - -func (x *InputsBufferSnapshot) Reset() { - *x = InputsBufferSnapshot{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InputsBufferSnapshot) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InputsBufferSnapshot) ProtoMessage() {} - -func (x *InputsBufferSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InputsBufferSnapshot.ProtoReflect.Descriptor instead. -func (*InputsBufferSnapshot) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{7} -} - -func (x *InputsBufferSnapshot) GetRefRenderFrameId() int32 { - if x != nil { - return x.RefRenderFrameId - } - return 0 -} - -func (x *InputsBufferSnapshot) GetUnconfirmedMask() uint64 { - if x != nil { - return x.UnconfirmedMask - } - return 0 -} - -func (x *InputsBufferSnapshot) GetToSendInputFrameDownsyncs() []*InputFrameDownsync { - if x != nil { - return x.ToSendInputFrameDownsyncs - } - return nil -} - -func (x *InputsBufferSnapshot) GetShouldForceResync() bool { - if x != nil { - return x.ShouldForceResync - } - return false -} - -type Barrier struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Boundary *sharedprotos.Polygon2D `protobuf:"bytes,1,opt,name=boundary,proto3" json:"boundary,omitempty"` -} - -func (x *Barrier) Reset() { - *x = Barrier{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Barrier) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Barrier) ProtoMessage() {} - -func (x *Barrier) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Barrier.ProtoReflect.Descriptor instead. -func (*Barrier) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{8} -} - -func (x *Barrier) GetBoundary() *sharedprotos.Polygon2D { - if x != nil { - return x.Boundary - } - return nil -} - -type MeleeBullet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // for offender - BattleLocalId int32 `protobuf:"varint,1,opt,name=battleLocalId,proto3" json:"battleLocalId,omitempty"` - StartupFrames int32 `protobuf:"varint,2,opt,name=startupFrames,proto3" json:"startupFrames,omitempty"` - ActiveFrames int32 `protobuf:"varint,3,opt,name=activeFrames,proto3" json:"activeFrames,omitempty"` - RecoveryFrames int32 `protobuf:"varint,4,opt,name=recoveryFrames,proto3" json:"recoveryFrames,omitempty"` - RecoveryFramesOnBlock int32 `protobuf:"varint,5,opt,name=recoveryFramesOnBlock,proto3" json:"recoveryFramesOnBlock,omitempty"` - RecoveryFramesOnHit int32 `protobuf:"varint,6,opt,name=recoveryFramesOnHit,proto3" json:"recoveryFramesOnHit,omitempty"` - Moveforward *sharedprotos.Vec2D `protobuf:"bytes,7,opt,name=moveforward,proto3" json:"moveforward,omitempty"` - HitboxOffset float64 `protobuf:"fixed64,8,opt,name=hitboxOffset,proto3" json:"hitboxOffset,omitempty"` - HitboxSize *sharedprotos.Vec2D `protobuf:"bytes,9,opt,name=hitboxSize,proto3" json:"hitboxSize,omitempty"` - OriginatedRenderFrameId int32 `protobuf:"varint,10,opt,name=originatedRenderFrameId,proto3" json:"originatedRenderFrameId,omitempty"` - // for defender - HitStunFrames int32 `protobuf:"varint,11,opt,name=hitStunFrames,proto3" json:"hitStunFrames,omitempty"` - BlockStunFrames int32 `protobuf:"varint,12,opt,name=blockStunFrames,proto3" json:"blockStunFrames,omitempty"` - Pushback float64 `protobuf:"fixed64,13,opt,name=pushback,proto3" json:"pushback,omitempty"` - ReleaseTriggerType int32 `protobuf:"varint,14,opt,name=releaseTriggerType,proto3" json:"releaseTriggerType,omitempty"` // 1: rising-edge, 2: falling-edge - Damage int32 `protobuf:"varint,15,opt,name=damage,proto3" json:"damage,omitempty"` - OffenderJoinIndex int32 `protobuf:"varint,16,opt,name=offenderJoinIndex,proto3" json:"offenderJoinIndex,omitempty"` - OffenderPlayerId int32 `protobuf:"varint,17,opt,name=offenderPlayerId,proto3" json:"offenderPlayerId,omitempty"` -} - -func (x *MeleeBullet) Reset() { - *x = MeleeBullet{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MeleeBullet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MeleeBullet) ProtoMessage() {} - -func (x *MeleeBullet) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MeleeBullet.ProtoReflect.Descriptor instead. -func (*MeleeBullet) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{9} -} - -func (x *MeleeBullet) GetBattleLocalId() int32 { - if x != nil { - return x.BattleLocalId - } - return 0 -} - -func (x *MeleeBullet) GetStartupFrames() int32 { - if x != nil { - return x.StartupFrames - } - return 0 -} - -func (x *MeleeBullet) GetActiveFrames() int32 { - if x != nil { - return x.ActiveFrames - } - return 0 -} - -func (x *MeleeBullet) GetRecoveryFrames() int32 { - if x != nil { - return x.RecoveryFrames - } - return 0 -} - -func (x *MeleeBullet) GetRecoveryFramesOnBlock() int32 { - if x != nil { - return x.RecoveryFramesOnBlock - } - return 0 -} - -func (x *MeleeBullet) GetRecoveryFramesOnHit() int32 { - if x != nil { - return x.RecoveryFramesOnHit - } - return 0 -} - -func (x *MeleeBullet) GetMoveforward() *sharedprotos.Vec2D { - if x != nil { - return x.Moveforward - } - return nil -} - -func (x *MeleeBullet) GetHitboxOffset() float64 { - if x != nil { - return x.HitboxOffset - } - return 0 -} - -func (x *MeleeBullet) GetHitboxSize() *sharedprotos.Vec2D { - if x != nil { - return x.HitboxSize - } - return nil -} - -func (x *MeleeBullet) GetOriginatedRenderFrameId() int32 { - if x != nil { - return x.OriginatedRenderFrameId - } - return 0 -} - -func (x *MeleeBullet) GetHitStunFrames() int32 { - if x != nil { - return x.HitStunFrames - } - return 0 -} - -func (x *MeleeBullet) GetBlockStunFrames() int32 { - if x != nil { - return x.BlockStunFrames - } - return 0 -} - -func (x *MeleeBullet) GetPushback() float64 { - if x != nil { - return x.Pushback - } - return 0 -} - -func (x *MeleeBullet) GetReleaseTriggerType() int32 { - if x != nil { - return x.ReleaseTriggerType - } - return 0 -} - -func (x *MeleeBullet) GetDamage() int32 { - if x != nil { - return x.Damage - } - return 0 -} - -func (x *MeleeBullet) GetOffenderJoinIndex() int32 { - if x != nil { - return x.OffenderJoinIndex - } - return 0 -} - -func (x *MeleeBullet) GetOffenderPlayerId() int32 { - if x != nil { - return x.OffenderPlayerId - } - return 0 -} - -type BattleColliderInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StageName string `protobuf:"bytes,1,opt,name=stageName,proto3" json:"stageName,omitempty"` - StrToVec2DListMap map[string]*sharedprotos.Vec2DList `protobuf:"bytes,2,rep,name=strToVec2DListMap,proto3" json:"strToVec2DListMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StrToPolygon2DListMap map[string]*sharedprotos.Polygon2DList `protobuf:"bytes,3,rep,name=strToPolygon2DListMap,proto3" json:"strToPolygon2DListMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - StageDiscreteW int32 `protobuf:"varint,4,opt,name=stageDiscreteW,proto3" json:"stageDiscreteW,omitempty"` - StageDiscreteH int32 `protobuf:"varint,5,opt,name=stageDiscreteH,proto3" json:"stageDiscreteH,omitempty"` - StageTileW int32 `protobuf:"varint,6,opt,name=stageTileW,proto3" json:"stageTileW,omitempty"` - StageTileH int32 `protobuf:"varint,7,opt,name=stageTileH,proto3" json:"stageTileH,omitempty"` - IntervalToPing int32 `protobuf:"varint,8,opt,name=intervalToPing,proto3" json:"intervalToPing,omitempty"` - WillKickIfInactiveFor int32 `protobuf:"varint,9,opt,name=willKickIfInactiveFor,proto3" json:"willKickIfInactiveFor,omitempty"` - BoundRoomId int32 `protobuf:"varint,10,opt,name=boundRoomId,proto3" json:"boundRoomId,omitempty"` - BattleDurationFrames int32 `protobuf:"varint,12,opt,name=battleDurationFrames,proto3" json:"battleDurationFrames,omitempty"` - BattleDurationNanos int64 `protobuf:"varint,13,opt,name=battleDurationNanos,proto3" json:"battleDurationNanos,omitempty"` - ServerFps int32 `protobuf:"varint,14,opt,name=serverFps,proto3" json:"serverFps,omitempty"` - InputDelayFrames int32 `protobuf:"varint,15,opt,name=inputDelayFrames,proto3" json:"inputDelayFrames,omitempty"` // in the count of render frames - InputScaleFrames uint32 `protobuf:"varint,16,opt,name=inputScaleFrames,proto3" json:"inputScaleFrames,omitempty"` // inputDelayedAndScaledFrameId = ((originalFrameId - InputDelayFrames) >> InputScaleFrames) - NstDelayFrames int32 `protobuf:"varint,17,opt,name=nstDelayFrames,proto3" json:"nstDelayFrames,omitempty"` // network-single-trip delay in the count of render frames, proposed to be (InputDelayFrames >> 1) because we expect a round-trip delay to be exactly "InputDelayFrames" - InputFrameUpsyncDelayTolerance int32 `protobuf:"varint,18,opt,name=inputFrameUpsyncDelayTolerance,proto3" json:"inputFrameUpsyncDelayTolerance,omitempty"` - MaxChasingRenderFramesPerUpdate int32 `protobuf:"varint,19,opt,name=maxChasingRenderFramesPerUpdate,proto3" json:"maxChasingRenderFramesPerUpdate,omitempty"` - PlayerBattleState int32 `protobuf:"varint,20,opt,name=playerBattleState,proto3" json:"playerBattleState,omitempty"` - RollbackEstimatedDtMillis float64 `protobuf:"fixed64,21,opt,name=rollbackEstimatedDtMillis,proto3" json:"rollbackEstimatedDtMillis,omitempty"` - RollbackEstimatedDtNanos int64 `protobuf:"varint,22,opt,name=rollbackEstimatedDtNanos,proto3" json:"rollbackEstimatedDtNanos,omitempty"` - WorldToVirtualGridRatio float64 `protobuf:"fixed64,23,opt,name=worldToVirtualGridRatio,proto3" json:"worldToVirtualGridRatio,omitempty"` - VirtualGridToWorldRatio float64 `protobuf:"fixed64,24,opt,name=virtualGridToWorldRatio,proto3" json:"virtualGridToWorldRatio,omitempty"` - SpAtkLookupFrames int32 `protobuf:"varint,25,opt,name=spAtkLookupFrames,proto3" json:"spAtkLookupFrames,omitempty"` - RenderCacheSize int32 `protobuf:"varint,26,opt,name=renderCacheSize,proto3" json:"renderCacheSize,omitempty"` - MeleeSkillConfig map[int32]*MeleeBullet `protobuf:"bytes,27,rep,name=meleeSkillConfig,proto3" json:"meleeSkillConfig,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // skillId -> skill - SnapIntoPlatformOverlap float64 `protobuf:"fixed64,28,opt,name=snapIntoPlatformOverlap,proto3" json:"snapIntoPlatformOverlap,omitempty"` - SnapIntoPlatformThreshold float64 `protobuf:"fixed64,29,opt,name=snapIntoPlatformThreshold,proto3" json:"snapIntoPlatformThreshold,omitempty"` - JumpingInitVelY int32 `protobuf:"varint,30,opt,name=jumpingInitVelY,proto3" json:"jumpingInitVelY,omitempty"` - GravityX int32 `protobuf:"varint,31,opt,name=gravityX,proto3" json:"gravityX,omitempty"` - GravityY int32 `protobuf:"varint,32,opt,name=gravityY,proto3" json:"gravityY,omitempty"` -} - -func (x *BattleColliderInfo) Reset() { - *x = BattleColliderInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BattleColliderInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BattleColliderInfo) ProtoMessage() {} - -func (x *BattleColliderInfo) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BattleColliderInfo.ProtoReflect.Descriptor instead. -func (*BattleColliderInfo) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{10} -} - -func (x *BattleColliderInfo) GetStageName() string { - if x != nil { - return x.StageName - } - return "" -} - -func (x *BattleColliderInfo) GetStrToVec2DListMap() map[string]*sharedprotos.Vec2DList { - if x != nil { - return x.StrToVec2DListMap - } - return nil -} - -func (x *BattleColliderInfo) GetStrToPolygon2DListMap() map[string]*sharedprotos.Polygon2DList { - if x != nil { - return x.StrToPolygon2DListMap - } - return nil -} - -func (x *BattleColliderInfo) GetStageDiscreteW() int32 { - if x != nil { - return x.StageDiscreteW - } - return 0 -} - -func (x *BattleColliderInfo) GetStageDiscreteH() int32 { - if x != nil { - return x.StageDiscreteH - } - return 0 -} - -func (x *BattleColliderInfo) GetStageTileW() int32 { - if x != nil { - return x.StageTileW - } - return 0 -} - -func (x *BattleColliderInfo) GetStageTileH() int32 { - if x != nil { - return x.StageTileH - } - return 0 -} - -func (x *BattleColliderInfo) GetIntervalToPing() int32 { - if x != nil { - return x.IntervalToPing - } - return 0 -} - -func (x *BattleColliderInfo) GetWillKickIfInactiveFor() int32 { - if x != nil { - return x.WillKickIfInactiveFor - } - return 0 -} - -func (x *BattleColliderInfo) GetBoundRoomId() int32 { - if x != nil { - return x.BoundRoomId - } - return 0 -} - -func (x *BattleColliderInfo) GetBattleDurationFrames() int32 { - if x != nil { - return x.BattleDurationFrames - } - return 0 -} - -func (x *BattleColliderInfo) GetBattleDurationNanos() int64 { - if x != nil { - return x.BattleDurationNanos - } - return 0 -} - -func (x *BattleColliderInfo) GetServerFps() int32 { - if x != nil { - return x.ServerFps - } - return 0 -} - -func (x *BattleColliderInfo) GetInputDelayFrames() int32 { - if x != nil { - return x.InputDelayFrames - } - return 0 -} - -func (x *BattleColliderInfo) GetInputScaleFrames() uint32 { - if x != nil { - return x.InputScaleFrames - } - return 0 -} - -func (x *BattleColliderInfo) GetNstDelayFrames() int32 { - if x != nil { - return x.NstDelayFrames - } - return 0 -} - -func (x *BattleColliderInfo) GetInputFrameUpsyncDelayTolerance() int32 { - if x != nil { - return x.InputFrameUpsyncDelayTolerance - } - return 0 -} - -func (x *BattleColliderInfo) GetMaxChasingRenderFramesPerUpdate() int32 { - if x != nil { - return x.MaxChasingRenderFramesPerUpdate - } - return 0 -} - -func (x *BattleColliderInfo) GetPlayerBattleState() int32 { - if x != nil { - return x.PlayerBattleState - } - return 0 -} - -func (x *BattleColliderInfo) GetRollbackEstimatedDtMillis() float64 { - if x != nil { - return x.RollbackEstimatedDtMillis - } - return 0 -} - -func (x *BattleColliderInfo) GetRollbackEstimatedDtNanos() int64 { - if x != nil { - return x.RollbackEstimatedDtNanos - } - return 0 -} - -func (x *BattleColliderInfo) GetWorldToVirtualGridRatio() float64 { - if x != nil { - return x.WorldToVirtualGridRatio - } - return 0 -} - -func (x *BattleColliderInfo) GetVirtualGridToWorldRatio() float64 { - if x != nil { - return x.VirtualGridToWorldRatio - } - return 0 -} - -func (x *BattleColliderInfo) GetSpAtkLookupFrames() int32 { - if x != nil { - return x.SpAtkLookupFrames - } - return 0 -} - -func (x *BattleColliderInfo) GetRenderCacheSize() int32 { - if x != nil { - return x.RenderCacheSize - } - return 0 -} - -func (x *BattleColliderInfo) GetMeleeSkillConfig() map[int32]*MeleeBullet { - if x != nil { - return x.MeleeSkillConfig - } - return nil -} - -func (x *BattleColliderInfo) GetSnapIntoPlatformOverlap() float64 { - if x != nil { - return x.SnapIntoPlatformOverlap - } - return 0 -} - -func (x *BattleColliderInfo) GetSnapIntoPlatformThreshold() float64 { - if x != nil { - return x.SnapIntoPlatformThreshold - } - return 0 -} - -func (x *BattleColliderInfo) GetJumpingInitVelY() int32 { - if x != nil { - return x.JumpingInitVelY - } - return 0 -} - -func (x *BattleColliderInfo) GetGravityX() int32 { - if x != nil { - return x.GravityX - } - return 0 -} - -func (x *BattleColliderInfo) GetGravityY() int32 { - if x != nil { - return x.GravityY - } - return 0 -} - -type RoomDownsyncFrame struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - PlayersArr []*PlayerDownsync `protobuf:"bytes,2,rep,name=playersArr,proto3" json:"playersArr,omitempty"` - CountdownNanos int64 `protobuf:"varint,3,opt,name=countdownNanos,proto3" json:"countdownNanos,omitempty"` - MeleeBullets []*MeleeBullet `protobuf:"bytes,4,rep,name=meleeBullets,proto3" json:"meleeBullets,omitempty"` // I don't know how to mimic inheritance/composition in protobuf by far, thus using an array for each type of bullet as a compromise - BackendUnconfirmedMask uint64 `protobuf:"varint,5,opt,name=backendUnconfirmedMask,proto3" json:"backendUnconfirmedMask,omitempty"` // Indexed by "joinIndex", same compression concern as stated in InputFrameDownsync - ShouldForceResync bool `protobuf:"varint,6,opt,name=shouldForceResync,proto3" json:"shouldForceResync,omitempty"` - Players map[int32]*PlayerDownsync `protobuf:"bytes,99,rep,name=players,proto3" json:"players,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // TO BE DEPRECATED -} - -func (x *RoomDownsyncFrame) Reset() { - *x = RoomDownsyncFrame{} - if protoimpl.UnsafeEnabled { - mi := &file_room_downsync_frame_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RoomDownsyncFrame) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RoomDownsyncFrame) ProtoMessage() {} - -func (x *RoomDownsyncFrame) ProtoReflect() protoreflect.Message { - mi := &file_room_downsync_frame_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RoomDownsyncFrame.ProtoReflect.Descriptor instead. -func (*RoomDownsyncFrame) Descriptor() ([]byte, []int) { - return file_room_downsync_frame_proto_rawDescGZIP(), []int{11} -} - -func (x *RoomDownsyncFrame) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *RoomDownsyncFrame) GetPlayersArr() []*PlayerDownsync { - if x != nil { - return x.PlayersArr - } - return nil -} - -func (x *RoomDownsyncFrame) GetCountdownNanos() int64 { - if x != nil { - return x.CountdownNanos - } - return 0 -} - -func (x *RoomDownsyncFrame) GetMeleeBullets() []*MeleeBullet { - if x != nil { - return x.MeleeBullets - } - return nil -} - -func (x *RoomDownsyncFrame) GetBackendUnconfirmedMask() uint64 { - if x != nil { - return x.BackendUnconfirmedMask - } - return 0 -} - -func (x *RoomDownsyncFrame) GetShouldForceResync() bool { - if x != nil { - return x.ShouldForceResync - } - return false -} - -func (x *RoomDownsyncFrame) GetPlayers() map[int32]*PlayerDownsync { - if x != nil { - return x.Players - } - return nil -} - -var File_room_downsync_frame_proto protoreflect.FileDescriptor - -var file_room_downsync_frame_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x1a, 0x0e, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x04, 0x0a, 0x0e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, - 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, - 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x76, 0x69, - 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x58, 0x12, 0x22, 0x0a, 0x0c, 0x76, 0x69, - 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, 0x59, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x69, 0x72, 0x58, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x69, - 0x72, 0x58, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x59, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x64, 0x69, 0x72, 0x59, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x58, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x65, - 0x6c, 0x59, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x76, 0x65, 0x6c, 0x59, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, - 0x70, 0x65, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0e, 0x63, 0x6f, - 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x11, - 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, - 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x76, - 0x65, 0x47, 0x6d, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x66, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x54, 0x6f, 0x52, 0x65, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x02, 0x68, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x78, 0x48, 0x70, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x78, 0x48, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x68, - 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0e, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x41, 0x69, 0x72, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x69, 0x6e, 0x41, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x22, 0x6f, 0x0a, 0x11, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, - 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x64, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x64, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x62, - 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, - 0x62, 0x74, 0x6e, 0x41, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x74, 0x6e, - 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x74, - 0x6e, 0x42, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x6e, 0x70, 0x75, 0x74, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x22, 0x0a, 0x0c, 0x69, - 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x22, 0x7c, 0x0a, 0x12, 0x49, 0x6e, 0x70, - 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x12, - 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4c, 0x69, - 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x22, 0xb8, 0x02, 0x0a, 0x05, 0x57, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14, - 0x0a, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, - 0x73, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, - 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x12, 0x61, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, - 0x15, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, - 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, 0x02, 0x68, 0x62, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x02, 0x68, 0x62, 0x22, - 0x89, 0x02, 0x0a, 0x06, 0x57, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x65, 0x63, 0x68, 0x6f, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x61, 0x63, 0x74, - 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x64, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x03, 0x72, 0x64, 0x66, 0x12, 0x54, 0x0a, - 0x17, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x79, 0x6e, 0x63, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x17, 0x69, 0x6e, 0x70, 0x75, - 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x36, 0x0a, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x08, 0x62, 0x63, 0x69, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x14, - 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, - 0x72, 0x65, 0x66, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, - 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x19, 0x74, 0x6f, - 0x53, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, - 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, 0x19, 0x74, 0x6f, 0x53, 0x65, 0x6e, - 0x64, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x44, 0x6f, 0x77, 0x6e, 0x73, - 0x79, 0x6e, 0x63, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, - 0x6e, 0x63, 0x22, 0x3e, 0x0a, 0x07, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x12, 0x33, 0x0a, - 0x08, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, - 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x52, 0x08, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, - 0x72, 0x79, 0x22, 0xe5, 0x05, 0x0a, 0x0b, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, - 0x65, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x4c, 0x6f, 0x63, 0x61, - 0x6c, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x22, - 0x0a, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x72, 0x65, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x72, 0x65, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x4f, 0x6e, 0x48, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x72, - 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x48, - 0x69, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x6d, 0x6f, 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x56, 0x65, 0x63, 0x32, 0x44, 0x52, 0x0b, 0x6d, 0x6f, - 0x76, 0x65, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x69, 0x74, - 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x0c, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x33, 0x0a, - 0x0a, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x56, 0x65, 0x63, 0x32, 0x44, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x62, 0x6f, 0x78, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x17, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x52, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, - 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x69, 0x74, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x53, 0x74, 0x75, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, - 0x70, 0x75, 0x73, 0x68, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x65, - 0x61, 0x73, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x72, 0x69, - 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x61, 0x6d, 0x61, - 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x61, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x2c, 0x0a, 0x11, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x6f, 0x66, 0x66, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4a, 0x6f, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2a, - 0x0a, 0x10, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x49, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6f, 0x66, 0x66, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x49, 0x64, 0x22, 0xf2, 0x0e, 0x0a, 0x12, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x5f, 0x0a, 0x11, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x54, 0x6f, 0x56, 0x65, 0x63, 0x32, - 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x73, - 0x74, 0x72, 0x54, 0x6f, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, - 0x12, 0x6b, 0x0a, 0x15, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, - 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, - 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x74, 0x72, 0x54, - 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, - 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x15, 0x73, 0x74, 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, - 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x26, 0x0a, - 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x57, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, - 0x72, 0x65, 0x74, 0x65, 0x57, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, - 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x73, - 0x74, 0x61, 0x67, 0x65, 0x44, 0x69, 0x73, 0x63, 0x72, 0x65, 0x74, 0x65, 0x48, 0x12, 0x1e, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x57, 0x12, 0x1e, 0x0a, - 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x54, 0x69, 0x6c, 0x65, 0x48, 0x12, 0x26, 0x0a, - 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x54, - 0x6f, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, - 0x6b, 0x49, 0x66, 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x77, 0x69, 0x6c, 0x6c, 0x4b, 0x69, 0x63, 0x6b, 0x49, 0x66, - 0x49, 0x6e, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x46, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x32, 0x0a, - 0x14, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x14, 0x62, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, - 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, - 0x6e, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x70, 0x73, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x70, - 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, - 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x69, 0x6e, 0x70, - 0x75, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, - 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x53, 0x63, - 0x61, 0x6c, 0x65, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x73, 0x74, - 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0e, 0x6e, 0x73, 0x74, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x73, 0x12, 0x46, 0x0a, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, - 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x05, 0x52, 0x1e, 0x69, 0x6e, 0x70, 0x75, 0x74, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x73, 0x79, 0x6e, 0x63, 0x44, 0x65, 0x6c, 0x61, 0x79, - 0x54, 0x6f, 0x6c, 0x65, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x1f, 0x6d, 0x61, 0x78, - 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, - 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x1f, 0x6d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x73, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x50, 0x65, 0x72, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, - 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x3c, 0x0a, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, - 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x19, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, - 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, - 0x3a, 0x0a, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x18, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x45, 0x73, 0x74, 0x69, 0x6d, - 0x61, 0x74, 0x65, 0x64, 0x44, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x38, 0x0a, 0x17, 0x77, - 0x6f, 0x72, 0x6c, 0x64, 0x54, 0x6f, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, - 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x17, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x77, 0x6f, - 0x72, 0x6c, 0x64, 0x54, 0x6f, 0x56, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, 0x72, 0x69, 0x64, - 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x38, 0x0a, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, - 0x47, 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6c, 0x47, - 0x72, 0x69, 0x64, 0x54, 0x6f, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, - 0x2c, 0x0a, 0x11, 0x73, 0x70, 0x41, 0x74, 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x73, 0x70, 0x41, 0x74, - 0x6b, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, - 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x18, 0x1a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x43, 0x61, - 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x6d, 0x65, 0x6c, 0x65, 0x65, - 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x1b, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, - 0x6c, 0x65, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x10, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x17, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, - 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, - 0x18, 0x1c, 0x20, 0x01, 0x28, 0x01, 0x52, 0x17, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x12, - 0x3c, 0x0a, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x1d, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x19, 0x73, 0x6e, 0x61, 0x70, 0x49, 0x6e, 0x74, 0x6f, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x28, 0x0a, - 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, 0x59, - 0x18, 0x1e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x56, 0x65, 0x6c, 0x59, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, - 0x74, 0x79, 0x58, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, - 0x74, 0x79, 0x58, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x59, 0x18, - 0x20, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x67, 0x72, 0x61, 0x76, 0x69, 0x74, 0x79, 0x59, 0x1a, - 0x5d, 0x0a, 0x16, 0x53, 0x74, 0x72, 0x54, 0x6f, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x68, 0x61, - 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x56, 0x65, 0x63, 0x32, 0x44, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x65, - 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x54, 0x6f, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x31, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x6f, 0x6c, - 0x79, 0x67, 0x6f, 0x6e, 0x32, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x58, 0x0a, 0x15, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x53, 0x6b, - 0x69, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, - 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0xb8, 0x03, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, - 0x46, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, - 0x41, 0x72, 0x72, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x73, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, - 0x63, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x41, 0x72, 0x72, 0x12, 0x26, 0x0a, - 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, - 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, - 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x4d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x0c, 0x6d, 0x65, 0x6c, 0x65, 0x65, 0x42, 0x75, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x36, - 0x0a, 0x16, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x72, 0x6d, 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, - 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x65, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, - 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x11, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x79, 0x6e, 0x63, 0x12, 0x40, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, - 0x63, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, - 0x6f, 0x6f, 0x6d, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x46, 0x72, 0x61, 0x6d, 0x65, - 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x1a, 0x52, 0x0a, 0x0c, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x11, 0x5a, 0x0f, 0x6a, 0x73, - 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_room_downsync_frame_proto_rawDescOnce sync.Once - file_room_downsync_frame_proto_rawDescData = file_room_downsync_frame_proto_rawDesc -) - -func file_room_downsync_frame_proto_rawDescGZIP() []byte { - file_room_downsync_frame_proto_rawDescOnce.Do(func() { - file_room_downsync_frame_proto_rawDescData = protoimpl.X.CompressGZIP(file_room_downsync_frame_proto_rawDescData) - }) - return file_room_downsync_frame_proto_rawDescData -} - -var file_room_downsync_frame_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_room_downsync_frame_proto_goTypes = []interface{}{ - (*PlayerDownsync)(nil), // 0: protos.PlayerDownsync - (*InputFrameDecoded)(nil), // 1: protos.InputFrameDecoded - (*InputFrameUpsync)(nil), // 2: protos.InputFrameUpsync - (*InputFrameDownsync)(nil), // 3: protos.InputFrameDownsync - (*HeartbeatUpsync)(nil), // 4: protos.HeartbeatUpsync - (*WsReq)(nil), // 5: protos.WsReq - (*WsResp)(nil), // 6: protos.WsResp - (*InputsBufferSnapshot)(nil), // 7: protos.InputsBufferSnapshot - (*Barrier)(nil), // 8: protos.Barrier - (*MeleeBullet)(nil), // 9: protos.MeleeBullet - (*BattleColliderInfo)(nil), // 10: protos.BattleColliderInfo - (*RoomDownsyncFrame)(nil), // 11: protos.RoomDownsyncFrame - nil, // 12: protos.BattleColliderInfo.StrToVec2DListMapEntry - nil, // 13: protos.BattleColliderInfo.StrToPolygon2DListMapEntry - nil, // 14: protos.BattleColliderInfo.MeleeSkillConfigEntry - nil, // 15: protos.RoomDownsyncFrame.PlayersEntry - (*sharedprotos.Polygon2D)(nil), // 16: sharedprotos.Polygon2D - (*sharedprotos.Vec2D)(nil), // 17: sharedprotos.Vec2D - (*sharedprotos.Vec2DList)(nil), // 18: sharedprotos.Vec2DList - (*sharedprotos.Polygon2DList)(nil), // 19: sharedprotos.Polygon2DList -} -var file_room_downsync_frame_proto_depIdxs = []int32{ - 2, // 0: protos.WsReq.inputFrameUpsyncBatch:type_name -> protos.InputFrameUpsync - 4, // 1: protos.WsReq.hb:type_name -> protos.HeartbeatUpsync - 11, // 2: protos.WsResp.rdf:type_name -> protos.RoomDownsyncFrame - 3, // 3: protos.WsResp.inputFrameDownsyncBatch:type_name -> protos.InputFrameDownsync - 10, // 4: protos.WsResp.bciFrame:type_name -> protos.BattleColliderInfo - 3, // 5: protos.InputsBufferSnapshot.toSendInputFrameDownsyncs:type_name -> protos.InputFrameDownsync - 16, // 6: protos.Barrier.boundary:type_name -> sharedprotos.Polygon2D - 17, // 7: protos.MeleeBullet.moveforward:type_name -> sharedprotos.Vec2D - 17, // 8: protos.MeleeBullet.hitboxSize:type_name -> sharedprotos.Vec2D - 12, // 9: protos.BattleColliderInfo.strToVec2DListMap:type_name -> protos.BattleColliderInfo.StrToVec2DListMapEntry - 13, // 10: protos.BattleColliderInfo.strToPolygon2DListMap:type_name -> protos.BattleColliderInfo.StrToPolygon2DListMapEntry - 14, // 11: protos.BattleColliderInfo.meleeSkillConfig:type_name -> protos.BattleColliderInfo.MeleeSkillConfigEntry - 0, // 12: protos.RoomDownsyncFrame.playersArr:type_name -> protos.PlayerDownsync - 9, // 13: protos.RoomDownsyncFrame.meleeBullets:type_name -> protos.MeleeBullet - 15, // 14: protos.RoomDownsyncFrame.players:type_name -> protos.RoomDownsyncFrame.PlayersEntry - 18, // 15: protos.BattleColliderInfo.StrToVec2DListMapEntry.value:type_name -> sharedprotos.Vec2DList - 19, // 16: protos.BattleColliderInfo.StrToPolygon2DListMapEntry.value:type_name -> sharedprotos.Polygon2DList - 9, // 17: protos.BattleColliderInfo.MeleeSkillConfigEntry.value:type_name -> protos.MeleeBullet - 0, // 18: protos.RoomDownsyncFrame.PlayersEntry.value:type_name -> protos.PlayerDownsync - 19, // [19:19] is the sub-list for method output_type - 19, // [19:19] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_room_downsync_frame_proto_init() } -func file_room_downsync_frame_proto_init() { - if File_room_downsync_frame_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_room_downsync_frame_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PlayerDownsync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputFrameDecoded); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputFrameUpsync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputFrameDownsync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeartbeatUpsync); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InputsBufferSnapshot); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Barrier); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MeleeBullet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleColliderInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_room_downsync_frame_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RoomDownsyncFrame); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_room_downsync_frame_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_room_downsync_frame_proto_goTypes, - DependencyIndexes: file_room_downsync_frame_proto_depIdxs, - MessageInfos: file_room_downsync_frame_proto_msgTypes, - }.Build() - File_room_downsync_frame_proto = out.File - file_room_downsync_frame_proto_rawDesc = nil - file_room_downsync_frame_proto_goTypes = nil - file_room_downsync_frame_proto_depIdxs = nil -} diff --git a/proto_gen_shortcut.sh b/proto_gen_shortcut.sh index 9919230..505cf68 100755 --- a/proto_gen_shortcut.sh +++ b/proto_gen_shortcut.sh @@ -9,7 +9,7 @@ protoc -I=$golang_basedir_1/../frontend/assets/resources/pbfiles/ --go_out=. geo echo "GOLANG part 1 done" # [WARNING] The following "room_downsync_frame.proto" is generated in another Go package than "geometry.proto", but the generated Go codes are also required to work with imports correctly! -golang_basedir_2=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/jsexport +golang_basedir_2=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/battle_srv protoc -I=$golang_basedir_2/../frontend/assets/resources/pbfiles/ --go_out=. room_downsync_frame.proto echo "GOLANG part 2 done"